Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/Doxyfile
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/Doxyfile	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/Doxyfile	(revision 1749)
@@ -0,0 +1,1725 @@
+# Doxyfile 1.7.4
+
+# This file describes the settings to be used by the documentation system
+# doxygen (www.doxygen.org) for a project
+#
+# All text after a hash (#) is considered a comment and will be ignored
+# The format is:
+#       TAG = value [value, ...]
+# For lists items can also be appended using:
+#       TAG += value [value, ...]
+# Values that contain spaces should be placed between quotes (" ")
+
+#---------------------------------------------------------------------------
+# Project related configuration options
+#---------------------------------------------------------------------------
+
+# This tag specifies the encoding used for all characters in the config file 
+# that follow. The default is UTF-8 which is also the encoding used for all 
+# text before the first occurrence of this tag. Doxygen uses libiconv (or the 
+# iconv built into libc) for the transcoding. See 
+# http://www.gnu.org/software/libiconv for the list of possible encodings.
+
+DOXYFILE_ENCODING      = UTF-8
+
+# The PROJECT_NAME tag is a single word (or a sequence of words surrounded 
+# by quotes) that should identify the project.
+
+PROJECT_NAME           = XIOS
+
+# The PROJECT_NUMBER tag can be used to enter a project or revision number. 
+# This could be handy for archiving the generated documentation or 
+# if some version control system is used.
+
+PROJECT_NUMBER         = 1.0
+
+# Using the PROJECT_BRIEF tag one can provide an optional one line description 
+# for a project that appears at the top of each page and should give viewer 
+# a quick idea about the purpose of the project. Keep the description short.
+
+PROJECT_BRIEF          = "Xml I/O Server"
+
+# With the PROJECT_LOGO tag one can specify an logo or icon that is 
+# included in the documentation. The maximum height of the logo should not 
+# exceed 55 pixels and the maximum width should not exceed 200 pixels. 
+# Doxygen will copy the logo to the output directory.
+
+PROJECT_LOGO           = 
+
+# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) 
+# base path where the generated documentation will be put. 
+# If a relative path is entered, it will be relative to the location 
+# where doxygen was started. If left blank the current directory will be used.
+
+OUTPUT_DIRECTORY       = ./doc
+
+# If the CREATE_SUBDIRS tag is set to YES, then doxygen will create 
+# 4096 sub-directories (in 2 levels) under the output directory of each output 
+# format and will distribute the generated files over these directories. 
+# Enabling this option can be useful when feeding doxygen a huge amount of 
+# source files, where putting all generated files in the same directory would 
+# otherwise cause performance problems for the file system.
+
+CREATE_SUBDIRS         = NO
+
+# The OUTPUT_LANGUAGE tag is used to specify the language in which all 
+# documentation generated by doxygen is written. Doxygen will use this 
+# information to generate all constant output in the proper language. 
+# The default language is English, other supported languages are: 
+# Afrikaans, Arabic, Brazilian, Catalan, Chinese, Chinese-Traditional, 
+# Croatian, Czech, Danish, Dutch, Esperanto, Farsi, Finnish, French, German, 
+# Greek, Hungarian, Italian, Japanese, Japanese-en (Japanese with English 
+# messages), Korean, Korean-en, Lithuanian, Norwegian, Macedonian, Persian, 
+# Polish, Portuguese, Romanian, Russian, Serbian, Serbian-Cyrillic, Slovak, 
+# Slovene, Spanish, Swedish, Ukrainian, and Vietnamese.
+
+OUTPUT_LANGUAGE        = French
+
+# If the BRIEF_MEMBER_DESC tag is set to YES (the default) Doxygen will 
+# include brief member descriptions after the members that are listed in 
+# the file and class documentation (similar to JavaDoc). 
+# Set to NO to disable this.
+
+BRIEF_MEMBER_DESC      = YES
+
+# If the REPEAT_BRIEF tag is set to YES (the default) Doxygen will prepend 
+# the brief description of a member or function before the detailed description. 
+# Note: if both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the 
+# brief descriptions will be completely suppressed.
+
+REPEAT_BRIEF           = YES
+
+# This tag implements a quasi-intelligent brief description abbreviator 
+# that is used to form the text in various listings. Each string 
+# in this list, if found as the leading text of the brief description, will be 
+# stripped from the text and the result after processing the whole list, is 
+# used as the annotated text. Otherwise, the brief description is used as-is. 
+# If left blank, the following values are used ("$name" is automatically 
+# replaced with the name of the entity): "The $name class" "The $name widget" 
+# "The $name file" "is" "provides" "specifies" "contains" 
+# "represents" "a" "an" "the"
+
+ABBREVIATE_BRIEF       = "The $name class" \
+                         "The $name widget" \
+                         "The $name file" \
+                         is \
+                         provides \
+                         specifies \
+                         contains \
+                         represents \
+                         a \
+                         an \
+                         the
+
+# If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then 
+# Doxygen will generate a detailed section even if there is only a brief 
+# description.
+
+ALWAYS_DETAILED_SEC    = NO
+
+# If the INLINE_INHERITED_MEMB tag is set to YES, doxygen will show all 
+# inherited members of a class in the documentation of that class as if those 
+# members were ordinary class members. Constructors, destructors and assignment 
+# operators of the base classes will not be shown.
+
+INLINE_INHERITED_MEMB  = NO
+
+# If the FULL_PATH_NAMES tag is set to YES then Doxygen will prepend the full 
+# path before files name in the file list and in the header files. If set 
+# to NO the shortest path that makes the file name unique will be used.
+
+FULL_PATH_NAMES        = YES
+
+# If the FULL_PATH_NAMES tag is set to YES then the STRIP_FROM_PATH tag 
+# can be used to strip a user-defined part of the path. Stripping is 
+# only done if one of the specified strings matches the left-hand part of 
+# the path. The tag can be used to show relative paths in the file list. 
+# If left blank the directory from which doxygen is run is used as the 
+# path to strip.
+
+STRIP_FROM_PATH        = 
+
+# The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of 
+# the path mentioned in the documentation of a class, which tells 
+# the reader which header file to include in order to use a class. 
+# If left blank only the name of the header file containing the class 
+# definition is used. Otherwise one should specify the include paths that 
+# are normally passed to the compiler using the -I flag.
+
+STRIP_FROM_INC_PATH    = 
+
+# If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter 
+# (but less readable) file names. This can be useful if your file system 
+# doesn't support long names like on DOS, Mac, or CD-ROM.
+
+SHORT_NAMES            = NO
+
+# If the JAVADOC_AUTOBRIEF tag is set to YES then Doxygen 
+# will interpret the first line (until the first dot) of a JavaDoc-style 
+# comment as the brief description. If set to NO, the JavaDoc 
+# comments will behave just like regular Qt-style comments 
+# (thus requiring an explicit @brief command for a brief description.)
+
+JAVADOC_AUTOBRIEF      = NO
+
+# If the QT_AUTOBRIEF tag is set to YES then Doxygen will 
+# interpret the first line (until the first dot) of a Qt-style 
+# comment as the brief description. If set to NO, the comments 
+# will behave just like regular Qt-style comments (thus requiring 
+# an explicit \brief command for a brief description.)
+
+QT_AUTOBRIEF           = YES
+
+# The MULTILINE_CPP_IS_BRIEF tag can be set to YES to make Doxygen 
+# treat a multi-line C++ special comment block (i.e. a block of //! or /// 
+# comments) as a brief description. This used to be the default behaviour. 
+# The new default is to treat a multi-line C++ comment block as a detailed 
+# description. Set this tag to YES if you prefer the old behaviour instead.
+
+MULTILINE_CPP_IS_BRIEF = NO
+
+# If the INHERIT_DOCS tag is set to YES (the default) then an undocumented 
+# member inherits the documentation from any documented member that it 
+# re-implements.
+
+INHERIT_DOCS           = YES
+
+# If the SEPARATE_MEMBER_PAGES tag is set to YES, then doxygen will produce 
+# a new page for each member. If set to NO, the documentation of a member will 
+# be part of the file/class/namespace that contains it.
+
+SEPARATE_MEMBER_PAGES  = NO
+
+# The TAB_SIZE tag can be used to set the number of spaces in a tab. 
+# Doxygen uses this value to replace tabs by spaces in code fragments.
+
+TAB_SIZE               = 8
+
+# This tag can be used to specify a number of aliases that acts 
+# as commands in the documentation. An alias has the form "name=value". 
+# For example adding "sideeffect=\par Side Effects:\n" will allow you to 
+# put the command \sideeffect (or @sideeffect) in the documentation, which 
+# will result in a user-defined paragraph with heading "Side Effects:". 
+# You can put \n's in the value part of an alias to insert newlines.
+
+ALIASES                = 
+
+# Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C 
+# sources only. Doxygen will then generate output that is more tailored for C. 
+# For instance, some of the names that are used will be different. The list 
+# of all members will be omitted, etc.
+
+OPTIMIZE_OUTPUT_FOR_C  = NO
+
+# Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java 
+# sources only. Doxygen will then generate output that is more tailored for 
+# Java. For instance, namespaces will be presented as packages, qualified 
+# scopes will look different, etc.
+
+OPTIMIZE_OUTPUT_JAVA   = NO
+
+# Set the OPTIMIZE_FOR_FORTRAN tag to YES if your project consists of Fortran 
+# sources only. Doxygen will then generate output that is more tailored for 
+# Fortran.
+
+OPTIMIZE_FOR_FORTRAN   = NO
+
+# Set the OPTIMIZE_OUTPUT_VHDL tag to YES if your project consists of VHDL 
+# sources. Doxygen will then generate output that is tailored for 
+# VHDL.
+
+OPTIMIZE_OUTPUT_VHDL   = NO
+
+# Doxygen selects the parser to use depending on the extension of the files it 
+# parses. With this tag you can assign which parser to use for a given extension. 
+# Doxygen has a built-in mapping, but you can override or extend it using this 
+# tag. The format is ext=language, where ext is a file extension, and language 
+# is one of the parsers supported by doxygen: IDL, Java, Javascript, CSharp, C, 
+# C++, D, PHP, Objective-C, Python, Fortran, VHDL, C, C++. For instance to make 
+# doxygen treat .inc files as Fortran files (default is PHP), and .f files as C 
+# (default is Fortran), use: inc=Fortran f=C. Note that for custom extensions 
+# you also need to set FILE_PATTERNS otherwise the files are not read by doxygen.
+
+EXTENSION_MAPPING      = 
+
+# If you use STL classes (i.e. std::string, std::vector, etc.) but do not want 
+# to include (a tag file for) the STL sources as input, then you should 
+# set this tag to YES in order to let doxygen match functions declarations and 
+# definitions whose arguments contain STL classes (e.g. func(std::string); v.s. 
+# func(std::string) {}). This also makes the inheritance and collaboration 
+# diagrams that involve STL classes more complete and accurate.
+
+BUILTIN_STL_SUPPORT    = YES
+
+# If you use Microsoft's C++/CLI language, you should set this option to YES to 
+# enable parsing support.
+
+CPP_CLI_SUPPORT        = NO
+
+# Set the SIP_SUPPORT tag to YES if your project consists of sip sources only. 
+# Doxygen will parse them like normal C++ but will assume all classes use public 
+# instead of private inheritance when no explicit protection keyword is present.
+
+SIP_SUPPORT            = NO
+
+# For Microsoft's IDL there are propget and propput attributes to indicate getter 
+# and setter methods for a property. Setting this option to YES (the default) 
+# will make doxygen replace the get and set methods by a property in the 
+# documentation. This will only work if the methods are indeed getting or 
+# setting a simple type. If this is not the case, or you want to show the 
+# methods anyway, you should set this option to NO.
+
+IDL_PROPERTY_SUPPORT   = YES
+
+# If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC 
+# tag is set to YES, then doxygen will reuse the documentation of the first 
+# member in the group (if any) for the other members of the group. By default 
+# all members of a group must be documented explicitly.
+
+DISTRIBUTE_GROUP_DOC   = NO
+
+# Set the SUBGROUPING tag to YES (the default) to allow class member groups of 
+# the same type (for instance a group of public functions) to be put as a 
+# subgroup of that type (e.g. under the Public Functions section). Set it to 
+# NO to prevent subgrouping. Alternatively, this can be done per class using 
+# the \nosubgrouping command.
+
+SUBGROUPING            = YES
+
+# When the INLINE_GROUPED_CLASSES tag is set to YES, classes, structs and 
+# unions are shown inside the group in which they are included (e.g. using 
+# @ingroup) instead of on a separate page (for HTML and Man pages) or 
+# section (for LaTeX and RTF).
+
+INLINE_GROUPED_CLASSES = NO
+
+# When TYPEDEF_HIDES_STRUCT is enabled, a typedef of a struct, union, or enum 
+# is documented as struct, union, or enum with the name of the typedef. So 
+# typedef struct TypeS {} TypeT, will appear in the documentation as a struct 
+# with name TypeT. When disabled the typedef will appear as a member of a file, 
+# namespace, or class. And the struct will be named TypeS. This can typically 
+# be useful for C code in case the coding convention dictates that all compound 
+# types are typedef'ed and only the typedef is referenced, never the tag name.
+
+TYPEDEF_HIDES_STRUCT   = NO
+
+# The SYMBOL_CACHE_SIZE determines the size of the internal cache use to 
+# determine which symbols to keep in memory and which to flush to disk. 
+# When the cache is full, less often used symbols will be written to disk. 
+# For small to medium size projects (<1000 input files) the default value is 
+# probably good enough. For larger projects a too small cache size can cause 
+# doxygen to be busy swapping symbols to and from disk most of the time 
+# causing a significant performance penalty. 
+# If the system has enough physical memory increasing the cache will improve the 
+# performance by keeping more symbols in memory. Note that the value works on 
+# a logarithmic scale so increasing the size by one will roughly double the 
+# memory usage. The cache size is given by this formula: 
+# 2^(16+SYMBOL_CACHE_SIZE). The valid range is 0..9, the default is 0, 
+# corresponding to a cache size of 2^16 = 65536 symbols
+
+SYMBOL_CACHE_SIZE      = 0
+
+#---------------------------------------------------------------------------
+# Build related configuration options
+#---------------------------------------------------------------------------
+
+# If the EXTRACT_ALL tag is set to YES doxygen will assume all entities in 
+# documentation are documented, even if no documentation was available. 
+# Private class members and static file members will be hidden unless 
+# the EXTRACT_PRIVATE and EXTRACT_STATIC tags are set to YES
+
+EXTRACT_ALL            = YES
+
+# If the EXTRACT_PRIVATE tag is set to YES all private members of a class 
+# will be included in the documentation.
+
+EXTRACT_PRIVATE        = YES
+
+# If the EXTRACT_STATIC tag is set to YES all static members of a file 
+# will be included in the documentation.
+
+EXTRACT_STATIC         = YES
+
+# If the EXTRACT_LOCAL_CLASSES tag is set to YES classes (and structs) 
+# defined locally in source files will be included in the documentation. 
+# If set to NO only classes defined in header files are included.
+
+EXTRACT_LOCAL_CLASSES  = YES
+
+# This flag is only useful for Objective-C code. When set to YES local 
+# methods, which are defined in the implementation section but not in 
+# the interface are included in the documentation. 
+# If set to NO (the default) only methods in the interface are included.
+
+EXTRACT_LOCAL_METHODS  = YES
+
+# If this flag is set to YES, the members of anonymous namespaces will be 
+# extracted and appear in the documentation as a namespace called 
+# 'anonymous_namespace{file}', where file will be replaced with the base 
+# name of the file that contains the anonymous namespace. By default 
+# anonymous namespaces are hidden.
+
+EXTRACT_ANON_NSPACES   = NO
+
+# If the HIDE_UNDOC_MEMBERS tag is set to YES, Doxygen will hide all 
+# undocumented members of documented classes, files or namespaces. 
+# If set to NO (the default) these members will be included in the 
+# various overviews, but no documentation section is generated. 
+# This option has no effect if EXTRACT_ALL is enabled.
+
+HIDE_UNDOC_MEMBERS     = NO
+
+# If the HIDE_UNDOC_CLASSES tag is set to YES, Doxygen will hide all 
+# undocumented classes that are normally visible in the class hierarchy. 
+# If set to NO (the default) these classes will be included in the various 
+# overviews. This option has no effect if EXTRACT_ALL is enabled.
+
+HIDE_UNDOC_CLASSES     = NO
+
+# If the HIDE_FRIEND_COMPOUNDS tag is set to YES, Doxygen will hide all 
+# friend (class|struct|union) declarations. 
+# If set to NO (the default) these declarations will be included in the 
+# documentation.
+
+HIDE_FRIEND_COMPOUNDS  = NO
+
+# If the HIDE_IN_BODY_DOCS tag is set to YES, Doxygen will hide any 
+# documentation blocks found inside the body of a function. 
+# If set to NO (the default) these blocks will be appended to the 
+# function's detailed documentation block.
+
+HIDE_IN_BODY_DOCS      = NO
+
+# The INTERNAL_DOCS tag determines if documentation 
+# that is typed after a \internal command is included. If the tag is set 
+# to NO (the default) then the documentation will be excluded. 
+# Set it to YES to include the internal documentation.
+
+INTERNAL_DOCS          = NO
+
+# If the CASE_SENSE_NAMES tag is set to NO then Doxygen will only generate 
+# file names in lower-case letters. If set to YES upper-case letters are also 
+# allowed. This is useful if you have classes or files whose names only differ 
+# in case and if your file system supports case sensitive file names. Windows 
+# and Mac users are advised to set this option to NO.
+
+CASE_SENSE_NAMES       = NO
+
+# If the HIDE_SCOPE_NAMES tag is set to NO (the default) then Doxygen 
+# will show members with their full class and namespace scopes in the 
+# documentation. If set to YES the scope will be hidden.
+
+HIDE_SCOPE_NAMES       = NO
+
+# If the SHOW_INCLUDE_FILES tag is set to YES (the default) then Doxygen 
+# will put a list of the files that are included by a file in the documentation 
+# of that file.
+
+SHOW_INCLUDE_FILES     = YES
+
+# If the FORCE_LOCAL_INCLUDES tag is set to YES then Doxygen 
+# will list include files with double quotes in the documentation 
+# rather than with sharp brackets.
+
+FORCE_LOCAL_INCLUDES   = NO
+
+# If the INLINE_INFO tag is set to YES (the default) then a tag [inline] 
+# is inserted in the documentation for inline members.
+
+INLINE_INFO            = YES
+
+# If the SORT_MEMBER_DOCS tag is set to YES (the default) then doxygen 
+# will sort the (detailed) documentation of file and class members 
+# alphabetically by member name. If set to NO the members will appear in 
+# declaration order.
+
+SORT_MEMBER_DOCS       = YES
+
+# If the SORT_BRIEF_DOCS tag is set to YES then doxygen will sort the 
+# brief documentation of file, namespace and class members alphabetically 
+# by member name. If set to NO (the default) the members will appear in 
+# declaration order.
+
+SORT_BRIEF_DOCS        = NO
+
+# If the SORT_MEMBERS_CTORS_1ST tag is set to YES then doxygen 
+# will sort the (brief and detailed) documentation of class members so that 
+# constructors and destructors are listed first. If set to NO (the default) 
+# the constructors will appear in the respective orders defined by 
+# SORT_MEMBER_DOCS and SORT_BRIEF_DOCS. 
+# This tag will be ignored for brief docs if SORT_BRIEF_DOCS is set to NO 
+# and ignored for detailed docs if SORT_MEMBER_DOCS is set to NO.
+
+SORT_MEMBERS_CTORS_1ST = NO
+
+# If the SORT_GROUP_NAMES tag is set to YES then doxygen will sort the 
+# hierarchy of group names into alphabetical order. If set to NO (the default) 
+# the group names will appear in their defined order.
+
+SORT_GROUP_NAMES       = NO
+
+# If the SORT_BY_SCOPE_NAME tag is set to YES, the class list will be 
+# sorted by fully-qualified names, including namespaces. If set to 
+# NO (the default), the class list will be sorted only by class name, 
+# not including the namespace part. 
+# Note: This option is not very useful if HIDE_SCOPE_NAMES is set to YES. 
+# Note: This option applies only to the class list, not to the 
+# alphabetical list.
+
+SORT_BY_SCOPE_NAME     = NO
+
+# If the STRICT_PROTO_MATCHING option is enabled and doxygen fails to 
+# do proper type resolution of all parameters of a function it will reject a 
+# match between the prototype and the implementation of a member function even 
+# if there is only one candidate or it is obvious which candidate to choose 
+# by doing a simple string match. By disabling STRICT_PROTO_MATCHING doxygen 
+# will still accept a match between prototype and implementation in such cases.
+
+STRICT_PROTO_MATCHING  = NO
+
+# The GENERATE_TODOLIST tag can be used to enable (YES) or 
+# disable (NO) the todo list. This list is created by putting \todo 
+# commands in the documentation.
+
+GENERATE_TODOLIST      = YES
+
+# The GENERATE_TESTLIST tag can be used to enable (YES) or 
+# disable (NO) the test list. This list is created by putting \test 
+# commands in the documentation.
+
+GENERATE_TESTLIST      = YES
+
+# The GENERATE_BUGLIST tag can be used to enable (YES) or 
+# disable (NO) the bug list. This list is created by putting \bug 
+# commands in the documentation.
+
+GENERATE_BUGLIST       = YES
+
+# The GENERATE_DEPRECATEDLIST tag can be used to enable (YES) or 
+# disable (NO) the deprecated list. This list is created by putting 
+# \deprecated commands in the documentation.
+
+GENERATE_DEPRECATEDLIST= YES
+
+# The ENABLED_SECTIONS tag can be used to enable conditional 
+# documentation sections, marked by \if sectionname ... \endif.
+
+ENABLED_SECTIONS       = 
+
+# The MAX_INITIALIZER_LINES tag determines the maximum number of lines 
+# the initial value of a variable or macro consists of for it to appear in 
+# the documentation. If the initializer consists of more lines than specified 
+# here it will be hidden. Use a value of 0 to hide initializers completely. 
+# The appearance of the initializer of individual variables and macros in the 
+# documentation can be controlled using \showinitializer or \hideinitializer 
+# command in the documentation regardless of this setting.
+
+MAX_INITIALIZER_LINES  = 30
+
+# Set the SHOW_USED_FILES tag to NO to disable the list of files generated 
+# at the bottom of the documentation of classes and structs. If set to YES the 
+# list will mention the files that were used to generate the documentation.
+
+SHOW_USED_FILES        = YES
+
+# If the sources in your project are distributed over multiple directories 
+# then setting the SHOW_DIRECTORIES tag to YES will show the directory hierarchy 
+# in the documentation. The default is NO.
+
+SHOW_DIRECTORIES       = YES
+
+# Set the SHOW_FILES tag to NO to disable the generation of the Files page. 
+# This will remove the Files entry from the Quick Index and from the 
+# Folder Tree View (if specified). The default is YES.
+
+SHOW_FILES             = YES
+
+# Set the SHOW_NAMESPACES tag to NO to disable the generation of the 
+# Namespaces page.  This will remove the Namespaces entry from the Quick Index 
+# and from the Folder Tree View (if specified). The default is YES.
+
+SHOW_NAMESPACES        = YES
+
+# The FILE_VERSION_FILTER tag can be used to specify a program or script that 
+# doxygen should invoke to get the current version for each file (typically from 
+# the version control system). Doxygen will invoke the program by executing (via 
+# popen()) the command <command> <input-file>, where <command> is the value of 
+# the FILE_VERSION_FILTER tag, and <input-file> is the name of an input file 
+# provided by doxygen. Whatever the program writes to standard output 
+# is used as the file version. See the manual for examples.
+
+FILE_VERSION_FILTER    = 
+
+# The LAYOUT_FILE tag can be used to specify a layout file which will be parsed 
+# by doxygen. The layout file controls the global structure of the generated 
+# output files in an output format independent way. The create the layout file 
+# that represents doxygen's defaults, run doxygen with the -l option. 
+# You can optionally specify a file name after the option, if omitted 
+# DoxygenLayout.xml will be used as the name of the layout file.
+
+LAYOUT_FILE            = 
+
+#---------------------------------------------------------------------------
+# configuration options related to warning and progress messages
+#---------------------------------------------------------------------------
+
+# The QUIET tag can be used to turn on/off the messages that are generated 
+# by doxygen. Possible values are YES and NO. If left blank NO is used.
+
+QUIET                  = NO
+
+# The WARNINGS tag can be used to turn on/off the warning messages that are 
+# generated by doxygen. Possible values are YES and NO. If left blank 
+# NO is used.
+
+WARNINGS               = YES
+
+# If WARN_IF_UNDOCUMENTED is set to YES, then doxygen will generate warnings 
+# for undocumented members. If EXTRACT_ALL is set to YES then this flag will 
+# automatically be disabled.
+
+WARN_IF_UNDOCUMENTED   = YES
+
+# If WARN_IF_DOC_ERROR is set to YES, doxygen will generate warnings for 
+# potential errors in the documentation, such as not documenting some 
+# parameters in a documented function, or documenting parameters that 
+# don't exist or using markup commands wrongly.
+
+WARN_IF_DOC_ERROR      = YES
+
+# The WARN_NO_PARAMDOC option can be enabled to get warnings for 
+# functions that are documented, but have no documentation for their parameters 
+# or return value. If set to NO (the default) doxygen will only warn about 
+# wrong or incomplete parameter documentation, but not about the absence of 
+# documentation.
+
+WARN_NO_PARAMDOC       = YES
+
+# The WARN_FORMAT tag determines the format of the warning messages that 
+# doxygen can produce. The string should contain the $file, $line, and $text 
+# tags, which will be replaced by the file and line number from which the 
+# warning originated and the warning text. Optionally the format may contain 
+# $version, which will be replaced by the version of the file (if it could 
+# be obtained via FILE_VERSION_FILTER)
+
+WARN_FORMAT            = "$file:$line: $text"
+
+# The WARN_LOGFILE tag can be used to specify a file to which warning 
+# and error messages should be written. If left blank the output is written 
+# to stderr.
+
+WARN_LOGFILE           = 
+
+#---------------------------------------------------------------------------
+# configuration options related to the input files
+#---------------------------------------------------------------------------
+
+# The INPUT tag can be used to specify the files and/or directories that contain 
+# documented source files. You may enter file names like "myfile.cpp" or 
+# directories like "/usr/src/myproject". Separate the files or directories 
+# with spaces.
+
+INPUT                  = src
+
+# This tag can be used to specify the character encoding of the source files 
+# that doxygen parses. Internally doxygen uses the UTF-8 encoding, which is 
+# also the default input encoding. Doxygen uses libiconv (or the iconv built 
+# into libc) for the transcoding. See http://www.gnu.org/software/libiconv for 
+# the list of possible encodings.
+
+INPUT_ENCODING         = UTF-8
+
+# If the value of the INPUT tag contains directories, you can use the 
+# FILE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp 
+# and *.h) to filter out the source-files in the directories. If left 
+# blank the following patterns are tested: 
+# *.c *.cc *.cxx *.cpp *.c++ *.d *.java *.ii *.ixx *.ipp *.i++ *.inl *.h *.hh 
+# *.hxx *.hpp *.h++ *.idl *.odl *.cs *.php *.php3 *.inc *.m *.mm *.dox *.py 
+# *.f90 *.f *.for *.vhd *.vhdl
+
+FILE_PATTERNS          = *.cpp \
+                         *.hpp \
+                         *.conf
+
+# The RECURSIVE tag can be used to turn specify whether or not subdirectories 
+# should be searched for input files as well. Possible values are YES and NO. 
+# If left blank NO is used.
+
+RECURSIVE              = YES
+
+# The EXCLUDE tag can be used to specify files and/or directories that should 
+# excluded from the INPUT source files. This way you can easily exclude a 
+# subdirectory from a directory tree whose root is specified with the INPUT tag.
+
+EXCLUDE                = 
+
+# The EXCLUDE_SYMLINKS tag can be used select whether or not files or 
+# directories that are symbolic links (a Unix file system feature) are excluded 
+# from the input.
+
+EXCLUDE_SYMLINKS       = NO
+
+# If the value of the INPUT tag contains directories, you can use the 
+# EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude 
+# certain files from those directories. Note that the wildcards are matched 
+# against the file with absolute path, so to exclude all test directories 
+# for example use the pattern */test/*
+
+EXCLUDE_PATTERNS       = 
+
+# The EXCLUDE_SYMBOLS tag can be used to specify one or more symbol names 
+# (namespaces, classes, functions, etc.) that should be excluded from the 
+# output. The symbol name can be a fully qualified name, a word, or if the 
+# wildcard * is used, a substring. Examples: ANamespace, AClass, 
+# AClass::ANamespace, ANamespace::*Test
+
+EXCLUDE_SYMBOLS        = 
+
+# The EXAMPLE_PATH tag can be used to specify one or more files or 
+# directories that contain example code fragments that are included (see 
+# the \include command).
+
+EXAMPLE_PATH           = 
+
+# If the value of the EXAMPLE_PATH tag contains directories, you can use the 
+# EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp 
+# and *.h) to filter out the source-files in the directories. If left 
+# blank all files are included.
+
+EXAMPLE_PATTERNS       = *
+
+# If the EXAMPLE_RECURSIVE tag is set to YES then subdirectories will be 
+# searched for input files to be used with the \include or \dontinclude 
+# commands irrespective of the value of the RECURSIVE tag. 
+# Possible values are YES and NO. If left blank NO is used.
+
+EXAMPLE_RECURSIVE      = NO
+
+# The IMAGE_PATH tag can be used to specify one or more files or 
+# directories that contain image that are included in the documentation (see 
+# the \image command).
+
+IMAGE_PATH             = 
+
+# The INPUT_FILTER tag can be used to specify a program that doxygen should 
+# invoke to filter for each input file. Doxygen will invoke the filter program 
+# by executing (via popen()) the command <filter> <input-file>, where <filter> 
+# is the value of the INPUT_FILTER tag, and <input-file> is the name of an 
+# input file. Doxygen will then use the output that the filter program writes 
+# to standard output.  If FILTER_PATTERNS is specified, this tag will be 
+# ignored.
+
+INPUT_FILTER           = 
+
+# The FILTER_PATTERNS tag can be used to specify filters on a per file pattern 
+# basis.  Doxygen will compare the file name with each pattern and apply the 
+# filter if there is a match.  The filters are a list of the form: 
+# pattern=filter (like *.cpp=my_cpp_filter). See INPUT_FILTER for further 
+# info on how filters are used. If FILTER_PATTERNS is empty or if 
+# non of the patterns match the file name, INPUT_FILTER is applied.
+
+FILTER_PATTERNS        = 
+
+# If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using 
+# INPUT_FILTER) will be used to filter the input files when producing source 
+# files to browse (i.e. when SOURCE_BROWSER is set to YES).
+
+FILTER_SOURCE_FILES    = NO
+
+# The FILTER_SOURCE_PATTERNS tag can be used to specify source filters per file 
+# pattern. A pattern will override the setting for FILTER_PATTERN (if any) 
+# and it is also possible to disable source filtering for a specific pattern 
+# using *.ext= (so without naming a filter). This option only has effect when 
+# FILTER_SOURCE_FILES is enabled.
+
+FILTER_SOURCE_PATTERNS = 
+
+#---------------------------------------------------------------------------
+# configuration options related to source browsing
+#---------------------------------------------------------------------------
+
+# If the SOURCE_BROWSER tag is set to YES then a list of source files will 
+# be generated. Documented entities will be cross-referenced with these sources. 
+# Note: To get rid of all source code in the generated output, make sure also 
+# VERBATIM_HEADERS is set to NO.
+
+SOURCE_BROWSER         = YES
+
+# Setting the INLINE_SOURCES tag to YES will include the body 
+# of functions and classes directly in the documentation.
+
+INLINE_SOURCES         = NO
+
+# Setting the STRIP_CODE_COMMENTS tag to YES (the default) will instruct 
+# doxygen to hide any special comment blocks from generated source code 
+# fragments. Normal C and C++ comments will always remain visible.
+
+STRIP_CODE_COMMENTS    = YES
+
+# If the REFERENCED_BY_RELATION tag is set to YES 
+# then for each documented function all documented 
+# functions referencing it will be listed.
+
+REFERENCED_BY_RELATION = YES
+
+# If the REFERENCES_RELATION tag is set to YES 
+# then for each documented function all documented entities 
+# called/used by that function will be listed.
+
+REFERENCES_RELATION    = YES
+
+# If the REFERENCES_LINK_SOURCE tag is set to YES (the default) 
+# and SOURCE_BROWSER tag is set to YES, then the hyperlinks from 
+# functions in REFERENCES_RELATION and REFERENCED_BY_RELATION lists will 
+# link to the source code.  Otherwise they will link to the documentation.
+
+REFERENCES_LINK_SOURCE = YES
+
+# If the USE_HTAGS tag is set to YES then the references to source code 
+# will point to the HTML generated by the htags(1) tool instead of doxygen 
+# built-in source browser. The htags tool is part of GNU's global source 
+# tagging system (see http://www.gnu.org/software/global/global.html). You 
+# will need version 4.8.6 or higher.
+
+USE_HTAGS              = NO
+
+# If the VERBATIM_HEADERS tag is set to YES (the default) then Doxygen 
+# will generate a verbatim copy of the header file for each class for 
+# which an include is specified. Set to NO to disable this.
+
+VERBATIM_HEADERS       = YES
+
+#---------------------------------------------------------------------------
+# configuration options related to the alphabetical class index
+#---------------------------------------------------------------------------
+
+# If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index 
+# of all compounds will be generated. Enable this if the project 
+# contains a lot of classes, structs, unions or interfaces.
+
+ALPHABETICAL_INDEX     = YES
+
+# If the alphabetical index is enabled (see ALPHABETICAL_INDEX) then 
+# the COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns 
+# in which this list will be split (can be a number in the range [1..20])
+
+COLS_IN_ALPHA_INDEX    = 5
+
+# In case all classes in a project start with a common prefix, all 
+# classes will be put under the same header in the alphabetical index. 
+# The IGNORE_PREFIX tag can be used to specify one or more prefixes that 
+# should be ignored while generating the index headers.
+
+IGNORE_PREFIX          = 
+
+#---------------------------------------------------------------------------
+# configuration options related to the HTML output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_HTML tag is set to YES (the default) Doxygen will 
+# generate HTML output.
+
+GENERATE_HTML          = YES
+
+# The HTML_OUTPUT tag is used to specify where the HTML docs will be put. 
+# If a relative path is entered the value of OUTPUT_DIRECTORY will be 
+# put in front of it. If left blank `html' will be used as the default path.
+
+HTML_OUTPUT            = html
+
+# The HTML_FILE_EXTENSION tag can be used to specify the file extension for 
+# each generated HTML page (for example: .htm,.php,.asp). If it is left blank 
+# doxygen will generate files with .html extension.
+
+HTML_FILE_EXTENSION    = .html
+
+# The HTML_HEADER tag can be used to specify a personal HTML header for 
+# each generated HTML page. If it is left blank doxygen will generate a 
+# standard header. Note that when using a custom header you are responsible 
+# for the proper inclusion of any scripts and style sheets that doxygen 
+# needs, which is dependent on the configuration options used. 
+# It is adviced to generate a default header using "doxygen -w html 
+# header.html footer.html stylesheet.css YourConfigFile" and then modify 
+# that header. Note that the header is subject to change so you typically 
+# have to redo this when upgrading to a newer version of doxygen or when
+# changing the value of configuration settings such as GENERATE_TREEVIEW!
+
+HTML_HEADER            = 
+
+# The HTML_FOOTER tag can be used to specify a personal HTML footer for 
+# each generated HTML page. If it is left blank doxygen will generate a 
+# standard footer.
+
+HTML_FOOTER            = 
+
+# If the HTML_TIMESTAMP tag is set to YES then the generated HTML
+# documentation will contain the timesstamp.
+
+HTML_TIMESTAMP         = YES
+
+# The HTML_STYLESHEET tag can be used to specify a user-defined cascading 
+# style sheet that is used by each HTML page. It can be used to 
+# fine-tune the look of the HTML output. If the tag is left blank doxygen 
+# will generate a default style sheet. Note that doxygen will try to copy 
+# the style sheet file to the HTML output directory, so don't put your own 
+# stylesheet in the HTML output directory as well, or it will be erased!
+
+HTML_STYLESHEET        = 
+
+# The HTML_EXTRA_FILES tag can be used to specify one or more extra images or 
+# other source files which should be copied to the HTML output directory. Note 
+# that these files will be copied to the base HTML output directory. Use the 
+# $relpath$ marker in the HTML_HEADER and/or HTML_FOOTER files to load these 
+# files. In the HTML_STYLESHEET file, use the file name only. Also note that 
+# the files will be copied as-is; there are no commands or markers available.
+
+HTML_EXTRA_FILES       = 
+
+# The HTML_COLORSTYLE_HUE tag controls the color of the HTML output. 
+# Doxygen will adjust the colors in the stylesheet and background images 
+# according to this color. Hue is specified as an angle on a colorwheel, 
+# see http://en.wikipedia.org/wiki/Hue for more information. 
+# For instance the value 0 represents red, 60 is yellow, 120 is green, 
+# 180 is cyan, 240 is blue, 300 purple, and 360 is red again. 
+# The allowed range is 0 to 359.
+
+HTML_COLORSTYLE_HUE    = 224
+
+# The HTML_COLORSTYLE_SAT tag controls the purity (or saturation) of 
+# the colors in the HTML output. For a value of 0 the output will use 
+# grayscales only. A value of 255 will produce the most vivid colors.
+
+HTML_COLORSTYLE_SAT    = 63
+
+# The HTML_COLORSTYLE_GAMMA tag controls the gamma correction applied to 
+# the luminance component of the colors in the HTML output. Values below 
+# 100 gradually make the output lighter, whereas values above 100 make 
+# the output darker. The value divided by 100 is the actual gamma applied, 
+# so 80 represents a gamma of 0.8, The value 220 represents a gamma of 2.2, 
+# and 100 does not change the gamma.
+
+HTML_COLORSTYLE_GAMMA  = 152
+
+# If the HTML_TIMESTAMP tag is set to YES then the footer of each generated HTML 
+# page will contain the date and time when the page was generated. Setting 
+# this to NO can help when comparing the output of multiple runs.
+
+HTML_TIMESTAMP         = YES
+
+# If the HTML_ALIGN_MEMBERS tag is set to YES, the members of classes, 
+# files or namespaces will be aligned in HTML using tables. If set to 
+# NO a bullet list will be used.
+
+HTML_ALIGN_MEMBERS     = YES
+
+# If the HTML_DYNAMIC_SECTIONS tag is set to YES then the generated HTML 
+# documentation will contain sections that can be hidden and shown after the 
+# page has loaded. For this to work a browser that supports 
+# JavaScript and DHTML is required (for instance Mozilla 1.0+, Firefox 
+# Netscape 6.0+, Internet explorer 5.0+, Konqueror, or Safari).
+
+HTML_DYNAMIC_SECTIONS  = YES
+
+# If the GENERATE_DOCSET tag is set to YES, additional index files 
+# will be generated that can be used as input for Apple's Xcode 3 
+# integrated development environment, introduced with OSX 10.5 (Leopard). 
+# To create a documentation set, doxygen will generate a Makefile in the 
+# HTML output directory. Running make will produce the docset in that 
+# directory and running "make install" will install the docset in 
+# ~/Library/Developer/Shared/Documentation/DocSets so that Xcode will find 
+# it at startup. 
+# See http://developer.apple.com/tools/creatingdocsetswithdoxygen.html 
+# for more information.
+
+GENERATE_DOCSET        = NO
+
+# When GENERATE_DOCSET tag is set to YES, this tag determines the name of the 
+# feed. A documentation feed provides an umbrella under which multiple 
+# documentation sets from a single provider (such as a company or product suite) 
+# can be grouped.
+
+DOCSET_FEEDNAME        = "Doxygen generated docs"
+
+# When GENERATE_DOCSET tag is set to YES, this tag specifies a string that 
+# should uniquely identify the documentation set bundle. This should be a 
+# reverse domain-name style string, e.g. com.mycompany.MyDocSet. Doxygen 
+# will append .docset to the name.
+
+DOCSET_BUNDLE_ID       = org.doxygen.Project
+
+# When GENERATE_PUBLISHER_ID tag specifies a string that should uniquely identify 
+# the documentation publisher. This should be a reverse domain-name style 
+# string, e.g. com.mycompany.MyDocSet.documentation.
+
+DOCSET_PUBLISHER_ID    = org.doxygen.Publisher
+
+# The GENERATE_PUBLISHER_NAME tag identifies the documentation publisher.
+
+DOCSET_PUBLISHER_NAME  = Publisher
+
+# If the GENERATE_HTMLHELP tag is set to YES, additional index files 
+# will be generated that can be used as input for tools like the 
+# Microsoft HTML help workshop to generate a compiled HTML help file (.chm) 
+# of the generated HTML documentation.
+
+GENERATE_HTMLHELP      = NO
+
+# If the GENERATE_HTMLHELP tag is set to YES, the CHM_FILE tag can 
+# be used to specify the file name of the resulting .chm file. You 
+# can add a path in front of the file if the result should not be 
+# written to the html output directory.
+
+CHM_FILE               = 
+
+# If the GENERATE_HTMLHELP tag is set to YES, the HHC_LOCATION tag can 
+# be used to specify the location (absolute path including file name) of 
+# the HTML help compiler (hhc.exe). If non-empty doxygen will try to run 
+# the HTML help compiler on the generated index.hhp.
+
+HHC_LOCATION           = 
+
+# If the GENERATE_HTMLHELP tag is set to YES, the GENERATE_CHI flag 
+# controls if a separate .chi index file is generated (YES) or that 
+# it should be included in the master .chm file (NO).
+
+GENERATE_CHI           = NO
+
+# If the GENERATE_HTMLHELP tag is set to YES, the CHM_INDEX_ENCODING 
+# is used to encode HtmlHelp index (hhk), content (hhc) and project file 
+# content.
+
+CHM_INDEX_ENCODING     = 
+
+# If the GENERATE_HTMLHELP tag is set to YES, the BINARY_TOC flag 
+# controls whether a binary table of contents is generated (YES) or a 
+# normal table of contents (NO) in the .chm file.
+
+BINARY_TOC             = NO
+
+# The TOC_EXPAND flag can be set to YES to add extra items for group members 
+# to the contents of the HTML help documentation and to the tree view.
+
+TOC_EXPAND             = NO
+
+# If the GENERATE_QHP tag is set to YES and both QHP_NAMESPACE and 
+# QHP_VIRTUAL_FOLDER are set, an additional index file will be generated 
+# that can be used as input for Qt's qhelpgenerator to generate a 
+# Qt Compressed Help (.qch) of the generated HTML documentation.
+
+GENERATE_QHP           = NO
+
+# If the QHG_LOCATION tag is specified, the QCH_FILE tag can 
+# be used to specify the file name of the resulting .qch file. 
+# The path specified is relative to the HTML output folder.
+
+QCH_FILE               = 
+
+# The QHP_NAMESPACE tag specifies the namespace to use when generating 
+# Qt Help Project output. For more information please see 
+# http://doc.trolltech.com/qthelpproject.html#namespace
+
+QHP_NAMESPACE          = org.doxygen.Project
+
+# The QHP_VIRTUAL_FOLDER tag specifies the namespace to use when generating 
+# Qt Help Project output. For more information please see 
+# http://doc.trolltech.com/qthelpproject.html#virtual-folders
+
+QHP_VIRTUAL_FOLDER     = doc
+
+# If QHP_CUST_FILTER_NAME is set, it specifies the name of a custom filter to 
+# add. For more information please see 
+# http://doc.trolltech.com/qthelpproject.html#custom-filters
+
+QHP_CUST_FILTER_NAME   = 
+
+# The QHP_CUST_FILT_ATTRS tag specifies the list of the attributes of the 
+# custom filter to add. For more information please see 
+# <a href="http://doc.trolltech.com/qthelpproject.html#custom-filters"> 
+# Qt Help Project / Custom Filters</a>.
+
+QHP_CUST_FILTER_ATTRS  = 
+
+# The QHP_SECT_FILTER_ATTRS tag specifies the list of the attributes this 
+# project's 
+# filter section matches. 
+# <a href="http://doc.trolltech.com/qthelpproject.html#filter-attributes"> 
+# Qt Help Project / Filter Attributes</a>.
+
+QHP_SECT_FILTER_ATTRS  = 
+
+# If the GENERATE_QHP tag is set to YES, the QHG_LOCATION tag can 
+# be used to specify the location of Qt's qhelpgenerator. 
+# If non-empty doxygen will try to run qhelpgenerator on the generated 
+# .qhp file.
+
+QHG_LOCATION           = 
+
+# If the GENERATE_ECLIPSEHELP tag is set to YES, additional index files  
+# will be generated, which together with the HTML files, form an Eclipse help 
+# plugin. To install this plugin and make it available under the help contents 
+# menu in Eclipse, the contents of the directory containing the HTML and XML 
+# files needs to be copied into the plugins directory of eclipse. The name of 
+# the directory within the plugins directory should be the same as 
+# the ECLIPSE_DOC_ID value. After copying Eclipse needs to be restarted before 
+# the help appears.
+
+GENERATE_ECLIPSEHELP   = NO
+
+# A unique identifier for the eclipse help plugin. When installing the plugin 
+# the directory name containing the HTML and XML files should also have 
+# this name.
+
+ECLIPSE_DOC_ID         = org.doxygen.Project
+
+# The DISABLE_INDEX tag can be used to turn on/off the condensed index at 
+# top of each HTML page. The value NO (the default) enables the index and 
+# the value YES disables it.
+
+DISABLE_INDEX          = NO
+
+# The ENUM_VALUES_PER_LINE tag can be used to set the number of enum values 
+# (range [0,1..20]) that doxygen will group on one line in the generated HTML 
+# documentation. Note that a value of 0 will completely suppress the enum 
+# values from appearing in the overview section.
+
+ENUM_VALUES_PER_LINE   = 4
+
+# The GENERATE_TREEVIEW tag is used to specify whether a tree-like index 
+# structure should be generated to display hierarchical information. 
+# If the tag value is set to YES, a side panel will be generated 
+# containing a tree-like index structure (just like the one that 
+# is generated for HTML Help). For this to work a browser that supports 
+# JavaScript, DHTML, CSS and frames is required (i.e. any modern browser). 
+# Windows users are probably better off using the HTML help feature.
+
+GENERATE_TREEVIEW      = YES
+
+# By enabling USE_INLINE_TREES, doxygen will generate the Groups, Directories, 
+# and Class Hierarchy pages using a tree view instead of an ordered list.
+
+USE_INLINE_TREES       = YES
+
+# If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be 
+# used to set the initial width (in pixels) of the frame in which the tree 
+# is shown.
+
+TREEVIEW_WIDTH         = 250
+
+# When the EXT_LINKS_IN_WINDOW option is set to YES doxygen will open 
+# links to external symbols imported via tag files in a separate window.
+
+EXT_LINKS_IN_WINDOW    = NO
+
+# Use this tag to change the font size of Latex formulas included 
+# as images in the HTML documentation. The default is 10. Note that 
+# when you change the font size after a successful doxygen run you need 
+# to manually remove any form_*.png images from the HTML output directory 
+# to force them to be regenerated.
+
+FORMULA_FONTSIZE       = 10
+
+# Use the FORMULA_TRANPARENT tag to determine whether or not the images 
+# generated for formulas are transparent PNGs. Transparent PNGs are 
+# not supported properly for IE 6.0, but are supported on all modern browsers. 
+# Note that when changing this option you need to delete any form_*.png files 
+# in the HTML output before the changes have effect.
+
+FORMULA_TRANSPARENT    = YES
+
+# Enable the USE_MATHJAX option to render LaTeX formulas using MathJax 
+# (see http://www.mathjax.org) which uses client side Javascript for the 
+# rendering instead of using prerendered bitmaps. Use this if you do not 
+# have LaTeX installed or if you want to formulas look prettier in the HTML 
+# output. When enabled you also need to install MathJax separately and 
+# configure the path to it using the MATHJAX_RELPATH option.
+
+USE_MATHJAX            = NO
+
+# When MathJax is enabled you need to specify the location relative to the 
+# HTML output directory using the MATHJAX_RELPATH option. The destination 
+# directory should contain the MathJax.js script. For instance, if the mathjax 
+# directory is located at the same level as the HTML output directory, then 
+# MATHJAX_RELPATH should be ../mathjax. The default value points to the 
+# mathjax.org site, so you can quickly see the result without installing 
+# MathJax, but it is strongly recommended to install a local copy of MathJax 
+# before deployment.
+
+MATHJAX_RELPATH        = http://www.mathjax.org/mathjax
+
+# When the SEARCHENGINE tag is enabled doxygen will generate a search box 
+# for the HTML output. The underlying search engine uses javascript 
+# and DHTML and should work on any modern browser. Note that when using 
+# HTML help (GENERATE_HTMLHELP), Qt help (GENERATE_QHP), or docsets 
+# (GENERATE_DOCSET) there is already a search function so this one should 
+# typically be disabled. For large projects the javascript based search engine 
+# can be slow, then enabling SERVER_BASED_SEARCH may provide a better solution.
+
+SEARCHENGINE           = YES
+
+# When the SERVER_BASED_SEARCH tag is enabled the search engine will be 
+# implemented using a PHP enabled web server instead of at the web client 
+# using Javascript. Doxygen will generate the search PHP script and index 
+# file to put on the web server. The advantage of the server 
+# based approach is that it scales better to large projects and allows 
+# full text search. The disadvantages are that it is more difficult to setup 
+# and does not have live searching capabilities.
+
+SERVER_BASED_SEARCH    = NO
+
+#---------------------------------------------------------------------------
+# configuration options related to the LaTeX output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_LATEX tag is set to YES (the default) Doxygen will 
+# generate Latex output.
+
+GENERATE_LATEX         = NO
+
+# The LATEX_OUTPUT tag is used to specify where the LaTeX docs will be put. 
+# If a relative path is entered the value of OUTPUT_DIRECTORY will be 
+# put in front of it. If left blank `latex' will be used as the default path.
+
+LATEX_OUTPUT           = latex
+
+# The LATEX_CMD_NAME tag can be used to specify the LaTeX command name to be 
+# invoked. If left blank `latex' will be used as the default command name. 
+# Note that when enabling USE_PDFLATEX this option is only used for 
+# generating bitmaps for formulas in the HTML output, but not in the 
+# Makefile that is written to the output directory.
+
+LATEX_CMD_NAME         = latex
+
+# The MAKEINDEX_CMD_NAME tag can be used to specify the command name to 
+# generate index for LaTeX. If left blank `makeindex' will be used as the 
+# default command name.
+
+MAKEINDEX_CMD_NAME     = makeindex
+
+# If the COMPACT_LATEX tag is set to YES Doxygen generates more compact 
+# LaTeX documents. This may be useful for small projects and may help to 
+# save some trees in general.
+
+COMPACT_LATEX          = NO
+
+# The PAPER_TYPE tag can be used to set the paper type that is used 
+# by the printer. Possible values are: a4, letter, legal and 
+# executive. If left blank a4wide will be used.
+
+PAPER_TYPE             = a4
+
+# The EXTRA_PACKAGES tag can be to specify one or more names of LaTeX 
+# packages that should be included in the LaTeX output.
+
+EXTRA_PACKAGES         = 
+
+# The LATEX_HEADER tag can be used to specify a personal LaTeX header for 
+# the generated latex document. The header should contain everything until 
+# the first chapter. If it is left blank doxygen will generate a 
+# standard header. Notice: only use this tag if you know what you are doing!
+
+LATEX_HEADER           = 
+
+# The LATEX_FOOTER tag can be used to specify a personal LaTeX footer for 
+# the generated latex document. The footer should contain everything after 
+# the last chapter. If it is left blank doxygen will generate a 
+# standard footer. Notice: only use this tag if you know what you are doing!
+
+LATEX_FOOTER           = 
+
+# If the PDF_HYPERLINKS tag is set to YES, the LaTeX that is generated 
+# is prepared for conversion to pdf (using ps2pdf). The pdf file will 
+# contain links (just like the HTML output) instead of page references 
+# This makes the output suitable for online browsing using a pdf viewer.
+
+PDF_HYPERLINKS         = YES
+
+# If the USE_PDFLATEX tag is set to YES, pdflatex will be used instead of 
+# plain latex in the generated Makefile. Set this option to YES to get a 
+# higher quality PDF documentation.
+
+USE_PDFLATEX           = YES
+
+# If the LATEX_BATCHMODE tag is set to YES, doxygen will add the \\batchmode. 
+# command to the generated LaTeX files. This will instruct LaTeX to keep 
+# running if errors occur, instead of asking the user for help. 
+# This option is also used when generating formulas in HTML.
+
+LATEX_BATCHMODE        = NO
+
+# If LATEX_HIDE_INDICES is set to YES then doxygen will not 
+# include the index chapters (such as File Index, Compound Index, etc.) 
+# in the output.
+
+LATEX_HIDE_INDICES     = NO
+
+# If LATEX_SOURCE_CODE is set to YES then doxygen will include 
+# source code with syntax highlighting in the LaTeX output. 
+# Note that which sources are shown also depends on other settings 
+# such as SOURCE_BROWSER.
+
+LATEX_SOURCE_CODE      = NO
+
+#---------------------------------------------------------------------------
+# configuration options related to the RTF output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_RTF tag is set to YES Doxygen will generate RTF output 
+# The RTF output is optimized for Word 97 and may not look very pretty with 
+# other RTF readers or editors.
+
+GENERATE_RTF           = NO
+
+# The RTF_OUTPUT tag is used to specify where the RTF docs will be put. 
+# If a relative path is entered the value of OUTPUT_DIRECTORY will be 
+# put in front of it. If left blank `rtf' will be used as the default path.
+
+RTF_OUTPUT             = rtf
+
+# If the COMPACT_RTF tag is set to YES Doxygen generates more compact 
+# RTF documents. This may be useful for small projects and may help to 
+# save some trees in general.
+
+COMPACT_RTF            = NO
+
+# If the RTF_HYPERLINKS tag is set to YES, the RTF that is generated 
+# will contain hyperlink fields. The RTF file will 
+# contain links (just like the HTML output) instead of page references. 
+# This makes the output suitable for online browsing using WORD or other 
+# programs which support those fields. 
+# Note: wordpad (write) and others do not support links.
+
+RTF_HYPERLINKS         = NO
+
+# Load stylesheet definitions from file. Syntax is similar to doxygen's 
+# config file, i.e. a series of assignments. You only have to provide 
+# replacements, missing definitions are set to their default value.
+
+RTF_STYLESHEET_FILE    = 
+
+# Set optional variables used in the generation of an rtf document. 
+# Syntax is similar to doxygen's config file.
+
+RTF_EXTENSIONS_FILE    = 
+
+#---------------------------------------------------------------------------
+# configuration options related to the man page output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_MAN tag is set to YES (the default) Doxygen will 
+# generate man pages
+
+GENERATE_MAN           = NO
+
+# The MAN_OUTPUT tag is used to specify where the man pages will be put. 
+# If a relative path is entered the value of OUTPUT_DIRECTORY will be 
+# put in front of it. If left blank `man' will be used as the default path.
+
+MAN_OUTPUT             = man
+
+# The MAN_EXTENSION tag determines the extension that is added to 
+# the generated man pages (default is the subroutine's section .3)
+
+MAN_EXTENSION          = .3
+
+# If the MAN_LINKS tag is set to YES and Doxygen generates man output, 
+# then it will generate one additional man file for each entity 
+# documented in the real man page(s). These additional files 
+# only source the real man page, but without them the man command 
+# would be unable to find the correct page. The default is NO.
+
+MAN_LINKS              = NO
+
+#---------------------------------------------------------------------------
+# configuration options related to the XML output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_XML tag is set to YES Doxygen will 
+# generate an XML file that captures the structure of 
+# the code including all documentation.
+
+GENERATE_XML           = NO
+
+# The XML_OUTPUT tag is used to specify where the XML pages will be put. 
+# If a relative path is entered the value of OUTPUT_DIRECTORY will be 
+# put in front of it. If left blank `xml' will be used as the default path.
+
+XML_OUTPUT             = xml
+
+# The XML_SCHEMA tag can be used to specify an XML schema, 
+# which can be used by a validating XML parser to check the 
+# syntax of the XML files.
+
+XML_SCHEMA             = 
+
+# The XML_DTD tag can be used to specify an XML DTD, 
+# which can be used by a validating XML parser to check the 
+# syntax of the XML files.
+
+XML_DTD                = 
+
+# If the XML_PROGRAMLISTING tag is set to YES Doxygen will 
+# dump the program listings (including syntax highlighting 
+# and cross-referencing information) to the XML output. Note that 
+# enabling this will significantly increase the size of the XML output.
+
+XML_PROGRAMLISTING     = YES
+
+#---------------------------------------------------------------------------
+# configuration options for the AutoGen Definitions output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_AUTOGEN_DEF tag is set to YES Doxygen will 
+# generate an AutoGen Definitions (see autogen.sf.net) file 
+# that captures the structure of the code including all 
+# documentation. Note that this feature is still experimental 
+# and incomplete at the moment.
+
+GENERATE_AUTOGEN_DEF   = NO
+
+#---------------------------------------------------------------------------
+# configuration options related to the Perl module output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_PERLMOD tag is set to YES Doxygen will 
+# generate a Perl module file that captures the structure of 
+# the code including all documentation. Note that this 
+# feature is still experimental and incomplete at the 
+# moment.
+
+GENERATE_PERLMOD       = NO
+
+# If the PERLMOD_LATEX tag is set to YES Doxygen will generate 
+# the necessary Makefile rules, Perl scripts and LaTeX code to be able 
+# to generate PDF and DVI output from the Perl module output.
+
+PERLMOD_LATEX          = NO
+
+# If the PERLMOD_PRETTY tag is set to YES the Perl module output will be 
+# nicely formatted so it can be parsed by a human reader.  This is useful 
+# if you want to understand what is going on.  On the other hand, if this 
+# tag is set to NO the size of the Perl module output will be much smaller 
+# and Perl will parse it just the same.
+
+PERLMOD_PRETTY         = YES
+
+# The names of the make variables in the generated doxyrules.make file 
+# are prefixed with the string contained in PERLMOD_MAKEVAR_PREFIX. 
+# This is useful so different doxyrules.make files included by the same 
+# Makefile don't overwrite each other's variables.
+
+PERLMOD_MAKEVAR_PREFIX = 
+
+#---------------------------------------------------------------------------
+# Configuration options related to the preprocessor
+#---------------------------------------------------------------------------
+
+# If the ENABLE_PREPROCESSING tag is set to YES (the default) Doxygen will 
+# evaluate all C-preprocessor directives found in the sources and include 
+# files.
+
+ENABLE_PREPROCESSING   = YES
+
+# If the MACRO_EXPANSION tag is set to YES Doxygen will expand all macro 
+# names in the source code. If set to NO (the default) only conditional 
+# compilation will be performed. Macro expansion can be done in a controlled 
+# way by setting EXPAND_ONLY_PREDEF to YES.
+
+MACRO_EXPANSION        = YES
+
+# If the EXPAND_ONLY_PREDEF and MACRO_EXPANSION tags are both set to YES 
+# then the macro expansion is limited to the macros specified with the 
+# PREDEFINED and EXPAND_AS_DEFINED tags.
+
+EXPAND_ONLY_PREDEF     = NO
+
+# If the SEARCH_INCLUDES tag is set to YES (the default) the includes files 
+# pointed to by INCLUDE_PATH will be searched when a #include is found.
+
+SEARCH_INCLUDES        = YES
+
+# The INCLUDE_PATH tag can be used to specify one or more directories that 
+# contain include files that are not input files but should be processed by 
+# the preprocessor.
+
+INCLUDE_PATH           = 
+
+# You can use the INCLUDE_FILE_PATTERNS tag to specify one or more wildcard 
+# patterns (like *.h and *.hpp) to filter out the header-files in the 
+# directories. If left blank, the patterns specified with FILE_PATTERNS will 
+# be used.
+
+INCLUDE_FILE_PATTERNS  = 
+
+# The PREDEFINED tag can be used to specify one or more macro names that 
+# are defined before the preprocessor is started (similar to the -D option of 
+# gcc). The argument of the tag is a list of macros of the form: name 
+# or name=definition (no spaces). If the definition and the = are 
+# omitted =1 is assumed. To prevent a macro definition from being 
+# undefined via #undef or recursively expanded use the := operator 
+# instead of the = operator.
+
+PREDEFINED             = 
+
+# If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then 
+# this tag can be used to specify a list of macro names that should be expanded. 
+# The macro definition that is found in the sources will be used. 
+# Use the PREDEFINED tag if you want to use a different macro definition that 
+# overrules the definition found in the source code.
+
+EXPAND_AS_DEFINED      = 
+
+# If the SKIP_FUNCTION_MACROS tag is set to YES (the default) then 
+# doxygen's preprocessor will remove all references to function-like macros 
+# that are alone on a line, have an all uppercase name, and do not end with a 
+# semicolon, because these will confuse the parser if not removed.
+
+SKIP_FUNCTION_MACROS   = YES
+
+#---------------------------------------------------------------------------
+# Configuration::additions related to external references
+#---------------------------------------------------------------------------
+
+# The TAGFILES option can be used to specify one or more tagfiles. 
+# Optionally an initial location of the external documentation 
+# can be added for each tagfile. The format of a tag file without 
+# this location is as follows: 
+#   TAGFILES = file1 file2 ... 
+# Adding location for the tag files is done as follows: 
+#   TAGFILES = file1=loc1 "file2 = loc2" ... 
+# where "loc1" and "loc2" can be relative or absolute paths or 
+# URLs. If a location is present for each tag, the installdox tool 
+# does not have to be run to correct the links. 
+# Note that each tag file must have a unique name 
+# (where the name does NOT include the path) 
+# If a tag file is not located in the directory in which doxygen 
+# is run, you must also specify the path to the tagfile here.
+
+TAGFILES               = 
+
+# When a file name is specified after GENERATE_TAGFILE, doxygen will create 
+# a tag file that is based on the input files it reads.
+
+GENERATE_TAGFILE       = 
+
+# If the ALLEXTERNALS tag is set to YES all external classes will be listed 
+# in the class index. If set to NO only the inherited external classes 
+# will be listed.
+
+ALLEXTERNALS           = NO
+
+# If the EXTERNAL_GROUPS tag is set to YES all external groups will be listed 
+# in the modules index. If set to NO, only the current project's groups will 
+# be listed.
+
+EXTERNAL_GROUPS        = YES
+
+# The PERL_PATH should be the absolute path and name of the perl script 
+# interpreter (i.e. the result of `which perl').
+
+PERL_PATH              = /usr/bin/perl
+
+#---------------------------------------------------------------------------
+# Configuration options related to the dot tool
+#---------------------------------------------------------------------------
+
+# If the CLASS_DIAGRAMS tag is set to YES (the default) Doxygen will 
+# generate a inheritance diagram (in HTML, RTF and LaTeX) for classes with base 
+# or super classes. Setting the tag to NO turns the diagrams off. Note that 
+# this option also works with HAVE_DOT disabled, but it is recommended to 
+# install and use dot, since it yields more powerful graphs.
+
+CLASS_DIAGRAMS         = YES
+
+# You can define message sequence charts within doxygen comments using the \msc 
+# command. Doxygen will then run the mscgen tool (see 
+# http://www.mcternan.me.uk/mscgen/) to produce the chart and insert it in the 
+# documentation. The MSCGEN_PATH tag allows you to specify the directory where 
+# the mscgen tool resides. If left empty the tool is assumed to be found in the 
+# default search path.
+
+MSCGEN_PATH            = 
+
+# If set to YES, the inheritance and collaboration graphs will hide 
+# inheritance and usage relations if the target is undocumented 
+# or is not a class.
+
+HIDE_UNDOC_RELATIONS   = YES
+
+# If you set the HAVE_DOT tag to YES then doxygen will assume the dot tool is 
+# available from the path. This tool is part of Graphviz, a graph visualization 
+# toolkit from AT&T and Lucent Bell Labs. The other options in this section 
+# have no effect if this option is set to NO (the default)
+
+HAVE_DOT               = YES
+
+# The DOT_NUM_THREADS specifies the number of dot invocations doxygen is 
+# allowed to run in parallel. When set to 0 (the default) doxygen will 
+# base this on the number of processors available in the system. You can set it 
+# explicitly to a value larger than 0 to get control over the balance 
+# between CPU load and processing speed.
+
+DOT_NUM_THREADS        = 0
+
+# By default doxygen will write a font called Helvetica to the output 
+# directory and reference it in all dot files that doxygen generates. 
+# When you want a differently looking font you can specify the font name 
+# using DOT_FONTNAME. You need to make sure dot is able to find the font, 
+# which can be done by putting it in a standard location or by setting the 
+# DOTFONTPATH environment variable or by setting DOT_FONTPATH to the directory 
+# containing the font.
+
+DOT_FONTNAME           = Helvetica
+
+# The DOT_FONTSIZE tag can be used to set the size of the font of dot graphs. 
+# The default size is 10pt.
+
+DOT_FONTSIZE           = 10
+
+# By default doxygen will tell dot to use the output directory to look for the 
+# FreeSans.ttf font (which doxygen will put there itself). If you specify a 
+# different font using DOT_FONTNAME you can set the path where dot 
+# can find it using this tag.
+
+DOT_FONTPATH           = 
+
+# If the CLASS_GRAPH and HAVE_DOT tags are set to YES then doxygen 
+# will generate a graph for each documented class showing the direct and 
+# indirect inheritance relations. Setting this tag to YES will force the 
+# the CLASS_DIAGRAMS tag to NO.
+
+CLASS_GRAPH            = YES
+
+# If the COLLABORATION_GRAPH and HAVE_DOT tags are set to YES then doxygen 
+# will generate a graph for each documented class showing the direct and 
+# indirect implementation dependencies (inheritance, containment, and 
+# class references variables) of the class with other documented classes.
+
+COLLABORATION_GRAPH    = YES
+
+# If the GROUP_GRAPHS and HAVE_DOT tags are set to YES then doxygen 
+# will generate a graph for groups, showing the direct groups dependencies
+
+GROUP_GRAPHS           = YES
+
+# If the UML_LOOK tag is set to YES doxygen will generate inheritance and 
+# collaboration diagrams in a style similar to the OMG's Unified Modeling 
+# Language.
+
+UML_LOOK               = YES
+
+# If set to YES, the inheritance and collaboration graphs will show the 
+# relations between templates and their instances.
+
+TEMPLATE_RELATIONS     = YES
+
+# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDE_GRAPH, and HAVE_DOT 
+# tags are set to YES then doxygen will generate a graph for each documented 
+# file showing the direct and indirect include dependencies of the file with 
+# other documented files.
+
+INCLUDE_GRAPH          = YES
+
+# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDED_BY_GRAPH, and 
+# HAVE_DOT tags are set to YES then doxygen will generate a graph for each 
+# documented header file showing the documented files that directly or 
+# indirectly include this file.
+
+INCLUDED_BY_GRAPH      = YES
+
+# If the CALL_GRAPH and HAVE_DOT options are set to YES then 
+# doxygen will generate a call dependency graph for every global function 
+# or class method. Note that enabling this option will significantly increase 
+# the time of a run. So in most cases it will be better to enable call graphs 
+# for selected functions only using the \callgraph command.
+
+CALL_GRAPH             = YES
+
+# If the CALLER_GRAPH and HAVE_DOT tags are set to YES then 
+# doxygen will generate a caller dependency graph for every global function 
+# or class method. Note that enabling this option will significantly increase 
+# the time of a run. So in most cases it will be better to enable caller 
+# graphs for selected functions only using the \callergraph command.
+
+CALLER_GRAPH           = YES
+
+# If the GRAPHICAL_HIERARCHY and HAVE_DOT tags are set to YES then doxygen 
+# will generate a graphical hierarchy of all classes instead of a textual one.
+
+GRAPHICAL_HIERARCHY    = YES
+
+# If the DIRECTORY_GRAPH, SHOW_DIRECTORIES and HAVE_DOT tags are set to YES 
+# then doxygen will show the dependencies a directory has on other directories 
+# in a graphical way. The dependency relations are determined by the #include 
+# relations between the files in the directories.
+
+DIRECTORY_GRAPH        = YES
+
+# The DOT_IMAGE_FORMAT tag can be used to set the image format of the images 
+# generated by dot. Possible values are svg, png, jpg, or gif. 
+# If left blank png will be used.
+
+DOT_IMAGE_FORMAT       = png
+
+# The tag DOT_PATH can be used to specify the path where the dot tool can be 
+# found. If left blank, it is assumed the dot tool can be found in the path.
+
+DOT_PATH               = 
+
+# The DOTFILE_DIRS tag can be used to specify one or more directories that 
+# contain dot files that are included in the documentation (see the 
+# \dotfile command).
+
+DOTFILE_DIRS           = 
+
+# The MSCFILE_DIRS tag can be used to specify one or more directories that 
+# contain msc files that are included in the documentation (see the 
+# \mscfile command).
+
+MSCFILE_DIRS           = 
+
+# The DOT_GRAPH_MAX_NODES tag can be used to set the maximum number of 
+# nodes that will be shown in the graph. If the number of nodes in a graph 
+# becomes larger than this value, doxygen will truncate the graph, which is 
+# visualized by representing a node as a red box. Note that doxygen if the 
+# number of direct children of the root node in a graph is already larger than 
+# DOT_GRAPH_MAX_NODES then the graph will not be shown at all. Also note 
+# that the size of a graph can be further restricted by MAX_DOT_GRAPH_DEPTH.
+
+DOT_GRAPH_MAX_NODES    = 50
+
+# The MAX_DOT_GRAPH_DEPTH tag can be used to set the maximum depth of the 
+# graphs generated by dot. A depth value of 3 means that only nodes reachable 
+# from the root by following a path via at most 3 edges will be shown. Nodes 
+# that lay further from the root node will be omitted. Note that setting this 
+# option to 1 or 2 may greatly reduce the computation time needed for large 
+# code bases. Also note that the size of a graph can be further restricted by 
+# DOT_GRAPH_MAX_NODES. Using a depth of 0 means no depth restriction.
+
+MAX_DOT_GRAPH_DEPTH    = 0
+
+# Set the DOT_TRANSPARENT tag to YES to generate images with a transparent 
+# background. This is disabled by default, because dot on Windows does not 
+# seem to support this out of the box. Warning: Depending on the platform used, 
+# enabling this option may lead to badly anti-aliased labels on the edges of 
+# a graph (i.e. they become hard to read).
+
+DOT_TRANSPARENT        = NO
+
+# Set the DOT_MULTI_TARGETS tag to YES allow dot to generate multiple output 
+# files in one run (i.e. multiple -o and -T options on the command line). This 
+# makes dot run faster, but since only newer versions of dot (>1.8.10) 
+# support this, this feature is disabled by default.
+
+DOT_MULTI_TARGETS      = NO
+
+# If the GENERATE_LEGEND tag is set to YES (the default) Doxygen will 
+# generate a legend page explaining the meaning of the various boxes and 
+# arrows in the dot generated graphs.
+
+GENERATE_LEGEND        = YES
+
+# If the DOT_CLEANUP tag is set to YES (the default) Doxygen will 
+# remove the intermediate dot files that are used to generate 
+# the various graphs.
+
+DOT_CLEANUP            = YES
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/Licence.txt
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/Licence.txt	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/Licence.txt	(revision 1749)
@@ -0,0 +1,1428 @@
+
+
+       ------------------ XIOS Licence ---------------
+
+
+
+XIOS is under CeCILL_V2 licence. See "Licence_CeCILL_V2-en.txt" file for an english
+version of the licence and "Licence_CeCILL_V2-fr.txt" for a french version.
+
+All files in the src directory are submitted to the Cecill Licence.
+
+
+
+XIOS use internally some other packages that are submitted to other free licence :
+
+
+- boost C++ library : http://www.boost.org
+  ---> Boost software licence : http://www.boost.org/users/license.html
+  
+
+- blitz++ : http://blitz.sourceforge.net/
+  ---> GNU LESSER GENERAL PUBLIC LICENSE V3 : https://www.gnu.org/licenses/lgpl.html
+  
+
+- RapidXML : http://rapidxml.sourceforge.net/
+  ---> Boost software licence : http://www.boost.org/users/license.html
+  
+
+ - FCM : http://www.metoffice.gov.uk/research/collaboration/fcm
+ ---> GNU GENERAL PUBLIC LICENSE V3 : https://www.gnu.org/licenses/lgpl.html
+ 
+ 
+
+---------------------------------------------------------------------------
+
+         Boost Software License - Version 1.0 - August 17th, 2003
+
+Permission is hereby granted, free of charge, to any person or organization
+obtaining a copy of the software and accompanying documentation covered by
+this license (the "Software") to use, reproduce, display, distribute,
+execute, and transmit the Software, and to prepare derivative works of the
+Software, and to permit third-parties to whom the Software is furnished to
+do so, all subject to the following:
+
+The copyright notices in the Software and this entire statement, including
+the above license grant, this restriction and the following disclaimer,
+must be included in all copies of the Software, in whole or in part, and
+all derivative works of the Software, unless such copies or derivative
+works are solely in the form of machine-executable object code generated by
+a source language processor.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT
+SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE
+FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,
+ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+DEALINGS IN THE SOFTWARE.
+
+
+----------------------------------------------------------------------------
+  
+
+
+                   GNU LESSER GENERAL PUBLIC LICENSE
+                       Version 3, 29 June 2007
+
+ Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+
+  This version of the GNU Lesser General Public License incorporates
+the terms and conditions of version 3 of the GNU General Public
+License, supplemented by the additional permissions listed below.
+
+  0. Additional Definitions.
+
+  As used herein, "this License" refers to version 3 of the GNU Lesser
+General Public License, and the "GNU GPL" refers to version 3 of the GNU
+General Public License.
+
+  "The Library" refers to a covered work governed by this License,
+other than an Application or a Combined Work as defined below.
+
+  An "Application" is any work that makes use of an interface provided
+by the Library, but which is not otherwise based on the Library.
+Defining a subclass of a class defined by the Library is deemed a mode
+of using an interface provided by the Library.
+
+  A "Combined Work" is a work produced by combining or linking an
+Application with the Library.  The particular version of the Library
+with which the Combined Work was made is also called the "Linked
+Version".
+
+  The "Minimal Corresponding Source" for a Combined Work means the
+Corresponding Source for the Combined Work, excluding any source code
+for portions of the Combined Work that, considered in isolation, are
+based on the Application, and not on the Linked Version.
+
+  The "Corresponding Application Code" for a Combined Work means the
+object code and/or source code for the Application, including any data
+and utility programs needed for reproducing the Combined Work from the
+Application, but excluding the System Libraries of the Combined Work.
+
+  1. Exception to Section 3 of the GNU GPL.
+
+  You may convey a covered work under sections 3 and 4 of this License
+without being bound by section 3 of the GNU GPL.
+
+  2. Conveying Modified Versions.
+
+  If you modify a copy of the Library, and, in your modifications, a
+facility refers to a function or data to be supplied by an Application
+that uses the facility (other than as an argument passed when the
+facility is invoked), then you may convey a copy of the modified
+version:
+
+   a) under this License, provided that you make a good faith effort to
+   ensure that, in the event an Application does not supply the
+   function or data, the facility still operates, and performs
+   whatever part of its purpose remains meaningful, or
+
+   b) under the GNU GPL, with none of the additional permissions of
+   this License applicable to that copy.
+
+  3. Object Code Incorporating Material from Library Header Files.
+
+  The object code form of an Application may incorporate material from
+a header file that is part of the Library.  You may convey such object
+code under terms of your choice, provided that, if the incorporated
+material is not limited to numerical parameters, data structure
+layouts and accessors, or small macros, inline functions and templates
+(ten or fewer lines in length), you do both of the following:
+
+   a) Give prominent notice with each copy of the object code that the
+   Library is used in it and that the Library and its use are
+   covered by this License.
+
+   b) Accompany the object code with a copy of the GNU GPL and this license
+   document.
+
+  4. Combined Works.
+
+  You may convey a Combined Work under terms of your choice that,
+taken together, effectively do not restrict modification of the
+portions of the Library contained in the Combined Work and reverse
+engineering for debugging such modifications, if you also do each of
+the following:
+
+   a) Give prominent notice with each copy of the Combined Work that
+   the Library is used in it and that the Library and its use are
+   covered by this License.
+
+   b) Accompany the Combined Work with a copy of the GNU GPL and this license
+   document.
+
+   c) For a Combined Work that displays copyright notices during
+   execution, include the copyright notice for the Library among
+   these notices, as well as a reference directing the user to the
+   copies of the GNU GPL and this license document.
+
+   d) Do one of the following:
+
+       0) Convey the Minimal Corresponding Source under the terms of this
+       License, and the Corresponding Application Code in a form
+       suitable for, and under terms that permit, the user to
+       recombine or relink the Application with a modified version of
+       the Linked Version to produce a modified Combined Work, in the
+       manner specified by section 6 of the GNU GPL for conveying
+       Corresponding Source.
+
+       1) Use a suitable shared library mechanism for linking with the
+       Library.  A suitable mechanism is one that (a) uses at run time
+       a copy of the Library already present on the user's computer
+       system, and (b) will operate properly with a modified version
+       of the Library that is interface-compatible with the Linked
+       Version.
+
+   e) Provide Installation Information, but only if you would otherwise
+   be required to provide such information under section 6 of the
+   GNU GPL, and only to the extent that such information is
+   necessary to install and execute a modified version of the
+   Combined Work produced by recombining or relinking the
+   Application with a modified version of the Linked Version. (If
+   you use option 4d0, the Installation Information must accompany
+   the Minimal Corresponding Source and Corresponding Application
+   Code. If you use option 4d1, you must provide the Installation
+   Information in the manner specified by section 6 of the GNU GPL
+   for conveying Corresponding Source.)
+
+  5. Combined Libraries.
+
+  You may place library facilities that are a work based on the
+Library side by side in a single library together with other library
+facilities that are not Applications and are not covered by this
+License, and convey such a combined library under terms of your
+choice, if you do both of the following:
+
+   a) Accompany the combined library with a copy of the same work based
+   on the Library, uncombined with any other library facilities,
+   conveyed under the terms of this License.
+
+   b) Give prominent notice with the combined library that part of it
+   is a work based on the Library, and explaining where to find the
+   accompanying uncombined form of the same work.
+
+  6. Revised Versions of the GNU Lesser General Public License.
+
+  The Free Software Foundation may publish revised and/or new versions
+of the GNU Lesser General Public License from time to time. Such new
+versions will be similar in spirit to the present version, but may
+differ in detail to address new problems or concerns.
+
+  Each version is given a distinguishing version number. If the
+Library as you received it specifies that a certain numbered version
+of the GNU Lesser General Public License "or any later version"
+applies to it, you have the option of following the terms and
+conditions either of that published version or of any later version
+published by the Free Software Foundation. If the Library as you
+received it does not specify a version number of the GNU Lesser
+General Public License, you may choose any version of the GNU Lesser
+General Public License ever published by the Free Software Foundation.
+
+  If the Library as you received it specifies that a proxy can decide
+whether future versions of the GNU Lesser General Public License shall
+apply, that proxy's public statement of acceptance of any version is
+permanent authorization for you to choose that version for the
+Library.
+
+
+
+
+
+------------------------------------------------------------------------
+
+
+                    GNU GENERAL PUBLIC LICENSE
+                       Version 3, 29 June 2007
+
+ Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+                            Preamble
+
+  The GNU General Public License is a free, copyleft license for
+software and other kinds of works.
+
+  The licenses for most software and other practical works are designed
+to take away your freedom to share and change the works.  By contrast,
+the GNU General Public License is intended to guarantee your freedom to
+share and change all versions of a program--to make sure it remains free
+software for all its users.  We, the Free Software Foundation, use the
+GNU General Public License for most of our software; it applies also to
+any other work released this way by its authors.  You can apply it to
+your programs, too.
+
+  When we speak of free software, we are referring to freedom, not
+price.  Our General Public Licenses are designed to make sure that you
+have the freedom to distribute copies of free software (and charge for
+them if you wish), that you receive source code or can get it if you
+want it, that you can change the software or use pieces of it in new
+free programs, and that you know you can do these things.
+
+  To protect your rights, we need to prevent others from denying you
+these rights or asking you to surrender the rights.  Therefore, you have
+certain responsibilities if you distribute copies of the software, or if
+you modify it: responsibilities to respect the freedom of others.
+
+  For example, if you distribute copies of such a program, whether
+gratis or for a fee, you must pass on to the recipients the same
+freedoms that you received.  You must make sure that they, too, receive
+or can get the source code.  And you must show them these terms so they
+know their rights.
+
+  Developers that use the GNU GPL protect your rights with two steps:
+(1) assert copyright on the software, and (2) offer you this License
+giving you legal permission to copy, distribute and/or modify it.
+
+  For the developers' and authors' protection, the GPL clearly explains
+that there is no warranty for this free software.  For both users' and
+authors' sake, the GPL requires that modified versions be marked as
+changed, so that their problems will not be attributed erroneously to
+authors of previous versions.
+
+  Some devices are designed to deny users access to install or run
+modified versions of the software inside them, although the manufacturer
+can do so.  This is fundamentally incompatible with the aim of
+protecting users' freedom to change the software.  The systematic
+pattern of such abuse occurs in the area of products for individuals to
+use, which is precisely where it is most unacceptable.  Therefore, we
+have designed this version of the GPL to prohibit the practice for those
+products.  If such problems arise substantially in other domains, we
+stand ready to extend this provision to those domains in future versions
+of the GPL, as needed to protect the freedom of users.
+
+  Finally, every program is threatened constantly by software patents.
+States should not allow patents to restrict development and use of
+software on general-purpose computers, but in those that do, we wish to
+avoid the special danger that patents applied to a free program could
+make it effectively proprietary.  To prevent this, the GPL assures that
+patents cannot be used to render the program non-free.
+
+  The precise terms and conditions for copying, distribution and
+modification follow.
+
+                       TERMS AND CONDITIONS
+
+  0. Definitions.
+
+  "This License" refers to version 3 of the GNU General Public License.
+
+  "Copyright" also means copyright-like laws that apply to other kinds of
+works, such as semiconductor masks.
+
+  "The Program" refers to any copyrightable work licensed under this
+License.  Each licensee is addressed as "you".  "Licensees" and
+"recipients" may be individuals or organizations.
+
+  To "modify" a work means to copy from or adapt all or part of the work
+in a fashion requiring copyright permission, other than the making of an
+exact copy.  The resulting work is called a "modified version" of the
+earlier work or a work "based on" the earlier work.
+
+  A "covered work" means either the unmodified Program or a work based
+on the Program.
+
+  To "propagate" a work means to do anything with it that, without
+permission, would make you directly or secondarily liable for
+infringement under applicable copyright law, except executing it on a
+computer or modifying a private copy.  Propagation includes copying,
+distribution (with or without modification), making available to the
+public, and in some countries other activities as well.
+
+  To "convey" a work means any kind of propagation that enables other
+parties to make or receive copies.  Mere interaction with a user through
+a computer network, with no transfer of a copy, is not conveying.
+
+  An interactive user interface displays "Appropriate Legal Notices"
+to the extent that it includes a convenient and prominently visible
+feature that (1) displays an appropriate copyright notice, and (2)
+tells the user that there is no warranty for the work (except to the
+extent that warranties are provided), that licensees may convey the
+work under this License, and how to view a copy of this License.  If
+the interface presents a list of user commands or options, such as a
+menu, a prominent item in the list meets this criterion.
+
+  1. Source Code.
+
+  The "source code" for a work means the preferred form of the work
+for making modifications to it.  "Object code" means any non-source
+form of a work.
+
+  A "Standard Interface" means an interface that either is an official
+standard defined by a recognized standards body, or, in the case of
+interfaces specified for a particular programming language, one that
+is widely used among developers working in that language.
+
+  The "System Libraries" of an executable work include anything, other
+than the work as a whole, that (a) is included in the normal form of
+packaging a Major Component, but which is not part of that Major
+Component, and (b) serves only to enable use of the work with that
+Major Component, or to implement a Standard Interface for which an
+implementation is available to the public in source code form.  A
+"Major Component", in this context, means a major essential component
+(kernel, window system, and so on) of the specific operating system
+(if any) on which the executable work runs, or a compiler used to
+produce the work, or an object code interpreter used to run it.
+
+  The "Corresponding Source" for a work in object code form means all
+the source code needed to generate, install, and (for an executable
+work) run the object code and to modify the work, including scripts to
+control those activities.  However, it does not include the work's
+System Libraries, or general-purpose tools or generally available free
+programs which are used unmodified in performing those activities but
+which are not part of the work.  For example, Corresponding Source
+includes interface definition files associated with source files for
+the work, and the source code for shared libraries and dynamically
+linked subprograms that the work is specifically designed to require,
+such as by intimate data communication or control flow between those
+subprograms and other parts of the work.
+
+  The Corresponding Source need not include anything that users
+can regenerate automatically from other parts of the Corresponding
+Source.
+
+  The Corresponding Source for a work in source code form is that
+same work.
+
+  2. Basic Permissions.
+
+  All rights granted under this License are granted for the term of
+copyright on the Program, and are irrevocable provided the stated
+conditions are met.  This License explicitly affirms your unlimited
+permission to run the unmodified Program.  The output from running a
+covered work is covered by this License only if the output, given its
+content, constitutes a covered work.  This License acknowledges your
+rights of fair use or other equivalent, as provided by copyright law.
+
+  You may make, run and propagate covered works that you do not
+convey, without conditions so long as your license otherwise remains
+in force.  You may convey covered works to others for the sole purpose
+of having them make modifications exclusively for you, or provide you
+with facilities for running those works, provided that you comply with
+the terms of this License in conveying all material for which you do
+not control copyright.  Those thus making or running the covered works
+for you must do so exclusively on your behalf, under your direction
+and control, on terms that prohibit them from making any copies of
+your copyrighted material outside their relationship with you.
+
+  Conveying under any other circumstances is permitted solely under
+the conditions stated below.  Sublicensing is not allowed; section 10
+makes it unnecessary.
+
+  3. Protecting Users' Legal Rights From Anti-Circumvention Law.
+
+  No covered work shall be deemed part of an effective technological
+measure under any applicable law fulfilling obligations under article
+11 of the WIPO copyright treaty adopted on 20 December 1996, or
+similar laws prohibiting or restricting circumvention of such
+measures.
+
+  When you convey a covered work, you waive any legal power to forbid
+circumvention of technological measures to the extent such circumvention
+is effected by exercising rights under this License with respect to
+the covered work, and you disclaim any intention to limit operation or
+modification of the work as a means of enforcing, against the work's
+users, your or third parties' legal rights to forbid circumvention of
+technological measures.
+
+  4. Conveying Verbatim Copies.
+
+  You may convey verbatim copies of the Program's source code as you
+receive it, in any medium, provided that you conspicuously and
+appropriately publish on each copy an appropriate copyright notice;
+keep intact all notices stating that this License and any
+non-permissive terms added in accord with section 7 apply to the code;
+keep intact all notices of the absence of any warranty; and give all
+recipients a copy of this License along with the Program.
+
+  You may charge any price or no price for each copy that you convey,
+and you may offer support or warranty protection for a fee.
+
+  5. Conveying Modified Source Versions.
+
+  You may convey a work based on the Program, or the modifications to
+produce it from the Program, in the form of source code under the
+terms of section 4, provided that you also meet all of these conditions:
+
+    a) The work must carry prominent notices stating that you modified
+    it, and giving a relevant date.
+
+    b) The work must carry prominent notices stating that it is
+    released under this License and any conditions added under section
+    7.  This requirement modifies the requirement in section 4 to
+    "keep intact all notices".
+
+    c) You must license the entire work, as a whole, under this
+    License to anyone who comes into possession of a copy.  This
+    License will therefore apply, along with any applicable section 7
+    additional terms, to the whole of the work, and all its parts,
+    regardless of how they are packaged.  This License gives no
+    permission to license the work in any other way, but it does not
+    invalidate such permission if you have separately received it.
+
+    d) If the work has interactive user interfaces, each must display
+    Appropriate Legal Notices; however, if the Program has interactive
+    interfaces that do not display Appropriate Legal Notices, your
+    work need not make them do so.
+
+  A compilation of a covered work with other separate and independent
+works, which are not by their nature extensions of the covered work,
+and which are not combined with it such as to form a larger program,
+in or on a volume of a storage or distribution medium, is called an
+"aggregate" if the compilation and its resulting copyright are not
+used to limit the access or legal rights of the compilation's users
+beyond what the individual works permit.  Inclusion of a covered work
+in an aggregate does not cause this License to apply to the other
+parts of the aggregate.
+
+  6. Conveying Non-Source Forms.
+
+  You may convey a covered work in object code form under the terms
+of sections 4 and 5, provided that you also convey the
+machine-readable Corresponding Source under the terms of this License,
+in one of these ways:
+
+    a) Convey the object code in, or embodied in, a physical product
+    (including a physical distribution medium), accompanied by the
+    Corresponding Source fixed on a durable physical medium
+    customarily used for software interchange.
+
+    b) Convey the object code in, or embodied in, a physical product
+    (including a physical distribution medium), accompanied by a
+    written offer, valid for at least three years and valid for as
+    long as you offer spare parts or customer support for that product
+    model, to give anyone who possesses the object code either (1) a
+    copy of the Corresponding Source for all the software in the
+    product that is covered by this License, on a durable physical
+    medium customarily used for software interchange, for a price no
+    more than your reasonable cost of physically performing this
+    conveying of source, or (2) access to copy the
+    Corresponding Source from a network server at no charge.
+
+    c) Convey individual copies of the object code with a copy of the
+    written offer to provide the Corresponding Source.  This
+    alternative is allowed only occasionally and noncommercially, and
+    only if you received the object code with such an offer, in accord
+    with subsection 6b.
+
+    d) Convey the object code by offering access from a designated
+    place (gratis or for a charge), and offer equivalent access to the
+    Corresponding Source in the same way through the same place at no
+    further charge.  You need not require recipients to copy the
+    Corresponding Source along with the object code.  If the place to
+    copy the object code is a network server, the Corresponding Source
+    may be on a different server (operated by you or a third party)
+    that supports equivalent copying facilities, provided you maintain
+    clear directions next to the object code saying where to find the
+    Corresponding Source.  Regardless of what server hosts the
+    Corresponding Source, you remain obligated to ensure that it is
+    available for as long as needed to satisfy these requirements.
+
+    e) Convey the object code using peer-to-peer transmission, provided
+    you inform other peers where the object code and Corresponding
+    Source of the work are being offered to the general public at no
+    charge under subsection 6d.
+
+  A separable portion of the object code, whose source code is excluded
+from the Corresponding Source as a System Library, need not be
+included in conveying the object code work.
+
+  A "User Product" is either (1) a "consumer product", which means any
+tangible personal property which is normally used for personal, family,
+or household purposes, or (2) anything designed or sold for incorporation
+into a dwelling.  In determining whether a product is a consumer product,
+doubtful cases shall be resolved in favor of coverage.  For a particular
+product received by a particular user, "normally used" refers to a
+typical or common use of that class of product, regardless of the status
+of the particular user or of the way in which the particular user
+actually uses, or expects or is expected to use, the product.  A product
+is a consumer product regardless of whether the product has substantial
+commercial, industrial or non-consumer uses, unless such uses represent
+the only significant mode of use of the product.
+
+  "Installation Information" for a User Product means any methods,
+procedures, authorization keys, or other information required to install
+and execute modified versions of a covered work in that User Product from
+a modified version of its Corresponding Source.  The information must
+suffice to ensure that the continued functioning of the modified object
+code is in no case prevented or interfered with solely because
+modification has been made.
+
+  If you convey an object code work under this section in, or with, or
+specifically for use in, a User Product, and the conveying occurs as
+part of a transaction in which the right of possession and use of the
+User Product is transferred to the recipient in perpetuity or for a
+fixed term (regardless of how the transaction is characterized), the
+Corresponding Source conveyed under this section must be accompanied
+by the Installation Information.  But this requirement does not apply
+if neither you nor any third party retains the ability to install
+modified object code on the User Product (for example, the work has
+been installed in ROM).
+
+  The requirement to provide Installation Information does not include a
+requirement to continue to provide support service, warranty, or updates
+for a work that has been modified or installed by the recipient, or for
+the User Product in which it has been modified or installed.  Access to a
+network may be denied when the modification itself materially and
+adversely affects the operation of the network or violates the rules and
+protocols for communication across the network.
+
+  Corresponding Source conveyed, and Installation Information provided,
+in accord with this section must be in a format that is publicly
+documented (and with an implementation available to the public in
+source code form), and must require no special password or key for
+unpacking, reading or copying.
+
+  7. Additional Terms.
+
+  "Additional permissions" are terms that supplement the terms of this
+License by making exceptions from one or more of its conditions.
+Additional permissions that are applicable to the entire Program shall
+be treated as though they were included in this License, to the extent
+that they are valid under applicable law.  If additional permissions
+apply only to part of the Program, that part may be used separately
+under those permissions, but the entire Program remains governed by
+this License without regard to the additional permissions.
+
+  When you convey a copy of a covered work, you may at your option
+remove any additional permissions from that copy, or from any part of
+it.  (Additional permissions may be written to require their own
+removal in certain cases when you modify the work.)  You may place
+additional permissions on material, added by you to a covered work,
+for which you have or can give appropriate copyright permission.
+
+  Notwithstanding any other provision of this License, for material you
+add to a covered work, you may (if authorized by the copyright holders of
+that material) supplement the terms of this License with terms:
+
+    a) Disclaiming warranty or limiting liability differently from the
+    terms of sections 15 and 16 of this License; or
+
+    b) Requiring preservation of specified reasonable legal notices or
+    author attributions in that material or in the Appropriate Legal
+    Notices displayed by works containing it; or
+
+    c) Prohibiting misrepresentation of the origin of that material, or
+    requiring that modified versions of such material be marked in
+    reasonable ways as different from the original version; or
+
+    d) Limiting the use for publicity purposes of names of licensors or
+    authors of the material; or
+
+    e) Declining to grant rights under trademark law for use of some
+    trade names, trademarks, or service marks; or
+
+    f) Requiring indemnification of licensors and authors of that
+    material by anyone who conveys the material (or modified versions of
+    it) with contractual assumptions of liability to the recipient, for
+    any liability that these contractual assumptions directly impose on
+    those licensors and authors.
+
+  All other non-permissive additional terms are considered "further
+restrictions" within the meaning of section 10.  If the Program as you
+received it, or any part of it, contains a notice stating that it is
+governed by this License along with a term that is a further
+restriction, you may remove that term.  If a license document contains
+a further restriction but permits relicensing or conveying under this
+License, you may add to a covered work material governed by the terms
+of that license document, provided that the further restriction does
+not survive such relicensing or conveying.
+
+  If you add terms to a covered work in accord with this section, you
+must place, in the relevant source files, a statement of the
+additional terms that apply to those files, or a notice indicating
+where to find the applicable terms.
+
+  Additional terms, permissive or non-permissive, may be stated in the
+form of a separately written license, or stated as exceptions;
+the above requirements apply either way.
+
+  8. Termination.
+
+  You may not propagate or modify a covered work except as expressly
+provided under this License.  Any attempt otherwise to propagate or
+modify it is void, and will automatically terminate your rights under
+this License (including any patent licenses granted under the third
+paragraph of section 11).
+
+  However, if you cease all violation of this License, then your
+license from a particular copyright holder is reinstated (a)
+provisionally, unless and until the copyright holder explicitly and
+finally terminates your license, and (b) permanently, if the copyright
+holder fails to notify you of the violation by some reasonable means
+prior to 60 days after the cessation.
+
+  Moreover, your license from a particular copyright holder is
+reinstated permanently if the copyright holder notifies you of the
+violation by some reasonable means, this is the first time you have
+received notice of violation of this License (for any work) from that
+copyright holder, and you cure the violation prior to 30 days after
+your receipt of the notice.
+
+  Termination of your rights under this section does not terminate the
+licenses of parties who have received copies or rights from you under
+this License.  If your rights have been terminated and not permanently
+reinstated, you do not qualify to receive new licenses for the same
+material under section 10.
+
+  9. Acceptance Not Required for Having Copies.
+
+  You are not required to accept this License in order to receive or
+run a copy of the Program.  Ancillary propagation of a covered work
+occurring solely as a consequence of using peer-to-peer transmission
+to receive a copy likewise does not require acceptance.  However,
+nothing other than this License grants you permission to propagate or
+modify any covered work.  These actions infringe copyright if you do
+not accept this License.  Therefore, by modifying or propagating a
+covered work, you indicate your acceptance of this License to do so.
+
+  10. Automatic Licensing of Downstream Recipients.
+
+  Each time you convey a covered work, the recipient automatically
+receives a license from the original licensors, to run, modify and
+propagate that work, subject to this License.  You are not responsible
+for enforcing compliance by third parties with this License.
+
+  An "entity transaction" is a transaction transferring control of an
+organization, or substantially all assets of one, or subdividing an
+organization, or merging organizations.  If propagation of a covered
+work results from an entity transaction, each party to that
+transaction who receives a copy of the work also receives whatever
+licenses to the work the party's predecessor in interest had or could
+give under the previous paragraph, plus a right to possession of the
+Corresponding Source of the work from the predecessor in interest, if
+the predecessor has it or can get it with reasonable efforts.
+
+  You may not impose any further restrictions on the exercise of the
+rights granted or affirmed under this License.  For example, you may
+not impose a license fee, royalty, or other charge for exercise of
+rights granted under this License, and you may not initiate litigation
+(including a cross-claim or counterclaim in a lawsuit) alleging that
+any patent claim is infringed by making, using, selling, offering for
+sale, or importing the Program or any portion of it.
+
+  11. Patents.
+
+  A "contributor" is a copyright holder who authorizes use under this
+License of the Program or a work on which the Program is based.  The
+work thus licensed is called the contributor's "contributor version".
+
+  A contributor's "essential patent claims" are all patent claims
+owned or controlled by the contributor, whether already acquired or
+hereafter acquired, that would be infringed by some manner, permitted
+by this License, of making, using, or selling its contributor version,
+but do not include claims that would be infringed only as a
+consequence of further modification of the contributor version.  For
+purposes of this definition, "control" includes the right to grant
+patent sublicenses in a manner consistent with the requirements of
+this License.
+
+  Each contributor grants you a non-exclusive, worldwide, royalty-free
+patent license under the contributor's essential patent claims, to
+make, use, sell, offer for sale, import and otherwise run, modify and
+propagate the contents of its contributor version.
+
+  In the following three paragraphs, a "patent license" is any express
+agreement or commitment, however denominated, not to enforce a patent
+(such as an express permission to practice a patent or covenant not to
+sue for patent infringement).  To "grant" such a patent license to a
+party means to make such an agreement or commitment not to enforce a
+patent against the party.
+
+  If you convey a covered work, knowingly relying on a patent license,
+and the Corresponding Source of the work is not available for anyone
+to copy, free of charge and under the terms of this License, through a
+publicly available network server or other readily accessible means,
+then you must either (1) cause the Corresponding Source to be so
+available, or (2) arrange to deprive yourself of the benefit of the
+patent license for this particular work, or (3) arrange, in a manner
+consistent with the requirements of this License, to extend the patent
+license to downstream recipients.  "Knowingly relying" means you have
+actual knowledge that, but for the patent license, your conveying the
+covered work in a country, or your recipient's use of the covered work
+in a country, would infringe one or more identifiable patents in that
+country that you have reason to believe are valid.
+
+  If, pursuant to or in connection with a single transaction or
+arrangement, you convey, or propagate by procuring conveyance of, a
+covered work, and grant a patent license to some of the parties
+receiving the covered work authorizing them to use, propagate, modify
+or convey a specific copy of the covered work, then the patent license
+you grant is automatically extended to all recipients of the covered
+work and works based on it.
+
+  A patent license is "discriminatory" if it does not include within
+the scope of its coverage, prohibits the exercise of, or is
+conditioned on the non-exercise of one or more of the rights that are
+specifically granted under this License.  You may not convey a covered
+work if you are a party to an arrangement with a third party that is
+in the business of distributing software, under which you make payment
+to the third party based on the extent of your activity of conveying
+the work, and under which the third party grants, to any of the
+parties who would receive the covered work from you, a discriminatory
+patent license (a) in connection with copies of the covered work
+conveyed by you (or copies made from those copies), or (b) primarily
+for and in connection with specific products or compilations that
+contain the covered work, unless you entered into that arrangement,
+or that patent license was granted, prior to 28 March 2007.
+
+  Nothing in this License shall be construed as excluding or limiting
+any implied license or other defenses to infringement that may
+otherwise be available to you under applicable patent law.
+
+  12. No Surrender of Others' Freedom.
+
+  If conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License.  If you cannot convey a
+covered work so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you may
+not convey it at all.  For example, if you agree to terms that obligate you
+to collect a royalty for further conveying from those to whom you convey
+the Program, the only way you could satisfy both those terms and this
+License would be to refrain entirely from conveying the Program.
+
+  13. Use with the GNU Affero General Public License.
+
+  Notwithstanding any other provision of this License, you have
+permission to link or combine any covered work with a work licensed
+under version 3 of the GNU Affero General Public License into a single
+combined work, and to convey the resulting work.  The terms of this
+License will continue to apply to the part which is the covered work,
+but the special requirements of the GNU Affero General Public License,
+section 13, concerning interaction through a network will apply to the
+combination as such.
+
+  14. Revised Versions of this License.
+
+  The Free Software Foundation may publish revised and/or new versions of
+the GNU General Public License from time to time.  Such new versions will
+be similar in spirit to the present version, but may differ in detail to
+address new problems or concerns.
+
+  Each version is given a distinguishing version number.  If the
+Program specifies that a certain numbered version of the GNU General
+Public License "or any later version" applies to it, you have the
+option of following the terms and conditions either of that numbered
+version or of any later version published by the Free Software
+Foundation.  If the Program does not specify a version number of the
+GNU General Public License, you may choose any version ever published
+by the Free Software Foundation.
+
+  If the Program specifies that a proxy can decide which future
+versions of the GNU General Public License can be used, that proxy's
+public statement of acceptance of a version permanently authorizes you
+to choose that version for the Program.
+
+  Later license versions may give you additional or different
+permissions.  However, no additional obligations are imposed on any
+author or copyright holder as a result of your choosing to follow a
+later version.
+
+  15. Disclaimer of Warranty.
+
+  THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
+APPLICABLE LAW.  EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
+HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
+OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
+THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+PURPOSE.  THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
+IS WITH YOU.  SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
+ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
+
+  16. Limitation of Liability.
+
+  IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
+WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
+THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
+GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
+USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
+DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
+PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
+EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
+SUCH DAMAGES.
+
+  17. Interpretation of Sections 15 and 16.
+
+  If the disclaimer of warranty and limitation of liability provided
+above cannot be given local legal effect according to their terms,
+reviewing courts shall apply local law that most closely approximates
+an absolute waiver of all civil liability in connection with the
+Program, unless a warranty or assumption of liability accompanies a
+copy of the Program in return for a fee.
+
+                     END OF TERMS AND CONDITIONS
+
+            How to Apply These Terms to Your New Programs
+
+  If you develop a new program, and you want it to be of the greatest
+possible use to the public, the best way to achieve this is to make it
+free software which everyone can redistribute and change under these terms.
+
+  To do so, attach the following notices to the program.  It is safest
+to attach them to the start of each source file to most effectively
+state the exclusion of warranty; and each file should have at least
+the "copyright" line and a pointer to where the full notice is found.
+
+    <one line to give the program's name and a brief idea of what it does.>
+    Copyright (C) <year>  <name of author>
+
+    This program is free software: you can redistribute it and/or modify
+    it under the terms of the GNU General Public License as published by
+    the Free Software Foundation, either version 3 of the License, or
+    (at your option) any later version.
+
+    This program is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+    GNU General Public License for more details.
+
+    You should have received a copy of the GNU General Public License
+    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+Also add information on how to contact you by electronic and paper mail.
+
+  If the program does terminal interaction, make it output a short
+notice like this when it starts in an interactive mode:
+
+    <program>  Copyright (C) <year>  <name of author>
+    This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
+    This is free software, and you are welcome to redistribute it
+    under certain conditions; type `show c' for details.
+
+The hypothetical commands `show w' and `show c' should show the appropriate
+parts of the General Public License.  Of course, your program's commands
+might be different; for a GUI interface, you would use an "about box".
+
+  You should also get your employer (if you work as a programmer) or school,
+if any, to sign a "copyright disclaimer" for the program, if necessary.
+For more information on this, and how to apply and follow the GNU GPL, see
+<http://www.gnu.org/licenses/>.
+
+  The GNU General Public License does not permit incorporating your program
+into proprietary programs.  If your program is a subroutine library, you
+may consider it more useful to permit linking proprietary applications with
+the library.  If this is what you want to do, use the GNU Lesser General
+Public License instead of this License.  But first, please read
+<http://www.gnu.org/philosophy/why-not-lgpl.html>.
+
+
+-----------------------------------------------------------------------------
+
+
+
+
+CeCILL FREE SOFTWARE LICENSE AGREEMENT
+
+
+    Notice
+
+This Agreement is a Free Software license agreement that is the result
+of discussions between its authors in order to ensure compliance with
+the two main principles guiding its drafting:
+
+    * firstly, compliance with the principles governing the distribution
+      of Free Software: access to source code, broad rights granted to
+      users,
+    * secondly, the election of a governing law, French law, with which
+      it is conformant, both as regards the law of torts and
+      intellectual property law, and the protection that it offers to
+      both authors and holders of the economic rights over software.
+
+The authors of the CeCILL (for Ce[a] C[nrs] I[nria] L[ogiciel] L[ibre])
+license are:
+
+Commissariat à l'Energie Atomique - CEA, a public scientific, technical
+and industrial research establishment, having its principal place of
+business at 25 rue Leblanc, immeuble Le Ponant D, 75015 Paris, France.
+
+Centre National de la Recherche Scientifique - CNRS, a public scientific
+and technological establishment, having its principal place of business
+at 3 rue Michel-Ange, 75794 Paris cedex 16, France.
+
+Institut National de Recherche en Informatique et en Automatique -
+INRIA, a public scientific and technological establishment, having its
+principal place of business at Domaine de Voluceau, Rocquencourt, BP
+105, 78153 Le Chesnay cedex, France.
+
+
+    Preamble
+
+The purpose of this Free Software license agreement is to grant users
+the right to modify and redistribute the software governed by this
+license within the framework of an open source distribution model.
+
+The exercising of these rights is conditional upon certain obligations
+for users so as to preserve this status for all subsequent redistributions.
+
+In consideration of access to the source code and the rights to copy,
+modify and redistribute granted by the license, users are provided only
+with a limited warranty and the software's author, the holder of the
+economic rights, and the successive licensors only have limited liability.
+
+In this respect, the risks associated with loading, using, modifying
+and/or developing or reproducing the software by the user are brought to
+the user's attention, given its Free Software status, which may make it
+complicated to use, with the result that its use is reserved for
+developers and experienced professionals having in-depth computer
+knowledge. Users are therefore encouraged to load and test the
+suitability of the software as regards their requirements in conditions
+enabling the security of their systems and/or data to be ensured and,
+more generally, to use and operate it in the same conditions of
+security. This Agreement may be freely reproduced and published,
+provided it is not altered, and that no provisions are either added or
+removed herefrom.
+
+This Agreement may apply to any or all software for which the holder of
+the economic rights decides to submit the use thereof to its provisions.
+
+
+    Article 1 - DEFINITIONS
+
+For the purpose of this Agreement, when the following expressions
+commence with a capital letter, they shall have the following meaning:
+
+Agreement: means this license agreement, and its possible subsequent
+versions and annexes.
+
+Software: means the software in its Object Code and/or Source Code form
+and, where applicable, its documentation, "as is" when the Licensee
+accepts the Agreement.
+
+Initial Software: means the Software in its Source Code and possibly its
+Object Code form and, where applicable, its documentation, "as is" when
+it is first distributed under the terms and conditions of the Agreement.
+
+Modified Software: means the Software modified by at least one
+Contribution.
+
+Source Code: means all the Software's instructions and program lines to
+which access is required so as to modify the Software.
+
+Object Code: means the binary files originating from the compilation of
+the Source Code.
+
+Holder: means the holder(s) of the economic rights over the Initial
+Software.
+
+Licensee: means the Software user(s) having accepted the Agreement.
+
+Contributor: means a Licensee having made at least one Contribution.
+
+Licensor: means the Holder, or any other individual or legal entity, who
+distributes the Software under the Agreement.
+
+Contribution: means any or all modifications, corrections, translations,
+adaptations and/or new functions integrated into the Software by any or
+all Contributors, as well as any or all Internal Modules.
+
+Module: means a set of sources files including their documentation that
+enables supplementary functions or services in addition to those offered
+by the Software.
+
+External Module: means any or all Modules, not derived from the
+Software, so that this Module and the Software run in separate address
+spaces, with one calling the other when they are run.
+
+Internal Module: means any or all Module, connected to the Software so
+that they both execute in the same address space.
+
+GNU GPL: means the GNU General Public License version 2 or any
+subsequent version, as published by the Free Software Foundation Inc.
+
+Parties: mean both the Licensee and the Licensor.
+
+These expressions may be used both in singular and plural form.
+
+
+    Article 2 - PURPOSE
+
+The purpose of the Agreement is the grant by the Licensor to the
+Licensee of a non-exclusive, transferable and worldwide license for the
+Software as set forth in Article 5 hereinafter for the whole term of the
+protection granted by the rights over said Software. 
+
+
+    Article 3 - ACCEPTANCE
+
+3.1 The Licensee shall be deemed as having accepted the terms and
+conditions of this Agreement upon the occurrence of the first of the
+following events:
+
+    * (i) loading the Software by any or all means, notably, by
+      downloading from a remote server, or by loading from a physical
+      medium;
+    * (ii) the first time the Licensee exercises any of the rights
+      granted hereunder.
+
+3.2 One copy of the Agreement, containing a notice relating to the
+characteristics of the Software, to the limited warranty, and to the
+fact that its use is restricted to experienced users has been provided
+to the Licensee prior to its acceptance as set forth in Article 3.1
+hereinabove, and the Licensee hereby acknowledges that it has read and
+understood it.
+
+
+    Article 4 - EFFECTIVE DATE AND TERM
+
+
+      4.1 EFFECTIVE DATE
+
+The Agreement shall become effective on the date when it is accepted by
+the Licensee as set forth in Article 3.1.
+
+
+      4.2 TERM
+
+The Agreement shall remain in force for the entire legal term of
+protection of the economic rights over the Software.
+
+
+    Article 5 - SCOPE OF RIGHTS GRANTED
+
+The Licensor hereby grants to the Licensee, who accepts, the following
+rights over the Software for any or all use, and for the term of the
+Agreement, on the basis of the terms and conditions set forth hereinafter.
+
+Besides, if the Licensor owns or comes to own one or more patents
+protecting all or part of the functions of the Software or of its
+components, the Licensor undertakes not to enforce the rights granted by
+these patents against successive Licensees using, exploiting or
+modifying the Software. If these patents are transferred, the Licensor
+undertakes to have the transferees subscribe to the obligations set
+forth in this paragraph.
+
+
+      5.1 RIGHT OF USE
+
+The Licensee is authorized to use the Software, without any limitation
+as to its fields of application, with it being hereinafter specified
+that this comprises:
+
+   1. permanent or temporary reproduction of all or part of the Software
+      by any or all means and in any or all form.
+
+   2. loading, displaying, running, or storing the Software on any or
+      all medium.
+
+   3. entitlement to observe, study or test its operation so as to
+      determine the ideas and principles behind any or all constituent
+      elements of said Software. This shall apply when the Licensee
+      carries out any or all loading, displaying, running, transmission
+      or storage operation as regards the Software, that it is entitled
+      to carry out hereunder.
+
+
+      5.2 ENTITLEMENT TO MAKE CONTRIBUTIONS
+
+The right to make Contributions includes the right to translate, adapt,
+arrange, or make any or all modifications to the Software, and the right
+to reproduce the resulting software.
+
+The Licensee is authorized to make any or all Contributions to the
+Software provided that it includes an explicit notice that it is the
+author of said Contribution and indicates the date of the creation thereof.
+
+
+      5.3 RIGHT OF DISTRIBUTION
+
+In particular, the right of distribution includes the right to publish,
+transmit and communicate the Software to the general public on any or
+all medium, and by any or all means, and the right to market, either in
+consideration of a fee, or free of charge, one or more copies of the
+Software by any means.
+
+The Licensee is further authorized to distribute copies of the modified
+or unmodified Software to third parties according to the terms and
+conditions set forth hereinafter.
+
+
+        5.3.1 DISTRIBUTION OF SOFTWARE WITHOUT MODIFICATION
+
+The Licensee is authorized to distribute true copies of the Software in
+Source Code or Object Code form, provided that said distribution
+complies with all the provisions of the Agreement and is accompanied by:
+
+   1. a copy of the Agreement,
+
+   2. a notice relating to the limitation of both the Licensor's
+      warranty and liability as set forth in Articles 8 and 9,
+
+and that, in the event that only the Object Code of the Software is
+redistributed, the Licensee allows future Licensees unhindered access to
+the full Source Code of the Software by indicating how to access it, it
+being understood that the additional cost of acquiring the Source Code
+shall not exceed the cost of transferring the data.
+
+
+        5.3.2 DISTRIBUTION OF MODIFIED SOFTWARE
+
+When the Licensee makes a Contribution to the Software, the terms and
+conditions for the distribution of the resulting Modified Software
+become subject to all the provisions of this Agreement.
+
+The Licensee is authorized to distribute the Modified Software, in
+source code or object code form, provided that said distribution
+complies with all the provisions of the Agreement and is accompanied by:
+
+   1. a copy of the Agreement,
+
+   2. a notice relating to the limitation of both the Licensor's
+      warranty and liability as set forth in Articles 8 and 9,
+
+and that, in the event that only the object code of the Modified
+Software is redistributed, the Licensee allows future Licensees
+unhindered access to the full source code of the Modified Software by
+indicating how to access it, it being understood that the additional
+cost of acquiring the source code shall not exceed the cost of
+transferring the data.
+
+
+        5.3.3 DISTRIBUTION OF EXTERNAL MODULES
+
+When the Licensee has developed an External Module, the terms and
+conditions of this Agreement do not apply to said External Module, that
+may be distributed under a separate license agreement.
+
+
+        5.3.4 COMPATIBILITY WITH THE GNU GPL
+
+The Licensee can include a code that is subject to the provisions of one
+of the versions of the GNU GPL in the Modified or unmodified Software,
+and distribute that entire code under the terms of the same version of
+the GNU GPL.
+
+The Licensee can include the Modified or unmodified Software in a code
+that is subject to the provisions of one of the versions of the GNU GPL,
+and distribute that entire code under the terms of the same version of
+the GNU GPL.
+
+
+    Article 6 - INTELLECTUAL PROPERTY
+
+
+      6.1 OVER THE INITIAL SOFTWARE
+
+The Holder owns the economic rights over the Initial Software. Any or
+all use of the Initial Software is subject to compliance with the terms
+and conditions under which the Holder has elected to distribute its work
+and no one shall be entitled to modify the terms and conditions for the
+distribution of said Initial Software.
+
+The Holder undertakes that the Initial Software will remain ruled at
+least by this Agreement, for the duration set forth in Article 4.2.
+
+
+      6.2 OVER THE CONTRIBUTIONS
+
+The Licensee who develops a Contribution is the owner of the
+intellectual property rights over this Contribution as defined by
+applicable law.
+
+
+      6.3 OVER THE EXTERNAL MODULES
+
+The Licensee who develops an External Module is the owner of the
+intellectual property rights over this External Module as defined by
+applicable law and is free to choose the type of agreement that shall
+govern its distribution.
+
+
+      6.4 JOINT PROVISIONS
+
+The Licensee expressly undertakes:
+
+   1. not to remove, or modify, in any manner, the intellectual property
+      notices attached to the Software;
+
+   2. to reproduce said notices, in an identical manner, in the copies
+      of the Software modified or not.
+
+The Licensee undertakes not to directly or indirectly infringe the
+intellectual property rights of the Holder and/or Contributors on the
+Software and to take, where applicable, vis-à-vis its staff, any and all
+measures required to ensure respect of said intellectual property rights
+of the Holder and/or Contributors.
+
+
+    Article 7 - RELATED SERVICES
+
+7.1 Under no circumstances shall the Agreement oblige the Licensor to
+provide technical assistance or maintenance services for the Software.
+
+However, the Licensor is entitled to offer this type of services. The
+terms and conditions of such technical assistance, and/or such
+maintenance, shall be set forth in a separate instrument. Only the
+Licensor offering said maintenance and/or technical assistance services
+shall incur liability therefor.
+
+7.2 Similarly, any Licensor is entitled to offer to its licensees, under
+its sole responsibility, a warranty, that shall only be binding upon
+itself, for the redistribution of the Software and/or the Modified
+Software, under terms and conditions that it is free to decide. Said
+warranty, and the financial terms and conditions of its application,
+shall be subject of a separate instrument executed between the Licensor
+and the Licensee.
+
+
+    Article 8 - LIABILITY
+
+8.1 Subject to the provisions of Article 8.2, the Licensee shall be
+entitled to claim compensation for any direct loss it may have suffered
+from the Software as a result of a fault on the part of the relevant
+Licensor, subject to providing evidence thereof.
+
+8.2 The Licensor's liability is limited to the commitments made under
+this Agreement and shall not be incurred as a result of in particular:
+(i) loss due the Licensee's total or partial failure to fulfill its
+obligations, (ii) direct or consequential loss that is suffered by the
+Licensee due to the use or performance of the Software, and (iii) more
+generally, any consequential loss. In particular the Parties expressly
+agree that any or all pecuniary or business loss (i.e. loss of data,
+loss of profits, operating loss, loss of customers or orders,
+opportunity cost, any disturbance to business activities) or any or all
+legal proceedings instituted against the Licensee by a third party,
+shall constitute consequential loss and shall not provide entitlement to
+any or all compensation from the Licensor.
+
+
+    Article 9 - WARRANTY
+
+9.1 The Licensee acknowledges that the scientific and technical
+state-of-the-art when the Software was distributed did not enable all
+possible uses to be tested and verified, nor for the presence of
+possible defects to be detected. In this respect, the Licensee's
+attention has been drawn to the risks associated with loading, using,
+modifying and/or developing and reproducing the Software which are
+reserved for experienced users.
+
+The Licensee shall be responsible for verifying, by any or all means,
+the suitability of the product for its requirements, its good working
+order, and for ensuring that it shall not cause damage to either persons
+or properties.
+
+9.2 The Licensor hereby represents, in good faith, that it is entitled
+to grant all the rights over the Software (including in particular the
+rights set forth in Article 5).
+
+9.3 The Licensee acknowledges that the Software is supplied "as is" by
+the Licensor without any other express or tacit warranty, other than
+that provided for in Article 9.2 and, in particular, without any warranty 
+as to its commercial value, its secured, safe, innovative or relevant
+nature.
+
+Specifically, the Licensor does not warrant that the Software is free
+from any error, that it will operate without interruption, that it will
+be compatible with the Licensee's own equipment and software
+configuration, nor that it will meet the Licensee's requirements.
+
+9.4 The Licensor does not either expressly or tacitly warrant that the
+Software does not infringe any third party intellectual property right
+relating to a patent, software or any other property right. Therefore,
+the Licensor disclaims any and all liability towards the Licensee
+arising out of any or all proceedings for infringement that may be
+instituted in respect of the use, modification and redistribution of the
+Software. Nevertheless, should such proceedings be instituted against
+the Licensee, the Licensor shall provide it with technical and legal
+assistance for its defense. Such technical and legal assistance shall be
+decided on a case-by-case basis between the relevant Licensor and the
+Licensee pursuant to a memorandum of understanding. The Licensor
+disclaims any and all liability as regards the Licensee's use of the
+name of the Software. No warranty is given as regards the existence of
+prior rights over the name of the Software or as regards the existence
+of a trademark.
+
+
+    Article 10 - TERMINATION
+
+10.1 In the event of a breach by the Licensee of its obligations
+hereunder, the Licensor may automatically terminate this Agreement
+thirty (30) days after notice has been sent to the Licensee and has
+remained ineffective.
+
+10.2 A Licensee whose Agreement is terminated shall no longer be
+authorized to use, modify or distribute the Software. However, any
+licenses that it may have granted prior to termination of the Agreement
+shall remain valid subject to their having been granted in compliance
+with the terms and conditions hereof.
+
+
+    Article 11 - MISCELLANEOUS
+
+
+      11.1 EXCUSABLE EVENTS
+
+Neither Party shall be liable for any or all delay, or failure to
+perform the Agreement, that may be attributable to an event of force
+majeure, an act of God or an outside cause, such as defective
+functioning or interruptions of the electricity or telecommunications
+networks, network paralysis following a virus attack, intervention by
+government authorities, natural disasters, water damage, earthquakes,
+fire, explosions, strikes and labor unrest, war, etc.
+
+11.2 Any failure by either Party, on one or more occasions, to invoke
+one or more of the provisions hereof, shall under no circumstances be
+interpreted as being a waiver by the interested Party of its right to
+invoke said provision(s) subsequently.
+
+11.3 The Agreement cancels and replaces any or all previous agreements,
+whether written or oral, between the Parties and having the same
+purpose, and constitutes the entirety of the agreement between said
+Parties concerning said purpose. No supplement or modification to the
+terms and conditions hereof shall be effective as between the Parties
+unless it is made in writing and signed by their duly authorized
+representatives.
+
+11.4 In the event that one or more of the provisions hereof were to
+conflict with a current or future applicable act or legislative text,
+said act or legislative text shall prevail, and the Parties shall make
+the necessary amendments so as to comply with said act or legislative
+text. All other provisions shall remain effective. Similarly, invalidity
+of a provision of the Agreement, for any reason whatsoever, shall not
+cause the Agreement as a whole to be invalid.
+
+
+      11.5 LANGUAGE
+
+The Agreement is drafted in both French and English and both versions
+are deemed authentic.
+
+
+    Article 12 - NEW VERSIONS OF THE AGREEMENT
+
+12.1 Any person is authorized to duplicate and distribute copies of this
+Agreement.
+
+12.2 So as to ensure coherence, the wording of this Agreement is
+protected and may only be modified by the authors of the License, who
+reserve the right to periodically publish updates or new versions of the
+Agreement, each with a separate number. These subsequent versions may
+address new issues encountered by Free Software.
+
+12.3 Any Software distributed under a given version of the Agreement may
+only be subsequently distributed under the same version of the Agreement
+or a subsequent version, subject to the provisions of Article 5.3.4.
+
+
+    Article 13 - GOVERNING LAW AND JURISDICTION
+
+13.1 The Agreement is governed by French law. The Parties agree to
+endeavor to seek an amicable solution to any disagreements or disputes
+that may arise during the performance of the Agreement.
+
+13.2 Failing an amicable solution within two (2) months as from their
+occurrence, and unless emergency proceedings are necessary, the
+disagreements or disputes shall be referred to the Paris Courts having
+jurisdiction, by the more diligent Party.
+
+
+Version 2.0 dated 2006-09-05.
+
+
+
+
+
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/Licence_CeCILL_V2-en.txt
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/Licence_CeCILL_V2-en.txt	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/Licence_CeCILL_V2-en.txt	(revision 1749)
@@ -0,0 +1,506 @@
+
+CeCILL FREE SOFTWARE LICENSE AGREEMENT
+
+
+    Notice
+
+This Agreement is a Free Software license agreement that is the result
+of discussions between its authors in order to ensure compliance with
+the two main principles guiding its drafting:
+
+    * firstly, compliance with the principles governing the distribution
+      of Free Software: access to source code, broad rights granted to
+      users,
+    * secondly, the election of a governing law, French law, with which
+      it is conformant, both as regards the law of torts and
+      intellectual property law, and the protection that it offers to
+      both authors and holders of the economic rights over software.
+
+The authors of the CeCILL (for Ce[a] C[nrs] I[nria] L[ogiciel] L[ibre])
+license are:
+
+Commissariat à l'Energie Atomique - CEA, a public scientific, technical
+and industrial research establishment, having its principal place of
+business at 25 rue Leblanc, immeuble Le Ponant D, 75015 Paris, France.
+
+Centre National de la Recherche Scientifique - CNRS, a public scientific
+and technological establishment, having its principal place of business
+at 3 rue Michel-Ange, 75794 Paris cedex 16, France.
+
+Institut National de Recherche en Informatique et en Automatique -
+INRIA, a public scientific and technological establishment, having its
+principal place of business at Domaine de Voluceau, Rocquencourt, BP
+105, 78153 Le Chesnay cedex, France.
+
+
+    Preamble
+
+The purpose of this Free Software license agreement is to grant users
+the right to modify and redistribute the software governed by this
+license within the framework of an open source distribution model.
+
+The exercising of these rights is conditional upon certain obligations
+for users so as to preserve this status for all subsequent redistributions.
+
+In consideration of access to the source code and the rights to copy,
+modify and redistribute granted by the license, users are provided only
+with a limited warranty and the software's author, the holder of the
+economic rights, and the successive licensors only have limited liability.
+
+In this respect, the risks associated with loading, using, modifying
+and/or developing or reproducing the software by the user are brought to
+the user's attention, given its Free Software status, which may make it
+complicated to use, with the result that its use is reserved for
+developers and experienced professionals having in-depth computer
+knowledge. Users are therefore encouraged to load and test the
+suitability of the software as regards their requirements in conditions
+enabling the security of their systems and/or data to be ensured and,
+more generally, to use and operate it in the same conditions of
+security. This Agreement may be freely reproduced and published,
+provided it is not altered, and that no provisions are either added or
+removed herefrom.
+
+This Agreement may apply to any or all software for which the holder of
+the economic rights decides to submit the use thereof to its provisions.
+
+
+    Article 1 - DEFINITIONS
+
+For the purpose of this Agreement, when the following expressions
+commence with a capital letter, they shall have the following meaning:
+
+Agreement: means this license agreement, and its possible subsequent
+versions and annexes.
+
+Software: means the software in its Object Code and/or Source Code form
+and, where applicable, its documentation, "as is" when the Licensee
+accepts the Agreement.
+
+Initial Software: means the Software in its Source Code and possibly its
+Object Code form and, where applicable, its documentation, "as is" when
+it is first distributed under the terms and conditions of the Agreement.
+
+Modified Software: means the Software modified by at least one
+Contribution.
+
+Source Code: means all the Software's instructions and program lines to
+which access is required so as to modify the Software.
+
+Object Code: means the binary files originating from the compilation of
+the Source Code.
+
+Holder: means the holder(s) of the economic rights over the Initial
+Software.
+
+Licensee: means the Software user(s) having accepted the Agreement.
+
+Contributor: means a Licensee having made at least one Contribution.
+
+Licensor: means the Holder, or any other individual or legal entity, who
+distributes the Software under the Agreement.
+
+Contribution: means any or all modifications, corrections, translations,
+adaptations and/or new functions integrated into the Software by any or
+all Contributors, as well as any or all Internal Modules.
+
+Module: means a set of sources files including their documentation that
+enables supplementary functions or services in addition to those offered
+by the Software.
+
+External Module: means any or all Modules, not derived from the
+Software, so that this Module and the Software run in separate address
+spaces, with one calling the other when they are run.
+
+Internal Module: means any or all Module, connected to the Software so
+that they both execute in the same address space.
+
+GNU GPL: means the GNU General Public License version 2 or any
+subsequent version, as published by the Free Software Foundation Inc.
+
+Parties: mean both the Licensee and the Licensor.
+
+These expressions may be used both in singular and plural form.
+
+
+    Article 2 - PURPOSE
+
+The purpose of the Agreement is the grant by the Licensor to the
+Licensee of a non-exclusive, transferable and worldwide license for the
+Software as set forth in Article 5 hereinafter for the whole term of the
+protection granted by the rights over said Software. 
+
+
+    Article 3 - ACCEPTANCE
+
+3.1 The Licensee shall be deemed as having accepted the terms and
+conditions of this Agreement upon the occurrence of the first of the
+following events:
+
+    * (i) loading the Software by any or all means, notably, by
+      downloading from a remote server, or by loading from a physical
+      medium;
+    * (ii) the first time the Licensee exercises any of the rights
+      granted hereunder.
+
+3.2 One copy of the Agreement, containing a notice relating to the
+characteristics of the Software, to the limited warranty, and to the
+fact that its use is restricted to experienced users has been provided
+to the Licensee prior to its acceptance as set forth in Article 3.1
+hereinabove, and the Licensee hereby acknowledges that it has read and
+understood it.
+
+
+    Article 4 - EFFECTIVE DATE AND TERM
+
+
+      4.1 EFFECTIVE DATE
+
+The Agreement shall become effective on the date when it is accepted by
+the Licensee as set forth in Article 3.1.
+
+
+      4.2 TERM
+
+The Agreement shall remain in force for the entire legal term of
+protection of the economic rights over the Software.
+
+
+    Article 5 - SCOPE OF RIGHTS GRANTED
+
+The Licensor hereby grants to the Licensee, who accepts, the following
+rights over the Software for any or all use, and for the term of the
+Agreement, on the basis of the terms and conditions set forth hereinafter.
+
+Besides, if the Licensor owns or comes to own one or more patents
+protecting all or part of the functions of the Software or of its
+components, the Licensor undertakes not to enforce the rights granted by
+these patents against successive Licensees using, exploiting or
+modifying the Software. If these patents are transferred, the Licensor
+undertakes to have the transferees subscribe to the obligations set
+forth in this paragraph.
+
+
+      5.1 RIGHT OF USE
+
+The Licensee is authorized to use the Software, without any limitation
+as to its fields of application, with it being hereinafter specified
+that this comprises:
+
+   1. permanent or temporary reproduction of all or part of the Software
+      by any or all means and in any or all form.
+
+   2. loading, displaying, running, or storing the Software on any or
+      all medium.
+
+   3. entitlement to observe, study or test its operation so as to
+      determine the ideas and principles behind any or all constituent
+      elements of said Software. This shall apply when the Licensee
+      carries out any or all loading, displaying, running, transmission
+      or storage operation as regards the Software, that it is entitled
+      to carry out hereunder.
+
+
+      5.2 ENTITLEMENT TO MAKE CONTRIBUTIONS
+
+The right to make Contributions includes the right to translate, adapt,
+arrange, or make any or all modifications to the Software, and the right
+to reproduce the resulting software.
+
+The Licensee is authorized to make any or all Contributions to the
+Software provided that it includes an explicit notice that it is the
+author of said Contribution and indicates the date of the creation thereof.
+
+
+      5.3 RIGHT OF DISTRIBUTION
+
+In particular, the right of distribution includes the right to publish,
+transmit and communicate the Software to the general public on any or
+all medium, and by any or all means, and the right to market, either in
+consideration of a fee, or free of charge, one or more copies of the
+Software by any means.
+
+The Licensee is further authorized to distribute copies of the modified
+or unmodified Software to third parties according to the terms and
+conditions set forth hereinafter.
+
+
+        5.3.1 DISTRIBUTION OF SOFTWARE WITHOUT MODIFICATION
+
+The Licensee is authorized to distribute true copies of the Software in
+Source Code or Object Code form, provided that said distribution
+complies with all the provisions of the Agreement and is accompanied by:
+
+   1. a copy of the Agreement,
+
+   2. a notice relating to the limitation of both the Licensor's
+      warranty and liability as set forth in Articles 8 and 9,
+
+and that, in the event that only the Object Code of the Software is
+redistributed, the Licensee allows future Licensees unhindered access to
+the full Source Code of the Software by indicating how to access it, it
+being understood that the additional cost of acquiring the Source Code
+shall not exceed the cost of transferring the data.
+
+
+        5.3.2 DISTRIBUTION OF MODIFIED SOFTWARE
+
+When the Licensee makes a Contribution to the Software, the terms and
+conditions for the distribution of the resulting Modified Software
+become subject to all the provisions of this Agreement.
+
+The Licensee is authorized to distribute the Modified Software, in
+source code or object code form, provided that said distribution
+complies with all the provisions of the Agreement and is accompanied by:
+
+   1. a copy of the Agreement,
+
+   2. a notice relating to the limitation of both the Licensor's
+      warranty and liability as set forth in Articles 8 and 9,
+
+and that, in the event that only the object code of the Modified
+Software is redistributed, the Licensee allows future Licensees
+unhindered access to the full source code of the Modified Software by
+indicating how to access it, it being understood that the additional
+cost of acquiring the source code shall not exceed the cost of
+transferring the data.
+
+
+        5.3.3 DISTRIBUTION OF EXTERNAL MODULES
+
+When the Licensee has developed an External Module, the terms and
+conditions of this Agreement do not apply to said External Module, that
+may be distributed under a separate license agreement.
+
+
+        5.3.4 COMPATIBILITY WITH THE GNU GPL
+
+The Licensee can include a code that is subject to the provisions of one
+of the versions of the GNU GPL in the Modified or unmodified Software,
+and distribute that entire code under the terms of the same version of
+the GNU GPL.
+
+The Licensee can include the Modified or unmodified Software in a code
+that is subject to the provisions of one of the versions of the GNU GPL,
+and distribute that entire code under the terms of the same version of
+the GNU GPL.
+
+
+    Article 6 - INTELLECTUAL PROPERTY
+
+
+      6.1 OVER THE INITIAL SOFTWARE
+
+The Holder owns the economic rights over the Initial Software. Any or
+all use of the Initial Software is subject to compliance with the terms
+and conditions under which the Holder has elected to distribute its work
+and no one shall be entitled to modify the terms and conditions for the
+distribution of said Initial Software.
+
+The Holder undertakes that the Initial Software will remain ruled at
+least by this Agreement, for the duration set forth in Article 4.2.
+
+
+      6.2 OVER THE CONTRIBUTIONS
+
+The Licensee who develops a Contribution is the owner of the
+intellectual property rights over this Contribution as defined by
+applicable law.
+
+
+      6.3 OVER THE EXTERNAL MODULES
+
+The Licensee who develops an External Module is the owner of the
+intellectual property rights over this External Module as defined by
+applicable law and is free to choose the type of agreement that shall
+govern its distribution.
+
+
+      6.4 JOINT PROVISIONS
+
+The Licensee expressly undertakes:
+
+   1. not to remove, or modify, in any manner, the intellectual property
+      notices attached to the Software;
+
+   2. to reproduce said notices, in an identical manner, in the copies
+      of the Software modified or not.
+
+The Licensee undertakes not to directly or indirectly infringe the
+intellectual property rights of the Holder and/or Contributors on the
+Software and to take, where applicable, vis-à-vis its staff, any and all
+measures required to ensure respect of said intellectual property rights
+of the Holder and/or Contributors.
+
+
+    Article 7 - RELATED SERVICES
+
+7.1 Under no circumstances shall the Agreement oblige the Licensor to
+provide technical assistance or maintenance services for the Software.
+
+However, the Licensor is entitled to offer this type of services. The
+terms and conditions of such technical assistance, and/or such
+maintenance, shall be set forth in a separate instrument. Only the
+Licensor offering said maintenance and/or technical assistance services
+shall incur liability therefor.
+
+7.2 Similarly, any Licensor is entitled to offer to its licensees, under
+its sole responsibility, a warranty, that shall only be binding upon
+itself, for the redistribution of the Software and/or the Modified
+Software, under terms and conditions that it is free to decide. Said
+warranty, and the financial terms and conditions of its application,
+shall be subject of a separate instrument executed between the Licensor
+and the Licensee.
+
+
+    Article 8 - LIABILITY
+
+8.1 Subject to the provisions of Article 8.2, the Licensee shall be
+entitled to claim compensation for any direct loss it may have suffered
+from the Software as a result of a fault on the part of the relevant
+Licensor, subject to providing evidence thereof.
+
+8.2 The Licensor's liability is limited to the commitments made under
+this Agreement and shall not be incurred as a result of in particular:
+(i) loss due the Licensee's total or partial failure to fulfill its
+obligations, (ii) direct or consequential loss that is suffered by the
+Licensee due to the use or performance of the Software, and (iii) more
+generally, any consequential loss. In particular the Parties expressly
+agree that any or all pecuniary or business loss (i.e. loss of data,
+loss of profits, operating loss, loss of customers or orders,
+opportunity cost, any disturbance to business activities) or any or all
+legal proceedings instituted against the Licensee by a third party,
+shall constitute consequential loss and shall not provide entitlement to
+any or all compensation from the Licensor.
+
+
+    Article 9 - WARRANTY
+
+9.1 The Licensee acknowledges that the scientific and technical
+state-of-the-art when the Software was distributed did not enable all
+possible uses to be tested and verified, nor for the presence of
+possible defects to be detected. In this respect, the Licensee's
+attention has been drawn to the risks associated with loading, using,
+modifying and/or developing and reproducing the Software which are
+reserved for experienced users.
+
+The Licensee shall be responsible for verifying, by any or all means,
+the suitability of the product for its requirements, its good working
+order, and for ensuring that it shall not cause damage to either persons
+or properties.
+
+9.2 The Licensor hereby represents, in good faith, that it is entitled
+to grant all the rights over the Software (including in particular the
+rights set forth in Article 5).
+
+9.3 The Licensee acknowledges that the Software is supplied "as is" by
+the Licensor without any other express or tacit warranty, other than
+that provided for in Article 9.2 and, in particular, without any warranty 
+as to its commercial value, its secured, safe, innovative or relevant
+nature.
+
+Specifically, the Licensor does not warrant that the Software is free
+from any error, that it will operate without interruption, that it will
+be compatible with the Licensee's own equipment and software
+configuration, nor that it will meet the Licensee's requirements.
+
+9.4 The Licensor does not either expressly or tacitly warrant that the
+Software does not infringe any third party intellectual property right
+relating to a patent, software or any other property right. Therefore,
+the Licensor disclaims any and all liability towards the Licensee
+arising out of any or all proceedings for infringement that may be
+instituted in respect of the use, modification and redistribution of the
+Software. Nevertheless, should such proceedings be instituted against
+the Licensee, the Licensor shall provide it with technical and legal
+assistance for its defense. Such technical and legal assistance shall be
+decided on a case-by-case basis between the relevant Licensor and the
+Licensee pursuant to a memorandum of understanding. The Licensor
+disclaims any and all liability as regards the Licensee's use of the
+name of the Software. No warranty is given as regards the existence of
+prior rights over the name of the Software or as regards the existence
+of a trademark.
+
+
+    Article 10 - TERMINATION
+
+10.1 In the event of a breach by the Licensee of its obligations
+hereunder, the Licensor may automatically terminate this Agreement
+thirty (30) days after notice has been sent to the Licensee and has
+remained ineffective.
+
+10.2 A Licensee whose Agreement is terminated shall no longer be
+authorized to use, modify or distribute the Software. However, any
+licenses that it may have granted prior to termination of the Agreement
+shall remain valid subject to their having been granted in compliance
+with the terms and conditions hereof.
+
+
+    Article 11 - MISCELLANEOUS
+
+
+      11.1 EXCUSABLE EVENTS
+
+Neither Party shall be liable for any or all delay, or failure to
+perform the Agreement, that may be attributable to an event of force
+majeure, an act of God or an outside cause, such as defective
+functioning or interruptions of the electricity or telecommunications
+networks, network paralysis following a virus attack, intervention by
+government authorities, natural disasters, water damage, earthquakes,
+fire, explosions, strikes and labor unrest, war, etc.
+
+11.2 Any failure by either Party, on one or more occasions, to invoke
+one or more of the provisions hereof, shall under no circumstances be
+interpreted as being a waiver by the interested Party of its right to
+invoke said provision(s) subsequently.
+
+11.3 The Agreement cancels and replaces any or all previous agreements,
+whether written or oral, between the Parties and having the same
+purpose, and constitutes the entirety of the agreement between said
+Parties concerning said purpose. No supplement or modification to the
+terms and conditions hereof shall be effective as between the Parties
+unless it is made in writing and signed by their duly authorized
+representatives.
+
+11.4 In the event that one or more of the provisions hereof were to
+conflict with a current or future applicable act or legislative text,
+said act or legislative text shall prevail, and the Parties shall make
+the necessary amendments so as to comply with said act or legislative
+text. All other provisions shall remain effective. Similarly, invalidity
+of a provision of the Agreement, for any reason whatsoever, shall not
+cause the Agreement as a whole to be invalid.
+
+
+      11.5 LANGUAGE
+
+The Agreement is drafted in both French and English and both versions
+are deemed authentic.
+
+
+    Article 12 - NEW VERSIONS OF THE AGREEMENT
+
+12.1 Any person is authorized to duplicate and distribute copies of this
+Agreement.
+
+12.2 So as to ensure coherence, the wording of this Agreement is
+protected and may only be modified by the authors of the License, who
+reserve the right to periodically publish updates or new versions of the
+Agreement, each with a separate number. These subsequent versions may
+address new issues encountered by Free Software.
+
+12.3 Any Software distributed under a given version of the Agreement may
+only be subsequently distributed under the same version of the Agreement
+or a subsequent version, subject to the provisions of Article 5.3.4.
+
+
+    Article 13 - GOVERNING LAW AND JURISDICTION
+
+13.1 The Agreement is governed by French law. The Parties agree to
+endeavor to seek an amicable solution to any disagreements or disputes
+that may arise during the performance of the Agreement.
+
+13.2 Failing an amicable solution within two (2) months as from their
+occurrence, and unless emergency proceedings are necessary, the
+disagreements or disputes shall be referred to the Paris Courts having
+jurisdiction, by the more diligent Party.
+
+
+Version 2.0 dated 2006-09-05.
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/Licence_CeCILL_V2-fr.txt
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/Licence_CeCILL_V2-fr.txt	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/Licence_CeCILL_V2-fr.txt	(revision 1749)
@@ -0,0 +1,512 @@
+
+CONTRAT DE LICENCE DE LOGICIEL LIBRE CeCILL
+
+
+    Avertissement
+
+Ce contrat est une licence de logiciel libre issue d'une concertation
+entre ses auteurs afin que le respect de deux grands principes préside à
+sa rédaction:
+
+    * d'une part, le respect des principes de diffusion des logiciels
+      libres: accès au code source, droits étendus conférés aux
+      utilisateurs,
+    * d'autre part, la désignation d'un droit applicable, le droit
+      français, auquel elle est conforme, tant au regard du droit de la
+      responsabilité civile que du droit de la propriété intellectuelle
+      et de la protection qu'il offre aux auteurs et titulaires des
+      droits patrimoniaux sur un logiciel.
+
+Les auteurs de la licence CeCILL (pour Ce[a] C[nrs] I[nria] L[ogiciel]
+L[ibre]) sont:
+
+Commissariat à l'Energie Atomique - CEA, établissement public de
+recherche à caractère scientifique, technique et industriel, dont le
+siège est situé 25 rue Leblanc, immeuble Le Ponant D, 75015 Paris.
+
+Centre National de la Recherche Scientifique - CNRS, établissement
+public à caractère scientifique et technologique, dont le siège est
+situé 3 rue Michel-Ange, 75794 Paris cedex 16.
+
+Institut National de Recherche en Informatique et en Automatique -
+INRIA, établissement public à caractère scientifique et technologique,
+dont le siège est situé Domaine de Voluceau, Rocquencourt, BP 105, 78153
+Le Chesnay cedex.
+
+
+    Préambule
+
+Ce contrat est une licence de logiciel libre dont l'objectif est de
+conférer aux utilisateurs la liberté de modification et de
+redistribution du logiciel régi par cette licence dans le cadre d'un
+modèle de diffusion en logiciel libre.
+
+L'exercice de ces libertés est assorti de certains devoirs à la charge
+des utilisateurs afin de préserver ce statut au cours des
+redistributions ultérieures.
+
+L'accessibilité au code source et les droits de copie, de modification
+et de redistribution qui en découlent ont pour contrepartie de n'offrir
+aux utilisateurs qu'une garantie limitée et de ne faire peser sur
+l'auteur du logiciel, le titulaire des droits patrimoniaux et les
+concédants successifs qu'une responsabilité restreinte.
+
+A cet égard l'attention de l'utilisateur est attirée sur les risques
+associés au chargement, à l'utilisation, à la modification et/ou au
+développement et à la reproduction du logiciel par l'utilisateur étant
+donné sa spécificité de logiciel libre, qui peut le rendre complexe à
+manipuler et qui le réserve donc à des développeurs ou des
+professionnels avertis possédant des connaissances informatiques
+approfondies. Les utilisateurs sont donc invités à charger et tester
+l'adéquation du logiciel à leurs besoins dans des conditions permettant
+d'assurer la sécurité de leurs systèmes et/ou de leurs données et, plus
+généralement, à l'utiliser et l'exploiter dans les mêmes conditions de
+sécurité. Ce contrat peut être reproduit et diffusé librement, sous
+réserve de le conserver en l'état, sans ajout ni suppression de clauses.
+
+Ce contrat est susceptible de s'appliquer à tout logiciel dont le
+titulaire des droits patrimoniaux décide de soumettre l'exploitation aux
+dispositions qu'il contient.
+
+
+    Article 1 - DEFINITIONS
+
+Dans ce contrat, les termes suivants, lorsqu'ils seront écrits avec une
+lettre capitale, auront la signification suivante:
+
+Contrat: désigne le présent contrat de licence, ses éventuelles versions
+postérieures et annexes.
+
+Logiciel: désigne le logiciel sous sa forme de Code Objet et/ou de Code
+Source et le cas échéant sa documentation, dans leur état au moment de
+l'acceptation du Contrat par le Licencié.
+
+Logiciel Initial: désigne le Logiciel sous sa forme de Code Source et
+éventuellement de Code Objet et le cas échéant sa documentation, dans
+leur état au moment de leur première diffusion sous les termes du Contrat.
+
+Logiciel Modifié: désigne le Logiciel modifié par au moins une
+Contribution.
+
+Code Source: désigne l'ensemble des instructions et des lignes de
+programme du Logiciel et auquel l'accès est nécessaire en vue de
+modifier le Logiciel.
+
+Code Objet: désigne les fichiers binaires issus de la compilation du
+Code Source.
+
+Titulaire: désigne le ou les détenteurs des droits patrimoniaux d'auteur
+sur le Logiciel Initial.
+
+Licencié: désigne le ou les utilisateurs du Logiciel ayant accepté le
+Contrat.
+
+Contributeur: désigne le Licencié auteur d'au moins une Contribution.
+
+Concédant: désigne le Titulaire ou toute personne physique ou morale
+distribuant le Logiciel sous le Contrat.
+
+Contribution: désigne l'ensemble des modifications, corrections,
+traductions, adaptations et/ou nouvelles fonctionnalités intégrées dans
+le Logiciel par tout Contributeur, ainsi que tout Module Interne.
+
+Module: désigne un ensemble de fichiers sources y compris leur
+documentation qui permet de réaliser des fonctionnalités ou services
+supplémentaires à ceux fournis par le Logiciel.
+
+Module Externe: désigne tout Module, non dérivé du Logiciel, tel que ce
+Module et le Logiciel s'exécutent dans des espaces d'adressage
+différents, l'un appelant l'autre au moment de leur exécution.
+
+Module Interne: désigne tout Module lié au Logiciel de telle sorte
+qu'ils s'exécutent dans le même espace d'adressage.
+
+GNU GPL: désigne la GNU General Public License dans sa version 2 ou
+toute version ultérieure, telle que publiée par Free Software Foundation
+Inc.
+
+Parties: désigne collectivement le Licencié et le Concédant.
+
+Ces termes s'entendent au singulier comme au pluriel.
+
+
+    Article 2 - OBJET
+
+Le Contrat a pour objet la concession par le Concédant au Licencié d'une
+licence non exclusive, cessible et mondiale du Logiciel telle que
+définie ci-après à l'article 5 pour toute la durée de protection des droits
+portant sur ce Logiciel.
+
+
+    Article 3 - ACCEPTATION
+
+3.1 L'acceptation par le Licencié des termes du Contrat est réputée
+acquise du fait du premier des faits suivants:
+
+    * (i) le chargement du Logiciel par tout moyen notamment par
+      téléchargement à partir d'un serveur distant ou par chargement à
+      partir d'un support physique;
+    * (ii) le premier exercice par le Licencié de l'un quelconque des
+      droits concédés par le Contrat.
+
+3.2 Un exemplaire du Contrat, contenant notamment un avertissement
+relatif aux spécificités du Logiciel, à la restriction de garantie et à
+la limitation à un usage par des utilisateurs expérimentés a été mis à
+disposition du Licencié préalablement à son acceptation telle que
+définie à l'article 3.1 ci dessus et le Licencié reconnaît en avoir pris
+connaissance.
+
+
+    Article 4 - ENTREE EN VIGUEUR ET DUREE
+
+
+      4.1 ENTREE EN VIGUEUR
+
+Le Contrat entre en vigueur à la date de son acceptation par le Licencié
+telle que définie en 3.1.
+
+
+      4.2 DUREE
+
+Le Contrat produira ses effets pendant toute la durée légale de
+protection des droits patrimoniaux portant sur le Logiciel.
+
+
+    Article 5 - ETENDUE DES DROITS CONCEDES
+
+Le Concédant concède au Licencié, qui accepte, les droits suivants sur
+le Logiciel pour toutes destinations et pour la durée du Contrat dans
+les conditions ci-après détaillées.
+
+Par ailleurs, si le Concédant détient ou venait à détenir un ou
+plusieurs brevets d'invention protégeant tout ou partie des
+fonctionnalités du Logiciel ou de ses composants, il s'engage à ne pas
+opposer les éventuels droits conférés par ces brevets aux Licenciés
+successifs qui utiliseraient, exploiteraient ou modifieraient le
+Logiciel. En cas de cession de ces brevets, le Concédant s'engage à
+faire reprendre les obligations du présent alinéa aux cessionnaires.
+
+
+      5.1 DROIT D'UTILISATION
+
+Le Licencié est autorisé à utiliser le Logiciel, sans restriction quant
+aux domaines d'application, étant ci-après précisé que cela comporte:
+
+   1. la reproduction permanente ou provisoire du Logiciel en tout ou
+      partie par tout moyen et sous toute forme.
+
+   2. le chargement, l'affichage, l'exécution, ou le stockage du
+      Logiciel sur tout support.
+
+   3. la possibilité d'en observer, d'en étudier, ou d'en tester le
+      fonctionnement afin de déterminer les idées et principes qui sont
+      à la base de n'importe quel élément de ce Logiciel; et ceci,
+      lorsque le Licencié effectue toute opération de chargement,
+      d'affichage, d'exécution, de transmission ou de stockage du
+      Logiciel qu'il est en droit d'effectuer en vertu du Contrat.
+
+
+      5.2 DROIT D'APPORTER DES CONTRIBUTIONS
+
+Le droit d'apporter des Contributions comporte le droit de traduire,
+d'adapter, d'arranger ou d'apporter toute autre modification au Logiciel
+et le droit de reproduire le logiciel en résultant.
+
+Le Licencié est autorisé à apporter toute Contribution au Logiciel sous
+réserve de mentionner, de façon explicite, son nom en tant qu'auteur de
+cette Contribution et la date de création de celle-ci.
+
+
+      5.3 DROIT DE DISTRIBUTION
+
+Le droit de distribution comporte notamment le droit de diffuser, de
+transmettre et de communiquer le Logiciel au public sur tout support et
+par tout moyen ainsi que le droit de mettre sur le marché à titre
+onéreux ou gratuit, un ou des exemplaires du Logiciel par tout procédé.
+
+Le Licencié est autorisé à distribuer des copies du Logiciel, modifié ou
+non, à des tiers dans les conditions ci-après détaillées.
+
+
+        5.3.1 DISTRIBUTION DU LOGICIEL SANS MODIFICATION
+
+Le Licencié est autorisé à distribuer des copies conformes du Logiciel,
+sous forme de Code Source ou de Code Objet, à condition que cette
+distribution respecte les dispositions du Contrat dans leur totalité et
+soit accompagnée:
+
+   1. d'un exemplaire du Contrat,
+
+   2. d'un avertissement relatif à la restriction de garantie et de
+      responsabilité du Concédant telle que prévue aux articles 8
+      et 9,
+
+et que, dans le cas où seul le Code Objet du Logiciel est redistribué,
+le Licencié permette aux futurs Licenciés d'accéder facilement au Code
+Source complet du Logiciel en indiquant les modalités d'accès, étant
+entendu que le coût additionnel d'acquisition du Code Source ne devra
+pas excéder le simple coût de transfert des données.
+
+
+        5.3.2 DISTRIBUTION DU LOGICIEL MODIFIE
+
+Lorsque le Licencié apporte une Contribution au Logiciel, les conditions
+de distribution du Logiciel Modifié en résultant sont alors soumises à
+l'intégralité des dispositions du Contrat.
+
+Le Licencié est autorisé à distribuer le Logiciel Modifié, sous forme de
+code source ou de code objet, à condition que cette distribution
+respecte les dispositions du Contrat dans leur totalité et soit
+accompagnée:
+
+   1. d'un exemplaire du Contrat,
+
+   2. d'un avertissement relatif à la restriction de garantie et de
+      responsabilité du Concédant telle que prévue aux articles 8
+      et 9,
+
+et que, dans le cas où seul le code objet du Logiciel Modifié est
+redistribué, le Licencié permette aux futurs Licenciés d'accéder
+facilement au code source complet du Logiciel Modifié en indiquant les
+modalités d'accès, étant entendu que le coût additionnel d'acquisition
+du code source ne devra pas excéder le simple coût de transfert des données.
+
+
+        5.3.3 DISTRIBUTION DES MODULES EXTERNES
+
+Lorsque le Licencié a développé un Module Externe les conditions du
+Contrat ne s'appliquent pas à ce Module Externe, qui peut être distribué
+sous un contrat de licence différent.
+
+
+        5.3.4 COMPATIBILITE AVEC LA LICENCE GNU GPL
+
+Le Licencié peut inclure un code soumis aux dispositions d'une des
+versions de la licence GNU GPL dans le Logiciel modifié ou non et
+distribuer l'ensemble sous les conditions de la même version de la
+licence GNU GPL.
+
+Le Licencié peut inclure le Logiciel modifié ou non dans un code soumis
+aux dispositions d'une des versions de la licence GNU GPL et distribuer
+l'ensemble sous les conditions de la même version de la licence GNU GPL.
+
+
+    Article 6 - PROPRIETE INTELLECTUELLE
+
+
+      6.1 SUR LE LOGICIEL INITIAL
+
+Le Titulaire est détenteur des droits patrimoniaux sur le Logiciel
+Initial. Toute utilisation du Logiciel Initial est soumise au respect
+des conditions dans lesquelles le Titulaire a choisi de diffuser son
+oeuvre et nul autre n'a la faculté de modifier les conditions de
+diffusion de ce Logiciel Initial.
+
+Le Titulaire s'engage à ce que le Logiciel Initial reste au moins régi
+par le Contrat et ce, pour la durée visée à l'article 4.2.
+
+
+      6.2 SUR LES CONTRIBUTIONS
+
+Le Licencié qui a développé une Contribution est titulaire sur celle-ci
+des droits de propriété intellectuelle dans les conditions définies par
+la législation applicable.
+
+
+      6.3 SUR LES MODULES EXTERNES
+
+Le Licencié qui a développé un Module Externe est titulaire sur celui-ci
+des droits de propriété intellectuelle dans les conditions définies par
+la législation applicable et reste libre du choix du contrat régissant
+sa diffusion.
+
+
+      6.4 DISPOSITIONS COMMUNES
+
+Le Licencié s'engage expressément:
+
+   1. à ne pas supprimer ou modifier de quelque manière que ce soit les
+      mentions de propriété intellectuelle apposées sur le Logiciel;
+
+   2. à reproduire à l'identique lesdites mentions de propriété
+      intellectuelle sur les copies du Logiciel modifié ou non.
+
+Le Licencié s'engage à ne pas porter atteinte, directement ou
+indirectement, aux droits de propriété intellectuelle du Titulaire et/ou
+des Contributeurs sur le Logiciel et à prendre, le cas échéant, à
+l'égard de son personnel toutes les mesures nécessaires pour assurer le
+respect des dits droits de propriété intellectuelle du Titulaire et/ou
+des Contributeurs.
+
+
+    Article 7 - SERVICES ASSOCIES
+
+7.1 Le Contrat n'oblige en aucun cas le Concédant à la réalisation de
+prestations d'assistance technique ou de maintenance du Logiciel.
+
+Cependant le Concédant reste libre de proposer ce type de services. Les
+termes et conditions d'une telle assistance technique et/ou d'une telle
+maintenance seront alors déterminés dans un acte séparé. Ces actes de
+maintenance et/ou assistance technique n'engageront que la seule
+responsabilité du Concédant qui les propose.
+
+7.2 De même, tout Concédant est libre de proposer, sous sa seule
+responsabilité, à ses licenciés une garantie, qui n'engagera que lui,
+lors de la redistribution du Logiciel et/ou du Logiciel Modifié et ce,
+dans les conditions qu'il souhaite. Cette garantie et les modalités
+financières de son application feront l'objet d'un acte séparé entre le
+Concédant et le Licencié.
+
+
+    Article 8 - RESPONSABILITE
+
+8.1 Sous réserve des dispositions de l'article 8.2, le Licencié a la 
+faculté, sous réserve de prouver la faute du Concédant concerné, de
+solliciter la réparation du préjudice direct qu'il subirait du fait du
+Logiciel et dont il apportera la preuve.
+
+8.2 La responsabilité du Concédant est limitée aux engagements pris en
+application du Contrat et ne saurait être engagée en raison notamment:
+(i) des dommages dus à l'inexécution, totale ou partielle, de ses
+obligations par le Licencié, (ii) des dommages directs ou indirects
+découlant de l'utilisation ou des performances du Logiciel subis par le
+Licencié et (iii) plus généralement d'un quelconque dommage indirect. En
+particulier, les Parties conviennent expressément que tout préjudice
+financier ou commercial (par exemple perte de données, perte de
+bénéfices, perte d'exploitation, perte de clientèle ou de commandes,
+manque à gagner, trouble commercial quelconque) ou toute action dirigée
+contre le Licencié par un tiers, constitue un dommage indirect et
+n'ouvre pas droit à réparation par le Concédant.
+
+
+    Article 9 - GARANTIE
+
+9.1 Le Licencié reconnaît que l'état actuel des connaissances
+scientifiques et techniques au moment de la mise en circulation du
+Logiciel ne permet pas d'en tester et d'en vérifier toutes les
+utilisations ni de détecter l'existence d'éventuels défauts. L'attention
+du Licencié a été attirée sur ce point sur les risques associés au
+chargement, à l'utilisation, la modification et/ou au développement et à
+la reproduction du Logiciel qui sont réservés à des utilisateurs avertis.
+
+Il relève de la responsabilité du Licencié de contrôler, par tous
+moyens, l'adéquation du produit à ses besoins, son bon fonctionnement et
+de s'assurer qu'il ne causera pas de dommages aux personnes et aux biens.
+
+9.2 Le Concédant déclare de bonne foi être en droit de concéder
+l'ensemble des droits attachés au Logiciel (comprenant notamment les
+droits visés à l'article 5).
+
+9.3 Le Licencié reconnaît que le Logiciel est fourni "en l'état" par le
+Concédant sans autre garantie, expresse ou tacite, que celle prévue à
+l'article 9.2 et notamment sans aucune garantie sur sa valeur commerciale, 
+son caractère sécurisé, innovant ou pertinent.
+
+En particulier, le Concédant ne garantit pas que le Logiciel est exempt
+d'erreur, qu'il fonctionnera sans interruption, qu'il sera compatible
+avec l'équipement du Licencié et sa configuration logicielle ni qu'il
+remplira les besoins du Licencié.
+
+9.4 Le Concédant ne garantit pas, de manière expresse ou tacite, que le
+Logiciel ne porte pas atteinte à un quelconque droit de propriété
+intellectuelle d'un tiers portant sur un brevet, un logiciel ou sur tout
+autre droit de propriété. Ainsi, le Concédant exclut toute garantie au
+profit du Licencié contre les actions en contrefaçon qui pourraient être
+diligentées au titre de l'utilisation, de la modification, et de la
+redistribution du Logiciel. Néanmoins, si de telles actions sont
+exercées contre le Licencié, le Concédant lui apportera son aide
+technique et juridique pour sa défense. Cette aide technique et
+juridique est déterminée au cas par cas entre le Concédant concerné et
+le Licencié dans le cadre d'un protocole d'accord. Le Concédant dégage
+toute responsabilité quant à l'utilisation de la dénomination du
+Logiciel par le Licencié. Aucune garantie n'est apportée quant à
+l'existence de droits antérieurs sur le nom du Logiciel et sur
+l'existence d'une marque.
+
+
+    Article 10 - RESILIATION
+
+10.1 En cas de manquement par le Licencié aux obligations mises à sa
+charge par le Contrat, le Concédant pourra résilier de plein droit le
+Contrat trente (30) jours après notification adressée au Licencié et
+restée sans effet.
+
+10.2 Le Licencié dont le Contrat est résilié n'est plus autorisé à
+utiliser, modifier ou distribuer le Logiciel. Cependant, toutes les
+licences qu'il aura concédées antérieurement à la résiliation du Contrat
+resteront valides sous réserve qu'elles aient été effectuées en
+conformité avec le Contrat.
+
+
+    Article 11 - DISPOSITIONS DIVERSES
+
+
+      11.1 CAUSE EXTERIEURE
+
+Aucune des Parties ne sera responsable d'un retard ou d'une défaillance
+d'exécution du Contrat qui serait dû à un cas de force majeure, un cas
+fortuit ou une cause extérieure, telle que, notamment, le mauvais
+fonctionnement ou les interruptions du réseau électrique ou de
+télécommunication, la paralysie du réseau liée à une attaque
+informatique, l'intervention des autorités gouvernementales, les
+catastrophes naturelles, les dégâts des eaux, les tremblements de terre,
+le feu, les explosions, les grèves et les conflits sociaux, l'état de
+guerre...
+
+11.2 Le fait, par l'une ou l'autre des Parties, d'omettre en une ou
+plusieurs occasions de se prévaloir d'une ou plusieurs dispositions du
+Contrat, ne pourra en aucun cas impliquer renonciation par la Partie
+intéressée à s'en prévaloir ultérieurement.
+
+11.3 Le Contrat annule et remplace toute convention antérieure, écrite
+ou orale, entre les Parties sur le même objet et constitue l'accord
+entier entre les Parties sur cet objet. Aucune addition ou modification
+aux termes du Contrat n'aura d'effet à l'égard des Parties à moins
+d'être faite par écrit et signée par leurs représentants dûment habilités.
+
+11.4 Dans l'hypothèse où une ou plusieurs des dispositions du Contrat
+s'avèrerait contraire à une loi ou à un texte applicable, existants ou
+futurs, cette loi ou ce texte prévaudrait, et les Parties feraient les
+amendements nécessaires pour se conformer à cette loi ou à ce texte.
+Toutes les autres dispositions resteront en vigueur. De même, la
+nullité, pour quelque raison que ce soit, d'une des dispositions du
+Contrat ne saurait entraîner la nullité de l'ensemble du Contrat.
+
+
+      11.5 LANGUE
+
+Le Contrat est rédigé en langue française et en langue anglaise, ces
+deux versions faisant également foi.
+
+
+    Article 12 - NOUVELLES VERSIONS DU CONTRAT
+
+12.1 Toute personne est autorisée à copier et distribuer des copies de
+ce Contrat.
+
+12.2 Afin d'en préserver la cohérence, le texte du Contrat est protégé
+et ne peut être modifié que par les auteurs de la licence, lesquels se
+réservent le droit de publier périodiquement des mises à jour ou de
+nouvelles versions du Contrat, qui posséderont chacune un numéro
+distinct. Ces versions ultérieures seront susceptibles de prendre en
+compte de nouvelles problématiques rencontrées par les logiciels libres.
+
+12.3 Tout Logiciel diffusé sous une version donnée du Contrat ne pourra
+faire l'objet d'une diffusion ultérieure que sous la même version du
+Contrat ou une version postérieure, sous réserve des dispositions de
+l'article 5.3.4.
+
+
+    Article 13 - LOI APPLICABLE ET COMPETENCE TERRITORIALE
+
+13.1 Le Contrat est régi par la loi française. Les Parties conviennent
+de tenter de régler à l'amiable les différends ou litiges qui
+viendraient à se produire par suite ou à l'occasion du Contrat.
+
+13.2 A défaut d'accord amiable dans un délai de deux (2) mois à compter
+de leur survenance et sauf situation relevant d'une procédure d'urgence,
+les différends ou litiges seront portés par la Partie la plus diligente
+devant les Tribunaux compétents de Paris.
+
+
+Version 2.0 du 2006-09-05.
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/arch/arch-BG_FERMI.env
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/arch/arch-BG_FERMI.env	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/arch/arch-BG_FERMI.env	(revision 1749)
@@ -0,0 +1,8 @@
+module purge 
+module load profile/advanced
+module load bgq-xl/1.0 
+module load netcdf/4.1.3_par--bgq-xl--1.0
+module load hdf5/1.8.9_par--bgq-xl--1.0
+module load szip/2.1--bgq-xl--1.0
+module load zlib/1.2.7--bgq-gnu--4.4.6
+module load mass
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/arch/arch-BG_FERMI.fcm
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/arch/arch-BG_FERMI.fcm	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/arch/arch-BG_FERMI.fcm	(revision 1749)
@@ -0,0 +1,24 @@
+################################################################################
+###################                Projet XIOS               ###################
+################################################################################
+
+%CCOMPILER      mpixlc_r
+%FCOMPILER      mpixlf90_r
+%LINKER         mpixlf90_r
+
+%BASE_CFLAGS    
+%PROD_CFLAGS    -O3 -qarch=qp -qtune=qp
+%DEV_CFLAGS     
+%DEBUG_CFLAGS   
+
+%BASE_FFLAGS    -D__NONE__ 
+%PROD_FFLAGS    -O3 -qarch=qp -qtune=qp
+%DEV_FFLAGS     
+%DEBUG_FFLAGS   
+
+%BASE_INC       -D__NONE__
+%BASE_LD        -L/opt/ibmcmp/vacpp/bg/12.1/bglib64 -libmc++
+
+%CPP            mpixlc -EP
+%FPP            cpp -P
+%MAKE           make
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/arch/arch-BG_FERMI.path
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/arch/arch-BG_FERMI.path	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/arch/arch-BG_FERMI.path	(revision 1749)
@@ -0,0 +1,19 @@
+NETCDF_INCDIR="-I $NETCDF_INC"
+NETCDF_LIBDIR="-L $NETCDF_LIB"
+NETCDF_LIB="-lnetcdf"
+
+MPI_INCDIR=""
+MPI_LIBDIR=""
+MPI_LIB=""
+
+HDF5_INCDIR="-I$HDF5_INC"
+HDF5_LIBDIR="-L$HDF5_LIB -L$SZIP_LIB -L$ZLIB_LIB"
+HDF5_LIB="-lhdf5_hl -lhdf5 -lsz  -lz"
+
+OASIS_INCDIR="-I$PWD/../../oasis3-mct/BLD/build/lib/psmile.MPI1"
+OASIS_LIBDIR="-L$PWD/../../oasis3-mct/BLD/lib"
+OASIS_LIB="-lpsmile.MPI1 -lscrip -lmct -lmpeu"
+
+#only for MEMTRACK debuging : developper only
+ADDR2LINE_LIBDIR="-L${WORKDIR}/ADDR2LINE_LIB"
+ADDR2LINE_LIB="-laddr2line"
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/arch/arch-BG_TURING.env
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/arch/arch-BG_TURING.env	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/arch/arch-BG_TURING.env	(revision 1749)
@@ -0,0 +1,10 @@
+module load compilerwrappers/no
+module load netcdf/mpi/4.2.1
+module load hdf5/mpi/1.8.9
+
+export NETCDF_INC=/bglocal/cn/pub/NetCDF/4.2.1/mpi/include
+export NETCDF_LIB=/bglocal/cn/pub/NetCDF/4.2.1/mpi/lib
+
+export HDF5_INC=/bglocal/cn/pub/HDF5/1.8.9/par/include
+export HDF5_LIB=/bglocal/cn/pub/HDF5/1.8.9/par/lib
+export ZLIB=/bglocal/cn/pub/zlib/1.2.8/lib
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/arch/arch-BG_TURING.fcm
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/arch/arch-BG_TURING.fcm	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/arch/arch-BG_TURING.fcm	(revision 1749)
@@ -0,0 +1,24 @@
+################################################################################
+###################                Projet XIOS               ###################
+################################################################################
+
+%CCOMPILER      mpixlc_r
+%FCOMPILER      mpixlf90_r
+%LINKER         mpixlf90_r
+
+%BASE_CFLAGS    
+%PROD_CFLAGS    -O3 -qarch=qp -qtune=qp
+%DEV_CFLAGS     
+%DEBUG_CFLAGS   
+
+%BASE_FFLAGS    -D__NONE__ 
+%PROD_FFLAGS    -O3 -qarch=qp -qtune=qp
+%DEV_FFLAGS     
+%DEBUG_FFLAGS   
+
+%BASE_INC       -D__NONE__
+%BASE_LD        -L/opt/ibmcmp/vacpp/bg/12.1/bglib64 -libmc++
+
+%CPP            mpixlc -EP
+%FPP            cpp -P
+%MAKE           make
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/arch/arch-BG_TURING.path
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/arch/arch-BG_TURING.path	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/arch/arch-BG_TURING.path	(revision 1749)
@@ -0,0 +1,19 @@
+NETCDF_INCDIR="-I $NETCDF_INC"
+NETCDF_LIBDIR="-L $NETCDF_LIB"
+NETCDF_LIB="-lnetcdf"
+
+MPI_INCDIR=""
+MPI_LIBDIR=""
+MPI_LIB=""
+
+HDF5_INCDIR="-I$HDF5_INC"
+HDF5_LIBDIR="-L$HDF5_LIB -L$ZLIB"
+HDF5_LIB="-lhdf5_hl -lhdf5 -lz"
+
+OASIS_INCDIR="-I$PWD/../../oasis3-mct/BLD/build/lib/psmile.MPI1"
+OASIS_LIBDIR="-L$PWD/../../oasis3-mct/BLD/lib"
+OASIS_LIB="-lpsmile.MPI1 -lscrip -lmct -lmpeu"
+
+#only for MEMTRACK debuging : developper only
+ADDR2LINE_LIBDIR="-L${WORKDIR}/ADDR2LINE_LIB"
+ADDR2LINE_LIB="-laddr2line"
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/arch/arch-GCC_LINUX.env
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/arch/arch-GCC_LINUX.env	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/arch/arch-GCC_LINUX.env	(revision 1749)
@@ -0,0 +1,10 @@
+export HDF5_INC_DIR=$HOME/hdf5/hdf5/include
+export HDF5_LIB_DIR=$HOME/hdf5/hdf5/lib
+
+export NETCDF_INC_DIR=$HOME/netcdf4/include
+export NETCDF_LIB_DIR=$HOME/netcdf4/lib
+
+export BOOST_INC_DIR=$HOME/boost
+export BOOST_LIB_DIR=$HOME/boost
+
+
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/arch/arch-GCC_LINUX.fcm
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/arch/arch-GCC_LINUX.fcm	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/arch/arch-GCC_LINUX.fcm	(revision 1749)
@@ -0,0 +1,24 @@
+################################################################################
+###################                Projet XIOS               ###################
+################################################################################
+
+%CCOMPILER      mpicc
+%FCOMPILER      mpif90
+%LINKER         mpif90  
+
+%BASE_CFLAGS    -w -std=c++11 -D__XIOS_EXCEPTION
+%PROD_CFLAGS    -O3 -DBOOST_DISABLE_ASSERTS
+%DEV_CFLAGS     -g -O2 
+%DEBUG_CFLAGS   -g 
+
+%BASE_FFLAGS    -D__NONE__ 
+%PROD_FFLAGS    -O3
+%DEV_FFLAGS     -g -O2
+%DEBUG_FFLAGS   -g 
+
+%BASE_INC       -D__NONE__
+%BASE_LD        -lstdc++
+
+%CPP            cpp
+%FPP            cpp -P
+%MAKE           gmake
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/arch/arch-GCC_LINUX.path
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/arch/arch-GCC_LINUX.path	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/arch/arch-GCC_LINUX.path	(revision 1749)
@@ -0,0 +1,19 @@
+NETCDF_INCDIR="-I $NETCDF_INC_DIR"
+NETCDF_LIBDIR="-L $NETCDF_LIB_DIR"
+NETCDF_LIB="-lnetcdff -lnetcdf"
+
+MPI_INCDIR=""
+MPI_LIBDIR=""
+MPI_LIB="-lcurl"
+
+HDF5_INCDIR="-I $HDF5_INC_DIR"
+HDF5_LIBDIR="-L $HDF5_LIB_DIR"
+HDF5_LIB="-lhdf5_hl -lhdf5 -lhdf5 -lz"
+
+BOOST_INCDIR="-I $BOOST_INC_DIR"
+BOOST_LIBDIR="-L $BOOST_LIB_DIR"
+BOOST_LIB=""
+
+OASIS_INCDIR="-I$PWD/../../oasis3-mct/BLD/build/lib/psmile.MPI1"
+OASIS_LIBDIR="-L$PWD/../../oasis3-mct/BLD/lib"
+OASIS_LIB="-lpsmile.MPI1 -lscrip -lmct -lmpeu"
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/arch/arch-GCC_MACOSX.env
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/arch/arch-GCC_MACOSX.env	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/arch/arch-GCC_MACOSX.env	(revision 1749)
@@ -0,0 +1,14 @@
+# Environment to compile XIOS on Mac OS X
+#
+# Tested successfully with :
+#   Mac OS X 10.7.4
+#   Prerequisite softwares installed with MacPorts :
+#     gfortran       :  4.6.0
+#     openmpi        : 1.6.3_0  variant  +gcc45
+#     netcdf         : 4.2.1    variant : +dap+netcdf4+openmpi (includes hdf5)
+#
+# Olivier Marti - olivier.marti(ad)lsce.ipsl.fr
+#
+export NETCDF_DIR=/opt/local
+export NETCDF_INC_DIR=${NETCDF_DIR}/include
+export NETCDF_LIB_DIR=${NETCDF_DIR}/lib
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/arch/arch-GCC_MACOSX.fcm
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/arch/arch-GCC_MACOSX.fcm	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/arch/arch-GCC_MACOSX.fcm	(revision 1749)
@@ -0,0 +1,25 @@
+################################################################################
+###################                Projet XIOS               ###################
+################################################################################
+
+%CCOMPILER      mpiCC
+%FCOMPILER      mpif90
+%LINKER         mpif90
+
+%BASE_CFLAGS    -w
+%PROD_CFLAGS    -O3 -D BOOST_DISABLE_ASSERTS
+%DEV_CFLAGS     -g
+%DEBUG_CFLAGS   -g -O2
+
+%BASE_FFLAGS    -D__NONE__
+%PROD_FFLAGS    -O3
+%DEV_FFLAGS     -g -O2
+%DEBUG_FFLAGS   -g
+
+%BASE_INC       -D__NONE__
+%BASE_LD        -lstdc++
+
+%CPP            /opt/local/bin/cpp-mp-4.5
+%FPP            /opt/local/bin/cpp-mp-4.5 -P
+%MAKE           gmake
+
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/arch/arch-GCC_MACOSX.path
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/arch/arch-GCC_MACOSX.path	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/arch/arch-GCC_MACOSX.path	(revision 1749)
@@ -0,0 +1,11 @@
+NETCDF_INCDIR="-I${NETCDF_INC_DIR}"
+NETCDF_LIBDIR="-L${NETCDF_LIB_DIR}"
+NETCDF_LIB="-lnetcdff -lnetcdf"
+
+HDF5_INCDIR=""
+HDF5_LIBDIR=""
+HDF5_LIB=""
+
+OASIS_INCDIR="-I$PWD/../../oasis3-mct/BLD/build/lib/psmile.MPI1"
+OASIS_LIBDIR="-L$PWD/../../oasis3-mct/BLD/lib"
+OASIS_LIB="-lpsmile.MPI1 -lscrip -lmct -lmpeu"
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/arch/arch-PW6_VARGAS.env
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/arch/arch-PW6_VARGAS.env	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/arch/arch-PW6_VARGAS.env	(revision 1749)
@@ -0,0 +1,7 @@
+module unload netcdf
+module unload hdf5
+module unload phdf5
+module load phdf5/1.8.7
+module load netcdf/4.1.3-par
+module unload c++
+module load c++/12.1.0.0 
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/arch/arch-PW6_VARGAS.fcm
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/arch/arch-PW6_VARGAS.fcm	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/arch/arch-PW6_VARGAS.fcm	(revision 1749)
@@ -0,0 +1,24 @@
+################################################################################
+###################                Projet XIOS               ###################
+################################################################################
+
+%CCOMPILER      mpCC_r
+%FCOMPILER      mpxlf2003_r
+%LINKER         mpCC_r 
+
+%BASE_CFLAGS    -qmkshrobj  -qrtti 
+%PROD_CFLAGS    -O3 -DBOOST_DISABLE_ASSERTS
+%DEV_CFLAGS     -g 
+%DEBUG_CFLAGS   -g -O0 -qfullpath 
+
+%BASE_FFLAGS    -qmkshrobj 
+%PROD_FFLAGS    -O3
+%DEV_FFLAGS     -g 
+%DEBUG_FFLAGS   -g -O0 -qfullpath 
+
+%BASE_INC       -D__NONE__
+%BASE_LD        -lxlf90
+
+%CPP            cpp
+%FPP            cpp -P
+%MAKE           gmake
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/arch/arch-PW6_VARGAS.path
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/arch/arch-PW6_VARGAS.path	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/arch/arch-PW6_VARGAS.path	(revision 1749)
@@ -0,0 +1,15 @@
+NETCDF_INCDIR=""
+NETCDF_LIBDIR=""
+NETCDF_LIB=""
+
+HDF5_INCDIR=""
+HDF5_LIBDIR=""
+HDF5_LIB=""
+
+MPI_INCDIR=""
+MPI_LIBDIR=""
+MPI_LIB=""
+
+OASIS_INCDIR="-I$PWD/../../oasis3-mct/BLD/build/lib/psmile.MPI1"
+OASIS_LIBDIR="-L$PWD/../../oasis3-mct/BLD/lib"
+OASIS_LIB="-lpsmile.MPI1 -lscrip -lmct -lmpeu"
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/arch/arch-X64_ADA.env
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/arch/arch-X64_ADA.env	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/arch/arch-X64_ADA.env	(revision 1749)
@@ -0,0 +1,6 @@
+module load gcc/6.4.0
+module load  intel/2018.2
+module unload netcdf
+module unload hdf5
+#module load netcdf/mpi/4.1.3
+#module load hdf5/mpi/1.8.9
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/arch/arch-X64_ADA.fcm
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/arch/arch-X64_ADA.fcm	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/arch/arch-X64_ADA.fcm	(revision 1749)
@@ -0,0 +1,24 @@
+################################################################################
+###################                Projet XIOS               ###################
+################################################################################
+
+%CCOMPILER      mpiicc
+%FCOMPILER      mpiifort 
+%LINKER         mpiifort  -nofor-main
+
+%BASE_CFLAGS    -std=c++11 -diag-disable 1125 -diag-disable 279 -D__XIOS_EXCEPTION
+%PROD_CFLAGS    -O3 -D BOOST_DISABLE_ASSERTS
+%DEV_CFLAGS     -g -traceback
+%DEBUG_CFLAGS   -DBZ_DEBUG -g -traceback -fno-inline
+
+%BASE_FFLAGS    -D__NONE__ 
+%PROD_FFLAGS    -O3
+%DEV_FFLAGS     -g -O2 -traceback
+%DEBUG_FFLAGS   -g -traceback
+
+%BASE_INC       -D__NONE__
+%BASE_LD        -lstdc++ -Wl,-rpath=/smplocal/pub/NetCDF/4.1.3/mpi/lib:/smplocal/pub/HDF5/1.8.9/par/lib
+
+%CPP            mpiicc -EP
+%FPP            cpp -P
+%MAKE           gmake
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/arch/arch-X64_ADA.path
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/arch/arch-X64_ADA.path	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/arch/arch-X64_ADA.path	(revision 1749)
@@ -0,0 +1,15 @@
+NETCDF_INCDIR="-I/smplocal/pub/NetCDF/4.1.3/mpi/include"
+NETCDF_LIBDIR="-L/smplocal/pub/NetCDF/4.1.3/mpi/lib"
+NETCDF_LIB="-lnetcdff -lnetcdf"
+
+MPI_INCDIR=""
+MPI_LIBDIR=""
+MPI_LIB=""
+
+HDF5_INCDIR="-I/smplocal/pub/HDF5/1.8.9/par/include"
+HDF5_LIBDIR="-L/smplocal/pub/HDF5/1.8.9/par/lib"
+HDF5_LIB="-lhdf5_hl -lhdf5 -lhdf5 -lz"
+
+OASIS_INCDIR="-I$PWD/../../oasis3-mct/BLD/build/lib/psmile.MPI1"
+OASIS_LIBDIR="-L$PWD/../../oasis3-mct/BLD/lib"
+OASIS_LIB="-lpsmile.MPI1 -lscrip -lmct -lmpeu"
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/arch/arch-X64_ATHENA.env
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/arch/arch-X64_ATHENA.env	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/arch/arch-X64_ATHENA.env	(revision 1749)
@@ -0,0 +1,15 @@
+# Environment to compile XIOS on Athena 
+#
+#   Prerequisite softwares installed with 
+#
+module load INTEL/intel_xe_2013
+module load HDF5/hdf5-1.8.11_parallel
+module load NETCDF/netcdf-4.3_parallel
+module load NETCDF/parallel-netcdf-1.3.1
+
+#export NETCDF_DIR=${NETCDF}
+#export PNETCDF_DIR=${PNETCDF}
+export NETCDF_DIR=/users/home/opt/netcdf/netcdf-4.3_parallel
+export PNETCDF_DIR=/users/home/opt/netcdf/parallel-netcdf-1.3.1
+export HDF5_DIR=/users/home/opt/hdf5/hdf5-1.8.11_parallel
+
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/arch/arch-X64_ATHENA.fcm
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/arch/arch-X64_ATHENA.fcm	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/arch/arch-X64_ATHENA.fcm	(revision 1749)
@@ -0,0 +1,26 @@
+################################################################################
+###################                Projet XIOS               ###################
+################################################################################
+
+%CCOMPILER      mpiicc
+%FCOMPILER      mpiifort
+%LINKER         mpiifort -nofor-main
+
+%BASE_CFLAGS    -diag-disable 1125 -diag-disable 279
+%PROD_CFLAGS    -O3 -D BOOST_DISABLE_ASSERTS
+%DEV_CFLAGS     -g -traceback
+%DEBUG_CFLAGS   -DBZ_DEBUG -g -traceback -fno-inline
+
+%BASE_FFLAGS    -D__NONE__
+%PROD_FFLAGS    -O3
+%DEV_FFLAGS     -g -O2 -traceback
+%DEBUG_FFLAGS   -g -traceback
+
+%BASE_INC       -D__NONE__
+%BASE_LD        -lstdc++ -lz -lcurl -Wl -lgpfs
+
+%CPP            mpiicc -EP
+%FPP            cpp -P
+%MAKE           gmake
+
+
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/arch/arch-X64_ATHENA.path
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/arch/arch-X64_ATHENA.path	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/arch/arch-X64_ATHENA.path	(revision 1749)
@@ -0,0 +1,12 @@
+NETCDF_INCDIR="-I${NETCDF_DIR}/include -I${PNETCDF_DIR}/include"
+NETCDF_LIBDIR="-L${NETCDF_DIR}/lib -L${PNETCDF_DIR}/lib"
+NETCDF_LIB="-L${NETCDF_DIR}/lib -lnetcdff -L${NETCDF_DIR}/lib -lnetcdf -L${PNETCDF_DIR}/lib -lpnetcdf"
+
+HDF5_INCDIR="-I${HDF5_DIR}/include"
+HDF5_LIBDIR="-L${HDF5_DIR}/lib"
+HDF5_LIB="-L${HDF5_DIR}/lib -lhdf5_hl -L${HDF5_DIR}/lib -lhdf5"
+
+OASIS_INCDIR=""
+OASIS_LIBDIR=""
+OASIS_LIB=""
+
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/arch/arch-X64_CURIE.env
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/arch/arch-X64_CURIE.env	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/arch/arch-X64_CURIE.env	(revision 1749)
@@ -0,0 +1,6 @@
+module unload netcdf
+module unload hdf5
+module unload boost
+module load netcdf/4.3.3.1_hdf5_parallel
+module load boost
+module load blitz
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/arch/arch-X64_CURIE.fcm
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/arch/arch-X64_CURIE.fcm	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/arch/arch-X64_CURIE.fcm	(revision 1749)
@@ -0,0 +1,26 @@
+################################################################################
+###################                Projet XIOS               ###################
+################################################################################
+
+%CCOMPILER      mpicc
+%FCOMPILER      mpif90
+%LINKER         mpif90  -nofor-main
+
+%BASE_CFLAGS    -std=c++11 -diag-disable 1125 -diag-disable 279
+%PROD_CFLAGS    -O3 -D BOOST_DISABLE_ASSERTS
+#%DEV_CFLAGS     -g -traceback
+%DEV_CFLAGS     -g 
+%DEBUG_CFLAGS   -DBZ_DEBUG -g -traceback -fno-inline
+
+%BASE_FFLAGS    -D__NONE__ 
+%PROD_FFLAGS    -O3
+#%DEV_FFLAGS     -g -traceback
+%DEV_FFLAGS     -g 
+%DEBUG_FFLAGS   -g -traceback
+
+%BASE_INC       -D__NONE__
+%BASE_LD        -lstdc++
+
+%CPP            mpicc -EP
+%FPP            cpp -P
+%MAKE           gmake
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/arch/arch-X64_CURIE.path
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/arch/arch-X64_CURIE.path	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/arch/arch-X64_CURIE.path	(revision 1749)
@@ -0,0 +1,27 @@
+NETCDF_INCDIR="-I $NETCDF_INCDIR"
+NETCDF_LIBDIR="-L $NETCDF_LIBDIR"
+NETCDF_LIB="-lnetcdf -lnetcdff"
+
+MPI_INCDIR=""
+MPI_LIBDIR=""
+MPI_LIB=""
+
+HDF5_INCDIR=""
+HDF5_LIBDIR=""
+HDF5_LIB="-lhdf5_hl -lhdf5 -lz -lcurl"
+
+BOOST_INCDIR="-I $BOOST_INCDIR"
+BOOST_LIBDIR="-L $BOOST_LIBDIR"
+BOOST_LIB=""
+
+BLITZ_INCDIR="-I $BLITZ_INCDIR"
+BLITZ_LIBDIR="-L $BLITZ_LIBDIR"
+BLITZ_LIB=""
+
+OASIS_INCDIR="-I$PWD/../../oasis3-mct/BLD/build/lib/psmile.MPI1"
+OASIS_LIBDIR="-L$PWD/../../oasis3-mct/BLD/lib"
+OASIS_LIB="-lpsmile.MPI1 -lscrip -lmct -lmpeu"
+
+#only for MEMTRACK debuging : developper only
+ADDR2LINE_LIBDIR="-L${WORKDIR}/ADDR2LINE_LIB"
+ADDR2LINE_LIB="-laddr2line"
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/arch/arch-X64_CURIE_GCC.env
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/arch/arch-X64_CURIE_GCC.env	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/arch/arch-X64_CURIE_GCC.env	(revision 1749)
@@ -0,0 +1,12 @@
+module unload netcdf
+module unload hdf5
+module unload boost
+module unload blitz
+module load netcdf/4.3.3.1_hdf5_parallel
+module load gnu/4.9.1
+module load boost
+module load blitz
+export OMPI_CC=gcc
+export OMPI_CXX=g++
+export OMPI_F77=gfortran
+export OMPI_FC=gfortran
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/arch/arch-X64_CURIE_GCC.fcm
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/arch/arch-X64_CURIE_GCC.fcm	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/arch/arch-X64_CURIE_GCC.fcm	(revision 1749)
@@ -0,0 +1,24 @@
+################################################################################
+###################                Projet XIOS               ###################
+################################################################################
+
+%CCOMPILER      mpicc
+%FCOMPILER      mpif90
+%LINKER         mpif90  
+
+%BASE_CFLAGS    -std=c++11 -w
+%PROD_CFLAGS    -O3 -D BOOST_DISABLE_ASSERTS
+%DEV_CFLAGS     -g -O2
+%DEBUG_CFLAGS   -g 
+
+%BASE_FFLAGS    -D__NONE__ -ffree-line-length-none
+%PROD_FFLAGS    -O3
+%DEV_FFLAGS     -g -O2 
+%DEBUG_FFLAGS   -g 
+
+%BASE_INC       -D__NONE__
+%BASE_LD        -lstdc++
+
+%CPP            cpp
+%FPP            cpp -P
+%MAKE           gmake
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/arch/arch-X64_CURIE_GCC.path
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/arch/arch-X64_CURIE_GCC.path	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/arch/arch-X64_CURIE_GCC.path	(revision 1749)
@@ -0,0 +1,23 @@
+NETCDF_INCDIR="-I $NETCDF_INCDIR"
+NETCDF_LIBDIR="-L $NETCDF_LIBDIR"
+NETCDF_LIB="-lnetcdf"
+
+MPI_INCDIR=""
+MPI_LIBDIR=""
+MPI_LIB=""
+
+HDF5_INCDIR=""
+HDF5_LIBDIR=""
+HDF5_LIB=""
+
+BOOST_INCDIR="-I $BOOST_INCDIR"
+BOOST_LIBDIR="-L $BOOST_LIBDIR"
+BOOST_LIB=""
+
+BLITZ_INCDIR="-I $BLITZ_INCDIR"
+BLITZ_LIBDIR="-L $BLITZ_LIBDIR"
+BLITZ_LIB=""
+
+OASIS_INCDIR="-I$PWD/../../oasis3-mct/BLD/build/lib/psmile.MPI1"
+OASIS_LIBDIR="-L$PWD/../../oasis3-mct/BLD/lib"
+OASIS_LIB="-lpsmile.MPI1 -lscrip -lmct -lmpeu"
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/arch/arch-X64_CURIE_PGI.env
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/arch/arch-X64_CURIE_PGI.env	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/arch/arch-X64_CURIE_PGI.env	(revision 1749)
@@ -0,0 +1,16 @@
+module load netcdf/4.3.3.1_hdf5_parallel
+#module unload intel
+module unload pgi
+module unload gnu
+module unload boost
+module unload blitz
+module load pgi/14.10
+module load boost
+module load blitz
+
+
+
+export OMPI_CC=pgcc
+export OMPI_CXX=pgcpp
+export OMPI_F77=pgf77
+export OMPI_FC=pgf95
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/arch/arch-X64_CURIE_PGI.fcm
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/arch/arch-X64_CURIE_PGI.fcm	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/arch/arch-X64_CURIE_PGI.fcm	(revision 1749)
@@ -0,0 +1,24 @@
+################################################################################
+###################                Projet XIOS               ###################
+################################################################################
+
+%CCOMPILER      mpicxx -noswitcherror
+%FCOMPILER      mpif90 -noswitcherror
+%LINKER         mpif90 -noswitcherror
+
+%BASE_CFLAGS    c++11 -D__NONE__
+%PROD_CFLAGS    -O3 -D BOOST_DISABLE_ASSERTS
+%DEV_CFLAGS     -g -O2
+%DEBUG_CFLAGS   -g 
+
+%BASE_FFLAGS    -D__NONE__
+%PROD_FFLAGS    -O3
+%DEV_FFLAGS     -g -O2 
+%DEBUG_FFLAGS   -g 
+
+%BASE_INC       -D__NONE__
+%BASE_LD        -pgcpplibs
+
+%CPP            cpp
+%FPP            cpp -P
+%MAKE           gmake
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/arch/arch-X64_CURIE_PGI.path
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/arch/arch-X64_CURIE_PGI.path	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/arch/arch-X64_CURIE_PGI.path	(revision 1749)
@@ -0,0 +1,23 @@
+NETCDF_INCDIR="-I $NETCDF_INCDIR"
+NETCDF_LIBDIR="-L $NETCDF_LIBDIR"
+NETCDF_LIB="-lnetcdf"
+
+MPI_INCDIR=""
+MPI_LIBDIR=""
+MPI_LIB=""
+
+HDF5_INCDIR=""
+HDF5_LIBDIR=""
+HDF5_LIB=""
+
+BOOST_INCDIR="-I $BOOST_INCDIR"
+BOOST_LIBDIR="-L $BOOST_LIBDIR"
+BOOST_LIB=""
+
+BLITZ_INCDIR="-I $BLITZ_INCDIR"
+BLITZ_LIBDIR="-L $BLITZ_LIBDIR"
+BLITZ_LIB=""
+
+OASIS_INCDIR="-I$PWD/../../oasis3-mct/BLD/build/lib/psmile.MPI1"
+OASIS_LIBDIR="-L$PWD/../../oasis3-mct/BLD/lib"
+OASIS_LIB="-lpsmile.MPI1 -lscrip -lmct -lmpeu"
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/arch/arch-X64_CURIE_VAMPIR.env
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/arch/arch-X64_CURIE_VAMPIR.env	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/arch/arch-X64_CURIE_VAMPIR.env	(revision 1749)
@@ -0,0 +1,5 @@
+module unload netcdf
+module unload hdf5
+module unload vampir
+module load vampir/8.2.1
+module load netcdf/4.3.3.1_hdf5_parallel
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/arch/arch-X64_CURIE_VAMPIR.fcm
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/arch/arch-X64_CURIE_VAMPIR.fcm	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/arch/arch-X64_CURIE_VAMPIR.fcm	(revision 1749)
@@ -0,0 +1,23 @@
+################################################################################
+###################                Projet XIOS               ###################
+################################################################################
+
+%CCOMPILER      vtcc  -vt:cc mpicc -vt:inst manual -DVTRACE
+%FCOMPILER      vtf90 -vt:f90 mpif90 -vt:inst manual -DVTRACE
+%LINKER         vtf90  -vt:f90 mpif90 -vt:inst manual -nofor-main -DVTRACE
+%BASE_CFLAGS    -std=c++11 -diag-disable 1125 -diag-disable 279
+%PROD_CFLAGS    -O3 -D BOOST_DISABLE_ASSERTS
+%DEV_CFLAGS     -g -traceback
+%DEBUG_CFLAGS   -DBZ_DEBUG -g -traceback -fno-inline
+
+%BASE_FFLAGS    -D__NONE__ 
+%PROD_FFLAGS    -O3
+%DEV_FFLAGS     -g -O2 -traceback
+%DEBUG_FFLAGS   -g -traceback
+
+%BASE_INC       -D__NONE__
+%BASE_LD        -lstdc++
+
+%CPP            cpp
+%FPP            cpp -P
+%MAKE           gmake
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/arch/arch-X64_CURIE_VAMPIR.path
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/arch/arch-X64_CURIE_VAMPIR.path	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/arch/arch-X64_CURIE_VAMPIR.path	(revision 1749)
@@ -0,0 +1,15 @@
+NETCDF_INCDIR="-I $NETCDF_INCDIR"
+NETCDF_LIBDIR="-L$NETCDF_LIBDIR"
+NETCDF_LIB="-lnetcdf"
+
+MPI_INCDIR=""
+MPI_LIBDIR=""
+MPI_LIB=""
+
+HDF5_INCDIR=""
+HDF5_LIBDIR=""
+HDF5_LIB="-lhdf5_hl -lhdf5 -lz -lcurl"
+
+OASIS_INCDIR="-I$PWD/../../oasis3-mct/BLD/build/lib/psmile.MPI1"
+OASIS_LIBDIR="-L$PWD/../../oasis3-mct/BLD/lib"
+OASIS_LIB="-lpsmile.MPI1 -lscrip -lmct -lmpeu"
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/arch/arch-X64_HORUS.env
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/arch/arch-X64_HORUS.env	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/arch/arch-X64_HORUS.env	(revision 1749)
@@ -0,0 +1,6 @@
+export HDF5_INC_DIR=$HOME/hdf5/include
+export HDF5_LIB_DIR=$HOME/hdf5/lib
+
+export NETCDF_INC_DIR=$HOME/netcdf4/include
+export NETCDF_LIB_DIR=$HOME/netcdf4/lib
+
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/arch/arch-X64_HORUS.fcm
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/arch/arch-X64_HORUS.fcm	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/arch/arch-X64_HORUS.fcm	(revision 1749)
@@ -0,0 +1,24 @@
+################################################################################
+###################                Projet XIOS               ###################
+################################################################################
+
+%CCOMPILER      mpicc
+%FCOMPILER      mpif90
+%LINKER         mpif90  
+
+%BASE_CFLAGS    -w
+%PROD_CFLAGS    -O3 -DBOOST_DISABLE_ASSERTS
+%DEV_CFLAGS     -g -O2 
+%DEBUG_CFLAGS   -g 
+
+%BASE_FFLAGS    -D__NONE__ 
+%PROD_FFLAGS    -O3
+%DEV_FFLAGS     -g -O2
+%DEBUG_FFLAGS   -g 
+
+%BASE_INC       -D__NONE__
+%BASE_LD        -lstdc++
+
+%CPP            cpp
+%FPP            cpp -P
+%MAKE           gmake
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/arch/arch-X64_HORUS.path
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/arch/arch-X64_HORUS.path	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/arch/arch-X64_HORUS.path	(revision 1749)
@@ -0,0 +1,15 @@
+NETCDF_INCDIR="-I $NETCDF_INC_DIR"
+NETCDF_LIBDIR="-L $NETCDF_LIB_DIR"
+NETCDF_LIB="-lnetcdff -lnetcdf"
+
+MPI_INCDIR=""
+MPI_LIBDIR=""
+MPI_LIB=""
+
+HDF5_INCDIR="-I $HDF5_INC_DIR"
+HDF5_LIBDIR="-L $HDF5_LIB_DIR"
+HDF5_LIB="-lhdf5_hl -lhdf5 -lhdf5 -lz"
+
+OASIS_INCDIR="-I$PWD/../../oasis3-mct/BLD/build/lib/psmile.MPI1"
+OASIS_LIBDIR="-L$PWD/../../oasis3-mct/BLD/lib"
+OASIS_LIB="-lpsmile.MPI1 -lscrip -lmct -lmpeu"
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/arch/arch-X64_IRENE-ITAC.env
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/arch/arch-X64_IRENE-ITAC.env	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/arch/arch-X64_IRENE-ITAC.env	(revision 1749)
@@ -0,0 +1,11 @@
+module purge
+module load itac/2019.0.018 
+module load gnu
+module load feature/bridge/heterogenous_mpmd
+export NETCDFC_INCDIR=$WORKDIR/NETCDF4_HDF5/HDF5_1.10.5_INTEL/include
+export NETCDFFORTRAN_INCDIR=$WORKDIR/NETCDF4_HDF5/HDF5_1.10.5_INTEL/include
+export HDF5_INCDIR=$WORKDIR/NETCDF4_HDF5/HDF5_1.10.5_INTEL/include
+export NETCDFC_LIBDIR=$WORKDIR/NETCDF4_HDF5/HDF5_1.10.5_INTEL/lib
+export NETCDFFORTRAN_LIBDIR=$WORKDIR/NETCDF4_HDF5/HDF5_1.10.5_INTEL/lib
+export HDF5_LIBDIR=$WORKDIR/NETCDF4_HDF5/HDF5_1.10.5_INTEL/lib
+source itacvars.sh 
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/arch/arch-X64_IRENE-ITAC.fcm
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/arch/arch-X64_IRENE-ITAC.fcm	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/arch/arch-X64_IRENE-ITAC.fcm	(revision 1749)
@@ -0,0 +1,26 @@
+################################################################################
+###################                Projet XIOS               ###################
+################################################################################
+
+%CCOMPILER      mpicc -trace -DITAC -I$ITAC_INCDIR
+%FCOMPILER      mpif90 -trace
+%LINKER         mpif90 -trace -nofor-main -L$ITAC_LIBDIR
+
+%BASE_CFLAGS    -std=c++11 -diag-disable 1125 -diag-disable 279
+%PROD_CFLAGS    -g -Ofast -xHost -D BOOST_DISABLE_ASSERTS 
+#%DEV_CFLAGS     -g -traceback
+%DEV_CFLAGS     -g 
+%DEBUG_CFLAGS   -DBZ_DEBUG -g -traceback -fno-inline
+
+%BASE_FFLAGS    -D__NONE__ 
+%PROD_FFLAGS    -O3 -g -traceback
+#%DEV_FFLAGS     -g -traceback
+%DEV_FFLAGS     -g 
+%DEBUG_FFLAGS   -g -traceback
+
+%BASE_INC       -D__NONE__
+%BASE_LD        -lstdc++
+
+%CPP            mpicc -EP
+%FPP            cpp -P
+%MAKE           gmake
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/arch/arch-X64_IRENE-ITAC.path
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/arch/arch-X64_IRENE-ITAC.path	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/arch/arch-X64_IRENE-ITAC.path	(revision 1749)
@@ -0,0 +1,28 @@
+NETCDF_INCDIR="-I $NETCDFC_INCDIR -I $NETCDFFORTRAN_INCDIR"
+NETCDF_LIBDIR="-L $NETCDFC_LIBDIR -L $NETCDFFORTRAN_LIBDIR"
+NETCDF_LIB="-lnetcdf -lnetcdff"
+
+MPI_INCDIR=""
+MPI_LIBDIR=""
+MPI_LIB=""
+
+HDF5_INCDIR="-I$HDF5_INCDIR"
+HDF5_LIBDIR="-L$HDF5_LIBDIR"
+HDF5_LIB="-lhdf5_hl -lhdf5 -lz -lcurl"
+
+BOOST_INCDIR="-I $BOOST_INCDIR"
+BOOST_LIBDIR="-L $BOOST_LIBDIR"
+BOOST_LIB=""
+
+BLITZ_INCDIR="-I $BLITZ_INCDIR"
+BLITZ_LIBDIR="-L $BLITZ_LIBDIR"
+BLITZ_LIB=""
+
+OASIS_INCDIR="-I$PWD/../../oasis3-mct/BLD/build/lib/psmile.MPI1"
+OASIS_LIBDIR="-L$PWD/../../oasis3-mct/BLD/lib"
+OASIS_LIB="-lpsmile.MPI1 -lscrip -lmct -lmpeu"
+
+
+#only for MEMTRACK debuging : developper only
+ADDR2LINE_LIBDIR="-L${WORKDIR}/ADDR2LINE_LIB"
+ADDR2LINE_LIB="-laddr2line"
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/arch/arch-X64_IRENE-SCOREP.env
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/arch/arch-X64_IRENE-SCOREP.env	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/arch/arch-X64_IRENE-SCOREP.env	(revision 1749)
@@ -0,0 +1,15 @@
+module purge
+module load intel/19.0.2.187
+module load gnu
+module load mpi/openmpi/2.0.4
+module load flavor/hdf5/parallel
+module load hdf5/1.8.20
+module load netcdf-c/4.6.0
+module load netcdf-fortran/4.4.4
+module load feature/bridge/heterogenous_mpmd
+module load scorep/4.1 
+module load vampir
+export SCOREP_ENABLE_TRACING=true
+export SCOREP_ENABLE_PROFILING=false
+
+
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/arch/arch-X64_IRENE-SCOREP.fcm
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/arch/arch-X64_IRENE-SCOREP.fcm	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/arch/arch-X64_IRENE-SCOREP.fcm	(revision 1749)
@@ -0,0 +1,26 @@
+################################################################################
+###################                Projet XIOS               ###################
+################################################################################
+
+%CCOMPILER      scorep --nocompiler --nomemory --mpp=mpi --user mpicc -DSCOREP
+%FCOMPILER      scorep --nocompiler --nomemory --mpp=mpi --user mpif90 -DSCOREP
+%LINKER         scorep --nocompiler --nomemory --mpp=mpi --user mpif90 -DSCOREP -nofor-main
+
+%BASE_CFLAGS    -std=c++11 -diag-disable 1125 -diag-disable 279
+%PROD_CFLAGS    -Ofast -xHost -D BOOST_DISABLE_ASSERTS 
+#%DEV_CFLAGS     -g -traceback
+%DEV_CFLAGS     -g 
+%DEBUG_CFLAGS   -DBZ_DEBUG -g -traceback -fno-inline
+
+%BASE_FFLAGS    -D__NONE__ 
+%PROD_FFLAGS    -O3 -g -traceback
+#%DEV_FFLAGS     -g -traceback
+%DEV_FFLAGS     -g 
+%DEBUG_FFLAGS   -g -traceback
+
+%BASE_INC       -D__NONE__
+%BASE_LD        -lstdc++
+
+%CPP            mpicc -EP
+%FPP            cpp -P
+%MAKE           gmake
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/arch/arch-X64_IRENE-SCOREP.path
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/arch/arch-X64_IRENE-SCOREP.path	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/arch/arch-X64_IRENE-SCOREP.path	(revision 1749)
@@ -0,0 +1,28 @@
+NETCDF_INCDIR="-I $NETCDFC_INCDIR -I $NETCDFFORTRAN_INCDIR"
+NETCDF_LIBDIR="-L $NETCDFC_LIBDIR -L $NETCDFFORTRAN_LIBDIR"
+NETCDF_LIB="-lnetcdf -lnetcdff"
+
+MPI_INCDIR=""
+MPI_LIBDIR=""
+MPI_LIB=""
+
+HDF5_INCDIR="-I$HDF5_INCDIR"
+HDF5_LIBDIR="-L$HDF5_LIBDIR"
+HDF5_LIB="-lhdf5_hl -lhdf5 -lz -lcurl"
+
+BOOST_INCDIR="-I $BOOST_INCDIR"
+BOOST_LIBDIR="-L $BOOST_LIBDIR"
+BOOST_LIB=""
+
+BLITZ_INCDIR="-I $BLITZ_INCDIR"
+BLITZ_LIBDIR="-L $BLITZ_LIBDIR"
+BLITZ_LIB=""
+
+OASIS_INCDIR="-I$PWD/../../oasis3-mct/BLD/build/lib/psmile.MPI1"
+OASIS_LIBDIR="-L$PWD/../../oasis3-mct/BLD/lib"
+OASIS_LIB="-lpsmile.MPI1 -lscrip -lmct -lmpeu"
+
+
+#only for MEMTRACK debuging : developper only
+ADDR2LINE_LIBDIR="-L${WORKDIR}/ADDR2LINE_LIB"
+ADDR2LINE_LIB="-laddr2line"
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/arch/arch-X64_IRENE.env
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/arch/arch-X64_IRENE.env	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/arch/arch-X64_IRENE.env	(revision 1749)
@@ -0,0 +1,8 @@
+module unload netcdf-c netcdf-fortran hdf5 flavor perl hdf5 boost blitz mpi gnu
+module load flavor/hdf5/parallel
+module load netcdf-fortran/4.4.4
+module load hdf5/1.8.20
+module load gnu
+module load boost
+module load blitz
+module load feature/bridge/heterogenous_mpmd
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/arch/arch-X64_IRENE.fcm
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/arch/arch-X64_IRENE.fcm	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/arch/arch-X64_IRENE.fcm	(revision 1749)
@@ -0,0 +1,26 @@
+################################################################################
+###################                Projet XIOS               ###################
+################################################################################
+
+%CCOMPILER      mpicc
+%FCOMPILER      mpif90
+%LINKER         mpif90  -nofor-main
+
+%BASE_CFLAGS    -std=c++11 -diag-disable 1125 -diag-disable 279 -D__XIOS_EXCEPTION
+%PROD_CFLAGS    -O3 -D BOOST_DISABLE_ASSERTS
+#%DEV_CFLAGS     -g -traceback
+%DEV_CFLAGS     -g 
+%DEBUG_CFLAGS   -DBZ_DEBUG -g -traceback -fno-inline
+
+%BASE_FFLAGS    -D__NONE__ 
+%PROD_FFLAGS    -O3
+#%DEV_FFLAGS     -g -traceback
+%DEV_FFLAGS     -g 
+%DEBUG_FFLAGS   -g -traceback
+
+%BASE_INC       -D__NONE__
+%BASE_LD        -lstdc++
+
+%CPP            mpicc -EP
+%FPP            cpp -P
+%MAKE           gmake
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/arch/arch-X64_IRENE.path
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/arch/arch-X64_IRENE.path	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/arch/arch-X64_IRENE.path	(revision 1749)
@@ -0,0 +1,28 @@
+NETCDF_INCDIR="-I $NETCDFC_INCDIR -I $NETCDFFORTRAN_INCDIR"
+NETCDF_LIBDIR="-L $NETCDFC_LIBDIR -L $NETCDFFORTRAN_LIBDIR"
+NETCDF_LIB="-lnetcdf -lnetcdff"
+
+MPI_INCDIR=""
+MPI_LIBDIR=""
+MPI_LIB=""
+
+HDF5_INCDIR="-I$HDF5_INCDIR"
+HDF5_LIBDIR="-L$HDF5_LIBDIR"
+HDF5_LIB="-lhdf5_hl -lhdf5 -lz -lcurl"
+
+BOOST_INCDIR="-I $BOOST_INCDIR"
+BOOST_LIBDIR="-L $BOOST_LIBDIR"
+BOOST_LIB=""
+
+BLITZ_INCDIR="-I $BLITZ_INCDIR"
+BLITZ_LIBDIR="-L $BLITZ_LIBDIR"
+BLITZ_LIB=""
+
+OASIS_INCDIR="-I$PWD/../../oasis3-mct/BLD/build/lib/psmile.MPI1"
+OASIS_LIBDIR="-L$PWD/../../oasis3-mct/BLD/lib"
+OASIS_LIB="-lpsmile.MPI1 -lscrip -lmct -lmpeu"
+
+
+#only for MEMTRACK debuging : developper only
+ADDR2LINE_LIBDIR="-L${WORKDIR}/ADDR2LINE_LIB"
+ADDR2LINE_LIB="-laddr2line"
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/arch/arch-X64_JADE.env
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/arch/arch-X64_JADE.env	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/arch/arch-X64_JADE.env	(revision 1749)
@@ -0,0 +1,12 @@
+module unload hdf5
+module unload zlib
+module unload pnetcdf
+module unload netcdf
+
+module load hdf5/1.8.9
+module load pnetcdf/1.3.0
+module load zlib/1.2.5
+module load netcdf_C/4.2.1.1
+
+export NETCDF_INC_DIR="/opt/software/SGI/netcdf/C/4.2.1.1/include"
+export NETCDF_LIB_DIR="/opt/software/SGI/netcdf/C/4.2.1.1/lib"
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/arch/arch-X64_JADE.fcm
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/arch/arch-X64_JADE.fcm	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/arch/arch-X64_JADE.fcm	(revision 1749)
@@ -0,0 +1,24 @@
+################################################################################
+###################                Projet XIOS               ###################
+################################################################################
+
+%CCOMPILER      icc
+%FCOMPILER      ifort
+%LINKER         ifort
+
+%BASE_CFLAGS    -diag-disable 1125 -diag-disable 279
+%PROD_CFLAGS    -O3 -DBOOST_DISABLE_ASSERTS
+%DEV_CFLAGS     -g -O2 -traceback
+%DEBUG_CFLAGS   -DBZ_DEBUG -g -traceback -fno-inline
+
+%BASE_FFLAGS    -D__NONE__ 
+%PROD_FFLAGS    -O3
+%DEV_FFLAGS     -g -O2 -traceback
+%DEBUG_FFLAGS   -g -traceback
+
+%BASE_INC       -D__NONE__
+%BASE_LD        -lstdc++ -lifcore -lintlc -lmpi
+
+%CPP            cpp
+%FPP            cpp -P
+%MAKE           gmake
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/arch/arch-X64_JADE.path
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/arch/arch-X64_JADE.path	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/arch/arch-X64_JADE.path	(revision 1749)
@@ -0,0 +1,15 @@
+NETCDF_INCDIR="-I $NETCDF_INC_DIR"
+NETCDF_LIBDIR=""
+NETCDF_LIB="-lnetcdf -lpnetcdf"
+
+MPI_INCDIR=""
+MPI_LIBDIR=""
+MPI_LIB=""
+
+HDF5_INCDIR=""
+HDF5_LIBDIR=""
+HDF5_LIB="-lhdf5_hl -lhdf5 -lhdf5 -lz"
+
+OASIS_INCDIR="-I$PWD/../../oasis3-mct/BLD/build/lib/psmile.MPI1"
+OASIS_LIBDIR="-L$PWD/../../oasis3-mct/BLD/lib"
+OASIS_LIB="-lpsmile.MPI1 -lscrip -lmct -lmpeu"
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/arch/arch-X64_OCCIGEN.env
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/arch/arch-X64_OCCIGEN.env	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/arch/arch-X64_OCCIGEN.env	(revision 1749)
@@ -0,0 +1,10 @@
+#!/bin/bash
+module unload netcdf hdf5 intel bullxmpi 
+
+module load intel
+module load bullxmpi
+module load hdf5
+module load netcdf
+
+export HDF5_INC_DIR=$HDF5HOME/include
+export HDF5_LIB_DIR=$HDF5HOME/lib
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/arch/arch-X64_OCCIGEN.fcm
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/arch/arch-X64_OCCIGEN.fcm	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/arch/arch-X64_OCCIGEN.fcm	(revision 1749)
@@ -0,0 +1,24 @@
+################################################################################
+###################        Projet xios - xmlioserver       #####################
+################################################################################
+
+%CCOMPILER      mpicc
+%FCOMPILER      mpif90
+%LINKER         mpif90  -nofor-main
+
+%BASE_CFLAGS    -std=c++11 -diag-disable 1125 -diag-disable 279
+%PROD_CFLAGS    -O3 -D BOOST_DISABLE_ASSERTS
+%DEV_CFLAGS     -g -traceback
+%DEBUG_CFLAGS   -DBZ_DEBUG -g -traceback -fno-inline
+
+%BASE_FFLAGS    -D__NONE__ 
+%PROD_FFLAGS    -O3
+%DEV_FFLAGS     -g -O2 -traceback
+%DEBUG_FFLAGS   -g -traceback
+
+%BASE_INC       -D__NONE__
+%BASE_LD        -lstdc++
+
+%CPP            mpicc -EP
+%FPP            cpp -P
+%MAKE           gmake
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/arch/arch-X64_OCCIGEN.path
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/arch/arch-X64_OCCIGEN.path	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/arch/arch-X64_OCCIGEN.path	(revision 1749)
@@ -0,0 +1,15 @@
+NETCDF_INCDIR="-I$NETCDFF_INCDIR -I$NETCDF_INC_DIR"
+NETCDF_LIBDIR="-L$NETCDFF_LIBDIR -L$NETCDF_LIB_DIR"
+NETCDF_LIB="-lnetcdff -lnetcdf"
+
+MPI_INCDIR=""
+MPI_LIBDIR=""
+MPI_LIB=""
+
+HDF5_INCDIR="-I$HDF5_INC_DIR"
+HDF5_LIBDIR="-L$HDF5_LIB_DIR"
+HDF5_LIB="-lhdf5_hl -lhdf5 -lhdf5 -lz"
+
+OASIS_INCDIR="-I$PWD/../../oasis3-mct/BLD/build/lib/psmile.MPI1"
+OASIS_LIBDIR="-L$PWD/../../oasis3-mct/BLD/lib"
+OASIS_LIB="-lpsmile.MPI1 -lscrip -lmct -lmpeu"
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/arch/arch-X64_POINCARE.env
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/arch/arch-X64_POINCARE.env	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/arch/arch-X64_POINCARE.env	(revision 1749)
@@ -0,0 +1,3 @@
+module unload hdf5 netcdf4
+module load intel/15.0.0 openmpi/1.6.3_intel15.0.0 hdf5/1.8.16_intel_openmpi netcdf4/4.3.3.1_intel_openmpi 
+
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/arch/arch-X64_POINCARE.fcm
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/arch/arch-X64_POINCARE.fcm	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/arch/arch-X64_POINCARE.fcm	(revision 1749)
@@ -0,0 +1,24 @@
+################################################################################
+###################                Projet XIOS               ###################
+################################################################################
+
+%CCOMPILER      mpicc
+%FCOMPILER      mpif90
+%LINKER         mpif90  -nofor-main
+
+%BASE_CFLAGS    -std=c++11 -diag-disable 1125 -diag-disable 279
+%PROD_CFLAGS    -O3 -D BOOST_DISABLE_ASSERTS
+%DEV_CFLAGS     -g -traceback
+%DEBUG_CFLAGS   -DBZ_DEBUG -g -traceback -fno-inline
+
+%BASE_FFLAGS    -D__NONE__ 
+%PROD_FFLAGS    -O3
+%DEV_FFLAGS     -g -O2 -traceback
+%DEBUG_FFLAGS   -g -traceback
+
+%BASE_INC       -D__NONE__
+%BASE_LD        -lstdc++
+
+%CPP            mpicc -EP
+%FPP            cpp -P
+%MAKE           gmake
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/arch/arch-X64_POINCARE.path
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/arch/arch-X64_POINCARE.path	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/arch/arch-X64_POINCARE.path	(revision 1749)
@@ -0,0 +1,19 @@
+NETCDF_INCDIR="-I $NETCDF4_INC_DIR"
+NETCDF_LIBDIR="-L $NETCDF4_LIB_DIR"
+NETCDF_LIB="-lnetcdff -lnetcdf"
+
+MPI_INCDIR=""
+MPI_LIBDIR=""
+MPI_LIB=""
+
+HDF5_INCDIR="-I $HDF5_INC_DIR"
+HDF5_LIBDIR="-L $HDF5_LIB_DIR"
+HDF5_LIB="-lhdf5_hl -lhdf5 -lz" 
+
+OASIS_INCDIR=""
+OASIS_LIBDIR=""
+OASIS_LIB=""
+
+#only for MEMTRACK debuging : developper only
+ADDR2LINE_LIBDIR=""
+ADDR2LINE_LIB=""
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/arch/arch-X64_TITANE.env
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/arch/arch-X64_TITANE.env	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/arch/arch-X64_TITANE.env	(revision 1749)
@@ -0,0 +1,4 @@
+module unload netcdf
+module unload hdf5
+module load netcdf/4.2
+module load hdf5/1.8.8
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/arch/arch-X64_TITANE.fcm
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/arch/arch-X64_TITANE.fcm	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/arch/arch-X64_TITANE.fcm	(revision 1749)
@@ -0,0 +1,24 @@
+################################################################################
+###################                Projet XIOS               ###################
+################################################################################
+
+%CCOMPILER      mpicc
+%FCOMPILER      mpif90
+%LINKER         mpif90  -nofor-main
+
+%BASE_CFLAGS    -diag-disable 1125 -diag-disable 279
+%PROD_CFLAGS    -O3 -DBOOST_DISABLE_ASSERTS
+%DEV_CFLAGS     -g -O2  -traceback
+%DEBUG_CFLAGS   -DBZ_DEBUG -g -traceback -fno-inline
+
+%BASE_FFLAGS    -D__NONE__ 
+%PROD_FFLAGS    -O3
+%DEV_FFLAGS     -g -O2 -traceback
+%DEBUG_FFLAGS   -g -traceback
+
+%BASE_INC       -D __NONE__
+%BASE_LD        -lstdc++
+
+%CPP            cpp
+%FPP            cpp -P
+%MAKE           gmake
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/arch/arch-X64_TITANE.path
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/arch/arch-X64_TITANE.path	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/arch/arch-X64_TITANE.path	(revision 1749)
@@ -0,0 +1,15 @@
+NETCDF_INCDIR="-I $NETCDF_INC_DIR"
+NETCDF_LIBDIR="-L $NETCDF_LIB_DIR"
+NETCDF_LIB="-lnetcdff -lnetcdf"
+
+MPI_INCDIR=""
+MPI_LIBDIR=""
+MPI_LIB=""
+
+HDF5_INCDIR="-I $HDF5_INC_DIR"
+HDF5_LIBDIR="-L $HDF5_LIB_DIR"
+HDF5_LIB="-lhdf5_hl -lhdf5 -lhdf5 -lz -lcurl"
+
+OASIS_INCDIR="-I$PWD/../../oasis3-mct/BLD/build/lib/psmile.MPI1"
+OASIS_LIBDIR="-L$PWD/../../oasis3-mct/BLD/lib"
+OASIS_LIB="-lpsmile.MPI1 -lscrip -lmct -lmpeu"
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/arch/arch-X64_TITANE_VAMPIR.env
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/arch/arch-X64_TITANE_VAMPIR.env	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/arch/arch-X64_TITANE_VAMPIR.env	(revision 1749)
@@ -0,0 +1,4 @@
+module unload netcdf
+module unload hdf5
+module load netcdf/4.2
+module load hdf5/1.8.8
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/arch/arch-X64_TITANE_VAMPIR.fcm
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/arch/arch-X64_TITANE_VAMPIR.fcm	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/arch/arch-X64_TITANE_VAMPIR.fcm	(revision 1749)
@@ -0,0 +1,23 @@
+################################################################################
+###################                Projet XIOS               ###################
+################################################################################
+
+%CCOMPILER      vtcc  -vt:cc mpicc -vt:inst manual -DVTRACE
+%FCOMPILER      vtf90 -vt:f90 mpif90 -vt:inst manual -DVTRACE
+%LINKER         vtf90 -vt:f90 mpif90 -vt:inst manual -nofor-main -DVTRACE
+%BASE_CFLAGS    -diag-disable 1125 -diag-disable 279
+%PROD_CFLAGS    -O3 -D BOOST_DISABLE_ASSERTS
+%DEV_CFLAGS     -g -traceback
+%DEBUG_CFLAGS   -DBZ_DEBUG -g -traceback -fno-inline
+
+%BASE_FFLAGS    -D__NONE__ 
+%PROD_FFLAGS    -O3
+%DEV_FFLAGS     -g -O2 -traceback
+%DEBUG_FFLAGS   -g -traceback
+
+%BASE_INC       -D__NONE__
+%BASE_LD        -lstdc++
+
+%CPP            cpp
+%FPP            cpp -P
+%MAKE           gmake
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/arch/arch-X64_TITANE_VAMPIR.path
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/arch/arch-X64_TITANE_VAMPIR.path	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/arch/arch-X64_TITANE_VAMPIR.path	(revision 1749)
@@ -0,0 +1,15 @@
+NETCDF_INCDIR="-I $NETCDF_INC_DIR"
+NETCDF_LIBDIR="-L $NETCDF_LIB_DIR"
+NETCDF_LIB="-lnetcdff -lnetcdf"
+
+MPI_INCDIR=""
+MPI_LIBDIR=""
+MPI_LIB=""
+
+HDF5_INCDIR="-I $HDF5_INC_DIR"
+HDF5_LIBDIR="-L $HDF5_LIB_DIR"
+HDF5_LIB="-lhdf5_hl -lhdf5 -lhdf5 -lz -lcurl"
+
+OASIS_INCDIR="-I$PWD/../../oasis3-mct/BLD/build/lib/psmile.MPI1"
+OASIS_LIBDIR="-L$PWD/../../oasis3-mct/BLD/lib"
+OASIS_LIB="-lpsmile.MPI1 -lscrip -lmct -lmpeu"
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/arch/arch-X64_YELLOWSTONE.env
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/arch/arch-X64_YELLOWSTONE.env	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/arch/arch-X64_YELLOWSTONE.env	(revision 1749)
@@ -0,0 +1,4 @@
+module unload netcdf
+module unload intel
+module load intel/16.0.2
+module load netcdf-mpi/4.4.0
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/arch/arch-X64_YELLOWSTONE.fcm
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/arch/arch-X64_YELLOWSTONE.fcm	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/arch/arch-X64_YELLOWSTONE.fcm	(revision 1749)
@@ -0,0 +1,24 @@
+################################################################################
+###################                Projet XIOS               ###################
+################################################################################
+
+%CCOMPILER      mpiicc
+%FCOMPILER      mpiifort 
+%LINKER         mpiifort  -nofor-main
+
+%BASE_CFLAGS    -diag-disable 1125 -diag-disable 279
+%PROD_CFLAGS    -O3 -D BOOST_DISABLE_ASSERTS
+%DEV_CFLAGS     -g -traceback
+%DEBUG_CFLAGS   -DBZ_DEBUG -g -traceback -fno-inline
+
+%BASE_FFLAGS    -D__NONE__ 
+%PROD_FFLAGS    -O3
+%DEV_FFLAGS     -g -O2 -traceback
+%DEBUG_FFLAGS   -g -traceback
+
+%BASE_INC       -D__NONE__
+%BASE_LD        -lstdc++ 
+
+%CPP            mpiicc -EP
+%FPP            cpp -P
+%MAKE           gmake
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/arch/arch-X64_YELLOWSTONE.path
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/arch/arch-X64_YELLOWSTONE.path	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/arch/arch-X64_YELLOWSTONE.path	(revision 1749)
@@ -0,0 +1,15 @@
+NETCDF_INCDIR="-I/$NETCDF/include"
+NETCDF_LIBDIR="-L/$NETCDF/lib"
+NETCDF_LIB="-lnetcdff -lnetcdf"
+
+MPI_INCDIR=""
+MPI_LIBDIR=""
+MPI_LIB=""
+
+HDF5_INCDIR=""
+HDF5_LIBDIR=""
+HDF5_LIB="-lhdf5_hl -lhdf5 -lhdf5 -lz"
+
+OASIS_INCDIR="-I$PWD/../../oasis3-mct/BLD/build/lib/psmile.MPI1"
+OASIS_LIBDIR="-L$PWD/../../oasis3-mct/BLD/lib"
+OASIS_LIB="-lpsmile.MPI1 -lscrip -lmct -lmpeu"
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/arch/arch-XC30_Cray.env
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/arch/arch-XC30_Cray.env	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/arch/arch-XC30_Cray.env	(revision 1749)
@@ -0,0 +1,11 @@
+export HDF5_INC_DIR=""
+export HDF5_LIB_DIR=""
+
+export NETCDF_INC_DIR=""
+export NETCDF_LIB_DIR=""
+
+export BOOST_INC_DIR=""
+export BOOST_LIB_DIR=""
+
+export BLITZ_INC_DIR=""
+export BLITZ_LIB_DIR=""
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/arch/arch-XC30_Cray.fcm
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/arch/arch-XC30_Cray.fcm	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/arch/arch-XC30_Cray.fcm	(revision 1749)
@@ -0,0 +1,42 @@
+################################################################################
+###################                Projet XIOS               ###################
+################################################################################
+
+# Cray XC build instructions for XIOS/xios-1.0
+# These files have been tested on 
+# Archer (XC30), ECMWF (XC30), and the Met Office (XC40) using the Cray PrgEnv.
+# One must also: 
+#    module load cray-netcdf-hdf5parallel/4.3.2
+# There is a bug in the CC compiler prior to cce/8.3.7 using -O3 or -O2
+# The workarounds are not ideal:
+# Use -Gfast and put up with VERY large executables
+# Use -O1 and possibly suffer a significant performance loss.
+#
+# Mike Rezny Met Office 23/03/2015
+
+%CCOMPILER      CC
+%FCOMPILER      ftn
+%LINKER         CC
+
+%BASE_CFLAGS     -hstd=c++11 -DMPICH_SKIP_MPICXX -h msglevel_4 -h zero -h gnu
+
+## Only use -O3 if you can load module cce/8.3.7 or later
+#%PROD_CFLAGS    -O3 -DBOOST_DISABLE_ASSERTS
+
+## Otherwise take your pick of these, refer to information above.
+%PROD_CFLAGS    -O1 -DBOOST_DISABLE_ASSERTS
+## %PROD_CFLAGS    -Gfast -DBOOST_DISABLE_ASSERTS
+%DEV_CFLAGS     -O2
+%DEBUG_CFLAGS   -g 
+
+%BASE_FFLAGS    -em -m 4 -e0 -eZ
+%PROD_FFLAGS    -O3
+%DEV_FFLAGS     -G2
+%DEBUG_FFLAGS   -g 
+
+%BASE_INC       -D__NONE__
+%BASE_LD        -D__NONE__
+
+%CPP            cpp
+%FPP            cpp -P -CC
+%MAKE           gmake
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/arch/arch-XC30_Cray.path
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/arch/arch-XC30_Cray.path	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/arch/arch-XC30_Cray.path	(revision 1749)
@@ -0,0 +1,26 @@
+NETCDF_INCDIR=""
+NETCDF_LIBDIR=""
+NETCDF_LIB=""
+
+MPI_INCDIR=""
+MPI_LIBDIR=""
+MPI_LIB=""
+
+HDF5_INCDIR=""
+HDF5_LIBDIR=""
+HDF5_LIB=""
+
+BOOST_INCDIR="-I$BOOST_INCDIR"
+BOOST_LIBDIR="-L$BOOST_LIBDIR"
+BOOST_LIB=""
+
+BLITZ_INCDIR="-I$BLITZ_INCDIR"
+BLITZ_LIBDIR="-L$BLITZ_LIBDIR"
+BLITZ_LIB=""
+
+OASIS_INCDIR=""
+OASIS_LIBDIR=""
+OASIS_LIB=""
+#OASIS_INCDIR="-I$PWD/../../oasis3-mct/BLD/build/lib/psmile.MPI1"
+#OASIS_LIBDIR="-L$PWD/../../oasis3-mct/BLD/lib"
+#OASIS_LIB="-lpsmile.MPI1 -lscrip -lmct -lmpeu"
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/arch/arch-XE6_LYNX.env
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/arch/arch-XE6_LYNX.env	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/arch/arch-XE6_LYNX.env	(revision 1749)
@@ -0,0 +1,4 @@
+export HDF5_INC_DIR=$WORKDIR/hdf5/include
+export HDF5_LIB_DIR=${CRAY_HDF5_DIR}/hdf5-parallel-cce/lib
+export NETCDF_INC_DIR=${CRAY_NETCDF_DIR}/netcdf-hdf5parallel-cce/include
+export NETCDF_LIB_DIR=${CRAY_NETCDF_DIR}/netcdf-hdf5parallel-cce/lib
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/arch/arch-XE6_LYNX.fcm
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/arch/arch-XE6_LYNX.fcm	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/arch/arch-XE6_LYNX.fcm	(revision 1749)
@@ -0,0 +1,24 @@
+################################################################################
+###################                Projet XIOS               ###################
+################################################################################
+
+%CCOMPILER      CC
+%FCOMPILER      ftn
+%LINKER         CC
+
+%BASE_CFLAGS    -DMPICH_SKIP_MPICXX -h msglevel_4
+%PROD_CFLAGS    -O3 -DBOOST_DISABLE_ASSERTS
+%DEV_CFLAGS     -g -O2 
+%DEBUG_CFLAGS   -g 
+
+%BASE_FFLAGS    -em -m 4
+%PROD_FFLAGS    -O3
+%DEV_FFLAGS     -g -O2 
+%DEBUG_FFLAGS   -g 
+
+%BASE_INC       -D__NONE__
+%BASE_LD        -D__NONE__
+
+%CPP            cpp
+%FPP            cpp -P
+%MAKE           gmake
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/arch/arch-XE6_LYNX.path
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/arch/arch-XE6_LYNX.path	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/arch/arch-XE6_LYNX.path	(revision 1749)
@@ -0,0 +1,15 @@
+NETCDF_INCDIR="-I $NETCDF_INC_DIR"
+NETCDF_LIBDIR="-L $NETCDF_LIB_DIR"
+NETCDF_LIB="-lnetcdf"
+
+MPI_INCDIR=""
+MPI_LIBDIR=""
+MPI_LIB=""
+
+#HDF5_INCDIR="-I $HDF5_INC_DIR"
+HDF5_LIBDIR="-L $HDF5_LIB_DIR"
+HDF5_LIB="-lhdf5_hl -lhdf5 -lz -lcurl"
+
+OASIS_INCDIR="-I$PWD/../../oasis3-mct/BLD/build/lib/psmile.MPI1"
+OASIS_LIBDIR="-L$PWD/../../oasis3-mct/BLD/lib"
+OASIS_LIB="-lpsmile.MPI1 -lscrip -lmct -lmpeu"
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/arch/arch-ifort_CICLAD.fcm
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/arch/arch-ifort_CICLAD.fcm	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/arch/arch-ifort_CICLAD.fcm	(revision 1749)
@@ -0,0 +1,20 @@
+%CCOMPILER           /usr/lib64/openmpi/1.4.5-ifort/bin/mpicc
+%FCOMPILER           /usr/lib64/openmpi/1.4.5-ifort/bin/mpif90
+%LINKER              /usr/lib64/openmpi/1.4.5-ifort/bin/mpif90 -nofor-main
+
+%BASE_CFLAGS
+%PROD_CFLAGS    -O3 -D BOOST_DISABLE_ASSERTS
+%DEV_CFLAGS     -g -traceback
+%DEBUG_CFLAGS   -DBZ_DEBUG -g -traceback -fno-inline
+
+%BASE_FFLAGS    -D__NONE__
+%PROD_FFLAGS    -O3
+%DEV_FFLAGS     -g -O2 -traceback
+%DEBUG_FFLAGS   -g -traceback
+
+%BASE_INC       -D__NONE__
+%BASE_LD        -lstdc++
+
+%CPP            /usr/lib64/openmpi/1.4.5-ifort/bin/mpicc -EP
+%FPP            cpp -P
+%MAKE           gmake
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/arch/arch-ifort_CICLAD.path
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/arch/arch-ifort_CICLAD.path	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/arch/arch-ifort_CICLAD.path	(revision 1749)
@@ -0,0 +1,9 @@
+NETCDF_INCDIR="-I /opt/netcdf42/ifort/include"
+NETCDF_LIBDIR="-L/opt/netcdf42/ifort/lib"
+NETCDF_LIB="-lnetcdf"
+MPI_INCDIR=""
+MPI_LIBDIR=""
+MPI_LIB=""
+HDF5_INCDIR=""
+HDF5_LIBDIR=""
+HDF5_LIB=""
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/arch/arch-ifort_LSCE.fcm
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/arch/arch-ifort_LSCE.fcm	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/arch/arch-ifort_LSCE.fcm	(revision 1749)
@@ -0,0 +1,20 @@
+%CCOMPILER           mpicc
+%FCOMPILER           mpif90
+%LINKER              mpif90 -nofor-main
+
+%BASE_CFLAGS
+%PROD_CFLAGS    -O3 -D BOOST_DISABLE_ASSERTS
+%DEV_CFLAGS     -g
+%DEBUG_CFLAGS   -DBZ_DEBUG -g -fno-inline
+
+%BASE_FFLAGS    -D__NONE__
+%PROD_FFLAGS    -O3
+%DEV_FFLAGS     -g -O2 -traceback
+%DEBUG_FFLAGS   -g -traceback
+
+%BASE_INC       -D__NONE__
+%BASE_LD        -lstdc++
+
+%CPP            mpicc -EP
+%FPP            cpp -P
+%MAKE           gmake
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/arch/arch-ifort_LSCE.path
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/arch/arch-ifort_LSCE.path	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/arch/arch-ifort_LSCE.path	(revision 1749)
@@ -0,0 +1,6 @@
+NETCDF_INCDIR="-I /usr/local/install/netcdf-4.3.2p/include"
+NETCDF_LIBDIR="-L/usr/local/install/netcdf-4.3.2p/lib"
+NETCDF_LIB="-lnetcdf -lnetcdff"
+HDF5_INCDIR="-I /usr/local/install/hdf5-1.8.9p/include"
+HDF5_LIBDIR="-L/usr/local/install/hdf5-1.8.9p/lib"
+HDF5_LIB="-lhdf5_hl -lhdf5 -lhdf5 -lz -lcurl"
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/bld.cfg
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/bld.cfg	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/bld.cfg	(revision 1749)
@@ -0,0 +1,81 @@
+# ----------------------- FCM extract configuration file -----------------------
+cfg::type                           bld
+cfg::version                        1.0
+
+
+# ------------------------------------------------------------------------------
+# Build information
+# ------------------------------------------------------------------------------
+
+# Specifying the build directory and src::blitz if necessary.
+inc bld_dir.cfg
+
+%CFLAGS           %BASE_CFLAGS %COMPIL_CFLAGS
+%FFLAGS           %BASE_FFLAGS %COMPIL_FFLAGS
+%LD_FLAGS         %ARCH_LD %BASE_LD
+
+bld::infile_ext::cpp   C::SOURCE
+bld::infile_ext::conf  CPP::INCLUDE
+bld::infile_ext::hpp   CPP::INCLUDE
+
+# IMPORTANT: as the build directory may not necessarily coincide with the source directory, 
+# each source subfolder should be declared individually
+search_src           false
+src::xios                               $PWD/src
+src::xios::config                       $PWD/src/config
+src::xios::date                         $PWD/src/date
+src::xios::filter                       $PWD/src/filter
+src::xios::functor                      $PWD/src/functor
+src::xios::interface::c                 $PWD/src/interface/c
+src::xios::interface::c_attr            $PWD/src/interface/c_attr
+src::xios::interface::fortran           $PWD/src/interface/fortran
+src::xios::interface::fortran_attr      $PWD/src/interface/fortran_attr
+src::xios::io                           $PWD/src/io
+src::xios::node                         $PWD/src/node
+src::xios::parse_expr                   $PWD/src/parse_expr
+src::xios::test                         $PWD/src/test
+src::xios::transformation               $PWD/src/transformation
+src::xios::transformation::Functions    $PWD/src/transformation/Functions
+src::xios::type                         $PWD/src/type
+
+src::netcdf $PWD/extern/netcdf4
+src::remap $PWD/extern/remap/src
+bld::lib xios
+bld::target libxios.a 
+#bld::target generate_fortran_interface.exe 
+#bld::target test_remap.exe
+bld::target xios_server.exe 
+#bld::target test_regular.exe
+#bld::target test_xios2_cmip6.exe
+#bld::target test_new_features.exe test_unstruct_complete.exe 
+#bld::target test_remap.exe
+#bld::target test_complete.exe
+#bld::target test_client.exe
+#bld::target test_unstruct_complete.exe
+#bld::target test_unstructured.exe
+bld::exe_dep
+
+bld::tool::cc        %CCOMPILER
+bld::tool::fc        %FCOMPILER
+bld::tool::fpp       %FPP
+bld::tool::cpp       %CPP
+bld::tool::cppflags  %CBASE_INC -I${PWD}/extern/src_netcdf -I${PWD}/extern/boost/include -I${PWD}/extern/rapidxml/include -I${PWD}/extern/blitz/include 
+bld::tool::fppflags  %BASE_INC -I${PWD}/extern/boost/include -I${PWD}/extern/rapidxml/include 
+bld::tool::ld        %LINKER
+bld::tool::ldflags   %LD_FLAGS 
+bld::tool::cflags    %CFLAGS %CBASE_INC -I${PWD}/extern/src_netcdf -I${PWD}/extern/boost/include -I${PWD}/extern/rapidxml/include -I${PWD}/extern/blitz/include 
+bld::tool::fflags    %FFLAGS %FBASE_INC 
+bld::tool::cppkeys   %CPP_KEY
+bld::tool::fppkeys   %CPP_KEY
+bld::tool::make      %MAKE
+
+# Pre-process code before analysing dependencies
+bld::pp    false          
+bld::pp::xios::interface::fortran              true
+bld::pp::xios::interface::fortran_attr         true
+bld::excl_dep        use::mod_prism_get_comm
+bld::excl_dep        use::mod_prism_get_localcomm_proto
+bld::excl_dep        use::mod_prism_proto
+bld::excl_dep        use::mod_prism
+bld::excl_dep        use::netcdf
+bld::excl_dep        inc::mpif.h
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/doc/XIOS_reference_guide.lyx
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/doc/XIOS_reference_guide.lyx	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/doc/XIOS_reference_guide.lyx	(revision 1749)
@@ -0,0 +1,10613 @@
+#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
+\begin_modules
+logicalmkup
+\end_modules
+\maintain_unincluded_children false
+\language english
+\language_package auto
+\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
+\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 0
+\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 Title
+XIOS Fortran Reference Guide
+\end_layout
+
+\begin_layout Author
+Yann Meurdesoif
+\end_layout
+
+\begin_layout Chapter
+Attribute reference
+\end_layout
+
+\begin_layout Section
+Context attribute reference
+\end_layout
+
+\begin_layout Section
+Calendar attribute reference
+\end_layout
+
+\begin_layout Subsection*
+type: 
+\begin_inset Flex Emph
+status collapsed
+
+\begin_layout Plain Layout
+enumeration {Gregorian, Julian, D360, AllLeap, NoLeap, user_defined}
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+Fortran:
+\end_layout
+
+\begin_layout LyX-Code
+CHARACTER(LEN=*) :: type
+\end_layout
+
+\begin_layout Standard
+Define the calendar used for the current context.
+ This attribute is mandatory and cannot be modified once it has been set.
+\begin_inset Newline newline
+\end_inset
+
+
+\begin_inset Newline newline
+\end_inset
+
+When using the Fortran interface, this attribute must be defined using the
+ following subroutine:
+\end_layout
+
+\begin_layout LyX-Code
+SUBROUTINE xios_define_calendar(type, timestep, start_date, time_origin,
+\begin_inset Newline newline
+\end_inset
+
+                                day_length, month_lengths, year_length,
+\begin_inset Newline newline
+\end_inset
+
+                                leap_year_month, leap_year_drift,
+\begin_inset Newline newline
+\end_inset
+
+                                leap_year_drift_offset)
+\end_layout
+
+\begin_layout Subsection*
+start_date: 
+\begin_inset Flex Emph
+status collapsed
+
+\begin_layout Plain Layout
+date
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+Fortran:
+\end_layout
+
+\begin_layout LyX-Code
+TYPE(xios_date) :: start_date
+\end_layout
+
+\begin_layout Standard
+Define the start date of the simulation for the current context.
+ This attribute is optional, the default value is 
+\begin_inset Flex Emph
+status collapsed
+
+\begin_layout Plain Layout
+
+\series bold
+0000-01-01 00:00:00
+\end_layout
+
+\end_inset
+
+.
+ The 
+\begin_inset Flex Strong
+status collapsed
+
+\begin_layout Plain Layout
+type
+\end_layout
+
+\end_inset
+
+ attribute must always be set at the same time or before this attribute
+ is defined.
+\begin_inset Newline newline
+\end_inset
+
+
+\begin_inset Newline newline
+\end_inset
+
+A partial date is allowed in the configuration file as long as the omitted
+ parts are at the end, in which case they are initialized as in the default
+ value.
+ Optionally an offset can be added to the date using the notation "
+\emph on
++ duration
+\emph default
+".
+ 
+\begin_inset Newline newline
+\end_inset
+
+
+\begin_inset Newline newline
+\end_inset
+
+When using the Fortran interface, this attribute can be defined at the same
+ time as the calendar 
+\series bold
+type
+\series default
+:
+\end_layout
+
+\begin_layout LyX-Code
+SUBROUTINE xios_define_calendar(type, timestep, start_date, time_origin,
+\begin_inset Newline newline
+\end_inset
+
+                                day_length, month_lengths, year_length,
+\begin_inset Newline newline
+\end_inset
+
+                                leap_year_month, leap_year_drift,
+\begin_inset Newline newline
+\end_inset
+
+                                leap_year_drift_offset)
+\end_layout
+
+\begin_layout Standard
+or later using the following subroutine:
+\end_layout
+
+\begin_layout LyX-Code
+SUBROUTINE xios_set_start_date(start_date)
+\end_layout
+
+\begin_layout Subsection*
+time_origin: 
+\begin_inset Flex Emph
+status collapsed
+
+\begin_layout Plain Layout
+date
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+Fortran:
+\end_layout
+
+\begin_layout LyX-Code
+TYPE(xios_date) :: time_origin
+\end_layout
+
+\begin_layout Standard
+Define the time origin of a time axis.
+ It will appear as metadata attached to the time axis in an output file.
+ This attribute is optional, the default value is 
+\begin_inset Flex Emph
+status collapsed
+
+\begin_layout Plain Layout
+
+\series bold
+0000-01-01 00:00:00
+\end_layout
+
+\end_inset
+
+.
+ The 
+\begin_inset Flex Strong
+status collapsed
+
+\begin_layout Plain Layout
+type
+\end_layout
+
+\end_inset
+
+ attribute must always be set at the same time or before this attribute
+ is defined.
+\begin_inset Newline newline
+\end_inset
+
+
+\begin_inset Newline newline
+\end_inset
+
+A partial date is allowed in the configuration file as long as the omitted
+ parts are at the end, in which case they are initialized as in the default
+ value.
+ Optionally an offset can be added to the date using the notation "
+\emph on
++ duration
+\emph default
+".
+ 
+\begin_inset Newline newline
+\end_inset
+
+
+\begin_inset Newline newline
+\end_inset
+
+When using the Fortran interface, this attribute can be defined at the same
+ time as the calendar 
+\series bold
+type
+\series default
+:
+\end_layout
+
+\begin_layout LyX-Code
+SUBROUTINE xios_define_calendar(type, timestep, start_date, time_origin,
+\begin_inset Newline newline
+\end_inset
+
+                                day_length, month_lengths, year_length,
+\begin_inset Newline newline
+\end_inset
+
+                                leap_year_month, leap_year_drift,
+\begin_inset Newline newline
+\end_inset
+
+                                leap_year_drift_offset)
+\end_layout
+
+\begin_layout Standard
+or later using the following subroutine:
+\end_layout
+
+\begin_layout LyX-Code
+SUBROUTINE xios_set_time_origin(time_origin)
+\end_layout
+
+\begin_layout Subsection*
+timestep: 
+\begin_inset Flex Emph
+status collapsed
+
+\begin_layout Plain Layout
+duration
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+Fortran: 
+\end_layout
+
+\begin_layout LyX-Code
+TYPE(xios_duration) :: timestep
+\end_layout
+
+\begin_layout Standard
+Define the time step of the simulation for the current context.
+ This attribute is mandatory.
+\begin_inset Newline newline
+\end_inset
+
+
+\begin_inset Newline newline
+\end_inset
+
+When using the Fortran interface, this attribute can be defined at the same
+ time as the calendar 
+\series bold
+type
+\series default
+:
+\end_layout
+
+\begin_layout LyX-Code
+SUBROUTINE xios_define_calendar(type, timestep, start_date, time_origin,
+\begin_inset Newline newline
+\end_inset
+
+                                day_length, month_lengths, year_length,
+\begin_inset Newline newline
+\end_inset
+
+                                leap_year_month, leap_year_drift,
+\begin_inset Newline newline
+\end_inset
+
+                                leap_year_drift_offset)
+\end_layout
+
+\begin_layout Standard
+or using the following subroutine:
+\end_layout
+
+\begin_layout LyX-Code
+SUBROUTINE xios_set_timestep(timestep)
+\end_layout
+
+\begin_layout Subsection*
+day_length: 
+\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 :: day_length
+\end_layout
+
+\begin_layout Standard
+Define the duration of a day in seconds when using a custom calendar.
+ This attribute is mandatory if the calendar 
+\series bold
+type
+\series default
+ is set to "
+\emph on
+user_defined
+\emph default
+", otherwise it must not be defined.
+\begin_inset Newline newline
+\end_inset
+
+
+\begin_inset Newline newline
+\end_inset
+
+When using the Fortran interface, this attribute must be defined at the
+ same time as the calendar 
+\series bold
+type
+\series default
+:
+\end_layout
+
+\begin_layout LyX-Code
+SUBROUTINE xios_define_calendar(type, timestep, start_date, time_origin,
+\begin_inset Newline newline
+\end_inset
+
+                                day_length, month_lengths, year_length,
+\begin_inset Newline newline
+\end_inset
+
+                                leap_year_month, leap_year_drift,
+\begin_inset Newline newline
+\end_inset
+
+                                leap_year_drift_offset)
+\end_layout
+
+\begin_layout Subsection*
+month_lengths: 
+\begin_inset Flex Emph
+status collapsed
+
+\begin_layout Plain Layout
+1D-array of integer
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+Fortran: 
+\end_layout
+
+\begin_layout LyX-Code
+INTEGER :: month_lengths(:)
+\end_layout
+
+\begin_layout Standard
+Define the duration of each month, in days, when using a custom calendar.
+ The number of elements in the array defines the number of months in a year
+ and the sum of all elements is the total number of days in a year.
+ This attribute is mandatory if the calendar 
+\series bold
+type
+\series default
+ is set to 
+\series bold
+\emph on
+user_defined
+\series default
+\emph default
+ and the 
+\series bold
+year_length
+\series default
+ attribute is not used, otherwise it must not be defined.
+\begin_inset Newline newline
+\end_inset
+
+
+\begin_inset Newline newline
+\end_inset
+
+When using the Fortran interface, this attribute must be defined at the
+ same time as the calendar 
+\series bold
+type
+\series default
+:
+\end_layout
+
+\begin_layout LyX-Code
+SUBROUTINE xios_define_calendar(type, timestep, start_date, time_origin,
+\begin_inset Newline newline
+\end_inset
+
+                                day_length, month_lengths, year_length,
+\begin_inset Newline newline
+\end_inset
+
+                                leap_year_month, leap_year_drift,
+\begin_inset Newline newline
+\end_inset
+
+                                leap_year_drift_offset)
+\end_layout
+
+\begin_layout Subsection*
+year_length: 
+\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 :: year_length
+\end_layout
+
+\begin_layout Standard
+Define the duration of a year, in seconds, when using a custom calendar.
+ This attribute is mandatory if the calendar 
+\series bold
+type
+\series default
+ is set to 
+\series bold
+\emph on
+user_defined
+\series default
+\emph default
+ and the 
+\series bold
+month_lengths
+\series default
+ attribute is not used, otherwise it must not be defined.
+\begin_inset Newline newline
+\end_inset
+
+
+\begin_inset Newline newline
+\end_inset
+
+Note that the date format is modified when using this attribute: the month
+ must be always be omitted and the day must also be omitted if 
+\begin_inset Formula $year\_length\leq day\_length$
+\end_inset
+
+.
+\begin_inset Newline newline
+\end_inset
+
+
+\begin_inset Newline newline
+\end_inset
+
+When using the Fortran interface, this attribute must be defined at the
+ same time as the calendar 
+\series bold
+type
+\series default
+:
+\end_layout
+
+\begin_layout LyX-Code
+SUBROUTINE xios_define_calendar(type, timestep, start_date, time_origin,
+\begin_inset Newline newline
+\end_inset
+
+                                day_length, month_lengths, year_length,
+\begin_inset Newline newline
+\end_inset
+
+                                leap_year_month, leap_year_drift,
+\begin_inset Newline newline
+\end_inset
+
+                                leap_year_drift_offset)
+\end_layout
+
+\begin_layout Subsection*
+leap_year_month: 
+\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 :: leap_year_month
+\end_layout
+
+\begin_layout Standard
+Define the month to which the extra day will be added in case of leap year,
+ when using a custom calendar.
+ This attribute is optional if the calendar 
+\series bold
+type
+\series default
+ is set to 
+\series bold
+\emph on
+user_defined
+\series default
+\emph default
+ and the 
+\series bold
+month_lengths
+\series default
+ attribute is used, otherwise it must not be defined.
+ The default behavior is not to have any leap year.
+ If defined, this attribute must comply with the following constraint: 
+\begin_inset Formula $1\leq leap\_year\_month\leq size(month\_lengths)$
+\end_inset
+
+ and the 
+\series bold
+leap_year_drift
+\series default
+ attribute must also be defined.
+\begin_inset Newline newline
+\end_inset
+
+
+\begin_inset Newline newline
+\end_inset
+
+When using the Fortran interface, this attribute must be defined at the
+ same time as the calendar 
+\series bold
+type
+\series default
+:
+\end_layout
+
+\begin_layout LyX-Code
+SUBROUTINE xios_define_calendar(type, timestep, start_date, time_origin,
+\begin_inset Newline newline
+\end_inset
+
+                                day_length, month_lengths, year_length,
+\begin_inset Newline newline
+\end_inset
+
+                                leap_year_month, leap_year_drift,
+\begin_inset Newline newline
+\end_inset
+
+                                leap_year_drift_offset)
+\end_layout
+
+\begin_layout Subsection*
+leap_year_drift: 
+\begin_inset Flex Emph
+status collapsed
+
+\begin_layout Plain Layout
+double
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+Fortran: 
+\end_layout
+
+\begin_layout LyX-Code
+DOUBLE PRECISION :: leap_year_drift
+\end_layout
+
+\begin_layout Standard
+Define the yearly drift, expressed as a fraction of a day, between the calendar
+ year and the astronomical year, when using a custom calendar.
+ This attribute is optional if the calendar 
+\series bold
+type
+\series default
+ is set to 
+\series bold
+\emph on
+user_defined
+\series default
+\emph default
+ and the 
+\series bold
+month_lengths
+\series default
+ attribute is used, otherwise it must not be defined.
+ The default behavior is not to have any leap year, i.e.
+ the default value is 
+\begin_inset Formula $\mathbf{0}$
+\end_inset
+
+.
+ If defined, this attribute must comply with the following constraint: 
+\begin_inset Formula $0\leq leap\_year\_drift<1$
+\end_inset
+
+ and the 
+\series bold
+leap_year_month
+\series default
+ attribute must also be defined.
+\begin_inset Newline newline
+\end_inset
+
+
+\begin_inset Newline newline
+\end_inset
+
+When using the Fortran interface, this attribute must be defined at the
+ same time as the calendar 
+\series bold
+type
+\series default
+:
+\end_layout
+
+\begin_layout LyX-Code
+SUBROUTINE xios_define_calendar(type, timestep, start_date, time_origin,
+\begin_inset Newline newline
+\end_inset
+
+                                day_length, month_lengths, year_length,
+\begin_inset Newline newline
+\end_inset
+
+                                leap_year_month, leap_year_drift,
+\begin_inset Newline newline
+\end_inset
+
+                                leap_year_drift_offset)
+\end_layout
+
+\begin_layout Subsection*
+leap_year_drift_offset: 
+\begin_inset Flex Emph
+status collapsed
+
+\begin_layout Plain Layout
+double
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+Fortran: 
+\end_layout
+
+\begin_layout LyX-Code
+DOUBLE PRECISION :: leap_year_drift_offset
+\end_layout
+
+\begin_layout Standard
+Define the initial drift between the calendar year and the astronomical
+ year, expressed as a fraction of a day, at the beginning of the time origin's
+ year, when using a custom calendar.
+ This attribute is optional if the 
+\series bold
+leap_year_month
+\series default
+ and 
+\series bold
+leap_year_drift
+\series default
+ attributes are used, otherwise it must not be defined.
+ The default value is 
+\begin_inset Formula $\mathbf{0}$
+\end_inset
+
+.
+ If defined, this attribute must comply with the following constraint: 
+\begin_inset Formula $0\leq leap\_year\_drift\_offset<1$
+\end_inset
+
+.
+ If 
+\begin_inset Formula $leap\_yeap\_drift\_offset+leap\_yeap\_drift$
+\end_inset
+
+ is greater or equal to 1, then the first year will be a leap year.
+\begin_inset Newline newline
+\end_inset
+
+
+\begin_inset Newline newline
+\end_inset
+
+When using the Fortran interface, this attribute must be defined at the
+ same time as the calendar 
+\series bold
+type
+\series default
+:
+\end_layout
+
+\begin_layout LyX-Code
+SUBROUTINE xios_define_calendar(type, timestep, start_date, time_origin,
+\begin_inset Newline newline
+\end_inset
+
+                                day_length, month_lengths, year_length,
+\begin_inset Newline newline
+\end_inset
+
+                                leap_year_month, leap_year_drift,
+\begin_inset Newline newline
+\end_inset
+
+                                leap_year_drift_offset)
+\end_layout
+
+\begin_layout Section
+Scalar attribute reference
+\end_layout
+
+\begin_layout Subsection*
+name (optional): 
+\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=*) :: name
+\end_layout
+
+\begin_layout Standard
+Defines the name of a scalar as it will appear in a file.
+ If not defined, the name will be generated automatically based on the id.
+ If multiple scalars are defined in the same file, each scalar must have
+ a unique name.
+ 
+\end_layout
+
+\begin_layout Subsection*
+standard_name (optional): 
+\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
+Defines the standard name of a scalar as it will appear in the scalar's
+ metadata in an output file.
+ 
+\end_layout
+
+\begin_layout Subsection*
+long_name (optional): 
+\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
+Defines the long name of a scalar as it will appear in the scalar's metadata
+ in an output file.
+ 
+\end_layout
+
+\begin_layout Subsection*
+unit (optional): 
+\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=*) :: unit
+\end_layout
+
+\begin_layout Standard
+Defines the scalar unit as it will appear in the scalar's metadata in an
+ output file.
+\end_layout
+
+\begin_layout Subsection*
+value (optional): 
+\begin_inset Flex Emph
+status collapsed
+
+\begin_layout Plain Layout
+double
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+Fortran:
+\end_layout
+
+\begin_layout LyX-Code
+DOUBLE PRECISION :: value
+\end_layout
+
+\begin_layout Standard
+Defines the value of a scalar.
+ If both, the label and the value, are set then only the label will be written
+ into a file.
+\end_layout
+
+\begin_layout Subsection*
+bounds (optional): 
+\begin_inset Flex Emph
+status collapsed
+
+\begin_layout Plain Layout
+1D-array of double
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+Fortran:
+\end_layout
+
+\begin_layout LyX-Code
+DOUBLE PRECISION :: bounds(:)
+\end_layout
+
+\begin_layout Standard
+Defines (two) scalar boundaries.
+ The array size must should be equal to 2.
+\end_layout
+
+\begin_layout Subsection*
+bounds_name (optional): 
+\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=*) :: bounds_name
+\end_layout
+
+\begin_layout Standard
+Defines the name of scalar bounds as it will appear in a file.
+ If not defined, the name will be generated automatically based on the scalar
+ id.
+\end_layout
+
+\begin_layout Subsection*
+prec (optional): 
+\emph on
+integer
+\end_layout
+
+\begin_layout Standard
+Fortran:
+\end_layout
+
+\begin_layout LyX-Code
+INTEGER :: prec
+\end_layout
+
+\begin_layout Standard
+Defines the precision in bytes of scalar value and boundaries as it will
+ be written into an output file.
+ Available values are: 2 (integer), 4 (float single precision) and 8 (float
+ double precision).
+ The default value is 8.
+\end_layout
+
+\begin_layout Subsection*
+label (optional): 
+\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=*) :: label
+\end_layout
+
+\begin_layout Standard
+Defines the label of a scalar.
+ If both, the label and the value, are set then only the label will be output
+ into a file.
+\end_layout
+
+\begin_layout Subsection*
+scalar_ref (optional): string
+\end_layout
+
+\begin_layout Standard
+Fortran:
+\end_layout
+
+\begin_layout LyX-Code
+CHARACTER(LEN=*) :: scalar_ref
+\end_layout
+
+\begin_layout Standard
+Defines the reference to a scalar.
+ All attributes will be inherited from the referenced scalar via the classical
+ inheritance mechanism.
+ The value assigned to the referenced scalar will be transmitted to the
+ current scalar.
+\end_layout
+
+\begin_layout Subsection*
+positive (optional): 
+\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
+Defines the positive direction for fields representing height or depth.
+\end_layout
+
+\begin_layout Subsection*
+axis_type (optional): 
+\begin_inset Flex Emph
+status collapsed
+
+\begin_layout Plain Layout
+enumeration {X, Y, Z, T}
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+Fortran:
+\end_layout
+
+\begin_layout LyX-Code
+CHARACTER(LEN=*) :: axis_type
+\end_layout
+
+\begin_layout Standard
+Defines the type of a (scalar) axis.
+ The values correspond to the following axis types:
+\end_layout
+
+\begin_layout Itemize
+
+\series bold
+\shape italic
+X:
+\series default
+\shape default
+ longitude
+\end_layout
+
+\begin_layout Itemize
+
+\series bold
+\shape italic
+\emph on
+Y
+\emph default
+:
+\series default
+\shape default
+ latitude
+\end_layout
+
+\begin_layout Itemize
+
+\series bold
+\shape italic
+\emph on
+Z
+\emph default
+:
+\series default
+\shape default
+ vertical axis
+\end_layout
+
+\begin_layout Itemize
+
+\series bold
+\shape italic
+T: 
+\series default
+\shape default
+time axis.
+\end_layout
+
+\begin_layout Subsection*
+comment: 
+\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=*) :: comment
+\end_layout
+
+\begin_layout Standard
+Allows a user to set a comment.
+ 
+\end_layout
+
+\begin_layout Section
+Axis attribute reference
+\end_layout
+
+\begin_layout Subsection*
+name (optional): 
+\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=*) :: name
+\end_layout
+
+\begin_layout Standard
+Defines the name of a vertical axis as it will appear in an output file.
+ If not defined, the name will be generated automatically based on the axis
+ id.
+ If multiple vertical axes are defined in the same file, each axis must
+ have a unique name.
+ 
+\end_layout
+
+\begin_layout Subsection*
+standard_name (optional): 
+\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
+Defines the standard name of a vertical axis as it will appear in the axis'
+ metadata in an output file.
+ 
+\end_layout
+
+\begin_layout Subsection*
+long_name (optional): 
+\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
+Defines the long name of a vertical axis as it will appear in the axis'
+ metadata in an output file.
+ 
+\end_layout
+
+\begin_layout Subsection*
+unit (optional): 
+\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=*) :: unit
+\end_layout
+
+\begin_layout Standard
+Defines the unit of an axis as it will appear in the axis' metadata in an
+ output file.
+\end_layout
+
+\begin_layout Subsection*
+dim_name (optional): 
+\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=*) :: dim_name
+\end_layout
+
+\begin_layout Standard
+Defines the name of axis dimension as it will appear in the file's metadata.
+\end_layout
+
+\begin_layout Subsection*
+formula (optional): 
+\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=*) :: formula
+\end_layout
+
+\begin_layout Standard
+Adds the formula attribute to a parametric vertical axis.
+\end_layout
+
+\begin_layout Subsection*
+formula_term (optional): 
+\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=*) :: formula_term
+\end_layout
+
+\begin_layout Standard
+Adds the formula terms attribute to a parametric vertical axis.
+\end_layout
+
+\begin_layout Subsection*
+formula_bounds (optional): 
+\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=*) :: formula_bounds
+\end_layout
+
+\begin_layout Standard
+Adds the formula attribute to the bounds of a parametric vertical axis.
+ The attribute is mandatory if the 
+\begin_inset Flex Strong
+status collapsed
+
+\begin_layout Plain Layout
+formula
+\end_layout
+
+\end_inset
+
+ attribute is defined for the axis.
+\end_layout
+
+\begin_layout Subsection*
+formula_term_bounds (optional): 
+\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=*) :: formula_term_bounds
+\end_layout
+
+\begin_layout Standard
+Adds the formula terms attribute to the bounds of a parametric vertical
+ axis.
+ The attribute is mandatory if the 
+\begin_inset Flex Strong
+status collapsed
+
+\begin_layout Plain Layout
+formula
+\end_layout
+
+\end_inset
+
+ attribute is defined for the axis.
+\end_layout
+
+\begin_layout Subsection*
+n_glo (mandatory): 
+\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_glo
+\end_layout
+
+\begin_layout Standard
+Defines the global size of an axis.
+\end_layout
+
+\begin_layout Subsection*
+begin (optional): 
+\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
+Defines the beginning index of the local domain.
+ It can take value between 0 and 
+\begin_inset Flex Strong
+status collapsed
+
+\begin_layout Plain Layout
+n_glo-1
+\end_layout
+
+\end_inset
+
+.
+ If not specified the default value is 0.
+\end_layout
+
+\begin_layout Subsection*
+n (optional): 
+\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
+Defines the local size of an axis.
+ It can take value between 0 and 
+\begin_inset Flex Strong
+status collapsed
+
+\begin_layout Plain Layout
+n_glo
+\end_layout
+
+\end_inset
+
+.
+ If not specified the default value is 
+\begin_inset Flex Strong
+status collapsed
+
+\begin_layout Plain Layout
+n_glo
+\end_layout
+
+\end_inset
+
+.
+ Local axis decomposition can be declared either with attributes 
+\series bold
+\shape italic
+{n, begin}
+\series default
+\shape default
+ or with 
+\series bold
+\shape italic
+index
+\series default
+\shape default
+.
+\end_layout
+
+\begin_layout Subsection*
+index (optional): 
+\begin_inset Flex Emph
+status collapsed
+
+\begin_layout Plain Layout
+1D-array of double
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+Fortran:
+\end_layout
+
+\begin_layout LyX-Code
+DOUBLE PRECISION :: index(:)
+\end_layout
+
+\begin_layout Standard
+Defines the global indexes of a local axis held by each process.
+ If the attribute is specified, its array size must be equal to 
+\begin_inset Flex Strong
+status collapsed
+
+\begin_layout Plain Layout
+n
+\end_layout
+
+\end_inset
+
+.
+ Local axis decomposition can be declared either with attributes 
+\series bold
+\shape italic
+{n, begin}
+\series default
+\shape default
+ or with 
+\series bold
+\shape italic
+index
+\series default
+\shape default
+.
+\end_layout
+
+\begin_layout Subsection*
+value (optional): 
+\begin_inset Flex Emph
+status collapsed
+
+\begin_layout Plain Layout
+1D-array of double
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+Fortran:
+\end_layout
+
+\begin_layout LyX-Code
+DOUBLE PRECISION :: value(:)
+\end_layout
+
+\begin_layout Standard
+Defines the value of each level of a vertical axis.
+ The array size must be equal to the value of the attribute 
+\begin_inset Flex Strong
+status collapsed
+
+\begin_layout Plain Layout
+n
+\end_layout
+
+\end_inset
+
+.
+ If the label is provided then only the label will be written into a file
+ and not the axis value and the axis boundaries.
+\end_layout
+
+\begin_layout Subsection*
+bounds (optional): 
+\begin_inset Flex Emph
+status collapsed
+
+\begin_layout Plain Layout
+2D-array of double
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+Fortran:
+\end_layout
+
+\begin_layout LyX-Code
+DOUBLE PRECISION :: bounds(:,:)
+\end_layout
+
+\begin_layout Standard
+Defines the boundaries of each level of a vertical axis.
+ The dimensions of the array must be 
+\begin_inset Formula $2\times n$
+\end_inset
+
+.
+\end_layout
+
+\begin_layout Subsection*
+bounds_name (optional): 
+\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=*) :: bounds_name
+\end_layout
+
+\begin_layout Standard
+Defines the name of axis boundaries as it will appear in a file.
+ If not defined, the name will be generated automatically based on the axis
+ id.
+\end_layout
+
+\begin_layout Subsection*
+prec (optional): 
+\emph on
+integer
+\end_layout
+
+\begin_layout Standard
+Fortran:
+\end_layout
+
+\begin_layout LyX-Code
+INTEGER :: prec
+\end_layout
+
+\begin_layout Standard
+Defines the precision in bytes of axis value and boundaries as it will be
+ written into an output file.
+ Available values are: 2 (integer), 4 (float single precision) and 8 (float
+ double precision).
+ The default value is 8.
+\end_layout
+
+\begin_layout Subsection*
+label (optional): 
+\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, ALLOCATABLE :: label(:)
+\end_layout
+
+\begin_layout Standard
+Defines the label of an axis.
+ The size of the array must be equal to the value of the attribute 
+\begin_inset Flex Strong
+status collapsed
+
+\begin_layout Plain Layout
+n
+\end_layout
+
+\end_inset
+
+.
+ If the label is provided then only the label will be written into a file
+ and not the axis value and the axis boundaries.
+\end_layout
+
+\begin_layout Subsection*
+data_begin (optional):
+\emph on
+ integer
+\end_layout
+
+\begin_layout Standard
+Fortran:
+\end_layout
+
+\begin_layout LyX-Code
+INTEGER :: data_begin
+\end_layout
+
+\begin_layout Standard
+Defines the beginning index of local field data owned by each process.
+ The attribute is an offset relative to 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.
+ The 0-value means that the local domain matches the data in memory.
+ The default value is 0.
+ The attributes 
+\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 (optional): 
+\emph on
+integer
+\end_layout
+
+\begin_layout Standard
+Fortran:
+\end_layout
+
+\begin_layout LyX-Code
+INTEGER :: data_n
+\end_layout
+
+\begin_layout Standard
+Defines the size of local field data.
+ The attribute can take value starting from 0 (no data on a process).
+ The default value is 
+\begin_inset Flex Strong
+status collapsed
+
+\begin_layout Plain Layout
+n
+\end_layout
+
+\end_inset
+
+.
+ The attributes 
+\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 (optional): 
+\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, the attribute defines the position
+ of data points stored in the memory.
+ The array size has to be equal to 
+\begin_inset Flex Strong
+status collapsed
+
+\begin_layout Plain Layout
+data_n
+\end_layout
+
+\end_inset
+
+.
+ For example, for a local axis of size 
+\begin_inset Flex Strong
+status collapsed
+
+\begin_layout Plain Layout
+n=3
+\end_layout
+
+\end_inset
+
+ and local data size of 
+\begin_inset Flex Strong
+status collapsed
+
+\begin_layout Plain Layout
+data_n=5
+\end_layout
+
+\end_inset
+
+, if 
+\begin_inset Flex Strong
+status collapsed
+
+\begin_layout Plain Layout
+data_index=(/ -1, 2, 1, 0, -1 /)
+\end_layout
+
+\end_inset
+
+ then the first and the last data points are ghosts and only the three middle
+ values will be written in the reversed order.
+\end_layout
+
+\begin_layout Subsection*
+mask (optional): 
+\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
+Defines 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 an output file.
+\end_layout
+
+\begin_layout Subsection*
+n_distributed_partition (optional): 
+\emph on
+integer
+\end_layout
+
+\begin_layout Standard
+Fortran:
+\end_layout
+
+\begin_layout LyX-Code
+INTEGER :: n_distributed_partition
+\end_layout
+
+\begin_layout Standard
+Defines the number of local axes in case if the axis is generated automatically
+ by XIOS.
+ The default value is 
+\begin_inset Flex Strong
+status collapsed
+
+\begin_layout Plain Layout
+1
+\end_layout
+
+\end_inset
+
+.
+\end_layout
+
+\begin_layout Subsection*
+axis_ref (optional): string
+\end_layout
+
+\begin_layout Standard
+Fortran:
+\end_layout
+
+\begin_layout LyX-Code
+CHARACTER(LEN=*) :: axis_ref
+\end_layout
+
+\begin_layout Standard
+Defines the reference of an axis.
+ All attributes will be inherited from the referenced axis with the classical
+ inheritance mechanism.
+ The value assigned to the referenced axis will be transmitted to the current
+ axis.
+\end_layout
+
+\begin_layout Subsection*
+positive (optional): 
+\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
+Defines the positive direction for fields representing height or depth.
+\end_layout
+
+\begin_layout Subsection*
+axis_type (optional): 
+\begin_inset Flex Emph
+status collapsed
+
+\begin_layout Plain Layout
+enumeration {X, Y, Z, T}
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+Fortran:
+\end_layout
+
+\begin_layout LyX-Code
+CHARACTER(LEN=*) :: axis_type
+\end_layout
+
+\begin_layout Standard
+Defines the type of an axis.
+ The values correspond to the following axis types:
+\end_layout
+
+\begin_layout Itemize
+
+\series bold
+\shape italic
+X:
+\series default
+\shape default
+ longitude
+\end_layout
+
+\begin_layout Itemize
+
+\series bold
+\shape italic
+\emph on
+Y
+\emph default
+:
+\series default
+\shape default
+ latitude
+\end_layout
+
+\begin_layout Itemize
+
+\series bold
+\shape italic
+\emph on
+Z
+\emph default
+:
+\series default
+\shape default
+ vertical axis
+\end_layout
+
+\begin_layout Itemize
+
+\series bold
+\shape italic
+T: 
+\series default
+\shape default
+time axis.
+\end_layout
+
+\begin_layout Subsection*
+comment (optional): 
+\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=*) :: comment
+\end_layout
+
+\begin_layout Standard
+Allows a user to set a comment.
+ 
+\end_layout
+
+\begin_layout Section
+Domain attribute reference
+\end_layout
+
+\begin_layout Subsection*
+name (optional): 
+\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=*) :: name
+\end_layout
+
+\begin_layout Standard
+Defines the name of a horizontal domain.
+ This attribute may be used in case of multiple domains defined in the same
+ file.
+ In this case, the 
+\begin_inset Flex Strong
+status collapsed
+
+\begin_layout Plain Layout
+name
+\end_layout
+
+\end_inset
+
+ attribute will be suffixed to the longitude and latitude dimensions and
+ axis name.
+ If the domain name is not provided, it will be generated automatically.
+\end_layout
+
+\begin_layout Subsection*
+standard_name (optional): 
+\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
+Defines the standard name of a domain as it will appear in the domain's
+ metadata in an output file.
+ 
+\end_layout
+
+\begin_layout Subsection*
+long_name (optional): 
+\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
+Defines the long name of a domain as it will appear in the domain's metadata
+ in an output file.
+ 
+\end_layout
+
+\begin_layout Subsection*
+type (mandatory): 
+\begin_inset Flex Emph
+status collapsed
+
+\begin_layout Plain Layout
+enumeration {rectilinear, curvilinear, unstructured, gaussian}
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+Fortran:
+\end_layout
+
+\begin_layout LyX-Code
+CHARACTER(LEN=*) :: type
+\end_layout
+
+\begin_layout Standard
+Defines the type of a grid.
+\end_layout
+
+\begin_layout Subsection*
+dim_i_name (optional): 
+\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=*) :: dim_i_name
+\end_layout
+
+\begin_layout Standard
+Defines the name of the first domain dimension as it will appear in the
+ file's metadata.
+\end_layout
+
+\begin_layout Subsection*
+dim_j_name (optional): 
+\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=*) :: dim_j_name
+\end_layout
+
+\begin_layout Standard
+Defines the name of the second domain dimension as it will appear in file's
+ metadata.
+\end_layout
+
+\begin_layout Subsection*
+ni_glo (mandatory): 
+\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_glo
+\end_layout
+
+\begin_layout Standard
+Defines the size of the first dimension of the global domain.
+\end_layout
+
+\begin_layout Subsection*
+nj_glo (mandatory): 
+\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_glo
+\end_layout
+
+\begin_layout Standard
+Defines the size of the second dimension of the global domain.
+\end_layout
+
+\begin_layout Subsection*
+ibegin (optional): 
+\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
+Defines the beginning index of the first dimension of a local domain.
+ The attribute takes value 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 (optional): 
+\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
+Defines the size of the first dimension of a local domain.
+ The attribute takes value 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 (optional): 
+\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
+Defines the beginning index of the second dimension of a local domain.
+ The attribute takes value 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
+
+.
+ 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 (optional): 
+\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
+Defines the size of the second dimension of a local domain.
+ he attribute takes value 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
+
+.
+ If not specified the default value is 
+\begin_inset Flex Strong
+status collapsed
+
+\begin_layout Plain Layout
+nj_glo
+\end_layout
+
+\end_inset
+
+.
+\end_layout
+
+\begin_layout Subsection*
+lonvalue_1d (optional): 
+\emph on
+1D-array of double
+\end_layout
+
+\begin_layout Standard
+Fortran:
+\end_layout
+
+\begin_layout LyX-Code
+DOUBLE PRECISION :: lonvalue(:)
+\end_layout
+
+\begin_layout Standard
+Defines the longitude values of a local domain.
+ For a cartesian grid, the array size should be 
+\begin_inset Flex Strong
+status collapsed
+
+\begin_layout Plain Layout
+ni
+\end_layout
+
+\end_inset
+
+.
+ For a curvilinear grid, the array size should be 
+\begin_inset Flex Strong
+status collapsed
+
+\begin_layout Plain Layout
+ni
+\begin_inset Formula $\times$
+\end_inset
+
+nj
+\end_layout
+
+\end_inset
+
+.
+\end_layout
+
+\begin_layout Subsection*
+lonvalue_2d (optional): 
+\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
+Defines the longitude values of a local domain.
+ For cartesian and curvilinear grids the array size should be 
+\begin_inset Flex Strong
+status collapsed
+
+\begin_layout Plain Layout
+ni
+\begin_inset Formula $\times$
+\end_inset
+
+nj
+\end_layout
+
+\end_inset
+
+.
+ Only lonvalue_1d or lonvalue_2d can be defined.
+ Also the layout of latitude and longitude should be in conformance with
+ each other: either 1D or 2D.
+\end_layout
+
+\begin_layout Subsection*
+latvalue_1d (optional): 
+\emph on
+1D-array of double
+\end_layout
+
+\begin_layout Standard
+Fortran:
+\end_layout
+
+\begin_layout LyX-Code
+DOUBLE PRECISION :: latvalue(:)
+\end_layout
+
+\begin_layout Standard
+Defines the latitude values of a local domain.
+ For a cartesian grid, the size of the array will be nj.
+ For 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
+
+.
+ 
+\end_layout
+
+\begin_layout Subsection*
+latvalue_2d (optional): 
+\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
+Defines the latitude values of a local domain.
+ For cartesian and curvilinear grids the array size should be 
+\begin_inset Flex Strong
+status collapsed
+
+\begin_layout Plain Layout
+ni
+\begin_inset Formula $\times$
+\end_inset
+
+nj
+\end_layout
+
+\end_inset
+
+.
+ Only latvalue_1d or latvalue_2d can be defined.
+ Also the layout of latitude and longitude should be in conformance with
+ each other: either 1D or 2D.
+\end_layout
+
+\begin_layout Subsection*
+lon_name (optional): 
+\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=*) :: lon_name
+\end_layout
+
+\begin_layout Standard
+Defines the longitude name as it will appear in an output file.
+\end_layout
+
+\begin_layout Subsection*
+lat_name (optional): 
+\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=*) :: lat_name
+\end_layout
+
+\begin_layout Standard
+Defines the latitude name as it will appear in an output file.
+\end_layout
+
+\begin_layout Subsection*
+nvertex (optional): 
+\emph on
+integer
+\end_layout
+
+\begin_layout Standard
+Fortran:
+\end_layout
+
+\begin_layout LyX-Code
+INTEGER :: nvertex
+\end_layout
+
+\begin_layout Standard
+Defines the maximum number of vertices for a grid.
+ The attribute is required for specifying the cell boundaries of unstructured
+ meshes.
+\end_layout
+
+\begin_layout Subsection*
+bounds_lon_1d (optional): 
+\emph on
+2D-array of double
+\end_layout
+
+\begin_layout Standard
+Fortran:
+\end_layout
+
+\begin_layout LyX-Code
+DOUBLE PRECISION :: bounds_lon(:,:)
+\end_layout
+
+\begin_layout Standard
+Defines the longitude values of domain vertexes.
+ The attribute 
+\begin_inset Flex Strong
+status collapsed
+
+\begin_layout Plain Layout
+nvertex
+\end_layout
+
+\end_inset
+
+ must be also defined.
+ The array dimensions must be 
+\begin_inset Formula $\textbf{nvertex}\times\textbf{ni}$
+\end_inset
+
+.
+\end_layout
+
+\begin_layout Subsection*
+bounds_lon_2d (optional): 
+\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
+Defines the longitude values of domain vertexes.
+ The attribute 
+\begin_inset Flex Strong
+status collapsed
+
+\begin_layout Plain Layout
+nvertex
+\end_layout
+
+\end_inset
+
+ must be also defined.
+ This attribute is useful when lonvalue_2d is defined.
+ The array dimensions must be 
+\begin_inset Formula $\textbf{nvertex}\times\textbf{ni}\times\textbf{nj}$
+\end_inset
+
+.
+ Either bounds_lon_1d or bounds_lon_2d can be defined.
+\end_layout
+
+\begin_layout Subsection*
+bounds_lat_1d (optional): 
+\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
+Defines the latitude values of domain vertexes.
+ The attribute 
+\begin_inset Flex Strong
+status collapsed
+
+\begin_layout Plain Layout
+nvertex
+\end_layout
+
+\end_inset
+
+ must be also defined.
+ The array dimensions must be 
+\begin_inset Formula $\textbf{nvertex}\times\textbf{ni}$
+\end_inset
+
+.
+\end_layout
+
+\begin_layout Subsection*
+bounds_lat_2d (optional): 
+\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
+Defines the latitude values of domain vertexes.
+ The attribute 
+\begin_inset Flex Strong
+status collapsed
+
+\begin_layout Plain Layout
+nvertex
+\end_layout
+
+\end_inset
+
+ must be also defined.
+ The attribute is useful when lonvalue_2d is defined.
+ The array dimensions must be 
+\begin_inset Formula $\textbf{nvertex}\times\textbf{ni}\times\textbf{nj}$
+\end_inset
+
+.
+ Either bounds_lon_1d or bounds_lon_2d can be defined.
+\end_layout
+
+\begin_layout Subsection*
+bounds_lon_name (optional): 
+\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=*) :: lon_name
+\end_layout
+
+\begin_layout Standard
+Defines the longitude name of domain vertexes as it will appear in an output
+ file.
+\end_layout
+
+\begin_layout Subsection*
+bounds_lat_name (optional): 
+\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=*) :: lat_name
+\end_layout
+
+\begin_layout Standard
+Defines the latitude name of domain vertexes as it will appear in an output
+ file.
+\end_layout
+
+\begin_layout Subsection*
+area (optional): 
+\emph on
+2D-array of double
+\end_layout
+
+\begin_layout Standard
+Fortran:
+\end_layout
+
+\begin_layout LyX-Code
+DOUBLE PRECISION :: area(:,:)
+\end_layout
+
+\begin_layout Standard
+The area of cells.
+ The size of the array must be 
+\begin_inset Flex Strong
+status collapsed
+
+\begin_layout Plain Layout
+ni
+\begin_inset Formula $\times$
+\end_inset
+
+nj
+\end_layout
+
+\end_inset
+
+.
+\end_layout
+
+\begin_layout Subsection*
+prec (optional): 
+\emph on
+integer
+\end_layout
+
+\begin_layout Standard
+Fortran:
+\end_layout
+
+\begin_layout LyX-Code
+INTEGER :: prec
+\end_layout
+
+\begin_layout Standard
+Defines the precision in bytes of domain attributes.
+ Available values are: 2 (integer), 4 (float single precision) and 8 (float
+ double precision).
+ The default value of 8.
+\end_layout
+
+\begin_layout Subsection*
+data_dim (optional): 
+\emph on
+integer
+\end_layout
+
+\begin_layout Standard
+Fortran:
+\end_layout
+
+\begin_layout LyX-Code
+INTEGER :: datadim
+\end_layout
+
+\begin_layout Standard
+Defines how a field is stored on memory for the client code.
+ The value can be either 
+\begin_inset Flex Strong
+status collapsed
+
+\begin_layout Plain Layout
+1
+\end_layout
+
+\end_inset
+
+ or 
+\begin_inset Flex Strong
+status collapsed
+
+\begin_layout Plain Layout
+2
+\end_layout
+
+\end_inset
+
+.
+ The value of 
+\begin_inset Flex Strong
+status collapsed
+
+\begin_layout Plain Layout
+1
+\end_layout
+
+\end_inset
+
+ indicates that the horizontal layer of the field is stored as a 1D array.
+ The value of 
+\begin_inset Flex Strong
+status collapsed
+
+\begin_layout Plain Layout
+2
+\end_layout
+
+\end_inset
+
+ indicates that the horizontal layer is stored as a 2D array.
+ The default value is 
+\begin_inset Flex Strong
+status collapsed
+
+\begin_layout Plain Layout
+1
+\end_layout
+
+\end_inset
+
+.
+\end_layout
+
+\begin_layout Subsection*
+data_ibegin (optional):
+\emph on
+ integer
+\end_layout
+
+\begin_layout Standard
+Fortran:
+\end_layout
+
+\begin_layout LyX-Code
+INTEGER :: data_ibegin
+\end_layout
+
+\begin_layout Standard
+Defines the beginning index of field data for the first dimension.
+ This attribute is an offset relative to the local domain, 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.
+ The default value is 0.
+ The attributes 
+\begin_inset Flex Strong
+status collapsed
+
+\begin_layout Plain Layout
+data_ibegin
+\end_layout
+
+\end_inset
+
+ and 
+\begin_inset Flex Strong
+status collapsed
+
+\begin_layout Plain Layout
+data_ni
+\end_layout
+
+\end_inset
+
+ must be defined together.
+\end_layout
+
+\begin_layout Subsection*
+data_ni (optional): 
+\emph on
+integer
+\end_layout
+
+\begin_layout Standard
+Fortran:
+\end_layout
+
+\begin_layout LyX-Code
+INTEGER :: data_ni
+\end_layout
+
+\begin_layout Standard
+Defines the size of field data for the first dimension.
+ The default value is 
+\begin_inset Flex Strong
+status collapsed
+
+\begin_layout Plain Layout
+ni
+\end_layout
+
+\end_inset
+
+.
+ The attributes 
+\begin_inset Flex Strong
+status collapsed
+
+\begin_layout Plain Layout
+data_ibegin
+\end_layout
+
+\end_inset
+
+ and 
+\begin_inset Flex Strong
+status collapsed
+
+\begin_layout Plain Layout
+data_ni
+\end_layout
+
+\end_inset
+
+ must be defined together.
+\end_layout
+
+\begin_layout Subsection*
+data_jbegin (optional): 
+\emph on
+integer
+\end_layout
+
+\begin_layout Standard
+Fortran:
+\end_layout
+
+\begin_layout LyX-Code
+INTEGER :: data_jbegin
+\end_layout
+
+\begin_layout Standard
+Defines the beginning index of field data for the second dimension.
+ The attribute is taken into account only if
+\begin_inset Flex Strong
+status collapsed
+
+\begin_layout Plain Layout
+ data_dim=2
+\end_layout
+
+\end_inset
+
+.
+ The attribute is an offset relative to the local domain, so the value can
+ be negative.
+ A negative value indicate that only some valid part of the data will extracted,
+ for example in case of ghost cell.
+ A positive value indicate that the local domain is greater than the data
+ stored in memory.
+ The 0-value means that the local domain matches the data in memory.
+ The default value is 
+\begin_inset Flex Strong
+status collapsed
+
+\begin_layout Plain Layout
+0
+\end_layout
+
+\end_inset
+
+.
+ The attributes 
+\begin_inset Flex Strong
+status collapsed
+
+\begin_layout Plain Layout
+data_jbegin
+\end_layout
+
+\end_inset
+
+ and 
+\begin_inset Flex Strong
+status collapsed
+
+\begin_layout Plain Layout
+data_nj
+\end_layout
+
+\end_inset
+
+ must be defined together.
+\end_layout
+
+\begin_layout Subsection*
+data_nj (optional): 
+\emph on
+integer
+\end_layout
+
+\begin_layout Standard
+Fortran:
+\end_layout
+
+\begin_layout LyX-Code
+INTEGER :: data_nj
+\end_layout
+
+\begin_layout Standard
+Defines the size of field data for the second dimension.
+ The attribute is taken account only if 
+\begin_inset Flex Strong
+status collapsed
+
+\begin_layout Plain Layout
+data_dim=2
+\end_layout
+
+\end_inset
+
+.
+ The default value is 
+\begin_inset Flex Strong
+status collapsed
+
+\begin_layout Plain Layout
+nj
+\end_layout
+
+\end_inset
+
+.
+ The attributes 
+\begin_inset Flex Strong
+status collapsed
+
+\begin_layout Plain Layout
+data_jbegin
+\end_layout
+
+\end_inset
+
+ and 
+\begin_inset Flex Strong
+status collapsed
+
+\begin_layout Plain Layout
+data_nj
+\end_layout
+
+\end_inset
+
+ must be defined together.
+\end_layout
+
+\begin_layout Subsection*
+data_i_index (optional): 
+\emph on
+1D-array of integer
+\end_layout
+
+\begin_layout Standard
+Fortran:
+\end_layout
+
+\begin_layout LyX-Code
+INTEGER :: data_i_index(:)
+\end_layout
+
+\begin_layout Standard
+In case of a compressed horizontal domain, define the data indexation for
+ the first dimension.
+ The array size must be 
+\begin_inset Flex Strong
+status collapsed
+
+\begin_layout Plain Layout
+data_n
+\end_layout
+
+\end_inset
+
+.
+\end_layout
+
+\begin_layout Subsection*
+data_j_index (optional): 
+\emph on
+1D-array of integer
+\end_layout
+
+\begin_layout Standard
+Fortran:
+\end_layout
+
+\begin_layout LyX-Code
+INTEGER :: data_j_index(:)
+\end_layout
+
+\begin_layout Standard
+In case of a compressed horizontal domain, defines the data indexation for
+ the second dimension.
+ The attribute is meaningful only if 
+\begin_inset Flex Strong
+status collapsed
+
+\begin_layout Plain Layout
+data_dim=2
+\end_layout
+
+\end_inset
+
+.
+\end_layout
+
+\begin_layout Subsection*
+mask_1d (optional): 
+\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
+Defines the 1D mask of a 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 an output file.
+ This value is useful in case a field is stored linearly in memory.
+ By default none of the values are masked.
+\end_layout
+
+\begin_layout Subsection*
+mask_2d (optional): 
+\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
+Defines the 2D mask of a local domain.
+ The masked values 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 an output file.
+ By default, none of the values are masked.
+ Only mask_2d or mask_1d can be defined.
+\end_layout
+
+\begin_layout Subsection*
+domain_ref (optional): string
+\end_layout
+
+\begin_layout Standard
+Fortran:
+\end_layout
+
+\begin_layout LyX-Code
+CHARACTER(LEN=*) :: domain_ref
+\end_layout
+
+\begin_layout Standard
+Defines the reference to a domain.
+ All attributes are inherited from the referenced domain with the classic
+ inheritance mechanism.
+ The value assigned to the referenced domain is transmitted to to current
+ domain.
+\end_layout
+
+\begin_layout Subsection*
+i_index (optional): 
+\begin_inset Flex Emph
+status collapsed
+
+\begin_layout Plain Layout
+1D-array of double
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+Fortran:
+\end_layout
+
+\begin_layout LyX-Code
+DOUBLE PRECISION :: i_index(:)
+\end_layout
+
+\begin_layout Standard
+Defines the global index of the first dimension of a local domain held by
+ a process.
+ By default the size of the array is equal to 
+\begin_inset Flex Strong
+status collapsed
+
+\begin_layout Plain Layout
+ni*nj
+\end_layout
+
+\end_inset
+
+.
+\end_layout
+
+\begin_layout Subsection*
+j_index (optional): 
+\begin_inset Flex Emph
+status collapsed
+
+\begin_layout Plain Layout
+1D-array of double
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+Fortran:
+\end_layout
+
+\begin_layout LyX-Code
+DOUBLE PRECISION :: j_index(:)
+\end_layout
+
+\begin_layout Standard
+Defines the global index of the second dimension of a local domain held
+ by a process.
+ By default the size of the array is equal to 
+\begin_inset Flex Strong
+status collapsed
+
+\begin_layout Plain Layout
+ni*nj
+\end_layout
+
+\end_inset
+
+.
+\end_layout
+
+\begin_layout Subsection*
+comment (optional): 
+\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=*) :: comment
+\end_layout
+
+\begin_layout Standard
+Allows a user to set a comment.
+\end_layout
+
+\begin_layout Section
+Grid attribute reference
+\end_layout
+
+\begin_layout Subsection*
+name (optional): string
+\end_layout
+
+\begin_layout Standard
+Fortran:
+\end_layout
+
+\begin_layout LyX-Code
+CHARACTER(LEN=*) :: name
+\end_layout
+
+\begin_layout Standard
+Defines the name of a grid.
+\end_layout
+
+\begin_layout Subsection*
+description (optional): string
+\end_layout
+
+\begin_layout Standard
+Fortran:
+\end_layout
+
+\begin_layout LyX-Code
+CHARACTER(LEN=*) :: description
+\end_layout
+
+\begin_layout Standard
+Defines the descriptions of a grid.
+\end_layout
+
+\begin_layout Subsection*
+mask_1d (optional): 
+\emph on
+1D-array of bool
+\end_layout
+
+\begin_layout Standard
+Fortran:
+\end_layout
+
+\begin_layout LyX-Code
+LOGICAL :: mask_1d(:)
+\end_layout
+
+\begin_layout Standard
+Defines the mask of a local 1D grid.
+ Masked values 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 an output file.
+ By default none of the value are masked.
+\end_layout
+
+\begin_layout Subsection*
+mask_2d (optional): 
+\emph on
+2D-array of bool
+\end_layout
+
+\begin_layout Standard
+Fortran:
+\end_layout
+
+\begin_layout LyX-Code
+LOGICAL :: mask_2d(:,:)
+\end_layout
+
+\begin_layout Standard
+Defines the mask of a local 2D grid.
+ Masked values 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 an output file.
+ By default none of the value are masked.
+\end_layout
+
+\begin_layout Subsection*
+mask_3d (optional): 
+\emph on
+3D-array of bool
+\end_layout
+
+\begin_layout Standard
+Fortran:
+\end_layout
+
+\begin_layout LyX-Code
+LOGICAL :: mask_3d(:,:,:)
+\end_layout
+
+\begin_layout Standard
+Define the mask of a local 3D grid.
+ Masked values 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 an output file.
+ By default none of the value are masked.
+\end_layout
+
+\begin_layout Subsection*
+mask_4d (optional): 
+\emph on
+4D-array of bool
+\end_layout
+
+\begin_layout Standard
+Fortran:
+\end_layout
+
+\begin_layout LyX-Code
+LOGICAL :: mask_4d(:,:,:)
+\end_layout
+
+\begin_layout Standard
+Define the mask of a local 4D grid.
+ Masked values 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 an output file.
+ By default none of the value are masked.
+\end_layout
+
+\begin_layout Subsection*
+mask_5d (optional): 
+\emph on
+5D-array of bool
+\end_layout
+
+\begin_layout Standard
+Fortran:
+\end_layout
+
+\begin_layout LyX-Code
+LOGICAL :: mask_5d(:,:,:)
+\end_layout
+
+\begin_layout Standard
+Define the mask of a local 5D grid.
+ Masked values 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 an output file.
+ By default none of the value are masked.
+\end_layout
+
+\begin_layout Subsection*
+mask_6d (optional): 
+\emph on
+6D-array of bool
+\end_layout
+
+\begin_layout Standard
+Fortran:
+\end_layout
+
+\begin_layout LyX-Code
+LOGICAL :: mask_6d(:,:,:)
+\end_layout
+
+\begin_layout Standard
+Define the mask of a local 6D grid.
+ Masked values 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 an output file.
+ By default none of the value are masked.
+\end_layout
+
+\begin_layout Subsection*
+mask_7d (optional): 
+\emph on
+7D-array of bool
+\end_layout
+
+\begin_layout Standard
+Fortran:
+\end_layout
+
+\begin_layout LyX-Code
+LOGICAL :: mask_7d(:,:,:)
+\end_layout
+
+\begin_layout Standard
+Define the mask of a local 7D grid.
+ Masked values 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 an output file.
+ By default none of the value are masked.
+\end_layout
+
+\begin_layout Subsection*
+comment (optional): 
+\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=*) :: comment
+\end_layout
+
+\begin_layout Standard
+Allows a user to set a comment.
+\end_layout
+
+\begin_layout Section
+Field attribute reference
+\end_layout
+
+\begin_layout Subsection*
+name (optional): 
+\emph on
+string
+\end_layout
+
+\begin_layout Standard
+Fortran:
+\end_layout
+
+\begin_layout LyX-Code
+CHARACTER(LEN=*) :: name
+\end_layout
+
+\begin_layout Standard
+Defines the name of a field as it will appear in an output file.
+ If not present, the identifier 
+\begin_inset Flex Strong
+status collapsed
+
+\begin_layout Plain Layout
+id
+\end_layout
+
+\end_inset
+
+ will be substituted.
+\end_layout
+
+\begin_layout Subsection*
+standard_name (optional): 
+\emph on
+string
+\end_layout
+
+\begin_layout Standard
+Fortran:
+\end_layout
+
+\begin_layout LyX-Code
+CHARACTER(LEN=*) :: standard_name
+\end_layout
+
+\begin_layout Standard
+Defines the 
+\begin_inset Flex Strong
+status collapsed
+
+\begin_layout Plain Layout
+standard_name
+\end_layout
+
+\end_inset
+
+ attribute as it will appear in the metadata of an output file.
+\end_layout
+
+\begin_layout Subsection*
+long_name (optional): 
+\emph on
+string
+\end_layout
+
+\begin_layout Standard
+Fortran: 
+\end_layout
+
+\begin_layout LyX-Code
+CHARACTER(LEN=*) :: long_name
+\end_layout
+
+\begin_layout Standard
+Defines the long name as it will appear in the metadata of an output file.
+\end_layout
+
+\begin_layout Subsection*
+expr (optional): 
+\emph on
+string
+\end_layout
+
+\begin_layout Standard
+Fortran: 
+\end_layout
+
+\begin_layout LyX-Code
+CHARACTER(LEN=*) :: expr
+\end_layout
+
+\begin_layout Standard
+Defines the expression for arithmetic or time-integration operations performed
+ on a field.
+ For example if 
+\series bold
+expr=
+\begin_inset Quotes erd
+\end_inset
+
+sqrt(@temp2 - pow(@temp, 2))
+\begin_inset Quotes erd
+\end_inset
+
+
+\series default
+ then the variance will be calculated on the incoming flux of the field
+ 
+\series bold
+temp
+\series default
+ (given that field temp2 that holds the square of temp was correctly defined).
+ 
+\end_layout
+
+\begin_layout Subsection*
+unit (optional): 
+\emph on
+string
+\end_layout
+
+\begin_layout Standard
+Fortran: 
+\end_layout
+
+\begin_layout LyX-Code
+CHARACTER(LEN=*) :: unit
+\end_layout
+
+\begin_layout Standard
+Defines the unit of a field.
+\end_layout
+
+\begin_layout Subsection*
+operation (mandatory): enumeration
+\emph on
+ {once, instant, average, maximum, minimum, accumulate}
+\end_layout
+
+\begin_layout Standard
+Fortran:
+\end_layout
+
+\begin_layout LyX-Code
+CHARACTER(LEN=*) :: operation
+\end_layout
+
+\begin_layout Standard
+Defines the temporal operation applied to a field.
+\end_layout
+
+\begin_layout Subsection*
+freq_op (optional): 
+\emph on
+duration
+\end_layout
+
+\begin_layout Standard
+Fortran:
+\end_layout
+
+\begin_layout LyX-Code
+TYPE(xios_duration) :: freq_op
+\end_layout
+
+\begin_layout Standard
+Defines the sampling frequency of a temporal operation, so that field values
+ will be used for temporal sampling at frequency 
+\begin_inset Flex Strong
+status collapsed
+
+\begin_layout Plain Layout
+freq_op
+\end_layout
+
+\end_inset
+
+.
+ It is useful for sub-processes called at different frequency in a model.
+ The default value is equal to the file attribute 
+\begin_inset Flex Strong
+status collapsed
+
+\begin_layout Plain Layout
+output_freq
+\end_layout
+
+\end_inset
+
+ for 
+\begin_inset Flex Strong
+status collapsed
+
+\begin_layout Plain Layout
+instant
+\end_layout
+
+\end_inset
+
+ operations and 
+\begin_inset Flex Strong
+status collapsed
+
+\begin_layout Plain Layout
+1ts
+\end_layout
+
+\end_inset
+
+ (1 time step) otherwise.
+\end_layout
+
+\begin_layout Subsection*
+freq_offset (optional): 
+\emph on
+duration
+\end_layout
+
+\begin_layout Standard
+Fortran:
+\end_layout
+
+\begin_layout LyX-Code
+TYPE(xios_duration) :: freq_offset
+\end_layout
+
+\begin_layout Standard
+Defines the offset when 
+\begin_inset Flex Strong
+status collapsed
+
+\begin_layout Plain Layout
+freq_op
+\end_layout
+
+\end_inset
+
+ is defined.
+ Accepted values lie between 
+\series bold
+0
+\series default
+ and 
+\begin_inset Flex Strong
+status collapsed
+
+\begin_layout Plain Layout
+freq_op
+\end_layout
+
+\end_inset
+
+.
+ The default value is 
+\begin_inset Flex Strong
+status collapsed
+
+\begin_layout Plain Layout
+freq_op - 1ts
+\end_layout
+
+\end_inset
+
+ for fields in the 
+\begin_inset Flex Strong
+status collapsed
+
+\begin_layout Plain Layout
+write
+\end_layout
+
+\end_inset
+
+ mode and 
+\series bold
+0
+\series default
+ for fields in the 
+\begin_inset Flex Strong
+status collapsed
+
+\begin_layout Plain Layout
+read
+\end_layout
+
+\end_inset
+
+ mode.
+\end_layout
+
+\begin_layout Subsection*
+level (optional): 
+\emph on
+integer
+\end_layout
+
+\begin_layout Standard
+Fortran:
+\end_layout
+
+\begin_layout LyX-Code
+INTEGER :: level
+\end_layout
+
+\begin_layout Standard
+Defines the output level of a field.
+ The field will be output only if the file attribute
+\begin_inset Flex Strong
+status collapsed
+
+\begin_layout Plain Layout
+ output_level 
+\begin_inset Formula $\geq$
+\end_inset
+
+level
+\end_layout
+
+\end_inset
+
+.
+ The default value is 
+\begin_inset Flex Strong
+status collapsed
+
+\begin_layout Plain Layout
+0
+\end_layout
+
+\end_inset
+
+.
+\end_layout
+
+\begin_layout Subsection*
+prec (optional): 
+\emph on
+integer
+\end_layout
+
+\begin_layout Standard
+Fortran:
+\end_layout
+
+\begin_layout LyX-Code
+INTEGER :: prec
+\end_layout
+
+\begin_layout Standard
+Defines the precision in bytes of a field in an output file.
+ Available values are: 2 (integer), 4 (float single precision) and 8 (float
+ double precision).
+ The default value of 8.
+\end_layout
+
+\begin_layout Subsection*
+enabled (optional): 
+\emph on
+bool
+\end_layout
+
+\begin_layout Standard
+Fortran:
+\end_layout
+
+\begin_layout LyX-Code
+LOGICAL :: enabled
+\end_layout
+
+\begin_layout Standard
+Defines if a field must be output or not.
+ The default value is 
+\begin_inset Flex Strong
+status collapsed
+
+\begin_layout Plain Layout
+true
+\end_layout
+
+\end_inset
+
+.
+\end_layout
+
+\begin_layout Subsection*
+check_if_active (optional): 
+\emph on
+bool
+\end_layout
+
+\begin_layout Standard
+Fortran:
+\end_layout
+
+\begin_layout LyX-Code
+LOGICAL :: check_if_active
+\end_layout
+
+\begin_layout Standard
+Sets a check if a field will be used at a given time step.
+ Activating the check may improve performance for fields which are not used
+ frequently, while it can detoriate performance for fields used at each
+ time step.
+ The default value is false.
+\end_layout
+
+\begin_layout Subsection*
+read_access (optional): 
+\emph on
+bool
+\end_layout
+
+\begin_layout Standard
+Fortran:
+\end_layout
+
+\begin_layout LyX-Code
+LOGICAL :: read_access
+\end_layout
+
+\begin_layout Standard
+Defines whether a field can be read from the model or not.
+ The default value is 
+\begin_inset Flex Strong
+status collapsed
+
+\begin_layout Plain Layout
+false
+\end_layout
+
+\end_inset
+
+.
+ Note that for fields belonging to a file in 
+\series bold
+\emph on
+read
+\series default
+\emph default
+ 
+\series bold
+mode
+\series default
+, this attribute is always 
+\series bold
+true
+\series default
+.
+\end_layout
+
+\begin_layout Subsection*
+field_ref (optional): 
+\emph on
+string
+\end_layout
+
+\begin_layout Standard
+Fortran:
+\end_layout
+
+\begin_layout LyX-Code
+CHARACTER(LEN=*) :: field_ref
+\end_layout
+
+\begin_layout Standard
+Defines the field reference.
+ All attributes will be inherited from the referenced field via the classical
+ inheritance mechanism.
+ The values assigned to the referenced field will be transmitted to the
+ current field to perform temporal operation.
+\end_layout
+
+\begin_layout Subsection*
+grid_ref (optional): 
+\emph on
+string
+\end_layout
+
+\begin_layout Standard
+Fortran:
+\end_layout
+
+\begin_layout LyX-Code
+CHARACTER(LEN=*) :: grid_ref
+\end_layout
+
+\begin_layout Standard
+Defines the field grid.
+ Note that only either 
+\begin_inset Flex Strong
+status collapsed
+
+\begin_layout Plain Layout
+grid_ref
+\end_layout
+
+\end_inset
+
+ or a combination of 
+\begin_inset Flex Strong
+status collapsed
+
+\begin_layout Plain Layout
+domain_ref
+\end_layout
+
+\end_inset
+
+, 
+\begin_inset Flex Strong
+status collapsed
+
+\begin_layout Plain Layout
+scalar_ref
+\end_layout
+
+\end_inset
+
+ or 
+\begin_inset Flex Strong
+status collapsed
+
+\begin_layout Plain Layout
+axis_ref
+\end_layout
+
+\end_inset
+
+ can be specified.
+\end_layout
+
+\begin_layout Subsection*
+domain_ref (optional): 
+\emph on
+string
+\end_layout
+
+\begin_layout Standard
+Fortran:
+\end_layout
+
+\begin_layout LyX-Code
+CHARACTER(LEN=*) :: domain_ref
+\end_layout
+
+\begin_layout Standard
+Defines the field domain.
+ If the attribute is defined, the attribute 
+\begin_inset Flex Strong
+status collapsed
+
+\begin_layout Plain Layout
+grid_ref
+\end_layout
+
+\end_inset
+
+ must not be specified.
+\end_layout
+
+\begin_layout Subsection*
+axis_ref (optional): 
+\emph on
+string
+\end_layout
+
+\begin_layout Standard
+Fortran: 
+\end_layout
+
+\begin_layout LyX-Code
+CHARACTER(LEN=*) :: axis_ref
+\end_layout
+
+\begin_layout Standard
+Defines an axis for the current field.
+ If the attribute is defined, the attribute 
+\begin_inset Flex Strong
+status collapsed
+
+\begin_layout Plain Layout
+grid_ref
+\end_layout
+
+\end_inset
+
+ must not be specified.
+\end_layout
+
+\begin_layout Subsection*
+scalar_ref (optional): 
+\emph on
+string
+\end_layout
+
+\begin_layout Standard
+Fortran: 
+\end_layout
+
+\begin_layout LyX-Code
+CHARACTER(LEN=*) :: scalar_ref
+\end_layout
+
+\begin_layout Standard
+Defines a scalar domain for the current field.
+ If the attribute is defined, the attribute 
+\begin_inset Flex Strong
+status collapsed
+
+\begin_layout Plain Layout
+grid_ref
+\end_layout
+
+\end_inset
+
+ must not be specified.
+\end_layout
+
+\begin_layout Subsection*
+grid_path (optional): 
+\emph on
+string
+\end_layout
+
+\begin_layout Standard
+Fortran: 
+\end_layout
+
+\begin_layout LyX-Code
+CHARACTER(LEN=*) :: grid_path
+\end_layout
+
+\begin_layout Standard
+Defines the way operations pass from a grid to other grids.
+\end_layout
+
+\begin_layout Subsection*
+default_value (optional): 
+\emph on
+double
+\end_layout
+
+\begin_layout Standard
+Fortran:
+\end_layout
+
+\begin_layout LyX-Code
+DOUBLE PRECISION :: default_value
+\end_layout
+
+\begin_layout Standard
+Defines the value which will be used instead of missing field data.
+ If no value is provided, the missing data will be replaced by uninitialized
+ values what can lead to undefined behavior.
+\end_layout
+
+\begin_layout Subsection*
+valid_min (optional): 
+\emph on
+double
+\end_layout
+
+\begin_layout Standard
+Fortran:
+\end_layout
+
+\begin_layout LyX-Code
+DOUBLE PRECISION :: valid_min
+\end_layout
+
+\begin_layout Standard
+All field values below 
+\begin_inset Flex Strong
+status collapsed
+
+\begin_layout Plain Layout
+valid_min
+\end_layout
+
+\end_inset
+
+ attribute value will be set to missing value.
+\end_layout
+
+\begin_layout Subsection*
+valid_max (optional): 
+\emph on
+double
+\end_layout
+
+\begin_layout Standard
+Fortran:
+\end_layout
+
+\begin_layout LyX-Code
+DOUBLE PRECISION :: valid_max
+\end_layout
+
+\begin_layout Standard
+All field values above 
+\begin_inset Flex Strong
+status collapsed
+
+\begin_layout Plain Layout
+valid_max
+\end_layout
+
+\end_inset
+
+ attribute value will be set to missing value.
+\end_layout
+
+\begin_layout Subsection*
+detect_missing_value (optional): 
+\emph on
+bool
+\end_layout
+
+\begin_layout Standard
+Fortran:
+\end_layout
+
+\begin_layout LyX-Code
+LOGICAL: detect_missing_value
+\end_layout
+
+\begin_layout Standard
+When XIOS detects a default value in a field, it does not take into account
+ the value during arithmetic operations such as averaging, minimum, maximum,
+ etc.
+\end_layout
+
+\begin_layout Subsection*
+add_offset (optional): 
+\emph on
+double
+\end_layout
+
+\begin_layout Standard
+Fortran:
+\end_layout
+
+\begin_layout LyX-Code
+DOUBLE PRECISION: add_offset
+\end_layout
+
+\begin_layout Standard
+Sets the 
+\begin_inset Flex Strong
+status collapsed
+
+\begin_layout Plain Layout
+add_offset
+\end_layout
+
+\end_inset
+
+ metadata CF attribute in an output file.
+ In output, the 
+\begin_inset Flex Strong
+status collapsed
+
+\begin_layout Plain Layout
+add_offset
+\end_layout
+
+\end_inset
+
+ value will be subtracted from the field values.
+\end_layout
+
+\begin_layout Subsection*
+scale_factor: 
+\emph on
+double
+\end_layout
+
+\begin_layout Standard
+Fortran:
+\end_layout
+
+\begin_layout LyX-Code
+DOUBLE PRECISION: scale_factor
+\end_layout
+
+\begin_layout Standard
+Sets the 
+\begin_inset Flex Strong
+status collapsed
+
+\begin_layout Plain Layout
+scale_factor
+\end_layout
+
+\end_inset
+
+ metadata CF attribute in an output file.
+ In output, the field values will be divided by the 
+\begin_inset Flex Strong
+status collapsed
+
+\begin_layout Plain Layout
+scale_factor
+\end_layout
+
+\end_inset
+
+ value.
+\end_layout
+
+\begin_layout Subsection*
+compression_level (optional): 
+\emph on
+integer
+\end_layout
+
+\begin_layout Standard
+Fortran:
+\end_layout
+
+\begin_layout LyX-Code
+INTEGER :: compression_level
+\end_layout
+
+\begin_layout Standard
+Defines whether a field should be compressed using NetCDF-4 built-in compression.
+ The compression level must range from 0 to 9.
+ A higher compression level means a better compression at the cost of using
+ more processing power.
+ The default value is inherited from the file attribute 
+\series bold
+compression_level
+\series default
+.
+\end_layout
+
+\begin_layout Subsection*
+indexed_output (optional): 
+\emph on
+bool
+\end_layout
+
+\begin_layout Standard
+Fortran:
+\end_layout
+
+\begin_layout LyX-Code
+LOGICAL :: indexed_output
+\end_layout
+
+\begin_layout Standard
+Defines whether field data must be output as an indexed grid instead of
+ a full grid whenever possible.
+ The default value is 
+\series bold
+\emph on
+false
+\series default
+\emph default
+.
+\end_layout
+
+\begin_layout Subsection*
+ts_enabled (optional): 
+\emph on
+bool
+\end_layout
+
+\begin_layout Standard
+Fortran:
+\end_layout
+
+\begin_layout LyX-Code
+LOGICAL :: ts_enabled
+\end_layout
+
+\begin_layout Standard
+Defines whether a field can be output as a timeseries.
+ The default value is 
+\series bold
+\emph on
+false
+\series default
+\emph default
+.
+\end_layout
+
+\begin_layout Subsection*
+ts_split_freq (optional): 
+\emph on
+duration
+\end_layout
+
+\begin_layout Standard
+Fortran:
+\end_layout
+
+\begin_layout LyX-Code
+TYPE(xios_duration) :: ts_split_freq
+\end_layout
+
+\begin_layout Standard
+Defines the splitting frequency that should be used for a timeseries if
+ it has been requested.
+ By default the attribute value is inherited from the file attribute 
+\series bold
+split_freq
+\series default
+.
+\end_layout
+
+\begin_layout Subsection*
+cell_methods (optional): 
+\emph on
+string
+\end_layout
+
+\begin_layout Standard
+Fortran: 
+\end_layout
+
+\begin_layout LyX-Code
+CHARACTER(LEN=*) :: cell_methods
+\end_layout
+
+\begin_layout Standard
+Defines the cell methods field attribute.
+\end_layout
+
+\begin_layout Subsection*
+cell_methods_mode (optional): enumeration
+\emph on
+ {overwrite, prefix, suffix, none}
+\end_layout
+
+\begin_layout Standard
+Fortran:
+\end_layout
+
+\begin_layout LyX-Code
+CHARACTER(LEN=*) :: cell_methods_mode
+\end_layout
+
+\begin_layout Standard
+Defines the cell methods mode of a field.
+\end_layout
+
+\begin_layout Subsection*
+comment (optional): 
+\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=*) :: comment
+\end_layout
+
+\begin_layout Standard
+Allows a user to set a comment.
+\end_layout
+
+\begin_layout Section
+Variable attribute reference
+\end_layout
+
+\begin_layout Subsection*
+name (optional): 
+\emph on
+string
+\end_layout
+
+\begin_layout Standard
+Fortran:
+\end_layout
+
+\begin_layout LyX-Code
+CHARACTER(LEN=*) :: name
+\end_layout
+
+\begin_layout Standard
+Defines the name of a variable as it will appear in an output file.
+ If not present, the variable 
+\begin_inset Flex Strong
+status collapsed
+
+\begin_layout Plain Layout
+id
+\end_layout
+
+\end_inset
+
+ will be used.
+\end_layout
+
+\begin_layout Subsection*
+type (mandatory): enumeration {bool, int, int32, int16, int64, float, double,
+ string}
+\end_layout
+
+\begin_layout Standard
+Fortran:
+\end_layout
+
+\begin_layout LyX-Code
+CHARACTER(LEN=*) :: type
+\end_layout
+
+\begin_layout Standard
+Defines the type of a variable.
+ Note that the 
+\series bold
+\emph on
+int
+\series default
+\emph default
+ type is a synonym for 
+\series bold
+\emph on
+int32
+\series default
+\emph default
+.
+\end_layout
+
+\begin_layout Subsection*
+ts_target (optional): enumeration {file, field, both, none}
+\end_layout
+
+\begin_layout Standard
+Fortran:
+\end_layout
+
+\begin_layout LyX-Code
+CHARACTER(LEN=*) :: ts_target
+\end_layout
+
+\begin_layout Section
+File attribute reference
+\end_layout
+
+\begin_layout Subsection*
+name (mandatory): 
+\emph on
+string
+\end_layout
+
+\begin_layout Standard
+Fortran:
+\end_layout
+
+\begin_layout LyX-Code
+CHARACTER(LEN=*) :: name
+\end_layout
+
+\begin_layout Standard
+Defines the name of a file.
+\end_layout
+
+\begin_layout Subsection*
+description (optional): 
+\emph on
+string
+\end_layout
+
+\begin_layout Standard
+Fortran:
+\end_layout
+
+\begin_layout LyX-Code
+CHARACTER(LEN=*) :: description
+\end_layout
+
+\begin_layout Standard
+Defines the description of a file.
+\end_layout
+
+\begin_layout Subsection*
+name_suffix (optional): 
+\emph on
+string
+\end_layout
+
+\begin_layout Standard
+Fortran: 
+\end_layout
+
+\begin_layout LyX-Code
+CHARACTER(LEN=*) :: name_suffix
+\end_layout
+
+\begin_layout Standard
+Defines a suffix added to the file name.
+\end_layout
+
+\begin_layout Subsection*
+min_digits (optional): 
+\emph on
+integer
+\end_layout
+
+\begin_layout Standard
+Fortran: 
+\end_layout
+
+\begin_layout LyX-Code
+INTEGER :: min_digits
+\end_layout
+
+\begin_layout Standard
+For the 
+\series bold
+multiple_file
+\series default
+ mode defines the minimum number of digits of the suffix describing the
+ server rank which will be appended to the file name.
+ The default value is 
+\begin_inset Flex Strong
+status collapsed
+
+\begin_layout Plain Layout
+0
+\end_layout
+
+\end_inset
+
+ (no server rank suffix is added).
+\end_layout
+
+\begin_layout Subsection*
+output_freq (mandatory): 
+\emph on
+duration
+\end_layout
+
+\begin_layout Standard
+Fortran:
+\end_layout
+
+\begin_layout LyX-Code
+TYPE(xios_duration) :: output_freq
+\end_layout
+
+\begin_layout Standard
+Defines the output frequency for the current file.
+\end_layout
+
+\begin_layout Subsection*
+output_level (optional): 
+\emph on
+integer
+\end_layout
+
+\begin_layout Standard
+Fortran:
+\end_layout
+
+\begin_layout LyX-Code
+INTEGER :: output_level
+\end_layout
+
+\begin_layout Standard
+Defines the output level for all fields of the current file.
+ The field is output only if the field attribute 
+\series bold
+level
+\series default
+ is less or equal to the file attribute 
+\series bold
+output_level
+\series default
+.
+\end_layout
+
+\begin_layout Subsection*
+sync_freq (optional): 
+\emph on
+duration
+\end_layout
+
+\begin_layout Standard
+Fortran:
+\end_layout
+
+\begin_layout LyX-Code
+TYPE(xios_duration) :: sync_freq
+\end_layout
+
+\begin_layout Standard
+Defines the frequency for flushing the current file onto a disk.
+ It may result in poor performances but data will be written even if a file
+ is not yet closed.
+\end_layout
+
+\begin_layout Subsection*
+split_freq (optional): 
+\emph on
+duration
+\end_layout
+
+\begin_layout Standard
+Fortran:
+\end_layout
+
+\begin_layout LyX-Code
+TYPE(xios_duration) :: split_freq
+\end_layout
+
+\begin_layout Standard
+Defines the frequency for splitting the current file.
+ The start and end dates will be added to the file name (see 
+\begin_inset Flex Emph
+status collapsed
+
+\begin_layout Plain Layout
+
+\series bold
+\emph on
+split_freq_format
+\end_layout
+
+\end_inset
+
+ attribute).
+ By default no splitting is done.
+\end_layout
+
+\begin_layout Subsection*
+split_freq_format (optional): 
+\emph on
+string
+\end_layout
+
+\begin_layout Standard
+Fortran:
+\end_layout
+
+\begin_layout LyX-Code
+CHARACTER(LEN=*) :: split_freq_format
+\end_layout
+
+\begin_layout Standard
+Defines the format of the split date suffixed to a file.
+ It can contain any character, 
+\emph on
+
+\begin_inset Flex Code
+status collapsed
+
+\begin_layout Plain Layout
+%y
+\end_layout
+
+\end_inset
+
+
+\emph default
+ will be replaced by the year (4 characters), 
+\begin_inset Flex Code
+status collapsed
+
+\begin_layout Plain Layout
+%mo
+\end_layout
+
+\end_inset
+
+ by the month (2 char), 
+\begin_inset Flex Code
+status collapsed
+
+\begin_layout Plain Layout
+%d
+\end_layout
+
+\end_inset
+
+ by the day (2 char), 
+\begin_inset Flex Code
+status collapsed
+
+\begin_layout Plain Layout
+%h
+\end_layout
+
+\end_inset
+
+ by the hour (2 char), 
+\begin_inset Flex Code
+status collapsed
+
+\begin_layout Plain Layout
+%mi
+\end_layout
+
+\end_inset
+
+ by the minute (2 char), 
+\begin_inset Flex Code
+status collapsed
+
+\begin_layout Plain Layout
+%s
+\end_layout
+
+\end_inset
+
+ by the second (2 char), 
+\begin_inset Flex Code
+status collapsed
+
+\begin_layout Plain Layout
+%S
+\end_layout
+
+\end_inset
+
+ by the number of seconds since the time origin and 
+\begin_inset Flex Code
+status collapsed
+
+\begin_layout Plain Layout
+%D
+\end_layout
+
+\end_inset
+
+ by the number of full days since the time origin.
+ The default behavior is to create a suffix with the date until the smaller
+ non zero unit.
+ For example, in one day split frequency, the hour, minute and second will
+ not appear in the suffix, only year, month and day.
+\end_layout
+
+\begin_layout Subsection*
+split_start_offset(optional): 
+\emph on
+duration
+\end_layout
+
+\begin_layout Standard
+Fortran:
+\end_layout
+
+\begin_layout LyX-Code
+TYPE(xios_duration) :: split_start_offset
+\end_layout
+
+\begin_layout Standard
+Defines the offset of file splitting.
+ 
+\end_layout
+
+\begin_layout Subsection*
+split_end_offset(optional): 
+\emph on
+duration
+\end_layout
+
+\begin_layout Standard
+Fortran:
+\end_layout
+
+\begin_layout LyX-Code
+TYPE(xios_duration) :: split_end_offset
+\end_layout
+
+\begin_layout Subsection*
+split_last_date (optional): 
+\emph on
+string
+\end_layout
+
+\begin_layout Standard
+Fortran:
+\end_layout
+
+\begin_layout LyX-Code
+CHARACTER(LEN=*) :: split_last_date
+\end_layout
+
+\begin_layout Subsection*
+enabled (optional): 
+\emph on
+bool
+\end_layout
+
+\begin_layout Standard
+Fortran:
+\end_layout
+
+\begin_layout LyX-Code
+LOGICAL :: enabled
+\end_layout
+
+\begin_layout Standard
+Defines if a file must be written/read or not.
+ The default value is 
+\begin_inset Flex Strong
+status collapsed
+
+\begin_layout Plain Layout
+true
+\end_layout
+
+\end_inset
+
+.
+\end_layout
+
+\begin_layout Subsection*
+mode (optional): 
+\emph on
+enumeration {read, write}
+\end_layout
+
+\begin_layout Standard
+Fortran:
+\end_layout
+
+\begin_layout LyX-Code
+CHARACTER(LEN=*) :: mode
+\end_layout
+
+\begin_layout Standard
+Defines whether a file will be read or written.
+ The default value is 
+\begin_inset Flex Strong
+status collapsed
+
+\begin_layout Plain Layout
+write
+\end_layout
+
+\end_inset
+
+.
+\end_layout
+
+\begin_layout Subsection*
+type (mandatory): 
+\emph on
+enumeration {one_file, multiple_file}
+\end_layout
+
+\begin_layout Standard
+Fortran:
+\end_layout
+
+\begin_layout LyX-Code
+CHARACTER(LEN=*) :: type
+\end_layout
+
+\begin_layout Standard
+Defines the type of a file: 
+\begin_inset Flex Strong
+status collapsed
+
+\begin_layout Plain Layout
+
+\emph on
+multiple_file
+\end_layout
+
+\end_inset
+
+: one file by server using sequential netcdf writing, 
+\begin_inset Flex Strong
+status collapsed
+
+\begin_layout Plain Layout
+
+\emph on
+one_file
+\end_layout
+
+\end_inset
+
+: one single global file is wrote using netcdf4 parallel access.
+\end_layout
+
+\begin_layout Subsection*
+format (optional): 
+\emph on
+enumeration {netcdf4, netcdf4_classic}
+\end_layout
+
+\begin_layout Standard
+Fortran:
+\end_layout
+
+\begin_layout LyX-Code
+CHARACTER(LEN=*) :: format
+\end_layout
+
+\begin_layout Standard
+Define the format of a file: 
+\begin_inset Flex Strong
+status collapsed
+
+\begin_layout Plain Layout
+
+\emph on
+netcdf4
+\end_layout
+
+\end_inset
+
+: the HDF5 format will be used, 
+\begin_inset Flex Strong
+status collapsed
+
+\begin_layout Plain Layout
+
+\emph on
+netcdf4
+\emph default
+_
+\emph on
+classic
+\end_layout
+
+\end_inset
+
+: the classic NetCDF format will be used.
+ The default value is 
+\series bold
+\emph on
+netcdf4
+\series default
+\emph default
+.
+ Note that the 
+\series bold
+\emph on
+netcdf4
+\emph default
+_
+\emph on
+classic
+\series default
+\emph default
+ format can be used with the attribute 
+\series bold
+type
+\series default
+ set to 
+\series bold
+\emph on
+one_file
+\series default
+\emph default
+ only if the NetCDF4 library was compiled with Parallel NetCDF support (--enable
+-pnetcdf).
+\end_layout
+
+\begin_layout Subsection*
+par_access (optional): 
+\emph on
+enumeration {collective, independent}
+\end_layout
+
+\begin_layout Standard
+Fortran:
+\end_layout
+
+\begin_layout LyX-Code
+CHARACTER(LEN=*) :: par_access
+\end_layout
+
+\begin_layout Standard
+For parallel writing, defines which type of MPI calls will be used.
+ The default value is 
+\begin_inset Flex Strong
+status collapsed
+
+\begin_layout Plain Layout
+
+\emph on
+collective
+\end_layout
+
+\end_inset
+
+.
+\end_layout
+
+\begin_layout Subsection*
+read_metadata_par (optional): 
+\emph on
+bool
+\end_layout
+
+\begin_layout Standard
+Fortran:
+\end_layout
+
+\begin_layout LyX-Code
+LOGICAL :: read_metadata_par
+\end_layout
+
+\begin_layout Standard
+For files in the read mode, defines if parallel or serial I/O will be used
+ by model processes for reading file metadata.
+ The default value is false implying serial I/O for reading metadata.
+\end_layout
+
+\begin_layout Subsection*
+convention (optional): 
+\emph on
+enumeration {CF, UGRID}
+\end_layout
+
+\begin_layout Standard
+Fortran:
+\end_layout
+
+\begin_layout LyX-Code
+CHARACTER(LEN=*) :: convention
+\end_layout
+
+\begin_layout Standard
+Defines the file conventions.
+ By default the CF conventions are followed.
+\end_layout
+
+\begin_layout Subsection*
+convention_str (optional): 
+\emph on
+string
+\end_layout
+
+\begin_layout Standard
+Fortran:
+\end_layout
+
+\begin_layout LyX-Code
+CHARACTER(LEN=*) :: convention_str
+\end_layout
+
+\begin_layout Standard
+Defines the 
+\series bold
+Conventions 
+\series default
+attribute to be added to file global attributes.
+\end_layout
+
+\begin_layout Subsection*
+append (optional): 
+\emph on
+bool
+\end_layout
+
+\begin_layout Standard
+Fortran:
+\end_layout
+
+\begin_layout LyX-Code
+LOGICAL :: append
+\end_layout
+
+\begin_layout Standard
+Defines whether data is to be appended at the end of a file if it already
+ exists or if the existing file is to be overwritten.
+ The default value is 
+\begin_inset Flex Strong
+status collapsed
+
+\begin_layout Plain Layout
+
+\emph on
+false
+\end_layout
+
+\end_inset
+
+.
+\end_layout
+
+\begin_layout Subsection*
+compression_level (optional): 
+\emph on
+integer
+\end_layout
+
+\begin_layout Standard
+Fortran:
+\end_layout
+
+\begin_layout LyX-Code
+INTEGER :: compression_level
+\end_layout
+
+\begin_layout Standard
+Defines whether the fields should be compressed using NetCDF-4 built-in
+ compression by default.
+ The compression level must range from 0 to 9.
+ A higher compression level means a better compression at the cost of using
+ more processing power.
+ The default value is 
+\begin_inset Flex Strong
+status collapsed
+
+\begin_layout Plain Layout
+
+\emph on
+0
+\end_layout
+
+\end_inset
+
+ (no compression).
+\end_layout
+
+\begin_layout Subsection*
+time_counter (optional): 
+\emph on
+enumeration {centered, instant, record, exclusive, centered_exclusive, instant_e
+xclusive, none}
+\end_layout
+
+\begin_layout Standard
+Fortran:
+\end_layout
+
+\begin_layout LyX-Code
+CHARACTER(LEN=*) :: time_counter
+\end_layout
+
+\begin_layout Standard
+Defines how the 
+\begin_inset Quotes eld
+\end_inset
+
+time_counter
+\begin_inset Quotes erd
+\end_inset
+
+ variable will be output:
+\end_layout
+
+\begin_layout Itemize
+
+\series bold
+\emph on
+centered
+\series default
+\emph default
+: use centered times (default option for all field operations except for
+ instant)
+\end_layout
+
+\begin_layout Itemize
+
+\series bold
+\emph on
+instant
+\series default
+\emph default
+: use instant times (default option for field operation 
+\series bold
+instant
+\series default
+)
+\end_layout
+
+\begin_layout Itemize
+
+\series bold
+\emph on
+record
+\series default
+\emph default
+: use record indexes
+\end_layout
+
+\begin_layout Itemize
+
+\series bold
+\shape italic
+centered_exclusive: 
+\series default
+\shape default
+do not include centered times into an output file
+\end_layout
+
+\begin_layout Itemize
+
+\series bold
+\shape italic
+\emph on
+instant_
+\emph default
+exclusive: 
+\series default
+\shape default
+do not include instant times into an output file
+\end_layout
+
+\begin_layout Itemize
+
+\series bold
+\shape italic
+exclusive: 
+\series default
+\shape default
+include neither instant times nor centered times into an output file
+\end_layout
+
+\begin_layout Itemize
+
+\series bold
+\emph on
+none
+\series default
+\emph default
+: do not output the variable.
+\end_layout
+
+\begin_layout Standard
+The default value is 
+\series bold
+\emph on
+centered
+\series default
+\emph default
+.
+\end_layout
+
+\begin_layout Subsection*
+time_counter_name (optional): 
+\emph on
+string
+\end_layout
+
+\begin_layout Standard
+Fortran:
+\end_layout
+
+\begin_layout LyX-Code
+CHARACTER(LEN=*) :: time_counter_name
+\end_layout
+
+\begin_layout Standard
+Define the name of a time counter.
+\end_layout
+
+\begin_layout Subsection*
+timeseries (optional): 
+\emph on
+enumeration {none, only, both, exclusive}
+\end_layout
+
+\begin_layout Standard
+Fortran:
+\end_layout
+
+\begin_layout LyX-Code
+CHARACTER(LEN=*) :: time_series
+\end_layout
+
+\begin_layout Standard
+Defines whether the timeseries must be output:
+\end_layout
+
+\begin_layout Itemize
+
+\series bold
+\emph on
+none
+\series default
+\emph default
+: no timeseries is outputted, only the regular file
+\end_layout
+
+\begin_layout Itemize
+
+\series bold
+\emph on
+only
+\series default
+\emph default
+: only the timeseries is outputted, the regular file is not created
+\end_layout
+
+\begin_layout Itemize
+
+\series bold
+\emph on
+both
+\series default
+\emph default
+: both the timeseries and the regular file are outputted.
+\end_layout
+
+\begin_layout Itemize
+
+\series bold
+\emph on
+exclusive
+\series default
+\emph default
+: the timeseries is outputted and a regular file is created with only the
+ fields which were not marked for output as a timeseries (if any).
+\end_layout
+
+\begin_layout Standard
+The default value is 
+\series bold
+\emph on
+none
+\series default
+\emph default
+.
+\end_layout
+
+\begin_layout Subsection*
+ts_prefix (optional): 
+\emph on
+string
+\end_layout
+
+\begin_layout Standard
+Fortran:
+\end_layout
+
+\begin_layout LyX-Code
+CHARACTER(LEN=*) :: ts_prefix
+\end_layout
+
+\begin_layout Standard
+Defines the prefix to use for the name of the timeseries files.
+ By default the file name will be used.
+\end_layout
+
+\begin_layout Subsection*
+time_units (optional): 
+\emph on
+enumeration {seconds, days}
+\end_layout
+
+\begin_layout Standard
+Fortran:
+\end_layout
+
+\begin_layout LyX-Code
+CHARACTER(LEN=*) :: time_units
+\end_layout
+
+\begin_layout Subsection*
+record_offset (optional): 
+\emph on
+integer
+\end_layout
+
+\begin_layout Standard
+Fortran:
+\end_layout
+
+\begin_layout LyX-Code
+INTEGER :: record_offset
+\end_layout
+
+\begin_layout Standard
+Defines the offset of a record from the beginning record.
+ The default value is 0.
+\end_layout
+
+\begin_layout Subsection*
+cyclic (optional): 
+\emph on
+bool
+\end_layout
+
+\begin_layout Standard
+Fortran:
+\end_layout
+
+\begin_layout LyX-Code
+LOGICAL :: cyclic
+\end_layout
+
+\begin_layout Standard
+If the option is activated for fields to be read, then upon reaching the
+ last time record, reading will continue 
+\begin_inset Quotes eld
+\end_inset
+
+cycle
+\begin_inset Quotes erd
+\end_inset
+
+ at the first time record.
+ The default value is false.
+\end_layout
+
+\begin_layout Subsection*
+time_stamp_name (optional): 
+\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=*) :: time_stamp_name
+\end_layout
+
+\begin_layout Standard
+Defines the timestamp name of the date and time when the program was executed
+ which will be written into an output file.
+ The default value is 
+\begin_inset Quotes eld
+\end_inset
+
+timeStamp
+\begin_inset Quotes erd
+\end_inset
+
+.
+\end_layout
+
+\begin_layout Subsection*
+time_stamp_format (optional): 
+\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=*) :: time_stamp_format
+\end_layout
+
+\begin_layout Standard
+Defines the timestamp format of the date and time when the program was executed
+ to be written into an output file.
+ It can contain any character.
+ 
+\emph on
+
+\begin_inset Flex Code
+status collapsed
+
+\begin_layout Plain Layout
+%Y
+\end_layout
+
+\end_inset
+
+
+\emph default
+ will be replaced by the 4-digit year (4 digits), while 
+\emph on
+
+\begin_inset Flex Code
+status collapsed
+
+\begin_layout Plain Layout
+%y
+\end_layout
+
+\end_inset
+
+
+\emph default
+ will be replaced by the 2-digit year.
+ 
+\begin_inset Flex Code
+status collapsed
+
+\begin_layout Plain Layout
+%m
+\end_layout
+
+\end_inset
+
+ will be by the 2-digit month, while %b will be replaced by the 3-character
+ month.
+ 
+\begin_inset Flex Code
+status collapsed
+
+\begin_layout Plain Layout
+%d
+\end_layout
+
+\end_inset
+
+ will be replaced by the day (2 char), 
+\begin_inset Flex Code
+status collapsed
+
+\begin_layout Plain Layout
+%H
+\end_layout
+
+\end_inset
+
+ by the hour (2 char), 
+\begin_inset Flex Code
+status collapsed
+
+\begin_layout Plain Layout
+%M
+\end_layout
+
+\end_inset
+
+ by the minute (2 char), 
+\begin_inset Flex Code
+status collapsed
+
+\begin_layout Plain Layout
+%S
+\end_layout
+
+\end_inset
+
+ by the number of seconds, 
+\begin_inset Flex Code
+status collapsed
+
+\begin_layout Plain Layout
+%D
+\end_layout
+
+\end_inset
+
+ by the date in the MM/DD/YY format.
+\end_layout
+
+\begin_layout Subsection*
+uuid_name (optional): 
+\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=*) :: uuid_name
+\end_layout
+
+\begin_layout Standard
+Defines the name of file's UUID.
+\end_layout
+
+\begin_layout Subsection*
+uuid_format (optional): 
+\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=*) :: uuid_format
+\end_layout
+
+\begin_layout Standard
+Defines the format of file's UUID.
+\end_layout
+
+\begin_layout Subsection*
+comment (optional): 
+\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=*) :: comment
+\end_layout
+
+\begin_layout Standard
+Allows a user to set a comment.
+\end_layout
+
+\begin_layout Section
+Transformation attribute reference
+\end_layout
+
+\begin_layout Subsection
+reduce_scalar_to_scalar
+\end_layout
+
+\begin_layout Subsection*
+operation (mandatory): 
+\emph on
+enumeration {min, max, sum, average}
+\end_layout
+
+\begin_layout Standard
+Fortran:
+\end_layout
+
+\begin_layout LyX-Code
+CHARACTER(LEN=*) :: operation
+\end_layout
+
+\begin_layout Standard
+Defines a reduction operation performed on a scalar across model processes.
+ (It is analogous to MPI_Allreduce.)
+\end_layout
+
+\begin_layout Subsection
+extract_axis_to_scalar
+\end_layout
+
+\begin_layout Subsection*
+position: 
+\emph on
+integer
+\end_layout
+
+\begin_layout Standard
+Fortran: 
+\end_layout
+
+\begin_layout LyX-Code
+INTEGER :: position
+\end_layout
+
+\begin_layout Standard
+Global index of a point on an axis to be extracted into a scalar.
+\end_layout
+
+\begin_layout Standard
+
+\end_layout
+
+\begin_layout Subsection
+interpolate_axis
+\end_layout
+
+\begin_layout Subsection*
+type (optional): 
+\emph on
+string
+\end_layout
+
+\begin_layout Standard
+Fortran:
+\end_layout
+
+\begin_layout LyX-Code
+CHARACTER(LEN=*) :: type
+\end_layout
+
+\begin_layout Standard
+Defines the interpolation type on an axis.
+ For now only polynomial interpolation is available.
+\end_layout
+
+\begin_layout Subsection*
+order (optional): 
+\emph on
+integer
+\end_layout
+
+\begin_layout Standard
+Fortran: 
+\end_layout
+
+\begin_layout LyX-Code
+INTEGER :: order
+\end_layout
+
+\begin_layout Standard
+Defines the order of interpolation.
+ The default value is 2.
+\end_layout
+
+\begin_layout Subsection*
+coordinate (optional): 
+\emph on
+string
+\end_layout
+
+\begin_layout Standard
+Fortran:
+\end_layout
+
+\begin_layout LyX-Code
+CHARACTER(LEN=*) :: coordinate
+\end_layout
+
+\begin_layout Standard
+Defines the coordinate associated with an axis on which interpolation will
+ be performed.
+\end_layout
+
+\begin_layout Subsection
+reduce_axis_to_axis
+\end_layout
+
+\begin_layout Subsection*
+operation (mandatory): 
+\emph on
+enumeration {min, max, sum, average}
+\end_layout
+
+\begin_layout Standard
+Fortran:
+\end_layout
+
+\begin_layout LyX-Code
+CHARACTER(LEN=*) :: operation
+\end_layout
+
+\begin_layout Standard
+Defines a reduction operation performed on an axis across model processes.
+ (It is analogous to MPI_Allreduce.)
+\end_layout
+
+\begin_layout Subsection
+reduce_axis_to_scalar
+\end_layout
+
+\begin_layout Standard
+Reduces data defined on an axis into a scalar value.
+\end_layout
+
+\begin_layout Subsection*
+operation (mandatory): 
+\emph on
+enumeration {min, max, sum, average}
+\end_layout
+
+\begin_layout Standard
+Fortran:
+\end_layout
+
+\begin_layout LyX-Code
+CHARACTER(LEN=*) :: operation
+\end_layout
+
+\begin_layout Subsection
+zoom_axis
+\end_layout
+
+\begin_layout Subsection*
+begin (optional): 
+\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
+Defines the beginning index of a zoomed region on a global axis.
+ The attribute value should 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 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 (optional): 
+\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
+Defines the size of a zoomed region on a global axis.
+ The attribute value should 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
+compute_connectivity_domain
+\end_layout
+
+\begin_layout Subsection*
+n_neighbor: 
+\begin_inset Flex Emph
+status collapsed
+
+\begin_layout Plain Layout
+1D-array of integer
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+Fortran: 
+\end_layout
+
+\begin_layout LyX-Code
+INTEGER :: n_neighbor(:)
+\end_layout
+
+\begin_layout Subsection*
+local_neighbor: 
+\begin_inset Flex Emph
+status collapsed
+
+\begin_layout Plain Layout
+2D-array of integer
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+Fortran: 
+\end_layout
+
+\begin_layout LyX-Code
+INTEGER :: local_neighbor(:,:)
+\end_layout
+
+\begin_layout Subsection*
+n_neighbor_max: 
+\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_neighbor_max
+\end_layout
+
+\begin_layout Subsection
+extract_domain_to_axis
+\end_layout
+
+\begin_layout Subsection*
+position (optional): 
+\emph on
+integer
+\end_layout
+
+\begin_layout Standard
+Fortran: 
+\end_layout
+
+\begin_layout LyX-Code
+INTEGER :: position
+\end_layout
+
+\begin_layout Standard
+Defines the index on a domain starting which an axis will be extracted along
+ the direction specified with the 
+\series bold
+direction
+\series default
+ attribute.
+\end_layout
+
+\begin_layout Subsection*
+direction (mandatory): 
+\emph on
+enumeration {iDir, jDir}
+\end_layout
+
+\begin_layout Standard
+Fortran:
+\end_layout
+
+\begin_layout LyX-Code
+CHARACTER(LEN=*) :: direction
+\end_layout
+
+\begin_layout Standard
+Defines the domain dimension along which an axis will be extracted.
+\end_layout
+
+\begin_layout Subsection
+interpolate_domain
+\end_layout
+
+\begin_layout Subsection*
+file (optional): 
+\emph on
+string
+\end_layout
+
+\begin_layout Standard
+Fortran:
+\end_layout
+
+\begin_layout LyX-Code
+CHARACTER(LEN=*) :: type
+\end_layout
+
+\begin_layout Standard
+Define a file which contains the weight values for interpolation from domain
+ source to domain destination.
+ If not specified, the internal interpolation module will be used.
+\end_layout
+
+\begin_layout Subsection*
+order (optional): 
+\emph on
+integer
+\end_layout
+
+\begin_layout Standard
+Fortran: 
+\end_layout
+
+\begin_layout LyX-Code
+INTEGER :: order
+\end_layout
+
+\begin_layout Standard
+Defines the order of interpolation.
+ This attribute is only for internal interpolation module.
+ The default value is 2.
+\end_layout
+
+\begin_layout Subsection
+reduce_domain_to_axis
+\end_layout
+
+\begin_layout Subsection*
+direction: 
+\emph on
+enumeration {iDir, jDir}
+\end_layout
+
+\begin_layout Standard
+Fortran:
+\end_layout
+
+\begin_layout LyX-Code
+CHARACTER(LEN=*) :: direction
+\end_layout
+
+\begin_layout Standard
+Defines the domain dimension along which a reduction of the domain into
+ an axis will be performed.
+\end_layout
+
+\begin_layout Subsection*
+operation (mandatory): 
+\emph on
+enumeration {min, max, sum, average}
+\end_layout
+
+\begin_layout Standard
+Fortran:
+\end_layout
+
+\begin_layout LyX-Code
+CHARACTER(LEN=*) :: operation
+\end_layout
+
+\begin_layout Subsection*
+local: 
+\emph on
+bool
+\end_layout
+
+\begin_layout Standard
+Fortran:
+\end_layout
+
+\begin_layout LyX-Code
+LOGICAL :: local
+\end_layout
+
+\begin_layout Standard
+Defines whether the reduction should be performed locally on data owned
+ by each process.
+\end_layout
+
+\begin_layout Subsection
+reduce_domain_to_scalar
+\end_layout
+
+\begin_layout Standard
+Reduces data defined on a domain into a scalar value.
+\end_layout
+
+\begin_layout Subsection*
+operation (mandatory): 
+\emph on
+enumeration {min, max, sum, average}
+\end_layout
+
+\begin_layout Standard
+Fortran:
+\end_layout
+
+\begin_layout LyX-Code
+CHARACTER(LEN=*) :: operation
+\end_layout
+
+\begin_layout Subsection*
+local: 
+\emph on
+bool
+\end_layout
+
+\begin_layout Standard
+Fortran:
+\end_layout
+
+\begin_layout LyX-Code
+LOGICAL :: local
+\end_layout
+
+\begin_layout Standard
+Defines whether the reduction should be performed locally on data owned
+ by each process.
+\end_layout
+
+\begin_layout Subsection
+reorder_domain
+\end_layout
+
+\begin_layout Subsection*
+invert_lat (optional): 
+\emph on
+bool
+\end_layout
+
+\begin_layout Standard
+Fortran:
+\end_layout
+
+\begin_layout LyX-Code
+LOGICAL :: invert_lat
+\end_layout
+
+\begin_layout Standard
+Defines whether the latitude should be inverted.
+ The default value is false.
+\end_layout
+
+\begin_layout Subsection*
+shift_lon_fraction (optional): 
+\begin_inset Flex Emph
+status collapsed
+
+\begin_layout Plain Layout
+double
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+Fortran: 
+\end_layout
+
+\begin_layout LyX-Code
+DOUBLE PRECISION :: shift_lon_fraction
+\end_layout
+
+\begin_layout Standard
+Defines the longitude offset.
+ The value of the parameter represents a fraction of 
+\series bold
+ni_glo
+\series default
+.
+\end_layout
+
+\begin_layout Subsection*
+min_lon (optional): 
+\begin_inset Flex Emph
+status collapsed
+
+\begin_layout Plain Layout
+double
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+Fortran: 
+\end_layout
+
+\begin_layout LyX-Code
+DOUBLE PRECISION :: min_lon
+\end_layout
+
+\begin_layout Standard
+If both, 
+\series bold
+min_lon
+\series default
+ and 
+\series bold
+max_lon
+\series default
+, are defined, a domain will be reordered with latitude values starting
+ from 
+\series bold
+min_lon
+\series default
+ and ending at 
+\series bold
+max_lon
+\series default
+.
+\end_layout
+
+\begin_layout Subsection*
+max_lon (optional): 
+\begin_inset Flex Emph
+status collapsed
+
+\begin_layout Plain Layout
+double
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+Fortran: 
+\end_layout
+
+\begin_layout LyX-Code
+DOUBLE PRECISION :: max_lon
+\end_layout
+
+\begin_layout Standard
+If both, 
+\series bold
+min_lon
+\series default
+ and 
+\series bold
+max_lon
+\series default
+, are defined, a domain will be reordered with latitude values starting
+ from 
+\series bold
+min_lon
+\series default
+ and ending at 
+\series bold
+max_lon
+\series default
+.
+\end_layout
+
+\begin_layout Subsection
+expand_domain
+\end_layout
+
+\begin_layout Subsection*
+order: 
+\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 :: order
+\end_layout
+
+\begin_layout Subsection*
+type (optional): 
+\emph on
+enumeration {node, edge}
+\end_layout
+
+\begin_layout Standard
+Fortran:
+\end_layout
+
+\begin_layout LyX-Code
+CHARACTER(LEN=*) :: type
+\end_layout
+
+\begin_layout Standard
+Defines whether the node or edge connectivity should be calculated for the
+ expanded domain.
+\end_layout
+
+\begin_layout Subsection*
+i_periodic (optional): 
+\emph on
+bool
+\end_layout
+
+\begin_layout Standard
+Fortran:
+\end_layout
+
+\begin_layout LyX-Code
+LOGICAL :: i_periodic
+\end_layout
+
+\begin_layout Standard
+If the attribute value is true, values of fields defined on the expanded
+ domain will be duplicated from those of the original domain periodically
+ along the first dimension.
+ The default value is false (masked values on the expanded domain).
+\end_layout
+
+\begin_layout Subsection*
+j_periodic (optional): 
+\emph on
+bool
+\end_layout
+
+\begin_layout Standard
+Fortran:
+\end_layout
+
+\begin_layout LyX-Code
+LOGICAL :: j_periodic
+\end_layout
+
+\begin_layout Standard
+If the attribute value is true, values of fields defined on the expanded
+ domain will be duplicated from those of the original domain periodically
+ along the second dimension.
+ The default value is false (masked values on the expanded domain).
+\end_layout
+
+\begin_layout Subsection
+zoom_domain
+\end_layout
+
+\begin_layout Subsection*
+ibegin (optional): 
+\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
+Defines the beginning index of the zoomed region on the first dimension
+ of the global domain.
+ 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
+
+.
+ Note that if one of the zoom attributes (ibegin, ni, jbegin or nj) is defined
+ then all the rest should be specified by a user as well.
+\end_layout
+
+\begin_layout Subsection*
+ni (optional): 
+\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 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.
+ Note that if one of the zoom attributes (ibegin, ni, jbegin or nj) is defined
+ then all the rest should be specified by a user as well.
+\end_layout
+
+\begin_layout Subsection*
+jbegin (optional): 
+\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 zoomed region on the second dimension
+ of the global domain.
+ 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
+
+.
+ Note that if one of the zoom attributes (ibegin, ni, jbegin or nj) is defined
+ then all the rest should be specified by a user as well.
+\end_layout
+
+\begin_layout Subsection*
+nj (optional): 
+\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.
+ The attribute value should 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.
+ Note that if one of the zoom attributes (ibegin, ni, jbegin or nj) is defined
+ then all the rest should be specified by a user as well.
+\end_layout
+
+\begin_layout Subsection
+generate_rectilinear_domain
+\end_layout
+
+\begin_layout Subsection*
+lon_start (optional): 
+\begin_inset Flex Emph
+status collapsed
+
+\begin_layout Plain Layout
+double
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+Fortran: 
+\end_layout
+
+\begin_layout LyX-Code
+DOUBLE PRECISION :: lon_start
+\end_layout
+
+\begin_layout Standard
+Along with 
+\series bold
+lon_end
+\series default
+, the attribute defines the longitude range of a generated domain.
+\end_layout
+
+\begin_layout Subsection*
+lon_end (optional): 
+\begin_inset Flex Emph
+status collapsed
+
+\begin_layout Plain Layout
+double
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+Fortran: 
+\end_layout
+
+\begin_layout LyX-Code
+DOUBLE PRECISION :: lon_end
+\end_layout
+
+\begin_layout Standard
+Along with 
+\series bold
+lon_start
+\series default
+, the attribute defines the longitude range of a generated domain.
+\end_layout
+
+\begin_layout Subsection*
+lat_start (optional): 
+\begin_inset Flex Emph
+status collapsed
+
+\begin_layout Plain Layout
+double
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+Fortran: 
+\end_layout
+
+\begin_layout LyX-Code
+DOUBLE PRECISION :: lat_start
+\end_layout
+
+\begin_layout Standard
+Along with 
+\series bold
+lat_end
+\series default
+, the attribute defines the latitude range of a generated domain.
+\end_layout
+
+\begin_layout Subsection*
+lat_end (optional): 
+\begin_inset Flex Emph
+status collapsed
+
+\begin_layout Plain Layout
+double
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+Fortran: 
+\end_layout
+
+\begin_layout LyX-Code
+DOUBLE PRECISION :: lat_end
+\end_layout
+
+\begin_layout Standard
+Along with 
+\series bold
+lat_start
+\series default
+, the attribute defines the latitude range of a generated domain.
+\end_layout
+
+\begin_layout Subsection*
+bounds_lon_start: 
+\begin_inset Flex Emph
+status collapsed
+
+\begin_layout Plain Layout
+double
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+Fortran: 
+\end_layout
+
+\begin_layout LyX-Code
+DOUBLE PRECISION :: bounds_lon_start
+\end_layout
+
+\begin_layout Standard
+Attributes 
+\series bold
+bounds_lon_start
+\series default
+ and 
+\series bold
+bounds_lon_start
+\series default
+ set the longitude range of a generated domain.
+ If both sets, 
+\series bold
+(lon_start, lon_end)
+\series default
+ and 
+\series bold
+(bounds_lon_start, bounds_lon_end)
+\series default
+, are specified then the bound attributes will be ignored.
+\end_layout
+
+\begin_layout Subsection*
+bounds_lon_end: 
+\begin_inset Flex Emph
+status collapsed
+
+\begin_layout Plain Layout
+double
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+Fortran: 
+\end_layout
+
+\begin_layout LyX-Code
+DOUBLE PRECISION :: bounds_lon_end
+\end_layout
+
+\begin_layout Standard
+Attributes 
+\series bold
+bounds_lon_start
+\series default
+ and 
+\series bold
+bounds_lon_start
+\series default
+ set the longitude range of a generated domain.
+ If both sets, 
+\series bold
+(lon_start, lon_end)
+\series default
+ and 
+\series bold
+(bounds_lon_start, bounds_lon_end)
+\series default
+, are specified then the bound attributes will be ignored.
+\end_layout
+
+\begin_layout Subsection*
+bounds_lat_start: 
+\begin_inset Flex Emph
+status collapsed
+
+\begin_layout Plain Layout
+double
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+Fortran: 
+\end_layout
+
+\begin_layout LyX-Code
+DOUBLE PRECISION :: bounds_lat_start
+\end_layout
+
+\begin_layout Standard
+Attributes 
+\series bold
+bounds_lat_start
+\series default
+ and 
+\series bold
+bounds_lat_start
+\series default
+ set the latitude range of a generated domain.
+ If both sets, 
+\series bold
+(lat_start, lat_end)
+\series default
+ and 
+\series bold
+(bounds_lat_start, bounds_lat_end)
+\series default
+, are specified then the bound attributes will be ignored.
+\end_layout
+
+\begin_layout Subsection*
+bounds_lat_end: 
+\begin_inset Flex Emph
+status collapsed
+
+\begin_layout Plain Layout
+double
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+Fortran: 
+\end_layout
+
+\begin_layout LyX-Code
+DOUBLE PRECISION :: bounds_lat_end
+\end_layout
+
+\begin_layout Standard
+Attributes 
+\series bold
+bounds_lat_start
+\series default
+ and 
+\series bold
+bounds_lat_start
+\series default
+ set the latitude range of a generated domain.
+ If both sets, 
+\series bold
+(lat_start, lat_end)
+\series default
+ and 
+\series bold
+(bounds_lat_start, bounds_lat_end)
+\series default
+, are specified then the bound attributes will be ignored.
+\end_layout
+
+\begin_layout Chapter
+Fortran interface reference
+\end_layout
+
+\begin_layout Section*
+Initialization
+\end_layout
+
+\begin_layout Subsection*
+XIOS initialization
+\end_layout
+
+\begin_layout Subsubsection*
+Synopsis:
+\end_layout
+
+\begin_layout LyX-Code
+SUBROUTINE xios_initialize(client_id, local_comm, return_comm)
+\end_layout
+
+\begin_layout LyX-Code
+  CHARACTER(LEN=*),INTENT(IN)         :: client_id
+\end_layout
+
+\begin_layout LyX-Code
+  INTEGER,INTENT(IN),OPTIONAL         :: local_comm
+\end_layout
+
+\begin_layout LyX-Code
+  INTEGER,INTENT(OUT),OPTIONAL        :: return_comm
+\end_layout
+
+\begin_layout Subsubsection*
+Argument:
+\end_layout
+
+\begin_layout Itemize
+\begin_inset Flex Code
+status collapsed
+
+\begin_layout Plain Layout
+client_id
+\end_layout
+
+\end_inset
+
+: client identifier
+\end_layout
+
+\begin_layout Itemize
+\begin_inset Flex Code
+status collapsed
+
+\begin_layout Plain Layout
+local_comm
+\end_layout
+
+\end_inset
+
+: MPI communicator of the client
+\end_layout
+
+\begin_layout Itemize
+\begin_inset Flex Code
+status collapsed
+
+\begin_layout Plain Layout
+return_comm
+\end_layout
+
+\end_inset
+
+: split return MPI communicator
+\end_layout
+
+\begin_layout Subsubsection*
+Description:
+\end_layout
+
+\begin_layout Standard
+This subroutine must be called before any other call of MPI client library.
+ It may be able to initialize MPI library (calling 
+\begin_inset Flex Code
+status collapsed
+
+\begin_layout Plain Layout
+MPI_Init
+\end_layout
+
+\end_inset
+
+) if not already initialized.
+ Since XIOS is able to work in client/server mode (parameter 
+\begin_inset Flex Code
+status collapsed
+
+\begin_layout Plain Layout
+using_server=true
+\end_layout
+
+\end_inset
+
+), the global communicator must be split and a local split communicator
+ is returned to be used by the client model for it own purpose.
+ If more than one model is present, XIOS could be interfaced with the OASIS
+ coupler (compiled with 
+\begin_inset Flex Code
+status collapsed
+
+\begin_layout Plain Layout
+-using_oasis
+\end_layout
+
+\end_inset
+
+ option and parameter 
+\begin_inset Flex Code
+status collapsed
+
+\begin_layout Plain Layout
+using_oasis=true
+\end_layout
+
+\end_inset
+
+), so in this case, the splitting would be done globally by OASIS.
+\end_layout
+
+\begin_layout Itemize
+If MPI is not initialized, XIOS would initialize it calling MPI_Init function.
+ In this case, the MPI finalization would be done by XIOS in the 
+\begin_inset Flex Code
+status collapsed
+
+\begin_layout Plain Layout
+xios_finalize
+\end_layout
+
+\end_inset
+
+ subroutine, and must not be done by the model.
+\end_layout
+
+\begin_layout Itemize
+If OASIS coupler is not used (using_oasis=false)
+\end_layout
+
+\begin_deeper
+\begin_layout Itemize
+If server mode is not activated (
+\begin_inset Flex Code
+status collapsed
+
+\begin_layout Plain Layout
+using_server=false
+\end_layout
+
+\end_inset
+
+): if local_comm MPI communicator is specified then it would be used for
+ internal MPI communication otherwise 
+\begin_inset Flex Code
+status collapsed
+
+\begin_layout Plain Layout
+MPI_COMM_WORLD
+\end_layout
+
+\end_inset
+
+ communicator would be used by default.
+ A copy of the communicator (of 
+\begin_inset Flex Code
+status collapsed
+
+\begin_layout Plain Layout
+local_comm
+\end_layout
+
+\end_inset
+
+ or 
+\begin_inset Flex Code
+status collapsed
+
+\begin_layout Plain Layout
+MPI_COMM_WORLD
+\end_layout
+
+\end_inset
+
+) would be returned in return_comm argument.
+ If 
+\begin_inset Flex Code
+status collapsed
+
+\begin_layout Plain Layout
+return_comm
+\end_layout
+
+\end_inset
+
+ is not specified, then 
+\begin_inset Flex Code
+status collapsed
+
+\begin_layout Plain Layout
+local_comm
+\end_layout
+
+\end_inset
+
+ or 
+\begin_inset Flex Code
+status collapsed
+
+\begin_layout Plain Layout
+MPI_COMM_WORLD
+\end_layout
+
+\end_inset
+
+ can be used by the model for it own communication.
+\end_layout
+
+\begin_layout Itemize
+If server mode is activated (
+\begin_inset Flex Code
+status collapsed
+
+\begin_layout Plain Layout
+using_server=true
+\end_layout
+
+\end_inset
+
+): 
+\begin_inset Flex Code
+status collapsed
+
+\begin_layout Plain Layout
+local_comm
+\end_layout
+
+\end_inset
+
+ must not be specified since the global 
+\begin_inset Flex Code
+status collapsed
+
+\begin_layout Plain Layout
+MPI_COMM_WORLD
+\end_layout
+
+\end_inset
+
+ communicator would be split by XIOS.
+ The split communicator is returned in 
+\begin_inset Flex Code
+status collapsed
+
+\begin_layout Plain Layout
+return_comm
+\end_layout
+
+\end_inset
+
+ argument.
+\end_layout
+
+\end_deeper
+\begin_layout Itemize
+If OASIS coupler is used (
+\begin_inset Flex Code
+status collapsed
+
+\begin_layout Plain Layout
+using_oasis=true
+\end_layout
+
+\end_inset
+
+)
+\end_layout
+
+\begin_deeper
+\begin_layout Itemize
+If server mode is not enabled (
+\begin_inset Flex Code
+status collapsed
+
+\begin_layout Plain Layout
+using_server=false
+\end_layout
+
+\end_inset
+
+) 
+\end_layout
+
+\begin_deeper
+\begin_layout Itemize
+If 
+\begin_inset Flex Code
+status collapsed
+
+\begin_layout Plain Layout
+local_comm
+\end_layout
+
+\end_inset
+
+ is specified, it means that OASIS has been initialized by the model and
+ global communicator has been already split previously by OASIS, and passed
+ as 
+\begin_inset Flex Code
+status collapsed
+
+\begin_layout Plain Layout
+local_comm
+\end_layout
+
+\end_inset
+
+ argument.
+ The returned communicator would be a duplicate copy of 
+\begin_inset Flex Code
+status collapsed
+
+\begin_layout Plain Layout
+local_comm
+\end_layout
+
+\end_inset
+
+.
+\end_layout
+
+\begin_layout Itemize
+Otherwise: if MPI was not initialized, OASIS will be initialized calling
+ 
+\begin_inset Flex Code
+status collapsed
+
+\begin_layout Plain Layout
+prism_init_comp_proto
+\end_layout
+
+\end_inset
+
+ subroutine.
+ In this case, XIOS will call 
+\begin_inset Flex Code
+status collapsed
+
+\begin_layout Plain Layout
+prism_terminate_proto
+\end_layout
+
+\end_inset
+
+ when 
+\begin_inset Flex Code
+status collapsed
+
+\begin_layout Plain Layout
+xios_finalized
+\end_layout
+
+\end_inset
+
+ is called.
+ The split communicator is returned in 
+\begin_inset Flex Code
+status collapsed
+
+\begin_layout Plain Layout
+return_comm
+\end_layout
+
+\end_inset
+
+ argument using 
+\begin_inset Flex Code
+status collapsed
+
+\begin_layout Plain Layout
+prism_get_localcomm_proto
+\end_layout
+
+\end_inset
+
+ return argument.
+\end_layout
+
+\end_deeper
+\begin_layout Itemize
+If server mode is enabled (
+\begin_inset Flex Code
+status collapsed
+
+\begin_layout Plain Layout
+using_server=true
+\end_layout
+
+\end_inset
+
+)
+\end_layout
+
+\begin_deeper
+\begin_layout Itemize
+If 
+\begin_inset Flex Code
+status collapsed
+
+\begin_layout Plain Layout
+local_comm
+\end_layout
+
+\end_inset
+
+ is specified, it means that OASIS has been initialized by the model and
+ global communicator has been already split previously by OASIS, and passed
+ as local_comm argument.
+ The returned communicator return_comm would be a split communicator given
+ by OASIS.
+\end_layout
+
+\begin_layout Itemize
+Otherwise: if MPI was not initialized, OASIS will be initialized calling
+ 
+\begin_inset Flex Code
+status collapsed
+
+\begin_layout Plain Layout
+prism_init_comp_proto
+\end_layout
+
+\end_inset
+
+ subroutine.
+ In this case, XIOS will call 
+\begin_inset Flex Code
+status collapsed
+
+\begin_layout Plain Layout
+prism_terminate_proto
+\end_layout
+
+\end_inset
+
+ when 
+\begin_inset Flex Code
+status collapsed
+
+\begin_layout Plain Layout
+xios_finalized
+\end_layout
+
+\end_inset
+
+ is called.
+ The split communicator is returned in 
+\begin_inset Flex Code
+status collapsed
+
+\begin_layout Plain Layout
+return_comm
+\end_layout
+
+\end_inset
+
+ argument using 
+\begin_inset Flex Code
+status collapsed
+
+\begin_layout Plain Layout
+prism_get_localcomm_proto
+\end_layout
+
+\end_inset
+
+ return argument.
+\end_layout
+
+\end_deeper
+\end_deeper
+\begin_layout Section*
+Finalization
+\end_layout
+
+\begin_layout Subsection*
+XIOS finalization
+\end_layout
+
+\begin_layout Subsubsection*
+Synopsis:
+\end_layout
+
+\begin_layout LyX-Code
+SUBROUTINE xios_finalize()
+\end_layout
+
+\begin_layout Subsubsection*
+Arguments:
+\end_layout
+
+\begin_layout Standard
+None
+\end_layout
+
+\begin_layout Subsubsection*
+Description:
+\end_layout
+
+\begin_layout Standard
+This call must be done at the end of the simulation for a successful execution.
+ It gives the end signal to the xios server pools to finish it execution.
+ If MPI has been initialize by XIOS the MPI_Finalize will be called.
+ If OASIS coupler has been initialized by XIOS, then finalization will be
+ done calling 
+\begin_inset Flex Code
+status collapsed
+
+\begin_layout Plain Layout
+prism_terminate_proto
+\end_layout
+
+\end_inset
+
+ subroutine.
+\end_layout
+
+\begin_layout Section*
+Tree elements management subroutines
+\end_layout
+
+\begin_layout Standard
+This set of subroutines enables the models to interact, complete or query
+ the XML tree data base.
+ New elements or group of elements can be added as child in the tree, attributes
+ of the elements can be set or query.
+ The type of elements currently available are: context, axis, domain, grid,
+ field, variable and file.
+ An element can be identified by a string or by an handle associated to
+ the type of the element.
+ Root element (ex: 
+\begin_inset Quotes eld
+\end_inset
+
+axis_definition
+\begin_inset Quotes erd
+\end_inset
+
+, 
+\begin_inset Quotes eld
+\end_inset
+
+field_definition
+\begin_inset Quotes erd
+\end_inset
+
+,....) are considered like a group of element and are identified by a specific
+ string 
+\begin_inset Quotes eld
+\end_inset
+
+element_definition
+\begin_inset Quotes erd
+\end_inset
+
+ where element can be any one of the existing elements.
+\end_layout
+
+\begin_layout Subsection*
+Fortran type of the handles element
+\end_layout
+
+\begin_layout Quotation
+TYPE(xios_element)
+\end_layout
+
+\begin_layout Standard
+where 
+\begin_inset Quotes eld
+\end_inset
+
+element
+\begin_inset Quotes erd
+\end_inset
+
+ can be any one among 
+\begin_inset Quotes eld
+\end_inset
+
+context
+\begin_inset Quotes erd
+\end_inset
+
+, 
+\begin_inset Quotes eld
+\end_inset
+
+axis
+\begin_inset Quotes erd
+\end_inset
+
+, 
+\begin_inset Quotes eld
+\end_inset
+
+domain
+\begin_inset Quotes erd
+\end_inset
+
+, 
+\begin_inset Quotes eld
+\end_inset
+
+grid
+\begin_inset Quotes erd
+\end_inset
+
+, 
+\begin_inset Quotes eld
+\end_inset
+
+field
+\begin_inset Quotes erd
+\end_inset
+
+, 
+\begin_inset Quotes eld
+\end_inset
+
+variable
+\begin_inset Quotes erd
+\end_inset
+
+ or 
+\begin_inset Quotes eld
+\end_inset
+
+file
+\begin_inset Quotes erd
+\end_inset
+
+, or the associated group (excepted for context): 
+\begin_inset Quotes eld
+\end_inset
+
+axis_group
+\begin_inset Quotes erd
+\end_inset
+
+, 
+\begin_inset Quotes eld
+\end_inset
+
+domain_group
+\begin_inset Quotes erd
+\end_inset
+
+, 
+\begin_inset Quotes eld
+\end_inset
+
+grid_group
+\begin_inset Quotes erd
+\end_inset
+
+, 
+\begin_inset Quotes eld
+\end_inset
+
+field_group
+\begin_inset Quotes erd
+\end_inset
+
+, 
+\begin_inset Quotes eld
+\end_inset
+
+variable_group
+\begin_inset Quotes erd
+\end_inset
+
+ or 
+\begin_inset Quotes eld
+\end_inset
+
+file_group
+\begin_inset Quotes erd
+\end_inset
+
+.
+\end_layout
+
+\begin_layout Subsection*
+Getting handles
+\end_layout
+
+\begin_layout Subsubsection*
+Synopsis:
+\end_layout
+
+\begin_layout LyX-Code
+SUBROUTINE xios_get_element_handle(id,handle)
+\end_layout
+
+\begin_layout LyX-Code
+CHARACTER(len = *) , INTENT(IN) :: id
+\end_layout
+
+\begin_layout LyX-Code
+TYPE(xios_element), INTENT(OUT):: handle
+\end_layout
+
+\begin_layout Standard
+where element is one of the existing elements or group of elements.
+\end_layout
+
+\begin_layout Subsubsection*
+Arguments:
+\end_layout
+
+\begin_layout Itemize
+\begin_inset Flex Code
+status collapsed
+
+\begin_layout Plain Layout
+id
+\end_layout
+
+\end_inset
+
+: string identifier.
+\end_layout
+
+\begin_layout Itemize
+\begin_inset Flex Code
+status collapsed
+
+\begin_layout Plain Layout
+handle
+\end_layout
+
+\end_inset
+
+: element handle
+\end_layout
+
+\begin_layout Subsubsection*
+Description:
+\end_layout
+
+\begin_layout Standard
+This subroutine returns the handle of the specified element identified by
+ its string.
+ The element must be existing otherwise an error is raised.
+\end_layout
+
+\begin_layout Subsection*
+Query for a valid element
+\end_layout
+
+\begin_layout Subsubsection*
+Synopsis:
+\end_layout
+
+\begin_layout LyX-Code
+LOGICAL FUNCTION xios_is_valid_element(id)
+\end_layout
+
+\begin_layout LyX-Code
+CHARACTER(len = *) , INTENT(IN) :: id
+\end_layout
+
+\begin_layout Standard
+where element is one of the existing elements or group of elements.
+\end_layout
+
+\begin_layout Subsubsection*
+Arguments:
+\end_layout
+
+\begin_layout Itemize
+\begin_inset Flex Code
+status collapsed
+
+\begin_layout Plain Layout
+id
+\end_layout
+
+\end_inset
+
+: string identifier.
+\end_layout
+
+\begin_layout Subsubsection*
+Description:
+\end_layout
+
+\begin_layout Standard
+This function returns .TRUE.
+ if the element defined by the string identifier 
+\begin_inset Quotes eld
+\end_inset
+
+id
+\begin_inset Quotes erd
+\end_inset
+
+ exists in the data base, otherwise it returns .FALSE.
+ .
+\end_layout
+
+\begin_layout Subsection*
+Adding child
+\end_layout
+
+\begin_layout Subsubsection*
+Synopsis:
+\end_layout
+
+\begin_layout LyX-Code
+SUBROUTINE xios_add_element(parent_handle, child_handle, child_id)
+\end_layout
+
+\begin_layout LyX-Code
+TYPE(xios_element)         , INTENT(IN) :: parent_handle
+\end_layout
+
+\begin_layout LyX-Code
+TYPE(xios_element)         , INTENT(OUT):: child_handle
+\end_layout
+
+\begin_layout LyX-Code
+CHARACTER(len = *), OPTIONAL, INTENT(IN) :: child_id
+\end_layout
+
+\begin_layout Standard
+where element is one of the existing elements or element groups.
+\end_layout
+
+\begin_layout Subsubsection*
+Arguments:
+\end_layout
+
+\begin_layout Itemize
+\begin_inset Flex Code
+status collapsed
+
+\begin_layout Plain Layout
+parent_handle
+\end_layout
+
+\end_inset
+
+: handle of the parent element.
+\end_layout
+
+\begin_layout Itemize
+\begin_inset Flex Code
+status collapsed
+
+\begin_layout Plain Layout
+child_handle
+\end_layout
+
+\end_inset
+
+: handle of the child element.
+\end_layout
+
+\begin_layout Itemize
+\begin_inset Flex Code
+status collapsed
+
+\begin_layout Plain Layout
+child_id
+\end_layout
+
+\end_inset
+
+: string identifier of the child.
+\end_layout
+
+\begin_layout Subsubsection*
+Description:
+\end_layout
+
+\begin_layout Standard
+This subroutine adds a child to an existing parent element.
+ The identifier of the child, if existing, can be specified optionally.
+ All group elements can contain child of the same type, provided generic
+ inheritance.
+ Some elements can contain children of another type for a specific behavior.
+ File element may contain field_group, field, variable and variable_group
+ child elements.
+ Field elements may contain variable_group of variable child element.
+\end_layout
+
+\begin_layout Subsection*
+Query if the value of an element attribute is defined (by handle)
+\end_layout
+
+\begin_layout Subsubsection*
+Synopsis:
+\end_layout
+
+\begin_layout LyX-Code
+SUBROUTINE xios_is_defined_attr(handle, attr_1=attribute_1, attr_2=attribute_2,
+ ...)
+\end_layout
+
+\begin_layout LyX-Code
+TYPE(xios_element)         , INTENT(IN) :: handle
+\end_layout
+
+\begin_layout LyX-Code
+LOGICAL, OPTIONAL  , INTENT(OUT) :: attr_1
+\end_layout
+
+\begin_layout LyX-Code
+LOGICAL, OPTIONAL  , INTENT(OUT) :: attr_2
+\end_layout
+
+\begin_layout LyX-Code
+....
+\end_layout
+
+\begin_layout Standard
+where element is one of the existing elements or element groups.
+ attribute_x is describing in the chapter dedicated to the attribute description.
+\end_layout
+
+\begin_layout Subsubsection*
+Arguments:
+\end_layout
+
+\begin_layout Itemize
+\begin_inset Flex Code
+status collapsed
+
+\begin_layout Plain Layout
+handle
+\end_layout
+
+\end_inset
+
+: element handle.
+\end_layout
+
+\begin_layout Itemize
+\begin_inset Flex Code
+status collapsed
+
+\begin_layout Plain Layout
+attr_x
+\end_layout
+
+\end_inset
+
+: return true if the attribute as a defined value.
+\end_layout
+
+\begin_layout Subsubsection*
+Description:
+\end_layout
+
+\begin_layout Standard
+This subroutine can be used to query if one or more attributes of an element
+ have a defined value.
+ The list of attributes and their type are described in a specific chapter
+ of the documentation.
+ 
+\end_layout
+
+\begin_layout Subsection*
+Query if a value of an element attributes is defined (by identifier)
+\end_layout
+
+\begin_layout Subsubsection*
+Synopsis:
+\end_layout
+
+\begin_layout LyX-Code
+SUBROUTINE xios_is_defined_element_attr(id, attr_1=attribute_1, attr_2=attribute
+_2, ...)
+\end_layout
+
+\begin_layout LyX-Code
+CHARACTER(len = *) , INTENT(IN) :: id
+\end_layout
+
+\begin_layout LyX-Code
+LOGICAL, OPTIONAL  , INTENT(OUT) :: attr_1
+\end_layout
+
+\begin_layout LyX-Code
+LOGICAL, OPTIONAL  , INTENT(OUT) :: attr_2
+\end_layout
+
+\begin_layout LyX-Code
+....
+\end_layout
+
+\begin_layout Standard
+where element is one of the existing elements or element groups.
+ attribute_x is describing in the chapter dedicated to the attribute description.
+\end_layout
+
+\begin_layout Subsubsection*
+Arguments:
+\end_layout
+
+\begin_layout Itemize
+\begin_inset Flex Code
+status collapsed
+
+\begin_layout Plain Layout
+id
+\end_layout
+
+\end_inset
+
+: element identifier.
+\end_layout
+
+\begin_layout Itemize
+\begin_inset Flex Code
+status collapsed
+
+\begin_layout Plain Layout
+attr_x
+\end_layout
+
+\end_inset
+
+: return true if the attribute as a defined value.
+\end_layout
+
+\begin_layout Subsubsection*
+Description:
+\end_layout
+
+\begin_layout Standard
+This subroutine can be used to query if one or more attributes of an element
+ have a defined value.
+ The list of available attributes and their type are described in a specific
+ chapter of the documentation.
+ 
+\end_layout
+
+\begin_layout Subsection*
+Setting element attributes value by handle
+\end_layout
+
+\begin_layout Subsubsection*
+Synopsis:
+\end_layout
+
+\begin_layout LyX-Code
+SUBROUTINE xios_set_attr(handle, attr_1=attribute_1, attr_2=attribute_2,
+ ...)
+\end_layout
+
+\begin_layout LyX-Code
+TYPE(xios_element)         , INTENT(IN) :: handle
+\end_layout
+
+\begin_layout LyX-Code
+attribute_type_1, OPTIONAL  , INTENT(IN) :: attr_1
+\end_layout
+
+\begin_layout LyX-Code
+attribute_type_2, OPTIONAL  , INTENT(IN) :: attr_2
+\end_layout
+
+\begin_layout LyX-Code
+....
+\end_layout
+
+\begin_layout Standard
+where element is one of the existing elements or element groups.
+ attribute_x and attribute_type_x are describing in the chapter dedicated
+ to the attribute description.
+\end_layout
+
+\begin_layout Subsubsection*
+Arguments:
+\end_layout
+
+\begin_layout Itemize
+\begin_inset Flex Code
+status collapsed
+
+\begin_layout Plain Layout
+handle
+\end_layout
+
+\end_inset
+
+: element handle.
+\end_layout
+
+\begin_layout Itemize
+\begin_inset Flex Code
+status collapsed
+
+\begin_layout Plain Layout
+attr_x
+\end_layout
+
+\end_inset
+
+: value of the attribute to be set.
+\end_layout
+
+\begin_layout Subsubsection*
+Description:
+\end_layout
+
+\begin_layout Standard
+This subroutine can be used to set one or more attributes of an element
+ defined by its handle.
+ The list of available attributes and their types are described in corresponding
+ chapters of the documentation.
+ 
+\end_layout
+
+\begin_layout Subsection*
+Setting element attributes value by id
+\end_layout
+
+\begin_layout Subsubsection*
+Synopsis:
+\end_layout
+
+\begin_layout LyX-Code
+SUBROUTINE xios_set_element_attr(id, attr_1=attribute_1, attr_2=attribute_2,
+ ...)
+\end_layout
+
+\begin_layout LyX-Code
+CHARACTER(len = *),  INTENT(IN)          :: id
+\end_layout
+
+\begin_layout LyX-Code
+attribute_type_1, OPTIONAL  , INTENT(IN) :: attr_1
+\end_layout
+
+\begin_layout LyX-Code
+attribute_type_2, OPTIONAL  , INTENT(IN) :: attr_2
+\end_layout
+
+\begin_layout LyX-Code
+....
+\end_layout
+
+\begin_layout Standard
+where element is one of the existing elements or element groups.
+ The attributes attribute_x and attribute_type_x are described in corresponding
+ chapters.
+\end_layout
+
+\begin_layout Subsubsection*
+Arguments:
+\end_layout
+
+\begin_layout Itemize
+\begin_inset Flex Code
+status collapsed
+
+\begin_layout Plain Layout
+id
+\end_layout
+
+\end_inset
+
+: string identifier.
+\end_layout
+
+\begin_layout Itemize
+\begin_inset Flex Code
+status collapsed
+
+\begin_layout Plain Layout
+attr_x
+\end_layout
+
+\end_inset
+
+: value of the attribute to be set.
+\end_layout
+
+\begin_layout Subsubsection*
+Description:
+\end_layout
+
+\begin_layout Standard
+This subroutine can be used to set one or more attributes of an element
+ defined by its string id.
+ The list of available attributes and their type are described in corresponding
+ chapters of the documentation.
+\end_layout
+
+\begin_layout Subsection*
+Getting element attributes value (by handle)
+\end_layout
+
+\begin_layout Subsubsection*
+Synopsis:
+\end_layout
+
+\begin_layout LyX-Code
+SUBROUTINE xios_get_attr(handle, attr_1=attribute_1, attr_2=attribute_2,
+ ...)
+\end_layout
+
+\begin_layout LyX-Code
+TYPE(xios_element)         , INTENT(IN) :: handle
+\end_layout
+
+\begin_layout LyX-Code
+attribute_type_1, OPTIONAL  , INTENT(OUT) :: attr_1
+\end_layout
+
+\begin_layout LyX-Code
+attribute_type_2, OPTIONAL  , INTENT(OUT) :: attr_2
+\end_layout
+
+\begin_layout LyX-Code
+....
+\end_layout
+
+\begin_layout Standard
+where element is one of the existing elements or element groups.
+ attribute_x and attribute_type_x are describing in the chapter dedicated
+ to the attribute description.
+\end_layout
+
+\begin_layout Subsubsection*
+Arguments:
+\end_layout
+
+\begin_layout Itemize
+\begin_inset Flex Code
+status collapsed
+
+\begin_layout Plain Layout
+handle
+\end_layout
+
+\end_inset
+
+: element handle.
+\end_layout
+
+\begin_layout Itemize
+\begin_inset Flex Code
+status collapsed
+
+\begin_layout Plain Layout
+attr_x
+\end_layout
+
+\end_inset
+
+: value of the attribute to be get.
+\end_layout
+
+\begin_layout Subsubsection*
+Description:
+\end_layout
+
+\begin_layout Standard
+This subroutine can be used to get one or more attribute value of an element
+ defined by its handle.
+ All attributes in the arguments list must be defined.
+ The list of available attributes and their type are described in a specific
+ chapter of the documentation.
+ 
+\end_layout
+
+\begin_layout Subsection*
+Getting element attributes value (by identifier)
+\end_layout
+
+\begin_layout Subsubsection*
+Synopsis:
+\end_layout
+
+\begin_layout LyX-Code
+SUBROUTINE xios_get_element_attr(id, attr_1=attribute_1, attr_2=attribute_2,
+ ...)
+\end_layout
+
+\begin_layout LyX-Code
+CHARACTER(len = *),   INTENT(IN)          :: id
+\end_layout
+
+\begin_layout LyX-Code
+attribute_type_1, OPTIONAL  , INTENT(OUT) :: attr_1
+\end_layout
+
+\begin_layout LyX-Code
+attribute_type_2, OPTIONAL  , INTENT(OUT) :: attr_2
+\end_layout
+
+\begin_layout LyX-Code
+....
+\end_layout
+
+\begin_layout Standard
+where element is one of the existing elements or element groups.
+ attribute_x is describing in the chapter dedicated to the attribute description.
+\end_layout
+
+\begin_layout Subsubsection*
+Arguments:
+\end_layout
+
+\begin_layout Itemize
+\begin_inset Flex Code
+status collapsed
+
+\begin_layout Plain Layout
+id
+\end_layout
+
+\end_inset
+
+: element string identifier.
+\end_layout
+
+\begin_layout Itemize
+\begin_inset Flex Code
+status collapsed
+
+\begin_layout Plain Layout
+attr_x
+\end_layout
+
+\end_inset
+
+: value of the attribute to be get.
+\end_layout
+
+\begin_layout Subsubsection*
+Description:
+\end_layout
+
+\begin_layout Standard
+This subroutine can be used to get one or more attribute value of an element
+ defined by its handle.
+ All attributes in the arguments list must have a defined value.
+ The list of available attributes and their type are described in a specific
+ chapter of the documentation.
+\end_layout
+
+\begin_layout Section*
+Context management interface
+\end_layout
+
+\begin_layout Subsection*
+XIOS context initialization
+\end_layout
+
+\begin_layout Subsubsection*
+Synopsis:
+\end_layout
+
+\begin_layout LyX-Code
+SUBROUTINE xios_context_initialize(context_id, context_comm)
+\end_layout
+
+\begin_layout LyX-Code
+  CHARACTER(LEN=*),INTENT(IN)         :: context_id
+\end_layout
+
+\begin_layout LyX-Code
+  INTEGER,INTENT(IN)                  :: context_comm
+\end_layout
+
+\begin_layout Subsubsection*
+Argument:
+\end_layout
+
+\begin_layout Itemize
+\begin_inset Flex Code
+status collapsed
+
+\begin_layout Plain Layout
+context_id
+\end_layout
+
+\end_inset
+
+: context identifier
+\end_layout
+
+\begin_layout Itemize
+\begin_inset Flex Code
+status collapsed
+
+\begin_layout Plain Layout
+context_comm
+\end_layout
+
+\end_inset
+
+: MPI communicator of the context
+\end_layout
+
+\begin_layout Subsubsection*
+Description:
+\end_layout
+
+\begin_layout Standard
+This subroutine initializes a context identified by 
+\begin_inset Flex Code
+status collapsed
+
+\begin_layout Plain Layout
+context_id
+\end_layout
+
+\end_inset
+
+ string and must be called before any call related to this context.
+ A context must be associated to a communicator, which can be the returned
+ communicator of the 
+\begin_inset Flex Code
+status collapsed
+
+\begin_layout Plain Layout
+xios_initialize
+\end_layout
+
+\end_inset
+
+ subroutine or a sub-communicator of this.
+ The context initialization is dynamic and can be done at any time before
+ the 
+\begin_inset Flex Code
+status collapsed
+
+\begin_layout Plain Layout
+xios_finalize
+\end_layout
+
+\end_inset
+
+ call.
+\end_layout
+
+\begin_layout Subsection*
+XIOS context finalization
+\end_layout
+
+\begin_layout Subsubsection*
+Synopsis:
+\end_layout
+
+\begin_layout LyX-Code
+SUBROUTINE xios_context_finalize()
+\end_layout
+
+\begin_layout Subsubsection*
+Arguments:
+\end_layout
+
+\begin_layout Standard
+None
+\end_layout
+
+\begin_layout Subsubsection*
+Description:
+\end_layout
+
+\begin_layout Standard
+This subroutine must be called to close a context before the 
+\begin_inset Flex Code
+status collapsed
+
+\begin_layout Plain Layout
+xios_finalize
+\end_layout
+
+\end_inset
+
+ call.
+ It waits until that all pending requests sent to the servers will be processed
+ and all opened files will be closed.
+\end_layout
+
+\begin_layout Subsection*
+Setting current active context
+\end_layout
+
+\begin_layout Subsubsection*
+Synopsis:
+\end_layout
+
+\begin_layout LyX-Code
+SUBROUTINE xios_set_current_context(context_handle)
+\end_layout
+
+\begin_layout LyX-Code
+TYPE(xios_context),INTENT(IN) :: context_handle
+\end_layout
+
+\begin_layout Standard
+or
+\end_layout
+
+\begin_layout LyX-Code
+SUBROUTINE xios_set_current_context(context_id)
+\end_layout
+
+\begin_layout LyX-Code
+CHARACTER(LEN=*),INTENT(IN) :: context_id
+\end_layout
+
+\begin_layout Subsubsection*
+Arguments:
+\end_layout
+
+\begin_layout Itemize
+\begin_inset Flex Code
+status collapsed
+
+\begin_layout Plain Layout
+context_handle
+\end_layout
+
+\end_inset
+
+: handle of the context
+\end_layout
+
+\begin_layout Standard
+or
+\end_layout
+
+\begin_layout Itemize
+\begin_inset Flex Code
+status collapsed
+
+\begin_layout Plain Layout
+context_id
+\end_layout
+
+\end_inset
+
+: string context identifier
+\end_layout
+
+\begin_layout Subsubsection*
+Description:
+\end_layout
+
+\begin_layout Standard
+These subroutines set the current active context.
+ All following XIOS calls will refer to this active context.
+ If only one context is defined, it will be set automatically as the active
+ context.
+ 
+\end_layout
+
+\begin_layout Subsection*
+Closing definition
+\end_layout
+
+\begin_layout Subsubsection*
+Synopsis:
+\end_layout
+
+\begin_layout LyX-Code
+SUBROUTINE xios_close_context_definition()
+\end_layout
+
+\begin_layout Subsubsection*
+Arguments:
+\end_layout
+
+\begin_layout Standard
+None
+\end_layout
+
+\begin_layout Subsubsection*
+Description:
+\end_layout
+
+\begin_layout Standard
+This subroutine must be called when all definitions of a context are finished
+ at the end of the initialization and before entering to the time loop.
+ A lot of operations are performed internally (inheritance, grid definition,
+ contacting servers,...) so this call is mandatory.
+ Any call related to the tree management definition done after will have
+ an undefined effect.
+\end_layout
+
+\begin_layout Section*
+Calendar management interface
+\end_layout
+
+\begin_layout Subsection*
+Creating the calendar
+\end_layout
+
+\begin_layout Subsubsection*
+Synopsis:
+\end_layout
+
+\begin_layout LyX-Code
+SUBROUTINE xios_define_calendar(type, timestep, start_date, time_origin,
+ &
+\begin_inset Newline newline
+\end_inset
+
+                                day_length, month_lengths, year_length,
+ &
+\begin_inset Newline newline
+\end_inset
+
+                                leap_year_month, leap_year_drift, &
+\begin_inset Newline newline
+\end_inset
+
+                                leap_year_drift_offset)
+\begin_inset Newline newline
+\end_inset
+
+CHARACTER(len = *),              INTENT(IN) :: type
+\begin_inset Newline newline
+\end_inset
+
+TYPE(xios_duration),   OPTIONAL, INTENT(IN) :: timestep
+\begin_inset Newline newline
+\end_inset
+
+TYPE(xios_date),       OPTIONAL, INTENT(IN) :: start_date
+\begin_inset Newline newline
+\end_inset
+
+TYPE(xios_date),       OPTIONAL, INTENT(IN) :: time_origin
+\begin_inset Newline newline
+\end_inset
+
+INTEGER,               OPTIONAL, INTENT(IN) :: day_length
+\begin_inset Newline newline
+\end_inset
+
+INTEGER,               OPTIONAL, INTENT(IN) :: month_lengths(:)
+\begin_inset Newline newline
+\end_inset
+
+INTEGER,               OPTIONAL, INTENT(IN) :: year_length
+\begin_inset Newline newline
+\end_inset
+
+DOUBLE PRECISION,      OPTIONAL, INTENT(IN) :: leap_year_drift
+\begin_inset Newline newline
+\end_inset
+
+DOUBLE PRECISION,      OPTIONAL, INTENT(IN) :: leap_year_drift_offset
+\begin_inset Newline newline
+\end_inset
+
+INTEGER,               OPTIONAL, INTENT(IN) :: leap_year_month
+\end_layout
+
+\begin_layout Subsubsection*
+Arguments:
+\end_layout
+
+\begin_layout Itemize
+\begin_inset Flex Code
+status collapsed
+
+\begin_layout Plain Layout
+type
+\end_layout
+
+\end_inset
+
+: the calendar type, one of 
+\begin_inset Flex Code
+status collapsed
+
+\begin_layout Plain Layout
+"Gregorian"
+\end_layout
+
+\end_inset
+
+, 
+\begin_inset Flex Code
+status collapsed
+
+\begin_layout Plain Layout
+"Julian"
+\end_layout
+
+\end_inset
+
+, 
+\begin_inset Flex Code
+status collapsed
+
+\begin_layout Plain Layout
+"D360"
+\end_layout
+
+\end_inset
+
+, 
+\begin_inset Flex Code
+status collapsed
+
+\begin_layout Plain Layout
+"AllLeap"
+\end_layout
+
+\end_inset
+
+, 
+\begin_inset Flex Code
+status collapsed
+
+\begin_layout Plain Layout
+"NoLeap"
+\end_layout
+
+\end_inset
+
+, 
+\begin_inset Flex Code
+status collapsed
+
+\begin_layout Plain Layout
+"user_defined"
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Itemize
+\begin_inset Flex Code
+status collapsed
+
+\begin_layout Plain Layout
+timestep
+\end_layout
+
+\end_inset
+
+: the time step of the simulation (optional, can be set later)
+\end_layout
+
+\begin_layout Itemize
+\begin_inset Flex Code
+status collapsed
+
+\begin_layout Plain Layout
+start_date
+\end_layout
+
+\end_inset
+
+: the start date of the simulation (optional, 
+\begin_inset Flex Code
+status collapsed
+
+\begin_layout Plain Layout
+xios_date(0000, 01, 01, 00, 00, 00)
+\end_layout
+
+\end_inset
+
+ is used by default)
+\end_layout
+
+\begin_layout Itemize
+\begin_inset Flex Code
+status collapsed
+
+\begin_layout Plain Layout
+time_origin
+\end_layout
+
+\end_inset
+
+: the origin of the time axis (optional, 
+\begin_inset Flex Code
+status collapsed
+
+\begin_layout Plain Layout
+xios_date(0000, 01, 01, 00, 00, 00)
+\end_layout
+
+\end_inset
+
+ is used by default)
+\end_layout
+
+\begin_layout Itemize
+\begin_inset Flex Code
+status collapsed
+
+\begin_layout Plain Layout
+day_length
+\end_layout
+
+\end_inset
+
+: the length of a day in seconds (mandatory when creating an user defined
+ calendar, must not be set otherwise)
+\end_layout
+
+\begin_layout Itemize
+\begin_inset Flex Code
+status collapsed
+
+\begin_layout Plain Layout
+month_lengths
+\end_layout
+
+\end_inset
+
+: the length of each month of the year in days (either 
+\begin_inset Flex Code
+status collapsed
+
+\begin_layout Plain Layout
+month_lengths
+\end_layout
+
+\end_inset
+
+ or 
+\begin_inset Flex Code
+status collapsed
+
+\begin_layout Plain Layout
+year_length
+\end_layout
+
+\end_inset
+
+ must be set when creating an user defined calendar, must not be set otherwise)
+\end_layout
+
+\begin_layout Itemize
+\begin_inset Flex Code
+status collapsed
+
+\begin_layout Plain Layout
+year_length
+\end_layout
+
+\end_inset
+
+: the length of a year in seconds (either 
+\begin_inset Flex Code
+status collapsed
+
+\begin_layout Plain Layout
+month_lengths
+\end_layout
+
+\end_inset
+
+ or 
+\begin_inset Flex Code
+status collapsed
+
+\begin_layout Plain Layout
+year_length
+\end_layout
+
+\end_inset
+
+ must be set when creating an user defined calendar, must not be set otherwise)
+\end_layout
+
+\begin_layout Itemize
+\begin_inset Flex Code
+status collapsed
+
+\begin_layout Plain Layout
+leap_year_drift
+\end_layout
+
+\end_inset
+
+: the yearly drift between the user defined calendar and the astronomical
+ calendar, expressed as a fraction of day (can optionally be set when creating
+ an user defined calendar in which case 
+\begin_inset Flex Code
+status collapsed
+
+\begin_layout Plain Layout
+leap_year_month
+\end_layout
+
+\end_inset
+
+ must be set too)
+\end_layout
+
+\begin_layout Itemize
+\begin_inset Flex Code
+status collapsed
+
+\begin_layout Plain Layout
+leap_year_drift_offset
+\end_layout
+
+\end_inset
+
+: the initial drift between the user defined calendar and the astronomical
+ calendar at the time origin, expressed as a fraction of day (can optionally
+ be set if 
+\begin_inset Flex Code
+status collapsed
+
+\begin_layout Plain Layout
+leap_year_drift
+\end_layout
+
+\end_inset
+
+ and 
+\begin_inset Flex Code
+status collapsed
+
+\begin_layout Plain Layout
+leap_year_month
+\end_layout
+
+\end_inset
+
+ are set)
+\end_layout
+
+\begin_layout Itemize
+\begin_inset Flex Code
+status collapsed
+
+\begin_layout Plain Layout
+leap_year_month
+\end_layout
+
+\end_inset
+
+: the month to which an extra day must be added in case of leap year (can
+ optionally be set when creating an user defined calendar in which case
+ 
+\begin_inset Flex Code
+status collapsed
+
+\begin_layout Plain Layout
+leap_year_drift
+\end_layout
+
+\end_inset
+
+ must be set too)
+\end_layout
+
+\begin_layout Standard
+For a more detailed description of those arguments, see the description
+ of the corresponding attributes in section 1.2 
+\begin_inset Quotes eld
+\end_inset
+
+Calendar attribute reference
+\begin_inset Quotes erd
+\end_inset
+
+.
+\end_layout
+
+\begin_layout Subsubsection*
+Description:
+\end_layout
+
+\begin_layout Standard
+This subroutine creates the calendar for the current context.
+ Note that the calendar is created once and for all, either from the XML
+ configuration file or the Fortran interface.
+ If it was not created from the configuration file, then this subroutine
+ must be called once and only once before the context definition is closed.
+ The calendar features can be used immediately after the calendar was created.
+\begin_inset Newline newline
+\end_inset
+
+
+\begin_inset Newline newline
+\end_inset
+
+If an user defined calendar is created, the following arguments must also
+ be provided:
+\begin_inset Flex Code
+status collapsed
+
+\begin_layout Plain Layout
+day_length
+\end_layout
+
+\end_inset
+
+ and either 
+\begin_inset Flex Code
+status collapsed
+
+\begin_layout Plain Layout
+month_lengths
+\end_layout
+
+\end_inset
+
+ or 
+\begin_inset Flex Code
+status collapsed
+
+\begin_layout Plain Layout
+year_length
+\end_layout
+
+\end_inset
+
+.
+ Optionally it is possible to configure the user defined calendar to have
+ leap years.
+ In this case, 
+\begin_inset Flex Code
+status collapsed
+
+\begin_layout Plain Layout
+leap_year_drift
+\end_layout
+
+\end_inset
+
+ and 
+\begin_inset Flex Code
+status collapsed
+
+\begin_layout Plain Layout
+leap_year_month
+\end_layout
+
+\end_inset
+
+ must also be provided and 
+\begin_inset Flex Code
+status collapsed
+
+\begin_layout Plain Layout
+leap_year_drift_offset
+\end_layout
+
+\end_inset
+
+ might be used.
+\end_layout
+
+\begin_layout Subsection*
+Accessing the calendar type of the current calendar
+\end_layout
+
+\begin_layout Subsubsection*
+Synopsis:
+\end_layout
+
+\begin_layout LyX-Code
+SUBROUTINE xios_get_calendar_type(calendar_type)
+\begin_inset Newline newline
+\end_inset
+
+CHARACTER(len=*), INTENT(OUT) :: calendar_type
+\end_layout
+
+\begin_layout Subsubsection*
+Arguments:
+\end_layout
+
+\begin_layout Itemize
+\begin_inset Flex Code
+status collapsed
+
+\begin_layout Plain Layout
+calendar_type
+\end_layout
+
+\end_inset
+
+: on output, the type of the calendar attached to the current context
+\end_layout
+
+\begin_layout Subsubsection*
+Description:
+\end_layout
+
+\begin_layout Standard
+This subroutine gets the calendar type associated to the current context.
+ It will raise an error if used before the calendar was created.
+\end_layout
+
+\begin_layout Subsection*
+Accessing and defining the time step of the current calendar
+\end_layout
+
+\begin_layout Subsubsection*
+Synopsis:
+\end_layout
+
+\begin_layout LyX-Code
+SUBROUTINE xios_get_timestep(timestep)
+\begin_inset Newline newline
+\end_inset
+
+TYPE(xios_duration), INTENT(OUT) :: timestep
+\end_layout
+
+\begin_layout Standard
+and
+\end_layout
+
+\begin_layout LyX-Code
+SUBROUTINE xios_set_timestep(timestep)
+\begin_inset Newline newline
+\end_inset
+
+TYPE(xios_duration), INTENT(IN) :: timestep
+\end_layout
+
+\begin_layout Subsubsection*
+Arguments:
+\end_layout
+
+\begin_layout Itemize
+\begin_inset Flex Code
+status collapsed
+
+\begin_layout Plain Layout
+timestep
+\end_layout
+
+\end_inset
+
+: a duration corresponding to the time step of the simulation
+\end_layout
+
+\begin_layout Subsubsection*
+Description:
+\end_layout
+
+\begin_layout Standard
+Those subroutines respectively gets and sets the time step associated to
+ the calendar of the current context.
+ Note that the time step must always be set before the context definition
+ is closed and that an error will be raised if the getter subroutine is
+ used before the time step is defined.
+\end_layout
+
+\begin_layout Subsection*
+Accessing and defining the start date of the current calendar
+\end_layout
+
+\begin_layout Subsubsection*
+Synopsis:
+\end_layout
+
+\begin_layout LyX-Code
+SUBROUTINE xios_get_start_date(start_date)
+\begin_inset Newline newline
+\end_inset
+
+TYPE(xios_date), INTENT(OUT) :: start_date
+\end_layout
+
+\begin_layout Standard
+and
+\end_layout
+
+\begin_layout LyX-Code
+SUBROUTINE xios_set_start_date(start_date)
+\begin_inset Newline newline
+\end_inset
+
+TYPE(xios_date), INTENT(IN) :: start_date
+\end_layout
+
+\begin_layout Subsubsection*
+Arguments:
+\end_layout
+
+\begin_layout Itemize
+\begin_inset Flex Code
+status collapsed
+
+\begin_layout Plain Layout
+start_date
+\end_layout
+
+\end_inset
+
+: a date corresponding to the beginning of the simulation
+\end_layout
+
+\begin_layout Subsubsection*
+Description:
+\end_layout
+
+\begin_layout Standard
+Those subroutines respectively gets and sets the start date associated to
+ the calendar of the current context.
+ They must not be used before the calendar was created.
+\end_layout
+
+\begin_layout Subsection*
+Accessing and defining the time origin of the current calendar
+\end_layout
+
+\begin_layout Subsubsection*
+Synopsis:
+\end_layout
+
+\begin_layout LyX-Code
+SUBROUTINE xios_get_time_origin(time_origin)
+\begin_inset Newline newline
+\end_inset
+
+TYPE(xios_date), INTENT(OUT) :: time_origin
+\end_layout
+
+\begin_layout Standard
+and
+\end_layout
+
+\begin_layout LyX-Code
+SUBROUTINE xios_set_time_date(time_origin)
+\begin_inset Newline newline
+\end_inset
+
+TYPE(xios_date), INTENT(IN) :: time_origin
+\end_layout
+
+\begin_layout Subsubsection*
+Arguments:
+\end_layout
+
+\begin_layout Itemize
+\begin_inset Flex Code
+status collapsed
+
+\begin_layout Plain Layout
+start_date
+\end_layout
+
+\end_inset
+
+: a date corresponding to the origin of the time axis
+\end_layout
+
+\begin_layout Subsubsection*
+Description:
+\end_layout
+
+\begin_layout Standard
+Those subroutines respectively gets and sets the origin of time associated
+ to the calendar of the current context.
+ They must not be used before the calendar was created.
+\end_layout
+
+\begin_layout Subsection*
+Updating the current date of the current calendar
+\end_layout
+
+\begin_layout Subsubsection*
+Synopsis:
+\end_layout
+
+\begin_layout LyX-Code
+SUBROUTINE xios_update_calendar(step)
+\begin_inset Newline newline
+\end_inset
+
+INTEGER, INTENT(IN) :: step
+\end_layout
+
+\begin_layout Subsubsection*
+Arguments:
+\end_layout
+
+\begin_layout Itemize
+\begin_inset Flex Code
+status collapsed
+
+\begin_layout Plain Layout
+step
+\end_layout
+
+\end_inset
+
+: the current iteration number
+\end_layout
+
+\begin_layout Subsubsection*
+Description:
+\end_layout
+
+\begin_layout Standard
+This subroutine sets the current date associated to the calendar of the
+ current context based on the current iteration number: 
+\begin_inset Formula $current\_date=start\_date+step\times timestep$
+\end_inset
+
+.
+ It must not be used before the calendar was created.
+\end_layout
+
+\begin_layout Subsection*
+Accessing the current date of the current calendar
+\end_layout
+
+\begin_layout Subsubsection*
+Synopsis:
+\end_layout
+
+\begin_layout LyX-Code
+SUBROUTINE xios_get_current_date(current_date)
+\begin_inset Newline newline
+\end_inset
+
+TYPE(xios_date), INTENT(OUT) :: current_date
+\end_layout
+
+\begin_layout Subsubsection*
+Arguments:
+\end_layout
+
+\begin_layout Itemize
+\begin_inset Flex Code
+status collapsed
+
+\begin_layout Plain Layout
+current_date
+\end_layout
+
+\end_inset
+
+: on output, the current date
+\end_layout
+
+\begin_layout Subsubsection*
+Description:
+\end_layout
+
+\begin_layout Standard
+This subroutine gets the current date associated to the calendar of the
+ current context.
+ It must not be used before the calendar was created.
+\end_layout
+
+\begin_layout Subsection*
+Accessing the year length of the current calendar
+\end_layout
+
+\begin_layout Subsubsection*
+Synopsis:
+\end_layout
+
+\begin_layout LyX-Code
+INTEGER FUNCTION xios_get_year_length_in_seconds(year)
+\begin_inset Newline newline
+\end_inset
+
+INTEGER, INTENT(IN) :: year
+\end_layout
+
+\begin_layout Subsubsection*
+Arguments:
+\end_layout
+
+\begin_layout Itemize
+\begin_inset Flex Code
+status collapsed
+
+\begin_layout Plain Layout
+year
+\end_layout
+
+\end_inset
+
+: the year whose length is requested
+\end_layout
+
+\begin_layout Subsubsection*
+Description:
+\end_layout
+
+\begin_layout Standard
+This function returns the duration in seconds of the specified year, taking
+ leap years into account based on the calendar of the current context.
+ It must not be used before the calendar was created.
+\end_layout
+
+\begin_layout Subsection*
+Accessing the day length of the current calendar
+\end_layout
+
+\begin_layout Subsubsection*
+Synopsis:
+\end_layout
+
+\begin_layout LyX-Code
+INTEGER FUNCTION xios_get_day_length_in_seconds()
+\end_layout
+
+\begin_layout Subsubsection*
+Arguments: None
+\end_layout
+
+\begin_layout Subsubsection*
+Description:
+\end_layout
+
+\begin_layout Standard
+This function returns the duration in seconds of a day, based on the calendar
+ of the current context.
+ It must not be used before the calendar was created.
+\end_layout
+
+\begin_layout Section*
+Duration handling interface
+\end_layout
+
+\begin_layout Subsection*
+Duration constants
+\end_layout
+
+\begin_layout Standard
+Some duration constants are available to ease duration handling:
+\end_layout
+
+\begin_layout Itemize
+\begin_inset Flex Code
+status collapsed
+
+\begin_layout Plain Layout
+xios_year
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Itemize
+\begin_inset Flex Code
+status collapsed
+
+\begin_layout Plain Layout
+xios_month
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Itemize
+\begin_inset Flex Code
+status collapsed
+
+\begin_layout Plain Layout
+xios_day
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Itemize
+\begin_inset Flex Code
+status collapsed
+
+\begin_layout Plain Layout
+xios_hour
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Itemize
+\begin_inset Flex Code
+status collapsed
+
+\begin_layout Plain Layout
+xios_minute
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Itemize
+\begin_inset Flex Code
+status collapsed
+
+\begin_layout Plain Layout
+xios_second
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Itemize
+\begin_inset Flex Code
+status collapsed
+
+\begin_layout Plain Layout
+xios_timestep
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Subsection*
+Arithmetic operations on durations
+\end_layout
+
+\begin_layout Standard
+The following arithmetic operations on durations are available:
+\end_layout
+
+\begin_layout Itemize
+Addition: 
+\begin_inset Flex Code
+status collapsed
+
+\begin_layout Plain Layout
+xios_duration = xios_duration + xios_duration
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Itemize
+Subtraction: 
+\begin_inset Flex Code
+status collapsed
+
+\begin_layout Plain Layout
+xios_duration = xios_duration - xios_duration
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Itemize
+Multiplication by a scalar value: 
+\begin_inset Flex Code
+status collapsed
+
+\begin_layout Plain Layout
+xios_duration = scalar * xios_duration
+\end_layout
+
+\end_inset
+
+ or 
+\begin_inset Flex Code
+status collapsed
+
+\begin_layout Plain Layout
+xios_duration = xios_duration * scalar
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Itemize
+Negation: 
+\begin_inset Flex Code
+status collapsed
+
+\begin_layout Plain Layout
+xios_duration = -xios_duration
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Subsection*
+Comparison operations on durations
+\end_layout
+
+\begin_layout Standard
+The following comparison operations on durations are available:
+\end_layout
+
+\begin_layout Itemize
+Equality: 
+\begin_inset Flex Code
+status collapsed
+
+\begin_layout Plain Layout
+LOGICAL = xios_duration == xios_duration
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Itemize
+Inequality: 
+\begin_inset Flex Code
+status collapsed
+
+\begin_layout Plain Layout
+LOGICAL = xios_duration /= xios_duration
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Section*
+Interface relative to date handling
+\end_layout
+
+\begin_layout Subsection*
+Arithmetic operations on dates
+\end_layout
+
+\begin_layout Standard
+The following arithmetic operations on dates are available:
+\end_layout
+
+\begin_layout Itemize
+Addition of a duration: 
+\begin_inset Flex Code
+status collapsed
+
+\begin_layout Plain Layout
+xios_date = xios_date + xios_duration
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Itemize
+Subtraction of a duration: 
+\begin_inset Flex Code
+status collapsed
+
+\begin_layout Plain Layout
+xios_date = xios_date - xios_duration
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Itemize
+Subtraction of two dates: 
+\begin_inset Flex Code
+status collapsed
+
+\begin_layout Plain Layout
+xios_duration = xios_date - xios_date
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Subsection*
+Comparison operations on dates
+\end_layout
+
+\begin_layout Standard
+The following comparison operations on dates are available:
+\end_layout
+
+\begin_layout Itemize
+Equality: 
+\begin_inset Flex Code
+status collapsed
+
+\begin_layout Plain Layout
+LOGICAL = xios_date == xios_date
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Itemize
+Inequality: 
+\begin_inset Flex Code
+status collapsed
+
+\begin_layout Plain Layout
+LOGICAL = xios_date /= xios_date
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Itemize
+Less than: 
+\begin_inset Flex Code
+status collapsed
+
+\begin_layout Plain Layout
+LOGICAL = xios_date < xios_date
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Itemize
+Less or equal: 
+\begin_inset Flex Code
+status collapsed
+
+\begin_layout Plain Layout
+LOGICAL = xios_date <= xios_date
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Itemize
+Greater than: 
+\begin_inset Flex Code
+status collapsed
+
+\begin_layout Plain Layout
+LOGICAL = xios_date > xios_date
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Itemize
+Greater or equal: 
+\begin_inset Flex Code
+status collapsed
+
+\begin_layout Plain Layout
+LOGICAL = xios_date >= xios_date
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Subsection*
+Converting a date to a number of seconds since the time origin
+\end_layout
+
+\begin_layout Subsubsection*
+Synopsis:
+\end_layout
+
+\begin_layout LyX-Code
+FUNCTION INTEGER(kind = 8) xios_date_convert_to_seconds(date)
+\begin_inset Newline newline
+\end_inset
+
+TYPE(xios_date), INTENT(IN) :: date
+\end_layout
+
+\begin_layout Subsubsection*
+Arguments:
+\end_layout
+
+\begin_layout Itemize
+\begin_inset Flex Code
+status collapsed
+
+\begin_layout Plain Layout
+date
+\end_layout
+
+\end_inset
+
+: the date to convert
+\end_layout
+
+\begin_layout Subsubsection*
+Description:
+\end_layout
+
+\begin_layout Standard
+This function returns the number of seconds since the time origin for the
+ specified date, based on the calendar of the current context.
+ It must not be used before the calendar was created.
+\end_layout
+
+\begin_layout Subsection*
+Converting a date to a number of seconds since the beginning of the year
+\end_layout
+
+\begin_layout Subsubsection*
+Synopsis:
+\end_layout
+
+\begin_layout LyX-Code
+FUNCTION INTEGER xios(date_get_second_of_year)(date)
+\begin_inset Newline newline
+\end_inset
+
+TYPE(xios_date), INTENT(IN) :: date
+\end_layout
+
+\begin_layout Subsubsection*
+Arguments:
+\end_layout
+
+\begin_layout Itemize
+\begin_inset Flex Code
+status collapsed
+
+\begin_layout Plain Layout
+date
+\end_layout
+
+\end_inset
+
+: the date to convert
+\end_layout
+
+\begin_layout Subsubsection*
+Description:
+\end_layout
+
+\begin_layout Standard
+This function returns the number of seconds since the beginning of the year
+ for the specified date, based on the calendar of the current context.
+ It must not be used before the calendar was created.
+\end_layout
+
+\begin_layout Subsection*
+Converting a date to a number of days since the beginning of the year
+\end_layout
+
+\begin_layout Subsubsection*
+Synopsis:
+\end_layout
+
+\begin_layout LyX-Code
+FUNCTION DOUBLE_PRECISION xios_date_get_day_of_year(date)
+\begin_inset Newline newline
+\end_inset
+
+TYPE(xios_date), INTENT(IN) :: date
+\end_layout
+
+\begin_layout Subsubsection*
+Arguments:
+\end_layout
+
+\begin_layout Itemize
+\begin_inset Flex Code
+status collapsed
+
+\begin_layout Plain Layout
+date
+\end_layout
+
+\end_inset
+
+: the date to convert
+\end_layout
+
+\begin_layout Subsubsection*
+Description:
+\end_layout
+
+\begin_layout Standard
+This function returns the number of days since the beginning of the year
+ for the specified date, based on the calendar of the current context.
+ It must not be used before the calendar was created.
+\end_layout
+
+\begin_layout Subsection*
+Converting a date to a fraction of the current year
+\end_layout
+
+\begin_layout Subsubsection*
+Synopsis:
+\end_layout
+
+\begin_layout LyX-Code
+FUNCTION DOUBLE_PRECISION xios_date_get_fraction_of_year(date)
+\begin_inset Newline newline
+\end_inset
+
+TYPE(xios_date), INTENT(IN) :: date
+\end_layout
+
+\begin_layout Subsubsection*
+Arguments:
+\end_layout
+
+\begin_layout Itemize
+\begin_inset Flex Code
+status collapsed
+
+\begin_layout Plain Layout
+date
+\end_layout
+
+\end_inset
+
+: the date to convert
+\end_layout
+
+\begin_layout Subsubsection*
+Description:
+\end_layout
+
+\begin_layout Standard
+This function returns the fraction of year corresponding to the specified
+ date, based on the calendar of the current context.
+ It must not be used before the calendar was created.
+\end_layout
+
+\begin_layout Subsection*
+Converting a date to a number of seconds since the beginning of the day
+\end_layout
+
+\begin_layout Subsubsection*
+Synopsis:
+\end_layout
+
+\begin_layout LyX-Code
+FUNCTION INTEGER xios(date_get_second_of_day)(date)
+\begin_inset Newline newline
+\end_inset
+
+TYPE(xios_date), INTENT(IN) :: date
+\end_layout
+
+\begin_layout Subsubsection*
+Arguments:
+\end_layout
+
+\begin_layout Itemize
+\begin_inset Flex Code
+status collapsed
+
+\begin_layout Plain Layout
+date
+\end_layout
+
+\end_inset
+
+: the date to convert
+\end_layout
+
+\begin_layout Subsubsection*
+Description:
+\end_layout
+
+\begin_layout Standard
+This function returns the number of seconds since the beginning of the day
+ for the specified date, based on the calendar of the current context.
+ It should not be used before the calendar was created.
+\end_layout
+
+\begin_layout Subsection*
+Converting a date to a fraction of the current day
+\end_layout
+
+\begin_layout Subsubsection*
+Synopsis:
+\end_layout
+
+\begin_layout LyX-Code
+FUNCTION DOUBLE_PRECISION xios_date_get_fraction_of_day(date)
+\begin_inset Newline newline
+\end_inset
+
+TYPE(xios_date), INTENT(IN) :: date
+\end_layout
+
+\begin_layout Subsubsection*
+Arguments:
+\end_layout
+
+\begin_layout Itemize
+\begin_inset Flex Code
+status collapsed
+
+\begin_layout Plain Layout
+date
+\end_layout
+
+\end_inset
+
+: the date to convert
+\end_layout
+
+\begin_layout Subsubsection*
+Description:
+\end_layout
+
+\begin_layout Standard
+This function returns the fraction of day corresponding to the specified
+ date based on the calendar of the current context.
+ It should not be used before the calendar was created.
+\end_layout
+
+\end_body
+\end_document
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/doc/XIOS_user_guide.lyx
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/doc/XIOS_user_guide.lyx	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/doc/XIOS_user_guide.lyx	(revision 1749)
@@ -0,0 +1,5583 @@
+#LyX 2.1 created this file. For more info see http://www.lyx.org/
+\lyxformat 474
+\begin_document
+\begin_header
+\textclass book
+\begin_preamble
+\usepackage{MnSymbol}
+\end_preamble
+\use_default_options true
+\begin_modules
+logicalmkup
+\end_modules
+\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
+\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 0
+\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 Title
+XIOS User Guide
+\end_layout
+
+\begin_layout Author
+Draft
+\end_layout
+
+\begin_layout Chapter
+Calendar
+\end_layout
+
+\begin_layout Section
+How to define a calendar
+\end_layout
+
+\begin_layout Standard
+XIOS has an embedded calendar module which needs to be configured before
+ you can run your simulation.
+\begin_inset Newline newline
+\end_inset
+
+
+\begin_inset Newline newline
+\end_inset
+
+Only the calendar type and the time step used by your simulation are mandatory
+ to have a well defined calendar.
+ For example, a minimal calendar definition could be:
+\end_layout
+
+\begin_layout Itemize
+from the XML configuration file:
+\begin_inset Newline newline
+\end_inset
+
+
+\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
+
+<?xml version="1.0"?>
+\end_layout
+
+\begin_layout Plain Layout
+
+<simulation>
+\end_layout
+
+\begin_layout Plain Layout
+
+	<context id="test">
+\end_layout
+
+\begin_layout Plain Layout
+
+		<calendar type="Gregorian" timestep="1.5h" />
+\end_layout
+
+\begin_layout Plain Layout
+
+	</context>
+\end_layout
+
+\begin_layout Plain Layout
+
+</simulation>
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Itemize
+from the Fortran interface:
+\begin_inset Newline newline
+\end_inset
+
+
+\begin_inset listings
+lstparams "language=Fortran,breaklines=true,tabsize=2,frame=tb,postbreak={\raisebox{0ex}[0ex][0ex]{\ensuremath{\rcurvearrowse\space}}}"
+inline false
+status open
+
+\begin_layout Plain Layout
+
+! ...
+\end_layout
+
+\begin_layout Plain Layout
+
+TYPE(xios_context) :: ctx_hdl
+\end_layout
+
+\begin_layout Plain Layout
+
+! ...
+\end_layout
+
+\begin_layout Plain Layout
+
+! Context initialization ommited, see the corresponding section of this
+ user manual and of the reference manual
+\end_layout
+
+\begin_layout Plain Layout
+
+CALL xios_get_handle("test",ctx_hdl)
+\end_layout
+
+\begin_layout Plain Layout
+
+CALL xios_set_current_context(ctx_hdl)
+\end_layout
+
+\begin_layout Plain Layout
+
+CALL xios_define_calendar(type="Gregorian", timestep=1.5*xios_hour)
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+The calendar type definition is done once and for all, either from the XML
+ configuration file or the Fortran interface, and cannot be modified.
+ However there is no such restriction regarding the time step which can
+ be defined at a different time than the calendar type and even redefined
+ multiple times.
+\begin_inset Newline newline
+\end_inset
+
+
+\begin_inset Newline newline
+\end_inset
+
+For example, it is possible to the achieve the same minimal configuration
+ as above by using both the XML configuration file:
+\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
+
+<?xml version="1.0"?>
+\end_layout
+
+\begin_layout Plain Layout
+
+<simulation>
+\end_layout
+
+\begin_layout Plain Layout
+
+	<context id="test">
+\end_layout
+
+\begin_layout Plain Layout
+
+		<calendar type="Gregorian" />
+\end_layout
+
+\begin_layout Plain Layout
+
+	</context>
+\end_layout
+
+\begin_layout Plain Layout
+
+</simulation>
+\end_layout
+
+\end_inset
+
+and the Fortran interface:
+\end_layout
+
+\begin_layout Standard
+\begin_inset listings
+lstparams "language=Fortran,breaklines=true,tabsize=2,frame=tb,postbreak={\raisebox{0ex}[0ex][0ex]{\ensuremath{\rcurvearrowse\space}}}"
+inline false
+status open
+
+\begin_layout Plain Layout
+
+! ...
+\end_layout
+
+\begin_layout Plain Layout
+
+TYPE(xios_context) :: ctx_hdl
+\end_layout
+
+\begin_layout Plain Layout
+
+! ...
+\end_layout
+
+\begin_layout Plain Layout
+
+! Context initialization ommited, see the corresponding section of this
+ user manual and of the reference manual
+\end_layout
+
+\begin_layout Plain Layout
+
+CALL xios_get_handle("test",ctx_hdl)
+\end_layout
+
+\begin_layout Plain Layout
+
+CALL xios_set_current_context(ctx_hdl)
+\end_layout
+
+\begin_layout Plain Layout
+
+! xios_define_calendar cannot be used here because the type was already
+ defined in the configuration file.
+\end_layout
+
+\begin_layout Plain Layout
+
+! Ommiting the following line would lead to an error because the timestep
+ would be undefined.
+\end_layout
+
+\begin_layout Plain Layout
+
+CALL xios_set_timestep(timestep=1.5*xios_hour)
+\end_layout
+
+\end_inset
+
+The calendar also has two optional date parameters:
+\end_layout
+
+\begin_layout Itemize
+the start date which corresponds to the beginning of the simulation
+\end_layout
+
+\begin_layout Itemize
+the time origin which corresponds to the origin of the time axis.
+\end_layout
+
+\begin_layout Standard
+If they are undefined, those parameters are set by default to 
+\begin_inset Quotes eld
+\end_inset
+
+
+\series bold
+\emph on
+0000-01-01 00:00:00
+\series default
+\emph default
+
+\begin_inset Quotes erd
+\end_inset
+
+.
+ If you are not interested in specific dates, you can ignore those parameters
+ completely.
+ However if you wish to set them, please note that they must not be set
+ before the calendar is defined.
+ Thus the following XML configuration file would be for example invalid:
+\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
+
+<?xml version="1.0"?>
+\end_layout
+
+\begin_layout Plain Layout
+
+<simulation>
+\end_layout
+
+\begin_layout Plain Layout
+
+	<context id="test">
+\end_layout
+
+\begin_layout Plain Layout
+
+		<!-- Invalid because the calendar type cannot be known at that point -->
+\end_layout
+
+\begin_layout Plain Layout
+
+		<calendar start_date="2011-11-11 13:37:42" />
+\end_layout
+
+\begin_layout Plain Layout
+
+	</context>
+\end_layout
+
+\begin_layout Plain Layout
+
+</simulation>
+\end_layout
+
+\end_inset
+
+while the following configuration file would be valid:
+\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
+
+<?xml version="1.0"?>
+\end_layout
+
+\begin_layout Plain Layout
+
+<simulation>
+\end_layout
+
+\begin_layout Plain Layout
+
+	<context id="test">
+\end_layout
+
+\begin_layout Plain Layout
+
+		<!-- The order of the arguments does not matter so this is valid -->
+\end_layout
+
+\begin_layout Plain Layout
+
+		<calendar time_origin="2011-11-11 13:37:42" type="Gregorian" />
+\end_layout
+
+\begin_layout Plain Layout
+
+	</context>
+\end_layout
+
+\begin_layout Plain Layout
+
+</simulation>
+\end_layout
+
+\end_inset
+
+Of course, it is always possible to define or redefine those parameters
+ from the Fortran interface, directly when defining the calendar:
+\end_layout
+
+\begin_layout Standard
+\begin_inset listings
+lstparams "language=Fortran,breaklines=true,tabsize=2,frame=tb,postbreak={\raisebox{0ex}[0ex][0ex]{\ensuremath{\rcurvearrowse\space}}}"
+inline false
+status open
+
+\begin_layout Plain Layout
+
+! ...
+\end_layout
+
+\begin_layout Plain Layout
+
+TYPE(xios_context) :: ctx_hdl
+\end_layout
+
+\begin_layout Plain Layout
+
+! ...
+\end_layout
+
+\begin_layout Plain Layout
+
+! Context initialization ommited, see the corresponding section of this
+ user manual and of the reference manual
+\end_layout
+
+\begin_layout Plain Layout
+
+CALL xios_get_handle("test",ctx_hdl)
+\end_layout
+
+\begin_layout Plain Layout
+
+CALL xios_set_current_context(ctx_hdl)
+\end_layout
+
+\begin_layout Plain Layout
+
+CALL xios_define_calendar(type="Gregorian", time_origin=xios_date(1977,
+ 10, 19, 00, 00, 00), start_date=xios_date(2011, 11, 11, 13, 37, 42))
+\end_layout
+
+\end_inset
+
+or at a later time:
+\end_layout
+
+\begin_layout Standard
+\begin_inset listings
+lstparams "language=Fortran,breaklines=true,tabsize=2,frame=tb,postbreak={\raisebox{0ex}[0ex][0ex]{\ensuremath{\rcurvearrowse\space}}}"
+inline false
+status open
+
+\begin_layout Plain Layout
+
+! ...
+\end_layout
+
+\begin_layout Plain Layout
+
+TYPE(xios_context) :: ctx_hdl
+\end_layout
+
+\begin_layout Plain Layout
+
+! ...
+\end_layout
+
+\begin_layout Plain Layout
+
+! Context initialization ommited, see the corresponding section of this
+ user manual and of the reference manual
+\end_layout
+
+\begin_layout Plain Layout
+
+CALL xios_get_handle("test",ctx_hdl)
+\end_layout
+
+\begin_layout Plain Layout
+
+CALL xios_set_current_context(ctx_hdl)
+\end_layout
+
+\begin_layout Plain Layout
+
+CALL xios_define_calendar(type="Gregorian")
+\end_layout
+
+\begin_layout Plain Layout
+
+CALL xios_set_time_origin(time_origin=xios_date(1977, 10, 19, 00, 00, 00))
+\end_layout
+
+\begin_layout Plain Layout
+
+CALL xios_set_start_date(start_date=xios_date(2011, 11, 11, 13, 37, 42))
+\end_layout
+
+\end_inset
+
+To simplify the use of dates in the XML configuration files, it is possible
+ to partially define a date as long as the omitted parts are the rightmost.
+ In this case the remainder of the date is initialized as in the default
+ date.
+ For example, it would be valid to write: 
+\begin_inset Flex Code
+status open
+
+\begin_layout Plain Layout
+start_date="1977-10-19"
+\end_layout
+
+\end_inset
+
+ instead of 
+\begin_inset Flex Code
+status open
+
+\begin_layout Plain Layout
+start_date="1977-10-19 00:00:00"
+\end_layout
+
+\end_inset
+
+ or even 
+\begin_inset Flex Code
+status open
+
+\begin_layout Plain Layout
+time_origin="1789"
+\end_layout
+
+\end_inset
+
+ instead of 
+\begin_inset Flex Code
+status open
+
+\begin_layout Plain Layout
+time_origin="1789-01-01 00:00:00"
+\end_layout
+
+\end_inset
+
+.
+ Similarly, it is possible to express a date with an optional duration offset
+ in the configuration file by using the 
+\begin_inset Flex Code
+status open
+
+\begin_layout Plain Layout
+date + duration
+\end_layout
+
+\end_inset
+
+ notation, with 
+\begin_inset Flex Code
+status open
+
+\begin_layout Plain Layout
+date
+\end_layout
+
+\end_inset
+
+ potentially partially defined or even completely omitted.
+ Consequently the following examples are all valid in the XML configuration
+ file:
+\end_layout
+
+\begin_layout Itemize
+\begin_inset Flex Code
+status open
+
+\begin_layout Plain Layout
+time_origin="2011-11-11 13:37:00 + 42s"
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Itemize
+\begin_inset Flex Code
+status open
+
+\begin_layout Plain Layout
+time_origin="2014 + 1y 2d"
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Itemize
+\begin_inset Flex Code
+status open
+
+\begin_layout Plain Layout
+start_date="+ 36h"
+\end_layout
+
+\end_inset
+
+.
+\end_layout
+
+\begin_layout Section
+How to define a user defined calendar
+\end_layout
+
+\begin_layout Standard
+Predefined calendars might not be enough for your needs if you simulate
+ phenomenons on another planet than the Earth.
+ For this reason, XIOS can let you configure a completely user defined calendar
+ by setting the 
+\series bold
+type
+\series default
+ attribute to 
+\begin_inset Quotes eld
+\end_inset
+
+
+\series bold
+\emph on
+user_defined
+\series default
+\emph default
+
+\begin_inset Quotes erd
+\end_inset
+
+.
+ In that case, the calendar type alone is not sufficient to define the calendar
+ and other parameters should be provided since the duration of a day or
+ a year are not known in advance.
+\begin_inset Newline newline
+\end_inset
+
+
+\begin_inset Newline newline
+\end_inset
+
+Two approaches are possible depending on whether you want that your custom
+ calendar to have months or not: either use the 
+\series bold
+month_lengths
+\series default
+ attribute to define the duration of each months in days or use the 
+\series bold
+year_length
+\series default
+ attribute to define the duration of the year in seconds.
+ In both cases, you have to define 
+\series bold
+day_length
+\series default
+, the duration of a day in seconds.
+ Those attributes have to be defined at the same time than the calendar
+ type, either from the XML configuration file or the Fortran interface,
+ for example:
+\begin_inset Newline newline
+\end_inset
+
+
+\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
+
+<?xml version="1.0"?>
+\end_layout
+
+\begin_layout Plain Layout
+
+<simulation>
+\end_layout
+
+\begin_layout Plain Layout
+
+	<context id="test">
+\end_layout
+
+\begin_layout Plain Layout
+
+		<calendar type="user_defined" day_length="86400" month_lengths="(1, 12)
+ [31 28 31 30 31 30 31 31 30 31 30 31]" />
+\end_layout
+
+\begin_layout Plain Layout
+
+	</context>
+\end_layout
+
+\begin_layout Plain Layout
+
+</simulation>
+\end_layout
+
+\end_inset
+
+or
+\end_layout
+
+\begin_layout Standard
+\begin_inset listings
+lstparams "language=Fortran,breaklines=true,tabsize=2,frame=tb,postbreak={\raisebox{0ex}[0ex][0ex]{\ensuremath{\rcurvearrowse\space}}}"
+inline false
+status open
+
+\begin_layout Plain Layout
+
+! ...
+\end_layout
+
+\begin_layout Plain Layout
+
+TYPE(xios_context) :: ctx_hdl
+\end_layout
+
+\begin_layout Plain Layout
+
+! ...
+\end_layout
+
+\begin_layout Plain Layout
+
+! Context initialization ommited, see the corresponding section of this
+ user manual and of the reference manual
+\end_layout
+
+\begin_layout Plain Layout
+
+CALL xios_get_handle("test",ctx_hdl)
+\end_layout
+
+\begin_layout Plain Layout
+
+CALL xios_set_current_context(ctx_hdl)
+\end_layout
+
+\begin_layout Plain Layout
+
+CALL xios_define_calendar(type="Gregorian", day_length=86400, year_length=315576
+00)
+\end_layout
+
+\end_inset
+
+Note that if no months are defined, the format of the dates is modified
+ in the XML configuration file since the month must be omitted.
+ For example, 
+\begin_inset Flex Code
+status open
+
+\begin_layout Plain Layout
+"2015-71 13:37:42"
+\end_layout
+
+\end_inset
+
+ would be the correct way to refer to the 71st day of the year 2015 at 13:37:42.
+ If you use the Fortran interface, the month cannot be omitted but you have
+ to make sure to always set it to 
+\begin_inset Flex Code
+status open
+
+\begin_layout Plain Layout
+1
+\end_layout
+
+\end_inset
+
+ in that case.
+ For example, use 
+\begin_inset Flex Code
+status open
+
+\begin_layout Plain Layout
+xios_date(2015, 01, 71, 13, 37, 42)
+\end_layout
+
+\end_inset
+
+for 
+\begin_inset Flex Code
+status open
+
+\begin_layout Plain Layout
+"2015-71 13:37:42"
+\end_layout
+
+\end_inset
+
+.
+ Moreover, it is possible that the duration of the day is greater than the
+ duration of the year on some planets.
+ In this case, it obviously not possible to define months so you have to
+ use the 
+\series bold
+year_length
+\series default
+ attribute.
+ Additionally the day must also be omitted from the dates in the configuration
+ file (for example 
+\begin_inset Flex Code
+status open
+
+\begin_layout Plain Layout
+"2015 13:37:42"
+\end_layout
+
+\end_inset
+
+) and must always be set to 
+\begin_inset Flex Code
+status open
+
+\begin_layout Plain Layout
+1
+\end_layout
+
+\end_inset
+
+ when using the Fortran interface (for example 
+\begin_inset Flex Code
+status open
+
+\begin_layout Plain Layout
+xios_date(2015, 01, 01, 13, 37, 42)
+\end_layout
+
+\end_inset
+
+).
+\begin_inset Newline newline
+\end_inset
+
+
+\begin_inset Newline newline
+\end_inset
+
+If months have been defined, you might want to have leap years to correct
+ the drift between the calendar year and the astronomical year.
+ This can be achieved by using the 
+\series bold
+leap_year_drift
+\series default
+ and 
+\series bold
+leap_year_month
+\series default
+ attributes and optionally the 
+\series bold
+leap_year_drift_offset
+\series default
+ attribute.
+ The idea is to define 
+\series bold
+leap_year_drift
+\series default
+, the yearly drift between the calendar year and the astronomical year as
+ a fraction of a day.
+ This yearly drift is summed each year to know the current drift and each
+ time the current drift is greater or equal to one day, the year is considered
+ a leap year.
+ In that case, an extra day is added to the month defined by 
+\series bold
+leap_year_month
+\series default
+ and one day is subtracted to the current drift.
+ The initial drift is null by default but it can be fixed by the 
+\series bold
+leap_year_drift_offset
+\series default
+ attribute.
+\begin_inset Newline newline
+\end_inset
+
+
+\begin_inset Newline newline
+\end_inset
+
+The following configuration file defines a simplified Gregorian calendar
+ using the user calendar feature:
+\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
+
+<?xml version="1.0"?>
+\end_layout
+
+\begin_layout Plain Layout
+
+<simulation>
+\end_layout
+
+\begin_layout Plain Layout
+
+	<context id="test">
+\end_layout
+
+\begin_layout Plain Layout
+
+		<calendar type="user_defined"
+\end_layout
+
+\begin_layout Plain Layout
+
+					day_length="86400"
+\end_layout
+
+\begin_layout Plain Layout
+
+					month_lengths="(1, 12) [31 28 31 30 31 30 31 31 30 31 30 31]"
+\end_layout
+
+\begin_layout Plain Layout
+
+					leap_year_month="2"
+\end_layout
+
+\begin_layout Plain Layout
+
+					leap_year_drift="0.25"
+\end_layout
+
+\begin_layout Plain Layout
+
+					leap_year_drift_offset="0.75"
+\end_layout
+
+\begin_layout Plain Layout
+
+					time_origin="2012-02-29 15:00:00"
+\end_layout
+
+\begin_layout Plain Layout
+
+					start_date="2012-03-01 15:00:00" />
+\end_layout
+
+\begin_layout Plain Layout
+
+	</context>
+\end_layout
+
+\begin_layout Plain Layout
+
+</simulation>
+\end_layout
+
+\end_inset
+
+As you know, the astronomical year on Earth is approximately a quarter of
+ day longer than the Gregorian calendar year so we have to define the yearly
+ drift as 0.25 day.
+ In case of a leap year, an extra day is added at the end of February which
+ is the second month of the year so 
+\series bold
+leap_year_month
+\series default
+ should be set to 2.
+ We start our time axis in 2012 which was a leap year in the Gregorian calendar.
+ This means there was previously three non-leap years in a row so the current
+ drift was (approximately) 
+\begin_inset Formula $3\times0.25$
+\end_inset
+
+ days, hence 
+\series bold
+leap_year_drift_offset
+\series default
+ should be set to 0.75.
+ At the beginning of 2013, the drift would have been 
+\begin_inset Formula $0.75+0.25=1$
+\end_inset
+
+ day so 2012 will be a leap year as expected.
+\end_layout
+
+\begin_layout Section
+How to use the calendar
+\end_layout
+
+\begin_layout Standard
+The calendar is created immediately after the calendar type has been defined
+ and thus can be used even before the context definition has been closed.
+\begin_inset Newline newline
+\end_inset
+
+
+\begin_inset Newline newline
+\end_inset
+
+Once the calendar is created, you have to keep it updated so that it is
+ in sync with your simulation.
+ To do that, you have to call the 
+\series bold
+xios_update_calendar
+\series default
+ subroutine for each iteration of your code:
+\end_layout
+
+\begin_layout Standard
+\begin_inset listings
+lstparams "language=Fortran,breaklines=true,tabsize=2,frame=tb,postbreak={\raisebox{0ex}[0ex][0ex]{\ensuremath{\rcurvearrowse\space}}}"
+inline false
+status open
+
+\begin_layout Plain Layout
+
+! ...
+\end_layout
+
+\begin_layout Plain Layout
+
+INTEGER :: ts
+\end_layout
+
+\begin_layout Plain Layout
+
+! ...
+\end_layout
+
+\begin_layout Plain Layout
+
+DO ts=1,end
+\end_layout
+
+\begin_layout Plain Layout
+
+	CALL xios_update_calendar(ts)
+\end_layout
+
+\begin_layout Plain Layout
+
+	! Do useful stuff
+\end_layout
+
+\begin_layout Plain Layout
+
+ENDDO
+\end_layout
+
+\end_inset
+
+The current date is updated to 
+\begin_inset Formula $start\_date+ts\times timestep$
+\end_inset
+
+ after each call.
+\begin_inset Newline newline
+\end_inset
+
+
+\begin_inset Newline newline
+\end_inset
+
+Many other calendar operations are available, including:
+\end_layout
+
+\begin_layout Itemize
+accessing various calendar related information like the time step, the time
+ origin, the start date, the duration of a day or a year, the current date,
+ etc.
+ 
+\end_layout
+
+\begin_layout Itemize
+doing arithmetic and comparison operations on date:
+\begin_inset Newline newline
+\end_inset
+
+
+\begin_inset listings
+lstparams "language=Fortran,breaklines=true,tabsize=2,frame=tb,postbreak={\raisebox{0ex}[0ex][0ex]{\ensuremath{\rcurvearrowse\space}}}"
+inline false
+status open
+
+\begin_layout Plain Layout
+
+TYPE(xios_date) :: date1, date2
+\end_layout
+
+\begin_layout Plain Layout
+
+TYPE(xios_duration) :: duration
+\end_layout
+
+\begin_layout Plain Layout
+
+LOGICAL :: res
+\end_layout
+
+\begin_layout Plain Layout
+
+! we suppose a calendar is defined
+\end_layout
+
+\begin_layout Plain Layout
+
+CALL xios_get_current_date(date1)
+\end_layout
+
+\begin_layout Plain Layout
+
+duration = xios_duration(0, 0, 1, 0, 0, 0, 0, 0) + 12 * xios_hour
+\end_layout
+
+\begin_layout Plain Layout
+
+date2 = date1 + duration + 0.5 * xios_hour
+\end_layout
+
+\begin_layout Plain Layout
+
+res = date2 > date1
+\end_layout
+
+\begin_layout Plain Layout
+
+duration = date2 - date1
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Itemize
+converting dates to
+\end_layout
+
+\begin_deeper
+\begin_layout Itemize
+the number of seconds since the time origin, the beginning of the year or
+ the beginning of the day,
+\end_layout
+
+\begin_layout Itemize
+the number of days since the beginning of the year,
+\end_layout
+
+\begin_layout Itemize
+the fraction of the day or the year.
+\end_layout
+
+\end_deeper
+\begin_layout Standard
+For more detailed about the calendar attributes and operations, see the
+ XIOS reference guide.
+\end_layout
+
+\begin_layout Chapter
+Files
+\end_layout
+
+\begin_layout Standard
+Since files are central to an I/O server, the configuration of XIOS is built
+ around file objects.
+ Those objects correspond directly to files on the computer file system
+ which are either to be written or to be read.
+ Although, XIOS currently only supports the NetCDF format, XIOS files are
+ a generic abstraction.
+ Each file can contain one or more fields (each field being defined on a
+ grid) and optionally variables.
+ In the NetCDF nomenclature, fields defined in XIOS correspond to NetCDF
+ variables and XIOS variables are NetCDF attributes.
+ As fields, variables and grids are complex objects, they have their own
+ chapters and we will focus only on files in this section.
+\end_layout
+
+\begin_layout Section
+How to define your first file
+\end_layout
+
+\begin_layout Standard
+If you wish to input or to output data using XIOS, you will need to define
+ at least one file.
+ This can be done from both the XML configuration file and the Fortran interface.
+ Files are usually defined in the configuration file, although their definitions
+ are sometimes amended using the API.
+\begin_inset Newline newline
+\end_inset
+
+
+\begin_inset Newline newline
+\end_inset
+
+File objects are defined with the 
+\begin_inset Flex Code
+status open
+
+\begin_layout Plain Layout
+<file>
+\end_layout
+
+\end_inset
+
+ tag and should always be inside the 
+\begin_inset Flex Code
+status open
+
+\begin_layout Plain Layout
+<file_definition>
+\end_layout
+
+\end_inset
+
+ section.
+ Only the output frequency is mandatory to have a well defined file but
+ it is generally a good idea to give it a name.
+ The following example shows a minimal configuration file which defines
+ one file.
+\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
+
+<?xml version="1.0"?>
+\end_layout
+
+\begin_layout Plain Layout
+
+<simulation>
+\end_layout
+
+\begin_layout Plain Layout
+
+	<context id="test">
+\end_layout
+
+\begin_layout Plain Layout
+
+		<calendar type="Gregorian" timestep="1h" />
+\end_layout
+
+\begin_layout Plain Layout
+
+\end_layout
+
+\begin_layout Plain Layout
+
+		<file_definition>
+\end_layout
+
+\begin_layout Plain Layout
+
+			<file name="output" output_freq="1ts">
+\end_layout
+
+\begin_layout Plain Layout
+
+        		<!-- Content of the file ommited for now -->
+\end_layout
+
+\begin_layout Plain Layout
+
+			</file>
+\end_layout
+
+\begin_layout Plain Layout
+
+		</file_definition>
+\end_layout
+
+\begin_layout Plain Layout
+
+	</context>
+\end_layout
+
+\begin_layout Plain Layout
+
+</simulation>
+\end_layout
+
+\end_inset
+
+Note that the file extension could depend of the format so it is automatically
+ added to the chosen name by XIOS.
+ Since XIOS only support NetCDF formats for now, the extension is always
+ 
+\begin_inset Quotes eld
+\end_inset
+
+.nc
+\begin_inset Quotes erd
+\end_inset
+
+.
+ If the name is not set, XIOS will use the id of the file object instead.
+ This id is generated automatically by XIOS if it was not set by the user.
+\begin_inset Newline newline
+\end_inset
+
+
+\begin_inset Newline newline
+\end_inset
+
+The output frequency is particularly important since it defines the interval
+ of time between two consecutive outputs, that is in NetCDF nomenclature
+ the interval between two records.
+ In the example, the data would be written for every timestep (independently
+ of the timestep duration).
+ It is possible to use any duration as the output frequency but be careful
+ if you are not using a duration which is a multiple of the timestep duration
+ since XIOS might not be doing what you want.
+\begin_inset Newline newline
+\end_inset
+
+
+\begin_inset Newline newline
+\end_inset
+
+The same configuration could be obtained from the Fortran interface as well:
+\begin_inset Newline newline
+\end_inset
+
+
+\begin_inset listings
+lstparams "language=Fortran,breaklines=true,tabsize=2,frame=tb,postbreak={\raisebox{0ex}[0ex][0ex]{\ensuremath{\rcurvearrowse\space}}}"
+inline false
+status open
+
+\begin_layout Plain Layout
+
+! ...
+\end_layout
+
+\begin_layout Plain Layout
+
+TYPE(xios_context)   :: ctx_hdl
+\end_layout
+
+\begin_layout Plain Layout
+
+TYPE(xios_file) 	 :: file_hdl
+\end_layout
+
+\begin_layout Plain Layout
+
+TYPE(xios_filegroup) :: filegroup_hdl
+\end_layout
+
+\begin_layout Plain Layout
+
+! ...
+\end_layout
+
+\begin_layout Plain Layout
+
+! Context and calendar initializations ommited, see the corresponding section
+ of this user manual and of the reference manual
+\end_layout
+
+\begin_layout Plain Layout
+
+CALL xios_get_handle("test", ctx_hdl)
+\end_layout
+
+\begin_layout Plain Layout
+
+CALL xios_set_current_context(ctx_hdl)
+\end_layout
+
+\begin_layout Plain Layout
+
+CALL xios_get_filegroup_handle("file_definition", filegroup_hdl)
+\end_layout
+
+\begin_layout Plain Layout
+
+CALL xios_add_file(filegroup_hdl, file_hdl)
+\end_layout
+
+\begin_layout Plain Layout
+
+CALL xios_set_attr(file_hdl, name="output", output_freq=xios_timestep)
+\end_layout
+
+\end_inset
+
+Another important parameter for file is the 
+\series bold
+mode
+\series default
+ attribute which is set by default to 
+\begin_inset Quotes eld
+\end_inset
+
+
+\series bold
+\emph on
+write
+\series default
+\emph default
+
+\begin_inset Quotes erd
+\end_inset
+
+.
+ You need to set it to 
+\begin_inset Quotes eld
+\end_inset
+
+
+\series bold
+\emph on
+read
+\series default
+\emph default
+
+\begin_inset Quotes erd
+\end_inset
+
+ if you want to use XIOS to handle inputs.
+ Note that in this case the 
+\series bold
+output_freq
+\series default
+ attribute must correspond to the output frequency used to create the input
+ file.
+\begin_inset Newline newline
+\end_inset
+
+
+\begin_inset Newline newline
+\end_inset
+
+When using the 
+\begin_inset Quotes eld
+\end_inset
+
+
+\series bold
+\emph on
+write
+\series default
+\emph default
+
+\begin_inset Quotes erd
+\end_inset
+
+ mode, it is possible to append the data to an existing file instead of
+ overwriting it by setting the 
+\series bold
+append
+\series default
+ attribute to 
+\begin_inset Quotes eld
+\end_inset
+
+
+\series bold
+\emph on
+true
+\series default
+\emph default
+
+\begin_inset Quotes erd
+\end_inset
+
+.
+ In this case, you must be careful not to modify the structure of the file,
+ in particular no fields should be added, modified nor removed, or XIOS
+ will throw an error.
+\begin_inset Newline newline
+\end_inset
+
+
+\begin_inset Newline newline
+\end_inset
+
+If you wish to disable a file without having to remove its definition from
+ the configuration file, you can set the 
+\series bold
+enabled
+\series default
+ attribute to 
+\begin_inset Quotes eld
+\end_inset
+
+
+\series bold
+\emph on
+false
+\series default
+\emph default
+
+\begin_inset Quotes erd
+\end_inset
+
+.
+\end_layout
+
+\begin_layout Section
+How to use parallel I/O
+\end_layout
+
+\begin_layout Standard
+By default XIOS will create one file by server, each file being suffixed
+ with the rank of the server.
+ For example, if the sample configuration used in the previous section was
+ used with two servers, two files named 
+\begin_inset Quotes eld
+\end_inset
+
+output_0.nc
+\begin_inset Quotes erd
+\end_inset
+
+ and 
+\begin_inset Quotes eld
+\end_inset
+
+output_1.nc
+\begin_inset Quotes erd
+\end_inset
+
+ would be created.
+ Each file would contain only the portion of the fields affected to the
+ corresponding server.
+ This default mode can also be explicitly configured by setting the 
+\series bold
+type
+\series default
+ attribute to 
+\begin_inset Quotes eld
+\end_inset
+
+
+\series bold
+\emph on
+multiple_file
+\series default
+\emph default
+
+\begin_inset Quotes erd
+\end_inset
+
+.
+\begin_inset Newline newline
+\end_inset
+
+
+\begin_inset Newline newline
+\end_inset
+
+Using the 
+\begin_inset Quotes eld
+\end_inset
+
+
+\series bold
+\emph on
+multiple_file
+\series default
+\emph default
+
+\begin_inset Quotes erd
+\end_inset
+
+ mode is often a reliable way to achieve good performances, particularly
+ if you only have a few servers.
+ However having multiple files also increases the complexity of the post-process
+ing chains and it is often much easier to always get one file regardless
+ of how many servers are used.
+\begin_inset Newline newline
+\end_inset
+
+
+\begin_inset Newline newline
+\end_inset
+
+It is possible to achieve such behavior in XIOS by setting the 
+\series bold
+type
+\series default
+ attribute to 
+\begin_inset Quotes eld
+\end_inset
+
+
+\series bold
+\emph on
+one_file
+\series default
+\emph default
+
+\begin_inset Quotes erd
+\end_inset
+
+.
+ This feature depends directly on the NetCDF library capabilities so you
+ need to make sure that XIOS was properly linked with a parallel version
+ of NetCDF.
+ If the library was not compiled with parallel input/output support, XIOS
+ will issue a warning and revert to the 
+\begin_inset Quotes eld
+\end_inset
+
+
+\series bold
+\emph on
+multiple_file
+\series default
+\emph default
+
+\begin_inset Quotes erd
+\end_inset
+
+ mode.
+\end_layout
+
+\begin_layout Section
+Supported NetCDF formats
+\end_layout
+
+\begin_layout Standard
+XIOS supports only the version 4 or later of NetCDF library.
+ It uses by default the new NetCDF-4 format which relies on HDF5 format
+ as a back-end.
+ This format can also be selected explicitly by setting the 
+\series bold
+format
+\series default
+ attribute to 
+\begin_inset Quotes eld
+\end_inset
+
+
+\series bold
+\emph on
+netcdf4
+\series default
+\emph default
+
+\begin_inset Quotes erd
+\end_inset
+
+.
+\begin_inset Newline newline
+\end_inset
+
+
+\begin_inset Newline newline
+\end_inset
+
+Alternatively, it also possible to force NetCDF-4 to use the classic NetCDF-3
+ binary format by setting the 
+\series bold
+format
+\series default
+ attribute to 
+\begin_inset Quotes eld
+\end_inset
+
+
+\series bold
+\emph on
+netcdf4_classic
+\series default
+\emph default
+
+\begin_inset Quotes erd
+\end_inset
+
+.
+ When using this older format, some features might be unavailable but current
+ version of XIOS should not be affected much.
+\begin_inset Newline newline
+\end_inset
+
+
+\begin_inset Newline newline
+\end_inset
+
+Depending on the format, there are some specific requirements on how the
+ NetCDF library should have been compiled:
+\end_layout
+
+\begin_layout Itemize
+\begin_inset Quotes eld
+\end_inset
+
+
+\series bold
+\emph on
+netcdf4
+\series default
+\emph default
+
+\begin_inset Quotes erd
+\end_inset
+
+ format requires that HDF5 support has been enabled in NetCDF using the
+ configuration option 
+\begin_inset Flex Code
+status open
+
+\begin_layout Plain Layout
+-\SpecialChar \nobreakdash-
+-enable-netcdf4
+\end_layout
+
+\end_inset
+
+ and that the HDF5 library has been properly linked.
+\end_layout
+
+\begin_layout Itemize
+\begin_inset Quotes eld
+\end_inset
+
+
+\series bold
+\emph on
+netcdf4
+\series default
+\emph default
+
+\begin_inset Quotes erd
+\end_inset
+
+ format used in 
+\begin_inset Quotes eld
+\end_inset
+
+
+\series bold
+\emph on
+one_file
+\series default
+\emph default
+
+\begin_inset Quotes erd
+\end_inset
+
+ mode requires that the HDF5 library has been compiled with parallel support
+ using the configuration option 
+\begin_inset Flex Code
+status open
+
+\begin_layout Plain Layout
+-\SpecialChar \nobreakdash-
+-enable-parallel
+\end_layout
+
+\end_inset
+
+.
+\end_layout
+
+\begin_layout Itemize
+\begin_inset Quotes eld
+\end_inset
+
+
+\series bold
+\emph on
+netcdf4_classic
+\series default
+\emph default
+
+\begin_inset Quotes erd
+\end_inset
+
+ format used in 
+\begin_inset Quotes eld
+\end_inset
+
+
+\series bold
+\emph on
+one_file
+\series default
+\emph default
+
+\begin_inset Quotes erd
+\end_inset
+
+ mode requires that Parallel NetCDF support has been enabled in NetCDF using
+ the configuration option 
+\begin_inset Flex Code
+status open
+
+\begin_layout Plain Layout
+-\SpecialChar \nobreakdash-
+-enable-pnetcdf
+\end_layout
+
+\end_inset
+
+ and that the Parallel NetCDF library has been properly linked.
+\end_layout
+
+\begin_layout Section
+UGRID
+\end_layout
+
+\begin_layout Standard
+In addition to the CF conventions, it is also possible to output data using
+ 
+\begin_inset CommandInset href
+LatexCommand href
+name "UGRID"
+target "https://ugrid-conventions.github.io/ugrid-conventions/"
+
+\end_inset
+
+ metadata conventions developed for unstructured meshes.
+ It allows users to store the topology of an underlying unstructured mesh.
+ Currently XIOS supports 2D unstructured meshes of any shape (triangular,
+ quadrilateral, etc) and their mixture.
+ 
+\end_layout
+
+\begin_layout Standard
+A 2D mesh can be described by a set of nodes, edges and/or faces.
+ XIOS allows one to define data on any of these three types of elements.
+ XIOS will generate a full list of connectivity attributes proposed by the
+ UGRID conventions.
+ For example in case of a mesh comprised of faces the following connectivity
+ parameters will be the calculated:
+\end_layout
+
+\begin_layout Standard
+
+\family typewriter
+edge_node_connectivity
+\end_layout
+
+\begin_layout Standard
+
+\family typewriter
+face_node_connectivity 
+\end_layout
+
+\begin_layout Standard
+
+\family typewriter
+edge_nodes_connectivity 
+\end_layout
+
+\begin_layout Standard
+
+\family typewriter
+face_nodes_connectivity
+\end_layout
+
+\begin_layout Standard
+
+\family typewriter
+face_edges_connectivity
+\end_layout
+
+\begin_layout Standard
+
+\family typewriter
+edge_face_connectivity
+\end_layout
+
+\begin_layout Standard
+
+\family typewriter
+face_face_connectivity
+\end_layout
+
+\begin_layout Standard
+In order to select UGRID output format, one has to set file attribute 
+\series bold
+convention
+\series default
+ to 
+\series bold
+\shape italic
+"UGRID"
+\series default
+\shape default
+ (its default value is 
+\series bold
+\shape italic
+
+\begin_inset Quotes eld
+\end_inset
+
+CF
+\begin_inset Quotes erd
+\end_inset
+
+
+\series default
+\shape default
+).
+ Domain attribute 
+\series bold
+nvertex
+\series default
+ is mandatory for UGRID.
+ It servers for identifying one of three types of mesh elements on which
+ data can be defined: nodes (nvertex=1), edges (nvertex=2), and faces (nvertex
+\begin_inset Formula $\geq$
+\end_inset
+
+3).
+ In order to write fields on the same mesh but on its different elements,
+ one has to assign the same domain name to each of the domains.
+ Example given below illustrates this point for three fields defined on
+ the same mesh but on its different elements: nodes, edges, and faces.
+\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
+
+<file_definition> 
+\end_layout
+
+\begin_layout Plain Layout
+
+	<file id="output_UGRID" convention="UGRID"> 
+\end_layout
+
+\begin_layout Plain Layout
+
+		<field id="varOnNodes" ...
+ domain_ref="node"/> 
+\end_layout
+
+\begin_layout Plain Layout
+
+		<field id="varOnEdges" ...
+ domain_ref="edge"/>
+\end_layout
+
+\begin_layout Plain Layout
+
+		<field id="varOnFaces" ...
+ domain_ref="face"/> 
+\end_layout
+
+\begin_layout Plain Layout
+
+	</file>
+\end_layout
+
+\begin_layout Plain Layout
+
+</file_definition> 
+\end_layout
+
+\begin_layout Plain Layout
+
+\end_layout
+
+\begin_layout Plain Layout
+
+<domain_definition> 
+\end_layout
+
+\begin_layout Plain Layout
+
+	<domain id="node" name="mesh2D" nvertex="1"/>
+\end_layout
+
+\begin_layout Plain Layout
+
+	<domain id="edge" name="mesh2D" nvertex="2"/> 
+\end_layout
+
+\begin_layout Plain Layout
+
+	<domain id="face" name="mesh2D" nvertex="4"/> 
+\end_layout
+
+\begin_layout Plain Layout
+
+</domain_definition> 
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Section
+How to use file splitting
+\end_layout
+
+\begin_layout Standard
+Output files can often be quite huge, particularly if the 
+\begin_inset Quotes eld
+\end_inset
+
+
+\series bold
+\emph on
+one_file
+\series default
+\emph default
+
+\begin_inset Quotes erd
+\end_inset
+
+ mode is used.
+ In this case, it can be interesting to periodically split the file in order
+ to have a few smaller files containing contiguous temporal portions of
+ the output data.
+\begin_inset Newline newline
+\end_inset
+
+
+\begin_inset Newline newline
+\end_inset
+
+This behavior can be achieved in XIOS by setting the 
+\series bold
+split_freq
+\series default
+ attribute to the duration you want, as illustrated in the following example:
+\begin_inset Newline newline
+\end_inset
+
+
+\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
+
+<?xml version="1.0"?>
+\end_layout
+
+\begin_layout Plain Layout
+
+<simulation>
+\end_layout
+
+\begin_layout Plain Layout
+
+	<context id="test">
+\end_layout
+
+\begin_layout Plain Layout
+
+		<calendar type="Gregorian" timestep="1h" />
+\end_layout
+
+\begin_layout Plain Layout
+
+\end_layout
+
+\begin_layout Plain Layout
+
+		<file_definition>
+\end_layout
+
+\begin_layout Plain Layout
+
+			<file name="output" output_freq="1d" split_freq="1y">
+\end_layout
+
+\begin_layout Plain Layout
+
+        		<!-- Content of the file ommited for now -->
+\end_layout
+
+\begin_layout Plain Layout
+
+			</file>
+\end_layout
+
+\begin_layout Plain Layout
+
+		</file_definition>
+\end_layout
+
+\begin_layout Plain Layout
+
+	</context>
+\end_layout
+
+\begin_layout Plain Layout
+
+</simulation>
+\end_layout
+
+\end_inset
+
+With this configuration, some data will be outputted every day and a new
+ file will be created every year.
+\begin_inset Newline newline
+\end_inset
+
+
+\begin_inset Newline newline
+\end_inset
+
+Note that the split frequency is the duration after which a new file will
+ be created, it does not mean that a new file will be created at the beginning
+ of each period.
+ For example, if you start your simulation the first of June 2014 and run
+ it for two years with a split frequency of one year:
+\end_layout
+
+\begin_layout Itemize
+you will get two files containing respectively the period from June 1st,
+ 2014 to May 31th, 2015 and from June 1st, 2015 to May 31th, 2016.
+\end_layout
+
+\begin_layout Itemize
+you will NOT get three files containing respectively the last six months
+ of 2014, the full year of 2015 and the first six months of 2016.
+\end_layout
+
+\begin_layout Standard
+XIOS automatically suffixes the file names with the start and end dates
+ when using file splitting.
+ By default, it will try to use the shortest date that still enables to
+ distinguish the files.
+ Thus in the above example, the files would be named 
+\begin_inset Quotes eld
+\end_inset
+
+output_2014-2015.nc
+\begin_inset Quotes erd
+\end_inset
+
+ and 
+\begin_inset Quotes eld
+\end_inset
+
+output_2015-2016.nc
+\begin_inset Quotes erd
+\end_inset
+
+.
+ If you wish to force the date format used to prefix the files, you can
+ define the 
+\series bold
+split_freq_format
+\series default
+ attribute to override the default behavior.
+\end_layout
+
+\begin_layout Section
+A word about file synchronization
+\end_layout
+
+\begin_layout Standard
+File synchronization is usually not something you should worry about.
+ However, it is important to understand that data written by XIOS might
+ not be immediately written on the disk in practice.
+ Input/output libraries like NetCDF and HDF5 and parallel file systems generally
+ use complex caching policies for performance reasons.
+ This means that your data might still be stored in memory after it was
+ supposedly written.
+\begin_inset Newline newline
+\end_inset
+
+
+\begin_inset Newline newline
+\end_inset
+
+It might become critical to control this behavior for two main reasons:
+\end_layout
+
+\begin_layout Itemize
+if you want to mitigate the impact of a crash, as all buffered data would
+ be lost ;
+\end_layout
+
+\begin_layout Itemize
+if you want to be able to access the data from the output file immediately
+ after writing it.
+\end_layout
+
+\begin_layout Standard
+By default, XIOS will never force file synchronization but you can require
+ it to do so by setting the 
+\series bold
+sync_freq
+\series default
+ attribute to the wanted duration.
+ In this case, XIOS will regularly instruct NetCDF to synchronize the file
+ on disk by flushing its internal buffers.
+\begin_inset Newline newline
+\end_inset
+
+
+\begin_inset Newline newline
+\end_inset
+
+Note file synchronization must be used sparingly as it can have a disastrous
+ impact on performance.
+ Make sure to use a reasonably high synchronization frequency to avoid any
+ issue.
+\end_layout
+
+\begin_layout Chapter
+Fields and variables
+\end_layout
+
+\begin_layout Standard
+XIOS outsources the input/output definitions in its XML configuration file.
+ In the last chapter we presented some general points about file objects.
+ This chapter focuses on how to use fields and variables (that is variables
+ and attributes in NetCDF nomenclature) to populate files.
+\begin_inset Newline newline
+\end_inset
+
+
+\end_layout
+
+\begin_layout Section
+How to define your first field
+\end_layout
+
+\begin_layout Standard
+If you wish to input or to output data using XIOS, you will need to define
+ at least one file with one field.
+ This can be done from both the XML configuration file and the Fortran interface.
+ Fields are often defined in the configuration file, although their definitions
+ are sometimes amended using the API.
+\begin_inset Newline newline
+\end_inset
+
+
+\begin_inset Newline newline
+\end_inset
+
+Field objects are defined with the 
+\begin_inset Flex Code
+status open
+
+\begin_layout Plain Layout
+<field>
+\end_layout
+
+\end_inset
+
+ tag and should always be inside a 
+\begin_inset Flex Code
+status open
+
+\begin_layout Plain Layout
+<field_definition>
+\end_layout
+
+\end_inset
+
+ or a 
+\begin_inset Flex Code
+status open
+
+\begin_layout Plain Layout
+<file>
+\end_layout
+
+\end_inset
+
+ section.
+ Only the grid and the operation attached to the field are mandatory to
+ have a well defined field but it is generally a good idea to give it an
+ identifier.
+ The following example shows a minimal configuration file which defines
+ one file with one field.
+\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
+
+<?xml version="1.0"?>
+\end_layout
+
+\begin_layout Plain Layout
+
+<simulation>
+\end_layout
+
+\begin_layout Plain Layout
+
+	<context id="test">
+\end_layout
+
+\begin_layout Plain Layout
+
+		<calendar type="Gregorian" timestep="1h" />
+\end_layout
+
+\begin_layout Plain Layout
+
+\end_layout
+
+\begin_layout Plain Layout
+
+		<grid_definition>
+\end_layout
+
+\begin_layout Plain Layout
+
+			<grid id="grid_A"><!-- Definition ommited --></grid>
+\end_layout
+
+\begin_layout Plain Layout
+
+		</grid_definition>
+\end_layout
+
+\begin_layout Plain Layout
+
+\end_layout
+
+\begin_layout Plain Layout
+
+		<file_definition>
+\end_layout
+
+\begin_layout Plain Layout
+
+			<file name="output" type="one_file" output_freq="1ts">
+\end_layout
+
+\begin_layout Plain Layout
+
+        		<field id="field_A" grid_ref="grid_A" operation="instant" />
+\end_layout
+
+\begin_layout Plain Layout
+
+			</file>
+\end_layout
+
+\begin_layout Plain Layout
+
+		</file_definition>
+\end_layout
+
+\begin_layout Plain Layout
+
+	</context>
+\end_layout
+
+\begin_layout Plain Layout
+
+</simulation>
+\end_layout
+
+\end_inset
+
+It defines one file named 
+\begin_inset Quotes eld
+\end_inset
+
+
+\emph on
+output
+\emph default
+
+\begin_inset Quotes erd
+\end_inset
+
+ which contains one field 
+\begin_inset Quotes eld
+\end_inset
+
+
+\emph on
+field_A
+\emph default
+
+\begin_inset Quotes erd
+\end_inset
+
+ defined on a grid 
+\begin_inset Quotes eld
+\end_inset
+
+
+\emph on
+grid_A
+\emph default
+
+\begin_inset Quotes erd
+\end_inset
+
+.
+ The file and the field are configured so that the data is written in the
+ file at every timestep (using the 
+\series bold
+output_freq
+\series default
+ file attribute) without any transformation (using the 
+\series bold
+operation
+\series default
+ field attribute set to 
+\begin_inset Quotes eld
+\end_inset
+
+
+\series bold
+\emph on
+instant
+\series default
+\emph default
+
+\begin_inset Quotes erd
+\end_inset
+
+).
+\begin_inset Newline newline
+\end_inset
+
+
+\begin_inset Newline newline
+\end_inset
+
+The corresponding Fortran simulation loop could be:
+\end_layout
+
+\begin_layout Standard
+\begin_inset listings
+lstparams "language=Fortran,breaklines=true,tabsize=2,frame=tb,postbreak={\raisebox{0ex}[0ex][0ex]{\ensuremath{\rcurvearrowse\space}}}"
+inline false
+status open
+
+\begin_layout Plain Layout
+
+DO ts=1,numberOfTimestep
+\end_layout
+
+\begin_layout Plain Layout
+
+	! Inform XIOS of the current timestep
+\end_layout
+
+\begin_layout Plain Layout
+
+	CALL xios_update_calendar(ts)
+\end_layout
+
+\begin_layout Plain Layout
+
+	! Compute field_A for current timestep
+\end_layout
+
+\begin_layout Plain Layout
+
+	! ...
+\end_layout
+
+\begin_layout Plain Layout
+
+	! Output the data
+\end_layout
+
+\begin_layout Plain Layout
+
+	CALL xios_send_field("field_A", field_A)
+\end_layout
+
+\begin_layout Plain Layout
+
+ENDDO
+\end_layout
+
+\end_inset
+
+As you can see, the 
+\series bold
+id
+\series default
+ of the field is used in the model to select the field for which data is
+ being provided which makes this attribute extremely important.
+ Note that it must be unique for all fields even if they are defined in
+ different files.
+ By default, the 
+\series bold
+id
+\series default
+ of a field is also used as the name of the corresponding NetCDF variable.
+ It is however possible to override this default name using the field attribute
+ 
+\series bold
+name
+\series default
+.
+ Two fields can share the same 
+\series bold
+name
+\series default
+ as long as they are not used in the same file.
+\begin_inset Newline newline
+\end_inset
+
+
+\begin_inset Newline newline
+\end_inset
+
+The second argument of the 
+\begin_inset Flex Code
+status open
+
+\begin_layout Plain Layout
+xios_send_field
+\end_layout
+
+\end_inset
+
+ function is an array containing the data.
+ Its shape and content are not described here as they depend directly on
+ the grid.
+ For more information on the data layout, refer to the chapters focusing
+ on grids, domains and axis.
+\begin_inset Newline newline
+\end_inset
+
+
+\begin_inset Newline newline
+\end_inset
+
+The same configuration could also be obtained using the Fortran interface:
+\end_layout
+
+\begin_layout Standard
+\begin_inset listings
+lstparams "language=Fortran,breaklines=true,tabsize=2,frame=tb,postbreak={\raisebox{0ex}[0ex][0ex]{\ensuremath{\rcurvearrowse\space}}}"
+inline false
+status open
+
+\begin_layout Plain Layout
+
+! ...
+\end_layout
+
+\begin_layout Plain Layout
+
+TYPE(xios_context)   :: ctx_hdl
+\end_layout
+
+\begin_layout Plain Layout
+
+TYPE(xios_file) 	 :: file_hdl
+\end_layout
+
+\begin_layout Plain Layout
+
+TYPE(xios_filegroup) :: filegroup_hdl
+\end_layout
+
+\begin_layout Plain Layout
+
+TYPE(xios_field) 	:: field_hdl
+\end_layout
+
+\begin_layout Plain Layout
+
+! ...
+\end_layout
+
+\begin_layout Plain Layout
+
+! Context, calendar and grid initializations ommited, see the corresponding
+ section of this user manual and of the reference manual
+\end_layout
+
+\begin_layout Plain Layout
+
+CALL xios_get_handle("test", ctx_hdl)
+\end_layout
+
+\begin_layout Plain Layout
+
+CALL xios_set_current_context(ctx_hdl)
+\end_layout
+
+\begin_layout Plain Layout
+
+CALL xios_get_filegroup_handle("file_definition", filegroup_hdl)
+\end_layout
+
+\begin_layout Plain Layout
+
+CALL xios_add_file(filegroup_hdl, file_hdl)
+\end_layout
+
+\begin_layout Plain Layout
+
+CALL xios_set_attr(file_hdl, name="output", output_freq=xios_timestep)
+\end_layout
+
+\begin_layout Plain Layout
+
+CALL xios_add_field(file_hdl, field_hdl, "field_A")
+\end_layout
+
+\begin_layout Plain Layout
+
+CALL xios_set_attr(field_hdl, grid_ref="grid_A", operation="instant")
+\end_layout
+
+\end_inset
+
+Note that if you want to define a field on a grid with only one domain and/or
+ one axis, it is possible to use the 
+\series bold
+domain_ref
+\series default
+ and 
+\series bold
+axis_ref
+\series default
+ attributes instead of the 
+\series bold
+grid_ref
+\series default
+ attribute.
+ A temporary grid will be created based on the domain and/or axis defined
+ this way.
+\begin_inset Newline newline
+\end_inset
+
+
+\begin_inset Newline newline
+\end_inset
+
+If you are using a grid with some masked points (see the relevant sections
+ of this manual), you must set the 
+\series bold
+default_value
+\series default
+ attribute to define the default value that will replace the missing values
+ in the output file.
+\begin_inset Newline newline
+\end_inset
+
+
+\begin_inset Newline newline
+\end_inset
+
+If you wish to disable a field without having to remove its definition from
+ the configuration file, you can set the 
+\series bold
+enabled
+\series default
+ attribute to 
+\begin_inset Quotes eld
+\end_inset
+
+
+\series bold
+\emph on
+false
+\series default
+\emph default
+
+\begin_inset Quotes erd
+\end_inset
+
+.
+\end_layout
+
+\begin_layout Section
+How to use temporal operations
+\end_layout
+
+\begin_layout Standard
+The last section showed a very basic example where the data was outputted
+ at every timestep using the 
+\begin_inset Quotes eld
+\end_inset
+
+
+\series bold
+\emph on
+instant
+\series default
+\emph default
+
+\begin_inset Quotes erd
+\end_inset
+
+ 
+\series bold
+operation
+\series default
+.
+ However in many use cases, it might be more interesting to output only
+ the mean value on a certain period of time for example.
+ This section describes the use of temporal operations available in XIOS.
+\begin_inset Newline newline
+\end_inset
+
+
+\begin_inset Newline newline
+\end_inset
+
+The field attribute 
+\series bold
+operation
+\series default
+ currently supports six modes:
+\end_layout
+
+\begin_layout Itemize
+
+\series bold
+\emph on
+instant
+\series default
+\emph default
+: no temporal operation is applied which means the new data always overrides
+ the previous one even if it was not outputted,
+\end_layout
+
+\begin_layout Itemize
+
+\series bold
+\emph on
+average
+\series default
+\emph default
+: compute and output the mean value,
+\end_layout
+
+\begin_layout Itemize
+
+\series bold
+\emph on
+accumulate
+\series default
+\emph default
+: compute and output the sum,
+\end_layout
+
+\begin_layout Itemize
+
+\series bold
+\emph on
+minimum
+\series default
+\emph default
+: compute and output the minimum value,
+\end_layout
+
+\begin_layout Itemize
+
+\series bold
+\emph on
+maximum
+\series default
+\emph default
+: compute and output the maximum value,
+\end_layout
+
+\begin_layout Itemize
+
+\series bold
+\emph on
+once
+\series default
+\emph default
+ : the data is written to the file only the first time it is received from
+ the model, any subsequent data is ignored.
+ The corresponding NetCDF variable does not have a time dimension.
+\end_layout
+
+\begin_layout Standard
+The output frequency of the file defined by the 
+\series bold
+output_freq
+\series default
+ attribute is used as the temporal operation period (except for the 
+\begin_inset Quotes eld
+\end_inset
+
+
+\series bold
+\emph on
+once
+\series default
+\emph default
+
+\begin_inset Quotes erd
+\end_inset
+
+ 
+\series bold
+operation
+\series default
+ for which there is no period).
+ This means it is for example not possible to output a daily average and
+ a weekly average in the same file.
+\begin_inset Newline newline
+\end_inset
+
+
+\begin_inset Newline newline
+\end_inset
+
+This updated example shows how to output the daily average instead of the
+ instant data for all timesteps:
+\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
+
+<?xml version="1.0"?>
+\end_layout
+
+\begin_layout Plain Layout
+
+<simulation>
+\end_layout
+
+\begin_layout Plain Layout
+
+	<context id="test">
+\end_layout
+
+\begin_layout Plain Layout
+
+		<calendar type="Gregorian" timestep="1h" />
+\end_layout
+
+\begin_layout Plain Layout
+
+\end_layout
+
+\begin_layout Plain Layout
+
+		<grid_definition>
+\end_layout
+
+\begin_layout Plain Layout
+
+			<grid id="grid_A"><!-- Definition ommited --></grid>
+\end_layout
+
+\begin_layout Plain Layout
+
+		</grid_definition>
+\end_layout
+
+\begin_layout Plain Layout
+
+\end_layout
+
+\begin_layout Plain Layout
+
+		<file_definition>
+\end_layout
+
+\begin_layout Plain Layout
+
+			<file name="output" type="one_file" output_freq="1d">
+\end_layout
+
+\begin_layout Plain Layout
+
+        		<field id="field_A" grid_ref="grid_A" operation="average" />
+\end_layout
+
+\begin_layout Plain Layout
+
+			</file>
+\end_layout
+
+\begin_layout Plain Layout
+
+		</file_definition>
+\end_layout
+
+\begin_layout Plain Layout
+
+	</context>
+\end_layout
+
+\begin_layout Plain Layout
+
+</simulation>
+\end_layout
+
+\end_inset
+
+Compared to the previous example, only the file attribute 
+\series bold
+output_freq
+\series default
+ and the field attribute 
+\series bold
+operation
+\series default
+ have been modified.
+ Computing the weekly minimum instead of the daily average would be as simple
+ as using 
+\begin_inset Flex Code
+status open
+
+\begin_layout Plain Layout
+output_freq="7d"
+\end_layout
+
+\end_inset
+
+and 
+\begin_inset Flex Code
+status open
+
+\begin_layout Plain Layout
+operation="minimum"
+\end_layout
+
+\end_inset
+
+.
+\begin_inset Newline newline
+\end_inset
+
+
+\begin_inset Newline newline
+\end_inset
+
+Note that if you use a temporal operation and have 
+\series bold
+default_value
+\series default
+ defined, it might be useful to set the attribute
+\series bold
+ detect_missing_value
+\series default
+ to 
+\begin_inset Quotes eld
+\end_inset
+
+
+\series bold
+\emph on
+true
+\series default
+\emph default
+
+\begin_inset Quotes erd
+\end_inset
+
+.
+ This way temporal operations will not be applied when a default value is
+ detected.
+\begin_inset Newline newline
+\end_inset
+
+
+\begin_inset Newline newline
+\end_inset
+
+For example, we consider the values of a 2x2 domain for three timesteps:
+\begin_inset Formula 
+\[
+\begin{bmatrix}3 & -1\\
+7 & 1
+\end{bmatrix},\qquad\begin{bmatrix}5 & 6\\
+-1 & 2
+\end{bmatrix},\qquad\begin{bmatrix}-1 & 8\\
+3 & 4
+\end{bmatrix}.
+\]
+
+\end_inset
+
+If we suppose that the field is configured to compute the average on three
+ timesteps, the resulting field would be: 
+\begin_inset Formula 
+\[
+\begin{bmatrix}\nicefrac{7}{3} & \nicefrac{13}{3}\\
+3 & \nicefrac{7}{3}
+\end{bmatrix}.
+\]
+
+\end_inset
+
+If 
+\series bold
+default_value
+\series default
+ is set to 
+\emph on
+
+\begin_inset Quotes eld
+\end_inset
+
+-1
+\begin_inset Quotes erd
+\end_inset
+
+
+\emph default
+ and 
+\series bold
+detect_missing_value
+\series default
+ is set to 
+\begin_inset Quotes eld
+\end_inset
+
+
+\series bold
+\emph on
+true
+\series default
+\emph default
+
+\begin_inset Quotes erd
+\end_inset
+
+, the resulting field would be: 
+\begin_inset Formula 
+\[
+\begin{bmatrix}4 & 7\\
+5 & \nicefrac{7}{3}
+\end{bmatrix}.
+\]
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Section
+How to use a specific data sampling
+\end_layout
+
+\begin_layout Standard
+It is sometimes useful to have more control on the data sampling.
+ By default, the input data is used at every timestep but sometimes it is
+ not what you want.
+ The following examples illustrate such cases:
+\end_layout
+
+\begin_layout Enumerate
+the model is not computing updated values at the same frequency for all
+ fields (for example, a field is updated every two timesteps).
+\end_layout
+
+\begin_layout Enumerate
+you want to output a specific instant value in the interval between two
+ outputs.
+\end_layout
+
+\begin_layout Enumerate
+you want to compute an average without taking into account all instant values
+ in the interval between two outputs.
+\end_layout
+
+\begin_layout Standard
+Data sampling can be controlled in XIOS using the 
+\series bold
+freq_op
+\series default
+ (one timestep by default) and 
+\series bold
+freq_offset
+\series default
+ (null by default) attributes.
+ Those attributes define respectively how often data from the model must
+ be used and the amount of time before starting to use it.
+\begin_inset Newline newline
+\end_inset
+
+
+\begin_inset Newline newline
+\end_inset
+
+For following excerpts of configuration files show you to use those attributes
+ to handle the motivating examples.
+\end_layout
+
+\begin_layout Enumerate
+In this example, we suppose that we get two fields from the model: 
+\begin_inset Quotes eld
+\end_inset
+
+field_A
+\begin_inset Quotes erd
+\end_inset
+
+ which is computed for each timestep and 
+\begin_inset Quotes eld
+\end_inset
+
+field_B
+\begin_inset Quotes erd
+\end_inset
+
+ which is only computed every two timesteps.
+ For both fields, we show how to compute and output the sum of all values
+ received during 6 timesteps:
+\begin_inset Newline newline
+\end_inset
+
+
+\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
+
+<file_definition>
+\end_layout
+
+\begin_layout Plain Layout
+
+	<file name="output" output_freq="6ts">
+\end_layout
+
+\begin_layout Plain Layout
+
+		<field id="field_A" grid_ref="grid_A" operation="accumulate" />
+\end_layout
+
+\begin_layout Plain Layout
+
+		<field id="field_B" grid_ref="grid_B" operation="accumulate" freq_op="2ts"
+ />
+\end_layout
+
+\begin_layout Plain Layout
+
+	</file>
+\end_layout
+
+\begin_layout Plain Layout
+
+</file_definition>
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Enumerate
+In this example, we show how to output the 11th instant value every 12 timesteps
+:
+\begin_inset Newline newline
+\end_inset
+
+
+\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
+
+<file_definition>
+\end_layout
+
+\begin_layout Plain Layout
+
+	<file name="output" output_freq="12ts">
+\end_layout
+
+\begin_layout Plain Layout
+
+		<field id="field_A" grid_ref="grid_A" operation="instant" freq_op="11ts"
+ freq_offset="12ts" />
+\end_layout
+
+\begin_layout Plain Layout
+
+	</file>
+\end_layout
+
+\begin_layout Plain Layout
+
+</file_definition>
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Enumerate
+In this example, we suppose that the timestep is equal to one hour and that
+ the simulation starts at midnight.
+ We show how to compute the weekly average of the field value at midday:
+\begin_inset Newline newline
+\end_inset
+
+
+\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
+
+<file_definition>
+\end_layout
+
+\begin_layout Plain Layout
+
+	<file name="output" output_freq="1w">
+\end_layout
+
+\begin_layout Plain Layout
+
+		<field id="field_A" grid_ref="grid_A" operation="average" freq_op="1d"
+ freq_offset="12h" />
+\end_layout
+
+\begin_layout Plain Layout
+
+	</file>
+\end_layout
+
+\begin_layout Plain Layout
+
+</file_definition>
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Section
+How to use field references
+\end_layout
+
+\begin_layout Standard
+It is quite common that different temporal operations must be applied to
+ the same instant data provided by the model.
+ In theory, the only solution to handle this scenario would be to define
+ a field for each operation, give them different 
+\series bold
+id
+\series default
+ and and call 
+\begin_inset Flex Code
+status open
+
+\begin_layout Plain Layout
+xios_send_field
+\end_layout
+
+\end_inset
+
+ with the same array of data for each of those fields.
+\begin_inset Newline newline
+\end_inset
+
+
+\begin_inset Newline newline
+\end_inset
+
+The following example illustrates this solution for a field for which we
+ want to compute the average, minimal and maximal values:
+\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
+
+<?xml version="1.0"?>
+\end_layout
+
+\begin_layout Plain Layout
+
+<simulation>
+\end_layout
+
+\begin_layout Plain Layout
+
+	<context id="test">
+\end_layout
+
+\begin_layout Plain Layout
+
+		<calendar type="Gregorian" timestep="1h" />
+\end_layout
+
+\begin_layout Plain Layout
+
+\end_layout
+
+\begin_layout Plain Layout
+
+		<grid_definition>
+\end_layout
+
+\begin_layout Plain Layout
+
+			<grid id="grid_A"><!-- Definition ommited --></grid>
+\end_layout
+
+\begin_layout Plain Layout
+
+		</grid_definition>
+\end_layout
+
+\begin_layout Plain Layout
+
+\end_layout
+
+\begin_layout Plain Layout
+
+		<file_definition>
+\end_layout
+
+\begin_layout Plain Layout
+
+			<file name="output" output_freq="1d">
+\end_layout
+
+\begin_layout Plain Layout
+
+        		<field id="field_A_avg" grid_ref="grid_A" operation="average"
+ />
+\end_layout
+
+\begin_layout Plain Layout
+
+        		<field id="field_A_min" grid_ref="grid_A" operation="min" />
+\end_layout
+
+\begin_layout Plain Layout
+
+        		<field id="field_A_max" grid_ref="grid_A" operation="max" />
+\end_layout
+
+\begin_layout Plain Layout
+
+			</file>
+\end_layout
+
+\begin_layout Plain Layout
+
+		</file_definition>
+\end_layout
+
+\begin_layout Plain Layout
+
+	</context>
+\end_layout
+
+\begin_layout Plain Layout
+
+</simulation>
+\end_layout
+
+\end_inset
+
+To simplify the handling of such scenarios, XIOS has a 
+\begin_inset Quotes eld
+\end_inset
+
+reference
+\begin_inset Quotes erd
+\end_inset
+
+ feature which allows one field to inherit the attributes (except the 
+\series bold
+id
+\series default
+) and the instant data of another field.
+ The above example can then be rewritten:
+\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
+
+<?xml version="1.0"?>
+\end_layout
+
+\begin_layout Plain Layout
+
+<simulation>
+\end_layout
+
+\begin_layout Plain Layout
+
+	<context id="test">
+\end_layout
+
+\begin_layout Plain Layout
+
+		<calendar type="Gregorian" timestep="1h" />
+\end_layout
+
+\begin_layout Plain Layout
+
+\end_layout
+
+\begin_layout Plain Layout
+
+		<grid_definition>
+\end_layout
+
+\begin_layout Plain Layout
+
+			<grid id="grid_A"><!-- Definition ommited --></grid>
+\end_layout
+
+\begin_layout Plain Layout
+
+		</grid_definition>
+\end_layout
+
+\begin_layout Plain Layout
+
+\end_layout
+
+\begin_layout Plain Layout
+
+		<file_definition>
+\end_layout
+
+\begin_layout Plain Layout
+
+			<file name="output" output_freq="1d">
+\end_layout
+
+\begin_layout Plain Layout
+
+        		<field id="field_A" name="field_A_avg" grid_ref="grid_A" operation="av
+erage" />
+\end_layout
+
+\begin_layout Plain Layout
+
+        		<field field_ref="field_A" name="field_A_min" operation="min"
+ />
+\end_layout
+
+\begin_layout Plain Layout
+
+        		<field field_ref="field_A" name="field_A_max" operation="max"
+ />
+\end_layout
+
+\begin_layout Plain Layout
+
+			</file>
+\end_layout
+
+\begin_layout Plain Layout
+
+		</file_definition>
+\end_layout
+
+\begin_layout Plain Layout
+
+	</context>
+\end_layout
+
+\begin_layout Plain Layout
+
+</simulation>
+\end_layout
+
+\end_inset
+
+With this configuration, only one call to 
+\begin_inset Flex Code
+status open
+
+\begin_layout Plain Layout
+xios_send_field(
+\begin_inset Quotes eld
+\end_inset
+
+field_A
+\begin_inset Quotes erd
+\end_inset
+
+, field_A)
+\end_layout
+
+\end_inset
+
+ is needed.
+ Note how inherited attributes (like 
+\series bold
+name
+\series default
+ or 
+\series bold
+operation
+\series default
+ for example) are overwritten to obtain the desired configuration.
+ Additionally, be aware that it is the instant values which are inherited,
+ not the result of the operation on the field.
+\begin_inset Newline newline
+\end_inset
+
+
+\begin_inset Newline newline
+\end_inset
+
+Similarly, it is sometimes useful to output the result of a temporal operation
+ on a field for different periods.
+ In this case, it does not really make sense to define the field that will
+ be then inherited in one file rather than another.
+ A solution is to make use of the 
+\begin_inset Flex Code
+status open
+
+\begin_layout Plain Layout
+field_definition
+\end_layout
+
+\end_inset
+
+ section so that it is clear that the field can be reused in any file.
+ This is illustrated in the following sample configuration file:
+\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
+
+<?xml version="1.0"?>
+\end_layout
+
+\begin_layout Plain Layout
+
+<simulation>
+\end_layout
+
+\begin_layout Plain Layout
+
+	<context id="test">
+\end_layout
+
+\begin_layout Plain Layout
+
+		<calendar type="Gregorian" timestep="1h" />
+\end_layout
+
+\begin_layout Plain Layout
+
+\end_layout
+
+\begin_layout Plain Layout
+
+		<grid_definition>
+\end_layout
+
+\begin_layout Plain Layout
+
+			<grid id="grid_A"><!-- Definition ommited --></grid>
+\end_layout
+
+\begin_layout Plain Layout
+
+		</grid_definition>
+\end_layout
+
+\begin_layout Plain Layout
+
+\end_layout
+
+\begin_layout Plain Layout
+
+		<field_definition>
+\end_layout
+
+\begin_layout Plain Layout
+
+        	<field id="field_A" name="field_A" grid_ref="grid_A" operation="average
+" />
+\end_layout
+
+\begin_layout Plain Layout
+
+		</field_definition>
+\end_layout
+
+\begin_layout Plain Layout
+
+\end_layout
+
+\begin_layout Plain Layout
+
+		<file_definition>
+\end_layout
+
+\begin_layout Plain Layout
+
+			<file name="output_1d" output_freq="1d">
+\end_layout
+
+\begin_layout Plain Layout
+
+        		<field field_ref="field_A" />
+\end_layout
+
+\begin_layout Plain Layout
+
+			</file>
+\end_layout
+
+\begin_layout Plain Layout
+
+			<file name="output_1mo" output_freq="1mo">
+\end_layout
+
+\begin_layout Plain Layout
+
+        		<field field_ref="field_A" />
+\end_layout
+
+\begin_layout Plain Layout
+
+			</file>
+\end_layout
+
+\begin_layout Plain Layout
+
+		</file_definition>
+\end_layout
+
+\begin_layout Plain Layout
+
+	</context>
+\end_layout
+
+\begin_layout Plain Layout
+
+</simulation>
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Section
+How to use arithmetic operations
+\end_layout
+
+\begin_layout Standard
+Since XIOS aims to reduce as much as possible the need for post-processing,
+ it can apply some arithmetic operations on the data it handles (regardless
+ of its provenance).
+\begin_inset Newline newline
+\end_inset
+
+
+\begin_inset Newline newline
+\end_inset
+
+All usual operators (+, -, *, /, ^, that is addition, subtraction, multiplicatio
+n, division and exponentiation) and some common functions (like cos, sin,
+ tan, exp, log, log10, sqrt) are supported.
+\begin_inset Newline newline
+\end_inset
+
+
+\begin_inset Newline newline
+\end_inset
+
+The following example shows how to use arithmetic operations:
+\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
+
+<?xml version="1.0"?>
+\end_layout
+
+\begin_layout Plain Layout
+
+<simulation>
+\end_layout
+
+\begin_layout Plain Layout
+
+	<context id="test">
+\end_layout
+
+\begin_layout Plain Layout
+
+		<calendar type="Gregorian" timestep="1h" />
+\end_layout
+
+\begin_layout Plain Layout
+
+\end_layout
+
+\begin_layout Plain Layout
+
+		<grid_definition>
+\end_layout
+
+\begin_layout Plain Layout
+
+			<grid id="grid_A"><!-- Definition ommited --></grid>
+\end_layout
+
+\begin_layout Plain Layout
+
+		</grid_definition>
+\end_layout
+
+\begin_layout Plain Layout
+
+\end_layout
+
+\begin_layout Plain Layout
+
+		<field_definition>
+\end_layout
+
+\begin_layout Plain Layout
+
+        	<field id="field_A" grid_ref="grid_A" operation="average" />
+\end_layout
+
+\begin_layout Plain Layout
+
+		</field_definition>
+\end_layout
+
+\begin_layout Plain Layout
+
+\end_layout
+
+\begin_layout Plain Layout
+
+		<file_definition>
+\end_layout
+
+\begin_layout Plain Layout
+
+			<file name="output" output_freq="1d">
+\end_layout
+
+\begin_layout Plain Layout
+
+        		<field id="field_B" field_ref="field_A">field_A + 273.15</field>
+\end_layout
+
+\begin_layout Plain Layout
+
+        		<field id="field_C" field_ref="field_A">log10(field_B)</field>
+\end_layout
+
+\begin_layout Plain Layout
+
+			</file>
+\end_layout
+
+\begin_layout Plain Layout
+
+		</file_definition>
+\end_layout
+
+\begin_layout Plain Layout
+
+	</context>
+\end_layout
+
+\begin_layout Plain Layout
+
+</simulation>
+\end_layout
+
+\end_inset
+
+With this configuration, only one call to 
+\begin_inset Flex Code
+status open
+
+\begin_layout Plain Layout
+xios_send_field(
+\begin_inset Quotes eld
+\end_inset
+
+field_A
+\begin_inset Quotes erd
+\end_inset
+
+, field_A)
+\end_layout
+
+\end_inset
+
+ is needed.
+ In this example 
+\series bold
+field_ref
+\series default
+ is used only to inherit the attributes from 
+\begin_inset Quotes eld
+\end_inset
+
+field_A
+\begin_inset Quotes erd
+\end_inset
+
+, the instant values are not inherited since an expression has been given
+ for 
+\begin_inset Quotes eld
+\end_inset
+
+field_B
+\begin_inset Quotes erd
+\end_inset
+
+ and 
+\begin_inset Quotes eld
+\end_inset
+
+field_C
+\begin_inset Quotes erd
+\end_inset
+
+.
+ Note that it is possible to use fields obtained from an expression in another
+ expression, thus the expression of 
+\begin_inset Quotes eld
+\end_inset
+
+field_C
+\begin_inset Quotes erd
+\end_inset
+
+ is equivalent to 
+\begin_inset Flex Code
+status open
+
+\begin_layout Plain Layout
+log10(field_A + 273.15)
+\end_layout
+
+\end_inset
+
+.
+\begin_inset Newline newline
+\end_inset
+
+
+\begin_inset Newline newline
+\end_inset
+
+The special keyword 
+\series bold
+this
+\series default
+ can be used in an expression to refer to the instant data received from
+ the model by the current field.
+ For example, the previous configuration file could be rewritten as follow:
+\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
+
+<?xml version="1.0"?>
+\end_layout
+
+\begin_layout Plain Layout
+
+<simulation>
+\end_layout
+
+\begin_layout Plain Layout
+
+	<context id="test">
+\end_layout
+
+\begin_layout Plain Layout
+
+		<calendar type="Gregorian" timestep="1h" />
+\end_layout
+
+\begin_layout Plain Layout
+
+\end_layout
+
+\begin_layout Plain Layout
+
+		<grid_definition>
+\end_layout
+
+\begin_layout Plain Layout
+
+			<grid id="grid_A"><!-- Definition ommited --></grid>
+\end_layout
+
+\begin_layout Plain Layout
+
+		</grid_definition>
+\end_layout
+
+\begin_layout Plain Layout
+
+\end_layout
+
+\begin_layout Plain Layout
+
+		<file_definition>
+\end_layout
+
+\begin_layout Plain Layout
+
+			<file name="output" output_freq="1d">
+\end_layout
+
+\begin_layout Plain Layout
+
+        		<field id="field_B" grid_ref="grid_A" operation="average">this
+ + 273.15</field>
+\end_layout
+
+\begin_layout Plain Layout
+
+        		<field id="field_C" field_ref="field_B">log10(field_B)</field>
+\end_layout
+
+\begin_layout Plain Layout
+
+			</file>
+\end_layout
+
+\begin_layout Plain Layout
+
+		</file_definition>
+\end_layout
+
+\begin_layout Plain Layout
+
+	</context>
+\end_layout
+
+\begin_layout Plain Layout
+
+</simulation>
+\end_layout
+
+\end_inset
+
+and the Fortran call would be replaced by 
+\begin_inset Flex Code
+status open
+
+\begin_layout Plain Layout
+xios_send_field(
+\begin_inset Quotes eld
+\end_inset
+
+field_B
+\begin_inset Quotes erd
+\end_inset
+
+, field_B)
+\end_layout
+
+\end_inset
+
+.
+\end_layout
+
+\begin_layout Standard
+XIOS also provides the means to define an expression in a Fortran code via
+ the field attribute 
+\begin_inset Quotes eld
+\end_inset
+
+expr
+\begin_inset Quotes erd
+\end_inset
+
+.
+ The example above can rewritten as
+\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
+
+<?xml version="1.0"?>
+\end_layout
+
+\begin_layout Plain Layout
+
+<simulation>
+\end_layout
+
+\begin_layout Plain Layout
+
+	<context id="test">
+\end_layout
+
+\begin_layout Plain Layout
+
+		<calendar type="Gregorian" timestep="1h" />
+\end_layout
+
+\begin_layout Plain Layout
+
+\end_layout
+
+\begin_layout Plain Layout
+
+		<grid_definition>
+\end_layout
+
+\begin_layout Plain Layout
+
+			<grid id="grid_A"><!-- Definition ommited --></grid>
+\end_layout
+
+\begin_layout Plain Layout
+
+		</grid_definition>
+\end_layout
+
+\begin_layout Plain Layout
+
+\end_layout
+
+\begin_layout Plain Layout
+
+		<file_definition>
+\end_layout
+
+\begin_layout Plain Layout
+
+			<file name="output" output_freq="1d">
+\end_layout
+
+\begin_layout Plain Layout
+
+        		<field id="field_B" grid_ref="grid_A" operation="average">
+\end_layout
+
+\begin_layout Plain Layout
+
+        		<field id="field_C" field_ref="field_B">
+\end_layout
+
+\begin_layout Plain Layout
+
+			</file>
+\end_layout
+
+\begin_layout Plain Layout
+
+		</file_definition>
+\end_layout
+
+\begin_layout Plain Layout
+
+	</context>
+\end_layout
+
+\begin_layout Plain Layout
+
+</simulation>
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+while the two expressions can be specified with the following calls: 
+\begin_inset Flex Code
+status open
+
+\begin_layout Plain Layout
+xios_set_field_attr(
+\begin_inset Quotes eld
+\end_inset
+
+field_B
+\begin_inset Quotes erd
+\end_inset
+
+, expr=
+\begin_inset Quotes erd
+\end_inset
+
+@this + 273.15
+\begin_inset Quotes erd
+\end_inset
+
+
+\end_layout
+
+\end_inset
+
+ and 
+\begin_inset Flex Code
+status open
+
+\begin_layout Plain Layout
+xios_set_field_attr(
+\begin_inset Quotes eld
+\end_inset
+
+field_C
+\begin_inset Quotes erd
+\end_inset
+
+, expr=
+\begin_inset Quotes erd
+\end_inset
+
+log10(field_B)
+\begin_inset Quotes erd
+\end_inset
+
+
+\end_layout
+
+\end_inset
+
+.
+ 
+\end_layout
+
+\begin_layout Section
+How to chain multiple temporal operations
+\end_layout
+
+\begin_layout Standard
+By default, all field names appearing in an expression refer to the instant
+ data of those fields.
+ To refer to the result of a temporal operation, the field name must be
+ prefixed with 
+\begin_inset Quotes eld
+\end_inset
+
+@
+\begin_inset Quotes erd
+\end_inset
+
+.
+\begin_inset Newline newline
+\end_inset
+
+
+\begin_inset Newline newline
+\end_inset
+
+This feature allows to chain multiple temporal operations as illustrated
+ bellow:
+\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
+
+<?xml version="1.0"?>
+\end_layout
+
+\begin_layout Plain Layout
+
+<simulation>
+\end_layout
+
+\begin_layout Plain Layout
+
+	<context id="test">
+\end_layout
+
+\begin_layout Plain Layout
+
+		<calendar type="Gregorian" timestep="1h" />
+\end_layout
+
+\begin_layout Plain Layout
+
+\end_layout
+
+\begin_layout Plain Layout
+
+		<grid_definition>
+\end_layout
+
+\begin_layout Plain Layout
+
+			<grid id="grid_A"><!-- Definition ommited --></grid>
+\end_layout
+
+\begin_layout Plain Layout
+
+		</grid_definition>
+\end_layout
+
+\begin_layout Plain Layout
+
+\end_layout
+
+\begin_layout Plain Layout
+
+		<field_definition>
+\end_layout
+
+\begin_layout Plain Layout
+
+        	<field id="field_A" grid_ref="grid_A" operation="average" />
+\end_layout
+
+\begin_layout Plain Layout
+
+		</field_definition>
+\end_layout
+
+\begin_layout Plain Layout
+
+\end_layout
+
+\begin_layout Plain Layout
+
+		<file_definition>
+\end_layout
+
+\begin_layout Plain Layout
+
+			<file name="output" output_freq="7d">
+\end_layout
+
+\begin_layout Plain Layout
+
+        		<field name="field_A_min_of_average" grid_ref="grid_A" operation="min"
+ freq_op="1d">@field_A</field>
+\end_layout
+
+\begin_layout Plain Layout
+
+			</file>
+\end_layout
+
+\begin_layout Plain Layout
+
+		</file_definition>
+\end_layout
+
+\begin_layout Plain Layout
+
+	</context>
+\end_layout
+
+\begin_layout Plain Layout
+
+</simulation>
+\end_layout
+
+\end_inset
+
+This example shows how to compute the minimum on 7 days of the daily average
+ of 
+\begin_inset Quotes eld
+\end_inset
+
+field_A
+\begin_inset Quotes erd
+\end_inset
+
+.
+ In this context, the 
+\series bold
+freq_op
+\series default
+ attribute defines the period of the temporal operation for all fields pointed
+ with the 
+\begin_inset Quotes eld
+\end_inset
+
+@
+\begin_inset Quotes erd
+\end_inset
+
+ operator in the expression.
+\begin_inset Newline newline
+\end_inset
+
+
+\begin_inset Newline newline
+\end_inset
+
+Another use of this feature is to do arithmetic operations on the result
+ of temporal operations.
+  The following configuration file for example shows how to output the standard
+ deviation for a field on a one day period: 
+\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
+
+<?xml version="1.0"?>
+\end_layout
+
+\begin_layout Plain Layout
+
+<simulation>
+\end_layout
+
+\begin_layout Plain Layout
+
+	<context id="test">
+\end_layout
+
+\begin_layout Plain Layout
+
+		<calendar type="Gregorian" timestep="1h" />
+\end_layout
+
+\begin_layout Plain Layout
+
+\end_layout
+
+\begin_layout Plain Layout
+
+		<grid_definition>
+\end_layout
+
+\begin_layout Plain Layout
+
+			<grid id="grid_A"><!-- Definition ommited --></grid>
+\end_layout
+
+\begin_layout Plain Layout
+
+		</grid_definition>
+\end_layout
+
+\begin_layout Plain Layout
+
+\end_layout
+
+\begin_layout Plain Layout
+
+		<field_definition>
+\end_layout
+
+\begin_layout Plain Layout
+
+        	<field id="field_A" grid_ref="grid_A" operation="average" />
+\end_layout
+
+\begin_layout Plain Layout
+
+        	<field id="field_A_square" field_ref="grid_A">field_A * field_A</field>
+\end_layout
+
+\begin_layout Plain Layout
+
+		</field_definition>
+\end_layout
+
+\begin_layout Plain Layout
+
+\end_layout
+
+\begin_layout Plain Layout
+
+		<file_definition>
+\end_layout
+
+\begin_layout Plain Layout
+
+			<file name="output" output_freq="1d">
+\end_layout
+
+\begin_layout Plain Layout
+
+        		<field name="field_A_std_dev" grid_ref="grid_A" operation="instant"
+ freq_op="1d">sqrt(@field_A_square - @field_A^2)</field>
+\end_layout
+
+\begin_layout Plain Layout
+
+			</file>
+\end_layout
+
+\begin_layout Plain Layout
+
+		</file_definition>
+\end_layout
+
+\begin_layout Plain Layout
+
+	</context>
+\end_layout
+
+\begin_layout Plain Layout
+
+</simulation>
+\end_layout
+
+\end_inset
+
+Note that since an 
+\series bold
+\emph on
+
+\begin_inset Quotes eld
+\end_inset
+
+instant
+\begin_inset Quotes erd
+\end_inset
+
+
+\series default
+ 
+\emph default
+operation is used, 
+\series bold
+freq_op
+\series default
+ and 
+\series bold
+output_freq
+\series default
+ are identical in this scenario.
+\end_layout
+
+\begin_layout Section
+How to access the data of a field
+\end_layout
+
+\begin_layout Standard
+In order not to waste memory, the instant data of a field can be read from
+ the model only if:
+\end_layout
+
+\begin_layout Itemize
+it is part of a file whose attribute 
+\series bold
+mode
+\series default
+ is 
+\series bold
+\emph on
+
+\begin_inset Quotes eld
+\end_inset
+
+read
+\begin_inset Quotes erd
+\end_inset
+
+
+\end_layout
+
+\begin_layout Itemize
+or its attribute 
+\series bold
+read_access
+\series default
+ is set to 
+\series bold
+\emph on
+
+\begin_inset Quotes eld
+\end_inset
+
+true
+\begin_inset Quotes erd
+\end_inset
+
+
+\series default
+\emph default
+.
+\end_layout
+
+\begin_layout Standard
+In any other case, trying to access the field data would cause an error.
+\begin_inset Newline newline
+\end_inset
+
+
+\begin_inset Newline newline
+\end_inset
+
+The following configuration file:
+\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
+
+<?xml version="1.0"?>
+\end_layout
+
+\begin_layout Plain Layout
+
+<simulation>
+\end_layout
+
+\begin_layout Plain Layout
+
+	<context id="test">
+\end_layout
+
+\begin_layout Plain Layout
+
+		<calendar type="Gregorian" timestep="1h" />
+\end_layout
+
+\begin_layout Plain Layout
+
+\end_layout
+
+\begin_layout Plain Layout
+
+		<grid_definition>
+\end_layout
+
+\begin_layout Plain Layout
+
+			<grid id="grid_A"><!-- Definition ommited --></grid>
+\end_layout
+
+\begin_layout Plain Layout
+
+		</grid_definition>
+\end_layout
+
+\begin_layout Plain Layout
+
+\end_layout
+
+\begin_layout Plain Layout
+
+		<file_definition>
+\end_layout
+
+\begin_layout Plain Layout
+
+			<file name="input" output_freq="1ts">
+\end_layout
+
+\begin_layout Plain Layout
+
+        		<field id="field_A" grid_ref="grid_A" operation="instant" />
+\end_layout
+
+\begin_layout Plain Layout
+
+			</file>
+\end_layout
+
+\begin_layout Plain Layout
+
+		</file_definition>
+\end_layout
+
+\begin_layout Plain Layout
+
+	</context>
+\end_layout
+
+\begin_layout Plain Layout
+
+</simulation>
+\end_layout
+
+\end_inset
+
+can be used with this Fortran code:
+\end_layout
+
+\begin_layout Standard
+\begin_inset listings
+lstparams "language=Fortran,breaklines=true,tabsize=2,frame=tb,postbreak={\raisebox{0ex}[0ex][0ex]{\ensuremath{\rcurvearrowse\space}}}"
+inline false
+status open
+
+\begin_layout Plain Layout
+
+DO ts=1,numberOfTimestep
+\end_layout
+
+\begin_layout Plain Layout
+
+	! Get field_A for current timestep
+\end_layout
+
+\begin_layout Plain Layout
+
+	CALL xios_recv_field("field_A", field_A) ! field_A must be an allocated
+ array with the right size
+\end_layout
+
+\begin_layout Plain Layout
+
+	! Do useful things...
+\end_layout
+
+\begin_layout Plain Layout
+
+	! Inform XIOS of the current timestep
+\end_layout
+
+\begin_layout Plain Layout
+
+	CALL xios_update_calendar(ts)
+\end_layout
+
+\begin_layout Plain Layout
+
+ENDDO
+\end_layout
+
+\end_inset
+
+The call to 
+\begin_inset Flex Code
+status open
+
+\begin_layout Plain Layout
+xios_recv_field
+\end_layout
+
+\end_inset
+
+ might block for a while if the data was not yet received from the server(s)
+ but it should not happen too often thanks to the prefetching done by XIOS.
+\begin_inset Newline newline
+\end_inset
+
+
+\begin_inset Newline newline
+\end_inset
+
+Since the 
+\series bold
+read_access
+\series default
+ attribute allows to the access fields which depend directly on data from
+ the model, you must be very careful with the order of the 
+\begin_inset Flex Code
+status open
+
+\begin_layout Plain Layout
+xios_send_field
+\end_layout
+
+\end_inset
+
+ and 
+\begin_inset Flex Code
+status open
+
+\begin_layout Plain Layout
+xios_recv_field
+\end_layout
+
+\end_inset
+
+ calls.
+ For example, consider the following configuration file (just a simple example
+ as in practice it does not make much sense to use it):
+\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
+
+<?xml version="1.0"?>
+\end_layout
+
+\begin_layout Plain Layout
+
+<simulation>
+\end_layout
+
+\begin_layout Plain Layout
+
+	<context id="test">
+\end_layout
+
+\begin_layout Plain Layout
+
+		<calendar type="Gregorian" timestep="1h" />
+\end_layout
+
+\begin_layout Plain Layout
+
+\end_layout
+
+\begin_layout Plain Layout
+
+		<grid_definition>
+\end_layout
+
+\begin_layout Plain Layout
+
+			<grid id="grid_A"><!-- Definition ommited --></grid>
+\end_layout
+
+\begin_layout Plain Layout
+
+		</grid_definition>
+\end_layout
+
+\begin_layout Plain Layout
+
+\end_layout
+
+\begin_layout Plain Layout
+
+		<field_definition>
+\end_layout
+
+\begin_layout Plain Layout
+
+        	<field id="field_A" grid_ref="grid_A" operation="instant" />
+\end_layout
+
+\begin_layout Plain Layout
+
+		</field_definition>
+\end_layout
+
+\begin_layout Plain Layout
+
+\end_layout
+
+\begin_layout Plain Layout
+
+		<file_definition>
+\end_layout
+
+\begin_layout Plain Layout
+
+			<file name="output" output_freq="1ts">
+\end_layout
+
+\begin_layout Plain Layout
+
+        		<field id="field_B" grid_ref="grid_A" operation="instant" read_access=
+"true">field_A / 42</field>
+\end_layout
+
+\begin_layout Plain Layout
+
+			</file>
+\end_layout
+
+\begin_layout Plain Layout
+
+		</file_definition>
+\end_layout
+
+\begin_layout Plain Layout
+
+	</context>
+\end_layout
+
+\begin_layout Plain Layout
+
+</simulation>
+\end_layout
+
+\end_inset
+
+If you call 
+\begin_inset Flex Code
+status open
+
+\begin_layout Plain Layout
+xios_recv_field(
+\begin_inset Quotes eld
+\end_inset
+
+field_B
+\begin_inset Quotes erd
+\end_inset
+
+, field_B)
+\end_layout
+
+\end_inset
+
+ before 
+\begin_inset Flex Code
+status open
+
+\begin_layout Plain Layout
+xios_send_field(
+\begin_inset Quotes eld
+\end_inset
+
+field_A
+\begin_inset Quotes erd
+\end_inset
+
+, field_A)
+\end_layout
+
+\end_inset
+
+, the requested data will never be available and a deadlock could occur.
+ In practice, XIOS will detect the problem and throw an error.
+\end_layout
+
+\begin_layout Section
+How to reduce the size of an output file
+\end_layout
+
+\begin_layout Standard
+The size of the output files can sometimes become a problem.
+ XIOS provides some features which may help to reduce the size of the output
+ files losslessly.
+\begin_inset Newline newline
+\end_inset
+
+
+\begin_inset Newline newline
+\end_inset
+
+The first solution is to use the compression feature provided by HDF5 which
+ allows a field to be compressed using gzip.
+ Since it depends directly on HDF5, this feature works only when the NetCDF-4
+ format is used.
+ Since HDF5 does not (yet) support compression for parallel output, one
+ has to use two server-level functionality (see Sec.
+ 
+\begin_inset CommandInset ref
+LatexCommand ref
+reference "sec:Launching-secondary-server"
+
+\end_inset
+
+) or to engage the 
+\series bold
+\emph on
+
+\begin_inset Quotes eld
+\end_inset
+
+multiple_file
+\begin_inset Quotes erd
+\end_inset
+
+
+\series default
+\emph default
+ mode.
+\begin_inset Newline newline
+\end_inset
+
+
+\begin_inset Newline newline
+\end_inset
+
+To enable the gzip compression of a field, you need to set the 
+\series bold
+compression_level
+\series default
+ attribute to any integer between 1 and 9 (by default this attribute is
+ set to 0 which means that compression is disabled).
+ Using an higher compression level should improve the compression ratio
+ at the cost of using more processing power.
+ Generally using a compression level of 2 should be a good trade-off.
+\begin_inset Newline newline
+\end_inset
+
+
+\begin_inset Newline newline
+\end_inset
+
+The following example illustrates the use of the gzip compression:
+\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
+
+<?xml version="1.0"?>
+\end_layout
+
+\begin_layout Plain Layout
+
+<simulation>
+\end_layout
+
+\begin_layout Plain Layout
+
+	<context id="test">
+\end_layout
+
+\begin_layout Plain Layout
+
+		<calendar type="Gregorian" timestep="1h" />
+\end_layout
+
+\begin_layout Plain Layout
+
+\end_layout
+
+\begin_layout Plain Layout
+
+		<grid_definition>
+\end_layout
+
+\begin_layout Plain Layout
+
+			<grid id="grid_A"><!-- Definition ommited --></grid>
+\end_layout
+
+\begin_layout Plain Layout
+
+		</grid_definition>
+\end_layout
+
+\begin_layout Plain Layout
+
+\end_layout
+
+\begin_layout Plain Layout
+
+		<file_definition>
+\end_layout
+
+\begin_layout Plain Layout
+
+			<file name="output" output_freq="1ts" compression_level="2">
+\end_layout
+
+\begin_layout Plain Layout
+
+        		<field id="field_A" grid_ref="grid_A" operation="average" compression_
+level="4" />
+\end_layout
+
+\begin_layout Plain Layout
+
+        		<field id="field_B" grid_ref="grid_A" operation="average" compression_
+level="0" />
+\end_layout
+
+\begin_layout Plain Layout
+
+        		<field id="field_C" grid_ref="grid_A" operation="average" />
+\end_layout
+
+\begin_layout Plain Layout
+
+			</file>
+\end_layout
+
+\begin_layout Plain Layout
+
+		</file_definition>
+\end_layout
+
+\begin_layout Plain Layout
+
+	</context>
+\end_layout
+
+\begin_layout Plain Layout
+
+</simulation>
+\end_layout
+
+\end_inset
+
+Note that the 
+\series bold
+compression_level
+\series default
+ attribute can also be set at a file level, in this case it is inherited
+ by all fields of the file unless they explicitly override the attribute.
+\begin_inset Newline newline
+\end_inset
+
+
+\begin_inset Newline newline
+\end_inset
+
+The second solution is available only if you are using a grid with masked
+ values.
+ In this case, you can choose to output the indexed grid instead of the
+ full grid by setting the 
+\series bold
+indexed_output
+\series default
+ attribute to 
+\series bold
+\emph on
+
+\begin_inset Quotes eld
+\end_inset
+
+true
+\begin_inset Quotes erd
+\end_inset
+
+
+\series default
+\emph default
+.
+ Missing values are then omitted and extra arrays are outputted so that
+ the translation from the 
+\begin_inset Quotes eld
+\end_inset
+
+compressed
+\begin_inset Quotes erd
+\end_inset
+
+ indexes to the true indexes can be done.
+ Due to those arrays of indexes, indexed output should be considered only
+ if there is enough masked values.
+ For more details about this feature, please refer to section 8.2 
+\begin_inset Quotes eld
+\end_inset
+
+Compression by Gathering
+\begin_inset Quotes erd
+\end_inset
+
+ of the Climate and Forecast (CF) Convention.
+\end_layout
+
+\begin_layout Standard
+\begin_inset CommandInset include
+LatexCommand include
+filename "inputs/user/Grid.lyx"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+\begin_inset CommandInset include
+LatexCommand include
+filename "inputs/user/Domain.lyx"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+\begin_inset CommandInset include
+LatexCommand include
+filename "inputs/user/Axis.lyx"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Chapter
+XIOS parameterization
+\end_layout
+
+\begin_layout Standard
+Some of XIOS behaviors can be configured using options.
+ Those options must be exprhessed as variables in a specific context whose
+ 
+\series bold
+id
+\series default
+ must be 
+\series bold
+\emph on
+
+\begin_inset Quotes eld
+\end_inset
+
+xios
+\begin_inset Quotes erd
+\end_inset
+
+
+\series default
+\emph default
+ as shown below.
+\end_layout
+
+\begin_layout Standard
+\begin_inset listings
+lstparams "breaklines=true,frame=tb,language=XML,postbreak={\raisebox{0ex}[0ex][0ex]{\ensuremath{\rcurvearrowse\space}}},tabsize=2"
+inline false
+status open
+
+\begin_layout Plain Layout
+
+<?xml version="1.0"?>
+\end_layout
+
+\begin_layout Plain Layout
+
+<simulation>
+\end_layout
+
+\begin_layout Plain Layout
+
+	<!-- Actual context(s) used by the simulation ommited -->
+\end_layout
+
+\begin_layout Plain Layout
+
+\end_layout
+
+\begin_layout Plain Layout
+
+	<context id="xios">
+\end_layout
+
+\begin_layout Plain Layout
+
+		<variable_definition>
+\end_layout
+
+\begin_layout Plain Layout
+
+			<variable id="option_name" type="option_type">option_value</variable>
+\end_layout
+
+\begin_layout Plain Layout
+
+		</variable_definition>
+\end_layout
+
+\begin_layout Plain Layout
+
+	</context>
+\end_layout
+
+\begin_layout Plain Layout
+
+</simulation>
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Section
+Launching secondary server
+\begin_inset CommandInset label
+LatexCommand label
+name "sec:Launching-secondary-server"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+To improve I/O performance, it is possible to separate servers into two
+ levels: intermediaries (level one) and writers (level two).
+ Level-one servers will receive data from clients and will redistribute
+ and send the data to subsets of level-two servers (called âpoolsâ), whilst
+ level-two servers will do the I/O.
+ Each file is written by only one pool.
+ If one process is assigned per pool (which is the default option), the
+ I/O is sequential and HDF5 compression can be used even in the âmultiple_fileâ
+ mode.
+ Level-two servers can be launched and controlled by means of three parameters:
+\end_layout
+
+\begin_layout Itemize
+
+\series bold
+using_server2
+\series default
+ (type: 
+\series bold
+bool
+\series default
+) activates the secondary server
+\end_layout
+
+\begin_layout Itemize
+
+\series bold
+ratio_server2
+\series default
+ (type: 
+\series bold
+int
+\series default
+) defines the percentage of servers that will be dedicated to level two.
+ The parameter can take value from 0 to 100 with the default value of 50%.
+ In case if the requested number of level-two servers is not valid (for
+ example, zero or equal to the total number of servers), XIOS will run in
+ its classical server mode with one server level.
+\end_layout
+
+\begin_layout Itemize
+
+\series bold
+number_pools_server2 
+\series default
+(type: 
+\series bold
+int
+\series default
+) sets the number of server-two pools (i.e.
+ MPI communicators on level two).
+ By default the number of pools is equal to the number of level-two servers,
+ thus permitting one process per communicator.
+\end_layout
+
+\begin_layout Standard
+Shown in Fig.
+ 
+\begin_inset CommandInset ref
+LatexCommand ref
+reference "Fig:server2"
+
+\end_inset
+
+ is the two-level server structure for the following definitions:
+\end_layout
+
+\begin_layout Standard
+\begin_inset listings
+lstparams "breaklines=true,frame=tb,language=XML,postbreak={\raisebox{0ex}[0ex][0ex]{\ensuremath{\rcurvearrowse\space}}},tabsize=2"
+inline false
+status open
+
+\begin_layout Plain Layout
+
+<context id="xios">     
+\end_layout
+
+\begin_layout Plain Layout
+
+...
+       
+\end_layout
+
+\begin_layout Plain Layout
+
+	<variable id="using_server2" type="bool">true</variable>
+\end_layout
+
+\begin_layout Plain Layout
+
+	<variable id="ratio_server2" type="int">75</variable>         
+\end_layout
+
+\begin_layout Plain Layout
+
+	<variable id="number_pools_server2" type="int">3</variable>         
+\end_layout
+
+\begin_layout Plain Layout
+
+...
+\end_layout
+
+\begin_layout Plain Layout
+
+</context> 
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+\begin_inset Float figure
+placement H
+wide false
+sideways false
+status open
+
+\begin_layout Plain Layout
+\begin_inset Graphics
+	filename inputs/images/Server2.pdf
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Plain Layout
+\begin_inset Caption Standard
+
+\begin_layout Plain Layout
+Two levels of servers for the total number of servers of 8 and ratio_server2=75%.
+ The number of level-two servers is 
+\begin_inset Formula $8\times\text{ratio\_server2}=6$
+\end_inset
+
+ and, thus, the remaining 2 servers are of level one.
+ 
+\end_layout
+
+\end_inset
+
+
+\begin_inset CommandInset label
+LatexCommand label
+name "Fig:server2"
+
+\end_inset
+
+
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+By default file distribution among server-two pools is optimized for bandwidth.
+ An alternative way of distributing files is possible in order to minimize
+ memory consumption by level-two servers.
+ For this, two additional parameters should be specified:
+\end_layout
+
+\begin_layout Itemize
+
+\series bold
+server2_dist_file_memory
+\series default
+ (type: 
+\series bold
+bool
+\series default
+) activates memory optimization.
+\end_layout
+
+\begin_layout Itemize
+
+\series bold
+server2_dist_file_memory_ratio
+\series default
+ (type: 
+\series bold
+double
+\series default
+) (optional) takes value from 0 (memory optimization) to 1 (bandwidth optimizati
+on).
+ The default value is 0.5.
+\end_layout
+
+\begin_layout Section
+Buffer related options
+\end_layout
+
+\begin_layout Standard
+By default, XIOS tries to guess the required buffers sizes to ensure efficient
+ client-server communications.
+ However it might sometimes be useful to tweak the buffers sizes so XIOS
+ provides the following options:
+\end_layout
+
+\begin_layout Itemize
+
+\series bold
+optimal_buffer_size
+\series default
+ (type: 
+\series bold
+string
+\series default
+) can be either 
+\series bold
+\emph on
+
+\begin_inset Quotes eld
+\end_inset
+
+memory
+\begin_inset Quotes erd
+\end_inset
+
+
+\series default
+\emph default
+ or 
+\series bold
+\emph on
+
+\begin_inset Quotes erd
+\end_inset
+
+performance
+\begin_inset Quotes erd
+\end_inset
+
+
+\series default
+\emph default
+.
+ When using the 
+\series bold
+\emph on
+
+\begin_inset Quotes eld
+\end_inset
+
+memory
+\begin_inset Quotes erd
+\end_inset
+
+
+\series default
+\emph default
+ mode, XIOS will try to use buffers as small as possible while still ensuring
+ that the bigger message will fit.
+ When using the 
+\series bold
+\emph on
+
+\begin_inset Quotes erd
+\end_inset
+
+performance
+\begin_inset Quotes erd
+\end_inset
+
+
+\series default
+\emph default
+ mode, XIOS will ensure that all active fields can be buffered without having
+ to flush the buffers.
+ This mode is used by default since it allows more asynchronism and thus
+ better performance at the cost of being quite memory hungry.
+\end_layout
+
+\begin_layout Itemize
+
+\series bold
+minimum_buffer_size
+\series default
+ (type: 
+\series bold
+int
+\series default
+) defines the minimum buffer size in bytes (8192 by default).
+ This value will be used by XIOS only for buffers whose detected size is
+ smaller than the user defined minimum size.
+\end_layout
+
+\begin_layout Itemize
+
+\series bold
+buffer_size_factor 
+\series default
+(type: 
+\series bold
+int
+\series default
+) allows to modify the buffers sizes by multiplying the detected sizes by
+ an user defined factor (
+\begin_inset Formula $1.0$
+\end_inset
+
+ by default).
+ For each allocated buffers, the used size is defined as 
+\begin_inset Formula 
+\[
+{\scriptstyle used\_size\;=\;\min\left(minimum\_buffer\_size,\;detected\_size\;\times\;buffer\_size\_factor\right)}
+\]
+
+\end_inset
+
+
+\end_layout
+
+\end_body
+\end_document
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/doc/inputs/user/Axis.lyx
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/doc/inputs/user/Axis.lyx	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/doc/inputs/user/Axis.lyx	(revision 1749)
@@ -0,0 +1,715 @@
+#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
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/doc/inputs/user/Domain.lyx
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/doc/inputs/user/Domain.lyx	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/doc/inputs/user/Domain.lyx	(revision 1749)
@@ -0,0 +1,1048 @@
+#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
+Domain
+\end_layout
+
+\begin_layout Standard
+Domain is a two dimensional coordinates, which can be considered to be composed
+ of two axis: y-axis and x-axis.
+ However, different from two axis composed mechanically, a domain contains
+ more typical information which play an important role in specific cases.
+ Very often, in meteorological applications, domain represents a surface
+ with latitude and longitude.
+\end_layout
+
+\begin_layout Section
+Working with configuration file
+\end_layout
+
+\begin_layout Subsection
+Basic configuration
+\end_layout
+
+\begin_layout Standard
+Similar to Grid as well as other components in XIOS, a domain is defined
+ inside its definition part with the tag 
+\series bold
+\color black
+domain_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
+
+<domain_definition>
+\end_layout
+
+\begin_layout Plain Layout
+
+  <domain id="domain_A" />
+\end_layout
+
+\begin_layout Plain Layout
+
+  <domain domain_ref="domain_A" />
+\end_layout
+
+\begin_layout Plain Layout
+
+</domain_definition>
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+The first one is to specify explicitly identification of a domain with an
+ id.
+ One repetition, id of any component in XIOS are 
+\shape italic
+\color black
+unique
+\shape default
+\color inherit
+ among this kind of components.
+ It is not allowed to have two domains with a same id, but it is permitted
+ a domain and a grid, for example, to share a same one.
+\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
+
+<domain_definition>
+\end_layout
+
+\begin_layout Plain Layout
+
+  <domain id="domain_A" />  
+\end_layout
+
+\begin_layout Plain Layout
+
+</domain_definition>
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+In this way, with id, the domain can be processed, e.x modified its attributes,
+ with Fortran interface; besides, it is only possible to reference to a
+ domain whose id is explicitly defined.
+\end_layout
+
+\begin_layout Standard
+Very often, after a domain is defined, it may be referenced many times.
+ To make a reference to a domain, we use domain_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
+
+<domain_definition>
+\end_layout
+
+\begin_layout Plain Layout
+
+  <domain domain_ref="domain_A" />
+\end_layout
+
+\begin_layout Plain Layout
+
+</domain_definition>
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+A domain defined by domain_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 domain.
+ The domain 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 a domain without id inside domain_definition.
+ However, the domain_ref is utilized widely outside the scope of domain_definiti
+on.
+\end_layout
+
+\begin_layout Standard
+Because a domain is a sub component of grid, it is possible to define a
+ new domain inside a grid with the tag 
+\series bold
+\color black
+domain.
+ 
+\series default
+\color inherit
+Moreover it is the only region where we can define a new domain outside
+ domain_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
+
+<grid id="grid_A">          
+\end_layout
+
+\begin_layout Plain Layout
+
+   <domain domain_ref="domain_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 a domain_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
+
+ domain which has inherited all attributes (and their values) from domain
+ A (name, long name, i_index, j_index, ...
+ etc).
+\end_layout
+
+\begin_layout Standard
+With this approach, we only define a domain once but reuse it as many time
+ as we like in different configurations.
+\end_layout
+
+\begin_layout Subsection
+Advanced configuration
+\end_layout
+
+\begin_layout Standard
+One of a new concept which differenciates XIOS 2.0 from its precedent is
+ transformation.
+ In a simple case, zoom feature is now considered to be a transformation.
+ It can be more complicated for other geometric transformation such as inversion
+ or interpolation.
+ All transformation are taken place on grid level.
+ It means that it is neccessary to define a grid source and a grid destination
+ as well as a transformation or list of transformation which we'd like to
+ have.
+ In order to transform a grid to one another, we need to specify a transformatio
+n on its sub-component: domain or axis.
+\end_layout
+
+\begin_layout Standard
+Because transformation on a domain is different from one on an axis, we
+ differenciate two categories of transformation: transformation_domain and
+ transformation_axis.
+\end_layout
+
+\begin_layout Standard
+Till now, XIOS supports the following transformation on domain:
+\end_layout
+
+\begin_layout Itemize
+zoom_domain: Like zoom functionality in XIOS 1.0, the destination grid is
+ the zoomed region of the source grid.
+\end_layout
+
+\begin_layout Itemize
+interpolation_domain: Implement interpolation from a domain to one another,
+ for now XIOS can only do interpolation by reading calculated weight values
+ from a file or calculate the weights on the fly.
+\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
+ inside domain 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
+
+<domain_definition>
+\end_layout
+
+\begin_layout Plain Layout
+
+  <domain id="domain_A" />
+\end_layout
+
+\begin_layout Plain Layout
+
+  <domain id="domain_A_zoom" domain_ref="domain_A"> 
+\end_layout
+
+\begin_layout Plain Layout
+
+   <zoom_domain zoom_ibegin="1" zoom_ni="3" zoom_jbegin="0" zoom_nj="2"/>
+\end_layout
+
+\begin_layout Plain Layout
+
+  </domain>
+\end_layout
+
+\begin_layout Plain Layout
+
+</domain_definition>
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+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.
+\end_layout
+
+\begin_layout Standard
+One remark is the transformed domain SHOULD have an id, in this case, it's
+ domain_A_zoom.
+ As mentioned before, a no-id domain or any no-id component of XIOS can
+ only be used inside its definition scope.
+ It exists but is useless.
+ So care about that.
+\end_layout
+
+\begin_layout Standard
+To make use of transformation, the grid must contain domains which reference
+ 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
+
+   <domain domain_ref="domain_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
+
+   <domain domain_ref="domain_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 is not convenient
+ to customize attributes of domain.
+ So it's the turn of Fortran interface.
+\end_layout
+
+\begin_layout Section
+Working with FORTRAN code
+\end_layout
+
+\begin_layout Standard
+One of the important concepts to grasp in mind in using FORTRAN interface
+ is the data distribution.
+ With a distributed-memory XIOS, data are broken into disjoint blocks, one
+ per client process.
+ In the next sections, local describes everything related to a client process,
+ whereas global means global data.
+ The followings describe the essential parts of domain.
+ Details of its attributes and operations can be found in XIOS reference
+ guide
+\end_layout
+
+\begin_layout Subsection
+Domain type
+\end_layout
+
+\begin_layout Standard
+Domain is a two dimensional coordinates, which can be considered to be composed
+ of two axis: y-axis and x-axis.
+ However, different from two axis composed mechanically, a domain contains
+ more typical information which play an important role in specific cases.
+ Very often, in meteorological applications, domain represents a surface
+ with latitude and longitude.
+ Because these properties change from one domain type to another, it is
+ recommended to use domain in case of representing a surface.
+\end_layout
+
+\begin_layout Standard
+In XIOS, a domain can be represented by one of three different types of
+ coordinate system which also differentiate the way to represent latitude
+ and longitude correspondingly.
+ 
+\end_layout
+
+\begin_layout Itemize
+rectilinear: a simple 2-dimensional Cartesian coordinates with two perpendicular
+ axes.
+ Latitude represents the y-axe while longitude represents the x-axe.
+\end_layout
+
+\begin_layout Itemize
+curvilinear: a 2-dimensional coordinates allows the generality of two axes
+ not perpendicular to each other.
+ Latitude and longitude have the size equivalent to size of local domain.
+ 
+\end_layout
+
+\begin_layout Itemize
+unstructured: not any of two above, the latitutude and longitude, as curvilinear
+, are reprensented with the help of boundaries.
+ 
+\end_layout
+
+\begin_layout Standard
+Different from XIOS 1.0, in this new version, users must explicitly specify
+ the type of domain which they would like to use
+\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_domain_attr("domain_A",type='rectilinear')
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+Althoug there are different domain types, they share the similar patterns
+ to settle local data on a client process: There are some essential attributes
+ to define.
+ The next sections describe their meanings and how to specify correctly
+ data for a local domain.
+\end_layout
+
+\begin_layout Subsection
+Local domain index
+\end_layout
+
+\begin_layout Standard
+It is not uncommon that a global domain is broken into several pieces, each
+ of which is distributed to one process.
+ Following we consider a simple case: a domain of rectilinear type with
+ global size 9 x 9 and its data is distributed evenly among 9 client processes,
+ each of which has 3x3.
+\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_Domain.pdf
+	lyxscale 50
+	scale 60
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Plain Layout
+\begin_inset Caption Standard
+
+\begin_layout Plain Layout
+Global domain data
+\end_layout
+
+\end_inset
+
+
+\begin_inset CommandInset label
+LatexCommand label
+name "globalDomain"
+
+\end_inset
+
+
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+The region of local domain can be described by one of the following way.
+\end_layout
+
+\begin_layout Standard
+Specify the the beginning and size of local domain with:
+\end_layout
+
+\begin_layout Itemize
+ni_glo, nj_glo: global size of x-axis and y-axis correspondingly.
+ 
+\end_layout
+
+\begin_layout Itemize
+ibegin, jbegin: global position on x-axis and y-axis where a local domain
+ begin
+\end_layout
+
+\begin_layout Itemize
+ni, nj: local size of domain of each process on x-axis and y-axis
+\end_layout
+
+\begin_layout Standard
+Or tell XIOS exactly the global position of each point in the local domain,
+ from left to right, top to bottom with:
+\end_layout
+
+\begin_layout Itemize
+i_index, j_index: array of global position of every point in the local domain.
+ It is very useful when local domains do not align with each other.
+\end_layout
+
+\begin_layout Standard
+For example, with the first method, the local domain in the middle (the
+ blue 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_domain_attr("domain_A",ni_glo=9, nj_glo=9, ibegin=3, ni=3,
+ jbegin=3, nj=3)
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+The second method demands only two arrays:
+\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_domain_attr("domain_A",ni_glo=9, nj_glo=9, i_index=iIndex,
+ j_index=jIndex)
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+and 
+\end_layout
+
+\begin_layout Itemize
+iIndex={3,4,5,3,4,5,3,4,5}, jIndex = {3,3,3,4,4,4,5,5,5}
+\end_layout
+
+\begin_layout Subsection
+Local domain data
+\end_layout
+
+\begin_layout Standard
+Similar to define local index, local data can be done in two ways.
+\end_layout
+
+\begin_layout Standard
+Specify the begining and size of data on the local domain:
+\end_layout
+
+\begin_layout Itemize
+data_ibegin, data_jbegin: the local position of data on x-axis and y-axis
+ where data begins
+\end_layout
+
+\begin_layout Itemize
+data_ni, data_nj: size of data on each axis
+\end_layout
+
+\begin_layout Standard
+Or specify data with its position in the local domain, from left to right,
+ top to bottom with
+\end_layout
+
+\begin_layout Itemize
+data_i_index, data_j_index: array of local position of data in the local
+ domain.
+\end_layout
+
+\begin_layout Standard
+Beside the attributes above, one of the essential attributes to define is
+ dimensional size of data - data_dim.
+ Although domain has two dimensions, data are not required to be 2-dimensional.
+ In particular, for case of data_dim == 1, XIOS uses an 
+\shape italic
+1-dimensional block distribution
+\shape default
+ of data, distributed along the first dimension, the x-axis.
+\end_layout
+
+\begin_layout Standard
+With the first way to define data on a local domain, we can use:
+\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_domain_attr("domain_A",data_dim=2, data_ibegin=-1, data_ni=ni+2,
+ data_jbegin=-1, data_nj=nj+2)
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+In order to be processed correctly, data must be specified with the begining
+ and size of its block .
+ For two-dimensional data, it can be done with data_ibegin, data_ni for
+ the first dimension and data_jbegin, data_nj for the second dimension.
+ 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 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 
+\begin_inset Quotes eld
+\end_inset
+
+ghost cell
+\begin_inset Quotes erd
+\end_inset
+
+.
+ The attributes data_ibegin and data_jbegin specify the offset of data from
+ local domain.
+ For local domain_A, the negative value indicates that data is larger than
+ local domain, the valid part of data needs extracted from the real data.
+ A positive value indicates data is smaller than local domain.
+ The default value of data_ibegin/data_jbegin is 0, which implies that data
+ fit into local domain properly.
+ 
+\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/Domain.pdf
+	lyxscale 50
+	scale 60
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Plain Layout
+\begin_inset Caption Standard
+
+\begin_layout Plain Layout
+Local domain with data
+\end_layout
+
+\end_inset
+
+
+\begin_inset CommandInset label
+LatexCommand label
+name "localDomain"
+
+\end_inset
+
+
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+On Figure 
+\begin_inset CommandInset ref
+LatexCommand ref
+reference "localDomain"
+
+\end_inset
+
+, 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.
+  
+\end_layout
+
+\begin_layout Standard
+With the secon way, data can be represented 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_domain_attr("domain_A",data_dim=2, data_i_index=dataI, data_j_inde
+x=dataJ)
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+with
+\end_layout
+
+\begin_layout Itemize
+dataJ = {-1,-1,-1,-1,-1,0,0,0,0,0,1,1,1,1,1,2,2,2,3,3,3,3,3}
+\end_layout
+
+\begin_layout Itemize
+dataI = {-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}
+\end_layout
+
+\begin_layout Standard
+As mentioned, data on a domain are two-dimensional but in some cases, there
+ is a need to write data continously, there comes one-dimensional data.
+ With the precedent example, we can define one dimensional data 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_domain_attr("domain_A",data_dim=1, data_i_index=dataI)
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+and 
+\end_layout
+
+\begin_layout Itemize
+dataI = {-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}
+\end_layout
+
+\begin_layout Standard
+Above are the mandatory attributes to define local domain.
+ There are some auxilliary attributes which make data meaningful, especially
+ for meteorological one.
+ The next section disscuses these attributes.
+\end_layout
+
+\begin_layout Subsection
+Longitude and latitude
+\end_layout
+
+\begin_layout Standard
+Different from the previous version, in XIOS 2.0, lonngitude and latitude
+ are optional.
+ Moreover, to be coherent to the data_dim concept, there are more ways to
+ input longitude and latitude values.
+\end_layout
+
+\begin_layout Standard
+Like data, longitude and latitude values can be one or two dimension.
+ The first ones are represented with lonvalue_1d, latvalue_1d; the second
+ ones are specified with lonvalue_2d and latvalue_2d.
+\end_layout
+
+\begin_layout Standard
+With the same domain_A, we can set longitude and latitude values by calling:
+\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_domain_attr("domain_A",lonvalue_1d=lon1D, latvalue_1d=lat1D)
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+with
+\end_layout
+
+\begin_layout Itemize
+lon1D = {30, 40, 50, 30, 40, 50, 30, 40, 50}
+\end_layout
+
+\begin_layout Itemize
+lat1D = {30, 30, 30, 40, 40, 40, 50, 50, 50}
+\end_layout
+
+\begin_layout Standard
+Or by using two-dimension longitude and latitude
+\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_domain_attr("domain_A",lonvalue_2d=lon2D, latvalue_1d=lat2D)
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+with 
+\end_layout
+
+\begin_layout Itemize
+lon2D = {
+\begin_inset Formula $\begin{array}{ccc}
+30 & 40 & 50\\
+30 & 40 & 50\\
+30 & 40 & 50
+\end{array}$
+\end_inset
+
+}
+\end_layout
+
+\begin_layout Itemize
+lat1D = { 
+\begin_inset Formula $\begin{array}{ccc}
+30 & 30 & 30\\
+40 & 40 & 40\\
+50 & 50 & 50
+\end{array}$
+\end_inset
+
+}
+\end_layout
+
+\begin_layout Standard
+For unstructured mesh, a cell can have different number of vertices than
+ rectinlinear, in this case, longitude and latitude value of the vertex
+ of cell are specified with bounds_lon_1d and bounds_lat_1d.
+\end_layout
+
+\begin_layout Standard
+For curvilinear mesh, bounds_lon_2d and bounds_lat_2d provide a convenient
+ way to define longitude and latitude value for the vertex of the cell.
+ However, it is possible to use bounds_lon_1d and bounds_lat_1d to describe
+ these values.
+\end_layout
+
+\begin_layout Standard
+One thing to remind, only *_1d or *_2d attributes are used, if *_1d and
+ *_2d of a same attribute are provides, there will be runtime error.
+\end_layout
+
+\begin_layout Standard
+All attributes of domain can be found in Reference Guide.
+\end_layout
+
+\end_body
+\end_document
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/doc/inputs/user/Grid.lyx
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/doc/inputs/user/Grid.lyx	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/doc/inputs/user/Grid.lyx	(revision 1749)
@@ -0,0 +1,511 @@
+#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
+Grid
+\end_layout
+
+\begin_layout Section
+Overview 
+\end_layout
+
+\begin_layout Standard
+Grid plays an important role in XIOS.
+ Same as Field, Grid is one of the basic elements in XIOS, which should
+ be well defined, not only in the configuration file but also in the FORTRAN
+ code.
+ Because, until now, XIOS has mainly served for writing NetCDF data format,
+ most of its components are inspired from NetCDF Data Model, and Grid is
+ not an exception.
+ Grid is a concept describing dimensions that contain the axes of the data
+ arrays.
+ Moreover, Grid always consists of an unlimited dimension whose length can
+ be expanded at any time.
+ Other dimensions can be described with Domain and Axis.
+ The followings describe how to make use of Grid in XIOS.
+ Details of its attributes and operations can be found in XIOS reference
+ guide.
+\end_layout
+
+\begin_layout Section
+Working with configuration file
+\end_layout
+
+\begin_layout Standard
+As mentioned above, a grid contains the axes of the data arrays, which are
+ characterized by Domain and/or Axis.
+ A domain is composed of a 2-dimension array, meanwhile an axis is, as its
+ name, an 1-dimension array.
+ 
+\end_layout
+
+\begin_layout Standard
+Like other components of XIOS, a grid is defined inside its definition part
+ with the tag 
+\series bold
+\color black
+grid_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 collapsed
+
+\begin_layout Plain Layout
+
+ <grid_definition>      
+\end_layout
+
+\begin_layout Plain Layout
+
+   <grid_group id="gridGroup">        
+\end_layout
+
+\begin_layout Plain Layout
+
+     <grid id="grid_A">          
+\end_layout
+
+\begin_layout Plain Layout
+
+       <domain domain_ref="domain_A" />
+\end_layout
+
+\begin_layout Plain Layout
+
+       <axis axis_ref="axis_C" />
+\end_layout
+
+\begin_layout Plain Layout
+
+     </grid>
+\end_layout
+
+\begin_layout Plain Layout
+
+	 <grid id="grid_Axis"> 
+\end_layout
+
+\begin_layout Plain Layout
+
+	   <axis axis_ref="axis_D" />
+\end_layout
+
+\begin_layout Plain Layout
+
+	 </grid>
+\end_layout
+
+\begin_layout Plain Layout
+
+	 <grid id="grid_All_Axis">
+\end_layout
+
+\begin_layout Plain Layout
+
+	   <axis axis_ref="axis_A" />
+\end_layout
+
+\begin_layout Plain Layout
+
+       <axis axis_ref="axis_B" />
+\end_layout
+
+\begin_layout Plain Layout
+
+	   <axis axis_ref="axis_C" />
+\end_layout
+
+\begin_layout Plain Layout
+
+	 </grid>
+\end_layout
+
+\begin_layout Plain Layout
+
+   </grid_group>
+\end_layout
+
+\begin_layout Plain Layout
+
+ </grid_definition>
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+As XIOS supports netCDF-4/HDF5, it allows user to gather several grids into
+ groups to better organize data.
+ Very often, grids are grouped, basing on the dimensions that they describe.
+ However, there is not a limit for user to group out the grids.
+ The more important thing than grid_group is grid.
+ A grid is defined with the tag 
+\series bold
+\color black
+grid.
+ 
+\end_layout
+
+\begin_layout Standard
+While it is not crucial for a grid group not to have an identification specified
+ by attribute id, a grid must be assigned an id to become useful.
+ Unlike grid group is a way of hierarchically organizing related grid only,
+ a grid itself is referenced by fields with its id.
+ Without the id, a grid can not be made used of by a field.
+ Id is a string of anything but there is one thing to remember: id of a
+ grid as well as id of any component in XIOS are 
+\shape italic
+\color black
+unique
+\shape default
+\color inherit
+ among this kind of components.
+ It is not allowed to have two grids with a same id, but it is permitted
+ a grid and, for example, a domain to share a same one.
+ 
+\end_layout
+
+\begin_layout Standard
+A grid is defined by domain(s) and axis.
+ A domain represents two-dimension data while an axis serves as one-dimension
+ data.
+ They are defined inside the grid definition.
+ One of the convenient and effective way to reuse the definitions in XIOS
+ is to take advantage of attribute *_ref.
+ On using *_ref, the referencing component has all attributes from its reference
+d one.
+ As the example below, grid with id 
+\begin_inset Quotes eld
+\end_inset
+
+grid_A
+\begin_inset Quotes erd
+\end_inset
+
+ (from now one, called grid_A), is composed of one domain whose attributes
+ derived directly from another one-domain_A, and one axis whose attributes
+ are taken from axis axis_C, which are defined previously.
+\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
+
+<domain id="domain_A />
+\end_layout
+
+\begin_layout Plain Layout
+
+<axis id="axis_A" />
+\end_layout
+
+\begin_layout Plain Layout
+
+\end_layout
+
+\begin_layout Plain Layout
+
+<grid id="grid_A">          
+\end_layout
+
+\begin_layout Plain Layout
+
+   <domain domain_ref="domain_A" />
+\end_layout
+
+\begin_layout Plain Layout
+
+   <axis axis_ref="axis_C" />
+\end_layout
+
+\begin_layout Plain Layout
+
+ </grid>
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+The *_ref can only used to reference to a already defined element (e.g domain,
+ axis, grid, etc).
+ If these *_ref have not been defined yet, there will be a runtime error.
+\end_layout
+
+\begin_layout Standard
+Details about domain and axis can be found in other sections but there is
+ one thing to bear in mind: A domain represents two-dimension data and it
+ also contains several special information: longitude, latitude, bound,
+ etc.
+ For the meteorological mind, domain indicates a surface with latitude and
+ longitude, whereas axis represents a vertical level.
+ 
+\end_layout
+
+\begin_layout Standard
+In general cases, there is only a need of writing some multidimensional
+ data to a netCDF without any specific information, then comes the following
+ definition of grid.
+\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_All_Axis">
+\end_layout
+
+\begin_layout Plain Layout
+
+  <axis axis_ref="axis_A" />
+\end_layout
+
+\begin_layout Plain Layout
+
+  <axis axis_ref="axis_B" />
+\end_layout
+
+\begin_layout Plain Layout
+
+  <axis axis_ref="axis_C" />
+\end_layout
+
+\begin_layout Plain Layout
+
+</grid>
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+The grid_All_Axis is similar to grid_A, but with three dimensions defined
+ by 3 axis that can be described in any way on demand of user.
+ For example, the axis_A and the axis_B can have corresponding name latitude
+ and longitude to characterize a two-dimension surface with latitude and
+ longitude.
+\end_layout
+
+\begin_layout Standard
+Very often, one dimensional data needs writing to netCDF, it can be easily
+ done with the following XML code
+\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_Axis"> 
+\end_layout
+
+\begin_layout Plain Layout
+
+   <axis axis_ref="axis_D" />
+\end_layout
+
+\begin_layout Plain Layout
+
+ </grid>
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+As it is discussed more details in the next section, but remember that even
+ the non-distributed one dimensional data can be well processed by XIOS.
+ 
+\end_layout
+
+\begin_layout Standard
+As mentioned above, grid includes by default one unlimited dimension which
+ is often used as time step axis.
+ In order to write only time step to netCDF, XIOS provides a special way
+ to do: empty grid - a grid without any domain or 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_TimeStep"> 
+\end_layout
+
+\begin_layout Plain Layout
+
+ </grid>
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+âThe order of domain and/or in grid definition decides order of data written
+ to netCDF: data on domain or axis appearing firstly in grid definition
+ will vary the most.
+ For example, on using ncdump command on netCDF which contains data written
+ on the grid_A .
+\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
+
+ float field_A(time_counter, axis_A, y, x) ;
+\end_layout
+
+\begin_layout Plain Layout
+
+	field_A:online_operation = "average" ;
+\end_layout
+
+\begin_layout Plain Layout
+
+	field_A:interval_operation = "3600s" ;
+\end_layout
+
+\begin_layout Plain Layout
+
+	field_A:interval_write = "6h" ;
+\end_layout
+
+\begin_layout Plain Layout
+
+	field_A:coordinates = "time_centered axis_A nav_lat nav_lon" ;
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+The data vary most quickly on dimension y, x which are two axes of domain_A.
+ These are the default name of these dimension of a domain.
+ The data on axis_C vary slower than on the domain and all the data are
+ written one time step defined by time_counter at a time.
+\end_layout
+
+\begin_layout Standard
+Although a grid can be easily configured in XML file, it also needs defining
+ in the FORTRAN via the definition of domain and axis for a model to work
+ fully and correctly.
+ All these instruction will be detailed in the next section.
+\end_layout
+
+\begin_layout Section
+Working with FORTRAN code
+\end_layout
+
+\begin_layout Standard
+Because grid is composed of domain and axis, all processing are taken grid
+ via Domain and Axis.
+ The next chapters supply the detail of these two sub components.
+ 
+\end_layout
+
+\end_body
+\end_document
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/remap/Doxyfile
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/remap/Doxyfile	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/remap/Doxyfile	(revision 1749)
@@ -0,0 +1,2303 @@
+# Doxyfile 1.8.6
+
+# This file describes the settings to be used by the documentation system
+# doxygen (www.doxygen.org) for a project.
+#
+# All text after a double hash (##) is considered a comment and is placed in
+# front of the TAG it is preceding.
+#
+# All text after a single hash (#) is considered a comment and will be ignored.
+# The format is:
+# TAG = value [value, ...]
+# For lists, items can also be appended using:
+# TAG += value [value, ...]
+# Values that contain spaces should be placed between quotes (\" \").
+
+#---------------------------------------------------------------------------
+# Project related configuration options
+#---------------------------------------------------------------------------
+
+# This tag specifies the encoding used for all characters in the config file
+# that follow. The default is UTF-8 which is also the encoding used for all text
+# before the first occurrence of this tag. Doxygen uses libiconv (or the iconv
+# built into libc) for the transcoding. See http://www.gnu.org/software/libiconv
+# for the list of possible encodings.
+# The default value is: UTF-8.
+
+DOXYFILE_ENCODING      = UTF-8
+
+# The PROJECT_NAME tag is a single word (or a sequence of words surrounded by
+# double-quotes, unless you are using Doxywizard) that should identify the
+# project for which the documentation is generated. This name is used in the
+# title of most generated pages and in a few other places.
+# The default value is: My Project.
+
+PROJECT_NAME           = "Remap"
+
+# The PROJECT_NUMBER tag can be used to enter a project or revision number. This
+# could be handy for archiving the generated documentation or if some version
+# control system is used.
+
+PROJECT_NUMBER         =
+
+# Using the PROJECT_BRIEF tag one can provide an optional one line description
+# for a project that appears at the top of each page and should give viewer a
+# quick idea about the purpose of the project. Keep the description short.
+
+PROJECT_BRIEF          =
+
+# With the PROJECT_LOGO tag one can specify an logo or icon that is included in
+# the documentation. The maximum height of the logo should not exceed 55 pixels
+# and the maximum width should not exceed 200 pixels. Doxygen will copy the logo
+# to the output directory.
+
+PROJECT_LOGO           =
+
+# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) path
+# into which the generated documentation will be written. If a relative path is
+# entered, it will be relative to the location where doxygen was started. If
+# left blank the current directory will be used.
+
+OUTPUT_DIRECTORY       =
+
+# If the CREATE_SUBDIRS tag is set to YES, then doxygen will create 4096 sub-
+# directories (in 2 levels) under the output directory of each output format and
+# will distribute the generated files over these directories. Enabling this
+# option can be useful when feeding doxygen a huge amount of source files, where
+# putting all generated files in the same directory would otherwise causes
+# performance problems for the file system.
+# The default value is: NO.
+
+CREATE_SUBDIRS         = NO
+
+# The OUTPUT_LANGUAGE tag is used to specify the language in which all
+# documentation generated by doxygen is written. Doxygen will use this
+# information to generate all constant output in the proper language.
+# Possible values are: Afrikaans, Arabic, Armenian, Brazilian, Catalan, Chinese,
+# Chinese-Traditional, Croatian, Czech, Danish, Dutch, English (United States),
+# Esperanto, Farsi (Persian), Finnish, French, German, Greek, Hungarian,
+# Indonesian, Italian, Japanese, Japanese-en (Japanese with English messages),
+# Korean, Korean-en (Korean with English messages), Latvian, Lithuanian,
+# Macedonian, Norwegian, Persian (Farsi), Polish, Portuguese, Romanian, Russian,
+# Serbian, Serbian-Cyrillic, Slovak, Slovene, Spanish, Swedish, Turkish,
+# Ukrainian and Vietnamese.
+# The default value is: English.
+
+OUTPUT_LANGUAGE        = French
+
+# If the BRIEF_MEMBER_DESC tag is set to YES doxygen will include brief member
+# descriptions after the members that are listed in the file and class
+# documentation (similar to Javadoc). Set to NO to disable this.
+# The default value is: YES.
+
+BRIEF_MEMBER_DESC      = YES
+
+# If the REPEAT_BRIEF tag is set to YES doxygen will prepend the brief
+# description of a member or function before the detailed description
+#
+# Note: If both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the
+# brief descriptions will be completely suppressed.
+# The default value is: YES.
+
+REPEAT_BRIEF           = YES
+
+# This tag implements a quasi-intelligent brief description abbreviator that is
+# used to form the text in various listings. Each string in this list, if found
+# as the leading text of the brief description, will be stripped from the text
+# and the result, after processing the whole list, is used as the annotated
+# text. Otherwise, the brief description is used as-is. If left blank, the
+# following values are used ($name is automatically replaced with the name of
+# the entity):The $name class, The $name widget, The $name file, is, provides,
+# specifies, contains, represents, a, an and the.
+
+ABBREVIATE_BRIEF       =
+
+# If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then
+# doxygen will generate a detailed section even if there is only a brief
+# description.
+# The default value is: NO.
+
+ALWAYS_DETAILED_SEC    = NO
+
+# If the INLINE_INHERITED_MEMB tag is set to YES, doxygen will show all
+# inherited members of a class in the documentation of that class as if those
+# members were ordinary class members. Constructors, destructors and assignment
+# operators of the base classes will not be shown.
+# The default value is: NO.
+
+INLINE_INHERITED_MEMB  = NO
+
+# If the FULL_PATH_NAMES tag is set to YES doxygen will prepend the full path
+# before files name in the file list and in the header files. If set to NO the
+# shortest path that makes the file name unique will be used
+# The default value is: YES.
+
+FULL_PATH_NAMES        = YES
+
+# The STRIP_FROM_PATH tag can be used to strip a user-defined part of the path.
+# Stripping is only done if one of the specified strings matches the left-hand
+# part of the path. The tag can be used to show relative paths in the file list.
+# If left blank the directory from which doxygen is run is used as the path to
+# strip.
+#
+# Note that you can specify absolute paths here, but also relative paths, which
+# will be relative from the directory where doxygen is started.
+# This tag requires that the tag FULL_PATH_NAMES is set to YES.
+
+STRIP_FROM_PATH        =
+
+# The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of the
+# path mentioned in the documentation of a class, which tells the reader which
+# header file to include in order to use a class. If left blank only the name of
+# the header file containing the class definition is used. Otherwise one should
+# specify the list of include paths that are normally passed to the compiler
+# using the -I flag.
+
+STRIP_FROM_INC_PATH    =
+
+# If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter (but
+# less readable) file names. This can be useful is your file systems doesn't
+# support long names like on DOS, Mac, or CD-ROM.
+# The default value is: NO.
+
+SHORT_NAMES            = NO
+
+# If the JAVADOC_AUTOBRIEF tag is set to YES then doxygen will interpret the
+# first line (until the first dot) of a Javadoc-style comment as the brief
+# description. If set to NO, the Javadoc-style will behave just like regular Qt-
+# style comments (thus requiring an explicit @brief command for a brief
+# description.)
+# The default value is: NO.
+
+JAVADOC_AUTOBRIEF      = NO
+
+# If the QT_AUTOBRIEF tag is set to YES then doxygen will interpret the first
+# line (until the first dot) of a Qt-style comment as the brief description. If
+# set to NO, the Qt-style will behave just like regular Qt-style comments (thus
+# requiring an explicit \brief command for a brief description.)
+# The default value is: NO.
+
+QT_AUTOBRIEF           = NO
+
+# The MULTILINE_CPP_IS_BRIEF tag can be set to YES to make doxygen treat a
+# multi-line C++ special comment block (i.e. a block of //! or /// comments) as
+# a brief description. This used to be the default behavior. The new default is
+# to treat a multi-line C++ comment block as a detailed description. Set this
+# tag to YES if you prefer the old behavior instead.
+#
+# Note that setting this tag to YES also means that rational rose comments are
+# not recognized any more.
+# The default value is: NO.
+
+MULTILINE_CPP_IS_BRIEF = NO
+
+# If the INHERIT_DOCS tag is set to YES then an undocumented member inherits the
+# documentation from any documented member that it re-implements.
+# The default value is: YES.
+
+INHERIT_DOCS           = YES
+
+# If the SEPARATE_MEMBER_PAGES tag is set to YES, then doxygen will produce a
+# new page for each member. If set to NO, the documentation of a member will be
+# part of the file/class/namespace that contains it.
+# The default value is: NO.
+
+SEPARATE_MEMBER_PAGES  = NO
+
+# The TAB_SIZE tag can be used to set the number of spaces in a tab. Doxygen
+# uses this value to replace tabs by spaces in code fragments.
+# Minimum value: 1, maximum value: 16, default value: 4.
+
+TAB_SIZE               = 4
+
+# This tag can be used to specify a number of aliases that act as commands in
+# the documentation. An alias has the form:
+# name=value
+# For example adding
+# "sideeffect=@par Side Effects:\n"
+# will allow you to put the command \sideeffect (or @sideeffect) in the
+# documentation, which will result in a user-defined paragraph with heading
+# "Side Effects:". You can put \n's in the value part of an alias to insert
+# newlines.
+
+ALIASES                =
+
+# This tag can be used to specify a number of word-keyword mappings (TCL only).
+# A mapping has the form "name=value". For example adding "class=itcl::class"
+# will allow you to use the command class in the itcl::class meaning.
+
+TCL_SUBST              =
+
+# Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C sources
+# only. Doxygen will then generate output that is more tailored for C. For
+# instance, some of the names that are used will be different. The list of all
+# members will be omitted, etc.
+# The default value is: NO.
+
+OPTIMIZE_OUTPUT_FOR_C  = NO
+
+# Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java or
+# Python sources only. Doxygen will then generate output that is more tailored
+# for that language. For instance, namespaces will be presented as packages,
+# qualified scopes will look different, etc.
+# The default value is: NO.
+
+OPTIMIZE_OUTPUT_JAVA   = NO
+
+# Set the OPTIMIZE_FOR_FORTRAN tag to YES if your project consists of Fortran
+# sources. Doxygen will then generate output that is tailored for Fortran.
+# The default value is: NO.
+
+OPTIMIZE_FOR_FORTRAN   = NO
+
+# Set the OPTIMIZE_OUTPUT_VHDL tag to YES if your project consists of VHDL
+# sources. Doxygen will then generate output that is tailored for VHDL.
+# The default value is: NO.
+
+OPTIMIZE_OUTPUT_VHDL   = NO
+
+# Doxygen selects the parser to use depending on the extension of the files it
+# parses. With this tag you can assign which parser to use for a given
+# extension. Doxygen has a built-in mapping, but you can override or extend it
+# using this tag. The format is ext=language, where ext is a file extension, and
+# language is one of the parsers supported by doxygen: IDL, Java, Javascript,
+# C#, C, C++, D, PHP, Objective-C, Python, Fortran, VHDL. For instance to make
+# doxygen treat .inc files as Fortran files (default is PHP), and .f files as C
+# (default is Fortran), use: inc=Fortran f=C.
+#
+# Note For files without extension you can use no_extension as a placeholder.
+#
+# Note that for custom extensions you also need to set FILE_PATTERNS otherwise
+# the files are not read by doxygen.
+
+EXTENSION_MAPPING      =
+
+# If the MARKDOWN_SUPPORT tag is enabled then doxygen pre-processes all comments
+# according to the Markdown format, which allows for more readable
+# documentation. See http://daringfireball.net/projects/markdown/ for details.
+# The output of markdown processing is further processed by doxygen, so you can
+# mix doxygen, HTML, and XML commands with Markdown formatting. Disable only in
+# case of backward compatibilities issues.
+# The default value is: YES.
+
+MARKDOWN_SUPPORT       = YES
+
+# When enabled doxygen tries to link words that correspond to documented
+# classes, or namespaces to their corresponding documentation. Such a link can
+# be prevented in individual cases by by putting a % sign in front of the word
+# or globally by setting AUTOLINK_SUPPORT to NO.
+# The default value is: YES.
+
+AUTOLINK_SUPPORT       = YES
+
+# If you use STL classes (i.e. std::string, std::vector, etc.) but do not want
+# to include (a tag file for) the STL sources as input, then you should set this
+# tag to YES in order to let doxygen match functions declarations and
+# definitions whose arguments contain STL classes (e.g. func(std::string);
+# versus func(std::string) {}). This also make the inheritance and collaboration
+# diagrams that involve STL classes more complete and accurate.
+# The default value is: NO.
+
+BUILTIN_STL_SUPPORT    = NO
+
+# If you use Microsoft's C++/CLI language, you should set this option to YES to
+# enable parsing support.
+# The default value is: NO.
+
+CPP_CLI_SUPPORT        = NO
+
+# Set the SIP_SUPPORT tag to YES if your project consists of sip (see:
+# http://www.riverbankcomputing.co.uk/software/sip/intro) sources only. Doxygen
+# will parse them like normal C++ but will assume all classes use public instead
+# of private inheritance when no explicit protection keyword is present.
+# The default value is: NO.
+
+SIP_SUPPORT            = NO
+
+# For Microsoft's IDL there are propget and propput attributes to indicate
+# getter and setter methods for a property. Setting this option to YES will make
+# doxygen to replace the get and set methods by a property in the documentation.
+# This will only work if the methods are indeed getting or setting a simple
+# type. If this is not the case, or you want to show the methods anyway, you
+# should set this option to NO.
+# The default value is: YES.
+
+IDL_PROPERTY_SUPPORT   = YES
+
+# If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC
+# tag is set to YES, then doxygen will reuse the documentation of the first
+# member in the group (if any) for the other members of the group. By default
+# all members of a group must be documented explicitly.
+# The default value is: NO.
+
+DISTRIBUTE_GROUP_DOC   = NO
+
+# Set the SUBGROUPING tag to YES to allow class member groups of the same type
+# (for instance a group of public functions) to be put as a subgroup of that
+# type (e.g. under the Public Functions section). Set it to NO to prevent
+# subgrouping. Alternatively, this can be done per class using the
+# \nosubgrouping command.
+# The default value is: YES.
+
+SUBGROUPING            = YES
+
+# When the INLINE_GROUPED_CLASSES tag is set to YES, classes, structs and unions
+# are shown inside the group in which they are included (e.g. using \ingroup)
+# instead of on a separate page (for HTML and Man pages) or section (for LaTeX
+# and RTF).
+#
+# Note that this feature does not work in combination with
+# SEPARATE_MEMBER_PAGES.
+# The default value is: NO.
+
+INLINE_GROUPED_CLASSES = NO
+
+# When the INLINE_SIMPLE_STRUCTS tag is set to YES, structs, classes, and unions
+# with only public data fields or simple typedef fields will be shown inline in
+# the documentation of the scope in which they are defined (i.e. file,
+# namespace, or group documentation), provided this scope is documented. If set
+# to NO, structs, classes, and unions are shown on a separate page (for HTML and
+# Man pages) or section (for LaTeX and RTF).
+# The default value is: NO.
+
+INLINE_SIMPLE_STRUCTS  = NO
+
+# When TYPEDEF_HIDES_STRUCT tag is enabled, a typedef of a struct, union, or
+# enum is documented as struct, union, or enum with the name of the typedef. So
+# typedef struct TypeS {} TypeT, will appear in the documentation as a struct
+# with name TypeT. When disabled the typedef will appear as a member of a file,
+# namespace, or class. And the struct will be named TypeS. This can typically be
+# useful for C code in case the coding convention dictates that all compound
+# types are typedef'ed and only the typedef is referenced, never the tag name.
+# The default value is: NO.
+
+TYPEDEF_HIDES_STRUCT   = NO
+
+# The size of the symbol lookup cache can be set using LOOKUP_CACHE_SIZE. This
+# cache is used to resolve symbols given their name and scope. Since this can be
+# an expensive process and often the same symbol appears multiple times in the
+# code, doxygen keeps a cache of pre-resolved symbols. If the cache is too small
+# doxygen will become slower. If the cache is too large, memory is wasted. The
+# cache size is given by this formula: 2^(16+LOOKUP_CACHE_SIZE). The valid range
+# is 0..9, the default is 0, corresponding to a cache size of 2^16=65536
+# symbols. At the end of a run doxygen will report the cache usage and suggest
+# the optimal cache size from a speed point of view.
+# Minimum value: 0, maximum value: 9, default value: 0.
+
+LOOKUP_CACHE_SIZE      = 0
+
+#---------------------------------------------------------------------------
+# Build related configuration options
+#---------------------------------------------------------------------------
+
+# If the EXTRACT_ALL tag is set to YES doxygen will assume all entities in
+# documentation are documented, even if no documentation was available. Private
+# class members and static file members will be hidden unless the
+# EXTRACT_PRIVATE respectively EXTRACT_STATIC tags are set to YES.
+# Note: This will also disable the warnings about undocumented members that are
+# normally produced when WARNINGS is set to YES.
+# The default value is: NO.
+
+EXTRACT_ALL            = YES
+
+# If the EXTRACT_PRIVATE tag is set to YES all private members of a class will
+# be included in the documentation.
+# The default value is: NO.
+
+EXTRACT_PRIVATE        = NO
+
+# If the EXTRACT_PACKAGE tag is set to YES all members with package or internal
+# scope will be included in the documentation.
+# The default value is: NO.
+
+EXTRACT_PACKAGE        = NO
+
+# If the EXTRACT_STATIC tag is set to YES all static members of a file will be
+# included in the documentation.
+# The default value is: NO.
+
+EXTRACT_STATIC         = NO
+
+# If the EXTRACT_LOCAL_CLASSES tag is set to YES classes (and structs) defined
+# locally in source files will be included in the documentation. If set to NO
+# only classes defined in header files are included. Does not have any effect
+# for Java sources.
+# The default value is: YES.
+
+EXTRACT_LOCAL_CLASSES  = YES
+
+# This flag is only useful for Objective-C code. When set to YES local methods,
+# which are defined in the implementation section but not in the interface are
+# included in the documentation. If set to NO only methods in the interface are
+# included.
+# The default value is: NO.
+
+EXTRACT_LOCAL_METHODS  = NO
+
+# If this flag is set to YES, the members of anonymous namespaces will be
+# extracted and appear in the documentation as a namespace called
+# 'anonymous_namespace{file}', where file will be replaced with the base name of
+# the file that contains the anonymous namespace. By default anonymous namespace
+# are hidden.
+# The default value is: NO.
+
+EXTRACT_ANON_NSPACES   = NO
+
+# If the HIDE_UNDOC_MEMBERS tag is set to YES, doxygen will hide all
+# undocumented members inside documented classes or files. If set to NO these
+# members will be included in the various overviews, but no documentation
+# section is generated. This option has no effect if EXTRACT_ALL is enabled.
+# The default value is: NO.
+
+HIDE_UNDOC_MEMBERS     = NO
+
+# If the HIDE_UNDOC_CLASSES tag is set to YES, doxygen will hide all
+# undocumented classes that are normally visible in the class hierarchy. If set
+# to NO these classes will be included in the various overviews. This option has
+# no effect if EXTRACT_ALL is enabled.
+# The default value is: NO.
+
+HIDE_UNDOC_CLASSES     = NO
+
+# If the HIDE_FRIEND_COMPOUNDS tag is set to YES, doxygen will hide all friend
+# (class|struct|union) declarations. If set to NO these declarations will be
+# included in the documentation.
+# The default value is: NO.
+
+HIDE_FRIEND_COMPOUNDS  = NO
+
+# If the HIDE_IN_BODY_DOCS tag is set to YES, doxygen will hide any
+# documentation blocks found inside the body of a function. If set to NO these
+# blocks will be appended to the function's detailed documentation block.
+# The default value is: NO.
+
+HIDE_IN_BODY_DOCS      = NO
+
+# The INTERNAL_DOCS tag determines if documentation that is typed after a
+# \internal command is included. If the tag is set to NO then the documentation
+# will be excluded. Set it to YES to include the internal documentation.
+# The default value is: NO.
+
+INTERNAL_DOCS          = NO
+
+# If the CASE_SENSE_NAMES tag is set to NO then doxygen will only generate file
+# names in lower-case letters. If set to YES upper-case letters are also
+# allowed. This is useful if you have classes or files whose names only differ
+# in case and if your file system supports case sensitive file names. Windows
+# and Mac users are advised to set this option to NO.
+# The default value is: system dependent.
+
+CASE_SENSE_NAMES       = YES
+
+# If the HIDE_SCOPE_NAMES tag is set to NO then doxygen will show members with
+# their full class and namespace scopes in the documentation. If set to YES the
+# scope will be hidden.
+# The default value is: NO.
+
+HIDE_SCOPE_NAMES       = NO
+
+# If the SHOW_INCLUDE_FILES tag is set to YES then doxygen will put a list of
+# the files that are included by a file in the documentation of that file.
+# The default value is: YES.
+
+SHOW_INCLUDE_FILES     = YES
+
+# If the SHOW_GROUPED_MEMB_INC tag is set to YES then Doxygen will add for each
+# grouped member an include statement to the documentation, telling the reader
+# which file to include in order to use the member.
+# The default value is: NO.
+
+SHOW_GROUPED_MEMB_INC  = NO
+
+# If the FORCE_LOCAL_INCLUDES tag is set to YES then doxygen will list include
+# files with double quotes in the documentation rather than with sharp brackets.
+# The default value is: NO.
+
+FORCE_LOCAL_INCLUDES   = NO
+
+# If the INLINE_INFO tag is set to YES then a tag [inline] is inserted in the
+# documentation for inline members.
+# The default value is: YES.
+
+INLINE_INFO            = YES
+
+# If the SORT_MEMBER_DOCS tag is set to YES then doxygen will sort the
+# (detailed) documentation of file and class members alphabetically by member
+# name. If set to NO the members will appear in declaration order.
+# The default value is: YES.
+
+SORT_MEMBER_DOCS       = YES
+
+# If the SORT_BRIEF_DOCS tag is set to YES then doxygen will sort the brief
+# descriptions of file, namespace and class members alphabetically by member
+# name. If set to NO the members will appear in declaration order. Note that
+# this will also influence the order of the classes in the class list.
+# The default value is: NO.
+
+SORT_BRIEF_DOCS        = NO
+
+# If the SORT_MEMBERS_CTORS_1ST tag is set to YES then doxygen will sort the
+# (brief and detailed) documentation of class members so that constructors and
+# destructors are listed first. If set to NO the constructors will appear in the
+# respective orders defined by SORT_BRIEF_DOCS and SORT_MEMBER_DOCS.
+# Note: If SORT_BRIEF_DOCS is set to NO this option is ignored for sorting brief
+# member documentation.
+# Note: If SORT_MEMBER_DOCS is set to NO this option is ignored for sorting
+# detailed member documentation.
+# The default value is: NO.
+
+SORT_MEMBERS_CTORS_1ST = NO
+
+# If the SORT_GROUP_NAMES tag is set to YES then doxygen will sort the hierarchy
+# of group names into alphabetical order. If set to NO the group names will
+# appear in their defined order.
+# The default value is: NO.
+
+SORT_GROUP_NAMES       = NO
+
+# If the SORT_BY_SCOPE_NAME tag is set to YES, the class list will be sorted by
+# fully-qualified names, including namespaces. If set to NO, the class list will
+# be sorted only by class name, not including the namespace part.
+# Note: This option is not very useful if HIDE_SCOPE_NAMES is set to YES.
+# Note: This option applies only to the class list, not to the alphabetical
+# list.
+# The default value is: NO.
+
+SORT_BY_SCOPE_NAME     = NO
+
+# If the STRICT_PROTO_MATCHING option is enabled and doxygen fails to do proper
+# type resolution of all parameters of a function it will reject a match between
+# the prototype and the implementation of a member function even if there is
+# only one candidate or it is obvious which candidate to choose by doing a
+# simple string match. By disabling STRICT_PROTO_MATCHING doxygen will still
+# accept a match between prototype and implementation in such cases.
+# The default value is: NO.
+
+STRICT_PROTO_MATCHING  = NO
+
+# The GENERATE_TODOLIST tag can be used to enable ( YES) or disable ( NO) the
+# todo list. This list is created by putting \todo commands in the
+# documentation.
+# The default value is: YES.
+
+GENERATE_TODOLIST      = YES
+
+# The GENERATE_TESTLIST tag can be used to enable ( YES) or disable ( NO) the
+# test list. This list is created by putting \test commands in the
+# documentation.
+# The default value is: YES.
+
+GENERATE_TESTLIST      = YES
+
+# The GENERATE_BUGLIST tag can be used to enable ( YES) or disable ( NO) the bug
+# list. This list is created by putting \bug commands in the documentation.
+# The default value is: YES.
+
+GENERATE_BUGLIST       = YES
+
+# The GENERATE_DEPRECATEDLIST tag can be used to enable ( YES) or disable ( NO)
+# the deprecated list. This list is created by putting \deprecated commands in
+# the documentation.
+# The default value is: YES.
+
+GENERATE_DEPRECATEDLIST= YES
+
+# The ENABLED_SECTIONS tag can be used to enable conditional documentation
+# sections, marked by \if <section_label> ... \endif and \cond <section_label>
+# ... \endcond blocks.
+
+ENABLED_SECTIONS       =
+
+# The MAX_INITIALIZER_LINES tag determines the maximum number of lines that the
+# initial value of a variable or macro / define can have for it to appear in the
+# documentation. If the initializer consists of more lines than specified here
+# it will be hidden. Use a value of 0 to hide initializers completely. The
+# appearance of the value of individual variables and macros / defines can be
+# controlled using \showinitializer or \hideinitializer command in the
+# documentation regardless of this setting.
+# Minimum value: 0, maximum value: 10000, default value: 30.
+
+MAX_INITIALIZER_LINES  = 30
+
+# Set the SHOW_USED_FILES tag to NO to disable the list of files generated at
+# the bottom of the documentation of classes and structs. If set to YES the list
+# will mention the files that were used to generate the documentation.
+# The default value is: YES.
+
+SHOW_USED_FILES        = YES
+
+# Set the SHOW_FILES tag to NO to disable the generation of the Files page. This
+# will remove the Files entry from the Quick Index and from the Folder Tree View
+# (if specified).
+# The default value is: YES.
+
+SHOW_FILES             = YES
+
+# Set the SHOW_NAMESPACES tag to NO to disable the generation of the Namespaces
+# page. This will remove the Namespaces entry from the Quick Index and from the
+# Folder Tree View (if specified).
+# The default value is: YES.
+
+SHOW_NAMESPACES        = YES
+
+# The FILE_VERSION_FILTER tag can be used to specify a program or script that
+# doxygen should invoke to get the current version for each file (typically from
+# the version control system). Doxygen will invoke the program by executing (via
+# popen()) the command command input-file, where command is the value of the
+# FILE_VERSION_FILTER tag, and input-file is the name of an input file provided
+# by doxygen. Whatever the program writes to standard output is used as the file
+# version. For an example see the documentation.
+
+FILE_VERSION_FILTER    =
+
+# The LAYOUT_FILE tag can be used to specify a layout file which will be parsed
+# by doxygen. The layout file controls the global structure of the generated
+# output files in an output format independent way. To create the layout file
+# that represents doxygen's defaults, run doxygen with the -l option. You can
+# optionally specify a file name after the option, if omitted DoxygenLayout.xml
+# will be used as the name of the layout file.
+#
+# Note that if you run doxygen from a directory containing a file called
+# DoxygenLayout.xml, doxygen will parse it automatically even if the LAYOUT_FILE
+# tag is left empty.
+
+LAYOUT_FILE            =
+
+# The CITE_BIB_FILES tag can be used to specify one or more bib files containing
+# the reference definitions. This must be a list of .bib files. The .bib
+# extension is automatically appended if omitted. This requires the bibtex tool
+# to be installed. See also http://en.wikipedia.org/wiki/BibTeX for more info.
+# For LaTeX the style of the bibliography can be controlled using
+# LATEX_BIB_STYLE. To use this feature you need bibtex and perl available in the
+# search path. Do not use file names with spaces, bibtex cannot handle them. See
+# also \cite for info how to create references.
+
+CITE_BIB_FILES         =
+
+#---------------------------------------------------------------------------
+# Configuration options related to warning and progress messages
+#---------------------------------------------------------------------------
+
+# The QUIET tag can be used to turn on/off the messages that are generated to
+# standard output by doxygen. If QUIET is set to YES this implies that the
+# messages are off.
+# The default value is: NO.
+
+QUIET                  = NO
+
+# The WARNINGS tag can be used to turn on/off the warning messages that are
+# generated to standard error ( stderr) by doxygen. If WARNINGS is set to YES
+# this implies that the warnings are on.
+#
+# Tip: Turn warnings on while writing the documentation.
+# The default value is: YES.
+
+WARNINGS               = YES
+
+# If the WARN_IF_UNDOCUMENTED tag is set to YES, then doxygen will generate
+# warnings for undocumented members. If EXTRACT_ALL is set to YES then this flag
+# will automatically be disabled.
+# The default value is: YES.
+
+WARN_IF_UNDOCUMENTED   = YES
+
+# If the WARN_IF_DOC_ERROR tag is set to YES, doxygen will generate warnings for
+# potential errors in the documentation, such as not documenting some parameters
+# in a documented function, or documenting parameters that don't exist or using
+# markup commands wrongly.
+# The default value is: YES.
+
+WARN_IF_DOC_ERROR      = YES
+
+# This WARN_NO_PARAMDOC option can be enabled to get warnings for functions that
+# are documented, but have no documentation for their parameters or return
+# value. If set to NO doxygen will only warn about wrong or incomplete parameter
+# documentation, but not about the absence of documentation.
+# The default value is: NO.
+
+WARN_NO_PARAMDOC       = NO
+
+# The WARN_FORMAT tag determines the format of the warning messages that doxygen
+# can produce. The string should contain the $file, $line, and $text tags, which
+# will be replaced by the file and line number from which the warning originated
+# and the warning text. Optionally the format may contain $version, which will
+# be replaced by the version of the file (if it could be obtained via
+# FILE_VERSION_FILTER)
+# The default value is: $file:$line: $text.
+
+WARN_FORMAT            = "$file:$line: $text"
+
+# The WARN_LOGFILE tag can be used to specify a file to which warning and error
+# messages should be written. If left blank the output is written to standard
+# error (stderr).
+
+WARN_LOGFILE           =
+
+#---------------------------------------------------------------------------
+# Configuration options related to the input files
+#---------------------------------------------------------------------------
+
+# The INPUT tag is used to specify the files and/or directories that contain
+# documented source files. You may enter file names like myfile.cpp or
+# directories like /usr/src/myproject. Separate the files or directories with
+# spaces.
+# Note: If this tag is empty the current directory is searched.
+
+INPUT                  = src
+
+# This tag can be used to specify the character encoding of the source files
+# that doxygen parses. Internally doxygen uses the UTF-8 encoding. Doxygen uses
+# libiconv (or the iconv built into libc) for the transcoding. See the libiconv
+# documentation (see: http://www.gnu.org/software/libiconv) for the list of
+# possible encodings.
+# The default value is: UTF-8.
+
+INPUT_ENCODING         = UTF-8
+
+# If the value of the INPUT tag contains directories, you can use the
+# FILE_PATTERNS tag to specify one or more wildcard patterns (like *.cpp and
+# *.h) to filter out the source-files in the directories. If left blank the
+# following patterns are tested:*.c, *.cc, *.cxx, *.cpp, *.c++, *.java, *.ii,
+# *.ixx, *.ipp, *.i++, *.inl, *.idl, *.ddl, *.odl, *.h, *.hh, *.hxx, *.hpp,
+# *.h++, *.cs, *.d, *.php, *.php4, *.php5, *.phtml, *.inc, *.m, *.markdown,
+# *.md, *.mm, *.dox, *.py, *.f90, *.f, *.for, *.tcl, *.vhd, *.vhdl, *.ucf,
+# *.qsf, *.as and *.js.
+
+FILE_PATTERNS          =
+
+# The RECURSIVE tag can be used to specify whether or not subdirectories should
+# be searched for input files as well.
+# The default value is: NO.
+
+RECURSIVE              = NO
+
+# The EXCLUDE tag can be used to specify files and/or directories that should be
+# excluded from the INPUT source files. This way you can easily exclude a
+# subdirectory from a directory tree whose root is specified with the INPUT tag.
+#
+# Note that relative paths are relative to the directory from which doxygen is
+# run.
+
+EXCLUDE                =
+
+# The EXCLUDE_SYMLINKS tag can be used to select whether or not files or
+# directories that are symbolic links (a Unix file system feature) are excluded
+# from the input.
+# The default value is: NO.
+
+EXCLUDE_SYMLINKS       = NO
+
+# If the value of the INPUT tag contains directories, you can use the
+# EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude
+# certain files from those directories.
+#
+# Note that the wildcards are matched against the file with absolute path, so to
+# exclude all test directories for example use the pattern */test/*
+
+EXCLUDE_PATTERNS       =
+
+# The EXCLUDE_SYMBOLS tag can be used to specify one or more symbol names
+# (namespaces, classes, functions, etc.) that should be excluded from the
+# output. The symbol name can be a fully qualified name, a word, or if the
+# wildcard * is used, a substring. Examples: ANamespace, AClass,
+# AClass::ANamespace, ANamespace::*Test
+#
+# Note that the wildcards are matched against the file with absolute path, so to
+# exclude all test directories use the pattern */test/*
+
+EXCLUDE_SYMBOLS        =
+
+# The EXAMPLE_PATH tag can be used to specify one or more files or directories
+# that contain example code fragments that are included (see the \include
+# command).
+
+EXAMPLE_PATH           =
+
+# If the value of the EXAMPLE_PATH tag contains directories, you can use the
+# EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp and
+# *.h) to filter out the source-files in the directories. If left blank all
+# files are included.
+
+EXAMPLE_PATTERNS       =
+
+# If the EXAMPLE_RECURSIVE tag is set to YES then subdirectories will be
+# searched for input files to be used with the \include or \dontinclude commands
+# irrespective of the value of the RECURSIVE tag.
+# The default value is: NO.
+
+EXAMPLE_RECURSIVE      = NO
+
+# The IMAGE_PATH tag can be used to specify one or more files or directories
+# that contain images that are to be included in the documentation (see the
+# \image command).
+
+IMAGE_PATH             =
+
+# The INPUT_FILTER tag can be used to specify a program that doxygen should
+# invoke to filter for each input file. Doxygen will invoke the filter program
+# by executing (via popen()) the command:
+#
+# <filter> <input-file>
+#
+# where <filter> is the value of the INPUT_FILTER tag, and <input-file> is the
+# name of an input file. Doxygen will then use the output that the filter
+# program writes to standard output. If FILTER_PATTERNS is specified, this tag
+# will be ignored.
+#
+# Note that the filter must not add or remove lines; it is applied before the
+# code is scanned, but not when the output code is generated. If lines are added
+# or removed, the anchors will not be placed correctly.
+
+INPUT_FILTER           =
+
+# The FILTER_PATTERNS tag can be used to specify filters on a per file pattern
+# basis. Doxygen will compare the file name with each pattern and apply the
+# filter if there is a match. The filters are a list of the form: pattern=filter
+# (like *.cpp=my_cpp_filter). See INPUT_FILTER for further information on how
+# filters are used. If the FILTER_PATTERNS tag is empty or if none of the
+# patterns match the file name, INPUT_FILTER is applied.
+
+FILTER_PATTERNS        =
+
+# If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using
+# INPUT_FILTER ) will also be used to filter the input files that are used for
+# producing the source files to browse (i.e. when SOURCE_BROWSER is set to YES).
+# The default value is: NO.
+
+FILTER_SOURCE_FILES    = NO
+
+# The FILTER_SOURCE_PATTERNS tag can be used to specify source filters per file
+# pattern. A pattern will override the setting for FILTER_PATTERN (if any) and
+# it is also possible to disable source filtering for a specific pattern using
+# *.ext= (so without naming a filter).
+# This tag requires that the tag FILTER_SOURCE_FILES is set to YES.
+
+FILTER_SOURCE_PATTERNS =
+
+# If the USE_MDFILE_AS_MAINPAGE tag refers to the name of a markdown file that
+# is part of the input, its contents will be placed on the main page
+# (index.html). This can be useful if you have a project on for instance GitHub
+# and want to reuse the introduction page also for the doxygen output.
+
+USE_MDFILE_AS_MAINPAGE =
+
+#---------------------------------------------------------------------------
+# Configuration options related to source browsing
+#---------------------------------------------------------------------------
+
+# If the SOURCE_BROWSER tag is set to YES then a list of source files will be
+# generated. Documented entities will be cross-referenced with these sources.
+#
+# Note: To get rid of all source code in the generated output, make sure that
+# also VERBATIM_HEADERS is set to NO.
+# The default value is: NO.
+
+SOURCE_BROWSER         = NO
+
+# Setting the INLINE_SOURCES tag to YES will include the body of functions,
+# classes and enums directly into the documentation.
+# The default value is: NO.
+
+INLINE_SOURCES         = NO
+
+# Setting the STRIP_CODE_COMMENTS tag to YES will instruct doxygen to hide any
+# special comment blocks from generated source code fragments. Normal C, C++ and
+# Fortran comments will always remain visible.
+# The default value is: YES.
+
+STRIP_CODE_COMMENTS    = YES
+
+# If the REFERENCED_BY_RELATION tag is set to YES then for each documented
+# function all documented functions referencing it will be listed.
+# The default value is: NO.
+
+REFERENCED_BY_RELATION = NO
+
+# If the REFERENCES_RELATION tag is set to YES then for each documented function
+# all documented entities called/used by that function will be listed.
+# The default value is: NO.
+
+REFERENCES_RELATION    = NO
+
+# If the REFERENCES_LINK_SOURCE tag is set to YES and SOURCE_BROWSER tag is set
+# to YES, then the hyperlinks from functions in REFERENCES_RELATION and
+# REFERENCED_BY_RELATION lists will link to the source code. Otherwise they will
+# link to the documentation.
+# The default value is: YES.
+
+REFERENCES_LINK_SOURCE = YES
+
+# If SOURCE_TOOLTIPS is enabled (the default) then hovering a hyperlink in the
+# source code will show a tooltip with additional information such as prototype,
+# brief description and links to the definition and documentation. Since this
+# will make the HTML file larger and loading of large files a bit slower, you
+# can opt to disable this feature.
+# The default value is: YES.
+# This tag requires that the tag SOURCE_BROWSER is set to YES.
+
+SOURCE_TOOLTIPS        = YES
+
+# If the USE_HTAGS tag is set to YES then the references to source code will
+# point to the HTML generated by the htags(1) tool instead of doxygen built-in
+# source browser. The htags tool is part of GNU's global source tagging system
+# (see http://www.gnu.org/software/global/global.html). You will need version
+# 4.8.6 or higher.
+#
+# To use it do the following:
+# - Install the latest version of global
+# - Enable SOURCE_BROWSER and USE_HTAGS in the config file
+# - Make sure the INPUT points to the root of the source tree
+# - Run doxygen as normal
+#
+# Doxygen will invoke htags (and that will in turn invoke gtags), so these
+# tools must be available from the command line (i.e. in the search path).
+#
+# The result: instead of the source browser generated by doxygen, the links to
+# source code will now point to the output of htags.
+# The default value is: NO.
+# This tag requires that the tag SOURCE_BROWSER is set to YES.
+
+USE_HTAGS              = NO
+
+# If the VERBATIM_HEADERS tag is set the YES then doxygen will generate a
+# verbatim copy of the header file for each class for which an include is
+# specified. Set to NO to disable this.
+# See also: Section \class.
+# The default value is: YES.
+
+VERBATIM_HEADERS       = YES
+
+#---------------------------------------------------------------------------
+# Configuration options related to the alphabetical class index
+#---------------------------------------------------------------------------
+
+# If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index of all
+# compounds will be generated. Enable this if the project contains a lot of
+# classes, structs, unions or interfaces.
+# The default value is: YES.
+
+ALPHABETICAL_INDEX     = YES
+
+# The COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns in
+# which the alphabetical index list will be split.
+# Minimum value: 1, maximum value: 20, default value: 5.
+# This tag requires that the tag ALPHABETICAL_INDEX is set to YES.
+
+COLS_IN_ALPHA_INDEX    = 5
+
+# In case all classes in a project start with a common prefix, all classes will
+# be put under the same header in the alphabetical index. The IGNORE_PREFIX tag
+# can be used to specify a prefix (or a list of prefixes) that should be ignored
+# while generating the index headers.
+# This tag requires that the tag ALPHABETICAL_INDEX is set to YES.
+
+IGNORE_PREFIX          =
+
+#---------------------------------------------------------------------------
+# Configuration options related to the HTML output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_HTML tag is set to YES doxygen will generate HTML output
+# The default value is: YES.
+
+GENERATE_HTML          = YES
+
+# The HTML_OUTPUT tag is used to specify where the HTML docs will be put. If a
+# relative path is entered the value of OUTPUT_DIRECTORY will be put in front of
+# it.
+# The default directory is: html.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+HTML_OUTPUT            = html
+
+# The HTML_FILE_EXTENSION tag can be used to specify the file extension for each
+# generated HTML page (for example: .htm, .php, .asp).
+# The default value is: .html.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+HTML_FILE_EXTENSION    = .html
+
+# The HTML_HEADER tag can be used to specify a user-defined HTML header file for
+# each generated HTML page. If the tag is left blank doxygen will generate a
+# standard header.
+#
+# To get valid HTML the header file that includes any scripts and style sheets
+# that doxygen needs, which is dependent on the configuration options used (e.g.
+# the setting GENERATE_TREEVIEW). It is highly recommended to start with a
+# default header using
+# doxygen -w html new_header.html new_footer.html new_stylesheet.css
+# YourConfigFile
+# and then modify the file new_header.html. See also section "Doxygen usage"
+# for information on how to generate the default header that doxygen normally
+# uses.
+# Note: The header is subject to change so you typically have to regenerate the
+# default header when upgrading to a newer version of doxygen. For a description
+# of the possible markers and block names see the documentation.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+HTML_HEADER            =
+
+# The HTML_FOOTER tag can be used to specify a user-defined HTML footer for each
+# generated HTML page. If the tag is left blank doxygen will generate a standard
+# footer. See HTML_HEADER for more information on how to generate a default
+# footer and what special commands can be used inside the footer. See also
+# section "Doxygen usage" for information on how to generate the default footer
+# that doxygen normally uses.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+HTML_FOOTER            =
+
+# The HTML_STYLESHEET tag can be used to specify a user-defined cascading style
+# sheet that is used by each HTML page. It can be used to fine-tune the look of
+# the HTML output. If left blank doxygen will generate a default style sheet.
+# See also section "Doxygen usage" for information on how to generate the style
+# sheet that doxygen normally uses.
+# Note: It is recommended to use HTML_EXTRA_STYLESHEET instead of this tag, as
+# it is more robust and this tag (HTML_STYLESHEET) will in the future become
+# obsolete.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+HTML_STYLESHEET        =
+
+# The HTML_EXTRA_STYLESHEET tag can be used to specify an additional user-
+# defined cascading style sheet that is included after the standard style sheets
+# created by doxygen. Using this option one can overrule certain style aspects.
+# This is preferred over using HTML_STYLESHEET since it does not replace the
+# standard style sheet and is therefor more robust against future updates.
+# Doxygen will copy the style sheet file to the output directory. For an example
+# see the documentation.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+HTML_EXTRA_STYLESHEET  =
+
+# The HTML_EXTRA_FILES tag can be used to specify one or more extra images or
+# other source files which should be copied to the HTML output directory. Note
+# that these files will be copied to the base HTML output directory. Use the
+# $relpath^ marker in the HTML_HEADER and/or HTML_FOOTER files to load these
+# files. In the HTML_STYLESHEET file, use the file name only. Also note that the
+# files will be copied as-is; there are no commands or markers available.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+HTML_EXTRA_FILES       =
+
+# The HTML_COLORSTYLE_HUE tag controls the color of the HTML output. Doxygen
+# will adjust the colors in the stylesheet and background images according to
+# this color. Hue is specified as an angle on a colorwheel, see
+# http://en.wikipedia.org/wiki/Hue for more information. For instance the value
+# 0 represents red, 60 is yellow, 120 is green, 180 is cyan, 240 is blue, 300
+# purple, and 360 is red again.
+# Minimum value: 0, maximum value: 359, default value: 220.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+HTML_COLORSTYLE_HUE    = 220
+
+# The HTML_COLORSTYLE_SAT tag controls the purity (or saturation) of the colors
+# in the HTML output. For a value of 0 the output will use grayscales only. A
+# value of 255 will produce the most vivid colors.
+# Minimum value: 0, maximum value: 255, default value: 100.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+HTML_COLORSTYLE_SAT    = 100
+
+# The HTML_COLORSTYLE_GAMMA tag controls the gamma correction applied to the
+# luminance component of the colors in the HTML output. Values below 100
+# gradually make the output lighter, whereas values above 100 make the output
+# darker. The value divided by 100 is the actual gamma applied, so 80 represents
+# a gamma of 0.8, The value 220 represents a gamma of 2.2, and 100 does not
+# change the gamma.
+# Minimum value: 40, maximum value: 240, default value: 80.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+HTML_COLORSTYLE_GAMMA  = 80
+
+# If the HTML_TIMESTAMP tag is set to YES then the footer of each generated HTML
+# page will contain the date and time when the page was generated. Setting this
+# to NO can help when comparing the output of multiple runs.
+# The default value is: YES.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+HTML_TIMESTAMP         = YES
+
+# If the HTML_DYNAMIC_SECTIONS tag is set to YES then the generated HTML
+# documentation will contain sections that can be hidden and shown after the
+# page has loaded.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+HTML_DYNAMIC_SECTIONS  = NO
+
+# With HTML_INDEX_NUM_ENTRIES one can control the preferred number of entries
+# shown in the various tree structured indices initially; the user can expand
+# and collapse entries dynamically later on. Doxygen will expand the tree to
+# such a level that at most the specified number of entries are visible (unless
+# a fully collapsed tree already exceeds this amount). So setting the number of
+# entries 1 will produce a full collapsed tree by default. 0 is a special value
+# representing an infinite number of entries and will result in a full expanded
+# tree by default.
+# Minimum value: 0, maximum value: 9999, default value: 100.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+HTML_INDEX_NUM_ENTRIES = 100
+
+# If the GENERATE_DOCSET tag is set to YES, additional index files will be
+# generated that can be used as input for Apple's Xcode 3 integrated development
+# environment (see: http://developer.apple.com/tools/xcode/), introduced with
+# OSX 10.5 (Leopard). To create a documentation set, doxygen will generate a
+# Makefile in the HTML output directory. Running make will produce the docset in
+# that directory and running make install will install the docset in
+# ~/Library/Developer/Shared/Documentation/DocSets so that Xcode will find it at
+# startup. See http://developer.apple.com/tools/creatingdocsetswithdoxygen.html
+# for more information.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+GENERATE_DOCSET        = NO
+
+# This tag determines the name of the docset feed. A documentation feed provides
+# an umbrella under which multiple documentation sets from a single provider
+# (such as a company or product suite) can be grouped.
+# The default value is: Doxygen generated docs.
+# This tag requires that the tag GENERATE_DOCSET is set to YES.
+
+DOCSET_FEEDNAME        = "Doxygen generated docs"
+
+# This tag specifies a string that should uniquely identify the documentation
+# set bundle. This should be a reverse domain-name style string, e.g.
+# com.mycompany.MyDocSet. Doxygen will append .docset to the name.
+# The default value is: org.doxygen.Project.
+# This tag requires that the tag GENERATE_DOCSET is set to YES.
+
+DOCSET_BUNDLE_ID       = org.doxygen.Project
+
+# The DOCSET_PUBLISHER_ID tag specifies a string that should uniquely identify
+# the documentation publisher. This should be a reverse domain-name style
+# string, e.g. com.mycompany.MyDocSet.documentation.
+# The default value is: org.doxygen.Publisher.
+# This tag requires that the tag GENERATE_DOCSET is set to YES.
+
+DOCSET_PUBLISHER_ID    = org.doxygen.Publisher
+
+# The DOCSET_PUBLISHER_NAME tag identifies the documentation publisher.
+# The default value is: Publisher.
+# This tag requires that the tag GENERATE_DOCSET is set to YES.
+
+DOCSET_PUBLISHER_NAME  = Publisher
+
+# If the GENERATE_HTMLHELP tag is set to YES then doxygen generates three
+# additional HTML index files: index.hhp, index.hhc, and index.hhk. The
+# index.hhp is a project file that can be read by Microsoft's HTML Help Workshop
+# (see: http://www.microsoft.com/en-us/download/details.aspx?id=21138) on
+# Windows.
+#
+# The HTML Help Workshop contains a compiler that can convert all HTML output
+# generated by doxygen into a single compiled HTML file (.chm). Compiled HTML
+# files are now used as the Windows 98 help format, and will replace the old
+# Windows help format (.hlp) on all Windows platforms in the future. Compressed
+# HTML files also contain an index, a table of contents, and you can search for
+# words in the documentation. The HTML workshop also contains a viewer for
+# compressed HTML files.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+GENERATE_HTMLHELP      = NO
+
+# The CHM_FILE tag can be used to specify the file name of the resulting .chm
+# file. You can add a path in front of the file if the result should not be
+# written to the html output directory.
+# This tag requires that the tag GENERATE_HTMLHELP is set to YES.
+
+CHM_FILE               =
+
+# The HHC_LOCATION tag can be used to specify the location (absolute path
+# including file name) of the HTML help compiler ( hhc.exe). If non-empty
+# doxygen will try to run the HTML help compiler on the generated index.hhp.
+# The file has to be specified with full path.
+# This tag requires that the tag GENERATE_HTMLHELP is set to YES.
+
+HHC_LOCATION           =
+
+# The GENERATE_CHI flag controls if a separate .chi index file is generated (
+# YES) or that it should be included in the master .chm file ( NO).
+# The default value is: NO.
+# This tag requires that the tag GENERATE_HTMLHELP is set to YES.
+
+GENERATE_CHI           = NO
+
+# The CHM_INDEX_ENCODING is used to encode HtmlHelp index ( hhk), content ( hhc)
+# and project file content.
+# This tag requires that the tag GENERATE_HTMLHELP is set to YES.
+
+CHM_INDEX_ENCODING     =
+
+# The BINARY_TOC flag controls whether a binary table of contents is generated (
+# YES) or a normal table of contents ( NO) in the .chm file.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_HTMLHELP is set to YES.
+
+BINARY_TOC             = NO
+
+# The TOC_EXPAND flag can be set to YES to add extra items for group members to
+# the table of contents of the HTML help documentation and to the tree view.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_HTMLHELP is set to YES.
+
+TOC_EXPAND             = NO
+
+# If the GENERATE_QHP tag is set to YES and both QHP_NAMESPACE and
+# QHP_VIRTUAL_FOLDER are set, an additional index file will be generated that
+# can be used as input for Qt's qhelpgenerator to generate a Qt Compressed Help
+# (.qch) of the generated HTML documentation.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+GENERATE_QHP           = NO
+
+# If the QHG_LOCATION tag is specified, the QCH_FILE tag can be used to specify
+# the file name of the resulting .qch file. The path specified is relative to
+# the HTML output folder.
+# This tag requires that the tag GENERATE_QHP is set to YES.
+
+QCH_FILE               =
+
+# The QHP_NAMESPACE tag specifies the namespace to use when generating Qt Help
+# Project output. For more information please see Qt Help Project / Namespace
+# (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#namespace).
+# The default value is: org.doxygen.Project.
+# This tag requires that the tag GENERATE_QHP is set to YES.
+
+QHP_NAMESPACE          = org.doxygen.Project
+
+# The QHP_VIRTUAL_FOLDER tag specifies the namespace to use when generating Qt
+# Help Project output. For more information please see Qt Help Project / Virtual
+# Folders (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#virtual-
+# folders).
+# The default value is: doc.
+# This tag requires that the tag GENERATE_QHP is set to YES.
+
+QHP_VIRTUAL_FOLDER     = doc
+
+# If the QHP_CUST_FILTER_NAME tag is set, it specifies the name of a custom
+# filter to add. For more information please see Qt Help Project / Custom
+# Filters (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#custom-
+# filters).
+# This tag requires that the tag GENERATE_QHP is set to YES.
+
+QHP_CUST_FILTER_NAME   =
+
+# The QHP_CUST_FILTER_ATTRS tag specifies the list of the attributes of the
+# custom filter to add. For more information please see Qt Help Project / Custom
+# Filters (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#custom-
+# filters).
+# This tag requires that the tag GENERATE_QHP is set to YES.
+
+QHP_CUST_FILTER_ATTRS  =
+
+# The QHP_SECT_FILTER_ATTRS tag specifies the list of the attributes this
+# project's filter section matches. Qt Help Project / Filter Attributes (see:
+# http://qt-project.org/doc/qt-4.8/qthelpproject.html#filter-attributes).
+# This tag requires that the tag GENERATE_QHP is set to YES.
+
+QHP_SECT_FILTER_ATTRS  =
+
+# The QHG_LOCATION tag can be used to specify the location of Qt's
+# qhelpgenerator. If non-empty doxygen will try to run qhelpgenerator on the
+# generated .qhp file.
+# This tag requires that the tag GENERATE_QHP is set to YES.
+
+QHG_LOCATION           =
+
+# If the GENERATE_ECLIPSEHELP tag is set to YES, additional index files will be
+# generated, together with the HTML files, they form an Eclipse help plugin. To
+# install this plugin and make it available under the help contents menu in
+# Eclipse, the contents of the directory containing the HTML and XML files needs
+# to be copied into the plugins directory of eclipse. The name of the directory
+# within the plugins directory should be the same as the ECLIPSE_DOC_ID value.
+# After copying Eclipse needs to be restarted before the help appears.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+GENERATE_ECLIPSEHELP   = NO
+
+# A unique identifier for the Eclipse help plugin. When installing the plugin
+# the directory name containing the HTML and XML files should also have this
+# name. Each documentation set should have its own identifier.
+# The default value is: org.doxygen.Project.
+# This tag requires that the tag GENERATE_ECLIPSEHELP is set to YES.
+
+ECLIPSE_DOC_ID         = org.doxygen.Project
+
+# If you want full control over the layout of the generated HTML pages it might
+# be necessary to disable the index and replace it with your own. The
+# DISABLE_INDEX tag can be used to turn on/off the condensed index (tabs) at top
+# of each HTML page. A value of NO enables the index and the value YES disables
+# it. Since the tabs in the index contain the same information as the navigation
+# tree, you can set this option to YES if you also set GENERATE_TREEVIEW to YES.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+DISABLE_INDEX          = NO
+
+# The GENERATE_TREEVIEW tag is used to specify whether a tree-like index
+# structure should be generated to display hierarchical information. If the tag
+# value is set to YES, a side panel will be generated containing a tree-like
+# index structure (just like the one that is generated for HTML Help). For this
+# to work a browser that supports JavaScript, DHTML, CSS and frames is required
+# (i.e. any modern browser). Windows users are probably better off using the
+# HTML help feature. Via custom stylesheets (see HTML_EXTRA_STYLESHEET) one can
+# further fine-tune the look of the index. As an example, the default style
+# sheet generated by doxygen has an example that shows how to put an image at
+# the root of the tree instead of the PROJECT_NAME. Since the tree basically has
+# the same information as the tab index, you could consider setting
+# DISABLE_INDEX to YES when enabling this option.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+GENERATE_TREEVIEW      = NO
+
+# The ENUM_VALUES_PER_LINE tag can be used to set the number of enum values that
+# doxygen will group on one line in the generated HTML documentation.
+#
+# Note that a value of 0 will completely suppress the enum values from appearing
+# in the overview section.
+# Minimum value: 0, maximum value: 20, default value: 4.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+ENUM_VALUES_PER_LINE   = 4
+
+# If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be used
+# to set the initial width (in pixels) of the frame in which the tree is shown.
+# Minimum value: 0, maximum value: 1500, default value: 250.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+TREEVIEW_WIDTH         = 250
+
+# When the EXT_LINKS_IN_WINDOW option is set to YES doxygen will open links to
+# external symbols imported via tag files in a separate window.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+EXT_LINKS_IN_WINDOW    = NO
+
+# Use this tag to change the font size of LaTeX formulas included as images in
+# the HTML documentation. When you change the font size after a successful
+# doxygen run you need to manually remove any form_*.png images from the HTML
+# output directory to force them to be regenerated.
+# Minimum value: 8, maximum value: 50, default value: 10.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+FORMULA_FONTSIZE       = 10
+
+# Use the FORMULA_TRANPARENT tag to determine whether or not the images
+# generated for formulas are transparent PNGs. Transparent PNGs are not
+# supported properly for IE 6.0, but are supported on all modern browsers.
+#
+# Note that when changing this option you need to delete any form_*.png files in
+# the HTML output directory before the changes have effect.
+# The default value is: YES.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+FORMULA_TRANSPARENT    = YES
+
+# Enable the USE_MATHJAX option to render LaTeX formulas using MathJax (see
+# http://www.mathjax.org) which uses client side Javascript for the rendering
+# instead of using prerendered bitmaps. Use this if you do not have LaTeX
+# installed or if you want to formulas look prettier in the HTML output. When
+# enabled you may also need to install MathJax separately and configure the path
+# to it using the MATHJAX_RELPATH option.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+USE_MATHJAX            = NO
+
+# When MathJax is enabled you can set the default output format to be used for
+# the MathJax output. See the MathJax site (see:
+# http://docs.mathjax.org/en/latest/output.html) for more details.
+# Possible values are: HTML-CSS (which is slower, but has the best
+# compatibility), NativeMML (i.e. MathML) and SVG.
+# The default value is: HTML-CSS.
+# This tag requires that the tag USE_MATHJAX is set to YES.
+
+MATHJAX_FORMAT         = HTML-CSS
+
+# When MathJax is enabled you need to specify the location relative to the HTML
+# output directory using the MATHJAX_RELPATH option. The destination directory
+# should contain the MathJax.js script. For instance, if the mathjax directory
+# is located at the same level as the HTML output directory, then
+# MATHJAX_RELPATH should be ../mathjax. The default value points to the MathJax
+# Content Delivery Network so you can quickly see the result without installing
+# MathJax. However, it is strongly recommended to install a local copy of
+# MathJax from http://www.mathjax.org before deployment.
+# The default value is: http://cdn.mathjax.org/mathjax/latest.
+# This tag requires that the tag USE_MATHJAX is set to YES.
+
+MATHJAX_RELPATH        = http://cdn.mathjax.org/mathjax/latest
+
+# The MATHJAX_EXTENSIONS tag can be used to specify one or more MathJax
+# extension names that should be enabled during MathJax rendering. For example
+# MATHJAX_EXTENSIONS = TeX/AMSmath TeX/AMSsymbols
+# This tag requires that the tag USE_MATHJAX is set to YES.
+
+MATHJAX_EXTENSIONS     =
+
+# The MATHJAX_CODEFILE tag can be used to specify a file with javascript pieces
+# of code that will be used on startup of the MathJax code. See the MathJax site
+# (see: http://docs.mathjax.org/en/latest/output.html) for more details. For an
+# example see the documentation.
+# This tag requires that the tag USE_MATHJAX is set to YES.
+
+MATHJAX_CODEFILE       =
+
+# When the SEARCHENGINE tag is enabled doxygen will generate a search box for
+# the HTML output. The underlying search engine uses javascript and DHTML and
+# should work on any modern browser. Note that when using HTML help
+# (GENERATE_HTMLHELP), Qt help (GENERATE_QHP), or docsets (GENERATE_DOCSET)
+# there is already a search function so this one should typically be disabled.
+# For large projects the javascript based search engine can be slow, then
+# enabling SERVER_BASED_SEARCH may provide a better solution. It is possible to
+# search using the keyboard; to jump to the search box use <access key> + S
+# (what the <access key> is depends on the OS and browser, but it is typically
+# <CTRL>, <ALT>/<option>, or both). Inside the search box use the <cursor down
+# key> to jump into the search results window, the results can be navigated
+# using the <cursor keys>. Press <Enter> to select an item or <escape> to cancel
+# the search. The filter options can be selected when the cursor is inside the
+# search box by pressing <Shift>+<cursor down>. Also here use the <cursor keys>
+# to select a filter and <Enter> or <escape> to activate or cancel the filter
+# option.
+# The default value is: YES.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+SEARCHENGINE           = YES
+
+# When the SERVER_BASED_SEARCH tag is enabled the search engine will be
+# implemented using a web server instead of a web client using Javascript. There
+# are two flavours of web server based searching depending on the
+# EXTERNAL_SEARCH setting. When disabled, doxygen will generate a PHP script for
+# searching and an index file used by the script. When EXTERNAL_SEARCH is
+# enabled the indexing and searching needs to be provided by external tools. See
+# the section "External Indexing and Searching" for details.
+# The default value is: NO.
+# This tag requires that the tag SEARCHENGINE is set to YES.
+
+SERVER_BASED_SEARCH    = NO
+
+# When EXTERNAL_SEARCH tag is enabled doxygen will no longer generate the PHP
+# script for searching. Instead the search results are written to an XML file
+# which needs to be processed by an external indexer. Doxygen will invoke an
+# external search engine pointed to by the SEARCHENGINE_URL option to obtain the
+# search results.
+#
+# Doxygen ships with an example indexer ( doxyindexer) and search engine
+# (doxysearch.cgi) which are based on the open source search engine library
+# Xapian (see: http://xapian.org/).
+#
+# See the section "External Indexing and Searching" for details.
+# The default value is: NO.
+# This tag requires that the tag SEARCHENGINE is set to YES.
+
+EXTERNAL_SEARCH        = NO
+
+# The SEARCHENGINE_URL should point to a search engine hosted by a web server
+# which will return the search results when EXTERNAL_SEARCH is enabled.
+#
+# Doxygen ships with an example indexer ( doxyindexer) and search engine
+# (doxysearch.cgi) which are based on the open source search engine library
+# Xapian (see: http://xapian.org/). See the section "External Indexing and
+# Searching" for details.
+# This tag requires that the tag SEARCHENGINE is set to YES.
+
+SEARCHENGINE_URL       =
+
+# When SERVER_BASED_SEARCH and EXTERNAL_SEARCH are both enabled the unindexed
+# search data is written to a file for indexing by an external tool. With the
+# SEARCHDATA_FILE tag the name of this file can be specified.
+# The default file is: searchdata.xml.
+# This tag requires that the tag SEARCHENGINE is set to YES.
+
+SEARCHDATA_FILE        = searchdata.xml
+
+# When SERVER_BASED_SEARCH and EXTERNAL_SEARCH are both enabled the
+# EXTERNAL_SEARCH_ID tag can be used as an identifier for the project. This is
+# useful in combination with EXTRA_SEARCH_MAPPINGS to search through multiple
+# projects and redirect the results back to the right project.
+# This tag requires that the tag SEARCHENGINE is set to YES.
+
+EXTERNAL_SEARCH_ID     =
+
+# The EXTRA_SEARCH_MAPPINGS tag can be used to enable searching through doxygen
+# projects other than the one defined by this configuration file, but that are
+# all added to the same external search index. Each project needs to have a
+# unique id set via EXTERNAL_SEARCH_ID. The search mapping then maps the id of
+# to a relative location where the documentation can be found. The format is:
+# EXTRA_SEARCH_MAPPINGS = tagname1=loc1 tagname2=loc2 ...
+# This tag requires that the tag SEARCHENGINE is set to YES.
+
+EXTRA_SEARCH_MAPPINGS  =
+
+#---------------------------------------------------------------------------
+# Configuration options related to the LaTeX output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_LATEX tag is set to YES doxygen will generate LaTeX output.
+# The default value is: YES.
+
+GENERATE_LATEX         = YES
+
+# The LATEX_OUTPUT tag is used to specify where the LaTeX docs will be put. If a
+# relative path is entered the value of OUTPUT_DIRECTORY will be put in front of
+# it.
+# The default directory is: latex.
+# This tag requires that the tag GENERATE_LATEX is set to YES.
+
+LATEX_OUTPUT           = latex
+
+# The LATEX_CMD_NAME tag can be used to specify the LaTeX command name to be
+# invoked.
+#
+# Note that when enabling USE_PDFLATEX this option is only used for generating
+# bitmaps for formulas in the HTML output, but not in the Makefile that is
+# written to the output directory.
+# The default file is: latex.
+# This tag requires that the tag GENERATE_LATEX is set to YES.
+
+LATEX_CMD_NAME         = latex
+
+# The MAKEINDEX_CMD_NAME tag can be used to specify the command name to generate
+# index for LaTeX.
+# The default file is: makeindex.
+# This tag requires that the tag GENERATE_LATEX is set to YES.
+
+MAKEINDEX_CMD_NAME     = makeindex
+
+# If the COMPACT_LATEX tag is set to YES doxygen generates more compact LaTeX
+# documents. This may be useful for small projects and may help to save some
+# trees in general.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_LATEX is set to YES.
+
+COMPACT_LATEX          = NO
+
+# The PAPER_TYPE tag can be used to set the paper type that is used by the
+# printer.
+# Possible values are: a4 (210 x 297 mm), letter (8.5 x 11 inches), legal (8.5 x
+# 14 inches) and executive (7.25 x 10.5 inches).
+# The default value is: a4.
+# This tag requires that the tag GENERATE_LATEX is set to YES.
+
+PAPER_TYPE             = a4
+
+# The EXTRA_PACKAGES tag can be used to specify one or more LaTeX package names
+# that should be included in the LaTeX output. To get the times font for
+# instance you can specify
+# EXTRA_PACKAGES=times
+# If left blank no extra packages will be included.
+# This tag requires that the tag GENERATE_LATEX is set to YES.
+
+EXTRA_PACKAGES         =
+
+# The LATEX_HEADER tag can be used to specify a personal LaTeX header for the
+# generated LaTeX document. The header should contain everything until the first
+# chapter. If it is left blank doxygen will generate a standard header. See
+# section "Doxygen usage" for information on how to let doxygen write the
+# default header to a separate file.
+#
+# Note: Only use a user-defined header if you know what you are doing! The
+# following commands have a special meaning inside the header: $title,
+# $datetime, $date, $doxygenversion, $projectname, $projectnumber. Doxygen will
+# replace them by respectively the title of the page, the current date and time,
+# only the current date, the version number of doxygen, the project name (see
+# PROJECT_NAME), or the project number (see PROJECT_NUMBER).
+# This tag requires that the tag GENERATE_LATEX is set to YES.
+
+LATEX_HEADER           =
+
+# The LATEX_FOOTER tag can be used to specify a personal LaTeX footer for the
+# generated LaTeX document. The footer should contain everything after the last
+# chapter. If it is left blank doxygen will generate a standard footer.
+#
+# Note: Only use a user-defined footer if you know what you are doing!
+# This tag requires that the tag GENERATE_LATEX is set to YES.
+
+LATEX_FOOTER           =
+
+# The LATEX_EXTRA_FILES tag can be used to specify one or more extra images or
+# other source files which should be copied to the LATEX_OUTPUT output
+# directory. Note that the files will be copied as-is; there are no commands or
+# markers available.
+# This tag requires that the tag GENERATE_LATEX is set to YES.
+
+LATEX_EXTRA_FILES      =
+
+# If the PDF_HYPERLINKS tag is set to YES, the LaTeX that is generated is
+# prepared for conversion to PDF (using ps2pdf or pdflatex). The PDF file will
+# contain links (just like the HTML output) instead of page references. This
+# makes the output suitable for online browsing using a PDF viewer.
+# The default value is: YES.
+# This tag requires that the tag GENERATE_LATEX is set to YES.
+
+PDF_HYPERLINKS         = YES
+
+# If the LATEX_PDFLATEX tag is set to YES, doxygen will use pdflatex to generate
+# the PDF file directly from the LaTeX files. Set this option to YES to get a
+# higher quality PDF documentation.
+# The default value is: YES.
+# This tag requires that the tag GENERATE_LATEX is set to YES.
+
+USE_PDFLATEX           = YES
+
+# If the LATEX_BATCHMODE tag is set to YES, doxygen will add the \batchmode
+# command to the generated LaTeX files. This will instruct LaTeX to keep running
+# if errors occur, instead of asking the user for help. This option is also used
+# when generating formulas in HTML.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_LATEX is set to YES.
+
+LATEX_BATCHMODE        = NO
+
+# If the LATEX_HIDE_INDICES tag is set to YES then doxygen will not include the
+# index chapters (such as File Index, Compound Index, etc.) in the output.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_LATEX is set to YES.
+
+LATEX_HIDE_INDICES     = NO
+
+# If the LATEX_SOURCE_CODE tag is set to YES then doxygen will include source
+# code with syntax highlighting in the LaTeX output.
+#
+# Note that which sources are shown also depends on other settings such as
+# SOURCE_BROWSER.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_LATEX is set to YES.
+
+LATEX_SOURCE_CODE      = NO
+
+# The LATEX_BIB_STYLE tag can be used to specify the style to use for the
+# bibliography, e.g. plainnat, or ieeetr. See
+# http://en.wikipedia.org/wiki/BibTeX and \cite for more info.
+# The default value is: plain.
+# This tag requires that the tag GENERATE_LATEX is set to YES.
+
+LATEX_BIB_STYLE        = plain
+
+#---------------------------------------------------------------------------
+# Configuration options related to the RTF output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_RTF tag is set to YES doxygen will generate RTF output. The
+# RTF output is optimized for Word 97 and may not look too pretty with other RTF
+# readers/editors.
+# The default value is: NO.
+
+GENERATE_RTF           = NO
+
+# The RTF_OUTPUT tag is used to specify where the RTF docs will be put. If a
+# relative path is entered the value of OUTPUT_DIRECTORY will be put in front of
+# it.
+# The default directory is: rtf.
+# This tag requires that the tag GENERATE_RTF is set to YES.
+
+RTF_OUTPUT             = rtf
+
+# If the COMPACT_RTF tag is set to YES doxygen generates more compact RTF
+# documents. This may be useful for small projects and may help to save some
+# trees in general.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_RTF is set to YES.
+
+COMPACT_RTF            = NO
+
+# If the RTF_HYPERLINKS tag is set to YES, the RTF that is generated will
+# contain hyperlink fields. The RTF file will contain links (just like the HTML
+# output) instead of page references. This makes the output suitable for online
+# browsing using Word or some other Word compatible readers that support those
+# fields.
+#
+# Note: WordPad (write) and others do not support links.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_RTF is set to YES.
+
+RTF_HYPERLINKS         = NO
+
+# Load stylesheet definitions from file. Syntax is similar to doxygen's config
+# file, i.e. a series of assignments. You only have to provide replacements,
+# missing definitions are set to their default value.
+#
+# See also section "Doxygen usage" for information on how to generate the
+# default style sheet that doxygen normally uses.
+# This tag requires that the tag GENERATE_RTF is set to YES.
+
+RTF_STYLESHEET_FILE    =
+
+# Set optional variables used in the generation of an RTF document. Syntax is
+# similar to doxygen's config file. A template extensions file can be generated
+# using doxygen -e rtf extensionFile.
+# This tag requires that the tag GENERATE_RTF is set to YES.
+
+RTF_EXTENSIONS_FILE    =
+
+#---------------------------------------------------------------------------
+# Configuration options related to the man page output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_MAN tag is set to YES doxygen will generate man pages for
+# classes and files.
+# The default value is: NO.
+
+GENERATE_MAN           = NO
+
+# The MAN_OUTPUT tag is used to specify where the man pages will be put. If a
+# relative path is entered the value of OUTPUT_DIRECTORY will be put in front of
+# it. A directory man3 will be created inside the directory specified by
+# MAN_OUTPUT.
+# The default directory is: man.
+# This tag requires that the tag GENERATE_MAN is set to YES.
+
+MAN_OUTPUT             = man
+
+# The MAN_EXTENSION tag determines the extension that is added to the generated
+# man pages. In case the manual section does not start with a number, the number
+# 3 is prepended. The dot (.) at the beginning of the MAN_EXTENSION tag is
+# optional.
+# The default value is: .3.
+# This tag requires that the tag GENERATE_MAN is set to YES.
+
+MAN_EXTENSION          = .3
+
+# If the MAN_LINKS tag is set to YES and doxygen generates man output, then it
+# will generate one additional man file for each entity documented in the real
+# man page(s). These additional files only source the real man page, but without
+# them the man command would be unable to find the correct page.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_MAN is set to YES.
+
+MAN_LINKS              = NO
+
+#---------------------------------------------------------------------------
+# Configuration options related to the XML output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_XML tag is set to YES doxygen will generate an XML file that
+# captures the structure of the code including all documentation.
+# The default value is: NO.
+
+GENERATE_XML           = NO
+
+# The XML_OUTPUT tag is used to specify where the XML pages will be put. If a
+# relative path is entered the value of OUTPUT_DIRECTORY will be put in front of
+# it.
+# The default directory is: xml.
+# This tag requires that the tag GENERATE_XML is set to YES.
+
+XML_OUTPUT             = xml
+
+# The XML_SCHEMA tag can be used to specify a XML schema, which can be used by a
+# validating XML parser to check the syntax of the XML files.
+# This tag requires that the tag GENERATE_XML is set to YES.
+
+XML_SCHEMA             =
+
+# The XML_DTD tag can be used to specify a XML DTD, which can be used by a
+# validating XML parser to check the syntax of the XML files.
+# This tag requires that the tag GENERATE_XML is set to YES.
+
+XML_DTD                =
+
+# If the XML_PROGRAMLISTING tag is set to YES doxygen will dump the program
+# listings (including syntax highlighting and cross-referencing information) to
+# the XML output. Note that enabling this will significantly increase the size
+# of the XML output.
+# The default value is: YES.
+# This tag requires that the tag GENERATE_XML is set to YES.
+
+XML_PROGRAMLISTING     = YES
+
+#---------------------------------------------------------------------------
+# Configuration options related to the DOCBOOK output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_DOCBOOK tag is set to YES doxygen will generate Docbook files
+# that can be used to generate PDF.
+# The default value is: NO.
+
+GENERATE_DOCBOOK       = NO
+
+# The DOCBOOK_OUTPUT tag is used to specify where the Docbook pages will be put.
+# If a relative path is entered the value of OUTPUT_DIRECTORY will be put in
+# front of it.
+# The default directory is: docbook.
+# This tag requires that the tag GENERATE_DOCBOOK is set to YES.
+
+DOCBOOK_OUTPUT         = docbook
+
+#---------------------------------------------------------------------------
+# Configuration options for the AutoGen Definitions output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_AUTOGEN_DEF tag is set to YES doxygen will generate an AutoGen
+# Definitions (see http://autogen.sf.net) file that captures the structure of
+# the code including all documentation. Note that this feature is still
+# experimental and incomplete at the moment.
+# The default value is: NO.
+
+GENERATE_AUTOGEN_DEF   = NO
+
+#---------------------------------------------------------------------------
+# Configuration options related to the Perl module output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_PERLMOD tag is set to YES doxygen will generate a Perl module
+# file that captures the structure of the code including all documentation.
+#
+# Note that this feature is still experimental and incomplete at the moment.
+# The default value is: NO.
+
+GENERATE_PERLMOD       = NO
+
+# If the PERLMOD_LATEX tag is set to YES doxygen will generate the necessary
+# Makefile rules, Perl scripts and LaTeX code to be able to generate PDF and DVI
+# output from the Perl module output.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_PERLMOD is set to YES.
+
+PERLMOD_LATEX          = NO
+
+# If the PERLMOD_PRETTY tag is set to YES the Perl module output will be nicely
+# formatted so it can be parsed by a human reader. This is useful if you want to
+# understand what is going on. On the other hand, if this tag is set to NO the
+# size of the Perl module output will be much smaller and Perl will parse it
+# just the same.
+# The default value is: YES.
+# This tag requires that the tag GENERATE_PERLMOD is set to YES.
+
+PERLMOD_PRETTY         = YES
+
+# The names of the make variables in the generated doxyrules.make file are
+# prefixed with the string contained in PERLMOD_MAKEVAR_PREFIX. This is useful
+# so different doxyrules.make files included by the same Makefile don't
+# overwrite each other's variables.
+# This tag requires that the tag GENERATE_PERLMOD is set to YES.
+
+PERLMOD_MAKEVAR_PREFIX =
+
+#---------------------------------------------------------------------------
+# Configuration options related to the preprocessor
+#---------------------------------------------------------------------------
+
+# If the ENABLE_PREPROCESSING tag is set to YES doxygen will evaluate all
+# C-preprocessor directives found in the sources and include files.
+# The default value is: YES.
+
+ENABLE_PREPROCESSING   = YES
+
+# If the MACRO_EXPANSION tag is set to YES doxygen will expand all macro names
+# in the source code. If set to NO only conditional compilation will be
+# performed. Macro expansion can be done in a controlled way by setting
+# EXPAND_ONLY_PREDEF to YES.
+# The default value is: NO.
+# This tag requires that the tag ENABLE_PREPROCESSING is set to YES.
+
+MACRO_EXPANSION        = NO
+
+# If the EXPAND_ONLY_PREDEF and MACRO_EXPANSION tags are both set to YES then
+# the macro expansion is limited to the macros specified with the PREDEFINED and
+# EXPAND_AS_DEFINED tags.
+# The default value is: NO.
+# This tag requires that the tag ENABLE_PREPROCESSING is set to YES.
+
+EXPAND_ONLY_PREDEF     = NO
+
+# If the SEARCH_INCLUDES tag is set to YES the includes files in the
+# INCLUDE_PATH will be searched if a #include is found.
+# The default value is: YES.
+# This tag requires that the tag ENABLE_PREPROCESSING is set to YES.
+
+SEARCH_INCLUDES        = YES
+
+# The INCLUDE_PATH tag can be used to specify one or more directories that
+# contain include files that are not input files but should be processed by the
+# preprocessor.
+# This tag requires that the tag SEARCH_INCLUDES is set to YES.
+
+INCLUDE_PATH           =
+
+# You can use the INCLUDE_FILE_PATTERNS tag to specify one or more wildcard
+# patterns (like *.h and *.hpp) to filter out the header-files in the
+# directories. If left blank, the patterns specified with FILE_PATTERNS will be
+# used.
+# This tag requires that the tag ENABLE_PREPROCESSING is set to YES.
+
+INCLUDE_FILE_PATTERNS  =
+
+# The PREDEFINED tag can be used to specify one or more macro names that are
+# defined before the preprocessor is started (similar to the -D option of e.g.
+# gcc). The argument of the tag is a list of macros of the form: name or
+# name=definition (no spaces). If the definition and the "=" are omitted, "=1"
+# is assumed. To prevent a macro definition from being undefined via #undef or
+# recursively expanded use the := operator instead of the = operator.
+# This tag requires that the tag ENABLE_PREPROCESSING is set to YES.
+
+PREDEFINED             =
+
+# If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then this
+# tag can be used to specify a list of macro names that should be expanded. The
+# macro definition that is found in the sources will be used. Use the PREDEFINED
+# tag if you want to use a different macro definition that overrules the
+# definition found in the source code.
+# This tag requires that the tag ENABLE_PREPROCESSING is set to YES.
+
+EXPAND_AS_DEFINED      =
+
+# If the SKIP_FUNCTION_MACROS tag is set to YES then doxygen's preprocessor will
+# remove all refrences to function-like macros that are alone on a line, have an
+# all uppercase name, and do not end with a semicolon. Such function macros are
+# typically used for boiler-plate code, and will confuse the parser if not
+# removed.
+# The default value is: YES.
+# This tag requires that the tag ENABLE_PREPROCESSING is set to YES.
+
+SKIP_FUNCTION_MACROS   = YES
+
+#---------------------------------------------------------------------------
+# Configuration options related to external references
+#---------------------------------------------------------------------------
+
+# The TAGFILES tag can be used to specify one or more tag files. For each tag
+# file the location of the external documentation should be added. The format of
+# a tag file without this location is as follows:
+# TAGFILES = file1 file2 ...
+# Adding location for the tag files is done as follows:
+# TAGFILES = file1=loc1 "file2 = loc2" ...
+# where loc1 and loc2 can be relative or absolute paths or URLs. See the
+# section "Linking to external documentation" for more information about the use
+# of tag files.
+# Note: Each tag file must have an unique name (where the name does NOT include
+# the path). If a tag file is not located in the directory in which doxygen is
+# run, you must also specify the path to the tagfile here.
+
+TAGFILES               =
+
+# When a file name is specified after GENERATE_TAGFILE, doxygen will create a
+# tag file that is based on the input files it reads. See section "Linking to
+# external documentation" for more information about the usage of tag files.
+
+GENERATE_TAGFILE       =
+
+# If the ALLEXTERNALS tag is set to YES all external class will be listed in the
+# class index. If set to NO only the inherited external classes will be listed.
+# The default value is: NO.
+
+ALLEXTERNALS           = NO
+
+# If the EXTERNAL_GROUPS tag is set to YES all external groups will be listed in
+# the modules index. If set to NO, only the current project's groups will be
+# listed.
+# The default value is: YES.
+
+EXTERNAL_GROUPS        = YES
+
+# If the EXTERNAL_PAGES tag is set to YES all external pages will be listed in
+# the related pages index. If set to NO, only the current project's pages will
+# be listed.
+# The default value is: YES.
+
+EXTERNAL_PAGES         = YES
+
+# The PERL_PATH should be the absolute path and name of the perl script
+# interpreter (i.e. the result of 'which perl').
+# The default file (with absolute path) is: /usr/bin/perl.
+
+PERL_PATH              = /usr/bin/perl
+
+#---------------------------------------------------------------------------
+# Configuration options related to the dot tool
+#---------------------------------------------------------------------------
+
+# If the CLASS_DIAGRAMS tag is set to YES doxygen will generate a class diagram
+# (in HTML and LaTeX) for classes with base or super classes. Setting the tag to
+# NO turns the diagrams off. Note that this option also works with HAVE_DOT
+# disabled, but it is recommended to install and use dot, since it yields more
+# powerful graphs.
+# The default value is: YES.
+
+CLASS_DIAGRAMS         = YES
+
+# You can define message sequence charts within doxygen comments using the \msc
+# command. Doxygen will then run the mscgen tool (see:
+# http://www.mcternan.me.uk/mscgen/)) to produce the chart and insert it in the
+# documentation. The MSCGEN_PATH tag allows you to specify the directory where
+# the mscgen tool resides. If left empty the tool is assumed to be found in the
+# default search path.
+
+MSCGEN_PATH            =
+
+# You can include diagrams made with dia in doxygen documentation. Doxygen will
+# then run dia to produce the diagram and insert it in the documentation. The
+# DIA_PATH tag allows you to specify the directory where the dia binary resides.
+# If left empty dia is assumed to be found in the default search path.
+
+DIA_PATH               =
+
+# If set to YES, the inheritance and collaboration graphs will hide inheritance
+# and usage relations if the target is undocumented or is not a class.
+# The default value is: YES.
+
+HIDE_UNDOC_RELATIONS   = YES
+
+# If you set the HAVE_DOT tag to YES then doxygen will assume the dot tool is
+# available from the path. This tool is part of Graphviz (see:
+# http://www.graphviz.org/), a graph visualization toolkit from AT&T and Lucent
+# Bell Labs. The other options in this section have no effect if this option is
+# set to NO
+# The default value is: NO.
+
+HAVE_DOT               = YES
+
+# The DOT_NUM_THREADS specifies the number of dot invocations doxygen is allowed
+# to run in parallel. When set to 0 doxygen will base this on the number of
+# processors available in the system. You can set it explicitly to a value
+# larger than 0 to get control over the balance between CPU load and processing
+# speed.
+# Minimum value: 0, maximum value: 32, default value: 0.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+DOT_NUM_THREADS        = 2
+
+# When you want a differently looking font n the dot files that doxygen
+# generates you can specify the font name using DOT_FONTNAME. You need to make
+# sure dot is able to find the font, which can be done by putting it in a
+# standard location or by setting the DOTFONTPATH environment variable or by
+# setting DOT_FONTPATH to the directory containing the font.
+# The default value is: Helvetica.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+DOT_FONTNAME           = Helvetica
+
+# The DOT_FONTSIZE tag can be used to set the size (in points) of the font of
+# dot graphs.
+# Minimum value: 4, maximum value: 24, default value: 10.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+DOT_FONTSIZE           = 10
+
+# By default doxygen will tell dot to use the default font as specified with
+# DOT_FONTNAME. If you specify a different font using DOT_FONTNAME you can set
+# the path where dot can find it using this tag.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+DOT_FONTPATH           =
+
+# If the CLASS_GRAPH tag is set to YES then doxygen will generate a graph for
+# each documented class showing the direct and indirect inheritance relations.
+# Setting this tag to YES will force the CLASS_DIAGRAMS tag to NO.
+# The default value is: YES.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+CLASS_GRAPH            = YES
+
+# If the COLLABORATION_GRAPH tag is set to YES then doxygen will generate a
+# graph for each documented class showing the direct and indirect implementation
+# dependencies (inheritance, containment, and class references variables) of the
+# class with other documented classes.
+# The default value is: YES.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+COLLABORATION_GRAPH    = YES
+
+# If the GROUP_GRAPHS tag is set to YES then doxygen will generate a graph for
+# groups, showing the direct groups dependencies.
+# The default value is: YES.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+GROUP_GRAPHS           = YES
+
+# If the UML_LOOK tag is set to YES doxygen will generate inheritance and
+# collaboration diagrams in a style similar to the OMG's Unified Modeling
+# Language.
+# The default value is: NO.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+UML_LOOK               = NO
+
+# If the UML_LOOK tag is enabled, the fields and methods are shown inside the
+# class node. If there are many fields or methods and many nodes the graph may
+# become too big to be useful. The UML_LIMIT_NUM_FIELDS threshold limits the
+# number of items for each type to make the size more manageable. Set this to 0
+# for no limit. Note that the threshold may be exceeded by 50% before the limit
+# is enforced. So when you set the threshold to 10, up to 15 fields may appear,
+# but if the number exceeds 15, the total amount of fields shown is limited to
+# 10.
+# Minimum value: 0, maximum value: 100, default value: 10.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+UML_LIMIT_NUM_FIELDS   = 10
+
+# If the TEMPLATE_RELATIONS tag is set to YES then the inheritance and
+# collaboration graphs will show the relations between templates and their
+# instances.
+# The default value is: NO.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+TEMPLATE_RELATIONS     = NO
+
+# If the INCLUDE_GRAPH, ENABLE_PREPROCESSING and SEARCH_INCLUDES tags are set to
+# YES then doxygen will generate a graph for each documented file showing the
+# direct and indirect include dependencies of the file with other documented
+# files.
+# The default value is: YES.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+INCLUDE_GRAPH          = YES
+
+# If the INCLUDED_BY_GRAPH, ENABLE_PREPROCESSING and SEARCH_INCLUDES tags are
+# set to YES then doxygen will generate a graph for each documented file showing
+# the direct and indirect include dependencies of the file with other documented
+# files.
+# The default value is: YES.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+INCLUDED_BY_GRAPH      = YES
+
+# If the CALL_GRAPH tag is set to YES then doxygen will generate a call
+# dependency graph for every global function or class method.
+#
+# Note that enabling this option will significantly increase the time of a run.
+# So in most cases it will be better to enable call graphs for selected
+# functions only using the \callgraph command.
+# The default value is: NO.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+CALL_GRAPH             = YES
+
+# If the CALLER_GRAPH tag is set to YES then doxygen will generate a caller
+# dependency graph for every global function or class method.
+#
+# Note that enabling this option will significantly increase the time of a run.
+# So in most cases it will be better to enable caller graphs for selected
+# functions only using the \callergraph command.
+# The default value is: NO.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+CALLER_GRAPH           = YES
+
+# If the GRAPHICAL_HIERARCHY tag is set to YES then doxygen will graphical
+# hierarchy of all classes instead of a textual one.
+# The default value is: YES.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+GRAPHICAL_HIERARCHY    = YES
+
+# If the DIRECTORY_GRAPH tag is set to YES then doxygen will show the
+# dependencies a directory has on other directories in a graphical way. The
+# dependency relations are determined by the #include relations between the
+# files in the directories.
+# The default value is: YES.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+DIRECTORY_GRAPH        = YES
+
+# The DOT_IMAGE_FORMAT tag can be used to set the image format of the images
+# generated by dot.
+# Note: If you choose svg you need to set HTML_FILE_EXTENSION to xhtml in order
+# to make the SVG files visible in IE 9+ (other browsers do not have this
+# requirement).
+# Possible values are: png, jpg, gif and svg.
+# The default value is: png.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+DOT_IMAGE_FORMAT       = svg
+
+# If DOT_IMAGE_FORMAT is set to svg, then this option can be set to YES to
+# enable generation of interactive SVG images that allow zooming and panning.
+#
+# Note that this requires a modern browser other than Internet Explorer. Tested
+# and working are Firefox, Chrome, Safari, and Opera.
+# Note: For IE 9+ you need to set HTML_FILE_EXTENSION to xhtml in order to make
+# the SVG files visible. Older versions of IE do not have SVG support.
+# The default value is: NO.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+INTERACTIVE_SVG        = YES
+
+# The DOT_PATH tag can be used to specify the path where the dot tool can be
+# found. If left blank, it is assumed the dot tool can be found in the path.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+DOT_PATH               =
+
+# The DOTFILE_DIRS tag can be used to specify one or more directories that
+# contain dot files that are included in the documentation (see the \dotfile
+# command).
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+DOTFILE_DIRS           =
+
+# The MSCFILE_DIRS tag can be used to specify one or more directories that
+# contain msc files that are included in the documentation (see the \mscfile
+# command).
+
+MSCFILE_DIRS           =
+
+# The DIAFILE_DIRS tag can be used to specify one or more directories that
+# contain dia files that are included in the documentation (see the \diafile
+# command).
+
+DIAFILE_DIRS           =
+
+# The DOT_GRAPH_MAX_NODES tag can be used to set the maximum number of nodes
+# that will be shown in the graph. If the number of nodes in a graph becomes
+# larger than this value, doxygen will truncate the graph, which is visualized
+# by representing a node as a red box. Note that doxygen if the number of direct
+# children of the root node in a graph is already larger than
+# DOT_GRAPH_MAX_NODES then the graph will not be shown at all. Also note that
+# the size of a graph can be further restricted by MAX_DOT_GRAPH_DEPTH.
+# Minimum value: 0, maximum value: 10000, default value: 50.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+DOT_GRAPH_MAX_NODES    = 50
+
+# The MAX_DOT_GRAPH_DEPTH tag can be used to set the maximum depth of the graphs
+# generated by dot. A depth value of 3 means that only nodes reachable from the
+# root by following a path via at most 3 edges will be shown. Nodes that lay
+# further from the root node will be omitted. Note that setting this option to 1
+# or 2 may greatly reduce the computation time needed for large code bases. Also
+# note that the size of a graph can be further restricted by
+# DOT_GRAPH_MAX_NODES. Using a depth of 0 means no depth restriction.
+# Minimum value: 0, maximum value: 1000, default value: 0.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+MAX_DOT_GRAPH_DEPTH    = 0
+
+# Set the DOT_TRANSPARENT tag to YES to generate images with a transparent
+# background. This is disabled by default, because dot on Windows does not seem
+# to support this out of the box.
+#
+# Warning: Depending on the platform used, enabling this option may lead to
+# badly anti-aliased labels on the edges of a graph (i.e. they become hard to
+# read).
+# The default value is: NO.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+DOT_TRANSPARENT        = NO
+
+# Set the DOT_MULTI_TARGETS tag to YES allow dot to generate multiple output
+# files in one run (i.e. multiple -o and -T options on the command line). This
+# makes dot run faster, but since only newer versions of dot (>1.8.10) support
+# this, this feature is disabled by default.
+# The default value is: NO.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+DOT_MULTI_TARGETS      = YES
+
+# If the GENERATE_LEGEND tag is set to YES doxygen will generate a legend page
+# explaining the meaning of the various boxes and arrows in the dot generated
+# graphs.
+# The default value is: YES.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+GENERATE_LEGEND        = YES
+
+# If the DOT_CLEANUP tag is set to YES doxygen will remove the intermediate dot
+# files that are used to generate the various graphs.
+# The default value is: YES.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+DOT_CLEANUP            = YES
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/remap/README
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/remap/README	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/remap/README	(revision 1749)
@@ -0,0 +1,32 @@
+Dependencies:
+
+  mpicxx
+  python-netcdf
+  python-mpi4py
+
+
+Running
+
+    make
+
+will create a shared library called
+
+    lib/libmapper.so
+
+
+Copy this library together with
+
+    py/remap.py
+
+in one directory, and from there call
+
+    python remap.py
+
+to see usage information.
+
+
+Memory debugging:
+
+    -DDEBUG -DAUTO_LEAK_FIX
+
+The latter tries to fix memory leaks automatically through reference counting, otherwise it reports the memory leaks only.
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/remap/README.mac
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/remap/README.mac	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/remap/README.mac	(revision 1749)
@@ -0,0 +1,93 @@
+======================== Recipe 2 : using anaconda =========================
+
+# install packages using macports
+sudo port install openmpi
+# activate what we have just installed (mandatory)
+sudo port select mpi openmpi-mp-fortran
+# my anaconda is in my $HOME - no need for sudo
+pip install mpi4py
+conda install netcdf4
+
+compile the remap library
+run the remap.py script
+
+==================== Checking which libraries are loaded ======================
+
+Useful to make sure that mpirun, remap and python use the same MPI library.
+
+sudo dtruss -f -t open sudo -u $(whoami) mpirun -np 1 python test.py 2>out
+grep mpich out
+grep openmpi out
+
+where test.py contains
+ from mpi4py import MPI
+ import netCDF4
+ import ctypes as ct
+ import os
+ test = ct.cdll.LoadLibrary(os.path.realpath('libmapper.so'))
+
+If grep finds both mpich and openmpi, something is wrong !
+
+====================== Various ways to mess up python/netCDF/MPI on MacOS ====================
+
+Anaconda vs macports python
+===========================
+I have several pythons installed : 3 from Apple, one from macports and one from the Anaconda distribution, which is the default on my path.
+
+* find whether we use python from MacPorts or anaconda
+ which python
+the one from macports is in /opt/local/bin
+
+* check active macports python version
+ port select python
+ (mine : python27)
+
+* if desired, set the path to avoid anaconda
+echo $PATH
+result :  /Users/dubos/anaconda/bin:/opt/local/bin:/opt/local/sbin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/opt/X11/bin:/usr/texbin
+export PATH=/opt/local/bin:/opt/local/sbin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/opt/X11/bin:/usr/texbin
+
+Below,  [with macports] assumes that Â« which python Â» finds /opt/local/bin/python Â» while [with anaconda] assumes it finds the anaconda-provided python.
+
+Python-netCDF
+=============
+[with macports] :
+sudo port install py-netcdf4
+
+[with anaconda] :
+conda install netcdf4
+Notice that this will also compile its own instance of netCDF.
+
+Notice that in principle one could install python-netcdf using pip or easy_install. In my case it fails - there is a version mismatch for the HDF library at runtime
+
+MPI
+===
+Macports can install openmpi, mpich or both (I have both). If both are installed one is activated by Â« port select Â».
+
+It will install it for a specific compiler.
+* checking your active compiler
+ port select gcc
+* installing openmpi 
+ sudo port install openmpi 
+* checking for which gcc openmpi has been compiled 
+ port installed openmpi-default
+* checking your active mpi
+ port select mpi
+* selecting openmpi (for example)
+ sudo port select mpi openmpi-mp-fortran
+
+MPI4py
+======
+It is important to compile the mapper library with the same MPI as mpi4py !
+easy_install fails on my Mac so I must use pip
+
+[with MacPorts] :
+  sudo port install py-pip
+  sudo port select pip pip27
+  sudo pip install mpi4py
+
+[with anaconda]  : pip is already installed,
+  which pip
+  pip install mpi4py
+
+
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/remap/README.ubuntu
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/remap/README.ubuntu	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/remap/README.ubuntu	(revision 1749)
@@ -0,0 +1,1 @@
+sudo apt-get install python-mpi4py python-netcdf
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/remap/RUN/job
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/remap/RUN/job	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/remap/RUN/job	(revision 1749)
@@ -0,0 +1,30 @@
+#!/bin/bash
+##################
+## CURIE   CEA ##
+##################
+#MSUB -r remap       # nom de la requete
+#MSUB -o remap.out   # nom du fichier de sortie
+#MSUB -e remap.err
+#MSUB -n 64       # reservation des processeurs pour le job
+##MSUB -c 1           # reservation des processeurs pour le job
+#MSUB -x             # exclusif
+#MSUB -T 1800           # Limite temps (en secondes)
+#MSUB -p gen7357
+##MSUB -Q test                # QoS test
+#MSUB -q standard            # Choosing standard nodes
+#MSUB -X            # X11 forwarding
+
+
+cd $BRIDGE_MSUB_PWD 
+
+ulimit -a
+ulimit -aH
+
+module load mpiprofile/bullxmpi/performance
+module load ddt
+
+ccc_mprun  -d tv ../test
+#ccc_mprun   ../test
+#ddt -start -n 64   ../test
+#ccc_mprun -d tv ../bin/main.exe < in_t740
+#ccc_mprun  ../bin/main.exe < in_t740
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/remap/py/reduced.py
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/remap/py/reduced.py	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/remap/py/reduced.py	(revision 1749)
@@ -0,0 +1,71 @@
+import netCDF4 as nc
+import sys
+import math
+import numpy as np
+
+def from_reduced(N,M):
+	"N elements from south to north and N elements around equator "
+	hmax = 2*math.pi/N
+	hmin = hmax/2
+	nlon = N
+	cells_lon = []
+	cells_lat = []
+	for i in range(M/2):
+		lat1 = 180.0/M*i
+		lat2 = 180.0/M*(i+1)
+		y = math.sin(lat1*math.pi/180)
+		r = math.cos(lat1*math.pi/180)
+		h = 2.0*r/nlon
+		reduce_nlon = (h < hmin) and (i > 0) and (nlon > 4)
+		if reduce_nlon:
+			nlon = nlon/2
+		for j in range(nlon):
+			lon1 = 360.0*j/nlon
+			lon2 = 360.0*(j+1)/nlon
+			bounds_lon = [lon1, lon1, lon2, lon2]
+			bounds_lat = [lat1, lat2, lat2, lat1]
+			if reduce_nlon:
+				bounds_lon.append((lon1+lon2)/2)
+				bounds_lat.append(lat1)
+			else: # close by netCDF convention
+				bounds_lon.append(bounds_lon[0])
+				bounds_lat.append(bounds_lat[0])
+			# northern hemisphere
+			cells_lon.append(bounds_lon) 
+			cells_lat.append(bounds_lat)
+			# southern hemisphere
+			cells_lon.append(bounds_lon)
+			cells_lat.append(list(-np.array(bounds_lat))) # convert to array to negate elementwise
+	return np.array(cells_lon), np.array(cells_lat)
+
+for N in [64, 128, 256, 512]:
+	filename = "reduced" + str(N) + ".nc"
+
+	print "Generating: N =", N 
+	lon, lat = from_reduced(N*2,N)
+
+	print lon.shape[0], "cells -> writing as ", filename
+
+	f = nc.Dataset(filename,'w')
+	f.createDimension('n_vert', 5)
+	f.createDimension('n_cell', lon.shape[0])
+
+	var = f.createVariable('lat', 'd', ('n_cell'))
+	var.setncattr("long_name", "latitude")
+	var.setncattr("units", "degrees_north")
+	var.setncattr("bounds", "bounds_lat")
+	var[:] = np.zeros(lon.shape[0])
+	var = f.createVariable('lon', 'd', ('n_cell'))
+	var.setncattr("long_name", "longitude")
+	var.setncattr("units", "degrees_east")
+	var.setncattr("bounds", "bounds_lon")
+	var[:] = np.zeros(lon.shape[0])
+
+	var = f.createVariable('bounds_lon', 'd', ('n_cell','n_vert'))
+	var[:] = lon
+	var = f.createVariable('bounds_lat', 'd', ('n_cell','n_vert'))
+	var[:] = lat
+	var = f.createVariable('val', 'd', ('n_cell'))
+	var.setncattr("coordinates", "lon lat")
+	var[:] = np.arange(lon.shape[0])
+	f.close()
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/remap/py/remap.py
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/remap/py/remap.py	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/remap/py/remap.py	(revision 1749)
@@ -0,0 +1,421 @@
+import netCDF4 as nc
+import ctypes as ct
+import numpy as np
+import os
+import sys
+import math
+from mpi4py import MPI
+
+import time
+
+remap = ct.cdll.LoadLibrary(os.path.realpath('libmapper.so'))
+
+def from_mpas(filename):
+	# construct vortex bounds from Mpas grid structure
+	f = nc.Dataset(filename)
+	# in this case it is must faster to first read the whole file into memory
+	# before converting the data structure
+	print "read"
+	stime = time.time()
+	lon_vert = np.array(f.variables["lonVertex"])
+	lat_vert = np.array(f.variables["latVertex"])
+	vert_cell = np.array(f.variables["verticesOnCell"])
+	nvert_cell = np.array(f.variables["nEdgesOnCell"])
+	ncell, nvert = vert_cell.shape
+	assert(max(nvert_cell) <= nvert)
+	lon = np.zeros(vert_cell.shape)
+	lat = np.zeros(vert_cell.shape)
+	etime = time.time()
+	print "finished read, now convert", etime-stime
+	scal = 180.0/math.pi
+	for c in range(ncell):
+		lat[c,:] = lat_vert[vert_cell[c,:]-1]*scal
+		lon[c,:] = lon_vert[vert_cell[c,:]-1]*scal
+		# signal "last vertex" by netCDF convetion
+		lon[c,nvert_cell[c]] = lon[c,0]
+		lat[c,nvert_cell[c]] = lat[c,0]
+	print "convert end", time.time() - etime
+	return lon, lat
+
+grid_types = {
+	"dynamico:mesh": {
+		"lon_name": "bounds_lon_i",
+		"lat_name": "bounds_lat_i",
+		"pole": [0,0,0]
+	},
+	"dynamico:vort": {
+		"lon_name": "bounds_lon_v",
+		"lat_name": "bounds_lat_v",
+		"pole": [0,0,0]
+	},
+	"dynamico:restart": {
+		"lon_name": "lon_i_vertices",
+		"lat_name": "lat_i_vertices",
+		"pole": [0,0,0]
+	},
+	"test:polygon": {
+		"lon_name": "bounds_lon",
+		"lat_name": "bounds_lat",
+		"pole": [0,0,0]
+	},
+	"test:latlon": {
+		"lon_name": "bounds_lon",
+		"lat_name": "bounds_lat",
+		"pole": [0,0,1]
+	},
+	"mpas": {
+		"reader": from_mpas,
+		"pole": [0,0,0]
+	}
+}
+
+interp_types = {
+	"FV1": 1,
+	"FV2": 2
+}
+
+usage = """
+Usage: python remap.py interp srctype srcfile dsttype dstfile mode outfile
+
+   interp: type of interpolation
+       choices:
+           FV1: first order conservative Finite Volume
+           FV2: second order conservative Finite Volume
+
+   srctype, dsttype: grid type of source and destination
+       choices: """ + " ".join(grid_types.keys()) + """
+
+   srcfile, dstfile: grid file names, should mostly be netCDF file
+
+   mode: modus of operation 
+       choices:
+           weights: computes weight and stores them in outfile
+           remap:   computes the interpolated values on destination grid and stores them in outfile
+
+   outfile: output filename
+
+"""
+
+# parse command line arguments
+if not len(sys.argv) == 8:
+	print usage
+	sys.exit(2)
+
+interp = sys.argv[1]
+try:
+	srctype = grid_types[sys.argv[2]]
+except KeyError:
+	print "Error: srctype needs to be one of the following: " + " ".join(grid_types.keys()) + "."
+	exit(2)
+srcfile = sys.argv[3]
+try:
+	dsttype = grid_types[sys.argv[4]]
+except KeyError:
+	print "Error: srctype needs to be one of the following: " + " ".join(grid_types.keys()) + "."
+	exit(2)
+dstfile = sys.argv[5]
+mode    = sys.argv[6]
+outfile = sys.argv[7]
+
+if not mode in ("weights", "remap"):
+	print "Error: mode must be of of the following: weights remap."
+	exit(2)
+
+remap.mpi_init()
+rank = remap.mpi_rank()
+size = remap.mpi_size()
+
+print rank, "/", size
+
+print "Reading grids from netCDF files."
+
+if "reader" in srctype:
+	src_lon, src_lat = srctype["reader"](srcfile)
+else:
+	src = nc.Dataset(srcfile)
+	# the following two lines do not perform the actual read
+	# the file is read later when assigning to the ctypes array
+	# -> no unnecessary array copying in memory
+	src_lon = src.variables[srctype["lon_name"]]
+	src_lat = src.variables[srctype["lat_name"]]
+
+if "reader" in dsttype:
+	dst_lon, dst_lat = dsttype["reader"](dstfile)
+else:
+	dst = nc.Dataset(dstfile)
+	dst_lon = dst.variables[dsttype["lon_name"]]
+	dst_lat = dst.variables[dsttype["lat_name"]]
+
+src_ncell, src_nvert = src_lon.shape
+dst_ncell, dst_nvert = dst_lon.shape
+
+def compute_distribution(ncell):
+	"Returns the local number and starting position in global array."
+	if rank < ncell % size:
+		return ncell//size + 1, \
+		       (ncell//size + 1)*rank
+	else:
+		return ncell//size, \
+		       (ncell//size + 1)*(ncell%size) + (ncell//size)*(rank - ncell%size)
+
+src_ncell_loc, src_loc_start = compute_distribution(src_ncell)
+dst_ncell_loc, dst_loc_start = compute_distribution(dst_ncell)
+
+print "src", src_ncell_loc, src_loc_start 
+print "dst", dst_ncell_loc, dst_loc_start 
+
+c_src_lon = (ct.c_double * (src_ncell_loc*src_nvert))()
+c_src_lat = (ct.c_double * (src_ncell_loc*src_nvert))()
+c_dst_lon = (ct.c_double * (dst_ncell_loc*dst_nvert))()
+c_dst_lat = (ct.c_double * (dst_ncell_loc*dst_nvert))()
+
+c_src_lon[:] = nc.numpy.reshape(src_lon[src_loc_start:src_loc_start+src_ncell_loc,:], (len(c_src_lon),1))
+c_src_lat[:] = nc.numpy.reshape(src_lat[src_loc_start:src_loc_start+src_ncell_loc,:], (len(c_src_lon),1))
+c_dst_lon[:] = nc.numpy.reshape(dst_lon[dst_loc_start:dst_loc_start+dst_ncell_loc,:], (len(c_dst_lon),1))
+c_dst_lat[:] = nc.numpy.reshape(dst_lat[dst_loc_start:dst_loc_start+dst_ncell_loc,:], (len(c_dst_lon),1))
+
+
+print "Calling remap library to compute weights."
+srcpole = (ct.c_double * (3))()
+dstpole = (ct.c_double * (3))()
+srcpole[:] = srctype["pole"]
+dstpole[:] = dsttype["pole"]
+
+c_src_ncell = ct.c_int(src_ncell_loc)
+c_src_nvert = ct.c_int(src_nvert)
+c_dst_ncell = ct.c_int(dst_ncell_loc)
+c_dst_nvert = ct.c_int(dst_nvert)
+order = ct.c_int(interp_types[interp])
+
+c_nweight = ct.c_int()
+
+print "src:", src_ncell, src_nvert
+print "dst:", dst_ncell, dst_nvert
+
+remap.remap_get_num_weights(c_src_lon, c_src_lat, c_src_nvert, c_src_ncell, srcpole,
+               c_dst_lon, c_dst_lat, c_dst_nvert, c_dst_ncell, dstpole,
+               order, ct.byref(c_nweight))
+
+nwgt = c_nweight.value
+
+c_weights = (ct.c_double * nwgt)()
+c_dst_idx = (ct.c_int * nwgt)()
+c_src_idx = (ct.c_int * nwgt)()
+
+remap.remap_get_weights(c_weights, c_src_idx, c_dst_idx)
+
+wgt_glo     = MPI.COMM_WORLD.gather(c_weights[:])
+src_idx_glo = MPI.COMM_WORLD.gather(c_src_idx[:])
+dst_idx_glo = MPI.COMM_WORLD.gather(c_dst_idx[:])
+
+
+if rank == 0 and mode == 'weights':
+	nwgt_glo = sum(len(wgt) for wgt in wgt_glo)
+
+	print "Writing", nwgt_glo, "weights to netCDF-file '" + outfile + "'."
+	f = nc.Dataset(outfile,'w')
+	f.createDimension('n_src',    src_ncell)
+	f.createDimension('n_dst',    dst_ncell)
+	f.createDimension('n_weight', nwgt_glo)
+
+	var = f.createVariable('src_idx', 'i', ('n_weight'))
+	var[:] = np.hstack(src_idx_glo) + 1 # make indices start from 1
+	var = f.createVariable('dst_idx', 'i', ('n_weight'))
+	var[:] = np.hstack(dst_idx_glo) + 1 # make indices start from 1
+	var = f.createVariable('weight',  'd', ('n_weight'))
+	var[:] = np.hstack(wgt_glo)
+	f.close()
+
+def test_fun(x, y, z):
+	return (1-x**2)*(1-y**2)*z
+
+def test_fun_ll(lat, lon):
+	#return np.cos(lat*math.pi/180)*np.cos(lon*math.pi/180)
+	return 2.0 + np.cos(lat*math.pi/180.)**2 * np.cos(2*lon*math.pi/180.);
+
+#UNUSED
+#def sphe2cart(lat, lon):
+#	phi   = math.pi/180*lon[:]
+#	theta = math.pi/2 - math.pi/180*lat[:]
+#	return np.sin(theta)*np.cos(phi), np.sin(theta)*np.sin(phi), np.cos(theta)
+
+if mode == 'remap':
+	c_centre_lon = (ct.c_double * src_ncell_loc)()
+	c_centre_lat = (ct.c_double * src_ncell_loc)()
+	c_areas      = (ct.c_double * src_ncell_loc)()
+	remap.remap_get_barycentres_and_areas(c_src_lon, c_src_lat, c_src_nvert, c_src_ncell, srcpole,
+		c_centre_lon, c_centre_lat, c_areas)
+#	src_val_loc = test_fun_ll(np.array(c_centre_lat[:]), np.array(c_centre_lon[:]))
+#	src_val_loc = src.variables["ps"]
+#	src_val_glo = MPI.COMM_WORLD.gather(np.array(src_val_loc[:]))
+#        src_val_glo = src_val_loc
+
+	c_centre_lon = (ct.c_double * dst_ncell_loc)()
+	c_centre_lat = (ct.c_double * dst_ncell_loc)()
+	c_areas      = (ct.c_double * dst_ncell_loc)()
+	remap.remap_get_barycentres_and_areas(c_dst_lon, c_dst_lat, c_dst_nvert, c_dst_ncell, dstpole,
+		c_centre_lon, c_centre_lat, c_areas)
+#	dst_val_loc = test_fun_ll(np.array(c_centre_lat[:]), np.array(c_centre_lon[:]))
+
+#	dst_val_glo = MPI.COMM_WORLD.gather(dst_val_loc)
+	dst_areas_glo = MPI.COMM_WORLD.gather(np.array(c_areas[:]))
+	dst_centre_lon_glo = MPI.COMM_WORLD.gather(np.array(c_centre_lon[:]))
+	dst_centre_lat_glo = MPI.COMM_WORLD.gather(np.array(c_centre_lat[:]))
+
+
+if rank == 0 and mode == 'remap':
+	from scipy import sparse
+	A = sparse.csr_matrix(sparse.coo_matrix((np.hstack(wgt_glo),(np.hstack(dst_idx_glo),np.hstack(src_idx_glo)))))
+
+#	src_val = np.hstack(src_val_glo)
+#	dst_ref = np.hstack(dst_val_glo)
+	dst_areas = np.hstack(dst_areas_glo)
+	dst_centre_lon = np.hstack(dst_centre_lon_glo)
+	dst_centre_lat = np.hstack(dst_centre_lat_glo)
+
+#	print "source:", src_val.shape
+#	print "destin:", dst_ref.shape
+#	dst_val = A*src_val
+#	err = dst_val - dst_ref
+#	print "absolute maximum error, maximum value:", np.max(np.abs(err)), np.max(np.abs(dst_ref))
+#	print "relative maximum error, normalized L2 error, average target cell size (edgelength of same-area square):"
+#	print np.max(np.abs(err))/np.max(np.abs(dst_ref)), np.linalg.norm(err)/np.linalg.norm(dst_ref), np.mean(np.sqrt(dst_areas))
+
+	lev=src.dimensions['lev']
+	nq=src.dimensions['nq']
+        f = nc.Dataset(outfile,'w')
+	f.createDimension('nvert', dst_nvert)
+	f.createDimension('cell', dst_ncell)
+	f.createDimension('lev', len(lev))
+	f.createDimension('nq', len(nq))
+
+	var = f.createVariable('lat', 'd', ('cell'))
+	var.setncattr("long_name", "latitude")
+	var.setncattr("units", "degrees_north")
+	var.setncattr("bounds", "bounds_lat")
+	var[:] = dst_centre_lat
+	var = f.createVariable('lon', 'd', ('cell'))
+	var.setncattr("long_name", "longitude")
+	var.setncattr("units", "degrees_east")
+	var.setncattr("bounds", "bounds_lon")
+	var[:] = dst_centre_lon
+
+	var = f.createVariable('bounds_lon', 'd', ('cell','nvert'))
+	var[:] = dst_lon
+	var = f.createVariable('bounds_lat', 'd', ('cell','nvert'))
+	var[:] = dst_lat
+
+	var = f.createVariable('lev', 'd', ('lev'))
+	var[:] = src.variables['lev']
+        var.setncattr('axis', 'Z')
+        var.setncattr('units', 'Pa')
+        var.setncattr('positive', 'down')
+	var[:] = src.variables['lev']
+
+	ps = f.createVariable('ps', 'd', ('cell'))
+	ps.setncattr("coordinates", "lon lat")
+
+	phis = f.createVariable('phis', 'd', ('cell'))
+	phis.setncattr("coordinates", "lon lat")
+
+        theta_rhodz = f.createVariable('theta_rhodz', 'd', ('lev','cell'))
+	theta_rhodz.setncattr("coordinates", "lev lon lat")
+
+        ulon = f.createVariable('ulon', 'd', ('lev','cell'))
+	ulon.setncattr("coordinates", "lev lon lat")
+
+        ulat = f.createVariable('ulat', 'd', ('lev','cell'))
+	ulat.setncattr("coordinates", "lev lon lat")
+
+        q = f.createVariable('q', 'd', ('nq','lev','cell'))
+	q.setncattr("coordinates", "nq lev lon lat")
+        
+        
+
+#for ps
+if mode == 'remap':
+	src_val_loc = src.variables['ps']
+	src_val_glo = MPI.COMM_WORLD.gather(np.array(src_val_loc[:]))
+
+if rank == 0 and mode == 'remap':
+#        print(src_val_glo)
+      	src_val = np.hstack(src_val_glo)
+#        print src_val
+        print A.shape
+        print src_val.shape
+	dst_val = A*src_val
+	ps[:] = dst_val
+
+#for phis
+if mode == 'remap':
+	src_val_loc = src.variables['phis']
+	src_val_glo = MPI.COMM_WORLD.gather(np.array(src_val_loc[:]))
+
+if rank == 0 and mode == 'remap':
+      	src_val = np.hstack(src_val_glo)
+	dst_val = A*src_val
+	phis[:] = dst_val
+
+
+#for theta_rhodz
+if mode == 'remap':
+	src_val_loc = src.variables['theta_rhodz']
+
+for l in range(0, len(lev)):
+	if mode == 'remap':
+		src_val_glo = MPI.COMM_WORLD.gather(np.array(src_val_loc[l,:]))
+
+	if rank == 0 and mode == 'remap':
+      		src_val = np.hstack(src_val_glo)
+		dst_val = A*src_val
+		theta_rhodz[l,:] = dst_val
+
+#for ulon
+if mode == 'remap':
+	src_val_loc = src.variables['ulon']
+
+for l in range(0, len(lev)):
+	if mode == 'remap':
+		src_val_glo = MPI.COMM_WORLD.gather(np.array(src_val_loc[l,:]))
+
+	if rank == 0 and mode == 'remap':
+      		src_val = np.hstack(src_val_glo)
+		dst_val = A*src_val
+		ulon[l,:] = dst_val
+
+#for ulat
+if mode == 'remap':
+	src_val_loc = src.variables['ulat']
+
+for l in range(0, len(lev)):
+	if mode == 'remap':
+		src_val_glo = MPI.COMM_WORLD.gather(np.array(src_val_loc[l,:]))
+
+	if rank == 0 and mode == 'remap':
+      		src_val = np.hstack(src_val_glo)
+		dst_val = A*src_val
+		ulat[l,:] = dst_val
+
+#for q
+if mode == 'remap':
+	src_val_loc = src.variables['q']
+
+for n in range(0, len(nq)):
+	for l in range(0, len(lev)):
+		if mode == 'remap':
+			src_val_glo = MPI.COMM_WORLD.gather(np.array(src_val_loc[n,l,:]))
+
+		if rank == 0 and mode == 'remap':
+      			src_val = np.hstack(src_val_glo)
+			dst_val = A*src_val
+			q[n,l,:] = dst_val
+
+if mode == 'remap':
+	f.close()
+        
+
+if not "reader" in srctype:
+	src.close()
+if not "reader" in dsttype:
+	dst.close()
+
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/remap/py/remap_ECDYN
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/remap/py/remap_ECDYN	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/remap/py/remap_ECDYN	(revision 1749)
@@ -0,0 +1,1 @@
+python remap_ECDYN.py FV2 test:latlon ECDYN_unstruct.nc  test:polygon grid_icosa.nc remap ECDYN_remap.nc 
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/remap/py/remap_ECDYN.py
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/remap/py/remap_ECDYN.py	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/remap/py/remap_ECDYN.py	(revision 1749)
@@ -0,0 +1,444 @@
+import netCDF4 as nc
+import ctypes as ct
+import numpy as np
+import os
+import sys
+import math
+from mpi4py import MPI
+
+import time
+
+remap = ct.cdll.LoadLibrary(os.path.realpath('libmapper.so'))
+
+def from_mpas(filename):
+	# construct vortex bounds from Mpas grid structure
+	f = nc.Dataset(filename)
+	# in this case it is must faster to first read the whole file into memory
+	# before converting the data structure
+	print "read"
+	stime = time.time()
+	lon_vert = np.array(f.variables["lonVertex"])
+	lat_vert = np.array(f.variables["latVertex"])
+	vert_cell = np.array(f.variables["verticesOnCell"])
+	nvert_cell = np.array(f.variables["nEdgesOnCell"])
+	ncell, nvert = vert_cell.shape
+	assert(max(nvert_cell) <= nvert)
+	lon = np.zeros(vert_cell.shape)
+	lat = np.zeros(vert_cell.shape)
+	etime = time.time()
+	print "finished read, now convert", etime-stime
+	scal = 180.0/math.pi
+	for c in range(ncell):
+		lat[c,:] = lat_vert[vert_cell[c,:]-1]*scal
+		lon[c,:] = lon_vert[vert_cell[c,:]-1]*scal
+		# signal "last vertex" by netCDF convetion
+		lon[c,nvert_cell[c]] = lon[c,0]
+		lat[c,nvert_cell[c]] = lat[c,0]
+	print "convert end", time.time() - etime
+	return lon, lat
+
+grid_types = {
+	"dynamico:mesh": {
+		"lon_name": "bounds_lon_i",
+		"lat_name": "bounds_lat_i",
+		"pole": [0,0,0]
+	},
+	"dynamico:vort": {
+		"lon_name": "bounds_lon_v",
+		"lat_name": "bounds_lat_v",
+		"pole": [0,0,0]
+	},
+	"dynamico:restart": {
+		"lon_name": "lon_i_vertices",
+		"lat_name": "lat_i_vertices",
+		"pole": [0,0,0]
+	},
+	"test:polygon": {
+		"lon_name": "bounds_lon",
+		"lat_name": "bounds_lat",
+		"pole": [0,0,0]
+	},
+	"test:latlon": {
+		"lon_name": "bounds_lon",
+		"lat_name": "bounds_lat",
+		"pole": [0,0,1]
+	},
+	"mpas": {
+		"reader": from_mpas,
+		"pole": [0,0,0]
+	}
+}
+
+interp_types = {
+	"FV1": 1,
+	"FV2": 2
+}
+
+usage = """
+Usage: python remap.py interp srctype srcfile dsttype dstfile mode outfile
+
+   interp: type of interpolation
+       choices:
+           FV1: first order conservative Finite Volume
+           FV2: second order conservative Finite Volume
+
+   srctype, dsttype: grid type of source and destination
+       choices: """ + " ".join(grid_types.keys()) + """
+
+   srcfile, dstfile: grid file names, should mostly be netCDF file
+
+   mode: modus of operation 
+       choices:
+           weights: computes weight and stores them in outfile
+           remap:   computes the interpolated values on destination grid and stores them in outfile
+
+   outfile: output filename
+
+"""
+
+# parse command line arguments
+if not len(sys.argv) == 8:
+	print usage
+	sys.exit(2)
+
+interp = sys.argv[1]
+try:
+	srctype = grid_types[sys.argv[2]]
+except KeyError:
+	print "Error: srctype needs to be one of the following: " + " ".join(grid_types.keys()) + "."
+	exit(2)
+srcfile = sys.argv[3]
+try:
+	dsttype = grid_types[sys.argv[4]]
+except KeyError:
+	print "Error: srctype needs to be one of the following: " + " ".join(grid_types.keys()) + "."
+	exit(2)
+dstfile = sys.argv[5]
+mode    = sys.argv[6]
+outfile = sys.argv[7]
+
+if not mode in ("weights", "remap"):
+	print "Error: mode must be of of the following: weights remap."
+	exit(2)
+
+remap.mpi_init()
+rank = remap.mpi_rank()
+size = remap.mpi_size()
+
+print rank, "/", size
+
+print "Reading grids from netCDF files."
+
+if "reader" in srctype:
+	src_lon, src_lat = srctype["reader"](srcfile)
+else:
+	src = nc.Dataset(srcfile)
+	# the following two lines do not perform the actual read
+	# the file is read later when assigning to the ctypes array
+	# -> no unnecessary array copying in memory
+	src_lon = src.variables[srctype["lon_name"]]
+	src_lat = src.variables[srctype["lat_name"]]
+
+if "reader" in dsttype:
+	dst_lon, dst_lat = dsttype["reader"](dstfile)
+else:
+	dst = nc.Dataset(dstfile)
+	dst_lon = dst.variables[dsttype["lon_name"]]
+	dst_lat = dst.variables[dsttype["lat_name"]]
+
+src_ncell, src_nvert = src_lon.shape
+dst_ncell, dst_nvert = dst_lon.shape
+
+def compute_distribution(ncell):
+	"Returns the local number and starting position in global array."
+	if rank < ncell % size:
+		return ncell//size + 1, \
+		       (ncell//size + 1)*rank
+	else:
+		return ncell//size, \
+		       (ncell//size + 1)*(ncell%size) + (ncell//size)*(rank - ncell%size)
+
+src_ncell_loc, src_loc_start = compute_distribution(src_ncell)
+dst_ncell_loc, dst_loc_start = compute_distribution(dst_ncell)
+
+print "src", src_ncell_loc, src_loc_start 
+print "dst", dst_ncell_loc, dst_loc_start 
+
+c_src_lon = (ct.c_double * (src_ncell_loc*src_nvert))()
+c_src_lat = (ct.c_double * (src_ncell_loc*src_nvert))()
+c_dst_lon = (ct.c_double * (dst_ncell_loc*dst_nvert))()
+c_dst_lat = (ct.c_double * (dst_ncell_loc*dst_nvert))()
+
+c_src_lon[:] = nc.numpy.reshape(src_lon[src_loc_start:src_loc_start+src_ncell_loc,:], (len(c_src_lon),1))
+c_src_lat[:] = nc.numpy.reshape(src_lat[src_loc_start:src_loc_start+src_ncell_loc,:], (len(c_src_lon),1))
+c_dst_lon[:] = nc.numpy.reshape(dst_lon[dst_loc_start:dst_loc_start+dst_ncell_loc,:], (len(c_dst_lon),1))
+c_dst_lat[:] = nc.numpy.reshape(dst_lat[dst_loc_start:dst_loc_start+dst_ncell_loc,:], (len(c_dst_lon),1))
+
+
+print "Calling remap library to compute weights."
+srcpole = (ct.c_double * (3))()
+dstpole = (ct.c_double * (3))()
+srcpole[:] = srctype["pole"]
+dstpole[:] = dsttype["pole"]
+
+c_src_ncell = ct.c_int(src_ncell_loc)
+c_src_nvert = ct.c_int(src_nvert)
+c_dst_ncell = ct.c_int(dst_ncell_loc)
+c_dst_nvert = ct.c_int(dst_nvert)
+order = ct.c_int(interp_types[interp])
+
+c_nweight = ct.c_int()
+
+print "src:", src_ncell, src_nvert
+print "dst:", dst_ncell, dst_nvert
+
+remap.remap_get_num_weights(c_src_lon, c_src_lat, c_src_nvert, c_src_ncell, srcpole,
+               c_dst_lon, c_dst_lat, c_dst_nvert, c_dst_ncell, dstpole,
+               order, ct.byref(c_nweight))
+
+nwgt = c_nweight.value
+
+c_weights = (ct.c_double * nwgt)()
+c_dst_idx = (ct.c_int * nwgt)()
+c_src_idx = (ct.c_int * nwgt)()
+
+remap.remap_get_weights(c_weights, c_src_idx, c_dst_idx)
+
+wgt_glo     = MPI.COMM_WORLD.gather(c_weights[:])
+src_idx_glo = MPI.COMM_WORLD.gather(c_src_idx[:])
+dst_idx_glo = MPI.COMM_WORLD.gather(c_dst_idx[:])
+
+
+if rank == 0 and mode == 'weights':
+	nwgt_glo = sum(len(wgt) for wgt in wgt_glo)
+
+	print "Writing", nwgt_glo, "weights to netCDF-file '" + outfile + "'."
+	f = nc.Dataset(outfile,'w')
+	f.createDimension('n_src',    src_ncell)
+	f.createDimension('n_dst',    dst_ncell)
+	f.createDimension('n_weight', nwgt_glo)
+
+	var = f.createVariable('src_idx', 'i', ('n_weight'))
+	var[:] = np.hstack(src_idx_glo) + 1 # make indices start from 1
+	var = f.createVariable('dst_idx', 'i', ('n_weight'))
+	var[:] = np.hstack(dst_idx_glo) + 1 # make indices start from 1
+	var = f.createVariable('weight',  'd', ('n_weight'))
+	var[:] = np.hstack(wgt_glo)
+	f.close()
+
+def test_fun(x, y, z):
+	return (1-x**2)*(1-y**2)*z
+
+def test_fun_ll(lat, lon):
+	#return np.cos(lat*math.pi/180)*np.cos(lon*math.pi/180)
+	return 2.0 + np.cos(lat*math.pi/180.)**2 * np.cos(2*lon*math.pi/180.);
+
+#UNUSED
+#def sphe2cart(lat, lon):
+#	phi   = math.pi/180*lon[:]
+#	theta = math.pi/2 - math.pi/180*lat[:]
+#	return np.sin(theta)*np.cos(phi), np.sin(theta)*np.sin(phi), np.cos(theta)
+
+if mode == 'remap':
+	c_centre_lon = (ct.c_double * src_ncell_loc)()
+	c_centre_lat = (ct.c_double * src_ncell_loc)()
+	c_areas      = (ct.c_double * src_ncell_loc)()
+	remap.remap_get_barycentres_and_areas(c_src_lon, c_src_lat, c_src_nvert, c_src_ncell, srcpole,
+		c_centre_lon, c_centre_lat, c_areas)
+#	src_val_loc = test_fun_ll(np.array(c_centre_lat[:]), np.array(c_centre_lon[:]))
+#	src_val_loc = src.variables["ps"]
+#	src_val_glo = MPI.COMM_WORLD.gather(np.array(src_val_loc[:]))
+#        src_val_glo = src_val_loc
+
+	c_centre_lon = (ct.c_double * dst_ncell_loc)()
+	c_centre_lat = (ct.c_double * dst_ncell_loc)()
+	c_areas      = (ct.c_double * dst_ncell_loc)()
+	remap.remap_get_barycentres_and_areas(c_dst_lon, c_dst_lat, c_dst_nvert, c_dst_ncell, dstpole,
+		c_centre_lon, c_centre_lat, c_areas)
+#	dst_val_loc = test_fun_ll(np.array(c_centre_lat[:]), np.array(c_centre_lon[:]))
+
+#	dst_val_glo = MPI.COMM_WORLD.gather(dst_val_loc)
+	dst_areas_glo = MPI.COMM_WORLD.gather(np.array(c_areas[:]))
+	dst_centre_lon_glo = MPI.COMM_WORLD.gather(np.array(c_centre_lon[:]))
+	dst_centre_lat_glo = MPI.COMM_WORLD.gather(np.array(c_centre_lat[:]))
+
+
+if rank == 0 and mode == 'remap':
+	from scipy import sparse
+	A = sparse.csr_matrix(sparse.coo_matrix((np.hstack(wgt_glo),(np.hstack(dst_idx_glo),np.hstack(src_idx_glo)))))
+
+#	src_val = np.hstack(src_val_glo)
+#	dst_ref = np.hstack(dst_val_glo)
+	dst_areas = np.hstack(dst_areas_glo)
+	dst_centre_lon = np.hstack(dst_centre_lon_glo)
+	dst_centre_lat = np.hstack(dst_centre_lat_glo)
+
+#	print "source:", src_val.shape
+#	print "destin:", dst_ref.shape
+#	dst_val = A*src_val
+#	err = dst_val - dst_ref
+#	print "absolute maximum error, maximum value:", np.max(np.abs(err)), np.max(np.abs(dst_ref))
+#	print "relative maximum error, normalized L2 error, average target cell size (edgelength of same-area square):"
+#	print np.max(np.abs(err))/np.max(np.abs(dst_ref)), np.linalg.norm(err)/np.linalg.norm(dst_ref), np.mean(np.sqrt(dst_areas))
+
+	lev=src.dimensions['lev']
+        f = nc.Dataset(outfile,'w')
+	f.createDimension('nvert', dst_nvert)
+	f.createDimension('cell', dst_ncell)
+	f.createDimension('lev', len(lev))
+
+	var = f.createVariable('lat', 'd', ('cell'))
+	var.setncattr("long_name", "latitude")
+	var.setncattr("units", "degrees_north")
+	var.setncattr("bounds", "bounds_lat")
+	var[:] = dst_centre_lat
+	var = f.createVariable('lon', 'd', ('cell'))
+	var.setncattr("long_name", "longitude")
+	var.setncattr("units", "degrees_east")
+	var.setncattr("bounds", "bounds_lon")
+	var[:] = dst_centre_lon
+
+	var = f.createVariable('bounds_lon', 'd', ('cell','nvert'))
+	var[:] = dst_lon
+	var = f.createVariable('bounds_lat', 'd', ('cell','nvert'))
+	var[:] = dst_lat
+
+	var = f.createVariable('lev', 'd', ('lev'))
+	var[:] = src.variables['lev']
+        var.setncattr('axis', 'Z')
+        var.setncattr('units', 'Pa')
+        var.setncattr('positive', 'down')
+	var[:] = src.variables['lev']
+
+        U = f.createVariable('U', 'd', ('lev','cell'))
+	U.setncattr("coordinates", "lev lon lat")
+ 
+        V = f.createVariable('V', 'd', ('lev','cell'))
+	V.setncattr("coordinates", "lev lon lat")
+
+        TEMP = f.createVariable('TEMP', 'd', ('lev','cell'))
+	TEMP.setncattr("coordinates", "lev lon lat")
+
+        R = f.createVariable('R', 'd', ('lev','cell'))
+	R.setncattr("coordinates", "lev lon lat")
+
+	Z = f.createVariable('Z', 'd', ('cell'))
+	Z.setncattr("coordinates", "lon lat")
+
+	ST = f.createVariable('ST', 'd', ('cell'))
+	ST.setncattr("coordinates", "lon lat")
+
+	CDSW = f.createVariable('CDSW', 'd', ('cell'))
+	CDSW.setncattr("coordinates", "lon lat")
+        
+	SP = f.createVariable('SP', 'd', ('cell'))
+	SP.setncattr("coordinates", "lon lat")
+        
+
+
+#for U
+if mode == 'remap':
+	src_val_loc = src.variables['U']
+
+for l in range(0, len(lev)):
+	if mode == 'remap':
+		src_val_glo = MPI.COMM_WORLD.gather(np.array(src_val_loc[l,:]))
+
+	if rank == 0 and mode == 'remap':
+      		src_val = np.hstack(src_val_glo)
+		dst_val = A*src_val
+		U[l,:] = dst_val
+
+#for V
+if mode == 'remap':
+	src_val_loc = src.variables['V']
+
+for l in range(0, len(lev)):
+	if mode == 'remap':
+		src_val_glo = MPI.COMM_WORLD.gather(np.array(src_val_loc[l,:]))
+
+	if rank == 0 and mode == 'remap':
+      		src_val = np.hstack(src_val_glo)
+		dst_val = A*src_val
+		V[l,:] = dst_val
+
+
+#for TEMP
+if mode == 'remap':
+	src_val_loc = src.variables['TEMP']
+
+for l in range(0, len(lev)):
+	if mode == 'remap':
+		src_val_glo = MPI.COMM_WORLD.gather(np.array(src_val_loc[l,:]))
+
+	if rank == 0 and mode == 'remap':
+      		src_val = np.hstack(src_val_glo)
+		dst_val = A*src_val
+		TEMP[l,:] = dst_val
+
+#for R
+if mode == 'remap':
+	src_val_loc = src.variables['R']
+
+for l in range(0, len(lev)):
+	if mode == 'remap':
+		src_val_glo = MPI.COMM_WORLD.gather(np.array(src_val_loc[l,:]))
+
+	if rank == 0 and mode == 'remap':
+      		src_val = np.hstack(src_val_glo)
+		dst_val = A*src_val
+		R[l,:] = dst_val
+
+
+#for Z
+if mode == 'remap':
+	src_val_loc = src.variables['Z']
+	src_val_glo = MPI.COMM_WORLD.gather(np.array(src_val_loc[:]))
+
+if rank == 0 and mode == 'remap':
+      	src_val = np.hstack(src_val_glo)
+	dst_val = A*src_val
+	Z[:] = dst_val
+
+#for ST
+if mode == 'remap':
+	src_val_loc = src.variables['ST']
+	src_val_glo = MPI.COMM_WORLD.gather(np.array(src_val_loc[:]))
+
+if rank == 0 and mode == 'remap':
+      	src_val = np.hstack(src_val_glo)
+	dst_val = A*src_val
+	ST[:] = dst_val
+
+
+#for CDSW
+if mode == 'remap':
+	src_val_loc = src.variables['CDSW']
+	src_val_glo = MPI.COMM_WORLD.gather(np.array(src_val_loc[:]))
+
+if rank == 0 and mode == 'remap':
+      	src_val = np.hstack(src_val_glo)
+	dst_val = A*src_val
+	CDSW[:] = dst_val
+
+#for SP
+if mode == 'remap':
+	src_val_loc = src.variables['SP']
+	src_val_glo = MPI.COMM_WORLD.gather(np.array(src_val_loc[:]))
+
+if rank == 0 and mode == 'remap':
+      	src_val = np.hstack(src_val_glo)
+	dst_val = A*src_val
+	SP[:] = dst_val
+
+
+
+if mode == 'remap':
+	f.close()
+        
+
+if not "reader" in srctype:
+	src.close()
+if not "reader" in dsttype:
+	dst.close()
+
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/remap/py/remap_evag.py
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/remap/py/remap_evag.py	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/remap/py/remap_evag.py	(revision 1749)
@@ -0,0 +1,421 @@
+import netCDF4 as nc
+import ctypes as ct
+import numpy as np
+import os
+import sys
+import math
+from mpi4py import MPI
+
+import time
+
+remap = ct.cdll.LoadLibrary(os.path.realpath('libmapper.so'))
+
+def from_mpas(filename):
+	# construct vortex bounds from Mpas grid structure
+	f = nc.Dataset(filename)
+	# in this case it is must faster to first read the whole file into memory
+	# before converting the data structure
+	print "read"
+	stime = time.time()
+	lon_vert = np.array(f.variables["lonVertex"])
+	lat_vert = np.array(f.variables["latVertex"])
+	vert_cell = np.array(f.variables["verticesOnCell"])
+	nvert_cell = np.array(f.variables["nEdgesOnCell"])
+	ncell, nvert = vert_cell.shape
+	assert(max(nvert_cell) <= nvert)
+	lon = np.zeros(vert_cell.shape)
+	lat = np.zeros(vert_cell.shape)
+	etime = time.time()
+	print "finished read, now convert", etime-stime
+	scal = 180.0/math.pi
+	for c in range(ncell):
+		lat[c,:] = lat_vert[vert_cell[c,:]-1]*scal
+		lon[c,:] = lon_vert[vert_cell[c,:]-1]*scal
+		# signal "last vertex" by netCDF convetion
+		lon[c,nvert_cell[c]] = lon[c,0]
+		lat[c,nvert_cell[c]] = lat[c,0]
+	print "convert end", time.time() - etime
+	return lon, lat
+
+grid_types = {
+	"dynamico:mesh": {
+		"lon_name": "bounds_lon_i",
+		"lat_name": "bounds_lat_i",
+		"pole": [0,0,0]
+	},
+	"dynamico:vort": {
+		"lon_name": "bounds_lon_v",
+		"lat_name": "bounds_lat_v",
+		"pole": [0,0,0]
+	},
+	"dynamico:restart": {
+		"lon_name": "lon_i_vertices",
+		"lat_name": "lat_i_vertices",
+		"pole": [0,0,0]
+	},
+	"test:polygon": {
+		"lon_name": "bounds_lon",
+		"lat_name": "bounds_lat",
+		"pole": [0,0,0]
+	},
+	"test:latlon": {
+		"lon_name": "bounds_lon",
+		"lat_name": "bounds_lat",
+		"pole": [0,0,1]
+	},
+	"mpas": {
+		"reader": from_mpas,
+		"pole": [0,0,0]
+	}
+}
+
+interp_types = {
+	"FV1": 1,
+	"FV2": 2
+}
+
+usage = """
+Usage: python remap.py interp srctype srcfile dsttype dstfile mode outfile
+
+   interp: type of interpolation
+       choices:
+           FV1: first order conservative Finite Volume
+           FV2: second order conservative Finite Volume
+
+   srctype, dsttype: grid type of source and destination
+       choices: """ + " ".join(grid_types.keys()) + """
+
+   srcfile, dstfile: grid file names, should mostly be netCDF file
+
+   mode: modus of operation 
+       choices:
+           weights: computes weight and stores them in outfile
+           remap:   computes the interpolated values on destination grid and stores them in outfile
+
+   outfile: output filename
+
+"""
+
+# parse command line arguments
+if not len(sys.argv) == 8:
+	print usage
+	sys.exit(2)
+
+interp = sys.argv[1]
+try:
+	srctype = grid_types[sys.argv[2]]
+except KeyError:
+	print "Error: srctype needs to be one of the following: " + " ".join(grid_types.keys()) + "."
+	exit(2)
+srcfile = sys.argv[3]
+try:
+	dsttype = grid_types[sys.argv[4]]
+except KeyError:
+	print "Error: srctype needs to be one of the following: " + " ".join(grid_types.keys()) + "."
+	exit(2)
+dstfile = sys.argv[5]
+mode    = sys.argv[6]
+outfile = sys.argv[7]
+
+if not mode in ("weights", "remap"):
+	print "Error: mode must be of of the following: weights remap."
+	exit(2)
+
+remap.mpi_init()
+rank = remap.mpi_rank()
+size = remap.mpi_size()
+
+print rank, "/", size
+
+print "Reading grids from netCDF files."
+
+if "reader" in srctype:
+	src_lon, src_lat = srctype["reader"](srcfile)
+else:
+	src = nc.Dataset(srcfile)
+	# the following two lines do not perform the actual read
+	# the file is read later when assigning to the ctypes array
+	# -> no unnecessary array copying in memory
+	src_lon = src.variables[srctype["lon_name"]]
+	src_lat = src.variables[srctype["lat_name"]]
+
+if "reader" in dsttype:
+	dst_lon, dst_lat = dsttype["reader"](dstfile)
+else:
+	dst = nc.Dataset(dstfile)
+	dst_lon = dst.variables[dsttype["lon_name"]]
+	dst_lat = dst.variables[dsttype["lat_name"]]
+
+src_ncell, src_nvert = src_lon.shape
+dst_ncell, dst_nvert = dst_lon.shape
+
+def compute_distribution(ncell):
+	"Returns the local number and starting position in global array."
+	if rank < ncell % size:
+		return ncell//size + 1, \
+		       (ncell//size + 1)*rank
+	else:
+		return ncell//size, \
+		       (ncell//size + 1)*(ncell%size) + (ncell//size)*(rank - ncell%size)
+
+src_ncell_loc, src_loc_start = compute_distribution(src_ncell)
+dst_ncell_loc, dst_loc_start = compute_distribution(dst_ncell)
+
+print "src", src_ncell_loc, src_loc_start 
+print "dst", dst_ncell_loc, dst_loc_start 
+
+c_src_lon = (ct.c_double * (src_ncell_loc*src_nvert))()
+c_src_lat = (ct.c_double * (src_ncell_loc*src_nvert))()
+c_dst_lon = (ct.c_double * (dst_ncell_loc*dst_nvert))()
+c_dst_lat = (ct.c_double * (dst_ncell_loc*dst_nvert))()
+
+c_src_lon[:] = nc.numpy.reshape(src_lon[src_loc_start:src_loc_start+src_ncell_loc,:], (len(c_src_lon),1))
+c_src_lat[:] = nc.numpy.reshape(src_lat[src_loc_start:src_loc_start+src_ncell_loc,:], (len(c_src_lon),1))
+c_dst_lon[:] = nc.numpy.reshape(dst_lon[dst_loc_start:dst_loc_start+dst_ncell_loc,:], (len(c_dst_lon),1))
+c_dst_lat[:] = nc.numpy.reshape(dst_lat[dst_loc_start:dst_loc_start+dst_ncell_loc,:], (len(c_dst_lon),1))
+
+
+print "Calling remap library to compute weights."
+srcpole = (ct.c_double * (3))()
+dstpole = (ct.c_double * (3))()
+srcpole[:] = srctype["pole"]
+dstpole[:] = dsttype["pole"]
+
+c_src_ncell = ct.c_int(src_ncell_loc)
+c_src_nvert = ct.c_int(src_nvert)
+c_dst_ncell = ct.c_int(dst_ncell_loc)
+c_dst_nvert = ct.c_int(dst_nvert)
+order = ct.c_int(interp_types[interp])
+
+c_nweight = ct.c_int()
+
+print "src:", src_ncell, src_nvert
+print "dst:", dst_ncell, dst_nvert
+
+remap.remap_get_num_weights(c_src_lon, c_src_lat, c_src_nvert, c_src_ncell, srcpole,
+               c_dst_lon, c_dst_lat, c_dst_nvert, c_dst_ncell, dstpole,
+               order, ct.byref(c_nweight))
+
+nwgt = c_nweight.value
+
+c_weights = (ct.c_double * nwgt)()
+c_dst_idx = (ct.c_int * nwgt)()
+c_src_idx = (ct.c_int * nwgt)()
+
+remap.remap_get_weights(c_weights, c_src_idx, c_dst_idx)
+
+wgt_glo     = MPI.COMM_WORLD.gather(c_weights[:])
+src_idx_glo = MPI.COMM_WORLD.gather(c_src_idx[:])
+dst_idx_glo = MPI.COMM_WORLD.gather(c_dst_idx[:])
+
+
+if rank == 0 and mode == 'weights':
+	nwgt_glo = sum(len(wgt) for wgt in wgt_glo)
+
+	print "Writing", nwgt_glo, "weights to netCDF-file '" + outfile + "'."
+	f = nc.Dataset(outfile,'w')
+	f.createDimension('n_src',    src_ncell)
+	f.createDimension('n_dst',    dst_ncell)
+	f.createDimension('n_weight', nwgt_glo)
+
+	var = f.createVariable('src_idx', 'i', ('n_weight'))
+	var[:] = np.hstack(src_idx_glo) + 1 # make indices start from 1
+	var = f.createVariable('dst_idx', 'i', ('n_weight'))
+	var[:] = np.hstack(dst_idx_glo) + 1 # make indices start from 1
+	var = f.createVariable('weight',  'd', ('n_weight'))
+	var[:] = np.hstack(wgt_glo)
+	f.close()
+
+def test_fun(x, y, z):
+	return (1-x**2)*(1-y**2)*z
+
+def test_fun_ll(lat, lon):
+	#return np.cos(lat*math.pi/180)*np.cos(lon*math.pi/180)
+	return 2.0 + np.cos(lat*math.pi/180.)**2 * np.cos(2*lon*math.pi/180.);
+
+#UNUSED
+#def sphe2cart(lat, lon):
+#	phi   = math.pi/180*lon[:]
+#	theta = math.pi/2 - math.pi/180*lat[:]
+#	return np.sin(theta)*np.cos(phi), np.sin(theta)*np.sin(phi), np.cos(theta)
+
+if mode == 'remap':
+	c_centre_lon = (ct.c_double * src_ncell_loc)()
+	c_centre_lat = (ct.c_double * src_ncell_loc)()
+	c_areas      = (ct.c_double * src_ncell_loc)()
+	remap.remap_get_barycentres_and_areas(c_src_lon, c_src_lat, c_src_nvert, c_src_ncell, srcpole,
+		c_centre_lon, c_centre_lat, c_areas)
+#	src_val_loc = test_fun_ll(np.array(c_centre_lat[:]), np.array(c_centre_lon[:]))
+#	src_val_loc = src.variables["ps"]
+#	src_val_glo = MPI.COMM_WORLD.gather(np.array(src_val_loc[:]))
+#        src_val_glo = src_val_loc
+
+	c_centre_lon = (ct.c_double * dst_ncell_loc)()
+	c_centre_lat = (ct.c_double * dst_ncell_loc)()
+	c_areas      = (ct.c_double * dst_ncell_loc)()
+	remap.remap_get_barycentres_and_areas(c_dst_lon, c_dst_lat, c_dst_nvert, c_dst_ncell, dstpole,
+		c_centre_lon, c_centre_lat, c_areas)
+#	dst_val_loc = test_fun_ll(np.array(c_centre_lat[:]), np.array(c_centre_lon[:]))
+
+#	dst_val_glo = MPI.COMM_WORLD.gather(dst_val_loc)
+	dst_areas_glo = MPI.COMM_WORLD.gather(np.array(c_areas[:]))
+	dst_centre_lon_glo = MPI.COMM_WORLD.gather(np.array(c_centre_lon[:]))
+	dst_centre_lat_glo = MPI.COMM_WORLD.gather(np.array(c_centre_lat[:]))
+
+
+if rank == 0 and mode == 'remap':
+	from scipy import sparse
+	A = sparse.csr_matrix(sparse.coo_matrix((np.hstack(wgt_glo),(np.hstack(dst_idx_glo),np.hstack(src_idx_glo)))))
+
+#	src_val = np.hstack(src_val_glo)
+#	dst_ref = np.hstack(dst_val_glo)
+	dst_areas = np.hstack(dst_areas_glo)
+	dst_centre_lon = np.hstack(dst_centre_lon_glo)
+	dst_centre_lat = np.hstack(dst_centre_lat_glo)
+
+#	print "source:", src_val.shape
+#	print "destin:", dst_ref.shape
+#	dst_val = A*src_val
+#	err = dst_val - dst_ref
+#	print "absolute maximum error, maximum value:", np.max(np.abs(err)), np.max(np.abs(dst_ref))
+#	print "relative maximum error, normalized L2 error, average target cell size (edgelength of same-area square):"
+#	print np.max(np.abs(err))/np.max(np.abs(dst_ref)), np.linalg.norm(err)/np.linalg.norm(dst_ref), np.mean(np.sqrt(dst_areas))
+
+	lev=src.dimensions['lev']
+	nq=src.dimensions['nq']
+        f = nc.Dataset(outfile,'w')
+	f.createDimension('nvert', dst_nvert)
+	f.createDimension('cell', dst_ncell)
+	f.createDimension('lev', len(lev))
+	f.createDimension('nq', len(nq))
+
+	var = f.createVariable('lat', 'd', ('cell'))
+	var.setncattr("long_name", "latitude")
+	var.setncattr("units", "degrees_north")
+	var.setncattr("bounds", "bounds_lat")
+	var[:] = dst_centre_lat
+	var = f.createVariable('lon', 'd', ('cell'))
+	var.setncattr("long_name", "longitude")
+	var.setncattr("units", "degrees_east")
+	var.setncattr("bounds", "bounds_lon")
+	var[:] = dst_centre_lon
+
+	var = f.createVariable('bounds_lon', 'd', ('cell','nvert'))
+	var[:] = dst_lon
+	var = f.createVariable('bounds_lat', 'd', ('cell','nvert'))
+	var[:] = dst_lat
+
+	var = f.createVariable('lev', 'd', ('lev'))
+	var[:] = src.variables['lev']
+        var.setncattr('axis', 'Z')
+        var.setncattr('units', 'Pa')
+        var.setncattr('positive', 'down')
+	var[:] = src.variables['lev']
+
+	ps = f.createVariable('ps', 'd', ('cell'))
+	ps.setncattr("coordinates", "lon lat")
+
+	phis = f.createVariable('phis', 'd', ('cell'))
+	phis.setncattr("coordinates", "lon lat")
+
+        theta_rhodz = f.createVariable('theta_rhodz', 'd', ('lev','cell'))
+	theta_rhodz.setncattr("coordinates", "lev lon lat")
+
+        ulon = f.createVariable('ulon', 'd', ('lev','cell'))
+	ulon.setncattr("coordinates", "lev lon lat")
+
+        ulat = f.createVariable('ulat', 'd', ('lev','cell'))
+	ulat.setncattr("coordinates", "lev lon lat")
+
+        q = f.createVariable('q', 'd', ('nq','lev','cell'))
+	q.setncattr("coordinates", "nq lev lon lat")
+        
+        
+
+#for ps
+if mode == 'remap':
+	src_val_loc = src.variables['ps']
+	src_val_glo = MPI.COMM_WORLD.gather(np.array(src_val_loc[:]))
+
+if rank == 0 and mode == 'remap':
+#        print(src_val_glo)
+      	src_val = np.hstack(src_val_glo)
+#        print src_val
+        print A.shape
+        print src_val.shape
+	dst_val = A*src_val
+	ps[:] = dst_val
+
+#for phis
+if mode == 'remap':
+	src_val_loc = src.variables['phis']
+	src_val_glo = MPI.COMM_WORLD.gather(np.array(src_val_loc[:]))
+
+if rank == 0 and mode == 'remap':
+      	src_val = np.hstack(src_val_glo)
+	dst_val = A*src_val
+	phis[:] = dst_val
+
+
+#for theta_rhodz
+if mode == 'remap':
+	src_val_loc = src.variables['theta_rhodz']
+
+for l in range(0, len(lev)):
+	if mode == 'remap':
+		src_val_glo = MPI.COMM_WORLD.gather(np.array(src_val_loc[l,:]))
+
+	if rank == 0 and mode == 'remap':
+      		src_val = np.hstack(src_val_glo)
+		dst_val = A*src_val
+		theta_rhodz[l,:] = dst_val
+
+#for ulon
+if mode == 'remap':
+	src_val_loc = src.variables['ulon']
+
+for l in range(0, len(lev)):
+	if mode == 'remap':
+		src_val_glo = MPI.COMM_WORLD.gather(np.array(src_val_loc[l,:]))
+
+	if rank == 0 and mode == 'remap':
+      		src_val = np.hstack(src_val_glo)
+		dst_val = A*src_val
+		ulon[l,:] = dst_val
+
+#for ulat
+if mode == 'remap':
+	src_val_loc = src.variables['ulat']
+
+for l in range(0, len(lev)):
+	if mode == 'remap':
+		src_val_glo = MPI.COMM_WORLD.gather(np.array(src_val_loc[l,:]))
+
+	if rank == 0 and mode == 'remap':
+      		src_val = np.hstack(src_val_glo)
+		dst_val = A*src_val
+		ulat[l,:] = dst_val
+
+#for q
+if mode == 'remap':
+	src_val_loc = src.variables['q']
+
+for n in range(0, len(nq)):
+	for l in range(0, len(lev)):
+		if mode == 'remap':
+			src_val_glo = MPI.COMM_WORLD.gather(np.array(src_val_loc[n,l,:]))
+
+		if rank == 0 and mode == 'remap':
+      			src_val = np.hstack(src_val_glo)
+			dst_val = A*src_val
+			q[n,l,:] = dst_val
+
+if mode == 'remap':
+	f.close()
+        
+
+if not "reader" in srctype:
+	src.close()
+if not "reader" in dsttype:
+	dst.close()
+
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/remap/py/remap_orig.py
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/remap/py/remap_orig.py	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/remap/py/remap_orig.py	(revision 1749)
@@ -0,0 +1,319 @@
+import netCDF4 as nc
+import ctypes as ct
+import numpy as np
+import os
+import sys
+import math
+from mpi4py import MPI
+
+import time
+
+remap = ct.cdll.LoadLibrary(os.path.realpath('libmapper.so'))
+
+def from_mpas(filename):
+	# construct vortex bounds from Mpas grid structure
+	f = nc.Dataset(filename)
+	# in this case it is must faster to first read the whole file into memory
+	# before converting the data structure
+	print "read"
+	stime = time.time()
+	lon_vert = np.array(f.variables["lonVertex"])
+	lat_vert = np.array(f.variables["latVertex"])
+	vert_cell = np.array(f.variables["verticesOnCell"])
+	nvert_cell = np.array(f.variables["nEdgesOnCell"])
+	ncell, nvert = vert_cell.shape
+	assert(max(nvert_cell) <= nvert)
+	lon = np.zeros(vert_cell.shape)
+	lat = np.zeros(vert_cell.shape)
+	etime = time.time()
+	print "finished read, now convert", etime-stime
+	scal = 180.0/math.pi
+	for c in range(ncell):
+		lat[c,:] = lat_vert[vert_cell[c,:]-1]*scal
+		lon[c,:] = lon_vert[vert_cell[c,:]-1]*scal
+		# signal "last vertex" by netCDF convetion
+		lon[c,nvert_cell[c]] = lon[c,0]
+		lat[c,nvert_cell[c]] = lat[c,0]
+	print "convert end", time.time() - etime
+	return lon, lat
+
+grid_types = {
+	"dynamico:mesh": {
+		"lon_name": "bounds_lon_i",
+		"lat_name": "bounds_lat_i",
+		"pole": [0,0,0]
+	},
+	"dynamico:vort": {
+		"lon_name": "bounds_lon_v",
+		"lat_name": "bounds_lat_v",
+		"pole": [0,0,0]
+	},
+	"dynamico:restart": {
+		"lon_name": "lon_i_vertices",
+		"lat_name": "lat_i_vertices",
+		"pole": [0,0,0]
+	},
+	"test:polygon": {
+		"lon_name": "bounds_lon",
+		"lat_name": "bounds_lat",
+		"pole": [0,0,0]
+	},
+	"test:latlon": {
+		"lon_name": "bounds_lon",
+		"lat_name": "bounds_lat",
+		"pole": [0,0,1]
+	},
+	"mpas": {
+		"reader": from_mpas,
+		"pole": [0,0,0]
+	}
+}
+
+interp_types = {
+	"FV1": 1,
+	"FV2": 2
+}
+
+usage = """
+Usage: python remap.py interp srctype srcfile dsttype dstfile mode outfile
+
+   interp: type of interpolation
+       choices:
+           FV1: first order conservative Finite Volume
+           FV2: second order conservative Finite Volume
+
+   srctype, dsttype: grid type of source and destination
+       choices: """ + " ".join(grid_types.keys()) + """
+
+   srcfile, dstfile: grid file names, should mostly be netCDF file
+
+   mode: modus of operation 
+       choices:
+           weights: computes weight and stores them in outfile
+           remap:   computes the interpolated values on destination grid and stores them in outfile
+
+   outfile: output filename
+
+"""
+
+# parse command line arguments
+if not len(sys.argv) == 8:
+	print usage
+	sys.exit(2)
+
+interp = sys.argv[1]
+try:
+	srctype = grid_types[sys.argv[2]]
+except KeyError:
+	print "Error: srctype needs to be one of the following: " + " ".join(grid_types.keys()) + "."
+	exit(2)
+srcfile = sys.argv[3]
+try:
+	dsttype = grid_types[sys.argv[4]]
+except KeyError:
+	print "Error: srctype needs to be one of the following: " + " ".join(grid_types.keys()) + "."
+	exit(2)
+dstfile = sys.argv[5]
+mode    = sys.argv[6]
+outfile = sys.argv[7]
+
+if not mode in ("weights", "remap"):
+	print "Error: mode must be of of the following: weights remap."
+	exit(2)
+
+remap.mpi_init()
+rank = remap.mpi_rank()
+size = remap.mpi_size()
+
+print rank, "/", size
+
+print "Reading grids from netCDF files."
+
+if "reader" in srctype:
+	src_lon, src_lat = srctype["reader"](srcfile)
+else:
+	src = nc.Dataset(srcfile)
+	# the following two lines do not perform the actual read
+	# the file is read later when assigning to the ctypes array
+	# -> no unnecessary array copying in memory
+	src_lon = src.variables[srctype["lon_name"]]
+	src_lat = src.variables[srctype["lat_name"]]
+
+if "reader" in dsttype:
+	dst_lon, dst_lat = dsttype["reader"](dstfile)
+else:
+	dst = nc.Dataset(dstfile)
+	dst_lon = dst.variables[dsttype["lon_name"]]
+	dst_lat = dst.variables[dsttype["lat_name"]]
+
+src_ncell, src_nvert = src_lon.shape
+dst_ncell, dst_nvert = dst_lon.shape
+
+def compute_distribution(ncell):
+	"Returns the local number and starting position in global array."
+	if rank < ncell % size:
+		return ncell//size + 1, \
+		       (ncell//size + 1)*rank
+	else:
+		return ncell//size, \
+		       (ncell//size + 1)*(ncell%size) + (ncell//size)*(rank - ncell%size)
+
+src_ncell_loc, src_loc_start = compute_distribution(src_ncell)
+dst_ncell_loc, dst_loc_start = compute_distribution(dst_ncell)
+
+print "src", src_ncell_loc, src_loc_start 
+print "dst", dst_ncell_loc, dst_loc_start 
+
+c_src_lon = (ct.c_double * (src_ncell_loc*src_nvert))()
+c_src_lat = (ct.c_double * (src_ncell_loc*src_nvert))()
+c_dst_lon = (ct.c_double * (dst_ncell_loc*dst_nvert))()
+c_dst_lat = (ct.c_double * (dst_ncell_loc*dst_nvert))()
+
+c_src_lon[:] = nc.numpy.reshape(src_lon[src_loc_start:src_loc_start+src_ncell_loc,:], (len(c_src_lon),1))
+c_src_lat[:] = nc.numpy.reshape(src_lat[src_loc_start:src_loc_start+src_ncell_loc,:], (len(c_src_lon),1))
+c_dst_lon[:] = nc.numpy.reshape(dst_lon[dst_loc_start:dst_loc_start+dst_ncell_loc,:], (len(c_dst_lon),1))
+c_dst_lat[:] = nc.numpy.reshape(dst_lat[dst_loc_start:dst_loc_start+dst_ncell_loc,:], (len(c_dst_lon),1))
+
+
+print "Calling remap library to compute weights."
+srcpole = (ct.c_double * (3))()
+dstpole = (ct.c_double * (3))()
+srcpole[:] = srctype["pole"]
+dstpole[:] = dsttype["pole"]
+
+c_src_ncell = ct.c_int(src_ncell_loc)
+c_src_nvert = ct.c_int(src_nvert)
+c_dst_ncell = ct.c_int(dst_ncell_loc)
+c_dst_nvert = ct.c_int(dst_nvert)
+order = ct.c_int(interp_types[interp])
+
+c_nweight = ct.c_int()
+
+print "src:", src_ncell, src_nvert
+print "dst:", dst_ncell, dst_nvert
+
+remap.remap_get_num_weights(c_src_lon, c_src_lat, c_src_nvert, c_src_ncell, srcpole,
+               c_dst_lon, c_dst_lat, c_dst_nvert, c_dst_ncell, dstpole,
+               order, ct.byref(c_nweight))
+
+nwgt = c_nweight.value
+
+c_weights = (ct.c_double * nwgt)()
+c_dst_idx = (ct.c_int * nwgt)()
+c_src_idx = (ct.c_int * nwgt)()
+
+remap.remap_get_weights(c_weights, c_src_idx, c_dst_idx)
+
+wgt_glo     = MPI.COMM_WORLD.gather(c_weights[:])
+src_idx_glo = MPI.COMM_WORLD.gather(c_src_idx[:])
+dst_idx_glo = MPI.COMM_WORLD.gather(c_dst_idx[:])
+
+
+if rank == 0 and mode == 'weights':
+	nwgt_glo = sum(len(wgt) for wgt in wgt_glo)
+
+	print "Writing", nwgt_glo, "weights to netCDF-file '" + outfile + "'."
+	f = nc.Dataset(outfile,'w')
+	f.createDimension('n_src',    src_ncell)
+	f.createDimension('n_dst',    dst_ncell)
+	f.createDimension('n_weight', nwgt_glo)
+
+	var = f.createVariable('src_idx', 'i', ('n_weight'))
+	var[:] = np.hstack(src_idx_glo) + 1 # make indices start from 1
+	var = f.createVariable('dst_idx', 'i', ('n_weight'))
+	var[:] = np.hstack(dst_idx_glo) + 1 # make indices start from 1
+	var = f.createVariable('weight',  'd', ('n_weight'))
+	var[:] = np.hstack(wgt_glo)
+	f.close()
+
+def test_fun(x, y, z):
+	return (1-x**2)*(1-y**2)*z
+
+def test_fun_ll(lat, lon):
+	#return np.cos(lat*math.pi/180)*np.cos(lon*math.pi/180)
+	return 2.0 + np.cos(lat*math.pi/180.)**2 * np.cos(2*lon*math.pi/180.);
+
+#UNUSED
+#def sphe2cart(lat, lon):
+#	phi   = math.pi/180*lon[:]
+#	theta = math.pi/2 - math.pi/180*lat[:]
+#	return np.sin(theta)*np.cos(phi), np.sin(theta)*np.sin(phi), np.cos(theta)
+
+if mode == 'remap':
+	c_centre_lon = (ct.c_double * src_ncell_loc)()
+	c_centre_lat = (ct.c_double * src_ncell_loc)()
+	c_areas      = (ct.c_double * src_ncell_loc)()
+	remap.remap_get_barycentres_and_areas(c_src_lon, c_src_lat, c_src_nvert, c_src_ncell, srcpole,
+		c_centre_lon, c_centre_lat, c_areas)
+	src_val_loc = test_fun_ll(np.array(c_centre_lat[:]), np.array(c_centre_lon[:]))
+	src_val_glo = MPI.COMM_WORLD.gather(src_val_loc)
+
+	c_centre_lon = (ct.c_double * dst_ncell_loc)()
+	c_centre_lat = (ct.c_double * dst_ncell_loc)()
+	c_areas      = (ct.c_double * dst_ncell_loc)()
+	remap.remap_get_barycentres_and_areas(c_dst_lon, c_dst_lat, c_dst_nvert, c_dst_ncell, dstpole,
+		c_centre_lon, c_centre_lat, c_areas)
+	dst_val_loc = test_fun_ll(np.array(c_centre_lat[:]), np.array(c_centre_lon[:]))
+
+	dst_val_glo = MPI.COMM_WORLD.gather(dst_val_loc)
+	dst_areas_glo = MPI.COMM_WORLD.gather(np.array(c_areas[:]))
+	dst_centre_lon_glo = MPI.COMM_WORLD.gather(np.array(c_centre_lon[:]))
+	dst_centre_lat_glo = MPI.COMM_WORLD.gather(np.array(c_centre_lat[:]))
+
+
+if rank == 0 and mode == 'remap':
+	from scipy import sparse
+	A = sparse.csr_matrix(sparse.coo_matrix((np.hstack(wgt_glo),(np.hstack(dst_idx_glo),np.hstack(src_idx_glo)))))
+
+	src_val = np.hstack(src_val_glo)
+	dst_ref = np.hstack(dst_val_glo)
+	dst_areas = np.hstack(dst_areas_glo)
+	dst_centre_lon = np.hstack(dst_centre_lon_glo)
+	dst_centre_lat = np.hstack(dst_centre_lat_glo)
+
+	print "source:", src_val.shape
+	print "destin:", dst_ref.shape
+	dst_val = A*src_val
+	err = dst_val - dst_ref
+	print "absolute maximum error, maximum value:", np.max(np.abs(err)), np.max(np.abs(dst_ref))
+	print "relative maximum error, normalized L2 error, average target cell size (edgelength of same-area square):"
+	print np.max(np.abs(err))/np.max(np.abs(dst_ref)), np.linalg.norm(err)/np.linalg.norm(dst_ref), np.mean(np.sqrt(dst_areas))
+
+	f = nc.Dataset(outfile,'w')
+	f.createDimension('n_vert', dst_nvert)
+	f.createDimension('n_cell', dst_ncell)
+
+	var = f.createVariable('lat', 'd', ('n_cell'))
+	var.setncattr("long_name", "latitude")
+	var.setncattr("units", "degrees_north")
+	var.setncattr("bounds", "bounds_lat")
+	var[:] = dst_centre_lat
+	var = f.createVariable('lon', 'd', ('n_cell'))
+	var.setncattr("long_name", "longitude")
+	var.setncattr("units", "degrees_east")
+	var.setncattr("bounds", "bounds_lon")
+	var[:] = dst_centre_lon
+
+	var = f.createVariable('bounds_lon', 'd', ('n_cell','n_vert'))
+	var[:] = dst_lon
+	var = f.createVariable('bounds_lat', 'd', ('n_cell','n_vert'))
+	var[:] = dst_lat
+	var = f.createVariable('val', 'd', ('n_cell'))
+	var.setncattr("coordinates", "lon lat")
+	var[:] = dst_val
+	var = f.createVariable('val_ref', 'd', ('n_cell'))
+	var.setncattr("coordinates", "lon lat")
+	var[:] = dst_ref
+	var = f.createVariable('err', 'd', ('n_cell'))
+	var.setncattr("coordinates", "lon lat")
+	var[:] = err
+	var = f.createVariable('area', 'd', ('n_cell'))
+	var.setncattr("coordinates", "lon lat")
+	var[:] = dst_areas[:] # dest
+	f.close()
+
+if not "reader" in srctype:
+	src.close()
+if not "reader" in dsttype:
+	dst.close()
+
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/remap/src/circle.cpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/remap/src/circle.cpp	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/remap/src/circle.cpp	(revision 1749)
@@ -0,0 +1,42 @@
+#include <algorithm>
+#include "node.hpp"
+#include "elt.hpp"
+
+#include "circle.hpp"
+
+namespace sphereRemap
+{
+
+  /* computes the radius of the smallest circle
+     around the barycentre `x` of grid element `elt`
+     which contains all vertices of `elt`. */
+  double cptRadius(Elt elt)
+  {
+  	double squareradius = 0.0;
+  	int argmax = 0;
+  	// use cheep `squaredist` to find farthest vertex and compute radius as arcdistance only once
+  	for (int i = 0; i < elt.n; i++)
+  	{
+  		double dist2 = squaredist(elt.x, elt.vertex[i]);
+  		if (dist2 > squareradius)
+  		{
+  			squareradius = dist2;
+  			argmax = i;
+  		}
+  	}
+  	return arcdist(elt.x, elt.vertex[argmax]) + 1e-10;
+  }
+
+  void setCircleAndLink(Elt& elt, Node& leaf)
+  {
+  	leaf.centre = elt.x;
+  	leaf.radius = cptRadius(elt);
+  	leaf.data = &elt;
+  }
+  
+  void setCirclesAndLinks(Elt *elts, vector<Node>& nodes)
+  {
+  	for (int i = 0; i < nodes.size(); i++)
+	  	setCircleAndLink(elts[i], nodes[i]);
+  }
+}
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/remap/src/circle.hpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/remap/src/circle.hpp	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/remap/src/circle.hpp	(revision 1749)
@@ -0,0 +1,20 @@
+#ifndef __CIRCLE_HPP__
+#define __CIRCLE_HPP__
+#include "elt.hpp"
+#include "node.hpp"
+
+namespace sphereRemap {
+  
+double cptRadius(Elt elt);
+
+void setCircleAndLink(Elt& elt, Node& leaf);
+
+/* For arrays of grid elements `elt` and SS-tree nodes `leaf`,
+   both of length `NE`, initialize each node with radius of encompassing circle and barycentre
+   of the corresponding grid element.
+   At this point the node is a leaf and contains only one element.
+*/
+void setCirclesAndLinks(Elt *elts, vector<Node>& leaf);
+
+}
+#endif
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/remap/src/clipper.cpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/remap/src/clipper.cpp	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/remap/src/clipper.cpp	(revision 1749)
@@ -0,0 +1,4572 @@
+/*******************************************************************************
+*                                                                              *
+* Author    :  Angus Johnson                                                   *
+* Version   :  6.2.9                                                           *
+* Date      :  16 February 2015                                                *
+* Website   :  http://www.angusj.com                                           *
+* Copyright :  Angus Johnson 2010-2015                                         *
+*                                                                              *
+* License:                                                                     *
+* Use, modification & distribution is subject to Boost Software License Ver 1. *
+* http://www.boost.org/LICENSE_1_0.txt                                         *
+*                                                                              *
+* Attributions:                                                                *
+* The code in this library is an extension of Bala Vatti's clipping algorithm: *
+* "A generic solution to polygon clipping"                                     *
+* Communications of the ACM, Vol 35, Issue 7 (July 1992) pp 56-63.             *
+* http://portal.acm.org/citation.cfm?id=129906                                 *
+*                                                                              *
+* Computer graphics and geometric modeling: implementation and algorithms      *
+* By Max K. Agoston                                                            *
+* Springer; 1 edition (January 4, 2005)                                        *
+* http://books.google.com/books?q=vatti+clipping+agoston                       *
+*                                                                              *
+* See also:                                                                    *
+* "Polygon Offsetting by Computing Winding Numbers"                            *
+* Paper no. DETC2005-85513 pp. 565-575                                         *
+* ASME 2005 International Design Engineering Technical Conferences             *
+* and Computers and Information in Engineering Conference (IDETC/CIE2005)      *
+* September 24-28, 2005 , Long Beach, California, USA                          *
+* http://www.me.berkeley.edu/~mcmains/pubs/DAC05OffsetPolygon.pdf              *
+*                                                                              *
+*******************************************************************************/
+
+/*******************************************************************************
+*                                                                              *
+* This is a translation of the Delphi Clipper library and the naming style     *
+* used has retained a Delphi flavour.                                          *
+*                                                                              *
+*******************************************************************************/
+
+#include "clipper.hpp"
+#include <cmath>
+#include <vector>
+#include <algorithm>
+#include <stdexcept>
+#include <cstring>
+#include <cstdlib>
+#include <ostream>
+#include <functional>
+
+namespace ClipperLib {
+
+static double const pi = 3.141592653589793238;
+static double const two_pi = pi *2;
+static double const def_arc_tolerance = 0.25;
+
+enum Direction { dRightToLeft, dLeftToRight };
+
+static int const Unassigned = -1;  //edge not currently 'owning' a solution
+static int const Skip = -2;        //edge that would otherwise close a path
+
+#define HORIZONTAL (-1.0E+40)
+#define TOLERANCE (1.0e-20)
+#define NEAR_ZERO(val) (((val) > -TOLERANCE) && ((val) < TOLERANCE))
+
+struct TEdge {
+  IntPoint Bot;
+  IntPoint Curr;
+  IntPoint Top;
+  IntPoint Delta;
+  double Dx;
+  PolyType PolyTyp;
+  EdgeSide Side;
+  int WindDelta; //1 or -1 depending on winding direction
+  int WindCnt;
+  int WindCnt2; //winding count of the opposite polytype
+  int OutIdx;
+  TEdge *Next;
+  TEdge *Prev;
+  TEdge *NextInLML;
+  TEdge *NextInAEL;
+  TEdge *PrevInAEL;
+  TEdge *NextInSEL;
+  TEdge *PrevInSEL;
+};
+
+struct IntersectNode {
+  TEdge          *Edge1;
+  TEdge          *Edge2;
+  IntPoint        Pt;
+};
+
+struct LocalMinimum {
+  cInt          Y;
+  TEdge        *LeftBound;
+  TEdge        *RightBound;
+};
+
+struct OutPt;
+
+struct OutRec {
+  int       Idx;
+  bool      IsHole;
+  bool      IsOpen;
+  OutRec   *FirstLeft;  //see comments in clipper.pas
+  PolyNode *PolyNd;
+  OutPt    *Pts;
+  OutPt    *BottomPt;
+};
+
+struct OutPt {
+  int       Idx;
+  IntPoint  Pt;
+  OutPt    *Next;
+  OutPt    *Prev;
+};
+
+struct Join {
+  OutPt    *OutPt1;
+  OutPt    *OutPt2;
+  IntPoint  OffPt;
+};
+
+struct LocMinSorter
+{
+  inline bool operator()(const LocalMinimum& locMin1, const LocalMinimum& locMin2)
+  {
+    return locMin2.Y < locMin1.Y;
+  }
+};
+
+//------------------------------------------------------------------------------
+//------------------------------------------------------------------------------
+
+inline cInt Round(double val)
+{
+  if ((val < 0)) return static_cast<cInt>(val - 0.5); 
+  else return static_cast<cInt>(val + 0.5);
+}
+//------------------------------------------------------------------------------
+
+inline cInt Abs(cInt val)
+{
+  return val < 0 ? -val : val;
+}
+
+//------------------------------------------------------------------------------
+// PolyTree methods ...
+//------------------------------------------------------------------------------
+
+void PolyTree::Clear()
+{
+    for (PolyNodes::size_type i = 0; i < AllNodes.size(); ++i)
+      delete AllNodes[i];
+    AllNodes.resize(0); 
+    Childs.resize(0);
+}
+//------------------------------------------------------------------------------
+
+PolyNode* PolyTree::GetFirst() const
+{
+  if (!Childs.empty())
+      return Childs[0];
+  else
+      return 0;
+}
+//------------------------------------------------------------------------------
+
+int PolyTree::Total() const
+{
+  int result = (int)AllNodes.size();
+  //with negative offsets, ignore the hidden outer polygon ...
+  if (result > 0 && Childs[0] != AllNodes[0]) result--;
+  return result;
+}
+
+//------------------------------------------------------------------------------
+// PolyNode methods ...
+//------------------------------------------------------------------------------
+
+PolyNode::PolyNode(): Childs(), Parent(0), Index(0), m_IsOpen(false)
+{
+}
+//------------------------------------------------------------------------------
+
+int PolyNode::ChildCount() const
+{
+  return (int)Childs.size();
+}
+//------------------------------------------------------------------------------
+
+void PolyNode::AddChild(PolyNode& child)
+{
+  unsigned cnt = (unsigned)Childs.size();
+  Childs.push_back(&child);
+  child.Parent = this;
+  child.Index = cnt;
+}
+//------------------------------------------------------------------------------
+
+PolyNode* PolyNode::GetNext() const
+{ 
+  if (!Childs.empty()) 
+      return Childs[0]; 
+  else
+      return GetNextSiblingUp();    
+}  
+//------------------------------------------------------------------------------
+
+PolyNode* PolyNode::GetNextSiblingUp() const
+{ 
+  if (!Parent) //protects against PolyTree.GetNextSiblingUp()
+      return 0;
+  else if (Index == Parent->Childs.size() - 1)
+      return Parent->GetNextSiblingUp();
+  else
+      return Parent->Childs[Index + 1];
+}  
+//------------------------------------------------------------------------------
+
+bool PolyNode::IsHole() const
+{ 
+  bool result = true;
+  PolyNode* node = Parent;
+  while (node)
+  {
+      result = !result;
+      node = node->Parent;
+  }
+  return result;
+}  
+//------------------------------------------------------------------------------
+
+bool PolyNode::IsOpen() const
+{ 
+  return m_IsOpen;
+}  
+//------------------------------------------------------------------------------
+
+#ifndef use_int32
+
+//------------------------------------------------------------------------------
+// Int128 class (enables safe math on signed 64bit integers)
+// eg Int128 val1((long64)9223372036854775807); //ie 2^63 -1
+//    Int128 val2((long64)9223372036854775807);
+//    Int128 val3 = val1 * val2;
+//    val3.AsString => "85070591730234615847396907784232501249" (8.5e+37)
+//------------------------------------------------------------------------------
+
+class Int128
+{
+  public:
+    ulong64 lo;
+    long64 hi;
+
+    Int128(long64 _lo = 0)
+    {
+      lo = (ulong64)_lo;   
+      if (_lo < 0)  hi = -1; else hi = 0; 
+    }
+
+
+    Int128(const Int128 &val): lo(val.lo), hi(val.hi){}
+
+    Int128(const long64& _hi, const ulong64& _lo): lo(_lo), hi(_hi){}
+    
+    Int128& operator = (const long64 &val)
+    {
+      lo = (ulong64)val;
+      if (val < 0) hi = -1; else hi = 0;
+      return *this;
+    }
+
+    bool operator == (const Int128 &val) const
+      {return (hi == val.hi && lo == val.lo);}
+
+    bool operator != (const Int128 &val) const
+      { return !(*this == val);}
+
+    bool operator > (const Int128 &val) const
+    {
+      if (hi != val.hi)
+        return hi > val.hi;
+      else
+        return lo > val.lo;
+    }
+
+    bool operator < (const Int128 &val) const
+    {
+      if (hi != val.hi)
+        return hi < val.hi;
+      else
+        return lo < val.lo;
+    }
+
+    bool operator >= (const Int128 &val) const
+      { return !(*this < val);}
+
+    bool operator <= (const Int128 &val) const
+      { return !(*this > val);}
+
+    Int128& operator += (const Int128 &rhs)
+    {
+      hi += rhs.hi;
+      lo += rhs.lo;
+      if (lo < rhs.lo) hi++;
+      return *this;
+    }
+
+    Int128 operator + (const Int128 &rhs) const
+    {
+      Int128 result(*this);
+      result+= rhs;
+      return result;
+    }
+
+    Int128& operator -= (const Int128 &rhs)
+    {
+      *this += -rhs;
+      return *this;
+    }
+
+    Int128 operator - (const Int128 &rhs) const
+    {
+      Int128 result(*this);
+      result -= rhs;
+      return result;
+    }
+
+    Int128 operator-() const //unary negation
+    {
+      if (lo == 0)
+        return Int128(-hi, 0);
+      else
+        return Int128(~hi, ~lo + 1);
+    }
+
+    operator double() const
+    {
+      const double shift64 = 18446744073709551616.0; //2^64
+      if (hi < 0)
+      {
+        if (lo == 0) return (double)hi * shift64;
+        else return -(double)(~lo + ~hi * shift64);
+      }
+      else
+        return (double)(lo + hi * shift64);
+    }
+
+};
+//------------------------------------------------------------------------------
+
+Int128 Int128Mul (long64 lhs, long64 rhs)
+{
+  bool negate = (lhs < 0) != (rhs < 0);
+
+  if (lhs < 0) lhs = -lhs;
+  ulong64 int1Hi = ulong64(lhs) >> 32;
+  ulong64 int1Lo = ulong64(lhs & 0xFFFFFFFF);
+
+  if (rhs < 0) rhs = -rhs;
+  ulong64 int2Hi = ulong64(rhs) >> 32;
+  ulong64 int2Lo = ulong64(rhs & 0xFFFFFFFF);
+
+  //nb: see comments in clipper.pas
+  ulong64 a = int1Hi * int2Hi;
+  ulong64 b = int1Lo * int2Lo;
+  ulong64 c = int1Hi * int2Lo + int1Lo * int2Hi;
+
+  Int128 tmp;
+  tmp.hi = long64(a + (c >> 32));
+  tmp.lo = long64(c << 32);
+  tmp.lo += long64(b);
+  if (tmp.lo < b) tmp.hi++;
+  if (negate) tmp = -tmp;
+  return tmp;
+};
+#endif
+
+//------------------------------------------------------------------------------
+// Miscellaneous global functions
+//------------------------------------------------------------------------------
+
+bool Orientation(const Path &poly)
+{
+    return Area(poly) >= 0;
+}
+//------------------------------------------------------------------------------
+
+double Area(const Path &poly)
+{
+  int size = (int)poly.size();
+  if (size < 3) return 0;
+
+  double a = 0;
+  for (int i = 0, j = size -1; i < size; ++i)
+  {
+    a += ((double)poly[j].X + poly[i].X) * ((double)poly[j].Y - poly[i].Y);
+    j = i;
+  }
+  return -a * 0.5;
+}
+//------------------------------------------------------------------------------
+
+double Area(const OutRec &outRec)
+{
+  OutPt *op = outRec.Pts;
+  if (!op) return 0;
+  double a = 0;
+  do {
+    a +=  (double)(op->Prev->Pt.X + op->Pt.X) * (double)(op->Prev->Pt.Y - op->Pt.Y);
+    op = op->Next;
+  } while (op != outRec.Pts);
+  return a * 0.5;
+}
+//------------------------------------------------------------------------------
+
+bool PointIsVertex(const IntPoint &Pt, OutPt *pp)
+{
+  OutPt *pp2 = pp;
+  do
+  {
+    if (pp2->Pt == Pt) return true;
+    pp2 = pp2->Next;
+  }
+  while (pp2 != pp);
+  return false;
+}
+//------------------------------------------------------------------------------
+
+//See "The Point in Polygon Problem for Arbitrary Polygons" by Hormann & Agathos
+//http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.88.5498&rep=rep1&type=pdf
+int PointInPolygon(const IntPoint &pt, const Path &path)
+{
+  //returns 0 if false, +1 if true, -1 if pt ON polygon boundary
+  int result = 0;
+  size_t cnt = path.size();
+  if (cnt < 3) return 0;
+  IntPoint ip = path[0];
+  for(size_t i = 1; i <= cnt; ++i)
+  {
+    IntPoint ipNext = (i == cnt ? path[0] : path[i]);
+    if (ipNext.Y == pt.Y)
+    {
+        if ((ipNext.X == pt.X) || (ip.Y == pt.Y && 
+          ((ipNext.X > pt.X) == (ip.X < pt.X)))) return -1;
+    }
+    if ((ip.Y < pt.Y) != (ipNext.Y < pt.Y))
+    {
+      if (ip.X >= pt.X)
+      {
+        if (ipNext.X > pt.X) result = 1 - result;
+        else
+        {
+          double d = (double)(ip.X - pt.X) * (ipNext.Y - pt.Y) - 
+            (double)(ipNext.X - pt.X) * (ip.Y - pt.Y);
+          if (!d) return -1;
+          if ((d > 0) == (ipNext.Y > ip.Y)) result = 1 - result;
+        }
+      } else
+      {
+        if (ipNext.X > pt.X)
+        {
+          double d = (double)(ip.X - pt.X) * (ipNext.Y - pt.Y) - 
+            (double)(ipNext.X - pt.X) * (ip.Y - pt.Y);
+          if (!d) return -1;
+          if ((d > 0) == (ipNext.Y > ip.Y)) result = 1 - result;
+        }
+      }
+    }
+    ip = ipNext;
+  } 
+  return result;
+}
+//------------------------------------------------------------------------------
+
+int PointInPolygon (const IntPoint &pt, OutPt *op)
+{
+  //returns 0 if false, +1 if true, -1 if pt ON polygon boundary
+  int result = 0;
+  OutPt* startOp = op;
+  for(;;)
+  {
+    if (op->Next->Pt.Y == pt.Y)
+    {
+        if ((op->Next->Pt.X == pt.X) || (op->Pt.Y == pt.Y && 
+          ((op->Next->Pt.X > pt.X) == (op->Pt.X < pt.X)))) return -1;
+    }
+    if ((op->Pt.Y < pt.Y) != (op->Next->Pt.Y < pt.Y))
+    {
+      if (op->Pt.X >= pt.X)
+      {
+        if (op->Next->Pt.X > pt.X) result = 1 - result;
+        else
+        {
+          double d = (double)(op->Pt.X - pt.X) * (op->Next->Pt.Y - pt.Y) - 
+            (double)(op->Next->Pt.X - pt.X) * (op->Pt.Y - pt.Y);
+          if (!d) return -1;
+          if ((d > 0) == (op->Next->Pt.Y > op->Pt.Y)) result = 1 - result;
+        }
+      } else
+      {
+        if (op->Next->Pt.X > pt.X)
+        {
+          double d = (double)(op->Pt.X - pt.X) * (op->Next->Pt.Y - pt.Y) - 
+            (double)(op->Next->Pt.X - pt.X) * (op->Pt.Y - pt.Y);
+          if (!d) return -1;
+          if ((d > 0) == (op->Next->Pt.Y > op->Pt.Y)) result = 1 - result;
+        }
+      }
+    } 
+    op = op->Next;
+    if (startOp == op) break;
+  } 
+  return result;
+}
+//------------------------------------------------------------------------------
+
+bool Poly2ContainsPoly1(OutPt *OutPt1, OutPt *OutPt2)
+{
+  OutPt* op = OutPt1;
+  do
+  {
+    //nb: PointInPolygon returns 0 if false, +1 if true, -1 if pt on polygon
+    int res = PointInPolygon(op->Pt, OutPt2);
+    if (res >= 0) return res > 0;
+    op = op->Next; 
+  }
+  while (op != OutPt1);
+  return true; 
+}
+//----------------------------------------------------------------------
+
+bool SlopesEqual(const TEdge &e1, const TEdge &e2, bool UseFullInt64Range)
+{
+#ifndef use_int32
+  if (UseFullInt64Range)
+    return Int128Mul(e1.Delta.Y, e2.Delta.X) == Int128Mul(e1.Delta.X, e2.Delta.Y);
+  else 
+#endif
+    return e1.Delta.Y * e2.Delta.X == e1.Delta.X * e2.Delta.Y;
+}
+//------------------------------------------------------------------------------
+
+bool SlopesEqual(const IntPoint pt1, const IntPoint pt2,
+  const IntPoint pt3, bool UseFullInt64Range)
+{
+#ifndef use_int32
+  if (UseFullInt64Range)
+    return Int128Mul(pt1.Y-pt2.Y, pt2.X-pt3.X) == Int128Mul(pt1.X-pt2.X, pt2.Y-pt3.Y);
+  else 
+#endif
+    return (pt1.Y-pt2.Y)*(pt2.X-pt3.X) == (pt1.X-pt2.X)*(pt2.Y-pt3.Y);
+}
+//------------------------------------------------------------------------------
+
+bool SlopesEqual(const IntPoint pt1, const IntPoint pt2,
+  const IntPoint pt3, const IntPoint pt4, bool UseFullInt64Range)
+{
+#ifndef use_int32
+  if (UseFullInt64Range)
+    return Int128Mul(pt1.Y-pt2.Y, pt3.X-pt4.X) == Int128Mul(pt1.X-pt2.X, pt3.Y-pt4.Y);
+  else 
+#endif
+    return (pt1.Y-pt2.Y)*(pt3.X-pt4.X) == (pt1.X-pt2.X)*(pt3.Y-pt4.Y);
+}
+//------------------------------------------------------------------------------
+
+inline bool IsHorizontal(TEdge &e)
+{
+  return e.Delta.Y == 0;
+}
+//------------------------------------------------------------------------------
+
+inline double GetDx(const IntPoint pt1, const IntPoint pt2)
+{
+  return (pt1.Y == pt2.Y) ?
+    HORIZONTAL : (double)(pt2.X - pt1.X) / (pt2.Y - pt1.Y);
+}
+//---------------------------------------------------------------------------
+
+inline void SetDx(TEdge &e)
+{
+  e.Delta.X = (e.Top.X - e.Bot.X);
+  e.Delta.Y = (e.Top.Y - e.Bot.Y);
+
+  if (e.Delta.Y == 0) e.Dx = HORIZONTAL;
+  else e.Dx = (double)(e.Delta.X) / e.Delta.Y;
+}
+//---------------------------------------------------------------------------
+
+inline void SwapSides(TEdge &Edge1, TEdge &Edge2)
+{
+  EdgeSide Side =  Edge1.Side;
+  Edge1.Side = Edge2.Side;
+  Edge2.Side = Side;
+}
+//------------------------------------------------------------------------------
+
+inline void SwapPolyIndexes(TEdge &Edge1, TEdge &Edge2)
+{
+  int OutIdx =  Edge1.OutIdx;
+  Edge1.OutIdx = Edge2.OutIdx;
+  Edge2.OutIdx = OutIdx;
+}
+//------------------------------------------------------------------------------
+
+inline cInt TopX(TEdge &edge, const cInt currentY)
+{
+  return ( currentY == edge.Top.Y ) ?
+    edge.Top.X : edge.Bot.X + Round(edge.Dx *(currentY - edge.Bot.Y));
+}
+//------------------------------------------------------------------------------
+
+void IntersectPoint(TEdge &Edge1, TEdge &Edge2, IntPoint &ip)
+{
+#ifdef use_xyz  
+  ip.Z = 0;
+#endif
+
+  double b1, b2;
+  if (Edge1.Dx == Edge2.Dx)
+  {
+    ip.Y = Edge1.Curr.Y;
+    ip.X = TopX(Edge1, ip.Y);
+    return;
+  }
+  else if (Edge1.Delta.X == 0)
+  {
+    ip.X = Edge1.Bot.X;
+    if (IsHorizontal(Edge2))
+      ip.Y = Edge2.Bot.Y;
+    else
+    {
+      b2 = Edge2.Bot.Y - (Edge2.Bot.X / Edge2.Dx);
+      ip.Y = Round(ip.X / Edge2.Dx + b2);
+    }
+  }
+  else if (Edge2.Delta.X == 0)
+  {
+    ip.X = Edge2.Bot.X;
+    if (IsHorizontal(Edge1))
+      ip.Y = Edge1.Bot.Y;
+    else
+    {
+      b1 = Edge1.Bot.Y - (Edge1.Bot.X / Edge1.Dx);
+      ip.Y = Round(ip.X / Edge1.Dx + b1);
+    }
+  } 
+  else 
+  {
+    b1 = Edge1.Bot.X - Edge1.Bot.Y * Edge1.Dx;
+    b2 = Edge2.Bot.X - Edge2.Bot.Y * Edge2.Dx;
+    double q = (b2-b1) / (Edge1.Dx - Edge2.Dx);
+    ip.Y = Round(q);
+    if (std::fabs(Edge1.Dx) < std::fabs(Edge2.Dx))
+      ip.X = Round(Edge1.Dx * q + b1);
+    else 
+      ip.X = Round(Edge2.Dx * q + b2);
+  }
+
+  if (ip.Y < Edge1.Top.Y || ip.Y < Edge2.Top.Y) 
+  {
+    if (Edge1.Top.Y > Edge2.Top.Y)
+      ip.Y = Edge1.Top.Y;
+    else
+      ip.Y = Edge2.Top.Y;
+    if (std::fabs(Edge1.Dx) < std::fabs(Edge2.Dx))
+      ip.X = TopX(Edge1, ip.Y);
+    else
+      ip.X = TopX(Edge2, ip.Y);
+  } 
+  //finally, don't allow 'ip' to be BELOW curr.Y (ie bottom of scanbeam) ...
+  if (ip.Y > Edge1.Curr.Y)
+  {
+    ip.Y = Edge1.Curr.Y;
+    //use the more vertical edge to derive X ...
+    if (std::fabs(Edge1.Dx) > std::fabs(Edge2.Dx))
+      ip.X = TopX(Edge2, ip.Y); else
+      ip.X = TopX(Edge1, ip.Y);
+  }
+}
+//------------------------------------------------------------------------------
+
+void ReversePolyPtLinks(OutPt *pp)
+{
+  if (!pp) return;
+  OutPt *pp1, *pp2;
+  pp1 = pp;
+  do {
+  pp2 = pp1->Next;
+  pp1->Next = pp1->Prev;
+  pp1->Prev = pp2;
+  pp1 = pp2;
+  } while( pp1 != pp );
+}
+//------------------------------------------------------------------------------
+
+void DisposeOutPts(OutPt*& pp)
+{
+  if (pp == 0) return;
+    pp->Prev->Next = 0;
+  while( pp )
+  {
+    OutPt *tmpPp = pp;
+    pp = pp->Next;
+    delete tmpPp;
+  }
+}
+//------------------------------------------------------------------------------
+
+inline void InitEdge(TEdge* e, TEdge* eNext, TEdge* ePrev, const IntPoint& Pt)
+{
+  std::memset(e, 0, sizeof(TEdge));
+  e->Next = eNext;
+  e->Prev = ePrev;
+  e->Curr = Pt;
+  e->OutIdx = Unassigned;
+}
+//------------------------------------------------------------------------------
+
+void InitEdge2(TEdge& e, PolyType Pt)
+{
+  if (e.Curr.Y >= e.Next->Curr.Y)
+  {
+    e.Bot = e.Curr;
+    e.Top = e.Next->Curr;
+  } else
+  {
+    e.Top = e.Curr;
+    e.Bot = e.Next->Curr;
+  }
+  SetDx(e);
+  e.PolyTyp = Pt;
+}
+//------------------------------------------------------------------------------
+
+TEdge* RemoveEdge(TEdge* e)
+{
+  //removes e from double_linked_list (but without removing from memory)
+  e->Prev->Next = e->Next;
+  e->Next->Prev = e->Prev;
+  TEdge* result = e->Next;
+  e->Prev = 0; //flag as removed (see ClipperBase.Clear)
+  return result;
+}
+//------------------------------------------------------------------------------
+
+inline void ReverseHorizontal(TEdge &e)
+{
+  //swap horizontal edges' Top and Bottom x's so they follow the natural
+  //progression of the bounds - ie so their xbots will align with the
+  //adjoining lower edge. [Helpful in the ProcessHorizontal() method.]
+  std::swap(e.Top.X, e.Bot.X);
+#ifdef use_xyz  
+  std::swap(e.Top.Z, e.Bot.Z);
+#endif
+}
+//------------------------------------------------------------------------------
+
+void SwapPoints(IntPoint &pt1, IntPoint &pt2)
+{
+  IntPoint tmp = pt1;
+  pt1 = pt2;
+  pt2 = tmp;
+}
+//------------------------------------------------------------------------------
+
+bool GetOverlapSegment(IntPoint pt1a, IntPoint pt1b, IntPoint pt2a,
+  IntPoint pt2b, IntPoint &pt1, IntPoint &pt2)
+{
+  //precondition: segments are Collinear.
+  if (Abs(pt1a.X - pt1b.X) > Abs(pt1a.Y - pt1b.Y))
+  {
+    if (pt1a.X > pt1b.X) SwapPoints(pt1a, pt1b);
+    if (pt2a.X > pt2b.X) SwapPoints(pt2a, pt2b);
+    if (pt1a.X > pt2a.X) pt1 = pt1a; else pt1 = pt2a;
+    if (pt1b.X < pt2b.X) pt2 = pt1b; else pt2 = pt2b;
+    return pt1.X < pt2.X;
+  } else
+  {
+    if (pt1a.Y < pt1b.Y) SwapPoints(pt1a, pt1b);
+    if (pt2a.Y < pt2b.Y) SwapPoints(pt2a, pt2b);
+    if (pt1a.Y < pt2a.Y) pt1 = pt1a; else pt1 = pt2a;
+    if (pt1b.Y > pt2b.Y) pt2 = pt1b; else pt2 = pt2b;
+    return pt1.Y > pt2.Y;
+  }
+}
+//------------------------------------------------------------------------------
+
+bool FirstIsBottomPt(const OutPt* btmPt1, const OutPt* btmPt2)
+{
+  OutPt *p = btmPt1->Prev;
+  while ((p->Pt == btmPt1->Pt) && (p != btmPt1)) p = p->Prev;
+  double dx1p = std::fabs(GetDx(btmPt1->Pt, p->Pt));
+  p = btmPt1->Next;
+  while ((p->Pt == btmPt1->Pt) && (p != btmPt1)) p = p->Next;
+  double dx1n = std::fabs(GetDx(btmPt1->Pt, p->Pt));
+
+  p = btmPt2->Prev;
+  while ((p->Pt == btmPt2->Pt) && (p != btmPt2)) p = p->Prev;
+  double dx2p = std::fabs(GetDx(btmPt2->Pt, p->Pt));
+  p = btmPt2->Next;
+  while ((p->Pt == btmPt2->Pt) && (p != btmPt2)) p = p->Next;
+  double dx2n = std::fabs(GetDx(btmPt2->Pt, p->Pt));
+  return (dx1p >= dx2p && dx1p >= dx2n) || (dx1n >= dx2p && dx1n >= dx2n);
+}
+//------------------------------------------------------------------------------
+
+OutPt* GetBottomPt(OutPt *pp)
+{
+  OutPt* dups = 0;
+  OutPt* p = pp->Next;
+  while (p != pp)
+  {
+    if (p->Pt.Y > pp->Pt.Y)
+    {
+      pp = p;
+      dups = 0;
+    }
+    else if (p->Pt.Y == pp->Pt.Y && p->Pt.X <= pp->Pt.X)
+    {
+      if (p->Pt.X < pp->Pt.X)
+      {
+        dups = 0;
+        pp = p;
+      } else
+      {
+        if (p->Next != pp && p->Prev != pp) dups = p;
+      }
+    }
+    p = p->Next;
+  }
+  if (dups)
+  {
+    //there appears to be at least 2 vertices at BottomPt so ...
+    while (dups != p)
+    {
+      if (!FirstIsBottomPt(p, dups)) pp = dups;
+      dups = dups->Next;
+      while (dups->Pt != pp->Pt) dups = dups->Next;
+    }
+  }
+  return pp;
+}
+//------------------------------------------------------------------------------
+
+bool Pt2IsBetweenPt1AndPt3(const IntPoint pt1,
+  const IntPoint pt2, const IntPoint pt3)
+{
+  if ((pt1 == pt3) || (pt1 == pt2) || (pt3 == pt2))
+    return false;
+  else if (pt1.X != pt3.X)
+    return (pt2.X > pt1.X) == (pt2.X < pt3.X);
+  else
+    return (pt2.Y > pt1.Y) == (pt2.Y < pt3.Y);
+}
+//------------------------------------------------------------------------------
+
+bool HorzSegmentsOverlap(cInt seg1a, cInt seg1b, cInt seg2a, cInt seg2b)
+{
+  if (seg1a > seg1b) std::swap(seg1a, seg1b);
+  if (seg2a > seg2b) std::swap(seg2a, seg2b);
+  return (seg1a < seg2b) && (seg2a < seg1b);
+}
+
+//------------------------------------------------------------------------------
+// ClipperBase class methods ...
+//------------------------------------------------------------------------------
+
+ClipperBase::ClipperBase() //constructor
+{
+  m_CurrentLM = m_MinimaList.begin(); //begin() == end() here
+  m_UseFullRange = false;
+}
+//------------------------------------------------------------------------------
+
+ClipperBase::~ClipperBase() //destructor
+{
+  Clear();
+}
+//------------------------------------------------------------------------------
+
+void RangeTest(const IntPoint& Pt, bool& useFullRange)
+{
+  if (useFullRange)
+  {
+    if (Pt.X > hiRange || Pt.Y > hiRange || -Pt.X > hiRange || -Pt.Y > hiRange) 
+      throw "Coordinate outside allowed range";
+  }
+  else if (Pt.X > loRange|| Pt.Y > loRange || -Pt.X > loRange || -Pt.Y > loRange) 
+  {
+    useFullRange = true;
+    RangeTest(Pt, useFullRange);
+  }
+}
+//------------------------------------------------------------------------------
+
+TEdge* FindNextLocMin(TEdge* E)
+{
+  for (;;)
+  {
+    while (E->Bot != E->Prev->Bot || E->Curr == E->Top) E = E->Next;
+    if (!IsHorizontal(*E) && !IsHorizontal(*E->Prev)) break;
+    while (IsHorizontal(*E->Prev)) E = E->Prev;
+    TEdge* E2 = E;
+    while (IsHorizontal(*E)) E = E->Next;
+    if (E->Top.Y == E->Prev->Bot.Y) continue; //ie just an intermediate horz.
+    if (E2->Prev->Bot.X < E->Bot.X) E = E2;
+    break;
+  }
+  return E;
+}
+//------------------------------------------------------------------------------
+
+TEdge* ClipperBase::ProcessBound(TEdge* E, bool NextIsForward)
+{
+  TEdge *Result = E;
+  TEdge *Horz = 0;
+
+  if (E->OutIdx == Skip)
+  {
+    //if edges still remain in the current bound beyond the skip edge then
+    //create another LocMin and call ProcessBound once more
+    if (NextIsForward)
+    {
+      while (E->Top.Y == E->Next->Bot.Y) E = E->Next;
+      //don't include top horizontals when parsing a bound a second time,
+      //they will be contained in the opposite bound ...
+      while (E != Result && IsHorizontal(*E)) E = E->Prev;
+    }
+    else
+    {
+      while (E->Top.Y == E->Prev->Bot.Y) E = E->Prev;
+      while (E != Result && IsHorizontal(*E)) E = E->Next;
+    }
+
+    if (E == Result)
+    {
+      if (NextIsForward) Result = E->Next;
+      else Result = E->Prev;
+    }
+    else
+    {
+      //there are more edges in the bound beyond result starting with E
+      if (NextIsForward)
+        E = Result->Next;
+      else
+        E = Result->Prev;
+      MinimaList::value_type locMin;
+      locMin.Y = E->Bot.Y;
+      locMin.LeftBound = 0;
+      locMin.RightBound = E;
+      E->WindDelta = 0;
+      Result = ProcessBound(E, NextIsForward);
+      m_MinimaList.push_back(locMin);
+    }
+    return Result;
+  }
+
+  TEdge *EStart;
+
+  if (IsHorizontal(*E))
+  {
+    //We need to be careful with open paths because this may not be a
+    //true local minima (ie E may be following a skip edge).
+    //Also, consecutive horz. edges may start heading left before going right.
+    if (NextIsForward) 
+      EStart = E->Prev;
+    else 
+      EStart = E->Next;
+    if (IsHorizontal(*EStart)) //ie an adjoining horizontal skip edge
+      {
+        if (EStart->Bot.X != E->Bot.X && EStart->Top.X != E->Bot.X)
+          ReverseHorizontal(*E);
+      }
+      else if (EStart->Bot.X != E->Bot.X)
+        ReverseHorizontal(*E);
+  }
+  
+  EStart = E;
+  if (NextIsForward)
+  {
+    while (Result->Top.Y == Result->Next->Bot.Y && Result->Next->OutIdx != Skip)
+      Result = Result->Next;
+    if (IsHorizontal(*Result) && Result->Next->OutIdx != Skip)
+    {
+      //nb: at the top of a bound, horizontals are added to the bound
+      //only when the preceding edge attaches to the horizontal's left vertex
+      //unless a Skip edge is encountered when that becomes the top divide
+      Horz = Result;
+      while (IsHorizontal(*Horz->Prev)) Horz = Horz->Prev;
+      if (Horz->Prev->Top.X > Result->Next->Top.X) Result = Horz->Prev;
+    }
+    while (E != Result) 
+    {
+      E->NextInLML = E->Next;
+      if (IsHorizontal(*E) && E != EStart &&
+        E->Bot.X != E->Prev->Top.X) ReverseHorizontal(*E);
+      E = E->Next;
+    }
+    if (IsHorizontal(*E) && E != EStart && E->Bot.X != E->Prev->Top.X) 
+      ReverseHorizontal(*E);
+    Result = Result->Next; //move to the edge just beyond current bound
+  } else
+  {
+    while (Result->Top.Y == Result->Prev->Bot.Y && Result->Prev->OutIdx != Skip) 
+      Result = Result->Prev;
+    if (IsHorizontal(*Result) && Result->Prev->OutIdx != Skip)
+    {
+      Horz = Result;
+      while (IsHorizontal(*Horz->Next)) Horz = Horz->Next;
+      if (Horz->Next->Top.X == Result->Prev->Top.X ||
+          Horz->Next->Top.X > Result->Prev->Top.X) Result = Horz->Next;
+    }
+
+    while (E != Result)
+    {
+      E->NextInLML = E->Prev;
+      if (IsHorizontal(*E) && E != EStart && E->Bot.X != E->Next->Top.X) 
+        ReverseHorizontal(*E);
+      E = E->Prev;
+    }
+    if (IsHorizontal(*E) && E != EStart && E->Bot.X != E->Next->Top.X) 
+      ReverseHorizontal(*E);
+    Result = Result->Prev; //move to the edge just beyond current bound
+  }
+
+  return Result;
+}
+//------------------------------------------------------------------------------
+
+bool ClipperBase::AddPath(const Path &pg, PolyType PolyTyp, bool Closed)
+{
+#ifdef use_lines
+  if (!Closed && PolyTyp == ptClip)
+    throw clipperException("AddPath: Open paths must be subject.");
+#else
+  if (!Closed)
+    throw clipperException("AddPath: Open paths have been disabled.");
+#endif
+
+  int highI = (int)pg.size() -1;
+  if (Closed) while (highI > 0 && (pg[highI] == pg[0])) --highI;
+  while (highI > 0 && (pg[highI] == pg[highI -1])) --highI;
+  if ((Closed && highI < 2) || (!Closed && highI < 1)) return false;
+
+  //create a new edge array ...
+  TEdge *edges = new TEdge [highI +1];
+
+  bool IsFlat = true;
+  //1. Basic (first) edge initialization ...
+  try
+  {
+    edges[1].Curr = pg[1];
+    RangeTest(pg[0], m_UseFullRange);
+    RangeTest(pg[highI], m_UseFullRange);
+    InitEdge(&edges[0], &edges[1], &edges[highI], pg[0]);
+    InitEdge(&edges[highI], &edges[0], &edges[highI-1], pg[highI]);
+    for (int i = highI - 1; i >= 1; --i)
+    {
+      RangeTest(pg[i], m_UseFullRange);
+      InitEdge(&edges[i], &edges[i+1], &edges[i-1], pg[i]);
+    }
+  }
+  catch(...)
+  {
+    delete [] edges;
+    throw; //range test fails
+  }
+  TEdge *eStart = &edges[0];
+
+  //2. Remove duplicate vertices, and (when closed) collinear edges ...
+  TEdge *E = eStart, *eLoopStop = eStart;
+  for (;;)
+  {
+    //nb: allows matching start and end points when not Closed ...
+    if (E->Curr == E->Next->Curr && (Closed || E->Next != eStart))
+    {
+      if (E == E->Next) break;
+      if (E == eStart) eStart = E->Next;
+      E = RemoveEdge(E);
+      eLoopStop = E;
+      continue;
+    }
+    if (E->Prev == E->Next) 
+      break; //only two vertices
+    else if (Closed &&
+      SlopesEqual(E->Prev->Curr, E->Curr, E->Next->Curr, m_UseFullRange) && 
+      (!m_PreserveCollinear ||
+      !Pt2IsBetweenPt1AndPt3(E->Prev->Curr, E->Curr, E->Next->Curr)))
+    {
+      //Collinear edges are allowed for open paths but in closed paths
+      //the default is to merge adjacent collinear edges into a single edge.
+      //However, if the PreserveCollinear property is enabled, only overlapping
+      //collinear edges (ie spikes) will be removed from closed paths.
+      if (E == eStart) eStart = E->Next;
+      E = RemoveEdge(E);
+      E = E->Prev;
+      eLoopStop = E;
+      continue;
+    }
+    E = E->Next;
+    if ((E == eLoopStop) || (!Closed && E->Next == eStart)) break;
+  }
+
+  if ((!Closed && (E == E->Next)) || (Closed && (E->Prev == E->Next)))
+  {
+    delete [] edges;
+    return false;
+  }
+
+  if (!Closed)
+  { 
+    m_HasOpenPaths = true;
+    eStart->Prev->OutIdx = Skip;
+  }
+
+  //3. Do second stage of edge initialization ...
+  E = eStart;
+  do
+  {
+    InitEdge2(*E, PolyTyp);
+    E = E->Next;
+    if (IsFlat && E->Curr.Y != eStart->Curr.Y) IsFlat = false;
+  }
+  while (E != eStart);
+
+  //4. Finally, add edge bounds to LocalMinima list ...
+
+  //Totally flat paths must be handled differently when adding them
+  //to LocalMinima list to avoid endless loops etc ...
+  if (IsFlat) 
+  {
+    if (Closed) 
+    {
+      delete [] edges;
+      return false;
+    }
+    E->Prev->OutIdx = Skip;
+    MinimaList::value_type locMin;
+    locMin.Y = E->Bot.Y;
+    locMin.LeftBound = 0;
+    locMin.RightBound = E;
+    locMin.RightBound->Side = esRight;
+    locMin.RightBound->WindDelta = 0;
+    for (;;)
+    {
+      if (E->Bot.X != E->Prev->Top.X) ReverseHorizontal(*E);
+      if (E->Next->OutIdx == Skip) break;
+      E->NextInLML = E->Next;
+      E = E->Next;
+    }
+    m_MinimaList.push_back(locMin);
+    m_edges.push_back(edges);
+	  return true;
+  }
+
+  m_edges.push_back(edges);
+  bool leftBoundIsForward;
+  TEdge* EMin = 0;
+
+  //workaround to avoid an endless loop in the while loop below when
+  //open paths have matching start and end points ...
+  if (E->Prev->Bot == E->Prev->Top) E = E->Next;
+
+  for (;;)
+  {
+    E = FindNextLocMin(E);
+    if (E == EMin) break;
+    else if (!EMin) EMin = E;
+
+    //E and E.Prev now share a local minima (left aligned if horizontal).
+    //Compare their slopes to find which starts which bound ...
+    MinimaList::value_type locMin;
+    locMin.Y = E->Bot.Y;
+    if (E->Dx < E->Prev->Dx) 
+    {
+      locMin.LeftBound = E->Prev;
+      locMin.RightBound = E;
+      leftBoundIsForward = false; //Q.nextInLML = Q.prev
+    } else
+    {
+      locMin.LeftBound = E;
+      locMin.RightBound = E->Prev;
+      leftBoundIsForward = true; //Q.nextInLML = Q.next
+    }
+    locMin.LeftBound->Side = esLeft;
+    locMin.RightBound->Side = esRight;
+
+    if (!Closed) locMin.LeftBound->WindDelta = 0;
+    else if (locMin.LeftBound->Next == locMin.RightBound)
+      locMin.LeftBound->WindDelta = -1;
+    else locMin.LeftBound->WindDelta = 1;
+    locMin.RightBound->WindDelta = -locMin.LeftBound->WindDelta;
+
+    E = ProcessBound(locMin.LeftBound, leftBoundIsForward);
+    if (E->OutIdx == Skip) E = ProcessBound(E, leftBoundIsForward);
+
+    TEdge* E2 = ProcessBound(locMin.RightBound, !leftBoundIsForward);
+    if (E2->OutIdx == Skip) E2 = ProcessBound(E2, !leftBoundIsForward);
+
+    if (locMin.LeftBound->OutIdx == Skip)
+      locMin.LeftBound = 0;
+    else if (locMin.RightBound->OutIdx == Skip)
+      locMin.RightBound = 0;
+    m_MinimaList.push_back(locMin);
+    if (!leftBoundIsForward) E = E2;
+  }
+  return true;
+}
+//------------------------------------------------------------------------------
+
+bool ClipperBase::AddPaths(const Paths &ppg, PolyType PolyTyp, bool Closed)
+{
+  bool result = false;
+  for (Paths::size_type i = 0; i < ppg.size(); ++i)
+    if (AddPath(ppg[i], PolyTyp, Closed)) result = true;
+  return result;
+}
+//------------------------------------------------------------------------------
+
+void ClipperBase::Clear()
+{
+  DisposeLocalMinimaList();
+  for (EdgeList::size_type i = 0; i < m_edges.size(); ++i)
+  {
+    //for each edge array in turn, find the first used edge and 
+    //check for and remove any hiddenPts in each edge in the array.
+    TEdge* edges = m_edges[i];
+    delete [] edges;
+  }
+  m_edges.clear();
+  m_UseFullRange = false;
+  m_HasOpenPaths = false;
+}
+//------------------------------------------------------------------------------
+
+void ClipperBase::Reset()
+{
+  m_CurrentLM = m_MinimaList.begin();
+  if (m_CurrentLM == m_MinimaList.end()) return; //ie nothing to process
+  std::sort(m_MinimaList.begin(), m_MinimaList.end(), LocMinSorter());
+
+  //reset all edges ...
+  for (MinimaList::iterator lm = m_MinimaList.begin(); lm != m_MinimaList.end(); ++lm)
+  {
+    TEdge* e = lm->LeftBound;
+    if (e)
+    {
+      e->Curr = e->Bot;
+      e->Side = esLeft;
+      e->OutIdx = Unassigned;
+    }
+
+    e = lm->RightBound;
+    if (e)
+    {
+      e->Curr = e->Bot;
+      e->Side = esRight;
+      e->OutIdx = Unassigned;
+    }
+  }
+}
+//------------------------------------------------------------------------------
+
+void ClipperBase::DisposeLocalMinimaList()
+{
+  m_MinimaList.clear();
+  m_CurrentLM = m_MinimaList.begin();
+}
+//------------------------------------------------------------------------------
+
+void ClipperBase::PopLocalMinima()
+{
+  if (m_CurrentLM == m_MinimaList.end()) return;
+  ++m_CurrentLM;
+}
+//------------------------------------------------------------------------------
+
+IntRect ClipperBase::GetBounds()
+{
+  IntRect result;
+  MinimaList::iterator lm = m_MinimaList.begin();
+  if (lm == m_MinimaList.end())
+  {
+    result.left = result.top = result.right = result.bottom = 0;
+    return result;
+  }
+  result.left = lm->LeftBound->Bot.X;
+  result.top = lm->LeftBound->Bot.Y;
+  result.right = lm->LeftBound->Bot.X;
+  result.bottom = lm->LeftBound->Bot.Y;
+  while (lm != m_MinimaList.end())
+  {
+    result.bottom = std::max(result.bottom, lm->LeftBound->Bot.Y);
+    TEdge* e = lm->LeftBound;
+    for (;;) {
+      TEdge* bottomE = e;
+      while (e->NextInLML)
+      {
+        if (e->Bot.X < result.left) result.left = e->Bot.X;
+        if (e->Bot.X > result.right) result.right = e->Bot.X;
+        e = e->NextInLML;
+      }
+      result.left = std::min(result.left, e->Bot.X);
+      result.right = std::max(result.right, e->Bot.X);
+      result.left = std::min(result.left, e->Top.X);
+      result.right = std::max(result.right, e->Top.X);
+      result.top = std::min(result.top, e->Top.Y);
+      if (bottomE == lm->LeftBound) e = lm->RightBound;
+      else break;
+    }
+    ++lm;
+  }
+  return result;
+}
+
+//------------------------------------------------------------------------------
+// TClipper methods ...
+//------------------------------------------------------------------------------
+
+Clipper::Clipper(int initOptions) : ClipperBase() //constructor
+{
+  m_ActiveEdges = 0;
+  m_SortedEdges = 0;
+  m_ExecuteLocked = false;
+  m_UseFullRange = false;
+  m_ReverseOutput = ((initOptions & ioReverseSolution) != 0);
+  m_StrictSimple = ((initOptions & ioStrictlySimple) != 0);
+  m_PreserveCollinear = ((initOptions & ioPreserveCollinear) != 0);
+  m_HasOpenPaths = false;
+#ifdef use_xyz  
+  m_ZFill = 0;
+#endif
+}
+//------------------------------------------------------------------------------
+
+Clipper::~Clipper() //destructor
+{
+  Clear();
+}
+//------------------------------------------------------------------------------
+
+#ifdef use_xyz  
+void Clipper::ZFillFunction(ZFillCallback zFillFunc)
+{  
+  m_ZFill = zFillFunc;
+}
+//------------------------------------------------------------------------------
+#endif
+
+void Clipper::Reset()
+{
+  ClipperBase::Reset();
+  m_Scanbeam = ScanbeamList();
+  m_Maxima = MaximaList();
+  m_ActiveEdges = 0;
+  m_SortedEdges = 0;
+  for (MinimaList::iterator lm = m_MinimaList.begin(); lm != m_MinimaList.end(); ++lm)
+    InsertScanbeam(lm->Y);
+}
+//------------------------------------------------------------------------------
+
+bool Clipper::Execute(ClipType clipType, Paths &solution, PolyFillType fillType)
+{
+    return Execute(clipType, solution, fillType, fillType);
+}
+//------------------------------------------------------------------------------
+
+bool Clipper::Execute(ClipType clipType, PolyTree &polytree, PolyFillType fillType)
+{
+    return Execute(clipType, polytree, fillType, fillType);
+}
+//------------------------------------------------------------------------------
+
+bool Clipper::Execute(ClipType clipType, Paths &solution,
+    PolyFillType subjFillType, PolyFillType clipFillType)
+{
+  if( m_ExecuteLocked ) return false;
+  if (m_HasOpenPaths)
+    throw clipperException("Error: PolyTree struct is needed for open path clipping.");
+  m_ExecuteLocked = true;
+  solution.resize(0);
+  m_SubjFillType = subjFillType;
+  m_ClipFillType = clipFillType;
+  m_ClipType = clipType;
+  m_UsingPolyTree = false;
+  bool succeeded = ExecuteInternal();
+  if (succeeded) BuildResult(solution);
+  DisposeAllOutRecs();
+  m_ExecuteLocked = false;
+  return succeeded;
+}
+//------------------------------------------------------------------------------
+
+bool Clipper::Execute(ClipType clipType, PolyTree& polytree,
+    PolyFillType subjFillType, PolyFillType clipFillType)
+{
+  if( m_ExecuteLocked ) return false;
+  m_ExecuteLocked = true;
+  m_SubjFillType = subjFillType;
+  m_ClipFillType = clipFillType;
+  m_ClipType = clipType;
+  m_UsingPolyTree = true;
+  bool succeeded = ExecuteInternal();
+  if (succeeded) BuildResult2(polytree);
+  DisposeAllOutRecs();
+  m_ExecuteLocked = false;
+  return succeeded;
+}
+//------------------------------------------------------------------------------
+
+void Clipper::FixHoleLinkage(OutRec &outrec)
+{
+  //skip OutRecs that (a) contain outermost polygons or
+  //(b) already have the correct owner/child linkage ...
+  if (!outrec.FirstLeft ||                
+      (outrec.IsHole != outrec.FirstLeft->IsHole &&
+      outrec.FirstLeft->Pts)) return;
+
+  OutRec* orfl = outrec.FirstLeft;
+  while (orfl && ((orfl->IsHole == outrec.IsHole) || !orfl->Pts))
+      orfl = orfl->FirstLeft;
+  outrec.FirstLeft = orfl;
+}
+//------------------------------------------------------------------------------
+
+bool Clipper::ExecuteInternal()
+{
+  bool succeeded = true;
+  try {
+    Reset();
+    if (m_CurrentLM == m_MinimaList.end()) return true;
+    cInt botY = PopScanbeam();
+    do {
+      InsertLocalMinimaIntoAEL(botY);
+      ProcessHorizontals();
+	  ClearGhostJoins();
+	  if (m_Scanbeam.empty()) break;
+      cInt topY = PopScanbeam();
+      succeeded = ProcessIntersections(topY);
+      if (!succeeded) break;
+      ProcessEdgesAtTopOfScanbeam(topY);
+      botY = topY;
+    } while (!m_Scanbeam.empty() || m_CurrentLM != m_MinimaList.end());
+  }
+  catch(...) 
+  {
+    succeeded = false;
+  }
+
+  if (succeeded)
+  {
+    //fix orientations ...
+    for (PolyOutList::size_type i = 0; i < m_PolyOuts.size(); ++i)
+    {
+      OutRec *outRec = m_PolyOuts[i];
+      if (!outRec->Pts || outRec->IsOpen) continue;
+      if ((outRec->IsHole ^ m_ReverseOutput) == (Area(*outRec) > 0))
+        ReversePolyPtLinks(outRec->Pts);
+    }
+
+    if (!m_Joins.empty()) JoinCommonEdges();
+
+    //unfortunately FixupOutPolygon() must be done after JoinCommonEdges()
+    for (PolyOutList::size_type i = 0; i < m_PolyOuts.size(); ++i)
+    {
+      OutRec *outRec = m_PolyOuts[i];
+      if (!outRec->Pts) continue;
+      if (outRec->IsOpen)
+        FixupOutPolyline(*outRec);
+      else
+        FixupOutPolygon(*outRec);
+    }
+
+    if (m_StrictSimple) DoSimplePolygons();
+  }
+
+  ClearJoins();
+  ClearGhostJoins();
+  return succeeded;
+}
+//------------------------------------------------------------------------------
+
+void Clipper::InsertScanbeam(const cInt Y)
+{
+    m_Scanbeam.push(Y);
+}
+//------------------------------------------------------------------------------
+#pragma optimize("",off)
+cInt Clipper::PopScanbeam()
+{
+    const cInt Y = m_Scanbeam.top();
+    m_Scanbeam.pop();
+    while (!m_Scanbeam.empty() && Y == m_Scanbeam.top()) { m_Scanbeam.pop(); } // Pop duplicates.
+    return Y;
+}
+#pragma optimize("",on)
+//------------------------------------------------------------------------------
+
+void Clipper::DisposeAllOutRecs(){
+  for (PolyOutList::size_type i = 0; i < m_PolyOuts.size(); ++i)
+    DisposeOutRec(i);
+  m_PolyOuts.clear();
+}
+//------------------------------------------------------------------------------
+
+void Clipper::DisposeOutRec(PolyOutList::size_type index)
+{
+  OutRec *outRec = m_PolyOuts[index];
+  if (outRec->Pts) DisposeOutPts(outRec->Pts);
+  delete outRec;
+  m_PolyOuts[index] = 0;
+}
+//------------------------------------------------------------------------------
+
+void Clipper::SetWindingCount(TEdge &edge)
+{
+  TEdge *e = edge.PrevInAEL;
+  //find the edge of the same polytype that immediately preceeds 'edge' in AEL
+  while (e  && ((e->PolyTyp != edge.PolyTyp) || (e->WindDelta == 0))) e = e->PrevInAEL;
+  if (!e)
+  {
+    edge.WindCnt = (edge.WindDelta == 0 ? 1 : edge.WindDelta);
+    edge.WindCnt2 = 0;
+    e = m_ActiveEdges; //ie get ready to calc WindCnt2
+  }   
+  else if (edge.WindDelta == 0 && m_ClipType != ctUnion)
+  {
+    edge.WindCnt = 1;
+    edge.WindCnt2 = e->WindCnt2;
+    e = e->NextInAEL; //ie get ready to calc WindCnt2
+  }
+  else if (IsEvenOddFillType(edge))
+  {
+    //EvenOdd filling ...
+    if (edge.WindDelta == 0)
+    {
+      //are we inside a subj polygon ...
+      bool Inside = true;
+      TEdge *e2 = e->PrevInAEL;
+      while (e2)
+      {
+        if (e2->PolyTyp == e->PolyTyp && e2->WindDelta != 0) 
+          Inside = !Inside;
+        e2 = e2->PrevInAEL;
+      }
+      edge.WindCnt = (Inside ? 0 : 1);
+    }
+    else
+    {
+      edge.WindCnt = edge.WindDelta;
+    }
+    edge.WindCnt2 = e->WindCnt2;
+    e = e->NextInAEL; //ie get ready to calc WindCnt2
+  } 
+  else
+  {
+    //nonZero, Positive or Negative filling ...
+    if (e->WindCnt * e->WindDelta < 0)
+    {
+      //prev edge is 'decreasing' WindCount (WC) toward zero
+      //so we're outside the previous polygon ...
+      if (Abs(e->WindCnt) > 1)
+      {
+        //outside prev poly but still inside another.
+        //when reversing direction of prev poly use the same WC 
+        if (e->WindDelta * edge.WindDelta < 0) edge.WindCnt = e->WindCnt;
+        //otherwise continue to 'decrease' WC ...
+        else edge.WindCnt = e->WindCnt + edge.WindDelta;
+      } 
+      else
+        //now outside all polys of same polytype so set own WC ...
+        edge.WindCnt = (edge.WindDelta == 0 ? 1 : edge.WindDelta);
+    } else
+    {
+      //prev edge is 'increasing' WindCount (WC) away from zero
+      //so we're inside the previous polygon ...
+      if (edge.WindDelta == 0) 
+        edge.WindCnt = (e->WindCnt < 0 ? e->WindCnt - 1 : e->WindCnt + 1);
+      //if wind direction is reversing prev then use same WC
+      else if (e->WindDelta * edge.WindDelta < 0) edge.WindCnt = e->WindCnt;
+      //otherwise add to WC ...
+      else edge.WindCnt = e->WindCnt + edge.WindDelta;
+    }
+    edge.WindCnt2 = e->WindCnt2;
+    e = e->NextInAEL; //ie get ready to calc WindCnt2
+  }
+
+  //update WindCnt2 ...
+  if (IsEvenOddAltFillType(edge))
+  {
+    //EvenOdd filling ...
+    while (e != &edge)
+    {
+      if (e->WindDelta != 0)
+        edge.WindCnt2 = (edge.WindCnt2 == 0 ? 1 : 0);
+      e = e->NextInAEL;
+    }
+  } else
+  {
+    //nonZero, Positive or Negative filling ...
+    while ( e != &edge )
+    {
+      edge.WindCnt2 += e->WindDelta;
+      e = e->NextInAEL;
+    }
+  }
+}
+//------------------------------------------------------------------------------
+
+bool Clipper::IsEvenOddFillType(const TEdge& edge) const
+{
+  if (edge.PolyTyp == ptSubject)
+    return m_SubjFillType == pftEvenOdd; else
+    return m_ClipFillType == pftEvenOdd;
+}
+//------------------------------------------------------------------------------
+
+bool Clipper::IsEvenOddAltFillType(const TEdge& edge) const
+{
+  if (edge.PolyTyp == ptSubject)
+    return m_ClipFillType == pftEvenOdd; else
+    return m_SubjFillType == pftEvenOdd;
+}
+//------------------------------------------------------------------------------
+
+bool Clipper::IsContributing(const TEdge& edge) const
+{
+  PolyFillType pft, pft2;
+  if (edge.PolyTyp == ptSubject)
+  {
+    pft = m_SubjFillType;
+    pft2 = m_ClipFillType;
+  } else
+  {
+    pft = m_ClipFillType;
+    pft2 = m_SubjFillType;
+  }
+
+  switch(pft)
+  {
+    case pftEvenOdd: 
+      //return false if a subj line has been flagged as inside a subj polygon
+      if (edge.WindDelta == 0 && edge.WindCnt != 1) return false;
+      break;
+    case pftNonZero:
+      if (Abs(edge.WindCnt) != 1) return false;
+      break;
+    case pftPositive: 
+      if (edge.WindCnt != 1) return false;
+      break;
+    default: //pftNegative
+      if (edge.WindCnt != -1) return false;
+  }
+
+  switch(m_ClipType)
+  {
+    case ctIntersection:
+      switch(pft2)
+      {
+        case pftEvenOdd: 
+        case pftNonZero: 
+          return (edge.WindCnt2 != 0);
+        case pftPositive: 
+          return (edge.WindCnt2 > 0);
+        default: 
+          return (edge.WindCnt2 < 0);
+      }
+      break;
+    case ctUnion:
+      switch(pft2)
+      {
+        case pftEvenOdd: 
+        case pftNonZero: 
+          return (edge.WindCnt2 == 0);
+        case pftPositive: 
+          return (edge.WindCnt2 <= 0);
+        default: 
+          return (edge.WindCnt2 >= 0);
+      }
+      break;
+    case ctDifference:
+      if (edge.PolyTyp == ptSubject)
+        switch(pft2)
+        {
+          case pftEvenOdd: 
+          case pftNonZero: 
+            return (edge.WindCnt2 == 0);
+          case pftPositive: 
+            return (edge.WindCnt2 <= 0);
+          default: 
+            return (edge.WindCnt2 >= 0);
+        }
+      else
+        switch(pft2)
+        {
+          case pftEvenOdd: 
+          case pftNonZero: 
+            return (edge.WindCnt2 != 0);
+          case pftPositive: 
+            return (edge.WindCnt2 > 0);
+          default: 
+            return (edge.WindCnt2 < 0);
+        }
+      break;
+    case ctXor:
+      if (edge.WindDelta == 0) //XOr always contributing unless open
+        switch(pft2)
+        {
+          case pftEvenOdd: 
+          case pftNonZero: 
+            return (edge.WindCnt2 == 0);
+          case pftPositive: 
+            return (edge.WindCnt2 <= 0);
+          default: 
+            return (edge.WindCnt2 >= 0);
+        }
+      else 
+        return true;
+      break;
+    default:
+      return true;
+  }
+}
+//------------------------------------------------------------------------------
+
+OutPt* Clipper::AddLocalMinPoly(TEdge *e1, TEdge *e2, const IntPoint &Pt)
+{
+  OutPt* result;
+  TEdge *e, *prevE;
+  if (IsHorizontal(*e2) || ( e1->Dx > e2->Dx ))
+  {
+    result = AddOutPt(e1, Pt);
+    e2->OutIdx = e1->OutIdx;
+    e1->Side = esLeft;
+    e2->Side = esRight;
+    e = e1;
+    if (e->PrevInAEL == e2)
+      prevE = e2->PrevInAEL; 
+    else
+      prevE = e->PrevInAEL;
+  } else
+  {
+    result = AddOutPt(e2, Pt);
+    e1->OutIdx = e2->OutIdx;
+    e1->Side = esRight;
+    e2->Side = esLeft;
+    e = e2;
+    if (e->PrevInAEL == e1)
+        prevE = e1->PrevInAEL;
+    else
+        prevE = e->PrevInAEL;
+  }
+
+  if (prevE && prevE->OutIdx >= 0 &&
+      (TopX(*prevE, Pt.Y) == TopX(*e, Pt.Y)) &&
+      SlopesEqual(*e, *prevE, m_UseFullRange) &&
+      (e->WindDelta != 0) && (prevE->WindDelta != 0))
+  {
+    OutPt* outPt = AddOutPt(prevE, Pt);
+    AddJoin(result, outPt, e->Top);
+  }
+  return result;
+}
+//------------------------------------------------------------------------------
+
+void Clipper::AddLocalMaxPoly(TEdge *e1, TEdge *e2, const IntPoint &Pt)
+{
+  AddOutPt( e1, Pt );
+  if (e2->WindDelta == 0) AddOutPt(e2, Pt);
+  if( e1->OutIdx == e2->OutIdx )
+  {
+    e1->OutIdx = Unassigned;
+    e2->OutIdx = Unassigned;
+  }
+  else if (e1->OutIdx < e2->OutIdx) 
+    AppendPolygon(e1, e2); 
+  else 
+    AppendPolygon(e2, e1);
+}
+//------------------------------------------------------------------------------
+
+void Clipper::AddEdgeToSEL(TEdge *edge)
+{
+  //SEL pointers in PEdge are reused to build a list of horizontal edges.
+  //However, we don't need to worry about order with horizontal edge processing.
+  if( !m_SortedEdges )
+  {
+    m_SortedEdges = edge;
+    edge->PrevInSEL = 0;
+    edge->NextInSEL = 0;
+  }
+  else
+  {
+    edge->NextInSEL = m_SortedEdges;
+    edge->PrevInSEL = 0;
+    m_SortedEdges->PrevInSEL = edge;
+    m_SortedEdges = edge;
+  }
+}
+//------------------------------------------------------------------------------
+
+void Clipper::CopyAELToSEL()
+{
+  TEdge* e = m_ActiveEdges;
+  m_SortedEdges = e;
+  while ( e )
+  {
+    e->PrevInSEL = e->PrevInAEL;
+    e->NextInSEL = e->NextInAEL;
+    e = e->NextInAEL;
+  }
+}
+//------------------------------------------------------------------------------
+
+void Clipper::AddJoin(OutPt *op1, OutPt *op2, const IntPoint OffPt)
+{
+  Join* j = new Join;
+  j->OutPt1 = op1;
+  j->OutPt2 = op2;
+  j->OffPt = OffPt;
+  m_Joins.push_back(j);
+}
+//------------------------------------------------------------------------------
+
+void Clipper::ClearJoins()
+{
+  for (JoinList::size_type i = 0; i < m_Joins.size(); i++)
+    delete m_Joins[i];
+  m_Joins.resize(0);
+}
+//------------------------------------------------------------------------------
+
+void Clipper::ClearGhostJoins()
+{
+  for (JoinList::size_type i = 0; i < m_GhostJoins.size(); i++)
+    delete m_GhostJoins[i];
+  m_GhostJoins.resize(0);
+}
+//------------------------------------------------------------------------------
+
+void Clipper::AddGhostJoin(OutPt *op, const IntPoint OffPt)
+{
+  Join* j = new Join;
+  j->OutPt1 = op;
+  j->OutPt2 = 0;
+  j->OffPt = OffPt;
+  m_GhostJoins.push_back(j);
+}
+//------------------------------------------------------------------------------
+
+void Clipper::InsertLocalMinimaIntoAEL(const cInt botY)
+{
+  while (m_CurrentLM != m_MinimaList.end() && (m_CurrentLM->Y == botY))
+  {
+    TEdge* lb = m_CurrentLM->LeftBound;
+    TEdge* rb = m_CurrentLM->RightBound;
+    PopLocalMinima();
+    OutPt *Op1 = 0;
+    if (!lb)
+    {
+      //nb: don't insert LB into either AEL or SEL
+      InsertEdgeIntoAEL(rb, 0);
+      SetWindingCount(*rb);
+      if (IsContributing(*rb))
+        Op1 = AddOutPt(rb, rb->Bot); 
+    } 
+    else if (!rb)
+    {
+      InsertEdgeIntoAEL(lb, 0);
+      SetWindingCount(*lb);
+      if (IsContributing(*lb))
+        Op1 = AddOutPt(lb, lb->Bot);
+      InsertScanbeam(lb->Top.Y);
+    }
+    else
+    {
+      InsertEdgeIntoAEL(lb, 0);
+      InsertEdgeIntoAEL(rb, lb);
+      SetWindingCount( *lb );
+      rb->WindCnt = lb->WindCnt;
+      rb->WindCnt2 = lb->WindCnt2;
+      if (IsContributing(*lb))
+        Op1 = AddLocalMinPoly(lb, rb, lb->Bot);      
+      InsertScanbeam(lb->Top.Y);
+    }
+
+     if (rb)
+     {
+       if(IsHorizontal(*rb)) AddEdgeToSEL(rb);
+       else InsertScanbeam( rb->Top.Y );
+     }
+
+    if (!lb || !rb) continue;
+
+    //if any output polygons share an edge, they'll need joining later ...
+    if (Op1 && IsHorizontal(*rb) && 
+      m_GhostJoins.size() > 0 && (rb->WindDelta != 0))
+    {
+      for (JoinList::size_type i = 0; i < m_GhostJoins.size(); ++i)
+      {
+        Join* jr = m_GhostJoins[i];
+        //if the horizontal Rb and a 'ghost' horizontal overlap, then convert
+        //the 'ghost' join to a real join ready for later ...
+        if (HorzSegmentsOverlap(jr->OutPt1->Pt.X, jr->OffPt.X, rb->Bot.X, rb->Top.X))
+          AddJoin(jr->OutPt1, Op1, jr->OffPt);
+      }
+    }
+
+    if (lb->OutIdx >= 0 && lb->PrevInAEL && 
+      lb->PrevInAEL->Curr.X == lb->Bot.X &&
+      lb->PrevInAEL->OutIdx >= 0 &&
+      SlopesEqual(*lb->PrevInAEL, *lb, m_UseFullRange) &&
+      (lb->WindDelta != 0) && (lb->PrevInAEL->WindDelta != 0))
+    {
+        OutPt *Op2 = AddOutPt(lb->PrevInAEL, lb->Bot);
+        AddJoin(Op1, Op2, lb->Top);
+    }
+
+    if(lb->NextInAEL != rb)
+    {
+
+      if (rb->OutIdx >= 0 && rb->PrevInAEL->OutIdx >= 0 &&
+        SlopesEqual(*rb->PrevInAEL, *rb, m_UseFullRange) &&
+        (rb->WindDelta != 0) && (rb->PrevInAEL->WindDelta != 0))
+      {
+          OutPt *Op2 = AddOutPt(rb->PrevInAEL, rb->Bot);
+          AddJoin(Op1, Op2, rb->Top);
+      }
+
+      TEdge* e = lb->NextInAEL;
+      if (e)
+      {
+        while( e != rb )
+        {
+          //nb: For calculating winding counts etc, IntersectEdges() assumes
+          //that param1 will be to the Right of param2 ABOVE the intersection ...
+          IntersectEdges(rb , e , lb->Curr); //order important here
+          e = e->NextInAEL;
+        }
+      }
+    }
+    
+  }
+}
+//------------------------------------------------------------------------------
+
+void Clipper::DeleteFromAEL(TEdge *e)
+{
+  TEdge* AelPrev = e->PrevInAEL;
+  TEdge* AelNext = e->NextInAEL;
+  if(  !AelPrev &&  !AelNext && (e != m_ActiveEdges) ) return; //already deleted
+  if( AelPrev ) AelPrev->NextInAEL = AelNext;
+  else m_ActiveEdges = AelNext;
+  if( AelNext ) AelNext->PrevInAEL = AelPrev;
+  e->NextInAEL = 0;
+  e->PrevInAEL = 0;
+}
+//------------------------------------------------------------------------------
+
+void Clipper::DeleteFromSEL(TEdge *e)
+{
+  TEdge* SelPrev = e->PrevInSEL;
+  TEdge* SelNext = e->NextInSEL;
+  if( !SelPrev &&  !SelNext && (e != m_SortedEdges) ) return; //already deleted
+  if( SelPrev ) SelPrev->NextInSEL = SelNext;
+  else m_SortedEdges = SelNext;
+  if( SelNext ) SelNext->PrevInSEL = SelPrev;
+  e->NextInSEL = 0;
+  e->PrevInSEL = 0;
+}
+//------------------------------------------------------------------------------
+
+#ifdef use_xyz
+void Clipper::SetZ(IntPoint& pt, TEdge& e1, TEdge& e2)
+{
+  if (pt.Z != 0 || !m_ZFill) return;
+  else if (pt == e1.Bot) pt.Z = e1.Bot.Z;
+  else if (pt == e1.Top) pt.Z = e1.Top.Z;
+  else if (pt == e2.Bot) pt.Z = e2.Bot.Z;
+  else if (pt == e2.Top) pt.Z = e2.Top.Z;
+  else (*m_ZFill)(e1.Bot, e1.Top, e2.Bot, e2.Top, pt); 
+}
+//------------------------------------------------------------------------------
+#endif
+
+void Clipper::IntersectEdges(TEdge *e1, TEdge *e2, IntPoint &Pt)
+{
+  bool e1Contributing = ( e1->OutIdx >= 0 );
+  bool e2Contributing = ( e2->OutIdx >= 0 );
+
+#ifdef use_xyz
+        SetZ(Pt, *e1, *e2);
+#endif
+
+#ifdef use_lines
+  //if either edge is on an OPEN path ...
+  if (e1->WindDelta == 0 || e2->WindDelta == 0)
+  {
+    //ignore subject-subject open path intersections UNLESS they
+    //are both open paths, AND they are both 'contributing maximas' ...
+	if (e1->WindDelta == 0 && e2->WindDelta == 0) return;
+
+    //if intersecting a subj line with a subj poly ...
+    else if (e1->PolyTyp == e2->PolyTyp && 
+      e1->WindDelta != e2->WindDelta && m_ClipType == ctUnion)
+    {
+      if (e1->WindDelta == 0)
+      {
+        if (e2Contributing)
+        {
+          AddOutPt(e1, Pt);
+          if (e1Contributing) e1->OutIdx = Unassigned;
+        }
+      }
+      else
+      {
+        if (e1Contributing)
+        {
+          AddOutPt(e2, Pt);
+          if (e2Contributing) e2->OutIdx = Unassigned;
+        }
+      }
+    }
+    else if (e1->PolyTyp != e2->PolyTyp)
+    {
+      //toggle subj open path OutIdx on/off when Abs(clip.WndCnt) == 1 ...
+      if ((e1->WindDelta == 0) && abs(e2->WindCnt) == 1 && 
+        (m_ClipType != ctUnion || e2->WindCnt2 == 0))
+      {
+        AddOutPt(e1, Pt);
+        if (e1Contributing) e1->OutIdx = Unassigned;
+      }
+      else if ((e2->WindDelta == 0) && (abs(e1->WindCnt) == 1) && 
+        (m_ClipType != ctUnion || e1->WindCnt2 == 0))
+      {
+        AddOutPt(e2, Pt);
+        if (e2Contributing) e2->OutIdx = Unassigned;
+      }
+    }
+    return;
+  }
+#endif
+
+  //update winding counts...
+  //assumes that e1 will be to the Right of e2 ABOVE the intersection
+  if ( e1->PolyTyp == e2->PolyTyp )
+  {
+    if ( IsEvenOddFillType( *e1) )
+    {
+      int oldE1WindCnt = e1->WindCnt;
+      e1->WindCnt = e2->WindCnt;
+      e2->WindCnt = oldE1WindCnt;
+    } else
+    {
+      if (e1->WindCnt + e2->WindDelta == 0 ) e1->WindCnt = -e1->WindCnt;
+      else e1->WindCnt += e2->WindDelta;
+      if ( e2->WindCnt - e1->WindDelta == 0 ) e2->WindCnt = -e2->WindCnt;
+      else e2->WindCnt -= e1->WindDelta;
+    }
+  } else
+  {
+    if (!IsEvenOddFillType(*e2)) e1->WindCnt2 += e2->WindDelta;
+    else e1->WindCnt2 = ( e1->WindCnt2 == 0 ) ? 1 : 0;
+    if (!IsEvenOddFillType(*e1)) e2->WindCnt2 -= e1->WindDelta;
+    else e2->WindCnt2 = ( e2->WindCnt2 == 0 ) ? 1 : 0;
+  }
+
+  PolyFillType e1FillType, e2FillType, e1FillType2, e2FillType2;
+  if (e1->PolyTyp == ptSubject)
+  {
+    e1FillType = m_SubjFillType;
+    e1FillType2 = m_ClipFillType;
+  } else
+  {
+    e1FillType = m_ClipFillType;
+    e1FillType2 = m_SubjFillType;
+  }
+  if (e2->PolyTyp == ptSubject)
+  {
+    e2FillType = m_SubjFillType;
+    e2FillType2 = m_ClipFillType;
+  } else
+  {
+    e2FillType = m_ClipFillType;
+    e2FillType2 = m_SubjFillType;
+  }
+
+  cInt e1Wc, e2Wc;
+  switch (e1FillType)
+  {
+    case pftPositive: e1Wc = e1->WindCnt; break;
+    case pftNegative: e1Wc = -e1->WindCnt; break;
+    default: e1Wc = Abs(e1->WindCnt);
+  }
+  switch(e2FillType)
+  {
+    case pftPositive: e2Wc = e2->WindCnt; break;
+    case pftNegative: e2Wc = -e2->WindCnt; break;
+    default: e2Wc = Abs(e2->WindCnt);
+  }
+
+  if ( e1Contributing && e2Contributing )
+  {
+    if ((e1Wc != 0 && e1Wc != 1) || (e2Wc != 0 && e2Wc != 1) ||
+      (e1->PolyTyp != e2->PolyTyp && m_ClipType != ctXor) )
+    {
+      AddLocalMaxPoly(e1, e2, Pt); 
+    }
+    else
+    {
+      AddOutPt(e1, Pt);
+      AddOutPt(e2, Pt);
+      SwapSides( *e1 , *e2 );
+      SwapPolyIndexes( *e1 , *e2 );
+    }
+  }
+  else if ( e1Contributing )
+  {
+    if (e2Wc == 0 || e2Wc == 1) 
+    {
+      AddOutPt(e1, Pt);
+      SwapSides(*e1, *e2);
+      SwapPolyIndexes(*e1, *e2);
+    }
+  }
+  else if ( e2Contributing )
+  {
+    if (e1Wc == 0 || e1Wc == 1) 
+    {
+      AddOutPt(e2, Pt);
+      SwapSides(*e1, *e2);
+      SwapPolyIndexes(*e1, *e2);
+    }
+  } 
+  else if ( (e1Wc == 0 || e1Wc == 1) && (e2Wc == 0 || e2Wc == 1))
+  {
+    //neither edge is currently contributing ...
+
+    cInt e1Wc2, e2Wc2;
+    switch (e1FillType2)
+    {
+      case pftPositive: e1Wc2 = e1->WindCnt2; break;
+      case pftNegative : e1Wc2 = -e1->WindCnt2; break;
+      default: e1Wc2 = Abs(e1->WindCnt2);
+    }
+    switch (e2FillType2)
+    {
+      case pftPositive: e2Wc2 = e2->WindCnt2; break;
+      case pftNegative: e2Wc2 = -e2->WindCnt2; break;
+      default: e2Wc2 = Abs(e2->WindCnt2);
+    }
+
+    if (e1->PolyTyp != e2->PolyTyp)
+    {
+      AddLocalMinPoly(e1, e2, Pt);
+    }
+    else if (e1Wc == 1 && e2Wc == 1)
+      switch( m_ClipType ) {
+        case ctIntersection:
+          if (e1Wc2 > 0 && e2Wc2 > 0)
+            AddLocalMinPoly(e1, e2, Pt);
+          break;
+        case ctUnion:
+          if ( e1Wc2 <= 0 && e2Wc2 <= 0 )
+            AddLocalMinPoly(e1, e2, Pt);
+          break;
+        case ctDifference:
+          if (((e1->PolyTyp == ptClip) && (e1Wc2 > 0) && (e2Wc2 > 0)) ||
+              ((e1->PolyTyp == ptSubject) && (e1Wc2 <= 0) && (e2Wc2 <= 0)))
+                AddLocalMinPoly(e1, e2, Pt);
+          break;
+        case ctXor:
+          AddLocalMinPoly(e1, e2, Pt);
+      }
+    else
+      SwapSides( *e1, *e2 );
+  }
+}
+//------------------------------------------------------------------------------
+
+void Clipper::SetHoleState(TEdge *e, OutRec *outrec)
+{
+  bool IsHole = false;
+  TEdge *e2 = e->PrevInAEL;
+  while (e2)
+  {
+    if (e2->OutIdx >= 0 && e2->WindDelta != 0)
+    {
+      IsHole = !IsHole;
+      if (! outrec->FirstLeft)
+        outrec->FirstLeft = m_PolyOuts[e2->OutIdx];
+    }
+    e2 = e2->PrevInAEL;
+  }
+  if (IsHole) outrec->IsHole = true;
+}
+//------------------------------------------------------------------------------
+
+OutRec* GetLowermostRec(OutRec *outRec1, OutRec *outRec2)
+{
+  //work out which polygon fragment has the correct hole state ...
+  if (!outRec1->BottomPt) 
+    outRec1->BottomPt = GetBottomPt(outRec1->Pts);
+  if (!outRec2->BottomPt) 
+    outRec2->BottomPt = GetBottomPt(outRec2->Pts);
+  OutPt *OutPt1 = outRec1->BottomPt;
+  OutPt *OutPt2 = outRec2->BottomPt;
+  if (OutPt1->Pt.Y > OutPt2->Pt.Y) return outRec1;
+  else if (OutPt1->Pt.Y < OutPt2->Pt.Y) return outRec2;
+  else if (OutPt1->Pt.X < OutPt2->Pt.X) return outRec1;
+  else if (OutPt1->Pt.X > OutPt2->Pt.X) return outRec2;
+  else if (OutPt1->Next == OutPt1) return outRec2;
+  else if (OutPt2->Next == OutPt2) return outRec1;
+  else if (FirstIsBottomPt(OutPt1, OutPt2)) return outRec1;
+  else return outRec2;
+}
+//------------------------------------------------------------------------------
+
+bool Param1RightOfParam2(OutRec* outRec1, OutRec* outRec2)
+{
+  do
+  {
+    outRec1 = outRec1->FirstLeft;
+    if (outRec1 == outRec2) return true;
+  } while (outRec1);
+  return false;
+}
+//------------------------------------------------------------------------------
+
+OutRec* Clipper::GetOutRec(int Idx)
+{
+  OutRec* outrec = m_PolyOuts[Idx];
+  while (outrec != m_PolyOuts[outrec->Idx])
+    outrec = m_PolyOuts[outrec->Idx];
+  return outrec;
+}
+//------------------------------------------------------------------------------
+
+void Clipper::AppendPolygon(TEdge *e1, TEdge *e2)
+{
+  //get the start and ends of both output polygons ...
+  OutRec *outRec1 = m_PolyOuts[e1->OutIdx];
+  OutRec *outRec2 = m_PolyOuts[e2->OutIdx];
+
+  OutRec *holeStateRec;
+  if (Param1RightOfParam2(outRec1, outRec2)) 
+    holeStateRec = outRec2;
+  else if (Param1RightOfParam2(outRec2, outRec1)) 
+    holeStateRec = outRec1;
+  else 
+    holeStateRec = GetLowermostRec(outRec1, outRec2);
+
+  //get the start and ends of both output polygons and
+  //join e2 poly onto e1 poly and delete pointers to e2 ...
+
+  OutPt* p1_lft = outRec1->Pts;
+  OutPt* p1_rt = p1_lft->Prev;
+  OutPt* p2_lft = outRec2->Pts;
+  OutPt* p2_rt = p2_lft->Prev;
+
+  EdgeSide Side;
+  //join e2 poly onto e1 poly and delete pointers to e2 ...
+  if(  e1->Side == esLeft )
+  {
+    if(  e2->Side == esLeft )
+    {
+      //z y x a b c
+      ReversePolyPtLinks(p2_lft);
+      p2_lft->Next = p1_lft;
+      p1_lft->Prev = p2_lft;
+      p1_rt->Next = p2_rt;
+      p2_rt->Prev = p1_rt;
+      outRec1->Pts = p2_rt;
+    } else
+    {
+      //x y z a b c
+      p2_rt->Next = p1_lft;
+      p1_lft->Prev = p2_rt;
+      p2_lft->Prev = p1_rt;
+      p1_rt->Next = p2_lft;
+      outRec1->Pts = p2_lft;
+    }
+    Side = esLeft;
+  } else
+  {
+    if(  e2->Side == esRight )
+    {
+      //a b c z y x
+      ReversePolyPtLinks(p2_lft);
+      p1_rt->Next = p2_rt;
+      p2_rt->Prev = p1_rt;
+      p2_lft->Next = p1_lft;
+      p1_lft->Prev = p2_lft;
+    } else
+    {
+      //a b c x y z
+      p1_rt->Next = p2_lft;
+      p2_lft->Prev = p1_rt;
+      p1_lft->Prev = p2_rt;
+      p2_rt->Next = p1_lft;
+    }
+    Side = esRight;
+  }
+
+  outRec1->BottomPt = 0;
+  if (holeStateRec == outRec2)
+  {
+    if (outRec2->FirstLeft != outRec1)
+      outRec1->FirstLeft = outRec2->FirstLeft;
+    outRec1->IsHole = outRec2->IsHole;
+  }
+  outRec2->Pts = 0;
+  outRec2->BottomPt = 0;
+  outRec2->FirstLeft = outRec1;
+
+  int OKIdx = e1->OutIdx;
+  int ObsoleteIdx = e2->OutIdx;
+
+  e1->OutIdx = Unassigned; //nb: safe because we only get here via AddLocalMaxPoly
+  e2->OutIdx = Unassigned;
+
+  TEdge* e = m_ActiveEdges;
+  while( e )
+  {
+    if( e->OutIdx == ObsoleteIdx )
+    {
+      e->OutIdx = OKIdx;
+      e->Side = Side;
+      break;
+    }
+    e = e->NextInAEL;
+  }
+
+  outRec2->Idx = outRec1->Idx;
+}
+//------------------------------------------------------------------------------
+
+OutRec* Clipper::CreateOutRec()
+{
+  OutRec* result = new OutRec;
+  result->IsHole = false;
+  result->IsOpen = false;
+  result->FirstLeft = 0;
+  result->Pts = 0;
+  result->BottomPt = 0;
+  result->PolyNd = 0;
+  m_PolyOuts.push_back(result);
+  result->Idx = (int)m_PolyOuts.size()-1;
+  return result;
+}
+//------------------------------------------------------------------------------
+
+OutPt* Clipper::AddOutPt(TEdge *e, const IntPoint &pt)
+{
+  if(  e->OutIdx < 0 )
+  {
+    OutRec *outRec = CreateOutRec();
+    outRec->IsOpen = (e->WindDelta == 0);
+    OutPt* newOp = new OutPt;
+    outRec->Pts = newOp;
+    newOp->Idx = outRec->Idx;
+    newOp->Pt = pt;
+    newOp->Next = newOp;
+    newOp->Prev = newOp;
+    if (!outRec->IsOpen)
+      SetHoleState(e, outRec);
+    e->OutIdx = outRec->Idx;
+    return newOp;
+  } else
+  {
+    OutRec *outRec = m_PolyOuts[e->OutIdx];
+    //OutRec.Pts is the 'Left-most' point & OutRec.Pts.Prev is the 'Right-most'
+    OutPt* op = outRec->Pts;
+
+	bool ToFront = (e->Side == esLeft);
+	if (ToFront && (pt == op->Pt)) return op;
+    else if (!ToFront && (pt == op->Prev->Pt)) return op->Prev;
+
+    OutPt* newOp = new OutPt;
+    newOp->Idx = outRec->Idx;
+    newOp->Pt = pt;
+    newOp->Next = op;
+    newOp->Prev = op->Prev;
+    newOp->Prev->Next = newOp;
+    op->Prev = newOp;
+    if (ToFront) outRec->Pts = newOp;
+    return newOp;
+  }
+}
+//------------------------------------------------------------------------------
+
+OutPt* Clipper::GetLastOutPt(TEdge *e)
+{
+	OutRec *outRec = m_PolyOuts[e->OutIdx];
+	if (e->Side == esLeft)
+		return outRec->Pts;
+	else
+		return outRec->Pts->Prev;
+}
+//------------------------------------------------------------------------------
+
+void Clipper::ProcessHorizontals()
+{
+  TEdge* horzEdge = m_SortedEdges;
+  while(horzEdge)
+  {
+    DeleteFromSEL(horzEdge);
+    ProcessHorizontal(horzEdge);
+    horzEdge = m_SortedEdges;
+  }
+}
+//------------------------------------------------------------------------------
+
+inline bool IsMinima(TEdge *e)
+{
+  return e  && (e->Prev->NextInLML != e) && (e->Next->NextInLML != e);
+}
+//------------------------------------------------------------------------------
+
+inline bool IsMaxima(TEdge *e, const cInt Y)
+{
+  return e && e->Top.Y == Y && !e->NextInLML;
+}
+//------------------------------------------------------------------------------
+
+inline bool IsIntermediate(TEdge *e, const cInt Y)
+{
+  return e->Top.Y == Y && e->NextInLML;
+}
+//------------------------------------------------------------------------------
+
+TEdge *GetMaximaPair(TEdge *e)
+{
+  TEdge* result = 0;
+  if ((e->Next->Top == e->Top) && !e->Next->NextInLML)
+    result = e->Next;
+  else if ((e->Prev->Top == e->Top) && !e->Prev->NextInLML)
+    result = e->Prev;
+
+  if (result && (result->OutIdx == Skip ||
+    //result is false if both NextInAEL & PrevInAEL are nil & not horizontal ...
+    (result->NextInAEL == result->PrevInAEL && !IsHorizontal(*result))))
+      return 0;
+  return result;
+}
+//------------------------------------------------------------------------------
+
+void Clipper::SwapPositionsInAEL(TEdge *Edge1, TEdge *Edge2)
+{
+  //check that one or other edge hasn't already been removed from AEL ...
+  if (Edge1->NextInAEL == Edge1->PrevInAEL || 
+    Edge2->NextInAEL == Edge2->PrevInAEL) return;
+
+  if(  Edge1->NextInAEL == Edge2 )
+  {
+    TEdge* Next = Edge2->NextInAEL;
+    if( Next ) Next->PrevInAEL = Edge1;
+    TEdge* Prev = Edge1->PrevInAEL;
+    if( Prev ) Prev->NextInAEL = Edge2;
+    Edge2->PrevInAEL = Prev;
+    Edge2->NextInAEL = Edge1;
+    Edge1->PrevInAEL = Edge2;
+    Edge1->NextInAEL = Next;
+  }
+  else if(  Edge2->NextInAEL == Edge1 )
+  {
+    TEdge* Next = Edge1->NextInAEL;
+    if( Next ) Next->PrevInAEL = Edge2;
+    TEdge* Prev = Edge2->PrevInAEL;
+    if( Prev ) Prev->NextInAEL = Edge1;
+    Edge1->PrevInAEL = Prev;
+    Edge1->NextInAEL = Edge2;
+    Edge2->PrevInAEL = Edge1;
+    Edge2->NextInAEL = Next;
+  }
+  else
+  {
+    TEdge* Next = Edge1->NextInAEL;
+    TEdge* Prev = Edge1->PrevInAEL;
+    Edge1->NextInAEL = Edge2->NextInAEL;
+    if( Edge1->NextInAEL ) Edge1->NextInAEL->PrevInAEL = Edge1;
+    Edge1->PrevInAEL = Edge2->PrevInAEL;
+    if( Edge1->PrevInAEL ) Edge1->PrevInAEL->NextInAEL = Edge1;
+    Edge2->NextInAEL = Next;
+    if( Edge2->NextInAEL ) Edge2->NextInAEL->PrevInAEL = Edge2;
+    Edge2->PrevInAEL = Prev;
+    if( Edge2->PrevInAEL ) Edge2->PrevInAEL->NextInAEL = Edge2;
+  }
+
+  if( !Edge1->PrevInAEL ) m_ActiveEdges = Edge1;
+  else if( !Edge2->PrevInAEL ) m_ActiveEdges = Edge2;
+}
+//------------------------------------------------------------------------------
+
+void Clipper::SwapPositionsInSEL(TEdge *Edge1, TEdge *Edge2)
+{
+  if(  !( Edge1->NextInSEL ) &&  !( Edge1->PrevInSEL ) ) return;
+  if(  !( Edge2->NextInSEL ) &&  !( Edge2->PrevInSEL ) ) return;
+
+  if(  Edge1->NextInSEL == Edge2 )
+  {
+    TEdge* Next = Edge2->NextInSEL;
+    if( Next ) Next->PrevInSEL = Edge1;
+    TEdge* Prev = Edge1->PrevInSEL;
+    if( Prev ) Prev->NextInSEL = Edge2;
+    Edge2->PrevInSEL = Prev;
+    Edge2->NextInSEL = Edge1;
+    Edge1->PrevInSEL = Edge2;
+    Edge1->NextInSEL = Next;
+  }
+  else if(  Edge2->NextInSEL == Edge1 )
+  {
+    TEdge* Next = Edge1->NextInSEL;
+    if( Next ) Next->PrevInSEL = Edge2;
+    TEdge* Prev = Edge2->PrevInSEL;
+    if( Prev ) Prev->NextInSEL = Edge1;
+    Edge1->PrevInSEL = Prev;
+    Edge1->NextInSEL = Edge2;
+    Edge2->PrevInSEL = Edge1;
+    Edge2->NextInSEL = Next;
+  }
+  else
+  {
+    TEdge* Next = Edge1->NextInSEL;
+    TEdge* Prev = Edge1->PrevInSEL;
+    Edge1->NextInSEL = Edge2->NextInSEL;
+    if( Edge1->NextInSEL ) Edge1->NextInSEL->PrevInSEL = Edge1;
+    Edge1->PrevInSEL = Edge2->PrevInSEL;
+    if( Edge1->PrevInSEL ) Edge1->PrevInSEL->NextInSEL = Edge1;
+    Edge2->NextInSEL = Next;
+    if( Edge2->NextInSEL ) Edge2->NextInSEL->PrevInSEL = Edge2;
+    Edge2->PrevInSEL = Prev;
+    if( Edge2->PrevInSEL ) Edge2->PrevInSEL->NextInSEL = Edge2;
+  }
+
+  if( !Edge1->PrevInSEL ) m_SortedEdges = Edge1;
+  else if( !Edge2->PrevInSEL ) m_SortedEdges = Edge2;
+}
+//------------------------------------------------------------------------------
+
+TEdge* GetNextInAEL(TEdge *e, Direction dir)
+{
+  return dir == dLeftToRight ? e->NextInAEL : e->PrevInAEL;
+}
+//------------------------------------------------------------------------------
+
+void GetHorzDirection(TEdge& HorzEdge, Direction& Dir, cInt& Left, cInt& Right)
+{
+  if (HorzEdge.Bot.X < HorzEdge.Top.X)
+  {
+    Left = HorzEdge.Bot.X;
+    Right = HorzEdge.Top.X;
+    Dir = dLeftToRight;
+  } else
+  {
+    Left = HorzEdge.Top.X;
+    Right = HorzEdge.Bot.X;
+    Dir = dRightToLeft;
+  }
+}
+//------------------------------------------------------------------------
+
+/*******************************************************************************
+* Notes: Horizontal edges (HEs) at scanline intersections (ie at the Top or    *
+* Bottom of a scanbeam) are processed as if layered. The order in which HEs    *
+* are processed doesn't matter. HEs intersect with other HE Bot.Xs only [#]    *
+* (or they could intersect with Top.Xs only, ie EITHER Bot.Xs OR Top.Xs),      *
+* and with other non-horizontal edges [*]. Once these intersections are        *
+* processed, intermediate HEs then 'promote' the Edge above (NextInLML) into   *
+* the AEL. These 'promoted' edges may in turn intersect [%] with other HEs.    *
+*******************************************************************************/
+
+void Clipper::ProcessHorizontal(TEdge *horzEdge)
+{
+  Direction dir;
+  cInt horzLeft, horzRight;
+  bool IsOpen = (horzEdge->OutIdx >= 0 && m_PolyOuts[horzEdge->OutIdx]->IsOpen);
+
+  GetHorzDirection(*horzEdge, dir, horzLeft, horzRight);
+
+  TEdge* eLastHorz = horzEdge, *eMaxPair = 0;
+  while (eLastHorz->NextInLML && IsHorizontal(*eLastHorz->NextInLML)) 
+    eLastHorz = eLastHorz->NextInLML;
+  if (!eLastHorz->NextInLML)
+    eMaxPair = GetMaximaPair(eLastHorz);
+
+  MaximaList::const_iterator maxIt;
+  MaximaList::reverse_iterator maxRit;
+  if (m_Maxima.size() > 0)
+  {
+      //get the first maxima in range (X) ...
+      if (dir == dLeftToRight)
+      {
+          maxIt = m_Maxima.begin();
+          while (maxIt != m_Maxima.end() && *maxIt <= horzEdge->Bot.X) maxIt++;
+          if (maxIt != m_Maxima.end() && *maxIt >= eLastHorz->Top.X)
+              maxIt = m_Maxima.end();
+      }
+      else
+      {
+          maxRit = m_Maxima.rbegin();
+          while (maxRit != m_Maxima.rend() && *maxRit > horzEdge->Bot.X) maxRit++;
+          if (maxRit != m_Maxima.rend() && *maxRit <= eLastHorz->Top.X)
+              maxRit = m_Maxima.rend();
+      }
+  }
+
+  OutPt* op1 = 0;
+
+  for (;;) //loop through consec. horizontal edges
+  {
+		  
+    bool IsLastHorz = (horzEdge == eLastHorz);
+    TEdge* e = GetNextInAEL(horzEdge, dir);
+    while(e)
+    {
+
+        //this code block inserts extra coords into horizontal edges (in output
+        //polygons) whereever maxima touch these horizontal edges. This helps
+        //'simplifying' polygons (ie if the Simplify property is set).
+        if (m_Maxima.size() > 0)
+        {
+            if (dir == dLeftToRight)
+            {
+                while (maxIt != m_Maxima.end() && *maxIt < e->Curr.X) 
+                {
+                  if (horzEdge->OutIdx >= 0 && !IsOpen)
+                    AddOutPt(horzEdge, IntPoint(*maxIt, horzEdge->Bot.Y));
+                  maxIt++;
+                }
+            }
+            else
+            {
+                while (maxRit != m_Maxima.rend() && *maxRit > e->Curr.X)
+                {
+                  if (horzEdge->OutIdx >= 0 && !IsOpen)
+                    AddOutPt(horzEdge, IntPoint(*maxRit, horzEdge->Bot.Y));
+                  maxRit++;
+                }
+            }
+        };
+
+        if ((dir == dLeftToRight && e->Curr.X > horzRight) ||
+			(dir == dRightToLeft && e->Curr.X < horzLeft)) break;
+
+		//Also break if we've got to the end of an intermediate horizontal edge ...
+		//nb: Smaller Dx's are to the right of larger Dx's ABOVE the horizontal.
+		if (e->Curr.X == horzEdge->Top.X && horzEdge->NextInLML && 
+			e->Dx < horzEdge->NextInLML->Dx) break;
+
+    if (horzEdge->OutIdx >= 0 && !IsOpen)  //note: may be done multiple times
+		{
+            op1 = AddOutPt(horzEdge, e->Curr);
+			TEdge* eNextHorz = m_SortedEdges;
+			while (eNextHorz)
+			{
+				if (eNextHorz->OutIdx >= 0 &&
+					HorzSegmentsOverlap(horzEdge->Bot.X,
+					horzEdge->Top.X, eNextHorz->Bot.X, eNextHorz->Top.X))
+				{
+                    OutPt* op2 = GetLastOutPt(eNextHorz);
+                    AddJoin(op2, op1, eNextHorz->Top);
+				}
+				eNextHorz = eNextHorz->NextInSEL;
+			}
+			AddGhostJoin(op1, horzEdge->Bot);
+		}
+		
+		//OK, so far we're still in range of the horizontal Edge  but make sure
+        //we're at the last of consec. horizontals when matching with eMaxPair
+        if(e == eMaxPair && IsLastHorz)
+        {
+          if (horzEdge->OutIdx >= 0)
+            AddLocalMaxPoly(horzEdge, eMaxPair, horzEdge->Top);
+          DeleteFromAEL(horzEdge);
+          DeleteFromAEL(eMaxPair);
+          return;
+        }
+        
+		if(dir == dLeftToRight)
+        {
+          IntPoint Pt = IntPoint(e->Curr.X, horzEdge->Curr.Y);
+          IntersectEdges(horzEdge, e, Pt);
+        }
+        else
+        {
+          IntPoint Pt = IntPoint(e->Curr.X, horzEdge->Curr.Y);
+          IntersectEdges( e, horzEdge, Pt);
+        }
+        TEdge* eNext = GetNextInAEL(e, dir);
+        SwapPositionsInAEL( horzEdge, e );
+        e = eNext;
+    } //end while(e)
+
+	//Break out of loop if HorzEdge.NextInLML is not also horizontal ...
+	if (!horzEdge->NextInLML || !IsHorizontal(*horzEdge->NextInLML)) break;
+
+	UpdateEdgeIntoAEL(horzEdge);
+    if (horzEdge->OutIdx >= 0) AddOutPt(horzEdge, horzEdge->Bot);
+    GetHorzDirection(*horzEdge, dir, horzLeft, horzRight);
+
+  } //end for (;;)
+
+  if (horzEdge->OutIdx >= 0 && !op1)
+  {
+      op1 = GetLastOutPt(horzEdge);
+      TEdge* eNextHorz = m_SortedEdges;
+      while (eNextHorz)
+      {
+          if (eNextHorz->OutIdx >= 0 &&
+              HorzSegmentsOverlap(horzEdge->Bot.X,
+              horzEdge->Top.X, eNextHorz->Bot.X, eNextHorz->Top.X))
+          {
+              OutPt* op2 = GetLastOutPt(eNextHorz);
+              AddJoin(op2, op1, eNextHorz->Top);
+          }
+          eNextHorz = eNextHorz->NextInSEL;
+      }
+      AddGhostJoin(op1, horzEdge->Top);
+  }
+
+  if (horzEdge->NextInLML)
+  {
+    if(horzEdge->OutIdx >= 0)
+    {
+      op1 = AddOutPt( horzEdge, horzEdge->Top);
+      UpdateEdgeIntoAEL(horzEdge);
+      if (horzEdge->WindDelta == 0) return;
+      //nb: HorzEdge is no longer horizontal here
+      TEdge* ePrev = horzEdge->PrevInAEL;
+      TEdge* eNext = horzEdge->NextInAEL;
+      if (ePrev && ePrev->Curr.X == horzEdge->Bot.X &&
+        ePrev->Curr.Y == horzEdge->Bot.Y && ePrev->WindDelta != 0 &&
+        (ePrev->OutIdx >= 0 && ePrev->Curr.Y > ePrev->Top.Y &&
+        SlopesEqual(*horzEdge, *ePrev, m_UseFullRange)))
+      {
+        OutPt* op2 = AddOutPt(ePrev, horzEdge->Bot);
+        AddJoin(op1, op2, horzEdge->Top);
+      }
+      else if (eNext && eNext->Curr.X == horzEdge->Bot.X &&
+        eNext->Curr.Y == horzEdge->Bot.Y && eNext->WindDelta != 0 &&
+        eNext->OutIdx >= 0 && eNext->Curr.Y > eNext->Top.Y &&
+        SlopesEqual(*horzEdge, *eNext, m_UseFullRange))
+      {
+        OutPt* op2 = AddOutPt(eNext, horzEdge->Bot);
+        AddJoin(op1, op2, horzEdge->Top);
+      }
+    }
+    else
+      UpdateEdgeIntoAEL(horzEdge); 
+  }
+  else
+  {
+    if (horzEdge->OutIdx >= 0) AddOutPt(horzEdge, horzEdge->Top);
+    DeleteFromAEL(horzEdge);
+  }
+}
+//------------------------------------------------------------------------------
+
+void Clipper::UpdateEdgeIntoAEL(TEdge *&e)
+{
+  if( !e->NextInLML ) throw
+    clipperException("UpdateEdgeIntoAEL: invalid call");
+
+  e->NextInLML->OutIdx = e->OutIdx;
+  TEdge* AelPrev = e->PrevInAEL;
+  TEdge* AelNext = e->NextInAEL;
+  if (AelPrev) AelPrev->NextInAEL = e->NextInLML;
+  else m_ActiveEdges = e->NextInLML;
+  if (AelNext) AelNext->PrevInAEL = e->NextInLML;
+  e->NextInLML->Side = e->Side;
+  e->NextInLML->WindDelta = e->WindDelta;
+  e->NextInLML->WindCnt = e->WindCnt;
+  e->NextInLML->WindCnt2 = e->WindCnt2;
+  e = e->NextInLML;
+  e->Curr = e->Bot;
+  e->PrevInAEL = AelPrev;
+  e->NextInAEL = AelNext;
+  if (!IsHorizontal(*e)) InsertScanbeam(e->Top.Y);
+}
+//------------------------------------------------------------------------------
+
+bool Clipper::ProcessIntersections(const cInt topY)
+{
+  if( !m_ActiveEdges ) return true;
+  try {
+    BuildIntersectList(topY);
+    size_t IlSize = m_IntersectList.size();
+    if (IlSize == 0) return true;
+    if (IlSize == 1 || FixupIntersectionOrder()) ProcessIntersectList();
+    else return false;
+  }
+  catch(...) 
+  {
+    m_SortedEdges = 0;
+    DisposeIntersectNodes();
+    throw clipperException("ProcessIntersections error");
+  }
+  m_SortedEdges = 0;
+  return true;
+}
+//------------------------------------------------------------------------------
+
+void Clipper::DisposeIntersectNodes()
+{
+  for (size_t i = 0; i < m_IntersectList.size(); ++i )
+    delete m_IntersectList[i];
+  m_IntersectList.clear();
+}
+//------------------------------------------------------------------------------
+
+void Clipper::BuildIntersectList(const cInt topY)
+{
+  if ( !m_ActiveEdges ) return;
+
+  //prepare for sorting ...
+  TEdge* e = m_ActiveEdges;
+  m_SortedEdges = e;
+  while( e )
+  {
+    e->PrevInSEL = e->PrevInAEL;
+    e->NextInSEL = e->NextInAEL;
+    e->Curr.X = TopX( *e, topY );
+    e = e->NextInAEL;
+  }
+
+  //bubblesort ...
+  bool isModified;
+  do
+  {
+    isModified = false;
+    e = m_SortedEdges;
+    while( e->NextInSEL )
+    {
+      TEdge *eNext = e->NextInSEL;
+      IntPoint Pt;
+      if(e->Curr.X > eNext->Curr.X)
+      {
+        IntersectPoint(*e, *eNext, Pt);
+        IntersectNode * newNode = new IntersectNode;
+        newNode->Edge1 = e;
+        newNode->Edge2 = eNext;
+        newNode->Pt = Pt;
+        m_IntersectList.push_back(newNode);
+
+        SwapPositionsInSEL(e, eNext);
+        isModified = true;
+      }
+      else
+        e = eNext;
+    }
+    if( e->PrevInSEL ) e->PrevInSEL->NextInSEL = 0;
+    else break;
+  }
+  while ( isModified );
+  m_SortedEdges = 0; //important
+}
+//------------------------------------------------------------------------------
+
+
+void Clipper::ProcessIntersectList()
+{
+  for (size_t i = 0; i < m_IntersectList.size(); ++i)
+  {
+    IntersectNode* iNode = m_IntersectList[i];
+    {
+      IntersectEdges( iNode->Edge1, iNode->Edge2, iNode->Pt);
+      SwapPositionsInAEL( iNode->Edge1 , iNode->Edge2 );
+    }
+    delete iNode;
+  }
+  m_IntersectList.clear();
+}
+//------------------------------------------------------------------------------
+
+bool IntersectListSort(IntersectNode* node1, IntersectNode* node2)
+{
+  return node2->Pt.Y < node1->Pt.Y;
+}
+//------------------------------------------------------------------------------
+
+inline bool EdgesAdjacent(const IntersectNode &inode)
+{
+  return (inode.Edge1->NextInSEL == inode.Edge2) ||
+    (inode.Edge1->PrevInSEL == inode.Edge2);
+}
+//------------------------------------------------------------------------------
+
+bool Clipper::FixupIntersectionOrder()
+{
+  //pre-condition: intersections are sorted Bottom-most first.
+  //Now it's crucial that intersections are made only between adjacent edges,
+  //so to ensure this the order of intersections may need adjusting ...
+  CopyAELToSEL();
+  std::sort(m_IntersectList.begin(), m_IntersectList.end(), IntersectListSort);
+  size_t cnt = m_IntersectList.size();
+  for (size_t i = 0; i < cnt; ++i) 
+  {
+    if (!EdgesAdjacent(*m_IntersectList[i]))
+    {
+      size_t j = i + 1;
+      while (j < cnt && !EdgesAdjacent(*m_IntersectList[j])) j++;
+      if (j == cnt)  return false;
+      std::swap(m_IntersectList[i], m_IntersectList[j]);
+    }
+    SwapPositionsInSEL(m_IntersectList[i]->Edge1, m_IntersectList[i]->Edge2);
+  }
+  return true;
+}
+//------------------------------------------------------------------------------
+
+void Clipper::DoMaxima(TEdge *e)
+{
+  TEdge* eMaxPair = GetMaximaPair(e);
+  if (!eMaxPair)
+  {
+    if (e->OutIdx >= 0)
+      AddOutPt(e, e->Top);
+    DeleteFromAEL(e);
+    return;
+  }
+
+  TEdge* eNext = e->NextInAEL;
+  while(eNext && eNext != eMaxPair)
+  {
+    IntersectEdges(e, eNext, e->Top);
+    SwapPositionsInAEL(e, eNext);
+    eNext = e->NextInAEL;
+  }
+
+  if(e->OutIdx == Unassigned && eMaxPair->OutIdx == Unassigned)
+  {
+    DeleteFromAEL(e);
+    DeleteFromAEL(eMaxPair);
+  }
+  else if( e->OutIdx >= 0 && eMaxPair->OutIdx >= 0 )
+  {
+    if (e->OutIdx >= 0) AddLocalMaxPoly(e, eMaxPair, e->Top);
+    DeleteFromAEL(e);
+    DeleteFromAEL(eMaxPair);
+  }
+#ifdef use_lines
+  else if (e->WindDelta == 0)
+  {
+    if (e->OutIdx >= 0) 
+    {
+      AddOutPt(e, e->Top);
+      e->OutIdx = Unassigned;
+    }
+    DeleteFromAEL(e);
+
+    if (eMaxPair->OutIdx >= 0)
+    {
+      AddOutPt(eMaxPair, e->Top);
+      eMaxPair->OutIdx = Unassigned;
+    }
+    DeleteFromAEL(eMaxPair);
+  } 
+#endif
+  else throw clipperException("DoMaxima error");
+}
+//------------------------------------------------------------------------------
+
+void Clipper::ProcessEdgesAtTopOfScanbeam(const cInt topY)
+{
+  TEdge* e = m_ActiveEdges;
+  while( e )
+  {
+    //1. process maxima, treating them as if they're 'bent' horizontal edges,
+    //   but exclude maxima with horizontal edges. nb: e can't be a horizontal.
+    bool IsMaximaEdge = IsMaxima(e, topY);
+
+    if(IsMaximaEdge)
+    {
+      TEdge* eMaxPair = GetMaximaPair(e);
+      IsMaximaEdge = (!eMaxPair || !IsHorizontal(*eMaxPair));
+    }
+
+    if(IsMaximaEdge)
+    {
+      if (m_StrictSimple) m_Maxima.push_back(e->Top.X);
+      TEdge* ePrev = e->PrevInAEL;
+      DoMaxima(e);
+      if( !ePrev ) e = m_ActiveEdges;
+      else e = ePrev->NextInAEL;
+    }
+    else
+    {
+      //2. promote horizontal edges, otherwise update Curr.X and Curr.Y ...
+      if (IsIntermediate(e, topY) && IsHorizontal(*e->NextInLML))
+      {
+        UpdateEdgeIntoAEL(e);
+        if (e->OutIdx >= 0)
+          AddOutPt(e, e->Bot);
+        AddEdgeToSEL(e);
+      } 
+      else
+      {
+        e->Curr.X = TopX( *e, topY );
+        e->Curr.Y = topY;
+      }
+
+      //When StrictlySimple and 'e' is being touched by another edge, then
+      //make sure both edges have a vertex here ...
+      if (m_StrictSimple)
+      {  
+        TEdge* ePrev = e->PrevInAEL;
+        if ((e->OutIdx >= 0) && (e->WindDelta != 0) && ePrev && (ePrev->OutIdx >= 0) &&
+          (ePrev->Curr.X == e->Curr.X) && (ePrev->WindDelta != 0))
+        {
+          IntPoint pt = e->Curr;
+#ifdef use_xyz
+          SetZ(pt, *ePrev, *e);
+#endif
+          OutPt* op = AddOutPt(ePrev, pt);
+          OutPt* op2 = AddOutPt(e, pt);
+          AddJoin(op, op2, pt); //StrictlySimple (type-3) join
+        }
+      }
+
+      e = e->NextInAEL;
+    }
+  }
+
+  //3. Process horizontals at the Top of the scanbeam ...
+  m_Maxima.sort();
+  ProcessHorizontals();
+  m_Maxima.clear();
+
+  //4. Promote intermediate vertices ...
+  e = m_ActiveEdges;
+  while(e)
+  {
+    if(IsIntermediate(e, topY))
+    {
+      OutPt* op = 0;
+      if( e->OutIdx >= 0 ) 
+        op = AddOutPt(e, e->Top);
+      UpdateEdgeIntoAEL(e);
+
+      //if output polygons share an edge, they'll need joining later ...
+      TEdge* ePrev = e->PrevInAEL;
+      TEdge* eNext = e->NextInAEL;
+      if (ePrev && ePrev->Curr.X == e->Bot.X &&
+        ePrev->Curr.Y == e->Bot.Y && op &&
+        ePrev->OutIdx >= 0 && ePrev->Curr.Y > ePrev->Top.Y &&
+        SlopesEqual(*e, *ePrev, m_UseFullRange) &&
+        (e->WindDelta != 0) && (ePrev->WindDelta != 0))
+      {
+        OutPt* op2 = AddOutPt(ePrev, e->Bot);
+        AddJoin(op, op2, e->Top);
+      }
+      else if (eNext && eNext->Curr.X == e->Bot.X &&
+        eNext->Curr.Y == e->Bot.Y && op &&
+        eNext->OutIdx >= 0 && eNext->Curr.Y > eNext->Top.Y &&
+        SlopesEqual(*e, *eNext, m_UseFullRange) &&
+        (e->WindDelta != 0) && (eNext->WindDelta != 0))
+      {
+        OutPt* op2 = AddOutPt(eNext, e->Bot);
+        AddJoin(op, op2, e->Top);
+      }
+    }
+    e = e->NextInAEL;
+  }
+}
+//------------------------------------------------------------------------------
+
+void Clipper::FixupOutPolyline(OutRec &outrec)
+{
+  OutPt *pp = outrec.Pts;
+  OutPt *lastPP = pp->Prev;
+  while (pp != lastPP)
+  {
+    pp = pp->Next;
+    if (pp->Pt == pp->Prev->Pt)
+    {
+      if (pp == lastPP) lastPP = pp->Prev;
+      OutPt *tmpPP = pp->Prev;
+      tmpPP->Next = pp->Next;
+      pp->Next->Prev = tmpPP;
+      delete pp;
+      pp = tmpPP;
+    }
+  }
+
+  if (pp == pp->Prev)
+  {
+    DisposeOutPts(pp);
+    outrec.Pts = 0;
+    return;
+  }
+}
+//------------------------------------------------------------------------------
+
+void Clipper::FixupOutPolygon(OutRec &outrec)
+{
+    //FixupOutPolygon() - removes duplicate points and simplifies consecutive
+    //parallel edges by removing the middle vertex.
+    OutPt *lastOK = 0;
+    outrec.BottomPt = 0;
+    OutPt *pp = outrec.Pts;
+    bool preserveCol = m_PreserveCollinear || m_StrictSimple;
+
+    for (;;)
+    {
+        if (pp->Prev == pp || pp->Prev == pp->Next)
+        {
+            DisposeOutPts(pp);
+            outrec.Pts = 0;
+            return;
+        }
+
+        //test for duplicate points and collinear edges ...
+        if ((pp->Pt == pp->Next->Pt) || (pp->Pt == pp->Prev->Pt) ||
+            (SlopesEqual(pp->Prev->Pt, pp->Pt, pp->Next->Pt, m_UseFullRange) &&
+            (!preserveCol || !Pt2IsBetweenPt1AndPt3(pp->Prev->Pt, pp->Pt, pp->Next->Pt))))
+        {
+            lastOK = 0;
+            OutPt *tmp = pp;
+            pp->Prev->Next = pp->Next;
+            pp->Next->Prev = pp->Prev;
+            pp = pp->Prev;
+            delete tmp;
+        }
+        else if (pp == lastOK) break;
+        else
+        {
+            if (!lastOK) lastOK = pp;
+            pp = pp->Next;
+        }
+    }
+    outrec.Pts = pp;
+}
+//------------------------------------------------------------------------------
+
+int PointCount(OutPt *Pts)
+{
+    if (!Pts) return 0;
+    int result = 0;
+    OutPt* p = Pts;
+    do
+    {
+        result++;
+        p = p->Next;
+    }
+    while (p != Pts);
+    return result;
+}
+//------------------------------------------------------------------------------
+
+void Clipper::BuildResult(Paths &polys)
+{
+  polys.reserve(m_PolyOuts.size());
+  for (PolyOutList::size_type i = 0; i < m_PolyOuts.size(); ++i)
+  {
+    if (!m_PolyOuts[i]->Pts) continue;
+    Path pg;
+    OutPt* p = m_PolyOuts[i]->Pts->Prev;
+    int cnt = PointCount(p);
+    if (cnt < 2) continue;
+    pg.reserve(cnt);
+    for (int i = 0; i < cnt; ++i)
+    {
+      pg.push_back(p->Pt);
+      p = p->Prev;
+    }
+    polys.push_back(pg);
+  }
+}
+//------------------------------------------------------------------------------
+
+void Clipper::BuildResult2(PolyTree& polytree)
+{
+    polytree.Clear();
+    polytree.AllNodes.reserve(m_PolyOuts.size());
+    //add each output polygon/contour to polytree ...
+    for (PolyOutList::size_type i = 0; i < m_PolyOuts.size(); i++)
+    {
+        OutRec* outRec = m_PolyOuts[i];
+        int cnt = PointCount(outRec->Pts);
+        if ((outRec->IsOpen && cnt < 2) || (!outRec->IsOpen && cnt < 3)) continue;
+        FixHoleLinkage(*outRec);
+        PolyNode* pn = new PolyNode();
+        //nb: polytree takes ownership of all the PolyNodes
+        polytree.AllNodes.push_back(pn);
+        outRec->PolyNd = pn;
+        pn->Parent = 0;
+        pn->Index = 0;
+        pn->Contour.reserve(cnt);
+        OutPt *op = outRec->Pts->Prev;
+        for (int j = 0; j < cnt; j++)
+        {
+            pn->Contour.push_back(op->Pt);
+            op = op->Prev;
+        }
+    }
+
+    //fixup PolyNode links etc ...
+    polytree.Childs.reserve(m_PolyOuts.size());
+    for (PolyOutList::size_type i = 0; i < m_PolyOuts.size(); i++)
+    {
+        OutRec* outRec = m_PolyOuts[i];
+        if (!outRec->PolyNd) continue;
+        if (outRec->IsOpen) 
+        {
+          outRec->PolyNd->m_IsOpen = true;
+          polytree.AddChild(*outRec->PolyNd);
+        }
+        else if (outRec->FirstLeft && outRec->FirstLeft->PolyNd) 
+          outRec->FirstLeft->PolyNd->AddChild(*outRec->PolyNd);
+        else
+          polytree.AddChild(*outRec->PolyNd);
+    }
+}
+//------------------------------------------------------------------------------
+
+void SwapIntersectNodes(IntersectNode &int1, IntersectNode &int2)
+{
+  //just swap the contents (because fIntersectNodes is a single-linked-list)
+  IntersectNode inode = int1; //gets a copy of Int1
+  int1.Edge1 = int2.Edge1;
+  int1.Edge2 = int2.Edge2;
+  int1.Pt = int2.Pt;
+  int2.Edge1 = inode.Edge1;
+  int2.Edge2 = inode.Edge2;
+  int2.Pt = inode.Pt;
+}
+//------------------------------------------------------------------------------
+
+inline bool E2InsertsBeforeE1(TEdge &e1, TEdge &e2)
+{
+  if (e2.Curr.X == e1.Curr.X) 
+  {
+    if (e2.Top.Y > e1.Top.Y)
+      return e2.Top.X < TopX(e1, e2.Top.Y); 
+      else return e1.Top.X > TopX(e2, e1.Top.Y);
+  } 
+  else return e2.Curr.X < e1.Curr.X;
+}
+//------------------------------------------------------------------------------
+
+bool GetOverlap(const cInt a1, const cInt a2, const cInt b1, const cInt b2, 
+    cInt& Left, cInt& Right)
+{
+  if (a1 < a2)
+  {
+    if (b1 < b2) {Left = std::max(a1,b1); Right = std::min(a2,b2);}
+    else {Left = std::max(a1,b2); Right = std::min(a2,b1);}
+  } 
+  else
+  {
+    if (b1 < b2) {Left = std::max(a2,b1); Right = std::min(a1,b2);}
+    else {Left = std::max(a2,b2); Right = std::min(a1,b1);}
+  }
+  return Left < Right;
+}
+//------------------------------------------------------------------------------
+
+inline void UpdateOutPtIdxs(OutRec& outrec)
+{  
+  OutPt* op = outrec.Pts;
+  do
+  {
+    op->Idx = outrec.Idx;
+    op = op->Prev;
+  }
+  while(op != outrec.Pts);
+}
+//------------------------------------------------------------------------------
+
+void Clipper::InsertEdgeIntoAEL(TEdge *edge, TEdge* startEdge)
+{
+  if(!m_ActiveEdges)
+  {
+    edge->PrevInAEL = 0;
+    edge->NextInAEL = 0;
+    m_ActiveEdges = edge;
+  }
+  else if(!startEdge && E2InsertsBeforeE1(*m_ActiveEdges, *edge))
+  {
+      edge->PrevInAEL = 0;
+      edge->NextInAEL = m_ActiveEdges;
+      m_ActiveEdges->PrevInAEL = edge;
+      m_ActiveEdges = edge;
+  } 
+  else
+  {
+    if(!startEdge) startEdge = m_ActiveEdges;
+    while(startEdge->NextInAEL  && 
+      !E2InsertsBeforeE1(*startEdge->NextInAEL , *edge))
+        startEdge = startEdge->NextInAEL;
+    edge->NextInAEL = startEdge->NextInAEL;
+    if(startEdge->NextInAEL) startEdge->NextInAEL->PrevInAEL = edge;
+    edge->PrevInAEL = startEdge;
+    startEdge->NextInAEL = edge;
+  }
+}
+//----------------------------------------------------------------------
+
+OutPt* DupOutPt(OutPt* outPt, bool InsertAfter)
+{
+  OutPt* result = new OutPt;
+  result->Pt = outPt->Pt;
+  result->Idx = outPt->Idx;
+  if (InsertAfter)
+  {
+    result->Next = outPt->Next;
+    result->Prev = outPt;
+    outPt->Next->Prev = result;
+    outPt->Next = result;
+  } 
+  else
+  {
+    result->Prev = outPt->Prev;
+    result->Next = outPt;
+    outPt->Prev->Next = result;
+    outPt->Prev = result;
+  }
+  return result;
+}
+//------------------------------------------------------------------------------
+
+bool JoinHorz(OutPt* op1, OutPt* op1b, OutPt* op2, OutPt* op2b,
+  const IntPoint Pt, bool DiscardLeft)
+{
+  Direction Dir1 = (op1->Pt.X > op1b->Pt.X ? dRightToLeft : dLeftToRight);
+  Direction Dir2 = (op2->Pt.X > op2b->Pt.X ? dRightToLeft : dLeftToRight);
+  if (Dir1 == Dir2) return false;
+
+  //When DiscardLeft, we want Op1b to be on the Left of Op1, otherwise we
+  //want Op1b to be on the Right. (And likewise with Op2 and Op2b.)
+  //So, to facilitate this while inserting Op1b and Op2b ...
+  //when DiscardLeft, make sure we're AT or RIGHT of Pt before adding Op1b,
+  //otherwise make sure we're AT or LEFT of Pt. (Likewise with Op2b.)
+  if (Dir1 == dLeftToRight) 
+  {
+    while (op1->Next->Pt.X <= Pt.X && 
+      op1->Next->Pt.X >= op1->Pt.X && op1->Next->Pt.Y == Pt.Y)  
+        op1 = op1->Next;
+    if (DiscardLeft && (op1->Pt.X != Pt.X)) op1 = op1->Next;
+    op1b = DupOutPt(op1, !DiscardLeft);
+    if (op1b->Pt != Pt) 
+    {
+      op1 = op1b;
+      op1->Pt = Pt;
+      op1b = DupOutPt(op1, !DiscardLeft);
+    }
+  } 
+  else
+  {
+    while (op1->Next->Pt.X >= Pt.X && 
+      op1->Next->Pt.X <= op1->Pt.X && op1->Next->Pt.Y == Pt.Y) 
+        op1 = op1->Next;
+    if (!DiscardLeft && (op1->Pt.X != Pt.X)) op1 = op1->Next;
+    op1b = DupOutPt(op1, DiscardLeft);
+    if (op1b->Pt != Pt)
+    {
+      op1 = op1b;
+      op1->Pt = Pt;
+      op1b = DupOutPt(op1, DiscardLeft);
+    }
+  }
+
+  if (Dir2 == dLeftToRight)
+  {
+    while (op2->Next->Pt.X <= Pt.X && 
+      op2->Next->Pt.X >= op2->Pt.X && op2->Next->Pt.Y == Pt.Y)
+        op2 = op2->Next;
+    if (DiscardLeft && (op2->Pt.X != Pt.X)) op2 = op2->Next;
+    op2b = DupOutPt(op2, !DiscardLeft);
+    if (op2b->Pt != Pt)
+    {
+      op2 = op2b;
+      op2->Pt = Pt;
+      op2b = DupOutPt(op2, !DiscardLeft);
+    };
+  } else
+  {
+    while (op2->Next->Pt.X >= Pt.X && 
+      op2->Next->Pt.X <= op2->Pt.X && op2->Next->Pt.Y == Pt.Y) 
+        op2 = op2->Next;
+    if (!DiscardLeft && (op2->Pt.X != Pt.X)) op2 = op2->Next;
+    op2b = DupOutPt(op2, DiscardLeft);
+    if (op2b->Pt != Pt)
+    {
+      op2 = op2b;
+      op2->Pt = Pt;
+      op2b = DupOutPt(op2, DiscardLeft);
+    };
+  };
+
+  if ((Dir1 == dLeftToRight) == DiscardLeft)
+  {
+    op1->Prev = op2;
+    op2->Next = op1;
+    op1b->Next = op2b;
+    op2b->Prev = op1b;
+  }
+  else
+  {
+    op1->Next = op2;
+    op2->Prev = op1;
+    op1b->Prev = op2b;
+    op2b->Next = op1b;
+  }
+  return true;
+}
+//------------------------------------------------------------------------------
+
+bool Clipper::JoinPoints(Join *j, OutRec* outRec1, OutRec* outRec2)
+{
+  OutPt *op1 = j->OutPt1, *op1b;
+  OutPt *op2 = j->OutPt2, *op2b;
+
+  //There are 3 kinds of joins for output polygons ...
+  //1. Horizontal joins where Join.OutPt1 & Join.OutPt2 are vertices anywhere
+  //along (horizontal) collinear edges (& Join.OffPt is on the same horizontal).
+  //2. Non-horizontal joins where Join.OutPt1 & Join.OutPt2 are at the same
+  //location at the Bottom of the overlapping segment (& Join.OffPt is above).
+  //3. StrictSimple joins where edges touch but are not collinear and where
+  //Join.OutPt1, Join.OutPt2 & Join.OffPt all share the same point.
+  bool isHorizontal = (j->OutPt1->Pt.Y == j->OffPt.Y);
+
+  if (isHorizontal  && (j->OffPt == j->OutPt1->Pt) &&
+  (j->OffPt == j->OutPt2->Pt))
+  {
+    //Strictly Simple join ...
+    if (outRec1 != outRec2) return false;
+    op1b = j->OutPt1->Next;
+    while (op1b != op1 && (op1b->Pt == j->OffPt)) 
+      op1b = op1b->Next;
+    bool reverse1 = (op1b->Pt.Y > j->OffPt.Y);
+    op2b = j->OutPt2->Next;
+    while (op2b != op2 && (op2b->Pt == j->OffPt)) 
+      op2b = op2b->Next;
+    bool reverse2 = (op2b->Pt.Y > j->OffPt.Y);
+    if (reverse1 == reverse2) return false;
+    if (reverse1)
+    {
+      op1b = DupOutPt(op1, false);
+      op2b = DupOutPt(op2, true);
+      op1->Prev = op2;
+      op2->Next = op1;
+      op1b->Next = op2b;
+      op2b->Prev = op1b;
+      j->OutPt1 = op1;
+      j->OutPt2 = op1b;
+      return true;
+    } else
+    {
+      op1b = DupOutPt(op1, true);
+      op2b = DupOutPt(op2, false);
+      op1->Next = op2;
+      op2->Prev = op1;
+      op1b->Prev = op2b;
+      op2b->Next = op1b;
+      j->OutPt1 = op1;
+      j->OutPt2 = op1b;
+      return true;
+    }
+  } 
+  else if (isHorizontal)
+  {
+    //treat horizontal joins differently to non-horizontal joins since with
+    //them we're not yet sure where the overlapping is. OutPt1.Pt & OutPt2.Pt
+    //may be anywhere along the horizontal edge.
+    op1b = op1;
+    while (op1->Prev->Pt.Y == op1->Pt.Y && op1->Prev != op1b && op1->Prev != op2)
+      op1 = op1->Prev;
+    while (op1b->Next->Pt.Y == op1b->Pt.Y && op1b->Next != op1 && op1b->Next != op2)
+      op1b = op1b->Next;
+    if (op1b->Next == op1 || op1b->Next == op2) return false; //a flat 'polygon'
+
+    op2b = op2;
+    while (op2->Prev->Pt.Y == op2->Pt.Y && op2->Prev != op2b && op2->Prev != op1b)
+      op2 = op2->Prev;
+    while (op2b->Next->Pt.Y == op2b->Pt.Y && op2b->Next != op2 && op2b->Next != op1)
+      op2b = op2b->Next;
+    if (op2b->Next == op2 || op2b->Next == op1) return false; //a flat 'polygon'
+
+    cInt Left, Right;
+    //Op1 --> Op1b & Op2 --> Op2b are the extremites of the horizontal edges
+    if (!GetOverlap(op1->Pt.X, op1b->Pt.X, op2->Pt.X, op2b->Pt.X, Left, Right))
+      return false;
+
+    //DiscardLeftSide: when overlapping edges are joined, a spike will created
+    //which needs to be cleaned up. However, we don't want Op1 or Op2 caught up
+    //on the discard Side as either may still be needed for other joins ...
+    IntPoint Pt;
+    bool DiscardLeftSide;
+    if (op1->Pt.X >= Left && op1->Pt.X <= Right) 
+    {
+      Pt = op1->Pt; DiscardLeftSide = (op1->Pt.X > op1b->Pt.X);
+    } 
+    else if (op2->Pt.X >= Left&& op2->Pt.X <= Right) 
+    {
+      Pt = op2->Pt; DiscardLeftSide = (op2->Pt.X > op2b->Pt.X);
+    } 
+    else if (op1b->Pt.X >= Left && op1b->Pt.X <= Right)
+    {
+      Pt = op1b->Pt; DiscardLeftSide = op1b->Pt.X > op1->Pt.X;
+    } 
+    else
+    {
+      Pt = op2b->Pt; DiscardLeftSide = (op2b->Pt.X > op2->Pt.X);
+    }
+    j->OutPt1 = op1; j->OutPt2 = op2;
+    return JoinHorz(op1, op1b, op2, op2b, Pt, DiscardLeftSide);
+  } else
+  {
+    //nb: For non-horizontal joins ...
+    //    1. Jr.OutPt1.Pt.Y == Jr.OutPt2.Pt.Y
+    //    2. Jr.OutPt1.Pt > Jr.OffPt.Y
+
+    //make sure the polygons are correctly oriented ...
+    op1b = op1->Next;
+    while ((op1b->Pt == op1->Pt) && (op1b != op1)) op1b = op1b->Next;
+    bool Reverse1 = ((op1b->Pt.Y > op1->Pt.Y) ||
+      !SlopesEqual(op1->Pt, op1b->Pt, j->OffPt, m_UseFullRange));
+    if (Reverse1)
+    {
+      op1b = op1->Prev;
+      while ((op1b->Pt == op1->Pt) && (op1b != op1)) op1b = op1b->Prev;
+      if ((op1b->Pt.Y > op1->Pt.Y) ||
+        !SlopesEqual(op1->Pt, op1b->Pt, j->OffPt, m_UseFullRange)) return false;
+    };
+    op2b = op2->Next;
+    while ((op2b->Pt == op2->Pt) && (op2b != op2))op2b = op2b->Next;
+    bool Reverse2 = ((op2b->Pt.Y > op2->Pt.Y) ||
+      !SlopesEqual(op2->Pt, op2b->Pt, j->OffPt, m_UseFullRange));
+    if (Reverse2)
+    {
+      op2b = op2->Prev;
+      while ((op2b->Pt == op2->Pt) && (op2b != op2)) op2b = op2b->Prev;
+      if ((op2b->Pt.Y > op2->Pt.Y) ||
+        !SlopesEqual(op2->Pt, op2b->Pt, j->OffPt, m_UseFullRange)) return false;
+    }
+
+    if ((op1b == op1) || (op2b == op2) || (op1b == op2b) ||
+      ((outRec1 == outRec2) && (Reverse1 == Reverse2))) return false;
+
+    if (Reverse1)
+    {
+      op1b = DupOutPt(op1, false);
+      op2b = DupOutPt(op2, true);
+      op1->Prev = op2;
+      op2->Next = op1;
+      op1b->Next = op2b;
+      op2b->Prev = op1b;
+      j->OutPt1 = op1;
+      j->OutPt2 = op1b;
+      return true;
+    } else
+    {
+      op1b = DupOutPt(op1, true);
+      op2b = DupOutPt(op2, false);
+      op1->Next = op2;
+      op2->Prev = op1;
+      op1b->Prev = op2b;
+      op2b->Next = op1b;
+      j->OutPt1 = op1;
+      j->OutPt2 = op1b;
+      return true;
+    }
+  }
+}
+//----------------------------------------------------------------------
+
+static OutRec* ParseFirstLeft(OutRec* FirstLeft)
+{
+  while (FirstLeft && !FirstLeft->Pts)
+    FirstLeft = FirstLeft->FirstLeft;
+  return FirstLeft;
+}
+//------------------------------------------------------------------------------
+
+void Clipper::FixupFirstLefts1(OutRec* OldOutRec, OutRec* NewOutRec)
+{ 
+  //tests if NewOutRec contains the polygon before reassigning FirstLeft
+  for (PolyOutList::size_type i = 0; i < m_PolyOuts.size(); ++i)
+  {
+    OutRec* outRec = m_PolyOuts[i];
+    if (!outRec->Pts || !outRec->FirstLeft) continue;
+    OutRec* firstLeft = ParseFirstLeft(outRec->FirstLeft);
+    if (firstLeft == OldOutRec)
+    {
+      if (Poly2ContainsPoly1(outRec->Pts, NewOutRec->Pts))
+        outRec->FirstLeft = NewOutRec;
+    }
+  }
+}
+//----------------------------------------------------------------------
+
+void Clipper::FixupFirstLefts2(OutRec* OldOutRec, OutRec* NewOutRec)
+{ 
+  //reassigns FirstLeft WITHOUT testing if NewOutRec contains the polygon
+  for (PolyOutList::size_type i = 0; i < m_PolyOuts.size(); ++i)
+  {
+    OutRec* outRec = m_PolyOuts[i];
+    if (outRec->FirstLeft == OldOutRec) outRec->FirstLeft = NewOutRec;
+  }
+}
+//----------------------------------------------------------------------
+
+void Clipper::JoinCommonEdges()
+{
+  for (JoinList::size_type i = 0; i < m_Joins.size(); i++)
+  {
+    Join* join = m_Joins[i];
+
+    OutRec *outRec1 = GetOutRec(join->OutPt1->Idx);
+    OutRec *outRec2 = GetOutRec(join->OutPt2->Idx);
+
+    if (!outRec1->Pts || !outRec2->Pts) continue;
+    if (outRec1->IsOpen || outRec2->IsOpen) continue;
+
+    //get the polygon fragment with the correct hole state (FirstLeft)
+    //before calling JoinPoints() ...
+    OutRec *holeStateRec;
+    if (outRec1 == outRec2) holeStateRec = outRec1;
+    else if (Param1RightOfParam2(outRec1, outRec2)) holeStateRec = outRec2;
+    else if (Param1RightOfParam2(outRec2, outRec1)) holeStateRec = outRec1;
+    else holeStateRec = GetLowermostRec(outRec1, outRec2);
+
+    if (!JoinPoints(join, outRec1, outRec2)) continue;
+
+    if (outRec1 == outRec2)
+    {
+      //instead of joining two polygons, we've just created a new one by
+      //splitting one polygon into two.
+      outRec1->Pts = join->OutPt1;
+      outRec1->BottomPt = 0;
+      outRec2 = CreateOutRec();
+      outRec2->Pts = join->OutPt2;
+
+      //update all OutRec2.Pts Idx's ...
+      UpdateOutPtIdxs(*outRec2);
+
+      //We now need to check every OutRec.FirstLeft pointer. If it points
+      //to OutRec1 it may need to point to OutRec2 instead ...
+      if (m_UsingPolyTree)
+        for (PolyOutList::size_type j = 0; j < m_PolyOuts.size() - 1; j++)
+        {
+          OutRec* oRec = m_PolyOuts[j];
+          if (!oRec->Pts || ParseFirstLeft(oRec->FirstLeft) != outRec1 ||
+            oRec->IsHole == outRec1->IsHole) continue;
+          if (Poly2ContainsPoly1(oRec->Pts, join->OutPt2))
+            oRec->FirstLeft = outRec2;
+        }
+
+      if (Poly2ContainsPoly1(outRec2->Pts, outRec1->Pts))
+      {
+        //outRec2 is contained by outRec1 ...
+        outRec2->IsHole = !outRec1->IsHole;
+        outRec2->FirstLeft = outRec1;
+
+        //fixup FirstLeft pointers that may need reassigning to OutRec1
+        if (m_UsingPolyTree) FixupFirstLefts2(outRec2, outRec1);
+
+        if ((outRec2->IsHole ^ m_ReverseOutput) == (Area(*outRec2) > 0))
+          ReversePolyPtLinks(outRec2->Pts);
+            
+      } else if (Poly2ContainsPoly1(outRec1->Pts, outRec2->Pts))
+      {
+        //outRec1 is contained by outRec2 ...
+        outRec2->IsHole = outRec1->IsHole;
+        outRec1->IsHole = !outRec2->IsHole;
+        outRec2->FirstLeft = outRec1->FirstLeft;
+        outRec1->FirstLeft = outRec2;
+
+        //fixup FirstLeft pointers that may need reassigning to OutRec1
+        if (m_UsingPolyTree) FixupFirstLefts2(outRec1, outRec2);
+
+        if ((outRec1->IsHole ^ m_ReverseOutput) == (Area(*outRec1) > 0))
+          ReversePolyPtLinks(outRec1->Pts);
+      } 
+      else
+      {
+        //the 2 polygons are completely separate ...
+        outRec2->IsHole = outRec1->IsHole;
+        outRec2->FirstLeft = outRec1->FirstLeft;
+
+        //fixup FirstLeft pointers that may need reassigning to OutRec2
+        if (m_UsingPolyTree) FixupFirstLefts1(outRec1, outRec2);
+      }
+     
+    } else
+    {
+      //joined 2 polygons together ...
+
+      outRec2->Pts = 0;
+      outRec2->BottomPt = 0;
+      outRec2->Idx = outRec1->Idx;
+
+      outRec1->IsHole = holeStateRec->IsHole;
+      if (holeStateRec == outRec2) 
+        outRec1->FirstLeft = outRec2->FirstLeft;
+      outRec2->FirstLeft = outRec1;
+
+      //fixup FirstLeft pointers that may need reassigning to OutRec1
+      if (m_UsingPolyTree) FixupFirstLefts2(outRec2, outRec1);
+    }
+  }
+}
+
+//------------------------------------------------------------------------------
+// ClipperOffset support functions ...
+//------------------------------------------------------------------------------
+
+DoublePoint GetUnitNormal(const IntPoint &pt1, const IntPoint &pt2)
+{
+  if(pt2.X == pt1.X && pt2.Y == pt1.Y) 
+    return DoublePoint(0, 0);
+
+  double Dx = (double)(pt2.X - pt1.X);
+  double dy = (double)(pt2.Y - pt1.Y);
+  double f = 1 *1.0/ std::sqrt( Dx*Dx + dy*dy );
+  Dx *= f;
+  dy *= f;
+  return DoublePoint(dy, -Dx);
+}
+
+//------------------------------------------------------------------------------
+// ClipperOffset class
+//------------------------------------------------------------------------------
+
+ClipperOffset::ClipperOffset(double miterLimit, double arcTolerance)
+{
+  this->MiterLimit = miterLimit;
+  this->ArcTolerance = arcTolerance;
+  m_lowest.X = -1;
+}
+//------------------------------------------------------------------------------
+
+ClipperOffset::~ClipperOffset()
+{
+  Clear();
+}
+//------------------------------------------------------------------------------
+
+void ClipperOffset::Clear()
+{
+  for (int i = 0; i < m_polyNodes.ChildCount(); ++i)
+    delete m_polyNodes.Childs[i];
+  m_polyNodes.Childs.clear();
+  m_lowest.X = -1;
+}
+//------------------------------------------------------------------------------
+
+void ClipperOffset::AddPath(const Path& path, JoinType joinType, EndType endType)
+{
+  int highI = (int)path.size() - 1;
+  if (highI < 0) return;
+  PolyNode* newNode = new PolyNode();
+  newNode->m_jointype = joinType;
+  newNode->m_endtype = endType;
+
+  //strip duplicate points from path and also get index to the lowest point ...
+  if (endType == etClosedLine || endType == etClosedPolygon)
+    while (highI > 0 && path[0] == path[highI]) highI--;
+  newNode->Contour.reserve(highI + 1);
+  newNode->Contour.push_back(path[0]);
+  int j = 0, k = 0;
+  for (int i = 1; i <= highI; i++)
+    if (newNode->Contour[j] != path[i])
+    {
+      j++;
+      newNode->Contour.push_back(path[i]);
+      if (path[i].Y > newNode->Contour[k].Y ||
+        (path[i].Y == newNode->Contour[k].Y &&
+        path[i].X < newNode->Contour[k].X)) k = j;
+    }
+  if (endType == etClosedPolygon && j < 2)
+  {
+    delete newNode;
+    return;
+  }
+  m_polyNodes.AddChild(*newNode);
+
+  //if this path's lowest pt is lower than all the others then update m_lowest
+  if (endType != etClosedPolygon) return;
+  if (m_lowest.X < 0)
+    m_lowest = IntPoint(m_polyNodes.ChildCount() - 1, k);
+  else
+  {
+    IntPoint ip = m_polyNodes.Childs[(int)m_lowest.X]->Contour[(int)m_lowest.Y];
+    if (newNode->Contour[k].Y > ip.Y ||
+      (newNode->Contour[k].Y == ip.Y &&
+      newNode->Contour[k].X < ip.X))
+      m_lowest = IntPoint(m_polyNodes.ChildCount() - 1, k);
+  }
+}
+//------------------------------------------------------------------------------
+
+void ClipperOffset::AddPaths(const Paths& paths, JoinType joinType, EndType endType)
+{
+  for (Paths::size_type i = 0; i < paths.size(); ++i)
+    AddPath(paths[i], joinType, endType);
+}
+//------------------------------------------------------------------------------
+
+void ClipperOffset::FixOrientations()
+{
+  //fixup orientations of all closed paths if the orientation of the
+  //closed path with the lowermost vertex is wrong ...
+  if (m_lowest.X >= 0 && 
+    !Orientation(m_polyNodes.Childs[(int)m_lowest.X]->Contour))
+  {
+    for (int i = 0; i < m_polyNodes.ChildCount(); ++i)
+    {
+      PolyNode& node = *m_polyNodes.Childs[i];
+      if (node.m_endtype == etClosedPolygon ||
+        (node.m_endtype == etClosedLine && Orientation(node.Contour)))
+          ReversePath(node.Contour);
+    }
+  } else
+  {
+    for (int i = 0; i < m_polyNodes.ChildCount(); ++i)
+    {
+      PolyNode& node = *m_polyNodes.Childs[i];
+      if (node.m_endtype == etClosedLine && !Orientation(node.Contour))
+        ReversePath(node.Contour);
+    }
+  }
+}
+//------------------------------------------------------------------------------
+
+void ClipperOffset::Execute(Paths& solution, double delta)
+{
+  solution.clear();
+  FixOrientations();
+  DoOffset(delta);
+  
+  //now clean up 'corners' ...
+  Clipper clpr;
+  clpr.AddPaths(m_destPolys, ptSubject, true);
+  if (delta > 0)
+  {
+    clpr.Execute(ctUnion, solution, pftPositive, pftPositive);
+  }
+  else
+  {
+    IntRect r = clpr.GetBounds();
+    Path outer(4);
+    outer[0] = IntPoint(r.left - 10, r.bottom + 10);
+    outer[1] = IntPoint(r.right + 10, r.bottom + 10);
+    outer[2] = IntPoint(r.right + 10, r.top - 10);
+    outer[3] = IntPoint(r.left - 10, r.top - 10);
+
+    clpr.AddPath(outer, ptSubject, true);
+    clpr.ReverseSolution(true);
+    clpr.Execute(ctUnion, solution, pftNegative, pftNegative);
+    if (solution.size() > 0) solution.erase(solution.begin());
+  }
+}
+//------------------------------------------------------------------------------
+
+void ClipperOffset::Execute(PolyTree& solution, double delta)
+{
+  solution.Clear();
+  FixOrientations();
+  DoOffset(delta);
+
+  //now clean up 'corners' ...
+  Clipper clpr;
+  clpr.AddPaths(m_destPolys, ptSubject, true);
+  if (delta > 0)
+  {
+    clpr.Execute(ctUnion, solution, pftPositive, pftPositive);
+  }
+  else
+  {
+    IntRect r = clpr.GetBounds();
+    Path outer(4);
+    outer[0] = IntPoint(r.left - 10, r.bottom + 10);
+    outer[1] = IntPoint(r.right + 10, r.bottom + 10);
+    outer[2] = IntPoint(r.right + 10, r.top - 10);
+    outer[3] = IntPoint(r.left - 10, r.top - 10);
+
+    clpr.AddPath(outer, ptSubject, true);
+    clpr.ReverseSolution(true);
+    clpr.Execute(ctUnion, solution, pftNegative, pftNegative);
+    //remove the outer PolyNode rectangle ...
+    if (solution.ChildCount() == 1 && solution.Childs[0]->ChildCount() > 0)
+    {
+      PolyNode* outerNode = solution.Childs[0];
+      solution.Childs.reserve(outerNode->ChildCount());
+      solution.Childs[0] = outerNode->Childs[0];
+      solution.Childs[0]->Parent = outerNode->Parent;
+      for (int i = 1; i < outerNode->ChildCount(); ++i)
+        solution.AddChild(*outerNode->Childs[i]);
+    }
+    else
+      solution.Clear();
+  }
+}
+//------------------------------------------------------------------------------
+
+void ClipperOffset::DoOffset(double delta)
+{
+  m_destPolys.clear();
+  m_delta = delta;
+
+  //if Zero offset, just copy any CLOSED polygons to m_p and return ...
+  if (NEAR_ZERO(delta)) 
+  {
+    m_destPolys.reserve(m_polyNodes.ChildCount());
+    for (int i = 0; i < m_polyNodes.ChildCount(); i++)
+    {
+      PolyNode& node = *m_polyNodes.Childs[i];
+      if (node.m_endtype == etClosedPolygon)
+        m_destPolys.push_back(node.Contour);
+    }
+    return;
+  }
+
+  //see offset_triginometry3.svg in the documentation folder ...
+  if (MiterLimit > 2) m_miterLim = 2/(MiterLimit * MiterLimit);
+  else m_miterLim = 0.5;
+
+  double y;
+  if (ArcTolerance <= 0.0) y = def_arc_tolerance;
+  else if (ArcTolerance > std::fabs(delta) * def_arc_tolerance) 
+    y = std::fabs(delta) * def_arc_tolerance;
+  else y = ArcTolerance;
+  //see offset_triginometry2.svg in the documentation folder ...
+  double steps = pi / std::acos(1 - y / std::fabs(delta));
+  if (steps > std::fabs(delta) * pi) 
+    steps = std::fabs(delta) * pi;  //ie excessive precision check
+  m_sin = std::sin(two_pi / steps);
+  m_cos = std::cos(two_pi / steps);
+  m_StepsPerRad = steps / two_pi;
+  if (delta < 0.0) m_sin = -m_sin;
+
+  m_destPolys.reserve(m_polyNodes.ChildCount() * 2);
+  for (int i = 0; i < m_polyNodes.ChildCount(); i++)
+  {
+    PolyNode& node = *m_polyNodes.Childs[i];
+    m_srcPoly = node.Contour;
+
+    int len = (int)m_srcPoly.size();
+    if (len == 0 || (delta <= 0 && (len < 3 || node.m_endtype != etClosedPolygon)))
+        continue;
+
+    m_destPoly.clear();
+    if (len == 1)
+    {
+      if (node.m_jointype == jtRound)
+      {
+        double X = 1.0, Y = 0.0;
+        for (cInt j = 1; j <= steps; j++)
+        {
+          m_destPoly.push_back(IntPoint(
+            Round(m_srcPoly[0].X + X * delta),
+            Round(m_srcPoly[0].Y + Y * delta)));
+          double X2 = X;
+          X = X * m_cos - m_sin * Y;
+          Y = X2 * m_sin + Y * m_cos;
+        }
+      }
+      else
+      {
+        double X = -1.0, Y = -1.0;
+        for (int j = 0; j < 4; ++j)
+        {
+          m_destPoly.push_back(IntPoint(
+            Round(m_srcPoly[0].X + X * delta),
+            Round(m_srcPoly[0].Y + Y * delta)));
+          if (X < 0) X = 1;
+          else if (Y < 0) Y = 1;
+          else X = -1;
+        }
+      }
+      m_destPolys.push_back(m_destPoly);
+      continue;
+    }
+    //build m_normals ...
+    m_normals.clear();
+    m_normals.reserve(len);
+    for (int j = 0; j < len - 1; ++j)
+      m_normals.push_back(GetUnitNormal(m_srcPoly[j], m_srcPoly[j + 1]));
+    if (node.m_endtype == etClosedLine || node.m_endtype == etClosedPolygon)
+      m_normals.push_back(GetUnitNormal(m_srcPoly[len - 1], m_srcPoly[0]));
+    else
+      m_normals.push_back(DoublePoint(m_normals[len - 2]));
+
+    if (node.m_endtype == etClosedPolygon)
+    {
+      int k = len - 1;
+      for (int j = 0; j < len; ++j)
+        OffsetPoint(j, k, node.m_jointype);
+      m_destPolys.push_back(m_destPoly);
+    }
+    else if (node.m_endtype == etClosedLine)
+    {
+      int k = len - 1;
+      for (int j = 0; j < len; ++j)
+        OffsetPoint(j, k, node.m_jointype);
+      m_destPolys.push_back(m_destPoly);
+      m_destPoly.clear();
+      //re-build m_normals ...
+      DoublePoint n = m_normals[len -1];
+      for (int j = len - 1; j > 0; j--)
+        m_normals[j] = DoublePoint(-m_normals[j - 1].X, -m_normals[j - 1].Y);
+      m_normals[0] = DoublePoint(-n.X, -n.Y);
+      k = 0;
+      for (int j = len - 1; j >= 0; j--)
+        OffsetPoint(j, k, node.m_jointype);
+      m_destPolys.push_back(m_destPoly);
+    }
+    else
+    {
+      int k = 0;
+      for (int j = 1; j < len - 1; ++j)
+        OffsetPoint(j, k, node.m_jointype);
+
+      IntPoint pt1;
+      if (node.m_endtype == etOpenButt)
+      {
+        int j = len - 1;
+        pt1 = IntPoint((cInt)Round(m_srcPoly[j].X + m_normals[j].X *
+          delta), (cInt)Round(m_srcPoly[j].Y + m_normals[j].Y * delta));
+        m_destPoly.push_back(pt1);
+        pt1 = IntPoint((cInt)Round(m_srcPoly[j].X - m_normals[j].X *
+          delta), (cInt)Round(m_srcPoly[j].Y - m_normals[j].Y * delta));
+        m_destPoly.push_back(pt1);
+      }
+      else
+      {
+        int j = len - 1;
+        k = len - 2;
+        m_sinA = 0;
+        m_normals[j] = DoublePoint(-m_normals[j].X, -m_normals[j].Y);
+        if (node.m_endtype == etOpenSquare)
+          DoSquare(j, k);
+        else
+          DoRound(j, k);
+      }
+
+      //re-build m_normals ...
+      for (int j = len - 1; j > 0; j--)
+        m_normals[j] = DoublePoint(-m_normals[j - 1].X, -m_normals[j - 1].Y);
+      m_normals[0] = DoublePoint(-m_normals[1].X, -m_normals[1].Y);
+
+      k = len - 1;
+      for (int j = k - 1; j > 0; --j) OffsetPoint(j, k, node.m_jointype);
+
+      if (node.m_endtype == etOpenButt)
+      {
+        pt1 = IntPoint((cInt)Round(m_srcPoly[0].X - m_normals[0].X * delta),
+          (cInt)Round(m_srcPoly[0].Y - m_normals[0].Y * delta));
+        m_destPoly.push_back(pt1);
+        pt1 = IntPoint((cInt)Round(m_srcPoly[0].X + m_normals[0].X * delta),
+          (cInt)Round(m_srcPoly[0].Y + m_normals[0].Y * delta));
+        m_destPoly.push_back(pt1);
+      }
+      else
+      {
+        k = 1;
+        m_sinA = 0;
+        if (node.m_endtype == etOpenSquare)
+          DoSquare(0, 1);
+        else
+          DoRound(0, 1);
+      }
+      m_destPolys.push_back(m_destPoly);
+    }
+  }
+}
+//------------------------------------------------------------------------------
+
+void ClipperOffset::OffsetPoint(int j, int& k, JoinType jointype)
+{
+  //cross product ...
+  m_sinA = (m_normals[k].X * m_normals[j].Y - m_normals[j].X * m_normals[k].Y);
+  if (std::fabs(m_sinA * m_delta) < 1.0) 
+  {
+    //dot product ...
+    double cosA = (m_normals[k].X * m_normals[j].X + m_normals[j].Y * m_normals[k].Y ); 
+    if (cosA > 0) // angle => 0 degrees
+    {
+      m_destPoly.push_back(IntPoint(Round(m_srcPoly[j].X + m_normals[k].X * m_delta),
+        Round(m_srcPoly[j].Y + m_normals[k].Y * m_delta)));
+      return; 
+    }
+    //else angle => 180 degrees   
+  }
+  else if (m_sinA > 1.0) m_sinA = 1.0;
+  else if (m_sinA < -1.0) m_sinA = -1.0;
+
+  if (m_sinA * m_delta < 0)
+  {
+    m_destPoly.push_back(IntPoint(Round(m_srcPoly[j].X + m_normals[k].X * m_delta),
+      Round(m_srcPoly[j].Y + m_normals[k].Y * m_delta)));
+    m_destPoly.push_back(m_srcPoly[j]);
+    m_destPoly.push_back(IntPoint(Round(m_srcPoly[j].X + m_normals[j].X * m_delta),
+      Round(m_srcPoly[j].Y + m_normals[j].Y * m_delta)));
+  }
+  else
+    switch (jointype)
+    {
+      case jtMiter:
+        {
+          double r = 1 + (m_normals[j].X * m_normals[k].X +
+            m_normals[j].Y * m_normals[k].Y);
+          if (r >= m_miterLim) DoMiter(j, k, r); else DoSquare(j, k);
+          break;
+        }
+      case jtSquare: DoSquare(j, k); break;
+      case jtRound: DoRound(j, k); break;
+    }
+  k = j;
+}
+//------------------------------------------------------------------------------
+
+void ClipperOffset::DoSquare(int j, int k)
+{
+  double dx = std::tan(std::atan2(m_sinA,
+      m_normals[k].X * m_normals[j].X + m_normals[k].Y * m_normals[j].Y) / 4);
+  m_destPoly.push_back(IntPoint(
+      Round(m_srcPoly[j].X + m_delta * (m_normals[k].X - m_normals[k].Y * dx)),
+      Round(m_srcPoly[j].Y + m_delta * (m_normals[k].Y + m_normals[k].X * dx))));
+  m_destPoly.push_back(IntPoint(
+      Round(m_srcPoly[j].X + m_delta * (m_normals[j].X + m_normals[j].Y * dx)),
+      Round(m_srcPoly[j].Y + m_delta * (m_normals[j].Y - m_normals[j].X * dx))));
+}
+//------------------------------------------------------------------------------
+
+void ClipperOffset::DoMiter(int j, int k, double r)
+{
+  double q = m_delta / r;
+  m_destPoly.push_back(IntPoint(Round(m_srcPoly[j].X + (m_normals[k].X + m_normals[j].X) * q),
+      Round(m_srcPoly[j].Y + (m_normals[k].Y + m_normals[j].Y) * q)));
+}
+//------------------------------------------------------------------------------
+
+void ClipperOffset::DoRound(int j, int k)
+{
+  double a = std::atan2(m_sinA,
+  m_normals[k].X * m_normals[j].X + m_normals[k].Y * m_normals[j].Y);
+  int steps = std::max((int)Round(m_StepsPerRad * std::fabs(a)), 1);
+
+  double X = m_normals[k].X, Y = m_normals[k].Y, X2;
+  for (int i = 0; i < steps; ++i)
+  {
+    m_destPoly.push_back(IntPoint(
+        Round(m_srcPoly[j].X + X * m_delta),
+        Round(m_srcPoly[j].Y + Y * m_delta)));
+    X2 = X;
+    X = X * m_cos - m_sin * Y;
+    Y = X2 * m_sin + Y * m_cos;
+  }
+  m_destPoly.push_back(IntPoint(
+  Round(m_srcPoly[j].X + m_normals[j].X * m_delta),
+  Round(m_srcPoly[j].Y + m_normals[j].Y * m_delta)));
+}
+
+//------------------------------------------------------------------------------
+// Miscellaneous public functions
+//------------------------------------------------------------------------------
+
+void Clipper::DoSimplePolygons()
+{
+  PolyOutList::size_type i = 0;
+  while (i < m_PolyOuts.size()) 
+  {
+    OutRec* outrec = m_PolyOuts[i++];
+    OutPt* op = outrec->Pts;
+    if (!op || outrec->IsOpen) continue;
+    do //for each Pt in Polygon until duplicate found do ...
+    {
+      OutPt* op2 = op->Next;
+      while (op2 != outrec->Pts) 
+      {
+        if ((op->Pt == op2->Pt) && op2->Next != op && op2->Prev != op) 
+        {
+          //split the polygon into two ...
+          OutPt* op3 = op->Prev;
+          OutPt* op4 = op2->Prev;
+          op->Prev = op4;
+          op4->Next = op;
+          op2->Prev = op3;
+          op3->Next = op2;
+
+          outrec->Pts = op;
+          OutRec* outrec2 = CreateOutRec();
+          outrec2->Pts = op2;
+          UpdateOutPtIdxs(*outrec2);
+          if (Poly2ContainsPoly1(outrec2->Pts, outrec->Pts))
+          {
+            //OutRec2 is contained by OutRec1 ...
+            outrec2->IsHole = !outrec->IsHole;
+            outrec2->FirstLeft = outrec;
+            if (m_UsingPolyTree) FixupFirstLefts2(outrec2, outrec);
+          }
+          else
+            if (Poly2ContainsPoly1(outrec->Pts, outrec2->Pts))
+          {
+            //OutRec1 is contained by OutRec2 ...
+            outrec2->IsHole = outrec->IsHole;
+            outrec->IsHole = !outrec2->IsHole;
+            outrec2->FirstLeft = outrec->FirstLeft;
+            outrec->FirstLeft = outrec2;
+            if (m_UsingPolyTree) FixupFirstLefts2(outrec, outrec2);
+            }
+            else
+          {
+            //the 2 polygons are separate ...
+            outrec2->IsHole = outrec->IsHole;
+            outrec2->FirstLeft = outrec->FirstLeft;
+            if (m_UsingPolyTree) FixupFirstLefts1(outrec, outrec2);
+            }
+          op2 = op; //ie get ready for the Next iteration
+        }
+        op2 = op2->Next;
+      }
+      op = op->Next;
+    }
+    while (op != outrec->Pts);
+  }
+}
+//------------------------------------------------------------------------------
+
+void ReversePath(Path& p)
+{
+  std::reverse(p.begin(), p.end());
+}
+//------------------------------------------------------------------------------
+
+void ReversePaths(Paths& p)
+{
+  for (Paths::size_type i = 0; i < p.size(); ++i)
+    ReversePath(p[i]);
+}
+//------------------------------------------------------------------------------
+
+void SimplifyPolygon(const Path &in_poly, Paths &out_polys, PolyFillType fillType)
+{
+  Clipper c;
+  c.StrictlySimple(true);
+  c.AddPath(in_poly, ptSubject, true);
+  c.Execute(ctUnion, out_polys, fillType, fillType);
+}
+//------------------------------------------------------------------------------
+
+void SimplifyPolygons(const Paths &in_polys, Paths &out_polys, PolyFillType fillType)
+{
+  Clipper c;
+  c.StrictlySimple(true);
+  c.AddPaths(in_polys, ptSubject, true);
+  c.Execute(ctUnion, out_polys, fillType, fillType);
+}
+//------------------------------------------------------------------------------
+
+void SimplifyPolygons(Paths &polys, PolyFillType fillType)
+{
+  SimplifyPolygons(polys, polys, fillType);
+}
+//------------------------------------------------------------------------------
+
+inline double DistanceSqrd(const IntPoint& pt1, const IntPoint& pt2)
+{
+  double Dx = ((double)pt1.X - pt2.X);
+  double dy = ((double)pt1.Y - pt2.Y);
+  return (Dx*Dx + dy*dy);
+}
+//------------------------------------------------------------------------------
+
+double DistanceFromLineSqrd(
+  const IntPoint& pt, const IntPoint& ln1, const IntPoint& ln2)
+{
+  //The equation of a line in general form (Ax + By + C = 0)
+  //given 2 points (x¹,y¹) & (x²,y²) is ...
+  //(y¹ - y²)x + (x² - x¹)y + (y² - y¹)x¹ - (x² - x¹)y¹ = 0
+  //A = (y¹ - y²); B = (x² - x¹); C = (y² - y¹)x¹ - (x² - x¹)y¹
+  //perpendicular distance of point (x³,y³) = (Ax³ + By³ + C)/Sqrt(A² + B²)
+  //see http://en.wikipedia.org/wiki/Perpendicular_distance
+  double A = double(ln1.Y - ln2.Y);
+  double B = double(ln2.X - ln1.X);
+  double C = A * ln1.X  + B * ln1.Y;
+  C = A * pt.X + B * pt.Y - C;
+  return (C * C) / (A * A + B * B);
+}
+//---------------------------------------------------------------------------
+
+bool SlopesNearCollinear(const IntPoint& pt1, 
+    const IntPoint& pt2, const IntPoint& pt3, double distSqrd)
+{
+  //this function is more accurate when the point that's geometrically
+  //between the other 2 points is the one that's tested for distance.
+  //ie makes it more likely to pick up 'spikes' ...
+	if (Abs(pt1.X - pt2.X) > Abs(pt1.Y - pt2.Y))
+	{
+    if ((pt1.X > pt2.X) == (pt1.X < pt3.X))
+      return DistanceFromLineSqrd(pt1, pt2, pt3) < distSqrd;
+    else if ((pt2.X > pt1.X) == (pt2.X < pt3.X))
+      return DistanceFromLineSqrd(pt2, pt1, pt3) < distSqrd;
+		else
+	    return DistanceFromLineSqrd(pt3, pt1, pt2) < distSqrd;
+	}
+	else
+	{
+    if ((pt1.Y > pt2.Y) == (pt1.Y < pt3.Y))
+      return DistanceFromLineSqrd(pt1, pt2, pt3) < distSqrd;
+    else if ((pt2.Y > pt1.Y) == (pt2.Y < pt3.Y))
+      return DistanceFromLineSqrd(pt2, pt1, pt3) < distSqrd;
+		else
+      return DistanceFromLineSqrd(pt3, pt1, pt2) < distSqrd;
+	}
+}
+//------------------------------------------------------------------------------
+
+bool PointsAreClose(IntPoint pt1, IntPoint pt2, double distSqrd)
+{
+    double Dx = (double)pt1.X - pt2.X;
+    double dy = (double)pt1.Y - pt2.Y;
+    return ((Dx * Dx) + (dy * dy) <= distSqrd);
+}
+//------------------------------------------------------------------------------
+
+OutPt* ExcludeOp(OutPt* op)
+{
+  OutPt* result = op->Prev;
+  result->Next = op->Next;
+  op->Next->Prev = result;
+  result->Idx = 0;
+  return result;
+}
+//------------------------------------------------------------------------------
+
+void CleanPolygon(const Path& in_poly, Path& out_poly, double distance)
+{
+  //distance = proximity in units/pixels below which vertices
+  //will be stripped. Default ~= sqrt(2).
+  
+  size_t size = in_poly.size();
+  
+  if (size == 0) 
+  {
+    out_poly.clear();
+    return;
+  }
+
+  OutPt* outPts = new OutPt[size];
+  for (size_t i = 0; i < size; ++i)
+  {
+    outPts[i].Pt = in_poly[i];
+    outPts[i].Next = &outPts[(i + 1) % size];
+    outPts[i].Next->Prev = &outPts[i];
+    outPts[i].Idx = 0;
+  }
+
+  double distSqrd = distance * distance;
+  OutPt* op = &outPts[0];
+  while (op->Idx == 0 && op->Next != op->Prev) 
+  {
+    if (PointsAreClose(op->Pt, op->Prev->Pt, distSqrd))
+    {
+      op = ExcludeOp(op);
+      size--;
+    } 
+    else if (PointsAreClose(op->Prev->Pt, op->Next->Pt, distSqrd))
+    {
+      ExcludeOp(op->Next);
+      op = ExcludeOp(op);
+      size -= 2;
+    }
+    else if (SlopesNearCollinear(op->Prev->Pt, op->Pt, op->Next->Pt, distSqrd))
+    {
+      op = ExcludeOp(op);
+      size--;
+    }
+    else
+    {
+      op->Idx = 1;
+      op = op->Next;
+    }
+  }
+
+  if (size < 3) size = 0;
+  out_poly.resize(size);
+  for (size_t i = 0; i < size; ++i)
+  {
+    out_poly[i] = op->Pt;
+    op = op->Next;
+  }
+  delete [] outPts;
+}
+//------------------------------------------------------------------------------
+
+void CleanPolygon(Path& poly, double distance)
+{
+  CleanPolygon(poly, poly, distance);
+}
+//------------------------------------------------------------------------------
+
+void CleanPolygons(const Paths& in_polys, Paths& out_polys, double distance)
+{
+  for (Paths::size_type i = 0; i < in_polys.size(); ++i)
+    CleanPolygon(in_polys[i], out_polys[i], distance);
+}
+//------------------------------------------------------------------------------
+
+void CleanPolygons(Paths& polys, double distance)
+{
+  CleanPolygons(polys, polys, distance);
+}
+//------------------------------------------------------------------------------
+
+void Minkowski(const Path& poly, const Path& path, 
+  Paths& solution, bool isSum, bool isClosed)
+{
+  int delta = (isClosed ? 1 : 0);
+  size_t polyCnt = poly.size();
+  size_t pathCnt = path.size();
+  Paths pp;
+  pp.reserve(pathCnt);
+  if (isSum)
+    for (size_t i = 0; i < pathCnt; ++i)
+    {
+      Path p;
+      p.reserve(polyCnt);
+      for (size_t j = 0; j < poly.size(); ++j)
+        p.push_back(IntPoint(path[i].X + poly[j].X, path[i].Y + poly[j].Y));
+      pp.push_back(p);
+    }
+  else
+    for (size_t i = 0; i < pathCnt; ++i)
+    {
+      Path p;
+      p.reserve(polyCnt);
+      for (size_t j = 0; j < poly.size(); ++j)
+        p.push_back(IntPoint(path[i].X - poly[j].X, path[i].Y - poly[j].Y));
+      pp.push_back(p);
+    }
+
+  solution.clear();
+  solution.reserve((pathCnt + delta) * (polyCnt + 1));
+  for (size_t i = 0; i < pathCnt - 1 + delta; ++i)
+    for (size_t j = 0; j < polyCnt; ++j)
+    {
+      Path quad;
+      quad.reserve(4);
+      quad.push_back(pp[i % pathCnt][j % polyCnt]);
+      quad.push_back(pp[(i + 1) % pathCnt][j % polyCnt]);
+      quad.push_back(pp[(i + 1) % pathCnt][(j + 1) % polyCnt]);
+      quad.push_back(pp[i % pathCnt][(j + 1) % polyCnt]);
+      if (!Orientation(quad)) ReversePath(quad);
+      solution.push_back(quad);
+    }
+}
+//------------------------------------------------------------------------------
+
+void MinkowskiSum(const Path& pattern, const Path& path, Paths& solution, bool pathIsClosed)
+{
+  Minkowski(pattern, path, solution, true, pathIsClosed);
+  Clipper c;
+  c.AddPaths(solution, ptSubject, true);
+  c.Execute(ctUnion, solution, pftNonZero, pftNonZero);
+}
+//------------------------------------------------------------------------------
+
+void TranslatePath(const Path& input, Path& output, const IntPoint delta)
+{
+  //precondition: input != output
+  output.resize(input.size());
+  for (size_t i = 0; i < input.size(); ++i)
+    output[i] = IntPoint(input[i].X + delta.X, input[i].Y + delta.Y);
+}
+//------------------------------------------------------------------------------
+
+void MinkowskiSum(const Path& pattern, const Paths& paths, Paths& solution, bool pathIsClosed)
+{
+  Clipper c;
+  for (size_t i = 0; i < paths.size(); ++i)
+  {
+    Paths tmp;
+    Minkowski(pattern, paths[i], tmp, true, pathIsClosed);
+    c.AddPaths(tmp, ptSubject, true);
+    if (pathIsClosed)
+    {
+      Path tmp2;
+      TranslatePath(paths[i], tmp2, pattern[0]);
+      c.AddPath(tmp2, ptClip, true);
+    }
+  }
+    c.Execute(ctUnion, solution, pftNonZero, pftNonZero);
+}
+//------------------------------------------------------------------------------
+
+void MinkowskiDiff(const Path& poly1, const Path& poly2, Paths& solution)
+{
+  Minkowski(poly1, poly2, solution, false, true);
+  Clipper c;
+  c.AddPaths(solution, ptSubject, true);
+  c.Execute(ctUnion, solution, pftNonZero, pftNonZero);
+}
+//------------------------------------------------------------------------------
+
+enum NodeType {ntAny, ntOpen, ntClosed};
+
+void AddPolyNodeToPaths(const PolyNode& polynode, NodeType nodetype, Paths& paths)
+{
+  bool match = true;
+  if (nodetype == ntClosed) match = !polynode.IsOpen();
+  else if (nodetype == ntOpen) return;
+
+  if (!polynode.Contour.empty() && match)
+    paths.push_back(polynode.Contour);
+  for (int i = 0; i < polynode.ChildCount(); ++i)
+    AddPolyNodeToPaths(*polynode.Childs[i], nodetype, paths);
+}
+//------------------------------------------------------------------------------
+
+void PolyTreeToPaths(const PolyTree& polytree, Paths& paths)
+{
+  paths.resize(0); 
+  paths.reserve(polytree.Total());
+  AddPolyNodeToPaths(polytree, ntAny, paths);
+}
+//------------------------------------------------------------------------------
+
+void ClosedPathsFromPolyTree(const PolyTree& polytree, Paths& paths)
+{
+  paths.resize(0); 
+  paths.reserve(polytree.Total());
+  AddPolyNodeToPaths(polytree, ntClosed, paths);
+}
+//------------------------------------------------------------------------------
+
+void OpenPathsFromPolyTree(PolyTree& polytree, Paths& paths)
+{
+  paths.resize(0); 
+  paths.reserve(polytree.Total());
+  //Open paths are top level only, so ...
+  for (int i = 0; i < polytree.ChildCount(); ++i)
+    if (polytree.Childs[i]->IsOpen())
+      paths.push_back(polytree.Childs[i]->Contour);
+}
+//------------------------------------------------------------------------------
+
+std::ostream& operator <<(std::ostream &s, const IntPoint &p)
+{
+  s << "(" << p.X << "," << p.Y << ")";
+  return s;
+}
+//------------------------------------------------------------------------------
+
+std::ostream& operator <<(std::ostream &s, const Path &p)
+{
+  if (p.empty()) return s;
+  Path::size_type last = p.size() -1;
+  for (Path::size_type i = 0; i < last; i++)
+    s << "(" << p[i].X << "," << p[i].Y << "), ";
+  s << "(" << p[last].X << "," << p[last].Y << ")\n";
+  return s;
+}
+//------------------------------------------------------------------------------
+
+std::ostream& operator <<(std::ostream &s, const Paths &p)
+{
+  for (Paths::size_type i = 0; i < p.size(); i++)
+    s << p[i];
+  s << "\n";
+  return s;
+}
+//------------------------------------------------------------------------------
+
+} //ClipperLib namespace
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/remap/src/clipper.hpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/remap/src/clipper.hpp	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/remap/src/clipper.hpp	(revision 1749)
@@ -0,0 +1,404 @@
+/*******************************************************************************
+*                                                                              *
+* Author    :  Angus Johnson                                                   *
+* Version   :  6.2.9                                                           *
+* Date      :  16 February 2015                                                *
+* Website   :  http://www.angusj.com                                           *
+* Copyright :  Angus Johnson 2010-2015                                         *
+*                                                                              *
+* License:                                                                     *
+* Use, modification & distribution is subject to Boost Software License Ver 1. *
+* http://www.boost.org/LICENSE_1_0.txt                                         *
+*                                                                              *
+* Attributions:                                                                *
+* The code in this library is an extension of Bala Vatti's clipping algorithm: *
+* "A generic solution to polygon clipping"                                     *
+* Communications of the ACM, Vol 35, Issue 7 (July 1992) pp 56-63.             *
+* http://portal.acm.org/citation.cfm?id=129906                                 *
+*                                                                              *
+* Computer graphics and geometric modeling: implementation and algorithms      *
+* By Max K. Agoston                                                            *
+* Springer; 1 edition (January 4, 2005)                                        *
+* http://books.google.com/books?q=vatti+clipping+agoston                       *
+*                                                                              *
+* See also:                                                                    *
+* "Polygon Offsetting by Computing Winding Numbers"                            *
+* Paper no. DETC2005-85513 pp. 565-575                                         *
+* ASME 2005 International Design Engineering Technical Conferences             *
+* and Computers and Information in Engineering Conference (IDETC/CIE2005)      *
+* September 24-28, 2005 , Long Beach, California, USA                          *
+* http://www.me.berkeley.edu/~mcmains/pubs/DAC05OffsetPolygon.pdf              *
+*                                                                              *
+*******************************************************************************/
+
+#ifndef clipper_hpp
+#define clipper_hpp
+
+#define CLIPPER_VERSION "6.2.6"
+
+//use_int32: When enabled 32bit ints are used instead of 64bit ints. This
+//improve performance but coordinate values are limited to the range +/- 46340
+//#define use_int32
+
+//use_xyz: adds a Z member to IntPoint. Adds a minor cost to perfomance.
+//#define use_xyz
+
+//use_lines: Enables line clipping. Adds a very minor cost to performance.
+#define use_lines
+  
+//use_deprecated: Enables temporary support for the obsolete functions
+//#define use_deprecated  
+
+#include <vector>
+#include <list>
+#include <set>
+#include <stdexcept>
+#include <cstring>
+#include <cstdlib>
+#include <ostream>
+#include <functional>
+#include <queue>
+
+namespace ClipperLib {
+
+enum ClipType { ctIntersection, ctUnion, ctDifference, ctXor };
+enum PolyType { ptSubject, ptClip };
+//By far the most widely used winding rules for polygon filling are
+//EvenOdd & NonZero (GDI, GDI+, XLib, OpenGL, Cairo, AGG, Quartz, SVG, Gr32)
+//Others rules include Positive, Negative and ABS_GTR_EQ_TWO (only in OpenGL)
+//see http://glprogramming.com/red/chapter11.html
+enum PolyFillType { pftEvenOdd, pftNonZero, pftPositive, pftNegative };
+
+#ifdef use_int32
+  typedef int cInt;
+  static cInt const loRange = 0x7FFF;
+  static cInt const hiRange = 0x7FFF;
+#else
+  typedef signed long long cInt;
+  static cInt const loRange = 0x3FFFFFFF;
+  static cInt const hiRange = 0x3FFFFFFFFFFFFFFFLL;
+  typedef signed long long long64;     //used by Int128 class
+  typedef unsigned long long ulong64;
+
+#endif
+
+struct IntPoint {
+  cInt X;
+  cInt Y;
+#ifdef use_xyz
+  cInt Z;
+  IntPoint(cInt x = 0, cInt y = 0, cInt z = 0): X(x), Y(y), Z(z) {};
+#else
+  IntPoint(cInt x = 0, cInt y = 0): X(x), Y(y) {};
+#endif
+
+  friend inline bool operator== (const IntPoint& a, const IntPoint& b)
+  {
+    return a.X == b.X && a.Y == b.Y;
+  }
+  friend inline bool operator!= (const IntPoint& a, const IntPoint& b)
+  {
+    return a.X != b.X  || a.Y != b.Y; 
+  }
+};
+//------------------------------------------------------------------------------
+
+typedef std::vector< IntPoint > Path;
+typedef std::vector< Path > Paths;
+
+inline Path& operator <<(Path& poly, const IntPoint& p) {poly.push_back(p); return poly;}
+inline Paths& operator <<(Paths& polys, const Path& p) {polys.push_back(p); return polys;}
+
+std::ostream& operator <<(std::ostream &s, const IntPoint &p);
+std::ostream& operator <<(std::ostream &s, const Path &p);
+std::ostream& operator <<(std::ostream &s, const Paths &p);
+
+struct DoublePoint
+{
+  double X;
+  double Y;
+  DoublePoint(double x = 0, double y = 0) : X(x), Y(y) {}
+  DoublePoint(IntPoint ip) : X((double)ip.X), Y((double)ip.Y) {}
+};
+//------------------------------------------------------------------------------
+
+#ifdef use_xyz
+typedef void (*ZFillCallback)(IntPoint& e1bot, IntPoint& e1top, IntPoint& e2bot, IntPoint& e2top, IntPoint& pt);
+#endif
+
+enum InitOptions {ioReverseSolution = 1, ioStrictlySimple = 2, ioPreserveCollinear = 4};
+enum JoinType {jtSquare, jtRound, jtMiter};
+enum EndType {etClosedPolygon, etClosedLine, etOpenButt, etOpenSquare, etOpenRound};
+
+class PolyNode;
+typedef std::vector< PolyNode* > PolyNodes;
+
+class PolyNode 
+{ 
+public:
+    PolyNode();
+    virtual ~PolyNode(){};
+    Path Contour;
+    PolyNodes Childs;
+    PolyNode* Parent;
+    PolyNode* GetNext() const;
+    bool IsHole() const;
+    bool IsOpen() const;
+    int ChildCount() const;
+private:
+    unsigned Index; //node index in Parent.Childs
+    bool m_IsOpen;
+    JoinType m_jointype;
+    EndType m_endtype;
+    PolyNode* GetNextSiblingUp() const;
+    void AddChild(PolyNode& child);
+    friend class Clipper; //to access Index
+    friend class ClipperOffset; 
+};
+
+class PolyTree: public PolyNode
+{ 
+public:
+    ~PolyTree(){Clear();};
+    PolyNode* GetFirst() const;
+    void Clear();
+    int Total() const;
+private:
+    PolyNodes AllNodes;
+    friend class Clipper; //to access AllNodes
+};
+
+bool Orientation(const Path &poly);
+double Area(const Path &poly);
+int PointInPolygon(const IntPoint &pt, const Path &path);
+
+void SimplifyPolygon(const Path &in_poly, Paths &out_polys, PolyFillType fillType = pftEvenOdd);
+void SimplifyPolygons(const Paths &in_polys, Paths &out_polys, PolyFillType fillType = pftEvenOdd);
+void SimplifyPolygons(Paths &polys, PolyFillType fillType = pftEvenOdd);
+
+void CleanPolygon(const Path& in_poly, Path& out_poly, double distance = 1.415);
+void CleanPolygon(Path& poly, double distance = 1.415);
+void CleanPolygons(const Paths& in_polys, Paths& out_polys, double distance = 1.415);
+void CleanPolygons(Paths& polys, double distance = 1.415);
+
+void MinkowskiSum(const Path& pattern, const Path& path, Paths& solution, bool pathIsClosed);
+void MinkowskiSum(const Path& pattern, const Paths& paths, Paths& solution, bool pathIsClosed);
+void MinkowskiDiff(const Path& poly1, const Path& poly2, Paths& solution);
+
+void PolyTreeToPaths(const PolyTree& polytree, Paths& paths);
+void ClosedPathsFromPolyTree(const PolyTree& polytree, Paths& paths);
+void OpenPathsFromPolyTree(PolyTree& polytree, Paths& paths);
+
+void ReversePath(Path& p);
+void ReversePaths(Paths& p);
+
+struct IntRect { cInt left; cInt top; cInt right; cInt bottom; };
+
+//enums that are used internally ...
+enum EdgeSide { esLeft = 1, esRight = 2};
+
+//forward declarations (for stuff used internally) ...
+struct TEdge;
+struct IntersectNode;
+struct LocalMinimum;
+struct OutPt;
+struct OutRec;
+struct Join;
+
+typedef std::vector < OutRec* > PolyOutList;
+typedef std::vector < TEdge* > EdgeList;
+typedef std::vector < Join* > JoinList;
+typedef std::vector < IntersectNode* > IntersectList;
+
+//------------------------------------------------------------------------------
+
+//ClipperBase is the ancestor to the Clipper class. It should not be
+//instantiated directly. This class simply abstracts the conversion of sets of
+//polygon coordinates into edge objects that are stored in a LocalMinima list.
+class ClipperBase
+{
+public:
+  ClipperBase();
+  virtual ~ClipperBase();
+  bool AddPath(const Path &pg, PolyType PolyTyp, bool Closed);
+  bool AddPaths(const Paths &ppg, PolyType PolyTyp, bool Closed);
+  virtual void Clear();
+  IntRect GetBounds();
+  bool PreserveCollinear() {return m_PreserveCollinear;};
+  void PreserveCollinear(bool value) {m_PreserveCollinear = value;};
+protected:
+  void DisposeLocalMinimaList();
+  TEdge* AddBoundsToLML(TEdge *e, bool IsClosed);
+  void PopLocalMinima();
+  virtual void Reset();
+  TEdge* ProcessBound(TEdge* E, bool IsClockwise);
+  TEdge* DescendToMin(TEdge *&E);
+  void AscendToMax(TEdge *&E, bool Appending, bool IsClosed);
+
+  typedef std::vector<LocalMinimum> MinimaList;
+  MinimaList::iterator m_CurrentLM;
+  MinimaList           m_MinimaList;
+
+  bool              m_UseFullRange;
+  EdgeList          m_edges;
+  bool             m_PreserveCollinear;
+  bool             m_HasOpenPaths;
+};
+//------------------------------------------------------------------------------
+
+class Clipper : public virtual ClipperBase
+{
+public:
+  Clipper(int initOptions = 0);
+  ~Clipper();
+  bool Execute(ClipType clipType,
+      Paths &solution,
+      PolyFillType fillType = pftEvenOdd);
+  bool Execute(ClipType clipType,
+      Paths &solution,
+      PolyFillType subjFillType,
+      PolyFillType clipFillType);
+  bool Execute(ClipType clipType,
+      PolyTree &polytree,
+      PolyFillType fillType = pftEvenOdd);
+  bool Execute(ClipType clipType,
+      PolyTree &polytree,
+      PolyFillType subjFillType,
+      PolyFillType clipFillType);
+  bool ReverseSolution() { return m_ReverseOutput; };
+  void ReverseSolution(bool value) {m_ReverseOutput = value;};
+  bool StrictlySimple() {return m_StrictSimple;};
+  void StrictlySimple(bool value) {m_StrictSimple = value;};
+  //set the callback function for z value filling on intersections (otherwise Z is 0)
+#ifdef use_xyz
+  void ZFillFunction(ZFillCallback zFillFunc);
+#endif
+protected:
+  void Reset();
+  virtual bool ExecuteInternal();
+private:
+  PolyOutList      m_PolyOuts;
+  JoinList         m_Joins;
+  JoinList         m_GhostJoins;
+  IntersectList    m_IntersectList;
+  ClipType         m_ClipType;
+  typedef std::priority_queue<cInt> ScanbeamList;
+  ScanbeamList     m_Scanbeam;
+  typedef std::list<cInt> MaximaList;
+  MaximaList       m_Maxima;
+  TEdge           *m_ActiveEdges;
+  TEdge           *m_SortedEdges;
+  bool             m_ExecuteLocked;
+  PolyFillType     m_ClipFillType;
+  PolyFillType     m_SubjFillType;
+  bool             m_ReverseOutput;
+  bool             m_UsingPolyTree; 
+  bool             m_StrictSimple;
+#ifdef use_xyz
+  ZFillCallback   m_ZFill; //custom callback 
+#endif
+  void SetWindingCount(TEdge& edge);
+  bool IsEvenOddFillType(const TEdge& edge) const;
+  bool IsEvenOddAltFillType(const TEdge& edge) const;
+  void InsertScanbeam(const cInt Y);
+  cInt PopScanbeam();
+  void InsertLocalMinimaIntoAEL(const cInt botY);
+  void InsertEdgeIntoAEL(TEdge *edge, TEdge* startEdge);
+  void AddEdgeToSEL(TEdge *edge);
+  void CopyAELToSEL();
+  void DeleteFromSEL(TEdge *e);
+  void DeleteFromAEL(TEdge *e);
+  void UpdateEdgeIntoAEL(TEdge *&e);
+  void SwapPositionsInSEL(TEdge *edge1, TEdge *edge2);
+  bool IsContributing(const TEdge& edge) const;
+  bool IsTopHorz(const cInt XPos);
+  void SwapPositionsInAEL(TEdge *edge1, TEdge *edge2);
+  void DoMaxima(TEdge *e);
+  void ProcessHorizontals();
+  void ProcessHorizontal(TEdge *horzEdge);
+  void AddLocalMaxPoly(TEdge *e1, TEdge *e2, const IntPoint &pt);
+  OutPt* AddLocalMinPoly(TEdge *e1, TEdge *e2, const IntPoint &pt);
+  OutRec* GetOutRec(int idx);
+  void AppendPolygon(TEdge *e1, TEdge *e2);
+  void IntersectEdges(TEdge *e1, TEdge *e2, IntPoint &pt);
+  OutRec* CreateOutRec();
+  OutPt* AddOutPt(TEdge *e, const IntPoint &pt);
+  OutPt* GetLastOutPt(TEdge *e);
+  void DisposeAllOutRecs();
+  void DisposeOutRec(PolyOutList::size_type index);
+  bool ProcessIntersections(const cInt topY);
+  void BuildIntersectList(const cInt topY);
+  void ProcessIntersectList();
+  void ProcessEdgesAtTopOfScanbeam(const cInt topY);
+  void BuildResult(Paths& polys);
+  void BuildResult2(PolyTree& polytree);
+  void SetHoleState(TEdge *e, OutRec *outrec);
+  void DisposeIntersectNodes();
+  bool FixupIntersectionOrder();
+  void FixupOutPolygon(OutRec &outrec);
+  void FixupOutPolyline(OutRec &outrec);
+  bool IsHole(TEdge *e);
+  bool FindOwnerFromSplitRecs(OutRec &outRec, OutRec *&currOrfl);
+  void FixHoleLinkage(OutRec &outrec);
+  void AddJoin(OutPt *op1, OutPt *op2, const IntPoint offPt);
+  void ClearJoins();
+  void ClearGhostJoins();
+  void AddGhostJoin(OutPt *op, const IntPoint offPt);
+  bool JoinPoints(Join *j, OutRec* outRec1, OutRec* outRec2);
+  void JoinCommonEdges();
+  void DoSimplePolygons();
+  void FixupFirstLefts1(OutRec* OldOutRec, OutRec* NewOutRec);
+  void FixupFirstLefts2(OutRec* OldOutRec, OutRec* NewOutRec);
+#ifdef use_xyz
+  void SetZ(IntPoint& pt, TEdge& e1, TEdge& e2);
+#endif
+};
+//------------------------------------------------------------------------------
+
+class ClipperOffset 
+{
+public:
+  ClipperOffset(double miterLimit = 2.0, double roundPrecision = 0.25);
+  ~ClipperOffset();
+  void AddPath(const Path& path, JoinType joinType, EndType endType);
+  void AddPaths(const Paths& paths, JoinType joinType, EndType endType);
+  void Execute(Paths& solution, double delta);
+  void Execute(PolyTree& solution, double delta);
+  void Clear();
+  double MiterLimit;
+  double ArcTolerance;
+private:
+  Paths m_destPolys;
+  Path m_srcPoly;
+  Path m_destPoly;
+  std::vector<DoublePoint> m_normals;
+  double m_delta, m_sinA, m_sin, m_cos;
+  double m_miterLim, m_StepsPerRad;
+  IntPoint m_lowest;
+  PolyNode m_polyNodes;
+
+  void FixOrientations();
+  void DoOffset(double delta);
+  void OffsetPoint(int j, int& k, JoinType jointype);
+  void DoSquare(int j, int k);
+  void DoMiter(int j, int k, double r);
+  void DoRound(int j, int k);
+};
+//------------------------------------------------------------------------------
+
+class clipperException : public std::exception
+{
+  public:
+    clipperException(const char* description): m_descr(description) {}
+    virtual ~clipperException() throw() {}
+    virtual const char* what() const throw() {return m_descr.c_str();}
+  private:
+    std::string m_descr;
+};
+//------------------------------------------------------------------------------
+
+} //ClipperLib namespace
+
+#endif //clipper_hpp
+
+
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/remap/src/cputime.cpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/remap/src/cputime.cpp	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/remap/src/cputime.cpp	(revision 1749)
@@ -0,0 +1,10 @@
+#include "mpi.hpp"
+
+namespace sphereRemap {
+  
+double cputime()
+{
+	return MPI_Wtime();
+}
+
+}
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/remap/src/cputime.hpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/remap/src/cputime.hpp	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/remap/src/cputime.hpp	(revision 1749)
@@ -0,0 +1,5 @@
+namespace sphereRemap {
+
+double cputime();
+
+}
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/remap/src/earcut.hpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/remap/src/earcut.hpp	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/remap/src/earcut.hpp	(revision 1749)
@@ -0,0 +1,775 @@
+#pragma once
+
+#include <algorithm>
+#include <cassert>
+#include <cmath>
+#include <memory>
+#include <vector>
+//#include <tuple>
+//#include <cstdint> 
+//#include <cstddef>
+
+namespace mapbox {
+
+namespace util {
+
+  template <std::size_t I, typename T> struct nth {
+  inline static typename std::tuple_element<I, T>::type 
+  get(const T& t) { return std::get<I>(t); };
+};
+
+}
+
+namespace detail {
+
+template <typename N = std::uint32_t>
+class Earcut {
+public:
+    std::vector<N> indices;
+    std::size_t vertices = 0;
+
+    template <typename Polygon>
+    void operator()(const Polygon& points);
+
+private:
+    struct Node {
+        Node(N index, double x_, double y_) : i(index), x(x_), y(y_) {}
+        Node(const Node&) = delete;
+        Node& operator=(const Node&) = delete;
+        Node(Node&&) = delete;
+        Node& operator=(Node&&) = delete;
+
+        const N i;
+        const double x;
+        const double y;
+
+        // previous and next vertice nodes in a polygon ring
+        Node* prev = nullptr;
+        Node* next = nullptr;
+
+        // z-order curve value
+        int32_t z = 0;
+
+        // previous and next nodes in z-order
+        Node* prevZ = nullptr;
+        Node* nextZ = nullptr;
+
+        // indicates whether this is a steiner point
+        bool steiner = false;
+    };
+
+    template <typename Ring> Node* linkedList(const Ring& points, const bool clockwise);
+    Node* filterPoints(Node* start, Node* end = nullptr);
+    void earcutLinked(Node* ear, int pass = 0);
+    bool isEar(Node* ear);
+    bool isEarHashed(Node* ear);
+    Node* cureLocalIntersections(Node* start);
+    void splitEarcut(Node* start);
+    template <typename Polygon> Node* eliminateHoles(const Polygon& points, Node* outerNode);
+    void eliminateHole(Node* hole, Node* outerNode);
+    Node* findHoleBridge(Node* hole, Node* outerNode);
+    void indexCurve(Node* start);
+    Node* sortLinked(Node* list);
+    int32_t zOrder(const double x_, const double y_);
+    Node* getLeftmost(Node* start);
+    bool pointInTriangle(double ax, double ay, double bx, double by, double cx, double cy, double px, double py) const;
+    bool isValidDiagonal(Node* a, Node* b);
+    double area(const Node* p, const Node* q, const Node* r) const;
+    bool equals(const Node* p1, const Node* p2);
+    bool intersects(const Node* p1, const Node* q1, const Node* p2, const Node* q2);
+    bool intersectsPolygon(const Node* a, const Node* b);
+    bool locallyInside(const Node* a, const Node* b);
+    bool middleInside(const Node* a, const Node* b);
+    Node* splitPolygon(Node* a, Node* b);
+    template <typename Point> Node* insertNode(std::size_t i, const Point& p, Node* last);
+    void removeNode(Node* p);
+
+    bool hashing;
+    double minX, maxX;
+    double minY, maxY;
+    double inv_size = 0;
+
+    template <typename T, typename Alloc = std::allocator<T>>
+    class ObjectPool {
+    public:
+        ObjectPool() { }
+        ObjectPool(std::size_t blockSize_) {
+            reset(blockSize_);
+        }
+        ~ObjectPool() {
+            clear();
+        }
+        template <typename... Args>
+        T* construct(Args&&... args) {
+            if (currentIndex >= blockSize) {
+                currentBlock = alloc.allocate(blockSize);
+                allocations.emplace_back(currentBlock);
+                currentIndex = 0;
+            }
+            T* object = &currentBlock[currentIndex++];
+            alloc.construct(object, std::forward<Args>(args)...);
+            return object;
+        }
+        void reset(std::size_t newBlockSize) {
+            for (auto allocation : allocations) alloc.deallocate(allocation, blockSize);
+            allocations.clear();
+            blockSize = std::max<std::size_t>(1, newBlockSize);
+            currentBlock = nullptr;
+            currentIndex = blockSize;
+        }
+        void clear() { reset(blockSize); }
+    private:
+        T* currentBlock = nullptr;
+        std::size_t currentIndex = 1;
+        std::size_t blockSize = 1;
+        std::vector<T*> allocations;
+        Alloc alloc;
+    };
+    ObjectPool<Node> nodes;
+};
+
+template <typename N> template <typename Polygon>
+void Earcut<N>::operator()(const Polygon& points) {
+    // reset
+    indices.clear();
+    vertices = 0;
+
+    if (points.empty()) return;
+
+    double x;
+    double y;
+    int threshold = 80;
+    std::size_t len = 0;
+
+    for (size_t i = 0; threshold >= 0 && i < points.size(); i++) {
+        threshold -= static_cast<int>(points[i].size());
+        len += points[i].size();
+    }
+
+    //estimate size of nodes and indices
+    nodes.reset(len * 3 / 2);
+    indices.reserve(len + points[0].size());
+
+    Node* outerNode = linkedList(points[0], true);
+    if (!outerNode) return;
+
+    if (points.size() > 1) outerNode = eliminateHoles(points, outerNode);
+
+    // if the shape is not too simple, we'll use z-order curve hash later; calculate polygon bbox
+    hashing = threshold < 0;
+    if (hashing) {
+        Node* p = outerNode->next;
+        minX = maxX = outerNode->x;
+        minY = maxY = outerNode->y;
+        do {
+            x = p->x;
+            y = p->y;
+            minX = std::min<double>(minX, x);
+            minY = std::min<double>(minY, y);
+            maxX = std::max<double>(maxX, x);
+            maxY = std::max<double>(maxY, y);
+            p = p->next;
+        } while (p != outerNode);
+
+        // minX, minY and size are later used to transform coords into integers for z-order calculation
+        inv_size = std::max<double>(maxX - minX, maxY - minY);
+        inv_size = inv_size != .0 ? (1. / inv_size) : .0;
+    }
+
+    earcutLinked(outerNode);
+
+    nodes.clear();
+}
+
+// create a circular doubly linked list from polygon points in the specified winding order
+template <typename N> template <typename Ring>
+typename Earcut<N>::Node*
+Earcut<N>::linkedList(const Ring& points, const bool clockwise) {
+    using Point = typename Ring::value_type;
+    double sum = 0;
+    const std::size_t len = points.size();
+    std::size_t i, j;
+    Node* last = nullptr;
+
+    // calculate original winding order of a polygon ring
+    for (i = 0, j = len > 0 ? len - 1 : 0; i < len; j = i++) {
+        const auto& p1 = points[i];
+        const auto& p2 = points[j];
+        const double p20 = util::nth<0, Point>::get(p2);
+        const double p10 = util::nth<0, Point>::get(p1);
+        const double p11 = util::nth<1, Point>::get(p1);
+        const double p21 = util::nth<1, Point>::get(p2);
+        sum += (p20 - p10) * (p11 + p21);
+    }
+
+    // link points into circular doubly-linked list in the specified winding order
+    if (clockwise == (sum > 0)) {
+        for (i = 0; i < len; i++) last = insertNode(vertices + i, points[i], last);
+    } else {
+        for (i = len; i-- > 0;) last = insertNode(vertices + i, points[i], last);
+    }
+
+    if (last && equals(last, last->next)) {
+        removeNode(last);
+        last = last->next;
+    }
+
+    vertices += len;
+
+    return last;
+}
+
+// eliminate colinear or duplicate points
+template <typename N>
+typename Earcut<N>::Node*
+Earcut<N>::filterPoints(Node* start, Node* end) {
+    if (!end) end = start;
+
+    Node* p = start;
+    bool again;
+    do {
+        again = false;
+
+        if (!p->steiner && (equals(p, p->next) || area(p->prev, p, p->next) == 0)) {
+            removeNode(p);
+            p = end = p->prev;
+
+            if (p == p->next) break;
+            again = true;
+
+        } else {
+            p = p->next;
+        }
+    } while (again || p != end);
+
+    return end;
+}
+
+// main ear slicing loop which triangulates a polygon (given as a linked list)
+template <typename N>
+void Earcut<N>::earcutLinked(Node* ear, int pass) {
+    if (!ear) return;
+
+    // interlink polygon nodes in z-order
+    if (!pass && hashing) indexCurve(ear);
+
+    Node* stop = ear;
+    Node* prev;
+    Node* next;
+
+    int iterations = 0;
+
+    // iterate through ears, slicing them one by one
+    while (ear->prev != ear->next) {
+        iterations++;
+        prev = ear->prev;
+        next = ear->next;
+
+        if (hashing ? isEarHashed(ear) : isEar(ear)) {
+            // cut off the triangle
+            indices.emplace_back(prev->i);
+            indices.emplace_back(ear->i);
+            indices.emplace_back(next->i);
+
+            removeNode(ear);
+
+            // skipping the next vertice leads to less sliver triangles
+            ear = next->next;
+            stop = next->next;
+
+            continue;
+        }
+
+        ear = next;
+
+        // if we looped through the whole remaining polygon and can't find any more ears
+        if (ear == stop) {
+            // try filtering points and slicing again
+            if (!pass) earcutLinked(filterPoints(ear), 1);
+
+            // if this didn't work, try curing all small self-intersections locally
+            else if (pass == 1) {
+                ear = cureLocalIntersections(ear);
+                earcutLinked(ear, 2);
+
+            // as a last resort, try splitting the remaining polygon into two
+            } else if (pass == 2) splitEarcut(ear);
+
+            break;
+        }
+    }
+}
+
+// check whether a polygon node forms a valid ear with adjacent nodes
+template <typename N>
+bool Earcut<N>::isEar(Node* ear) {
+    const Node* a = ear->prev;
+    const Node* b = ear;
+    const Node* c = ear->next;
+
+    if (area(a, b, c) >= 0) return false; // reflex, can't be an ear
+
+    // now make sure we don't have other points inside the potential ear
+    Node* p = ear->next->next;
+
+    while (p != ear->prev) {
+        if (pointInTriangle(a->x, a->y, b->x, b->y, c->x, c->y, p->x, p->y) &&
+            area(p->prev, p, p->next) >= 0) return false;
+        p = p->next;
+    }
+
+    return true;
+}
+
+template <typename N>
+bool Earcut<N>::isEarHashed(Node* ear) {
+    const Node* a = ear->prev;
+    const Node* b = ear;
+    const Node* c = ear->next;
+
+    if (area(a, b, c) >= 0) return false; // reflex, can't be an ear
+
+    // triangle bbox; min & max are calculated like this for speed
+    const double minTX = std::min<double>(a->x, std::min<double>(b->x, c->x));
+    const double minTY = std::min<double>(a->y, std::min<double>(b->y, c->y));
+    const double maxTX = std::max<double>(a->x, std::max<double>(b->x, c->x));
+    const double maxTY = std::max<double>(a->y, std::max<double>(b->y, c->y));
+
+    // z-order range for the current triangle bbox;
+    const int32_t minZ = zOrder(minTX, minTY);
+    const int32_t maxZ = zOrder(maxTX, maxTY);
+
+    // first look for points inside the triangle in increasing z-order
+    Node* p = ear->nextZ;
+
+    while (p && p->z <= maxZ) {
+        if (p != ear->prev && p != ear->next &&
+            pointInTriangle(a->x, a->y, b->x, b->y, c->x, c->y, p->x, p->y) &&
+            area(p->prev, p, p->next) >= 0) return false;
+        p = p->nextZ;
+    }
+
+    // then look for points in decreasing z-order
+    p = ear->prevZ;
+
+    while (p && p->z >= minZ) {
+        if (p != ear->prev && p != ear->next &&
+            pointInTriangle(a->x, a->y, b->x, b->y, c->x, c->y, p->x, p->y) &&
+            area(p->prev, p, p->next) >= 0) return false;
+        p = p->prevZ;
+    }
+
+    return true;
+}
+
+// go through all polygon nodes and cure small local self-intersections
+template <typename N>
+typename Earcut<N>::Node*
+Earcut<N>::cureLocalIntersections(Node* start) {
+    Node* p = start;
+    do {
+        Node* a = p->prev;
+        Node* b = p->next->next;
+
+        // a self-intersection where edge (v[i-1],v[i]) intersects (v[i+1],v[i+2])
+        if (!equals(a, b) && intersects(a, p, p->next, b) && locallyInside(a, b) && locallyInside(b, a)) {
+            indices.emplace_back(a->i);
+            indices.emplace_back(p->i);
+            indices.emplace_back(b->i);
+
+            // remove two nodes involved
+            removeNode(p);
+            removeNode(p->next);
+
+            p = start = b;
+        }
+        p = p->next;
+    } while (p != start);
+
+    return p;
+}
+
+// try splitting polygon into two and triangulate them independently
+template <typename N>
+void Earcut<N>::splitEarcut(Node* start) {
+    // look for a valid diagonal that divides the polygon into two
+    Node* a = start;
+    do {
+        Node* b = a->next->next;
+        while (b != a->prev) {
+            if (a->i != b->i && isValidDiagonal(a, b)) {
+                // split the polygon in two by the diagonal
+                Node* c = splitPolygon(a, b);
+
+                // filter colinear points around the cuts
+                a = filterPoints(a, a->next);
+                c = filterPoints(c, c->next);
+
+                // run earcut on each half
+                earcutLinked(a);
+                earcutLinked(c);
+                return;
+            }
+            b = b->next;
+        }
+        a = a->next;
+    } while (a != start);
+}
+
+// link every hole into the outer loop, producing a single-ring polygon without holes
+template <typename N> template <typename Polygon>
+typename Earcut<N>::Node*
+Earcut<N>::eliminateHoles(const Polygon& points, Node* outerNode) {
+    const size_t len = points.size();
+
+    std::vector<Node*> queue;
+    for (size_t i = 1; i < len; i++) {
+        Node* list = linkedList(points[i], false);
+        if (list) {
+            if (list == list->next) list->steiner = true;
+            queue.push_back(getLeftmost(list));
+        }
+    }
+    std::sort(queue.begin(), queue.end(), [](const Node* a, const Node* b) {
+        return a->x < b->x;
+    });
+
+    // process holes from left to right
+    for (size_t i = 0; i < queue.size(); i++) {
+        eliminateHole(queue[i], outerNode);
+        outerNode = filterPoints(outerNode, outerNode->next);
+    }
+
+    return outerNode;
+}
+
+// find a bridge between vertices that connects hole with an outer ring and and link it
+template <typename N>
+void Earcut<N>::eliminateHole(Node* hole, Node* outerNode) {
+    outerNode = findHoleBridge(hole, outerNode);
+    if (outerNode) {
+        Node* b = splitPolygon(outerNode, hole);
+        filterPoints(b, b->next);
+    }
+}
+
+// David Eberly's algorithm for finding a bridge between hole and outer polygon
+template <typename N>
+typename Earcut<N>::Node*
+Earcut<N>::findHoleBridge(Node* hole, Node* outerNode) {
+    Node* p = outerNode;
+    double hx = hole->x;
+    double hy = hole->y;
+    double qx = -std::numeric_limits<double>::infinity();
+    Node* m = nullptr;
+
+    // find a segment intersected by a ray from the hole's leftmost Vertex to the left;
+    // segment's endpoint with lesser x will be potential connection Vertex
+    do {
+        if (hy <= p->y && hy >= p->next->y && p->next->y != p->y) {
+          double x = p->x + (hy - p->y) * (p->next->x - p->x) / (p->next->y - p->y);
+          if (x <= hx && x > qx) {
+            qx = x;
+            if (x == hx) {
+                if (hy == p->y) return p;
+                if (hy == p->next->y) return p->next;
+            }
+            m = p->x < p->next->x ? p : p->next;
+          }
+        }
+        p = p->next;
+    } while (p != outerNode);
+
+    if (!m) return 0;
+
+    if (hx == qx) return m->prev;
+
+    // look for points inside the triangle of hole Vertex, segment intersection and endpoint;
+    // if there are no points found, we have a valid connection;
+    // otherwise choose the Vertex of the minimum angle with the ray as connection Vertex
+
+    const Node* stop = m;
+    double tanMin = std::numeric_limits<double>::infinity();
+    double tanCur = 0;
+
+    p = m->next;
+    double mx = m->x;
+    double my = m->y;
+
+    while (p != stop) {
+        if (hx >= p->x && p->x >= mx && hx != p->x &&
+            pointInTriangle(hy < my ? hx : qx, hy, mx, my, hy < my ? qx : hx, hy, p->x, p->y)) {
+
+            tanCur = std::abs(hy - p->y) / (hx - p->x); // tangential
+
+            if ((tanCur < tanMin || (tanCur == tanMin && p->x > m->x)) && locallyInside(p, hole)) {
+                m = p;
+                tanMin = tanCur;
+            }
+        }
+
+        p = p->next;
+    }
+
+    return m;
+}
+
+// interlink polygon nodes in z-order
+template <typename N>
+void Earcut<N>::indexCurve(Node* start) {
+    assert(start);
+    Node* p = start;
+
+    do {
+        p->z = p->z ? p->z : zOrder(p->x, p->y);
+        p->prevZ = p->prev;
+        p->nextZ = p->next;
+        p = p->next;
+    } while (p != start);
+
+    p->prevZ->nextZ = nullptr;
+    p->prevZ = nullptr;
+
+    sortLinked(p);
+}
+
+// Simon Tatham's linked list merge sort algorithm
+// http://www.chiark.greenend.org.uk/~sgtatham/algorithms/listsort.html
+template <typename N>
+typename Earcut<N>::Node*
+Earcut<N>::sortLinked(Node* list) {
+    assert(list);
+    Node* p;
+    Node* q;
+    Node* e;
+    Node* tail;
+    int i, numMerges, pSize, qSize;
+    int inSize = 1;
+
+    for (;;) {
+        p = list;
+        list = nullptr;
+        tail = nullptr;
+        numMerges = 0;
+
+        while (p) {
+            numMerges++;
+            q = p;
+            pSize = 0;
+            for (i = 0; i < inSize; i++) {
+                pSize++;
+                q = q->nextZ;
+                if (!q) break;
+            }
+
+            qSize = inSize;
+
+            while (pSize > 0 || (qSize > 0 && q)) {
+
+                if (pSize == 0) {
+                    e = q;
+                    q = q->nextZ;
+                    qSize--;
+                } else if (qSize == 0 || !q) {
+                    e = p;
+                    p = p->nextZ;
+                    pSize--;
+                } else if (p->z <= q->z) {
+                    e = p;
+                    p = p->nextZ;
+                    pSize--;
+                } else {
+                    e = q;
+                    q = q->nextZ;
+                    qSize--;
+                }
+
+                if (tail) tail->nextZ = e;
+                else list = e;
+
+                e->prevZ = tail;
+                tail = e;
+            }
+
+            p = q;
+        }
+
+        tail->nextZ = nullptr;
+
+        if (numMerges <= 1) return list;
+
+        inSize *= 2;
+    }
+}
+
+// z-order of a Vertex given coords and size of the data bounding box
+template <typename N>
+int32_t Earcut<N>::zOrder(const double x_, const double y_) {
+    // coords are transformed into non-negative 15-bit integer range
+    int32_t x = static_cast<int32_t>(32767.0 * (x_ - minX) * inv_size);
+    int32_t y = static_cast<int32_t>(32767.0 * (y_ - minY) * inv_size);
+
+    x = (x | (x << 8)) & 0x00FF00FF;
+    x = (x | (x << 4)) & 0x0F0F0F0F;
+    x = (x | (x << 2)) & 0x33333333;
+    x = (x | (x << 1)) & 0x55555555;
+
+    y = (y | (y << 8)) & 0x00FF00FF;
+    y = (y | (y << 4)) & 0x0F0F0F0F;
+    y = (y | (y << 2)) & 0x33333333;
+    y = (y | (y << 1)) & 0x55555555;
+
+    return x | (y << 1);
+}
+
+// find the leftmost node of a polygon ring
+template <typename N>
+typename Earcut<N>::Node*
+Earcut<N>::getLeftmost(Node* start) {
+    Node* p = start;
+    Node* leftmost = start;
+    do {
+        if (p->x < leftmost->x) leftmost = p;
+        p = p->next;
+    } while (p != start);
+
+    return leftmost;
+}
+
+// check if a point lies within a convex triangle
+template <typename N>
+bool Earcut<N>::pointInTriangle(double ax, double ay, double bx, double by, double cx, double cy, double px, double py) const {
+    return (cx - px) * (ay - py) - (ax - px) * (cy - py) >= 0 &&
+           (ax - px) * (by - py) - (bx - px) * (ay - py) >= 0 &&
+           (bx - px) * (cy - py) - (cx - px) * (by - py) >= 0;
+}
+
+// check if a diagonal between two polygon nodes is valid (lies in polygon interior)
+template <typename N>
+bool Earcut<N>::isValidDiagonal(Node* a, Node* b) {
+    return a->next->i != b->i && a->prev->i != b->i && !intersectsPolygon(a, b) &&
+           locallyInside(a, b) && locallyInside(b, a) && middleInside(a, b);
+}
+
+// signed area of a triangle
+template <typename N>
+double Earcut<N>::area(const Node* p, const Node* q, const Node* r) const {
+    return (q->y - p->y) * (r->x - q->x) - (q->x - p->x) * (r->y - q->y);
+}
+
+// check if two points are equal
+template <typename N>
+bool Earcut<N>::equals(const Node* p1, const Node* p2) {
+    return p1->x == p2->x && p1->y == p2->y;
+}
+
+// check if two segments intersect
+template <typename N>
+bool Earcut<N>::intersects(const Node* p1, const Node* q1, const Node* p2, const Node* q2) {
+    if ((equals(p1, q1) && equals(p2, q2)) ||
+        (equals(p1, q2) && equals(p2, q1))) return true;
+    return (area(p1, q1, p2) > 0) != (area(p1, q1, q2) > 0) &&
+           (area(p2, q2, p1) > 0) != (area(p2, q2, q1) > 0);
+}
+
+// check if a polygon diagonal intersects any polygon segments
+template <typename N>
+bool Earcut<N>::intersectsPolygon(const Node* a, const Node* b) {
+    const Node* p = a;
+    do {
+        if (p->i != a->i && p->next->i != a->i && p->i != b->i && p->next->i != b->i &&
+                intersects(p, p->next, a, b)) return true;
+        p = p->next;
+    } while (p != a);
+
+    return false;
+}
+
+// check if a polygon diagonal is locally inside the polygon
+template <typename N>
+bool Earcut<N>::locallyInside(const Node* a, const Node* b) {
+    return area(a->prev, a, a->next) < 0 ?
+        area(a, b, a->next) >= 0 && area(a, a->prev, b) >= 0 :
+        area(a, b, a->prev) < 0 || area(a, a->next, b) < 0;
+}
+
+// check if the middle Vertex of a polygon diagonal is inside the polygon
+template <typename N>
+bool Earcut<N>::middleInside(const Node* a, const Node* b) {
+    const Node* p = a;
+    bool inside = false;
+    double px = (a->x + b->x) / 2;
+    double py = (a->y + b->y) / 2;
+    do {
+        if (((p->y > py) != (p->next->y > py)) && p->next->y != p->y &&
+                (px < (p->next->x - p->x) * (py - p->y) / (p->next->y - p->y) + p->x))
+            inside = !inside;
+        p = p->next;
+    } while (p != a);
+
+    return inside;
+}
+
+// link two polygon vertices with a bridge; if the vertices belong to the same ring, it splits
+// polygon into two; if one belongs to the outer ring and another to a hole, it merges it into a
+// single ring
+template <typename N>
+typename Earcut<N>::Node*
+Earcut<N>::splitPolygon(Node* a, Node* b) {
+    Node* a2 = nodes.construct(a->i, a->x, a->y);
+    Node* b2 = nodes.construct(b->i, b->x, b->y);
+    Node* an = a->next;
+    Node* bp = b->prev;
+
+    a->next = b;
+    b->prev = a;
+
+    a2->next = an;
+    an->prev = a2;
+
+    b2->next = a2;
+    a2->prev = b2;
+
+    bp->next = b2;
+    b2->prev = bp;
+
+    return b2;
+}
+
+// create a node and util::optionally link it with previous one (in a circular doubly linked list)
+template <typename N> template <typename Point>
+typename Earcut<N>::Node*
+Earcut<N>::insertNode(std::size_t i, const Point& pt, Node* last) {
+    Node* p = nodes.construct(static_cast<N>(i), util::nth<0, Point>::get(pt), util::nth<1, Point>::get(pt));
+
+    if (!last) {
+        p->prev = p;
+        p->next = p;
+
+    } else {
+        assert(last);
+        p->next = last->next;
+        p->prev = last;
+        last->next->prev = p;
+        last->next = p;
+    }
+    return p;
+}
+
+template <typename N>
+void Earcut<N>::removeNode(Node* p) {
+    p->next->prev = p->prev;
+    p->prev->next = p->next;
+
+    if (p->prevZ) p->prevZ->nextZ = p->nextZ;
+    if (p->nextZ) p->nextZ->prevZ = p->prevZ;
+}
+}
+
+template <typename N = uint32_t, typename Polygon>
+std::vector<N> earcut(const Polygon& poly) {
+    mapbox::detail::Earcut<N> earcut;
+    earcut(poly);
+    return std::move(earcut.indices);
+}
+}
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/remap/src/elt.hpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/remap/src/elt.hpp	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/remap/src/elt.hpp	(revision 1749)
@@ -0,0 +1,162 @@
+#ifndef __ELT_H__
+#define __ELT_H__
+#include <list>
+#include "triple.hpp"
+
+#define NMAX 10 /**< maximum number of vertices for polygons */
+
+#define NOT_FOUND -1
+
+namespace sphereRemap {
+
+using namespace std;
+
+Coord barycentre(const Coord *x, int n);
+
+/** Two great or small circles (or mixed) have two or zero intersections.
+    The coordinates of the intersections are stored in `pt` and `nb` holds the number of intersections (0 or 2).
+    */
+struct Ipt
+{
+	int nb;
+	Coord pt[2];
+};
+
+struct Sgm // edge
+{
+	Coord n; // normal
+	Coord xt[2]; // endpoints
+	double d; // (see Elt)
+};
+
+struct GloId
+{
+	int rank;
+	int ind; /* local id */
+  long globalId ;
+
+	bool operator<(const GloId& other) const {
+		return (rank == other.rank) ? (ind < other.ind) : (rank < other.rank);
+	}
+};
+
+struct Polyg 
+{ 
+	/* Note:  for the target grid elements the id (rank and local id) depends on the order of the target grid elements as read from the nc-file whereas for source grid elements it depends on the SS-tree (i.e. super mesh distribution, not the order in the nc-file) */
+	struct GloId id;
+	struct GloId src_id;
+	int n; /* number of vertices */
+	double area;
+  double given_area ;
+	Coord x; /* barycentre */
+};
+
+struct Elt : Polyg
+{
+	Elt() {}
+	Elt(const double *bounds_lon, const double *bounds_lat, int max_num_vert)
+	{
+		int k = 0;
+		vertex[k++] = xyz(bounds_lon[0], bounds_lat[0]);
+		for (int i = 1; i < max_num_vert; i++)
+		{
+			vertex[k] = xyz(bounds_lon[i], bounds_lat[i]);
+			/* netCDF convention: if first vertex repeats element is finished (at least three vertices == triagle) */
+			if (k >= 3 && squaredist(vertex[k], vertex[0]) < EPS*EPS) 
+				break;
+			/* eliminate zero edges: move to next vertex only if it is different */
+			if (squaredist(vertex[k], vertex[k-1]) > EPS*EPS)
+				k++;
+			else
+				/* cout << "Removed edge " << k << " due to zero length (coinciding endpoints)." << endl */ ;
+		}
+		n = k;
+		x = barycentre(vertex, n);
+	}
+
+	Elt& operator=(const Elt& rhs)
+	{
+		id    = rhs.id;
+		src_id    = rhs.src_id;
+		n    = rhs.n;
+		area = rhs.area;
+		given_area = rhs.given_area;
+		x    = rhs.x;
+		val  = rhs.val;
+		grad = rhs.grad;
+		is   = rhs.is;
+
+		for(int i = 0; i < NMAX; i++)
+		{
+			neighbour[i] = rhs.neighbour[i];
+			d[i]         = rhs.d[i];
+			edge[i]      = rhs.edge[i];
+			vertex[i]    = rhs.vertex[i];
+			gradNeigh[i] = rhs.gradNeigh[i];
+		}
+		return *this;
+	}
+
+	void delete_intersections()
+	{
+		for (list<Polyg*>::iterator it = this->is.begin(); it != this->is.end(); it++)
+		{
+			Polyg* poly = *it;
+			delete poly;
+		}
+	}
+
+  void insert_vertex(int i, const Coord& v)
+  {
+    for(int j=n; j > i ; j--)
+    {
+      vertex[j]=vertex[j-1] ;
+      edge[j]=edge[j-1] ;
+      d[j]=d[j-1] ;
+      neighbour[j]=neighbour[j-1] ;
+    }
+    vertex[i+1]=v ;
+    n++ ;
+  }
+  
+	int neighbour[NMAX];
+	double d[NMAX]; /**< distance of centre of small circle to origin, zero if great circle */
+	double val;     /**< value (sample if src element, interpolated if dest element) */
+	Coord vertex[NMAX];
+	Coord edge[NMAX]; /**< edge normals: if great circle tangential to sphere, if small circle parallel to pole */
+	Coord grad;    /**< gradient of the reconstructed linear function over this element */
+	Coord gradNeigh[NMAX]; /**< for weight computation: gradients for val=1 at individual neighbours */
+	struct GloId neighId[NMAX]; /**< weight computation needs to know global IDs for all sources with "link" */
+	std::list<Polyg*> is; /**< intersections */
+};
+
+static double normals(Elt &elt, const Coord &pole)
+{
+	double nmin = 17.;
+	for (int i = 0; i < elt.n; i++)  // supposed oriented
+	{
+		int j = (i+1) % elt.n;
+		elt.edge[i] = crossprod(elt.vertex[j], elt.vertex[i]); 
+		Coord t = elt.vertex[j] - elt.vertex[i];
+		/* polygonal grid || vertices not on same latitude */
+		if (pole == ORIGIN || fabs(scalarprod(t, pole)) > EPS)  // great circle
+		{
+			double n = norm(elt.edge[i]);
+			//assert(n > 0);
+			if (n < nmin) nmin = n;
+			elt.edge[i] = proj(elt.edge[i]);
+			elt.d[i] = 0.0;
+		}
+		else /* lan lot grid && vertices on same latitude => small circle */
+		{
+			int north = (scalarprod(elt.edge[i], pole) < 0) ? -1 : 1;
+			elt.edge[i] = pole * north;
+			elt.d[i] = scalarprod(elt.vertex[i], elt.edge[i]);
+		}
+	}
+	return nmin;
+}
+
+}
+
+#endif 
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/remap/src/errhandle.hpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/remap/src/errhandle.hpp	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/remap/src/errhandle.hpp	(revision 1749)
@@ -0,0 +1,22 @@
+#ifndef  __ERRHANDLE_H__
+#define __ERRHANDLE_H__
+
+#include <stdlib.h>
+#include <iostream>
+#include <string>
+
+namespace sphereRemap {
+
+static inline void error_exit(const std::string& msg)
+{
+	std::cerr << "Error: " << msg << std::endl;
+	exit(0);
+}
+
+static inline void exit_on_failure(int status, const std::string& msg)
+{
+	if (status) error_exit(msg);
+}
+
+}
+#endif
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/remap/src/gridRemap.cpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/remap/src/gridRemap.cpp	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/remap/src/gridRemap.cpp	(revision 1749)
@@ -0,0 +1,15 @@
+#include "gridRemap.hpp"
+
+namespace sphereRemap {
+
+Coord readPole(std::istream &is)
+{
+	double lon, lat;
+	is >> lon >> lat;
+	return (lon<=380 && lat<=380) ? xyz(lon, lat) : ORIGIN;
+}
+
+CRemapGrid srcGrid;
+CRemapGrid tgtGrid;
+
+}
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/remap/src/gridRemap.hpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/remap/src/gridRemap.hpp	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/remap/src/gridRemap.hpp	(revision 1749)
@@ -0,0 +1,21 @@
+#ifndef  __TREE_H__
+#define __TREE_H__
+#include <iostream>
+#include "triple.hpp"
+
+namespace sphereRemap {
+
+struct CRemapGrid
+{
+	Coord pole;
+	int numElts;
+};
+
+Coord readPole(std::istream&);
+
+extern CRemapGrid srcGrid;
+extern CRemapGrid tgtGrid;
+
+}
+
+#endif
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/remap/src/inside.cpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/remap/src/inside.cpp	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/remap/src/inside.cpp	(revision 1749)
@@ -0,0 +1,372 @@
+#include <cstdlib>
+#include <cmath>
+#include <cassert>
+#include <iostream>
+#include "elt.hpp"
+#include "polyg.hpp"
+
+#include "inside.hpp"
+
+namespace sphereRemap {
+
+static const double SNAP = 1e-11;
+
+using namespace std;
+
+/* returns the index of the element in `v` with the maximum absolute value*/
+int argmaxAbs3(double *v)
+{
+	/* ip
+	    0  F F   |v0| >= |v1| && |v0| >= |v2|  max: v0 
+	    1  T F   |v0|  < |v1| && |v1| >= |v2|       v1
+	    2  ? T   |v0|  < |v2| && |v1| <  |v2|       v2
+	*/
+	int amax = 0;
+	double maxv = fabs(v[0]);
+	if (fabs(v[1]) > maxv)
+	{
+		amax = 1;
+		maxv = fabs(v[1]);
+	}
+	if (fabs(v[2]) > maxv)
+	{
+		amax = 2;
+		maxv = fabs(v[2]);
+	}
+	return amax;
+}
+
+/**
+   Find all intersections of edges of ea with edges of eb, and store all intersection points in ipt.
+   `ipt` is flattened matix of `Ipt` with inner dimension the number of edges of `ea` and outer dimension the one of `eb`.
+   `Ipt` contains two coordinates for two possible intersections between two edges.
+*/
+void ptsec(Elt *ea, Elt *eb, Ipt *ipt)
+{
+	int na = ea->n;
+	int nb = eb->n;
+
+	for (int i = 0; i < ea->n; i++)
+	{
+		for (int j = 0; j < eb->n; j++)
+		{
+			int ij = i*eb->n + j;
+			if (norm(crossprod(ea->edge[i], eb->edge[j])) < 1e-15)
+			{
+				ipt[ij].nb = 0;
+				continue;
+			}
+
+			double A, B, C, D, Ap, Bp, Cp, Dp;
+			double d3, d4, aa, bb, cc, dd; // if polygon then d3 = d4 = 0
+			double d[3];
+
+			A =ea->edge[i].x; B =ea->edge[i].y; C =ea->edge[i].z; D =-ea->d[i];
+			Ap=eb->edge[j].x; Bp=eb->edge[j].y; Cp=eb->edge[j].z; Dp=-eb->d[j];
+
+			d[0] = B * Cp - C * Bp;
+			d[1] = C * Ap - A * Cp;
+			d[2] = A * Bp - B * Ap;
+
+			int ip = argmaxAbs3(d);
+			if (ip == 0) {
+				d3 = -ea->edge[i].z*eb->d[j]        + ea->d[i]      *eb->edge[j].z;
+				d4 = -ea->d[i]      *eb->edge[j].y  + ea->edge[i].y*eb->d[j];      
+			}
+			if (ip == 1) {
+				d[0] = C*Ap-A*Cp;
+				d[1] = A*Bp-B*Ap;
+				d[2] = B*Cp-C*Bp;
+				d3 = A*Dp-D*Ap;
+				d4 = D*Cp-C*Dp;
+			}
+			if (ip == 2) {
+				d[0] = A*Bp-B*Ap; d[1] = B*Cp-C*Bp; d[2] = C*Ap-A*Cp;
+				d3 = B*Dp-D*Bp; d4 = D*Ap-A*Dp;
+			}
+			aa = d[0]*d[0] + d[1]*d[1] + d[2]*d[2];
+			bb = d[1]*d3 + d[2]*d4;
+			cc = d3*d3 + d4*d4 - d[0]*d[0];
+			dd = bb*bb - aa*cc; // if polygon dd = 0*0 - ||d||**2 * d0**2
+
+			if (dd < EPS*EPS)
+			{
+				ipt[ij].nb = 0;
+				continue;
+			}
+			ipt[ij].nb = 2;
+
+			double v_[3];
+			v_[ip]       = (-bb + sqrt(dd))/aa;
+			v_[(ip+1)%3] = (d[1]*v_[ip] + d3)/d[0];
+			v_[(ip+2)%3] = (d[2]*v_[ip] + d4)/d[0];
+			double w_[3];
+			w_[ip]       = (-bb - sqrt(dd))/aa;
+			w_[(ip+1)%3] = (d[1]*w_[ip] + d3)/d[0];
+			w_[(ip+2)%3] = (d[2]*w_[ip] + d4)/d[0];
+
+			Coord v(v_[0], v_[1], v_[2]);
+			Coord w(w_[0], w_[1], w_[2]);
+
+			int ii = (i + 1) % na;
+			int jj = (j + 1) % nb;
+
+			/* if v and/or w is close to a vertex make exact (align) */
+			if (squaredist(v, ea->vertex[i] ) < SNAP*SNAP)  v = ea->vertex[i];
+			if (squaredist(v, ea->vertex[ii]) < SNAP*SNAP)  v = ea->vertex[ii];
+			if (squaredist(v, eb->vertex[j] ) < SNAP*SNAP)  v = eb->vertex[j];
+			if (squaredist(v, eb->vertex[jj]) < SNAP*SNAP)  v = eb->vertex[jj];
+			if (squaredist(w, ea->vertex[i] ) < SNAP*SNAP)  w = ea->vertex[i];
+			if (squaredist(w, ea->vertex[ii]) < SNAP*SNAP)  w = ea->vertex[ii];
+			if (squaredist(w, eb->vertex[j] ) < SNAP*SNAP)  w = eb->vertex[j];
+			if (squaredist(w, eb->vertex[jj]) < SNAP*SNAP)  w = eb->vertex[jj];
+
+			assert(squaredist(v,w) > EPS*EPS); // inconsistency in line intersection
+
+			/* in 99% os cases we will later discart one of the two points for lying on the the other side of the globe */
+			ipt[ij].pt[0] = v;
+			ipt[ij].pt[1] = w;
+		}
+	}
+}
+
+void recense(Elt *ea, Elt *eb, Ipt *ipt, list<Sgm> &isedge, int pass)
+{
+	list<Sgm> plan;
+	list<Sgm>::iterator bit;
+	Sgm sgm;
+	int na = ea->n;
+	int nb = eb->n;
+
+	for (int i = 0; i<na; i++)
+	{
+sega:
+		int ii = (i+1)%na;
+		sgm.n = ea->edge[i];
+		sgm.d = ea->d[i];
+		sgm.xt[0] = ea->vertex[i];
+		sgm.xt[1] = ea->vertex[ii];
+		plan.push_back(sgm);
+		for (int j = 0; j<nb; j++)
+		{
+			int ij = i*nb+j;
+			const double OUT = 1e-11;
+
+			if (ipt[ij].nb < 2)
+			{
+				bit = plan.begin();
+				double side = scalarprod(bit->xt[0], eb->edge[j]) - eb->d[j];
+				double side1= scalarprod(bit->xt[1], eb->edge[j]) - eb->d[j];
+				if (side < -OUT || side1 < -OUT ||
+						(side < OUT && side1 < OUT && pass)) //dedans
+					continue;  // all bits unscathed, j++
+				plan.clear(); i++;
+				if (i<na) goto sega; // all bits destroyed, i++
+				else return;
+			}
+
+			Coord& x = ipt[ij].pt[0];
+			Coord& y = ipt[ij].pt[1];
+			bit = plan.begin();
+			double r2 = 1 - bit->d*bit->d;
+			while (bit!=plan.end()) {  // bit++ !!
+				double lg = squaredist(bit->xt[0], bit->xt[1]);
+				double side = scalarprod(bit->xt[0], eb->edge[j]) - eb->d[j];
+				double ag = angle(bit->xt[0], bit->xt[1], bit->n) /r2;
+				double agx = angle(bit->xt[0], x, bit->n) /r2;
+				double agy = angle(bit->xt[0], y, bit->n) /r2;
+				double r = 1;//sqrt(r2);
+				int isd = 0;  // is dans le seg
+
+				if (ag > 0)
+				{
+					if (r*agx > OUT && r*agx < ag-OUT && squaredist(bit->xt[0], x) < lg) { isd += 1; }
+					if (r*agy > OUT && r*agy < ag-OUT && squaredist(bit->xt[0], y) < lg) { isd += 2; }
+				} else {
+					if (r*agx< -OUT && r*agx > ag+OUT && squaredist(bit->xt[0], x) < lg) { isd += 1; }
+					if (r*agy< -OUT && r*agy > ag+OUT && squaredist(bit->xt[0], y) < lg) { isd += 2; }
+				}
+
+				Coord m, ptout;
+				double side_m, side_pt;
+				int A=0;
+				double agrot = M_PI_2;
+				if (ag > 0) agrot *= -1;
+				switch (isd) {
+					case 0:
+						if (bit->d)
+							m = midpointSC(bit->xt[0], bit->xt[1]);
+						else
+							m = barycentre(bit->xt, 2);
+						side = scalarprod(m, eb->edge[j]) - eb->d[j];
+						if (side < 0)
+							++bit;  // unscathed
+						else
+							bit = plan.erase(bit);
+						continue;
+					case 1:
+						if (squaredist(x, bit->xt[1]) > squaredist(x, bit->xt[0])) A = 1;
+						m = (bit->d) ? midpointSC(x, bit->xt[A]) : midpoint(x, bit->xt[A]);
+						side_m = scalarprod(m, eb->edge[j]) - eb->d[j];
+						if (side_m < 0) bit->xt[1-A] = x;
+						else bit->xt[A] = x;
+						++bit;
+						continue;
+					case 2:
+						if (squaredist(y, bit->xt[0]) > squaredist(y, bit->xt[1])) A = 1;
+						m = (bit->d) ? midpointSC(y, bit->xt[A]) : midpoint(y, bit->xt[A]);
+						side_m = scalarprod(m, eb->edge[j]) - eb->d[j];
+						if (side_m < 0) bit->xt[1-A] = y;
+						else bit->xt[A] = y;
+						++bit; continue;
+					case 3:
+						ptout = bit->xt[0];
+						ptout.rot(bit->n, -ag);
+						side_pt = scalarprod(ptout, eb->edge[j]) - eb->d[j];
+						if (side_pt < 0.) {  // or side
+							Sgm sgm2;
+							sgm2.n = ea->edge[i];
+							sgm2.d = ea->d[i];
+							int A=0, B=1;
+							if (squaredist(bit->xt[0], y) < squaredist(bit->xt[0], x))
+							{
+								++A;
+								--B;
+							}
+							sgm2.xt[0] = ipt[ij].pt[B];
+							sgm2.xt[1] = bit->xt[1];
+							bit->xt[1] = ipt[ij].pt[A];
+							++bit;
+							plan.insert(bit,sgm2);
+						} else {
+							bit->xt[0] = ipt[ij].pt[0];
+							bit->xt[1] = ipt[ij].pt[1];
+							++bit;
+						}
+						continue;
+				}
+			}
+		}
+		for (bit=plan.begin(); bit!=plan.end(); ++bit) {
+			isedge.push_back(*bit);
+		}
+		plan.clear();
+	}
+
+}
+
+/* output: c, d, xc
+   in/out: isedge get elements removed */
+int assemble(list<Sgm>& isedge, Coord *c, double *d, Coord *xc)
+{
+	double lgmax = 0.;
+	int idmax = 0, id = 0;
+	for (list<Sgm>::iterator it = isedge.begin(); it != isedge.end(); ++it, ++id)
+	{
+		double lg = squaredist(it->xt[0], it->xt[1]);
+		if (lg > lgmax)
+		{
+			idmax = id;
+			lgmax = lg;
+		}
+	}
+
+	list<Sgm>::iterator it = isedge.begin();
+	advance(it, idmax);
+	c[0] = it->n;
+	d[0] = it->d;
+	xc[0] = it->xt[0];
+	Coord t = it->xt[1];
+	int nc = 1;
+	isedge.erase(it); //isedge.pop_front();
+
+	while (isedge.size())
+	{
+		/* all distances as squares to omit sqrt */
+		double d0, d1;
+		double dmin = pow(17.,2);
+		int idmin = 0, id = 0, s = 0;
+		list< pair <int, double> > way;
+		list< pair <int, double> >::iterator wi;
+		int ps1way = 0;
+		for (it = isedge.begin(); it != isedge.end(); ++it, ++id)
+		{
+			d0 = squaredist(t, it->xt[0]);
+			d1 = squaredist(t, it->xt[1]);
+			if (d0 < SNAP*SNAP || d1 < SNAP*SNAP)
+			{
+				double lg  = squaredist(it->xt[0], it->xt[1]);
+				pair <int, double> p = make_pair(id, lg);
+				if (d0 < 0.01*dmin || d1 < 0.01*dmin)
+				{
+					ps1way = 1;
+					way.push_front(p);
+				}
+				else
+				{
+					ps1way = 0;
+					way.push_back(p);
+				}
+			}
+			if (d0 < dmin)
+			{
+				idmin = id;
+				s = 0;
+				dmin = d0;
+			}
+			if (d1 < dmin)
+			{
+				idmin = id;
+				s = 1;
+				dmin = d1;
+			}
+		}
+		int ways = way.size();
+		double lgmaxx = 0.;
+		int A = 0, B = 1;
+		assert(ways < 3);
+		switch (ways)
+		{
+		case 0:
+			return nc;
+			break;
+		case 2:
+			if (ps1way == 1)
+				idmin = way.front().first;
+			else
+			{
+				for (wi = way.begin(); wi != way.end(); ++wi)
+				{
+					if (wi->second > lgmaxx)
+					{
+						idmin = wi->first;
+						lgmaxx = wi->second;
+					}
+				}
+			}
+		case 1:
+			if (ways == 1)
+				idmin = way.front().first;
+			it = isedge.begin();
+			advance(it, idmin);
+			c[nc] = it->n;
+			d[nc] = it->d;
+			if (s)
+			{
+				++A;
+				--B;
+			}
+			xc[nc] = it->xt[A];
+			t = it->xt[B];
+			nc++;
+			isedge.erase(it);
+			break;
+		default:
+			; // assert(ways < 3) above -> cannot be reached
+		}
+	}
+
+	return nc;
+}
+
+}
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/remap/src/inside.hpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/remap/src/inside.hpp	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/remap/src/inside.hpp	(revision 1749)
@@ -0,0 +1,9 @@
+#include "elt.hpp"
+
+namespace sphereRemap {
+
+void ptsec(Elt *ea, Elt *eb, Ipt *ipt);
+void recense(Elt *ea, Elt *eb, Ipt *ipt, std::list<Sgm> &iscot, int pass);
+int assemble(std::list<Sgm> &iscot, Coord *c, double *d, Coord *xc);
+
+}
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/remap/src/intersect.cpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/remap/src/intersect.cpp	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/remap/src/intersect.cpp	(revision 1749)
@@ -0,0 +1,354 @@
+#include <cstdlib>
+#include <cmath>
+#include <cassert>
+#include <cstring>
+#include <iostream>
+#include <fstream>
+#include "node.hpp"
+#include "elt.hpp"
+#include "gridRemap.hpp"
+#include "inside.hpp"
+#include "polyg.hpp"
+#include "intersect.hpp"
+#include "intersection_ym.hpp"
+
+namespace sphereRemap {
+
+using namespace std;
+
+/** returns index of edge of a that is shared with b,
+    or NOT_FOUND if a and b do not share an edge */
+int neighbour_idx(const Elt& a, const Elt& b)
+{
+	for (int i = 0; i < a.n; i++)
+	{
+		for (int j = 0; j < b.n; j++)
+		{
+			assert(squaredist(a.vertex[ i       ], b.vertex[ j       ]) > EPS*EPS ||
+			       squaredist(a.vertex[(i+1)%a.n], b.vertex[(j+1)%b.n]) > EPS*EPS);
+			if (   squaredist(a.vertex[ i       ], b.vertex[ j           ]) < 1e-13*1e-13 &&
+			       squaredist(a.vertex[(i+1)%a.n], b.vertex[(j+b.n-1)%b.n]) < 1e-13*1e-13)
+			{
+				return i;
+			}
+		}
+	}
+	return NOT_FOUND;
+}
+
+/** New methods to find an insert a neighbour in a cell of the source mesh.
+ *  return true/false if cell b is a neighbour of a. if "insert" is true, then b will be inserted as a neighbour
+ * in cell a . This is needed for 2 order interpolation that need neighboround for gradient computing.
+ * A cell is a neighbour if :
+ *  - it shares 2 countiguous vertex (ie an edge) with a
+ *  - A vertex of b is located on one of an edge of a.
+ **/
+bool insertNeighbour( Elt& a, const Elt& b, bool insert )
+{
+  // for now suppose pole -> Oz
+  Coord pole(0,0,1) ;
+  Coord O, Oa1, Oa2,Ob1,Ob2,V1,V2 ;
+  double da,db,alpha,alpha1,alpha2,delta ;
+  
+    
+  for (int i = 0; i < a.n; i++)
+  {
+    for (int j = 0; j < b.n; j++)
+    {
+// share a full edge ? be carefull at the orientation
+      assert(squaredist(a.vertex[ i       ], b.vertex[ j       ]) > 1e-10*1e-10 ||
+             squaredist(a.vertex[(i+1)%a.n], b.vertex[(j+1)%b.n]) > 1e-10*1e-10);
+      if (   squaredist(a.vertex[ i       ], b.vertex[ j           ]) < 1e-10*1e-10 &&
+             squaredist(a.vertex[(i+1)%a.n], b.vertex[(j+b.n-1)%b.n]) < 1e-10*1e-10)
+      {
+        if (insert) a.neighbour[i] = b.id.ind ;
+        return true;
+      }
+      
+
+// 1 or 2 vertices of b is located on an edge of a
+       da=a.d[i] ;
+       if (scalarprod(a.edge[i], pole) < 0) da=-da ;
+       db=b.d[(j+b.n-1)%b.n] ;
+       if (scalarprod(b.edge[(j+b.n-1)%b.n], pole) < 0) db=-db ;
+      
+      if ( fabs(da-db)<1e-10 ) 
+      {
+        O=pole*da ;
+        Oa1=a.vertex[i]-O ;
+        Oa2=a.vertex[(i+1)%a.n]-O ; 
+        Ob1=b.vertex[j]-O ;
+        Ob2=b.vertex[(j+b.n-1)%b.n]-O ;
+        V1=crossprod(Oa1,Oa2) ;
+        V2=crossprod(Ob1,Ob2) ;
+        if (norm(crossprod(V1,V2))/(norm(V1)*norm(V2)) < 1e-10)
+        {
+          alpha = vectAngle(Oa1,Oa2,V1) ;
+          alpha1= vectAngle(Oa1,Ob1,V1) ;
+          alpha2= vectAngle(Oa1,Ob2,V1) ;
+          delta= alpha2-alpha1 ;
+          if (delta >= M_PI) delta=2*M_PI-delta ;
+          else if (delta <= -M_PI) delta=2*M_PI+delta ;
+          
+          if (alpha >= 0)
+          {
+            if (alpha1 > 1e-10 && alpha1 < alpha-1e-10)
+            {
+              if (alpha2 > 1e-10 && alpha2 < alpha-1e-10)
+              {
+                assert(delta > 0) ;
+                if (insert)
+                {
+                // insert both
+                  a.insert_vertex(i,b.vertex[(j+b.n-1)%b.n]);
+                  a.insert_vertex(i,b.vertex[j]);
+                  a.neighbour[i+1] = b.id.ind ;
+                }
+                return true ;
+              }
+              else
+              {
+                assert( delta > 0 ) ;
+                if (insert)
+                {
+                //insert alpha1
+                  a.insert_vertex(i,b.vertex[j]);
+                  a.neighbour[i+1] = b.id.ind ;
+                }
+                return true ;
+              }
+            }
+            else if (alpha2 > 1e-10 && alpha2 < alpha-1e-10)
+            {
+              assert( delta > 0 ) ;
+              if (insert)
+              {
+              // insert alpha2
+                a.insert_vertex(i,b.vertex[(j+b.n-1)%b.n]);
+                a.neighbour[i] = b.id.ind ;
+              }
+              return true ;
+            }
+            else
+            {
+              // nothing to do
+            } 
+
+          }
+          else  // alpha < 0
+          {
+            if (alpha1 < -1e-10 && alpha1 > alpha+1e-10)
+            {
+              if (alpha2 < -1e-10 && alpha2 > alpha+1e-10)
+              {
+                assert(delta < 0) ;
+                if (insert)
+                {
+                // insert both
+                  a.insert_vertex(i,b.vertex[(j+b.n-1)%b.n]);
+                  a.insert_vertex(i,b.vertex[j]);
+                  a.neighbour[i+1] = b.id.ind ;
+                }
+                return true ;
+              }
+              else
+              {
+                assert(delta < 0) ;
+                if (insert)
+                {
+                //insert alpha1
+                  a.insert_vertex(i,b.vertex[j]);
+                  a.neighbour[i+1] = b.id.ind ;
+                }
+                return true ;
+              }
+            }
+            else if (alpha2 < -1e-10 && alpha2 > alpha+1e-10)
+            {
+              assert(delta < 0) ;
+              if (insert)
+              {
+              // insert alpha2
+                a.insert_vertex(i,b.vertex[(j+b.n-1)%b.n]);
+                a.neighbour[i] = b.id.ind ;
+              }
+              return true ;
+            }
+            else
+            {
+               // nothing to do
+            }
+          }
+        }
+      }
+    }
+  }
+  return false;
+}
+
+/**
+If `a` and `b` are neighbours (in the sense that they share an edge)
+then this information will be stored in `a` (but not in `b`)
+*/
+void set_neighbour(Elt& a, const Elt& b)
+{
+  if (b.id.ind == a.id.ind) return;
+/*
+  int idx = neighbour_idx(a, b);
+  if (idx != NOT_FOUND)
+  a.neighbour[idx] = b.id.ind;
+*/
+  insertNeighbour(a,b,true) ; 
+}
+
+/** return true if `a` and `b` share an edge */
+bool isNeighbour(Elt& a, const Elt& b)
+{
+	// return neighbour_idx(a, b) != NOT_FOUND;
+  return insertNeighbour(a,b,false) ;
+}
+
+/* computes intersection between elements a and b */
+
+void intersect(Elt *a, Elt *b)
+{
+	int na = a->n; /* vertices of a */
+	int nb = b->n; /* vertices of b */
+	Coord *c   = new Coord[na+nb];
+	Coord *c2  = new Coord[na+nb];
+	Coord *xc  = new Coord[na+nb];
+	Coord *xc2 = new Coord[na+nb];
+	Coord gc, gc2;
+	double *d = new double[na+nb];
+	double *d2 = new double[na+nb];
+	double are, are2;
+	Ipt ipt[NMAX*NMAX];
+	Ipt ipt2[NMAX*NMAX];
+	ptsec(a, b, ipt);
+	/* make ipt2 transpose of ipt */
+	for (int ii = 0; ii < na; ii++)
+		for (int jj = 0; jj < nb; jj++)
+			ipt2[jj*na+ii] = ipt[ii*nb+jj];
+	list<Sgm> iscot;
+	recense(a, b, ipt, iscot, 0);
+	recense(b, a, ipt2, iscot, 1);
+
+	int nseg = iscot.size();
+	int nc = 0;
+	int nc2 = 0;
+	while (iscot.size() && nc < 2)
+		nc = assemble(iscot, c, d, xc);
+	while (iscot.size() && nc2 < 2)
+		nc2 = assemble(iscot, c2, d2, xc2);
+//	assert(nseg == nc + nc2 || nseg == 1); // unused segment
+
+        if (!(nseg == nc + nc2 || nseg == 1))
+        {
+
+
+//          cout<<a->x.x<<"  "<<a->x.y<<"  "<<a->x.z<<endl ;
+//          cout<<b->x.x<<"  "<<b->x.y<<"  "<<b->x.z<<endl ;
+//          cout<<" List of vertex from a and b"<<endl ;
+//          for(int i=0;i<na;i++) cout <<"polygonPoints.InsertPoint("<<i<<", "<<a->vertex[i].x<<", "<<a->vertex[i].y<<", "<<a->vertex[i].z<<")"<<endl ;
+//          for(int i=0;i<nb;i++) cout <<"polygonPoints.InsertPoint("<<i+6<<", "<<b->vertex[i].x<<", "<<b->vertex[i].y<<", "<<b->vertex[i].z<<")"<<endl ;
+//          cout<<"na : "<<na<<"   nb : "<<nb<<endl;
+//          cout<<"nc :"<<nc<<"  nc2 :"<<nc2<<"   nseg : "<<nseg<<endl ;
+//          abort() ;
+//         cout<<"**********************************************"<<endl ;
+//         intersect_ym(a,b) ;
+        }
+
+//    intersect_ym(a,b) ;
+	if (nc == 1) nc = 0;
+	if (nc2 == 1) nc2 = 0;
+	gc = barycentre(xc, nc);
+	gc2 = barycentre(xc2, nc2);
+	orient(nc, xc, c, d, gc);
+
+	Coord pole = srcGrid.pole;
+	if (pole == ORIGIN) pole = tgtGrid.pole;
+	const double MINBASE = 1e-11;
+	if (nc == 2) /* nc is the number of vertices of super mesh element */
+	{
+		double base = arcdist(xc[0], xc[1]);
+cerr << "DID ARRIVE " << base << xc[0] << xc[1] << endl;
+		gc = midpoint(gc, midpointSC(xc[0], xc[1]));
+		/* intersection area `are` must be zero here unless we have one great and one small circle */
+		are = alun(base, fabs(scalarprod(xc[0], pole)));
+	}
+	else
+	{
+		are = airbar(nc, xc, c, d, pole, gc);
+	}
+	if (nc2 == 2)
+	{
+		double base = arcdist(xc2[0], xc2[1]);
+cerr << "DID ARRIVE " << base << xc2[0] << xc2[1] << endl;
+		assert(base > MINBASE);
+		gc2 = midpoint(gc2, midpointSC(xc2[0], xc2[1]));
+		are2 = alun(base, fabs(scalarprod(xc2[0], pole))); // 0
+	}
+	else
+	{
+		are2 = airbar(nc2, xc2, c2, d2, pole, gc2);
+	}
+
+//  double ym_area=intersect_ym(a,b) ;
+
+  if (nc > 1)
+	{
+		/* create one super mesh polygon that src and dest point to */
+		Polyg *is = new Polyg;
+		is->x = gc;
+		is->area = are;
+		is->id = b->id;
+		is->src_id = b->src_id;
+		is->n = nc;
+		(a->is).push_back(is);
+		(b->is).push_back(is);
+/*
+ 	  if (	2*fabs(are-ym_area)/(are+ym_area) > 1.1 && ym_area>1e-8)
+    {
+      cout<<"Big area difference : "<<are<<"  "<<ym_area<<endl ;
+      intersect_ym(a,b) ;
+    }
+*/
+//		cout<<"intersection : "<<are<<" "<< ym_area<<"  diff : "<<fabs(are-ym_area)<<"  ratio : "<<fabs(are-ym_area)/(0.5*(are+ym_area))<<endl ;
+	}
+	if (nc2 > 1)
+	{
+		Polyg *is = new Polyg;
+		is->x = gc2;
+		is->area = are2;
+		is->id = b->id; /* intersection holds id of corresponding source element (see Elt class definition for details about id) */
+		is->src_id = b->src_id;
+		is->n = nc2;
+		(a->is).push_back(is);
+		(b->is).push_back(is);
+/*
+    if (	2*fabs(are-ym_area)/(are+ym_area) > 1.1 && ym_area>1e-8 )
+    {
+      cout<<"Big area difference : "<<are<<"  "<<ym_area<<endl ;
+      intersect_ym(a,b) ;
+    }
+*/
+//		cout<<"intersection : "<<are2<<" "<< ym_area<<"  diff : "<<fabs(are-ym_area)<<"  ratio : "<<fabs(are-ym_area)/(0.5*(are+ym_area))<<endl ;
+	}
+/*
+  if (nc<=1 && nc2<=1)
+  {
+    if (ym_area>1e-12)
+    {
+      cout<<"Big area difference : "<<0<<"  "<<ym_area<<endl ;
+    }
+  }
+*/
+	delete [] c;
+	delete [] c2;
+	delete [] xc;
+	delete [] xc2;
+	delete [] d;
+	delete [] d2;
+}
+
+}
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/remap/src/intersect.hpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/remap/src/intersect.hpp	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/remap/src/intersect.hpp	(revision 1749)
@@ -0,0 +1,8 @@
+namespace sphereRemap {
+
+void set_neighbour(Elt& elt, const Elt& elt2);
+bool isNeighbour(Elt& elt, const Elt& elt2);
+
+void intersect(Elt *a, Elt *b);
+
+}
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/remap/src/intersection_ym.cpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/remap/src/intersection_ym.cpp	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/remap/src/intersection_ym.cpp	(revision 1749)
@@ -0,0 +1,308 @@
+#include "intersection_ym.hpp"
+#include "elt.hpp"
+#include "clipper.hpp"
+#include "gridRemap.hpp"
+#include "triple.hpp"
+#include "polyg.hpp"
+#include <vector>
+#include <stdlib.h>
+#include <limits>
+#include <array>
+#include <cstdint> 
+#include "earcut.hpp"
+#include <fstream> 
+
+
+#define epsilon 1e-3  // epsilon distance ratio over side lenght for approximate small circle by great circle
+#define fusion_vertex 1e-13
+
+namespace sphereRemap {
+
+using namespace std;
+using namespace ClipperLib ;
+        
+
+double intersect_ym(Elt *a, Elt *b)
+{
+
+  using N = uint32_t;
+  using Point = array<double, 2>;
+  vector<Point> vect_points;
+  vector< vector<Point> > polyline;
+
+// transform small circle into piece of great circle if necessary
+
+  vector<Coord> srcPolygon ;
+  createGreatCirclePolygon(*b, srcGrid.pole, srcPolygon) ;
+//  b->area=polygonarea(&srcPolygon[0],srcPolygon.size()) ;
+  vector<Coord> dstPolygon ;
+  createGreatCirclePolygon(*a, tgtGrid.pole, dstPolygon) ;
+  a->area=polygonarea(&dstPolygon[0],dstPolygon.size()) ; // just for target
+
+// compute coordinates of the polygons into the gnomonique plane tangent to barycenter C of dst polygon
+// transform system coordinate : Z axis along OC
+  int na=dstPolygon.size() ;
+  Coord *a_gno   = new Coord[na];
+  int nb=srcPolygon.size() ;
+  Coord *b_gno   = new Coord[nb];
+
+  Coord OC=barycentre(a->vertex,a->n) ;
+  Coord Oz=OC ;
+  Coord Ox=crossprod(Coord(0,0,1),Oz) ;
+// choose Ox not too small to avoid rounding error
+  if (norm(Ox)< 0.1) Ox=crossprod(Coord(0,1,0),Oz) ;
+  Ox=Ox*(1./norm(Ox)) ;
+  Coord Oy=crossprod(Oz,Ox) ;
+  double cos_alpha;
+
+  /// vector<p2t::Point*> polyline;
+  for(int n=0; n<na;n++)
+  {
+    cos_alpha=scalarprod(OC,dstPolygon[n]) ;
+    a_gno[n].x=scalarprod(dstPolygon[n],Ox)/cos_alpha ;
+    a_gno[n].y=scalarprod(dstPolygon[n],Oy)/cos_alpha ;
+    a_gno[n].z=scalarprod(dstPolygon[n],Oz)/cos_alpha ; // must be equal to 1
+
+    vect_points.push_back( array<double, 2>() );
+    vect_points[n][0] = a_gno[n].x;
+    vect_points[n][1] = a_gno[n].y;
+
+  }
+
+  polyline.push_back(vect_points);
+  vector<N> indices_a_gno = mapbox::earcut<N>(polyline);
+  
+  double area_a_gno=0 ;
+  for(int i=0;i<indices_a_gno.size()/3;++i)
+    {
+      Coord x0 = Ox * polyline[0][indices_a_gno[3*i]][0] + Oy* polyline[0][indices_a_gno[3*i]][1] + Oz ;
+      Coord x1 = Ox * polyline[0][indices_a_gno[3*i+1]][0] + Oy* polyline[0][indices_a_gno[3*i+1]][1] + Oz ;
+      Coord x2 = Ox * polyline[0][indices_a_gno[3*i+2]][0] + Oy* polyline[0][indices_a_gno[3*i+2]][1] + Oz ;
+      area_a_gno+=triarea(x0 * (1./norm(x0)),x1* (1./norm(x1)), x2* (1./norm(x2))) ;
+    }
+
+  vect_points.clear();
+  polyline.clear();
+  indices_a_gno.clear();
+
+ 
+
+  for(int n=0; n<nb;n++)
+  {
+    cos_alpha=scalarprod(OC,srcPolygon[n]) ;
+    b_gno[n].x=scalarprod(srcPolygon[n],Ox)/cos_alpha ;
+    b_gno[n].y=scalarprod(srcPolygon[n],Oy)/cos_alpha ;
+    b_gno[n].z=scalarprod(srcPolygon[n],Oz)/cos_alpha ; // must be equal to 1
+
+    vect_points.push_back( array<double, 2>() );
+    vect_points[n][0] = b_gno[n].x;
+    vect_points[n][1] = b_gno[n].y;
+  }
+
+
+  polyline.push_back(vect_points);
+  vector<N> indices_b_gno = mapbox::earcut<N>(polyline);
+
+  double area_b_gno=0 ;
+  for(int i=0;i<indices_b_gno.size()/3;++i)
+    {
+      Coord x0 = Ox * polyline[0][indices_b_gno[3*i]][0] + Oy* polyline[0][indices_b_gno[3*i]][1] + Oz ;
+      Coord x1 = Ox * polyline[0][indices_b_gno[3*i+1]][0] + Oy* polyline[0][indices_b_gno[3*i+1]][1] + Oz ;
+      Coord x2 = Ox * polyline[0][indices_b_gno[3*i+2]][0] + Oy* polyline[0][indices_b_gno[3*i+2]][1] + Oz ;
+      area_b_gno+=triarea(x0 * (1./norm(x0)),x1* (1./norm(x1)), x2* (1./norm(x2))) ;
+    }
+
+  vect_points.clear();
+  polyline.clear();
+  indices_b_gno.clear();
+
+
+// Compute intersections using clipper
+// 1) Compute offset and scale factor to rescale polygon
+
+  double xmin, xmax, ymin,ymax ;
+  xmin=xmax=a_gno[0].x ;
+  ymin=ymax=a_gno[0].y ;
+
+  for(int n=0; n<na;n++)
+  {
+    if (a_gno[n].x< xmin) xmin=a_gno[n].x ;
+    else if (a_gno[n].x > xmax) xmax=a_gno[n].x ;
+
+    if (a_gno[n].y< ymin) ymin=a_gno[n].y ;
+    else if (a_gno[n].y > ymax) ymax=a_gno[n].y ;
+  }
+
+  for(int n=0; n<nb;n++)
+  {
+    if (b_gno[n].x< xmin) xmin=b_gno[n].x ;
+    else if (b_gno[n].x > xmax) xmax=b_gno[n].x ;
+
+    if (b_gno[n].y< ymin) ymin=b_gno[n].y ;
+    else if (b_gno[n].y > ymax) ymax=b_gno[n].y ;
+  }
+
+  double xoffset=(xmin+xmax)*0.5 ;
+  double yoffset=(ymin+ymax)*0.5 ;
+  double xscale= 1e-4*0.5*hiRange/(xmax-xoffset) ;
+  double yscale= 1e-4*0.5*hiRange/(ymax-yoffset) ;
+// Problem with numerical precision if using larger scaling factor
+
+// 2) Compute intersection with clipper
+//    clipper use only long integer value for vertex => offset and rescale
+
+  Paths src(1), dst(1), intersection;
+
+  for(int n=0; n<na;n++)
+     src[0]<<IntPoint((a_gno[n].x-xoffset)*xscale,(a_gno[n].y-yoffset)*yscale) ;
+
+  for(int n=0; n<nb;n++)
+     dst[0]<<IntPoint((b_gno[n].x-xoffset)*xscale,(b_gno[n].y-yoffset)*yscale) ;
+
+  Clipper clip ;
+  clip.AddPaths(src, ptSubject, true);
+  clip.AddPaths(dst, ptClip, true);
+  clip.Execute(ctIntersection, intersection);
+ 
+  double area=0 ;
+
+  for(int ni=0;ni<intersection.size(); ni++)
+  {
+    Coord* intersectPolygon=new Coord[intersection[ni].size()] ;
+    for(int n=0; n < intersection[ni].size(); n++)
+    {
+      intersectPolygon[n].x=intersection[ni][n].X/xscale+xoffset ;
+      intersectPolygon[n].y=intersection[ni][n].Y/yscale+yoffset ;
+    }
+    
+
+    int nv=0;
+
+    for(int n=0; n < intersection[ni].size(); n++)
+    {
+       double dx=intersectPolygon[n].x-intersectPolygon[(n+1)%intersection[ni].size()].x ;
+       double dy=intersectPolygon[n].y-intersectPolygon[(n+1)%intersection[ni].size()].y ;
+     
+       if (dx*dx+dy*dy>fusion_vertex*fusion_vertex)
+       {
+          intersectPolygon[nv]=intersectPolygon[n] ;
+
+	  vect_points.push_back( array<double, 2>() );
+          vect_points[nv][0] = intersectPolygon[n].x;
+	  vect_points[nv][1] = intersectPolygon[n].y;
+
+	  nv++ ;
+       }
+      
+
+    }
+
+    polyline.push_back(vect_points);
+    vect_points.clear();
+
+    if (nv>2)
+    {
+ 
+      vector<N> indices = mapbox::earcut<N>(polyline);
+
+      double area2=0 ;
+      for(int i=0;i<indices.size()/3;++i)
+      {
+	  Coord x0 = Ox * polyline[0][indices[3*i]][0] + Oy* polyline[0][indices[3*i]][1] + Oz ;
+	  Coord x1 = Ox * polyline[0][indices[3*i+1]][0] + Oy* polyline[0][indices[3*i+1]][1] + Oz ;
+	  Coord x2 = Ox * polyline[0][indices[3*i+2]][0] + Oy* polyline[0][indices[3*i+2]][1] + Oz ;
+	  area2+=triarea(x0 * (1./norm(x0)),x1* (1./norm(x1)), x2* (1./norm(x2))) ;
+      }
+
+      polyline.clear();
+
+      for(int n=0; n < nv; n++)
+      {
+        intersectPolygon[n] = Ox*intersectPolygon[n].x+Oy*intersectPolygon[n].y+Oz;
+        intersectPolygon[n] = intersectPolygon[n]*(1./norm(intersectPolygon[n])) ;
+      }
+
+
+//     assign intersection to source and destination polygons
+       Polyg *is = new Polyg;
+       is->x = exact_barycentre(intersectPolygon,nv);
+//       is->area = polygonarea(intersectPolygon,nv) ;
+       is->area = area2 ;
+
+//        if (is->area < 1e-12) cout<<"Small intersection : "<<is->area<<endl ;
+       if (is->area==0.) delete is ;
+       else
+       {  
+         is->id = b->id; /* intersection holds id of corresponding source element (see Elt class definition for details about id) */
+         is->src_id = b->src_id;
+         is->n = nv;
+         (a->is).push_back(is);
+         (b->is).push_back(is);
+         area=is->area ;
+       }
+    }
+    delete[] intersectPolygon ;
+  }
+
+  delete[] a_gno ;
+  delete[] b_gno ;
+  return area ;
+
+}
+
+
+
+void createGreatCirclePolygon(const Elt& element, const Coord& pole, vector<Coord>& coordinates)
+{
+  int nv = element.n;
+
+  double z,r ;
+  int north ;
+  int iterations ;
+
+  Coord xa,xb,xi,xc ;
+  Coord x1,x2,x ;
+
+  for(int i=0;i < nv ;i++)
+  {
+    north = (scalarprod(element.edge[i], pole) < 0) ? -1 : 1;
+    z=north*element.d[i] ;
+
+    if (z != 0.0)
+    {
+
+      xa=element.vertex[i] ;
+      xb=element.vertex[(i+1)%nv] ;
+      iterations=0 ;
+
+// compare max distance (at mid-point) between small circle and great circle
+// if greater the epsilon refine the small circle by dividing it recursively.
+
+      do
+      {
+        xc = pole * z ;
+        r=sqrt(1-z*z) ;
+        xi=(xa+xb)*0.5 ;
+        x1=xc+(xi-xc)*(r/norm(xi-xc)) ;
+        x2= xi*(1./norm(xi)) ;
+        ++iterations;
+        xb=x1 ;
+      } while(norm(x1-x2)/norm(xa-xb)>epsilon) ;
+
+      iterations = 1 << (iterations-1) ;
+
+// small circle divided in "iterations" great circle arc
+      Coord delta=(element.vertex[(i+1)%nv]-element.vertex[i])*(1./iterations);
+      x=xa ;
+      for(int j=0; j<iterations ; j++)
+      {
+        //xc+(x-xc)*r/norm(x-xc)
+        coordinates.push_back(xc+(x-xc)*(r/norm(x-xc))) ;
+        x=x+delta ;
+      }
+    }
+    else coordinates.push_back(element.vertex[i]) ;
+  }
+}
+
+}
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/remap/src/intersection_ym.hpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/remap/src/intersection_ym.hpp	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/remap/src/intersection_ym.hpp	(revision 1749)
@@ -0,0 +1,14 @@
+#ifndef __INTERSECTION_YM_HPP__
+#define __INTERSECTION_YM_HPP__
+
+#include <vector>
+#include "elt.hpp"
+
+namespace sphereRemap {
+
+double intersect_ym(Elt *a, Elt *b) ;
+void createGreatCirclePolygon(const Elt& element, const Coord& pole, vector<Coord>& coordinates) ;
+
+}
+
+#endif
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/remap/src/libmapper.cpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/remap/src/libmapper.cpp	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/remap/src/libmapper.cpp	(revision 1749)
@@ -0,0 +1,171 @@
+#include "mpi.hpp"
+#include <vector>
+#include <cassert>
+#include <cstring>
+#ifdef WRITE_TIMING
+#include <fstream>
+#endif
+
+#include "node.hpp"
+#include "grid.hpp"
+#include "circle.hpp" // cptRadius
+#include "elt.hpp"
+#include "meshutil.hpp" // cptArea
+#include "mapper.hpp"
+#include "cputime.hpp" // cputime
+
+using namespace sphereRemap ;
+
+/* mapper is a ponter to a global class instance whoes members are allocated in the first step (finding the sizes of the weight arrays)
+   and deallocated during the second step (computing the weights) */
+Mapper *mapper;
+
+
+/** xxx_bounds_yyy is of length n_vert_per_cell_xxx*n_cell_xxx
+   This function computes the weights and returns number of weights is returned through the last argument.
+   To get the actuall weights, use `remap_get_weights`.
+*/
+extern "C" void remap_get_num_weights(const double* src_bounds_lon, const double* src_bounds_lat, int n_vert_per_cell_src, int n_cell_src,
+                     const double* src_pole,
+                     const double* dst_bounds_lon, const double* dst_bounds_lat, int n_vert_per_cell_dst, int n_cell_dst,
+                     const double* dst_pole,
+                     int order, int* n_weights)
+{
+	assert(src_bounds_lon);
+	assert(src_bounds_lat);
+	assert(n_vert_per_cell_src >= 3);
+	assert(n_cell_src >= 4);
+	assert(dst_bounds_lon);
+	assert(dst_bounds_lat);
+	assert(n_vert_per_cell_dst >= 3);
+	assert(n_cell_dst >= 4);
+	assert(1 <= order && order <= 2);
+  double* src_area=NULL ;
+  double* dst_area=NULL ;
+  mapper = new Mapper(MPI_COMM_WORLD);
+  mapper->setVerbosity(PROGRESS) ;
+  mapper->setSourceMesh(src_bounds_lon, src_bounds_lat, src_area, n_vert_per_cell_src, n_cell_src, src_pole ) ;
+  mapper->setTargetMesh(dst_bounds_lon, dst_bounds_lat, dst_area, n_vert_per_cell_dst, n_cell_dst, dst_pole ) ;
+
+/*
+	srcGrid.pole = Coord(src_pole[0], src_pole[1], src_pole[2]);
+	tgtGrid.pole = Coord(dst_pole[0], dst_pole[1], dst_pole[2]);
+
+	int mpiRank, mpiSize;
+	MPI_Comm_rank(MPI_COMM_WORLD, &mpiRank);
+	MPI_Comm_size(MPI_COMM_WORLD, &mpiSize);
+
+	std::vector<Elt>  src_elt; src_elt.reserve(n_cell_src);
+	std::vector<Node> src_msh; src_msh.reserve(n_cell_src);
+	for (int i = 0; i < n_cell_src; i++)
+	{
+		int offs = i*n_vert_per_cell_src;
+		Elt elt(src_bounds_lon + offs, src_bounds_lat + offs, n_vert_per_cell_src);
+		elt.src_id.rank = mpiRank;
+		elt.src_id.ind = i;
+		src_elt.push_back(elt);
+		src_msh.push_back(Node(elt.x, cptRadius(elt), &src_elt.back()));
+		cptEltGeom(src_elt[i], Coord(src_pole[0], src_pole[1], src_pole[2]));
+	}
+	std::vector<Elt>  dst_elt; dst_elt.reserve(n_cell_dst);
+	std::vector<Node> dst_msh; dst_msh.reserve(n_cell_dst);
+	for (int i = 0; i < n_cell_dst; i++)
+	{
+		int offs = i*n_vert_per_cell_dst;
+		Elt elt(dst_bounds_lon + offs, dst_bounds_lat + offs, n_vert_per_cell_dst);
+		dst_elt.push_back(elt);
+		dst_msh.push_back(Node(elt.x, cptRadius(elt), &dst_elt.back()));
+		cptEltGeom(dst_elt[i], Coord(dst_pole[0], dst_pole[1], dst_pole[2]));
+	}
+	double tic = cputime();
+	mapper = new Mapper(MPI_COMM_WORLD);
+  mapper->setVerbosity(PROGRESS) ;
+	mapper->buildSSTree(src_msh, dst_msh);
+	double tac = cputime();
+	vector<double> timings = mapper->computeWeights(dst_elt, src_elt, order);
+*/
+
+  vector<double> timings = mapper->computeWeights(order);
+/*
+#ifdef WRITE_TIMING
+	int nGloWeights, gloSrcSize, gloDstSize;
+	int locSrcSize = src_elt.size();
+	int locDstSize = dst_elt.size();
+	MPI_Reduce(&(mapper->nWeights), &nGloWeights, 1, MPI_INT, MPI_SUM, 0, MPI_COMM_WORLD);
+	MPI_Reduce(&locSrcSize, &gloSrcSize, 1, MPI_INT, MPI_SUM, 0, MPI_COMM_WORLD);
+	MPI_Reduce(&locDstSize, &gloDstSize, 1, MPI_INT, MPI_SUM, 0, MPI_COMM_WORLD);
+
+	if (mpiRank == 0)
+	{
+		ofstream timeout;
+		timeout.open("timings.txt", fstream::out | fstream::app);
+		timeout << mpiSize << " " << src_elt.size() << " " << dst_elt.size() << " " << nGloWeights
+			<< " " << tac-tic << " " << timings[0] << " " << timings[1] << " " << timings[2] << endl;
+		timeout.close();
+	}
+#endif
+*/
+
+	*n_weights = mapper->nWeights;
+
+}
+
+extern "C" void remap_get_barycentres_and_areas(const double* bounds_lon, const double* bounds_lat, int n_vert_per_cell, int n_cell,
+                     const double* pole,
+                     double* centre_lon, double* centre_lat, double* areas)
+{
+	for (int i = 0; i < n_cell; i++)
+	{
+		int offs = i*n_vert_per_cell;
+		Elt elt(bounds_lon + offs, bounds_lat + offs, n_vert_per_cell);
+		cptEltGeom(elt, Coord(pole[0], pole[1], pole[2]));
+		if (centre_lon && centre_lat) lonlat(elt.x, centre_lon[i], centre_lat[i]);
+		if (areas) areas[i] = elt.area;
+	}
+}
+
+/*
+extern "C" void remap_get_weights(double* weights, int* src_indices, int* src_ranks, int* dst_indices)
+{
+	memcpy(weights, mapper->remapMatrix, mapper->nWeights*sizeof(double));
+	memcpy(src_indices, mapper->srcAddress, mapper->nWeights*sizeof(int));
+	memcpy(src_ranks, mapper->srcRank, mapper->nWeights*sizeof(int));
+	memcpy(dst_indices, mapper->dstAddress, mapper->nWeights*sizeof(int));
+	delete mapper;
+}
+*/
+
+extern "C" void remap_get_weights(double* weights, int* src_indices, int* dst_indices)
+{
+	memcpy(weights, mapper->remapMatrix, mapper->nWeights*sizeof(double));
+	memcpy(src_indices, mapper->srcAddress, mapper->nWeights*sizeof(int));
+	memcpy(dst_indices, mapper->dstAddress, mapper->nWeights*sizeof(int));
+	delete mapper;
+}
+
+extern "C" void mpi_init()
+{
+	/*int argc = 0;
+	char **argv = NULL;
+	MPI_Init(&argc, &argv);*/
+	MPI_Init(NULL, NULL);
+}
+
+extern "C" int mpi_rank()
+{
+	int rank;
+	MPI_Comm_rank(MPI_COMM_WORLD, &rank);
+	return rank;
+}
+
+extern "C" int mpi_size()
+{
+	int size;
+	MPI_Comm_size(MPI_COMM_WORLD, &size);
+	return size;
+}
+
+extern "C" void mpi_finalize()
+{
+	MPI_Finalize();
+}
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/remap/src/libmapper.hpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/remap/src/libmapper.hpp	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/remap/src/libmapper.hpp	(revision 1749)
@@ -0,0 +1,20 @@
+
+/* Call remap_get_num_weights to get the length of the weigth arrays, then allocate the arrays and hand to remap_get_weights. */
+
+/* Bounds are in degree, the pole is in cartitian coordinates on a unit sphere
+   and a pole of (0,0,0) means all great circles (no lon-lat grid). */
+extern "C" void remap_get_num_weights(const double* src_bounds_lon, const double* src_bounds_lat, int n_vert_per_cell_src, int n_cell_src,
+                     const double* src_pole,
+                     const double* dst_bounds_lon, const double* dst_bounds_lat, int n_vert_per_cell_dst, int n_cell_dst,
+                     const double* dst_pole,
+                     int order, int* n_weights);
+
+/* centre_??? or areas can be a NULL pointer if only one of them is required */
+extern "C" void remap_get_barycentres_and_areas(const double* bounds_lon, const double* bounds_lat, int n_vert_per_cell, int n_cell,
+                     const double* pole,
+                     double* centre_lon, double* centre_lat, double* areas);
+
+/*
+extern "C" void remap_get_weights(double* weights, int* src_indices, int* src_ranks, int* dst_indices);
+*/
+extern "C" void remap_get_weights(double* weights, int* src_indices, int* dst_indices);
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/remap/src/mapper.cpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/remap/src/mapper.cpp	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/remap/src/mapper.cpp	(revision 1749)
@@ -0,0 +1,948 @@
+#include "mpi.hpp"
+#include <map>
+#include "cputime.hpp"       /* time */
+#include "meshutil.hpp"
+#include "polyg.hpp"
+#include "circle.hpp"
+#include "intersect.hpp"
+#include "intersection_ym.hpp"
+#include "errhandle.hpp"
+#include "mpi_routing.hpp"
+#include "gridRemap.hpp"
+
+#include "mapper.hpp"
+
+namespace sphereRemap {
+
+/* A subdivition of an array into N sub-arays
+   can be represented by the length of the N arrays
+   or by the offsets when each of the N arrays starts.
+   This function convertes from the former to the latter. */
+void cptOffsetsFromLengths(const int *lengths, int *offsets, int sz)
+{
+  offsets[0] = 0;
+  for (int i = 1; i < sz; i++)
+    offsets[i] = offsets[i-1] + lengths[i-1];
+}
+
+
+void Mapper::setSourceMesh(const double* boundsLon, const double* boundsLat, const double* area, int nVertex, int nbCells, const double* pole, const long int* globalId)
+{
+  srcGrid.pole = Coord(pole[0], pole[1], pole[2]);
+
+  int mpiRank, mpiSize;
+  MPI_Comm_rank(communicator, &mpiRank);
+  MPI_Comm_size(communicator, &mpiSize);
+
+  sourceElements.reserve(nbCells);
+  sourceMesh.reserve(nbCells);
+  sourceGlobalId.resize(nbCells) ;
+
+  if (globalId==NULL)
+  {
+    long int offset ;
+    long int nb=nbCells ;
+    MPI_Scan(&nb,&offset,1,MPI_LONG,MPI_SUM,communicator) ;
+    offset=offset-nb ;
+    for(int i=0;i<nbCells;i++) sourceGlobalId[i]=offset+i ;
+  }
+  else sourceGlobalId.assign(globalId,globalId+nbCells);
+
+  for (int i = 0; i < nbCells; i++)
+  {
+    int offs = i*nVertex;
+    Elt elt(boundsLon + offs, boundsLat + offs, nVertex);
+    elt.src_id.rank = mpiRank;
+    elt.src_id.ind = i;
+    elt.src_id.globalId = sourceGlobalId[i];
+    sourceElements.push_back(elt);
+    sourceMesh.push_back(Node(elt.x, cptRadius(elt), &sourceElements.back()));
+    cptEltGeom(sourceElements[i], Coord(pole[0], pole[1], pole[2]));
+    if (area!=NULL) sourceElements[i].given_area=area[i] ;
+    else sourceElements[i].given_area=sourceElements[i].area ;
+  }
+
+}
+
+void Mapper::setTargetMesh(const double* boundsLon, const double* boundsLat, const double* area, int nVertex, int nbCells, const double* pole, const long int* globalId)
+{
+  tgtGrid.pole = Coord(pole[0], pole[1], pole[2]);
+
+  int mpiRank, mpiSize;
+  MPI_Comm_rank(communicator, &mpiRank);
+  MPI_Comm_size(communicator, &mpiSize);
+
+  targetElements.reserve(nbCells);
+  targetMesh.reserve(nbCells);
+
+  targetGlobalId.resize(nbCells) ;
+  if (globalId==NULL)
+  {
+    long int offset ;
+    long int nb=nbCells ;
+    MPI_Scan(&nb,&offset,1,MPI_LONG,MPI_SUM,communicator) ;
+    offset=offset-nb ;
+    for(int i=0;i<nbCells;i++) targetGlobalId[i]=offset+i ;
+  }
+  else targetGlobalId.assign(globalId,globalId+nbCells);
+
+  for (int i = 0; i < nbCells; i++)
+  {
+    int offs = i*nVertex;
+    Elt elt(boundsLon + offs, boundsLat + offs, nVertex);
+    targetElements.push_back(elt);
+    targetMesh.push_back(Node(elt.x, cptRadius(elt), &sourceElements.back()));
+    cptEltGeom(targetElements[i], Coord(pole[0], pole[1], pole[2]));
+    if (area!=NULL) targetElements[i].given_area=area[i] ;
+    else targetElements[i].given_area=targetElements[i].area ;
+  }
+
+
+}
+
+void Mapper::setSourceValue(const double* val)
+{
+  int size=sourceElements.size() ;
+  for(int i=0;i<size;++i) sourceElements[i].val=val[i] ;
+}
+
+void Mapper::getTargetValue(double* val)
+{
+  int size=targetElements.size() ;
+  for(int i=0;i<size;++i) val[i]=targetElements[i].val ;
+}
+
+vector<double> Mapper::computeWeights(int interpOrder, bool renormalize, bool quantity)
+{
+  vector<double> timings;
+  int mpiSize, mpiRank;
+  MPI_Comm_size(communicator, &mpiSize);
+  MPI_Comm_rank(communicator, &mpiRank);
+
+  this->buildSSTree(sourceMesh, targetMesh);
+
+  if (mpiRank == 0 && verbose) cout << "Computing intersections ..." << endl;
+  double tic = cputime();
+  computeIntersection(&targetElements[0], targetElements.size());
+  timings.push_back(cputime() - tic);
+
+  tic = cputime();
+  if (interpOrder == 2) {
+    if (mpiRank == 0 && verbose) cout << "Computing grads ..." << endl;
+    buildMeshTopology();
+    computeGrads();
+  }
+  timings.push_back(cputime() - tic);
+
+  /* Prepare computation of weights */
+  /* compute number of intersections which for the first order case
+           corresponds to the number of edges in the remap matrix */
+  int nIntersections = 0;
+  for (int j = 0; j < targetElements.size(); j++)
+  {
+    Elt &elt = targetElements[j];
+    for (list<Polyg*>::iterator it = elt.is.begin(); it != elt.is.end(); it++)
+      nIntersections++;
+  }
+  /* overallocate for NMAX neighbours for each elements */
+  remapMatrix = new double[nIntersections*NMAX];
+  srcAddress = new int[nIntersections*NMAX];
+  srcRank = new int[nIntersections*NMAX];
+  dstAddress = new int[nIntersections*NMAX];
+  sourceWeightId =new long[nIntersections*NMAX];
+  targetWeightId =new long[nIntersections*NMAX];
+
+
+  if (mpiRank == 0 && verbose) cout << "Remapping..." << endl;
+  tic = cputime();
+  nWeights = remap(&targetElements[0], targetElements.size(), interpOrder, renormalize, quantity);
+  timings.push_back(cputime() - tic);
+
+  for (int i = 0; i < targetElements.size(); i++) targetElements[i].delete_intersections();
+
+  return timings;
+}
+
+/**
+   @param elements are cells of the target grid that are distributed over CPUs
+          indepentently of the distribution of the SS-tree.
+   @param nbElements is the size of the elements array.
+   @param order is the order of interpolaton (must be 1 or 2).
+*/
+int Mapper::remap(Elt *elements, int nbElements, int order, bool renormalize, bool quantity)
+{
+  int mpiSize, mpiRank;
+  MPI_Comm_size(communicator, &mpiSize);
+  MPI_Comm_rank(communicator, &mpiRank);
+
+  /* create list of intersections (super mesh elements) for each rank */
+  multimap<int, Polyg *> *elementList = new multimap<int, Polyg *>[mpiSize];
+  for (int j = 0; j < nbElements; j++)
+  {
+    Elt& e = elements[j];
+    for (list<Polyg *>::iterator it = e.is.begin(); it != e.is.end(); it++)
+      elementList[(*it)->id.rank].insert(pair<int, Polyg *>((*it)->id.ind, *it));
+  }
+
+  int *nbSendElement = new int[mpiSize];
+  int **sendElement = new int*[mpiSize]; /* indices of elements required from other rank */
+  double **recvValue = new double*[mpiSize];
+  double **recvArea = new double*[mpiSize];
+  double **recvGivenArea = new double*[mpiSize];
+  Coord **recvGrad = new Coord*[mpiSize];
+  GloId **recvNeighIds = new GloId*[mpiSize]; /* ids of the of the source neighbours which also contribute through gradient */
+  for (int rank = 0; rank < mpiSize; rank++)
+  {
+    /* get size for allocation */
+    int last = -1; /* compares unequal to any index */
+    int index = -1; /* increased to starting index 0 in first iteration */
+    for (multimap<int, Polyg *>::iterator it = elementList[rank].begin(); it != elementList[rank].end(); ++it)
+    {
+      if (last != it->first)
+        index++;
+      (it->second)->id.ind = index;
+      last = it->first;
+    }
+    nbSendElement[rank] = index + 1;
+
+    /* if size is non-zero allocate and collect indices of elements on other ranks that we intersect */
+    if (nbSendElement[rank] > 0)
+    {
+      sendElement[rank] = new int[nbSendElement[rank]];
+      recvValue[rank]   = new double[nbSendElement[rank]];
+      recvArea[rank]    = new double[nbSendElement[rank]];
+      recvGivenArea[rank] = new double[nbSendElement[rank]];
+      if (order == 2)
+      {
+        recvNeighIds[rank] = new GloId[nbSendElement[rank]*(NMAX+1)];
+        recvGrad[rank]    = new Coord[nbSendElement[rank]*(NMAX+1)];
+      }
+      else
+        recvNeighIds[rank] = new GloId[nbSendElement[rank]];
+
+      last = -1;
+      index = -1;
+      for (multimap<int, Polyg *>::iterator it = elementList[rank].begin(); it != elementList[rank].end(); ++it)
+      {
+        if (last != it->first)
+          index++;
+        sendElement[rank][index] = it->first;
+        last = it->first;
+      }
+    }
+  }
+
+  /* communicate sizes of source elements to be sent (index lists and later values and gradients) */
+  int *nbRecvElement = new int[mpiSize];
+  MPI_Alltoall(nbSendElement, 1, MPI_INT, nbRecvElement, 1, MPI_INT, communicator);
+
+  /* communicate indices of source elements on other ranks whoes value and gradient we need (since intersection) */
+  int nbSendRequest = 0;
+  int nbRecvRequest = 0;
+  int **recvElement = new int*[mpiSize];
+  double **sendValue = new double*[mpiSize];
+  double **sendArea = new double*[mpiSize];
+  double **sendGivenArea = new double*[mpiSize];
+  Coord **sendGrad = new Coord*[mpiSize];
+  GloId **sendNeighIds = new GloId*[mpiSize];
+  MPI_Request *sendRequest = new MPI_Request[5*mpiSize];
+  MPI_Request *recvRequest = new MPI_Request[5*mpiSize];
+  for (int rank = 0; rank < mpiSize; rank++)
+  {
+    if (nbSendElement[rank] > 0)
+    {
+      MPI_Issend(sendElement[rank], nbSendElement[rank], MPI_INT, rank, 0, communicator, &sendRequest[nbSendRequest]);
+      nbSendRequest++;
+    }
+
+    if (nbRecvElement[rank] > 0)
+    {
+      recvElement[rank] = new int[nbRecvElement[rank]];
+      sendValue[rank]   = new double[nbRecvElement[rank]];
+      sendArea[rank]   = new double[nbRecvElement[rank]];
+      sendGivenArea[rank] = new double[nbRecvElement[rank]];
+      if (order == 2)
+      {
+        sendNeighIds[rank] = new GloId[nbRecvElement[rank]*(NMAX+1)];
+        sendGrad[rank]    = new Coord[nbRecvElement[rank]*(NMAX+1)];
+      }
+      else
+      {
+        sendNeighIds[rank] = new GloId[nbRecvElement[rank]];
+      }
+      MPI_Irecv(recvElement[rank], nbRecvElement[rank], MPI_INT, rank, 0, communicator, &recvRequest[nbRecvRequest]);
+      nbRecvRequest++;
+    }
+  }
+  MPI_Status *status = new MPI_Status[5*mpiSize];
+  
+  MPI_Waitall(nbSendRequest, sendRequest, status);
+        MPI_Waitall(nbRecvRequest, recvRequest, status);
+
+  /* for all indices that have been received from requesting ranks: pack values and gradients, then send */
+  nbSendRequest = 0;
+  nbRecvRequest = 0;
+  for (int rank = 0; rank < mpiSize; rank++)
+  {
+    if (nbRecvElement[rank] > 0)
+    {
+      int jj = 0; // jj == j if no weight writing
+      for (int j = 0; j < nbRecvElement[rank]; j++)
+      {
+        sendValue[rank][j] = sstree.localElements[recvElement[rank][j]].val;
+        sendArea[rank][j] = sstree.localElements[recvElement[rank][j]].area;
+        sendGivenArea[rank][j] = sstree.localElements[recvElement[rank][j]].given_area;
+        if (order == 2)
+        {
+          sendGrad[rank][jj] = sstree.localElements[recvElement[rank][j]].grad;
+//          cout<<"grad  "<<jj<<"  "<<recvElement[rank][j]<<"  "<<sendGrad[rank][jj]<<" "<<sstree.localElements[recvElement[rank][j]].grad<<endl ;
+          sendNeighIds[rank][jj] = sstree.localElements[recvElement[rank][j]].src_id;
+          jj++;
+          for (int i = 0; i < NMAX; i++)
+          {
+            sendGrad[rank][jj] = sstree.localElements[recvElement[rank][j]].gradNeigh[i];
+//            cout<<"grad  "<<jj<<"  "<<sendGrad[rank][jj]<<" "<<sstree.localElements[recvElement[rank][j]].grad<<endl ;
+            sendNeighIds[rank][jj] = sstree.localElements[recvElement[rank][j]].neighId[i];
+            jj++;
+          }
+        }
+        else
+          sendNeighIds[rank][j] = sstree.localElements[recvElement[rank][j]].src_id;
+      }
+      MPI_Issend(sendValue[rank],  nbRecvElement[rank], MPI_DOUBLE, rank, 0, communicator, &sendRequest[nbSendRequest]);
+      nbSendRequest++;
+      MPI_Issend(sendArea[rank],  nbRecvElement[rank], MPI_DOUBLE, rank, 0, communicator, &sendRequest[nbSendRequest]);
+      nbSendRequest++;
+      MPI_Issend(sendGivenArea[rank],  nbRecvElement[rank], MPI_DOUBLE, rank, 0, communicator, &sendRequest[nbSendRequest]);
+      nbSendRequest++;
+      if (order == 2)
+      {
+        MPI_Issend(sendGrad[rank], 3*nbRecvElement[rank]*(NMAX+1), MPI_DOUBLE, rank, 0, communicator, &sendRequest[nbSendRequest]);
+        nbSendRequest++;
+        MPI_Issend(sendNeighIds[rank], 4*nbRecvElement[rank]*(NMAX+1), MPI_INT, rank, 0, communicator, &sendRequest[nbSendRequest]);
+//ym  --> attention taille GloId
+        nbSendRequest++;
+      }
+      else
+      {
+        MPI_Issend(sendNeighIds[rank], 4*nbRecvElement[rank], MPI_INT, rank, 0, communicator, &sendRequest[nbSendRequest]);
+//ym  --> attention taille GloId
+        nbSendRequest++;
+      }
+    }
+    if (nbSendElement[rank] > 0)
+    {
+      MPI_Irecv(recvValue[rank],  nbSendElement[rank], MPI_DOUBLE, rank, 0, communicator, &recvRequest[nbRecvRequest]);
+      nbRecvRequest++;
+      MPI_Irecv(recvArea[rank],  nbSendElement[rank], MPI_DOUBLE, rank, 0, communicator, &recvRequest[nbRecvRequest]);
+      nbRecvRequest++;
+      MPI_Irecv(recvGivenArea[rank],  nbSendElement[rank], MPI_DOUBLE, rank, 0, communicator, &recvRequest[nbRecvRequest]);
+      nbRecvRequest++;
+      if (order == 2)
+      {
+        MPI_Irecv(recvGrad[rank], 3*nbSendElement[rank]*(NMAX+1),
+            MPI_DOUBLE, rank, 0, communicator, &recvRequest[nbRecvRequest]);
+        nbRecvRequest++;
+        MPI_Irecv(recvNeighIds[rank], 4*nbSendElement[rank]*(NMAX+1), MPI_INT, rank, 0, communicator, &recvRequest[nbRecvRequest]);
+//ym  --> attention taille GloId
+        nbRecvRequest++;
+      }
+      else
+      {
+        MPI_Irecv(recvNeighIds[rank], 4*nbSendElement[rank], MPI_INT, rank, 0, communicator, &recvRequest[nbRecvRequest]);
+//ym  --> attention taille GloId
+        nbRecvRequest++;
+      }
+    }
+  }
+        
+        MPI_Waitall(nbSendRequest, sendRequest, status);
+  MPI_Waitall(nbRecvRequest, recvRequest, status);
+  
+
+  /* now that all values and gradients are available use them to computed interpolated values on target
+     and also to compute weights */
+  int i = 0;
+  for (int j = 0; j < nbElements; j++)
+  {
+    Elt& e = elements[j];
+
+    /* since for the 2nd order case source grid elements can contribute to a destination grid element over several "paths"
+       (step1: gradient is computed using neighbours on same grid, step2: intersection uses several elements on other grid)
+       accumulate them so that there is only one final weight between two elements */
+    map<GloId,double> wgt_map;
+
+    /* for destination element `e` loop over all intersetions/the corresponding source elements */
+    for (list<Polyg *>::iterator it = e.is.begin(); it != e.is.end(); it++)
+    {
+      /* it is the intersection element, so it->x and it->area are barycentre and area of intersection element (super mesh)
+      but it->id is id of the source element that it intersects */
+      int n1 = (*it)->id.ind;
+      int rank = (*it)->id.rank;
+      double fk = recvValue[rank][n1];
+      double srcArea = recvArea[rank][n1];
+      double srcGivenArea = recvGivenArea[rank][n1];
+      double w = (*it)->area;
+      if (quantity) w/=srcArea ;
+      else w=w*srcGivenArea/srcArea*e.area/e.given_area ;
+
+      /* first order: src value times weight (weight = supermesh area), later divide by target area */
+      int kk = (order == 2) ? n1 * (NMAX + 1) : n1;
+      GloId neighID = recvNeighIds[rank][kk];
+      wgt_map[neighID] += w;
+
+      if (order == 2)
+      {
+        for (int k = 0; k < NMAX+1; k++)
+        {
+          int kk = n1 * (NMAX + 1) + k;
+          GloId neighID = recvNeighIds[rank][kk];
+          if (neighID.ind != -1)  wgt_map[neighID] += w * scalarprod(recvGrad[rank][kk], (*it)->x);
+        }
+
+      }
+    }
+
+    double renorm=0;
+    if (renormalize) 
+    {
+      if (quantity) for (map<GloId,double>::iterator it = wgt_map.begin(); it != wgt_map.end(); it++) renorm+=it->second ;
+      else for (map<GloId,double>::iterator it = wgt_map.begin(); it != wgt_map.end(); it++) renorm+=it->second / e.area;
+    }
+    else renorm=1. ;
+
+    for (map<GloId,double>::iterator it = wgt_map.begin(); it != wgt_map.end(); it++)
+    {
+      if (quantity)  this->remapMatrix[i] = (it->second ) / renorm;
+      else this->remapMatrix[i] = (it->second / e.area) / renorm;
+      this->srcAddress[i] = it->first.ind;
+      this->srcRank[i] = it->first.rank;
+      this->dstAddress[i] = j;
+      this->sourceWeightId[i]= it->first.globalId ;
+      this->targetWeightId[i]= targetGlobalId[j] ;
+      i++;
+    }
+  }
+
+  /* free all memory allocated in this function */
+  for (int rank = 0; rank < mpiSize; rank++)
+  {
+    if (nbSendElement[rank] > 0)
+    {
+      delete[] sendElement[rank];
+      delete[] recvValue[rank];
+      delete[] recvArea[rank];
+      delete[] recvGivenArea[rank];
+      if (order == 2)
+      {
+        delete[] recvGrad[rank];
+      }
+      delete[] recvNeighIds[rank];
+    }
+    if (nbRecvElement[rank] > 0)
+    {
+      delete[] recvElement[rank];
+      delete[] sendValue[rank];
+      delete[] sendArea[rank];
+      delete[] sendGivenArea[rank];
+      if (order == 2)
+        delete[] sendGrad[rank];
+      delete[] sendNeighIds[rank];
+    }
+  }
+  delete[] status;
+  delete[] sendRequest;
+  delete[] recvRequest;
+  delete[] elementList;
+  delete[] nbSendElement;
+  delete[] nbRecvElement;
+  delete[] sendElement;
+  delete[] recvElement;
+  delete[] sendValue;
+  delete[] recvValue;
+  delete[] sendGrad;
+  delete[] recvGrad;
+  delete[] sendNeighIds;
+  delete[] recvNeighIds;
+  return i;
+}
+
+void Mapper::computeGrads()
+{
+  /* array of pointers to collect local elements and elements received from other cpu */
+  vector<Elt*> globalElements(sstree.nbLocalElements + nbNeighbourElements);
+  int index = 0;
+  for (int i = 0; i < sstree.nbLocalElements; i++, index++)
+    globalElements[index] = &(sstree.localElements[i]);
+  for (int i = 0; i < nbNeighbourElements; i++, index++)
+    globalElements[index] = &neighbourElements[i];
+
+  update_baryc(sstree.localElements, sstree.nbLocalElements);
+  computeGradients(&globalElements[0], sstree.nbLocalElements);
+}
+
+/** for each element of the source grid, finds all the neighbouring elements that share an edge
+    (filling array neighbourElements). This is used later to compute gradients */
+void Mapper::buildMeshTopology()
+{
+  int mpiSize, mpiRank;
+  MPI_Comm_size(communicator, &mpiSize);
+  MPI_Comm_rank(communicator, &mpiRank);
+
+  vector<Node> *routingList = new vector<Node>[mpiSize];
+  vector<vector<int> > routes(sstree.localTree.leafs.size());
+
+  sstree.routeIntersections(routes, sstree.localTree.leafs);
+
+  for (int i = 0; i < routes.size(); ++i)
+    for (int k = 0; k < routes[i].size(); ++k)
+      routingList[routes[i][k]].push_back(sstree.localTree.leafs[i]);
+  routingList[mpiRank].clear();
+
+
+  CMPIRouting mpiRoute(communicator);
+  mpiRoute.init(routes);
+  int nRecv = mpiRoute.getTotalSourceElement();
+// cout << mpiRank << " NRECV " << nRecv << "(" << routes.size() << ")"<< endl;
+
+  int *nbSendNode = new int[mpiSize];
+  int *nbRecvNode = new int[mpiSize];
+  int *sendMessageSize = new int[mpiSize];
+  int *recvMessageSize = new int[mpiSize];
+
+  for (int rank = 0; rank < mpiSize; rank++)
+  {
+    nbSendNode[rank] = routingList[rank].size();
+    sendMessageSize[rank] = 0;
+    for (size_t j = 0; j < routingList[rank].size(); j++)
+    {
+      Elt *elt = (Elt *) (routingList[rank][j].data);
+      sendMessageSize[rank] += packedPolygonSize(*elt);
+    }
+  }
+
+  MPI_Alltoall(nbSendNode, 1, MPI_INT, nbRecvNode, 1, MPI_INT, communicator);
+  MPI_Alltoall(sendMessageSize, 1, MPI_INT, recvMessageSize, 1, MPI_INT, communicator);
+
+  char **sendBuffer = new char*[mpiSize];
+  char **recvBuffer = new char*[mpiSize];
+  int *pos = new int[mpiSize];
+
+  for (int rank = 0; rank < mpiSize; rank++)
+  {
+    if (nbSendNode[rank] > 0) sendBuffer[rank] = new char[sendMessageSize[rank]];
+    if (nbRecvNode[rank] > 0) recvBuffer[rank] = new char[recvMessageSize[rank]];
+  }
+
+  for (int rank = 0; rank < mpiSize; rank++)
+  {
+    pos[rank] = 0;
+    for (size_t j = 0; j < routingList[rank].size(); j++)
+    {
+      Elt *elt = (Elt *) (routingList[rank][j].data);
+      packPolygon(*elt, sendBuffer[rank], pos[rank]);
+    }
+  }
+  delete [] routingList;
+
+
+  int nbSendRequest = 0;
+  int nbRecvRequest = 0;
+  MPI_Request *sendRequest = new MPI_Request[mpiSize];
+  MPI_Request *recvRequest = new MPI_Request[mpiSize];
+  MPI_Status  *status      = new MPI_Status[mpiSize];
+
+  for (int rank = 0; rank < mpiSize; rank++)
+  {
+    if (nbSendNode[rank] > 0)
+    {
+      MPI_Issend(sendBuffer[rank], sendMessageSize[rank], MPI_CHAR, rank, 0, communicator, &sendRequest[nbSendRequest]);
+      nbSendRequest++;
+    }
+    if (nbRecvNode[rank] > 0)
+    {
+      MPI_Irecv(recvBuffer[rank], recvMessageSize[rank], MPI_CHAR, rank, 0, communicator, &recvRequest[nbRecvRequest]);
+      nbRecvRequest++;
+    }
+  }
+
+  MPI_Waitall(nbRecvRequest, recvRequest, status);
+  MPI_Waitall(nbSendRequest, sendRequest, status);
+
+  for (int rank = 0; rank < mpiSize; rank++)
+    if (nbSendNode[rank] > 0) delete [] sendBuffer[rank];
+  delete [] sendBuffer;
+
+  char **sendBuffer2 = new char*[mpiSize];
+  char **recvBuffer2 = new char*[mpiSize];
+
+  for (int rank = 0; rank < mpiSize; rank++)
+  {
+    nbSendNode[rank] = 0;
+    sendMessageSize[rank] = 0;
+
+    if (nbRecvNode[rank] > 0)
+    {
+      set<NodePtr> neighbourList;
+      pos[rank] = 0;
+      for (int j = 0; j < nbRecvNode[rank]; j++)
+      {
+        Elt elt;
+        unpackPolygon(elt, recvBuffer[rank], pos[rank]);
+        Node node(elt.x, cptRadius(elt), &elt);
+        findNeighbour(sstree.localTree.root, &node, neighbourList);
+      }
+      nbSendNode[rank] = neighbourList.size();
+      for (set<NodePtr>::iterator it = neighbourList.begin(); it != neighbourList.end(); it++)
+      {
+        Elt *elt = (Elt *) ((*it)->data);
+        sendMessageSize[rank] += packedPolygonSize(*elt);
+      }
+
+      sendBuffer2[rank] = new char[sendMessageSize[rank]];
+      pos[rank] = 0;
+
+      for (set<NodePtr>::iterator it = neighbourList.begin(); it != neighbourList.end(); it++)
+      {
+        Elt *elt = (Elt *) ((*it)->data);
+        packPolygon(*elt, sendBuffer2[rank], pos[rank]);
+      }
+    }
+  }
+  for (int rank = 0; rank < mpiSize; rank++)
+    if (nbRecvNode[rank] > 0) delete [] recvBuffer[rank];
+  delete [] recvBuffer;
+
+
+  MPI_Barrier(communicator);
+  MPI_Alltoall(nbSendNode, 1, MPI_INT, nbRecvNode, 1, MPI_INT, communicator);
+  MPI_Alltoall(sendMessageSize, 1, MPI_INT, recvMessageSize, 1, MPI_INT, communicator);
+
+  for (int rank = 0; rank < mpiSize; rank++)
+    if (nbRecvNode[rank] > 0) recvBuffer2[rank] = new char[recvMessageSize[rank]];
+
+  nbSendRequest = 0;
+  nbRecvRequest = 0;
+
+  for (int rank = 0; rank < mpiSize; rank++)
+  {
+    if (nbSendNode[rank] > 0)
+    {
+      MPI_Issend(sendBuffer2[rank], sendMessageSize[rank], MPI_CHAR, rank, 0, communicator, &sendRequest[nbSendRequest]);
+      nbSendRequest++;
+    }
+    if (nbRecvNode[rank] > 0)
+    {
+      MPI_Irecv(recvBuffer2[rank], recvMessageSize[rank], MPI_CHAR, rank, 0, communicator, &recvRequest[nbRecvRequest]);
+      nbRecvRequest++;
+    }
+  }
+
+  MPI_Waitall(nbRecvRequest, recvRequest, status);
+  MPI_Waitall(nbSendRequest, sendRequest, status);
+
+  int nbNeighbourNodes = 0;
+  for (int rank = 0; rank < mpiSize; rank++)
+    nbNeighbourNodes += nbRecvNode[rank];
+
+  neighbourElements = new Elt[nbNeighbourNodes];
+  nbNeighbourElements = nbNeighbourNodes;
+
+  int index = 0;
+  for (int rank = 0; rank < mpiSize; rank++)
+  {
+    pos[rank] = 0;
+    for (int j = 0; j < nbRecvNode[rank]; j++)
+    {
+      unpackPolygon(neighbourElements[index], recvBuffer2[rank], pos[rank]);
+      neighbourElements[index].id.ind = sstree.localTree.leafs.size() + index;
+      index++;
+    }
+  }
+  for (int rank = 0; rank < mpiSize; rank++)
+  {
+    if (nbRecvNode[rank] > 0) delete [] recvBuffer2[rank];
+    if (nbSendNode[rank] > 0) delete [] sendBuffer2[rank];
+  }
+  delete [] recvBuffer2;
+  delete [] sendBuffer2;
+  delete [] sendMessageSize;
+  delete [] recvMessageSize;
+  delete [] nbSendNode;
+  delete [] nbRecvNode;
+  delete [] sendRequest;
+  delete [] recvRequest;
+  delete [] status;
+  delete [] pos;
+
+  /* re-compute on received elements to avoid having to send this information */
+  neighbourNodes.resize(nbNeighbourNodes);
+  setCirclesAndLinks(neighbourElements, neighbourNodes);
+  cptAllEltsGeom(neighbourElements, nbNeighbourNodes, srcGrid.pole);
+
+  /* the local SS tree must include nodes from other cpus if they are potential
+           intersector of a local node */
+  sstree.localTree.insertNodes(neighbourNodes);
+
+  /* for every local element,
+           use the SS-tree to find all elements (including neighbourElements)
+           who are potential neighbours because their circles intersect,
+     then check all canditates for common edges to build up connectivity information
+  */
+  for (int j = 0; j < sstree.localTree.leafs.size(); j++)
+  {
+    Node& node = sstree.localTree.leafs[j];
+
+    /* find all leafs whoes circles that intersect node's circle and save into node->intersectors */
+    node.search(sstree.localTree.root);
+
+    Elt *elt = (Elt *)(node.data);
+
+    for (int i = 0; i < elt->n; i++) elt->neighbour[i] = NOT_FOUND;
+
+    /* for element `elt` loop through all nodes in the SS-tree
+                   whoes circles intersect with the circle around `elt` (the SS intersectors)
+                   and check if they are neighbours in the sense that the two elements share an edge.
+                   If they do, save this information for elt */
+    for (list<NodePtr>::iterator it = (node.intersectors).begin(); it != (node.intersectors).end(); ++it)
+    {
+      Elt *elt2 = (Elt *)((*it)->data);
+      set_neighbour(*elt, *elt2);
+    }
+
+/*
+    for (int i = 0; i < elt->n; i++)
+    {
+      if (elt->neighbour[i] == NOT_FOUND)
+        error_exit("neighbour not found");
+    }
+*/
+  }
+}
+
+/** @param elements are the target grid elements */
+void Mapper::computeIntersection(Elt *elements, int nbElements)
+{
+  int mpiSize, mpiRank;
+  MPI_Comm_size(communicator, &mpiSize);
+  MPI_Comm_rank(communicator, &mpiRank);
+
+  MPI_Barrier(communicator);
+
+  vector<Node> *routingList = new vector<Node>[mpiSize];
+
+  vector<Node> routeNodes;  routeNodes.reserve(nbElements);
+  for (int j = 0; j < nbElements; j++)
+  {
+    elements[j].id.ind = j;
+    elements[j].id.rank = mpiRank;
+    routeNodes.push_back(Node(elements[j].x, cptRadius(elements[j]), &elements[j]));
+  }
+
+  vector<vector<int> > routes(routeNodes.size());
+  sstree.routeIntersections(routes, routeNodes);
+  for (int i = 0; i < routes.size(); ++i)
+    for (int k = 0; k < routes[i].size(); ++k)
+      routingList[routes[i][k]].push_back(routeNodes[i]);
+
+  if (verbose >= 2)
+  {
+    cout << " --> rank  " << mpiRank << " nbElements " << nbElements << " : ";
+    for (int rank = 0; rank < mpiSize; rank++)
+      cout << routingList[rank].size() << "   ";
+    cout << endl;
+  }
+  MPI_Barrier(communicator);
+
+  int *nbSendNode = new int[mpiSize];
+  int *nbRecvNode = new int[mpiSize];
+  int *sentMessageSize = new int[mpiSize];
+  int *recvMessageSize = new int[mpiSize];
+
+  for (int rank = 0; rank < mpiSize; rank++)
+  {
+    nbSendNode[rank] = routingList[rank].size();
+    sentMessageSize[rank] = 0;
+    for (size_t j = 0; j < routingList[rank].size(); j++)
+    {
+      Elt *elt = (Elt *) (routingList[rank][j].data);
+      sentMessageSize[rank] += packedPolygonSize(*elt);
+    }
+  }
+
+  MPI_Alltoall(nbSendNode, 1, MPI_INT, nbRecvNode, 1, MPI_INT, communicator);
+  MPI_Alltoall(sentMessageSize, 1, MPI_INT, recvMessageSize, 1, MPI_INT, communicator);
+
+  int total = 0;
+
+  for (int rank = 0; rank < mpiSize; rank++)
+  {
+    total = total + nbRecvNode[rank];
+  }
+
+  if (verbose >= 2) cout << "---> rank " << mpiRank << " : compute intersection : total received nodes  " << total << endl;
+  char **sendBuffer = new char*[mpiSize];
+  char **recvBuffer = new char*[mpiSize];
+  int *pos = new int[mpiSize];
+
+  for (int rank = 0; rank < mpiSize; rank++)
+  {
+    if (nbSendNode[rank] > 0) sendBuffer[rank] = new char[sentMessageSize[rank]];
+    if (nbRecvNode[rank] > 0) recvBuffer[rank] = new char[recvMessageSize[rank]];
+  }
+
+  for (int rank = 0; rank < mpiSize; rank++)
+  {
+    pos[rank] = 0;
+    for (size_t j = 0; j < routingList[rank].size(); j++)
+    {
+      Elt* elt = (Elt *) (routingList[rank][j].data);
+      packPolygon(*elt, sendBuffer[rank], pos[rank]);
+    }
+  }
+  delete [] routingList;
+
+  int nbSendRequest = 0;
+  int nbRecvRequest = 0;
+  MPI_Request *sendRequest = new MPI_Request[mpiSize];
+  MPI_Request *recvRequest = new MPI_Request[mpiSize];
+  MPI_Status   *status = new MPI_Status[mpiSize];
+
+  for (int rank = 0; rank < mpiSize; rank++)
+  {
+    if (nbSendNode[rank] > 0)
+    {
+      MPI_Issend(sendBuffer[rank], sentMessageSize[rank], MPI_CHAR, rank, 0, communicator, &sendRequest[nbSendRequest]);
+      nbSendRequest++;
+    }
+    if (nbRecvNode[rank] > 0)
+    {
+      MPI_Irecv(recvBuffer[rank], recvMessageSize[rank], MPI_CHAR, rank, 0, communicator, &recvRequest[nbRecvRequest]);
+      nbRecvRequest++;
+    }
+  }
+
+  MPI_Waitall(nbRecvRequest, recvRequest, status);
+  MPI_Waitall(nbSendRequest, sendRequest, status);
+  char **sendBuffer2 = new char*[mpiSize];
+  char **recvBuffer2 = new char*[mpiSize];
+
+  double tic = cputime();
+  for (int rank = 0; rank < mpiSize; rank++)
+  {
+    sentMessageSize[rank] = 0;
+
+    if (nbRecvNode[rank] > 0)
+    {
+      Elt *recvElt = new Elt[nbRecvNode[rank]];
+      pos[rank] = 0;
+      for (int j = 0; j < nbRecvNode[rank]; j++)
+      {
+        unpackPolygon(recvElt[j], recvBuffer[rank], pos[rank]);
+        cptEltGeom(recvElt[j], tgtGrid.pole);
+        Node recvNode(recvElt[j].x, cptRadius(recvElt[j]), &recvElt[j]);
+        recvNode.search(sstree.localTree.root);
+        /* for a node holding an element of the target, loop throught candidates for intersecting source */
+        for (list<NodePtr>::iterator it = (recvNode.intersectors).begin(); it != (recvNode.intersectors).end(); ++it)
+        {
+          Elt *elt2 = (Elt *) ((*it)->data);
+          /* recvElt is target, elt2 is source */
+//          intersect(&recvElt[j], elt2);
+          intersect_ym(&recvElt[j], elt2);
+        }
+
+        if (recvElt[j].is.size() > 0) sentMessageSize[rank] += packIntersectionSize(recvElt[j]);
+
+        // here recvNode goes out of scope
+      }
+
+      if (sentMessageSize[rank] > 0)
+      {
+        sentMessageSize[rank] += sizeof(int);
+        sendBuffer2[rank] = new char[sentMessageSize[rank]];
+        *((int *) sendBuffer2[rank]) = 0;
+        pos[rank] = sizeof(int);
+        for (int j = 0; j < nbRecvNode[rank]; j++)
+        {
+          packIntersection(recvElt[j], sendBuffer2[rank], pos[rank]);
+          //FIXME should be deleted: recvElt[j].delete_intersections(); // intersection areas have been packed to buffer and won't be used any more
+        }
+      }
+      delete [] recvElt;
+
+    }
+  }
+  delete [] pos;
+
+  for (int rank = 0; rank < mpiSize; rank++)
+  {
+    if (nbSendNode[rank] > 0) delete [] sendBuffer[rank];
+    if (nbRecvNode[rank] > 0) delete [] recvBuffer[rank];
+    nbSendNode[rank] = 0;
+  }
+
+  if (verbose >= 2) cout << "Rank " << mpiRank << "  Compute (internal) intersection " << cputime() - tic << " s" << endl;
+  MPI_Alltoall(sentMessageSize, 1, MPI_INT, recvMessageSize, 1, MPI_INT, communicator);
+
+  for (int rank = 0; rank < mpiSize; rank++)
+    if (recvMessageSize[rank] > 0)
+      recvBuffer2[rank] = new char[recvMessageSize[rank]];
+
+  nbSendRequest = 0;
+  nbRecvRequest = 0;
+
+  for (int rank = 0; rank < mpiSize; rank++)
+  {
+    if (sentMessageSize[rank] > 0)
+    {
+      MPI_Issend(sendBuffer2[rank], sentMessageSize[rank], MPI_CHAR, rank, 0, communicator, &sendRequest[nbSendRequest]);
+      nbSendRequest++;
+    }
+    if (recvMessageSize[rank] > 0)
+    {
+      MPI_Irecv(recvBuffer2[rank], recvMessageSize[rank], MPI_CHAR, rank, 0, communicator, &recvRequest[nbRecvRequest]);
+      nbRecvRequest++;
+    }
+  }
+
+  MPI_Waitall(nbRecvRequest, recvRequest, status);
+  MPI_Waitall(nbSendRequest, sendRequest, status);
+
+  delete [] sendRequest;
+  delete [] recvRequest;
+  delete [] status;
+  for (int rank = 0; rank < mpiSize; rank++)
+  {
+    if (nbRecvNode[rank] > 0)
+    {
+      if (sentMessageSize[rank] > 0)
+        delete [] sendBuffer2[rank];
+    }
+
+    if (recvMessageSize[rank] > 0)
+    {
+      unpackIntersection(elements, recvBuffer2[rank]);
+      delete [] recvBuffer2[rank];
+    }
+  }
+  delete [] sendBuffer2;
+  delete [] recvBuffer2;
+  delete [] sendBuffer;
+  delete [] recvBuffer;
+
+  delete [] nbSendNode;
+  delete [] nbRecvNode;
+  delete [] sentMessageSize;
+  delete [] recvMessageSize;
+}
+
+Mapper::~Mapper()
+{
+  delete [] remapMatrix;
+  delete [] srcAddress;
+  delete [] srcRank;
+  delete [] dstAddress;
+  if (neighbourElements) delete [] neighbourElements;
+}
+
+}
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/remap/src/mapper.hpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/remap/src/mapper.hpp	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/remap/src/mapper.hpp	(revision 1749)
@@ -0,0 +1,80 @@
+#ifndef  __MAPPER_HPP__
+#define __MAPPER_HPP__
+#include "parallel_tree.hpp"
+#include "mpi.hpp"
+
+namespace sphereRemap {
+
+enum verbosity
+{
+       SILENT = 0,
+       PROGRESS = 1,
+       DETAILS = 2
+};
+
+void cptOffsetsFromLengths(const int *lengths, int *offsets, int sz);
+
+class Mapper
+{
+public:
+       Mapper(MPI_Comm comm=MPI_COMM_WORLD) : communicator(comm), verbose(SILENT), neighbourElements(NULL), sstree(comm) {}
+       ~Mapper();
+       void setVerbosity(verbosity v) {verbose=v ;}
+
+       void setSourceMesh(const double* boundsLon, const double* boundsLat, const double* area, int nVertex, int nbCells, const double* pole, const long int* globalId=NULL) ;
+       void setTargetMesh(const double* boundsLon, const double* boundsLat, const double* area, int nVertex, int nbCells, const double* pole, const long int* globalId=NULL) ;
+       void setSourceValue(const double* val) ;
+       void getTargetValue(double* val) ;
+
+       double buildSSTree(vector<Node>& srcMsh, vector<Node>& trgMsh)
+       {
+         sstree.build(srcMsh, trgMsh);
+       }
+
+       /** @param trgElts are the elements of the unstructured target grid
+           Returns the timings for substeps: */
+       vector<double> computeWeights(int interpOrder, bool renormalize=false, bool quantity=false);
+       int getNbWeights(void) { return nWeights ; }
+/*
+       void getWeigths(double* weights, double* sourceInd, double* targetInd) ;
+       void getWeights(vector<double>& weights, vector<double>& sourceInd, vector<double>& targetInd) ;
+*/
+       /* where weights are returned after call to `computeWeights` */
+       double *remapMatrix;
+       int *srcAddress;
+       int *srcRank;
+       int *dstAddress;
+       int nWeights;
+       long int* sourceWeightId ;
+       long int* targetWeightId ;
+
+private:
+       /** @return number of weights (local to cpu) */
+       int remap(Elt* elements, int nbElements, int order, bool renormalize=false, bool quantity=false);
+
+       void buildMeshTopology();
+       void computeGrads();
+       void computeIntersection(Elt* elements, int nbElements);
+
+       int verbose;
+
+       /** Holds adaptional leaf nodes as ghost cells for gradient computations (hold neighbour elements from other ranks).
+           They will be inserted to the local trees but not saved in its leaf array */
+       vector<Node> neighbourNodes;
+
+       int nbNeighbourElements;
+       Elt* neighbourElements;
+
+       CParallelTree sstree;
+       MPI_Comm communicator ;
+       std::vector<Elt>  sourceElements ;
+       std::vector<Node> sourceMesh ;
+       std::vector<Elt>  targetElements ;
+       std::vector<Node> targetMesh ;
+       std::vector<long> sourceGlobalId ;
+       std::vector<long> targetGlobalId ;
+
+};
+
+}
+#endif
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/remap/src/meshutil.cpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/remap/src/meshutil.cpp	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/remap/src/meshutil.cpp	(revision 1749)
@@ -0,0 +1,234 @@
+#include <list>
+#include "elt.hpp"
+#include "polyg.hpp"
+#include "intersection_ym.hpp"
+#include "earcut.hpp"
+#include <vector>
+
+namespace sphereRemap {
+
+using namespace std;
+
+double computePolygoneArea(Elt& a, const Coord &pole)
+{
+  using N = uint32_t;
+  using Point = array<double, 2>;
+  vector<Point> vect_points;
+  vector< vector<Point> > polyline;
+  
+  vector<Coord> dstPolygon ;
+  createGreatCirclePolygon(a, pole, dstPolygon) ;
+
+  int na=dstPolygon.size() ;
+  Coord *a_gno   = new Coord[na];
+  
+  Coord OC=barycentre(a.vertex,a.n) ;
+  Coord Oz=OC ;
+  Coord Ox=crossprod(Coord(0,0,1),Oz) ;
+// choose Ox not too small to avoid rounding error
+  if (norm(Ox)< 0.1) Ox=crossprod(Coord(0,1,0),Oz) ;
+  Ox=Ox*(1./norm(Ox)) ;
+  Coord Oy=crossprod(Oz,Ox) ;
+  double cos_alpha;
+
+  for(int n=0; n<na;n++)
+  {
+    cos_alpha=scalarprod(OC,dstPolygon[n]) ;
+    a_gno[n].x=scalarprod(dstPolygon[n],Ox)/cos_alpha ;
+    a_gno[n].y=scalarprod(dstPolygon[n],Oy)/cos_alpha ;
+    a_gno[n].z=scalarprod(dstPolygon[n],Oz)/cos_alpha ; // must be equal to 1
+
+    vect_points.push_back( array<double, 2>() );
+    vect_points[n][0] = a_gno[n].x;
+    vect_points[n][1] = a_gno[n].y;
+
+  }
+
+  polyline.push_back(vect_points);
+  vector<N> indices_a_gno = mapbox::earcut<N>(polyline);
+  
+  double area_a_gno=0 ;
+  for(int i=0;i<indices_a_gno.size()/3;++i)
+    {
+      Coord x0 = Ox * polyline[0][indices_a_gno[3*i]][0] + Oy* polyline[0][indices_a_gno[3*i]][1] + Oz ;
+      Coord x1 = Ox * polyline[0][indices_a_gno[3*i+1]][0] + Oy* polyline[0][indices_a_gno[3*i+1]][1] + Oz ;
+      Coord x2 = Ox * polyline[0][indices_a_gno[3*i+2]][0] + Oy* polyline[0][indices_a_gno[3*i+2]][1] + Oz ;
+      area_a_gno+=triarea(x0 * (1./norm(x0)),x1* (1./norm(x1)), x2* (1./norm(x2))) ;
+    }
+
+  vect_points.clear();
+  polyline.clear();
+  indices_a_gno.clear();
+  return area_a_gno ;
+}
+
+
+void cptEltGeom(Elt& elt, const Coord &pole)
+{
+  orient(elt.n, elt.vertex, elt.edge, elt.d, elt.x);
+  normals(elt, pole);
+  Coord gg;
+  elt.area = airbar(elt.n, elt.vertex, elt.edge, elt.d, pole, gg);
+  elt.x = gg;
+// overwrite area computation 
+
+  elt.area =  computePolygoneArea(elt, pole) ;
+}
+
+
+void cptAllEltsGeom(Elt *elt, int N, const Coord &pole)
+{
+  for (int ne=0; ne<N; ne++)
+    cptEltGeom(elt[ne], pole);
+}
+
+/* for all elements of size-N-array `elt`,
+   make centre areaweighted average centres of super mesh elements */
+void update_baryc(Elt *elt, int N)
+{
+  for (int ne=0; ne<N; ne++)
+  {
+    Elt &e = elt[ne];
+    int ns = e.is.size();  // sous-elements
+    Coord *sx = new Coord[ns];
+    int i=0;
+    for (list<Polyg*>::iterator it = e.is.begin(); it != e.is.end(); i++, it++)
+    {
+      sx[i] = (*it)->x * (*it)->area;
+    }
+    e.x = barycentre(sx, ns);
+  }
+}
+
+
+Coord gradient_old(Elt& elt, Elt **neighElts)
+{
+  Coord grad = ORIGIN;
+  Coord *neighBaryc = new Coord[elt.n];
+  for (int j = 0; j < elt.n; j++)
+  {
+    int k = (j + 1) % elt.n;
+    neighBaryc[j] = neighElts[j]->x;
+    Coord edgeNormal = crossprod(neighElts[k]->x, neighElts[j]->x);
+
+    // use nomenclauture form paper 
+    double f_i = elt.val;
+    double f_j = neighElts[j]->val;
+    double f_k = neighElts[k]->val;
+    grad = grad + edgeNormal * (0.5*(f_j + f_k) - f_i);
+  }
+  // area of the polygon whoes vertices are the barycentres the neighbours 
+  grad = grad * (1./polygonarea(neighBaryc, elt.n));
+  delete[] neighBaryc;
+
+  return grad - elt.x * scalarprod(elt.x, grad);
+}
+
+
+
+Coord gradient(Elt& elt, Elt **neighElts)
+{
+    
+  Coord grad = ORIGIN;
+  Coord neighBaryc[3] ;
+
+  double f_i ;
+  double f_j ;
+  double f_k ;
+ 
+  Coord edgeNormal ;
+  double area=0 ;
+  int k ;
+  int count=0 ;
+  
+  for (int j = 0; j < elt.n; j++)
+  {
+    f_i = elt.val;
+    k = (j + 1) % elt.n;
+    if (neighElts[j]==NULL || neighElts[k]==NULL) continue ;
+
+    // use nomenclauture form paper 
+    f_j = neighElts[j]->val;
+    f_k = neighElts[k]->val;
+
+    
+   
+    neighBaryc[0] = elt.x;
+    neighBaryc[1] = neighElts[j]->x;
+    neighBaryc[2] = neighElts[k]->x;
+
+    edgeNormal = crossprod(neighElts[k]->x, neighElts[j]->x);
+    grad = grad + edgeNormal * (0.5*(f_k + f_j) - f_i);
+
+    edgeNormal = crossprod(neighElts[j]->x, elt.x);
+    grad = grad + edgeNormal * (0.5*(f_j + f_i) - f_i);
+
+    edgeNormal = crossprod(elt.x, neighElts[k]->x);
+    grad = grad + edgeNormal * (0.5*(f_i + f_k) - f_i);
+
+  // area of the polygon whoes vertices are the barycentres the neighbours 
+
+    area+=polygonarea(neighBaryc, 3) ;
+    count++ ;
+
+  }
+  if (count>0) 
+  {
+    grad=grad*(1./area) ;
+    return grad - elt.x * scalarprod(elt.x, grad);
+  }
+  else return grad ;
+}
+
+
+
+
+void computeGradients(Elt **elts, int N)
+{
+  
+  for (int j = 0; j < N; j++)
+    elts[j]->val = 0;
+
+  Elt *neighbours[NMAX];
+  for (int j = 0; j < N; j++)
+  {
+    for (int i = 0; i < elts[j]->n; i++) 
+      if ( elts[j]->neighbour[i]== NOT_FOUND) neighbours[i]=NULL ; // no neighbour
+      else if (elts[elts[j]->neighbour[i]]->is.size() == 0) neighbours[i]=NULL ; // neighbour has none supermesh cell 
+      else  neighbours[i] = elts[elts[j]->neighbour[i]];
+
+    for (int i = 0; i < elts[j]->n; i++)
+      if (neighbours[i]!=NULL) neighbours[i]->val = 0;
+      
+    for (int i = 0; i < elts[j]->n; i++)
+    {
+      if (neighbours[i]!=NULL)
+      {
+        elts[j]->neighId[i] = neighbours[i]->src_id;
+        /* for weight computation all values are always kept zero and only set to one when used .. */
+        neighbours[i]->val = 1;
+        elts[j]->gradNeigh[i] = gradient(*(elts[j]), neighbours);
+        /* .. and right after zeroed again */
+        neighbours[i]->val = 0;
+      }
+      else
+      {
+        elts[j]->neighId[i].rank = -1; // mark end
+        elts[j]->neighId[i].ind = -1; // mark end
+      }
+    }
+
+    for(int i = elts[j]->n ; i < NMAX; i++)
+    {
+      elts[j]->neighId[i].rank = -1; // mark end
+      elts[j]->neighId[i].ind = -1; // mark end
+    }
+    /* For the most naive algorithm the case where the element itself is one must also be considered.
+       Thomas says this can later be optimized out. */
+    elts[j]->val = 1;
+    elts[j]->grad = gradient(*(elts[j]), neighbours);
+    elts[j]->val = 0;
+  }
+}
+
+}
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/remap/src/meshutil.hpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/remap/src/meshutil.hpp	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/remap/src/meshutil.hpp	(revision 1749)
@@ -0,0 +1,11 @@
+#include <vector>
+#include "elt.hpp"
+
+namespace sphereRemap {
+
+void cptEltGeom(Elt& elt, const Coord &pole);
+void cptAllEltsGeom(Elt *elt, int N, const Coord &pole);
+void update_baryc(Elt *elt, int N);
+void computeGradients(Elt **elt, int N);
+
+}
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/remap/src/misc.hpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/remap/src/misc.hpp	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/remap/src/misc.hpp	(revision 1749)
@@ -0,0 +1,58 @@
+#ifndef  __MISC_H__
+#define  __MISC_H__
+
+#include <stdlib.h> // srand
+#include <algorithm> // swap
+#include <cmath> // pow
+#include <vector> // randomizeArray
+
+namespace sphereRemap {
+
+// y = b^x
+// always round down to integer
+
+// b unknown
+static int iroot(int x, int y)
+{
+	// FIXME: is this save to do? will it work correctly for integer cases like iroot(3, 8)?
+	// (what if roundoff errors produce pow(3., 1./8.) = 1.99999999999995? )
+	return pow(y, 1./x); 
+}
+
+// y unknown
+static int ipow(int basis, int exponent)
+{
+        int res = 1;
+        while (exponent--) res *= basis;
+        return res;
+}
+
+// x unknown
+// integer logarithm, rounds down
+static int ilog(int base, int arg)
+{
+	int x = 0;
+	for (int y = base; y <= arg; y *= base)
+		x++;
+	return x;
+}
+
+
+/* provide an array of indices that are in random order but every index appears exatly 1 time */
+static void randomizeArray(std::vector<int>& array)
+{
+	srand (3);
+
+	for (int i = 0; i < array.size(); i++)
+		array[i] = i;
+
+	for (int i = 0; i < 3 * array.size(); i++)
+	{
+		int ind1 = rand() % array.size();
+		int ind2 = rand() % array.size();
+		std::swap(array[ind1], array[ind2]);
+	}
+}
+
+}
+#endif
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/remap/src/mpi_cascade.cpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/remap/src/mpi_cascade.cpp	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/remap/src/mpi_cascade.cpp	(revision 1749)
@@ -0,0 +1,25 @@
+#include "mpi_cascade.hpp"
+#include <iostream>
+
+namespace sphereRemap {
+
+CMPICascade::CMPICascade(int nodes_per_level, MPI_Comm comm)
+{
+	int remaining_levels;
+	MPI_Comm intraComm;
+	int l = 0; // current level
+	do {
+		level.push_back(comm);
+		remaining_levels = ilog(nodes_per_level /*base*/, level[l].size /*arg*/) + 1;
+		level[l].group_size = iroot(remaining_levels, level[l].size); // group_size^remaining_levels <= size
+		level[l].p_grp_size = level[l].size/level[l].group_size;
+	
+		MPI_Comm_split(comm, level[l].colour(), level[l].key(), &intraComm);
+		MPI_Comm_split(comm, level[l].p_colour(), level[l].p_key(), &(level[l].pg_comm));
+		comm = intraComm;
+		l++;
+	} while (--remaining_levels);
+	num_levels = l;
+}
+
+}
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/remap/src/mpi_cascade.hpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/remap/src/mpi_cascade.hpp	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/remap/src/mpi_cascade.hpp	(revision 1749)
@@ -0,0 +1,44 @@
+#ifndef  __MPI_CASCADE_HPP__
+#define  __MPI_CASCADE_HPP__
+
+#include "mpi.hpp"
+#include <vector>
+#include <cassert>
+#include "misc.hpp"
+
+namespace sphereRemap {
+
+class CCascadeLevel
+{
+public:
+	CCascadeLevel(MPI_Comm comm) : comm(comm)
+	{
+		MPI_Comm_size(comm, &size);
+		MPI_Comm_rank(comm, &rank);
+	}
+	int colour() const { return rank % group_size; };
+	int key() const { return p_colour() + rank/(p_grp_size*group_size)*p_grp_size; }
+
+	// perpendicular group
+	int p_colour() const { return (rank%group_size + rank/group_size) % p_grp_size; }
+	int p_key() const { return colour() + rank/(p_grp_size*group_size)*group_size; }
+
+	MPI_Comm comm, pg_comm;
+	int rank;
+	int size;
+	int group_size; // group_size and p_grp_size are interchanged?? FIXME
+	int p_grp_size;
+};
+
+class CMPICascade
+{
+public:
+	// 
+	CMPICascade(int nodes_per_level, MPI_Comm comm);
+
+	int num_levels;
+	std::vector<CCascadeLevel> level;
+};
+
+}
+#endif
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/remap/src/mpi_routing.cpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/remap/src/mpi_routing.cpp	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/remap/src/mpi_routing.cpp	(revision 1749)
@@ -0,0 +1,612 @@
+#include "mpi_routing.hpp"
+#include "mpi.hpp"
+#include "node.hpp"
+#include "elt.hpp"
+#include "timerRemap.hpp"
+#include <iostream>
+
+namespace sphereRemap {
+
+const int verbose = 0;
+
+CMPIRouting::CMPIRouting(MPI_Comm comm) : communicator(comm)
+{
+	MPI_Comm_rank(comm, &mpiRank);
+	MPI_Comm_size(comm, &mpiSize);
+}
+
+/* sparse alltoallv when it is known that only a subset of ranks will communicate,
+    but message lengths are *known* to receiver */
+template <typename T>
+void alltoalls_known(const vector<vector<T> >& send, vector<vector<T> >& recv, const vector<int>& ranks, MPI_Comm communicator)
+{
+	vector<MPI_Request> request(ranks.size() * 2);
+	vector<MPI_Status>  status(ranks.size() * 2);
+
+	// communicate data
+	int nbRequest = 0;
+	for (int i = 0; i < ranks.size(); i++)
+		if (recv[i].size())
+			MPI_Irecv(&recv[i][0], recv[i].size()*sizeof(T), MPI_CHAR, ranks[i], 0, communicator, &request[nbRequest++]);
+	for (int i = 0; i < ranks.size(); i++)
+		if (send[i].size())
+			MPI_Isend((void *) &send[i][0], send[i].size()*sizeof(T), MPI_CHAR, ranks[i], 0, communicator, &request[nbRequest++]);
+	MPI_Waitall(nbRequest, &request[0], &status[0]);
+}
+
+/* sparse alltoallv when it is known that only a subset of ranks will communicate,
+    but message lengths are *unknown* to receiver */
+template <typename T>
+void alltoalls_unknown(const vector<vector<T> >& send, vector<vector<T> >& recv, const vector<int>& ranks, MPI_Comm communicator)
+{
+	vector<MPI_Request> request(ranks.size() * 2);
+	vector<MPI_Status>  status(ranks.size() * 2);
+
+	// communicate sizes
+	int nbRequest = 0;
+	vector<int> sendSizes(ranks.size());
+	vector<int> recvSizes(ranks.size());
+	for (int i = 0; i < ranks.size(); i++)
+		sendSizes[i] = send[i].size();
+	for (int i = 0; i < ranks.size(); i++)
+		MPI_Irecv(&recvSizes[i], 1, MPI_INT, ranks[i], 0, communicator, &request[nbRequest++]);
+	for (int i = 0; i < ranks.size(); i++)
+		MPI_Isend(&sendSizes[i], 1, MPI_INT, ranks[i], 0, communicator, &request[nbRequest++]);
+	MPI_Waitall(nbRequest, &request[0], &status[0]);
+
+	// allocate
+	for (int i = 0; i < ranks.size(); i++)
+		if (recvSizes[i]) recv[i].resize(recvSizes[i]);
+	// communicate data
+	alltoalls_known(send, recv, ranks, communicator);
+}
+
+void setElementsSendCnt(int route, vector<int>& sendCnt)
+{
+	sendCnt[route]++;
+}
+
+void setElementsSendCnt(const vector<int>& route, vector<int>& sendCnt)
+{
+	for (int i = 0; i < route.size(); i++)
+		sendCnt[route[i]]++;
+}
+
+void setTargetElementIndex(int route, vector<int>& indices, const int *rankToIndex)
+{
+	int index = rankToIndex[route];
+	indices.push_back(index);
+}
+
+void setTargetElementIndex(const vector<int>& route, vector<int>& indices, const int *rankToIndex)
+{
+	for (int i = 0; i < route.size(); i++)
+	{
+		int index = rankToIndex[route[i]];
+		indices.push_back(index);
+	}
+}
+
+template<typename T>
+void CMPIRouting::init(const vector<T>& route, CMPICascade *cascade)
+{
+	vector<int> nbElementSend(mpiSize);
+	int *toSend = new int[mpiSize];
+	int *recvCount = new int[mpiSize];
+	int *targetRankToIndex;
+
+	for (int i = 0; i < route.size(); i++)
+		setElementsSendCnt(route[i], nbElementSend);
+
+	nbTarget = 0;
+vector<int> destRanks;
+	for (int i = 0; i < mpiSize; i++)
+	{
+		if (nbElementSend[i] == 0)
+			toSend[i] = 0;
+		else
+		{
+destRanks.push_back(i);
+			toSend[i] = 1;
+			nbTarget++;
+		}
+		recvCount[i] = 1;
+	}
+//int recvCntDeb = (stree) ? stree->scatter_reduce(destRanks) : -1;
+
+	MPI_Barrier(communicator);
+	CTimer::get("CMPIRouting::init(reduce_scatter)").reset();
+	CTimer::get("CMPIRouting::init(reduce_scatter)").resume();
+	MPI_Reduce_scatter(toSend, &nbSource, recvCount, MPI_INT, MPI_SUM, communicator);
+	CTimer::get("CMPIRouting::init(reduce_scatter)").suspend();
+	CTimer::get("CMPIRouting::init(reduce_scatter)").print();
+
+	MPI_Alloc_mem(nbTarget *sizeof(int), MPI_INFO_NULL, &targetRank);
+	MPI_Alloc_mem(nbSource *sizeof(int), MPI_INFO_NULL, &sourceRank);
+
+	targetRankToIndex = new int[mpiSize];
+	int index = 0;
+	for (int i = 0; i < mpiSize; i++)
+	{
+		if (toSend[i] == 1)
+		{
+			targetRank[index] = i;
+			targetRankToIndex[i] = index;
+			index++;
+		}
+	}
+
+	MPI_Barrier(communicator);
+	CTimer::get("CMPIRouting::init(get_source)").reset();
+	CTimer::get("CMPIRouting::init(get_source)").resume();
+
+	MPI_Request *request = new MPI_Request[nbSource + nbTarget];
+	MPI_Status  *status = new MPI_Status[nbSource + nbTarget];
+
+	int indexRequest = 0;
+	if (verbose) cout << "CMPIRouting::init     nbSource : " << nbSource << " nbTarget : " << nbTarget << endl;
+//	assert(recvCntDeb == -1 || recvCntDeb == nbSource);
+//cout << mpiRank <<  "DEB : " << recvCntDeb << "    nbSource " << nbSource << " nbTarget : " << nbTarget << endl;
+	for (int i = 0; i < nbSource; i++)
+	{
+		MPI_Irecv(&sourceRank[i], 1, MPI_INT, MPI_ANY_SOURCE, 0, communicator, &request[indexRequest]);
+		indexRequest++;
+	}
+	MPI_Barrier(communicator);
+	for (int i = 0; i < nbTarget; i++)
+	{
+		MPI_Isend(&mpiRank, 1, MPI_INT, targetRank[i], 0, communicator, &request[indexRequest]);
+		indexRequest++;
+	}
+	MPI_Waitall(indexRequest, request, status);
+	MPI_Barrier(communicator);  //needed
+	CTimer::get("CMPIRouting::init(get_source)").suspend();
+	CTimer::get("CMPIRouting::init(get_source)").print();
+
+	CTimer::get("CMPIRouting::init(get_source)").reset();
+	CTimer::get("CMPIRouting::init(get_source)").resume();
+
+	indexRequest = 0;
+	for (int i = 0; i < nbSource; i++)
+	{
+		MPI_Irecv(&sourceRank[i], 1, MPI_INT, MPI_ANY_SOURCE, 0, communicator, &request[indexRequest]);
+		indexRequest++;
+	}
+
+	for (int i = 0; i < nbTarget; i++)
+	{
+		MPI_Isend(&mpiRank, 1, MPI_INT, targetRank[i], 0, communicator, &request[indexRequest]);
+		indexRequest++;
+	}
+	MPI_Waitall(indexRequest, request, status);
+	MPI_Barrier(communicator);
+	CTimer::get("CMPIRouting::init(get_source)").suspend();
+	CTimer::get("CMPIRouting::init(get_source)").print();
+
+	CTimer::get("CMPIRouting::init(send_element)").reset();
+	CTimer::get("CMPIRouting::init(send_element)").resume();
+
+	nbTargetElement.resize(nbTarget);
+	nbSourceElement.resize(nbSource);
+
+	for (int i = 0; i < route.size(); i++)
+		setTargetElementIndex(route[i], targetElementIndex, targetRankToIndex);
+
+	for (int i = 0; i < targetElementIndex.size(); i++)
+		nbTargetElement[targetElementIndex[i]]++;
+
+	indexRequest = 0;
+	totalSourceElement = 0;
+	totalTargetElement = 0;
+	for (int i = 0; i < nbSource; i++)
+	{
+		MPI_Irecv(&nbSourceElement[i], 1, MPI_INT, sourceRank[i], 0, communicator, &request[indexRequest]);
+		indexRequest++;
+	}
+
+	for (int i = 0; i < nbTarget; i++)
+	{
+		totalTargetElement += nbTargetElement[i];
+		MPI_Isend(&nbTargetElement[i], 1, MPI_INT, targetRank[i], 0, communicator, &request[indexRequest]);
+		indexRequest++;
+	}
+
+	MPI_Waitall(indexRequest, request, status);
+
+	CTimer::get("CMPIRouting::init(send_element)").suspend();
+	CTimer::get("CMPIRouting::init(send_element)").print();
+
+	totalSourceElement = 0;
+	for (int i = 0; i < nbSource; i++)
+		totalSourceElement += nbSourceElement[i];
+
+	sourceElementIndex.resize(totalSourceElement);
+
+	totalSourceElement = 0;
+	for (int i = 0; i < nbSource; i++)
+	{
+		for (int j = 0; j < nbSourceElement[i]; j++)
+		{
+			sourceElementIndex[totalSourceElement] = i;
+			totalSourceElement++;
+		}
+	}
+
+	delete[]  toSend;
+	delete[]  recvCount;
+	delete[]  request;
+	delete[]  status;
+}
+
+
+int CMPIRouting::getTotalSourceElement(void)
+{
+	return totalSourceElement;
+}
+
+template<typename T>
+void CMPIRouting::transferToTarget(T* targetElements, T* sourceElements)
+{
+	char** targetBuffer = new char*[nbTarget];
+	int* indexTargetBuffer = new int[nbTarget];
+
+	for(int i=0;i<nbTarget; i++)
+	{
+		targetBuffer[i] = new char[sizeof(T)*nbTargetElement[i]];
+		indexTargetBuffer[i]= 0;
+	}
+
+	char** sourceBuffer = new char*[nbSource];
+	int* indexSourceBuffer = new int[nbSource];
+
+	for(int i=0;i<nbSource; i++)
+	{
+		sourceBuffer[i] = new char[sizeof(T)*nbSourceElement[i]];
+		indexSourceBuffer[i]= 0;
+	}
+
+	// pack the data
+	int index;
+	for(int i=0;i<totalTargetElement;i++)
+	{
+		index=targetElementIndex[i];
+		*((T*) &(targetBuffer[index][indexTargetBuffer[index]])) = targetElements[i];
+		indexTargetBuffer[index]+=sizeof(T);
+	}
+
+
+	MPI_Request* request=new MPI_Request[nbSource+nbTarget];
+	MPI_Status*  status=new MPI_Status[nbSource+nbTarget];
+	int indexRequest=0;
+
+	MPI_Barrier(communicator);
+	CTimer::get("CMPIRouting::transferToTarget").reset();
+	CTimer::get("CMPIRouting::transferToTarget").resume();
+
+	for(int i=0; i<nbSource; i++)
+	{
+		MPI_Irecv(sourceBuffer[i],nbSourceElement[i]*sizeof(T),MPI_CHAR, sourceRank[i], 0, communicator, &request[indexRequest]);
+		indexRequest++;
+	}
+
+	for(int i=0;i<nbTarget; i++)
+	{
+		MPI_Isend(targetBuffer[i],nbTargetElement[i]*sizeof(T), MPI_CHAR, targetRank[i], 0, communicator, &request[indexRequest]);
+		indexRequest++;
+	}
+
+	MPI_Waitall(indexRequest,request,status);
+
+	CTimer::get("CMPIRouting::transferToTarget").suspend();
+	CTimer::get("CMPIRouting::transferToTarget").print();
+	MPI_Barrier(communicator);
+
+	// unpack the data
+	for(int i=0;i<totalSourceElement;i++)
+	{
+		index=sourceElementIndex[i];
+		sourceElements[i] = *((T*) &(sourceBuffer[index][indexSourceBuffer[index]]));
+		indexSourceBuffer[index]+=sizeof(T);
+	}
+
+	for(int i=0;i<nbTarget; i++) delete[] targetBuffer[i];
+	for(int i=0;i<nbSource; i++) delete[] sourceBuffer[i];
+	delete[] targetBuffer;
+	delete[] indexTargetBuffer;
+	delete[] sourceBuffer;
+	delete[] indexSourceBuffer;
+	delete[] request;
+	delete[] status;
+}
+
+
+template<typename T, typename t_pack, typename t_unpack>
+void CMPIRouting::transferToTarget(T* targetElements, T* sourceElements, t_pack pack, t_unpack unpack)
+{
+	char** targetBuffer = new char*[nbTarget];
+	int* indexTargetBuffer = new int[nbTarget];
+	int* targetMessageSize = new int[nbTarget];
+	int* sourceMessageSize = new int[nbSource];
+	int index;
+
+	// compute target buffer size
+	for (int i = 0; i < nbTarget; i++)
+		targetMessageSize[i] = 0;
+
+	for (int i = 0; i < totalTargetElement; i++)
+	{
+		index = targetElementIndex[i];
+		pack(targetElements[i], NULL, targetMessageSize[index]);
+	}
+
+	MPI_Request *request = new MPI_Request[nbSource + nbTarget];
+	MPI_Status  *status = new MPI_Status[nbSource + nbTarget];
+	int indexRequest = 0;
+
+	MPI_Barrier(communicator);
+	CTimer::get("CMPIRouting::transferToTarget(messageSize)").reset();
+	CTimer::get("CMPIRouting::transferToTarget(messageSize)").resume();
+
+	for(int i=0; i<nbSource; i++)
+	{
+		MPI_Irecv(&sourceMessageSize[i],1,MPI_INT, sourceRank[i], 0, communicator, &request[indexRequest]);
+		indexRequest++;
+	}
+
+	for(int i=0; i<nbTarget; i++)
+	{
+		MPI_Isend(&targetMessageSize[i],1, MPI_INT, targetRank[i], 0, communicator, &request[indexRequest]);
+		indexRequest++;
+	}
+
+	MPI_Waitall(indexRequest,request,status);
+
+	MPI_Barrier(communicator);
+	CTimer::get("CMPIRouting::transferToTarget(messageSize)").suspend();
+	CTimer::get("CMPIRouting::transferToTarget(messageSize)").print();
+
+	for(int i=0; i<nbTarget; i++)
+	{
+		targetBuffer[i] = new char[targetMessageSize[i]];
+		indexTargetBuffer[i] = 0;
+	}
+
+	char** sourceBuffer = new char*[nbSource];
+	int* indexSourceBuffer = new int[nbSource];
+
+	for(int i=0;i<nbSource; i++)
+	{
+		sourceBuffer[i] = new char[sourceMessageSize[i]];
+		indexSourceBuffer[i]= 0;
+	}
+
+	// pack the data
+	for(int i=0; i<totalTargetElement; i++)
+	{
+		index=targetElementIndex[i];
+		pack(targetElements[i], targetBuffer[index], indexTargetBuffer[index] );
+	}
+
+	indexRequest=0;
+
+	MPI_Barrier(communicator);
+	CTimer::get("CMPIRouting::transferToTarget(data)").reset();
+	CTimer::get("CMPIRouting::transferToTarget(data)").resume();
+	for(int i=0; i<nbSource; i++)
+	{
+		MPI_Irecv(sourceBuffer[i],sourceMessageSize[i],MPI_CHAR, sourceRank[i], 0, communicator, &request[indexRequest]);
+		indexRequest++;
+	}
+
+	for(int i=0;i<nbTarget; i++)
+	{
+		MPI_Isend(targetBuffer[i],targetMessageSize[i], MPI_CHAR, targetRank[i], 0, communicator, &request[indexRequest]);
+		indexRequest++;
+	}
+
+	MPI_Waitall(indexRequest,request,status);
+
+	MPI_Barrier(communicator);
+	CTimer::get("CMPIRouting::transferToTarget(data)").suspend();
+	CTimer::get("CMPIRouting::transferToTarget(data)").print();
+
+	// unpack the data
+	for(int i=0; i<totalSourceElement; i++)
+	{
+		index=sourceElementIndex[i];
+		unpack(sourceElements[i], sourceBuffer[index], indexSourceBuffer[index]);
+	}
+
+	for (int i=0; i<nbTarget; i++) delete[] targetBuffer[i];
+	for (int i=0; i<nbSource; i++) delete[] sourceBuffer[i];
+	delete[] targetBuffer;
+	delete[] indexTargetBuffer;
+	delete[] targetMessageSize;
+	delete[] sourceBuffer;
+	delete[] indexSourceBuffer;
+	delete[] sourceMessageSize;
+	delete[] request;
+	delete[] status;
+}
+
+template<typename T>
+void CMPIRouting::transferFromSource(T* targetElements, T* sourceElements)
+{
+	char** targetBuffer = new char*[nbTarget];
+	int* indexTargetBuffer = new int[nbTarget];
+
+	for (int i = 0; i < nbTarget; i++)
+	{
+		targetBuffer[i] = new char[sizeof(T)*nbTargetElement[i]];
+		indexTargetBuffer[i] = 0;
+	}
+
+	char** sourceBuffer = new char*[nbSource];
+	int* indexSourceBuffer = new int[nbSource];
+
+	for (int i = 0; i < nbSource; i++)
+	{
+		sourceBuffer[i] = new char[sizeof(T)*nbSourceElement[i]];
+		indexSourceBuffer[i] = 0;
+	}
+
+	// pack the data
+	int index;
+	for (int i = 0; i < totalSourceElement; i++)
+	{
+		index = sourceElementIndex[i];
+		*((T*) &(sourceBuffer[index][indexSourceBuffer[index]])) = sourceElements[i];
+		indexSourceBuffer[index] += sizeof(T);
+	}
+
+	MPI_Request* request=new MPI_Request[nbSource+nbTarget];
+	MPI_Status*  status=new MPI_Status[nbSource+nbTarget];
+	int indexRequest=0;
+
+	for(int i=0; i<nbSource; i++)
+	{
+		MPI_Isend(sourceBuffer[i],nbSourceElement[i]*sizeof(T),MPI_CHAR, sourceRank[i], 0, communicator, &request[indexRequest]);
+		indexRequest++;
+	}
+
+	for(int i=0;i<nbTarget; i++)
+	{
+		MPI_Irecv(targetBuffer[i],nbTargetElement[i]*sizeof(T), MPI_CHAR, targetRank[i], 0, communicator, &request[indexRequest]);
+		indexRequest++;
+	}
+
+	MPI_Waitall(indexRequest,request,status);
+
+	// unpack the data
+	for(int i=0;i<totalTargetElement;i++)
+	{
+		index=targetElementIndex[i];
+		targetElements[i] = *((T*) &(targetBuffer[index][indexTargetBuffer[index]]));
+		indexTargetBuffer[index]+=sizeof(T);
+	}
+
+	for(int i=0;i<nbTarget; i++) delete[] targetBuffer[i];
+	for(int i=0;i<nbSource; i++) delete[] sourceBuffer[i];
+	delete[] targetBuffer;
+	delete[] indexTargetBuffer;
+	delete[] sourceBuffer;
+	delete[] indexSourceBuffer;
+	delete[] request;
+	delete[] status;
+}
+
+
+/* number of source and target elements is known from previous call to init() */
+template<typename T, typename t_pack, typename t_unpack>
+void CMPIRouting::transferFromSource(T *targetElements, T *sourceElements, t_pack pack, t_unpack unpack)
+{
+	char **targetBuffer = new char*[nbTarget];
+	int *indexTargetBuffer = new int[nbTarget];
+	int *targetMessageSize = new int[nbTarget];
+	int *sourceMessageSize = new int[nbSource];
+	int index;
+
+	// compute target buffer size
+	for (int i = 0; i < nbSource; i++)  sourceMessageSize[i] = 0;
+
+	for (int i = 0; i < totalSourceElement; i++)
+	{
+		index = sourceElementIndex[i];
+		pack(sourceElements[i], NULL, sourceMessageSize[index]);
+	}
+
+	MPI_Request *request = new MPI_Request[nbSource + nbTarget];
+	MPI_Status  *status = new MPI_Status[nbSource + nbTarget];
+	int indexRequest = 0;
+	for (int i = 0; i < nbSource; i++)
+	{
+		MPI_Isend(&sourceMessageSize[i], 1, MPI_INT, sourceRank[i], 0, communicator, &request[indexRequest]);
+		indexRequest++;
+	}
+	for (int i = 0; i < nbTarget; i++)
+	{
+		MPI_Irecv(&targetMessageSize[i], 1, MPI_INT, targetRank[i], 0, communicator, &request[indexRequest]);
+		indexRequest++;
+	}
+	MPI_Waitall(indexRequest, request, status);
+
+	for (int i = 0; i < nbTarget; i++)
+	{
+		targetBuffer[i] = new char[targetMessageSize[i]];
+		indexTargetBuffer[i] = 0;
+	}
+
+	char **sourceBuffer = new char*[nbSource];
+	int *indexSourceBuffer = new int[nbSource];
+
+	for (int i = 0; i < nbSource; i++)
+	{
+		sourceBuffer[i] = new char[sourceMessageSize[i]];
+		indexSourceBuffer[i] = 0;
+	}
+
+
+	// pack the data
+	for (int i = 0; i < totalSourceElement; i++)
+	{
+		index = sourceElementIndex[i];
+		pack(sourceElements[i], sourceBuffer[index], indexSourceBuffer[index] );
+	}
+
+	indexRequest = 0;
+	for (int i = 0; i < nbSource; i++)
+	{
+		MPI_Isend(sourceBuffer[i], sourceMessageSize[i], MPI_CHAR, sourceRank[i], 0, communicator, &request[indexRequest]);
+		indexRequest++;
+	}
+	for (int i = 0; i < nbTarget; i++)
+	{
+		MPI_Irecv(targetBuffer[i], targetMessageSize[i], MPI_CHAR, targetRank[i], 0, communicator, &request[indexRequest]);
+		indexRequest++;
+	}
+	MPI_Waitall(indexRequest, request, status);
+
+	// unpack the data
+	for (int i = 0; i < totalTargetElement; i++)
+	{
+		index = targetElementIndex[i];
+		unpack(targetElements[i], targetBuffer[index], indexTargetBuffer[index]);
+	}
+
+	for (int i = 0; i < nbTarget; i++) delete[] targetBuffer[i];
+	for (int i = 0; i < nbSource; i++) delete[] sourceBuffer[i];
+	delete[] targetBuffer;
+	delete[] indexTargetBuffer;
+	delete[] targetMessageSize;
+	delete[] sourceBuffer;
+	delete[] indexSourceBuffer;
+	delete[] sourceMessageSize;
+	delete[] request;
+	delete[] status;
+}
+
+CMPIRouting::~CMPIRouting()
+{
+};
+
+template void CMPIRouting::init(const std::vector<int>& route, CMPICascade *cascade);
+template void CMPIRouting::init(const std::vector<vector<int> >& route, CMPICascade *cascade);
+
+template void CMPIRouting::transferToTarget(int *targetElements, int *sourceElements);
+template void CMPIRouting::transferToTarget(int *targetElements, int *sourceElements, void (*pack)(int&, char*, int&), void (* unpack)(int&, char *, int&));
+template void CMPIRouting::transferFromSource(int *targetElements, int *sourceElements);
+template void CMPIRouting::transferFromSource(int *targetElements, int *sourceElements, void (*pack)(int&, char*, int&), void (* unpack)(int&, char *, int&));
+
+template void CMPIRouting::transferToTarget(Node* targetElements, Node* sourceElements, void (*pack)(Node&, char*, int&), void (* unpack)(Node&, char *, int&));
+template void CMPIRouting::transferToTarget(Elt **targetElements, Elt **sourceElements, void (*pack)(Elt *, char*, int&), void (* unpack)(Elt *, char *, int&));
+template void CMPIRouting::transferFromSource(std::vector<int> *targetElements, std::vector<int> *sourceElements, void (*pack)(const std::vector<int>&, char*, int&), void (* unpack)(std::vector<int>&, const char *, int&));
+
+struct NES { int cnt; int risc; int rank; };
+
+template void alltoalls_unknown(const std::vector<std::vector<NES> >& send, std::vector<std::vector<NES> >& recv,
+                                const std::vector<int>& ranks, MPI_Comm communicator);
+
+template void alltoalls_known(const std::vector<std::vector<int> >& send, std::vector<std::vector<int> >& recv,
+                              const std::vector<int>& ranks, MPI_Comm communicator);
+
+}
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/remap/src/mpi_routing.hpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/remap/src/mpi_routing.hpp	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/remap/src/mpi_routing.hpp	(revision 1749)
@@ -0,0 +1,52 @@
+#ifndef  __MPI_ROUTING_HPP__
+#define  __MPI_ROUTING_HPP__
+
+#include "mpi.hpp"
+#include <vector>
+#include "mpi_cascade.hpp"
+
+namespace sphereRemap {
+
+class CMPIRouting
+{
+
+	MPI_Comm communicator;
+	int mpiRank;
+	int mpiSize;
+
+	int  nbSource;
+	int *sourceRank;
+	std::vector<int> nbSourceElement;
+	int  totalSourceElement;
+	std::vector<int> sourceElementIndex;
+
+	int  nbTarget;
+	int *targetRank;
+	std::vector<int> nbTargetElement;
+	std::vector<int> targetElementIndex;
+	int  totalTargetElement;
+
+
+public:
+	CMPIRouting(MPI_Comm comm);
+	~CMPIRouting();
+	template<typename T> void init(const std::vector<T>& route, CMPICascade *cascade = NULL);
+	int getTotalSourceElement(void);
+
+	template<typename T> void transferToTarget(T *targetElement, T *sourceElement);
+	template<typename T, typename t_pack, typename t_unpack> void transferToTarget(T *targetElement, T *sourceElement, t_pack pack, t_unpack unpack);
+
+	template<typename T> void transferFromSource(T *targetElement, T *sourceElement);
+	template<typename T, typename t_pack, typename t_unpack> void transferFromSource(T *targetElement, T *sourceElement, t_pack pack, t_unpack unpack);
+
+};
+
+template <typename T>
+void alltoalls_known(const std::vector<std::vector<T> >& send, std::vector<std::vector<T> >& recv,
+                     const std::vector<int>& ranks, MPI_Comm communicator);
+
+template <typename T>
+void alltoalls_unknown(const std::vector<std::vector<T> >& send, std::vector<std::vector<T> >& recv,
+                       const std::vector<int>& ranks, MPI_Comm communicator);
+}
+#endif
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/remap/src/node.cpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/remap/src/node.cpp	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/remap/src/node.cpp	(revision 1749)
@@ -0,0 +1,761 @@
+#include "mpi.hpp"
+#include <cstdlib>
+#include <cmath>
+#include <iostream>
+#include <cassert>
+#include "tree.hpp"
+#include "elt.hpp"
+#include "intersect.hpp"
+#include <vector>
+#include <set>
+#include <algorithm>
+
+#include "node.hpp"
+
+namespace sphereRemap {
+
+
+#define UPDATE_EVERY 1
+
+using namespace std;
+
+//#ifdef DEBUG
+//std::map<void*, struct mem_info> _mem_deb; // reference counter
+//
+//void NodePtr::unlink()
+//{
+//	_mem_deb[ptr].ref_cnt -= 1;
+//	if (_mem_deb[ptr].ref_cnt == 0) // we were last reference
+//	{
+//		if (_mem_deb[ptr].stat == DELETED) // delete has already been called, everything is fine, free memory now
+//		{
+//			_mem_deb.erase(ptr);
+//			::delete [] ((char *) ptr);
+//		}
+//		else // no more pointer, but memory not freed -> memory leak !!
+//		{
+//			std::cerr << "WARNING: Memory leak created at address " << ptr << ".";
+//			assert(_mem_deb[ptr].stat == ALLOCATED); // and not BORROWED
+//#ifdef AUTO_LEAK_FIX
+//			// free automatically, just for fun
+//			_mem_deb.erase(ptr);
+//			ptr->~Node(); // call destructor, since `Node::delete` has not been applied it has not been called
+//			::delete [] ((char *) ptr);
+//			std::cerr << " LEAK FIXED.";
+//#endif
+//
+//			std::cerr << std::endl;
+//		}
+//	}
+//}
+//
+//void memory_report()
+//{
+//	for (std::map<void*, struct mem_info>::iterator it = _mem_deb.begin(); it != _mem_deb.end(); it++)
+//	{
+//		if (it->second.stat == BORROWED) continue;
+//		std::cerr << "Node at " << it->first << " has " << it->second.ref_cnt << " references to it and "
+//		          << ((it->second.stat == DELETED) ? "has" : "has *not*") << " been deleted." << std::endl;
+//#ifdef AUTO_LEAK_FIX
+//		if (it->second.stat == ALLOCATED) // `Node::delete` has not been called
+//			((Node *) it->first)->~Node();
+//		delete [] ((char *)  it->first);
+//#endif
+//	}
+//}
+//
+//int ref_cnt(void *ptr)
+//{
+//	return _mem_deb[ptr].ref_cnt;
+//}
+//#endif
+
+int compareDist(NodePtr n1, NodePtr n2)
+{
+	return squaredist(n1->tree->ref->centre, n1->centre)
+	     < squaredist(n2->tree->ref->centre, n2->centre);
+}
+
+/* On level `level` find the node in our subtree that is closest to `src` and return through argument `closest`.
+   The return value is just for recursive calling */
+void Node::findClosest(int level, NodePtr src, double& minDist2, NodePtr &closest)
+{
+	double r2;
+
+	r2 = squaredist(src->centre, this->centre);
+	if (level == this->level)
+	{
+		if (r2 < minDist2 || closest == NULL)
+		{
+			minDist2 = r2;
+			closest = this;
+		}
+	}
+	else if (r2 < radius*radius)
+	{
+		for(int i = 0; i < child.size(); i++)
+			child[i]->findClosest(level, src, minDist2, closest);
+	}
+}
+
+NodePtr Node::farthest(vector<NodePtr >& list)
+{
+	assert(this);
+	double dmax = -HUGE_VAL;
+	NodePtr node = NULL;
+	for (size_t i=0; i < list.size(); i++)
+	{
+		double d = ds(this->centre, list[i]->centre);
+		if (d > dmax) {
+			node = list[i];
+			dmax = d;
+		}
+	}
+	return node;
+}
+
+/* returns element in `list` cosest to us (`this`) by meassure `ds`.
+   If `n` is negative finds element furthest away instead. */
+NodePtr Node::closest(vector<NodePtr >& list, int n)
+{
+	assert(this);
+	double dmin2 = (n>0) ? HUGE_VAL : -HUGE_VAL;
+	NodePtr node = NULL;
+	for (int i = 0; i < list.size(); i++)
+	{
+		double d2 = squaredist(this->centre, list[i]->centre);
+		if (n * (d2 - dmin2) < 0)
+		{
+			node = list[i];
+			dmin2 = d2;
+		}
+	}
+	return node;
+}
+
+// make sure we will be able to accomodate `node`
+void Node::move(const NodePtr node)   // this->leafCount may be 0
+{
+	double w = double(node->leafCount)/double(node->leafCount + this->leafCount);
+	Coord oldCentre = this->centre;
+	this->centre = proj(this->centre * (1-w) + node->centre * w);
+	this->leafCount += node->leafCount;
+	this->radius += arcdist(oldCentre, this->centre) + 1e-9;
+}
+
+void Node::remove(const NodePtr node)
+{
+	if (&node == NULL) return;
+	double w = double(node->leafCount) / this->leafCount;
+	Coord newCentre = proj(this->centre - node->centre * w);
+	this->leafCount -= node->leafCount;
+	this->radius += arcdist(newCentre, this->centre) + 1e-9;
+	this->centre = newCentre;
+	this->updateCount++;
+}
+
+void Node::inflate(const NodePtr node)
+{
+	double d = arcdist(this->centre, node->centre);
+	double r = node->radius;
+	if (this->radius < d + r)
+		this->radius = d + r + 1e-9;
+}
+
+/* recomputes the radius which currently might be much larger than necessary */
+void Node::update()
+{
+	Coord centre = ORIGIN;
+	int n = 0;
+	for (int i = 0; i < this->child.size(); i++) {
+		centre = centre + this->child[i]->centre * this->child[i]->leafCount;
+		n += this->child[i]->leafCount;
+	}
+	this->centre = proj(centre);
+	this->leafCount = n;
+
+	double R = 0;
+	for (int i = 0; i < this->child.size(); i++)
+	{
+		double d = arcdist(this->centre, this->child[i]->centre);
+		double r = this->child[i]->radius;
+		if (R < d + r) R = d + r;
+	}
+	this->radius = R + 1e-9;
+	this->updateCount = 0;
+	if (child.size())
+		level = child[0]->level + 1;
+}
+
+void Node::output(ostream& flux, int level, int color)
+{
+  if (level==this->level)
+  {
+    flux<<centre.x<<" , "<<centre.y<<" , "<<centre.z<<" , "<<radius<<endl ;
+  }
+  else
+  {
+    for (int i = 0; i < this->child.size(); i++) child[i]->output(flux,level,color) ;
+  }
+}
+
+
+/* void Node::append(NodePtr node);
+{
+	if (node->level == this->level -1)
+	{
+		// new node is one level lower (correct level)
+		this->child.append(node);
+		node->parent = this;
+	}
+	else if (node->level < this->level -1)
+	{
+		// if new node is on even lower level, recursively append to closest child
+		node->closest(this->child)->append(node);
+	}
+	else
+	{
+		cerr << "Error: Attempted node insertion with invalid level." << endl;
+		exit(1);
+	}
+}*/
+
+bool find_in_tree1(Node* node)
+{
+	if (node == node->tree->root) return true;
+	if (node->parent == NULL)
+	{
+		cerr << "Cannot find!" << endl;
+		return false;
+	}
+	return find_in_tree1(node->parent);
+}
+
+bool find_in_tree2(NodePtr node, NodePtr ref)
+{
+	for (int i = 0; i < ref->child.size(); i++)
+	{
+		if (node == ref->child[i])
+		{
+			cerr << "find2: " << ref << " -> " << ref->child[i] << endl;
+			return true;
+		}
+		else if (find_in_tree2(node, ref->child[i]))
+		{
+			cerr << "find2: " << ref << " -> " << ref->child[i] << endl;
+			return true;
+		}
+	}
+	return false;
+}
+
+
+/* This appends `this` to the node `node` */
+NodePtr insert(NodePtr thIs, NodePtr node)
+{
+	int la = thIs->level; // node to be inserted
+	int lb = node->level; // node where insertation
+	assert(la < lb); // node to be inserted must have lower level then parent
+	//if (thIs->parent) assert(find_in_tree1(thIs) == true);
+	NodePtr q = NULL;
+	NodePtr chd = NULL;
+	node->move(thIs);
+	if (la == lb - 1)
+	{
+    node->child.push_back(thIs);
+		thIs->parent = node;
+		if (node->child.size() > MAX_NODE_SZ &&  node->tree->canSplit() ) // with us as additional child `node` is now too large :(
+			return (node->reinserted || node->parent == NULL) ? split(node) : reinsert(node);
+	}
+	else // la < lb - 1
+	{
+		chd = thIs->closest(node->child);
+		q = insert(thIs, chd);
+	}
+	if ((node->updateCount + 1) % UPDATE_EVERY == 0)
+		node->update();
+	else
+	{
+		if (q) node->remove(q);
+		node->inflate(chd);
+	}
+
+
+  return q;
+}
+
+typedef NodePtr pNode;
+
+/* move `frac` of our children to a new node which is returned */
+NodePtr reinsert(NodePtr thIs)
+{
+	thIs->tree->ref = thIs;
+	std::sort(thIs->child.begin(), thIs->child.end(), compareDist);
+	int out = (int) (frac*thIs->child.size());
+
+	/* make sure out is only so big that there are still MIN_NODE_SZ children after removing out */
+	if (thIs->child.size() - out < MIN_NODE_SZ) out = thIs->child.size() - MIN_NODE_SZ;
+
+  
+	/* transfere out children from us to a new node q which will be returned */
+	NodePtr q = new Node;
+	q->tree = thIs->tree;
+	q->child.resize(out);
+	for (int i = thIs->child.size() - out; i < thIs->child.size(); i++)
+	{
+		thIs->tree->push_back(thIs->child[i]);
+		int k = i - (thIs->child.size() - out);
+		q->child[k] = thIs->child[i];
+		q->child[k]->parent = q;
+	}
+	thIs->child.resize(thIs->child.size() - out);
+	thIs->update();
+	q->update();
+	thIs->reinserted = true; // avoid infinite loop of reinserting the same node, by marking it as reinserted and stop if same node arrives at same place again
+	thIs->tree->ri = 1;
+
+	return q;
+}
+
+/* move around nodes that are far away from the centre of their parents in order reduce radia of the circles
+   leading to faster look-up times because of less redundancies between nodes.
+   TODO cite paper for Slim SS-tree */
+void slim2(NodePtr thIs, int level, int minNodeSize)
+{
+	bool out;
+	double distChild;
+
+#ifdef DEBUG
+//	assert(ref_cnt(thIs) >= thIs->child.size() + 1 /*parent*/ + 1 /*thIs*/);
+#endif
+	if (thIs->level==level)
+	{
+/*
+		out = false;
+		while (!out)
+		{
+			// remove child which is farthest away from the centre and try to reinsert it into the tree 
+			double distMax = 0;
+			int itMax = -1;
+
+			for (int i = 0; i < thIs->child.size(); i++)
+			{
+				distChild = arcdist(thIs->centre, thIs->child[i]->centre) + thIs->child[i]->radius;
+				if (distChild > distMax)
+				{
+					distMax = distChild;
+					itMax = i;
+				}
+			}
+			if (transferNode(thIs->tree->root, thIs, thIs->child[itMax]))
+			{
+				thIs->child.erase(thIs->child.begin()+itMax);
+				out = false;
+			}
+			else
+				out = true;
+
+			if (thIs->child.size() < minNodeSize) out = true;
+		}
+*/
+    if (thIs->tree-> isActiveOkSplit && thIs->tree->levelSize[thIs->tree->assignLevel] <= thIs->tree->keepNodes)
+    {
+
+      return ;
+    }
+    for (int i = 0; i < thIs->child.size(); i++)
+		{
+      std::vector<NodePtr> before;
+      if (transferNode(thIs->tree->root, thIs, thIs->child[i]))
+      {
+        before=thIs->child ;
+        thIs->child.erase(thIs->child.begin()+i);
+        i--;
+      }
+    }
+        
+
+		if (thIs->child.size() < minNodeSize  && thIs->level < thIs->tree->root->level)
+		{
+			thIs->tree->decreaseLevelSize(thIs->level);
+			for(int i = 0; i < thIs->child.size(); i++)
+				thIs->tree->push_back(thIs->child[i]);
+			thIs->child.resize(0);
+		}
+		else thIs->update();
+	}
+	else
+	{
+		int newChildCount = 0;
+		for (int i = 0; i < thIs->child.size(); i++)
+		{
+			if (thIs == thIs->tree->root)
+			{
+				// keep at least one child for root
+				if (i == thIs->child.size()-1 && newChildCount == 0)
+				{
+					thIs->child[newChildCount] = thIs->child[i];
+					newChildCount++;
+					break;
+				}
+			}
+
+			slim2(thIs->child[i], level);
+			if (thIs->child[i]->child.size() != 0) // thIs->child[i] is not a leaf
+			{
+				thIs->child[newChildCount] = thIs->child[i];
+				newChildCount++;
+			} /* else FIXME sometimes this child must be deleted (otherwise leak) sometimes not (otherwise segfault)
+			                maybe delete not here but when transfered
+				delete thIs->child[i]; // if our child does not make any grand-children what good is it? -> remove!
+*/
+
+		}
+		thIs->child.resize(newChildCount);
+
+		if (thIs->child.size() < MIN_NODE_SZ && thIs->level < thIs->tree->root->level)
+		{
+			thIs->tree->decreaseLevelSize(thIs->level);
+			for (int i = 0; i < thIs->child.size(); i++)
+				thIs->tree->push_front(thIs->child[i]);
+			thIs->child.resize(0);
+		}
+		else thIs->update();
+	}
+
+}
+
+bool transferNode(NodePtr thIs, NodePtr parent, NodePtr node)
+{
+  if (parent == thIs) return false;
+
+	if (thIs->level == parent->level)
+	{
+		if ( (thIs->child.size() < MAX_NODE_SZ || thIs->tree->isActiveOkSplit) && thIs->child.size() >= MIN_NODE_SZ)
+		{
+			insert(node, thIs);
+			return true;
+		}
+		else
+			return false;
+	}
+	else
+	{
+		for (int i = 0; i < thIs->child.size(); i++)
+		{
+			if (arcdist(thIs->child[i]->centre, node->centre) + node->radius < thIs->child[i]->radius)
+			{
+				if (transferNode(thIs->child[i], parent, node))
+				{
+					thIs->update();
+					return true;
+				}
+			}
+		}
+		return false;
+	}
+}
+
+
+
+NodePtr split(NodePtr thIs)
+{
+	thIs->tree->increaseLevelSize(thIs->level);
+	NodePtr p = new Node;
+	NodePtr q = new Node;
+	p->level = q->level = thIs->level;
+	p->reinserted = q->reinserted = false;
+	p->parent = q->parent = thIs->parent;
+	p->tree = q->tree = thIs->tree;
+
+
+	p->child.resize(MAX_NODE_SZ/2);
+	q->child.resize(MAX_NODE_SZ/2 + 1);
+	assert(thIs->child.size() == MAX_NODE_SZ+1);
+	thIs->tree->ref = thIs->closest(thIs->child, FARTHEST); // farthest from centre
+	std::sort(thIs->child.begin(), thIs->child.end(), compareDist);
+	for (int i = 0; i < MAX_NODE_SZ+1; i++)
+		assert(thIs->child[i]->parent == thIs);
+	for (int i = 0; i < MAX_NODE_SZ/2 + 1; i++)
+		q->child[i] = thIs->child[i];
+	for (int i = MAX_NODE_SZ/2+1; i<MAX_NODE_SZ+1; i++)
+		p->child[i-MAX_NODE_SZ/2-1] = thIs->child[i];
+	for (int i = 0; i < MAX_NODE_SZ/2 + 1; i++)
+		q->child[i]->parent = q;
+	for (int i = MAX_NODE_SZ/2+1; i < MAX_NODE_SZ+1; i++)
+		p->child[i-MAX_NODE_SZ/2-1]->parent = p;
+	p->update();
+	q->update();
+   
+	if (squaredist(thIs->centre, q->centre) < squaredist(thIs->centre, p->centre))
+		swap(p, q);
+
+	thIs->child = p->child; // now our children do not know we are their parents and believe p is their parent
+	for (int i = 0; i < thIs->child.size(); i++)
+		thIs->child[i]->parent = thIs;
+	thIs->reinserted = p->reinserted;
+	thIs->update();
+	delete p;
+
+	if (thIs == thIs->tree->root) // root split
+	{
+		// since we currently are root, make new root and make us and q its children
+		thIs->tree->newRoot(thIs->level + 1);
+		thIs->tree->root->child.push_back(thIs);  thIs->parent = thIs->tree->root;
+		thIs->tree->root->child.push_back(q);     q->parent    = thIs->tree->root;
+		thIs->tree->root->update();
+	}
+	else
+	{
+		thIs->tree->push_front(q);
+	}  // push_front?
+
+  	return q;
+}
+
+/* Assuming we are a leaf push all leafs into our list of intersectors
+   that are descendant of node and whoes circle intersects ours.
+*/
+void Node::search(NodePtr node)
+{
+	assert(this->level == 0);
+	int Nchild = node->child.size();
+	if (this->intersects(node)) {
+		if (node->level == 0)
+			this->intersectors.push_back(node);
+		else
+			for (int i=0; i<Nchild; i++)
+				search(node->child[i]);
+	}
+}
+
+/* FIXME this should not be in node.cpp and getNeighbours should not be part of the SS-tree
+   this is mapper specific */
+void findNeighbour(NodePtr thIs, NodePtr node, set<NodePtr >& neighbourList)
+{
+	if (thIs->level==0)
+	{
+		Elt* elt1= (Elt*)(thIs->data);
+		Elt* elt2= (Elt*)(node->data);
+		if (isNeighbour(*elt1, *elt2)) neighbourList.insert(thIs);
+	}
+	else
+	{
+		for(int i=0; i<thIs->child.size(); i++)
+			if (thIs->child[i]->intersects(node)) findNeighbour(thIs->child[i], node, neighbourList);
+	}
+}
+
+bool Node::intersects(NodePtr node)
+{
+	double d = arcdist(this->centre, node->centre);
+	double r = this->radius;
+	double R = node->radius;
+	return (d < r + R + 1e-9) ? true : false;
+}
+
+bool Node::centreInside(Node &node)
+{
+	double d = arcdist(this->centre, node.centre);
+	double R = node.radius;
+	return (d < R + 1e-9) ? true : false;
+}
+
+bool Node::isInside(Node &node)
+{
+	double d = arcdist(this->centre, node.centre);
+	double r = this->radius;
+	double R = node.radius;
+	return (d + r < R + 1e-9) ? true : false;
+}
+
+int Node::incluCheck()
+{
+	if (this->level == 0) return 0;
+	int nOutside = 0;
+	int n = this->child.size();  // cout << "n = " << n << endl;
+	for (int i=0; i<n; i++)
+	{
+		if (!this->child[i]->isInside(*this))
+		{
+			cout << "Node of level " << this->level << " does not contain its "
+				<< i << "th child\n";
+			nOutside++;
+		}
+		nOutside += this->child[i]->incluCheck();
+	}
+	return nOutside;
+}
+
+void Node::checkParent(void)
+{
+  int childSize = child.size() ;
+  
+  for (int i = 0; i < childSize; i++)
+		assert(child[i]->parent == this);
+
+  if (level>0) for (int i = 0; i < childSize; i++) child[i]->checkParent() ;
+}
+  
+void Node::printChildren()
+{
+	cout << "level " << this->level << ", centre ";
+	cout << "level " << this->level << ", centre " << this->centre << "\t r = " << this->radius << endl;
+	cout << this << " p: " << this->parent << endl;
+	int n = this->child.size();
+	for (int i=0; i<n; i++)
+	{
+		NodePtr child = this->child[i];
+		cout << "fils " << i << ": centre " << child->centre << "\t r = " << child->radius << endl;
+		cout << "dist to center " << arcdist(this->centre, child->centre) <<
+		        " d + R = " << arcdist(this->centre,child->centre)+child->radius << endl;
+	}
+}
+
+void Node::assignRoute(std::vector<int>::iterator& rank, int level)
+{
+	if (this->level==level)
+	{
+		route = *rank;
+		rank++;
+	}
+	else
+	{
+		for (int i = 0; i < child.size(); i++)
+			child[i]->assignRoute(rank, level);
+	}
+}
+
+void Node::assignCircleAndPropagateUp(Coord *centres, double *radia, int level)
+{
+	if (this->level == level)
+	{
+		// assign
+		centre = centres[route];
+		radius = radia[route];
+		free_descendants(); // levels of sample tree beyond `level` will not be used any more
+		child.resize(0);
+		this->level = 0;
+	}
+	else
+	{
+		for (int i = 0; i < child.size(); i++)
+			child[i]->assignCircleAndPropagateUp(centres, radia, level);
+		update(); // propagate up
+	}
+}
+
+/* Route node `node` within the subtree attached to us.
+ `level` is the level one which to assign
+*/
+// Each sample node has a rank randomly assigned to it, assign `node` from full tree
+void Node::routeNode(NodePtr node, int level)
+{
+	NodePtr closest;
+
+	double distMin2 = 0; // squared distance
+	closest = NULL;
+	if (tree->root == this)
+		findClosest(level, node, distMin2, closest);
+
+	if (closest != NULL && tree->root == this)
+		/* When is this point reached?
+		   if the preceeding findClosest was called and succesed to set closest
+		   findClosest sets closest if we are `level` or src is in our circle (=> belongs to child of ours)
+		   => reached if we are not `level` and node is not child of us
+		*/
+		node->route = closest->route;
+	else  /* find closest was not successfull or we were not root */
+	{
+		if (this->level == level)
+			node->route = this->route;
+		else /* not yet right level => go down one more */
+			node->closest(this->child)->routeNode(node, level);
+	}
+}
+
+void Node::routeIntersection(vector<int>& routes, NodePtr node)
+{
+	if (level == 0)
+	{
+		routes.push_back(this->route);
+	}
+	else
+	{
+		for (int i = 0; i < child.size(); i++) {
+			if (child[i]->intersects(node))
+				child[i]->routeIntersection(routes, node);
+		}
+	}
+}
+
+void Node::routingIntersecting(vector<Node> *routingList, NodePtr node)
+{
+	if (level==0)
+	{
+		int rank = route;
+		routingList[rank].push_back(*node);
+	}
+	else
+	{
+		for (int i = 0; i < child.size(); i++) {
+			if (child[i]->intersects(node))
+				child[i]->routingIntersecting(routingList, node);
+		}
+	}
+}
+
+void Node::free_descendants()
+{
+	for (int i = 0; i < child.size(); i++)
+	{
+		child[i]->free_descendants();
+		if (child[i]->level) // do not attempt to delete leafs, they are delete through leafs vector
+			delete child[i];
+	}
+}
+
+void Node::getNodeLevel(int assignLevel, std::list<NodePtr>& NodeList)
+{
+  if (level==assignLevel) NodeList.push_back(this) ;
+  else if (level>0) for (int i = 0; i < child.size(); i++) child[i]->getNodeLevel(assignLevel,NodeList) ;
+  return ;
+}
+
+bool Node::removeDeletedNodes(int assignLevel)
+{
+  std::vector<NodePtr> newChild ;
+
+  if (level==assignLevel+1)
+  {
+    bool isUpdate=false ;
+    for (int i = 0; i < child.size(); i++)
+    {
+      if (child[i]->toDelete)
+      {
+        isUpdate=true ;
+        for (int j = 0; j < child[i]->child.size(); j++) tree->push_back(child[i]->child[j]) ;
+        tree->decreaseLevelSize(assignLevel) ;
+        delete child[i] ;
+      }
+      else newChild.push_back(child[i]) ;
+    }
+
+    if (isUpdate)
+    {
+      child=newChild ;
+      update() ;
+      return true ;
+    }
+    else return false ;
+  }
+  else
+  {
+    bool isUpdate=false ;
+    for (int i = 0; i < child.size(); i++) isUpdate |= child[i]->removeDeletedNodes(assignLevel) ;
+    if (isUpdate) update() ;
+    return isUpdate ;
+  }
+}
+
+}
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/remap/src/node.hpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/remap/src/node.hpp	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/remap/src/node.hpp	(revision 1749)
@@ -0,0 +1,215 @@
+#ifndef __NODE_H__
+#define __NODE_H__
+
+#include <cassert>
+#include <list>
+#include <vector>
+#include <set>
+#include <map>
+#include <iostream>
+
+#include "triple.hpp"
+
+namespace sphereRemap {
+
+struct Circle
+{
+	Coord centre;
+	double radius;
+};
+
+const int MIN_NODE_SZ = 5;
+const int MAX_NODE_SZ = MIN_NODE_SZ*2; /* maximum number of elements per tree-node */
+const int TYPICAL_NODE_SZ = (2*MAX_NODE_SZ + MIN_NODE_SZ)/3;
+const double frac = 0.3;
+
+const int CLOSEST = 1;
+const int FARTHEST = -1;
+
+class CBasicTree;
+struct Node;
+
+
+//#ifdef DEBUG
+//enum alloc_stat { ALLOCATED, DELETED, BORROWED /* mostly means allocated as part of new[] or C++ container */ };
+//struct mem_info { int ref_cnt; enum alloc_stat stat; };
+////extern std::map<void*, struct mem_info> _mem_deb; // reference counter
+//std::map<void*, struct mem_info> _mem_deb; // reference counter
+//
+//// throughout the whole class, ignore NULL pointers
+//class NodePtr
+//{
+//private:
+//	Node* ptr;
+//
+//	void unlink();
+//
+//public:
+//	NodePtr() : ptr(NULL) {}
+//	NodePtr(Node* ptr) : ptr(ptr)
+//	{
+//		if (ptr)
+//		{
+//			// if ptr does not exist yet just add it, this is not the problem we want so solve here
+//			// if we do not do this, we run in troubles with pointers on targets allocated as part of array
+//			// start with 1 since we assume this target is always reachable through the array
+//			// (we do not want to fix array leaks here)
+//			if (_mem_deb.count(ptr) == 0)
+//			{
+//				_mem_deb[ptr].ref_cnt = 1;
+//				_mem_deb[ptr].stat = BORROWED;
+//			}
+////std::cerr << "cnstr ptr " << ptr << " cnt " << _mem_deb[ptr].ref_cnt << std::endl;
+//			_mem_deb[ptr].ref_cnt += 1;
+//		}
+//	}
+//	NodePtr(const NodePtr& other) : ptr(other.ptr)
+//	{
+////std::cerr << "copy " << ptr << " cnt " << _mem_deb[ptr].ref_cnt << std::endl;
+//		if (ptr) _mem_deb[ptr].ref_cnt += 1;
+//	}
+//	~NodePtr()
+//	{
+//		if (ptr and _mem_deb.count(ptr)) // if our target has been deleted, that's fine
+//		{
+//			// Target of ptr is not deleted. We want same behaviour as regular pointer here.
+////std::cerr << "destr ptr " << ptr << " cnt " << _mem_deb[ptr].ref_cnt << std::endl;
+//			unlink();
+//		}
+//	}
+//	NodePtr& operator=(const NodePtr& other)
+//	{
+//		if (ptr == other.ptr) return *this;
+//		if (ptr and _mem_deb.count(ptr)) // if our target has been deleted, that's fine
+//		{
+////std::cerr << "overr ptr " << ptr << " cnt " << _mem_deb[ptr].ref_cnt << std::endl;
+//			unlink();
+//		}
+//		ptr = other.ptr;
+//		if (ptr) _mem_deb[ptr].ref_cnt += 1;
+//		return *this;
+//	}
+//	Node& operator*() const
+//	{
+//		assert(ptr);
+//		return *ptr;
+//	}
+//	Node* operator->() const
+//	{
+//		assert(ptr);
+//		return ptr;
+//	}
+//	operator Node*() const
+//	{
+//		return ptr;
+//	}
+//};
+//
+//void memory_report();
+//
+//#else
+//typedef Node* NodePtr;
+//#endif
+
+typedef Node* NodePtr;
+
+struct Node
+{
+	int level; /* FIXME leafs are 0 and root is max level? */
+	int leafCount; /* number of leafs that are descendants of this node (the elements in it's cycle) */
+	Coord centre;
+	double radius;
+	NodePtr parent, ref;
+	std::vector<NodePtr> child;
+	std::list<NodePtr> intersectors;
+	bool reinserted;
+	int updateCount;  // double var;
+	CBasicTree* tree;
+	void *data;
+	int route;
+  bool toDelete ;
+
+	Node() : level(0), leafCount(1), centre(ORIGIN), radius(0), reinserted(false), updateCount(0), toDelete(false) {}
+	Node(const Coord& centre, double radius, void *data)
+		: level(0), leafCount(1), centre(centre), radius(radius), reinserted(false), updateCount(0), data(data), toDelete(false) {}
+
+//#ifdef DEBUG
+////	void *operator new[](size_t size)
+////	{
+////		void *new_array = ::new char[size];
+////std::cerr << "new vector " << new_array << " cnt " << std::endl;
+////		return new_array;
+////	}
+//	void *operator new(size_t size)
+//	{
+//		assert(size == sizeof(Node)); // also sanity? I found this on the internet, better save than sorry
+//		void *new_node = ::new char[size];
+//		assert(_mem_deb.count(new_node) == 0); // sanity that new is returned new pointer (should not happen even if code is broke)
+//		_mem_deb[new_node].ref_cnt = 0;
+//		_mem_deb[new_node].stat = ALLOCATED;
+////std::cerr << "new " << new_node << " cnt " << 0 << std::endl;
+//		return new_node;
+//	}
+//
+////	void operator delete[](void *ptr)
+////	{
+////		if (ptr)
+////		{
+////std::cerr << "delete vector " << ptr << " cnt " << _mem_deb_counter[ptr] << std::endl;
+////			_mem_deb.erase(ptr);
+////			::delete [] ptr;
+////		}
+////	}
+//
+//	void operator delete(void *ptr)
+//	{
+//		if (ptr)
+//		{
+//			assert(_mem_deb[ptr].ref_cnt); // if this fails it means Matthias is wrong (because he thinks it cannot fail)
+//			// IF THIS FAILS we handed an invalid pointer to delete (DOUBLE FREE, POINTER ON STL CONTAINER, etc)
+//			assert(_mem_deb[ptr].stat == ALLOCATED);
+////std::cerr << "delete " << ptr << " cnt " << _mem_deb[ptr].ref_cnt << std::endl;
+//			// if/since there are still references to this Node, we cannot delete the memory,
+//			// because otherwise it might get allocate it to a new Node and the reference will point to this node
+//			// so we mark that delete has been called and free the memory when the last reference disappears
+//			_mem_deb[ptr].stat = DELETED;
+//		}
+//	}
+//#endif
+
+	void move(const NodePtr node);
+	void remove(const NodePtr node);
+	void inflate(const NodePtr node);
+	void update();
+  void output(std::ostream& flux, int level, int color) ;
+	NodePtr closest(std::vector<NodePtr>& list, int n = CLOSEST);
+	NodePtr farthest(std::vector<NodePtr>& list);
+	void findClosest(int level, NodePtr src, double& minDist, NodePtr &closest);
+
+	void search(NodePtr node);
+	bool centreInside(Node &node);
+	bool intersects(NodePtr node);
+	bool isInside(Node &node);
+	int incluCheck();
+  void checkParent(void) ;
+	void printChildren();
+	void assignRoute(std::vector<int>::iterator& rank, int level);
+	void assignCircleAndPropagateUp(Coord *centres, double *radia, int level);
+	void printLevel(int level);
+	void routeNode(NodePtr node, int level);
+	void routingIntersecting(std::vector<Node>* routingList, NodePtr node);
+	void routeIntersection(std::vector<int>& routes, NodePtr node);
+  void getNodeLevel(int level,std::list<NodePtr>& NodeList) ;
+  bool removeDeletedNodes(int assignLevel) ;
+  void free_descendants();
+};
+
+bool transferNode(NodePtr thIs, NodePtr parent, NodePtr node);
+void findNeighbour(NodePtr thIs, NodePtr node, std::set<NodePtr>& neighbourList);
+NodePtr split(NodePtr);
+NodePtr reinsert(NodePtr);
+NodePtr insert(NodePtr, NodePtr);
+void slim2(NodePtr thIs, int level, int minNodeSize=MIN_NODE_SZ);
+
+}
+#endif
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/remap/src/parallel_tree.cpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/remap/src/parallel_tree.cpp	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/remap/src/parallel_tree.cpp	(revision 1749)
@@ -0,0 +1,518 @@
+#include <cassert>
+#include "node.hpp"
+#include "timerRemap.hpp"
+#include "circle.hpp"
+#include "meshutil.hpp"
+#include "polyg.hpp"
+#include "gridRemap.hpp"
+#include "intersect.hpp"
+#include "errhandle.hpp"
+#include "mpi_routing.hpp"
+#include "misc.hpp"
+
+#include "parallel_tree.hpp"
+
+namespace sphereRemap {
+
+static const int assignLevel = 2;
+
+// only the circle is packed, rest of node will be initialized on unpacking
+static void packNode(Node& node, char *buffer, int& index)
+{
+	if (buffer == NULL) // compute size only
+		index += 4 * sizeof(double);
+	else
+	{
+		*(Coord *)(&buffer[index]) = node.centre;
+		index += sizeof(Coord);
+
+		*(double *)(&buffer[index]) = node.radius;
+		index += sizeof(double);
+	}
+}
+
+static void unpackNode(Node& node, char *buffer, int& index)
+{
+	Coord centre;
+	double r;
+
+	centre = *(Coord *)(&buffer[index]);
+	index += sizeof(Coord);
+
+	r = *(double *)(&buffer[index]);
+	index += sizeof(double);
+
+	node.centre = centre;
+	node.radius = r;
+}
+
+
+static void packElement(Elt *ptElement, char *buffer, int& index)
+{
+	if (buffer == NULL) index += packedPolygonSize(*ptElement);
+	else packPolygon(*ptElement, buffer, index);
+}
+
+static void unpackElement(Elt *ptElement, char *buffer, int& index)
+{
+	unpackPolygon(*ptElement, buffer, index);
+}
+
+static void packVector(const vector<int>& vec, char *buf, int& pos)
+{
+	if (buf == NULL)
+		pos += sizeof(int) + vec.size()*sizeof(int);
+	else
+	{
+		*((int *) &(buf[pos])) = vec.size();
+		pos += sizeof(int);
+		for (int i = 0; i < vec.size(); i++)
+		{
+			*((int *) &(buf[pos])) = vec[i];
+			pos += sizeof(int);
+		}
+	}
+}
+
+static void unpackVector(vector<int>& vec, const char *buf, int& pos)
+{
+	vec.resize(*((int *) &(buf[pos])));
+	pos += sizeof(int);
+	for (int i = 0; i < vec.size(); i++)
+	{
+		vec[i] = *((int *) &(buf[pos]));
+		pos += sizeof(int);
+	}
+}
+
+static void assignRoute(CSampleTree& tree, const CCascadeLevel& cl)  // newroot <- root
+{
+	vector<int> routeRank(cl.group_size);
+	for (int i = 0; i < cl.group_size; i++)
+		routeRank[i] = i; //(cl.group_size + cl.polour() - i) % cl.group_size;
+	std::vector<int>::iterator rank = routeRank.begin();
+	tree.root->assignRoute(rank, assignLevel);
+}
+
+static void transferRoutedNodes(CMPIRouting& MPIRoute, /*const*/ vector<Node>& nodeSend, const vector<int>& route, vector<Node>& nodeRecv)
+{
+	/* `route` knows what goes where */
+	MPIRoute.init(route);
+	int nRecv = MPIRoute.getTotalSourceElement();
+	nodeRecv.resize(nRecv);
+	MPIRoute.transferToTarget(&nodeSend[0], &nodeRecv[0], packNode, unpackNode);
+}
+
+static void transferRoutedIntersections(CMPIRouting& MPIRoute, const vector<Node>& nodeSend, const vector<vector<int> >& route, vector<Node>& nodeRecv)
+{
+	// `route` knows what goes where
+	MPIRoute.init(route);
+	int nRecv = MPIRoute.getTotalSourceElement();
+	nodeRecv.resize(nRecv);
+	MPIRoute.transferToTarget((Node * /*mpi wants non-const*/) &nodeSend[0], &nodeRecv[0], packNode, unpackNode);
+//cout << MPIRoute.mpiRank << " ROUTE " << nRecv << ": " << nodeSend.size() << " " << nodeRecv.size() << "    ";
+}
+
+//CParallelTree::CParallelTree(MPI_Comm comm) : communicator(comm), cascade(MIN_NODE_SZ*MIN_NODE_SZ, comm)
+CParallelTree::CParallelTree(MPI_Comm comm) : communicator(comm), cascade(MAX_NODE_SZ*MAX_NODE_SZ*2, comm)
+{
+	treeCascade.reserve(cascade.num_levels);
+	for (int lev = 0; lev < cascade.num_levels; lev++)
+		treeCascade.push_back(CSampleTree(cascade.level[lev].group_size, assignLevel));
+}
+
+void CParallelTree::buildSampleTreeCascade(vector<Node>& sampleNodes /*route field will be modified*/, int level)
+{
+	buildSampleTree(treeCascade[level], sampleNodes, cascade.level[level]);
+	assignRoute(treeCascade[level] /*out*/, cascade.level[level] /*in*/);
+
+	if (level+1 < cascade.num_levels)
+	{
+		vector<int> route(sampleNodes.size());
+		treeCascade[level].routeNodes(route, sampleNodes, assignLevel);
+
+		vector<Node> routedNodes;
+		CMPIRouting mpiRoute(cascade.level[level].pg_comm);
+		transferRoutedNodes(mpiRoute, sampleNodes, route, routedNodes);
+		buildSampleTreeCascade(routedNodes, level+1);
+	}
+}
+
+void buildSampleTree(CSampleTree& tree, const vector<Node>& node, const CCascadeLevel& comm)
+/*
+	In the beginning all the sample elements are distributed
+	-> communicate to make available at each rank
+	   so that each rank can build the same sample tree
+*/
+{
+	int n = node.size(); // number of samples intially on this rank (local)
+
+	int blocSize = comm.group_size * ipow(MAX_NODE_SZ, assignLevel);
+
+	int nrecv; // global number of samples  THIS WILL BE THE NUMBER OF LEAFS IN THE SAMPLE TREE
+	MPI_Allreduce(&n, &nrecv, 1, MPI_INT, MPI_SUM, comm.comm); // => size of sample tree does not depend on keepNodes!
+	double ratio = blocSize / (1.0 * nrecv);
+	int nsend = ratio * n + 1; // nsend = n_local_samples / n_global_samples * blocksize + 1 = blocksize/comm.size
+	if (nsend > n) nsend = n;
+
+	int *counts = new int[comm.size];
+	MPI_Allgather(&nsend, 1, MPI_INT, counts, 1, MPI_INT, comm.comm);
+
+	nrecv = 0;
+	int *displs = new int[comm.size];
+	for (int i = 0; i < comm.size; i++)
+	{
+		displs[i] = 4 * nrecv;
+		nrecv += counts[i];
+		counts[i] = 4 * counts[i];
+	}
+
+	/* pack circles around sample elements */
+	double *sendBuffer = new double[nsend*4];
+	int index = 0;
+	vector<int> randomArray(n);
+	randomizeArray(randomArray);
+	for (int i = 0; i < nsend; i++)
+	{
+		const Node& no = node[randomArray[i]];
+		*((Coord *) (sendBuffer + index)) = no.centre;
+		index += sizeof(Coord)/sizeof(*sendBuffer);
+		sendBuffer[index++] = no.radius;
+	}
+
+	/* each process needs the sample elements from all processes */
+	double *recvBuffer = new double[nrecv*4];
+	MPI_Allgatherv(sendBuffer, 4 * nsend, MPI_DOUBLE, recvBuffer, counts, displs, MPI_DOUBLE, comm.comm);
+	delete[] sendBuffer;
+	delete[] counts;
+	delete[] displs;
+
+	/* unpack */
+/*
+	randomArray.resize(nrecv);
+	randomizeArray(randomArray);
+	tree.leafs.resize(nrecv);
+	index = 0;
+
+
+  for (int i = 0; i < nrecv; i++)
+	{
+		Coord x = *(Coord *)(&recvBuffer[index]);
+		index += sizeof(Coord)/sizeof(*recvBuffer);
+		double radius = recvBuffer[index++];
+		tree.leafs[randomArray[i]].centre = x;
+		tree.leafs[randomArray[i]].radius = radius;
+
+	}
+*/
+
+  randomArray.resize(blocSize);
+	randomizeArray(randomArray);
+	tree.leafs.resize(blocSize);
+	index = 0;
+  
+  size_t s=(sizeof(Coord)/sizeof(*recvBuffer)+1)*nrecv ;
+  
+  for (int i = 0; i < blocSize; i++)
+	{
+		Coord x = *(Coord *)(&recvBuffer[index%s]);
+		index += sizeof(Coord)/sizeof(*recvBuffer);
+		double radius = recvBuffer[index%s];
+    index++ ;
+		tree.leafs[randomArray[i]].centre = x;
+		tree.leafs[randomArray[i]].radius = radius;
+
+	}
+
+
+	delete [] recvBuffer;
+
+	CTimer::get("buildSampleTree(local)").resume();
+	tree.build(tree.leafs);
+//	cout << "SampleTree build : assign Level " << assignLevel << " nb Nodes : " << tree.levelSize[assignLevel] << endl;
+	CTimer::get("buildSampleTree(local)").suspend();
+	CTimer::get("buildSampleTree(local)").print();
+
+	/* End gracefully if sample tree could not be constructed with desired number of nodes on assignLevel */
+	int allok, ok = (tree.levelSize[assignLevel] == comm.group_size);
+	if (!ok)
+  {
+    cerr << comm.rank << ": PROBLEM: (node assign)" << tree.levelSize[assignLevel] << " != " << comm.group_size << " (keepNodes)" 
+         << "   node size : "<<node.size()<<"   bloc size : "<<blocSize<<"  total number of leaf : "<<tree.leafs.size()<<endl ;
+/*
+	MPI_Allreduce(&ok, &allok, 1, MPI_INT, MPI_PROD, communicator);
+	if (!allok) {
+		MPI_Finalize();
+		exit(1);
+	}
+*/
+    MPI_Abort(MPI_COMM_WORLD,-1) ;
+  }
+/*
+  cout<<"*******************************************"<<endl ;
+  cout<<"******* Sample Tree output        *********"<<endl ;
+  cout<<"*******************************************"<<endl ;
+  tree.output(cout,1) ;
+
+  cout<<"*******************************************"<<endl ;
+*/
+
+  assert(tree.root->incluCheck() == 0);
+}
+
+
+void CParallelTree::buildLocalTree(const vector<Node>& node, const vector<int>& route)
+{
+	CMPIRouting MPIRoute(communicator);
+	MPI_Barrier(communicator);
+	CTimer::get("buildLocalTree(initRoute)").resume();
+	MPIRoute.init(route);
+	CTimer::get("buildLocalTree(initRoute)").suspend();
+	CTimer::get("buildLocalTree(initRoute)").print();
+
+	nbLocalElements = MPIRoute.getTotalSourceElement();
+	localElements = new Elt[nbLocalElements];
+
+	vector<Elt*> ptElement(node.size());
+	for (int i = 0; i < node.size(); i++)
+		ptElement[i] = (Elt *) (node[i].data);
+
+	vector<Elt*> ptLocalElement(nbLocalElements);
+	for (int i = 0; i < nbLocalElements; i++)
+		ptLocalElement[i] = &localElements[i];
+
+	CTimer::get("buildLocalTree(transfer)").resume();
+	MPIRoute.transferToTarget(&ptElement[0], &ptLocalElement[0], packElement, unpackElement);
+	CTimer::get("buildLocalTree(transfer)").suspend();
+	CTimer::get("buildLocalTree(transfer)").print();
+
+	CTimer::get("buildLocalTree(local)").resume();
+
+	int mpiRank;
+	MPI_Comm_rank(communicator, &mpiRank);
+	localTree.leafs.reserve(nbLocalElements);
+	for (int i = 0; i < nbLocalElements; i++)
+	{
+		Elt& elt = localElements[i];
+		elt.id.ind = i;
+		elt.id.rank = mpiRank;
+		localTree.leafs.push_back(Node(elt.x, cptRadius(elt), &localElements[i]));
+	}
+	localTree.build(localTree.leafs);
+
+	cptAllEltsGeom(localElements, nbLocalElements, srcGrid.pole);
+	CTimer::get("buildLocalTree(local)").suspend();
+	CTimer::get("buildLocalTree(local)").print();
+}
+
+void CParallelTree::build(vector<Node>& node, vector<Node>& node2)
+{
+
+	int assignLevel = 2;
+	int nbSampleNodes = 2*ipow(MAX_NODE_SZ + 1, assignLevel);
+
+
+  long int nb1, nb2, nb, nbTot ;
+  nb1=node.size() ; nb2=node2.size() ;
+  nb=nb1+nb2 ;
+  MPI_Allreduce(&nb, &nbTot, 1, MPI_LONG, MPI_SUM, communicator) ;
+  int commSize ;
+  MPI_Comm_size(communicator,&commSize) ;
+  
+	// make multiple of two
+	nbSampleNodes /= 2;
+	nbSampleNodes *= 2;
+//  assert( nbTot > nbSampleNodes*commSize) ;
+    
+  int nbSampleNodes1 = nbSampleNodes * (nb1*commSize)/(1.*nbTot) ;
+  int nbSampleNodes2 = nbSampleNodes * (nb2*commSize)/(1.*nbTot) ;
+  
+
+//	assert(node.size() > nbSampleNodes);
+//	assert(node2.size() > nbSampleNodes);
+//	assert(node.size() + node2.size() > nbSampleNodes);
+	vector<Node> sampleNodes; sampleNodes.reserve(nbSampleNodes1+nbSampleNodes2);
+
+	vector<int> randomArray1(node.size());
+	randomizeArray(randomArray1);
+	vector<int> randomArray2(node2.size());
+	randomizeArray(randomArray2);
+
+/*	
+        int s1,s2 ;
+        
+        if (node.size()< nbSampleNodes/2)
+        { 
+          s1 = node.size() ;
+          s2 = nbSampleNodes-s1 ;
+        }
+        else if (node2.size()< nbSampleNodes/2)
+        {
+          s2 = node.size() ;
+          s1 = nbSampleNodes-s2 ;
+        }
+        else
+        {
+          s1=nbSampleNodes/2 ;
+          s2=nbSampleNodes/2 ;
+        }
+*/
+        for (int i = 0; i <nbSampleNodes1; i++) sampleNodes.push_back(Node(node[randomArray1[i%nb1]].centre,  node[randomArray1[i%nb1]].radius, NULL));
+        for (int i = 0; i <nbSampleNodes2; i++) sampleNodes.push_back(Node(node2[randomArray2[i%nb2]].centre, node2[randomArray2[i%nb2]].radius, NULL));
+
+/*          
+        for (int i = 0; i < nbSampleNodes/2; i++)
+	{
+          sampleNodes.push_back(Node(node[randomArray1[i]].centre,  node[randomArray1[i]].radius, NULL));
+	  sampleNodes.push_back(Node(node2[randomArray2[i]].centre, node2[randomArray2[i]].radius, NULL));
+	}
+*/
+	CTimer::get("buildParallelSampleTree").resume();
+	//sampleTree.buildParallelSampleTree(sampleNodes, cascade);
+	buildSampleTreeCascade(sampleNodes);
+	CTimer::get("buildParallelSampleTree").suspend();
+	CTimer::get("buildParallelSampleTree").print();
+
+	//route source mesh
+	CTimer::get("parallelRouteNode").resume();
+	vector<int> route(node.size());
+	routeNodes(route /*out*/, node);
+	CTimer::get("parallelRouteNode").suspend();
+	CTimer::get("parallelRouteNode").print();
+
+	CTimer::get("buildLocalTree").resume();
+	buildLocalTree(node, route);
+	CTimer::get("buildLocalTree").suspend();
+	CTimer::get("buildLocalTree").print();
+
+	CTimer::get("buildRouteTree").resume();
+	/* update circles of tree cascade so it can be used for routing */
+	updateCirclesForRouting(localTree.root->centre, localTree.root->radius);
+	CTimer::get("buildRouteTree").suspend();
+	CTimer::get("buildRouteTree").print();
+}
+
+void CParallelTree::routeNodes(vector<int>& route, vector<Node>& nodes /*route field used*/, int level)
+{
+	treeCascade[level].routeNodes(route /*assign*/, nodes, assignLevel);
+
+	if (level+1 < cascade.num_levels)
+	{
+		vector<Node> routedNodes;
+		CMPIRouting MPIRoute(cascade.level[level].pg_comm);
+		transferRoutedNodes(MPIRoute, nodes, route /*use*/, routedNodes);
+		vector<int> globalRank(routedNodes.size());
+		routeNodes(globalRank, routedNodes, level + 1);
+		MPIRoute.transferFromSource(&route[0] /*override*/, &globalRank[0]);
+	}
+	else
+	{
+		CMPIRouting MPIRoute(cascade.level[level].comm); // or use pg_comm, on last cascade level identical
+		MPIRoute.init(route);
+		int nbRecvNode = MPIRoute.getTotalSourceElement();
+		vector<int> globalRank(nbRecvNode);
+		for (int i = 0; i < globalRank.size(); i++)
+			globalRank[i] = cascade.level[0].rank;
+		MPIRoute.transferFromSource(&route[0] /*override*/, &globalRank[0]);
+	}
+}
+
+/* assume `to` to be empty vector at entry */
+void linearize(const vector<vector<int> >& from, vector<int>& to)
+{
+	int cnt = 0;
+	for (int i = 0; i < from.size(); ++i)
+		cnt += from[i].size();
+	to.resize(cnt);
+	vector<int>::iterator dest = to.begin();
+	for (int i = 0; i < from.size(); ++i)
+		dest = copy(from[i].begin(), from[i].end(), dest);
+}
+
+/* at entry `to` must already have it's final shape and only values are overriden */
+void delinearize(const vector<int>& from, vector<vector<int> >& to)
+{
+	vector<int>::const_iterator end, src = from.begin();
+	for (int i = 0; i < to.size(); ++i, src=end)
+		copy(src, end = src + to[i].size(), to[i].begin());
+}
+
+void CParallelTree::routeIntersections(vector<vector<int> >& routes, vector<Node>& nodes, int level)
+{
+	treeCascade[level].routeIntersections(routes /*assign*/, nodes);
+
+	if (level+1 < cascade.num_levels)
+	{
+		vector<Node> routedNodes;
+		CMPIRouting MPIRoute(cascade.level[level].pg_comm);
+
+		vector<int> flattenedRoutes1;
+		linearize(routes, flattenedRoutes1);
+		vector<Node> double_nodes(flattenedRoutes1.size());
+		int j = 0;
+		for (int i = 0; i < routes.size(); ++i)
+			for (int k = 0; k < routes[i].size(); ++k, ++j)
+				double_nodes[j] = nodes[i];
+		transferRoutedNodes(MPIRoute, double_nodes, flattenedRoutes1 /*use*/, routedNodes);
+		vector<vector<int> > globalRanks(routedNodes.size());
+		routeIntersections(globalRanks /*out*/, routedNodes /*in*/, level + 1);
+		vector<vector<int> > flattenedRoutes(flattenedRoutes1.size());
+		// transferFromSource expects sizes (nbSendNode=flattenedRoutes, nbRecvNode=routedNodes.size())
+		MPIRoute.transferFromSource(&flattenedRoutes[0], &globalRanks[0], packVector, unpackVector);
+		for (int i = 0, j = 0; i < routes.size(); ++i)
+		{
+			int old_size = routes[i].size();
+			routes[i].resize(0);
+			for (int k = 0; k < old_size; ++k, ++j)
+				for (int l = 0; l < flattenedRoutes[j].size(); ++l)
+					routes[i].push_back(flattenedRoutes[j][l]);
+		}
+		assert(j == flattenedRoutes1.size());
+
+	}
+	else
+	{
+		CMPIRouting MPIRoute(cascade.level[level].comm);
+		MPIRoute.init(routes);
+		int nbRecvNode = MPIRoute.getTotalSourceElement();
+		vector<int> globalRanks(nbRecvNode, cascade.level[0].rank);
+		vector<int> flattened_routes;
+		linearize(routes, flattened_routes);
+		MPIRoute.transferFromSource(&flattened_routes[0], &globalRanks[0]);
+		delinearize(flattened_routes, routes);
+	}
+	if (level!=level)
+	{
+		for (int i = 0; i < routes.size(); ++i)
+			for (int k = 0; k < routes[i].size(); ++k)
+				if (routes[i][k] == cascade.level[0].rank) routes[i].erase(routes[i].begin() + (k--));
+	}
+}
+
+void CParallelTree::updateCirclesForRouting(Coord rootCentre, double rootRadius, int level)
+{
+	if (level + 1 < cascade.num_levels) // children in the cascade have to update first
+	{
+		updateCirclesForRouting(rootCentre, rootRadius, level + 1);
+		rootCentre = treeCascade[level+1].root->centre;
+		rootRadius = treeCascade[level+1].root->radius;
+	}
+
+	// gather circles on this level of the cascade
+	int pg_size;
+	MPI_Comm_size(cascade.level[level].pg_comm, &pg_size);
+	vector<Coord> allRootCentres(pg_size);
+	vector<double> allRootRadia(pg_size);
+	MPI_Allgather(&rootCentre, 3, MPI_DOUBLE, &allRootCentres[0], 3, MPI_DOUBLE, cascade.level[level].pg_comm);
+	MPI_Allgather(&rootRadius, 1, MPI_DOUBLE, &allRootRadia[0],   1, MPI_DOUBLE, cascade.level[level].pg_comm);
+
+	// now allRootsRadia and allRootCentres must be inserted into second levels of us and propagated to root
+	treeCascade[level].root->assignCircleAndPropagateUp(&allRootCentres[0], &allRootRadia[0], assignLevel);
+}
+
+CParallelTree::~CParallelTree()
+{
+	delete [] localElements;
+}
+
+}
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/remap/src/parallel_tree.hpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/remap/src/parallel_tree.hpp	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/remap/src/parallel_tree.hpp	(revision 1749)
@@ -0,0 +1,43 @@
+#ifndef  __PARALLEL_TREE_HPP__
+#define  __PARALLEL_TREE_HPP__
+
+#include "tree.hpp" // for local tree and routing tree
+//#include "sample_tree.hpp"
+#include "mpi_cascade.hpp"
+#include "mpi.hpp"
+
+namespace sphereRemap {
+
+class CParallelTree
+{
+public:
+	CParallelTree(MPI_Comm comm);
+	~CParallelTree();
+
+	void build(vector<Node>& node, vector<Node>& node2);
+
+	void routeNodes(vector<int>& route, vector<Node>& nodes, int level = 0);
+	void routeIntersections(vector<vector<int> >& route, vector<Node>& nodes, int level = 0);
+
+	int nbLocalElements;
+	Elt* localElements;
+
+	CTree localTree;
+
+private:
+	void updateCirclesForRouting(Coord rootCentre, double rootRadius, int level = 0);
+	void buildSampleTreeCascade(vector<Node>& sampleNodes, int level = 0);
+	void buildLocalTree(const vector<Node>& node, const vector<int>& route);
+	void buildRouteTree();
+
+	//CSampleTree sampleTree;
+	vector<CSampleTree> treeCascade; // first for sample tree, then for routing tree
+	CMPICascade cascade;
+  MPI_Comm communicator ;
+
+};
+
+void buildSampleTree(CSampleTree& tree, const vector<Node>& node, const CCascadeLevel& comm);
+
+}
+#endif
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/remap/src/polyg.cpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/remap/src/polyg.cpp	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/remap/src/polyg.cpp	(revision 1749)
@@ -0,0 +1,350 @@
+/* utilities related to polygons */
+
+#include <cassert>
+#include <iostream>
+#include "elt.hpp"
+#include "errhandle.hpp"
+
+#include "polyg.hpp"
+
+namespace sphereRemap {
+
+using namespace std;
+
+/* given `N` `vertex`es, `N` `edge`s and `N` `d`s (d for small circles)
+   and `g` the barycentre,
+   this function reverses the order of arrays of `vertex`es, `edge`s and `d`s 
+   but only if it is required!
+  (because computing intersection area requires both polygons to have same orientation)
+*/
+void orient(int N, Coord *vertex, Coord *edge, double *d, const Coord &g)
+{
+  Coord ga = vertex[0] - g;
+  Coord gb = vertex[1] - g;
+  Coord vertical = crossprod(ga, gb);
+  if (N > 2 && scalarprod(g, vertical) < 0)  // (GAxGB).G
+  {
+    for (int i = 0; i < N/2; i++)
+      swap(vertex[i], vertex[N-1-i]);
+
+    for (int i = 0; i < (N-1)/2; i++)
+    {
+      swap(edge[N-2-i], edge[i]);
+      swap(d[i], d[N-2-i]);
+    }
+  }
+}
+
+
+void normals(Coord *x, int n, Coord *a)
+{
+  for (int i = 0; i<n; i++)
+    a[i] = crossprod(x[(i+1)%n], x[i]);
+}
+
+Coord barycentre(const Coord *x, int n)
+{
+  if (n == 0) return ORIGIN;
+  Coord bc = ORIGIN;
+  for (int i = 0; i < n; i++)
+    bc = bc + x[i];
+  /* both distances can be equal down to roundoff when norm(bc) < mashineepsilon 
+     which can occur when weighted with tiny area */
+
+  assert(squaredist(bc, proj(bc)) <= squaredist(bc, proj(bc * (-1.0))));
+  //if (squaredist(bc, proj(bc)) > squaredist(bc, proj(bc * (-1.0)))) return proj(bc * (-1.0));
+
+  return proj(bc);
+}
+
+/** computes the barycentre of the area which is the difference
+  of a side ABO of the spherical tetrahedron and of the straight tetrahedron */
+static Coord tetrah_side_diff_centre(Coord a, Coord b)
+{
+  Coord n = crossprod(a,b);
+        double sinc2 = n.x*n.x + n.y*n.y + n.z*n.z;
+  assert(sinc2 < 1.0 + EPS);
+
+        // exact: u = asin(sinc)/sinc - 1; asin(sinc) = geodesic length of arc ab
+  // approx:
+        // double u = sinc2/6. + (3./40.)*sinc2*sinc2;
+
+  // exact  
+  if (sinc2 > 1.0 - EPS) /* if round-off leads to sinc > 1 asin produces NaN */
+    return n * (M_PI_2 - 1);
+  double sinc = sqrt(sinc2);
+        double u = asin(sinc)/sinc - 1;
+
+        return n*u;
+}
+
+/* compute the barycentre as the negative sum of all the barycentres of sides of the tetrahedron */
+Coord gc_normalintegral(const Coord *x, int n)
+{
+  Coord m = barycentre(x, n);
+  Coord bc = crossprod(x[n-1]-m, x[0]-m) + tetrah_side_diff_centre(x[n-1], x[0]);
+  for (int i = 1; i < n; i++)
+    bc = bc + crossprod(x[i-1]-m, x[i]-m) + tetrah_side_diff_centre(x[i-1], x[i]);
+  return bc*0.5;
+}
+
+Coord exact_barycentre(const Coord *x, int n)
+{
+  if (n >= 3)
+  {
+    return  proj(gc_normalintegral(x, n));
+  }
+  else if (n == 0) return ORIGIN;
+  else if (n == 2) return midpoint(x[0], x[1]);
+  else if (n == 1) return x[0];
+}
+
+Coord sc_gc_moon_normalintegral(Coord a, Coord b, Coord pole)
+{
+  double hemisphere = (a.z > 0) ? 1: -1;
+
+  double lat = hemisphere * (M_PI_2 - acos(a.z));
+  double lon1 = atan2(a.y, a.x);
+  double lon2 = atan2(b.y, b.x);
+  double lon_diff = lon2 - lon1;
+
+  // wraparound at lon=-pi=pi
+  if (lon_diff < -M_PI) lon_diff += 2.0*M_PI;
+  else if (lon_diff > M_PI) lon_diff -= 2.0*M_PI;
+
+  // integral of the normal over the surface bound by great arcs a-pole and b-pole and small arc a-b 
+  Coord sc_normalintegral = Coord(0.5*(sin(lon2)-sin(lon1))*(M_PI_2 - lat - 0.5*sin(2.0*lat)),
+                                  0.5*(cos(lon1)-cos(lon2))*(M_PI_2 - lat - 0.5*sin(2.0*lat)),
+                                  hemisphere * lon_diff * 0.25 * (cos(2.0*lat) + 1.0));
+  Coord p = Coord(0,0,hemisphere); // TODO assumes north pole is (0,0,1)
+  Coord t[] = {a, b, p};
+  if (hemisphere < 0) swap(t[0], t[1]);
+  return (sc_normalintegral - gc_normalintegral(t, 3)) * hemisphere;
+}
+
+
+double triarea(const Coord& A, const Coord& B, const Coord& C)
+{
+  double a = ds(B, C);
+  double b = ds(C, A);
+  double c = ds(A, B);
+  double tmp ;
+
+  if (a<b) { tmp=a ; a=b ; b=tmp ; }
+  if (c > a) { tmp=a ; a=c ; c=b, b=tmp;  }
+  else if (c > b) { tmp=c ; c=b ; b=tmp ; }
+  
+  double s = 0.5 * (a + b + c);
+  double t = tan(0.25*(a+(b+c))) * tan(0.25*(c-(a-b))) * tan(0.25*( c + (a-b) )) * tan(0.25*( a + (b - c)));
+  if (t>0) return 4 * atan(sqrt(t));
+  else
+  {
+    std::cout<<"double triarea(const Coord& A, const Coord& B, const Coord& C) : t < 0 !!! t="<<t<<endl ;
+    return 0 ;
+  }
+}
+
+/** Computes area of two two-sided polygon
+   needs to have one small and one great circle, otherwise zero
+   (name origin: lun is moon in french)
+*/
+double alun(double b, double d)
+{
+  double a  = acos(d);
+  assert(b <= 2 * a);
+  double s  = a + 0.5 * b;
+  double t = tan(0.5 * s) * tan(0.5 * (s - a)) * tan(0.5 * (s - a)) * tan(0.5 * (s - b));
+  double r  = sqrt(1 - d*d);
+  double p  = 2 * asin(sin(0.5*b) / r);
+  return p*(1 - d) - 4*atan(sqrt(t));
+}
+
+/**
+  This function returns the area of a spherical element 
+that can be composed of great and small circle arcs.
+ The caller must ensure this function is not called when `alun` should be called instaed.
+  This function also sets `gg` to the barycentre of the element.
+  "air" stands for area and  "bar" for barycentre.
+*/
+double airbar(int N, const Coord *x, const Coord *c, double *d, const Coord& pole, Coord& gg)
+{
+  if (N < 3)
+    return 0; /* polygons with less then three vertices have zero area */
+  Coord t[3];
+  t[0] = barycentre(x, N);
+  Coord *g = new Coord[N];
+  double area = 0;
+  Coord gg_exact = gc_normalintegral(x, N);
+  for (int i = 0; i < N; i++)
+  {
+    /* for "spherical circle segment" sum triangular part and "small moon" and => account for small circle */
+    int ii = (i + 1) % N;
+    t[1] = x[i];
+    t[2] = x[ii];
+                double sc=scalarprod(crossprod(t[1] - t[0], t[2] - t[0]), t[0]) ;
+    assert(sc >= -1e-10); // Error: tri a l'env (wrong orientation)
+    double area_gc = triarea(t[0], t[1], t[2]);
+    double area_sc_gc_moon = 0;
+    if (d[i]) /* handle small circle case */
+    {
+      Coord m = midpoint(t[1], t[2]);
+      double mext = scalarprod(m, c[i]) - d[i];
+      char sgl = (mext > 0) ? -1 : 1;
+      area_sc_gc_moon = sgl * alun(arcdist(t[1], t[2]), fabs(scalarprod(t[1], pole)));
+      gg_exact = gg_exact + sc_gc_moon_normalintegral(t[1], t[2], pole);
+    }
+    area += area_gc + area_sc_gc_moon; /* for "spherical circle segment" sum triangular part (at) and "small moon" and => account for small circle */
+    g[i] = barycentre(t, 3) * (area_gc + area_sc_gc_moon);
+  }
+  gg = barycentre(g, N);
+  gg_exact = proj(gg_exact);
+  delete[] g;
+  gg = gg_exact;
+  return area;
+}
+
+double polygonarea(Coord *vertices, int N)
+{
+  assert(N >= 3);
+
+  /* compute polygon area as sum of triangles */
+  Coord centre = barycentre(vertices, N);
+  double area = 0;
+  for (int i = 0; i < N; i++)
+    area += triarea(centre, vertices[i], vertices[(i+1)%N]);
+  return area;
+}
+
+int packedPolygonSize(const Elt& e)
+{
+  return sizeof(e.id) + sizeof(e.src_id) + sizeof(e.x) + sizeof(e.val)  + sizeof(e.given_area)+
+         sizeof(e.n) + e.n*(sizeof(double)+sizeof(Coord));
+}
+
+void packPolygon(const Elt& e, char *buffer, int& pos) 
+{
+  *((GloId *) &(buffer[pos])) = e.id;
+  pos += sizeof(e.id);
+  *((GloId *) &(buffer[pos])) = e.src_id;
+  pos += sizeof(e.src_id);
+
+  *((Coord *) &(buffer[pos])) = e.x;
+  pos += sizeof(e.x);
+
+  *((double*) &(buffer[pos])) = e.val;
+  pos += sizeof(e.val);
+
+  *((double*) &(buffer[pos])) = e.given_area;
+  pos += sizeof(e.val);
+
+  *((int *) & (buffer[pos])) = e.n;
+  pos += sizeof(e.n);
+
+  for (int i = 0; i < e.n; i++)
+  {
+    *((double *) & (buffer[pos])) = e.d[i];
+    pos += sizeof(e.d[i]);
+
+    *((Coord *) &(buffer[pos])) = e.vertex[i];
+    pos += sizeof(e.vertex[i]);
+  } 
+
+}
+
+void unpackPolygon(Elt& e, const char *buffer, int& pos) 
+{
+  e.id = *((GloId *) &(buffer[pos]));
+  pos += sizeof(e.id);
+  e.src_id = *((GloId *) &(buffer[pos]));
+  pos += sizeof(e.src_id);
+
+  e.x = *((Coord *) & (buffer[pos]) );
+  pos += sizeof(e.x);
+
+  e.val = *((double *) & (buffer[pos]));
+  pos += sizeof(double);
+
+  e.given_area = *((double *) & (buffer[pos]));
+  pos += sizeof(double);
+
+  e.n = *((int *) & (buffer[pos]));
+  pos += sizeof(int);
+
+  for (int i = 0; i < e.n; i++)
+  {
+    e.d[i] = *((double *) & (buffer[pos]));
+    pos += sizeof(double);
+
+    e.vertex[i] = *((Coord *) & (buffer[pos]));
+    pos += sizeof(Coord);
+  }
+}
+
+int packIntersectionSize(const Elt& elt) 
+{
+  return elt.is.size() * (2*sizeof(int)+ sizeof(GloId) + 5*sizeof(double));
+}
+
+void packIntersection(const Elt& e, char* buffer,int& pos) 
+{
+  for (list<Polyg *>::const_iterator it = e.is.begin(); it != e.is.end(); ++it)
+  {
+    *((int *) &(buffer[0])) += 1;
+
+    *((int *) &(buffer[pos])) = e.id.ind;
+    pos += sizeof(int);
+
+    *((double *) &(buffer[pos])) = e.area;
+    pos += sizeof(double);
+
+
+    *((GloId *) &(buffer[pos])) = (*it)->id;
+    pos += sizeof(GloId);
+  
+    *((int *) &(buffer[pos])) = (*it)->n;
+    pos += sizeof(int);
+    *((double *) &(buffer[pos])) = (*it)->area;
+    pos += sizeof(double);
+
+    *((Coord *) &(buffer[pos])) = (*it)->x;
+    pos += sizeof(Coord);
+  }
+}
+
+void unpackIntersection(Elt* e, const char* buffer) 
+{
+  int ind;
+  int pos = 0;
+  
+  int n = *((int *) & (buffer[pos]));
+  pos += sizeof(int);
+  for (int i = 0; i < n; i++)
+  {
+    ind = *((int*) &(buffer[pos]));
+    pos+=sizeof(int);
+
+    Elt& elt= e[ind];
+
+    elt.area=*((double *) & (buffer[pos]));
+    pos += sizeof(double);
+
+
+    Polyg *polygon = new Polyg;
+
+    polygon->id =  *((GloId *) & (buffer[pos]));
+    pos += sizeof(GloId);
+
+    polygon->n =  *((int *) & (buffer[pos]));
+    pos += sizeof(int);
+
+    polygon->area =  *((double *) & (buffer[pos]));
+    pos += sizeof(double);
+
+    polygon->x = *((Coord *) & (buffer[pos]));
+    pos += sizeof(Coord);
+
+    elt.is.push_back(polygon);
+  }
+}
+
+}
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/remap/src/polyg.hpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/remap/src/polyg.hpp	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/remap/src/polyg.hpp	(revision 1749)
@@ -0,0 +1,27 @@
+#include "elt.hpp"
+
+namespace sphereRemap {
+
+
+Coord barycentre(const Coord *x, int n);
+
+void orient(int n, Coord *vertex, Coord *edge, double *d, const Coord &g);
+
+void normals(Coord *x, int n, Coord *a);
+
+double alun(double b, double d);
+
+double airbar(int N, const Coord *x, const Coord *c, double *d, const Coord &pole, Coord &gg);
+
+double polygonarea(Coord *x, int n);
+Coord exact_barycentre(const Coord *x, int n) ;
+
+int packedPolygonSize(const Elt& e);
+void packPolygon(const Elt& e, char *buffer, int& pos);
+void unpackPolygon(Elt& e, const char *buffer, int& pos);
+void packIntersection(const Elt& e, char *buffer, int& pos);
+void unpackIntersection(Elt *e, const char *buffer);
+int packIntersectionSize(const Elt& e);
+double triarea( const Coord& A, const Coord& B, const Coord& C) ;
+
+}
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/remap/src/timerRemap.cpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/remap/src/timerRemap.cpp	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/remap/src/timerRemap.cpp	(revision 1749)
@@ -0,0 +1,62 @@
+#include "timerRemap.hpp"
+#include "mpi.hpp"
+#include <string>
+#include <map>
+#include <iostream>
+
+namespace sphereRemap {
+
+using namespace std;
+
+map<string,CTimer*> CTimer::allTimer;
+
+CTimer::CTimer(const string& name_) : name(name_)
+{
+	reset();
+}
+
+double CTimer::getTime(void)
+{
+	return MPI_Wtime();
+}
+
+void CTimer::suspend(void)
+{
+	if (!suspended)
+		cumulatedTime+=getTime()-lastTime;
+	suspended=true;
+}
+
+void CTimer::resume(void)
+{
+	if (suspended)
+		lastTime=getTime();
+	suspended=false;
+}
+
+void CTimer::reset(void)
+{
+	cumulatedTime=0.;
+	suspended=true;
+}
+
+double CTimer::getCumulatedTime(void)
+{
+	return cumulatedTime;
+}
+
+void CTimer::print(void)
+{
+#ifdef TIMEIT
+	cout << " Time for "<<name<<" : "<<getCumulatedTime() <<"  s"<<endl;
+#endif
+}
+
+CTimer& CTimer::get(const string name)
+{
+	map<string,CTimer*>::iterator it;
+	it=allTimer.find(name);
+	if (it==allTimer.end()) it=allTimer.insert(pair<string,CTimer*>(name,new CTimer(name))).first;
+	return *(it->second);
+}
+}
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/remap/src/timerRemap.hpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/remap/src/timerRemap.hpp	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/remap/src/timerRemap.hpp	(revision 1749)
@@ -0,0 +1,36 @@
+#ifndef __TIMER_HPP__
+#define __TIMER_HPP__
+
+#include "mpi.hpp"
+#include <string>
+#include <map>
+
+namespace sphereRemap {
+
+  using namespace std;
+
+
+  class CTimer
+  {
+    public :
+
+    double cumulatedTime;
+    double lastTime;
+    bool suspended;
+    string name;
+
+    CTimer(const string& name);
+    void suspend(void);
+    void resume(void);
+    void reset(void);
+    double getCumulatedTime(void);
+    void print(void);
+    static map<string,CTimer*> allTimer;
+    static double getTime(void);
+    static CTimer& get(string name);
+  };
+
+
+
+}
+#endif
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/remap/src/tree.cpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/remap/src/tree.cpp	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/remap/src/tree.cpp	(revision 1749)
@@ -0,0 +1,275 @@
+#include <cassert>
+#include "tree.hpp"
+#include "node.hpp"
+#include "elt.hpp"
+#include <iostream>
+#include "mpi.hpp"
+#include <stdlib.h>     /* srand, rand */
+#include <time.h>       /* time */
+#include <vector>
+#include <list>
+#include <set>
+
+#include "timer.hpp"
+#include "mpi_routing.hpp"
+
+namespace sphereRemap {
+
+const int MAX_LEVEL_SIZE = 100;
+
+double cputime();
+using namespace std;
+
+/*
+CBasicTree::CBasicTree() : ri(0), levelSize(MAX_LEVEL_SIZE), root(NULL)
+{
+}
+*/
+
+void CBasicTree::routeNodes(vector<int>& route, vector<Node>& nodes, int assignLevel)
+{
+	for (int i = 0; i < nodes.size(); i++)
+	{
+		root->routeNode(&nodes[i], assignLevel);
+		route[i] = nodes[i].route;
+	}
+}
+
+void CBasicTree::routeIntersections(vector<vector<int> >& routes, vector<Node>& nodes)
+{
+	for (int i = 0; i < nodes.size(); i++)
+		root->routeIntersection(routes[i], &nodes[i]);
+}
+
+void CBasicTree::build(vector<Node>& nodes)
+{
+	newRoot(1);
+	insertNodes(nodes);
+}
+
+void CBasicTree::output(ostream& flux, int level)
+{
+	root->output(flux,level,0) ;
+}
+void CBasicTree::slim(int nbIts)
+{
+	for (int i = 0; i < nbIts; i++)
+	{
+		for (int level = root->level - 1; level > 0; level--)
+		{
+			slim2(root, level);
+			ri = 0;
+			emptyPool();
+		}
+
+		for (int level = 2; level < root->level; level++)
+		{
+			slim2(root, level);
+			ri = 0;
+			emptyPool();
+		}
+	}
+}
+
+
+
+void CBasicTree::insertNode(NodePtr node)
+{
+	node->tree = this;
+	increaseLevelSize(0);
+	push_back(node);
+
+	NodePtr q;
+	while (pool.size())
+	{
+		q = pool.front();
+		pool.pop_front();
+		q = insert(q, root);
+		if (ri)
+		{
+			delete q;
+			ri = 0;
+		}
+	}
+}
+
+void CBasicTree::emptyPool(void)
+{
+	while (pool.size())
+	{
+		NodePtr q = pool.front();
+		pool.pop_front();
+		q = insert(q, root);
+		if (ri)
+		{
+			delete q;
+			ri = 0;
+		}
+	}
+}
+
+void CBasicTree::push_back(NodePtr node)
+{
+#ifdef DEBUG
+	node->parent = NULL; // will be overridden later, but for mem leak check better trigger leak as soon as possible
+#endif
+	pool.push_back(node);
+}
+
+void CBasicTree::push_front(NodePtr node)
+{
+#ifdef DEBUG
+	node->parent = NULL; // will be overridden later, but for mem leak check better trigger leak as soon as possible
+#endif
+	pool.push_front(node);
+}
+
+void CBasicTree::increaseLevelSize(int level)
+{
+	levelSize[level]++;
+}
+
+void CBasicTree::decreaseLevelSize(int level)
+{
+	levelSize[level]--;
+}
+
+void CBasicTree::newRoot(int level)  // newroot <- root
+{
+	root = new Node;
+	// if (level > 1) cout << " newRoot level " << level << endl;
+	root->level = level;
+	root->parent = 0;
+	root->leafCount = 0;
+// initialize root node on the sphere
+  root->centre.x=1 ; root->centre.y=0 ; root->centre.z=0 ; 
+	root->radius = 0.;
+	root->reinserted = false;
+	root->updateCount = 0;
+	root->tree = this;
+	levelSize[level]++;
+}
+
+CBasicTree::~CBasicTree()
+{
+	//FIXME uncomment the next line and figure out why it segfault sometimes
+	//root->free_descendants(); // recursively deletes all nodes in the tree
+	if (root) delete root;
+}
+
+void CTree::insertNodes(vector<Node>& nodes)
+{
+	int stepSlim = MAX_NODE_SZ*MAX_NODE_SZ*2;
+	const double ratio = 1.5;
+	for (int i = 0; i < nodes.size(); i++)
+	{
+		insertNode(&nodes[i]);
+
+		if (root->leafCount > stepSlim) // time for slim down
+		{
+			slim();
+			stepSlim = stepSlim * ratio;
+		}
+	}
+}
+
+
+void CSampleTree::insertNodes(vector<Node>& nodes)
+{
+	bool first1 = true;
+	bool first2 = true;
+	int stepSlim = MAX_NODE_SZ * MAX_NODE_SZ * keepNodes / 4;
+//	double ratio = 1 + (0.5 * (1 - (keepNodes - 1) / (1.0 * keepNodes))) ;
+	double ratio = 1.5 ;
+  int i ;
+  
+//  cout<<"CSampleTree::insertNodes  : nb node to be inserted : "<<nodes.size()<<endl ;
+  for (i = 0; i < nodes.size(); i++)
+	{
+    insertNode(&nodes[i]);
+
+		if (root->leafCount > stepSlim && levelSize[assignLevel] < keepNodes-2) // time for slim down
+		{
+			slim();
+			stepSlim = stepSlim * ratio;
+		}
+
+    
+    if (levelSize[assignLevel] == keepNodes-2 && first1)
+		{
+      slim();
+			first1 = false;
+		}
+
+		if (levelSize[assignLevel] == keepNodes-1 && first2)
+		{
+      slim();
+      first2=false ;
+		}
+
+   	if (levelSize[assignLevel] >= keepNodes) slim();
+   	if (levelSize[assignLevel] > keepNodes) slim();
+    if (levelSize[assignLevel] > keepNodes) slimAssignedLevel() ;
+
+    if (levelSize[assignLevel] >= keepNodes) 
+		{
+      if (levelSize[assignLevel] > keepNodes)
+      {
+//        cout<<"assign Level : "<<assignLevel<< "     levelSize[assignLevel] :"<<levelSize[assignLevel]<<"   keepNodes : "<<keepNodes<<endl ;
+        removeExtraNode() ;
+      }
+      break ;
+ 		}
+	}
+//	cout << "SampleTree build : nb Node inserted : " << i << endl;
+
+}
+
+void CSampleTree::slimAssignedLevel()
+{
+  for(int i=MIN_NODE_SZ;i<=MAX_NODE_SZ;i++)
+  {
+    int levelSizeOrigin=levelSize[assignLevel] ;
+    slim2(root, assignLevel,i);
+    ri = 0;
+    int levelSizeBefore=levelSize[assignLevel] ;
+    isActiveOkSplit=true ;
+    emptyPool();
+//    cout<<"assign Level : "<<assignLevel<<"  MinNodeSize :"<<i<< "     levelSize[assignLevel] : "<<levelSizeOrigin<<"->"<<levelSizeBefore<<"->" <<levelSize[assignLevel]<<"   keepNodes : "<<keepNodes<<"  "<<"CanSplit " <<canSplit()<<endl ;
+    if (levelSize[assignLevel]<=keepNodes) break ;
+  }
+
+}
+
+void CSampleTree::removeExtraNode(void)
+{
+  std::list<NodePtr> nodeList ;
+  std::list<NodePtr>::iterator it1,it2, rm ;
+
+  root->getNodeLevel(assignLevel,nodeList) ;
+  double dist,minDist ;
+ 
+  
+  for (int n=0; n<levelSize[assignLevel]-keepNodes ; ++n)
+  {
+    minDist=-1 ;
+    for(it1=nodeList.begin();it1!=nodeList.end();++it1)
+    {
+      dist=0 ;
+      for(it2=nodeList.begin();it2!=nodeList.end();++it2) dist+=arcdist((*it1)->centre,(*it2)->centre) ;
+      if (minDist > dist || minDist < 0.)
+      {
+        minDist=dist ;
+        rm=it1 ;
+      }
+    }
+    (*rm)->toDelete=true ;
+    nodeList.erase(rm) ;
+    
+  }
+  root->removeDeletedNodes(assignLevel) ;
+  isActiveOkSplit=true ;
+  emptyPool();
+}
+
+}
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/remap/src/tree.hpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/remap/src/tree.hpp	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/remap/src/tree.hpp	(revision 1749)
@@ -0,0 +1,79 @@
+#ifndef  __TREE_HPP__
+#define __TREE_HPP__
+//#include <list>
+#include <deque>
+#include <vector>
+#include "elt.hpp"
+#include "node.hpp"
+
+namespace sphereRemap {
+
+using namespace std;
+extern const int MAX_LEVEL_SIZE ;
+
+class CBasicTree
+{
+public:
+
+	NodePtr root; /* The main tree is stored as Nodes which can be reached through traversal starting here */
+	NodePtr ref; // FIXME this reference, set by a node is odd, try to remove
+	int ri; /** this is set to one by a node in case of reinsertion */
+	vector<int> levelSize; /** e.g. levelSize[0] == leafs.size() */
+	vector<Node> leafs; /** leafs are stored in vector for easy access and rest of the tree nodes as separate allocations, only reachable through tree traversal */
+
+	CBasicTree() : ri(0), levelSize(MAX_LEVEL_SIZE), root(NULL), isAssignedLevel(false), okSplit(true), isActiveOkSplit(false) {} 
+	~CBasicTree(); 
+	void build(vector<Node>& nodes);
+	void slim(int nbIts = 1);
+	virtual void insertNodes(vector<Node>& node) = 0;
+
+	void routeNodes(vector<int>& route, vector<Node>& nodes, int assignLevel);
+	void routeIntersections(vector<vector<int> >& route, vector<Node>& nodes);
+
+	void push_back(NodePtr node);
+	void push_front(NodePtr node);
+	void increaseLevelSize(int level);
+	void decreaseLevelSize(int level);
+	void newRoot(int level);
+	void insertNode(NodePtr node);
+  void output(ostream& flux, int level) ;
+
+	int keepNodes;
+  bool isAssignedLevel ; 
+  int assignLevel;
+  bool isActiveOkSplit ;
+  bool canSplit(void)
+  {
+    if (isActiveOkSplit && levelSize[assignLevel] >= keepNodes ) okSplit=false ;
+    return okSplit ;
+  }    
+
+  
+private:
+	deque<NodePtr > pool;
+	
+  bool okSplit ;
+ 
+protected:
+  void emptyPool();
+  CBasicTree(int keepNodes_, int assignLevel_) : ri(0), levelSize(MAX_LEVEL_SIZE), root(NULL), keepNodes(keepNodes_), assignLevel(assignLevel_), isAssignedLevel(true), okSplit(true), isActiveOkSplit(false) {} 
+};
+
+class CTree : public CBasicTree
+{
+public:
+	void insertNodes(vector<Node>& nodes);
+};
+
+class CSampleTree : public CBasicTree
+{
+
+public:
+	CSampleTree(int keepNodes_, int assignLevel_) : CBasicTree(keepNodes_,assignLevel_) {}
+  void slimAssignedLevel() ;
+  void removeExtraNode(void) ;
+	void insertNodes(vector<Node>& nodes);
+};
+
+}
+#endif
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/remap/src/triple.cpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/remap/src/triple.cpp	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/remap/src/triple.cpp	(revision 1749)
@@ -0,0 +1,140 @@
+#include "triple.hpp"
+
+namespace sphereRemap {
+
+extern const Coord ORIGIN(0.0, 0.0, 0.0);
+
+std::ostream& operator<<(std::ostream& os, const Coord& c) {
+    return os << "(" << c.x << ", " << c.y << ", " << c.z << ")";
+}
+
+std::ostream& operator<<(std::ostream& os, const Vector& vec)
+{
+    return os << "(" << vec.u << ", " << vec.v << ", " << vec.w << ")";
+}
+
+double norm(const Coord &x)
+{
+	return sqrt(x.x*x.x + x.y*x.y + x.z*x.z);
+}
+
+Coord proj(const Coord &x)
+{
+	double n=norm(x);
+	return Coord(x.x/n, x.y/n, x.z/n);
+}
+
+double scalarprod(const Coord &a, const Coord &b)
+{
+	return a.x*b.x + a.y*b.y + a.z*b.z;
+}
+
+Coord crossprod(const Coord &a, const Coord &b)
+{
+	return Coord(a.y*b.z - a.z*b.y,
+	             a.z*b.x - a.x*b.z,
+	             a.x*b.y - a.y*b.x);
+}
+
+/* arc distance (along great circle) */
+double arcdist(const Coord &x, const Coord &y)
+{ // et angles aigus non orientes
+	double n = norm(crossprod(x, y));
+  if (n>1.) n=1. ;
+	double a = asin(n);
+	if (squaredist(x,y) > 2.0) a = M_PI - a;
+	return a;
+}
+
+/* alternate way to compute distance along great circle */
+double ds(const Coord &x, const Coord &y)
+{
+	return 2*asin(0.5*eucldist(x,y));
+}
+
+/* dp is both small circle distances */
+double dp(const Coord &x, const Coord &y, const Coord &pole)
+{
+	return 2*asin(0.5 * eucldist(x,y) / sin(ds(pole,x)));
+}
+
+//* angle between `p` and `q` */ 
+/*double angle(const Vector &p, const Vector &q)
+{
+	return acos(scalarprod(p, q));
+}*/
+
+void lonlat(const Coord &a, double &lon, double &lat)
+{
+	lon = atan2(a.y, a.x) * 180.0/M_PI;
+	lat = (M_PI_2 - acos(a.z)) * 180.0/M_PI;
+}
+
+Coord xyz(double lon, double lat)
+{
+	double phi   = M_PI/180.0*lon;
+	double theta = M_PI_2 - M_PI/180.0*lat;
+	return Coord(sin(theta)*cos(phi),
+	             sin(theta)*sin(phi),
+	             cos(theta));
+}
+
+/** computes the midpoint on spherical arc between a and b */
+Coord midpoint(const Coord &a, const Coord &b)
+{
+	return proj(a + b);
+}
+
+/** computes the midpoint on *small circle* between a and b */
+Coord midpointSC(const Coord& p, const Coord& q)
+{
+	double phi1 = atan2(p.y, p.x);
+	double phi2 = atan2(q.y, q.x);
+	if (phi1*phi2 < 0)
+		phi1 += (phi1 < phi2) ? 2*M_PI : -2*M_PI;
+	double theta = acos(p.z);
+	double phi   = 0.5*(phi1 + phi2);
+	return Coord(sin(theta)*cos(phi),
+	             sin(theta)*sin(phi),
+	             cos(theta));
+}
+
+/* rotates us by angle theta around u (r is rotatiion matrix) */
+void Coord::rot(const Coord &u, double theta)
+{
+	double x = this->x;
+	double y = this->y;
+	double z = this->z;
+
+	double ux2 = u.x*u.x, uy2 = u.y*u.y, uz2 = u.z*u.z;
+	double k = 1 - cos(theta);
+
+	double r00 = ux2      + (1-ux2)*cos(theta),  r01 = u.x*u.y*k - u.z*sin(theta),  r02 = u.x*u.z*k + u.y*sin(theta);
+	double r10 = u.x*u.y*k + u.z*sin(theta),  r11 = uy2      + (1-uy2)*cos(theta),  r12 = u.y*u.z*k - u.x*sin(theta);
+	double r20 = u.x*u.z*k - u.y*sin(theta),  r21 = u.y*u.z*k + u.x*sin(theta),  r22 = uz2 + (1-uz2)*cos(theta);
+
+	this->x = r00*x + r01*y + r02*z;
+	this->y = r10*x + r11*y + r12*z;
+	this->z = r20*x + r21*y + r22*z;
+}
+
+double angle(const Coord &a, const Coord &b, const Coord &pole)
+{ 
+	return scalarprod(crossprod(a, b), pole);
+}
+
+// return oriented vector angle in range [-pi..pi], pole must be orthogonal to a and b
+double vectAngle(const Coord &a, const Coord &b, const Coord &pole)
+{ 
+  double nab = 1./(norm(a)*norm(b)) ;
+  
+  Coord a_cross_b=crossprod(a, b)*nab ;
+  double sinVect ;
+  if (scalarprod(a_cross_b, pole) >= 0) sinVect=norm(a_cross_b) ;
+  else sinVect=-norm(a_cross_b) ;
+  double cosVect=scalarprod(a,b)*nab ;
+
+  return atan2(sinVect,cosVect) ;
+}
+
+}
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/remap/src/triple.hpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/remap/src/triple.hpp	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/remap/src/triple.hpp	(revision 1749)
@@ -0,0 +1,131 @@
+#ifndef  __TRIPLE_H__
+#define __TRIPLE_H__
+
+#include <cmath>
+#include <iostream>
+
+namespace sphereRemap {
+
+#define EPS 1e-15
+
+/* coordinate on sphere */
+class Coord
+{
+public:
+	Coord() : x(0), y(0), z(0) {};
+	Coord(double x, double y, double z) : x(x), y(y), z(z) {};
+
+	bool operator==(const Coord& rhs) const
+	{
+		return x == rhs.x && y == rhs.y && z == rhs.z;
+	}
+
+	void rot(const Coord &u, double theta);
+
+	double x, y, z;
+};
+
+class Vector
+{
+public:
+	Vector(double u = 0, double v = 0, double w = 0) : u(u), v(v), w(w) {};
+
+	/* vector from origin to point on sphere */
+	Vector(const Coord& to) : u(to.x), v(to.y), w(to.z) {};
+
+	Vector& operator+=(const Vector& rhs)
+	{
+		u += rhs.u;
+		v += rhs.v;
+		w += rhs.w;
+	}
+
+	double u, v, w;
+};
+
+extern const Coord ORIGIN;
+
+std::ostream& operator<<(std::ostream& os, const Coord& c);
+std::ostream& operator<<(std::ostream& os, const Vector& c);
+
+inline double lengthSquared(Vector& vec)
+{
+	return vec.u*vec.u + vec.v*vec.v + vec.w*vec.w;
+}
+	
+inline Coord operator+(const Coord &lhs, const Coord &rhs)
+{
+	return Coord(lhs.x + rhs.x, 
+	             lhs.y + rhs.y, 
+	             lhs.z + rhs.z);
+}
+
+inline Coord operator-(const Coord &lhs, const Coord &rhs)
+{
+	return Coord(lhs.x - rhs.x, 
+	             lhs.y - rhs.y, 
+	             lhs.z - rhs.z);
+}
+
+/** vector scalar multiplication */
+inline Coord operator*(const Coord &lhs, double rhs)
+{
+	return Coord(lhs.x * rhs, 
+	             lhs.y * rhs, 
+	             lhs.z * rhs);
+}
+
+inline double squaredist(const Coord &x, const Coord &y)
+{
+	return (y.x-x.x)*(y.x-x.x)
+	     + (y.y-x.y)*(y.y-x.y) 
+	     + (y.z-x.z)*(y.z-x.z);
+}
+
+inline double eucldist(const Coord &x, const Coord &y)
+{
+	return sqrt(squaredist(x, y));
+}
+
+
+double norm(const Coord &x);
+
+Coord proj(const Coord &x);
+
+double scalarprod(const Coord &a, const Coord &b);
+
+Coord crossprod(const Coord &a, const Coord &b);
+
+double arcdist(const Coord &x, const Coord &y);
+
+double ds(const Coord &x, const Coord &y);
+
+double dp(const Coord &x, const Coord &y, const Coord &pole);
+
+//double angle(const Vector&, const Vector&)
+
+void lonlat(const Coord &a, double &lon, double &lat);
+
+Coord xyz(double lon, double lat);
+
+/** Computes the midpoint on spherical arc between two points on the sphere */
+Coord midpoint(const Coord &a, const Coord &b);
+
+/** Computes the midpoint on *small circle* between two points on the sphere */
+Coord midpointSC(const Coord &a, const Coord &b);
+
+void rot(const Coord &u, const double th, Coord &x);
+
+void rotsg(const Coord &a, Coord &b, const Coord &c,
+           const Coord &d, Coord &x);
+
+double angle(const Coord &a, const Coord &b, const Coord &pole);
+
+// return oriented vector angle in range [-pi..pi], pole must be orthogonal to a and b
+double vectAngle(const Coord &a, const Coord &b, const Coord &pole) ;
+
+void print_Coord(Coord &p);
+
+}
+
+#endif
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/remap/test-main.cpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/remap/test-main.cpp	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/remap/test-main.cpp	(revision 1749)
@@ -0,0 +1,147 @@
+#include "mpi.hpp"
+#include <netcdf.h>
+#include "errhandle.hpp"
+#include "libmapper.hpp"
+#include "mapper.hpp"
+
+#include "node.hpp"
+
+using namespace sphereRemap ;
+
+int ncread(double *lon, double *lat, double* val, int nElt, const char* filename)
+{
+	int ncid, blonid, blatid, valid, neltid;
+	size_t nEltCheck;
+	exit_on_failure(nc_open(filename, NC_NOWRITE, &ncid), std::string("Cannot open netCDF file ") + filename);
+	exit_on_failure(nc_inq_dimid(ncid, "elt", &neltid), std::string("No dimension elt in file ") + filename);
+	nc_inq_dimlen(ncid, neltid, &nEltCheck);
+	exit_on_failure(nElt != nEltCheck, std::string("Array sizes do not match!"));
+
+	nc_inq_varid(ncid, "bounds_lon", &blonid);
+	nc_inq_varid(ncid, "bounds_lat", &blatid);
+	nc_inq_varid(ncid, "val", &valid);
+	nc_get_var_double(ncid, blonid, lon);
+	nc_get_var_double(ncid, blatid, lat);
+	nc_get_var_double(ncid, valid, val);
+	nc_close(ncid);
+}
+
+int ncwriteValue(double *val, const char* filename)
+{
+  int ncid, valid ;
+  nc_open(filename, NC_WRITE, &ncid);
+  nc_inq_varid(ncid, "val", &valid);
+  nc_put_var_double(ncid, valid, val);
+  nc_close(ncid);
+}
+  
+
+
+void compute_distribution(int nGlobalElts, int &start, int &nLocalElts)
+{
+	int mpiSize, mpiRank;
+	MPI_Comm_size(MPI_COMM_WORLD, &mpiSize);
+	MPI_Comm_rank(MPI_COMM_WORLD, &mpiRank);
+	start = 0;
+	nLocalElts = 0;
+	for (int i = 0; i <= mpiRank; i++)
+	{
+		start += nLocalElts;
+		nLocalElts = nGlobalElts/mpiSize;
+		if (i < nGlobalElts % mpiSize) nLocalElts++;
+	}
+}
+
+int main()
+{
+	int interpOrder = 2;
+/* low resolution */
+/*
+	char srcFile[] = "h14.nc";
+	char dstFile[] = "r180x90.nc";
+	double srcPole[] = {0, 0, 0};
+	double dstPole[] = {0, 0, 1};
+	int nSrcElt = 13661;
+	int nDstElt = 16200;
+*/
+/* high resolution */ 
+
+	char srcFile[] = "t740.nc";
+	char dstFile[] = "r1440x720.nc";
+	double srcPole[] = {0, 0, 0};
+	double dstPole[] = {0, 0, 1};
+	int nSrcElt = 741034;
+	int nDstElt = 1036800;
+
+	int nVert = 10;
+	int nSrcLocal, nDstLocal, startSrc, startDst;
+	int nWeight;
+  int mpi_rank, mpi_size ;
+
+	MPI_Init(NULL, NULL);
+  MPI_Comm_rank(MPI_COMM_WORLD, &mpi_rank) ;
+  MPI_Comm_size(MPI_COMM_WORLD, &mpi_size) ;
+
+	double *srcLon = (double *) malloc(nSrcElt*nVert*sizeof(double));	
+	double *srcLat = (double *) malloc(nSrcElt*nVert*sizeof(double));	
+	double *srcVal = (double *) malloc(nSrcElt*sizeof(double));	
+	double *dstLon = (double *) malloc(nDstElt*nVert*sizeof(double));	
+	double *dstLat = (double *) malloc(nDstElt*nVert*sizeof(double));	
+	double *dstVal = (double *) malloc(nDstElt*sizeof(double));
+	double *globalVal = (double *) malloc(nDstElt*sizeof(double));
+  
+	ncread(srcLon, srcLat, srcVal, nSrcElt, srcFile);
+	ncread(dstLon, dstLat, dstVal, nDstElt, dstFile);
+
+	compute_distribution(nSrcElt, startSrc, nSrcLocal);
+	compute_distribution(nDstElt, startDst, nDstLocal);
+
+
+
+  Mapper mapper(MPI_COMM_WORLD);
+  mapper.setVerbosity(PROGRESS) ;
+  mapper.setSourceMesh(srcLon + startSrc*nVert, srcLat + startSrc*nVert, nVert, nSrcLocal, srcPole ) ;
+  mapper.setTargetMesh(dstLon + startDst*nVert, dstLat + startDst*nVert, nVert, nDstLocal, dstPole ) ;
+
+  for(int i=0;i<nDstElt;i++) dstVal[i]=0 ;
+  mapper.setSourceValue(srcVal+ startSrc) ;
+  
+  
+  vector<double> timings = mapper.computeWeights(interpOrder);
+
+
+  for(int i=0;i<mapper.nWeights;i++)  dstVal[mapper.dstAddress[i]]=dstVal[mapper.dstAddress[i]]+mapper.remapMatrix[i]*srcVal[mapper.sourceWeightId[i]];
+
+/*
+	remap_get_num_weights(srcLon + startSrc*nVert, srcLat + startSrc*nVert, nVert, nSrcLocal, srcPole,
+	                      dstLon + startDst*nVert, dstLat + startDst*nVert, nVert, nDstLocal, dstPole,
+	                      interpOrder, &nWeight);
+
+	double *weights = (double *) malloc(nWeight*sizeof(double));	
+	int    *srcIdx  = (int *)    malloc(nWeight*sizeof(int));	
+	int    *srcRank = (int *)    malloc(nWeight*sizeof(int));	
+	int    *dstIdx  = (int *)    malloc(nWeight*sizeof(int));	
+
+	remap_get_weights(weights, srcIdx, dstIdx);
+
+	free(srcLon); free(srcLat);
+	free(dstLon); free(dstLat);
+	free(srcIdx); free(dstIdx);
+	free(srcRank);
+	free(weights);
+
+#ifdef DEBUG
+	memory_report();
+#endif
+*/
+  int* displs=new int[mpi_size] ;
+  int* recvCount=new int[mpi_size] ;
+  
+  MPI_Gather(&startDst,1,MPI_INT,displs,1,MPI_INT,0,MPI_COMM_WORLD) ;
+  MPI_Gather(&nDstLocal,1,MPI_INT,recvCount,1,MPI_INT,0,MPI_COMM_WORLD) ;
+  MPI_Gatherv(dstVal,nDstLocal,MPI_DOUBLE,globalVal,recvCount,displs,MPI_DOUBLE,0,MPI_COMM_WORLD) ;
+  if (mpi_rank==0)  ncwriteValue(globalVal, dstFile);
+  
+	MPI_Finalize();
+	return 0;
+}
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/src_netcdf4/attr.c
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/src_netcdf4/attr.c	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/src_netcdf4/attr.c	(revision 1749)
@@ -0,0 +1,1164 @@
+/* Do not edit this file. It is produced from the corresponding .m4 source */
+/*
+ *	Copyright 1996, University Corporation for Atmospheric Research
+ *      See netcdf/COPYRIGHT file for copying and redistribution conditions.
+ */
+/* $Id: attr.m4,v 2.39 2010/05/26 18:11:08 dmh Exp $ */
+
+#include "nc.h"
+#include "ncdispatch.h"
+#include "nc3dispatch.h"
+#include <stdlib.h>
+#include <string.h>
+#include <assert.h>
+#include "ncx.h"
+#include "fbits.h"
+#include "rnd.h"
+#include "utf8proc.h"
+
+
+/*
+ * Free attr
+ * Formerly
+NC_free_attr()
+ */
+void
+free_NC_attr(NC_attr *attrp)
+{
+
+	if(attrp == NULL)
+		return;
+	free_NC_string(attrp->name);
+	free(attrp);
+}
+
+
+/*
+ * How much space will 'nelems' of 'type' take in
+ *  external representation (as the values of an attribute)?
+ */
+static size_t
+ncx_len_NC_attrV(nc_type type, size_t nelems)
+{
+	switch(type) {
+	case NC_BYTE:
+	case NC_CHAR:
+		return ncx_len_char(nelems);
+	case NC_SHORT:
+		return ncx_len_short(nelems);
+	case NC_INT:
+		return ncx_len_int(nelems);
+	case NC_FLOAT:
+		return ncx_len_float(nelems);
+	case NC_DOUBLE:
+		return ncx_len_double(nelems);
+	default:
+	        assert("ncx_len_NC_attr bad type" == 0);
+	}
+	return 0;
+}
+
+
+NC_attr *
+new_x_NC_attr(
+	NC_string *strp,
+	nc_type type,
+	size_t nelems)
+{
+	NC_attr *attrp;
+	const size_t xsz = ncx_len_NC_attrV(type, nelems);
+	size_t sz = M_RNDUP(sizeof(NC_attr));
+
+	assert(!(xsz == 0 && nelems != 0));
+
+	sz += xsz;
+
+	attrp = (NC_attr *) malloc(sz);
+	if(attrp == NULL )
+		return NULL;
+
+	attrp->xsz = xsz;
+
+	attrp->name = strp;
+	attrp->type = type;
+	attrp->nelems = nelems;
+	if(xsz != 0)
+		attrp->xvalue = (char *)attrp + M_RNDUP(sizeof(NC_attr));
+	else
+		attrp->xvalue = NULL;
+
+	return(attrp);
+}
+
+
+/*
+ * Formerly
+NC_new_attr(name,type,count,value)
+ */
+static NC_attr *
+new_NC_attr(
+	const char *uname,
+	nc_type type,
+	size_t nelems)
+{
+	NC_string *strp;
+	NC_attr *attrp;
+
+	char *name = (char *)utf8proc_NFC((const unsigned char *)uname);
+	if(name == NULL)
+	    return NULL;
+	assert(name != NULL && *name != 0);
+
+	strp = new_NC_string(strlen(name), name);
+	free(name);
+	if(strp == NULL)
+		return NULL;
+	
+	attrp = new_x_NC_attr(strp, type, nelems);
+	if(attrp == NULL)
+	{
+		free_NC_string(strp);
+		return NULL;
+	}
+
+	return(attrp);
+}
+
+
+static NC_attr *
+dup_NC_attr(const NC_attr *rattrp)
+{
+	NC_attr *attrp = new_NC_attr(rattrp->name->cp,
+		 rattrp->type, rattrp->nelems);
+	if(attrp == NULL)
+		return NULL;
+	(void) memcpy(attrp->xvalue, rattrp->xvalue, rattrp->xsz);
+	return attrp;
+}
+
+/* attrarray */
+
+/*
+ * Free the stuff "in" (referred to by) an NC_attrarray.
+ * Leaves the array itself allocated.
+ */
+void
+free_NC_attrarrayV0(NC_attrarray *ncap)
+{
+	assert(ncap != NULL);
+
+	if(ncap->nelems == 0)
+		return;
+
+	assert(ncap->value != NULL);
+
+	{
+		NC_attr **app = ncap->value;
+		NC_attr *const *const end = &app[ncap->nelems];
+		for( /*NADA*/; app < end; app++)
+		{
+			free_NC_attr(*app);
+			*app = NULL;
+		}
+	}
+	ncap->nelems = 0;
+}
+
+
+/*
+ * Free NC_attrarray values.
+ * formerly
+NC_free_array()
+ */
+void
+free_NC_attrarrayV(NC_attrarray *ncap)
+{
+	assert(ncap != NULL);
+	
+	if(ncap->nalloc == 0)
+		return;
+
+	assert(ncap->value != NULL);
+
+	free_NC_attrarrayV0(ncap);
+
+	free(ncap->value);
+	ncap->value = NULL;
+	ncap->nalloc = 0;
+}
+
+
+int
+dup_NC_attrarrayV(NC_attrarray *ncap, const NC_attrarray *ref)
+{
+	int status = NC_NOERR;
+
+	assert(ref != NULL);
+	assert(ncap != NULL);
+
+	if(ref->nelems != 0)
+	{
+		const size_t sz = ref->nelems * sizeof(NC_attr *);
+		ncap->value = (NC_attr **) malloc(sz);
+		if(ncap->value == NULL)
+			return NC_ENOMEM;
+
+		(void) memset(ncap->value, 0, sz);
+		ncap->nalloc = ref->nelems;
+	}
+
+	ncap->nelems = 0;
+	{
+		NC_attr **app = ncap->value;
+		const NC_attr **drpp = (const NC_attr **)ref->value;
+		NC_attr *const *const end = &app[ref->nelems];
+		for( /*NADA*/; app < end; drpp++, app++, ncap->nelems++)
+		{
+			*app = dup_NC_attr(*drpp);
+			if(*app == NULL)
+			{
+				status = NC_ENOMEM;
+				break;
+			}
+		}
+	}
+
+	if(status != NC_NOERR)
+	{
+		free_NC_attrarrayV(ncap);
+		return status;
+	}
+
+	assert(ncap->nelems == ref->nelems);
+
+	return NC_NOERR;
+}
+
+
+/*
+ * Add a new handle on the end of an array of handles
+ * Formerly
+NC_incr_array(array, tail)
+ */
+static int
+incr_NC_attrarray(NC_attrarray *ncap, NC_attr *newelemp)
+{
+	NC_attr **vp;
+
+	assert(ncap != NULL);
+
+	if(ncap->nalloc == 0)
+	{
+		assert(ncap->nelems == 0);
+		vp = (NC_attr **) malloc(NC_ARRAY_GROWBY * sizeof(NC_attr *));
+		if(vp == NULL)
+			return NC_ENOMEM;
+
+		ncap->value = vp;
+		ncap->nalloc = NC_ARRAY_GROWBY;
+	}
+	else if(ncap->nelems +1 > ncap->nalloc)
+	{
+		vp = (NC_attr **) realloc(ncap->value,
+			(ncap->nalloc + NC_ARRAY_GROWBY) * sizeof(NC_attr *));
+		if(vp == NULL)
+			return NC_ENOMEM;
+	
+		ncap->value = vp;
+		ncap->nalloc += NC_ARRAY_GROWBY;
+	}
+
+	if(newelemp != NULL)
+	{
+		ncap->value[ncap->nelems] = newelemp;
+		ncap->nelems++;
+	}
+	return NC_NOERR;
+}
+
+
+NC_attr *
+elem_NC_attrarray(const NC_attrarray *ncap, size_t elem)
+{
+	assert(ncap != NULL);
+	/* cast needed for braindead systems with signed size_t */
+	if(ncap->nelems == 0 || (unsigned long) elem >= ncap->nelems)
+		return NULL;
+
+	assert(ncap->value != NULL);
+
+	return ncap->value[elem];
+}
+
+/* End attarray per se */
+
+/*
+ * Given ncp and varid, return ptr to array of attributes
+ *  else NULL on error
+ */
+static NC_attrarray *
+NC_attrarray0( NC *ncp, int varid)
+{
+	NC_attrarray *ap;
+
+	if(varid == NC_GLOBAL) /* Global attribute, attach to cdf */
+	{
+		ap = &ncp->attrs;
+	}
+	else if(varid >= 0 && (size_t) varid < ncp->vars.nelems)
+	{
+		NC_var **vpp;
+		vpp = (NC_var **)ncp->vars.value;
+		vpp += varid;
+		ap = &(*vpp)->attrs;
+	} else {
+		ap = NULL;
+	}
+	return(ap);
+}
+
+
+/*
+ * Step thru NC_ATTRIBUTE array, seeking match on name.
+ *  return match or NULL if Not Found or out of memory.
+ */
+NC_attr **
+NC_findattr(const NC_attrarray *ncap, const char *uname)
+{
+	NC_attr **attrpp;
+	size_t attrid;
+	size_t slen;
+	char *name;
+
+	assert(ncap != NULL);
+
+	if(ncap->nelems == 0)
+		return NULL;
+
+	attrpp = (NC_attr **) ncap->value;
+
+	/* normalized version of uname */
+	name = (char *)utf8proc_NFC((const unsigned char *)uname);
+	if(name == NULL)
+	    return NULL; /* TODO: need better way to indicate no memory */
+	slen = strlen(name);
+
+	for(attrid = 0; attrid < ncap->nelems; attrid++, attrpp++)
+	{
+		if(strlen((*attrpp)->name->cp) == slen &&
+			strncmp((*attrpp)->name->cp, name, slen) == 0)
+		{
+		        free(name);
+			return(attrpp); /* Normal return */
+		}
+	}
+	free(name);
+	return(NULL);
+}
+
+
+/*
+ * Look up by ncid, varid and name, return NULL if not found
+ */
+static int 
+NC_lookupattr(int ncid,
+	int varid,
+	const char *name, /* attribute name */
+	NC_attr **attrpp) /* modified on return */
+{
+	int status;
+	NC *ncp;
+	NC_attrarray *ncap;
+	NC_attr **tmp;
+
+	status = NC_check_id(ncid, &ncp);
+	if(status != NC_NOERR)
+		return status;
+
+	ncap = NC_attrarray0(ncp, varid);
+	if(ncap == NULL)
+		return NC_ENOTVAR;
+
+	tmp = NC_findattr(ncap, name);
+	if(tmp == NULL)
+		return NC_ENOTATT;
+
+	if(attrpp != NULL)
+		*attrpp = *tmp;
+
+	return ENOERR;
+}
+
+/* Public */
+
+int
+NC3_inq_attname(int ncid, int varid, int attnum, char *name)
+{
+	int status;
+	NC *ncp;
+	NC_attrarray *ncap;
+	NC_attr *attrp;
+
+	status = NC_check_id(ncid, &ncp);
+	if(status != NC_NOERR)
+		return status;
+
+	ncap = NC_attrarray0(ncp, varid);
+	if(ncap == NULL)
+		return NC_ENOTVAR;
+
+	attrp = elem_NC_attrarray(ncap, (size_t)attnum);
+	if(attrp == NULL)
+		return NC_ENOTATT;
+
+	(void) strncpy(name, attrp->name->cp, attrp->name->nchars);
+	name[attrp->name->nchars] = 0;
+
+	return NC_NOERR;
+}
+
+
+int 
+NC3_inq_attid(int ncid, int varid, const char *name, int *attnump)
+{
+	int status;
+	NC *ncp;
+	NC_attrarray *ncap;
+	NC_attr **attrpp;
+
+	status = NC_check_id(ncid, &ncp);
+	if(status != NC_NOERR)
+		return status;
+
+	ncap = NC_attrarray0(ncp, varid);
+	if(ncap == NULL)
+		return NC_ENOTVAR;
+	
+
+	attrpp = NC_findattr(ncap, name);
+	if(attrpp == NULL)
+		return NC_ENOTATT;
+
+	if(attnump != NULL)
+		*attnump = (int)(attrpp - ncap->value);
+
+	return NC_NOERR;
+}
+
+int
+NC3_inq_att(int ncid,
+	int varid,
+	const char *name, /* input, attribute name */
+	nc_type *datatypep,
+	size_t *lenp)
+{
+	int status;
+	NC_attr *attrp;
+
+	status = NC_lookupattr(ncid, varid, name, &attrp);
+	if(status != NC_NOERR)
+		return status;
+
+	if(datatypep != NULL)
+		*datatypep = attrp->type;
+	if(lenp != NULL)
+		*lenp = attrp->nelems;
+
+	return NC_NOERR;
+}
+
+
+int
+NC3_rename_att( int ncid, int varid, const char *name, const char *unewname)
+{
+	int status;
+	NC *ncp;
+	NC_attrarray *ncap;
+	NC_attr **tmp;
+	NC_attr *attrp;
+	NC_string *newStr, *old;
+	char *newname;  /* normalized version */
+
+			/* sortof inline clone of NC_lookupattr() */
+	status = NC_check_id(ncid, &ncp);
+	if(status != NC_NOERR)
+		return status;
+
+	if(NC_readonly(ncp))
+		return NC_EPERM;
+
+	ncap = NC_attrarray0(ncp, varid);
+	if(ncap == NULL)
+		return NC_ENOTVAR;
+
+	status = NC_check_name(unewname);
+	if(status != NC_NOERR)
+		return status;
+
+	tmp = NC_findattr(ncap, name);
+	if(tmp == NULL)
+		return NC_ENOTATT;
+	attrp = *tmp;
+			/* end inline clone NC_lookupattr() */
+
+	if(NC_findattr(ncap, unewname) != NULL)
+	{
+		/* name in use */
+		return NC_ENAMEINUSE;
+	}
+
+	old = attrp->name;
+	newname = (char *)utf8proc_NFC((const unsigned char *)unewname);
+	if(newname == NULL)
+	    return NC_EBADNAME;
+	if(NC_indef(ncp))
+	{
+		newStr = new_NC_string(strlen(newname), newname);
+		free(newname);
+		if( newStr == NULL)
+			return NC_ENOMEM;
+		attrp->name = newStr;
+		free_NC_string(old);
+		return NC_NOERR;
+	}
+	/* else */
+	status = set_NC_string(old, newname);
+	free(newname);
+	if( status != NC_NOERR)
+		return status;
+
+	set_NC_hdirty(ncp);
+
+	if(NC_doHsync(ncp))
+	{
+		status = NC_sync(ncp);
+		if(status != NC_NOERR)
+			return status;
+	}
+
+	return NC_NOERR;
+}
+
+int
+NC3_del_att(int ncid, int varid, const char *uname)
+{
+	int status;
+	NC *ncp;
+	NC_attrarray *ncap;
+	NC_attr **attrpp;
+	NC_attr *old = NULL;
+	int attrid;
+	size_t slen;
+
+	status = NC_check_id(ncid, &ncp);
+	if(status != NC_NOERR)
+		return status;
+
+	if(!NC_indef(ncp))
+		return NC_ENOTINDEFINE;
+
+	ncap = NC_attrarray0(ncp, varid);
+	if(ncap == NULL)
+		return NC_ENOTVAR;
+
+	{
+	char *name = (char *)utf8proc_NFC((const unsigned char *)uname);
+	if(name == NULL)
+	    return NC_ENOMEM;
+	
+			/* sortof inline NC_findattr() */
+	slen = strlen(name);
+
+	attrpp = (NC_attr **) ncap->value;
+	for(attrid = 0; (size_t) attrid < ncap->nelems; attrid++, attrpp++)
+	    {
+		if( slen == (*attrpp)->name->nchars &&
+			strncmp(name, (*attrpp)->name->cp, slen) == 0)
+		{
+			old = *attrpp;
+			break;
+		}
+	    }
+	free(name);
+	}
+	if( (size_t) attrid == ncap->nelems )
+		return NC_ENOTATT;
+			/* end inline NC_findattr() */
+
+	/* shuffle down */
+	for(attrid++; (size_t) attrid < ncap->nelems; attrid++)
+	{
+		*attrpp = *(attrpp + 1);
+		attrpp++;
+	}
+	*attrpp = NULL;
+	/* decrement count */
+	ncap->nelems--;
+
+	free_NC_attr(old);
+
+	return NC_NOERR;
+}
+
+
+static int
+ncx_pad_putn_Iuchar(void **xpp, size_t nelems, const uchar *tp, nc_type type)
+{
+	switch(type) {
+	case NC_CHAR:
+		return NC_ECHAR;
+	case NC_BYTE:
+		return ncx_pad_putn_schar_uchar(xpp, nelems, tp);
+	case NC_SHORT:
+		return ncx_pad_putn_short_uchar(xpp, nelems, tp);
+	case NC_INT:
+		return ncx_putn_int_uchar(xpp, nelems, tp);
+	case NC_FLOAT:
+		return ncx_putn_float_uchar(xpp, nelems, tp);
+	case NC_DOUBLE:
+		return ncx_putn_double_uchar(xpp, nelems, tp);
+	default:
+                assert("ncx_pad_putn_Iuchar invalid type" == 0);
+	}
+	return NC_EBADTYPE;
+}
+
+static int
+ncx_pad_getn_Iuchar(const void **xpp, size_t nelems, uchar *tp, nc_type type)
+{
+	switch(type) {
+	case NC_CHAR:
+		return NC_ECHAR;
+	case NC_BYTE:
+		return ncx_pad_getn_schar_uchar(xpp, nelems, tp);
+	case NC_SHORT:
+		return ncx_pad_getn_short_uchar(xpp, nelems, tp);
+	case NC_INT:
+		return ncx_getn_int_uchar(xpp, nelems, tp);
+	case NC_FLOAT:
+		return ncx_getn_float_uchar(xpp, nelems, tp);
+	case NC_DOUBLE:
+		return ncx_getn_double_uchar(xpp, nelems, tp);
+	default:
+	        assert("ncx_pad_getn_Iuchar invalid type" == 0);
+	}
+	return NC_EBADTYPE;
+}
+
+
+static int
+ncx_pad_putn_Ischar(void **xpp, size_t nelems, const schar *tp, nc_type type)
+{
+	switch(type) {
+	case NC_CHAR:
+		return NC_ECHAR;
+	case NC_BYTE:
+		return ncx_pad_putn_schar_schar(xpp, nelems, tp);
+	case NC_SHORT:
+		return ncx_pad_putn_short_schar(xpp, nelems, tp);
+	case NC_INT:
+		return ncx_putn_int_schar(xpp, nelems, tp);
+	case NC_FLOAT:
+		return ncx_putn_float_schar(xpp, nelems, tp);
+	case NC_DOUBLE:
+		return ncx_putn_double_schar(xpp, nelems, tp);
+	default:
+                assert("ncx_pad_putn_Ischar invalid type" == 0);
+	}
+	return NC_EBADTYPE;
+}
+
+static int
+ncx_pad_getn_Ischar(const void **xpp, size_t nelems, schar *tp, nc_type type)
+{
+	switch(type) {
+	case NC_CHAR:
+		return NC_ECHAR;
+	case NC_BYTE:
+		return ncx_pad_getn_schar_schar(xpp, nelems, tp);
+	case NC_SHORT:
+		return ncx_pad_getn_short_schar(xpp, nelems, tp);
+	case NC_INT:
+		return ncx_getn_int_schar(xpp, nelems, tp);
+	case NC_FLOAT:
+		return ncx_getn_float_schar(xpp, nelems, tp);
+	case NC_DOUBLE:
+		return ncx_getn_double_schar(xpp, nelems, tp);
+	default:
+	        assert("ncx_pad_getn_Ischar invalid type" == 0);
+	}
+	return NC_EBADTYPE;
+}
+
+
+static int
+ncx_pad_putn_Ishort(void **xpp, size_t nelems, const short *tp, nc_type type)
+{
+	switch(type) {
+	case NC_CHAR:
+		return NC_ECHAR;
+	case NC_BYTE:
+		return ncx_pad_putn_schar_short(xpp, nelems, tp);
+	case NC_SHORT:
+		return ncx_pad_putn_short_short(xpp, nelems, tp);
+	case NC_INT:
+		return ncx_putn_int_short(xpp, nelems, tp);
+	case NC_FLOAT:
+		return ncx_putn_float_short(xpp, nelems, tp);
+	case NC_DOUBLE:
+		return ncx_putn_double_short(xpp, nelems, tp);
+	default:
+                assert("ncx_pad_putn_Ishort invalid type" == 0);
+	}
+	return NC_EBADTYPE;
+}
+
+static int
+ncx_pad_getn_Ishort(const void **xpp, size_t nelems, short *tp, nc_type type)
+{
+	switch(type) {
+	case NC_CHAR:
+		return NC_ECHAR;
+	case NC_BYTE:
+		return ncx_pad_getn_schar_short(xpp, nelems, tp);
+	case NC_SHORT:
+		return ncx_pad_getn_short_short(xpp, nelems, tp);
+	case NC_INT:
+		return ncx_getn_int_short(xpp, nelems, tp);
+	case NC_FLOAT:
+		return ncx_getn_float_short(xpp, nelems, tp);
+	case NC_DOUBLE:
+		return ncx_getn_double_short(xpp, nelems, tp);
+	default:
+	        assert("ncx_pad_getn_Ishort invalid type" == 0);
+	}
+	return NC_EBADTYPE;
+}
+
+
+static int
+ncx_pad_putn_Iint(void **xpp, size_t nelems, const int *tp, nc_type type)
+{
+	switch(type) {
+	case NC_CHAR:
+		return NC_ECHAR;
+	case NC_BYTE:
+		return ncx_pad_putn_schar_int(xpp, nelems, tp);
+	case NC_SHORT:
+		return ncx_pad_putn_short_int(xpp, nelems, tp);
+	case NC_INT:
+		return ncx_putn_int_int(xpp, nelems, tp);
+	case NC_FLOAT:
+		return ncx_putn_float_int(xpp, nelems, tp);
+	case NC_DOUBLE:
+		return ncx_putn_double_int(xpp, nelems, tp);
+	default:
+                assert("ncx_pad_putn_Iint invalid type" == 0);
+	}
+	return NC_EBADTYPE;
+}
+
+static int
+ncx_pad_getn_Iint(const void **xpp, size_t nelems, int *tp, nc_type type)
+{
+	switch(type) {
+	case NC_CHAR:
+		return NC_ECHAR;
+	case NC_BYTE:
+		return ncx_pad_getn_schar_int(xpp, nelems, tp);
+	case NC_SHORT:
+		return ncx_pad_getn_short_int(xpp, nelems, tp);
+	case NC_INT:
+		return ncx_getn_int_int(xpp, nelems, tp);
+	case NC_FLOAT:
+		return ncx_getn_float_int(xpp, nelems, tp);
+	case NC_DOUBLE:
+		return ncx_getn_double_int(xpp, nelems, tp);
+	default:
+	        assert("ncx_pad_getn_Iint invalid type" == 0);
+	}
+	return NC_EBADTYPE;
+}
+
+
+static int
+ncx_pad_putn_Ifloat(void **xpp, size_t nelems, const float *tp, nc_type type)
+{
+	switch(type) {
+	case NC_CHAR:
+		return NC_ECHAR;
+	case NC_BYTE:
+		return ncx_pad_putn_schar_float(xpp, nelems, tp);
+	case NC_SHORT:
+		return ncx_pad_putn_short_float(xpp, nelems, tp);
+	case NC_INT:
+		return ncx_putn_int_float(xpp, nelems, tp);
+	case NC_FLOAT:
+		return ncx_putn_float_float(xpp, nelems, tp);
+	case NC_DOUBLE:
+		return ncx_putn_double_float(xpp, nelems, tp);
+	default:
+                assert("ncx_pad_putn_Ifloat invalid type" == 0);
+	}
+	return NC_EBADTYPE;
+}
+
+static int
+ncx_pad_getn_Ifloat(const void **xpp, size_t nelems, float *tp, nc_type type)
+{
+	switch(type) {
+	case NC_CHAR:
+		return NC_ECHAR;
+	case NC_BYTE:
+		return ncx_pad_getn_schar_float(xpp, nelems, tp);
+	case NC_SHORT:
+		return ncx_pad_getn_short_float(xpp, nelems, tp);
+	case NC_INT:
+		return ncx_getn_int_float(xpp, nelems, tp);
+	case NC_FLOAT:
+		return ncx_getn_float_float(xpp, nelems, tp);
+	case NC_DOUBLE:
+		return ncx_getn_double_float(xpp, nelems, tp);
+	default:
+	        assert("ncx_pad_getn_Ifloat invalid type" == 0);
+	}
+	return NC_EBADTYPE;
+}
+
+
+static int
+ncx_pad_putn_Idouble(void **xpp, size_t nelems, const double *tp, nc_type type)
+{
+	switch(type) {
+	case NC_CHAR:
+		return NC_ECHAR;
+	case NC_BYTE:
+		return ncx_pad_putn_schar_double(xpp, nelems, tp);
+	case NC_SHORT:
+		return ncx_pad_putn_short_double(xpp, nelems, tp);
+	case NC_INT:
+		return ncx_putn_int_double(xpp, nelems, tp);
+	case NC_FLOAT:
+		return ncx_putn_float_double(xpp, nelems, tp);
+	case NC_DOUBLE:
+		return ncx_putn_double_double(xpp, nelems, tp);
+	default:
+                assert("ncx_pad_putn_Idouble invalid type" == 0);
+	}
+	return NC_EBADTYPE;
+}
+
+static int
+ncx_pad_getn_Idouble(const void **xpp, size_t nelems, double *tp, nc_type type)
+{
+	switch(type) {
+	case NC_CHAR:
+		return NC_ECHAR;
+	case NC_BYTE:
+		return ncx_pad_getn_schar_double(xpp, nelems, tp);
+	case NC_SHORT:
+		return ncx_pad_getn_short_double(xpp, nelems, tp);
+	case NC_INT:
+		return ncx_getn_int_double(xpp, nelems, tp);
+	case NC_FLOAT:
+		return ncx_getn_float_double(xpp, nelems, tp);
+	case NC_DOUBLE:
+		return ncx_getn_double_double(xpp, nelems, tp);
+	default:
+	        assert("ncx_pad_getn_Idouble invalid type" == 0);
+	}
+	return NC_EBADTYPE;
+}
+
+
+#ifdef IGNORE
+static int
+ncx_pad_putn_Ilong(void **xpp, size_t nelems, const long *tp, nc_type type)
+{
+	switch(type) {
+	case NC_CHAR:
+		return NC_ECHAR;
+	case NC_BYTE:
+		return ncx_pad_putn_schar_long(xpp, nelems, tp);
+	case NC_SHORT:
+		return ncx_pad_putn_short_long(xpp, nelems, tp);
+	case NC_INT:
+		return ncx_putn_int_long(xpp, nelems, tp);
+	case NC_FLOAT:
+		return ncx_putn_float_long(xpp, nelems, tp);
+	case NC_DOUBLE:
+		return ncx_putn_double_long(xpp, nelems, tp);
+	default:
+                assert("ncx_pad_putn_Ilong invalid type" == 0);
+	}
+	return NC_EBADTYPE;
+}
+
+static int
+ncx_pad_getn_Ilong(const void **xpp, size_t nelems, long *tp, nc_type type)
+{
+	switch(type) {
+	case NC_CHAR:
+		return NC_ECHAR;
+	case NC_BYTE:
+		return ncx_pad_getn_schar_long(xpp, nelems, tp);
+	case NC_SHORT:
+		return ncx_pad_getn_short_long(xpp, nelems, tp);
+	case NC_INT:
+		return ncx_getn_int_long(xpp, nelems, tp);
+	case NC_FLOAT:
+		return ncx_getn_float_long(xpp, nelems, tp);
+	case NC_DOUBLE:
+		return ncx_getn_double_long(xpp, nelems, tp);
+	default:
+	        assert("ncx_pad_getn_Ilong invalid type" == 0);
+	}
+	return NC_EBADTYPE;
+}
+
+#endif
+
+static int
+ncx_pad_putn_Ilonglong(void **xpp, size_t nelems, const longlong *tp, nc_type type)
+{
+	switch(type) {
+	case NC_CHAR:
+		return NC_ECHAR;
+	case NC_BYTE:
+		return ncx_pad_putn_schar_longlong(xpp, nelems, tp);
+	case NC_SHORT:
+		return ncx_pad_putn_short_longlong(xpp, nelems, tp);
+	case NC_INT:
+		return ncx_putn_int_longlong(xpp, nelems, tp);
+	case NC_FLOAT:
+		return ncx_putn_float_longlong(xpp, nelems, tp);
+	case NC_DOUBLE:
+		return ncx_putn_double_longlong(xpp, nelems, tp);
+	default:
+                assert("ncx_pad_putn_Ilonglong invalid type" == 0);
+	}
+	return NC_EBADTYPE;
+}
+
+static int
+ncx_pad_getn_Ilonglong(const void **xpp, size_t nelems, longlong *tp, nc_type type)
+{
+	switch(type) {
+	case NC_CHAR:
+		return NC_ECHAR;
+	case NC_BYTE:
+		return ncx_pad_getn_schar_longlong(xpp, nelems, tp);
+	case NC_SHORT:
+		return ncx_pad_getn_short_longlong(xpp, nelems, tp);
+	case NC_INT:
+		return ncx_getn_int_longlong(xpp, nelems, tp);
+	case NC_FLOAT:
+		return ncx_getn_float_longlong(xpp, nelems, tp);
+	case NC_DOUBLE:
+		return ncx_getn_double_longlong(xpp, nelems, tp);
+	default:
+	        assert("ncx_pad_getn_Ilonglong invalid type" == 0);
+	}
+	return NC_EBADTYPE;
+}
+
+
+
+/* Common dispatcher for put cases */
+static int
+dispatchput(void **xpp, size_t nelems, const void* tp,
+	    nc_type atype, nc_type memtype)
+{
+    switch (memtype) {
+    case NC_CHAR:
+        return ncx_pad_putn_text(xpp,nelems, (char *)tp);
+    case NC_BYTE:
+        return ncx_pad_putn_Ischar(xpp, nelems, (schar*)tp, atype);
+    case NC_SHORT:
+        return ncx_pad_putn_Ishort(xpp, nelems, (short*)tp, atype);
+    case NC_INT:
+          return ncx_pad_putn_Iint(xpp, nelems, (int*)tp, atype);
+    case NC_FLOAT:
+        return ncx_pad_putn_Ifloat(xpp, nelems, (float*)tp, atype);
+    case NC_DOUBLE:
+        return ncx_pad_putn_Idouble(xpp, nelems, (double*)tp, atype);
+    case NC_UBYTE: /*Synthetic*/
+        return ncx_pad_putn_Iuchar(xpp,nelems, (uchar *)tp, atype);
+    case NC_INT64:
+          return ncx_pad_putn_Ilonglong(xpp, nelems, (longlong*)tp, atype);
+    case NC_NAT:
+        return NC_EBADTYPE;
+    default:
+        break;
+    }
+    return NC_EBADTYPE;
+}
+
+int
+NC3_put_att(
+	int ncid,
+	int varid,
+	const char *name,
+	nc_type type,
+	size_t nelems,
+	const void *value,
+	nc_type memtype)
+{
+    int status;
+    NC *ncp;
+    NC_attrarray *ncap;
+    NC_attr **attrpp;
+    NC_attr *old = NULL;
+    NC_attr *attrp;
+
+    status = NC_check_id(ncid, &ncp);
+    if(status != NC_NOERR)
+	return status;
+
+    if(NC_readonly(ncp))
+	return NC_EPERM;
+
+    ncap = NC_attrarray0(ncp, varid);
+    if(ncap == NULL)
+	return NC_ENOTVAR;
+
+    status = nc_cktype(type);
+    if(status != NC_NOERR)
+	return status;
+
+    if(memtype == NC_NAT) memtype = type;
+
+    if(memtype != NC_CHAR && type == NC_CHAR)
+	return NC_ECHAR;
+    if(memtype == NC_CHAR && type != NC_CHAR)
+	return NC_ECHAR;
+
+    /* cast needed for braindead systems with signed size_t */
+    if((unsigned long) nelems > X_INT_MAX) /* backward compat */
+	return NC_EINVAL; /* Invalid nelems */
+
+    if(nelems != 0 && value == NULL)
+	return NC_EINVAL; /* Null arg */
+
+    attrpp = NC_findattr(ncap, name);
+
+    /* 4 cases: exists X indef */
+
+    if(attrpp != NULL) { /* name in use */
+        if(!NC_indef(ncp)) {
+	    const size_t xsz = ncx_len_NC_attrV(type, nelems);
+            attrp = *attrpp; /* convenience */
+    
+	    if(xsz > attrp->xsz) return NC_ENOTINDEFINE;
+	    /* else, we can reuse existing without redef */
+                    
+	    attrp->xsz = xsz;
+            attrp->type = type;
+            attrp->nelems = nelems;
+
+            if(nelems != 0) {
+                void *xp = attrp->xvalue;
+                status = dispatchput(&xp, nelems, (const void*)value, type, memtype);
+            }
+                       
+            set_NC_hdirty(ncp);
+
+            if(NC_doHsync(ncp)) {
+	        const int lstatus = NC_sync(ncp);
+                /*
+                 * N.B.: potentially overrides NC_ERANGE
+                 * set by ncx_pad_putn_I$1
+                 */
+                if(lstatus != ENOERR) return lstatus;
+            }
+
+            return status;
+        }
+        /* else, redefine using existing array slot */
+        old = *attrpp;
+    } else {
+        if(!NC_indef(ncp)) return NC_ENOTINDEFINE;
+
+        if(ncap->nelems >= NC_MAX_ATTRS) return NC_EMAXATTS;
+    }
+
+    status = NC_check_name(name);
+    if(status != NC_NOERR) return status;
+
+    attrp = new_NC_attr(name, type, nelems);
+    if(attrp == NULL) return NC_ENOMEM;
+
+    if(nelems != 0) {
+        void *xp = attrp->xvalue;
+        status = dispatchput(&xp, nelems, (const void*)value, type, memtype);
+    }
+
+    if(attrpp != NULL) {
+        assert(old != NULL);
+        *attrpp = attrp;
+        free_NC_attr(old);
+    } else {
+        const int lstatus = incr_NC_attrarray(ncap, attrp);
+        /*
+         * N.B.: potentially overrides NC_ERANGE
+         * set by ncx_pad_putn_I$1
+         */
+        if(lstatus != NC_NOERR) {
+           free_NC_attr(attrp);
+           return lstatus;
+        }
+    }
+    return status;
+}
+
+int
+NC3_get_att(
+	int ncid,
+	int varid,
+	const char *name,
+	void *value,
+	nc_type memtype)
+{
+    int status;
+    NC_attr *attrp;
+    const void *xp;
+
+    status = NC_lookupattr(ncid, varid, name, &attrp);
+    if(status != NC_NOERR) return status;
+
+    if(attrp->nelems == 0) return NC_NOERR;
+
+    if(memtype == NC_NAT) memtype = attrp->type;
+
+    if(memtype != NC_CHAR && attrp->type == NC_CHAR)
+	return NC_ECHAR;
+    if(memtype == NC_CHAR && attrp->type != NC_CHAR)
+	return NC_ECHAR;
+
+    xp = attrp->xvalue;
+    switch (memtype) {
+    case NC_CHAR:
+        return ncx_pad_getn_text(&xp, attrp->nelems , (char *)value);
+    case NC_BYTE:
+        return ncx_pad_getn_Ischar(&xp,attrp->nelems,(schar*)value,attrp->type);
+    case NC_SHORT:
+        return ncx_pad_getn_Ishort(&xp,attrp->nelems,(short*)value,attrp->type);
+    case NC_INT:
+          return ncx_pad_getn_Iint(&xp,attrp->nelems,(int*)value,attrp->type);
+    case NC_FLOAT:
+        return ncx_pad_getn_Ifloat(&xp,attrp->nelems,(float*)value,attrp->type);
+    case NC_DOUBLE:
+        return ncx_pad_getn_Idouble(&xp,attrp->nelems,(double*)value,attrp->type);
+    case NC_INT64:
+          return ncx_pad_getn_Ilonglong(&xp,attrp->nelems,(longlong*)value,attrp->type);
+    case NC_UBYTE: /* Synthetic */
+        return ncx_pad_getn_Iuchar(&xp, attrp->nelems , (uchar *)value, attrp->type);
+    case NC_NAT:
+        return NC_EBADTYPE;
+    default:
+        break;
+    }
+    status =  NC_EBADTYPE;
+    return status;
+}
+
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/src_netcdf4/cache.c
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/src_netcdf4/cache.c	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/src_netcdf4/cache.c	(revision 1749)
@@ -0,0 +1,369 @@
+/*********************************************************************
+ *   Copyright 1993, UCAR/Unidata
+ *   See netcdf/COPYRIGHT file for copying and redistribution conditions.
+ *   $Header$
+ *********************************************************************/
+#include "ncdap3.h"
+#include "dapodom.h"
+#include "dapdump.h"
+
+static int iscacheableconstraint(DCEconstraint* con);
+
+/* Return 1 if we can reuse cached data to address
+   the current get_vara request; return 0 otherwise.
+   Target is in the constrained tree space.
+   Currently, if the target matches a cache that is not
+   a whole variable, then match is false.
+*/
+int
+iscached(NCDAPCOMMON* nccomm, CDFnode* target, NCcachenode** cachenodep)
+{
+    int i,j,found,index;
+    NCcache* cache;
+    NCcachenode* cachenode;
+
+    found = 0;
+    if(target == NULL) goto done;
+
+    /* Match the target variable against the prefetch, if any */
+    /* Note that prefetches are always whole variable */
+    cache = nccomm->cdf.cache;
+    cachenode = cache->prefetch;
+    if(cachenode!= NULL) {
+        for(found=0,i=0;i<nclistlength(cachenode->vars);i++) {
+            CDFnode* var = (CDFnode*)nclistget(cachenode->vars,i);
+	    if(var == target) {
+                if(cachenodep) *cachenodep = cachenode;
+		found=1;
+		goto done;
+	    }
+	}
+    }
+
+    /*search other cache nodes starting at latest first */
+    index = 0;
+    for(i=nclistlength(cache->nodes)-1;i>=0;i--) {
+        cachenode = (NCcachenode*)nclistget(cache->nodes,i);
+	/* We currently do not try to match constraints;
+           If the cachenode is constrained by more than
+           simple wholevariable projections, then skip it.
+        */
+	if(!cachenode->wholevariable) continue;
+        for(found=0,j=0;j<nclistlength(cachenode->vars);j++) {
+            CDFnode* var = (CDFnode*)nclistget(cachenode->vars,j);
+            if(var == target) {found=1;index=i;break;}
+	}
+	if(found) break;
+    }
+
+    if(found) {
+        ASSERT((cachenode != NULL));
+        if(nclistlength(cache->nodes) > 1) {
+	    /* Manage the cache nodes as LRU */
+	    nclistremove(cache->nodes,index);
+	    nclistpush(cache->nodes,(ncelem)cachenode);
+	}
+        if(cachenodep) *cachenodep = cachenode;
+    }
+
+done:
+#ifdef DEBUG
+fprintf(stderr,"iscached: search: %s\n",makecdfpathstring3(target,"."));
+if(found)
+   fprintf(stderr,"iscached: found: %s\n",dumpcachenode(cachenode));
+else
+   fprintf(stderr,"iscached: notfound\n");
+#endif
+    return found;
+}
+
+/* Compute the set of prefetched data.
+   Notes:
+   1. Even if caching is off, we will
+       still prefetch the small variables.
+   2. All prefetches are whole variable fetches.
+   3. If the data set is unconstrainable, we
+      will prefetch the whole thing
+*/
+NCerror
+prefetchdata3(NCDAPCOMMON* nccomm)
+{
+    int i,j;
+    NCerror ncstat = NC_NOERR;
+    NClist* allvars = nccomm->cdf.varnodes;
+    DCEconstraint* urlconstraint = nccomm->oc.dapconstraint;
+    NClist* vars = nclistnew();
+    NCcachenode* cache = NULL;
+    DCEconstraint* newconstraint = NULL;
+    int isnc4 = FLAGSET(nccomm->controls,NCF_NC4);
+
+
+    if(FLAGSET(nccomm->controls,NCF_UNCONSTRAINABLE)) {
+        /* If we cannot constrain and caching is enabled,
+           then pull in everything */
+        if(FLAGSET(nccomm->controls,NCF_CACHE)) {
+	    for(i=0;i<nclistlength(allvars);i++) {
+	        nclistpush(vars,nclistget(allvars,i));
+	    }
+	} else { /* do no prefetching */
+    	    nccomm->cdf.cache->prefetch = NULL;
+	    goto done;
+	}
+    } else { /* can do constraints */
+	/* pull in those variables of sufficiently small size */
+        for(i=0;i<nclistlength(allvars);i++) {
+            CDFnode* var = (CDFnode*)nclistget(allvars,i);
+            size_t nelems = 1;
+
+            if(!isnc4) {
+	        /* If netcdf 3 and var is a sequence or under a sequence, then never prefetch */
+	        if(var->nctype == NC_Sequence || dapinsequence(var)) continue;
+	    }
+
+            /* Compute the # of elements in the variable */
+            for(j=0;j<nclistlength(var->array.dimset0);j++) {
+                CDFnode* dim = (CDFnode*)nclistget(var->array.dimset0,j);
+                nelems *= dim->dim.declsize;
+	    }
+if(SHOWFETCH) {
+nclog(NCLOGDBG,"prefetch: %s=%lu",var->ncfullname,(unsigned long)nelems);
+}
+	    if(nelems <= nccomm->cdf.smallsizelimit) {
+	        nclistpush(vars,(ncelem)var);
+if(SHOWFETCH) {
+nclog(NCLOGDBG,"prefetch: %s",var->ncfullname);
+}
+	    }
+	}
+    }
+
+    /* If there are no vars, then do nothing */
+    if(nclistlength(vars) == 0) {
+	nccomm->cdf.cache->prefetch = NULL;
+	goto done;
+    }
+
+    /* Create a single constraint consisting of the projections for the variables;
+       each projection is whole variable. The selections are passed on as is.
+    */
+
+    newconstraint = (DCEconstraint*)dcecreate(CES_CONSTRAINT);
+    newconstraint->projections = nclistnew();
+    newconstraint->selections = dceclonelist(urlconstraint->selections);
+
+    for(i=0;i<nclistlength(vars);i++) {
+	CDFnode* var = (CDFnode*)nclistget(vars,i);
+	DCEprojection* varprojection;
+	/* convert var to a projection */
+	ncstat = dapvar2projection(var,&varprojection);
+	if(ncstat != NC_NOERR) {THROWCHK(ncstat); goto done;}
+	nclistpush(newconstraint->projections,(ncelem)varprojection);
+    }
+if(SHOWFETCH) {
+char* s = dumpprojections(newconstraint->projections);
+LOG1(NCLOGNOTE,"prefetch.final: %s",s);
+nullfree(s);
+}
+    ncstat = buildcachenode34(nccomm,newconstraint,vars,&cache,!isnc4);
+    newconstraint = NULL; /* buildcachenode34 takes control of newconstraint */
+    if(ncstat) goto done;
+    cache->wholevariable = 1; /* All prefetches are whole variable */
+    /* Make cache node be the prefetch node */
+    nccomm->cdf.cache->prefetch = cache;
+if(SHOWFETCH) {
+LOG0(NCLOGNOTE,"prefetch.complete");
+}
+
+if(SHOWFETCH) {
+char* s = NULL;
+/* Log the set of prefetch variables */
+NCbytes* buf = ncbytesnew();
+ncbytescat(buf,"prefetch.vars: ");
+for(i=0;i<nclistlength(vars);i++) {
+CDFnode* var = (CDFnode*)nclistget(vars,i);
+ncbytescat(buf," ");
+s = makecdfpathstring3(var,".");
+ncbytescat(buf,s);
+nullfree(s);
+}
+ncbytescat(buf,"\n");
+nclog(NCLOGNOTE,"%s",ncbytescontents(buf));
+ncbytesfree(buf);
+}
+
+done:
+    nclistfree(vars);
+    dcefree((DCEnode*)newconstraint);    
+    if(ncstat) freenccachenode(nccomm,cache);
+    return THROW(ncstat);
+}
+
+NCerror
+buildcachenode34(NCDAPCOMMON* nccomm,
+	        DCEconstraint* constraint,
+		NClist* varlist,
+		NCcachenode** cachep,
+		int isprefetch)
+{
+    NCerror ncstat = NC_NOERR;
+    OCerror ocstat = OC_NOERR;
+    OCconnection conn = nccomm->oc.conn;
+    OCobject ocroot = OCNULL;
+    CDFnode* dxdroot = NULL;
+    NCcachenode* cachenode = NULL;
+    char* ce = NULL;
+
+    ce = buildconstraintstring3(constraint);
+
+    ocstat = dap_fetch(nccomm,conn,ce,OCDATADDS,&ocroot);
+    nullfree(ce);
+    if(ocstat) {THROWCHK(ocerrtoncerr(ocstat)); goto done;}
+
+    ncstat = buildcdftree34(nccomm,ocroot,OCDATA,&dxdroot);
+    if(ncstat) {THROWCHK(ncstat); goto done;}
+
+    /* regrid */
+    if(!FLAGSET(nccomm->controls,NCF_UNCONSTRAINABLE)) {
+        ncstat = regrid3(dxdroot,nccomm->cdf.ddsroot,constraint->projections);
+        if(ncstat) {THROWCHK(ncstat); goto done;}
+    }
+
+    /* create the cache node */
+    cachenode = createnccachenode();
+    cachenode->prefetch = isprefetch;
+    cachenode->vars = nclistclone(varlist);
+    cachenode->datadds = dxdroot;
+    /* Give the constraint over to the cachenode */
+    cachenode->constraint = constraint;
+    constraint = NULL;
+    cachenode->wholevariable = iscacheableconstraint(cachenode->constraint);
+
+    /* save the root content*/
+    cachenode->ocroot = ocroot;
+    cachenode->content = oc_data_new(conn);
+    ocstat = oc_data_root(conn,ocroot,cachenode->content);
+    if(ocstat) {THROWCHK(ocerrtoncerr(ocstat)); goto done;}
+
+    /* capture the packet size */
+    ocstat = oc_raw_xdrsize(conn,ocroot,&cachenode->xdrsize);
+    if(ocstat) {THROWCHK(ocerrtoncerr(ocstat)); goto done;}
+
+#ifdef DEBUG
+fprintf(stderr,"buildcachenode: new cache node: %s\n",
+	dumpcachenode(cachenode));
+#endif
+    /* Insert into the cache. If not caching, then
+       remove any previous cache node
+    */
+    if(!isprefetch) {
+	NCcache* cache = nccomm->cdf.cache;
+	if(cache->nodes == NULL) cache->nodes = nclistnew();
+	/* remove cache nodes to get below the max cache size */
+	while(cache->cachesize + cachenode->xdrsize > cache->cachelimit
+	      && nclistlength(cache->nodes) > 0) {
+	    NCcachenode* node = (NCcachenode*)nclistremove(cache->nodes,0);
+#ifdef DEBUG
+fprintf(stderr,"buildcachenode: purge cache node: %s\n",
+	dumpcachenode(cachenode));
+#endif
+	    cache->cachesize -= node->xdrsize;
+	    freenccachenode(nccomm,node);
+	}
+	/* Remove cache nodes to get below the max cache count */
+	/* If not caching, then cachecount should be 0 */
+	while(nclistlength(cache->nodes) > cache->cachecount) {
+	    NCcachenode* node = (NCcachenode*)nclistremove(cache->nodes,0);
+#ifdef DEBUG
+fprintf(stderr,"buildcachenode: count purge cache node: %s\n",
+	dumpcachenode(node));
+#endif
+	    cache->cachesize -= node->xdrsize;
+	    freenccachenode(nccomm,node);
+        }
+        nclistpush(nccomm->cdf.cache->nodes,(ncelem)cachenode);
+        cache->cachesize += cachenode->xdrsize;
+    }
+
+#ifdef DEBUG
+fprintf(stderr,"buildcachenode: %s\n",dumpcachenode(cachenode));
+#endif
+
+done:
+    if(constraint != NULL) dcefree((DCEnode*)constraint);
+    if(cachep) *cachep = cachenode;
+    if(ocstat != OC_NOERR) ncstat = ocerrtoncerr(ocstat);
+    if(ncstat) {
+	freecdfroot34(dxdroot);
+	freenccachenode(nccomm,cachenode);
+    }
+    return THROW(ncstat);
+}
+
+NCcachenode*
+createnccachenode(void)
+{
+    NCcachenode* mem = (NCcachenode*)calloc(1,sizeof(NCcachenode));
+    return mem;
+}
+
+void
+freenccachenode(NCDAPCOMMON* nccomm, NCcachenode* node)
+{
+    if(node == NULL) return;
+    oc_data_free(nccomm->oc.conn,node->content);
+    dcefree((DCEnode*)node->constraint);
+    freecdfroot34(node->datadds);
+    nclistfree(node->vars);
+    nullfree(node);
+}
+
+void
+freenccache(NCDAPCOMMON* nccomm, NCcache* cache)
+{
+    int i;
+    if(cache == NULL) return;
+    freenccachenode(nccomm,cache->prefetch);
+    for(i=0;i<nclistlength(cache->nodes);i++) {
+	freenccachenode(nccomm,(NCcachenode*)nclistget(cache->nodes,i));
+    }
+    nclistfree(cache->nodes);
+    nullfree(cache);
+}
+
+NCcache*
+createnccache(void)
+{
+    NCcache* c = (NCcache*)calloc(1,sizeof(NCcache));
+    c->cachelimit = DFALTCACHELIMIT;
+    c->cachesize = 0;
+    c->nodes = nclistnew();
+    c->cachecount = DFALTCACHECOUNT;
+    return c;
+}
+
+static int
+iscacheableprojection(DCEprojection* proj)
+{
+    int i,cacheable;
+    if(proj->discrim != CES_VAR) return 0;
+    cacheable = 1; /* assume so */
+    for(i=0;i<nclistlength(proj->var->segments);i++) {
+        DCEsegment* segment = (DCEsegment*)nclistget(proj->var->segments,i);
+	if(!iswholesegment(segment)) {cacheable = 0; break;}	
+    }
+    return cacheable;
+}
+
+static int
+iscacheableconstraint(DCEconstraint* con)
+{
+    int i;
+    if(con == NULL) return 1;
+    if(con->selections != NULL && nclistlength(con->selections) > 0)
+	return 0; /* cant deal with selections */
+    for(i=0;i<nclistlength(con->projections);i++) {
+        if(!iscacheableprojection((DCEprojection*)nclistget(con->projections,i)))
+	    return 0;
+    }
+    return 1;
+}
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/src_netcdf4/cdf3.c
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/src_netcdf4/cdf3.c	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/src_netcdf4/cdf3.c	(revision 1749)
@@ -0,0 +1,770 @@
+/*********************************************************************
+ *   Copyright 1993, UCAR/Unidata
+ *   See netcdf/COPYRIGHT file for copying and redistribution conditions.
+ *   $Header: /upc/share/CVS/netcdf-3/libncdap3/cdf3.c,v 1.33 2009/12/03 03:42:37 dmh Exp $
+ *********************************************************************/
+
+#include "ncdap3.h"
+#include "daputil.h"
+#include "dapdump.h"
+
+CDFnode* v4node = NULL;
+
+/* Forward*/
+static NCerror sequencecheck3r(CDFnode* node, NClist* vars, CDFnode* topseq);
+static NCerror regrid3r(CDFnode*, CDFnode*, NClist*);
+static NCerror testregrid3(CDFnode* node, CDFnode* template, NClist*);
+static CDFnode* makenewgrid3(CDFnode* node, CDFnode* template);
+static NCerror regridinsert(CDFnode* newgrid, CDFnode* node);
+static NCerror regridremove(CDFnode* newgrid, CDFnode* node);
+static NCerror mapnodes3r(CDFnode*, CDFnode*, int depth);
+static NCerror mapfcn(CDFnode* dstnode, CDFnode* srcnode);
+static NCerror definedimsetplus3(NCDAPCOMMON* nccomm, CDFnode* node);
+static NCerror definedimsetall3(NCDAPCOMMON* nccomm, CDFnode* node);
+
+/* Accumulate useful node sets  */
+NCerror
+computecdfnodesets3(NCDAPCOMMON* nccomm)
+{
+    unsigned int i;
+    NClist* varnodes = nclistnew(); 
+    NClist* allnodes = nccomm->cdf.ddsroot->tree->nodes;
+
+    if(nccomm->cdf.seqnodes == NULL) nccomm->cdf.seqnodes = nclistnew();
+    if(nccomm->cdf.gridnodes == NULL) nccomm->cdf.gridnodes = nclistnew();
+    nclistclear(nccomm->cdf.seqnodes);
+    nclistclear(nccomm->cdf.gridnodes);
+
+    computevarnodes3(nccomm,allnodes,varnodes);
+    nclistfree(nccomm->cdf.varnodes);
+    nccomm->cdf.varnodes = varnodes;
+
+    /* Now compute other sets of interest */
+    for(i=0;i<nclistlength(allnodes);i++) {
+	CDFnode* node = (CDFnode*)nclistget(allnodes,i);
+	if(!node->visible) continue;
+	switch (node->nctype) {
+	case NC_Sequence:
+	    nclistpush(nccomm->cdf.seqnodes,(ncelem)node);
+	    break;
+	case NC_Grid:
+	    nclistpush(nccomm->cdf.gridnodes,(ncelem)node);
+	    break;
+	default: break;
+	}
+    }
+    return NC_NOERR;
+}
+
+NCerror
+computevarnodes3(NCDAPCOMMON* nccomm, NClist* allnodes, NClist* varnodes)
+{
+    unsigned int i,len;
+    NClist* allvarnodes = nclistnew();
+    for(i=0;i<nclistlength(allnodes);i++) {
+	CDFnode* node = (CDFnode*)nclistget(allnodes,i);
+	/* If this node has a bad name, repair it */
+	if(dap_badname(node->ocname)) {
+	    char* newname = dap_repairname(node->ocname);
+	    nullfree(node->ocname);
+	    node->ocname = newname;
+	}
+	if(!node->visible) continue;
+	if(node->nctype == NC_Primitive)
+	    nclistpush(allvarnodes,(ncelem)node);
+    }
+    /* Further process the variable nodes to get the final set */
+    /* Use toplevel vars first */
+    len = nclistlength(allvarnodes);
+    for(i=0;i<len;i++) {
+	CDFnode* node = (CDFnode*)nclistget(allvarnodes,i);
+	if(node == NULL) continue;
+        if(daptoplevel(node)) {
+	    nclistpush(varnodes,(ncelem)node);
+	    nclistset(allvarnodes,i,(ncelem)NULL);
+	}
+    }
+    /*... then grid arrays and maps.
+      but exclude the coordinate variables if we are trying to
+      exactly mimic nc-dap
+    */
+    for(i=0;i<len;i++) {
+	CDFnode* node = (CDFnode*)nclistget(allvarnodes,i);
+	if(node == NULL) continue;
+	if(dapgridarray(node)) {
+	    nclistpush(varnodes,(ncelem)node);
+	    nclistset(allvarnodes,i,(ncelem)NULL);
+        } else if(dapgridmap(node)) {
+	    if(!FLAGSET(nccomm->controls,NCF_NCDAP))
+		nclistpush(varnodes,(ncelem)node);
+	    nclistset(allvarnodes,i,(ncelem)NULL);
+	}
+    }
+    /*... then all others */
+    for(i=0;i<len;i++) {
+	CDFnode* node = (CDFnode*)nclistget(allvarnodes,i);
+	if(node == NULL) continue;
+        nclistpush(varnodes,(ncelem)node);
+    }
+    nclistfree(allvarnodes);
+#ifdef DEBUG2
+for(i=0;i<nclistlength(varnodes);i++) {
+CDFnode* node = (CDFnode*)nclistget(varnodes,i);
+if(node == NULL) continue;
+fprintf(stderr,"computevarnodes: var: %s\n",makecdfpathstring3(node,"."));
+}
+#endif
+    return NC_NOERR;
+}
+
+NCerror
+fixgrids3(NCDAPCOMMON* nccomm)
+{
+    unsigned int i;
+    NClist* gridnodes = nccomm->cdf.gridnodes;
+
+    for(i=0;i<nclistlength(gridnodes);i++) {
+        CDFnode* grid = (CDFnode*)nclistget(gridnodes,i);
+        (void)fixgrid34(nccomm,grid);
+	/* Ignore mal-formed grids */
+    }
+    return NC_NOERR;
+}
+
+/*
+Figure out the names for variables.
+*/
+NCerror
+computecdfvarnames3(NCDAPCOMMON* nccomm, CDFnode* root, NClist* varnodes)
+{
+    unsigned int i,j,d;
+
+    /* clear all elided marks; except for dataset and grids */
+    for(i=0;i<nclistlength(root->tree->nodes);i++) {
+	CDFnode* node = (CDFnode*)nclistget(root->tree->nodes,i);
+	node->elided = 0;
+	if(node->nctype == NC_Grid || node->nctype == NC_Dataset)
+	    node->elided = 1;
+    }
+
+    /* ensure all variables have an initial full name defined */
+    for(i=0;i<nclistlength(varnodes);i++) {
+	CDFnode* var = (CDFnode*)nclistget(varnodes,i);
+	nullfree(var->ncfullname);
+	var->ncfullname = makecdfpathstring3(var,nccomm->cdf.separator);
+#ifdef DEBUG2
+fprintf(stderr,"var names: %s %s %s\n",
+	var->ocname,var->ncbasename,var->ncfullname);
+#endif
+    }
+
+    /*  unify all variables with same fullname and dimensions
+	basevar fields says: "for duplicate grid variables";
+        when does this happen?
+    */
+    if(FLAGSET(nccomm->controls,NCF_NC3)) {
+        for(i=0;i<nclistlength(varnodes);i++) {
+	    int match;
+	    CDFnode* var = (CDFnode*)nclistget(varnodes,i);
+	    for(j=0;j<i;j++) {
+	        CDFnode* testnode = (CDFnode*)nclistget(varnodes,j);
+		match = 1;
+	        if(testnode->array.basevar != NULL)
+		    continue; /* already processed */
+	        if(strcmp(var->ncfullname,testnode->ncfullname) != 0)
+		    match = 0;
+		else if(nclistlength(testnode->array.dimsetall)
+			!= nclistlength(var->array.dimsetall))
+		    match = 0;
+	        else for(d=0;d<nclistlength(testnode->array.dimsetall);d++) {
+		    CDFnode* vdim = (CDFnode*)nclistget(var->array.dimsetall,d);
+		    CDFnode* tdim = (CDFnode*)nclistget(testnode->array.dimsetall,d);
+	            if(vdim->dim.declsize != tdim->dim.declsize) {
+		        match = 0;
+			break;
+		    }
+		}
+		if(match) {
+		    testnode->array.basevar = var;
+fprintf(stderr,"basevar invoked: %s\n",var->ncfullname);
+		}
+	    }
+	}
+    }
+
+    /* Finally, verify unique names */
+    for(i=0;i<nclistlength(varnodes);i++) {
+	CDFnode* var1 = (CDFnode*)nclistget(varnodes,i);
+	if(var1->array.basevar != NULL) continue;
+	for(j=0;j<i;j++) {
+	    CDFnode* var2 = (CDFnode*)nclistget(varnodes,j);
+	    if(var2->array.basevar != NULL) continue;
+	    if(strcmp(var1->ncfullname,var2->ncfullname)==0) {
+		PANIC1("duplicate var names: %s",var1->ncfullname);
+	    }
+	}
+    }
+    return NC_NOERR;
+}
+
+
+/* locate and connect usable sequences and vars.
+A sequence is usable iff:
+1. it has a path from one of its subnodes to a leaf and that
+   path does not contain a sequence.
+2. No parent container has dimensions.
+*/
+
+NCerror
+sequencecheck3(NCDAPCOMMON* nccomm)
+{
+    (void)sequencecheck3r(nccomm->cdf.ddsroot,nccomm->cdf.varnodes,NULL);    
+    return NC_NOERR;
+}
+
+
+static NCerror
+sequencecheck3r(CDFnode* node, NClist* vars, CDFnode* topseq)
+{
+    unsigned int i;
+    NCerror err = NC_NOERR;
+    int ok = 0;
+    if(topseq == NULL && nclistlength(node->array.dimset0) > 0) {
+	err = NC_EINVAL; /* This container has dimensions, so no sequence within it
+                            can be usable */
+    } else if(node->nctype == NC_Sequence) {
+	/* Recursively walk the path for each subnode of this sequence node
+           looking for a path without any sequence */
+	for(i=0;i<nclistlength(node->subnodes);i++) {
+	    CDFnode* sub = (CDFnode*)nclistget(node->subnodes,i);
+	    err = sequencecheck3r(sub,vars,node);
+	    if(err == NC_NOERR) ok = 1; /* there is at least 1 usable var below */
+	}
+	if(topseq == NULL && ok == 1) {
+	    /* this sequence is usable because it has scalar container
+               (by construction) and has a path to a leaf without an intermediate
+               sequence. */
+	    err = NC_NOERR;
+	    node->usesequence = 1;
+	} else {
+	    /* this sequence is unusable because it has no path
+               to a leaf without an intermediate sequence. */
+	    node->usesequence = 0;
+	    err = NC_EINVAL;
+	}
+    } else if(nclistcontains(vars,(ncelem)node)) {
+	/* If we reach a leaf, then topseq is usable, so save it */
+	node->array.sequence = topseq;
+    } else { /* Some kind of non-sequence container node with no dimensions */
+	/* recursively compute usability */
+	for(i=0;i<nclistlength(node->subnodes);i++) {
+	    CDFnode* sub = (CDFnode*)nclistget(node->subnodes,i);
+	    err = sequencecheck3r(sub,vars,topseq);
+	    if(err == NC_NOERR) ok = 1;
+	}
+	err = (ok?NC_NOERR:NC_EINVAL);
+    }
+    return err;
+}
+
+/*
+OPeNDAP is in the process of changing servers so that
+partial grids are converted to structures.  However, not all
+servers do this: some elide the grid altogether, which can
+lead to ambiguities.  Handle this last case by attempting to
+convert the elided case to look like the newer structure
+case.  [for some reason, this code has been difficult to get
+right; I have rewritten 6 times and it probably is still not
+right.]
+
+Input is
+(1) the root of the dds that needs to be re-gridded
+(2) the full datadds tree that defines where the grids are.
+(3) the projections that were used to produce (1) from (2).
+*/
+
+NCerror
+regrid3(CDFnode* ddsroot, CDFnode* template, NClist* projections)
+{
+    NCerror ncstat = NC_NOERR;
+    NClist* newgrids = nclistnew();
+
+    /* The current regrid assumes that the ddsroot tree
+       has missing grids compared to the template.
+       It is also assumed that order of the nodes
+       in the ddsroot is the same as in the template.
+    */
+    if(ddsroot->tree->regridded) return NC_NOERR;
+
+#ifdef DEBUG
+fprintf(stderr,"regrid: ddsroot=%s\n",dumptree(ddsroot));
+fprintf(stderr,"regrid: template=%s\n",dumptree(template));
+#endif
+
+
+#ifdef PROJECTED
+    /* turn off the projection tag for all nodes */
+    unprojected3(template->tree->nodes);
+    /* Set the projection flag for all paths of all nodes
+       that are referenced in the projections that produced ddsroot.
+       This includes containers and subnodes. If there are no
+       projections then mark all nodes 
+    */
+     projectall3(template->tree->nodes);
+#endif
+
+    if(simplenodematch34(ddsroot,template)) {
+        ncstat = regrid3r(ddsroot,template,newgrids);
+        ddsroot->tree->regridded = 1;
+    } else
+	ncstat = NC_EINVAL;
+    nclistfree(newgrids);
+    return ncstat;
+}
+
+#ifdef PROJECTED
+static void
+unprojected3(NClist* nodes)
+{
+    int i;
+    for(i=0;i<nclistlength(nodes);i++) {
+	CDFnode* node = (CDFnode*)nclistget(nodes,i);
+	node->projected = 0;
+    }
+}
+
+static void
+projectall3(NClist* nodes)
+{
+    int i;
+    for(i=0;i<nclistlength(nodes);i++) {
+	CDFnode* node = (CDFnode*)nclistget(nodes,i);
+	node->projected = 1;
+    }
+}
+
+static void
+projection3r(CDFnode* node)
+{
+    int i;
+    NClist* path = nclistnew();
+    collectnodepath3(node,path,!WITHDATASET);
+    for(i=0;i<nclistlength(path);i++) {
+        CDFnode* pathnode = (CDFnode*)nclistget(path,i);
+#ifdef DEBUG
+if(pathnode->projected == 0)
+fprintf(stderr,"projection: %s\n",makesimplepathstring3(pathnode));
+#endif
+	pathnode->projected = 1;
+    }
+    /* Now tag everything below me */
+    for(i=0;i<nclistlength(node->subnodes);i++) {
+	CDFnode* subnode = (CDFnode*)nclistget(node->subnodes,i);
+	projection3r(subnode);
+    }
+    nclistfree(path);
+}
+#endif /*PROJECTED*/
+
+/*
+Add in virtual structure nodes so that
+old style constrainted DDS and DATADDS
+look like the new style with structures.
+*/
+static NCerror
+regrid3r(CDFnode* node, CDFnode* template, NClist* gridnodes)
+{
+    unsigned int inode, itemp;
+    NCerror ncstat = NC_NOERR;
+
+    /* Try to match node's subnodes to a subset of the
+       template subnodes
+    */
+#ifdef DEBUG
+fprintf(stderr,"regrid: matched: %s -> %s\n",
+node->ocname,template->ocname);
+#endif
+    for(inode=0;inode<nclistlength(node->subnodes);inode++) {
+        CDFnode* subnode = (CDFnode*)nclistget(node->subnodes,inode);
+	int match = 0;
+        for(itemp=0;itemp<nclistlength(template->subnodes);itemp++) {
+            CDFnode* subtemp = (CDFnode*)nclistget(template->subnodes,itemp);
+	    if(
+#ifdef PROJECTED
+		subtemp->projected &&
+#endif
+		simplenodematch34(subnode,subtemp)) {
+                ncstat = regrid3r(subnode,subtemp,gridnodes);
+                if(ncstat != NC_NOERR) return THROW(ncstat);
+		match = 1;
+#ifdef PROJECTED
+		subtemp->projected = 0; /*make sure we dont reuse this node*/
+#endif
+		break;
+	    }
+        }
+	if(!match) { /* subnode has no match */
+	    /* ok, see if we can regrid */
+            for(itemp=0;itemp<nclistlength(template->subnodes);itemp++) {
+                CDFnode* subtemp = (CDFnode*)nclistget(template->subnodes,itemp);
+#ifdef DEBUG
+fprintf(stderr,"regrid: inside: %s.%s :: %s.%s\n",
+node->ocname,subnode->ocname,
+template->ocname,subtemp->ocname);
+#endif
+		if(subtemp->nctype != NC_Grid)
+		    continue;
+#ifdef PROJECTED
+		if(!subtemp->projected) continue;
+#endif
+		ncstat = testregrid3(subnode,subtemp,gridnodes);
+                if(ncstat == NC_NOERR) {match=1; break;}
+	    }
+	    if(!match) {/* really no match */
+	        ncstat = THROW(NC_EDDS); /* no match */
+	    }
+	}
+    }
+    return THROW(ncstat);
+}
+
+/* See if this node can match a subnode of the template
+   as a grid, and if so, then rebuild the node graph.
+*/
+static NCerror
+testregrid3(CDFnode* node, CDFnode* template, NClist* gridnodes)
+{
+    int i,match;
+    NCerror ncstat = NC_NOERR;
+    ASSERT((template->nctype == NC_Grid));
+    { /* try to match inside the grid */
+        for(match=0,i=0;i<nclistlength(template->subnodes);i++) {
+            CDFnode* gridelem = (CDFnode*)nclistget(template->subnodes,i);
+            if(!simplenodematch34(gridelem,node))
+		continue;
+            ncstat = regrid3r(node,gridelem,gridnodes);
+            if(ncstat == NC_NOERR) {
+                /* create new grid node if not already created */
+                CDFnode* newgrid = NULL;
+	        match = 1;
+                for(i=0;i<nclistlength(gridnodes);i++) {
+                    newgrid = (CDFnode*)nclistget(gridnodes,i);
+                    if(newgrid->template == template) break;
+                    newgrid = NULL;
+                }
+                if(newgrid == NULL) {
+                    newgrid = makenewgrid3(node,template);
+                    if(newgrid == NULL) {ncstat = NC_ENOMEM; goto done;}
+                    /* Insert the grid into node's parent */
+                    regridinsert(newgrid,node);
+                    nclistpush(gridnodes,(ncelem)newgrid);
+                    nclistpush(node->root->tree->nodes,(ncelem)newgrid);
+                } 
+                regridremove(newgrid, node);
+                node->container = newgrid;
+                nclistpush(newgrid->subnodes,(ncelem)node);
+                break; /* done with node */
+            }
+        }
+    }
+    if(!match) ncstat = NC_EDDS;
+done:
+    return ncstat;
+}
+
+
+static CDFnode*
+makenewgrid3(CDFnode* node, CDFnode* template)
+{
+    CDFnode* newgrid;
+    newgrid = (CDFnode*)calloc(1,sizeof(CDFnode));
+    if(newgrid == NULL) return NULL;
+    memset((void*)newgrid,0,sizeof(CDFnode));
+    newgrid->virtual = 1;
+    newgrid->ocname = nulldup(template->ocname);
+    newgrid->ncbasename = nulldup(template->ncbasename);
+    newgrid->nctype = NC_Grid;
+    newgrid->subnodes = nclistnew();
+    newgrid->container = node->container;
+    newgrid->template = template;
+    return newgrid;
+}
+
+static NCerror
+regridinsert(CDFnode* newgrid, CDFnode* node)
+{
+    int i;
+    CDFnode* parent;
+    /* Locate the index of the node in its current parent */
+    parent = node->container;
+    for(i=0;i<nclistlength(parent->subnodes);i++) {
+	CDFnode* subnode = (CDFnode*)nclistget(parent->subnodes,i);
+	if(subnode == node) {
+	    /* Insert the grid right before this node */
+	    nclistinsert(parent->subnodes,i,(ncelem)newgrid);
+	    return NC_NOERR;
+	}
+    }
+    PANIC("regridinsert failure");
+    return NC_EINVAL;
+}
+
+static NCerror
+regridremove(CDFnode* newgrid, CDFnode* node)
+{
+    int i;
+    CDFnode* parent;
+    /* Locate the index of the node in its current parent and remove */
+    parent = node->container;
+    for(i=0;i<nclistlength(parent->subnodes);i++) {
+	CDFnode* subnode = (CDFnode*)nclistget(parent->subnodes,i);
+	if(subnode == node) {
+	    nclistremove(parent->subnodes,i);
+	    return NC_NOERR;
+	}
+    }
+    PANIC("regridremove failure");
+    return NC_EINVAL;
+}    
+
+/**
+
+Make the constrained dds nodes (root)
+point to the corresponding unconstrained
+dds nodes (fullroot).
+ */
+
+NCerror
+mapnodes3(CDFnode* root, CDFnode* fullroot)
+{
+    NCerror ncstat = NC_NOERR;
+    ASSERT(root != NULL && fullroot != NULL);
+    if(!simplenodematch34(root,fullroot))
+	{THROWCHK(ncstat=NC_EINVAL); goto done;}
+    /* clear out old associations*/
+    unmap3(root);
+    ncstat = mapnodes3r(root,fullroot,0);
+done:
+    return ncstat;
+}
+
+static NCerror
+mapnodes3r(CDFnode* connode, CDFnode* fullnode, int depth)
+{
+    unsigned int i,j;
+    NCerror ncstat = NC_NOERR;
+
+    ASSERT((simplenodematch34(connode,fullnode)));
+    
+#ifdef DEBUG
+{
+char* path1 = makecdfpathstring3(fullnode,".");
+char * path2 = makecdfpathstring3(connode,".");
+fprintf(stderr,"mapnode: %s->%s\n",path1,path2);
+nullfree(path1); nullfree(path2);
+}
+#endif
+
+    /* Map node */
+    mapfcn(connode,fullnode);
+
+    /* Try to match connode subnodes against fullnode subnodes */
+    ASSERT(nclistlength(connode->subnodes) <= nclistlength(fullnode->subnodes));
+
+    for(i=0;i<nclistlength(connode->subnodes);i++) {
+        CDFnode* consubnode = (CDFnode*)nclistget(connode->subnodes,i);
+	/* Search full subnodes for a matching subnode from con */
+        for(j=0;j<nclistlength(fullnode->subnodes);j++) {
+            CDFnode* fullsubnode = (CDFnode*)nclistget(fullnode->subnodes,j);
+            if(simplenodematch34(fullsubnode,consubnode)) {
+                ncstat = mapnodes3r(consubnode,fullsubnode,depth+1);
+   	        if(ncstat) goto done;
+	    }
+	}
+    }
+done:
+    return THROW(ncstat);
+}
+
+
+/* The specific actions of a map are defined
+   by this function.
+*/
+static NCerror
+mapfcn(CDFnode* dstnode, CDFnode* srcnode)
+{
+    /* Mark node as having been mapped */
+    dstnode->visible = 1;
+    dstnode->basenode = srcnode;
+    return NC_NOERR;
+}
+
+void
+unmap3(CDFnode* root)
+{
+    unsigned int i;
+    CDFtree* tree = root->tree;
+    for(i=0;i<nclistlength(tree->nodes);i++) {
+	CDFnode* node = (CDFnode*)nclistget(tree->nodes,i);
+	node->basenode = NULL;
+        node->visible = 0;
+    }
+}
+
+/* 
+Move dimension data from basenodes to nodes
+*/
+
+NCerror
+dimimprint3(NCDAPCOMMON* nccomm)
+{
+    NCerror ncstat = NC_NOERR;
+    NClist* allnodes;
+    int i,j;
+    CDFnode* basenode;
+
+    allnodes = nccomm->cdf.ddsroot->tree->nodes;
+    for(i=0;i<nclistlength(allnodes);i++) {
+	CDFnode* node = (CDFnode*)nclistget(allnodes,i);
+	int noderank, baserank;
+        /* Do dimension imprinting */
+	basenode = node->basenode;
+	if(basenode == NULL) continue;
+	noderank = nclistlength(node->array.dimset0);
+	baserank = nclistlength(basenode->array.dimset0);
+	if(noderank == 0) continue;
+        ASSERT(noderank == baserank);
+#ifdef DEBUG
+fprintf(stderr,"dimimprint %s/%d -> %s/%d\n",
+	makecdfpathstring3(basenode,"."),
+	noderank,
+	makecdfpathstring3(node,"."),
+	baserank);
+#endif
+        for(j=0;j<noderank;j++) {
+	    CDFnode* dim = (CDFnode*)nclistget(node->array.dimset0,j);
+	    CDFnode* basedim = (CDFnode*)nclistget(basenode->array.dimset0,j);
+	    dim->dim.declsize0 = basedim->dim.declsize;	
+#ifdef DEBUG
+fprintf(stderr,"dimimprint: %d: %lu -> %lu\n",i,basedim->dim.declsize,dim->dim.declsize0);
+#endif
+        }
+    }
+    return ncstat;
+}
+
+static CDFnode*
+clonedim(NCDAPCOMMON* nccomm, CDFnode* dim, CDFnode* var)
+{
+    CDFnode* clone;
+    clone = makecdfnode34(nccomm,dim->ocname,OC_Dimension,
+			  OCNULL,dim->container);
+    /* Record its existence */
+    nclistpush(dim->container->root->tree->nodes,(ncelem)clone);
+    clone->dim = dim->dim; /* copy most everything */
+    clone->dim.dimflags |= CDFDIMCLONE;
+    clone->dim.array = var;
+    return clone;
+}
+
+static NClist*
+clonedimset3(NCDAPCOMMON* nccomm, NClist* dimset, CDFnode* var)
+{
+    NClist* result = nclistnew();
+    int i;
+    for(i=0;i<nclistlength(dimset);i++) {
+	CDFnode* dim = (CDFnode*)nclistget(dimset,i);
+	nclistpush(result,(ncelem)clonedim(nccomm,dim,var));
+    }
+    return result;
+}
+
+/* Define the dimsetplus list for a node */
+static NCerror
+definedimsetplus3(NCDAPCOMMON* nccomm, CDFnode* node)
+{
+    int ncstat = NC_NOERR;
+    NClist* dimset;
+    CDFnode* clone;
+
+    ASSERT(node->array.dimsetplus == NULL);
+    if(node->array.dimset0 == NULL)
+	dimset = nclistnew();
+    else { /* copy the dimset0 into dimset */
+        dimset = nclistclone(node->array.dimset0);
+    }
+    /* Insert the sequence or string dims */
+    if(node->array.stringdim != NULL) {
+	clone = node->array.stringdim;
+        nclistpush(dimset,(ncelem)clone);
+    }
+    if(node->array.seqdim != NULL) {
+	clone = node->array.seqdim;
+        nclistpush(dimset,(ncelem)clone);
+    }
+    node->array.dimsetplus = dimset;
+    return ncstat;
+}
+
+/* Define the dimsetall list for a node */
+static NCerror
+definedimsetall3(NCDAPCOMMON* nccomm, CDFnode* node)
+{
+    int i;
+    int ncstat = NC_NOERR;
+    NClist* dimsetall;
+
+    ASSERT(node->array.dimsetall == NULL);
+    if(node->container != NULL) {
+        if(node->container->array.dimsetall == NULL) {
+#ifdef DEBUG1
+fprintf(stderr,"dimsetall: recurse %s\n",node->container->ocname);
+#endif
+	    ncstat = definedimsetall3(nccomm,node->container);
+	    if(ncstat != NC_NOERR) return ncstat;
+        }
+	/* We need to clone the parent dimensions because we will be assigning
+           indices vis-a-vis this variable */
+        dimsetall = clonedimset3(nccomm,node->container->array.dimsetall,node);
+    } else
+	dimsetall = nclistnew();
+    /* concat parentall and dimset;*/
+    for(i=0;i<nclistlength(node->array.dimsetplus);i++) {
+	CDFnode* clone = (CDFnode*)nclistget(node->array.dimsetplus,i);
+	nclistpush(dimsetall,(ncelem)clone);
+    }
+    node->array.dimsetall = dimsetall;
+#ifdef DEBUG1
+fprintf(stderr,"dimsetall: |%s|=%d\n",node->ocname,nclistlength(dimsetall));
+#endif
+    return ncstat;
+}
+
+/* Define the dimsetplus and dimsetall lists for
+   all nodes with dimensions
+*/
+NCerror
+definedimsets3(NCDAPCOMMON* nccomm)
+{
+    int i;
+    int ncstat = NC_NOERR;
+    NClist* allnodes = nccomm->cdf.ddsroot->tree->nodes;
+
+    for(i=0;i<nclistlength(allnodes);i++) {
+	CDFnode* rankednode = (CDFnode*)nclistget(allnodes,i);
+	if(rankednode->nctype == NC_Dimension) continue; /* ignore */
+	ASSERT((rankednode->array.dimsetplus == NULL));
+	ncstat = definedimsetplus3(nccomm,rankednode);
+	if(ncstat != NC_NOERR) return ncstat;
+    }
+    for(i=0;i<nclistlength(allnodes);i++) {
+	CDFnode* rankednode = (CDFnode*)nclistget(allnodes,i);
+	if(rankednode->nctype == NC_Dimension) continue; /*ignore*/
+	ASSERT((rankednode->array.dimsetall == NULL));
+	ASSERT((rankednode->array.dimsetplus != NULL));
+	ncstat = definedimsetall3(nccomm,rankednode);
+	if(ncstat != NC_NOERR) return ncstat;
+    }     
+    return NC_NOERR;
+}
+
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/src_netcdf4/ceconstraints.h
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/src_netcdf4/ceconstraints.h	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/src_netcdf4/ceconstraints.h	(revision 1749)
@@ -0,0 +1,31 @@
+/*********************************************************************
+  *   Copyright 1993, UCAR/Unidata
+  *   See netcdf/COPYRIGHT file for copying and redistribution conditions.
+  *********************************************************************/
+/* $Header$ */
+
+#ifndef CECONSTRAINTS_H
+#define CECONSTRAINTS_H
+
+#ifndef NC_MAX_VAR_DIMS
+#define NC_MAX_VAR_DIMS 1024
+#endif
+
+typedef enum CEops {
+CEO_NIL=0,CEO_EQ=1,CEO_NEQ=2,CEO_GE=3,CEO_GT=4,CEO_LT=5,CEO_LE=6,CEO_RE=7
+} CEops;
+
+/* Must match NCCops */
+#define OPSTRINGS {"?","=","!=",">=",">","<=","<","=~"}
+
+typedef enum CEsort {
+CES_NIL=0,
+CES_STR=8,CES_INT=9,CES_FLOAT=10,
+CES_VAR=11,CES_FCN=12,CES_CONST=13,
+CES_SELECT=14, CES_PROJECT=15,
+CES_SEGMENT=16, CES_CONSTRAINT=17,
+CES_VALUE=18, CES_SLICE=19
+} CEsort;
+
+#endif /*CECONSTRAINTS_H*/
+
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/src_netcdf4/common34.c
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/src_netcdf4/common34.c	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/src_netcdf4/common34.c	(revision 1749)
@@ -0,0 +1,924 @@
+/*********************************************************************
+ *   Copyright 1993, UCAR/Unidata
+ *   See netcdf/COPYRIGHT file for copying and redistribution conditions.
+ *   $Header: /upc/share/CVS/netcdf-3/libncdap3/common34.c,v 1.29 2010/05/25 13:53:02 ed Exp $
+ *********************************************************************/
+
+#include "ncdap3.h"
+
+#ifdef HAVE_GETRLIMIT
+#  ifdef HAVE_SYS_RESOURCE_H
+#    include <sys/time.h>
+#  endif
+#  ifdef HAVE_SYS_RESOURCE_H
+#    include <sys/resource.h>
+#  endif
+#endif
+#include "dapdump.h"
+
+extern CDFnode* v4node;
+
+/* Define the set of protocols known to be constrainable */
+static char* constrainableprotocols[] = {"http", "https",NULL};
+static NCerror buildcdftree34r(NCDAPCOMMON*,OCobject,CDFnode*,CDFtree*,CDFnode**);
+static void defdimensions(OCobject, CDFnode*, NCDAPCOMMON*, CDFtree*);
+static NCerror  attachsubset34r(CDFnode*, CDFnode*);
+static void free1cdfnode34(CDFnode* node);
+
+/* Define Procedures that are common to both
+   libncdap3 and libncdap4
+*/
+
+/* Ensure every node has an initial base name defined and fullname */
+/* Exceptions: anonymous dimensions. */
+static NCerror
+fix1node34(NCDAPCOMMON* nccomm, CDFnode* node)
+{
+    if(node->nctype == NC_Dimension && node->ocname == NULL) return NC_NOERR;
+    ASSERT((node->ocname != NULL));
+    nullfree(node->ncbasename);
+    node->ncbasename = cdflegalname3(node->ocname);
+    if(node->ncbasename == NULL) return NC_ENOMEM;
+    nullfree(node->ncfullname);
+    node->ncfullname = makecdfpathstring3(node,nccomm->cdf.separator);
+    if(node->ncfullname == NULL) return NC_ENOMEM;
+    if(node->nctype == NC_Primitive)
+        node->externaltype = nctypeconvert(nccomm,node->etype);
+    return NC_NOERR;
+}
+
+NCerror
+fixnodes34(NCDAPCOMMON* nccomm, NClist* cdfnodes)
+{
+    int i;
+    for(i=0;i<nclistlength(cdfnodes);i++) {
+	CDFnode* node = (CDFnode*)nclistget(cdfnodes,i);
+	NCerror err = fix1node34(nccomm,node);
+	if(err) return err;
+    }
+    return NC_NOERR;
+}
+
+
+NCerror
+fixgrid34(NCDAPCOMMON* nccomm, CDFnode* grid)
+{
+    unsigned int i,glen;
+    CDFnode* array;
+
+    glen = nclistlength(grid->subnodes);
+    array = (CDFnode*)nclistget(grid->subnodes,0);	        
+    if(nccomm->controls.flags & (NCF_NC3)) {
+        /* Rename grid Array: variable, but leave its oc base name alone */
+        nullfree(array->ncbasename);
+        array->ncbasename = nulldup(grid->ncbasename);
+        if(!array->ncbasename) return NC_ENOMEM;
+    }
+    /* validate and modify the grid structure */
+    if((glen-1) != nclistlength(array->array.dimset0)) goto invalid;
+    for(i=1;i<glen;i++) {
+	CDFnode* arraydim = (CDFnode*)nclistget(array->array.dimset0,i-1);
+	CDFnode* map = (CDFnode*)nclistget(grid->subnodes,i);
+	CDFnode* mapdim;
+	/* map must have 1 dimension */
+	if(nclistlength(map->array.dimset0) != 1) goto invalid;
+	/* and the map name must match the ith array dimension */
+	if(arraydim->ocname != NULL && map->ocname != NULL
+	   && strcmp(arraydim->ocname,map->ocname) != 0)
+	    goto invalid;
+	/* and the map name must match its dim name (if any) */
+	mapdim = (CDFnode*)nclistget(map->array.dimset0,0);
+	if(mapdim->ocname != NULL && map->ocname != NULL
+	   && strcmp(mapdim->ocname,map->ocname) != 0)
+	    goto invalid;
+	/* Add appropriate names for the anonymous dimensions */
+	/* Do the map name first, so the array dim may inherit */
+	if(mapdim->ocname == NULL) {
+	    nullfree(mapdim->ncbasename);
+	    mapdim->ocname = nulldup(map->ocname);
+	    if(!mapdim->ocname) return NC_ENOMEM;
+	    mapdim->ncbasename = cdflegalname3(mapdim->ocname);
+	    if(!mapdim->ncbasename) return NC_ENOMEM;
+	}
+	if(arraydim->ocname == NULL) {
+	    nullfree(arraydim->ncbasename);
+	    arraydim->ocname = nulldup(map->ocname);
+	    if(!arraydim->ocname) return NC_ENOMEM;
+	    arraydim->ncbasename = cdflegalname3(arraydim->ocname);
+	    if(!arraydim->ncbasename) return NC_ENOMEM;
+	}
+        if(FLAGSET(nccomm->controls,(NCF_NCDAP|NCF_NC3))) {
+	    char tmp[3*NC_MAX_NAME];
+            /* Add the grid name to the basename of the map */
+	    snprintf(tmp,sizeof(tmp),"%s%s%s",map->container->ncbasename,
+					  nccomm->cdf.separator,
+					  map->ncbasename);
+	    nullfree(map->ncbasename);
+            map->ncbasename = nulldup(tmp);
+	    if(!map->ncbasename) return NC_ENOMEM;
+	}
+    }
+    return NC_NOERR;
+invalid:
+    return NC_EINVAL; /* mal-formed grid */
+}
+
+/**
+ *  Given an anonymous dimension, compute the
+ *  effective 0-based index wrt to the specified var.
+ *  The result should mimic the libnc-dap indices.
+ */
+
+static void
+computedimindexanon3(CDFnode* dim, CDFnode* var)
+{
+    int i;
+    NClist* dimset = var->array.dimsetall;
+    for(i=0;i<nclistlength(dimset);i++) {
+	CDFnode* candidate = (CDFnode*)nclistget(dimset,i);
+        if(dim == candidate) {
+	   dim->dim.index1=i+1;
+	   return;
+	}
+    }
+}
+
+/* Replace dims in a list with their corresponding basedim */
+static void
+replacedims(NClist* dims)
+{
+    int i;
+    for(i=0;i<nclistlength(dims);i++) {
+        CDFnode* dim = (CDFnode*)nclistget(dims,i);
+	CDFnode* basedim = dim->dim.basedim;
+	if(basedim == NULL) continue;
+	nclistset(dims,i,(ncelem)basedim);
+    }
+}
+
+/**
+ Two dimensions are equivalent if
+ 1. they have the same size
+ 2. neither are anonymous
+ 3. they ave the same names. 
+ */
+static int
+equivalentdim(CDFnode* basedim, CDFnode* dupdim)
+{
+    if(dupdim->dim.declsize != basedim->dim.declsize) return 0;
+    if(basedim->ocname == NULL && dupdim->ocname == NULL) return 0;
+    if(basedim->ocname == NULL || dupdim->ocname == NULL) return 0;
+    if(strcmp(dupdim->ocname,basedim->ocname) != 0) return 0;
+    return 1;
+}
+
+/*
+   Provide short and/or unified names for dimensions.
+   This must mimic lib-ncdap, which is difficult.
+*/
+NCerror
+computecdfdimnames34(NCDAPCOMMON* nccomm)
+{
+    int i,j;
+    char tmp[NC_MAX_NAME*2];
+    NClist* conflicts = nclistnew();
+    NClist* varnodes = nccomm->cdf.varnodes;
+    NClist* alldims;
+    NClist* basedims;
+    
+    /* Collect all dimension nodes from dimsetall lists */
+
+    alldims = getalldims34(nccomm,0);    
+
+    /* Assign an index to all anonymous dimensions
+       vis-a-vis its containing variable
+    */
+    for(i=0;i<nclistlength(varnodes);i++) {
+	CDFnode* var = (CDFnode*)nclistget(varnodes,i);
+        for(j=0;j<nclistlength(var->array.dimsetall);j++) {
+	    CDFnode* dim = (CDFnode*)nclistget(var->array.dimsetall,j);
+	    if(dim->ocname != NULL) continue; /* not anonymous */
+ 	    computedimindexanon3(dim,var);
+	}
+    }
+
+    /* Unify dimensions by defining one dimension as the "base"
+       dimension, and make all "equivalent" dimensions point to the
+       base dimension.
+	1. Equivalent means: same size and both have identical non-null names.
+	2. Dims with same name but different sizes will be handled separately
+    */
+    for(i=0;i<nclistlength(alldims);i++) {
+	CDFnode* dupdim = NULL;
+	CDFnode* basedim = (CDFnode*)nclistget(alldims,i);
+	if(basedim == NULL) continue;
+	if(basedim->dim.basedim != NULL) continue; /* already processed*/
+	for(j=i+1;j<nclistlength(alldims);j++) { /* Sigh, n**2 */
+	    dupdim = (CDFnode*)nclistget(alldims,j);
+	    if(basedim == dupdim) continue;
+	    if(dupdim == NULL) continue;
+	    if(dupdim->dim.basedim != NULL) continue; /* already processed */
+	    if(!equivalentdim(basedim,dupdim))
+		continue;
+            dupdim->dim.basedim = basedim; /* equate */
+#ifdef DEBUG1
+fprintf(stderr,"assign: %s/%s -> %s/%s\n",
+basedim->dim.array->ocname,basedim->ocname,
+dupdim->dim.array->ocname,dupdim->ocname
+);
+#endif
+	}
+    }
+
+    /* Next case: same name and different sizes*/
+    /* => rename second dim */
+
+    for(i=0;i<nclistlength(alldims);i++) {
+	CDFnode* basedim = (CDFnode*)nclistget(alldims,i);
+	if(basedim->dim.basedim != NULL) continue;
+	/* Collect all conflicting dimensions */
+	nclistclear(conflicts);
+        for(j=i+1;j<nclistlength(alldims);j++) {
+	    CDFnode* dim = (CDFnode*)nclistget(alldims,j);
+	    if(dim->dim.basedim != NULL) continue;
+	    if(dim->ocname == NULL && basedim->ocname == NULL) continue;
+	    if(dim->ocname == NULL || basedim->ocname == NULL) continue;
+	    if(strcmp(dim->ocname,basedim->ocname)!=0) continue;
+	    if(dim->dim.declsize == basedim->dim.declsize) continue;
+#ifdef DEBUG2
+fprintf(stderr,"conflict: %s[%lu] %s[%lu]\n",
+			basedim->ncfullname,(unsigned long)basedim->dim.declsize,
+			dim->ncfullname,(unsigned long)dim->dim.declsize);
+#endif
+	    nclistpush(conflicts,(ncelem)dim);
+	}
+	/* Give  all the conflicting dimensions an index */
+	for(j=0;j<nclistlength(conflicts);j++) {
+	    CDFnode* dim = (CDFnode*)nclistget(conflicts,j);
+	    dim->dim.index1 = j+1;
+	}
+    }
+    nclistfree(conflicts);
+
+    /* Replace all non-base dimensions with their base dimension */
+    for(i=0;i<nclistlength(varnodes);i++) {
+	CDFnode* node = (CDFnode*)nclistget(varnodes,i);
+	replacedims(node->array.dimsetall);
+	replacedims(node->array.dimsetplus);
+	replacedims(node->array.dimset0);
+    }
+
+    /* Collect list of all basedims */
+    basedims = nclistnew();
+    for(i=0;i<nclistlength(alldims);i++) {
+	CDFnode* dim = (CDFnode*)nclistget(alldims,i);
+	if(dim->dim.basedim == NULL) {
+	    if(!nclistcontains(basedims,(ncelem)dim)) {
+		nclistpush(basedims,(ncelem)dim);
+	    }
+	}
+    }
+
+    nccomm->cdf.dimnodes = basedims;
+
+    /* cleanup */
+    nclistfree(alldims);
+
+    /* Assign ncbasenames and ncfullnames to base dimensions */
+    for(i=0;i<nclistlength(basedims);i++) {
+	CDFnode* dim = (CDFnode*)nclistget(basedims,i);
+	CDFnode* var = dim->dim.array;
+	if(dim->dim.basedim != NULL) PANIC1("nonbase basedim: %s\n",dim->ocname);
+	/* stringdim names are already assigned */
+	if(dim->ocname == NULL) { /* anonymous: use the index to compute the name */
+            snprintf(tmp,sizeof(tmp),"%s_%d",
+                            var->ncfullname,dim->dim.index1-1);
+            nullfree(dim->ncbasename);
+            dim->ncbasename = cdflegalname3(tmp);
+            nullfree(dim->ncfullname);
+            dim->ncfullname = nulldup(dim->ncbasename);
+    	} else { /* !anonymous; use index1 if defined */
+   	    char* legalname = cdflegalname3(dim->ocname);
+	    nullfree(dim->ncbasename);
+	    if(dim->dim.index1 > 0) {/* need to fix conflicting names (see above) */
+	        char sindex[64];
+		snprintf(sindex,sizeof(sindex),"_%d",dim->dim.index1);
+		dim->ncbasename = (char*)malloc(strlen(sindex)+strlen(legalname)+1);
+		if(dim->ncbasename == NULL) return NC_ENOMEM;
+		strcpy(dim->ncbasename,legalname);
+		strcat(dim->ncbasename,sindex);
+		nullfree(legalname);
+	    } else {/* standard case */
+	        dim->ncbasename = legalname;
+	    }
+    	    nullfree(dim->ncfullname);
+	    dim->ncfullname = nulldup(dim->ncbasename);
+	}
+     }
+
+    /* Verify unique and defined names for dimensions*/
+    for(i=0;i<nclistlength(basedims);i++) {
+	CDFnode* dim1 = (CDFnode*)nclistget(basedims,i);
+	if(dim1->dim.basedim != NULL) PANIC1("nonbase basedim: %s\n",dim1->ncbasename);
+	if(dim1->ncbasename == NULL || dim1->ncfullname == NULL)
+	    PANIC1("missing dim names: %s",dim1->ocname);
+	/* search backward so we can delete duplicates */
+	for(j=nclistlength(basedims)-1;j>i;j--) {
+	    CDFnode* dim2 = (CDFnode*)nclistget(basedims,j);
+	    if(strcmp(dim1->ncfullname,dim2->ncfullname)==0) {
+		/* complain and suppress one of them */
+		fprintf(stderr,"duplicate dim names: %s[%lu] %s[%lu]\n",
+			dim1->ncfullname,(unsigned long)dim1->dim.declsize,
+			dim2->ncfullname,(unsigned long)dim2->dim.declsize);
+		nclistremove(basedims,j);
+	    }
+	}
+    }
+
+#ifdef DEBUG
+for(i=0;i<nclistlength(basedims);i++) {
+CDFnode* dim = (CDFnode*)nclistget(basedims,i);
+fprintf(stderr,"basedim: %s=%ld\n",dim->ncfullname,(long)dim->dim.declsize);
+ }
+#endif
+
+    return NC_NOERR;
+}
+
+NCerror
+makegetvar34(NCDAPCOMMON* nccomm, CDFnode* var, void* data, nc_type dsttype, Getvara** getvarp)
+{
+    Getvara* getvar;
+    NCerror ncstat = NC_NOERR;
+
+    getvar = (Getvara*)calloc(1,sizeof(Getvara));
+    MEMCHECK(getvar,NC_ENOMEM);
+    if(getvarp) *getvarp = getvar;
+
+    getvar->target = var;
+    getvar->memory = data;
+    getvar->dsttype = dsttype;
+    getvar->target = var;
+    if(ncstat) nullfree(getvar);
+    return ncstat;
+}
+
+int
+constrainable34(NC_URI* durl)
+{
+   char** protocol = constrainableprotocols;
+   for(;*protocol;protocol++) {
+	if(strcmp(durl->protocol,*protocol)==0)
+	    return 1;
+   }
+   return 0;
+}
+
+CDFnode*
+makecdfnode34(NCDAPCOMMON* nccomm, char* name, OCtype octype,
+             /*optional*/ OCobject ocnode, CDFnode* container)
+{
+    CDFnode* node;
+    assert(nccomm != NULL);
+    node = (CDFnode*)calloc(1,sizeof(CDFnode));
+    if(node == NULL) return (CDFnode*)NULL;
+
+    node->ocname = NULL;
+    if(name) {
+        size_t len = strlen(name);
+        if(len >= NC_MAX_NAME) len = NC_MAX_NAME-1;
+        node->ocname = (char*)malloc(len+1);
+	if(node->ocname == NULL) return NULL;
+	memcpy(node->ocname,name,len);
+	node->ocname[len] = '\0';
+    }
+    node->nctype = octypetonc(octype);
+    node->ocnode = ocnode;
+    node->subnodes = nclistnew();
+    node->container = container;
+    if(ocnode != OCNULL) {
+	oc_inq_primtype(nccomm->oc.conn,ocnode,&octype);
+        node->etype = octypetonc(octype);
+    }
+    return node;
+}
+
+/* Given an OCnode tree, mimic it as a CDFnode tree;
+   Add DAS attributes if DAS is available. Accumulate set
+   of all nodes in preorder.
+*/
+NCerror
+buildcdftree34(NCDAPCOMMON* nccomm, OCobject ocroot, OCdxd occlass, CDFnode** cdfrootp)
+{
+    CDFnode* root = NULL;
+    CDFtree* tree = (CDFtree*)calloc(1,sizeof(CDFtree));
+    NCerror err = NC_NOERR;
+    tree->ocroot = ocroot;
+    tree->nodes = nclistnew();
+    tree->occlass = occlass;
+    tree->owner = nccomm;
+
+    err = buildcdftree34r(nccomm,ocroot,NULL,tree,&root);
+    if(!err) {
+	if(occlass != OCDAS)
+	    fixnodes34(nccomm,tree->nodes);
+	if(cdfrootp) *cdfrootp = root;
+    }
+    return err;
+}        
+
+static NCerror
+buildcdftree34r(NCDAPCOMMON* nccomm, OCobject ocnode, CDFnode* container,
+                CDFtree* tree, CDFnode** cdfnodep)
+{
+    unsigned int i,ocrank,ocnsubnodes;
+    OCtype octype;
+    char* ocname = NULL;
+    NCerror ncerr = NC_NOERR;
+    CDFnode* cdfnode;
+
+    oc_inq_class(nccomm->oc.conn,ocnode,&octype);
+    oc_inq_name(nccomm->oc.conn,ocnode,&ocname);
+    oc_inq_rank(nccomm->oc.conn,ocnode,&ocrank);
+    oc_inq_nsubnodes(nccomm->oc.conn,ocnode,&ocnsubnodes);
+
+    switch (octype) {
+    case OC_Dataset:
+    case OC_Grid:
+    case OC_Structure:
+    case OC_Sequence:
+    case OC_Primitive:
+	cdfnode = makecdfnode34(nccomm,ocname,octype,ocnode,container);
+	nclistpush(tree->nodes,(ncelem)cdfnode);
+	if(tree->root == NULL) {
+	    tree->root = cdfnode;
+	    cdfnode->tree = tree;
+	}		
+	break;
+
+    case OC_Dimension:
+    default: PANIC1("buildcdftree: unexpect OC node type: %d",(int)octype);
+
+    }    
+    /* cross link */
+    cdfnode->root = tree->root;
+
+    if(ocrank > 0) defdimensions(ocnode,cdfnode,nccomm,tree);
+    for(i=0;i<ocnsubnodes;i++) {
+	OCobject ocsubnode;
+	CDFnode* subnode;
+	oc_inq_ith(nccomm->oc.conn,ocnode,i,&ocsubnode);
+	ncerr = buildcdftree34r(nccomm,ocsubnode,cdfnode,tree,&subnode);
+	if(ncerr) return ncerr;
+	nclistpush(cdfnode->subnodes,(ncelem)subnode);
+    }
+    nullfree(ocname);
+    if(cdfnodep) *cdfnodep = cdfnode;
+    return ncerr;
+}
+
+static void
+defdimensions(OCobject ocnode, CDFnode* cdfnode, NCDAPCOMMON* nccomm, CDFtree* tree)
+{
+    unsigned int i,ocrank;
+ 
+    oc_inq_rank(nccomm->oc.conn,ocnode,&ocrank);
+    assert(ocrank > 0);
+    for(i=0;i<ocrank;i++) {
+	CDFnode* cdfdim;
+	OCobject ocdim;
+	char* ocname;
+	size_t declsize;
+
+	oc_inq_ithdim(nccomm->oc.conn,ocnode,i,&ocdim);
+	oc_inq_dim(nccomm->oc.conn,ocdim,&declsize,&ocname);
+
+	cdfdim = makecdfnode34(nccomm,ocname,OC_Dimension,
+                              ocdim,cdfnode->container);
+	nullfree(ocname);
+	nclistpush(tree->nodes,(ncelem)cdfdim);
+	/* Initially, constrained and unconstrained are same */
+	cdfdim->dim.declsize = declsize;
+	cdfdim->dim.array = cdfnode;
+	if(cdfnode->array.dimset0 == NULL) 
+	    cdfnode->array.dimset0 = nclistnew();
+	nclistpush(cdfnode->array.dimset0,(ncelem)cdfdim);
+    }    
+}
+
+/* Note: this routine only applies some common
+   client parameters, other routines may apply
+   specific ones.
+*/
+
+NCerror
+applyclientparams34(NCDAPCOMMON* nccomm)
+{
+    int i,len;
+    int dfaltstrlen = DEFAULTSTRINGLENGTH;
+    int dfaltseqlim = DEFAULTSEQLIMIT;
+    const char* value;
+    char tmpname[NC_MAX_NAME+32];
+    char* pathstr;
+    OCconnection conn = nccomm->oc.conn;
+    unsigned long limit;
+
+    ASSERT(nccomm->oc.url != NULL);
+
+    nccomm->cdf.cache->cachelimit = DFALTCACHELIMIT;
+    value = oc_clientparam_get(conn,"cachelimit");
+    limit = getlimitnumber(value);
+    if(limit > 0) nccomm->cdf.cache->cachelimit = limit;
+
+    nccomm->cdf.fetchlimit = DFALTFETCHLIMIT;
+    value = oc_clientparam_get(conn,"fetchlimit");
+    limit = getlimitnumber(value);
+    if(limit > 0) nccomm->cdf.fetchlimit = limit;
+
+    nccomm->cdf.smallsizelimit = DFALTSMALLLIMIT;
+    value = oc_clientparam_get(conn,"smallsizelimit");
+    limit = getlimitnumber(value);
+    if(limit > 0) nccomm->cdf.smallsizelimit = limit;
+
+    nccomm->cdf.cache->cachecount = DFALTCACHECOUNT;
+#ifdef HAVE_GETRLIMIT
+    { struct rlimit rl;
+      if(getrlimit(RLIMIT_NOFILE, &rl) >= 0) {
+	nccomm->cdf.cache->cachecount = (size_t)(rl.rlim_cur / 2);
+      }
+    }
+#endif
+    value = oc_clientparam_get(conn,"cachecount");
+    limit = getlimitnumber(value);
+    if(limit > 0) nccomm->cdf.cache->cachecount = limit;
+    /* Ignore limit if not caching */
+    if(!FLAGSET(nccomm->controls,NCF_CACHE))
+        nccomm->cdf.cache->cachecount = 0;
+
+    if(oc_clientparam_get(conn,"nolimit") != NULL)
+	dfaltseqlim = 0;
+    value = oc_clientparam_get(conn,"limit");
+    if(value != NULL && strlen(value) != 0) {
+        if(sscanf(value,"%d",&len) && len > 0) dfaltseqlim = len;
+    }
+    nccomm->cdf.defaultsequencelimit = dfaltseqlim;
+
+    /* allow embedded _ */
+    value = oc_clientparam_get(conn,"stringlength");
+    if(value != NULL && strlen(value) != 0) {
+        if(sscanf(value,"%d",&len) && len > 0) dfaltstrlen = len;
+    }
+    nccomm->cdf.defaultstringlength = dfaltstrlen;
+
+    /* String dimension limits apply to variables */
+    for(i=0;i<nclistlength(nccomm->cdf.varnodes);i++) {
+	CDFnode* var = (CDFnode*)nclistget(nccomm->cdf.varnodes,i);
+	/* Define the client param stringlength for this variable*/
+	var->maxstringlength = 0; /* => use global dfalt */
+	strcpy(tmpname,"stringlength_");
+	pathstr = makeocpathstring3(conn,var->ocnode,".");
+	strcat(tmpname,pathstr);
+	nullfree(pathstr);
+	value = oc_clientparam_get(conn,tmpname);	
+        if(value != NULL && strlen(value) != 0) {
+            if(sscanf(value,"%d",&len) && len > 0) var->maxstringlength = len;
+	}
+    }
+    /* Sequence limits apply to sequences */
+    for(i=0;i<nclistlength(nccomm->cdf.ddsroot->tree->nodes);i++) {
+	CDFnode* var = (CDFnode*)nclistget(nccomm->cdf.ddsroot->tree->nodes,i);
+	if(var->nctype != NC_Sequence) continue;
+	var->sequencelimit = dfaltseqlim;
+	strcpy(tmpname,"nolimit_");
+	pathstr = makeocpathstring3(conn,var->ocnode,".");
+	strcat(tmpname,pathstr);
+	if(oc_clientparam_get(conn,tmpname) != NULL)
+	    var->sequencelimit = 0;
+	strcpy(tmpname,"limit_");
+	strcat(tmpname,pathstr);
+	value = oc_clientparam_get(conn,tmpname);
+        if(value != NULL && strlen(value) != 0) {
+            if(sscanf(value,"%d",&len) && len > 0)
+		var->sequencelimit = len;
+	}
+	nullfree(pathstr);
+    }
+
+    /* test for the appropriate fetch flags */
+    value = oc_clientparam_get(conn,"fetch");
+    if(value != NULL && strlen(value) > 0) {
+	if(value[0] == 'd' || value[0] == 'D') {
+            SETFLAG(nccomm->controls,NCF_ONDISK);
+	}
+    }
+
+    /* test for the force-whole-var flag */
+    value = oc_clientparam_get(conn,"wholevar");
+    if(value != NULL) {
+        SETFLAG(nccomm->controls,NCF_WHOLEVAR);
+    }
+
+    return NC_NOERR;
+}
+
+void
+freecdfroot34(CDFnode* root)
+{
+    int i;
+    CDFtree* tree;
+    NCDAPCOMMON* nccomm;
+    if(root == NULL) return;
+    tree = root->tree;
+    ASSERT((tree != NULL));
+    /* Explicitly FREE the ocroot */
+    nccomm = tree->owner;
+    oc_root_free(nccomm->oc.conn,tree->ocroot);
+    tree->ocroot = OCNULL;
+    for(i=0;i<nclistlength(tree->nodes);i++) {
+	CDFnode* node = (CDFnode*)nclistget(tree->nodes,i);
+	free1cdfnode34(node);
+    }
+    nclistfree(tree->nodes);
+    nullfree(tree);
+}
+
+/* Free up a single node, but not any
+   nodes it points to.
+*/  
+static void
+free1cdfnode34(CDFnode* node)
+{
+    unsigned int j,k;
+    if(node == NULL) return;
+    nullfree(node->ocname);
+    nullfree(node->ncbasename);
+    nullfree(node->ncfullname);
+    if(node->attributes != NULL) {
+	for(j=0;j<nclistlength(node->attributes);j++) {
+	    NCattribute* att = (NCattribute*)nclistget(node->attributes,j);
+	    nullfree(att->name);
+	    for(k=0;k<nclistlength(att->values);k++)
+		nullfree((char*)nclistget(att->values,k));
+	    nclistfree(att->values);
+	    nullfree(att);
+	}
+    }
+    nullfree(node->dodsspecial.dimname);
+    nclistfree(node->subnodes);
+    nclistfree(node->attributes);
+    nclistfree(node->array.dimsetplus);
+    nclistfree(node->array.dimsetall);
+    nclistfree(node->array.dimset0);
+
+    /* Clean up the ncdap4 fields also */
+    nullfree(node->typename);
+    nullfree(node->vlenname);
+    nullfree(node);
+}
+
+/* Return true if node and node1 appear to refer to the same thing;
+   takes grid->structure changes into account.
+*/
+int
+nodematch34(CDFnode* node1, CDFnode* node2)
+{
+    return simplenodematch34(node1,node2);
+}
+
+int
+simplenodematch34(CDFnode* node1, CDFnode* node2)
+{
+    if(node1 == NULL) return (node2==NULL);
+    if(node2 == NULL) return 0;
+    if(node1->nctype != node2->nctype) {
+	/* Check for Grid->Structure match */
+	if((node1->nctype == NC_Structure && node2->nctype == NC_Grid)
+	   || (node2->nctype == NC_Structure && node1->nctype == NC_Grid)){
+	   if(node1->ocname == NULL || node2->ocname == NULL
+	      || strcmp(node1->ocname,node2->ocname) !=0) return 0;	    	
+	} else return 0;
+    }
+    /* Add hack to address the screwed up Columbia server */
+    if(node1->nctype == NC_Dataset) return 1;
+    if(node1->nctype == NC_Primitive
+       && node1->etype != node2->etype) return 0;
+    if(node1->ocname != NULL && node2->ocname != NULL
+       && strcmp(node1->ocname,node2->ocname)!=0) return 0;
+    if(nclistlength(node1->array.dimset0)
+       != nclistlength(node2->array.dimset0)) return 0;
+    return 1;
+}
+
+/*
+Given DDS node, locate the node
+in a DATADDS that matches the DDS node.
+Return NULL if no node found
+*/
+
+void
+unattach34(CDFnode* root)
+{
+    unsigned int i;
+    CDFtree* xtree = root->tree;
+    for(i=0;i<nclistlength(xtree->nodes);i++) {
+	CDFnode* xnode = (CDFnode*)nclistget(xtree->nodes,i);
+	/* break bi-directional link */
+        xnode->attachment = NULL;
+    }
+}
+
+static void
+setattach(CDFnode* target, CDFnode* template)
+{
+    target->attachment = template;
+    template->attachment = target;
+    /* Transfer important information */
+    target->externaltype = template->externaltype;
+    target->maxstringlength = template->maxstringlength;
+    target->sequencelimit = template->sequencelimit;
+    target->ncid = template->ncid;
+    /* also transfer libncdap4 info */
+    target->typeid = template->typeid;
+    target->typesize = template->typesize;
+}
+
+static NCerror
+attachdims34(CDFnode* xnode, CDFnode* template)
+{
+    unsigned int i;
+    for(i=0;i<nclistlength(xnode->array.dimsetall);i++) {
+	CDFnode* xdim = (CDFnode*)nclistget(xnode->array.dimsetall,i);
+	CDFnode* tdim = (CDFnode*)nclistget(template->array.dimsetall,i);
+	setattach(xdim,tdim);
+#ifdef DEBUG2
+fprintf(stderr,"attachdim: %s->%s\n",xdim->ocname,tdim->ocname);
+#endif
+    }
+    return NC_NOERR;
+}
+
+/* 
+Match a DATADDS node to a DDS node.
+It is assumed that both trees have been regridded if necessary.
+*/
+
+static NCerror
+attach34r(CDFnode* xnode, NClist* templatepath, int depth)
+{
+    unsigned int i,plen,lastnode,gridable;
+    NCerror ncstat = NC_NOERR;
+    CDFnode* templatepathnode;
+    CDFnode* templatepathnext;
+
+    plen = nclistlength(templatepath);
+    if(depth >= plen) {THROWCHK(ncstat=NC_EINVAL); goto done;}
+
+    lastnode = (depth == (plen-1));
+    templatepathnode = (CDFnode*)nclistget(templatepath,depth);
+    ASSERT((simplenodematch34(xnode,templatepathnode)));
+    setattach(xnode,templatepathnode);    
+#ifdef DEBUG2
+fprintf(stderr,"attachnode: %s->%s\n",xnode->ocname,templatepathnode->ocname);
+#endif
+
+    if(lastnode) goto done; /* We have the match and are done */
+
+    if(nclistlength(xnode->array.dimsetall) > 0) {
+	attachdims34(xnode,templatepathnode);
+    }
+
+    ASSERT((!lastnode));
+    templatepathnext = (CDFnode*)nclistget(templatepath,depth+1);
+
+    gridable = (templatepathnext->nctype == NC_Grid && depth+2 < plen);
+
+    /* Try to find an xnode subnode that matches templatepathnext */
+    for(i=0;i<nclistlength(xnode->subnodes);i++) {
+        CDFnode* xsubnode = (CDFnode*)nclistget(xnode->subnodes,i);
+        if(simplenodematch34(xsubnode,templatepathnext)) {
+	    ncstat = attach34r(xsubnode,templatepath,depth+1);
+	    if(ncstat) goto done;
+        } else if(gridable && xsubnode->nctype == NC_Primitive) {
+            /* grids may or may not appear in the datadds;
+	       try to match the xnode subnodes against the parts of the grid
+	    */
+   	    CDFnode* templatepathnext2 = (CDFnode*)nclistget(templatepath,depth+2);
+	    if(simplenodematch34(xsubnode,templatepathnext2)) {
+	        ncstat = attach34r(xsubnode,templatepath,depth+2);
+                if(ncstat) goto done;
+	    }
+	}
+    }
+done:
+    return THROW(ncstat);
+}
+
+NCerror
+attach34(CDFnode* xroot, CDFnode* template)
+{
+    NCerror ncstat = NC_NOERR;
+    NClist* templatepath = nclistnew();
+    CDFnode* ddsroot = template->root;
+
+    if(xroot->attachment) unattach34(xroot);
+    if(ddsroot != NULL && ddsroot->attachment) unattach34(ddsroot);
+    if(!simplenodematch34(xroot,ddsroot))
+	{THROWCHK(ncstat=NC_EINVAL); goto done;}
+    collectnodepath3(template,templatepath,WITHDATASET);
+    ncstat = attach34r(xroot,templatepath,0);
+done:
+    nclistfree(templatepath);
+    return ncstat;
+}
+
+/* 
+Match nodes in template tree to nodes in target tree;
+template tree is typically a structural superset of target tree.
+WARNING: Dimensions are not attached 
+*/
+
+NCerror
+attachsubset34(CDFnode* target, CDFnode* template)
+{
+    NCerror ncstat = NC_NOERR;
+
+    if(template == NULL) {THROWCHK(ncstat=NC_NOERR); goto done;}
+    if(!nodematch34(target,template)) {THROWCHK(ncstat=NC_EINVAL); goto done;}
+#ifdef DEBUG2
+fprintf(stderr,"attachsubset: target=%s\n",dumptree(target));
+fprintf(stderr,"attachsubset: template=%s\n",dumptree(template));
+#endif
+    ncstat = attachsubset34r(target,template);
+done:
+    return ncstat;
+}
+
+static NCerror
+attachsubset34r(CDFnode* target, CDFnode* template)
+{
+    unsigned int i;
+    NCerror ncstat = NC_NOERR;
+    int fieldindex;
+
+#ifdef DEBUG2
+fprintf(stderr,"attachsubsetr: attach: target=%s template=%s\n",
+	target->ocname,template->ocname);
+#endif
+
+    ASSERT((nodematch34(target,template)));
+    setattach(target,template);
+
+    /* Try to match target subnodes against template subnodes */
+
+    fieldindex = 0;
+    for(fieldindex=0,i=0;i<nclistlength(template->subnodes) && fieldindex<nclistlength(target->subnodes);i++) {
+        CDFnode* templatesubnode = (CDFnode*)nclistget(template->subnodes,i);
+        CDFnode* targetsubnode = (CDFnode*)nclistget(target->subnodes,fieldindex);
+        if(nodematch34(targetsubnode,templatesubnode)) {
+#ifdef DEBUG2
+fprintf(stderr,"attachsubsetr: match: %s :: %s\n",targetsubnode->ocname,templatesubnode->ocname);
+#endif
+            ncstat = attachsubset34r(targetsubnode,templatesubnode);
+   	    if(ncstat) goto done;
+	    fieldindex++;
+	}
+    }
+done:
+    return THROW(ncstat);
+}
+
+static void
+getalldims34a(NClist* dimset, NClist* alldims)
+{
+    int i;
+    for(i=0;i<nclistlength(dimset);i++) {
+	CDFnode* dim = (CDFnode*)nclistget(dimset,i);
+	if(!nclistcontains(alldims,(ncelem)dim)) {
+#ifdef DEBUG3
+fprintf(stderr,"getalldims: %s[%lu]\n",
+			dim->ncfullname,(unsigned long)dim->dim.declsize);
+#endif
+	    nclistpush(alldims,(ncelem)dim);
+	}
+    }
+}
+
+/* Accumulate a set of all the known dimensions
+   vis-a-vis defined variables
+*/
+NClist*
+getalldims34(NCDAPCOMMON* nccomm, int visibleonly)
+{
+    int i;
+    NClist* alldims = nclistnew();
+    NClist* varnodes = nccomm->cdf.varnodes;
+
+    /* get bag of all dimensions */
+    for(i=0;i<nclistlength(varnodes);i++) {
+	CDFnode* node = (CDFnode*)nclistget(varnodes,i);
+	if(!visibleonly || node->visible) {
+	    getalldims34a(node->array.dimsetall,alldims);
+	}
+    }
+    return alldims;
+}
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/src_netcdf4/config.h
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/src_netcdf4/config.h	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/src_netcdf4/config.h	(revision 1749)
@@ -0,0 +1,474 @@
+/* config.h.  Generated from config.h.in by configure.  */
+/* config.h.in.  Generated from configure.ac by autoheader.  */
+
+/* Define if building universal (internal helper macro) */
+/* #undef AC_APPLE_UNIVERSAL_BUILD */
+
+/* if true, build RPC Client and Server */
+/* #undef BUILD_RPC */
+
+/* default file chunk cache nelems. */
+#define CHUNK_CACHE_NELEMS 1009
+
+/* default file chunk cache preemption policy. */
+#define CHUNK_CACHE_PREEMPTION 0.75
+
+/* default file chunk cache size in bytes. */
+#define CHUNK_CACHE_SIZE 4194304
+
+/* Define to one of `_getb67', `GETB67', `getb67' for Cray-2 and Cray-YMP
+   systems. This function is required for `alloca.c' support on those systems.
+   */
+/* #undef CRAY_STACKSEG_END */
+
+/* Define to 1 if using `alloca.c'. */
+/* #undef C_ALLOCA */
+
+/* num chunks in default per-var chunk cache. */
+#define DEFAULT_CHUNKS_IN_CACHE 10
+
+/* default chunk size in bytes */
+#define DEFAULT_CHUNK_SIZE 4194304
+
+/* set this only when building a DLL under MinGW */
+/* #undef DLL_EXPORT */
+
+/* set this only when building a DLL under MinGW */
+/* #undef DLL_NETCDF */
+
+/* if true, build DAP Client */
+#define ENABLE_DAP 1
+
+/* if true, enable DAP group names */
+#define ENABLE_DAP_GROUPS 1
+
+/* if true, do remote tests */
+#define ENABLE_DAP_REMOTE_TESTS 1
+
+/* if true, run extra tests which may not work yet */
+/* #undef EXTRA_TESTS */
+
+/* use HDF5 1.6 API */
+#define H5_USE_16_API 1
+
+/* Define to 1 if you have `alloca', as a function or macro. */
+#define HAVE_ALLOCA 1
+
+/* Define to 1 if you have <alloca.h> and it should be used (not on Ultrix).
+   */
+#define HAVE_ALLOCA_H 1
+
+/* Define to 1 if you have the <ctype.h> header file. */
+#define HAVE_CTYPE_H 1
+
+/* Is CURLOPT_KEYPASSWD defined */
+#define HAVE_CURLOPT_KEYPASSWD 1
+
+/* Define to 1 if you have the declaration of `isfinite', and to 0 if you
+   don't. */
+#define HAVE_DECL_ISFINITE 1
+
+/* Define to 1 if you have the declaration of `isinf', and to 0 if you don't.
+   */
+#define HAVE_DECL_ISINF 1
+
+/* Define to 1 if you have the declaration of `isnan', and to 0 if you don't.
+   */
+#define HAVE_DECL_ISNAN 1
+
+/* Define to 1 if you have the declaration of `signbit', and to 0 if you
+   don't. */
+#define HAVE_DECL_SIGNBIT 1
+
+/* Define to 1 if you have the <dirent.h> header file, and it defines `DIR'.
+   */
+#define HAVE_DIRENT_H 1
+
+/* Define to 1 if you have the <dlfcn.h> header file. */
+#define HAVE_DLFCN_H 1
+
+/* Define to 1 if you don't have `vprintf' but do have `_doprnt.' */
+/* #undef HAVE_DOPRNT */
+
+/* Define to 1 if you have the <errno.h> header file. */
+#define HAVE_ERRNO_H 1
+
+/* Define to 1 if you have the <fcntl.h> header file. */
+#define HAVE_FCNTL_H 1
+
+/* Define to 1 if you have the `fsync' function. */
+#define HAVE_FSYNC 1
+
+/* Define to 1 if you have the <getopt.h> header file. */
+#define HAVE_GETOPT_H 1
+
+/* Define to 1 if you have the `getpagesize' function. */
+#define HAVE_GETPAGESIZE 1
+
+/* Define to 1 if you have the `getrlimit' function. */
+#define HAVE_GETRLIMIT 1
+
+/* Define to 1 if you have the `gettimeofday' function. */
+#define HAVE_GETTIMEOFDAY 1
+
+/* Define to 1 if you have the `H5Pget_fapl_mpio' function. */
+#define HAVE_H5PGET_FAPL_MPIO 1
+
+/* Define to 1 if you have the `H5Pget_fapl_mpiposix' function. */
+#define HAVE_H5PGET_FAPL_MPIPOSIX 1
+
+/* Define to 1 if you have the `H5Pset_deflate' function. */
+#define HAVE_H5PSET_DEFLATE 1
+
+/* Define to 1 if you have the `H5Z_SZIP' function. */
+/* #undef HAVE_H5Z_SZIP */
+
+/* Define to 1 if you have the <hdf5.h> header file. */
+#define HAVE_HDF5_H 1
+
+/* Define to 1 if you have the <inttypes.h> header file. */
+#define HAVE_INTTYPES_H 1
+
+/* Define to 1 if you have the `df' library (-ldf). */
+/* #undef HAVE_LIBDF */
+
+/* Define to 1 if you have the `m' library (-lm). */
+#define HAVE_LIBM 1
+
+/* Define to 1 if you have the `mfhdf' library (-lmfhdf). */
+/* #undef HAVE_LIBMFHDF */
+
+/* Define to 1 if you have the `pnetcdf' library (-lpnetcdf). */
+/* #undef HAVE_LIBPNETCDF */
+
+/* Define to 1 if you have the <locale.h> header file. */
+#define HAVE_LOCALE_H 1
+
+/* Define to 1 if the system has the type `longlong'. */
+/* #undef HAVE_LONGLONG */
+
+/* Define to 1 if the system has the type `long long int'. */
+#define HAVE_LONG_LONG_INT 1
+
+/* Define to 1 if you have the <malloc.h> header file. */
+#define HAVE_MALLOC_H 1
+
+/* Define to 1 if you have the `memmove' function. */
+#define HAVE_MEMMOVE 1
+
+/* Define to 1 if you have the <memory.h> header file. */
+#define HAVE_MEMORY_H 1
+
+/* Define to 1 if you have the <mfhdf.h> header file. */
+/* #undef HAVE_MFHDF_H */
+
+/* Define to 1 if you have the `mkstemp' function. */
+#define HAVE_MKSTEMP 1
+
+/* Define to 1 if you have a working `mmap' system call. */
+#define HAVE_MMAP 1
+
+/* Define to 1 if you have the `MPI_Comm_f2c' function. */
+#define HAVE_MPI_COMM_F2C 1
+
+/* Define to 1 if you have the `mremap' function. */
+#define HAVE_MREMAP 1
+
+/* Define to 1 if you have the <ndir.h> header file, and it defines `DIR'. */
+/* #undef HAVE_NDIR_H */
+
+/* Define to 1 if the system has the type `ptrdiff_t'. */
+#define HAVE_PTRDIFF_T 1
+
+/* Define to 1 if you have the `rand' function. */
+#define HAVE_RAND 1
+
+/* Define to 1 if you have the `snprintf' function. */
+#define HAVE_SNPRINTF 1
+
+/* Define to 1 if the system has the type `ssize_t'. */
+#define HAVE_SSIZE_T 1
+
+/* Define to 1 if you have the <stdarg.h> header file. */
+#define HAVE_STDARG_H 1
+
+/* Define to 1 if stdbool.h conforms to C99. */
+#define HAVE_STDBOOL_H 1
+
+/* Define to 1 if you have the <stdint.h> header file. */
+#define HAVE_STDINT_H 1
+
+/* Define to 1 if you have the <stdio.h> header file. */
+#define HAVE_STDIO_H 1
+
+/* Define to 1 if you have the <stdlib.h> header file. */
+#define HAVE_STDLIB_H 1
+
+/* Define to 1 if you have the `strcasecmp' function. */
+#define HAVE_STRCASECMP 1
+
+/* Define to 1 if you have the `strcat' function. */
+#define HAVE_STRCAT 1
+
+/* Define to 1 if you have the `strchr' function. */
+#define HAVE_STRCHR 1
+
+/* Define to 1 if you have the `strcpy' function. */
+#define HAVE_STRCPY 1
+
+/* Define to 1 if you have the `strdup' function. */
+#define HAVE_STRDUP 1
+
+/* Define to 1 if you have the `strerror' function. */
+#define HAVE_STRERROR 1
+
+/* Define to 1 if you have the <strings.h> header file. */
+#define HAVE_STRINGS_H 1
+
+/* Define to 1 if you have the <string.h> header file. */
+#define HAVE_STRING_H 1
+
+/* Define to 1 if you have the `strlcat' function. */
+/* #undef HAVE_STRLCAT */
+
+/* Define to 1 if you have the `strrchr' function. */
+#define HAVE_STRRCHR 1
+
+/* Define to 1 if you have the `strstr' function. */
+#define HAVE_STRSTR 1
+
+/* Define to 1 if you have the `strtod' function. */
+#define HAVE_STRTOD 1
+
+/* Define to 1 if you have the `strtoll' function. */
+#define HAVE_STRTOLL 1
+
+/* Define to 1 if you have the `strtoull' function. */
+#define HAVE_STRTOULL 1
+
+/* Define to 1 if `st_blksize' is member of `struct stat'. */
+#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
+
+/* Define to 1 if your `struct stat' has `st_blksize'. Deprecated, use
+   `HAVE_STRUCT_STAT_ST_BLKSIZE' instead. */
+#define HAVE_ST_BLKSIZE 1
+
+/* Define to 1 if you have the `sysconf' function. */
+#define HAVE_SYSCONF 1
+
+/* Define to 1 if you have the <sys/dir.h> header file, and it defines `DIR'.
+   */
+/* #undef HAVE_SYS_DIR_H */
+
+/* Define to 1 if you have the <sys/ndir.h> header file, and it defines `DIR'.
+   */
+/* #undef HAVE_SYS_NDIR_H */
+
+/* Define to 1 if you have the <sys/param.h> header file. */
+#define HAVE_SYS_PARAM_H 1
+
+/* Define to 1 if you have the <sys/resource.h> header file. */
+#define HAVE_SYS_RESOURCE_H 1
+
+/* Define to 1 if you have the <sys/stat.h> header file. */
+#define HAVE_SYS_STAT_H 1
+
+/* Define to 1 if you have the <sys/time.h> header file. */
+#define HAVE_SYS_TIME_H 1
+
+/* Define to 1 if you have the <sys/types.h> header file. */
+#define HAVE_SYS_TYPES_H 1
+
+/* Define to 1 if you have <sys/wait.h> that is POSIX.1 compatible. */
+#define HAVE_SYS_WAIT_H 1
+
+/* Define to 1 if the system has the type `uchar'. */
+/* #undef HAVE_UCHAR */
+
+/* Define to 1 if you have the <unistd.h> header file. */
+#define HAVE_UNISTD_H 1
+
+/* Define to 1 if the system has the type `unsigned long long int'. */
+#define HAVE_UNSIGNED_LONG_LONG_INT 1
+
+/* Define to 1 if you have the `vprintf' function. */
+#define HAVE_VPRINTF 1
+
+/* Define to 1 if the system has the type `_Bool'. */
+#define HAVE__BOOL 1
+
+/* do large file tests */
+/* #undef LARGE_FILE_TESTS */
+
+/* If true, turn on logging. */
+/* #undef LOGGING */
+
+/* Define to the sub-directory in which libtool stores uninstalled libraries.
+   */
+#define LT_OBJDIR ".libs/"
+
+/* max size of the default per-var chunk cache. */
+#define MAX_DEFAULT_CACHE_SIZE 67108864
+
+/* min blocksize for posixio. */
+#define NCIO_MINBLOCKSIZE 256
+
+/* no IEEE float on this platform */
+/* #undef NO_IEEE_FLOAT */
+
+/* Define to 1 if your C compiler doesn't accept -c and -o together. */
+/* #undef NO_MINUS_C_MINUS_O */
+
+/* do not build the netCDF version 2 API */
+/* #undef NO_NETCDF_2 */
+
+/* no stdlib.h */
+/* #undef NO_STDLIB_H */
+
+/* no sys_types.h */
+/* #undef NO_SYS_TYPES_H */
+
+/* Name of package */
+#define PACKAGE "netcdf"
+
+/* Define to the address where bug reports for this package should be sent. */
+#define PACKAGE_BUGREPORT "support-netcdf@unidata.ucar.edu"
+
+/* Define to the full name of this package. */
+#define PACKAGE_NAME "netCDF"
+
+/* Define to the full name and version of this package. */
+#define PACKAGE_STRING "netCDF 4.2.1.1"
+
+/* Define to the one symbol short name of this package. */
+#define PACKAGE_TARNAME "netcdf"
+
+/* Define to the version of this package. */
+#define PACKAGE_VERSION "4.2.1.1"
+
+/* The size of `double', as computed by sizeof. */
+#define SIZEOF_DOUBLE 8
+
+/* The size of `float', as computed by sizeof. */
+#define SIZEOF_FLOAT 4
+
+/* The size of `int', as computed by sizeof. */
+#define SIZEOF_INT 4
+
+/* The size of `long', as computed by sizeof. */
+#define SIZEOF_LONG 8
+
+/* The size of `long long', as computed by sizeof. */
+#define SIZEOF_LONG_LONG 8
+
+/* The size of `off_t', as computed by sizeof. */
+#define SIZEOF_OFF_T 8
+
+/* The size of `short', as computed by sizeof. */
+#define SIZEOF_SHORT 2
+
+/* The size of `size_t', as computed by sizeof. */
+#define SIZEOF_SIZE_T 8
+
+/* If using the C implementation of alloca, define if you know the
+   direction of stack growth for your system; otherwise it will be
+   automatically deduced at runtime.
+	STACK_DIRECTION > 0 => grows toward higher addresses
+	STACK_DIRECTION < 0 => grows toward lower addresses
+	STACK_DIRECTION = 0 => direction of growth unknown */
+/* #undef STACK_DIRECTION */
+
+/* Define to 1 if you have the ANSI C header files. */
+#define STDC_HEADERS 1
+
+/* Place to put very large netCDF test files. */
+#define TEMP_LARGE "."
+
+/* Define to 1 if you can safely include both <sys/time.h> and <time.h>. */
+#define TIME_WITH_SYS_TIME 1
+
+/* if true, build CDMREMOTE Client */
+/* #undef USE_CDMREMOTE */
+
+/* if true, build DAP Client */
+#define USE_DAP 1
+
+/* if true, include NC_DISKLESS code */
+#define USE_DISKLESS 1
+
+/* set this to use extreme numbers in tests */
+#define USE_EXTREME_NUMBERS 1
+
+/* if true, use ffio instead of posixio */
+/* #undef USE_FFIO */
+
+/* if true, include experimental fsync code */
+#define USE_FSYNC 1
+
+/* if true, use HDF4 too */
+/* #undef USE_HDF4 */
+
+/* If true, use use wget to fetch some sample HDF4 data, and then test against
+   it. */
+/* #undef USE_HDF4_FILE_TESTS */
+
+/* if true, use mmap for in-memory files */
+/* #undef USE_MMAP */
+
+/* if true, build netCDF-4 */
+#define USE_NETCDF4 1
+
+/* if true, parallel netCDF-4 is in use */
+#define USE_PARALLEL 1
+
+/* if true, compile in parallel netCDF-4 based on MPI/IO */
+#define USE_PARALLEL_MPIO 1
+
+/* if true, compile in parallel netCDF-4 based on MPI/POSIX */
+#define USE_PARALLEL_POSIX 1
+
+/* if true, parallel netCDF is used */
+/* #undef USE_PNETCDF */
+
+/* if true, compile in szip compression in netCDF-4 variables */
+/* #undef USE_SZIP */
+
+/* if true, compile in zlib compression in netCDF-4 variables */
+#define USE_ZLIB 1
+
+/* Version number of package */
+#define VERSION "4.2.1.1"
+
+/* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most
+   significant byte first (like Motorola and SPARC, unlike Intel). */
+#if defined AC_APPLE_UNIVERSAL_BUILD
+# if defined __BIG_ENDIAN__
+#  define WORDS_BIGENDIAN 1
+# endif
+#else
+# ifndef WORDS_BIGENDIAN
+/* #  undef WORDS_BIGENDIAN */
+# endif
+#endif
+
+/* Number of bits in a file offset, on hosts where this is settable. */
+/* #undef _FILE_OFFSET_BITS */
+
+/* Define for large files, on AIX-style hosts. */
+/* #undef _LARGE_FILES */
+
+/* Define to 1 if type `char' is unsigned and you are not using gcc.  */
+#ifndef __CHAR_UNSIGNED__
+/* # undef __CHAR_UNSIGNED__ */
+#endif
+
+/* Define to empty if `const' does not conform to ANSI C. */
+/* #undef const */
+
+/* Define to `long int' if <sys/types.h> does not define. */
+/* #undef off_t */
+
+/* Define to `unsigned int' if <sys/types.h> does not define. */
+/* #undef size_t */
+
+#include "ncconfigure.h"
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/src_netcdf4/constraints3.c
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/src_netcdf4/constraints3.c	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/src_netcdf4/constraints3.c	(revision 1749)
@@ -0,0 +1,853 @@
+/*********************************************************************
+ *   Copyright 1993, UCAR/Unidata
+ *   See netcdf/COPYRIGHT file for copying and redistribution conditions.
+ *   $Header: /upc/share/CVS/netcdf-3/libncdce3/constraints3.c,v 1.40 2010/05/27 21:34:07 dmh Exp $
+ *********************************************************************/
+
+#include "ncdap3.h"
+#include "dapodom.h"
+#include "dapdebug.h"
+#include "dapdump.h"
+#include "dceparselex.h"
+
+static void completesegments3(NClist* fullpath, NClist* segments);
+static NCerror qualifyprojectionnames3(DCEprojection* proj);
+static NCerror qualifyprojectionsizes3(DCEprojection* proj);
+static NCerror matchpartialname3(NClist* nodes, NClist* segments, CDFnode** nodep);
+static int matchsuffix3(NClist* matchpath, NClist* segments);
+static int iscontainer(CDFnode* node);
+static DCEprojection* projectify(CDFnode* field, DCEprojection* container);
+static int slicematch(NClist* seglist1, NClist* seglist2);
+
+/* Parse incoming url constraints, if any,
+   to check for syntactic correctness */ 
+NCerror
+parsedapconstraints(NCDAPCOMMON* dapcomm, char* constraints,
+		    DCEconstraint* dceconstraint)
+{
+    NCerror ncstat = NC_NOERR;
+    char* errmsg;
+
+    ASSERT(dceconstraint != NULL);
+    nclistclear(dceconstraint->projections);
+    nclistclear(dceconstraint->selections);
+
+    ncstat = dapceparse(constraints,dceconstraint,&errmsg);
+    if(ncstat) {
+	nclog(NCLOGWARN,"DCE constraint parse failure: %s",errmsg);
+	nullfree(errmsg);
+        nclistclear(dceconstraint->projections);
+        nclistclear(dceconstraint->selections);
+    }
+    return ncstat;
+}
+
+/* Map constraint paths to CDFnode paths in specified tree and fill
+   in the declsizes.
+   The difficulty is that suffix paths are legal.
+*/
+
+NCerror
+mapconstraints3(DCEconstraint* constraint,
+		CDFnode* root)
+{
+    int i;
+    NCerror ncstat = NC_NOERR;
+    NClist* nodes = root->tree->nodes;
+    NClist* dceprojections = constraint->projections;
+#if 0
+    NClist* dceselections = constraint->selections;
+#endif
+
+    /* Convert the projection paths to leaves in the dds tree */
+    for(i=0;i<nclistlength(dceprojections);i++) {
+	DCEprojection* proj = (DCEprojection*)nclistget(dceprojections,i);
+	if(proj->discrim != CES_VAR) continue; /* ignore functions*/
+	ncstat = matchpartialname3(nodes,proj->var->segments,
+				   (CDFnode**)&proj->var->annotation);
+	if(ncstat) goto done;
+    }
+
+#ifdef DEBUG
+fprintf(stderr,"mapconstraint.projections: %s\n",
+		dumpprojections(dceprojections));
+#endif
+
+done:
+    return THROW(ncstat);
+}
+
+
+/* Fill in:
+    1. projection segments
+    2. projection segment slices declsize
+    3. selection path
+*/
+NCerror
+qualifyconstraints3(DCEconstraint* constraint)
+{
+    NCerror ncstat = NC_NOERR;
+    int i;
+#ifdef DEBUG
+fprintf(stderr,"qualifyconstraints.before: %s\n",
+		dumpconstraint(constraint));
+#endif
+    if(constraint != NULL) {
+        for(i=0;i<nclistlength(constraint->projections);i++) {  
+            DCEprojection* p = (DCEprojection*)nclistget(constraint->projections,i);
+            ncstat = qualifyprojectionnames3(p);
+            ncstat = qualifyprojectionsizes3(p);
+        }
+    }
+#ifdef DEBUG
+fprintf(stderr,"qualifyconstraints.after: %s\n",
+		dumpconstraint(constraint));
+#endif
+    return ncstat;
+}
+
+/* convert all names in projections in paths to be fully qualified
+   by adding prefix segment objects.
+*/
+static NCerror
+qualifyprojectionnames3(DCEprojection* proj)
+{
+    NCerror ncstat = NC_NOERR;
+    NClist* fullpath = nclistnew();
+
+    ASSERT((proj->discrim == CES_VAR
+            && proj->var->annotation != NULL
+            && ((CDFnode*)proj->var->annotation)->ocnode != OCNULL));
+    collectnodepath3((CDFnode*)proj->var->annotation,fullpath,!WITHDATASET);
+#ifdef DEBUG
+fprintf(stderr,"qualify: %s -> ",
+	dumpprojection(proj));
+#endif
+    /* Now add path nodes to create full path */
+    completesegments3(fullpath,proj->var->segments);
+
+#ifdef DEBUG
+fprintf(stderr,"%s\n",
+	dumpprojection(proj));
+#endif
+    nclistfree(fullpath);
+    return ncstat;
+}
+
+/* Make sure that the slice declsizes are all defined for this projection */
+static NCerror
+qualifyprojectionsizes3(DCEprojection* proj)
+{
+    int i,j;
+    ASSERT(proj->discrim == CES_VAR);
+#ifdef DEBUG
+fprintf(stderr,"qualifyprojectionsizes.before: %s\n",
+		dumpprojection(proj));
+#endif
+    for(i=0;i<nclistlength(proj->var->segments);i++) {
+        DCEsegment* seg = (DCEsegment*)nclistget(proj->var->segments,i);
+	NClist* dimset = NULL;
+	CDFnode* cdfnode = (CDFnode*)seg->annotation;
+	ASSERT(cdfnode != NULL);
+        dimset = cdfnode->array.dimsetplus;
+        seg->rank = nclistlength(dimset);
+	/* For this, we do not want any string dimensions */
+	if(cdfnode->array.stringdim != NULL) seg->rank--;
+        for(j=0;j<seg->rank;j++) {
+	    CDFnode* dim = (CDFnode*)nclistget(dimset,j);
+	    if(dim->dim.basedim != NULL) dim = dim->dim.basedim;
+            ASSERT(dim != null);
+	    if(seg->slicesdefined)
+	        seg->slices[j].declsize = dim->dim.declsize;
+	    else
+	        dcemakewholeslice(seg->slices+j,dim->dim.declsize);
+	}
+        seg->slicesdefined = 1;
+        seg->slicesdeclized = 1;
+    }
+#ifdef DEBUG
+fprintf(stderr,"qualifyprojectionsizes.after: %s\n",
+		dumpprojection(proj));
+#endif
+    return NC_NOERR;
+}
+
+static void
+completesegments3(NClist* fullpath, NClist* segments)
+{
+    int i,delta;
+    /* add path nodes to segments to create full path */
+    delta = (nclistlength(fullpath) - nclistlength(segments));
+    ASSERT((delta >= 0));
+    for(i=0;i<delta;i++) {
+        DCEsegment* seg = (DCEsegment*)dcecreate(CES_SEGMENT);
+        CDFnode* node = (CDFnode*)nclistget(fullpath,i);
+        seg->name = nulldup(node->ocname);
+        seg->annotation = (void*)node;
+	seg->rank = nclistlength(node->array.dimset0);
+        nclistinsert(segments,i,(ncelem)seg);
+    }
+    /* Now modify the segments to point to the appropriate node
+       and fill in the slices.
+    */
+    for(i=delta;i<nclistlength(segments);i++) {
+        DCEsegment* seg = (DCEsegment*)nclistget(segments,i);
+        CDFnode* node = (CDFnode*)nclistget(fullpath,i);
+	seg->annotation = (void*)node;
+    }
+}
+
+/*
+We are given a set of segments (in path)
+representing a partial path for a CDFnode variable.
+Our goal is to locate all matching
+variables for which the path of that
+variable has a suffix matching
+the given partial path.
+If one node matches exactly, then use that one;
+otherwise there had better be exactly one
+match else ambiguous.
+Additional constraints (4/12/2010):
+1. if a segment is dimensioned, then use that info
+   to distinguish e.g a grid node from a possible
+   grid array within it of the same name.
+   Treat sequences as of rank 1.
+2. if there are two matches, and one is the grid
+   and the other is the grid array within that grid,
+   then choose the grid array.
+3. If there are multiple matches choose the one with the
+   shortest path
+4. otherwise complain about ambiguity
+*/
+
+/**
+ * Given a path as segments,
+ * try to locate the CDFnode
+ * instance (from a given set)
+ * that corresponds to the path.
+ * The key difficulty is that the
+ * path may only be a suffix of the
+ * complete path.
+ */
+
+static NCerror
+matchpartialname3(NClist* nodes, NClist* segments, CDFnode** nodep)
+{
+    int i,nsegs;
+    NCerror ncstat = NC_NOERR;
+    DCEsegment* lastseg = NULL;
+    NClist* namematches = nclistnew();
+    NClist* matches = nclistnew();
+    NClist* matchpath = nclistnew();
+
+    /* Locate all nodes with the same name
+       as the last element in the segment path
+    */
+    nsegs = nclistlength(segments);
+    lastseg = (DCEsegment*)nclistget(segments,nsegs-1);
+    for(i=0;i<nclistlength(nodes);i++) {
+        CDFnode* node = (CDFnode*)nclistget(nodes,i);
+	if(node->ocname == null)
+	    continue;
+	/* Path names come from oc space */
+        if(strcmp(node->ocname,lastseg->name) != 0)
+	    continue;
+	/* Only look at selected kinds of nodes */
+	if(node->nctype != NC_Sequence
+               && node->nctype != NC_Structure
+               && node->nctype != NC_Grid
+               && node->nctype != NC_Primitive
+          )
+	    continue;
+	nclistpush(namematches,(ncelem)node);
+    }    
+    if(nclistlength(namematches)==0) {
+        nclog(NCLOGERR,"No match for projection name: %s",lastseg->name);
+        ncstat = NC_EDDS;
+	goto done;
+    }
+
+    /* Now, collect and compare paths of the matching nodes */
+    for(i=0;i<nclistlength(namematches);i++) {
+        CDFnode* matchnode = (CDFnode*)nclistget(namematches,i);
+	nclistclear(matchpath);
+	collectnodepath3(matchnode,matchpath,0);
+	/* Do a suffix match */
+        if(matchsuffix3(matchpath,segments)) {
+	    nclistpush(matches,(ncelem)matchnode);
+#ifdef DEBUG
+fprintf(stderr,"matchpartialname: pathmatch: %s :: %s\n",
+matchnode->ncfullname,dumpsegments(segments));
+#endif
+	}
+    }
+    /* |matches|==0 => no match; |matches|>1 => ambiguity */
+    switch (nclistlength(matches)) {
+    case 0:
+        nclog(NCLOGERR,"No match for projection name: %s",lastseg->name);
+        ncstat = NC_EDDS;
+	break;
+    case 1:
+        if(nodep)
+	    *nodep = (CDFnode*)nclistget(matches,0);
+	break;
+    default: {
+	CDFnode* minnode = NULL;
+	int minpath = 0;
+	int nmin = 0; /* to catch multiple ones with same short path */
+	/* ok, see if one of the matches has a path that is shorter
+           then all the others */
+	for(i=0;i<nclistlength(matches);i++) {
+	    CDFnode* candidate = (CDFnode*)nclistget(matches,i);
+	    nclistclear(matchpath);
+	    collectnodepath3(candidate,matchpath,0);
+	    if(minpath == 0) {
+		minpath = nclistlength(matchpath);
+		minnode = candidate;
+	    } else if(nclistlength(matchpath) == minpath) {
+	        nmin++;		
+	    } else if(nclistlength(matchpath) < minpath) {
+		minpath = nclistlength(matchpath);
+		minnode = candidate;
+		nmin = 1;
+	    }
+	} /*for*/
+	if(minnode == NULL || nmin > 1) {	
+	    nclog(NCLOGERR,"Ambiguous match for projection name: %s",
+			lastseg->name);
+            ncstat = NC_EDDS;
+	} else if(nodep)
+	    *nodep = minnode;
+	} break;
+    }
+#ifdef DEBUG
+fprintf(stderr,"matchpartialname: choice: %s %s for %s\n",
+(nclistlength(matches) > 1?"":"forced"),
+(*nodep)->ncfullname,dumpsegments(segments));
+#endif
+
+done:
+    return THROW(ncstat);
+}
+
+static int
+matchsuffix3(NClist* matchpath, NClist* segments)
+{
+    int i,j;
+    int nsegs = nclistlength(segments);
+    int pathlen = nclistlength(matchpath);
+    ASSERT(pathlen >= nsegs);
+    for(i=0;i<pathlen;i++) {
+        int pathmatch = 1;
+	/* Starting at this point in the path, try to match the segment list */
+        for(j=0;j<nsegs && (i+j < pathlen);j++) {
+            int segmatch = 1;
+	    DCEsegment* seg = (DCEsegment*)nclistget(segments,j);
+   	    CDFnode* node = (CDFnode*)nclistget(matchpath,i+j);
+	    int rank = seg->rank;
+	    /* Do the names match (in oc name space) */
+	    if(strcmp(seg->name,node->ocname) != 0) {
+		segmatch = 0;/* no match */
+	    } else
+	    /* Do the ranks match (watch out for sequences) */
+	    if(rank == 0) /* rank == 9 matches any set of dimensions */
+		segmatch = 1;
+	    else if(node->nctype == NC_Sequence)
+	        segmatch = (rank == 1?1:0);
+	    else /*!NC_Sequence*/
+	        segmatch = (rank == nclistlength(node->array.dimset0)?1:0);
+	    if(!segmatch) pathmatch = 0;
+	}
+	if(pathmatch) return 1;
+   }
+   return 0;
+}
+
+
+/* Convert a DCEprojection instance into a string
+   that can be used with the url
+*/
+
+char*
+buildprojectionstring3(NClist* projections)
+{
+    char* pstring;
+    NCbytes* buf = ncbytesnew();
+    dcelisttobuffer(projections,buf,",");
+    pstring = ncbytesdup(buf);
+    ncbytesfree(buf);
+    return pstring;
+}
+
+char*
+buildselectionstring3(NClist* selections)
+{
+    NCbytes* buf = ncbytesnew();
+    char* sstring;
+    dcelisttobuffer(selections,buf,"&");
+    sstring = ncbytesdup(buf);
+    ncbytesfree(buf);
+    return sstring;
+}
+
+char*
+buildconstraintstring3(DCEconstraint* constraints)
+{
+    NCbytes* buf = ncbytesnew();
+    char* result = NULL;
+    dcetobuffer((DCEnode*)constraints,buf);
+    result = ncbytesdup(buf);
+    ncbytesfree(buf);
+    return result;
+}
+
+
+/* Given the arguments to vara
+   construct a corresponding projection
+   with any pseudo dimensions removed
+*/
+NCerror
+buildvaraprojection3(Getvara* getvar,
+		     const size_t* startp, const size_t* countp, const ptrdiff_t* stridep,
+		     DCEprojection** projectionp)
+{
+    int i,j;
+    NCerror ncstat = NC_NOERR;
+    CDFnode* var = getvar->target;
+    DCEprojection* projection = NULL;
+    NClist* path = nclistnew();
+    NClist* segments = NULL;
+    int dimindex;
+
+    ncstat = dapvar2projection(var,&projection);
+#ifdef DEBUG
+fprintf(stderr,"buildvaraprojection: %s\n",dumpprojection(projection));
+#endif
+
+    /* We need to assign the start/count/stride info to each segment;
+       declsize will have been set
+    */
+    segments = projection->var->segments;
+    dimindex = 0;
+    for(i=0;i<nclistlength(segments);i++) {
+	DCEsegment* segment = (DCEsegment*)nclistget(segments,i);
+        for(j=0;j<segment->rank;j++) {
+	    DCEslice* slice = &segment->slices[j];
+	    /* make each slice represent the corresponding
+               start/count/stride */
+	    slice->first = startp[dimindex+j];
+	    slice->stride = stridep[dimindex+j];
+	    slice->count = countp[dimindex+j];
+	    slice->length = slice->count * slice->stride;
+	    if(slice->length > slice->declsize)
+		slice->length = slice->declsize;
+	    slice->stop = (slice->first + slice->length);
+	    if(slice->stop > slice->declsize)
+		slice->stop = slice->declsize;
+	}
+	dimindex += segment->rank;
+    }
+#ifdef DEBUG
+fprintf(stderr,"buildvaraprojection.final: %s\n",dumpprojection(projection));
+#endif
+
+#ifdef DEBUG
+fprintf(stderr,"buildvaraprojection3: projection=%s\n",
+        dumpprojection(projection));
+#endif
+
+    if(projectionp) *projectionp = projection;
+
+    nclistfree(path);
+    if(ncstat) dcefree((DCEnode*)projection);
+    return ncstat;
+}
+
+int
+iswholeslice(DCEslice* slice, CDFnode* dim)
+{
+    if(slice->first != 0 || slice->stride != 1) return 0;
+    if(dim != NULL) {
+	if(slice->stop != dim->dim.declsize) return 0;
+    } else if(dim == NULL) {
+	if(slice->declsize == 0
+	   || slice->count != slice->declsize) return 0;
+    }
+    return 1;
+}
+
+int
+iswholesegment(DCEsegment* seg)
+{
+    int i,whole;
+    NClist* dimset = NULL;
+    unsigned int rank;
+    
+    if(seg->rank == 0) return 1;
+    if(!seg->slicesdefined) return 0;
+    if(seg->annotation == NULL) return 0;
+    dimset = ((CDFnode*)seg->annotation)->array.dimset0;
+    rank = nclistlength(dimset);
+    whole = 1; /* assume so */
+    for(i=0;i<rank;i++) {
+	CDFnode* dim = (CDFnode*)nclistget(dimset,i);
+	if(!iswholeslice(&seg->slices[i],dim)) {whole = 0; break;}	
+    }
+    return whole;
+}
+
+int
+iswholeprojection(DCEprojection* proj)
+{
+    int i,whole;
+    
+    ASSERT((proj->discrim == CES_VAR));
+
+    whole = 1; /* assume so */
+    for(i=0;i<nclistlength(proj->var->segments);i++) {
+        DCEsegment* segment = (DCEsegment*)nclistget(proj->var->segments,i);
+	if(!iswholesegment(segment)) {whole = 0; break;}	
+    }
+    return whole;
+}
+
+int
+iswholeconstraint(DCEconstraint* con)
+{
+    int i;
+    if(con == NULL) return 1;
+    if(con->projections != NULL) {
+	for(i=0;i<nclistlength(con->projections);i++) {
+	 if(!iswholeprojection((DCEprojection*)nclistget(con->projections,i)))
+	    return 0;
+	}
+    }
+    if(con->selections != NULL)
+	return 0;
+    return 1;
+}
+
+
+/*
+Given a set of projections, we need to produce
+an expanded, correct, and equivalent set of projections.
+The term "correct" means we must fix the following cases:
+1. Multiple occurrences of the same leaf variable
+   with differing projection slices. Fix is to complain.
+2. Occurrences of container and one or more of its fields.
+   Fix is to suppress the container.
+The term "expanded" means
+1. Expand all occurrences of only a container by
+   replacing it with all of its fields.
+*/
+
+NCerror
+fixprojections(NClist* list)
+{
+    int i,j,k;
+    NCerror ncstat = NC_NOERR;
+    NClist* tmp = nclistnew(); /* misc. uses */
+
+#ifdef DEBUG
+fprintf(stderr,"fixprojection: list = %s\n",dumpprojections(list));
+#endif
+
+    if(nclistlength(list) == 0) goto done;
+
+    /* Step 1: remove duplicates and complain about slice mismatches */
+    for(i=0;i<nclistlength(list);i++) {
+	DCEprojection* p1 = (DCEprojection*)nclistget(list,i);
+	if(p1 == NULL) continue;
+        if(p1->discrim != CES_VAR) continue; /* dont try to unify functions */
+        for(j=i;j<nclistlength(list);j++) {
+	    DCEprojection* p2 = (DCEprojection*)nclistget(list,j);
+	    if(p2 == NULL) continue;
+	    if(p1 == p2) continue;
+	    if(p2->discrim != CES_VAR) continue;
+	    if(p1->var->annotation != p2->var->annotation) continue;
+	    /* check for slice mismatches */
+	    if(!slicematch(p1->var->segments,p2->var->segments)) {
+		/* complain */
+		nclog(NCLOGWARN,"Malformed projection: same variable with different slicing");
+	    }
+	    /* remove p32 */
+	    nclistset(list,j,(ncelem)NULL);	    
+	    dcefree((DCEnode*)p2);	    
+	}	
+    }
+
+    /* Step 2: remove containers when a field is also present */
+    for(i=0;i<nclistlength(list);i++) {
+	DCEprojection* p1 = (DCEprojection*)nclistget(list,i);
+	if(p1 == NULL) continue;
+        if(p1->discrim != CES_VAR) continue; /* dont try to unify functions */
+	if(!iscontainer((CDFnode*)p1->var->annotation))
+	    continue;
+        for(j=i;j<nclistlength(list);j++) {
+	    DCEprojection* p2 = (DCEprojection*)nclistget(list,j);
+	    if(p2 == NULL) continue;
+	    if(p2->discrim != CES_VAR) continue;
+	    nclistclear(tmp);
+	    collectnodepath3((CDFnode*)p2->var->annotation,tmp,WITHDATASET);
+	    for(k=0;k<nclistlength(tmp);k++) {
+		void* candidate = (void*)nclistget(tmp,k);
+	        if(candidate == p1->var->annotation) {
+		    nclistset(list,i,(ncelem)NULL);	    
+	            dcefree((DCEnode*)p1);
+		    goto next;
+		}
+	    }
+	}
+next:   continue;
+    }
+
+    /* Step 3: expand all containers recursively down to the leaf nodes */
+    for(;;) {
+	nclistclear(tmp);
+        for(i=0;i<nclistlength(list);i++) {
+            DCEprojection* target = (DCEprojection*)nclistget(list,i);
+            CDFnode* leaf;
+            if(target == NULL) continue;
+            if(target->discrim != CES_VAR)
+                continue; /* dont try to unify functions */
+            leaf = (CDFnode*)target->var->annotation;
+            ASSERT(leaf != NULL);
+            if(iscontainer(leaf)) {/* capture container */
+		if(!nclistcontains(tmp,(ncelem)target))
+                    nclistpush(tmp,(ncelem)target);
+                nclistset(list,i,(ncelem)NULL);
+            }
+        }
+	if(nclistlength(tmp) == 0) break; /*done*/
+        /* Now explode the containers */
+        for(i=0;i<nclistlength(tmp);i++) {
+            DCEprojection* container = (DCEprojection*)nclistget(tmp,i);
+	    CDFnode* leaf = (CDFnode*)container->var->annotation;
+            for(j=0;i<nclistlength(leaf->subnodes);j++) {
+                CDFnode* field = (CDFnode*)nclistget(leaf->subnodes,j);
+		/* Convert field node to a proper constraint */
+		DCEprojection* proj = projectify(field,container);
+		nclistpush(list,(ncelem)proj);
+	    }	    
+            /* reclaim the container */
+	    dcefree((DCEnode*)container);
+	}
+    } /*for(;;)*/
+
+    /* remove all NULL elements */
+    for(i=nclistlength(list)-1;i>=0;i--) {
+        DCEprojection* target = (DCEprojection*)nclistget(list,i);
+	if(target == NULL)
+	    nclistremove(list,i);	
+    }	
+
+done:
+#ifdef DEBUG
+fprintf(stderr,"fixprojection: exploded = %s\n",dumpprojections(list));
+#endif
+    nclistfree(tmp);
+    return ncstat;
+}
+
+static int
+iscontainer(CDFnode* node)
+{
+    return (node->nctype == NC_Dataset
+               || node->nctype == NC_Sequence
+               || node->nctype == NC_Structure
+               || node->nctype == NC_Grid);
+}
+
+static DCEprojection*
+projectify(CDFnode* field, DCEprojection* container)
+{
+    DCEprojection* proj  = (DCEprojection*)dcecreate(CES_PROJECT);
+    DCEvar* var  = (DCEvar*)dcecreate(CES_VAR);
+    DCEsegment* seg  = (DCEsegment*)dcecreate(CES_SEGMENT);
+    proj->discrim = CES_VAR;
+    proj->var = var;
+    var->annotation = (void*)field;
+    /* Dup the segment list */
+    var->segments = dceclonelist(container->var->segments);
+    seg->rank = 0;
+    nclistpush(var->segments,(ncelem)seg);
+    return proj;
+}
+
+static int
+slicematch(NClist* seglist1, NClist* seglist2)
+{
+    int i,j;
+    if((seglist1 == NULL || seglist2 == NULL) && seglist1 != seglist2)
+	return 0;
+    if(nclistlength(seglist1) != nclistlength(seglist2))
+	return 0;
+    for(i=0;i<nclistlength(seglist1);i++) {
+	DCEsegment* seg1 = (DCEsegment*)nclistget(seglist1,i);
+	DCEsegment* seg2 = (DCEsegment*)nclistget(seglist2,i);
+	if(seg1->rank != seg2->rank)
+	    return 0;
+	for(j=0;j<seg1->rank;j++) {
+	    if(seg1->slices[j].first != seg2->slices[j].first 
+	       || seg1->slices[j].count != seg2->slices[j].count
+	       || seg1->slices[j].stride != seg2->slices[j].stride)
+		return 0;
+	}
+    }
+    return 1;
+}
+
+/* Convert a CDFnode var to a projection; include
+   pseudodimensions; always whole variable.
+*/
+int
+dapvar2projection(CDFnode* var, DCEprojection** projectionp)
+{
+    int i,j;
+    int ncstat = NC_NOERR;
+    NClist* path = nclistnew();
+    NClist* segments;
+    DCEprojection* projection = NULL;
+    int dimindex;
+
+    /* Collect the nodes needed to construct the projection segment */    
+    collectnodepath3(var,path,!WITHDATASET);
+
+    segments = nclistnew();
+    dimindex = 0; /* point to next subset of slices */
+    nclistsetalloc(segments,nclistlength(path));
+    for(i=0;i<nclistlength(path);i++) {
+	DCEsegment* segment = (DCEsegment*)dcecreate(CES_SEGMENT);
+	CDFnode* n = (CDFnode*)nclistget(path,i);
+	int localrank;
+        NClist* dimset;
+
+	segment->annotation = (void*)n;
+        segment->name = nulldup(n->ocname);
+        /* We need to assign whole slices to each segment */
+	localrank = nclistlength(n->array.dimsetplus);
+        segment->rank = localrank;
+	dimset = n->array.dimsetplus;
+        for(j=0;j<localrank;j++) {
+	    DCEslice* slice;
+	    CDFnode* dim;
+	    slice = &segment->slices[j];
+	    dim = (CDFnode*)nclistget(dimset,j);
+	    ASSERT(dim->dim.declsize0 > 0);
+	    dcemakewholeslice(slice,dim->dim.declsize0);
+	}
+	segment->slicesdefined = 1;
+	segment->slicesdeclized = 1;
+	dimindex += localrank;
+	nclistpush(segments,(ncelem)segment);
+    }
+    
+    projection = (DCEprojection*)dcecreate(CES_PROJECT);
+    projection->discrim = CES_VAR;
+    projection->var = (DCEvar*)dcecreate(CES_VAR);
+    projection->var->annotation = (void*)var;
+    projection->var->segments = segments;
+
+#ifdef DEBUG1
+fprintf(stderr,"dapvar2projection: projection=%s\n",
+        dumpprojection(projection));
+#endif
+
+    nclistfree(path);
+    if(ncstat) dcefree((DCEnode*)projection);
+    else if(projectionp) *projectionp = projection;
+    return ncstat;
+}    
+
+/*
+Given a set of projections and a projection
+representing a variable (from, say vara or prefetch)
+construct a single projection for fetching that variable
+with the proper constraints.
+*/
+int
+daprestrictprojection(NClist* projections, DCEprojection* var, DCEprojection** resultp)
+{
+    int ncstat = NC_NOERR;
+    int i;
+    DCEprojection* result = NULL;
+#ifdef DEBUG1
+fprintf(stderr,"restrictprojection.before: constraints=|%s| vara=|%s|\n",
+		dumpprojections(projections),
+		dumpprojection(var));
+#endif
+
+    ASSERT(var != NULL);
+
+    /* the projection list will contain at most 1 match for the var by construction */
+    for(result=null,i=0;i<nclistlength(projections);i++) {
+	DCEprojection* p1 = (DCEprojection*)nclistget(projections,i);
+	if(p1 == NULL || p1->discrim != CES_VAR) continue;
+	if(p1->var->annotation == var->var->annotation) {
+	    result = p1;
+	    break;
+	}
+    }
+    if(result == NULL) {
+	result = (DCEprojection*)dceclone((DCEnode*)var); /* use only the var projection */
+ 	goto done;	
+    }
+    result = (DCEprojection*)dceclone((DCEnode*)result); /* so we can modify */
+
+#ifdef DEBUG1
+fprintf(stderr,"restrictprojection.choice: |%s|\n",dumpprojection(result));
+#endif
+    /* We need to merge the projection from the projection list
+       with the var projection
+    */
+    ncstat = dcemergeprojections(result,var); /* result will be modified */    
+
+done:
+    if(resultp) *resultp = result;
+#ifdef DEBUG
+fprintf(stderr,"restrictprojection.after=|%s|\n",
+		dumpprojection(result));
+#endif
+    return ncstat;
+}
+
+/* Shift the slice so it runs from 0..count by step 1 */
+static void
+dapshiftslice(DCEslice* slice)
+{
+    size_t first = slice->first;
+    size_t stride = slice->stride;
+    if(first == 0 && stride == 1) return; /* no need to do anything */
+    slice->first = 0;
+    slice->stride = 1;
+    slice->length = slice->count;
+    slice->stop = slice->count;
+}
+
+int
+dapshiftprojection(DCEprojection* projection)
+{
+    int ncstat = NC_NOERR;
+    int i,j;
+    NClist* segments;
+
+#ifdef DEBUG1
+fprintf(stderr,"dapshiftprojection.before: %s\n",dumpprojection(projection));
+#endif
+
+    ASSERT(projection->discrim == CES_VAR);
+    segments = projection->var->segments;
+    for(i=0;i<nclistlength(segments);i++) {
+	DCEsegment* seg = (DCEsegment*)nclistget(segments,i);
+        for(j=0;j<seg->rank;j++) {
+	    DCEslice* slice = seg->slices+j;
+	    dapshiftslice(slice);
+	}
+    }
+
+#ifdef DEBUG1
+fprintf(stderr,"dapshiftprojection.after: %s\n",dumpprojection(projection));
+#endif
+
+    return ncstat;
+}
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/src_netcdf4/constraints3.h
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/src_netcdf4/constraints3.h	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/src_netcdf4/constraints3.h	(revision 1749)
@@ -0,0 +1,40 @@
+ /*********************************************************************
+  *   Copyright 1993, UCAR/Unidata
+  *   See netcdf/COPYRIGHT file for copying and redistribution conditions.
+  *   $Header: /upc/share/CVS/netcdf-3/libncdap3/constraints3.h,v 1.10 2010/04/13 03:36:30 dmh Exp $
+  *********************************************************************/
+#ifndef CONSTRAINTS3_H
+#define CONSTRAINTS3_H 1
+
+extern NCerror parsedapconstraints(NCDAPCOMMON*, char*, DCEconstraint*);
+extern NCerror mapconstraints3(DCEconstraint*,CDFnode*);
+extern NCerror qualifyconstraints3(DCEconstraint* constraint);
+
+extern char* simplepathstring(NClist* segments, char* separator);
+extern void makesegmentstring3(NClist* segments, NCbytes* buf, char* separator);
+
+extern int iswholeprojection(DCEprojection*);
+
+extern void freegetvara(struct Getvara* vara);
+
+extern NCerror slicemerge3(DCEslice* dst, DCEslice* src);
+
+extern int iswholeslice(DCEslice*, struct CDFnode* dim);
+extern int iswholesegment(DCEsegment*);
+
+extern int iswholeconstraint(DCEconstraint* con);
+
+extern char* buildprojectionstring3(NClist* projections);
+extern char* buildselectionstring3(NClist* selections);
+extern char* buildconstraintstring3(DCEconstraint* constraints);
+
+extern void makewholesegment3(DCEsegment*,struct CDFnode*);
+extern void makewholeslice3(DCEslice* slice, struct CDFnode* dim);
+
+extern NCerror fixprojections(NClist* list);
+
+extern int dapvar2projection(CDFnode* var, DCEprojection** projectionp);
+extern int daprestrictprojection(NClist* projections, DCEprojection* var, DCEprojection** resultp);
+extern int dapshiftprojection(DCEprojection*);
+
+#endif /*CONSTRAINTS3_H*/
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/src_netcdf4/dapalign.c
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/src_netcdf4/dapalign.c	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/src_netcdf4/dapalign.c	(revision 1749)
@@ -0,0 +1,332 @@
+/*********************************************************************
+ *   Copyright 1993, UCAR/Unidata
+ *   See netcdf/COPYRIGHT file for copying and redistribution conditions.
+ *   $Header: /upc/share/CVS/netcdf-3/libncdap3/dapalign.c,v 1.5 2009/09/23 22:26:00 dmh Exp $
+ *********************************************************************/
+
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * Copyright by The HDF Group.                                               *
+ * Copyright by the Board of Trustees of the University of Illinois.         *
+ * All rights reserved.                                                      *
+ *                                                                           *
+ * This file is part of HDF5.  The full HDF5 copyright notice, including     *
+ * terms governing use, modification, and redistribution, is contained in    *
+ * the files COPYING and Copyright.html.  COPYING can be found at the root   *
+ * of the source code distribution tree; Copyright.html can be found at the  *
+ * root level of an installed copy of the electronic HDF5 document set and   *
+ * is linked from the top-level documents page.  It can also be found at     *
+ * http://hdfgroup.org/HDF5/doc/Copyright.html.  If you do not have          *
+ * access to either file, you may request a copy from help@hdfgroup.org.     *
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+
+/*
+This code is a variantion of the H5detect.c code from HDF5.
+Author: D. Heimbigner 10/7/2008
+*/
+#include "config.h"
+#ifndef OFFSETTEST
+#include        "ncdap3.h"
+#else
+#include        <stdlib.h>
+#include        <string.h>
+#include        <assert.h>
+#endif
+
+#include        "dapnc.h"
+#include        "dapdebug.h"
+#include        "dapalign.h"
+
+typedef struct nccalignvlen_t {
+    size_t len;
+    void* p;
+} nccalignvlen_t;
+
+#ifdef OFFSETTEST
+typedef int nc_type;
+#define	NC_NAT 	        0	/* NAT = 'Not A Type' (c.f. NaN) */
+#define	NC_BYTE         1	/* signed 1 byte integer */
+#define	NC_CHAR 	2	/* ISO/ASCII character */
+#define	NC_SHORT 	3	/* signed 2 byte integer */
+#define	NC_INT 	        4	/* signed 4 byte integer */
+#define	NC_FLOAT 	5	/* single precision floating point number */
+#define	NC_DOUBLE 	6	/* double precision floating point number */
+#define	NC_UBYTE 	7	/* unsigned 1 byte int */
+#define	NC_USHORT 	8	/* unsigned 2-byte int */
+#define	NC_UINT 	9	/* unsigned 4-byte int */
+#define	NC_INT64 	10	/* signed 8-byte int */
+#define	NC_UINT64 	11	/* unsigned 8-byte int */
+#define	NC_STRING 	12	/* string */
+#define NC_VLEN         13
+#define NC_OPAQUE       14
+#endif
+
+/*
+The heart of this is the following macro,
+which computes the offset of a field x
+when preceded by a char field.
+The assumptions appear to be as follows:
+1. the offset produced in this situation indicates
+   the alignment for x relative in such a way that it
+   depends only on the types that precede it in the struct.
+2. the compiler does not reorder fields.
+3. arrays are tightly packed.
+4. nested structs are alignd according to their first member
+   (this actually follows from C language requirement that
+    a struct can legally be cast to an instance of its first member).
+Given the alignments for the various common primitive types,
+it is assumed that one can use them anywhere to construct
+the layout of a struct of such types.
+It seems to work for HDF5 for a wide variety of machines.
+*/
+
+#define COMP_ALIGNMENT(DST,TYPE)  {\
+    struct {char f1; TYPE x;} tmp; \
+    DST.typename = #TYPE ;        \
+    DST.alignment = (size_t)((char*)(&(tmp.x)) - (char*)(&tmp));}
+
+
+#define NCCTYPECOUNT     (NCCTYPENCVLEN+1)
+
+static NCtypealignvec vec[NCCTYPECOUNT];
+static NCtypealignset set;
+static int dapaligninit = 0;
+
+unsigned int
+ncctypealignment(int nctype)
+{
+    NCtypealignment* align = NULL;
+    int index = 0;
+    if(!dapaligninit) compute_nccalignments();
+    switch (nctype) {
+      case NC_BYTE:   index = NCCTYPEUCHAR; break;
+      case NC_CHAR:   index = NCCTYPECHAR; break;
+      case NC_SHORT:  index = NCCTYPESHORT; break;
+      case NC_INT:    index = NCCTYPEINT; break;
+      case NC_FLOAT:  index = NCCTYPEFLOAT; break;
+      case NC_DOUBLE: index = NCCTYPEDOUBLE; break;
+      case NC_UBYTE:  index = NCCTYPEUCHAR; break;
+      case NC_USHORT: index = NCCTYPEUSHORT; break;
+      case NC_UINT:   index = NCCTYPEUINT; break;
+      case NC_INT64:  index = NCCTYPELONGLONG; break;
+      case NC_UINT64: index = NCCTYPEULONGLONG; break;
+      case NC_STRING: index = NCCTYPEPTR; break;
+      case NC_VLEN:   index = NCCTYPENCVLEN; break;
+      case NC_OPAQUE: index = NCCTYPEUCHAR; break;
+      default:
+#ifndef OFFSETTEST
+	PANIC1("nctypealignment: bad type code: %d",nctype);
+#else
+	return 0;
+#endif
+    }
+    align = &vec[index];
+    return align->alignment;
+}
+
+
+void
+compute_nccalignments(void)
+{
+    /* Compute the alignments for all the common C data types*/
+    /* First for the struct*/
+    /* initialize*/
+    memset((void*)&set,0,sizeof(set));
+    memset((void*)vec,0,sizeof(vec));
+
+    COMP_ALIGNMENT(set.charalign,char);
+    COMP_ALIGNMENT(set.ucharalign,unsigned char);
+    COMP_ALIGNMENT(set.shortalign,short);
+    COMP_ALIGNMENT(set.ushortalign,unsigned short);
+    COMP_ALIGNMENT(set.intalign,int);
+    COMP_ALIGNMENT(set.uintalign,unsigned int);
+    COMP_ALIGNMENT(set.longalign,long);
+    COMP_ALIGNMENT(set.ulongalign,unsigned long);
+    COMP_ALIGNMENT(set.longlongalign,long long);
+    COMP_ALIGNMENT(set.ulonglongalign,unsigned long long);
+    COMP_ALIGNMENT(set.floatalign,float);
+    COMP_ALIGNMENT(set.doublealign,double);
+    COMP_ALIGNMENT(set.ptralign,void*);
+    COMP_ALIGNMENT(set.ncvlenalign,nccalignvlen_t);
+
+    /* Then the vector*/
+    COMP_ALIGNMENT(vec[NCCTYPECHAR],char);
+    COMP_ALIGNMENT(vec[NCCTYPEUCHAR],unsigned char); 
+    COMP_ALIGNMENT(vec[NCCTYPESHORT],short);
+    COMP_ALIGNMENT(vec[NCCTYPEUSHORT],unsigned short);
+    COMP_ALIGNMENT(vec[NCCTYPEINT],int);
+    COMP_ALIGNMENT(vec[NCCTYPEUINT],unsigned int);
+    COMP_ALIGNMENT(vec[NCCTYPELONG],long);
+    COMP_ALIGNMENT(vec[NCCTYPEULONG],unsigned long);
+    COMP_ALIGNMENT(vec[NCCTYPELONGLONG],long long);
+    COMP_ALIGNMENT(vec[NCCTYPEULONGLONG],unsigned long long);
+    COMP_ALIGNMENT(vec[NCCTYPEFLOAT],float);
+    COMP_ALIGNMENT(vec[NCCTYPEDOUBLE],double);
+    COMP_ALIGNMENT(vec[NCCTYPEPTR],void*);
+    COMP_ALIGNMENT(vec[NCCTYPENCVLEN],nccalignvlen_t);
+
+    dapaligninit = 1;
+}
+
+/* Compute padding */
+int
+nccpadding(unsigned long offset, int alignment)
+{
+    int pad,rem;
+    rem = (alignment==0?0:(offset % alignment));
+    pad = (rem==0?0:(alignment - rem));
+    return pad;
+}
+
+#ifdef OFFSETTEST
+
+#define COMP_ALIGNMENT1(DST,TYPE1,TYPE)  {\
+    struct {TYPE1 f1; TYPE x;} tmp; \
+    DST.typename = #TYPE ;        \
+    DST.alignment = (size_t)((char*)(&(tmp.x)) - (char*)(&tmp));}
+
+#define COMP_ALIGNMENT2(DST,TYPE1,TYPE2,TYPE)  {\
+    struct {TYPE1 f1, TYPE2 f2; TYPE x;} tmp;   \
+    DST.typename = #TYPE ;                      \
+    DST.alignment = (size_t)((char*)(&(tmp.x)) - (char*)(&tmp));}
+
+#define COMP_SIZE0(DST,TYPE1,TYPE2)  {\
+    struct {TYPE1 c; TYPE2 x;} tmp; \
+    DST = sizeof(tmp); }
+
+static char*
+padname(char* name)
+{
+#define MAX 20
+    if(name == NULL) name = "null";
+    int len = strlen(name);
+    if(len > MAX) len = MAX;
+    char* s = (char*)malloc(MAX+1);
+    memset(s,' ',MAX);
+    s[MAX+1] = '\0';
+    strncpy(s,name,len);
+    return s;
+}
+
+static void
+verify(NCtypealignvec* vec)
+{
+    int i,j;
+    NCtypealignvec* vec16;
+    NCtypealignvec* vec32;
+    int* sizes8;
+    int* sizes16;
+    int* sizes32;
+
+    vec16 = (NCtypealignvec*)malloc(sizeof(NCtypealignvec)*NCCTYPECOUNT);
+    vec32 = (NCtypealignvec*)malloc(sizeof(NCtypealignvec)*NCCTYPECOUNT);
+    sizes8 = (int*)malloc(sizeof(int)*NCCTYPECOUNT);
+    sizes16 = (int*)malloc(sizeof(int)*NCCTYPECOUNT);
+    sizes32 = (int*)malloc(sizeof(int)*NCCTYPECOUNT);
+
+    COMP_SIZE0(sizes8[1],char,char);
+    COMP_SIZE0(sizes8[2],unsigned char,char);
+    COMP_SIZE0(sizes8[3],short,char);
+    COMP_SIZE0(sizes8[4],unsigned short,char);
+    COMP_SIZE0(sizes8[5],int,char);
+    COMP_SIZE0(sizes8[6],unsigned int,char);
+    COMP_SIZE0(sizes8[7],long,char);
+    COMP_SIZE0(sizes8[8],unsigned long,char);
+    COMP_SIZE0(sizes8[9],long long,char);
+    COMP_SIZE0(sizes8[10],unsigned long long,char);
+    COMP_SIZE0(sizes8[11],float,char);
+    COMP_SIZE0(sizes8[12],double,char) ;
+    COMP_SIZE0(sizes8[13],void*,char);
+    COMP_SIZE0(sizes8[14],alignvlen_t,char);
+
+    COMP_SIZE0(sizes16[1],char,short);
+    COMP_SIZE0(sizes16[2],unsigned char,short);
+    COMP_SIZE0(sizes16[3],short,short);
+    COMP_SIZE0(sizes16[4],unsigned short,short);
+    COMP_SIZE0(sizes16[5],int,short);
+    COMP_SIZE0(sizes16[6],unsigned int,short);
+    COMP_SIZE0(sizes16[7],long,short);
+    COMP_SIZE0(sizes16[8],unsigned long,short);
+    COMP_SIZE0(sizes16[9],long long,short);
+    COMP_SIZE0(sizes16[10],unsigned long long,short);
+    COMP_SIZE0(sizes16[11],float,short);
+    COMP_SIZE0(sizes16[12],double,short) ;
+    COMP_SIZE0(sizes16[13],void*,short);
+    COMP_SIZE0(sizes16[14],alignvlen_t*,short);
+
+    COMP_SIZE0(sizes32[1],char,int);
+    COMP_SIZE0(sizes32[2],unsigned char,int);
+    COMP_SIZE0(sizes32[3],short,int);
+    COMP_SIZE0(sizes32[4],unsigned short,int);
+    COMP_SIZE0(sizes32[5],int,int);
+    COMP_SIZE0(sizes32[6],unsigned int,int);
+    COMP_SIZE0(sizes32[7],long,int);
+    COMP_SIZE0(sizes32[8],unsigned long,int);
+    COMP_SIZE0(sizes32[9],long long,int);
+    COMP_SIZE0(sizes32[10],unsigned long long,int);
+    COMP_SIZE0(sizes32[11],float,int);
+    COMP_SIZE0(sizes32[12],double,int) ;
+    COMP_SIZE0(sizes32[13],void*,int);
+    COMP_SIZE0(sizes32[14],alignvlen_t*,int);
+
+    COMP_ALIGNMENT1(vec16[1],char,short);
+    COMP_ALIGNMENT1(vec16[2],unsigned char,short);
+    COMP_ALIGNMENT1(vec16[3],short,short);
+    COMP_ALIGNMENT1(vec16[4],unsigned short,short);
+    COMP_ALIGNMENT1(vec16[5],int,short);
+    COMP_ALIGNMENT1(vec16[6],unsigned int,short);
+    COMP_ALIGNMENT1(vec32[7],long,short);
+    COMP_ALIGNMENT1(vec32[8],unsigned long,short);
+    COMP_ALIGNMENT1(vec32[9],long long,short);
+    COMP_ALIGNMENT1(vec32[10],unsigned long long,short);
+    COMP_ALIGNMENT1(vec16[11],float,short);
+    COMP_ALIGNMENT1(vec16[12],double,short);
+    COMP_ALIGNMENT1(vec16[13],void*,short);
+    COMP_ALIGNMENT1(vec16[14],alignvlen_t*,short);
+
+    COMP_ALIGNMENT1(vec32[1],char,short);
+    COMP_ALIGNMENT1(vec32[2],unsigned char,short);
+    COMP_ALIGNMENT1(vec32[3],char,short);
+    COMP_ALIGNMENT1(vec32[4],unsigned short,short);
+    COMP_ALIGNMENT1(vec32[5],int,int);
+    COMP_ALIGNMENT1(vec32[6],unsigned int,int);
+    COMP_ALIGNMENT1(vec32[7],long,int);
+    COMP_ALIGNMENT1(vec32[8],unsigned long,int);
+    COMP_ALIGNMENT1(vec32[9],long long,int);
+    COMP_ALIGNMENT1(vec32[10],unsigned long long,int);
+    COMP_ALIGNMENT1(vec32[11],float,int);
+    COMP_ALIGNMENT1(vec32[12],double,int);
+    COMP_ALIGNMENT1(vec32[13],void*,int);
+    COMP_ALIGNMENT1(vec32[14],alignvlen_t*,int);
+
+    for(i=0;i<NCCTYPECOUNT;i++) {
+	printf("%s: size=%2d  alignment=%2d\n",
+		padname(vec[i].typename),sizes8[i],vec[i].alignment);
+    }
+    for(i=0;i<NCCTYPECOUNT;i++) {
+	printf("short vs %s: size=%2d  alignment=%2d\n",
+		padname(vec[i].typename),sizes16[i],vec16[i].alignment);
+    }
+    for(i=0;i<NCCTYPECOUNT;i++) {
+	printf("int vs %s: size=%2d  alignment=%2d\n",
+		padname(vec[i].typename),sizes32[i],vec32[i].alignment);
+    }
+
+}
+
+int
+main(int argc, char** argv)
+{
+    int i;
+
+    compute_nccalignments();
+
+    verify(vec);
+
+/*
+    for(i=0;i<NCCTYPECOUNT;i++) {
+	printf("%s:\talignment=%d\n",vec[i].typename,vec[i].alignment);
+    }
+*/
+    exit(0);
+}
+#endif /*OFFSETTEST*/
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/src_netcdf4/dapalign.h
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/src_netcdf4/dapalign.h	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/src_netcdf4/dapalign.h	(revision 1749)
@@ -0,0 +1,56 @@
+/*********************************************************************
+ *   Copyright 1993, UCAR/Unidata
+ *   See netcdf/COPYRIGHT file for copying and redistribution conditions.
+ *   $Header: /upc/share/CVS/netcdf-3/libncdap3/dapalign.h,v 1.3 2009/09/23 22:26:00 dmh Exp $
+ *********************************************************************/
+#ifndef ALIGN_H
+#define ALIGN_H 1
+
+typedef struct NCtypealignment {
+    char* typename;
+    int alignment;
+} NCtypealignment;
+
+/* Define indices for every primitive C type */
+/* NAT => NOT-A-TYPE*/
+#define NCCTYPENAT       0
+#define NCCTYPECHAR      1
+#define NCCTYPEUCHAR     2
+#define NCCTYPESHORT     3
+#define NCCTYPEUSHORT    4
+#define NCCTYPEINT       5
+#define NCCTYPEUINT      6
+#define NCCTYPELONG      7
+#define NCCTYPEULONG     8
+#define NCCTYPELONGLONG  9
+#define NCCTYPEULONGLONG 10
+#define NCCTYPEFLOAT     11
+#define NCCTYPEDOUBLE    12
+#define NCCTYPEPTR       13
+#define NCCTYPENCVLEN    14
+
+/* Capture in struct and in a vector*/
+typedef struct NCtypealignset {
+    NCtypealignment charalign;	  /* char*/
+    NCtypealignment ucharalign;	  /* unsigned char*/
+    NCtypealignment shortalign;	  /* short*/
+    NCtypealignment ushortalign;	  /* unsigned short*/
+    NCtypealignment intalign;	  /* int*/
+    NCtypealignment uintalign;	  /* unsigned int*/
+    NCtypealignment longalign;	  /* long*/
+    NCtypealignment ulongalign;	  /* unsigned long*/
+    NCtypealignment longlongalign;  /* long long*/
+    NCtypealignment ulonglongalign; /* unsigned long long*/
+    NCtypealignment floatalign;	  /* float*/
+    NCtypealignment doublealign;	  /* double*/
+    NCtypealignment ptralign;	  /* void**/
+    NCtypealignment ncvlenalign;	  /* nc_vlen_t*/
+} NCtypealignset;
+
+typedef NCtypealignment NCtypealignvec;
+
+extern void compute_nccalignments(void);
+extern unsigned int ncctypealignment(int nctype);
+extern int nccpadding(unsigned long offset, int alignment);
+
+#endif /*ALIGN_H*/
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/src_netcdf4/dapattr3.c
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/src_netcdf4/dapattr3.c	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/src_netcdf4/dapattr3.c	(revision 1749)
@@ -0,0 +1,341 @@
+/*********************************************************************
+ *   Copyright 1993, UCAR/Unidata
+ *   See netcdf/COPYRIGHT file for copying and redistribution conditions.
+ *   $Header: /upc/share/CVS/netcdf-3/libncdap3/dapattr3.c,v 1.14 2009/12/03 03:42:38 dmh Exp $
+ *********************************************************************/
+
+#include "ncdap3.h"
+
+#define OCHECK(exp) if((ocstat = (exp))) goto done;
+
+/* Forward */
+static NCerror buildattribute(char*,nc_type,NClist*,NCattribute**);
+static int mergedas1(NCDAPCOMMON*, OCconnection, CDFnode* dds, OCobject das);
+static int isglobalname3(char* name);
+
+static NCerror
+buildattribute(char* name, nc_type ptype,
+               NClist* values, NCattribute** attp)
+{
+    NCerror ncstat = NC_NOERR;
+    NCattribute* att;
+
+    att = (NCattribute*)calloc(1,sizeof(NCattribute));
+    MEMCHECK(att,NC_ENOMEM);
+    att->name = nulldup(name);
+    att->etype = ptype;
+
+    att->values = values;
+
+    if(attp) *attp = att;
+
+    return THROW(ncstat);
+}
+
+/*
+Given a das attribute walk it to see if it
+has at least 1 actual attribute (no recursion)
+*/
+static int
+hasattribute3(OCconnection conn, OCobject dasnode)
+{
+    int i;
+    OCerror ocstat = OC_NOERR;
+    int tf = 0; /* assume false */
+    unsigned int nsubnodes;
+    OCtype ocsubtype;
+    OCobject* subnodes = NULL;
+
+    OCHECK(oc_inq_class(conn,dasnode,&ocsubtype));
+    if(ocsubtype == OC_Attribute) return 1; /* this is an attribute */
+    ASSERT((ocsubtype == OC_Attributeset));
+
+    OCHECK(oc_inq_nsubnodes(conn,dasnode,&nsubnodes));
+    OCHECK(oc_inq_subnodes(conn,dasnode,&subnodes));
+    for(i=0;i<nsubnodes;i++) {
+        OCobject subnode = subnodes[i];
+        OCHECK(oc_inq_class(conn,subnode,&ocsubtype));
+	if(ocsubtype == OC_Attribute) {tf=1; break;}
+    }
+done:
+    nullfree(subnodes);
+    return tf;
+}
+
+/*
+Duplicate the oc merge das and dds code, but
+modify to capture such things as "strlen" and "dimname".
+*/
+
+int
+dapmerge3(NCDAPCOMMON* nccomm, CDFnode* ddsroot, OCobject dasroot)
+{
+    unsigned int i,j;
+    NCerror ncerr = NC_NOERR;
+    OCerror ocstat = OC_NOERR;
+    OCconnection conn = nccomm->oc.conn;
+    unsigned int nsubnodes, nobjects;
+    OCobject* dasobjects = NULL;
+    NClist* dasglobals = nclistnew();
+    NClist* dasnodes = nclistnew();
+    NClist* dodsextra = nclistnew();
+    NClist* varnodes = nclistnew();
+    NClist* allddsnodes = ddsroot->tree->nodes;
+
+    if(ddsroot == NULL || dasroot == NULL) return NC_NOERR;
+
+    nobjects = oc_inq_nobjects(conn,dasroot);
+    dasobjects = oc_inq_objects(conn,dasroot);
+    
+    /* 1. collect all the relevant DAS nodes;
+          namely those that contain at least one
+          attribute value.
+          Simultaneously look for potential ambiguities
+          if found; complain but continue: result are indeterminate.
+          also collect globals and DODS_EXTRA separately.
+    */
+    for(i=0;i<nobjects;i++) {
+	OCobject das = dasobjects[i];
+	OCtype octype;
+        char* ocname = NULL;
+	int isglobal = 0;
+	int hasattributes = 0;
+
+        OCHECK(oc_inq_class(conn,das,&octype));
+	if(octype == OC_Attribute) continue; /* ignore these for now*/
+
+        OCHECK(oc_inq_name(conn,das,&ocname));
+	OCHECK(oc_inq_nsubnodes(conn,das,&nsubnodes));
+
+	isglobal = (ocname == NULL ? 0 : isglobalname3(ocname));
+
+	/* catch DODS_EXTRA */
+	if(isglobal && ocname != NULL && strcmp(ocname,"DODS_EXTRA")==0) {
+	    nclistpush(dodsextra,(ncelem)das);
+	    nullfree(ocname);
+	    continue;
+	}
+	if(ocname == NULL || isglobal) {
+            nclistpush(dasglobals,(ncelem)das);
+	    nullfree(ocname);
+	    continue;
+	}
+	hasattributes = hasattribute3(conn,das);
+	if(hasattributes) {
+	    /* Look for previously collected nodes with same name*/
+            for(j=0;j<nclistlength(dasnodes);j++) {
+	        OCobject das2 = (OCobject)nclistget(dasnodes,j);
+		char* ocname2;
+	        OCHECK(oc_inq_name(conn,das2,&ocname2));
+		if(ocname2 == NULL || ocname == NULL) goto loop;
+		if(strcmp(ocname2,"DODS")==0) goto loop;
+	        if(strcmp(ocname,ocname2)==0)
+		        nclog(NCLOGWARN,"nc_mergedas: potentially ambiguous DAS name: %s",ocname2);
+loop:
+		nullfree(ocname2);
+	    }
+	    nclistpush(dasnodes,(ncelem)das);
+	}
+	nullfree(ocname);
+    }
+
+    /* 2. collect all the leaf DDS nodes (of type NC_Primitive)*/
+    for(i=0;i<nclistlength(allddsnodes);i++) {
+	CDFnode* dds = (CDFnode*)nclistget(allddsnodes,i);
+	if(dds->nctype == NC_Primitive) nclistpush(varnodes,(ncelem)dds);
+    }
+
+    /* 3. For each das node, lncate matching DDS node(s) and attach
+          attributes to the DDS node(s).
+          Match means:
+          1. DAS->fullname :: DDS->fullname
+          2. DAS->name :: DDS->fullname (support DAS names with embedded '.'
+          3. DAS->name :: DDS->name
+	  4. special case for DODS. Apply 1-3 on DODS parent.
+    */
+    for(i=0;i<nclistlength(dasnodes);i++) {
+	OCobject das = (OCobject)nclistget(dasnodes,i);
+	char* ocfullname = NULL;
+	char* ocbasename = NULL;
+
+	if(das == OCNULL) continue;
+	OCHECK(oc_inq_name(conn,das,&ocbasename));
+	if(strcmp(ocbasename,"DODS")==0) {
+	    OCobject container;
+   	    OCHECK(oc_inq_container(conn,das,&container));
+	    if(container == OCNULL) {
+	        ASSERT(container != OCNULL);
+	    }
+	    ocfullname = makeocpathstring3(conn,container,".");
+	} else {
+	    ocfullname = makeocpathstring3(conn,das,".");
+	}
+        for(j=0;j<nclistlength(varnodes);j++) {
+	    CDFnode* dds = (CDFnode*)nclistget(varnodes,j);
+	    char* ddsfullname = makecdfpathstring3(dds,".");
+	    if(strcmp(ocfullname,ddsfullname)==0
+	       || strcmp(ocbasename,ddsfullname)==0
+	       || strcmp(ocbasename,dds->ocname)==0) {
+		mergedas1(nccomm,conn,dds,das);
+		/* remove from dasnodes list*/
+		nclistset(dasnodes,i,(ncelem)NULL);
+	    }
+	    nullfree(ddsfullname);
+	}
+	nullfree(ocfullname);
+	nullfree(ocbasename);
+    }
+
+    /* 4. Assign globals */
+    for(i=0;i<nclistlength(dasglobals);i++) {
+	OCobject das = (OCobject)nclistget(dasglobals,i);
+	mergedas1(nccomm,conn,ddsroot,das);
+    }
+
+    /* 5. Assign DOD_EXTRA */
+    for(i=0;i<nclistlength(dodsextra);i++) {
+	OCobject das = (OCobject)nclistget(dodsextra,i);
+	mergedas1(nccomm,conn,ddsroot,das);
+    }
+
+done: /* cleanup*/
+    nullfree(dasobjects);
+    nclistfree(dasglobals);
+    nclistfree(dasnodes);
+    nclistfree(dodsextra);
+    nclistfree(varnodes);
+    if(ocstat != OC_NOERR) ncerr = ocerrtoncerr(ocstat);
+    return THROW(ncerr);
+}
+
+static int
+mergedas1(NCDAPCOMMON* nccomm, OCconnection conn, CDFnode* dds, OCobject das)
+{
+    NCerror ncstat = NC_NOERR;
+    OCerror ocstat = OC_NOERR;
+    unsigned int i,j,k;
+    unsigned int nsubnodes;
+    OCobject* subnodes = NULL;
+    OCobject* dodsnodes = NULL;
+    unsigned int ndodsnodes;
+
+    if(dds == NULL || das == OCNULL) return NC_NOERR; /* nothing to do */
+    if(dds->attributes == NULL) dds->attributes = nclistnew();
+    /* assign the simple attributes in the das set to this dds node*/
+    OCHECK(oc_inq_nsubnodes(conn,das,&nsubnodes));
+    OCHECK(oc_inq_subnodes(conn,das,&subnodes));
+    for(i=0;i<nsubnodes;i++) {
+	OCobject attnode = subnodes[i];
+	OCtype octype, ocetype;
+	char* ocname = NULL;
+	unsigned int ocnvalues;
+        OCHECK(oc_inq_name(conn,attnode,&ocname));	
+        OCHECK(oc_inq_class(conn,attnode,&octype));
+	if(octype == OC_Attribute) {
+	    NCattribute* att = NULL;
+	    NClist* stringvalues;
+            OCHECK(oc_inq_primtype(conn,attnode,&ocetype));	
+	    OCHECK(oc_inq_dasattr_nvalues(conn,attnode,&ocnvalues));
+	    stringvalues = nclistnew();
+	    for(j=0;j<ocnvalues;j++) {
+		char* stringval;
+	        OCHECK(oc_inq_dasattr(conn,attnode,j,&ocetype,&stringval));
+	        nclistpush(stringvalues,(ncelem)stringval);
+	    }
+	    ncstat = buildattribute(ocname,
+				    octypetonc(ocetype),
+				    stringvalues,
+				    &att);				
+	    if(ncstat) goto done;
+            nclistpush(dds->attributes,(ncelem)att);
+	} else if(octype == OC_Attributeset
+		  && (strcmp(ocname,"DODS")==0
+		      || strcmp(ocname,"DODS_EXTRA")==0)) {
+	    /* Turn the DODS special attributes into into
+               special attributes for dds node */
+	    OCHECK(oc_inq_nsubnodes(conn,attnode,&ndodsnodes));
+	    OCHECK(oc_inq_subnodes(conn,attnode,&dodsnodes));
+	    for(j=0;j<ndodsnodes;j++) {
+		char* dodsname = NULL;
+		char newname[4096];
+	        OCobject attnode = dodsnodes[j];
+	        NCattribute* att = NULL;
+	        NClist* stringvalues;
+	        OCHECK(oc_inq_class(conn,attnode,&octype));
+		if(octype != OC_Attribute) continue;
+                OCHECK(oc_inq_primtype(conn,attnode,&ocetype));	
+	        OCHECK(oc_inq_dasattr_nvalues(conn,attnode,&ocnvalues));
+	        stringvalues = nclistnew();
+	        for(k=0;k<ocnvalues;k++) {
+		    char* stringval;
+	            OCHECK(oc_inq_dasattr(conn,attnode,k,&ocetype,&stringval));
+	            nclistpush(stringvalues,(ncelem)stringval);
+		}
+	        OCHECK(oc_inq_name(conn,attnode,&dodsname));
+		/* Compute new special name */
+		strcpy(newname,"_DODS_");
+		strcat(newname,dodsname);
+	        ncstat = buildattribute(newname,
+				        octypetonc(ocetype),
+				        stringvalues,
+				        &att);				
+		if(ncstat) goto done;
+		att->invisible = 1;
+            	nclistpush(dds->attributes,(ncelem)att);
+
+		/* Define extra semantics associated with DODS and DODS_EXTRA attribute */
+		if(strcmp(dodsname,"strlen")==0) {
+		    unsigned int maxstrlen = 0;
+		    if(nclistlength(stringvalues) > 0) {
+		        char* stringval = (char*)nclistget(stringvalues,0);
+			if(0==sscanf(stringval,"%u",&maxstrlen)) maxstrlen = 0;
+		    }
+		    dds->dodsspecial.maxstrlen = maxstrlen;
+#ifdef DEBUG
+fprintf(stderr,"%s.maxstrlen=%d\n",dds->ocname,(int)dds->dodsspecial.maxstrlen);
+#endif
+		} else if(strcmp(dodsname,"dimName")==0) {
+		    if(nclistlength(stringvalues) > 0) {
+		        char* stringval = (char*)nclistget(stringvalues,0);
+		        dds->dodsspecial.dimname = nulldup(stringval);
+#ifdef DEBUG
+fprintf(stderr,"%s.dimname=%s\n",dds->ocname,dds->dodsspecial.dimname);
+#endif
+		    } else dds->dodsspecial.dimname = NULL;
+		} else if(strcmp(dodsname,"Unlimited_Dimension")==0) {
+		    if(nccomm->cdf.recorddimname != NULL) {
+		        nclog(NCLOGWARN,"Duplicate DODS_EXTRA:Unlimited_Dimension specifications");
+		    } else if(nclistlength(stringvalues) > 0) {
+		        char* stringval = (char*)nclistget(stringvalues,0);
+			nccomm->cdf.recorddimname = nulldup(stringval);
+#ifdef DEBUG
+fprintf(stderr,"%s.Unlimited_Dimension=%s\n",dds->ocname,nccomm->cdf.recorddimname);
+#endif
+		    }
+		} /* else ignore */
+	        nullfree(dodsname);
+	    }
+	    nullfree(dodsnodes);
+	}
+        nullfree(ocname);
+    }
+
+done:
+    nullfree(subnodes);
+    if(ocstat != OC_NOERR) ncstat = ocerrtoncerr(ocstat);
+    return THROW(ncstat);
+}
+
+static int
+isglobalname3(char* name)
+{
+    int len = strlen(name);
+    int glen = strlen("global");
+    char* p;
+    if(len < glen) return 0;
+    p = name + (len - glen);
+    if(strcasecmp(p,"global") != 0)
+	return 0;
+    return 1;
+}
+
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/src_netcdf4/dapcvt.c
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/src_netcdf4/dapcvt.c	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/src_netcdf4/dapcvt.c	(revision 1749)
@@ -0,0 +1,265 @@
+/*********************************************************************
+ *   Copyright 1993, UCAR/Unidata
+ *   See netcdf/COPYRIGHT file for copying and redistribution conditions.
+ *   $Header: /upc/share/CVS/netcdf-3/libncdap3/dapcvt.c,v 1.14 2009/11/29 00:16:26 dmh Exp $
+ *********************************************************************/
+#include "config.h"
+#include "ncdap3.h"
+#include "dapodom.h"
+
+NCerror
+dapconvert3(nc_type srctype, nc_type dsttype, char* memory0, char* value0, size_t count)
+{
+    NCerror ncstat = NC_NOERR;
+    size_t i;
+    char* memory = memory0;
+    char* value = value0;
+
+    /* In order to deal with the DAP upgrade problem,
+	try to preserve the bit patterns
+    */
+
+    /* Provide space and pointer casts for intermediate results */
+    signed char ncbyte;
+    signed char* ncbytep;
+    char ncchar;
+    char* nccharp;
+    short ncshort;
+    short* ncshortp;
+    int ncint;
+    int* ncintp;
+    float ncfloat;
+    float* ncfloatp;
+    double ncdouble;
+    double* ncdoublep;
+    unsigned char ncubyte;
+    unsigned char* ncubytep;
+    unsigned short ncushort;
+    unsigned short* ncushortp;
+    unsigned int ncuint;
+    unsigned int* ncuintp;
+    long long ncint64;
+    long long* ncint64p;
+    unsigned long long ncuint64;
+    unsigned long long* ncuint64p;
+
+
+#define CASE(nc1,nc2) (nc1*256+nc2)
+#define CUT8(e) ((unsigned char)((e) & 0xff))
+#define CUT16(e) ((unsigned short)((e) & 0xffff))
+#define CUT32(e) ((unsigned int)((e) & 0xffffffff))
+#define ARM(vs,ncs,ts,vd,ncd,td) \
+case CASE(ncs,ncd):\
+    vs##p = (ts *)value;\
+    vs = *vs##p;\
+    vd##p = (td *)memory;\
+    *vd##p = (td)vs;\
+    break;
+
+    for(i=0;i<count;i++) {
+
+        switch (CASE(srctype,dsttype)) {
+ARM(ncchar,NC_CHAR,char,ncchar,NC_CHAR,char)
+ARM(ncchar,NC_CHAR,char,ncbyte,NC_BYTE,signed char)
+ARM(ncchar,NC_CHAR,char,ncubyte,NC_UBYTE,unsigned char)
+ARM(ncchar,NC_CHAR,char,ncshort,NC_SHORT,short)
+ARM(ncchar,NC_CHAR,char,ncushort,NC_USHORT,unsigned short)
+ARM(ncchar,NC_CHAR,char,ncint,NC_INT,int)
+ARM(ncchar,NC_CHAR,char,ncuint,NC_UINT,unsigned int)
+ARM(ncchar,NC_CHAR,char,ncint64,NC_INT64,long long)
+ARM(ncchar,NC_CHAR,char,ncuint64,NC_UINT64,unsigned long long)
+ARM(ncchar,NC_CHAR,char,ncfloat,NC_FLOAT,float)
+ARM(ncchar,NC_CHAR,char,ncdouble,NC_DOUBLE,double)
+ARM(ncbyte,NC_BYTE,signed char,ncchar,NC_CHAR,char)
+ARM(ncbyte,NC_BYTE,signed char,ncbyte,NC_BYTE,signed char)
+ARM(ncbyte,NC_BYTE,signed char,ncubyte,NC_UBYTE,unsigned char)
+ARM(ncbyte,NC_BYTE,signed char,ncshort,NC_SHORT,short)
+ARM(ncbyte,NC_BYTE,signed char,ncushort,NC_USHORT,unsigned short)
+ARM(ncbyte,NC_BYTE,signed char,ncint,NC_INT,int)
+ARM(ncbyte,NC_BYTE,signed char,ncuint,NC_UINT,unsigned int)
+ARM(ncbyte,NC_BYTE,signed char,ncint64,NC_INT64,long long)
+ARM(ncbyte,NC_BYTE,signed char,ncuint64,NC_UINT64,unsigned long long)
+ARM(ncbyte,NC_BYTE,signed char,ncfloat,NC_FLOAT,float)
+ARM(ncbyte,NC_BYTE,signed char,ncdouble,NC_DOUBLE,double)
+ARM(ncubyte,NC_UBYTE,unsigned char,ncchar,NC_CHAR,char)
+ARM(ncubyte,NC_UBYTE,unsigned char,ncbyte,NC_BYTE,signed char)
+ARM(ncubyte,NC_UBYTE,unsigned char,ncubyte,NC_UBYTE,unsigned char)
+ARM(ncubyte,NC_UBYTE,unsigned char,ncshort,NC_SHORT,short)
+ARM(ncubyte,NC_UBYTE,unsigned char,ncushort,NC_USHORT,unsigned short)
+ARM(ncubyte,NC_UBYTE,unsigned char,ncint,NC_INT,int)
+ARM(ncubyte,NC_UBYTE,unsigned char,ncuint,NC_UINT,unsigned int)
+ARM(ncubyte,NC_UBYTE,unsigned char,ncint64,NC_INT64,long long)
+ARM(ncubyte,NC_UBYTE,unsigned char,ncuint64,NC_UINT64,unsigned long long)
+ARM(ncubyte,NC_UBYTE,unsigned char,ncfloat,NC_FLOAT,float)
+ARM(ncubyte,NC_UBYTE,unsigned char,ncdouble,NC_DOUBLE,double)
+ARM(ncshort,NC_SHORT,short,ncchar,NC_CHAR,char)
+ARM(ncshort,NC_SHORT,short,ncbyte,NC_BYTE,signed char)
+ARM(ncshort,NC_SHORT,short,ncubyte,NC_UBYTE,unsigned char)
+ARM(ncshort,NC_SHORT,short,ncshort,NC_SHORT,short)
+ARM(ncshort,NC_SHORT,short,ncushort,NC_USHORT,unsigned short)
+ARM(ncshort,NC_SHORT,short,ncint,NC_INT,int)
+ARM(ncshort,NC_SHORT,short,ncuint,NC_UINT,unsigned int)
+ARM(ncshort,NC_SHORT,short,ncint64,NC_INT64,long long)
+ARM(ncshort,NC_SHORT,short,ncuint64,NC_UINT64,unsigned long long)
+ARM(ncshort,NC_SHORT,short,ncfloat,NC_FLOAT,float)
+ARM(ncshort,NC_SHORT,short,ncdouble,NC_DOUBLE,double)
+ARM(ncushort,NC_USHORT,unsigned short,ncchar,NC_CHAR,char)
+ARM(ncushort,NC_USHORT,unsigned short,ncbyte,NC_BYTE,signed char)
+ARM(ncushort,NC_USHORT,unsigned short,ncubyte,NC_UBYTE,unsigned char)
+ARM(ncushort,NC_USHORT,unsigned short,ncshort,NC_SHORT,short)
+ARM(ncushort,NC_USHORT,unsigned short,ncushort,NC_USHORT,unsigned short)
+ARM(ncushort,NC_USHORT,unsigned short,ncint,NC_INT,int)
+ARM(ncushort,NC_USHORT,unsigned short,ncuint,NC_UINT,unsigned int)
+ARM(ncushort,NC_USHORT,unsigned short,ncint64,NC_INT64,long long)
+ARM(ncushort,NC_USHORT,unsigned short,ncuint64,NC_UINT64,unsigned long long)
+ARM(ncushort,NC_USHORT,unsigned short,ncfloat,NC_FLOAT,float)
+ARM(ncushort,NC_USHORT,unsigned short,ncdouble,NC_DOUBLE,double)
+ARM(ncint,NC_INT,int,ncchar,NC_CHAR,char)
+ARM(ncint,NC_INT,int,ncbyte,NC_BYTE,signed char)
+ARM(ncint,NC_INT,int,ncubyte,NC_UBYTE,unsigned char)
+ARM(ncint,NC_INT,int,ncshort,NC_SHORT,short)
+ARM(ncint,NC_INT,int,ncushort,NC_USHORT,unsigned short)
+ARM(ncint,NC_INT,int,ncint,NC_INT,int)
+ARM(ncint,NC_INT,int,ncuint,NC_UINT,unsigned int)
+ARM(ncint,NC_INT,int,ncint64,NC_INT64,long long)
+ARM(ncint,NC_INT,int,ncuint64,NC_UINT64,unsigned long long)
+ARM(ncint,NC_INT,int,ncfloat,NC_FLOAT,float)
+ARM(ncint,NC_INT,int,ncdouble,NC_DOUBLE,double)
+ARM(ncuint,NC_UINT,unsigned int,ncchar,NC_CHAR,char)
+ARM(ncuint,NC_UINT,unsigned int,ncbyte,NC_BYTE,signed char)
+ARM(ncuint,NC_UINT,unsigned int,ncubyte,NC_UBYTE,unsigned char)
+ARM(ncuint,NC_UINT,unsigned int,ncshort,NC_SHORT,short)
+ARM(ncuint,NC_UINT,unsigned int,ncushort,NC_USHORT,unsigned short)
+ARM(ncuint,NC_UINT,unsigned int,ncint,NC_INT,int)
+ARM(ncuint,NC_UINT,unsigned int,ncuint,NC_UINT,unsigned int)
+ARM(ncuint,NC_UINT,unsigned int,ncint64,NC_INT64,long long)
+ARM(ncuint,NC_UINT,unsigned int,ncuint64,NC_UINT64,unsigned long long)
+ARM(ncuint,NC_UINT,unsigned int,ncfloat,NC_FLOAT,float)
+ARM(ncuint,NC_UINT,unsigned int,ncdouble,NC_DOUBLE,double)
+ARM(ncint64,NC_INT64,long long,ncchar,NC_CHAR,char)
+ARM(ncint64,NC_INT64,long long,ncbyte,NC_BYTE,signed char)
+ARM(ncint64,NC_INT64,long long,ncubyte,NC_UBYTE,unsigned char)
+ARM(ncint64,NC_INT64,long long,ncshort,NC_SHORT,short)
+ARM(ncint64,NC_INT64,long long,ncushort,NC_USHORT,unsigned short)
+ARM(ncint64,NC_INT64,long long,ncint,NC_INT,int)
+ARM(ncint64,NC_INT64,long long,ncuint,NC_UINT,unsigned int)
+ARM(ncint64,NC_INT64,long long,ncint64,NC_INT64,long long)
+ARM(ncint64,NC_INT64,long long,ncuint64,NC_UINT64,unsigned long long)
+ARM(ncint64,NC_INT64,long long,ncfloat,NC_FLOAT,float)
+ARM(ncint64,NC_INT64,long long,ncdouble,NC_DOUBLE,double)
+ARM(ncuint64,NC_UINT64,unsigned long long,ncchar,NC_CHAR,char)
+ARM(ncuint64,NC_UINT64,unsigned long long,ncbyte,NC_BYTE,signed char)
+ARM(ncuint64,NC_UINT64,unsigned long long,ncubyte,NC_UBYTE,unsigned char)
+ARM(ncuint64,NC_UINT64,unsigned long long,ncshort,NC_SHORT,short)
+ARM(ncuint64,NC_UINT64,unsigned long long,ncushort,NC_USHORT,unsigned short)
+ARM(ncuint64,NC_UINT64,unsigned long long,ncint,NC_INT,int)
+ARM(ncuint64,NC_UINT64,unsigned long long,ncuint,NC_UINT,unsigned int)
+ARM(ncuint64,NC_UINT64,unsigned long long,ncint64,NC_INT64,long long)
+ARM(ncuint64,NC_UINT64,unsigned long long,ncuint64,NC_UINT64,unsigned long long)
+ARM(ncuint64,NC_UINT64,unsigned long long,ncfloat,NC_FLOAT,float)
+ARM(ncuint64,NC_UINT64,unsigned long long,ncdouble,NC_DOUBLE,double)
+ARM(ncfloat,NC_FLOAT,float,ncchar,NC_CHAR,char)
+ARM(ncfloat,NC_FLOAT,float,ncbyte,NC_BYTE,signed char)
+ARM(ncfloat,NC_FLOAT,float,ncubyte,NC_UBYTE,unsigned char)
+ARM(ncfloat,NC_FLOAT,float,ncshort,NC_SHORT,short)
+ARM(ncfloat,NC_FLOAT,float,ncushort,NC_USHORT,unsigned short)
+ARM(ncfloat,NC_FLOAT,float,ncint,NC_INT,int)
+ARM(ncfloat,NC_FLOAT,float,ncuint,NC_UINT,unsigned int)
+ARM(ncfloat,NC_FLOAT,float,ncint64,NC_INT64,long long)
+ARM(ncfloat,NC_FLOAT,float,ncuint64,NC_UINT64,unsigned long long)
+ARM(ncfloat,NC_FLOAT,float,ncfloat,NC_FLOAT,float)
+ARM(ncfloat,NC_FLOAT,float,ncdouble,NC_DOUBLE,double)
+ARM(ncdouble,NC_DOUBLE,double,ncchar,NC_CHAR,char)
+ARM(ncdouble,NC_DOUBLE,double,ncbyte,NC_BYTE,signed char)
+ARM(ncdouble,NC_DOUBLE,double,ncubyte,NC_UBYTE,unsigned char)
+ARM(ncdouble,NC_DOUBLE,double,ncshort,NC_SHORT,short)
+ARM(ncdouble,NC_DOUBLE,double,ncushort,NC_USHORT,unsigned short)
+ARM(ncdouble,NC_DOUBLE,double,ncint,NC_INT,int)
+ARM(ncdouble,NC_DOUBLE,double,ncuint,NC_UINT,unsigned int)
+ARM(ncdouble,NC_DOUBLE,double,ncint64,NC_INT64,long long)
+ARM(ncdouble,NC_DOUBLE,double,ncuint64,NC_UINT64,unsigned long long)
+ARM(ncdouble,NC_DOUBLE,double,ncfloat,NC_FLOAT,float)
+ARM(ncdouble,NC_DOUBLE,double,ncdouble,NC_DOUBLE,double)
+	
+        default: ncstat = NC_EINVAL; THROWCHK(ncstat); goto fail;
+        }
+        value += nctypesizeof(srctype);
+        memory += nctypesizeof(dsttype);
+    }
+
+fail:
+    return THROW(ncstat);
+}
+
+NCerror
+dapcvtattrval3(nc_type etype, void* dst, NClist* src)
+{
+    int i,ok;
+    NCerror  ncstat = NC_NOERR;
+    unsigned int memsize = nctypesizeof(etype);
+    unsigned int nvalues = nclistlength(src);
+    char* dstmem = (char*)dst;
+
+    for(i=0;i<nvalues;i++) {
+	char* s = (char*)nclistget(src,i);
+	ok = 0;
+	switch (etype) {
+	case NC_BYTE: {
+	    unsigned char* p = (unsigned char*)dstmem;
+	    ok = sscanf(s,"%hhu",p);
+	    } break;
+	case NC_CHAR: {
+	    signed char* p = (signed char*)dstmem;
+	    ok = sscanf(s,"%c",p);
+	    } break;
+	case NC_SHORT: {
+	    short* p = (short*)dstmem;
+	    ok = sscanf(s,"%hd",p);
+	    } break;
+	case NC_INT: {
+	    int* p = (int*)dstmem;
+	    ok = sscanf(s,"%d",p);
+	    } break;
+	case NC_FLOAT: {
+	    float* p = (float*)dstmem;
+	    ok = sscanf(s,"%g",p);
+	    } break;
+	case NC_DOUBLE: {
+	    double* p = (double*)dstmem;
+	    ok = sscanf(s,"%lg",p);
+	    } break;
+	case NC_UBYTE: {
+	    unsigned char* p = (unsigned char*)dstmem;
+	    ok = sscanf(s,"%hhu",p);
+	    } break;
+	case NC_USHORT: {
+	    unsigned short* p = (unsigned short*)dstmem;
+	    ok = sscanf(s,"%hu",p);
+	    } break;
+	case NC_UINT: {
+	    unsigned int* p = (unsigned int*)dstmem;
+	    ok = sscanf(s,"%u",p);
+	    } break;
+	case NC_INT64: {
+	    long long* p = (long long*)dstmem;
+	    ok = sscanf(s,"%lld",p);
+	    } break;
+	case NC_UINT64: {
+	    unsigned long long* p = (unsigned long long*)dstmem;
+	    ok = sscanf(s,"%llu",p);
+	    } break;
+	case NC_STRING: case NC_URL: {
+	    char** p = (char**)dstmem;
+	    *p = nulldup(s);
+	    ok = 1;
+	    } break;
+	default:
+   	    PANIC1("unexpected nc_type: %d",(int)etype);
+	}
+	if(ok != 1) {ncstat = NC_EINVAL; goto done;}
+	dstmem += memsize;
+    }
+done:
+    return THROW(ncstat);
+}
+
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/src_netcdf4/dapdebug.c
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/src_netcdf4/dapdebug.c	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/src_netcdf4/dapdebug.c	(revision 1749)
@@ -0,0 +1,44 @@
+/*********************************************************************
+ *   Copyright 1993, UCAR/Unidata
+ *   See netcdf/COPYRIGHT file for copying and redistribution conditions.
+ *   $Header: /upc/share/CVS/netcdf-3/libncdap3/dapdebug.c,v 1.9 2009/09/23 22:26:00 dmh Exp $
+ *********************************************************************/
+#include "config.h"
+#include <stdarg.h>
+#include <stdio.h>
+
+#include "nclog.h"
+#include "oc.h"
+#include "dapdebug.h"
+
+int ncdap3debug = 0;
+
+#ifdef CATCHERROR
+/* Place breakpoint here to catch errors close to where they occur*/
+int
+dapbreakpoint(int err) {return err;}
+
+int
+dapthrow(int err)
+{
+    if(err == 0) return err;
+    return dapbreakpoint(err);
+}
+#endif
+
+int
+dappanic(const char* fmt, ...)
+{
+    va_list args;
+    if(fmt != NULL) {
+      va_start(args, fmt);
+      vfprintf(stderr, fmt, args);
+      fprintf(stderr, "\n" );
+      va_end( args );
+    } else {
+      fprintf(stderr, "panic" );
+    }
+    fprintf(stderr, "\n" );
+    fflush(stderr);
+    return 0;
+}
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/src_netcdf4/dapdebug.h
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/src_netcdf4/dapdebug.h	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/src_netcdf4/dapdebug.h	(revision 1749)
@@ -0,0 +1,73 @@
+/*********************************************************************
+ *   Copyright 1993, UCAR/Unidata
+ *   See netcdf/COPYRIGHT file for copying and redistribution conditions.
+ *   $Header: /upc/share/CVS/netcdf-3/libncdap3/dapdebug.h,v 1.33 2009/12/03 18:53:16 dmh Exp $
+ *********************************************************************/
+#ifndef DEBUG_H
+#define DEBUG_H
+
+#include "ocdebug.h"
+
+#ifdef DAPDEBUG
+#  define DEBUG
+#  if DAPDEBUG > 0
+#    define DEBUG1
+#  endif
+#  if DAPDEBUG > 1
+#    define DEBUG2
+#  endif
+#  if DAPDEBUG > 2
+#    define DEBUG3
+#  endif
+#endif
+
+#undef PARSEDEBUG
+
+#include <stdarg.h>
+#include <assert.h>
+
+/* Warning: setting CATCHERROR has significant performance impact */
+#undef CATCHERROR
+#ifdef DEBUG
+#undef CATCHERROR
+#define CATCHERROR
+#endif
+
+#define PANIC(msg) assert(dappanic(msg));
+#define PANIC1(msg,arg) assert(dappanic(msg,arg));
+#define PANIC2(msg,arg1,arg2) assert(dappanic(msg,arg1,arg2));
+
+#define ASSERT(expr) if(!(expr)) {PANIC(#expr);} else {}
+
+extern int ncdap3debug;
+
+extern int dappanic(const char* fmt, ...);
+
+#define MEMCHECK(var,throw) {if((var)==NULL) return (throw);}
+
+#ifdef CATCHERROR
+/* Place breakpoint on dapbreakpoint to catch errors close to where they occur*/
+#define THROW(e) dapthrow(e)
+#define THROWCHK(e) (void)dapthrow(e)
+
+extern int dapbreakpoint(int err);
+extern int dapthrow(int err);
+#else
+#define THROW(e) (e)
+#define THROWCHK(e)
+#endif
+
+#ifdef DEBUG
+#define SHOWFETCH (1)
+#define LOG0(level,msg) fprintf(stderr,msg)
+#define LOG1(level,msg,a1) fprintf(stderr,msg,a1)
+#define LOG2(level,msg,a1,a2) fprintf(stderr,msg,a1,a2)
+#else
+#define SHOWFETCH FLAGSET(nccomm->controls,NCF_SHOWFETCH)
+#define LOG0(level,msg) nclog(level,msg)
+#define LOG1(level,msg,a1) nclog(level,msg,a1)
+#define LOG2(level,msg,a1,a2) nclog(level,msg,a1,a2)
+#endif
+
+#endif /*DEBUG_H*/
+
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/src_netcdf4/dapdump.c
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/src_netcdf4/dapdump.c	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/src_netcdf4/dapdump.c	(revision 1749)
@@ -0,0 +1,607 @@
+/*********************************************************************
+ *   Copyright 1993, UCAR/Unidata
+ *   See netcdf/COPYRIGHT file for copying and redistribution conditions.
+ *   $Header: /upc/share/CVS/netcdf-3/libncdap3/dapdump.c,v 1.21 2010/05/26 21:43:31 dmh Exp $
+ *********************************************************************/
+#include "config.h"
+#ifdef USE_PARALLEL
+#include "netcdf_par.h"
+#endif
+#include "ncdap3.h"
+#include "dapdump.h"
+#include "dceconstraints.h"
+
+#define CHECK(n) if((n) != NC_NOERR) {return (n);} else {}
+
+static void dumptreer(CDFnode* root, NCbytes* buf, int indent, int visible);
+
+int
+dumpmetadata(int ncid, NChdr** hdrp)
+{
+    int stat,i,j,k;
+    NChdr* hdr = (NChdr*)calloc(1,sizeof(NChdr));
+    MEMCHECK(hdr,NC_ENOMEM);
+    hdr->ncid = ncid;
+    hdr->content = ncbytesnew();
+    if(hdrp) *hdrp = hdr;
+
+    stat = nc_inq(hdr->ncid,
+		  &hdr->ndims,
+		  &hdr->nvars,
+		  &hdr->ngatts,
+		  &hdr->unlimid);
+    CHECK(stat);
+    if(ncdap3debug > 0) {
+        fprintf(stdout,"ncid=%d ngatts=%d ndims=%d nvars=%d unlimid=%d\n",
+		hdr->ncid,hdr->ngatts,hdr->ndims,hdr->nvars,hdr->unlimid);
+    }
+    hdr->gatts = (NCattribute*)calloc(1,hdr->ngatts*sizeof(NCattribute));
+    MEMCHECK(hdr->gatts,NC_ENOMEM);
+    if(hdr->ngatts > 0)
+	fprintf(stdout,"global attributes:\n");
+    for(i=0;i<hdr->ngatts;i++) {
+	NCattribute* att = &hdr->gatts[i];
+        char attname[NC_MAX_NAME];
+	nc_type nctype;
+	size_t typesize;
+        size_t nvalues;
+
+        stat = nc_inq_attname(hdr->ncid,NC_GLOBAL,i,attname);
+        CHECK(stat);
+	att->name = nulldup(attname);
+	stat = nc_inq_att(hdr->ncid,NC_GLOBAL,att->name,&nctype,&nvalues);
+        CHECK(stat);
+	att->etype = nctypetodap(nctype);
+ 	typesize = nctypesizeof(att->etype);
+	fprintf(stdout,"\t[%d]: name=%s type=%s values(%lu)=",
+			i,att->name,nctypetostring(octypetonc(att->etype)),
+                        (unsigned long)nvalues);
+	if(nctype == NC_CHAR) {
+	    size_t len = typesize*nvalues;
+	    char* values = (char*)malloc(len+1);/* for null terminate*/
+	    MEMCHECK(values,NC_ENOMEM);
+	    stat = nc_get_att(hdr->ncid,NC_GLOBAL,att->name,values);
+            CHECK(stat);
+	    values[len] = '\0';
+	    fprintf(stdout," '%s'",values);
+	} else {
+	    size_t len = typesize*nvalues;
+	    char* values = (char*)malloc(len);
+	    MEMCHECK(values,NC_ENOMEM);
+	    stat = nc_get_att(hdr->ncid,NC_GLOBAL,att->name,values);
+            CHECK(stat);
+	    for(k=0;k<nvalues;k++) {
+		fprintf(stdout," ");
+		dumpdata1(octypetonc(att->etype),k,values);
+	    }
+	}
+	fprintf(stdout,"\n");
+    }
+
+    hdr->dims = (Dim*)malloc(hdr->ndims*sizeof(Dim));
+    MEMCHECK(hdr->dims,NC_ENOMEM);
+    for(i=0;i<hdr->ndims;i++) {
+	hdr->dims[i].dimid = i;
+        stat = nc_inq_dim(hdr->ncid,
+	                  hdr->dims[i].dimid,
+	                  hdr->dims[i].name,
+	                  &hdr->dims[i].size);
+        CHECK(stat);
+	fprintf(stdout,"dim[%d]: name=%s size=%lu\n",
+		i,hdr->dims[i].name,(unsigned long)hdr->dims[i].size);
+    }    
+    hdr->vars = (Var*)malloc(hdr->nvars*sizeof(Var));
+    MEMCHECK(hdr->vars,NC_ENOMEM);
+    for(i=0;i<hdr->nvars;i++) {
+	Var* var = &hdr->vars[i];
+	nc_type nctype;
+	var->varid = i;
+        stat = nc_inq_var(hdr->ncid,
+	                  var->varid,
+	                  var->name,
+			  &nctype,
+			  &var->ndims,
+			  var->dimids,
+	                  &var->natts);
+        CHECK(stat);
+	var->nctype = (nctype);
+	fprintf(stdout,"var[%d]: name=%s type=%s |dims|=%d",
+		i,
+		var->name,
+		nctypetostring(var->nctype),
+		var->ndims);
+	fprintf(stdout," dims={");
+	for(j=0;j<var->ndims;j++) {
+	    fprintf(stdout," %d",var->dimids[j]);
+	}
+	fprintf(stdout,"}\n");
+	var->atts = (NCattribute*)malloc(var->natts*sizeof(NCattribute));
+        MEMCHECK(var->atts,NC_ENOMEM);
+        for(j=0;j<var->natts;j++) {
+	    NCattribute* att = &var->atts[j];
+	    char attname[NC_MAX_NAME];
+	    size_t typesize;
+	    char* values;
+	    nc_type nctype;
+	    size_t nvalues;
+            stat = nc_inq_attname(hdr->ncid,var->varid,j,attname);
+	    CHECK(stat);
+	    att->name = nulldup(attname);
+	    stat = nc_inq_att(hdr->ncid,var->varid,att->name,&nctype,&nvalues);
+	    CHECK(stat);
+	    att->etype = nctypetodap(nctype);
+	    typesize = nctypesizeof(att->etype);
+	    values = (char*)malloc(typesize*nvalues);
+	    MEMCHECK(values,NC_ENOMEM);
+	    stat = nc_get_att(hdr->ncid,var->varid,att->name,values);
+            CHECK(stat);
+	    fprintf(stdout,"\tattr[%d]: name=%s type=%s values(%lu)=",
+			j,att->name,nctypetostring(octypetonc(att->etype)),(unsigned long)nvalues);
+	    for(k=0;k<nvalues;k++) {
+		fprintf(stdout," ");
+		dumpdata1(octypetonc(att->etype),k,values);
+	    }
+	    fprintf(stdout,"\n");
+	}
+    }    
+    fflush(stdout);
+    return NC_NOERR;
+}
+
+void
+dumpdata1(nc_type nctype, size_t index, char* data)
+{
+    switch (nctype) {
+    case NC_CHAR:
+	fprintf(stdout,"'%c' %hhd",data[index],data[index]);
+	break;
+    case NC_BYTE:
+	fprintf(stdout,"%hdB",((signed char*)data)[index]);
+	break;
+    case NC_UBYTE:
+	fprintf(stdout,"%huB",((unsigned char*)data)[index]);
+	break;
+    case NC_SHORT:
+	fprintf(stdout,"%hdS",((short*)data)[index]);
+	break;
+    case NC_USHORT:
+	fprintf(stdout,"%hdUS",((unsigned short*)data)[index]);
+	break;
+    case NC_INT:
+	fprintf(stdout,"%d",((int*)data)[index]);
+	break;
+    case NC_UINT:
+	fprintf(stdout,"%uU",((unsigned int*)data)[index]);
+	break;
+    case NC_FLOAT:
+	fprintf(stdout,"%#gF",((float*)data)[index]);
+	break;
+    case NC_DOUBLE:
+	fprintf(stdout,"%#gD",((double*)data)[index]);
+	break;
+    case NC_STRING:
+	fprintf(stdout,"\"%s\"",((char**)data)[index]);
+	break;
+    default:
+	fprintf(stdout,"Unknown type: %i",nctype);
+	break;
+    }
+    fflush(stdout);
+}
+
+/* Following should be kept consistent with
+   the makeXXXstring3 routines in constraints3.c
+*/
+
+/* Convert an NCprojection instance into a string
+   that can be used with the url
+*/
+char*
+dumpprojections(NClist* projections)
+{
+    char* tmp;
+    int v = dceverbose;
+    dceverbose = 1;
+    tmp = dcelisttostring(projections,",");
+    dceverbose = v;
+    return tmp;
+}
+
+char*
+dumpprojection(DCEprojection* proj)
+{
+    char* tmp;
+    int v = dceverbose;
+    dceverbose = 1;
+    tmp = dcetostring((DCEnode*)proj);
+    dceverbose = v;
+    return tmp;
+}
+
+char*
+dumpselections(NClist* selections)
+{
+    return dcelisttostring(selections,"&");
+}
+
+char*
+dumpselection(DCEselection* sel)
+{
+    return dcetostring((DCEnode*)sel);
+}
+
+char*
+dumpconstraint(DCEconstraint* con)
+{
+    char* tmp;
+    int v = dceverbose;
+    dceverbose = 1;
+    tmp = dcetostring((DCEnode*)con);
+    dceverbose = v;
+    return tmp;
+}
+
+char*
+dumpsegments(NClist* segments)
+{
+    return dcelisttostring(segments,".");
+}
+
+char*
+dumppath(CDFnode* leaf)
+{
+    NClist* path = nclistnew();
+    NCbytes* buf = ncbytesnew();
+    char* result;
+    int i;
+
+    if(leaf == NULL) return nulldup("");
+    collectnodepath3(leaf,path,!WITHDATASET);
+    for(i=0;i<nclistlength(path);i++) {
+	CDFnode* node = (CDFnode*)nclistget(path,i);
+	if(i > 0) ncbytescat(buf,".");
+	ncbytescat(buf,node->ncbasename);
+    }
+    result = ncbytesdup(buf);
+    ncbytesfree(buf);
+    nclistfree(path);
+    return result;
+}
+
+static void
+dumpindent(int indent, NCbytes* buf)
+{
+    static char* indentstr = "  ";
+    int i;
+    for(i=0;i<indent;i++) ncbytescat(buf,indentstr);
+}
+
+static void
+dumptreer1(CDFnode* root, NCbytes* buf, int indent, char* tag, int visible)
+{
+    int i;
+    dumpindent(indent,buf);
+    ncbytescat(buf,tag);
+    ncbytescat(buf," {\n");
+    for(i=0;i<nclistlength(root->subnodes);i++) {
+	CDFnode* node = (CDFnode*)nclistget(root->subnodes,i);
+	if(visible && !root->visible) continue;
+	if(root->nctype == NC_Grid) {
+	    if(i==0) {
+		dumpindent(indent+1,buf);
+	        ncbytescat(buf,"Array:\n");
+	    } else if(i==1) {
+		dumpindent(indent+1,buf);
+	        ncbytescat(buf,"Maps:\n");
+	    }
+	    dumptreer(node,buf,indent+2,visible);
+	} else {
+	    dumptreer(node,buf,indent+1,visible);
+	}
+    }
+    dumpindent(indent,buf);
+    ncbytescat(buf,"} ");
+    ncbytescat(buf,root->ncbasename);
+}
+
+static void
+dumptreer(CDFnode* root, NCbytes* buf, int indent, int visible)
+{
+    int i;
+    char* primtype = NULL;
+    NClist* dimset = NULL;
+
+    if(visible && !root->visible) return;
+    switch (root->nctype) {
+    case NC_Dataset:
+	dumptreer1(root,buf,indent,"Dataset",visible);
+	break;
+    case NC_Sequence:
+	dumptreer1(root,buf,indent,"Sequence",visible);
+	break;
+    case NC_Structure:
+	dumptreer1(root,buf,indent,"Structure",visible);
+	break;
+    case NC_Grid:
+	dumptreer1(root,buf,indent,"Grid",visible);
+	break;
+    case NC_Primitive:
+	switch (root->etype) {
+	case NC_BYTE: primtype = "byte"; break;
+	case NC_CHAR: primtype = "char"; break;
+	case NC_SHORT: primtype = "short"; break;
+	case NC_INT: primtype = "int"; break;
+	case NC_FLOAT: primtype = "float"; break;
+	case NC_DOUBLE: primtype = "double"; break;
+	case NC_UBYTE: primtype = "ubyte"; break;
+	case NC_USHORT: primtype = "ushort"; break;
+	case NC_UINT: primtype = "uint"; break;
+	case NC_INT64: primtype = "int64"; break;
+	case NC_UINT64: primtype = "uint64"; break;
+	case NC_STRING: primtype = "string"; break;
+	default: break;
+	}
+	dumpindent(indent,buf);
+	ncbytescat(buf,primtype);
+	ncbytescat(buf," ");
+	ncbytescat(buf,root->ncbasename);
+	break;
+    default: break;    
+    }
+
+    if(nclistlength(root->array.dimsetplus) > 0) dimset = root->array.dimsetplus;
+    else if(nclistlength(root->array.dimset0) > 0) dimset = root->array.dimset0;
+    if(dimset != NULL) {
+	for(i=0;i<nclistlength(dimset);i++) {
+	    CDFnode* dim = (CDFnode*)nclistget(dimset,i);
+	    char tmp[64];
+	    ncbytescat(buf,"[");
+	    if(dim->ncbasename != NULL) {
+		ncbytescat(buf,dim->ncbasename);
+	        ncbytescat(buf,"=");
+	    }
+	    snprintf(tmp,sizeof(tmp),"%lu",(unsigned long)dim->dim.declsize);
+	    ncbytescat(buf,tmp);
+	    ncbytescat(buf,"]");
+	}
+    }
+    ncbytescat(buf,";\n");
+}
+
+char*
+dumptree(CDFnode* root)
+{
+    NCbytes* buf = ncbytesnew();
+    char* result;
+    dumptreer(root,buf,0,0);
+    result = ncbytesdup(buf);
+    ncbytesfree(buf);
+    return result;
+}
+
+char*
+dumpvisible(CDFnode* root)
+{
+    NCbytes* buf = ncbytesnew();
+    char* result;
+    dumptreer(root,buf,0,1);
+    result = ncbytesdup(buf);
+    ncbytesfree(buf);
+    return result;
+}
+
+/* Provide detailed data on a CDFnode */
+char*
+dumpnode(CDFnode* node)
+{
+    NCbytes* buf = ncbytesnew();
+    char* result;
+    int i;
+    char* nctype = NULL;
+    char* primtype = NULL;
+    char tmp[1024];
+
+    switch (node->nctype) {
+    case NC_Dataset: nctype = "Dataset"; break;
+    case NC_Sequence: nctype = "Sequence"; break;
+    case NC_Structure: nctype = "Structure"; break;
+    case NC_Grid: nctype = "Grid"; break;
+    case NC_Primitive:
+	switch (node->etype) {
+	case NC_BYTE: primtype = "byte"; break;
+	case NC_CHAR: primtype = "char"; break;
+	case NC_SHORT: primtype = "short"; break;
+	case NC_INT: primtype = "int"; break;
+	case NC_FLOAT: primtype = "float"; break;
+	case NC_DOUBLE: primtype = "double"; break;
+	case NC_UBYTE: primtype = "ubyte"; break;
+	case NC_USHORT: primtype = "ushort"; break;
+	case NC_UINT: primtype = "uint"; break;
+	case NC_INT64: primtype = "int64"; break;
+	case NC_UINT64: primtype = "uint64"; break;
+	case NC_STRING: primtype = "string"; break;
+	default: break;
+	}
+	break;
+    default: break;    
+    }
+    snprintf(tmp,sizeof(tmp),"%s %s {\n",
+		(nctype?nctype:primtype),node->ocname);
+    ncbytescat(buf,tmp);
+    snprintf(tmp,sizeof(tmp),"ocnode=%lx\n",(unsigned long)node->ocnode);
+    ncbytescat(buf,tmp);
+    snprintf(tmp,sizeof(tmp),"container=%s\n",
+		(node->container?node->container->ocname:"null"));
+    ncbytescat(buf,tmp);
+    snprintf(tmp,sizeof(tmp),"root=%s\n",
+		(node->root?node->root->ocname:"null"));
+    ncbytescat(buf,tmp);
+    snprintf(tmp,sizeof(tmp),"ncbasename=%s\n",node->ncbasename);
+    ncbytescat(buf,tmp);
+    snprintf(tmp,sizeof(tmp),"ncfullname=%s\n",node->ncfullname);
+    ncbytescat(buf,tmp);
+    snprintf(tmp,sizeof(tmp),"|subnodes|=%d\n",nclistlength(node->subnodes));
+    ncbytescat(buf,tmp);
+    snprintf(tmp,sizeof(tmp),"externaltype=%d\n",node->externaltype);
+    ncbytescat(buf,tmp);
+    snprintf(tmp,sizeof(tmp),"ncid=%d\n",node->ncid);
+    ncbytescat(buf,tmp);
+    snprintf(tmp,sizeof(tmp),"maxstringlength=%ld\n",node->maxstringlength);
+    ncbytescat(buf,tmp);
+    snprintf(tmp,sizeof(tmp),"sequencelimit=%ld\n",node->sequencelimit);
+    ncbytescat(buf,tmp);
+    snprintf(tmp,sizeof(tmp),"usesequence=%d\n",node->usesequence);
+    ncbytescat(buf,tmp);
+    snprintf(tmp,sizeof(tmp),"elided=%d\n",node->elided);
+    ncbytescat(buf,tmp);
+    snprintf(tmp,sizeof(tmp),"visible=%d\n",node->visible);
+    ncbytescat(buf,tmp);
+    snprintf(tmp,sizeof(tmp),"attachment=%s\n",
+		(node->attachment?node->attachment->ocname:"null"));
+    ncbytescat(buf,tmp);
+    snprintf(tmp,sizeof(tmp),"rank=%u\n",nclistlength(node->array.dimset0));
+    ncbytescat(buf,tmp);
+    for(i=0;i<nclistlength(node->array.dimset0);i++) {
+	CDFnode* dim = (CDFnode*)nclistget(node->array.dimset0,i);
+        snprintf(tmp,sizeof(tmp),"dims[%d]={\n",i);
+        ncbytescat(buf,tmp);
+	snprintf(tmp,sizeof(tmp),"    ocname=%s\n",dim->ocname);
+        ncbytescat(buf,tmp);
+	snprintf(tmp,sizeof(tmp),"    ncbasename=%s\n",dim->ncbasename);
+        ncbytescat(buf,tmp);
+	snprintf(tmp,sizeof(tmp),"    dimflags=%u\n",
+			(unsigned int)dim->dim.dimflags);
+        ncbytescat(buf,tmp);
+	snprintf(tmp,sizeof(tmp),"    declsize=%lu\n",
+		    (unsigned long)dim->dim.declsize);
+        ncbytescat(buf,tmp);
+        snprintf(tmp,sizeof(tmp),"    }\n");
+        ncbytescat(buf,tmp);
+    }
+
+    result = ncbytesdup(buf);
+    ncbytesfree(buf);
+    return result;
+}
+
+char*
+dumpalign(NCalignment* ncalign)
+{
+    char* result;
+    char tmp[1024];
+    if(ncalign == NULL)
+	result = nulldup("NCalignment{size=-- alignment=-- offset=--}");
+    else {
+        snprintf(tmp,sizeof(tmp),"NCalignment{size=%lu alignment=%lu offset=%lu}",
+		 ncalign->size,ncalign->alignment,ncalign->offset);
+        result = nulldup(tmp);
+    }
+    return result;
+}
+
+char*
+dumpcachenode(NCcachenode* node)
+{
+    char* result = NULL;
+    char tmp[8192];
+    int i;
+    NCbytes* buf;
+
+    if(node == NULL) return strdup("cachenode{null}");
+    buf = ncbytesnew();
+    result = buildconstraintstring3(node->constraint);
+    snprintf(tmp,sizeof(tmp),"cachenode%s(%lx){size=%lu; constraint=%s; vars=",
+		node->prefetch?"*":"",
+		(unsigned long)node,
+		(unsigned long)node->xdrsize,
+	        result);
+    ncbytescat(buf,tmp);
+    if(nclistlength(node->vars)==0)
+	ncbytescat(buf,"null");
+    else for(i=0;i<nclistlength(node->vars);i++) {
+	CDFnode* var = (CDFnode*)nclistget(node->vars,i);
+	if(i > 0) ncbytescat(buf,",");
+	ncbytescat(buf,makecdfpathstring3(var,"."));
+    }
+    ncbytescat(buf,"}");
+    result = ncbytesdup(buf);
+    ncbytesfree(buf);
+    return result;
+}
+
+char*
+dumpcache(NCcache* cache)
+{
+    char* result = NULL;
+    char tmp[8192];
+    int i;
+    NCbytes* buf;
+
+    if(cache == NULL) return strdup("cache{null}");
+    buf = ncbytesnew();
+    snprintf(tmp,sizeof(tmp),"cache{limit=%lu; size=%lu;\n",
+		(unsigned long)cache->cachelimit,
+		(unsigned long)cache->cachesize);
+    ncbytescat(buf,tmp);
+    if(cache->prefetch) {
+	ncbytescat(buf,"\tprefetch=");
+	ncbytescat(buf,dumpcachenode(cache->prefetch));
+	ncbytescat(buf,"\n");
+    }
+    if(nclistlength(cache->nodes) > 0) {
+        for(i=0;i<nclistlength(cache->nodes);i++) {
+   	    NCcachenode* node = (NCcachenode*)nclistget(cache->nodes,i);
+	    ncbytescat(buf,"\t");
+	    ncbytescat(buf,dumpcachenode(node));
+	    ncbytescat(buf,"\n");
+	}
+    }
+    ncbytescat(buf,"}");
+    result = ncbytesdup(buf);
+    ncbytesfree(buf);
+    return result;
+}
+
+/* This should be consistent with makeslicestring3 in constraints3.c */
+char*
+dumpslice(DCEslice* slice)
+{
+	char buf[8192];
+	char tmp[8192];
+        size_t last = (slice->first+slice->length)-1;
+	buf[0] = '\0';
+	if(last > slice->declsize && slice->declsize > 0)
+	    last = slice->declsize - 1;
+        if(slice->count == 1) {
+            snprintf(tmp,sizeof(tmp),"[%lu]",
+	        (unsigned long)slice->first);
+        } else if(slice->stride == 1) {
+            snprintf(tmp,sizeof(tmp),"[%lu:%lu]",
+	            (unsigned long)slice->first,
+	            (unsigned long)last);
+        } else {
+	   snprintf(tmp,sizeof(tmp),"[%lu:%lu:%lu]",
+		    (unsigned long)slice->first,
+		    (unsigned long)slice->stride,
+		    (unsigned long)last);
+        }
+	strcat(buf,tmp);
+	return strdup(tmp);
+}
+
+char*
+dumpslices(DCEslice* slice, unsigned int rank)
+{
+    int i;
+    NCbytes* buf;
+    char* result = NULL;
+
+    buf = ncbytesnew();
+    for(i=0;i<rank;i++,slice++) {
+        ncbytescat(buf,dumpslice(slice));
+    }
+    result = ncbytesdup(buf);
+    ncbytesfree(buf);
+    return result;
+}
+
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/src_netcdf4/dapdump.h
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/src_netcdf4/dapdump.h	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/src_netcdf4/dapdump.h	(revision 1749)
@@ -0,0 +1,68 @@
+/*********************************************************************
+ *   Copyright 1993, UCAR/Unidata
+ *   See netcdf/COPYRIGHT file for copying and redistribution conditions.
+ *   $Header: /upc/share/CVS/netcdf-3/libncdap3/dapdump.h,v 1.9 2010/04/10 20:56:37 dmh Exp $
+ *********************************************************************/
+#ifndef DUMP_H
+#define DUMP_H
+
+typedef struct Dimschema {
+    int dimid;
+/*    int cloneid;*/
+    size_t size;
+    char name[NC_MAX_NAME+1];
+} Dim;
+
+typedef struct Varschema {
+    int varid;
+/*    int cloneid;*/
+    char name[NC_MAX_NAME+1];
+    nc_type nctype;
+    int ndims;
+    int dimids[NC_MAX_VAR_DIMS];
+    size_t nelems; /*# elements*/
+    size_t alloc; /* malloc size*/
+    int natts;
+    NCattribute* atts;
+} Var;
+
+typedef struct NChdr {
+    int ncid;
+    int format;
+    int ndims;
+    int nvars;
+    int ngatts;
+    int unlimid; /* id of the (1) unlimited dimension*/
+    Dim* dims;
+    Var* vars;
+    NCattribute* gatts;
+    NCbytes* content;
+} NChdr;
+
+extern int dumpmetadata(int ncid, NChdr**);
+extern void dumpdata1(nc_type nctype, size_t index, char* data);
+
+extern char* dumppath(struct CDFnode* node);
+extern char* dumptree(CDFnode* root);
+extern char* dumpvisible(CDFnode* root);
+extern char* dumpnode(CDFnode* node);
+
+extern char* dumpalign(struct NCalignment*);
+
+extern char* dumpcachenode(NCcachenode* node);
+extern char* dumpcache(NCcache* cache);
+
+extern int dumpmetadata(int ncid, NChdr** hdrp);
+extern void dumpdata1(nc_type nctype, size_t index, char* data);
+extern char* dumpprojections(NClist* projections);
+extern char* dumpprojection(DCEprojection* proj);
+extern char* dumpselections(NClist* selections);
+extern char* dumpselection(DCEselection* sel);
+extern char* dumpconstraint(DCEconstraint* con);
+extern char* dumpsegments(NClist* segments);
+extern char* dumpslice(DCEslice* slice);
+extern char* dumpslices(DCEslice* slice, unsigned int rank);
+
+
+#endif /*DUMP_H*/
+
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/src_netcdf4/daplex.c
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/src_netcdf4/daplex.c	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/src_netcdf4/daplex.c	(revision 1749)
@@ -0,0 +1,350 @@
+/* Copyright 2009, UCAR/Unidata and OPeNDAP, Inc.
+   See the COPYRIGHT file for more information. */
+
+#include "config.h"
+#include <strings.h>
+#include "dapparselex.h"
+
+#undef URLCVT /* NEVER turn this on */
+#define DAP2ENCODE
+
+/* Forward */
+static void dumptoken(DAPlexstate* lexstate);
+static void dapaddyytext(DAPlexstate* lex, int c);
+#ifndef DAP2ENCODE
+static int tohex(int c);
+#endif
+
+/****************************************************/
+
+#if 0 /* Following definitions are for informational purposes */
+/* Set of all ascii printable characters */
+static char ascii[] = " !\"#$%&'()*+,-./:;<=>?@[]\\^_`|{}~";
+
+/* Define the set of legal nonalphanum characters as specified in the DAP2 spec. */
+static char* daplegal ="_!~*'-\"";
+#endif
+
+static char* ddsworddelims =
+  "{}[]:;=,";
+
+/* Define 1 and > 1st legal characters */
+static char* ddswordchars1 =
+  "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789-+_/%\\.*";
+static char* ddswordcharsn =
+  "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789-+_/%\\.*#";
+static char* daswordcharsn =
+  "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789-+_/%\\.*#:";
+static char* cewordchars1 =
+  "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789-+_/%\\";
+static char* cewordcharsn =
+  "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789-+_/%\\";
+
+/* Current sets of legal characters */
+/*
+static char* wordchars1 = NULL;
+static char* wordcharsn = NULL;
+static char* worddelims = NULL;
+*/
+
+static char* keywords[] = {
+"alias",
+"array",
+"attributes",
+"byte",
+"dataset",
+"error",
+"float32",
+"float64",
+"grid",
+"int16",
+"int32",
+"maps",
+"sequence",
+"string",
+"structure",
+"uint16",
+"uint32",
+"url",
+"code",
+"message",
+"program_type",
+"program",
+NULL /* mark end of the keywords list */
+};
+
+static int keytokens[] = {
+SCAN_ALIAS,
+SCAN_ARRAY,
+SCAN_ATTR,
+SCAN_BYTE,
+SCAN_DATASET,
+SCAN_ERROR,
+SCAN_FLOAT32,
+SCAN_FLOAT64,
+SCAN_GRID,
+SCAN_INT16,
+SCAN_INT32,
+SCAN_MAPS,
+SCAN_SEQUENCE,
+SCAN_STRING,
+SCAN_STRUCTURE,
+SCAN_UINT16,
+SCAN_UINT32,
+SCAN_URL,
+SCAN_CODE,
+SCAN_MESSAGE,
+SCAN_PTYPE,
+SCAN_PROG
+};
+
+/**************************************************/
+
+int
+daplex(YYSTYPE* lvalp, DAPparsestate* state)
+{
+    DAPlexstate* lexstate = state->lexstate;
+    int token;
+    int c;
+    unsigned int i;
+    char* p;
+    char* tmp;
+
+    token = 0;
+    ocbytesclear(lexstate->yytext);
+    /* invariant: p always points to current char */
+    for(p=lexstate->next;token==0&&(c=*p);p++) {
+	if(c == '\n') {
+	    lexstate->lineno++;
+	} else if(c <= ' ' || c == '\177') {
+	    /* whitespace: ignore */
+	} else if(c == '#') {
+	    /* single line comment */
+	    while((c=*(++p))) {if(c == '\n') break;}
+	} else if(strchr(lexstate->worddelims,c) != NULL) {
+	    /* don't put in lexstate->yytext to avoid memory leak */
+	    token = c;
+	} else if(c == '"') {
+	    int more = 1;
+	    /* We have a string token; will be reported as WORD_STRING */
+	    while(more && (c=*(++p))) {
+#ifdef DAP2ENCODE
+	        if(c == '"')
+		    more = 0;
+		else if(c == '\\') {
+		    /* Remove spec ambiguity by convering \c to c
+                       for any character c */
+		    c=*(++p);
+		    if(c == '\0') more = 0;
+		}
+#else /*Non-standard*/
+		switch (c) {
+		case '"': more=0; break;
+		case '\\':
+		    c=*(++p);
+		    switch (c) {
+		    case 'r': c = '\r'; break;
+		    case 'n': c = '\n'; break;
+		    case 'f': c = '\f'; break;
+		    case 't': c = '\t'; break;
+		    case 'x': {
+			int d1,d2;
+			c = '?';
+			++p;
+		        d1 = tohex(*p++);
+			if(d1 < 0) {
+			    daperror(state,"Illegal \\xDD in TOKEN_STRING");
+			} else {
+			    d2 = tohex(*p++);
+			    if(d2 < 0) {
+			        daperror(state,"Illegal \\xDD in TOKEN_STRING");
+			    } else {
+				c=(((unsigned int)d1)<<4) | (unsigned int)d2;
+			    }
+			}
+		    } break;
+		    default: break;
+		    }
+		    break;
+		default: break;
+		}
+#endif /*!DAP2ENCODE*/
+		if(more) dapaddyytext(lexstate,c);
+	    }
+	    token=WORD_STRING;
+	} else if(strchr(lexstate->wordchars1,c) != NULL) {
+	    int isdatamark = 0;
+	    /* we have a WORD_WORD */
+	    dapaddyytext(lexstate,c);
+	    while((c=*(++p))) {
+#ifdef URLCVT
+		if(c == '%' && p[1] != 0 && p[2] != 0
+			    && strchr(hexdigits,p[1]) != NULL
+                            && strchr(hexdigits,p[2]) != NULL) {
+		    int d1,d2;
+		    d1 = tohex(p[1]);
+		    d2 = tohex(p[2]);
+		    if(d1 >= 0 || d2 >= 0) {
+			c=(((unsigned int)d1)<<4) | (unsigned int)d2;
+			p+=2;
+		    }
+		} else {
+		    if(strchr(lexstate->wordcharsn,c) == NULL) {p--; break;}
+		}
+		dapaddyytext(lexstate,c);
+#else
+		if(strchr(lexstate->wordcharsn,c) == NULL) {p--; break;}
+		dapaddyytext(lexstate,c);
+#endif
+	    }
+	    /* Special check for Data: */
+	    tmp = ocbytescontents(lexstate->yytext);
+	    if(strcmp(tmp,"Data")==0 && *p == ':') {
+		dapaddyytext(lexstate,*p); p++;
+		if(p[0] == '\n') {
+		    token = SCAN_DATA;
+		    isdatamark = 1;
+		    p++;
+	        } else if(p[0] == '\r' && p[1] == '\n') {
+		    token = SCAN_DATA;
+		    isdatamark = 1;
+		    p+=2;
+		}
+	    }
+	    if(!isdatamark) {
+	        /* check for keyword */
+	        token=WORD_WORD; /* assume */
+	        for(i=0;;i++) {
+		    if(keywords[i] == NULL) break;
+		    if(strcasecmp(keywords[i],tmp)==0) {
+		        token=keytokens[i];
+		        break;
+		    }
+		}
+	    }
+	} else { /* illegal */
+	}
+    }
+    lexstate->next = p;
+    strncpy(lexstate->lasttokentext,ocbytescontents(lexstate->yytext),MAX_TOKEN_LENGTH);
+    lexstate->lasttoken = token;
+    if(ocdebug >= 2)
+	dumptoken(lexstate);
+
+    /*Put return value onto Bison stack*/
+
+    if(ocbyteslength(lexstate->yytext) == 0)
+        *lvalp = NULL;
+    else {
+        *lvalp = ocbytesdup(lexstate->yytext);
+	oclistpush(lexstate->reclaim,(ocelem)*lvalp);
+    }
+    return token;      /* Return the type of the token.  */
+}
+
+static void
+dapaddyytext(DAPlexstate* lex, int c)
+{
+    ocbytesappend(lex->yytext,(char)c);
+}
+
+#ifndef DAP2ENCODE
+static int
+tohex(int c)
+{
+    if(c >= 'a' && c <= 'f') return (c - 'a') + 0xa;
+    if(c >= 'A' && c <= 'F') return (c - 'A') + 0xa;
+    if(c >= '0' && c <= '9') return (c - '0');
+    return -1;
+}
+#endif
+
+static void
+dumptoken(DAPlexstate* lexstate)
+{
+    fprintf(stderr,"TOKEN = |%s|\n",ocbytescontents(lexstate->yytext));
+}
+
+/*
+Simple lexer
+*/
+
+void
+dapsetwordchars(DAPlexstate* lexstate, int kind)
+{
+    switch (kind) {
+    case 0:
+	lexstate->worddelims = ddsworddelims;
+	lexstate->wordchars1 = ddswordchars1;
+	lexstate->wordcharsn = ddswordcharsn;
+	break;
+    case 1:
+	lexstate->worddelims = ddsworddelims;
+	lexstate->wordchars1 = ddswordchars1;
+	lexstate->wordcharsn = daswordcharsn;
+	break;
+    case 2:
+	lexstate->worddelims = ddsworddelims;
+	lexstate->wordchars1 = cewordchars1;
+	lexstate->wordcharsn = cewordcharsn;
+	break;
+    default: break;
+    }
+}
+
+void
+daplexinit(char* input, DAPlexstate** lexstatep)
+{
+    DAPlexstate* lexstate = (DAPlexstate*)malloc(sizeof(DAPlexstate));
+    if(lexstatep) *lexstatep = lexstate;
+    if(lexstate == NULL) return;
+    memset((void*)lexstate,0,sizeof(DAPlexstate));
+    lexstate->input = strdup(input);
+    lexstate->next = lexstate->input;
+    lexstate->yytext = ocbytesnew();
+    lexstate->reclaim = oclistnew();
+    dapsetwordchars(lexstate,0); /* Assume DDS */
+}
+
+void
+daplexcleanup(DAPlexstate** lexstatep)
+{
+    DAPlexstate* lexstate = *lexstatep;
+    if(lexstate == NULL) return;
+    if(lexstate->input != NULL) ocfree(lexstate->input);
+    if(lexstate->reclaim != NULL) {
+	while(oclistlength(lexstate->reclaim) > 0) {
+	    char* word = (char*)oclistpop(lexstate->reclaim);
+	    if(word) free(word);
+	}
+	oclistfree(lexstate->reclaim);
+    }
+    ocbytesfree(lexstate->yytext);
+    free(lexstate);
+    *lexstatep = NULL;
+}
+
+/* Dap identifiers will come to us with some
+   characters escaped using the URL notation of
+   %HH. The assumption here is that any character
+   that is encoded is left encoded, except as follows:
+   1. if the encoded character is in fact a legal DAP2 character
+      (alphanum+"_!~*'-\"") then it is decoded, otherwise not.
+*/
+#ifndef DECODE_IDENTIFIERS
+static char* decodelist =
+  "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_!~*'-\"";
+#endif
+
+char*
+dapdecode(DAPlexstate* lexstate, char* name)
+{
+    char* decoded;
+#ifdef DECODE_IDENTIFIERS
+    decoded = ocuridecode(name);
+#else
+    decoded = ocuridecodeonly(name,decodelist);
+#endif
+    oclistpush(lexstate->reclaim,(ocelem)decoded);
+    return decoded;
+}
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/src_netcdf4/dapnc.h
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/src_netcdf4/dapnc.h	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/src_netcdf4/dapnc.h	(revision 1749)
@@ -0,0 +1,21 @@
+/*********************************************************************
+ *   Copyright 1993, UCAR/Unidata
+ *   See netcdf/COPYRIGHT file for copying and redistribution conditions.
+ *   $Header: /upc/share/CVS/netcdf-3/libncdap3/dapnc.h,v 1.10 2009/09/23 22:26:01 dmh Exp $
+ *********************************************************************/
+#ifndef DAPNC_H
+#define DAPNC_H
+
+/* Take some types from libsrc4/netcdf.h*/
+#define	NC_UBYTE 	7	/* unsigned 1 byte int */
+#define	NC_USHORT 	8	/* unsigned 2-byte int */
+#define	NC_UINT 	9	/* unsigned 4-byte int */
+#define	NC_INT64 	10	/* signed 8-byte int */
+#define	NC_UINT64 	11	/* unsigned 8-byte int */
+#define	NC_STRING 	12	/* string */
+#define	NC_VLEN 	13	/* used internally for vlen types */
+#define	NC_OPAQUE 	14	/* used internally for opaque types */
+#define	NC_ENUM 	15	/* used internally for enum types */
+#define	NC_COMPOUND 	16	/* used internally for compound types */
+
+#endif /*DAPNC_H*/
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/src_netcdf4/dapodom.c
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/src_netcdf4/dapodom.c	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/src_netcdf4/dapodom.c	(revision 1749)
@@ -0,0 +1,252 @@
+/*********************************************************************
+ *   Copyright 1993, UCAR/Unidata
+ *   See netcdf/COPYRIGHT file for copying and redistribution conditions.
+ *   $Header: /upc/share/CVS/netcdf-3/libncdap3/dapodom.c,v 1.12 2010/05/27 21:34:08 dmh Exp $
+ *********************************************************************/
+
+#include "ncdap3.h"
+#include "dapodom.h"
+
+/**********************************************/
+/* Define methods for a dimension dapodometer*/
+
+Dapodometer*
+newdapodometer(DCEslice* slices, unsigned int first, unsigned int rank)
+{
+    int i;
+    Dapodometer* odom = (Dapodometer*)calloc(1,sizeof(Dapodometer));
+    MEMCHECK(odom,NULL);
+    if(rank == 0) {
+	return newdapodometer1(1);
+    }
+    odom->rank = rank;
+    ASSERT(odom->rank <= NC_MAX_VAR_DIMS);
+    for(i=0;i<odom->rank;i++) {
+	DCEslice* slice = slices+(first+i);
+	odom->slices[i] = *slice;
+	odom->index[i] = odom->slices[i].first;
+    }    
+    return odom;
+}
+
+Dapodometer*
+newsimpledapodometer(DCEsegment* segment, unsigned int rank)
+{
+    int i;
+    Dapodometer* odom = (Dapodometer*)calloc(1,sizeof(Dapodometer));
+    MEMCHECK(odom,NULL);
+    if(rank == 0) {
+	return newdapodometer1(1);
+    }
+    odom->rank = rank;
+    assert(odom->rank <= NC_MAX_VAR_DIMS);
+    assert(segment->slicesdefined && segment->slicesdeclized);
+    for(i=0;i<odom->rank;i++) {
+	DCEslice* odslice = &odom->slices[i];
+	DCEslice* segslice = &segment->slices[i];
+	odslice->first = 0;
+	odslice->stride = 1;
+	odslice->declsize = segslice->count;
+	odslice->length = odslice->declsize;
+	odslice->stop = odslice->declsize;
+	odslice->count = odslice->declsize;
+	odom->index[i] = 0;
+    }    
+    return odom;
+}
+
+Dapodometer*
+newdapodometer1(unsigned int count)
+{
+    Dapodometer* odom = (Dapodometer*)calloc(1,sizeof(Dapodometer));
+    MEMCHECK(odom,NULL);
+    odom->rank = 1;
+    odom->slices[0].first = 0;
+    odom->slices[0].length = count;
+    odom->slices[0].stride = 1;
+    odom->slices[0].stop = count;
+    odom->slices[0].declsize = count;
+    odom->slices[0].count = count;
+    odom->index[0] = 0;
+    return odom;
+}
+
+void
+freedapodometer(Dapodometer* odom)
+{
+    if(odom) free(odom);
+}
+
+char*
+dapodometerprint(Dapodometer* odom)
+{
+    int i;
+    static char line[1024];
+    char tmp[64];
+    line[0] = '\0';
+    if(odom->rank == 0) {
+	strcat(line,"[]");
+    } else for(i=0;i<odom->rank;i++) {
+	sprintf(tmp,"[%lu/%lu:%lu:%lu]",
+		(unsigned long)odom->index[i],
+		(unsigned long)odom->slices[i].first,
+		(unsigned long)odom->slices[i].stride,
+		(unsigned long)odom->slices[i].length);
+	strcat(line,tmp);	
+    }
+    return line;
+}
+
+int
+dapodometermore(Dapodometer* odom)
+{
+    return (odom->index[0] < odom->slices[0].stop);
+}
+
+void
+dapodometerreset(Dapodometer* odom)
+{
+    int rank = odom->rank;
+    while(rank-- > 0) {odom->index[rank] = odom->slices[rank].first;}
+}
+
+/* Convert current dapodometer settings to a single integer count*/
+size_t
+dapodometercount(Dapodometer* odom)
+{
+    int i;
+    size_t offset = 0;
+    for(i=0;i<odom->rank;i++) {
+	offset *= odom->slices[i].declsize;
+	offset += odom->index[i];
+    } 
+    return offset;
+}
+
+/*
+Given a dapodometer, compute the total
+number of elements in its space
+as determined by declsize; start at
+offset wheel
+*/
+
+size_t
+dapodometerspace(Dapodometer* odom, unsigned int wheel)
+{
+    unsigned int i,rank = odom->rank;
+    size_t count = 1;
+    DCEslice* slice;
+    ASSERT((wheel < rank));
+    slice = odom->slices+wheel;
+    for(i=wheel;i<rank;i++,slice++) {
+	count *= slice->declsize;
+    }
+    return count;
+}
+
+/*
+Compute the number of elements
+that will be returned as the odometer
+is incremented to its stop point.
+*/
+
+size_t
+dapodometerpoints(Dapodometer* odom)
+{
+    unsigned int i,rank = odom->rank;
+    size_t count = 1;
+    DCEslice* slice = odom->slices;
+    for(i=0;i<rank;i++,slice++) {
+	size_t slicecount = (slice->length/slice->stride);
+	count *= slicecount;
+    }
+    return count;
+}
+
+int
+dapodometerincr(Dapodometer* odom)
+{
+    return dapodometerincrith(odom,-1);
+}
+
+int
+dapodometerincrith(Dapodometer* odom, int wheel)
+{
+    int i; /* do not make unsigned */
+    DCEslice* slice;
+    if(odom->rank == 0) return 0; 
+    if(wheel < 0) wheel = (odom->rank - 1);
+    for(slice=odom->slices+(wheel),i=wheel;i>=0;i--,slice--) {
+        odom->index[i] += slice->stride;
+        if(odom->index[i] < slice->stop) break;
+	if(i == 0) return 0; /* leave the 0th entry if it overflows*/
+	odom->index[i] = slice->first; /* reset this position*/
+    }
+    return 1;
+}
+
+/**************************************************/
+int
+dapodometervarmcount(Dapodometer* odom, const ptrdiff_t* steps, const size_t* declsizes)
+{
+    int i;
+    size_t offset = 0;
+    for(i=0;i<odom->rank;i++) {
+	size_t tmp;
+	tmp = odom->index[i];
+	tmp = tmp - odom->slices[i].first;
+	tmp = tmp / odom->slices[i].stride;
+	tmp = tmp * steps[i];
+	offset += tmp;
+    } 
+    return offset;
+}
+
+
+/* Return the current set of indices */
+size_t*
+dapodometerindices(Dapodometer* odom)
+{
+    if(odom == NULL) return NULL;
+    return odom->index;
+}
+
+Dapodometer*
+newdapodometer2(const size_t* start, const size_t* count, const ptrdiff_t* stride,
+	        unsigned int first, unsigned int rank)
+{
+    int i;
+    Dapodometer* odom = (Dapodometer*)calloc(1,sizeof(Dapodometer));
+    MEMCHECK(odom,NULL);
+    odom->rank = rank;
+    assert(odom->rank <= NC_MAX_VAR_DIMS);
+    for(i=0;i<odom->rank;i++) {
+	odom->slices[i].first = start[first+i];
+	odom->slices[i].stride = (size_t)stride[first+i];
+	odom->slices[i].length = count[first+i] * stride[first+i];
+	odom->slices[i].stop = (odom->slices[i].first+odom->slices[i].length);
+	odom->slices[i].declsize = odom->slices[i].stop;
+	odom->slices[i].count = (odom->slices[i].length /odom->slices[i].stride);
+	odom->index[i] = odom->slices[i].first;
+    }    
+    return odom;
+}
+
+Dapodometer*
+newdapodometer3(int rank, size_t* dimsizes)
+{
+    int i;
+    Dapodometer* odom = (Dapodometer*)calloc(1,sizeof(Dapodometer));
+    MEMCHECK(odom,NULL);
+    odom->rank = rank;
+    for(i=0;i<rank;i++) {
+        odom->slices[i].first = 0;
+        odom->slices[i].length = dimsizes[i];
+        odom->slices[i].stride = 1;
+        odom->slices[i].stop = dimsizes[i];
+        odom->slices[i].declsize = dimsizes[i];
+	odom->slices[i].count = (odom->slices[i].length / odom->slices[i].stride);
+        odom->index[i] = 0;
+    }
+    return odom;
+}
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/src_netcdf4/dapodom.h
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/src_netcdf4/dapodom.h	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/src_netcdf4/dapodom.h	(revision 1749)
@@ -0,0 +1,42 @@
+/*********************************************************************
+ *   Copyright 1993, UCAR/Unidata
+ *   See netcdf/COPYRIGHT file for copying and redistribution conditions.
+ *   $Header$
+ *********************************************************************/
+
+#ifndef DAPODOM_H
+#define DAPODOM_H 1
+
+typedef struct Dapodometer {
+    int            rank;
+    DCEslice       slices[NC_MAX_VAR_DIMS];
+    size_t         index[NC_MAX_VAR_DIMS];
+} Dapodometer;
+
+/* Odometer operators*/
+extern Dapodometer* newdapodometer(DCEslice* slices, unsigned int first, unsigned int count);
+
+extern Dapodometer* newsimpledapodometer(struct DCEsegment*,unsigned int);
+
+extern Dapodometer* newdapodometer1(unsigned int count);
+extern Dapodometer* newdapodometer2(const size_t*, const size_t*,
+                      const ptrdiff_t*, unsigned int, unsigned int);
+extern Dapodometer* newdapodometer3(int, size_t*);
+
+extern void freedapodometer(Dapodometer*);
+extern char* dapodometerprint(Dapodometer* odom);
+
+extern int dapodometermore(Dapodometer* odom);
+extern int dapodometerincr(Dapodometer* odo);
+extern int dapodometerincrith(Dapodometer* odo,int);
+extern size_t dapodometercount(Dapodometer* odo);
+extern void dapodometerreset(Dapodometer*);
+extern Dapodometer* dapodometersplit(Dapodometer* odom, int tail);
+
+extern size_t dapodometerspace(Dapodometer* odom, unsigned int wheel);
+extern size_t dapodometerpoints(Dapodometer*);
+
+extern size_t* dapodometerindices(Dapodometer*);
+extern int dapodometervarmcount(Dapodometer*, const ptrdiff_t*, const size_t*);
+
+#endif /*DAPODOM_H*/
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/src_netcdf4/dapparse.c
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/src_netcdf4/dapparse.c	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/src_netcdf4/dapparse.c	(revision 1749)
@@ -0,0 +1,480 @@
+/* Copyright 2009, UCAR/Unidata and OPeNDAP, Inc.
+   See the COPYRIGHT file for more information. */
+
+#include "config.h"
+#include "dapparselex.h"
+
+/* Forward */
+
+static void addedges(OCnode* node);
+static void setroot(OCnode*,OClist*);
+static int isglobalname(char* name);
+static OCnode* newocnode(char* name, OCtype octype, DAPparsestate* state);
+static OCtype octypefor(Object etype);
+static char* scopeduplicates(OClist* list);
+static int check_int32(char* val, long* value);
+
+
+/****************************************************/
+
+/* Switch to DAS parsing SCAN_WORD definition */
+
+/* Use the initial keyword to indicate what we are parsing */
+void
+dap_tagparse(DAPparsestate* state, int kind)
+{
+    switch (kind) {
+    case SCAN_DATASET:
+    case SCAN_ERROR:
+	break;
+    case SCAN_ATTR:
+	dapsetwordchars(state->lexstate,1);
+        break;
+    default:
+        fprintf(stderr,"tagparse: Unknown tag argument: %d\n",kind);
+    }
+}
+
+
+Object
+dap_datasetbody(DAPparsestate* state, Object name, Object decls)
+{
+    OCnode* root = newocnode((char*)name,OC_Dataset,state);
+    root->subnodes = (OClist*)decls;
+    OCASSERT((state->root == NULL));
+    state->root = root;
+    state->root->root = state->root; /* make sure to cross link */
+    addedges(root);
+    setroot(root,state->ocnodes);
+    return NULL;
+}
+
+Object
+dap_attributebody(DAPparsestate* state, Object attrlist)
+{
+    OCnode* node = newocnode(NULL,OC_Attributeset,state);
+    OCASSERT((state->root == NULL));
+    state->root = node;
+    /* make sure to cross link */
+    state->root->root = state->root;
+    node->subnodes = (OClist*)attrlist;
+    addedges(node);
+    return NULL;
+}
+
+void
+dap_errorbody(DAPparsestate* state,
+	  Object code, Object msg, Object ptype, Object prog)
+{
+    state->svcerror = 1;
+    state->code     = nulldup((char*)code);
+    state->message  = nulldup((char*)msg);
+    /* Ignore ptype and prog for now */
+}
+
+void
+dap_unrecognizedresponse(DAPparsestate* state)
+{
+    /* see if this is an HTTP error */
+    unsigned int httperr = 0;
+    int i;
+    char iv[32];
+    sscanf(state->lexstate->input,"%u ",&httperr);
+    sprintf(iv,"%u",httperr);
+    state->lexstate->next = state->lexstate->input;
+    /* Limit the amount of input to prevent runaway */
+    for(i=0;i<4096;i++) {if(state->lexstate->input[i] == '\0') break;}
+    state->lexstate->input[i] = '\0';
+    dap_errorbody(state,iv,state->lexstate->input,NULL,NULL);
+}
+
+Object
+dap_declarations(DAPparsestate* state, Object decls, Object decl)
+{
+    OClist* alist = (OClist*)decls;
+    if(alist == NULL)
+	 alist = oclistnew();
+    else
+	oclistpush(alist,(ocelem)decl);
+    return alist;
+}
+
+Object
+dap_arraydecls(DAPparsestate* state, Object arraydecls, Object arraydecl)
+{
+    OClist* alist = (OClist*)arraydecls;
+    if(alist == NULL)
+	alist = oclistnew();
+    else
+	oclistpush(alist,(ocelem)arraydecl);
+    return alist;
+}
+
+Object
+dap_arraydecl(DAPparsestate* state, Object name, Object size)
+{
+    long value;
+    OCnode* dim;
+    if(!check_int32(size,&value))
+	dap_parse_error(state,"Dimension not an integer");
+    if(name != NULL)
+	dim = newocnode((char*)name,OC_Dimension,state);
+    else
+	dim = newocnode(NULL,OC_Dimension,state);
+    dim->dim.declsize = value;
+    return dim;
+}
+
+Object
+dap_attrlist(DAPparsestate* state, Object attrlist, Object attrtuple)
+{
+    OClist* alist = (OClist*)attrlist;
+    if(alist == NULL)
+	alist = oclistnew();
+    else {
+	char* dupname;
+	if(attrtuple != NULL) {/* NULL=>alias encountered, ignore */
+            oclistpush(alist,(ocelem)attrtuple);
+            if((dupname=scopeduplicates(alist))!=NULL) {
+	        dap_parse_error(state,"Duplicate attribute names in same scope: %s",dupname);
+		/* Remove this attribute */
+		oclistpop(alist);
+	    }
+	}
+    }
+    return alist;
+}
+
+Object
+dap_attrvalue(DAPparsestate* state, Object valuelist, Object value, Object etype)
+{
+    OClist* alist = (OClist*)valuelist;
+    if(alist == NULL) alist = oclistnew();
+    /* Watch out for null values */
+    if(value == NULL) value = "";
+    oclistpush(alist,(ocelem)strdup(value));
+    return alist;
+}
+
+Object
+dap_attribute(DAPparsestate* state, Object name, Object values, Object etype)
+{
+    OCnode* att;
+    att = newocnode((char*)name,OC_Attribute,state);
+    att->etype = octypefor(etype);
+    att->att.values = (OClist*)values;
+    return att;
+}
+
+Object
+dap_attrset(DAPparsestate* state, Object name, Object attributes)
+{
+    OCnode* attset;
+    attset = newocnode((char*)name,OC_Attributeset,state);
+    /* Check var set vs global set */
+    attset->att.isglobal = isglobalname(name);
+    attset->subnodes = (OClist*)attributes;
+    addedges(attset);
+    return attset;
+}
+
+static int
+isglobalname(char* name)
+{
+    int len = strlen(name);
+    int glen = strlen("global");
+    char* p;
+    if(len < glen) return 0;
+    p = name + (len - glen);
+    if(strcasecmp(p,"global") != 0)
+	return 0;
+    return 1;
+}
+
+#if 0
+static int
+isnumber(const char* text)
+{
+    for(;*text;text++) {if(!isdigit(*text)) return 0;}
+    return 1;
+}
+#endif
+
+static void
+dimension(OCnode* node, OClist* dimensions)
+{
+    unsigned int i;
+    unsigned int rank = oclistlength(dimensions);
+    node->array.dimensions = (OClist*)dimensions;
+    node->array.rank = rank;
+    for(i=0;i<rank;i++) {
+        OCnode* dim = (OCnode*)oclistget(node->array.dimensions,i);
+        dim->dim.array = node;
+	dim->dim.arrayindex = i;
+#if 0
+	if(dim->name == NULL) {
+	    dim->dim.anonymous = 1;
+	    dim->name = dimnameanon(node->name,i);
+	}
+#endif
+    }
+}
+
+char*
+dimnameanon(char* basename, unsigned int index)
+{
+    char name[64];
+    sprintf(name,"%s_%d",basename,index);
+    return strdup(name);
+}
+
+Object
+dap_makebase(DAPparsestate* state, Object name, Object etype, Object dimensions)
+{
+    OCnode* node;
+    node = newocnode((char*)name,OC_Primitive,state);
+    node->etype = octypefor(etype);
+    dimension(node,(OClist*)dimensions);
+    return node;
+}
+
+Object
+dap_makestructure(DAPparsestate* state, Object name, Object dimensions, Object fields)
+{
+    OCnode* node;
+    char* dupname;    
+    if((dupname=scopeduplicates((OClist*)fields))!= NULL) {
+        dap_parse_error(state,"Duplicate structure field names in same scope: %s.%s",(char*)name,dupname);
+	return (Object)NULL;
+    }
+    node = newocnode(name,OC_Structure,state);
+    node->subnodes = fields;
+    dimension(node,(OClist*)dimensions);
+    addedges(node);
+    return node;
+}
+
+Object
+dap_makesequence(DAPparsestate* state, Object name, Object members)
+{
+    OCnode* node;
+    char* dupname;    
+    if((dupname=scopeduplicates((OClist*)members)) != NULL) {
+        dap_parse_error(state,"Duplicate sequence member names in same scope: %s.%s",(char*)name,dupname);
+	return (Object)NULL;
+    }
+    node = newocnode(name,OC_Sequence,state);
+    node->subnodes = members;
+    addedges(node);
+    return node;
+}
+
+Object
+dap_makegrid(DAPparsestate* state, Object name, Object arraydecl, Object mapdecls)
+{
+    OCnode* node;
+    /* Check for duplicate map names */
+    char* dupname;    
+    if((dupname=scopeduplicates((OClist*)mapdecls)) != NULL) {
+        dap_parse_error(state,"Duplicate grid map names in same scope: %s.%s",(char*)name,dupname);
+	return (Object)NULL;
+    }
+    node = newocnode(name,OC_Grid,state);
+    node->subnodes = (OClist*)mapdecls;
+    oclistinsert(node->subnodes,0,(ocelem)arraydecl);
+    addedges(node);
+    return node;
+}
+
+static void
+addedges(OCnode* node)
+{
+    unsigned int i;
+    if(node->subnodes == NULL) return;
+    for(i=0;i<oclistlength(node->subnodes);i++) {
+        OCnode* subnode = (OCnode*)oclistget(node->subnodes,i);
+	subnode->container = node;
+    }
+}
+
+static void
+setroot(OCnode* root, OClist* ocnodes)
+{
+    int i;
+    for(i=0;i<oclistlength(ocnodes);i++) {
+	OCnode* node = (OCnode*)oclistget(ocnodes,i);
+	node->root = root;
+    }
+}
+
+int
+daperror(DAPparsestate* state, const char* msg)
+{
+    dap_parse_error(state,msg);
+    return 0;
+}
+
+static char*
+flatten(char* s, char* tmp, int tlen)
+{
+    int c;
+    char* p,*q;
+    strncpy(tmp,s,tlen);
+    tmp[tlen] = '\0';
+    p = (q = tmp);
+    while((c=*p++)) {
+	switch (c) {
+	case '\r': case '\n': break;
+	case '\t': *q++ = ' '; break;
+	case ' ': if(*p != ' ') *q++ = c; break;
+	default: *q++ = c;
+	}
+    }
+    *q = '\0';
+    return tmp;
+}
+
+/* Create an ocnode and capture in the state->ocnode list */
+static OCnode*
+newocnode(char* name, OCtype octype, DAPparsestate* state)
+{
+    OCnode* node = ocmakenode(name,octype,state->root);
+    oclistpush(state->ocnodes,(ocelem)node);
+    return node;
+}
+
+static int
+check_int32(char* val, long* value)
+{
+    char* ptr;
+    int ok = 1;
+    long iv = strtol(val,&ptr,0); /* 0=>auto determine base */
+    if((iv == 0 && val == ptr) || *ptr != '\0') {ok=0; iv=1;}
+    else if(iv > OC_INT32_MAX || iv < OC_INT32_MIN) ok=0;
+    if(value != NULL) *value = iv;
+    return ok;
+}
+
+static char*
+scopeduplicates(OClist* list)
+{
+    unsigned int i,j;
+    for(i=0;i<oclistlength(list);i++) {
+	OCnode* io = (OCnode*)oclistget(list,i);
+        for(j=i+1;j<oclistlength(list);j++) {
+	    OCnode* jo = (OCnode*)oclistget(list,j);
+	    if(strcmp(io->name,jo->name)==0)
+		return io->name;
+	}
+    }
+    return NULL;
+}
+
+static OCtype
+octypefor(Object etype)
+{
+    switch ((long)etype) {
+    case SCAN_BYTE: return OC_Byte;
+    case SCAN_INT16: return OC_Int16;
+    case SCAN_UINT16: return OC_UInt16;
+    case SCAN_INT32: return OC_Int32;
+    case SCAN_UINT32: return OC_UInt32;
+    case SCAN_FLOAT32: return OC_Float32;
+    case SCAN_FLOAT64: return OC_Float64;
+    case SCAN_URL: return OC_URL;
+    case SCAN_STRING: return OC_String;
+    default: abort();
+    }
+    return OC_NAT;
+}
+
+void
+dap_parse_error(DAPparsestate* state, const char *fmt, ...)
+{
+    size_t len, suffixlen, prefixlen;
+    va_list argv;
+    char* tmp = NULL;
+    va_start(argv,fmt);
+    (void) vfprintf(stderr,fmt,argv) ;
+    (void) fputc('\n',stderr) ;
+    len = strlen(state->lexstate->input);
+    suffixlen = strlen(state->lexstate->next);
+    prefixlen = (len - suffixlen);
+    tmp = (char*)ocmalloc(len+1);
+    flatten(state->lexstate->input,tmp,prefixlen);
+    (void) fprintf(stderr,"context: %s",tmp);
+    flatten(state->lexstate->next,tmp,suffixlen);
+    (void) fprintf(stderr,"^%s\n",tmp);
+    (void) fflush(stderr);	/* to ensure log files are current */
+    ocfree(tmp);
+}
+
+static void
+dap_parse_cleanup(DAPparsestate* state)
+{
+    daplexcleanup(&state->lexstate);
+    if(state->ocnodes != NULL) ocfreenodes(state->ocnodes);
+    state->ocnodes = NULL;
+    free(state);
+}
+
+static DAPparsestate*
+dap_parse_init(char* buf)
+{
+    DAPparsestate* state = (DAPparsestate*)ocmalloc(sizeof(DAPparsestate)); /*ocmalloc zeros*/
+    MEMCHECK(state,(DAPparsestate*)NULL);
+    if(buf==NULL) {
+        dap_parse_error(state,"dap_parse_init: no input buffer");
+	dap_parse_cleanup(state);
+	return NULL;
+    }
+    daplexinit(buf,&state->lexstate);
+    return state;
+}
+
+/* Wrapper for dapparse */
+OCerror
+DAPparse(OCstate* conn, OCtree* tree, char* parsestring)
+{
+    DAPparsestate* state = dap_parse_init(parsestring);
+    int parseresult;
+    OCerror ocerr = OC_NOERR;
+    state->ocnodes = oclistnew();
+    state->conn = conn;
+    if(ocdebug >= 2)
+	dapdebug = 1;
+    parseresult = dapparse(state);
+    if(parseresult == 0) {/* 0 => parse ok */
+	/* Check to see if we ended up parsing an error message */
+	if(state->svcerror) {
+            conn->error.code = nulldup(state->code);
+            conn->error.message = nulldup(state->message);
+	    tree->root = NULL;
+	    /* Attempt to further decipher the error code */
+	    if(state->code != NULL
+                && (strcmp(state->code,"404") == 0 /* tds returns 404 */
+		    || strcmp(state->code,"5") == 0)) /* hyrax returns 5 */
+		ocerr = OC_ENOFILE;
+	    else
+	        ocerr = OC_EDAPSVC;
+	} else {
+	    OCASSERT((state->root != NULL));	
+            tree->root = state->root;
+	    state->root = NULL; /* avoid reclaim */
+            tree->nodes = state->ocnodes;
+	    state->ocnodes = NULL; /* avoid reclaim */
+            tree->root->tree = tree;
+	    ocerr = OC_NOERR;
+	}
+    } else { /* Parse failed */
+	switch (tree->dxdclass) {
+	case OCDAS: ocerr = OC_EDAS; break;
+	case OCDDS: ocerr = OC_EDDS; break;
+	case OCDATADDS: ocerr = OC_EDATADDS; break;
+	default: ocerr = OC_EDAPSVC;
+	}		
+    }
+    dap_parse_cleanup(state);
+    return ocerr;
+}
+
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/src_netcdf4/dapparselex.h
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/src_netcdf4/dapparselex.h	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/src_netcdf4/dapparselex.h	(revision 1749)
@@ -0,0 +1,95 @@
+/* Copyright 2009, UCAR/Unidata and OPeNDAP, Inc.
+   See the COPYRIGHT file for more information. */
+
+#ifndef DAPPARSELEX_H
+#define DAPPARSELEX_H 1
+
+#include "ocinternal.h"
+#include "ocdebug.h"
+#ifdef USE_DAP
+/* To avoid "make distclean" wiping out dap.tab.h */
+#include "daptab.h"
+#else
+#include "daptab.h"
+#endif
+
+#ifdef WIN32
+#define strcasecmp stricmp
+#define snprintf _snprintf
+#endif
+
+/* For consistency with Java parser */
+#define null NULL
+
+typedef void* Object;
+
+#define YYSTYPE Object
+
+#define MAX_TOKEN_LENGTH 1024
+
+/*! Specifies the Lexstate. */
+typedef struct DAPlexstate {
+    char* input;
+    char* next; /* next char in uri.query*/
+    OCbytes* yytext;
+    int lineno;
+    /*! Specifies the Lasttoken. */
+    int lasttoken;
+    char lasttokentext[MAX_TOKEN_LENGTH+1];
+    char* wordchars1;
+    char* wordcharsn;
+    char* worddelims;
+    OClist* reclaim; /* reclaim WORD_WORD instances */
+} DAPlexstate;
+
+/*! Specifies the DAPparsestate. */
+typedef struct DAPparsestate {
+    struct OCnode* root;
+    DAPlexstate* lexstate;
+    OClist* ocnodes;
+    struct OCstate* conn;
+    /* For error returns from the server */
+    int svcerror; /* 1 => we had an error from the server */
+    char* code;
+    char* message;
+    char* progtype;
+    char* progname;
+    /* State for constraint expressions */
+    struct CEstate* cestate;
+} DAPparsestate;
+
+extern int daperror(DAPparsestate* state, const char* msg);
+extern void dap_parse_error(DAPparsestate*,const char *fmt, ...);
+/* bison parse entry point */
+extern int dapparse(DAPparsestate*);
+
+extern Object dap_datasetbody(DAPparsestate*,Object decls, Object name);
+extern Object dap_declarations(DAPparsestate*,Object decls, Object decl);
+extern Object dap_arraydecls(DAPparsestate*,Object arraydecls, Object arraydecl);
+extern Object dap_arraydecl(DAPparsestate*,Object name, Object size);
+
+extern void dap_dassetup(DAPparsestate*);
+extern Object dap_attributebody(DAPparsestate*,Object attrlist);
+extern Object dap_attrlist(DAPparsestate*,Object attrlist, Object attrtuple);
+extern Object dap_attribute(DAPparsestate*,Object name, Object value, Object etype);
+extern Object dap_attrset(DAPparsestate*,Object name, Object attributes);
+extern Object dap_attrvalue(DAPparsestate*,Object valuelist, Object value, Object etype);
+
+extern Object dap_makebase(DAPparsestate*,Object name, Object etype, Object dimensions);
+extern Object dap_makestructure(DAPparsestate*,Object name, Object dimensions, Object fields);
+extern Object dap_makesequence(DAPparsestate*,Object name, Object members);
+extern Object dap_makegrid(DAPparsestate*,Object name, Object arraydecl, Object mapdecls);
+
+extern void dap_errorbody(DAPparsestate*, Object, Object, Object, Object);
+extern void dap_unrecognizedresponse(DAPparsestate*);
+
+extern void dap_tagparse(DAPparsestate*,int);
+
+/* Lexer entry points */
+extern int daplex(YYSTYPE*, DAPparsestate*);
+extern void daplexinit(char* input, DAPlexstate** lexstatep);
+extern void daplexcleanup(DAPlexstate** lexstatep);
+extern void dapsetwordchars(DAPlexstate* lexstate, int kind);
+extern char* dapdecode(DAPlexstate*,char*);
+
+#endif /*DAPPARSELEX_H*/
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/src_netcdf4/daptab.c
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/src_netcdf4/daptab.c	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/src_netcdf4/daptab.c	(revision 1749)
@@ -0,0 +1,2495 @@
+/* A Bison parser, made by GNU Bison 2.4.3.  */
+
+/* Skeleton implementation for Bison's Yacc-like parsers in C
+   
+      Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
+   2009, 2010 Free Software Foundation, Inc.
+   
+   This program is free software: you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation, either version 3 of the License, or
+   (at your option) any later version.
+   
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+   
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
+
+/* As a special exception, you may create a larger work that contains
+   part or all of the Bison parser skeleton and distribute that work
+   under terms of your choice, so long as that work isn't itself a
+   parser generator using the skeleton or a modified version thereof
+   as a parser skeleton.  Alternatively, if you modify or redistribute
+   the parser skeleton itself, you may (at your option) remove this
+   special exception, which will cause the skeleton and the resulting
+   Bison output files to be licensed under the GNU General Public
+   License without this special exception.
+   
+   This special exception was added by the Free Software Foundation in
+   version 2.2 of Bison.  */
+
+/* C LALR(1) parser skeleton written by Richard Stallman, by
+   simplifying the original so-called "semantic" parser.  */
+
+/* All symbols defined below should begin with yy or YY, to avoid
+   infringing on user name space.  This should be done even for local
+   variables, as they might otherwise be expanded by user macros.
+   There are some unavoidable exceptions within include files to
+   define necessary library symbols; they are noted "INFRINGES ON
+   USER NAME SPACE" below.  */
+
+/* Identify Bison output.  */
+#define YYBISON 1
+
+/* Bison version.  */
+#define YYBISON_VERSION "2.4.3"
+
+/* Skeleton name.  */
+#define YYSKELETON_NAME "yacc.c"
+
+/* Pure parsers.  */
+#define YYPURE 1
+
+/* Push parsers.  */
+#define YYPUSH 0
+
+/* Pull parsers.  */
+#define YYPULL 1
+
+/* Using locations.  */
+#define YYLSP_NEEDED 0
+
+/* Substitute the variable and function names.  */
+#define yyparse         dapparse
+#define yylex           daplex
+#define yyerror         daperror
+#define yylval          daplval
+#define yychar          dapchar
+#define yydebug         dapdebug
+#define yynerrs         dapnerrs
+
+
+/* Copy the first part of user declarations.  */
+
+/* Line 189 of yacc.c  */
+#line 11 "dap.y"
+
+#include "config.h"
+#include "dapparselex.h"
+int dapdebug = 0;
+
+
+/* Line 189 of yacc.c  */
+#line 87 "dap.tab.c"
+
+/* Enabling traces.  */
+#ifndef YYDEBUG
+# define YYDEBUG 1
+#endif
+
+/* Enabling verbose error messages.  */
+#ifdef YYERROR_VERBOSE
+# undef YYERROR_VERBOSE
+# define YYERROR_VERBOSE 1
+#else
+# define YYERROR_VERBOSE 1
+#endif
+
+/* Enabling the token table.  */
+#ifndef YYTOKEN_TABLE
+# define YYTOKEN_TABLE 0
+#endif
+
+
+/* Tokens.  */
+#ifndef YYTOKENTYPE
+# define YYTOKENTYPE
+   /* Put the tokens into the symbol table, so that GDB and other debuggers
+      know about them.  */
+   enum yytokentype {
+     SCAN_ALIAS = 258,
+     SCAN_ARRAY = 259,
+     SCAN_ATTR = 260,
+     SCAN_BYTE = 261,
+     SCAN_CODE = 262,
+     SCAN_DATASET = 263,
+     SCAN_DATA = 264,
+     SCAN_ERROR = 265,
+     SCAN_FLOAT32 = 266,
+     SCAN_FLOAT64 = 267,
+     SCAN_GRID = 268,
+     SCAN_INT16 = 269,
+     SCAN_INT32 = 270,
+     SCAN_MAPS = 271,
+     SCAN_MESSAGE = 272,
+     SCAN_SEQUENCE = 273,
+     SCAN_STRING = 274,
+     SCAN_STRUCTURE = 275,
+     SCAN_UINT16 = 276,
+     SCAN_UINT32 = 277,
+     SCAN_URL = 278,
+     SCAN_PTYPE = 279,
+     SCAN_PROG = 280,
+     WORD_WORD = 281,
+     WORD_STRING = 282
+   };
+#endif
+
+
+
+#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
+typedef int YYSTYPE;
+# define YYSTYPE_IS_TRIVIAL 1
+# define yystype YYSTYPE /* obsolescent; will be withdrawn */
+# define YYSTYPE_IS_DECLARED 1
+#endif
+
+
+/* Copy the second part of user declarations.  */
+
+
+/* Line 264 of yacc.c  */
+#line 156 "dap.tab.c"
+
+#ifdef short
+# undef short
+#endif
+
+#ifdef YYTYPE_UINT8
+typedef YYTYPE_UINT8 yytype_uint8;
+#else
+typedef unsigned char yytype_uint8;
+#endif
+
+#ifdef YYTYPE_INT8
+typedef YYTYPE_INT8 yytype_int8;
+#elif (defined __STDC__ || defined __C99__FUNC__ \
+     || defined __cplusplus || defined _MSC_VER)
+typedef signed char yytype_int8;
+#else
+typedef short int yytype_int8;
+#endif
+
+#ifdef YYTYPE_UINT16
+typedef YYTYPE_UINT16 yytype_uint16;
+#else
+typedef unsigned short int yytype_uint16;
+#endif
+
+#ifdef YYTYPE_INT16
+typedef YYTYPE_INT16 yytype_int16;
+#else
+typedef short int yytype_int16;
+#endif
+
+#ifndef YYSIZE_T
+# ifdef __SIZE_TYPE__
+#  define YYSIZE_T __SIZE_TYPE__
+# elif defined size_t
+#  define YYSIZE_T size_t
+# elif ! defined YYSIZE_T && (defined __STDC__ || defined __C99__FUNC__ \
+     || defined __cplusplus || defined _MSC_VER)
+#  include <stddef.h> /* INFRINGES ON USER NAME SPACE */
+#  define YYSIZE_T size_t
+# else
+#  define YYSIZE_T unsigned int
+# endif
+#endif
+
+#define YYSIZE_MAXIMUM ((YYSIZE_T) -1)
+
+#ifndef YY_
+# if defined YYENABLE_NLS && YYENABLE_NLS
+#  if ENABLE_NLS
+#   include <libintl.h> /* INFRINGES ON USER NAME SPACE */
+#   define YY_(msgid) dgettext ("bison-runtime", msgid)
+#  endif
+# endif
+# ifndef YY_
+#  define YY_(msgid) msgid
+# endif
+#endif
+
+/* Suppress unused-variable warnings by "using" E.  */
+#if ! defined lint || defined __GNUC__
+# define YYUSE(e) ((void) (e))
+#else
+# define YYUSE(e) /* empty */
+#endif
+
+/* Identity function, used to suppress warnings about constant conditions.  */
+#ifndef lint
+# define YYID(n) (n)
+#else
+#if (defined __STDC__ || defined __C99__FUNC__ \
+     || defined __cplusplus || defined _MSC_VER)
+static int
+YYID (int yyi)
+#else
+static int
+YYID (yyi)
+    int yyi;
+#endif
+{
+  return yyi;
+}
+#endif
+
+#if ! defined yyoverflow || YYERROR_VERBOSE
+
+/* The parser invokes alloca or malloc; define the necessary symbols.  */
+
+# ifdef YYSTACK_USE_ALLOCA
+#  if YYSTACK_USE_ALLOCA
+#   ifdef __GNUC__
+#    define YYSTACK_ALLOC __builtin_alloca
+#   elif defined __BUILTIN_VA_ARG_INCR
+#    include <alloca.h> /* INFRINGES ON USER NAME SPACE */
+#   elif defined _AIX
+#    define YYSTACK_ALLOC __alloca
+#   elif defined _MSC_VER
+#    include <malloc.h> /* INFRINGES ON USER NAME SPACE */
+#    define alloca _alloca
+#   else
+#    define YYSTACK_ALLOC alloca
+#    if ! defined _ALLOCA_H && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
+     || defined __cplusplus || defined _MSC_VER)
+#     include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
+#     ifndef _STDLIB_H
+#      define _STDLIB_H 1
+#     endif
+#    endif
+#   endif
+#  endif
+# endif
+
+# ifdef YYSTACK_ALLOC
+   /* Pacify GCC's `empty if-body' warning.  */
+#  define YYSTACK_FREE(Ptr) do { /* empty */; } while (YYID (0))
+#  ifndef YYSTACK_ALLOC_MAXIMUM
+    /* The OS might guarantee only one guard page at the bottom of the stack,
+       and a page size can be as small as 4096 bytes.  So we cannot safely
+       invoke alloca (N) if N exceeds 4096.  Use a slightly smaller number
+       to allow for a few compiler-allocated temporary stack slots.  */
+#   define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */
+#  endif
+# else
+#  define YYSTACK_ALLOC YYMALLOC
+#  define YYSTACK_FREE YYFREE
+#  ifndef YYSTACK_ALLOC_MAXIMUM
+#   define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM
+#  endif
+#  if (defined __cplusplus && ! defined _STDLIB_H \
+       && ! ((defined YYMALLOC || defined malloc) \
+	     && (defined YYFREE || defined free)))
+#   include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
+#   ifndef _STDLIB_H
+#    define _STDLIB_H 1
+#   endif
+#  endif
+#  ifndef YYMALLOC
+#   define YYMALLOC malloc
+#   if ! defined malloc && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
+     || defined __cplusplus || defined _MSC_VER)
+void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */
+#   endif
+#  endif
+#  ifndef YYFREE
+#   define YYFREE free
+#   if ! defined free && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
+     || defined __cplusplus || defined _MSC_VER)
+void free (void *); /* INFRINGES ON USER NAME SPACE */
+#   endif
+#  endif
+# endif
+#endif /* ! defined yyoverflow || YYERROR_VERBOSE */
+
+
+#if (! defined yyoverflow \
+     && (! defined __cplusplus \
+	 || (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL)))
+
+/* A type that is properly aligned for any stack member.  */
+union yyalloc
+{
+  yytype_int16 yyss_alloc;
+  YYSTYPE yyvs_alloc;
+};
+
+/* The size of the maximum gap between one aligned stack and the next.  */
+# define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1)
+
+/* The size of an array large to enough to hold all stacks, each with
+   N elements.  */
+# define YYSTACK_BYTES(N) \
+     ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE)) \
+      + YYSTACK_GAP_MAXIMUM)
+
+/* Copy COUNT objects from FROM to TO.  The source and destination do
+   not overlap.  */
+# ifndef YYCOPY
+#  if defined __GNUC__ && 1 < __GNUC__
+#   define YYCOPY(To, From, Count) \
+      __builtin_memcpy (To, From, (Count) * sizeof (*(From)))
+#  else
+#   define YYCOPY(To, From, Count)		\
+      do					\
+	{					\
+	  YYSIZE_T yyi;				\
+	  for (yyi = 0; yyi < (Count); yyi++)	\
+	    (To)[yyi] = (From)[yyi];		\
+	}					\
+      while (YYID (0))
+#  endif
+# endif
+
+/* Relocate STACK from its old location to the new one.  The
+   local variables YYSIZE and YYSTACKSIZE give the old and new number of
+   elements in the stack, and YYPTR gives the new location of the
+   stack.  Advance YYPTR to a properly aligned location for the next
+   stack.  */
+# define YYSTACK_RELOCATE(Stack_alloc, Stack)				\
+    do									\
+      {									\
+	YYSIZE_T yynewbytes;						\
+	YYCOPY (&yyptr->Stack_alloc, Stack, yysize);			\
+	Stack = &yyptr->Stack_alloc;					\
+	yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \
+	yyptr += yynewbytes / sizeof (*yyptr);				\
+      }									\
+    while (YYID (0))
+
+#endif
+
+/* YYFINAL -- State number of the termination state.  */
+#define YYFINAL  9
+/* YYLAST -- Last index in YYTABLE.  */
+#define YYLAST   361
+
+/* YYNTOKENS -- Number of terminals.  */
+#define YYNTOKENS  36
+/* YYNNTS -- Number of nonterminals.  */
+#define YYNNTS  34
+/* YYNRULES -- Number of rules.  */
+#define YYNRULES  106
+/* YYNRULES -- Number of states.  */
+#define YYNSTATES  201
+
+/* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX.  */
+#define YYUNDEFTOK  2
+#define YYMAXUTOK   282
+
+#define YYTRANSLATE(YYX)						\
+  ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
+
+/* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX.  */
+static const yytype_uint8 yytranslate[] =
+{
+       0,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+       2,     2,     2,     2,    35,     2,     2,     2,     2,     2,
+       2,     2,     2,     2,     2,     2,     2,     2,    31,    30,
+       2,    34,     2,     2,     2,     2,     2,     2,     2,     2,
+       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+       2,    32,     2,    33,     2,     2,     2,     2,     2,     2,
+       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+       2,     2,     2,    28,     2,    29,     2,     2,     2,     2,
+       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+       2,     2,     2,     2,     2,     2,     1,     2,     3,     4,
+       5,     6,     7,     8,     9,    10,    11,    12,    13,    14,
+      15,    16,    17,    18,    19,    20,    21,    22,    23,    24,
+      25,    26,    27
+};
+
+#if YYDEBUG
+/* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in
+   YYRHS.  */
+static const yytype_uint16 yyprhs[] =
+{
+       0,     0,     3,     6,    10,    13,    16,    18,    20,    22,
+      24,    30,    31,    34,    39,    47,    54,    66,    68,    70,
+      72,    74,    76,    78,    80,    82,    84,    86,    87,    90,
+      94,    99,   105,   107,   109,   111,   113,   117,   119,   120,
+     123,   126,   131,   136,   141,   146,   151,   156,   161,   166,
+     171,   176,   178,   180,   184,   186,   190,   192,   196,   198,
+     202,   204,   208,   210,   214,   216,   220,   222,   226,   228,
+     232,   234,   236,   238,   242,   250,   251,   256,   257,   262,
+     263,   268,   269,   274,   276,   278,   280,   282,   284,   286,
+     288,   290,   292,   294,   296,   298,   300,   302,   304,   306,
+     308,   310,   312,   314,   316,   318,   320
+};
+
+/* YYRHS -- A `-1'-separated list of the rules' RHS.  */
+static const yytype_int8 yyrhs[] =
+{
+      37,     0,    -1,    38,    41,    -1,    38,    41,     9,    -1,
+      39,    49,    -1,    40,    64,    -1,     1,    -1,     8,    -1,
+       5,    -1,    10,    -1,    28,    42,    29,    47,    30,    -1,
+      -1,    42,    43,    -1,    44,    48,    45,    30,    -1,    20,
+      28,    42,    29,    48,    45,    30,    -1,    18,    28,    42,
+      29,    48,    30,    -1,    13,    28,     4,    31,    43,    16,
+      31,    42,    29,    48,    30,    -1,     1,    -1,     6,    -1,
+      14,    -1,    21,    -1,    15,    -1,    22,    -1,    11,    -1,
+      12,    -1,    23,    -1,    19,    -1,    -1,    45,    46,    -1,
+      32,    26,    33,    -1,    32,    34,    26,    33,    -1,    32,
+      69,    34,    26,    33,    -1,     1,    -1,    48,    -1,     1,
+      -1,    69,    -1,    28,    50,    29,    -1,     1,    -1,    -1,
+      50,    51,    -1,    63,    30,    -1,     6,    69,    52,    30,
+      -1,    14,    69,    53,    30,    -1,    21,    69,    54,    30,
+      -1,    15,    69,    55,    30,    -1,    22,    69,    56,    30,
+      -1,    11,    69,    57,    30,    -1,    12,    69,    58,    30,
+      -1,    19,    69,    59,    30,    -1,    23,    69,    60,    30,
+      -1,    69,    28,    50,    29,    -1,     1,    -1,    26,    -1,
+      52,    35,    26,    -1,    26,    -1,    53,    35,    26,    -1,
+      26,    -1,    54,    35,    26,    -1,    26,    -1,    55,    35,
+      26,    -1,    26,    -1,    56,    35,    26,    -1,    26,    -1,
+      57,    35,    26,    -1,    26,    -1,    58,    35,    26,    -1,
+      62,    -1,    59,    35,    62,    -1,    61,    -1,    60,    35,
+      61,    -1,    69,    -1,    69,    -1,    27,    -1,     3,    26,
+      26,    -1,    28,    65,    66,    67,    68,    29,    30,    -1,
+      -1,     7,    34,    26,    30,    -1,    -1,    17,    34,    26,
+      30,    -1,    -1,    24,    34,    26,    30,    -1,    -1,    25,
+      34,    26,    30,    -1,    26,    -1,     3,    -1,     4,    -1,
+       5,    -1,     6,    -1,     8,    -1,     9,    -1,    10,    -1,
+      11,    -1,    12,    -1,    13,    -1,    14,    -1,    15,    -1,
+      16,    -1,    18,    -1,    19,    -1,    20,    -1,    21,    -1,
+      22,    -1,    23,    -1,     7,    -1,    17,    -1,    25,    -1,
+      24,    -1
+};
+
+/* YYRLINE[YYN] -- source line where rule number YYN was defined.  */
+static const yytype_uint16 yyrline[] =
+{
+       0,    53,    53,    54,    55,    56,    57,    61,    65,    69,
+      74,    80,    81,    87,    89,    91,    93,    96,   102,   103,
+     104,   105,   106,   107,   108,   109,   110,   114,   115,   119,
+     120,   121,   122,   127,   128,   132,   135,   136,   141,   142,
+     146,   147,   149,   151,   153,   155,   157,   159,   161,   163,
+     165,   166,   171,   172,   176,   177,   181,   182,   186,   187,
+     191,   192,   195,   196,   199,   200,   203,   204,   208,   209,
+     213,   217,   218,   229,   233,   237,   237,   238,   238,   239,
+     239,   240,   240,   246,   247,   248,   249,   250,   251,   252,
+     253,   254,   255,   256,   257,   258,   259,   260,   261,   262,
+     263,   264,   265,   266,   267,   268,   269
+};
+#endif
+
+#if YYDEBUG || YYERROR_VERBOSE || YYTOKEN_TABLE
+/* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
+   First, the terminals, then, starting at YYNTOKENS, nonterminals.  */
+static const char *const yytname[] =
+{
+  "$end", "error", "$undefined", "SCAN_ALIAS", "SCAN_ARRAY", "SCAN_ATTR",
+  "SCAN_BYTE", "SCAN_CODE", "SCAN_DATASET", "SCAN_DATA", "SCAN_ERROR",
+  "SCAN_FLOAT32", "SCAN_FLOAT64", "SCAN_GRID", "SCAN_INT16", "SCAN_INT32",
+  "SCAN_MAPS", "SCAN_MESSAGE", "SCAN_SEQUENCE", "SCAN_STRING",
+  "SCAN_STRUCTURE", "SCAN_UINT16", "SCAN_UINT32", "SCAN_URL", "SCAN_PTYPE",
+  "SCAN_PROG", "WORD_WORD", "WORD_STRING", "'{'", "'}'", "';'", "':'",
+  "'['", "']'", "'='", "','", "$accept", "start", "dataset", "attr", "err",
+  "datasetbody", "declarations", "declaration", "base_type", "array_decls",
+  "array_decl", "datasetname", "var_name", "attributebody", "attr_list",
+  "attribute", "bytes", "int16", "uint16", "int32", "uint32", "float32",
+  "float64", "strs", "urls", "url", "str_or_id", "alias", "errorbody",
+  "errorcode", "errormsg", "errorptype", "errorprog", "name", 0
+};
+#endif
+
+# ifdef YYPRINT
+/* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to
+   token YYLEX-NUM.  */
+static const yytype_uint16 yytoknum[] =
+{
+       0,   256,   257,   258,   259,   260,   261,   262,   263,   264,
+     265,   266,   267,   268,   269,   270,   271,   272,   273,   274,
+     275,   276,   277,   278,   279,   280,   281,   282,   123,   125,
+      59,    58,    91,    93,    61,    44
+};
+# endif
+
+/* YYR1[YYN] -- Symbol number of symbol that rule YYN derives.  */
+static const yytype_uint8 yyr1[] =
+{
+       0,    36,    37,    37,    37,    37,    37,    38,    39,    40,
+      41,    42,    42,    43,    43,    43,    43,    43,    44,    44,
+      44,    44,    44,    44,    44,    44,    44,    45,    45,    46,
+      46,    46,    46,    47,    47,    48,    49,    49,    50,    50,
+      51,    51,    51,    51,    51,    51,    51,    51,    51,    51,
+      51,    51,    52,    52,    53,    53,    54,    54,    55,    55,
+      56,    56,    57,    57,    58,    58,    59,    59,    60,    60,
+      61,    62,    62,    63,    64,    65,    65,    66,    66,    67,
+      67,    68,    68,    69,    69,    69,    69,    69,    69,    69,
+      69,    69,    69,    69,    69,    69,    69,    69,    69,    69,
+      69,    69,    69,    69,    69,    69,    69
+};
+
+/* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN.  */
+static const yytype_uint8 yyr2[] =
+{
+       0,     2,     2,     3,     2,     2,     1,     1,     1,     1,
+       5,     0,     2,     4,     7,     6,    11,     1,     1,     1,
+       1,     1,     1,     1,     1,     1,     1,     0,     2,     3,
+       4,     5,     1,     1,     1,     1,     3,     1,     0,     2,
+       2,     4,     4,     4,     4,     4,     4,     4,     4,     4,
+       4,     1,     1,     3,     1,     3,     1,     3,     1,     3,
+       1,     3,     1,     3,     1,     3,     1,     3,     1,     3,
+       1,     1,     1,     3,     7,     0,     4,     0,     4,     0,
+       4,     0,     4,     1,     1,     1,     1,     1,     1,     1,
+       1,     1,     1,     1,     1,     1,     1,     1,     1,     1,
+       1,     1,     1,     1,     1,     1,     1
+};
+
+/* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state
+   STATE-NUM when YYTABLE doesn't specify something else to do.  Zero
+   means the default is an error.  */
+static const yytype_uint8 yydefact[] =
+{
+       0,     6,     8,     7,     9,     0,     0,     0,     0,     1,
+      11,     2,    37,    38,     4,    75,     5,     0,     3,     0,
+       0,    77,    17,    18,    23,    24,     0,    19,    21,     0,
+      26,     0,    20,    22,    25,     0,    12,     0,    51,    84,
+      85,    86,    87,   103,    88,    89,    90,    91,    92,    93,
+      94,    95,    96,   104,    97,    98,    99,   100,   101,   102,
+     106,   105,    83,    36,    39,     0,     0,     0,     0,    79,
+       0,    11,    11,    34,    84,    87,    91,    92,    94,    95,
+      98,   100,   101,   102,     0,    33,    35,    27,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,    40,    38,
+       0,     0,     0,    81,     0,     0,     0,    10,     0,    73,
+      52,     0,    62,     0,    64,     0,    54,     0,    58,     0,
+      72,     0,    66,    71,    56,     0,    60,     0,     0,    68,
+      70,     0,    76,     0,     0,     0,     0,     0,     0,     0,
+      32,    13,     0,    28,    41,     0,    46,     0,    47,     0,
+      42,     0,    44,     0,    48,     0,    43,     0,    45,     0,
+      49,     0,    50,    78,     0,     0,     0,     0,     0,    27,
+      83,     0,     0,    53,    63,    65,    55,    59,    67,    57,
+      61,    69,    80,     0,    74,     0,    15,     0,    29,     0,
+       0,    82,    11,    14,    30,     0,     0,    31,     0,     0,
+      16
+};
+
+/* YYDEFGOTO[NTERM-NUM].  */
+static const yytype_int16 yydefgoto[] =
+{
+      -1,     5,     6,     7,     8,    11,    17,    36,    37,   108,
+     143,    84,    85,    14,    19,    64,   111,   117,   125,   119,
+     127,   113,   115,   121,   128,   129,   122,    65,    16,    21,
+      69,   103,   136,    86
+};
+
+/* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
+   STATE-NUM.  */
+#define YYPACT_NINF -70
+static const yytype_int16 yypact[] =
+{
+       5,   -70,   -70,   -70,   -70,     8,    -1,     3,     0,   -70,
+     -70,    10,   -70,   -70,   -70,    28,   -70,    69,   -70,   159,
+      34,    57,   -70,   -70,   -70,   -70,    50,   -70,   -70,    58,
+     -70,    65,   -70,   -70,   -70,   263,   -70,   312,   -70,    59,
+     -70,   -70,   312,   -70,   -70,   -70,   -70,   312,   312,   -70,
+     312,   312,   -70,   -70,   -70,   312,   -70,   312,   312,   312,
+     -70,   -70,   -70,   -70,   -70,    64,    67,    70,    63,    75,
+      96,   -70,   -70,   -70,   -70,   -70,   -70,   -70,   -70,   -70,
+     -70,   -70,   -70,   -70,    73,   -70,   -70,   -70,    78,    79,
+      80,    81,    82,    83,   287,    84,    85,   312,   -70,   -70,
+      86,    88,    87,    90,    89,   127,   212,   -70,     4,   -70,
+     -70,   -23,   -70,   -21,   -70,   -19,   -70,   -13,   -70,   -12,
+     -70,   -10,   -70,   -70,   -70,    -9,   -70,    36,    42,   -70,
+     -70,   186,   -70,    92,    91,    93,    97,   338,   312,   312,
+     -70,   -70,    39,   -70,   -70,    99,   -70,   103,   -70,   104,
+     -70,   105,   -70,   106,   -70,   287,   -70,   108,   -70,   109,
+     -70,   312,   -70,   -70,   114,   110,   121,   102,   122,   -70,
+     120,   128,   123,   -70,   -70,   -70,   -70,   -70,   -70,   -70,
+     -70,   -70,   -70,   125,   -70,   155,   -70,    37,   -70,   126,
+     132,   -70,   -70,   -70,   -70,   181,   236,   -70,   312,   187,
+     -70
+};
+
+/* YYPGOTO[NTERM-NUM].  */
+static const yytype_int8 yypgoto[] =
+{
+     -70,   -70,   -70,   -70,   -70,   -70,   -69,   -25,   -70,   -50,
+     -70,   -70,   -37,   -70,   117,   -70,   -70,   -70,   -70,   -70,
+     -70,   -70,   -70,   -70,   -70,    60,    74,   -70,   -70,   -70,
+     -70,   -70,   -70,   -18
+};
+
+/* YYTABLE[YYPACT[STATE-NUM]].  What to do in state STATE-NUM.  If
+   positive, shift that token.  If negative, reduce the rule which
+   number is the opposite.  If zero, do what YYDEFACT says.
+   If YYTABLE_NINF, syntax error.  */
+#define YYTABLE_NINF -1
+static const yytype_uint8 yytable[] =
+{
+      87,    66,   105,   106,    12,   140,     1,   144,     9,   146,
+       2,   148,   145,     3,   147,     4,   149,   150,   152,    18,
+     154,   156,   151,   153,    89,   155,   157,    10,    15,    90,
+      91,    13,    92,    93,   141,    20,   142,    94,   140,    95,
+      96,    97,    74,    40,    41,    75,    43,    44,    45,    46,
+      76,    77,    49,    78,    79,    52,    53,    54,    80,    56,
+      81,    82,    83,    60,    61,   170,   158,   193,    67,   142,
+      22,   159,   160,   171,    68,    23,   123,   161,    70,   130,
+      24,    25,    26,    27,    28,    88,    71,    29,    30,    31,
+      32,    33,    34,    72,    98,    99,   100,   101,    35,   102,
+     104,   168,   169,   107,   109,   110,   112,   114,   116,   118,
+     124,   126,   167,    66,   133,   135,   132,   164,   185,   187,
+     137,   134,   163,   196,   172,   173,   166,   165,    22,   174,
+     175,   176,   177,    23,   179,   180,   183,   123,    24,    25,
+      26,    27,    28,   130,   182,    29,    30,    31,    32,    33,
+      34,   184,   186,   188,   189,   191,   138,   190,   195,   194,
+      38,   199,    39,    40,    41,    42,    43,    44,    45,    46,
+      47,    48,    49,    50,    51,    52,    53,    54,    55,    56,
+      57,    58,    59,    60,    61,    62,   192,    38,    63,    39,
+      40,    41,    42,    43,    44,    45,    46,    47,    48,    49,
+      50,    51,    52,    53,    54,    55,    56,    57,    58,    59,
+      60,    61,    62,    22,   197,   162,   131,   200,    23,     0,
+       0,   181,     0,    24,    25,    26,    27,    28,     0,   178,
+      29,    30,    31,    32,    33,    34,     0,    22,     0,     0,
+       0,   139,    23,     0,     0,     0,     0,    24,    25,    26,
+      27,    28,     0,     0,    29,    30,    31,    32,    33,    34,
+       0,     0,     0,     0,    73,   198,    74,    40,    41,    75,
+      43,    44,    45,    46,    76,    77,    49,    78,    79,    52,
+      53,    54,    80,    56,    81,    82,    83,    60,    61,    62,
+      74,    40,    41,    75,    43,    44,    45,    46,    76,    77,
+      49,    78,    79,    52,    53,    54,    80,    56,    81,    82,
+      83,    60,    61,    62,   120,    74,    40,    41,    75,    43,
+      44,    45,    46,    76,    77,    49,    78,    79,    52,    53,
+      54,    80,    56,    81,    82,    83,    60,    61,    62,    22,
+       0,     0,     0,     0,    23,     0,     0,     0,     0,    24,
+      25,    26,    27,    28,     0,     0,    29,    30,    31,    32,
+      33,    34
+};
+
+static const yytype_int16 yycheck[] =
+{
+      37,    19,    71,    72,     1,     1,     1,    30,     0,    30,
+       5,    30,    35,     8,    35,    10,    35,    30,    30,     9,
+      30,    30,    35,    35,    42,    35,    35,    28,    28,    47,
+      48,    28,    50,    51,    30,     7,    32,    55,     1,    57,
+      58,    59,     3,     4,     5,     6,     7,     8,     9,    10,
+      11,    12,    13,    14,    15,    16,    17,    18,    19,    20,
+      21,    22,    23,    24,    25,    26,    30,    30,    34,    32,
+       1,    35,    30,    34,    17,     6,    94,    35,    28,    97,
+      11,    12,    13,    14,    15,    26,    28,    18,    19,    20,
+      21,    22,    23,    28,    30,    28,    26,    34,    29,    24,
+       4,   138,   139,    30,    26,    26,    26,    26,    26,    26,
+      26,    26,   137,   131,    26,    25,    30,    26,    16,   169,
+      31,    34,    30,   192,   142,    26,    29,    34,     1,    26,
+      26,    26,    26,     6,    26,    26,    26,   155,    11,    12,
+      13,    14,    15,   161,    30,    18,    19,    20,    21,    22,
+      23,    30,    30,    33,    26,    30,    29,    34,    26,    33,
+       1,   198,     3,     4,     5,     6,     7,     8,     9,    10,
+      11,    12,    13,    14,    15,    16,    17,    18,    19,    20,
+      21,    22,    23,    24,    25,    26,    31,     1,    29,     3,
+       4,     5,     6,     7,     8,     9,    10,    11,    12,    13,
+      14,    15,    16,    17,    18,    19,    20,    21,    22,    23,
+      24,    25,    26,     1,    33,    29,    99,    30,     6,    -1,
+      -1,   161,    -1,    11,    12,    13,    14,    15,    -1,   155,
+      18,    19,    20,    21,    22,    23,    -1,     1,    -1,    -1,
+      -1,    29,     6,    -1,    -1,    -1,    -1,    11,    12,    13,
+      14,    15,    -1,    -1,    18,    19,    20,    21,    22,    23,
+      -1,    -1,    -1,    -1,     1,    29,     3,     4,     5,     6,
+       7,     8,     9,    10,    11,    12,    13,    14,    15,    16,
+      17,    18,    19,    20,    21,    22,    23,    24,    25,    26,
+       3,     4,     5,     6,     7,     8,     9,    10,    11,    12,
+      13,    14,    15,    16,    17,    18,    19,    20,    21,    22,
+      23,    24,    25,    26,    27,     3,     4,     5,     6,     7,
+       8,     9,    10,    11,    12,    13,    14,    15,    16,    17,
+      18,    19,    20,    21,    22,    23,    24,    25,    26,     1,
+      -1,    -1,    -1,    -1,     6,    -1,    -1,    -1,    -1,    11,
+      12,    13,    14,    15,    -1,    -1,    18,    19,    20,    21,
+      22,    23
+};
+
+/* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
+   symbol of state STATE-NUM.  */
+static const yytype_uint8 yystos[] =
+{
+       0,     1,     5,     8,    10,    37,    38,    39,    40,     0,
+      28,    41,     1,    28,    49,    28,    64,    42,     9,    50,
+       7,    65,     1,     6,    11,    12,    13,    14,    15,    18,
+      19,    20,    21,    22,    23,    29,    43,    44,     1,     3,
+       4,     5,     6,     7,     8,     9,    10,    11,    12,    13,
+      14,    15,    16,    17,    18,    19,    20,    21,    22,    23,
+      24,    25,    26,    29,    51,    63,    69,    34,    17,    66,
+      28,    28,    28,     1,     3,     6,    11,    12,    14,    15,
+      19,    21,    22,    23,    47,    48,    69,    48,    26,    69,
+      69,    69,    69,    69,    69,    69,    69,    69,    30,    28,
+      26,    34,    24,    67,     4,    42,    42,    30,    45,    26,
+      26,    52,    26,    57,    26,    58,    26,    53,    26,    55,
+      27,    59,    62,    69,    26,    54,    26,    56,    60,    61,
+      69,    50,    30,    26,    34,    25,    68,    31,    29,    29,
+       1,    30,    32,    46,    30,    35,    30,    35,    30,    35,
+      30,    35,    30,    35,    30,    35,    30,    35,    30,    35,
+      30,    35,    29,    30,    26,    34,    29,    43,    48,    48,
+      26,    34,    69,    26,    26,    26,    26,    26,    62,    26,
+      26,    61,    30,    26,    30,    16,    30,    45,    33,    26,
+      34,    30,    31,    30,    33,    26,    42,    33,    29,    48,
+      30
+};
+
+#define yyerrok		(yyerrstatus = 0)
+#define yyclearin	(yychar = YYEMPTY)
+#define YYEMPTY		(-2)
+#define YYEOF		0
+
+#define YYACCEPT	goto yyacceptlab
+#define YYABORT		goto yyabortlab
+#define YYERROR		goto yyerrorlab
+
+
+/* Like YYERROR except do call yyerror.  This remains here temporarily
+   to ease the transition to the new meaning of YYERROR, for GCC.
+   Once GCC version 2 has supplanted version 1, this can go.  However,
+   YYFAIL appears to be in use.  Nevertheless, it is formally deprecated
+   in Bison 2.4.2's NEWS entry, where a plan to phase it out is
+   discussed.  */
+
+#define YYFAIL		goto yyerrlab
+#if defined YYFAIL
+  /* This is here to suppress warnings from the GCC cpp's
+     -Wunused-macros.  Normally we don't worry about that warning, but
+     some users do, and we want to make it easy for users to remove
+     YYFAIL uses, which will produce warnings from Bison 2.5.  */
+#endif
+
+#define YYRECOVERING()  (!!yyerrstatus)
+
+#define YYBACKUP(Token, Value)					\
+do								\
+  if (yychar == YYEMPTY && yylen == 1)				\
+    {								\
+      yychar = (Token);						\
+      yylval = (Value);						\
+      yytoken = YYTRANSLATE (yychar);				\
+      YYPOPSTACK (1);						\
+      goto yybackup;						\
+    }								\
+  else								\
+    {								\
+      yyerror (parsestate, YY_("syntax error: cannot back up")); \
+      YYERROR;							\
+    }								\
+while (YYID (0))
+
+
+#define YYTERROR	1
+#define YYERRCODE	256
+
+
+/* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N].
+   If N is 0, then set CURRENT to the empty location which ends
+   the previous symbol: RHS[0] (always defined).  */
+
+#define YYRHSLOC(Rhs, K) ((Rhs)[K])
+#ifndef YYLLOC_DEFAULT
+# define YYLLOC_DEFAULT(Current, Rhs, N)				\
+    do									\
+      if (YYID (N))                                                    \
+	{								\
+	  (Current).first_line   = YYRHSLOC (Rhs, 1).first_line;	\
+	  (Current).first_column = YYRHSLOC (Rhs, 1).first_column;	\
+	  (Current).last_line    = YYRHSLOC (Rhs, N).last_line;		\
+	  (Current).last_column  = YYRHSLOC (Rhs, N).last_column;	\
+	}								\
+      else								\
+	{								\
+	  (Current).first_line   = (Current).last_line   =		\
+	    YYRHSLOC (Rhs, 0).last_line;				\
+	  (Current).first_column = (Current).last_column =		\
+	    YYRHSLOC (Rhs, 0).last_column;				\
+	}								\
+    while (YYID (0))
+#endif
+
+
+/* YY_LOCATION_PRINT -- Print the location on the stream.
+   This macro was not mandated originally: define only if we know
+   we won't break user code: when these are the locations we know.  */
+
+#ifndef YY_LOCATION_PRINT
+# if defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL
+#  define YY_LOCATION_PRINT(File, Loc)			\
+     fprintf (File, "%d.%d-%d.%d",			\
+	      (Loc).first_line, (Loc).first_column,	\
+	      (Loc).last_line,  (Loc).last_column)
+# else
+#  define YY_LOCATION_PRINT(File, Loc) ((void) 0)
+# endif
+#endif
+
+
+/* YYLEX -- calling `yylex' with the right arguments.  */
+
+#ifdef YYLEX_PARAM
+# define YYLEX yylex (&yylval, YYLEX_PARAM)
+#else
+# define YYLEX yylex (&yylval, parsestate)
+#endif
+
+/* Enable debugging if requested.  */
+#if YYDEBUG
+
+# ifndef YYFPRINTF
+#  include <stdio.h> /* INFRINGES ON USER NAME SPACE */
+#  define YYFPRINTF fprintf
+# endif
+
+# define YYDPRINTF(Args)			\
+do {						\
+  if (yydebug)					\
+    YYFPRINTF Args;				\
+} while (YYID (0))
+
+# define YY_SYMBOL_PRINT(Title, Type, Value, Location)			  \
+do {									  \
+  if (yydebug)								  \
+    {									  \
+      YYFPRINTF (stderr, "%s ", Title);					  \
+      yy_symbol_print (stderr,						  \
+		  Type, Value, parsestate); \
+      YYFPRINTF (stderr, "\n");						  \
+    }									  \
+} while (YYID (0))
+
+
+/*--------------------------------.
+| Print this symbol on YYOUTPUT.  |
+`--------------------------------*/
+
+/*ARGSUSED*/
+#if (defined __STDC__ || defined __C99__FUNC__ \
+     || defined __cplusplus || defined _MSC_VER)
+static void
+yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep, DAPparsestate* parsestate)
+#else
+static void
+yy_symbol_value_print (yyoutput, yytype, yyvaluep, parsestate)
+    FILE *yyoutput;
+    int yytype;
+    YYSTYPE const * const yyvaluep;
+    DAPparsestate* parsestate;
+#endif
+{
+  if (!yyvaluep)
+    return;
+  YYUSE (parsestate);
+# ifdef YYPRINT
+  if (yytype < YYNTOKENS)
+    YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep);
+# else
+  YYUSE (yyoutput);
+# endif
+  switch (yytype)
+    {
+      default:
+	break;
+    }
+}
+
+
+/*--------------------------------.
+| Print this symbol on YYOUTPUT.  |
+`--------------------------------*/
+
+#if (defined __STDC__ || defined __C99__FUNC__ \
+     || defined __cplusplus || defined _MSC_VER)
+static void
+yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep, DAPparsestate* parsestate)
+#else
+static void
+yy_symbol_print (yyoutput, yytype, yyvaluep, parsestate)
+    FILE *yyoutput;
+    int yytype;
+    YYSTYPE const * const yyvaluep;
+    DAPparsestate* parsestate;
+#endif
+{
+  if (yytype < YYNTOKENS)
+    YYFPRINTF (yyoutput, "token %s (", yytname[yytype]);
+  else
+    YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]);
+
+  yy_symbol_value_print (yyoutput, yytype, yyvaluep, parsestate);
+  YYFPRINTF (yyoutput, ")");
+}
+
+/*------------------------------------------------------------------.
+| yy_stack_print -- Print the state stack from its BOTTOM up to its |
+| TOP (included).                                                   |
+`------------------------------------------------------------------*/
+
+#if (defined __STDC__ || defined __C99__FUNC__ \
+     || defined __cplusplus || defined _MSC_VER)
+static void
+yy_stack_print (yytype_int16 *yybottom, yytype_int16 *yytop)
+#else
+static void
+yy_stack_print (yybottom, yytop)
+    yytype_int16 *yybottom;
+    yytype_int16 *yytop;
+#endif
+{
+  YYFPRINTF (stderr, "Stack now");
+  for (; yybottom <= yytop; yybottom++)
+    {
+      int yybot = *yybottom;
+      YYFPRINTF (stderr, " %d", yybot);
+    }
+  YYFPRINTF (stderr, "\n");
+}
+
+# define YY_STACK_PRINT(Bottom, Top)				\
+do {								\
+  if (yydebug)							\
+    yy_stack_print ((Bottom), (Top));				\
+} while (YYID (0))
+
+
+/*------------------------------------------------.
+| Report that the YYRULE is going to be reduced.  |
+`------------------------------------------------*/
+
+#if (defined __STDC__ || defined __C99__FUNC__ \
+     || defined __cplusplus || defined _MSC_VER)
+static void
+yy_reduce_print (YYSTYPE *yyvsp, int yyrule, DAPparsestate* parsestate)
+#else
+static void
+yy_reduce_print (yyvsp, yyrule, parsestate)
+    YYSTYPE *yyvsp;
+    int yyrule;
+    DAPparsestate* parsestate;
+#endif
+{
+  int yynrhs = yyr2[yyrule];
+  int yyi;
+  unsigned long int yylno = yyrline[yyrule];
+  YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n",
+	     yyrule - 1, yylno);
+  /* The symbols being reduced.  */
+  for (yyi = 0; yyi < yynrhs; yyi++)
+    {
+      YYFPRINTF (stderr, "   $%d = ", yyi + 1);
+      yy_symbol_print (stderr, yyrhs[yyprhs[yyrule] + yyi],
+		       &(yyvsp[(yyi + 1) - (yynrhs)])
+		       		       , parsestate);
+      YYFPRINTF (stderr, "\n");
+    }
+}
+
+# define YY_REDUCE_PRINT(Rule)		\
+do {					\
+  if (yydebug)				\
+    yy_reduce_print (yyvsp, Rule, parsestate); \
+} while (YYID (0))
+
+/* Nonzero means print parse trace.  It is left uninitialized so that
+   multiple parsers can coexist.  */
+int yydebug;
+#else /* !YYDEBUG */
+# define YYDPRINTF(Args)
+# define YY_SYMBOL_PRINT(Title, Type, Value, Location)
+# define YY_STACK_PRINT(Bottom, Top)
+# define YY_REDUCE_PRINT(Rule)
+#endif /* !YYDEBUG */
+
+
+/* YYINITDEPTH -- initial size of the parser's stacks.  */
+#ifndef	YYINITDEPTH
+# define YYINITDEPTH 200
+#endif
+
+/* YYMAXDEPTH -- maximum size the stacks can grow to (effective only
+   if the built-in stack extension method is used).
+
+   Do not make this value too large; the results are undefined if
+   YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH)
+   evaluated with infinite-precision integer arithmetic.  */
+
+#ifndef YYMAXDEPTH
+# define YYMAXDEPTH 10000
+#endif
+
+
+
+
+#if YYERROR_VERBOSE
+
+# ifndef yystrlen
+#  if defined __GLIBC__ && defined _STRING_H
+#   define yystrlen strlen
+#  else
+/* Return the length of YYSTR.  */
+#if (defined __STDC__ || defined __C99__FUNC__ \
+     || defined __cplusplus || defined _MSC_VER)
+static YYSIZE_T
+yystrlen (const char *yystr)
+#else
+static YYSIZE_T
+yystrlen (yystr)
+    const char *yystr;
+#endif
+{
+  YYSIZE_T yylen;
+  for (yylen = 0; yystr[yylen]; yylen++)
+    continue;
+  return yylen;
+}
+#  endif
+# endif
+
+# ifndef yystpcpy
+#  if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE
+#   define yystpcpy stpcpy
+#  else
+/* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in
+   YYDEST.  */
+#if (defined __STDC__ || defined __C99__FUNC__ \
+     || defined __cplusplus || defined _MSC_VER)
+static char *
+yystpcpy (char *yydest, const char *yysrc)
+#else
+static char *
+yystpcpy (yydest, yysrc)
+    char *yydest;
+    const char *yysrc;
+#endif
+{
+  char *yyd = yydest;
+  const char *yys = yysrc;
+
+  while ((*yyd++ = *yys++) != '\0')
+    continue;
+
+  return yyd - 1;
+}
+#  endif
+# endif
+
+# ifndef yytnamerr
+/* Copy to YYRES the contents of YYSTR after stripping away unnecessary
+   quotes and backslashes, so that it's suitable for yyerror.  The
+   heuristic is that double-quoting is unnecessary unless the string
+   contains an apostrophe, a comma, or backslash (other than
+   backslash-backslash).  YYSTR is taken from yytname.  If YYRES is
+   null, do not copy; instead, return the length of what the result
+   would have been.  */
+static YYSIZE_T
+yytnamerr (char *yyres, const char *yystr)
+{
+  if (*yystr == '"')
+    {
+      YYSIZE_T yyn = 0;
+      char const *yyp = yystr;
+
+      for (;;)
+	switch (*++yyp)
+	  {
+	  case '\'':
+	  case ',':
+	    goto do_not_strip_quotes;
+
+	  case '\\':
+	    if (*++yyp != '\\')
+	      goto do_not_strip_quotes;
+	    /* Fall through.  */
+	  default:
+	    if (yyres)
+	      yyres[yyn] = *yyp;
+	    yyn++;
+	    break;
+
+	  case '"':
+	    if (yyres)
+	      yyres[yyn] = '\0';
+	    return yyn;
+	  }
+    do_not_strip_quotes: ;
+    }
+
+  if (! yyres)
+    return yystrlen (yystr);
+
+  return yystpcpy (yyres, yystr) - yyres;
+}
+# endif
+
+/* Copy into YYRESULT an error message about the unexpected token
+   YYCHAR while in state YYSTATE.  Return the number of bytes copied,
+   including the terminating null byte.  If YYRESULT is null, do not
+   copy anything; just return the number of bytes that would be
+   copied.  As a special case, return 0 if an ordinary "syntax error"
+   message will do.  Return YYSIZE_MAXIMUM if overflow occurs during
+   size calculation.  */
+static YYSIZE_T
+yysyntax_error (char *yyresult, int yystate, int yychar)
+{
+  int yyn = yypact[yystate];
+
+  if (! (YYPACT_NINF < yyn && yyn <= YYLAST))
+    return 0;
+  else
+    {
+      int yytype = YYTRANSLATE (yychar);
+      YYSIZE_T yysize0 = yytnamerr (0, yytname[yytype]);
+      YYSIZE_T yysize = yysize0;
+      YYSIZE_T yysize1;
+      int yysize_overflow = 0;
+      enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 };
+      char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM];
+      int yyx;
+
+# if 0
+      /* This is so xgettext sees the translatable formats that are
+	 constructed on the fly.  */
+      YY_("syntax error, unexpected %s");
+      YY_("syntax error, unexpected %s, expecting %s");
+      YY_("syntax error, unexpected %s, expecting %s or %s");
+      YY_("syntax error, unexpected %s, expecting %s or %s or %s");
+      YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s");
+# endif
+      char *yyfmt;
+      char const *yyf;
+      static char const yyunexpected[] = "syntax error, unexpected %s";
+      static char const yyexpecting[] = ", expecting %s";
+      static char const yyor[] = " or %s";
+      char yyformat[sizeof yyunexpected
+		    + sizeof yyexpecting - 1
+		    + ((YYERROR_VERBOSE_ARGS_MAXIMUM - 2)
+		       * (sizeof yyor - 1))];
+      char const *yyprefix = yyexpecting;
+
+      /* Start YYX at -YYN if negative to avoid negative indexes in
+	 YYCHECK.  */
+      int yyxbegin = yyn < 0 ? -yyn : 0;
+
+      /* Stay within bounds of both yycheck and yytname.  */
+      int yychecklim = YYLAST - yyn + 1;
+      int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS;
+      int yycount = 1;
+
+      yyarg[0] = yytname[yytype];
+      yyfmt = yystpcpy (yyformat, yyunexpected);
+
+      for (yyx = yyxbegin; yyx < yyxend; ++yyx)
+	if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR)
+	  {
+	    if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM)
+	      {
+		yycount = 1;
+		yysize = yysize0;
+		yyformat[sizeof yyunexpected - 1] = '\0';
+		break;
+	      }
+	    yyarg[yycount++] = yytname[yyx];
+	    yysize1 = yysize + yytnamerr (0, yytname[yyx]);
+	    yysize_overflow |= (yysize1 < yysize);
+	    yysize = yysize1;
+	    yyfmt = yystpcpy (yyfmt, yyprefix);
+	    yyprefix = yyor;
+	  }
+
+      yyf = YY_(yyformat);
+      yysize1 = yysize + yystrlen (yyf);
+      yysize_overflow |= (yysize1 < yysize);
+      yysize = yysize1;
+
+      if (yysize_overflow)
+	return YYSIZE_MAXIMUM;
+
+      if (yyresult)
+	{
+	  /* Avoid sprintf, as that infringes on the user's name space.
+	     Don't have undefined behavior even if the translation
+	     produced a string with the wrong number of "%s"s.  */
+	  char *yyp = yyresult;
+	  int yyi = 0;
+	  while ((*yyp = *yyf) != '\0')
+	    {
+	      if (*yyp == '%' && yyf[1] == 's' && yyi < yycount)
+		{
+		  yyp += yytnamerr (yyp, yyarg[yyi++]);
+		  yyf += 2;
+		}
+	      else
+		{
+		  yyp++;
+		  yyf++;
+		}
+	    }
+	}
+      return yysize;
+    }
+}
+#endif /* YYERROR_VERBOSE */
+
+
+
+/*-----------------------------------------------.
+| Release the memory associated to this symbol.  |
+`-----------------------------------------------*/
+
+/*ARGSUSED*/
+#if (defined __STDC__ || defined __C99__FUNC__ \
+     || defined __cplusplus || defined _MSC_VER)
+static void
+yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep, DAPparsestate* parsestate)
+#else
+static void
+yydestruct (yymsg, yytype, yyvaluep, parsestate)
+    const char *yymsg;
+    int yytype;
+    YYSTYPE *yyvaluep;
+    DAPparsestate* parsestate;
+#endif
+{
+  YYUSE (yyvaluep);
+  YYUSE (parsestate);
+
+  if (!yymsg)
+    yymsg = "Deleting";
+  YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp);
+
+  switch (yytype)
+    {
+
+      default:
+	break;
+    }
+}
+
+/* Prevent warnings from -Wmissing-prototypes.  */
+#ifdef YYPARSE_PARAM
+#if defined __STDC__ || defined __cplusplus
+int yyparse (void *YYPARSE_PARAM);
+#else
+int yyparse ();
+#endif
+#else /* ! YYPARSE_PARAM */
+#if defined __STDC__ || defined __cplusplus
+int yyparse (DAPparsestate* parsestate);
+#else
+int yyparse ();
+#endif
+#endif /* ! YYPARSE_PARAM */
+
+
+
+
+
+/*-------------------------.
+| yyparse or yypush_parse.  |
+`-------------------------*/
+
+#ifdef YYPARSE_PARAM
+#if (defined __STDC__ || defined __C99__FUNC__ \
+     || defined __cplusplus || defined _MSC_VER)
+int
+yyparse (void *YYPARSE_PARAM)
+#else
+int
+yyparse (YYPARSE_PARAM)
+    void *YYPARSE_PARAM;
+#endif
+#else /* ! YYPARSE_PARAM */
+#if (defined __STDC__ || defined __C99__FUNC__ \
+     || defined __cplusplus || defined _MSC_VER)
+int
+yyparse (DAPparsestate* parsestate)
+#else
+int
+yyparse (parsestate)
+    DAPparsestate* parsestate;
+#endif
+#endif
+{
+/* The lookahead symbol.  */
+int yychar;
+
+/* The semantic value of the lookahead symbol.  */
+YYSTYPE yylval;
+
+    /* Number of syntax errors so far.  */
+    int yynerrs;
+
+    int yystate;
+    /* Number of tokens to shift before error messages enabled.  */
+    int yyerrstatus;
+
+    /* The stacks and their tools:
+       `yyss': related to states.
+       `yyvs': related to semantic values.
+
+       Refer to the stacks thru separate pointers, to allow yyoverflow
+       to reallocate them elsewhere.  */
+
+    /* The state stack.  */
+    yytype_int16 yyssa[YYINITDEPTH];
+    yytype_int16 *yyss;
+    yytype_int16 *yyssp;
+
+    /* The semantic value stack.  */
+    YYSTYPE yyvsa[YYINITDEPTH];
+    YYSTYPE *yyvs;
+    YYSTYPE *yyvsp;
+
+    YYSIZE_T yystacksize;
+
+  int yyn;
+  int yyresult;
+  /* Lookahead token as an internal (translated) token number.  */
+  int yytoken;
+  /* The variables used to return semantic value and location from the
+     action routines.  */
+  YYSTYPE yyval;
+
+#if YYERROR_VERBOSE
+  /* Buffer for error messages, and its allocated size.  */
+  char yymsgbuf[128];
+  char *yymsg = yymsgbuf;
+  YYSIZE_T yymsg_alloc = sizeof yymsgbuf;
+#endif
+
+#define YYPOPSTACK(N)   (yyvsp -= (N), yyssp -= (N))
+
+  /* The number of symbols on the RHS of the reduced rule.
+     Keep to zero when no symbol should be popped.  */
+  int yylen = 0;
+
+  yytoken = 0;
+  yyss = yyssa;
+  yyvs = yyvsa;
+  yystacksize = YYINITDEPTH;
+
+  YYDPRINTF ((stderr, "Starting parse\n"));
+
+  yystate = 0;
+  yyerrstatus = 0;
+  yynerrs = 0;
+  yychar = YYEMPTY; /* Cause a token to be read.  */
+
+  /* Initialize stack pointers.
+     Waste one element of value and location stack
+     so that they stay on the same level as the state stack.
+     The wasted elements are never initialized.  */
+  yyssp = yyss;
+  yyvsp = yyvs;
+
+  goto yysetstate;
+
+/*------------------------------------------------------------.
+| yynewstate -- Push a new state, which is found in yystate.  |
+`------------------------------------------------------------*/
+ yynewstate:
+  /* In all cases, when you get here, the value and location stacks
+     have just been pushed.  So pushing a state here evens the stacks.  */
+  yyssp++;
+
+ yysetstate:
+  *yyssp = yystate;
+
+  if (yyss + yystacksize - 1 <= yyssp)
+    {
+      /* Get the current used size of the three stacks, in elements.  */
+      YYSIZE_T yysize = yyssp - yyss + 1;
+
+#ifdef yyoverflow
+      {
+	/* Give user a chance to reallocate the stack.  Use copies of
+	   these so that the &'s don't force the real ones into
+	   memory.  */
+	YYSTYPE *yyvs1 = yyvs;
+	yytype_int16 *yyss1 = yyss;
+
+	/* Each stack pointer address is followed by the size of the
+	   data in use in that stack, in bytes.  This used to be a
+	   conditional around just the two extra args, but that might
+	   be undefined if yyoverflow is a macro.  */
+	yyoverflow (YY_("memory exhausted"),
+		    &yyss1, yysize * sizeof (*yyssp),
+		    &yyvs1, yysize * sizeof (*yyvsp),
+		    &yystacksize);
+
+	yyss = yyss1;
+	yyvs = yyvs1;
+      }
+#else /* no yyoverflow */
+# ifndef YYSTACK_RELOCATE
+      goto yyexhaustedlab;
+# else
+      /* Extend the stack our own way.  */
+      if (YYMAXDEPTH <= yystacksize)
+	goto yyexhaustedlab;
+      yystacksize *= 2;
+      if (YYMAXDEPTH < yystacksize)
+	yystacksize = YYMAXDEPTH;
+
+      {
+	yytype_int16 *yyss1 = yyss;
+	union yyalloc *yyptr =
+	  (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
+	if (! yyptr)
+	  goto yyexhaustedlab;
+	YYSTACK_RELOCATE (yyss_alloc, yyss);
+	YYSTACK_RELOCATE (yyvs_alloc, yyvs);
+#  undef YYSTACK_RELOCATE
+	if (yyss1 != yyssa)
+	  YYSTACK_FREE (yyss1);
+      }
+# endif
+#endif /* no yyoverflow */
+
+      yyssp = yyss + yysize - 1;
+      yyvsp = yyvs + yysize - 1;
+
+      YYDPRINTF ((stderr, "Stack size increased to %lu\n",
+		  (unsigned long int) yystacksize));
+
+      if (yyss + yystacksize - 1 <= yyssp)
+	YYABORT;
+    }
+
+  YYDPRINTF ((stderr, "Entering state %d\n", yystate));
+
+  if (yystate == YYFINAL)
+    YYACCEPT;
+
+  goto yybackup;
+
+/*-----------.
+| yybackup.  |
+`-----------*/
+yybackup:
+
+  /* Do appropriate processing given the current state.  Read a
+     lookahead token if we need one and don't already have one.  */
+
+  /* First try to decide what to do without reference to lookahead token.  */
+  yyn = yypact[yystate];
+  if (yyn == YYPACT_NINF)
+    goto yydefault;
+
+  /* Not known => get a lookahead token if don't already have one.  */
+
+  /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol.  */
+  if (yychar == YYEMPTY)
+    {
+      YYDPRINTF ((stderr, "Reading a token: "));
+      yychar = YYLEX;
+    }
+
+  if (yychar <= YYEOF)
+    {
+      yychar = yytoken = YYEOF;
+      YYDPRINTF ((stderr, "Now at end of input.\n"));
+    }
+  else
+    {
+      yytoken = YYTRANSLATE (yychar);
+      YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc);
+    }
+
+  /* If the proper action on seeing token YYTOKEN is to reduce or to
+     detect an error, take that action.  */
+  yyn += yytoken;
+  if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken)
+    goto yydefault;
+  yyn = yytable[yyn];
+  if (yyn <= 0)
+    {
+      if (yyn == 0 || yyn == YYTABLE_NINF)
+	goto yyerrlab;
+      yyn = -yyn;
+      goto yyreduce;
+    }
+
+  /* Count tokens shifted since error; after three, turn off error
+     status.  */
+  if (yyerrstatus)
+    yyerrstatus--;
+
+  /* Shift the lookahead token.  */
+  YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc);
+
+  /* Discard the shifted token.  */
+  yychar = YYEMPTY;
+
+  yystate = yyn;
+  *++yyvsp = yylval;
+
+  goto yynewstate;
+
+
+/*-----------------------------------------------------------.
+| yydefault -- do the default action for the current state.  |
+`-----------------------------------------------------------*/
+yydefault:
+  yyn = yydefact[yystate];
+  if (yyn == 0)
+    goto yyerrlab;
+  goto yyreduce;
+
+
+/*-----------------------------.
+| yyreduce -- Do a reduction.  |
+`-----------------------------*/
+yyreduce:
+  /* yyn is the number of a rule to reduce with.  */
+  yylen = yyr2[yyn];
+
+  /* If YYLEN is nonzero, implement the default value of the action:
+     `$$ = $1'.
+
+     Otherwise, the following line sets YYVAL to garbage.
+     This behavior is undocumented and Bison
+     users should not rely upon it.  Assigning to YYVAL
+     unconditionally makes the parser a bit smaller, and it avoids a
+     GCC warning that YYVAL may be used uninitialized.  */
+  yyval = yyvsp[1-yylen];
+
+
+  YY_REDUCE_PRINT (yyn);
+  switch (yyn)
+    {
+        case 6:
+
+/* Line 1464 of yacc.c  */
+#line 57 "dap.y"
+    {dap_unrecognizedresponse(parsestate); YYABORT;;}
+    break;
+
+  case 7:
+
+/* Line 1464 of yacc.c  */
+#line 62 "dap.y"
+    {dap_tagparse(parsestate,SCAN_DATASET);;}
+    break;
+
+  case 8:
+
+/* Line 1464 of yacc.c  */
+#line 66 "dap.y"
+    {dap_tagparse(parsestate,SCAN_ATTR);;}
+    break;
+
+  case 9:
+
+/* Line 1464 of yacc.c  */
+#line 70 "dap.y"
+    {dap_tagparse(parsestate,SCAN_ERROR);;}
+    break;
+
+  case 10:
+
+/* Line 1464 of yacc.c  */
+#line 75 "dap.y"
+    {dap_datasetbody(parsestate,(yyvsp[(4) - (5)]),(yyvsp[(2) - (5)]));;}
+    break;
+
+  case 11:
+
+/* Line 1464 of yacc.c  */
+#line 80 "dap.y"
+    {(yyval)=dap_declarations(parsestate,null,null);;}
+    break;
+
+  case 12:
+
+/* Line 1464 of yacc.c  */
+#line 81 "dap.y"
+    {(yyval)=dap_declarations(parsestate,(yyvsp[(1) - (2)]),(yyvsp[(2) - (2)]));;}
+    break;
+
+  case 13:
+
+/* Line 1464 of yacc.c  */
+#line 88 "dap.y"
+    {(yyval)=dap_makebase(parsestate,(yyvsp[(2) - (4)]),(yyvsp[(1) - (4)]),(yyvsp[(3) - (4)]));;}
+    break;
+
+  case 14:
+
+/* Line 1464 of yacc.c  */
+#line 90 "dap.y"
+    {if(((yyval)=dap_makestructure(parsestate,(yyvsp[(5) - (7)]),(yyvsp[(6) - (7)]),(yyvsp[(3) - (7)])))==null) {YYABORT;};}
+    break;
+
+  case 15:
+
+/* Line 1464 of yacc.c  */
+#line 92 "dap.y"
+    {if(((yyval)=dap_makesequence(parsestate,(yyvsp[(5) - (6)]),(yyvsp[(3) - (6)])))==null) {YYABORT;};}
+    break;
+
+  case 16:
+
+/* Line 1464 of yacc.c  */
+#line 95 "dap.y"
+    {if(((yyval)=dap_makegrid(parsestate,(yyvsp[(10) - (11)]),(yyvsp[(5) - (11)]),(yyvsp[(8) - (11)])))==null) {YYABORT;};}
+    break;
+
+  case 17:
+
+/* Line 1464 of yacc.c  */
+#line 97 "dap.y"
+    {daperror(parsestate,"Unrecognized type"); YYABORT;;}
+    break;
+
+  case 18:
+
+/* Line 1464 of yacc.c  */
+#line 102 "dap.y"
+    {(yyval)=(Object)SCAN_BYTE;;}
+    break;
+
+  case 19:
+
+/* Line 1464 of yacc.c  */
+#line 103 "dap.y"
+    {(yyval)=(Object)SCAN_INT16;;}
+    break;
+
+  case 20:
+
+/* Line 1464 of yacc.c  */
+#line 104 "dap.y"
+    {(yyval)=(Object)SCAN_UINT16;;}
+    break;
+
+  case 21:
+
+/* Line 1464 of yacc.c  */
+#line 105 "dap.y"
+    {(yyval)=(Object)SCAN_INT32;;}
+    break;
+
+  case 22:
+
+/* Line 1464 of yacc.c  */
+#line 106 "dap.y"
+    {(yyval)=(Object)SCAN_UINT32;;}
+    break;
+
+  case 23:
+
+/* Line 1464 of yacc.c  */
+#line 107 "dap.y"
+    {(yyval)=(Object)SCAN_FLOAT32;;}
+    break;
+
+  case 24:
+
+/* Line 1464 of yacc.c  */
+#line 108 "dap.y"
+    {(yyval)=(Object)SCAN_FLOAT64;;}
+    break;
+
+  case 25:
+
+/* Line 1464 of yacc.c  */
+#line 109 "dap.y"
+    {(yyval)=(Object)SCAN_URL;;}
+    break;
+
+  case 26:
+
+/* Line 1464 of yacc.c  */
+#line 110 "dap.y"
+    {(yyval)=(Object)SCAN_STRING;;}
+    break;
+
+  case 27:
+
+/* Line 1464 of yacc.c  */
+#line 114 "dap.y"
+    {(yyval)=dap_arraydecls(parsestate,null,null);;}
+    break;
+
+  case 28:
+
+/* Line 1464 of yacc.c  */
+#line 115 "dap.y"
+    {(yyval)=dap_arraydecls(parsestate,(yyvsp[(1) - (2)]),(yyvsp[(2) - (2)]));;}
+    break;
+
+  case 29:
+
+/* Line 1464 of yacc.c  */
+#line 119 "dap.y"
+    {(yyval)=dap_arraydecl(parsestate,null,(yyvsp[(2) - (3)]));;}
+    break;
+
+  case 30:
+
+/* Line 1464 of yacc.c  */
+#line 120 "dap.y"
+    {(yyval)=dap_arraydecl(parsestate,null,(yyvsp[(3) - (4)]));;}
+    break;
+
+  case 31:
+
+/* Line 1464 of yacc.c  */
+#line 121 "dap.y"
+    {(yyval)=dap_arraydecl(parsestate,(yyvsp[(2) - (5)]),(yyvsp[(4) - (5)]));;}
+    break;
+
+  case 32:
+
+/* Line 1464 of yacc.c  */
+#line 123 "dap.y"
+    {daperror(parsestate,"Illegal dimension declaration"); YYABORT;;}
+    break;
+
+  case 33:
+
+/* Line 1464 of yacc.c  */
+#line 127 "dap.y"
+    {(yyval)=(yyvsp[(1) - (1)]);;}
+    break;
+
+  case 34:
+
+/* Line 1464 of yacc.c  */
+#line 129 "dap.y"
+    {daperror(parsestate,"Illegal dataset declaration"); YYABORT;;}
+    break;
+
+  case 35:
+
+/* Line 1464 of yacc.c  */
+#line 132 "dap.y"
+    {(yyval)=(yyvsp[(1) - (1)]);;}
+    break;
+
+  case 36:
+
+/* Line 1464 of yacc.c  */
+#line 135 "dap.y"
+    {dap_attributebody(parsestate,(yyvsp[(2) - (3)]));;}
+    break;
+
+  case 37:
+
+/* Line 1464 of yacc.c  */
+#line 137 "dap.y"
+    {daperror(parsestate,"Illegal DAS body"); YYABORT;;}
+    break;
+
+  case 38:
+
+/* Line 1464 of yacc.c  */
+#line 141 "dap.y"
+    {(yyval)=dap_attrlist(parsestate,null,null);;}
+    break;
+
+  case 39:
+
+/* Line 1464 of yacc.c  */
+#line 142 "dap.y"
+    {(yyval)=dap_attrlist(parsestate,(yyvsp[(1) - (2)]),(yyvsp[(2) - (2)]));;}
+    break;
+
+  case 40:
+
+/* Line 1464 of yacc.c  */
+#line 146 "dap.y"
+    {(yyval)=null;;}
+    break;
+
+  case 41:
+
+/* Line 1464 of yacc.c  */
+#line 148 "dap.y"
+    {(yyval)=dap_attribute(parsestate,(yyvsp[(2) - (4)]),(yyvsp[(3) - (4)]),(Object)SCAN_BYTE);;}
+    break;
+
+  case 42:
+
+/* Line 1464 of yacc.c  */
+#line 150 "dap.y"
+    {(yyval)=dap_attribute(parsestate,(yyvsp[(2) - (4)]),(yyvsp[(3) - (4)]),(Object)SCAN_INT16);;}
+    break;
+
+  case 43:
+
+/* Line 1464 of yacc.c  */
+#line 152 "dap.y"
+    {(yyval)=dap_attribute(parsestate,(yyvsp[(2) - (4)]),(yyvsp[(3) - (4)]),(Object)SCAN_UINT16);;}
+    break;
+
+  case 44:
+
+/* Line 1464 of yacc.c  */
+#line 154 "dap.y"
+    {(yyval)=dap_attribute(parsestate,(yyvsp[(2) - (4)]),(yyvsp[(3) - (4)]),(Object)SCAN_INT32);;}
+    break;
+
+  case 45:
+
+/* Line 1464 of yacc.c  */
+#line 156 "dap.y"
+    {(yyval)=dap_attribute(parsestate,(yyvsp[(2) - (4)]),(yyvsp[(3) - (4)]),(Object)SCAN_UINT32);;}
+    break;
+
+  case 46:
+
+/* Line 1464 of yacc.c  */
+#line 158 "dap.y"
+    {(yyval)=dap_attribute(parsestate,(yyvsp[(2) - (4)]),(yyvsp[(3) - (4)]),(Object)SCAN_FLOAT32);;}
+    break;
+
+  case 47:
+
+/* Line 1464 of yacc.c  */
+#line 160 "dap.y"
+    {(yyval)=dap_attribute(parsestate,(yyvsp[(2) - (4)]),(yyvsp[(3) - (4)]),(Object)SCAN_FLOAT64);;}
+    break;
+
+  case 48:
+
+/* Line 1464 of yacc.c  */
+#line 162 "dap.y"
+    {(yyval)=dap_attribute(parsestate,(yyvsp[(2) - (4)]),(yyvsp[(3) - (4)]),(Object)SCAN_STRING);;}
+    break;
+
+  case 49:
+
+/* Line 1464 of yacc.c  */
+#line 164 "dap.y"
+    {(yyval)=dap_attribute(parsestate,(yyvsp[(2) - (4)]),(yyvsp[(3) - (4)]),(Object)SCAN_URL);;}
+    break;
+
+  case 50:
+
+/* Line 1464 of yacc.c  */
+#line 165 "dap.y"
+    {(yyval)=dap_attrset(parsestate,(yyvsp[(1) - (4)]),(yyvsp[(3) - (4)]));;}
+    break;
+
+  case 51:
+
+/* Line 1464 of yacc.c  */
+#line 167 "dap.y"
+    {daperror(parsestate,"Illegal attribute"); YYABORT;;}
+    break;
+
+  case 52:
+
+/* Line 1464 of yacc.c  */
+#line 171 "dap.y"
+    {(yyval)=dap_attrvalue(parsestate,null,(yyvsp[(1) - (1)]),(Object)SCAN_BYTE);;}
+    break;
+
+  case 53:
+
+/* Line 1464 of yacc.c  */
+#line 173 "dap.y"
+    {(yyval)=dap_attrvalue(parsestate,(yyvsp[(1) - (3)]),(yyvsp[(3) - (3)]),(Object)SCAN_BYTE);;}
+    break;
+
+  case 54:
+
+/* Line 1464 of yacc.c  */
+#line 176 "dap.y"
+    {(yyval)=dap_attrvalue(parsestate,null,(yyvsp[(1) - (1)]),(Object)SCAN_INT16);;}
+    break;
+
+  case 55:
+
+/* Line 1464 of yacc.c  */
+#line 178 "dap.y"
+    {(yyval)=dap_attrvalue(parsestate,(yyvsp[(1) - (3)]),(yyvsp[(3) - (3)]),(Object)SCAN_INT16);;}
+    break;
+
+  case 56:
+
+/* Line 1464 of yacc.c  */
+#line 181 "dap.y"
+    {(yyval)=dap_attrvalue(parsestate,null,(yyvsp[(1) - (1)]),(Object)SCAN_UINT16);;}
+    break;
+
+  case 57:
+
+/* Line 1464 of yacc.c  */
+#line 183 "dap.y"
+    {(yyval)=dap_attrvalue(parsestate,(yyvsp[(1) - (3)]),(yyvsp[(3) - (3)]),(Object)SCAN_UINT16);;}
+    break;
+
+  case 58:
+
+/* Line 1464 of yacc.c  */
+#line 186 "dap.y"
+    {(yyval)=dap_attrvalue(parsestate,null,(yyvsp[(1) - (1)]),(Object)SCAN_INT32);;}
+    break;
+
+  case 59:
+
+/* Line 1464 of yacc.c  */
+#line 188 "dap.y"
+    {(yyval)=dap_attrvalue(parsestate,(yyvsp[(1) - (3)]),(yyvsp[(3) - (3)]),(Object)SCAN_INT32);;}
+    break;
+
+  case 60:
+
+/* Line 1464 of yacc.c  */
+#line 191 "dap.y"
+    {(yyval)=dap_attrvalue(parsestate,null,(yyvsp[(1) - (1)]),(Object)SCAN_UINT32);;}
+    break;
+
+  case 61:
+
+/* Line 1464 of yacc.c  */
+#line 192 "dap.y"
+    {(yyval)=dap_attrvalue(parsestate,(yyvsp[(1) - (3)]),(yyvsp[(3) - (3)]),(Object)SCAN_UINT32);;}
+    break;
+
+  case 62:
+
+/* Line 1464 of yacc.c  */
+#line 195 "dap.y"
+    {(yyval)=dap_attrvalue(parsestate,null,(yyvsp[(1) - (1)]),(Object)SCAN_FLOAT32);;}
+    break;
+
+  case 63:
+
+/* Line 1464 of yacc.c  */
+#line 196 "dap.y"
+    {(yyval)=dap_attrvalue(parsestate,(yyvsp[(1) - (3)]),(yyvsp[(3) - (3)]),(Object)SCAN_FLOAT32);;}
+    break;
+
+  case 64:
+
+/* Line 1464 of yacc.c  */
+#line 199 "dap.y"
+    {(yyval)=dap_attrvalue(parsestate,null,(yyvsp[(1) - (1)]),(Object)SCAN_FLOAT64);;}
+    break;
+
+  case 65:
+
+/* Line 1464 of yacc.c  */
+#line 200 "dap.y"
+    {(yyval)=dap_attrvalue(parsestate,(yyvsp[(1) - (3)]),(yyvsp[(3) - (3)]),(Object)SCAN_FLOAT64);;}
+    break;
+
+  case 66:
+
+/* Line 1464 of yacc.c  */
+#line 203 "dap.y"
+    {(yyval)=dap_attrvalue(parsestate,null,(yyvsp[(1) - (1)]),(Object)SCAN_STRING);;}
+    break;
+
+  case 67:
+
+/* Line 1464 of yacc.c  */
+#line 204 "dap.y"
+    {(yyval)=dap_attrvalue(parsestate,(yyvsp[(1) - (3)]),(yyvsp[(3) - (3)]),(Object)SCAN_STRING);;}
+    break;
+
+  case 68:
+
+/* Line 1464 of yacc.c  */
+#line 208 "dap.y"
+    {(yyval)=dap_attrvalue(parsestate,null,(yyvsp[(1) - (1)]),(Object)SCAN_URL);;}
+    break;
+
+  case 69:
+
+/* Line 1464 of yacc.c  */
+#line 209 "dap.y"
+    {(yyval)=dap_attrvalue(parsestate,(yyvsp[(1) - (3)]),(yyvsp[(3) - (3)]),(Object)SCAN_URL);;}
+    break;
+
+  case 70:
+
+/* Line 1464 of yacc.c  */
+#line 213 "dap.y"
+    {(yyval)=(yyvsp[(1) - (1)]);;}
+    break;
+
+  case 71:
+
+/* Line 1464 of yacc.c  */
+#line 217 "dap.y"
+    {(yyval)=(yyvsp[(1) - (1)]);;}
+    break;
+
+  case 72:
+
+/* Line 1464 of yacc.c  */
+#line 218 "dap.y"
+    {(yyval)=(yyvsp[(1) - (1)]);;}
+    break;
+
+  case 73:
+
+/* Line 1464 of yacc.c  */
+#line 229 "dap.y"
+    {(yyval)=(yyvsp[(2) - (3)]); (yyval)=(yyvsp[(3) - (3)]); (yyval)=null;;}
+    break;
+
+  case 74:
+
+/* Line 1464 of yacc.c  */
+#line 234 "dap.y"
+    {dap_errorbody(parsestate,(yyvsp[(2) - (7)]),(yyvsp[(3) - (7)]),(yyvsp[(4) - (7)]),(yyvsp[(5) - (7)]));;}
+    break;
+
+  case 75:
+
+/* Line 1464 of yacc.c  */
+#line 237 "dap.y"
+    {(yyval)=null;;}
+    break;
+
+  case 76:
+
+/* Line 1464 of yacc.c  */
+#line 237 "dap.y"
+    {(yyval)=(yyvsp[(3) - (4)]);;}
+    break;
+
+  case 77:
+
+/* Line 1464 of yacc.c  */
+#line 238 "dap.y"
+    {(yyval)=null;;}
+    break;
+
+  case 78:
+
+/* Line 1464 of yacc.c  */
+#line 238 "dap.y"
+    {(yyval)=(yyvsp[(3) - (4)]);;}
+    break;
+
+  case 79:
+
+/* Line 1464 of yacc.c  */
+#line 239 "dap.y"
+    {(yyval)=null;;}
+    break;
+
+  case 80:
+
+/* Line 1464 of yacc.c  */
+#line 239 "dap.y"
+    {(yyval)=(yyvsp[(3) - (4)]);;}
+    break;
+
+  case 81:
+
+/* Line 1464 of yacc.c  */
+#line 240 "dap.y"
+    {(yyval)=null;;}
+    break;
+
+  case 82:
+
+/* Line 1464 of yacc.c  */
+#line 240 "dap.y"
+    {(yyval)=(yyvsp[(3) - (4)]);;}
+    break;
+
+  case 83:
+
+/* Line 1464 of yacc.c  */
+#line 246 "dap.y"
+    {(yyval)=dapdecode(parsestate->lexstate,(yyvsp[(1) - (1)]));;}
+    break;
+
+  case 84:
+
+/* Line 1464 of yacc.c  */
+#line 247 "dap.y"
+    {(yyval)=strdup("alias");;}
+    break;
+
+  case 85:
+
+/* Line 1464 of yacc.c  */
+#line 248 "dap.y"
+    {(yyval)=strdup("array");;}
+    break;
+
+  case 86:
+
+/* Line 1464 of yacc.c  */
+#line 249 "dap.y"
+    {(yyval)=strdup("attributes");;}
+    break;
+
+  case 87:
+
+/* Line 1464 of yacc.c  */
+#line 250 "dap.y"
+    {(yyval)=strdup("byte");;}
+    break;
+
+  case 88:
+
+/* Line 1464 of yacc.c  */
+#line 251 "dap.y"
+    {(yyval)=strdup("dataset");;}
+    break;
+
+  case 89:
+
+/* Line 1464 of yacc.c  */
+#line 252 "dap.y"
+    {(yyval)=strdup("data");;}
+    break;
+
+  case 90:
+
+/* Line 1464 of yacc.c  */
+#line 253 "dap.y"
+    {(yyval)=strdup("error");;}
+    break;
+
+  case 91:
+
+/* Line 1464 of yacc.c  */
+#line 254 "dap.y"
+    {(yyval)=strdup("float32");;}
+    break;
+
+  case 92:
+
+/* Line 1464 of yacc.c  */
+#line 255 "dap.y"
+    {(yyval)=strdup("float64");;}
+    break;
+
+  case 93:
+
+/* Line 1464 of yacc.c  */
+#line 256 "dap.y"
+    {(yyval)=strdup("grid");;}
+    break;
+
+  case 94:
+
+/* Line 1464 of yacc.c  */
+#line 257 "dap.y"
+    {(yyval)=strdup("int16");;}
+    break;
+
+  case 95:
+
+/* Line 1464 of yacc.c  */
+#line 258 "dap.y"
+    {(yyval)=strdup("int32");;}
+    break;
+
+  case 96:
+
+/* Line 1464 of yacc.c  */
+#line 259 "dap.y"
+    {(yyval)=strdup("maps");;}
+    break;
+
+  case 97:
+
+/* Line 1464 of yacc.c  */
+#line 260 "dap.y"
+    {(yyval)=strdup("sequence");;}
+    break;
+
+  case 98:
+
+/* Line 1464 of yacc.c  */
+#line 261 "dap.y"
+    {(yyval)=strdup("string");;}
+    break;
+
+  case 99:
+
+/* Line 1464 of yacc.c  */
+#line 262 "dap.y"
+    {(yyval)=strdup("structure");;}
+    break;
+
+  case 100:
+
+/* Line 1464 of yacc.c  */
+#line 263 "dap.y"
+    {(yyval)=strdup("uint16");;}
+    break;
+
+  case 101:
+
+/* Line 1464 of yacc.c  */
+#line 264 "dap.y"
+    {(yyval)=strdup("uint32");;}
+    break;
+
+  case 102:
+
+/* Line 1464 of yacc.c  */
+#line 265 "dap.y"
+    {(yyval)=strdup("url");;}
+    break;
+
+  case 103:
+
+/* Line 1464 of yacc.c  */
+#line 266 "dap.y"
+    {(yyval)=strdup("code");;}
+    break;
+
+  case 104:
+
+/* Line 1464 of yacc.c  */
+#line 267 "dap.y"
+    {(yyval)=strdup("message");;}
+    break;
+
+  case 105:
+
+/* Line 1464 of yacc.c  */
+#line 268 "dap.y"
+    {(yyval)=strdup("program");;}
+    break;
+
+  case 106:
+
+/* Line 1464 of yacc.c  */
+#line 269 "dap.y"
+    {(yyval)=strdup("program_type");;}
+    break;
+
+
+
+/* Line 1464 of yacc.c  */
+#line 2280 "dap.tab.c"
+      default: break;
+    }
+  YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc);
+
+  YYPOPSTACK (yylen);
+  yylen = 0;
+  YY_STACK_PRINT (yyss, yyssp);
+
+  *++yyvsp = yyval;
+
+  /* Now `shift' the result of the reduction.  Determine what state
+     that goes to, based on the state we popped back to and the rule
+     number reduced by.  */
+
+  yyn = yyr1[yyn];
+
+  yystate = yypgoto[yyn - YYNTOKENS] + *yyssp;
+  if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp)
+    yystate = yytable[yystate];
+  else
+    yystate = yydefgoto[yyn - YYNTOKENS];
+
+  goto yynewstate;
+
+
+/*------------------------------------.
+| yyerrlab -- here on detecting error |
+`------------------------------------*/
+yyerrlab:
+  /* If not already recovering from an error, report this error.  */
+  if (!yyerrstatus)
+    {
+      ++yynerrs;
+#if ! YYERROR_VERBOSE
+      yyerror (parsestate, YY_("syntax error"));
+#else
+      {
+	YYSIZE_T yysize = yysyntax_error (0, yystate, yychar);
+	if (yymsg_alloc < yysize && yymsg_alloc < YYSTACK_ALLOC_MAXIMUM)
+	  {
+	    YYSIZE_T yyalloc = 2 * yysize;
+	    if (! (yysize <= yyalloc && yyalloc <= YYSTACK_ALLOC_MAXIMUM))
+	      yyalloc = YYSTACK_ALLOC_MAXIMUM;
+	    if (yymsg != yymsgbuf)
+	      YYSTACK_FREE (yymsg);
+	    yymsg = (char *) YYSTACK_ALLOC (yyalloc);
+	    if (yymsg)
+	      yymsg_alloc = yyalloc;
+	    else
+	      {
+		yymsg = yymsgbuf;
+		yymsg_alloc = sizeof yymsgbuf;
+	      }
+	  }
+
+	if (0 < yysize && yysize <= yymsg_alloc)
+	  {
+	    (void) yysyntax_error (yymsg, yystate, yychar);
+	    yyerror (parsestate, yymsg);
+	  }
+	else
+	  {
+	    yyerror (parsestate, YY_("syntax error"));
+	    if (yysize != 0)
+	      goto yyexhaustedlab;
+	  }
+      }
+#endif
+    }
+
+
+
+  if (yyerrstatus == 3)
+    {
+      /* If just tried and failed to reuse lookahead token after an
+	 error, discard it.  */
+
+      if (yychar <= YYEOF)
+	{
+	  /* Return failure if at end of input.  */
+	  if (yychar == YYEOF)
+	    YYABORT;
+	}
+      else
+	{
+	  yydestruct ("Error: discarding",
+		      yytoken, &yylval, parsestate);
+	  yychar = YYEMPTY;
+	}
+    }
+
+  /* Else will try to reuse lookahead token after shifting the error
+     token.  */
+  goto yyerrlab1;
+
+
+/*---------------------------------------------------.
+| yyerrorlab -- error raised explicitly by YYERROR.  |
+`---------------------------------------------------*/
+yyerrorlab:
+
+  /* Pacify compilers like GCC when the user code never invokes
+     YYERROR and the label yyerrorlab therefore never appears in user
+     code.  */
+  if (/*CONSTCOND*/ 0)
+     goto yyerrorlab;
+
+  /* Do not reclaim the symbols of the rule which action triggered
+     this YYERROR.  */
+  YYPOPSTACK (yylen);
+  yylen = 0;
+  YY_STACK_PRINT (yyss, yyssp);
+  yystate = *yyssp;
+  goto yyerrlab1;
+
+
+/*-------------------------------------------------------------.
+| yyerrlab1 -- common code for both syntax error and YYERROR.  |
+`-------------------------------------------------------------*/
+yyerrlab1:
+  yyerrstatus = 3;	/* Each real token shifted decrements this.  */
+
+  for (;;)
+    {
+      yyn = yypact[yystate];
+      if (yyn != YYPACT_NINF)
+	{
+	  yyn += YYTERROR;
+	  if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR)
+	    {
+	      yyn = yytable[yyn];
+	      if (0 < yyn)
+		break;
+	    }
+	}
+
+      /* Pop the current state because it cannot handle the error token.  */
+      if (yyssp == yyss)
+	YYABORT;
+
+
+      yydestruct ("Error: popping",
+		  yystos[yystate], yyvsp, parsestate);
+      YYPOPSTACK (1);
+      yystate = *yyssp;
+      YY_STACK_PRINT (yyss, yyssp);
+    }
+
+  *++yyvsp = yylval;
+
+
+  /* Shift the error token.  */
+  YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp);
+
+  yystate = yyn;
+  goto yynewstate;
+
+
+/*-------------------------------------.
+| yyacceptlab -- YYACCEPT comes here.  |
+`-------------------------------------*/
+yyacceptlab:
+  yyresult = 0;
+  goto yyreturn;
+
+/*-----------------------------------.
+| yyabortlab -- YYABORT comes here.  |
+`-----------------------------------*/
+yyabortlab:
+  yyresult = 1;
+  goto yyreturn;
+
+#if !defined(yyoverflow) || YYERROR_VERBOSE
+/*-------------------------------------------------.
+| yyexhaustedlab -- memory exhaustion comes here.  |
+`-------------------------------------------------*/
+yyexhaustedlab:
+  yyerror (parsestate, YY_("memory exhausted"));
+  yyresult = 2;
+  /* Fall through.  */
+#endif
+
+yyreturn:
+  if (yychar != YYEMPTY)
+     yydestruct ("Cleanup: discarding lookahead",
+		 yytoken, &yylval, parsestate);
+  /* Do not reclaim the symbols of the rule which action triggered
+     this YYABORT or YYACCEPT.  */
+  YYPOPSTACK (yylen);
+  YY_STACK_PRINT (yyss, yyssp);
+  while (yyssp != yyss)
+    {
+      yydestruct ("Cleanup: popping",
+		  yystos[*yyssp], yyvsp, parsestate);
+      YYPOPSTACK (1);
+    }
+#ifndef yyoverflow
+  if (yyss != yyssa)
+    YYSTACK_FREE (yyss);
+#endif
+#if YYERROR_VERBOSE
+  if (yymsg != yymsgbuf)
+    YYSTACK_FREE (yymsg);
+#endif
+  /* Make sure YYID is used.  */
+  return YYID (yyresult);
+}
+
+
+
+/* Line 1684 of yacc.c  */
+#line 272 "dap.y"
+
+
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/src_netcdf4/daptab.h
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/src_netcdf4/daptab.h	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/src_netcdf4/daptab.h	(revision 1749)
@@ -0,0 +1,80 @@
+/* A Bison parser, made by GNU Bison 2.4.3.  */
+
+/* Skeleton interface for Bison's Yacc-like parsers in C
+   
+      Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
+   2009, 2010 Free Software Foundation, Inc.
+   
+   This program is free software: you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation, either version 3 of the License, or
+   (at your option) any later version.
+   
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+   
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
+
+/* As a special exception, you may create a larger work that contains
+   part or all of the Bison parser skeleton and distribute that work
+   under terms of your choice, so long as that work isn't itself a
+   parser generator using the skeleton or a modified version thereof
+   as a parser skeleton.  Alternatively, if you modify or redistribute
+   the parser skeleton itself, you may (at your option) remove this
+   special exception, which will cause the skeleton and the resulting
+   Bison output files to be licensed under the GNU General Public
+   License without this special exception.
+   
+   This special exception was added by the Free Software Foundation in
+   version 2.2 of Bison.  */
+
+
+/* Tokens.  */
+#ifndef YYTOKENTYPE
+# define YYTOKENTYPE
+   /* Put the tokens into the symbol table, so that GDB and other debuggers
+      know about them.  */
+   enum yytokentype {
+     SCAN_ALIAS = 258,
+     SCAN_ARRAY = 259,
+     SCAN_ATTR = 260,
+     SCAN_BYTE = 261,
+     SCAN_CODE = 262,
+     SCAN_DATASET = 263,
+     SCAN_DATA = 264,
+     SCAN_ERROR = 265,
+     SCAN_FLOAT32 = 266,
+     SCAN_FLOAT64 = 267,
+     SCAN_GRID = 268,
+     SCAN_INT16 = 269,
+     SCAN_INT32 = 270,
+     SCAN_MAPS = 271,
+     SCAN_MESSAGE = 272,
+     SCAN_SEQUENCE = 273,
+     SCAN_STRING = 274,
+     SCAN_STRUCTURE = 275,
+     SCAN_UINT16 = 276,
+     SCAN_UINT32 = 277,
+     SCAN_URL = 278,
+     SCAN_PTYPE = 279,
+     SCAN_PROG = 280,
+     WORD_WORD = 281,
+     WORD_STRING = 282
+   };
+#endif
+
+
+
+#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
+typedef int YYSTYPE;
+# define YYSTYPE_IS_TRIVIAL 1
+# define yystype YYSTYPE /* obsolescent; will be withdrawn */
+# define YYSTYPE_IS_DECLARED 1
+#endif
+
+
+
+
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/src_netcdf4/daputil.c
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/src_netcdf4/daputil.c	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/src_netcdf4/daputil.c	(revision 1749)
@@ -0,0 +1,786 @@
+/*********************************************************************
+ *   Copyright 1993, UCAR/Unidata
+ *   See netcdf/COPYRIGHT file for copying and redistribution conditions.
+ *   $Header: /upc/share/CVS/netcdf-3/libncdap3/daputil.c,v 1.47 2010/05/21 23:24:15 dmh Exp $
+ *********************************************************************/
+
+#include "config.h"
+
+#include <sys/time.h>
+
+#include "oc.h"
+extern int oc_dumpnode(OClink, OCobject);
+
+#include "ncdap3.h"
+#include "dapalign.h"
+#include "dapodom.h"
+
+#define LBRACKET '['
+#define RBRACKET ']'
+
+
+/**************************************************/
+/**
+ * Provide a hidden interface to allow utilities
+ * to check if a given path name is really an ncdap3 url.
+ * If no, return null, else return basename of the url
+ * minus any extension.
+ */
+
+int
+nc__testurl(const char* path, char** basenamep)
+{
+    NC_URI* uri;
+    int ok = nc_uriparse(path,&uri);
+    if(ok) {
+	char* slash = strrchr(uri->file, '/');
+	char* dot;
+	if(slash == NULL) slash = (char*)path; else slash++;
+        slash = nulldup(slash);
+	dot = strrchr(slash, '.');
+        if(dot != NULL &&  dot != slash) *dot = '\0';
+	if(basenamep) *basenamep=slash ; else free(slash);
+        nc_urifree(uri);
+    }
+    return ok;
+}
+
+/**************************************************/
+
+/*
+Given a legal dap name with arbitrary characters,
+convert to equivalent legal cdf name
+With the new name policy for netcdf, this procedure
+does nothing.
+*/
+
+char*
+cdflegalname3(char* dapname)
+{
+    return nulldup(dapname);
+}
+
+/* Define the type conversion of the DAP variables
+   to the external netCDF variable type.
+   The proper way is to, for example, convert unsigned short
+   to an int to maintain the values.
+   Unfortuneately, libnc-dap does not do this:
+   it translates the types directly. For example
+   libnc-dap upgrades the DAP byte type, which is unsigned char,
+   to NC_BYTE, which signed char.
+   Oh well.
+   For netcdf-4, we can do proper type conversion.
+*/
+nc_type
+nctypeconvert(NCDAPCOMMON* drno, nc_type nctype)
+{
+    nc_type upgrade = NC_NAT;
+    if(drno->controls.flags & NCF_NC3) {
+	/* libnc-dap mimic invariant is to maintain type size */
+	switch (nctype) {
+	case NC_CHAR:    upgrade = NC_CHAR; break;
+	case NC_BYTE:    upgrade = NC_BYTE; break;
+	case NC_UBYTE:   upgrade = NC_BYTE; break;
+	case NC_SHORT:   upgrade = NC_SHORT; break;
+	case NC_USHORT:  upgrade = NC_SHORT; break;
+	case NC_INT:     upgrade = NC_INT; break;
+	case NC_UINT:    upgrade = NC_INT; break;
+	case NC_INT64:   upgrade = NC_INT64; break;
+	case NC_UINT64:  upgrade = NC_UINT64; break;
+	case NC_FLOAT:   upgrade = NC_FLOAT; break;
+	case NC_DOUBLE:  upgrade = NC_DOUBLE; break;
+	case NC_URL:
+	case NC_STRING:  upgrade = NC_CHAR; break;
+	default: break;
+	}
+    } else if(drno->controls.flags & NCF_NC4) {
+	/* netcdf-4 conversion is more correct */
+	switch (nctype) {
+	case NC_CHAR:    upgrade = NC_CHAR; break;
+	case NC_BYTE:    upgrade = NC_BYTE; break;
+	case NC_UBYTE:   upgrade = NC_UBYTE; break;
+	case NC_SHORT:   upgrade = NC_SHORT; break;
+	case NC_USHORT:  upgrade = NC_USHORT; break;
+	case NC_INT:     upgrade = NC_INT; break;
+	case NC_UINT:    upgrade = NC_UINT; break;
+	case NC_INT64:   upgrade = NC_INT64; break;
+	case NC_UINT64:  upgrade = NC_UINT64; break;
+	case NC_FLOAT:   upgrade = NC_FLOAT; break;
+	case NC_DOUBLE:  upgrade = NC_DOUBLE; break;
+	case NC_URL:
+	case NC_STRING:  upgrade = NC_STRING; break;
+	default: break;
+	}
+    }
+    return upgrade;
+}
+
+nc_type
+octypetonc(OCtype etype)
+{
+    switch (etype) {
+    case OC_Char:	return NC_CHAR;
+    case OC_Byte:	return NC_UBYTE;
+    case OC_UByte:	return NC_UBYTE;
+    case OC_Int16:	return NC_SHORT;
+    case OC_UInt16:	return NC_USHORT;
+    case OC_Int32:	return NC_INT;
+    case OC_UInt32:	return NC_UINT;
+    case OC_Int64:	return NC_INT64;
+    case OC_UInt64:	return NC_UINT64;
+    case OC_Float32:	return NC_FLOAT;
+    case OC_Float64:	return NC_DOUBLE;
+    case OC_String:	return NC_STRING;
+    case OC_URL:	return NC_STRING;
+    case OC_Dataset:	return NC_Dataset;
+    case OC_Sequence:	return NC_Sequence;
+    case OC_Structure:	return NC_Structure;
+    case OC_Grid:	return NC_Grid;
+    case OC_Dimension:	return NC_Dimension;
+    case OC_Primitive:	return NC_Primitive;
+    default: break;
+    }
+    return NC_NAT;
+}
+
+OCtype
+nctypetodap(nc_type nctype)
+{
+    switch (nctype) {
+    case NC_CHAR:	return OC_Char;
+    case NC_BYTE:	return OC_Byte;
+    case NC_UBYTE:	return OC_UByte;
+    case NC_SHORT:	return OC_Int16;
+    case NC_USHORT:	return OC_UInt16;
+    case NC_INT:	return OC_Int32;
+    case NC_UINT:	return OC_UInt32;
+    case NC_INT64:	return OC_Int64;
+    case NC_UINT64:	return OC_UInt64;
+    case NC_FLOAT:	return OC_Float32;
+    case NC_DOUBLE:	return OC_Float64;
+    case NC_STRING:	return OC_String;
+    default : break;
+    }
+    return OC_NAT;
+}
+
+size_t
+nctypesizeof(nc_type nctype)
+{
+    switch (nctype) {
+    case NC_CHAR:	return sizeof(char);
+    case NC_BYTE:	return sizeof(signed char);
+    case NC_UBYTE:	return sizeof(unsigned char);
+    case NC_SHORT:	return sizeof(short);
+    case NC_USHORT:	return sizeof(unsigned short);
+    case NC_INT:	return sizeof(int);
+    case NC_UINT:	return sizeof(unsigned int);
+    case NC_INT64:	return sizeof(long long);
+    case NC_UINT64:	return sizeof(unsigned long long);
+    case NC_FLOAT:	return sizeof(float);
+    case NC_DOUBLE:	return sizeof(double);
+    case NC_STRING:	return sizeof(char*);
+    default: PANIC("nctypesizeof");
+    }
+    return 0;
+}
+
+char*
+nctypetostring(nc_type nctype)
+{
+    switch (nctype) {
+    case NC_NAT:	return "NC_NAT";
+    case NC_BYTE:	return "NC_BYTE";
+    case NC_CHAR:	return "NC_CHAR";
+    case NC_SHORT:	return "NC_SHORT";
+    case NC_INT:	return "NC_INT";
+    case NC_FLOAT:	return "NC_FLOAT";
+    case NC_DOUBLE:	return "NC_DOUBLE";
+    case NC_UBYTE:	return "NC_UBYTE";
+    case NC_USHORT:	return "NC_USHORT";
+    case NC_UINT:	return "NC_UINT";
+    case NC_INT64:	return "NC_INT64";
+    case NC_UINT64:	return "NC_UINT64";
+    case NC_STRING:	return "NC_STRING";
+    case NC_VLEN:	return "NC_VLEN";
+    case NC_OPAQUE:	return "NC_OPAQUE";
+    case NC_ENUM:	return "NC_ENUM";
+    case NC_COMPOUND:	return "NC_COMPOUND";
+    case NC_URL:	return "NC_URL";
+    case NC_SET:	return "NC_SET";
+    case NC_Dataset:	return "NC_Dataset";
+    case NC_Sequence:	return "NC_Sequence";
+    case NC_Structure:	return "NC_Structure";
+    case NC_Grid:	return "NC_Grid";
+    case NC_Dimension:	return "NC_Dimension";
+    case NC_Primitive:	return "NC_Primitive";
+    default: break;
+    }
+    return NULL;
+}
+
+
+/* Pad a buffer */
+int
+alignbuffer3(NCbytes* buf, int alignment)
+{
+    int pad;
+    unsigned long len;
+    if(buf == NULL) return 0;
+    len = ncbyteslength(buf);
+    pad = nccpadding(len,alignment);
+
+#ifdef TEST
+    for(;pad > 0;pad--)
+        ncbytesappend(buf,0x3a); /* 0x3a was chosen at random */
+#else
+    ncbytessetlength(buf,len+pad);
+#endif
+    return 1;
+}
+
+size_t
+dimproduct3(NClist* dimensions)
+{
+    size_t size = 1;
+    unsigned int i;
+    if(dimensions == NULL) return size;
+    for(i=0;i<nclistlength(dimensions);i++) {
+	CDFnode* dim = (CDFnode*)nclistget(dimensions,i);
+	size *= dim->dim.declsize;
+    }
+    return size;
+}
+
+
+/* Return value of param or NULL if not found */
+const char*
+paramvalue34(NCDAPCOMMON* nccomm, const char* key)
+{
+    const char* value;
+
+    if(nccomm == NULL || key == NULL) return 0;
+    if(!nc_urilookup(nccomm->oc.url,key,&value))
+	return NULL;
+    return value;
+}
+
+static const char* checkseps = "+,:;";
+
+/* Search for substring in value of param. If substring == NULL; then just
+   check if param is defined.
+*/
+int
+paramcheck34(NCDAPCOMMON* nccomm, const char* key, const char* subkey)
+{
+    const char* value;
+    char* p;
+
+    if(nccomm == NULL || key == NULL) return 0;
+    if(!nc_urilookup(nccomm->oc.url,key,&value))
+	return 0;
+    if(subkey == NULL) return 1;
+    p = strstr(value,subkey);
+    if(p == NULL) return 0;
+    p += strlen(subkey);
+    if(*p != '\0' && strchr(checkseps,*p) == NULL) return 0;
+    return 1;
+}
+
+
+/* This is NOT UNION */ 
+int
+nclistconcat(NClist* l1, NClist* l2)
+{
+    unsigned int i;
+    for(i=0;i<nclistlength(l2);i++) nclistpush(l1,nclistget(l2,i));
+    return 1;
+}
+
+int
+nclistminus(NClist* l1, NClist* l2)
+{
+    unsigned int i,len,found;
+    len = nclistlength(l2);
+    found = 0;
+    for(i=0;i<len;i++) {
+	if(nclistdeleteall(l1,nclistget(l2,i))) found = 1;
+    }
+    return found;
+}
+
+int
+nclistdeleteall(NClist* l, ncelem elem)
+{
+    int i; /* do not make unsigned */
+    unsigned int len,found;
+    found = 0;
+    len = nclistlength(l);
+    for(i=len-1;i>=0;i--) {
+	ncelem test = nclistget(l,i);
+	if(test==elem) {
+	    nclistremove(l,i);
+            found=1;
+        }
+    }
+    return found;    
+}
+
+/* Collect the set of container nodes ending in "container"*/
+void
+collectnodepath3(CDFnode* node, NClist* path, int withdataset)
+{
+    if(node == NULL) return;
+    nclistpush(path,(ncelem)node);
+    while(node->container != NULL) {
+	node = node->container;
+	if(!withdataset && node->nctype == NC_Dataset) break;
+	nclistinsert(path,0,(ncelem)node);
+    }
+}
+
+/* Like collectnodepath3, but in ocspace */
+void
+collectocpath(OCconnection conn, OCobject node, NClist* path)
+{
+    OCobject container;
+    OCtype octype;
+    if(node == OCNULL) return;
+    oc_inq_class(conn,node,&octype);
+    if(octype == OC_Dataset) return;
+    oc_inq_container(conn,node,&container);
+    if(container != OCNULL)
+        collectocpath(conn,container,path);
+    nclistpush(path,(ncelem)node);
+}
+
+char*
+makeocpathstring3(OCconnection conn, OCobject node, const char* sep)
+{
+    int slen,i,len,first,seplen;
+    char* pathname;
+    OCtype octype;
+    NClist* ocpath = nclistnew();
+
+    collectocpath(conn,node,ocpath);
+    len = nclistlength(ocpath);
+    assert(len > 0); /* dataset at least */
+
+    oc_inq_type(conn,node,&octype);
+    if(octype == OC_Dataset)
+	{pathname = nulldup(""); goto done;} /* Dataset */
+
+    seplen = strlen(sep);
+    for(slen=0,i=0;i<len;i++) {
+	OCobject node = (OCobject)nclistget(ocpath,i);
+	char* name;
+        oc_inq_type(conn,node,&octype);
+        if(octype == OC_Dataset) continue;
+        oc_inq_name(conn,node,&name);
+	slen += (name == NULL? 0 : strlen(name));
+	slen += seplen;
+	nullfree(name);
+    }
+    slen += 1;   /* for null terminator*/
+    pathname = (char*)malloc(slen);
+    MEMCHECK(pathname,NULL);
+    pathname[0] = '\0';    
+    for(first=1,i=0;i<len;i++) {
+	OCobject node = (OCobject)nclistget(ocpath,i);
+	char* name;
+        oc_inq_type(conn,node,&octype);
+        if(octype == OC_Dataset) continue;
+        oc_inq_name(conn,node,&name);
+	if(!first) strcat(pathname,sep);
+        if(name != NULL) strcat(pathname,name);
+	nullfree(name);
+	first = 0;
+    }
+done:
+    nclistfree(ocpath);
+    return pathname;
+}
+
+char*
+makepathstring3(NClist* path, const char* separator, int flags)
+{
+    int slen,i,len,first,seplen;
+    char* pathname;
+
+    len = nclistlength(path);
+    ASSERT(len > 0); /* dataset at least */
+    seplen = strlen(separator);
+    ASSERT(seplen > 0);
+    for(slen=0,i=0;i<len;i++) {
+	CDFnode* node = (CDFnode*)nclistget(path,i);
+	if(node->nctype == NC_Dataset) continue;
+        slen += strlen(node->ncbasename);
+	slen += seplen; 
+    }
+    slen += 1;   /* for null terminator*/
+    pathname = (char*)malloc(slen);
+    MEMCHECK(pathname,NULL);
+    pathname[0] = '\0';    
+    for(first=1,i=0;i<len;i++) {
+	CDFnode* node = (CDFnode*)nclistget(path,i);
+	char* name;
+	if(!node->elided || (flags & PATHELIDE)==0) {
+    	    if(node->nctype != NC_Dataset) {
+                name = node->ncbasename;
+	        if(!first) strcat(pathname,separator);
+                strcat(pathname,name);
+	        first = 0;
+	    }
+	}
+    }
+    return pathname;
+}
+
+
+/* convert path to string using the ncname field */
+char*
+makecdfpathstring3(CDFnode* var, const char* separator)
+{
+    char* spath;
+    NClist* path = nclistnew();
+    collectnodepath3(var,path,WITHDATASET); /* <= note */
+    spath = makepathstring3(path,separator,PATHNC);
+    nclistfree(path);
+    return spath;
+}
+
+/* Collect the set names of container nodes ending in "container"*/
+void
+clonenodenamepath3(CDFnode* node, NClist* path, int withdataset)
+{
+    if(node == NULL) return;
+    /* stop at the dataset container as well*/
+    if(node->nctype != NC_Dataset)
+        clonenodenamepath3(node->container,path,withdataset);
+    if(node->nctype != NC_Dataset || withdataset)
+        nclistpush(path,(ncelem)nulldup(node->ncbasename));
+}
+
+char*
+simplepathstring3(NClist* names,  char* separator)
+{
+    int i;
+    size_t len;
+    char* result;
+    if(nclistlength(names) == 0) return nulldup("");
+    for(len=0,i=0;i<nclistlength(names);i++) {
+	char* name = (char*)nclistget(names,i);
+	len += strlen(name);
+	len += strlen(separator);
+    }
+    len++; /* null terminator */
+    result = (char*)malloc(len);
+    result[0] = '\0';
+    for(i=0;i<nclistlength(names);i++) {
+	char* segment = (char*)nclistget(names,i);
+	if(i > 0) strcat(result,separator);
+	strcat(result,segment);
+    }
+    return result;
+}
+
+/* Define a number of location tests */
+
+/* Is node contained (transitively) in a sequence ? */
+BOOL
+dapinsequence(CDFnode* node)
+{
+    if(node == NULL || node->container == NULL) return TRUE;
+    for(node=node->container;node->nctype != NC_Dataset;node=node->container) {
+       if(node->nctype == NC_Sequence) return TRUE;
+    }
+    return FALSE;
+}
+
+/* Is node a map field of a grid? */
+BOOL
+dapgridmap(CDFnode* node)
+{
+    if(node != NULL && node->container != NULL
+       && node->container->nctype == NC_Grid) {
+	CDFnode* array = (CDFnode*)nclistget(node->container->subnodes,0);
+	return (node != array);
+    }
+    return FALSE;
+}
+
+/* Is node an array field of a grid? */
+BOOL
+dapgridarray(CDFnode* node)
+{
+    if(node != NULL && node->container != NULL
+       && node->container->nctype == NC_Grid) {
+	CDFnode* array = (CDFnode*)nclistget(node->container->subnodes,0);
+	return (node == array);
+    }
+    return FALSE;
+}
+
+BOOL
+dapgridelement(CDFnode* node)
+{
+    return dapgridarray(node)
+           || dapgridmap(node);
+}
+
+/* Is node a top-level grid node? */
+BOOL
+daptopgrid(CDFnode* grid)
+{
+    if(grid == NULL || grid->nctype != NC_Grid) return FALSE;
+    return daptoplevel(grid);
+}
+
+/* Is node a top-level sequence node? */
+BOOL
+daptopseq(CDFnode* seq)
+{
+    if(seq == NULL || seq->nctype != NC_Sequence) return FALSE;
+    return daptoplevel(seq);
+}
+
+/* Is node a top-level node? */
+BOOL
+daptoplevel(CDFnode* node)
+{
+    if(node->container == NULL 
+       || node->container->nctype != NC_Dataset) return FALSE;
+    return TRUE;
+}
+
+unsigned int
+modeldecode(int translation, const char* smodel,
+            const struct NCTMODEL* models,
+            unsigned int dfalt)
+{
+    for(;models->translation;models++) {
+	if(translation != models->translation) continue;
+	if(smodel == models->model
+	   || (models->model != NULL && strcasecmp(smodel,models->model)==0)) {
+	    /* We have a match */
+            return models->flags;
+	}
+    }
+    return dfalt;
+}
+
+unsigned long
+getlimitnumber(const char* limit)
+{
+    size_t slen;
+    unsigned long multiplier = 1;
+    unsigned long lu;
+
+    if(limit == NULL) return 0;
+    slen = strlen(limit);
+    if(slen == 0) return 0;
+    switch (limit[slen-1]) {
+    case 'G': case 'g': multiplier = GIGBYTE; break;
+    case 'M': case 'm': multiplier = MEGBYTE; break;
+    case 'K': case 'k': multiplier = KILBYTE; break;
+    default: break;
+    }
+    sscanf(limit,"%lu",&lu);
+    return (lu*multiplier);
+}
+
+void
+dapexpandescapes(char *termstring)
+{
+    char *s, *t, *endp;
+    
+    /* expand "\" escapes, e.g. "\t" to tab character;
+       will only shorten string length, never increase it
+    */
+    s = termstring;
+    t = termstring;
+    while(*t) {
+	if (*t == '\\') {
+	    t++;
+	    switch (*t) {
+	      case 'a':
+		*s++ = '\007'; t++; /* will use '\a' when STDC */
+		break;
+	      case 'b':
+		*s++ = '\b'; t++;
+		break;
+	      case 'f':
+		*s++ = '\f'; t++;
+		break;
+	      case 'n':
+		*s++ = '\n'; t++;
+		break;
+	      case 'r':
+		*s++ = '\r'; t++;
+		break;
+	      case 't':
+		*s++ = '\t'; t++;
+		break;
+	      case 'v':
+		*s++ = '\v'; t++;
+		break;
+	      case '\\':
+		*s++ = '\\'; t++;
+		break;
+	      case '?':
+		*s++ = '\177'; t++;
+		break;
+	      case 'x':
+		t++; /* now t points to one or more hex digits */
+		*s++ = (char) strtol(t, &endp, 16);
+		t = endp;
+		break;
+	      case '0':
+	      case '1':
+	      case '2':
+	      case '3':
+	      case '4':
+	      case '5':
+	      case '6':
+	      case '7': {
+		/* t should now point to 3 octal digits */
+		int c;
+		c = t[0];
+		if(c == 0 || c < '0' || c > '7') goto normal;
+		c = t[1];
+		if(c == 0 || c < '0' || c > '7') goto normal;
+		c = t[2];
+		if(c == 0 || c < '0' || c > '7') goto normal;
+		c = ((t[0]-'0')<<6)+((t[1]-'0')<<3)+(t[2]-'0');
+		*s++ = (char)c;
+		t += 3;
+		} break;
+	      default:
+		if(*t == 0)
+		    *s++ = '\\';
+		else
+		    *s++ = *t++;
+		break;
+	    }
+	} else {
+normal:	    *s++ = *t++;
+	}
+    }
+    *s = '\0';
+    return;
+}
+
+#ifdef HAVE_GETTIMEOFDAY
+static struct timeval time0;
+static struct timeval time1;
+
+static double
+deltatime()
+{
+    double t0, t1;
+    t0 = ((double)time0.tv_sec);
+    t0 += ((double)time0.tv_usec) / 1000000.0;
+    t1 = ((double)time1.tv_sec);
+    t1 += ((double)time1.tv_usec) / 1000000.0;
+    return (t1 - t0);
+}
+#endif
+
+/* Provide a wrapper for oc_fetch so we can log what it does */
+OCerror
+dap_fetch(NCDAPCOMMON* nccomm, OCconnection conn, const char* ce,
+             OCdxd dxd, OCobject* rootp)
+{
+    OCerror ocstat;
+    char* ext;
+    OCflags flags = 0;
+
+    if(dxd == OCDDS) ext = ".dds";
+    else if(dxd == OCDAS) ext = ".das";
+    else ext = ".dods";
+
+    if(ce != NULL && strlen(ce) == 0)
+	ce = NULL;
+
+    if(FLAGSET(nccomm->controls,NCF_UNCONSTRAINABLE)) {
+	ce = NULL;
+    }
+
+    if(FLAGSET(nccomm->controls,NCF_ONDISK)) {
+	flags |= OCONDISK;
+    }
+
+    if(SHOWFETCH) {
+	/* Build uri string minus the constraint */
+	char* baseurl = nc_uribuild(nccomm->oc.url,NULL,ext,0);
+	if(ce == NULL)
+            LOG1(NCLOGNOTE,"fetch: %s\n",baseurl);
+	else	
+            LOG2(NCLOGNOTE,"fetch: %s?%s\n",baseurl,ce);
+	nullfree(baseurl);
+#ifdef HAVE_GETTIMEOFDAY
+	gettimeofday(&time0,NULL);
+#endif
+    }
+    ocstat = oc_fetchf(conn,ce,dxd,flags,rootp);
+    if(FLAGSET(nccomm->controls,NCF_SHOWFETCH)) {
+#ifdef HAVE_GETTIMEOFDAY
+        double secs;
+	gettimeofday(&time1,NULL);
+	secs = deltatime();
+	nclog(NCLOGNOTE,"fetch complete: %0.3f secs",secs);
+#else
+	nclog(NCLOGNOTE,"fetch complete.");
+#endif
+    }
+#ifdef DEBUG2
+fprintf(stderr,"fetch: dds:\n");
+oc_dumpnode(conn,*rootp);
+#endif
+    return ocstat;
+}
+
+/* Check a name to see if it contains illegal dap characters
+*/
+
+static char* badchars = "./";
+
+
+int
+dap_badname(char* name)
+{
+    char* p;
+    if(name == NULL) return 0;
+    for(p=badchars;*p;p++) {
+        if(strchr(name,*p) != NULL) return 1;
+    }
+    return 0;
+}
+
+/* Check a name to see if it contains illegal dap characters
+   and repair them
+*/
+
+char*
+dap_repairname(char* name)
+{
+    char* newname;
+    char *p, *q; int c;
+
+    if(name == NULL) return NULL;
+    /* assume that dap_badname was called on this name and returned 1 */
+    newname = (char*)malloc(1+(3*strlen(name))); /* max needed */
+    newname[0] = '\0'; /* so we can use strcat */
+    for(p=name,q=newname;(c=*p);p++) {
+        if(strchr(badchars,c) != NULL) {
+            char newchar[8];
+            snprintf(newchar,sizeof(newchar),"%%%hhx",c);
+            strcat(newname,newchar);
+            q += 3; /*strlen(newchar)*/
+        } else
+            *q++ = c;
+	*q = '\0'; /* so we can always do strcat */
+    }
+    *q = '\0'; /* ensure trailing null */
+    return newname;
+}
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/src_netcdf4/daputil.h
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/src_netcdf4/daputil.h	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/src_netcdf4/daputil.h	(revision 1749)
@@ -0,0 +1,86 @@
+/*********************************************************************
+ *   Copyright 1993, UCAR/Unidata
+ *   See netcdf/COPYRIGHT file for copying and redistribution conditions.
+ *   $Header: /upc/share/CVS/netcdf-3/libncdap3/daputil.h,v 1.25 2010/05/05 22:15:16 dmh Exp $
+ *********************************************************************/
+#ifndef DAPUTIL_H
+#define DAPUTIL_H 1
+
+/* Define a set of flags to control path construction */
+#define PATHNC    1 /*Use ->ncname*/
+#define PATHELIDE 2 /*Leave out elided nodes*/
+
+/* mnemonic */
+#define WITHDATASET 1
+#define WITHOUTDATASET 0
+
+/* sigh!, Forwards */
+struct CDFnode;
+struct NCTMODEL;
+struct NCDAPCOMMON;
+
+extern nc_type nctypeconvert(struct NCDAPCOMMON*, nc_type);
+extern nc_type octypetonc(OCtype);
+extern OCtype nctypetodap(nc_type);
+extern size_t nctypesizeof(nc_type);
+extern char* nctypetostring(nc_type);
+extern char* maketmppath(char* path, char* prefix);
+
+extern void collectnodepath3(struct CDFnode*, NClist* path, int dataset);
+extern void collectocpath(OCconnection conn, OCobject node, NClist* path);
+
+extern char* makecdfpathstring3(struct CDFnode*,const char*);
+extern void clonenodenamepath3(struct CDFnode*, NClist*, int);
+extern char* makepathstring3(NClist* path, const char* separator, int flags);
+
+extern char* makeocpathstring3(OCconnection, OCobject, const char*);
+
+extern char* cdflegalname3(char* dapname);
+
+/* Given a param string; return its value or null if not found*/
+extern const char* paramvalue34(struct NCDAPCOMMON* drno, const char* param);
+/* Given a param string; check for a given substring */
+extern int paramcheck34(struct NCDAPCOMMON* drno, const char* param, const char* substring);
+
+extern int nclistconcat(NClist* l1, NClist* l2);
+extern int nclistminus(NClist* l1, NClist* l2);
+extern int nclistdeleteall(NClist* l1, ncelem);
+
+extern char* getvaraprint(void* gv);
+
+extern int dapinsequence(struct CDFnode* node);
+extern int daptopgrid(struct CDFnode* node);
+extern int daptopseq(struct CDFnode* node);
+extern int daptoplevel(struct CDFnode* node);
+extern int dapgridmap(struct CDFnode* node);
+extern int dapgridarray(struct CDFnode* node);
+extern int dapgridelement(struct CDFnode* node);
+
+extern unsigned int modeldecode(int, const char*, const struct NCTMODEL*, unsigned int);
+extern unsigned long getlimitnumber(const char* limit);
+
+extern void dapexpandescapes(char *termstring);
+
+/* Only used by libncdap4 */
+extern int alignbuffer3(NCbytes*, int alignment);
+extern size_t dimproduct3(NClist* dimensions);
+
+#if defined(DLL_NETCDF)
+# if defined(DLL_EXPORT)
+#  define NCC_EXTRA __declspec(dllexport)
+#else
+#  define NCC_EXTRA __declspec(dllimport)
+# endif
+NCC_EXTRA extern int nc__testurl(const char* path, char** basename);
+#else
+extern int nc__testurl(const char* parth, char** basename);
+#endif
+
+
+/* Provide a wrapper for oc_fetch so we can log what it does */
+extern OCerror dap_fetch(struct NCDAPCOMMON*,OCconnection,const char*,OCdxd,OCobject*);
+
+extern int dap_badname(char* name);
+extern char* dap_repairname(char* name);
+
+#endif /*DAPUTIL_H*/
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/src_netcdf4/datt.c
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/src_netcdf4/datt.c	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/src_netcdf4/datt.c	(revision 1749)
@@ -0,0 +1,166 @@
+/** \file
+Attribute functions
+
+These functions read and write attributes.
+
+Copyright 2010 University Corporation for Atmospheric
+Research/Unidata. See \ref copyright file for more info.  */
+
+#include "ncdispatch.h"
+
+/** \defgroup attributes Attributes
+
+Attributes hold metadata about data and files.
+
+\image html ncatts.png "Attributes store metadata."
+
+Attributes may be associated with a netCDF variable to specify such
+properties as units, special values, maximum and minimum valid values,
+scaling factors, and offsets. 
+
+Attributes for a netCDF dataset are defined when the dataset is first
+created, while the netCDF dataset is in define mode. Additional
+attributes may be added later by reentering define mode. 
+
+A netCDF attribute has a netCDF variable to which it is assigned, a
+name, a type, a length, and a sequence of one or more values. 
+
+An attribute is designated by its variable ID and name. When an
+attribute name is not known, it may be designated by its variable ID
+and number in order to determine its name, using the function
+nc_inq_attname().
+
+The attributes associated with a variable are typically defined
+immediately after the variable is created, while still in define
+mode. The data type, length, and value of an attribute may be changed
+even when in data mode, as long as the changed attribute requires no
+more space than the attribute as originally defined.
+
+It is also possible to have attributes that are not associated with
+any variable. These are called global attributes and are identified by
+using ::NC_GLOBAL as a variable pseudo-ID. Global attributes are usually
+related to the netCDF dataset as a whole and may be used for purposes
+such as providing a title or processing history for a netCDF dataset.
+
+Operations supported on attributes are:
+- Create an attribute, given its variable ID, name, data type, length,
+  and value.
+- Get attribute's data type and length from its variable ID and name.
+- Get attribute's value from its variable ID and name.
+- Copy attribute from one netCDF variable to another.
+- Get name of attribute from its number.
+- Rename an attribute.
+- Delete an attribute. 
+*/
+
+/*! \{*/ /* All these functions are part of the above defgroup... */
+
+
+/** \name Deleting and Renaming Attributes
+
+Functions to delete or rename an attribute. */
+/*! \{ */ /* All these functions are part of this named group... */
+
+/*!
+Rename an attribute.
+
+The function nc_rename_att() changes the name of an attribute. If the
+new name is longer than the original name, the netCDF dataset must be
+in define mode. You cannot rename an attribute to have the same name
+as another attribute of the same variable.
+
+\param ncid NetCDF or group ID, from a previous call to nc_open(), 
+nc_create(), nc_def_grp(), or associated inquiry functions such as 
+nc_inq_ncid().
+
+\param varid Variable ID of the attribute's variable, or ::NC_GLOBAL for
+a global attribute.
+
+\param name Attribute \ref object_name. 
+
+\param newname The new attribute \ref object_name. 
+
+<h1>Example</h1>
+
+Here is an example using nc_rename_att() to rename the variable
+attribute units to Units for a variable rh in an existing netCDF
+dataset named foo.nc:
+
+\code
+     #include <netcdf.h>
+        ...
+     int  status;
+     int  ncid;  
+     int  rh_id; 
+        ...
+     status = nc_open("foo.nc", NC_NOWRITE, &ncid);
+     if (status != NC_NOERR) handle_error(status);
+        ...
+     status = nc_inq_varid (ncid, "rh", &rh_id);
+     if (status != NC_NOERR) handle_error(status);
+        ...
+     status = nc_rename_att(ncid, rh_id, "units", "Units");
+     if (status != NC_NOERR) handle_error(status);
+\endcode
+ */
+int
+nc_rename_att(int ncid, int varid, const char *name, const char *newname)
+{
+   NC* ncp;
+   int stat = NC_check_id(ncid, &ncp);
+   if(stat != NC_NOERR) return stat;
+   return ncp->dispatch->rename_att(ncid, varid, name, newname);
+}
+
+/*!
+Delete an attribute.
+
+The function nc_del_att() deletes a netCDF attribute from an open
+netCDF dataset. The netCDF dataset must be in define mode.
+
+\param ncid NetCDF or group ID, from a previous call to nc_open(),
+nc_create(), nc_def_grp(), or associated inquiry functions such as 
+nc_inq_ncid().
+
+\param varid Variable ID of the attribute's variable, or ::NC_GLOBAL
+for a global attribute.
+
+\param name Attribute name. 
+
+<h1>Example</h1>
+
+Here is an example using nc_del_att() to delete the variable attribute
+Units for a variable rh in an existing netCDF dataset named foo.nc:
+
+\code
+     #include <netcdf.h>
+        ...
+     int  status;     
+     int  ncid;      
+     int  rh_id;     
+        ...
+     status = nc_open("foo.nc", NC_WRITE, &ncid);
+     if (status != NC_NOERR) handle_error(status);
+        ...
+     status = nc_inq_varid (ncid, "rh", &rh_id);
+     if (status != NC_NOERR) handle_error(status);
+        ...
+     status = nc_redef(ncid); 
+     if (status != NC_NOERR) handle_error(status);
+     status = nc_del_att(ncid, rh_id, "Units");
+     if (status != NC_NOERR) handle_error(status);
+     status = nc_enddef(ncid);
+     if (status != NC_NOERR) handle_error(status);
+\endcode
+ */
+int
+nc_del_att(int ncid, int varid, const char *name)
+{
+   NC* ncp;
+   int stat = NC_check_id(ncid, &ncp);
+   if(stat != NC_NOERR) return stat;
+   return ncp->dispatch->del_att(ncid, varid, name);
+}
+/*! \} */  /* End of named group ...*/
+
+/*! \} */ /* End of defgroup. */
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/src_netcdf4/dattget.c
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/src_netcdf4/dattget.c	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/src_netcdf4/dattget.c	(revision 1749)
@@ -0,0 +1,256 @@
+/** \file
+Attribute functions
+
+These functions read and write attributes.
+
+Copyright 2010 University Corporation for Atmospheric
+Research/Unidata. See \ref copyright file for more info.  */
+
+#include "ncdispatch.h"
+
+/** \name Getting Attributes
+
+Functions to get the values of attributes.
+ */
+/*! \{ */
+
+/*!
+\ingroup attributes
+Get an attribute of any type.
+
+The nc_get_att() functions works for any type of attribute, and must
+be used to get attributes of user-defined type. We recommend that they
+type safe versions of this function be used where possible.
+
+\param ncid NetCDF or group ID, from a previous call to nc_open(),
+nc_create(), nc_def_grp(), or associated inquiry functions such as 
+nc_inq_ncid().
+
+\param varid Variable ID of the attribute's variable, or ::NC_GLOBAL
+for a global attribute.
+
+\param name Attribute \ref object_name.
+
+\param value Pointer to location for returned attribute value(s). All
+elements of the vector of attribute values are returned, so you must
+allocate enough space to hold them. Before using the value as a C
+string, make sure it is null-terminated. Call nc_inq_attlen() first to
+find out the length of the attribute.
+*/
+int
+nc_get_att(int ncid, int varid, const char *name, void *value)
+{
+   NC* ncp;
+   int stat = NC_NOERR;
+   nc_type xtype;
+
+   if ((stat = NC_check_id(ncid, &ncp)))
+      return stat;
+
+   /* Need to get the type */
+   if ((stat = nc_inq_atttype(ncid, varid, name, &xtype)))
+      return stat;
+
+   return ncp->dispatch->get_att(ncid, varid, name, value, xtype);
+}
+/*! \} */ 
+
+/*!
+\ingroup attributes
+Get an attribute.
+
+This function gets an attribute from the netCDF file. The nc_get_att()
+function works with any type of data, including user defined types.
+
+\note The netCDF library reads all attributes into memory when the
+file is opened with nc_open(). Getting an attribute copies the value
+from the in-memory store, and does not incure any file I/O penalties.
+
+\param ncid NetCDF or group ID, from a previous call to nc_open(),
+nc_create(), nc_def_grp(), or associated inquiry functions such as 
+nc_inq_ncid().
+
+\param varid Variable ID of the attribute's variable, or ::NC_GLOBAL
+for a global attribute.
+
+\param name Attribute \ref object_name.
+
+\param value Pointer to location for returned attribute value(s). All
+elements of the vector of attribute values are returned, so you must
+allocate enough space to hold them. If you don't know how much
+space to reserve, call nc_inq_attlen() first to find out the length of
+the attribute.
+
+<h1>Example</h1>
+
+Here is an example using nc_get_att_double() to determine the values
+of a variable attribute named valid_range for a netCDF variable named
+rh and using nc_get_att_text() to read a global attribute named title
+in an existing netCDF dataset named foo.nc.
+
+In this example, it is assumed that we don't know how many values will
+be returned, but that we do know the types of the attributes. Hence,
+to allocate enough space to store them, we must first inquire about
+the length of the attributes.
+
+\code
+     #include <netcdf.h>
+        ...
+     int  status;         
+     int  ncid;           
+     int  rh_id;          
+     int  vr_len, t_len;  
+     double *vr_val;      
+     char *title;         
+     extern char *malloc()
+     
+        ...
+     status = nc_open("foo.nc", NC_NOWRITE, &ncid);
+     if (status != NC_NOERR) handle_error(status);
+        ...
+     status = nc_inq_varid (ncid, "rh", &rh_id);
+     if (status != NC_NOERR) handle_error(status);
+        ...
+     status = nc_inq_attlen (ncid, rh_id, "valid_range", &vr_len);
+     if (status != NC_NOERR) handle_error(status);
+     status = nc_inq_attlen (ncid, NC_GLOBAL, "title", &t_len);
+     if (status != NC_NOERR) handle_error(status);
+     
+     vr_val = (double *) malloc(vr_len * sizeof(double));
+     title = (char *) malloc(t_len + 1); 
+     
+     status = nc_get_att_double(ncid, rh_id, "valid_range", vr_val);
+     if (status != NC_NOERR) handle_error(status);
+     status = nc_get_att_text(ncid, NC_GLOBAL, "title", title);
+     if (status != NC_NOERR) handle_error(status);
+     title[t_len] = '\0';  
+        ...
+\endcode
+*/
+/*! \{ */
+int
+nc_get_att_text(int ncid, int varid, const char *name, char *value)
+{
+   NC* ncp;
+   int stat = NC_check_id(ncid, &ncp);
+   if(stat != NC_NOERR) return stat;
+   return ncp->dispatch->get_att(ncid, varid, name, (void *)value, NC_CHAR);
+}
+
+int
+nc_get_att_schar(int ncid, int varid, const char *name, signed char *value)
+{
+   NC* ncp;
+   int stat = NC_check_id(ncid, &ncp);
+   if(stat != NC_NOERR) return stat;
+   return ncp->dispatch->get_att(ncid, varid, name, (void *)value, NC_BYTE);
+}
+
+int
+nc_get_att_uchar(int ncid, int varid, const char *name, unsigned char *value)
+{
+   NC* ncp;
+   int stat = NC_check_id(ncid, &ncp);
+   if(stat != NC_NOERR) return stat;
+   return ncp->dispatch->get_att(ncid, varid, name, (void *)value, NC_UBYTE);
+}
+
+int
+nc_get_att_short(int ncid, int varid, const char *name, short *value)
+{
+   NC* ncp;
+   int stat = NC_check_id(ncid, &ncp);
+   if(stat != NC_NOERR) return stat;
+   return ncp->dispatch->get_att(ncid, varid, name, (void *)value, NC_SHORT);
+}
+
+int
+nc_get_att_int(int ncid, int varid, const char *name, int *value)
+{
+   NC* ncp;
+   int stat = NC_check_id(ncid, &ncp);
+   if(stat != NC_NOERR) return stat;
+   return ncp->dispatch->get_att(ncid, varid, name, (void *)value, NC_INT);
+}
+
+int
+nc_get_att_long(int ncid, int varid, const char *name, long *value)
+{
+   NC* ncp;
+   int stat = NC_check_id(ncid, &ncp);
+   if(stat != NC_NOERR) return stat;
+   return ncp->dispatch->get_att(ncid, varid, name, (void *)value, longtype);
+}
+
+int
+nc_get_att_float(int ncid, int varid, const char *name, float *value)
+{
+   NC* ncp;
+   int stat = NC_check_id(ncid, &ncp);
+   if(stat != NC_NOERR) return stat;
+   return ncp->dispatch->get_att(ncid, varid, name, (void *)value, NC_FLOAT);
+}
+
+int
+nc_get_att_double(int ncid, int varid, const char *name, double *value)
+{
+   NC* ncp;
+   int stat = NC_check_id(ncid, &ncp);
+   if(stat != NC_NOERR) return stat;
+   return ncp->dispatch->get_att(ncid, varid, name, (void *)value, NC_DOUBLE);
+}
+
+int
+nc_get_att_ubyte(int ncid, int varid, const char *name, unsigned char *value)
+{
+   NC* ncp;
+   int stat = NC_check_id(ncid, &ncp);
+   if(stat != NC_NOERR) return stat;
+   return ncp->dispatch->get_att(ncid, varid, name, (void *)value, NC_UBYTE);
+}
+
+int
+nc_get_att_ushort(int ncid, int varid, const char *name, unsigned short *value)
+{
+   NC* ncp;
+   int stat = NC_check_id(ncid, &ncp);
+   if(stat != NC_NOERR) return stat;
+   return ncp->dispatch->get_att(ncid, varid, name, (void *)value, NC_USHORT);
+}
+
+int
+nc_get_att_uint(int ncid, int varid, const char *name, unsigned int *value)
+{
+   NC* ncp;
+   int stat = NC_check_id(ncid, &ncp);
+   if(stat != NC_NOERR) return stat;
+   return ncp->dispatch->get_att(ncid, varid, name, (void *)value, NC_UINT);
+}
+
+int
+nc_get_att_longlong(int ncid, int varid, const char *name, long long *value)
+{
+   NC* ncp;
+   int stat = NC_check_id(ncid, &ncp);
+   if(stat != NC_NOERR) return stat;
+   return ncp->dispatch->get_att(ncid, varid, name, (void *)value, NC_INT64);
+}
+
+int
+nc_get_att_ulonglong(int ncid, int varid, const char *name, unsigned long long *value)
+{
+   NC *ncp;
+   int stat = NC_check_id(ncid, &ncp);
+   if(stat != NC_NOERR) return stat;
+   return ncp->dispatch->get_att(ncid, varid, name, (void *)value, NC_UINT64);
+}
+
+int
+nc_get_att_string(int ncid, int varid, const char *name, char **value)
+{
+    NC *ncp;
+    int stat = NC_check_id(ncid, &ncp);
+    if(stat != NC_NOERR) return stat;
+    return ncp->dispatch->get_att(ncid,varid,name,(void*)value, NC_STRING);
+}
+/*! \} */ 
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/src_netcdf4/dattinq.c
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/src_netcdf4/dattinq.c	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/src_netcdf4/dattinq.c	(revision 1749)
@@ -0,0 +1,208 @@
+/** \file
+Attribute inquiry functions
+
+These functions find out about attributes.
+
+Copyright 2011 University Corporation for Atmospheric
+Research/Unidata. See \ref copyright file for more info.  */
+
+#include "ncdispatch.h"
+
+/** \name Learning about Attributes
+
+Functions to learn about the attributes in a file. */
+/*! \{ */ /* All these functions are part of this named group... */
+
+/**
+\ingroup attributes
+Return information about a netCDF attribute.
+
+The function nc_inq_att returns the attribute's type and length.
+
+\param ncid NetCDF or group ID, from a previous call to nc_open(),
+nc_create(), nc_def_grp(), or associated inquiry functions such as 
+nc_inq_ncid().
+
+\param varid Variable ID of the attribute's variable, or ::NC_GLOBAL
+for a global attribute.
+
+\param name Pointer to the location for the returned attribute \ref
+object_name. \ref ignored_if_null.
+
+\param xtypep Pointer to location for returned attribute \ref
+data_type. \ref ignored_if_null.
+
+\param lenp Pointer to location for returned number of values
+currently stored in the attribute. For attributes of type ::NC_CHAR,
+you should not assume that this includes a trailing zero byte; it
+doesn't if the attribute was stored without a trailing zero byte, for
+example from a FORTRAN program. Before using the value as a C string,
+make sure it is null-terminated. \ref ignored_if_null.
+
+\section Example
+
+Here is an example using nc_inq_att() to find out the type and length of
+a variable attribute named valid_range for a netCDF variable named rh
+and a global attribute named title in an existing netCDF dataset named
+foo.nc:
+
+\code
+     #include <netcdf.h>
+        ...
+     int  status;             
+     int  ncid;               
+     int  rh_id;              
+     nc_type vr_type, t_type; 
+     size_t  vr_len, t_len;   
+     
+        ...
+     status = nc_open("foo.nc", NC_NOWRITE, &ncid);
+     if (status != NC_NOERR) handle_error(status);
+        ...
+     status = nc_inq_varid (ncid, "rh", &rh_id);
+     if (status != NC_NOERR) handle_error(status);
+        ...
+     status = nc_inq_att (ncid, rh_id, "valid_range", &vr_type, &vr_len);
+     if (status != NC_NOERR) handle_error(status);
+     status = nc_inq_att (ncid, NC_GLOBAL, "title", &t_type, &t_len);
+     if (status != NC_NOERR) handle_error(status);
+\endcode
+*/
+int
+nc_inq_att(int ncid, int varid, const char *name, nc_type *xtypep, 
+	   size_t *lenp)
+{
+   NC* ncp;
+   int stat = NC_check_id(ncid, &ncp);
+   if(stat != NC_NOERR) return stat;
+   return ncp->dispatch->inq_att(ncid, varid, name, xtypep, lenp);
+}
+
+/**
+\ingroup attributes
+Find an attribute ID.
+
+\param ncid NetCDF or group ID, from a previous call to nc_open(),
+nc_create(), nc_def_grp(), or associated inquiry functions such as 
+nc_inq_ncid().
+
+\param varid Variable ID of the attribute's variable, or ::NC_GLOBAL for
+a global attribute.
+
+\param name Attribute \ref object_name. 
+
+\param idp Pointer to location for returned attribute number that
+specifies which attribute this is for this variable (or which global
+attribute). If you already know the attribute name, knowing its number
+is not very useful, because accessing information about an attribute
+requires its name.
+*/
+int
+nc_inq_attid(int ncid, int varid, const char *name, int *idp)
+{
+   NC* ncp;
+   int stat = NC_check_id(ncid, &ncp);
+   if(stat != NC_NOERR) return stat;
+   return ncp->dispatch->inq_attid(ncid, varid, name, idp);
+}
+
+/**
+\ingroup attributes
+Find the name of an attribute.
+
+\param ncid NetCDF or group ID, from a previous call to nc_open(),
+nc_create(), nc_def_grp(), or associated inquiry functions such as 
+nc_inq_ncid().
+
+\param varid Variable ID of the attribute's variable, or ::NC_GLOBAL
+for a global attribute.
+
+\param attnum Attribute number. The attributes for each variable are
+numbered from 0 (the first attribute) to natts-1, where natts is the
+number of attributes for the variable, as returned from a call to
+nc_inq_varnatts().
+
+\param name Pointer to the location for the returned attribute \ref
+object_name.  
+*/
+int
+nc_inq_attname(int ncid, int varid, int attnum, char *name)
+{
+   NC* ncp;
+   int stat = NC_check_id(ncid, &ncp);
+   if(stat != NC_NOERR) return stat;
+   return ncp->dispatch->inq_attname(ncid, varid, attnum, name);
+}
+
+/**
+\ingroup attributes
+Find number of global or group attributes.
+
+\param ncid NetCDF or group ID, from a previous call to nc_open(),
+nc_create(), nc_def_grp(), or associated inquiry functions such as 
+nc_inq_ncid().
+
+\param nattsp Pointer where number of global or group attributes will be
+written. \ref ignored_if_null.
+*/
+int
+nc_inq_natts(int ncid, int *nattsp)
+{
+   NC* ncp;
+   int stat = NC_check_id(ncid, &ncp);
+   if(stat != NC_NOERR) return stat;
+   if(nattsp == NULL) return NC_NOERR;
+   return ncp->dispatch->inq(ncid, NULL, NULL, nattsp, NULL);
+}
+
+/**
+\ingroup attributes
+Find the type of an attribute.
+
+\param ncid NetCDF or group ID, from a previous call to nc_open(),
+nc_create(), nc_def_grp(), or associated inquiry functions such as 
+nc_inq_ncid().
+
+\param varid Variable ID of the attribute's variable, or ::NC_GLOBAL
+for a global or group attribute.
+
+\param name Attribute \ref object_name. 
+
+\param xtypep Pointer to location for returned attribute \ref data_type.
+*/
+int
+nc_inq_atttype(int ncid, int varid, const char *name, nc_type *xtypep)
+{
+   NC* ncp;
+   int stat = NC_check_id(ncid, &ncp);
+   if(stat != NC_NOERR) return stat;
+   return ncp->dispatch->inq_att(ncid, varid, name, xtypep, NULL);
+}
+
+/**
+\ingroup attributes
+Find the length of an attribute.
+
+\param ncid NetCDF or group ID, from a previous call to nc_open(),
+nc_create(), nc_def_grp(), or associated inquiry functions such as 
+nc_inq_ncid().
+
+\param varid Variable ID of the attribute's variable, or ::NC_GLOBAL
+for a global or group attribute.
+
+\param name Attribute \ref object_name. 
+
+\param lenp Pointer to location for returned number of values
+currently stored in the attribute. Before using the value as a C
+string, make sure it is null-terminated. \ref ignored_if_null.  
+*/
+int
+nc_inq_attlen(int ncid, int varid, const char *name, size_t *lenp)
+{
+   NC* ncp;
+   int stat = NC_check_id(ncid, &ncp);
+   if(stat != NC_NOERR) return stat;
+   return ncp->dispatch->inq_att(ncid, varid, name, NULL, lenp);
+}
+
+/*! \} */  /* End of named group ...*/
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/src_netcdf4/dattput.c
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/src_netcdf4/dattput.c	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/src_netcdf4/dattput.c	(revision 1749)
@@ -0,0 +1,366 @@
+/** \file
+Functions to write attributes.
+
+These functions read and write attributes.
+
+Copyright 2010 University Corporation for Atmospheric
+Research/Unidata. See \ref copyright file for more info.  */
+
+#include "ncdispatch.h"
+
+/** \name Writing Attributes
+
+Functions to write attributes. */
+/*! \{ */
+
+/*!
+\ingroup attributes
+Write a string attribute.
+
+The function nc_put_att_string adds or changes a variable attribute or
+global attribute of an open netCDF dataset. The string type is only
+available in netCDF-4/HDF5 files, when ::NC_CLASSIC_MODEL has not been
+used in nc_create().
+
+\param ncid NetCDF or group ID, from a previous call to nc_open(),
+nc_create(), nc_def_grp(), or associated inquiry functions such as 
+nc_inq_ncid().
+
+\param varid Variable ID of the variable to which the attribute will
+be assigned or ::NC_GLOBAL for a global or group attribute.
+
+\param name Attribute \ref object_name. \ref attribute_conventions may
+apply.
+
+\param len Number of values provided for the attribute.
+
+\param value Pointer to one or more values.
+
+\returns ::NC_NOERR No error.
+\returns ::NC_EINVAL Trying to set global _FillValue.
+\returns ::NC_ENOTVAR Couldn't find varid.
+\returns ::NC_EBADTYPE Fill value and var must be same type.
+\returns ::NC_ENOMEM Out of memory
+\returns ::NC_ELATEFILL Fill values must be written while the file
+is still in initial define mode.
+*/
+int
+nc_put_att_string(int ncid, int varid, const char *name,
+		  size_t len, const char** value)
+{
+    NC* ncp;
+    int stat = NC_check_id(ncid, &ncp);
+    if(stat != NC_NOERR) return stat;
+    return ncp->dispatch->put_att(ncid, varid, name, NC_STRING, 
+				  len, (void*)value, NC_STRING);
+}
+
+/*!
+\ingroup attributes
+Write a text attribute.
+
+Add or change a text attribute. If this attribute is new,
+or if the space required to store the attribute is greater than
+before, the netCDF dataset must be in define mode.  
+
+Although it's possible to create attributes of all types, text and
+double attributes are adequate for most purposes.
+
+Use the nc_put_att function to create attributes of any type,
+including user-defined types. We recommend using the type safe
+versions of this function whenever possible.
+
+\param ncid NetCDF or group ID, from a previous call to nc_open(),
+nc_create(), nc_def_grp(), or associated inquiry functions such as 
+nc_inq_ncid().
+
+\param varid Variable ID of the variable to which the attribute will
+be assigned or ::NC_GLOBAL for a global attribute.
+
+\param name Attribute \ref object_name. \ref attribute_conventions may
+apply.
+
+\param len Number of values provided for the attribute.
+
+\param value Pointer to one or more values.
+
+\returns ::NC_NOERR No error.
+\returns ::NC_EINVAL Trying to set global _FillValue. 
+\returns ::NC_ENOTVAR Couldn't find varid.
+\returns ::NC_EBADTYPE Fill value and var must be same type.
+\returns ::NC_ENOMEM Out of memory
+\returns ::NC_ELATEFILL Fill values must be written while the file
+is still in initial define mode.
+
+\note With netCDF-4 files, nc_put_att will notice if you are writing a
+_Fill_Value_ attribute, and will tell the HDF5 layer to use the
+specified fill value for that variable.
+
+\section Example
+
+Here is an example using nc_put_att_double() to add a variable
+attribute named valid_range for a netCDF variable named rh and
+nc_put_att_text() to add a global attribute named title to an existing
+netCDF dataset named foo.nc:
+
+\code
+     #include <netcdf.h>
+        ...
+     int  status;        
+     int  ncid;          
+     int  rh_id;         
+     static double rh_range[] = {0.0, 100.0};
+     static char title[] = "example netCDF dataset";
+        ...
+     status = nc_open("foo.nc", NC_WRITE, &ncid);
+     if (status != NC_NOERR) handle_error(status);
+        ...
+     status = nc_redef(ncid);                
+     if (status != NC_NOERR) handle_error(status);
+     status = nc_inq_varid (ncid, "rh", &rh_id);
+     if (status != NC_NOERR) handle_error(status);
+        ...
+     status = nc_put_att_double (ncid, rh_id, "valid_range",
+                                 NC_DOUBLE, 2, rh_range);
+     if (status != NC_NOERR) handle_error(status);
+     status = nc_put_att_text (ncid, NC_GLOBAL, "title",
+                               strlen(title), title)
+     if (status != NC_NOERR) handle_error(status);
+        ...
+     status = nc_enddef(ncid);               
+     if (status != NC_NOERR) handle_error(status);
+\endcode
+*/
+int
+nc_put_att_text(int ncid, int varid, const char *name,
+		size_t len, const char *value)
+{
+   NC* ncp;
+   int stat = NC_check_id(ncid, &ncp);
+   if(stat != NC_NOERR) return stat;
+   return ncp->dispatch->put_att(ncid, varid, name, NC_CHAR, len, 
+				 (void *)value, NC_CHAR);
+}
+
+/*! \} */ 
+/*!
+\ingroup attributes
+Write an attribute.
+
+The function nc_put_att_ type adds or changes a variable attribute or
+global attribute of an open netCDF dataset. If this attribute is new,
+or if the space required to store the attribute is greater than
+before, the netCDF dataset must be in define mode.  
+
+With netCDF-4 files, nc_put_att will notice if you are writing a
+_Fill_Value_ attribute, and will tell the HDF5 layer to use the
+specified fill value for that variable.
+
+Although it's possible to create attributes of all types, text and
+double attributes are adequate for most purposes.
+
+\param ncid NetCDF or group ID, from a previous call to nc_open(),
+nc_create(), nc_def_grp(), or associated inquiry functions such as 
+nc_inq_ncid().
+
+\param varid Variable ID of the variable to which the attribute will
+be assigned or ::NC_GLOBAL for a global or group attribute.
+
+\param name Attribute \ref object_name. \ref attribute_conventions may
+apply.
+
+\param xtype \ref data_type of the attribute.
+
+\param len Number of values provided for the attribute.
+
+\param value Pointer to one or more values.
+
+\returns ::NC_NOERR No error.
+\returns ::NC_EINVAL Trying to set global _FillValue.
+\returns ::NC_ENOTVAR Couldn't find varid.
+\returns ::NC_EBADTYPE Fill value and var must be same type.
+\returns ::NC_ENOMEM Out of memory
+\returns ::NC_ELATEFILL Fill values must be written while the file
+is still in initial define mode.
+
+\section Example
+
+Here is an example using nc_put_att_double() to add a variable
+attribute named valid_range for a netCDF variable named rh and
+nc_put_att_text() to add a global attribute named title to an existing
+netCDF dataset named foo.nc:
+
+\code
+     #include <netcdf.h>
+        ...
+     int  status;        
+     int  ncid;          
+     int  rh_id;         
+     static double rh_range[] = {0.0, 100.0};
+     static char title[] = "example netCDF dataset";
+        ...
+     status = nc_open("foo.nc", NC_WRITE, &ncid);
+     if (status != NC_NOERR) handle_error(status);
+        ...
+     status = nc_redef(ncid);                
+     if (status != NC_NOERR) handle_error(status);
+     status = nc_inq_varid (ncid, "rh", &rh_id);
+     if (status != NC_NOERR) handle_error(status);
+        ...
+     status = nc_put_att_double (ncid, rh_id, "valid_range",
+                                 NC_DOUBLE, 2, rh_range);
+     if (status != NC_NOERR) handle_error(status);
+     status = nc_put_att_text (ncid, NC_GLOBAL, "title",
+                               strlen(title), title)
+     if (status != NC_NOERR) handle_error(status);
+        ...
+     status = nc_enddef(ncid);               
+     if (status != NC_NOERR) handle_error(status);
+\endcode
+*/
+/*! \{*/
+int
+nc_put_att(int ncid, int varid, const char *name, nc_type xtype,
+	   size_t len, const void *value)
+{
+   NC* ncp;
+   int stat = NC_check_id(ncid, &ncp);
+   if(stat != NC_NOERR) return stat;
+   return ncp->dispatch->put_att(ncid, varid, name, xtype, len, 
+				 value, xtype);
+}
+
+int
+nc_put_att_schar(int ncid, int varid, const char *name,
+		 nc_type xtype, size_t len, const signed char *value)
+{
+   NC *ncp;
+   int stat = NC_check_id(ncid, &ncp);
+   if(stat != NC_NOERR) return stat;
+   return ncp->dispatch->put_att(ncid, varid, name, xtype, len, 
+				 (void *)value, NC_BYTE);
+}
+
+int
+nc_put_att_uchar(int ncid, int varid, const char *name,
+		 nc_type xtype, size_t len, const unsigned char *value)
+{
+   NC* ncp;
+   int stat = NC_check_id(ncid, &ncp);
+   if(stat != NC_NOERR) return stat;
+   return ncp->dispatch->put_att(ncid, varid, name, xtype, len,
+				 (void *)value, NC_UBYTE);
+}
+
+int
+nc_put_att_short(int ncid, int varid, const char *name,
+		 nc_type xtype, size_t len, const short *value)
+{
+   NC* ncp;
+   int stat = NC_check_id(ncid, &ncp);
+   if(stat != NC_NOERR) return stat;
+   return ncp->dispatch->put_att(ncid, varid, name, xtype, len, 
+				 (void *)value, NC_SHORT);
+}
+
+int
+nc_put_att_int(int ncid, int varid, const char *name,
+	       nc_type xtype, size_t len, const int *value)
+{
+   NC* ncp;
+   int stat = NC_check_id(ncid, &ncp);
+   if(stat != NC_NOERR) return stat;
+   return ncp->dispatch->put_att(ncid, varid, name, xtype, len,
+				 (void *)value, NC_INT);
+}
+
+int
+nc_put_att_long(int ncid, int varid, const char *name,
+		nc_type xtype, size_t len, const long *value)
+{
+   NC* ncp;
+   int stat = NC_check_id(ncid, &ncp);
+   if(stat != NC_NOERR) return stat;
+   return ncp->dispatch->put_att(ncid, varid, name, xtype, len,
+				 (void *)value, longtype);
+}
+
+int
+nc_put_att_float(int ncid, int varid, const char *name,
+		 nc_type xtype, size_t len, const float *value)
+{
+   NC* ncp;
+   int stat = NC_check_id(ncid, &ncp);
+   if(stat != NC_NOERR) return stat;
+   return ncp->dispatch->put_att(ncid, varid, name, xtype, len,
+				 (void *)value, NC_FLOAT);
+}
+
+int
+nc_put_att_double(int ncid, int varid, const char *name,
+		  nc_type xtype, size_t len, const double *value)
+{
+   NC* ncp;
+   int stat = NC_check_id(ncid, &ncp);
+   if(stat != NC_NOERR) return stat;
+   return ncp->dispatch->put_att(ncid, varid, name, xtype, len,
+				 (void *)value, NC_DOUBLE);
+}
+
+int
+nc_put_att_ubyte(int ncid, int varid, const char *name,
+		 nc_type xtype, size_t len, const unsigned char *value)
+{
+   NC* ncp;
+   int stat = NC_check_id(ncid, &ncp);
+   if(stat != NC_NOERR) return stat;
+   return ncp->dispatch->put_att(ncid, varid, name, xtype, len,
+				 (void *)value, NC_UBYTE);
+}
+
+int
+nc_put_att_ushort(int ncid, int varid, const char *name,
+		  nc_type xtype, size_t len, const unsigned short *value)
+{
+   NC* ncp;
+   int stat = NC_check_id(ncid, &ncp);
+   if(stat != NC_NOERR) return stat;
+   return ncp->dispatch->put_att(ncid, varid, name, xtype, len,
+				 (void *)value, NC_USHORT);
+}
+
+int
+nc_put_att_uint(int ncid, int varid, const char *name,
+		nc_type xtype, size_t len, const unsigned int *value)
+{
+   NC* ncp;
+   int stat = NC_check_id(ncid, &ncp);
+   if(stat != NC_NOERR) return stat;
+   return ncp->dispatch->put_att(ncid, varid, name, xtype, len,
+				 (void *)value, NC_UINT);
+}
+
+int
+nc_put_att_longlong(int ncid, int varid, const char *name,
+		    nc_type xtype, size_t len, 
+		    const long long *value)
+{
+   NC* ncp;
+   int stat = NC_check_id(ncid, &ncp);
+   if(stat != NC_NOERR) return stat;
+   return ncp->dispatch->put_att(ncid, varid, name, xtype, len,
+				 (void *)value, NC_INT64);
+}
+
+int
+nc_put_att_ulonglong(int ncid, int varid, const char *name,
+		     nc_type xtype, size_t len, 
+		     const unsigned long long *value)
+{
+   NC* ncp;
+   int stat = NC_check_id(ncid, &ncp);
+   if(stat != NC_NOERR) return stat;
+   return ncp->dispatch->put_att(ncid, varid, name, xtype, len,
+				 (void *)value, NC_UINT64);
+}
+
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/src_netcdf4/dceconstraints.c
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/src_netcdf4/dceconstraints.c	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/src_netcdf4/dceconstraints.c	(revision 1749)
@@ -0,0 +1,866 @@
+/*********************************************************************
+ *   Copyright 1993, UCAR/Unidata
+ *   See netcdf/COPYRIGHT file for copying and redistribution conditions.
+ *   $Header: /upc/share/CVS/netcdf-3/libncdap3/constraints3.c,v 1.40 2010/05/27 21:34:07 dmh Exp $
+ *********************************************************************/
+
+#include "config.h"
+
+#include <stdlib.h>
+#include <stdio.h>
+#include <string.h>
+#include <assert.h>
+
+#include "nclist.h"
+#include "ncbytes.h"
+#include "nclog.h"
+
+#include "netcdf.h"
+#include "dceconstraints.h"
+#include "dapdebug.h"
+#include "dceparselex.h"
+
+#define DEBUG
+
+int dceverbose = 0;
+
+static char* opstrings[] = OPSTRINGS ;
+
+static void ceallnodesr(DCEnode* node, NClist* allnodes, CEsort which);
+
+/* Parse incoming url constraints, if any,
+   to check for syntactic correctness
+*/ 
+int
+dapparseconstraints(char* constraints, DCEconstraint* dapconstraint)
+{
+    int ncstat = NC_NOERR;
+    char* errmsg;
+
+    assert(dapconstraint != NULL);
+    nclistclear(dapconstraint->projections);
+    nclistclear(dapconstraint->selections);
+
+    ncstat = dapceparse(constraints,dapconstraint,&errmsg);
+    if(ncstat) {
+	nclog(NCLOGWARN,"DAP constraint parse failure: %s",errmsg);
+	if(errmsg) free(errmsg);
+        nclistclear(dapconstraint->projections);
+        nclistclear(dapconstraint->selections);
+    }
+
+#ifdef DEBUG
+fprintf(stderr,"constraint: %s",dcetostring((DCEnode*)dapconstraint));
+#endif
+    return ncstat;
+}
+
+/* Worksheet
+
+mg.st = md.st * ms.st
+mg.f  = md.f+(ms.f*md.st)
+mg.l  = ((ms.l-1) / ms.st) * mg.st + 1
+mg.p  = mg.f + mg.l
+mg.c  = mg.l / mg.st
+
+0000000000111111111122222222223
+0123456789012345678901234567890
+          xxxxxx
+                xxxxxx
+ 0  1  2  3  4  5  6  7  8        md=(st=3 f=1 l=25 p=26)
+          0     1     2           ms=(st=2 f=3 l=5  p=8 )
+		                  ----------------------------
+                                  mg=(st=6 f=10 p=23 l=13)
+c = 4 / 2 = 2
+l = 2 * 6 + 1 = 13
+
+0000000000111111
+0123456789012345
+ 0 1 2 3 4                md=(st=2 f=1 l=9 p=10)
+     0 1 2                ms=(st=1 f=2 l=3 p=5)
+                          ----------------------------
+                          mg=(st=2 f=5 p=10 l=5 )
+c = 2/1 = 2
+l = 2 * 2 + 1 = 13
+
+0000000000111111111
+0123456789012345678
+ 0 1 2 3 4 5 6 7 8        md=(st=2 f=1 l=17 p=18)
+       0   1   2          ms=(st=2 f=3 l=5 p=8)
+		          ----------------------------
+                          mg=(st=4 f=7 p=16 l=9 )
+c = 4/2 = 2
+l = 2 * 4 + 1 = 9
+
+0000000000111111111
+0123456789012345678
+ 0 1 2 3 4                md=(st=2 f=1 l=9 p=10)
+ 0 1 2 3 4                ms=(st=1 f=0 l=5 p=5)
+		          ----------------------------
+                          mg=(st=2 f=1 p=10 l=9 )
+c = 4/1 = 4
+l = 4 * 2 + 1 = 9
+
+00000
+01234
+01                        md=(st=1 f=0 l=2 p=2)
+0                         ms=(st=1 f=0 l=1 p=1)
+		          ----------------------------
+                          mg=(st=1 f=0 p=1 l=1 )
+c = 0/1 = 0
+l = 0 * 1 + 1 = 1
+
+000000000011
+012345678901
+012                       md=(st=1 f=0 l=3 p=3)
+012                       ms=(st=1 f=0 l=3 p=2)
+		          ----------------------------
+                          mg=(st=1 f=0 p=3 l=3 )
+c = 2/1 = 2
+l = 2 * 1 + 1 = 3
+
+*/
+
+/* Merge slice src into slice dst; dst != src */
+
+int
+dceslicemerge(DCEslice* dst, DCEslice* src)
+{
+    int err = NC_NOERR;
+    DCEslice tmp;
+
+    tmp.node.sort = CES_SLICE;
+    tmp.stride    = (dst->stride * src->stride);
+    tmp.first     = (dst->first+((src->first)*(dst->stride)));
+    tmp.length    = (((src->length - 1) / src->stride) * tmp.stride) + 1;
+    tmp.stop      = tmp.first + tmp.length;
+    tmp.count     = tmp.length / tmp.stride;
+    /* use max declsize */
+    if(dst->declsize > src->declsize) {
+        tmp.declsize  = dst->declsize;
+    } else {
+        tmp.declsize  = src->declsize;
+    }
+    if(tmp.length % tmp.stride != 0) tmp.count++;
+    if(tmp.first >= dst->stop || tmp.stop > dst->stop)
+	err = NC_EINVALCOORDS;
+    else
+	*dst = tmp;
+    return err;
+}
+
+
+/*
+Given two projection lists, merge
+src into dst taking
+overlapping projections into acct.
+*/
+int
+dcemergeprojectionlists(NClist* dst, NClist* src)
+{
+    int i;
+    NClist* cat = nclistnew();
+    int ncstat = NC_NOERR;
+
+#ifdef DEBUG
+fprintf(stderr,"dapmergeprojection: dst = %s\n",dcetostring((DCEnode*)dst));
+fprintf(stderr,"dapmergeprojection: src = %s\n",dcetostring((DCEnode*)src));
+#endif
+
+    /* get dst concat clone(src) */
+    nclistsetalloc(cat,nclistlength(dst)+nclistlength(src));
+    for(i=0;i<nclistlength(dst);i++) {
+	DCEprojection* p = (DCEprojection*)nclistget(dst,i);
+	nclistpush(cat,(ncelem)p);
+    }    
+    for(i=0;i<nclistlength(src);i++) {
+	DCEprojection* p = (DCEprojection*)nclistget(src,i);
+	nclistpush(cat,(ncelem)dceclone((DCEnode*)p));
+    }    
+
+    nclistclear(dst);
+
+    /* Repeatedly pull elements from the concat,
+       merge with all duplicates, and stick into
+       the dst
+    */
+    while(nclistlength(cat) > 0) {
+	DCEprojection* target = (DCEprojection*)nclistremove(cat,0);
+	if(target == NULL) continue;
+        if(target->discrim != CES_VAR) continue;
+        for(i=0;i<nclistlength(cat);i++) {
+	    DCEprojection* p2 = (DCEprojection*)nclistget(cat,i);
+	    if(p2 == NULL) continue;
+	    if(p2->discrim != CES_VAR) continue;
+	    if(dcesamepath(target->var->segments,
+			   p2->var->segments)!=0) continue;
+	    /* This entry matches our current target; merge  */
+	    ncstat = dcemergeprojections(target,p2);
+	    /* null out this merged entry and release it */
+	    nclistset(cat,i,(ncelem)NULL);	    
+	    dcefree((DCEnode*)p2);	    
+	}		    
+	/* Capture the clone */
+	nclistpush(dst,(ncelem)target);
+    }	    
+    nclistfree(cat);
+    return ncstat;
+}
+
+/* Modify merged projection to include "addition" projection */
+int
+dcemergeprojections(DCEprojection* merged, DCEprojection* addition)
+{
+    int ncstat = NC_NOERR;
+    int i,j;
+
+    ASSERT((merged->discrim == CES_VAR && addition->discrim == CES_VAR));
+    ASSERT((nclistlength(merged->var->segments) == nclistlength(addition->var->segments)));    
+    for(i=0;i<nclistlength(merged->var->segments);i++) {
+	DCEsegment* mergedseg = (DCEsegment*)nclistget(merged->var->segments,i);
+	DCEsegment* addedseg = (DCEsegment*)nclistget(addition->var->segments,i);
+	/* If one segment has larger rank, then copy the extra slices unchanged */
+	for(j=0;j<addedseg->rank;j++) {
+	    if(j < mergedseg->rank)
+	        dceslicemerge(mergedseg->slices+j,addedseg->slices+j);
+	    else
+		mergedseg->slices[j] = addedseg->slices[j];
+	}
+	if(addedseg->rank > mergedseg->rank)
+	    mergedseg->rank = addedseg->rank;
+    }
+    return ncstat;
+}
+
+/* Convert a DCEprojection instance into a string
+   that can be used with the url
+*/
+
+char*
+buildprojectionstring(NClist* projections)
+{
+    char* pstring;
+    NCbytes* buf = ncbytesnew();
+    dcelisttobuffer(projections,buf,",");
+    pstring = ncbytesdup(buf);
+    ncbytesfree(buf);
+    return pstring;
+}
+
+char*
+buildselectionstring(NClist* selections)
+{
+    NCbytes* buf = ncbytesnew();
+    char* sstring;
+    dcelisttobuffer(selections,buf,",");
+    sstring = ncbytesdup(buf);
+    ncbytesfree(buf);
+    return sstring;
+}
+
+char*
+buildconstraintstring(DCEconstraint* constraints)
+{
+    NCbytes* buf = ncbytesnew();
+    char* result = NULL;
+    dcetobuffer((DCEnode*)constraints,buf);
+    result = ncbytesdup(buf);
+    ncbytesfree(buf);
+    return result;
+}
+
+DCEnode*
+dceclone(DCEnode* node)
+{
+    DCEnode* result = NULL;
+
+    result = (DCEnode*)dcecreate(node->sort);
+    if(result == NULL) goto done;
+
+    switch (node->sort) {
+
+    case CES_SLICE: {
+	DCEslice* clone = (DCEslice*)result;
+	DCEslice* orig = (DCEslice*)node;
+	*clone = *orig;
+    } break;
+
+    case CES_SEGMENT: {
+	DCEsegment* clone = (DCEsegment*)result;
+	DCEsegment* orig = (DCEsegment*)node;
+	*clone = *orig;	
+        clone->name = nulldup(orig->name);
+	if(orig->rank > 0)
+	    memcpy(clone->slices,orig->slices,orig->rank*sizeof(DCEslice));
+    } break;
+
+    case CES_VAR: {
+	DCEvar* clone = (DCEvar*)result;
+	DCEvar* orig = (DCEvar*)node;
+	*clone = *orig;
+	clone->segments = dceclonelist(clone->segments);
+    } break;
+
+    case CES_FCN: {
+	DCEfcn* clone = (DCEfcn*)result;
+	DCEfcn* orig = (DCEfcn*)node;
+	*clone = *orig;
+        clone->name = nulldup(orig->name);
+	clone->args = dceclonelist(orig->args);
+    } break;
+
+    case CES_CONST: {
+	DCEconstant* clone = (DCEconstant*)result;
+	DCEconstant* orig = (DCEconstant*)node;
+	*clone = *orig;
+        if(clone->discrim ==  CES_STR)
+	    clone->text = nulldup(clone->text);
+    } break;
+
+    case CES_VALUE: {
+	DCEvalue* clone = (DCEvalue*)result;
+	DCEvalue* orig = (DCEvalue*)node;
+	*clone = *orig;
+        switch (clone->discrim) {
+        case CES_CONST:
+	    clone->constant = (DCEconstant*)dceclone((DCEnode*)orig->constant); break;
+        case CES_VAR:
+	    clone->var = (DCEvar*)dceclone((DCEnode*)orig->var); break;
+        case CES_FCN:
+	    clone->fcn = (DCEfcn*)dceclone((DCEnode*)orig->fcn); break;
+        default: assert(0);
+        }
+    } break;
+
+    case CES_PROJECT: {
+	DCEprojection* clone = (DCEprojection*)result;
+	DCEprojection* orig = (DCEprojection*)node;
+	*clone = *orig;	
+	switch (orig->discrim) {
+	case CES_VAR:
+            clone->var = (DCEvar*)dceclone((DCEnode*)orig->var); break;
+	case CES_FCN:
+            clone->fcn = (DCEfcn*)dceclone((DCEnode*)orig->fcn); break;
+	default: assert(0);
+	}
+    } break;
+
+    case CES_SELECT: {
+	DCEselection* clone = (DCEselection*)result;
+	DCEselection* orig = (DCEselection*)node;
+	*clone = *orig;	
+	clone->lhs = (DCEvalue*)dceclone((DCEnode*)orig->lhs);
+	clone->rhs = dceclonelist(orig->rhs);
+    } break;
+
+    case CES_CONSTRAINT: {
+	DCEconstraint* clone = (DCEconstraint*)result;
+	DCEconstraint* orig = (DCEconstraint*)node;
+	*clone = *orig;	
+	clone->projections = dceclonelist(orig->projections);	
+	clone->selections = dceclonelist(orig->selections);
+    } break;
+
+    default:
+	assert(0);
+    }
+
+done:
+    return result;
+}
+
+NClist*
+dceclonelist(NClist* list)
+{
+    int i;
+    NClist* clone;
+    if(list == NULL) return NULL;
+    clone = nclistnew();
+    for(i=0;i<nclistlength(list);i++) {
+	DCEnode* node = (DCEnode*)nclistget(list,i);
+	DCEnode* newnode = dceclone((DCEnode*)node);
+	nclistpush(clone,(ncelem)newnode);
+    }
+    return clone;
+}
+
+void
+dcefree(DCEnode* node)
+{
+    if(node == NULL) return;
+
+    switch (node->sort) {
+
+    case CES_VAR: {
+	DCEvar* target = (DCEvar*)node;
+	dcefreelist(target->segments);	
+    } break;
+
+    case CES_FCN: {
+	DCEfcn* target = (DCEfcn*)node;
+	dcefreelist(target->args);	
+        nullfree(target->name);
+    } break;
+
+    case CES_CONST: {
+	DCEconstant* target = (DCEconstant*)node;
+	if(target->discrim == CES_STR)
+	    nullfree(target->text);
+    } break;
+
+    case CES_VALUE: {
+	DCEvalue* target = (DCEvalue*)node;
+	switch(target->discrim) {
+        case CES_CONST: dcefree((DCEnode*)target->constant); break;    
+        case CES_VAR: dcefree((DCEnode*)target->var); break;    
+        case CES_FCN: dcefree((DCEnode*)target->fcn); break;    
+        default: assert(0);
+        }
+    } break;
+
+    case CES_PROJECT: {
+	DCEprojection* target = (DCEprojection*)node;
+	switch (target->discrim) {
+	case CES_VAR: dcefree((DCEnode*)target->var); break;
+	case CES_FCN: dcefree((DCEnode*)target->fcn); break;
+	default: assert(0);
+	}
+    } break;
+
+    case CES_SELECT: {
+	DCEselection* target = (DCEselection*)node;
+	dcefreelist(target->rhs);
+	dcefree((DCEnode*)target->lhs);
+    } break;
+
+    case CES_CONSTRAINT: {
+	DCEconstraint* target = (DCEconstraint*)node;
+	dcefreelist(target->projections);
+	dcefreelist(target->selections);
+    } break;
+
+    case CES_SEGMENT: {
+	DCEsegment* target = (DCEsegment*)node;
+	target->rank = 0;
+        nullfree(target->name);
+    } break;
+
+    case CES_SLICE: {
+    } break;
+
+    default:
+	assert(0);
+    }
+
+    /* final action */
+    free(node);
+}
+
+void
+dcefreelist(NClist* list)
+{
+    int i;
+    if(list == NULL) return;
+    for(i=0;i<nclistlength(list);i++) {
+	DCEnode* node = (DCEnode*)nclistget(list,i);
+	dcefree((DCEnode*)node);
+    }
+    nclistfree(list);
+}
+
+char*
+dcetostring(DCEnode* node)
+{
+    char* s;
+    NCbytes* buf = ncbytesnew();
+    dcetobuffer(node,buf);
+    s = ncbytesextract(buf);
+    ncbytesfree(buf);
+    return s;
+}
+
+/* For debugging */
+#ifdef DEBUG
+static char*
+dimdecl(size_t declsize)
+{
+    static char tag[16];
+    tag[0] = '\0';
+    if(dceverbose) 
+        snprintf(tag,sizeof(tag),"/%lu",(unsigned long)declsize);
+    return tag;
+}
+#else
+static char*
+dimdecl(size_t declsize)
+{
+    return "";
+}
+#endif
+
+void
+dcetobuffer(DCEnode* node, NCbytes* buf)
+{
+    int i;
+    char tmp[1024];
+
+    if(buf == NULL) return;
+    if(node == NULL) {ncbytescat(buf,"<null>"); return;}
+
+    switch (node->sort) {
+
+    case CES_SLICE: {
+	    DCEslice* slice = (DCEslice*)node;
+	    size_t last = (slice->first+slice->length)-1;
+            if(slice->count == 1) {
+                snprintf(tmp,sizeof(tmp),"[%lu%s]",
+	            (unsigned long)slice->first,dimdecl(slice->declsize));
+            } else if(slice->stride == 1) {
+                snprintf(tmp,sizeof(tmp),"[%lu:%lu%s]",
+	            (unsigned long)slice->first,
+	            (unsigned long)last,
+	            dimdecl(slice->declsize));
+            } else {
+	        snprintf(tmp,sizeof(tmp),"[%lu:%lu:%lu%s]",
+		    (unsigned long)slice->first,
+		    (unsigned long)slice->stride,
+		    (unsigned long)last,
+	            dimdecl(slice->declsize));
+	    }
+            ncbytescat(buf,tmp);
+    } break;
+
+    case CES_SEGMENT: {
+	DCEsegment* segment = (DCEsegment*)node;
+        int rank = segment->rank;
+	char* name = (segment->name?segment->name:"<unknown>");
+	name = nulldup(name);
+	ncbytescat(buf,name);
+	nullfree(name);
+        if(dceverbose && dceiswholesegment(segment))
+	    ncbytescat(buf,"*");
+        if(dceverbose || !dceiswholesegment(segment)) {
+            for(i=0;i<rank;i++) {
+	        DCEslice* slice = segment->slices+i;
+                dcetobuffer((DCEnode*)slice,buf);
+	    }
+	}
+    } break;
+
+    case CES_VAR: {
+	DCEvar* var = (DCEvar*)node;
+	dcelisttobuffer(var->segments,buf,".");
+    } break;
+
+    case CES_FCN: {
+	DCEfcn* fcn = (DCEfcn*)node;
+        ncbytescat(buf,fcn->name);
+        ncbytescat(buf,"(");
+	dcelisttobuffer(fcn->args,buf,",");
+        ncbytescat(buf,")");
+    } break;
+
+    case CES_CONST: {
+	DCEconstant* value = (DCEconstant*)node;
+        switch (value->discrim) {
+        case CES_STR:
+	    ncbytescat(buf,value->text);
+	    break;		
+        case CES_INT:
+            snprintf(tmp,sizeof(tmp),"%lld",value->intvalue);
+            ncbytescat(buf,tmp);
+    	break;
+        case CES_FLOAT:
+            snprintf(tmp,sizeof(tmp),"%g",value->floatvalue);
+            ncbytescat(buf,tmp);
+	    break;
+        default: assert(0);
+	}
+    } break;
+
+    case CES_VALUE: {
+	DCEvalue* value = (DCEvalue*)node;
+        switch (value->discrim) {
+        case CES_CONST:
+    	    dcetobuffer((DCEnode*)value->constant,buf);
+      	    break;		
+        case CES_VAR:
+    	    dcetobuffer((DCEnode*)value->var,buf);
+    	    break;
+        case CES_FCN:
+    	    dcetobuffer((DCEnode*)value->fcn,buf);
+    	    break;
+        default: assert(0);
+        }
+    } break;
+
+    case CES_PROJECT: {
+	DCEprojection* target = (DCEprojection*)node;
+	switch (target->discrim) {
+	case CES_VAR:
+	    dcetobuffer((DCEnode*)target->var,buf);
+	    break;
+	case CES_FCN: dcetobuffer((DCEnode*)target->fcn,buf); break;
+	default: assert(0);
+	}
+    } break;
+
+    case CES_SELECT: {
+	DCEselection* sel = (DCEselection*)node;
+	dcetobuffer((DCEnode*)sel->lhs,buf);
+        if(sel->operator == CES_NIL) break;
+        ncbytescat(buf,opstrings[(int)sel->operator]);
+        if(nclistlength(sel->rhs) > 1)
+            ncbytescat(buf,"{");
+	dcelisttobuffer(sel->rhs,buf,",");
+        if(nclistlength(sel->rhs) > 1)
+	    ncbytescat(buf,"}");
+    } break;
+
+    case CES_CONSTRAINT: {
+	DCEconstraint* con = (DCEconstraint*)node;
+        if(con->projections != NULL && nclistlength(con->projections) > 0) {
+            dcelisttobuffer(con->projections,buf,",");
+	}
+        if(con->selections != NULL && nclistlength(con->selections) > 0) {
+	    ncbytescat(buf,"&"); /* because & is really a prefix */
+            dcelisttobuffer(con->selections,buf,"&");
+	}
+    } break;
+
+    case CES_NIL: {
+	ncbytescat(buf,"<nil>");
+    } break;
+
+    default:
+	assert(0);
+    }
+}
+
+char*
+dcelisttostring(NClist* list, char* sep)
+{
+    char* s;
+    NCbytes* buf = ncbytesnew();
+    dcelisttobuffer(list,buf,sep);
+    s = ncbytesextract(buf);
+    ncbytesfree(buf);
+    return s;
+}
+
+void
+dcelisttobuffer(NClist* list, NCbytes* buf, char* sep)
+{
+    int i;
+    if(list == NULL || buf == NULL) return;
+    if(sep == NULL) sep = ",";
+    for(i=0;i<nclistlength(list);i++) {
+	DCEnode* node = (DCEnode*)nclistget(list,i);
+	if(node == NULL) continue;
+	if(i>0) ncbytescat(buf,sep);
+	dcetobuffer((DCEnode*)node,buf);
+    }
+}
+
+/* Collect all nodes within a specified constraint tree */
+/* Caller frees result */
+NClist*
+dceallnodes(DCEnode* node, CEsort which)
+{
+    NClist* allnodes = nclistnew();
+    ceallnodesr(node,allnodes,which);
+    return allnodes;
+}
+
+static void
+ceallnodesr(DCEnode* node, NClist* allnodes, CEsort which)
+{
+    int i;
+    if(node == NULL) return;
+    if(nclistcontains(allnodes,(ncelem)node)) return;
+    if(which == CES_NIL || node->sort == which)
+        nclistpush(allnodes,(ncelem)node);
+    switch(node->sort) {
+    case CES_FCN: {
+	DCEfcn* fcn = (DCEfcn*)node;
+	for(i=0;i<nclistlength(fcn->args);i++) {
+	    ceallnodesr((DCEnode*)nclistget(fcn->args,i),allnodes,which);
+	}
+    } break;
+    case CES_VAR: {
+	DCEvar* var = (DCEvar*)node;
+	for(i=0;i<nclistlength(var->segments);i++) {
+	    ceallnodesr((DCEnode*)nclistget(var->segments,i),allnodes,which);
+	}
+    } break;
+    case CES_VALUE: {
+	DCEvalue* value = (DCEvalue*)node;
+	if(value->discrim == CES_VAR)
+	    ceallnodesr((DCEnode*)value->var,allnodes,which);
+	else if(value->discrim == CES_FCN)
+	    ceallnodesr((DCEnode*)value->fcn,allnodes,which);
+	else
+	    ceallnodesr((DCEnode*)value->constant,allnodes,which);
+    } break;
+    case CES_SELECT: {
+	DCEselection* selection = (DCEselection*)node;
+        ceallnodesr((DCEnode*)selection->lhs,allnodes,which);
+	for(i=0;i<nclistlength(selection->rhs);i++)
+            ceallnodesr((DCEnode*)nclistget(selection->rhs,i),allnodes,which);
+    } break;
+    case CES_PROJECT: {
+	DCEprojection* projection = (DCEprojection*)node;
+	if(projection->discrim == CES_VAR)
+	    ceallnodesr((DCEnode*)projection->var,allnodes,which);
+	else
+	    ceallnodesr((DCEnode*)projection->fcn,allnodes,which);
+    } break;
+    case CES_CONSTRAINT: {
+	DCEconstraint* constraint = (DCEconstraint*)node;
+	for(i=0;i<nclistlength(constraint->projections);i++)
+	    ceallnodesr((DCEnode*)nclistget(constraint->projections,i),allnodes,which);
+	for(i=0;i<nclistlength(constraint->selections);i++)
+	    ceallnodesr((DCEnode*)nclistget(constraint->selections,i),allnodes,which);
+    } break;
+
+    /* All others have no subnodes */
+    default:
+	break;
+    }
+}
+
+DCEnode*
+dcecreate(CEsort sort)
+{
+    DCEnode* node = NULL;
+
+    switch (sort) {
+
+    case CES_SLICE: {
+	DCEslice* target = (DCEslice*)calloc(1,sizeof(DCEslice));
+	if(target == NULL) return NULL;
+	node = (DCEnode*)target;
+    } break;
+
+    case CES_SEGMENT: {
+	int i;
+	DCEsegment* target = (DCEsegment*)calloc(1,sizeof(DCEsegment));
+	if(target == NULL) return NULL;
+	/* Initialize the sort of the slices */
+	for(i=0;i<NC_MAX_VAR_DIMS;i++)
+	    target->slices[i].node.sort = CES_SLICE;		
+	node = (DCEnode*)target;
+    } break;
+
+    case CES_CONST: {
+	DCEconstant* target = (DCEconstant*)calloc(1,sizeof(DCEconstant));
+	if(target == NULL) return NULL;
+	node = (DCEnode*)target;
+	target->discrim = CES_NIL;
+    } break;
+
+    case CES_VALUE: {
+	DCEvalue* target = (DCEvalue*)calloc(1,sizeof(DCEvalue));
+	if(target == NULL) return NULL;
+	node = (DCEnode*)target;
+	target->discrim = CES_NIL;
+    } break;
+
+    case CES_VAR: {
+	DCEvar* target = (DCEvar*)calloc(1,sizeof(DCEvar));
+	if(target == NULL) return NULL;
+	node = (DCEnode*)target;
+    } break;
+
+    case CES_FCN: {
+	DCEfcn* target = (DCEfcn*)calloc(1,sizeof(DCEfcn));
+	if(target == NULL) return NULL;
+	node = (DCEnode*)target;
+    } break;
+
+    case CES_PROJECT: {
+	DCEprojection* target = (DCEprojection*)calloc(1,sizeof(DCEprojection));
+	if(target == NULL) return NULL;
+	node = (DCEnode*)target;
+    } break;
+
+    case CES_SELECT: {
+	DCEselection* target = (DCEselection*)calloc(1,sizeof(DCEselection));
+	if(target == NULL) return NULL;
+	node = (DCEnode*)target;
+	target->operator = CEO_NIL;
+    } break;
+
+    case CES_CONSTRAINT: {
+	DCEconstraint* target = (DCEconstraint*)calloc(1,sizeof(DCEconstraint));
+	if(target == NULL) return NULL;
+	node = (DCEnode*)target;
+    } break;
+
+    default:
+	assert(0);
+    }
+
+    /* final action */
+    node->sort = sort;
+    return node;
+}
+
+int
+dceiswholeslice(DCEslice* slice)
+{
+    if(slice->first != 0
+       || slice->stride != 1
+       || slice->stop != slice->declsize) return 0;
+    return 1;
+}
+
+int
+dceiswholesegment(DCEsegment* seg)
+{
+    int i,whole;
+    
+    if(!seg->slicesdefined) return 0; /* actually, we don't know */
+    whole = 1; /* assume so */
+    for(i=0;i<seg->rank;i++) {
+	if(!dceiswholeslice(&seg->slices[i])) {whole = 0; break;}	
+    }
+    return whole;
+}
+
+void
+dcemakewholeslice(DCEslice* slice, size_t declsize)
+{
+    slice->first = 0;
+    slice->stride = 1;
+    slice->length = declsize;
+    slice->stop = declsize;
+    slice->declsize = declsize;
+    slice->count = declsize;
+}
+
+/* Remove slicing from terminal segment of p */
+void
+dcemakewholeprojection(DCEprojection* p)
+{
+    /* Remove the slicing (if any) from the last segment */
+    if(p->discrim == CES_VAR && p->var != NULL && p->var->segments != NULL) {
+        int lastindex = nclistlength(p->var->segments) - 1;
+        DCEsegment* lastseg = (DCEsegment*)nclistget(p->var->segments,lastindex);
+        lastseg->rank = 0;
+    }   
+}
+
+int
+dcesamepath(NClist* list1, NClist* list2)
+{
+    int i;
+    int len = nclistlength(list1);
+    if(len != nclistlength(list2)) return 0;
+    for(i=0;i<len;i++) {
+	DCEsegment* s1 = (DCEsegment*)nclistget(list1,i);
+	DCEsegment* s2 = (DCEsegment*)nclistget(list2,i);
+	if(strcmp(s1->name,s2->name) != 0) return 0;
+    }
+    return 1;
+}
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/src_netcdf4/dceconstraints.h
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/src_netcdf4/dceconstraints.h	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/src_netcdf4/dceconstraints.h	(revision 1749)
@@ -0,0 +1,122 @@
+/*********************************************************************
+  *   Copyright 1993, UCAR/Unidata
+  *   See netcdf/COPYRIGHT file for copying and redistribution conditions.
+  *********************************************************************/
+/* $Header$ */
+
+#ifndef DCECONSTRAINTS_H
+#define DCECONSTRAINTS_H 1
+
+#include "ceconstraints.h"
+
+/* Provide a universal cast type containing common fields */
+
+/* Define the common "supertype */
+typedef struct DCEnode {
+    CEsort sort;    
+} DCEnode;
+
+/* The slice structure is assumed common to all uses */
+typedef struct DCEslice {
+    DCEnode node;
+    size_t first;
+    size_t count;
+    size_t length; /* count*stride */
+    size_t stride;
+    size_t stop; /* == first + count*/
+    size_t declsize;  /* from defining dimension, if any.*/
+} DCEslice;
+
+typedef struct DCEsegment {
+    DCEnode node;
+    char* name; 
+    int slicesdefined; /*1=>slice counts defined, except declsize*/
+    int slicesdeclized; /*1=>slice declsize defined */
+    size_t rank;
+    DCEslice slices[NC_MAX_VAR_DIMS];    
+    void* annotation;
+} DCEsegment;
+
+typedef struct DCEfcn {
+    DCEnode node;
+    char* name; 
+    NClist* args;
+} DCEfcn;
+
+typedef struct DCEvar {
+    DCEnode node;
+    NClist* segments;
+    void* annotation;
+} DCEvar;
+
+typedef struct DCEconstant {
+    DCEnode node;
+    CEsort discrim;
+    char* text;
+    long long intvalue;
+    double floatvalue;
+} DCEconstant;
+
+typedef struct DCEvalue {
+    DCEnode node;
+    CEsort discrim;
+    /* Do not bother with a union */
+    DCEconstant* constant;
+    DCEvar* var;
+    DCEfcn* fcn;
+} DCEvalue;
+
+typedef struct DCEselection {
+    DCEnode node;
+    CEsort operator;
+    DCEvalue* lhs;
+    NClist* rhs;
+} DCEselection;
+
+typedef struct DCEprojection {
+    DCEnode node;
+    CEsort discrim;
+    /* Do not bother with a union */
+    DCEvar* var;
+    DCEfcn* fcn;
+} DCEprojection;
+
+typedef struct DCEconstraint {
+    DCEnode node;
+    NClist* projections;
+    NClist* selections;
+} DCEconstraint;
+
+
+extern int dceparseconstraints(char* constraints, DCEconstraint* DCEonstraint);
+extern int dceslicemerge(DCEslice* dst, DCEslice* src);
+extern int dcemergeprojectionlists(NClist* dst, NClist* src);
+
+extern DCEnode* dceclone(DCEnode* node);
+extern NClist* dceclonelist(NClist* list);
+
+extern void dcefree(DCEnode* node);
+extern void dcefreelist(NClist* list);
+
+extern char* dcetostring(DCEnode* node);
+extern char* dcelisttostring(NClist* list,char*);
+extern void dcetobuffer(DCEnode* node, NCbytes* buf);
+extern void dcelisttobuffer(NClist* list, NCbytes* buf,char*);
+
+extern NClist* dceallnodes(DCEnode* node, CEsort which);
+
+extern DCEnode* dcecreate(CEsort sort);
+
+extern void dcemakewholeslice(DCEslice* slice, size_t declsize);
+extern void dcemakewholeprojection(DCEprojection*);
+
+extern int dceiswholesegment(DCEsegment*);
+extern int dceiswholeslice(DCEslice*);
+extern int dceiswholeseglist(NClist*);
+extern int dceiswholeprojection(DCEprojection*);
+extern int dcesamepath(NClist* list1, NClist* list2);
+extern int dcemergeprojections(DCEprojection* dst, DCEprojection* src);
+
+extern int dceverbose;
+
+#endif /*DCECONSTRAINTS_H*/
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/src_netcdf4/dcelex.c
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/src_netcdf4/dcelex.c	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/src_netcdf4/dcelex.c	(revision 1749)
@@ -0,0 +1,216 @@
+/* Copyright 2009, UCAR/Unidata and OPeNDAP, Inc.
+   See the COPYRIGHT file for more information. */
+
+#include "config.h"
+#include <stdlib.h>
+#include <stdio.h>
+#include <string.h>
+#include <assert.h>
+
+#include "netcdf.h"
+
+#include "nclist.h"
+#include "ncbytes.h"
+#include "dceconstraints.h"
+#include "dceparselex.h"
+
+/* Forward */
+static void dumptoken(DCElexstate* lexstate);
+static int tohex(int c);
+static void ceaddyytext(DCElexstate* lex, int c);
+
+/****************************************************/
+/* Define 1 and > 1st legal characters */
+static char* wordchars1 =
+  "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789-+_/%\\";
+static char* wordcharsn =
+  "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789-+_/%\\";
+
+/* Number characters */
+static char* numchars1="+-0123456789";
+static char* numcharsn="Ee.+-0123456789";
+
+/**************************************************/
+
+int
+dcelex(YYSTYPE* lvalp, DCEparsestate* state)
+{
+    DCElexstate* lexstate = state->lexstate;
+    int token;
+    int c;
+    int len;
+    char* p=lexstate->next;
+    token = 0;
+    ncbytesclear(lexstate->yytext);
+    ncbytesnull(lexstate->yytext);
+    p=lexstate->next;
+    while(token == 0 && (c=*p)) {
+	if(c <= ' ' || c >= '\177') {p++; continue;}
+	if(c == '"') {
+	    int more = 1;
+	    /* We have a SCAN_STRINGCONST */
+	    while(more && (c=*(++p))) {
+		switch (c) {
+		case '"': p++; more=0; break;
+		case '\\':
+		    c=*(++p);
+		    switch (c) {
+		    case 'r': c = '\r'; break;
+		    case 'n': c = '\n'; break;
+		    case 'f': c = '\f'; break;
+		    case 't': c = '\t'; break;
+		    case 'x': {
+			int d1,d2;
+			c = '?';
+			++p;
+		        d1 = tohex(*p++);
+			if(d1 < 0) {
+			    dceerror(state,"Illegal \\xDD in SCAN_STRING");
+			} else {
+			    d2 = tohex(*p++);
+			    if(d2 < 0) {
+			        dceerror(state,"Illegal \\xDD in SCAN_STRING");
+			    } else {
+				c=(((unsigned int)d1)<<4) | (unsigned int)d2;
+			    }
+			}
+		    } break;
+		    default: break;
+		    }
+		    break;
+		default: break;
+		}
+		ceaddyytext(lexstate,c);
+	    }
+	    token=SCAN_STRINGCONST;
+	} else if(strchr(numchars1,c) != NULL) {
+	    /* we might have a SCAN_NUMBERCONST */
+	    int isnumber = 0;
+	    char* yytext;
+	    char* endpoint;
+	    ceaddyytext(lexstate,c);
+	    for(p++;(c=*p);p++) {
+		if(strchr(numcharsn,c) == NULL) break;
+	        ceaddyytext(lexstate,c);
+	    }
+	    /* See if this is a number */
+	    ncbytesnull(lexstate->yytext);
+	    yytext = ncbytescontents(lexstate->yytext);
+	    (void)strtoll(yytext,&endpoint,10);
+	    if(*yytext != '\0' && *endpoint == '\0')
+	        isnumber = 1;
+	    else {
+	        (void)strtod(yytext,&endpoint);
+	        if(*yytext != '\0' && *endpoint == '\0')
+	            isnumber = 1; /* maybe */
+	    }
+	    /* A number followed by an id char is assumed to just be
+	       a funny id */	       
+	    if(isnumber && (*p == '\0' || strchr(wordcharsn,*p) == NULL))  {
+	        token = SCAN_NUMBERCONST;
+	    } else {
+		/* Now, if the funny word has a "." in it,
+		   we have to back up to that dot */
+		char* dotpoint = strchr(yytext,'.');
+		if(dotpoint != NULL) {
+		    p = dotpoint;
+		    *dotpoint = '\0';
+		}
+		token = SCAN_WORD;
+	    }
+	} else if(strchr(wordchars1,c) != NULL) {
+	    /* we have a SCAN_WORD */
+	    ceaddyytext(lexstate,c);
+	    for(p++;(c=*p);p++) {
+		if(strchr(wordcharsn,c) == NULL) break;
+	        ceaddyytext(lexstate,c);
+	    }
+	    token=SCAN_WORD;
+	} else {
+	    /* we have a single char token */
+	    token = c;
+	    ceaddyytext(lexstate,c);
+	    p++;
+	}
+    }
+    lexstate->next = p;
+    len = ncbyteslength(lexstate->yytext);
+    if(len > MAX_TOKEN_LENGTH) len = MAX_TOKEN_LENGTH;
+    strncpy(lexstate->lasttokentext,ncbytescontents(lexstate->yytext),len);
+    lexstate->lasttokentext[len] = '\0';
+    lexstate->lasttoken = token;
+    if(dcedebug) dumptoken(lexstate);
+
+    /*Put return value onto Bison stack*/
+
+    if(ncbyteslength(lexstate->yytext) == 0)
+        *lvalp = NULL;
+    else {
+        *lvalp = ncbytesdup(lexstate->yytext);
+	nclistpush(lexstate->reclaim,(ncelem)*lvalp);
+    }
+
+    return token;
+}
+
+static void
+ceaddyytext(DCElexstate* lex, int c)
+{
+    ncbytesappend(lex->yytext,(char)c);
+}
+
+static int
+tohex(int c)
+{
+    if(c >= 'a' && c <= 'f') return (c - 'a') + 0xa;
+    if(c >= 'A' && c <= 'F') return (c - 'A') + 0xa;
+    if(c >= '0' && c <= '9') return (c - '0');
+    return -1;
+}
+
+static void
+dumptoken(DCElexstate* lexstate)
+{
+    switch (lexstate->lasttoken) {
+    case SCAN_STRINGCONST:
+        fprintf(stderr,"TOKEN = |\"%s\"|\n",lexstate->lasttokentext);
+	break;
+    case SCAN_WORD:
+    case SCAN_NUMBERCONST:
+    default:
+        fprintf(stderr,"TOKEN = |%s|\n",lexstate->lasttokentext);
+	break;
+    }
+}
+
+void
+dcelexinit(char* input, DCElexstate** lexstatep)
+{
+    DCElexstate* lexstate = (DCElexstate*)malloc(sizeof(DCElexstate));
+    if(lexstatep) *lexstatep = lexstate;
+    if(lexstate == NULL) return;
+    memset((void*)lexstate,0,sizeof(DCElexstate));
+    lexstate->input = strdup(input);
+    lexstate->next = lexstate->input;
+    lexstate->yytext = ncbytesnew();
+    lexstate->reclaim = nclistnew();
+}
+
+void
+dcelexcleanup(DCElexstate** lexstatep)
+{
+    DCElexstate* lexstate = *lexstatep;
+    if(lexstate == NULL) return;
+    if(lexstate->input != NULL) free(lexstate->input);
+    if(lexstate->reclaim != NULL) {
+	while(nclistlength(lexstate->reclaim) > 0) {
+	    char* word = (char*)nclistpop(lexstate->reclaim);
+	    if(word) free(word);
+	}
+	nclistfree(lexstate->reclaim);
+    }
+    ncbytesfree(lexstate->yytext);
+    free(lexstate);
+    *lexstatep = NULL;
+}
+
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/src_netcdf4/dceparse.c
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/src_netcdf4/dceparse.c	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/src_netcdf4/dceparse.c	(revision 1749)
@@ -0,0 +1,397 @@
+/* Copyright 2009, UCAR/Unidata and OPeNDAP, Inc.
+   See the COPYRIGHT file for more information. */
+
+/* Parser actions for constraint expressions */
+
+/* Since oc does not use the constraint parser,
+   they functions all just abort if called.
+*/
+
+#include "config.h"
+#include <stdlib.h>
+#include <stdio.h>
+#include <string.h>
+#include <assert.h>
+
+#include "netcdf.h"
+
+#include "nclist.h"
+#include "ncbytes.h"
+#include "dceconstraints.h"
+#include "dceparselex.h"
+
+static Object collectlist(Object list0, Object decl);
+
+void
+projections(DCEparsestate* state, Object list0)
+{
+    NClist* list = (NClist*)list0;
+    if(list != NULL) {
+        nclistfree(state->constraint->projections);
+        state->constraint->projections = list;
+    }
+#ifdef DEBUG
+fprintf(stderr,"	ce.projections: %s\n",
+	dcetostring((DCEnode*)state->constraint->projections));
+#endif
+}
+
+void
+selections(DCEparsestate* state, Object list0)
+{
+    NClist* list = (NClist*)list0;
+    if(list != NULL) {
+        nclistfree(state->constraint->selections);
+        state->constraint->selections = list;
+    }
+#ifdef DEBUG
+fprintf(stderr,"	ce.selections: %s\n",
+	dcetostring((DCEnode*)state->constraint->selections));
+#endif
+}
+
+
+Object
+projectionlist(DCEparsestate* state, Object list0, Object decl)
+{
+    return collectlist(list0,decl);
+}
+
+Object
+projection(DCEparsestate* state, Object varorfcn)
+{
+    DCEprojection* p = (DCEprojection*)dcecreate(CES_PROJECT);
+    CEsort tag = *(CEsort*)varorfcn;
+    if(tag == CES_FCN)
+	p->fcn = varorfcn;
+    else
+	p->var = varorfcn;
+    p->discrim = tag;
+#ifdef DEBUG
+fprintf(stderr,"	ce.projection: %s\n",
+	dcetostring((DCEnode*)p));
+#endif
+    return p;
+}
+
+Object
+segmentlist(DCEparsestate* state, Object var0, Object decl)
+{
+    /* watch out: this is non-standard */
+    NClist* list;
+    DCEvar* v = (DCEvar*)var0;
+    if(v==NULL) v = (DCEvar*)dcecreate(CES_VAR);
+    list = v->segments;
+    if(list == NULL) list = nclistnew();
+    nclistpush(list,(ncelem)decl);
+    v->segments = list;
+    return v;
+}
+
+Object
+segment(DCEparsestate* state, Object name, Object slices0)
+{
+    int i;
+    DCEsegment* segment = (DCEsegment*)dcecreate(CES_SEGMENT);
+    NClist* slices = (NClist*)slices0;
+    segment->name = strdup((char*)name);
+    if(slices != NULL && nclistlength(slices) > 0) {
+	segment->rank = nclistlength(slices);
+        segment->slicesdefined = 1; /* but not declsizes */
+	for(i=0;i<nclistlength(slices);i++) {
+	    DCEslice* slice = (DCEslice*)nclistget(slices,i);
+	    segment->slices[i] = *slice;
+	    free(slice);
+	}
+	nclistfree(slices);
+    } else
+        segment->slicesdefined = 0;
+#ifdef DEBUG
+fprintf(stderr,"	ce.segment: %s\n",
+	dumpsegment(segment));
+#endif
+    return segment;
+}
+
+
+Object
+rangelist(DCEparsestate* state, Object list0, Object decl)
+{
+    return collectlist(list0,decl);
+}
+
+Object
+range(DCEparsestate* state, Object sfirst, Object sstride, Object slast)
+{
+    DCEslice* slice = (DCEslice*)dcecreate(CES_SLICE);
+    unsigned long first,stride,last;
+
+    /* Note: that incoming arguments are strings; we must convert to size_t;
+       but we do know they are legal integers or NULL */
+    sscanf((char*)sfirst,"%lu",&first); /* always defined */
+    if(slast != NULL)
+        sscanf((char*)slast,"%lu",&last);
+    else
+	last = first;
+    if(sstride != NULL)
+        sscanf((char*)sstride,"%lu",&stride);
+    else
+	stride = 1; /* default */
+
+    if(stride == 0)
+    	dceerror(state,"Illegal index for range stride");
+    if(last < first)
+	dceerror(state,"Illegal index for range last index");
+    slice->first  = first;
+    slice->stride = stride;
+    slice->stop   = last + 1;
+    slice->length  = slice->stop - slice->first;
+    slice->count  = slice->length / slice->stride;
+#ifdef DEBUG
+fprintf(stderr,"	ce.slice: %s\n",
+	dumpslice(slice));
+#endif
+    return slice;
+}
+
+Object
+range1(DCEparsestate* state, Object rangenumber)
+{
+    int range = -1;
+    sscanf((char*)rangenumber,"%u",&range);
+    if(range < 0) {
+    	dceerror(state,"Illegal range index");
+    }
+    return rangenumber;
+}
+
+Object
+clauselist(DCEparsestate* state, Object list0, Object decl)
+{
+    return collectlist(list0,decl);
+}
+
+Object
+sel_clause(DCEparsestate* state, int selcase,
+	   Object lhs, Object relop0, Object values)
+{
+    DCEselection* sel = (DCEselection*)dcecreate(CES_SELECT);
+    sel->operator = (CEsort)relop0;
+    sel->lhs = (DCEvalue*)lhs;
+    if(selcase == 2) {/*singleton value*/
+	sel->rhs = nclistnew();
+	nclistpush(sel->rhs,(ncelem)values);
+    } else
+        sel->rhs = (NClist*)values;
+    return sel;
+}
+
+Object
+indexpath(DCEparsestate* state, Object list0, Object index)
+{
+    return collectlist(list0,index);
+}
+
+Object
+array_indices(DCEparsestate* state, Object list0, Object indexno)
+{
+    DCEslice* slice;
+    long long start = -1;
+    NClist* list = (NClist*)list0;
+    if(list == NULL) list = nclistnew();
+    sscanf((char*)indexno,"%lld",&start);
+    if(start < 0) {
+    	dceerror(state,"Illegal array index");
+	start = 1;
+    }    
+    slice = (DCEslice*)dcecreate(CES_SLICE);
+    slice->first = start;
+    slice->stride = 1;
+    slice->count = 1;
+    slice->length = 1;
+    slice->stop = start+1;
+    nclistpush(list,(ncelem)slice);
+    return list;
+}
+
+Object
+indexer(DCEparsestate* state, Object name, Object indices)
+{
+    int i;
+    NClist* list = (NClist*)indices;
+    DCEsegment* seg = (DCEsegment*)dcecreate(CES_SEGMENT);
+    seg->name = strdup((char*)name);
+    for(i=0;i<nclistlength(list);i++) {    
+	DCEslice* slice = (DCEslice*)nclistget(list,i);
+        seg->slices[i] = *slice;
+	free(slice);
+    }
+    nclistfree(indices);
+    return seg;    
+}
+
+Object
+function(DCEparsestate* state, Object fcnname, Object args)
+{
+    DCEfcn* fcn = (DCEfcn*)dcecreate(CES_FCN);
+    fcn->name = nulldup((char*)fcnname);
+    fcn->args = args;
+    return fcn;
+}
+
+Object
+arg_list(DCEparsestate* state, Object list0, Object decl)
+{
+    return collectlist(list0,decl);
+}
+
+
+Object
+value_list(DCEparsestate* state, Object list0, Object decl)
+{
+    return collectlist(list0,decl);
+}
+
+Object
+value(DCEparsestate* state, Object val)
+{
+    DCEvalue* ncvalue = (DCEvalue*)dcecreate(CES_VALUE);
+    CEsort tag = *(CEsort*)val;
+    switch (tag) {
+    case CES_VAR: ncvalue->var = (DCEvar*)val; break;
+    case CES_FCN: ncvalue->fcn = (DCEfcn*)val; break;
+    case CES_CONST: ncvalue->constant = (DCEconstant*)val; break;
+    default: abort(); break;
+    }
+    ncvalue->discrim = tag;
+    return ncvalue;
+}
+
+Object
+var(DCEparsestate* state, Object indexpath)
+{
+    DCEvar* v = (DCEvar*)dcecreate(CES_VAR);
+    v->segments = (NClist*)indexpath;        
+    return v;
+}
+
+Object
+constant(DCEparsestate* state, Object val, int tag)
+{
+    DCEconstant* con = (DCEconstant*)dcecreate(CES_CONST);
+    char* text = (char*)val;
+    char* endpoint = NULL;
+    switch (tag) {
+    case SCAN_STRINGCONST:
+	con->discrim = CES_STR;
+	con->text = nulldup(text);
+	break;
+    case SCAN_NUMBERCONST:
+	con->intvalue = strtoll(text,&endpoint,10);
+	if(*text != '\0' && *endpoint == '\0') {
+	    con->discrim = CES_INT;
+	} else {
+	    con->floatvalue = strtod(text,&endpoint);
+	    if(*text != '\0' && *endpoint == '\0')
+	        con->discrim = CES_FLOAT;
+	    else abort();
+	}
+	break;
+    default: abort(); break;
+    }
+    return con;
+}
+
+static Object
+collectlist(Object list0, Object decl)
+{
+    NClist* list = (NClist*)list0;
+    if(list == NULL) list = nclistnew();
+    nclistpush(list,(ncelem)decl);
+    return list;
+}
+
+Object
+makeselectiontag(CEsort tag)
+{
+    return (Object) tag;
+}
+
+int
+dceerror(DCEparsestate* state, char* msg)
+{
+    strcpy(state->errorbuf,msg);
+    state->errorcode=1;
+    return 0;
+}
+
+static void
+dce_parse_cleanup(DCEparsestate* state)
+{
+    dcelexcleanup(&state->lexstate); /* will free */
+}
+
+static DCEparsestate*
+ce_parse_init(char* input, DCEconstraint* constraint)
+{
+    DCEparsestate* state = NULL;
+    if(input==NULL) {
+        dceerror(state,"ce_parse_init: no input buffer");
+    } else {
+        state = (DCEparsestate*)calloc(1,sizeof(DCEparsestate));
+        if(state==NULL) return (DCEparsestate*)NULL;
+        state->errorbuf[0] = '\0';
+        state->errorcode = 0;
+        dcelexinit(input,&state->lexstate);
+	state->constraint = constraint;
+    }
+    return state;
+}
+
+#ifdef PARSEDEBUG
+extern int dcedebug;
+#endif
+
+/* Wrapper for ceparse */
+int
+dapceparse(char* input, DCEconstraint* constraint, char** errmsgp)
+{
+    DCEparsestate* state;
+    int errcode = 0;
+
+#ifdef PARSEDEBUG
+dcedebug = 1;
+#endif
+
+    if(input != NULL) {
+#ifdef DEBUG
+fprintf(stderr,"dceeparse: input=%s\n",input);
+#endif
+        state = ce_parse_init(input,constraint);
+        if(dceparse(state) == 0) {
+#ifdef DEBUG
+if(nclistlength(constraint->projections) > 0)
+fprintf(stderr,"dceeparse: projections=%s\n",
+        dcetostring((DCEnode*)constraint->projections));
+#endif
+#ifdef DEBUG
+if(nclistlength(constraint->selections)  > 0)
+fprintf(stderr,"dceeparse: selections=%s\n",
+	dumpselections(constraint->selections));
+#endif
+	} else {
+	    if(errmsgp) *errmsgp = nulldup(state->errorbuf);
+	}
+	errcode = state->errorcode;
+        dce_parse_cleanup(state);
+    }
+    return errcode;
+}
+
+#ifdef PARSEDEBUG
+Object
+debugobject(Object o)
+{
+    return o;
+}
+#endif
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/src_netcdf4/dceparselex.h
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/src_netcdf4/dceparselex.h	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/src_netcdf4/dceparselex.h	(revision 1749)
@@ -0,0 +1,100 @@
+/* Copyright 2009, UCAR/Unidata and OPeNDAP, Inc.
+   See the COPYRIGHT file for more information. */
+
+#ifndef DCEPARSELEX_H
+#define DCEPARSELEX_H
+
+#include "config.h"
+#include "dcetab.h"
+
+#ifdef WIN32
+#define strcasecmp stricmp
+#define snprintf _snprintf
+#endif
+
+/* For consistency with Java parser */
+#ifndef null
+#define null NULL
+#endif
+
+typedef void* Object;
+
+#define YYSTYPE Object
+
+#define MAX_TOKEN_LENGTH 1024
+
+/*! Specifies DCElexstate. */
+typedef struct DCElexstate {
+    char* input;
+    char* next; /* next char in uri.query */
+    NCbytes* yytext;
+    /*! Specifies the Lasttoken. */
+    int lasttoken;
+    char lasttokentext[MAX_TOKEN_LENGTH+1]; /* leave room for trailing null */
+    NClist* reclaim; /* reclaim SCAN_WORD instances */
+} DCElexstate;
+
+/*! Specifies DCEparsestate. */
+typedef struct DCEparsestate {
+    DCEconstraint* constraint;
+    char errorbuf[1024];
+    int errorcode;
+    DCElexstate* lexstate;
+} DCEparsestate;
+
+/* Define a generic object carrier; this serves
+   essentially the same role as the typical bison %union
+   declaration
+*/
+   
+
+extern int ceerror(DCEparsestate*,char*);
+extern void ce_parse_error(DCEparsestate*,const char *fmt, ...);
+
+/* bison parse entry point */
+extern int dceparse(DCEparsestate*);
+
+extern int dceerror(DCEparsestate* state, char* msg);
+extern void projections(DCEparsestate* state, Object list0);
+extern void selections(DCEparsestate* state, Object list0);
+extern Object projectionlist(DCEparsestate* state, Object list0, Object decl);
+extern Object projection(DCEparsestate* state, Object segmentlist);
+extern Object segmentlist(DCEparsestate* state, Object list0, Object decl);
+extern Object segment(DCEparsestate* state, Object name, Object slices0);
+extern Object array_indices(DCEparsestate* state, Object list0, Object decl);
+extern Object range(DCEparsestate* state, Object, Object, Object);
+extern Object selectionlist(DCEparsestate* state, Object list0, Object decl);
+extern Object sel_clause(DCEparsestate* state, int selcase, Object path0, Object relop0, Object values);
+extern Object selectionpath(DCEparsestate* state, Object list0, Object text);
+extern Object arrayelement(DCEparsestate* state, Object name, Object index);
+extern Object function(DCEparsestate* state, Object fcnname, Object args);
+extern Object arg_list(DCEparsestate* state, Object list0, Object decl);
+extern Object value_list(DCEparsestate* state, Object list0, Object decl);
+extern Object value(DCEparsestate* state, Object value);
+extern Object makeselectiontag(CEsort);
+extern Object indexer(DCEparsestate* state, Object name, Object indices);
+extern Object indexpath(DCEparsestate* state, Object list0, Object index);
+extern Object var(DCEparsestate* state, Object indexpath);
+extern Object constant(DCEparsestate* state, Object val, int tag);
+extern Object clauselist(DCEparsestate* state, Object list0, Object decl);
+extern Object range1(DCEparsestate* state, Object rangenumber);
+extern Object rangelist(DCEparsestate* state, Object list0, Object decl);
+
+/* lexer interface */
+extern int dcelex(YYSTYPE*, DCEparsestate*);
+extern void dcelexinit(char* input, DCElexstate** lexstatep);
+extern void dcelexcleanup(DCElexstate** lexstatep);
+
+extern int dcedebug;
+
+#ifdef PARSEDEBUG
+extern Object debugobject(Object);
+#define checkobject(x) debugobject(x)
+#else
+#define checkobject(x) (x)
+#endif
+
+extern int dapceparse(char* input, DCEconstraint*, char**);
+
+#endif /*DCEPARSELEX_H*/
+
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/src_netcdf4/dcetab.c
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/src_netcdf4/dcetab.c	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/src_netcdf4/dcetab.c	(revision 1749)
@@ -0,0 +1,1999 @@
+/* A Bison parser, made by GNU Bison 2.4.3.  */
+
+/* Skeleton implementation for Bison's Yacc-like parsers in C
+   
+      Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
+   2009, 2010 Free Software Foundation, Inc.
+   
+   This program is free software: you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation, either version 3 of the License, or
+   (at your option) any later version.
+   
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+   
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
+
+/* As a special exception, you may create a larger work that contains
+   part or all of the Bison parser skeleton and distribute that work
+   under terms of your choice, so long as that work isn't itself a
+   parser generator using the skeleton or a modified version thereof
+   as a parser skeleton.  Alternatively, if you modify or redistribute
+   the parser skeleton itself, you may (at your option) remove this
+   special exception, which will cause the skeleton and the resulting
+   Bison output files to be licensed under the GNU General Public
+   License without this special exception.
+   
+   This special exception was added by the Free Software Foundation in
+   version 2.2 of Bison.  */
+
+/* C LALR(1) parser skeleton written by Richard Stallman, by
+   simplifying the original so-called "semantic" parser.  */
+
+/* All symbols defined below should begin with yy or YY, to avoid
+   infringing on user name space.  This should be done even for local
+   variables, as they might otherwise be expanded by user macros.
+   There are some unavoidable exceptions within include files to
+   define necessary library symbols; they are noted "INFRINGES ON
+   USER NAME SPACE" below.  */
+
+/* Identify Bison output.  */
+#define YYBISON 1
+
+/* Bison version.  */
+#define YYBISON_VERSION "2.4.3"
+
+/* Skeleton name.  */
+#define YYSKELETON_NAME "yacc.c"
+
+/* Pure parsers.  */
+#define YYPURE 1
+
+/* Push parsers.  */
+#define YYPUSH 0
+
+/* Pull parsers.  */
+#define YYPULL 1
+
+/* Using locations.  */
+#define YYLSP_NEEDED 0
+
+/* Substitute the variable and function names.  */
+#define yyparse         dceparse
+#define yylex           dcelex
+#define yyerror         dceerror
+#define yylval          dcelval
+#define yychar          dcechar
+#define yydebug         dcedebug
+#define yynerrs         dcenerrs
+
+
+/* Copy the first part of user declarations.  */
+
+/* Line 189 of yacc.c  */
+#line 11 "dce.y"
+
+#include "config.h"
+#include <stdlib.h>
+#include "netcdf.h"
+#include "ncbytes.h"
+#include "nclist.h"
+#include "dceconstraints.h"
+#include "dceparselex.h"
+
+
+/* Line 189 of yacc.c  */
+#line 93 "dce.tab.c"
+
+/* Enabling traces.  */
+#ifndef YYDEBUG
+# define YYDEBUG 1
+#endif
+
+/* Enabling verbose error messages.  */
+#ifdef YYERROR_VERBOSE
+# undef YYERROR_VERBOSE
+# define YYERROR_VERBOSE 1
+#else
+# define YYERROR_VERBOSE 0
+#endif
+
+/* Enabling the token table.  */
+#ifndef YYTOKEN_TABLE
+# define YYTOKEN_TABLE 0
+#endif
+
+
+/* Tokens.  */
+#ifndef YYTOKENTYPE
+# define YYTOKENTYPE
+   /* Put the tokens into the symbol table, so that GDB and other debuggers
+      know about them.  */
+   enum yytokentype {
+     SCAN_WORD = 258,
+     SCAN_STRINGCONST = 259,
+     SCAN_NUMBERCONST = 260
+   };
+#endif
+
+
+
+#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
+typedef int YYSTYPE;
+# define YYSTYPE_IS_TRIVIAL 1
+# define yystype YYSTYPE /* obsolescent; will be withdrawn */
+# define YYSTYPE_IS_DECLARED 1
+#endif
+
+
+/* Copy the second part of user declarations.  */
+
+
+/* Line 264 of yacc.c  */
+#line 140 "dce.tab.c"
+
+#ifdef short
+# undef short
+#endif
+
+#ifdef YYTYPE_UINT8
+typedef YYTYPE_UINT8 yytype_uint8;
+#else
+typedef unsigned char yytype_uint8;
+#endif
+
+#ifdef YYTYPE_INT8
+typedef YYTYPE_INT8 yytype_int8;
+#elif (defined __STDC__ || defined __C99__FUNC__ \
+     || defined __cplusplus || defined _MSC_VER)
+typedef signed char yytype_int8;
+#else
+typedef short int yytype_int8;
+#endif
+
+#ifdef YYTYPE_UINT16
+typedef YYTYPE_UINT16 yytype_uint16;
+#else
+typedef unsigned short int yytype_uint16;
+#endif
+
+#ifdef YYTYPE_INT16
+typedef YYTYPE_INT16 yytype_int16;
+#else
+typedef short int yytype_int16;
+#endif
+
+#ifndef YYSIZE_T
+# ifdef __SIZE_TYPE__
+#  define YYSIZE_T __SIZE_TYPE__
+# elif defined size_t
+#  define YYSIZE_T size_t
+# elif ! defined YYSIZE_T && (defined __STDC__ || defined __C99__FUNC__ \
+     || defined __cplusplus || defined _MSC_VER)
+#  include <stddef.h> /* INFRINGES ON USER NAME SPACE */
+#  define YYSIZE_T size_t
+# else
+#  define YYSIZE_T unsigned int
+# endif
+#endif
+
+#define YYSIZE_MAXIMUM ((YYSIZE_T) -1)
+
+#ifndef YY_
+# if defined YYENABLE_NLS && YYENABLE_NLS
+#  if ENABLE_NLS
+#   include <libintl.h> /* INFRINGES ON USER NAME SPACE */
+#   define YY_(msgid) dgettext ("bison-runtime", msgid)
+#  endif
+# endif
+# ifndef YY_
+#  define YY_(msgid) msgid
+# endif
+#endif
+
+/* Suppress unused-variable warnings by "using" E.  */
+#if ! defined lint || defined __GNUC__
+# define YYUSE(e) ((void) (e))
+#else
+# define YYUSE(e) /* empty */
+#endif
+
+/* Identity function, used to suppress warnings about constant conditions.  */
+#ifndef lint
+# define YYID(n) (n)
+#else
+#if (defined __STDC__ || defined __C99__FUNC__ \
+     || defined __cplusplus || defined _MSC_VER)
+static int
+YYID (int yyi)
+#else
+static int
+YYID (yyi)
+    int yyi;
+#endif
+{
+  return yyi;
+}
+#endif
+
+#if ! defined yyoverflow || YYERROR_VERBOSE
+
+/* The parser invokes alloca or malloc; define the necessary symbols.  */
+
+# ifdef YYSTACK_USE_ALLOCA
+#  if YYSTACK_USE_ALLOCA
+#   ifdef __GNUC__
+#    define YYSTACK_ALLOC __builtin_alloca
+#   elif defined __BUILTIN_VA_ARG_INCR
+#    include <alloca.h> /* INFRINGES ON USER NAME SPACE */
+#   elif defined _AIX
+#    define YYSTACK_ALLOC __alloca
+#   elif defined _MSC_VER
+#    include <malloc.h> /* INFRINGES ON USER NAME SPACE */
+#    define alloca _alloca
+#   else
+#    define YYSTACK_ALLOC alloca
+#    if ! defined _ALLOCA_H && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
+     || defined __cplusplus || defined _MSC_VER)
+#     include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
+#     ifndef _STDLIB_H
+#      define _STDLIB_H 1
+#     endif
+#    endif
+#   endif
+#  endif
+# endif
+
+# ifdef YYSTACK_ALLOC
+   /* Pacify GCC's `empty if-body' warning.  */
+#  define YYSTACK_FREE(Ptr) do { /* empty */; } while (YYID (0))
+#  ifndef YYSTACK_ALLOC_MAXIMUM
+    /* The OS might guarantee only one guard page at the bottom of the stack,
+       and a page size can be as small as 4096 bytes.  So we cannot safely
+       invoke alloca (N) if N exceeds 4096.  Use a slightly smaller number
+       to allow for a few compiler-allocated temporary stack slots.  */
+#   define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */
+#  endif
+# else
+#  define YYSTACK_ALLOC YYMALLOC
+#  define YYSTACK_FREE YYFREE
+#  ifndef YYSTACK_ALLOC_MAXIMUM
+#   define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM
+#  endif
+#  if (defined __cplusplus && ! defined _STDLIB_H \
+       && ! ((defined YYMALLOC || defined malloc) \
+	     && (defined YYFREE || defined free)))
+#   include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
+#   ifndef _STDLIB_H
+#    define _STDLIB_H 1
+#   endif
+#  endif
+#  ifndef YYMALLOC
+#   define YYMALLOC malloc
+#   if ! defined malloc && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
+     || defined __cplusplus || defined _MSC_VER)
+void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */
+#   endif
+#  endif
+#  ifndef YYFREE
+#   define YYFREE free
+#   if ! defined free && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
+     || defined __cplusplus || defined _MSC_VER)
+void free (void *); /* INFRINGES ON USER NAME SPACE */
+#   endif
+#  endif
+# endif
+#endif /* ! defined yyoverflow || YYERROR_VERBOSE */
+
+
+#if (! defined yyoverflow \
+     && (! defined __cplusplus \
+	 || (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL)))
+
+/* A type that is properly aligned for any stack member.  */
+union yyalloc
+{
+  yytype_int16 yyss_alloc;
+  YYSTYPE yyvs_alloc;
+};
+
+/* The size of the maximum gap between one aligned stack and the next.  */
+# define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1)
+
+/* The size of an array large to enough to hold all stacks, each with
+   N elements.  */
+# define YYSTACK_BYTES(N) \
+     ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE)) \
+      + YYSTACK_GAP_MAXIMUM)
+
+/* Copy COUNT objects from FROM to TO.  The source and destination do
+   not overlap.  */
+# ifndef YYCOPY
+#  if defined __GNUC__ && 1 < __GNUC__
+#   define YYCOPY(To, From, Count) \
+      __builtin_memcpy (To, From, (Count) * sizeof (*(From)))
+#  else
+#   define YYCOPY(To, From, Count)		\
+      do					\
+	{					\
+	  YYSIZE_T yyi;				\
+	  for (yyi = 0; yyi < (Count); yyi++)	\
+	    (To)[yyi] = (From)[yyi];		\
+	}					\
+      while (YYID (0))
+#  endif
+# endif
+
+/* Relocate STACK from its old location to the new one.  The
+   local variables YYSIZE and YYSTACKSIZE give the old and new number of
+   elements in the stack, and YYPTR gives the new location of the
+   stack.  Advance YYPTR to a properly aligned location for the next
+   stack.  */
+# define YYSTACK_RELOCATE(Stack_alloc, Stack)				\
+    do									\
+      {									\
+	YYSIZE_T yynewbytes;						\
+	YYCOPY (&yyptr->Stack_alloc, Stack, yysize);			\
+	Stack = &yyptr->Stack_alloc;					\
+	yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \
+	yyptr += yynewbytes / sizeof (*yyptr);				\
+      }									\
+    while (YYID (0))
+
+#endif
+
+/* YYFINAL -- State number of the termination state.  */
+#define YYFINAL  4
+/* YYLAST -- Last index in YYTABLE.  */
+#define YYLAST   83
+
+/* YYNTOKENS -- Number of terminals.  */
+#define YYNTOKENS  22
+/* YYNNTS -- Number of nonterminals.  */
+#define YYNNTS  29
+/* YYNRULES -- Number of rules.  */
+#define YYNRULES  59
+/* YYNRULES -- Number of states.  */
+#define YYNSTATES  87
+
+/* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX.  */
+#define YYUNDEFTOK  2
+#define YYMAXUTOK   260
+
+#define YYTRANSLATE(YYX)						\
+  ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
+
+/* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX.  */
+static const yytype_uint8 yytranslate[] =
+{
+       0,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+       2,     2,     2,    20,     2,     2,     2,     2,    14,     2,
+       8,     9,     2,     2,     7,     2,    10,     2,     2,     2,
+       2,     2,     2,     2,     2,     2,     2,     2,    13,     2,
+      19,    17,    18,     6,     2,     2,     2,     2,     2,     2,
+       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+       2,    11,     2,    12,     2,     2,     2,     2,     2,     2,
+       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+       2,     2,     2,    15,     2,    16,    21,     2,     2,     2,
+       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+       2,     2,     2,     2,     2,     2,     1,     2,     3,     4,
+       5
+};
+
+#if YYDEBUG
+/* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in
+   YYRHS.  */
+static const yytype_uint8 yyprhs[] =
+{
+       0,     0,     3,     6,     9,    13,    14,    16,    17,    19,
+      21,    23,    27,    29,    31,    35,    40,    42,    46,    48,
+      51,    53,    56,    60,    66,    74,    78,    80,    83,    90,
+      95,    98,   100,   104,   106,   108,   110,   112,   114,   116,
+     118,   122,   124,   127,   129,   132,   136,   141,   143,   147,
+     149,   151,   153,   156,   159,   162,   165,   167,   169,   171
+};
+
+/* YYRHS -- A `-1'-separated list of the rules' RHS.  */
+static const yytype_int8 yyrhs[] =
+{
+      23,     0,    -1,    24,    25,    -1,    24,    26,    -1,    24,
+      25,    26,    -1,    -1,     6,    -1,    -1,    27,    -1,    35,
+      -1,    28,    -1,    27,     7,    28,    -1,    30,    -1,    29,
+      -1,    47,     8,     9,    -1,    47,     8,    45,     9,    -1,
+      31,    -1,    30,    10,    31,    -1,    48,    -1,    48,    32,
+      -1,    33,    -1,    32,    33,    -1,    11,    49,    12,    -1,
+      11,    49,    13,    49,    12,    -1,    11,    49,    13,    49,
+      13,    49,    12,    -1,    11,    49,    12,    -1,    36,    -1,
+      35,    36,    -1,    14,    38,    46,    15,    37,    16,    -1,
+      14,    38,    46,    38,    -1,    14,    44,    -1,    38,    -1,
+      37,     7,    38,    -1,    40,    -1,    29,    -1,    39,    -1,
+      49,    -1,    50,    -1,    41,    -1,    42,    -1,    41,    10,
+      42,    -1,    48,    -1,    48,    43,    -1,    34,    -1,    43,
+      34,    -1,    47,     8,     9,    -1,    47,     8,    45,     9,
+      -1,    38,    -1,    37,     7,    38,    -1,    17,    -1,    18,
+      -1,    19,    -1,    20,    17,    -1,    18,    17,    -1,    19,
+      17,    -1,    17,    21,    -1,    48,    -1,     3,    -1,     5,
+      -1,     4,    -1
+};
+
+/* YYRLINE[YYN] -- source line where rule number YYN was defined.  */
+static const yytype_uint8 yyrline[] =
+{
+       0,    34,    34,    35,    36,    37,    40,    40,    43,    47,
+      51,    53,    58,    60,    65,    67,    72,    74,    79,    81,
+      86,    88,    93,    95,    97,   101,   107,   109,   114,   116,
+     118,   123,   125,   130,   132,   134,   139,   141,   146,   151,
+     153,   158,   160,   165,   167,   172,   174,   179,   181,   186,
+     187,   188,   189,   190,   191,   192,   195,   199,   203,   207
+};
+#endif
+
+#if YYDEBUG || YYERROR_VERBOSE || YYTOKEN_TABLE
+/* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
+   First, the terminals, then, starting at YYNTOKENS, nonterminals.  */
+static const char *const yytname[] =
+{
+  "$end", "error", "$undefined", "SCAN_WORD", "SCAN_STRINGCONST",
+  "SCAN_NUMBERCONST", "'?'", "','", "'('", "')'", "'.'", "'['", "']'",
+  "':'", "'&'", "'{'", "'}'", "'='", "'>'", "'<'", "'!'", "'~'", "$accept",
+  "constraints", "optquestionmark", "projections", "selections",
+  "projectionlist", "projection", "function", "segmentlist", "segment",
+  "rangelist", "range", "range1", "clauselist", "sel_clause", "value_list",
+  "value", "constant", "var", "indexpath", "index", "array_indices",
+  "boolfunction", "arg_list", "rel_op", "ident", "word", "number",
+  "string", 0
+};
+#endif
+
+# ifdef YYPRINT
+/* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to
+   token YYLEX-NUM.  */
+static const yytype_uint16 yytoknum[] =
+{
+       0,   256,   257,   258,   259,   260,    63,    44,    40,    41,
+      46,    91,    93,    58,    38,   123,   125,    61,    62,    60,
+      33,   126
+};
+# endif
+
+/* YYR1[YYN] -- Symbol number of symbol that rule YYN derives.  */
+static const yytype_uint8 yyr1[] =
+{
+       0,    22,    23,    23,    23,    23,    24,    24,    25,    26,
+      27,    27,    28,    28,    29,    29,    30,    30,    31,    31,
+      32,    32,    33,    33,    33,    34,    35,    35,    36,    36,
+      36,    37,    37,    38,    38,    38,    39,    39,    40,    41,
+      41,    42,    42,    43,    43,    44,    44,    45,    45,    46,
+      46,    46,    46,    46,    46,    46,    47,    48,    49,    50
+};
+
+/* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN.  */
+static const yytype_uint8 yyr2[] =
+{
+       0,     2,     2,     2,     3,     0,     1,     0,     1,     1,
+       1,     3,     1,     1,     3,     4,     1,     3,     1,     2,
+       1,     2,     3,     5,     7,     3,     1,     2,     6,     4,
+       2,     1,     3,     1,     1,     1,     1,     1,     1,     1,
+       3,     1,     2,     1,     2,     3,     4,     1,     3,     1,
+       1,     1,     2,     2,     2,     2,     1,     1,     1,     1
+};
+
+/* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state
+   STATE-NUM when YYTABLE doesn't specify something else to do.  Zero
+   means the default is an error.  */
+static const yytype_uint8 yydefact[] =
+{
+       7,     6,     0,     0,     1,    57,     0,     2,     3,     8,
+      10,    13,    12,    16,     9,    26,     0,    18,    59,    58,
+      34,     0,    35,    33,    38,    39,    30,     0,    41,    36,
+      37,     4,     0,     0,    27,     0,     0,    19,    20,    49,
+      50,    51,     0,     0,     0,     0,     0,    43,    42,    11,
+      17,    18,    14,     0,    31,     0,     0,    21,    55,    53,
+      54,    52,     0,    29,    40,    41,    14,     0,     0,    44,
+       0,    15,    22,     0,     0,    31,    15,    25,    32,     0,
+       0,    28,    23,     0,    32,     0,    24
+};
+
+/* YYDEFGOTO[NTERM-NUM].  */
+static const yytype_int8 yydefgoto[] =
+{
+      -1,     2,     3,     7,     8,     9,    10,    20,    12,    13,
+      37,    38,    47,    14,    15,    53,    54,    22,    23,    24,
+      25,    48,    26,    55,    43,    16,    28,    29,    30
+};
+
+/* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
+   STATE-NUM.  */
+#define YYPACT_NINF -36
+static const yytype_int8 yypact[] =
+{
+      10,   -36,     8,     4,   -36,   -36,    46,    12,   -36,    23,
+     -36,   -36,    44,   -36,    12,   -36,     7,    -2,   -36,   -36,
+     -36,    27,   -36,   -36,    45,   -36,   -36,    49,    17,   -36,
+     -36,   -36,    36,    36,   -36,    18,    53,    48,   -36,    39,
+      50,    51,    52,     9,    36,    31,    53,   -36,    54,   -36,
+     -36,    48,   -36,    55,    57,    61,    29,   -36,   -36,   -36,
+     -36,   -36,    46,   -36,   -36,    54,     3,    62,    60,   -36,
+      46,   -36,   -36,    53,    13,   -36,     5,   -36,    64,    40,
+      46,   -36,   -36,    53,   -36,    63,   -36
+};
+
+/* YYPGOTO[NTERM-NUM].  */
+static const yytype_int8 yypgoto[] =
+{
+     -36,   -36,   -36,   -36,    56,   -36,    47,     1,   -36,    28,
+     -36,    41,    32,   -36,    67,    14,    -6,   -36,   -36,   -36,
+      33,   -36,   -36,    37,   -36,    77,    -1,   -35,   -36
+};
+
+/* YYTABLE[YYPACT[STATE-NUM]].  What to do in state STATE-NUM.  If
+   positive, shift that token.  If negative, reduce the rule which
+   number is the opposite.  If zero, do what YYDEFACT says.
+   If YYTABLE_NINF, syntax error.  */
+#define YYTABLE_NINF -57
+static const yytype_int8 yytable[] =
+{
+      21,    56,    17,   -45,    11,   -46,   -56,     5,     4,    36,
+      -5,    68,     5,    18,    19,    35,     1,   -45,     6,   -46,
+      80,     5,    18,    19,    62,   -56,     6,    52,    46,    81,
+      32,    17,    51,    11,     5,    18,    19,    63,    79,     5,
+      66,    72,    73,    65,    39,    40,    41,    42,    85,     5,
+      18,    19,    82,    83,    33,    44,    75,    45,    19,    36,
+      58,    50,    70,    31,    78,    46,   -47,    59,    60,    61,
+      71,    76,    77,   -48,    84,    86,    74,    64,    57,    49,
+      69,    34,    67,    27
+};
+
+static const yytype_uint8 yycheck[] =
+{
+       6,    36,     3,     0,     3,     0,     8,     3,     0,    11,
+       0,    46,     3,     4,     5,     8,     6,    14,    14,    14,
+       7,     3,     4,     5,    15,     8,    14,     9,    11,    16,
+       7,    32,    33,    32,     3,     4,     5,    43,    73,     3,
+       9,    12,    13,    44,    17,    18,    19,    20,    83,     3,
+       4,     5,    12,    13,    10,    10,    62,     8,     5,    11,
+      21,    33,     7,     7,    70,    11,     9,    17,    17,    17,
+       9,     9,    12,     9,    80,    12,    62,    44,    37,    32,
+      48,    14,    45,     6
+};
+
+/* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
+   symbol of state STATE-NUM.  */
+static const yytype_uint8 yystos[] =
+{
+       0,     6,    23,    24,     0,     3,    14,    25,    26,    27,
+      28,    29,    30,    31,    35,    36,    47,    48,     4,     5,
+      29,    38,    39,    40,    41,    42,    44,    47,    48,    49,
+      50,    26,     7,    10,    36,     8,    11,    32,    33,    17,
+      18,    19,    20,    46,    10,     8,    11,    34,    43,    28,
+      31,    48,     9,    37,    38,    45,    49,    33,    21,    17,
+      17,    17,    15,    38,    42,    48,     9,    45,    49,    34,
+       7,     9,    12,    13,    37,    38,     9,    12,    38,    49,
+       7,    16,    12,    13,    38,    49,    12
+};
+
+#define yyerrok		(yyerrstatus = 0)
+#define yyclearin	(yychar = YYEMPTY)
+#define YYEMPTY		(-2)
+#define YYEOF		0
+
+#define YYACCEPT	goto yyacceptlab
+#define YYABORT		goto yyabortlab
+#define YYERROR		goto yyerrorlab
+
+
+/* Like YYERROR except do call yyerror.  This remains here temporarily
+   to ease the transition to the new meaning of YYERROR, for GCC.
+   Once GCC version 2 has supplanted version 1, this can go.  However,
+   YYFAIL appears to be in use.  Nevertheless, it is formally deprecated
+   in Bison 2.4.2's NEWS entry, where a plan to phase it out is
+   discussed.  */
+
+#define YYFAIL		goto yyerrlab
+#if defined YYFAIL
+  /* This is here to suppress warnings from the GCC cpp's
+     -Wunused-macros.  Normally we don't worry about that warning, but
+     some users do, and we want to make it easy for users to remove
+     YYFAIL uses, which will produce warnings from Bison 2.5.  */
+#endif
+
+#define YYRECOVERING()  (!!yyerrstatus)
+
+#define YYBACKUP(Token, Value)					\
+do								\
+  if (yychar == YYEMPTY && yylen == 1)				\
+    {								\
+      yychar = (Token);						\
+      yylval = (Value);						\
+      yytoken = YYTRANSLATE (yychar);				\
+      YYPOPSTACK (1);						\
+      goto yybackup;						\
+    }								\
+  else								\
+    {								\
+      yyerror (parsestate, YY_("syntax error: cannot back up")); \
+      YYERROR;							\
+    }								\
+while (YYID (0))
+
+
+#define YYTERROR	1
+#define YYERRCODE	256
+
+
+/* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N].
+   If N is 0, then set CURRENT to the empty location which ends
+   the previous symbol: RHS[0] (always defined).  */
+
+#define YYRHSLOC(Rhs, K) ((Rhs)[K])
+#ifndef YYLLOC_DEFAULT
+# define YYLLOC_DEFAULT(Current, Rhs, N)				\
+    do									\
+      if (YYID (N))                                                    \
+	{								\
+	  (Current).first_line   = YYRHSLOC (Rhs, 1).first_line;	\
+	  (Current).first_column = YYRHSLOC (Rhs, 1).first_column;	\
+	  (Current).last_line    = YYRHSLOC (Rhs, N).last_line;		\
+	  (Current).last_column  = YYRHSLOC (Rhs, N).last_column;	\
+	}								\
+      else								\
+	{								\
+	  (Current).first_line   = (Current).last_line   =		\
+	    YYRHSLOC (Rhs, 0).last_line;				\
+	  (Current).first_column = (Current).last_column =		\
+	    YYRHSLOC (Rhs, 0).last_column;				\
+	}								\
+    while (YYID (0))
+#endif
+
+
+/* YY_LOCATION_PRINT -- Print the location on the stream.
+   This macro was not mandated originally: define only if we know
+   we won't break user code: when these are the locations we know.  */
+
+#ifndef YY_LOCATION_PRINT
+# if defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL
+#  define YY_LOCATION_PRINT(File, Loc)			\
+     fprintf (File, "%d.%d-%d.%d",			\
+	      (Loc).first_line, (Loc).first_column,	\
+	      (Loc).last_line,  (Loc).last_column)
+# else
+#  define YY_LOCATION_PRINT(File, Loc) ((void) 0)
+# endif
+#endif
+
+
+/* YYLEX -- calling `yylex' with the right arguments.  */
+
+#ifdef YYLEX_PARAM
+# define YYLEX yylex (&yylval, YYLEX_PARAM)
+#else
+# define YYLEX yylex (&yylval, parsestate)
+#endif
+
+/* Enable debugging if requested.  */
+#if YYDEBUG
+
+# ifndef YYFPRINTF
+#  include <stdio.h> /* INFRINGES ON USER NAME SPACE */
+#  define YYFPRINTF fprintf
+# endif
+
+# define YYDPRINTF(Args)			\
+do {						\
+  if (yydebug)					\
+    YYFPRINTF Args;				\
+} while (YYID (0))
+
+# define YY_SYMBOL_PRINT(Title, Type, Value, Location)			  \
+do {									  \
+  if (yydebug)								  \
+    {									  \
+      YYFPRINTF (stderr, "%s ", Title);					  \
+      yy_symbol_print (stderr,						  \
+		  Type, Value, parsestate); \
+      YYFPRINTF (stderr, "\n");						  \
+    }									  \
+} while (YYID (0))
+
+
+/*--------------------------------.
+| Print this symbol on YYOUTPUT.  |
+`--------------------------------*/
+
+/*ARGSUSED*/
+#if (defined __STDC__ || defined __C99__FUNC__ \
+     || defined __cplusplus || defined _MSC_VER)
+static void
+yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep, DCEparsestate* parsestate)
+#else
+static void
+yy_symbol_value_print (yyoutput, yytype, yyvaluep, parsestate)
+    FILE *yyoutput;
+    int yytype;
+    YYSTYPE const * const yyvaluep;
+    DCEparsestate* parsestate;
+#endif
+{
+  if (!yyvaluep)
+    return;
+  YYUSE (parsestate);
+# ifdef YYPRINT
+  if (yytype < YYNTOKENS)
+    YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep);
+# else
+  YYUSE (yyoutput);
+# endif
+  switch (yytype)
+    {
+      default:
+	break;
+    }
+}
+
+
+/*--------------------------------.
+| Print this symbol on YYOUTPUT.  |
+`--------------------------------*/
+
+#if (defined __STDC__ || defined __C99__FUNC__ \
+     || defined __cplusplus || defined _MSC_VER)
+static void
+yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep, DCEparsestate* parsestate)
+#else
+static void
+yy_symbol_print (yyoutput, yytype, yyvaluep, parsestate)
+    FILE *yyoutput;
+    int yytype;
+    YYSTYPE const * const yyvaluep;
+    DCEparsestate* parsestate;
+#endif
+{
+  if (yytype < YYNTOKENS)
+    YYFPRINTF (yyoutput, "token %s (", yytname[yytype]);
+  else
+    YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]);
+
+  yy_symbol_value_print (yyoutput, yytype, yyvaluep, parsestate);
+  YYFPRINTF (yyoutput, ")");
+}
+
+/*------------------------------------------------------------------.
+| yy_stack_print -- Print the state stack from its BOTTOM up to its |
+| TOP (included).                                                   |
+`------------------------------------------------------------------*/
+
+#if (defined __STDC__ || defined __C99__FUNC__ \
+     || defined __cplusplus || defined _MSC_VER)
+static void
+yy_stack_print (yytype_int16 *yybottom, yytype_int16 *yytop)
+#else
+static void
+yy_stack_print (yybottom, yytop)
+    yytype_int16 *yybottom;
+    yytype_int16 *yytop;
+#endif
+{
+  YYFPRINTF (stderr, "Stack now");
+  for (; yybottom <= yytop; yybottom++)
+    {
+      int yybot = *yybottom;
+      YYFPRINTF (stderr, " %d", yybot);
+    }
+  YYFPRINTF (stderr, "\n");
+}
+
+# define YY_STACK_PRINT(Bottom, Top)				\
+do {								\
+  if (yydebug)							\
+    yy_stack_print ((Bottom), (Top));				\
+} while (YYID (0))
+
+
+/*------------------------------------------------.
+| Report that the YYRULE is going to be reduced.  |
+`------------------------------------------------*/
+
+#if (defined __STDC__ || defined __C99__FUNC__ \
+     || defined __cplusplus || defined _MSC_VER)
+static void
+yy_reduce_print (YYSTYPE *yyvsp, int yyrule, DCEparsestate* parsestate)
+#else
+static void
+yy_reduce_print (yyvsp, yyrule, parsestate)
+    YYSTYPE *yyvsp;
+    int yyrule;
+    DCEparsestate* parsestate;
+#endif
+{
+  int yynrhs = yyr2[yyrule];
+  int yyi;
+  unsigned long int yylno = yyrline[yyrule];
+  YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n",
+	     yyrule - 1, yylno);
+  /* The symbols being reduced.  */
+  for (yyi = 0; yyi < yynrhs; yyi++)
+    {
+      YYFPRINTF (stderr, "   $%d = ", yyi + 1);
+      yy_symbol_print (stderr, yyrhs[yyprhs[yyrule] + yyi],
+		       &(yyvsp[(yyi + 1) - (yynrhs)])
+		       		       , parsestate);
+      YYFPRINTF (stderr, "\n");
+    }
+}
+
+# define YY_REDUCE_PRINT(Rule)		\
+do {					\
+  if (yydebug)				\
+    yy_reduce_print (yyvsp, Rule, parsestate); \
+} while (YYID (0))
+
+/* Nonzero means print parse trace.  It is left uninitialized so that
+   multiple parsers can coexist.  */
+int yydebug;
+#else /* !YYDEBUG */
+# define YYDPRINTF(Args)
+# define YY_SYMBOL_PRINT(Title, Type, Value, Location)
+# define YY_STACK_PRINT(Bottom, Top)
+# define YY_REDUCE_PRINT(Rule)
+#endif /* !YYDEBUG */
+
+
+/* YYINITDEPTH -- initial size of the parser's stacks.  */
+#ifndef	YYINITDEPTH
+# define YYINITDEPTH 200
+#endif
+
+/* YYMAXDEPTH -- maximum size the stacks can grow to (effective only
+   if the built-in stack extension method is used).
+
+   Do not make this value too large; the results are undefined if
+   YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH)
+   evaluated with infinite-precision integer arithmetic.  */
+
+#ifndef YYMAXDEPTH
+# define YYMAXDEPTH 10000
+#endif
+
+
+
+
+#if YYERROR_VERBOSE
+
+# ifndef yystrlen
+#  if defined __GLIBC__ && defined _STRING_H
+#   define yystrlen strlen
+#  else
+/* Return the length of YYSTR.  */
+#if (defined __STDC__ || defined __C99__FUNC__ \
+     || defined __cplusplus || defined _MSC_VER)
+static YYSIZE_T
+yystrlen (const char *yystr)
+#else
+static YYSIZE_T
+yystrlen (yystr)
+    const char *yystr;
+#endif
+{
+  YYSIZE_T yylen;
+  for (yylen = 0; yystr[yylen]; yylen++)
+    continue;
+  return yylen;
+}
+#  endif
+# endif
+
+# ifndef yystpcpy
+#  if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE
+#   define yystpcpy stpcpy
+#  else
+/* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in
+   YYDEST.  */
+#if (defined __STDC__ || defined __C99__FUNC__ \
+     || defined __cplusplus || defined _MSC_VER)
+static char *
+yystpcpy (char *yydest, const char *yysrc)
+#else
+static char *
+yystpcpy (yydest, yysrc)
+    char *yydest;
+    const char *yysrc;
+#endif
+{
+  char *yyd = yydest;
+  const char *yys = yysrc;
+
+  while ((*yyd++ = *yys++) != '\0')
+    continue;
+
+  return yyd - 1;
+}
+#  endif
+# endif
+
+# ifndef yytnamerr
+/* Copy to YYRES the contents of YYSTR after stripping away unnecessary
+   quotes and backslashes, so that it's suitable for yyerror.  The
+   heuristic is that double-quoting is unnecessary unless the string
+   contains an apostrophe, a comma, or backslash (other than
+   backslash-backslash).  YYSTR is taken from yytname.  If YYRES is
+   null, do not copy; instead, return the length of what the result
+   would have been.  */
+static YYSIZE_T
+yytnamerr (char *yyres, const char *yystr)
+{
+  if (*yystr == '"')
+    {
+      YYSIZE_T yyn = 0;
+      char const *yyp = yystr;
+
+      for (;;)
+	switch (*++yyp)
+	  {
+	  case '\'':
+	  case ',':
+	    goto do_not_strip_quotes;
+
+	  case '\\':
+	    if (*++yyp != '\\')
+	      goto do_not_strip_quotes;
+	    /* Fall through.  */
+	  default:
+	    if (yyres)
+	      yyres[yyn] = *yyp;
+	    yyn++;
+	    break;
+
+	  case '"':
+	    if (yyres)
+	      yyres[yyn] = '\0';
+	    return yyn;
+	  }
+    do_not_strip_quotes: ;
+    }
+
+  if (! yyres)
+    return yystrlen (yystr);
+
+  return yystpcpy (yyres, yystr) - yyres;
+}
+# endif
+
+/* Copy into YYRESULT an error message about the unexpected token
+   YYCHAR while in state YYSTATE.  Return the number of bytes copied,
+   including the terminating null byte.  If YYRESULT is null, do not
+   copy anything; just return the number of bytes that would be
+   copied.  As a special case, return 0 if an ordinary "syntax error"
+   message will do.  Return YYSIZE_MAXIMUM if overflow occurs during
+   size calculation.  */
+static YYSIZE_T
+yysyntax_error (char *yyresult, int yystate, int yychar)
+{
+  int yyn = yypact[yystate];
+
+  if (! (YYPACT_NINF < yyn && yyn <= YYLAST))
+    return 0;
+  else
+    {
+      int yytype = YYTRANSLATE (yychar);
+      YYSIZE_T yysize0 = yytnamerr (0, yytname[yytype]);
+      YYSIZE_T yysize = yysize0;
+      YYSIZE_T yysize1;
+      int yysize_overflow = 0;
+      enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 };
+      char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM];
+      int yyx;
+
+# if 0
+      /* This is so xgettext sees the translatable formats that are
+	 constructed on the fly.  */
+      YY_("syntax error, unexpected %s");
+      YY_("syntax error, unexpected %s, expecting %s");
+      YY_("syntax error, unexpected %s, expecting %s or %s");
+      YY_("syntax error, unexpected %s, expecting %s or %s or %s");
+      YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s");
+# endif
+      char *yyfmt;
+      char const *yyf;
+      static char const yyunexpected[] = "syntax error, unexpected %s";
+      static char const yyexpecting[] = ", expecting %s";
+      static char const yyor[] = " or %s";
+      char yyformat[sizeof yyunexpected
+		    + sizeof yyexpecting - 1
+		    + ((YYERROR_VERBOSE_ARGS_MAXIMUM - 2)
+		       * (sizeof yyor - 1))];
+      char const *yyprefix = yyexpecting;
+
+      /* Start YYX at -YYN if negative to avoid negative indexes in
+	 YYCHECK.  */
+      int yyxbegin = yyn < 0 ? -yyn : 0;
+
+      /* Stay within bounds of both yycheck and yytname.  */
+      int yychecklim = YYLAST - yyn + 1;
+      int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS;
+      int yycount = 1;
+
+      yyarg[0] = yytname[yytype];
+      yyfmt = yystpcpy (yyformat, yyunexpected);
+
+      for (yyx = yyxbegin; yyx < yyxend; ++yyx)
+	if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR)
+	  {
+	    if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM)
+	      {
+		yycount = 1;
+		yysize = yysize0;
+		yyformat[sizeof yyunexpected - 1] = '\0';
+		break;
+	      }
+	    yyarg[yycount++] = yytname[yyx];
+	    yysize1 = yysize + yytnamerr (0, yytname[yyx]);
+	    yysize_overflow |= (yysize1 < yysize);
+	    yysize = yysize1;
+	    yyfmt = yystpcpy (yyfmt, yyprefix);
+	    yyprefix = yyor;
+	  }
+
+      yyf = YY_(yyformat);
+      yysize1 = yysize + yystrlen (yyf);
+      yysize_overflow |= (yysize1 < yysize);
+      yysize = yysize1;
+
+      if (yysize_overflow)
+	return YYSIZE_MAXIMUM;
+
+      if (yyresult)
+	{
+	  /* Avoid sprintf, as that infringes on the user's name space.
+	     Don't have undefined behavior even if the translation
+	     produced a string with the wrong number of "%s"s.  */
+	  char *yyp = yyresult;
+	  int yyi = 0;
+	  while ((*yyp = *yyf) != '\0')
+	    {
+	      if (*yyp == '%' && yyf[1] == 's' && yyi < yycount)
+		{
+		  yyp += yytnamerr (yyp, yyarg[yyi++]);
+		  yyf += 2;
+		}
+	      else
+		{
+		  yyp++;
+		  yyf++;
+		}
+	    }
+	}
+      return yysize;
+    }
+}
+#endif /* YYERROR_VERBOSE */
+
+
+
+/*-----------------------------------------------.
+| Release the memory associated to this symbol.  |
+`-----------------------------------------------*/
+
+/*ARGSUSED*/
+#if (defined __STDC__ || defined __C99__FUNC__ \
+     || defined __cplusplus || defined _MSC_VER)
+static void
+yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep, DCEparsestate* parsestate)
+#else
+static void
+yydestruct (yymsg, yytype, yyvaluep, parsestate)
+    const char *yymsg;
+    int yytype;
+    YYSTYPE *yyvaluep;
+    DCEparsestate* parsestate;
+#endif
+{
+  YYUSE (yyvaluep);
+  YYUSE (parsestate);
+
+  if (!yymsg)
+    yymsg = "Deleting";
+  YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp);
+
+  switch (yytype)
+    {
+
+      default:
+	break;
+    }
+}
+
+/* Prevent warnings from -Wmissing-prototypes.  */
+#ifdef YYPARSE_PARAM
+#if defined __STDC__ || defined __cplusplus
+int yyparse (void *YYPARSE_PARAM);
+#else
+int yyparse ();
+#endif
+#else /* ! YYPARSE_PARAM */
+#if defined __STDC__ || defined __cplusplus
+int yyparse (DCEparsestate* parsestate);
+#else
+int yyparse ();
+#endif
+#endif /* ! YYPARSE_PARAM */
+
+
+
+
+
+/*-------------------------.
+| yyparse or yypush_parse.  |
+`-------------------------*/
+
+#ifdef YYPARSE_PARAM
+#if (defined __STDC__ || defined __C99__FUNC__ \
+     || defined __cplusplus || defined _MSC_VER)
+int
+yyparse (void *YYPARSE_PARAM)
+#else
+int
+yyparse (YYPARSE_PARAM)
+    void *YYPARSE_PARAM;
+#endif
+#else /* ! YYPARSE_PARAM */
+#if (defined __STDC__ || defined __C99__FUNC__ \
+     || defined __cplusplus || defined _MSC_VER)
+int
+yyparse (DCEparsestate* parsestate)
+#else
+int
+yyparse (parsestate)
+    DCEparsestate* parsestate;
+#endif
+#endif
+{
+/* The lookahead symbol.  */
+int yychar;
+
+/* The semantic value of the lookahead symbol.  */
+YYSTYPE yylval;
+
+    /* Number of syntax errors so far.  */
+    int yynerrs;
+
+    int yystate;
+    /* Number of tokens to shift before error messages enabled.  */
+    int yyerrstatus;
+
+    /* The stacks and their tools:
+       `yyss': related to states.
+       `yyvs': related to semantic values.
+
+       Refer to the stacks thru separate pointers, to allow yyoverflow
+       to reallocate them elsewhere.  */
+
+    /* The state stack.  */
+    yytype_int16 yyssa[YYINITDEPTH];
+    yytype_int16 *yyss;
+    yytype_int16 *yyssp;
+
+    /* The semantic value stack.  */
+    YYSTYPE yyvsa[YYINITDEPTH];
+    YYSTYPE *yyvs;
+    YYSTYPE *yyvsp;
+
+    YYSIZE_T yystacksize;
+
+  int yyn;
+  int yyresult;
+  /* Lookahead token as an internal (translated) token number.  */
+  int yytoken;
+  /* The variables used to return semantic value and location from the
+     action routines.  */
+  YYSTYPE yyval;
+
+#if YYERROR_VERBOSE
+  /* Buffer for error messages, and its allocated size.  */
+  char yymsgbuf[128];
+  char *yymsg = yymsgbuf;
+  YYSIZE_T yymsg_alloc = sizeof yymsgbuf;
+#endif
+
+#define YYPOPSTACK(N)   (yyvsp -= (N), yyssp -= (N))
+
+  /* The number of symbols on the RHS of the reduced rule.
+     Keep to zero when no symbol should be popped.  */
+  int yylen = 0;
+
+  yytoken = 0;
+  yyss = yyssa;
+  yyvs = yyvsa;
+  yystacksize = YYINITDEPTH;
+
+  YYDPRINTF ((stderr, "Starting parse\n"));
+
+  yystate = 0;
+  yyerrstatus = 0;
+  yynerrs = 0;
+  yychar = YYEMPTY; /* Cause a token to be read.  */
+
+  /* Initialize stack pointers.
+     Waste one element of value and location stack
+     so that they stay on the same level as the state stack.
+     The wasted elements are never initialized.  */
+  yyssp = yyss;
+  yyvsp = yyvs;
+
+  goto yysetstate;
+
+/*------------------------------------------------------------.
+| yynewstate -- Push a new state, which is found in yystate.  |
+`------------------------------------------------------------*/
+ yynewstate:
+  /* In all cases, when you get here, the value and location stacks
+     have just been pushed.  So pushing a state here evens the stacks.  */
+  yyssp++;
+
+ yysetstate:
+  *yyssp = yystate;
+
+  if (yyss + yystacksize - 1 <= yyssp)
+    {
+      /* Get the current used size of the three stacks, in elements.  */
+      YYSIZE_T yysize = yyssp - yyss + 1;
+
+#ifdef yyoverflow
+      {
+	/* Give user a chance to reallocate the stack.  Use copies of
+	   these so that the &'s don't force the real ones into
+	   memory.  */
+	YYSTYPE *yyvs1 = yyvs;
+	yytype_int16 *yyss1 = yyss;
+
+	/* Each stack pointer address is followed by the size of the
+	   data in use in that stack, in bytes.  This used to be a
+	   conditional around just the two extra args, but that might
+	   be undefined if yyoverflow is a macro.  */
+	yyoverflow (YY_("memory exhausted"),
+		    &yyss1, yysize * sizeof (*yyssp),
+		    &yyvs1, yysize * sizeof (*yyvsp),
+		    &yystacksize);
+
+	yyss = yyss1;
+	yyvs = yyvs1;
+      }
+#else /* no yyoverflow */
+# ifndef YYSTACK_RELOCATE
+      goto yyexhaustedlab;
+# else
+      /* Extend the stack our own way.  */
+      if (YYMAXDEPTH <= yystacksize)
+	goto yyexhaustedlab;
+      yystacksize *= 2;
+      if (YYMAXDEPTH < yystacksize)
+	yystacksize = YYMAXDEPTH;
+
+      {
+	yytype_int16 *yyss1 = yyss;
+	union yyalloc *yyptr =
+	  (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
+	if (! yyptr)
+	  goto yyexhaustedlab;
+	YYSTACK_RELOCATE (yyss_alloc, yyss);
+	YYSTACK_RELOCATE (yyvs_alloc, yyvs);
+#  undef YYSTACK_RELOCATE
+	if (yyss1 != yyssa)
+	  YYSTACK_FREE (yyss1);
+      }
+# endif
+#endif /* no yyoverflow */
+
+      yyssp = yyss + yysize - 1;
+      yyvsp = yyvs + yysize - 1;
+
+      YYDPRINTF ((stderr, "Stack size increased to %lu\n",
+		  (unsigned long int) yystacksize));
+
+      if (yyss + yystacksize - 1 <= yyssp)
+	YYABORT;
+    }
+
+  YYDPRINTF ((stderr, "Entering state %d\n", yystate));
+
+  if (yystate == YYFINAL)
+    YYACCEPT;
+
+  goto yybackup;
+
+/*-----------.
+| yybackup.  |
+`-----------*/
+yybackup:
+
+  /* Do appropriate processing given the current state.  Read a
+     lookahead token if we need one and don't already have one.  */
+
+  /* First try to decide what to do without reference to lookahead token.  */
+  yyn = yypact[yystate];
+  if (yyn == YYPACT_NINF)
+    goto yydefault;
+
+  /* Not known => get a lookahead token if don't already have one.  */
+
+  /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol.  */
+  if (yychar == YYEMPTY)
+    {
+      YYDPRINTF ((stderr, "Reading a token: "));
+      yychar = YYLEX;
+    }
+
+  if (yychar <= YYEOF)
+    {
+      yychar = yytoken = YYEOF;
+      YYDPRINTF ((stderr, "Now at end of input.\n"));
+    }
+  else
+    {
+      yytoken = YYTRANSLATE (yychar);
+      YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc);
+    }
+
+  /* If the proper action on seeing token YYTOKEN is to reduce or to
+     detect an error, take that action.  */
+  yyn += yytoken;
+  if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken)
+    goto yydefault;
+  yyn = yytable[yyn];
+  if (yyn <= 0)
+    {
+      if (yyn == 0 || yyn == YYTABLE_NINF)
+	goto yyerrlab;
+      yyn = -yyn;
+      goto yyreduce;
+    }
+
+  /* Count tokens shifted since error; after three, turn off error
+     status.  */
+  if (yyerrstatus)
+    yyerrstatus--;
+
+  /* Shift the lookahead token.  */
+  YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc);
+
+  /* Discard the shifted token.  */
+  yychar = YYEMPTY;
+
+  yystate = yyn;
+  *++yyvsp = yylval;
+
+  goto yynewstate;
+
+
+/*-----------------------------------------------------------.
+| yydefault -- do the default action for the current state.  |
+`-----------------------------------------------------------*/
+yydefault:
+  yyn = yydefact[yystate];
+  if (yyn == 0)
+    goto yyerrlab;
+  goto yyreduce;
+
+
+/*-----------------------------.
+| yyreduce -- Do a reduction.  |
+`-----------------------------*/
+yyreduce:
+  /* yyn is the number of a rule to reduce with.  */
+  yylen = yyr2[yyn];
+
+  /* If YYLEN is nonzero, implement the default value of the action:
+     `$$ = $1'.
+
+     Otherwise, the following line sets YYVAL to garbage.
+     This behavior is undocumented and Bison
+     users should not rely upon it.  Assigning to YYVAL
+     unconditionally makes the parser a bit smaller, and it avoids a
+     GCC warning that YYVAL may be used uninitialized.  */
+  yyval = yyvsp[1-yylen];
+
+
+  YY_REDUCE_PRINT (yyn);
+  switch (yyn)
+    {
+        case 8:
+
+/* Line 1464 of yacc.c  */
+#line 43 "dce.y"
+    {projections(parsestate,(yyvsp[(1) - (1)]));;}
+    break;
+
+  case 9:
+
+/* Line 1464 of yacc.c  */
+#line 47 "dce.y"
+    {selections(parsestate,(yyvsp[(1) - (1)]));;}
+    break;
+
+  case 10:
+
+/* Line 1464 of yacc.c  */
+#line 52 "dce.y"
+    {(yyval)=projectionlist(parsestate,(Object)null,(yyvsp[(1) - (1)]));;}
+    break;
+
+  case 11:
+
+/* Line 1464 of yacc.c  */
+#line 54 "dce.y"
+    {(yyval)=projectionlist(parsestate,(yyvsp[(1) - (3)]),(yyvsp[(3) - (3)]));;}
+    break;
+
+  case 12:
+
+/* Line 1464 of yacc.c  */
+#line 59 "dce.y"
+    {(yyval)=projection(parsestate,(yyvsp[(1) - (1)]));;}
+    break;
+
+  case 13:
+
+/* Line 1464 of yacc.c  */
+#line 61 "dce.y"
+    {(yyval)=(yyvsp[(1) - (1)]);;}
+    break;
+
+  case 14:
+
+/* Line 1464 of yacc.c  */
+#line 66 "dce.y"
+    {(yyval)=function(parsestate,(yyvsp[(1) - (3)]),null);;}
+    break;
+
+  case 15:
+
+/* Line 1464 of yacc.c  */
+#line 68 "dce.y"
+    {(yyval)=function(parsestate,(yyvsp[(1) - (4)]),(yyvsp[(3) - (4)]));;}
+    break;
+
+  case 16:
+
+/* Line 1464 of yacc.c  */
+#line 73 "dce.y"
+    {(yyval)=segmentlist(parsestate,null,(yyvsp[(1) - (1)]));;}
+    break;
+
+  case 17:
+
+/* Line 1464 of yacc.c  */
+#line 75 "dce.y"
+    {(yyval)=segmentlist(parsestate,(yyvsp[(1) - (3)]),(yyvsp[(3) - (3)]));;}
+    break;
+
+  case 18:
+
+/* Line 1464 of yacc.c  */
+#line 80 "dce.y"
+    {(yyval)=segment(parsestate,(yyvsp[(1) - (1)]),null);;}
+    break;
+
+  case 19:
+
+/* Line 1464 of yacc.c  */
+#line 82 "dce.y"
+    {(yyval)=segment(parsestate,(yyvsp[(1) - (2)]),(yyvsp[(2) - (2)]));;}
+    break;
+
+  case 20:
+
+/* Line 1464 of yacc.c  */
+#line 87 "dce.y"
+    {(yyval)=rangelist(parsestate,null,(yyvsp[(1) - (1)]));;}
+    break;
+
+  case 21:
+
+/* Line 1464 of yacc.c  */
+#line 89 "dce.y"
+    {(yyval)=rangelist(parsestate,(yyvsp[(1) - (2)]),(yyvsp[(2) - (2)]));;}
+    break;
+
+  case 22:
+
+/* Line 1464 of yacc.c  */
+#line 94 "dce.y"
+    {(yyval)=range(parsestate,(yyvsp[(2) - (3)]),null,null);;}
+    break;
+
+  case 23:
+
+/* Line 1464 of yacc.c  */
+#line 96 "dce.y"
+    {(yyval)=range(parsestate,(yyvsp[(2) - (5)]),null,(yyvsp[(4) - (5)]));;}
+    break;
+
+  case 24:
+
+/* Line 1464 of yacc.c  */
+#line 98 "dce.y"
+    {(yyval)=range(parsestate,(yyvsp[(2) - (7)]),(yyvsp[(4) - (7)]),(yyvsp[(6) - (7)]));;}
+    break;
+
+  case 25:
+
+/* Line 1464 of yacc.c  */
+#line 102 "dce.y"
+    {(yyval) = range1(parsestate,(yyvsp[(2) - (3)]));;}
+    break;
+
+  case 26:
+
+/* Line 1464 of yacc.c  */
+#line 108 "dce.y"
+    {(yyval)=clauselist(parsestate,null,(yyvsp[(1) - (1)]));;}
+    break;
+
+  case 27:
+
+/* Line 1464 of yacc.c  */
+#line 110 "dce.y"
+    {(yyval)=clauselist(parsestate,(yyvsp[(1) - (2)]),(yyvsp[(2) - (2)]));;}
+    break;
+
+  case 28:
+
+/* Line 1464 of yacc.c  */
+#line 115 "dce.y"
+    {(yyval)=sel_clause(parsestate,1,(yyvsp[(2) - (6)]),(yyvsp[(3) - (6)]),(yyvsp[(5) - (6)]));;}
+    break;
+
+  case 29:
+
+/* Line 1464 of yacc.c  */
+#line 117 "dce.y"
+    {(yyval)=sel_clause(parsestate,2,(yyvsp[(2) - (4)]),(yyvsp[(3) - (4)]),(yyvsp[(4) - (4)]));;}
+    break;
+
+  case 30:
+
+/* Line 1464 of yacc.c  */
+#line 119 "dce.y"
+    {(yyval)=(yyvsp[(1) - (2)]);;}
+    break;
+
+  case 31:
+
+/* Line 1464 of yacc.c  */
+#line 124 "dce.y"
+    {(yyval)=value_list(parsestate,null,(yyvsp[(1) - (1)]));;}
+    break;
+
+  case 32:
+
+/* Line 1464 of yacc.c  */
+#line 126 "dce.y"
+    {(yyval)=value_list(parsestate,(yyvsp[(1) - (3)]),(yyvsp[(3) - (3)]));;}
+    break;
+
+  case 33:
+
+/* Line 1464 of yacc.c  */
+#line 131 "dce.y"
+    {(yyval)=value(parsestate,(yyvsp[(1) - (1)]));;}
+    break;
+
+  case 34:
+
+/* Line 1464 of yacc.c  */
+#line 133 "dce.y"
+    {(yyval)=value(parsestate,(yyvsp[(1) - (1)]));;}
+    break;
+
+  case 35:
+
+/* Line 1464 of yacc.c  */
+#line 135 "dce.y"
+    {(yyval)=value(parsestate,(yyvsp[(1) - (1)]));;}
+    break;
+
+  case 36:
+
+/* Line 1464 of yacc.c  */
+#line 140 "dce.y"
+    {(yyval)=constant(parsestate,(yyvsp[(1) - (1)]),SCAN_NUMBERCONST);;}
+    break;
+
+  case 37:
+
+/* Line 1464 of yacc.c  */
+#line 142 "dce.y"
+    {(yyval)=constant(parsestate,(yyvsp[(1) - (1)]),SCAN_STRINGCONST);;}
+    break;
+
+  case 38:
+
+/* Line 1464 of yacc.c  */
+#line 147 "dce.y"
+    {(yyval)=var(parsestate,(yyvsp[(1) - (1)]));;}
+    break;
+
+  case 39:
+
+/* Line 1464 of yacc.c  */
+#line 152 "dce.y"
+    {(yyval)=indexpath(parsestate,null,(yyvsp[(1) - (1)]));;}
+    break;
+
+  case 40:
+
+/* Line 1464 of yacc.c  */
+#line 154 "dce.y"
+    {(yyval)=indexpath(parsestate,(yyvsp[(1) - (3)]),(yyvsp[(3) - (3)]));;}
+    break;
+
+  case 41:
+
+/* Line 1464 of yacc.c  */
+#line 159 "dce.y"
+    {(yyval)=indexer(parsestate,(yyvsp[(1) - (1)]),null);;}
+    break;
+
+  case 42:
+
+/* Line 1464 of yacc.c  */
+#line 161 "dce.y"
+    {(yyval)=indexer(parsestate,(yyvsp[(1) - (2)]),(yyvsp[(2) - (2)]));;}
+    break;
+
+  case 43:
+
+/* Line 1464 of yacc.c  */
+#line 166 "dce.y"
+    {(yyval)=array_indices(parsestate,null,(yyvsp[(1) - (1)]));;}
+    break;
+
+  case 44:
+
+/* Line 1464 of yacc.c  */
+#line 168 "dce.y"
+    {(yyval)=array_indices(parsestate,(yyvsp[(1) - (2)]),(yyvsp[(2) - (2)]));;}
+    break;
+
+  case 45:
+
+/* Line 1464 of yacc.c  */
+#line 173 "dce.y"
+    {(yyval)=function(parsestate,(yyvsp[(1) - (3)]),null);;}
+    break;
+
+  case 46:
+
+/* Line 1464 of yacc.c  */
+#line 175 "dce.y"
+    {(yyval)=function(parsestate,(yyvsp[(1) - (4)]),(yyvsp[(3) - (4)]));;}
+    break;
+
+  case 47:
+
+/* Line 1464 of yacc.c  */
+#line 180 "dce.y"
+    {(yyval)=arg_list(parsestate,null,(yyvsp[(1) - (1)]));;}
+    break;
+
+  case 48:
+
+/* Line 1464 of yacc.c  */
+#line 182 "dce.y"
+    {(yyval)=arg_list(parsestate,(yyvsp[(1) - (3)]),(yyvsp[(3) - (3)]));;}
+    break;
+
+  case 49:
+
+/* Line 1464 of yacc.c  */
+#line 186 "dce.y"
+    {(yyval)=makeselectiontag(CEO_EQ);;}
+    break;
+
+  case 50:
+
+/* Line 1464 of yacc.c  */
+#line 187 "dce.y"
+    {(yyval)=makeselectiontag(CEO_GT);;}
+    break;
+
+  case 51:
+
+/* Line 1464 of yacc.c  */
+#line 188 "dce.y"
+    {(yyval)=makeselectiontag(CEO_LT);;}
+    break;
+
+  case 52:
+
+/* Line 1464 of yacc.c  */
+#line 189 "dce.y"
+    {(yyval)=makeselectiontag(CEO_NEQ);;}
+    break;
+
+  case 53:
+
+/* Line 1464 of yacc.c  */
+#line 190 "dce.y"
+    {(yyval)=makeselectiontag(CEO_GE);;}
+    break;
+
+  case 54:
+
+/* Line 1464 of yacc.c  */
+#line 191 "dce.y"
+    {(yyval)=makeselectiontag(CEO_LE);;}
+    break;
+
+  case 55:
+
+/* Line 1464 of yacc.c  */
+#line 192 "dce.y"
+    {(yyval)=makeselectiontag(CEO_RE);;}
+    break;
+
+  case 56:
+
+/* Line 1464 of yacc.c  */
+#line 196 "dce.y"
+    {(yyval) = (yyvsp[(1) - (1)]);;}
+    break;
+
+  case 57:
+
+/* Line 1464 of yacc.c  */
+#line 200 "dce.y"
+    {(yyval) = checkobject((yyvsp[(1) - (1)]));;}
+    break;
+
+  case 58:
+
+/* Line 1464 of yacc.c  */
+#line 204 "dce.y"
+    {(yyval) = checkobject((yyvsp[(1) - (1)]));;}
+    break;
+
+  case 59:
+
+/* Line 1464 of yacc.c  */
+#line 208 "dce.y"
+    {(yyval) = checkobject((yyvsp[(1) - (1)]));;}
+    break;
+
+
+
+/* Line 1464 of yacc.c  */
+#line 1786 "dce.tab.c"
+      default: break;
+    }
+  YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc);
+
+  YYPOPSTACK (yylen);
+  yylen = 0;
+  YY_STACK_PRINT (yyss, yyssp);
+
+  *++yyvsp = yyval;
+
+  /* Now `shift' the result of the reduction.  Determine what state
+     that goes to, based on the state we popped back to and the rule
+     number reduced by.  */
+
+  yyn = yyr1[yyn];
+
+  yystate = yypgoto[yyn - YYNTOKENS] + *yyssp;
+  if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp)
+    yystate = yytable[yystate];
+  else
+    yystate = yydefgoto[yyn - YYNTOKENS];
+
+  goto yynewstate;
+
+
+/*------------------------------------.
+| yyerrlab -- here on detecting error |
+`------------------------------------*/
+yyerrlab:
+  /* If not already recovering from an error, report this error.  */
+  if (!yyerrstatus)
+    {
+      ++yynerrs;
+#if ! YYERROR_VERBOSE
+      yyerror (parsestate, YY_("syntax error"));
+#else
+      {
+	YYSIZE_T yysize = yysyntax_error (0, yystate, yychar);
+	if (yymsg_alloc < yysize && yymsg_alloc < YYSTACK_ALLOC_MAXIMUM)
+	  {
+	    YYSIZE_T yyalloc = 2 * yysize;
+	    if (! (yysize <= yyalloc && yyalloc <= YYSTACK_ALLOC_MAXIMUM))
+	      yyalloc = YYSTACK_ALLOC_MAXIMUM;
+	    if (yymsg != yymsgbuf)
+	      YYSTACK_FREE (yymsg);
+	    yymsg = (char *) YYSTACK_ALLOC (yyalloc);
+	    if (yymsg)
+	      yymsg_alloc = yyalloc;
+	    else
+	      {
+		yymsg = yymsgbuf;
+		yymsg_alloc = sizeof yymsgbuf;
+	      }
+	  }
+
+	if (0 < yysize && yysize <= yymsg_alloc)
+	  {
+	    (void) yysyntax_error (yymsg, yystate, yychar);
+	    yyerror (parsestate, yymsg);
+	  }
+	else
+	  {
+	    yyerror (parsestate, YY_("syntax error"));
+	    if (yysize != 0)
+	      goto yyexhaustedlab;
+	  }
+      }
+#endif
+    }
+
+
+
+  if (yyerrstatus == 3)
+    {
+      /* If just tried and failed to reuse lookahead token after an
+	 error, discard it.  */
+
+      if (yychar <= YYEOF)
+	{
+	  /* Return failure if at end of input.  */
+	  if (yychar == YYEOF)
+	    YYABORT;
+	}
+      else
+	{
+	  yydestruct ("Error: discarding",
+		      yytoken, &yylval, parsestate);
+	  yychar = YYEMPTY;
+	}
+    }
+
+  /* Else will try to reuse lookahead token after shifting the error
+     token.  */
+  goto yyerrlab1;
+
+
+/*---------------------------------------------------.
+| yyerrorlab -- error raised explicitly by YYERROR.  |
+`---------------------------------------------------*/
+yyerrorlab:
+
+  /* Pacify compilers like GCC when the user code never invokes
+     YYERROR and the label yyerrorlab therefore never appears in user
+     code.  */
+  if (/*CONSTCOND*/ 0)
+     goto yyerrorlab;
+
+  /* Do not reclaim the symbols of the rule which action triggered
+     this YYERROR.  */
+  YYPOPSTACK (yylen);
+  yylen = 0;
+  YY_STACK_PRINT (yyss, yyssp);
+  yystate = *yyssp;
+  goto yyerrlab1;
+
+
+/*-------------------------------------------------------------.
+| yyerrlab1 -- common code for both syntax error and YYERROR.  |
+`-------------------------------------------------------------*/
+yyerrlab1:
+  yyerrstatus = 3;	/* Each real token shifted decrements this.  */
+
+  for (;;)
+    {
+      yyn = yypact[yystate];
+      if (yyn != YYPACT_NINF)
+	{
+	  yyn += YYTERROR;
+	  if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR)
+	    {
+	      yyn = yytable[yyn];
+	      if (0 < yyn)
+		break;
+	    }
+	}
+
+      /* Pop the current state because it cannot handle the error token.  */
+      if (yyssp == yyss)
+	YYABORT;
+
+
+      yydestruct ("Error: popping",
+		  yystos[yystate], yyvsp, parsestate);
+      YYPOPSTACK (1);
+      yystate = *yyssp;
+      YY_STACK_PRINT (yyss, yyssp);
+    }
+
+  *++yyvsp = yylval;
+
+
+  /* Shift the error token.  */
+  YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp);
+
+  yystate = yyn;
+  goto yynewstate;
+
+
+/*-------------------------------------.
+| yyacceptlab -- YYACCEPT comes here.  |
+`-------------------------------------*/
+yyacceptlab:
+  yyresult = 0;
+  goto yyreturn;
+
+/*-----------------------------------.
+| yyabortlab -- YYABORT comes here.  |
+`-----------------------------------*/
+yyabortlab:
+  yyresult = 1;
+  goto yyreturn;
+
+#if !defined(yyoverflow) || YYERROR_VERBOSE
+/*-------------------------------------------------.
+| yyexhaustedlab -- memory exhaustion comes here.  |
+`-------------------------------------------------*/
+yyexhaustedlab:
+  yyerror (parsestate, YY_("memory exhausted"));
+  yyresult = 2;
+  /* Fall through.  */
+#endif
+
+yyreturn:
+  if (yychar != YYEMPTY)
+     yydestruct ("Cleanup: discarding lookahead",
+		 yytoken, &yylval, parsestate);
+  /* Do not reclaim the symbols of the rule which action triggered
+     this YYABORT or YYACCEPT.  */
+  YYPOPSTACK (yylen);
+  YY_STACK_PRINT (yyss, yyssp);
+  while (yyssp != yyss)
+    {
+      yydestruct ("Cleanup: popping",
+		  yystos[*yyssp], yyvsp, parsestate);
+      YYPOPSTACK (1);
+    }
+#ifndef yyoverflow
+  if (yyss != yyssa)
+    YYSTACK_FREE (yyss);
+#endif
+#if YYERROR_VERBOSE
+  if (yymsg != yymsgbuf)
+    YYSTACK_FREE (yymsg);
+#endif
+  /* Make sure YYID is used.  */
+  return YYID (yyresult);
+}
+
+
+
+/* Line 1684 of yacc.c  */
+#line 211 "dce.y"
+
+
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/src_netcdf4/dcetab.h
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/src_netcdf4/dcetab.h	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/src_netcdf4/dcetab.h	(revision 1749)
@@ -0,0 +1,58 @@
+/* A Bison parser, made by GNU Bison 2.4.3.  */
+
+/* Skeleton interface for Bison's Yacc-like parsers in C
+   
+      Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
+   2009, 2010 Free Software Foundation, Inc.
+   
+   This program is free software: you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation, either version 3 of the License, or
+   (at your option) any later version.
+   
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+   
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
+
+/* As a special exception, you may create a larger work that contains
+   part or all of the Bison parser skeleton and distribute that work
+   under terms of your choice, so long as that work isn't itself a
+   parser generator using the skeleton or a modified version thereof
+   as a parser skeleton.  Alternatively, if you modify or redistribute
+   the parser skeleton itself, you may (at your option) remove this
+   special exception, which will cause the skeleton and the resulting
+   Bison output files to be licensed under the GNU General Public
+   License without this special exception.
+   
+   This special exception was added by the Free Software Foundation in
+   version 2.2 of Bison.  */
+
+
+/* Tokens.  */
+#ifndef YYTOKENTYPE
+# define YYTOKENTYPE
+   /* Put the tokens into the symbol table, so that GDB and other debuggers
+      know about them.  */
+   enum yytokentype {
+     SCAN_WORD = 258,
+     SCAN_STRINGCONST = 259,
+     SCAN_NUMBERCONST = 260
+   };
+#endif
+
+
+
+#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
+typedef int YYSTYPE;
+# define YYSTYPE_IS_TRIVIAL 1
+# define yystype YYSTYPE /* obsolescent; will be withdrawn */
+# define YYSTYPE_IS_DECLARED 1
+#endif
+
+
+
+
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/src_netcdf4/dcompound.c
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/src_netcdf4/dcompound.c	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/src_netcdf4/dcompound.c	(revision 1749)
@@ -0,0 +1,489 @@
+/*! \file
+  Functions for Compound Types
+
+  Copyright 2011 University Corporation for Atmospheric
+  Research/Unidata. See \ref copyright file for more info. */
+
+#include "ncdispatch.h"
+
+/** \name Compound Types
+    Functions to create and learn about compound types. */
+/*! \{ */ /* All these functions are part of this named group... */
+
+
+/** \ingroup user_types
+
+Create a compound type. Provide an ncid, a name, and a total size (in
+bytes) of one element of the completed compound type.
+
+After calling this function, fill out the type with repeated calls to
+nc_insert_compound(). Call nc_insert_compound() once for each field
+you wish to insert into the compound type.
+
+\param ncid \ref ncid
+\param size The size, in bytes, of the compound type. 
+\param name \ref object_name of the created type.
+\param typeidp The type ID of the new type is copied here. 
+
+\returns ::NC_NOERR No error.
+\returns ::NC_EBADID Bad \ref ncid.
+\returns ::NC_EBADTYPE Bad type id.
+\returns ::NC_ENAMEINUSE That name is in use.
+\returns ::NC_EMAXNAME Name exceeds max length NC_MAX_NAME.
+\returns ::NC_EBADNAME Name contains illegal characters.
+\returns ::NC_ESTRICTNC3 Attempting a netCDF-4 operation on a netCDF-3 file.
+\returns ::NC_ENOTNC4 This file was created with the strict netcdf-3 flag, therefore netcdf-4 operations are not allowed. (see nc_open).
+\returns ::NC_EHDFERR An error was reported by the HDF5 layer.
+\returns ::NC_EPERM Attempt to write to a read-only file.
+\returns ::NC_ENOTINDEFINE Not in define mode. 
+
+\section Example
+
+\code
+struct s1
+{
+int i1;
+int i2;
+};
+struct s1 data[DIM_LEN], data_in[DIM_LEN];
+ 
+if (nc_create(FILE_NAME, NC_NETCDF4, &ncid)) ERR;
+if (nc_def_compound(ncid, sizeof(struct s1), SVC_REC, &typeid)) ERR;
+if (nc_insert_compound(ncid, typeid, BATTLES_WITH_KLINGONS,
+HOFFSET(struct s1, i1), NC_INT)) ERR;
+if (nc_insert_compound(ncid, typeid, DATES_WITH_ALIENS,
+HOFFSET(struct s1, i2), NC_INT)) ERR;
+if (nc_def_dim(ncid, STARDATE, DIM_LEN, &dimid)) ERR;
+if (nc_def_var(ncid, SERVICE_RECORD, typeid, 1, dimids, &varid)) ERR;
+if (nc_put_var(ncid, varid, data)) ERR;
+if (nc_close(ncid)) ERR;
+\endcode
+*/
+int
+nc_def_compound(int ncid, size_t size, const char *name, 
+		nc_type *typeidp)
+{
+   NC* ncp;
+   int stat = NC_check_id(ncid,&ncp);
+   if(stat != NC_NOERR) return stat;
+   return ncp->dispatch->def_compound(ncid,size,name,typeidp);
+}
+
+/** \ingroup user_types
+Insert a named field into a compound type.
+
+\param ncid \ref ncid
+
+\param xtype The typeid for this compound type, as returned by
+nc_def_compound(), or nc_inq_var().
+
+\param name The \ref object_name of the new field.
+
+\param offset Offset in byte from the beginning of the compound type
+for this field.
+
+\param field_typeid The type of the field to be inserted. 
+
+\returns ::NC_NOERR No error.
+\returns ::NC_EBADID Bad \ref ncid.
+\returns ::NC_EBADTYPE Bad type id.
+\returns ::NC_ENAMEINUSE That name is in use.
+\returns ::NC_EMAXNAME Name exceeds max length NC_MAX_NAME.
+\returns ::NC_EBADNAME Name contains illegal characters.
+\returns ::NC_ENOTNC4 Not an netCDF-4 file, or classic model enabled.
+\returns ::NC_EHDFERR An error was reported by the HDF5 layer.
+\returns ::NC_EPERM Attempt to write to a read-only file.
+\returns ::NC_ENOTINDEFINE Not in define mode. 
+*/
+int
+nc_insert_compound(int ncid, nc_type xtype, const char *name, 
+		   size_t offset, nc_type field_typeid)
+{
+   NC *ncp;
+   int stat = NC_check_id(ncid, &ncp);
+   if(stat != NC_NOERR) return stat;
+   return ncp->dispatch->insert_compound(ncid, xtype, name,
+					 offset, field_typeid);
+}
+
+/** \ingroup user_types
+Insert a named array field into a compound type.
+
+\param ncid \ref ncid
+
+\param xtype The typeid for this compound type, as returned by
+nc_def_compound(), or nc_inq_var().
+
+\param name The \ref object_name of the new field.
+
+\param offset Offset in byte from the beginning of the compound type
+for this field.
+
+\param field_typeid The type of the field to be inserted. 
+
+ \param ndims Number of dimensions in array.
+
+ \param dim_sizes Array of dimension sizes.
+
+\returns ::NC_NOERR No error.
+\returns ::NC_EBADID Bad \ref ncid.
+\returns ::NC_EBADTYPE Bad type id.
+\returns ::NC_ENAMEINUSE That name is in use.
+\returns ::NC_EMAXNAME Name exceeds max length NC_MAX_NAME.
+\returns ::NC_EBADNAME Name contains illegal characters.
+\returns ::NC_ESTRICTNC3 Attempting a netCDF-4 operation on a netCDF-3 file.
+\returns ::NC_ENOTNC4 Not an netCDF-4 file, or classic model enabled.
+\returns ::NC_EHDFERR An error was reported by the HDF5 layer.
+\returns ::NC_EPERM Attempt to write to a read-only file.
+\returns ::NC_ENOTINDEFINE Not in define mode. 
+*/
+int
+nc_insert_array_compound(int ncid, nc_type xtype, const char *name, 
+			 size_t offset, nc_type field_typeid, 
+			 int ndims, const int *dim_sizes)
+{
+   NC* ncp;
+   int stat = NC_check_id(ncid,&ncp);
+   if(stat != NC_NOERR) return stat;
+   return ncp->dispatch->insert_array_compound(ncid,xtype,name,offset,field_typeid,ndims,dim_sizes);
+}
+
+/**  \ingroup user_types
+Learn about a compound type. Get the number of fields, len, and
+name of a compound type.
+
+\param ncid \ref ncid
+
+\param xtype The typeid for this compound type, as returned by
+nc_def_compound(), or nc_inq_var().
+
+\param name Returned \ref object_name of compound type. \ref
+ignored_if_null.
+
+\param sizep Returned size of compound type in bytes. \ref ignored_if_null.
+
+\param nfieldsp The number of fields in the compound type will be
+placed here. \ref ignored_if_null.
+
+\returns ::NC_NOERR No error.
+\returns ::NC_EBADID Bad \ref ncid.
+\returns ::NC_EBADTYPE Bad type id.
+\returns ::NC_ENOTNC4 Not an netCDF-4 file, or classic model enabled.
+\returns ::NC_EHDFERR An error was reported by the HDF5 layer.
+ */
+int
+nc_inq_compound(int ncid, nc_type xtype, char *name, 
+		size_t *sizep, size_t *nfieldsp)
+{
+   int class = 0;
+   int stat = nc_inq_user_type(ncid,xtype,name,sizep,NULL,nfieldsp,&class);
+   if(stat != NC_NOERR) return stat;
+   if(class != NC_COMPOUND) stat = NC_EBADTYPE;
+   return stat;
+}
+
+/**  \ingroup user_types
+Learn the name of a compound type.
+
+\param ncid \ref ncid
+
+\param xtype The typeid for this compound type, as returned by
+nc_def_compound(), or nc_inq_var().
+
+\param name Returned \ref object_name of compound type. \ref
+ignored_if_null.
+
+\returns ::NC_NOERR No error.
+\returns ::NC_EBADID Bad \ref ncid.
+\returns ::NC_EBADTYPE Bad type id.
+\returns ::NC_ENOTNC4 Not an netCDF-4 file, or classic model enabled.
+\returns ::NC_EHDFERR An error was reported by the HDF5 layer.
+ */
+int
+nc_inq_compound_name(int ncid, nc_type xtype, char *name)
+{
+   return nc_inq_compound(ncid,xtype,name,NULL,NULL);
+}
+
+/**  \ingroup user_types
+Learn the size of a compound type. 
+
+\param ncid \ref ncid
+
+\param xtype The typeid for this compound type, as returned by
+nc_def_compound(), or nc_inq_var().
+
+\param sizep Returned size of compound type in bytes. \ref
+ignored_if_null.
+
+\returns ::NC_NOERR No error.
+\returns ::NC_EBADID Bad \ref ncid.
+\returns ::NC_EBADTYPE Bad type id.
+\returns ::NC_ENOTNC4 Not an netCDF-4 file, or classic model enabled.
+\returns ::NC_EHDFERR An error was reported by the HDF5 layer.
+ */
+int
+nc_inq_compound_size(int ncid, nc_type xtype, size_t *sizep)
+{
+   return nc_inq_compound(ncid,xtype,NULL,sizep,NULL);
+}
+
+/**  \ingroup user_types
+Learn the number of fields in a compound type. 
+
+\param ncid \ref ncid
+
+\param xtype The typeid for this compound type, as returned by
+nc_def_compound(), or nc_inq_var().
+
+\param nfieldsp The number of fields in the compound type will be
+placed here. \ref ignored_if_null.
+
+\returns ::NC_NOERR No error.
+\returns ::NC_EBADID Bad \ref ncid.
+\returns ::NC_EBADTYPE Bad type id.
+\returns ::NC_ENOTNC4 Not an netCDF-4 file, or classic model enabled.
+\returns ::NC_EHDFERR An error was reported by the HDF5 layer.
+ */
+int
+nc_inq_compound_nfields(int ncid, nc_type xtype, size_t *nfieldsp)
+{
+   return nc_inq_compound(ncid,xtype,NULL,NULL,nfieldsp);
+}
+
+/**  \ingroup user_types
+Get information about one of the fields of a compound type. 
+
+\param ncid \ref ncid
+
+\param xtype The typeid for this compound type, as returned by
+nc_def_compound(), or nc_inq_var().
+
+\param fieldid A zero-based index number specifying a field in the
+compound type.
+
+\param name Returned \ref object_name of the field. \ref
+ignored_if_null.
+
+\param offsetp A pointer which will get the offset of the field. \ref
+ignored_if_null.
+
+\param field_typeidp A pointer which will get the typeid of the
+field. \ref ignored_if_null.
+
+\param ndimsp A pointer which will get the number of dimensions of the
+field. \ref ignored_if_null.
+
+\param dim_sizesp A pointer which will get the dimension sizes of the
+field. \ref ignored_if_null.
+
+\returns ::NC_NOERR No error.
+\returns ::NC_EBADID Bad \ref ncid.
+\returns ::NC_EBADTYPE Bad type id.
+\returns ::NC_ENOTNC4 Not an netCDF-4 file, or classic model enabled.
+\returns ::NC_EHDFERR An error was reported by the HDF5 layer.
+ */
+int
+nc_inq_compound_field(int ncid, nc_type xtype, int fieldid, 
+		      char *name, size_t *offsetp, 
+		      nc_type *field_typeidp, int *ndimsp, 
+		      int *dim_sizesp)
+{
+   NC* ncp;
+   int stat = NC_check_id(ncid,&ncp);
+   if(stat != NC_NOERR) return stat;
+   return ncp->dispatch->inq_compound_field(ncid, xtype, fieldid,
+					    name, offsetp, field_typeidp,
+					    ndimsp, dim_sizesp);
+}
+
+/**  \ingroup user_types
+Get information about one of the fields of a compound type. 
+
+\param ncid \ref ncid
+
+\param xtype The typeid for this compound type, as returned by
+nc_def_compound(), or nc_inq_var().
+
+\param fieldid A zero-based index number specifying a field in the
+compound type.
+
+\param name Returned \ref object_name of the field. \ref
+ignored_if_null.
+
+\returns ::NC_NOERR No error.
+\returns ::NC_EBADID Bad \ref ncid.
+\returns ::NC_EBADTYPE Bad type id.
+\returns ::NC_ENOTNC4 Not an netCDF-4 file, or classic model enabled.
+\returns ::NC_EHDFERR An error was reported by the HDF5 layer.
+ */
+int
+nc_inq_compound_fieldname(int ncid, nc_type xtype, int fieldid, 
+			  char *name)
+{
+   NC* ncp;
+   int stat = NC_check_id(ncid,&ncp);
+   if(stat != NC_NOERR) return stat;
+   return ncp->dispatch->inq_compound_field(ncid, xtype, fieldid,
+					    name, NULL, NULL, NULL,
+					    NULL);
+}
+
+/**  \ingroup user_types
+Get information about one of the fields of a compound type. 
+
+\param ncid \ref ncid
+
+\param xtype The typeid for this compound type, as returned by
+nc_def_compound(), or nc_inq_var().
+
+\param fieldid A zero-based index number specifying a field in the
+compound type.
+
+\param offsetp A pointer which will get the offset of the field. \ref
+ignored_if_null.
+
+\returns ::NC_NOERR No error.
+\returns ::NC_EBADID Bad \ref ncid.
+\returns ::NC_EBADTYPE Bad type id.
+\returns ::NC_ENOTNC4 Not an netCDF-4 file, or classic model enabled.
+\returns ::NC_EHDFERR An error was reported by the HDF5 layer.
+ */
+int
+nc_inq_compound_fieldoffset(int ncid, nc_type xtype, int fieldid, 
+			    size_t *offsetp)
+{
+   NC* ncp;
+   int stat = NC_check_id(ncid,&ncp);
+   if(stat != NC_NOERR) return stat;
+   return ncp->dispatch->inq_compound_field(ncid,xtype,fieldid,NULL,offsetp,NULL,NULL,NULL);
+}
+
+/**  \ingroup user_types
+Get information about one of the fields of a compound type. 
+
+\param ncid \ref ncid
+
+\param xtype The typeid for this compound type, as returned by
+nc_def_compound(), or nc_inq_var().
+
+\param fieldid A zero-based index number specifying a field in the
+compound type.
+
+\param field_typeidp A pointer which will get the typeid of the
+field. \ref ignored_if_null.
+
+\returns ::NC_NOERR No error.
+\returns ::NC_EBADID Bad \ref ncid.
+\returns ::NC_EBADTYPE Bad type id.
+\returns ::NC_ENOTNC4 Not an netCDF-4 file, or classic model enabled.
+\returns ::NC_EHDFERR An error was reported by the HDF5 layer.
+ */
+int
+nc_inq_compound_fieldtype(int ncid, nc_type xtype, int fieldid, 
+			  nc_type *field_typeidp)
+{
+   NC* ncp;
+   int stat = NC_check_id(ncid,&ncp);
+   if(stat != NC_NOERR) return stat;
+   return ncp->dispatch->inq_compound_field(ncid,xtype,fieldid,NULL,NULL,field_typeidp,NULL,NULL);
+}
+
+/**  \ingroup user_types
+Get information about one of the fields of a compound type. 
+
+\param ncid \ref ncid
+
+\param xtype The typeid for this compound type, as returned by
+nc_def_compound(), or nc_inq_var().
+
+\param fieldid A zero-based index number specifying a field in the
+compound type.
+
+\param ndimsp A pointer which will get the number of dimensions of the
+field. \ref ignored_if_null.
+
+\returns ::NC_NOERR No error.
+\returns ::NC_EBADID Bad \ref ncid.
+\returns ::NC_EBADTYPE Bad type id.
+\returns ::NC_ENOTNC4 Not an netCDF-4 file, or classic model enabled.
+\returns ::NC_EHDFERR An error was reported by the HDF5 layer.
+ */
+int
+nc_inq_compound_fieldndims(int ncid, nc_type xtype, int fieldid, 
+			   int *ndimsp)
+{
+   NC* ncp;
+   int stat = NC_check_id(ncid,&ncp);
+   if(stat != NC_NOERR) return stat;
+   return ncp->dispatch->inq_compound_field(ncid,xtype,fieldid,NULL,NULL,NULL,ndimsp,NULL);
+}
+
+/**  \ingroup user_types
+Get information about one of the fields of a compound type. 
+
+\param ncid \ref ncid
+
+\param xtype The typeid for this compound type, as returned by
+nc_def_compound(), or nc_inq_var().
+
+\param fieldid A zero-based index number specifying a field in the
+compound type.
+
+\param dim_sizesp A pointer which will get the dimension sizes of the
+field. \ref ignored_if_null.
+
+\returns ::NC_NOERR No error.
+\returns ::NC_EBADID Bad \ref ncid.
+\returns ::NC_EBADTYPE Bad type id.
+\returns ::NC_ENOTNC4 Not an netCDF-4 file, or classic model enabled.
+\returns ::NC_EHDFERR An error was reported by the HDF5 layer.
+ */
+int
+nc_inq_compound_fielddim_sizes(int ncid, nc_type xtype, int fieldid, 
+			       int *dim_sizesp)
+{
+   NC *ncp;
+   int stat = NC_check_id(ncid, &ncp);
+   if(stat != NC_NOERR) return stat;
+   return ncp->dispatch->inq_compound_field(ncid, xtype, fieldid,
+					    NULL, NULL, NULL, NULL,
+					    dim_sizesp);
+}
+
+/**  \ingroup user_types
+Learn the Index of a Named Field in a Compound Type. Get the index
+ * of a field in a compound type from the name.
+
+\param ncid \ref ncid
+
+\param xtype The typeid for this compound type, as returned by
+nc_def_compound(), or nc_inq_var().
+
+\param name \ref object_name of the field. \ref ignored_if_null.
+
+\param fieldidp A pointer which will get the index of the named
+field. \ref ignored_if_null.
+
+\returns ::NC_NOERR No error.
+\returns ::NC_EBADID Bad \ref ncid.
+\returns ::NC_EBADTYPE Bad type id.
+\returns ::NC_ENOTNC4 Not an netCDF-4 file, or classic model enabled.
+\returns ::NC_EHDFERR An error was reported by the HDF5 layer.
+ */
+int
+nc_inq_compound_fieldindex(int ncid, nc_type xtype, const char *name, 
+			   int *fieldidp)
+{
+   NC* ncp;
+   int stat = NC_check_id(ncid,&ncp);
+   if(stat != NC_NOERR) return stat;
+   return ncp->dispatch->inq_compound_fieldindex(ncid,xtype,name,fieldidp);
+}
+/*! \} */  /* End of named group ...*/
+
+
+
+
+
+
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/src_netcdf4/dcopy.c
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/src_netcdf4/dcopy.c	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/src_netcdf4/dcopy.c	(revision 1749)
@@ -0,0 +1,619 @@
+/* Copyright 2010 University Corporation for Atmospheric
+   Research/Unidata. See COPYRIGHT file for more info.
+
+   This file has the var and att copy functions.
+
+   "$Id: copy.c,v 1.1 2010/06/01 15:46:49 ed Exp $" 
+*/
+
+#include "ncdispatch.h"
+#include <nc_logging.h>
+
+#ifdef USE_NETCDF4
+/* Compare two netcdf types for equality. Must have the ncids as well,
+   to find user-defined types. */
+static int
+NC_compare_nc_types(int ncid1, int typeid1, int ncid2, int typeid2, 
+		    int *equalp)
+{
+   int ret = NC_NOERR;
+
+   /* If you don't care about the answer, neither do I! */
+   if(equalp == NULL) 
+      return NC_NOERR;
+
+   /* Assume the types are not equal. If we find any inequality, then
+      exit with NC_NOERR and we're done. */
+   *equalp = 0;
+
+   /* Atomic types are so easy! */
+   if (typeid1 <= NC_MAX_ATOMIC_TYPE) 
+   {
+      if (typeid2 != typeid1) 
+	 return NC_NOERR;
+      *equalp = 1;
+   }
+   else 
+   {
+      int i, ret, equal1;
+      char name1[NC_MAX_NAME];
+      char name2[NC_MAX_NAME];
+      size_t size1, size2;
+      nc_type base1, base2;
+      size_t nelems1, nelems2;
+      int class1, class2;
+      void* value1 = NULL;
+      void* value2 = NULL;
+      size_t offset1, offset2;
+      nc_type ftype1, ftype2;
+      int ndims1, ndims2;
+      int dimsizes1[NC_MAX_VAR_DIMS];
+      int dimsizes2[NC_MAX_VAR_DIMS];
+
+      /* Find out about the two types. */
+      if ((ret = nc_inq_user_type(ncid1, typeid1, name1, &size1,
+				  &base1, &nelems1, &class1)))
+	 return ret;      
+      if ((ret = nc_inq_user_type(ncid2, typeid2, name2, &size2,
+				  &base2, &nelems2, &class2)))
+	 return ret;      
+
+      /* Check the obvious. */
+      if(size1 != size2 || class1 != class2 || strcmp(name1,name2))
+	 return NC_NOERR;
+
+      /* Check user-defined types in detail. */
+      switch(class1) 
+      {
+	 case NC_VLEN:
+	    if((ret = NC_compare_nc_types(ncid1, base1, ncid2,
+					  base1, &equal1)))
+	       return ret;
+	    if(!equal1) 
+	       return NC_NOERR;
+	    break;
+	 case NC_OPAQUE:
+	    /* Already checked size above. */
+	    break;
+	 case NC_ENUM:
+	    if(base1 != base2 || nelems1 != nelems2) return NC_NOERR;
+
+	    if (!(value1 = malloc(size1)))
+	       return NC_ENOMEM;
+	    if (!(value2 = malloc(size2)))
+	       return NC_ENOMEM;
+
+	    for(i = 0; i < nelems1; i++) 
+	    {
+	       if ((ret = nc_inq_enum_member(ncid1, typeid1, i, name1,
+					     value1)) ||
+		   (ret = nc_inq_enum_member(ncid2, typeid2, i, name2,
+					     value2)) ||
+		   strcmp(name1, name2) || memcmp(value1, value2, size1))
+	       {
+		  free(value1); 
+		  free(value2);
+		  return ret;
+	       }
+	    }
+	    free(value1); 
+	    free(value2);
+	    break;
+	 case NC_COMPOUND:
+	    if(nelems1 != nelems2) 
+	       return NC_NOERR;
+
+	    /* Compare each field. Each must be equal! */
+	    for(i = 0; i < nelems1; i++) 
+	    {
+	       int j;
+	       if ((ret = nc_inq_compound_field(ncid1, typeid1, i, name1, &offset1, 
+						&ftype1, &ndims1, dimsizes1)))
+		  return ret;
+	       if ((ret = nc_inq_compound_field(ncid2, typeid2, i, name2, &offset2,
+						&ftype2, &ndims2, dimsizes2)))
+		  return ret;
+	       if(ndims1 != ndims2) 
+		  return NC_NOERR;
+	       for(j = 0; j < ndims1;j++) 
+		  if(dimsizes1[j] != dimsizes2[j]) 
+		     return NC_NOERR;
+
+	       /* Compare user-defined field types. */
+	       if((ret = NC_compare_nc_types(ncid1, ftype1, ncid2, ftype2,
+					     &equal1)))
+		  return ret;
+	       if(!equal1) 
+		  return NC_NOERR;
+	    }
+	    break;
+	 default:
+	    return NC_EINVAL;
+      }
+      *equalp = 1;
+   }
+   return ret;
+}
+
+/* Recursively hunt for a netCDF type id. (Code from nc4internal.c);
+   Return matching typeid or 0 if not found. */
+static int
+NC_rec_find_nc_type(int ncid1, nc_type tid1, int ncid2, nc_type* tid2)
+{
+   int i,ret = NC_NOERR;
+   int nids;
+   int* ids = NULL;
+
+   /* Get all types in grp ncid2 */
+   if(tid2) 
+      *tid2 = 0;
+   if ((ret = nc_inq_typeids(ncid2, &nids, NULL)))
+      return ret;
+   if (nids)
+   {
+      if (!(ids = (int *)malloc(nids * sizeof(int))))
+	 return NC_ENOMEM;
+      if ((ret = nc_inq_typeids(ncid2, &nids, ids)))
+	 return ret;
+      for(i = 0; i < nids; i++) 
+      {
+	 int equal = 0;
+	 if ((ret = NC_compare_nc_types(ncid1, tid1, ncid2, ids[i], &equal)))
+	    return ret;
+	 if(equal) 
+	 {
+	    if(tid2) 
+	       *tid2 = ids[i]; 
+	    free(ids);
+	    return NC_NOERR;
+	 }
+      }
+      free(ids);
+   }
+   
+   /* recurse */
+   if ((ret = nc_inq_grps(ncid1, &nids, NULL)))
+      return ret;
+   if (nids)
+   {
+      if (!(ids = (int *)malloc(nids * sizeof(int))))
+	 return NC_ENOMEM;
+      if ((ret = nc_inq_grps(ncid1, &nids, ids)))
+      {
+	 free(ids);
+	 return ret;
+      }
+      for (i = 0; i < nids; i++) 
+      {
+	 ret = NC_rec_find_nc_type(ncid1, tid1, ids[i], tid2);
+	 if (ret && ret != NC_EBADTYPE) 
+	    break;
+	 if (tid2 && *tid2 != 0) /* found */
+	 {
+	    free(ids);
+	    return NC_NOERR;
+	 }
+      }
+      free(ids);
+   }
+   return NC_EBADTYPE; /* not found */
+}
+
+/* Given a type in one file, find its equal (if any) in another
+ * file. It sounds so simple, but it's a real pain! */
+static int
+NC_find_equal_type(int ncid1, nc_type xtype1, int ncid2, nc_type *xtype2)
+{
+   int ret = NC_NOERR;
+
+   /* Check input */
+   if(xtype1 <= NC_NAT) 
+      return NC_EINVAL;
+
+   /* Handle atomic types. */
+   if (xtype1 <= NC_MAX_ATOMIC_TYPE) 
+   {
+      if(xtype2) 
+	 *xtype2 = xtype1;
+      return NC_NOERR;
+   }
+
+   /* Recursively search group ncid2 and its children
+      to find a type that is equal (using compare_type)
+      to xtype1. */
+   ret = NC_rec_find_nc_type(ncid1, xtype1 , ncid2, xtype2);
+   return ret;
+}
+
+#endif /* USE_NETCDF4 */
+
+/* This will copy a variable from one file to another, assuming
+   dimensions in output file are already defined and have same
+   dimension ids.
+
+   This function must work even if the files are different formats,
+   (i.e. one old netcdf, the other hdf5-netcdf.)
+
+   But if you're copying into a netcdf-3 file, from a netcdf-4 file,
+   you must be copying a var of one of the six netcdf-3
+   types. Similarly for the attributes. */
+int
+nc_copy_var(int ncid_in, int varid_in, int ncid_out)
+{
+   char name[NC_MAX_NAME + 1];
+   char att_name[NC_MAX_NAME + 1];
+   nc_type xtype;
+   int ndims, dimids[NC_MAX_VAR_DIMS], natts, real_ndims;
+   int varid_out;
+   int a, d;
+   void *data = NULL;
+   size_t *count = NULL, *start = NULL;
+   size_t reclen = 1;
+   size_t *dimlen = NULL;
+   int retval = NC_NOERR;
+   size_t type_size;
+   int src_format, dest_format;
+   char type_name[NC_MAX_NAME+1];
+
+   /* Learn about this var. */
+   if ((retval = nc_inq_var(ncid_in, varid_in, name, &xtype, 
+                            &ndims, dimids, &natts)))
+      return retval;
+
+#ifdef USE_NETCDF4
+   LOG((2, "nc_copy_var: ncid_in 0x%x varid_in %d ncid_out 0x%x", 
+        ncid_in, varid_in, ncid_out));
+#endif
+
+   /* Make sure we are not trying to write into a netcdf-3 file
+    * anything that won't fit in netcdf-3. */
+   if ((retval = nc_inq_format(ncid_in, &src_format)))
+      return retval;
+   if ((retval = nc_inq_format(ncid_out, &dest_format)))
+      return retval;
+   if ((dest_format == NC_FORMAT_CLASSIC || dest_format == NC_FORMAT_64BIT) &&
+       src_format == NC_FORMAT_NETCDF4 && xtype > NC_DOUBLE)
+      return NC_ENOTNC4;
+
+   /* Later on, we will need to know the size of this type. */
+   if ((retval = nc_inq_type(ncid_in, xtype, type_name, &type_size)))
+      return retval;
+#ifdef USE_NETCDF4
+   LOG((3, "type %s has size %d", type_name, type_size));
+#endif
+
+   /* Switch back to define mode, and create the output var. */
+   retval = nc_redef(ncid_out);
+   if (retval && retval != NC_EINDEFINE)
+      BAIL(retval);
+   if ((retval = nc_def_var(ncid_out, name, xtype,
+                            ndims, dimids, &varid_out)))
+      BAIL(retval);
+
+   /* Copy the attributes. */
+   for (a=0; a<natts; a++)
+   {
+      if ((retval = nc_inq_attname(ncid_in, varid_in, a, att_name)))
+         BAIL(retval);
+      if ((retval = nc_copy_att(ncid_in, varid_in, att_name, 
+				ncid_out, varid_out)))
+         BAIL(retval);
+   }
+
+   /* End define mode, to write metadata and create file. */
+   nc_enddef(ncid_out);
+   nc_sync(ncid_out);
+
+   /* Allocate memory for our start and count arrays. If ndims = 0
+      this is a scalar, which I will treat as a 1-D array with one
+      element. */
+   real_ndims = ndims ? ndims : 1;
+   if (!(start = malloc(real_ndims * sizeof(size_t))))
+      BAIL(NC_ENOMEM);
+   if (!(count = malloc(real_ndims * sizeof(size_t))))
+      BAIL(NC_ENOMEM);
+
+   /* The start array will be all zeros, except the first element,
+      which will be the record number. Count will be the dimension
+      size, except for the first element, which will be one, because
+      we will copy one record at a time. For this we need the var
+      shape. */
+   if (!(dimlen = malloc(real_ndims * sizeof(size_t))))
+      BAIL(NC_ENOMEM);
+
+   /* Find out how much data. */
+   for (d=0; d<ndims; d++)
+   {
+      if ((retval = nc_inq_dimlen(ncid_in, dimids[d], &dimlen[d])))
+         BAIL(retval);
+#ifdef USE_NETCDF4
+      LOG((4, "nc_copy_var: there are %d data", dimlen[d]));
+#endif
+   }
+
+   /* If this is really a scalar, then set the dimlen to 1. */
+   if (ndims == 0)
+      dimlen[0] = 1;
+
+   for (d=0; d<real_ndims; d++)
+   {
+      start[d] = 0;
+      count[d] = d ? dimlen[d] : 1;
+      if (d) reclen *= dimlen[d];
+   }
+
+   /* If there are no records, we're done. */
+   if (!dimlen[0])
+      goto exit;
+
+   /* Allocate memory for one record. */
+   if (!(data = malloc(reclen * type_size)))
+      return NC_ENOMEM;
+   
+   /* Copy the var data one record at a time. */
+   for (start[0]=0; !retval && start[0]<(size_t)dimlen[0]; start[0]++)
+   {
+      switch (xtype)
+      {
+	 case NC_BYTE:
+	    retval = nc_get_vara_schar(ncid_in, varid_in, start, count,
+				       (signed char *)data);
+	    if (!retval)
+	       retval = nc_put_vara_schar(ncid_out, varid_out, start, count, 
+					  (const signed char *)data);
+	    break;
+	 case NC_CHAR:
+	    retval = nc_get_vara_text(ncid_in, varid_in, start, count,
+				      (char *)data);
+	    if (!retval)
+	       retval = nc_put_vara_text(ncid_out, varid_out, start, count, 
+					 (char *)data);
+	    break;
+	 case NC_SHORT:
+	    retval = nc_get_vara_short(ncid_in, varid_in, start, count,
+				       (short *)data);
+	    if (!retval)
+	       retval = nc_put_vara_short(ncid_out, varid_out, start, count,
+					  (short *)data);
+	    break;
+	 case NC_INT:
+	    retval = nc_get_vara_int(ncid_in, varid_in, start, count,
+				     (int *)data);
+	    if (!retval)
+	       retval = nc_put_vara_int(ncid_out, varid_out, start, count,
+					(int *)data);
+	    break;
+	 case NC_FLOAT:
+	    retval = nc_get_vara_float(ncid_in, varid_in, start, count,
+				       (float *)data);
+	    if (!retval)
+	       retval = nc_put_vara_float(ncid_out, varid_out, start, count,
+					  (float *)data);
+	    break;
+	 case NC_DOUBLE:
+	    retval = nc_get_vara_double(ncid_in, varid_in, start, count,
+					(double *)data);
+	    if (!retval)
+	       retval = nc_put_vara_double(ncid_out, varid_out, start, count, 
+					   (double *)data);
+	    break;
+	 case NC_UBYTE:
+	    retval = nc_get_vara_uchar(ncid_in, varid_in, start, count,
+				       (unsigned char *)data);
+	    if (!retval)
+	       retval = nc_put_vara_uchar(ncid_out, varid_out, start, count, 
+					  (unsigned char *)data);
+	    break;
+	 case NC_USHORT:
+	    retval = nc_get_vara_ushort(ncid_in, varid_in, start, count,
+					(unsigned short *)data);
+	    if (!retval)
+	       retval = nc_put_vara_ushort(ncid_out, varid_out, start, count, 
+					   (unsigned short *)data);
+	    break;
+	 case NC_UINT:
+	    retval = nc_get_vara_uint(ncid_in, varid_in, start, count,
+				      (unsigned int *)data);
+	    if (!retval)
+	       retval = nc_put_vara_uint(ncid_out, varid_out, start, count, 
+					 (unsigned int *)data);
+	    break;
+	 case NC_INT64:
+	    retval = nc_get_vara_longlong(ncid_in, varid_in, start, count,
+					  (long long *)data);
+	    if (!retval)
+	       retval = nc_put_vara_longlong(ncid_out, varid_out, start, count, 
+					     (long long *)data);
+	    break;
+	 case NC_UINT64:
+	    retval = nc_get_vara_ulonglong(ncid_in, varid_in, start, count,
+					   (unsigned long long *)data);
+	    if (!retval)
+	       retval = nc_put_vara_ulonglong(ncid_out, varid_out, start, count, 
+					      (unsigned long long *)data);
+	    break;
+	 default:
+	    retval = NC_EBADTYPE;
+      }
+   }
+    
+  exit:
+   if (data) free(data);
+   if (dimlen) free(dimlen);
+   if (start) free(start);
+   if (count) free(count);
+   return retval;
+}
+
+static int
+NC_copy_att(int ncid_in, int varid_in, const char *name, 
+	    int ncid_out, int varid_out)
+{
+   nc_type xtype;
+   size_t len;
+   void *data=NULL;
+   int res;
+   
+   LOG((2, "nc_copy_att: ncid_in 0x%x varid_in %d name %s", 
+	ncid_in, varid_in, name));
+   
+   /* Find out about the attribute to be copied. */
+   if ((res = nc_inq_att(ncid_in, varid_in, name, &xtype, &len)))
+      return res;
+   
+   if (xtype < NC_STRING) 
+   {
+      /* Handle non-string atomic types. */
+      if (len) 
+	 if (!(data = malloc(len * NC_atomictypelen(xtype))))
+	    return NC_ENOMEM;
+
+      res = nc_get_att(ncid_in, varid_in, name, data);
+      if (!res)
+	 res = nc_put_att(ncid_out, varid_out, name, xtype, 
+			  len, data);
+      if (len)
+	 free(data);
+   }
+#ifdef USE_NETCDF4
+   else if (xtype == NC_STRING) 
+   {
+      /* Copy string attributes. */
+      char **str_data;
+      if (!(str_data = malloc(sizeof(char *) * len)))
+	 return NC_ENOMEM;
+      res = nc_get_att_string(ncid_in, varid_in, name, str_data);
+      if (!res)
+	 res = nc_put_att_string(ncid_out, varid_out, name, len, 
+				 (const char **)str_data);
+      nc_free_string(len, str_data);
+      free(str_data);
+   } 
+   else 
+   {
+      /* Copy user-defined type attributes. */
+      int class;
+      size_t size;
+      void *data;
+      nc_type xtype_out = NC_NAT;
+
+      /* Find out if there is an equal type in the output file. */
+      /* Note: original code used a libsrc4 specific internal function
+	 which we had to "duplicate" here */
+      if ((res = NC_find_equal_type(ncid_in, xtype, ncid_out, &xtype_out)))
+	 return res;
+      if (xtype_out) 
+      {
+	 /* We found an equal type! */
+	 if ((res = nc_inq_user_type(ncid_in, xtype, NULL, &size, 
+				    NULL, NULL, &class)))
+	    return res;
+	 if (class == NC_VLEN) /* VLENs are different... */
+	 { 
+	    nc_vlen_t *vldata;
+	    int i;
+	    if (!(vldata = malloc(sizeof(nc_vlen_t) * len)))
+	       return NC_ENOMEM;
+	    if ((res = nc_get_att(ncid_in, varid_in, name, vldata)))
+	       return res;
+	    if ((res = nc_put_att(ncid_out, varid_out, name, xtype_out, 
+				 len, vldata)))
+	       return res;
+	    for (i = 0; i < len; i++) 
+	       if((res = nc_free_vlen(&vldata[i]))) 
+		  return res;
+	    free(vldata);
+         } 
+	 else /* not VLEN */
+	 {
+	    if (!(data = malloc(size * len)))
+	       return NC_ENOMEM;
+	    res = nc_get_att(ncid_in, varid_in, name, data);
+	    if (!res)
+	       res = nc_put_att(ncid_out, varid_out, name, xtype_out, len, data);
+	    free(data);
+         }
+      }
+   }
+#endif /*!USE_NETCDF4*/
+   return res;
+}
+
+/* Copy an attribute from one open file to another.
+
+   Special programming challenge: this function must work even if one
+   of the other of the files is a netcdf version 1.0 file (i.e. not
+   HDF5). So only use top level netcdf api functions. 
+
+   From the netcdf-3 docs: The output netCDF dataset should be in
+   define mode if the attribute to be copied does not already exist
+   for the target variable, or if it would cause an existing target
+   attribute to grow.
+*/
+int
+nc_copy_att(int ncid_in, int varid_in, const char *name, 
+	    int ncid_out, int varid_out)
+{
+   int format, target_natts, target_attid;
+   char att_name[NC_MAX_NAME + 1];
+   int a, retval;
+
+   /* What is the destination format? */
+   if ((retval = nc_inq_format(ncid_out, &format)))
+      return retval;
+   
+   /* Can't copy to same var in same file. */
+   if (ncid_in == ncid_out && varid_in == varid_out)
+      return NC_NOERR;
+   
+   /* For classic model netCDF-4 files, order of attributes must be
+    * maintained during copies. We MUST MAINTAIN ORDER! */
+   if (format == NC_FORMAT_NETCDF4_CLASSIC)
+   {
+      /* Does this attribute already exist in the target file? */
+      retval = nc_inq_attid(ncid_out, varid_out, name, &target_attid);
+      if (retval == NC_ENOTATT)
+      {
+	 /* Attribute does not exist. No order to be preserved. */
+	 return NC_copy_att(ncid_in, varid_in, name, ncid_out, varid_out);
+      }
+      else if (retval == NC_NOERR)
+      {
+	 /* How many atts for this var? */
+	 if ((retval = nc_inq_varnatts(ncid_out, varid_out, &target_natts)))
+	    return retval;
+
+	 /* If this is the last attribute in the target file, we are
+	  * off the hook. */
+	 if (target_attid == target_natts - 1)
+	    return NC_copy_att(ncid_in, varid_in, name, ncid_out, varid_out);
+	 
+	 /* Order MUST BE MAINTAINED! Copy all existing atts in the target
+	  * file, stopping at our target att. */
+	 for (a = 0; a < target_natts; a++)
+	 {
+	    if (a == target_attid)
+	    {
+	       if ((retval = NC_copy_att(ncid_in, varid_in, name, ncid_out, varid_out)))
+		  return retval;
+	    } 
+	    else
+	    {
+	       if ((retval = nc_inq_attname(ncid_out, varid_out, a, att_name)))
+		  return retval;
+	       if ((retval = NC_copy_att(ncid_out, varid_out, att_name, 
+					 ncid_out, varid_out)))
+		  return retval;
+	    }
+	 }
+      }
+      else
+	 return retval; /* Some other error occured. */
+   }
+   else
+      return NC_copy_att(ncid_in, varid_in, name, ncid_out, varid_out);
+
+   return NC_NOERR;
+}
+
+
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/src_netcdf4/ddim.c
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/src_netcdf4/ddim.c	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/src_netcdf4/ddim.c	(revision 1749)
@@ -0,0 +1,445 @@
+/** \file 
+Dimension functions
+
+These functions define and inquire about dimensions.
+
+Copyright 2010 University Corporation for Atmospheric
+Research/Unidata. See COPYRIGHT file for more info.
+*/
+
+#include "ncdispatch.h"
+
+/*! \defgroup dimensions Dimensions 
+
+Dimensions are used to define the shape of data in netCDF.
+
+Dimensions for a netCDF dataset are defined when it is created, while
+the netCDF dataset is in define mode. Additional dimensions may be
+added later by reentering define mode. A netCDF dimension has a name
+and a length. In a netCDF classic or 64-bit offset file, at most one
+dimension can have the unlimited length, which means variables using
+this dimension can grow along this dimension. In a netCDF-4 file
+multiple unlimited dimensions are supported.
+
+There is a suggested limit (100) to the number of dimensions that can
+be defined in a single netCDF dataset. The limit is the value of the
+predefined macro NC_MAX_DIMS. The purpose of the limit is to make
+writing generic applications simpler. They need only provide an array
+of NC_MAX_DIMS dimensions to handle any netCDF dataset. The
+implementation of the netCDF library does not enforce this advisory
+maximum, so it is possible to use more dimensions, if necessary, but
+netCDF utilities that assume the advisory maximums may not be able to
+handle the resulting netCDF datasets.
+
+Ordinarily, the name and length of a dimension are fixed when the
+dimension is first defined. The name may be changed later, but the
+length of a dimension (other than the unlimited dimension) cannot be
+changed without copying all the data to a new netCDF dataset with a
+redefined dimension length.
+
+Dimension lengths in the C interface are type size_t rather than type
+int to make it possible to access all the data in a netCDF dataset on
+a platform that only supports a 16-bit int data type, for example
+MSDOS. If dimension lengths were type int instead, it would not be
+possible to access data from variables with a dimension length greater
+than a 16-bit int can accommodate.
+
+A netCDF dimension in an open netCDF dataset is referred to by a small
+integer called a dimension ID. In the C interface, dimension IDs are
+0, 1, 2, ..., in the order in which the dimensions were defined.
+
+Operations supported on dimensions are:
+- Create a dimension, given its name and length.
+- Get a dimension ID from its name.
+- Get a dimension's name and length from its ID.
+- Rename a dimension. 
+*/
+/**@{*/
+
+/*!  Define a new dimension. The function nc_def_dim adds a new
+dimension to an open netCDF dataset in define mode. It returns (as an
+argument) a dimension ID, given the netCDF ID, the dimension name, and
+the dimension length. At most one unlimited length dimension, called
+the record dimension, may be defined for each classic or 64-bit offset
+netCDF dataset. NetCDF-4 datasets may have multiple unlimited
+dimensions.
+
+\param ncid NetCDF or group ID, from a previous call to nc_open(),
+nc_create(), nc_def_grp(), or associated inquiry functions such as 
+nc_inq_ncid().
+
+\param name Name of the dimension to be created.
+
+\param len Length of the dimension to be created. Use NC_UNLIMITED for
+unlimited dimensions.
+
+\param idp Pointer where dimension ID will be stored.
+
+\retval ::NC_NOERR No error.
+\returns ::NC_EBADID Not a valid ID.
+\returns ::NC_ENOTINDEFINE Not in define mode.
+\returns ::NC_EDIMSIZE Invalid dimension size.
+\returns ::NC_EUNLIMIT NC_UNLIMITED size already in use
+\returns ::NC_EMAXDIMS NC_MAX_DIMS exceeded
+\returns ::NC_ENAMEINUSE String match to name in use
+\returns ::NC_ENOMEM Memory allocation (malloc) failure
+\returns ::NC_EPERM Write to read only
+
+\section Example
+
+Here is an example using nc_def_dim() to create a dimension named lat of
+length 18 and a unlimited dimension named rec in a new netCDF dataset
+named foo.nc:
+
+\code
+     #include <netcdf.h>
+        ...
+     int status, ncid, latid, recid;
+        ...
+     status = nc_create("foo.nc", NC_NOCLOBBER, &ncid);
+     if (status != NC_NOERR) handle_error(status);
+        ...
+     status = nc_def_dim(ncid, "lat", 18L, &latid);
+     if (status != NC_NOERR) handle_error(status);
+     status = nc_def_dim(ncid, "rec", NC_UNLIMITED, &recid);
+     if (status != NC_NOERR) handle_error(status);
+\endcode
+
+ */
+int
+nc_def_dim(int ncid, const char *name, size_t len, int *idp)
+{
+    NC* ncp;
+    int stat = NC_check_id(ncid, &ncp);
+    if(stat != NC_NOERR) return stat;
+    return ncp->dispatch->def_dim(ncid, name, len, idp);
+}
+
+/*!
+Find the ID of a dimension from the name.
+
+The function nc_inq_dimid returns (as an argument) the ID of a netCDF
+dimension, given the name of the dimension. If ndims is the number of
+dimensions defined for a netCDF dataset, each dimension has an ID
+between 0 and ndims-1.
+
+\param ncid NetCDF or group ID, from a previous call to nc_open(),
+nc_create(), nc_def_grp(), or associated inquiry functions such as 
+nc_inq_ncid().
+
+\param name Name of the dimension.
+
+\param idp Pointer where dimension ID will be stored.
+
+\returns ::NC_NOERR   No error.
+\returns ::NC_EBADID  Not a valid ID.
+\returns ::NC_EBADDIM Invalid dimension ID or name.
+ */
+int
+nc_inq_dimid(int ncid, const char *name, int *idp)
+{
+    NC* ncp;
+    int stat = NC_check_id(ncid, &ncp);
+    if(stat != NC_NOERR) return stat;
+    return ncp->dispatch->inq_dimid(ncid,name,idp);
+}
+
+/*!
+Find the name and length of a dimension.
+
+The length for the unlimited dimension, if any, is the number of
+records written so far.
+
+\param ncid NetCDF or group ID, from a previous call to nc_open(),
+nc_create(), nc_def_grp(), or associated inquiry functions such as 
+nc_inq_ncid().
+
+\param dimid Dimension ID, from a previous call to nc_inq_dimid() or
+nc_def_dim().
+
+\param name Returned dimension name. The caller must allocate space
+for the returned name. The maximum possible length, in characters, of
+a dimension name is given by the predefined constant
+NC_MAX_NAME. (This doesn't include the null terminator, so declare
+your array to be size NC_MAX_NAME+1). The returned character array
+will be null-terminated.
+
+\param lenp Pointer to location for returned length of dimension. For
+the unlimited dimension, this is the number of records written so far.
+
+\returns ::NC_NOERR   No error.
+\returns ::NC_EBADID  Not a valid ID.
+\returns ::NC_EBADDIM Invalid dimension ID or name.
+
+\section Example
+
+Here is an example using nc_inq_dim() to determine the length of a
+dimension named lat, and the name and current maximum length of the
+unlimited dimension for an existing netCDF dataset named foo.nc:
+
+\code
+     #include <netcdf.h>
+        ...
+     int status, ncid, latid, recid;
+     size_t latlength, recs;
+     char recname[NC_MAX_NAME+1];
+        ...
+     status = nc_open("foo.nc", NC_NOWRITE, &ncid); 
+     if (status != NC_NOERR) handle_error(status);
+     status = nc_inq_unlimdim(ncid, &recid);
+     if (status != NC_NOERR) handle_error(status);
+        ...
+     status = nc_inq_dimid(ncid, "lat", &latid);
+     if (status != NC_NOERR) handle_error(status);
+     status = nc_inq_dimlen(ncid, latid, &latlength);
+     if (status != NC_NOERR) handle_error(status);
+
+     status = nc_inq_dim(ncid, recid, recname, &recs);
+     if (status != NC_NOERR) handle_error(status);
+\endcode
+ */
+int
+nc_inq_dim(int ncid, int dimid, char *name, size_t *lenp)
+{
+    NC* ncp;
+    int stat = NC_check_id(ncid, &ncp);
+    if(stat != NC_NOERR) return stat;
+    return ncp->dispatch->inq_dim(ncid,dimid,name,lenp);
+}
+
+/*!
+Rename a dimension.
+
+This function renames an existing dimension in a netCDF dataset open
+for writing. You cannot rename a dimension to have the same name as
+another dimension.
+
+For netCDF classic and 64-bit offset files, if the new name is longer
+than the old name, the netCDF dataset must be in define mode.
+
+For netCDF-4 files the dataset is switched to define more for the
+rename, regardless of the name length.
+
+\param ncid NetCDF or group ID, from a previous call to nc_open(),
+nc_create(), nc_def_grp(), or associated inquiry functions such as 
+nc_inq_ncid().
+
+\param dimid Dimension ID, from a previous call to nc_inq_dimid() or
+nc_def_dim().
+
+\param name New name for dimension. Must be a null-terminated string
+with length less than NC_MAX_NAME.
+
+\returns ::NC_NOERR      No error.
+\returns ::NC_EBADID     Not a valid ID.
+\returns ::NC_EBADDIM    Invalid dimension ID or name.
+\returns ::NC_ENAMEINUSE String match to name in use
+\returns ::NC_ENOMEM     Memory allocation (malloc) failure
+\returns ::NC_EPERM      Write to read only
+\section Example
+
+Here is an example using nc_rename_dim to rename the dimension lat to
+latitude in an existing netCDF dataset named foo.nc:
+
+\code
+     #include <netcdf.h>
+        ...
+     int status, ncid, latid;
+        ...
+     status = nc_open("foo.nc", NC_WRITE, &ncid); 
+     if (status != NC_NOERR) handle_error(status);
+        ...
+     status = nc_redef(ncid); 
+     if (status != NC_NOERR) handle_error(status);
+     status = nc_inq_dimid(ncid, "lat", &latid);
+     if (status != NC_NOERR) handle_error(status);
+     status = nc_rename_dim(ncid, latid, "latitude");
+     if (status != NC_NOERR) handle_error(status);
+     status = nc_enddef(ncid);
+     if (status != NC_NOERR) handle_error(status);
+\endcode
+ */
+int
+nc_rename_dim(int ncid, int dimid, const char *name)
+{
+    NC* ncp;
+    int stat = NC_check_id(ncid, &ncp);
+    if(stat != NC_NOERR) return stat;
+    return ncp->dispatch->rename_dim(ncid,dimid,name);
+}
+
+/*!
+Find the number of dimensions.
+
+In a classic model netCDF file, this funtion returns the number of
+defined dimensions. In a netCDF-4/HDF5 file, this function returns the
+number of dimensions available in the group specified by ncid, which
+may be less than the total number of dimensions in a file. In a
+netCDF-4/HDF5 file, dimensions are in all sub-groups, sub-sub-groups,
+etc.
+
+\param ncid NetCDF or group ID, from a previous call to nc_open(),
+nc_create(), nc_def_grp(), or associated inquiry functions such as 
+nc_inq_ncid().
+
+\param ndimsp Pointer where number of dimensions will be
+written. Ignored if NULL.
+
+\returns ::NC_NOERR  No error.
+\returns ::NC_EBADID Not a valid ID.
+
+ */
+int
+nc_inq_ndims(int ncid, int *ndimsp)
+{
+    NC* ncp;
+    int stat = NC_check_id(ncid, &ncp);
+    if(stat != NC_NOERR) return stat;
+    if(ndimsp == NULL) return NC_NOERR;
+    return ncp->dispatch->inq(ncid,ndimsp,NULL,NULL,NULL);
+}
+
+/*!
+Find the ID of the unlimited dimension.
+
+This function finds the ID of the unlimited dimension. For
+netCDF-4/HDF5 files (which may have more than one unlimited
+dimension), the ID of the first unlimited dimesnion is returned. For
+these files, nc_inq_unlimdims() will return all the unlimited dimension IDs.
+
+\param ncid NetCDF or group ID, from a previous call to nc_open(),
+nc_create(), nc_def_grp(), or associated inquiry functions such as 
+nc_inq_ncid().
+
+\param unlimdimidp Pointer where unlimited dimension ID will be
+stored. If there is no unlimited dimension, -1 will be stored
+here. Ignored if NULL.
+
+\returns ::NC_NOERR  No error.
+\returns ::NC_EBADID Not a valid ID.
+
+ */
+int
+nc_inq_unlimdim(int ncid, int *unlimdimidp)
+{
+    NC* ncp;
+    int stat = NC_check_id(ncid, &ncp);
+    if(stat != NC_NOERR) return stat;
+    return ncp->dispatch->inq_unlimdim(ncid,unlimdimidp);
+}
+
+/*!
+Find out the name of a dimension.
+
+\param ncid NetCDF or group ID, from a previous call to nc_open(),
+nc_create(), nc_def_grp(), or associated inquiry functions such as 
+nc_inq_ncid().
+
+\param dimid Dimension ID, from a previous call to nc_inq_dimid() or
+nc_def_dim().
+
+\param name Returned dimension name. The caller must allocate space
+for the returned name. The maximum possible length, in characters, of
+a dimension name is given by the predefined constant
+NC_MAX_NAME. (This doesn't include the null terminator, so declare
+your array to be size NC_MAX_NAME+1). The returned character array
+will be null-terminated. Ignored if NULL.
+
+\returns ::NC_NOERR   No error.
+\returns ::NC_EBADID  Not a valid ID.
+\returns ::NC_EBADDIM Invalid dimension ID or name.
+
+\section Example
+
+Here is an example using nc_inq_dim() to determine the length of a
+dimension named lat, and the name and current maximum length of the
+unlimited dimension for an existing netCDF dataset named foo.nc:
+
+\code
+     #include <netcdf.h>
+        ...
+     int status, ncid, latid, recid;
+     size_t latlength, recs;
+     char recname[NC_MAX_NAME+1];
+        ...
+     status = nc_open("foo.nc", NC_NOWRITE, &ncid);
+     if (status != NC_NOERR) handle_error(status);
+     status = nc_inq_unlimdim(ncid, &recid); 
+     if (status != NC_NOERR) handle_error(status);
+        ...
+     status = nc_inq_dimid(ncid, "lat", &latid);
+     if (status != NC_NOERR) handle_error(status);
+     status = nc_inq_dimlen(ncid, latid, &latlength);
+     if (status != NC_NOERR) handle_error(status);
+
+     status = nc_inq_dim(ncid, recid, recname, &recs);
+     if (status != NC_NOERR) handle_error(status);
+\endcode
+
+ */
+int
+nc_inq_dimname(int ncid, int dimid, char *name)
+{
+    NC* ncp;
+    int stat = NC_check_id(ncid, &ncp);
+    if(stat != NC_NOERR) return stat;
+    if(name == NULL) return NC_NOERR;
+    return ncp->dispatch->inq_dim(ncid,dimid,name,NULL);
+}
+
+/*!
+Find the length of a dimension.
+
+The length for the unlimited dimension, if any, is the number of
+records written so far.
+
+\param ncid NetCDF or group ID, from a previous call to nc_open(),
+nc_create(), nc_def_grp(), or associated inquiry functions such as 
+nc_inq_ncid().
+
+\param dimid Dimension ID, from a previous call to nc_inq_dimid() or
+nc_def_dim().
+
+\param lenp Pointer where the length will be stored.
+
+\returns ::NC_NOERR   No error.
+\returns ::NC_EBADID  Not a valid ID.
+\returns ::NC_EBADDIM Invalid dimension ID or name.
+
+\section Example
+
+Here is an example using nc_inq_dim() to determine the length of a
+dimension named lat, and the name and current maximum length of the
+unlimited dimension for an existing netCDF dataset named foo.nc:
+
+\code
+     #include <netcdf.h>
+        ...
+     int status, ncid, latid, recid;
+     size_t latlength, recs;
+     char recname[NC_MAX_NAME+1];
+        ...
+     status = nc_open("foo.nc", NC_NOWRITE, &ncid);
+     if (status != NC_NOERR) handle_error(status);
+     status = nc_inq_unlimdim(ncid, &recid); 
+     if (status != NC_NOERR) handle_error(status);
+        ...
+     status = nc_inq_dimid(ncid, "lat", &latid);  
+     if (status != NC_NOERR) handle_error(status);
+     status = nc_inq_dimlen(ncid, latid, &latlength); 
+     if (status != NC_NOERR) handle_error(status);
+
+     status = nc_inq_dim(ncid, recid, recname, &recs);
+     if (status != NC_NOERR) handle_error(status);
+\endcode
+ */
+int
+nc_inq_dimlen(int ncid, int dimid, size_t *lenp)
+{
+    NC* ncp;
+    int stat = NC_check_id(ncid, &ncp);
+    if(stat != NC_NOERR) return stat;
+    if(lenp == NULL) return NC_NOERR;
+    return ncp->dispatch->inq_dim(ncid,dimid,NULL,lenp);
+}
+/**@}*/
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/src_netcdf4/ddispatch.c
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/src_netcdf4/ddispatch.c	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/src_netcdf4/ddispatch.c	(revision 1749)
@@ -0,0 +1,213 @@
+#include "ncdispatch.h"
+#include "nc_uri.h"
+
+extern int NCSUBSTRATE_intialize(void);
+
+/* Define vectors of zeros and ones for use with various nc_get_varX function*/
+size_t nc_sizevector0[NC_MAX_DIMS];
+size_t nc_sizevector1[NC_MAX_DIMS];
+ptrdiff_t nc_ptrdiffvector1[NC_MAX_DIMS];
+
+/* Define the known protocols and their manipulations */
+static struct NCPROTOCOLLIST {
+    char* protocol;
+    char* substitute;
+    int   modelflags;
+} ncprotolist[] = {
+    {"http",NULL,0},
+    {"https",NULL,0},
+    {"file",NULL,NC_DISPATCH_NCD},
+    {"dods","http",NC_DISPATCH_NCD},
+    {"dodss","https",NC_DISPATCH_NCD},
+    {"cdmr","http",NC_DISPATCH_NCR|NC_DISPATCH_NC4},
+    {"cdmrs","https",NC_DISPATCH_NCR|NC_DISPATCH_NC4},
+    {"cdmremote","http",NC_DISPATCH_NCR|NC_DISPATCH_NC4},
+    {"cdmremotes","https",NC_DISPATCH_NCR|NC_DISPATCH_NC4},
+    {NULL,NULL,0} /* Terminate search */
+};
+
+/* Define the server to ping in order;
+   make the order attempt to optimize
+   against future changes.
+*/
+static const char* servers[] = {
+"http://motherlode.ucar.edu:8081", /* try this first */
+"http://remotetest.unidata.ucar.edu",
+"http://remotetest.ucar.edu",
+"http://motherlode.ucar.edu:8080",
+"http://motherlode.ucar.edu",
+"http://remotetests.unidata.ucar.edu",
+"http://remotetests.ucar.edu",
+NULL
+};
+
+/*
+static nc_type longtype = (sizeof(long) == sizeof(int)?NC_INT:NC_INT64);
+static nc_type ulongtype = (sizeof(unsigned long) == sizeof(unsigned int)?NC_UINT:NC_UINT64);
+*/
+
+/* Allow dispatch to do initialization */
+int
+NCDISPATCH_initialize(void)
+{
+    extern int NCSUBSTRATE_initialize(void);
+    int i;
+    NCSUBSTRATE_initialize();
+    for(i=0;i<NC_MAX_VAR_DIMS;i++) {
+	nc_sizevector0[i] = 0;
+        nc_sizevector1[i] = 1;
+        nc_ptrdiffvector1[i] = 1;
+    }
+    return NC_NOERR;
+}
+
+/* search list of servers and return first that succeeds when
+   concatenated with the specified path part
+*/
+const char*
+NC_findtestserver(const char* path)
+{
+#ifdef USE_DAP
+    /* NCDAP_ping is defined in libdap2/ncdap3.c */
+    const char** svc;
+    if(path == NULL) path = "";
+    for(svc=servers;*svc != NULL;svc++) {
+        int stat;
+        char url[4096];
+	snprintf(url,sizeof(url),"%s%s%s",
+			*svc,
+			(path[0] == '/' ? "" : "/"),
+			path);
+	stat = NCDAP_ping(url);
+	if(stat == NC_NOERR)
+	    return *svc;
+    }
+#endif
+    return NULL;
+}
+
+
+/* return 1 if path looks like a url; 0 otherwise */
+int
+NC_testurl(const char* path)
+{
+    int isurl = 0;
+    NC_URI* tmpurl = NULL;
+    char* p;
+
+    if(path == NULL) return 0;
+
+    /* find leading non-blank */
+    for(p=(char*)path;*p;p++) {if(*p != ' ') break;}
+
+    /* Do some initial checking to see if this looks like a file path */
+    if(*p == '/') return 0; /* probably an absolute file path */
+
+    /* Ok, try to parse as a url */
+    if(nc_uriparse(path,&tmpurl)) {
+	/* Do some extra testing to make sure this really is a url */
+        /* Look for a knownprotocol */
+        struct NCPROTOCOLLIST* protolist;
+        for(protolist=ncprotolist;protolist->protocol;protolist++) {
+	    if(strcmp(tmpurl->protocol,protolist->protocol) == 0) {
+	        isurl=1;
+		break;
+	    }		
+	}
+	nc_urifree(tmpurl);
+	return isurl;
+    }
+    return 0;
+}
+
+/*
+Return the OR of some of the NC_DISPATCH flags
+Assumes that the path is known to be a url
+*/
+
+int
+NC_urlmodel(const char* path)
+{
+    int model = 0;
+    NC_URI* tmpurl = NULL;
+    struct NCPROTOCOLLIST* protolist;
+
+    if(!nc_uriparse(path,&tmpurl)) goto done;
+
+    /* Look at any prefixed parameters */
+    if(nc_urilookup(tmpurl,"netcdf4",NULL)
+       || nc_urilookup(tmpurl,"netcdf-4",NULL)) {
+	model = (NC_DISPATCH_NC4|NC_DISPATCH_NCD);
+    } else if(nc_urilookup(tmpurl,"netcdf3",NULL)
+              || nc_urilookup(tmpurl,"netcdf-3",NULL)) {
+	model = (NC_DISPATCH_NC3|NC_DISPATCH_NCD);
+    } else if(nc_urilookup(tmpurl,"cdmremote",NULL)
+	      || nc_urilookup(tmpurl,"cdmr",NULL)) {
+	model = (NC_DISPATCH_NCR|NC_DISPATCH_NC4);
+    }
+
+    if(model == 0) {
+        /* Now look at the protocol */
+        for(protolist=ncprotolist;protolist->protocol;protolist++) {
+	    if(strcmp(tmpurl->protocol,protolist->protocol) == 0) {
+    	        model |= protolist->modelflags;
+    	        if(protolist->substitute) {
+    	            if(tmpurl->protocol) free(tmpurl->protocol);
+    		    tmpurl->protocol = strdup(protolist->substitute);
+    	        }
+    	        break;	    
+	    }
+	}
+    }	
+
+    /* Force NC_DISPATCH_NC3 if necessary */
+    if((model & NC_DISPATCH_NC4) == 0)
+	model |= (NC_DISPATCH_NC3 | NC_DISPATCH_NCD);
+
+done:
+    nc_urifree(tmpurl);
+    return model;
+}
+
+/* Override dispatch table management */
+static NC_Dispatch* NC_dispatch_override = NULL;
+
+/* Override dispatch table management */
+NC_Dispatch*
+NC_get_dispatch_override(void) {
+    return NC_dispatch_override;
+}
+
+void NC_set_dispatch_override(NC_Dispatch* d)
+{
+    NC_dispatch_override = d;
+}
+
+/* Overlay by treating the tables as arrays of void*.
+   Overlay rules are:
+        overlay    base    merge
+        -------    ----    -----
+          null     null     null
+          null      y        y
+           x       null      x
+           x        y        x
+*/
+
+int
+NC_dispatch_overlay(const NC_Dispatch* overlay, const NC_Dispatch* base, NC_Dispatch* merge)
+{
+    void** voverlay = (void**)overlay;
+    void** vmerge;
+    int i, count = sizeof(NC_Dispatch) / sizeof(void*);
+    /* dispatch table must be exact multiple of sizeof(void*) */
+    assert(count * sizeof(void*) == sizeof(NC_Dispatch));
+    *merge = *base;
+    vmerge = (void**)merge;
+    for(i=0;i<count;i++) {
+        if(voverlay[i] == NULL) continue;
+        vmerge[i] = voverlay[i];
+    }
+    /* Finally, the merge model should always be the overlay model */
+    merge->model = overlay->model;
+    return NC_NOERR;
+}
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/src_netcdf4/denum.c
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/src_netcdf4/denum.c	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/src_netcdf4/denum.c	(revision 1749)
@@ -0,0 +1,176 @@
+/*! \file
+  Functions for Enum Types
+
+  Copyright 2011 University Corporation for Atmospheric
+  Research/Unidata. See \ref copyright file for more info. */
+
+#include "ncdispatch.h"
+
+/** \name Enum Types
+    Functions to create and learn about enum types. */
+/*! \{ */ /* All these functions are part of this named group... */
+
+/** \ingroup user_types
+Create an enum type. Provide an ncid, a name, and a base integer type.
+
+After calling this function, fill out the type with repeated calls to
+nc_insert_enum(). Call nc_insert_enum() once for each value you wish
+to make part of the enumeration.
+
+\param ncid \ref ncid
+
+\param base_typeid The base integer type for this enum. Must be one
+of: ::NC_BYTE, ::NC_UBYTE, ::NC_SHORT, ::NC_USHORT, ::NC_INT,
+::NC_UINT, ::NC_INT64, ::NC_UINT64.
+
+\param name \ref object_name of new type.
+
+\param typeidp A pointer to an nc_type. The typeid of the new type
+will be placed there.
+
+\returns ::NC_NOERR No error.
+\returns ::NC_EBADID Bad \ref ncid.
+\returns ::NC_EBADTYPE Bad type id.
+\returns ::NC_ENOTNC4 Not an netCDF-4 file, or classic model enabled.
+\returns ::NC_EHDFERR An error was reported by the HDF5 layer.
+\returns ::NC_ENAMEINUSE That name is in use.
+\returns ::NC_EMAXNAME Name exceeds max length NC_MAX_NAME.
+\returns ::NC_EBADNAME Name contains illegal characters.
+\returns ::NC_EPERM Attempt to write to a read-only file.
+\returns ::NC_ENOTINDEFINE Not in define mode. 
+ */
+int
+nc_def_enum(int ncid, nc_type base_typeid, const char *name, nc_type *typeidp)
+{
+    NC* ncp;
+    int stat = NC_check_id(ncid,&ncp);
+    if(stat != NC_NOERR) return stat;
+    return ncp->dispatch->def_enum(ncid,base_typeid,name,typeidp);
+}
+
+/** \ingroup user_types
+Insert a named member into a enum type. 
+
+\param ncid \ref ncid
+\param xtype
+\param name The identifier (\ref object_name) of the new member. 
+\param value The value that is to be associated with this member. 
+
+\returns ::NC_NOERR No error.
+\returns ::NC_EBADID Bad \ref ncid.
+\returns ::NC_EBADTYPE Bad type id.
+\returns ::NC_ENOTNC4 Not an netCDF-4 file, or classic model enabled.
+\returns ::NC_EHDFERR An error was reported by the HDF5 layer.
+\returns ::NC_ENAMEINUSE That name is in use.
+\returns ::NC_EMAXNAME Name exceeds max length NC_MAX_NAME.
+\returns ::NC_EBADNAME Name contains illegal characters.
+\returns ::NC_EPERM Attempt to write to a read-only file.
+\returns ::NC_ENOTINDEFINE Not in define mode. 
+ */
+int
+nc_insert_enum(int ncid, nc_type xtype, const char *name, 
+	       const void *value)
+{
+    NC *ncp;
+    int stat = NC_check_id(ncid, &ncp);
+    if(stat != NC_NOERR) return stat;
+    return ncp->dispatch->insert_enum(ncid, xtype, name,
+				      value);
+}
+
+/** \ingroup user_types
+Learn about a user-define enumeration type. 
+
+\param ncid \ref ncid
+
+\param xtype Typeid to inquire about.
+
+\param name \ref object_name of type will be copied here. \ref
+ignored_if_null.
+
+\param base_nc_typep Typeid if the base type of the enum.\ref
+ignored_if_null.
+
+\param base_sizep Pointer that will get the size in bytes of the base
+type. \ref ignored_if_null.
+
+\param num_membersp Pointer that will get the number of members
+defined for this enum type. \ref ignored_if_null.
+
+\returns ::NC_NOERR No error.
+\returns ::NC_EBADID Bad \ref ncid.
+\returns ::NC_EBADTYPE Bad type id.
+\returns ::NC_ENOTNC4 Not an netCDF-4 file, or classic model enabled.
+\returns ::NC_EHDFERR An error was reported by the HDF5 layer.
+ */
+int
+nc_inq_enum(int ncid, nc_type xtype, char *name, nc_type *base_nc_typep, 
+	    size_t *base_sizep, size_t *num_membersp)
+{
+    int class = 0;
+    int stat = nc_inq_user_type(ncid, xtype, name, base_sizep, 
+				base_nc_typep, num_membersp, &class);
+    if(stat != NC_NOERR) return stat;
+    if(class != NC_ENUM) stat = NC_EBADTYPE;
+    return stat;
+}
+
+/** \ingroup user_types
+Learn about a about a member of an enum type. 
+
+\param ncid \ref ncid
+
+\param xtype Typeid of the enum type.
+
+\param idx Index to the member to inquire about.
+
+\param name The identifier (\ref object_name) of this member will be
+copied here. \ref ignored_if_null.
+
+\param value The value of this member will be copied here. \ref
+ignored_if_null.
+
+\returns ::NC_NOERR No error.
+\returns ::NC_EBADID Bad \ref ncid.
+\returns ::NC_EBADTYPE Bad type id.
+\returns ::NC_ENOTNC4 Not an netCDF-4 file, or classic model enabled.
+\returns ::NC_EHDFERR An error was reported by the HDF5 layer.
+ */
+int
+nc_inq_enum_member(int ncid, nc_type xtype, int idx, char *name, 
+		   void *value)
+{
+    NC *ncp;
+    int stat = NC_check_id(ncid, &ncp);
+    if(stat != NC_NOERR) return stat;
+    return ncp->dispatch->inq_enum_member(ncid, xtype, idx, name, value);
+}
+
+/** \ingroup user_types
+Get the name which is associated with an enum member value. 
+
+\param ncid \ref ncid
+
+\param xtype Typeid of the enum type.
+
+\param value Value of interest.
+
+\param identifier The identifier (\ref object_name) of this value will
+be copied here. \ref ignored_if_null.
+
+\returns ::NC_NOERR No error.
+\returns ::NC_EBADID Bad \ref ncid.
+\returns ::NC_EBADTYPE Bad type id.
+\returns ::NC_ENOTNC4 Not an netCDF-4 file, or classic model enabled.
+\returns ::NC_EHDFERR An error was reported by the HDF5 layer.
+ */
+int
+nc_inq_enum_ident(int ncid, nc_type xtype, long long value, 
+		  char *identifier)
+{
+    NC* ncp;
+    int stat = NC_check_id(ncid,&ncp);
+    if(stat != NC_NOERR) return stat;
+    return ncp->dispatch->inq_enum_ident(ncid,xtype,value,identifier);
+}
+/*! \} */  /* End of named group ...*/
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/src_netcdf4/derror.c
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/src_netcdf4/derror.c	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/src_netcdf4/derror.c	(revision 1749)
@@ -0,0 +1,255 @@
+/** \file
+Error messages and library version.
+
+These functions return the library version, and error messages.
+
+Copyright 2010 University Corporation for Atmospheric
+Research/Unidata. See COPYRIGHT file for more info.
+*/
+
+#include "ncdispatch.h"
+
+/* Tell the user the version of netCDF. */
+static const char nc_libvers[] = PACKAGE_VERSION " of "__DATE__" "__TIME__" $";
+
+/** \defgroup lib_version Library Version 
+
+*/
+
+/**
+\ingroup lib_version
+Return the library version.
+
+\returns short string that contains the version information for the
+library.
+ */
+const char *
+nc_inq_libvers(void)
+{
+   return nc_libvers;
+}
+
+/** \defgroup error Error Handling
+NetCDF functions non-zero status codes on error.
+
+Each netCDF function returns an integer status value. If the returned
+status value indicates an error, you may handle it in any way desired,
+from printing an associated error message and exiting to ignoring the
+error indication and proceeding (not recommended!). For simplicity,
+the examples in this guide check the error status and call a separate
+function, handle_err(), to handle any errors. One possible definition
+of handle_err() can be found within the documentation of
+nc_strerror().
+
+The nc_strerror() function is available to convert a returned integer
+error status into an error message string.
+
+Occasionally, low-level I/O errors may occur in a layer below the
+netCDF library. For example, if a write operation causes you to exceed
+disk quotas or to attempt to write to a device that is no longer
+available, you may get an error from a layer below the netCDF library,
+but the resulting write error will still be reflected in the returned
+status value.
+
+ */
+
+/**
+\ingroup error
+ Given an error number, return an error message. 
+
+This function returns a static reference to an error message string
+corresponding to an integer netCDF error status or to a system error
+number, presumably returned by a previous call to some other netCDF
+function. The error codes are defined in netcdf.h.
+
+\param ncerr1 error number
+
+\returns short string containing error message.
+
+\section Example
+
+Here is an example of a simple error handling function that uses
+nc_strerror to print the error message corresponding to the netCDF
+error status returned from any netCDF function call and then exit:
+
+\code
+     #include <netcdf.h>
+        ...
+     void handle_error(int status) {
+     if (status != NC_NOERR) {
+        fprintf(stderr, "%s\n", nc_strerror(status));
+        exit(-1);
+        }
+     }
+\endcode
+*/
+const char *
+nc_strerror(int ncerr1)
+{
+   /* System error? */
+   if(NC_ISSYSERR(ncerr1))
+   {
+      const char *cp = (const char *) strerror(ncerr1);
+      if(cp == NULL)
+	 return "Unknown Error";
+      return cp;
+   }
+
+   /* If we're here, this is a netcdf error code. */
+   switch(ncerr1)
+   {
+      case NC_NOERR:
+	 return "No error";
+      case NC_EBADID:
+	 return "NetCDF: Not a valid ID";
+      case NC_ENFILE:
+	 return "NetCDF: Too many files open";
+      case NC_EEXIST:
+	 return "NetCDF: File exists && NC_NOCLOBBER";
+      case NC_EINVAL:
+	 return "NetCDF: Invalid argument";
+      case NC_EPERM:
+	 return "NetCDF: Write to read only";
+      case NC_ENOTINDEFINE:
+	 return "NetCDF: Operation not allowed in data mode";
+      case NC_EINDEFINE:
+	 return "NetCDF: Operation not allowed in define mode";
+      case NC_EINVALCOORDS:
+	 return "NetCDF: Index exceeds dimension bound";
+      case NC_EMAXDIMS:
+	 return "NetCDF: NC_MAX_DIMS exceeded";
+      case NC_ENAMEINUSE:
+	 return "NetCDF: String match to name in use";
+      case NC_ENOTATT:
+	 return "NetCDF: Attribute not found";
+      case NC_EMAXATTS:
+	 return "NetCDF: NC_MAX_ATTRS exceeded";
+      case NC_EBADTYPE:
+	 return "NetCDF: Not a valid data type or _FillValue type mismatch";
+      case NC_EBADDIM:
+	 return "NetCDF: Invalid dimension ID or name";
+      case NC_EUNLIMPOS:
+	 return "NetCDF: NC_UNLIMITED in the wrong index";
+      case NC_EMAXVARS:
+	 return "NetCDF: NC_MAX_VARS exceeded";
+      case NC_ENOTVAR:
+	 return "NetCDF: Variable not found";
+      case NC_EGLOBAL:
+	 return "NetCDF: Action prohibited on NC_GLOBAL varid";
+      case NC_ENOTNC:
+	 return "NetCDF: Unknown file format";
+      case NC_ESTS:
+	 return "NetCDF: In Fortran, string too short";
+      case NC_EMAXNAME:
+	 return "NetCDF: NC_MAX_NAME exceeded";
+      case NC_EUNLIMIT:
+	 return "NetCDF: NC_UNLIMITED size already in use";
+      case NC_ENORECVARS:
+	 return "NetCDF: nc_rec op when there are no record vars";
+      case NC_ECHAR:
+	 return "NetCDF: Attempt to convert between text & numbers";
+      case NC_EEDGE:
+	 return "NetCDF: Start+count exceeds dimension bound";
+      case NC_ESTRIDE:
+	 return "NetCDF: Illegal stride";
+      case NC_EBADNAME:
+	 return "NetCDF: Name contains illegal characters";
+      case NC_ERANGE:
+	 return "NetCDF: Numeric conversion not representable";
+      case NC_ENOMEM:
+	 return "NetCDF: Memory allocation (malloc) failure";
+      case NC_EVARSIZE:
+	 return "NetCDF: One or more variable sizes violate format constraints";
+      case NC_EDIMSIZE:
+	 return "NetCDF: Invalid dimension size";
+      case NC_ETRUNC:
+	 return "NetCDF: File likely truncated or possibly corrupted";
+      case NC_EAXISTYPE:
+	 return "NetCDF: Illegal axis type";
+      case NC_EDAP:
+	 return "NetCDF: DAP failure";
+      case NC_ECURL:
+	 return "NetCDF: libcurl failure";
+      case NC_EIO:
+	 return "NetCDF: I/O failure";
+      case NC_ENODATA:
+	 return "NetCDF: Variable has no data in DAP request";
+      case NC_EDAPSVC:
+	 return "NetCDF: DAP server error";
+      case NC_EDAS:
+	 return "NetCDF: Malformed or inaccessible DAP DAS";
+      case NC_EDDS:
+	 return "NetCDF: Malformed or inaccessible DAP DDS";
+      case NC_EDATADDS:
+	 return "NetCDF: Malformed or inaccessible DAP DATADDS";
+      case NC_EDAPURL:
+	 return "NetCDF: Malformed URL";
+      case NC_EDAPCONSTRAINT:
+	 return "NetCDF: Malformed Constraint";
+      case NC_ETRANSLATION:
+	 return "NetCDF: Untranslatable construct";
+      case NC_EHDFERR:
+	 return "NetCDF: HDF error";
+      case NC_ECANTREAD:
+	 return "NetCDF: Can't read file";
+      case NC_ECANTWRITE:
+	 return "NetCDF: Can't write file";
+      case NC_ECANTCREATE:
+	 return "NetCDF: Can't create file";
+      case NC_EFILEMETA:
+	 return "NetCDF: Can't add HDF5 file metadata";
+      case NC_EDIMMETA:      
+	 return "NetCDF: Can't define dimensional metadata";
+      case NC_EATTMETA:
+	 return "NetCDF: Can't open HDF5 attribute";
+      case NC_EVARMETA:
+	 return "NetCDF: Problem with variable metadata.";
+      case NC_ENOCOMPOUND:
+	 return "NetCDF: Can't create HDF5 compound type";
+      case NC_EATTEXISTS:
+	 return "NetCDF: Attempt to create attribute that alread exists";
+      case NC_ENOTNC4:
+	 return "NetCDF: Attempting netcdf-4 operation on netcdf-3 file";
+      case NC_ESTRICTNC3:
+	 return "NetCDF: Attempting netcdf-4 operation on strict nc3 netcdf-4 file";
+      case NC_ENOTNC3:
+	 return "NetCDF: Attempting netcdf-3 operation on netcdf-4 file";
+      case NC_ENOPAR:
+	 return "NetCDF: Parallel operation on file opened for non-parallel access";
+      case NC_EPARINIT:
+	 return "NetCDF: Error initializing for parallel access";
+      case NC_EBADGRPID:
+	 return "NetCDF: Bad group ID";
+      case NC_EBADTYPID:
+	 return "NetCDF: Bad type ID";
+      case NC_ETYPDEFINED:
+	 return "NetCDF: Type has already been defined and may not be edited";
+      case NC_EBADFIELD:
+	 return "NetCDF: Bad field ID";
+      case NC_EBADCLASS:
+	 return "NetCDF: Bad class";
+      case NC_EMAPTYPE:
+	 return "NetCDF: Mapped access for atomic types only";
+      case NC_ELATEFILL:
+	 return "NetCDF: Attempt to define fill value when data already exists.";
+      case NC_ELATEDEF:
+	 return "NetCDF: Attempt to define var properties, like deflate, after enddef.";
+      case NC_EDIMSCALE:
+	 return "NetCDF: Probem with HDF5 dimscales.";
+      case NC_ENOGRP:
+	 return "NetCDF: No group found.";
+      case NC_ESTORAGE:
+	 return "NetCDF: Cannot specify both contiguous and chunking.";
+      case NC_EBADCHUNK:
+	 return "NetCDF: Bad chunk sizes.";
+      case NC_ENOTBUILT:
+	 return "NetCDF: Attempt to use feature that was not turned on "
+	    "when netCDF was built.";
+      case NC_EDISKLESS:
+	 return "NetCDF: Error in using diskless access";
+      default:
+	 return "Unknown Error";
+   }
+}
+
+
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/src_netcdf4/dfile.c
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/src_netcdf4/dfile.c	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/src_netcdf4/dfile.c	(revision 1749)
@@ -0,0 +1,1650 @@
+/** \file 
+File create and open functions
+
+These functions end up calling functions in one of the dispatch layers
+(netCDF-4, dap server, etc).
+
+Copyright 2010 University Corporation for Atmospheric
+Research/Unidata. See COPYRIGHT file for more info.  
+*/
+
+#include "config.h"
+#include <stdlib.h>
+#ifdef HAVE_SYS_RESOURCE_H
+#include <sys/resource.h>
+#endif
+#ifdef HAVE_SYS_TYPES_H
+#include <sys/types.h>
+#endif
+#ifdef HAVE_SYS_STAT_H
+#include <sys/stat.h>
+#endif
+#ifdef HAVE_FCNTL_H
+#include <fcntl.h>
+#endif
+#include "ncdispatch.h"
+
+static int nc_initialized = 0;
+
+/** \defgroup datasets NetCDF Files
+
+NetCDF opens datasets as files or remote access URLs.
+
+A netCDF dataset that has not yet been opened can only be referred to
+by its dataset name. Once a netCDF dataset is opened, it is referred
+to by a netCDF ID, which is a small non-negative integer returned when
+you create or open the dataset. A netCDF ID is much like a file
+descriptor in C or a logical unit number in FORTRAN. In any single
+program, the netCDF IDs of distinct open netCDF datasets are
+distinct. A single netCDF dataset may be opened multiple times and
+will then have multiple distinct netCDF IDs; however at most one of
+the open instances of a single netCDF dataset should permit
+writing. When an open netCDF dataset is closed, the ID is no longer
+associated with a netCDF dataset.
+
+Functions that deal with the netCDF library include:
+- Get version of library.
+- Get error message corresponding to a returned error code. 
+
+The operations supported on a netCDF dataset as a single object are:
+- Create, given dataset name and whether to overwrite or not.
+- Open for access, given dataset name and read or write intent.
+- Put into define mode, to add dimensions, variables, or attributes.
+- Take out of define mode, checking consistency of additions.
+- Close, writing to disk if required.
+- Inquire about the number of dimensions, number of variables,
+number of global attributes, and ID of the unlimited dimension, if
+any.
+- Synchronize to disk to make sure it is current.
+- Set and unset nofill mode for optimized sequential writes.
+- After a summary of conventions used in describing the netCDF
+interfaces, the rest of this chapter presents a detailed description
+of the interfaces for these operations.
+*/
+/**@{*/
+
+size_t* NC_coord_zero;
+size_t* NC_coord_one;
+
+static void
+nc_local_initialize(void)
+{
+    int i;
+    NC_coord_zero = (size_t*)malloc(sizeof(size_t)*NC_MAX_VAR_DIMS);
+    if(NC_coord_zero == NULL) abort();
+    NC_coord_one = (size_t*)malloc(sizeof(size_t)*NC_MAX_VAR_DIMS);
+    if(NC_coord_one == NULL) abort();
+    for(i=0;i<NC_MAX_VAR_DIMS;i++) {
+	NC_coord_one[i] = 1;
+	NC_coord_zero[i] = 0;
+    }
+}
+
+static int
+NC_check_file_type(const char *path, int use_parallel, void *mpi_info,
+		   int *cdf, int *hdf)
+{
+   char magic[MAGIC_NUMBER_LEN];
+    
+   *hdf = 0; *cdf = 0;
+
+   /* Get the 4-byte magic from the beginning of the file. Don't use posix
+    * for parallel, use the MPI functions instead. */
+#ifdef USE_PARALLEL_MPIO
+   if (use_parallel) 
+   {
+      MPI_File fh;
+      MPI_Status status;
+      int retval;
+      MPI_Comm comm = 0;
+      MPI_Info info = 0;
+
+      if(mpi_info != NULL) {
+	 comm = ((NC_MPI_INFO*)mpi_info)->comm;
+	 info = ((NC_MPI_INFO*)mpi_info)->info;
+      }
+      if((retval = MPI_File_open(comm, (char *)path, MPI_MODE_RDONLY,info, 
+				 &fh)) != MPI_SUCCESS)
+	 return NC_EPARINIT;
+      if((retval = MPI_File_read(fh, magic, MAGIC_NUMBER_LEN, MPI_CHAR,
+				 &status)) != MPI_SUCCESS)
+	 return NC_EPARINIT;
+      if((retval = MPI_File_close(&fh)) != MPI_SUCCESS)
+	 return NC_EPARINIT;
+   } else
+#endif /* USE_PARALLEL */
+   {
+      FILE *fp;
+      int i;
+
+      if(path == NULL || strlen(path)==0)
+	return NC_EINVAL;
+	
+      if (!(fp = fopen(path, "r")))
+	 return errno;
+      i = fread(magic, MAGIC_NUMBER_LEN, 1, fp);
+      fclose(fp);
+      if(i != 1)
+	 return errno;
+   }
+    
+   /* Ignore the first byte for HDF */
+   if(magic[1] == 'H' && magic[2] == 'D' && magic[3] == 'F')
+      *hdf = 5;
+   else if(magic[0] == '\016' && magic[1] == '\003'
+	   && magic[2] == '\023' && magic[3] == '\001')
+      *hdf = 4;
+   else if(magic[0] == 'C' && magic[1] == 'D' && magic[2] == 'F') 
+   {
+      if(magic[3] == '\001') 
+	 *cdf = 1; /* netcdf classic version 1 */
+      else if(magic[3] == '\002') 
+	 *cdf = 2; /* netcdf classic version 2 */
+   }
+    
+   return NC_NOERR;
+}
+
+/**  \ingroup datasets
+Create a new netCDF file.
+
+This function creates a new netCDF dataset, returning a netCDF ID that
+can subsequently be used to refer to the netCDF dataset in other
+netCDF function calls. The new netCDF dataset opened for write access
+and placed in define mode, ready for you to add dimensions, variables,
+and attributes.
+
+\param path The file name of the new netCDF dataset.
+
+\param cmode The creation mode flag. The following flags are
+available: NC_NOCLOBBER (do not overwrite existing file), NC_SHARE
+(limit write caching - netcdf classic files onlt), NC_64BIT_OFFSET
+(create 64-bit offset file), NC_NETCDF4 (create netCDF-4/HDF5 file),
+NC_CLASSIC_MODEL (enforce netCDF classic mode on netCDF-4/HDF5
+files), NC_DISKLESS (store data only in memory), NC_MMAP (use MMAP
+for NC_DISKLESS), and NC_WRITE.
+See discussion below.
+
+\param ncidp Pointer to location where returned netCDF ID is to be
+stored.
+
+<h2>The cmode Flag</h2>
+
+The cmode flag is used to control the type of file created, and some
+aspects of how it may be used. 
+
+Setting NC_NOCLOBBER means you do not want to clobber (overwrite) an
+existing dataset; an error (NC_EEXIST) is returned if the specified
+dataset already exists.
+
+The NC_SHARE flag is appropriate when one process may be writing the
+dataset and one or more other processes reading the dataset
+concurrently; it means that dataset accesses are not buffered and
+caching is limited. Since the buffering scheme is optimized for
+sequential access, programs that do not access data sequentially may
+see some performance improvement by setting the NC_SHARE flag. This
+flag is ignored for netCDF-4 files. 
+
+Setting NC_64BIT_OFFSET causes netCDF to create a 64-bit offset format
+file, instead of a netCDF classic format file. The 64-bit offset
+format imposes far fewer restrictions on very large (i.e. over 2 GB)
+data files. See Large File Support.
+
+A zero value (defined for convenience as NC_CLOBBER) specifies the
+default behavior: overwrite any existing dataset with the same file
+name and buffer and cache accesses for efficiency. The dataset will be
+in netCDF classic format. See NetCDF Classic Format Limitations.
+
+Setting NC_NETCDF4 causes netCDF to create a HDF5/NetCDF-4 file.
+
+Setting NC_CLASSIC_MODEL causes netCDF to enforce the classic data
+model in this file. (This only has effect for netCDF-4/HDF5 files, as
+classic and 64-bit offset files always use the classic model.) When
+used with NC_NETCDF4, this flag ensures that the resulting
+netCDF-4/HDF5 file may never contain any new constructs from the
+enhanced data model. That is, it cannot contain groups, user defined
+types, multiple unlimited dimensions, or new atomic types. The
+advantage of this restriction is that such files are guaranteed to
+work with existing netCDF software.
+
+Setting NC_DISKLESS causes netCDF to create the file only in memory.
+This allows for the use of files that have no long term purpose. Note that
+with one exception, the in-memory file is destroyed upon calling
+nc_close. If, however, the flag combination (NC_DISKLESS|NC_WRITE)
+is used, then at close, the contents of the memory file will be
+made persistent in the file path that was specified in the nc_create
+call. If NC_DISKLESS is going to be used for creating a large classic file,
+it behooves one to use either nc__create or nc_create_mp and specify
+an appropriately large value of the initialsz parameter to avoid
+to many extensions to the in-memory space for the file.
+This flag applies to files in classic format and to file in extended
+format (netcdf-4).
+
+Normally, NC_DISKLESS allocates space in the heap for
+storing the in-memory file. If, however, the ./configure
+flags --enable-mmap is used, and the additional mode flag
+NC_MMAP is specified, then the file will be created using
+the operating system MMAP facility.
+This flag only applies to files in classic format. Extended
+format (netcdf-4) files will ignore the NC_MMAP flag.
+
+Using NC_MMAP for nc_create is
+only included for completeness vis-a-vis nc_open. The
+ability to use MMAP is of limited use for nc_create because
+nc_create is going to create the file in memory anyway.
+Closing a MMAP'd file will be slightly faster, but not significantly.
+
+Note that nc_create(path,cmode,ncidp) is equivalent to the invocation of
+nc__create(path,cmode,NC_SIZEHINT_DEFAULT,NULL,ncidp).
+
+\returns ::NC_NOERR No error.
+
+\returns ::NC_ENOMEM System out of memory.
+
+\returns ::NC_EHDFERR HDF5 error (netCDF-4 files only).
+
+\returns ::NC_EFILEMETA Error writing netCDF-4 file-level metadata in
+HDF5 file. (netCDF-4 files only).
+
+\returns ::NC_EDISKLESS if there was an error in creating the
+in-memory file.
+
+\note When creating a netCDF-4 file HDF5 error reporting is turned
+off, if it is on. This doesn't stop the HDF5 error stack from
+recording the errors, it simply stops their display to the user
+through stderr.
+
+<h1>Examples</h1>
+
+In this example we create a netCDF dataset named foo.nc; we want the
+dataset to be created in the current directory only if a dataset with
+that name does not already exist:
+
+@code
+     #include <netcdf.h>
+        ...
+     int status = NC_NOERR;
+     int ncid;
+        ...
+     status = nc_create("foo.nc", NC_NOCLOBBER, &ncid);
+     if (status != NC_NOERR) handle_error(status);
+@endcode
+
+In this example we create a netCDF dataset named foo_large.nc. It will
+be in the 64-bit offset format.
+
+@code
+     #include <netcdf.h>
+        ...
+     int status = NC_NOERR;
+     int ncid;
+        ...
+     status = nc_create("foo_large.nc", NC_NOCLOBBER|NC_64BIT_OFFSET, &ncid);
+     if (status != NC_NOERR) handle_error(status);
+@endcode
+
+In this example we create a netCDF dataset named foo_HDF5.nc. It will
+be in the HDF5 format.
+
+@code
+     #include <netcdf.h>
+        ...
+     int status = NC_NOERR;
+     int ncid;
+        ...
+     status = nc_create("foo_HDF5.nc", NC_NOCLOBBER|NC_NETCDF4, &ncid);
+     if (status != NC_NOERR) handle_error(status);
+@endcode
+
+In this example we create a netCDF dataset named
+foo_HDF5_classic.nc. It will be in the HDF5 format, but will not allow
+the use of any netCDF-4 advanced features. That is, it will conform to
+the classic netCDF-3 data model.
+
+@code
+     #include <netcdf.h>
+        ...
+     int status = NC_NOERR;
+     int ncid;
+        ...
+     status = nc_create("foo_HDF5_classic.nc", NC_NOCLOBBER|NC_NETCDF4|NC_CLASSIC_MODEL, &ncid);
+     if (status != NC_NOERR) handle_error(status);
+@endcode
+
+In this example we create a in-memory netCDF classic dataset named
+diskless.nc whose content will be lost when nc_close() is called.
+
+@code
+     #include <netcdf.h>
+        ...
+     int status = NC_NOERR;
+     int ncid;
+        ...
+     status = nc_create("diskless.nc", NC_DISKLESS, &ncid);
+     if (status != NC_NOERR) handle_error(status);
+@endcode
+
+In this example we create a in-memory netCDF classic dataset named
+diskless.nc and specify that it should be made persistent
+in a file named diskless.nc when nc_close() is called.
+
+@code
+     #include <netcdf.h>
+        ...
+     int status = NC_NOERR;
+     int ncid;
+        ...
+     status = nc_create("diskless.nc", NC_DISKLESS|NC_WRITE, &ncid);
+     if (status != NC_NOERR) handle_error(status);
+@endcode
+
+A variant of nc_create(), nc__create() (note the double underscore) allows
+users to specify two tuning parameters for the file that it is
+creating.  */
+int
+nc_create(const char *path, int cmode, int *ncidp)
+{
+   return nc__create(path,cmode,NC_SIZEHINT_DEFAULT,NULL,ncidp);
+}
+
+/*!
+Create a netCDF file with some extra parameters controlling classic
+file cacheing.
+
+Like nc_create(), this function creates a netCDF file. 
+
+\param path The file name of the new netCDF dataset.
+
+\param cmode The creation mode flag, the same as in nc_create().
+
+\param initialsz On some systems, and with custom I/O layers, it may
+be advantageous to set the size of the output file at creation
+time. This parameter sets the initial size of the file at creation
+time. This only applies to classic and 64-bit offset files.
+The special value NC_SIZEHINT_DEFAULT (which is the value 0),
+lets the netcdf library choose a suitable initial size.
+
+\param chunksizehintp A pointer to the chunk size hint,
+which controls a space versus time tradeoff, memory
+allocated in the netcdf library versus number of system
+calls. Because of internal requirements, the value may not
+be set to exactly the value requested. The actual value
+chosen is returned by reference. Using a NULL pointer or
+having the pointer point to the value NC_SIZEHINT_DEFAULT
+causes the library to choose a default. How the system
+chooses the default depends on the system. On many systems,
+the "preferred I/O block size" is available from the stat()
+system call, struct stat member st_blksize. If this is
+available it is used. Lacking that, twice the system
+pagesize is used. Lacking a call to discover the system
+pagesize, we just set default bufrsize to 8192. The bufrsize
+is a property of a given open netcdf descriptor ncid, it is
+not a persistent property of the netcdf dataset. This only
+applies to classic and 64-bit offset files.
+
+\param ncidp Pointer to location where returned netCDF ID is to be
+stored.
+
+\note This function uses the same return codes as the nc_create()
+function.
+
+<h1>Examples</h1>
+
+In this example we create a netCDF dataset named foo_large.nc; we want
+the dataset to be created in the current directory only if a dataset
+with that name does not already exist. We also specify that bufrsize
+and initial size for the file.
+
+\code
+#include <netcdf.h>
+        ...
+     int status = NC_NOERR;
+     int ncid;
+     int intialsz = 2048;
+     int *bufrsize;
+        ...
+     *bufrsize = 1024;
+     status = nc__create("foo.nc", NC_NOCLOBBER, initialsz, bufrsize, &ncid);
+     if (status != NC_NOERR) handle_error(status);
+\endcode
+*/
+int
+nc__create(const char *path, int cmode, size_t initialsz,
+	   size_t *chunksizehintp, int *ncidp)
+{
+   return NC_create(path, cmode, initialsz, 0, 
+		    chunksizehintp, 0, NULL, ncidp);
+
+}
+/**
+\internal
+
+\deprecated This function was used in the old days with the Cray at
+NCAR. The Cray is long gone, and this call is supported only for
+backward compatibility.
+
+ */
+int
+nc__create_mp(const char *path, int cmode, size_t initialsz, 
+	      int basepe, size_t *chunksizehintp, int *ncidp)
+{
+   return NC_create(path, cmode, initialsz, basepe, 
+		    chunksizehintp, 0, NULL, ncidp);
+}
+
+/** 
+Open an existing netCDF file.
+ 
+This function opens an existing netCDF dataset for access. It
+determines the underlying file format automatically. Use the same call
+to open a netCDF classic, 64-bit offset, or netCDF-4 file.
+
+\param path File name for netCDF dataset to be opened. When DAP
+support is enabled, then the path may be an OPeNDAP URL rather than a
+file path.
+ 
+\param mode The mode flag may include NC_WRITE (for read/write
+access) and NC_SHARE (see below) and NC_DISKLESS (see below).
+
+\param ncidp Pointer to location where returned netCDF ID is to be
+stored.
+
+<h2>Open Mode</h2>
+
+A zero value (or NC_NOWRITE) specifies the default behavior: open the
+dataset with read-only access, buffering and caching accesses for
+efficiency.
+
+Otherwise, the open mode is NC_WRITE, NC_SHARE, or
+NC_WRITE|NC_SHARE. Setting the NC_WRITE flag opens the dataset with
+read-write access. ("Writing" means any kind of change to the dataset,
+including appending or changing data, adding or renaming dimensions,
+variables, and attributes, or deleting attributes.)
+
+The NC_SHARE flag is only used for netCDF classic and 64-bit offset
+files. It is appropriate when one process may be writing the dataset
+and one or more other processes reading the dataset concurrently; it
+means that dataset accesses are not buffered and caching is
+limited. Since the buffering scheme is optimized for sequential
+access, programs that do not access data sequentially may see some
+performance improvement by setting the NC_SHARE flag.
+
+This procedure may also be invoked with the NC_DISKLESS flag
+set in the mode argument if the file to be opened is a
+classic format file.  For nc_open(), this flag applies only
+to files in classic format.  If the file is of type
+NC_NETCDF4, then the NC_DISKLESS flag will be ignored.
+
+If NC_DISKLESS is specified, then the whole file is read completely into
+memory. In effect this creates an in-memory cache of the file.
+If the mode flag also specifies NC_WRITE, then the in-memory cache
+will be re-written to the disk file when nc_close() is called.
+For some kinds of manipulations, having the in-memory cache can
+speed up file processing. But in simple cases, non-cached
+processing may actually be faster than using cached processing.
+You will need to experiment to determine if the in-memory caching
+is worthwhile for your application.
+
+Normally, NC_DISKLESS allocates space in the heap for
+storing the in-memory file. If, however, the ./configure
+flags --enable-mmap is used, and the additional mode flag
+NC_MMAP is specified, then the file will be opened using
+the operating system MMAP facility.
+This flag only applies to files in classic format. Extended
+format (netcdf-4) files will ignore the NC_MMAP flag.
+
+In most cases, using MMAP provides no advantage
+for just NC_DISKLESS. The one case where using MMAP is an
+advantage is when a file is to be opened and only a small portion
+of its data is to be read and/or written.
+In this scenario, MMAP will cause only the accessed data to be
+retrieved from disk. Without MMAP, NC_DISKLESS will read the whole
+file into memory on nc_open. Thus, MMAP will provide some performance
+improvement in this case.
+
+It is not necessary to pass any information about the format of the
+file being opened. The file type will be detected automatically by the
+netCDF library.
+ 
+If a the path is a DAP URL, then the open mode is read-only.
+Setting NC_WRITE will be ignored.
+
+\note When opening a netCDF-4 file HDF5 error reporting is turned off,
+if it is on. This doesn't stop the HDF5 error stack from recording the
+errors, it simply stops their display to the user through stderr.
+
+nc_open()returns the value NC_NOERR if no errors occurred. Otherwise,
+the returned status indicates an error. Possible causes of errors
+include:
+
+Note that nc_open(path,cmode,ncidp) is equivalent to the invocation of
+nc__open(path,cmode,NC_SIZEHINT_DEFAULT,NULL,ncidp).
+
+\returns ::NC_NOERR No error.
+
+\returns ::NC_ENOMEM Out of memory.
+
+\returns ::NC_EHDFERR HDF5 error. (NetCDF-4 files only.)
+
+\returns ::NC_EDIMMETA Error in netCDF-4 dimension metadata. (NetCDF-4 files only.)
+
+<h1>Examples</h1>
+
+Here is an example using nc_open()to open an existing netCDF dataset
+named foo.nc for read-only, non-shared access:
+
+@code
+#include <netcdf.h>
+   ... 
+int status = NC_NOERR;
+int ncid;
+   ... 
+status = nc_open("foo.nc", 0, &ncid);
+if (status != NC_NOERR) handle_error(status);
+@endcode
+*/
+int
+nc_open(const char *path, int mode, int *ncidp)
+{
+   return NC_open(path, mode, 0, NULL, 0, NULL, ncidp);
+}
+
+/** 
+Open a netCDF file with extra performance parameters for the classic
+library.
+
+\param path File name for netCDF dataset to be opened. When DAP
+support is enabled, then the path may be an OPeNDAP URL rather than a
+file path.
+ 
+\param mode The mode flag may include NC_WRITE (for read/write
+access) and NC_SHARE as in nc_open().
+
+\param chunksizehintp A size hint for the classic library. Only
+applies to classic and 64-bit offset files. See below for more
+information.
+
+\param ncidp Pointer to location where returned netCDF ID is to be
+stored.
+
+<h1>The chunksizehintp Parameter</h1>
+
+The argument referenced by bufrsizehintp controls a space versus time
+tradeoff, memory allocated in the netcdf library versus number of
+system calls.
+
+Because of internal requirements, the value may not be set to exactly
+the value requested. The actual value chosen is returned by reference.
+
+Using a NULL pointer or having the pointer point to the value
+NC_SIZEHINT_DEFAULT causes the library to choose a default. 
+How the system chooses the default depends on the system. On
+many systems, the "preferred I/O block size" is available from the
+stat() system call, struct stat member st_blksize. If this is
+available it is used. Lacking that, twice the system pagesize is used.
+
+Lacking a call to discover the system pagesize, we just set default
+bufrsize to 8192.
+
+The bufrsize is a property of a given open netcdf descriptor ncid, it
+is not a persistent property of the netcdf dataset.
+
+
+\returns ::NC_NOERR No error.
+
+\returns ::NC_ENOMEM Out of memory.
+
+\returns ::NC_EHDFERR HDF5 error. (NetCDF-4 files only.)
+
+\returns ::NC_EDIMMETA Error in netCDF-4 dimension metadata. (NetCDF-4
+files only.)
+
+*/
+int
+nc__open(const char *path, int mode,
+	 size_t *chunksizehintp, int *ncidp)
+{
+   return NC_open(path, mode, 0, chunksizehintp, 0, 
+		  NULL, ncidp);
+}
+
+/**
+\internal
+
+\deprecated This function was used in the old days with the Cray at
+NCAR. The Cray is long gone, and this call is supported only for
+backward compatibility.
+
+ */
+int
+nc__open_mp(const char *path, int mode, int basepe, 
+	    size_t *chunksizehintp, int *ncidp)
+{
+   return NC_open(path, mode, basepe, chunksizehintp,
+		  0, NULL, ncidp);
+}
+
+/** 
+Get the file pathname (or the opendap URL) which was used to
+open/create the ncid's file.
+
+\param ncid NetCDF ID, from a previous call to nc_open() or
+nc_create().
+
+\param pathlen Pointer where length of path will be returned. Ignored
+if NULL.
+
+\param path Pointer where path name will be copied. Space must already
+be allocated. Ignored if NULL.  
+
+\returns ::NC_NOERR No error.
+
+\returns ::NC_EBADID Invalid ncid passed.
+*/
+int 
+nc_inq_path(int ncid, size_t *pathlen, char *path)
+{
+   NC* ncp;
+   int stat = NC_NOERR;
+   if ((stat = NC_check_id(ncid, &ncp)))
+      return stat;
+   if(ncp->path == NULL) {
+	if(pathlen) *pathlen = 0;
+	if(path) path[0] = '\0';
+   } else {
+       if (pathlen) *pathlen = strlen(ncp->path);
+       if (path) strcpy(path, ncp->path);
+   }
+   return stat;
+}
+
+/**
+Put open netcdf dataset into define mode
+
+The function nc_redef puts an open netCDF dataset into define mode, so
+dimensions, variables, and attributes can be added or renamed and
+attributes can be deleted.
+
+For netCDF-4 files (i.e. files created with NC_NETCDF4 in the cmode in
+their call to nc_create()), it is not necessary to call nc_redef()
+unless the file was also created with NC_STRICT_NC3. For straight-up
+netCDF-4 files, nc_redef() is called automatically, as needed.
+
+For all netCDF-4 files, the root ncid must be used. This is the ncid
+returned by nc_open() and nc_create(), and points to the root of the
+hierarchy tree for netCDF-4 files.
+
+\param ncid NetCDF ID, from a previous call to nc_open() or
+nc_create().
+
+\returns ::NC_NOERR No error.
+
+\returns ::NC_EBADID Bad ncid.
+
+\returns ::NC_EBADGRPID The ncid must refer to the root group of the
+file, that is, the group returned by nc_open() or nc_create().
+
+\returns ::NC_EINDEFINE Already in define mode.
+
+\returns ::NC_EPERM File is read-only.
+
+<h1>Example</h1>
+
+Here is an example using nc_redef to open an existing netCDF dataset
+named foo.nc and put it into define mode:
+
+\code
+#include <netcdf.h>
+   ... 
+int status = NC_NOERR;
+int ncid;
+   ... 
+status = nc_open("foo.nc", NC_WRITE, &ncid);  
+if (status != NC_NOERR) handle_error(status);
+   ... 
+status = nc_redef(ncid);                      
+if (status != NC_NOERR) handle_error(status);
+\endcode
+ */
+int
+nc_redef(int ncid)
+{
+   NC* ncp;
+   int stat = NC_check_id(ncid, &ncp);
+   if(stat != NC_NOERR) return stat;
+   return ncp->dispatch->redef(ncid);
+}
+
+/**
+Leave define mode
+
+The function nc_enddef() takes an open netCDF dataset out of define
+mode. The changes made to the netCDF dataset while it was in define
+mode are checked and committed to disk if no problems
+occurred. Non-record variables may be initialized to a "fill value" as
+well with nc_set_fill(). The netCDF dataset is then placed in data
+mode, so variable data can be read or written.
+
+It's not necessary to call nc_enddef() for netCDF-4 files. With netCDF-4
+files, nc_enddef() is called when needed by the netcdf-4 library. User
+calls to nc_enddef() for netCDF-4 files still flush the metadata to
+disk.
+
+This call may involve copying data under some circumstances. For a
+more extensive discussion see File Structure and Performance.
+
+For netCDF-4/HDF5 format files there are some variable settings (the
+compression, endianness, fletcher32 error correction, and fill value)
+which must be set (if they are going to be set at all) between the
+nc_def_var() and the next nc_enddef(). Once the nc_enddef() is called,
+these settings can no longer be changed for a variable.  
+
+\param ncid NetCDF ID, from a previous call to nc_open() or
+nc_create().
+
+If you use a group id (in a netCDF-4/HDF5 file), the enddef
+will apply to the entire file. That means the enddef will not just end
+define mode in one group, but in the entire file.
+
+\returns ::NC_NOERR no error
+
+\returns ::NC_EBADID Invalid ncid passed.
+
+<h1>Example</h1>
+
+Here is an example using nc_enddef() to finish the definitions of a new
+netCDF dataset named foo.nc and put it into data mode:
+
+\code
+     #include <netcdf.h>
+        ...
+     int status = NC_NOERR;
+     int ncid;
+        ...
+     status = nc_create("foo.nc", NC_NOCLOBBER, &ncid);
+     if (status != NC_NOERR) handle_error(status);
+     
+        ...  create dimensions, variables, attributes 
+     
+     status = nc_enddef(ncid); 
+     if (status != NC_NOERR) handle_error(status);
+\endcode
+ */
+int
+nc_enddef(int ncid)
+{
+   int status = NC_NOERR;
+   NC *ncp;
+   status = NC_check_id(ncid, &ncp); 
+   if(status != NC_NOERR) return status;
+   return ncp->dispatch->_enddef(ncid,0,1,0,1);
+}
+
+/**
+Leave define mode with performance tuning
+
+The function nc__enddef takes an open netCDF dataset out of define
+mode. The changes made to the netCDF dataset while it was in define
+mode are checked and committed to disk if no problems
+occurred. Non-record variables may be initialized to a "fill value" as
+well with nc_set_fill(). The netCDF dataset is then placed in data mode,
+so variable data can be read or written.
+
+This call may involve copying data under some circumstances. For a
+more extensive discussion see File Structure and Performance.
+
+\warning This function exposes internals of the netcdf version 1 file
+format. Users should use nc_enddef() in most circumstances. This
+function may not be available on future netcdf implementations.
+
+The classic netcdf file format has three sections, the "header"
+section, the data section for fixed size variables, and the data
+section for variables which have an unlimited dimension (record
+variables).
+
+The header begins at the beginning of the file. The index (offset) of
+the beginning of the other two sections is contained in the
+header. Typically, there is no space between the sections. This causes
+copying overhead to accrue if one wishes to change the size of the
+sections, as may happen when changing names of things, text attribute
+values, adding attributes or adding variables. Also, for buffered i/o,
+there may be advantages to aligning sections in certain ways.
+
+The minfree parameters allow one to control costs of future calls to
+nc_redef, nc_enddef() by requesting that minfree bytes be available at
+the end of the section.
+
+The align parameters allow one to set the alignment of the beginning
+of the corresponding sections. The beginning of the section is rounded
+up to an index which is a multiple of the align parameter. The flag
+value ALIGN_CHUNK tells the library to use the bufrsize (see above) as
+the align parameter. It has nothing to do with the chunking
+(multidimensional tiling) features of netCDF-4.
+
+The file format requires mod 4 alignment, so the align parameters are
+silently rounded up to multiples of 4. The usual call,
+
+\code
+     nc_enddef(ncid);
+\endcode
+
+is equivalent to
+
+\code
+     nc__enddef(ncid, 0, 4, 0, 4);
+\endcode
+
+The file format does not contain a "record size" value, this is
+calculated from the sizes of the record variables. This unfortunate
+fact prevents us from providing minfree and alignment control of the
+"records" in a netcdf file. If you add a variable which has an
+unlimited dimension, the third section will always be copied with the
+new variable added.  
+
+\param ncid NetCDF ID, from a previous call to nc_open() or
+nc_create().
+
+\param h_minfree Sets the pad at the end of the "header" section.
+
+\param v_align Controls the alignment of the beginning of the data
+section for fixed size variables.
+
+\param v_minfree Sets the pad at the end of the data section for fixed
+size variables.
+
+\param r_align Controls the alignment of the beginning of the data
+section for variables which have an unlimited dimension (record
+variables).
+
+\returns ::NC_NOERR No error.
+
+\returns ::NC_EBADID Invalid ncid passed.
+
+ */
+int
+nc__enddef(int ncid, size_t h_minfree, size_t v_align, size_t v_minfree, 
+	   size_t r_align)
+{
+   NC* ncp;
+   int stat = NC_check_id(ncid, &ncp);
+   if(stat != NC_NOERR) return stat;
+   return ncp->dispatch->_enddef(ncid,h_minfree,v_align,v_minfree,r_align);
+}
+
+/**
+Synchronize an open netcdf dataset to disk
+
+The function nc_sync() offers a way to synchronize the disk copy of a
+netCDF dataset with in-memory buffers. There are two reasons you might
+want to synchronize after writes:
+- To minimize data loss in case of abnormal termination, or
+- To make data available to other processes for reading immediately
+  after it is written. But note that a process that already had the
+  dataset open for reading would not see the number of records
+  increase when the writing process calls nc_sync(); to accomplish this,
+  the reading process must call nc_sync.
+
+This function is backward-compatible with previous versions of the
+netCDF library. The intent was to allow sharing of a netCDF dataset
+among multiple readers and one writer, by having the writer call
+nc_sync() after writing and the readers call nc_sync() before each
+read. For a writer, this flushes buffers to disk. For a reader, it
+makes sure that the next read will be from disk rather than from
+previously cached buffers, so that the reader will see changes made by
+the writing process (e.g., the number of records written) without
+having to close and reopen the dataset. If you are only accessing a
+small amount of data, it can be expensive in computer resources to
+always synchronize to disk after every write, since you are giving up
+the benefits of buffering.
+
+An easier way to accomplish sharing (and what is now recommended) is
+to have the writer and readers open the dataset with the NC_SHARE
+flag, and then it will not be necessary to call nc_sync() at
+all. However, the nc_sync() function still provides finer granularity
+than the NC_SHARE flag, if only a few netCDF accesses need to be
+synchronized among processes.
+
+It is important to note that changes to the ancillary data, such as
+attribute values, are not propagated automatically by use of the
+NC_SHARE flag. Use of the nc_sync() function is still required for this
+purpose.
+
+Sharing datasets when the writer enters define mode to change the data
+schema requires extra care. In previous releases, after the writer
+left define mode, the readers were left looking at an old copy of the
+dataset, since the changes were made to a new copy. The only way
+readers could see the changes was by closing and reopening the
+dataset. Now the changes are made in place, but readers have no
+knowledge that their internal tables are now inconsistent with the new
+dataset schema. If netCDF datasets are shared across redefinition,
+some mechanism external to the netCDF library must be provided that
+prevents access by readers during redefinition and causes the readers
+to call nc_sync before any subsequent access.
+
+When calling nc_sync(), the netCDF dataset must be in data mode. A
+netCDF dataset in define mode is synchronized to disk only when
+nc_enddef() is called. A process that is reading a netCDF dataset that
+another process is writing may call nc_sync to get updated with the
+changes made to the data by the writing process (e.g., the number of
+records written), without having to close and reopen the dataset.
+
+Data is automatically synchronized to disk when a netCDF dataset is
+closed, or whenever you leave define mode.
+
+\param ncid NetCDF ID, from a previous call to nc_open() or
+nc_create().
+
+\returns ::NC_NOERR No error.
+
+\returns ::NC_EBADID Invalid ncid passed.
+ */
+int
+nc_sync(int ncid)
+{
+   NC* ncp;
+   int stat = NC_check_id(ncid, &ncp);
+   if(stat != NC_NOERR) return stat;
+   return ncp->dispatch->sync(ncid);
+}
+
+/**
+\internal
+
+Users no longer need to call this function, since it is called
+automatically by nc_close() in case the dataset is in define mode and
+something goes wrong with committing the changes. The function
+nc_abort() just closes the netCDF dataset, if not in define mode. If
+the dataset is being created and is still in define mode, the dataset
+is deleted. If define mode was entered by a call to nc_redef(), the
+netCDF dataset is restored to its state before definition mode was
+entered and the dataset is closed.
+
+\param ncid NetCDF ID, from a previous call to nc_open() or
+nc_create().
+
+\returns ::NC_NOERR No error.
+
+<h1>Example</h1>
+
+Here is an example using nc_abort to back out of redefinitions of a
+dataset named foo.nc:
+
+\code
+     #include <netcdf.h>
+        ...
+     int ncid, status, latid;
+        ...
+     status = nc_open("foo.nc", NC_WRITE, &ncid);
+     if (status != NC_NOERR) handle_error(status);
+        ...
+     status = nc_redef(ncid);                  
+     if (status != NC_NOERR) handle_error(status);
+        ...
+     status = nc_def_dim(ncid, "lat", 18L, &latid);
+     if (status != NC_NOERR) {
+        handle_error(status);
+        status = nc_abort(ncid);               
+        if (status != NC_NOERR) handle_error(status);
+     }
+\endcode
+
+ */
+int
+nc_abort(int ncid)
+{
+   NC* ncp;
+   int stat = NC_check_id(ncid, &ncp);
+   if(stat != NC_NOERR) return stat;
+   if(ncp->path != NULL) free(ncp->path);
+   ncp->path = NULL;   
+   return ncp->dispatch->abort(ncid);
+}
+
+/**
+Close an open netCDF dataset
+
+If the dataset in define mode, nc_enddef() will be called before
+closing. (In this case, if nc_enddef() returns an error, nc_abort() will
+automatically be called to restore the dataset to the consistent state
+before define mode was last entered.) After an open netCDF dataset is
+closed, its netCDF ID may be reassigned to the next netCDF dataset
+that is opened or created.
+
+\param ncid NetCDF ID, from a previous call to nc_open() or nc_create().
+
+\returns ::NC_NOERR No error.
+
+\returns ::NC_EBADID Invalid id passed.
+
+\returns ::NC_EBADGRPID ncid did not contain the root group id of this
+file. (NetCDF-4 only).
+
+<h1>Example</h1>
+
+Here is an example using nc_close to finish the definitions of a new
+netCDF dataset named foo.nc and release its netCDF ID:
+
+\code
+     #include <netcdf.h>
+        ...
+     int status = NC_NOERR;
+     int ncid;
+        ...
+     status = nc_create("foo.nc", NC_NOCLOBBER, &ncid);
+     if (status != NC_NOERR) handle_error(status);
+     
+        ...   create dimensions, variables, attributes 
+     
+     status = nc_close(ncid);       
+     if (status != NC_NOERR) handle_error(status);
+\endcode
+
+ */
+int
+nc_close(int ncid)
+{
+   NC* ncp;
+   int stat = NC_check_id(ncid, &ncp);
+   if(stat != NC_NOERR) return stat;
+   return ncp->dispatch->close(ncid);
+}
+
+/**
+Change the fill-value mode to improve write performance.
+
+This function is intended for advanced usage, to optimize writes under
+some circumstances described below. The function nc_set_fill() sets the
+fill mode for a netCDF dataset open for writing and returns the
+current fill mode in a return parameter. The fill mode can be
+specified as either ::NC_FILL or ::NC_NOFILL. The default behavior
+corresponding to ::NC_FILL is that data is pre-filled with fill values,
+that is fill values are written when you create non-record variables
+or when you write a value beyond data that has not yet been
+written. This makes it possible to detect attempts to read data before
+it was written. For more information on the use of fill values see
+Fill Values. For information about how to define your own fill values
+see Attribute Conventions.
+
+The behavior corresponding to ::NC_NOFILL overrides the default behavior
+of prefilling data with fill values. This can be used to enhance
+performance, because it avoids the duplicate writes that occur when
+the netCDF library writes fill values that are later overwritten with
+data.
+
+A value indicating which mode the netCDF dataset was already in is
+returned. You can use this value to temporarily change the fill mode
+of an open netCDF dataset and then restore it to the previous mode.
+
+After you turn on ::NC_NOFILL mode for an open netCDF dataset, you must
+be certain to write valid data in all the positions that will later be
+read. Note that nofill mode is only a transient property of a netCDF
+dataset open for writing: if you close and reopen the dataset, it will
+revert to the default behavior. You can also revert to the default
+behavior by calling nc_set_fill() again to explicitly set the fill mode
+to ::NC_FILL.
+
+There are three situations where it is advantageous to set nofill
+mode:
+- Creating and initializing a netCDF dataset. In this case, you should
+  set nofill mode before calling nc_enddef() and then write completely
+  all non-record variables and the initial records of all the record
+  variables you want to initialize.
+- Extending an existing record-oriented netCDF dataset. Set nofill
+  mode after opening the dataset for writing, then append the
+  additional records to the dataset completely, leaving no intervening
+  unwritten records.
+- Adding new variables that you are going to initialize to an existing
+  netCDF dataset. Set nofill mode before calling nc_enddef() then write
+  all the new variables completely.
+
+If the netCDF dataset has an unlimited dimension and the last record
+was written while in nofill mode, then the dataset may be shorter than
+if nofill mode was not set, but this will be completely transparent if
+you access the data only through the netCDF interfaces.
+
+The use of this feature may not be available (or even needed) in
+future releases. Programmers are cautioned against heavy reliance upon
+this feature.
+
+\param ncid NetCDF ID, from a previous call to nc_open() or 
+nc_create().
+
+\param fillmode Desired fill mode for the dataset, either ::NC_NOFILL or
+::NC_FILL.
+
+\param old_modep Pointer to location for returned current fill mode of
+the dataset before this call, either ::NC_NOFILL or ::NC_FILL.
+
+\returns ::NC_NOERR No error.
+
+\returns ::NC_EBADID The specified netCDF ID does not refer to an open
+netCDF dataset.
+
+\returns ::NC_EPERM The specified netCDF ID refers to a dataset open for
+read-only access.
+
+\returns ::NC_EINVAL The fill mode argument is neither ::NC_NOFILL nor
+::NC_FILL.
+
+<h1>Example</h1>
+
+Here is an example using nc_set_fill() to set nofill mode for subsequent
+writes of a netCDF dataset named foo.nc:
+
+\code
+     #include <netcdf.h>
+        ...
+     int ncid, status, old_fill_mode;
+        ...
+     status = nc_open("foo.nc", NC_WRITE, &ncid);  
+     if (status != NC_NOERR) handle_error(status);
+     
+        ...     write data with default prefilling behavior
+     
+     status = nc_set_fill(ncid, ::NC_NOFILL, &old_fill_mode);
+     if (status != NC_NOERR) handle_error(status);
+     
+        ...    write data with no prefilling 
+\endcode
+ */
+int
+nc_set_fill(int ncid, int fillmode, int *old_modep)
+{
+   NC* ncp;
+   int stat = NC_check_id(ncid, &ncp);
+   if(stat != NC_NOERR) return stat;
+   return ncp->dispatch->set_fill(ncid,fillmode,old_modep);
+}
+
+/**
+\internal
+
+\deprecated This function was used in the old days with the Cray at
+NCAR. The Cray is long gone, and this call is supported only for
+backward compatibility.
+
+\returns ::NC_NOERR No error.
+
+\returns ::NC_EBADID Invalid ncid passed.
+ */
+int
+nc_inq_base_pe(int ncid, int *pe)
+{
+   NC* ncp;
+   int stat = NC_check_id(ncid, &ncp);
+   if(stat != NC_NOERR) return stat;
+   return ncp->dispatch->inq_base_pe(ncid,pe);
+}
+
+/**
+\internal
+
+\deprecated This function was used in the old days with the Cray at
+NCAR. The Cray is long gone, and this call is supported only for
+backward compatibility.
+
+\returns ::NC_NOERR No error.
+
+\returns ::NC_EBADID Invalid ncid passed.
+ */
+int
+nc_set_base_pe(int ncid, int pe)
+{
+   NC* ncp;
+   int stat = NC_check_id(ncid, &ncp);
+   if(stat != NC_NOERR) return stat;
+   return ncp->dispatch->set_base_pe(ncid,pe);
+}
+
+/**
+Inquire about the binary format of a netCDF file.
+
+This function returns the (rarely needed) format version.
+
+\param ncid NetCDF ID, from a previous call to nc_open() or 
+nc_create().
+
+\param formatp Pointer to location for returned format version, one of
+NC_FORMAT_CLASSIC, NC_FORMAT_64BIT, NC_FORMAT_NETCDF4,
+NC_FORMAT_NETCDF4_CLASSIC.
+
+\returns ::NC_NOERR No error.
+
+\returns ::NC_EBADID Invalid ncid passed.
+
+ */
+int
+nc_inq_format(int ncid, int *formatp)
+{
+   NC* ncp;
+   int stat = NC_check_id(ncid, &ncp);
+   if(stat != NC_NOERR) return stat;
+   return ncp->dispatch->inq_format(ncid,formatp);
+}
+
+/**
+Inquire about a file or group.
+
+\param ncid NetCDF or group ID, from a previous call to nc_open(),
+nc_create(), nc_def_grp(), or associated inquiry functions such as 
+nc_inq_ncid().
+
+\param ndimsp Pointer to location for returned number of dimensions
+defined for this netCDF dataset. Ignored if NULL.
+
+\param nvarsp Pointer to location for returned number of variables
+defined for this netCDF dataset. Ignored if NULL.
+
+\param nattsp Pointer to location for returned number of global
+attributes defined for this netCDF dataset. Ignored if NULL.
+
+\param unlimdimidp Pointer to location for returned ID of the
+unlimited dimension, if there is one for this netCDF dataset. If no
+unlimited length dimension has been defined, -1 is returned. Ignored
+if NULL.  If there are multiple unlimited dimensions (possible only 
+for netCDF-4 files), only a pointer to the first is returned, for
+backward compatibility.  If you want them all, use nc_inq_unlimids().
+
+\returns ::NC_NOERR No error.
+
+\returns ::NC_EBADID Invalid ncid passed.
+
+<h1>Example</h1>
+
+Here is an example using nc_inq to find out about a netCDF dataset
+named foo.nc:
+
+\code
+     #include <netcdf.h>
+        ...
+     int status, ncid, ndims, nvars, ngatts, unlimdimid;
+        ...
+     status = nc_open("foo.nc", NC_NOWRITE, &ncid);
+     if (status != NC_NOERR) handle_error(status);
+        ...
+     status = nc_inq(ncid, &ndims, &nvars, &ngatts, &unlimdimid);
+     if (status != NC_NOERR) handle_error(status);
+\endcode
+ */
+int
+nc_inq(int ncid, int *ndimsp, int *nvarsp, int *nattsp, int *unlimdimidp)
+{
+   NC* ncp;
+   int stat = NC_check_id(ncid, &ncp);
+   if(stat != NC_NOERR) return stat;
+   return ncp->dispatch->inq(ncid,ndimsp,nvarsp,nattsp,unlimdimidp);
+}
+
+int
+nc_inq_nvars(int ncid, int *nvarsp)
+{
+   NC* ncp;
+   int stat = NC_check_id(ncid, &ncp);
+   if(stat != NC_NOERR) return stat;
+   return ncp->dispatch->inq(ncid, NULL, nvarsp, NULL, NULL);
+}
+
+/**
+Inquire about a type.
+
+Given an ncid and a typeid, get the information about a type. This
+function will work on any type, including atomic and any user defined
+type, whether compound, opaque, enumeration, or variable length array.
+
+For even more information about a user defined type nc_inq_user_type().
+
+\param ncid The ncid for the group containing the type (ignored for
+atomic types).  
+
+\param xtype The typeid for this type, as returned by nc_def_compound,
+nc_def_opaque, nc_def_enum, nc_def_vlen, or nc_inq_var, or as found in
+netcdf.h in the list of atomic types (NC_CHAR, NC_INT, etc.).
+
+\param name If non-NULL, the name of the user defined type will be
+copied here. It will be NC_MAX_NAME bytes or less. For atomic types,
+the type name from CDL will be given.
+
+\param size If non-NULL, the (in-memory) size of the type in bytes
+will be copied here. VLEN type size is the size of nc_vlen_t. String
+size is returned as the size of a character pointer. The size may be
+used to malloc space for the data, no matter what the type.
+
+\returns ::NC_NOERR No error.
+
+\returns ::NC_EBADTYPE Bad typeid.
+
+\returns ::NC_ENOTNC4 Seeking a user-defined type in a netCDF-3 file.
+
+\returns ::NC_ESTRICTNC3 Seeking a user-defined type in a netCDF-4 file
+for which classic model has been turned on.
+
+\returns ::NC_EBADGRPID Bad group ID in ncid.
+
+\returns ::NC_EBADID Type ID not found.
+
+\returns ::NC_EHDFERR An error was reported by the HDF5 layer.
+
+<h1>Example</h1>
+
+This example is from the test program tst_enums.c, and it uses all the
+possible inquiry functions on an enum type.
+
+\code        
+           if (nc_inq_user_type(ncid, typeids[0], name_in, &base_size_in, &base_nc_type_in,
+                                &nfields_in, &class_in)) ERR;
+           if (strcmp(name_in, TYPE_NAME) || base_size_in != sizeof(int) ||
+               base_nc_type_in != NC_INT || nfields_in != NUM_MEMBERS || class_in != NC_ENUM) ERR;
+           if (nc_inq_type(ncid, typeids[0], name_in, &base_size_in)) ERR;
+           if (strcmp(name_in, TYPE_NAME) || base_size_in != sizeof(int)) ERR;
+           if (nc_inq_enum(ncid, typeids[0], name_in, &base_nc_type, &base_size_in, &num_members)) ERR;
+           if (strcmp(name_in, TYPE_NAME) || base_nc_type != NC_INT || num_members != NUM_MEMBERS) ERR;
+           for (i = 0; i < NUM_MEMBERS; i++)
+           {
+              if (nc_inq_enum_member(ncid, typeid, i, name_in, &value_in)) ERR;
+              if (strcmp(name_in, member_name[i]) || value_in != member_value[i]) ERR;
+              if (nc_inq_enum_ident(ncid, typeid, member_value[i], name_in)) ERR;
+              if (strcmp(name_in, member_name[i])) ERR;
+           }
+     
+           if (nc_close(ncid)) ERR;
+\endcode
+ */
+int
+nc_inq_type(int ncid, nc_type xtype, char *name, size_t *size)
+{
+   NC* ncp;
+   /* For compatibility, we need to allow inq about
+      atomic types, even if ncid is ill-defined */
+   if(xtype <= ATOMICTYPEMAX) {
+      if(xtype <= NC_NAT) return NC_EBADTYPE;
+      if(name) strncpy(name,NC_atomictypename(xtype),NC_MAX_NAME);
+      if(size) *size = NC_atomictypelen(xtype);
+      return NC_NOERR;
+   } else {
+      int stat = NC_check_id(ncid, &ncp);
+      if(stat != NC_NOERR) return NC_EBADTYPE; /* compatibility */
+      return ncp->dispatch->inq_type(ncid,xtype,name,size);
+   }
+}
+/**@}*/
+
+/**
+\internal
+\ingroup dispatch
+
+Create a file, calling the appropriate dispatch create call.
+
+For create, we have the following pieces of information to use to
+determine the dispatch table:
+- table specified by override
+- path
+- cmode
+
+\param path The file name of the new netCDF dataset.
+
+\param cmode The creation mode flag, the same as in nc_create().
+
+\param initialsz This parameter sets the initial size of the file at creation
+time. This only applies to classic and 64-bit offset files.
+
+\param basepe Deprecated parameter from the Cray days.
+
+\param chunksizehintp A pointer to the chunk size hint. This only
+applies to classic and 64-bit offset files.
+
+\param useparallel Non-zero if parallel I/O is to be used on this
+file.
+
+\param mpi_info Pointer to MPI comm and info.
+
+\param ncidp Pointer to location where returned netCDF ID is to be
+stored.
+
+\returns ::NC_NOERR No error.
+*/
+int
+NC_create(const char *path, int cmode, size_t initialsz, 
+	  int basepe, size_t *chunksizehintp, int useparallel, 
+	  void* mpi_info, int *ncidp)
+{
+   int stat = NC_NOERR;
+   NC* ncp = NULL;
+   NC_Dispatch* dispatcher = NULL;
+   /* Need three pieces of information for now */
+   int model = 0; /* one of the NC_DISPATCH_XXX values */
+   int isurl = 0;   /* dap or cdmremote or neither */
+   int xcmode = 0; /* for implied cmode flags */
+   extern int default_create_format;
+
+   /* Initialize the dispatch table. The function pointers in the
+    * dispatch table will depend on how netCDF was built
+    * (with/without netCDF-4, DAP, CDMREMOTE). */
+   if(!nc_initialized)
+   {
+      if ((stat = NC_initialize()))
+	 return stat; 
+      /* Do local initialization */
+      nc_local_initialize();
+      nc_initialized = 1;
+   }
+
+   if((isurl = NC_testurl(path)))
+	model = NC_urlmodel(path);
+
+   /* Look to the incoming cmode for hints */
+   if(model == 0) {
+      if(cmode & NC_NETCDF4 || cmode & NC_PNETCDF)
+	model = NC_DISPATCH_NC4;
+   }
+
+   if(model == 0) {
+      /* Check default format */
+      int format = default_create_format;
+      switch (format) {
+#ifdef USE_NETCDF4
+	 case NC_FORMAT_NETCDF4:
+	    xcmode |= NC_NETCDF4;
+	    model = NC_DISPATCH_NC4;
+	    break;
+	 case NC_FORMAT_NETCDF4_CLASSIC:
+	    xcmode |= NC_CLASSIC_MODEL;
+	    model = NC_DISPATCH_NC4;
+	    break;
+#endif
+	 case NC_FORMAT_64BIT:
+	    xcmode |= NC_64BIT_OFFSET;
+	    /* fall thru */
+	 case NC_FORMAT_CLASSIC:
+	 default:
+	    model = NC_DISPATCH_NC3;
+	    break;
+      }
+   }
+   
+   /* Add inferred flags */
+   cmode |= xcmode;
+
+#ifdef USE_NETCDF4
+   if((cmode & NC_MPIIO && cmode & NC_MPIPOSIX))
+      return  NC_EINVAL;
+#endif
+
+   if (!(dispatcher = NC_get_dispatch_override()))
+   {
+
+      /* Figure out what dispatcher to use */
+#ifdef USE_NETCDF4
+#ifdef USE_CDMREMOTE
+      if(model == (NC_DISPATCH_NC4 | NC_DISPATCH_NCR))
+	 dispatcher = NCCR_dispatch_table;
+      else
+#endif
+      if(model == (NC_DISPATCH_NC4))
+ 	dispatcher = NC4_dispatch_table;
+      else
+#endif /*USE_NETCDF4*/
+#ifdef USE_DAP
+      if(model == (NC_DISPATCH_NC3 | NC_DISPATCH_NCD))
+	dispatcher = NCD3_dispatch_table;
+      else
+#endif
+      if(model == (NC_DISPATCH_NC3))
+ 	dispatcher = NC3_dispatch_table;
+      else
+	 return NC_ENOTNC;
+   }
+
+   if ((stat = dispatcher->create(path, cmode, initialsz, basepe, chunksizehintp,
+				   useparallel, mpi_info, dispatcher, &ncp)))
+      return stat;
+
+   ncp->dispatch = dispatcher;
+   if(ncidp) 
+      *ncidp = ncp->ext_ncid;
+   if (!(ncp->path = nulldup(path)))
+      return NC_ENOMEM;
+   return NC_NOERR;
+}
+
+/**
+\internal
+\ingroup dispatch
+
+Open a netCDF file (or remote dataset) calling the appropriate
+dispatch function.
+
+For open, we have the following pieces of information to use to determine the dispatch table.
+- table specified by override
+- path
+- cmode
+- the contents of the file (if it exists), basically checking its magic number.
+
+\returns ::NC_NOERR No error.
+*/
+int
+NC_open(const char *path, int cmode,
+	int basepe, size_t *chunksizehintp,
+        int useparallel, void* mpi_info,
+        int *ncidp)
+{
+   int stat = NC_NOERR;
+   NC* ncp = NULL;
+   NC_Dispatch* dispatcher = NULL;
+   /* Need two pieces of information for now */
+   int model = 0;
+   int isurl = 0; 
+   int cdfversion = 0;
+   int hdfversion = 0;
+   extern int default_create_format;
+
+   if(!nc_initialized) {
+      stat = NC_initialize();
+      if(stat) return stat;
+      /* Do local initialization */
+      nc_local_initialize();
+      nc_initialized = 1;
+   }
+
+   isurl = NC_testurl(path);
+   if(isurl)
+      model = NC_urlmodel(path);
+
+   if(!isurl) {
+      /* Look at the file if it exists */
+      stat = NC_check_file_type(path,useparallel,mpi_info,&cdfversion,&hdfversion);
+      if(stat == NC_NOERR) {
+	 if(hdfversion != 0) {
+	    model = NC_DISPATCH_NC4;
+	 } else if(cdfversion != 0) {
+	    model = NC_DISPATCH_NC3;
+	 }
+      } 
+      /* else ignore the file */
+   }
+
+   /* Look to the incoming cmode for hints */
+   if(model == 0) {
+      if(cmode & NC_NETCDF4 || cmode & NC_PNETCDF) model |= NC_DISPATCH_NC4;
+   }
+
+   if(model == 0) model = NC_DISPATCH_NC3; /* final default */
+
+   /* Force flag consistentcy */
+   if(model & NC_DISPATCH_NC4)
+      cmode |= NC_NETCDF4;
+   else if(model & NC_DISPATCH_NC3) {
+      cmode &= ~NC_NETCDF4; /* must be netcdf-3 */
+      if(cdfversion == 2) cmode |= NC_64BIT_OFFSET;
+   }
+
+   if((cmode & NC_MPIIO && cmode & NC_MPIPOSIX))
+      return  NC_EINVAL;
+
+   /* override overrides any other table choice */
+   dispatcher = NC_get_dispatch_override();
+   if(dispatcher != NULL) goto havetable;
+
+   /* Figure out what dispatcher to use */
+#if  defined(USE_CDMREMOTE)
+   if(model == (NC_DISPATCH_NC4 | NC_DISPATCH_NCR))
+	dispatcher = NCCR_dispatch_table;
+   else
+#endif
+#if defined(USE_DAP)
+   if(model == (NC_DISPATCH_NC3 | NC_DISPATCH_NCD))
+	dispatcher = NCD3_dispatch_table;
+   else
+#endif
+#if defined(USE_NETCDF4)
+   if(model == (NC_DISPATCH_NC4))
+	dispatcher = NC4_dispatch_table;
+   else
+#endif
+   if(model == (NC_DISPATCH_NC3))
+	dispatcher = NC3_dispatch_table;
+   else
+      return  NC_ENOTNC;
+
+  havetable:
+  stat = dispatcher->open(path, cmode, basepe, chunksizehintp,
+			   useparallel, mpi_info, dispatcher, &ncp);
+   if(stat == NC_NOERR) {
+      ncp->dispatch = dispatcher;
+      if(ncidp) *ncidp = ncp->ext_ncid;
+      ncp->path = nulldup(path);
+      if(path == NULL) stat = NC_ENOMEM;	
+   }
+   return stat;
+}
+
+/*Provide an internal function for generating pseudo file descriptors
+  for systems that are not file based (e.g. dap, memio).
+*/
+
+/* Static counter for pseudo file descriptors (incremented) */
+static int pseudofd = 0;
+
+/* Create a pseudo file descriptor that does not
+   overlap real file descriptors
+*/
+int
+nc__pseudofd(void)
+{
+    if(pseudofd == 0)  {
+        int maxfd = 32767; /* default */
+#ifdef HAVE_GETRLIMIT
+        struct rlimit rl;
+        if(getrlimit(RLIMIT_NOFILE,&rl) == 0) {
+	    if(rl.rlim_max != RLIM_INFINITY)
+	        maxfd = rl.rlim_max;
+	    if(rl.rlim_cur != RLIM_INFINITY)
+	        maxfd = rl.rlim_cur;
+	}
+	pseudofd = maxfd+1;
+#endif
+    }
+
+    return pseudofd++;
+}
+
+
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/src_netcdf4/dgroup.c
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/src_netcdf4/dgroup.c	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/src_netcdf4/dgroup.c	(revision 1749)
@@ -0,0 +1,187 @@
+/*! \file
+Functions for netCDF-4 features.
+
+Copyright 2010 University Corporation for Atmospheric
+Research/Unidata. See \ref COPYRIGHT file for more info. */
+
+#include "ncdispatch.h"
+
+/** \defgroup user_types User-Defined Types
+
+User defined types allow for more complex data structures.
+
+NetCDF-4 has added support for four different user defined data
+types. User defined type may only be used in files created with the
+::NC_NETCDF4 and without ::NC_CLASSIC_MODEL.
+- compound type: like a C struct, a compound type is a collection of
+types, including other user defined types, in one package.  
+- variable length array type: used to store ragged arrays.
+- opaque type: This type has only a size per element, and no other
+  type information.
+- enum type: Like an enumeration in C, this type lets you assign text
+  values to integer values, and store the integer values.
+
+Users may construct user defined type with the various nc_def_*
+functions described in this section. They may learn about user defined
+types by using the nc_inq_ functions defined in this section.
+
+Once types are constructed, define variables of the new type with
+nc_def_var (see nc_def_var). Write to them with nc_put_var1,
+nc_put_var, nc_put_vara, or nc_put_vars. Read data of user-defined
+type with nc_get_var1, nc_get_var, nc_get_vara, or nc_get_vars (see
+\ref variables).
+
+Create attributes of the new type with nc_put_att (see nc_put_att_
+type). Read attributes of the new type with nc_get_att (see
+\ref attributes).
+*/
+/** \{ */ 
+
+/** \} */ 
+
+/** \defgroup groups Groups
+
+NetCDF-4 added support for hierarchical groups within netCDF datasets.
+
+Groups are identified with a ncid, which identifies both the open
+file, and the group within that file. When a file is opened with
+nc_open or nc_create, the ncid for the root group of that file is
+provided. Using that as a starting point, users can add new groups, or
+list and navigate existing groups.
+
+All netCDF calls take a ncid which determines where the call will take
+its action. For example, the nc_def_var function takes a ncid as its
+first parameter. It will create a variable in whichever group its ncid
+refers to. Use the root ncid provided by nc_create or nc_open to
+create a variable in the root group. Or use nc_def_grp to create a
+group and use its ncid to define a variable in the new group.
+
+Variable are only visible in the group in which they are defined. The
+same applies to attributes. âGlobalâ attributes are associated with
+the group whose ncid is used.
+
+Dimensions are visible in their groups, and all child groups.
+
+Group operations are only permitted on netCDF-4 files - that is, files
+created with the HDF5 flag in nc_create(). Groups are not compatible
+with the netCDF classic data model, so files created with the
+::NC_CLASSIC_MODEL file cannot contain groups (except the root group).
+
+ */
+/** \{ */ 
+int
+nc_inq_ncid(int ncid, const char *name, int *grp_ncid)
+{
+    NC* ncp;
+    int stat = NC_check_id(ncid,&ncp);
+    if(stat != NC_NOERR) return stat;
+    return ncp->dispatch->inq_ncid(ncid,name,grp_ncid);
+}
+
+int
+nc_inq_grps(int ncid, int *numgrps, int *ncids)
+{
+    NC* ncp;
+    int stat = NC_check_id(ncid,&ncp);
+    if(stat != NC_NOERR) return stat;
+    return ncp->dispatch->inq_grps(ncid,numgrps,ncids);
+}
+
+int
+nc_inq_grpname(int ncid, char *name)
+{
+    NC* ncp;
+    int stat = NC_check_id(ncid,&ncp);
+    if(stat != NC_NOERR) return stat;
+    return ncp->dispatch->inq_grpname(ncid,name);
+}
+
+int
+nc_inq_grpname_full(int ncid, size_t *lenp, char *full_name)
+{
+    NC* ncp;
+    int stat = NC_check_id(ncid,&ncp);
+    if(stat != NC_NOERR) return stat;
+    return ncp->dispatch->inq_grpname_full(ncid,lenp,full_name);
+}
+
+int
+nc_inq_grpname_len(int ncid, size_t *lenp)
+{
+    int stat = nc_inq_grpname_full(ncid,lenp,NULL);    
+    return stat;
+}
+
+int
+nc_inq_grp_parent(int ncid, int *parent_ncid)
+{
+    NC* ncp;
+    int stat = NC_check_id(ncid,&ncp);
+    if(stat != NC_NOERR) return stat;
+    return ncp->dispatch->inq_grp_parent(ncid,parent_ncid);
+}
+
+/* This has same semantics as nc_inq_ncid */ 
+int
+nc_inq_grp_ncid(int ncid, const char *grp_name, int *grp_ncid)
+{
+    return nc_inq_ncid(ncid,grp_name,grp_ncid);    
+}
+
+int
+nc_inq_grp_full_ncid(int ncid, const char *full_name, int *grp_ncid)
+{
+    NC* ncp;
+    int stat = NC_check_id(ncid,&ncp);
+    if(stat != NC_NOERR) return stat;
+    return ncp->dispatch->inq_grp_full_ncid(ncid,full_name,grp_ncid);
+}
+
+int 
+nc_inq_varids(int ncid, int *nvars, int *varids)
+{
+    NC* ncp;
+    int stat = NC_check_id(ncid,&ncp);
+    if(stat != NC_NOERR) return stat;
+    return ncp->dispatch->inq_varids(ncid,nvars,varids);
+}
+
+int 
+nc_inq_dimids(int ncid, int *ndims, int *dimids, int include_parents)
+{
+    NC* ncp;
+    int stat = NC_check_id(ncid,&ncp);
+    if(stat != NC_NOERR) return stat;
+    return ncp->dispatch->inq_dimids(ncid,ndims,dimids,include_parents);
+}
+
+int 
+nc_inq_typeids(int ncid, int *ntypes, int *typeids)
+{
+    NC* ncp;
+    int stat = NC_check_id(ncid,&ncp);
+    if(stat != NC_NOERR) return stat;
+    return ncp->dispatch->inq_typeids(ncid,ntypes,typeids);
+}
+
+int
+nc_def_grp(int parent_ncid, const char *name, int *new_ncid)
+{
+    NC* ncp;
+    int stat = NC_check_id(parent_ncid,&ncp);
+    if(stat != NC_NOERR) return stat;
+    return ncp->dispatch->def_grp(parent_ncid,name,new_ncid);
+}
+
+
+
+int 
+nc_show_metadata(int ncid)
+{
+    NC* ncp;
+    int stat = NC_check_id(ncid,&ncp);
+    if(stat != NC_NOERR) return stat;
+    return ncp->dispatch->show_metadata(ncid);
+}
+
+/** \} */ 
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/src_netcdf4/dim.c
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/src_netcdf4/dim.c	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/src_netcdf4/dim.c	(revision 1749)
@@ -0,0 +1,497 @@
+/*
+ *	Copyright 1996, University Corporation for Atmospheric Research
+ *      See netcdf/COPYRIGHT file for copying and redistribution conditions.
+ */
+/* $Id: dim.c,v 1.83 2010/05/25 17:54:15 dmh Exp $ */
+
+#include "nc.h"
+#include <stdlib.h>
+#include <string.h>
+#include <assert.h>
+#include "ncx.h"
+#include "fbits.h"
+#include "utf8proc.h"
+
+/*
+ * Free dim
+ * Formerly
+NC_free_dim(dim)
+ */
+void
+free_NC_dim(NC_dim *dimp)
+{
+	if(dimp == NULL)
+		return;
+	free_NC_string(dimp->name);
+	free(dimp);
+}
+
+
+NC_dim *
+new_x_NC_dim(NC_string *name)
+{
+	NC_dim *dimp;
+
+	dimp = (NC_dim *) malloc(sizeof(NC_dim));
+	if(dimp == NULL)
+		return NULL;
+
+	dimp->name = name;
+ 	dimp->hash = hash_fast(name->cp, strlen(name->cp));
+	dimp->size = 0;
+
+	return(dimp);
+}
+
+
+/*
+ * Formerly
+NC_new_dim(const char *uname, long size)
+ */
+static NC_dim *
+new_NC_dim(const char *uname, size_t size)
+{
+	NC_string *strp;
+	NC_dim *dimp;
+
+	char *name = (char *)utf8proc_NFC((const unsigned char *)uname);
+	if(name == NULL)
+	    return NULL;
+	strp = new_NC_string(strlen(name), name);
+	free(name);
+	if(strp == NULL)
+		return NULL;
+
+	dimp = new_x_NC_dim(strp);
+	if(dimp == NULL)
+	{
+		free_NC_string(strp);
+		return NULL;
+	}
+
+	dimp->size = size;
+
+	return(dimp);
+}
+
+
+static NC_dim *
+dup_NC_dim(const NC_dim *dimp)
+{
+	return new_NC_dim(dimp->name->cp, dimp->size);
+}
+
+/*
+ * Step thru NC_DIMENSION array, seeking the UNLIMITED dimension.
+ * Return dimid or -1 on not found.
+ * *dimpp is set to the appropriate NC_dim.
+ * The loop structure is odd. In order to parallelize,
+ * we moved a clearer 'break' inside the loop body to the loop test.
+ */
+int
+find_NC_Udim(const NC_dimarray *ncap, NC_dim **dimpp)
+{
+	assert(ncap != NULL);
+
+	if(ncap->nelems == 0)
+		return -1;
+
+	{
+	int dimid = 0;
+	NC_dim **loc = ncap->value;
+
+	for(; (size_t) dimid < ncap->nelems
+			 && (*loc)->size != NC_UNLIMITED; dimid++, loc++)
+	{
+		/*EMPTY*/
+	}
+	if(dimid >= ncap->nelems)
+		return(-1); /* not found */
+	/* else, normal return */
+	if(dimpp != NULL)
+		*dimpp = *loc;
+	return dimid;
+	}
+}
+
+
+/*
+ * Step thru NC_DIMENSION array, seeking match on uname.
+ * Return dimid or -1 on not found.
+ * *dimpp is set to the appropriate NC_dim.
+ * The loop structure is odd. In order to parallelize,
+ * we moved a clearer 'break' inside the loop body to the loop test.
+ */
+static int
+NC_finddim(const NC_dimarray *ncap, const char *uname, NC_dim **dimpp)
+{
+
+   int dimid;
+   uint32_t shash;
+   NC_dim ** loc;
+   char *name;
+
+   assert(ncap != NULL);
+
+   if(ncap->nelems == 0)
+      return -1;
+
+   {
+      dimid = 0;
+      loc = (NC_dim **) ncap->value;
+      /* normalized version of uname */
+      name = (char *)utf8proc_NFC((const unsigned char *)uname);
+      if(name == NULL)
+	 return NC_ENOMEM;
+      shash = hash_fast(name, strlen(name));
+
+      for(; (size_t) dimid < ncap->nelems
+	     && ((*loc)->hash != shash
+		 || strncmp((*loc)->name->cp, name, strlen(name)) != 0);
+	  dimid++, loc++)
+      {
+	 /*EMPTY*/
+      }
+      free(name);
+      if(dimid >= ncap->nelems)
+	 return(-1); /* not found */
+      /* else, normal return */
+      if(dimpp != NULL)
+	 *dimpp = *loc;
+      return(dimid);
+   }
+}
+
+
+/* dimarray */
+
+
+/*
+ * Free the stuff "in" (referred to by) an NC_dimarray.
+ * Leaves the array itself allocated.
+ */
+void
+free_NC_dimarrayV0(NC_dimarray *ncap)
+{
+	assert(ncap != NULL);
+
+	if(ncap->nelems == 0)
+		return;
+
+	assert(ncap->value != NULL);
+
+	{
+		NC_dim **dpp = ncap->value;
+		NC_dim *const *const end = &dpp[ncap->nelems];
+		for( /*NADA*/; dpp < end; dpp++)
+		{
+			free_NC_dim(*dpp);
+			*dpp = NULL;
+		}
+	}
+	ncap->nelems = 0;
+}
+
+
+/*
+ * Free NC_dimarray values.
+ * formerly
+NC_free_array()
+ */
+void
+free_NC_dimarrayV(NC_dimarray *ncap)
+{
+	assert(ncap != NULL);
+	
+	if(ncap->nalloc == 0)
+		return;
+
+	assert(ncap->value != NULL);
+
+	free_NC_dimarrayV0(ncap);
+
+	free(ncap->value);
+	ncap->value = NULL;
+	ncap->nalloc = 0;
+}
+
+
+int
+dup_NC_dimarrayV(NC_dimarray *ncap, const NC_dimarray *ref)
+{
+	int status = NC_NOERR;
+
+	assert(ref != NULL);
+	assert(ncap != NULL);
+
+	if(ref->nelems != 0)
+	{
+		const size_t sz = ref->nelems * sizeof(NC_dim *);
+		ncap->value = (NC_dim **) malloc(sz);
+		if(ncap->value == NULL)
+			return NC_ENOMEM;
+		(void) memset(ncap->value, 0, sz);
+		ncap->nalloc = ref->nelems;
+	}
+
+	ncap->nelems = 0;
+	{
+		NC_dim **dpp = ncap->value;
+		const NC_dim **drpp = (const NC_dim **)ref->value;
+		NC_dim *const *const end = &dpp[ref->nelems];
+		for( /*NADA*/; dpp < end; drpp++, dpp++, ncap->nelems++)
+		{
+			*dpp = dup_NC_dim(*drpp);
+			if(*dpp == NULL)
+			{
+				status = NC_ENOMEM;
+				break;
+			}
+		}
+	}
+
+	if(status != NC_NOERR)
+	{
+		free_NC_dimarrayV(ncap);
+		return status;
+	}
+
+	assert(ncap->nelems == ref->nelems);
+
+	return NC_NOERR;
+}
+
+
+/*
+ * Add a new handle on the end of an array of handles
+ * Formerly
+NC_incr_array(array, tail)
+ */
+static int
+incr_NC_dimarray(NC_dimarray *ncap, NC_dim *newelemp)
+{
+	NC_dim **vp;
+
+	assert(ncap != NULL);
+
+	if(ncap->nalloc == 0)
+	{
+		assert(ncap->nelems == 0);
+		vp = (NC_dim **) malloc(NC_ARRAY_GROWBY * sizeof(NC_dim *));
+		if(vp == NULL)
+			return NC_ENOMEM;
+		ncap->value = vp;
+		ncap->nalloc = NC_ARRAY_GROWBY;
+	}
+	else if(ncap->nelems +1 > ncap->nalloc)
+	{
+		vp = (NC_dim **) realloc(ncap->value,
+			(ncap->nalloc + NC_ARRAY_GROWBY) * sizeof(NC_dim *));
+		if(vp == NULL)
+			return NC_ENOMEM;
+		ncap->value = vp;
+		ncap->nalloc += NC_ARRAY_GROWBY;
+	}
+
+	if(newelemp != NULL)
+	{
+		ncap->value[ncap->nelems] = newelemp;
+		ncap->nelems++;
+	}
+	return NC_NOERR;
+}
+
+
+NC_dim *
+elem_NC_dimarray(const NC_dimarray *ncap, size_t elem)
+{
+	assert(ncap != NULL);
+		/* cast needed for braindead systems with signed size_t */
+	if(ncap->nelems == 0 || (unsigned long) elem >= ncap->nelems)
+		return NULL;
+
+	assert(ncap->value != NULL);
+
+	return ncap->value[elem];
+}
+
+
+/* Public */
+
+int
+NC3_def_dim(int ncid, const char *name, size_t size, int *dimidp)
+{
+	int status;
+	NC *ncp;
+	int dimid;
+	NC_dim *dimp;
+
+	status = NC_check_id(ncid, &ncp); 
+	if(status != NC_NOERR)
+		return status;
+
+	if(!NC_indef(ncp))
+		return NC_ENOTINDEFINE;
+
+	status = NC_check_name(name);
+	if(status != NC_NOERR)
+		return status;
+
+	if ((ncp->flags & NC_64BIT_OFFSET) && sizeof(off_t) > 4) {
+	    /* CDF2 format and LFS */
+	    if(size > X_UINT_MAX - 3) /* "- 3" handles rounded-up size */
+		return NC_EDIMSIZE;
+	} else {
+	    /* CDF1 format */
+	    if(size > X_INT_MAX - 3)
+		return NC_EDIMSIZE;
+	}
+
+	if(size == NC_UNLIMITED)
+	{
+		dimid = find_NC_Udim(&ncp->dims, &dimp);
+		if(dimid != -1)
+		{
+			assert(dimid != -1);
+			return NC_EUNLIMIT;
+		}
+	}
+
+	if(ncp->dims.nelems >= NC_MAX_DIMS)
+		return NC_EMAXDIMS;
+
+	dimid = NC_finddim(&ncp->dims, name, &dimp);
+	if(dimid != -1)
+		return NC_ENAMEINUSE;
+	
+	dimp = new_NC_dim(name, size);
+	if(dimp == NULL)
+		return NC_ENOMEM;
+	status = incr_NC_dimarray(&ncp->dims, dimp);
+	if(status != NC_NOERR)
+	{
+		free_NC_dim(dimp);
+		return status;
+	}
+
+	if(dimidp != NULL)
+		*dimidp = (int)ncp->dims.nelems -1;
+	return NC_NOERR;
+}
+
+
+int
+NC3_inq_dimid(int ncid, const char *name, int *dimid_ptr)
+{
+	int status;
+	NC *ncp;
+	int dimid;
+
+	status = NC_check_id(ncid, &ncp); 
+	if(status != NC_NOERR)
+		return status;
+
+	dimid = NC_finddim(&ncp->dims, name, NULL);
+
+	if(dimid == -1)
+		return NC_EBADDIM;
+
+	if (dimid_ptr)
+	   *dimid_ptr = dimid;
+	return NC_NOERR;
+}
+
+int
+NC3_inq_dim(int ncid, int dimid, char *name, size_t *sizep)
+{
+	int status;
+	NC *ncp;
+	NC_dim *dimp;
+
+	status = NC_check_id(ncid, &ncp); 
+	if(status != NC_NOERR)
+		return status;
+
+	dimp = elem_NC_dimarray(&ncp->dims, (size_t)dimid);
+	if(dimp == NULL)
+		return NC_EBADDIM;
+
+	if(name != NULL)
+	{
+		(void)strncpy(name, dimp->name->cp, 
+			dimp->name->nchars);
+		name[dimp->name->nchars] = 0;
+	}
+	if(sizep != NULL)
+	{
+		if(dimp->size == NC_UNLIMITED)
+			*sizep = NC_get_numrecs(ncp);
+		else
+			*sizep = dimp->size;	
+	}
+	return NC_NOERR;
+}
+
+int
+NC3_rename_dim( int ncid, int dimid, const char *unewname)
+{
+	int status;
+	NC *ncp;
+	int existid;
+	NC_dim *dimp;
+	char *newname;		/* normalized */
+
+	status = NC_check_id(ncid, &ncp); 
+	if(status != NC_NOERR)
+		return status;
+
+	if(NC_readonly(ncp))
+		return NC_EPERM;
+
+	status = NC_check_name(unewname);
+	if(status != NC_NOERR)
+		return status;
+
+	existid = NC_finddim(&ncp->dims, unewname, &dimp);
+	if(existid != -1)
+		return NC_ENAMEINUSE;
+
+	dimp = elem_NC_dimarray(&ncp->dims, (size_t)dimid);
+	if(dimp == NULL)
+		return NC_EBADDIM;
+
+	newname = (char *)utf8proc_NFC((const unsigned char *)unewname);
+	if(newname == NULL)
+	    return NC_ENOMEM;
+	if(NC_indef(ncp))
+	{
+		NC_string *old = dimp->name;
+		NC_string *newStr = new_NC_string(strlen(newname), newname);
+		free(newname);
+		if(newStr == NULL)
+			return NC_ENOMEM;
+		dimp->name = newStr;
+		dimp->hash = hash_fast(newStr->cp, strlen(newStr->cp));
+		free_NC_string(old);
+		return NC_NOERR;
+	}
+
+	/* else, not in define mode */
+
+	status = set_NC_string(dimp->name, newname);
+	dimp->hash = hash_fast(newname, strlen(newname));
+	free(newname);
+	if(status != NC_NOERR)
+		return status;
+
+	set_NC_hdirty(ncp);
+
+	if(NC_doHsync(ncp))
+	{
+		status = NC_sync(ncp);
+		if(status != NC_NOERR)
+			return status;
+	}
+
+	return NC_NOERR;
+}
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/src_netcdf4/dnclog.c
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/src_netcdf4/dnclog.c	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/src_netcdf4/dnclog.c	(revision 1749)
@@ -0,0 +1,166 @@
+/*********************************************************************
+ *   Copyright 2010, UCAR/Unidata
+ *   See netcdf/COPYRIGHT file for copying and redistribution conditions.
+ *   $Header$
+ *********************************************************************/
+
+#include "config.h"
+
+#include <stdlib.h>
+#include <stdio.h>
+#include <fcntl.h>
+#include <stdarg.h>
+#include <string.h>
+
+#include "nclog.h"
+
+#define PREFIXLEN 8
+#define MAXTAGS 256
+#define NCTAGDFALT "Log";
+
+static int ncinitlog = 0;
+static int nclogging = 0;
+static int ncsystemfile = 0;
+static char* nclogfile = NULL;
+static FILE* nclogstream = NULL;
+
+static int nctagsize = 0;
+static char** nctagset = NULL;
+static char* nctagdfalt = NULL;
+static char* nctagsetdfalt[] = {"Warning","Error","Note","Debug"};
+static char* nctagname(int tag);
+
+void
+ncloginit(void)
+{
+    ncinitlog = 1;
+    ncsetlogging(0);
+    nclogfile = NULL;
+    nclogstream = NULL;
+    /* Use environment variables to preset nclogging state*/
+    /* I hope this is portable*/
+    if(getenv(ENVFLAG) != NULL) {
+	const char* file = getenv(ENVFLAG);
+	ncsetlogging(1);
+	nclogopen(file);
+    }
+    nctagdfalt = NCTAGDFALT;
+    nctagset = nctagsetdfalt;
+}
+
+void
+ncsetlogging(int tf)
+{
+    if(!ncinitlog) ncloginit();
+    nclogging = tf;
+}
+
+void
+nclogopen(const char* file)
+{
+    if(!ncinitlog) ncloginit();
+    nclogclose();
+    if(file == NULL || strlen(file) == 0) {
+	/* use stderr*/
+	nclogstream = stderr;
+	nclogfile = NULL;
+	ncsystemfile = 1;
+    } else if(strcmp(file,"stdout") == 0) {
+	/* use stdout*/
+	nclogstream = stdout;
+	nclogfile = NULL;
+	ncsystemfile = 1;
+    } else if(strcmp(file,"stderr") == 0) {
+	/* use stderr*/
+	nclogstream = stderr;
+	nclogfile = NULL;
+	ncsystemfile = 1;
+    } else {
+	int fd;
+	nclogfile = strdup(file);
+	nclogstream = NULL;
+	/* We need to deal with this file carefully
+	   to avoid unauthorized access*/
+	fd = open(nclogfile,O_WRONLY|O_APPEND|O_CREAT,0600);
+	if(fd >= 0) {
+	    nclogstream = fdopen(fd,"a");
+	} else {
+	    free(nclogfile);
+	    nclogfile = NULL;
+	    nclogstream = NULL;
+	    ncsetlogging(0);
+	}
+	ncsystemfile = 0;
+    }
+}
+
+void
+nclogclose(void)
+{
+    if(nclogstream != NULL && !ncsystemfile) {
+	fclose(nclogstream);
+    }
+    if(nclogfile != NULL) free(nclogfile);
+    nclogstream = NULL;
+    nclogfile = NULL;
+    ncsystemfile = 0;
+}
+
+void
+nclog(int tag, const char* fmt, ...)
+{
+    va_list args;
+    char* prefix;
+    if(!nclogging || nclogstream == NULL) return;
+
+    prefix = nctagname(tag);
+    fprintf(nclogstream,"%s:",prefix);
+
+    if(fmt != NULL) {
+      va_start(args, fmt);
+      vfprintf(nclogstream, fmt, args);
+      va_end( args );
+    }
+    fprintf(nclogstream, "\n" );
+    fflush(nclogstream);
+}
+
+void
+nclogtext(int tag, const char* text)
+{
+    nclogtextn(tag,text,strlen(text));
+}
+
+void
+nclogtextn(int tag, const char* text, size_t count)
+{
+    if(!nclogging || nclogstream == NULL) return;
+    fwrite(text,1,count,nclogstream);
+    fflush(nclogstream);
+}
+
+/* The tagset is null terminated */
+void
+nclogsettags(char** tagset, char* dfalt)
+{
+    nctagdfalt = dfalt;
+    if(tagset == NULL) {
+	nctagsize = 0;
+    } else {
+        int i;
+	/* Find end of the tagset */
+	for(i=0;i<MAXTAGS;i++) {if(tagset[i]==NULL) break;}
+	nctagsize = i;
+    }
+    nctagset = tagset;
+}
+
+static char*
+nctagname(int tag)
+{
+    if(tag < 0 || tag >= nctagsize) {
+	return nctagdfalt;
+    } else {
+	return nctagset[tag];
+    }
+}
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/src_netcdf4/dopaque.c
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/src_netcdf4/dopaque.c	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/src_netcdf4/dopaque.c	(revision 1749)
@@ -0,0 +1,70 @@
+/*! \file
+  Functions for Opaque Types
+
+  Copyright 2011 University Corporation for Atmospheric
+  Research/Unidata. See \ref copyright file for more info. */
+
+#include "ncdispatch.h"
+
+/** \name Opaque Types
+    Functions to create and learn about opaque types. */
+/*! \{ */ /* All these functions are part of this named group... */
+
+/** \ingroup user_types
+Create an opaque type. Provide a size and a name.
+
+\param ncid \ref ncid
+\param size The size of each opaque object in bytes.
+\param name \ref object_name of the new type.
+\param xtypep Pointer where the new typeid for this type is returned.
+
+\returns ::NC_NOERR No error.
+\returns ::NC_EBADID Bad \ref ncid.
+\returns ::NC_EBADTYPE Bad type id.
+\returns ::NC_ENOTNC4 Not an netCDF-4 file, or classic model enabled.
+\returns ::NC_EHDFERR An error was reported by the HDF5 layer.
+\returns ::NC_ENAMEINUSE That name is in use.
+\returns ::NC_EMAXNAME Name exceeds max length NC_MAX_NAME.
+\returns ::NC_EBADNAME Name contains illegal characters.
+\returns ::NC_EPERM Attempt to write to a read-only file.
+\returns ::NC_ENOTINDEFINE Not in define mode. 
+ */
+int
+nc_def_opaque(int ncid, size_t size, const char *name, nc_type *xtypep)
+{
+    NC* ncp;
+    int stat = NC_check_id(ncid,&ncp);
+    if(stat != NC_NOERR) return stat;
+    return ncp->dispatch->def_opaque(ncid,size,name,xtypep);
+}
+
+/** \ingroup user_types
+Learn about an opaque type.
+
+\param ncid \ref ncid
+
+\param xtype Typeid to inquire about.
+
+\param name The \ref object_name of this type will be
+copied here. \ref ignored_if_null.
+
+\param sizep The size of the type will be copied here. \ref
+ignored_if_null.
+
+\returns ::NC_NOERR No error.
+\returns ::NC_EBADID Bad \ref ncid.
+\returns ::NC_EBADTYPE Bad type id.
+\returns ::NC_ENOTNC4 Not an netCDF-4 file, or classic model enabled.
+\returns ::NC_EHDFERR An error was reported by the HDF5 layer.
+ */
+int
+nc_inq_opaque(int ncid, nc_type xtype, char *name, size_t *sizep)
+{
+    int class = 0;
+    int stat = nc_inq_user_type(ncid,xtype,name,sizep,NULL,NULL,&class);
+    if(stat != NC_NOERR) return stat;
+    if(class != NC_OPAQUE) stat = NC_EBADTYPE;
+    return stat;
+}
+
+/*! \} */  /* End of named group ...*/
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/src_netcdf4/dparallel.c
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/src_netcdf4/dparallel.c	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/src_netcdf4/dparallel.c	(revision 1749)
@@ -0,0 +1,130 @@
+/** \file
+This file has the parallel I/O functions.
+
+Copyright 2010 University Corporation for Atmospheric
+Research/Unidata. See COPYRIGHT file for more info.
+*/
+
+#include <config.h>
+#include <netcdf_f.h>
+#include "ncdispatch.h"
+
+/* This function creates a file for use with parallel I/O. */
+int
+nc_create_par(const char *path, int cmode, MPI_Comm comm, 
+	      MPI_Info info, int *ncidp)
+{
+#ifndef USE_PARALLEL
+   return NC_ENOPAR;
+#else   
+   NC_MPI_INFO data;
+   MPI_Comm comm_c = 0;
+   MPI_Info info_c = 0;
+   
+   /* One of these two parallel IO modes must be chosen by the user,
+    * or else pnetcdf must be in use. */
+   if (!(cmode & NC_MPIIO || cmode & NC_MPIPOSIX) &&
+       !(cmode & NC_PNETCDF))
+      return NC_EINVAL;
+
+   comm_c = (MPI_Comm)comm;
+   info_c = (MPI_Info)info;
+
+   data.comm = comm_c;
+   data.info = info_c;
+   return NC_create(path, cmode, 0, 0, NULL, 1, &data, ncidp);
+#endif /* USE_PARALLEL */
+}
+
+/* This function opens a file for parallel I/O. */
+int
+nc_open_par(const char *path, int mode, MPI_Comm comm, 
+	    MPI_Info info, int *ncidp)
+{
+#ifndef USE_PARALLEL
+   return NC_ENOPAR;
+#else
+   NC_MPI_INFO mpi_data;
+
+   /* One of these two parallel IO modes must be chosen by the user,
+    * or else pnetcdf must be in use. */
+   if (!(mode & NC_MPIIO || mode & NC_MPIPOSIX) &&
+       !(mode & NC_PNETCDF))
+      return NC_EINVAL;
+
+   mpi_data.comm = comm;
+   mpi_data.info = info;
+
+   return NC_open(path, mode, 0, NULL, 1, &mpi_data, ncidp);
+#endif /* USE_PARALLEL */
+}
+
+/* Fortran needs to pass MPI comm/info as integers. */
+int
+nc_open_par_fortran(const char *path, int mode, int comm, 
+		    int info, int *ncidp)
+{
+#ifndef USE_PARALLEL
+   return NC_ENOPAR;
+#else
+
+   MPI_Comm comm_c = 0;
+   MPI_Info info_c = 0;
+
+   /* Convert fortran comm and info to C comm and info, if there is a
+    * function to do so. Otherwise just pass them. */
+#ifdef HAVE_MPI_COMM_F2C
+   comm_c = MPI_Comm_f2c(comm);
+   info_c = MPI_Info_f2c(info);
+#else
+   comm_c = (MPI_Comm)comm;
+   info_c = (MPI_Info)info;
+#endif
+
+   return nc_open_par(path, mode, comm_c, info_c, ncidp);
+#endif
+}
+
+/* This function will change the parallel access of a variable from
+ * independent to collective. */
+int
+nc_var_par_access(int ncid, int varid, int par_access)
+{
+    NC* ncp;
+    int stat = NC_NOERR;
+
+    if ((stat = NC_check_id(ncid, &ncp)))
+       return stat;
+
+#ifndef USE_PARALLEL
+    return NC_ENOPAR;
+#else
+    return ncp->dispatch->var_par_access(ncid,varid,par_access);
+#endif
+}
+
+/* when calling from fortran: convert MPI_Comm and MPI_Info to C */
+int
+nc_create_par_fortran(const char *path, int cmode, int comm, 
+		      int info, int *ncidp)
+{
+#ifndef USE_PARALLEL
+   return NC_ENOPAR;
+#else
+   MPI_Comm comm_c = 0;
+   MPI_Info info_c = 0;
+#ifdef USE_PARALLEL
+#ifdef HAVE_MPI_COMM_F2C
+   comm_c = MPI_Comm_f2c(comm);
+   info_c = MPI_Info_f2c(info);
+#else
+   comm_c = (MPI_Comm)comm;
+   info_c = (MPI_Info)info;
+#endif
+#endif
+   return nc_create_par(path, cmode, comm_c, info_c, ncidp);
+#endif
+}
+
+
+
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/src_netcdf4/dstring.c
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/src_netcdf4/dstring.c	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/src_netcdf4/dstring.c	(revision 1749)
@@ -0,0 +1,302 @@
+/*
+ *	Copyright 1996, University Corporation for Atmospheric Research
+ *      See netcdf/COPYRIGHT file for copying and redistribution conditions.
+ */
+/* $Id: string.c,v 1.76 2010/05/26 21:43:33 dmh Exp $ */
+
+#include "config.h"
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <ctype.h>
+#include <assert.h>
+#include "nc.h"
+#include "rnd.h"
+#include "utf8proc.h"
+
+
+/* There are 3 levels of UTF8 checking: 1=> (exact)validating 2=>relaxed
+   and 3=>very relaxed
+*/
+/* Use semi-relaxed check */
+#define UTF8_CHECK 2
+
+/*
+ * Free string, and, if needed, its values.
+ * Formerly
+NC_free_string()
+ */
+void
+free_NC_string(NC_string *ncstrp)
+{
+	if(ncstrp==NULL)
+		return;
+	free(ncstrp);
+}
+
+
+int 
+nextUTF8(const char* cp)
+{
+    /*  The goal here is to recognize the length of each
+	multibyte utf8 character sequence and skip it.
+        Again, we assume that every non-ascii character is legal.
+        We can define three possible tests of decreasing correctness
+        (in the sense that the least correct will allow some sequences that
+        are technically illegal UTF8).
+        As Regular expressions they are as follows:
+        1. most correct:
+            UTF8   ([\xC2-\xDF][\x80-\xBF])                       \
+                 | (\xE0[\xA0-\xBF][\x80-\xBF])                   \
+                 | ([\xE1-\xEC][\x80-\xBF][\x80-\xBF])            \
+                 | (\xED[\x80-\x9F][\x80-\xBF])                   \
+                 | ([\xEE-\xEF][\x80-\xBF][\x80-\xBF])            \
+                 | (\xF0[\x90-\xBF][\x80-\xBF][\x80-\xBF])        \
+                 | ([\xF1-\xF3][\x80-\xBF][\x80-\xBF][\x80-\xBF]) \
+                 | (\xF4[\x80-\x8F][\x80-\xBF][\x80-\xBF])        \
+        
+        2. partially relaxed:
+            UTF8 ([\xC0-\xDF][\x80-\xBF])
+                 |([\xE0-\xEF][\x80-\xBF][\x80-\xBF])
+                 |([\xF0-\xF7][\x80-\xBF][\x80-\xBF][\x80-\xBF])
+        
+        3. The most relaxed version of UTF8:
+            UTF8 ([\xC0-\xD6].)|([\xE0-\xEF]..)|([\xF0-\xF7]...)
+        
+        We use #2 here.
+
+	The tests are derived from the table at
+	    http://www.w3.org/2005/03/23-lex-U
+    */
+
+/* Define a test macro to test against a range */
+#define RANGE(c,lo,hi) (((uchar)c) >= lo && ((uchar)c) <= hi)
+/* Define a common RANGE */
+#define RANGE0(c) RANGE(c,0x80,0xBF) 
+
+    int ch0;
+
+    int skip = -1; /* assume failed */
+
+    ch0 = (uchar)*cp;
+    if(ch0 <= 0x7f) skip = 1; /* remove ascii case */
+    else
+
+#if UTF8_CHECK == 2
+    /* Do relaxed validation check */
+    if(RANGE(ch0,0xC0,0XDF)) {/* 2-bytes, but check */
+        if(cp[1] != 0 && RANGE0(cp[1]))
+		skip = 2; /* two bytes */
+    } else if(RANGE(ch0,0xE0,0XEF)) {/* 3-bytes, but check */
+        if(cp[1] != 0 && RANGE0(cp[1]) && cp[2] != 0 && RANGE0(cp[1]))
+		skip = 3; /* three bytes */
+    } else if(RANGE(ch0,0xF0,0XF7)) {/* 3-bytes, but check */
+        if(cp[1] != 0 && RANGE0(cp[1]) && cp[2] != 0
+           && RANGE0(cp[1]) && cp[3] != 0 && RANGE0(cp[1]))
+		skip = 4; /* four bytes*/
+    }
+#elif UTF8_CHECK == 1
+    /* Do exact validation check */
+    if(RANGE(ch0,0xC2,0xDF)) {/* non-overlong 2-bytes */
+	int ch1 = (uchar)cp[1];
+	if(ch1 != 0 && RANGE0(ch1)) skip = 2;
+    } else if((ch0 == 0xE0)) {/* 3-bytes, not overlong */
+	int ch1 = (uchar)cp[1];
+	if(ch1 != 0 && RANGE(ch1,0xA0,0xBF)) {
+	    int ch2 = (uchar)cp[2];
+	    if(ch2 != 0 && RANGE0(ch2)) skip = 3;
+    } else if((ch0 == 0xED)) {/* 3-bytes minus surrogates */
+	int ch1 = (uchar)cp[1];
+	if(ch1 != 0 && RANGE(ch1,0x80,0x9f)) {
+	    int ch2 = (uchar)cp[2];
+	    if(ch2 != 0 && RANGE0(ch2)) skip = 3;
+    } else if(RANGE(ch0,0xE1,0xEC) || ch0 == 0xEE || ch0 == 0xEF)
+	int ch1 = (uchar)cp[1];
+	if(ch1 != 0 && RANGE0(ch1)) {
+	    int ch2 = (uchar)cp[2];
+	    if(ch2 != 0 && RANGE0(ch2)) skip = 3;
+	}
+    } else if((ch0 == 0xF0)) {/* planes 1-3 */
+	int ch1 = (uchar)cp[1];
+	if(ch1 != 0 && RANGE(ch1,0x90,0xBF) {
+	    int ch2 = (uchar)cp[2];
+	    if(ch2 != 0 && RANGE0(ch2)) {
+	        int ch3 = (uchar)cp[3];
+	        if(ch3 != 0 && RANGE0(ch3)) skip = 4;
+	    }
+	}    
+    } else if((ch0 == 0xF4)) {/* plane 16 */
+	int ch1 = (uchar)cp[1];
+	if(ch1 != 0 && RANGE0(ch1)) {
+	    int ch2 = (uchar)cp[2];
+	    if(ch2 != 0 && RANGE0(ch2)) {
+	        int ch3 = (uchar)cp[3];
+	        if(ch3 != 0 && RANGE0(ch3)) skip = 4;
+	    }
+	}    
+    } else if(RANGE(ch0,0xF1,0xF3) { /* planes 4-15 */
+	int ch1 = (uchar)cp[1];
+	if(ch1 != 0 && RANGE0(ch1)) {
+	    int ch2 = (uchar)cp[2];
+	    if(ch2 != 0 && RANGE0(ch2)) {
+	        int ch3 = (uchar)cp[3];
+	        if(ch3 != 0 && RANGE0(ch3)) skip = 4;
+	    }
+	}
+    }
+#else
+#error "Must Define UTF8_CHECK as 1 or 2"
+#endif
+    return skip;
+}
+
+
+/*
+ * Verify that a name string is valid syntax.  The allowed name
+ * syntax (in RE form) is:
+ *
+ * ([a-zA-Z0-9_]|{UTF8})([^\x00-\x1F\x7F/]|{UTF8})*
+ *
+ * where UTF8 represents a multibyte UTF-8 encoding.  Also, no
+ * trailing spaces are permitted in names.  This definition
+ * must be consistent with the one in ncgen.l.  We do not allow '/'
+ * because HDF5 does not permit slashes in names as slash is used as a
+ * group separator.  If UTF-8 is supported, then a multi-byte UTF-8
+ * character can occur anywhere within an identifier.  We later
+ * normalize UTF-8 strings to NFC to facilitate matching and queries.
+ */
+int
+NC_check_name(const char *name)
+{
+	int skip;
+	int ch;
+	const char *cp = name;
+	ssize_t utf8_stat;
+
+	assert(name != NULL);
+
+	if(*name == 0		/* empty names disallowed */
+	   || strchr(cp, '/'))	/* '/' can't be in a name */
+		goto fail;
+	
+	/* check validity of any UTF-8 */
+	utf8_stat = utf8proc_check((const unsigned char *)name);
+	if (utf8_stat < 0)
+	    goto fail;
+
+	/* First char must be [a-z][A-Z][0-9]_ | UTF8 */
+	ch = (uchar)*cp;
+	if(ch <= 0x7f) { 
+	    if(   !('A' <= ch && ch <= 'Z') 
+	       && !('a' <= ch && ch <= 'z') 
+	       && !('0' <= ch && ch <= '9')
+	       && ch != '_' )
+		goto fail;
+	    cp++;
+	} else {
+	    if((skip = nextUTF8(cp)) < 0) 
+		goto fail;
+	    cp += skip;
+	}
+
+	while(*cp != 0) {
+	    ch = (uchar)*cp;
+	    /* handle simple 0x00-0x7f characters here */
+	    if(ch <= 0x7f) { 
+                if( ch < ' ' || ch > 0x7E) /* control char or DEL */
+		  goto fail;
+		cp++;
+	    } else {
+		if((skip = nextUTF8(cp)) < 0) goto fail;
+		cp += skip;
+	    }
+	    if(cp - name > NC_MAX_NAME)
+		return NC_EMAXNAME;
+	}
+	if(ch <= 0x7f && isspace(ch)) /* trailing spaces disallowed */
+	    goto fail;
+	return NC_NOERR;
+fail:
+        return NC_EBADNAME;
+}
+
+
+/*
+ * Allocate a NC_string structure large enough
+ * to hold slen characters.
+ * Formerly
+NC_new_string(count, str)
+ */
+NC_string *
+new_NC_string(size_t slen, const char *str)
+{
+	NC_string *ncstrp;
+	size_t sz = M_RNDUP(sizeof(NC_string)) + slen + 1;
+
+#if 0
+	sz = _RNDUP(sz, X_ALIGN);
+#endif
+		
+	ncstrp = (NC_string *)malloc(sz);
+	if( ncstrp == NULL )
+		return NULL;
+	(void) memset(ncstrp, 0, sz);
+
+	ncstrp->nchars = sz - M_RNDUP(sizeof(NC_string)) - 1;
+	assert(ncstrp->nchars + 1 > slen);
+	ncstrp->cp = (char *)ncstrp + M_RNDUP(sizeof(NC_string));
+
+	if(str != NULL && *str != 0)
+	{
+		(void) strncpy(ncstrp->cp, str, ncstrp->nchars +1);
+		ncstrp->cp[ncstrp->nchars] = 0;
+	}
+	
+	return(ncstrp);
+}
+
+
+/*
+ * If possible, change the value of an NC_string to 'str'.
+ *
+ * Formerly
+NC_re_string()
+ */
+int
+set_NC_string(NC_string *ncstrp, const char *str)
+{
+	size_t slen;
+
+	assert(str != NULL && *str != 0);
+
+	slen = strlen(str);
+
+	if(ncstrp->nchars < slen)
+		return NC_ENOTINDEFINE;
+
+	strncpy(ncstrp->cp, str, ncstrp->nchars);
+	/* Don't adjust ncstrp->nchars, it includes extra space in the
+	 * header for potential later expansion of string. */
+
+	return NC_NOERR;
+}
+
+/**************************************************/
+/* Provide local alternatives for unix functions
+   not available on all machines. Place here so that
+   all subsequence code modules can use it.
+*/
+
+#ifndef HAVE_STRDUP
+char*
+strdup(const char* s)
+{
+    char* dup;
+    if(s == NULL) return NULL;
+    dup = malloc(strlen(s)+1);
+    strcpy(dup,s);
+    return dup;
+}
+#endif
+
+/**************************************************/
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/src_netcdf4/dsubstrate.c
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/src_netcdf4/dsubstrate.c	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/src_netcdf4/dsubstrate.c	(revision 1749)
@@ -0,0 +1,915 @@
+/** \substrate
+Define the substrate dispatch table and functions
+
+These functions end up calling functions in one of the dispatch layers
+(netCDF-4, dap server, etc) using the substrate field of struct NC.
+
+Copyright 2010 University Corporation for Atmospheric
+Research/Unidata. See COPYRIGHT file for more info.  
+*/
+
+#include "netcdf.h"
+#include "ncdispatch.h"
+
+/* forward */
+static NC_Dispatch NCSUBSTRATE_dispatch_base;
+
+/*
+Note that because many of the signatures differ
+from the netcdf API, we need to break
+the abstraction and invoke the
+substrate dispatch table directly.
+*/
+
+
+int
+NCSUBSTRATE_initialize(void)
+{
+    NCSUBSTRATE_dispatch_table = &NCSUBSTRATE_dispatch_base;
+    return NC_NOERR;
+}
+
+static int
+NCSUB_new_nc(NC** ncp)
+{
+    NC* nc;
+    /* Allocate memory for this info. */
+    if (!(nc = calloc(1, sizeof(struct NC)))) 
+       return NC_ENOMEM;
+    if(ncp) *ncp = nc;
+    return NC_NOERR;
+}
+
+static int
+NCSUB_redef(int ncid)
+{
+    NC *nc, *ncsub;
+    int ncstat = NC_check_id(ncid, &nc);
+    if(ncstat != NC_NOERR) return ncstat;
+    ncstat = NC_check_id(nc->substrate,&ncsub);
+    if(ncstat != NC_NOERR) return ncstat;
+    return ncsub->dispatch->redef(nc->substrate);
+}
+
+static int
+NCSUB__enddef(int ncid, size_t a1, size_t a2, size_t a3, size_t a4)
+{
+    NC *nc, *ncsub;
+    int ncstat = NC_check_id(ncid, &nc);
+    if(ncstat != NC_NOERR) return ncstat;
+    ncstat = NC_check_id(nc->substrate, &ncsub);
+    if(ncstat != NC_NOERR) return ncstat;
+    return ncsub->dispatch->_enddef(nc->substrate,a1,a2,a3,a4);
+}
+
+static int
+NCSUB_sync(int ncid)
+{
+    NC *nc, *ncsub;
+    int ncstat = NC_check_id(ncid, &nc);
+    if(ncstat != NC_NOERR) return ncstat;
+    ncstat = NC_check_id(nc->substrate, &ncsub);
+    if(ncstat != NC_NOERR) return ncstat;
+    return ncsub->dispatch->sync(nc->substrate);
+}
+
+static int
+NCSUB_abort(int ncid)
+{
+    NC *nc, *ncsub;
+    int ncstat = NC_check_id(ncid, &nc);
+    if(ncstat != NC_NOERR) return ncstat;
+    ncstat = NC_check_id(nc->substrate, &ncsub);
+    if(ncstat != NC_NOERR) return ncstat;
+    return ncsub->dispatch->abort(nc->substrate);
+}
+
+static int
+NCSUB_close(int ncid)
+{
+    NC *nc, *ncsub;
+    int ncstat = NC_check_id(ncid, &nc);
+    if(ncstat != NC_NOERR) return ncstat;
+    ncstat = NC_check_id(nc->substrate, &ncsub);
+    if(ncstat != NC_NOERR) return ncstat;
+    return ncsub->dispatch->close(nc->substrate);
+}
+
+static int
+NCSUB_set_fill(int ncid, int a1, int* a2)
+{
+    NC *nc, *ncsub;
+    int ncstat = NC_check_id(ncid, &nc);
+    if(ncstat != NC_NOERR) return ncstat;
+    ncstat = NC_check_id(nc->substrate, &ncsub);
+    if(ncstat != NC_NOERR) return ncstat;
+    return ncsub->dispatch->set_fill(nc->substrate,a1,a2);
+}
+
+static int
+NCSUB_inq_base_pe(int ncid, int* a1)
+{
+    NC *nc, *ncsub;
+    int ncstat = NC_check_id(ncid, &nc);
+    if(ncstat != NC_NOERR) return ncstat;
+    ncstat = NC_check_id(nc->substrate, &ncsub);
+    if(ncstat != NC_NOERR) return ncstat;
+    return ncsub->dispatch->inq_base_pe(nc->substrate,a1);
+}
+
+static int
+NCSUB_set_base_pe(int ncid, int a1)
+{
+    NC *nc, *ncsub;
+    int ncstat = NC_check_id(ncid, &nc);
+    if(ncstat != NC_NOERR) return ncstat;
+    ncstat = NC_check_id(nc->substrate, &ncsub);
+    if(ncstat != NC_NOERR) return ncstat;
+    return ncsub->dispatch->set_base_pe(nc->substrate,a1);
+}
+
+static int
+NCSUB_inq_format(int ncid, int* a1)
+{
+    NC *nc, *ncsub;
+    int ncstat = NC_check_id(ncid, &nc);
+    if(ncstat != NC_NOERR) return ncstat;
+    ncstat = NC_check_id(nc->substrate, &ncsub);
+    if(ncstat != NC_NOERR) return ncstat;
+    return ncsub->dispatch->inq_format(nc->substrate,a1);
+}
+
+static int
+NCSUB_inq(int ncid, int* a1, int* a2, int* a3, int* a4)
+{
+    NC *nc, *ncsub;
+    int ncstat = NC_check_id(ncid, &nc);
+    if(ncstat != NC_NOERR) return ncstat;
+    ncstat = NC_check_id(nc->substrate, &ncsub);
+    if(ncstat != NC_NOERR) return ncstat;
+    return ncsub->dispatch->inq(nc->substrate,a1,a2,a3,a4);
+}
+
+static int
+NCSUB_inq_type(int ncid, nc_type a1, char* a2, size_t* a3)
+{
+    NC *nc, *ncsub;
+    int ncstat = NC_check_id(ncid, &nc);
+    if(ncstat != NC_NOERR) return ncstat;
+    ncstat = NC_check_id(nc->substrate, &ncsub);
+    if(ncstat != NC_NOERR) return ncstat;
+    return ncsub->dispatch->inq_type(nc->substrate,a1,a2,a3);
+}
+
+static int
+NCSUB_def_dim(int ncid, const char* a1, size_t a2, int* a3)
+{
+    NC *nc, *ncsub;
+    int ncstat = NC_check_id(ncid, &nc);
+    if(ncstat != NC_NOERR) return ncstat;
+    ncstat = NC_check_id(nc->substrate, &ncsub);
+    if(ncstat != NC_NOERR) return ncstat;
+    return ncsub->dispatch->def_dim(nc->substrate,a1,a2,a3);
+}
+
+static int
+NCSUB_inq_dimid(int ncid, const char* a1, int* a2)
+{
+    NC *nc, *ncsub;
+    int ncstat = NC_check_id(ncid, &nc);
+    if(ncstat != NC_NOERR) return ncstat;
+    ncstat = NC_check_id(nc->substrate, &ncsub);
+    if(ncstat != NC_NOERR) return ncstat;
+    return ncsub->dispatch->inq_dimid(nc->substrate,a1,a2);
+}
+
+static int
+NCSUB_inq_dim(int ncid, int a1, char* a2, size_t* a3)
+{
+    NC *nc, *ncsub;
+    int ncstat = NC_check_id(ncid, &nc);
+    if(ncstat != NC_NOERR) return ncstat;
+    ncstat = NC_check_id(nc->substrate, &ncsub);
+    if(ncstat != NC_NOERR) return ncstat;
+    return ncsub->dispatch->inq_dim(nc->substrate,a1,a2,a3);
+}
+
+static int
+NCSUB_inq_unlimdim(int ncid,  int* a1)
+{
+    NC *nc, *ncsub;
+    int ncstat = NC_check_id(ncid, &nc);
+    if(ncstat != NC_NOERR) return ncstat;
+    ncstat = NC_check_id(nc->substrate, &ncsub);
+    if(ncstat != NC_NOERR) return ncstat;
+    return ncsub->dispatch->inq_unlimdim(nc->substrate,a1);
+}
+
+static int
+NCSUB_rename_dim(int ncid, int a1, const char* a2)
+{
+    NC *nc, *ncsub;
+    int ncstat = NC_check_id(ncid, &nc);
+    if(ncstat != NC_NOERR) return ncstat;
+    ncstat = NC_check_id(nc->substrate, &ncsub);
+    if(ncstat != NC_NOERR) return ncstat;
+    return ncsub->dispatch->rename_dim(nc->substrate,a1,a2);
+}
+
+static int
+NCSUB_inq_att(int ncid, int a1, const char* a2, nc_type* a3, size_t* a4)
+{
+    NC *nc, *ncsub;
+    int ncstat = NC_check_id(ncid, &nc);
+    if(ncstat != NC_NOERR) return ncstat;
+    ncstat = NC_check_id(nc->substrate, &ncsub);
+    if(ncstat != NC_NOERR) return ncstat;
+    return ncsub->dispatch->inq_att(nc->substrate,a1,a2,a3,a4);
+}
+
+static int
+NCSUB_inq_attid(int ncid, int a1, const char* a2, int* a3)
+{
+    NC *nc, *ncsub;
+    int ncstat = NC_check_id(ncid, &nc);
+    if(ncstat != NC_NOERR) return ncstat;
+    ncstat = NC_check_id(nc->substrate, &ncsub);
+    if(ncstat != NC_NOERR) return ncstat;
+    return ncsub->dispatch->inq_attid(nc->substrate,a1,a2,a3);
+}
+
+static int
+NCSUB_inq_attname(int ncid, int a1, int a2, char* a3)
+{
+    NC *nc, *ncsub;
+    int ncstat = NC_check_id(ncid, &nc);
+    if(ncstat != NC_NOERR) return ncstat;
+    ncstat = NC_check_id(nc->substrate, &ncsub);
+    if(ncstat != NC_NOERR) return ncstat;
+    return ncsub->dispatch->inq_attname(nc->substrate,a1,a2,a3);
+}
+
+static int
+NCSUB_rename_att(int ncid, int a1, const char* a2, const char* a3)
+{
+    NC *nc, *ncsub;
+    int ncstat = NC_check_id(ncid, &nc);
+    if(ncstat != NC_NOERR) return ncstat;
+    ncstat = NC_check_id(nc->substrate, &ncsub);
+    if(ncstat != NC_NOERR) return ncstat;
+    return ncsub->dispatch->rename_att(nc->substrate,a1,a2,a3);
+}
+
+static int
+NCSUB_del_att(int ncid, int a1, const char* a2)
+{
+    NC *nc, *ncsub;
+    int ncstat = NC_check_id(ncid, &nc);
+    if(ncstat != NC_NOERR) return ncstat;
+    ncstat = NC_check_id(nc->substrate, &ncsub);
+    if(ncstat != NC_NOERR) return ncstat;
+    return ncsub->dispatch->del_att(nc->substrate,a1,a2);
+}
+
+static int
+NCSUB_get_att(int ncid, int a1, const char* a2, void* a3, nc_type a4)
+{
+    NC *nc, *ncsub;
+    int ncstat = NC_check_id(ncid, &nc);
+    if(ncstat != NC_NOERR) return ncstat;
+    ncstat = NC_check_id(nc->substrate, &ncsub);
+    if(ncstat != NC_NOERR) return ncstat;
+    return ncsub->dispatch->get_att(nc->substrate,a1,a2,a3,a4);
+}
+
+static int
+NCSUB_put_att(int ncid, int a1, const char* a2, nc_type a3, size_t a4, const void* a5, nc_type a6)
+{
+    NC *nc, *ncsub;
+    int ncstat = NC_check_id(ncid, &nc);
+    if(ncstat != NC_NOERR) return ncstat;
+    ncstat = NC_check_id(nc->substrate, &ncsub);
+    if(ncstat != NC_NOERR) return ncstat;
+    return ncsub->dispatch->put_att(nc->substrate,a1,a2,a3,a4,a5,a6);
+}
+
+static int
+NCSUB_def_var(int ncid, const char* a1, nc_type a2, int a3, const int* a4, int* a5)
+{
+    NC *nc, *ncsub;
+    int ncstat = NC_check_id(ncid, &nc);
+    if(ncstat != NC_NOERR) return ncstat;
+    ncstat = NC_check_id(nc->substrate, &ncsub);
+    if(ncstat != NC_NOERR) return ncstat;
+    return ncsub->dispatch->def_var(nc->substrate,a1,a2,a3,a4,a5);
+}
+
+static int
+NCSUB_inq_varid(int ncid, const char* a1, int* a2)
+{
+    NC *nc, *ncsub;
+    int ncstat = NC_check_id(ncid, &nc);
+    if(ncstat != NC_NOERR) return ncstat;
+    ncstat = NC_check_id(nc->substrate, &ncsub);
+    if(ncstat != NC_NOERR) return ncstat;
+    return ncsub->dispatch->inq_varid(nc->substrate,a1,a2);
+}
+
+static int
+NCSUB_rename_var(int ncid, int a1, const char* a2)
+{
+    NC *nc, *ncsub;
+    int ncstat = NC_check_id(ncid, &nc);
+    if(ncstat != NC_NOERR) return ncstat;
+    ncstat = NC_check_id(nc->substrate, &ncsub);
+    if(ncstat != NC_NOERR) return ncstat;
+    return ncsub->dispatch->rename_var(nc->substrate,a1,a2);
+}
+
+static int
+NCSUB_get_vara(int ncid, int a1, const size_t* a2, const size_t* a3, void* a4, nc_type a5)
+{
+    NC *nc, *ncsub;
+    int ncstat = NC_check_id(ncid, &nc);
+    if(ncstat != NC_NOERR) return ncstat;
+    ncstat = NC_check_id(nc->substrate, &ncsub);
+    if(ncstat != NC_NOERR) return ncstat;
+    return ncsub->dispatch->get_vara(nc->substrate,a1,a2,a3,a4,a5);
+}
+
+static int
+NCSUB_put_vara(int ncid, int a1, const size_t* a2, const size_t* a3, const void* a4, nc_type a5)
+{
+    NC *nc, *ncsub;
+    int ncstat = NC_check_id(ncid, &nc);
+    if(ncstat != NC_NOERR) return ncstat;
+    ncstat = NC_check_id(nc->substrate, &ncsub);
+    if(ncstat != NC_NOERR) return ncstat;
+    return ncsub->dispatch->put_vara(nc->substrate,a1,a2,a3,a4,a5);
+}
+
+/* Added to solve Ferret performance problem with Opendap */
+static int
+NCSUB_get_vars(int ncid, int a1, const size_t* a2, const size_t* a3, const ptrdiff_t* a4, void* a5, nc_type a6)
+{
+    NC *nc, *ncsub;
+    int ncstat = NC_check_id(ncid, &nc);
+    if(ncstat != NC_NOERR) return ncstat;
+    ncstat = NC_check_id(nc->substrate, &ncsub);
+    if(ncstat != NC_NOERR) return ncstat;
+    return ncsub->dispatch->get_vars(nc->substrate,a1,a2,a3,a4,a5,a6);
+}
+
+static int
+NCSUB_put_vars(int ncid, int a1, const size_t* a2, const size_t* a3, const ptrdiff_t* a4, const void* a5, nc_type a6)
+{
+    NC *nc, *ncsub;
+    int ncstat = NC_check_id(ncid, &nc);
+    if(ncstat != NC_NOERR) return ncstat;
+    ncstat = NC_check_id(nc->substrate, &ncsub);
+    if(ncstat != NC_NOERR) return ncstat;
+    return ncsub->dispatch->put_vars(nc->substrate,a1,a2,a3,a4,a5,a6);
+}
+
+static int
+NCSUB_get_varm(int ncid, int a1, const size_t* a2, const size_t* a3, const ptrdiff_t* a4, const ptrdiff_t* a5, void* a6, nc_type a7)
+{
+    NC *nc, *ncsub;
+    int ncstat = NC_check_id(ncid, &nc);
+    if(ncstat != NC_NOERR) return ncstat;
+    ncstat = NC_check_id(nc->substrate, &ncsub);
+    if(ncstat != NC_NOERR) return ncstat;
+    return ncsub->dispatch->get_varm(nc->substrate,a1,a2,a3,a4,a5,a6,a7);
+}
+
+static int
+NCSUB_put_varm(int ncid, int a1, const size_t* a2, const size_t* a3, const ptrdiff_t* a4, const ptrdiff_t* a5, const void* a6, nc_type a7)
+{
+    NC *nc, *ncsub;
+    int ncstat = NC_check_id(ncid, &nc);
+    if(ncstat != NC_NOERR) return ncstat;
+    ncstat = NC_check_id(nc->substrate, &ncsub);
+    if(ncstat != NC_NOERR) return ncstat;
+    return ncsub->dispatch->put_varm(nc->substrate,a1,a2,a3,a4,a5,a6,a7);
+}
+
+
+static int
+NCSUB_inq_var_all(int ncid, int varid, char* name, nc_type* xtypep, 
+               int* ndimsp, int* dimidsp, int* nattsp, 
+               int* shufflep, int* deflatep, int* deflate_levelp, 
+               int* fletcher32p, int* contiguousp, size_t* chunksizesp, 
+               int* no_fill, void* fill_valuep, int* endiannessp, 
+	       int* options_maskp, int* pixels_per_blockp)
+{
+   NC *nc, *ncsub;
+   int ncstat = NC_check_id(ncid, &nc);
+   if(ncstat != NC_NOERR) return ncstat;
+    ncstat = NC_check_id(nc->substrate, &ncsub);
+   if(ncstat != NC_NOERR) return ncstat;
+   return ncsub->dispatch->inq_var_all(nc->substrate,varid,name,xtypep,
+                                     ndimsp,dimidsp,nattsp,shufflep,
+                                     deflatep,deflate_levelp,fletcher32p,
+                                     contiguousp,chunksizesp,
+                                     no_fill,fill_valuep,
+                                     endiannessp,
+                                     options_maskp,pixels_per_blockp);
+}
+
+#ifdef USE_NETCDF4
+
+static int
+NCSUB_show_metadata(int ncid)
+{
+    NC *nc, *ncsub;
+    int ncstat = NC_check_id(ncid, &nc);
+    if(ncstat != NC_NOERR) return ncstat;
+    ncstat = NC_check_id(nc->substrate, &ncsub);
+    if(ncstat != NC_NOERR) return ncstat;
+    return ncsub->dispatch->show_metadata(nc->substrate);
+}
+
+static int
+NCSUB_inq_unlimdims(int ncid, int* a1, int* a2)
+{
+    NC *nc, *ncsub;
+    int ncstat = NC_check_id(ncid, &nc);
+    if(ncstat != NC_NOERR) return ncstat;
+    ncstat = NC_check_id(nc->substrate, &ncsub);
+    if(ncstat != NC_NOERR) return ncstat;
+    return ncsub->dispatch->inq_unlimdims(nc->substrate,a1,a2);
+}
+
+static int
+NCSUB_var_par_access(int ncid, int a1, int a2)
+{
+    NC *nc, *ncsub;
+    int ncstat = NC_check_id(ncid, &nc);
+    if(ncstat != NC_NOERR) return ncstat;
+    ncstat = NC_check_id(nc->substrate, &ncsub);
+    if(ncstat != NC_NOERR) return ncstat;
+    return ncsub->dispatch->var_par_access(nc->substrate,a1,a2);
+}
+
+static int
+NCSUB_inq_ncid(int ncid, const char* a1, int* a2)
+{
+    NC *nc, *ncsub;
+    int ncstat = NC_check_id(ncid, &nc);
+    if(ncstat != NC_NOERR) return ncstat;
+    ncstat = NC_check_id(nc->substrate, &ncsub);
+    if(ncstat != NC_NOERR) return ncstat;
+    return ncsub->dispatch->inq_ncid(nc->substrate,a1,a2);
+}
+
+static int
+NCSUB_inq_grps(int ncid, int* a1, int* a2)
+{
+    NC *nc, *ncsub;
+    int ncstat = NC_check_id(ncid, &nc);
+    if(ncstat != NC_NOERR) return ncstat;
+    ncstat = NC_check_id(nc->substrate, &ncsub);
+    if(ncstat != NC_NOERR) return ncstat;
+    return ncsub->dispatch->inq_grps(nc->substrate,a1,a2);
+}
+
+static int
+NCSUB_inq_grpname(int ncid, char* a1)
+{
+    NC *nc, *ncsub;
+    int ncstat = NC_check_id(ncid, &nc);
+    if(ncstat != NC_NOERR) return ncstat;
+    ncstat = NC_check_id(nc->substrate, &ncsub);
+    if(ncstat != NC_NOERR) return ncstat;
+    return ncsub->dispatch->inq_grpname(nc->substrate,a1);
+}
+
+static int
+NCSUB_inq_grpname_full(int ncid, size_t* a1, char* a2)
+{
+    NC *nc, *ncsub;
+    int ncstat = NC_check_id(ncid, &nc);
+    if(ncstat != NC_NOERR) return ncstat;
+    ncstat = NC_check_id(nc->substrate, &ncsub);
+    if(ncstat != NC_NOERR) return ncstat;
+    return ncsub->dispatch->inq_grpname_full(nc->substrate,a1,a2);
+}
+
+static int
+NCSUB_inq_grp_parent(int ncid, int* a1)
+{
+    NC *nc, *ncsub;
+    int ncstat = NC_check_id(ncid, &nc);
+    if(ncstat != NC_NOERR) return ncstat;
+    ncstat = NC_check_id(nc->substrate, &ncsub);
+    if(ncstat != NC_NOERR) return ncstat;
+    return ncsub->dispatch->inq_grp_parent(nc->substrate,a1);
+}
+
+static int
+NCSUB_inq_grp_full_ncid(int ncid, const char* a1, int* a2)
+{
+    NC *nc, *ncsub;
+    int ncstat = NC_check_id(ncid, &nc);
+    if(ncstat != NC_NOERR) return ncstat;
+    ncstat = NC_check_id(nc->substrate, &ncsub);
+    if(ncstat != NC_NOERR) return ncstat;
+    return ncsub->dispatch->inq_grp_full_ncid(nc->substrate,a1,a2);
+}
+
+static int
+NCSUB_inq_varids(int ncid, int* a1, int* a2)
+{
+    NC *nc, *ncsub;
+    int ncstat = NC_check_id(ncid, &nc);
+    if(ncstat != NC_NOERR) return ncstat;
+    ncstat = NC_check_id(nc->substrate, &ncsub);
+    if(ncstat != NC_NOERR) return ncstat;
+    return ncsub->dispatch->inq_varids(nc->substrate,a1,a2);
+}
+
+static int
+NCSUB_inq_dimids(int ncid, int* a1, int* a2, int a3)
+{
+    NC *nc, *ncsub;
+    int ncstat = NC_check_id(ncid, &nc);
+    if(ncstat != NC_NOERR) return ncstat;
+    ncstat = NC_check_id(nc->substrate, &ncsub);
+    if(ncstat != NC_NOERR) return ncstat;
+    return ncsub->dispatch->inq_dimids(nc->substrate,a1,a2,a3);
+}
+
+static int
+NCSUB_inq_typeids(int ncid, int* a1, int* a2)
+{
+    NC *nc, *ncsub;
+    int ncstat = NC_check_id(ncid, &nc);
+    if(ncstat != NC_NOERR) return ncstat;
+    ncstat = NC_check_id(nc->substrate, &ncsub);
+    if(ncstat != NC_NOERR) return ncstat;
+    return ncsub->dispatch->inq_typeids(nc->substrate,a1,a2);
+}
+
+static int
+NCSUB_inq_type_equal(int ncid, nc_type a1, int a2, nc_type a3, int* a4)
+{
+    NC *nc, *ncsub;
+    int ncstat = NC_check_id(ncid, &nc);
+    if(ncstat != NC_NOERR) return ncstat;
+    ncstat = NC_check_id(nc->substrate, &ncsub);
+    if(ncstat != NC_NOERR) return ncstat;
+    return ncsub->dispatch->inq_type_equal(nc->substrate,a1,a2,a3,a4);
+}
+
+static int
+NCSUB_def_grp(int ncid, const char* a1, int* a2)
+{
+    NC *nc, *ncsub;
+    int ncstat = NC_check_id(ncid, &nc);
+    if(ncstat != NC_NOERR) return ncstat;
+    ncstat = NC_check_id(nc->substrate, &ncsub);
+    if(ncstat != NC_NOERR) return ncstat;
+    return ncsub->dispatch->def_grp(nc->substrate,a1,a2);
+}
+
+static int
+NCSUB_inq_user_type(int ncid, nc_type a1, char* a2, size_t* a3, nc_type* a4, size_t* a5, int* a6)
+{
+    NC *nc, *ncsub;
+    int ncstat = NC_check_id(ncid, &nc);
+    if(ncstat != NC_NOERR) return ncstat;
+    ncstat = NC_check_id(nc->substrate, &ncsub);
+    if(ncstat != NC_NOERR) return ncstat;
+    return ncsub->dispatch->inq_user_type(nc->substrate,a1,a2,a3,a4,a5,a6);
+}
+
+static int
+NCSUB_inq_typeid(int ncid, const char* a1, nc_type* a2)
+{
+    NC *nc, *ncsub;
+    int ncstat = NC_check_id(ncid, &nc);
+    if(ncstat != NC_NOERR) return ncstat;
+    ncstat = NC_check_id(nc->substrate, &ncsub);
+    if(ncstat != NC_NOERR) return ncstat;
+    return ncsub->dispatch->inq_typeid(nc->substrate,a1,a2);
+}
+
+static int
+NCSUB_def_compound(int ncid, size_t a1, const char* a2, nc_type* a3)
+{
+    NC *nc, *ncsub;
+    int ncstat = NC_check_id(ncid, &nc);
+    if(ncstat != NC_NOERR) return ncstat;
+    ncstat = NC_check_id(nc->substrate, &ncsub);
+    if(ncstat != NC_NOERR) return ncstat;
+    return ncsub->dispatch->def_compound(nc->substrate,a1,a2,a3);
+}
+
+static int
+NCSUB_insert_compound(int ncid, nc_type a1, const char* a2, size_t a3, nc_type a4)
+{
+    NC *nc, *ncsub;
+    int ncstat = NC_check_id(ncid, &nc);
+    if(ncstat != NC_NOERR) return ncstat;
+    ncstat = NC_check_id(nc->substrate, &ncsub);
+    if(ncstat != NC_NOERR) return ncstat;
+    return ncsub->dispatch->insert_compound(nc->substrate,a1,a2,a3,a4);
+}
+
+static int
+NCSUB_insert_array_compound(int ncid, nc_type a1, const char* a2, size_t a3, nc_type a4, int a5, const int* a6)
+{
+    NC *nc, *ncsub;
+    int ncstat = NC_check_id(ncid, &nc);
+    if(ncstat != NC_NOERR) return ncstat;
+    ncstat = NC_check_id(nc->substrate, &ncsub);
+    if(ncstat != NC_NOERR) return ncstat;
+    return ncsub->dispatch->insert_array_compound(nc->substrate,a1,a2,a3,a4,a5,a6);
+}
+
+static int
+NCSUB_inq_compound_field(int ncid, nc_type a1, int a2, char* a3, size_t* a4, nc_type* a5, int* a6, int* a7)
+{
+    NC *nc, *ncsub;
+    int ncstat = NC_check_id(ncid, &nc);
+    if(ncstat != NC_NOERR) return ncstat;
+    ncstat = NC_check_id(nc->substrate, &ncsub);
+    if(ncstat != NC_NOERR) return ncstat;
+    return ncsub->dispatch->inq_compound_field(nc->substrate,a1,a2,a3,a4,a5,a6,a7);
+}
+
+static int
+NCSUB_inq_compound_fieldindex(int ncid, nc_type a1, const char* a2, int* a3)
+{
+    NC *nc, *ncsub;
+    int ncstat = NC_check_id(ncid, &nc);
+    if(ncstat != NC_NOERR) return ncstat;
+    ncstat = NC_check_id(nc->substrate, &ncsub);
+    if(ncstat != NC_NOERR) return ncstat;
+    return ncsub->dispatch->inq_compound_fieldindex(nc->substrate,a1,a2,a3);
+}
+
+static int
+NCSUB_def_vlen(int ncid, const char* a1, nc_type a2, nc_type* a3)
+{
+    NC *nc, *ncsub;
+    int ncstat = NC_check_id(ncid, &nc);
+    if(ncstat != NC_NOERR) return ncstat;
+    ncstat = NC_check_id(nc->substrate, &ncsub);
+    if(ncstat != NC_NOERR) return ncstat;
+    return ncsub->dispatch->def_vlen(nc->substrate,a1,a2,a3);
+}
+
+static int
+NCSUB_put_vlen_element(int ncid, int a1, void* a2, size_t a3, const void* a4)
+{
+    NC *nc, *ncsub;
+    int ncstat = NC_check_id(ncid, &nc);
+    if(ncstat != NC_NOERR) return ncstat;
+    ncstat = NC_check_id(nc->substrate, &ncsub);
+    if(ncstat != NC_NOERR) return ncstat;
+    return ncsub->dispatch->put_vlen_element(nc->substrate,a1,a2,a3,a4);
+}
+
+static int
+NCSUB_get_vlen_element(int ncid, int a1, const void* a2, size_t* a3, void* a4)
+{
+    NC *nc, *ncsub;
+    int ncstat = NC_check_id(ncid, &nc);
+    if(ncstat != NC_NOERR) return ncstat;
+    ncstat = NC_check_id(nc->substrate, &ncsub);
+    if(ncstat != NC_NOERR) return ncstat;
+    return ncsub->dispatch->get_vlen_element(nc->substrate,a1,a2,a3,a4);
+}
+
+static int
+NCSUB_def_enum(int ncid, nc_type a1, const char* a2, nc_type* a3)
+{
+    NC *nc, *ncsub;
+    int ncstat = NC_check_id(ncid, &nc);
+    if(ncstat != NC_NOERR) return ncstat;
+    ncstat = NC_check_id(nc->substrate, &ncsub);
+    if(ncstat != NC_NOERR) return ncstat;
+    return ncsub->dispatch->def_enum(nc->substrate,a1,a2,a3);
+}
+
+static int
+NCSUB_insert_enum(int ncid, nc_type a1, const char* a2, const void* a3)
+{
+    NC *nc, *ncsub;
+    int ncstat = NC_check_id(ncid, &nc);
+    if(ncstat != NC_NOERR) return ncstat;
+    ncstat = NC_check_id(nc->substrate, &ncsub);
+    if(ncstat != NC_NOERR) return ncstat;
+    return ncsub->dispatch->insert_enum(nc->substrate,a1,a2,a3);
+}
+
+static int
+NCSUB_inq_enum_member(int ncid, nc_type a1, int a2, char* a3, void* a4)
+{
+    NC *nc, *ncsub;
+    int ncstat = NC_check_id(ncid, &nc);
+    if(ncstat != NC_NOERR) return ncstat;
+    ncstat = NC_check_id(nc->substrate, &ncsub);
+    if(ncstat != NC_NOERR) return ncstat;
+    return ncsub->dispatch->inq_enum_member(nc->substrate,a1,a2,a3,a4);
+}
+
+static int
+NCSUB_inq_enum_ident(int ncid, nc_type a1, long long a2, char* a3)
+{
+    NC *nc, *ncsub;
+    int ncstat = NC_check_id(ncid, &nc);
+    if(ncstat != NC_NOERR) return ncstat;
+    ncstat = NC_check_id(nc->substrate, &ncsub);
+    if(ncstat != NC_NOERR) return ncstat;
+    return ncsub->dispatch->inq_enum_ident(nc->substrate,a1,a2,a3);
+}
+
+static int
+NCSUB_def_opaque(int ncid, size_t a1, const char* a2, nc_type* a3)
+{
+    NC *nc, *ncsub;
+    int ncstat = NC_check_id(ncid, &nc);
+    if(ncstat != NC_NOERR) return ncstat;
+    ncstat = NC_check_id(nc->substrate, &ncsub);
+    if(ncstat != NC_NOERR) return ncstat;
+    return ncsub->dispatch->def_opaque(nc->substrate,a1,a2,a3);
+}
+
+static int
+NCSUB_def_var_deflate(int ncid, int a1, int a2, int a3, int a4)
+{
+    NC *nc, *ncsub;
+    int ncstat = NC_check_id(ncid, &nc);
+    if(ncstat != NC_NOERR) return ncstat;
+    ncstat = NC_check_id(nc->substrate, &ncsub);
+    if(ncstat != NC_NOERR) return ncstat;
+    return ncsub->dispatch->def_var_deflate(nc->substrate,a1,a2,a3,a4);
+}
+
+static int
+NCSUB_def_var_fletcher32(int ncid, int a1, int a2)
+{
+    NC *nc, *ncsub;
+    int ncstat = NC_check_id(ncid, &nc);
+    if(ncstat != NC_NOERR) return ncstat;
+    ncstat = NC_check_id(nc->substrate, &ncsub);
+    if(ncstat != NC_NOERR) return ncstat;
+    return ncsub->dispatch->def_var_fletcher32(nc->substrate,a1,a2);
+}
+
+static int
+NCSUB_def_var_chunking(int ncid, int a1, int a2, const size_t* a3)
+{
+    NC *nc, *ncsub;
+    int ncstat = NC_check_id(ncid, &nc);
+    if(ncstat != NC_NOERR) return ncstat;
+    ncstat = NC_check_id(nc->substrate, &ncsub);
+    if(ncstat != NC_NOERR) return ncstat;
+    return ncsub->dispatch->def_var_chunking(nc->substrate,a1,a2,a3);
+}
+
+static int
+NCSUB_def_var_fill(int ncid, int a1, int a2, const void* a3)
+{
+    NC *nc, *ncsub;
+    int ncstat = NC_check_id(ncid, &nc);
+    if(ncstat != NC_NOERR) return ncstat;
+    ncstat = NC_check_id(nc->substrate, &ncsub);
+    if(ncstat != NC_NOERR) return ncstat;
+    return ncsub->dispatch->def_var_fill(nc->substrate,a1,a2,a3);
+}
+
+static int
+NCSUB_def_var_endian(int ncid, int a1, int a2)
+{
+    NC *nc, *ncsub;
+    int ncstat = NC_check_id(ncid, &nc);
+    if(ncstat != NC_NOERR) return ncstat;
+    ncstat = NC_check_id(nc->substrate, &ncsub);
+    if(ncstat != NC_NOERR) return ncstat;
+    return ncsub->dispatch->def_var_endian(nc->substrate,a1,a2);
+}
+
+static int
+NCSUB_set_var_chunk_cache(int ncid, int a1, size_t a2, size_t a3, float a4)
+{
+    NC *nc, *ncsub;
+    int ncstat = NC_check_id(ncid, &nc);
+    if(ncstat != NC_NOERR) return ncstat;
+    ncstat = NC_check_id(nc->substrate, &ncsub);
+    if(ncstat != NC_NOERR) return ncstat;
+    return ncsub->dispatch->set_var_chunk_cache(nc->substrate,a1,a2,a3,a4);
+}
+
+static int
+NCSUB_get_var_chunk_cache(int ncid, int a1, size_t* a2, size_t* a3, float* a4)
+{
+    NC *nc, *ncsub;
+    int ncstat = NC_check_id(ncid, &nc);
+    if(ncstat != NC_NOERR) return ncstat;
+    ncstat = NC_check_id(nc->substrate, &ncsub);
+    if(ncstat != NC_NOERR) return ncstat;
+    return ncsub->dispatch->get_var_chunk_cache(nc->substrate,a1,a2,a3,a4);
+}
+
+#endif /*USE_NETCDF4*/
+
+/* Declare here to avoid having a bunch of static forward declarations */ 
+
+static NC_Dispatch NCSUBSTRATE_dispatch_base =  {
+
+0,
+
+NCSUB_new_nc,
+
+NULL, /*NC_create*/
+NULL, /*NC_open*/
+
+NCSUB_redef,
+NCSUB__enddef,
+NCSUB_sync,
+NCSUB_abort,
+NCSUB_close,
+NCSUB_set_fill,
+NCSUB_inq_base_pe,
+NCSUB_set_base_pe,
+NCSUB_inq_format,
+
+NCSUB_inq,
+NCSUB_inq_type,
+
+NCSUB_def_dim,
+NCSUB_inq_dimid,
+NCSUB_inq_dim,
+NCSUB_inq_unlimdim,
+NCSUB_rename_dim,
+
+NCSUB_inq_att,
+NCSUB_inq_attid,
+NCSUB_inq_attname,
+NCSUB_rename_att,
+NCSUB_del_att,
+NCSUB_get_att,
+NCSUB_put_att,
+
+NCSUB_def_var,
+NCSUB_inq_varid,
+NCSUB_rename_var,
+
+NCSUB_get_vara,
+NCSUB_put_vara,
+NCSUB_get_vars,
+NCSUB_put_vars,
+NCSUB_get_varm,
+NCSUB_put_varm,
+
+NCSUB_inq_var_all,
+
+#ifdef USE_NETCDF4
+NCSUB_show_metadata,
+NCSUB_inq_unlimdims,
+
+NCSUB_var_par_access,
+
+NCSUB_inq_ncid,
+NCSUB_inq_grps,
+NCSUB_inq_grpname,
+NCSUB_inq_grpname_full,
+NCSUB_inq_grp_parent,
+NCSUB_inq_grp_full_ncid,
+NCSUB_inq_varids,
+NCSUB_inq_dimids,
+NCSUB_inq_typeids,
+NCSUB_inq_type_equal,
+NCSUB_def_grp,
+NCSUB_inq_user_type,
+NCSUB_inq_typeid,
+
+NCSUB_def_compound,
+NCSUB_insert_compound,
+NCSUB_insert_array_compound,
+NCSUB_inq_compound_field,
+NCSUB_inq_compound_fieldindex,
+NCSUB_def_vlen,
+NCSUB_put_vlen_element,
+NCSUB_get_vlen_element,
+NCSUB_def_enum,
+NCSUB_insert_enum,
+NCSUB_inq_enum_member,
+NCSUB_inq_enum_ident,
+NCSUB_def_opaque,
+NCSUB_def_var_deflate,
+NCSUB_def_var_fletcher32,
+NCSUB_def_var_chunking,
+NCSUB_def_var_fill,
+NCSUB_def_var_endian,
+NCSUB_set_var_chunk_cache,
+NCSUB_get_var_chunk_cache
+
+#endif /*USE_NETCDF4*/
+
+};
+
+NC_Dispatch* NCSUBSTRATE_dispatch_table = NULL; /*Moved here from ddispatch.c*/
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/src_netcdf4/dtype.c
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/src_netcdf4/dtype.c	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/src_netcdf4/dtype.c	(revision 1749)
@@ -0,0 +1,111 @@
+/*! \file
+  Functions for User-Defined Types
+
+  Copyright 2011 University Corporation for Atmospheric
+  Research/Unidata. See \ref copyright file for more info. */
+
+#include "ncdispatch.h"
+
+/** \internal
+\ingroup user_types
+Learn if two types are equal
+
+\param ncid1 \ref ncid of first typeid.
+\param typeid1 First typeid.
+\param ncid2 \ref ncid of second typeid.
+\param typeid2 Second typeid.
+\param equal Pointer to int. A non-zero value will be copied here if
+the two types are equal, a zero if they are not equal.
+
+\returns ::NC_NOERR No error.
+\returns ::NC_EBADID Bad \ref ncid.
+\returns ::NC_EBADTYPE Bad type id.
+\returns ::NC_ENOTNC4 Not an netCDF-4 file, or classic model enabled.
+\returns ::NC_EHDFERR An error was reported by the HDF5 layer.
+ */
+int
+nc_inq_type_equal(int ncid1, nc_type typeid1, int ncid2, 
+		  nc_type typeid2, int *equal)
+{
+    NC* ncp1;
+    int stat = NC_check_id(ncid1,&ncp1);
+    if(stat != NC_NOERR) return stat;
+    return ncp1->dispatch->inq_type_equal(ncid1,typeid1,ncid2,typeid2,equal);
+}
+
+/** \name Learning about User-Defined Types
+
+    Functions to learn about any kind of user-defined type. */
+/*! \{ */ /* All these functions are part of this named group... */
+
+/** \ingroup user_types 
+
+Find a type by name. Given a group ID and a type name, find the ID of
+the type. If the type is not found in the group, then the parents are
+searched. If still not found, the entire file is searched.
+
+\param ncid \ref ncid
+\param name \ref object_name of type to search for.
+\param typeidp Typeid of named type will be copied here, if it is
+found.
+
+\returns ::NC_NOERR No error.
+\returns ::NC_EBADID Bad \ref ncid.
+\returns ::NC_EBADTYPE Bad type id.
+\returns ::NC_ENOTNC4 Not an netCDF-4 file, or classic model enabled.
+\returns ::NC_EHDFERR An error was reported by the HDF5 layer.
+ */
+int
+nc_inq_typeid(int ncid, const char *name, nc_type *typeidp)
+{
+    NC* ncp;
+    int stat = NC_check_id(ncid,&ncp);
+    if(stat != NC_NOERR) return stat;
+    return ncp->dispatch->inq_typeid(ncid,name,typeidp);
+}
+
+/** \ingroup user_types
+Learn about a user defined type.
+
+Given an ncid and a typeid, get the information about a user defined
+type. This function will work on any user defined type, whether
+compound, opaque, enumeration, or variable length array.
+
+\param ncid \ref ncid
+
+\param xtype The typeid
+
+\param name The \ref object_name will be copied here. \ref
+ignored_if_null.
+
+\param size the (in-memory) size of the type in bytes will be copied
+here. VLEN type size is the size of nc_vlen_t. String size is returned
+as the size of a character pointer. The size may be used to malloc
+space for the data, no matter what the type. \ref ignored_if_null.
+
+\param base_nc_typep The base type will be copied here for enum and
+VLEN types. \ref ignored_if_null.
+
+\param nfieldsp The number of fields will be copied here for enum and
+compound types. \ref ignored_if_null.
+
+\param classp Return the class of the user defined type, ::NC_VLEN,
+::NC_OPAQUE, ::NC_ENUM, or ::NC_COMPOUND. \ref ignored_if_null.
+
+\returns ::NC_NOERR No error.
+\returns ::NC_EBADID Bad \ref ncid.
+\returns ::NC_EBADTYPE Bad type id.
+\returns ::NC_ENOTNC4 Not an netCDF-4 file, or classic model enabled.
+\returns ::NC_EHDFERR An error was reported by the HDF5 layer.
+ */
+int
+nc_inq_user_type(int ncid, nc_type xtype, char *name, size_t *size, 
+		 nc_type *base_nc_typep, size_t *nfieldsp, int *classp)
+{
+    NC *ncp;
+    int stat = NC_check_id(ncid,&ncp);
+    if(stat != NC_NOERR) return stat;
+    return ncp->dispatch->inq_user_type(ncid, xtype, name, size,
+					base_nc_typep, nfieldsp, classp);
+}
+/*! \} */  /* End of named group ...*/
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/src_netcdf4/dutf8proc.c
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/src_netcdf4/dutf8proc.c	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/src_netcdf4/dutf8proc.c	(revision 1749)
@@ -0,0 +1,590 @@
+/*
+ *  Copyright (c) 2006-2007 Jan Behrens, FlexiGuided GmbH, Berlin
+ *
+ *  Permission is hereby granted, free of charge, to any person obtaining a
+ *  copy of this software and associated documentation files (the "Software"),
+ *  to deal in the Software without restriction, including without limitation
+ *  the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ *  and/or sell copies of the Software, and to permit persons to whom the
+ *  Software is furnished to do so, subject to the following conditions:
+ *
+ *  The above copyright notice and this permission notice shall be included in
+ *  all copies or substantial portions of the Software.
+ *
+ *  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ *  FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ *  DEALINGS IN THE SOFTWARE.
+ */
+
+/*
+ *  This library contains derived data from a modified version of the
+ *  Unicode data files.
+ *
+ *  The original data files are available at
+ *  http://www.unicode.org/Public/UNIDATA/
+ *
+ *  Please notice the copyright statement in the file "utf8proc_data.c".
+ */
+
+
+/*
+ *  File name:    utf8proc.c
+ *  Version:      1.1.1
+ *  Last changed: 2007-07-22
+ *
+ *  Description:
+ *  Implementation of libutf8proc.
+ */
+
+
+#include "utf8proc.h"
+#include "utf8proc_data.h"
+
+const int8_t utf8proc_utf8class[256] = {
+  1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+  1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+  1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+  1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+  1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+  1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+  1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+  1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+  0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+  0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+  0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+  0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+  2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+  2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+  3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+  4, 4, 4, 4, 4, 4, 4, 4, 0, 0, 0, 0, 0, 0, 0, 0 };
+
+#define UTF8PROC_HANGUL_SBASE 0xAC00
+#define UTF8PROC_HANGUL_LBASE 0x1100
+#define UTF8PROC_HANGUL_VBASE 0x1161
+#define UTF8PROC_HANGUL_TBASE 0x11A7
+#define UTF8PROC_HANGUL_LCOUNT 19
+#define UTF8PROC_HANGUL_VCOUNT 21
+#define UTF8PROC_HANGUL_TCOUNT 28
+#define UTF8PROC_HANGUL_NCOUNT 588
+#define UTF8PROC_HANGUL_SCOUNT 11172
+/*// END is exclusive*/
+#define UTF8PROC_HANGUL_L_START  0x1100
+#define UTF8PROC_HANGUL_L_END    0x115A
+#define UTF8PROC_HANGUL_L_FILLER 0x115F
+#define UTF8PROC_HANGUL_V_START  0x1160
+#define UTF8PROC_HANGUL_V_END    0x11A3
+#define UTF8PROC_HANGUL_T_START  0x11A8
+#define UTF8PROC_HANGUL_T_END    0x11FA
+#define UTF8PROC_HANGUL_S_START  0xAC00
+#define UTF8PROC_HANGUL_S_END    0xD7A4
+
+
+#define UTF8PROC_BOUNDCLASS_START    0
+#define UTF8PROC_BOUNDCLASS_OTHER    1
+#define UTF8PROC_BOUNDCLASS_CR       2
+#define UTF8PROC_BOUNDCLASS_LF       3
+#define UTF8PROC_BOUNDCLASS_CONTROL  4
+#define UTF8PROC_BOUNDCLASS_EXTEND   5
+#define UTF8PROC_BOUNDCLASS_L        6
+#define UTF8PROC_BOUNDCLASS_V        7
+#define UTF8PROC_BOUNDCLASS_T        8
+#define UTF8PROC_BOUNDCLASS_LV       9
+#define UTF8PROC_BOUNDCLASS_LVT     10
+
+
+const char *utf8proc_errmsg(ssize_t errcode) {
+  switch (errcode) {
+    case UTF8PROC_ERROR_NOMEM:
+    return "Memory for processing UTF-8 data could not be allocated.";
+    case UTF8PROC_ERROR_OVERFLOW:
+    return "UTF-8 string is too long to be processed.";
+    case UTF8PROC_ERROR_INVALIDUTF8:
+    return "Invalid UTF-8 string";
+    case UTF8PROC_ERROR_NOTASSIGNED:
+    return "Unassigned Unicode code point found in UTF-8 string.";
+    case UTF8PROC_ERROR_INVALIDOPTS:
+    return "Invalid options for UTF-8 processing chosen.";
+    default:
+    return "An unknown error occured while processing UTF-8 data.";
+  }
+}
+
+ssize_t utf8proc_iterate(
+  const uint8_t *str, ssize_t slen, int32_t *dst
+) {
+  int length;
+  int i;
+  int32_t uc = -1;
+  *dst = -1;
+  if (!slen) return 0;
+  length = utf8proc_utf8class[str[0]];
+  if (!length) return UTF8PROC_ERROR_INVALIDUTF8;
+  if (slen >= 0 && length > slen) return UTF8PROC_ERROR_INVALIDUTF8;
+  for (i=1; i<length; i++) {
+    if ((str[i] & 0xC0) != 0x80) return UTF8PROC_ERROR_INVALIDUTF8;
+  }
+  switch (length) {
+    case 1:
+    uc = str[0];
+    break;
+    case 2:
+    uc = ((str[0] & 0x1F) <<  6) + (str[1] & 0x3F);
+    if (uc < 0x80) uc = -1;
+    break;
+    case 3:
+    uc = ((str[0] & 0x0F) << 12) + ((str[1] & 0x3F) <<  6)
+      + (str[2] & 0x3F);
+    if (uc < 0x800 || (uc >= 0xD800 && uc < 0xE000) ||
+      (uc >= 0xFDD0 && uc < 0xFDF0)) uc = -1;
+    break;
+    case 4:
+    uc = ((str[0] & 0x07) << 18) + ((str[1] & 0x3F) << 12)
+      + ((str[2] & 0x3F) <<  6) + (str[3] & 0x3F);
+    if (uc < 0x10000 || uc >= 0x110000) uc = -1;
+    break;
+  }
+  if (uc < 0 || ((uc & 0xFFFF) >= 0xFFFE))
+    return UTF8PROC_ERROR_INVALIDUTF8;
+  *dst = uc;
+  return length;
+}
+
+bool utf8proc_codepoint_valid(int32_t uc) {
+  if (uc < 0 || uc >= 0x110000 ||
+    ((uc & 0xFFFF) >= 0xFFFE) || (uc >= 0xD800 && uc < 0xE000) ||
+    (uc >= 0xFDD0 && uc < 0xFDF0)) return false;
+  else return true;
+}
+
+ssize_t utf8proc_encode_char(int32_t uc, uint8_t *dst) {
+  if (uc < 0x00) {
+    return 0;
+  } else if (uc < 0x80) {
+    dst[0] = uc;
+    return 1;
+  } else if (uc < 0x800) {
+    dst[0] = 0xC0 + (uc >> 6);
+    dst[1] = 0x80 + (uc & 0x3F);
+    return 2;
+  } else if (uc == 0xFFFF) {
+    dst[0] = 0xFF;
+    return 1;
+  } else if (uc == 0xFFFE) {
+    dst[0] = 0xFE;
+    return 1;
+  } else if (uc < 0x10000) {
+    dst[0] = 0xE0 + (uc >> 12);
+    dst[1] = 0x80 + ((uc >> 6) & 0x3F);
+    dst[2] = 0x80 + (uc & 0x3F);
+    return 3;
+  } else if (uc < 0x110000) {
+    dst[0] = 0xF0 + (uc >> 18);
+    dst[1] = 0x80 + ((uc >> 12) & 0x3F);
+    dst[2] = 0x80 + ((uc >> 6) & 0x3F);
+    dst[3] = 0x80 + (uc & 0x3F);
+    return 4;
+  } else return 0;
+}
+
+const utf8proc_property_t *utf8proc_get_property(int32_t uc) {
+  /*  // ASSERT: uc >= 0 && uc < 0x110000*/
+  return utf8proc_properties + (
+    utf8proc_stage2table[
+      utf8proc_stage1table[uc >> 8] + (uc & 0xFF)
+    ]
+  );
+}
+
+#define utf8proc_decompose_lump(replacement_uc) \
+  return utf8proc_decompose_char((replacement_uc), dst, bufsize, \
+  options & ~UTF8PROC_LUMP, last_boundclass)
+
+ssize_t utf8proc_decompose_char(int32_t uc, int32_t *dst, ssize_t bufsize,
+    int options, int *last_boundclass) {
+  /*// ASSERT: uc >= 0 && uc < 0x110000*/
+  const utf8proc_property_t *property;
+  utf8proc_propval_t category;
+  int32_t hangul_sindex;
+  property = utf8proc_get_property(uc);
+  category = property->category;
+  hangul_sindex = uc - UTF8PROC_HANGUL_SBASE;
+  if (options & (UTF8PROC_COMPOSE|UTF8PROC_DECOMPOSE)) {
+    if (hangul_sindex >= 0 && hangul_sindex < UTF8PROC_HANGUL_SCOUNT) {
+      int32_t hangul_tindex;
+      if (bufsize >= 1) {
+        dst[0] = UTF8PROC_HANGUL_LBASE +
+          hangul_sindex / UTF8PROC_HANGUL_NCOUNT;
+        if (bufsize >= 2) dst[1] = UTF8PROC_HANGUL_VBASE +
+          (hangul_sindex % UTF8PROC_HANGUL_NCOUNT) / UTF8PROC_HANGUL_TCOUNT;
+      }
+      hangul_tindex = hangul_sindex % UTF8PROC_HANGUL_TCOUNT;
+      if (!hangul_tindex) return 2;
+      if (bufsize >= 3) dst[2] = UTF8PROC_HANGUL_TBASE + hangul_tindex;
+      return 3;
+    }
+  }
+  if (options & UTF8PROC_REJECTNA) {
+    if (!category) return UTF8PROC_ERROR_NOTASSIGNED;
+  }
+  if (options & UTF8PROC_IGNORE) {
+    if (property->ignorable) return 0;
+  }
+  if (options & UTF8PROC_LUMP) {
+    if (category == UTF8PROC_CATEGORY_ZS) utf8proc_decompose_lump(0x0020);
+    if (uc == 0x2018 || uc == 0x2019 || uc == 0x02BC || uc == 0x02C8)
+      utf8proc_decompose_lump(0x0027);
+    if (category == UTF8PROC_CATEGORY_PD || uc == 0x2212)
+      utf8proc_decompose_lump(0x002D);
+    if (uc == 0x2044 || uc == 0x2215) utf8proc_decompose_lump(0x002F);
+    if (uc == 0x2236) utf8proc_decompose_lump(0x003A);
+    if (uc == 0x2039 || uc == 0x2329 || uc == 0x3008)
+      utf8proc_decompose_lump(0x003C);
+    if (uc == 0x203A || uc == 0x232A || uc == 0x3009)
+      utf8proc_decompose_lump(0x003E);
+    if (uc == 0x2216) utf8proc_decompose_lump(0x005C);
+    if (uc == 0x02C4 || uc == 0x02C6 || uc == 0x2038 || uc == 0x2303)
+      utf8proc_decompose_lump(0x005E);
+    if (category == UTF8PROC_CATEGORY_PC || uc == 0x02CD)
+      utf8proc_decompose_lump(0x005F);
+    if (uc == 0x02CB) utf8proc_decompose_lump(0x0060);
+    if (uc == 0x2223) utf8proc_decompose_lump(0x007C);
+    if (uc == 0x223C) utf8proc_decompose_lump(0x007E);
+    if ((options & UTF8PROC_NLF2LS) && (options & UTF8PROC_NLF2PS)) {
+      if (category == UTF8PROC_CATEGORY_ZL ||
+          category == UTF8PROC_CATEGORY_ZP)
+        utf8proc_decompose_lump(0x000A);
+    }
+  }
+  if (options & UTF8PROC_STRIPMARK) {
+    if (category == UTF8PROC_CATEGORY_MN ||
+      category == UTF8PROC_CATEGORY_MC ||
+      category == UTF8PROC_CATEGORY_ME) return 0;
+  }
+  if (options & UTF8PROC_CASEFOLD) {
+    if (property->casefold_mapping) {
+      const int32_t *casefold_entry;
+      ssize_t written = 0;
+      for (casefold_entry = property->casefold_mapping;
+          *casefold_entry >= 0; casefold_entry++) {
+        written += utf8proc_decompose_char(*casefold_entry, dst+written,
+          (bufsize > written) ? (bufsize - written) : 0, options,
+          last_boundclass);
+        if (written < 0) return UTF8PROC_ERROR_OVERFLOW;
+      }
+      return written;
+    }
+  }
+  if (options & (UTF8PROC_COMPOSE|UTF8PROC_DECOMPOSE)) {
+    if (property->decomp_mapping &&
+        (!property->decomp_type || (options & UTF8PROC_COMPAT))) {
+      const int32_t *decomp_entry;
+      ssize_t written = 0;
+      for (decomp_entry = property->decomp_mapping;
+          *decomp_entry >= 0; decomp_entry++) {
+        written += utf8proc_decompose_char(*decomp_entry, dst+written,
+          (bufsize > written) ? (bufsize - written) : 0, options,
+        last_boundclass);
+        if (written < 0) return UTF8PROC_ERROR_OVERFLOW;
+      }
+      return written;
+    }
+  }
+  if (options & UTF8PROC_CHARBOUND) {
+    bool boundary;
+    int tbc, lbc;
+    tbc =
+      (uc == 0x000D) ? UTF8PROC_BOUNDCLASS_CR :
+      (uc == 0x000A) ? UTF8PROC_BOUNDCLASS_LF :
+      ((category == UTF8PROC_CATEGORY_ZL ||
+        category == UTF8PROC_CATEGORY_ZP ||
+        category == UTF8PROC_CATEGORY_CC ||
+        category == UTF8PROC_CATEGORY_CF) &&
+        !(uc == 0x200C || uc == 0x200D)) ? UTF8PROC_BOUNDCLASS_CONTROL :
+      property->extend ? UTF8PROC_BOUNDCLASS_EXTEND :
+      ((uc >= UTF8PROC_HANGUL_L_START && uc < UTF8PROC_HANGUL_L_END) ||
+        uc == UTF8PROC_HANGUL_L_FILLER) ? UTF8PROC_BOUNDCLASS_L :
+      (uc >= UTF8PROC_HANGUL_V_START && uc < UTF8PROC_HANGUL_V_END) ?
+        UTF8PROC_BOUNDCLASS_V :
+      (uc >= UTF8PROC_HANGUL_T_START && uc < UTF8PROC_HANGUL_T_END) ?
+        UTF8PROC_BOUNDCLASS_T :
+      (uc >= UTF8PROC_HANGUL_S_START && uc < UTF8PROC_HANGUL_S_END) ? (
+        ((uc-UTF8PROC_HANGUL_SBASE) % UTF8PROC_HANGUL_TCOUNT == 0) ?
+          UTF8PROC_BOUNDCLASS_LV : UTF8PROC_BOUNDCLASS_LVT
+      ) :
+      UTF8PROC_BOUNDCLASS_OTHER;
+    lbc = *last_boundclass;
+    boundary =
+      (tbc == UTF8PROC_BOUNDCLASS_EXTEND) ? false :
+      (lbc == UTF8PROC_BOUNDCLASS_START) ? true :
+      (lbc == UTF8PROC_BOUNDCLASS_CR &&
+       tbc == UTF8PROC_BOUNDCLASS_LF) ? false :
+      (lbc == UTF8PROC_BOUNDCLASS_CONTROL) ? true :
+      (tbc == UTF8PROC_BOUNDCLASS_CONTROL) ? true :
+      (lbc == UTF8PROC_BOUNDCLASS_L &&
+       (tbc == UTF8PROC_BOUNDCLASS_L ||
+        tbc == UTF8PROC_BOUNDCLASS_V ||
+        tbc == UTF8PROC_BOUNDCLASS_LV ||
+        tbc == UTF8PROC_BOUNDCLASS_LVT)) ? false :
+      ((lbc == UTF8PROC_BOUNDCLASS_LV ||
+        lbc == UTF8PROC_BOUNDCLASS_V) &&
+       (tbc == UTF8PROC_BOUNDCLASS_V ||
+        tbc == UTF8PROC_BOUNDCLASS_T)) ? false :
+      ((lbc == UTF8PROC_BOUNDCLASS_LVT ||
+        lbc == UTF8PROC_BOUNDCLASS_T) &&
+       tbc == UTF8PROC_BOUNDCLASS_T) ? false :
+       true;
+    *last_boundclass = tbc;
+    if (boundary) {
+      if (bufsize >= 1) dst[0] = 0xFFFF;
+      if (bufsize >= 2) dst[1] = uc;
+      return 2;
+    }
+  }
+  if (bufsize >= 1) *dst = uc;
+  return 1;
+}
+
+ssize_t utf8proc_decompose(
+  const uint8_t *str, ssize_t slen,
+  int32_t *buffer, ssize_t bufsize, int options
+) {
+  /*// slen will be ignored, if UTF8PROC_NULLTERM is set in options*/
+  ssize_t wpos = 0;
+  if ((options & UTF8PROC_COMPOSE) && (options & UTF8PROC_DECOMPOSE))
+    return UTF8PROC_ERROR_INVALIDOPTS;
+  if ((options & UTF8PROC_STRIPMARK) &&
+      !(options & UTF8PROC_COMPOSE) && !(options & UTF8PROC_DECOMPOSE))
+    return UTF8PROC_ERROR_INVALIDOPTS;
+  {
+    int32_t uc;
+    ssize_t rpos = 0;
+    ssize_t decomp_result;
+    int boundclass = UTF8PROC_BOUNDCLASS_START;
+    while (1) {
+      if (options & UTF8PROC_NULLTERM) {
+        rpos += utf8proc_iterate(str + rpos, -1, &uc);
+        /* checking of return value is not neccessary,
+	   as 'uc' is < 0 in case of error. */
+        if (uc < 0) return UTF8PROC_ERROR_INVALIDUTF8;
+        if (rpos < 0) return UTF8PROC_ERROR_OVERFLOW;
+        if (uc == 0) break;
+      } else {
+        if (rpos >= slen) break;
+        rpos += utf8proc_iterate(str + rpos, slen - rpos, &uc);
+        if (uc < 0) return UTF8PROC_ERROR_INVALIDUTF8;
+      }
+      decomp_result = utf8proc_decompose_char(
+        uc, buffer + wpos, (bufsize > wpos) ? (bufsize - wpos) : 0, options,
+        &boundclass
+      );
+      if (decomp_result < 0) return decomp_result;
+      wpos += decomp_result;
+      /*      // prohibiting integer overflows due to too long strings:*/
+      if (wpos < 0 || wpos > SSIZE_MAX/sizeof(int32_t)/2)
+        return UTF8PROC_ERROR_OVERFLOW;
+    }
+  }
+  if ((options & (UTF8PROC_COMPOSE|UTF8PROC_DECOMPOSE)) && bufsize >= wpos) {
+    ssize_t pos = 0;
+    while (pos < wpos-1) {
+      int32_t uc1, uc2;
+      const utf8proc_property_t *property1, *property2;
+      uc1 = buffer[pos];
+      uc2 = buffer[pos+1];
+      property1 = utf8proc_get_property(uc1);
+      property2 = utf8proc_get_property(uc2);
+      if (property1->combining_class > property2->combining_class &&
+          property2->combining_class > 0) {
+        buffer[pos] = uc2;
+        buffer[pos+1] = uc1;
+        if (pos > 0) pos--; else pos++;
+      } else {
+        pos++;
+      }
+    }
+  }
+  return wpos;
+}
+
+ssize_t utf8proc_reencode(int32_t *buffer, ssize_t length, int options) {
+  /* UTF8PROC_NULLTERM option will be ignored, 'length' is never ignored
+     ASSERT: 'buffer' has one spare byte of free space at the end! */
+  if (options & (UTF8PROC_NLF2LS | UTF8PROC_NLF2PS | UTF8PROC_STRIPCC)) {
+    ssize_t rpos;
+    ssize_t wpos = 0;
+    int32_t uc;
+    for (rpos = 0; rpos < length; rpos++) {
+      uc = buffer[rpos];
+      if (uc == 0x000D && rpos < length-1 && buffer[rpos+1] == 0x000A) rpos++;
+      if (uc == 0x000A || uc == 0x000D || uc == 0x0085 ||
+          ((options & UTF8PROC_STRIPCC) && (uc == 0x000B || uc == 0x000C))) {
+        if (options & UTF8PROC_NLF2LS) {
+          if (options & UTF8PROC_NLF2PS) {
+            buffer[wpos++] = 0x000A;
+          } else {
+            buffer[wpos++] = 0x2028;
+          }
+        } else {
+          if (options & UTF8PROC_NLF2PS) {
+            buffer[wpos++] = 0x2029;
+          } else {
+            buffer[wpos++] = 0x0020;
+          }
+        }
+      } else if ((options & UTF8PROC_STRIPCC) &&
+          (uc < 0x0020 || (uc >= 0x007F && uc < 0x00A0))) {
+        if (uc == 0x0009) buffer[wpos++] = 0x0020;
+      } else {
+        buffer[wpos++] = uc;
+      }
+    }
+    length = wpos;
+  }
+  if (options & UTF8PROC_COMPOSE) {
+    int32_t *starter = NULL;
+    int32_t current_char;
+    const utf8proc_property_t *starter_property = NULL, *current_property;
+    utf8proc_propval_t max_combining_class = -1;
+    ssize_t rpos;
+    ssize_t wpos = 0;
+    int32_t composition;
+    for (rpos = 0; rpos < length; rpos++) {
+      current_char = buffer[rpos];
+      current_property = utf8proc_get_property(current_char);
+      if (starter && current_property->combining_class > max_combining_class) {
+	/*        // combination perhaps possible*/
+        int32_t hangul_lindex;
+        int32_t hangul_sindex;
+        hangul_lindex = *starter - UTF8PROC_HANGUL_LBASE;
+        if (hangul_lindex >= 0 && hangul_lindex < UTF8PROC_HANGUL_LCOUNT) {
+          int32_t hangul_vindex;
+          hangul_vindex = current_char - UTF8PROC_HANGUL_VBASE;
+          if (hangul_vindex >= 0 && hangul_vindex < UTF8PROC_HANGUL_VCOUNT) {
+            *starter = UTF8PROC_HANGUL_SBASE +
+              (hangul_lindex * UTF8PROC_HANGUL_VCOUNT + hangul_vindex) *
+              UTF8PROC_HANGUL_TCOUNT;
+            starter_property = NULL;
+            continue;
+          }
+        }
+        hangul_sindex = *starter - UTF8PROC_HANGUL_SBASE;
+        if (hangul_sindex >= 0 && hangul_sindex < UTF8PROC_HANGUL_SCOUNT &&
+            (hangul_sindex % UTF8PROC_HANGUL_TCOUNT) == 0) {
+          int32_t hangul_tindex;
+          hangul_tindex = current_char - UTF8PROC_HANGUL_TBASE;
+          if (hangul_tindex >= 0 && hangul_tindex < UTF8PROC_HANGUL_TCOUNT) {
+            *starter += hangul_tindex;
+            starter_property = NULL;
+            continue;
+          }
+        }
+        if (!starter_property) {
+          starter_property = utf8proc_get_property(*starter);
+        }
+        if (starter_property->comb1st_index >= 0 &&
+            current_property->comb2nd_index >= 0) {
+          composition = utf8proc_combinations[
+            starter_property->comb1st_index +
+            current_property->comb2nd_index
+          ];
+          if (composition >= 0 && (!(options & UTF8PROC_STABLE) ||
+              !(utf8proc_get_property(composition)->comp_exclusion))) {
+            *starter = composition;
+            starter_property = NULL;
+            continue;
+          }
+        }
+      }
+      buffer[wpos] = current_char;
+      if (current_property->combining_class) {
+        if (current_property->combining_class > max_combining_class) {
+          max_combining_class = current_property->combining_class;
+        }
+      } else {
+        starter = buffer + wpos;
+        starter_property = NULL;
+        max_combining_class = -1;
+      }
+      wpos++;
+    }
+    length = wpos;
+  }
+  {
+    ssize_t rpos, wpos = 0;
+    int32_t uc;
+    for (rpos = 0; rpos < length; rpos++) {
+      uc = buffer[rpos];
+      wpos += utf8proc_encode_char(uc, ((uint8_t *)buffer) + wpos);
+    }
+    ((uint8_t *)buffer)[wpos] = 0;
+    return wpos;
+  }
+}
+
+ssize_t utf8proc_map(
+  const uint8_t *str, ssize_t slen, uint8_t **dstptr, int options
+) {
+  int32_t *buffer;
+  ssize_t result;
+  *dstptr = NULL;
+  result = utf8proc_decompose(str, slen, NULL, 0, options);
+  if (result < 0) return result;
+  buffer = malloc(result * sizeof(int32_t) + 1);
+  if (!buffer) return UTF8PROC_ERROR_NOMEM;
+  result = utf8proc_decompose(str, slen, buffer, result, options);
+  if (result < 0) {
+    free(buffer);
+    return result;
+  }
+  result = utf8proc_reencode(buffer, result, options);
+  if (result < 0) {
+    free(buffer);
+    return result;
+  }
+  {
+    int32_t *newptr;
+    newptr = realloc(buffer, result+1);
+    if (newptr) buffer = newptr;
+  }
+  *dstptr = (uint8_t *)buffer;
+  return result;
+}
+
+uint8_t *utf8proc_NFD(const uint8_t *str) {
+  uint8_t *retval;
+  utf8proc_map(str, 0, &retval, UTF8PROC_NULLTERM | UTF8PROC_STABLE |
+    UTF8PROC_DECOMPOSE);
+  return retval;
+}
+
+uint8_t *utf8proc_NFC(const uint8_t *str) {
+  uint8_t *retval;
+  utf8proc_map(str, 0, &retval, UTF8PROC_NULLTERM | UTF8PROC_STABLE |
+    UTF8PROC_COMPOSE);
+  return retval;
+}
+
+uint8_t *utf8proc_NFKD(const uint8_t *str) {
+  uint8_t *retval;
+  utf8proc_map(str, 0, &retval, UTF8PROC_NULLTERM | UTF8PROC_STABLE |
+    UTF8PROC_DECOMPOSE | UTF8PROC_COMPAT);
+  return retval;
+}
+
+uint8_t *utf8proc_NFKC(const uint8_t *str) {
+  uint8_t *retval;
+  utf8proc_map(str, 0, &retval, UTF8PROC_NULLTERM | UTF8PROC_STABLE |
+    UTF8PROC_COMPOSE | UTF8PROC_COMPAT);
+  return retval;
+}
+
+ssize_t utf8proc_check(const uint8_t *str) {
+  ssize_t result;
+  result = utf8proc_decompose(str, 0, NULL, 0, 
+			      UTF8PROC_NULLTERM | UTF8PROC_STABLE);
+  return result;
+}
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/src_netcdf4/dv2i.c
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/src_netcdf4/dv2i.c	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/src_netcdf4/dv2i.c	(revision 1749)
@@ -0,0 +1,1160 @@
+/** \file 
+The V2 API Funtions.
+
+Copyright 1996, University Corporation for Atmospheric Research
+See \ref copyright file for copying and redistribution conditions.
+ */
+
+#ifndef NO_NETCDF_2
+
+#include <config.h>
+#include <stdlib.h>
+#include <stdio.h>
+#include <stdarg.h>
+#include "netcdf.h"
+
+/* The subroutines in error.c emit no messages unless NC_VERBOSE bit
+ * is on.  They call exit() when NC_FATAL bit is on. */
+int ncopts = (NC_FATAL | NC_VERBOSE) ;
+int ncerr = NC_NOERR ;
+
+#if SIZEOF_LONG == SIZEOF_SIZE_T
+/*
+ * We don't have to copy the arguments to switch from 'long'
+ * to 'size_t' or 'ptrdiff_t'. Use dummy macros.
+ */
+
+# define NDIMS_DECL
+# define A_DECL(name, type, ndims, rhs) \
+	const type *const name = ((const type *)(rhs))
+
+# define A_FREE(name)
+
+# define A_INIT(lhs, type, ndims, rhs)
+	
+#else 
+/*
+ * We do have to copy the arguments to switch from 'long'
+ * to 'size_t' or 'ptrdiff_t'. In my tests on an SGI,
+ * any additional cost was lost in measurement variation.
+ *
+ * This stanza is true on Windows with MinGW-64
+ */
+
+# include "onstack.h"
+
+static size_t
+nvdims(int ncid, int varid)
+{
+   int ndims=-1, status;
+
+   if ((status = nc_inq_varndims(ncid, varid, &ndims)))
+   {
+      nc_advise("ncvdims", status, "ncid %d", ncid);
+      return -1;
+   }
+   return ndims;
+}
+
+#define NDIMS_DECL	const size_t ndims = nvdims(ncid, varid);
+
+# define A_DECL(name, type, ndims, rhs) \
+	ALLOC_ONSTACK(name, type, ndims)
+
+# define A_FREE(name) \
+	FREE_ONSTACK(name)
+
+# define A_INIT(lhs, type, ndims, rhs) \
+	{ \
+		const long *lp = rhs; \
+		type *tp = lhs; \
+		type *const end = lhs + ndims; \
+		while(tp < end) \
+		{ \
+			*tp++ = (type) *lp++; \
+		} \
+	}
+
+
+#endif
+
+typedef signed char schar;
+
+/*
+ * Computes number of record variables in an open netCDF file, and an array of
+ * the record variable ids, if the array parameter is non-null.
+ */
+static int
+numrecvars(int ncid, int *nrecvarsp, int *recvarids)
+{
+    int status = NC_NOERR;
+    int nvars = 0;
+    int ndims = 0;
+    int nrecvars = 0;
+    int varid;
+    int recdimid;
+    int dimids[MAX_NC_DIMS];
+
+    status = nc_inq_nvars(ncid, &nvars); 
+    if(status != NC_NOERR)
+	return status;
+
+    status = nc_inq_unlimdim(ncid, &recdimid); 
+    if(status != NC_NOERR)
+	return status;
+
+    if (recdimid == -1) {
+	*nrecvarsp = 0;
+	return NC_NOERR;
+    }
+    nrecvars = 0;
+    for (varid = 0; varid < nvars; varid++) {
+	status = nc_inq_varndims(ncid, varid, &ndims); 
+	if(status != NC_NOERR)
+	    return status;
+	status = nc_inq_vardimid(ncid, varid, dimids); 
+	if(status != NC_NOERR)
+	    return status;
+	if (ndims > 0 && dimids[0] == recdimid) {
+	    if (recvarids != NULL)
+	      recvarids[nrecvars] = varid;
+	    nrecvars++;
+	}
+    }
+    *nrecvarsp = nrecvars;
+    return NC_NOERR;
+}
+
+
+/*
+ * Computes record size (in bytes) of the record variable with a specified
+ * variable id.  Returns size as 0 if not a record variable.
+ */
+static int
+ncrecsize(int ncid, int varid, size_t *recsizep)
+{
+    int status = NC_NOERR;
+    int recdimid;
+    nc_type type;
+    int ndims;
+    int dimids[MAX_NC_DIMS];
+    int id;
+    size_t size;
+
+    *recsizep = 0;
+    status = nc_inq_unlimdim(ncid, &recdimid); 
+    if(status != NC_NOERR)
+	return status;
+    status = nc_inq_vartype(ncid, varid, &type); 
+    if(status != NC_NOERR)
+	return status;
+    status = nc_inq_varndims(ncid, varid, &ndims); 
+    if(status != NC_NOERR)
+	return status;
+    status = nc_inq_vardimid(ncid, varid, dimids); 
+    if(status != NC_NOERR)
+	return status;
+    if (ndims == 0 || dimids[0] != recdimid) {
+	return NC_NOERR;
+    }
+    size = nctypelen(type);
+    for (id = 1; id < ndims; id++) {
+	size_t len;
+	status = nc_inq_dimlen(ncid, dimids[id], &len);
+	if(status != NC_NOERR)
+		return status;
+	size *= len;
+    }
+    *recsizep = size;
+    return NC_NOERR;
+}
+
+
+/*
+ * Retrieves the dimension sizes of a variable with a specified variable id in
+ * an open netCDF file.  Returns -1 on error.
+ */
+static int
+dimsizes(int ncid, int varid, size_t *sizes)
+{
+    int status = NC_NOERR;
+    int ndims;
+    int id;
+    int dimids[MAX_NC_DIMS];
+
+    status = nc_inq_varndims(ncid, varid, &ndims); 
+    if(status != NC_NOERR)
+	return status;
+    status = nc_inq_vardimid(ncid, varid, dimids); 
+    if(status != NC_NOERR)
+	return status;
+    if (ndims == 0 || sizes == NULL)
+      return NC_NOERR;
+    for (id = 0; id < ndims; id++) {
+	size_t len;
+	status = nc_inq_dimlen(ncid, dimids[id], &len);
+	if(status != NC_NOERR)
+		return status;
+	sizes[id] = len;
+    }
+    return NC_NOERR;
+}
+
+
+/*
+ * Retrieves the number of record variables, the record variable ids, and the
+ * record size of each record variable.  If any pointer to info to be returned
+ * is null, the associated information is not returned.  Returns -1 on error.
+ */
+int
+nc_inq_rec(
+	int ncid,
+	size_t *nrecvarsp,
+	int *recvarids,
+	size_t *recsizes)
+{
+    int status = NC_NOERR;
+    int nvars = 0;
+    int recdimid;
+    int varid;
+    int rvarids[MAX_NC_VARS];
+    int nrvars = 0;
+
+    status = nc_inq_nvars(ncid, &nvars); 
+    if(status != NC_NOERR)
+	return status;
+
+    status = nc_inq_unlimdim(ncid, &recdimid); 
+    if(status != NC_NOERR)
+	return status;
+
+    *nrecvarsp = 0;
+    if (recdimid == -1)
+	return NC_NOERR;
+    
+    status = numrecvars(ncid, &nrvars, rvarids);
+    if(status != NC_NOERR)
+	return status;
+
+    if (nrecvarsp != NULL)
+	*nrecvarsp = nrvars;
+    if (recvarids != NULL)
+	for (varid = 0; varid < nrvars; varid++)
+	    recvarids[varid] = rvarids[varid];
+
+    if (recsizes != NULL)
+	for (varid = 0; varid < nrvars; varid++) {
+	    size_t rsize;
+	    status = ncrecsize(ncid, rvarids[varid], &rsize);
+	    if (status != NC_NOERR)
+		return status;
+	    recsizes[varid] = rsize;
+	}
+	return NC_NOERR;
+}
+
+
+/*
+ * Write one record's worth of data, except don't write to variables for which
+ * the address of the data to be written is NULL.  Return -1 on error.  This is
+ * the same as the ncrecput() in the library, except that can handle errors
+ * better.
+ */
+int
+nc_put_rec(
+	int ncid,
+	size_t recnum,
+	void* const* datap)
+{
+    int status = NC_NOERR;
+    int varid;
+    int rvarids[MAX_NC_VARS];
+    int nrvars;
+    size_t start[MAX_NC_DIMS];
+    size_t edges[MAX_NC_DIMS];
+
+    status = numrecvars(ncid, &nrvars, rvarids);
+    if(status != NC_NOERR)
+	return status;
+
+    if (nrvars == 0)
+      return NC_NOERR;
+
+    start[0] = recnum;
+    for (varid = 1; varid < nrvars; varid++)
+	start[varid] = 0;
+
+    for (varid = 0; varid < nrvars; varid++) {
+	if (datap[varid] != NULL) {
+	    status = dimsizes(ncid, rvarids[varid], edges);
+	    if(status != NC_NOERR)
+		return status;
+
+	    edges[0] = 1;		/* only 1 record's worth */
+	    status = nc_put_vara(ncid, rvarids[varid], start, edges, datap[varid]);
+	    if(status != NC_NOERR)
+		return status;
+	}
+    }    
+    return 0;
+}
+
+
+/*
+ * Read one record's worth of data, except don't read from variables for which
+ * the address of the data to be read is null.  Return -1 on error.  This is
+ * the same as the ncrecget() in the library, except that can handle errors
+ * better.
+ */
+int
+nc_get_rec(
+	int ncid,
+	size_t recnum,
+	void **datap)
+{
+    int status = NC_NOERR;
+    int varid;
+    int rvarids[MAX_NC_VARS];
+    int nrvars;
+    size_t start[MAX_NC_DIMS];
+    size_t edges[MAX_NC_DIMS];
+
+    status = numrecvars(ncid, &nrvars, rvarids);
+    if(status != NC_NOERR)
+	return status;
+
+    if (nrvars == 0)
+      return NC_NOERR;
+
+    start[0] = recnum;
+    for (varid = 1; varid < nrvars; varid++)
+	start[varid] = 0;
+
+    for (varid = 0; varid < nrvars; varid++) {
+	if (datap[varid] != NULL) {
+	    status = dimsizes(ncid, rvarids[varid], edges);
+	    if(status != NC_NOERR)
+		return status;
+	    edges[0] = 1;		/* only 1 record's worth */
+	    status = nc_get_vara(ncid, rvarids[varid], start, edges, datap[varid]);
+	    if(status != NC_NOERR)
+		return status;
+	}
+    }    
+    return 0;
+}
+
+/*
+ */
+void
+nc_advise(const char *routine_name, int err, const char *fmt,...)
+{
+	va_list args;
+
+	if(NC_ISSYSERR(err))
+		ncerr = NC_SYSERR;
+	else
+		ncerr = err;
+
+	if( ncopts & NC_VERBOSE )
+	{
+		(void) fprintf(stderr,"%s: ", routine_name);
+		va_start(args ,fmt);
+		(void) vfprintf(stderr,fmt,args);
+		va_end(args);
+		if(err != NC_NOERR)
+		{
+			(void) fprintf(stderr,": %s",
+				nc_strerror(err));
+		}
+		(void) fputc('\n',stderr);
+		(void) fflush(stderr);	/* to ensure log files are current */
+	}
+
+	if( (ncopts & NC_FATAL) && err != NC_NOERR )
+	{
+		exit(ncopts);
+	}
+}
+
+/* End error handling */
+
+int
+nccreate(const char* path, int cmode)
+{
+	int ncid;
+	const int status = nc_create(path, cmode, &ncid);
+	if(status != NC_NOERR)
+	{
+		nc_advise("nccreate", status, "filename \"%s\"", path);
+		return -1;
+	}
+	return ncid;
+}
+
+
+int
+ncopen(const char *path, int mode)
+{
+	int ncid;
+	const int status = nc_open(path, mode, &ncid);
+	if(status != NC_NOERR)
+	{
+		nc_advise("ncopen", status, "filename \"%s\"", path);
+		return -1;
+	}
+	return ncid;
+}
+
+
+int
+ncredef(int ncid)
+{
+	const int status =  nc_redef(ncid);
+	if(status != NC_NOERR)
+	{
+		nc_advise("ncredef", status, "ncid %d", ncid);
+		return -1;
+	}
+	return 0;
+}
+
+
+int
+ncendef(int ncid)
+{
+	const int status = nc_enddef(ncid);
+	if(status != NC_NOERR)
+	{
+		nc_advise("ncendef", status, "ncid %d", ncid);
+		return -1;
+	}
+	return 0;
+}
+
+
+int
+ncclose(int ncid)
+{
+	const int status = nc_close(ncid);
+	if(status != NC_NOERR)
+	{
+		nc_advise("ncclose", status, "ncid %d", ncid);
+		return -1;
+		
+	}
+	return 0;
+}
+
+
+int
+ncinquire(
+    int		ncid,
+    int*	ndims,
+    int*	nvars,
+    int*	natts, 
+    int*	recdim
+)
+{
+	int nd, nv, na;
+	const int status = nc_inq(ncid, &nd, &nv, &na, recdim);
+
+	if(status != NC_NOERR)
+	{
+		nc_advise("ncinquire", status, "ncid %d", ncid);
+		return -1;
+	}
+	/* else */
+
+	if(ndims != NULL)
+		*ndims = (int) nd;
+
+	if(nvars != NULL)
+		*nvars = (int) nv;
+
+	if(natts != NULL)
+		*natts = (int) na;
+
+	return ncid;
+}
+
+
+int
+ncsync(int ncid)
+{
+	const int status = nc_sync(ncid);
+	if(status != NC_NOERR)
+	{
+		nc_advise("ncsync", status, "ncid %d", ncid);
+		return -1;
+		
+	}
+	return 0;
+}
+
+
+int
+ncabort(int ncid)
+{
+	const int status = nc_abort(ncid);
+	if(status != NC_NOERR)
+	{
+		nc_advise("ncabort", status, "ncid %d", ncid);
+		return -1;
+	}
+	return 0;
+}
+
+
+int
+ncdimdef(
+    int		ncid,
+    const char*	name,
+    long	length
+)
+{
+	int dimid;
+	int status = NC_NOERR;
+	if(length < 0) {
+	    status = NC_EDIMSIZE;
+	    nc_advise("ncdimdef", status, "ncid %d", ncid);
+	    return -1;
+	}
+	status =  nc_def_dim(ncid, name, (size_t)length, &dimid);
+	if(status != NC_NOERR)
+	{
+		nc_advise("ncdimdef", status, "ncid %d", ncid);
+		return -1;
+	}
+	return dimid;
+}
+
+
+int
+ncdimid(int ncid, const char*	name)
+{
+	int dimid;
+	const int status =  nc_inq_dimid(ncid, name, &dimid);
+	if(status != NC_NOERR)
+	{
+		nc_advise("ncdimid", status, "ncid %d", ncid);
+		return -1;
+	}
+	return dimid;
+}
+
+
+int
+ncdiminq(
+    int		ncid,
+    int		dimid,
+    char*	name,
+    long*	length
+)
+{
+	size_t ll;
+	const int status = nc_inq_dim(ncid, dimid, name, &ll);
+
+	if(status != NC_NOERR)
+	{
+		nc_advise("ncdiminq", status, "ncid %d", ncid);
+		return -1;
+	}
+	/* else */
+	
+	if(length != NULL)
+		*length = (int) ll;
+
+	return dimid;
+}
+
+
+int
+ncdimrename(
+    int		ncid,
+    int		dimid,
+    const char*	name
+)
+{
+	const int status = nc_rename_dim(ncid, dimid, name);
+	if(status != NC_NOERR)
+	{
+		nc_advise("ncdimrename", status, "ncid %d", ncid);
+		return -1;
+	}
+	return dimid;
+}
+
+
+int
+ncvardef(
+    int		ncid,
+    const char*	name,
+    nc_type	datatype, 
+    int		ndims,
+    const int*	dim
+)
+{
+	int varid = -1;
+	const int status = nc_def_var(ncid, name, datatype, ndims, dim, &varid);
+	if(status != NC_NOERR)
+	{
+		nc_advise("ncvardef", status, "ncid %d", ncid);
+		return -1;
+	}
+	return varid;
+}
+
+
+int
+ncvarid(
+    int		ncid,
+    const char*	name
+)
+{
+	int varid = -1;
+	const int status = nc_inq_varid(ncid, name, &varid);
+	if(status != NC_NOERR)
+	{
+		nc_advise("ncvarid", status, "ncid %d", ncid);
+		return -1;
+	}
+	return varid;
+}
+
+
+int
+ncvarinq(
+    int		ncid,
+    int		varid,
+    char*	name,
+    nc_type*	datatype,
+    int*	ndims,
+    int*	dim,
+    int*	natts
+)
+{
+	int nd, na;
+	const int status = nc_inq_var(ncid, varid, name, datatype,
+		 &nd, dim, &na);
+
+	if(status != NC_NOERR)
+	{
+		nc_advise("ncvarinq", status, "ncid %d", ncid);
+		return -1;
+	}
+	/* else */
+	
+	if(ndims != NULL)
+		*ndims = (int) nd;
+
+	if(natts != NULL)
+		*natts = (int) na;
+
+	return varid;
+}
+
+
+int
+ncvarput1(
+    int		ncid,
+    int		varid,
+    const long*	index,
+    const void*	value
+)
+{
+	NDIMS_DECL
+	A_DECL(coordp, size_t, ndims, index);
+	A_INIT(coordp, size_t, ndims, index);
+	{
+	const int status = nc_put_var1(ncid, varid, coordp, value);
+	A_FREE(coordp);
+	if(status != NC_NOERR)
+	{
+		nc_advise("ncvarput1", status, "ncid %d", ncid);
+		return -1;
+	}
+	}
+	return 0;
+}
+
+
+int
+ncvarget1(
+    int		ncid,
+    int		varid,
+    const long*	index,
+    void*	value
+)
+{
+	NDIMS_DECL
+	A_DECL(coordp, size_t, ndims, index);
+	A_INIT(coordp, size_t, ndims, index);
+	{
+	const int status = nc_get_var1(ncid, varid, coordp, value);
+	A_FREE(coordp);
+	if(status != NC_NOERR)
+	{
+		nc_advise("ncdimid", status, "ncid %d", ncid);
+		return -1;
+	}
+	}
+	return 0;
+}
+
+
+int
+ncvarput(
+    int		ncid,
+    int		varid,
+    const long*	start,
+    const long*	count, 
+    const void*	value
+)
+{
+	NDIMS_DECL
+	A_DECL(stp, size_t, ndims, start);
+	A_DECL(cntp, size_t, ndims, count);
+	A_INIT(stp, size_t, ndims, start);
+	A_INIT(cntp, size_t, ndims, count);
+	{
+	const int status = nc_put_vara(ncid, varid, stp, cntp, value);
+	A_FREE(cntp);
+	A_FREE(stp);
+	if(status != NC_NOERR)
+	{
+		nc_advise("ncvarput", status, "ncid %d", ncid);
+		return -1;
+	}
+	}
+	return 0;
+}
+
+
+int
+ncvarget(
+    int		ncid,
+    int		varid,
+    const long*	start,
+    const long*	count, 
+    void*	value
+)
+{
+	NDIMS_DECL
+	A_DECL(stp, size_t, ndims, start);
+	A_DECL(cntp, size_t, ndims, count);
+	A_INIT(stp, size_t, ndims, start);
+	A_INIT(cntp, size_t, ndims, count);
+	{
+	const int status = nc_get_vara(ncid, varid, stp, cntp, value);
+	A_FREE(cntp);
+	A_FREE(stp);
+	if(status != NC_NOERR)
+	{
+		nc_advise("ncvarget", status, "ncid %d; varid %d", ncid, varid);
+		return -1;
+	}
+	}
+	return 0;
+}
+
+
+int
+ncvarputs(
+    int		ncid,
+    int		varid,
+    const long*	start,
+    const long*	count,
+    const long*	stride,
+    const void*	value
+)
+{
+	if(stride == NULL)
+		return ncvarput(ncid, varid, start, count, value);
+	/* else */
+	{
+	NDIMS_DECL
+	A_DECL(stp, size_t, ndims, start);
+	A_DECL(cntp, size_t, ndims, count);
+	A_DECL(strdp, ptrdiff_t, ndims, stride);
+	A_INIT(stp, size_t, ndims, start);
+	A_INIT(cntp, size_t, ndims, count);
+	A_INIT(strdp, ptrdiff_t, ndims, stride);
+	{
+	const int status = nc_put_vars(ncid, varid, stp, cntp, strdp, value);
+	A_FREE(strdp);
+	A_FREE(cntp);
+	A_FREE(stp);
+	if(status != NC_NOERR)
+	{
+		nc_advise("ncvarputs", status, "ncid %d", ncid);
+		return -1;
+	}
+	}
+	return 0;
+	}
+}
+
+
+int
+ncvargets(
+    int		ncid,
+    int		varid,
+    const long*	start,
+    const long*	count,
+    const long*	stride,
+    void*	value
+)
+{
+	if(stride == NULL)
+		return ncvarget(ncid, varid, start, count, value);
+	/* else */
+	{
+	NDIMS_DECL
+	A_DECL(stp, size_t, ndims, start);
+	A_DECL(cntp, size_t, ndims, count);
+	A_DECL(strdp, ptrdiff_t, ndims, stride);
+	A_INIT(stp, size_t, ndims, start);
+	A_INIT(cntp, size_t, ndims, count);
+	A_INIT(strdp, ptrdiff_t, ndims, stride);
+	{
+	const int status = nc_get_vars(ncid, varid, stp, cntp, strdp, value);
+	A_FREE(strdp);
+	A_FREE(cntp);
+	A_FREE(stp);
+	if(status != NC_NOERR)
+	{
+		nc_advise("ncvargets", status, "ncid %d", ncid);
+		return -1;
+	}
+	}
+	return 0;
+	}
+}
+
+
+int
+ncvarputg(
+    int		ncid,
+    int		varid,
+    const long*	start,
+    const long*	count,
+    const long*	stride,
+    const long*	map,
+    const void* value
+)
+{
+	if(map == NULL)
+		return ncvarputs(ncid, varid, start, count, stride, value);
+	/* else */
+	{
+	NDIMS_DECL
+	A_DECL(stp, size_t, ndims, start);
+	A_DECL(cntp, size_t, ndims, count);
+	A_DECL(strdp, ptrdiff_t, ndims, stride);
+	A_DECL(imp, ptrdiff_t, ndims, map);
+	A_INIT(stp, size_t, ndims, start);
+	A_INIT(cntp, size_t, ndims, count);
+	A_INIT(strdp, ptrdiff_t, ndims, stride);
+	A_INIT(imp, ptrdiff_t, ndims, map);
+	{
+	const int status = nc_put_varm(ncid, varid,
+			 stp, cntp, strdp, imp, value);
+	A_FREE(imp);
+	A_FREE(strdp);
+	A_FREE(cntp);
+	A_FREE(stp);
+	if(status != NC_NOERR)
+	{
+		nc_advise("ncvarputg", status, "ncid %d", ncid);
+		return -1;
+	}
+	}
+	return 0;
+	}
+}
+
+
+int
+ncvargetg(
+    int		ncid,
+    int		varid,
+    const long*	start,
+    const long*	count,
+    const long*	stride,
+    const long*	map,
+    void*	value
+)
+{
+	if(map == NULL)
+		return ncvargets(ncid, varid, start, count, stride, value);
+	/* else */
+	{
+	NDIMS_DECL
+	A_DECL(stp, size_t, ndims, start);
+	A_DECL(cntp, size_t, ndims, count);
+	A_DECL(strdp, ptrdiff_t, ndims, stride);
+	A_DECL(imp, ptrdiff_t, ndims, map);
+	A_INIT(stp, size_t, ndims, start);
+	A_INIT(cntp, size_t, ndims, count);
+	A_INIT(strdp, ptrdiff_t, ndims, stride);
+	A_INIT(imp, ptrdiff_t, ndims, map);
+	{
+	const int status = nc_get_varm(ncid, varid,
+			stp, cntp, strdp, imp, value);
+	A_FREE(imp);
+	A_FREE(strdp);
+	A_FREE(cntp);
+	A_FREE(stp);
+	if(status != NC_NOERR)
+	{
+		nc_advise("ncvargetg", status, "ncid %d", ncid);
+		return -1;
+	}
+	}
+	return 0;
+	}
+}
+
+
+int
+ncvarrename(
+    int		ncid,
+    int		varid,
+    const char*	name
+)
+{
+	const int status = nc_rename_var(ncid, varid, name);
+	if(status != NC_NOERR)
+	{
+		nc_advise("ncvarrename", status, "ncid %d", ncid);
+		return -1;
+	}
+	return varid;
+}
+
+
+int
+ncattput(
+    int		ncid,
+    int		varid,
+    const char*	name, 
+    nc_type	datatype,
+    int		len,
+    const void*	value
+)
+{
+	const int status = nc_put_att(ncid, varid, name, datatype, len, value);
+	if(status != NC_NOERR)
+	{
+		nc_advise("ncattput", status, "ncid %d", ncid);
+		return -1;
+	}
+	return 0;
+}
+
+
+int
+ncattinq(
+    int		ncid,
+    int		varid,
+    const char*	name, 
+    nc_type*	datatype,
+    int*	len
+)
+{
+	size_t ll;
+	const int status = nc_inq_att(ncid, varid, name, datatype, &ll);
+	if(status != NC_NOERR)
+	{
+		nc_advise("ncattinq", status,
+		    "ncid %d; varid %d; attname \"%s\"",
+		    ncid, varid, name);
+		return -1;
+	}
+	
+	if(len != NULL)
+		*len = (int) ll;
+
+	return 1;
+
+}
+
+
+int
+ncattget(
+    int		ncid,
+    int		varid,
+    const char*	name, 
+    void*	value
+)
+{
+	const int status = nc_get_att(ncid, varid, name, value);
+	if(status != NC_NOERR)
+	{
+		nc_advise("ncattget", status, "ncid %d", ncid);
+		return -1;
+	}
+	return 1;
+}
+
+
+int
+ncattcopy(
+    int		ncid_in,
+    int		varid_in,
+    const char*	name, 
+    int		ncid_out,
+    int		varid_out
+)
+{
+	const int status = nc_copy_att(ncid_in, varid_in, name, ncid_out, varid_out);
+	if(status != NC_NOERR)
+	{
+		nc_advise("ncattcopy", status, "%s", name);
+		return -1;
+	}
+	return 0;
+}
+
+
+int
+ncattname(
+    int		ncid,
+    int		varid,
+    int		attnum,
+    char*	name
+)
+{
+	const int status = nc_inq_attname(ncid, varid, attnum, name);
+	if(status != NC_NOERR)
+	{
+		nc_advise("ncattname", status, "ncid %d", ncid);
+		return -1;
+	}
+	return attnum;
+}
+
+
+int
+ncattrename(
+    int		ncid,
+    int		varid,
+    const char*	name, 
+    const char*	newname
+)
+{
+	const int status = nc_rename_att(ncid, varid, name, newname);
+	if(status != NC_NOERR)
+	{
+		nc_advise("ncattrename", status, "ncid %d", ncid);
+		return -1;
+	}
+	return 1;
+}
+
+
+int
+ncattdel(
+    int		ncid,
+    int		varid,
+    const char*	name
+)
+{
+	 const int status = nc_del_att(ncid, varid, name);
+	if(status != NC_NOERR)
+	{
+		nc_advise("ncattdel", status, "ncid %d", ncid);
+		return -1;
+	}
+	return 1;
+}
+
+#endif /* NO_NETCDF_2 */
+
+#ifndef NO_NETCDF_2
+
+int
+ncsetfill(
+    int		ncid,
+    int		fillmode
+)
+{
+	int oldmode = -1;
+	const int status = nc_set_fill(ncid, fillmode, &oldmode);
+	if(status != NC_NOERR)
+	{
+		nc_advise("ncsetfill", status, "ncid %d", ncid);
+		return -1;
+	}
+	return oldmode;
+}
+
+
+int
+ncrecinq(
+    int		ncid,
+    int*	nrecvars,
+    int*	recvarids,
+    long*	recsizes
+)
+{
+	size_t nrv = 0;
+	size_t rs[NC_MAX_VARS]; /* TODO */
+	const int status = nc_inq_rec(ncid, &nrv, recvarids, rs);
+	if(status != NC_NOERR)
+	{
+		nc_advise("ncrecinq", status, "ncid %d", ncid);
+		return -1;
+	}
+
+	if(nrecvars != NULL)
+		*nrecvars = (int) nrv;
+
+	if(recsizes != NULL)
+	{
+		size_t ii;
+		for(ii = 0; ii < nrv; ii++)
+		{
+			recsizes[ii] = (long) rs[ii];
+		}
+	}
+
+	return (int) nrv;
+}
+
+
+int
+ncrecget(
+    int		ncid,
+    long	recnum,
+    void**	datap
+)
+{
+	const int status = nc_get_rec(ncid, (size_t)recnum, datap);
+	if(status != NC_NOERR)
+	{
+		nc_advise("ncrecget", status, "ncid %d", ncid);
+		return -1;
+	}
+	return 0;
+}
+
+
+int
+ncrecput(
+    int		ncid,
+    long	recnum,
+    void* const* datap
+)
+{
+	const int status = nc_put_rec(ncid, (size_t)recnum, datap);
+	if(status != NC_NOERR)
+	{
+		nc_advise("ncrecput", status, "ncid %d", ncid);
+		return -1;
+	}
+	return 0;
+}
+
+#endif /* NO_NETCDF_2 */
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/src_netcdf4/dvar.c
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/src_netcdf4/dvar.c	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/src_netcdf4/dvar.c	(revision 1749)
@@ -0,0 +1,585 @@
+/*! \file
+Functions for defining and inquiring about variables.
+
+Copyright 2010 University Corporation for Atmospheric
+Research/Unidata. See COPYRIGHT file for more info.
+*/
+
+#include "ncdispatch.h"
+#include "netcdf_f.h"
+
+/** \defgroup variables Variables
+
+Variables hold multi-dimensional arrays of data.
+
+Variables for a netCDF dataset are defined when the dataset is
+created, while the netCDF dataset is in define mode. Other variables
+may be added later by reentering define mode. A netCDF variable has a
+name, a type, and a shape, which are specified when it is defined. A
+variable may also have values, which are established later in data
+mode.
+
+Ordinarily, the name, type, and shape are fixed when the variable is
+first defined. The name may be changed, but the type and shape of a
+variable cannot be changed. However, a variable defined in terms of
+the unlimited dimension can grow without bound in that dimension.
+
+A netCDF variable in an open netCDF dataset is referred to by a small
+integer called a variable ID.
+
+Variable IDs reflect the order in which variables were defined within
+a netCDF dataset. Variable IDs are 0, 1, 2,..., in the order in which
+the variables were defined. A function is available for getting the
+variable ID from the variable name and vice-versa.
+
+Attributes (see Attributes) may be associated with a variable to
+specify such properties as units.
+
+Operations supported on variables are:
+- Create a variable, given its name, data type, and shape.
+- Get a variable ID from its name.
+- Get a variable's name, data type, shape, and number of attributes
+  from its ID.
+- Put a data value into a variable, given variable ID, indices, and value.
+- Put an array of values into a variable, given variable ID, corner
+  indices, edge lengths, and a block of values.
+- Put a subsampled or mapped array-section of values into a variable,
+  given variable ID, corner indices, edge lengths, stride vector,
+  index mapping vector, and a block of values.
+- Get a data value from a variable, given variable ID and indices.
+- Get an array of values from a variable, given variable ID, corner
+  indices, and edge lengths.
+- Get a subsampled or mapped array-section of values from a variable,
+  given variable ID, corner indices, edge lengths, stride vector, and
+  index mapping vector.
+- Rename a variable. 
+
+\section language_types Language Types Corresponding to netCDF
+External Data Types
+
+NetCDF supported six atomic data types through version 3.6.0 (char,
+byte, short, int, float, and double). Starting with version 4.0, many
+new atomic and user defined data types are supported (unsigned int
+types, strings, compound types, variable length arrays, enums,
+opaque).
+
+The additional data types are only supported in netCDF-4/HDF5
+files. To create netCDF-4/HDF5 files, use the HDF5 flag in
+nc_create. (see nc_create).
+
+\section classic_types NetCDF-3 Classic and 64-Bit Offset Data Types
+
+NetCDF-3 classic and 64-bit offset files support 6 atomic data types,
+and none of the user defined datatype introduced in NetCDF-4.
+
+The following table gives the netCDF-3 external data types and the
+corresponding type constants for defining variables in the C
+interface:
+
+<table>
+<tr><td>Type</td><td>C define</td><td>Bits</td></tr>
+<tr><td>byte</td><td>NC_BYTE</td><td>8</td></tr>
+<tr><td>char</td><td>NC_CHAR</td><td>8</td></tr>
+<tr><td>short</td><td>NC_SHORT</td><td>16</td></tr>
+<tr><td>int</td><td>NC_INT</td><td>32</td></tr>
+<tr><td>float</td><td>NC_FLOAT</td><td>32</td></tr>
+<tr><td>double</td><td>NC_DOUBLE</td><td>64</td></tr>
+</table>
+
+The first column gives the netCDF external data type, which is the
+same as the CDL data type. The next column gives the corresponding C
+pre-processor macro for use in netCDF functions (the pre-processor
+macros are defined in the netCDF C header-file netcdf.h). The last
+column gives the number of bits used in the external representation of
+values of the corresponding type.
+
+\section netcdf_4_atomic NetCDF-4 Atomic Types
+
+NetCDF-4 files support all of the atomic data types from netCDF-3,
+plus additional unsigned integer types, 64-bit integer types, and a
+string type.
+
+<table>
+<tr><td>Type</td><td>C define</td><td>Bits
+
+<tr><td>byte</td><td>NC_BYTE</td><td>8</td></tr>
+<tr><td>unsigned byte </td><td>NC_UBYTE^</td><td> 8</td></tr>
+<tr><td>char </td><td>NC_CHAR </td><td>8</td></tr>
+<tr><td>short </td><td>NC_SHORT </td><td>16</td></tr>
+<tr><td>unsigned short </td><td>NC_USHORT^ </td><td>16</td></tr>
+<tr><td>int </td><td>NC_INT </td><td>32</td></tr>
+<tr><td>unsigned int </td><td>NC_UINT^ </td><td>32</td></tr>
+<tr><td>unsigned long long </td><td>NC_UINT64^ </td><td>64</td></tr>
+<tr><td>long long </td><td>NC_INT64^ </td><td>64</td></tr>
+<tr><td>float </td><td>NC_FLOAT </td><td>32</td></tr>
+<tr><td>double </td><td>NC_DOUBLE </td><td>64</td></tr>
+<tr><td>char ** </td><td>NC_STRING^ </td><td>string length + 1</td></tr>
+</table>
+
+^This type was introduced in netCDF-4, and is not supported in netCDF
+classic or 64-bit offset format files, or in netCDF-4 files if they
+are created with the NC_CLASSIC_MODEL flags.
+ */
+
+/** \name Defining Variables
+
+Use these functions to define variables.
+ */
+/*! \{ */
+
+/**
+\ingroup variables
+Define a new variable.
+
+This function adds a new variable to an open netCDF dataset or group. 
+It returns (as an argument) a variable ID, given the netCDF ID,
+the variable name, the variable type, the number of dimensions, and a
+list of the dimension IDs.
+
+\param ncid NetCDF or group ID, from a previous call to nc_open(),
+nc_create(), nc_def_grp(), or associated inquiry functions such as 
+nc_inq_ncid().
+
+\param name Variable \ref object_name.
+
+\param xtype \ref data_type of the variable.
+
+\param ndims Number of dimensions for the variable. For example, 2
+specifies a matrix, 1 specifies a vector, and 0 means the variable is
+a scalar with no dimensions. Must not be negative or greater than the
+predefined constant ::NC_MAX_VAR_DIMS.
+
+\param dimidsp Vector of ndims dimension IDs corresponding to the
+variable dimensions. For classic model netCDF files, if the ID of the
+unlimited dimension is included, it must be first. This argument is
+ignored if ndims is 0. For expanded model netCDF4/HDF5 files, there
+may be any number of unlimited dimensions, and they may be used in any
+element of the dimids array.
+
+\param varidp Pointer to location for the returned variable ID.
+
+\returns ::NC_NOERR No error.
+\returns ::NC_EBADID Bad ncid.
+\returns ::NC_ENOTINDEFINE Not in define mode. 
+\returns ::NC_ESTRICTNC3 Attempting netcdf-4 operation on strict nc3 netcdf-4 file.
+\returns ::NC_EMAXVARS NC_MAX_VARS exceeded
+\returns ::NC_EBADTYPE Bad type.
+\returns ::NC_EINVAL Invalid input.
+\returns ::NC_ENAMEINUSE Name already in use.
+\returns ::NC_EPERM Attempt to create object in read-only file. 
+
+\section Example
+
+Here is an example using nc_def_var to create a variable named rh of
+type double with three dimensions, time, lat, and lon in a new netCDF
+dataset named foo.nc:
+
+\code
+     #include <netcdf.h>
+        ...
+     int  status;       
+     int  ncid;          
+     int  lat_dim, lon_dim, time_dim;  
+     int  rh_id;                       
+     int  rh_dimids[3];                
+        ...
+     status = nc_create("foo.nc", NC_NOCLOBBER, &ncid);
+     if (status != NC_NOERR) handle_error(status);
+        ...
+
+     status = nc_def_dim(ncid, "lat", 5L, &lat_dim);
+     if (status != NC_NOERR) handle_error(status);
+     status = nc_def_dim(ncid, "lon", 10L, &lon_dim);
+     if (status != NC_NOERR) handle_error(status);
+     status = nc_def_dim(ncid, "time", NC_UNLIMITED, &time_dim);
+     if (status != NC_NOERR) handle_error(status);
+        ...
+
+     rh_dimids[0] = time_dim;
+     rh_dimids[1] = lat_dim;
+     rh_dimids[2] = lon_dim;
+     status = nc_def_var (ncid, "rh", NC_DOUBLE, 3, rh_dimids, &rh_id);
+     if (status != NC_NOERR) handle_error(status);
+\endcode
+
+ */
+int
+nc_def_var(int ncid, const char *name, nc_type xtype, 
+	   int ndims,  const int *dimidsp, int *varidp)
+{
+   NC* ncp;
+   int stat = NC_NOERR;
+
+   if ((stat = NC_check_id(ncid, &ncp)))
+      return stat;
+   return ncp->dispatch->def_var(ncid, name, xtype, ndims,
+				 dimidsp, varidp);
+}
+/*! \} */
+
+/** \name Rename a Variable
+
+Rename a variable.
+ */
+/*! \{ */
+
+/** Rename a variable.
+\ingroup variables
+
+This function changes the name of a netCDF variable in an open netCDF
+file or group. You cannot rename a variable to have the name of any existing
+variable.
+
+For classic format, 64-bit offset format, and netCDF-4/HDF5 with
+classic mode, if the new name is longer than the old name, the netCDF
+dataset must be in define mode. 
+
+\param ncid NetCDF or group ID, from a previous call to nc_open(),
+nc_create(), nc_def_grp(), or associated inquiry functions such as 
+nc_inq_ncid().
+
+\param varid Variable ID
+
+\param name New name of the variable.
+
+\returns ::NC_NOERR No error.
+\returns ::NC_EBADID Bad ncid.
+\returns ::NC_ENOTVAR Invalid variable ID.
+\returns ::NC_EBADNAME Bad name.
+\returns ::NC_EMAXNAME Name is too long.
+\returns ::NC_ENAMEINUSE Name in use.
+\returns ::NC_ENOMEM Out of memory.
+
+\section Example
+
+Here is an example using nc_rename_var to rename the variable rh to
+rel_hum in an existing netCDF dataset named foo.nc:
+
+\code
+     #include <netcdf.h>
+        ...
+     int  status; 
+     int  ncid;   
+     int  rh_id;  
+        ...
+     status = nc_open("foo.nc", NC_WRITE, &ncid);
+     if (status != NC_NOERR) handle_error(status);
+        ...
+     status = nc_redef(ncid); 
+     if (status != NC_NOERR) handle_error(status);
+     status = nc_inq_varid (ncid, "rh", &rh_id);
+     if (status != NC_NOERR) handle_error(status);
+     status = nc_rename_var (ncid, rh_id, "rel_hum");
+     if (status != NC_NOERR) handle_error(status);
+     status = nc_enddef(ncid);
+     if (status != NC_NOERR) handle_error(status);
+\endcode
+
+*/
+int
+nc_rename_var(int ncid, int varid, const char *name)
+{
+   NC* ncp;
+   int stat = NC_check_id(ncid, &ncp);
+   if(stat != NC_NOERR) return stat;
+   return ncp->dispatch->rename_var(ncid, varid, name);
+}
+/*! \} */
+
+/** \internal
+\ingroup variables
+ */
+int
+NC_is_recvar(int ncid, int varid, size_t* nrecs)
+{
+   int status = NC_NOERR;
+   int unlimid;
+   int ndims;
+   int dimset[NC_MAX_VAR_DIMS];
+    
+   status = nc_inq_unlimdim(ncid,&unlimid);
+   if(status != NC_NOERR) return 0; /* no unlimited defined */
+   status = nc_inq_varndims(ncid,varid,&ndims);
+   if(status != NC_NOERR) return 0; /* no unlimited defined */
+   if(ndims == 0) return 0; /* scalar */
+   status = nc_inq_vardimid(ncid,varid,dimset);
+   if(status != NC_NOERR) return 0; /* no unlimited defined */
+   status = nc_inq_dim(ncid,dimset[0],NULL,nrecs);
+   if(status != NC_NOERR) return 0;
+   return (dimset[0] == unlimid ? 1: 0);
+}
+
+/* Ok to use NC pointers because
+   all IOSP's will use that structure,
+   but not ok to use e.g. NC_Var pointers
+   because they may be different structure
+   entirely.
+*/
+
+/** \internal
+\ingroup variables
+Find the length of a type. This is how much space is required by the user, as in
+\code
+vals = malloc(nel * nctypelen(var.type));
+ncvarget(cdfid, varid, cor, edg, vals);
+\endcode
+ */
+int
+nctypelen(nc_type type) 
+{
+   switch(type){
+      case NC_CHAR :
+	 return((int)sizeof(char));
+      case NC_BYTE :
+	 return((int)sizeof(signed char));
+      case NC_SHORT :
+	 return(int)(sizeof(short));
+      case NC_INT :
+	 return((int)sizeof(int));
+      case NC_FLOAT :
+	 return((int)sizeof(float));
+      case NC_DOUBLE : 
+	 return((int)sizeof(double));
+
+	 /* These can occur in netcdf-3 code */ 
+      case NC_UBYTE :
+	 return((int)sizeof(unsigned char));
+      case NC_USHORT :
+	 return((int)(sizeof(unsigned short)));
+      case NC_UINT :
+	 return((int)sizeof(unsigned int));
+      case NC_INT64 :
+	 return((int)sizeof(signed long long));
+      case NC_UINT64 :
+	 return((int)sizeof(unsigned long long));
+#ifdef USE_NETCDF4
+      case NC_STRING :
+	 return((int)sizeof(char*));
+#endif /*USE_NETCDF4*/
+
+      default:
+	 return -1;
+   }
+}
+
+/** \internal
+\ingroup variables
+Find the length of a type. Redunant over nctypelen() above. */
+int
+NC_atomictypelen(nc_type xtype)
+{
+   int sz = 0;
+   switch(xtype) {
+      case NC_NAT: sz = 0; break;
+      case NC_BYTE: sz = sizeof(signed char); break;
+      case NC_CHAR: sz = sizeof(char); break;
+      case NC_SHORT: sz = sizeof(short); break;
+      case NC_INT: sz = sizeof(int); break;
+      case NC_FLOAT: sz = sizeof(float); break;
+      case NC_DOUBLE: sz = sizeof(double); break;
+      case NC_INT64: sz = sizeof(signed long long); break;
+      case NC_UBYTE: sz = sizeof(unsigned char); break;
+      case NC_USHORT: sz = sizeof(unsigned short); break;
+      case NC_UINT: sz = sizeof(unsigned int); break;
+      case NC_UINT64: sz = sizeof(unsigned long long); break;
+#ifdef USE_NETCDF4
+      case NC_STRING: sz = sizeof(char*); break;
+#endif
+      default: break;
+   }	
+   return sz;
+}
+
+/** \internal
+\ingroup variables
+    Get the type name. */
+char *
+NC_atomictypename(nc_type xtype)
+{
+   char* nm = NULL;
+   switch(xtype) {
+      case NC_NAT: nm = "undefined"; break;
+      case NC_BYTE: nm = "byte"; break;
+      case NC_CHAR: nm = "char"; break;
+      case NC_SHORT: nm = "short"; break;
+      case NC_INT: nm = "int"; break;
+      case NC_FLOAT: nm = "float"; break;
+      case NC_DOUBLE: nm = "double"; break;
+      case NC_INT64: nm = "int64"; break;
+      case NC_UBYTE: nm = "ubyte"; break;
+      case NC_USHORT: nm = "ushort"; break;
+      case NC_UINT: nm = "uint"; break;
+      case NC_UINT64: nm = "uint64"; break;
+#ifdef USE_NETCDF4
+      case NC_STRING: nm = "string"; break;
+#endif
+      default: break;
+   }	
+   return nm;
+}
+
+/** \internal
+\ingroup variables
+Get the shape of a variable.    
+ */
+int
+NC_getshape(int ncid, int varid, int ndims, size_t* shape)
+{
+   int dimids[NC_MAX_VAR_DIMS];
+   int i;
+   int status = NC_NOERR;
+
+   if ((status = nc_inq_vardimid(ncid, varid, dimids)))
+      return status;
+   for(i = 0; i < ndims; i++) 
+      if ((status = nc_inq_dimlen(ncid, dimids[i], &shape[i])))
+	 break;
+
+   return status;
+}
+
+#ifdef USE_NETCDF4
+/** \ingroup variables
+
+\param ncid NetCDF or group ID, from a previous call to nc_open(),
+nc_create(), nc_def_grp(), or associated inquiry functions such as 
+nc_inq_ncid().
+
+\param varid Variable ID
+
+\param size The total size of the raw data chunk cache, in bytes.
+
+\param nelems The number of chunk slots in the raw data chunk cache.
+
+\param preemption The preemption, a value between 0 and 1 inclusive
+that indicates how much chunks that have been fully read are favored
+for preemption. A value of zero means fully read chunks are treated no
+differently than other chunks (the preemption is strictly LRU) while a
+value of one means fully read chunks are always preempted before other
+chunks.
+
+\returns ::NC_NOERR No error.
+\returns ::NC_EBADID Bad ncid.
+\returns ::NC_ENOTVAR Invalid variable ID.
+\returns ::NC_ESTRICTNC3 Attempting netcdf-4 operation on strict nc3 netcdf-4 file.
+\returns ::NC_EINVAL Invalid input
+ */
+int
+nc_set_var_chunk_cache(int ncid, int varid, size_t size, size_t nelems, 
+		       float preemption)
+{
+    NC* ncp;
+    int stat = NC_check_id(ncid, &ncp);
+    if(stat != NC_NOERR) return stat;
+    return ncp->dispatch->set_var_chunk_cache(ncid, varid, size, 
+					      nelems, preemption);
+}
+
+/** \ingroup variables
+
+\param ncid NetCDF or group ID, from a previous call to nc_open(),
+nc_create(), nc_def_grp(), or associated inquiry functions such as 
+nc_inq_ncid().
+
+\param varid Variable ID
+
+\param sizep The total size of the raw data chunk cache, in bytes,
+will be put here. \ref ignored_if_null.
+
+\param nelemsp The number of chunk slots in the raw data chunk cache
+hash table will be put here. \ref ignored_if_null.
+
+\param preemptionp The preemption will be put here. The preemtion
+value is between 0 and 1 inclusive and indicates how much chunks that
+have been fully read are favored for preemption. A value of zero means
+fully read chunks are treated no differently than other chunks (the
+preemption is strictly LRU) while a value of one means fully read
+chunks are always preempted before other chunks. \ref ignored_if_null.
+
+\returns ::NC_NOERR No error.
+\returns ::NC_EBADID Bad ncid.
+\returns ::NC_ENOTVAR Invalid variable ID.
+\returns ::NC_ESTRICTNC3 Attempting netcdf-4 operation on strict nc3 netcdf-4 file.
+\returns ::NC_EINVAL Invalid input
+*/
+int
+nc_get_var_chunk_cache(int ncid, int varid, size_t *sizep, size_t *nelemsp, 
+		       float *preemptionp)
+{
+    NC* ncp;
+    int stat = NC_check_id(ncid, &ncp);
+    if(stat != NC_NOERR) return stat;
+    return ncp->dispatch->get_var_chunk_cache(ncid, varid, sizep,
+					      nelemsp, preemptionp);
+}
+
+/** \ingroup variables
+Free string space allocated by the library.
+
+When you read string type the library will allocate the storage space
+for the data. This storage space must be freed, so pass the pointer
+back to this function, when you're done with the data, and it will
+free the string memory. 
+
+\param len The number of character arrays in the array. 
+\param data The pointer to the data array. 
+
+\returns ::NC_NOERR No error.
+*/
+int
+nc_free_string(size_t len, char **data)
+{
+   int i;
+   for (i = 0; i < len; i++)
+      free(data[i]);
+   return NC_NOERR;
+}
+
+int
+nc_def_var_deflate(int ncid, int varid, int shuffle, int deflate, int deflate_level)
+{
+    NC* ncp;
+    int stat = NC_check_id(ncid,&ncp);
+    if(stat != NC_NOERR) return stat;
+    return ncp->dispatch->def_var_deflate(ncid,varid,shuffle,deflate,deflate_level);
+}
+
+int
+nc_def_var_fletcher32(int ncid, int varid, int fletcher32)
+{
+    NC* ncp;
+    int stat = NC_check_id(ncid,&ncp);
+    if(stat != NC_NOERR) return stat;
+    return ncp->dispatch->def_var_fletcher32(ncid,varid,fletcher32);
+}
+
+int
+nc_def_var_chunking(int ncid, int varid, int storage, 
+		    const size_t *chunksizesp)
+{
+    NC* ncp;
+    int stat = NC_check_id(ncid, &ncp);
+    if(stat != NC_NOERR) return stat;
+    return ncp->dispatch->def_var_chunking(ncid, varid, storage, 
+					   chunksizesp);
+}
+
+int
+nc_def_var_fill(int ncid, int varid, int no_fill, const void *fill_value)
+{
+    NC* ncp;
+    int stat = NC_check_id(ncid,&ncp);
+    if(stat != NC_NOERR) return stat;
+    return ncp->dispatch->def_var_fill(ncid,varid,no_fill,fill_value);
+}
+
+int
+nc_def_var_endian(int ncid, int varid, int endian)
+{
+    NC* ncp;
+    int stat = NC_check_id(ncid,&ncp);
+    if(stat != NC_NOERR) return stat;
+    return ncp->dispatch->def_var_endian(ncid,varid,endian);
+}
+
+#endif /* USE_NETCDF4 */
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/src_netcdf4/dvarget.c
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/src_netcdf4/dvarget.c	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/src_netcdf4/dvarget.c	(revision 1749)
@@ -0,0 +1,1432 @@
+/*! \file
+Functions for getting data from variables.
+
+Copyright 2011 University Corporation for Atmospheric
+Research/Unidata. See \ref COPYRIGHT file for more info. */
+
+#include "ncdispatch.h"
+
+
+/** \internal
+\ingroup variables 
+
+ */
+int
+NC_get_vara(int ncid, int varid,
+	    const size_t *start, const size_t *edges,
+            void *value, nc_type memtype)
+{
+   NC* ncp;
+   int stat = NC_check_id(ncid, &ncp);
+   if(stat != NC_NOERR) return stat;
+#ifdef USE_NETCDF4
+   if(memtype >= NC_FIRSTUSERTYPEID) memtype = NC_NAT;
+#endif
+   if(edges == NULL) {
+      size_t shape[NC_MAX_VAR_DIMS];
+      int ndims;
+      stat = nc_inq_varndims(ncid, varid, &ndims); 
+      if(stat != NC_NOERR) return stat;
+      stat = NC_getshape(ncid,varid,ndims,shape);
+      if(stat != NC_NOERR) return stat;
+      return ncp->dispatch->get_vara(ncid,varid,start,shape,value,memtype);
+   } else
+      return ncp->dispatch->get_vara(ncid,varid,start,edges,value,memtype);
+}
+
+/** \ingroup variables 
+\internal
+ */
+static int
+NC_get_var(int ncid, int varid, void *value, nc_type memtype)
+{
+   int ndims;
+   size_t shape[NC_MAX_VAR_DIMS];
+   int stat = nc_inq_varndims(ncid,varid, &ndims);
+   if(stat) return stat;
+   stat = NC_getshape(ncid,varid, ndims, shape);
+   if(stat) return stat;
+   return NC_get_vara(ncid, varid, NC_coord_zero, shape, value, memtype);
+}
+
+/** \internal
+\ingroup variables 
+ Most dispatch tables will use the default procedures
+*/
+int
+NCDEFAULT_get_vars(int ncid, int varid, const size_t * start,
+	    const size_t * edges, const ptrdiff_t * stride,
+	    void *value, nc_type memtype)
+{
+   NC* ncp;
+   int stat = NC_check_id(ncid, &ncp);
+
+   if(stat != NC_NOERR) return stat;
+   return ncp->dispatch->get_varm(ncid,varid,start,edges,stride,NULL,value,memtype);
+}
+
+/** \internal
+\ingroup variables 
+ */
+static int
+NC_get_var1(int ncid, int varid, const size_t *coord, void* value, 
+	    nc_type memtype)
+{
+   return NC_get_vara(ncid, varid, coord, NC_coord_one, value, memtype);
+}
+
+/** \internal
+\ingroup variables 
+ */
+int
+NCDEFAULT_get_varm(int ncid, int varid, const size_t *start,
+	    const size_t *edges, const ptrdiff_t *stride,
+	    const ptrdiff_t *imapp, void *value0, nc_type memtype)
+{
+   int status = NC_NOERR;
+   nc_type vartype = NC_NAT;
+   int varndims,maxidim;
+   NC* ncp;
+   size_t memtypelen;
+   ptrdiff_t cvtmap[NC_MAX_VAR_DIMS];
+   char* value = (char*)value0;
+
+   status = NC_check_id (ncid, &ncp);
+   if(status != NC_NOERR) return status;
+
+/*
+  if(NC_indef(ncp)) return NC_EINDEFINE;
+*/
+
+   status = nc_inq_vartype(ncid, varid, &vartype); 
+   if(status != NC_NOERR) return status;
+   /* Check that this is an atomic type */
+   if(vartype >= NC_MAX_ATOMIC_TYPE)
+	return NC_EMAPTYPE;
+
+   status = nc_inq_varndims(ncid, varid, &varndims); 
+   if(status != NC_NOERR) return status;
+
+   if(memtype == NC_NAT) {
+      if(imapp != NULL && varndims != 0) {
+	 /*
+	  * convert map units from bytes to units of sizeof(type)
+	  */
+	 size_t ii;
+	 const ptrdiff_t szof = (ptrdiff_t) nctypelen(vartype);
+	 for(ii = 0; ii < varndims; ii++) {
+	    if(imapp[ii] % szof != 0) {
+	       /*free(cvtmap);*/
+	       return NC_EINVAL;
+	    }
+	    cvtmap[ii] = imapp[ii] / szof;
+	 }
+	 imapp = cvtmap;
+      }
+      memtype = vartype;
+   }
+
+   if(memtype == NC_CHAR && vartype != NC_CHAR)
+      return NC_ECHAR;
+   else if(memtype != NC_CHAR && vartype == NC_CHAR)  
+      return NC_ECHAR;
+
+   memtypelen = nctypelen(memtype);
+
+   maxidim = (int) varndims - 1;
+
+   if (maxidim < 0)
+   {
+      /*
+       * The variable is a scalar; consequently,
+       * there s only one thing to get and only one place to put it.
+       * (Why was I called?)
+       */
+      size_t edge1[1] = {1};
+      return NC_get_vara(ncid, varid, start, edge1, value, memtype);
+   }
+
+   /*
+    * else
+    * The variable is an array.
+    */
+   {
+      int idim;
+      size_t *mystart = NULL;
+      size_t *myedges;
+      size_t *iocount;    /* count vector */
+      size_t *stop;   /* stop indexes */
+      size_t *length; /* edge lengths in bytes */
+      ptrdiff_t *mystride;
+      ptrdiff_t *mymap;
+      size_t varshape[NC_MAX_VAR_DIMS];
+      int isrecvar;
+      size_t numrecs;
+
+      /* Compute some dimension related values */
+      isrecvar = NC_is_recvar(ncid,varid,&numrecs);
+      NC_getshape(ncid,varid,varndims,varshape);	
+
+      /*
+       * Verify stride argument; also see if stride is all ones
+       */
+      if(stride != NULL) {
+	 int stride1 = 1;
+	 for (idim = 0; idim <= maxidim; ++idim)
+	 {
+            if (stride[idim] == 0
+		/* cast needed for braindead systems with signed size_t */
+                || ((unsigned long) stride[idim] >= X_INT_MAX))
+            {
+	       return NC_ESTRIDE;
+            }
+	    if(stride[idim] != 1) stride1 = 0;
+	 }
+         /* If stride1 is true, and there is no imap 
+            then call get_vara directly.
+         */
+         if(stride1 && imapp == NULL) {
+	     return NC_get_vara(ncid, varid, start, edges, value, memtype);
+	 }
+      }
+
+      /* assert(sizeof(ptrdiff_t) >= sizeof(size_t)); */
+      /* Allocate space for mystart,mystride,mymap etc.all at once */
+      mystart = (size_t *)calloc(varndims * 7, sizeof(ptrdiff_t));
+      if(mystart == NULL) return NC_ENOMEM;
+      myedges = mystart + varndims;
+      iocount = myedges + varndims;
+      stop = iocount + varndims;
+      length = stop + varndims;
+      mystride = (ptrdiff_t *)(length + varndims);
+      mymap = mystride + varndims;
+
+      /*
+       * Initialize I/O parameters.
+       */
+      for (idim = maxidim; idim >= 0; --idim)
+      {
+	 mystart[idim] = start != NULL
+	    ? start[idim]
+	    : 0;
+
+	 if (edges != NULL && edges[idim] == 0)
+	 {
+	    status = NC_NOERR;    /* read/write no data */
+	    goto done;
+	 }
+
+#ifdef COMPLEX
+	 myedges[idim] = edges != NULL
+	    ? edges[idim]
+	    : idim == 0 && isrecvar
+	    ? numrecs - mystart[idim]
+	    : varshape[idim] - mystart[idim];
+#else
+	 if(edges != NULL)
+	    myedges[idim] = edges[idim];
+	 else if (idim == 0 && isrecvar)
+	    myedges[idim] = numrecs - mystart[idim];
+	 else
+	    myedges[idim] = varshape[idim] - mystart[idim];
+#endif
+
+	 mystride[idim] = stride != NULL
+	    ? stride[idim]
+	    : 1;
+
+	 /* Remember: imapp is byte oriented, not index oriented */
+#ifdef COMPLEX
+	 mymap[idim] = (imapp != NULL
+			? imapp[idim]
+			: (idim == maxidim ? 1
+			   : mymap[idim + 1] * (ptrdiff_t) myedges[idim + 1]));
+#else
+	 if(imapp != NULL)
+	    mymap[idim] = imapp[idim];
+	 else if (idim == maxidim)
+	    mymap[idim] = 1;
+	 else
+	    mymap[idim] = 
+	       mymap[idim + 1] * (ptrdiff_t) myedges[idim + 1];
+#endif
+	 iocount[idim] = 1;
+	 length[idim] = mymap[idim] * myedges[idim];
+	 stop[idim] = mystart[idim] + myedges[idim] * mystride[idim];
+      }
+
+      /*
+       * Check start, edges
+       */
+      for (idim = maxidim; idim >= 0; --idim)
+      {
+	 size_t dimlen = 
+	    idim == 0 && isrecvar
+	    ? numrecs
+	    : varshape[idim];
+	 if (mystart[idim] >= dimlen)
+	 {
+	    status = NC_EINVALCOORDS;
+	    goto done;
+	 }
+
+	 if (mystart[idim] + myedges[idim] > dimlen)
+	 {
+	    status = NC_EEDGE;
+	    goto done;
+	 }
+
+      }
+
+
+      /* Lower body */
+      /*
+       * As an optimization, adjust I/O parameters when the fastest 
+       * dimension has unity stride both externally and internally.
+       * In this case, the user could have called a simpler routine
+       * (i.e. ncvar$1()
+       */
+      if (mystride[maxidim] == 1
+	  && mymap[maxidim] == 1)
+      {
+	 iocount[maxidim] = myedges[maxidim];
+	 mystride[maxidim] = (ptrdiff_t) myedges[maxidim];
+	 mymap[maxidim] = (ptrdiff_t) length[maxidim];
+      }
+
+      /* 
+       * Perform I/O.  Exit when done.
+       */
+      for (;;)
+      {
+	 /* TODO: */
+	 int lstatus = NC_get_vara(ncid, varid, mystart, iocount,
+				   value, memtype);
+	 if (lstatus != NC_NOERR) {
+	    if(status == NC_NOERR || lstatus != NC_ERANGE)
+	       status = lstatus;
+	 }
+	 /*
+	  * The following code permutes through the variable s
+	  * external start-index space and it s internal address
+	  * space.  At the UPC, this algorithm is commonly
+	  * called "odometer code".
+	  */
+	 idim = maxidim;
+        carry:
+	 value += (mymap[idim] * memtypelen);
+	 mystart[idim] += mystride[idim];
+	 if (mystart[idim] == stop[idim])
+	 {
+	    mystart[idim] = start[idim];
+	    value -= (length[idim] * memtypelen);
+	    if (--idim < 0)
+	       break; /* normal return */
+	    goto carry;
+	 }
+      } /* I/O loop */
+     done:
+      free(mystart);
+   } /* variable is array */
+   return status;
+}
+
+/** \ingroup variables 
+\internal
+Called by externally visible nc_get_vars_xxx routines */
+static int
+NC_get_vars(int ncid, int varid, const size_t *start, 
+	    const size_t *edges, const ptrdiff_t *stride, void *value,
+	    nc_type memtype)
+{
+   NC* ncp;
+   int stat = NC_check_id(ncid, &ncp);
+
+   if(stat != NC_NOERR) return stat;
+#ifdef USE_NETCDF4
+   if(memtype >= NC_FIRSTUSERTYPEID) memtype = NC_NAT;
+#endif
+   return ncp->dispatch->get_vars(ncid,varid,start,edges,stride,value,memtype);
+}
+
+/** \ingroup variables 
+\internal
+Called by externally visible nc_get_varm_xxx routines 
+ */
+static int
+NC_get_varm(int ncid, int varid, const size_t *start, 
+	    const size_t *edges, const ptrdiff_t *stride, const ptrdiff_t* map,
+	    void *value, nc_type memtype)
+{
+   NC* ncp;
+   int stat = NC_check_id(ncid, &ncp);
+
+   if(stat != NC_NOERR) return stat;
+#ifdef USE_NETCDF4
+   if(memtype >= NC_FIRSTUSERTYPEID) memtype = NC_NAT;
+#endif
+   return ncp->dispatch->get_varm(ncid,varid,start,edges,stride,map,value,memtype);
+}
+
+/** \name Reading Data from Variables
+
+Functions to read data from variables. */
+/*! \{ */ /* All these functions are part of this named group... */
+
+/** \ingroup variables
+Read an array of values from a variable. 
+
+The array to be read is specified by giving a corner and a vector of
+edge lengths to \ref specify_hyperslab. 
+
+The data values are read into consecutive locations with the last
+dimension varying fastest. The netCDF dataset must be in data mode
+(for netCDF-4/HDF5 files, the switch to data mode will happen
+automatically, unless the classic model is used).
+
+The nc_get_vara() function will read a variable of any type,
+including user defined type. For this function, the type of the data
+in memory must match the type of the variable - no data conversion is
+done.
+
+Other nc_get_vara_ functions will convert data to the desired output
+type as needed.
+
+\param ncid NetCDF or group ID, from a previous call to nc_open(),
+nc_create(), nc_def_grp(), or associated inquiry functions such as 
+nc_inq_ncid().
+
+\param varid Variable ID
+
+\param startp Start vector with one element for each dimension to \ref
+specify_hyperslab.
+
+\param countp Count vector with one element for each dimension to \ref
+specify_hyperslab.
+
+\param ip Pointer where the data will be copied. Memory must be
+allocated by the user before this function is called.
+
+\returns ::NC_NOERR No error.
+\returns ::NC_ENOTVAR Variable not found.
+\returns ::NC_EINVALCOORDS Index exceeds dimension bound.
+\returns ::NC_EEDGE Start+count exceeds dimension bound.
+\returns ::NC_ERANGE One or more of the values are out of range.
+\returns ::NC_EINDEFINE Operation not allowed in define mode.
+\returns ::NC_EBADID Bad ncid.
+
+\section Example
+
+Here is an example using nc_get_vara_double() to read all the values of
+the variable named rh from an existing netCDF dataset named
+foo.nc. For simplicity in this example, we assume that we know that rh
+is dimensioned with time, lat, and lon, and that there are three time
+values, five lat values, and ten lon values.
+
+\code
+     #include <netcdf.h>
+        ...
+     #define TIMES 3
+     #define LATS 5
+     #define LONS 10
+     int  status;                      
+     int ncid;                         
+     int rh_id;                        
+     static size_t start[] = {0, 0, 0};
+     static size_t count[] = {TIMES, LATS, LONS};
+     double rh_vals[TIMES*LATS*LONS]; 
+        ...
+     status = nc_open("foo.nc", NC_NOWRITE, &ncid);
+     if (status != NC_NOERR) handle_error(status);
+        ...
+     status = nc_inq_varid (ncid, "rh", &rh_id);
+     if (status != NC_NOERR) handle_error(status);
+        ...
+     status = nc_get_vara_double(ncid, rh_id, start, count, rh_vals);
+     if (status != NC_NOERR) handle_error(status);
+\endcode
+ */
+/**@{*/
+int
+nc_get_vara(int ncid, int varid, const size_t *startp, 
+	    const size_t *countp, void *ip)
+{
+   NC* ncp = NULL;
+   nc_type xtype = NC_NAT;
+   int stat = NC_check_id(ncid, &ncp);
+   if(stat != NC_NOERR) return stat;
+   stat = nc_inq_vartype(ncid, varid, &xtype);
+   if(stat != NC_NOERR) return stat;
+   return NC_get_vara(ncid, varid, startp, countp, ip, xtype);
+}
+
+int
+nc_get_vara_text(int ncid, int varid, const size_t *startp, 
+		 const size_t *countp, char *ip)
+{
+   NC* ncp;
+   int stat = NC_check_id(ncid, &ncp);
+   if(stat != NC_NOERR) return stat;
+   return NC_get_vara(ncid, varid, startp, countp, 
+		      (void *)ip, NC_CHAR);
+}
+
+int
+nc_get_vara_schar(int ncid, int varid, const size_t *startp, 
+		  const size_t *countp, signed char *ip)
+{
+   NC* ncp;
+   int stat = NC_check_id(ncid, &ncp);
+   if(stat != NC_NOERR) return stat;
+   return NC_get_vara(ncid, varid, startp, countp, 
+		      (void *)ip, NC_BYTE);
+}
+
+int
+nc_get_vara_uchar(int ncid, int varid, const size_t *startp, 
+		  const size_t *countp, unsigned char *ip)
+{
+   NC* ncp;
+   int stat = NC_check_id(ncid, &ncp);
+   if(stat != NC_NOERR) return stat;
+   return NC_get_vara(ncid, varid, startp, countp, 
+		      (void *)ip, T_uchar);
+}
+
+int
+nc_get_vara_short(int ncid, int varid, const size_t *startp, 
+		  const size_t *countp, short *ip)
+{
+   NC* ncp;
+   int stat = NC_check_id(ncid, &ncp);
+   if(stat != NC_NOERR) return stat;
+   return NC_get_vara(ncid, varid, startp, countp, 
+		      (void *)ip, NC_SHORT);
+}
+
+int
+nc_get_vara_int(int ncid, int varid,
+		const size_t *startp, const size_t *countp, int *ip)
+{
+   NC* ncp;
+   int stat = NC_check_id(ncid, &ncp);
+   if(stat != NC_NOERR) return stat;
+   return NC_get_vara(ncid,varid,startp,countp, (void *)ip,NC_INT);
+}
+
+int
+nc_get_vara_long(int ncid, int varid,
+		 const size_t *startp, const size_t *countp, long *ip)
+{
+   NC* ncp;
+   int stat = NC_check_id(ncid, &ncp);
+   if(stat != NC_NOERR) return stat;
+   return NC_get_vara(ncid,varid,startp,countp, (void *)ip,T_long);
+}
+
+int
+nc_get_vara_float(int ncid, int varid,
+		  const size_t *startp, const size_t *countp, float *ip)
+{
+   NC* ncp;
+   int stat = NC_check_id(ncid, &ncp);
+   if(stat != NC_NOERR) return stat;
+   return NC_get_vara(ncid,varid,startp,countp, (void *)ip,T_float);
+}
+
+
+int
+nc_get_vara_double(int ncid, int varid, const size_t *startp, 
+		   const size_t *countp, double *ip)
+{
+   NC* ncp;
+   int stat = NC_check_id(ncid, &ncp);
+   if(stat != NC_NOERR) return stat;
+   return NC_get_vara(ncid,varid,startp,countp, (void *)ip,T_double);
+}
+
+int
+nc_get_vara_ubyte(int ncid, int varid,
+		  const size_t *startp, const size_t *countp, unsigned char *ip)
+{
+   NC* ncp;
+   int stat = NC_check_id(ncid, &ncp);
+   if(stat != NC_NOERR) return stat;
+   return NC_get_vara(ncid,varid,startp,countp, (void *)ip,T_ubyte);
+}
+
+int
+nc_get_vara_ushort(int ncid, int varid,
+		   const size_t *startp, const size_t *countp, unsigned short *ip)
+{
+   NC* ncp;
+   int stat = NC_check_id(ncid, &ncp);
+   if(stat != NC_NOERR) return stat;
+   return NC_get_vara(ncid,varid,startp,countp, (void *)ip,T_ushort);
+}
+
+int
+nc_get_vara_uint(int ncid, int varid,
+		 const size_t *startp, const size_t *countp, unsigned int *ip)
+{
+   NC* ncp;
+   int stat = NC_check_id(ncid, &ncp);
+   if(stat != NC_NOERR) return stat;
+   return NC_get_vara(ncid,varid,startp,countp, (void *)ip,T_uint);
+}
+
+int
+nc_get_vara_longlong(int ncid, int varid,
+		     const size_t *startp, const size_t *countp, long long *ip)
+{
+   NC* ncp;
+   int stat = NC_check_id(ncid, &ncp);
+   if(stat != NC_NOERR) return stat;
+   return NC_get_vara(ncid,varid,startp,countp, (void *)ip,T_longlong);
+}
+
+int
+nc_get_vara_ulonglong(int ncid, int varid,
+		      const size_t *startp, const size_t *countp, unsigned long long *ip)
+{
+   NC* ncp;
+   int stat = NC_check_id(ncid, &ncp);
+   if(stat != NC_NOERR) return stat;
+   return NC_get_vara(ncid,varid,startp,countp, (void *)ip,NC_UINT64);
+}
+
+#ifdef USE_NETCDF4
+int
+nc_get_vara_string(int ncid, int varid,
+		   const size_t *startp, const size_t *countp, char* *ip)
+{
+   NC* ncp;
+   int stat = NC_check_id(ncid, &ncp);
+   if(stat != NC_NOERR) return stat;
+   return NC_get_vara(ncid,varid,startp,countp, (void *)ip,NC_STRING);
+}
+
+#endif /*USE_NETCDF4*/
+/**@}*/
+
+/** \ingroup variables
+Read a single datum from a variable. 
+
+Inputs are the netCDF ID, the variable ID, a multidimensional index
+that specifies which value to get, and the address of a location into
+which the data value will be read. The value is converted from the
+external data type of the variable, if necessary.
+
+The nc_get_var1() function will read a variable of any type, including
+user defined type. For this function, the type of the data in memory
+must match the type of the variable - no data conversion is done.
+
+Other nc_get_var1_ functions will convert data to the desired output
+type as needed.
+
+\param ncid NetCDF or group ID, from a previous call to nc_open(),
+nc_create(), nc_def_grp(), or associated inquiry functions such as 
+nc_inq_ncid().
+
+\param varid Variable ID
+
+\param indexp Index vector with one element for each dimension.
+
+\param ip Pointer where the data will be copied. Memory must be
+allocated by the user before this function is called.
+
+\returns ::NC_NOERR No error.
+\returns ::NC_ENOTVAR Variable not found.
+\returns ::NC_EINVALCOORDS Index exceeds dimension bound.
+\returns ::NC_ERANGE One or more of the values are out of range.
+\returns ::NC_EINDEFINE Operation not allowed in define mode.
+\returns ::NC_EBADID Bad ncid.
+*/
+/** \{ */
+int
+nc_get_var1(int ncid, int varid, const size_t *indexp, void *ip)
+{
+   return NC_get_var1(ncid, varid, indexp, ip, NC_NAT);
+}
+
+int
+nc_get_var1_text(int ncid, int varid, const size_t *indexp, char *ip)
+{
+   NC* ncp;
+   int stat = NC_check_id(ncid, &ncp);
+   if(stat != NC_NOERR) return stat;
+   return NC_get_var1(ncid, varid, indexp, (void *)ip, NC_CHAR);
+}
+
+int
+nc_get_var1_schar(int ncid, int varid, const size_t *indexp, signed char *ip)
+{
+   NC* ncp;
+   int stat = NC_check_id(ncid, &ncp);
+   if(stat != NC_NOERR) return stat;
+   return NC_get_var1(ncid, varid, indexp, (void *)ip, NC_BYTE);
+}
+
+int
+nc_get_var1_uchar(int ncid, int varid, const size_t *indexp, unsigned char *ip)
+{
+   NC* ncp;
+   int stat = NC_check_id(ncid, &ncp);
+   if(stat != NC_NOERR) return stat;
+   return NC_get_var1(ncid, varid, indexp, (void *)ip, NC_UBYTE);
+}
+
+int
+nc_get_var1_short(int ncid, int varid, const size_t *indexp, short *ip)
+{
+   NC* ncp;
+   int stat = NC_check_id(ncid, &ncp);
+   if(stat != NC_NOERR) return stat;
+   return NC_get_var1(ncid, varid, indexp, (void *)ip, NC_SHORT);
+}
+
+int
+nc_get_var1_int(int ncid, int varid, const size_t *indexp, int *ip)
+{
+   NC* ncp;
+   int stat = NC_check_id(ncid, &ncp);
+   if(stat != NC_NOERR) return stat;
+   return NC_get_var1(ncid, varid, indexp, (void *)ip, NC_INT);
+}
+
+int
+nc_get_var1_long(int ncid, int varid, const size_t *indexp, 
+		 long *ip)
+{
+   NC* ncp;
+   int stat = NC_check_id(ncid, &ncp);
+   if(stat != NC_NOERR) return stat;
+   return NC_get_var1(ncid, varid, indexp, (void *)ip, longtype);
+}
+
+int
+nc_get_var1_float(int ncid, int varid, const size_t *indexp, 
+		  float *ip)
+{
+   NC* ncp;
+   int stat = NC_check_id(ncid, &ncp);
+   if(stat != NC_NOERR) return stat;
+   return NC_get_var1(ncid, varid, indexp, (void *)ip, NC_FLOAT);
+}
+
+int
+nc_get_var1_double(int ncid, int varid, const size_t *indexp, 
+		   double *ip)
+{
+   NC* ncp;
+   int stat = NC_check_id(ncid, &ncp);
+   if(stat != NC_NOERR) return stat;
+   return NC_get_var1(ncid, varid, indexp, (void *)ip, NC_DOUBLE);
+}
+
+int
+nc_get_var1_ubyte(int ncid, int varid, const size_t *indexp, 
+		  unsigned char *ip)
+{
+   NC* ncp;
+   int stat = NC_check_id(ncid, &ncp);
+   if(stat != NC_NOERR) return stat;
+   return NC_get_var1(ncid, varid, indexp, (void *)ip, NC_UBYTE);
+}
+
+int
+nc_get_var1_ushort(int ncid, int varid, const size_t *indexp, 
+		   unsigned short *ip)
+{
+   NC* ncp;
+   int stat = NC_check_id(ncid, &ncp);
+   if(stat != NC_NOERR) return stat;
+   return NC_get_var1(ncid, varid, indexp, (void *)ip, NC_USHORT);
+}
+
+int
+nc_get_var1_uint(int ncid, int varid, const size_t *indexp, 
+		 unsigned int *ip)
+{
+   NC* ncp;
+   int stat = NC_check_id(ncid, &ncp);
+   if(stat != NC_NOERR) return stat;
+   return NC_get_var1(ncid, varid, indexp, (void *)ip, NC_INT);
+}
+
+int
+nc_get_var1_longlong(int ncid, int varid, const size_t *indexp, 
+		     long long *ip)
+{
+   NC* ncp;
+   int stat = NC_check_id(ncid, &ncp);
+   if(stat != NC_NOERR) return stat;
+   return NC_get_var1(ncid, varid, indexp, (void *)ip, NC_INT64);
+}
+
+int
+nc_get_var1_ulonglong(int ncid, int varid, const size_t *indexp, 
+		      unsigned long long *ip)
+{
+   NC* ncp;
+   int stat = NC_check_id(ncid, &ncp);
+   if(stat != NC_NOERR) return stat;
+   return NC_get_var1(ncid, varid, indexp, (void *)ip, NC_UINT64);
+}
+
+#ifdef USE_NETCDF4
+int
+nc_get_var1_string(int ncid, int varid, const size_t *indexp, char* *ip)
+{
+   NC* ncp;
+   int stat = NC_check_id(ncid, &ncp);
+   if(stat != NC_NOERR) return stat;
+   return NC_get_var1(ncid, varid, indexp, (void *)ip, NC_STRING);
+}
+#endif /*USE_NETCDF4*/
+/** \} */
+
+/** \ingroup variables
+Read an entire variable in one call. 
+
+This function will read all the values from a netCDF variable of an
+open netCDF dataset.
+
+This is the simplest interface to use for reading the value of a
+scalar variable or when all the values of a multidimensional variable
+can be read at once. The values are read into consecutive locations
+with the last dimension varying fastest. The netCDF dataset must be in
+data mode.
+
+Take care when using this function with record variables (variables
+that use the ::NC_UNLIMITED dimension). If you try to read all the
+values of a record variable into an array but there are more records
+in the file than you assume, more data will be read than you expect,
+which may cause a segmentation violation. To avoid such problems, it
+is better to use the nc_get_vara interfaces for variables that use the
+::NC_UNLIMITED dimension.
+
+The functions for types ubyte, ushort, uint, longlong, ulonglong, and
+string are only available for netCDF-4/HDF5 files.
+
+The nc_get_var() function will read a variable of any type, including
+user defined type. For this function, the type of the data in memory
+must match the type of the variable - no data conversion is done.
+
+\param ncid NetCDF or group ID, from a previous call to nc_open(),
+nc_create(), nc_def_grp(), or associated inquiry functions such as 
+nc_inq_ncid().
+
+\param varid Variable ID
+
+\param ip Pointer where the data will be copied. Memory must be
+allocated by the user before this function is called.
+
+\returns ::NC_NOERR No error.
+\returns ::NC_ENOTVAR Variable not found.
+\returns ::NC_ERANGE One or more of the values are out of range.
+\returns ::NC_EINDEFINE Operation not allowed in define mode.
+\returns ::NC_EBADID Bad ncid.
+*/
+/** \{ */
+int
+nc_get_var(int ncid, int varid, void *ip)
+{
+   return NC_get_var(ncid, varid, ip, NC_NAT);
+}
+
+int
+nc_get_var_text(int ncid, int varid, char *ip)
+{
+   NC *ncp;
+   int stat = NC_check_id(ncid, &ncp);
+   if(stat != NC_NOERR) return stat;
+   return NC_get_var(ncid, varid, (void *)ip, NC_CHAR);
+}
+
+int
+nc_get_var_schar(int ncid, int varid, signed char *ip)
+{
+   NC *ncp;
+   int stat = NC_check_id(ncid, &ncp);
+   if(stat != NC_NOERR) return stat;
+   return NC_get_var(ncid, varid, (void *)ip, NC_BYTE);
+}
+
+int
+nc_get_var_uchar(int ncid, int varid, unsigned char *ip)
+{
+   NC *ncp;
+   int stat = NC_check_id(ncid, &ncp);
+   if(stat != NC_NOERR) return stat;
+   return NC_get_var(ncid,varid, (void *)ip, NC_UBYTE);
+}
+
+int
+nc_get_var_short(int ncid, int varid, short *ip)
+{
+   NC* ncp;
+   int stat = NC_check_id(ncid, &ncp);
+   if(stat != NC_NOERR) return stat;
+   return NC_get_var(ncid, varid, (void *)ip, NC_SHORT);
+}
+
+int
+nc_get_var_int(int ncid, int varid, int *ip)
+{
+   NC* ncp;
+   int stat = NC_check_id(ncid, &ncp);
+   if(stat != NC_NOERR) return stat;
+   return NC_get_var(ncid,varid, (void *)ip, NC_INT);
+}
+
+int
+nc_get_var_long(int ncid, int varid, long *ip)
+{
+   NC* ncp;
+   int stat = NC_check_id(ncid, &ncp);
+   if(stat != NC_NOERR) return stat;
+   return NC_get_var(ncid,varid, (void *)ip, longtype);
+}
+
+int
+nc_get_var_float(int ncid, int varid, float *ip)
+{
+   NC* ncp;
+   int stat = NC_check_id(ncid, &ncp);
+   if(stat != NC_NOERR) return stat;
+   return NC_get_var(ncid,varid, (void *)ip, NC_FLOAT);
+}
+
+int
+nc_get_var_double(int ncid, int varid, double *ip)
+{
+   NC* ncp;
+   int stat = NC_check_id(ncid, &ncp);
+   if(stat != NC_NOERR) return stat;
+   return NC_get_var(ncid,varid, (void *)ip, NC_DOUBLE);
+}
+
+int
+nc_get_var_ubyte(int ncid, int varid, unsigned char *ip)
+{
+   NC* ncp;
+   int stat = NC_check_id(ncid, &ncp);
+   if(stat != NC_NOERR) return stat;
+   return NC_get_var(ncid,varid, (void *)ip, NC_UBYTE);
+}
+
+int
+nc_get_var_ushort(int ncid, int varid, unsigned short *ip)
+{
+   NC* ncp;
+   int stat = NC_check_id(ncid, &ncp);
+   if(stat != NC_NOERR) return stat;
+   return NC_get_var(ncid,varid, (void *)ip, NC_USHORT);
+}
+
+int
+nc_get_var_uint(int ncid, int varid, unsigned int *ip)
+{
+   NC* ncp;
+   int stat = NC_check_id(ncid, &ncp);
+   if(stat != NC_NOERR) return stat;
+   return NC_get_var(ncid,varid, (void *)ip, NC_UINT);
+}
+
+int
+nc_get_var_longlong(int ncid, int varid, long long *ip)
+{
+   NC* ncp;
+   int stat = NC_check_id(ncid, &ncp);
+   if(stat != NC_NOERR) return stat;
+   return NC_get_var(ncid,varid, (void *)ip, NC_INT64);
+}
+
+int
+nc_get_var_ulonglong(int ncid, int varid, unsigned long long *ip)
+{
+   NC* ncp;
+   int stat = NC_check_id(ncid, &ncp);
+   if(stat != NC_NOERR) return stat;
+   return NC_get_var(ncid,varid, (void *)ip,NC_UINT64);
+}
+
+#ifdef USE_NETCDF4
+int
+nc_get_var_string(int ncid, int varid, char* *ip)
+{
+   NC* ncp;
+   int stat = NC_check_id(ncid, &ncp);
+   if(stat != NC_NOERR) return stat;
+   return NC_get_var(ncid,varid, (void *)ip,NC_STRING);
+}
+#endif /*USE_NETCDF4*/
+/** \} */
+
+/** \ingroup variables
+Read a strided array from a variable. 
+
+This function reads a subsampled (strided) array section of values
+from a netCDF variable of an open netCDF dataset. The subsampled array
+section is specified by giving a corner, a vector of edge lengths, and
+a stride vector. The values are read with the last dimension of the
+netCDF variable varying fastest. The netCDF dataset must be in data
+mode.
+
+The nc_get_vars() function will read a variable of any type, including
+user defined type. For this function, the type of the data in memory
+must match the type of the variable - no data conversion is done.
+
+\param ncid NetCDF or group ID, from a previous call to nc_open(),
+nc_create(), nc_def_grp(), or associated inquiry functions such as 
+nc_inq_ncid().
+
+\param varid Variable ID
+
+\param startp Start vector with one element for each dimension to \ref
+specify_hyperslab.
+
+\param countp Count vector with one element for each dimension to \ref
+specify_hyperslab.
+
+\param stridep Stride vector with one element for each dimension to
+\ref specify_hyperslab.
+
+\param ip Pointer where the data will be copied. Memory must be
+allocated by the user before this function is called.
+
+\returns ::NC_NOERR No error.
+\returns ::NC_ENOTVAR Variable not found.
+\returns ::NC_EINVALCOORDS Index exceeds dimension bound.
+\returns ::NC_ERANGE One or more of the values are out of range.
+\returns ::NC_EINDEFINE Operation not allowed in define mode.
+\returns ::NC_EBADID Bad ncid.
+*/
+/** \{ */
+int
+nc_get_vars (int ncid, int varid, const size_t * startp,
+	     const size_t * countp, const ptrdiff_t * stridep,
+	     void *ip)
+{
+   NC* ncp;
+   int stat = NC_NOERR;
+
+   if ((stat = NC_check_id(ncid, &ncp)))
+       return stat;
+   return ncp->dispatch->get_vars(ncid, varid, startp, countp, stridep,
+		      ip, NC_NAT);
+}
+
+int
+nc_get_vars_text(int ncid, int varid, const size_t *startp, 
+		 const size_t *countp, const ptrdiff_t * stridep,
+		 char *ip)
+{
+   NC* ncp;
+   int stat = NC_check_id(ncid, &ncp);
+   if(stat != NC_NOERR) return stat;
+   return NC_get_vars(ncid,varid,startp, countp, stridep,
+		      (void *)ip, NC_CHAR);
+}
+
+int
+nc_get_vars_schar(int ncid, int varid, const size_t *startp, 
+		  const size_t *countp, const ptrdiff_t * stridep,
+		  signed char *ip)
+{
+   NC* ncp;
+   int stat = NC_check_id(ncid, &ncp);
+   if(stat != NC_NOERR) return stat;
+   return NC_get_vars(ncid,varid,startp, countp, stridep,
+		      (void *)ip, NC_BYTE);
+}
+
+int
+nc_get_vars_uchar(int ncid, int varid, const size_t *startp, 
+		  const size_t *countp, const ptrdiff_t * stridep,
+		  unsigned char *ip)
+{
+   NC* ncp;
+   int stat = NC_check_id(ncid, &ncp);
+   if(stat != NC_NOERR) return stat;
+   return NC_get_vars(ncid,varid,startp, countp, stridep,
+		      (void *)ip, T_uchar);
+}
+
+int
+nc_get_vars_short(int ncid, int varid, const size_t *startp, 
+		  const size_t *countp, const ptrdiff_t *stridep,
+		  short *ip)
+{
+   NC* ncp;
+   int stat = NC_check_id(ncid, &ncp);
+   if(stat != NC_NOERR) return stat;
+   return NC_get_vars(ncid,varid,startp, countp, stridep, 
+		      (void *)ip, NC_SHORT);
+}
+
+int
+nc_get_vars_int(int ncid, int varid, const size_t *startp, 
+		const size_t *countp, const ptrdiff_t * stridep,
+		int *ip)
+{
+   NC* ncp;
+   int stat = NC_check_id(ncid, &ncp);
+   if(stat != NC_NOERR) return stat;
+   return NC_get_vars(ncid,varid,startp, countp, stridep,
+		      (void *)ip, NC_INT);
+}
+
+int
+nc_get_vars_long(int ncid, int varid, const size_t *startp, 
+		 const size_t *countp, const ptrdiff_t * stridep,
+		 long *ip)
+{
+   NC* ncp;
+   int stat = NC_check_id(ncid, &ncp);
+   if(stat != NC_NOERR) return stat;
+   return NC_get_vars(ncid,varid,startp, countp, stridep,
+		      (void *)ip, T_long);
+}
+
+int
+nc_get_vars_float(int ncid, int varid, const size_t *startp, 
+		  const size_t *countp, const ptrdiff_t * stridep,
+		  float *ip)
+{
+   NC* ncp;
+   int stat = NC_check_id(ncid, &ncp);
+   if(stat != NC_NOERR) return stat;
+   return NC_get_vars(ncid,varid,startp, countp, stridep,
+		      (void *)ip, T_float);
+}
+
+int
+nc_get_vars_double(int ncid, int varid, const size_t *startp, 
+		   const size_t *countp, const ptrdiff_t * stridep,
+		   double *ip)
+{
+   NC* ncp;
+   int stat = NC_check_id(ncid, &ncp);
+   if(stat != NC_NOERR) return stat;
+   return NC_get_vars(ncid,varid,startp, countp, stridep,
+		      (void *)ip, T_double);
+}
+
+int
+nc_get_vars_ubyte(int ncid, int varid, const size_t *startp, 
+		  const size_t *countp, const ptrdiff_t * stridep,
+		  unsigned char *ip)
+{
+   NC* ncp;
+   int stat = NC_check_id(ncid, &ncp);
+   if(stat != NC_NOERR) return stat;
+   return NC_get_vars(ncid,varid, startp, countp, stridep,
+		      (void *)ip, T_ubyte);
+}
+
+int
+nc_get_vars_ushort(int ncid, int varid, const size_t *startp, 
+		   const size_t *countp, const ptrdiff_t * stridep,
+		   unsigned short *ip)
+{
+   NC* ncp;
+   int stat = NC_check_id(ncid, &ncp);
+   if(stat != NC_NOERR) return stat;
+   return NC_get_vars(ncid,varid,startp,countp, stridep,
+		      (void *)ip, T_ushort);
+}
+
+int
+nc_get_vars_uint(int ncid, int varid, const size_t *startp, 
+		 const size_t *countp, const ptrdiff_t * stridep,
+		 unsigned int *ip)
+{
+   NC* ncp;
+   int stat = NC_check_id(ncid, &ncp);
+   if(stat != NC_NOERR) return stat;
+   return NC_get_vars(ncid,varid,startp, countp, stridep,
+		      (void *)ip, T_uint);
+}
+
+int
+nc_get_vars_longlong(int ncid, int varid, const size_t *startp, 
+		     const size_t *countp, const ptrdiff_t * stridep,
+		     long long *ip)
+{
+   NC* ncp;
+   int stat = NC_check_id(ncid, &ncp);
+   if(stat != NC_NOERR) return stat;
+   return NC_get_vars(ncid, varid, startp, countp, stridep,
+		      (void *)ip, T_longlong);
+}
+
+int
+nc_get_vars_ulonglong(int ncid, int varid, const size_t *startp, 
+		      const size_t *countp, const ptrdiff_t * stridep,
+		      unsigned long long *ip)
+{
+   NC* ncp;
+   int stat = NC_check_id(ncid, &ncp);
+   if(stat != NC_NOERR) return stat;
+   return NC_get_vars(ncid, varid, startp, countp, stridep,
+		      (void *)ip, NC_UINT64);
+}
+
+#ifdef USE_NETCDF4
+int
+nc_get_vars_string(int ncid, int varid,
+		   const size_t *startp, const size_t *countp,
+		   const ptrdiff_t * stridep,
+		   char* *ip)
+{
+   NC* ncp;
+   int stat = NC_check_id(ncid, &ncp);
+   if(stat != NC_NOERR) return stat;
+   return NC_get_vars(ncid, varid, startp, countp, stridep, 
+		      (void *)ip, NC_STRING);
+}
+#endif /*USE_NETCDF4*/
+/** \} */
+
+/** \ingroup variables
+Read a mapped array from a variable. 
+
+The nc_get_varm_ type family of functions reads a mapped array section
+of values from a netCDF variable of an open netCDF dataset. The mapped
+array section is specified by giving a corner, a vector of edge
+lengths, a stride vector, and an index mapping vector. The index
+mapping vector is a vector of integers that specifies the mapping
+between the dimensions of a netCDF variable and the in-memory
+structure of the internal data array. No assumptions are made about
+the ordering or length of the dimensions of the data array. The netCDF
+dataset must be in data mode.
+
+The functions for types ubyte, ushort, uint, longlong, ulonglong, and
+string are only available for netCDF-4/HDF5 files.
+
+The nc_get_varm() function will read a variable of any type, including
+user defined type. For this function, the type of the data in memory
+must match the type of the variable - no data conversion is done.
+
+\param ncid NetCDF or group ID, from a previous call to nc_open(),
+nc_create(), nc_def_grp(), or associated inquiry functions such as 
+nc_inq_ncid().
+
+\param varid Variable ID
+
+\param startp Start vector with one element for each dimension to \ref
+specify_hyperslab.
+
+\param countp Count vector with one element for each dimension to \ref
+specify_hyperslab.
+
+\param stridep Stride vector with one element for each dimension to
+\ref specify_hyperslab.
+
+\param imapp Mapping vector with one element for each dimension to
+\ref specify_hyperslab.
+
+\param ip Pointer where the data will be copied. Memory must be
+allocated by the user before this function is called.
+
+\returns ::NC_NOERR No error.
+\returns ::NC_ENOTVAR Variable not found.
+\returns ::NC_EINVALCOORDS Index exceeds dimension bound.
+\returns ::NC_ERANGE One or more of the values are out of range.
+\returns ::NC_EINDEFINE Operation not allowed in define mode.
+\returns ::NC_EBADID Bad ncid.
+*/
+/** \{ */
+int
+nc_get_varm(int ncid, int varid, const size_t * startp,
+	    const size_t * countp, const ptrdiff_t * stridep,
+	    const ptrdiff_t * imapp, void *ip)
+{
+   NC* ncp;
+   int stat = NC_NOERR;
+
+   if ((stat = NC_check_id(ncid, &ncp)))
+       return stat;
+   return ncp->dispatch->get_varm(ncid, varid, startp, countp, 
+				  stridep, imapp, ip, NC_NAT);
+}
+
+int
+nc_get_varm_schar(int ncid, int varid,
+		  const size_t *startp, const size_t *countp,
+		  const ptrdiff_t *stridep, 
+		  const ptrdiff_t *imapp, signed char *ip)
+{
+   NC *ncp;
+   int stat = NC_check_id(ncid, &ncp);
+   if(stat != NC_NOERR) return stat;
+   return NC_get_varm(ncid, varid, startp, countp,
+		      stridep, imapp, (void *)ip, NC_BYTE);
+}
+
+int
+nc_get_varm_uchar(int ncid, int varid,
+		  const size_t *startp, const size_t *countp,
+		  const ptrdiff_t *stridep, const ptrdiff_t *imapp,
+		  unsigned char *ip)
+{
+   NC *ncp;
+   int stat = NC_check_id(ncid, &ncp);
+   if(stat != NC_NOERR) return stat;
+   return NC_get_varm(ncid,varid,startp,countp,stridep,imapp, (void *)ip,T_uchar);
+}
+
+int
+nc_get_varm_short(int ncid, int varid, const size_t *startp, 
+		  const size_t *countp, const ptrdiff_t *stridep, 
+		  const ptrdiff_t *imapp, short *ip)
+{
+   NC *ncp;
+   int stat = NC_check_id(ncid, &ncp);
+   if(stat != NC_NOERR) return stat;
+   return NC_get_varm(ncid,varid,startp,countp,stridep,imapp, (void *)ip,NC_SHORT);
+}
+
+int
+nc_get_varm_int(int ncid, int varid,
+		const size_t *startp, const size_t *countp,
+		const ptrdiff_t *stridep, const ptrdiff_t *imapp,
+		int *ip)
+{
+   NC *ncp;
+   int stat = NC_check_id(ncid, &ncp);
+   if(stat != NC_NOERR) return stat;
+   return NC_get_varm(ncid,varid,startp,countp,stridep,imapp, (void *)ip,NC_INT);
+}
+
+int
+nc_get_varm_long(int ncid, int varid,
+		 const size_t *startp, const size_t *countp,
+		 const ptrdiff_t *stridep, const ptrdiff_t *imapp,
+		 long *ip)
+{
+   NC *ncp;
+   int stat = NC_check_id(ncid, &ncp);
+   if(stat != NC_NOERR) return stat;
+   return NC_get_varm(ncid,varid,startp,countp,stridep,imapp, (void *)ip,T_long);
+}
+
+int
+nc_get_varm_float(int ncid, int varid,
+		  const size_t *startp, const size_t *countp,
+		  const ptrdiff_t *stridep, const ptrdiff_t *imapp,
+		  float *ip)
+{
+   NC *ncp;
+   int stat = NC_check_id(ncid, &ncp);
+   if(stat != NC_NOERR) return stat;
+   return NC_get_varm(ncid,varid,startp,countp,stridep,imapp, (void *)ip,T_float);
+}
+
+int
+nc_get_varm_double(int ncid, int varid,
+		   const size_t *startp, const size_t *countp,
+		   const ptrdiff_t *stridep, const ptrdiff_t *imapp,
+		   double *ip)
+{
+   NC *ncp;
+   int stat = NC_check_id(ncid, &ncp);
+   if(stat != NC_NOERR) return stat;
+   return NC_get_varm(ncid,varid,startp,countp,stridep,imapp, (void *)ip,T_double);
+}
+
+int
+nc_get_varm_ubyte(int ncid, int varid,
+		  const size_t *startp, const size_t *countp,
+		  const ptrdiff_t *stridep, const ptrdiff_t *imapp,
+		  unsigned char *ip)
+{
+   NC *ncp;
+   int stat = NC_check_id(ncid, &ncp);
+   if(stat != NC_NOERR) return stat;
+   return NC_get_varm(ncid,varid,startp,countp,stridep,
+		      imapp, (void *)ip, T_ubyte);
+}
+
+int
+nc_get_varm_ushort(int ncid, int varid,
+		   const size_t *startp, const size_t *countp,
+		   const ptrdiff_t *stridep, const ptrdiff_t *imapp,
+		   unsigned short *ip)
+{
+   NC *ncp;
+   int stat = NC_check_id(ncid, &ncp);
+   if(stat != NC_NOERR) return stat;
+   return NC_get_varm(ncid, varid, startp, countp, stridep,
+		      imapp, (void *)ip, T_ushort);
+}
+
+int
+nc_get_varm_uint(int ncid, int varid,
+		 const size_t *startp, const size_t *countp,
+		 const ptrdiff_t *stridep, const ptrdiff_t *imapp,
+		 unsigned int *ip)
+{
+   NC *ncp;
+   int stat = NC_check_id(ncid, &ncp);
+   if(stat != NC_NOERR) return stat;
+   return NC_get_varm(ncid, varid, startp, countp,
+		      stridep, imapp, (void *)ip, T_uint);
+}
+
+int
+nc_get_varm_longlong(int ncid, int varid, const size_t *startp, 
+		     const size_t *countp, const ptrdiff_t *stridep, 
+		     const ptrdiff_t *imapp, long long *ip)
+{
+   NC *ncp;
+   int stat = NC_check_id(ncid, &ncp);
+   if(stat != NC_NOERR) return stat;
+   return NC_get_varm(ncid, varid, startp, countp, stridep, imapp,
+		      (void *)ip, T_longlong);
+}
+
+int
+nc_get_varm_ulonglong(int ncid, int varid,
+		      const size_t *startp, const size_t *countp,
+		      const ptrdiff_t *stridep, const ptrdiff_t *imapp,
+		      unsigned long long *ip)
+{
+   NC *ncp;
+   int stat = NC_check_id(ncid, &ncp);
+   if(stat != NC_NOERR) return stat;
+   return NC_get_varm(ncid, varid, startp, countp, stridep, imapp,
+		      (void *)ip, NC_UINT64);
+}
+
+int
+nc_get_varm_text(int ncid, int varid, const size_t *startp, 
+		 const size_t *countp, const ptrdiff_t *stridep, 
+		 const ptrdiff_t *imapp, char *ip)
+{
+   NC *ncp;
+   int stat = NC_check_id(ncid, &ncp);
+   if(stat != NC_NOERR) return stat;
+   return NC_get_varm(ncid, varid, startp, countp, stridep, imapp,
+		      (void *)ip, NC_CHAR);
+}
+
+#ifdef USE_NETCDF4
+int
+nc_get_varm_string(int ncid, int varid, const size_t *startp, 
+		   const size_t *countp, const ptrdiff_t *stridep, 
+		   const ptrdiff_t *imapp, char **ip)
+{
+   NC *ncp;
+   int stat = NC_check_id(ncid, &ncp);
+   if(stat != NC_NOERR) return stat;
+   return NC_get_varm(ncid, varid, startp, countp, stridep, imapp,
+		      (void *)ip, NC_STRING);
+}
+/** \} */
+#endif /*USE_NETCDF4*/
+
+/*! \} */ /* End of named group... */
+
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/src_netcdf4/dvarinq.c
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/src_netcdf4/dvarinq.c	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/src_netcdf4/dvarinq.c	(revision 1749)
@@ -0,0 +1,573 @@
+/*! \file
+Functions for inquiring about variables.
+
+Copyright 2010 University Corporation for Atmospheric
+Research/Unidata. See COPYRIGHT file for more info.
+*/
+
+#include "ncdispatch.h"
+
+/** \name Learning about Variables
+
+Functions to learn about the variables in a file. */
+/*! \{ */ /* All these functions are part of this named group... */
+
+/** 
+\ingroup variables
+Find the ID of a variable, from the name.
+
+The function nc_inq_varid returns the ID of a netCDF variable, given
+its name.
+
+\param ncid NetCDF or group ID, from a previous call to nc_open(),
+nc_create(), nc_def_grp(), or associated inquiry functions such as 
+nc_inq_ncid().
+
+\param name Name of the variable.
+
+\param varidp Pointer to location for returned variable ID.  \ref
+ignored_if_null.
+
+\returns ::NC_NOERR No error.
+\returns ::NC_EBADID Bad ncid.
+
+\section Example
+
+Here is an example using nc_inq_varid to find out the ID of a variable
+named rh in an existing netCDF dataset named foo.nc:
+
+\code
+     #include <netcdf.h>
+        ...
+     int  status, ncid, rh_id;
+        ...
+     status = nc_open("foo.nc", NC_NOWRITE, &ncid);
+     if (status != NC_NOERR) handle_error(status);
+        ...
+     status = nc_inq_varid (ncid, "rh", &rh_id);
+     if (status != NC_NOERR) handle_error(status);
+\endcode
+ */
+int
+nc_inq_varid(int ncid, const char *name, int *varidp)
+{
+   NC* ncp;
+   int stat = NC_check_id(ncid, &ncp);
+   if(stat != NC_NOERR) return stat;
+   return ncp->dispatch->inq_varid(ncid, name, varidp);
+}
+
+/** 
+\ingroup variables
+Learn about a variable.
+
+\param ncid NetCDF or group ID, from a previous call to nc_open(),
+nc_create(), nc_def_grp(), or associated inquiry functions such as 
+nc_inq_ncid().
+
+\param varid Variable ID
+
+\param name Returned \ref object_name of variable. \ref
+ignored_if_null.
+
+\param xtypep Pointer where typeid will be stored. \ref ignored_if_null.
+
+\param ndimsp Pointer where number of dimensions will be
+stored. \ref ignored_if_null.
+
+\param dimidsp Pointer where array of dimension IDs will be
+stored. \ref ignored_if_null.
+
+\param nattsp Pointer where number of attributes will be
+stored. \ref ignored_if_null.
+
+\returns ::NC_NOERR No error.
+\returns ::NC_EBADID Bad ncid.
+\returns ::NC_ENOTVAR Invalid variable ID.
+
+\section Example
+
+Here is an example using nc_inq_var() to find out about a variable named
+rh in an existing netCDF dataset named foo.nc:
+
+\code
+     #include <netcdf.h>
+        ...
+     int  status                     
+     int  ncid;                      
+     int  rh_id;                     
+     nc_type rh_type;                
+     int rh_ndims;                   
+     int  rh_dimids[NC_MAX_VAR_DIMS];
+     int rh_natts 
+        ...
+     status = nc_open ("foo.nc", NC_NOWRITE, &ncid);
+     if (status != NC_NOERR) handle_error(status);
+        ...
+     status = nc_inq_varid (ncid, "rh", &rh_id);
+     if (status != NC_NOERR) handle_error(status);
+     status = nc_inq_var (ncid, rh_id, 0, &rh_type, &rh_ndims, rh_dimids,
+                          &rh_natts);
+     if (status != NC_NOERR) handle_error(status);
+\endcode
+
+ */
+int
+nc_inq_var(int ncid, int varid, char *name, nc_type *xtypep,  
+	   int *ndimsp, int *dimidsp, int *nattsp)
+{
+   NC* ncp;
+   int stat = NC_check_id(ncid, &ncp);
+   if(stat != NC_NOERR) return stat;
+   return ncp->dispatch->inq_var_all(ncid, varid, name, xtypep, ndimsp, 
+				     dimidsp, nattsp, NULL, NULL, NULL, 
+				     NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
+}
+
+/** 
+\ingroup variables
+Learn the name of a variable.
+
+\param ncid NetCDF or group ID, from a previous call to nc_open(),
+nc_create(), nc_def_grp(), or associated inquiry functions such as 
+nc_inq_ncid().
+
+\param varid Variable ID
+
+\param name Returned variable name. The caller must allocate space for
+the returned name. The maximum length is ::NC_MAX_NAME. Ignored if
+NULL.
+
+\returns ::NC_NOERR No error.
+\returns ::NC_EBADID Bad ncid.
+\returns ::NC_ENOTVAR Invalid variable ID.
+ */
+int 
+nc_inq_varname(int ncid, int varid, char *name)
+{
+   return nc_inq_var(ncid, varid, name, NULL, NULL,
+		     NULL, NULL);
+}
+
+/** Learn the type of a variable.
+\ingroup variables
+
+\param ncid NetCDF or group ID, from a previous call to nc_open(),
+nc_create(), nc_def_grp(), or associated inquiry functions such as 
+nc_inq_ncid().
+
+\param varid Variable ID
+
+\param typep Pointer where typeid will be stored. \ref ignored_if_null.
+
+\returns ::NC_NOERR No error.
+\returns ::NC_EBADID Bad ncid.
+\returns ::NC_ENOTVAR Invalid variable ID.
+ */
+int 
+nc_inq_vartype(int ncid, int varid, nc_type *typep)
+{
+   return nc_inq_var(ncid, varid, NULL, typep, NULL,
+		     NULL, NULL);
+}
+
+/** Learn how many dimensions are associated with a variable.
+\ingroup variables
+
+\param ncid NetCDF or group ID, from a previous call to nc_open(),
+nc_create(), nc_def_grp(), or associated inquiry functions such as 
+nc_inq_ncid().
+
+\param varid Variable ID
+
+\param ndimsp Pointer where number of dimensions will be
+stored. \ref ignored_if_null.
+
+\returns ::NC_NOERR No error.
+\returns ::NC_EBADID Bad ncid.
+\returns ::NC_ENOTVAR Invalid variable ID.
+ */
+int 
+nc_inq_varndims(int ncid, int varid, int *ndimsp)
+{
+   return nc_inq_var(ncid, varid, NULL, NULL, ndimsp, NULL, NULL);
+}
+
+/** Learn the dimension IDs associated with a variable.
+\ingroup variables
+
+\param ncid NetCDF or group ID, from a previous call to nc_open(),
+nc_create(), nc_def_grp(), or associated inquiry functions such as 
+nc_inq_ncid().
+
+\param varid Variable ID
+
+\param dimidsp Pointer where array of dimension IDs will be
+stored. \ref ignored_if_null.
+
+\returns ::NC_NOERR No error.
+\returns ::NC_EBADID Bad ncid.
+\returns ::NC_ENOTVAR Invalid variable ID.
+ */
+int 
+nc_inq_vardimid(int ncid, int varid, int *dimidsp)
+{
+   return nc_inq_var(ncid, varid, NULL, NULL, NULL, 
+		     dimidsp, NULL);
+}
+
+/** Learn how many attributes are associated with a variable.
+\ingroup variables
+
+\param ncid NetCDF or group ID, from a previous call to nc_open(),
+nc_create(), nc_def_grp(), or associated inquiry functions such as 
+nc_inq_ncid().
+
+\param varid Variable ID
+
+\param nattsp Pointer where number of attributes will be
+stored. \ref ignored_if_null.
+
+\returns ::NC_NOERR No error.
+\returns ::NC_EBADID Bad ncid.
+\returns ::NC_ENOTVAR Invalid variable ID.
+ */
+int 
+nc_inq_varnatts(int ncid, int varid, int *nattsp)
+{
+   if (varid == NC_GLOBAL)
+      return nc_inq_natts(ncid,nattsp);
+   /*else*/
+   return nc_inq_var(ncid, varid, NULL, NULL, NULL, NULL, 
+		     nattsp);
+}
+
+#ifdef USE_NETCDF4
+/** \ingroup variables
+Learn the storage and deflate settings for a variable.
+
+This is a wrapper for nc_inq_var_all().
+
+\param ncid NetCDF or group ID, from a previous call to nc_open(),
+nc_create(), nc_def_grp(), or associated inquiry functions such as 
+nc_inq_ncid().
+
+\param varid Variable ID
+
+\param shufflep A 1 will be written here if the shuffle filter is
+turned on for this variable, and a 0 otherwise. \ref ignored_if_null.
+
+\param deflatep If this pointer is non-NULL, the nc_inq_var_deflate
+function will write a 1 if the deflate filter is turned on for this
+variable, and a 0 otherwise. \ref ignored_if_null.
+
+\param deflate_levelp If the deflate filter is in use for this
+variable, the deflate_level will be writen here. \ref ignored_if_null.
+
+\returns ::NC_NOERR No error.
+\returns ::NC_ENOTNC4 Not a netCDF-4 file. 
+\returns ::NC_EBADID Bad ncid.
+\returns ::NC_ENOTVAR Invalid variable ID.
+*/
+int
+nc_inq_var_deflate(int ncid, int varid, int *shufflep, int *deflatep, 
+		   int *deflate_levelp)
+{
+   NC* ncp;
+   int stat = NC_check_id(ncid,&ncp);
+   if(stat != NC_NOERR) return stat;
+   return ncp->dispatch->inq_var_all(
+      ncid, varid,
+      NULL, /*name*/
+      NULL, /*xtypep*/
+      NULL, /*ndimsp*/
+      NULL, /*dimidsp*/
+      NULL, /*nattsp*/
+      shufflep, /*shufflep*/
+      deflatep, /*deflatep*/
+      deflate_levelp, /*deflatelevelp*/
+      NULL, /*fletcher32p*/
+      NULL, /*contiguousp*/
+      NULL, /*chunksizep*/
+      NULL, /*nofillp*/
+      NULL, /*fillvaluep*/
+      NULL, /*endianp*/
+      NULL, /*optionsmaskp*/
+      NULL /*pixelsp*/
+      );
+}
+
+/** \ingroup variables
+Learn the szip settings of a variable.
+
+This function returns the szip settings for a variable. NetCDF does
+not allow variables to be created with szip (due to license problems
+with the szip library), but we do enable read-only access of HDF5
+files with szip compression.
+
+This is a wrapper for nc_inq_var_all().
+
+\param ncid NetCDF or group ID, from a previous call to nc_open(),
+nc_create(), nc_def_grp(), or associated inquiry functions such as 
+nc_inq_ncid().
+
+\param varid Variable ID
+
+\param options_maskp The szip options mask will be copied to this
+pointer. \ref ignored_if_null.
+
+\param pixels_per_blockp The szip pixels per block will be copied
+here. \ref ignored_if_null.
+
+\returns ::NC_NOERR No error.
+\returns ::NC_EBADID Bad ncid.
+\returns ::NC_ENOTNC4 Not a netCDF-4 file. 
+\returns ::NC_ENOTVAR Invalid variable ID.
+*/
+int
+nc_inq_var_szip(int ncid, int varid, int *options_maskp, int *pixels_per_blockp)
+{
+   NC* ncp;
+   int stat = NC_check_id(ncid,&ncp);
+   if(stat != NC_NOERR) return stat;
+   return ncp->dispatch->inq_var_all(
+      ncid, varid,
+      NULL, /*name*/
+      NULL, /*xtypep*/
+      NULL, /*ndimsp*/
+      NULL, /*dimidsp*/
+      NULL, /*nattsp*/
+      NULL, /*shufflep*/
+      NULL, /*deflatep*/
+      NULL, /*deflatelevelp*/
+      NULL, /*fletcher32p*/
+      NULL, /*contiguousp*/
+      NULL, /*chunksizep*/
+      NULL, /*nofillp*/
+      NULL, /*fillvaluep*/
+      NULL, /*endianp*/
+      options_maskp, /*optionsmaskp*/
+      pixels_per_blockp /*pixelsp*/
+      );
+}
+
+/** \ingroup variables
+Learn the checksum settings for a variable. 
+
+This is a wrapper for nc_inq_var_all().
+
+\param ncid NetCDF or group ID, from a previous call to nc_open(),
+nc_create(), nc_def_grp(), or associated inquiry functions such as 
+nc_inq_ncid().
+
+\param varid Variable ID
+
+\param fletcher32p Will be set to ::NC_FLETCHER32 if the fletcher32
+checksum filter is turned on for this variable, and ::NC_NOCHECKSUM if
+it is not. \ref ignored_if_null.
+
+\returns ::NC_NOERR No error.
+\returns ::NC_EBADID Bad ncid.
+\returns ::NC_ENOTNC4 Not a netCDF-4 file. 
+\returns ::NC_ENOTVAR Invalid variable ID.
+*/
+int
+nc_inq_var_fletcher32(int ncid, int varid, int *fletcher32p)
+{
+   NC* ncp;
+   int stat = NC_check_id(ncid,&ncp);
+   if(stat != NC_NOERR) return stat;
+   return ncp->dispatch->inq_var_all(
+      ncid, varid,
+      NULL, /*name*/
+      NULL, /*xtypep*/
+      NULL, /*ndimsp*/
+      NULL, /*dimidsp*/
+      NULL, /*nattsp*/
+      NULL, /*shufflep*/
+      NULL, /*deflatep*/
+      NULL, /*deflatelevelp*/
+      fletcher32p, /*fletcher32p*/
+      NULL, /*contiguousp*/
+      NULL, /*chunksizep*/
+      NULL, /*nofillp*/
+      NULL, /*fillvaluep*/
+      NULL, /*endianp*/
+      NULL, /*optionsmaskp*/
+      NULL /*pixelsp*/
+      );
+}
+
+/** \ingroup variables
+
+This is a wrapper for nc_inq_var_all().
+
+\param ncid NetCDF or group ID, from a previous call to nc_open(),
+nc_create(), nc_def_grp(), or associated inquiry functions such as 
+nc_inq_ncid().
+
+\param varid Variable ID
+
+\param storagep Address of returned storage property, returned as
+::NC_CONTIGUOUS if this variable uses contiguous storage, or
+::NC_CHUNKED if it uses chunked storage. \ref ignored_if_null.
+
+\param chunksizesp The chunksizes will be copied here. \ref
+ignored_if_null.
+
+\returns ::NC_NOERR No error.
+\returns ::NC_EBADID Bad ncid.
+\returns ::NC_ENOTNC4 Not a netCDF-4 file. 
+\returns ::NC_ENOTVAR Invalid variable ID.
+*/
+int
+nc_inq_var_chunking(int ncid, int varid, int *storagep, size_t *chunksizesp)
+{
+   NC *ncp;
+   int stat = NC_check_id(ncid, &ncp);
+   if(stat != NC_NOERR) return stat;
+   return ncp->dispatch->inq_var_all(ncid, varid, NULL, NULL, NULL, NULL, 
+				     NULL, NULL, NULL, NULL, NULL, storagep, 
+				     chunksizesp, NULL, NULL, NULL, NULL, NULL);
+}
+
+/** \ingroup variables
+Learn the fill mode of a variable.
+
+The fill mode of a variable is set by nc_def_var_fill().
+
+This is a wrapper for nc_inq_var_all().
+
+\param ncid NetCDF or group ID, from a previous call to nc_open(),
+nc_create(), nc_def_grp(), or associated inquiry functions such as 
+nc_inq_ncid().
+
+\param varid Variable ID
+
+\param no_fill Pointer to an integer which will get a 1 if no_fill
+mode is set for this variable. \ref ignored_if_null. 
+
+\param fill_valuep A pointer which will get the fill value for this
+variable. \ref ignored_if_null.
+
+\returns ::NC_NOERR No error.
+\returns ::NC_EBADID Bad ncid.
+\returns ::NC_ENOTVAR Invalid variable ID.
+*/
+int
+nc_inq_var_fill(int ncid, int varid, int *no_fill, void *fill_valuep)
+{
+   NC* ncp;
+   int stat = NC_check_id(ncid,&ncp);
+   if(stat != NC_NOERR) return stat;
+   return ncp->dispatch->inq_var_all(
+      ncid, varid,
+      NULL, /*name*/
+      NULL, /*xtypep*/
+      NULL, /*ndimsp*/
+      NULL, /*dimidsp*/
+      NULL, /*nattsp*/
+      NULL, /*shufflep*/
+      NULL, /*deflatep*/
+      NULL, /*deflatelevelp*/
+      NULL, /*fletcher32p*/
+      NULL, /*contiguousp*/
+      NULL, /*chunksizep*/
+      no_fill, /*nofillp*/
+      fill_valuep, /*fillvaluep*/
+      NULL, /*endianp*/
+      NULL, /*optionsmaskp*/
+      NULL /*pixelsp*/
+      );
+}
+
+/** \ingroup variables
+Find the endianness of a variable.
+
+This is a wrapper for nc_inq_var_all().
+
+\param ncid NetCDF or group ID, from a previous call to nc_open(),
+nc_create(), nc_def_grp(), or associated inquiry functions such as 
+nc_inq_ncid().
+
+\param varid Variable ID
+
+\param endianp Storage which will get ::NC_ENDIAN_LITTLE if this
+variable is stored in little-endian format, ::NC_ENDIAN_BIG if it is
+stored in big-endian format, and ::NC_ENDIAN_NATIVE if the endianness
+is not set, and the variable is not created yet.
+
+\returns ::NC_NOERR No error.
+\returns ::NC_ENOTNC4 Not a netCDF-4 file. 
+\returns ::NC_EBADID Bad ncid.
+\returns ::NC_ENOTVAR Invalid variable ID.
+*/
+int
+nc_inq_var_endian(int ncid, int varid, int *endianp)
+{
+   NC* ncp;
+   int stat = NC_check_id(ncid,&ncp);
+   if(stat != NC_NOERR) return stat;
+   return ncp->dispatch->inq_var_all(
+      ncid, varid,
+      NULL, /*name*/
+      NULL, /*xtypep*/
+      NULL, /*ndimsp*/
+      NULL, /*dimidsp*/
+      NULL, /*nattsp*/
+      NULL, /*shufflep*/
+      NULL, /*deflatep*/
+      NULL, /*deflatelevelp*/
+      NULL, /*fletcher32p*/
+      NULL, /*contiguousp*/
+      NULL, /*chunksizep*/
+      NULL, /*nofillp*/
+      NULL, /*fillvaluep*/
+      endianp, /*endianp*/
+      NULL, /*optionsmaskp*/
+      NULL /*pixelsp*/
+      );
+}
+
+/** Return number and list of unlimited dimensions.
+
+In netCDF-4 files, it's possible to have multiple unlimited
+dimensions. This function returns a list of the unlimited dimension
+ids visible in a group.
+
+Dimensions are visible in a group if they have been defined in that
+group, or any ancestor group. 
+
+ncid
+    NetCDF group ID, from a previous call to nc_open, nc_create, nc_def_grp, etc.
+nunlimdimsp
+    A pointer to an int which will get the number of visible unlimited dimensions. Ignored if NULL.
+unlimdimidsp
+    A pointer to an already allocated array of int which will get the ids of all visible unlimited dimensions. Ignored if NULL. To allocate the correct length for this array, call nc_inq_unlimdims with a NULL for this parameter and use the nunlimdimsp parameter to get the number of visible unlimited dimensions. 
+
+Errors
+
+NC_NOERR
+    No error.
+NC_EBADID
+    Bad group id.
+NC_ENOTNC4
+    Attempting a netCDF-4 operation on a netCDF-3 file. NetCDF-4 operations can only be performed on files defined with a create mode which includes flag HDF5. (see nc_open).
+NC_ESTRICTNC3
+    This file was created with the strict netcdf-3 flag, therefore netcdf-4 operations are not allowed. (see nc_open).
+NC_EHDFERR
+    An error was reported by the HDF5 layer. 
+
+ */
+int
+nc_inq_unlimdims(int ncid, int *nunlimdimsp, int *unlimdimidsp)
+{
+    NC* ncp;
+    int stat = NC_check_id(ncid,&ncp);
+    if(stat != NC_NOERR) return stat;
+    return ncp->dispatch->inq_unlimdims(ncid, nunlimdimsp, 
+					unlimdimidsp);
+}
+
+#endif /* USE_NETCDF4 */
+/*! \} */  /* End of named group ...*/
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/src_netcdf4/dvarput.c
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/src_netcdf4/dvarput.c	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/src_netcdf4/dvarput.c	(revision 1749)
@@ -0,0 +1,1358 @@
+/*! \file
+Functions for writing data to variables.
+
+Copyright 2010 University Corporation for Atmospheric
+Research/Unidata. See COPYRIGHT file for more info.
+*/
+
+#include "ncdispatch.h"
+
+/** \internal
+\ingroup variables
+*/
+static int
+NC_put_vara(int ncid, int varid, const size_t *start, 
+	    const size_t *edges, const void *value, nc_type memtype)
+{
+   NC* ncp;
+   int stat = NC_check_id(ncid, &ncp);
+   if(stat != NC_NOERR) return stat;
+   if(edges == NULL) {
+      size_t shape[NC_MAX_VAR_DIMS];
+      int ndims;
+      stat = nc_inq_varndims(ncid, varid, &ndims); 
+      if(stat != NC_NOERR) return stat;
+      stat = NC_getshape(ncid, varid, ndims, shape);
+      if(stat != NC_NOERR) return stat;
+      return ncp->dispatch->put_vara(ncid, varid, start, shape, value, memtype);
+   } else
+      return ncp->dispatch->put_vara(ncid, varid, start, edges, value, memtype);
+}
+
+/** \internal
+\ingroup variables
+*/
+static int
+NC_put_var(int ncid, int varid, const void *value, nc_type memtype)
+{
+   int ndims;
+   size_t shape[NC_MAX_VAR_DIMS];
+   int stat = nc_inq_varndims(ncid,varid, &ndims);
+   if(stat) return stat;
+   stat = NC_getshape(ncid,varid, ndims, shape);
+   if(stat) return stat;
+   return NC_put_vara(ncid, varid, NC_coord_zero, shape, value, memtype);
+}
+
+/** \internal
+\ingroup variables
+*/
+static int
+NC_put_var1(int ncid, int varid, const size_t *coord, const void* value, 
+	    nc_type memtype)
+{
+   return NC_put_vara(ncid, varid, coord, NC_coord_one, value, memtype);
+}
+
+/** \internal
+\ingroup variables
+*/
+int
+NCDEFAULT_put_vars(int ncid, int varid, const size_t * start,
+	    const size_t * edges, const ptrdiff_t * stride,
+	    const void *value, nc_type memtype)
+{
+   NC* ncp;
+   int stat = NC_check_id(ncid, &ncp);
+
+   if(stat != NC_NOERR) return stat;
+   return ncp->dispatch->put_varm(ncid,varid,start,edges,stride,NULL,value,memtype);
+}
+
+/** \internal
+\ingroup variables
+*/
+int
+NCDEFAULT_put_varm(
+   int ncid,
+   int varid,
+   const size_t * start,
+   const size_t * edges,
+   const ptrdiff_t * stride,
+   const ptrdiff_t * imapp,
+   const void *value0,
+   nc_type memtype)
+{
+   int status = NC_NOERR;
+   nc_type vartype = NC_NAT;
+   int varndims = 0;
+   int maxidim = 0;
+   NC* ncp;
+   size_t memtypelen;
+   ptrdiff_t cvtmap[NC_MAX_VAR_DIMS];
+   const char* value = (char*)value0;
+
+   status = NC_check_id (ncid, &ncp);
+   if(status != NC_NOERR) return status;
+
+/*
+  if(NC_indef(ncp)) return NC_EINDEFINE;
+  if(NC_readonly (ncp)) return NC_EPERM;
+*/
+
+   /* mid body */
+   status = nc_inq_vartype(ncid, varid, &vartype); 
+   if(status != NC_NOERR) return status;
+   /* Check that this is an atomic type */
+   if(vartype >= NC_MAX_ATOMIC_TYPE)
+	return NC_EMAPTYPE;
+
+   status = nc_inq_varndims(ncid, varid, &varndims); 
+   if(status != NC_NOERR) return status;
+
+   if(memtype == NC_NAT) {
+      if(imapp != NULL && varndims != 0) {
+	 /*
+	  * convert map units from bytes to units of sizeof(type)
+	  */
+	 size_t ii;
+	 const ptrdiff_t szof = (ptrdiff_t) nctypelen(vartype);
+	 for(ii = 0; ii < varndims; ii++) {
+	    if(imapp[ii] % szof != 0) {
+	       /*free(cvtmap);*/
+	       return NC_EINVAL;
+	    }
+	    cvtmap[ii] = imapp[ii] / szof;
+	 }
+	 imapp = cvtmap;
+      }
+      memtype = vartype;
+   }
+
+   if(memtype == NC_CHAR && vartype != NC_CHAR)
+      return NC_ECHAR;
+   else if(memtype != NC_CHAR && vartype == NC_CHAR)  
+      return NC_ECHAR;
+
+   memtypelen = nctypelen(memtype);
+
+   maxidim = (int) varndims - 1;
+
+   if (maxidim < 0)
+   {
+      /*
+       * The variable is a scalar; consequently,
+       * there s only one thing to get and only one place to put it.
+       * (Why was I called?)
+       */
+      size_t edge1[1] = {1};
+      return NC_put_vara(ncid, varid, start, edge1, value, memtype);
+   }
+
+   /*
+    * else
+    * The variable is an array.
+    */
+   {
+      int idim;
+      size_t *mystart = NULL;
+      size_t *myedges;
+      size_t *iocount;    /* count vector */
+      size_t *stop;   /* stop indexes */
+      size_t *length; /* edge lengths in bytes */
+      ptrdiff_t *mystride;
+      ptrdiff_t *mymap;
+      size_t varshape[NC_MAX_VAR_DIMS];
+      int isrecvar;
+      size_t numrecs;
+      int stride1; /* is stride all ones? */
+
+      /*
+       * Verify stride argument.
+       */
+      stride1 = 1;		/*  assume ok; */
+      if(stride != NULL) {
+	 for (idim = 0; idim <= maxidim; ++idim) {
+            if ((stride[idim] == 0)
+		/* cast needed for braindead systems with signed size_t */
+                || ((unsigned long) stride[idim] >= X_INT_MAX))
+	    {
+	       return NC_ESTRIDE;
+            }
+	    if(stride[idim] != 1) stride1 = 0;
+	 }
+      }
+
+      /* If stride1 is true, and there is no imap, then call get_vara
+         directly
+      */
+      if(stride1 && imapp == NULL) {
+	 return NC_put_vara(ncid, varid, start, edges, value, memtype);
+      }
+
+      /* Compute some dimension related values */
+      isrecvar = NC_is_recvar(ncid,varid,&numrecs);
+      NC_getshape(ncid,varid,varndims,varshape);	
+
+      /* assert(sizeof(ptrdiff_t) >= sizeof(size_t)); */
+      mystart = (size_t *)calloc(varndims * 7, sizeof(ptrdiff_t));
+      if(mystart == NULL) return NC_ENOMEM;
+      myedges = mystart + varndims;
+      iocount = myedges + varndims;
+      stop = iocount + varndims;
+      length = stop + varndims;
+      mystride = (ptrdiff_t *)(length + varndims);
+      mymap = mystride + varndims;
+
+      /*
+       * Initialize I/O parameters.
+       */
+      for (idim = maxidim; idim >= 0; --idim)
+      {
+	 mystart[idim] = start != NULL
+	    ? start[idim]
+	    : 0;
+
+	 if (edges != NULL && edges[idim] == 0)
+	 {
+	    status = NC_NOERR;    /* read/write no data */
+	    goto done;
+	 }
+
+	 myedges[idim] = edges != NULL
+	    ? edges[idim]
+	    : idim == 0 && isrecvar
+	    ? numrecs - mystart[idim]
+	    : varshape[idim] - mystart[idim];
+	 mystride[idim] = stride != NULL
+	    ? stride[idim]
+	    : 1;
+	 mymap[idim] = imapp != NULL
+	    ? imapp[idim]
+	    : idim == maxidim
+	    ? 1
+	    : mymap[idim + 1] * (ptrdiff_t) myedges[idim + 1];
+
+	 iocount[idim] = 1;
+	 length[idim] = mymap[idim] * myedges[idim];
+	 stop[idim] = mystart[idim] + myedges[idim] * mystride[idim];
+      }
+
+      /*
+       * Check start, edges
+       */
+      for (idim = isrecvar; idim < maxidim; ++idim)
+      {
+	 if (mystart[idim] > varshape[idim])
+	 {
+	    status = NC_EINVALCOORDS;
+	    goto done;
+	 }
+	 if (mystart[idim] + myedges[idim] > varshape[idim])
+	 {
+	    status = NC_EEDGE;
+	    goto done;
+	 }
+      }
+
+      /* Lower body */
+      /*
+       * As an optimization, adjust I/O parameters when the fastest 
+       * dimension has unity stride both externally and internally.
+       * In this case, the user could have called a simpler routine
+       * (i.e. ncvar$1()
+       */
+      if (mystride[maxidim] == 1
+	  && mymap[maxidim] == 1)
+      {
+	 iocount[maxidim] = myedges[maxidim];
+	 mystride[maxidim] = (ptrdiff_t) myedges[maxidim];
+	 mymap[maxidim] = (ptrdiff_t) length[maxidim];
+      }
+
+      /*
+       * Perform I/O.  Exit when done.
+       */
+      for (;;)
+      {
+	 /* TODO: */
+	 int lstatus = NC_put_vara(ncid, varid, mystart, iocount,
+				   value, memtype);
+	 if (lstatus != NC_NOERR) {
+	    if(status == NC_NOERR || lstatus != NC_ERANGE)
+	       status = lstatus;
+	 }	    
+
+	 /*
+	  * The following code permutes through the variable s
+	  * external start-index space and it s internal address
+	  * space.  At the UPC, this algorithm is commonly
+	  * called "odometer code".
+	  */
+	 idim = maxidim;
+        carry:
+	 value += (mymap[idim] * memtypelen);
+	 mystart[idim] += mystride[idim];
+	 if (mystart[idim] == stop[idim])
+	 {
+	    mystart[idim] = start[idim];
+	    value -= (length[idim] * memtypelen);
+	    if (--idim < 0)
+	       break; /* normal return */
+	    goto carry;
+	 }
+      } /* I/O loop */
+     done:
+      free(mystart);
+   } /* variable is array */
+   return status;
+}
+
+/** \internal
+\ingroup variables
+*/
+static int
+NC_put_vars(int ncid, int varid, const size_t *start,
+	    const size_t *edges, const ptrdiff_t *stride,
+	    const void *value, nc_type memtype)
+{
+   NC* ncp;
+   int stat = NC_check_id(ncid, &ncp);
+
+   if(stat != NC_NOERR) return stat;
+#ifdef USE_NETCDF4
+   if(memtype >= NC_FIRSTUSERTYPEID) memtype = NC_NAT;
+#endif
+   return ncp->dispatch->put_vars(ncid,varid,start,edges,stride,value,memtype);
+}
+
+/** \internal
+\ingroup variables
+*/
+static int
+NC_put_varm(int ncid, int varid, const size_t *start, 
+	    const size_t *edges, const ptrdiff_t *stride, const ptrdiff_t* map,
+	    const void *value, nc_type memtype)
+{
+   NC* ncp;
+   int stat = NC_check_id(ncid, &ncp);
+
+   if(stat != NC_NOERR) return stat;
+#ifdef USE_NETCDF4
+   if(memtype >= NC_FIRSTUSERTYPEID) memtype = NC_NAT;
+#endif
+   return ncp->dispatch->put_varm(ncid,varid,start,edges,stride,map,value,memtype);
+}
+
+/** \name Writing Data to Variables
+
+Functions to write data from variables. */
+/*! \{ */ /* All these functions are part of this named group... */
+
+/** \ingroup variables
+Write an array of values to a variable. 
+
+The values to be written are associated with the netCDF variable by
+assuming that the last dimension of the netCDF variable varies fastest
+in the C interface. The netCDF dataset must be in data mode. The array
+to be written is specified by giving a corner and a vector of edge
+lengths to \ref specify_hyperslab.
+
+The functions for types ubyte, ushort, uint, longlong, ulonglong, and
+string are only available for netCDF-4/HDF5 files.
+
+The nc_put_var() function will write a variable of any type, including
+user defined type. For this function, the type of the data in memory
+must match the type of the variable - no data conversion is done.
+
+\param ncid NetCDF or group ID, from a previous call to nc_open(),
+nc_create(), nc_def_grp(), or associated inquiry functions such as 
+nc_inq_ncid().
+
+\param varid Variable ID
+
+\param startp Start vector with one element for each dimension to \ref
+specify_hyperslab.
+
+\param countp Count vector with one element for each dimension to \ref
+specify_hyperslab.
+
+\param op Pointer where the data will be copied. Memory must be
+allocated by the user before this function is called.
+
+\returns ::NC_NOERR No error.
+\returns ::NC_ENOTVAR Variable not found.
+\returns ::NC_EINVALCOORDS Index exceeds dimension bound.
+\returns ::NC_EEDGE Start+count exceeds dimension bound.
+\returns ::NC_ERANGE One or more of the values are out of range.
+\returns ::NC_EINDEFINE Operation not allowed in define mode.
+\returns ::NC_EBADID Bad ncid.
+ */
+/**@{*/
+int
+nc_put_vara(int ncid, int varid, const size_t *startp, 
+	    const size_t *countp, const void *op)
+{
+   NC* ncp;
+   int stat = NC_check_id(ncid, &ncp);
+   nc_type xtype;
+   if(stat != NC_NOERR) return stat;
+   stat = nc_inq_vartype(ncid, varid, &xtype);
+   if(stat != NC_NOERR) return stat;
+   return NC_put_vara(ncid, varid, startp, countp, op, xtype);
+}
+
+int
+nc_put_vara_text(int ncid, int varid, const size_t *startp, 
+		 const size_t *countp, const char *op)
+{
+   return NC_put_vara(ncid, varid, startp, countp, 
+		      (void*)op, NC_CHAR);
+}
+
+int
+nc_put_vara_schar(int ncid, int varid, const size_t *startp, 
+		  const size_t *countp, const signed char *op)
+{
+   NC* ncp;
+   int stat = NC_check_id(ncid, &ncp);
+   if(stat != NC_NOERR) return stat;
+   return NC_put_vara(ncid, varid, startp, countp, (void *)op, 
+		      NC_BYTE);
+}
+
+int
+nc_put_vara_uchar(int ncid, int varid, const size_t *startp, 
+		  const size_t *countp, const unsigned char *op)
+{
+   NC* ncp;
+   int stat = NC_check_id(ncid, &ncp);
+   if(stat != NC_NOERR) return stat;
+   return NC_put_vara(ncid, varid, startp, countp, (void *)op, 
+		      T_uchar);
+}
+
+int
+nc_put_vara_short(int ncid, int varid, const size_t *startp, 
+		  const size_t *countp, const short *op)
+{
+   NC* ncp;
+   int stat = NC_check_id(ncid, &ncp);
+   if(stat != NC_NOERR) return stat;
+   return NC_put_vara(ncid, varid, startp, countp, (void *)op, 
+		      NC_SHORT);
+}
+
+int
+nc_put_vara_int(int ncid, int varid, const size_t *startp, 
+		const size_t *countp, const int *op)
+{
+   NC* ncp;
+   int stat = NC_check_id(ncid, &ncp);
+   if(stat != NC_NOERR) return stat;
+   return NC_put_vara(ncid, varid, startp, countp, (void *)op, 
+		      NC_INT);
+}
+
+int
+nc_put_vara_long(int ncid, int varid, const size_t *startp, 
+		 const size_t *countp, const long *op)
+{
+   NC* ncp;
+   int stat = NC_check_id(ncid, &ncp);
+   if(stat != NC_NOERR) return stat;
+   return NC_put_vara(ncid, varid, startp, countp, (void *)op,
+		      T_long);
+}
+
+int
+nc_put_vara_float(int ncid, int varid, const size_t *startp, 
+		  const size_t *countp, const float *op)
+{
+   NC* ncp;
+   int stat = NC_check_id(ncid, &ncp);
+   if(stat != NC_NOERR) return stat;
+   return NC_put_vara(ncid, varid, startp, countp, (void *)op,
+		      T_float);
+}
+
+int
+nc_put_vara_double(int ncid, int varid, const size_t *startp, 
+		   const size_t *countp, const double *op)
+{
+   NC* ncp;
+   int stat = NC_check_id(ncid, &ncp);
+   if(stat != NC_NOERR) return stat;
+   return NC_put_vara(ncid, varid, startp, countp, (void *)op,
+		      T_double);
+}
+
+int
+nc_put_vara_ubyte(int ncid, int varid, const size_t *startp, 
+		  const size_t *countp, const unsigned char *op)
+{
+   NC* ncp;
+   int stat = NC_check_id(ncid, &ncp);
+   if(stat != NC_NOERR) return stat;
+   return NC_put_vara(ncid, varid, startp, countp, (void *)op,
+		      T_ubyte);
+}
+
+int
+nc_put_vara_ushort(int ncid, int varid, const size_t *startp, 
+		   const size_t *countp, const unsigned short *op)
+{
+   NC* ncp;
+   int stat = NC_check_id(ncid, &ncp);
+   if(stat != NC_NOERR) return stat;
+   return NC_put_vara(ncid, varid, startp, countp, (void *)op,
+		      T_ushort);
+}
+
+int
+nc_put_vara_uint(int ncid, int varid, const size_t *startp, 
+		 const size_t *countp, const unsigned int *op)
+{
+   NC* ncp;
+   int stat = NC_check_id(ncid, &ncp);
+   if(stat != NC_NOERR) return stat;
+   return NC_put_vara(ncid, varid, startp, countp, (void *)op,
+		      T_uint);
+}
+
+int
+nc_put_vara_longlong(int ncid, int varid, const size_t *startp, 
+		     const size_t *countp, const long long *op)
+{
+   NC* ncp;
+   int stat = NC_check_id(ncid, &ncp);
+   if(stat != NC_NOERR) return stat;
+   return NC_put_vara(ncid, varid, startp, countp, (void *)op,
+		      T_longlong);
+}
+
+int
+nc_put_vara_ulonglong(int ncid, int varid, const size_t *startp, 
+		      const size_t *countp, const unsigned long long *op)
+{
+   NC* ncp;
+   int stat = NC_check_id(ncid, &ncp);
+   if(stat != NC_NOERR) return stat;
+   return NC_put_vara(ncid, varid, startp, countp, (void *)op,
+		      NC_UINT64);
+}
+
+#ifdef USE_NETCDF4
+int
+nc_put_vara_string(int ncid, int varid, const size_t *startp, 
+		   const size_t *countp, const char* *op)
+{
+   NC* ncp;
+   int stat = NC_check_id(ncid, &ncp);
+   if(stat != NC_NOERR) return stat;
+   return NC_put_vara(ncid, varid, startp, countp, (void *)op,
+		      NC_STRING);
+}
+
+#endif /*USE_NETCDF4*/
+/**@}*/
+
+/** \ingroup variables
+Write one datum. 
+
+\param ncid NetCDF or group ID, from a previous call to nc_open(),
+nc_create(), nc_def_grp(), or associated inquiry functions such as 
+nc_inq_ncid().
+
+\param varid Variable ID
+
+\param indexp Index vector with one element for each dimension.
+
+\param op Pointer from where the data will be copied.
+
+\returns ::NC_NOERR No error.
+\returns ::NC_ENOTVAR Variable not found.
+\returns ::NC_EINVALCOORDS Index exceeds dimension bound.
+\returns ::NC_EEDGE Start+count exceeds dimension bound.
+\returns ::NC_ERANGE One or more of the values are out of range.
+\returns ::NC_EINDEFINE Operation not allowed in define mode.
+\returns ::NC_EBADID Bad ncid.
+ */
+/**@{*/
+int
+nc_put_var1(int ncid, int varid, const size_t *indexp, const void *op)
+{
+   return NC_put_var1(ncid, varid, indexp, op, NC_NAT);
+}
+
+int
+nc_put_var1_text(int ncid, int varid, const size_t *indexp, const char *op)
+{
+   NC* ncp;
+   int stat = NC_check_id(ncid, &ncp);
+   if(stat != NC_NOERR) return stat;
+   return NC_put_var1(ncid, varid, indexp, (void *)op, NC_CHAR);
+}
+
+int
+nc_put_var1_schar(int ncid, int varid, const size_t *indexp, const signed char *op)
+{
+   NC* ncp;
+   int stat = NC_check_id(ncid, &ncp);
+   if(stat != NC_NOERR) return stat;
+   return NC_put_var1(ncid, varid, indexp, (void *)op, NC_BYTE);
+}
+
+int
+nc_put_var1_uchar(int ncid, int varid, const size_t *indexp, const unsigned char *op)
+{
+   NC* ncp;
+   int stat = NC_check_id(ncid, &ncp);
+   if(stat != NC_NOERR) return stat;
+   return NC_put_var1(ncid, varid, indexp, (void *)op, NC_UBYTE);
+}
+
+int
+nc_put_var1_short(int ncid, int varid, const size_t *indexp, const short *op)
+{
+   NC* ncp;
+   int stat = NC_check_id(ncid, &ncp);
+   if(stat != NC_NOERR) return stat;
+   return NC_put_var1(ncid, varid, indexp, (void *)op, NC_SHORT);
+}
+
+int
+nc_put_var1_int(int ncid, int varid, const size_t *indexp, const int *op)
+{
+   NC* ncp;
+   int stat = NC_check_id(ncid, &ncp);
+   if(stat != NC_NOERR) return stat;
+   return NC_put_var1(ncid, varid, indexp, (void *)op, NC_INT);
+}
+
+int
+nc_put_var1_long(int ncid, int varid, const size_t *indexp, const long *op)
+{
+   NC* ncp;
+   int stat = NC_check_id(ncid, &ncp);
+   if(stat != NC_NOERR) return stat;
+   return NC_put_var1(ncid, varid, indexp, (void*)op, longtype);
+}
+
+int
+nc_put_var1_float(int ncid, int varid, const size_t *indexp, const float *op)
+{
+   NC* ncp;
+   int stat = NC_check_id(ncid, &ncp);
+   if(stat != NC_NOERR) return stat;
+   return NC_put_var1(ncid, varid, indexp, (void*)op, NC_FLOAT);
+}
+
+int
+nc_put_var1_double(int ncid, int varid, const size_t *indexp, const double *op)
+{
+   NC* ncp;
+   int stat = NC_check_id(ncid, &ncp);
+   if(stat != NC_NOERR) return stat;
+   return NC_put_var1(ncid, varid, indexp, (void *)op, NC_DOUBLE);
+}
+
+int
+nc_put_var1_ubyte(int ncid, int varid, const size_t *indexp, const unsigned char *op)
+{
+   NC* ncp;
+   int stat = NC_check_id(ncid, &ncp);
+   if(stat != NC_NOERR) return stat;
+   return NC_put_var1(ncid, varid, indexp, (void *)op, NC_UBYTE);
+}
+
+int
+nc_put_var1_ushort(int ncid, int varid, const size_t *indexp, const unsigned short *op)
+{
+   NC* ncp;
+   int stat = NC_check_id(ncid, &ncp);
+   if(stat != NC_NOERR) return stat;
+   return NC_put_var1(ncid, varid, indexp, (void *)op, NC_USHORT);
+}
+
+int
+nc_put_var1_uint(int ncid, int varid, const size_t *indexp, const unsigned int *op)
+{
+   NC* ncp;
+   int stat = NC_check_id(ncid, &ncp);
+   if(stat != NC_NOERR) return stat;
+   return NC_put_var1(ncid, varid, indexp, (void *)op, NC_UINT);
+}
+
+int
+nc_put_var1_longlong(int ncid, int varid, const size_t *indexp, const long long *op)
+{
+   NC* ncp;
+   int stat = NC_check_id(ncid, &ncp);
+   if(stat != NC_NOERR) return stat;
+   return NC_put_var1(ncid, varid, indexp, (void *)op, NC_INT64);
+}
+
+int
+nc_put_var1_ulonglong(int ncid, int varid, const size_t *indexp, const unsigned long long *op)
+{
+   NC* ncp;
+   int stat = NC_check_id(ncid, &ncp);
+   if(stat != NC_NOERR) return stat;
+   return NC_put_var1(ncid, varid, indexp, (void *)op, NC_UINT64);
+}
+
+#ifdef USE_NETCDF4
+int
+nc_put_var1_string(int ncid, int varid, const size_t *indexp, const char* *op)
+{
+   NC* ncp;
+   int stat = NC_check_id(ncid, &ncp);
+   if(stat != NC_NOERR) return stat;
+   return NC_put_var1(ncid, varid, indexp, (void*)op, NC_STRING);
+}
+#endif /*USE_NETCDF4*/
+/**@}*/
+
+/** \ingroup variables
+Write an entire variable with one call. 
+
+The nc_put_var_ type family of functions write all the values of a
+variable into a netCDF variable of an open netCDF dataset. This is the
+simplest interface to use for writing a value in a scalar variable or
+whenever all the values of a multidimensional variable can all be
+written at once. The values to be written are associated with the
+netCDF variable by assuming that the last dimension of the netCDF
+variable varies fastest in the C interface. The values are converted
+to the external data type of the variable, if necessary.
+
+Take care when using this function with record variables (variables
+that use the ::NC_UNLIMITED dimension). If you try to write all the
+values of a record variable into a netCDF file that has no record data
+yet (hence has 0 records), nothing will be written. Similarly, if you
+try to write all the values of a record variable but there are more
+records in the file than you assume, more in-memory data will be
+accessed than you supply, which may result in a segmentation
+violation. To avoid such problems, it is better to use the nc_put_vara
+interfaces for variables that use the ::NC_UNLIMITED dimension. 
+
+The functions for types ubyte, ushort, uint, longlong, ulonglong, and
+string are only available for netCDF-4/HDF5 files.
+
+The nc_put_var() function will write a variable of any type, including
+user defined type. For this function, the type of the data in memory
+must match the type of the variable - no data conversion is done.
+
+\param ncid NetCDF or group ID, from a previous call to nc_open(),
+nc_create(), nc_def_grp(), or associated inquiry functions such as 
+nc_inq_ncid().
+
+\param varid Variable ID
+
+\param op Pointer from where the data will be copied.
+
+\returns ::NC_NOERR No error.
+\returns ::NC_ENOTVAR Variable not found.
+\returns ::NC_EINVALCOORDS Index exceeds dimension bound.
+\returns ::NC_EEDGE Start+count exceeds dimension bound.
+\returns ::NC_ERANGE One or more of the values are out of range.
+\returns ::NC_EINDEFINE Operation not allowed in define mode.
+\returns ::NC_EBADID Bad ncid.
+ */
+/**@{*/
+int
+nc_put_var(int ncid, int varid, const void *op)
+{
+   return NC_put_var(ncid, varid, op, NC_NAT);
+}
+
+int
+nc_put_var_text(int ncid, int varid, const char *op)
+{
+   NC* ncp;
+   int stat = NC_check_id(ncid, &ncp);
+   if(stat != NC_NOERR) return stat;
+   return NC_put_var(ncid,varid,(void*)op,NC_CHAR);
+}
+
+int
+nc_put_var_schar(int ncid, int varid, const signed char *op)
+{
+   NC* ncp;
+   int stat = NC_check_id(ncid, &ncp);
+   if(stat != NC_NOERR) return stat;
+   return NC_put_var(ncid,varid,(void*)op,NC_BYTE);
+}
+
+int
+nc_put_var_uchar(int ncid, int varid, const unsigned char *op)
+{
+   NC* ncp;
+   int stat = NC_check_id(ncid, &ncp);
+   if(stat != NC_NOERR) return stat;
+   return NC_put_var(ncid,varid,(void*)op,T_uchar);
+}
+
+int
+nc_put_var_short(int ncid, int varid, const short *op)
+{
+   NC* ncp;
+   int stat = NC_check_id(ncid, &ncp);
+   if(stat != NC_NOERR) return stat;
+   return NC_put_var(ncid,varid,(void*)op,NC_SHORT);
+}
+
+int
+nc_put_var_int(int ncid, int varid, const int *op)
+{
+   NC* ncp;
+   int stat = NC_check_id(ncid, &ncp);
+   if(stat != NC_NOERR) return stat;
+   return NC_put_var(ncid,varid,(void*)op,NC_INT);
+}
+
+int
+nc_put_var_long(int ncid, int varid, const long *op)
+{
+   NC* ncp;
+   int stat = NC_check_id(ncid, &ncp);
+   if(stat != NC_NOERR) return stat;
+   return NC_put_var(ncid,varid,(void*)op,T_long);
+}
+
+int
+nc_put_var_float(int ncid, int varid, const float *op)
+{
+   NC* ncp;
+   int stat = NC_check_id(ncid, &ncp);
+   if(stat != NC_NOERR) return stat;
+   return NC_put_var(ncid,varid,(void*)op,T_float);
+}
+
+int
+nc_put_var_double(int ncid, int varid, const double *op)
+{
+   NC* ncp;
+   int stat = NC_check_id(ncid, &ncp);
+   if(stat != NC_NOERR) return stat;
+   return NC_put_var(ncid,varid,(void*)op,T_double);
+}
+
+int
+nc_put_var_ubyte(int ncid, int varid, const unsigned char *op)
+{
+   NC* ncp;
+   int stat = NC_check_id(ncid, &ncp);
+   if(stat != NC_NOERR) return stat;
+   return NC_put_var(ncid,varid,(void*)op,T_ubyte);
+}
+
+int
+nc_put_var_ushort(int ncid, int varid, const unsigned short *op)
+{
+   NC* ncp;
+   int stat = NC_check_id(ncid, &ncp);
+   if(stat != NC_NOERR) return stat;
+   return NC_put_var(ncid,varid,(void*)op,T_ushort);
+}
+
+int
+nc_put_var_uint(int ncid, int varid, const unsigned int *op)
+{
+   NC* ncp;
+   int stat = NC_check_id(ncid, &ncp);
+   if(stat != NC_NOERR) return stat;
+   return NC_put_var(ncid,varid,(void*)op,T_uint);
+}
+
+int
+nc_put_var_longlong(int ncid, int varid, const long long *op)
+{
+   NC* ncp;
+   int stat = NC_check_id(ncid, &ncp);
+   if(stat != NC_NOERR) return stat;
+   return NC_put_var(ncid,varid,(void*)op,T_longlong);
+}
+
+int
+nc_put_var_ulonglong(int ncid, int varid, const unsigned long long *op)
+{
+   NC* ncp;
+   int stat = NC_check_id(ncid, &ncp);
+   if(stat != NC_NOERR) return stat;
+   return NC_put_var(ncid,varid,(void*)op,NC_UINT64);
+}
+
+#ifdef USE_NETCDF4
+int
+nc_put_var_string(int ncid, int varid, const char* *op)
+{
+   NC* ncp;
+   int stat = NC_check_id(ncid, &ncp);
+   if(stat != NC_NOERR) return stat;
+   return NC_put_var(ncid,varid,(void*)op,NC_STRING);
+}
+#endif /*USE_NETCDF4*/
+/**\} */
+
+/** \ingroup variables
+Write a strided array of values to a variable. 
+
+\param ncid NetCDF or group ID, from a previous call to nc_open(),
+nc_create(), nc_def_grp(), or associated inquiry functions such as 
+nc_inq_ncid().
+
+\param varid Variable ID
+
+\param startp Start vector with one element for each dimension to \ref
+specify_hyperslab.
+
+\param countp Count vector with one element for each dimension to \ref
+specify_hyperslab.
+
+\param stridep Stride vector with one element for each dimension to
+\ref specify_hyperslab.
+
+\param op Pointer where the data will be copied. Memory must be
+allocated by the user before this function is called.
+
+\returns ::NC_NOERR No error.
+\returns ::NC_ENOTVAR Variable not found.
+\returns ::NC_EINVALCOORDS Index exceeds dimension bound.
+\returns ::NC_EEDGE Start+count exceeds dimension bound.
+\returns ::NC_ERANGE One or more of the values are out of range.
+\returns ::NC_EINDEFINE Operation not allowed in define mode.
+\returns ::NC_EBADID Bad ncid.
+ */
+/**@{*/
+int
+nc_put_vars (int ncid, int varid, const size_t *startp,
+	     const size_t *countp, const ptrdiff_t *stridep,
+	     const void *op)
+{
+   NC *ncp;
+   int stat = NC_NOERR;
+
+   if ((stat = NC_check_id(ncid, &ncp)))
+       return stat;
+   return ncp->dispatch->put_vars(ncid, varid, startp, countp, 
+				  stridep, op, NC_NAT);
+}
+
+int
+nc_put_vars_text(int ncid, int varid, const size_t *startp, 
+		 const size_t *countp, const ptrdiff_t *stridep,
+		 const char *op)
+{
+   NC *ncp;
+   int stat = NC_check_id(ncid, &ncp);
+   if(stat != NC_NOERR) return stat;
+   return NC_put_vars(ncid, varid, startp, countp,
+		      stridep,(void*)op,NC_CHAR);
+}
+
+int
+nc_put_vars_schar(int ncid, int varid, const size_t *startp, 
+		  const size_t *countp, const ptrdiff_t *stridep,
+		  const signed char *op)
+{
+   NC *ncp;
+   int stat = NC_check_id(ncid, &ncp);
+   if(stat != NC_NOERR) return stat;
+   return NC_put_vars(ncid, varid, startp, countp, 
+		      stridep,(void*)op,NC_BYTE);
+}
+
+int
+nc_put_vars_uchar(int ncid, int varid,
+		  const size_t *startp, const size_t *countp,
+		  const ptrdiff_t *stridep,
+		  const unsigned char *op)
+{
+   NC *ncp;
+   int stat = NC_check_id(ncid, &ncp);
+   if(stat != NC_NOERR) return stat;
+   return NC_put_vars(ncid, varid, startp, countp,
+		      stridep, (void *)op, T_uchar);
+}
+
+int
+nc_put_vars_short(int ncid, int varid,
+		  const size_t *startp, const size_t *countp,
+		  const ptrdiff_t *stridep,
+		  const short *op)
+{
+   NC *ncp;
+   int stat = NC_check_id(ncid, &ncp);
+   if(stat != NC_NOERR) return stat;
+   return NC_put_vars(ncid, varid, startp, countp,
+		      stridep, (void *)op, NC_SHORT);
+}
+
+int
+nc_put_vars_int(int ncid, int varid,
+		const size_t *startp, const size_t *countp,
+		const ptrdiff_t *stridep,
+		const int *op)
+{
+   NC *ncp;
+   int stat = NC_check_id(ncid, &ncp);
+   if(stat != NC_NOERR) return stat;
+   return NC_put_vars(ncid, varid, startp, countp,
+		      stridep, (void *)op, NC_INT);
+}
+
+int
+nc_put_vars_long(int ncid, int varid,
+		 const size_t *startp, const size_t *countp,
+		 const ptrdiff_t *stridep,
+		 const long *op)
+{
+   NC *ncp;
+   int stat = NC_check_id(ncid, &ncp);
+   if(stat != NC_NOERR) return stat;
+   return NC_put_vars(ncid, varid, startp, countp,
+		      stridep, (void *)op, T_long);
+}
+
+int
+nc_put_vars_float(int ncid, int varid,
+		  const size_t *startp, const size_t *countp,
+		  const ptrdiff_t *stridep,
+		  const float *op)
+{
+   NC *ncp;
+   int stat = NC_check_id(ncid, &ncp);
+   if(stat != NC_NOERR) return stat;
+   return NC_put_vars(ncid, varid, startp, countp,
+		      stridep, (void *)op, T_float);
+}
+
+int
+nc_put_vars_double(int ncid, int varid,
+		   const size_t *startp, const size_t *countp,
+		   const ptrdiff_t *stridep,
+		   const double *op)
+{
+   NC *ncp;
+   int stat = NC_check_id(ncid, &ncp);
+   if(stat != NC_NOERR) return stat;
+   return NC_put_vars(ncid, varid, startp, countp,
+		      stridep, (void *)op, T_double);
+}
+
+int
+nc_put_vars_ubyte(int ncid, int varid,
+		  const size_t *startp, const size_t *countp,
+		  const ptrdiff_t *stridep,
+		  const unsigned char *op)
+{
+   NC *ncp;
+   int stat = NC_check_id(ncid, &ncp);
+   if(stat != NC_NOERR) return stat;
+   return NC_put_vars(ncid, varid, startp, countp,
+		      stridep, (void *)op, T_ubyte);
+}
+
+int
+nc_put_vars_ushort(int ncid, int varid,
+		   const size_t *startp, const size_t *countp,
+		   const ptrdiff_t *stridep,
+		   const unsigned short *op)
+{
+   NC *ncp;
+   int stat = NC_check_id(ncid, &ncp);
+   if(stat != NC_NOERR) return stat;
+   return NC_put_vars(ncid, varid, startp, countp,
+		      stridep, (void *)op, T_ushort);
+}
+
+int
+nc_put_vars_uint(int ncid, int varid,
+		 const size_t *startp, const size_t *countp,
+		 const ptrdiff_t *stridep,
+		 const unsigned int *op)
+{
+   NC *ncp;
+   int stat = NC_check_id(ncid, &ncp);
+   if(stat != NC_NOERR) return stat;
+   return NC_put_vars(ncid, varid, startp, countp,
+		      stridep, (void *)op, T_uint);
+}
+
+int
+nc_put_vars_longlong(int ncid, int varid,
+		     const size_t *startp, const size_t *countp,
+		     const ptrdiff_t *stridep,
+		     const long long *op)
+{
+   NC *ncp;
+   int stat = NC_check_id(ncid, &ncp);
+   if(stat != NC_NOERR) return stat;
+   return NC_put_vars(ncid, varid, startp, countp,
+		      stridep, (void *)op, T_longlong);
+}
+
+int
+nc_put_vars_ulonglong(int ncid, int varid,
+		      const size_t *startp, const size_t *countp,
+		      const ptrdiff_t *stridep,
+		      const unsigned long long *op)
+{
+   NC *ncp;
+   int stat = NC_check_id(ncid, &ncp);
+   if(stat != NC_NOERR) return stat;
+   return NC_put_vars(ncid, varid, startp, countp,
+		      stridep, (void *)op, NC_UINT64);
+}
+
+#ifdef USE_NETCDF4
+int
+nc_put_vars_string(int ncid, int varid,
+		   const size_t *startp, const size_t *countp,
+		   const ptrdiff_t *stridep,
+		   const char**op)
+{
+   NC *ncp;
+   int stat = NC_check_id(ncid, &ncp);
+   if(stat != NC_NOERR) return stat;
+   return NC_put_vars(ncid, varid, startp, countp, stridep,
+		      (void *)op, NC_STRING);
+}
+#endif /*USE_NETCDF4*/
+/**\} */
+
+/** \ingroup variables
+Write a mapped array of values to a variable. 
+
+\param ncid NetCDF or group ID, from a previous call to nc_open(),
+nc_create(), nc_def_grp(), or associated inquiry functions such as 
+nc_inq_ncid().
+
+\param varid Variable ID
+
+\param startp Start vector with one element for each dimension to \ref
+specify_hyperslab.
+
+\param countp Count vector with one element for each dimension to \ref
+specify_hyperslab.
+
+\param stridep Stride vector with one element for each dimension to
+\ref specify_hyperslab.
+
+\param imapp Mapping vector with one element for each dimension to
+\ref specify_hyperslab.
+
+\param op Pointer where the data will be copied. Memory must be
+allocated by the user before this function is called.
+
+\returns ::NC_NOERR No error.
+\returns ::NC_ENOTVAR Variable not found.
+\returns ::NC_EINVALCOORDS Index exceeds dimension bound.
+\returns ::NC_EEDGE Start+count exceeds dimension bound.
+\returns ::NC_ERANGE One or more of the values are out of range.
+\returns ::NC_EINDEFINE Operation not allowed in define mode.
+\returns ::NC_EBADID Bad ncid.
+ */
+/**@{*/
+int
+nc_put_varm (int ncid, int varid, const size_t *startp,
+	     const size_t *countp, const ptrdiff_t *stridep,
+	     const ptrdiff_t *imapp, const void *op)
+{
+   NC *ncp;
+   int stat = NC_NOERR;
+
+   if ((stat = NC_check_id(ncid, &ncp)))
+       return stat;
+   return ncp->dispatch->put_varm(ncid, varid, startp, countp, 
+				  stridep, imapp, op, NC_NAT);
+}
+
+int
+nc_put_varm_text(int ncid, int varid, const size_t *startp, 
+		 const size_t *countp, const ptrdiff_t *stridep, 
+		 const ptrdiff_t *imapp, const char *op)
+{
+   NC *ncp;
+   int stat = NC_check_id(ncid, &ncp);
+   if(stat != NC_NOERR) return stat;
+   return NC_put_varm(ncid, varid, startp, countp, stridep, imapp,
+		      (void *)op, NC_CHAR);
+}
+
+int
+nc_put_varm_schar(int ncid, int varid,
+		  const size_t *startp, const size_t *countp,
+		  const ptrdiff_t *stridep, const ptrdiff_t *imapp,
+		  const signed char *op)
+{
+   NC *ncp;
+   int stat = NC_check_id(ncid, &ncp);
+   if(stat != NC_NOERR) return stat;
+   return NC_put_varm(ncid, varid, startp, countp, stridep, imapp,
+		      (void *)op, NC_BYTE);
+}
+
+int
+nc_put_varm_uchar(int ncid, int varid,
+		  const size_t *startp, const size_t *countp,
+		  const ptrdiff_t *stridep, const ptrdiff_t *imapp,
+		  const unsigned char *op)
+{
+   NC *ncp;
+   int stat = NC_check_id(ncid, &ncp);
+   if(stat != NC_NOERR) return stat;
+   return NC_put_varm(ncid, varid, startp, countp, stridep, imapp,
+		      (void *)op, T_uchar);
+}
+
+int
+nc_put_varm_short(int ncid, int varid,
+		  const size_t *startp, const size_t *countp,
+		  const ptrdiff_t *stridep, const ptrdiff_t *imapp,
+		  const short *op)
+{
+   NC *ncp;
+   int stat = NC_check_id(ncid, &ncp);
+   if(stat != NC_NOERR) return stat;
+   return NC_put_varm(ncid, varid, startp, countp, stridep, imapp,
+		      (void *)op, NC_SHORT);
+}
+
+int
+nc_put_varm_int(int ncid, int varid,
+		const size_t *startp, const size_t *countp,
+		const ptrdiff_t *stridep, const ptrdiff_t *imapp,
+		const int *op)
+{
+   NC *ncp;
+   int stat = NC_check_id(ncid, &ncp);
+   if(stat != NC_NOERR) return stat;
+   return NC_put_varm(ncid, varid, startp, countp, stridep, imapp,
+		      (void *)op, NC_INT);
+}
+
+int
+nc_put_varm_long(int ncid, int varid,
+		 const size_t *startp, const size_t *countp,
+		 const ptrdiff_t *stridep, const ptrdiff_t *imapp,
+		 const long *op)
+{
+   NC *ncp;
+   int stat = NC_check_id(ncid, &ncp);
+   if(stat != NC_NOERR) return stat;
+   return NC_put_varm(ncid, varid, startp, countp, stridep, imapp,
+		      (void *)op, T_long);
+}
+
+int
+nc_put_varm_float(int ncid, int varid,
+		  const size_t *startp, const size_t *countp,
+		  const ptrdiff_t *stridep, const ptrdiff_t *imapp,
+		  const float *op)
+{
+   NC *ncp;
+   int stat = NC_check_id(ncid, &ncp);
+   if(stat != NC_NOERR) return stat;
+   return NC_put_varm(ncid, varid, startp, countp, stridep, imapp,
+		      (void *)op, T_float);
+}
+
+int
+nc_put_varm_double(int ncid, int varid,
+		   const size_t *startp, const size_t *countp,
+		   const ptrdiff_t *stridep, const ptrdiff_t *imapp,
+		   const double *op)
+{
+   NC *ncp;
+   int stat = NC_check_id(ncid, &ncp);
+   if(stat != NC_NOERR) return stat;
+   return NC_put_varm(ncid, varid, startp, countp, stridep, imapp,
+		      (void *)op, T_double);
+}
+
+int
+nc_put_varm_ubyte(int ncid, int varid,
+		  const size_t *startp, const size_t *countp,
+		  const ptrdiff_t *stridep, const ptrdiff_t *imapp,
+		  const unsigned char *op)
+{
+   NC *ncp;
+   int stat = NC_check_id(ncid, &ncp);
+   if(stat != NC_NOERR) return stat;
+   return NC_put_varm(ncid, varid, startp, countp, stridep, imapp,
+		      (void *)op, T_ubyte);
+}
+
+int
+nc_put_varm_ushort(int ncid, int varid,
+		   const size_t *startp, const size_t *countp,
+		   const ptrdiff_t *stridep, const ptrdiff_t *imapp,
+		   const unsigned short *op)
+{
+   NC *ncp;
+   int stat = NC_check_id(ncid, &ncp);
+   if(stat != NC_NOERR) return stat;
+   return NC_put_varm(ncid, varid, startp, countp, stridep, imapp,
+		      (void *)op, T_ushort);
+}
+
+int
+nc_put_varm_uint(int ncid, int varid,
+		 const size_t *startp, const size_t *countp,
+		 const ptrdiff_t *stridep, const ptrdiff_t *imapp,
+		 const unsigned int *op)
+{
+   NC *ncp;
+   int stat = NC_check_id(ncid, &ncp);
+   if(stat != NC_NOERR) return stat;
+   return NC_put_varm(ncid, varid, startp, countp, stridep, imapp,
+		      (void *)op, T_uint);
+}
+
+int
+nc_put_varm_longlong(int ncid, int varid,
+		     const size_t *startp, const size_t *countp,
+		     const ptrdiff_t *stridep, const ptrdiff_t *imapp,
+		     const long long *op)
+{
+   NC *ncp;
+   int stat = NC_check_id(ncid, &ncp);
+   if(stat != NC_NOERR) return stat;
+   return NC_put_varm(ncid, varid, startp, countp, stridep, imapp,
+		      (void *)op, T_longlong);
+}
+
+int
+nc_put_varm_ulonglong(int ncid, int varid,
+		      const size_t *startp, const size_t *countp,
+		      const ptrdiff_t *stridep, const ptrdiff_t *imapp,
+		      const unsigned long long *op)
+{
+   NC *ncp;
+   int stat = NC_check_id(ncid, &ncp);
+   if(stat != NC_NOERR) return stat;
+   return NC_put_varm(ncid, varid, startp, countp, stridep, imapp,
+		      (void *)op, NC_UINT64);
+}
+
+#ifdef USE_NETCDF4
+int
+nc_put_varm_string(int ncid, int varid,
+		   const size_t *startp, const size_t *countp,
+		   const ptrdiff_t *stridep, const ptrdiff_t *imapp,
+		   const char**op)
+{
+   NC *ncp;
+   int stat = NC_check_id(ncid, &ncp);
+   if(stat != NC_NOERR) return stat;
+   return NC_put_varm(ncid, varid, startp, countp, stridep, imapp,
+		      (void *)op, NC_STRING);
+}
+#endif /*USE_NETCDF4*/
+/**\} */
+
+
+/*! \} */ /*End of named group... */
+
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/src_netcdf4/dvlen.c
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/src_netcdf4/dvlen.c	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/src_netcdf4/dvlen.c	(revision 1749)
@@ -0,0 +1,192 @@
+/*! \file
+  Functions for VLEN Types
+
+  Copyright 2011 University Corporation for Atmospheric
+  Research/Unidata. See \ref copyright file for more info. */
+
+#include "ncdispatch.h"
+
+/** \name Variable Length Array Types
+
+    Functions to create and learn about VLEN types. */
+/*! \{ */ /* All these functions are part of this named group... */
+
+/** 
+\ingroup user_types 
+Free memory in a VLEN object. 
+
+When you read VLEN type the library will actually allocate the storage
+space for the data. This storage space must be freed, so pass the
+pointer back to this function, when you're done with the data, and it
+will free the vlen memory.
+
+The function nc_free_vlens() is more useful than this function,
+because it can free an array of VLEN objects.
+
+\param vl pointer to the vlen object.
+
+\returns ::NC_NOERR No error.
+\returns ::NC_EBADID Bad \ref ncid.
+\returns ::NC_EBADTYPE Bad type id.
+\returns ::NC_ENOTNC4 Not an netCDF-4 file, or classic model enabled.
+\returns ::NC_EHDFERR An error was reported by the HDF5 layer.
+*/
+int
+nc_free_vlen(nc_vlen_t *vl)
+{
+   free(vl->p);
+   return NC_NOERR;
+}
+
+/** 
+\ingroup user_types 
+Free an array of vlens given the number of elements and an array. 
+
+When you read VLEN type the library will actually allocate the storage
+space for the data. This storage space must be freed, so pass the
+pointer back to this function, when you're done with the data, and it
+will free the vlen memory.
+
+\param len number of elements in the array.
+\param vlens pointer to the vlen object.
+
+\returns ::NC_NOERR No error.
+\returns ::NC_EBADID Bad \ref ncid.
+\returns ::NC_EBADTYPE Bad type id.
+\returns ::NC_ENOTNC4 Not an netCDF-4 file, or classic model enabled.
+\returns ::NC_EHDFERR An error was reported by the HDF5 layer.
+*/ 
+int
+nc_free_vlens(size_t len, nc_vlen_t vlens[])
+{
+   int ret;
+   size_t i;
+
+   for(i = 0; i < len; i++) 
+      if ((ret = nc_free_vlen(&vlens[i])))
+	 return ret;
+
+   return NC_NOERR;
+}
+
+/** 
+\ingroup user_types
+Use this function to define a variable length array type.
+
+\param ncid \ref ncid
+\param name \ref object_name of new type.
+
+\param base_typeid The typeid of the base type of the VLEN. For
+example, for a VLEN of shorts, the base type is ::NC_SHORT. This can be
+a user defined type.
+
+\param xtypep A pointer to an nc_type variable. The typeid of the new
+VLEN type will be set here.
+
+\returns ::NC_NOERR No error.
+\returns ::NC_EBADID Bad \ref ncid.
+\returns ::NC_EBADTYPE Bad type id.
+\returns ::NC_ENOTNC4 Not an netCDF-4 file, or classic model enabled.
+\returns ::NC_EHDFERR An error was reported by the HDF5 layer.
+\returns ::NC_ENAMEINUSE That name is in use.
+\returns ::NC_EMAXNAME Name exceeds max length NC_MAX_NAME.
+\returns ::NC_EBADNAME Name contains illegal characters.
+\returns ::NC_EPERM Attempt to write to a read-only file.
+\returns ::NC_ENOTINDEFINE Not in define mode. 
+ */
+int
+nc_def_vlen(int ncid, const char *name, nc_type base_typeid, nc_type *xtypep)
+{
+    NC* ncp;
+    int stat = NC_check_id(ncid,&ncp);
+    if(stat != NC_NOERR) return stat;
+    return ncp->dispatch->def_vlen(ncid,name,base_typeid,xtypep);
+}
+
+/** \ingroup user_types
+Learn about a VLEN type.
+
+\param ncid \ref ncid
+\param xtype The type of the VLEN to inquire about. 
+\param name \ref object_name of the type. \ref ignored_if_null.
+
+\param datum_sizep A pointer to a size_t, this will get the size of
+one element of this vlen. \ref ignored_if_null.
+
+\param base_nc_typep Pointer to get the base type of the VLEN. \ref
+ignored_if_null.
+
+\returns ::NC_NOERR No error.
+\returns ::NC_EBADID Bad \ref ncid.
+\returns ::NC_EBADTYPE Bad type id.
+\returns ::NC_ENOTNC4 Not an netCDF-4 file, or classic model enabled.
+\returns ::NC_EHDFERR An error was reported by the HDF5 layer.
+ */
+int
+nc_inq_vlen(int ncid, nc_type xtype, char *name, size_t *datum_sizep, nc_type *base_nc_typep)
+{
+    int class = 0;
+    int stat = nc_inq_user_type(ncid,xtype,name,datum_sizep,base_nc_typep,NULL,&class);
+    if(stat != NC_NOERR) return stat;
+    if(class != NC_VLEN) stat = NC_EBADTYPE;
+    return stat;
+}
+/*! \} */  /* End of named group ...*/
+
+/** \internal
+\ingroup user_types
+
+Put a VLEN element. This function writes an element of a VLEN for the
+Fortran APIs.
+
+\param ncid \ref ncid
+\param typeid1 Typeid of the VLEN.
+\param vlen_element Pointer to the element of the VLEN.
+\param len Lenth of the VLEN element.
+\param data VLEN data.
+
+\returns ::NC_NOERR No error.
+\returns ::NC_EBADID Bad \ref ncid.
+\returns ::NC_EBADTYPE Bad type id.
+\returns ::NC_ENOTNC4 Not an netCDF-4 file, or classic model enabled.
+\returns ::NC_EHDFERR An error was reported by the HDF5 layer.
+\returns ::NC_EPERM Attempt to write to a read-only file.
+ */
+int
+nc_put_vlen_element(int ncid, int typeid1, void *vlen_element, size_t len, const void *data)
+{
+    NC* ncp;
+    int stat = NC_check_id(ncid,&ncp);
+    if(stat != NC_NOERR) return stat;
+    return ncp->dispatch->put_vlen_element(ncid,typeid1,vlen_element,len,data);
+}
+
+/** 
+\internal
+\ingroup user_types
+
+Get a VLEN element. This function reads an element of a VLEN for the
+Fortran APIs.
+
+\param ncid \ref ncid
+\param typeid1 Typeid of the VLEN.
+\param vlen_element Pointer to the element of the VLEN.
+\param len Lenth of the VLEN element.
+\param data VLEN data.
+
+\returns ::NC_NOERR No error.
+\returns ::NC_EBADID Bad \ref ncid.
+\returns ::NC_EBADTYPE Bad type id.
+\returns ::NC_ENOTNC4 Not an netCDF-4 file, or classic model enabled.
+\returns ::NC_EHDFERR An error was reported by the HDF5 layer.
+ */
+int
+nc_get_vlen_element(int ncid, int typeid1, const void *vlen_element, 
+		    size_t *len, void *data)
+{
+    NC *ncp;
+    int stat = NC_check_id(ncid,&ncp);
+    if(stat != NC_NOERR) return stat;
+    return ncp->dispatch->get_vlen_element(ncid, typeid1, vlen_element, 
+					   len, data);
+}
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/src_netcdf4/err_macros.h
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/src_netcdf4/err_macros.h	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/src_netcdf4/err_macros.h	(revision 1749)
@@ -0,0 +1,81 @@
+/* This is part of the netCDF package.
+   Copyright 2005 University Corporation for Atmospheric Research/Unidata
+   See COPYRIGHT file for conditions of use.
+
+   Common includes, defines, etc., for test code in the libsrc4 and
+   nc_test4 directories.
+*/
+
+#ifndef _ERR_MACROS_H
+#define _ERR_MACROS_H
+
+#include <config.h>
+#include <assert.h>
+#include <stdio.h>
+#include <string.h>
+#include <stdlib.h>
+
+/* Err is used to keep track of errors within each set of tests,
+ * total_err is the number of errors in the entire test program, which
+ * generally cosists of several sets of tests. */
+static int total_err = 0, err = 0;
+
+#if 0
+/* This is handy for print statements. */
+static char *format_name[] = {"", "classic", "64-bit offset", "netCDF-4", 
+			      "netCDF-4 classic model"};
+#endif
+
+/* This macro prints an error message with line number and name of
+ * test program. */
+#define ERR do { \
+fflush(stdout); /* Make sure our stdout is synced with stderr. */ \
+err++; \
+fprintf(stderr, "Sorry! Unexpected result, %s, line: %d\n", \
+	__FILE__, __LINE__);				    \
+return 2;                                                   \
+} while (0)
+
+/* This macro prints an error message with line number and name of
+ * test program, and then exits the program. */
+
+#define ERR_RET do { \
+fflush(stdout); /* Make sure our stdout is synced with stderr. */ \
+fprintf(stderr, "Sorry! Unexpected result, %s, line: %d\n", \
+	__FILE__, __LINE__);				    \
+return 2;                                                   \
+} while (0)
+
+/* After a set of tests, report the number of errors, and increment
+ * total_err. */
+#define SUMMARIZE_ERR do { \
+   if (err) \
+   { \
+      printf("%d failures\n", err); \
+      total_err += err; \
+      err = 0; \
+   } \
+   else \
+      printf("ok.\n"); \
+} while (0)
+
+/* If extra memory debugging is not in use (as it usually isn't),
+ * define away the nc_exit function, which may be in some tests. */
+#ifndef EXTRA_MEM_DEBUG
+#define nc_exit()
+#endif
+
+/* This macro prints out our total number of errors, if any, and exits
+ * with a 0 if there are not, or a 2 if there were errors. Make will
+ * stop if a non-zero value is returned from a test program. */
+#define FINAL_RESULTS do { \
+   if (total_err) \
+   { \
+      printf("%d errors detected! Sorry!\n", total_err); \
+      return 2; \
+   } \
+   printf("*** Tests successful!\n"); \
+   return 0; \
+} while (0)
+
+#endif /* _ERR_MACROS_H */
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/src_netcdf4/error4.c
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/src_netcdf4/error4.c	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/src_netcdf4/error4.c	(revision 1749)
@@ -0,0 +1,75 @@
+/*
+
+This file is part of netcdf-4, a netCDF-like interface for HDF5, or a
+HDF5 backend for netCDF, depending on your point of view.
+
+This file contains functions relating to logging errors. Also it
+contains the functions nc_malloc, nc_calloc, and nc_free.
+
+Copyright 2003, University Corporation for Atmospheric Research. See
+netcdf-4/docs/COPYRIGHT file for copying and redistribution
+conditions.
+
+$Id: error4.c,v 1.4 2010/06/01 17:48:55 ed Exp $
+*/
+
+#include <config.h>
+#include <stdarg.h>
+#include <stdlib.h>
+#include <stdio.h>
+#include <assert.h>
+#include <hdf5.h>
+
+/* This contents of this file get skipped if LOGGING is not defined
+ * during compile. */
+#ifdef LOGGING
+
+extern int nc_log_level;
+
+/* This function prints out a message, if the severity of the message
+   is lower than the global nc_log_level. To use it, do something like
+   this:
+   
+   nc_log(0, "this computer will explode in %d seconds", i);
+
+   After the first arg (the severity), use the rest like a normal
+   printf statement. Output will appear on stdout.
+
+   This function is heavily based on the function in section 15.5 of
+   the C FAQ. */
+void 
+nc_log(int severity, const char *fmt, ...)
+{
+   va_list argp;
+   int t;
+
+   /* If the severity is greater than the log level, we don' care to
+      print this message. */
+   if (severity > nc_log_level)
+      return;
+
+   /* If the severity is zero, this is an error. Otherwise insert that
+      many tabs before the message. */
+   if (!severity)
+      fprintf(stdout, "ERROR: ");
+   for (t=0; t<severity; t++)
+      fprintf(stdout, "\t");
+
+   /* Print out the variable list of args with vprintf. */
+   va_start(argp, fmt);
+   vfprintf(stdout, fmt, argp);
+   va_end(argp);
+   
+   /* Put on a final linefeed. */
+   fprintf(stdout, "\n");
+   fflush(stdout);
+}
+
+void 
+nc_log_hdf5(void)
+{
+    H5Eprint(NULL);
+}
+
+#endif /* ifdef LOGGING */
+
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/src_netcdf4/fbits.h
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/src_netcdf4/fbits.h	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/src_netcdf4/fbits.h	(revision 1749)
@@ -0,0 +1,26 @@
+/*
+ *   Copyright 1995, University Corporation for Atmospheric Research
+ *   See top level COPYRIGHT file for copying and redistribution conditions.
+ */
+/* $Id: fbits.h,v 1.2 1995/05/26 20:46:46 davis Exp $ */
+
+#ifndef _FBITS_H_
+#define _FBITS_H_
+
+/*
+ * Macros for dealing with flag bits.
+ */
+#define fSet(t, f)       ((t) |= (f))
+#define fClr(t, f)       ((t) &= ~(f))
+#define fIsSet(t, f)     ((t) & (f))
+#define fMask(t, f)     ((t) & ~(f))
+
+/*
+ * Propositions
+ */
+/* a implies b */
+#define pIf(a,b) (!(a) || (b))
+/* a if and only if b, use == when it makes sense */
+#define pIff(a,b) (((a) && (b)) || (!(a) && !(b)))
+
+#endif /*!FBITS_H_*/
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/src_netcdf4/getvara.h
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/src_netcdf4/getvara.h	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/src_netcdf4/getvara.h	(revision 1749)
@@ -0,0 +1,40 @@
+/*********************************************************************
+ *   Copyright 1993, UCAR/Unidata
+ *   See netcdf/COPYRIGHT file for copying and redistribution conditions.
+ *   $Header: /upc/share/CVS/netcdf-3/libncdap3/getvara.h,v 1.11 2010/05/27 21:34:08 dmh Exp $
+ *********************************************************************/
+#ifndef GETVARA_H
+#define GETVARA_H
+
+/*
+Define the overall maximum cache size
+and the per-retrieval maximum size
+*/
+
+/* Use slightly misspelled names to avoid conflicts */
+#define KILBYTE 0x400
+#define MEGBYTE 0x100000
+#define GIGBYTE 0x40000000
+
+/* The cache limit is in terms of bytes */
+#define DFALTCACHELIMIT (100*MEGBYTE)
+/* The fetch limit is in terms of bytes */
+#define DFALTFETCHLIMIT (100*KILBYTE)
+
+/* WARNING: The small limit is in terms of the # of vector elements */
+#define DFALTSMALLLIMIT (1*KILBYTE)
+
+/* Max number of cache nodes */
+#define DFALTCACHECOUNT (100)
+
+typedef struct Getvara {
+    void* memory; /* where result is put*/
+    struct NCcachenode* cache;
+    struct DCEprojection* varaprojection;
+    /* associated variable*/
+    OCtype dsttype;
+    CDFnode* target;
+    int wholevariable;
+} Getvara;
+
+#endif /*GETVARA_H*/
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/src_netcdf4/getvara3.c
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/src_netcdf4/getvara3.c	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/src_netcdf4/getvara3.c	(revision 1749)
@@ -0,0 +1,1112 @@
+/*********************************************************************
+ *   Copyright 1993, UCAR/Unidata
+ *   See netcdf/COPYRIGHT file for copying and redistribution conditions.
+ *   $Header: /upc/share/CVS/netcdf-3/libncdap3/getvara3.c,v 1.44 2010/05/27 21:34:08 dmh Exp $
+ *********************************************************************/
+
+#include "ncdap3.h"
+#include "dapodom.h"
+#include "dapdump.h"
+#include "ncd3dispatch.h"
+
+
+#define NEWVARM
+
+/* Define a tracker for memory to support*/
+/* the concatenation*/
+
+struct NCMEMORY {
+    void* memory;
+    char* next; /* where to store the next chunk of data*/
+}; 
+
+/* Forward:*/
+static NCerror moveto(NCDAPCOMMON*, Getvara*, CDFnode* dataroot, void* memory);
+static NCerror movetor(NCDAPCOMMON*, OCdata currentcontent,
+		   NClist* path, int depth,
+		   Getvara*, int dimindex,
+		   struct NCMEMORY*, NClist* segments);
+
+static int findfield(CDFnode* node, CDFnode* subnode);
+static int wholeslicepoint(Dapodometer* odom);
+static NCerror removepseudodims(DCEprojection* proj);
+
+static int extract(NCDAPCOMMON*, Getvara*, CDFnode*, DCEsegment*, OClink, OCdata, struct NCMEMORY*);
+static int extractstring(NCDAPCOMMON*, Getvara*, CDFnode*, DCEsegment*, OClink, OCdata, struct NCMEMORY*);
+
+/**
+1. We build the projection to be sent to the server aka
+the fetch constraint.  We want the server do do as much work
+as possible, so we send it a url with a fetch constraint
+that is the merge of the url constraint with the vara
+constraint.
+
+The url constraint, if any, is the one that was provided
+in the url specified in nc_open().
+
+The vara constraint is the one formed from the arguments
+(start, count, stride) provided to the call to nc_get_vara().
+
+There are some exceptions to the formation of the fetch constraint.
+In all cases, the fetch constraint will use any URL selections,
+but will use different fetch projections.
+a. URL is unconstrainable (e.g. file://...):
+	   fetchprojection = null => fetch whole dataset
+b. The target variable (as specified in nc_get_vara())
+   is already in the cache and is whole variable.
+	   fetchprojection = N.A. since variable is in the cache
+c. Vara is requesting part of a variable but NCF_WHOLEVAR flag is set.
+	   fetchprojection = unsliced vara variable => fetch whole variable
+d. Vara is requesting part of a variable and NCF_WHOLEVAR flag is not set.
+	   fetchprojection = sliced vara variable => fetch part variable
+
+2. At this point, all or part of the target variable is available in the cache.
+
+3. We build a projection to walk (guide) the use of the oc
+   data procedures in extract the required data from the cache.
+   For cases a,b,c:
+       walkprojection = merge(urlprojection,varaprojection)
+   For case d:
+       walkprojection =  varaprojection without slicing.
+       This means we need only extract the complete contents of the cache.
+       Notice that this will not necessarily be a direct memory to
+       memory copy because the dap encoding still needs to be
+       interpreted. For this case, we derive a walk projection
+       from the vara projection that will properly access the cached data.
+       This walk projection shifts the merged projection so all slices
+       start at 0 and have a stride of 1.
+
+*/
+
+NCerror
+nc3d_getvarx(int ncid, int varid,
+	    const size_t *startp,
+	    const size_t *countp,
+	    const ptrdiff_t* stridep,
+	    void *data,
+	    nc_type dsttype0)
+{
+    NCerror ncstat = NC_NOERR;
+    OCerror ocstat = OC_NOERR;
+    int i;
+    NC* drno;
+    NC* substrate;
+    NCDAPCOMMON* dapcomm;
+    CDFnode* cdfvar; /* cdf node mapping to var*/
+    NClist* varnodes;
+    nc_type dsttype;
+    Getvara* varainfo = NULL;
+    CDFnode* xtarget = NULL; /* target in DATADDS */
+    CDFnode* target = NULL; /* target in constrained DDS */
+    DCEprojection* varaprojection = NULL;
+    NCcachenode* cachenode = NULL;
+    size_t localcount[NC_MAX_VAR_DIMS];
+    NClist* ncdimsall;
+    size_t ncrank;
+    NClist* vars = NULL;
+    DCEconstraint* fetchconstraint = NULL;
+    DCEprojection* fetchprojection = NULL;
+    DCEprojection* walkprojection = NULL;
+    int state;
+#define FETCHWHOLE 1 /* fetch whole data set */
+#define FETCHVAR   2 /* fetch whole variable */
+#define FETCHPART  4 /* fetch constrained variable */
+#define CACHED     8 /* whole variable is already in the cache */
+
+    ncstat = NC_check_id(ncid, (NC**)&drno); 
+    if(ncstat != NC_NOERR) goto fail;
+    dapcomm = (NCDAPCOMMON*)drno->dispatchdata;
+    
+    ncstat = NC_check_id(drno->substrate, (NC**)&substrate); 
+    if(ncstat != NC_NOERR) goto fail;
+
+    /* Locate var node via varid */
+    varnodes = dapcomm->cdf.varnodes;
+    for(i=0;i<nclistlength(varnodes);i++) {
+	CDFnode* node = (CDFnode*)nclistget(varnodes,i);
+	if(node->array.basevar == NULL
+           && node->nctype == NC_Primitive
+           && node->ncid == varid) {
+	    cdfvar = node;
+	    break;
+	}
+    }
+
+    ASSERT((cdfvar != NULL));
+
+    /* Get the dimension info */
+    ncdimsall = cdfvar->array.dimsetall;
+    ncrank = nclistlength(ncdimsall);
+
+#ifdef DEBUG
+ {
+int i;
+fprintf(stderr,"getvarx: %s",cdfvar->ncfullname);
+for(i=0;i<ncrank;i++)
+  fprintf(stderr,"[%ld:%ld:%ld]",
+	(long)startp[i],
+	(long)countp[i],
+	(long)stridep[i]
+	);
+fprintf(stderr,"\n");
+ }
+#endif
+
+    /* Fill in missing arguments */
+    if(startp == NULL)
+	startp = nc_sizevector0;
+
+    if(countp == NULL) {
+        /* Accumulate the dimension sizes */
+        for(i=0;i<ncrank;i++) {
+	    CDFnode* dim = (CDFnode*)nclistget(ncdimsall,i);
+	    localcount[i] = dim->dim.declsize;
+	}
+	countp = localcount;
+    }
+
+    if(stridep == NULL)
+	stridep = nc_ptrdiffvector1;
+
+    /* Validate the dimension sizes */
+    for(i=0;i<ncrank;i++) {
+        CDFnode* dim = (CDFnode*)nclistget(ncdimsall,i);
+	if(startp[i] > dim->dim.declsize
+	   || startp[i]+countp[i] > dim->dim.declsize) {
+	    ncstat = NC_EINVALCOORDS;
+	    goto fail;	    
+	}
+    }	     
+
+#ifdef DEBUG
+ {
+NClist* dims = cdfvar->array.dimsetall;
+fprintf(stderr,"getvarx: %s",cdfvar->ncfullname);
+if(nclistlength(dims) > 0) {int i;
+for(i=0;i<nclistlength(dims);i++) 
+fprintf(stderr,"[%lu:%lu:%lu]",(unsigned long)startp[i],(unsigned long)countp[i],(unsigned long)stridep[i]);
+fprintf(stderr," -> ");
+for(i=0;i<nclistlength(dims);i++) 
+if(stridep[i]==1)
+fprintf(stderr,"[%lu:%lu]",(unsigned long)startp[i],(unsigned long)((startp[i]+countp[i])-1));
+else
+fprintf(stderr,"[%lu:%lu:%lu]",
+(unsigned long)startp[i],
+(unsigned long)stridep[i],
+(unsigned long)(((startp[i]+countp[i])*stridep[i])-1));
+}
+fprintf(stderr,"\n");
+ }
+#endif
+
+    dsttype = (dsttype0);
+
+    /* Default to using the inquiry type for this var*/
+    if(dsttype == NC_NAT) dsttype = cdfvar->externaltype;
+
+    /* Validate any implied type conversion*/
+    if(cdfvar->etype != dsttype && dsttype == NC_CHAR) {
+        /* The only disallowed conversion is to/from char and non-byte
+           numeric types*/
+	switch (cdfvar->etype) {
+	case NC_STRING: case NC_URL:
+	case NC_CHAR: case NC_BYTE: case NC_UBYTE:
+	    break;
+	default:
+	    return THROW(NC_ECHAR);
+	}
+    }
+
+    ncstat = makegetvar34(dapcomm,cdfvar,data,dsttype,&varainfo);
+    if(ncstat != NC_NOERR) {THROWCHK(ncstat); goto fail;}
+
+    state = 0;
+    if(iscached(dapcomm,cdfvar,&cachenode)) {
+	state = CACHED;
+	ASSERT((cachenode != NULL));
+#ifdef DEBUG
+fprintf(stderr,"var is in cache\n");
+#endif
+        /* If it is cached, then it is a whole variable but may still
+           need to apply constraints during the walk */
+	ASSERT(cachenode->wholevariable); /* by construction */
+    } else if(FLAGSET(dapcomm->controls,NCF_UNCONSTRAINABLE)) {
+	state = FETCHWHOLE;
+    } else {/* load using constraints */
+        if(FLAGSET(dapcomm->controls,NCF_WHOLEVAR))
+	    state = FETCHVAR;
+	else
+	    state = FETCHPART;
+    }
+
+    ASSERT(state != 0);    
+
+    /* Convert the start/stop/stride info into a projection */
+    ncstat = buildvaraprojection3(varainfo,
+		                  startp,countp,stridep,
+                                  &varaprojection);
+    if(ncstat != NC_NOERR) {THROWCHK(ncstat); goto fail;}
+
+    fetchprojection = NULL;
+    walkprojection = NULL;
+
+    /* Create walkprojection as the merge of the url projections
+       and the vara projection; may change in FETCHPART case below*/
+    ncstat = daprestrictprojection(dapcomm->oc.dapconstraint->projections,
+				   varaprojection,&walkprojection);
+    if(ncstat != NC_NOERR) {THROWCHK(ncstat); goto fail;}
+
+#ifdef DEBUG
+fprintf(stderr,"getvarx: walkprojection: |%s|\n",dumpprojection(walkprojection));
+#endif
+
+    /* define the var list of interest */
+    vars = nclistnew();
+    nclistpush(vars,(ncelem)varainfo->target);
+
+    switch (state) {
+
+    case FETCHWHOLE: {
+        /* buildcachenode3 will create a new cachenode and
+           will also fetch the whole corresponding datadds.
+	*/
+        /* Build the complete constraint to use in the fetch */
+        fetchconstraint = (DCEconstraint*)dcecreate(CES_CONSTRAINT);
+        /* Use no projections or selections */
+        fetchconstraint->projections = nclistnew();
+        fetchconstraint->selections = nclistnew();
+#ifdef DEBUG
+fprintf(stderr,"getvarx: FETCHWHOLE: fetchconstraint: %s\n",dumpconstraint(fetchconstraint));
+#endif
+        ncstat = buildcachenode34(dapcomm,fetchconstraint,vars,&cachenode,0);
+	fetchconstraint = NULL; /*buildcachenode34 takes control of fetchconstraint.*/
+	if(ncstat != NC_NOERR) {THROWCHK(ncstat); goto fail;}
+    } break;
+
+    case CACHED: {
+    } break;
+
+    case FETCHVAR: { /* Fetch a complete single variable */
+        /* Create fetch projection as the merge of the url projections
+           and the vara projection */
+        ncstat = daprestrictprojection(dapcomm->oc.dapconstraint->projections,
+				       varaprojection,&fetchprojection);
+	/* elide any sequence and string dimensions (dap servers do not allow such). */
+	ncstat = removepseudodims(fetchprojection);
+        if(ncstat != NC_NOERR) {THROWCHK(ncstat); goto fail;}
+
+	/* Convert to a whole variable projection */
+	dcemakewholeprojection(fetchprojection);
+
+#ifdef DEBUG
+fprintf(stderr,"getvarx: FETCHVAR: fetchprojection: |%s|\n",dumpprojection(fetchprojection));
+#endif
+
+        /* Build the complete constraint to use in the fetch */
+        fetchconstraint = (DCEconstraint*)dcecreate(CES_CONSTRAINT);
+        /* merged constraint just uses the url constraint selection */
+        fetchconstraint->selections = dceclonelist(dapcomm->oc.dapconstraint->selections);
+	/* and the created fetch projection */
+        fetchconstraint->projections = nclistnew();
+	nclistpush(fetchconstraint->projections,(ncelem)fetchprojection);
+#ifdef DEBUG
+fprintf(stderr,"getvarx: FETCHVAR: fetchconstraint: %s\n",dumpconstraint(fetchconstraint));
+#endif
+        /* buildcachenode3 will create a new cachenode and
+           will also fetch the corresponding datadds.
+        */
+        ncstat = buildcachenode34(dapcomm,fetchconstraint,vars,&cachenode,0);
+	fetchconstraint = NULL; /*buildcachenode34 takes control of fetchconstraint.*/
+	if(ncstat != NC_NOERR) {THROWCHK(ncstat); goto fail;}
+    } break;
+
+    case FETCHPART: {
+        /* Create fetch projection as the merge of the url projections
+           and the vara projection */
+        ncstat = daprestrictprojection(dapcomm->oc.dapconstraint->projections,
+				       varaprojection,&fetchprojection);
+	/* elide any sequence and string dimensions (dap servers do not allow such). */
+	ncstat = removepseudodims(fetchprojection);
+        if(ncstat != NC_NOERR) {THROWCHK(ncstat); goto fail;}
+
+	/* Shift the varaprojection for simple walk */
+	dcefree((DCEnode*)walkprojection) ; /* reclaim any existing walkprojection */        
+	walkprojection = (DCEprojection*)dceclone((DCEnode*)varaprojection);
+        dapshiftprojection(walkprojection);
+
+#ifdef DEBUG
+fprintf(stderr,"getvarx: FETCHPART: fetchprojection: |%s|\n",dumpprojection(fetchprojection));
+#endif
+
+        /* Build the complete constraint to use in the fetch */
+        fetchconstraint = (DCEconstraint*)dcecreate(CES_CONSTRAINT);
+        /* merged constraint just uses the url constraint selection */
+        fetchconstraint->selections = dceclonelist(dapcomm->oc.dapconstraint->selections);
+	/* and the created fetch projection */
+        fetchconstraint->projections = nclistnew();
+	nclistpush(fetchconstraint->projections,(ncelem)fetchprojection);
+#ifdef DEBUG
+fprintf(stderr,"getvarx: FETCHPART: fetchconstraint: %s\n",dumpconstraint(fetchconstraint));
+#endif
+        /* buildcachenode3 will create a new cachenode and
+           will also fetch the corresponding datadds.
+        */
+        ncstat = buildcachenode34(dapcomm,fetchconstraint,vars,&cachenode,0);
+	fetchconstraint = NULL; /*buildcachenode34 takes control of fetchconstraint.*/
+	if(ncstat != NC_NOERR) {THROWCHK(ncstat); goto fail;}
+    } break;
+
+    default: PANIC1("unknown fetch state: %d\n",state);
+    }
+
+    ASSERT(cachenode != NULL);
+
+#ifdef DEBUG
+fprintf(stderr,"cache.datadds=%s\n",dumptree(cachenode->datadds));
+#endif
+
+    /* attach DATADDS to (constrained) DDS */
+    unattach34(dapcomm->cdf.ddsroot);
+    ncstat = attachsubset34(cachenode->datadds,dapcomm->cdf.ddsroot);
+    if(ncstat) goto fail;	
+
+    /* Fix up varainfo to use the cache */
+    varainfo->cache = cachenode;
+    cachenode = NULL;
+    varainfo->varaprojection = walkprojection;
+    walkprojection = NULL;
+
+    /* Get the var correlate from the datadds */
+    target = varainfo->target;
+    xtarget = target->attachment;
+    if(xtarget == NULL) 
+	{THROWCHK(ncstat=NC_ENODATA); goto fail;}
+
+    /* Switch to datadds tree space*/
+    varainfo->target = xtarget;
+    ncstat = moveto(dapcomm,varainfo,varainfo->cache->datadds,data);
+    if(ncstat != NC_NOERR) {THROWCHK(ncstat); goto fail;}
+
+    goto ok;
+
+fail:
+    if(ocstat != OC_NOERR) ncstat = ocerrtoncerr(ocstat);
+ok:
+    nclistfree(vars);
+    dcefree((DCEnode*)varaprojection);
+    dcefree((DCEnode*)fetchconstraint);
+    freegetvara(varainfo);
+    return THROW(ncstat);
+}
+
+/* Remove any pseudodimensions (sequence and string)*/
+static NCerror
+removepseudodims(DCEprojection* proj)
+{
+    int i;
+#ifdef DEBUG1
+fprintf(stderr,"removesequencedims.before: %s\n",dumpprojection(proj));
+#endif
+    for(i=0;i<nclistlength(proj->var->segments);i++) {
+	DCEsegment* seg = (DCEsegment*)nclistget(proj->var->segments,i);
+	CDFnode* cdfnode = (CDFnode*)seg->annotation;
+	if(cdfnode->array.seqdim != NULL)
+	    seg->rank = 0;
+	else if(cdfnode->array.stringdim != NULL)
+	    seg->rank--;
+    }
+#ifdef DEBUG1
+fprintf(stderr,"removepseudodims.after: %s\n",dumpprojection(proj));
+#endif
+    return NC_NOERR;
+}
+
+static NCerror
+moveto(NCDAPCOMMON* nccomm, Getvara* xgetvar, CDFnode* xrootnode, void* memory)
+{
+    OCerror ocstat = OC_NOERR;
+    NCerror ncstat = NC_NOERR;
+    OCconnection conn = nccomm->oc.conn;
+    OCdata xrootcontent;
+    OCobject ocroot;
+    NClist* path = nclistnew();
+    struct NCMEMORY memstate;
+
+    memstate.next = (memstate.memory = memory);
+
+    /* Get the root content*/
+    ocroot = xrootnode->tree->ocroot;
+    xrootcontent = oc_data_new(conn);
+    ocstat = oc_data_root(conn,ocroot,xrootcontent);
+    if(ocstat != OC_NOERR) {THROWCHK(ocstat); goto done;}
+
+    /* Remember: xgetvar->target is in DATADDS tree */
+    collectnodepath3(xgetvar->target,path,WITHDATASET);
+    ncstat = movetor(nccomm,xrootcontent,
+                     path,0,xgetvar,0,&memstate,
+                     xgetvar->varaprojection->var->segments);
+
+done:
+    nclistfree(path);
+    oc_data_free(conn,xrootcontent);
+    if(ocstat != OC_NOERR) ncstat = ocerrtoncerr(ocstat);
+    return THROW(ncstat);
+}
+
+static NCerror
+movetor(NCDAPCOMMON* nccomm,
+	OCdata currentcontent,
+	NClist* path,
+        int depth, /* depth is position in segment list*/
+	Getvara* xgetvar,
+        int dimindex, /* dimindex is position in xgetvar->slices*/
+	struct NCMEMORY* memory,
+	NClist* segments)
+{
+    int i;
+    OCerror ocstat = OC_NOERR;
+    NCerror ncstat = NC_NOERR;
+    size_t fieldindex,gridindex,rank;
+    OCconnection conn = nccomm->oc.conn;
+    CDFnode* xnode = (CDFnode*)nclistget(path,depth);
+    OCdata reccontent = OCNULL;
+    OCdata dimcontent = OCNULL;
+    OCdata fieldcontent = OCNULL;
+    Dapodometer* odom = OCNULL;
+    OCmode currentmode = OCNULLMODE;
+    CDFnode* xnext;
+    int hasstringdim = 0;
+    size_t dimoffset;
+    DCEsegment* segment;
+    int newdepth;
+    int caching = FLAGSET(nccomm->controls,NCF_CACHE);
+    int unconstrainable = FLAGSET(nccomm->controls,NCF_UNCONSTRAINABLE);
+
+    /* Note that we use depth-1 because the path contains the DATASET
+       but the segment list does not */
+    segment = (DCEsegment*)nclistget(segments,depth-1); /*may be NULL*/
+    if(xnode->etype == NC_STRING || xnode->etype == NC_URL) hasstringdim = 1;
+
+    ocstat = oc_data_mode(conn,currentcontent,&currentmode);
+
+#ifdef DEBUG2
+fprintf(stderr,"moveto: nctype=%d currentmode=%d depth=%d dimindex=%d",
+        xnode->nctype, currentmode, depth,dimindex);
+fprintf(stderr," segment=%s hasstringdim=%d\n",
+		dcetostring((DCEnode*)segment),hasstringdim);
+#endif
+
+    /* Switch on the combination of nctype and mode */
+#define CASE(nc1,nc2) (nc1*1024+nc2)
+
+    /* This must be consistent with the oc mode transition function */
+    switch (CASE(xnode->nctype,currentmode)) {
+
+    default:
+	PANIC2("Illegal combination: nctype=%d mode=%d",
+		(int)xnode->nctype,(int)currentmode);
+	break;
+
+    case CASE(NC_Sequence,OCFIELDMODE):
+    case CASE(NC_Dataset,OCFIELDMODE):
+    case CASE(NC_Grid,OCFIELDMODE):
+    case CASE(NC_Structure,OCFIELDMODE):
+	/* currentcontent points to the grid/dataset/structure instance */
+	xnext = (CDFnode*)nclistget(path,depth+1);
+	ASSERT((xnext != NULL));
+	fieldindex = findfield(xnode,xnext);
+	/* If the next node is a virtual node, then
+	   we need to effectively
+	   ignore it and use the appropriate subnode.
+	   If the next node is a structuregrid node, then
+	   use it as is.
+	*/
+        if(xnext->virtual) {
+	    CDFnode* xgrid = xnext;
+	    xnext = (CDFnode*)nclistget(path,depth+2); /* real node */
+	    gridindex = fieldindex;
+	    fieldindex = findfield(xgrid,xnext);
+	    fieldindex += gridindex;
+	    newdepth = depth+2;
+	} else {
+	    newdepth = depth+1;
+	}
+        fieldcontent = oc_data_new(conn);
+        ocstat = oc_data_ith(conn,currentcontent,fieldindex,fieldcontent);
+	if(ocstat != OC_NOERR) {THROWCHK(ocstat); goto fail;}
+	ncstat = movetor(nccomm,fieldcontent,
+                         path,newdepth,xgetvar,dimindex,memory,
+			 segments);
+	break;
+
+    case CASE(NC_Sequence,OCARRAYMODE): /* will actually always be scalar, but will have
+                                           rank == 1 to account for the sequence dim */
+    case CASE(NC_Grid,OCARRAYMODE): /* will actually always be scalar */
+    case CASE(NC_Structure,OCARRAYMODE):
+        /* figure out which slices refer to this node:
+           dimindex upto dimindex+rank; */
+        ASSERT((segment != NULL));
+        rank = segment->rank;
+	if(xnode->nctype == NC_Sequence)
+	    rank--; /* ignore the sequence dim */
+	if(rank == 0) {
+            odom = newdapodometer1(1);
+	} else if(caching || unconstrainable) {	
+            odom = newdapodometer(segment->slices,0,rank);	    
+	} else { /*Since vara was projected out, build a simple odometer*/
+            odom = newsimpledapodometer(segment,rank);
+	}
+        while(dapodometermore(odom)) {
+            OCmode mode;
+            /* Compute which instance to move to*/
+            dimoffset = dapodometercount(odom);
+            dimcontent = oc_data_new(conn);
+            ocstat = oc_data_ith(conn,currentcontent,dimoffset,dimcontent);
+            if(ocstat != OC_NOERR) {THROWCHK(ocstat); goto fail;}
+            ocstat = oc_data_mode(conn,dimcontent,&mode);
+            ASSERT((mode == OCFIELDMODE
+		    || (mode == OCSEQUENCEMODE && xnode->nctype == NC_Sequence)));
+            ncstat = movetor(nccomm,dimcontent,
+                                 path,depth,
+                                 xgetvar,dimindex+rank,
+                                 memory,segments);
+            dapodometerincr(odom);
+        }
+        freedapodometer(odom);
+        break;
+
+    case CASE(NC_Sequence,OCSEQUENCEMODE): {
+        DCEslice* uslice;
+        ASSERT((segment != NULL));
+        /* Get and check the corresponding sequence dimension from DDS */
+        ASSERT((xnode->attachment != NULL));
+        /* use uslice to walk the sequence; however, watch out
+           for the case when the user set a limit and that limit
+           is not actually reached in this request.
+        */
+        /* By construction, this sequence represents the first 
+           (and only) dimension of this segment */
+        uslice = &segment->slices[0];
+        reccontent = oc_data_new(conn);
+        for(i=uslice->first;i<uslice->stop;i+=uslice->stride) {
+	    OCmode eos;
+            ocstat = oc_data_ith(conn,currentcontent,i,reccontent);
+	    if(ocstat != OC_NOERR) {THROWCHK(ocstat); goto fail;}
+	    ocstat = oc_data_mode(conn,reccontent,&eos);
+	    if(ocstat != OC_NOERR) {THROWCHK(ocstat); goto fail;}
+	    if(eos == OCNULLMODE) {
+                /* We asked for too much */
+                ncstat = THROW(NC_EINVALCOORDS);
+                goto fail;
+            }
+            ncstat = movetor(nccomm,reccontent,
+                                 path,depth,
+                                 xgetvar,dimindex+1,
+                                 memory,segments);
+            if(ncstat != OC_NOERR) {THROWCHK(ncstat); goto fail;}
+        }
+        } break;
+
+    case CASE(NC_Primitive,OCPRIMITIVEMODE):
+        if(hasstringdim)
+	    ncstat = extractstring(nccomm, xgetvar, xnode, segment, conn, currentcontent, memory);
+	else	
+	    ncstat = extract(nccomm, xgetvar, xnode, segment, conn, currentcontent, memory);
+	break;
+
+    }
+    goto ok;
+
+fail:
+ok:
+    oc_data_free(conn,dimcontent);
+    oc_data_free(conn,fieldcontent);
+    oc_data_free(conn,reccontent);
+    if(ocstat != OC_NOERR) ncstat = ocerrtoncerr(ocstat);
+    return THROW(ncstat);
+}
+
+/* Determine the index in the odometer at which
+   the odometer will be walking the whole subslice
+   This will allow us to optimize.
+*/
+static int 
+wholeslicepoint(Dapodometer* odom)
+{
+    unsigned int i;
+    int point;
+    for(point=-1,i=0;i<odom->rank;i++) {
+        ASSERT((odom->slices[i].declsize != 0));
+        if(odom->slices[i].first != 0 || odom->slices[i].stride != 1
+           || odom->slices[i].length != odom->slices[i].declsize)
+	    point = i;
+    }
+    if(point == -1)
+	point = 0; /* wholevariable */
+    else if(point == (odom->rank - 1)) 
+	point = -1; /* no whole point */
+    else
+	point += 1; /* intermediate point */
+    return point;
+}
+
+static int
+findfield(CDFnode* node, CDFnode* field)
+{
+    size_t i;
+    for(i=0;i<nclistlength(node->subnodes);i++) {
+        CDFnode* test = (CDFnode*) nclistget(node->subnodes,i);
+        if(test == field) return i;
+    }
+    return -1;
+}
+
+
+int
+nc3d_getvarmx(int ncid, int varid,
+	    const size_t *start,
+	    const size_t *edges,
+	    const ptrdiff_t* stride,
+ 	    const ptrdiff_t* map,
+	    void* data,
+	    nc_type dsttype0)
+{
+    NCerror ncstat = NC_NOERR;
+    int i;
+    NC* drno;
+    NC* substrate;
+    NCDAPCOMMON* dapcomm;
+    NC_var* var;
+    CDFnode* cdfvar; /* cdf node mapping to var*/
+    NClist* varnodes;
+    nc_type dsttype;
+    size_t externsize;
+    size_t dimsizes[NC_MAX_VAR_DIMS];
+    Dapodometer* odom = NULL;
+    unsigned int ncrank;
+    NClist* ncdims = NULL;
+    size_t nelems;
+#ifdef NEWVARM
+    char* localcopy; /* of whole variable */
+#endif
+
+    ncstat = NC_check_id(ncid, (NC**)&drno); 
+    if(ncstat != NC_NOERR) goto done;
+    dapcomm = (NCDAPCOMMON*)drno->dispatchdata;
+
+    ncstat = NC_check_id(drno->substrate, (NC**)&substrate); 
+    if(ncstat != NC_NOERR) goto done;
+    var = NC_lookupvar(substrate,varid);
+    if(var == NULL) {ncstat = NC_ENOTVAR; goto done;}
+
+    /* Locate var node via varid */
+    varnodes = dapcomm->cdf.varnodes;
+    for(i=0;i<nclistlength(varnodes);i++) {
+	CDFnode* node = (CDFnode*)nclistget(varnodes,i);
+	if(node->array.basevar == NULL
+           && node->nctype == NC_Primitive
+           && node->ncid == varid) {
+	    cdfvar = node;
+	    break;
+	}
+    }
+
+    ASSERT((cdfvar != NULL));
+    ASSERT((strcmp(cdfvar->ncfullname,var->name->cp)==0));
+
+    if(nclistlength(cdfvar->array.dimsetplus) == 0) {
+       /* The variable is a scalar; consequently, there is only one
+          thing to get and only one place to put it.  (Why was I
+          called?) */
+	/* recurse with additional parameters */
+        return THROW(nc3d_getvarx(ncid,varid,
+		 NULL,NULL,NULL,
+		 data,dsttype0));
+    }
+         
+    dsttype = (dsttype0);
+
+    /* Default to using the inquiry type for this var*/
+    if(dsttype == NC_NAT) dsttype = cdfvar->externaltype;
+
+    /* Validate any implied type conversion*/
+    if(cdfvar->etype != dsttype && dsttype == NC_CHAR) {
+	/* The only disallowed conversion is to/from char and non-byte
+           numeric types*/
+	switch (cdfvar->etype) {
+	case NC_STRING: case NC_URL:
+	case NC_CHAR: case NC_BYTE: case NC_UBYTE:
+ 	    break;
+	default:
+	    return THROW(NC_ECHAR);
+	}
+    }
+
+    externsize = nctypesizeof(dsttype);
+
+    /* Accumulate the dimension sizes and the total # of elements */
+    ncdims = cdfvar->array.dimsetall;
+    ncrank = nclistlength(ncdims);
+
+    nelems = 1; /* also Compute the number of elements being retrieved */
+    for(i=0;i<ncrank;i++) {
+	CDFnode* dim = (CDFnode*)nclistget(ncdims,i);
+	dimsizes[i] = dim->dim.declsize;
+	nelems *= edges[i];
+    }
+
+    /* Originally, this code repeatedly extracted single values
+       using get_var1. In an attempt to improve performance,
+       I have converted to reading the whole variable at once
+       and walking it locally.
+    */
+
+#ifdef NEWVARM
+    localcopy = (char*)malloc(nelems*externsize);
+
+    /* We need to use the varieties of get_vars in order to
+       properly do conversion to the external type
+    */
+
+    switch (dsttype) {
+
+    case NC_CHAR:
+	ncstat = nc_get_vars_text(ncid,varid,start, edges, stride,
+				  (char*)localcopy);
+	break;
+    case NC_BYTE:
+	ncstat = nc_get_vars_schar(ncid,varid,start, edges, stride,
+				   (signed char*)localcopy);
+	break;
+    case NC_SHORT:
+	ncstat = nc_get_vars_short(ncid,varid, start, edges, stride,
+			  	   (short*)localcopy);
+	break;
+    case NC_INT:
+	ncstat = nc_get_vars_int(ncid,varid,start, edges, stride,
+				 (int*)localcopy);
+	break;
+    case NC_FLOAT:
+	ncstat = nc_get_vars_float(ncid,varid,start, edges, stride,
+				   (float*)localcopy);
+	break;
+    case NC_DOUBLE:
+	ncstat = nc_get_vars_double(ncid,varid,	start, edges, stride,
+		 		    (double*)localcopy);
+	break;
+    default: break;
+    }
+
+    odom = newdapodometer2(start,edges,stride,0,ncrank);
+
+    /* Walk the local copy */
+    for(i=0;i<nelems;i++) {
+	size_t voffset = dapodometervarmcount(odom,map,dimsizes);
+	void* dataoffset = (void*)(((char*)data) + (externsize*voffset));
+	char* localpos = (localcopy + externsize*i);
+	/* extract the indexset'th value from local copy */
+	memcpy(dataoffset,(void*)localpos,externsize);
+/*
+fprintf(stderr,"new: %lu -> %lu  %f\n",
+	(unsigned long)(i),
+        (unsigned long)voffset,
+	*(float*)localpos);
+*/
+	dapodometerincr(odom);
+    }    
+#else
+    odom = newdapodometer2(start,edges,stride,0,ncrank);
+    while(dapodometermore(odom)) {
+	size_t* indexset = dapodometerindices(odom);
+	size_t voffset = dapodometervarmcount(odom,map,dimsizes);
+	char internalmem[128];
+	char externalmem[128];
+	void* dataoffset = (void*)(((char*)data) + (externsize*voffset));
+
+	/* get the indexset'th value using variable's internal type */
+	ncstat = nc_get_var1(ncid,varid,indexset,(void*)&internalmem);
+        if(ncstat != NC_NOERR) goto done;
+	/* Convert to external type */
+	ncstat = dapconvert3(cdfvar->etype,dsttype,externalmem,internalmem);
+        if(ncstat != NC_NOERR) goto done;
+	memcpy(dataoffset,(void*)externalmem,externsize);
+/*
+fprintf(stderr,"old: %lu -> %lu  %f\n",
+	(unsigned long)dapodometercount(odom),
+        (unsigned long)voffset,
+	*(float*)externalmem);
+*/
+	dapodometerincr(odom);
+    }    
+#endif
+
+done:
+    return ncstat;
+}
+
+static int
+conversionrequired(nc_type t1, nc_type t2)
+{
+    if(t1 == t2)
+	return 0;
+    if(nctypesizeof(t1) != nctypesizeof(t2))
+	return 1;
+    /* Avoid too many cases by making t1 < t2 */
+    if(t1 > t2) {int tmp = t1; t1 = t2; t2 = tmp;}
+#undef CASE
+#define CASE(t1,t2) ((t1)<<5 | (t2))
+    switch (CASE(t1,t2)) {
+    case CASE(NC_BYTE,NC_UBYTE):
+    case CASE(NC_BYTE,NC_CHAR):
+    case CASE(NC_CHAR,NC_UBYTE):
+    case CASE(NC_SHORT,NC_USHORT):
+    case CASE(NC_INT,NC_UINT):
+    case CASE(NC_INT64,NC_UINT64):
+	return 0;
+    default: break;
+    }
+    return 1;
+}
+
+/* We are at a primitive variable or scalar that has no string dimensions.
+Extract the data.
+(This is way too complicated)
+*/
+static int
+extract(
+	NCDAPCOMMON* nccomm,
+	Getvara* xgetvar,
+	CDFnode* xnode,
+        DCEsegment* segment,
+        OClink conn,
+        OCdata currentcontent,
+	struct NCMEMORY* memory
+       )
+{
+    OCerror ocstat = OC_NOERR;
+    NCerror ncstat = NC_NOERR;
+    size_t rank;
+    Dapodometer* odom = OCNULL;
+    int wholepoint;
+    size_t externtypesize;
+    size_t interntypesize;
+    char* localmemory = NULL;
+    size_t odomsubsize;
+    size_t internlen;
+    int requireconversion;
+    char value[16]; 
+
+    ASSERT((segment != NULL));
+
+    requireconversion = conversionrequired(xgetvar->dsttype,xnode->etype);
+
+    rank = segment->rank;
+
+    if(rank == 0) {/* scalar */
+	char* mem = (requireconversion?value:memory->next);
+        ASSERT((segment != NULL));
+        externtypesize = nctypesizeof(xgetvar->dsttype);
+	ASSERT(externtypesize <= sizeof(value));
+	/* Read the whole scalar directly into memory  */
+	ocstat = oc_data_get(conn,currentcontent,mem,externtypesize,0,1);
+	if(ocstat != OC_NOERR) {THROWCHK(ocstat); goto done;}
+	if(requireconversion) {
+	    /* convert the value to external type */
+            ncstat = dapconvert3(xnode->etype,xgetvar->dsttype,memory->next,value,1);
+            if(ncstat != NC_NOERR) {THROWCHK(ncstat); goto done;}
+        }
+        memory->next += (externtypesize);
+
+    } else {/* rank > 0 */
+
+#ifdef DEBUG2
+fprintf(stderr,"moveto: primitive: segment=%s",
+                dcetostring((DCEnode*)segment));
+fprintf(stderr," iswholevariable=%d",xgetvar->cache->wholevariable);
+fprintf(stderr,"\n");
+#endif
+
+        ASSERT(xgetvar->cache != NULL);
+        if(xgetvar->cache->wholevariable) {
+            odom = newdapodometer(segment->slices,0,rank);
+        } else { /*!xgetvar->cache->wholevariable*/
+            odom = newsimpledapodometer(segment,rank);
+        }
+        /* Optimize off the use of the odometer by checking the slicing
+           to see if the whole variable, or some whole subslice
+           is being extracted.
+           However do not do this if the external type conversion is needed
+           or if the whole slice point is rank-1 (normal case anyway).
+        */
+        externtypesize = nctypesizeof(xgetvar->dsttype);
+        interntypesize = nctypesizeof(xnode->etype);
+        wholepoint = wholeslicepoint(odom);
+        if(wholepoint == -1)
+            odomsubsize = 1; /* no whole point */
+        else
+            odomsubsize = dapodometerspace(odom,wholepoint);
+        internlen = (odomsubsize*interntypesize);
+        if(requireconversion) {
+            /* copy the data locally before conversion */
+            localmemory = (char*)malloc(internlen);
+        } else {
+            localmemory = memory->next;
+        }
+
+#ifdef DEBUG2
+fprintf(stderr,"moveto: primitive: ");
+fprintf(stderr," wholepoint=%d",wholepoint);
+fprintf(stderr,"\n");
+#endif
+
+        if(wholepoint == 0) {/* whole variable */
+            /* Read the whole n elements directly into memory.*/
+            ocstat = oc_data_get(conn,currentcontent,localmemory,
+                                 internlen,0,odomsubsize);
+            if(ocstat != OC_NOERR) {THROWCHK(ocstat); goto done;}
+	    if(requireconversion) {
+                /* do conversion */
+                ncstat = dapconvert3(xnode->etype,xgetvar->dsttype,
+                                     memory->next,localmemory,odomsubsize);
+                if(ncstat != NC_NOERR) {THROWCHK(ncstat); goto done;}
+            }
+            memory->next += (externtypesize*odomsubsize);
+        } else if(wholepoint > 0) {/* whole subslice */
+            odom->rank = wholepoint; /* truncate */
+            while(dapodometermore(odom)) {
+                size_t dimoffset = dapodometercount(odom) * odomsubsize;
+                ocstat = oc_data_get(conn,currentcontent,localmemory,
+                                         internlen,dimoffset,odomsubsize);
+                if(ocstat != OC_NOERR) {THROWCHK(ocstat); goto done;}
+		if(requireconversion) {
+                    /* do conversion */
+                    ncstat = dapconvert3(xnode->etype,xgetvar->dsttype,
+                                         memory->next,localmemory,odomsubsize);
+                    if(ncstat != NC_NOERR) {THROWCHK(ncstat); goto done;}
+                }
+                memory->next += (externtypesize*odomsubsize);
+                dapodometerincr(odom);
+            }
+        } else { /* Oh well, use the odometer to walk to the
+                    appropriate fields*/
+            while(dapodometermore(odom)) {
+		char* mem = (requireconversion?value:memory->next);
+                size_t dimoffset = dapodometercount(odom);
+                ocstat = oc_data_get(conn,currentcontent,mem,externtypesize,dimoffset,1);
+                if(ocstat != OC_NOERR) {THROWCHK(ocstat); goto done;}
+		if(requireconversion) {
+                    ncstat = dapconvert3(xnode->etype,xgetvar->dsttype,memory->next,value,1);
+                    if(ncstat != NC_NOERR) {THROWCHK(ncstat); goto done;}
+		}
+                memory->next += externtypesize;
+                dapodometerincr(odom);
+            }
+        }
+        freedapodometer(odom);
+        if(requireconversion) nullfree(localmemory);
+    }
+done:
+    return THROW(ncstat);
+}
+
+
+static NCerror
+slicestring(OCconnection conn, char* stringmem, DCEslice* slice, struct NCMEMORY* memory)
+{
+    size_t stringlen;
+    unsigned int i;
+    NCerror ncstat = NC_NOERR;
+    char* lastchar;
+    size_t charcount; /* number of characters inserted into memory */
+
+    /* libnc-dap chooses to convert string escapes to the corresponding
+       character; so we do likewise.
+    */
+    dapexpandescapes(stringmem); 
+    stringlen = strlen(stringmem);
+
+#ifdef DEBUG2
+fprintf(stderr,"moveto: slicestring: string/%lu=%s\n",stringlen,stringmem);
+fprintf(stderr,"slicestring: %lu string=|%s|\n",stringlen,stringmem);
+fprintf(stderr,"slicestring: slice=[%lu:%lu:%lu/%lu]\n",
+slice->first,slice->stride,slice->stop,slice->declsize);
+#endif
+
+    /* Stride across string; if we go past end of string, then pad*/
+    charcount = 0;
+    for(i=slice->first;i<slice->length;i+=slice->stride) {
+        if(i < stringlen)
+            *memory->next = stringmem[i];
+        else /* i >= stringlen*/
+            *memory->next = NC_FILL_CHAR;
+	memory->next++;
+	charcount++;
+    }
+    lastchar = (memory->next);
+    if(charcount > 0) {
+        lastchar--;
+    }
+
+    return THROW(ncstat);
+}
+
+/*
+Extract data for a netcdf variable that has a string dimension.
+*/
+static int
+extractstring(
+	NCDAPCOMMON* nccomm,
+	Getvara* xgetvar,
+	CDFnode* xnode,
+        DCEsegment* segment,
+        OClink conn,
+        OCdata currentcontent,
+	struct NCMEMORY* memory
+       )
+{
+    NCerror ncstat = NC_NOERR;
+    OCerror ocstat = OC_NOERR;
+    int i;
+    size_t rank;
+    int caching = FLAGSET(nccomm->controls,NCF_CACHE);
+    int unconstrainable = FLAGSET(nccomm->controls,NCF_UNCONSTRAINABLE);
+    NClist* strings = NULL;
+    Dapodometer* odom = OCNULL;
+
+    rank = segment->rank;
+
+    /* A number of optimizations are possible but none is currently used. */
+
+    /* Use the odometer to walk to the appropriate fields*/
+    if(rank == 1) {
+        odom = newdapodometer1(1); /* scalar case */
+    } else if(caching || unconstrainable) {	
+        odom = newdapodometer(segment->slices,0,rank-1);	    
+    } else { /*Since vara was projected out, build a simple odometer*/
+        odom = newsimpledapodometer(segment,rank-1);
+    }
+
+    /* step thru the odometer obtaining each string and storing it in an OClist */
+    strings = nclistnew();
+    nclistsetalloc(strings,dapodometerspace(odom,0)); /* preallocate */
+    while(dapodometermore(odom)) {
+	char* value = NULL;
+	size_t dimoffset = dapodometercount(odom);
+	ocstat = oc_data_get(conn,currentcontent,&value,sizeof(value),dimoffset,1);
+	if(ocstat != OC_NOERR) goto done;
+	nclistpush(strings,(ncelem)value);	
+        dapodometerincr(odom);
+    }
+    freedapodometer(odom);
+    /* Get each string in turn, slice it and store in user
+       supplied memory */
+    for(i=0;i<nclistlength(strings);i++) {
+	char* s = (char*)nclistget(strings,i);
+	slicestring(conn,s,&segment->slices[rank-1],memory);
+	free(s);	
+    }    
+    nclistfree(strings);
+done:
+    if(ocstat != OC_NOERR) ncstat = ocerrtoncerr(ocstat);
+    return THROW(ncstat);
+}
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/src_netcdf4/lookup3.c
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/src_netcdf4/lookup3.c	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/src_netcdf4/lookup3.c	(revision 1749)
@@ -0,0 +1,1017 @@
+/*
+-------------------------------------------------------------------------------
+lookup3.c, by Bob Jenkins, May 2006, Public Domain.
+Original: http://burtleburtle.net/bob/c/lookup3.c
+Modified by Russ Rew for adaption in netCDF.
+- Make use of Paul Hsieh's pstdint.h, if stdint.h not available.
+- Declare unused functions static to keep global namespace clean.
+- Provide function hash_fast() that uses either hashlittle() or
+  hashbig(), depending on endianness.
+- Because portability is more important than speed for netCDF use, 
+  we define VALGRIND to skip "#ifndef VALGRIND" code, so reads of
+  strings don't access extra bytes after end of string.  This may 
+  slow it down enough to justify a simpler hash, but blame me, not 
+  original author!
+
+These are functions for producing 32-bit hashes for hash table lookup.
+hashword(), hashlittle(), hashlittle2(), hashbig(), mix(), and final() 
+are externally useful functions.  Routines to test the hash are included 
+if SELF_TEST is defined.  You can use this free for any purpose.  It's in
+the public domain.  It has no warranty.
+
+You probably want to use hashlittle().  hashlittle() and hashbig()
+hash byte arrays.  hashlittle() is is faster than hashbig() on
+little-endian machines.  Intel and AMD are little-endian machines.
+On second thought, you probably want hashlittle2(), which is identical to
+hashlittle() except it returns two 32-bit hashes for the price of one.  
+You could implement hashbig2() if you wanted but I haven't bothered here.
+
+If you want to find a hash of, say, exactly 7 integers, do
+  a = i1;  b = i2;  c = i3;
+  mix(a,b,c);
+  a += i4; b += i5; c += i6;
+  mix(a,b,c);
+  a += i7;
+  final(a,b,c);
+then use c as the hash value.  If you have a variable length array of
+4-byte integers to hash, use hashword().  If you have a byte array (like
+a character string), use hashlittle().  If you have several byte arrays, or
+a mix of things, see the comments above hashlittle().  
+
+Why is this so big?  I read 12 bytes at a time into 3 4-byte integers, 
+then mix those integers.  This is fast (you can do a lot more thorough
+mixing with 12*3 instructions on 3 integers than you can with 3 instructions
+on 1 byte), but shoehorning those bytes into integers efficiently is messy.
+-------------------------------------------------------------------------------
+*/
+/* #define SELF_TEST 1 */
+
+#include <config.h>
+#include <stdio.h>      /* defines printf for tests */
+#include <time.h>       /* defines time_t for timings in the test */
+#ifndef HAVE_STDINT_H
+#  include "pstdint.h"	/* attempts to define uint32_t etc portably */
+#else
+#  include <stdint.h>
+#endif /* HAVE_STDINT_H */
+#ifdef HAVE_SYS_PARAM_H
+#include <sys/param.h>  /* attempt to define endianness */
+#endif /* HAVE_SYS_PARAM_H */
+#ifdef linux
+# include <endian.h>    /* attempt to define endianness */
+#endif
+
+#define VALGRIND   /* added by Russ Rew, for portability over speed */
+
+#ifndef WORDS_BIGENDIAN		/* from config.h */
+#define HASH_LITTLE_ENDIAN 1
+#define HASH_BIG_ENDIAN 0
+#else
+#define HASH_LITTLE_ENDIAN 0
+#define HASH_BIG_ENDIAN 1
+#endif
+
+#define hashsize(n) ((uint32_t)1<<(n))
+#define hashmask(n) (hashsize(n)-1)
+#define rot(x,k) (((x)<<(k)) | ((x)>>(32-(k))))
+
+/*
+-------------------------------------------------------------------------------
+mix -- mix 3 32-bit values reversibly.
+
+This is reversible, so any information in (a,b,c) before mix() is
+still in (a,b,c) after mix().
+
+If four pairs of (a,b,c) inputs are run through mix(), or through
+mix() in reverse, there are at least 32 bits of the output that
+are sometimes the same for one pair and different for another pair.
+This was tested for:
+* pairs that differed by one bit, by two bits, in any combination
+  of top bits of (a,b,c), or in any combination of bottom bits of
+  (a,b,c).
+* "differ" is defined as +, -, ^, or ~^.  For + and -, I transformed
+  the output delta to a Gray code (a^(a>>1)) so a string of 1's (as
+  is commonly produced by subtraction) look like a single 1-bit
+  difference.
+* the base values were pseudorandom, all zero but one bit set, or 
+  all zero plus a counter that starts at zero.
+
+Some k values for my "a-=c; a^=rot(c,k); c+=b;" arrangement that
+satisfy this are
+    4  6  8 16 19  4
+    9 15  3 18 27 15
+   14  9  3  7 17  3
+Well, "9 15 3 18 27 15" didn't quite get 32 bits diffing
+for "differ" defined as + with a one-bit base and a two-bit delta.  I
+used http://burtleburtle.net/bob/hash/avalanche.html to choose 
+the operations, constants, and arrangements of the variables.
+
+This does not achieve avalanche.  There are input bits of (a,b,c)
+that fail to affect some output bits of (a,b,c), especially of a.  The
+most thoroughly mixed value is c, but it doesn't really even achieve
+avalanche in c.
+
+This allows some parallelism.  Read-after-writes are good at doubling
+the number of bits affected, so the goal of mixing pulls in the opposite
+direction as the goal of parallelism.  I did what I could.  Rotates
+seem to cost as much as shifts on every machine I could lay my hands
+on, and rotates are much kinder to the top and bottom bits, so I used
+rotates.
+-------------------------------------------------------------------------------
+*/
+#define mix(a,b,c) \
+{ \
+  a -= c;  a ^= rot(c, 4);  c += b; \
+  b -= a;  b ^= rot(a, 6);  a += c; \
+  c -= b;  c ^= rot(b, 8);  b += a; \
+  a -= c;  a ^= rot(c,16);  c += b; \
+  b -= a;  b ^= rot(a,19);  a += c; \
+  c -= b;  c ^= rot(b, 4);  b += a; \
+}
+
+/*
+-------------------------------------------------------------------------------
+final -- final mixing of 3 32-bit values (a,b,c) into c
+
+Pairs of (a,b,c) values differing in only a few bits will usually
+produce values of c that look totally different.  This was tested for
+* pairs that differed by one bit, by two bits, in any combination
+  of top bits of (a,b,c), or in any combination of bottom bits of
+  (a,b,c).
+* "differ" is defined as +, -, ^, or ~^.  For + and -, I transformed
+  the output delta to a Gray code (a^(a>>1)) so a string of 1's (as
+  is commonly produced by subtraction) look like a single 1-bit
+  difference.
+* the base values were pseudorandom, all zero but one bit set, or 
+  all zero plus a counter that starts at zero.
+
+These constants passed:
+ 14 11 25 16 4 14 24
+ 12 14 25 16 4 14 24
+and these came close:
+  4  8 15 26 3 22 24
+ 10  8 15 26 3 22 24
+ 11  8 15 26 3 22 24
+-------------------------------------------------------------------------------
+*/
+#define final(a,b,c) \
+{ \
+  c ^= b; c -= rot(b,14); \
+  a ^= c; a -= rot(c,11); \
+  b ^= a; b -= rot(a,25); \
+  c ^= b; c -= rot(b,16); \
+  a ^= c; a -= rot(c,4);  \
+  b ^= a; b -= rot(a,14); \
+  c ^= b; c -= rot(b,24); \
+}
+
+/*
+--------------------------------------------------------------------
+ This works on all machines.  To be useful, it requires
+ -- that the key be an array of uint32_t's, and
+ -- that the length be the number of uint32_t's in the key
+
+ The function hashword() is identical to hashlittle() on little-endian
+ machines, and identical to hashbig() on big-endian machines,
+ except that the length has to be measured in uint32_ts rather than in
+ bytes.  hashlittle() is more complicated than hashword() only because
+ hashlittle() has to dance around fitting the key bytes into registers.
+--------------------------------------------------------------------
+*/
+#ifdef SELF_TEST
+static
+uint32_t hashword(
+const uint32_t *k,                   /* the key, an array of uint32_t values */
+size_t          length,               /* the length of the key, in uint32_ts */
+uint32_t        initval)         /* the previous hash, or an arbitrary value */
+{
+  uint32_t a,b,c;
+
+  /* Set up the internal state */
+  a = b = c = 0xdeadbeef + (((uint32_t)length)<<2) + initval;
+
+  /*------------------------------------------------- handle most of the key */
+  while (length > 3)
+  {
+    a += k[0];
+    b += k[1];
+    c += k[2];
+    mix(a,b,c);
+    length -= 3;
+    k += 3;
+  }
+
+  /*------------------------------------------- handle the last 3 uint32_t's */
+  switch(length)                     /* all the case statements fall through */
+  { 
+  case 3 : c+=k[2];
+  case 2 : b+=k[1];
+  case 1 : a+=k[0];
+    final(a,b,c);
+  case 0:     /* case 0: nothing left to add */
+    break;
+  }
+  /*------------------------------------------------------ report the result */
+  return c;
+}
+
+/*
+--------------------------------------------------------------------
+hashword2() -- same as hashword(), but take two seeds and return two
+32-bit values.  pc and pb must both be nonnull, and *pc and *pb must
+both be initialized with seeds.  If you pass in (*pb)==0, the output 
+(*pc) will be the same as the return value from hashword().
+--------------------------------------------------------------------
+*/
+static
+void hashword2 (
+const uint32_t *k,                   /* the key, an array of uint32_t values */
+size_t          length,               /* the length of the key, in uint32_ts */
+uint32_t       *pc,                      /* IN: seed OUT: primary hash value */
+uint32_t       *pb)               /* IN: more seed OUT: secondary hash value */
+{
+  uint32_t a,b,c;
+
+  /* Set up the internal state */
+  a = b = c = 0xdeadbeef + ((uint32_t)(length<<2)) + *pc;
+  c += *pb;
+
+  /*------------------------------------------------- handle most of the key */
+  while (length > 3)
+  {
+    a += k[0];
+    b += k[1];
+    c += k[2];
+    mix(a,b,c);
+    length -= 3;
+    k += 3;
+  }
+
+  /*------------------------------------------- handle the last 3 uint32_t's */
+  switch(length)                     /* all the case statements fall through */
+  { 
+  case 3 : c+=k[2];
+  case 2 : b+=k[1];
+  case 1 : a+=k[0];
+    final(a,b,c);
+  case 0:     /* case 0: nothing left to add */
+    break;
+  }
+  /*------------------------------------------------------ report the result */
+  *pc=c; *pb=b;
+}
+
+/*
+ * hashlittle2: return 2 32-bit hash values
+ *
+ * This is identical to hashlittle(), except it returns two 32-bit hash
+ * values instead of just one.  This is good enough for hash table
+ * lookup with 2^^64 buckets, or if you want a second hash if you're not
+ * happy with the first, or if you want a probably-unique 64-bit ID for
+ * the key.  *pc is better mixed than *pb, so use *pc first.  If you want
+ * a 64-bit value do something like "*pc + (((uint64_t)*pb)<<32)".
+ */
+static void 
+hashlittle2( 
+  const void *key,       /* the key to hash */
+  size_t      length,    /* length of the key */
+  uint32_t   *pc,        /* IN: primary initval, OUT: primary hash */
+  uint32_t   *pb)        /* IN: secondary initval, OUT: secondary hash */
+{
+  uint32_t a,b,c;                                          /* internal state */
+  union { const void *ptr; size_t i; } u;     /* needed for Mac Powerbook G4 */
+
+  /* Set up the internal state */
+  a = b = c = 0xdeadbeef + ((uint32_t)length) + *pc;
+  c += *pb;
+
+  u.ptr = key;
+  if (HASH_LITTLE_ENDIAN && ((u.i & 0x3) == 0)) {
+    const uint32_t *k = (const uint32_t *)key;         /* read 32-bit chunks */
+    const uint8_t  *k8;
+
+    /*------ all but last block: aligned reads and affect 32 bits of (a,b,c) */
+    while (length > 12)
+    {
+      a += k[0];
+      b += k[1];
+      c += k[2];
+      mix(a,b,c);
+      length -= 12;
+      k += 3;
+    }
+
+    /*----------------------------- handle the last (probably partial) block */
+    /* 
+     * "k[2]&0xffffff" actually reads beyond the end of the string, but
+     * then masks off the part it's not allowed to read.  Because the
+     * string is aligned, the masked-off tail is in the same word as the
+     * rest of the string.  Every machine with memory protection I've seen
+     * does it on word boundaries, so is OK with this.  But VALGRIND will
+     * still catch it and complain.  The masking trick does make the hash
+     * noticably faster for short strings (like English words).
+     */
+#ifndef VALGRIND
+
+    switch(length)
+    {
+    case 12: c+=k[2]; b+=k[1]; a+=k[0]; break;
+    case 11: c+=k[2]&0xffffff; b+=k[1]; a+=k[0]; break;
+    case 10: c+=k[2]&0xffff; b+=k[1]; a+=k[0]; break;
+    case 9 : c+=k[2]&0xff; b+=k[1]; a+=k[0]; break;
+    case 8 : b+=k[1]; a+=k[0]; break;
+    case 7 : b+=k[1]&0xffffff; a+=k[0]; break;
+    case 6 : b+=k[1]&0xffff; a+=k[0]; break;
+    case 5 : b+=k[1]&0xff; a+=k[0]; break;
+    case 4 : a+=k[0]; break;
+    case 3 : a+=k[0]&0xffffff; break;
+    case 2 : a+=k[0]&0xffff; break;
+    case 1 : a+=k[0]&0xff; break;
+    case 0 : *pc=c; *pb=b; return;  /* zero length strings require no mixing */
+    }
+
+#else /* make valgrind happy */
+
+    k8 = (const uint8_t *)k;
+    switch(length)
+    {
+    case 12: c+=k[2]; b+=k[1]; a+=k[0]; break;
+    case 11: c+=((uint32_t)k8[10])<<16;  /* fall through */
+    case 10: c+=((uint32_t)k8[9])<<8;    /* fall through */
+    case 9 : c+=k8[8];                   /* fall through */
+    case 8 : b+=k[1]; a+=k[0]; break;
+    case 7 : b+=((uint32_t)k8[6])<<16;   /* fall through */
+    case 6 : b+=((uint32_t)k8[5])<<8;    /* fall through */
+    case 5 : b+=k8[4];                   /* fall through */
+    case 4 : a+=k[0]; break;
+    case 3 : a+=((uint32_t)k8[2])<<16;   /* fall through */
+    case 2 : a+=((uint32_t)k8[1])<<8;    /* fall through */
+    case 1 : a+=k8[0]; break;
+    case 0 : *pc=c; *pb=b; return;  /* zero length strings require no mixing */
+    }
+
+#endif /* !valgrind */
+
+  } else if (HASH_LITTLE_ENDIAN && ((u.i & 0x1) == 0)) {
+    const uint16_t *k = (const uint16_t *)key;         /* read 16-bit chunks */
+    const uint8_t  *k8;
+
+    /*--------------- all but last block: aligned reads and different mixing */
+    while (length > 12)
+    {
+      a += k[0] + (((uint32_t)k[1])<<16);
+      b += k[2] + (((uint32_t)k[3])<<16);
+      c += k[4] + (((uint32_t)k[5])<<16);
+      mix(a,b,c);
+      length -= 12;
+      k += 6;
+    }
+
+    /*----------------------------- handle the last (probably partial) block */
+    k8 = (const uint8_t *)k;
+    switch(length)
+    {
+    case 12: c+=k[4]+(((uint32_t)k[5])<<16);
+             b+=k[2]+(((uint32_t)k[3])<<16);
+             a+=k[0]+(((uint32_t)k[1])<<16);
+             break;
+    case 11: c+=((uint32_t)k8[10])<<16;     /* fall through */
+    case 10: c+=k[4];
+             b+=k[2]+(((uint32_t)k[3])<<16);
+             a+=k[0]+(((uint32_t)k[1])<<16);
+             break;
+    case 9 : c+=k8[8];                      /* fall through */
+    case 8 : b+=k[2]+(((uint32_t)k[3])<<16);
+             a+=k[0]+(((uint32_t)k[1])<<16);
+             break;
+    case 7 : b+=((uint32_t)k8[6])<<16;      /* fall through */
+    case 6 : b+=k[2];
+             a+=k[0]+(((uint32_t)k[1])<<16);
+             break;
+    case 5 : b+=k8[4];                      /* fall through */
+    case 4 : a+=k[0]+(((uint32_t)k[1])<<16);
+             break;
+    case 3 : a+=((uint32_t)k8[2])<<16;      /* fall through */
+    case 2 : a+=k[0];
+             break;
+    case 1 : a+=k8[0];
+             break;
+    case 0 : *pc=c; *pb=b; return;  /* zero length strings require no mixing */
+    }
+
+  } else {                        /* need to read the key one byte at a time */
+    const uint8_t *k = (const uint8_t *)key;
+
+    /*--------------- all but the last block: affect some 32 bits of (a,b,c) */
+    while (length > 12)
+    {
+      a += k[0];
+      a += ((uint32_t)k[1])<<8;
+      a += ((uint32_t)k[2])<<16;
+      a += ((uint32_t)k[3])<<24;
+      b += k[4];
+      b += ((uint32_t)k[5])<<8;
+      b += ((uint32_t)k[6])<<16;
+      b += ((uint32_t)k[7])<<24;
+      c += k[8];
+      c += ((uint32_t)k[9])<<8;
+      c += ((uint32_t)k[10])<<16;
+      c += ((uint32_t)k[11])<<24;
+      mix(a,b,c);
+      length -= 12;
+      k += 12;
+    }
+
+    /*-------------------------------- last block: affect all 32 bits of (c) */
+    switch(length)                   /* all the case statements fall through */
+    {
+    case 12: c+=((uint32_t)k[11])<<24;
+    case 11: c+=((uint32_t)k[10])<<16;
+    case 10: c+=((uint32_t)k[9])<<8;
+    case 9 : c+=k[8];
+    case 8 : b+=((uint32_t)k[7])<<24;
+    case 7 : b+=((uint32_t)k[6])<<16;
+    case 6 : b+=((uint32_t)k[5])<<8;
+    case 5 : b+=k[4];
+    case 4 : a+=((uint32_t)k[3])<<24;
+    case 3 : a+=((uint32_t)k[2])<<16;
+    case 2 : a+=((uint32_t)k[1])<<8;
+    case 1 : a+=k[0];
+             break;
+    case 0 : *pc=c; *pb=b; return;  /* zero length strings require no mixing */
+    }
+  }
+
+  final(a,b,c);
+  *pc=c; *pb=b;
+}
+#endif /*SELF_TEST*/
+
+
+#ifdef WORDS_BIGENDIAN
+/*
+ * hashbig():
+ * This is the same as hashword() on big-endian machines.  It is different
+ * from hashlittle() on all machines.  hashbig() takes advantage of
+ * big-endian byte ordering. 
+ */
+static uint32_t 
+hashbig( const void *key, size_t length, uint32_t initval)
+{
+  uint32_t a,b,c;
+  union { const void *ptr; size_t i; } u; /* to cast key to (size_t) happily */
+
+  /* Set up the internal state */
+  a = b = c = 0xdeadbeef + ((uint32_t)length) + initval;
+
+  u.ptr = key;
+  if (HASH_BIG_ENDIAN && ((u.i & 0x3) == 0)) {
+    const uint32_t *k = (const uint32_t *)key;         /* read 32-bit chunks */
+    const uint8_t  *k8;
+
+    /*------ all but last block: aligned reads and affect 32 bits of (a,b,c) */
+    while (length > 12)
+    {
+      a += k[0];
+      b += k[1];
+      c += k[2];
+      mix(a,b,c);
+      length -= 12;
+      k += 3;
+    }
+
+    /*----------------------------- handle the last (probably partial) block */
+    /* 
+     * "k[2]<<8" actually reads beyond the end of the string, but
+     * then shifts out the part it's not allowed to read.  Because the
+     * string is aligned, the illegal read is in the same word as the
+     * rest of the string.  Every machine with memory protection I've seen
+     * does it on word boundaries, so is OK with this.  But VALGRIND will
+     * still catch it and complain.  The masking trick does make the hash
+     * noticably faster for short strings (like English words).
+     */
+#ifndef VALGRIND
+
+    switch(length)
+    {
+    case 12: c+=k[2]; b+=k[1]; a+=k[0]; break;
+    case 11: c+=k[2]&0xffffff00; b+=k[1]; a+=k[0]; break;
+    case 10: c+=k[2]&0xffff0000; b+=k[1]; a+=k[0]; break;
+    case 9 : c+=k[2]&0xff000000; b+=k[1]; a+=k[0]; break;
+    case 8 : b+=k[1]; a+=k[0]; break;
+    case 7 : b+=k[1]&0xffffff00; a+=k[0]; break;
+    case 6 : b+=k[1]&0xffff0000; a+=k[0]; break;
+    case 5 : b+=k[1]&0xff000000; a+=k[0]; break;
+    case 4 : a+=k[0]; break;
+    case 3 : a+=k[0]&0xffffff00; break;
+    case 2 : a+=k[0]&0xffff0000; break;
+    case 1 : a+=k[0]&0xff000000; break;
+    case 0 : return c;              /* zero length strings require no mixing */
+    }
+
+#else  /* make valgrind happy */
+
+    k8 = (const uint8_t *)k;
+    switch(length)                   /* all the case statements fall through */
+    {
+    case 12: c+=k[2]; b+=k[1]; a+=k[0]; break;
+    case 11: c+=((uint32_t)k8[10])<<8;  /* fall through */
+    case 10: c+=((uint32_t)k8[9])<<16;  /* fall through */
+    case 9 : c+=((uint32_t)k8[8])<<24;  /* fall through */
+    case 8 : b+=k[1]; a+=k[0]; break;
+    case 7 : b+=((uint32_t)k8[6])<<8;   /* fall through */
+    case 6 : b+=((uint32_t)k8[5])<<16;  /* fall through */
+    case 5 : b+=((uint32_t)k8[4])<<24;  /* fall through */
+    case 4 : a+=k[0]; break;
+    case 3 : a+=((uint32_t)k8[2])<<8;   /* fall through */
+    case 2 : a+=((uint32_t)k8[1])<<16;  /* fall through */
+    case 1 : a+=((uint32_t)k8[0])<<24; break;
+    case 0 : return c;
+    }
+
+#endif /* !VALGRIND */
+
+  } else {                        /* need to read the key one byte at a time */
+    const uint8_t *k = (const uint8_t *)key;
+
+    /*--------------- all but the last block: affect some 32 bits of (a,b,c) */
+    while (length > 12)
+    {
+      a += ((uint32_t)k[0])<<24;
+      a += ((uint32_t)k[1])<<16;
+      a += ((uint32_t)k[2])<<8;
+      a += ((uint32_t)k[3]);
+      b += ((uint32_t)k[4])<<24;
+      b += ((uint32_t)k[5])<<16;
+      b += ((uint32_t)k[6])<<8;
+      b += ((uint32_t)k[7]);
+      c += ((uint32_t)k[8])<<24;
+      c += ((uint32_t)k[9])<<16;
+      c += ((uint32_t)k[10])<<8;
+      c += ((uint32_t)k[11]);
+      mix(a,b,c);
+      length -= 12;
+      k += 12;
+    }
+
+    /*-------------------------------- last block: affect all 32 bits of (c) */
+    switch(length)                   /* all the case statements fall through */
+    {
+    case 12: c+=k[11];
+    case 11: c+=((uint32_t)k[10])<<8;
+    case 10: c+=((uint32_t)k[9])<<16;
+    case 9 : c+=((uint32_t)k[8])<<24;
+    case 8 : b+=k[7];
+    case 7 : b+=((uint32_t)k[6])<<8;
+    case 6 : b+=((uint32_t)k[5])<<16;
+    case 5 : b+=((uint32_t)k[4])<<24;
+    case 4 : a+=k[3];
+    case 3 : a+=((uint32_t)k[2])<<8;
+    case 2 : a+=((uint32_t)k[1])<<16;
+    case 1 : a+=((uint32_t)k[0])<<24;
+             break;
+    case 0 : return c;
+    }
+  }
+
+  final(a,b,c);
+  return c;
+}
+#endif /*WORDS_BIGENDIAN*/
+
+/*
+-------------------------------------------------------------------------------
+hashlittle() -- hash a variable-length key into a 32-bit value
+  k       : the key (the unaligned variable-length array of bytes)
+  length  : the length of the key, counting by bytes
+  initval : can be any 4-byte value
+Returns a 32-bit value.  Every bit of the key affects every bit of
+the return value.  Two keys differing by one or two bits will have
+totally different hash values.
+
+The best hash table sizes are powers of 2.  There is no need to do
+mod a prime (mod is sooo slow!).  If you need less than 32 bits,
+use a bitmask.  For example, if you need only 10 bits, do
+  h = (h & hashmask(10));
+In which case, the hash table should have hashsize(10) elements.
+
+If you are hashing n strings (uint8_t **)k, do it like this:
+  for (i=0, h=0; i<n; ++i) h = hashlittle( k[i], len[i], h);
+
+By Bob Jenkins, 2006.  bob_jenkins@burtleburtle.net.  You may use this
+code any way you wish, private, educational, or commercial.  It's free.
+
+Use for hash table lookup, or anything where one collision in 2^^32 is
+acceptable.  Do NOT use for cryptographic purposes.
+-------------------------------------------------------------------------------
+*/
+
+static uint32_t 
+hashlittle( const void *key, size_t length, uint32_t initval)
+{
+  uint32_t a,b,c;                                          /* internal state */
+  union { const void *ptr; size_t i; } u;     /* needed for Mac Powerbook G4 */
+
+  /* Set up the internal state */
+  a = b = c = 0xdeadbeef + ((uint32_t)length) + initval;
+
+  u.ptr = key;
+  if (HASH_LITTLE_ENDIAN && ((u.i & 0x3) == 0)) {
+    const uint32_t *k = (const uint32_t *)key;         /* read 32-bit chunks */
+    const uint8_t  *k8;
+
+    /*------ all but last block: aligned reads and affect 32 bits of (a,b,c) */
+    while (length > 12)
+    {
+      a += k[0];
+      b += k[1];
+      c += k[2];
+      mix(a,b,c);
+      length -= 12;
+      k += 3;
+    }
+
+    /*----------------------------- handle the last (probably partial) block */
+    /* 
+     * "k[2]&0xffffff" actually reads beyond the end of the string, but
+     * then masks off the part it's not allowed to read.  Because the
+     * string is aligned, the masked-off tail is in the same word as the
+     * rest of the string.  Every machine with memory protection I've seen
+     * does it on word boundaries, so is OK with this.  But VALGRIND will
+     * still catch it and complain.  The masking trick does make the hash
+     * noticably faster for short strings (like English words).
+     */
+#ifndef VALGRIND
+
+    switch(length)
+    {
+    case 12: c+=k[2]; b+=k[1]; a+=k[0]; break;
+    case 11: c+=k[2]&0xffffff; b+=k[1]; a+=k[0]; break;
+    case 10: c+=k[2]&0xffff; b+=k[1]; a+=k[0]; break;
+    case 9 : c+=k[2]&0xff; b+=k[1]; a+=k[0]; break;
+    case 8 : b+=k[1]; a+=k[0]; break;
+    case 7 : b+=k[1]&0xffffff; a+=k[0]; break;
+    case 6 : b+=k[1]&0xffff; a+=k[0]; break;
+    case 5 : b+=k[1]&0xff; a+=k[0]; break;
+    case 4 : a+=k[0]; break;
+    case 3 : a+=k[0]&0xffffff; break;
+    case 2 : a+=k[0]&0xffff; break;
+    case 1 : a+=k[0]&0xff; break;
+    case 0 : return c;              /* zero length strings require no mixing */
+    }
+
+#else /* make valgrind happy */
+
+    k8 = (const uint8_t *)k;
+    switch(length)
+    {
+    case 12: c+=k[2]; b+=k[1]; a+=k[0]; break;
+    case 11: c+=((uint32_t)k8[10])<<16;  /* fall through */
+    case 10: c+=((uint32_t)k8[9])<<8;    /* fall through */
+    case 9 : c+=k8[8];                   /* fall through */
+    case 8 : b+=k[1]; a+=k[0]; break;
+    case 7 : b+=((uint32_t)k8[6])<<16;   /* fall through */
+    case 6 : b+=((uint32_t)k8[5])<<8;    /* fall through */
+    case 5 : b+=k8[4];                   /* fall through */
+    case 4 : a+=k[0]; break;
+    case 3 : a+=((uint32_t)k8[2])<<16;   /* fall through */
+    case 2 : a+=((uint32_t)k8[1])<<8;    /* fall through */
+    case 1 : a+=k8[0]; break;
+    case 0 : return c;
+    }
+
+#endif /* !valgrind */
+
+  } else if (HASH_LITTLE_ENDIAN && ((u.i & 0x1) == 0)) {
+    const uint16_t *k = (const uint16_t *)key;         /* read 16-bit chunks */
+    const uint8_t  *k8;
+
+    /*--------------- all but last block: aligned reads and different mixing */
+    while (length > 12)
+    {
+      a += k[0] + (((uint32_t)k[1])<<16);
+      b += k[2] + (((uint32_t)k[3])<<16);
+      c += k[4] + (((uint32_t)k[5])<<16);
+      mix(a,b,c);
+      length -= 12;
+      k += 6;
+    }
+
+    /*----------------------------- handle the last (probably partial) block */
+    k8 = (const uint8_t *)k;
+    switch(length)
+    {
+    case 12: c+=k[4]+(((uint32_t)k[5])<<16);
+             b+=k[2]+(((uint32_t)k[3])<<16);
+             a+=k[0]+(((uint32_t)k[1])<<16);
+             break;
+    case 11: c+=((uint32_t)k8[10])<<16;     /* fall through */
+    case 10: c+=k[4];
+             b+=k[2]+(((uint32_t)k[3])<<16);
+             a+=k[0]+(((uint32_t)k[1])<<16);
+             break;
+    case 9 : c+=k8[8];                      /* fall through */
+    case 8 : b+=k[2]+(((uint32_t)k[3])<<16);
+             a+=k[0]+(((uint32_t)k[1])<<16);
+             break;
+    case 7 : b+=((uint32_t)k8[6])<<16;      /* fall through */
+    case 6 : b+=k[2];
+             a+=k[0]+(((uint32_t)k[1])<<16);
+             break;
+    case 5 : b+=k8[4];                      /* fall through */
+    case 4 : a+=k[0]+(((uint32_t)k[1])<<16);
+             break;
+    case 3 : a+=((uint32_t)k8[2])<<16;      /* fall through */
+    case 2 : a+=k[0];
+             break;
+    case 1 : a+=k8[0];
+             break;
+    case 0 : return c;                     /* zero length requires no mixing */
+    }
+
+  } else {                        /* need to read the key one byte at a time */
+    const uint8_t *k = (const uint8_t *)key;
+
+    /*--------------- all but the last block: affect some 32 bits of (a,b,c) */
+    while (length > 12)
+    {
+      a += k[0];
+      a += ((uint32_t)k[1])<<8;
+      a += ((uint32_t)k[2])<<16;
+      a += ((uint32_t)k[3])<<24;
+      b += k[4];
+      b += ((uint32_t)k[5])<<8;
+      b += ((uint32_t)k[6])<<16;
+      b += ((uint32_t)k[7])<<24;
+      c += k[8];
+      c += ((uint32_t)k[9])<<8;
+      c += ((uint32_t)k[10])<<16;
+      c += ((uint32_t)k[11])<<24;
+      mix(a,b,c);
+      length -= 12;
+      k += 12;
+    }
+
+    /*-------------------------------- last block: affect all 32 bits of (c) */
+    switch(length)                   /* all the case statements fall through */
+    {
+    case 12: c+=((uint32_t)k[11])<<24;
+    case 11: c+=((uint32_t)k[10])<<16;
+    case 10: c+=((uint32_t)k[9])<<8;
+    case 9 : c+=k[8];
+    case 8 : b+=((uint32_t)k[7])<<24;
+    case 7 : b+=((uint32_t)k[6])<<16;
+    case 6 : b+=((uint32_t)k[5])<<8;
+    case 5 : b+=k[4];
+    case 4 : a+=((uint32_t)k[3])<<24;
+    case 3 : a+=((uint32_t)k[2])<<16;
+    case 2 : a+=((uint32_t)k[1])<<8;
+    case 1 : a+=k[0];
+             break;
+    case 0 : return c;
+    }
+  }
+
+  final(a,b,c);
+  return c;
+}
+
+
+/* 
+ * hash_fast(key, length, initval)
+ * Wrapper that calls either hashlittle or hashbig, depending on endianness.
+ */
+uint32_t
+hash_fast( const void *key, size_t length) {
+#define NC_ARBITRARY_UINT (992099683U)
+#ifndef WORDS_BIGENDIAN
+    return hashlittle(key, length, NC_ARBITRARY_UINT);
+#else
+    return hashbig(key, length, NC_ARBITRARY_UINT);
+#endif
+}
+
+#ifdef SELF_TEST
+/* used for timings */
+void driver1()
+{
+  uint8_t buf[256];
+  uint32_t i;
+  uint32_t h=0;
+  time_t a,z;
+
+  time(&a);
+  for (i=0; i<256; ++i) buf[i] = 'x';
+  for (i=0; i<1; ++i) 
+  {
+    h = hashlittle(&buf[0],1,h);
+  }
+  time(&z);
+  if (z-a > 0) printf("time %d %.8x\n", z-a, h);
+}
+
+/* check that every input bit changes every output bit half the time */
+#define HASHSTATE 1
+#define HASHLEN   1
+#define MAXPAIR 60
+#define MAXLEN  70
+void driver2()
+{
+  uint8_t qa[MAXLEN+1], qb[MAXLEN+2], *a = &qa[0], *b = &qb[1];
+  uint32_t c[HASHSTATE], d[HASHSTATE], i=0, j=0, k, l, m=0, z;
+  uint32_t e[HASHSTATE],f[HASHSTATE],g[HASHSTATE],h[HASHSTATE];
+  uint32_t x[HASHSTATE],y[HASHSTATE];
+  uint32_t hlen;
+
+  printf("No more than %d trials should ever be needed \n",MAXPAIR/2);
+  for (hlen=0; hlen < MAXLEN; ++hlen)
+  {
+    z=0;
+    for (i=0; i<hlen; ++i)  /*----------------------- for each input byte, */
+    {
+      for (j=0; j<8; ++j)   /*------------------------ for each input bit, */
+      {
+	for (m=1; m<8; ++m) /*------------ for serveral possible initvals, */
+	{
+	  for (l=0; l<HASHSTATE; ++l)
+	    e[l]=f[l]=g[l]=h[l]=x[l]=y[l]=~((uint32_t)0);
+
+      	  /*---- check that every output bit is affected by that input bit */
+	  for (k=0; k<MAXPAIR; k+=2)
+	  { 
+	    uint32_t finished=1;
+	    /* keys have one bit different */
+	    for (l=0; l<hlen+1; ++l) {a[l] = b[l] = (uint8_t)0;}
+	    /* have a and b be two keys differing in only one bit */
+	    a[i] ^= (k<<j);
+	    a[i] ^= (k>>(8-j));
+	     c[0] = hashlittle(a, hlen, m);
+	    b[i] ^= ((k+1)<<j);
+	    b[i] ^= ((k+1)>>(8-j));
+	     d[0] = hashlittle(b, hlen, m);
+	    /* check every bit is 1, 0, set, and not set at least once */
+	    for (l=0; l<HASHSTATE; ++l)
+	    {
+	      e[l] &= (c[l]^d[l]);
+	      f[l] &= ~(c[l]^d[l]);
+	      g[l] &= c[l];
+	      h[l] &= ~c[l];
+	      x[l] &= d[l];
+	      y[l] &= ~d[l];
+	      if (e[l]|f[l]|g[l]|h[l]|x[l]|y[l]) finished=0;
+	    }
+	    if (finished) break;
+	  }
+	  if (k>z) z=k;
+	  if (k==MAXPAIR) 
+	  {
+	     printf("Some bit didn't change: ");
+	     printf("%.8x %.8x %.8x %.8x %.8x %.8x  ",
+	            e[0],f[0],g[0],h[0],x[0],y[0]);
+	     printf("i %d j %d m %d len %d\n", i, j, m, hlen);
+	  }
+	  if (z==MAXPAIR) goto done;
+	}
+      }
+    }
+   done:
+    if (z < MAXPAIR)
+    {
+      printf("Mix success  %2d bytes  %2d initvals  ",i,m);
+      printf("required  %d  trials\n", z/2);
+    }
+  }
+  printf("\n");
+}
+
+/* Check for reading beyond the end of the buffer and alignment problems */
+void driver3()
+{
+  uint8_t buf[MAXLEN+20], *b;
+  uint32_t len;
+  uint8_t q[] = "This is the time for all good men to come to the aid of their country...";
+  uint32_t h;
+  uint8_t qq[] = "xThis is the time for all good men to come to the aid of their country...";
+  uint32_t i;
+  uint8_t qqq[] = "xxThis is the time for all good men to come to the aid of their country...";
+  uint32_t j;
+  uint8_t qqqq[] = "xxxThis is the time for all good men to come to the aid of their country...";
+  uint32_t ref,x,y;
+  uint8_t *p;
+
+  printf("Endianness.  These lines should all be the same (for values filled in):\n");
+  printf("%.8x                            %.8x                            %.8x\n",
+         hashword((const uint32_t *)q, (sizeof(q)-1)/4, 13),
+         hashword((const uint32_t *)q, (sizeof(q)-5)/4, 13),
+         hashword((const uint32_t *)q, (sizeof(q)-9)/4, 13));
+  p = q;
+  printf("%.8x %.8x %.8x %.8x %.8x %.8x %.8x %.8x %.8x %.8x %.8x %.8x\n",
+         hashlittle(p, sizeof(q)-1, 13), hashlittle(p, sizeof(q)-2, 13),
+         hashlittle(p, sizeof(q)-3, 13), hashlittle(p, sizeof(q)-4, 13),
+         hashlittle(p, sizeof(q)-5, 13), hashlittle(p, sizeof(q)-6, 13),
+         hashlittle(p, sizeof(q)-7, 13), hashlittle(p, sizeof(q)-8, 13),
+         hashlittle(p, sizeof(q)-9, 13), hashlittle(p, sizeof(q)-10, 13),
+         hashlittle(p, sizeof(q)-11, 13), hashlittle(p, sizeof(q)-12, 13));
+  p = &qq[1];
+  printf("%.8x %.8x %.8x %.8x %.8x %.8x %.8x %.8x %.8x %.8x %.8x %.8x\n",
+         hashlittle(p, sizeof(q)-1, 13), hashlittle(p, sizeof(q)-2, 13),
+         hashlittle(p, sizeof(q)-3, 13), hashlittle(p, sizeof(q)-4, 13),
+         hashlittle(p, sizeof(q)-5, 13), hashlittle(p, sizeof(q)-6, 13),
+         hashlittle(p, sizeof(q)-7, 13), hashlittle(p, sizeof(q)-8, 13),
+         hashlittle(p, sizeof(q)-9, 13), hashlittle(p, sizeof(q)-10, 13),
+         hashlittle(p, sizeof(q)-11, 13), hashlittle(p, sizeof(q)-12, 13));
+  p = &qqq[2];
+  printf("%.8x %.8x %.8x %.8x %.8x %.8x %.8x %.8x %.8x %.8x %.8x %.8x\n",
+         hashlittle(p, sizeof(q)-1, 13), hashlittle(p, sizeof(q)-2, 13),
+         hashlittle(p, sizeof(q)-3, 13), hashlittle(p, sizeof(q)-4, 13),
+         hashlittle(p, sizeof(q)-5, 13), hashlittle(p, sizeof(q)-6, 13),
+         hashlittle(p, sizeof(q)-7, 13), hashlittle(p, sizeof(q)-8, 13),
+         hashlittle(p, sizeof(q)-9, 13), hashlittle(p, sizeof(q)-10, 13),
+         hashlittle(p, sizeof(q)-11, 13), hashlittle(p, sizeof(q)-12, 13));
+  p = &qqqq[3];
+  printf("%.8x %.8x %.8x %.8x %.8x %.8x %.8x %.8x %.8x %.8x %.8x %.8x\n",
+         hashlittle(p, sizeof(q)-1, 13), hashlittle(p, sizeof(q)-2, 13),
+         hashlittle(p, sizeof(q)-3, 13), hashlittle(p, sizeof(q)-4, 13),
+         hashlittle(p, sizeof(q)-5, 13), hashlittle(p, sizeof(q)-6, 13),
+         hashlittle(p, sizeof(q)-7, 13), hashlittle(p, sizeof(q)-8, 13),
+         hashlittle(p, sizeof(q)-9, 13), hashlittle(p, sizeof(q)-10, 13),
+         hashlittle(p, sizeof(q)-11, 13), hashlittle(p, sizeof(q)-12, 13));
+  printf("\n");
+
+  /* check that hashlittle2 and hashlittle produce the same results */
+  i=47; j=0;
+  hashlittle2(q, sizeof(q), &i, &j);
+  if (hashlittle(q, sizeof(q), 47) != i)
+    printf("hashlittle2 and hashlittle mismatch\n");
+
+  /* check that hashword2 and hashword produce the same results */
+  len = 0xdeadbeef;
+  i=47, j=0;
+  hashword2(&len, 1, &i, &j);
+  if (hashword(&len, 1, 47) != i)
+    printf("hashword2 and hashword mismatch %x %x\n", 
+	   i, hashword(&len, 1, 47));
+
+  /* check hashlittle doesn't read before or after the ends of the string */
+  for (h=0, b=buf+1; h<8; ++h, ++b)
+  {
+    for (i=0; i<MAXLEN; ++i)
+    {
+      len = i;
+      for (j=0; j<i; ++j) *(b+j)=0;
+
+      /* these should all be equal */
+      ref = hashlittle(b, len, (uint32_t)1);
+      *(b+i)=(uint8_t)~0;
+      *(b-1)=(uint8_t)~0;
+      x = hashlittle(b, len, (uint32_t)1);
+      y = hashlittle(b, len, (uint32_t)1);
+      if ((ref != x) || (ref != y)) 
+      {
+	printf("alignment error: %.8x %.8x %.8x %d %d\n",ref,x,y,
+               h, i);
+      }
+    }
+  }
+}
+
+/* check for problems with nulls */
+ void driver4()
+{
+  uint8_t buf[1];
+  uint32_t h,i,state[HASHSTATE];
+
+
+  buf[0] = ~0;
+  for (i=0; i<HASHSTATE; ++i) state[i] = 1;
+  printf("These should all be different\n");
+  for (i=0, h=0; i<8; ++i)
+  {
+    h = hashlittle(buf, 0, h);
+    printf("%2ld  0-byte strings, hash is  %.8x\n", i, h);
+  }
+}
+
+void driver5()
+{
+  uint32_t b,c;
+  b=0, c=0, hashlittle2("", 0, &c, &b);
+  printf("hash is %.8lx %.8lx\n", c, b);   /* deadbeef deadbeef */
+  b=0xdeadbeef, c=0, hashlittle2("", 0, &c, &b);
+  printf("hash is %.8lx %.8lx\n", c, b);   /* bd5b7dde deadbeef */
+  b=0xdeadbeef, c=0xdeadbeef, hashlittle2("", 0, &c, &b);
+  printf("hash is %.8lx %.8lx\n", c, b);   /* 9c093ccd bd5b7dde */
+  b=0, c=0, hashlittle2("Four score and seven years ago", 30, &c, &b);
+  printf("hash is %.8lx %.8lx\n", c, b);   /* 17770551 ce7226e6 */
+  b=1, c=0, hashlittle2("Four score and seven years ago", 30, &c, &b);
+  printf("hash is %.8lx %.8lx\n", c, b);   /* e3607cae bd371de4 */
+  b=0, c=1, hashlittle2("Four score and seven years ago", 30, &c, &b);
+  printf("hash is %.8lx %.8lx\n", c, b);   /* cd628161 6cbea4b3 */
+  c = hashlittle("Four score and seven years ago", 30, 0);
+  printf("hash is %.8lx\n", c);   /* 17770551 */
+  c = hashlittle("Four score and seven years ago", 30, 1);
+  printf("hash is %.8lx\n", c);   /* cd628161 */
+}
+
+
+#endif  /* SELF_TEST */
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/src_netcdf4/memio.c
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/src_netcdf4/memio.c	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/src_netcdf4/memio.c	(revision 1749)
@@ -0,0 +1,604 @@
+/*
+ *	Copyright 1996, University Corporation for Atmospheric Research
+ *	See netcdf/COPYRIGHT file for copying and redistribution conditions.
+ */
+#if defined (_WIN32) || defined (_WIN64)
+#include <windows.h>
+#include <winbase.h>
+#include <io.h>
+#define lseek64 lseek
+#endif
+
+#include "config.h"
+#include <assert.h>
+#include <stdlib.h>
+#include <errno.h>
+#include <string.h>
+#ifdef _MSC_VER /* Microsoft Compilers */
+#include <io.h>
+#else
+#include <unistd.h>
+#endif
+#ifdef HAVE_FCNTL_H
+#include <fcntl.h>
+#endif
+#include "nc.h"
+
+#undef DEBUG
+
+#ifdef DEBUG
+#include <stdio.h>
+#endif
+
+#ifndef HAVE_SSIZE_T
+#define ssize_t int
+#endif
+
+#ifndef SEEK_SET
+#define SEEK_SET 0
+#define SEEK_CUR 1
+#define SEEK_END 2
+#endif
+
+/* Define the mode flags for create: let umask rule */
+#define OPENMODE 0666
+
+#include "ncio.h"
+#include "fbits.h"
+#include "rnd.h"
+
+/* #define INSTRUMENT 1 */
+#if INSTRUMENT /* debugging */
+#undef NDEBUG
+#include <stdio.h>
+/*#include "instr.h"*/
+#endif
+
+#ifndef MEMIO_MAXBLOCKSIZE
+#define MEMIO_MAXBLOCKSIZE 268435456 /* sanity check, about X_SIZE_T_MAX/8 */
+#endif
+
+#undef MIN  /* system may define MIN somewhere and complain */
+#define MIN(mm,nn) (((mm) < (nn)) ? (mm) : (nn))
+
+#if !defined(NDEBUG) && !defined(X_INT_MAX)
+#define  X_INT_MAX 2147483647
+#endif
+
+#if 0 /* !defined(NDEBUG) && !defined(X_ALIGN) */
+#define  X_ALIGN 4
+#else
+#undef X_ALIGN
+#endif
+
+/* Private data for memio */
+
+typedef struct NCMEMIO {
+    int locked; /* => we cannot realloc */
+    int persist; /* => save to a file; triggered by NC_WRITE */
+    char* memory;
+    off_t alloc;
+    off_t size;
+    off_t pos;
+} NCMEMIO;
+
+/* Forward */
+static int memio_rel(ncio *const nciop, off_t offset, int rflags);
+static int memio_get(ncio *const nciop, off_t offset, size_t extent, int rflags, void **const vpp);
+static int memio_move(ncio *const nciop, off_t to, off_t from, size_t nbytes, int rflags);
+static int memio_sync(ncio *const nciop);
+static int memio_filesize(ncio* nciop, off_t* filesizep);
+static int memio_pad_length(ncio* nciop, off_t length);
+static int memio_close(ncio* nciop, int);
+
+/* Mnemonic */
+#define DOOPEN 1
+
+static long pagesize = 0;
+
+/* Create a new ncio struct to hold info about the file. */
+static int
+memio_new(const char* path, int ioflags, off_t initialsize, ncio** nciopp, NCMEMIO** memiop)
+{
+    int status = NC_NOERR;
+    ncio* nciop = NULL;
+    NCMEMIO* memio = NULL;
+    int openfd = -1;
+
+    if(pagesize == 0) {
+
+#if defined (_WIN32) || defined(_WIN64)
+      SYSTEM_INFO info;
+      GetSystemInfo (&info);
+      pagesize = info.dwPageSize;
+#elif defined HAVE_SYSCONF
+        pagesize = sysconf(_SC_PAGE_SIZE);
+#elif defined HAVE_GETPAGESIZE
+        pagesize = getpagesize();
+#else
+        pagesize = 4096; /* good guess */
+#endif
+    }
+
+    errno = 0;
+
+    /* Always force the allocated size to be a multiple of pagesize */
+    if(initialsize == 0) initialsize = pagesize;
+    if((initialsize % pagesize) != 0)
+	initialsize += (pagesize - (initialsize % pagesize));
+
+    nciop = (ncio* )calloc(1,sizeof(ncio));
+    if(nciop == NULL) {status = NC_ENOMEM; goto fail;}
+    
+    nciop->ioflags = ioflags;
+    *((int*)&nciop->fd) = -1; /* caller will fix */
+
+    *((char**)&nciop->path) = strdup(path);
+    if(nciop->path == NULL) {status = NC_ENOMEM; goto fail;}
+
+    *((ncio_relfunc**)&nciop->rel) = memio_rel;
+    *((ncio_getfunc**)&nciop->get) = memio_get;
+    *((ncio_movefunc**)&nciop->move) = memio_move;
+    *((ncio_syncfunc**)&nciop->sync) = memio_sync;
+    *((ncio_filesizefunc**)&nciop->filesize) = memio_filesize;
+    *((ncio_pad_lengthfunc**)&nciop->pad_length) = memio_pad_length;
+    *((ncio_closefunc**)&nciop->close) = memio_close;
+
+    memio = (NCMEMIO*)calloc(1,sizeof(NCMEMIO));
+    if(memio == NULL) {status = NC_ENOMEM; goto fail;}
+    *((void* *)&nciop->pvt) = memio;
+
+    memio->alloc = initialsize;
+
+    memio->memory = NULL;
+    memio->size = 0;
+    memio->pos = 0;
+    memio->persist = fIsSet(ioflags,NC_WRITE);
+
+    if(nciopp) *nciopp = nciop;
+    if(memiop) *memiop = memio;
+
+done:
+    if(openfd >= 0) close(openfd);
+    return status;
+
+fail:
+    if(nciop != NULL) {
+        if(nciop->path != NULL) free((char*)nciop->path);
+    }
+    goto done;
+}
+
+/* Create a file, and the ncio struct to go with it. This function is
+   only called from nc__create_mp.
+
+   path - path of file to create.
+   ioflags - flags from nc_create
+   initialsz - From the netcdf man page: "The argument
+   Iinitialsize sets the initial size of the file at creation time."
+   igeto - 
+   igetsz - 
+   sizehintp - the size of a page of data for buffered reads and writes.
+   nciopp - pointer to a pointer that will get location of newly
+   created and inited ncio struct.
+   mempp - pointer to pointer to the initial memory read.
+*/
+int
+memio_create(const char* path, int ioflags,
+    size_t initialsz,
+    off_t igeto, size_t igetsz, size_t* sizehintp,
+    ncio* *nciopp, void** const mempp)
+{
+    ncio* nciop;
+    int fd;
+    int status;
+    NCMEMIO* memio = NULL;
+    int persist = (ioflags & NC_WRITE?1:0);
+    int oflags;
+
+    if(path == NULL ||* path == 0)
+        return NC_EINVAL;
+
+    /* For diskless open has, the file must be classic version 1 or 2.*/
+    if(fIsSet(ioflags,NC_NETCDF4))
+        return NC_EDISKLESS; /* violates constraints */
+
+    status = memio_new(path, ioflags, initialsz, &nciop, &memio);
+    if(status != NC_NOERR)
+        return status;
+    memio->size = 0;
+
+    if(!persist) {
+	memio->memory = (char*)malloc(memio->alloc);
+	if(memio->memory == NULL) {status = NC_ENOMEM; goto unwind_open;}
+    } else { /*persist */
+        /* Open the file, but make sure we can write it if needed */
+        oflags = (persist ? O_RDWR : O_RDONLY);    
+#ifdef O_BINARY
+        fSet(oflags, O_BINARY);
+#endif
+    	oflags |= (O_CREAT|O_TRUNC);
+        if(fIsSet(ioflags,NC_NOCLOBBER))
+	    oflags |= O_EXCL;
+#ifdef vms
+        fd = open(path, oflags, 0, "ctx=stm");
+#else
+        fd  = open(path, oflags, OPENMODE);
+#endif
+        if(fd < 0) {status = errno; goto unwind_open;}
+
+        (void)close(fd); /* will reopen at nc_close */
+	/* malloc memory */
+	memio->memory = (char*)malloc(memio->alloc);
+	if(memio->memory == NULL) {status = NC_ENOMEM; goto unwind_open;}
+    } /*!persist*/
+
+#ifdef DEBUG
+fprintf(stderr,"memio_create: initial memory: %lu/%lu\n",(unsigned long)memio->memory,(unsigned long)memio->alloc);
+#endif
+
+    fd = nc__pseudofd();
+    *((int* )&nciop->fd) = fd; 
+
+    fSet(nciop->ioflags, NC_WRITE);
+
+    if(igetsz != 0)
+    {
+        status = nciop->get(nciop,
+                igeto, igetsz,
+                RGN_WRITE,
+                mempp);
+        if(status != NC_NOERR)
+            goto unwind_open;
+    }
+
+    /* Pick a default sizehint */
+    if(sizehintp) *sizehintp = pagesize;
+
+    *nciopp = nciop;
+    return NC_NOERR;
+
+unwind_open:
+    memio_close(nciop,1);
+    return status;
+}
+
+/* This function opens the data file. It is only called from nc.c,
+   from nc__open_mp and nc_delete_mp.
+
+   path - path of data file.
+   ioflags - flags passed into nc_open.
+   igeto - looks like this function can do an initial page get, and
+   igeto is going to be the offset for that. But it appears to be
+   unused 
+   igetsz - the size in bytes of initial page get (a.k.a. extent). Not
+   ever used in the library.
+   sizehintp - the size of a page of data for buffered reads and writes.
+   nciopp - pointer to pointer that will get address of newly created
+   and inited ncio struct.
+   mempp - pointer to pointer to the initial memory read.
+*/
+int
+memio_open(const char* path,
+    int ioflags,
+    off_t igeto, size_t igetsz, size_t* sizehintp,
+    ncio* *nciopp, void** const mempp)
+{
+    ncio* nciop;
+    int fd;
+    int status;
+    int persist = (fIsSet(ioflags,NC_WRITE)?1:0);
+    int oflags;
+    NCMEMIO* memio = NULL;
+    size_t sizehint;
+    off_t filesize;
+
+    if(path == NULL ||* path == 0)
+        return EINVAL;
+
+    assert(sizehintp != NULL);
+    sizehint = *sizehintp;
+
+    /* Open the file, but make sure we can write it if needed */
+    oflags = (persist ? O_RDWR : O_RDONLY);    
+#ifdef O_BINARY
+    fSet(oflags, O_BINARY);
+#endif
+    oflags |= O_EXCL;
+#ifdef vms
+    fd = open(path, oflags, 0, "ctx=stm");
+#else
+    fd  = open(path, oflags, OPENMODE);
+#endif
+#ifdef DEBUG
+    if(fd < 0) {
+	fprintf(stderr,"open failed: file=%s err=",path);
+	perror("");
+    }
+#endif
+    if(fd < 0) {status = errno; goto unwind_open;}
+
+    /* get current filesize  = max(|file|,initialize)*/
+    filesize = lseek(fd,0,SEEK_END);
+    if(filesize < 0) {status = errno; goto unwind_open;}
+    /* move pointer back to beginning of file */
+    (void)lseek(fd,0,SEEK_SET);
+    if(filesize < (off_t)sizehint)
+        filesize = (off_t)sizehint;
+
+    status = memio_new(path, ioflags, filesize, &nciop, &memio);
+    if(status != NC_NOERR)
+	return status;
+    memio->size = filesize;
+
+    memio->memory = (char*)malloc(memio->alloc);
+    if(memio->memory == NULL) {status = NC_ENOMEM; goto unwind_open;}
+
+#ifdef DEBUG
+fprintf(stderr,"memio_open: initial memory: %lu/%lu\n",(unsigned long)memio->memory,(unsigned long)memio->alloc);
+#endif
+
+    /* Read the file into the memio memory */
+    /* We need to do multiple reads because there is no
+       guarantee that the amount read will be the full amount */
+    {
+	off_t red = memio->size;
+	char* pos = memio->memory;
+	while(red > 0) {
+	    ssize_t count = read(fd, pos, red);
+	    if(count < 0)
+	        {close(fd); status = errno; goto unwind_open;}
+	    if(count == 0)
+	        {close(fd); status = NC_ENOTNC; goto unwind_open;}
+	    red -= count;
+	    pos += count;
+	}
+    }
+    (void)close(fd); /* until memio_close() */
+
+    /* Use half the filesize as the blocksize */
+    sizehint = filesize/2;
+
+    fd = nc__pseudofd();
+    *((int* )&nciop->fd) = fd; 
+
+    if(igetsz != 0)
+    {
+        status = nciop->get(nciop,
+                igeto, igetsz,
+                0,
+                mempp);
+        if(status != NC_NOERR)
+            goto unwind_open;
+    }
+
+    *sizehintp = sizehint;
+    *nciopp = nciop;
+    return NC_NOERR;
+
+unwind_open:
+    memio_close(nciop,0);
+    return status;
+}
+
+
+/* 
+ *  Get file size in bytes.
+ */
+static int
+memio_filesize(ncio* nciop, off_t* filesizep)
+{
+    NCMEMIO* memio;
+    if(nciop == NULL || nciop->pvt == NULL) return NC_EINVAL;
+    memio = (NCMEMIO*)nciop->pvt;
+    if(filesizep != NULL) *filesizep = memio->size;
+    return NC_NOERR;
+}
+
+/*
+ *  Sync any changes to disk, then truncate or extend file so its size
+ *  is length.  This is only intended to be called before close, if the
+ *  file is open for writing and the actual size does not match the
+ *  calculated size, perhaps as the result of having been previously
+ *  written in NOFILL mode.
+ */
+static int
+memio_pad_length(ncio* nciop, off_t length)
+{
+    NCMEMIO* memio;
+    if(nciop == NULL || nciop->pvt == NULL) return NC_EINVAL;
+    memio = (NCMEMIO*)nciop->pvt;
+
+    if(!fIsSet(nciop->ioflags, NC_WRITE))
+        return EPERM; /* attempt to write readonly file*/
+
+    if(memio->locked > 0)
+	return NC_EDISKLESS;
+
+    if(length > memio->alloc) {
+        /* Realloc the allocated memory to a multiple of the pagesize*/
+	off_t newsize = length;
+	void* newmem = NULL;
+	/* Round to a multiple of pagesize */
+	if((newsize % pagesize) != 0)
+	    newsize += (pagesize - (newsize % pagesize));
+
+        newmem = (char*)realloc(memio->memory,newsize);
+        if(newmem == NULL) return NC_ENOMEM;
+
+	/* zero out the extra memory */
+        memset((void*)(newmem+memio->alloc),0,(newsize - memio->alloc));
+
+#ifdef DEBUG
+fprintf(stderr,"realloc: %lu/%lu -> %lu/%lu\n",
+(unsigned long)memio->memory,(unsigned long)memio->alloc,
+(unsigned long)newmem,(unsigned long)newsize);
+#endif
+	memio->memory = newmem;
+	memio->alloc = newsize;
+    }  
+    memio->size = length;
+    return NC_NOERR;
+}
+
+/* Write out any dirty buffers to disk and
+   ensure that next read will get data from disk.
+   Sync any changes, then close the open file associated with the ncio
+   struct, and free its memory.
+   nciop - pointer to ncio to close.
+   doUnlink - if true, unlink file
+*/
+
+static int 
+memio_close(ncio* nciop, int doUnlink)
+{
+    int status = NC_NOERR;
+    NCMEMIO* memio;
+    int fd = -1;
+    if(nciop == NULL || nciop->pvt == NULL) return NC_NOERR;
+
+    memio = (NCMEMIO*)nciop->pvt;
+    assert(memio != NULL);
+
+    /* See if the user wants the contents persisted to a file */
+    if(memio->persist) {
+        /* Try to open the file for writing */
+	int oflags = O_WRONLY|O_CREAT|O_TRUNC;
+#ifdef O_BINARY
+        fSet(oflags, O_BINARY);
+#endif
+	fd = open(nciop->path, oflags, OPENMODE);
+	if(fd >= 0) {
+	    /* We need to do multiple writes because there is no
+               guarantee that the amount written will be the full amount */
+	    off_t written = memio->size;
+	    char* pos = memio->memory;
+	    while(written > 0) {
+	        ssize_t count = write(fd, pos, written);
+	        if(count < 0)
+	            {status = errno; goto done;}
+	        if(count == 0)
+	            {status = NC_ENOTNC; goto done;}
+		written -= count;
+		pos += count;
+	    }
+	} else
+	    status = errno;
+        /* Free up things */
+	if(memio->memory != NULL) free(memio->memory);
+     }
+
+done:
+    /* do cleanup  */
+    if(fd >= 0) (void)close(fd);		
+    if(memio != NULL) free(memio);
+    if(nciop->path != NULL) free((char*)nciop->path);
+    free(nciop);
+    return status;
+}
+
+static int
+guarantee(ncio* nciop, off_t endpoint)
+{
+    NCMEMIO* memio = (NCMEMIO*)nciop->pvt;
+    if(endpoint > memio->alloc) {
+	/* extend the allocated memory and size */
+	int status = memio_pad_length(nciop,endpoint);
+	if(status != NC_NOERR) return status;
+    }
+    if(memio->size < endpoint)
+	memio->size = endpoint;
+    return NC_NOERR;
+}
+
+/*
+ * Request that the region (offset, extent)
+ * be made available through *vpp.
+ */
+static int
+memio_get(ncio* const nciop, off_t offset, size_t extent, int rflags, void** const vpp)
+{
+    int status = NC_NOERR;
+    NCMEMIO* memio;
+    if(nciop == NULL || nciop->pvt == NULL) return NC_EINVAL;
+    memio = (NCMEMIO*)nciop->pvt;
+    status = guarantee(nciop, offset+extent);
+    memio->locked++;
+    if(status != NC_NOERR) return status;
+    if(vpp) *vpp = memio->memory+offset;
+    return NC_NOERR;
+}
+
+/*
+ * Like memmove(), safely move possibly overlapping data.
+ */
+static int
+memio_move(ncio* const nciop, off_t to, off_t from, size_t nbytes, int ignored)
+{
+    int status = NC_NOERR;
+    NCMEMIO* memio;
+
+    if(nciop == NULL || nciop->pvt == NULL) return NC_EINVAL;
+    memio = (NCMEMIO*)nciop->pvt;
+    if(from < to) {
+       /* extend if "to" is not currently allocated */
+       status = guarantee(nciop,to+nbytes);
+       if(status != NC_NOERR) return status;
+    }
+    /* check for overlap */
+    if((to + nbytes) > from || (from + nbytes) > to) {
+	/* Ranges overlap */
+#ifdef HAVE_MEMMOVE
+        memmove((void*)(memio->memory+to),(void*)(memio->memory+from),nbytes);
+#else
+        off_t overlap;
+	off_t nbytes1;
+        if((from + nbytes) > to) {
+	    overlap = ((from + nbytes) - to); /* # bytes of overlap */
+	    nbytes1 = (nbytes - overlap); /* # bytes of non-overlap */
+	    /* move the non-overlapping part */
+            memcpy((void*)(memio->memory+(to+overlap)),
+                   (void*)(memio->memory+(from+overlap)),
+		   nbytes1);
+	    /* move the overlapping part */
+	    memcpy((void*)(memio->memory+to),
+                   (void*)(memio->memory+from),
+		   overlap);
+	} else { /*((to + nbytes) > from) */
+	    overlap = ((to + nbytes) - from); /* # bytes of overlap */
+	    nbytes1 = (nbytes - overlap); /* # bytes of non-overlap */
+	    /* move the non-overlapping part */
+            memcpy((void*)(memio->memory+to),
+                   (void*)(memio->memory+from),
+		   nbytes1);
+	    /* move the overlapping part */
+	    memcpy((void*)(memio->memory+(to+nbytes1)),
+                   (void*)(memio->memory+(from+nbytes1)),
+		   overlap);
+	}
+#endif
+    } else {/* no overlap */
+	memcpy((void*)(memio->memory+to),(void*)(memio->memory+from),nbytes);
+    }
+    return status;
+}
+
+static int
+memio_rel(ncio* const nciop, off_t offset, int rflags)
+{
+    NCMEMIO* memio;
+    if(nciop == NULL || nciop->pvt == NULL) return NC_EINVAL;
+    memio = (NCMEMIO*)nciop->pvt;
+    memio->locked--;
+    return NC_NOERR; /* do nothing */
+}
+
+/*
+ * Write out any dirty buffers to disk and
+ * ensure that next read will get data from disk.
+ */
+static int
+memio_sync(ncio* const nciop)
+{
+    return NC_NOERR; /* do nothing */
+}
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/src_netcdf4/mmapio.c
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/src_netcdf4/mmapio.c	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/src_netcdf4/mmapio.c	(revision 1749)
@@ -0,0 +1,595 @@
+/*
+ *	Copyright 1996, University Corporation for Atmospheric Research
+ *	See netcdf/COPYRIGHT file for copying and redistribution conditions.
+ */
+
+#include "config.h"
+#include <assert.h>
+#include <stdlib.h>
+#include <errno.h>
+#include <string.h>
+#ifdef _MSC_VER /* Microsoft Compilers */
+#include <io.h>
+#endif
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+#ifdef HAVE_FCNTL_H
+#include <fcntl.h>
+#endif
+#include "nc.h"
+
+#undef DEBUG
+
+#ifdef DEBUG
+#include <stdio.h>
+#endif
+
+#include <sys/mman.h>
+
+#ifndef MAP_ANONYMOUS
+#  ifdef MAP_ANON
+#    define MAP_ANONYMOUS MAP_ANON
+#  endif
+#endif
+
+/* !MAP_ANONYMOUS => !HAVE_MMAP */
+#ifndef MAP_ANONYMOUS
+#error mmap not fully implemented: missing MAP_ANONYMOUS
+#endif
+
+#ifdef HAVE_MMAP
+  /* This is conditionalized by __USE_GNU ; why? */
+  extern void *mremap(void*,size_t,size_t,int);
+# ifndef MREMAP_MAYMOVE
+#   define MREMAP_MAYMOVE 1
+# endif
+#endif /*HAVE_MMAP*/
+
+#ifndef HAVE_SSIZE_T
+#define ssize_t int
+#endif
+
+#ifndef SEEK_SET
+#define SEEK_SET 0
+#define SEEK_CUR 1
+#define SEEK_END 2
+#endif
+
+/* Define the mode flags for create: let umask decide */
+#define OPENMODE 0666
+
+#include "ncio.h"
+#include "fbits.h"
+#include "rnd.h"
+
+/* #define INSTRUMENT 1 */
+#if INSTRUMENT /* debugging */
+#undef NDEBUG
+#include <stdio.h>
+/*#include "instr.h"*/
+#endif
+
+#ifndef MMAP_MAXBLOCKSIZE
+#define MMAP_MAXBLOCKSIZE 268435456 /* sanity check, about X_SIZE_T_MAX/8 */
+#endif
+
+#undef MIN  /* system may define MIN somewhere and complain */
+#define MIN(mm,nn) (((mm) < (nn)) ? (mm) : (nn))
+
+#if !defined(NDEBUG) && !defined(X_INT_MAX)
+#define  X_INT_MAX 2147483647
+#endif
+
+#if 0 /* !defined(NDEBUG) && !defined(X_ALIGN) */
+#define  X_ALIGN 4
+#else
+#undef X_ALIGN
+#endif
+
+/* Private data for mmap */
+
+typedef struct NCMMAPIO {
+    int locked; /* => we cannot realloc */
+    int persist; /* => save to a file; triggered by NC_WRITE */
+    char* memory;
+    off_t alloc;
+    off_t size;
+    off_t pos;
+    int mapfd;
+} NCMMAPIO;
+
+/* Forward */
+static int mmapio_rel(ncio *const nciop, off_t offset, int rflags);
+static int mmapio_get(ncio *const nciop, off_t offset, size_t extent, int rflags, void **const vpp);
+static int mmapio_move(ncio *const nciop, off_t to, off_t from, size_t nbytes, int rflags);
+static int mmapio_sync(ncio *const nciop);
+static int mmapio_filesize(ncio* nciop, off_t* filesizep);
+static int mmapio_pad_length(ncio* nciop, off_t length);
+static int mmapio_close(ncio* nciop, int);
+
+/* Mnemonic */
+#define DOOPEN 1
+
+static long pagesize = 0;
+
+/* Create a new ncio struct to hold info about the file. */
+static int
+mmapio_new(const char* path, int ioflags, off_t initialsize, ncio** nciopp, NCMMAPIO** mmapp)
+{
+    int status = NC_NOERR;
+    ncio* nciop = NULL;
+    NCMMAPIO* mmapio = NULL;
+    int openfd = -1;
+
+    if(pagesize == 0) {
+#if defined HAVE_SYSCONF
+        pagesize = sysconf(_SC_PAGE_SIZE);
+#elif defined HAVE_GETPAGESIZE
+        pagesize = getpagesize();
+#else
+        pagesize = 4096; /* good guess */
+#endif
+    }
+
+    errno = 0;
+
+    /* Always force the allocated size to be a multiple of pagesize */
+    if(initialsize == 0) initialsize = pagesize;
+    if((initialsize % pagesize) != 0)
+	initialsize += (pagesize - (initialsize % pagesize));
+
+    nciop = (ncio* )calloc(1,sizeof(ncio));
+    if(nciop == NULL) {status = NC_ENOMEM; goto fail;}
+    
+    nciop->ioflags = ioflags;
+    *((int*)&nciop->fd) = -1; /* caller will fix */
+
+    *((char**)&nciop->path) = strdup(path);
+    if(nciop->path == NULL) {status = NC_ENOMEM; goto fail;}
+
+    *((ncio_relfunc**)&nciop->rel) = mmapio_rel;
+    *((ncio_getfunc**)&nciop->get) = mmapio_get;
+    *((ncio_movefunc**)&nciop->move) = mmapio_move;
+    *((ncio_syncfunc**)&nciop->sync) = mmapio_sync;
+    *((ncio_filesizefunc**)&nciop->filesize) = mmapio_filesize;
+    *((ncio_pad_lengthfunc**)&nciop->pad_length) = mmapio_pad_length;
+    *((ncio_closefunc**)&nciop->close) = mmapio_close;
+
+    mmapio = (NCMMAPIO*)calloc(1,sizeof(NCMMAPIO));
+    if(mmapio == NULL) {status = NC_ENOMEM; goto fail;}
+    *((void* *)&nciop->pvt) = mmapio;
+
+    mmapio->alloc = initialsize;
+
+    mmapio->memory = NULL;
+    mmapio->size = 0;
+    mmapio->pos = 0;
+    mmapio->persist = fIsSet(ioflags,NC_WRITE);
+
+    /* See if ok to use mmap */
+    if(sizeof(void*) < 8 && fIsSet(ioflags,NC_64BIT_OFFSET))
+	return NC_DISKLESS; /* cannot support */
+    mmapio->mapfd = -1;
+
+    if(nciopp) *nciopp = nciop;
+    if(mmapp) *mmapp = mmapio;
+
+done:
+    if(openfd >= 0) close(openfd);
+    return status;
+
+fail:
+    if(nciop != NULL) {
+        if(nciop->path != NULL) free((char*)nciop->path);
+    }
+    goto done;
+}
+
+/* Create a file, and the ncio struct to go with it. This function is
+   only called from nc__create_mp.
+
+   path - path of file to create.
+   ioflags - flags from nc_create
+   initialsz - From the netcdf man page: "The argument
+   Iinitialsize sets the initial size of the file at creation time."
+   igeto - 
+   igetsz - 
+   sizehintp - the size of a page of data for buffered reads and writes.
+   nciopp - pointer to a pointer that will get location of newly
+   created and inited ncio struct.
+   mempp - pointer to pointer to the initial memory read.
+*/
+int
+mmapio_create(const char* path, int ioflags,
+    size_t initialsz,
+    off_t igeto, size_t igetsz, size_t* sizehintp,
+    ncio* *nciopp, void** const mempp)
+{
+    ncio* nciop;
+    int fd;
+    int status;
+    NCMMAPIO* mmapio = NULL;
+    int persist = (ioflags & NC_WRITE?1:0);
+    int oflags;
+
+    if(path == NULL ||* path == 0)
+        return NC_EINVAL;
+
+    /* For diskless open has, the file must be classic version 1 or 2.*/
+    if(fIsSet(ioflags,NC_NETCDF4))
+        return NC_EDISKLESS; /* violates constraints */
+
+    status = mmapio_new(path, ioflags, initialsz, &nciop, &mmapio);
+    if(status != NC_NOERR)
+        return status;
+    mmapio->size = 0;
+
+    if(!persist) {
+        mmapio->mapfd = -1;
+	mmapio->memory = (char*)mmap(NULL,mmapio->alloc,
+                                    PROT_READ|PROT_WRITE,
+				    MAP_PRIVATE|MAP_ANONYMOUS,
+                                    mmapio->mapfd,0);
+	{mmapio->memory[0] = 0;} /* test writing of the mmap'd memory */
+    } else { /*persist */
+        /* Open the file, but make sure we can write it if needed */
+        oflags = (persist ? O_RDWR : O_RDONLY);    
+#ifdef O_BINARY
+        fSet(oflags, O_BINARY);
+#endif
+    	oflags |= (O_CREAT|O_TRUNC);
+        if(fIsSet(ioflags,NC_NOCLOBBER))
+	    oflags |= O_EXCL;
+#ifdef vms
+        fd = open(path, oflags, 0, "ctx=stm");
+#else
+        fd  = open(path, oflags, OPENMODE);
+#endif
+        if(fd < 0) {status = errno; goto unwind_open;}
+	mmapio->mapfd = fd;
+
+	{ /* Cause the output file to have enough allocated space */
+	lseek(fd,mmapio->alloc-1,SEEK_SET); /* cause file to appear */
+        write(fd,"",mmapio->alloc);
+	lseek(fd,0,SEEK_SET); /* rewind */
+	}
+        mmapio->memory = (char*)mmap(NULL,mmapio->alloc,
+                                    PROT_READ|PROT_WRITE,
+				    MAP_SHARED,
+                                    mmapio->mapfd,0);
+	if(mmapio->memory == NULL) {
+	    return NC_EDISKLESS;
+	}
+    } /*!persist*/
+
+#ifdef DEBUG
+fprintf(stderr,"mmap_create: initial memory: %lu/%lu\n",(unsigned long)mmapio->memory,(unsigned long)mmapio->alloc);
+#endif
+
+    fd = nc__pseudofd();
+    *((int* )&nciop->fd) = fd; 
+
+    fSet(nciop->ioflags, NC_WRITE);
+
+    if(igetsz != 0)
+    {
+        status = nciop->get(nciop,
+                igeto, igetsz,
+                RGN_WRITE,
+                mempp);
+        if(status != NC_NOERR)
+            goto unwind_open;
+    }
+
+    /* Pick a default sizehint */
+    if(sizehintp) *sizehintp = pagesize;
+
+    *nciopp = nciop;
+    return NC_NOERR;
+
+unwind_open:
+    mmapio_close(nciop,1);
+    return status;
+}
+
+/* This function opens the data file. It is only called from nc.c,
+   from nc__open_mp and nc_delete_mp.
+
+   path - path of data file.
+   ioflags - flags passed into nc_open.
+   igeto - looks like this function can do an initial page get, and
+   igeto is going to be the offset for that. But it appears to be
+   unused 
+   igetsz - the size in bytes of initial page get (a.k.a. extent). Not
+   ever used in the library.
+   sizehintp - the size of a page of data for buffered reads and writes.
+   nciopp - pointer to pointer that will get address of newly created
+   and inited ncio struct.
+   mempp - pointer to pointer to the initial memory read.
+*/
+int
+mmapio_open(const char* path,
+    int ioflags,
+    off_t igeto, size_t igetsz, size_t* sizehintp,
+    ncio* *nciopp, void** const mempp)
+{
+    ncio* nciop;
+    int fd;
+    int status;
+    int persist = (fIsSet(ioflags,NC_WRITE)?1:0);
+    int oflags;
+    NCMMAPIO* mmapio = NULL;
+    size_t sizehint;
+    off_t filesize;
+
+    if(path == NULL ||* path == 0)
+        return EINVAL;
+
+    assert(sizehintp != NULL);
+    sizehint = *sizehintp;
+
+    /* Open the file, but make sure we can write it if needed */
+    oflags = (persist ? O_RDWR : O_RDONLY);    
+#ifdef O_BINARY
+    fSet(oflags, O_BINARY);
+#endif
+    oflags |= O_EXCL;
+#ifdef vms
+    fd = open(path, oflags, 0, "ctx=stm");
+#else
+    fd  = open(path, oflags, OPENMODE);
+#endif
+    if(fd < 0) {status = errno; goto unwind_open;}
+
+    /* get current filesize  = max(|file|,initialize)*/
+    filesize = lseek(fd,0,SEEK_END);
+    if(filesize < 0) {status = errno; goto unwind_open;}
+    /* move pointer back to beginning of file */
+    (void)lseek(fd,0,SEEK_SET);
+    if(filesize < (off_t)sizehint)
+        filesize = (off_t)sizehint;
+
+    status = mmapio_new(path, ioflags, filesize, &nciop, &mmapio);
+    if(status != NC_NOERR)
+	return status;
+    mmapio->size = filesize;
+
+    mmapio->mapfd = fd;
+    mmapio->memory = (char*)mmap(NULL,mmapio->alloc,
+                                    persist?(PROT_READ|PROT_WRITE):(PROT_READ),
+				    MAP_SHARED,
+                                    mmapio->mapfd,0);
+#ifdef DEBUG
+fprintf(stderr,"mmapio_open: initial memory: %lu/%lu\n",(unsigned long)mmapio->memory,(unsigned long)mmapio->alloc);
+#endif
+
+    /* Use half the filesize as the blocksize */
+    sizehint = filesize/2;
+
+    fd = nc__pseudofd();
+    *((int* )&nciop->fd) = fd; 
+
+    if(igetsz != 0)
+    {
+        status = nciop->get(nciop,
+                igeto, igetsz,
+                0,
+                mempp);
+        if(status != NC_NOERR)
+            goto unwind_open;
+    }
+
+    *sizehintp = sizehint;
+    *nciopp = nciop;
+    return NC_NOERR;
+
+unwind_open:
+    mmapio_close(nciop,0);
+    return status;
+}
+
+
+/* 
+ *  Get file size in bytes.
+ */
+static int
+mmapio_filesize(ncio* nciop, off_t* filesizep)
+{
+    NCMMAPIO* mmapio;
+    if(nciop == NULL || nciop->pvt == NULL) return NC_EINVAL;
+    mmapio = (NCMMAPIO*)nciop->pvt;
+    if(filesizep != NULL) *filesizep = mmapio->size;
+    return NC_NOERR;
+}
+
+/*
+ *  Sync any changes to disk, then truncate or extend file so its size
+ *  is length.  This is only intended to be called before close, if the
+ *  file is open for writing and the actual size does not match the
+ *  calculated size, perhaps as the result of having been previously
+ *  written in NOFILL mode.
+ */
+static int
+mmapio_pad_length(ncio* nciop, off_t length)
+{
+    NCMMAPIO* mmapio;
+    if(nciop == NULL || nciop->pvt == NULL) return NC_EINVAL;
+    mmapio = (NCMMAPIO*)nciop->pvt;
+
+    if(!fIsSet(nciop->ioflags, NC_WRITE))
+        return EPERM; /* attempt to write readonly file*/
+
+    if(mmapio->locked > 0)
+	return NC_EDISKLESS;
+
+    if(length > mmapio->alloc) {
+        /* Realloc the allocated memory to a multiple of the pagesize*/
+	off_t newsize = length;
+	void* newmem = NULL;
+	/* Round to a multiple of pagesize */
+	if((newsize % pagesize) != 0)
+	    newsize += (pagesize - (newsize % pagesize));
+
+	/* Force file size to be properly extended */
+	{ /* Cause the output file to have enough allocated space */
+	off_t pos = lseek(mmapio->mapfd,0,SEEK_CUR); /* save current position*/
+	/* cause file to be extended in size */
+	lseek(mmapio->mapfd,newsize-1,SEEK_SET);
+        write(mmapio->mapfd,"",mmapio->alloc);
+	lseek(mmapio->mapfd,pos,SEEK_SET); /* reset position */
+	}
+
+	newmem = (char*)mremap(mmapio->memory,mmapio->alloc,newsize,MREMAP_MAYMOVE);
+	if(newmem == NULL) return NC_ENOMEM;
+
+#ifdef DEBUG
+fprintf(stderr,"realloc: %lu/%lu -> %lu/%lu\n",
+(unsigned long)mmapio->memory,(unsigned long)mmapio->alloc,
+(unsigned long)newmem,(unsigned long)newsize);
+#endif
+	mmapio->memory = newmem;
+	mmapio->alloc = newsize;
+    }  
+    mmapio->size = length;
+    return NC_NOERR;
+}
+
+/* Write out any dirty buffers to disk and
+   ensure that next read will get data from disk.
+   Sync any changes, then close the open file associated with the ncio
+   struct, and free its memory.
+   nciop - pointer to ncio to close.
+   doUnlink - if true, unlink file
+*/
+
+static int 
+mmapio_close(ncio* nciop, int doUnlink)
+{
+    int status = NC_NOERR;
+    NCMMAPIO* mmapio;
+    if(nciop == NULL || nciop->pvt == NULL) return NC_NOERR;
+
+    mmapio = (NCMMAPIO*)nciop->pvt;
+    assert(mmapio != NULL);
+
+    /* Since we are using mmap, persisting to a file should be automatic */
+    status = munmap(mmapio->memory,mmapio->alloc);
+    mmapio->memory = NULL; /* so we do not try to free it */
+
+    /* Close file if it was open */
+    if(mmapio->mapfd >= 0)
+	close(mmapio->mapfd);
+
+    /* do cleanup  */
+    if(mmapio != NULL) free(mmapio);
+    if(nciop->path != NULL) free((char*)nciop->path);
+    free(nciop);
+    return status;
+}
+
+static int
+guarantee(ncio* nciop, off_t endpoint)
+{
+    NCMMAPIO* mmapio = (NCMMAPIO*)nciop->pvt;
+    if(endpoint > mmapio->alloc) {
+	/* extend the allocated memory and size */
+	int status = mmapio_pad_length(nciop,endpoint);
+	if(status != NC_NOERR) return status;
+    }
+    if(mmapio->size < endpoint)
+	mmapio->size = endpoint;
+    return NC_NOERR;
+}
+
+/*
+ * Request that the region (offset, extent)
+ * be made available through *vpp.
+ */
+static int
+mmapio_get(ncio* const nciop, off_t offset, size_t extent, int rflags, void** const vpp)
+{
+    int status = NC_NOERR;
+    NCMMAPIO* mmapio;
+    if(nciop == NULL || nciop->pvt == NULL) return NC_EINVAL;
+    mmapio = (NCMMAPIO*)nciop->pvt;
+    status = guarantee(nciop, offset+extent);
+    mmapio->locked++;
+    if(status != NC_NOERR) return status;
+    if(vpp) *vpp = mmapio->memory+offset;
+    return NC_NOERR;
+}
+
+/*
+ * Like memmove(), safely move possibly overlapping data.
+ */
+static int
+mmapio_move(ncio* const nciop, off_t to, off_t from, size_t nbytes, int ignored)
+{
+    int status = NC_NOERR;
+    NCMMAPIO* mmapio;
+
+    if(nciop == NULL || nciop->pvt == NULL) return NC_EINVAL;
+    mmapio = (NCMMAPIO*)nciop->pvt;
+    if(from < to) {
+       /* extend if "to" is not currently allocated */
+       status = guarantee(nciop,to+nbytes);
+       if(status != NC_NOERR) return status;
+    }
+    /* check for overlap */
+    if((to + nbytes) > from || (from + nbytes) > to) {
+	/* Ranges overlap */
+#ifdef HAVE_MEMMOVE
+        memmove((void*)(mmapio->memory+to),(void*)(mmapio->memory+from),nbytes);
+#else
+        off_t overlap;
+	off_t nbytes1;
+        if((from + nbytes) > to) {
+	    overlap = ((from + nbytes) - to); /* # bytes of overlap */
+	    nbytes1 = (nbytes - overlap); /* # bytes of non-overlap */
+	    /* move the non-overlapping part */
+            memcpy((void*)(mmapio->memory+(to+overlap)),
+                   (void*)(mmapio->memory+(from+overlap)),
+		   nbytes1);
+	    /* move the overlapping part */
+	    memcpy((void*)(mmapio->memory+to),
+                   (void*)(mmapio->memory+from),
+		   overlap);
+	} else { /*((to + nbytes) > from) */
+	    overlap = ((to + nbytes) - from); /* # bytes of overlap */
+	    nbytes1 = (nbytes - overlap); /* # bytes of non-overlap */
+	    /* move the non-overlapping part */
+            memcpy((void*)(mmapio->memory+to),
+                   (void*)(mmapio->memory+from),
+		   nbytes1);
+	    /* move the overlapping part */
+	    memcpy((void*)(mmapio->memory+(to+nbytes1)),
+                   (void*)(mmapio->memory+(from+nbytes1)),
+		   overlap);
+	}
+#endif
+    } else {/* no overlap */
+	memcpy((void*)(mmapio->memory+to),(void*)(mmapio->memory+from),nbytes);
+    }
+    return status;
+}
+
+static int
+mmapio_rel(ncio* const nciop, off_t offset, int rflags)
+{
+    NCMMAPIO* mmapio;
+    if(nciop == NULL || nciop->pvt == NULL) return NC_EINVAL;
+    mmapio = (NCMMAPIO*)nciop->pvt;
+    mmapio->locked--;
+    return NC_NOERR; /* do nothing */
+}
+
+/*
+ * Write out any dirty buffers to disk and
+ * ensure that next read will get data from disk.
+ */
+static int
+mmapio_sync(ncio* const nciop)
+{
+    return NC_NOERR; /* do nothing */
+}
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/src_netcdf4/nc.c
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/src_netcdf4/nc.c	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/src_netcdf4/nc.c	(revision 1749)
@@ -0,0 +1,1559 @@
+/*
+ *	Copyright 1996, University Corporation for Atmospheric Research
+ *      See netcdf/COPYRIGHT file for copying and redistribution conditions.
+ */
+
+#include <config.h>
+#include <stdlib.h>
+#include <string.h>
+#include <assert.h>
+#if defined(LOCKNUMREC) /* && _CRAYMPP */
+#  include <mpp/shmem.h>
+#  include <intrinsics.h>
+#endif
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+
+#include "nc.h"
+#include "ncdispatch.h"
+#include "nc3dispatch.h"
+#include "rnd.h"
+#include "ncx.h"
+
+/* This is the default create format for nc_create and nc__create. */
+int default_create_format = NC_FORMAT_CLASSIC;
+
+/* These have to do with version numbers. */
+#define MAGIC_NUM_LEN 4
+#define VER_CLASSIC 1
+#define VER_64BIT_OFFSET 2
+#define VER_HDF5 3
+
+int
+NC_check_id(int ncid, NC **ncpp)
+{
+    NC* nc = find_in_NCList(ncid);
+    if(nc == NULL) return NC_EBADID;
+    if(ncpp) *ncpp = nc;
+    return NC_NOERR;
+}
+
+static void
+free_NC(NC *ncp)
+{
+	if(ncp == NULL)
+		return;
+	free_NC_dimarrayV(&ncp->dims);
+	free_NC_attrarrayV(&ncp->attrs);
+	free_NC_vararrayV(&ncp->vars);
+	if (ncp->path)
+	   free(ncp->path);
+#if _CRAYMPP && defined(LOCKNUMREC)
+	shfree(ncp);
+#else
+	free(ncp);
+#endif /* _CRAYMPP && LOCKNUMREC */
+}
+
+static NC *
+new_NC(const size_t *chunkp, NC_Dispatch* dispatch)
+{
+	NC *ncp;
+	int stat = dispatch->new_nc(&ncp);
+	if(stat) return NULL;
+	ncp->xsz = MIN_NC_XSZ;
+	assert(ncp->xsz == ncx_len_NC(ncp,0));
+        ncp->chunk = chunkp != NULL ? *chunkp : NC_SIZEHINT_DEFAULT;
+	return ncp;
+}
+
+static NC *
+dup_NC(const NC *ref)
+{
+	NC *ncp;
+	int stat = ref->dispatch->new_nc(&ncp);
+	if(stat) return NULL;
+	if(ncp == NULL)
+		return NULL;
+
+	if(dup_NC_dimarrayV(&ncp->dims, &ref->dims) != NC_NOERR)
+		goto err;
+	if(dup_NC_attrarrayV(&ncp->attrs, &ref->attrs) != NC_NOERR)
+		goto err;
+	if(dup_NC_vararrayV(&ncp->vars, &ref->vars) != NC_NOERR)
+		goto err;
+
+	ncp->xsz = ref->xsz;
+	ncp->begin_var = ref->begin_var;
+	ncp->begin_rec = ref->begin_rec;
+	ncp->recsize = ref->recsize;
+	NC_set_numrecs(ncp, NC_get_numrecs(ref));
+	return ncp;
+err:
+	free_NC(ncp);
+	return NULL;
+}
+
+
+/*
+ *  Verify that this is a user nc_type
+ * Formerly
+NCcktype()
+ * Sense of the return is changed.
+ */
+int
+nc_cktype(nc_type type)
+{
+	switch((int)type){
+	case NC_BYTE:
+	case NC_CHAR:
+	case NC_SHORT:
+	case NC_INT:
+	case NC_FLOAT:
+	case NC_DOUBLE:
+		return(NC_NOERR);
+	}
+	return(NC_EBADTYPE);
+}
+
+
+/*
+ * How many objects of 'type'
+ * will fit into xbufsize?
+ */
+size_t
+ncx_howmany(nc_type type, size_t xbufsize)
+{
+	switch(type){
+	case NC_BYTE:
+	case NC_CHAR:
+		return xbufsize;
+	case NC_SHORT:
+		return xbufsize/X_SIZEOF_SHORT;
+	case NC_INT:
+		return xbufsize/X_SIZEOF_INT;
+	case NC_FLOAT:
+		return xbufsize/X_SIZEOF_FLOAT;
+	case NC_DOUBLE:
+		return xbufsize/X_SIZEOF_DOUBLE;
+	default:
+	        assert("ncx_howmany: Bad type" == 0);
+		return(0);
+	}
+}
+
+#define	D_RNDUP(x, align) _RNDUP(x, (off_t)(align))
+
+/*
+ * Compute each variable's 'begin' offset,
+ * update 'begin_rec' as well.
+ */
+static int
+NC_begins(NC *ncp,
+	size_t h_minfree, size_t v_align,
+	size_t v_minfree, size_t r_align)
+{
+	size_t ii;
+	int sizeof_off_t;
+	off_t index = 0;
+	NC_var **vpp;
+	NC_var *last = NULL;
+
+	if(v_align == NC_ALIGN_CHUNK)
+		v_align = ncp->chunk;
+	if(r_align == NC_ALIGN_CHUNK)
+		r_align = ncp->chunk;
+
+	if (fIsSet(ncp->flags, NC_64BIT_OFFSET)) {
+	  sizeof_off_t = 8;
+	} else {
+	  sizeof_off_t = 4;
+	}
+	
+	ncp->xsz = ncx_len_NC(ncp,sizeof_off_t);
+
+	if(ncp->vars.nelems == 0) 
+		return NC_NOERR;
+
+	/* only (re)calculate begin_var if there is not sufficient space in header
+	   or start of non-record variables is not aligned as requested by valign */
+	if (ncp->begin_var < ncp->xsz + h_minfree ||
+	    ncp->begin_var != D_RNDUP(ncp->begin_var, v_align) ) 
+	{
+	  index = (off_t) ncp->xsz;
+	  ncp->begin_var = D_RNDUP(index, v_align);
+	  if(ncp->begin_var < index + h_minfree)
+	  {
+	    ncp->begin_var = D_RNDUP(index + (off_t)h_minfree, v_align);
+	  }
+	}
+	index = ncp->begin_var;
+
+	/* loop thru vars, first pass is for the 'non-record' vars */
+	vpp = ncp->vars.value;
+	for(ii = 0; ii < ncp->vars.nelems ; ii++, vpp++)
+	{
+		if( IS_RECVAR(*vpp) )
+		{
+			/* skip record variables on this pass */
+			continue;
+		}
+#if 0
+fprintf(stderr, "    VAR %d %s: %ld\n", ii, (*vpp)->name->cp, (long)index);
+#endif
+                if( sizeof_off_t == 4 && (index > X_OFF_MAX || index < 0) ) 
+		{
+		    return NC_EVARSIZE;
+                }
+		(*vpp)->begin = index;
+		index += (*vpp)->len;
+	}
+
+	/* only (re)calculate begin_rec if there is not sufficient
+	   space at end of non-record variables or if start of record
+	   variables is not aligned as requested by r_align */
+	if (ncp->begin_rec < index + v_minfree ||
+	    ncp->begin_rec != D_RNDUP(ncp->begin_rec, r_align) )
+	{
+	  ncp->begin_rec = D_RNDUP(index, r_align);
+	  if(ncp->begin_rec < index + v_minfree)
+	  {
+	    ncp->begin_rec = D_RNDUP(index + (off_t)v_minfree, r_align);
+	  }
+	}
+	index = ncp->begin_rec;
+
+	ncp->recsize = 0;
+
+	/* loop thru vars, second pass is for the 'record' vars */
+	vpp = (NC_var **)ncp->vars.value;
+	for(ii = 0; ii < ncp->vars.nelems; ii++, vpp++)
+	{
+		if( !IS_RECVAR(*vpp) )
+		{
+			/* skip non-record variables on this pass */
+			continue;
+		}
+
+#if 0
+fprintf(stderr, "    REC %d %s: %ld\n", ii, (*vpp)->name->cp, (long)index);
+#endif
+                if( sizeof_off_t == 4 && (index > X_OFF_MAX || index < 0) ) 
+		{
+		    return NC_EVARSIZE;
+                }
+		(*vpp)->begin = index;
+		index += (*vpp)->len;
+		/* check if record size must fit in 32-bits */
+#if SIZEOF_OFF_T == SIZEOF_SIZE_T && SIZEOF_SIZE_T == 4
+		if( ncp->recsize > X_UINT_MAX - (*vpp)->len )
+		{
+		    return NC_EVARSIZE;
+		}
+#endif
+		if((*vpp)->len != UINT32_MAX) /* flag for vars >= 2**32 bytes */
+		    ncp->recsize += (*vpp)->len;
+		last = (*vpp);
+	}
+
+	/*
+	 * for special case of 
+	 */
+	if(last != NULL) {
+	    if(ncp->recsize == last->len) { /* exactly one record variable, pack value */
+		ncp->recsize = *last->dsizes * last->xsz;
+	    } else if(last->len == UINT32_MAX) { /* huge last record variable */
+		ncp->recsize += *last->dsizes * last->xsz;
+	    }
+	}
+	if(NC_IsNew(ncp))
+		NC_set_numrecs(ncp, 0);
+	return NC_NOERR;
+}
+
+
+/*
+ * Read just the numrecs member.
+ * (A relatively expensive way to do things.)
+ */
+int
+read_numrecs(NC *ncp)
+{
+	int status = NC_NOERR;
+	const void *xp = NULL;
+	size_t nrecs = NC_get_numrecs(ncp);
+
+	assert(!NC_indef(ncp));
+
+#define NC_NUMRECS_OFFSET 4
+#define NC_NUMRECS_EXTENT 4
+	status = ncio_get(ncp->nciop,
+		 NC_NUMRECS_OFFSET, NC_NUMRECS_EXTENT, 0, (void **)&xp);
+					/* cast away const */
+	if(status != NC_NOERR)
+		return status;
+
+	status = ncx_get_size_t(&xp, &nrecs);
+
+	(void) ncio_rel(ncp->nciop, NC_NUMRECS_OFFSET, 0);
+
+	if(status == NC_NOERR)
+	{
+		NC_set_numrecs(ncp, nrecs);
+		fClr(ncp->flags, NC_NDIRTY);
+	}
+
+	return status;
+}
+
+
+/*
+ * Write out just the numrecs member.
+ * (A relatively expensive way to do things.)
+ */
+int
+write_numrecs(NC *ncp)
+{
+	int status = NC_NOERR;
+	void *xp = NULL;
+
+	assert(!NC_readonly(ncp));
+	assert(!NC_indef(ncp));
+
+	status = ncio_get(ncp->nciop,
+		 NC_NUMRECS_OFFSET, NC_NUMRECS_EXTENT, RGN_WRITE, &xp);
+	if(status != NC_NOERR)
+		return status;
+
+	{
+		const size_t nrecs = NC_get_numrecs(ncp);
+		status = ncx_put_size_t(&xp, &nrecs);
+	}
+
+	(void) ncio_rel(ncp->nciop, NC_NUMRECS_OFFSET, RGN_MODIFIED);
+
+	if(status == NC_NOERR)
+		fClr(ncp->flags, NC_NDIRTY);
+
+	return status;
+}
+
+
+/*
+ * Read in the header
+ * It is expensive.
+ */
+static int
+read_NC(NC *ncp)
+{
+	int status = NC_NOERR;
+
+	free_NC_dimarrayV(&ncp->dims);
+	free_NC_attrarrayV(&ncp->attrs);
+	free_NC_vararrayV(&ncp->vars);
+
+	status = nc_get_NC(ncp);
+
+	if(status == NC_NOERR)
+		fClr(ncp->flags, NC_NDIRTY | NC_HDIRTY);
+
+	return status;
+}
+
+
+/*
+ * Write out the header
+ */
+static int
+write_NC(NC *ncp)
+{
+	int status = NC_NOERR;
+
+	assert(!NC_readonly(ncp));
+
+	status = ncx_put_NC(ncp, NULL, 0, 0);
+
+	if(status == NC_NOERR)
+		fClr(ncp->flags, NC_NDIRTY | NC_HDIRTY);
+
+	return status;
+}
+
+
+/*
+ * Write the header or the numrecs if necessary.
+ */
+int
+NC_sync(NC *ncp)
+{
+	assert(!NC_readonly(ncp));
+
+	if(NC_hdirty(ncp))
+	{
+		return write_NC(ncp);
+	}
+	/* else */
+
+	if(NC_ndirty(ncp))
+	{
+		return write_numrecs(ncp);
+	}
+	/* else */
+
+	return NC_NOERR;
+}
+
+
+/*
+ * Initialize the 'non-record' variables.
+ */
+static int
+fillerup(NC *ncp)
+{
+	int status = NC_NOERR;
+	size_t ii;
+	NC_var **varpp;
+
+	assert(!NC_readonly(ncp));
+	assert(NC_dofill(ncp));
+
+	/* loop thru vars */
+	varpp = ncp->vars.value;
+	for(ii = 0; ii < ncp->vars.nelems; ii++, varpp++)
+	{
+		if(IS_RECVAR(*varpp))
+		{
+			/* skip record variables */
+			continue;
+		}
+
+		status = fill_NC_var(ncp, *varpp, (*varpp)->len, 0);
+		if(status != NC_NOERR)
+			break;
+	}
+	return status;
+}
+
+/* Begin endef */
+
+/*
+ */
+static int
+fill_added_recs(NC *gnu, NC *old)
+{
+	NC_var ** const gnu_varpp = (NC_var **)gnu->vars.value;
+
+	const int old_nrecs = (int) NC_get_numrecs(old);
+	int recno = 0;
+	NC_var **vpp = gnu_varpp;
+	NC_var *const *const end = &vpp[gnu->vars.nelems];
+	int numrecvars = 0;
+
+	/* Determine if there is only one record variable.  If so, we
+	   must treat as a special case because there's no record padding */
+	for(; vpp < end; vpp++) {
+	    if(IS_RECVAR(*vpp)) {
+		numrecvars++;
+	    }
+	}
+
+	for(; recno < old_nrecs; recno++)
+	    {
+		int varid = (int)old->vars.nelems;
+		for(; varid < (int)gnu->vars.nelems; varid++)
+		    {
+			const NC_var *const gnu_varp = *(gnu_varpp + varid);
+			if(!IS_RECVAR(gnu_varp))
+			    {
+				/* skip non-record variables */
+				continue;
+			    }
+			/* else */
+			{
+			    size_t varsize = numrecvars == 1 ? gnu->recsize :  gnu_varp->len;
+			    const int status = fill_NC_var(gnu, gnu_varp, varsize, recno);
+			    if(status != NC_NOERR)
+				return status;
+			}
+		    }
+	    }
+	return NC_NOERR;
+}
+
+/*
+ */
+static int
+fill_added(NC *gnu, NC *old)
+{
+	NC_var ** const gnu_varpp = (NC_var **)gnu->vars.value;
+	int varid = (int)old->vars.nelems;
+
+	for(; varid < (int)gnu->vars.nelems; varid++)
+	{
+		const NC_var *const gnu_varp = *(gnu_varpp + varid);
+		if(IS_RECVAR(gnu_varp))
+		{
+			/* skip record variables */
+			continue;
+		}
+		/* else */
+		{
+		const int status = fill_NC_var(gnu, gnu_varp, gnu_varp->len, 0);
+		if(status != NC_NOERR)
+			return status;
+		}
+	}
+
+	return NC_NOERR;
+}
+
+
+/*
+ * Move the records "out". 
+ * Fill as needed.
+ */
+static int
+move_recs_r(NC *gnu, NC *old)
+{
+	int status;
+	int recno;
+	int varid;
+	NC_var **gnu_varpp = (NC_var **)gnu->vars.value;
+	NC_var **old_varpp = (NC_var **)old->vars.value;
+	NC_var *gnu_varp;
+	NC_var *old_varp;
+	off_t gnu_off;
+	off_t old_off;
+	const size_t old_nrecs = NC_get_numrecs(old);
+	
+	/* Don't parallelize this loop */
+	for(recno = (int)old_nrecs -1; recno >= 0; recno--)
+	{
+	/* Don't parallelize this loop */
+	for(varid = (int)old->vars.nelems -1; varid >= 0; varid--)
+	{
+		gnu_varp = *(gnu_varpp + varid);
+		if(!IS_RECVAR(gnu_varp))
+		{
+			/* skip non-record variables on this pass */
+			continue;
+		}
+		/* else */
+
+		/* else, a pre-existing variable */
+		old_varp = *(old_varpp + varid);
+		gnu_off = gnu_varp->begin + (off_t)(gnu->recsize * recno);
+		old_off = old_varp->begin + (off_t)(old->recsize * recno);
+
+		if(gnu_off == old_off)
+			continue; 	/* nothing to do */
+
+		assert(gnu_off > old_off);
+	
+		status = ncio_move(gnu->nciop, gnu_off, old_off,
+			 old_varp->len, 0);
+
+		if(status != NC_NOERR)
+			return status;
+		
+	}
+	}
+
+	NC_set_numrecs(gnu, old_nrecs);
+
+	return NC_NOERR;
+}
+
+
+/*
+ * Move the "non record" variables "out". 
+ * Fill as needed.
+ */
+static int
+move_vars_r(NC *gnu, NC *old)
+{
+	int status;
+	int varid;
+	NC_var **gnu_varpp = (NC_var **)gnu->vars.value;
+	NC_var **old_varpp = (NC_var **)old->vars.value;
+	NC_var *gnu_varp;
+	NC_var *old_varp;
+	off_t gnu_off;
+	off_t old_off;
+	
+	/* Don't parallelize this loop */
+	for(varid = (int)old->vars.nelems -1;
+		 varid >= 0; varid--)
+	{
+		gnu_varp = *(gnu_varpp + varid);
+		if(IS_RECVAR(gnu_varp))
+		{
+			/* skip record variables on this pass */
+			continue;
+		}
+		/* else */
+
+		old_varp = *(old_varpp + varid);
+		gnu_off = gnu_varp->begin;
+		old_off = old_varp->begin;
+	
+		if(gnu_off == old_off)
+			continue; 	/* nothing to do */
+
+		assert(gnu_off > old_off);
+
+		status = ncio_move(gnu->nciop, gnu_off, old_off,
+			 old_varp->len, 0);
+
+		if(status != NC_NOERR)
+			return status;
+		
+	}
+
+	return NC_NOERR;
+}
+
+
+/*
+ * Given a valid ncp, return NC_EVARSIZE if any variable has a bad len 
+ * (product of non-rec dim sizes too large), else return NC_NOERR.
+ */
+static int
+NC_check_vlens(NC *ncp)
+{
+    NC_var **vpp;
+    /* maximum permitted variable size (or size of one record's worth
+       of a record variable) in bytes.  This is different for format 1
+       and format 2. */
+    size_t vlen_max;
+    size_t ii;
+    size_t large_vars_count;
+    size_t rec_vars_count;
+    int last = 0;
+
+    if(ncp->vars.nelems == 0) 
+	return NC_NOERR;
+
+    if ((ncp->flags & NC_64BIT_OFFSET) && sizeof(off_t) > 4) {
+	/* CDF2 format and LFS */
+	vlen_max = X_UINT_MAX - 3; /* "- 3" handles rounded-up size */
+    } else {
+	/* CDF1 format */
+	vlen_max = X_INT_MAX - 3;
+    }
+    /* Loop through vars, first pass is for non-record variables.   */
+    large_vars_count = 0;
+    rec_vars_count = 0;
+    vpp = ncp->vars.value;
+    for (ii = 0; ii < ncp->vars.nelems; ii++, vpp++) {
+	if( !IS_RECVAR(*vpp) ) {
+	    last = 0;
+	    if( NC_check_vlen(*vpp, vlen_max) == 0 ) {
+		large_vars_count++;
+		last = 1;
+	    }
+	} else {
+	  rec_vars_count++;
+	}
+    }
+    /* OK if last non-record variable size too large, since not used to 
+       compute an offset */
+    if( large_vars_count > 1) { /* only one "too-large" variable allowed */
+      return NC_EVARSIZE;
+    }
+    /* and it has to be the last one */ 
+    if( large_vars_count == 1 && last == 0) { 
+      return NC_EVARSIZE;
+    }
+    if( rec_vars_count > 0 ) {
+	/* and if it's the last one, there can't be any record variables */
+	if( large_vars_count == 1 && last == 1) {
+	    return NC_EVARSIZE;
+	}
+	/* Loop through vars, second pass is for record variables.   */
+	large_vars_count = 0;
+	vpp = ncp->vars.value;
+	for (ii = 0; ii < ncp->vars.nelems; ii++, vpp++) {
+	    if( IS_RECVAR(*vpp) ) {
+		last = 0;
+		if( NC_check_vlen(*vpp, vlen_max) == 0 ) {
+		    large_vars_count++;
+		    last = 1;
+		}
+	    }
+	}
+	/* OK if last record variable size too large, since not used to 
+	   compute an offset */
+	if( large_vars_count > 1) { /* only one "too-large" variable allowed */
+	    return NC_EVARSIZE;
+	}
+	/* and it has to be the last one */ 
+	if( large_vars_count == 1 && last == 0) { 
+	    return NC_EVARSIZE;
+	}
+    }
+    return NC_NOERR;
+}
+
+
+/*
+ *  End define mode.
+ *  Common code for ncendef, ncclose(endef)
+ *  Flushes I/O buffers.
+ */
+static int
+NC_endef(NC *ncp,
+	size_t h_minfree, size_t v_align,
+	size_t v_minfree, size_t r_align)
+{
+	int status = NC_NOERR;
+
+	assert(!NC_readonly(ncp));
+	assert(NC_indef(ncp));
+
+	status = NC_check_vlens(ncp);
+	if(status != NC_NOERR)
+	    return status;
+	status = NC_begins(ncp, h_minfree, v_align, v_minfree, r_align);
+	if(status != NC_NOERR)
+	    return status;
+
+	if(ncp->old != NULL)
+	{
+		/* a plain redef, not a create */
+		assert(!NC_IsNew(ncp));
+		assert(fIsSet(ncp->flags, NC_INDEF));
+		assert(ncp->begin_rec >= ncp->old->begin_rec);
+		assert(ncp->begin_var >= ncp->old->begin_var);
+
+		if(ncp->vars.nelems != 0)
+		{
+		if(ncp->begin_rec > ncp->old->begin_rec)
+		{
+			status = move_recs_r(ncp, ncp->old);
+			if(status != NC_NOERR)
+				return status;
+			if(ncp->begin_var > ncp->old->begin_var)
+			{
+				status = move_vars_r(ncp, ncp->old);
+				if(status != NC_NOERR)
+					return status;
+			} 
+			/* else if (ncp->begin_var == ncp->old->begin_var) { NOOP } */
+		}
+		else
+		{	/* Even if (ncp->begin_rec == ncp->old->begin_rec)
+			   and     (ncp->begin_var == ncp->old->begin_var)
+			   might still have added a new record variable */
+		        if(ncp->recsize > ncp->old->recsize)
+			{
+			        status = move_recs_r(ncp, ncp->old);
+				if(status != NC_NOERR)
+				      return status;
+			}
+		}
+		}
+	}
+
+	status = write_NC(ncp);
+	if(status != NC_NOERR)
+		return status;
+
+	if(NC_dofill(ncp))
+	{
+		if(NC_IsNew(ncp))
+		{
+			status = fillerup(ncp);
+			if(status != NC_NOERR)
+				return status;
+			
+		}
+		else if(ncp->vars.nelems > ncp->old->vars.nelems)
+		{
+			status = fill_added(ncp, ncp->old);
+			if(status != NC_NOERR)
+				return status;
+			status = fill_added_recs(ncp, ncp->old);
+			if(status != NC_NOERR)
+				return status;
+		}
+	}
+
+	if(ncp->old != NULL)
+	{
+		free_NC(ncp->old);
+		ncp->old = NULL;
+	}
+
+	fClr(ncp->flags, NC_CREAT | NC_INDEF);
+
+	return ncio_sync(ncp->nciop);
+}
+
+#ifdef LOCKNUMREC
+static int
+NC_init_pe(NC *ncp, int basepe) {
+	if (basepe < 0 || basepe >= _num_pes()) {
+		return NC_EINVAL; /* invalid base pe */
+	}
+	/* initialize common values */
+	ncp->lock[LOCKNUMREC_VALUE] = 0;
+	ncp->lock[LOCKNUMREC_LOCK] = 0;
+	ncp->lock[LOCKNUMREC_SERVING] = 0;
+	ncp->lock[LOCKNUMREC_BASEPE] =  basepe;
+	return NC_NOERR;
+}
+#endif
+
+
+/*
+ * Compute the expected size of the file.
+ */
+int
+NC_calcsize(const NC *ncp, off_t *calcsizep)
+{
+	NC_var **vpp = (NC_var **)ncp->vars.value;
+	NC_var *const *const end = &vpp[ncp->vars.nelems];
+	NC_var *last_fix = NULL;	/* last "non-record" var */
+	int numrecvars = 0;	/* number of record variables */
+
+	if(ncp->vars.nelems == 0) { /* no non-record variables and 
+				       no record variables */
+	    *calcsizep = ncp->xsz; /* size of header */
+	    return NC_NOERR;
+	}
+
+	for( /*NADA*/; vpp < end; vpp++) {
+	    if(IS_RECVAR(*vpp)) {
+		numrecvars++;
+	    } else {
+		last_fix = *vpp;
+	    }
+	}
+
+	if(numrecvars == 0) {
+	    off_t varsize;
+	    assert(last_fix != NULL);
+	    varsize = last_fix->len;
+	    if(last_fix->len == X_UINT_MAX) { /* huge last fixed var */
+		int i;
+		varsize = 1;
+		    for(i = 0; i < last_fix->ndims; i++ ) {
+			varsize *= last_fix->shape[i];
+		    }
+	    }
+	    *calcsizep = last_fix->begin + varsize;
+	    /*last_var = last_fix;*/
+	} else {       /* we have at least one record variable */
+	    *calcsizep = ncp->begin_rec + ncp->numrecs * ncp->recsize;
+	}
+
+	return NC_NOERR;
+}
+
+/* Public */
+
+int NC3_new_nc(NC** ncpp)
+{
+	NC *ncp;
+
+#if _CRAYMPP && defined(LOCKNUMREC)
+	ncp = (NC *) shmalloc(sizeof(NC));
+#else
+	ncp = (NC *) malloc(sizeof(NC));
+#endif /* _CRAYMPP && LOCKNUMREC */
+	if(ncp == NULL)
+		return NC_ENOMEM;
+	(void) memset(ncp, 0, sizeof(NC));
+
+	ncp->xsz = MIN_NC_XSZ;
+	assert(ncp->xsz == ncx_len_NC(ncp,0));
+	
+        if(ncpp) *ncpp = ncp;
+        return NC_NOERR;
+
+}
+
+/* WARNING: SIGNATURE CHANGE */
+int
+NC3_create(const char *path, int ioflags,
+		size_t initialsz, int basepe,
+		size_t *chunksizehintp,
+		int use_parallel, void* parameters,
+                NC_Dispatch* dispatch, NC** ncpp)
+{
+	NC *ncp;
+	int status;
+	void *xp = NULL;
+	int sizeof_off_t = 0;
+
+#if ALWAYS_NC_SHARE /* DEBUG */
+	fSet(ioflags, NC_SHARE);
+#endif
+
+	ncp = new_NC(chunksizehintp,dispatch);
+	if(ncp == NULL)
+		return NC_ENOMEM;
+
+#if defined(LOCKNUMREC) /* && _CRAYMPP */
+	if (status = NC_init_pe(ncp, basepe)) {
+		return status;
+	}
+#else
+	/*
+	 * !_CRAYMPP, only pe 0 is valid
+	 */
+	if(basepe != 0)
+		return NC_EINVAL;
+#endif
+
+	assert(ncp->flags == 0);
+
+	/* Apply default create format. */
+	if (default_create_format == NC_FORMAT_64BIT)
+	  ioflags |= NC_64BIT_OFFSET;
+
+	if (fIsSet(ioflags, NC_64BIT_OFFSET)) {
+	  fSet(ncp->flags, NC_64BIT_OFFSET);
+	  sizeof_off_t = 8;
+	} else {
+	  sizeof_off_t = 4;
+	}
+
+	assert(ncp->xsz == ncx_len_NC(ncp,sizeof_off_t));
+	
+        status =  ncio_create(path, ioflags, initialsz,
+			      0, ncp->xsz, &ncp->chunk,
+			      &ncp->nciop, &xp);
+	if(status != NC_NOERR)
+	{
+		/* translate error status */
+		if(status == EEXIST)
+			status = NC_EEXIST;
+		goto unwind_alloc;
+	}
+
+	fSet(ncp->flags, NC_CREAT);
+
+	if(fIsSet(ncp->nciop->ioflags, NC_SHARE))
+	{
+		/*
+		 * NC_SHARE implies sync up the number of records as well.
+		 * (File format version one.)
+		 * Note that other header changes are not shared
+		 * automatically.  Some sort of IPC (external to this package)
+		 * would be used to trigger a call to nc_sync().
+		 */
+		fSet(ncp->flags, NC_NSYNC);
+	}
+
+	status = ncx_put_NC(ncp, &xp, sizeof_off_t, ncp->xsz);
+	if(status != NC_NOERR)
+		goto unwind_ioc;
+
+	add_to_NCList(ncp);
+
+	if(chunksizehintp != NULL)
+		*chunksizehintp = ncp->chunk;
+
+	ncp->int_ncid = ncp->nciop->fd;
+
+	if(ncpp) *ncpp = ncp;	
+
+	return NC_NOERR;
+
+unwind_ioc:
+	(void) ncio_close(ncp->nciop, 1); /* N.B.: unlink */
+	ncp->nciop = NULL;
+	/*FALLTHRU*/
+unwind_alloc:
+	free_NC(ncp);
+	return status;
+}
+
+/* This function sets a default create flag that will be logically
+   or'd to whatever flags are passed into nc_create for all future
+   calls to nc_create.
+   Valid default create flags are NC_64BIT_OFFSET, NC_CLOBBER,
+   NC_LOCK, NC_SHARE. */
+int
+nc_set_default_format(int format, int *old_formatp)
+{
+    /* Return existing format if desired. */
+    if (old_formatp)
+      *old_formatp = default_create_format;
+
+    /* Make sure only valid format is set. */
+#ifdef USE_NETCDF4
+    if (format != NC_FORMAT_CLASSIC && format != NC_FORMAT_64BIT &&
+	format != NC_FORMAT_NETCDF4 && format != NC_FORMAT_NETCDF4_CLASSIC)
+      return NC_EINVAL;
+#else
+    if (format != NC_FORMAT_CLASSIC && format != NC_FORMAT_64BIT)
+      return NC_EINVAL;
+#endif
+    default_create_format = format;
+    return NC_NOERR;
+}
+
+int
+NC3_open(const char * path, int ioflags,
+               int basepe, size_t *chunksizehintp,
+	       int use_parallel,void* parameters,
+               NC_Dispatch* dispatch, NC** ncpp)
+{
+	NC *ncp;
+	int status;
+
+#if ALWAYS_NC_SHARE /* DEBUG */
+	fSet(ioflags, NC_SHARE);
+#endif
+
+	ncp = new_NC(chunksizehintp,dispatch);
+	if(ncp == NULL)
+		return NC_ENOMEM;
+
+#if defined(LOCKNUMREC) /* && _CRAYMPP */
+	if (status = NC_init_pe(ncp, basepe)) {
+		return status;
+	}
+#else
+	/*
+	 * !_CRAYMPP, only pe 0 is valid
+	 */
+	if(basepe != 0)
+		return NC_EINVAL;
+#endif
+
+	status = ncio_open(path, ioflags, 0, 0, &ncp->chunk, &ncp->nciop, 0);
+	if(status)
+		goto unwind_alloc;
+
+	assert(ncp->flags == 0);
+
+	if(fIsSet(ncp->nciop->ioflags, NC_SHARE))
+	{
+		/*
+		 * NC_SHARE implies sync up the number of records as well.
+		 * (File format version one.)
+		 * Note that other header changes are not shared
+		 * automatically.  Some sort of IPC (external to this package)
+		 * would be used to trigger a call to nc_sync().
+		 */
+		fSet(ncp->flags, NC_NSYNC);
+	}
+
+	status = nc_get_NC(ncp);
+	if(status != NC_NOERR)
+		goto unwind_ioc;
+
+	add_to_NCList(ncp);
+
+	if(chunksizehintp != NULL)
+		*chunksizehintp = ncp->chunk;
+
+	ncp->int_ncid = ncp->nciop->fd;
+
+	if(ncpp) *ncpp = ncp;
+
+	return NC_NOERR;
+
+unwind_ioc:
+	(void) ncio_close(ncp->nciop, 0);
+	ncp->nciop = NULL;
+	/*FALLTHRU*/
+unwind_alloc:
+	free_NC(ncp);
+	return status;
+}
+
+int
+NC3__enddef(int ncid,
+	size_t h_minfree, size_t v_align,
+	size_t v_minfree, size_t r_align)
+{
+	int status;
+	NC *ncp;
+
+	status = NC_check_id(ncid, &ncp); 
+	if(status != NC_NOERR)
+		return status;
+
+	if(!NC_indef(ncp))
+		return(NC_ENOTINDEFINE);
+
+	return (NC_endef(ncp, h_minfree, v_align, v_minfree, r_align));
+}
+
+
+int
+NC3_close(int ncid)
+{
+	int status = NC_NOERR;
+	NC *ncp; 
+
+	status = NC_check_id(ncid, &ncp); 
+	if(status != NC_NOERR)
+		return status;
+
+	if(NC_indef(ncp))
+	{
+		status = NC_endef(ncp, 0, 1, 0, 1); /* TODO: defaults */
+		if(status != NC_NOERR )
+		{
+			(void) nc_abort(ncid);
+			return status;
+		}
+	}
+	else if(!NC_readonly(ncp))
+	{
+		status = NC_sync(ncp);
+		/* flush buffers before any filesize comparisons */
+		(void) ncio_sync(ncp->nciop);
+	}
+
+	/* 
+	 * If file opened for writing and filesize is less than
+	 * what it should be (due to previous use of NOFILL mode),
+	 * pad it to correct size, as reported by NC_calcsize().
+	 */
+	if (status == ENOERR) {
+	    off_t filesize; 	/* current size of open file */
+	    off_t calcsize;	/* calculated file size, from header */
+	    status = ncio_filesize(ncp->nciop, &filesize);
+	    if(status != ENOERR)
+		return status;
+	    status = NC_calcsize(ncp, &calcsize);
+	    if(status != NC_NOERR)
+		return status;
+	    if(filesize < calcsize && !NC_readonly(ncp)) {
+		status = ncio_pad_length(ncp->nciop, calcsize);
+		if(status != ENOERR)
+		    return status;
+	    }
+	}
+
+	(void) ncio_close(ncp->nciop, 0);
+	ncp->nciop = NULL;
+
+	del_from_NCList(ncp);
+
+	free_NC(ncp);
+
+	return status;
+}
+
+/*
+ * In data mode, same as ncclose.
+ * In define mode, restore previous definition.
+ * In create, remove the file.
+ */
+int
+NC3_abort(int ncid)
+{
+	int status;
+	NC *ncp;
+	int doUnlink = 0;
+
+	status = NC_check_id(ncid, &ncp); 
+	if(status != NC_NOERR)
+		return status;
+
+	doUnlink = NC_IsNew(ncp);
+
+	if(ncp->old != NULL)
+	{
+		/* a plain redef, not a create */
+		assert(!NC_IsNew(ncp));
+		assert(fIsSet(ncp->flags, NC_INDEF));
+		free_NC(ncp->old);
+		ncp->old = NULL;
+		fClr(ncp->flags, NC_INDEF);
+	}
+	else if(!NC_readonly(ncp))
+	{
+		status = NC_sync(ncp);
+		if(status != NC_NOERR)
+			return status;
+	}
+
+
+	(void) ncio_close(ncp->nciop, doUnlink);
+	ncp->nciop = NULL;
+
+	del_from_NCList(ncp);
+
+	free_NC(ncp);
+
+	return NC_NOERR;
+}
+
+
+int
+NC3_redef(int ncid)
+{
+	int status;
+	NC *ncp;
+
+	status = NC_check_id(ncid, &ncp); 
+	if(status != NC_NOERR)
+		return status;
+
+	if(NC_readonly(ncp))
+		return NC_EPERM;
+
+	if(NC_indef(ncp))
+		return NC_EINDEFINE;
+
+	
+	if(fIsSet(ncp->nciop->ioflags, NC_SHARE))
+	{
+		/* read in from disk */
+		status = read_NC(ncp);
+		if(status != NC_NOERR)
+			return status;
+	}
+
+	ncp->old = dup_NC(ncp);
+	if(ncp->old == NULL)
+		return NC_ENOMEM;
+
+	fSet(ncp->flags, NC_INDEF);
+
+	return NC_NOERR;
+}
+
+
+int
+NC3_inq(int ncid,
+	int *ndimsp,
+	int *nvarsp,
+	int *nattsp,
+	int *xtendimp)
+{
+	int status;
+	NC *ncp;
+
+	status = NC_check_id(ncid, &ncp); 
+	if(status != NC_NOERR)
+		return status;
+
+	if(ndimsp != NULL)
+		*ndimsp = (int) ncp->dims.nelems;
+	if(nvarsp != NULL)
+		*nvarsp = (int) ncp->vars.nelems;
+	if(nattsp != NULL)
+		*nattsp = (int) ncp->attrs.nelems;
+	if(xtendimp != NULL)
+		*xtendimp = find_NC_Udim(&ncp->dims, NULL);
+
+	return NC_NOERR;
+}
+
+int 
+NC3_inq_unlimdim(int ncid, int *xtendimp)
+{
+	int status;
+	NC *ncp;
+
+	status = NC_check_id(ncid, &ncp); 
+	if(status != NC_NOERR)
+		return status;
+
+	if(xtendimp != NULL)
+		*xtendimp = find_NC_Udim(&ncp->dims, NULL);
+
+	return NC_NOERR;
+}
+
+int
+NC3_sync(int ncid)
+{
+	int status;
+	NC *ncp;
+
+	status = NC_check_id(ncid, &ncp); 
+	if(status != NC_NOERR)
+		return status;
+
+	if(NC_indef(ncp))
+		return NC_EINDEFINE;
+
+	if(NC_readonly(ncp))
+	{
+		return read_NC(ncp);
+	}
+	/* else, read/write */
+
+	status = NC_sync(ncp);
+	if(status != NC_NOERR)
+		return status;
+
+	status = ncio_sync(ncp->nciop);
+	if(status != NC_NOERR)
+		return status;
+
+#ifdef USE_FSYNC
+	/* may improve concurrent access, but slows performance if
+	 * called frequently */
+#ifndef WIN32
+	status = fsync(ncp->nciop->fd);
+#else
+	status = _commit(ncp->nciop->fd);
+#endif	/* WIN32 */
+#endif	/* USE_FSYNC */
+
+	return status;
+}
+
+
+int
+NC3_set_fill(int ncid,
+	int fillmode, int *old_mode_ptr)
+{
+	int status;
+	NC *ncp;
+	int oldmode;
+
+	status = NC_check_id(ncid, &ncp); 
+	if(status != NC_NOERR)
+		return status;
+
+	if(NC_readonly(ncp))
+		return NC_EPERM;
+
+	oldmode = fIsSet(ncp->flags, NC_NOFILL) ? NC_NOFILL : NC_FILL;
+
+	if(fillmode == NC_NOFILL)
+	{
+		fSet(ncp->flags, NC_NOFILL);
+	}
+	else if(fillmode == NC_FILL)
+	{
+		if(fIsSet(ncp->flags, NC_NOFILL))
+		{
+			/*
+			 * We are changing back to fill mode
+			 * so do a sync
+			 */
+			status = NC_sync(ncp);
+			if(status != NC_NOERR)
+				return status;
+		}
+		fClr(ncp->flags, NC_NOFILL);
+	}
+	else
+	{
+		return NC_EINVAL; /* Invalid fillmode */
+	}
+
+	if(old_mode_ptr != NULL)
+		*old_mode_ptr = oldmode;
+
+	return NC_NOERR;
+}
+
+#ifdef LOCKNUMREC
+
+/* create function versions of the NC_*_numrecs macros */
+size_t
+NC_get_numrecs(const NC *ncp) {
+	shmem_t numrec;
+	shmem_short_get(&numrec, (shmem_t *) ncp->lock + LOCKNUMREC_VALUE, 1,
+		ncp->lock[LOCKNUMREC_BASEPE]);
+	return (size_t) numrec;
+}
+
+void
+NC_set_numrecs(NC *ncp, size_t nrecs)
+{
+    shmem_t numrec = (shmem_t) nrecs;
+    /* update local value too */
+    ncp->lock[LOCKNUMREC_VALUE] = (ushmem_t) numrec;
+    shmem_short_put((shmem_t *) ncp->lock + LOCKNUMREC_VALUE, &numrec, 1,
+    ncp->lock[LOCKNUMREC_BASEPE]);
+}
+
+void NC_increase_numrecs(NC *ncp, size_t nrecs)
+{
+    /* this is only called in one place that's already protected
+     * by a lock ... so don't worry about it */
+    if (nrecs > NC_get_numrecs(ncp))
+	NC_set_numrecs(ncp, nrecs);
+}
+
+#endif /* LOCKNUMREC */
+
+/* everyone in communicator group will be executing this */
+/*ARGSUSED*/
+int
+NC3_set_base_pe(int ncid, int pe)
+{
+#if _CRAYMPP && defined(LOCKNUMREC)
+	int status;
+	NC *ncp;
+	shmem_t numrecs;
+
+	if ((status = NC_check_id(ncid, &ncp)) != NC_NOERR) {
+		return status;
+	}
+	if (pe < 0 || pe >= _num_pes()) {
+		return NC_EINVAL; /* invalid base pe */
+	}
+
+	numrecs = (shmem_t) NC_get_numrecs(ncp);
+
+	ncp->lock[LOCKNUMREC_VALUE] = (ushmem_t) numrecs;
+
+	/* update serving & lock values for a "smooth" transition */
+	/* note that the "real" server will being doing this as well */
+	/* as all the rest in the group */
+	/* must have syncronization before & after this step */
+	shmem_short_get(
+		(shmem_t *) ncp->lock + LOCKNUMREC_SERVING,
+		(shmem_t *) ncp->lock + LOCKNUMREC_SERVING,
+		1, ncp->lock[LOCKNUMREC_BASEPE]);
+
+	shmem_short_get(
+		(shmem_t *) ncp->lock + LOCKNUMREC_LOCK,
+		(shmem_t *) ncp->lock + LOCKNUMREC_LOCK,
+		1, ncp->lock[LOCKNUMREC_BASEPE]);
+
+	/* complete transition */
+	ncp->lock[LOCKNUMREC_BASEPE] = (ushmem_t) pe;
+
+#endif /* _CRAYMPP && LOCKNUMREC */
+	return NC_NOERR;
+}
+
+/*ARGSUSED*/
+int
+NC3_inq_base_pe(int ncid, int *pe)
+{
+#if _CRAYMPP && defined(LOCKNUMREC)
+	int status;
+	NC *ncp;
+
+	if ((status = NC_check_id(ncid, &ncp)) != NC_NOERR) {
+		return status;
+	}
+
+	*pe = (int) ncp->lock[LOCKNUMREC_BASEPE];
+#else
+	/*
+	 * !_CRAYMPP, only pe 0 is valid
+	 */
+	*pe = 0;
+#endif /* _CRAYMPP && LOCKNUMREC */
+	return NC_NOERR;
+}
+
+int
+NC3_inq_format(int ncid, int *formatp)
+{
+	int status;
+	NC *ncp;
+
+	status = NC_check_id(ncid, &ncp); 
+	if(status != NC_NOERR)
+		return status;
+
+	/* only need to check for netCDF-3 variants, since this is never called for netCDF-4 
+	   files */
+	*formatp = fIsSet(ncp->flags, NC_64BIT_OFFSET) ? NC_FORMAT_64BIT 
+	    : NC_FORMAT_CLASSIC; 
+	return NC_NOERR;
+}
+
+/* The sizes of types may vary from platform to platform, but within
+ * netCDF files, type sizes are fixed. */
+#define NC_BYTE_LEN 1
+#define NC_CHAR_LEN 1
+#define NC_SHORT_LEN 2
+#define NC_INT_LEN 4
+#define NC_FLOAT_LEN 4
+#define NC_DOUBLE_LEN 8
+#define NUM_ATOMIC_TYPES 6
+
+/* This netCDF-4 function proved so popular that a netCDF-classic
+ * version is provided. You're welcome. */
+int
+NC3_inq_type(int ncid, nc_type typeid, char *name, size_t *size)
+{
+   int atomic_size[NUM_ATOMIC_TYPES] = {NC_BYTE_LEN, NC_CHAR_LEN, NC_SHORT_LEN, 
+					NC_INT_LEN, NC_FLOAT_LEN, NC_DOUBLE_LEN};
+   char atomic_name[NUM_ATOMIC_TYPES][NC_MAX_NAME + 1] = {"byte", "char", "short", 
+							  "int", "float", "double"};
+   
+   /* Only netCDF classic model needs to be handled. */
+   if (typeid < NC_BYTE || typeid > NC_DOUBLE)
+      return NC_EBADTYPE;
+
+   /* Give the user the values they want. Subtract one because types
+    * are numbered starting at 1, not 0. */
+   if (name)
+      strcpy(name, atomic_name[typeid - 1]);
+   if (size)
+      *size = atomic_size[typeid - 1];
+
+   return NC_NOERR;
+}
+
+int
+nc_delete_mp(const char * path, int basepe)
+{
+	NC *ncp;
+	int status;
+	size_t chunk = 512;
+
+	status = NC3_new_nc(&ncp);
+        if(status) return status;
+        ncp->chunk = chunk;
+	
+#if defined(LOCKNUMREC) /* && _CRAYMPP */
+	if (status = NC_init_pe(ncp, basepe)) {
+		return status;
+	}
+#else
+	/*
+	 * !_CRAYMPP, only pe 0 is valid
+	 */
+	if(basepe != 0)
+		return NC_EINVAL;
+#endif
+
+	status = ncio_open(path, NC_NOWRITE,
+		0, 0, &ncp->chunk,
+		&ncp->nciop, 0);
+	if(status)
+		goto unwind_alloc;
+
+	assert(ncp->flags == 0);
+
+	status = nc_get_NC(ncp);
+	if(status != NC_NOERR)
+	{
+		/* Not a netcdf file, don't delete */
+		/* ??? is this the right semantic? what if it was just too big? */
+		(void) ncio_close(ncp->nciop, 0);
+	}
+	else
+	{
+		/* ncio_close does the unlink */
+		status = ncio_close(ncp->nciop, 1); /* ncio_close does the unlink */
+	}
+	ncp->nciop = NULL;
+
+	ncp->nciop = NULL;
+unwind_alloc:
+	free_NC(ncp);
+	return status;
+}
+
+int
+nc_delete(const char * path)
+{
+        return nc_delete_mp(path, 0);
+}
+
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/src_netcdf4/nc.h
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/src_netcdf4/nc.h	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/src_netcdf4/nc.h	(revision 1749)
@@ -0,0 +1,429 @@
+/*
+ *	Copyright 1996, University Corporation for Atmospheric Research
+ *      See netcdf/COPYRIGHT file for copying and redistribution conditions.
+ */
+#ifndef _NC_H_
+#define _NC_H_
+
+/*
+ *	netcdf library 'private' data structures, objects and interfaces
+ */
+#include <config.h>
+#include <stddef.h>	/* size_t */
+#ifndef HAVE_STDINT_H
+#  include "pstdint.h"	/* attempts to define uint32_t etc portably */
+#else
+#  include <stdint.h>
+#endif /* HAVE_STDINT_H */
+#include <sys/types.h>	/* off_t */
+#ifdef USE_PARALLEL
+#include <netcdf_par.h>
+#else
+#include <netcdf.h>
+#endif /* USE_PARALLEL */
+#if 0
+#include "ncio.h"	
+#include "fbits.h"
+#endif
+
+/*#ifndef HAVE_SSIZE_T
+#define ssize_t int
+#endif*/
+
+#ifndef NC_ARRAY_GROWBY
+#define NC_ARRAY_GROWBY 4
+#endif
+
+/*
+ * The extern size of an empty
+ * netcdf version 1 file.
+ * The initial value of ncp->xsz.
+ */
+#define MIN_NC_XSZ 32
+
+/* Forward */
+typedef struct NC NC; /* forward reference */
+struct ncio;
+
+/*
+ *  The internal data types
+ */
+typedef enum {
+	NC_UNSPECIFIED = 0,
+/* future	NC_BITFIELD = 7, */
+/*	NC_STRING =	8,	*/
+	NC_DIMENSION =	10,
+	NC_VARIABLE =	11,
+	NC_ATTRIBUTE =	12
+} NCtype;
+
+
+/*
+ * Counted string for names and such
+ */
+typedef struct {
+	/* all xdr'd */
+	size_t nchars;
+	char *cp;
+} NC_string;
+
+/* Begin defined in string.c */
+extern void
+free_NC_string(NC_string *ncstrp);
+
+extern int
+NC_check_name(const char *name);
+
+extern NC_string *
+new_NC_string(size_t slen, const char *str);
+
+extern int
+set_NC_string(NC_string *ncstrp, const char *str);
+
+/* End defined in string.c */
+
+/*
+ * NC dimension stucture
+ */
+typedef struct {
+	/* all xdr'd */
+	NC_string *name;
+ 	uint32_t hash;
+	size_t size;
+} NC_dim;
+
+typedef struct NC_dimarray {
+	size_t nalloc;		/* number allocated >= nelems */
+	/* below gets xdr'd */
+	/* NCtype type = NC_DIMENSION */
+	size_t nelems;		/* length of the array */
+	NC_dim **value;
+} NC_dimarray;
+
+/* Begin defined in dim.c */
+
+extern void
+free_NC_dim(NC_dim *dimp);
+
+extern NC_dim *
+new_x_NC_dim(NC_string *name);
+
+extern int
+find_NC_Udim(const NC_dimarray *ncap, NC_dim **dimpp);
+
+/* dimarray */
+
+extern void
+free_NC_dimarrayV0(NC_dimarray *ncap);
+
+extern void
+free_NC_dimarrayV(NC_dimarray *ncap);
+
+extern int
+dup_NC_dimarrayV(NC_dimarray *ncap, const NC_dimarray *ref);
+
+extern NC_dim *
+elem_NC_dimarray(const NC_dimarray *ncap, size_t elem);
+
+/* End defined in dim.c */
+
+/*
+ * NC attribute
+ */
+typedef struct {
+	size_t xsz;		/* amount of space at xvalue */
+	/* below gets xdr'd */
+	NC_string *name;
+	nc_type type;		/* the discriminant */
+	size_t nelems;		/* length of the array */
+	void *xvalue;		/* the actual data, in external representation */
+} NC_attr;
+
+typedef struct NC_attrarray {
+	size_t nalloc;		/* number allocated >= nelems */
+	/* below gets xdr'd */
+	/* NCtype type = NC_ATTRIBUTE */
+	size_t nelems;		/* length of the array */
+	NC_attr **value;
+} NC_attrarray;
+
+/* Begin defined in attr.c */
+
+extern void
+free_NC_attr(NC_attr *attrp);
+
+extern NC_attr *
+new_x_NC_attr(
+	NC_string *strp,
+	nc_type type,
+	size_t nelems);
+
+extern NC_attr **
+NC_findattr(const NC_attrarray *ncap, const char *name);
+
+/* attrarray */
+
+extern void
+free_NC_attrarrayV0(NC_attrarray *ncap);
+
+extern void
+free_NC_attrarrayV(NC_attrarray *ncap);
+
+extern int
+dup_NC_attrarrayV(NC_attrarray *ncap, const NC_attrarray *ref);
+
+extern NC_attr *
+elem_NC_attrarray(const NC_attrarray *ncap, size_t elem);
+
+/* End defined in attr.c */
+
+
+/*
+ * NC variable: description and data
+ */
+typedef struct NC_var {
+	size_t xsz;		/* xszof 1 element */
+	size_t *shape; /* compiled info: dim->size of each dim */
+	off_t *dsizes; /* compiled info: the right to left product of shape */
+	/* below gets xdr'd */
+	NC_string *name;
+ 	uint32_t hash;
+	/* next two: formerly NC_iarray *assoc */ /* user definition */
+	size_t ndims;	/* assoc->count */
+	int *dimids;	/* assoc->value */
+	NC_attrarray attrs;
+	nc_type type;		/* the discriminant */
+	size_t len;		/* the total length originally allocated */
+	off_t begin;
+} NC_var;
+
+typedef struct NC_vararray {
+	size_t nalloc;		/* number allocated >= nelems */
+	/* below gets xdr'd */
+	/* NCtype type = NC_VARIABLE */
+	size_t nelems;		/* length of the array */
+	NC_var **value;
+} NC_vararray;
+
+/* Begin defined in lookup3.c */
+
+extern uint32_t
+hash_fast(const void *key, size_t length);
+
+/* End defined in lookup3.c */
+
+/* Begin defined in var.c */
+
+extern void
+free_NC_var(NC_var *varp);
+
+extern NC_var *
+new_x_NC_var(
+	NC_string *strp,
+	size_t ndims);
+
+/* vararray */
+
+extern void
+free_NC_vararrayV0(NC_vararray *ncap);
+
+extern void
+free_NC_vararrayV(NC_vararray *ncap);
+
+extern int
+dup_NC_vararrayV(NC_vararray *ncap, const NC_vararray *ref);
+
+extern int
+NC_var_shape(NC_var *varp, const NC_dimarray *dims);
+
+extern int
+NC_findvar(const NC_vararray *ncap, const char *name, NC_var **varpp);
+
+extern int
+NC_check_vlen(NC_var *varp, size_t vlen_max);
+
+extern NC_var *
+NC_lookupvar(NC *ncp, int varid);
+
+/* End defined in var.c */
+
+#define IS_RECVAR(vp) \
+	((vp)->shape != NULL ? (*(vp)->shape == NC_UNLIMITED) : 0 )
+
+#ifdef LOCKNUMREC
+/*
+ * typedef SHMEM type
+ * for whenever the SHMEM functions can handle other than shorts
+ */
+typedef unsigned short int	ushmem_t;
+typedef short int		 shmem_t;
+#endif
+
+/* Warning: fields from BEGIN COMMON to END COMMON must be same for:
+	1. NCcommon (include/ncdispatch.h)
+	2. NC (libsrc/nc.h)
+	3. NC_FILE_INFO (libsrc4/nc4internal.h)
+	4. whatever libdiskless uses
+*/
+struct NC {
+/*BEGIN COMMON (see include/ncdispatch.h: struct NCcommon) */
+	int ext_ncid;
+	int int_ncid;
+	struct NC_Dispatch* dispatch;	
+	void* dispatchdata;
+	char* path;
+	int substrate;
+	void* instance; /* per-instance data specific to netcdf3,4,dap,etc.
+                           Currently only used by librpc, will retrofit other
+                           dispatch kinds over time. */
+/*END COMMON*/
+	/* contains the previous NC during redef. */
+	struct NC *old;
+	/* flags */
+#define NC_CREAT 2	/* in create phase, cleared by ncendef */
+#define NC_INDEF 8	/* in define mode, cleared by ncendef */
+#define NC_NSYNC 0x10	/* synchronise numrecs on change */
+#define NC_HSYNC 0x20	/* synchronise whole header on change */
+#define NC_NDIRTY 0x40	/* numrecs has changed */
+#define NC_HDIRTY 0x80  /* header info has changed */
+/*	NC_NOFILL in netcdf.h, historical interface */
+	int flags;
+	struct ncio* nciop;
+	size_t chunk;	/* largest extent this layer will request from ncio->get() */
+	size_t xsz;	/* external size of this header, == var[0].begin */
+	off_t begin_var; /* position of the first (non-record) var */
+	off_t begin_rec; /* position of the first 'record' */
+        /* Don't constrain maximum size of record unnecessarily */
+#if SIZEOF_OFF_T > SIZEOF_SIZE_T
+        off_t recsize;   /* length of 'record' */
+#else
+	size_t recsize;  /* length of 'record' */
+#endif
+	/* below gets xdr'd */
+	size_t numrecs; /* number of 'records' allocated */
+	NC_dimarray dims;
+	NC_attrarray attrs;
+	NC_vararray vars;
+#ifdef LOCKNUMREC
+/* size and named indexes for the lock array protecting NC.numrecs */
+#  define LOCKNUMREC_DIM	4
+#  define LOCKNUMREC_VALUE	0
+#  define LOCKNUMREC_LOCK	1
+#  define LOCKNUMREC_SERVING	2
+#  define LOCKNUMREC_BASEPE	3
+	/* Used on Cray T3E MPP to maintain the
+	 * integrity of numrecs for an unlimited dimension
+	 */
+	ushmem_t lock[LOCKNUMREC_DIM];
+#endif
+};
+
+#define NC_readonly(ncp) \
+	(!fIsSet(ncp->nciop->ioflags, NC_WRITE))
+
+#define NC_IsNew(ncp) \
+	fIsSet((ncp)->flags, NC_CREAT)
+
+#define NC_indef(ncp) \
+	(NC_IsNew(ncp) || fIsSet((ncp)->flags, NC_INDEF)) 
+
+#define set_NC_ndirty(ncp) \
+	fSet((ncp)->flags, NC_NDIRTY)
+
+#define NC_ndirty(ncp) \
+	fIsSet((ncp)->flags, NC_NDIRTY)
+
+#define set_NC_hdirty(ncp) \
+	fSet((ncp)->flags, NC_HDIRTY)
+
+#define NC_hdirty(ncp) \
+	fIsSet((ncp)->flags, NC_HDIRTY)
+
+#define NC_dofill(ncp) \
+	(!fIsSet((ncp)->flags, NC_NOFILL))
+
+#define NC_doHsync(ncp) \
+	fIsSet((ncp)->flags, NC_HSYNC)
+
+#define NC_doNsync(ncp) \
+	fIsSet((ncp)->flags, NC_NSYNC)
+
+#ifndef LOCKNUMREC
+#  define NC_get_numrecs(ncp) \
+	((ncp)->numrecs)
+
+#  define NC_set_numrecs(ncp, nrecs) \
+	{((ncp)->numrecs = (nrecs));}
+
+#  define NC_increase_numrecs(ncp, nrecs) \
+	{if((nrecs) > (ncp)->numrecs) ((ncp)->numrecs = (nrecs));}
+#else
+	size_t NC_get_numrecs(const NC *ncp);
+	void   NC_set_numrecs(NC *ncp, size_t nrecs);
+	void   NC_increase_numrecs(NC *ncp, size_t nrecs);
+#endif
+
+/* Begin defined in nc.c */
+
+extern int
+NC_check_id(int ncid, NC **ncpp);
+
+extern int
+nc_cktype(nc_type datatype);
+
+extern size_t
+ncx_howmany(nc_type type, size_t xbufsize);
+
+extern int
+read_numrecs(NC *ncp);
+
+extern int
+write_numrecs(NC *ncp);
+
+extern int
+NC_sync(NC *ncp);
+
+extern int
+NC_calcsize(const NC *ncp, off_t *filesizep);
+
+/* End defined in nc.c */
+/* Begin defined in v1hpg.c */
+
+extern size_t
+ncx_len_NC(const NC *ncp, size_t sizeof_off_t);
+
+extern int
+ncx_put_NC(const NC *ncp, void **xpp, off_t offset, size_t extent);
+
+extern int
+nc_get_NC( NC *ncp);
+
+/* End defined in v1hpg.c */
+/* Begin defined in putget.c */
+
+extern int
+fill_NC_var(NC *ncp, const NC_var *varp, size_t varsize, size_t recno);
+
+extern int
+nc_inq_rec(int ncid, size_t *nrecvars, int *recvarids, size_t *recsizes);
+
+extern int
+nc_get_rec(int ncid, size_t recnum, void **datap);
+
+extern int
+nc_put_rec(int ncid, size_t recnum, void *const *datap);
+
+/* End defined in putget.c */
+
+extern int add_to_NCList(NC*);
+extern void del_from_NCList(NC*);/* does not free object */
+extern NC* find_in_NCList(int ext_ncid);
+extern void free_NCList(void);/* reclaim whole list */
+extern int count_NCList(void); /* return # of entries in NClist */
+
+/* Create a pseudo file descriptor that does not
+   overlap real file descriptors
+*/
+extern int nc__pseudofd(void);
+
+#endif /* _NC_H_ */
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/src_netcdf4/nc3dispatch.c
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/src_netcdf4/nc3dispatch.c	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/src_netcdf4/nc3dispatch.c	(revision 1749)
@@ -0,0 +1,500 @@
+/*********************************************************************
+   Copyright 2010, UCAR/Unidata See netcdf/COPYRIGHT file for
+   copying and redistribution conditions.
+
+   $Id: nc3dispatch.c,v 2.8 2010/05/26 11:11:26 ed Exp $
+ *********************************************************************/
+
+#include "config.h"
+#include <stdlib.h>
+#include <string.h>
+
+#include "netcdf.h"
+#include "nc.h"
+#include "nc3dispatch.h"
+
+#ifndef NC_CONTIGUOUS
+#define NC_CONTIGUOUS 1
+#endif
+
+#ifndef NC_ENOTNC4
+#define NC_ENOTNC4 (-111)
+#endif
+
+#ifndef NC_ENOGRP
+#define NC_ENOGRP (-125)
+#endif
+
+#ifndef NC_STRING
+#define NC_STRING (12)
+#endif
+
+
+static int NC3_inq_var_all(int ncid, int varid, char *name, nc_type *xtypep, 
+               int *ndimsp, int *dimidsp, int *nattsp, 
+               int *shufflep, int *deflatep, int *deflate_levelp,
+               int *fletcher32p, int *contiguousp, size_t *chunksizesp, 
+               int *no_fill, void *fill_valuep, int *endiannessp, 
+	       int *options_maskp, int *pixels_per_blockp);
+
+#ifdef USE_NETCDF4
+static int NC3_show_metadata(int);
+static int NC3_inq_unlimdims(int,int*,int*);
+static int NC3_var_par_access(int,int,int);
+static int NC3_inq_ncid(int,const char*,int*);
+static int NC3_inq_grps(int,int*,int*);
+static int NC3_inq_grpname(int,char*);
+static int NC3_inq_grpname_full(int,size_t*,char*);
+static int NC3_inq_grp_parent(int,int*);
+static int NC3_inq_grp_full_ncid(int,const char*,int*);
+static int NC3_inq_varids(int,int* nvars,int*);
+static int NC3_inq_dimids(int,int* ndims,int*,int);
+static int NC3_inq_typeids(int,int* ntypes,int*);
+static int NC3_inq_type_equal(int,nc_type,int,nc_type,int*);
+static int NC3_def_grp(int,const char*,int*);
+static int NC3_inq_user_type(int,nc_type,char*,size_t*,nc_type*,size_t*,int*);
+static int NC3_inq_typeid(int,const char*,nc_type*);
+static int NC3_def_compound(int,size_t,const char*,nc_type*);
+static int NC3_insert_compound(int,nc_type,const char*,size_t,nc_type);
+static int NC3_insert_array_compound(int,nc_type,const char*,size_t,nc_type,int,const int*);
+static int NC3_inq_compound_field(int,nc_type,int,char*,size_t*,nc_type*,int*,int*);
+static int NC3_inq_compound_fieldindex(int,nc_type,const char*,int*);
+static int NC3_def_vlen(int,const char*,nc_type base_typeid,nc_type*);
+static int NC3_put_vlen_element(int,int,void*,size_t,const void*);
+static int NC3_get_vlen_element(int,int,const void*,size_t*,void*);
+static int NC3_def_enum(int,nc_type,const char*,nc_type*);
+static int NC3_insert_enum(int,nc_type,const char*,const void*);
+static int NC3_inq_enum_member(int,nc_type,int,char*,void*);
+static int NC3_inq_enum_ident(int,nc_type,long long,char*);
+static int NC3_def_opaque(int,size_t,const char*,nc_type*);
+static int NC3_def_var_deflate(int,int,int,int,int);
+static int NC3_def_var_fletcher32(int,int,int);
+static int NC3_def_var_chunking(int,int,int,const size_t*);
+static int NC3_def_var_fill(int,int,int,const void*);
+static int NC3_def_var_endian(int,int,int);
+static int NC3_set_var_chunk_cache(int,int,size_t,size_t,float);
+static int NC3_get_var_chunk_cache(int,int,size_t*,size_t*,float*);
+#endif /*USE_NETCDF4*/
+
+NC_Dispatch NC3_dispatcher = {
+
+NC_DISPATCH_NC3,
+
+NC3_new_nc,
+
+NC3_create,
+NC3_open,
+
+NC3_redef,
+NC3__enddef,
+NC3_sync,
+NC3_abort,
+NC3_close,
+NC3_set_fill,
+NC3_inq_base_pe,
+NC3_set_base_pe,
+NC3_inq_format,
+
+NC3_inq,
+NC3_inq_type,
+
+NC3_def_dim,
+NC3_inq_dimid,
+NC3_inq_dim,
+NC3_inq_unlimdim,
+NC3_rename_dim,
+
+NC3_inq_att,
+NC3_inq_attid,
+NC3_inq_attname,
+NC3_rename_att,
+NC3_del_att,
+NC3_get_att,
+NC3_put_att,
+
+NC3_def_var,
+NC3_inq_varid,
+NC3_rename_var,
+NC3_get_vara,
+NC3_put_vara,
+NCDEFAULT_get_vars,
+NCDEFAULT_put_vars,
+NCDEFAULT_get_varm,
+NCDEFAULT_put_varm,
+
+NC3_inq_var_all,
+
+#ifdef USE_NETCDF4
+NC3_show_metadata,
+NC3_inq_unlimdims,
+NC3_var_par_access,
+NC3_inq_ncid,
+NC3_inq_grps,
+NC3_inq_grpname,
+NC3_inq_grpname_full,
+NC3_inq_grp_parent,
+NC3_inq_grp_full_ncid,
+NC3_inq_varids,
+NC3_inq_dimids,
+NC3_inq_typeids,
+NC3_inq_type_equal,
+NC3_def_grp,
+NC3_inq_user_type,
+NC3_inq_typeid,
+
+NC3_def_compound,
+NC3_insert_compound,
+NC3_insert_array_compound,
+NC3_inq_compound_field,
+NC3_inq_compound_fieldindex,
+NC3_def_vlen,
+NC3_put_vlen_element,
+NC3_get_vlen_element,
+NC3_def_enum,
+NC3_insert_enum,
+NC3_inq_enum_member,
+NC3_inq_enum_ident,
+NC3_def_opaque,
+NC3_def_var_deflate,
+NC3_def_var_fletcher32,
+NC3_def_var_chunking,
+NC3_def_var_fill,
+NC3_def_var_endian,
+NC3_set_var_chunk_cache,
+NC3_get_var_chunk_cache,
+
+#endif /*_NC4DISPATCH_H*/
+
+};
+
+NC_Dispatch* NC3_dispatch_table = NULL; /* moved here from ddispatch.c */
+
+int
+NC3_initialize(void)
+{
+    NC3_dispatch_table = &NC3_dispatcher;
+    return NC_NOERR;
+}
+
+static int
+NC3_inq_var_all(int ncid, int varid, char *name, nc_type *xtypep, 
+               int *ndimsp, int *dimidsp, int *nattsp, 
+               int *shufflep, int *deflatep, int *deflate_levelp,
+               int *fletcher32p, int *contiguousp, size_t *chunksizesp, 
+               int *no_fill, void *fill_valuep, int *endiannessp, 
+	       int *options_maskp, int *pixels_per_blockp)
+{
+    int stat = NC3_inq_var(ncid,varid,name,xtypep,ndimsp,dimidsp,nattsp);
+    if(stat) return stat;
+    if(shufflep) *shufflep = 0;
+    if(deflatep) *deflatep = 0;
+    if(fletcher32p) *fletcher32p = 0;
+    if(contiguousp) *contiguousp = NC_CONTIGUOUS;
+    if(no_fill) *no_fill = 1;
+    if(endiannessp) return NC_ENOTNC4;
+    if(options_maskp) return NC_ENOTNC4;
+    return NC_NOERR;
+}
+
+#ifdef USE_NETCDF4
+
+static int
+NC3_inq_unlimdims(int ncid, int *ndimsp, int *unlimdimidsp)
+{
+    int retval;
+    int unlimid;
+
+    if ((retval = nc_inq_unlimdim(ncid, &unlimid)))
+        return retval;
+    if (unlimid != -1) {
+        if(ndimsp) *ndimsp = 1;
+        if (unlimdimidsp)
+            unlimdimidsp[0] = unlimid;
+    } else
+        if(ndimsp) *ndimsp = 0;
+    return NC_NOERR;
+}
+
+static int
+NC3_def_grp(int parent_ncid, const char *name, int *new_ncid)
+{
+    return NC_ENOTNC4;
+}
+
+static int
+NC3_inq_ncid(int ncid, const char *name, int *grp_ncid)
+{
+    if(grp_ncid) *grp_ncid = ncid;
+    return NC_NOERR;
+}
+
+static int
+NC3_inq_grps(int ncid, int *numgrps, int *ncids)
+{
+    if (numgrps)
+       *numgrps = 0;
+    return NC_NOERR;
+}
+
+static int
+NC3_inq_grpname(int ncid, char *name)
+{
+    if (name)
+        strcpy(name, "/");
+    return NC_NOERR;
+}
+
+static int
+NC3_inq_grpname_full(int ncid, size_t *lenp, char *full_name)
+{
+    if (full_name)
+        strcpy(full_name, "/");
+    if(lenp) *lenp = 1;
+    return NC_NOERR;
+}
+
+static int
+NC3_inq_grp_parent(int ncid, int *parent_ncid)
+{
+    return NC_ENOGRP;
+}
+
+static int
+NC3_inq_grp_full_ncid(int ncid, const char *full_name, int *grp_ncid)
+{
+    return NC_ENOGRP;
+}
+
+static int
+NC3_inq_varids(int ncid, int *nvarsp, int *varids)
+{
+    int retval,v,nvars;
+    /* If this is a netcdf-3 file, there is only one group, the root
+        group, and its vars have ids 0 thru nvars - 1. */
+    if ((retval = nc_inq(ncid, NULL, &nvars, NULL, NULL)))
+        return retval;
+    if(nvarsp) *nvarsp = nvars;
+    if (varids)
+        for (v = 0; v < nvars; v++)
+            varids[v] = v;
+    return NC_NOERR;
+}
+
+static int
+NC3_inq_dimids(int ncid, int *ndimsp, int *dimids, int include_parents)
+{
+    int retval,d,ndims;
+    /* If this is a netcdf-3 file, then the dimids are going to be 0
+       thru ndims-1, so just provide them. */
+    if ((retval = nc_inq(ncid, &ndims,  NULL, NULL, NULL)))
+        return retval;
+    if(ndimsp) *ndimsp = ndims;
+    if (dimids)
+        for (d = 0; d < ndims; d++)
+            dimids[d] = d;
+    return NC_NOERR;
+}
+
+static int
+NC3_show_metadata(int ncid)
+{
+    return NC_NOERR;
+}
+
+static int
+NC3_inq_type_equal(int ncid1, nc_type typeid1, int ncid2, nc_type typeid2, int* equalp)
+{
+    /* Check input. */
+    if(equalp == NULL) return NC_NOERR;
+    
+    if (typeid1 <= NC_NAT || typeid2 <= NC_NAT)
+       return NC_EINVAL;
+    
+    *equalp = 0; /* assume */
+    
+    /* If one is atomic, and the other user-defined, the types are not equal */
+    if ((typeid1 <= NC_STRING && typeid2 > NC_STRING) ||
+        (typeid2 <= NC_STRING && typeid1 > NC_STRING)) {
+        if (equalp) *equalp = 0;
+        return NC_NOERR;
+    }
+    
+    /* If both are atomic types, the answer is easy. */
+    if (typeid1 <= ATOMICTYPEMAX) {
+        if (equalp) {
+            if (typeid1 == typeid2)
+                *equalp = 1;
+            else
+                *equalp = 0;
+        }
+        return NC_NOERR;
+    }
+    return NC_NOERR;
+}
+
+static int
+NC3_inq_typeid(int ncid, const char *name, nc_type *typeidp)
+{
+    int i;
+    for (i = 0; i <= ATOMICTYPEMAX; i++)
+        if (!strcmp(name, NC_atomictypename(i))) {
+            if (typeidp) *typeidp = i;
+                return NC_NOERR;
+        }
+    return NC_ENOTNC4;
+}
+
+static int
+NC3_inq_typeids(int ncid, int *ntypes, int *typeids)
+{
+    if(ntypes) *ntypes = 0;
+    return NC_NOERR;
+}
+
+static int
+NC3_inq_user_type(int ncid, nc_type typeid, char *name, size_t *size,
+		 nc_type *base_nc_typep, size_t *nfieldsp, int *classp)
+{
+    return NC_ENOTNC4;
+}
+
+static int
+NC3_def_compound(int ncid, size_t size, const char *name, nc_type *typeidp)
+{
+    return NC_ENOTNC4;
+}
+
+static int
+NC3_insert_compound(int ncid, nc_type typeid, const char *name, size_t offset,
+                    nc_type field_typeid)
+{
+    return NC_ENOTNC4;
+}
+
+static int
+NC3_insert_array_compound(int ncid, nc_type typeid, const char *name,
+			 size_t offset, nc_type field_typeid,
+			 int ndims, const int *dim_sizes)
+{
+    return NC_ENOTNC4;
+}
+
+
+static int
+NC3_inq_compound_field(int ncid, nc_type typeid, int fieldid, char *name,
+		      size_t *offsetp, nc_type *field_typeidp, int *ndimsp, 
+		      int *dim_sizesp)
+{
+    return NC_ENOTNC4;
+}
+
+static int
+NC3_inq_compound_fieldindex(int ncid, nc_type typeid, const char *name, int *fieldidp)
+{
+    return NC_ENOTNC4;
+}
+
+static int
+NC3_def_opaque(int ncid, size_t datum_size, const char *name, nc_type* xtypep)
+{
+    return NC_ENOTNC4;
+}
+
+static int
+NC3_def_vlen(int ncid, const char *name, nc_type base_typeid, nc_type* xtypep)
+{
+    return NC_ENOTNC4;
+}
+
+static int
+NC3_def_enum(int ncid, nc_type base_typeid, const char *name,
+	    nc_type *typeidp)
+{
+    return NC_ENOTNC4;
+}
+
+static int
+NC3_inq_enum_ident(int ncid, nc_type xtype, long long value, char *identifier)
+{
+    return NC_ENOTNC4;
+}
+
+static int
+NC3_inq_enum_member(int ncid, nc_type typeid, int idx, char *identifier,
+		   void *value)
+{
+    return NC_ENOTNC4;
+}
+
+static int
+NC3_insert_enum(int ncid, nc_type typeid, const char *identifier,
+	       const void *value)
+{
+    return NC_ENOTNC4;
+}
+
+static int
+NC3_put_vlen_element(int ncid, int typeid, void *vlen_element,
+		    size_t len, const void *data)
+{
+    return NC_ENOTNC4;
+}
+
+static int
+NC3_get_vlen_element(int ncid, int typeid, const void *vlen_element,
+		    size_t *len, void *data)
+{
+    return NC_ENOTNC4;
+}
+
+static int
+NC3_set_var_chunk_cache(int ncid, int varid, size_t size, size_t nelems, float preemption)
+{
+    return NC_ENOTNC4;
+}
+
+static int
+NC3_get_var_chunk_cache(int ncid, int varid, size_t *sizep, size_t *nelemsp, float *preemptionp)
+{
+    return NC_ENOTNC4;
+}
+
+static int
+NC3_def_var_deflate(int ncid, int varid, int shuffle, int deflate,
+		   int deflate_level)
+{
+    return NC_ENOTNC4;
+}
+
+static int
+NC3_def_var_fletcher32(int ncid, int varid, int fletcher32)
+{
+    return NC_ENOTNC4;
+}
+
+static int
+NC3_def_var_chunking(int ncid, int varid, int contiguous, const size_t *chunksizesp)
+{
+    return NC_ENOTNC4;
+}
+
+static int
+NC3_def_var_fill(int ncid, int varid, int no_fill, const void *fill_value)
+{
+    return NC_ENOTNC4;
+}
+
+static int
+NC3_def_var_endian(int ncid, int varid, int endianness)
+{
+    return NC_ENOTNC4;
+}
+
+static int
+NC3_var_par_access(int ncid, int varid, int par_access)
+{
+    return NC_ENOTNC4;
+}
+    
+#endif /*USE_NETCDF4*/
+    
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/src_netcdf4/nc3dispatch.h
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/src_netcdf4/nc3dispatch.h	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/src_netcdf4/nc3dispatch.h	(revision 1749)
@@ -0,0 +1,186 @@
+/*
+ * Copyright 1993-1996 University Corporation for Atmospheric Research/Unidata
+ * 
+ * Portions of this software were developed by the Unidata Program at the 
+ * University Corporation for Atmospheric Research.
+ * 
+ * Access and use of this software shall impose the following obligations
+ * and understandings on the user. The user is granted the right, without
+ * any fee or cost, to use, copy, modify, alter, enhance and distribute
+ * this software, and any derivative works thereof, and its supporting
+ * documentation for any purpose whatsoever, provided that this entire
+ * notice appears in all copies of the software, derivative works and
+ * supporting documentation.  Further, UCAR requests that the user credit
+ * UCAR/Unidata in any publications that result from the use of this
+ * software or in any product that includes this software. The names UCAR
+ * and/or Unidata, however, may not be used in any advertising or publicity
+ * to endorse or promote any products or commercial entity unless specific
+ * written permission is obtained from UCAR/Unidata. The user also
+ * understands that UCAR/Unidata is not obligated to provide the user with
+ * any support, consulting, training or assistance of any kind with regard
+ * to the use, operation and performance of this software nor to provide
+ * the user with any updates, revisions, new versions or "bug fixes."
+ * 
+ * THIS SOFTWARE IS PROVIDED BY UCAR/UNIDATA "AS IS" AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL UCAR/UNIDATA BE LIABLE FOR ANY SPECIAL,
+ * INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING
+ * FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
+ * NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
+ * WITH THE ACCESS, USE OR PERFORMANCE OF THIS SOFTWARE.
+ */
+/* "$Id: nc3dispatch.h,v 2.8 2010/05/26 18:11:08 dmh Exp $" */
+
+#ifndef _NC3DISPATCH_H
+#define _NC3DISPATCH_H
+
+#include <stddef.h> /* size_t, ptrdiff_t */
+#include "netcdf.h"
+#include "ncdispatch.h"
+
+
+
+#if defined(__cplusplus)
+extern "C" {
+#endif
+
+/*
+ * The Interface
+ */
+
+/* WARNING: this signature differs from external nc_create API*/
+EXTERNL int
+NC3_create(const char *path, int cmode,
+           size_t initialsz, int basepe, size_t *chunksizehintp,
+	   int useparallel, void* mpidata,
+           struct NC_Dispatch*, NC** ncp);
+
+/* WARNING: this signature differs from external nc_open API*/
+EXTERNL int
+NC3_open(const char *path, int mode,
+         int basepe, size_t *chunksizehintp,
+         int use_parallel, void* mpidata,
+         NC_Dispatch*, NC** ncp);
+
+EXTERNL int
+NC3_new_nc(NC**);
+
+EXTERNL int
+NC3_redef(int ncid);
+
+EXTERNL int
+NC3__enddef(int ncid, size_t h_minfree, size_t v_align,
+	size_t v_minfree, size_t r_align);
+
+EXTERNL int
+NC3_sync(int ncid);
+
+EXTERNL int
+NC3_abort(int ncid);
+
+EXTERNL int
+NC3_close(int ncid);
+
+EXTERNL int
+NC3_set_fill(int ncid, int fillmode, int *old_modep);
+
+EXTERNL int
+NC3_set_base_pe(int ncid, int pe);
+
+EXTERNL int
+NC3_inq_base_pe(int ncid, int *pe);
+
+EXTERNL int
+NC3_inq_format(int ncid, int *formatp);
+
+EXTERNL int
+NC3_inq(int ncid, int *ndimsp, int *nvarsp, int *nattsp, int *unlimdimidp);
+
+EXTERNL int
+NC3_inq_type(int, nc_type, char *, size_t *);
+
+/* Begin _dim */
+
+EXTERNL int
+NC3_def_dim(int ncid, const char *name, size_t len, int *idp);
+
+EXTERNL int
+NC3_inq_dimid(int ncid, const char *name, int *idp);
+
+EXTERNL int
+NC3_inq_dim(int ncid, int dimid, char *name, size_t *lenp);
+
+EXTERNL int
+NC3_inq_unlimdim(int ncid, int *unlimdimidp);
+
+EXTERNL int
+NC3_rename_dim(int ncid, int dimid, const char *name);
+
+/* End _dim */
+/* Begin _att */
+
+EXTERNL int
+NC3_inq_att(int ncid, int varid, const char *name,
+	 nc_type *xtypep, size_t *lenp);
+
+EXTERNL int 
+NC3_inq_attid(int ncid, int varid, const char *name, int *idp);
+
+EXTERNL int
+NC3_inq_attname(int ncid, int varid, int attnum, char *name);
+
+EXTERNL int
+NC3_rename_att(int ncid, int varid, const char *name, const char *newname);
+
+EXTERNL int
+NC3_del_att(int ncid, int varid, const char*);
+
+/* End _att */
+/* Begin {put,get}_att */
+
+EXTERNL int
+NC3_get_att(int ncid, int varid, const char *name, void *value, nc_type);
+
+EXTERNL int
+NC3_put_att(int ncid, int varid, const char *name, nc_type datatype,
+	   size_t len, const void *value, nc_type);
+
+/* End {put,get}_att */
+/* Begin _var */
+
+EXTERNL int
+NC3_def_var(int ncid, const char *name,
+	 nc_type xtype, int ndims, const int *dimidsp, int *varidp);
+
+EXTERNL int
+NC3_inq_var(int ncid, int varid, char *name,
+	 nc_type *xtypep, int *ndimsp, int *dimidsp, int *nattsp);
+
+EXTERNL int
+NC3_inq_varid(int ncid, const char *name, int *varidp);
+
+EXTERNL int
+NC3_rename_var(int ncid, int varid, const char *name);
+
+
+EXTERNL int
+NC3_put_vara(int ncid, int varid,
+   	     const size_t *start, const size_t *count,
+             const void *value, nc_type);
+
+EXTERNL int
+NC3_get_vara(int ncid, int varid,
+	     const size_t *start, const size_t *count,
+             void *value, nc_type);
+
+/* End _var */
+
+extern int NC3_initialize();
+
+
+#if defined(__cplusplus)
+}
+#endif
+
+#endif /*_NC3DISPATCH_H*/
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/src_netcdf4/nc4attr.c
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/src_netcdf4/nc4attr.c	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/src_netcdf4/nc4attr.c	(revision 1749)
@@ -0,0 +1,897 @@
+/*
+This file is part of netcdf-4, a netCDF-like interface for HDF5, or a
+HDF5 backend for netCDF, depending on your point of view.
+
+This file handles the nc4 attribute functions.
+
+Remember that with atts, type conversion can take place when writing
+them, and when reading them.
+
+Copyright 2003-2011, University Corporation for Atmospheric
+Research. See COPYRIGHT file for copying and redistribution
+conditions.
+*/
+
+#include "nc4internal.h"
+#include "nc.h"
+#include "nc4dispatch.h"
+#include "ncdispatch.h"
+
+#ifdef USE_PNETCDF
+#include <pnetcdf.h>
+#endif
+
+int nc4typelen(nc_type type);
+
+/* Get or put attribute metadata from our linked list of file
+   info. Always locate the attribute by name, never by attnum.
+   The mem_type is ignored if data=NULL. */
+int
+nc4_get_att(int ncid, NC_FILE_INFO_T *nc, int varid, const char *name, 
+	    nc_type *xtype, nc_type mem_type, size_t *lenp, 
+	    int *attnum, int is_long, void *data) 
+{
+   NC_GRP_INFO_T *grp;
+   NC_HDF5_FILE_INFO_T *h5;
+   NC_ATT_INFO_T *att;
+   int my_attnum = -1;
+   int need_to_convert = 0;
+   int range_error = NC_NOERR;
+   void *bufr = NULL;
+   size_t type_size;
+   char norm_name[NC_MAX_NAME + 1];
+   int i;
+   int retval = NC_NOERR;
+
+   if (attnum)
+      my_attnum = *attnum;
+   assert(nc && nc->nc4_info);
+
+   LOG((3, "nc4_get_att: ncid 0x%x varid %d name %s attnum %d mem_type %d", 
+	ncid, varid, name, my_attnum, mem_type));
+
+   /* Find info for this file and group, and set pointer to each. */
+   h5 = nc->nc4_info;
+   if (!(grp = nc4_rec_find_grp(h5->root_grp, (ncid & GRP_ID_MASK))))
+      return NC_EBADGRPID;      
+
+   /* Normalize name. */
+   if ((retval = nc4_normalize_name(name, norm_name)))
+      return retval;
+
+   /* Find the attribute, if it exists. If we don't find it, we are
+      major failures. */
+   if ((retval = nc4_find_grp_att(grp, varid, norm_name, my_attnum, &att)))
+      return retval;
+   
+   /* If mem_type is NC_NAT, it means we want to use the attribute's
+    * file type as the mem type as well. */
+   if (mem_type == NC_NAT)
+      mem_type = att->xtype;
+
+   /* If the attribute is NC_CHAR, and the mem_type isn't, or vice
+    * versa, that's a freakish attempt to convert text to
+    * numbers. Some pervert out there is trying to pull a fast one!
+    * Send him an NC_ECHAR error...*/
+   if (data && att->len &&
+       ((att->xtype == NC_CHAR && mem_type != NC_CHAR) ||
+	(att->xtype != NC_CHAR && mem_type == NC_CHAR)))
+      return NC_ECHAR; /* take that, you freak! */
+
+   /* Copy the info. */
+   if (lenp)
+      *lenp = att->len;
+   if (xtype)
+      *xtype = att->xtype;
+   if (attnum)
+      *attnum = att->attnum;
+
+   /* Zero len attributes are easy to read! */
+   if (!att->len)
+      return NC_NOERR;
+
+   /* Later on, we will need to know the size of this type. */
+   if ((retval = nc4_get_typelen_mem(h5, mem_type, is_long, &type_size)))
+      return retval;
+
+   /* We may have to convert data. Treat NC_CHAR the same as
+    * NC_UBYTE. If the mem_type is NAT, don't try any conversion - use
+    * the attribute's type. */
+   if (data && att->len && mem_type != att->xtype &&
+       mem_type != NC_NAT &&
+       !(mem_type == NC_CHAR && 
+	 (att->xtype == NC_UBYTE || att->xtype == NC_BYTE)))
+   {
+      need_to_convert++;
+      if (!(bufr = malloc((size_t)(att->len * type_size))))
+	 return NC_ENOMEM;
+      if ((retval = nc4_convert_type(att->data, bufr, att->xtype, 
+				     mem_type, (size_t)att->len, &range_error, 
+				     NULL, (h5->cmode & NC_CLASSIC_MODEL), 0, is_long)))
+	 BAIL(retval);
+
+      /* For strict netcdf-3 rules, ignore erange errors between UBYTE
+       * and BYTE types. */
+      if ((h5->cmode & NC_CLASSIC_MODEL) &&
+	  (att->xtype == NC_UBYTE || att->xtype == NC_BYTE) &&
+	  (mem_type == NC_UBYTE || mem_type == NC_BYTE) &&
+	  range_error)
+	 range_error = 0;
+   }
+   else
+   {
+      bufr = att->data;
+   }
+
+   /* If the caller wants data, copy it for him. If he hasn't
+      allocated enough memory for it, he will burn in segmantation
+      fault hell, writhing with the agony of undiscovered memory
+      bugs! */
+   if (data)
+   {
+      if (att->vldata)
+      {
+	 size_t base_typelen = type_size;
+	 hvl_t *vldest = data;
+	 NC_TYPE_INFO_T *type;
+	 if ((retval = nc4_find_type(h5, att->xtype, &type)))
+	    return retval;
+	 for (i = 0; i < att->len; i++)
+	 {
+	    vldest[i].len = att->vldata[i].len;
+	    if (!(vldest[i].p = malloc(vldest[i].len * base_typelen)))
+	       BAIL(NC_ENOMEM);
+	    memcpy(vldest[i].p, att->vldata[i].p, vldest[i].len * base_typelen);
+	 }
+      }
+      else if (att->stdata)
+      {
+	 for (i = 0; i < att->len; i++)
+	 {
+	    if (!(((char **)data)[i] = malloc(strlen(att->stdata[i]) + 1)))
+	       BAIL(NC_ENOMEM);
+	    strcpy(((char **)data)[i], att->stdata[i]);
+	 }
+      }
+      else
+      {
+	 /* For long types, we need to handle this special... */
+	 if (is_long && att->xtype == NC_INT)
+	 {
+	    long *lp = data;
+	    int *ip = bufr;
+	    for (i = 0; i < att->len; i++)
+	       *lp++ = *ip++;
+	 }
+	 else
+	    memcpy(data, bufr, (size_t)(att->len * type_size));
+      }
+   }
+
+ exit:
+   if (need_to_convert) free(bufr);
+   if (retval)
+      return retval;
+   if (range_error)
+      return NC_ERANGE;
+   return NC_NOERR;
+}
+
+/* Put attribute metadata into our global metadata. */
+int
+nc4_put_att(int ncid, NC_FILE_INFO_T *nc, int varid, const char *name, 
+	    nc_type file_type, nc_type mem_type, size_t len, int is_long, 
+	    const void *data)
+{
+   NC_GRP_INFO_T *grp; 
+   NC_HDF5_FILE_INFO_T *h5;
+   NC_VAR_INFO_T *var = NULL;
+   NC_ATT_INFO_T *att, **attlist = NULL, *varatt;
+   NC_TYPE_INFO_T *type = NULL;
+   char norm_name[NC_MAX_NAME + 1];
+   int new_att = 0;
+   int retval = NC_NOERR, range_error = 0;
+   size_t type_size;
+   int i;
+   int res;
+
+   if (!name) 
+      return NC_EBADNAME;
+   assert(nc && nc->nc4_info);
+
+   LOG((1, "nc4_put_att: ncid 0x%x varid %d name %s "
+	"file_type %d mem_type %d len %d", ncid, varid,
+	name, file_type, mem_type, len));
+
+   /* If len is not zero, then there must be some data. */
+   if (len && !data)
+      return NC_EINVAL;
+
+   /* Find info for this file and group, and set pointer to each. */
+   h5 = nc->nc4_info;
+   if (!(grp = nc4_rec_find_grp(h5->root_grp, (ncid & GRP_ID_MASK))))
+      return NC_EBADGRPID;      
+
+   /* If the file is read-only, return an error. */
+   if (h5->no_write)
+     return NC_EPERM;
+
+   /* Check and normalize the name. */
+   if ((retval = nc4_check_name(name, norm_name)))
+      return retval;
+
+   /* Find att, if it exists. */
+   if (varid == NC_GLOBAL)
+      attlist = &grp->att;
+   else
+   {
+      for (var = grp->var; var; var = var->next)
+	 if (var->varid == varid)
+	 {
+	    attlist = &var->att;
+	    break;
+	 }
+      if (!var)
+	 return NC_ENOTVAR;
+   }
+   for (att = *attlist; att; att = att->next)
+      if (!strcmp(att->name, norm_name))
+	 break;
+
+   if (!att)
+   {
+      /* If this is a new att, require define mode. */
+      if (!(h5->flags & NC_INDEF))
+      {
+	 if (h5->cmode & NC_CLASSIC_MODEL)
+	    return NC_EINDEFINE;
+	 if ((retval = NC4_redef(ncid)))
+	    BAIL(retval);
+      }
+      new_att++;
+   }
+   else
+   {
+      /* For an existing att, if we're not in define mode, the len
+	 must not be greater than the existing len for classic model. */
+      if (!(h5->flags & NC_INDEF) && 
+	  len * nc4typelen(file_type) > (size_t)att->len * nc4typelen(att->xtype))
+      {
+	 if (h5->cmode & NC_CLASSIC_MODEL)
+	    return NC_EINDEFINE;
+	 if ((retval = NC4_redef(ncid)))
+	    BAIL(retval);
+      }
+   }
+
+   /* We must have two valid types to continue. */
+   if (file_type == NC_NAT || mem_type == NC_NAT)
+      return NC_EBADTYPE;
+
+   /* Get information about this type. */
+   if ((retval = nc4_find_type(h5, file_type, &type)))
+      return retval;
+   if ((retval = nc4_get_typelen_mem(h5, file_type, is_long, &type_size)))
+      return retval;
+
+   /* No character conversions are allowed. */
+   if (file_type != mem_type && 
+       (file_type == NC_CHAR || mem_type == NC_CHAR || 
+	file_type == NC_STRING || mem_type == NC_STRING))
+      return NC_ECHAR;
+
+   /* For classic mode file, only allow atts with classic types to be
+    * created. */
+   if (h5->cmode & NC_CLASSIC_MODEL && file_type > NC_DOUBLE)
+      return NC_ESTRICTNC3;
+
+   /* Add to the end of the attribute list, if this att doesn't
+      already exist. */
+   if (new_att)
+   {
+      LOG((3, "adding attribute %s to the list...", norm_name));
+      if ((res = nc4_att_list_add(attlist)))
+	 BAIL (res);
+      /* Find this att's entry in the list (the last one). */
+      for (att=*attlist; att->next; att=att->next)
+	 ;
+   }
+
+   /* Now fill in the metadata. */
+   att->dirty++;
+   if (att->name)
+      free(att->name);
+   if (!(att->name = malloc((strlen(norm_name) + 1) * sizeof(char))))
+      return NC_ENOMEM;
+   strcpy(att->name, norm_name);
+   att->xtype = file_type;
+   att->len = len;
+   if (att->prev)
+      att->attnum = att->prev->attnum + 1;
+   else
+      att->attnum = 0;
+   if (type)
+      att->class = type->class;
+
+   /* If this is the _FillValue attribute, then we will also have to
+    * copy the value to the fll_vlue pointer of the NC_VAR_INFO_T
+    * struct for this var. (But ignore a global _FillValue
+    * attribute). */
+   if (!strcmp(att->name, _FillValue) && varid != NC_GLOBAL)
+   {
+      NC_TYPE_INFO_T *type_info;
+      int size;
+
+      /* Fill value must be same type. */
+      if (att->xtype != var->xtype)
+	 return NC_EINVAL;
+
+      /* If we already wrote to the dataset, then return an error. */
+      if (var->written_to)
+	 return NC_ELATEFILL;
+
+      /* If fill value hasn't been set, allocate space. Of course,
+       * vlens have to be differnt... */
+      if ((retval = nc4_get_typelen_mem(grp->file->nc4_info, var->xtype, 0, 
+					&type_size)))
+	 return retval;
+      if ((retval = nc4_find_type(grp->file->nc4_info, var->xtype, &type_info)))
+	 BAIL(retval);
+      
+      /* Already set a fill value? Now I'll have to free the old
+       * one. Make up your damn mind, would you? */
+      if (var->fill_value)
+      {
+	 if (type_info && type_info->class == NC_VLEN)
+	    if ((retval = nc_free_vlen(var->fill_value)))
+	       return retval;
+	 free(var->fill_value);
+      }
+
+      /* Allocate space for the fill value. */
+      if (type_info && type_info->class == NC_VLEN)
+	 size = sizeof(hvl_t);
+      else if (var->xtype == NC_STRING)
+	 size = sizeof(char *);
+      else
+	 size = type_size;
+
+      /* 	 size = strlen(*(char **)data) + 1; */
+      if (!(var->fill_value = malloc(size)))
+	 return NC_ENOMEM;
+
+      /* Copy the fill_value. */
+      LOG((4, "Copying fill value into metadata for variable %s", var->name));
+      if (type_info && type_info->class == NC_VLEN)
+      {
+	 nc_vlen_t *in_vlen = (nc_vlen_t *)data, *fv_vlen = (nc_vlen_t *)(var->fill_value);
+	 fv_vlen->len = in_vlen->len;
+	 if (!(fv_vlen->p = malloc(size * in_vlen->len)))
+	    return NC_ENOMEM;
+	 memcpy(fv_vlen->p, in_vlen->p, in_vlen->len * size);
+      }
+      else if (var->xtype == NC_STRING)
+      {
+	 if (!(*(char **)var->fill_value = malloc(strlen(*(char **)data) + 1)))
+	    return NC_ENOMEM;
+	 strcpy(*(char **)(var->fill_value), *(char **)data);
+      }
+      else
+	 memcpy(var->fill_value, data, type_size);
+
+      /* Mark the var and all its atts as dirty, so they get
+       * rewritten. */
+      var->dirty++;
+      for (varatt = var->att; varatt; varatt = varatt->next)
+	 varatt->dirty++;
+   }
+
+   /* Copy the attribute data, if there is any. VLENs and string
+    * arrays have to be handled specially. */
+   if (type && type->class == NC_VLEN && data && att->len)
+   {
+      const hvl_t *vldata1;
+
+      vldata1 = data;
+      if (!(att->vldata = malloc(att->len * sizeof(hvl_t))))
+	 BAIL(NC_ENOMEM);	 
+      for (i = 0; i < att->len; i++)
+      {
+	 att->vldata[i].len = vldata1[i].len;
+	 if (!(att->vldata[i].p = malloc(type_size * att->vldata[i].len)))
+	    BAIL(NC_ENOMEM);
+	 memcpy(att->vldata[i].p, vldata1[i].p, type_size * att->vldata[i].len);
+      }
+   }
+   else if (file_type == NC_STRING && data && att->len)
+   {
+      LOG((4, "copying array of NC_STRING"));
+      if (!(att->stdata = malloc(sizeof(char *) * att->len)))
+	 BAIL(NC_ENOMEM);	 
+      for (i = 0; i < att->len; i++)
+      {
+	 LOG((5, "copying string %d of size %d", i, strlen(((char **)data)[i]) + 1));
+	 if (!(att->stdata[i] = malloc(strlen(((char **)data)[i]) + 1)))
+	    BAIL(NC_ENOMEM);
+	 strcpy(att->stdata[i], ((char **)data)[i]);
+      }
+   }
+   else
+   {
+      /* Data types are like religions, in that one can convert.  */
+      if (att->len)
+      {
+	 if (!new_att)
+	    free (att->data);
+	 if (!(att->data = malloc(att->len * type_size)))
+	    BAIL(NC_ENOMEM);
+	 if (type)
+	 {
+	    /* Just copy the data... */
+	    if (type->class == NC_OPAQUE || type->class == NC_COMPOUND || type->class == NC_ENUM)
+	       memcpy(att->data, data, len * type_size);
+	    else
+	       LOG((0, "nc4_put_att: unknown type."));
+	 }
+	 else
+	 {
+	    if ((retval = nc4_convert_type(data, att->data, mem_type, file_type, 
+					   len, &range_error, NULL, 
+					   (h5->cmode & NC_CLASSIC_MODEL), is_long, 0)))
+	       BAIL(retval);
+	 }
+      }
+   }
+   att->dirty = 1;
+   att->created = 0;
+
+ exit:
+   /* If there was an error return it, otherwise return any potential
+      range error value. If none, return NC_NOERR as usual.*/
+   if (retval)      
+      return retval;
+   if (range_error)
+      return NC_ERANGE;
+   return NC_NOERR;
+}
+
+/* Learn about an att. All the nc4 nc_inq_ functions just call
+ * add_meta_get to get the metadata on an attribute. */
+int
+NC4_inq_att(int ncid, int varid, const char *name, nc_type *xtypep, size_t *lenp)
+{
+   NC_FILE_INFO_T *nc;
+
+   LOG((2, "nc_inq_att: ncid 0x%x varid %d name %s", ncid, varid, name));
+
+   /* Find metadata. */
+   if (!(nc = nc4_find_nc_file(ncid)))
+      return NC_EBADID;
+
+#ifdef USE_PNETCDF
+   /* Take care of files created/opened with parallel-netcdf library. */
+   if (nc->pnetcdf_file)
+   {
+      MPI_Offset mpi_len;
+      int ret;
+
+      if ((ret = ncmpi_inq_att(nc->int_ncid, varid, name, xtypep, &mpi_len)))
+	 return ret;
+      if (lenp)
+	 *lenp = mpi_len;
+   }
+#endif /* USE_PNETCDF */
+
+   /* Handle netcdf-3 files. */
+   assert(nc->nc4_info);
+
+   /* Handle netcdf-4 files. */
+   return nc4_get_att(ncid, nc, varid, name, xtypep, NC_UBYTE, lenp, NULL, 0, NULL);
+}
+
+/* Learn an attnum, given a name. */
+int 
+NC4_inq_attid(int ncid, int varid, const char *name, int *attnump)
+{
+   NC_FILE_INFO_T *nc;
+
+   LOG((2, "nc_inq_attid: ncid 0x%x varid %d name %s", ncid, varid, name));
+
+   /* Find metadata. */
+   if (!(nc = nc4_find_nc_file(ncid)))
+      return NC_EBADID;
+
+#ifdef USE_PNETCDF
+   /* Take care of files created/opened with parallel-netcdf library. */
+   if (nc->pnetcdf_file)
+      return ncmpi_inq_attid(nc->int_ncid, varid, name, attnump);
+#endif /* USE_PNETCDF */
+
+   /* Handle netcdf-3 files. */
+   assert(nc->nc4_info);
+
+   /* Handle netcdf-4 files. */
+   return nc4_get_att(ncid, nc, varid, name, NULL, NC_UBYTE, 
+		      NULL, attnump, 0, NULL);
+}
+
+
+/* Given an attnum, find the att's name. */
+int
+NC4_inq_attname(int ncid, int varid, int attnum, char *name)
+{
+   NC_FILE_INFO_T *nc;
+   NC_ATT_INFO_T *att;
+   int retval = NC_NOERR;
+
+   LOG((2, "nc_inq_attname: ncid 0x%x varid %d attnum %d", 
+	ncid, varid, attnum));
+
+   /* Find metadata. */
+   if (!(nc = nc4_find_nc_file(ncid)))
+      return NC_EBADID;
+
+#ifdef USE_PNETCDF
+   /* Take care of files created/opened with parallel-netcdf library. */
+   if (nc->pnetcdf_file)
+      return ncmpi_inq_attname(nc->int_ncid, varid, attnum, name);
+#endif /* USE_PNETCDF */
+
+   /* Handle netcdf-3 files. */
+   assert(nc->nc4_info);
+
+   /* Handle netcdf-4 files. */
+   if ((retval = nc4_find_nc_att(ncid, varid, NULL, attnum, &att)))
+      return retval;
+
+   /* Get the name. */
+   if (name)
+      strcpy(name, att->name);
+
+   return NC_NOERR;
+}
+
+/* I think all atts should be named the exact same thing, to avoid
+   confusion! */
+int
+NC4_rename_att(int ncid, int varid, const char *name, 
+	      const char *newname)
+{
+   NC_FILE_INFO_T *nc;
+   NC_GRP_INFO_T *grp; 
+   NC_HDF5_FILE_INFO_T *h5;
+   NC_VAR_INFO_T *var;
+   NC_ATT_INFO_T *att, *list;
+   char norm_newname[NC_MAX_NAME + 1], norm_name[NC_MAX_NAME + 1];
+   hid_t datasetid = 0;
+   int retval = NC_NOERR;
+
+   if (!name || !newname)
+      return NC_EINVAL;
+
+   LOG((2, "nc_rename_att: ncid 0x%x varid %d name %s newname %s",
+	ncid, varid, name, newname));
+
+   /* If the new name is too long, that's an error. */
+   if (strlen(newname) > NC_MAX_NAME)
+      return NC_EMAXNAME;
+
+   /* Find metadata for this file. */
+   if ((retval = nc4_find_nc_grp_h5(ncid, &nc, &grp, &h5)))
+      return retval;
+
+#ifdef USE_PNETCDF
+   /* Take care of files created/opened with parallel-netcdf library. */
+   if (nc->pnetcdf_file)
+      return ncmpi_rename_att(nc->int_ncid, varid, name, newname);
+#endif /* USE_PNETCDF */
+
+   /* Handle netcdf-3 files. */
+   assert(h5);
+
+   /* If the file is read-only, return an error. */
+   if (h5->no_write)
+     return NC_EPERM;
+
+   /* Check and normalize the name. */
+   if ((retval = nc4_check_name(newname, norm_newname)))
+      return retval;
+
+   /* Is norm_newname in use? */
+   if (varid == NC_GLOBAL)
+   {
+      list = grp->att;
+   }
+   else
+   {
+      for (var = grp->var; var; var = var->next)
+	 if (var->varid == varid)
+	 {
+	    list = var->att;
+	    break;
+	 }
+      if (!var)
+	 return NC_ENOTVAR;
+   }
+   for (att = list; att; att = att->next)
+      if (!strncmp(att->name, norm_newname, NC_MAX_NAME))
+	 return NC_ENAMEINUSE;
+
+   /* Normalize name and find the attribute. */
+   if ((retval = nc4_normalize_name(name, norm_name)))
+      return retval;
+   for (att = list; att; att = att->next)
+      if (!strncmp(att->name, norm_name, NC_MAX_NAME))
+	 break;
+   if (!att)
+      return NC_ENOTATT;
+
+   /* If we're not in define mode, new name must be of equal or
+      less size, if complying with strict NC3 rules. */
+   if (!(h5->flags & NC_INDEF) && strlen(norm_newname) > strlen(att->name) &&
+       (h5->cmode & NC_CLASSIC_MODEL))
+      return NC_ENOTINDEFINE;
+
+   /* Delete the original attribute, if it exists in the HDF5 file. */
+   if (att->created)
+   {
+      if (varid == NC_GLOBAL)
+      {
+         if (H5Adelete(grp->hdf_grpid, att->name) < 0)
+	    return NC_EHDFERR;
+      }
+      else
+      {
+	 if ((retval = nc4_open_var_grp2(grp, varid, &datasetid)))
+	    return retval;
+         if (H5Adelete(datasetid, att->name) < 0)
+	    return NC_EHDFERR;
+      }
+      att->created = 0;
+   }
+
+   /* Copy the new name into our metadata. */
+   free(att->name);
+   if (!(att->name = malloc((strlen(norm_newname) + 1) * sizeof(char))))
+      return NC_ENOMEM;
+   strcpy(att->name, norm_newname);
+   att->dirty = 1;
+
+   return retval;
+}
+
+/* Delete an att. Rub it out. Push the button on it. Liquidate
+   it. Bump it off. Take it for a one-way ride. Terminate it. Drop the
+   bomb on it. You get the idea. 
+   Ed Hartnett, 10/1/3 
+*/
+int
+NC4_del_att(int ncid, int varid, const char *name)
+{
+   NC_FILE_INFO_T *nc;
+   NC_GRP_INFO_T *grp; 
+   NC_HDF5_FILE_INFO_T *h5;
+   NC_ATT_INFO_T *att, *natt;
+   NC_VAR_INFO_T *var;
+   NC_ATT_INFO_T **attlist = NULL;
+   hid_t locid = 0, datasetid = 0;
+   int retval = NC_NOERR;
+
+   if (!name)
+      return NC_EINVAL;
+
+   LOG((2, "nc_del_att: ncid 0x%x varid %d name %s",
+	ncid, varid, name));
+   
+   /* Find metadata for this file. */
+   if ((retval = nc4_find_nc_grp_h5(ncid, &nc, &grp, &h5)))
+      return retval;
+
+#ifdef USE_PNETCDF
+   /* Take care of files created/opened with parallel-netcdf library. */
+   if (nc->pnetcdf_file)
+      return ncmpi_del_att(nc->int_ncid, varid, name);   
+#endif /* USE_PNETCDF */
+
+   /* Handle netcdf-3 files. */
+   assert(h5);
+
+   assert(h5 && grp);
+
+   /* If the file is read-only, return an error. */
+   if (h5->no_write)
+      return NC_EPERM;
+
+   /* If it's not in define mode, forget it. */
+   if (!(h5->flags & NC_INDEF))
+   {
+      if (h5->cmode & NC_CLASSIC_MODEL)
+	 return NC_ENOTINDEFINE;
+      if ((retval = NC4_redef(ncid)))
+	 BAIL(retval);
+   }
+
+   /* Get either the global or a variable attribute list. Also figure
+      out the HDF5 location it's attached to. */
+   if (varid == NC_GLOBAL)
+   {
+      attlist = &grp->att;
+      locid = grp->hdf_grpid;
+   }
+   else
+   {
+      for(var = grp->var; var; var = var->next)
+      {
+	 if (var->varid == varid)
+	 {
+	    attlist = &var->att;
+	    break;
+	 }
+      }
+      if (!var)
+	 return NC_ENOTVAR;
+      if (var->created)
+      {
+	 locid = var->hdf_datasetid;
+      }
+   }
+
+   /* Now find the attribute by name or number. */
+   for (att = *attlist; att; att = att->next)
+      if (!strcmp(att->name, name))
+	 break;
+
+   /* If att is NULL, we couldn't find the attribute. */
+   if (!att) 
+      BAIL_QUIET(NC_ENOTATT);
+   
+   /* Delete it from the HDF5 file, if it's been created. */
+   if (att->created)
+      if(H5Adelete(locid, att->name) < 0)
+	 BAIL(NC_EATTMETA);
+
+   /* Renumber all following attributes. */
+   for (natt = att->next; natt; natt = natt->next)
+      natt->attnum--;
+
+   /* Delete this attribute from this list. */
+   if ((retval = nc4_att_list_del(attlist, att)))
+      BAIL(retval);
+   
+ exit:
+   if (datasetid > 0) H5Dclose(datasetid);
+   return retval;
+}
+
+/* Write an attribute with type conversion. */
+int
+nc4_put_att_tc(int ncid, int varid, const char *name, nc_type file_type, 
+	       nc_type mem_type, int mem_type_is_long, size_t len, 
+	       const void *op)
+{
+   NC_FILE_INFO_T *nc;
+
+   if (!name || strlen(name) > NC_MAX_NAME)
+      return NC_EBADNAME;
+
+   LOG((3, "nc4_put_att_tc: ncid 0x%x varid %d name %s file_type %d "
+	"mem_type %d len %d", ncid, varid, name, file_type, mem_type, len));
+
+   /* The length needs to be positive (cast needed for braindead
+      systems with signed size_t). */
+   if((unsigned long) len > X_INT_MAX) 
+      return NC_EINVAL;
+
+   /* Find metadata. */
+   if (!(nc = nc4_find_nc_file(ncid)))
+      return NC_EBADID;
+
+#ifdef USE_PNETCDF
+   /* Take care of files created/opened with parallel-netcdf library. */
+   if (nc->pnetcdf_file)
+   {
+      if (mem_type == NC_UBYTE)
+	 mem_type = NC_BYTE;
+      switch(mem_type)
+      {
+	 case NC_BYTE:
+	    return ncmpi_put_att_schar(nc->int_ncid, varid, name, 
+				     file_type, len, op);
+	 case NC_CHAR:
+	    return ncmpi_put_att_text(nc->int_ncid, varid, name, 
+				    len, op);
+	 case NC_SHORT:
+	    return ncmpi_put_att_short(nc->int_ncid, varid, name, 
+				     file_type, len, op);
+	 case NC_INT:
+	    if (mem_type_is_long)
+	       return ncmpi_put_att_long(nc->int_ncid, varid, name, 
+				       file_type, len, op);
+	    else
+	       return ncmpi_put_att_int(nc->int_ncid, varid, name, 
+				      file_type, len, op);
+	 case NC_FLOAT:
+	    return ncmpi_put_att_float(nc->int_ncid, varid, name, 
+				     file_type, len, op);
+	 case NC_DOUBLE:
+	    return ncmpi_put_att_double(nc->int_ncid, varid, name, 
+				      file_type, len, op);
+	 case NC_NAT:
+	 default:
+	    return NC_EBADTYPE;
+      }
+   }
+#endif /* USE_PNETCDF */
+
+   /* Handle netcdf-3 files. */
+   assert(nc->nc4_info);
+
+   /* Otherwise, handle things the netcdf-4 way. */
+   return nc4_put_att(ncid, nc, varid, name, file_type, mem_type, len, 
+		      mem_type_is_long, op);
+}
+
+/* Read an attribute of any type, with type conversion. This may be
+ * called by any of the nc_get_att_* functions. */
+int
+nc4_get_att_tc(int ncid, int varid, const char *name, nc_type mem_type, 
+	       int mem_type_is_long, void *ip)
+{
+   NC_FILE_INFO_T *nc;
+
+   LOG((3, "nc4_get_att_tc: ncid 0x%x varid %d name %s mem_type %d", 
+	ncid, varid, name, mem_type));
+
+   /* Find metadata. */
+   if (!(nc = nc4_find_nc_file(ncid)))
+      return NC_EBADID;
+
+#ifdef USE_PNETCDF
+   /* Take care of files created/opened with parallel-netcdf library. */
+   if (nc->pnetcdf_file)
+   {
+      if (mem_type == NC_UBYTE)
+	 mem_type = NC_BYTE;
+      switch(mem_type)
+      {
+	 case NC_BYTE:
+	    return ncmpi_get_att_schar(nc->int_ncid, varid, name, ip);
+	 case NC_CHAR:
+	    return ncmpi_get_att_text(nc->int_ncid, varid, name, ip);
+	 case NC_SHORT:
+	    return ncmpi_get_att_short(nc->int_ncid, varid, name, ip);
+	 case NC_INT:
+	    if (mem_type_is_long)
+	       return ncmpi_get_att_long(nc->int_ncid, varid, name, ip);
+	    else
+	       return ncmpi_get_att_int(nc->int_ncid, varid, name, ip);
+	 case NC_FLOAT:
+	    return ncmpi_get_att_float(nc->int_ncid, varid, name, ip);
+	 case NC_DOUBLE:
+	    return ncmpi_get_att_double(nc->int_ncid, varid, name, ip);
+	 case NC_NAT:
+	 default:
+	    return NC_EBADTYPE;
+      }
+   }
+#endif /* USE_PNETCDF */
+
+   /* Handle netcdf-3 files. */
+   assert(nc->nc4_info);
+
+   return nc4_get_att(ncid, nc, varid, name, NULL, mem_type, 
+		      NULL, NULL, mem_type_is_long, ip);
+}
+
+int
+NC4_put_att(int ncid, int varid, const char *name, nc_type xtype, 
+	           size_t nelems, const void *value, nc_type memtype)
+{
+   return nc4_put_att_tc(ncid, varid, name, xtype, memtype, 0, nelems, value);
+}
+
+int
+NC4_get_att(int ncid, int varid, const char *name, void *value, nc_type memtype)
+{
+   return nc4_get_att_tc(ncid, varid, name, memtype, 0, value);
+}
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/src_netcdf4/nc4dim.c
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/src_netcdf4/nc4dim.c	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/src_netcdf4/nc4dim.c	(revision 1749)
@@ -0,0 +1,401 @@
+/*
+
+This file is part of netcdf-4, a netCDF-like interface for HDF5, or a
+HDF5 backend for netCDF, depending on your point of view.
+
+This file handles the nc4 dimension functions.
+
+Copyright 2003-5, University Corporation for Atmospheric Research. See
+the COPYRIGHT file for copying and redistribution conditions.
+
+$Id: nc4dim.c,v 1.41 2010/05/25 17:54:23 dmh Exp $
+*/
+
+#include "nc4internal.h"
+
+#ifdef USE_PNETCDF
+#include <pnetcdf.h>
+#endif
+
+/* Netcdf-4 files might have more than one unlimited dimension, but
+   return the first one anyway. */
+/* Note that this code is inconsistent with nc_inq */
+int 
+NC4_inq_unlimdim(int ncid, int *unlimdimidp)
+{
+   NC_FILE_INFO_T *nc;
+   NC_GRP_INFO_T *grp, *g;
+   NC_HDF5_FILE_INFO_T *h5;
+   NC_DIM_INFO_T *dim;
+   int found = 0;
+   int retval;
+ 
+   LOG((2, "called nc_inq_unlimdim"));
+
+   if ((retval = nc4_find_nc_grp_h5(ncid, &nc, &grp, &h5)))
+      return retval;
+
+#ifdef USE_PNETCDF
+   /* Take care of files created/opened with parallel-netcdf library. */
+   if (nc->pnetcdf_file)
+      return ncmpi_inq_unlimdim(nc->int_ncid, unlimdimidp);
+#endif /* USE_PNETCDF */
+
+   /* Take care of netcdf-3 files. */
+   assert(h5);
+
+   /* According to netcdf-3 manual, return -1 if there is no unlimited
+      dimension. */
+   *unlimdimidp = -1;
+   for (g = grp; g && !found; g = g->parent)
+   {
+      for (dim = g->dim; dim; dim = dim->next)
+      {
+	 if (dim->unlimited)
+	 {
+	    *unlimdimidp = dim->dimid;
+	    found++;
+	    break;
+	 }
+      }
+   }
+
+   return NC_NOERR;
+}
+
+/* Dimensions are defined in attributes attached to the appropriate
+   group in the data file. */
+int
+NC4_def_dim(int ncid, const char *name, size_t len, int *idp)
+{
+   NC_FILE_INFO_T *nc;
+   NC_GRP_INFO_T *grp;
+   NC_HDF5_FILE_INFO_T *h5;
+   NC_DIM_INFO_T *dim;
+   char norm_name[NC_MAX_NAME + 1];
+   int retval = NC_NOERR;
+
+   LOG((2, "nc_def_dim: ncid 0x%x name %s len %d", ncid, name, 
+	(int)len));
+
+   /* Find our global metadata structure. */
+   if ((retval = nc4_find_nc_grp_h5(ncid, &nc, &grp, &h5)))
+      return retval;
+   
+#ifdef USE_PNETCDF
+   /* Take care of files created/opened with parallel-netcdf library. */
+   if (nc->pnetcdf_file)
+      return ncmpi_def_dim(nc->int_ncid, name, len, idp);
+#endif /* USE_PNETCDF */
+
+   /* Take care of netcdf-3 files. */
+   assert(h5);
+
+   assert(h5 && nc && grp);
+
+   /* If the file is read-only, return an error. */
+   if (h5->no_write)
+     return NC_EPERM;
+
+   /* Check some stuff if strict nc3 rules are in effect. */
+   if (h5->cmode & NC_CLASSIC_MODEL)
+   {
+      /* Only one limited dimenson for strict nc3. */
+      if (len == NC_UNLIMITED)
+	 for (dim = grp->dim; dim; dim = dim->next)
+	    if (dim->unlimited)
+	       return NC_EUNLIMIT;
+
+      /* Must be in define mode for stict nc3. */
+      if (!(h5->flags & NC_INDEF))
+	 return NC_ENOTINDEFINE;
+   }   
+
+   /* If it's not in define mode, enter define mode. */
+   if (!(h5->flags & NC_INDEF))
+      if ((retval = nc_redef(ncid)))
+	 return retval;
+
+   /* Make sure this is a valid netcdf name. */
+   if ((retval = nc4_check_name(name, norm_name)))
+      return retval;
+
+   /* For classic model: dim length has to fit in a 32-bit unsigned
+    * int, as permitted for 64-bit offset format. */
+   if (h5->cmode & NC_CLASSIC_MODEL)
+      if(len > X_UINT_MAX) /* Backward compat */
+	 return NC_EDIMSIZE;
+
+   /* Make sure the name is not already in use. */
+   for (dim = grp->dim; dim; dim = dim->next)
+      if (!strncmp(dim->name, norm_name, NC_MAX_NAME))
+	 return NC_ENAMEINUSE;
+
+   /* Add a dimension to the list. The ID must come from the file
+    * information, since dimids are visible in more than one group. */
+   nc4_dim_list_add(&grp->dim);
+   grp->dim->dimid = grp->file->nc4_info->next_dimid++;
+
+   /* Initialize the metadata for this dimension. */
+   if (!(grp->dim->name = malloc((strlen(norm_name) + 1) * sizeof(char))))
+      return NC_ENOMEM;
+   strcpy(grp->dim->name, norm_name);
+   grp->dim->len = len;
+   grp->dim->dirty++;
+   if (len == NC_UNLIMITED)
+      grp->dim->unlimited++;
+
+   /* Pass back the dimid. */
+   if (idp)
+      *idp = grp->dim->dimid;
+
+   return retval;
+}
+
+/* Given dim name, find its id. */
+int
+NC4_inq_dimid(int ncid, const char *name, int *idp)
+{
+   NC_FILE_INFO_T *nc;
+   NC_GRP_INFO_T *grp, *g;
+   NC_HDF5_FILE_INFO_T *h5;
+   NC_DIM_INFO_T *dim;
+   char norm_name[NC_MAX_NAME + 1];
+   int finished = 0;
+   int retval;
+
+   LOG((2, "nc_inq_dimid: ncid 0x%x name %s", ncid, name));
+
+   /* Find metadata for this file. */
+   if ((retval = nc4_find_nc_grp_h5(ncid, &nc, &grp, &h5)))
+      return retval;
+
+#ifdef USE_PNETCDF
+   /* Take care of files created/opened with parallel-netcdf library. */
+   if (nc->pnetcdf_file)
+      return ncmpi_inq_dimid(nc->int_ncid, name, idp);
+#endif /* USE_PNETCDF */
+
+   /* Handle netcdf-3 files. */
+   assert(h5);
+
+   assert(nc && grp);
+
+   /* Normalize name. */
+   if ((retval = nc4_normalize_name(name, norm_name)))
+      return retval;
+
+   /* Go through each dim and check for a name match. */
+   for (g = grp; g && !finished; g = g->parent)
+      for (dim = g->dim; dim; dim = dim->next)
+	 if (!strncmp(dim->name, norm_name, NC_MAX_NAME))
+	 {
+	    if (idp)
+	       *idp = dim->dimid;
+	    return NC_NOERR;
+	 }
+
+   return NC_EBADDIM;
+}
+
+/* Find out name and len of a dim. For an unlimited dimension, the
+   length is the largest lenght so far written. If the name of lenp
+   pointers are NULL, they will be ignored. */
+int
+NC4_inq_dim(int ncid, int dimid, char *name, size_t *lenp)
+{
+   NC_FILE_INFO_T *nc;
+   NC_HDF5_FILE_INFO_T *h5;
+   NC_GRP_INFO_T *grp, *dim_grp;
+   NC_DIM_INFO_T *dim;
+   int ret = NC_NOERR;
+
+   LOG((2, "nc_inq_dim: ncid 0x%x dimid %d", ncid, dimid));
+
+   /* Find our global metadata structure. */
+   if ((ret = nc4_find_nc_grp_h5(ncid, &nc, &grp, &h5)))
+      return ret;
+   
+#ifdef USE_PNETCDF
+   /* Take care of files created/opened with parallel-netcdf library. */
+   if (nc->pnetcdf_file)
+   {
+      MPI_Offset mpi_len;
+      if ((ret = ncmpi_inq_dim(nc->int_ncid, dimid, name, &mpi_len)))
+	 return ret;
+      if (lenp)
+	 *lenp = mpi_len;
+   }
+#endif /* USE_PNETCDF */
+
+   /* Take care of netcdf-3 files. */
+   assert(h5);
+   
+   assert(nc && grp);
+
+   /* Find the dimension and its home group. */
+   if ((ret = nc4_find_dim(grp, dimid, &dim, &dim_grp)))
+      return ret;
+   assert(dim);
+
+   /* Return the dimension name, if the caller wants it. */
+   if (name && dim->name) 
+      strcpy(name, dim->name);	    
+   
+   /* Return the dimension length, if the caller wants it. */
+   if (lenp)
+   {
+      if (dim->unlimited)
+      {
+	 /* Since this is an unlimited dimension, go to the file
+	    and see how many records there are. Take the max number
+	    of records from all the vars that share this
+	    dimension. */
+	 *lenp = 0;
+	 if ((ret = nc4_find_dim_len(dim_grp, dimid, &lenp)))
+	    return ret;
+      }
+      else
+      {
+	 if (dim->too_long)
+	 {
+	    ret = NC_EDIMSIZE;
+	    *lenp = NC_MAX_UINT;
+	 }
+	 else
+	    *lenp = dim->len;
+      }
+   }
+
+   return ret;
+}
+
+/* Rename a dimension, for those who like to prevaricate. */
+int
+NC4_rename_dim(int ncid, int dimid, const char *name)
+{
+   NC_FILE_INFO_T *nc;
+   NC_GRP_INFO_T *grp;
+   NC_HDF5_FILE_INFO_T *h5;
+   NC_DIM_INFO_T *dim;
+   char norm_name[NC_MAX_NAME + 1];
+   int retval;
+
+   if (!name)
+      return NC_EINVAL;
+
+   LOG((2, "nc_rename_dim: ncid 0x%x dimid %d name %s", ncid, 
+	dimid, name));
+
+   /* Find info for this file and group, and set pointer to each. */
+   if ((retval = nc4_find_nc_grp_h5(ncid, &nc, &grp, &h5)))      
+      return retval;
+   assert(nc);
+   
+#ifdef USE_PNETCDF
+   /* Take care of files created/opened with parallel-netcdf library. */
+   if (nc->pnetcdf_file)
+      return ncmpi_rename_dim(nc->int_ncid, dimid, name);
+#endif /* USE_PNETCDF */
+
+   /* Handle netcdf-3 cases. */
+   assert(h5);
+   assert(h5 && grp);
+
+   /* Trying to write to a read-only file? No way, Jose! */
+   if (h5->no_write)
+      return NC_EPERM;
+
+   /* Make sure this is a valid netcdf name. */
+   if ((retval = nc4_check_name(name, norm_name)))
+      return retval;
+
+   /* Make sure the new name is not already in use in this group. */
+   for (dim = grp->dim; dim; dim = dim->next)
+      if (!strncmp(dim->name, norm_name, NC_MAX_NAME))
+	 return NC_ENAMEINUSE;
+
+   /* Find the dim. */
+   for (dim = grp->dim; dim; dim = dim->next)
+      if (dim->dimid == dimid)
+	 break;
+   if (!dim)
+      return NC_EBADDIM;
+
+   /* If not in define mode, switch to it, unless the new name is
+    * shorter. (This is in accordance with the v3 interface.) */
+/*    if (!(h5->flags & NC_INDEF) && strlen(name) > strlen(dim->name)) */
+/*    { */
+/*       if (h5->cmode & NC_CLASSIC_MODEL) */
+/* 	 return NC_ENOTINDEFINE; */
+/*       if ((retval = nc_redef(ncid))) */
+/* 	 return retval; */
+/*    } */
+
+   /* Save the old name, we'll need it to rename this object when we
+    * sync to HDF5 file. But if there already is an old_name saved,
+    * just stick with what we've got, since the user might be renaming
+    * the crap out of this thing, without ever syncing with the
+    * file. When the sync does take place, we only need the original
+    * name of the dim, not any of the intermediate ones. If the user
+    * could just make up his mind, we could all get on to writing some
+    * data... */
+   if (!dim->old_name)
+   {
+      if (!(dim->old_name = malloc((strlen(dim->name) + 1) * sizeof(char))))
+	 return NC_ENOMEM;
+      strcpy(dim->old_name, dim->name);
+   }
+
+   /* Give the dimension its new name in metadata. UTF8 normalization
+    * has been done. */
+   free(dim->name);
+   if (!(dim->name = malloc((strlen(norm_name) + 1) * sizeof(char))))
+      return NC_ENOMEM;
+   strcpy(dim->name, norm_name);
+
+   return NC_NOERR;
+}
+
+/* Returns an array of unlimited dimension ids.The user can get the
+   number of unlimited dimensions by first calling this with NULL for
+   the second pointer.
+*/
+int 
+NC4_inq_unlimdims(int ncid, int *nunlimdimsp, int *unlimdimidsp) 
+{
+  NC_DIM_INFO_T *dim;
+  NC_GRP_INFO_T *grp;
+  NC_FILE_INFO_T *nc;
+  NC_HDF5_FILE_INFO_T *h5;
+  int num_unlim = 0;
+  int retval;
+
+  LOG((2, "nc_inq_unlimdims: ncid 0x%x", ncid));
+
+   /* Find info for this file and group, and set pointer to each. */
+   if ((retval = nc4_find_nc_grp_h5(ncid, &nc, &grp, &h5)))
+      return retval;
+
+   /* Get our dim info. */
+   assert(h5);
+   {
+      for (dim=grp->dim; dim; dim=dim->next)
+      {
+	 if (dim->unlimited)
+	 {
+	    if (unlimdimidsp)
+	       unlimdimidsp[num_unlim] = dim->dimid;
+	    num_unlim++;
+	 }
+      }
+   }
+
+   /* Give the number if the user wants it. */
+   if (nunlimdimsp)
+      *nunlimdimsp = num_unlim;
+
+   return NC_NOERR;
+}
+
+
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/src_netcdf4/nc4dispatch.c
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/src_netcdf4/nc4dispatch.c	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/src_netcdf4/nc4dispatch.c	(revision 1749)
@@ -0,0 +1,110 @@
+/*********************************************************************
+ *   Copyright 1993, UCAR/Unidata
+ *   See netcdf/COPYRIGHT file for copying and redistribution conditions.
+ *   $Header: /upc/share/CVS/netcdf-3/libsrc4/nc4dispatch.c,v 1.5 2010/05/27 02:19:37 dmh Exp $
+ *********************************************************************/
+
+#include "config.h"
+#include <stdlib.h>
+#include "nc.h"
+#include "ncdispatch.h"
+#include "nc4dispatch.h"
+
+NC_Dispatch NC4_dispatcher = {
+
+NC_DISPATCH_NC4,
+
+NC4_new_nc,
+
+NC4_create,
+NC4_open,
+
+NC4_redef,
+NC4__enddef,
+NC4_sync,
+NC4_abort,
+NC4_close,
+NC4_set_fill,
+NC4_inq_base_pe,
+NC4_set_base_pe,
+NC4_inq_format,
+
+NC4_inq,
+NC4_inq_type,
+
+NC4_def_dim,
+NC4_inq_dimid,
+NC4_inq_dim,
+NC4_inq_unlimdim,
+NC4_rename_dim,
+
+NC4_inq_att,
+NC4_inq_attid,
+NC4_inq_attname,
+NC4_rename_att,
+NC4_del_att,
+NC4_get_att,
+NC4_put_att,
+
+NC4_def_var,
+NC4_inq_varid,
+NC4_rename_var,
+NC4_get_vara,
+NC4_put_vara,
+NCDEFAULT_get_vars,
+NCDEFAULT_put_vars,
+NCDEFAULT_get_varm,
+NCDEFAULT_put_varm,
+
+NC4_inq_var_all,
+
+NC4_show_metadata,
+NC4_inq_unlimdims,
+
+NC4_var_par_access,
+
+NC4_inq_ncid,
+NC4_inq_grps,
+NC4_inq_grpname,
+NC4_inq_grpname_full,
+NC4_inq_grp_parent,
+NC4_inq_grp_full_ncid,
+NC4_inq_varids,
+NC4_inq_dimids,
+NC4_inq_typeids,
+NC4_inq_type_equal,
+NC4_def_grp,
+NC4_inq_user_type,
+NC4_inq_typeid,
+
+NC4_def_compound,
+NC4_insert_compound,
+NC4_insert_array_compound,
+NC4_inq_compound_field,
+NC4_inq_compound_fieldindex,
+NC4_def_vlen,
+NC4_put_vlen_element,
+NC4_get_vlen_element,
+NC4_def_enum,
+NC4_insert_enum,
+NC4_inq_enum_member,
+NC4_inq_enum_ident,
+NC4_def_opaque,
+NC4_def_var_deflate,
+NC4_def_var_fletcher32,
+NC4_def_var_chunking,
+NC4_def_var_fill,
+NC4_def_var_endian,
+NC4_set_var_chunk_cache,
+NC4_get_var_chunk_cache,
+
+};
+
+NC_Dispatch* NC4_dispatch_table = NULL; /* moved here from ddispatch.c */
+
+int
+NC4_initialize(void)
+{
+    NC4_dispatch_table = &NC4_dispatcher;
+    return NC_NOERR;
+}
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/src_netcdf4/nc4dispatch.h
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/src_netcdf4/nc4dispatch.h	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/src_netcdf4/nc4dispatch.h	(revision 1749)
@@ -0,0 +1,271 @@
+/*********************************************************************
+ * Copyright 2010, UCAR/Unidata. See netcdf/COPYRIGHT file for copying
+ * and redistribution conditions.
+ *
+ * This header file contains the prototypes for the netCDF-4 versions
+ * of all the netCDF functions.
+ *********************************************************************/
+
+#ifndef _NC4DISPATCH_H
+#define _NC4DISPATCH_H
+
+#include "config.h"
+#include <stddef.h> /* size_t, ptrdiff_t */
+#include <errno.h>  /* netcdf functions sometimes return system errors */
+#include "ncdispatch.h"
+
+#if defined(__cplusplus)
+extern "C" {
+#endif
+
+extern int
+NC4_create(const char *path, int cmode,
+           size_t initialsz, int basepe, size_t *chunksizehintp,
+	   int useparallel, void* parameters,
+	   NC_Dispatch*, NC**);
+
+extern int
+NC4_open(const char *path, int mode,
+         int basepe, size_t *chunksizehintp, 
+	 int use_parallel, void* parameters,
+	 NC_Dispatch*, NC**);
+
+extern int
+NC4_new_nc(NC**);
+
+extern int
+NC4_free_nc(NC*);
+
+extern int
+NC4_redef(int ncid);
+
+extern int
+NC4__enddef(int ncid, size_t h_minfree, size_t v_align,
+	size_t v_minfree, size_t r_align);
+
+extern int
+NC4_sync(int ncid);
+
+extern int
+NC4_abort(int ncid);
+
+extern int
+NC4_close(int ncid);
+
+extern int
+NC4_set_fill(int ncid, int fillmode, int *old_modep);
+
+extern int
+NC4_set_base_pe(int ncid, int pe);
+
+extern int
+NC4_inq_base_pe(int ncid, int *pe);
+
+extern int
+NC4_inq_format(int ncid, int *formatp);
+
+extern int
+NC4_inq(int ncid, int *ndimsp, int *nvarsp, int *nattsp, int *unlimdimidp);
+
+extern int
+NC4_inq_type(int, nc_type, char *, size_t *);
+
+/* Begin _dim */
+
+extern int
+NC4_def_dim(int ncid, const char *name, size_t len, int *idp);
+
+extern int
+NC4_inq_dimid(int ncid, const char *name, int *idp);
+
+extern int
+NC4_inq_dim(int ncid, int dimid, char *name, size_t *lenp);
+
+extern int
+NC4_inq_unlimdim(int ncid, int *unlimdimidp);
+
+extern int
+NC4_rename_dim(int ncid, int dimid, const char *name);
+
+/* End _dim */
+/* Begin _att */
+
+extern int
+NC4_inq_att(int ncid, int varid, const char *name,
+	    nc_type *xtypep, size_t *lenp);
+
+extern int 
+NC4_inq_attid(int ncid, int varid, const char *name, int *idp);
+
+extern int
+NC4_inq_attname(int ncid, int varid, int attnum, char *name);
+
+extern int
+NC4_rename_att(int ncid, int varid, const char *name, const char *newname);
+
+extern int
+NC4_del_att(int ncid, int varid, const char*);
+
+/* End _att */
+/* Begin {put,get}_att */
+
+extern int
+NC4_get_att(int ncid, int varid, const char *name, void *value, nc_type);
+
+extern int
+NC4_put_att(int ncid, int varid, const char *name, nc_type datatype,
+	   size_t len, const void *value, nc_type);
+
+/* End {put,get}_att */
+/* Begin _var */
+
+extern int
+NC4_def_var(int ncid, const char *name,
+	 nc_type xtype, int ndims, const int *dimidsp, int *varidp);
+
+extern int
+NC4_inq_var_all(int ncid, int varid, char *name, nc_type *xtypep, 
+               int *ndimsp, int *dimidsp, int *nattsp, 
+               int *shufflep, int *deflatep, int *deflate_levelp,
+               int *fletcher32p, int *contiguousp, size_t *chunksizesp, 
+               int *no_fill, void *fill_valuep, int *endiannessp, 
+	       int *options_maskp, int *pixels_per_blockp);
+
+extern int
+NC4_inq_varid(int ncid, const char *name, int *varidp);
+
+extern int
+NC4_rename_var(int ncid, int varid, const char *name);
+
+extern int
+NC4_put_vara(int ncid, int varid,
+   	     const size_t *start, const size_t *count,
+             const void *value, nc_type);
+
+extern int
+NC4_get_vara(int ncid, int varid,
+	     const size_t *start, const size_t *count,
+             void *value, nc_type);
+
+/* End _var */
+
+/* netCDF4 API only */
+extern int
+NC4_var_par_access(int, int, int);
+
+extern int
+NC4_inq_ncid(int, const char *, int *);
+
+extern int
+NC4_inq_grps(int, int *, int *);
+
+extern int
+NC4_inq_grpname(int, char *);
+
+extern int
+NC4_inq_grpname_full(int, size_t *, char *);
+
+extern int
+NC4_inq_grp_parent(int, int *);
+
+extern int
+NC4_inq_grp_full_ncid(int, const char *, int *);
+
+extern int
+NC4_inq_varids(int, int * nvars, int *);
+
+extern int
+NC4_inq_dimids(int, int * ndims, int *, int);
+
+extern int
+NC4_inq_typeids(int, int * ntypes, int *);
+   
+extern int
+NC4_inq_type_equal(int, nc_type, int, nc_type, int *);
+
+extern int
+NC4_def_grp(int, const char *, int *);
+
+extern int
+NC4_inq_user_type(int, nc_type, char *, size_t *, nc_type *, 
+		  size_t *, int *);
+
+extern int
+NC4_def_compound(int, size_t, const char *, nc_type *);
+
+extern int
+NC4_insert_compound(int, nc_type, const char *, size_t, nc_type);
+
+extern int
+NC4_insert_array_compound(int, nc_type, const char *, size_t, 
+			  nc_type, int, const int *);
+
+extern int
+NC4_inq_typeid(int, const char *, nc_type *);
+
+extern int
+NC4_inq_compound_field(int, nc_type, int, char *, size_t *, 
+		       nc_type *, int *, int *);
+
+extern int
+NC4_inq_compound_fieldindex(int, nc_type, const char *, int *);
+
+extern int
+NC4_def_vlen(int, const char *, nc_type base_typeid, nc_type *);
+
+extern int
+NC4_put_vlen_element(int, int, void *, size_t, const void *);
+
+extern int
+NC4_get_vlen_element(int, int, const void *, size_t *, void *);
+
+extern int
+NC4_def_enum(int, nc_type, const char *, nc_type *);
+
+extern int
+NC4_insert_enum(int, nc_type, const char *, const void *);
+
+extern int
+NC4_inq_enum_member(int, nc_type, int, char *, void *);
+
+extern int
+NC4_inq_enum_ident(int, nc_type, long long, char *);
+
+extern int
+NC4_def_opaque(int, size_t, const char *, nc_type *);
+
+extern int
+NC4_def_var_deflate(int, int, int, int, int);
+
+extern int
+NC4_def_var_fletcher32(int, int, int);
+
+extern int
+NC4_def_var_chunking(int, int, int, const size_t *);
+
+extern int
+NC4_def_var_fill(int, int, int, const void *);
+
+extern int
+NC4_def_var_endian(int, int, int);
+
+extern int
+NC4_set_var_chunk_cache(int, int, size_t, size_t, float);
+
+extern int
+NC4_get_var_chunk_cache(int, int, size_t *, size_t *, float *);
+
+extern int
+NC4_inq_unlimdims(int, int *, int *);
+
+extern int
+NC4_show_metadata(int);
+
+extern int 
+NC4_initialize(void);
+
+#if defined(__cplusplus)
+}
+#endif
+
+#endif /*_NC4DISPATCH_H */
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/src_netcdf4/nc4file.c
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/src_netcdf4/nc4file.c	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/src_netcdf4/nc4file.c	(revision 1749)
@@ -0,0 +1,3203 @@
+/** \file 
+The netCDF-4 file functions.
+
+This file is part of netcdf-4, a netCDF-like interface for HDF5, or
+a HDF5 backend for netCDF, depending on your point of view.
+
+Copyright 2003, University Corporation for Atmospheric Research. See
+COPYRIGHT file for copying and redistribution conditions.  
+*/
+
+#include "nc4internal.h"
+#include "nc.h"
+#include <H5DSpublic.h>
+#include "nc4dispatch.h"
+#include "ncdispatch.h"
+
+#ifdef USE_HDF4
+#include <mfhdf.h>
+#endif
+
+#ifdef USE_PNETCDF
+#include <pnetcdf.h>
+#endif
+
+/* This is to track opened HDF5 objects to make sure they are
+ * closed. */
+#ifdef EXTRA_TESTS
+extern int num_plists;
+extern int num_spaces;
+#endif /* EXTRA_TESTS */
+
+#define MIN_DEFLATE_LEVEL 0
+#define MAX_DEFLATE_LEVEL 9
+
+/* These are the special attributes added by the HDF5 dimension scale
+ * API. They will be ignored by netCDF-4. */
+#define REFERENCE_LIST "REFERENCE_LIST"
+#define CLASS "CLASS"
+#define DIMENSION_LIST "DIMENSION_LIST"
+#define NAME "NAME"
+
+/* Forward */
+static int NC4_enddef(int ncid);
+static int nc4_rec_read_types(NC_GRP_INFO_T *grp);
+static int nc4_rec_read_vars(NC_GRP_INFO_T *grp);
+
+#ifdef IGNORE
+/* This extern points to the pointer that holds the list of open
+ * netCDF files. */
+extern NC_FILE_INFO_T *nc_file;
+#endif
+
+/* These are the default chunk cache sizes for HDF5 files created or
+ * opened with netCDF-4. */
+size_t nc4_chunk_cache_size = CHUNK_CACHE_SIZE;
+size_t nc4_chunk_cache_nelems = CHUNK_CACHE_NELEMS;
+float nc4_chunk_cache_preemption = CHUNK_CACHE_PREEMPTION;
+
+/* This is set by nc_set_default_format in libsrc/nc.c. */
+extern int default_create_format;
+
+/* To turn off HDF5 error messages, I have to catch an early
+   invocation of a netcdf function. */
+static int virgin = 1;
+
+/* For performance, fill this array only the first time, and keep it
+ * in global memory for each further use. */
+#define NUM_TYPES 12
+static hid_t native_type_constant[NUM_TYPES];
+
+static char nc_type_name[NUM_TYPES][NC_MAX_NAME + 1] = {"char", "byte", "short", "int", "float",
+							"double", "ubyte", "ushort", "uint", 
+							"int64", "uint64", "string"};
+int nc4_free_global_hdf_string_typeid();
+
+/* Set chunk cache size. Only affects files opened/created *after* it
+ * is called.  */
+int
+nc_set_chunk_cache(size_t size, size_t nelems, float preemption)
+{
+   if (preemption < 0 || preemption > 1)
+      return NC_EINVAL;
+   nc4_chunk_cache_size = size;
+   nc4_chunk_cache_nelems = nelems;
+   nc4_chunk_cache_preemption = preemption;
+   return NC_NOERR;
+}
+
+/* Get chunk cache size. Only affects files opened/created *after* it
+ * is called.  */
+int
+nc_get_chunk_cache(size_t *sizep, size_t *nelemsp, float *preemptionp)
+{
+   if (sizep)
+      *sizep = nc4_chunk_cache_size;
+
+   if (nelemsp)
+      *nelemsp = nc4_chunk_cache_nelems;
+   
+   if (preemptionp)
+      *preemptionp = nc4_chunk_cache_preemption;
+   return NC_NOERR;
+}
+
+/* Required for fortran to avoid size_t issues. */
+int
+nc_set_chunk_cache_ints(int size, int nelems, int preemption)
+{
+   if (size <= 0 || nelems <= 0 || preemption < 0 || preemption > 100)
+      return NC_EINVAL;
+   nc4_chunk_cache_size = size;
+   nc4_chunk_cache_nelems = nelems;
+   nc4_chunk_cache_preemption = (float)preemption / 100;
+   return NC_NOERR;
+}
+
+int
+nc_get_chunk_cache_ints(int *sizep, int *nelemsp, int *preemptionp)
+{
+   if (sizep)
+      *sizep = (int)nc4_chunk_cache_size;
+   if (nelemsp)
+      *nelemsp = (int)nc4_chunk_cache_nelems;
+   if (preemptionp)
+      *preemptionp = (int)(nc4_chunk_cache_preemption * 100);
+
+   return NC_NOERR;
+}
+
+/* This will return the length of a netcdf data type in bytes. */
+int
+nc4typelen(nc_type type)
+{
+   switch(type){
+      case NC_BYTE:
+      case NC_CHAR:
+      case NC_UBYTE:
+	 return 1;
+      case NC_USHORT:
+      case NC_SHORT:
+	 return 2;
+      case NC_FLOAT:
+      case NC_INT:
+      case NC_UINT:
+	 return 4;
+      case NC_DOUBLE: 
+      case NC_INT64:
+      case NC_UINT64:
+	 return 8;
+   }
+   return -1;
+}
+
+/* Given a filename, check to see if it is a HDF5 file. */
+#define MAGIC_NUMBER_LEN 4
+#define NC_HDF5_FILE 1
+#define NC_HDF4_FILE 2
+static int
+nc_check_for_hdf(const char *path, int use_parallel, MPI_Comm comm, MPI_Info info, 
+		 int *hdf_file)
+{
+   char blob[MAGIC_NUMBER_LEN];
+   
+   assert(hdf_file && path);
+   LOG((3, "nc_check_for_hdf: path %s", path));
+
+/* Get the 4-byte blob from the beginning of the file. Don't use posix
+ * for parallel, use the MPI functions instead. */
+#ifdef USE_PARALLEL
+   if (use_parallel)
+   {
+      MPI_File fh;
+      MPI_Status status;
+      int retval;
+      if ((retval = MPI_File_open(comm, (char *)path, MPI_MODE_RDONLY,
+				  info, &fh)) != MPI_SUCCESS)
+	 return NC_EPARINIT;
+      if ((retval = MPI_File_read(fh, blob, MAGIC_NUMBER_LEN, MPI_CHAR,
+				  &status)) != MPI_SUCCESS)
+	 return NC_EPARINIT;
+      if ((retval = MPI_File_close(&fh)) != MPI_SUCCESS)
+	 return NC_EPARINIT;
+   }
+   else
+#endif /* USE_PARALLEL */
+   {
+      FILE *fp;
+      if (!(fp = fopen(path, "r")) ||
+	  fread(blob, MAGIC_NUMBER_LEN, 1, fp) != 1)
+	 return errno;
+      fclose(fp);
+   }
+
+   /* Ignore the first byte for HDF5. */
+   if (blob[1] == 'H' && blob[2] == 'D' && blob[3] == 'F')
+      *hdf_file = NC_HDF5_FILE;
+   else if (!strncmp(blob, "\016\003\023\001", MAGIC_NUMBER_LEN))
+      *hdf_file = NC_HDF4_FILE;
+   else
+      *hdf_file = 0;
+
+   return NC_NOERR;
+}
+   
+/* Create a HDF5/netcdf-4 file. In this case, ncid has already been
+ * selected in ncfunc.c. */
+static int
+nc4_create_file(const char *path, int cmode, MPI_Comm comm, MPI_Info info,
+                NC_FILE_INFO_T *nc) 
+{
+   hid_t fcpl_id, fapl_id;
+   unsigned flags;
+   FILE *fp;
+   int retval = NC_NOERR;
+   int persist = 0; /* Should diskless try to persist its data into file?*/
+
+   if(cmode & NC_DISKLESS)
+       flags = H5F_ACC_TRUNC;
+   else if(cmode & NC_NOCLOBBER)
+       flags = H5F_ACC_EXCL;
+   else
+       flags = H5F_ACC_TRUNC;
+
+   LOG((3, "nc4_create_file: path %s mode 0x%x", path, cmode));
+   assert(nc && path);
+
+
+   /* If this file already exists, and NC_NOCLOBBER is specified,
+      return an error. */
+   if (cmode & NC_DISKLESS) {
+	if(cmode & NC_WRITE)
+	    persist = 1;
+   } else if ((cmode & NC_NOCLOBBER) && (fp = fopen(path, "r"))) {
+      fclose(fp);
+      return NC_EEXIST;
+   }
+   
+   /* Add necessary structs to hold netcdf-4 file data. */
+   if ((retval = nc4_nc4f_list_add(nc, path, (NC_WRITE | cmode))))
+      BAIL(retval);
+   assert(nc->nc4_info && nc->nc4_info->root_grp);
+
+   /* Need this access plist to control how HDF5 handles open onjects
+    * on file close. (Setting H5F_CLOSE_SEMI will cause H5Fclose to
+    * fail if there are any open objects in the file. */
+   if ((fapl_id = H5Pcreate(H5P_FILE_ACCESS)) < 0)
+      BAIL(NC_EHDFERR);
+#ifdef EXTRA_TESTS
+   num_plists++;
+#endif
+#ifdef EXTRA_TESTS
+   if (H5Pset_fclose_degree(fapl_id, H5F_CLOSE_SEMI))
+      BAIL(NC_EHDFERR);
+#else
+   if (H5Pset_fclose_degree(fapl_id, H5F_CLOSE_STRONG))
+      BAIL(NC_EHDFERR);
+#endif /* EXTRA_TESTS */
+
+#ifdef USE_PARALLEL
+   /* If this is a parallel file create, set up the file creation
+      property list. */
+   if ((cmode & NC_MPIIO) || (cmode & NC_MPIPOSIX))
+   {
+      nc->nc4_info->parallel++;
+      if (cmode & NC_MPIIO)  /* MPI/IO */
+      {
+	 LOG((4, "creating parallel file with MPI/IO"));
+	 if (H5Pset_fapl_mpio(fapl_id, comm, info) < 0)
+	    BAIL(NC_EPARINIT);
+      }
+      else /* MPI/POSIX */
+      {
+	 LOG((4, "creating parallel file with MPI/posix"));
+	 if (H5Pset_fapl_mpiposix(fapl_id, comm, 0) < 0)
+	    BAIL(NC_EPARINIT);
+      }
+   }
+#else /* only set cache for non-parallel... */
+   if(cmode & NC_DISKLESS) {
+	 if (H5Pset_fapl_core(fapl_id, 4096, persist))
+	    BAIL(NC_EDISKLESS);
+   }
+   if (H5Pset_cache(fapl_id, 0, nc4_chunk_cache_nelems, nc4_chunk_cache_size, 
+		    nc4_chunk_cache_preemption) < 0)
+      BAIL(NC_EHDFERR);
+   LOG((4, "nc4_create_file: set HDF raw chunk cache to size %d nelems %d preemption %f", 
+	nc4_chunk_cache_size, nc4_chunk_cache_nelems, nc4_chunk_cache_preemption));
+#endif /* USE_PARALLEL */
+   
+   if (H5Pset_libver_bounds(fapl_id, H5F_LIBVER_18, H5F_LIBVER_18) < 0)
+      BAIL(NC_EHDFERR);
+
+   /* Create the property list. */
+   if ((fcpl_id = H5Pcreate(H5P_FILE_CREATE)) < 0)
+      BAIL(NC_EHDFERR);
+#ifdef EXTRA_TESTS
+   num_plists++;
+#endif
+
+   /* Set latest_format in access propertly list and
+    * H5P_CRT_ORDER_TRACKED in the creation property list. This turns
+    * on HDF5 creation ordering. */
+   if (H5Pset_link_creation_order(fcpl_id, (H5P_CRT_ORDER_TRACKED |
+					    H5P_CRT_ORDER_INDEXED)) < 0)
+      BAIL(NC_EHDFERR);
+   if (H5Pset_attr_creation_order(fcpl_id, (H5P_CRT_ORDER_TRACKED |
+					    H5P_CRT_ORDER_INDEXED)) < 0)
+      BAIL(NC_EHDFERR);
+
+   /* Create the file. */
+   if ((nc->nc4_info->hdfid = H5Fcreate(path, flags, fcpl_id, fapl_id)) < 0) 
+      BAIL(NC_EFILEMETA);
+
+   /* Open the root group. */
+   if ((nc->nc4_info->root_grp->hdf_grpid = H5Gopen2(nc->nc4_info->hdfid, "/", 
+						     H5P_DEFAULT)) < 0)
+      BAIL(NC_EFILEMETA);
+
+   /* Release the property lists. */
+   if (H5Pclose(fapl_id) < 0 ||
+       H5Pclose(fcpl_id) < 0)
+      BAIL(NC_EHDFERR);
+#ifdef EXTRA_TESTS
+   num_plists--;
+   num_plists--;
+#endif
+
+   /* Define mode gets turned on automatically on create. */
+   nc->nc4_info->flags |= NC_INDEF;
+
+   return NC_NOERR;
+
+  exit:
+   if (nc->nc4_info->hdfid > 0) H5Fclose(nc->nc4_info->hdfid);
+   return retval;
+}
+
+/** \ingroup netcdf4
+Create a netCDF-4/HDF5 file.
+
+\param path The file name of the new file.
+\param cmode The creation mode flag.
+\param initialsz Ignored by this function.
+\param basepe Ignored by this function.
+\param chunksizehintp Ignored by this function.
+\param use_parallel 0 for sequential, non-zero for parallel I/O.
+\param mpidata pointer to struct holdind data for parallel I/O
+layer. Ignored if NULL.
+\param dispatch Pointer to the dispatch table for this file.
+\param ncpp Pointer to start of linked list of open files.
+\return NC_INVAL Invalid input (check cmode).
+*/
+int
+NC4_create(const char* path, int cmode, size_t initialsz, int basepe, 
+	   size_t *chunksizehintp, int use_parallel, void *mpidata,
+	   NC_Dispatch *dispatch, NC **ncpp)
+{
+   NC_FILE_INFO_T *nc_file = NULL;
+#ifdef USE_PARALLEL
+   MPI_Comm comm = 0; 
+   MPI_Info info = 0; 
+#else
+   int comm = 0, info = 0;
+#endif /* USE_PARALLEL */
+   int res;
+
+   assert(ncpp && path);
+
+   LOG((1, "nc4_create_file: path %s cmode 0x%x comm %d info %d",
+	path, cmode, comm, info));
+   
+#ifdef USE_PARALLEL
+   if (mpidata) 
+   { 
+      comm = ((NC_MPI_INFO *)mpidata)->comm; 
+      info = ((NC_MPI_INFO *)mpidata)->info;	
+   }
+#endif /* USE_PARALLEL */
+
+   /* If this is our first file, turn off HDF5 error messages. */
+   if (virgin)
+   {
+      if (H5Eset_auto(NULL, NULL) < 0)
+	 LOG((0, "Couldn't turn off HDF5 error messages!"));
+      LOG((1, "HDF5 error messages have been turned off."));
+      virgin = 0;
+   }
+
+   /* Check the cmode for validity. */
+   if (cmode & ~(NC_NOCLOBBER | NC_64BIT_OFFSET
+                 | NC_NETCDF4 | NC_CLASSIC_MODEL
+                 | NC_SHARE | NC_MPIIO | NC_MPIPOSIX | NC_LOCK | NC_PNETCDF
+		 | NC_DISKLESS
+		 | NC_WRITE /* to support diskless persistence */
+                 )
+       || (cmode & NC_MPIIO && cmode & NC_MPIPOSIX)
+       || (cmode & NC_64BIT_OFFSET && cmode & NC_NETCDF4)
+       || (cmode & (NC_MPIIO | NC_MPIPOSIX) && cmode & NC_DISKLESS)
+      )
+      return NC_EINVAL;
+
+   /* Allocate the storage for this file info struct, and fill it with
+      zeros. This add the file metadata to the front of the global
+      nc_file list. */
+   if ((res = nc4_file_list_add(&nc_file, dispatch)))
+      return res;
+
+   /* Apply default create format. */
+   if (default_create_format == NC_FORMAT_64BIT)
+      cmode |= NC_64BIT_OFFSET;
+   else if (default_create_format == NC_FORMAT_NETCDF4)
+      cmode |= NC_NETCDF4;
+   else if (default_create_format == NC_FORMAT_NETCDF4_CLASSIC)
+   {
+      cmode |= NC_NETCDF4;
+      cmode |= NC_CLASSIC_MODEL;
+   }
+   LOG((2, "cmode after applying default format: 0x%x", cmode));
+
+   /* Check to see if we want a netcdf3 or netcdf4 file. Open it, and
+      call the appropriate nc*_create. */
+   if (cmode & NC_NETCDF4) 
+   {
+      nc_file->int_ncid = nc_file->ext_ncid;
+      res = nc4_create_file(path, cmode, comm, info, nc_file);
+   } 
+#ifdef USE_PNETCDF
+   else if (cmode & NC_PNETCDF)
+   {
+      nc_file->pnetcdf_file++;
+      res = ncmpi_create(comm, path, cmode, info, &(nc_file->int_ncid));      
+   }
+#endif /* USE_PNETCDF */
+   else 
+   {
+      return NC_EINVAL;
+   }
+   
+   /* Delete this file list entry if there was a failure. */
+   if (res)
+   {
+      if (nc_file) 
+	 nc4_file_list_del(nc_file);
+   }
+   else
+      *ncpp = (NC *)nc_file;
+
+   return res;
+}
+
+/* This function is called by read_dataset when a dimension scale
+ * dataset is encountered. It reads in the dimension data (creating a
+ * new NC_DIM_INFO_T object), and also checks to see if this is a
+ * dimension without a variable - that is, a coordinate dimension
+ * which does not have any coordinate data. */
+static int
+read_scale(NC_GRP_INFO_T *grp, hid_t datasetid, char *obj_name, 
+           hsize_t scale_size, hsize_t max_scale_size, 
+           int *dim_without_var)
+{
+   /*char *start_of_len;*/
+   char dimscale_name_att[NC_MAX_NAME + 1] = "";
+   hid_t attid = 0;
+   int max_len;
+   int retval;
+
+   /* Add a dimension for this scale. */
+   if ((retval = nc4_dim_list_add(&grp->dim)))
+      return retval;
+
+   /* Assign dimid and increment number of dimensions. */
+   grp->dim->dimid = grp->file->nc4_info->next_dimid++;
+   grp->ndims++;
+
+   /* Does this dataset have a hidden attribute that tells us its
+    * dimid? If so, read it. */
+   H5E_BEGIN_TRY { 
+      if ((attid = H5Aopen_by_name(datasetid, ".", NC_DIMID_ATT_NAME, 
+				   H5P_DEFAULT, H5P_DEFAULT)) > 0)
+      {
+	 if (H5Aread(attid, H5T_NATIVE_INT, &grp->dim->dimid) < 0)
+	    return NC_EHDFERR;
+	 if (H5Aclose(attid) < 0)
+	    return NC_EHDFERR;
+      }
+   } H5E_END_TRY;
+
+   max_len = strlen(obj_name) > NC_MAX_NAME ? NC_MAX_NAME : strlen(obj_name);
+   if (!(grp->dim->name = malloc((max_len + 1) * sizeof(char))))
+      return NC_ENOMEM;
+   strncpy(grp->dim->name, obj_name, max_len + 1);
+   if (SIZEOF_SIZE_T < 8 && scale_size > NC_MAX_UINT)
+   {
+      grp->dim->len = NC_MAX_UINT;
+      grp->dim->too_long = 1;
+   }
+   else
+      grp->dim->len = scale_size;
+   grp->dim->hdf_dimscaleid = datasetid;
+
+   /* If the dimscale has an unlimited dimension, then this dimension
+    * is unlimited. */
+   if (max_scale_size == H5S_UNLIMITED)
+      grp->dim->unlimited++;
+
+   /* If the scale name is set to DIM_WITHOUT_VARIABLE, then this is a
+    * dimension, but not a variable. (If get_scale_name returns an
+    * error, just move on, there's no NAME.) */
+   if (H5DSget_scale_name(datasetid, dimscale_name_att, NC_MAX_NAME) >= 0)
+   {
+      if (!strncmp(dimscale_name_att, DIM_WITHOUT_VARIABLE, 
+                   strlen(DIM_WITHOUT_VARIABLE)))
+      {
+         if (grp->dim->unlimited)
+         {
+            size_t len = 0, *lenp = &len;
+            if ((retval = nc4_find_dim_len(grp, grp->dim->dimid, &lenp)))
+               return retval;
+            grp->dim->len = *lenp;
+         }
+         (*dim_without_var)++;
+      }
+   }
+
+   return NC_NOERR;
+}
+
+/* This function reads the hacked in coordinates attribute I use for
+ * multi-dimensional coordinates. */
+static int
+read_coord_dimids(NC_VAR_INFO_T *var)
+{
+   hid_t coord_att_typeid = -1, coord_attid = -1, spaceid = -1;
+   hssize_t coord_array_size;
+   int ret = 0;
+
+   /* There is a hidden attribute telling us the ids of the
+    * dimensions that apply to this multi-dimensional coordinate
+    * variable. Read it. */
+   if ((coord_attid = H5Aopen_name(var->hdf_datasetid, COORDINATES)) < 0) ret++;
+   if (!ret && (coord_att_typeid = H5Aget_type(coord_attid)) < 0) ret++;
+   if (!ret && H5Aread(coord_attid, coord_att_typeid, var->dimids) < 0) ret++;
+   LOG((4, "dimscale %s is multidimensional and has coords", var->name));
+
+   /* How many dimensions are there? */
+   if ((spaceid = H5Aget_space(coord_attid)) < 0) ret++;
+#ifdef EXTRA_TESTS
+   num_spaces++;
+#endif
+   if ((coord_array_size = H5Sget_simple_extent_npoints(spaceid)) < 0) ret++;
+   
+   /* Malloc space to the array of pointers to dims. */
+   
+
+   /* Set my HDF5 IDs free! */
+   if (spaceid >= 0 && H5Sclose(spaceid) < 0) ret++;
+#ifdef EXTRA_TESTS
+   num_spaces--;
+#endif
+   if (coord_att_typeid >= 0 && H5Tclose(coord_att_typeid) < 0) ret++;
+   if (coord_attid >= 0 && H5Aclose(coord_attid) < 0) ret++;
+   return ret ? NC_EATTMETA : NC_NOERR;
+}
+
+/* This function is called when reading a file's metadata for each
+ * dimension scale attached to a variable.*/
+static herr_t 
+dimscale_visitor(hid_t did, unsigned dim, hid_t dsid, 
+                 void *dimscale_hdf5_objids)
+{
+   H5G_stat_t statbuf;
+
+   /* Get more info on the dimscale object.*/
+   if (H5Gget_objinfo(dsid, ".", 1, &statbuf) < 0)
+      return -1;
+
+   /* Pass this information back to caller. */
+/*   (*(HDF5_OBJID_T *)dimscale_hdf5_objids).fileno = statbuf.fileno;
+     (*(HDF5_OBJID_T *)dimscale_hdf5_objids).objno = statbuf.objno;*/
+   (*(HDF5_OBJID_T *)dimscale_hdf5_objids).fileno[0] = statbuf.fileno[0];
+   (*(HDF5_OBJID_T *)dimscale_hdf5_objids).fileno[1] = statbuf.fileno[1];
+   (*(HDF5_OBJID_T *)dimscale_hdf5_objids).objno[0] = statbuf.objno[0];
+   (*(HDF5_OBJID_T *)dimscale_hdf5_objids).objno[1] = statbuf.objno[1];
+   return 0;
+}
+
+/* Given an HDF5 type, set a pointer to netcdf type. */
+static int
+get_netcdf_type(NC_HDF5_FILE_INFO_T *h5, hid_t native_typeid, 
+		nc_type *xtype)
+{
+   NC_TYPE_INFO_T *type;
+   hid_t class;
+   htri_t is_str, equal = 0;
+
+   assert(h5 && xtype);
+
+   if ((class = H5Tget_class(native_typeid)) < 0)
+      return NC_EHDFERR;
+
+   /* H5Tequal doesn't work with H5T_C_S1 for some reason. But
+    * H5Tget_class will return H5T_STRING if this is a string. */
+   if (class == H5T_STRING)
+   {
+      if ((is_str = H5Tis_variable_str(native_typeid)) < 0)
+         return NC_EHDFERR;
+      if (is_str)
+         *xtype = NC_STRING;
+      else
+         *xtype = NC_CHAR;
+      return NC_NOERR;
+   }
+   else if (class == H5T_INTEGER || class == H5T_FLOAT)
+   {
+      /* For integers and floats, we don't have to worry about
+       * endianness if we compare native types. */
+      if ((equal = H5Tequal(native_typeid, H5T_NATIVE_SCHAR)) < 0)
+         return NC_EHDFERR;
+      if (equal)
+      {
+         *xtype = NC_BYTE;
+         return NC_NOERR;
+      }
+      if ((equal = H5Tequal(native_typeid, H5T_NATIVE_SHORT)) < 0)
+         return NC_EHDFERR;
+      if (equal)
+      {
+         *xtype = NC_SHORT;
+         return NC_NOERR;
+      }
+      if ((equal = H5Tequal(native_typeid, H5T_NATIVE_INT)) < 0)
+         return NC_EHDFERR;
+      if (equal)
+      {
+         *xtype = NC_INT;
+         return NC_NOERR;
+      }
+      if ((equal = H5Tequal(native_typeid, H5T_NATIVE_FLOAT)) < 0)
+         return NC_EHDFERR;
+      if (equal)
+      {
+         *xtype = NC_FLOAT;
+         return NC_NOERR;
+      }
+      if ((equal = H5Tequal(native_typeid, H5T_NATIVE_DOUBLE)) < 0)
+         return NC_EHDFERR;
+      if (equal)
+      {
+         *xtype = NC_DOUBLE;
+         return NC_NOERR;
+      }
+      if ((equal = H5Tequal(native_typeid, H5T_NATIVE_UCHAR)) < 0)
+         return NC_EHDFERR;
+      if (equal)
+      {
+         *xtype = NC_UBYTE;
+         return NC_NOERR;
+      }
+      if ((equal = H5Tequal(native_typeid, H5T_NATIVE_USHORT)) < 0)
+         return NC_EHDFERR;
+      if (equal)
+      {
+         *xtype = NC_USHORT;
+         return NC_NOERR;
+      }
+      if ((equal = H5Tequal(native_typeid, H5T_NATIVE_UINT)) < 0)
+         return NC_EHDFERR;
+      if (equal)
+      {
+         *xtype = NC_UINT;
+         return NC_NOERR;
+      }
+      if ((equal = H5Tequal(native_typeid, H5T_NATIVE_LLONG)) < 0)
+         return NC_EHDFERR;
+      if (equal)
+      {
+         *xtype = NC_INT64;
+         return NC_NOERR;
+      }
+      if ((equal = H5Tequal(native_typeid, H5T_NATIVE_ULLONG)) < 0)
+         return NC_EHDFERR;
+      if (equal)
+      {
+         *xtype = NC_UINT64;
+         return NC_NOERR;
+      }
+   }
+
+   /* Maybe we already know about this type. */
+   if (!equal)
+      if((type = nc4_rec_find_hdf_type(h5->root_grp, native_typeid)))
+      {
+         *xtype = type->nc_typeid;
+         return NC_NOERR;
+      }
+   
+   *xtype = NC_NAT;
+   return NC_EBADTYPID;
+}
+
+/* Given an HDF5 type, set a pointer to netcdf type_info struct,
+ * either an existing one (for user-defined types) or a newly created
+ * one. */
+static int
+get_type_info2(NC_HDF5_FILE_INFO_T *h5, hid_t datasetid,
+	       nc_type *xtype, NC_TYPE_INFO_T **type_info)
+{
+   NC_TYPE_INFO_T *type;
+   htri_t is_str, equal = 0;
+   hid_t class, native_typeid, hdf_typeid;
+#if 0
+   nc_type my_nc_type = 0;
+#endif
+   H5T_order_t order;
+   int endianness;
+   nc_type nc_type_constant[NUM_TYPES] = {NC_CHAR, NC_BYTE, NC_SHORT, NC_INT, NC_FLOAT,
+					  NC_DOUBLE, NC_UBYTE, NC_USHORT, NC_UINT,
+					  NC_INT64, NC_UINT64, NC_STRING};
+   int type_size[NUM_TYPES] = {sizeof(char), sizeof(char), sizeof(short), 
+			       sizeof(int), sizeof(float), sizeof(double),
+			       sizeof(unsigned char), sizeof(unsigned short), 
+			       sizeof(unsigned int), sizeof(long long), 
+			       sizeof(unsigned long long), 0};
+   int t;
+
+   assert(h5 && xtype && type_info);
+
+   /* Because these N5T_NATIVE_* constants are actually function calls
+    * (!) in H5Tpublic.h, I can't initialize this array in the usual
+    * way, because at least some C compilers (like Irix) complain
+    * about calling functions when defining constants. So I have to do
+    * it like this. Note that there's no native types for char or
+    * string. Those are handled later. */
+   if (!native_type_constant[1])
+   {
+      native_type_constant[1] = H5T_NATIVE_SCHAR;
+      native_type_constant[2] = H5T_NATIVE_SHORT;
+      native_type_constant[3] = H5T_NATIVE_INT;
+      native_type_constant[4] = H5T_NATIVE_FLOAT;
+      native_type_constant[5] = H5T_NATIVE_DOUBLE;
+      native_type_constant[6] = H5T_NATIVE_UCHAR;
+      native_type_constant[7] = H5T_NATIVE_USHORT;
+      native_type_constant[8] = H5T_NATIVE_UINT;
+      native_type_constant[9] = H5T_NATIVE_LLONG;
+      native_type_constant[10] = H5T_NATIVE_ULLONG;
+   }
+   
+   /* Get the HDF5 typeid - we'll need it later. */
+   if ((hdf_typeid = H5Dget_type(datasetid)) < 0)
+      return NC_EHDFERR;
+
+   /* Get the native typeid. Will be equivalent to hdf_typeid when
+    * creating but not necessarily when reading, a variable. */
+   if ((native_typeid = H5Tget_native_type(hdf_typeid, H5T_DIR_DEFAULT)) < 0) 
+      return NC_EHDFERR;
+
+   /* Is this type an integer, string, compound, or what? */
+   if ((class = H5Tget_class(native_typeid)) < 0)
+      return NC_EHDFERR;
+
+   /* Is this an atomic type? */
+   if (class == H5T_STRING || class == H5T_INTEGER || class == H5T_FLOAT)
+   {
+      /* Allocate a phony NC_TYPE_INFO_T struct to hold type info. */
+      if (!(*type_info = calloc(1, sizeof(NC_TYPE_INFO_T))))
+	 return NC_ENOMEM;
+      (*type_info)->class = class;
+
+      /* H5Tequal doesn't work with H5T_C_S1 for some reason. But
+       * H5Tget_class will return H5T_STRING if this is a string. */
+      if (class == H5T_STRING)
+      {
+	 if ((is_str = H5Tis_variable_str(native_typeid)) < 0)
+	    return NC_EHDFERR;
+	 /* Make sure fixed-len strings will work like variable-len strings */
+	 if (is_str || H5Tget_size(hdf_typeid) > 1)
+	    t = NUM_TYPES - 1;
+	 else
+	     t = 0;
+      }
+      else if (class == H5T_INTEGER || class == H5T_FLOAT)
+      {
+	 for (t = 1; t < NUM_TYPES - 1; t++)
+	 {
+	    if ((equal = H5Tequal(native_typeid, native_type_constant[t])) < 0)
+	       return NC_EHDFERR;
+	    if (equal)
+	    {
+#if 0
+	       my_nc_type = nc_type_constant[t];
+#endif
+	       break;
+	    }
+	 }
+
+	 /* Find out about endianness. */
+	 if (class == H5T_INTEGER)
+	 {
+	    if ((order = H5Tget_order(hdf_typeid)) < 0) 
+	       return NC_EHDFERR;
+	    if (order == H5T_ORDER_LE)
+	       endianness = NC_ENDIAN_LITTLE;
+	    else if (order == H5T_ORDER_BE)
+	       endianness = NC_ENDIAN_BIG;
+	    else /* don't support H5T_ORDER_VAX, H5T_ORDER_MIXED, H5T_ORDER_NONE */
+		return NC_EBADTYPE;
+	    /* Copy this into the type_info struct. */
+	    (*type_info)->endianness = endianness;
+	 }
+      }
+      *xtype = nc_type_constant[t];
+      (*type_info)->nc_typeid = nc_type_constant[t];
+      (*type_info)->size = type_size[t];
+      if (!((*type_info)->name = malloc((strlen(nc_type_name[t]) + 1) * sizeof(char))))
+	 return NC_ENOMEM;
+      strcpy((*type_info)->name, nc_type_name[t]);
+      (*type_info)->class = class;
+      (*type_info)->hdf_typeid = hdf_typeid;
+      (*type_info)->native_typeid = native_typeid;
+      (*type_info)->close_hdf_typeid = 1;
+      return NC_NOERR;
+   }
+   else
+   {
+      /* This is a user-defined type. */
+      if((type = nc4_rec_find_hdf_type(h5->root_grp, native_typeid)))
+      {
+         *xtype = type->nc_typeid;
+	 *type_info = type;
+      }
+
+      /* The type entry in the array of user-defined types already has
+       * an open data typeid (and native typeid), so close the ones we
+       * opened above. */
+      if (H5Tclose(native_typeid) < 0) 
+	 return NC_EHDFERR;
+      if (H5Tclose(hdf_typeid) < 0) 
+	 return NC_EHDFERR;
+
+      if (type)
+         return NC_NOERR;
+   }
+
+   *xtype = NC_NAT;
+   return NC_EBADTYPID;
+}
+
+/* Read an attribute. */
+static int 
+read_hdf5_att(NC_GRP_INFO_T *grp, hid_t attid, NC_ATT_INFO_T *att)
+{
+   hid_t spaceid = 0, file_typeid = 0;
+   hsize_t dims[1]; /* netcdf attributes always 1-D. */
+   int retval = NC_NOERR;
+   size_t type_size;
+   int att_ndims;
+   hssize_t att_npoints;
+   H5T_class_t att_class;      
+   int fixed_len_string = 0;
+   size_t fixed_size = 0;
+
+   assert(att->name);
+   LOG((5, "read_hdf5_att: att->attnum %d att->name %s "
+        "att->xtype %d att->len %d", att->attnum, att->name,
+        att->xtype, att->len));
+
+   /* Get type of attribute in file. */
+   if ((file_typeid = H5Aget_type(attid)) < 0)
+      return NC_EATTMETA;
+   if ((att->native_typeid = H5Tget_native_type(file_typeid, H5T_DIR_DEFAULT)) < 0) 
+      BAIL(NC_EHDFERR);
+   if ((att_class = H5Tget_class(att->native_typeid)) < 0)
+      BAIL(NC_EATTMETA);
+   if (att_class == H5T_STRING && !H5Tis_variable_str(att->native_typeid))
+   {
+      fixed_len_string++;
+      if (!(fixed_size = H5Tget_size(att->native_typeid)))
+	 BAIL(NC_EATTMETA);
+   }
+   if ((retval = get_netcdf_type(grp->file->nc4_info, att->native_typeid, &(att->xtype))))
+      BAIL(retval);
+
+
+   /* Get len. */
+   if ((spaceid = H5Aget_space(attid)) < 0)
+      BAIL(NC_EATTMETA); 
+#ifdef EXTRA_TESTS
+   num_spaces++;
+#endif
+   if ((att_ndims = H5Sget_simple_extent_ndims(spaceid)) < 0)
+      BAIL(NC_EATTMETA);
+   if ((att_npoints = H5Sget_simple_extent_npoints(spaceid)) < 0)
+      BAIL(NC_EATTMETA);
+
+   /* If both att_ndims and att_npoints are zero, then this is a
+    * zero length att. */
+   if (att_ndims == 0 && att_npoints == 0)
+   {
+      dims[0] = 0;
+   }
+   else if (att->xtype == NC_STRING) {
+       dims[0] = att_npoints;
+   }
+   else if (att->xtype == NC_CHAR)
+   {
+      /* NC_CHAR attributes are written as a scalar in HDF5, of type
+       * H5T_C_S1, of variable length. */
+      if (att_ndims == 0) 
+      {
+	 if (!(dims[0] = H5Tget_size(file_typeid)))
+	    BAIL(NC_EATTMETA);
+      }
+      else
+      {
+	 /* This is really a string type! */
+	 att->xtype = NC_STRING;
+	 dims[0] = att_npoints;
+      }
+   } 
+   else
+   {
+      /* All netcdf attributes are scalar or 1-D only. */
+      if (att_ndims > 1)
+	 BAIL(NC_EATTMETA);
+
+      /* Read the size of this attribute. */
+      if (H5Sget_simple_extent_dims(spaceid, dims, NULL) < 0)
+	 BAIL(NC_EATTMETA);
+   }
+      
+   /* Tell the user what the length if this attribute is. */
+   att->len = dims[0];
+
+   /* Allocate some memory if the len is not zero, and read the
+      attribute. */
+   if (dims[0])
+   {
+      if ((retval = nc4_get_typelen_mem(grp->file->nc4_info, att->xtype, 0,
+					&type_size)))
+	 return retval;
+      if (att_class == H5T_VLEN)
+      {
+	 if (!(att->vldata = malloc((unsigned int)(att->len * sizeof(hvl_t)))))
+	    BAIL(NC_ENOMEM);
+	 if (H5Aread(attid, att->native_typeid, att->vldata) < 0)
+	    BAIL(NC_EATTMETA);
+      }
+      else if (att->xtype == NC_STRING)
+      {
+	 if (!(att->stdata = calloc(att->len, sizeof(char *))))
+	    BAIL(NC_ENOMEM);
+	 /* For a fixed length HDF5 string, the read requires
+	  * contiguous memory. Meanwhile, the netCDF API requires that
+	  * nc_free_string be called on string arrays, which would not
+	  * work if one contiguous memory block were used. So here I
+	  * convert the contiguous block of strings into an array of
+	  * malloced strings (each string with its own malloc). Then I
+	  * copy the data and free the contiguous memory. This
+	  * involves copying the data, which is bad, but this only
+	  * occurs for fixed length string attributes, and presumably
+	  * these are small. (And netCDF-4 does not create them - it
+	  * always uses variable length strings. */
+	 if (fixed_len_string)
+	 {
+	    int i;
+	    char *contig_buf, *cur;
+
+	    /* Alloc space for the contiguous memory read. */
+	    if (!(contig_buf = malloc(att->len * fixed_size * sizeof(char))))
+	       BAIL(NC_ENOMEM);
+
+	    /* Read the fixed-len strings as one big block. */
+	    if (H5Aread(attid, att->native_typeid, contig_buf) < 0)
+	       BAIL(NC_EATTMETA);
+	    
+	    /* Copy strings, one at a time, into their new home. Alloc
+	       space for each string. The user will later free this
+	       space with nc_free_string. */
+	    cur = contig_buf;
+	    for (i = 0; i < att->len; i++)
+	    {
+	       if (!(att->stdata[i] = malloc(fixed_size)))
+		  BAIL(NC_ENOMEM);
+	       strncpy(att->stdata[i], cur, fixed_size);
+	       cur += fixed_size;
+	    }
+	    
+	    /* Free contiguous memory buffer. */
+	    free(contig_buf);
+	 }
+	 else
+	 {
+	    /* Read variable-length string atts. */
+	    if (H5Aread(attid, att->native_typeid, att->stdata) < 0)
+	       BAIL(NC_EATTMETA);
+	 }
+      }
+      else
+      {
+	 if (!(att->data = malloc((unsigned int)(att->len * type_size))))
+	    BAIL(NC_ENOMEM);
+	 if (H5Aread(attid, att->native_typeid, att->data) < 0)
+	    BAIL(NC_EATTMETA);
+      }
+   }
+
+   if (H5Tclose(file_typeid) < 0)
+      BAIL(NC_EHDFERR);
+   if (H5Sclose(spaceid) < 0)
+      return NC_EHDFERR;
+#ifdef EXTRA_TESTS
+   num_spaces--;
+#endif
+   
+   return NC_NOERR;
+
+  exit:
+   if (H5Tclose(file_typeid) < 0)
+      BAIL2(NC_EHDFERR);
+   if (spaceid > 0 && H5Sclose(spaceid) < 0)
+      BAIL2(NC_EHDFERR);
+#ifdef EXTRA_TESTS
+   num_spaces--;
+#endif
+   return retval;
+}
+
+/* Read information about a user defined type from the HDF5 file, and
+ * stash it in the group's list of types. Return the netcdf typeid
+ * through a pointer, if caller desires it. */
+static int
+read_type(NC_GRP_INFO_T *grp, char *type_name)
+{
+   NC_TYPE_INFO_T *type;
+   H5T_class_t class;
+   hid_t hdf_typeid, native_typeid = 0;
+   int nmembers;
+   hid_t member_hdf_typeid, base_hdf_typeid = 0;
+   char *member_name = NULL;
+   size_t type_size = 0, member_offset;
+   unsigned int m;
+   nc_type ud_type_type = NC_NAT, base_nc_type = NC_NAT, member_xtype;
+   htri_t ret;
+   int retval = NC_NOERR;
+   void *value;
+   int i;
+
+   assert(grp && type_name);
+
+   if (strlen(type_name) > NC_MAX_NAME)
+      return NC_EBADNAME;
+
+   LOG((4, "read_type: type_name %s grp->name %s", type_name, grp->name));
+
+   if ((hdf_typeid = H5Topen2(grp->hdf_grpid, type_name, H5P_DEFAULT)) < 0)
+      return NC_EHDFERR;
+
+   /* What is the native type for this platform? */
+   if ((native_typeid = H5Tget_native_type(hdf_typeid, H5T_DIR_DEFAULT)) < 0) 
+      return NC_EHDFERR;
+   
+   /* What is the size of this type on this platform. */
+   if (!(type_size = H5Tget_size(native_typeid)))
+      return NC_EHDFERR;
+   LOG((5, "type_size %d", type_size));
+
+   /* What is the class of this type, compound, vlen, etc. */
+   if ((class = H5Tget_class(hdf_typeid)) < 0)
+      return NC_EHDFERR;
+   switch (class)
+   {
+      case H5T_STRING:
+         ud_type_type = NC_STRING;
+         break;
+      case H5T_COMPOUND:
+         ud_type_type = NC_COMPOUND; 
+         break;
+      case H5T_VLEN:
+         /* For conveninence we allow user to pass vlens of strings
+          * with null terminated strings. This means strings are
+          * treated slightly differently by the API, although they are
+          * really just VLENs of characters. */
+         if ((ret = H5Tis_variable_str(hdf_typeid)) < 0)
+            return NC_EHDFERR;
+         if (ret)
+            ud_type_type = NC_STRING;
+         else
+         {
+            ud_type_type = NC_VLEN;
+
+            /* Find the base type of this vlen (i.e. what is this a
+             * vlen of?) */
+            if (!(base_hdf_typeid = H5Tget_super(native_typeid)))
+               return NC_EHDFERR;
+
+            /* What size is this type? */
+            if (!(type_size = H5Tget_size(base_hdf_typeid)))
+               return NC_EHDFERR;
+
+            /* What is the netcdf corresponding type. */
+            if ((retval = get_netcdf_type(grp->file->nc4_info, base_hdf_typeid, 
+					  &base_nc_type)))
+               return retval;
+            LOG((5, "base_hdf_typeid 0x%x type_size %d base_nc_type %d", 
+                 base_hdf_typeid, type_size, base_nc_type));
+         }
+         break;
+      case H5T_OPAQUE:
+         ud_type_type = NC_OPAQUE;
+         /* What size is this type? */
+         if (!(type_size = H5Tget_size(hdf_typeid)))
+            return NC_EHDFERR;
+         LOG((5, "type_size %d", type_size));
+         break;
+      case H5T_ENUM:
+         ud_type_type = NC_ENUM;
+
+         /* Find the base type of this enum (i.e. what is this a
+          * enum of?) */
+         if (!(base_hdf_typeid = H5Tget_super(hdf_typeid)))
+            return NC_EHDFERR;
+         /* What size is this type? */
+         if (!(type_size = H5Tget_size(base_hdf_typeid)))
+            return NC_EHDFERR;
+         /* What is the netcdf corresponding type. */
+         if ((retval = get_netcdf_type(grp->file->nc4_info, base_hdf_typeid, 
+				       &base_nc_type)))
+            return retval;
+         LOG((5, "base_hdf_typeid 0x%x type_size %d base_nc_type %d", 
+              base_hdf_typeid, type_size, base_nc_type));
+         break;
+      default:
+         LOG((0, "unknown class"));
+         return NC_EBADCLASS;
+   }
+
+   /* Add to the list for this new type, and get a local pointer to it. */
+   if ((retval = nc4_type_list_add(&grp->type, &type)))
+      return retval;
+   assert(type);
+
+   /* Remember info about this type. */
+   type->nc_typeid = grp->file->nc4_info->next_typeid++;
+   type->size = type_size;
+   if (!(type->name = malloc((strlen(type_name) + 1) * sizeof(char))))
+      return NC_ENOMEM;
+   strcpy(type->name, type_name);
+   type->class = ud_type_type;
+   type->base_nc_type = base_nc_type;
+   type->committed++;
+   type->hdf_typeid = hdf_typeid;
+   type->native_typeid = native_typeid;
+
+   /* Read info about each member of this compound type. */
+   if (ud_type_type == NC_COMPOUND)
+   {
+      if ((nmembers = H5Tget_nmembers(hdf_typeid)) < 0)
+         return NC_EHDFERR;
+      LOG((5, "compound type has %d members", nmembers));
+      for (m = 0; m < nmembers; m++)
+      {
+         H5T_class_t mem_class;
+	 hid_t member_native_typeid;
+         int ndims = 0, dim_size[NC_MAX_VAR_DIMS];
+         hsize_t dims[NC_MAX_VAR_DIMS];
+         int d;
+
+	 /* Get the typeid and native typeid of this member of the
+	  * compound type. */
+         if ((member_hdf_typeid = H5Tget_member_type(type->native_typeid, m)) < 0)
+            return NC_EHDFERR;
+	 if ((member_native_typeid = H5Tget_native_type(member_hdf_typeid, H5T_DIR_DEFAULT)) < 0) 
+	    return NC_EHDFERR;
+
+	 /* Get the name of the member.*/
+         member_name = H5Tget_member_name(type->native_typeid, m);
+         if (!member_name || strlen(member_name) > NC_MAX_NAME)
+            return NC_EBADNAME;
+
+	 /* Offset in bytes on *this* platform. */
+         member_offset = H5Tget_member_offset(type->native_typeid, m);
+
+	 /* Get dimensional data if this member is an array of something. */
+         if ((mem_class = H5Tget_class(member_hdf_typeid)) < 0)
+            return NC_EHDFERR;
+         if (mem_class == H5T_ARRAY)
+         {
+            if ((ndims = H5Tget_array_ndims(member_hdf_typeid)) < 0)
+               return NC_EHDFERR;
+            if (H5Tget_array_dims(member_hdf_typeid, dims, NULL) != ndims)
+               return NC_EHDFERR;
+            for (d = 0; d < ndims; d++)
+               dim_size[d] = dims[d];
+	    /* What is the netCDF typeid of this member? */
+	    if ((retval = get_netcdf_type(grp->file->nc4_info, H5Tget_super(member_hdf_typeid), 
+					  &member_xtype)))
+	       return retval;
+         }
+	 else
+	 {
+	    /* What is the netCDF typeid of this member? */
+	    if ((retval = get_netcdf_type(grp->file->nc4_info, member_native_typeid, 
+					  &member_xtype)))
+	       return retval;
+	 }
+
+	 /* Add this member to our list of fields in this compound type. */
+         if (ndims)
+         {
+            if ((retval = nc4_field_list_add(&type->field, type->num_fields++, member_name, 
+                                             member_offset, H5Tget_super(member_hdf_typeid), 
+					     H5Tget_super(member_native_typeid), 
+                                             member_xtype, ndims, dim_size)))
+               return retval;
+         }
+         else
+         {
+            if ((retval = nc4_field_list_add(&type->field, type->num_fields++, member_name, 
+                                             member_offset, member_hdf_typeid, member_native_typeid, 
+					     member_xtype, 0, NULL)))
+               return retval;
+         } 
+         
+         /* HDF5 allocated this for us. */
+         free(member_name);
+      }
+   }
+   else if (ud_type_type == NC_VLEN)
+   {
+      type->base_hdf_typeid = base_hdf_typeid;
+   }
+   else if (ud_type_type == NC_ENUM)
+   {
+      /* Remember the base HDF5 type for this enum. */
+      type->base_hdf_typeid = base_hdf_typeid;
+
+      /* Find out how many member are in the enum. */
+      if ((type->num_enum_members = H5Tget_nmembers(hdf_typeid)) < 0) 
+         return NC_EHDFERR;
+
+      /* Allocate space for one value. */
+      if (!(value = calloc(1, type_size)))
+         return NC_ENOMEM;
+
+      /* Read each name and value defined in the enum. */
+      for (i = 0; i < type->num_enum_members; i++)
+      {
+         /* Get the name and value from HDF5. */
+         if (!(member_name = H5Tget_member_name(hdf_typeid, i)))
+            return NC_EHDFERR;
+         if (!member_name || strlen(member_name) > NC_MAX_NAME)
+            return NC_EBADNAME;
+         if (H5Tget_member_value(hdf_typeid, i, value) < 0) 
+            return NC_EHDFERR;
+
+         /* Insert new field into this type's list of fields. */
+         if ((retval = nc4_enum_member_add(&type->enum_member, type->size, 
+                                           member_name, value)))
+            return retval;
+	 free(member_name);
+      }
+      
+      /* Free the tempory memory for one value, and the member name
+       * (which HDF5 allocated for us). */
+      free(value);
+   }
+   
+   return retval;
+}
+
+/* This function is called by read_dataset, (which is called by
+ * nc4_rec_read_metadata) when a netCDF variable is found in the
+ * file. This function reads in all the metadata about the var,
+ * including the attributes. */
+static int
+read_var(NC_GRP_INFO_T *grp, hid_t datasetid, char *obj_name, 
+         size_t ndims, int is_scale, int num_scales, hid_t access_pid)
+{
+   NC_VAR_INFO_T *var;
+   int natts, a, d;
+
+   NC_ATT_INFO_T *att;
+   hid_t attid = 0;
+   char att_name[NC_MAX_HDF5_NAME + 1];
+
+#define CD_NELEMS_ZLIB 1
+#define CD_NELEMS_SZIP 4
+   H5Z_filter_t filter;
+   int num_filters;
+   unsigned int cd_values[CD_NELEMS_SZIP];
+   size_t cd_nelems = CD_NELEMS_SZIP;
+   hid_t propid = 0;
+   H5D_fill_value_t fill_status;
+   H5D_layout_t layout;
+   hsize_t chunksize[NC_MAX_VAR_DIMS];
+   int retval = NC_NOERR;
+   double rdcc_w0;
+   int f;
+
+   assert(obj_name && grp);
+   LOG((4, "read_var: obj_name %s", obj_name));
+
+   /* Add a variable to the end of the group's var list. */
+   if ((retval = nc4_var_list_add(&grp->var, &var)))
+      return retval;
+            
+   /* Fill in what we already know. */
+   var->hdf_datasetid = datasetid;
+   var->varid = grp->nvars++;
+   var->created++;
+   var->ndims = ndims;
+
+   /* We need some room to store information about dimensions for this
+    * var. */
+   if (var->ndims)
+   {
+      if (!(var->dim = calloc(var->ndims, sizeof(NC_DIM_INFO_T *))))
+	 return NC_ENOMEM;
+      if (!(var->dimids = calloc(var->ndims, sizeof(int))))
+	 return NC_ENOMEM;
+   }
+
+   /* Learn about current chunk cache settings. */
+   if ((H5Pget_chunk_cache(access_pid, &(var->chunk_cache_nelems), 
+			   &(var->chunk_cache_size), &rdcc_w0)) < 0)
+      return NC_EHDFERR;
+   var->chunk_cache_preemption = rdcc_w0;
+
+   /* Allocate space for the name. */
+   if (!(var->name = malloc((strlen(obj_name) + 1) * sizeof(char))))
+      return NC_ENOMEM;
+
+   /* Check for a weird case: a non-coordinate (and non-scalar)
+    * variable that has the same name as a dimension. It's legal in
+    * netcdf, and requires that the HDF5 dataset name be changed. */
+   if (var->ndims && 
+       !strncmp(obj_name, NON_COORD_PREPEND, strlen(NON_COORD_PREPEND)))
+   {
+      if (strlen(obj_name) > NC_MAX_NAME)
+	 return NC_EMAXNAME;
+      strcpy(var->name, &obj_name[strlen(NON_COORD_PREPEND)]);
+   }
+   else
+      strcpy(var->name, obj_name);
+
+   /* Find out what filters are applied to this HDF5 dataset,
+    * fletcher32, deflate, and/or shuffle. All other filters are
+    * ignored. */
+   if ((propid = H5Dget_create_plist(datasetid)) < 0) 
+      BAIL(NC_EHDFERR);
+#ifdef EXTRA_TESTS
+   num_plists++;
+#endif /* EXTRA_TESTS */
+
+   /* Get the chunking info for non-scalar vars. */
+   if ((layout = H5Pget_layout(propid)) < -1)
+      BAIL(NC_EHDFERR);
+   if (layout == H5D_CHUNKED)
+   {
+      if (H5Pget_chunk(propid, NC_MAX_VAR_DIMS, chunksize) < 0)
+         BAIL(NC_EHDFERR);
+      if (!(var->chunksizes = malloc(var->ndims * sizeof(size_t))))
+	 BAIL(NC_ENOMEM);
+      for (d = 0; d < var->ndims; d++)
+         var->chunksizes[d] = chunksize[d];
+   }
+   else if (layout == H5D_CONTIGUOUS)
+      var->contiguous++;
+
+   /* The possible values of filter (which is just an int) can be
+    * found in H5Zpublic.h. */
+   if ((num_filters = H5Pget_nfilters(propid)) < 0) 
+      BAIL(NC_EHDFERR);
+   for (f = 0; f < num_filters; f++)
+   {
+      if ((filter = H5Pget_filter2(propid, f, NULL, &cd_nelems, 
+                                   cd_values, 0, NULL, NULL)) < 0)
+         BAIL(NC_EHDFERR);
+      switch (filter)
+      {
+         case H5Z_FILTER_SHUFFLE:
+            var->shuffle = 1;
+            break;
+         case H5Z_FILTER_FLETCHER32:
+            var->fletcher32 = 1;
+            break;
+         case H5Z_FILTER_DEFLATE:
+            var->deflate++;
+            if (cd_nelems != CD_NELEMS_ZLIB ||
+                cd_values[0] > MAX_DEFLATE_LEVEL)
+               BAIL(NC_EHDFERR);
+            var->deflate_level = cd_values[0];
+            break;
+         case H5Z_FILTER_SZIP:
+            var->deflate++;
+            if (cd_nelems != CD_NELEMS_SZIP)
+               BAIL(NC_EHDFERR);
+	    var->options_mask = cd_values[0];
+            var->pixels_per_block = cd_values[1];
+            break;
+         default:
+            LOG((1, "Yikes! Unknown filter type found on dataset!"));
+            break;
+      }
+   }
+               
+   /* Learn all about the type of this variable. */
+   if ((retval = get_type_info2(grp->file->nc4_info, datasetid, 
+				&var->xtype, &var->type_info)))
+      BAIL(retval);
+
+   /* Is there a fill value associated with this dataset? */
+   if (H5Pfill_value_defined(propid, &fill_status) < 0)
+      BAIL(NC_EHDFERR);
+
+   /* Get the fill value, if there is one defined. */
+   if (fill_status == H5D_FILL_VALUE_USER_DEFINED)
+   {
+      /* Allocate space to hold the fill value. */
+      if (!var->fill_value)
+      {
+	 if (var->type_info->class == NC_VLEN)
+	 {
+	    if (!(var->fill_value = malloc(sizeof(nc_vlen_t))))
+	       BAIL(NC_ENOMEM);
+	 }
+	 else if (var->type_info->size)
+	 {
+	    if (!(var->fill_value = malloc(var->type_info->size)))
+	       BAIL(NC_ENOMEM);
+	 }
+	 else
+	 {
+	    if (!(var->fill_value = malloc(sizeof(char *))))
+	       BAIL(NC_ENOMEM);
+	 }
+      }
+      
+      /* Get the fill value from the HDF5 property lust. */
+      if (H5Pget_fill_value(propid, var->type_info->native_typeid, 
+			    var->fill_value) < 0)
+         BAIL(NC_EHDFERR);
+   }
+   else
+      var->no_fill = 1;
+
+   /* If it's a scale, mark it as such. If not, allocate space to
+    * remember whether the dimscale has been attached for each
+    * dimension. */
+   if (is_scale)
+   {
+      assert(ndims);
+      var->dimscale++;
+      if (var->ndims > 1)
+      {
+	 if ((retval = read_coord_dimids(var)))
+	    BAIL(retval);
+      }
+      else
+      {
+         var->dimids[0] = grp->dim->dimid;
+	 var->dim[0] = grp->dim;
+      }
+   }
+   else
+      if (num_scales && ndims && 
+	  !(var->dimscale_attached = calloc(ndims, sizeof(int))))
+         BAIL(NC_ENOMEM);       
+       
+   /* If this is not a scale, and has scales, iterate
+    * through them. (i.e. this is a variable that is not a
+    * coordinate variable) */
+   if (!is_scale && num_scales)
+   {
+      /* Store id information allowing us to match hdf5
+       * dimscales to netcdf dimensions. */
+      if (!(var->dimscale_hdf5_objids = malloc(ndims * sizeof(struct hdf5_objid))))
+         BAIL(NC_ENOMEM);
+      for (d = 0; d < var->ndims; d++)
+      {
+         LOG((5, "read_var: about to iterate over scales for dim %d", d));
+         if (H5DSiterate_scales(var->hdf_datasetid, d, NULL, dimscale_visitor,
+                                &(var->dimscale_hdf5_objids[d])) < 0)
+            BAIL(NC_EHDFERR);
+/*       LOG((5, "read_var: collected scale info for dim %d "
+         "var %s fileno[0] %d objno[0] %d fileno[1] %d objno[1] %d", 
+         d, var->name, var->dimscale_hdf5_objids[d].fileno[0], 
+         var->dimscale_hdf5_objids[d].objno[0], 
+         var->dimscale_hdf5_objids[d].fileno[1], 
+         var->dimscale_hdf5_objids[d].objno[1]));*/
+         var->dimscale_attached[d]++;
+      }
+   }
+        
+   /* Now read all the attributes of this variable, ignoring the
+      ones that hold HDF5 dimension scale information. */
+   if ((natts = H5Aget_num_attrs(var->hdf_datasetid)) < 0)
+      BAIL(NC_EATTMETA);
+   for (a = 0; a < natts; a++)
+   {
+      /* Close the attribute and try to move on with our
+       * lives. Like bits through the network port, so
+       * flows the Days of Our Lives! */
+      if (attid && H5Aclose(attid) < 0)
+         BAIL(NC_EHDFERR);
+
+      /* Open the att and get its name. */
+      if ((attid = H5Aopen_idx(var->hdf_datasetid, (unsigned int)a)) < 0)
+         BAIL(NC_EATTMETA);
+      if (H5Aget_name(attid, NC_MAX_HDF5_NAME, att_name) < 0)
+         BAIL(NC_EATTMETA);
+      LOG((4, "read_var: a %d att_name %s", a, att_name));
+
+      /* Should we ignore this attribute? */    
+      if (strcmp(att_name, REFERENCE_LIST) &&
+	  strcmp(att_name, CLASS) &&
+	  strcmp(att_name, DIMENSION_LIST) &&
+	  strcmp(att_name, NAME) &&
+	  strcmp(att_name, COORDINATES))
+      {
+	 /* Is this the hidden attribute that holds the netCDF
+	  * dimension id for a coordinate variable? */
+	 if (!strcmp(att_name, NC_DIMID_ATT_NAME))
+	 {
+	    
+	 }
+	 else
+	 {
+	    /* Add to the end of the list of atts for this var. */
+	    if ((retval = nc4_att_list_add(&var->att)))
+	       BAIL(retval);
+	    for (att = var->att; att->next; att = att->next)
+	       ;
+	    
+	    /* Fill in the information we know. */
+	    att->attnum = var->natts++;
+	    if (!(att->name = malloc((strlen(att_name) + 1) * sizeof(char))))
+	       BAIL(NC_ENOMEM);
+	    strcpy(att->name, att_name);
+	    
+	    /* Read the rest of the info about the att,
+	     * including its values. */
+	    if ((retval = read_hdf5_att(grp, attid, att)))
+	       BAIL(retval);
+	    
+	    att->created++;
+	 } /* endif not HDF5 att */
+      }
+   } /* next attribute */
+
+   /* Is this a deflated variable with a chunksize greater than the
+    * current cache size? */
+   if ((retval = nc4_adjust_var_cache(grp, var)))
+      BAIL(retval);
+
+  exit:
+   if (propid > 0 && H5Pclose(propid) < 0)
+      BAIL2(NC_EHDFERR);
+#ifdef EXTRA_TESTS
+   num_plists--;
+#endif
+   if (attid > 0 && H5Aclose(attid) < 0)
+      BAIL2(NC_EHDFERR);
+   return retval;
+}
+
+/* This function is called by nc4_rec_read_metadata to read all the
+ * group level attributes (the NC_GLOBAL atts for this group). */
+static int
+read_grp_atts(NC_GRP_INFO_T *grp)
+{
+   hid_t attid = 0;
+   hsize_t num_obj, i;
+   NC_ATT_INFO_T *att;
+   NC_TYPE_INFO_T *type;
+   char obj_name[NC_MAX_HDF5_NAME + 1];
+   int max_len;
+   int retval = NC_NOERR;
+
+   num_obj = H5Aget_num_attrs(grp->hdf_grpid);
+   for (i = 0; i < num_obj; i++)
+   {
+      if (attid > 0) 
+         H5Aclose(attid);
+      if ((attid = H5Aopen_idx(grp->hdf_grpid, (unsigned int)i)) < 0)
+         BAIL(NC_EATTMETA);
+      if (H5Aget_name(attid, NC_MAX_NAME + 1, obj_name) < 0)
+         BAIL(NC_EATTMETA);
+      LOG((3, "reading attribute of _netCDF group, named %s", obj_name));
+
+      /* This may be an attribute telling us that strict netcdf-3
+       * rules are in effect. If so, we will make note of the fact,
+       * but not add this attribute to the metadata. It's not a user
+       * attribute, but an internal netcdf-4 one. */
+      if (!strcmp(obj_name, NC3_STRICT_ATT_NAME))
+         grp->file->nc4_info->cmode |= NC_CLASSIC_MODEL;
+      else
+      {
+         /* Add an att struct at the end of the list, and then go to it. */
+         if ((retval = nc4_att_list_add(&grp->att)))
+            BAIL(retval);
+         for (att = grp->att; att->next; att = att->next)
+            ;
+
+	 /* Add the info about this attribute. */
+	 max_len = strlen(obj_name) > NC_MAX_NAME ? NC_MAX_NAME : strlen(obj_name);
+	 if (!(att->name = malloc((max_len + 1) * sizeof(char))))
+	    BAIL(NC_ENOMEM);
+         strncpy(att->name, obj_name, max_len);
+         att->name[max_len] = 0;
+         att->attnum = grp->natts++;
+         if ((retval = read_hdf5_att(grp, attid, att)))
+            BAIL(retval);
+         att->created++;
+         if ((retval = nc4_find_type(grp->file->nc4_info, att->xtype, &type)))
+            BAIL(retval);
+         if (type)
+            att->class = type->class;
+      }
+   }
+
+  exit:
+   if (attid > 0 && H5Aclose(attid) < 0)
+      BAIL2(NC_EHDFERR);
+   return retval;
+}
+
+/* This function is called when nc4_rec_read_vars encounters an HDF5
+ * dataset when reading a file. */
+static int
+read_dataset(NC_GRP_INFO_T *grp, char *obj_name)
+{
+   hid_t datasetid = 0;   
+   hid_t spaceid = 0, access_pid = 0;
+   int ndims;
+   hsize_t dims[NC_MAX_DIMS], max_dims[NC_MAX_DIMS];
+   int is_scale = 0;
+   int dim_without_var = 0;
+   int num_scales = 0;            
+   int retval = NC_NOERR;
+
+   /* Open this dataset. */
+   if ((datasetid = H5Dopen2(grp->hdf_grpid, obj_name, H5P_DEFAULT)) < 0)
+      BAIL(NC_EVARMETA);
+
+   /* Get the current chunk cache settings. */
+   if ((access_pid = H5Dget_access_plist(datasetid)) < 0)
+      BAIL(NC_EVARMETA);
+#ifdef EXTRA_TESTS
+   num_plists++;
+#endif
+
+   /* Get the dimension information for this dataset. */
+   if ((spaceid = H5Dget_space(datasetid)) < 0)
+      BAIL(NC_EHDFERR);
+#ifdef EXTRA_TESTS
+   num_spaces++;
+#endif
+   if ((ndims = H5Sget_simple_extent_ndims(spaceid)) < 0)
+      BAIL(NC_EHDFERR);
+   if (ndims > NC_MAX_DIMS)
+      BAIL(NC_EMAXDIMS);
+   if (H5Sget_simple_extent_dims(spaceid, dims, max_dims) < 0)
+      BAIL(NC_EHDFERR);
+
+   /* Is this a dimscale? */
+   if ((is_scale = H5DSis_scale(datasetid)) < 0)
+      BAIL(NC_EHDFERR);
+   if (is_scale)
+   {
+      /* Read the scale information. */
+      if ((retval = read_scale(grp, datasetid, obj_name, dims[0],
+                               max_dims[0], &dim_without_var)))
+         BAIL(retval);
+   }
+   else
+   {
+      /* Find out how many scales are attached to this
+       * dataset. H5DSget_num_scales returns an error if there are no
+       * scales, so convert a negative return value to zero. */
+      num_scales = H5DSget_num_scales(datasetid, 0);
+      if (num_scales < 0)
+         num_scales = 0;
+   }
+
+   /* Add a var to the linked list, and get its metadata,
+    * unless this is one of those funny dimscales that are a
+    * dimension in netCDF but not a variable. (Spooky!) */
+   if (!dim_without_var)
+      if ((retval = read_var(grp, datasetid, obj_name, ndims,
+                             is_scale, num_scales, access_pid)))
+	 BAIL(retval);
+   
+   if (access_pid && H5Pclose(access_pid) < 0)
+      BAIL2(retval);
+#ifdef EXTRA_TESTS
+   num_plists--;
+#endif
+   if (spaceid && H5Sclose(spaceid) < 0)
+      BAIL2(retval);
+#ifdef EXTRA_TESTS
+   num_spaces--;
+#endif
+   return NC_NOERR;
+
+  exit:
+   if (access_pid && H5Pclose(access_pid) < 0)
+      BAIL2(retval);
+#ifdef EXTRA_TESTS
+   num_plists--;
+#endif
+   if (datasetid && H5Dclose(datasetid) < 0)
+      BAIL2(retval);
+   if (spaceid && H5Sclose(spaceid) <0)
+      BAIL2(retval);
+#ifdef EXTRA_TESTS
+   num_spaces--;
+#endif
+   return retval;
+}
+
+/* Given index, get the HDF5 name of an object and the class of the
+ * object (group, type, dataset, etc.). This function will try to use
+ * creation ordering, but if that fails it will use default
+ * (i.e. alphabetical) ordering. (This is necessary to read existing
+ * HDF5 archives without creation ordering). */
+/* static int */
+/* get_name_by_idx(NC_HDF5_FILE_INFO_T *h5, hid_t hdf_grpid, int i, */
+/* 		int *obj_class, char *obj_name) */
+/* { */
+/*    H5O_info_t obj_info; */
+/*    H5_index_t idx_field = H5_INDEX_CRT_ORDER; */
+/*    ssize_t size; */
+/*    herr_t res; */
+
+/*    /\* These HDF5 macros prevent an HDF5 error message when a */
+/*     * non-creation-ordered HDF5 file is opened. *\/ */
+/*    H5E_BEGIN_TRY { */
+/*       res = H5Oget_info_by_idx(hdf_grpid, ".", H5_INDEX_CRT_ORDER, H5_ITER_INC, */
+/* 			       i, &obj_info, H5P_DEFAULT); */
+/*    } H5E_END_TRY; */
+   
+/*    /\* Creation ordering not available, so make sure this file is */
+/*     * opened for read-only access. This is a plain old HDF5 file being */
+/*     * read by netCDF-4. *\/ */
+/*    if (res < 0) */
+/*    { */
+/*       if (H5Oget_info_by_idx(hdf_grpid, ".", H5_INDEX_NAME, H5_ITER_INC, */
+/* 			     i, &obj_info, H5P_DEFAULT) < 0) */
+/* 	 return NC_EHDFERR; */
+/*       if (!h5->no_write) */
+/* 	 return NC_ECANTWRITE; */
+/*       h5->ignore_creationorder = 1; */
+/*       idx_field = H5_INDEX_NAME; */
+/*    } */
+
+/*    *obj_class = obj_info.type; */
+/*    if ((size = H5Lget_name_by_idx(hdf_grpid, ".", idx_field, H5_ITER_INC, i, */
+/* 				  NULL, 0, H5P_DEFAULT)) < 0) */
+/*       return NC_EHDFERR; */
+/*    if (size > NC_MAX_NAME) */
+/*       return NC_EMAXNAME; */
+/*    if (H5Lget_name_by_idx(hdf_grpid, ".", idx_field, H5_ITER_INC, i, */
+/* 			  obj_name, size+1, H5P_DEFAULT) < 0) */
+/*       return NC_EHDFERR; */
+
+/*    LOG((4, "get_name_by_idx: encountered HDF5 object obj_name %s", obj_name)); */
+
+/*    return NC_NOERR; */
+/* } */
+
+#define USE_ITERATE_CODE
+#ifdef  USE_ITERATE_CODE
+
+static int
+nc4_rec_read_types_cb(hid_t grpid, const char *name, const H5L_info_t *info,
+		      void *_op_data)
+{
+    hid_t oid=-1;
+    H5I_type_t otype=-1;
+    char oname[NC_MAX_NAME + 1];
+    NC_GRP_INFO_T *child_grp;
+    NC_GRP_INFO_T *grp = (NC_GRP_INFO_T *) (_op_data);
+    NC_HDF5_FILE_INFO_T *h5 = grp->file->nc4_info;
+
+    /* Open this critter. */
+    if ((oid = H5Oopen(grpid, name, H5P_DEFAULT)) < 0) 
+        return H5_ITER_ERROR;
+	  
+    if ((otype = H5Iget_type( oid ))<0) {
+	H5Oclose(oid);
+	return H5_ITER_ERROR;
+    }
+    H5Oclose(oid);
+	
+    strncpy(oname, name, NC_MAX_NAME);
+	   
+    /* Deal with groups and types; ignore the rest. */
+    if (otype == H5I_GROUP)
+    {
+	LOG((3, "found group %s", oname));
+	if (nc4_grp_list_add(&(grp->children), h5->next_nc_grpid++, 
+			     grp, grp->file, oname, &child_grp))
+	    return H5_ITER_ERROR;
+			
+	if (nc4_rec_read_types(child_grp))
+	    return H5_ITER_ERROR;
+    }
+    else if (otype == H5I_DATATYPE)
+    {
+	LOG((3, "found datatype %s", oname));
+	if (read_type(grp, oname))
+	    return H5_ITER_ERROR;
+    }
+	  
+    return (H5_ITER_CONT);
+}
+
+static int
+nc4_rec_read_types(NC_GRP_INFO_T *grp)
+{
+    hsize_t idx=0;
+    int res = 0;
+    hid_t pid = 0;
+    unsigned crt_order_flags = 0;
+    NC_HDF5_FILE_INFO_T *h5 = grp->file->nc4_info;
+
+    assert(grp && grp->name);
+    LOG((3, "nc4_rec_read_types: grp->name %s", grp->name));
+
+    /* Open this HDF5 group and retain its grpid. It will remain open
+     * with HDF5 until this file is nc_closed. */
+    if (!grp->hdf_grpid)
+    {
+        if (grp->parent)
+        {
+          if ((grp->hdf_grpid = H5Gopen2(grp->parent->hdf_grpid, 
+					grp->name, H5P_DEFAULT)) < 0)
+            return NC_EHDFERR;
+        }
+        else
+        {
+	    if ((grp->hdf_grpid = H5Gopen2(grp->file->nc4_info->hdfid, 
+					   "/", H5P_DEFAULT)) < 0)
+		return NC_EHDFERR;
+        }
+    }
+    assert(grp->hdf_grpid > 0);
+
+    pid = H5Gget_create_plist(grp->hdf_grpid);
+    H5Pget_link_creation_order(pid, &crt_order_flags); 
+    H5Pclose(pid);
+    
+    crt_order_flags = crt_order_flags & H5_INDEX_CRT_ORDER;
+	
+    if (crt_order_flags == H5_INDEX_CRT_ORDER)
+    {
+	res = H5Literate(grp->hdf_grpid, H5_INDEX_CRT_ORDER, H5_ITER_INC, 
+			 &idx, nc4_rec_read_types_cb, (void *)grp);
+    } else
+    {
+	/* Without creation ordering, file must be read-only. */
+	if (!idx && !h5->no_write)
+	    return NC_ECANTWRITE;
+	 
+	res = H5Literate(grp->hdf_grpid, H5_INDEX_NAME, H5_ITER_INC, 
+			 &idx, nc4_rec_read_types_cb, (void *)grp);
+    }
+    if (res<0)
+	return NC_EHDFERR;
+    return NC_NOERR; /* everything worked! */
+}
+
+static int
+nc4_rec_read_vars_cb(hid_t grpid, const char *name, const H5L_info_t *info,
+		     void *_op_data)
+{
+    hid_t oid=-1;
+    H5I_type_t otype=-1;
+    char oname[NC_MAX_NAME + 1];
+    NC_GRP_INFO_T *child_grp;
+    NC_GRP_INFO_T *grp = (NC_GRP_INFO_T *) (_op_data);
+#if 0
+    NC_HDF5_FILE_INFO_T *h5 = grp->file->nc4_info;
+#endif
+
+    memset(oname, 0, NC_MAX_NAME);
+    /* Open this critter. */
+    if ((oid = H5Oopen(grpid, name, H5P_DEFAULT)) < 0) 
+        return H5_ITER_ERROR;
+	  
+    if ((otype = H5Iget_type( oid ))<0) {
+	H5Oclose(oid);
+	return H5_ITER_ERROR;
+    }
+    H5Oclose(oid);
+	
+    strncpy(oname, name, NC_MAX_NAME);
+	
+    /* Deal with datasets. */
+    switch(otype)
+    {
+    case H5I_GROUP:
+	LOG((3, "re-encountering group %s", oname));
+	
+	/* The NC_GROUP_INFO_T for this group already exists. Find it. */
+	for (child_grp = grp->children; child_grp; child_grp = child_grp->next)
+	    if (!strcmp(child_grp->name, oname))
+		break;
+	if (!child_grp)
+	    return H5_ITER_ERROR;
+
+	/* Recursively read the child group's vars. */
+	if (nc4_rec_read_vars(child_grp))
+	    return H5_ITER_ERROR;
+	break;
+    case H5I_DATASET:
+	LOG((3, "found dataset %s", oname));
+
+	/* Learn all about this dataset, which may be a dimscale
+	 * (i.e. dimension metadata), or real data. */
+	if (read_dataset(grp, oname))
+	    return H5_ITER_ERROR;
+	break;
+    case H5I_DATATYPE:
+	LOG((3, "already handled type %s", oname));
+	break;
+    default:
+	LOG((0, "Unknown object class %d in nc4_rec_read_vars!", otype));
+    }
+    return (H5_ITER_CONT);
+}
+
+static int
+nc4_rec_read_vars(NC_GRP_INFO_T *grp)
+{
+    hsize_t idx = 0;
+    int retval = NC_NOERR;
+    int res = 0;
+    hid_t pid = 0;
+    unsigned crt_order_flags = 0;
+    NC_HDF5_FILE_INFO_T *h5 = grp->file->nc4_info;
+    
+    assert(grp && grp->name && grp->hdf_grpid > 0);
+    LOG((3, "nc4_rec_read_vars: grp->name %s", grp->name));
+
+    pid = H5Gget_create_plist(grp->hdf_grpid);
+    H5Pget_link_creation_order(pid, &crt_order_flags); 
+    H5Pclose(pid);
+    
+    crt_order_flags = crt_order_flags & H5_INDEX_CRT_ORDER;
+
+    if (crt_order_flags == H5_INDEX_CRT_ORDER)
+    {
+	res = H5Literate(grp->hdf_grpid, H5_INDEX_CRT_ORDER, H5_ITER_INC, 
+			 &idx, nc4_rec_read_vars_cb, (void *)grp);
+    } else
+    {
+	/* Without creation ordering, file must be read-only. */
+	if (!idx && !h5->no_write)
+	    return NC_ECANTWRITE;
+	 
+	res = H5Literate(grp->hdf_grpid, H5_INDEX_NAME, H5_ITER_INC, 
+			 &idx, nc4_rec_read_vars_cb, (void *)grp);
+    }
+    if (res<0)
+	return NC_EHDFERR;
+   
+    /* Scan the group for global (i.e. group-level) attributes. */
+    if ((retval = read_grp_atts(grp)))
+	return retval;
+    
+    return NC_NOERR; /* everything worked! */
+}
+
+#else
+
+/** \internal 
+This struct is used to pass information back from the callback
+function used with H5Literate. 
+*/
+struct nc_hdf5_link_info 
+{
+   char name[NC_MAX_NAME + 1];
+   H5I_type_t obj_type;   
+};   
+
+/* This is a callback function for H5Literate(). 
+
+The parameters of this callback function have the following values or
+meanings:
+
+g_id Group that serves as root of the iteration; same value as the
+H5Lvisit group_id parameter
+
+name Name of link, relative to g_id, being examined at current step of
+the iteration
+
+info H5L_info_t struct containing information regarding that link
+
+op_data User-defined pointer to data required by the application in
+processing the link; a pass-through of the op_data pointer provided
+with the H5Lvisit function call
+
+*/
+static herr_t
+visit_link(hid_t g_id, const char *name, const H5L_info_t *info, 
+	   void *op_data)  
+{
+   /* A positive return value causes the visit iterator to immediately
+    * return that positive value, indicating short-circuit
+    * success. The iterator can be restarted at the next group
+    * member. */
+   int ret = 1;
+   hid_t id;
+
+   /* Get the name, truncating at NC_MAX_NAME. */
+   strncpy(((struct nc_hdf5_link_info *)op_data)->name, name, 
+	   NC_MAX_NAME);
+   
+   /* Open this critter. */
+   if ((id = H5Oopen_by_addr(g_id, info->u.address)) < 0) 
+      return NC_EHDFERR;
+   
+   /* Is this critter a group, type, data, attribute, or what? */
+   if ((((struct nc_hdf5_link_info *)op_data)->obj_type = H5Iget_type(id)) < 0)
+      ret = NC_EHDFERR;
+
+   /* Close the critter to release resouces. */
+   if (H5Oclose(id) < 0)
+      return NC_EHDFERR;
+   
+   return ret;
+}
+
+/* Iterate over one link in the group at a time, returning
+ * link_info. The creation_ordering and idx pointers keep track of
+ * whether creation ordering works and the most recently examined
+ * link. */
+static int
+nc4_iterate_link(int *ordering_checked, int *creation_ordering, 
+		 hid_t grpid, hsize_t *idx, struct nc_hdf5_link_info *link_info)
+{
+   int res = 0;
+
+   if (*creation_ordering)
+   {
+      /* These HDF5 macros prevent an HDF5 error message when a
+       * non-creation-ordered HDF5 file is opened. */
+      H5E_BEGIN_TRY {
+	 res = H5Literate(grpid, H5_INDEX_CRT_ORDER, H5_ITER_INC, 
+			  idx, visit_link, (void *)link_info);
+	 if (res < 0 && *ordering_checked)
+	    return NC_EHDFERR;
+      } H5E_END_TRY;
+   }
+
+   if (!*creation_ordering || res < 0)
+   {
+      if (H5Literate(grpid, H5_INDEX_NAME, H5_ITER_INC, idx, 
+		     visit_link, link_info) != 1)
+	 return NC_EHDFERR;
+      /* If it didn't work with creation ordering, but did without,
+       * then we don't have creation ordering. */
+      *creation_ordering = 0;
+   }
+   
+   *ordering_checked = 1;
+   return NC_NOERR;
+}
+
+/* Recursively open groups and read types. */
+int
+nc4_rec_read_types(NC_GRP_INFO_T *grp)
+{
+   hsize_t num_obj, i;
+   NC_HDF5_FILE_INFO_T *h5 = grp->file->nc4_info;
+   NC_GRP_INFO_T *child_grp;
+   hsize_t idx = 0;
+   struct nc_hdf5_link_info link_info;
+   int ordering_checked = 0;
+   int creation_ordering = 1; /* Assume we have it. */
+   int retval = NC_NOERR;
+
+   assert(grp && grp->name);
+   LOG((3, "nc4_rec_read_types: grp->name %s", grp->name));
+
+   /* Open this HDF5 group and retain its grpid. It will remain open
+    * with HDF5 until this file is nc_closed. */
+   if (!grp->hdf_grpid)
+   {
+      if (grp->parent)
+      {
+         if ((grp->hdf_grpid = H5Gopen2(grp->parent->hdf_grpid, 
+					grp->name, H5P_DEFAULT)) < 0)
+            return NC_EHDFERR;
+      }
+      else
+      {
+         if ((grp->hdf_grpid = H5Gopen2(grp->file->nc4_info->hdfid, 
+					"/", H5P_DEFAULT)) < 0)
+            return NC_EHDFERR;
+      }
+   }
+   assert(grp->hdf_grpid > 0);
+
+   /* How many objects in this group? */
+   if (H5Gget_num_objs(grp->hdf_grpid, &num_obj) < 0)
+      return NC_EVARMETA;
+
+   /* For each object in the group... */
+   for (i = 0; i < num_obj; i++)
+   {
+      if ((retval = nc4_iterate_link(&ordering_checked, &creation_ordering, 
+				     grp->hdf_grpid, &idx, &link_info)))
+	 return retval;
+
+      /* Without creation ordering, file must be read-only. */
+      if (!i && !creation_ordering && !h5->no_write)
+	 return NC_ECANTWRITE;
+
+      /* Deal with groups and types; ignore the rest. */
+      if (link_info.obj_type == H5I_GROUP)
+      {
+	 LOG((3, "found group %s", link_info.name));
+	 if ((retval = nc4_grp_list_add(&(grp->children), h5->next_nc_grpid++, 
+					grp, grp->file, link_info.name, &child_grp)))
+	    return retval;
+	 if ((retval =  nc4_rec_read_types(child_grp)))
+	    return retval;
+      }
+      else if (link_info.obj_type == H5I_DATATYPE)
+      {
+	 LOG((3, "found datatype %s", link_info.name));
+	 if ((retval = read_type(grp, link_info.name)))
+	    return retval;
+      }
+   }
+
+   return NC_NOERR; /* everything worked! */
+}
+
+/* This function recursively reads all the var and attribute metadata
+   in a HDF5 group, and creates and fills in the netCDF-4 global
+   metadata structure. */
+int
+nc4_rec_read_vars(NC_GRP_INFO_T *grp)
+{
+   hsize_t num_obj, i;
+   NC_GRP_INFO_T *child_grp;
+   struct nc_hdf5_link_info link_info;
+   hsize_t idx = 0;
+   int ordering_checked = 0;
+   int creation_ordering = 1; /* Assume we have it. */
+   int retval = NC_NOERR;
+
+   assert(grp && grp->name && grp->hdf_grpid > 0);
+   LOG((3, "nc4_rec_read_vars: grp->name %s", grp->name));
+
+   /* How many objects in this group? */
+   if (H5Gget_num_objs(grp->hdf_grpid, &num_obj) < 0)
+      return NC_EVARMETA;
+
+   /* For each object in the group... */
+   for (i = 0; i < num_obj; i++)
+   {
+      if ((retval = nc4_iterate_link(&ordering_checked, &creation_ordering, 
+				     grp->hdf_grpid, &idx, &link_info)))
+	 return retval;
+      
+      /* Deal with datasets. */
+      switch(link_info.obj_type)
+      {
+         case H5I_GROUP:
+	    LOG((3, "re-encountering group %s", link_info.name));
+
+	    /* The NC_GROUP_INFO_T for this group already exists. Find it. */
+	    for (child_grp = grp->children; child_grp; child_grp = child_grp->next)
+	       if (!strcmp(child_grp->name, link_info.name))
+		  break;
+	    if (!child_grp)
+	       return NC_EHDFERR;
+
+            /* Recursively read the child group's vars. */
+            if ((retval =  nc4_rec_read_vars(child_grp)))
+               return retval;
+            break;
+         case H5I_DATASET:
+	    LOG((3, "found dataset %s", link_info.name));
+
+            /* Learn all about this dataset, which may be a dimscale
+             * (i.e. dimension metadata), or real data. */
+            if ((retval = read_dataset(grp, link_info.name)))
+	       return retval;
+            break;
+         case H5I_DATATYPE:
+	    LOG((3, "already handled type %s", link_info.name));
+            break;
+         default:
+            LOG((0, "Unknown object class %d in nc4_rec_read_vars!", 
+                 link_info.obj_type));
+      }
+   }
+
+   /* Scan the group for global (i.e. group-level) attributes. */
+   if ((retval = read_grp_atts(grp)))
+      return retval;
+
+   return NC_NOERR; /* everything worked! */
+}
+#endif
+
+/* Open a netcdf-4 file. Things have already been kicked off in
+ * ncfunc.c in nc_open, but here the netCDF-4 part of opening a file
+ * is handled. */
+static int
+nc4_open_file(const char *path, int mode, MPI_Comm comm,
+	      MPI_Info info, NC_FILE_INFO_T *nc)
+{
+   hid_t fapl_id = H5P_DEFAULT;
+   unsigned flags = (mode & NC_WRITE) ? 
+      H5F_ACC_RDWR : H5F_ACC_RDONLY;
+   int retval;
+
+   LOG((3, "nc4_open_file: path %s mode %d", path, mode));
+   assert(path && nc);
+
+   /* Stop diskless open in its tracks */
+   if(mode & NC_DISKLESS)
+	return NC_EDISKLESS;
+
+   /* Add necessary structs to hold netcdf-4 file data. */
+   if ((retval = nc4_nc4f_list_add(nc, path, mode)))
+      BAIL(retval);
+   assert(nc->nc4_info && nc->nc4_info->root_grp);
+   
+   /* Need this access plist to control how HDF5 handles open onjects
+    * on file close. (Setting H5F_CLOSE_SEMI will cause H5Fclose to
+    * fail if there are any open objects in the file. */
+   if ((fapl_id = H5Pcreate(H5P_FILE_ACCESS)) < 0)
+      BAIL(NC_EHDFERR);
+#ifdef EXTRA_TESTS
+   num_plists++;
+#endif      
+#ifdef EXTRA_TESTS
+   if (H5Pset_fclose_degree(fapl_id, H5F_CLOSE_SEMI)) 
+      BAIL(NC_EHDFERR);
+#else
+   if (H5Pset_fclose_degree(fapl_id, H5F_CLOSE_STRONG))
+      BAIL(NC_EHDFERR);
+#endif
+
+#ifdef USE_PARALLEL
+   /* If this is a parallel file create, set up the file creation
+      property list. */
+   if (mode & NC_MPIIO || mode & NC_MPIPOSIX)
+   {
+      nc->nc4_info->parallel++;
+      if (mode & NC_MPIIO)  /* MPI/IO */
+      {
+	 LOG((4, "opening parallel file with MPI/IO"));
+	 if (H5Pset_fapl_mpio(fapl_id, comm, info) < 0)
+	    BAIL(NC_EPARINIT);
+      }
+      else /* MPI/POSIX */
+      {
+	 LOG((4, "opening parallel file with MPI/posix"));
+	 if (H5Pset_fapl_mpiposix(fapl_id, comm, 0) < 0)
+	    BAIL(NC_EPARINIT);
+      }
+   }
+#else /* only set cache for non-parallel. */
+   if (H5Pset_cache(fapl_id, 0, nc4_chunk_cache_nelems, nc4_chunk_cache_size, 
+		    nc4_chunk_cache_preemption) < 0)
+      BAIL(NC_EHDFERR);
+   LOG((4, "nc4_open_file: set HDF raw chunk cache to size %d nelems %d preemption %f", 
+	nc4_chunk_cache_size, nc4_chunk_cache_nelems, nc4_chunk_cache_preemption));
+#endif /* USE_PARALLEL */
+   
+   /* The NetCDF-3.x prototype contains an mode option NC_SHARE for
+      multiple processes accessing the dataset concurrently.  As there
+      is no HDF5 equivalent, NC_SHARE is treated as NC_NOWRITE. */
+   if ((nc->nc4_info->hdfid = H5Fopen(path, flags, fapl_id)) < 0)
+      BAIL(NC_EHDFERR);
+
+   /* Does the mode specify that this file is read-only? */
+   if ((mode & NC_WRITE) == 0)
+      nc->nc4_info->no_write++;
+
+   /* Now read in all the metadata. Some types and dimscale
+    * information may be difficult to resolve here, if, for example, a
+    * dataset of user-defined type is encountered before the
+    * definition of that type. */
+   if ((retval = nc4_rec_read_types(nc->nc4_info->root_grp)))
+      BAIL(retval);
+   if ((retval = nc4_rec_read_vars(nc->nc4_info->root_grp)))
+      BAIL(retval);
+
+   /* Now figure out which netCDF dims are indicated by the dimscale
+    * information. */
+   if ((retval = nc4_rec_match_dimscales(nc->nc4_info->root_grp)))
+      BAIL(retval);
+
+#ifdef LOGGING
+   /* This will print out the names, types, lens, etc of the vars and
+      atts in the file, if the logging level is 2 or greater. */ 
+   log_metadata_nc(nc);
+#endif
+
+   /* Close the property list. */ 
+   if (H5Pclose(fapl_id) < 0)
+      BAIL(NC_EHDFERR);
+#ifdef EXTRA_TESTS
+   num_plists--;
+#endif
+
+   return NC_NOERR;
+
+  exit:
+   if (fapl_id != H5P_DEFAULT) H5Pclose(fapl_id);
+#ifdef EXTRA_TESTS
+   num_plists--;
+#endif
+   if (nc->nc4_info->hdfid > 0) H5Fclose(nc->nc4_info->hdfid);
+   if (nc->nc4_info) free(nc->nc4_info);
+   return retval;
+}
+
+/* Given an HDF4 type, set a pointer to netcdf type. */
+#ifdef USE_HDF4   
+static int
+get_netcdf_type_from_hdf4(NC_HDF5_FILE_INFO_T *h5, int32 hdf4_typeid, 
+			  nc_type *xtype, NC_TYPE_INFO_T *type_info)
+{
+   int t;
+   assert(h5 && xtype);
+
+   switch(hdf4_typeid)
+   {
+      case DFNT_CHAR:
+	 *xtype = NC_CHAR;
+	 t = 0;
+	 break;
+      case DFNT_UCHAR:
+      case DFNT_UINT8:
+	 *xtype = NC_UBYTE;
+	 t = 6;
+	 break;
+      case DFNT_INT8:
+	 *xtype = NC_BYTE;
+	 t = 1;
+	 break;
+      case DFNT_INT16:
+	 *xtype = NC_SHORT;
+	 t = 2;
+	 break;
+      case DFNT_UINT16:
+	 *xtype = NC_USHORT;
+	 t = 7;
+	 break;
+      case DFNT_INT32:
+	 *xtype = NC_INT;
+	 t = 3;
+	 break;
+      case DFNT_UINT32:
+	 *xtype = NC_UINT;
+	 t = 8;
+	 break;
+      case DFNT_FLOAT32:
+	 *xtype = NC_FLOAT;
+	 t = 4;
+	 break;
+      case DFNT_FLOAT64:
+	 *xtype = NC_DOUBLE;
+	 t = 5;
+	 break;
+      default:
+	 *xtype = NC_NAT;
+	 return NC_EBADTYPID;
+   }
+
+   if (type_info)
+   {
+      if (hdf4_typeid == DFNT_FLOAT32 || hdf4_typeid == DFNT_FLOAT64)
+	 type_info->class = H5T_FLOAT;
+      else if (hdf4_typeid == DFNT_CHAR)
+	 type_info->class = H5T_STRING;
+      else
+	 type_info->class = H5T_INTEGER;
+      type_info->endianness = NC_ENDIAN_BIG;
+      type_info->nc_typeid = *xtype;
+      if (type_info->name)
+	 free(type_info->name);
+      if (!(type_info->name = malloc((strlen(nc_type_name[t]) + 1) * sizeof(char))))
+	 return NC_ENOMEM;
+      strcpy(type_info->name, nc_type_name[t]);      
+   }
+
+   return NC_NOERR;
+}
+#endif /* USE_HDF4 */
+
+/* Open a HDF4 file. Things have already been kicked off in nc_open,
+ * but here the netCDF-4 part of opening a file is handled. */
+static int
+nc4_open_hdf4_file(const char *path, int mode, NC_FILE_INFO_T *nc)
+{
+#ifdef USE_HDF4
+   NC_HDF5_FILE_INFO_T *h5;
+   NC_GRP_INFO_T *grp;
+   NC_ATT_INFO_T *att;
+   NC_VAR_INFO_T *var;
+   int32 num_datasets, num_gatts;
+   int32 rank;
+   int v, d, a;
+   int retval;
+
+   LOG((3, "nc4_open_hdf4_file: path %s mode %d", path, mode));
+   assert(path && nc);
+
+   /* Must be read-only access to hdf4 files. */
+   if (mode & NC_WRITE)
+      return NC_EINVAL;
+
+   /* Add necessary structs to hold netcdf-4 file data. */
+   if ((retval = nc4_nc4f_list_add(nc, path, mode)))
+      return retval;
+   assert(nc->nc4_info && nc->nc4_info->root_grp);
+   h5 = nc->nc4_info;
+   h5->hdf4++;
+   grp = h5->root_grp;
+   h5->no_write++;
+
+   /* Open the file and initialize SD interface. */
+   if ((h5->sdid = SDstart(path, DFACC_READ)) == FAIL)
+      return NC_EHDFERR;
+
+   /* Learn how many datasets and global atts we have. */
+   if (SDfileinfo(h5->sdid, &num_datasets, &num_gatts))
+      return NC_EHDFERR;
+
+   /* Read the atts. */
+   for (a = 0; a < num_gatts; a++)
+   {
+      int32 att_data_type, att_count;
+      size_t att_type_size;
+
+      /* Add to the end of the list of atts for this var. */
+      if ((retval = nc4_att_list_add(&h5->root_grp->att)))
+	 return retval;
+      for (att = h5->root_grp->att; att->next; att = att->next)
+	 ;
+      att->attnum = grp->natts++;
+      att->created++;
+
+      /* Learn about this attribute. */
+      if (!(att->name = malloc(NC_MAX_HDF4_NAME * sizeof(char))))
+	 return NC_ENOMEM;
+      if (SDattrinfo(h5->sdid, a, att->name, &att_data_type, &att_count)) 
+	 return NC_EATTMETA;
+      if ((retval = get_netcdf_type_from_hdf4(h5, att_data_type, 
+					      &att->xtype, NULL)))
+	 return retval;
+      att->len = att_count;
+
+      /* Allocate memory to hold the data. */
+      if ((retval = nc4_get_typelen_mem(h5, att->xtype, 0, &att_type_size)))
+	 return retval;
+      if (!(att->data = malloc(att_type_size * att->len)))
+	 return NC_ENOMEM;
+
+      /* Read the data. */
+      if (SDreadattr(h5->sdid, a, att->data)) 
+	 return NC_EHDFERR;
+   }
+
+   /* Read each dataset. */
+   for (v = 0; v < num_datasets; v++)
+   {
+      int32 data_type, num_atts;
+      int32 dimsize[NC_MAX_DIMS];
+      size_t var_type_size;
+      int a;
+
+      /* Add a variable to the end of the group's var list. */
+      if ((retval = nc4_var_list_add(&grp->var, &var)))
+	 return retval;
+      var->varid = grp->nvars++;
+      var->created = 1;
+      var->written_to = 1;
+            
+      /* Open this dataset in HDF4 file. */
+      if ((var->sdsid = SDselect(h5->sdid, v)) == FAIL)
+	 return NC_EVARMETA;
+
+      /* Get shape, name, type, and attribute info about this dataset. */
+      if (!(var->name = malloc(NC_MAX_HDF4_NAME + 1)))
+	 return NC_ENOMEM;
+      if (SDgetinfo(var->sdsid, var->name, &rank, dimsize, &data_type, &num_atts))
+	 return NC_EVARMETA;
+      var->ndims = rank;
+      var->hdf4_data_type = data_type;
+
+      /* Fill special type_info struct for variable type information. */
+      if (!(var->type_info = calloc(1, sizeof(NC_TYPE_INFO_T))))
+	 return NC_ENOMEM;
+      if ((retval = get_netcdf_type_from_hdf4(h5, data_type, &var->xtype, var->type_info)))
+	 return retval;
+      if ((retval = nc4_get_typelen_mem(h5, var->xtype, 0, &var_type_size)))
+	 return retval;
+      var->type_info->size = var_type_size;
+      LOG((3, "reading HDF4 dataset %s, rank %d netCDF type %d", var->name, 
+	   rank, var->xtype));
+
+      /* Get the fill value. */
+      if (!(var->fill_value = malloc(var_type_size)))
+	 return NC_ENOMEM;
+      if (SDgetfillvalue(var->sdsid, var->fill_value))
+      {
+	 /* Whoops! No fill value! */
+	 free(var->fill_value);
+	 var->fill_value = NULL;
+      }
+
+      /* Allocate storage for dimension info in this variable. */
+      if (var->ndims)
+      {
+	 if (!(var->dim = malloc(sizeof(NC_DIM_INFO_T *) * var->ndims)))
+	    return NC_ENOMEM;
+	 if (!(var->dimids = malloc(sizeof(int) * var->ndims)))
+	    return NC_ENOMEM;
+      }
+
+      /* Find its dimensions. */
+      for (d = 0; d < var->ndims; d++)
+      {
+	 int32 dimid, dim_len, dim_data_type, dim_num_attrs;
+	 char dim_name[NC_MAX_NAME + 1];
+	 NC_DIM_INFO_T *dim;
+
+	 if ((dimid = SDgetdimid(var->sdsid, d)) == FAIL)
+	    return NC_EDIMMETA;
+	 if (SDdiminfo(dimid, dim_name, &dim_len, &dim_data_type, 
+		       &dim_num_attrs))
+	    return NC_EDIMMETA;
+
+	 /* Do we already have this dimension? HDF4 explicitly uses
+	  * the name to tell. */
+	 for (dim = grp->dim; dim; dim = dim->next)
+	    if (!strcmp(dim->name, dim_name))
+	       break;
+
+	 /* If we didn't find this dimension, add one. */
+	 if (!dim)
+	 {
+	    LOG((4, "adding dimension %s for HDF4 dataset %s", 
+		 dim_name, var->name));
+	    if ((retval = nc4_dim_list_add(&grp->dim)))
+	       return retval;
+	    grp->ndims++;
+	    dim = grp->dim;
+	    dim->dimid = grp->file->nc4_info->next_dimid++;
+	    if (strlen(dim_name) > NC_MAX_HDF4_NAME)
+	       return NC_EMAXNAME;
+	    if (!(dim->name = malloc(NC_MAX_HDF4_NAME + 1)))
+	       return NC_ENOMEM;
+	    strcpy(dim->name, dim_name);
+	    if (dim_len)
+	       dim->len = dim_len;
+	    else
+	       dim->len = *dimsize;
+	 }
+
+	 /* Tell the variable the id of this dimension. */
+	 var->dimids[d] = dim->dimid;
+      }
+
+      /* Read the atts. */
+      for (a = 0; a < num_atts; a++)
+      {
+	 int32 att_data_type, att_count;
+	 size_t att_type_size;
+
+	 /* Add to the end of the list of atts for this var. */
+         if ((retval = nc4_att_list_add(&var->att)))
+            return retval;
+         for (att = var->att; att->next; att = att->next)
+            ;
+	 att->attnum = var->natts++;
+	 att->created++;
+
+	 /* Learn about this attribute. */
+	 if (!(att->name = malloc(NC_MAX_HDF4_NAME * sizeof(char))))
+	    return NC_ENOMEM;
+	 if (SDattrinfo(var->sdsid, a, att->name, &att_data_type, &att_count)) 
+	    return NC_EATTMETA;
+	 if ((retval = get_netcdf_type_from_hdf4(h5, att_data_type, 
+						 &att->xtype, NULL)))
+	    return retval;
+	 att->len = att_count;
+
+	 /* Allocate memory to hold the data. */
+	 if ((retval = nc4_get_typelen_mem(h5, att->xtype, 0, &att_type_size)))
+	    return retval;
+	 if (!(att->data = malloc(att_type_size * att->len)))
+	    return NC_ENOMEM;
+
+	 /* Read the data. */
+	 if (SDreadattr(var->sdsid, a, att->data)) 
+	    return NC_EHDFERR;
+      }
+   } /* next var */
+
+#ifdef LOGGING
+   /* This will print out the names, types, lens, etc of the vars and
+      atts in the file, if the logging level is 2 or greater. */ 
+   log_metadata_nc(h5->root_grp->file);
+#endif
+   return NC_NOERR;   
+#endif /* USE_HDF4 */
+   return NC_ENOTBUILT;
+}
+
+int
+NC4_open(const char *path, int mode, int basepe, size_t *chunksizehintp, 
+	 int use_parallel, void *mpidata, NC_Dispatch *dispatch, NC **ncpp)
+{
+   int hdf_file = 0;
+   NC_FILE_INFO_T *nc_file;
+#ifdef USE_PARALLEL
+   MPI_Comm comm = 0; 
+   MPI_Info info = 0;	
+#else
+   int comm = 0, info = 0;
+#endif /* USE_PARALLEL */
+   int res;
+
+   assert(ncpp && path);
+
+   LOG((1, "nc_open_file: path %s mode %d comm %d info %d", 
+	path, mode, comm, info));
+
+#ifdef USE_PARALLEL
+   if (mpidata) 
+   { 
+      NC_MPI_INFO *nmi = (NC_MPI_INFO *)mpidata; 
+      comm = nmi->comm; info = nmi->info; 
+   }
+#endif /* USE_PARALLEL */
+    
+   /* If this is our first file, turn off HDF5 error messages. */
+   if (virgin)
+   {
+      if (H5Eset_auto(NULL, NULL) < 0)
+	 LOG((0, "Couldn't turn off HDF5 error messages!"));
+      LOG((1, "HDF5 error messages turned off!"));
+      virgin = 0;
+   }
+
+   /* Check the mode for validity. First make sure only certain bits
+    * are turned on. Also MPI I/O and MPI POSIX cannot both be
+    * selected at once. */
+   if (mode & ~(NC_WRITE | NC_SHARE | NC_MPIIO | NC_MPIPOSIX | 
+		NC_PNETCDF | NC_NOCLOBBER | NC_NETCDF4 | NC_CLASSIC_MODEL) ||
+       (mode & NC_MPIIO && mode & NC_MPIPOSIX))
+      return NC_EINVAL;
+
+   /* Figure out if this is a hdf4 or hdf5 file. */
+   if ((res = nc_check_for_hdf(path, use_parallel, comm, info, &hdf_file)))
+      return res;
+
+   /* Allocate the storage for this file info struct, and fill it with
+      zeros. */
+   if ((res = nc4_file_list_add(&nc_file,dispatch)))
+      return res;
+
+   /* Depending on the type of file, open it. */
+   if (hdf_file == NC_HDF5_FILE)
+   {
+      nc_file->int_ncid = nc_file->ext_ncid;
+      res = nc4_open_file(path, mode, comm, info, nc_file);
+   }
+   else if (hdf_file == NC_HDF4_FILE)
+   {
+      nc_file->int_ncid = nc_file->ext_ncid;
+      res = nc4_open_hdf4_file(path, mode, nc_file);
+   }
+#ifdef USE_PNETCDF
+   else if (mode & NC_PNETCDF)
+   {
+      int pnetcdf_nvars, i;
+
+      res = ncmpi_open(comm, path, mode, info, &(nc_file->int_ncid));
+      nc_file->pnetcdf_file++;
+
+      /* Default to independent access, like netCDF-4/HDF5 files. */
+      if (!res)
+	 res = ncmpi_begin_indep_data(nc_file->int_ncid);
+
+      /* I need to keep track of the ndims of each var to translate
+       * start, count, and stride arrays to MPI_Offset type. */
+      if (!res)
+      {
+	 res = ncmpi_inq_nvars(nc_file->int_ncid, &pnetcdf_nvars);
+	 for (i = 0; i < pnetcdf_nvars; i++)
+	    res = ncmpi_inq_varndims(nc_file->int_ncid, i, 
+				     &(nc_file->pnetcdf_ndims[i]));
+
+      }
+   }
+#endif /* USE_PNETCDF */
+   else /* netcdf */
+   {
+      assert(0);
+   }
+
+   /* If it succeeds, pass back the new ncid. Otherwise, remove this
+      file from the list. */
+   if (res)
+   {
+      if(nc_file != NULL) nc4_file_list_del(nc_file);
+   }
+   else
+   {
+      *ncpp = (NC*)nc_file;
+   }
+
+   return res;
+}
+
+/* Unfortunately HDF only allows specification of fill value only when
+   a dataset is created. Whereas in netcdf, you first create the
+   variable and then (optionally) specify the fill value. To
+   accomplish this in HDF5 I have to delete the dataset, and recreate
+   it, with the fill value specified. */
+int 
+NC4_set_fill(int ncid, int fillmode, int *old_modep)
+{
+   NC_FILE_INFO_T *nc;
+ 
+   LOG((2, "nc_set_fill: ncid 0x%x fillmode %d", ncid, fillmode));
+
+   if (!(nc = nc4_find_nc_file(ncid)))
+      return NC_EBADID;
+
+   /* Is this a netcdf-3 file? */
+   assert(nc->nc4_info);
+
+   /* Trying to set fill on a read-only file? You sicken me! */
+   if (nc->nc4_info->no_write)
+      return NC_EPERM;
+
+   /* Did you pass me some weird fillmode? */
+   if (fillmode != NC_FILL && fillmode != NC_NOFILL)
+      return NC_EINVAL;
+
+   /* If the user wants to know, tell him what the old mode was. */
+   if (old_modep)
+      *old_modep = nc->nc4_info->fill_mode;
+
+   nc->nc4_info->fill_mode = fillmode;
+
+   return NC_NOERR;
+}
+
+/* Put the file back in redef mode. This is done automatically for
+ * netcdf-4 files, if the user forgets. */
+int
+NC4_redef(int ncid)
+{
+   NC_FILE_INFO_T *nc;
+
+   LOG((1, "nc_redef: ncid 0x%x", ncid));
+
+   /* Find this file's metadata. */
+   if (!(nc = nc4_find_nc_file(ncid)))
+      return NC_EBADID;
+
+#ifdef USE_PNETCDF
+   /* Take care of files created/opened with parallel-netcdf library. */
+   if (nc->pnetcdf_file)
+      return ncmpi_redef(nc->int_ncid);
+#endif /* USE_PNETCDF */
+
+   /* Handle netcdf-3 files. */
+   assert(nc->nc4_info);
+
+   /* If we're already in define mode, return an error. */
+   if (nc->nc4_info->flags & NC_INDEF)
+      return NC_EINDEFINE;
+
+   /* If the file is read-only, return an error. */
+   if (nc->nc4_info->no_write)
+      return NC_EPERM;
+
+   /* Set define mode. */
+   nc->nc4_info->flags |= NC_INDEF;
+
+   /* For nc_abort, we need to remember if we're in define mode as a
+      redef. */
+   nc->nc4_info->redef++;
+
+   return NC_NOERR;
+}
+
+/* For netcdf-4 files, this just calls nc_enddef, ignoring the extra
+ * parameters. */
+int
+NC4__enddef(int ncid, size_t h_minfree, size_t v_align,
+	    size_t v_minfree, size_t r_align)
+{
+   if (!nc4_find_nc_file(ncid))
+      return NC_EBADID;
+
+   return NC4_enddef(ncid);
+}
+
+/* Take the file out of define mode. This is called automatically for
+ * netcdf-4 files, if the user forgets. */
+static int NC4_enddef(int ncid)
+{
+   NC_FILE_INFO_T *nc;
+
+   LOG((1, "nc_enddef: ncid 0x%x", ncid));
+
+   if (!(nc = nc4_find_nc_file(ncid)))
+      return NC_EBADID;
+
+#ifdef USE_PNETCDF
+   if (nc->pnetcdf_file)
+   {
+      int res;
+      res = ncmpi_enddef(nc->int_ncid);
+      if (!res)
+      {
+	 if (nc->pnetcdf_access_mode == NC_INDEPENDENT)
+	    res = ncmpi_begin_indep_data(nc->int_ncid);
+      }
+      return res;
+   }
+#endif /* USE_PNETCDF */
+
+   /* Take care of netcdf-3 files. */
+   assert(nc->nc4_info);
+
+   return nc4_enddef_netcdf4_file(nc->nc4_info);
+}
+
+/* This function will write all changed metadata, and (someday) reread
+ * all metadata from the file. */
+static int
+sync_netcdf4_file(NC_HDF5_FILE_INFO_T *h5)
+{
+   int retval;
+
+   assert(h5);
+   LOG((3, "sync_netcdf4_file"));
+
+   /* If we're in define mode, that's an error, for strict nc3 rules,
+    * otherwise, end define mode. */
+   if (h5->flags & NC_INDEF)
+   {
+      if (h5->cmode & NC_CLASSIC_MODEL)
+	 return NC_EINDEFINE;
+
+      /* Turn define mode off. */
+      h5->flags ^= NC_INDEF;
+      
+      /* Redef mode needs to be tracked seperately for nc_abort. */
+      h5->redef = 0;
+   }
+
+#ifdef LOGGING
+   /* This will print out the names, types, lens, etc of the vars and
+      atts in the file, if the logging level is 2 or greater. */ 
+   log_metadata_nc(h5->root_grp->file);
+#endif
+
+   /* Write any metadata that has changed. */
+   if (!(h5->cmode & NC_NOWRITE))
+   {
+      if ((retval = nc4_rec_write_types(h5->root_grp)))
+	 return retval;
+      if ((retval = nc4_rec_write_metadata(h5->root_grp)))
+	 return retval;
+   }
+
+   H5Fflush(h5->hdfid, H5F_SCOPE_GLOBAL);
+
+   /* Reread all the metadata. */
+   /*if ((retval = nc4_rec_read_metadata(grp)))
+     return retval;*/
+
+   return retval;
+}
+
+/* Flushes all buffers associated with the file, after writing all
+   changed metadata. This may only be called in data mode. */
+int
+NC4_sync(int ncid)
+{
+   NC_FILE_INFO_T *nc;
+   int retval;
+
+   LOG((2, "nc_sync: ncid 0x%x", ncid));
+
+   if (!(nc = nc4_find_nc_file(ncid)))
+      return NC_EBADID;
+
+#ifdef USE_PNETCDF
+   /* Take care of files created/opened with parallel-netcdf library. */
+   if (nc->pnetcdf_file)
+      return ncmpi_sync(nc->int_ncid);
+#endif /* USE_PNETCDF */
+
+   /* Take care of netcdf-3 files. */
+   assert(nc->nc4_info);
+
+   /* If we're in define mode, we can't sync. */
+   if (nc->nc4_info && nc->nc4_info->flags & NC_INDEF)
+   {
+      if (nc->nc4_info->cmode & NC_CLASSIC_MODEL)
+	 return NC_EINDEFINE;
+      if ((retval = nc_enddef(ncid)))
+	 return retval;
+   }
+
+   return sync_netcdf4_file(nc->nc4_info);
+}
+
+/* This function will free all allocated metadata memory, and close
+   the HDF5 file. The group that is passed in must be the root group
+   of the file. */
+static int
+close_netcdf4_file(NC_HDF5_FILE_INFO_T *h5, int abort)
+{
+   int retval;
+
+   assert(h5 && h5->root_grp);
+   LOG((3, "close_netcdf4_file: h5->path %s abort %d", 
+	h5->path, abort));
+
+   /* According to the docs, always end define mode on close. */
+   if (h5->flags & NC_INDEF)
+      h5->flags ^= NC_INDEF;
+
+   /* Sync the file, unless we're aborting, or this is a read-only
+    * file. */
+   if (!h5->no_write && !abort)
+      if ((retval = sync_netcdf4_file(h5)))
+	 return retval;
+
+   /* Delete all the list contents for vars, dims, and atts, in each
+    * group. */
+   if ((retval = nc4_rec_grp_del(&h5->root_grp, h5->root_grp)))
+      return retval;
+
+   /* Close hdf file. */
+   if (h5->hdf4)
+   {
+#ifdef USE_HDF4
+      if (SDend(h5->sdid))
+	 return NC_EHDFERR;
+#endif /* USE_HDF4 */
+   } 
+   else
+   {
+      if (H5Fclose(h5->hdfid) < 0) 
+      {
+	int nobjs;
+	nobjs = H5Fget_obj_count(h5->hdfid, H5F_OBJ_ALL);
+	/* Apparently we can get an error even when nobjs == 0 */
+	if(nobjs < 0) {
+	  return NC_EHDFERR;
+	} else if(nobjs > 0) {
+#ifdef LOGGING
+	 /* If the close doesn't work, probably there are still some HDF5
+	  * objects open, which means there's a bug in the library. So
+	  * print out some info on to help the poor programmer figure it
+	  * out. */
+         LOG((0, "There are %d HDF5 objects open!", nobjs));
+#endif      
+	 return NC_EHDFERR;
+	}
+      }
+/*      if (H5garbage_collect() < 0)
+	return NC_EHDFERR;	 */
+   }
+
+   /* Delete the memory for the path, if it's been allocated. */
+   if (h5->path)
+      free(h5->path);
+
+   /* Free the nc4_info struct. */
+   free(h5);
+   return NC_NOERR;
+}
+
+/* From the netcdf-3 docs: The function nc_abort just closes the
+   netCDF dataset, if not in define mode. If the dataset is being
+   created and is still in define mode, the dataset is deleted. If
+   define mode was entered by a call to nc_redef, the netCDF dataset
+   is restored to its state before definition mode was entered and the
+   dataset is closed. */
+int
+NC4_abort(int ncid)
+{
+   NC_FILE_INFO_T *nc;
+   int delete_file = 0;
+   char path[NC_MAX_NAME + 1];
+   int retval = NC_NOERR;
+
+   LOG((2, "nc_abort: ncid 0x%x", ncid));
+
+   /* Find metadata for this file. */
+   if (!(nc = nc4_find_nc_file(ncid)))
+      return NC_EBADID;
+
+#ifdef USE_PNETCDF
+   /* Take care of files created/opened with parallel-netcdf library. */
+   if (nc->pnetcdf_file)
+      return ncmpi_abort(nc->int_ncid);
+#endif /* USE_PNETCDF */
+
+   /* If this is a netcdf-3 file, let the netcdf-3 library handle it. */
+   assert(nc->nc4_info);
+
+   /* If we're in define mode, but not redefing the file, delete it. */
+   if (nc->nc4_info->flags & NC_INDEF && !nc->nc4_info->redef)
+   {
+      delete_file++;
+      strcpy(path, nc->nc4_info->path);
+      /*strcpy(path, nc->path);*/
+   }
+
+   /* Free any resources the netcdf-4 library has for this file's
+    * metadata. */
+   if ((retval = close_netcdf4_file(nc->nc4_info, 1)))
+      return retval;
+   
+   /* Delete the file, if we should. */
+   if (delete_file)
+      remove(path);
+
+   /* Delete this entry from our list of open files. */
+   nc4_file_list_del(nc);
+
+   return retval;
+}
+
+/* Close the netcdf file, writing any changes first. */
+int
+NC4_close(int ncid)
+{
+   NC_GRP_INFO_T *grp;
+   NC_FILE_INFO_T *nc;
+   NC_HDF5_FILE_INFO_T *h5;
+   int retval;
+
+   LOG((1, "nc_close: ncid 0x%x", ncid));
+
+   /* Find our metadata for this file. */
+   if ((retval = nc4_find_nc_grp_h5(ncid, &nc, &grp, &h5)))
+      return retval;
+
+#ifdef USE_PNETCDF
+   /* Take care of files created/opened with parallel-netcdf library. */
+   if (nc->pnetcdf_file)
+      return ncmpi_close(nc->int_ncid);
+#endif /* USE_PNETCDF */
+
+   assert(h5 && nc);
+
+   /* This must be the root group. */
+   if (grp->parent)
+      return NC_EBADGRPID;
+
+   /* Call the nc4 close. */
+   if ((retval = close_netcdf4_file(grp->file->nc4_info, 0)))
+      return retval;
+
+   /* Delete this entry from our list of open files. */
+   if (nc->path)
+      free(nc->path);
+   nc4_file_list_del(nc);
+
+   /* Reset the ncid numbers if there are no more files open. */
+   if(count_NCList() == 0)
+      nc4_file_list_free();
+
+   return NC_NOERR;
+}
+
+/* It's possible for any of these pointers to be NULL, in which case
+   don't try to figure out that value. */
+int
+NC4_inq(int ncid, int *ndimsp, int *nvarsp, int *nattsp, int *unlimdimidp)
+{
+   NC_FILE_INFO_T *nc;
+   NC_HDF5_FILE_INFO_T *h5;
+   NC_GRP_INFO_T *grp;
+   NC_DIM_INFO_T *dim;
+   NC_ATT_INFO_T *att;
+   NC_VAR_INFO_T *var;
+   int retval;
+
+   LOG((2, "nc_inq: ncid 0x%x", ncid)); 
+
+   /* Find file metadata. */
+   if ((retval = nc4_find_nc_grp_h5(ncid, &nc, &grp, &h5)))
+      return retval;
+
+#ifdef USE_PNETCDF
+   /* Take care of files created/opened with parallel-netcdf library. */
+   if (nc->pnetcdf_file)
+      return ncmpi_inq(nc->int_ncid, ndimsp, nvarsp, nattsp, unlimdimidp);
+#endif /* USE_PNETCDF */
+
+   /* Netcdf-3 files are already taken care of. */
+   assert(h5 && grp && nc);
+
+   /* Count the number of dims, vars, and global atts. */
+   if (ndimsp)
+   {
+      *ndimsp = 0;
+      for (dim = grp->dim; dim; dim = dim->next)
+	 (*ndimsp)++;
+   }
+   if (nvarsp)
+   {
+      *nvarsp = 0;
+      for (var = grp->var; var; var= var->next)
+	 (*nvarsp)++;
+   }
+   if (nattsp)
+   {
+      *nattsp = 0;
+      for (att = grp->att; att; att = att->next)
+	 (*nattsp)++;
+   }
+
+   if (unlimdimidp)
+   {
+      /* Default, no unlimited dimension */
+      int found = 0;
+      *unlimdimidp = -1;
+
+      /* If there's more than one unlimited dim, which was not possible
+	 with netcdf-3, then only the last unlimited one will be reported
+	 back in xtendimp. */
+      /* Note that this code is inconsistent with nc_inq_unlimid() */
+      for (dim = grp->dim; dim; dim = dim->next)
+	 if (dim->unlimited)
+	 {
+	    *unlimdimidp = dim->dimid;
+	    break;
+	 }
+   }
+
+   return NC_NOERR;   
+}
+
+
+/* This function will do the enddef stuff for a netcdf-4 file. */
+int
+nc4_enddef_netcdf4_file(NC_HDF5_FILE_INFO_T *h5)
+{
+   assert(h5);
+   LOG((3, "nc4_enddef_netcdf4_file"));
+
+   /* If we're not in define mode, return an error. */
+   if (!(h5->flags & NC_INDEF))
+      return NC_ENOTINDEFINE;
+
+   /* Turn define mode off. */
+   h5->flags ^= NC_INDEF;
+
+   /* Redef mode needs to be tracked seperately for nc_abort. */
+   h5->redef = 0;
+
+   return sync_netcdf4_file(h5);
+}
+
+#ifdef EXTRA_TESTS
+int
+nc_exit()
+{
+   if (num_plists || num_spaces)
+      return NC_EHDFERR;
+      
+   return NC_NOERR;
+}
+#endif /* EXTRA_TESTS */
+
+#ifdef USE_PARALLEL
+int
+nc_use_parallel_enabled()
+{
+   return 0;
+}
+#endif /* USE_PARALLEL */
+
+
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/src_netcdf4/nc4grp.c
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/src_netcdf4/nc4grp.c	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/src_netcdf4/nc4grp.c	(revision 1749)
@@ -0,0 +1,440 @@
+/*
+This file is part of netcdf-4, a netCDF-like interface for HDF5, or a
+HDF5 backend for netCDF, depending on your point of view.
+
+This file handles the nc4 groups.
+
+Copyright 2005, University Corporation for Atmospheric Research. See
+netcdf-4/docs/COPYRIGHT file for copying and redistribution
+conditions.
+
+$Id: nc4grp.c,v 1.44 2010/05/25 17:54:23 dmh Exp $
+*/
+
+#include "nc4internal.h"
+#include "nc4dispatch.h"
+
+/* Create a group. It's ncid is returned in the new_ncid pointer. */
+int
+NC4_def_grp(int parent_ncid, const char *name, int *new_ncid)
+{
+   NC_GRP_INFO_T *grp, *g;
+   NC_HDF5_FILE_INFO_T *h5;
+   char norm_name[NC_MAX_NAME + 1];
+   int retval;
+
+   LOG((2, "nc_def_grp: parent_ncid 0x%x name %s", parent_ncid, name));
+
+   /* Find info for this file and group, and set pointer to each. */
+   if ((retval = nc4_find_grp_h5(parent_ncid, &grp, &h5)))
+      return retval;
+   if (!h5)
+      return NC_ENOTNC4;
+
+   /* Check and normalize the name. */
+   if ((retval = nc4_check_name(name, norm_name)))
+      return retval;
+
+   /* Check that this name is not in use as a var, grp, or type. */
+   if ((retval = nc4_check_dup_name(grp, norm_name)))
+      return retval;
+
+   /* No groups in netcdf-3! */
+   if (h5->cmode & NC_CLASSIC_MODEL)
+      return NC_ESTRICTNC3;
+
+   /* If it's not in define mode, switch to define mode. */
+   if (!(h5->flags & NC_INDEF))
+      if ((retval = NC4_redef(parent_ncid)))
+	 return retval;
+
+   /* Update internal lists to reflect new group. The actual HDF5
+    * group creation will be done when metadata is written by a
+    * sync. */
+   if ((retval = nc4_grp_list_add(&(grp->children), h5->next_nc_grpid, 
+				  grp, grp->file, norm_name, &g)))
+      return retval;
+   if (new_ncid)
+      *new_ncid = grp->file->ext_ncid | h5->next_nc_grpid;
+   h5->next_nc_grpid++;
+   
+   return NC_NOERR;
+}
+
+/* Given an ncid and group name (NULL gets root group), return
+ * the ncid of that group. */
+int
+NC4_inq_ncid(int ncid, const char *name, int *grp_ncid)
+{
+   NC_GRP_INFO_T *grp, *g;
+   NC_HDF5_FILE_INFO_T *h5;
+   char norm_name[NC_MAX_NAME + 1];
+   int retval;
+
+   LOG((2, "nc_inq_ncid: ncid 0x%x name %s", ncid, name));
+   
+   /* Find info for this file and group, and set pointer to each. */
+   if ((retval = nc4_find_grp_h5(ncid, &grp, &h5)))
+      return retval;
+
+   /* Groups only work with netCDF-4/HDF5 files... */
+   if (!h5)
+      return NC_ENOTNC4;
+
+   /* Normalize name. */
+   if ((retval = nc4_normalize_name(name, norm_name)))
+      return retval;
+
+   /* Look through groups for one of this name. */
+   for (g = grp->children; g; g = g->next)
+      if (!strcmp(norm_name, g->name)) /* found it! */
+      {
+	 if (grp_ncid)
+	    *grp_ncid = grp->file->ext_ncid | g->nc_grpid;
+	 return NC_NOERR;
+      }
+   
+   /* If we got here, we didn't find the named group. */
+   return NC_ENOGRP;
+}
+
+/* Given a location id, return the number of groups it contains, and
+ * an array of their locids. */
+int
+NC4_inq_grps(int ncid, int *numgrps, int *ncids)
+{
+   NC_GRP_INFO_T *grp, *g;
+   NC_HDF5_FILE_INFO_T *h5;
+   int num = 0;
+   int retval;
+
+   LOG((2, "nc_inq_grps: ncid 0x%x", ncid));
+
+   /* Find info for this file and group, and set pointer to each. */
+   if ((retval = nc4_find_grp_h5(ncid, &grp, &h5)))
+      return retval;
+
+   /* For netCDF-3 files, just report zero groups. */
+   if (!h5)
+   {
+      if (numgrps)
+	 *numgrps = 0;
+      return NC_NOERR;
+   }
+
+   /* Count the number of groups in this group. */
+   for (g = grp->children; g; g = g->next)
+   {
+      if (ncids)
+      {
+	 /* Combine the nc_grpid in a bitwise or with the ext_ncid,
+	  * which allows the returned ncid to carry both file and
+	  * group information. */
+	 *ncids = g->nc_grpid | g->file->ext_ncid;
+	 ncids++;
+      }
+      num++;
+   }
+   
+   if (numgrps)
+      *numgrps = num;
+
+   return NC_NOERR;
+}
+
+/* Given locid, find name of group. (Root group is named "/".) */
+int
+NC4_inq_grpname(int ncid, char *name)
+{
+   NC_GRP_INFO_T *grp;
+   NC_HDF5_FILE_INFO_T *h5;
+   int retval;
+
+   LOG((2, "nc_inq_grpname: ncid 0x%x", ncid));
+
+   /* Find info for this file and group, and set pointer to each. */
+   if ((retval = nc4_find_grp_h5(ncid, &grp, &h5)))
+      return retval;
+   if (name)
+   {
+      if (!h5)
+	 strcpy(name, "/");
+      else
+	 strcpy(name, grp->name);
+   }
+
+   return NC_NOERR;
+}
+
+/* Find the full path name to the group represented by ncid. Either
+ * pointer argument may be NULL; pass a NULL for the third parameter
+ * to get the length of the full path name. The length will not
+ * include room for a null pointer. */
+int
+NC4_inq_grpname_full(int ncid, size_t *lenp, char *full_name)
+{
+   char *name, grp_name[NC_MAX_NAME + 1];
+   int g, id = ncid, parent_id, *gid;
+   int i, ret = NC_NOERR;
+
+   /* How many generations? */
+   for (g = 0; !nc_inq_grp_parent(id, &parent_id); g++, id = parent_id)
+      ;
+
+   /* Allocate storage. */
+   if (!(name = malloc((g + 1) * (NC_MAX_NAME + 1) + 1)))
+      return NC_ENOMEM;
+   if (!(gid = malloc((g + 1) * sizeof(int))))
+   {
+      free(name);
+      return NC_ENOMEM;
+   }
+   assert(name && gid);
+
+   /* Always start with a "/" for the root group. */
+   strcpy(name, "/");
+
+   /* Get the ncids for all generations. */
+   gid[0] = ncid;
+   for (i = 1; i < g && !ret; i++)
+      ret = nc_inq_grp_parent(gid[i - 1], &gid[i]);
+
+   /* Assemble the full name. */
+   for (i = g - 1; !ret && i >= 0 && !ret; i--)
+   {
+      if ((ret = nc_inq_grpname(gid[i], grp_name)))
+	 break;
+      strcat(name, grp_name);
+      if (i)
+	 strcat(name, "/");
+   }
+
+   /* Give the user the length of the name, if he wants it. */
+   if (!ret && lenp)
+      *lenp = strlen(name);
+
+   /* Give the user the name, if he wants it. */
+   if (!ret && full_name)
+      strcpy(full_name, name);
+
+   free(gid);
+   free(name);
+
+   return ret;
+}
+
+/* Find the parent ncid of a group. For the root group, return
+ * NC_ENOGRP error.  *Now* I know what kind of tinfoil hat wearing nut
+ * job would call this function with a NULL pointer for parent_ncid -
+ * Russ Rew!! */
+int
+NC4_inq_grp_parent(int ncid, int *parent_ncid)
+{
+   NC_GRP_INFO_T *grp;
+   NC_HDF5_FILE_INFO_T *h5;
+   int retval;
+
+   LOG((2, "nc_inq_grp_parent: ncid 0x%x", ncid));
+
+   /* Find info for this file and group. */
+   if ((retval = nc4_find_grp_h5(ncid, &grp, &h5)))
+      return retval;
+
+   /* Groups only work with netCDF-4/HDF5 files... */
+   if (!h5)
+      return NC_ENOGRP;
+
+   /* Set the parent ncid, if there is one. */
+   if (grp->parent)
+   {
+      if (parent_ncid)
+	 *parent_ncid = grp->file->ext_ncid | grp->parent->nc_grpid;
+   }
+   else
+      return NC_ENOGRP;
+   
+   return NC_NOERR;
+}
+
+/* Given a full name and ncid, find group ncid. */
+int
+NC4_inq_grp_full_ncid(int ncid, const char *full_name, int *grp_ncid)
+{
+   NC_GRP_INFO_T *grp;
+   NC_HDF5_FILE_INFO_T *h5;
+   int id1 = ncid, id2;
+   char *cp, *full_name_cpy;
+   int ret;
+
+   if (!full_name)
+      return NC_EINVAL;
+
+   /* Find info for this file and group, and set pointer to each. */
+   if ((ret = nc4_find_grp_h5(ncid, &grp, &h5)))
+      return ret;
+
+   /* Copy full_name because strtok messes with the value it works
+    * with, and we don't want to mess up full_name. */
+   if (!(full_name_cpy = malloc(strlen(full_name) + 1)))
+      return NC_ENOMEM;
+   strcpy(full_name_cpy, full_name);
+
+   /* Get the first part of the name. */
+   if (!(cp = strtok(full_name_cpy, "/")))
+   {
+      /* If "/" is passed, and this is the root group, return the root
+       * group id. */
+      if (!grp->parent)
+	 id2 = ncid;
+      else
+      {
+	 free(full_name_cpy);
+	 return NC_ENOGRP;
+      }
+   }
+   else
+   {
+      /* Keep parsing the string. */
+      for (; cp; id1 = id2)
+      {
+	 if ((ret = nc_inq_grp_ncid(id1, cp, &id2)))
+	 {
+	    free(full_name_cpy);
+	    return ret;
+	 }
+	 cp = strtok(NULL, "/");
+      }
+   }
+
+   /* Give the user the requested value. */
+   if (grp_ncid)
+      *grp_ncid = id2;
+
+   free(full_name_cpy);
+
+   return NC_NOERR;
+}
+
+/* Get a list of ids for all the variables in a group. */
+int
+NC4_inq_varids(int ncid, int *nvars, int *varids)
+{
+   NC_GRP_INFO_T *grp;
+   NC_HDF5_FILE_INFO_T *h5;
+   NC_VAR_INFO_T *var;
+   int v, num_vars = 0;
+   int retval;
+
+   LOG((2, "nc_inq_varids: ncid 0x%x", ncid));
+
+   /* Find info for this file and group, and set pointer to each. */
+   if ((retval = nc4_find_grp_h5(ncid, &grp, &h5)))
+      return retval;
+
+   if (!h5)
+   {
+      /* If this is a netcdf-3 file, there is only one group, the root
+       * group, and its vars have ids 0 thru nvars - 1. */
+      if ((retval = nc_inq(ncid, NULL, &num_vars, NULL, NULL)))
+	 return retval;
+      if (varids)
+	 for (v = 0; v < num_vars; v++)
+	    varids[v] = v;
+   }
+   else
+   {
+      /* This is a netCDF-4 group. Round up them doggies and count
+       * 'em. The list is in correct (i.e. creation) order. */
+      if (grp->var)
+      {
+	 for (var = grp->var; var; var = var->next)
+	 {
+	    if (varids)
+	       varids[num_vars] = var->varid;
+	    num_vars++;
+	 }
+      }
+   }
+
+   /* If the user wants to know how many vars in the group, tell
+    * him. */
+   if (nvars)
+      *nvars = num_vars;
+
+   return NC_NOERR;
+}
+
+/* This is the comparison function used for sorting dim ids. Integer
+   comparison: returns negative if b > a and positive if a > b. */
+int int_cmp(const void *a, const void *b)
+{
+   const int *ia = (const int *)a; 
+   const int *ib = (const int *)b;
+   return *ia  - *ib; 
+}
+
+/* Find all dimids for a location. This finds all dimensions in a
+ * group, with or without any of its parents, depending on last
+ * parameter. */
+int 
+NC4_inq_dimids(int ncid, int *ndims, int *dimids, int include_parents)
+{
+   NC_GRP_INFO_T *grp, *g;
+   NC_HDF5_FILE_INFO_T *h5;
+   NC_DIM_INFO_T *dim;
+   int d, num = 0;
+   int retval;
+
+   LOG((2, "nc_inq_dimids: ncid 0x%x include_parents: %d", ncid, 
+	include_parents));
+
+   /* Find info for this file and group, and set pointer to each. */
+   if ((retval = nc4_find_grp_h5(ncid, &grp, &h5)))
+      return retval;
+
+   if (!h5)
+   {
+      /* If this is a netcdf-3 file, then the dimids are going to be 0
+       * thru ndims-1, so just provide them. */
+      if ((retval = nc_inq(ncid, &num, NULL, NULL, NULL)))
+	 return retval;
+      if (dimids)
+	 for (d = 0; d < num; d++)
+	    dimids[d] = d;
+   }
+   else
+   {
+      /* First count them. */
+      for (dim = grp->dim; dim; dim = dim->next)
+	 num++;
+      if (include_parents)
+	 for (g = grp->parent; g; g = g->parent)
+	    for (dim = g->dim; dim; dim = dim->next)
+	       num++;
+      
+      /* If the user wants the dimension ids, get them. */
+      if (dimids)
+      {
+	 int n = 0;
+
+	 /* Get dimension ids from this group. */
+	 for (dim = grp->dim; dim; dim = dim->next)
+	    dimids[n++] = dim->dimid;
+
+	 /* Get dimension ids from parent groups. */
+	 if (include_parents)
+	    for (g = grp->parent; g; g = g->parent)
+	       for (dim = g->dim; dim; dim = dim->next)
+		  dimids[n++] = dim->dimid;
+	 
+	 qsort(dimids, num, sizeof(int), int_cmp);
+      }
+   }
+
+   /* If the user wants the number of dims, give it. */
+   if (ndims)
+      *ndims = num;
+
+   return NC_NOERR;
+}
+
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/src_netcdf4/nc4hdf.c
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/src_netcdf4/nc4hdf.c	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/src_netcdf4/nc4hdf.c	(revision 1749)
@@ -0,0 +1,4041 @@
+/*
+  This file is part of netcdf-4, a netCDF-like interface for HDF5, or a
+  HDF5 backend for netCDF, depending on your point of view.
+
+  This file contains functions internal to the netcdf4 library. None of
+  the functions in this file are exposed in the exetnal API. These
+  functions handle the HDF interface.
+
+  Copyright 2003, University Corporation for Atmospheric
+  Research. See the COPYRIGHT file for copying and redistribution
+  conditions.
+
+  $Id: nc4hdf.c,v 1.273 2010/05/27 21:34:14 dmh Exp $
+*/
+
+#include "config.h"
+#include "nc4internal.h"
+#include <H5DSpublic.h>
+#include <math.h>
+
+#ifdef IGNORE
+extern NC_FILE_INFO_T *nc_file;
+#endif
+
+#define NC3_STRICT_ATT_NAME "_nc3_strict"
+
+/* This is to track opened HDF5 objects to make sure they are
+ * closed. */
+#ifdef EXTRA_TESTS
+int num_plists;
+int num_spaces;
+#endif /* EXTRA_TESTS */
+
+/* This function is needed to handle one special case: what if the
+ * user defines a dim, writes metadata, then goes back into define
+ * mode and adds a coordinate var for the already existing dim. In
+ * that case, I need to recreate the dim's dimension scale dataset,
+ * and then I need to go to every var in the file which uses that
+ * dimension, and attach the new dimension scale. */
+static int
+rec_reattach_scales(NC_GRP_INFO_T *grp, int dimid, hid_t dimscaleid)
+{
+   NC_VAR_INFO_T *var;
+   NC_GRP_INFO_T *child_grp;
+   int d;
+   int retval;
+
+   assert(grp && grp->name && dimid >= 0 && dimscaleid >= 0);
+   LOG((3, "rec_reattach_scales: grp->name %s", grp->name));
+
+   /* If there are any child groups, attach dimscale there, if needed. */
+   for (child_grp = grp->children; child_grp; child_grp = child_grp->next)
+      if ((retval = rec_reattach_scales(child_grp, dimid, dimscaleid)))
+         return retval;
+
+   /* Find any vars that use this dimension id. */
+   for (var = grp->var; var; var = var->next)
+      for (d = 0; d < var->ndims; d++)
+         if (var->dimids[d] == dimid && !var->dimscale)
+         {
+            LOG((2, "rec_reattach_scaled: attaching scale for dimid %d to var %s", 
+                 var->dimids[d], var->name));
+            if (var->created)
+            {
+               if (H5DSattach_scale(var->hdf_datasetid, dimscaleid, d) < 0)
+                  return NC_EHDFERR;
+               var->dimscale_attached[d]++;
+            }
+         }
+
+   return NC_NOERR;
+}
+
+/* This function is needed to handle one special case: what if the
+ * user defines a dim, writes metadata, then goes back into define
+ * mode and adds a coordinate var for the already existing dim. In
+ * that case, I need to recreate the dim's dimension scale dataset,
+ * and then I need to go to every var in the file which uses that
+ * dimension, and attach the new dimension scale. */
+static int
+rec_detach_scales(NC_GRP_INFO_T *grp, int dimid, hid_t dimscaleid)
+{
+   NC_VAR_INFO_T *var;
+   NC_GRP_INFO_T *child_grp;
+   int d;
+   int retval;
+
+   assert(grp && grp->name && dimid >= 0 && dimscaleid >= 0);
+   LOG((3, "rec_detach_scales: grp->name %s", grp->name));
+
+   /* If there are any child groups, attach dimscale there, if needed. */
+   for (child_grp = grp->children; child_grp; child_grp = child_grp->next)
+      if ((retval = rec_detach_scales(child_grp, dimid, dimscaleid)))
+         return retval;
+
+   /* If there are no vars, we are done. */
+   if (!grp->var)
+      return NC_NOERR;
+
+   /* Find any (already created) vars that use this dimension id. Go
+    * through the list backwards to accomdate a HDF5 bug. */
+   for (var = grp->var; var->next; var = var->next)
+      ;
+
+   for ( ; var; var = var->prev)
+      for (d = 0; d < var->ndims; d++)
+         if (var->dimids[d] == dimid && !var->dimscale)
+         {
+            LOG((2, "rec_detach_scales: detaching scale for dimid %d to var %s", 
+                 var->dimids[d], var->name));
+            if (var->created)
+            {
+	       if (var->dimscale_attached[d])
+	       {
+		  if (H5DSdetach_scale(var->hdf_datasetid, dimscaleid, d) < 0)
+		     return NC_EHDFERR;
+		  var->dimscale_attached[d] = 0;
+	       }
+            }
+         }
+
+   return NC_NOERR;
+}
+
+/* Open the dataset and leave it open. */
+int 
+nc4_open_var_grp2(NC_GRP_INFO_T *grp, int varid, hid_t *dataset)
+{
+   NC_VAR_INFO_T *var;
+   
+   /* Find the requested varid. */
+   for (var = grp->var; var; var = var->next)
+      if (var->varid == varid)
+         break;
+   if (!var)
+      return NC_ENOTVAR;
+   
+   /* Open this dataset if necessary. */
+   if (!var->hdf_datasetid)
+      if ((var->hdf_datasetid = H5Dopen2(grp->hdf_grpid, var->name, 
+					 H5P_DEFAULT)) < 0)
+         return NC_ENOTVAR;
+
+   *dataset = var->hdf_datasetid;
+   
+   return NC_NOERR;
+}
+
+/* Write or read one element of data. 
+
+   Oh, better far to live and die
+   Under the brave black flag I fly,
+   Than play a sanctimonious part,
+   With a pirate head and a pirate heart.
+
+   Away to the cheating world go you,
+   Where pirates all are well-to-do.
+   But I'll be true to the song I sing,
+   And live and die a Pirate king.
+*/
+int
+nc4_pg_var1(NC_PG_T pg, NC_FILE_INFO_T *nc, int ncid, int varid, 
+            const size_t *indexp, nc_type xtype, int is_long, void *ip)
+{
+   NC_GRP_INFO_T *grp;
+   NC_VAR_INFO_T *var;
+   int i;
+   size_t start[NC_MAX_VAR_DIMS], count[NC_MAX_VAR_DIMS];
+   int retval;
+
+   /* Find file and var, cause I need the number of dims. */
+   assert(nc);
+   if ((retval = nc4_find_g_var_nc(nc, ncid, varid, &grp, &var)))
+      return retval;
+   assert(grp && var && var->name);
+
+   /* Set up the count and start arrays. */
+   for (i=0; i<var->ndims; i++)
+   {
+      start[i] = indexp[i];
+      count[i] = 1;
+   }
+
+   /* Get or put this data. */
+   if (pg == GET)
+      return nc4_get_vara(nc, ncid, varid, start, count, xtype, 
+                          is_long, ip);
+   else
+      return nc4_put_vara(nc, ncid, varid, start, count, xtype, 
+                          is_long, ip);
+}
+
+/* Get the default fill value for an atomic type. Memory for
+ * fill_value must already be allocated, or you are DOOMED!!!*/
+int
+nc4_get_default_fill_value(NC_TYPE_INFO_T *type_info, void *fill_value)
+{
+   switch (type_info->nc_typeid)
+   {
+      case NC_BYTE:
+         *(signed char *)fill_value = NC_FILL_BYTE;
+         break;
+      case NC_CHAR:
+         *(char *)fill_value = NC_FILL_CHAR;
+         break;
+      case NC_SHORT:
+         *(short *)fill_value = NC_FILL_SHORT;
+         break;
+      case NC_INT:
+         *(int *)fill_value = NC_FILL_INT;
+         break;
+      case NC_FLOAT:
+         *(float *)fill_value = NC_FILL_FLOAT;
+         break;
+      case NC_DOUBLE:
+         *(double *)fill_value = NC_FILL_DOUBLE;
+         break;
+      case NC_UBYTE:
+         *(unsigned char *)fill_value = NC_FILL_UBYTE;
+         break;
+      case NC_USHORT:
+         *(unsigned short *)fill_value = NC_FILL_USHORT;
+         break;
+      case NC_UINT:
+         *(unsigned int *)fill_value = NC_FILL_UINT;
+         break;
+      case NC_INT64:
+         *(long long *)fill_value = NC_FILL_INT64;
+         break;
+      case NC_UINT64:
+         *(unsigned long long *)fill_value = NC_FILL_UINT64;
+         break;
+      case NC_STRING:
+         strcpy((char *)fill_value, "");
+         break;
+      default:
+         return NC_EINVAL;
+   }
+
+   return NC_NOERR;
+}
+
+/* What fill value should be used for a variable? */
+static int
+get_fill_value(NC_HDF5_FILE_INFO_T *h5, NC_VAR_INFO_T *var, void **fillp)
+{   
+   size_t size;
+   int retval;
+
+   /* Find out how much space we need for this type's fill value. */
+   if ((retval = nc4_get_typelen_mem(h5, var->xtype, 0, &size)))
+      return retval;
+
+   /* Strings have a size of one for the empty sting (to hold the
+    * null), otherwise the length of the users fill_value string, plus
+    * one. */
+   if (var->xtype == NC_STRING)
+   {
+         size = 1;
+   }
+   
+   /* Allocate the space. VLENS are different, of course. */
+   if (var->type_info->class == NC_VLEN)
+   {
+      if (!((*fillp) = malloc(sizeof(nc_vlen_t))))
+         return NC_ENOMEM;
+   }
+   else
+   {
+      if (!((*fillp) = malloc(size)))
+         return NC_ENOMEM;
+   }
+
+   /* If the user has set a fill_value for this var, use, otherwise
+    * find the default fill value. */
+   if (var->fill_value)
+   {
+      LOG((4, "Found a fill value for var %s", var->name));
+      if (var->type_info->class == NC_VLEN)   
+      {
+         nc_vlen_t *in_vlen = (nc_vlen_t *)(var->fill_value), *fv_vlen = (nc_vlen_t *)(*fillp);
+         fv_vlen->len = in_vlen->len;
+         if (!(fv_vlen->p = malloc(size * in_vlen->len)))
+            return NC_ENOMEM;
+         memcpy(fv_vlen->p, in_vlen->p, in_vlen->len * size);
+      }
+      else if (var->xtype == NC_STRING)
+      {
+         if (!(*(char **)fillp = malloc((strlen((char *)var->fill_value) + 1) * 
+					sizeof(char))))
+	    return NC_ENOMEM;
+         strcpy(*(char **)fillp, (char *)var->fill_value);
+      }
+      else
+         memcpy((*fillp), var->fill_value, size);
+   }
+   else
+   {
+      if ((nc4_get_default_fill_value(var->type_info, *fillp)))
+      {
+         free(*fillp);
+         *fillp = NULL;
+      }
+   }
+
+   return NC_NOERR;
+}
+
+/* Given a netcdf type, return appropriate HDF typeid. */
+int
+nc4_get_hdf_typeid(NC_HDF5_FILE_INFO_T *h5, nc_type xtype, 
+		   hid_t *hdf_typeid, int endianness)
+{
+   NC_TYPE_INFO_T *type;
+   hid_t typeid = 0;
+   int retval = NC_NOERR;
+
+   assert(hdf_typeid && h5);
+
+   *hdf_typeid = -1;
+   switch (xtype)
+   {
+      case NC_NAT: /* NAT = 'Not A Type' (c.f. NaN) */
+         return NC_EBADTYPE;
+      case NC_BYTE: /* signed 1 byte integer */
+         if (endianness == NC_ENDIAN_LITTLE)
+            *hdf_typeid = H5T_STD_I8LE;
+         else if (endianness == NC_ENDIAN_BIG)
+            *hdf_typeid = H5T_STD_I8BE;
+         else
+            *hdf_typeid = H5T_NATIVE_SCHAR;
+         break;
+      case NC_CHAR: /* ISO/ASCII character */
+	 if ((typeid = H5Tcopy(H5T_C_S1)) < 0) 
+	    return NC_EHDFERR;
+	 if (H5Tset_strpad(typeid, H5T_STR_NULLTERM) < 0)
+	    BAIL(NC_EVARMETA);
+         *hdf_typeid = typeid;
+         break;
+      case NC_SHORT: /* signed 2 byte integer */
+         if (endianness == NC_ENDIAN_LITTLE)
+            *hdf_typeid = H5T_STD_I16LE;
+         else if (endianness == NC_ENDIAN_BIG)
+            *hdf_typeid = H5T_STD_I16BE;
+         else
+            *hdf_typeid = H5T_NATIVE_SHORT;
+         break;
+      case NC_INT: 
+         if (endianness == NC_ENDIAN_LITTLE)
+            *hdf_typeid = H5T_STD_I32LE;
+         else if (endianness == NC_ENDIAN_BIG)
+            *hdf_typeid = H5T_STD_I32BE;
+         else
+            *hdf_typeid = H5T_NATIVE_INT;
+         break;
+      case NC_FLOAT: 
+         if (endianness == NC_ENDIAN_LITTLE)
+            *hdf_typeid = H5T_IEEE_F32LE;
+         else if (endianness == NC_ENDIAN_BIG)
+            *hdf_typeid = H5T_IEEE_F32BE;
+         else
+            *hdf_typeid = H5T_NATIVE_FLOAT;
+         break;
+      case NC_DOUBLE:
+         if (endianness == NC_ENDIAN_LITTLE)
+            *hdf_typeid = H5T_IEEE_F64LE;
+         else if (endianness == NC_ENDIAN_BIG)
+            *hdf_typeid = H5T_IEEE_F64BE;
+         else
+            *hdf_typeid = H5T_NATIVE_DOUBLE;
+         break;
+      case NC_UBYTE: 
+         if (endianness == NC_ENDIAN_LITTLE)
+            *hdf_typeid = H5T_STD_U8LE;
+         else if (endianness == NC_ENDIAN_BIG)
+            *hdf_typeid = H5T_STD_U8BE;
+         else
+            *hdf_typeid = H5T_NATIVE_UCHAR;
+         break;
+      case NC_USHORT:
+         if (endianness == NC_ENDIAN_LITTLE)
+            *hdf_typeid = H5T_STD_U16LE;
+         else if (endianness == NC_ENDIAN_BIG)
+            *hdf_typeid = H5T_STD_U16BE;
+         else
+            *hdf_typeid = H5T_NATIVE_USHORT;
+         break;
+      case NC_UINT: 
+         if (endianness == NC_ENDIAN_LITTLE)
+            *hdf_typeid = H5T_STD_U32LE;
+         else if (endianness == NC_ENDIAN_BIG)
+            *hdf_typeid = H5T_STD_U32BE;
+         else
+            *hdf_typeid = H5T_NATIVE_UINT;
+         break;
+      case NC_INT64: 
+         if (endianness == NC_ENDIAN_LITTLE)
+            *hdf_typeid = H5T_STD_I64LE;
+         else if (endianness == NC_ENDIAN_BIG)
+            *hdf_typeid = H5T_STD_I64BE;
+         else
+            *hdf_typeid = H5T_NATIVE_LLONG;
+         break;
+      case NC_UINT64: 
+         if (endianness == NC_ENDIAN_LITTLE)
+            *hdf_typeid = H5T_STD_U64LE;
+         else if (endianness == NC_ENDIAN_BIG)
+            *hdf_typeid = H5T_STD_U64BE;
+         else
+            *hdf_typeid = H5T_NATIVE_ULLONG;
+         break;
+      case NC_STRING: 
+	 if ((typeid = H5Tcopy(H5T_C_S1)) < 0) 
+	    return NC_EHDFERR;
+	 if (H5Tset_size(typeid, H5T_VARIABLE) < 0)
+	    return NC_EHDFERR;
+	 *hdf_typeid = typeid;
+         break;
+      default:
+         /* Maybe this is a user defined type? */
+         if (!nc4_find_type(h5, xtype, &type))
+         {
+            if (!type)
+               return NC_EBADTYPE;
+            *hdf_typeid = type->hdf_typeid;
+         }
+   }
+
+   if (*hdf_typeid == -1)
+      return NC_EBADTYPE;
+   
+   return NC_NOERR;
+
+  exit:
+   if (xtype == NC_CHAR && typeid > 0 && H5Tclose(typeid) < 0)
+      BAIL2(NC_EHDFERR);      
+   return retval;
+}
+
+/* Do some common check for nc4_put_vara and nc4_get_vara. These
+ * checks have to be done when both reading and writing data. */
+static int 
+check_for_vara(nc_type *mem_nc_type, NC_VAR_INFO_T *var, NC_HDF5_FILE_INFO_T *h5)
+{
+   int retval;
+
+   /* If mem_nc_type is NC_NAT, it means we want to use the file type
+    * as the mem type as well. */
+   assert(mem_nc_type);
+   if (*mem_nc_type == NC_NAT)
+      *mem_nc_type = var->xtype;
+   assert(*mem_nc_type);
+
+   /* No NC_CHAR conversions, you pervert! */
+   if (var->xtype != *mem_nc_type && 
+       (var->xtype == NC_CHAR || *mem_nc_type == NC_CHAR))
+      return NC_ECHAR;
+
+   /* If we're in define mode, we can't read or write data. */
+   if (h5->flags & NC_INDEF)
+   {
+      if (h5->cmode & NC_CLASSIC_MODEL)
+         return NC_EINDEFINE;
+      if ((retval = nc4_enddef_netcdf4_file(h5)))
+         return retval;
+   }
+
+   return NC_NOERR;
+}
+
+#ifdef LOGGING
+/* Print some debug info about dimensions to the log. */   
+static void
+log_dim_info(NC_VAR_INFO_T *var, hsize_t *fdims, hsize_t *fmaxdims, 
+             hsize_t *start, hsize_t *count)
+{
+   int d2;
+
+   /* Print some debugging info... */
+   LOG((4, "nc4_put_vara: var name %s ndims %d", var->name, var->ndims)); 
+   LOG((4, "File space, and requested:"));
+   for (d2 = 0; d2 < var->ndims; d2++)
+   {
+      LOG((4, "fdims[%d]=%Ld fmaxdims[%d]=%Ld", d2, fdims[d2], d2, 
+           fmaxdims[d2]));
+      LOG((4, "start[%d]=%Ld  count[%d]=%Ld", d2, start[d2], d2, count[d2]));
+   }
+}
+#endif /* LOGGING */
+
+#ifdef USE_PARALLEL
+static int
+set_par_access(NC_HDF5_FILE_INFO_T *h5, NC_VAR_INFO_T *var, hid_t xfer_plistid)
+{
+   H5FD_mpio_xfer_t hdf5_xfer_mode;
+
+   /* If netcdf is built with parallel I/O, then parallel access can
+    * be used, and, if this file was opened or created for parallel
+    * access, we need to set the transfer mode. */
+   if (h5->parallel)
+   {
+      /* Decide on collective or independent. */
+      hdf5_xfer_mode = (var->parallel_access != NC_INDEPENDENT) ?
+         H5FD_MPIO_COLLECTIVE : H5FD_MPIO_INDEPENDENT;
+
+      /* Set the mode in the transfer property list. */
+      if (H5Pset_dxpl_mpio(xfer_plistid, hdf5_xfer_mode) < 0)
+         return NC_EPARINIT;
+
+      LOG((4, "hdf5_xfer_mode: %d H5FD_MPIO_COLLECTIVE: %d H5FD_MPIO_INDEPENDENT: %d", 
+           (int)hdf5_xfer_mode, H5FD_MPIO_COLLECTIVE, H5FD_MPIO_INDEPENDENT));
+   }
+   return NC_NOERR;
+}
+#endif
+
+/* Write an array of data to a variable. When it comes right down to
+ * it, this is what netCDF-4 is all about, this is *the* function, the
+ * big enchilda, the grand poo-bah, the alpha dog, the head honcho,
+ * the big cheese, the mighty kahuna, the top bananna, the high
+ * muckity-muck, numero uno. Well, you get the idea.  */
+int 
+nc4_put_vara(NC_FILE_INFO_T *nc, int ncid, int varid, const size_t *startp, 
+		      const size_t *countp, nc_type mem_nc_type, int is_long, void *data)
+{
+   NC_GRP_INFO_T *grp;
+   NC_HDF5_FILE_INFO_T *h5;
+   NC_VAR_INFO_T *var;
+   NC_DIM_INFO_T *dim;
+
+   hid_t file_spaceid = 0, mem_spaceid = 0, xfer_plistid = 0;
+   size_t file_type_size;
+
+   hsize_t *xtend_size = NULL, count[NC_MAX_VAR_DIMS];
+   hsize_t fdims[NC_MAX_VAR_DIMS], fmaxdims[NC_MAX_VAR_DIMS];
+   hsize_t start[NC_MAX_VAR_DIMS];
+   int need_to_extend = 0;
+   int scalar = 0, retval = NC_NOERR, range_error = 0, i, d2;
+   void *bufr = NULL;
+#ifndef HDF5_CONVERT   
+   int need_to_convert = 0;
+   size_t len = 1;
+#endif
+#ifdef HDF5_CONVERT
+   hid_t mem_typeid = 0;
+#endif   
+   int no_data=0 ;
+   
+   /* Find our metadata for this file, group, and var. */
+   assert(nc);
+   if ((retval = nc4_find_g_var_nc(nc, ncid, varid, &grp, &var)))
+      return retval;
+   h5 = nc->nc4_info;
+   assert(grp && h5 && var && var->name);
+
+   LOG((3, "nc4_put_vara: var->name %s mem_nc_type %d is_long %d", 
+        var->name, mem_nc_type, is_long));
+
+   /* Check some stuff about the type and the file. If the file must
+    * be switched from define mode, it happens here. */
+   if ((retval = check_for_vara(&mem_nc_type, var, h5)))
+      return retval;
+
+   /* Convert from size_t and ptrdiff_t to hssize_t, and hsize_t. */
+   for (i = 0; i < var->ndims; i++)
+   {
+      start[i] = startp[i];
+      count[i] = countp[i];
+   }
+   
+   /* Open this dataset if necessary, also checking for a weird case:
+    * a non-coordinate (and non-scalar) variable that has the same
+    * name as a dimension. */
+   if (var->hdf5_name && strlen(var->hdf5_name) >= strlen(NON_COORD_PREPEND) && 
+       strncmp(var->hdf5_name, NON_COORD_PREPEND, strlen(NON_COORD_PREPEND)) == 0 &&
+       var->ndims)
+       if ((var->hdf_datasetid = H5Dopen2(grp->hdf_grpid, var->hdf5_name,
+					  H5P_DEFAULT)) < 0)
+	   return NC_ENOTVAR;
+   if (!var->hdf_datasetid)
+       if ((var->hdf_datasetid = H5Dopen2(grp->hdf_grpid, var->name,
+					  H5P_DEFAULT)) < 0)
+	   return NC_ENOTVAR;
+
+   /* Get file space of data. */
+   if ((file_spaceid = H5Dget_space(var->hdf_datasetid)) < 0) 
+      BAIL(NC_EHDFERR);
+#ifdef EXTRA_TESTS
+   num_spaces++;
+#endif
+
+   /* Check to ensure the user selection is
+    * valid. H5Sget_simple_extent_dims gets the sizes of all the dims
+    * and put them in fdims. */
+   if (H5Sget_simple_extent_dims(file_spaceid, fdims, fmaxdims) < 0)
+      BAIL(NC_EHDFERR);
+      
+#ifdef LOGGING
+   log_dim_info(var, fdims, fmaxdims, start, count);
+#endif
+
+   /* Check dimension bounds. Remember that unlimited dimnsions can
+    * put data beyond their current length. */
+   for (d2 = 0; d2 < var->ndims; d2++)
+   {
+      for (dim = grp->dim; dim; dim = dim->next)
+      {
+         if (dim->dimid == var->dimids[d2])
+         {
+            if (!dim->unlimited)
+            {
+               if (start[d2] >= (hssize_t)fdims[d2])
+                  BAIL_QUIET(NC_EINVALCOORDS);
+               if (start[d2] + count[d2] > fdims[d2])
+                  BAIL_QUIET(NC_EEDGE);
+            }
+         }
+      }
+   }
+
+
+   /* A little quirk: if any of the count values are zero, then
+      return success and forget about it. */
+
+   for (d2 = 0; d2 < var->ndims; d2++)
+      if (count[d2] != 0) no_data++ ;
+/*         goto exit; */
+   
+   /* Now you would think that no one would be crazy enough to write
+      a scalar dataspace with one of the array function calls, but you
+      would be wrong. So let's check to see if the dataset is
+      scalar. If it is, we won't try to set up a hyperslab. */
+   if (H5Sget_simple_extent_type(file_spaceid) == H5S_SCALAR)
+   {
+      if ((mem_spaceid = H5Screate(H5S_SCALAR)) < 0) 
+         BAIL(NC_EHDFERR);
+#ifdef EXTRA_TESTS
+      num_spaces++;
+#endif
+      scalar++;
+   }
+   else
+   {
+      if (H5Sselect_hyperslab(file_spaceid, H5S_SELECT_SET, start, NULL, 
+                              count, NULL) < 0)
+         BAIL(NC_EHDFERR);
+
+      /* Create a space for the memory, just big enough to hold the slab
+         we want. */
+      if ((mem_spaceid = H5Screate_simple(var->ndims, count, NULL)) < 0) 
+         BAIL(NC_EHDFERR);
+#ifdef EXTRA_TESTS
+      num_spaces++;
+#endif
+   }
+   
+   /* Later on, we will need to know the size of this type in the
+    * file. */
+   if ((retval = nc4_get_typelen_mem(h5, var->xtype, 0, &file_type_size)))
+      return retval;
+
+#ifndef HDF5_CONVERT   
+   /* Are we going to convert any data? (No converting of compound or
+    * opaque types.) */
+   if ((mem_nc_type != var->xtype || (var->xtype == NC_INT && is_long)) && 
+       mem_nc_type != NC_COMPOUND && mem_nc_type != NC_OPAQUE)
+   {
+      /* We must convert - allocate a buffer. */
+      need_to_convert++;
+      if (var->ndims)
+         for (d2=0; d2<var->ndims; d2++)
+            len *= countp[d2];
+      LOG((4, "converting data for var %s type=%d len=%d", var->name, 
+           var->xtype, len));
+
+      /* If we're reading, we need bufr to have enough memory to store
+       * the data in the file. If we're writing, we need bufr to be
+       * big enough to hold all the data in the file's type. */
+      if (!(bufr = malloc(len * file_type_size)))
+         BAIL(NC_ENOMEM);
+   }
+   else
+#endif /* ifndef HDF5_CONVERT */
+      bufr = data;
+
+#ifdef HDF5_CONVERT
+   /* Get the HDF type of the data in memory. */
+   if ((retval = nc4_get_hdf_typeid(h5, mem_nc_type, &mem_typeid, 
+				    var->type_info->endianness)))
+      BAIL(retval);
+#endif
+   
+   /* Create the data transfer property list. */
+   if ((xfer_plistid = H5Pcreate(H5P_DATASET_XFER)) < 0)
+      BAIL(NC_EHDFERR);
+#ifdef EXTRA_TESTS
+      num_plists++;
+#endif
+
+   /* Apply the callback function which will detect range
+    * errors. Which one to call depends on the length of the
+    * destination buffer type. */
+#ifdef HDF5_CONVERT
+   if (H5Pset_type_conv_cb(xfer_plistid, except_func, &range_error) < 0) 
+      BAIL(NC_EHDFERR);
+#endif
+
+#ifdef USE_PARALLEL
+   /* Set up parallel I/O, if needed. */
+   if ((retval = set_par_access(h5, var, xfer_plistid)))
+      BAIL(retval);
+#endif
+
+   /* Read/write this hyperslab into memory. */
+   /* Does the dataset have to be extended? If it's already
+      extended to the required size, it will do no harm to reextend
+      it to that size. */
+   if (var->ndims)
+   {
+      if (!(xtend_size = malloc(var->ndims * sizeof(hsize_t))))
+         BAIL(NC_ENOMEM);
+      for (d2 = 0; d2 < var->ndims; d2++)
+      {
+         if ((retval = nc4_find_dim(grp, var->dimids[d2], &dim, NULL)))
+            BAIL(retval);
+         if (dim->unlimited)
+         {
+            if (start[d2] + count[d2] > fdims[d2])
+            {
+               xtend_size[d2] = start[d2] + count[d2];
+               need_to_extend++;
+            }
+            else
+               xtend_size[d2] = fdims[d2];
+
+            if (start[d2] + count[d2] > dim->len)
+            {
+               dim->len = start[d2] + count[d2];
+               dim->extended++;
+            }
+         }
+         else
+         {
+            xtend_size[d2] = dim->len;
+         }
+      }
+
+      /* If we need to extend it, we also need a new file_spaceid
+         to reflect the new size of the space. */
+      if (need_to_extend)
+      {
+         LOG((4, "extending dataset"));
+         if (H5Dextend(var->hdf_datasetid, xtend_size) < 0)
+            BAIL(NC_EHDFERR);
+	 if (file_spaceid > 0 && H5Sclose(file_spaceid) < 0)
+	    BAIL2(NC_EHDFERR);
+         if ((file_spaceid = H5Dget_space(var->hdf_datasetid)) < 0) 
+            BAIL(NC_EHDFERR);
+#ifdef EXTRA_TESTS
+	 num_spaces++;
+#endif
+         if (H5Sselect_hyperslab(file_spaceid, H5S_SELECT_SET, 
+                                 start, NULL, count, NULL) < 0)
+            BAIL(NC_EHDFERR);
+      }
+   }
+
+#ifndef HDF5_CONVERT
+   /* Do we need to convert the data? */
+   if (need_to_convert)
+   {
+      if ((retval = nc4_convert_type(data, bufr, mem_nc_type, var->xtype, 
+                                     len, &range_error, var->fill_value,
+                                     (h5->cmode & NC_CLASSIC_MODEL), is_long, 0)))
+         BAIL(retval);
+   }
+#endif
+
+   /* Write the data. At last! */
+   LOG((4, "about to H5Dwrite datasetid 0x%x mem_spaceid 0x%x "
+	"file_spaceid 0x%x", var->hdf_datasetid, mem_spaceid, file_spaceid));
+/*
+   if (no_data==0)
+   {
+     H5Sselect_none(mem_spaceid);
+     H5Sselect_none(file_spaceid);
+     bufr=NULL ;
+   }
+*/  
+/*   if (no_data!=0) */
+        if (H5Dwrite(var->hdf_datasetid, var->type_info->hdf_typeid, 
+	     	  mem_spaceid, file_spaceid, xfer_plistid, bufr) < 0)
+        BAIL(NC_EHDFERR);
+      
+
+   /* Remember that we have written to this var so that Fill Value
+    * can't be set for it. */
+   if (!var->written_to)
+      var->written_to++;
+
+   /* For strict netcdf-3 rules, ignore erange errors between UBYTE
+    * and BYTE types. */
+   if ((h5->cmode & NC_CLASSIC_MODEL) &&
+       (var->xtype == NC_UBYTE || var->xtype == NC_BYTE) &&
+       (mem_nc_type == NC_UBYTE || mem_nc_type == NC_BYTE) &&
+       range_error)
+      range_error = 0;
+
+  exit:
+   if (file_spaceid > 0 && H5Sclose(file_spaceid) < 0)
+      BAIL2(NC_EHDFERR);
+#ifdef EXTRA_TESTS
+   num_spaces--;
+#endif
+   if (mem_spaceid > 0 && H5Sclose(mem_spaceid) < 0)
+      BAIL2(NC_EHDFERR);
+#ifdef EXTRA_TESTS
+   num_spaces--;
+#endif
+   if (xfer_plistid && (H5Pclose(xfer_plistid) < 0))
+      BAIL2(NC_EPARINIT);
+#ifdef EXTRA_TESTS
+      num_plists--;
+#endif
+#ifndef HDF5_CONVERT
+   if (need_to_convert) free(bufr);
+#endif
+   if (xtend_size) free(xtend_size);
+
+   /* If there was an error return it, otherwise return any potential
+      range error value. If none, return NC_NOERR as usual.*/
+   if (retval)      
+      return retval;
+   if (range_error)
+      return NC_ERANGE;
+   return NC_NOERR;
+}
+
+int 
+nc4_get_vara(NC_FILE_INFO_T *nc, int ncid, int varid, const size_t *startp, 
+		      const size_t *countp, nc_type mem_nc_type, int is_long, void *data)
+{
+   NC_GRP_INFO_T *grp, *g;
+   NC_HDF5_FILE_INFO_T *h5;
+   NC_VAR_INFO_T *var;
+   NC_DIM_INFO_T *dim;
+
+   hid_t file_spaceid = 0, mem_spaceid = 0;
+   hid_t xfer_plistid = 0;
+   hid_t hdf_datasetid;
+   size_t file_type_size;
+
+   hsize_t *xtend_size = NULL, count[NC_MAX_VAR_DIMS];
+   hsize_t fdims[NC_MAX_VAR_DIMS], fmaxdims[NC_MAX_VAR_DIMS];
+   hsize_t start[NC_MAX_VAR_DIMS];
+   void *fillvalue = NULL;
+   int no_read = 0, provide_fill = 0;
+   int fill_value_size[NC_MAX_VAR_DIMS];
+   int scalar = 0, retval = NC_NOERR, range_error = 0, i, d2;
+   void *bufr = NULL;
+   int break_it;
+#ifndef HDF5_CONVERT   
+   int need_to_convert = 0;
+   size_t len = 1;
+#endif
+
+   /* Find our metadata for this file, group, and var. */
+   assert(nc);
+   if ((retval = nc4_find_g_var_nc(nc, ncid, varid, &grp, &var)))
+      return retval;
+   h5 = nc->nc4_info;
+   assert(grp && h5 && var && var->name);
+
+   LOG((3, "nc4_get_vara: var->name %s mem_nc_type %d is_long %d", 
+        var->name, mem_nc_type, is_long));
+
+   /* Check some stuff about the type and the file. */
+   if ((retval = check_for_vara(&mem_nc_type, var, h5)))
+      return retval;
+
+   /* Convert from size_t and ptrdiff_t to hssize_t, and hsize_t. */
+   for (i = 0; i < var->ndims; i++)
+   {
+      start[i] = startp[i];
+      count[i] = countp[i];
+   }
+
+   /* Open this dataset if necessary, also checking for a weird case:
+    * a non-coordinate (and non-scalar) variable that has the same
+    * name as a dimension. */
+   if (var->hdf5_name && strlen(var->hdf5_name) >= strlen(NON_COORD_PREPEND) && 
+       strncmp(var->hdf5_name, NON_COORD_PREPEND, strlen(NON_COORD_PREPEND)) == 0 &&
+       var->ndims)
+       if ((var->hdf_datasetid = H5Dopen2(grp->hdf_grpid, var->hdf5_name,
+					  H5P_DEFAULT)) < 0)
+	   return NC_ENOTVAR;
+   if (!var->hdf_datasetid)
+       if ((var->hdf_datasetid = H5Dopen2(grp->hdf_grpid, var->name,
+					  H5P_DEFAULT)) < 0)
+	   return NC_ENOTVAR;
+
+   /* Get file space of data. */
+   if ((file_spaceid = H5Dget_space(var->hdf_datasetid)) < 0) 
+      BAIL(NC_EHDFERR);
+#ifdef EXTRA_TESTS
+   num_spaces++;
+#endif
+
+   /* Check to ensure the user selection is
+    * valid. H5Sget_simple_extent_dims gets the sizes of all the dims
+    * and put them in fdims. */
+   if (H5Sget_simple_extent_dims(file_spaceid, fdims, fmaxdims) < 0)
+      BAIL(NC_EHDFERR);
+
+#ifdef LOGGING
+   log_dim_info(var, fdims, fmaxdims, start, count);
+#endif
+
+   /* Check dimension bounds. Remember that unlimited dimnsions can
+    * put data beyond their current length. */
+   for (d2 = 0, break_it = 0; d2 < var->ndims; d2++)
+   {
+      for (g = grp; g && !break_it; g = g->parent)
+         for (dim = g->dim; dim; dim = dim->next)
+         {
+            if (dim->dimid == var->dimids[d2])
+            {
+               if (!dim->unlimited)
+               {
+                  if (start[d2] >= (hssize_t)fdims[d2])
+                     BAIL_QUIET(NC_EINVALCOORDS);
+                  if (start[d2] + count[d2] > fdims[d2])
+                     BAIL_QUIET(NC_EEDGE);
+               }
+               if (dim->unlimited)
+               {
+                  size_t ulen;
+                  
+                  /* We can't go beyond the latgest current extent of
+                     the unlimited dim. */
+                  if ((retval = nc_inq_dimlen(ncid, dim->dimid, &ulen)))
+                     BAIL(retval);
+                  
+                  /* Check for out of bound requests. */
+                  if (start[d2] >= (hssize_t)ulen && count[d2])
+                     BAIL_QUIET(NC_EINVALCOORDS);
+                  if (start[d2] + count[d2] > ulen)
+                     BAIL_QUIET(NC_EEDGE);
+                  
+                  /* THings get a little tricky here. If we're getting
+                     a GET request beyond the end of this var's
+                     current length in an unlimited dimension, we'll
+                     later need to return the fill value for the
+                     variable. */
+                  if (start[d2] >= (hssize_t)fdims[d2])
+                     fill_value_size[d2] = count[d2];
+                  else if (start[d2] + count[d2] > fdims[d2])
+                     fill_value_size[d2] = count[d2] - (fdims[d2] - start[d2]);
+                  else
+                     fill_value_size[d2] = 0;
+                  count[d2] -= fill_value_size[d2];
+                  if (fill_value_size[d2])
+                     provide_fill++;
+               }
+               else
+                  fill_value_size[d2] = count[d2];
+            }
+         }
+   }
+   
+   /* A little quirk: if any of the count values are zero, don't
+    * read. */
+   for (d2 = 0; d2 < var->ndims; d2++)
+      if (count[d2] == 0)
+         no_read++;
+   
+   /* Later on, we will need to know the size of this type in the
+    * file. */
+   if ((retval = nc4_get_typelen_mem(h5, var->xtype, 0, &file_type_size)))
+      return retval;
+
+   if (!no_read)
+   {
+      /* Now you would think that no one would be crazy enough to write
+         a scalar dataspace with one of the array function calls, but you
+         would be wrong. So let's check to see if the dataset is
+         scalar. If it is, we won't try to set up a hyperslab. */
+      if (H5Sget_simple_extent_type(file_spaceid) == H5S_SCALAR)
+      {
+         if ((mem_spaceid = H5Screate(H5S_SCALAR)) < 0) 
+            BAIL(NC_EHDFERR);
+         scalar++;
+#ifdef EXTRA_TESTS
+	 num_spaces++;
+#endif
+      }
+      else
+      {
+         if (H5Sselect_hyperslab(file_spaceid, H5S_SELECT_SET, 
+                                 start, NULL, count, NULL) < 0)
+            BAIL(NC_EHDFERR);
+         /* Create a space for the memory, just big enough to hold the slab
+            we want. */
+         if ((mem_spaceid = H5Screate_simple(var->ndims, count, NULL)) < 0) 
+            BAIL(NC_EHDFERR);
+#ifdef EXTRA_TESTS
+	 num_spaces++;
+#endif
+      }
+
+      /* Fix bug when reading HDF5 files with variable of type
+       * fixed-length string.  We need to make it look like a
+       * variable-length string, because that's all netCDF-4 data
+       * model supports, lacking anonymous dimensions.  So
+       * variable-length strings are in allocated memory that user has
+       * to free, which we allocate here. */
+      if(var->type_info->class == H5T_STRING && 
+	 H5Tget_size(var->type_info->hdf_typeid) > 1 &&
+	 !H5Tis_variable_str(var->type_info->hdf_typeid)) {
+	  hsize_t fstring_len;
+	  if ((fstring_len = H5Tget_size(var->type_info->hdf_typeid)) < 0)
+	      BAIL(NC_EHDFERR);
+      	  if (!(*(char **)data = malloc(1 + fstring_len)))
+      	      BAIL(NC_ENOMEM);
+	  bufr = *(char **)data;
+      }
+   
+#ifndef HDF5_CONVERT   
+      /* Are we going to convert any data? (No converting of compound or
+       * opaque types.) */
+      if ((mem_nc_type != var->xtype || (var->xtype == NC_INT && is_long)) && 
+          mem_nc_type != NC_COMPOUND && mem_nc_type != NC_OPAQUE)
+      {
+         /* We must convert - allocate a buffer. */
+         need_to_convert++;
+         if (var->ndims)
+            for (d2 = 0; d2 < var->ndims; d2++)
+               len *= countp[d2];
+         LOG((4, "converting data for var %s type=%d len=%d", var->name, 
+              var->xtype, len));
+
+         /* If we're reading, we need bufr to have enough memory to store
+          * the data in the file. If we're writing, we need bufr to be
+          * big enough to hold all the data in the file's type. */
+         if (!(bufr = malloc(len * file_type_size)))
+            BAIL(NC_ENOMEM);
+      }
+      else
+#endif /* ifndef HDF5_CONVERT */
+	  if(!bufr)
+	      bufr = data;
+
+      /* Get the HDF type of the data in memory. */
+#ifdef HDF5_CONVERT
+      if ((retval = nc4_get_hdf_typeid(h5, mem_nc_type, &mem_typeid, 
+				       var->type_info->endianness)))
+         BAIL(retval);
+#endif
+   
+      /* Create the data transfer property list. */
+      if ((xfer_plistid = H5Pcreate(H5P_DATASET_XFER)) < 0)
+         BAIL(NC_EHDFERR);
+#ifdef EXTRA_TESTS
+      num_plists++;
+#endif
+
+#ifdef HDF5_CONVERT
+      /* Apply the callback function which will detect range
+       * errors. Which one to call depends on the length of the
+       * destination buffer type. */
+      if (H5Pset_type_conv_cb(xfer_plistid, except_func, &range_error) < 0) 
+         BAIL(NC_EHDFERR);
+#endif
+
+#ifdef USE_PARALLEL
+      /* Set up parallel I/O, if needed. */
+      if ((retval = set_par_access(h5, var, xfer_plistid)))
+         BAIL(retval);
+#endif
+
+      /* Read this hyperslab into memory. */
+      LOG((5, "About to H5Dread some data..."));
+      if (H5Dread(var->hdf_datasetid, var->type_info->native_typeid, 
+                  mem_spaceid, file_spaceid, xfer_plistid, bufr) < 0)
+         BAIL(NC_EHDFERR);
+
+#ifndef HDF5_CONVERT
+      /* Eventually the block below will go away. Right now it's
+         needed to support conversions between int/float, and range
+         checking converted data in the netcdf way. These features are
+         being added to HDF5 at the HDF5 World Hall of Coding right
+         now, by a staff of thousands of programming gnomes. */
+      if (need_to_convert)
+      {
+         if ((retval = nc4_convert_type(bufr, data, var->xtype, mem_nc_type, 
+                                        len, &range_error, var->fill_value, 
+                                        (h5->cmode & NC_CLASSIC_MODEL), 0, is_long)))
+            BAIL(retval);
+
+         /* For strict netcdf-3 rules, ignore erange errors between UBYTE
+          * and BYTE types. */
+         if ((h5->cmode & NC_CLASSIC_MODEL) &&
+             (var->xtype == NC_UBYTE || var->xtype == NC_BYTE) &&
+             (mem_nc_type == NC_UBYTE || mem_nc_type == NC_BYTE) &&
+             range_error)
+            range_error = 0;
+      }
+#endif
+
+      /* For strict netcdf-3 rules, ignore erange errors between UBYTE
+       * and BYTE types. */
+      if ((h5->cmode & NC_CLASSIC_MODEL) &&
+          (var->xtype == NC_UBYTE || var->xtype == NC_BYTE) &&
+          (mem_nc_type == NC_UBYTE || mem_nc_type == NC_BYTE) &&
+          range_error)
+         range_error = 0;
+
+   } /* endif ! no_read */
+
+   /* Now we need to fake up any further data that was asked for,
+      using the fill values instead. First skip past the data we
+      just read, if any. */
+   if (!scalar && provide_fill)
+   {
+      void *filldata;
+      size_t real_data_size = 0;
+      size_t fill_len;
+
+      /* Skip past the real data we've already read. */
+      if (!no_read)
+         for (real_data_size = file_type_size, d2 = 0; d2 < var->ndims; d2++)
+            real_data_size *= (count[d2] - start[d2]);
+
+      /* Get the fill value from the HDF5 variable. Memory will be
+       * allocated. */
+      if (get_fill_value(h5, var, &fillvalue) < 0)
+         BAIL(NC_EHDFERR);
+
+      /* How many fill values do we need? */
+      for (fill_len = 1, d2 = 0; d2 < var->ndims; d2++)      
+         fill_len *= (fill_value_size[d2] ? fill_value_size[d2] : 1);
+
+      /* Copy the fill value into the rest of the data buffer. */
+      filldata = (char *)data + real_data_size;
+      for (i = 0; i < fill_len; i++)
+      {
+         if (var->xtype == NC_STRING)
+         {
+            if (!(*(char **)filldata = malloc(sizeof(*(char **)fillvalue))))
+               return NC_ENOMEM;
+            strcpy(*(char **)filldata, *(char **)fillvalue);
+         }
+         else
+         {
+            memcpy(filldata, fillvalue, file_type_size);
+            filldata = (char *)filldata + file_type_size;
+         }
+      }
+   }
+
+  exit:
+/**   if (var->xtype == NC_CHAR && mem_typeid > 0 && H5Tclose(mem_typeid) < 0)
+      BAIL2(NC_EHDFERR);*/
+   if (file_spaceid > 0)
+   {
+      if (H5Sclose(file_spaceid) < 0)
+	 BAIL2(NC_EHDFERR);
+#ifdef EXTRA_TESTS
+      num_spaces--;
+#endif
+   }
+   if (mem_spaceid > 0)
+   {
+      if (H5Sclose(mem_spaceid) < 0)
+	 BAIL2(NC_EHDFERR);
+#ifdef EXTRA_TESTS
+      num_spaces--;
+#endif
+   }
+   if (xfer_plistid > 0)
+   {
+      if (H5Pclose(xfer_plistid) < 0)
+	 BAIL2(NC_EHDFERR);
+#ifdef EXTRA_TESTS
+      num_plists--;
+#endif
+   }
+#ifndef HDF5_CONVERT
+   if (need_to_convert) 
+      free(bufr);
+#endif
+   if (xtend_size) 
+      free(xtend_size);
+   if (fillvalue) 
+   {
+      if (var->xtype == NC_STRING)
+      {
+         if (nc_free_string(1, (char **)fillvalue)) 
+            return NC_ENOMEM;
+      }
+      else
+         free(fillvalue);
+   }
+
+   /* If there was an error return it, otherwise return any potential
+      range error value. If none, return NC_NOERR as usual.*/
+   if (retval)      
+      return retval;
+   if (range_error)
+      return NC_ERANGE;
+   return NC_NOERR;
+}
+
+/* This function is a bit of a hack. Turns out that HDF5 dimension
+ * scales cannot themselves have scales attached. This leaves
+ * multidimensional coordinate variables hosed. So this function
+ * writes a special attribute for such a variable, which has the ids
+ * of all the dimensions for that coordinate variable. This sucks,
+ * really. But that's the way the cookie crumbles. Better luck next
+ * time. This function also contains a new way of dealing with HDF5
+ * error handling, abandoning the BAIL macros for a more organic and
+ * natural approach, made with whole grains, and locally-grown
+ * vegetables. */
+static int
+write_coord_dimids(NC_VAR_INFO_T *var)      
+{
+   hsize_t coords_len[1];
+   hid_t c_spaceid = -1, c_attid = -1;
+   int ret = 0;
+
+   /* Write our attribute. */
+   coords_len[0] = var->ndims;
+   if ((c_spaceid = H5Screate_simple(1, coords_len, coords_len)) < 0) ret++;
+#ifdef EXTRA_TESTS
+      num_spaces++;
+#endif
+   if (!ret && (c_attid = H5Acreate(var->hdf_datasetid, COORDINATES, H5T_NATIVE_INT, 
+                                    c_spaceid, H5P_DEFAULT)) < 0) ret++;
+   if (!ret && H5Awrite(c_attid, H5T_NATIVE_INT, var->dimids) < 0) ret++;
+
+   /* Close up shop. */
+   if (c_spaceid > 0 && H5Sclose(c_spaceid) < 0) ret++;
+#ifdef EXTRA_TESTS
+   num_spaces--;
+#endif
+   if (c_attid > 0 && H5Aclose(c_attid) < 0) ret++;
+   return ret ? NC_EHDFERR : 0;
+}
+
+/* Write a special attribute for the netCDF-4 dimension ID. */
+static int
+write_netcdf4_dimid(hid_t datasetid, int dimid)
+{
+   hid_t dimid_spaceid, dimid_attid;
+
+   /* Create the space. */
+   if ((dimid_spaceid = H5Screate(H5S_SCALAR)) < 0) 
+      return NC_EHDFERR;
+#ifdef EXTRA_TESTS
+   num_spaces++;
+#endif
+
+   /* Does the attribute already exist? If so, don't try to create it. */
+   H5E_BEGIN_TRY { 
+      dimid_attid = H5Aopen_by_name(datasetid, ".", NC_DIMID_ATT_NAME, 
+				    H5P_DEFAULT, H5P_DEFAULT);
+   } H5E_END_TRY;
+  
+   /* Create the attribute if needed. */
+   if (dimid_attid < 0)
+      if ((dimid_attid = H5Acreate(datasetid, NC_DIMID_ATT_NAME, 
+				   H5T_NATIVE_INT, dimid_spaceid, H5P_DEFAULT)) < 0)
+	 return NC_EHDFERR;
+
+   /* Write it. */
+   LOG((4, "write_netcdf4_dimid: writting secret dimid %d", dimid));
+   if (H5Awrite(dimid_attid, H5T_NATIVE_INT, &dimid) < 0)
+      return NC_EHDFERR;
+
+   /* Close stuff*/
+   if (H5Sclose(dimid_spaceid) < 0) 
+      return NC_EHDFERR;
+#ifdef EXTRA_TESTS
+   num_spaces--;
+#endif
+   if (H5Aclose(dimid_attid) < 0)
+      return NC_EHDFERR;
+
+   return NC_NOERR;
+}
+
+/* This function creates the HDF5 dataset for a variabale. */
+static int
+var_create_dataset(NC_GRP_INFO_T *grp, NC_VAR_INFO_T *var, int write_dimid)
+{
+   NC_GRP_INFO_T *g;
+   hid_t plistid = 0, access_plistid = 0, typeid = 0, spaceid = 0;
+   hsize_t *chunksize = NULL, *dimsize = NULL, *maxdimsize = NULL;
+   int d;
+   NC_DIM_INFO_T *dim = NULL;
+   void *fillp = NULL;
+   int dims_found = 0;
+   int set_chunksizes = 0;
+   char *name_to_use;
+   int retval = NC_NOERR;
+   
+   LOG((3, "var_create_dataset: name %s", var->name));
+
+   /* Scalar or not, we need a creation property list. */
+   if ((plistid = H5Pcreate(H5P_DATASET_CREATE)) < 0)
+      BAIL(NC_EHDFERR);
+#ifdef EXTRA_TESTS
+      num_plists++;
+#endif
+   if ((access_plistid = H5Pcreate(H5P_DATASET_ACCESS)) < 0)
+      BAIL(NC_EHDFERR);
+#ifdef EXTRA_TESTS
+      num_plists++;
+#endif
+
+   /* Find the HDF5 type of the dataset. */
+   if ((retval = nc4_get_hdf_typeid(grp->file->nc4_info, var->xtype, &typeid, 
+				    var->type_info->endianness)))
+      BAIL(retval);
+
+   /* Figure out what fill value to set, if any. */
+   if (!var->no_fill)
+   {
+      if ((retval = get_fill_value(grp->file->nc4_info, var, &fillp)))
+         BAIL(retval);
+
+      /* If there is a fill value, set it. */
+      if (fillp)
+      {
+         if (var->xtype == NC_STRING)
+         {
+            if (H5Pset_fill_value(plistid, typeid, &fillp) < 0)
+               BAIL(NC_EHDFERR);
+            free((char *)fillp);
+         }
+         else 
+         {
+	    /* The fill value set in HDF5 must always be presented as
+	     * a native type, even if the endianness for this dataset
+	     * is non-native. HDF5 will translate the fill value to
+	     * the target endiannesss. */
+	    hid_t fill_typeid;
+            if ((retval = nc4_get_hdf_typeid(grp->file->nc4_info, var->xtype, &fill_typeid, 
+					     NC_ENDIAN_NATIVE)))
+               BAIL(retval);
+            if (H5Pset_fill_value(plistid, fill_typeid, fillp) < 0)
+               BAIL(NC_EHDFERR);
+            if (var->type_info->class == NC_VLEN)
+               nc_free_vlen((nc_vlen_t *)fillp);
+            else
+               free(fillp);
+            if (var->type_info->nc_typeid == NC_STRING || var->type_info->nc_typeid == NC_CHAR)
+	       if (H5Tclose(fill_typeid) < 0)
+		  BAIL(NC_EHDFERR);
+         }
+      }
+   } else {
+       /* Required to truly turn HDF5 fill values off */
+       if(H5Pset_fill_time(plistid,H5D_FILL_TIME_NEVER) < 0)
+	   BAIL(NC_EHDFERR);
+   }
+
+   /* If the user wants to shuffle the data, set that up now. */
+   if (var->shuffle)
+      if (H5Pset_shuffle(plistid) < 0)
+         BAIL(NC_EHDFERR);
+
+   /* If the user wants to deflate the data, set that up now. */
+   if (var->deflate)
+      if (H5Pset_deflate(plistid, var->deflate_level) < 0)
+         BAIL(NC_EHDFERR);
+
+   /* Szip? NO! We don't want anyone to produce szipped netCDF files! */
+/* #ifdef USE_SZIP */
+/*    if (var->options_mask) */
+/*       if (H5Pset_szip(plistid, var->options_mask, var->bits_per_pixel) < 0) */
+/*          BAIL(NC_EHDFERR); */
+/* #endif */
+  
+   /* If the user wants to fletcher error correcton, set that up now. */
+   if (var->fletcher32)
+      if (H5Pset_fletcher32(plistid) < 0)
+         BAIL(NC_EHDFERR);
+
+   /* If ndims non-zero, get info for all dimensions. We look up the
+      dimids and get the len of each dimension. We need this to create
+      the space for the dataset. In netCDF a dimension length of zero
+      means an unlimited dimension. */
+   if (var->ndims)
+   {
+      int unlimdim = 0;
+
+      /* Check to see if any unlimited dimensions are used in this var. */
+      for (d = 0; d < var->ndims; d++)
+	 if (var->dim[d]->unlimited)
+	    unlimdim++;
+
+      /* If there are no unlimited dims, and no filters, and the user
+       * has not specified chunksizes, use contiguous variable for
+       * better performance. */
+      if (!unlimdim && !var->shuffle && !var->deflate && !var->options_mask &&
+          !var->fletcher32 && !var->chunksizes[0])
+         var->contiguous = 1;
+
+      if (!(dimsize = malloc(var->ndims * sizeof(hsize_t))))
+         BAIL(NC_ENOMEM);
+      if (!(maxdimsize = malloc(var->ndims * sizeof(hsize_t))))
+         BAIL(NC_ENOMEM);
+      if (!(chunksize = malloc(var->ndims * sizeof(hsize_t))))
+         BAIL(NC_ENOMEM);
+/*      for (d = 0; d < var->ndims; d++)
+	 dimsize[d] = var->dim[d]->unlimited ? NC_HDF5_UNLIMITED_DIMSIZE : var->dim[d]->len;
+      maxdimsize[d] = var->dim[d]->unlimited ? H5S_UNLIMITED : (hsize_t)var->dim[d]->len;
+      chunksize[d] = var->chunksizes[d];*/
+   
+         for (d = 0; d < var->ndims; d++)
+         for (g = grp; g && (dims_found < var->ndims); g = g->parent)
+            for (dim = g->dim; dim; dim = dim->next)
+               if (dim->dimid == var->dimids[d])
+               {
+                  dimsize[d] = dim->unlimited ? NC_HDF5_UNLIMITED_DIMSIZE : dim->len;
+                  maxdimsize[d] = dim->unlimited ? H5S_UNLIMITED : (hsize_t)dim->len;
+                  if (var->chunksizes[d])
+                     chunksize[d] = var->chunksizes[d];
+                  else
+                  {
+		     size_t type_size;
+		     if (var->type_info->nc_typeid == NC_STRING)
+			type_size = sizeof(char *);
+		     else
+			type_size = var->type_info->size;
+		     
+		     /* Unlimited dim always gets chunksize of 1. */
+		     if (dim->unlimited)
+			chunksize[d] = 1;
+		     else
+			chunksize[d] = pow((double)DEFAULT_CHUNK_SIZE/type_size, 
+					   1/(double)(var->ndims - unlimdim));
+		     
+		     /* If the chunksize is greater than the dim
+		      * length, make it the dim length. */
+		     if (!dim->unlimited && chunksize[d] > dim->len)
+			chunksize[d] = dim->len;
+		     set_chunksizes++;
+                  }
+
+                  if (!var->contiguous && !var->chunksizes[d])
+                     var->chunksizes[d] = chunksize[d];
+                  dims_found++;
+                  break;
+               }
+      
+      if (var->contiguous)
+      {
+         if (H5Pset_layout(plistid, H5D_CONTIGUOUS) < 0)
+            BAIL(NC_EHDFERR);
+      }
+      else
+      {
+         if (H5Pset_chunk(plistid, var->ndims, chunksize) < 0)
+            BAIL(NC_EHDFERR);
+      }
+   
+      /* Create the dataspace. */
+      if ((spaceid = H5Screate_simple(var->ndims, dimsize, maxdimsize)) < 0)
+         BAIL(NC_EHDFERR);
+#ifdef EXTRA_TESTS
+      num_spaces++;
+#endif
+   }
+   else
+   {
+      if ((spaceid = H5Screate(H5S_SCALAR)) < 0)
+         BAIL(NC_EHDFERR);
+#ifdef EXTRA_TESTS
+      num_spaces++;
+#endif
+   }
+
+   /* Turn on creation order tracking. */
+   if (H5Pset_attr_creation_order(plistid, H5P_CRT_ORDER_TRACKED|
+                                  H5P_CRT_ORDER_INDEXED) < 0)
+      BAIL(NC_EHDFERR);
+
+   /* Set per-var chunk cache. */
+   if (var->chunk_cache_size)
+      if (H5Pset_chunk_cache(access_plistid, var->chunk_cache_nelems,
+			     var->chunk_cache_size, var->chunk_cache_preemption) < 0)
+	 BAIL(NC_EHDFERR);
+
+   /* At long last, create the dataset. */
+   name_to_use = var->hdf5_name ? var->hdf5_name : var->name;
+   LOG((4, "var_create_dataset: about to H5Dcreate dataset %s of type 0x%x", 
+        name_to_use, typeid));
+   if ((var->hdf_datasetid = H5Dcreate2(grp->hdf_grpid, name_to_use, typeid, 
+					spaceid, H5P_DEFAULT, plistid, access_plistid)) < 0)
+      BAIL(NC_EHDFERR);
+   var->created++;
+   var->dirty = 0;
+
+   /* If this is a dimscale, mark it as such in the HDF5 file. Also
+    * find the dimension info and store the dataset id of the dimscale
+    * dataset. */
+   if (var->dimscale)
+   {
+      if (H5DSset_scale(var->hdf_datasetid, var->name) < 0)
+         BAIL(NC_EHDFERR);
+      for (dim = grp->dim; dim; dim = dim->next)
+         if (strcmp(dim->name, var->name) == 0)
+         {
+            dim->hdf_dimscaleid = var->hdf_datasetid;
+            break;
+         }
+
+      /* Make sure we found a dimension, and gave it a dimscale id. */
+      if (!dim || !dim->hdf_dimscaleid)
+         BAIL(NC_EDIMMETA);
+
+      /* If this is a multidimensional coordinate variable, write a
+       * coordinates attribute. */
+      if (var->ndims > 1)
+         if ((retval = write_coord_dimids(var)))
+            BAIL(retval);
+
+      /* If desired, write the netCDF dimid. */
+      if (write_dimid)
+	 if ((retval = write_netcdf4_dimid(var->hdf_datasetid, 
+					   var->dimids[0])))
+	    BAIL(retval);
+
+   }
+
+  exit:
+   if (var->type_info->nc_typeid == NC_STRING || var->type_info->nc_typeid == NC_CHAR)
+      if (typeid > 0 && H5Tclose(typeid) < 0)
+	  BAIL2(NC_EHDFERR);
+   if (plistid > 0 && H5Pclose(plistid) < 0)
+      BAIL2(NC_EHDFERR);
+#ifdef EXTRA_TESTS
+      num_plists--;
+#endif
+   if (access_plistid > 0 && H5Pclose(access_plistid) < 0)
+      BAIL2(NC_EHDFERR);
+#ifdef EXTRA_TESTS
+      num_plists--;
+#endif
+   if (spaceid > 0 && H5Sclose(spaceid) < 0)
+      BAIL2(NC_EHDFERR);
+#ifdef EXTRA_TESTS
+   num_spaces--;
+#endif
+   if (maxdimsize) free(maxdimsize);
+   if (dimsize) free(dimsize);
+   if (chunksize) free(chunksize);
+   return retval;
+}
+
+/* Adjust the chunk cache of a var for better performance. */
+int
+nc4_adjust_var_cache(NC_GRP_INFO_T *grp, NC_VAR_INFO_T * var)
+{
+   size_t chunk_size_bytes = 1;
+   int d;
+   int retval;
+
+   /* Nothing to be done. */
+   if (var->contiguous)
+      return NC_NOERR;
+#ifdef USE_PARALLEL
+   return NC_NOERR;
+#endif
+
+   /* How many bytes in the chunk? */
+   for (d = 0; d < var->ndims; d++)
+      chunk_size_bytes *= var->chunksizes[d];
+   if (var->type_info->size)
+      chunk_size_bytes *= var->type_info->size;
+   else
+      chunk_size_bytes *= sizeof(char *);
+
+   /* If the chunk cache is too small, and the user has not changed
+    * the default value of the chunk cache size, then increase the
+    * size of the cache. */
+   if (var->chunk_cache_size == CHUNK_CACHE_SIZE)
+      if (chunk_size_bytes > var->chunk_cache_size)
+      {
+	 var->chunk_cache_size = chunk_size_bytes * DEFAULT_CHUNKS_IN_CACHE;
+	 if (var->chunk_cache_size > MAX_DEFAULT_CACHE_SIZE)
+	    var->chunk_cache_size = MAX_DEFAULT_CACHE_SIZE;
+	 if ((retval = nc4_reopen_dataset(grp, var)))
+	    return retval;
+      }
+
+   return NC_NOERR;
+}
+
+/* Read or write an attribute. */
+static int 
+put_att_grpa(NC_GRP_INFO_T *grp, int varid, NC_ATT_INFO_T *att)
+{
+   hid_t datasetid = 0, locid;
+   hid_t attid = 0, spaceid = 0, file_typeid = 0;
+   hsize_t dims[1]; /* netcdf attributes always 1-D. */
+   int retval = NC_NOERR;
+   void *data;
+   int phoney_data = 99;
+
+   assert(att->name);
+   LOG((3, "put_att_grpa: varid %d att->attnum %d att->name %s "
+        "att->xtype %d att->len %d", varid, att->attnum, att->name,
+        att->xtype, att->len));
+
+   /* If the file is read-only, return an error. */
+   if (grp->file->nc4_info->no_write)
+      return NC_EPERM;
+   
+   /* Get the hid to attach the attribute to, or read it from. */
+   if (varid == NC_GLOBAL)
+      locid = grp->hdf_grpid;
+   else 
+   {
+      if ((retval = nc4_open_var_grp2(grp, varid, &datasetid)))
+         BAIL(retval);
+      locid = datasetid;
+   }
+
+   /* Delete the att if it exists already. */
+   H5E_BEGIN_TRY {
+      H5Adelete(locid, att->name);
+   } H5E_END_TRY;
+      
+   /* Get the length ready, and find the HDF type we'll be
+    * writing. */
+   dims[0] = att->len;
+   if ((retval = nc4_get_hdf_typeid(grp->file->nc4_info, att->xtype, 
+				    &file_typeid, 0)))
+      BAIL(retval);
+
+   /* Even if the length is zero, HDF5 won't let me write with a
+    * NULL pointer. So if the length of the att is zero, point to
+    * some phoney data (which won't be written anyway.)*/
+   if (!dims[0])
+      data = &phoney_data;
+   else if (att->data)
+      data = att->data;
+   else if (att->stdata)
+      data = att->stdata;
+   else 
+      data = att->vldata;
+
+   /* NC_CHAR types require some extra work. The space ID is set to
+    * scalar, and the type is told how long the string is. If it's
+    * really zero length, set the size to 1. (The fact that it's
+    * really zero will be marked by the NULL dataspace, but HDF5
+    * doesn't allow me to set the size of the type to zero.)*/
+   if (att->xtype == NC_CHAR)
+   {
+      size_t string_size = dims[0];
+      if (!string_size)
+      {
+         string_size = 1;
+         if ((spaceid = H5Screate(H5S_NULL)) < 0) 
+            BAIL(NC_EATTMETA);
+#ifdef EXTRA_TESTS
+	 num_spaces++;
+#endif
+      }
+      else
+      {
+         if ((spaceid = H5Screate(H5S_SCALAR)) < 0)
+            BAIL(NC_EATTMETA);
+#ifdef EXTRA_TESTS
+	 num_spaces++;
+#endif
+      }
+      if (H5Tset_size(file_typeid, string_size) < 0)
+         BAIL(NC_EATTMETA);
+      if (H5Tset_strpad(file_typeid, H5T_STR_NULLTERM) < 0)
+         BAIL(NC_EATTMETA);
+   }
+   else
+   {
+      if (!att->len)
+      {
+         if ((spaceid = H5Screate(H5S_NULL)) < 0) 
+            BAIL(NC_EATTMETA);
+#ifdef EXTRA_TESTS
+	 num_spaces++;
+#endif
+      }
+      else
+      {
+         if ((spaceid = H5Screate_simple(1, dims, NULL)) < 0)
+            BAIL(NC_EATTMETA);
+#ifdef EXTRA_TESTS
+	 num_spaces++;
+#endif
+      }
+   }
+   if ((attid = H5Acreate(locid, att->name, file_typeid, spaceid, 
+                          H5P_DEFAULT)) < 0)
+      BAIL(NC_EATTMETA);
+
+   /* Write the values, (even if length is zero). */
+   if (H5Awrite(attid, file_typeid, data) < 0)
+      BAIL(NC_EATTMETA);
+
+  exit:
+   if (att->xtype == NC_CHAR || att->xtype == NC_STRING)
+      if (file_typeid && H5Tclose(file_typeid))
+	 BAIL2(NC_EHDFERR);
+   if (attid > 0 && H5Aclose(attid) < 0)
+      BAIL2(NC_EHDFERR);
+   if (spaceid > 0 && H5Sclose(spaceid) < 0)
+      BAIL2(NC_EHDFERR);
+#ifdef EXTRA_TESTS
+   num_spaces--;
+#endif
+   return retval;
+}
+
+/* Create a HDF5 defined type from a NC_TYPE_INFO_T struct, and commit
+ * it to the file. */
+static int
+commit_type(NC_GRP_INFO_T *grp, NC_TYPE_INFO_T *type)
+{
+   NC_FIELD_INFO_T *field;
+   NC_ENUM_MEMBER_INFO_T *enum_m;
+   hid_t hdf_base_typeid, hdf_typeid;
+   int retval;
+
+   assert(grp && type);
+
+   /* Did we already record this type? */
+   if (type->committed) 
+      return NC_NOERR;
+   
+   /* Is this a compound type? */
+   if (type->class == NC_COMPOUND)
+   {
+      if ((type->hdf_typeid = H5Tcreate(H5T_COMPOUND, type->size)) < 0)
+         return NC_EHDFERR;
+      LOG((4, "creating compound type %s hdf_typeid 0x%x", type->name, 
+           type->hdf_typeid));
+      for (field = type->field; field; field = field->next)
+      {
+         if ((retval = nc4_get_hdf_typeid(grp->file->nc4_info, field->nctype, 
+					  &hdf_base_typeid, type->endianness)))
+            return retval;
+         /* If this is an array, create a special array type. */
+         if (field->ndims)
+         {
+            int d;
+            hsize_t dims[NC_MAX_DIMS];
+            for (d = 0; d < field->ndims; d++)
+               dims[d] = field->dim_size[d];
+            if ((hdf_typeid = H5Tarray_create(hdf_base_typeid, field->ndims, 
+                                              dims, NULL)) < 0)
+               return NC_EHDFERR;
+         } 
+         else
+            hdf_typeid = hdf_base_typeid;
+         LOG((4, "inserting field %s offset %d hdf_typeid 0x%x", field->name, 
+              field->offset, hdf_typeid));
+         if (H5Tinsert(type->hdf_typeid, field->name, field->offset, 
+                       hdf_typeid) < 0)
+            return NC_EHDFERR;
+         if (field->ndims && H5Tclose(hdf_typeid) < 0)
+            return NC_EHDFERR;
+      }
+   } 
+   else if (type->class == NC_VLEN)
+   {
+      /* Find the HDF typeid of the base type of this vlen. */
+      if ((retval = nc4_get_hdf_typeid(grp->file->nc4_info, type->base_nc_type, 
+				       &type->base_hdf_typeid, type->endianness)))
+         return retval;
+
+      /* Create a vlen type. */
+      if ((type->hdf_typeid = H5Tvlen_create(type->base_hdf_typeid)) < 0)
+         return NC_EHDFERR;
+   } 
+   else if (type->class == NC_OPAQUE)
+   {
+      /* Create the opaque type. */
+      if ((type->hdf_typeid = H5Tcreate(H5T_OPAQUE, type->size)) < 0)
+         return NC_EHDFERR;
+   } 
+   else if (type->class == NC_ENUM)
+   {
+      if (!type->enum_member)
+         return NC_EINVAL;
+
+      /* Find the HDF typeid of the base type of this enum. */
+      if ((retval = nc4_get_hdf_typeid(grp->file->nc4_info, type->base_nc_type, 
+				       &type->base_hdf_typeid, type->endianness)))
+         return retval;
+      
+      /* Create an enum type. */
+      if ((type->hdf_typeid =  H5Tenum_create(type->base_hdf_typeid)) < 0) 
+         return NC_EHDFERR;
+      
+      /* Add all the members to the HDF5 type. */
+      for (enum_m = type->enum_member; enum_m; enum_m = enum_m->next)   
+         if (H5Tenum_insert(type->hdf_typeid, enum_m->name, 
+                            enum_m->value) < 0) 
+            return NC_EHDFERR;
+   } 
+   else
+   {
+      LOG((0, "Unknown class: %d", type->class));
+      return NC_EBADTYPE;
+   }
+      
+   /* Commit the type. */
+   if (H5Tcommit(grp->hdf_grpid, type->name, type->hdf_typeid) < 0)
+      return NC_EHDFERR;
+   type->committed++;
+   LOG((4, "just committed type %s, HDF typeid: 0x%x", type->name, 
+        type->hdf_typeid));
+   
+   /* Later we will always use the native typeid. In this case, it is
+    * a copy of the same type pointed to by hdf_typeid, but it's
+    * easier to maintain a copy. */
+   if ((type->native_typeid = H5Tget_native_type(type->hdf_typeid, 
+                                                 H5T_DIR_DEFAULT)) < 0)
+      return NC_EHDFERR;
+
+   return NC_NOERR;
+}
+
+/* Write an attribute, with value 1, to indicate that strict NC3 rules
+ * apply to this file. */
+static int
+write_nc3_strict_att(hid_t hdf_grpid)
+{
+   hid_t attid = 0, spaceid = 0;
+   int one = 1, num, a;
+   char att_name[NC_MAX_NAME + 1];
+   int retval = NC_NOERR;
+
+   /* If the attribute already exists, call that a success and return
+    * NC_NOERR. */
+   if ((num = H5Aget_num_attrs(hdf_grpid)) < 0)
+      return NC_EHDFERR;
+   for (a = 0; a < num; a++) 
+   {
+      if ((attid = H5Aopen_idx(hdf_grpid, (unsigned int)a)) < 0)
+         BAIL(NC_EHDFERR);
+      if (H5Aget_name(attid, NC_MAX_HDF5_NAME, att_name) < 0)
+         BAIL(NC_EHDFERR);
+      if (!strcmp(att_name, NC3_STRICT_ATT_NAME))
+      {
+         if (H5Aclose(attid) < 0)
+            return NC_EFILEMETA;
+         return NC_NOERR;
+      }
+   }
+
+   /* Create the attribute to mark this as a file that needs to obey
+    * strict netcdf-3 rules. */
+   if ((spaceid = H5Screate(H5S_SCALAR)) < 0)
+      BAIL(NC_EFILEMETA);
+#ifdef EXTRA_TESTS
+      num_spaces++;
+#endif
+   if ((attid = H5Acreate(hdf_grpid, NC3_STRICT_ATT_NAME, 
+                          H5T_NATIVE_INT, spaceid, H5P_DEFAULT)) < 0)
+      BAIL(NC_EFILEMETA);
+   if (H5Awrite(attid, H5T_NATIVE_INT, &one) < 0)
+      BAIL(NC_EFILEMETA);
+
+  exit:
+   if (spaceid && (H5Sclose(spaceid) < 0))
+      BAIL2(NC_EFILEMETA);
+#ifdef EXTRA_TESTS
+   num_spaces--;
+#endif
+   if (attid && (H5Aclose(attid) < 0))
+      BAIL2(NC_EFILEMETA);
+   return retval;
+}
+
+static int
+create_group(NC_GRP_INFO_T *grp)
+{
+   hid_t gcpl_id = 0;
+   int retval = NC_NOERR;;
+
+   assert(grp);
+
+   /* If this is not the root group, create it in the HDF5 file. */
+   if (grp->parent)
+   {
+      /* Create group, with link_creation_order set in the group
+       * creation property list. */
+      if ((gcpl_id = H5Pcreate(H5P_GROUP_CREATE)) < 0)
+         return NC_EHDFERR;
+#ifdef EXTRA_TESTS
+      num_plists++;
+#endif
+      if (H5Pset_link_creation_order(gcpl_id, H5P_CRT_ORDER_TRACKED|H5P_CRT_ORDER_INDEXED) < 0)
+         BAIL(NC_EHDFERR);
+      if (H5Pset_attr_creation_order(gcpl_id, H5P_CRT_ORDER_TRACKED|H5P_CRT_ORDER_INDEXED) < 0)
+         BAIL(NC_EHDFERR);
+      if ((grp->hdf_grpid = H5Gcreate2(grp->parent->hdf_grpid, grp->name,  
+                                       H5P_DEFAULT, gcpl_id, H5P_DEFAULT)) < 0)
+         BAIL(NC_EHDFERR);
+      if (H5Pclose(gcpl_id) < 0)
+         BAIL(NC_EHDFERR);
+#ifdef EXTRA_TESTS
+      num_plists--;
+#endif
+   }
+   else
+   {
+      /* Since this is the root group, we have to open it. */
+      if ((grp->hdf_grpid = H5Gopen2(grp->file->nc4_info->hdfid, "/", H5P_DEFAULT)) < 0)
+         BAIL(NC_EFILEMETA);
+   }
+   return NC_NOERR;
+
+  exit:
+   if (gcpl_id > 0 && H5Pclose(gcpl_id) < 0)
+      BAIL2(NC_EHDFERR);
+#ifdef EXTRA_TESTS
+      num_plists--;
+#endif
+   if (grp->hdf_grpid > 0 && H5Gclose(grp->hdf_grpid) < 0)
+      BAIL2(NC_EHDFERR);
+   return retval;
+}
+
+/* After all the datasets of the file have been read, it's time to
+ * sort the wheat from the chaff. Which of the datasets are netCDF
+ * dimensions, and which are coordinate variables, and which are
+ * non-coordinate variables. */
+static int
+attach_dimscales(NC_GRP_INFO_T *grp)
+{
+   NC_VAR_INFO_T *var;
+   NC_DIM_INFO_T *dim1;
+   NC_GRP_INFO_T *g;    
+   int d;
+   int retval = NC_NOERR;
+
+   /* Attach dimension scales. */
+   for (var = grp->var; var; var = var->next)
+   {
+      /* Scales themselves do not attach. But I really wish they
+       * would. */
+      if (var->dimscale) 
+      {
+         /* If this is a multidimensional coordinate variable, it will
+          * have a special coords attribute (read earlier) with a list
+          * of the dimensions for this variable. */
+      }
+      else /* not a dimscale... */ 
+      {
+         /* Find the scale for each dimension and attach it. */
+         for (d = 0; d < var->ndims; d++)
+         {
+	    /* Is there a dimscale for this dimension? */
+            if (var->dimscale_attached) 
+	    {
+	       if (!var->dimscale_attached[d])
+	       {
+		  for (g = grp; g && !var->dimscale_attached[d]; g = g->parent)
+		     for (dim1 = g->dim; dim1; dim1 = dim1->next)
+			if (var->dimids[d] == dim1->dimid)
+			{
+			   LOG((2, "attach_dimscales: attaching scale for dimid %d to var %s", 
+				var->dimids[d], var->name));
+			   if (H5DSattach_scale(var->hdf_datasetid, dim1->hdf_dimscaleid, d) < 0)
+			      BAIL(NC_EHDFERR);
+			   var->dimscale_attached[d]++;
+			   break;
+			}
+	       }
+            
+	       /* If we didn't find a dimscale to attach, that's a problem! */
+	       if (!var->dimscale_attached[d])
+	       {
+		  LOG((0, "no dimscale found!"));
+		  return NC_EDIMSCALE;
+	       }
+	    }
+	    else
+	    {
+	       /* Create a phoney dimension! */
+	       
+	    }
+	 }
+      } /* next d */
+   }
+  exit:
+   return retval;
+}
+
+/* Write all the dirty atts in an attlist. */
+static int
+write_attlist(NC_ATT_INFO_T *attlist, int varid, NC_GRP_INFO_T *grp)
+{
+   NC_ATT_INFO_T *att;
+   int retval;
+
+   for (att = attlist; att; att = att->next)
+   {
+      if (att->dirty)
+      {
+         LOG((4, "write_attlist: writing att %s to varid %d", att->name, varid));
+         if ((retval = put_att_grpa(grp, varid, att)))
+            return retval;
+         att->dirty = 0;
+         att->created++;
+      }
+   }
+   return NC_NOERR;
+}
+
+/* Using the HDF5 group iterator is more efficient than the original
+ * code (O(n) vs O(n**2) for n variables in the group) */
+#define USE_ITERATE_CODE
+#ifdef  USE_ITERATE_CODE
+typedef struct {
+    char *name;          /* The name of the object to searched*/
+    int  *exists;         /* 1 if the object exists, 0 otherswise */
+} var_exists_iter_info;
+
+/*-------------------------------------------------------------------------
+ * Function:    var_exists_cb
+ *
+ * Purpose:     Callback routine for checking an object by its name
+ *
+ * Return:      Exist:      1
+ *              Not exist:  0
+ *              Failure:   -1
+ *
+ * Programmer:  Peter Cao
+ *              1/25/2012
+ *
+ *-------------------------------------------------------------------------
+ */
+static int
+var_exists_cb(hid_t grpid, const char *name, const H5L_info_t *info,
+    void *_op_data)
+{
+    var_exists_iter_info *iter_info = (var_exists_iter_info *)_op_data;
+    H5I_type_t otype;
+	hid_t oid;
+
+    if ((oid = H5Oopen(grpid, name, H5P_DEFAULT)) < 0) 
+        return H5_ITER_STOP;
+	  
+    if ((otype = H5Iget_type( oid ))<0) {
+		H5Oclose(oid);
+		return H5_ITER_STOP;
+	}
+    H5Oclose(oid);
+	
+    if (otype == H5I_DATASET) {
+		if (!strcmp(iter_info->name, name)) {
+			*(iter_info->exists) = 1;
+			return (H5_ITER_STOP);
+		}
+	}
+
+    return (H5_ITER_CONT);
+} /* end var_exists_cb() */
+
+static int
+var_exists(hid_t grpid, char *name, int *exists)
+{
+    hsize_t num_obj;
+    var_exists_iter_info iter_info;
+    iter_info.name = name;
+    iter_info.exists = exists;
+
+	if (H5Gget_num_objs(grpid, &num_obj) < 0)
+      return NC_EVARMETA;
+
+    if (!name)
+       return NC_NOERR;
+	   
+    *exists = 0;
+    if (H5Literate(grpid, H5_INDEX_CRT_ORDER, H5_ITER_INC, NULL, var_exists_cb, &iter_info) < 0)
+       return NC_EHDFERR;
+
+    return NC_NOERR;
+}
+#else
+static int
+var_exists(hid_t grpid, char *name, int *exists)
+{
+   hsize_t num_obj, i;
+   H5O_info_t obj_info;
+   int obj_class;
+   char obj_name[NC_MAX_NAME + 1];
+   ssize_t size;
+   int retval = NC_NOERR;
+   
+   *exists = 0;
+   if (H5Gget_num_objs(grpid, &num_obj) < 0)
+      return NC_EVARMETA;
+   for (i = 0; i < num_obj; i++)
+   {
+      if (H5Oget_info_by_idx(grpid, ".", H5_INDEX_CRT_ORDER, H5_ITER_INC, i, &obj_info, H5P_DEFAULT) < 0) 
+         return NC_EHDFERR;
+      obj_class = obj_info.type;
+      if ((size = H5Lget_name_by_idx(grpid, ".", H5_INDEX_CRT_ORDER, H5_ITER_INC, i, NULL, 0, H5P_DEFAULT)) < 0) 
+         return NC_EHDFERR;
+      if (size > NC_MAX_NAME)
+         return NC_EMAXNAME;
+      if (H5Lget_name_by_idx(grpid, ".", H5_INDEX_CRT_ORDER, H5_ITER_INC, i, obj_name, size+1, H5P_DEFAULT) < 0) 
+         return NC_EHDFERR;
+      if (obj_class == H5O_TYPE_DATASET)
+      {
+         if (!strncmp(name, obj_name, NC_MAX_NAME))
+         {
+            *exists = 1;
+            return NC_NOERR;
+         }
+      }
+   }
+
+   return retval;
+}
+#endif	/* USE_ITERATE_CODE */
+
+/* This function writes a variable. The principle difficulty comes
+ * from the possibility that this is a coordinate variable, and was
+ * already written to the file as a dimension-only dimscale. If this
+ * occurs, then it must be deleted and recreated. */
+static int
+write_var(NC_VAR_INFO_T *var, NC_GRP_INFO_T *grp, int write_dimid)
+{
+   NC_DIM_INFO_T *d1 = NULL;
+   int replace_existing_var = 0;
+   int exists;
+   int retval;
+
+   if (!var->dirty)
+   {
+      if (write_dimid && var->ndims)
+	 if ((retval = write_netcdf4_dimid(var->hdf_datasetid, 
+					   var->dimids[0])))
+	    BAIL(retval);
+   }
+   else
+   {
+      LOG((4, "write_var: writing var %s", var->name));
+
+      if (var->created)
+         replace_existing_var = 1;
+
+      /* If this is a coordinate var, and a dataset has already
+       * been created for it, then delete that dataset and recreate
+       * it (because its type may be wrong anyway.) But then we
+       * have to reattach dimension scales for all vars! Oh well,
+       * this all only happens when the user defines a var, writes
+       * metadata, reenters define mode, and adds a coordinate
+       * var. Presumably this will happen rarely. */
+
+      /* Is this a coordinate var that has already been created in
+       * the HDF5 as a dimscale dataset? Check for dims with the
+       * same name in this group. If there is one, check to see if
+       * this object exists in the HDF group. */
+      if (var->dimscale)
+         for (d1 = grp->dim; d1; d1 = d1->next)
+            if (!strcmp(d1->name, var->name))
+            {
+               if ((retval = var_exists(grp->hdf_grpid, var->name, &exists)))
+                  return retval;
+               if (exists)
+               {
+                  replace_existing_var++;
+
+                  /* If we're replacing an existing dimscale dataset, go to
+                   * every var in the file and detatch this dimension scale,
+                   * because we have to delete it. */
+                  if ((retval = rec_detach_scales(grp->file->nc4_info->root_grp, 
+                                                  var->dimids[0], d1->hdf_dimscaleid)))
+                     return retval;
+                  break;
+               }
+            }
+         
+      /* Delete the HDF5 dataset that is to be replaced. */
+      if (replace_existing_var)
+      {
+         /* If this is a dimension scale, do this stuff. */
+         if (d1)
+         {
+            assert(d1 && d1->hdf_dimscaleid);
+            if (H5Dclose(d1->hdf_dimscaleid) < 0) 
+               return NC_EDIMMETA;
+         }
+         else
+         {
+            int dims_detached = 0;
+            int finished = 0;
+            int d;
+            NC_DIM_INFO_T *dim1;
+            NC_GRP_INFO_T *g;
+
+            /* If this is a regular var, detach all its dim scales. */
+            for (d = 0; d < var->ndims; d++)
+               for (g = grp; g && !finished; g = g->parent)
+                  for (dim1 = g->dim; dim1; dim1 = dim1->next)
+                     if (var->dimids[d] == dim1->dimid)
+                     {
+                        if (H5DSdetach_scale(var->hdf_datasetid, dim1->hdf_dimscaleid, d) < 0)
+                           BAIL(NC_EHDFERR);
+                        var->dimscale_attached[d] = 0;
+                        if (dims_detached++ == var->ndims)
+                           finished++;
+                     }
+         }
+
+         /* Free the HDF5 dataset id. */
+         if (var->hdf_datasetid && H5Dclose(var->hdf_datasetid)) 
+            BAIL(NC_EHDFERR);
+               
+         /* Now delete the variable. */
+         if (H5Gunlink(grp->hdf_grpid, var->name) < 0)
+            return NC_EDIMMETA;
+      }
+
+      /* Create the dataset. */
+      if ((retval = var_create_dataset(grp, var, write_dimid)))
+         return retval;
+         
+      /* Reattach this scale everywhere it is used. (Recall that
+       * netCDF dimscales are always 1-D). */
+      if (d1 && replace_existing_var)
+      {
+         d1->hdf_dimscaleid = var->hdf_datasetid;
+         if ((retval = rec_reattach_scales(grp->file->nc4_info->root_grp, 
+                                           var->dimids[0], d1->hdf_dimscaleid)))
+            return retval;
+      }
+   }
+         
+   /* Now check the atributes for this var. */
+   /* Write attributes for this var. */
+   if ((retval = write_attlist(var->att, var->varid, grp)))
+      BAIL(retval);
+   
+   return NC_NOERR;
+  exit:
+   return retval;
+}
+
+static int
+write_dim(NC_DIM_INFO_T *dim, NC_GRP_INFO_T *grp, int write_dimid)
+{
+   hid_t spaceid, create_propid;
+   hsize_t dims[1], max_dims[1], chunk_dims[1] = {1}; 
+   int dimscale_exists = 0;
+   char dimscale_wo_var[NC_MAX_NAME];
+   int retval;
+
+   if (dim->dirty)
+   {
+      /* If there's no dimscale dataset for this dim, create one,
+       * and mark that it should be hidden from netCDF as a
+       * variable. (That is, it should appear as a dimension
+       * without an associated variable.) */
+      if (!dimscale_exists)
+      {
+         LOG((4, "write_dim: creating dim %s", dim->name));
+
+         /* Create a property list. If this dimension scale is
+          * unlimited (i.e. it's an unlimited dimension), then set
+          * up chunking, with a chunksize of 1. */
+         if ((create_propid = H5Pcreate(H5P_DATASET_CREATE)) < 0)
+            BAIL(NC_EHDFERR);
+#ifdef EXTRA_TESTS
+	 num_plists++;
+#endif
+         dims[0] = dim->len;
+         max_dims[0] = dim->len;
+         if (dim->unlimited) 
+	 {
+            max_dims[0] = H5S_UNLIMITED;
+            if (H5Pset_chunk(create_propid, 1, chunk_dims) < 0)
+               BAIL(NC_EHDFERR);
+         }
+
+         /* Set up space. */
+         if ((spaceid = H5Screate_simple(1, dims, max_dims)) < 0) 
+            BAIL(NC_EHDFERR);
+#ifdef EXTRA_TESTS
+	 num_spaces++;
+#endif
+
+         /* If we define, and then rename this dimension before
+          * creation of the dimscale dataset, then we can throw
+          * away the old_name of the dimension. */
+         if (dim->old_name && strlen(dim->old_name))
+            strcpy(dim->old_name, "");
+
+         if (H5Pset_attr_creation_order(create_propid, H5P_CRT_ORDER_TRACKED|
+                                        H5P_CRT_ORDER_INDEXED) < 0)
+            BAIL(NC_EHDFERR);
+
+         /* Create the dataset that will be the dimension scale. */
+         LOG((4, "write_dim: about to H5Dcreate a dimscale dataset %s", dim->name));
+         if ((dim->hdf_dimscaleid = H5Dcreate1(grp->hdf_grpid, dim->name, H5T_IEEE_F32BE, 
+                                               spaceid, create_propid)) < 0)
+            BAIL(NC_EHDFERR);
+
+         /* Close the spaceid and create_propid. */
+         if (H5Sclose(spaceid) < 0)
+            BAIL(NC_EHDFERR);
+#ifdef EXTRA_TESTS
+	 num_spaces--;
+#endif
+         if (H5Pclose(create_propid) < 0)
+            BAIL(NC_EHDFERR);
+#ifdef EXTRA_TESTS
+	 num_plists--;
+#endif
+
+         /* Indicate that this is a scale. Also indicate that not
+          * be shown to the user as a variable. It is hidden. It is
+          * a DIM WITHOUT A VARIABLE! */
+         sprintf(dimscale_wo_var, "%s%10d", DIM_WITHOUT_VARIABLE, (int)dim->len);
+         if (H5DSset_scale(dim->hdf_dimscaleid, dimscale_wo_var) < 0)
+            BAIL(NC_EHDFERR);
+
+      }
+      dim->dirty = 0;
+   }
+   
+   /* Did we extend an unlimited dimension? */
+   if (dim->extended)
+   {
+      NC_VAR_INFO_T *v1;
+
+      assert(dim->unlimited);
+      /* If this is a dimension without a variable, then update
+       * the secret length information at the end of the NAME
+       * attribute. */
+      for (v1 = grp->var; v1; v1 = v1->next)
+         if (!strcmp(v1->name, dim->name))
+            break;
+         
+      if (v1)
+      {
+         hsize_t *new_size;
+         NC_GRP_INFO_T *g;
+         NC_DIM_INFO_T *dim1;
+         int d1;
+
+         /* Extend the dimension scale dataset to reflect the new
+          * length of the dimension. */
+         if (!(new_size = malloc(v1->ndims * sizeof(hsize_t))))
+            BAIL(NC_ENOMEM);
+         for (d1 = 0; d1 < v1->ndims; d1++)
+         {
+            if (v1->dimids[d1] == dim->dimid)
+               new_size[d1] = dim->len;
+            else
+            {
+               int break_it = 0;
+               for (g = grp; g && !break_it; g = g->parent)
+                  for (dim1 = g->dim; dim1; dim1 = dim1->next)
+                     if (dim1->dimid == v1->dimids[d1])
+                     {
+                        new_size[d1] = dim1->len;
+                        break_it++;
+                        break;
+                     }
+            }
+         }
+         if (H5Dextend(v1->hdf_datasetid, new_size) < 0)
+            BAIL(NC_EHDFERR);
+         free(new_size);
+      }
+   }
+
+   /* Did we rename this dimension? */
+   if (dim->old_name && strlen(dim->old_name))
+   {
+      /* Rename the dimension's dataset in the HDF5 file. */
+      if (H5Gmove2(grp->hdf_grpid, dim->old_name, grp->hdf_grpid, dim->name) < 0)
+         return NC_EHDFERR;
+         
+      /* Reset old_name. */
+      strcpy(dim->old_name, "");
+   }
+
+   /* If desired, write the secret dimid. This will be used instead of
+    * the dimid that the dimension would otherwise receive based on
+    * creation order. This can be necessary when dims and their
+    * coordinate variables were created in different order. */
+   if (write_dimid && dim->hdf_dimscaleid)
+      if ((retval = write_netcdf4_dimid(dim->hdf_dimscaleid, 
+					dim->dimid)))
+	 BAIL(retval);
+
+   return NC_NOERR;
+  exit:
+   return retval;
+}
+
+/* Recursively write all the metadata in a group. Groups and types
+ * have all already been written. */
+int
+nc4_rec_write_metadata(NC_GRP_INFO_T *grp)
+{
+   NC_DIM_INFO_T *dim;
+   NC_VAR_INFO_T *var;
+   NC_GRP_INFO_T *child_grp;
+   int found_coord, coord_varid = -1, wrote_coord;
+   int bad_coord_order = 0;
+   int last_dimid = -1;
+   int retval;
+
+   assert(grp && grp->name && grp->hdf_grpid);
+   LOG((3, "nc4_rec_write_metadata: grp->name %s", grp->name));
+
+   /* Write global attributes for this group. */
+   if ((retval = write_attlist(grp->att, NC_GLOBAL, grp)))
+      return retval;
+
+   /* If the user writes coord vars in a different order then he
+    * defined their dimensions, then, when the file is reopened, the
+    * order of the dimids will change to match the order of the coord
+    * vars. Detect if this is about to happen. */
+   for (var = grp->var; var; var = var->next)
+   {
+      LOG((5, "checking %s for out of order coord var", var->name));
+      if (var->ndims && var->dimscale)
+      {
+	 if (var->dimids[0] < last_dimid)
+	 {
+	    bad_coord_order++;
+	    break;
+	 }
+	 last_dimid = var->dimids[0];
+      }
+   }
+
+   /* Did the user define a dimension, end define mode, reenter define
+    * mode, and then define a coordinate variable for that dimension?
+    * If so, dimensions will be out of order. */
+   for (var = grp->var; var; var = var->next)
+      if (var->dirty && !var->created && var->ndims)
+	 for (dim = grp->dim; dim && dim->next; dim = dim->next)
+	    if (strcmp(dim->name, var->name) && !dim->dirty)
+	    {
+	       LOG((5, "coord var defined after enddef/redef"));
+	       bad_coord_order++;
+	    }
+   
+      
+   /* For some stupid reason, the dim list is stored backwards! Get to
+    * the back of the list. */
+   for (dim = grp->dim; dim && dim->next; dim = dim->next)
+      ;
+
+   /* Set the pointer to the beginning of the list of vars in this
+    * group. */
+   var = grp->var;
+
+   /* Because of HDF5 ordering the dims and vars have to be stored in
+    * this way to ensure that the dims and coordinate vars come out in
+    * the correct order. */
+   while (dim || var)
+   {
+      /* Write non-coord dims in order, stopping at the first one that
+       * has an associated coord var. */
+      for (found_coord = 0; dim && !found_coord; dim = dim->prev)
+      {
+         if (!dim->coord_var_in_grp)
+         {
+            if ((retval = write_dim(dim, grp, bad_coord_order)))
+               return retval;
+         }
+         else
+         {
+            found_coord++;
+            coord_varid = dim->coord_var->varid;
+         }
+      }
+
+      /* Write each var. When we get to the coord var we are waiting
+       * for (if any), then we break after writing it. */
+      for (wrote_coord = 0; var && !wrote_coord; var = var->next)
+      {
+         if ((retval = write_var(var, grp, bad_coord_order)))
+            return retval;
+         if (found_coord && var->varid == coord_varid)
+            wrote_coord++;
+      }
+   } /* end while */
+
+   if ((retval = attach_dimscales(grp)))
+      return retval;
+   
+   /* If there are any child groups, write their metadata. */
+   for (child_grp = grp->children; child_grp; child_grp = child_grp->next)
+      if ((retval = nc4_rec_write_metadata(child_grp)))
+         return retval;
+      
+   return NC_NOERR;
+}
+
+/* Recursively write all groups and types. */
+int
+nc4_rec_write_types(NC_GRP_INFO_T *grp)
+{
+   NC_GRP_INFO_T *child_grp;
+   NC_TYPE_INFO_T *type;
+   int retval;
+
+   assert(grp && grp->name);
+   LOG((3, "nc4_rec_write_types: grp->name %s", grp->name));
+
+   /* Create the group in the HDF5 file if it doesn't exist. */
+   if (!grp->hdf_grpid)
+      if ((retval = create_group(grp)))
+         return retval;
+
+   /* If this is the root group of a file with strict NC3 rules, write
+    * an attribute. But don't leave the attribute open. */
+   if (!grp->parent && (grp->file->nc4_info->cmode & NC_CLASSIC_MODEL))
+      if ((retval = write_nc3_strict_att(grp->hdf_grpid)))
+         return retval;
+
+   /* If there are any user-defined types, write them now. */
+   for (type = grp->type; type; type = type->next)
+      if ((retval = commit_type(grp, type)))
+         return retval;
+
+   /* If there are any child groups, write their groups and types. */
+   for (child_grp = grp->children; child_grp; child_grp = child_grp->next)
+      if ((retval = nc4_rec_write_types(child_grp)))
+         return retval;
+      
+   return NC_NOERR;
+}
+
+/* This reads/writes a whole var at a time. If the file has an
+   unlimited dimension, then we will look at the number of records
+   currently existing for this var, and read/write that many. This
+   this is not what the user intended, particularly with writing, then
+   that is there look-out! So we will not be extending datasets
+   here. */
+int
+pg_var(NC_PG_T pg, NC_FILE_INFO_T *nc, int ncid, int varid, nc_type xtype, 
+       int is_long, void *ip)
+{
+   NC_GRP_INFO_T *grp;
+   NC_VAR_INFO_T *var;
+   size_t start[NC_MAX_VAR_DIMS], count[NC_MAX_VAR_DIMS];
+   int i;
+   int retval;
+
+   assert(nc);
+   if ((retval = nc4_find_g_var_nc(nc, ncid, varid, &grp, &var)))
+      return retval;
+   assert(grp && var && var->name);
+
+   /* For each dimension, the start will be 0, and the count will be
+    * the length of the dimension. */
+   for (i = 0; i < var->ndims; i++)
+   {
+      start[i] = 0;
+      if ((retval = nc_inq_dimlen(ncid, var->dimids[i], &(count[i]))))
+         return retval;
+   }
+
+   /* Read or write the data. */
+   if (pg == GET)
+      return nc4_get_vara(nc, ncid, varid, start, count, xtype, 
+                          is_long, ip);
+   else
+      return nc4_put_vara(nc, ncid, varid, start, count, xtype, 
+                          is_long, ip);
+}
+
+/* Write or read some mapped data. Yea, like I even understand what it
+   is!  
+
+   I stole this code, lock, stock, and semicolons, from the netcdf
+   3.5.1 beta release. It walks through the stride and map arrays, and
+   converts them to a series of calles to the varm function.
+
+   I had to modify the code a little to fit it in, and generalize it
+   for all data types, and for both puts and gets.
+
+   Ed Hartnett, 9/43/03
+*/
+int 
+nc4_pg_varm(NC_PG_T pg, NC_FILE_INFO_T *nc, int ncid, int varid, const size_t *start, 
+            const size_t *edges, const ptrdiff_t *stride,
+            const ptrdiff_t *map, nc_type xtype, int is_long, void *data)
+{
+   NC_GRP_INFO_T *grp;
+   NC_HDF5_FILE_INFO_T *h5;
+   NC_VAR_INFO_T *var;
+   int maxidim;    /* maximum dimensional index */
+   size_t mem_type_size;
+   int convert_map = 0;
+   ptrdiff_t new_map[NC_MAX_VAR_DIMS];
+   int i;
+   int retval = NC_NOERR;
+
+   LOG((3, "nc4_pg_varm: ncid 0x%x varid %d xtype %d", ncid, varid, 
+        xtype));
+
+   /* Find metadata for this file and var. */
+   assert(nc && nc->nc4_info);
+   h5 = nc->nc4_info;
+   if ((retval = nc4_find_g_var_nc(nc, ncid, varid, &grp, &var)))
+      return retval;
+   assert(grp && var && var->name);
+
+   /* If mem_nc_type is NC_NAT, it means we were called by
+    * nc_get|put_varm, the old V2 API call! In this case we want to
+    * use the file type as the mem type as well. Also, for these two
+    * functions only, we interpret the map array as referring to
+    * numbers of bytes rather than number of elements. (This is
+    * something that changed between V2 and V3.) Also we do not allow
+    * mapped access to user-defined vars in nc4. */
+   if (xtype == NC_NAT)
+   {
+      if (var->xtype > NC_STRING)
+         return NC_EMAPTYPE;
+      xtype = var->xtype;
+      convert_map++;
+   }
+   assert(xtype);
+
+   /* What is the size of this type? */
+   if ((retval = nc4_get_typelen_mem(h5, xtype, is_long, &mem_type_size)))
+      return retval;
+
+   if(map != NULL && var->ndims && convert_map)
+   {
+      /* convert map units from bytes to units of sizeof(type) */
+      for(i = 0; i < var->ndims; i++)
+      {
+         if(map[i] % mem_type_size != 0)        
+            return NC_EINVAL;
+         new_map[i] = map[i] / mem_type_size;
+      }
+      map = new_map;
+   }
+
+   /* No text to number hanky-panky is allowed for those observing
+    * strict netcdf-3 rules! It's sick. */
+   if ((h5->cmode & NC_CLASSIC_MODEL) && (xtype == NC_CHAR || var->xtype == NC_CHAR) &&
+       (xtype != var->xtype))
+      return NC_ECHAR;
+
+   /* If the file is read-only, return an error. */
+   if (pg == PUT && h5->no_write)
+      return NC_EPERM;
+
+   /* If we're in define mode, we can't read or write data. If strict
+    * nc3 rules are in effect, return an error, otherwise leave define
+    * mode. */
+   if (h5->flags & NC_INDEF)
+   {
+      if (h5->cmode & NC_CLASSIC_MODEL)
+         return NC_EINDEFINE;
+      if ((retval = nc_enddef(ncid)))
+         BAIL(retval);
+   }
+
+#ifdef LOGGING
+   {
+      int i;
+      if (start)
+         for (i=0; i<var->ndims; i++)
+            LOG((4, "start[%d] %d", i, start[i]));
+      if (edges)
+         for (i=0; i<var->ndims; i++)
+            LOG((4, "edges[%d] %d", i, edges[i]));
+      if (stride)
+         for (i=0; i<var->ndims; i++)
+            LOG((4, "stride[%d] %d", i, stride[i]));
+      if (map)
+         for (i=0; i<var->ndims; i++)
+            LOG((4, "map[%d] %d", i, map[i]));
+   }
+#endif /* LOGGING */
+
+   /* The code below was stolen from netcdf-3. Some comments by Ed. */
+   maxidim = (int) var->ndims - 1;
+   if (maxidim < 0)
+   {
+      /* The variable is a scalar; consequently, there is only one
+         thing to get and only one place to put it.  (Why was I
+         called?) */
+      return pg_var(pg, nc, ncid, varid, xtype, is_long, data);
+   }
+        
+   /* The variable is an array.  */
+   {
+      int idim;
+      size_t *mystart = NULL;
+      size_t *myedges;
+      size_t *iocount;        /* count vector */
+      size_t *stop;   /* stop indexes */
+      size_t *length; /* edge lengths in bytes */
+      ptrdiff_t *mystride;
+      ptrdiff_t *mymap;
+
+      /* Verify stride argument. */
+      for (idim = 0; idim <= maxidim; ++idim)
+      {
+         if (stride != NULL
+             && (stride[idim] == 0
+                 /* cast needed for braindead systems with signed size_t */
+                 || (unsigned long) stride[idim] >= X_INT_MAX))
+         {
+            return NC_ESTRIDE;
+         }
+      }
+
+      /* The mystart array of pointer info is needed to walk our way
+         through the dimensions as specified by the start, edges,
+         stride and (gulp!) map parameters. */
+      if (!(mystart = (size_t *)calloc((size_t)var->ndims * 7, sizeof(ptrdiff_t))))
+         return NC_ENOMEM;
+      myedges = mystart + var->ndims;
+      iocount = myedges + var->ndims;
+      stop = iocount + var->ndims;
+      length = stop + var->ndims;
+      mystride = (ptrdiff_t *)(length + var->ndims);
+      mymap = mystride + var->ndims;
+
+      /* Initialize I/O parameters. */
+      for (idim = maxidim; idim >= 0; --idim)
+      {
+         /* Get start value, use 0 if non provided. */
+         mystart[idim] = start != NULL ? start[idim] : 0;
+
+         /* If any edges are 0, return NC_NOERR and forget it. */
+         if (edges[idim] == 0)
+         {
+            retval = NC_NOERR;
+            goto done;
+         }
+
+         /* If edges not provided, use the current dimlen. */
+         if (edges)
+            myedges[idim] = edges[idim];
+         else 
+         {
+            size_t len;
+            if ((retval = nc_inq_dimlen(ncid, var->dimids[idim], &len)))
+               goto done;
+            myedges[idim] = len - mystart[idim];
+         }
+         
+         /* If stride not provided, use 1. */
+         mystride[idim] = stride != NULL ? stride[idim] : 1;
+
+         /* If map is not provided, do something dark and
+            mysterious. */
+         if (map)
+            mymap[idim] = map[idim];
+         else
+            mymap[idim] = idim == maxidim ? 1 : 
+               mymap[idim + 1] * (ptrdiff_t) myedges[idim + 1];
+
+         iocount[idim] = 1;
+         length[idim] = mymap[idim] * myedges[idim];
+         stop[idim] = mystart[idim] + myedges[idim] * mystride[idim];
+      }
+
+      /* Check start, edges */
+      for (idim = maxidim; idim >= 0; --idim)
+      {
+         size_t dimlen;
+         if ((retval = nc_inq_dimlen(ncid, var->dimids[idim], &dimlen)))
+            goto done;
+         /* Don't check unlimited dimension on PUTs. */
+         if (pg == PUT)
+         {
+            int stop = 0, d, num_unlim_dim, unlim_dimids[NC_MAX_DIMS];
+            if ((retval = nc_inq_unlimdims(ncid, &num_unlim_dim, unlim_dimids)))
+               goto done;
+            for (d = 0; d < num_unlim_dim; d++)
+               if (var->dimids[idim] == unlim_dimids[d])
+                  stop++;
+            if (stop)
+               break;
+         }
+         LOG((4, "idim=%d mystart[idim]=%d myedge[idim]=%d dimlen=%d", 
+              idim, mystart[idim], myedges[idim], dimlen));
+         if (mystart[idim] >= dimlen)
+         {
+            retval = NC_EINVALCOORDS;
+            goto done;
+         }
+         
+         if (mystart[idim] + myedges[idim] > dimlen)
+         {
+            retval = NC_EEDGE;
+            goto done;
+         }
+      }
+
+      /* OK, now we're just getting too fancy... As an optimization,
+         adjust I/O parameters when the fastest dimension has unity
+         stride both externally and internally. In this case, the user
+         could have called a simpler routine
+         (i.e. ncvarnc_get_vara_text).*/
+      if (mystride[maxidim] == 1
+          && mymap[maxidim] == 1)
+      {
+         iocount[maxidim] = myedges[maxidim];
+         mystride[maxidim] = (ptrdiff_t) myedges[maxidim];
+         mymap[maxidim] = (ptrdiff_t) length[maxidim];
+      }
+
+      /* Perform I/O.  Exit when done. */
+      for (;;)
+      {
+         int lretval;
+         if (pg == GET)
+            lretval = nc4_get_vara(nc, ncid, varid, mystart, iocount, xtype, 
+                                   is_long, data);
+         else
+            lretval =  nc4_put_vara(nc, ncid, varid, mystart, iocount, xtype, 
+                                    is_long, data);
+         if (lretval != NC_NOERR 
+             && (retval == NC_NOERR || lretval != NC_ERANGE))
+            retval = lretval;
+
+         /*
+          * The following code permutes through the variable s
+          * external start-index space and it s internal address
+          * space.  At the UPC, this algorithm is commonly
+          * called "odometer code".
+          */
+         idim = maxidim;
+        carry:
+         data = (char *)data + (mymap[idim] * mem_type_size);
+         LOG((4, "data=0x%x mymap[%d]=%d", data, idim, (int)mymap[idim]));
+         mystart[idim] += mystride[idim];
+         LOG((4, "mystart[%d]=%d length[%d]=%d", idim, (int)mystart[idim], 
+              idim, (int)length[idim]));
+         if (mystart[idim] == stop[idim])
+         {
+            mystart[idim] = start[idim];
+            data = (char *)data - (length[idim] * mem_type_size);
+            if (--idim < 0)
+               break; /* normal return */
+            goto carry;
+         }
+      } /* I/O loop */
+     done:
+      free(mystart);
+   } /* variable is array */
+
+  exit:   
+   return retval;
+}
+
+/* This function will copy data from one buffer to another, in
+   accordance with the types. Range errors will be noted, and the fill
+   value used (or the default fill value if none is supplied) for
+   values that overflow the type.
+
+   I should be able to take this out when HDF5 does the right thing
+   with data type conversion.
+
+   Ed Hartnett, 11/15/3
+*/
+
+int
+nc4_convert_type(const void *src, void *dest, 
+                 const nc_type src_type, const nc_type dest_type, 
+                 const size_t len, int *range_error, 
+                 const void *fill_value, int strict_nc3, int src_long, 
+                 int dest_long)
+{
+   char *cp, *cp1;
+   float *fp, *fp1;
+   double *dp, *dp1;
+   int *ip, *ip1;
+   signed long *lp, *lp1;
+   short *sp, *sp1;
+   signed char *bp, *bp1;
+   unsigned char *ubp, *ubp1;
+   unsigned short *usp, *usp1;
+   unsigned int *uip, *uip1;
+   long long *lip, *lip1;
+   unsigned long long *ulip, *ulip1;
+   size_t count = 0;
+
+   *range_error = 0;
+   LOG((3, "nc4_convert_type: len %d src_type %d dest_type %d src_long %d"
+        " dest_long %d", len, src_type, dest_type, src_long, dest_long));
+
+   /* OK, this is ugly. If you can think of anything better, I'm open
+      to suggestions! 
+
+      Note that we don't use a default fill value for type
+      NC_BYTE. This is because Lord Voldemort cast a nofilleramous spell
+      at Harry Potter, but it bounced off his scar and hit the netcdf-4
+      code.
+   */
+   switch (src_type)
+   {
+      case NC_CHAR:
+         switch (dest_type)
+         {
+            case NC_CHAR:
+               for (cp = (char *)src, cp1 = dest; count < len; count++)
+                  *cp1++ = *cp++;
+               break;
+            default:
+               LOG((0, "nc4_convert_type: Uknown destination type."));
+         }
+         break;
+      case NC_BYTE:
+         switch (dest_type)
+         {
+            case NC_BYTE:
+               for (bp = (signed char *)src, bp1 = dest; count < len; count++)
+                  *bp1++ = *bp++;
+               break;
+            case NC_UBYTE:
+               for (bp = (signed char *)src, ubp = dest; count < len; count++)
+               {
+                  if (*bp < 0)
+                     (*range_error)++;
+                  *ubp++ = *bp++;
+               }
+               break;
+            case NC_SHORT:
+               for (bp = (signed char *)src, sp = dest; count < len; count++)
+                  *sp++ = *bp++;
+               break;
+            case NC_USHORT:
+               for (bp = (signed char *)src, usp = dest; count < len; count++)
+               {
+                  if (*bp < 0)
+                     (*range_error)++;
+                  *usp++ = *bp++;
+               }
+               break;
+            case NC_INT:
+               if (dest_long)
+               {
+                  for (bp = (signed char *)src, lp = dest; count < len; count++)
+                     *lp++ = *bp++;
+                  break;
+               }
+               else
+               {
+                  for (bp = (signed char *)src, ip = dest; count < len; count++)
+                     *ip++ = *bp++;
+                  break;
+               }
+            case NC_UINT:
+               for (bp = (signed char *)src, uip = dest; count < len; count++)
+               {
+                  if (*bp < 0)
+                     (*range_error)++;
+                  *uip++ = *bp++;
+               }
+               break;
+            case NC_INT64:
+               for (bp = (signed char *)src, lip = dest; count < len; count++)
+                  *lip++ = *bp++;
+               break;
+            case NC_UINT64:
+               for (bp = (signed char *)src, ulip = dest; count < len; count++)
+               {
+                  if (*bp < 0)
+                     (*range_error)++;
+                  *ulip++ = *bp++;
+               }
+               break;
+            case NC_FLOAT:
+               for (bp = (signed char *)src, fp = dest; count < len; count++)
+                  *fp++ = *bp++;
+               break;
+            case NC_DOUBLE:
+               for (bp = (signed char *)src, dp = dest; count < len; count++)
+                  *dp++ = *bp++;
+               break;
+            default:
+               LOG((0, "nc4_convert_type: unexpected dest type. "
+                    "src_type %d, dest_type %d", src_type, dest_type));
+               return NC_EBADTYPE;
+         }
+         break;
+      case NC_UBYTE:
+         switch (dest_type)
+         {
+            case NC_BYTE:
+               for (ubp = (unsigned char *)src, bp = dest; count < len; count++)
+               {
+                  if (!strict_nc3 && *ubp > X_SCHAR_MAX)
+                     (*range_error)++;
+                  *bp++ = *ubp++;
+               }
+               break;
+            case NC_SHORT:
+               for (ubp = (unsigned char *)src, sp = dest; count < len; count++)
+                  *sp++ = *ubp++;
+               break;
+            case NC_UBYTE:
+               for (ubp = (unsigned char *)src, ubp1 = dest; count < len; count++)
+                  *ubp1++ = *ubp++;
+               break;
+            case NC_USHORT:
+               for (ubp = (unsigned char *)src, usp = dest; count < len; count++)
+                  *usp++ = *ubp++;
+               break;
+            case NC_INT:
+               if (dest_long)
+               {
+                  for (ubp = (unsigned char *)src, lp = dest; count < len; count++)
+                     *lp++ = *ubp++;
+                  break;
+               }
+               else
+               {
+                  for (ubp = (unsigned char *)src, ip = dest; count < len; count++)
+                     *ip++ = *ubp++;
+                  break;
+               }
+            case NC_UINT:
+               for (ubp = (unsigned char *)src, uip = dest; count < len; count++)
+                  *uip++ = *ubp++;
+               break;
+            case NC_INT64:
+               for (ubp = (unsigned char *)src, lip = dest; count < len; count++)
+                  *lip++ = *ubp++;
+               break;
+            case NC_UINT64:
+               for (ubp = (unsigned char *)src, ulip = dest; count < len; count++)
+                  *ulip++ = *ubp++;
+               break;
+            case NC_FLOAT:
+               for (ubp = (unsigned char *)src, fp = dest; count < len; count++)
+                  *fp++ = *ubp++;
+               break;
+            case NC_DOUBLE:
+               for (ubp = (unsigned char *)src, dp = dest; count < len; count++)
+                  *dp++ = *ubp++;
+               break;
+            default:
+               LOG((0, "nc4_convert_type: unexpected dest type. "
+                    "src_type %d, dest_type %d", src_type, dest_type));
+               return NC_EBADTYPE;
+         }
+         break;
+      case NC_SHORT:
+         switch (dest_type)
+         {
+            case NC_UBYTE:
+               for (sp = (short *)src, ubp = dest; count < len; count++)
+               {
+                  if (*sp > X_UCHAR_MAX || *sp < 0)
+                     (*range_error)++;
+                  *ubp++ = *sp++;
+               }
+               break;
+            case NC_BYTE:
+               for (sp = (short *)src, bp = dest; count < len; count++)
+               {
+                  if (*sp > X_SCHAR_MAX || *sp < X_SCHAR_MIN)
+                     (*range_error)++;
+                  *bp++ = *sp++;
+               }
+               break;
+            case NC_SHORT:
+               for (sp = (short *)src, sp1 = dest; count < len; count++)
+                  *sp1++ = *sp++;
+               break;
+            case NC_USHORT:
+               for (sp = (short *)src, usp = dest; count < len; count++)
+               {
+                  if (*sp < 0)
+                     (*range_error)++;
+                  *usp++ = *sp++;
+               }
+               break;
+            case NC_INT:
+               if (dest_long)
+                  for (sp = (short *)src, lp = dest; count < len; count++)
+                     *lp++ = *sp++;
+               else
+                  for (sp = (short *)src, ip = dest; count < len; count++)
+                     *ip++ = *sp++;
+               break;
+            case NC_UINT:
+               for (sp = (short *)src, uip = dest; count < len; count++)
+	       {  
+		   if (*sp < 0)
+		       (*range_error)++;
+                  *uip++ = *sp++;
+               }
+               break;
+            case NC_INT64:
+               for (sp = (short *)src, lip = dest; count < len; count++)
+                  *lip++ = *sp++;
+               break;
+            case NC_UINT64:
+               for (sp = (short *)src, ulip = dest; count < len; count++)
+	       {  
+		   if (*sp < 0)
+		       (*range_error)++;
+                  *ulip++ = *sp++;
+               }
+               break;
+            case NC_FLOAT:
+               for (sp = (short *)src, fp = dest; count < len; count++)
+                  *fp++ = *sp++;
+               break;
+            case NC_DOUBLE:
+               for (sp = (short *)src, dp = dest; count < len; count++)
+                  *dp++ = *sp++;
+               break;
+            default:
+               LOG((0, "nc4_convert_type: unexpected dest type. "
+                    "src_type %d, dest_type %d", src_type, dest_type));
+               return NC_EBADTYPE;
+         }
+         break;
+      case NC_USHORT:
+         switch (dest_type)
+         {
+            case NC_UBYTE:
+               for (usp = (unsigned short *)src, ubp = dest; count < len; count++)
+               {
+                  if (*usp > X_UCHAR_MAX)
+                     (*range_error)++;
+                  *ubp++ = *usp++;
+               }
+               break;
+            case NC_BYTE:
+               for (usp = (unsigned short *)src, bp = dest; count < len; count++)
+               {
+                  if (*usp > X_SCHAR_MAX)
+                     (*range_error)++;
+                  *bp++ = *usp++;
+               }
+               break;
+            case NC_SHORT:
+               for (usp = (unsigned short *)src, sp = dest; count < len; count++)
+               {
+                  if (*usp > X_SHORT_MAX)
+                     (*range_error)++;
+                  *sp++ = *usp++;
+               }
+               break;
+            case NC_USHORT:
+               for (usp = (unsigned short *)src, usp1 = dest; count < len; count++)
+                  *usp1++ = *usp++;
+               break;
+            case NC_INT:
+               if (dest_long)
+                  for (usp = (unsigned short *)src, lp = dest; count < len; count++)
+                     *lp++ = *usp++;
+               else
+                  for (usp = (unsigned short *)src, ip = dest; count < len; count++)
+                     *ip++ = *usp++;
+               break;
+            case NC_UINT:
+               for (usp = (unsigned short *)src, uip = dest; count < len; count++)
+                  *uip++ = *usp++;
+               break;
+            case NC_INT64:
+               for (usp = (unsigned short *)src, lip = dest; count < len; count++)
+                  *lip++ = *usp++;
+               break;
+            case NC_UINT64:
+               for (usp = (unsigned short *)src, ulip = dest; count < len; count++)
+                  *ulip++ = *usp++;
+               break;
+            case NC_FLOAT:
+               for (usp = (unsigned short *)src, fp = dest; count < len; count++)
+                  *fp++ = *usp++;
+               break;
+            case NC_DOUBLE:
+               for (usp = (unsigned short *)src, dp = dest; count < len; count++)
+                  *dp++ = *usp++;
+               break;
+            default:
+               LOG((0, "nc4_convert_type: unexpected dest type. "
+                    "src_type %d, dest_type %d", src_type, dest_type));
+               return NC_EBADTYPE;
+         }
+         break;
+      case NC_INT:
+         if (src_long)
+         {
+            switch (dest_type)
+            {
+               case NC_UBYTE:
+                  for (lp = (long *)src, ubp = dest; count < len; count++)
+                  {
+                     if (*lp > X_UCHAR_MAX || *lp < 0)
+                        (*range_error)++;
+                     *ubp++ = *lp++;
+                  }
+                  break;
+               case NC_BYTE:
+                  for (lp = (long *)src, bp = dest; count < len; count++)
+                  {
+                     if (*lp > X_SCHAR_MAX || *lp < X_SCHAR_MIN)
+                        (*range_error)++;
+                     *bp++ = *lp++;
+                  }
+                  break;
+               case NC_SHORT:
+                  for (lp = (long *)src, sp = dest; count < len; count++)
+                  {
+                     if (*lp > X_SHORT_MAX || *lp < X_SHORT_MIN)
+                        (*range_error)++;
+                     *sp++ = *lp++;
+                  }
+                  break;
+               case NC_USHORT:
+                  for (lp = (long *)src, usp = dest; count < len; count++)
+                  {
+                     if (*lp > X_USHORT_MAX || *lp < 0)
+                        (*range_error)++;
+                     *usp++ = *lp++;
+                  }
+                  break;
+               case NC_INT: /* src is long */
+                  if (dest_long)
+                  {
+                     for (lp = (long *)src, lp1 = dest; count < len; count++)
+                     {
+                        if (*lp > X_LONG_MAX || *lp < X_LONG_MIN)
+                           (*range_error)++;
+                        *lp1++ = *lp++;
+                     }
+                  }
+                  else /* dest is int */
+                  {
+                     for (lp = (long *)src, ip = dest; count < len; count++)
+                     {
+                        if (*lp > X_INT_MAX || *lp < X_INT_MIN)
+                           (*range_error)++;
+                        *ip++ = *lp++;
+                     }
+                  }
+                  break;
+               case NC_UINT:
+                  for (lp = (long *)src, uip = dest; count < len; count++)
+                  {
+                     if (*lp > X_UINT_MAX || *lp < 0)
+                        (*range_error)++;
+                     *uip++ = *lp++;
+                  }
+                  break;
+               case NC_INT64:
+                  for (lp = (long *)src, lip = dest; count < len; count++)
+                     *lip++ = *lp++;
+                  break;
+               case NC_UINT64:
+                  for (lp = (long *)src, ulip = dest; count < len; count++)
+		  {
+                     if (*lp < 0)
+                        (*range_error)++;
+                     *ulip++ = *lp++;
+		  }
+                  break;
+               case NC_FLOAT:
+                  for (lp = (long *)src, fp = dest; count < len; count++)
+                     *fp++ = *lp++;
+                  break;
+               case NC_DOUBLE:
+                  for (lp = (long *)src, dp = dest; count < len; count++)
+                     *dp++ = *lp++;
+                  break;
+               default:
+                  LOG((0, "nc4_convert_type: unexpected dest type. "
+                       "src_type %d, dest_type %d", src_type, dest_type));
+                  return NC_EBADTYPE;
+            }
+         }
+         else
+         {
+            switch (dest_type)
+            {
+               case NC_UBYTE:
+                  for (ip = (int *)src, ubp = dest; count < len; count++)
+                  {
+                     if (*ip > X_UCHAR_MAX || *ip < 0)
+                        (*range_error)++;
+                     *ubp++ = *ip++;
+                  }
+                  break;
+               case NC_BYTE:
+                  for (ip = (int *)src, bp = dest; count < len; count++)
+                  {
+                     if (*ip > X_SCHAR_MAX || *ip < X_SCHAR_MIN)
+                        (*range_error)++;
+                     *bp++ = *ip++;
+                  }
+                  break;
+               case NC_SHORT:
+                  for (ip = (int *)src, sp = dest; count < len; count++)
+                  {
+                     if (*ip > X_SHORT_MAX || *ip < X_SHORT_MIN)
+                        (*range_error)++;
+                     *sp++ = *ip++;
+                  }
+                  break;
+               case NC_USHORT:
+                  for (ip = (int *)src, usp = dest; count < len; count++)
+                  {
+                     if (*ip > X_USHORT_MAX || *ip < 0)
+                        (*range_error)++;
+                     *usp++ = *ip++;
+                  }
+                  break;
+               case NC_INT: /* src is int */
+                  if (dest_long)
+                  {
+                     for (ip = (int *)src, lp1 = dest; count < len; count++)
+                     {
+                        if (*ip > X_LONG_MAX || *ip < X_LONG_MIN)
+                           (*range_error)++;
+                        *lp1++ = *ip++;
+                     }
+                  }
+                  else /* dest is int */
+                  {
+                     for (ip = (int *)src, ip1 = dest; count < len; count++)
+                     {
+                        if (*ip > X_INT_MAX || *ip < X_INT_MIN)
+                           (*range_error)++;
+                        *ip1++ = *ip++;
+                     }
+                  }
+                  break;
+               case NC_UINT:
+                  for (ip = (int *)src, uip = dest; count < len; count++)
+                  {
+                     if (*ip > X_UINT_MAX || *ip < 0)
+                        (*range_error)++;
+                     *uip++ = *ip++;
+                  }
+                  break;
+               case NC_INT64:
+                  for (ip = (int *)src, lip = dest; count < len; count++)
+                     *lip++ = *ip++;
+                  break;
+               case NC_UINT64:
+                  for (ip = (int *)src, ulip = dest; count < len; count++)
+		  {
+		      if (*ip < 0) 
+			  (*range_error)++;
+                     *ulip++ = *ip++;
+		  }
+                  break;
+               case NC_FLOAT:
+                  for (ip = (int *)src, fp = dest; count < len; count++)
+                     *fp++ = *ip++;
+                  break;
+               case NC_DOUBLE:
+                  for (ip = (int *)src, dp = dest; count < len; count++)
+                     *dp++ = *ip++;
+                  break;
+               default:
+                  LOG((0, "nc4_convert_type: unexpected dest type. "
+                       "src_type %d, dest_type %d", src_type, dest_type));
+                  return NC_EBADTYPE;
+            }
+         }
+         break;
+      case NC_UINT:
+         switch (dest_type)
+         {
+            case NC_UBYTE:
+               for (uip = (unsigned int *)src, ubp = dest; count < len; count++)
+               {
+                  if (*uip > X_UCHAR_MAX)
+                     (*range_error)++;
+                  *ubp++ = *uip++;
+               }
+               break;
+            case NC_BYTE:
+               for (uip = (unsigned int *)src, bp = dest; count < len; count++)
+               {
+                  if (*uip > X_SCHAR_MAX)
+                     (*range_error)++;
+                  *bp++ = *uip++;
+               }
+               break;
+            case NC_SHORT:
+               for (uip = (unsigned int *)src, sp = dest; count < len; count++)
+               {
+                  if (*uip > X_SHORT_MAX)
+                     (*range_error)++;
+                  *sp++ = *uip++;
+               }
+               break;
+            case NC_USHORT:
+               for (uip = (unsigned int *)src, usp = dest; count < len; count++)
+               {
+                  if (*uip > X_USHORT_MAX)
+                     (*range_error)++;
+                  *usp++ = *uip++;
+               }
+               break;
+            case NC_INT:
+               if (dest_long)
+                  for (uip = (unsigned int *)src, lp = dest; count < len; count++)
+                  {
+                     if (*uip > X_LONG_MAX)
+                        (*range_error)++;
+                     *lp++ = *uip++;
+                  }
+               else
+                  for (uip = (unsigned int *)src, ip = dest; count < len; count++)
+                  {
+                     if (*uip > X_INT_MAX)
+                        (*range_error)++;
+                     *ip++ = *uip++;
+                  }
+               break;
+            case NC_UINT:
+               for (uip = (unsigned int *)src, uip1 = dest; count < len; count++)
+               {
+                  if (*uip > X_UINT_MAX)
+                     (*range_error)++;
+                  *uip1++ = *uip++;
+               }
+               break;
+            case NC_INT64:
+               for (uip = (unsigned int *)src, lip = dest; count < len; count++)
+                  *lip++ = *uip++;
+               break;
+            case NC_UINT64:
+               for (uip = (unsigned int *)src, ulip = dest; count < len; count++)
+                  *ulip++ = *uip++;
+               break;
+            case NC_FLOAT:
+               for (uip = (unsigned int *)src, fp = dest; count < len; count++)
+                  *fp++ = *uip++;
+               break;
+            case NC_DOUBLE:
+               for (uip = (unsigned int *)src, dp = dest; count < len; count++)
+                  *dp++ = *uip++;
+               break;
+            default:
+               LOG((0, "nc4_convert_type: unexpected dest type. "
+                    "src_type %d, dest_type %d", src_type, dest_type));
+               return NC_EBADTYPE;
+         }
+         break;
+      case NC_INT64:
+         switch (dest_type)
+         {
+            case NC_UBYTE:
+               for (lip = (long long *)src, ubp = dest; count < len; count++)
+               {
+                  if (*lip > X_UCHAR_MAX || *lip < 0)
+                     (*range_error)++;
+                  *ubp++ = *lip++;
+               }
+               break;
+            case NC_BYTE:
+               for (lip = (long long *)src, bp = dest; count < len; count++)
+               {
+                  if (*lip > X_SCHAR_MAX || *lip < X_SCHAR_MIN)
+                     (*range_error)++;
+                  *bp++ = *lip++;
+               }
+               break;
+            case NC_SHORT:
+               for (lip = (long long *)src, sp = dest; count < len; count++)
+               {
+                  if (*lip > X_SHORT_MAX || *lip < X_SHORT_MIN)
+                     (*range_error)++;
+                  *sp++ = *lip++;
+               }
+               break;
+            case NC_USHORT:
+               for (lip = (long long *)src, usp = dest; count < len; count++)
+               {
+                  if (*lip > X_USHORT_MAX || *lip < 0)
+                     (*range_error)++;
+                  *usp++ = *lip++;
+               }
+               break;
+            case NC_UINT:
+               for (lip = (long long *)src, uip = dest; count < len; count++)
+               {
+                  if (*lip > X_UINT_MAX || *lip < 0)
+                     (*range_error)++;
+                  *uip++ = *lip++;
+               }
+               break;
+            case NC_INT:
+               if (dest_long)
+                  for (lip = (long long *)src, lp = dest; count < len; count++)
+                  {
+                     if (*lip > X_LONG_MAX || *lip < X_LONG_MIN)
+                        (*range_error)++;
+                     *lp++ = *lip++;
+                  }
+               else
+                  for (lip = (long long *)src, ip = dest; count < len; count++)
+                  {
+                     if (*lip > X_INT_MAX || *lip < X_INT_MIN)
+                        (*range_error)++;
+                     *ip++ = *lip++;
+                  }
+               break;
+            case NC_INT64:
+               for (lip = (long long *)src, lip1 = dest; count < len; count++)
+                  *lip1++ = *lip++;
+               break;
+            case NC_UINT64:
+               for (lip = (long long *)src, ulip = dest; count < len; count++)
+               {
+                  if (*lip < 0)
+                     (*range_error)++;
+                  *ulip++ = *lip++;
+               }
+               break;
+            case NC_FLOAT:
+               for (lip = (long long *)src, fp = dest; count < len; count++)
+                  *fp++ = *lip++;
+               break;
+            case NC_DOUBLE:
+               for (lip = (long long *)src, dp = dest; count < len; count++)
+                  *dp++ = *lip++;
+               break;
+            default:
+               LOG((0, "nc4_convert_type: unexpected dest type. "
+                    "src_type %d, dest_type %d", src_type, dest_type));
+               return NC_EBADTYPE;
+         }
+         break;
+      case NC_UINT64:
+         switch (dest_type)
+         {
+            case NC_UBYTE:
+               for (ulip = (unsigned long long *)src, ubp = dest; count < len; count++)
+               {
+                  if (*ulip > X_UCHAR_MAX)
+                     (*range_error)++;
+                  *ubp++ = *ulip++;
+               }
+               break;
+            case NC_BYTE:
+               for (ulip = (unsigned long long *)src, bp = dest; count < len; count++)
+               {
+                  if (*ulip > X_SCHAR_MAX)
+                     (*range_error)++;
+                  *bp++ = *ulip++;
+               }
+               break;
+            case NC_SHORT:
+               for (ulip = (unsigned long long *)src, sp = dest; count < len; count++)
+               {
+                  if (*ulip > X_SHORT_MAX)
+                     (*range_error)++;
+                  *sp++ = *ulip++;
+               }
+               break;
+            case NC_USHORT:
+               for (ulip = (unsigned long long *)src, usp = dest; count < len; count++)
+               {
+                  if (*ulip > X_USHORT_MAX)
+                     (*range_error)++;
+                  *usp++ = *ulip++;
+               }
+               break;
+            case NC_UINT:
+               for (ulip = (unsigned long long *)src, uip = dest; count < len; count++)
+               {
+                  if (*ulip > X_UINT_MAX)
+                     (*range_error)++;
+                  *uip++ = *ulip++;
+               }
+               break;
+            case NC_INT:
+               if (dest_long)
+                  for (ulip = (unsigned long long *)src, lp = dest; count < len; count++)
+                  {
+                     if (*ulip > X_LONG_MAX)
+                        (*range_error)++;
+                     *lp++ = *ulip++;
+                  }
+               else
+                  for (ulip = (unsigned long long *)src, ip = dest; count < len; count++)
+                  {
+                     if (*ulip > X_INT_MAX)
+                        (*range_error)++;
+                     *ip++ = *ulip++;
+                  }
+               break;
+            case NC_INT64:
+               for (ulip = (unsigned long long *)src, lip = dest; count < len; count++)
+               {
+                  if (*ulip > X_INT64_MAX)
+                    (*range_error)++;
+                  *lip++ = *ulip++;
+               }
+               break;
+            case NC_UINT64:
+               for (ulip = (unsigned long long *)src, ulip1 = dest; count < len; count++)
+                  *ulip1++ = *ulip++;
+               break;
+            case NC_FLOAT:
+               for (ulip = (unsigned long long *)src, fp = dest; count < len; count++)
+                  *fp++ = *ulip++;
+               break;
+            case NC_DOUBLE:
+               for (ulip = (unsigned long long *)src, dp = dest; count < len; count++)
+                  *dp++ = *ulip++;
+               break;
+            default:
+               LOG((0, "nc4_convert_type: unexpected dest type. "
+                    "src_type %d, dest_type %d", src_type, dest_type));
+               return NC_EBADTYPE;
+         }
+         break;
+      case NC_FLOAT:
+         switch (dest_type)
+         {
+            case NC_UBYTE:
+               for (fp = (float *)src, ubp = dest; count < len; count++)
+               {
+                  if (*fp > X_UCHAR_MAX || *fp < 0)
+                     (*range_error)++;
+                  *ubp++ = *fp++;
+               }
+               break;
+            case NC_BYTE:
+               for (fp = (float *)src, bp = dest; count < len; count++)
+               {
+                  if (*fp > (double)X_SCHAR_MAX || *fp < (double)X_SCHAR_MIN)
+                     (*range_error)++;
+                  *bp++ = *fp++;
+               }
+               break;
+            case NC_SHORT:
+               for (fp = (float *)src, sp = dest; count < len; count++)
+               {
+                  if (*fp > (double)X_SHORT_MAX || *fp < (double)X_SHORT_MIN)
+                     (*range_error)++;
+                  *sp++ = *fp++;
+               }
+               break;
+            case NC_USHORT:
+               for (fp = (float *)src, usp = dest; count < len; count++)
+               {
+                  if (*fp > X_USHORT_MAX || *fp < 0)
+                     (*range_error)++;
+                  *usp++ = *fp++;
+               }
+               break;
+            case NC_UINT:
+               for (fp = (float *)src, uip = dest; count < len; count++)
+               {
+                  if (*fp > X_UINT_MAX || *fp < 0)
+                     (*range_error)++;
+                  *uip++ = *fp++;
+               }
+               break;
+            case NC_INT:
+               if (dest_long)
+                  for (fp = (float *)src, lp = dest; count < len; count++)
+                  {
+                     if (*fp > (double)X_LONG_MAX || *fp < (double)X_LONG_MIN)
+                        (*range_error)++;
+                     *lp++ = *fp++;
+                  }
+               else
+                  for (fp = (float *)src, ip = dest; count < len; count++)
+                  {
+                     if (*fp > (double)X_INT_MAX || *fp < (double)X_INT_MIN)
+                        (*range_error)++;
+                     *ip++ = *fp++;
+                  }
+               break;
+            case NC_INT64:
+               for (fp = (float *)src, lip = dest; count < len; count++)
+               {
+                  if (*fp > X_INT64_MAX || *fp <X_INT64_MIN)
+                    (*range_error)++;
+                  *lip++ = *fp++;
+               }
+               break;
+            case NC_UINT64:
+               for (fp = (float *)src, lip = dest; count < len; count++)
+               {
+                  if (*fp > X_UINT64_MAX || *fp < 0)
+                    (*range_error)++;
+                  *lip++ = *fp++;
+               }
+               break;
+            case NC_FLOAT:
+               for (fp = (float *)src, fp1 = dest; count < len; count++)
+               {
+/*                if (*fp > X_FLOAT_MAX || *fp < X_FLOAT_MIN)
+                  (*range_error)++;*/
+                  *fp1++ = *fp++;
+               }
+               break;
+            case NC_DOUBLE:
+               for (fp = (float *)src, dp = dest; count < len; count++)
+                  *dp++ = *fp++;
+               break;
+            default:
+               LOG((0, "nc4_convert_type: unexpected dest type. "
+                    "src_type %d, dest_type %d", src_type, dest_type));
+               return NC_EBADTYPE;
+         }
+         break;
+      case NC_DOUBLE:
+         switch (dest_type)
+         {
+            case NC_UBYTE:
+               for (dp = (double *)src, ubp = dest; count < len; count++)
+               {
+                  if (*dp > X_UCHAR_MAX || *dp < 0)
+                     (*range_error)++;
+                  *ubp++ = *dp++;
+               }
+               break;
+            case NC_BYTE:
+               for (dp = (double *)src, bp = dest; count < len; count++)
+               {
+                  if (*dp > X_SCHAR_MAX || *dp < X_SCHAR_MIN)
+                     (*range_error)++;
+                  *bp++ = *dp++;
+               }
+               break;
+            case NC_SHORT:
+               for (dp = (double *)src, sp = dest; count < len; count++)
+               {
+                  if (*dp > X_SHORT_MAX || *dp < X_SHORT_MIN)
+                     (*range_error)++;
+                  *sp++ = *dp++;
+               }
+               break;
+            case NC_USHORT:
+               for (dp = (double *)src, usp = dest; count < len; count++)
+               {
+                  if (*dp > X_USHORT_MAX || *dp < 0)
+                     (*range_error)++;
+                  *usp++ = *dp++;
+               }
+               break;
+            case NC_UINT:
+               for (dp = (double *)src, uip = dest; count < len; count++)
+               {
+                  if (*dp > X_UINT_MAX || *dp < 0)
+                     (*range_error)++;
+                  *uip++ = *dp++;
+               }
+               break;
+            case NC_INT:
+               if (dest_long)
+                  for (dp = (double *)src, lp = dest; count < len; count++)
+                  {
+                     if (*dp > X_LONG_MAX || *dp < X_LONG_MIN)
+                        (*range_error)++;
+                     *lp++ = *dp++;
+                  }
+               else
+                  for (dp = (double *)src, ip = dest; count < len; count++)
+                  {
+                     if (*dp > X_INT_MAX || *dp < X_INT_MIN)
+                        (*range_error)++;
+                     *ip++ = *dp++;
+                  }
+               break;
+            case NC_INT64:
+               for (dp = (double *)src, lip = dest; count < len; count++)
+               {
+                  if (*dp > X_INT64_MAX || *dp < X_INT64_MIN)
+                    (*range_error)++;
+                  *lip++ = *dp++;
+               }
+               break;
+            case NC_UINT64:
+               for (dp = (double *)src, lip = dest; count < len; count++)
+               {
+                  if (*dp > X_UINT64_MAX || *dp < 0)
+                    (*range_error)++;
+                  *lip++ = *dp++;
+               }
+               break;
+            case NC_FLOAT:
+               for (dp = (double *)src, fp = dest; count < len; count++)
+               {
+                  if (*dp > X_FLOAT_MAX || *dp < X_FLOAT_MIN)
+                     (*range_error)++;
+                  *fp++ = *dp++;
+               }
+               break;
+            case NC_DOUBLE:
+               for (dp = (double *)src, dp1 = dest; count < len; count++)
+               {
+		   /* if (*dp > X_DOUBLE_MAX || *dp < X_DOUBLE_MIN) */
+		   /*    (*range_error)++; */
+                  *dp1++ = *dp++;
+               }
+               break;
+            default:
+               LOG((0, "nc4_convert_type: unexpected dest type. "
+                    "src_type %d, dest_type %d", src_type, dest_type));
+               return NC_EBADTYPE;
+         }
+         break;
+      default:
+         LOG((0, "nc4_convert_type: unexpected src type. "
+              "src_type %d, dest_type %d", src_type, dest_type));
+         return NC_EBADTYPE;
+   }
+   return NC_NOERR;
+}
+
+/* In our first pass through the data, we may have encountered
+ * variables before encountering their dimscales, so go through the
+ * vars in this file and make sure we've got a dimid for each. */
+int
+nc4_rec_match_dimscales(NC_GRP_INFO_T *grp)
+{
+   NC_GRP_INFO_T *g;
+   NC_VAR_INFO_T *var;
+   NC_DIM_INFO_T *dim;
+   H5G_stat_t statbuf;
+   int d, finished;
+   int retval = NC_NOERR;
+
+   assert(grp && grp->name);
+   LOG((4, "nc4_rec_match_dimscales: grp->name %s", grp->name));
+
+   /* Perform var dimscale match for child groups. */
+   for (g = grp->children; g; g = g->next)
+      if ((retval = nc4_rec_match_dimscales(g)))
+         return retval;
+   
+   /* Check all the vars in this group. If they have dimscale info,
+    * try and find a dimension for them. */
+   for (var = grp->var; var; var = var->next)
+   {
+      /* Are there dimscales for this variable? */
+      if (var->dimscale_hdf5_objids)
+      {
+         for (d = 0; d < var->ndims; d++)
+         {
+            LOG((5, "nc4_rec_match_dimscales: var %s has dimscale info...", var->name));
+            /* Look at all the dims in this group to see if they
+             * match. */
+            finished = 0;
+            for (g = grp; g && !finished; g = g->parent)
+            {
+               for (dim = g->dim; dim; dim = dim->next)
+               {
+                  if (!dim->hdf_dimscaleid)
+                     return NC_EDIMMETA;
+                  if (H5Gget_objinfo(dim->hdf_dimscaleid, ".", 1, &statbuf) < 0)
+                     return NC_EHDFERR;
+                  if (var->dimscale_hdf5_objids[d].fileno[0] == statbuf.fileno[0] && 
+                      var->dimscale_hdf5_objids[d].objno[0] == statbuf.objno[0] &&
+                      var->dimscale_hdf5_objids[d].fileno[1] == statbuf.fileno[1] && 
+                      var->dimscale_hdf5_objids[d].objno[1] == statbuf.objno[1])
+                  {
+                     LOG((4, "nc4_rec_match_dimscales: for dimension %d, found dim %s", 
+                          d, dim->name));
+                     var->dimids[d] = dim->dimid;
+                     finished++;
+                     break;
+                  }
+               } /* next dim */
+            } /* next grp */
+            LOG((5, "nc4_rec_match_dimscales: dimid for this dimscale is %d", var->xtype));
+         } /* next var->dim */
+      }
+      else
+      {
+	 if (!var->dimscale)
+	 {
+	    hid_t spaceid = 0;
+	    hsize_t *h5dimlen = NULL, *h5dimlenmax = NULL;
+	    int dataset_ndims;
+
+	    /* No dimscales for this var! Invent phony dimensions. */
+
+	    /* Find the space information for this dimension. */
+	    if ((spaceid = H5Dget_space(var->hdf_datasetid)) < 0)
+	       return NC_EHDFERR;
+#ifdef EXTRA_TESTS
+	    num_spaces++;
+#endif
+
+	    /* Get the len of each dim in the space. */
+	    if (var->ndims)
+	    {
+	       if (!(h5dimlen = malloc(var->ndims * sizeof(hsize_t))))
+		  return NC_ENOMEM;
+	       if (!(h5dimlenmax = malloc(var->ndims * sizeof(hsize_t))))
+		  return NC_ENOMEM;
+	       if ((dataset_ndims = H5Sget_simple_extent_dims(spaceid, h5dimlen, 
+							      h5dimlenmax)) < 0)
+		  return NC_EHDFERR;		  
+	       if (dataset_ndims != var->ndims)
+		  return NC_EHDFERR;		  
+	    } 
+	    else
+	    {
+	       /* Make sure it's scalar. */
+	       if (H5Sget_simple_extent_type(spaceid) != H5S_SCALAR)
+		  return NC_EHDFERR;
+	    }
+
+	    /* Release the space object. */
+	    if (H5Sclose(spaceid) < 0)
+	       return NC_EHDFERR;		  	       
+#ifdef EXTRA_TESTS
+	    num_spaces--;
+#endif
+	    
+	    /* Create a phony dimension for each dimension in the
+	     * dataset, unless there already is one the correct
+	     * size. */
+	    for (d = 0; d < var->ndims; d++)
+	    {
+	       NC_DIM_INFO_T *dim = NULL;
+	       char phony_dim_name[NC_MAX_NAME + 1];
+
+	       /* Is there already a phony dimension of the correct size? */
+	       for (dim = grp->dim; dim; dim = dim->next)
+		  if ((dim->len == h5dimlen[d]) &&
+		      ((h5dimlenmax[d] == H5S_UNLIMITED && dim->unlimited) ||
+		       (h5dimlenmax[d] != H5S_UNLIMITED && !dim->unlimited)))
+		     break;
+	       
+	       /* Didn't find a phony dim? Then create one. */
+	       if (!dim)
+	       {
+		  LOG((3, "nc4_rec_match_dimscales: creating phony dim for var %s", var->name));
+		  if ((retval = nc4_dim_list_add(&grp->dim)))
+		     return retval;
+		  grp->ndims++;
+		  dim = grp->dim;
+		  dim->dimid = grp->file->nc4_info->next_dimid++;
+		  sprintf(phony_dim_name, "phony_dim_%d", dim->dimid);
+		  if (!(dim->name = malloc((strlen(phony_dim_name) + 1) * sizeof(char))))
+		     return NC_ENOMEM;
+		  strcpy(dim->name, phony_dim_name);
+		  dim->len = h5dimlen[d];
+		  if (h5dimlenmax[d] == H5S_UNLIMITED)
+		     dim->unlimited = 1;
+	       }
+	       
+	       /* The variable must remember the dimid. */
+	       var->dimids[d] = dim->dimid;
+	    } /* next dim */
+
+	    /* Free the memory we malloced. */
+	    free(h5dimlen);
+	    free(h5dimlenmax);
+	 }
+      }
+   }
+
+   return retval;
+}
+
+/* Get the length, in bytes, of one element of a type in memory. */
+int 
+nc4_get_typelen_mem(NC_HDF5_FILE_INFO_T *h5, nc_type xtype, int is_long, 
+                    size_t *len)
+{
+   NC_TYPE_INFO_T *type;
+   int retval;
+
+   LOG((4, "nc4_get_typelen_mem xtype: %d", xtype));
+   assert(len);
+
+   /* If this is an atomic type, the answer is easy. */
+   switch (xtype)
+   {
+      case NC_BYTE:
+      case NC_CHAR:
+      case NC_UBYTE:
+         *len = sizeof(char);
+         return NC_NOERR;
+      case NC_SHORT:
+      case NC_USHORT:
+         *len = sizeof(short);
+         return NC_NOERR;
+      case NC_INT:
+      case NC_UINT:
+         if (is_long)
+            *len = sizeof(long);
+         else
+            *len = sizeof(int);
+         return NC_NOERR;
+      case NC_FLOAT:
+         *len = sizeof(float);
+         return NC_NOERR;
+      case NC_DOUBLE:
+         *len = sizeof(double);
+         return NC_NOERR;
+      case NC_INT64:
+      case NC_UINT64:
+         *len = sizeof(long long);
+         return NC_NOERR;
+      case NC_STRING:
+         *len = 0; /* can't even guess! */
+         return NC_NOERR;
+   }
+
+   /* See if var is compound type. */
+   if ((retval = nc4_find_type(h5, xtype, &type)))
+      return retval;
+
+   if (!type)
+      return NC_EBADTYPE;
+
+   *len = type->size;
+
+   LOG((5, "type->size ", type->size));
+
+   return NC_NOERR;
+}
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/src_netcdf4/nc4internal.c
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/src_netcdf4/nc4internal.c	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/src_netcdf4/nc4internal.c	(revision 1749)
@@ -0,0 +1,1476 @@
+/** \file \internal
+Internal netcdf-4 functions.
+
+This file contains functions internal to the netcdf4 library. None of
+the functions in this file are exposed in the exetnal API. These
+functions all relate to the manipulation of netcdf-4's in-memory
+buffer of metadata information, i.e. the linked list of NC_FILE_INFO_T
+structs.
+
+Copyright 2003-2011, University Corporation for Atmospheric
+Research. See the COPYRIGHT file for copying and redistribution
+conditions.
+
+*/
+#include "config.h"
+#include "nc4internal.h"
+#include "nc.h" /* from libsrc */
+#include "ncdispatch.h" /* from libdispatch */
+#include <utf8proc.h>
+
+#define MEGABYTE 1048576
+
+/* These are the default chunk cache sizes for HDF5 files created or
+ * opened with netCDF-4. */
+extern size_t nc4_chunk_cache_size;
+extern size_t nc4_chunk_cache_nelems;
+extern float nc4_chunk_cache_preemption;
+
+/* This is to track opened HDF5 objects to make sure they are
+ * closed. */
+#ifdef EXTRA_TESTS
+extern int num_spaces;
+#endif /* EXTRA_TESTS */
+
+#ifdef LOGGING
+/* This is the severity level of messages which will be logged. Use
+   severity 0 for errors, 1 for important log messages, 2 for less
+   important, etc. */
+int nc_log_level = -1;
+
+#endif /* LOGGING */
+
+/* Check and normalize and name. */
+int
+nc4_check_name(const char *name, char *norm_name)
+{
+   char *temp;
+   int retval;
+
+   /* Check the length. */
+   if (strlen(name) > NC_MAX_NAME)
+      return NC_EMAXNAME;
+
+   /* Make sure this is a valid netcdf name. This should be done
+    * before the name is normalized, because it gives better error
+    * codes for bad utf8 strings. */
+   if ((retval = NC_check_name(name)))
+      return retval;
+
+   /* Normalize the name. */
+   if (!(temp = (char *)utf8proc_NFC((const unsigned char *)name)))
+      return NC_EINVAL;
+   strcpy(norm_name, temp);
+   free(temp);
+      
+   return NC_NOERR;
+}
+
+/* Given a varid, find its shape. For unlimited dimensions, return
+   the current number of records. */
+static int
+find_var_shape_grp(NC_GRP_INFO_T *grp, int varid, int *ndims, 
+		   int *dimid, size_t *dimlen)
+{
+   hid_t datasetid = 0, spaceid = 0;
+   NC_VAR_INFO_T *var;
+   hsize_t *h5dimlen = NULL, *h5dimlenmax = NULL;
+   int d, dataset_ndims = 0;
+   int retval = NC_NOERR;
+
+   /* Find this var. */
+   for (var = grp->var; var; var = var->next)
+      if (var->varid == varid)
+	 break;
+   if (!var)
+      return NC_ENOTVAR;
+
+   /* Get the dimids and the ndims for this var. */
+   if (ndims)
+      *ndims = var->ndims;
+
+   if (dimid)
+      for (d = 0; d < var->ndims; d++)
+	 dimid[d] = var->dimids[d];
+   
+   if (dimlen)
+   {
+      /* If the var hasn't been created yet, its size is 0. */
+      if (!var->created)
+      {
+	 for (d = 0; d < var->ndims; d++)
+	    dimlen[d] = 0;
+      }
+      else
+      {
+	 /* Get the number of records in the dataset. */
+	 if ((retval = nc4_open_var_grp2(grp, var->varid, &datasetid)))
+	    BAIL(retval);
+	 if ((spaceid = H5Dget_space(datasetid)) < 0)
+	    BAIL(NC_EHDFERR);
+#ifdef EXTRA_TESTS
+	 num_spaces++;
+#endif
+	 /* If it's a scalar dataset, it has length one. */
+	 if (H5Sget_simple_extent_type(spaceid) == H5S_SCALAR)
+	 {
+	    dimlen[0] = 1;
+	 }
+	 else
+	 {
+	    /* Check to make sure ndims is right, then get the len of each
+	       dim in the space. */
+	    if ((dataset_ndims = H5Sget_simple_extent_ndims(spaceid)) < 0)
+	       BAIL(NC_EHDFERR);
+	    if (ndims && dataset_ndims != *ndims)
+	       BAIL(NC_EHDFERR);
+	    if (!(h5dimlen = malloc(dataset_ndims * sizeof(hsize_t))))
+	       BAIL(NC_ENOMEM);
+	    if (!(h5dimlenmax = malloc(dataset_ndims * sizeof(hsize_t))))
+	       BAIL(NC_ENOMEM);
+	    if ((dataset_ndims = H5Sget_simple_extent_dims(spaceid, 
+							   h5dimlen, h5dimlenmax)) < 0)
+	       BAIL(NC_EHDFERR);
+	    LOG((5, "find_var_shape_nc: varid %d len %d max: %d", 
+		 varid, (int)h5dimlen[0], (int)h5dimlenmax[0]));
+	    for (d=0; d<dataset_ndims; d++)
+	       dimlen[d] = h5dimlen[d];
+	 }
+      }
+   }
+
+  exit:
+   if (spaceid > 0 && H5Sclose(spaceid) < 0)
+      BAIL2(NC_EHDFERR);
+#ifdef EXTRA_TESTS
+   num_spaces--;
+#endif
+   if (h5dimlen) free(h5dimlen);
+   if (h5dimlenmax) free(h5dimlenmax);
+   return retval;
+}
+
+/* Given an NC_FILE_INFO_T pointer, add the necessary stuff for a
+ * netcdf-4 file. */
+int
+nc4_nc4f_list_add(NC_FILE_INFO_T *nc, const char *path, int mode)
+{
+   NC_HDF5_FILE_INFO_T *h5;
+   NC_GRP_INFO_T *grp;
+
+   assert(nc && !nc->nc4_info && path);
+
+   /* The NC_FILE_INFO_T was allocated and inited by
+      ncfunc.c before this function is called. We need to malloc and
+      initialize the substructure NC_HDF_FILE_INFO_T. */
+   if (!(nc->nc4_info = calloc(1, sizeof(NC_HDF5_FILE_INFO_T))))
+      return NC_ENOMEM;
+   h5 = nc->nc4_info;
+
+   /* Hang on to the filename for nc_abort. */
+   if (!(h5->path = malloc((strlen(path) + 1) * sizeof(char))))
+      return NC_ENOMEM;
+   strcpy(h5->path, path);
+
+   /* Hang on to cmode, and note that we're in define mode. */
+   h5->cmode = mode | NC_INDEF;
+
+   /* The next_typeid needs to be set beyond the end of our atomic
+    * types. */
+   h5->next_typeid = NC_FIRSTUSERTYPEID;
+
+   /* There's always at least one open group - the root
+    * group. Allocate space for one group's worth of information. Set
+    * its hdf id, name, and a pointer to it's file structure. */
+   return nc4_grp_list_add(&(h5->root_grp), h5->next_nc_grpid++, 
+			   NULL, nc, NC_GROUP_NAME, &grp);
+}
+/* /\* Given an ncid, find the relevant group and return a pointer to */
+/*  * it. *\/ */
+/* NC_GRP_INFO_T * */
+/* find_nc_grp(int ncid) */
+/* { */
+/*    NC_FILE_INFO_T *f; */
+
+/*    for (f = nc_file; f; f = f->next) */
+/*    { */
+/*       if (f->ext_ncid == (ncid & FILE_ID_MASK)) */
+/*       { */
+/* 	 assert(f->nc4_info && f->nc4_info->root_grp); */
+/* 	 return nc4_rec_find_grp(f->nc4_info->root_grp, (ncid & GRP_ID_MASK)); */
+/*       } */
+/*    } */
+
+/*    return NULL; */
+/* } */
+
+/* Given an ncid, find the relevant group and return a pointer to it,
+ * return an error of this is not a netcdf-4 file (or if strict nc3 is
+ * turned on for this file.) */
+
+
+int
+nc4_find_nc4_grp(int ncid, NC_GRP_INFO_T **grp)
+{
+   NC_FILE_INFO_T *f = nc4_find_nc_file(ncid);
+   if(f == NULL) return NC_EBADID;
+
+   /* No netcdf-3 files allowed! */
+   if (!f->nc4_info) return NC_ENOTNC4;
+   assert(f->nc4_info->root_grp);
+
+   /* This function demands netcdf-4 files without strict nc3
+    * rules.*/
+   if (f->nc4_info->cmode & NC_CLASSIC_MODEL) return NC_ESTRICTNC3;
+
+   /* If we can't find it, the grp id part of ncid is bad. */
+   if (!(*grp = nc4_rec_find_grp(f->nc4_info->root_grp, (ncid & GRP_ID_MASK))))
+      return NC_EBADID;
+   return NC_NOERR;
+}
+
+/* Given an ncid, find the relevant group and return a pointer to it,
+ * also set a pointer to the nc4_info struct of the related file. For
+ * netcdf-3 files, *h5 will be set to NULL. */
+int
+nc4_find_grp_h5(int ncid, NC_GRP_INFO_T **grp, NC_HDF5_FILE_INFO_T **h5)
+{
+    NC_FILE_INFO_T *f = nc4_find_nc_file(ncid);
+    if(f == NULL) return NC_EBADID;
+    if (f->nc4_info) {
+        assert(f->nc4_info->root_grp);
+        /* If we can't find it, the grp id part of ncid is bad. */
+	if (!(*grp = nc4_rec_find_grp(f->nc4_info->root_grp, (ncid & GRP_ID_MASK))))
+  	    return NC_EBADID;
+	*h5 = (*grp)->file->nc4_info;
+	assert(*h5);
+    } else {
+	*h5 = NULL;
+	*grp = NULL;
+    }
+    return NC_NOERR;
+}
+
+int
+nc4_find_nc_grp_h5(int ncid, NC_FILE_INFO_T **nc, NC_GRP_INFO_T **grp, 
+		   NC_HDF5_FILE_INFO_T **h5)
+{
+    NC_FILE_INFO_T *f = nc4_find_nc_file(ncid);
+    if(f == NULL) return NC_EBADID;
+    *nc = f;
+    if (f->nc4_info) {
+	assert(f->nc4_info->root_grp);
+	/* If we can't find it, the grp id part of ncid is bad. */
+	if (!(*grp = nc4_rec_find_grp(f->nc4_info->root_grp, (ncid & GRP_ID_MASK))))
+	       return NC_EBADID;
+
+	*h5 = (*grp)->file->nc4_info;
+	assert(*h5);
+    } else {
+	*h5 = NULL;
+	*grp = NULL;
+    }
+    return NC_NOERR;
+}
+
+/* Recursively hunt for a group id. */
+NC_GRP_INFO_T *
+nc4_rec_find_grp(NC_GRP_INFO_T *start_grp, int target_nc_grpid)
+{
+   NC_GRP_INFO_T *g, *res;
+
+   assert(start_grp);
+   
+   /* Is this the group we are searching for? */
+   if (start_grp->nc_grpid == target_nc_grpid)
+      return start_grp;
+
+   /* Shake down the kids. */
+   if (start_grp->children)
+      for (g = start_grp->children; g; g = g->next)
+	 if ((res = nc4_rec_find_grp(g, target_nc_grpid)))
+	    return res;
+
+   /* Can't find if. Fate, why do you mock me? */
+   return NULL;
+}
+
+/* Given an ncid and varid, get pointers to the group and var
+ * metadata. */
+int
+nc4_find_g_var_nc(NC_FILE_INFO_T *nc, int ncid, int varid, 
+		  NC_GRP_INFO_T **grp, NC_VAR_INFO_T **var)
+{
+   /* Find the group info. */
+   assert(grp && var && nc && nc->nc4_info && nc->nc4_info->root_grp);
+   *grp = nc4_rec_find_grp(nc->nc4_info->root_grp, (ncid & GRP_ID_MASK));
+
+   /* Find the var info. */
+   for ((*var) = (*grp)->var; (*var); (*var) = (*var)->next)
+     if ((*var)->varid == varid)
+       break;
+   if (!(*var))
+     return NC_ENOTVAR;
+
+   return NC_NOERR;
+}
+
+/* Find a dim in a grp (or parents). */
+int
+nc4_find_dim(NC_GRP_INFO_T *grp, int dimid, NC_DIM_INFO_T **dim,
+	     NC_GRP_INFO_T **dim_grp)
+{
+   NC_GRP_INFO_T *g, *dg = NULL;
+   int finished = 0; 
+   
+   assert(grp && dim);
+
+   /* Find the dim info. */
+   for (g = grp; g && !finished; g = g->parent)
+      for ((*dim) = g->dim; (*dim); (*dim) = (*dim)->next)
+	 if ((*dim)->dimid == dimid)
+	 {
+	    dg = g;
+	    finished++;
+	    break;
+	 }
+
+   /* If we didn't find it, return an error. */
+   if (!(*dim))
+     return NC_EBADDIM;
+   
+   /* Give the caller the group the dimension is in. */
+   if (dim_grp)
+      *dim_grp = dg;
+
+   return NC_NOERR;
+}
+
+/* Recursively hunt for a HDF type id. */
+NC_TYPE_INFO_T *
+nc4_rec_find_hdf_type(NC_GRP_INFO_T *start_grp, hid_t target_hdf_typeid)
+{
+   NC_GRP_INFO_T *g;
+   NC_TYPE_INFO_T *type, *res;
+   htri_t equal;
+
+   assert(start_grp);
+   
+   /* Does this group have the type we are searching for? */
+   for (type = start_grp->type; type; type = type->next)
+   {
+      if ((equal = H5Tequal(type->native_typeid ? type->native_typeid : type->hdf_typeid, target_hdf_typeid)) < 0)
+	 return NULL;
+      if (equal)
+	 return type;
+   }
+
+   /* Shake down the kids. */
+   if (start_grp->children)
+      for (g = start_grp->children; g; g = g->next)
+	 if ((res = nc4_rec_find_hdf_type(g, target_hdf_typeid)))
+	    return res;
+
+   /* Can't find if. Fate, why do you mock me? */
+   return NULL;
+}
+
+/* Recursively hunt for a netCDF type id. */
+NC_TYPE_INFO_T *
+nc4_rec_find_nc_type(NC_GRP_INFO_T *start_grp, nc_type target_nc_typeid)
+{
+   NC_GRP_INFO_T *g;
+   NC_TYPE_INFO_T *type, *res;
+
+   assert(start_grp);
+   
+   /* Does this group have the type we are searching for? */
+   for (type = start_grp->type; type; type = type->next)
+      if (type->nc_typeid == target_nc_typeid)
+	 return type;
+
+   /* Shake down the kids. */
+   if (start_grp->children)
+      for (g = start_grp->children; g; g = g->next)
+	 if ((res = nc4_rec_find_nc_type(g, target_nc_typeid)))
+	    return res;
+
+   /* Can't find if. Fate, why do you mock me? */
+   return NULL;
+}
+
+/* Recursively hunt for a netCDF type by name. */
+NC_TYPE_INFO_T *
+nc4_rec_find_named_type(NC_GRP_INFO_T *start_grp, char *name)
+{
+   NC_GRP_INFO_T *g;
+   NC_TYPE_INFO_T *type, *res;
+
+   assert(start_grp);
+   
+   /* Does this group have the type we are searching for? */
+   for (type = start_grp->type; type; type = type->next)
+      if (!strcmp(type->name, name))
+	 return type;
+
+   /* Search subgroups. */
+   if (start_grp->children)
+      for (g = start_grp->children; g; g = g->next)
+	 if ((res = nc4_rec_find_named_type(g, name)))
+	    return res;
+
+   /* Can't find if. Oh, woe is me! */
+   return NULL;
+}
+
+/* Use a netCDF typeid to find a type in a type_list. */
+int
+nc4_find_type(NC_HDF5_FILE_INFO_T *h5, nc_type typeid, NC_TYPE_INFO_T **type)
+{
+   if (typeid < 0 || !type)
+      return NC_EINVAL;
+   *type = NULL;
+
+   /* Atomic types don't have associated NC_TYPE_INFO_T struct, just
+    * return NOERR. */
+   if (typeid <= NC_STRING)
+      return NC_NOERR;
+
+   /* Find the type. */
+   if(!(*type = nc4_rec_find_nc_type(h5->root_grp, typeid)))
+      return NC_EBADTYPID;
+
+   return NC_NOERR;
+}
+
+/* Find the actual length of a dim by checking the length of that dim
+ * in all variables that use it, in grp or children. *len must be
+ * initialized to zero before this function is called. */
+int
+nc4_find_dim_len(NC_GRP_INFO_T *grp, int dimid, size_t **len)
+{
+   NC_GRP_INFO_T *g;
+   NC_VAR_INFO_T *var;
+   int d, ndims, dimids[NC_MAX_DIMS];
+   size_t dimlen[NC_MAX_DIMS];
+   int retval; 
+   
+   assert(grp && len);
+   LOG((3, "nc4_find_dim_len: grp->name %s dimid %d", grp->name, dimid));
+
+   /* If there are any groups, call this function recursively on
+    * them. */
+   for (g = grp->children; g; g = g->next)
+      if ((retval = nc4_find_dim_len(g, dimid, len)))
+	 return retval;
+
+   /* For all variables in this group, find the ones that use this
+    * dimension, and remember the max length. */
+   for (var = grp->var; var; var = var->next)
+   {
+      /* Find dimensions of this var. */
+      if ((retval = find_var_shape_grp(grp, var->varid, &ndims, 
+				       dimids, dimlen)))
+	 return retval;
+
+      /* Check for any dimension that matches dimid. If found, check
+       * if its length is longer than *lenp. */
+      for (d = 0; d < ndims; d++)
+      {
+	 if (dimids[d] == dimid)
+	 {
+	    /* Remember the max length in *lenp. */
+	    **len = dimlen[d] > **len ? dimlen[d] : **len;
+	    break;
+	 }
+      }
+   }
+
+   return NC_NOERR;
+}
+
+/* Given a group, find an att. */
+int
+nc4_find_grp_att(NC_GRP_INFO_T *grp, int varid, const char *name, int attnum,
+		 NC_ATT_INFO_T **att)
+{
+   NC_VAR_INFO_T *var;
+   NC_ATT_INFO_T *attlist = NULL;
+
+   assert(grp && grp->name);
+   LOG((4, "nc4_find_grp_att: grp->name %s varid %d name %s attnum %d", 
+	grp->name, varid, name, attnum));
+
+   /* Get either the global or a variable attribute list. */
+   if (varid == NC_GLOBAL)
+      attlist = grp->att;
+   else
+   {
+      for(var = grp->var; var; var = var->next)
+      {
+	 if (var->varid == varid)
+	 {
+	    attlist = var->att;
+	    break;
+	 }
+      }
+      if (!var)
+	 return NC_ENOTVAR;
+   }
+
+   /* Now find the attribute by name or number. If a name is provided,
+    * ignore the attnum. */
+   for (*att = attlist; *att; *att = (*att)->next)
+      if ((name && !strcmp((*att)->name, name)) ||
+	  (!name && (*att)->attnum == attnum))
+	 return NC_NOERR;
+
+   /* If we get here, we couldn't find the attribute. */
+   return NC_ENOTATT;
+}
+
+/* Given an ncid, varid, and name or attnum, find and return pointer
+   to NC_ATT_INFO_T metadata. */
+int
+nc4_find_nc_att(int ncid, int varid, const char *name, int attnum,
+	    NC_ATT_INFO_T **att)
+{
+   NC_GRP_INFO_T *grp;
+   NC_HDF5_FILE_INFO_T *h5;
+   NC_VAR_INFO_T *var;
+   NC_ATT_INFO_T *attlist = NULL;
+   int retval;
+
+   LOG((4, "nc4_find_nc_att: ncid 0x%x varid %d name %s attnum %d", 
+	ncid, varid, name, attnum));
+
+   /* Find info for this file and group, and set pointer to each. */
+   if ((retval = nc4_find_grp_h5(ncid, &grp, &h5)))
+      return retval;
+   assert(grp && h5);
+
+   /* Get either the global or a variable attribute list. */
+   if (varid == NC_GLOBAL)
+      attlist = grp->att;
+   else
+   {
+      for(var = grp->var; var; var = var->next)
+      {
+	 if (var->varid == varid)
+	 {
+	    attlist = var->att;
+	    break;
+	 }
+      }
+      if (!var)
+	 return NC_ENOTVAR;
+   }
+
+   /* Now find the attribute by name or number. If a name is provided, ignore the attnum. */
+   for (*att = attlist; *att; *att = (*att)->next)
+      if ((name && !strcmp((*att)->name, name)) ||
+	  (!name && (*att)->attnum == attnum))
+	 return NC_NOERR;
+
+   /* If we get here, we couldn't find the attribute. */
+   return NC_ENOTATT;
+}
+
+void
+nc4_file_list_free(void)
+{
+    free_NCList();
+}
+
+
+int
+NC4_new_nc(NC** ncpp)
+{
+    NC_FILE_INFO_T** ncp;
+    /* Allocate memory for this info. */
+    if (!(ncp = calloc(1, sizeof(NC_FILE_INFO_T)))) 
+       return NC_ENOMEM;
+    if(ncpp) *ncpp = (NC*)ncp;
+    return NC_NOERR;
+}
+
+int
+nc4_file_list_add(NC_FILE_INFO_T** ncp, NC_Dispatch* dispatch)
+{
+    NC_FILE_INFO_T *nc;
+    int status = NC_NOERR;
+
+    /* Allocate memory for this info; use the dispatcher to do this */
+    status = dispatch->new_nc((NC**)&nc);
+    if(status) return status;
+
+    /* Add this file to the list. */
+    if ((status = add_to_NCList((NC *)nc)))
+    {
+       if(nc && nc->ext_ncid > 0) 
+       {
+	  del_from_NCList((NC *)nc);
+	  free(nc);
+       }
+       return status;
+    }
+    
+    /* Return a pointer to the new struct. */
+    if(ncp) 
+       *ncp = nc;
+
+    return NC_NOERR;
+}
+
+/* Remove a NC_FILE_INFO_T from the linked list. This will nc_free the
+   memory too. */
+void
+nc4_file_list_del(NC_FILE_INFO_T *nc)
+{
+   /* Remove file from master list. */
+   del_from_NCList((NC *)nc);
+   free(nc);
+}
+
+
+/* Given an id, walk the list and find the appropriate
+   NC_FILE_INFO_T. */
+NC_FILE_INFO_T*
+nc4_find_nc_file(int ext_ncid)
+{
+   return (NC_FILE_INFO_T*)find_in_NCList(ext_ncid);
+}
+
+
+/* Add to the end of a var list. Return a pointer to the newly
+ * added var. */
+int
+nc4_var_list_add(NC_VAR_INFO_T **list, NC_VAR_INFO_T **var)
+{
+   NC_VAR_INFO_T *v;
+
+   /* Allocate storage for new variable. */
+   if (!(*var = calloc(1, sizeof(NC_VAR_INFO_T))))
+      return NC_ENOMEM;
+
+   /* Go to the end of the list and set the last one to point at our
+    * new var, or, if the list is empty, our new var becomes the
+    * list. */
+   if(*list)
+   {
+      for (v = *list; v; v = v->next)
+	 if (!v->next)
+	    break;
+      v->next = *var;
+      (*var)->prev = v;
+   }      
+   else
+      *list = *var;
+
+   /* These are the HDF5-1.8.4 defaults. */
+   (*var)->chunk_cache_size = nc4_chunk_cache_size;
+   (*var)->chunk_cache_nelems = nc4_chunk_cache_nelems;
+   (*var)->chunk_cache_preemption = nc4_chunk_cache_preemption;
+
+   return NC_NOERR;
+}
+
+/* Add to the beginning of a dim list. */
+int
+nc4_dim_list_add(NC_DIM_INFO_T **list)
+{
+   NC_DIM_INFO_T *dim;
+   if (!(dim = calloc(1, sizeof(NC_DIM_INFO_T))))
+      return NC_ENOMEM;
+   if(*list)
+      (*list)->prev = dim;
+   dim->next = *list;
+   *list = dim;
+   return NC_NOERR;
+}
+
+/* Add to the beginning of a dim list. */
+int
+nc4_dim_list_add2(NC_DIM_INFO_T **list, NC_DIM_INFO_T **new_dim)
+{
+   NC_DIM_INFO_T *dim;
+   if (!(dim = calloc(1, sizeof(NC_DIM_INFO_T))))
+      return NC_ENOMEM;
+   if(*list)
+      (*list)->prev = dim;
+   dim->next = *list;
+   *list = dim;
+
+   /* Return pointer to new dimension. */
+   if (new_dim)
+      *new_dim = dim;
+   return NC_NOERR;
+}
+
+/* Add to the end of an att list. */
+int
+nc4_att_list_add(NC_ATT_INFO_T **list)
+{
+   NC_ATT_INFO_T *att, *a1;
+   if (!(att = calloc(1, sizeof(NC_ATT_INFO_T))))
+      return NC_ENOMEM;
+   if (*list)
+   {
+      for (a1 = *list; a1; a1 = a1->next)
+	 if (!a1->next)
+	    break;
+      a1->next = att;
+      att->prev = a1;
+   }
+   else
+   {
+      *list = att;
+   }
+
+   return NC_NOERR;
+}
+
+/* Add to the end of a group list. Can't use 0 as a new_nc_grpid -
+ * it's reserverd for the root group. */
+int
+nc4_grp_list_add(NC_GRP_INFO_T **list, int new_nc_grpid, 
+		 NC_GRP_INFO_T *parent_grp, NC_FILE_INFO_T *nc, 
+		 char *name, NC_GRP_INFO_T **grp)
+{
+   NC_GRP_INFO_T *g;
+
+   LOG((3, "grp_list_add: new_nc_grpid %d name %s ", 
+	new_nc_grpid, name));
+
+   /* Get the memory to store this groups info. */
+   if (!(*grp = calloc(1, sizeof(NC_GRP_INFO_T))))
+      return NC_ENOMEM;
+
+   /* If the list is not NULL, add this group to it. Otherwise, this
+    * group structure becomes the list. */
+   if (*list)
+   {
+      /* Move to end of the list. */
+      for (g = *list; g; g = g->next)
+	 if (!g->next)
+	    break;
+      g->next = *grp; /* Add grp to end of list. */
+      (*grp)->prev = g;
+   }
+   else
+   {
+      *list = *grp;
+   }
+
+   /* Fill in this group's information. */
+   (*grp)->nc_grpid = new_nc_grpid;
+   (*grp)->parent = parent_grp;
+   if (!((*grp)->name = malloc((strlen(name) + 1) * sizeof(char))))
+      return NC_ENOMEM;
+   strcpy((*grp)->name, name);
+   (*grp)->file = nc;
+
+   return NC_NOERR;
+}
+
+/* Names for groups, variables, and types must not be the same. This
+ * function checks that a proposed name is not already in
+ * use. Normalzation of UTF8 strings should happen before this
+ * function is called. */
+int
+nc4_check_dup_name(NC_GRP_INFO_T *grp, char *name)
+{
+   NC_TYPE_INFO_T *type;
+   NC_GRP_INFO_T *g;
+   NC_VAR_INFO_T *var;
+
+   /* Any types of this name? */
+   for (type = grp->type; type; type = type->next)
+      if (!strcmp(type->name, name))
+	 return NC_ENAMEINUSE;
+
+   /* Any child groups of this name? */
+   for (g = grp->children; g; g = g->next)
+      if (!strcmp(g->name, name))
+	 return NC_ENAMEINUSE;
+
+   /* Any variables of this name? */
+   for (var = grp->var; var; var = var->next)
+      if (!strcmp(var->name, name))
+	 return NC_ENAMEINUSE;
+
+   return NC_NOERR;
+}
+
+/* Add to the end of a type list. */
+int
+nc4_type_list_add(NC_TYPE_INFO_T **list, NC_TYPE_INFO_T **new_type)
+{
+   NC_TYPE_INFO_T *type, *t;
+
+   if (!(type = calloc(1, sizeof(NC_TYPE_INFO_T))))
+      return NC_ENOMEM;
+
+   if (*list)
+   {
+      for (t = *list; t; t = t->next)
+	 if (!t->next)
+	    break;
+      t->next = type;
+      type->prev = t;
+   }
+   else
+   {
+      *list = type;
+   }
+
+   if (new_type)
+      *new_type = type;
+
+   return NC_NOERR;
+}
+
+/* Add to the end of a compound field list. */
+int
+nc4_field_list_add(NC_FIELD_INFO_T **list, int fieldid, const char *name,
+		   size_t offset, hid_t field_hdf_typeid, hid_t native_typeid, 
+		   nc_type xtype, int ndims, const int *dim_sizesp)
+{
+   NC_FIELD_INFO_T *field, *f;
+   int i;
+
+   /* Name has already been checked and UTF8 normalized. */
+   if (!name)
+      return NC_EINVAL;
+
+   /* Allocate storage for this field information. */
+   if (!(field = calloc(1, sizeof(NC_FIELD_INFO_T))))
+      return NC_ENOMEM;
+
+   /* Add this field to list. */
+   if (*list)
+   {
+      for (f = *list; f; f = f->next)
+	 if (!f->next)
+	    break;
+      f->next = field;
+      field->prev = f;
+   }
+   else
+   {
+      *list = field;
+   }
+
+   /* Store the information about this field. */
+   field->fieldid = fieldid;
+   if (!(field->name = malloc((strlen(name) + 1) * sizeof(char))))
+      return NC_ENOMEM;
+   strcpy(field->name, name);
+   field->hdf_typeid = field_hdf_typeid;
+   field->native_typeid = native_typeid;
+   field->nctype = xtype;
+   field->offset = offset;
+   field->ndims = ndims;
+   if (ndims)
+   {
+      if (!(field->dim_size = malloc(ndims * sizeof(int))))
+	 return NC_ENOMEM;
+      for (i = 0; i < ndims; i++)
+	 field->dim_size[i] = dim_sizesp[i];
+   }
+
+   return NC_NOERR;
+}
+
+/* Add a member to an enum type. */
+int
+nc4_enum_member_add(NC_ENUM_MEMBER_INFO_T **list, size_t size, 
+		    const char *name, const void *value)
+{
+   NC_ENUM_MEMBER_INFO_T *member, *m;
+
+   /* Name has already been checked. */
+   assert(name && size > 0 && value);
+   LOG((4, "nc4_enum_member_add: size %d name %s", size, name));
+
+   /* Allocate storage for this field information. */
+   if (!(member = calloc(1, sizeof(NC_ENUM_MEMBER_INFO_T))) ||
+       !(member->value = calloc(1, size)))
+      return NC_ENOMEM;
+
+   /* Add this field to list. */
+   if (*list)
+   {
+      for (m = *list; m; m = m->next)
+	 if (!m->next)
+	    break;
+      m->next = member;
+      member->prev = m;
+   }
+   else
+   {
+      *list = member;
+   }
+
+   /* Store the information about this member. */
+   if (!(member->name = malloc((strlen(name) + 1) * sizeof(char))))
+      return NC_ENOMEM;
+   strcpy(member->name, name);
+   memcpy(member->value, value, size);
+
+   return NC_NOERR;
+}
+
+/* Delete a var from a var list, and free the memory. */
+static int
+var_list_del(NC_VAR_INFO_T **list, NC_VAR_INFO_T *var)
+{
+   NC_ATT_INFO_T *a, *att;
+   int ret;
+
+   /* First delete all the attributes attached to this var. */
+   att = (*list)->att;
+   while (att)
+   {
+      a = att->next;
+      if ((ret = nc4_att_list_del(&var->att, att)))
+	 return ret;
+      att = a;
+   }
+
+   /* Free some things that may be allocated. */
+   if (var->chunksizes)
+      free(var->chunksizes);
+   if (var->hdf5_name)
+      free(var->hdf5_name);
+   if (var->name)
+      free(var->name);
+   if (var->dimids)
+      free(var->dimids);
+   if (var->dim)
+      free(var->dim);
+
+   /* Remove the var from the linked list. */
+   if(*list == var)
+      *list = var->next;
+   else
+      var->prev->next = var->next;
+
+   if(var->next)
+      var->next->prev = var->prev;
+
+   /* Delete any fill value allocation. This must be done before the
+    * type_info is freed. */
+   if (var->fill_value)
+   {
+      if (var->hdf_datasetid)
+      {
+	 if (var->type_info->class == NC_VLEN)
+	    nc_free_vlen((nc_vlen_t *)var->fill_value);
+	 else if (var->type_info->nc_typeid == NC_STRING)
+	    free(*(char **)var->fill_value);
+      }
+      free(var->fill_value);
+   }
+
+   /* For atomic types we have allocated space for type information. */
+/*   if (var->hdf_datasetid && var->xtype <= NC_STRING)*/
+   if (var->xtype <= NC_STRING)
+   {
+      if (var->type_info->native_typeid)
+	 if ((H5Tclose(var->type_info->native_typeid)) < 0)
+	    return NC_EHDFERR;
+
+      /* Only need to close the hdf_typeid when it was obtained with
+       * H5Dget_type (which happens when reading a file, but not when
+       * creating a variable). */
+      if (var->type_info->close_hdf_typeid || var->xtype == NC_STRING)
+	 if ((H5Tclose(var->type_info->hdf_typeid)) < 0)
+	    return NC_EHDFERR;
+
+      /* Free the name. */
+      if (var->type_info->name)
+	 free(var->type_info->name);
+
+      free(var->type_info);
+   }
+   
+   /* Delete any HDF5 dimscale objid information. */
+   if (var->dimscale_hdf5_objids)
+      free(var->dimscale_hdf5_objids);
+
+   /* Delete information about the attachment status of dimscales. */
+   if (var->dimscale_attached)
+      free(var->dimscale_attached);
+
+   /* Delete the var. */
+   free(var);
+
+   return NC_NOERR;
+}
+
+/* Delete a field from a field list, and nc_free the memory. */
+static void
+field_list_del(NC_FIELD_INFO_T **list, NC_FIELD_INFO_T *field)
+{
+
+   /* Take this field out of the list. */
+   if(*list == field)
+      *list = field->next;
+   else
+      field->prev->next = field->next;
+
+   if(field->next)
+      field->next->prev = field->prev;
+
+   /* Free some stuff. */
+   if (field->name)
+      free(field->name);
+   if (field->dim_size)
+      free(field->dim_size);
+
+   /* Nc_Free the memory. */
+   free(field);
+}
+
+/* Delete a type from a type list, and nc_free the memory. */
+int
+type_list_del(NC_TYPE_INFO_T **list, NC_TYPE_INFO_T *type)
+{
+   NC_FIELD_INFO_T *field, *f;
+   NC_ENUM_MEMBER_INFO_T *enum_member, *em;
+
+   /* Close any open user-defined HDF5 typieds. */
+   if (type->hdf_typeid)
+   {
+      if (H5Tclose(type->hdf_typeid) < 0)
+	 return NC_EHDFERR;
+   }   
+   if (type->native_typeid)
+   {
+      if (H5Tclose(type->native_typeid) < 0)
+	 return NC_EHDFERR;
+   }
+
+   /* Free the name. */
+   if (type->name)
+      free(type->name);
+
+   /* Delete all the fields in this type (there will be some if its a
+    * compound). */
+   field = type->field;
+   while (field)
+   {
+      f = field->next;
+      field_list_del(&type->field, field);
+      field = f;
+   }
+
+   /* Delete all the enum_members, if any. */
+   enum_member = type->enum_member;
+   while (enum_member)
+   {
+      em = enum_member->next;
+      free(enum_member->value);
+      free(enum_member->name);
+      free(enum_member);
+      enum_member = em;
+   }
+
+   /* Take this type out of the list. */
+   if(*list == type)
+      *list = type->next;
+   else
+      type->prev->next = type->next;
+
+   if(type->next)
+      type->next->prev = type->prev;
+
+   /* Nc_Free the memory. */
+   free(type);
+   
+   return NC_NOERR;
+}
+
+/* Delete a del from a var list, and nc_free the memory. */
+int
+nc4_dim_list_del(NC_DIM_INFO_T **list, NC_DIM_INFO_T *dim)
+{
+   /* Take this dimension out of the list. */
+   if(*list == dim)
+      *list = dim->next;
+   else
+      dim->prev->next = dim->next;
+
+   if(dim->next)
+      dim->next->prev = dim->prev;
+
+   /* Free memory allocated for names. */
+   if (dim->name)
+      free(dim->name);
+   if (dim->old_name)
+      free(dim->old_name);
+
+   free(dim);
+   return NC_NOERR;
+}
+
+/* Remove a NC_GRP_INFO_T from the linked list. This will nc_free the
+   memory too. */
+static void
+grp_list_del(NC_GRP_INFO_T **list, NC_GRP_INFO_T *grp)
+{
+   if(*list == grp)
+      *list = grp->next;
+   else
+      grp->prev->next = grp->next;
+
+   if(grp->next)
+      grp->next->prev = grp->prev;
+
+   free(grp);
+}
+
+/* Recursively delete the data for a group (and everything it
+ * contains) in our internal metadata store. */
+int 
+nc4_rec_grp_del(NC_GRP_INFO_T **list, NC_GRP_INFO_T *grp) 
+{
+   NC_GRP_INFO_T *g, *c;
+   NC_VAR_INFO_T *v, *var;
+   NC_ATT_INFO_T *a, *att;
+   NC_DIM_INFO_T *d, *dim;
+   NC_TYPE_INFO_T *type, *t;
+   int retval;
+
+   assert(grp);
+   LOG((3, "nc4_rec_grp_del: grp->name %s", grp->name));
+
+   /* Recursively call this function for each child, if any, stopping
+    * if there is an error. */
+   g = grp->children;
+   while(g)
+   {
+      c = g->next;
+      if ((retval = nc4_rec_grp_del(&(grp->children), g)))
+	 return retval;
+      g = c;
+   }
+
+   /* Delete all the list contents for vars, dims, and atts, in each
+    * group. */
+   att = grp->att;
+   while (att)
+   {
+      LOG((4, "nc4_rec_grp_del: deleting att %s", att->name));      
+      a = att->next;
+      if ((retval = nc4_att_list_del(&grp->att, att)))
+	 return retval;
+      att = a;
+   }
+
+   /* Delete all vars. */
+   var = grp->var;
+   while (var)
+   {
+      LOG((4, "nc4_rec_grp_del: deleting var %s", var->name));      
+      /* Close HDF5 dataset associated with this var, unless it's a
+       * scale. */
+      if (var->hdf_datasetid && !var->dimscale && 
+	  H5Dclose(var->hdf_datasetid) < 0)
+	 return NC_EHDFERR;
+      v = var->next;
+      if ((retval = var_list_del(&grp->var, var)))
+	 return retval;
+      var = v;
+   }
+   
+   /* Delete all dims. */
+   dim = grp->dim;
+   while (dim)
+   {
+      LOG((4, "nc4_rec_grp_del: deleting dim %s", dim->name));      
+      /* Close HDF5 dataset associated with this dim. */
+      if (dim->hdf_dimscaleid && H5Dclose(dim->hdf_dimscaleid) < 0)
+	 return NC_EHDFERR;
+      d = dim->next;
+      if ((retval = nc4_dim_list_del(&grp->dim, dim)))
+	 return retval;
+      dim = d;
+   }
+
+   /* Delete all types. */
+   type = grp->type; 
+   while (type)
+   {
+      LOG((4, "nc4_rec_grp_del: deleting type %s", type->name));      
+      t = type->next;
+      if ((retval = type_list_del(&grp->type, type)))
+	 return retval;
+      type = t;
+   }
+
+   /* Tell HDF5 we're closing this group. */ 
+   LOG((4, "nc4_rec_grp_del: closing group %s", grp->name));         
+   if (grp->hdf_grpid && H5Gclose(grp->hdf_grpid) < 0) 
+      return NC_EHDFERR;
+
+   /* Free the name. */
+   free(grp->name);
+
+   /* Finally, redirect pointers around this entry in the list, and
+    * nc_free its memory. */
+   grp_list_del(list, grp);
+
+   return NC_NOERR;
+}
+
+/* Remove a NC_ATT_INFO_T from the linked list. This will nc_free the
+   memory too.
+*/
+int
+nc4_att_list_del(NC_ATT_INFO_T **list, NC_ATT_INFO_T *att)
+{
+   int i;
+
+   /* Take this att out of the list. */
+   if(*list == att)
+      *list = att->next;
+   else
+      att->prev->next = att->next;
+
+   if(att->next)
+      att->next->prev = att->prev;
+
+   /* Free memory that was malloced to hold data for this
+    * attribute. */
+   if (att->data)
+      free(att->data);
+
+   /* Free the name. */
+   if (att->name)
+      free(att->name);
+
+   /* Close the HDF5 typeid. */
+   if (att->native_typeid && H5Tclose(att->native_typeid) < 0)
+      return NC_EHDFERR;
+
+   /* If this is a string array attribute, delete all members of the
+    * string array, then delete the array of pointers to strings. (The
+    * array was filled with pointers by HDF5 when the att was read,
+    * and memory for each string was allocated by HDF5. That's why I
+    * use free and not nc_free, because the netCDF library didn't
+    * allocate the memory that is being freed.) */
+   if (att->stdata)
+   {
+      for (i = 0; i < att->len; i++)
+	 free(att->stdata[i]);
+      free(att->stdata);
+   }
+
+   /* If this att has vlen data, release it. */
+   if (att->vldata)
+   {
+      for (i = 0; i < att->len; i++)
+	 nc_free_vlen(&att->vldata[i]);
+      free(att->vldata);
+   }
+
+   free(att);
+   return NC_NOERR;
+}
+
+/* Normalize a UTF8 name. Put the result in norm_name, which can be
+ * NC_MAX_NAME + 1 in size. This function makes sure the free() gets
+ * called on the return from utf8proc_NFC, and also ensures that the
+ * name is not too long. */
+int
+nc4_normalize_name(const char *name, char *norm_name)
+{
+   char *temp_name;
+   if (!(temp_name = (char *)utf8proc_NFC((const unsigned char *)name)))
+      return NC_EINVAL;
+   if (strlen(temp_name) > NC_MAX_NAME)
+   {
+      free(temp_name);
+      return NC_EMAXNAME;
+   }
+   strcpy(norm_name, temp_name);
+   free(temp_name);
+   return NC_NOERR;
+}
+
+/* Print out a bunch of info to stderr about the metadata for
+   debugging purposes. */
+#ifdef LOGGING
+/* Use this to set the global log level. Set it to NC_TURN_OFF_LOGGING
+   (-1) to turn off all logging. Set it to 0 to show only errors, and
+   to higher numbers to show more and more logging details. */
+int 
+nc_set_log_level(int new_level)
+{
+   /* If the user wants to completely turn off logging, turn off HDF5
+      logging too. Now I truely can't think of what to do if this
+      fails, so just ignore the return code. */
+   if (new_level == NC_TURN_OFF_LOGGING)
+   {
+      H5Eset_auto(NULL, NULL);
+      LOG((1, "HDF5 error messages turned off!"));
+   }
+
+   /* Do we need to turn HDF5 logging back on? */
+   if (new_level > NC_TURN_OFF_LOGGING && 
+       nc_log_level <= NC_TURN_OFF_LOGGING)
+   {
+      if (H5Eset_auto((H5E_auto_t)&H5Eprint, stderr) < 0)
+	 LOG((0, "H5Eset_auto failed!"));
+      LOG((1, "HDF5 error messages turned on."));
+   }
+
+   /* Now remember the new level. */
+   nc_log_level = new_level;
+   LOG((4, "log_level changed to %d", nc_log_level));
+   return 0;
+} 
+
+/* Recursively print the metadata of a group. */
+#define MAX_NESTS 10
+static int
+rec_print_metadata(NC_GRP_INFO_T *grp, int *tab_count)
+{
+   NC_GRP_INFO_T *g;
+   NC_ATT_INFO_T *att;
+   NC_VAR_INFO_T *var;
+   NC_DIM_INFO_T *dim;
+   NC_TYPE_INFO_T *type;
+   NC_FIELD_INFO_T *field;
+   char tabs[MAX_NESTS] = "";
+   char dims_string[NC_MAX_DIMS*4];
+   char temp_string[10];
+   int t, retval, d;
+
+   /* Come up with a number of tabs relative to the group. */
+   for (t = 0; t < *tab_count && t < MAX_NESTS; t++)
+      strcat(tabs, "\t");
+
+   LOG((2, "%s GROUP - %s nc_grpid: %d nvars: %d natts: %d",
+	tabs, grp->name, grp->nc_grpid, grp->nvars, grp->natts));
+   
+   for(att = grp->att; att; att = att->next)
+      LOG((2, "%s GROUP ATTRIBUTE - attnum: %d name: %s type: %d len: %d",
+	   tabs, att->attnum, att->name, att->xtype, att->len));
+
+   /* To display dims starting with 0 and going up, go through list is
+    * reverse order. */
+   for(dim = grp->dim; dim && dim->next; dim = dim->next)
+      ;
+   for( ; dim; dim = dim->prev)
+      LOG((2, "%s DIMENSION - dimid: %d name: %s len: %d unlimited: %d",
+	   tabs, dim->dimid, dim->name, dim->len, dim->unlimited));
+   
+   /* To display vars starting with 0 and going up, go through list is
+    * reverse order. */
+   for(var = grp->var; var && var->next; var = var->next)
+      ;
+   for( ; var; var = var->prev)
+   {
+      strcpy(dims_string, "");
+      for (d = 0; d < var->ndims; d++)
+      {
+	 sprintf(temp_string, " %d", var->dimids[d]);
+	 strcat(dims_string, temp_string);
+      }
+      LOG((2, "%s VARIABLE - varid: %d name: %s type: %d ndims: %d dimscale: %d dimids:%s",
+	   tabs, var->varid, var->name, var->xtype, var->ndims, var->dimscale, 
+	   dims_string));
+      for(att = var->att; att; att = att->next)
+	 LOG((2, "%s VAR ATTRIBUTE - attnum: %d name: %s type: %d len: %d",
+	      tabs, att->attnum, att->name, att->xtype, att->len));
+   }
+   
+   for (type = grp->type; type; type = type->next)
+   {
+      LOG((2, "%s TYPE - nc_typeid: %d hdf_typeid: 0x%x size: %d committed: %d "
+	   "name: %s num_fields: %d base_nc_type: %d", tabs, type->nc_typeid, 
+	   type->hdf_typeid, type->size, type->committed, type->name, 
+	   type->num_fields, type->base_nc_type));
+      /* Is this a compound type? */
+      if (type->class == NC_COMPOUND)
+      {
+	 LOG((3, "compound type"));
+	 for (field = type->field; field; field = field->next)
+	    LOG((4, "field %s offset %d nctype %d ndims %d", field->name, 
+		 field->offset, field->nctype, field->ndims));
+      }
+      else if (type->class == NC_VLEN)
+	 LOG((3, "VLEN type"));
+      else if (type->class == NC_OPAQUE)
+	 LOG((3, "Opaque type"));
+      else if (type->class == NC_ENUM)
+	 LOG((3, "Enum type"));
+      else
+      {
+	 LOG((0, "Unknown class: %d", type->class));
+	 return NC_EBADTYPE;
+      }
+   }
+   
+   /* Call self for each child of this group. */
+   if (grp->children)
+   {
+      (*tab_count)++;
+      for (g = grp->children; g; g = g->next)
+	 if ((retval = rec_print_metadata(g, tab_count)))
+	    return retval;
+      (*tab_count)--;
+   }
+   
+   return NC_NOERR;
+}
+
+/* Print out the internal metadata for a file. This is useful to check
+ * that netCDF is working! Nonetheless, this function will print
+ * nothing if logging is not set to at least two. */
+int
+log_metadata_nc(NC_FILE_INFO_T *nc)
+{
+   NC_HDF5_FILE_INFO_T *h5 = nc->nc4_info;
+   int tab_count = 0;
+
+   LOG((2, "*** NetCDF-4 Internal Metadata: int_ncid 0x%x ext_ncid 0x%x", 
+	nc->int_ncid, nc->ext_ncid));
+   if (!h5)
+   {
+      LOG((2, "This is a netCDF-3 file."));
+      return NC_NOERR;
+   }
+   LOG((2, "FILE - hdfid: 0x%x path: %s cmode: 0x%x parallel: %d redef: %d "
+	"fill_mode: %d no_write: %d next_nc_grpid: %d",	h5->hdfid, h5->path, 
+	h5->cmode, h5->parallel, h5->redef, h5->fill_mode, h5->no_write, 
+	h5->next_nc_grpid));
+   return rec_print_metadata(h5->root_grp, &tab_count);
+}
+
+#endif /*LOGGING */
+
+/* Show the in-memory metadata for a netcdf file. */
+int
+NC4_show_metadata(int ncid)
+{
+   int retval = NC_NOERR;
+#ifdef LOGGING
+   NC_FILE_INFO_T *nc;
+   int old_log_level = nc_log_level;
+   
+   /* Find file metadata. */
+   if (!(nc = nc4_find_nc_file(ncid)))
+      return NC_EBADID;
+
+   /* Log level must be 2 to see metadata. */
+   nc_log_level = 2;
+   retval = log_metadata_nc(nc);
+   nc_log_level = old_log_level;
+#endif /*LOGGING*/
+   return retval;
+}
+
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/src_netcdf4/nc4internal.h
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/src_netcdf4/nc4internal.h	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/src_netcdf4/nc4internal.h	(revision 1749)
@@ -0,0 +1,425 @@
+/** \file
+  This header file contains the definitions of structs used to hold
+  netCDF file metadata in memory.
+
+  Copyright 2005-2011 University Corporation for Atmospheric
+  Research/Unidata.
+*/
+
+#ifndef _NC4INTERNAL_
+#define _NC4INTERNAL_
+
+#include <config.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <ctype.h>
+#include <stdarg.h>
+#include <string.h>
+#include <hdf5.h>
+#include <ncdimscale.h>
+#include <nc_logging.h>
+
+#ifdef USE_PARALLEL
+#include <netcdf_par.h>
+#else
+#define MPI_Info int
+#define MPI_Comm int
+#include <netcdf.h>
+#endif /* USE_PARALLEL */
+#include <netcdf_f.h>
+
+#ifdef USE_HDF4
+#include <mfhdf.h>
+#endif
+
+#define FILE_ID_MASK (0xffff0000)
+#define GRP_ID_MASK (0x0000ffff)
+#define ID_SHIFT (16)
+
+typedef enum {GET, PUT} NC_PG_T;
+typedef enum {VAR, DIM, ATT} NC_OBJ_T;
+
+#define NC_MAX_HDF5_NAME (NC_MAX_NAME + 10)
+#define NC_V2_ERR (-1)
+
+/* The name of the root group. */
+#define NC_GROUP_NAME "/"
+
+#define MEGABYTE 1048576
+
+/*
+ * limits of the external representation
+ */
+#define X_SCHAR_MIN	(-128)
+#define X_SCHAR_MAX	127
+#define X_UCHAR_MAX	255U
+#define X_SHORT_MIN	(-32768)
+#define X_SHRT_MIN	X_SHORT_MIN	/* alias compatible with limits.h */
+#define X_SHORT_MAX	32767
+#define X_SHRT_MAX	X_SHORT_MAX	/* alias compatible with limits.h */
+#define X_USHORT_MAX	65535U
+#define X_USHRT_MAX	X_USHORT_MAX	/* alias compatible with limits.h */
+#define X_INT_MIN	(-2147483647-1)
+#define X_INT_MAX	2147483647
+#define X_LONG_MIN	X_INT_MIN
+#define X_LONG_MAX	X_INT_MAX
+#define X_UINT_MAX	4294967295U
+#ifdef WIN32 /* Windows, of course, has to be a *little* different. */
+#define X_FLOAT_MAX	3.402823466e+38f
+#else
+#define X_FLOAT_MAX	3.40282347e+38f
+#endif /* WIN32 */
+#define X_FLOAT_MIN	(-X_FLOAT_MAX)
+#define X_DOUBLE_MAX	1.7976931348623157e+308 
+#define X_DOUBLE_MIN	(-X_DOUBLE_MAX)
+
+/* These have to do with creating chuncked datasets in HDF5. */
+#define NC_HDF5_UNLIMITED_DIMSIZE (0)
+#define NC_HDF5_CHUNKSIZE_FACTOR (10)
+#define NC_HDF5_MIN_CHUNK_SIZE (2)
+
+#define NC_EMPTY_SCALE "NC_EMPTY_SCALE"
+
+/* This is an attribute I had to add to handle multidimensional
+ * coordinate variables. */
+#define COORDINATES "_Netcdf4Coordinates"
+#define COORDINATES_LEN (NC_MAX_NAME * 5)
+
+/* This is used when the user defines a non-coordinate variable with
+ * same name as a dimension. */
+#define NON_COORD_PREPEND "_nc4_non_coord_"
+
+/* An attribute in the HDF5 root group of this name means that the
+ * file must follow strict netCDF classic format rules. */
+#define NC3_STRICT_ATT_NAME "_nc3_strict"
+
+/* If this attribute is present on a dimscale variable, use the value
+ * as the netCDF dimid. */
+#define NC_DIMID_ATT_NAME "_Netcdf4Dimid"
+
+/* This is a struct to handle the dim metadata. */
+typedef struct NC_DIM_INFO
+{
+   char *name;
+   size_t len;
+   int dimid;
+   int unlimited;
+   int extended;
+   struct NC_DIM_INFO *next;
+   struct NC_DIM_INFO *prev;
+   hid_t hdf_dimscaleid;
+   char *old_name; /* only used to rename dim */
+   int dirty;
+   unsigned char coord_var_in_grp;
+   struct NC_VAR_INFO *coord_var; /* The coord var, if it exists. */
+   int too_long; /* True if len it too big to fit in local size_t. */
+} NC_DIM_INFO_T;
+
+typedef struct NC_ATT_INFO
+{
+   int len;
+   char *name;
+   struct NC_ATT_INFO *next;
+   struct NC_ATT_INFO *prev;
+   int dirty;
+   int created;
+   nc_type xtype;
+   hid_t native_typeid;
+   int attnum;
+   void *data;
+   nc_vlen_t *vldata; /* only used for vlen */
+   char **stdata; /* only for string type. */
+   int class;
+} NC_ATT_INFO_T;
+
+/* This is a struct to handle the var metadata. */
+typedef struct NC_VAR_INFO
+{
+   char *name;
+   char *hdf5_name; /* used if different from name */
+   int ndims;
+   int *dimids;
+   NC_DIM_INFO_T **dim;
+   int varid;
+   int natts;
+   struct NC_VAR_INFO *next;
+   struct NC_VAR_INFO *prev;
+   int dirty;
+   int created;
+   int written_to;
+   int *dimscale_attached;
+   struct NC_TYPE_INFO *type_info;
+   nc_type xtype;
+   hid_t hdf_datasetid;
+   NC_ATT_INFO_T *att;
+   int no_fill;
+   void *fill_value;
+   size_t *chunksizes;
+   int contiguous;
+   int parallel_access;
+   int dimscale;
+   HDF5_OBJID_T *dimscale_hdf5_objids;
+   int deflate;
+   int deflate_level;
+   int shuffle;
+   int fletcher32;
+   int options_mask;
+   int pixels_per_block;
+   size_t chunk_cache_size, chunk_cache_nelems;
+   float chunk_cache_preemption;
+   /* Stuff below is for hdf4 files. */
+   int sdsid;
+   int hdf4_data_type;
+   /* Stuff below for diskless data files. */
+   void *diskless_data;
+} NC_VAR_INFO_T;
+
+typedef struct NC_FIELD_INFO
+{
+   struct NC_FIELD_INFO *next;
+   struct NC_FIELD_INFO *prev;
+   nc_type nctype;
+   hid_t hdf_typeid;
+   hid_t native_typeid;
+   size_t offset;
+   char *name;
+   int fieldid;
+   int ndims;
+   int *dim_size;
+} NC_FIELD_INFO_T;
+
+typedef struct NC_ENUM_MEMBER_INFO
+{
+   struct NC_ENUM_MEMBER_INFO *next;
+   struct NC_ENUM_MEMBER_INFO *prev;
+   char *name;
+   void *value;
+} NC_ENUM_MEMBER_INFO_T;
+
+typedef struct NC_TYPE_INFO
+{
+   struct NC_TYPE_INFO *next;
+   struct NC_TYPE_INFO *prev;
+   nc_type nc_typeid;
+   hid_t hdf_typeid;
+   hid_t native_typeid;
+   size_t size;
+   int committed; /* What the pig is, but the hen isn't, at breakfast. */
+   char *name;
+   int class; /* NC_VLEN, NC_COMPOUND, NC_OPAQUE, or NC_ENUM */
+   int num_enum_members;
+   NC_ENUM_MEMBER_INFO_T *enum_member;
+   NC_FIELD_INFO_T *field; /* Used for compound types. */
+   int num_fields;
+   nc_type base_nc_type; /* for VLEN and ENUM only */
+   hid_t base_hdf_typeid; /* for VLEN only */
+   int close_hdf_typeid; /* True when hdf_typeid must be H5Tclosed. */
+   int endianness;
+} NC_TYPE_INFO_T;
+
+/* This holds information for one group. Groups reproduce with
+ * parthenogenesis. */
+typedef struct NC_GRP_INFO
+{
+   int nc_grpid;
+   struct NC_GRP_INFO *parent;
+   struct NC_GRP_INFO *children;
+   struct NC_GRP_INFO *next; /* points to siblings */
+   struct NC_GRP_INFO *prev; /* points to siblings */
+   NC_VAR_INFO_T *var;
+   NC_DIM_INFO_T *dim;
+   NC_ATT_INFO_T *att;
+   int nvars;
+   int ndims;
+   int natts;
+   struct NC_FILE_INFO *file;
+   char *name;
+   hid_t hdf_grpid;
+   NC_TYPE_INFO_T *type;
+} NC_GRP_INFO_T;
+
+/* These constants apply to the cmode parameter in the
+ * HDF5_FILE_INFO_T defined below. */
+#define NC_CREAT 2	/* in create phase, cleared by ncendef */
+#define NC_INDEF 8	/* in define mode, cleared by ncendef */
+#define NC_NSYNC 0x10	/* synchronise numrecs on change */
+#define NC_HSYNC 0x20	/* synchronise whole header on change */
+#define NC_NDIRTY 0x40	/* numrecs has changed */
+#define NC_HDIRTY 0x80  /* header info has changed */
+
+/* This is the metadata we need to keep track of for each
+   netcdf-4/HDF5 file. */
+typedef struct 
+{
+   hid_t hdfid;
+   int flags;
+   int cmode;
+   int nvars;
+   int ndims;
+   int natts;
+   int parallel;  /* true if file is open for parallel access */
+   int redef;
+   char *path;
+   int fill_mode;
+   int no_write; /* true if nc_open has mode NC_NOWRITE. */
+   NC_GRP_INFO_T *root_grp;
+   short next_nc_grpid;
+   NC_TYPE_INFO_T *type;
+   int next_typeid;
+   int next_dimid;
+   int ignore_creationorder;
+   int hdf4;
+   int sdid;
+} NC_HDF5_FILE_INFO_T;
+
+/* In the nc_file array there will be one entry for each open file.*/
+
+   /* There's an external ncid (ext_ncid) and an internal ncid
+    * (int_ncid). The ext_ncid is the ncid returned to the user. If
+    * the user has opened or created a netcdf-4 file, then the
+    * ext_ncid is the same as the int_ncid. If he has opened or
+    * created a netcdf-3 file ext_ncid (which the user sees) is
+    * different from the int_ncid, which is the ncid returned by the
+    * netcdf-3 layer, which insists on inventing its own ncids,
+    * regardless of what is already in use due to previously opened
+    * netcdf-4 files. The ext_ncid contains the ncid for the root
+    * group (i.e. group zero). */
+
+/* Warning: fields from BEGIN COMMON to END COMMON must be same for:
+	1. NCcommon (include/ncdispatch.h)
+	2. NC (libsrc/nc.h)
+	3. NC_FILE_INFO (libsrc4/nc4internal.h)
+	4. whatever libdiskless uses
+*/
+typedef struct NC_FILE_INFO
+{
+/*BEGIN COMMON*/
+   int ext_ncid;
+   int int_ncid;
+   struct NC_Dispatch* dispatch;	
+   void* dispatchdata;
+   char* path;
+   int substrate;
+/*END COMMON*/
+
+#ifdef USE_PNETCDF
+   /* pnetcdf_file will be true if the file is created/opened with the
+    * parallel-netcdf library. pnetcdf_access_mode keeps track of
+    * whether independpent or collective mode is
+    * desired. pnetcdf_ndims keeps track of how many dims each var
+    * has, which I need to know to convert start, count, and stride
+    * arrays from size_t to MPI_Offset. (I can't use an inq function
+    * to find out the number of dims, because these are collective in
+    * pnetcdf.) */
+   int pnetcdf_file;
+   int pnetcdf_access_mode;
+   int pnetcdf_ndims[NC_MAX_VARS];
+#endif /* USE_PNETCDF */
+
+   /* The nc4_info pointer will remain NULL for netcdf3 files,
+    * otherwise it points to information about the netcdf-4 file. */
+   NC_HDF5_FILE_INFO_T *nc4_info;
+} NC_FILE_INFO_T;
+
+/* These functions only use the netcdf API calls, so they will work on
+   both new format and old format files. */
+/*int copy_dataset(int ncid_in, int ncid_out);*/
+
+
+/* These functions convert beteen netcdf and HDF5 types. */
+int nc4_get_typelen_mem(NC_HDF5_FILE_INFO_T *h5, nc_type xtype, 
+			int is_long, size_t *len);
+int nc4_convert_type(const void *src, void *dest, 
+		     const nc_type src_type, const nc_type dest_type, 
+		     const size_t len, int *range_error, 
+		     const void *fill_value, int strict_nc3, int src_long,
+		     int dest_long);
+
+/* These functions do HDF5 things. */
+int nc4_open_var_grp2(NC_GRP_INFO_T *grp, int varid, hid_t *dataset);
+int pg_var(NC_PG_T pg, NC_FILE_INFO_T *nc, int ncid, int varid, nc_type xtype, int is_long, 
+	   void *ip);
+int nc4_pg_var1(NC_PG_T pg, NC_FILE_INFO_T *nc, int ncid, int varid, const size_t *indexp, 
+		nc_type xtype, int is_long, void *ip);
+int nc4_put_vara(NC_FILE_INFO_T *nc, int ncid, int varid, const size_t *startp, 
+		 const size_t *countp, nc_type xtype, int is_long, void *op);
+int nc4_get_vara(NC_FILE_INFO_T *nc, int ncid, int varid, const size_t *startp, 
+		 const size_t *countp, nc_type xtype, int is_long, void *op);
+int nc4_pg_varm(NC_PG_T pg, NC_FILE_INFO_T *nc, int ncid, int varid, const size_t *startp, 
+		const size_t *countp, const ptrdiff_t *stridep,
+		const ptrdiff_t *imapp, nc_type xtype, int is_long, void *op);
+int nc4_rec_match_dimscales(NC_GRP_INFO_T *grp);
+int nc4_rec_write_metadata(NC_GRP_INFO_T *grp);
+int nc4_rec_write_types(NC_GRP_INFO_T *grp);
+int nc4_enddef_netcdf4_file(NC_HDF5_FILE_INFO_T *h5);
+int nc4_reopen_dataset(NC_GRP_INFO_T *grp, NC_VAR_INFO_T *var);
+int nc4_adjust_var_cache(NC_GRP_INFO_T *grp, NC_VAR_INFO_T * var);
+
+/* The following functions manipulate the in-memory linked list of
+   metadata, without using HDF calls. */
+int nc4_find_nc_grp_h5(int ncid, NC_FILE_INFO_T **nc, NC_GRP_INFO_T **grp, 
+		       NC_HDF5_FILE_INFO_T **h5);
+int nc4_find_grp_h5(int ncid, NC_GRP_INFO_T **grp, NC_HDF5_FILE_INFO_T **h5);
+int nc4_find_nc4_grp(int ncid, NC_GRP_INFO_T **grp);
+NC_GRP_INFO_T *nc4_find_nc_grp(int ncid);
+NC_GRP_INFO_T *nc4_rec_find_grp(NC_GRP_INFO_T *start_grp, int target_nc_grpid);
+NC_FILE_INFO_T *nc4_find_nc_file(int ncid);
+int nc4_find_dim(NC_GRP_INFO_T *grp, int dimid, NC_DIM_INFO_T **dim, NC_GRP_INFO_T **dim_grp);
+int nc4_find_dim_len(NC_GRP_INFO_T *grp, int dimid, size_t **len);
+int nc4_find_type(NC_HDF5_FILE_INFO_T *h5, int typeid, NC_TYPE_INFO_T **type);
+NC_TYPE_INFO_T *nc4_rec_find_nc_type(NC_GRP_INFO_T *start_grp, hid_t target_nc_typeid);
+NC_TYPE_INFO_T *nc4_rec_find_hdf_type(NC_GRP_INFO_T *start_grp, hid_t target_hdf_typeid);
+NC_TYPE_INFO_T *nc4_rec_find_named_type(NC_GRP_INFO_T *start_grp, char *name);
+NC_TYPE_INFO_T *nc4_rec_find_equal_type(NC_GRP_INFO_T *start_grp, int ncid1, NC_TYPE_INFO_T *type);
+int nc4_find_nc_att(int ncid, int varid, const char *name, int attnum,
+		    NC_ATT_INFO_T **att);
+int nc4_find_g_var_nc(NC_FILE_INFO_T *nc, int ncid, int varid, 
+		      NC_GRP_INFO_T **grp, NC_VAR_INFO_T **var);
+int nc4_find_grp_att(NC_GRP_INFO_T *grp, int varid, const char *name, int attnum,
+		     NC_ATT_INFO_T **att);
+int nc4_get_hdf_typeid(NC_HDF5_FILE_INFO_T *h5, nc_type xtype, 
+		       hid_t *hdf_typeid, int endianness);
+/*int var_info_nc(NC_PG_T pg, hid_t dataset, NC_VAR_INFO_T *var_info);*/
+
+/* These list functions add and delete vars, atts, and files. */
+int nc4_file_list_add(NC_FILE_INFO_T**, struct NC_Dispatch*);
+void nc4_file_list_free(void);
+
+int nc4_nc4f_list_add(NC_FILE_INFO_T *nc, const char *path, int mode);
+int nc4_var_list_add(NC_VAR_INFO_T **list, NC_VAR_INFO_T **var);
+int nc4_dim_list_add(NC_DIM_INFO_T **list);
+int nc4_dim_list_del(NC_DIM_INFO_T **list, NC_DIM_INFO_T *dim);
+int nc4_att_list_add(NC_ATT_INFO_T **list);
+int nc4_type_list_add(NC_TYPE_INFO_T **list, NC_TYPE_INFO_T **new_type);
+int nc4_field_list_add(NC_FIELD_INFO_T **list, int fieldid, const char *name,
+		       size_t offset, hid_t field_hdf_typeid, hid_t native_typeid, 
+		       nc_type xtype, int ndims, const int *dim_sizesp);
+void nc4_file_list_del(NC_FILE_INFO_T *nc);
+int nc4_att_list_del(NC_ATT_INFO_T **list, NC_ATT_INFO_T *att);
+int nc4_grp_list_add(NC_GRP_INFO_T **list, int new_nc_grpid, NC_GRP_INFO_T *parent_grp, 
+		     NC_FILE_INFO_T *nc, char *name, NC_GRP_INFO_T **grp);
+int nc4_rec_grp_del(NC_GRP_INFO_T **list, NC_GRP_INFO_T *grp);
+int nc4_enum_member_add(NC_ENUM_MEMBER_INFO_T **list, size_t size,
+			const char *name, const void *value);
+
+int NC_check_name(const char *name);
+
+/* Check and normalize names. */
+int nc4_check_name(const char *name, char *norm_name);
+int nc4_normalize_name(const char *name, char *norm_name);
+
+/* Check for name collisions. */
+int nc4_check_dup_name(NC_GRP_INFO_T *grp, char *norm_name);
+
+/* Insert and read one element into an already allocated vlen array
+ * element (this is for F77). */
+/*int nc_put_vlen_element(int ncid, int typeid, void *vlen_element, size_t len, const void *data);
+  int nc_get_vlen_element(int ncid, int typeid, const void *vlen_element, size_t *len, void *data);*/
+
+/* This is only included if --enable-logging is used for configure; it
+   prints info about the metadata to stderr. */
+#ifdef LOGGING
+int log_metadata_nc(NC_FILE_INFO_T *nc);
+#endif
+
+#endif /* _NETCDF4_ */
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/src_netcdf4/nc4type.c
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/src_netcdf4/nc4type.c	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/src_netcdf4/nc4type.c	(revision 1749)
@@ -0,0 +1,741 @@
+/*
+
+This file is part of netcdf-4, a netCDF-like interface for HDF5, or a
+HDF5 backend for netCDF, depending on your point of view.
+
+This file handles the nc4 user-defined type functions (i.e. compound
+and opaque types).
+
+Copyright 2005, University Corporation for Atmospheric Research. See
+the COPYRIGHT file for copying and redistribution conditions.
+
+$Id: nc4type.c,v 1.73 2010/05/25 17:54:24 dmh Exp $
+*/
+
+#include "nc4internal.h"
+
+#define NUM_ATOMIC_TYPES 13
+char atomic_name[NUM_ATOMIC_TYPES][NC_MAX_NAME + 1] = {"none", "byte", "char", 
+						       "short", "int", "float", 
+						       "double", "ubyte",
+						       "ushort", "uint",
+						       "int64", "uint64", "string"};
+
+EXTERNL int
+NC4_inq_type_equal(int ncid1, nc_type typeid1, int ncid2, 
+		  nc_type typeid2, int *equalp)
+{
+   NC_GRP_INFO_T *grp1, *grp2;
+   NC_TYPE_INFO_T *type1, *type2;
+   int retval;
+   
+   LOG((2, "nc_inq_type_equal: ncid1 0x%x typeid1 %d ncid2 0x%x typeid2 %d", 
+	ncid1, typeid1, ncid2, typeid2));
+
+   /* Check input. */
+   if(equalp == NULL) return NC_NOERR;
+
+   if (typeid1 <= NC_NAT || typeid2 <= NC_NAT)
+      return NC_EINVAL;
+
+   /* If one is atomic, and the other user-defined, the types are not
+    * equal. */
+   if ((typeid1 <= NC_STRING && typeid2 > NC_STRING) ||
+       (typeid2 <= NC_STRING && typeid1 > NC_STRING))
+   {
+      if (equalp) *equalp = 0;
+      return NC_NOERR;
+   }
+
+   /* If both are atomic types, the answer is easy. */
+   if (typeid1 <= NUM_ATOMIC_TYPES)
+   {
+      if (equalp)
+      {
+	 if (typeid1 == typeid2)
+	    *equalp = 1;
+	 else
+	    *equalp = 0;
+      }	    
+      return NC_NOERR;
+   }
+
+   /* Not atomic types - so find type1 and type2 information. */
+   if ((retval = nc4_find_nc4_grp(ncid1, &grp1)))
+      return retval;
+   if (!(type1 = nc4_rec_find_nc_type(grp1->file->nc4_info->root_grp, 
+				      typeid1)))
+      return NC_EBADTYPE;
+   if ((retval = nc4_find_nc4_grp(ncid2, &grp2)))
+      return retval;
+   if (!(type2 = nc4_rec_find_nc_type(grp2->file->nc4_info->root_grp, 
+				      typeid2)))
+      return NC_EBADTYPE;
+
+   /* Are the two types equal? */
+   if (equalp)
+      *equalp = (int)H5Tequal(type1->native_typeid, type2->native_typeid);
+   
+   return NC_NOERR;
+}
+
+/* Get the id of a type from the name. */
+EXTERNL int
+NC4_inq_typeid(int ncid, const char *name, nc_type *typeidp)
+{
+   NC_GRP_INFO_T *grp, *grp2;
+   NC_HDF5_FILE_INFO_T *h5;
+   NC_TYPE_INFO_T *type = NULL;
+   char *norm_name;
+   int i, retval;
+
+   for (i = 0; i < NUM_ATOMIC_TYPES; i++)
+      if (!strcmp(name, atomic_name[i]))
+      {
+	 if (typeidp)
+	    *typeidp = i;
+	 return NC_NOERR;
+      }
+
+   /* Find info for this file and group, and set pointer to each. */
+   if ((retval = nc4_find_grp_h5(ncid, &grp, &h5)))
+      return retval;
+
+   /* Must be a netCDF-4 file. */
+   if (!h5)
+      return NC_ENOTNC4;
+
+   /* If the first char is a /, this is a fully-qualified
+    * name. Otherwise, this had better be a local name (i.e. no / in
+    * the middle). */
+   if (name[0] != '/' && strstr(name, "/"))
+      return NC_EINVAL;
+
+   /* Normalize name. */
+   if (!(norm_name = malloc(strlen(name) + 1)))
+      return NC_ENOMEM;
+   if ((retval = nc4_normalize_name(name, norm_name)))
+      return retval;
+
+   /* Is the type in this group? If not, search parents. */
+   for (grp2 = grp; grp2; grp2 = grp2->parent)
+      for (type = grp2->type; type; type = type->next)
+	 if (!strcmp(norm_name, type->name))
+	 {
+	    if (typeidp)
+	       *typeidp = type->nc_typeid;
+	    break;
+	 }
+
+   /* Still didn't find type? Search file recursively, starting at the
+    * root group. */
+   if (!type)
+      if ((type = nc4_rec_find_named_type(grp->file->nc4_info->root_grp, norm_name)))
+	 if (typeidp)
+	    *typeidp = type->nc_typeid;
+
+   free(norm_name);
+
+   /* OK, I give up already! */
+   if (!type)
+      return NC_EBADTYPE;
+   
+   return NC_NOERR;
+}
+
+/* Find all user-defined types for a location. This finds all
+ * user-defined types in a group. */
+int 
+NC4_inq_typeids(int ncid, int *ntypes, int *typeids)
+{
+   NC_GRP_INFO_T *grp;
+   NC_HDF5_FILE_INFO_T *h5;
+   NC_TYPE_INFO_T *type;
+   int num = 0;
+   int retval;
+
+   LOG((2, "nc_inq_typeids: ncid 0x%x", ncid));
+
+   /* Find info for this file and group, and set pointer to each. */
+   if ((retval = nc4_find_grp_h5(ncid, &grp, &h5)))
+      return retval;
+
+   /* If this is a netCDF-4 file, count types. */
+   if (h5 && grp->type)
+      for (type = grp->type; type; type = type->next)
+      {
+	 if (typeids)
+	    typeids[num] = type->nc_typeid;
+	 num++;
+      }
+
+   /* Give the count to the user. */
+   if (ntypes)
+      *ntypes = num;
+
+   return NC_NOERR;
+}
+
+
+/* This internal function adds a new user defined type to the metadata
+ * of a group of an open file. */
+static int
+add_user_type(int ncid, size_t size, const char *name, nc_type base_typeid,
+	      nc_type type_class, nc_type *typeidp)
+{
+   NC_HDF5_FILE_INFO_T *h5;
+   NC_GRP_INFO_T *grp;
+   NC_TYPE_INFO_T *type;
+   char norm_name[NC_MAX_NAME + 1];
+   int retval;
+
+   /* Check and normalize the name. */
+   if ((retval = nc4_check_name(name, norm_name)))
+      return retval;
+
+   LOG((2, "add_user_type: ncid 0x%x size %d name %s base_typeid %d ", 
+	ncid, size, norm_name, base_typeid));
+
+   /* Find group metadata. */
+   if ((retval = nc4_find_grp_h5(ncid, &grp, &h5)))
+      return retval;
+
+   /* Only netcdf-4 files! */
+   if (!h5)
+      return NC_ENOTNC4;
+
+   /* Turn on define mode if it is not on. */
+   if (!(h5->cmode & NC_INDEF))
+      if ((retval = nc_redef(ncid)))
+	 return retval;
+
+   /* No size is provided for vlens or enums, get it from the base type. */
+   if (type_class == NC_VLEN || type_class == NC_ENUM)
+   {
+      if ((retval = nc4_get_typelen_mem(grp->file->nc4_info, base_typeid, 0, 
+					&size)))
+	 return retval;
+   }
+   else if (size <= 0)
+      return NC_EINVAL;
+
+   /* Check that this name is not in use as a var, grp, or type. */
+   if ((retval = nc4_check_dup_name(grp, norm_name)))
+      return retval;
+   
+   /* Add to our list of types. */
+   if ((retval = nc4_type_list_add(&(grp->type), &type)))
+      return retval;
+
+   /* Remember info about this type. */
+   type->nc_typeid = grp->file->nc4_info->next_typeid++;
+   type->size = size;
+   if (!(type->name = malloc((strlen(norm_name) + 1) * sizeof(char))))
+      return NC_ENOMEM;
+   strcpy(type->name, norm_name);
+   type->class = type_class;
+   type->base_nc_type = base_typeid;
+   
+   /* Return the typeid to the user. */
+   if (typeidp)
+      *typeidp = type->nc_typeid;
+
+   return NC_NOERR;
+}
+
+
+/* The sizes of types may vary from platform to platform, but within
+ * netCDF files, type sizes are fixed. */
+#define NC_CHAR_LEN sizeof(char)
+#define NC_STRING_LEN sizeof(char *)
+#define NC_BYTE_LEN 1
+#define NC_SHORT_LEN 2
+#define NC_INT_LEN 4
+#define NC_FLOAT_LEN 4
+#define NC_DOUBLE_LEN 8
+#define NC_INT64_LEN 8
+
+/* Get the name and size of a type. For strings, 1 is returned. For
+ * VLEN the base type len is returned. */
+int
+NC4_inq_type(int ncid, nc_type typeid, char *name, size_t *size)
+{
+   NC_GRP_INFO_T *grp;
+   NC_TYPE_INFO_T *type;
+   int atomic_size[NUM_ATOMIC_TYPES] = {0, NC_BYTE_LEN, NC_CHAR_LEN, NC_SHORT_LEN, 
+					NC_INT_LEN, NC_FLOAT_LEN, NC_DOUBLE_LEN, 
+					NC_BYTE_LEN, NC_SHORT_LEN, NC_INT_LEN, NC_INT64_LEN, 
+					NC_INT64_LEN, NC_STRING_LEN};
+					
+   int retval;
+   
+   LOG((2, "nc_inq_type: ncid 0x%x typeid %d", ncid, typeid));
+
+   /* If this is an atomic type, the answer is easy. */
+   if (typeid <= NUM_ATOMIC_TYPES)
+   {
+      if (name)
+	 strcpy(name, atomic_name[typeid]);
+      if (size)
+	 *size = atomic_size[typeid];
+      return NC_NOERR;
+   }
+
+   /* Not an atomic type - so find group. */
+   if ((retval = nc4_find_nc4_grp(ncid, &grp)))
+      return retval;
+   
+   /* Find this type. */
+   if (!(type = nc4_rec_find_nc_type(grp->file->nc4_info->root_grp, typeid)))
+      return NC_EBADTYPE;
+
+   if (name)
+      strcpy(name, type->name);
+   
+   if (size)
+   {
+      if (type->class != NC_VLEN)
+	 *size = type->size;
+      else
+	 *size = sizeof(nc_vlen_t);
+   }
+   
+   return NC_NOERR;
+}
+
+/* Create a compound type. */
+int
+NC4_def_compound(int ncid, size_t size, const char *name, nc_type *typeidp)
+{
+   return add_user_type(ncid, size, name, 0, NC_COMPOUND, typeidp);
+}
+
+/* Insert a named field into a compound type. */
+int
+NC4_insert_compound(int ncid, nc_type typeid, const char *name, size_t offset, 
+		   nc_type field_typeid)
+{
+   return nc_insert_array_compound(ncid, typeid, name, offset, 
+				   field_typeid, 0, NULL);
+}
+
+/* Insert a named array into a compound type. */
+EXTERNL int
+NC4_insert_array_compound(int ncid, int typeid, const char *name, 
+			 size_t offset, nc_type field_typeid,
+			 int ndims, const int *dim_sizesp)
+{
+   NC_GRP_INFO_T *grp;
+   NC_TYPE_INFO_T *type;
+   char norm_name[NC_MAX_NAME + 1];
+   int retval;
+
+   LOG((2, "nc_insert_array_compound: ncid 0x%x, typeid %d name %s "
+	"offset %d field_typeid %d ndims %d", ncid, typeid, 
+	name, offset, field_typeid, ndims));
+
+   /* Check and normalize the name. */
+   if ((retval = nc4_check_name(name, norm_name)))
+      return retval;
+
+   /* Find file metadata. */
+   if ((retval = nc4_find_nc4_grp(ncid, &grp)))
+      return retval;
+
+   /* Find type metadata. */
+   if ((retval = nc4_find_type(grp->file->nc4_info, typeid, &type)))
+      return retval;
+
+   /* Did the user give us a good compound type typeid? */
+   if (!type || type->class != NC_COMPOUND)
+      return NC_EBADTYPE;
+
+   /* If this type has already been written to the file, you can't
+    * change it. */
+   if (type->committed)
+      return NC_ETYPDEFINED;
+
+   /* Insert new field into this type's list of fields. */
+   if ((retval = nc4_field_list_add(&type->field, type->num_fields, 
+				    norm_name, offset, 0, 0, field_typeid,
+				    ndims, dim_sizesp)))
+      return retval;
+
+   type->num_fields++;
+   
+   return NC_NOERR;
+}
+
+/* Find info about any user defined type. */
+int
+NC4_inq_user_type(int ncid, nc_type typeid, char *name, size_t *size, 
+		 nc_type *base_nc_typep, size_t *nfieldsp, int *classp)
+{
+   NC_GRP_INFO_T *grp;
+   NC_TYPE_INFO_T *type;
+   NC_FIELD_INFO_T *field;
+   int retval;
+   
+   LOG((2, "nc_inq_user_type: ncid 0x%x typeid %d", ncid, typeid));
+
+   /* Find group metadata. */
+   if ((retval = nc4_find_nc4_grp(ncid, &grp)))
+      return retval;
+   
+   /* Find this type. */
+   if (!(type = nc4_rec_find_nc_type(grp->file->nc4_info->root_grp, typeid)))
+      return NC_EBADTYPE;
+
+   /* Count the number of fields. */
+   if (nfieldsp)
+   {
+      *nfieldsp = 0;
+      if (type->class == NC_COMPOUND)
+	 for (field = type->field; field; field = field->next)
+	    (*nfieldsp)++;
+      else if (type->class == NC_ENUM)
+	 *nfieldsp = type->num_enum_members;
+   }
+
+   /* Fill in size and name info, if desired. */
+   if (size)
+   {
+      if (type->class != NC_VLEN)
+	 *size = type->size;
+      else
+	 *size = sizeof(nc_vlen_t);
+   }
+   if (name)
+      strcpy(name, type->name);
+
+   /* VLENS and ENUMs have a base type - that is, they type they are
+    * arrays of or enums of. */
+   if (base_nc_typep)
+      *base_nc_typep = type->base_nc_type;
+
+   /* If the user wants it, tell whether this is a compound, opaque,
+    * vlen, enum, or string class of type. */
+   if (classp)
+      *classp = type->class;
+
+   return NC_NOERR;
+}
+
+/* Given the ncid, typeid and fieldid, get info about the field. */
+int
+NC4_inq_compound_field(int ncid, nc_type typeid, int fieldid, char *name, 
+		      size_t *offsetp, nc_type *field_typeidp, int *ndimsp, 
+		      int *dim_sizesp)
+{
+   NC_GRP_INFO_T *grp;
+   NC_TYPE_INFO_T *type;
+   NC_FIELD_INFO_T *field;
+   int d, retval;
+   
+   /* Find file metadata. */
+   if ((retval = nc4_find_nc4_grp(ncid, &grp)))
+      return retval;
+   
+   /* Find this type. */
+   if (!(type = nc4_rec_find_nc_type(grp->file->nc4_info->root_grp, typeid)))
+      return NC_EBADTYPE;
+
+   /* Find the field. */
+   for (field = type->field; field; field = field->next)
+      if (field->fieldid == fieldid)
+      {
+	 if (name)
+	    strcpy(name, field->name);
+	 if (offsetp)
+	    *offsetp = field->offset;
+	 if (field_typeidp)
+	    *field_typeidp = field->nctype;
+	 if (ndimsp)
+	    *ndimsp = field->ndims;
+	 if (dim_sizesp)
+	    for (d = 0; d < field->ndims; d++)
+	       dim_sizesp[d] = field->dim_size[d];
+	 return NC_NOERR;
+      }
+
+   return NC_EBADFIELD;
+}
+
+/* Find a netcdf-4 file. THis will return an error if it finds a
+ * netcdf-3 file, or a netcdf-4 file with strict nc3 rules. */
+static int
+find_nc4_file(int ncid, NC_FILE_INFO_T **nc)
+{
+   
+   /* Find file metadata. */
+   if (!((*nc) = nc4_find_nc_file(ncid)))
+      return NC_EBADID;
+
+   /* Check for netcdf-3 files or netcdf-3 rules. */
+   if (!(*nc)->nc4_info)
+      return NC_ENOTNC4;
+   if ((*nc)->nc4_info->cmode & NC_CLASSIC_MODEL)
+      return NC_ESTRICTNC3;
+
+   return NC_NOERR;
+}
+
+/* Given the typeid and the name, get the fieldid. */
+int
+NC4_inq_compound_fieldindex(int ncid, nc_type typeid, const char *name, int *fieldidp)
+{
+   NC_FILE_INFO_T *nc;
+   NC_TYPE_INFO_T *type;
+   NC_FIELD_INFO_T *field;
+   char norm_name[NC_MAX_NAME + 1];
+   int retval;
+
+   LOG((2, "nc_inq_compound_fieldindex: ncid 0x%x typeid %d name %s",
+	ncid, typeid, name));
+
+   /* Find file metadata. */
+   if ((retval = find_nc4_file(ncid, &nc)))
+      return retval;
+
+   /* Find the type. */
+   if ((retval = nc4_find_type(nc->nc4_info, typeid, &type)))
+      return retval;
+
+   /* Did the user give us a good compound type typeid? */
+   if (!type || type->class != NC_COMPOUND)
+      return NC_EBADTYPE;
+
+   /* Normalize name. */
+   if ((retval = nc4_normalize_name(name, norm_name)))
+      return retval;
+
+   /* Find the field with this name. */
+   for (field = type->field; field; field = field->next)
+      if (!strcmp(field->name, norm_name))
+	 break;
+
+   if (!field)
+      return NC_EBADFIELD;
+
+   if (fieldidp)
+      *fieldidp = field->fieldid;
+   return NC_NOERR;
+}
+
+
+/* Opaque type. */
+
+/* Create an opaque type. Provide a size and a name. */
+int
+NC4_def_opaque(int ncid, size_t datum_size, const char *name, 
+	      nc_type *typeidp)
+{
+   return add_user_type(ncid, datum_size, name, 0, NC_OPAQUE, typeidp);
+}
+
+
+/* Define a variable length type. */
+int
+NC4_def_vlen(int ncid, const char *name, nc_type base_typeid, 
+	    nc_type *typeidp)
+{
+   return add_user_type(ncid, 0, name, base_typeid, NC_VLEN, typeidp);
+}
+
+/* Create an enum type. Provide a base type and a name. At the moment
+ * only ints are accepted as base types. */
+int
+NC4_def_enum(int ncid, nc_type base_typeid, const char *name, 
+	    nc_type *typeidp)
+{
+   return add_user_type(ncid, 0, name, base_typeid, NC_ENUM, typeidp);
+}
+
+
+/* Get enum name from enum value. Name size will be <= NC_MAX_NAME. */
+int
+NC4_inq_enum_ident(int ncid, nc_type xtype, long long value, char *identifier)
+{
+   NC_GRP_INFO_T *grp;
+   NC_TYPE_INFO_T *type;
+   NC_ENUM_MEMBER_INFO_T *enum_member;
+   long long ll_val;
+   int i;
+   int retval;
+
+   LOG((3, "nc_inq_enum_ident: xtype %d value %d\n", xtype, value));
+   
+   /* Find group metadata. */
+   if ((retval = nc4_find_nc4_grp(ncid, &grp)))
+      return retval;
+   
+   /* Find this type. */
+   if (!(type = nc4_rec_find_nc_type(grp->file->nc4_info->root_grp, xtype)))
+      return NC_EBADTYPE;
+   
+   /* Complain if they are confused about the type. */
+   if (type->class != NC_ENUM)
+      return NC_EBADTYPE;
+   
+   /* Move to the desired enum member in the list. */
+   enum_member = type->enum_member;
+   for (i = 0; i < type->num_enum_members; i++)
+   {
+      switch (type->base_nc_type)
+      {
+	 case NC_BYTE:
+	    ll_val = *(char *)enum_member->value;
+	    break;
+	 case NC_UBYTE:
+	    ll_val = *(unsigned char *)enum_member->value;
+	    break;
+	 case NC_SHORT:
+	    ll_val = *(short *)enum_member->value;
+	    break;
+	 case NC_USHORT:
+	    ll_val = *(unsigned short *)enum_member->value;
+	    break;
+	 case NC_INT:
+	    ll_val = *(int *)enum_member->value;
+	    break;
+	 case NC_UINT:
+	    ll_val = *(unsigned int *)enum_member->value;
+	    break;
+	 case NC_INT64:
+	 case NC_UINT64:
+	    ll_val = *(long long *)enum_member->value;
+	    break;
+	 default:
+	    return NC_EINVAL;
+      }
+      LOG((4, "ll_val=%d", ll_val));
+      if (ll_val == value)
+      {
+	 if (identifier)
+	    strcpy(identifier, enum_member->name);
+	 break;
+      }
+      else
+	 enum_member = enum_member->next;
+   }
+
+   /* If we didn't find it, life sucks for us. :-( */
+   if (i == type->num_enum_members)
+      return NC_EINVAL;
+
+   return NC_NOERR;
+}
+
+/* Get information about an enum member: an identifier and
+ * value. Identifier size will be <= NC_MAX_NAME. */
+int
+NC4_inq_enum_member(int ncid, nc_type typeid, int idx, char *identifier, 
+		   void *value)
+{
+   NC_GRP_INFO_T *grp;
+   NC_TYPE_INFO_T *type;
+   NC_ENUM_MEMBER_INFO_T *enum_member;
+   int i;
+   int retval;
+   
+   LOG((2, "nc_inq_enum_member: ncid 0x%x typeid %d", ncid, typeid));
+
+   /* Find group metadata. */
+   if ((retval = nc4_find_nc4_grp(ncid, &grp)))
+      return retval;
+   
+   /* Find this type. */
+   if (!(type = nc4_rec_find_nc_type(grp->file->nc4_info->root_grp, typeid)))
+      return NC_EBADTYPE;
+   
+   /* Complain if they are confused about the type. */
+   if (type->class != NC_ENUM)
+      return NC_EBADTYPE;
+   
+   /* Check index. */
+   if (idx >= type->num_enum_members)
+      return NC_EINVAL;
+   
+   /* Move to the desired enum member in the list. */
+   enum_member = type->enum_member;
+   for (i = 0; i < idx; i++)
+      enum_member = enum_member->next;
+
+   /* Give the people what they want. */
+   if (identifier)
+      strcpy(identifier, enum_member->name);
+   if (value)
+      memcpy(value, enum_member->value, type->size);
+
+   return NC_NOERR;
+}
+
+/* Insert a identifierd value into an enum type. The value must fit within
+ * the size of the enum type, the identifier size must be <= NC_MAX_NAME. */
+int
+NC4_insert_enum(int ncid, nc_type typeid, const char *identifier, 
+	       const void *value)
+{
+   NC_GRP_INFO_T *grp;
+   NC_TYPE_INFO_T *type;
+   char norm_name[NC_MAX_NAME + 1];
+   int retval;
+
+   LOG((2, "nc_insert_enum: ncid 0x%x, typeid %d identifier %s value %d", ncid, 
+	typeid, identifier, value));
+
+   /* Check and normalize the name. */
+   if ((retval = nc4_check_name(identifier, norm_name)))
+      return retval;
+
+   /* Find file metadata. */
+   if ((retval = nc4_find_nc4_grp(ncid, &grp)))
+      return retval;
+
+   /* Find type metadata. */
+   if ((retval = nc4_find_type(grp->file->nc4_info, typeid, &type)))
+      return retval;
+
+   /* Did the user give us a good enum typeid? */
+   if (!type || type->class != NC_ENUM)
+      return NC_EBADTYPE;
+
+   /* If this type has already been written to the file, you can't
+    * change it. */
+   if (type->committed)
+      return NC_ETYPDEFINED;
+
+   /* Insert new field into this type's list of fields. */
+   if ((retval = nc4_enum_member_add(&type->enum_member, type->size, 
+				     norm_name, value)))
+      return retval;
+
+      type->num_enum_members++;
+   
+   return NC_NOERR;
+}
+
+/* Insert one element into an already allocated vlen array element. */
+int
+NC4_put_vlen_element(int ncid, int typeid, void *vlen_element, 
+		    size_t len, const void *data)
+{
+   nc_vlen_t *tmp = vlen_element;
+   tmp->len = len;
+   tmp->p = (void *)data;
+   return NC_NOERR;
+}
+
+/* Insert one element into an already allocated vlen array element. */
+int
+NC4_get_vlen_element(int ncid, int typeid, const void *vlen_element, 
+		    size_t *len, void *data)
+{
+   const nc_vlen_t *tmp = vlen_element;
+   int type_size = 4;
+
+   *len = tmp->len;
+   memcpy(data, tmp->p, tmp->len * type_size);
+   return NC_NOERR;
+}
+
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/src_netcdf4/nc4var.c
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/src_netcdf4/nc4var.c	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/src_netcdf4/nc4var.c	(revision 1749)
@@ -0,0 +1,1485 @@
+/*
+This file is part of netcdf-4, a netCDF-like interface for HDF5, or a
+HDF5 backend for netCDF, depending on your point of view.
+
+This file handles the nc4 variable functions.
+
+Copyright 2003-2006, University Corporation for Atmospheric
+Research. See COPYRIGHT file for copying and redistribution
+conditions.
+*/
+
+#include <nc4internal.h>
+#include "nc4dispatch.h"
+#include <math.h>
+
+#ifdef USE_PNETCDF
+#include <pnetcdf.h>
+#endif
+
+/* Min and max deflate levels tolerated by HDF5. */
+#define MIN_DEFLATE_LEVEL 0
+#define MAX_DEFLATE_LEVEL 9
+
+/* This is to track opened HDF5 objects to make sure they are
+ * closed. */
+#ifdef EXTRA_TESTS
+extern int num_plists;
+#endif /* EXTRA_TESTS */
+
+/* One meg is the minimum buffer size. */
+#define ONE_MEG 1048576
+
+/* Szip options. */
+#define NC_SZIP_EC_OPTION_MASK 4
+#define NC_SZIP_NN_OPTION_MASK 32
+#define NC_SZIP_MAX_PIXELS_PER_BLOCK 32
+
+int nc4_get_default_fill_value(NC_TYPE_INFO_T *type_info, void *fill_value);
+
+
+/* If the HDF5 dataset for this variable is open, then close it and
+ * reopen it, with the perhaps new settings for chunk caching. */
+int
+nc4_reopen_dataset(NC_GRP_INFO_T *grp, NC_VAR_INFO_T *var)
+{
+   hid_t access_pid;
+
+   if (var->hdf_datasetid)
+   {
+      if ((access_pid = H5Pcreate(H5P_DATASET_ACCESS)) < 0)
+	 return NC_EHDFERR;
+#ifdef EXTRA_TESTS
+      num_plists++;
+#endif
+      if (H5Pset_chunk_cache(access_pid, var->chunk_cache_nelems, 
+			     var->chunk_cache_size, 
+			     var->chunk_cache_preemption) < 0)
+	 return NC_EHDFERR;
+      if (H5Dclose(var->hdf_datasetid) < 0)
+	 return NC_EHDFERR;
+      if ((var->hdf_datasetid = H5Dopen2(grp->hdf_grpid, var->name, 
+					 access_pid)) < 0)
+	 return NC_EHDFERR;
+      if (H5Pclose(access_pid) < 0)
+	 return NC_EHDFERR;
+#ifdef EXTRA_TESTS
+      num_plists--;
+#endif
+
+      if (var->dimscale)
+	 var->dim[0]->hdf_dimscaleid = var->hdf_datasetid;
+   }
+   
+   return NC_NOERR;
+}
+
+/* Set chunk cache size for a variable. */
+int
+NC4_set_var_chunk_cache(int ncid, int varid, size_t size, size_t nelems, 
+			float preemption)
+{
+   NC_FILE_INFO_T *nc;
+   NC_GRP_INFO_T *grp; 
+   NC_HDF5_FILE_INFO_T *h5;
+   NC_VAR_INFO_T *var;
+   int retval;
+
+   /* Check input for validity. */
+   if (preemption < 0 || preemption > 1)
+      return NC_EINVAL;
+
+   /* Find info for this file and group, and set pointer to each. */
+   if ((retval = nc4_find_nc_grp_h5(ncid, &nc, &grp, &h5)))
+      return retval;
+
+   /* An attempt to do any of these things on a netCDF-3 file is
+    * ignored with no error. */
+   if (!h5)
+      return NC_NOERR;
+
+   assert(nc && grp && h5);
+
+   /* Find the var. */
+   for (var = grp->var; var; var = var->next)
+      if (var->varid == varid)
+         break;
+   if (!var)
+      return NC_ENOTVAR;
+
+   /* Set the values. */
+   var->chunk_cache_size = size;
+   var->chunk_cache_nelems = nelems;
+   var->chunk_cache_preemption = preemption;
+
+   if ((retval = nc4_reopen_dataset(grp, var)))
+      return retval;
+
+   return NC_NOERR;
+}
+
+/* Need this version for fortran. Accept negative numbers to leave
+ * settings as they are. */
+int
+nc_set_var_chunk_cache_ints(int ncid, int varid, int size, int nelems, 
+			    int preemption)
+{
+   size_t real_size = H5D_CHUNK_CACHE_NBYTES_DEFAULT;
+   size_t real_nelems = H5D_CHUNK_CACHE_NSLOTS_DEFAULT;
+   float real_preemption = H5D_CHUNK_CACHE_W0_DEFAULT;
+
+   if (size >= 0)
+      real_size = size * MEGABYTE;
+
+   if (nelems >= 0)
+      real_nelems = nelems;
+
+   if (preemption >= 0)
+      real_preemption = preemption / 100.;
+	 
+   return nc_set_var_chunk_cache(ncid, varid, real_size, real_nelems, 
+				 real_preemption);
+}
+
+/* Get chunk cache size for a variable. */
+int
+NC4_get_var_chunk_cache(int ncid, int varid, size_t *sizep, 
+			size_t *nelemsp, float *preemptionp)
+{
+   NC_FILE_INFO_T *nc;
+   NC_GRP_INFO_T *grp; 
+   NC_HDF5_FILE_INFO_T *h5;
+   NC_VAR_INFO_T *var;
+   int retval;
+
+   /* Find info for this file and group, and set pointer to each. */
+   if ((retval = nc4_find_nc_grp_h5(ncid, &nc, &grp, &h5)))
+      return retval;
+
+   /* Attempting to do any of these things on a netCDF-3 file produces
+    * an error. */
+   if (!h5)
+      return NC_ENOTNC4;
+
+   assert(nc && grp && h5);
+
+   /* Find the var. */
+   for (var = grp->var; var; var = var->next)
+      if (var->varid == varid)
+         break;
+   if (!var)
+      return NC_ENOTVAR;
+
+   /* Give the user what they want. */
+   if (sizep)
+      *sizep = var->chunk_cache_size;
+   if (nelemsp)
+      *nelemsp = var->chunk_cache_nelems;
+   if (preemptionp)
+      *preemptionp = var->chunk_cache_preemption;
+
+   return NC_NOERR;
+}
+
+/* Get chunk cache size for a variable. */
+int
+nc_get_var_chunk_cache_ints(int ncid, int varid, int *sizep, 
+			    int *nelemsp, int *preemptionp)
+{
+   size_t real_size, real_nelems;
+   float real_preemption;
+   int ret;
+
+   if ((ret = nc_get_var_chunk_cache(ncid, varid, &real_size, 
+				     &real_nelems, &real_preemption)))
+      return ret;
+   
+   if (sizep)
+      *sizep = real_size / MEGABYTE;
+   if (nelemsp)
+      *nelemsp = (int)real_nelems;
+   if(preemptionp)
+      *preemptionp = (int)(real_preemption * 100);
+
+   return NC_NOERR;
+}
+
+/* Check a set of chunksizes to see if they add up to a chunk that is too big. */
+static int
+check_chunksizes(NC_GRP_INFO_T *grp, NC_VAR_INFO_T *var, const size_t *chunksizes)
+{
+   NC_TYPE_INFO_T *type_info;
+   float total;
+   size_t type_len;
+   int d;
+   int retval;
+   
+   if ((retval = nc4_get_typelen_mem(grp->file->nc4_info, var->xtype, 0, &type_len)))
+      return retval;
+   if ((retval = nc4_find_type(grp->file->nc4_info, var->xtype, &type_info)))
+      return retval;
+   if (type_info && type_info->class == NC_VLEN)
+      total = sizeof(hvl_t);
+   else
+      total = type_len;
+   for (d = 0; d < var->ndims; d++)
+   {
+      if (chunksizes[d] < 1)
+	 return NC_EINVAL;
+      total *= chunksizes[d];
+   }
+   
+   if (total > NC_MAX_UINT)
+      return NC_EBADCHUNK;
+
+   return NC_NOERR;
+}
+
+/* Find the default chunk nelems (i.e. length of chunk along each
+ * dimension). */
+static int 
+nc4_find_default_chunksizes2(NC_GRP_INFO_T *grp, NC_VAR_INFO_T *var)
+{
+   int d;
+   size_t type_size, max_len = 0;
+   float num_values = 1, num_set = 0;
+   int retval;
+#ifdef LOGGING   
+   int max_dim;
+   float total_chunk_size;
+#endif
+
+   if (var->type_info->nc_typeid == NC_STRING)
+      type_size = sizeof(char *);
+   else
+      type_size = var->type_info->size;
+
+   /* Later this will become the total number of bytes in the default
+    * chunk. */
+#ifdef LOGGING   
+   total_chunk_size = type_size;
+#endif
+
+   /* How many values in the variable (or one record, if there are
+    * unlimited dimensions); which is the largest dimension, and how
+    * long is it? */
+   for (d = 0; d < var->ndims; d++)
+   {
+      assert(var->dim[d]);
+      if (var->dim[d]->len) 
+	 num_values *= (float)var->dim[d]->len;
+      else
+	 num_set++;
+      
+      if (var->dim[d]->len > max_len)
+      {
+	 max_len = var->dim[d]->len;
+#ifdef LOGGING
+	 max_dim = d;
+#endif
+      }
+      LOG((4, "d = %d max_dim %d max_len %ld num_values %f", d, max_dim, max_len, 
+	   num_values));
+   }
+
+   /* If a dim is several orders of magnitude smaller than the max
+    * dimension, set it's chunk size to the full extent of the smaller
+    * dimension. */
+#define NC_DIM_MULTIPLIER 10000
+   for (d = 0; d < var->ndims; d++)
+      if (var->dim[d]->unlimited)
+	 var->chunksizes[d] = 1;
+      else if (!var->dim[d]->unlimited && var->dim[d]->len * NC_DIM_MULTIPLIER < max_len)
+      {
+	 var->chunksizes[d] = var->dim[d]->len;
+	 num_set++; 
+      }
+   
+   /* Pick a chunk length for each dimension, if one has not already
+    * been picked above. */
+   for (d = 0; d < var->ndims; d++)
+      if (!var->chunksizes[d])
+      {
+	 size_t suggested_size;
+	 suggested_size = (pow((double)DEFAULT_CHUNK_SIZE/(num_values * type_size), 
+			       1/(double)(var->ndims - num_set)) * var->dim[d]->len - .5);
+	 if (suggested_size > var->dim[d]->len)
+	    suggested_size = var->dim[d]->len;
+	 var->chunksizes[d] = suggested_size ? suggested_size : 1;
+	 LOG((4, "nc_def_var_nc4: name %s dim %d DEFAULT_CHUNK_SIZE %d num_values %f type_size %d "
+	      "chunksize %ld", var->name, d, DEFAULT_CHUNK_SIZE, num_values, type_size, var->chunksizes[d]));
+      }
+
+   /* Find total chunk size. */
+#ifdef LOGGING   
+   for (d = 0; d < var->ndims; d++)
+      total_chunk_size *= var->chunksizes[d];
+   LOG((4, "total_chunk_size %f", total_chunk_size));
+#endif
+   
+   /* But did this add up to a chunk that is too big? */
+   retval = check_chunksizes(grp, var, var->chunksizes);
+   if (retval)
+   {
+      /* Other error? */
+      if (retval != NC_EBADCHUNK)
+	 return retval;
+
+      /* Chunk is too big! Reduce each dimension by half and try again. */
+      for ( ; retval == NC_EBADCHUNK; retval = check_chunksizes(grp, var, var->chunksizes))
+    	 for (d = 0; d < var->ndims; d++)
+	    var->chunksizes[d] = var->chunksizes[d]/2 ? var->chunksizes[d]/2 : 1;
+   }
+
+   /* Do we have any big data overhangs? They can be dangerous to
+    * babies, the elderly, or confused campers who have had too much
+    * beer. */
+   for (d = 0; d < var->ndims; d++)
+   {
+       int num_chunks;
+       size_t overhang;
+       assert(var->chunksizes[d] > 0);
+       num_chunks = (var->dim[d]->len + var->chunksizes[d] - 1) / var->chunksizes[d];
+       if(num_chunks > 0) {
+	   overhang = (num_chunks * var->chunksizes[d]) - var->dim[d]->len;
+	   var->chunksizes[d] -= overhang / num_chunks;
+       }
+   }
+
+   return NC_NOERR;
+}
+
+/* This is called when a new netCDF-4 variable is defined. Break it
+ * down! */
+static int 
+nc_def_var_nc4(int ncid, const char *name, nc_type xtype, 
+               int ndims, const int *dimidsp, int *varidp)
+{
+   NC_GRP_INFO_T *grp;
+   NC_VAR_INFO_T *var;
+   NC_DIM_INFO_T *dim;
+   NC_HDF5_FILE_INFO_T *h5;
+   NC_TYPE_INFO_T *type_info;
+   char norm_name[NC_MAX_NAME + 1];
+   int new_varid = 0;
+   int num_unlim = 0;
+   int d;
+   size_t num_values = 1;
+   int retval;
+
+   /* Find info for this file and group, and set pointer to each. */
+   if ((retval = nc4_find_grp_h5(ncid, &grp, &h5)))
+      return retval;
+   assert(grp && h5);
+
+   /* If it's not in define mode, strict nc3 files error out,
+    * otherwise switch to define mode. */
+   if (!(h5->flags & NC_INDEF))
+   {
+      if (h5->cmode & NC_CLASSIC_MODEL)
+         return NC_ENOTINDEFINE;
+      if ((retval = NC4_redef(ncid)))
+         return retval;
+   }
+
+   /* Check and normalize the name. */
+   if ((retval = nc4_check_name(name, norm_name)))
+      return retval;
+
+   /* Not a Type is, well, not a type.*/
+   if (xtype == NC_NAT)
+      return NC_EBADTYPE;
+   
+   /* For classic files, only classic types are allowed. */
+   if (h5->cmode & NC_CLASSIC_MODEL && xtype > NC_DOUBLE)
+      return NC_ESTRICTNC3;
+
+   /* If this is a user defined type, find it. */
+   if (xtype > NC_STRING)
+      if (nc4_find_type(grp->file->nc4_info, xtype, &type_info))
+         return NC_EBADTYPE;
+
+   /* cast needed for braindead systems with signed size_t */
+   if((unsigned long) ndims > X_INT_MAX) /* Backward compat */
+      return NC_EINVAL;
+
+   /* Classic model files have a limit on number of vars. */
+   if(h5->cmode & NC_CLASSIC_MODEL && h5->nvars >= NC_MAX_VARS)
+      return NC_EMAXVARS;
+
+   /* Check that this name is not in use as a var, grp, or type. */
+   if ((retval = nc4_check_dup_name(grp, norm_name)))
+      return retval;
+
+   /* If the file is read-only, return an error. */
+   if (h5->no_write)
+     return NC_EPERM;
+
+   /* Get the new varid. */
+   for (var = grp->var; var; var = var->next)
+      new_varid++;
+
+   /* Check all the dimids to make sure they exist. */
+   for (d = 0; d < ndims; d++)
+   {
+      if ((retval = nc4_find_dim(grp, dimidsp[d], &dim, NULL)))
+         return retval;
+      if (dim->unlimited)
+	 num_unlim++;
+      else
+	 num_values *= dim->len;
+   }
+
+   /* These degrubbing messages sure are handy! */
+   LOG((3, "nc_def_var_nc4: name %s type %d ndims %d", norm_name, xtype, ndims));
+#ifdef LOGGING
+   {
+      int dd;
+      for (dd = 0; dd < ndims; dd++)
+         LOG((4, "dimid[%d] %d", dd, dimidsp[dd]));
+   }
+#endif
+
+   /* Add the var to the end of the list. */
+   if ((retval = nc4_var_list_add(&grp->var, &var)))
+      return retval;
+
+   /* Now fill in the values in the var info structure. */
+   if (!(var->name = malloc((strlen(norm_name) + 1) * sizeof(char))))
+      return NC_ENOMEM;
+   strcpy(var->name, norm_name);
+   var->varid = grp->nvars++;
+   var->xtype = xtype;
+   var->ndims = ndims;
+   var->dirty++;
+   
+   /* If this is a user-defined type, there is a type_info stuct with
+    * all the type information. For atomic types, fake up a type_info
+    * struct. */
+   if (xtype > NC_STRING)
+      var->type_info = type_info;
+   else
+   {
+      if (!(var->type_info = calloc(1, sizeof(NC_TYPE_INFO_T))))
+	 return NC_ENOMEM;
+      var->type_info->nc_typeid = xtype;
+      if ((retval = nc4_get_hdf_typeid(h5, var->xtype, &var->type_info->hdf_typeid, 
+				       var->type_info->endianness)))
+	 return retval;
+      if ((var->type_info->native_typeid = H5Tget_native_type(var->type_info->hdf_typeid, 
+							      H5T_DIR_DEFAULT)) < 0)
+         return NC_EHDFERR;
+      if ((retval = nc4_get_typelen_mem(h5, var->type_info->nc_typeid, 0, 
+					&var->type_info->size)))
+	 return retval;
+   }
+   if (!num_unlim)
+      var->contiguous = 1;
+
+   /* Allocate space for dimension information. */
+   if (ndims)
+   {
+      if (!(var->dim = calloc(ndims, sizeof(NC_DIM_INFO_T *))))
+	 return NC_ENOMEM;
+      if (!(var->dimids = calloc(ndims, sizeof(int))))
+	 return NC_ENOMEM;
+   }
+
+   /* At the same time, check to see if this is a coordinate
+    * variable. If so, it will have the same name as one of its
+    * dimensions. If it is a coordinate var, is it a coordinate var in
+    * the same group as the dim? */
+   for (d = 0; d < ndims; d++)
+   {
+      NC_GRP_INFO_T *dim_grp;
+      if ((retval = nc4_find_dim(grp, dimidsp[d], &dim, &dim_grp)))
+         return retval;
+      if (strcmp(dim->name, norm_name) == 0 && dim_grp == grp && d == 0)
+      {
+         var->dimscale++;
+         dim->coord_var = var;
+	 dim->coord_var_in_grp++;
+      }
+      var->dimids[d] = dimidsp[d];
+      var->dim[d] = dim;
+   }
+
+   /* Determine default chunksizes for this variable. (Even for
+    * variables which may be contiguous. */
+   LOG((4, "allocating array of %d size_t to hold chunksizes for var %s",
+	var->ndims, var->name));
+   if (var->ndims)
+      if (!(var->chunksizes = calloc(var->ndims, sizeof(size_t))))
+	 return NC_ENOMEM;
+
+   if ((retval = nc4_find_default_chunksizes2(grp, var)))
+      return retval;
+
+   /* Is this a variable with a chunksize greater than the current
+    * cache size? */
+   if ((retval = nc4_adjust_var_cache(grp, var)))
+      return retval;
+
+   /* If the user names this variable the same as a dimension, but
+    * doesn't use that dimension first in its list of dimension ids,
+    * is not a coordinate variable. I need to change its HDF5 name,
+    * because the dimension will cause a HDF5 dataset to be created,
+    * and this var has the same name. */
+   for (dim = grp->dim; dim; dim = dim->next)
+      if (!strcmp(dim->name, norm_name) && 
+	  (!var->ndims || dimidsp[0] != dim->dimid))
+      {
+	 /* Set a different hdf5 name for this variable to avoid name
+	  * clash. */
+	 if (strlen(norm_name) + strlen(NON_COORD_PREPEND) > NC_MAX_NAME)
+	    return NC_EMAXNAME;
+	 if (!(var->hdf5_name = malloc((strlen(NON_COORD_PREPEND) + 
+					strlen(norm_name) + 1) * sizeof(char))))
+	    return NC_ENOMEM;
+	 
+	 sprintf(var->hdf5_name, "%s%s", NON_COORD_PREPEND, norm_name);
+      }
+
+   /* If this is a coordinate var, it is marked as a HDF5 dimension
+    * scale. (We found dim above.) Otherwise, allocate space to
+    * remember whether dimension scales have been attached to each
+    * dimension. */
+   if (!var->dimscale && ndims)
+      if (ndims && !(var->dimscale_attached = calloc(ndims, sizeof(int))))
+         return NC_ENOMEM;
+
+   /* Return the varid. */
+   if (varidp)
+      *varidp = var->varid;
+   LOG((4, "new varid %d", var->varid));
+
+   return retval;
+}
+
+/* Create a new variable to hold user data. This is what it's all
+ * about baby! */
+int
+NC4_def_var(int ncid, const char *name, nc_type xtype, int ndims, 
+           const int *dimidsp, int *varidp)
+{
+   NC_FILE_INFO_T *nc;
+
+   LOG((2, "nc_def_var: ncid 0x%x name %s xtype %d ndims %d",
+        ncid, name, xtype, ndims));
+
+   /* If there are dimensions, I need their ids. */
+   if (ndims && !dimidsp)
+      return NC_EINVAL;
+
+   /* Find metadata for this file. */
+   if (!(nc = nc4_find_nc_file(ncid)))
+      return NC_EBADID;
+
+#ifdef USE_PNETCDF
+   /* Take care of files created/opened with parallel-netcdf library. */
+   if (nc->pnetcdf_file)
+   {
+      int ret;
+
+      ret = ncmpi_def_var(nc->int_ncid, name, xtype, ndims, 
+			  dimidsp, varidp);
+      nc->pnetcdf_ndims[*varidp] = ndims;
+      return ret;
+   }
+#endif /* USE_PNETCDF */
+
+   /* Netcdf-3 cases handled by dispatch layer. */
+   assert(nc->nc4_info);
+
+   /* Handle netcdf-4 cases. */
+   return nc_def_var_nc4(ncid, name, xtype, ndims, dimidsp, varidp);
+}
+
+/* Get all the information about a variable. Pass NULL for whatever
+ * you don't care about. This is an internal function, not exposed to
+ * the user. */
+int 
+NC4_inq_var_all(int ncid, int varid, char *name, nc_type *xtypep, 
+               int *ndimsp, int *dimidsp, int *nattsp, 
+               int *shufflep, int *deflatep, int *deflate_levelp,
+               int *fletcher32p, int *contiguousp, size_t *chunksizesp, 
+               int *no_fill, void *fill_valuep, int *endiannessp, 
+	       int *options_maskp, int *pixels_per_blockp)
+{
+   NC_FILE_INFO_T *nc;
+   NC_GRP_INFO_T *grp; 
+   NC_HDF5_FILE_INFO_T *h5;
+   NC_VAR_INFO_T *var;
+   NC_ATT_INFO_T *att;
+   int natts=0;
+   size_t type_size;
+   int d;
+   int retval;
+
+   LOG((2, "nc_inq_var_all: ncid 0x%x varid %d", ncid, varid));
+
+   /* Find info for this file and group, and set pointer to each. */
+   if ((retval = nc4_find_nc_grp_h5(ncid, &nc, &grp, &h5)))
+      return retval;
+   assert(nc && grp && h5);
+
+#ifdef USE_PNETCDF
+   /* Take care of files created/opened with parallel-netcdf library. */
+   if (nc->pnetcdf_file)
+      return ncmpi_inq_var(nc->int_ncid, varid, name, xtypep, ndimsp, 
+			   dimidsp, nattsp);
+#endif /* USE_PNETCDF */
+
+   /* Walk through the list of vars, and return the info about the one
+      with a matching varid. If the varid is -1, find the global
+      atts and call it a day. */
+   if (varid == NC_GLOBAL)
+   {
+      if (nattsp)
+      {
+         for (att = grp->att; att; att = att->next)
+            natts++;
+         *nattsp = natts;
+      }
+      return NC_NOERR;
+   }
+
+   /* Find the var. */
+   for (var = grp->var; var; var = var->next)
+      if (var->varid == varid)
+         break;
+   
+   /* Oh no! Maybe we couldn't find it (*sob*)! */
+   if (!var)
+      return NC_ENOTVAR;
+   
+   /* Copy the data to the user's data buffers. */
+   if (name)
+      strcpy(name, var->name);
+   if (xtypep)
+      *xtypep = var->xtype;
+   if (ndimsp)
+      *ndimsp = var->ndims;
+   if (dimidsp)
+      for (d = 0; d < var->ndims; d++)
+         dimidsp[d] = var->dimids[d];
+   if (nattsp)
+   {
+      for (att = var->att; att; att = att->next)
+         natts++;
+      *nattsp = natts;
+   }
+   
+   /* Chunking stuff. */
+   if (!var->contiguous && chunksizesp)
+      for (d = 0; d < var->ndims; d++)
+      {
+         chunksizesp[d] = var->chunksizes[d];
+         LOG((4, "chunksizesp[%d]=%d", d, chunksizesp[d]));
+      }
+
+   if (contiguousp)
+      *contiguousp = var->contiguous ? NC_CONTIGUOUS : NC_CHUNKED;
+
+   /* Filter stuff. */
+   if (deflatep)
+      *deflatep = var->deflate;
+   if (deflate_levelp)
+      *deflate_levelp = var->deflate_level;
+   if (shufflep)
+      *shufflep = var->shuffle;
+   if (fletcher32p)
+      *fletcher32p = var->fletcher32;
+   if (options_maskp)
+      *options_maskp = var->options_mask;
+   if (pixels_per_blockp)
+      *pixels_per_blockp = var->pixels_per_block;
+
+   /* Fill value stuff. */
+   if (no_fill)
+      *no_fill = var->no_fill;
+
+   /* Don't do a thing with fill_valuep if no_fill mode is set for
+    * this var, or if fill_valuep is NULL. */
+   if (!var->no_fill && fill_valuep)
+   {
+      /* Do we have a fill value for this var? */
+      if (var->fill_value)
+      {
+         if ((retval = nc4_get_typelen_mem(grp->file->nc4_info, var->xtype, 0, &type_size)))
+            return retval;
+         memcpy(fill_valuep, var->fill_value, type_size);
+      }
+      else
+      {
+         if ((retval = nc4_get_default_fill_value(var->type_info, fill_valuep)))
+            return retval;
+      }
+   }
+
+   /* Does the user want the endianness of this variable? */
+   if (endiannessp)
+      *endiannessp = var->type_info->endianness;
+
+   return NC_NOERR;
+}
+
+/* This functions sets extra stuff about a netCDF-4 variable which
+   must be set before the enddef but after the def_var. This is an
+   internal function, deliberately hidden from the user so that we can
+   change the prototype of this functions without changing the API. */
+static int
+nc_def_var_extra(int ncid, int varid, int *shuffle, int *deflate, 
+		 int *deflate_level, int *fletcher32, int *contiguous, 
+		 const size_t *chunksizes, int *no_fill, 
+                 const void *fill_value, int *endianness, 
+		 int *options_mask, int *pixels_per_block)
+{
+   NC_FILE_INFO_T *nc;
+   NC_GRP_INFO_T *grp; 
+   NC_HDF5_FILE_INFO_T *h5;
+   NC_VAR_INFO_T *var;
+   NC_DIM_INFO_T *dim;
+   size_t type_size;
+   int d;
+   int retval;
+
+   LOG((2, "nc_def_var_extra: ncid 0x%x varid %d", ncid, varid));
+
+   /* Find info for this file and group, and set pointer to each. */
+   if ((retval = nc4_find_nc_grp_h5(ncid, &nc, &grp, &h5)))
+      return retval;
+
+   /* Attempting to do any of these things on a netCDF-3 file produces
+    * an error. */
+   if (!h5)
+      return NC_ENOTNC4;
+
+   assert(nc && grp && h5);
+
+   /* Find the var. */
+   for (var = grp->var; var; var = var->next)
+      if (var->varid == varid)
+         break;
+   
+   /* Oh no! Maybe we couldn't find it (*sob*)! */
+   if (!var)
+      return NC_ENOTVAR;
+
+   /* Can't turn on contiguous and deflate/fletcher32/szip. */
+   if (contiguous)
+      if ((*contiguous != NC_CHUNKED && deflate) || 
+	  (*contiguous != NC_CHUNKED && fletcher32) ||
+	  (*contiguous != NC_CHUNKED && options_mask))
+	 return NC_EINVAL;
+
+   /* If the HDF5 dataset has already been created, then it is too
+    * late to set all the extra stuff. */
+   if (var->created)
+      return NC_ELATEDEF;
+
+   /* Check compression options. */
+   if ((deflate && options_mask) ||
+       (deflate && !deflate_level) ||
+       (options_mask && !pixels_per_block))
+      return NC_EINVAL;      
+       
+   /* Valid deflate level? */
+   if (deflate && deflate_level)
+   {
+      if (*deflate)
+         if (*deflate_level < MIN_DEFLATE_LEVEL ||
+             *deflate_level > MAX_DEFLATE_LEVEL)
+            return NC_EINVAL;
+      if (var->options_mask)
+            return NC_EINVAL;
+
+      /* For scalars, just ignore attempt to deflate. */
+      if (!var->ndims)
+            return NC_NOERR;
+
+      /* Well, if we couldn't find any errors, I guess we have to take
+       * the users settings. Darn! */
+      var->contiguous = 0;
+      var->deflate = *deflate;
+      if (*deflate)
+         var->deflate_level = *deflate_level;
+      LOG((3, "nc_def_var_extra: *deflate_level %d", *deflate_level));      
+   }
+
+   /* Szip in use? */
+   if (options_mask)
+   {
+#ifndef USE_SZIP
+      return NC_EINVAL;
+#endif
+      if (var->deflate)
+	 return NC_EINVAL;
+      if ((*options_mask != NC_SZIP_EC_OPTION_MASK) &&
+	  (*options_mask != NC_SZIP_NN_OPTION_MASK))
+	 return NC_EINVAL;
+      if ((*pixels_per_block > NC_SZIP_MAX_PIXELS_PER_BLOCK) ||
+	  (var->type_info->nc_typeid >= NC_STRING))
+	 return NC_EINVAL;
+      var->options_mask = *options_mask;
+      var->pixels_per_block = *pixels_per_block;
+      var->contiguous = 0;
+   }
+
+   /* Shuffle filter? */
+   if (shuffle)
+   {
+      var->shuffle = *shuffle;
+      var->contiguous = 0;
+   }
+
+   /* Fltcher32 checksum error protection? */
+   if (fletcher32)
+   {
+      var->fletcher32 = *fletcher32;
+      var->contiguous = 0;
+   }
+   
+   /* Does the user want a contiguous dataset? Not so fast! Make sure
+    * that there are no unlimited dimensions, and no filters in use
+    * for this data. */
+   if (contiguous && *contiguous)
+   {
+      if (var->deflate || var->fletcher32 || var->shuffle || var->options_mask)
+	 return NC_EINVAL;
+      
+      for (d = 0; d < var->ndims; d++)
+      {
+	 if ((retval = nc4_find_dim(grp, var->dimids[d], &dim, NULL)))
+	    return retval;
+	 if (dim->unlimited)
+	    return NC_EINVAL;
+      }
+
+      var->contiguous = NC_CONTIGUOUS;
+   }
+
+   /* Chunksizes anyone? */
+   if (contiguous && *contiguous == NC_CHUNKED)
+   {
+      var->contiguous = 0;
+
+      /* If the user provided chunksizes, check that they are not too
+       * big, and that their total size of chunk is less than 4 GB. */
+      if (chunksizes)
+      {
+
+	 if ((retval = check_chunksizes(grp, var, chunksizes)))
+	    return retval;
+
+	 /* Set the chunksizes for this variable. */
+	 for (d = 0; d < var->ndims; d++)
+	    var->chunksizes[d] = chunksizes[d];
+      }
+   }
+
+   /* Is this a variable with a chunksize greater than the current
+    * cache size? */
+   if (var->contiguous == NC_CHUNKED && (chunksizes || deflate || contiguous))
+   {
+      /* Determine default chunksizes for this variable. */
+      if (!var->chunksizes[0])
+	 if ((retval = nc4_find_default_chunksizes2(grp, var)))
+	    return retval;
+
+      /* Adjust the cache. */
+      if ((retval = nc4_adjust_var_cache(grp, var)))
+	 return retval;
+   }
+
+   /* Are we setting a fill modes? */
+   if (no_fill)
+   {
+      if (*no_fill)
+         var->no_fill = 1;
+      else
+         var->no_fill = 0;
+   }
+
+   /* Are we setting a fill value? */
+   if (fill_value && !var->no_fill)
+   {
+      /* If fill value hasn't been set, allocate space. */
+      if ((retval = nc4_get_typelen_mem(h5, var->xtype, 0, &type_size)))
+         return retval;
+      if (!var->fill_value)
+         if (!(var->fill_value = malloc(type_size)))
+            return NC_ENOMEM;
+
+      /* Copy the fill_value. */
+      LOG((4, "Copying fill value into metadata for variable %s", 
+           var->name));
+      memcpy(var->fill_value, fill_value, type_size);
+
+      /* If there's a _FillValue attribute, delete it. */
+      retval = nc_del_att(ncid, varid, _FillValue);
+      if (retval && retval != NC_ENOTATT)
+         return retval;
+
+      /* Create a _FillValue attribute. */
+      if ((retval = nc_put_att(ncid, varid, _FillValue, var->xtype, 1, fill_value)))
+         return retval;
+   }
+
+   /* Is the user setting the endianness? */
+   if (endianness)
+      var->type_info->endianness = *endianness;
+
+   return NC_NOERR;
+}
+
+/* Set the deflate level for a var, lower is faster, higher is
+ * better. Must be called after nc_def_var and before nc_enddef or any
+ * functions which writes data to the file. */
+int
+NC4_def_var_deflate(int ncid, int varid, int shuffle, int deflate, 
+                   int deflate_level)
+{
+   return nc_def_var_extra(ncid, varid, &shuffle, &deflate, 
+                           &deflate_level, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
+}
+
+/* Set checksum for a var. This must be called after the nc_def_var
+ * but before the nc_enddef. */
+int
+NC4_def_var_fletcher32(int ncid, int varid, int fletcher32)
+{
+   return nc_def_var_extra(ncid, varid, NULL, NULL, NULL, &fletcher32, 
+                           NULL, NULL, NULL, NULL, NULL, NULL, NULL);
+}
+   
+/* Define chunking stuff for a var. This must be done after nc_def_var
+   and before nc_enddef. 
+
+   Chunking is required in any dataset with one or more unlimited
+   dimension in HDF5, or any dataset using a filter.
+
+   Where chunksize is a pointer to an array of size ndims, with the
+   chunksize in each dimension. 
+*/
+int
+NC4_def_var_chunking(int ncid, int varid, int contiguous, const size_t *chunksizesp)
+{
+   return nc_def_var_extra(ncid, varid, NULL, NULL, NULL, NULL, 
+                           &contiguous, chunksizesp, NULL, NULL, NULL, NULL, NULL);
+}
+
+/* Inquire about chunking stuff for a var. This is a private,
+ * undocumented function, used by the f77 API to avoid size_t
+ * problems. */
+int
+nc_inq_var_chunking_ints(int ncid, int varid, int *contiguousp, int *chunksizesp)
+{
+   NC_FILE_INFO_T *nc;
+   NC_GRP_INFO_T *grp; 
+   NC_HDF5_FILE_INFO_T *h5;
+   NC_VAR_INFO_T *var;
+   size_t *cs = NULL;
+   int i, retval;
+
+   /* Find this ncid's file info. */
+   if ((retval = nc4_find_nc_grp_h5(ncid, &nc, &grp, &h5)))
+      return retval;
+   assert(nc);
+
+   /* Must be netcdf-4. */
+   if (!h5)
+      return NC_ENOTNC4;
+
+   /* Find var cause I need the number of dims. */
+   if ((retval = nc4_find_g_var_nc(nc, ncid, varid, &grp, &var)))
+      return retval;
+   
+   /* Allocate space for the size_t copy of the chunksizes array. */
+   if (var->ndims)
+      if (!(cs = malloc(var->ndims * sizeof(size_t))))
+	 return NC_ENOMEM;
+   
+   retval = NC4_inq_var_all(ncid, varid, NULL, NULL, NULL, NULL, NULL, 
+                           NULL, NULL, NULL, NULL, contiguousp, cs, NULL,
+                           NULL, NULL, NULL, NULL);
+
+   /* Copy to size_t array. */
+   if (*contiguousp == NC_CHUNKED)
+      for (i = 0; i < var->ndims; i++)
+      {
+	 chunksizesp[i] = cs[i];
+	 if (cs[i] > NC_MAX_INT)
+	    retval = NC_ERANGE;
+      }
+
+   if (var->ndims)
+      free(cs);
+   return retval;
+}
+
+/* This function defines the chunking with ints, which works better
+ * with F77 portability. It is a secret function, which has been
+ * rendered unmappable, and it is impossible to apparate anywhere in
+ * this function. */
+int
+nc_def_var_chunking_ints(int ncid, int varid, int contiguous, int *chunksizesp)
+{
+   NC_FILE_INFO_T *nc;
+   NC_GRP_INFO_T *grp; 
+   NC_HDF5_FILE_INFO_T *h5;
+   NC_VAR_INFO_T *var;
+   size_t *cs = NULL;
+   int i, retval;
+
+   /* Find this ncid's file info. */
+   if ((retval = nc4_find_nc_grp_h5(ncid, &nc, &grp, &h5)))
+      return retval;
+   assert(nc);
+
+   /* Must be netcdf-4. */
+   if (!h5)
+      return NC_ENOTNC4;
+
+   /* Find var cause I need the number of dims. */
+   if ((retval = nc4_find_g_var_nc(nc, ncid, varid, &grp, &var)))
+      return retval;
+   
+   /* Allocate space for the size_t copy of the chunksizes array. */
+   if (var->ndims)
+      if (!(cs = malloc(var->ndims * sizeof(size_t))))
+	 return NC_ENOMEM;
+   
+   /* Copy to size_t array. */
+   for (i = 0; i < var->ndims; i++)
+      cs[i] = chunksizesp[i];
+
+   retval = nc_def_var_extra(ncid, varid, NULL, NULL, NULL, NULL, 
+                             &contiguous, cs, NULL, NULL, NULL, NULL, NULL);
+
+   if (var->ndims)
+      free(cs);
+   return retval;
+}
+
+/* Define fill value behavior for a variable. This must be done after
+   nc_def_var and before nc_enddef. */
+int
+NC4_def_var_fill(int ncid, int varid, int no_fill, const void *fill_value)
+{
+   return nc_def_var_extra(ncid, varid, NULL, NULL, NULL, NULL, NULL, 
+                           NULL, &no_fill, fill_value, NULL, NULL, NULL);
+}
+
+
+/* Define the endianness of a variable. */
+int
+NC4_def_var_endian(int ncid, int varid, int endianness)
+{
+   return nc_def_var_extra(ncid, varid, NULL, NULL, NULL, NULL, NULL,
+                           NULL, NULL, NULL, &endianness, NULL, NULL);
+}
+
+/* Get var id from name. */
+int
+NC4_inq_varid(int ncid, const char *name, int *varidp)
+{
+   NC_FILE_INFO_T *nc;
+   NC_GRP_INFO_T *grp; 
+   NC_HDF5_FILE_INFO_T *h5;
+   NC_VAR_INFO_T *var;
+   char norm_name[NC_MAX_NAME + 1];
+   int retval;
+   
+   if (!name)
+      return NC_EINVAL;
+   if (!varidp)
+      return NC_NOERR;
+
+   LOG((2, "nc_inq_varid: ncid 0x%x name %s", ncid, name));
+   
+   /* Find info for this file and group, and set pointer to each. */
+   if ((retval = nc4_find_nc_grp_h5(ncid, &nc, &grp, &h5)))
+      return retval;
+   
+   /* Handle netcdf-3. */
+   assert(h5);
+   
+   /* Normalize name. */
+   if ((retval = nc4_normalize_name(name, norm_name)))
+      return retval;
+
+   /* Find var of this name. */
+   for (var = grp->var; var; var = var->next)
+      if (!(strcmp(var->name, norm_name)))
+      {
+         *varidp = var->varid;
+         return NC_NOERR;
+      }
+
+   return NC_ENOTVAR;
+}
+
+/* Rename a var to "bubba," for example.
+   
+   According to the netcdf-3.5 docs: If the new name is longer than
+   the old name, the netCDF dataset must be in define mode.  */
+int
+NC4_rename_var(int ncid, int varid, const char *name)
+{
+   NC_FILE_INFO_T *nc;
+   NC_GRP_INFO_T *grp; 
+   NC_HDF5_FILE_INFO_T *h5;
+   NC_VAR_INFO_T *var;
+   int retval = NC_NOERR;
+
+   LOG((2, "nc_rename_var: ncid 0x%x varid %d name %s", 
+        ncid, varid, name));
+
+   /* Find info for this file and group, and set pointer to each. */
+   if ((retval = nc4_find_nc_grp_h5(ncid, &nc, &grp, &h5)))
+      return retval;
+   
+#ifdef USE_PNETCDF
+   /* Take care of files created/opened with parallel-netcdf library. */
+   if (nc->pnetcdf_file)
+      return ncmpi_rename_var(nc->int_ncid, varid, name);
+#endif /* USE_PNETCDF */
+
+   /* Take care of netcdf-3 files. */
+   assert(h5);
+
+   /* Is the new name too long? */
+   if (strlen(name) > NC_MAX_NAME)
+      return NC_EMAXNAME;
+
+   /* Trying to write to a read-only file? No way, Jose! */
+   if (h5->no_write)
+      return NC_EPERM;
+
+   /* Check name validity, if strict nc3 rules are in effect for this
+    * file. */
+   if ((retval = NC_check_name(name)))
+      return retval;
+
+   /* Is name in use? */
+   for (var = grp->var; var; var = var->next)
+      if (!strncmp(var->name, name, NC_MAX_NAME))
+         return NC_ENAMEINUSE;   
+
+   /* Find the var. */
+   for (var = grp->var; var; var = var->next)
+      if (var->varid == varid)
+         break;
+   if (!var)
+      return NC_ENOTVAR;
+
+   /* If we're not in define mode, new name must be of equal or
+      less size, if strict nc3 rules are in effect for this . */
+   if (!(h5->flags & NC_INDEF) && strlen(name) > strlen(var->name) &&
+       (h5->cmode & NC_CLASSIC_MODEL))
+      return NC_ENOTINDEFINE;
+
+   /* Change the HDF5 file, if this var has already been created
+      there. */
+   if (var->created)
+   {
+      if (H5Gmove(grp->hdf_grpid, var->name, name) < 0)
+         BAIL(NC_EHDFERR);
+   }
+
+   /* Now change the name in our metadata. */
+   free(var->name);
+   if (!(var->name = malloc((strlen(name) + 1) * sizeof(char))))
+      return NC_ENOMEM;
+   strcpy(var->name, name);
+
+  exit:
+   return retval;
+}
+
+
+int
+NC4_var_par_access(int ncid, int varid, int par_access) 
+{
+#ifndef USE_PARALLEL
+   return NC_ENOPAR;
+#else
+   NC_FILE_INFO_T *nc; 
+   NC_GRP_INFO_T *grp; 
+   NC_HDF5_FILE_INFO_T *h5;
+   NC_VAR_INFO_T *var;
+   int retval;
+
+   LOG((1, "nc_var_par_access: ncid 0x%x varid %d par_access %d", ncid, 
+        varid, par_access));
+
+   if (par_access != NC_INDEPENDENT && par_access != NC_COLLECTIVE)
+      return NC_EINVAL;
+   
+   /* Find info for this file and group, and set pointer to each. */
+   if ((retval = nc4_find_nc_grp_h5(ncid, &nc, &grp, &h5)))
+      return retval;
+
+#ifdef USE_PNETCDF
+   /* Handle files opened/created with parallel-netcdf library. */
+   if (nc->pnetcdf_file)
+   {
+      if (par_access == nc->pnetcdf_access_mode)
+	 return NC_NOERR;
+
+      nc->pnetcdf_access_mode = par_access;
+      if (par_access == NC_INDEPENDENT)
+	 return ncmpi_begin_indep_data(nc->int_ncid);
+      else
+	 return ncmpi_end_indep_data(nc->int_ncid);
+   }
+#endif /* USE_PNETCDF */   
+   
+   /* This function only for files opened with nc_open_par or nc_create_par. */
+   if (!h5->parallel)
+      return NC_ENOPAR;
+
+   /* Find the var, and set its preference. */
+   for (var = grp->var; var; var = var->next)
+      if (var->varid == varid)
+         break;
+   if (!var)
+      return NC_ENOTVAR;
+
+   if (par_access) 
+      var->parallel_access = NC_COLLECTIVE;
+   else
+      var->parallel_access = NC_INDEPENDENT;
+   return NC_NOERR;
+#endif /* USE_PARALLEL */
+}
+
+static int
+nc4_put_vara_tc(int ncid, int varid, nc_type mem_type, int mem_type_is_long, 
+                const size_t *startp, const size_t *countp, const void *op)
+{
+   NC_FILE_INFO_T *nc;
+
+   LOG((2, "nc4_put_vara_tc: ncid 0x%x varid %d mem_type %d mem_type_is_long %d", 
+        ncid, varid, mem_type, mem_type_is_long));
+
+   if (!(nc = nc4_find_nc_file(ncid)))
+      return NC_EBADID;
+   
+#ifdef USE_PNETCDF
+   /* Handle files opened/created with the parallel-netcdf library. */
+   if (nc->pnetcdf_file)
+   {
+      MPI_Offset mpi_start[NC_MAX_DIMS], mpi_count[NC_MAX_DIMS];
+      int d;
+
+      /* No NC_LONGs for parallel-netcdf library! */
+      if (mem_type_is_long)
+	 return NC_EINVAL;
+      
+      /* We must convert the start, count, and stride arrays to
+       * MPI_Offset type. */
+      for (d = 0; d < nc->pnetcdf_ndims[varid]; d++)
+      {
+	 mpi_start[d] = startp[d];
+	 mpi_count[d] = countp[d];
+      }
+
+      if (nc->pnetcdf_access_mode == NC_INDEPENDENT)
+      {
+	 switch(mem_type)
+	 {
+	    case NC_BYTE:
+	       return ncmpi_put_vara_schar(nc->int_ncid, varid, mpi_start, mpi_count, op);
+	    case NC_UBYTE:
+	       return ncmpi_put_vara_uchar(nc->int_ncid, varid, mpi_start, mpi_count, op);
+	    case NC_CHAR:
+	       return ncmpi_put_vara_text(nc->int_ncid, varid, mpi_start, mpi_count, op);
+	    case NC_SHORT:
+	       return ncmpi_put_vara_short(nc->int_ncid, varid, mpi_start, mpi_count, op);
+	    case NC_INT:
+	       return ncmpi_put_vara_int(nc->int_ncid, varid, mpi_start, mpi_count, op);
+	    case NC_FLOAT:
+	       return ncmpi_put_vara_float(nc->int_ncid, varid, mpi_start, mpi_count, op);
+	    case NC_DOUBLE:
+	       return ncmpi_put_vara_double(nc->int_ncid, varid, mpi_start, mpi_count, op);
+	    case NC_NAT:
+	    default:
+	       return NC_EBADTYPE;
+	 }
+      } 
+      else
+      {
+	 switch(mem_type)
+	 {
+	    case NC_BYTE:
+	       return ncmpi_put_vara_schar_all(nc->int_ncid, varid, mpi_start, mpi_count, op);
+	    case NC_UBYTE:
+	       return ncmpi_put_vara_uchar_all(nc->int_ncid, varid, mpi_start, mpi_count, op);
+	    case NC_CHAR:
+	       return ncmpi_put_vara_text_all(nc->int_ncid, varid, mpi_start, mpi_count, op);
+	    case NC_SHORT:
+	       return ncmpi_put_vara_short_all(nc->int_ncid, varid, mpi_start, mpi_count, op);
+	    case NC_INT:
+	       return ncmpi_put_vara_int_all(nc->int_ncid, varid, mpi_start, mpi_count, op);
+	    case NC_FLOAT:
+	       return ncmpi_put_vara_float_all(nc->int_ncid, varid, mpi_start, mpi_count, op);
+	    case NC_DOUBLE:
+	       return ncmpi_put_vara_double_all(nc->int_ncid, varid, mpi_start, mpi_count, op);
+	    case NC_NAT:
+	    default:
+	       return NC_EBADTYPE;
+	 }
+      }
+   }
+#endif /* USE_PNETCDF */   
+   
+   /* NetCDF-3 cases handled by dispatch layer. */
+   assert(nc->nc4_info);
+
+   return nc4_put_vara(nc, ncid, varid, startp, countp, mem_type, 
+                       mem_type_is_long, (void *)op);
+}
+
+int 
+nc4_get_hdf4_vara(NC_FILE_INFO_T *nc, int ncid, int varid, const size_t *startp, 
+		  const size_t *countp, nc_type mem_nc_type, int is_long, void *data)
+{
+#ifdef USE_HDF4   
+   NC_GRP_INFO_T *grp, *g;
+   NC_HDF5_FILE_INFO_T *h5;
+   NC_VAR_INFO_T *var;
+   NC_DIM_INFO_T *dim;
+   int32 start32[NC_MAX_VAR_DIMS], edge32[NC_MAX_VAR_DIMS];
+   int retval, d;
+   
+   /* Find our metadata for this file, group, and var. */
+   assert(nc);
+   if ((retval = nc4_find_g_var_nc(nc, ncid, varid, &grp, &var)))
+      return retval;
+   h5 = nc->nc4_info;
+   assert(grp && h5 && var && var->name);
+   
+   for (d = 0; d < var->ndims; d++)
+   {
+      start32[d] = startp[d];
+      edge32[d] = countp[d];
+   }
+   
+   if (SDreaddata(var->sdsid, start32, NULL, edge32, data))
+      return NC_EHDFERR;
+
+#endif /* USE_HDF4 */
+   return NC_NOERR;
+}
+
+/* Get an array. */
+static int
+nc4_get_vara_tc(int ncid, int varid, nc_type mem_type, int mem_type_is_long,
+                const size_t *startp, const size_t *countp, void *ip)
+{
+   NC_FILE_INFO_T *nc;
+
+   LOG((2, "nc4_get_vara_tc: ncid 0x%x varid %d mem_type %d mem_type_is_long %d", 
+        ncid, varid, mem_type, mem_type_is_long));
+
+   if (!(nc = nc4_find_nc_file(ncid)))
+      return NC_EBADID;
+   
+#ifdef USE_PNETCDF
+   /* Handle files opened/created with the parallel-netcdf library. */
+   if (nc->pnetcdf_file)
+   {
+      MPI_Offset mpi_start[NC_MAX_VAR_DIMS], mpi_count[NC_MAX_VAR_DIMS];
+      int d;
+
+      /* No NC_LONGs for parallel-netcdf library! */
+      if (mem_type_is_long)
+	 return NC_EINVAL;
+      
+      /* We must convert the start, count, and stride arrays to
+       * MPI_Offset type. */
+      for (d = 0; d < nc->pnetcdf_ndims[varid]; d++)
+      {
+	 mpi_start[d] = startp[d];
+	 mpi_count[d] = countp[d];
+      }
+
+      if (nc->pnetcdf_access_mode == NC_INDEPENDENT)
+      {
+	 switch(mem_type)
+	 {
+	    case NC_BYTE:
+	       return ncmpi_get_vara_schar(nc->int_ncid, varid, mpi_start, mpi_count, ip);
+	    case NC_UBYTE:
+	       return ncmpi_get_vara_uchar(nc->int_ncid, varid, mpi_start, mpi_count, ip);
+	    case NC_CHAR:
+	       return ncmpi_get_vara_text(nc->int_ncid, varid, mpi_start, mpi_count, ip);
+	    case NC_SHORT:
+	       return ncmpi_get_vara_short(nc->int_ncid, varid, mpi_start, mpi_count, ip);
+	    case NC_INT:
+	       return ncmpi_get_vara_int(nc->int_ncid, varid, mpi_start, mpi_count, ip);
+	    case NC_FLOAT:
+	       return ncmpi_get_vara_float(nc->int_ncid, varid, mpi_start, mpi_count, ip);
+	    case NC_DOUBLE:
+	       return ncmpi_get_vara_double(nc->int_ncid, varid, mpi_start, mpi_count, ip);
+	    case NC_NAT:
+	    default:
+	       return NC_EBADTYPE;
+	 }
+      } 
+      else
+      {
+	 switch(mem_type)
+	 {
+	    case NC_BYTE:
+	       return ncmpi_get_vara_schar_all(nc->int_ncid, varid, mpi_start, mpi_count, ip);
+	    case NC_UBYTE:
+	       return ncmpi_get_vara_uchar_all(nc->int_ncid, varid, mpi_start, mpi_count, ip);
+	    case NC_CHAR:
+	       return ncmpi_get_vara_text_all(nc->int_ncid, varid, mpi_start, mpi_count, ip);
+	    case NC_SHORT:
+	       return ncmpi_get_vara_short_all(nc->int_ncid, varid, mpi_start, mpi_count, ip);
+	    case NC_INT:
+	       return ncmpi_get_vara_int_all(nc->int_ncid, varid, mpi_start, mpi_count, ip);
+	    case NC_FLOAT:
+	       return ncmpi_get_vara_float_all(nc->int_ncid, varid, mpi_start, mpi_count, ip);
+	    case NC_DOUBLE:
+	       return ncmpi_get_vara_double_all(nc->int_ncid, varid, mpi_start, mpi_count, ip);
+	    case NC_NAT:
+	    default:
+	       return NC_EBADTYPE;
+	 }
+      }
+   }
+#endif /* USE_PNETCDF */   
+   
+   /* Handle netCDF-3 cases. */
+   assert(nc->nc4_info);
+
+   /* Handle HDF4 cases. */
+   if (nc->nc4_info->hdf4)
+      return nc4_get_hdf4_vara(nc, ncid, varid, startp, countp, mem_type, 
+			       mem_type_is_long, (void *)ip);
+   
+   /* Handle HDF5 cases. */
+   return nc4_get_vara(nc, ncid, varid, startp, countp, mem_type, 
+                       mem_type_is_long, (void *)ip);
+}
+
+int
+NC4_put_vara(int ncid, int varid, const size_t *startp, 
+            const size_t *countp, const void *op, int memtype)
+{
+   return nc4_put_vara_tc(ncid, varid, memtype, 0, startp, countp, op);
+}
+
+
+/* Read an array of values. */
+int
+NC4_get_vara(int ncid, int varid, const size_t *startp, 
+            const size_t *countp, void *ip, int memtype)
+{
+   return nc4_get_vara_tc(ncid, varid, memtype, 0, startp, countp, ip);
+}
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/src_netcdf4/nc_logging.h
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/src_netcdf4/nc_logging.h	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/src_netcdf4/nc_logging.h	(revision 1749)
@@ -0,0 +1,62 @@
+/* Copyright 2010, University Corporation for Atmospheric Research. See
+   COPYRIGHT file for copying and redistribution conditions.
+
+   This file is part of netcdf-4, a netCDF-like interface for HDF5, or
+   a HDF5 backend for netCDF, depending on your point of view.
+
+   This file contains macros and prototyes relating to logging.
+
+   $Id: nc_logging.h,v 1.1 2010/06/01 15:34:49 ed Exp $
+*/
+
+#ifndef _NCLOGGING_
+#define _NCLOGGING_
+
+#include <stdlib.h>
+#include <assert.h>
+
+#ifdef LOGGING
+
+/* To log something... */
+void nc_log(int severity, const char *fmt, ...);
+void nc_log_hdf5(void);
+
+#define LOG(e) nc_log e
+
+/* To log based on error code, and set retval. */
+#define BAIL2(e) do { \
+retval = e; \
+LOG((0, "file %s, line %d.\n%s", __FILE__, __LINE__, nc_strerror(e))); \
+nc_log_hdf5(); \
+} while (0) 
+
+/* To log an error message, set retval, and jump to exit. */
+#define BAIL(e) do { \
+BAIL2(e); \
+goto exit; \
+} while (0) 
+
+/* To set retval and jump to exit, without logging error message. */
+#define BAIL_QUIET(e) do { \
+retval = e; \
+goto exit; \
+} while (0) 
+
+#else
+
+/* These definitions will be used unless LOGGING is defined. */
+#define LOG(e)
+#define BAIL(e) do { \
+retval = e; \
+goto exit; \
+} while (0)
+#define BAIL_QUIET BAIL
+#define BAIL2(e) do { \
+goto exit; \
+} while (0)
+#define nc_set_log_level(e)
+#endif
+
+#endif /* _NCLOGGING_ */
+
+
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/src_netcdf4/nc_tests.h
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/src_netcdf4/nc_tests.h	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/src_netcdf4/nc_tests.h	(revision 1749)
@@ -0,0 +1,37 @@
+/** \internal
+\file
+Common includes, defines, etc., for test code in the libsrc4 and
+nc_test4 directories.
+
+This is part of the netCDF package. Copyright 2005 University
+Corporation for Atmospheric Research/Unidata. See \ref copyright file
+for conditions of use.
+*/
+
+#ifndef _NC_TESTS_H
+#define _NC_TESTS_H
+
+#include <config.h>
+#include <assert.h>
+#include <stdio.h>
+#include <string.h>
+#include <stdlib.h>
+#ifdef USE_PARALLEL
+#include "netcdf_par.h"
+#endif
+#include "netcdf.h"
+#include "err_macros.h"
+
+/** Useful define for tests. */
+/** \{ */
+#define MEGABYTE 1048576
+#define HALF_MEG (MEGABYTE/2)
+#define MILLION 1000000
+#define SIXTEEN_MEG 16777216
+#define FOUR_MEG (SIXTEEN_MEG/4)
+#define THIRTY_TWO_MEG (SIXTEEN_MEG * 2)
+#define SIXTY_FOUR_MEG (SIXTEEN_MEG * 4)
+#define ONE_TWENTY_EIGHT_MEG (SIXTEEN_MEG * 8)
+/** \} */
+
+#endif /* _NC_TESTS_H */
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/src_netcdf4/nc_uri.c
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/src_netcdf4/nc_uri.c	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/src_netcdf4/nc_uri.c	(revision 1749)
@@ -0,0 +1,466 @@
+/*********************************************************************
+ *   Copyright 2010, UCAR/Unidata
+ *   See netcdf/COPYRIGHT file for copying and redistribution conditions.
+ *   $Header$
+ *********************************************************************/
+
+#include "config.h"
+
+#include <stdlib.h>
+#include <string.h>
+#include <stdio.h>
+
+#include "nc_uri.h"
+
+#define NC_URIDEBUG
+
+#define LBRACKET '['
+#define RBRACKET ']'
+
+#ifndef FIX
+#define FIX(s) ((s)==NULL?"":(s))
+#endif
+
+#ifndef NILLEN
+#define NILLEN(s) ((s)==NULL?0:strlen(s))
+#endif
+
+
+static char* legalprotocols[] = {
+"file:",
+"http:",
+"https:",
+"ftp:",
+NULL /* NULL terminate*/
+};
+
+static void nc_paramfree(char** params);
+static int nc_find(char** params, const char* key);
+
+/* Do a simple uri parse: return 0 if fail, 1 otherwise*/
+int
+nc_uriparse(const char* uri0, NC_URI** nc_urip)
+{
+    NC_URI* nc_uri = NULL;
+    char* uri;
+    char** pp;
+    char* p;
+    char* p1;
+    int c;
+
+    /* accumulate parse points*/
+    char* protocol = NULL;
+    char* params = NULL;
+    char* host = NULL;
+    char* port = NULL;
+    char* constraint = NULL;
+    char* user = NULL;
+    char* pwd = NULL;
+    char* file = NULL;
+
+    nc_uri = (NC_URI*)calloc(1,sizeof(NC_URI));
+    if(nc_uri == NULL) return 0;    
+
+    /* Temporary hack to remove escape characters inserted by Windows or MinGW */
+    if(strchr(uri0,'\\') != NULL) {    
+	char* u = strdup(uri0);
+	if(u == NULL) return 0;
+        p = u;
+	p1 = u;
+        while((c=*p1++)) {if(c != '\\') *p++ = c;}
+	uri0 = (const char*)u;
+    }
+
+    /* make local copy of uri */
+    uri = strdup(uri0);
+
+    /* remove all whitespace*/
+    p = uri;
+    p1 = uri;
+    while((c=*p1++)) {if(c != ' ' && c != '\t') *p++ = c;}
+
+    p = uri;
+
+    /* break up the uri string into pieces*/
+
+    /* 1. leading bracketed parameters */
+    if(*p == LBRACKET) {
+	params = p+1;
+	/* find end of the clientparams*/
+        for(;*p;p++) {if(p[0] == RBRACKET && p[1] != LBRACKET) break;}
+	if(*p == 0) goto fail; /* malformed client params*/
+	*p = '\0'; /* leave off the trailing rbracket for now */
+	p++; /* move past the params*/
+    }
+
+    /* verify that the uri starts with an acceptable protocol*/
+    for(pp=legalprotocols;*pp;pp++) {
+        if(strncmp(p,*pp,strlen(*pp))==0) break;
+    }
+    if(*pp == NULL) goto fail; /* illegal protocol*/
+    /* save the protocol */
+    protocol = *pp;
+
+    /* 4. skip protocol */
+    p += strlen(protocol);
+
+    /* 5. skip // */
+    if(*p != '/' && *(p+1) != '/')
+	goto fail;
+    p += 2;
+
+    /* 6. Mark the end of the host section */
+    file = strchr(p,'/');
+    if(file) {
+	*file++ = '\0'; /* warning: we just overwrote the leading / */
+    } else
+	goto fail; /* url only has host part, no path */
+
+    /* 7. extract any user:pwd */
+    p1 = strchr(p,'@');
+    if(p1) {/* Assume we have user:pwd@ */
+	*p1 = '\0';
+	user = p;
+	pwd = strchr(p,':');
+	if(!pwd) goto fail; /* malformed */
+	*pwd++ = '\0';
+	p = pwd+strlen(pwd)+1;
+    }
+
+    /* 8. extract host and port */
+    host = p;
+    port = strchr(p,':');
+    if(port) {
+	*port++ = '\0';
+    }
+
+    /* 9. Look for '?' */
+    constraint = strchr(file,'?');
+    if(constraint) {
+	*constraint++ = '\0';
+    }
+
+    /* assemble the component pieces*/
+    if(uri0 && strlen(uri0) > 0)
+        nc_uri->uri = strdup(uri0);
+    if(protocol && strlen(protocol) > 0) {
+        nc_uri->protocol = strdup(protocol);
+        /* remove trailing ':' */
+        nc_uri->protocol[strlen(protocol)-1] = '\0';
+    }
+    if(user && strlen(user) > 0)
+        nc_uri->user = strdup(user);
+    if(pwd && strlen(pwd) > 0)
+        nc_uri->password = strdup(pwd);
+    if(host && strlen(host) > 0)
+        nc_uri->host = strdup(host);
+    if(port && strlen(port) > 0)
+        nc_uri->port = strdup(port);
+    if(file && strlen(file) > 0) {
+	/* Add back the leading / */
+        nc_uri->file = malloc(strlen(file)+2);
+	strcpy(nc_uri->file,"/");
+        strcat(nc_uri->file,file);
+    }
+    if(constraint && strlen(constraint) > 0)
+        nc_uri->constraint = strdup(constraint);
+    nc_urisetconstraints(nc_uri,constraint);
+    if(params != NULL && strlen(params) > 0) {
+        nc_uri->params = (char*)malloc(1+2+strlen(params));
+        strcpy(nc_uri->params,"[");
+        strcat(nc_uri->params,params);
+        strcat(nc_uri->params,"]");
+    }
+
+#ifdef NC_XDEBUG
+	{
+        fprintf(stderr,"nc_uri:");
+        fprintf(stderr," params=|%s|",FIX(nc_uri->params));
+        fprintf(stderr," protocol=|%s|",FIX(nc_uri->protocol));
+        fprintf(stderr," host=|%s|",FIX(nc_uri->host));
+        fprintf(stderr," port=|%s|",FIX(nc_uri->port));
+        fprintf(stderr," file=|%s|",FIX(nc_uri->file));
+        fprintf(stderr," constraint=|%s|",FIX(nc_uri->constraint));
+        fprintf(stderr,"\n");
+    }
+#endif
+    free(uri);
+    if(nc_urip != NULL) *nc_urip = nc_uri;
+    return 1;
+
+fail:
+    if(nc_uri) nc_urifree(nc_uri);
+    if(uri != NULL) free(uri);
+    return 0;
+}
+
+void
+nc_urifree(NC_URI* nc_uri)
+{
+    if(nc_uri == NULL) return;
+    if(nc_uri->uri != NULL) {free(nc_uri->uri);}
+    if(nc_uri->protocol != NULL) {free(nc_uri->protocol);}
+    if(nc_uri->user != NULL) {free(nc_uri->user);}
+    if(nc_uri->password != NULL) {free(nc_uri->password);}
+    if(nc_uri->host != NULL) {free(nc_uri->host);}
+    if(nc_uri->port != NULL) {free(nc_uri->port);}
+    if(nc_uri->file != NULL) {free(nc_uri->file);}
+    if(nc_uri->constraint != NULL) {free(nc_uri->constraint);}
+    if(nc_uri->projection != NULL) {free(nc_uri->projection);}
+    if(nc_uri->selection != NULL) {free(nc_uri->selection);}
+    if(nc_uri->params != NULL) {free(nc_uri->params);}
+    if(nc_uri->paramlist != NULL) nc_paramfree(nc_uri->paramlist);
+    free(nc_uri);
+}
+
+/* Replace the constraints */
+void
+nc_urisetconstraints(NC_URI* duri,const char* constraints)
+{
+    char* proj = NULL;
+    char* select = NULL;
+    const char* p;
+
+    if(duri->constraint == NULL) free(duri->constraint);
+    if(duri->projection != NULL) free(duri->projection);
+    if(duri->selection != NULL) free(duri->selection);
+    duri->constraint = NULL;	
+    duri->projection = NULL;	
+    duri->selection = NULL;
+
+    if(constraints == NULL || strlen(constraints)==0) return;
+
+    duri->constraint = strdup(constraints);
+    if(*duri->constraint == '?')
+	strcpy(duri->constraint,duri->constraint+1);
+
+    p = duri->constraint;
+    proj = (char*) p;
+    select = strchr(proj,'&');
+    if(select != NULL) {
+        size_t plen = (select - proj);
+	if(plen == 0) {
+	    proj = NULL;
+	} else {
+	    proj = (char*)malloc(plen+1);
+	    memcpy((void*)proj,p,plen);
+	    proj[plen] = '\0';
+	}
+	select = nulldup(select);
+    } else {
+	proj = nulldup(proj);
+	select = NULL;
+    }
+    duri->projection = proj;
+    duri->selection = select;
+}
+
+
+/* Construct a complete NC_ URI without the client params
+   and optionally with the constraints;
+   caller frees returned string
+*/
+
+char*
+nc_uribuild(NC_URI* duri, const char* prefix, const char* suffix, int pieces)
+{
+    size_t len = 0;
+    char* newuri;
+    int withparams = ((pieces&NC_URIPARAMS)
+			&& duri->params != NULL);
+    int withuserpwd = ((pieces&NC_URIUSERPWD)
+	               && duri->user != NULL && duri->password != NULL);
+    int withconstraints = ((pieces&NC_URICONSTRAINTS)
+	                   && duri->constraint != NULL);
+
+    if(prefix != NULL) len += NILLEN(prefix);
+    if(withparams) {
+	len += NILLEN(duri->params);
+    }
+    len += (NILLEN(duri->protocol)+NILLEN("://"));
+    if(withuserpwd) {
+	len += (NILLEN(duri->user)+NILLEN(duri->password)+NILLEN(":@"));
+    }
+    len += (NILLEN(duri->host));
+    if(duri->port != NULL) {
+	len += (NILLEN(":")+NILLEN(duri->port));
+    }
+    len += (NILLEN(duri->file));
+    if(suffix != NULL) len += NILLEN(suffix);
+    if(withconstraints) {
+	len += (NILLEN("?")+NILLEN(duri->constraint));
+    }
+    len += 1; /* null terminator */
+    
+    newuri = (char*)malloc(len);
+    if(!newuri) return NULL;
+
+    newuri[0] = '\0';
+    if(prefix != NULL) strcat(newuri,prefix);
+    if(withparams) {
+	strcat(newuri,duri->params);
+    }
+    strcat(newuri,duri->protocol);
+    strcat(newuri,"://");
+    if(withuserpwd) {
+        strcat(newuri,duri->user);
+        strcat(newuri,":");
+        strcat(newuri,duri->password);	
+        strcat(newuri,"@");
+    }
+    if(duri->host != NULL) { /* may be null if using file: protocol */
+        strcat(newuri,duri->host);	
+    }
+    if(duri->port != NULL) {
+        strcat(newuri,":");
+        strcat(newuri,duri->port);
+    }
+    strcat(newuri,duri->file);
+    if(suffix != NULL) strcat(newuri,suffix);
+    if(withconstraints) {
+	strcat(newuri,"?");
+	strcat(newuri,duri->constraint);
+    }
+    return newuri;
+}
+
+/**************************************************/
+/* Parameter support */
+
+/*
+Client parameters are assumed to be
+one or more instances of bracketed pairs:
+e.g "[...][...]...".
+The bracket content in turn is assumed to be a
+comma separated list of <name>=<value> pairs.
+e.g. x=y,z=,a=b.
+If the same parameter is specifed more than once,
+then the first occurrence is used; this is so that
+is possible to forcibly override user specified
+parameters by prefixing.
+IMPORTANT: client parameter string is assumed to
+have blanks compress out.
+Returns 1 if parse suceeded, 0 otherwise;
+*/
+
+int
+nc_uridecodeparams(NC_URI* nc_uri)
+{
+    char* cp;
+    char* cq;
+    int c;
+    int i;
+    int nparams;
+    char* params0;
+    char* params;
+    char* params1;
+    char** plist;
+
+    if(nc_uri == NULL) return 0;
+    if(nc_uri->params == NULL) return 1;
+
+    params0 = nc_uri->params;
+
+    /* Pass 1 to replace beginning '[' and ending ']' */
+    if(params0[0] == '[') 
+	params = strdup(params0+1);
+    else
+	params = strdup(params0);	
+
+    if(params[strlen(params)-1] == ']')
+	params[strlen(params)-1] = '\0';
+
+    /* Pass 2 to replace "][" pairs with ','*/
+    params1 = strdup(params);
+    cp=params; cq = params1;
+    while((c=*cp++)) {
+	if(c == RBRACKET && *cp == LBRACKET) {cp++; c = ',';}
+	*cq++ = c;
+    }
+    *cq = '\0';
+    free(params);
+    params = params1;
+
+    /* Pass 3 to break string into pieces and count # of pairs */
+    nparams=0;
+    for(cp=params;(c=*cp);cp++) {
+	if(c == ',') {*cp = '\0'; nparams++;}
+    }
+    nparams++; /* for last one */
+
+    /* plist is an env style list */
+    plist = (char**)calloc(1,sizeof(char*)*(2*nparams+1)); /* +1 for null termination */
+
+    /* Pass 4 to break up each pass into a (name,value) pair*/
+    /* and insert into the param list */
+    /* parameters of the form name name= are converted to name=""*/
+    cp = params;
+    for(i=0;i<nparams;i++) {
+	char* next = cp+strlen(cp)+1; /* save ptr to next pair*/
+	char* vp;
+	/*break up the ith param*/
+	vp = strchr(cp,'=');
+	if(vp != NULL) {*vp = '\0'; vp++;} else {vp = "";}
+	plist[2*i] = strdup(cp);	
+	plist[2*i+1] = strdup(vp);
+	cp = next;
+    }
+    plist[2*nparams] = NULL;
+    free(params);
+    if(nc_uri->paramlist != NULL)
+	nc_paramfree(nc_uri->paramlist);
+    nc_uri->paramlist = plist;
+    return 1;
+}
+
+int
+nc_urilookup(NC_URI* uri, const char* key, const char** resultp)
+{
+    int i;
+    char* value = NULL;
+    if(uri == NULL || key == NULL || uri->params == NULL) return 0;
+    if(uri->paramlist == NULL) {
+	i = nc_uridecodeparams(uri);
+	if(!i) return 0;
+    }
+    i = nc_find(uri->paramlist,key);
+    if(i < 0) return 0;
+    value = uri->paramlist[(2*i)+1];
+    if(resultp) *resultp = value;
+    return 1;
+}
+
+int
+nc_urisetparams(NC_URI* uri, const char* newparams)
+{
+    if(uri == NULL) return 0;
+    if(uri->paramlist != NULL) nc_paramfree(uri->paramlist);
+    uri->paramlist = NULL;
+    if(uri->params != NULL) free(uri->params);
+    uri->params = nulldup(newparams);
+    return 1;
+}
+
+/* Internal version of lookup; returns the paired index of the key */
+static int
+nc_find(char** params, const char* key)
+{
+    int i;
+    char** p;
+    for(i=0,p=params;*p;p+=2,i++) {
+	if(strcmp(key,*p)==0) return i;
+    }
+    return -1;
+}
+
+static void
+nc_paramfree(char** params)
+{
+    char** p;
+    if(params == NULL) return;
+    for(p=params;*p;p+=2) {
+	free(*p);
+	if(p[1] != NULL) free(p[1]);
+    }
+    free(params);
+}
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/src_netcdf4/nc_uri.h
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/src_netcdf4/nc_uri.h	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/src_netcdf4/nc_uri.h	(revision 1749)
@@ -0,0 +1,50 @@
+/* Copyright 2009, UCAR/Unidata and OPeNDAP, Inc.
+   See the COPYRIGHT file for more information. */
+
+#ifndef NC_URI_H
+#define NC_URI_H
+
+/*! This is an open structure meaning
+	it is ok to directly access its fields*/
+typedef struct NC_URI {
+    char* uri;        /* as passed by the caller */
+    char* protocol;
+    char* user; /* from user:password@ */
+    char* password; /* from user:password@ */
+    char* host;	      /*!< host*/
+    char* port;	      /*!< host */
+    char* file;	      /*!< file */
+    char* constraint; /*!< projection+selection */
+    char* projection; /*!< without leading '?'*/
+    char* selection;  /*!< with leading '&'*/
+    char* params;     /* all params */
+    char** paramlist;    /*!<null terminated list */
+} NC_URI;
+
+extern int nc_uriparse(const char* s, NC_URI** nc_uri);
+extern void nc_urifree(NC_URI* nc_uri);
+
+/* Replace the constraints */
+extern void nc_urisetconstraints(NC_URI*,const char* constraints);
+
+/* Construct a complete NC_ URI; caller frees returned string */
+
+/* Define flags to control what is included */
+#define NC_URICONSTRAINTS	1
+#define NC_URIUSERPWD	  	2
+#define NC_URIPARAMS	  	4
+#define NC_URIALL	  	(NC_URICONSTRAINTS|NC_URIUSERPWD|NC_URIPARAMS)
+
+extern char* nc_uribuild(NC_URI*,const char* prefix, const char* suffix, int flags);
+
+
+/* Param Management */
+extern int nc_uridecodeparams(NC_URI* nc_uri);
+extern int nc_urisetparams(NC_URI* nc_uri,const char*);
+
+/*! 0 result => entry not found; 1=>found; result holds value (may be null).
+    In any case, the result is imutable and should not be free'd.
+*/
+extern int nc_urilookup(NC_URI*, const char* param, const char** result);
+
+#endif /*NC_URI_H*/
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/src_netcdf4/ncaux.c
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/src_netcdf4/ncaux.c	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/src_netcdf4/ncaux.c	(revision 1749)
@@ -0,0 +1,390 @@
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * Copyright by The HDF Group.                                               *
+ * Copyright by the Board of Trustees of the University of Illinois.         *
+ * All rights reserved.                                                      *
+ *                                                                           *
+ * This file is part of HDF5.  The full HDF5 copyright notice, including     *
+ * terms governing use, modification, and redistribution, is contained in    *
+ * the files COPYING and Copyright.html.  COPYING can be found at the root   *
+ * of the source code distribution tree; Copyright.html can be found at the  *
+ * root level of an installed copy of the electronic HDF5 document set and   *
+ * is linked from the top-level documents page.  It can also be found at     *
+ * http://hdfgroup.org/HDF5/doc/Copyright.html.  If you do not have          *
+ * access to either file, you may request a copy from help@hdfgroup.org.     *
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+
+/*
+This code is a variant of the H5detect.c code from HDF5.
+Author: D. Heimbigner 10/7/2008
+*/
+
+#include <stdlib.h>
+#include <string.h>
+#include <assert.h>
+#include <netcdf.h>
+
+#include "ncaux.h"
+
+struct NCAUX_FIELD {
+    char* name;
+    nc_type fieldtype;
+    int ndims;
+    int dimsizes[NC_MAX_VAR_DIMS];    
+    size_t size;
+    size_t offset;
+    size_t alignment;
+};
+
+struct NCAUX_CMPD {
+    int ncid;
+    int mode;
+    char* name;
+    int nfields;
+    struct NCAUX_FIELD* fields;
+    size_t size;
+    size_t offset; /* cumulative as fields are added */
+    size_t alignment;
+};
+
+static int ncaux_initialized = 0;
+
+static void compute_alignments(void);
+static int computefieldinfo(struct NCAUX_CMPD* cmpd);
+
+int
+ncaux_begin_compound(int ncid, const char *name, int alignmode, void** tagp)
+{
+    int status = NC_NOERR;
+    struct NCAUX_CMPD* cmpd = NULL;
+
+    if(!ncaux_initialized) {
+	compute_alignments();
+	ncaux_initialized = 1;
+    }
+
+    if(tagp) *tagp = NULL;
+	
+    cmpd = (struct NCAUX_CMPD*)calloc(1,sizeof(struct NCAUX_CMPD));
+    if(cmpd == NULL) {status = NC_ENOMEM; goto fail;}
+    cmpd->ncid = ncid;
+    cmpd->mode = alignmode;
+    cmpd->nfields = 0;
+    cmpd->name = strdup(name);    
+    if(cmpd->name == NULL) {status = NC_ENOMEM; goto fail;}
+
+    if(tagp) *tagp = (void*)cmpd;
+
+    return status;
+
+fail:
+    ncaux_abort_compound((void*)cmpd);
+    return status;
+}
+
+int
+ncaux_abort_compound(void* tag)
+{
+    int i;
+    struct NCAUX_CMPD* cmpd = (struct NCAUX_CMPD*)tag;
+    if(cmpd == NULL) goto done;
+    if(cmpd->name) free(cmpd->name);
+    for(i=0;i<cmpd->nfields;i++) {
+	struct NCAUX_FIELD* field = &cmpd->fields[i];
+	if(field->name) free(field->name);
+    }
+    if(cmpd->fields) free(cmpd->fields);
+    free(cmpd);
+
+done:
+    return NC_NOERR;
+}
+
+int
+ncaux_add_field(void* tag,  const char *name, nc_type field_type,
+			   int ndims, const int* dimsizes)
+{
+    int i;
+    int status = NC_NOERR;
+    struct NCAUX_CMPD* cmpd = (struct NCAUX_CMPD*)tag;
+    struct NCAUX_FIELD* newfields = NULL;
+    struct NCAUX_FIELD* field = NULL;
+
+    if(cmpd == NULL) goto done;
+    if(ndims < 0) {status = NC_EINVAL; goto done;}
+    for(i=0;i<ndims;i++) {
+	if(dimsizes[i] <= 0) {status = NC_EINVAL; goto done;}
+    }
+    if(cmpd->fields == NULL) {
+        newfields = (struct NCAUX_FIELD*)calloc(1,sizeof(struct NCAUX_FIELD));
+    } else {
+        newfields = (struct NCAUX_FIELD*)realloc(cmpd->fields,cmpd->nfields+1*sizeof(struct NCAUX_FIELD));
+    }
+    if(cmpd->fields == NULL) {status = NC_ENOMEM; goto done;}
+    cmpd->fields = newfields;
+    field = &cmpd->fields[cmpd->nfields+1];
+    field->name = strdup(name);
+    field->fieldtype = field_type;
+    if(field->name == NULL) {status = NC_ENOMEM; goto done;}    
+    field->ndims = ndims;
+    memcpy(field->dimsizes,dimsizes,sizeof(int)*ndims);
+    cmpd->nfields++;
+
+done:
+    return status;
+}
+
+static size_t
+dimproduct(int ndims, int* dimsizes)
+{
+    int i;
+    size_t product = 1;
+    for(i=0;i<ndims;i++) product *= dimsizes[i];
+    return product;
+}
+
+int
+ncaux_end_compound(void* tag, nc_type* idp)
+{
+    int i;
+    int status = NC_NOERR;
+    struct NCAUX_CMPD* cmpd = (struct NCAUX_CMPD*)tag;
+
+    if(cmpd == NULL) {status = NC_EINVAL; goto done;}
+
+    /* Compute field and compound info */
+    status = computefieldinfo(cmpd);
+    if(status != NC_NOERR) goto done;
+
+    status = nc_def_compound(cmpd->ncid, cmpd->size, cmpd->name, idp);
+    if(status != NC_NOERR) goto done;
+
+    for(i=0;i<cmpd->nfields;i++) {
+	struct NCAUX_FIELD* field = &cmpd->fields[i];
+	if(field->ndims > 0) {
+            status = nc_insert_compound(cmpd->ncid, *idp, field->name,
+					field->offset, field->fieldtype);
+	} else {
+            status = nc_insert_array_compound(cmpd->ncid, *idp, field->name,
+					field->offset, field->fieldtype,
+					field->ndims,field->dimsizes);
+	}
+        if(status != NC_NOERR) goto done;
+    }
+
+done:
+    return status;
+}
+
+/**************************************************/
+
+/*
+The heart of this is the following macro,
+which computes the offset of a field x
+when preceded by a char field.
+The assumptions appear to be as follows:
+1. the offset produced in this situation indicates
+   the alignment for x relative in such a way that it
+   depends only on the types that precede it in the struct.
+2. the compiler does not reorder fields.
+3. arrays are tightly packed.
+4. nested structs are alignd according to their first member
+   (this actually follows from C language requirement that
+    a struct can legally be cast to an instance of its first member).
+Given the alignments for the various common primitive types,
+it is assumed that one can use them anywhere to construct
+the layout of a struct of such types.
+It seems to work for HDF5 for a wide variety of machines.
+*/
+
+#define COMP_ALIGNMENT(DST,TYPE)  {\
+    struct {char f1; TYPE x;} tmp; \
+    DST.typename = #TYPE ;        \
+    DST.alignment = (size_t)((char*)(&(tmp.x)) - (char*)(&tmp));}
+
+/* Define indices for every primitive C type */
+/* NAT => NOT-A-TYPE*/
+#define NATINDEX       0
+#define CHARINDEX      1
+#define UCHARINDEX     2
+#define SHORTINDEX     3
+#define USHORTINDEX    4
+#define INTINDEX       5
+#define UINTINDEX      6
+#define LONGINDEX      7
+#define ULONGINDEX     8
+#define LONGLONGINDEX  9
+#define ULONGLONGINDEX 10
+#define FLOATINDEX     11
+#define DOUBLEINDEX    12
+#define PTRINDEX       13
+#define NCVLENINDEX    14
+
+#define NCTYPES        15
+
+typedef struct Alignment {
+    char* typename;
+    int alignment;
+} Alignment;
+
+typedef Alignment Typealignvec;
+
+/* Capture in struct and in a vector*/
+typedef struct Typealignset {
+    Alignment charalign;	/* char*/
+    Alignment ucharalign;	/* unsigned char*/
+    Alignment shortalign;	/* short*/
+    Alignment ushortalign;	/* unsigned short*/
+    Alignment intalign;		/* int*/
+    Alignment uintalign;	/* unsigned int*/
+    Alignment longalign;	/* long*/
+    Alignment ulongalign;	/* unsigned long*/
+    Alignment longlongalign;	/* long long*/
+    Alignment ulonglongalign;	/* unsigned long long*/
+    Alignment floatalign;	/* float*/
+    Alignment doublealign;	/* double*/
+    Alignment ptralign;		/* void**/
+    Alignment ncvlenalign;	/* nc_vlen_t*/
+} Typealignset;
+
+static Typealignvec vec[NCTYPES];
+static Typealignset set;
+
+static void
+compute_alignments(void)
+{
+    /* Compute the alignments for all the common C data types*/
+    /* First for the struct*/
+    /* initialize*/
+    memset((void*)&set,0,sizeof(set));
+    memset((void*)vec,0,sizeof(vec));
+
+    COMP_ALIGNMENT(set.charalign,char);
+    COMP_ALIGNMENT(set.ucharalign,unsigned char);
+    COMP_ALIGNMENT(set.shortalign,short);
+    COMP_ALIGNMENT(set.ushortalign,unsigned short);
+    COMP_ALIGNMENT(set.intalign,int);
+    COMP_ALIGNMENT(set.uintalign,unsigned int);
+    COMP_ALIGNMENT(set.longalign,long);
+    COMP_ALIGNMENT(set.ulongalign,unsigned long);
+    COMP_ALIGNMENT(set.longlongalign,long long);
+    COMP_ALIGNMENT(set.ulonglongalign,unsigned long long);
+    COMP_ALIGNMENT(set.floatalign,float);
+    COMP_ALIGNMENT(set.doublealign,double);
+    COMP_ALIGNMENT(set.ptralign,void*);
+    COMP_ALIGNMENT(set.ncvlenalign,nc_vlen_t);
+
+    /* Then the vector*/
+    COMP_ALIGNMENT(vec[CHARINDEX],char);
+    COMP_ALIGNMENT(vec[UCHARINDEX],unsigned char); 
+    COMP_ALIGNMENT(vec[SHORTINDEX],short);
+    COMP_ALIGNMENT(vec[USHORTINDEX],unsigned short);
+    COMP_ALIGNMENT(vec[INTINDEX],int);
+    COMP_ALIGNMENT(vec[UINTINDEX],unsigned int);
+    COMP_ALIGNMENT(vec[LONGINDEX],long);
+    COMP_ALIGNMENT(vec[ULONGINDEX],unsigned long);
+    COMP_ALIGNMENT(vec[LONGLONGINDEX],long long);
+    COMP_ALIGNMENT(vec[ULONGLONGINDEX],unsigned long long);
+    COMP_ALIGNMENT(vec[FLOATINDEX],float);
+    COMP_ALIGNMENT(vec[DOUBLEINDEX],double);
+    COMP_ALIGNMENT(vec[PTRINDEX],void*);
+    COMP_ALIGNMENT(vec[NCVLENINDEX],nc_vlen_t);
+}
+
+static size_t
+nctypealignment(nc_type nctype)
+{
+    Alignment* align = NULL;
+    int index = 0;
+    switch (nctype) {
+      case NC_BYTE: index = UCHARINDEX; break;
+      case NC_CHAR: index = CHARINDEX; break;
+      case NC_SHORT: index = SHORTINDEX; break;
+      case NC_INT: index = INTINDEX; break;
+      case NC_FLOAT: index = FLOATINDEX; break;
+      case NC_DOUBLE: index = DOUBLEINDEX; break;
+      case NC_UBYTE: index = UCHARINDEX; break;
+      case NC_USHORT: index = USHORTINDEX; break;
+      case NC_UINT: index = UINTINDEX; break;
+      case NC_INT64: index = LONGLONGINDEX; break;
+      case NC_UINT64: index = ULONGLONGINDEX; break;
+      case NC_STRING: index = PTRINDEX; break;
+      case NC_VLEN: index = NCVLENINDEX; break;
+      case NC_OPAQUE: index = UCHARINDEX; break;
+      default: assert(0);
+    }
+    align = &vec[index];
+    return align->alignment;
+}
+
+static int
+getpadding(int offset, int alignment)
+{
+    int rem = (alignment==0?0:(offset % alignment));
+    int pad = (rem==0?0:(alignment - rem));
+    return pad;
+}
+
+/* Find first primitive field of a possibly nested sequence of compounds */
+static nc_type
+findfirstfield(int ncid, nc_type xtype)
+{
+    int status = NC_NOERR;
+    nc_type fieldtype = xtype;
+    if(xtype <= NC_MAX_ATOMIC_TYPE) goto done;
+        
+    status = nc_inq_compound_fieldtype(ncid, xtype, 0, &fieldtype);
+    if(status != NC_NOERR) goto done;
+    fieldtype = findfirstfield(ncid,fieldtype);
+
+done:
+    return (status == NC_NOERR?fieldtype:NC_NAT);
+}
+
+static int
+computefieldinfo(struct NCAUX_CMPD* cmpd)
+{
+    int i;
+    int status = NC_NOERR;
+    size_t offset = 0;
+    size_t totaldimsize;
+
+    /* Assign the sizes for the fields */
+    for(i=0;i<cmpd->nfields;i++) {
+	struct NCAUX_FIELD* field = &cmpd->fields[i];	
+	status = nc_inq_type(cmpd->ncid,field->fieldtype,NULL,&field->size);
+        if(status != NC_NOERR) goto done;
+	totaldimsize = dimproduct(field->ndims,field->dimsizes);
+	field->size *= totaldimsize;
+    }
+
+    for(offset=0,i=0;i<cmpd->nfields;i++) {
+        struct NCAUX_FIELD* field = &cmpd->fields[i];
+	int alignment = 0;
+	nc_type firsttype = findfirstfield(cmpd->ncid,field->fieldtype);
+
+        /* only support 'c' alignment for now*/
+	switch (field->fieldtype) {
+	case NC_OPAQUE:
+	    field->alignment = 1;
+	    break;
+	case NC_ENUM:
+            field->alignment = nctypealignment(firsttype);
+	    break;	
+	case NC_VLEN: /*fall thru*/
+	case NC_COMPOUND:
+            field->alignment = nctypealignment(firsttype);
+	    break;
+	default:
+            field->alignment = nctypealignment(field->fieldtype);
+	    break;
+	}
+        offset += getpadding(offset,alignment);
+        field->offset = offset;
+        offset += field->size;
+    }
+    cmpd->size = offset;
+    cmpd->alignment = cmpd->fields[0].alignment;
+
+done:
+    return status;
+}
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/src_netcdf4/ncaux.h
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/src_netcdf4/ncaux.h	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/src_netcdf4/ncaux.h	(revision 1749)
@@ -0,0 +1,25 @@
+/*********************************************************************
+ *   Copyright 2010, UCAR/Unidata
+ *   See netcdf/COPYRIGHT file for copying and redistribution conditions.
+ *   $Id$
+ *   $Header$
+ *********************************************************************/
+
+#ifndef NCAUX_H
+#define NCAUX_H
+
+#define NCAUX_ALIGN_C 0
+#define NCAUX_ALIGN_UNIFORM 1
+
+extern int ncaux_begin_compound(int ncid, const char *name, int alignmode,
+				void** tag);
+
+extern int ncaux_end_compound(void* tag, nc_type* typeid);
+
+extern int ncaux_abort_compound(void* tag);
+
+extern int ncaux_add_field(void* tag,  const char *name, nc_type field_type,
+			   int ndims, const int* dimsizes);
+
+#endif /*NCAUX_H*/
+
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/src_netcdf4/ncbytes.c
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/src_netcdf4/ncbytes.c	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/src_netcdf4/ncbytes.c	(revision 1749)
@@ -0,0 +1,191 @@
+/* Copyright 2009, UCAR/Unidata and OPeNDAP, Inc.
+   See the COPYRIGHT file for more information. */
+
+#include <stdlib.h>
+#include <stdio.h>
+#include <string.h>
+
+#include "ncbytes.h"
+
+#ifndef TRUE
+#define TRUE 1
+#endif
+#ifndef FALSE
+#define FALSE 0
+#endif
+
+#define DEFAULTALLOC 1024
+#define ALLOCINCR 1024
+
+static int ncbytesdebug = 1;
+
+static long
+ncbytesfail(void)
+{
+    fflush(stdout);
+    fprintf(stderr,"bytebuffer failure\n");
+    fflush(stderr);
+    if(ncbytesdebug) abort();
+    return FALSE;
+}
+
+NCbytes*
+ncbytesnew(void)
+{
+  NCbytes* bb = (NCbytes*)malloc(sizeof(NCbytes));
+  if(bb == NULL) return (NCbytes*)ncbytesfail();
+  bb->alloc=0;
+  bb->length=0;
+  bb->content=NULL;
+  bb->nonextendible = 0;
+  return bb;
+}
+
+int
+ncbytessetalloc(NCbytes* bb, unsigned int sz)
+{
+  char* newcontent;
+  if(bb == NULL) return ncbytesfail();
+  if(sz <= 0) {sz = (bb->alloc?2*bb->alloc:DEFAULTALLOC);}
+  if(bb->alloc >= sz) return TRUE;
+  if(bb->nonextendible) return ncbytesfail();
+  newcontent=(char*)calloc(sz,sizeof(char));
+  if(bb->alloc > 0 && bb->length > 0 && bb->content != NULL) {
+    memcpy((void*)newcontent,(void*)bb->content,sizeof(char)*bb->length);
+  }
+  if(bb->content != NULL) free(bb->content);
+  bb->content=newcontent;
+  bb->alloc=sz;
+  return TRUE;
+}
+
+void
+ncbytesfree(NCbytes* bb)
+{
+  if(bb == NULL) return;
+  if(!bb->nonextendible && bb->content != NULL) free(bb->content);
+  free(bb);
+}
+
+int
+ncbytessetlength(NCbytes* bb, unsigned int sz)
+{
+  if(bb == NULL) return ncbytesfail();
+  if(sz > bb->alloc) {if(!ncbytessetalloc(bb,sz)) return ncbytesfail();}
+  bb->length = sz;
+  return TRUE;
+}
+
+int
+ncbytesfill(NCbytes* bb, char fill)
+{
+  unsigned int i;
+  if(bb == NULL) return ncbytesfail();
+  for(i=0;i<bb->length;i++) bb->content[i] = fill;
+  return TRUE;
+}
+
+int
+ncbytesget(NCbytes* bb, unsigned int index)
+{
+  if(bb == NULL) return -1;
+  if(index >= bb->length) return -1;
+  return bb->content[index];
+}
+
+int
+ncbytesset(NCbytes* bb, unsigned int index, char elem)
+{
+  if(bb == NULL) return ncbytesfail();
+  if(index >= bb->length) return ncbytesfail();
+  bb->content[index] = elem;
+  return TRUE;
+}
+
+int
+ncbytesappend(NCbytes* bb, char elem)
+{
+  if(bb == NULL) return ncbytesfail();
+  if(bb->length >= bb->alloc) if(!ncbytessetalloc(bb,0)) return ncbytesfail();
+  bb->content[bb->length] = elem;
+  bb->length++;
+  return TRUE;
+}
+
+/* This assumes s is a null terminated string*/
+int
+ncbytescat(NCbytes* bb, char* s)
+{
+    ncbytesappendn(bb,(void*)s,strlen(s)+1); /* include trailing null*/
+    /* back up over the trailing null*/
+    if(bb->length == 0) return ncbytesfail();
+    bb->length--;
+    return 1;
+}
+
+int
+ncbytesappendn(NCbytes* bb, void* elem, unsigned int n)
+{
+  if(bb == NULL || elem == NULL) return ncbytesfail();
+  if(n == 0) {n = strlen((char*)elem);}
+  while(!ncbytesavail(bb,n)) {if(!ncbytessetalloc(bb,0)) return ncbytesfail();}
+  memcpy((void*)&bb->content[bb->length],(void*)elem,n);
+  bb->length += n;
+  return TRUE;
+}
+
+int
+ncbytesprepend(NCbytes* bb, char elem)
+{
+  int i; /* do not make unsigned */
+  if(bb == NULL) return ncbytesfail();
+  if(bb->length >= bb->alloc) if(!ncbytessetalloc(bb,0)) return ncbytesfail();
+  /* could we trust memcpy? instead */
+  for(i=bb->alloc;i>=1;i--) {bb->content[i]=bb->content[i-1];}
+  bb->content[0] = elem;
+  bb->length++;
+  return TRUE;
+}
+
+char*
+ncbytesdup(NCbytes* bb)
+{
+    char* result = (char*)malloc(bb->length+1);
+    memcpy((void*)result,(const void*)bb->content,bb->length);
+    result[bb->length] = '\0'; /* just in case it is a string*/
+    return result;
+}
+
+char*
+ncbytesextract(NCbytes* bb)
+{
+    char* result = bb->content;
+    bb->alloc = 0;
+    bb->length = 0;
+    bb->content = NULL;
+    return result;
+}
+
+int
+ncbytessetcontents(NCbytes* bb, char* contents, unsigned int alloc)
+{
+    if(bb == NULL) return ncbytesfail();
+    ncbytesclear(bb);
+    if(!bb->nonextendible && bb->content != NULL) free(bb->content);
+    bb->content = contents;
+    bb->length = 0;
+    bb->alloc = alloc;
+    bb->nonextendible = 1;
+    return 1;
+}
+
+/* Null terminate the byte string without extending its length */
+/* For debugging */
+int
+ncbytesnull(NCbytes* bb)
+{
+    ncbytesappend(bb,'\0');
+    bb->length--;
+    return 1;
+}
+
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/src_netcdf4/ncbytes.h
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/src_netcdf4/ncbytes.h	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/src_netcdf4/ncbytes.h	(revision 1749)
@@ -0,0 +1,58 @@
+/* Copyright 2009, UCAR/Unidata and OPeNDAP, Inc.
+   See the COPYRIGHT file for more information. */
+
+#ifndef NCBYTES_H
+#define NCBYTES_H 1
+
+typedef struct NCbytes {
+  int nonextendible; /* 1 => fail if an attempt is made to extend this buffer*/
+  unsigned int alloc;
+  unsigned int length;
+  char* content;
+} NCbytes;
+
+#if defined(_CPLUSPLUS_) || defined(__CPLUSPLUS__) || defined(__CPLUSPLUS)
+#define EXTERNC extern "C"
+#else
+#define EXTERNC extern
+#endif
+
+EXTERNC NCbytes* ncbytesnew(void);
+EXTERNC void ncbytesfree(NCbytes*);
+EXTERNC int ncbytessetalloc(NCbytes*,unsigned int);
+EXTERNC int ncbytessetlength(NCbytes*,unsigned int);
+EXTERNC int ncbytesfill(NCbytes*, char fill);
+
+/* Produce a duplicate of the contents*/
+EXTERNC char* ncbytesdup(NCbytes*);
+/* Extract the contents and leave buffer empty */
+EXTERNC char* ncbytesextract(NCbytes*);
+
+/* Return the ith byte; -1 if no such index */
+EXTERNC int ncbytesget(NCbytes*,unsigned int);
+/* Set the ith byte */
+EXTERNC int ncbytesset(NCbytes*,unsigned int,char);
+
+/* Append one byte */
+EXTERNC int ncbytesappend(NCbytes*,char); /* Add at Tail */
+/* Append n bytes */
+EXTERNC int ncbytesappendn(NCbytes*,void*,unsigned int); /* Add at Tail */
+
+/* Null terminate the byte string without extending its length (for debugging) */
+EXTERNC int ncbytesnull(NCbytes*);
+
+/* Concatenate a null-terminated string to the end of the buffer */
+EXTERNC int ncbytescat(NCbytes*,char*);
+
+/* Set the contents of the buffer; mark the buffer as non-extendible */
+EXTERNC int ncbytessetcontents(NCbytes*, char*, unsigned int);
+
+/* Following are always "in-lined"*/
+#define ncbyteslength(bb) ((bb)?(bb)->length:0U)
+#define ncbytesalloc(bb) ((bb)?(bb)->alloc:0U)
+#define ncbytescontents(bb) ((bb && bb->content)?(bb)->content:(char*)"")
+#define ncbytesextend(bb,len) ncbytessetalloc((bb),(len)+(bb->alloc))
+#define ncbytesclear(bb) ((bb)?(bb)->length=0:0U)
+#define ncbytesavail(bb,n) ((bb)?((bb)->alloc - (bb)->length) >= (n):0U)
+
+#endif /*NCBYTES_H*/
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/src_netcdf4/nccommon.h
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/src_netcdf4/nccommon.h	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/src_netcdf4/nccommon.h	(revision 1749)
@@ -0,0 +1,333 @@
+/*********************************************************************
+  *   Copyright 1993, UCAR/Unidata
+  *   See netcdf/COPYRIGHT file for copying and redistribution conditions.
+  *   $Header: /upc/share/CVS/netcdf-3/libnccommon/nccommon.h,v 1.40 2010/05/30 19:45:52 dmh Exp $
+  *********************************************************************/
+#ifndef NCCOMMON_H
+#define NCCOMMON_H 1
+
+/* Mnemonics */
+#ifndef BOOL
+#define BOOL int
+#endif
+#ifndef TRUE
+#define TRUE 1
+#define FALSE 0
+#endif
+
+#ifndef nullfree
+#define nullfree(m) {if((m)!=NULL) {free(m);} else {}}
+#endif
+
+
+#define FILLCONSTRAINT TRUE
+
+
+/* Use an extended version of the netCDF-4 type system */
+#define NC_URL		50
+#define NC_SET		51
+/* Merge relevant translations of OC types */
+#define NC_Dataset	52
+#define NC_Sequence	53
+#define NC_Structure	54
+#define NC_Grid		55
+#define NC_Dimension	56
+#define NC_Primitive	57
+
+#undef OCCOMPILEBYDEFAULT
+
+#define DEFAULTSTRINGLENGTH 64
+/* The sequence limit default is zero because
+   most servers do not implement projections
+   on sequences.
+*/
+#define DEFAULTSEQLIMIT 0
+
+/**************************************************/
+/* sigh, do the forwards */
+struct NCDAPCOMMON;
+struct NCprojection;
+struct NCselection;
+struct Getvara;
+struct NCcachenode;
+struct NCcache;
+struct NCslice;
+struct NCsegment;
+struct OClist;
+/**************************************************/
+/*
+Collect single bit flags that
+affect the operation of the system.
+*/
+
+typedef unsigned int NCFLAGS;
+#  define SETFLAG(controls,flag) ((controls.flags) |= (flag))
+#  define CLRFLAG(controls,flag) ((controls.flags) &= ~(flag))
+#  define FLAGSET(controls,flag) (((controls.flags) & (flag)) != 0)
+
+/* Defined flags */
+#define NCF_NC3             (0x0001) /* DAP->netcdf-3 */
+#define NCF_NC4             (0x0002) /* DAP->netcdf-4 */
+#define NCF_NCDAP           (0x0004) /* Do libnc-dap mimic */
+#define NCF_CACHE           (0x0008) /* Cache enabled/disabled */
+#define NCF_PREFETCH        (0x0010) /* Cache prefetch enabled/disabled */
+#define NCF_UPGRADE         (0x0020) /* Do proper type upgrades */
+#define NCF_UNCONSTRAINABLE (0x0040) /* Not a constrainable URL */
+#define NCF_SHOWFETCH       (0x0080) /* show fetch calls */
+#define NCF_ONDISK          (0x0100) /* cause oc to store data on disk */
+#define NCF_WHOLEVAR        (0x0200) /* retrieve only whole variables (as opposed to partial variable)
+                                        into cache */
+
+/* Define all the default on flags */
+#define DFALT_ON_FLAGS (NCF_PREFETCH)
+
+typedef struct NCCONTROLS {
+    NCFLAGS  flags;
+} NCCONTROLS;
+
+struct NCTMODEL {
+    int translation;
+    char* model;
+    unsigned int flags;
+};
+
+/* Detail information about each cache item */
+typedef struct NCcachenode {
+    int wholevariable; /* does this node only have wholevariables? */
+    int prefetch; /* is this the prefetch cache entry? */
+    size_t xdrsize;
+    DCEconstraint* constraint; /* as used to create this node */
+    NClist* vars; /* vars potentially covered by this cache node */
+    struct CDFnode* datadds;
+    OCobject ocroot;
+    OCdata content;
+} NCcachenode;
+
+/* All cache info */
+typedef struct NCcache {
+    size_t cachelimit; /* max total size for all cached entries */
+    size_t cachesize; /* current size */
+    size_t cachecount; /* max # nodes in cache */
+    NCcachenode* prefetch;
+    NClist* nodes; /* cache nodes other than prefetch */
+} NCcache;
+
+/**************************************************/
+/* The DAP packet info from OC */
+typedef struct NCOC {
+    OCconnection conn;
+    char* rawurltext; /* as given to nc3d_open */
+    char* urltext;    /* as modified by nc3d_open */
+    NC_URI* url;      /* parse of rawuritext */
+    OCobject ocdasroot;
+    DCEconstraint* dapconstraint; /* from url */
+    int inmemory; /* store fetched data in memory? */
+} NCOC;
+
+typedef struct NCCDF {
+    struct CDFnode* ddsroot; /* constrained dds */
+    struct CDFnode* fullddsroot; /* unconstrained dds */
+    /* Collected sets of useful nodes (in ddsroot tree space) */
+    NClist*  varnodes; /* nodes which can represent netcdf variables */
+    NClist*  seqnodes; /* sequence nodes; */
+    NClist*  gridnodes; /* grid nodes */
+    NClist*  dimnodes; /* (base) dimension nodes */
+    unsigned int defaultstringlength;
+    unsigned int defaultsequencelimit; /* global sequence limit;0=>no limit */
+    struct NCcache* cache;
+    size_t fetchlimit;
+    size_t smallsizelimit; /* what constitutes a small object? */
+    size_t totalestimatedsize;
+    const char* separator; /* constant; do not free */
+    /* global string dimension */
+    struct CDFnode* globalstringdim;
+    char* recorddimname; /* From DODS_EXTRA */
+    struct CDFnode* recorddim;
+    /* libncdap4 only */
+    NClist*  usertypes; /* nodes which will represent netcdf types */
+} NCCDF;
+
+/* Define a structure holding common info for NCDAP{3,4} */
+
+typedef struct NCDAPCOMMON {
+    NC*   controller; /* Parent instance of NCDAPCOMMON */
+    NCCDF cdf;
+    NCOC oc;
+    NCCONTROLS controls; /* Control flags and parameters */
+} NCDAPCOMMON;
+
+/**************************************************/
+/* Create our own node tree to mimic ocnode trees*/
+
+/* Each root CDFnode contains info about the whole tree */
+typedef struct CDFtree {
+    OCobject ocroot;
+    OCdxd occlass;
+    NClist* nodes; /* all nodes in tree*/
+    struct CDFnode* root; /* cross link */
+    struct NCDAPCOMMON*          owner;
+    /* Classification flags */
+    int regridded; /* Was this tree passed thru regrid3? */
+} CDFtree;
+
+/* Track the kinds of dimensions */
+typedef int CDFdimflags;
+#define CDFDIMNORMAL	0x0
+#define CDFDIMSEQ	0x1
+#define CDFDIMSTRING	0x2
+#define CDFDIMCLONE	0x4
+#define CDFDIMRECORD	0x20
+
+#define DIMFLAG(d,flag) ((d)->dim.dimflags & (flag))
+#define DIMFLAGSET(d,flag) ((d)->dim.dimflags |= (flag))
+#define DIMFLAGCLR(d,flag) ((d)->dim.dimflags &= ~(flag))
+
+typedef struct CDFdim {
+    CDFdimflags    dimflags;
+    struct CDFnode* basedim; /* for duplicate dimensions*/
+    struct CDFnode* array; /* parent array node */
+    size_t declsize;	    /* from constrained DDS*/
+    size_t declsize0;	    /* from unconstrained DDS*/
+    int    index1;          /* dimension name index +1; 0=>no index */
+} CDFdim;
+
+typedef struct CDFarray {
+    NClist*  dimsetall; /* inherited+originals+pseudo */
+    NClist*  dimsetplus; /* originals+pseudo */
+    NClist*  dimset0; /* original dims from the dds */
+    struct CDFnode* stringdim;
+    /* Track sequence related information */
+    struct CDFnode* seqdim; /* if this node is a sequence */
+    /* note: unlike string dim; seqdim is also stored in dimensions vector */
+    struct CDFnode* sequence; /* containing usable sequence, if any */
+    struct CDFnode* basevar; /* for duplicate grid variables*/
+} CDFarray;
+
+typedef struct NCattribute {
+    char*   name;
+    nc_type etype; /* dap type of the attribute */
+    NClist* values; /* strings come from the oc values */
+    int     invisible; /* Do not materialize to the user */
+} NCattribute;
+
+/* Extend as additional DODS attribute values are defined */
+typedef struct NCDODS {
+    size_t maxstrlen;
+    char* dimname;
+} NCDODS;
+
+typedef struct NCalignment {
+    unsigned long    size; /* size of single instance of this type*/
+    unsigned long    alignment; /* alignment of this field */
+    unsigned long    offset;    /* offset of this field in parent */
+} NCalignment;
+
+typedef struct NCtypesize {
+    BOOL             aligned; /*  have instance and field been defined? */
+    NCalignment      instance; /* Alignment, etc for instance data */
+    NCalignment      field; /* Alignment, etc WRT to parent */
+} NCtypesize;
+
+/* Closely mimics struct OCnode*/
+typedef struct CDFnode {
+    nc_type          nctype;     /* e.g. var, dimension  */
+    nc_type          etype;      /* e.g. NC_INT, NC_FLOAT if applicable,*/
+    char*            ocname;     /* oc base name */
+    char*            ncbasename; /* generally cdflegalname(ocname) */
+    char*            ncfullname; /* complete path name from root to this node*/
+    OCobject         ocnode;        /* oc mirror node*/
+    struct CDFnode*  group;	 /* null => in root group */
+    struct CDFnode*  container;  /* e.g. struct or sequence, but not group */
+    struct CDFnode*  root;
+    CDFtree*         tree;          /* root level metadata;only defined if root*/
+    CDFdim           dim;           /* nctype == dimension */
+    CDFarray         array;         /* nctype == grid,var,etc. with dimensions */
+    NClist*          subnodes;      /* if nctype == grid, sequence, etc. */
+    NClist*          attributes;    /*NClist<NCattribute*>*/
+    NCDODS           dodsspecial;   /* special attributes like maxStrlen */
+    nc_type          externaltype;  /* the type as represented to nc_inq*/
+    int              ncid;          /* relevant NC id for this object*/
+    unsigned long    maxstringlength;
+    unsigned long    sequencelimit; /* 0=>unlimited */
+    BOOL	     usesequence;   /* If this sequence is usable */
+    BOOL             elided;        /* 1 => node does not partipate in naming*/
+    struct CDFnode*  basenode;      /* derived tree map to template tree */
+    BOOL	     visible;       /* 1 => node is present in derived tree; independent of elided flag */
+    BOOL	     zerodim;       /* 1 => node has a zero dimension */
+    /* These two flags track the effects on grids of constraints */
+    BOOL             virtual;       /* node added by regrid */
+#ifdef PROJECTED
+    BOOL             projected;     /* node referenced by projection */
+#endif
+    struct CDFnode* attachment;     /* DDS<->DATADDS cross link*/
+    struct CDFnode* template;       /* temporary field for regridding */
+    /* Fields for use by libncdap4 */
+    NCtypesize       typesize;
+    int              typeid;        /* when treating field as type */
+    int              basetypeid;    /* when typeid is vlen */
+    char*            typename;
+    char*            vlenname;      /* for sequence types */
+    int              singleton;     /* for singleton sequences */
+    unsigned long    estimatedsize; /* > 0 Only for var nodes */
+} CDFnode;
+
+/**************************************************/
+/* Shared procedures */
+
+/* From ncdap3.c*/
+extern NCerror freeNCDAPCOMMON(struct NCDAPCOMMON*);
+extern NCerror fetchtemplatemetadata3(NCDAPCOMMON*);
+
+/* From error.c*/
+extern NCerror ocerrtoncerr(OCerror);
+
+/* From: common34.c */
+extern NCerror fixgrid34(struct NCDAPCOMMON* drno, CDFnode* grid);
+extern NCerror computecdfinfo34(struct NCDAPCOMMON*, NClist*);
+extern char* cdfname34(char* basename);
+extern NCerror augmentddstree34(struct NCDAPCOMMON*, NClist*);
+extern NCerror computecdfdimnames34(struct NCDAPCOMMON*);
+extern NCerror buildcdftree34(struct NCDAPCOMMON*, OCobject, OCdxd, CDFnode**);
+extern CDFnode* makecdfnode34(struct NCDAPCOMMON*, char* nm, OCtype,
+			    /*optional*/ OCobject ocnode, CDFnode* container);
+extern void freecdfroot34(CDFnode*);
+
+extern NCerror findnodedds34(struct NCDAPCOMMON* drno, CDFnode* ddssrc);
+extern NCerror makegetvar34(struct NCDAPCOMMON*, struct CDFnode*, void*, nc_type, struct Getvara**);
+extern NCerror applyclientparams34(struct NCDAPCOMMON* drno);
+extern NCerror attach34(CDFnode* xroot, CDFnode* ddstarget);
+extern NCerror attachall34(CDFnode* xroot, CDFnode* ddsroot);
+extern NCerror attachsubset34(CDFnode*, CDFnode*);
+extern void unattach34(CDFnode*);
+extern int nodematch34(CDFnode* node1, CDFnode* node2);
+extern int simplenodematch34(CDFnode* node1, CDFnode* node2);
+extern CDFnode* findxnode34(CDFnode* target, CDFnode* xroot);
+extern int constrainable34(NC_URI*);
+extern char* makeconstraintstring34(DCEconstraint*);
+extern size_t estimatedataddssize34(CDFnode* datadds);
+extern void canonicalprojection34(NClist*, NClist*);
+extern NClist* getalldims34(NCDAPCOMMON* nccomm, int visibleonly);
+
+/* From cdf3.c */
+extern NCerror dimimprint3(NCDAPCOMMON*);
+extern NCerror definedimsets3(struct NCDAPCOMMON*);
+
+/* From cache.c */
+extern int iscached(NCDAPCOMMON*, CDFnode* target, NCcachenode** cachenodep);
+extern NCerror prefetchdata3(NCDAPCOMMON*);
+extern NCerror buildcachenode34(NCDAPCOMMON*,
+	        DCEconstraint* constraint,
+		NClist* varlist,
+		NCcachenode** cachep,
+		int isprefetch);
+extern NCcachenode* createnccachenode(void);
+extern void freenccachenode(NCDAPCOMMON*, NCcachenode* node);
+extern NCcache* createnccache(void);
+extern void freenccache(NCDAPCOMMON*, NCcache* cache);
+
+/* Add an extra function whose sole purpose is to allow
+   configure(.ac) to test for the presence of thiscode.
+*/
+extern int nc__opendap(void);
+
+#endif /*NCCOMMON_H*/
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/src_netcdf4/ncconfigure.h
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/src_netcdf4/ncconfigure.h	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/src_netcdf4/ncconfigure.h	(revision 1749)
@@ -0,0 +1,58 @@
+/*
+ * Copyright 2010 University Corporation for Atmospheric
+ * Research/Unidata. See COPYRIGHT file for more info.
+ *
+ * This header file is for the parallel I/O functions of netCDF.
+ * 
+ */
+/* "$Id: netcdf_par.h,v 1.1 2010/06/01 15:46:49 ed Exp $" */
+
+#ifndef NCCONFIGURE_H
+#define NCCONFIGURE_H 1
+
+/*
+This is included in bottom
+of config.h. It is where,
+typically, alternatives to
+missing functions should be
+defined.
+*/
+
+#ifndef HAVE_STRDUP
+extern char* strdup(const char*);
+#endif
+
+/* handle null arguments */
+#ifndef nulldup
+#ifdef HAVE_STRDUP
+#define nulldup(s) ((s)==NULL?NULL:strdup(s))
+#else
+char *nulldup(const char* s);
+#endif
+#endif 
+
+
+#ifndef nulldup
+#define nulldup(s) ((s)==NULL?NULL:strdup(s))
+#endif
+#ifndef nulllen
+#define nulllen(s) ((s)==NULL?0:strlen(s))
+#endif
+#ifndef nullfree
+#define nullfree(s) {if((s)!=NULL) {free(s);} else {}}
+#endif
+
+#ifndef HAVE_UCHAR
+typedef unsigned char uchar;
+#endif
+
+#ifndef HAVE_LONGLONG
+typedef long long longlong;
+typedef unsigned long long ulonglong;
+#endif
+
+#ifndef HAVE_UINT
+typedef unsigned int uint;
+#endif
+
+#endif /* NCCONFIGURE_H */
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/src_netcdf4/ncd3dispatch.c
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/src_netcdf4/ncd3dispatch.c	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/src_netcdf4/ncd3dispatch.c	(revision 1749)
@@ -0,0 +1,218 @@
+/*********************************************************************
+ *   Copyright 1993, UCAR/Unidata
+ *   See netcdf/COPYRIGHT file for copying and redistribution conditions.
+ *   $Header: /upc/share/CVS/netcdf-3/libncdap3/ncd3dispatch.c,v 1.7 2010/05/27 21:34:09 dmh Exp $
+ *********************************************************************/
+
+#include "config.h"
+#include <stdlib.h>
+#include <string.h>
+
+#include "nc.h"
+#include "ncdap3.h"
+#include "ncdispatch.h"
+#include "ncd3dispatch.h"
+
+static int
+NCD3_create(const char *path, int cmode,
+           size_t initialsz, int basepe, size_t *chunksizehintp,
+	   int use_parallel, void* mpidata,
+           NC_Dispatch*,NC** ncp);
+
+static int NCD3_redef(int ncid);
+static int NCD3__enddef(int ncid, size_t h_minfree, size_t v_align, size_t v_minfree, size_t r_align);
+static int NCD3_sync(int ncid);
+static int NCD3_abort(int ncid);
+
+static int NCD3_put_vara(int ncid, int varid,
+	    const size_t *start, const size_t *edges0,
+            const void *value0,
+	    nc_type memtype);
+
+static int NCD3_get_vara(int ncid, int varid,
+	    const size_t *start, const size_t *edges,
+            void *value,
+	    nc_type memtype);
+
+static int NCD3_put_vars(int ncid, int varid,
+	    const size_t *start, const size_t *edges, const ptrdiff_t* stride,
+            const void *value0, nc_type memtype);
+
+static int NCD3_get_vars(int ncid, int varid,
+	    const size_t *start, const size_t *edges, const ptrdiff_t* stride,
+            void *value, nc_type memtype);
+
+NC_Dispatch NCD3_dispatch_base = {
+
+NC_DISPATCH_NC3 | NC_DISPATCH_NCD,
+
+/* Note: we are using the standard substrate struct NC creator */
+NULL,
+
+NCD3_create,
+NCD3_open,
+
+NCD3_redef,
+NCD3__enddef,
+NCD3_sync,
+NCD3_abort,
+NCD3_close,
+NULL, /*set_fill*/
+NULL, /*inq_base_pe*/
+NULL, /*set_base_pe*/
+NULL, /*inq_format*/
+
+NULL, /*inq*/
+NULL, /*inq_type*/
+
+NULL, /*def_dim*/
+NULL, /*inq_dimid*/
+NULL, /*inq_dim*/
+NULL, /*inq_unlimdim*/
+NULL, /*rename_dim*/
+
+NULL, /*inq_att*/
+NULL, /*inq_attid*/
+NULL, /*inq_attname*/
+NULL, /*rename_att*/
+NULL, /*del_att*/
+NULL, /*get_att*/
+NULL, /*put_att*/
+
+NULL, /*def_var*/
+NULL, /*inq_varid*/
+NULL, /*rename_var*/
+NCD3_get_vara,
+NCD3_put_vara,
+NCD3_get_vars,
+NCD3_put_vars,
+NCDEFAULT_get_varm,
+NCDEFAULT_put_varm,
+
+NULL, /*inq_var_all*/
+
+#ifdef USE_NETCDF4
+NULL, /*show_metadata*/
+NULL, /*inq_unlimdims*/
+NULL, /*var_par_access*/
+NULL, /*inq_ncid*/
+NULL, /*inq_grps*/
+NULL, /*inq_grpname*/
+NULL, /*inq_grpname_full*/
+NULL, /*inq_grp_parent*/
+NULL, /*inq_grp_full_ncid*/
+NULL, /*inq_varids*/
+NULL, /*inq_dimids*/
+NULL, /*inq_typeids*/
+NULL, /*inq_type_equal*/
+NULL, /*def_grp*/
+NULL, /*inq_user_type*/
+NULL, /*inq_typeid*/
+
+NULL, /*def_compound*/
+NULL, /*insert_compound*/
+NULL, /*insert_array_compound*/
+NULL, /*inq_compound_field*/
+NULL, /*inq_compound_fieldindex*/
+NULL, /*def_vlen*/
+NULL, /*put_vlen_element*/
+NULL, /*get_vlen_element*/
+NULL, /*def_enum*/
+NULL, /*insert_enum*/
+NULL, /*inq_enum_member*/
+NULL, /*inq_enum_ident*/
+NULL, /*def_opaque*/
+NULL, /*def_var_deflate*/
+NULL, /*def_var_fletcher32*/
+NULL, /*def_var_chunking*/
+NULL, /*def_var_fill*/
+NULL, /*def_var_endian*/
+NULL, /*set_var_chunk_cache*/
+NULL, /*get_var_chunk_cache*/
+
+#endif /*USE_NETCDF4*/
+
+};
+
+NC_Dispatch* NCD3_dispatch_table = NULL; /* moved here from ddispatch.c */
+
+NC_Dispatch NCD3_dispatcher; /* overlay result */
+
+int
+NCD3_initialize(void)
+{
+    /* Create our dispatch table as the merge of NCD3 table and NCSUBSTRATE */
+    /* watch the order because we want NCD3 to overwrite NCSUBSTRATE */
+    NC_dispatch_overlay(&NCD3_dispatch_base, NCSUBSTRATE_dispatch_table, &NCD3_dispatcher);    
+    NCD3_dispatch_table = &NCD3_dispatcher;
+    return NC_NOERR;
+}
+
+static int
+NCD3_redef(int ncid)
+{
+    return (NC_EPERM);
+}
+
+static int
+NCD3__enddef(int ncid, size_t h_minfree, size_t v_align, size_t v_minfree, size_t r_align)
+{
+    return (NC_EPERM);
+}
+
+static int
+NCD3_sync(int ncid)
+{
+    return (NC_EINVAL);
+}
+
+static int
+NCD3_abort(int ncid)
+{
+    return NCD3_close(ncid);
+}
+
+static int
+NCD3_create(const char *path, int cmode,
+           size_t initialsz, int basepe, size_t *chunksizehintp,
+	   int use_parallel, void* mpidata,
+           NC_Dispatch* dispatch, NC** ncp)
+{
+   return NC_EPERM;
+}
+
+static int
+NCD3_put_vara(int ncid, int varid,
+	    const size_t *start, const size_t *edges,
+            const void *value,
+	    nc_type memtype)
+{
+    return NC_EPERM;
+}
+
+static int
+NCD3_get_vara(int ncid, int varid,
+	    const size_t *start, const size_t *edges,
+            void *value,
+	    nc_type memtype)
+{
+    int stat = nc3d_getvarx(ncid, varid, start, edges, nc_ptrdiffvector1, value,memtype);
+    return stat;
+}
+
+static int
+NCD3_put_vars(int ncid, int varid,
+	    const size_t *start, const size_t *edges, const ptrdiff_t* stride,
+            const void *value0, nc_type memtype)
+{
+    return NC_EPERM;
+}
+
+static int
+NCD3_get_vars(int ncid, int varid,
+	    const size_t *start, const size_t *edges, const ptrdiff_t* stride,
+            void *value, nc_type memtype)
+{
+    int stat = nc3d_getvarx(ncid, varid, start, edges, stride, value, memtype);
+    return stat;
+}
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/src_netcdf4/ncd3dispatch.h
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/src_netcdf4/ncd3dispatch.h	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/src_netcdf4/ncd3dispatch.h	(revision 1749)
@@ -0,0 +1,67 @@
+/*
+ * Copyright 1993-1996 University Corporation for Atmospheric Research/Unidata
+ * 
+ * Portions of this software were developed by the Unidata Program at the 
+ * University Corporation for Atmospheric Research.
+ * 
+ * Access and use of this software shall impose the following obligations
+ * and understandings on the user. The user is granted the right, without
+ * any fee or cost, to use, copy, modify, alter, enhance and distribute
+ * this software, and any derivative works thereof, and its supporting
+ * documentation for any purpose whatsoever, provided that this entire
+ * notice appears in all copies of the software, derivative works and
+ * supporting documentation.  Further, UCAR requests that the user credit
+ * UCAR/Unidata in any publications that result from the use of this
+ * software or in any product that includes this software. The names UCAR
+ * and/or Unidata, however, may not be used in any advertising or publicity
+ * to endorse or promote any products or commercial entity unless specific
+ * written permission is obtained from UCAR/Unidata. The user also
+ * understands that UCAR/Unidata is not obligated to provide the user with
+ * any support, consulting, training or assistance of any kind with regard
+ * to the use, operation and performance of this software nor to provide
+ * the user with any updates, revisions, new versions or "bug fixes."
+ * 
+ * THIS SOFTWARE IS PROVIDED BY UCAR/UNIDATA "AS IS" AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL UCAR/UNIDATA BE LIABLE FOR ANY SPECIAL,
+ * INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING
+ * FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
+ * NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
+ * WITH THE ACCESS, USE OR PERFORMANCE OF THIS SOFTWARE.
+ */
+/* "$Id: ncd3dispatch.h,v 1.3 2010/05/27 21:34:09 dmh Exp $" */
+
+#ifndef _NCD3DISPATCH_H
+#define _NCD3DISPATCH_H
+
+#include <stddef.h> /* size_t, ptrdiff_t */
+#include "netcdf.h"
+#include "ncdispatch.h"
+
+#if defined(__cplusplus)
+extern "C" {
+#endif
+
+EXTERNL int
+NCD3_new_nc(struct NC**);
+
+/* WARNING: this signature differs from external nc_open API*/
+EXTERNL int
+NCD3_open(const char *path, int mode,
+         int basepe, size_t *chunksizehintp,
+         int use_parallel, void* mpidata,
+         struct NC_Dispatch* dispatch, NC** ncp);
+
+EXTERNL int
+NCD3_close(int ncid);
+
+/* End _var */
+
+extern int NCD3_initialize(void);
+
+#if defined(__cplusplus)
+}
+#endif
+
+#endif /*_NCD3DISPATCH_H*/
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/src_netcdf4/ncdap3.c
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/src_netcdf4/ncdap3.c	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/src_netcdf4/ncdap3.c	(revision 1749)
@@ -0,0 +1,692 @@
+/*********************************************************************
+ *   Copyright 1993, UCAR/Unidata
+ *   See netcdf/COPYRIGHT file for copying and redistribution conditions.
+ *   $Header: /upc/share/CVS/netcdf-3/libncdap3/ncdap3.c,v 1.94 2010/05/28 01:05:34 dmh Exp $
+ *********************************************************************/
+
+#include "ncdap3.h"
+
+#ifdef HAVE_GETRLIMIT
+#  ifdef HAVE_SYS_RESOURCE_H
+#    include <sys/time.h>
+#  endif
+#  ifdef HAVE_SYS_RESOURCE_H
+#    include <sys/resource.h>
+#  endif
+#endif
+
+#include "nc3dispatch.h"
+#include "ncd3dispatch.h"
+#include "dapalign.h"
+#include "dapdump.h"
+
+static NCerror buildncstructures3(NCDAPCOMMON*);
+static NCerror builddims(NCDAPCOMMON*);
+static NCerror buildvars(NCDAPCOMMON*);
+static NCerror buildglobalattrs3(NCDAPCOMMON*,CDFnode* root);
+static NCerror buildattribute3a(NCDAPCOMMON*, NCattribute*, nc_type, int);
+
+
+static char* getdefinename(CDFnode* node);
+
+extern CDFnode* v4node;
+int nc3dinitialized = 0;
+
+/**************************************************/
+/* Add an extra function whose sole purpose is to allow
+   configure(.ac) to test for the presence of thiscode.
+*/
+int nc__opendap(void) {return 0;}
+
+/**************************************************/
+/* Do local initialization */
+
+int
+nc3dinitialize(void)
+{
+    compute_nccalignments();
+    nc3dinitialized = 1;
+    return NC_NOERR;
+}
+
+/**************************************************/
+
+/* See ncd3dispatch.c for other version */
+int
+NCD3_open(const char * path, int mode,
+               int basepe, size_t *chunksizehintp,
+ 	       int useparallel, void* mpidata,
+               NC_Dispatch* dispatch, NC** ncpp)
+{
+    NCerror ncstat = NC_NOERR;
+    OCerror ocstat = OC_NOERR;
+    NC* drno = NULL;
+    NCDAPCOMMON* dapcomm = NULL;
+    const char* value;
+    /* We will use a fake file descriptor as our internal in-memory filename */
+    char tmpname[32];
+
+    if(!nc3dinitialized) nc3dinitialize();
+
+    if(path == NULL)
+	return NC_EDAPURL;
+    if(dispatch == NULL) PANIC("NC3D_open: no dispatch table");
+
+    /* Setup our NC and NCDAPCOMMON state*/
+    drno = (NC*)calloc(1,sizeof(NC));
+    if(drno == NULL) {ncstat = NC_ENOMEM; goto done;}
+
+    /* compute an ncid */
+    ncstat = add_to_NCList(drno);
+    if(ncstat != NC_NOERR) {THROWCHK(ncstat); goto done;}
+
+    dapcomm = (NCDAPCOMMON*)calloc(1,sizeof(NCDAPCOMMON));
+    if(dapcomm == NULL) {ncstat = NC_ENOMEM; goto done;}
+
+    drno->dispatch = dispatch;
+    drno->dispatchdata = dapcomm;
+    drno->int_ncid = nc__pseudofd(); /* create a unique id */
+    dapcomm->controller = (NC*)drno;
+
+    dapcomm->cdf.separator = ".";
+    dapcomm->cdf.smallsizelimit = DFALTSMALLLIMIT;
+    dapcomm->cdf.cache = createnccache();
+
+#ifdef HAVE_GETRLIMIT
+    { struct rlimit rl;
+      if(getrlimit(RLIMIT_NOFILE, &rl) >= 0) {
+	dapcomm->cdf.cache->cachecount = (size_t)(rl.rlim_cur / 2);
+      }
+    }
+#endif
+
+#ifdef OCCOMPILEBYDEFAULT
+    /* set the compile flag by default */
+    dapcomm->oc.rawurltext = (char*)emalloc(strlen(path)+strlen("[compile]")+1);
+    strcpy(dapcomm->oc.rawurltext,"[compile]");
+    strcat(dapcomm->oc.rawurltext, path);    
+#else
+    dapcomm->oc.rawurltext = strdup(path);
+#endif
+
+    nc_uriparse(dapcomm->oc.rawurltext,&dapcomm->oc.url);
+
+    /* parse the client parameters */
+    nc_uridecodeparams(dapcomm->oc.url);
+
+    if(!constrainable34(dapcomm->oc.url))
+	SETFLAG(dapcomm->controls,NCF_UNCONSTRAINABLE);
+
+    /* Use libsrc code for storing metadata */
+
+    snprintf(tmpname,sizeof(tmpname),"%d",drno->int_ncid);
+    /* Now, use the file to create the netcdf file */
+    if(sizeof(size_t) == sizeof(unsigned int))
+	ncstat = nc_create(tmpname,NC_DISKLESS,&drno->substrate);
+    else
+	ncstat = nc_create(tmpname,NC_DISKLESS|NC_64BIT_OFFSET,&drno->substrate);
+    if(ncstat != NC_NOERR) {THROWCHK(ncstat); goto done;}
+
+    /* Avoid fill */
+    nc_set_fill(drno->substrate,NC_NOFILL,NULL);
+
+    dapcomm->oc.dapconstraint = (DCEconstraint*)dcecreate(CES_CONSTRAINT);
+    dapcomm->oc.dapconstraint->projections = nclistnew();
+    dapcomm->oc.dapconstraint->selections = nclistnew();
+
+    /* Parse constraints to make sure they are syntactically correct */
+    ncstat = parsedapconstraints(dapcomm,dapcomm->oc.url->constraint,dapcomm->oc.dapconstraint);
+    if(ncstat != NC_NOERR) {THROWCHK(ncstat); goto done;}
+
+    /* Complain if we are unconstrainable but have constraints */
+    if(FLAGSET(dapcomm->controls,NCF_UNCONSTRAINABLE)) {
+	if(dapcomm->oc.url->constraint != NULL
+	   && strlen(dapcomm->oc.url->constraint) > 0) {
+	    nclog(NCLOGWARN,"Attempt to constrain an unconstrainable data source: %s",
+		   dapcomm->oc.url->constraint);
+	}
+    }
+
+    /* Construct a url for oc minus any parameters */
+    dapcomm->oc.urltext = nc_uribuild(dapcomm->oc.url,NULL,NULL,
+				(NC_URIALL ^ NC_URICONSTRAINTS));
+
+    /* Pass to OC */
+    ocstat = oc_open(dapcomm->oc.urltext,&dapcomm->oc.conn);
+    if(ocstat != OC_NOERR) {THROWCHK(ocstat); goto done;}
+
+    nullfree(dapcomm->oc.urltext); /* clean up */
+    dapcomm->oc.urltext = NULL;
+
+    /* process control client parameters */
+    applyclientparamcontrols3(dapcomm);
+
+    /* Turn on logging; only do this after oc_open*/
+    if((value = paramvalue34(dapcomm,"log")) != NULL) {
+	ncloginit();
+        ncsetlogging(1);
+        nclogopen(value);
+	oc_loginit();
+        oc_setlogging(1);
+        oc_logopen(value);
+    }
+
+    /* fetch and build the (almost) unconstrained DDS for use as
+       template */
+    ncstat = fetchtemplatemetadata3(dapcomm);
+    if(ncstat != NC_NOERR) goto done;
+
+    /* fetch and build the constrained DDS */
+    ncstat = fetchconstrainedmetadata3(dapcomm);
+    if(ncstat != NC_NOERR) goto done;
+
+#ifdef DEBUG2
+fprintf(stderr,"constrained dds: %s\n",dumptree(dapcomm->cdf.ddsroot));
+#endif
+
+
+    /* The following actions are (mostly) WRT to the constrained tree */
+
+    /* Accumulate useful nodes sets  */
+    ncstat = computecdfnodesets3(dapcomm);
+    if(ncstat) {THROWCHK(ncstat); goto done;}
+
+    /* Fix grids */
+    ncstat = fixgrids3(dapcomm);
+    if(ncstat) {THROWCHK(ncstat); goto done;}
+
+    /* Locate and mark usable sequences */
+    ncstat = sequencecheck3(dapcomm);
+    if(ncstat) {THROWCHK(ncstat); goto done;}
+
+    /* suppress variables not in usable sequences */
+    ncstat = suppressunusablevars3(dapcomm);
+    if(ncstat) {THROWCHK(ncstat); goto done;}
+
+    /* apply client parameters */
+    ncstat = applyclientparams34(dapcomm);
+    if(ncstat) {THROWCHK(ncstat); goto done;}
+
+    /* Add (as needed) string dimensions*/
+    ncstat = addstringdims(dapcomm);
+    if(ncstat) {THROWCHK(ncstat); goto done;}
+
+    if(nclistlength(dapcomm->cdf.seqnodes) > 0) {
+	/* Build the sequence related dimensions */
+        ncstat = defseqdims(dapcomm);
+        if(ncstat) {THROWCHK(ncstat); goto done;}
+    }
+
+    /* Define the dimsetplus and dimsetall lists */
+    ncstat = definedimsets3(dapcomm);
+    if(ncstat) {THROWCHK(ncstat); goto done;}
+
+    /* Re-compute the dimension names*/
+    ncstat = computecdfdimnames34(dapcomm);
+    if(ncstat) {THROWCHK(ncstat); goto done;}
+
+    /* Deal with zero size dimensions */
+    ncstat = fixzerodims3(dapcomm);
+    if(ncstat) {THROWCHK(ncstat); goto done;}
+
+    /* Attempt to use the DODS_EXTRA info to turn
+       one of the dimensions into unlimited.
+       Assume computecdfdimnames34 has already been called.
+    */
+    ncstat = defrecorddim3(dapcomm);
+    if(ncstat) {THROWCHK(ncstat); goto done;}
+    if(dapcomm->cdf.recorddimname != NULL
+       && nclistlength(dapcomm->cdf.seqnodes) > 0) {
+	/*nclog(NCLOGWARN,"unlimited dimension specified, but sequences exist in DDS");*/
+	PANIC("unlimited dimension specified, but sequences exist in DDS");	
+    }
+
+    /* Re-compute the var names*/
+    ncstat = computecdfvarnames3(dapcomm,dapcomm->cdf.ddsroot,dapcomm->cdf.varnodes);
+    if(ncstat) {THROWCHK(ncstat); goto done;}
+
+    /* Transfer data from the unconstrained DDS data to the unconstrained DDS */
+    ncstat = dimimprint3(dapcomm);
+    if(ncstat) goto done;
+
+    /* Process the constraints to map to the constrained CDF tree */
+    /* (must follow fixgrids3 */
+    ncstat = mapconstraints3(dapcomm->oc.dapconstraint,dapcomm->cdf.ddsroot);
+    if(ncstat != NC_NOERR) goto done;
+
+    /* Canonicalize the constraint */
+    ncstat = fixprojections(dapcomm->oc.dapconstraint->projections);
+    if(ncstat != NC_NOERR) {THROWCHK(ncstat); goto done;}
+
+    /* Fill in segment information */
+    ncstat = qualifyconstraints3(dapcomm->oc.dapconstraint);
+    if(ncstat != NC_NOERR) goto done;
+
+    /* using the modified constraint, rebuild the constraint string */
+    if(FLAGSET(dapcomm->controls,NCF_UNCONSTRAINABLE)) {
+	/* ignore all constraints */
+	dapcomm->oc.urltext = nc_uribuild(dapcomm->oc.url,NULL,NULL,0);
+    } else {
+	char* constraintstring = buildconstraintstring3(dapcomm->oc.dapconstraint);
+        nc_urisetconstraints(dapcomm->oc.url,constraintstring);
+	nullfree(constraintstring);
+        dapcomm->oc.urltext = nc_uribuild(dapcomm->oc.url,NULL,NULL,NC_URICONSTRAINTS);
+    }
+
+#ifdef DEBUG
+fprintf(stderr,"ncdap3: final constraint: %s\n",dapcomm->oc.url->constraint);
+#endif
+
+    /* Estimate the variable sizes */
+    estimatevarsizes3(dapcomm);
+
+    /* Build the meta data */
+    ncstat = buildncstructures3(dapcomm);
+    if(ncstat != NC_NOERR) {THROWCHK(ncstat); goto done;}
+
+    /* Do any necessary data prefetch */
+    if(FLAGSET(dapcomm->controls,NCF_PREFETCH)) {
+        ncstat = prefetchdata3(dapcomm);
+        if(ncstat != NC_NOERR) {
+            del_from_NCList((NC*)drno); /* undefine here */
+	    {THROWCHK(ncstat); goto done;}
+	}
+    }
+
+#ifdef BUG
+    /* The libsrc code (NC_begins) assumes that
+       a created files is new and hence must have an
+       unlimited dimension of 0 initially, which will
+       wipe out the effect of the NC_set_numrecs in builddims.
+       There is no easy workaround, so we suppress the call
+       to nc_enddef
+    */
+    ncstat = nc_enddef(drno->substrate);
+    if(ncstat != NC_NOERR) {THROWCHK(ncstat); goto done;}
+#endif
+
+    if(ncpp) *ncpp = (NC*)drno;
+
+    return ncstat;
+
+done:
+    if(drno != NULL) NCD3_close(drno->ext_ncid);
+    if(ocstat != OC_NOERR) ncstat = ocerrtoncerr(ocstat);
+    return THROW(ncstat);
+}
+
+int
+NCD3_close(int ncid)
+{
+    NC* drno;
+    NCDAPCOMMON* dapcomm;
+    int ncstatus = NC_NOERR;
+
+    ncstatus = NC_check_id(ncid, (NC**)&drno); 
+    if(ncstatus != NC_NOERR) return THROW(ncstatus);
+
+    dapcomm = (NCDAPCOMMON*)drno->dispatchdata;
+    ncstatus = nc_abort(drno->substrate);
+
+    /* remove ourselves from NClist */
+    del_from_NCList(drno);
+    /* clean NC* */
+    freeNCDAPCOMMON(dapcomm);
+    if(drno->path != NULL) free(drno->path);
+    free(drno);
+    return THROW(ncstatus);
+}
+
+/**************************************************/
+static NCerror
+buildncstructures3(NCDAPCOMMON* dapcomm)
+{
+    NCerror ncstat = NC_NOERR;
+    CDFnode* dds = dapcomm->cdf.ddsroot;
+    NC* ncsub;
+    NC_check_id(dapcomm->controller->substrate,&ncsub);
+
+    ncstat = buildglobalattrs3(dapcomm,dds);
+    if(ncstat != NC_NOERR) goto done;
+
+    ncstat = builddims(dapcomm);
+    if(ncstat != NC_NOERR) goto done;
+
+    ncstat = buildvars(dapcomm);
+    if(ncstat != NC_NOERR) goto done;
+
+done:
+    return THROW(ncstat);
+}
+
+static NCerror
+builddims(NCDAPCOMMON* dapcomm)
+{
+    int i;
+    NCerror ncstat = NC_NOERR;
+    int dimid;
+    NClist* dimset = NULL;
+    NC* drno = dapcomm->controller;
+    NC* ncsub;
+    char* definename;
+
+    /* collect all dimensions from variables */
+    dimset = dapcomm->cdf.dimnodes;
+
+    /* Sort by fullname just for the fun of it */
+    for(;;) {
+	int last = nclistlength(dimset) - 1;
+	int swap = 0;
+        for(i=0;i<last;i++) {
+	    CDFnode* dim1 = (CDFnode*)nclistget(dimset,i);
+	    CDFnode* dim2 = (CDFnode*)nclistget(dimset,i+1);
+   	    if(strcmp(dim1->ncfullname,dim2->ncfullname) > 0) {
+		nclistset(dimset,i,(ncelem)dim2);
+		nclistset(dimset,i+1,(ncelem)dim1);
+		swap = 1;
+		break;
+	    }
+	}
+	if(!swap) break;
+    }
+
+    /* Define unlimited only if needed */ 
+    if(dapcomm->cdf.recorddim != NULL) {
+	CDFnode* unlimited = dapcomm->cdf.recorddim;
+	definename = getdefinename(unlimited);
+        ncstat = nc_def_dim(drno->substrate,
+			definename,
+			NC_UNLIMITED,
+			&unlimited->ncid);
+	nullfree(definename);
+        if(ncstat != NC_NOERR) {THROWCHK(ncstat); goto done;}
+
+        /* get the id for the substrate */
+        ncstat = NC_check_id(drno->substrate,&ncsub);
+        if(ncstat != NC_NOERR) {THROWCHK(ncstat); goto done;}
+
+        /* Set the effective size of UNLIMITED;
+           note that this cannot easily be done thru the normal API.*/
+        NC_set_numrecs(ncsub,unlimited->dim.declsize);
+    }
+
+    for(i=0;i<nclistlength(dimset);i++) {
+	CDFnode* dim = (CDFnode*)nclistget(dimset,i);
+        if(dim->dim.basedim != NULL) continue; /* handle below */
+	if(DIMFLAG(dim,CDFDIMRECORD)) continue; /* defined above */
+#ifdef DEBUG1
+fprintf(stderr,"define: dim: %s=%ld\n",dim->ncfullname,(long)dim->dim.declsize);
+#endif
+	definename = getdefinename(dim);
+        ncstat = nc_def_dim(drno->substrate,definename,dim->dim.declsize,&dimid);
+        if(ncstat != NC_NOERR) {
+	    THROWCHK(ncstat); goto done;
+	}
+	nullfree(definename);
+        dim->ncid = dimid;
+    }
+
+    /* Make all duplicate dims have same dimid as basedim*/
+    /* (see computecdfdimnames)*/
+    for(i=0;i<nclistlength(dimset);i++) {
+	CDFnode* dim = (CDFnode*)nclistget(dimset,i);
+        if(dim->dim.basedim != NULL) {
+	    dim->ncid = dim->dim.basedim->ncid;
+	}
+    }
+done:
+    nclistfree(dimset);
+    return THROW(ncstat);
+}
+
+/* Simultaneously build any associated attributes*/
+/* and any necessary pseudo-dimensions for string types*/
+static NCerror
+buildvars(NCDAPCOMMON* dapcomm)
+{
+    int i,j;
+    NCerror ncstat = NC_NOERR;
+    int varid;
+    NClist* varnodes = dapcomm->cdf.varnodes;
+    NC* drno = dapcomm->controller;
+    char* definename;
+
+    ASSERT((varnodes != NULL));
+    for(i=0;i<nclistlength(varnodes);i++) {
+	CDFnode* var = (CDFnode*)nclistget(varnodes,i);
+        int dimids[NC_MAX_VAR_DIMS];
+	unsigned int ncrank;
+        NClist* vardims = NULL;
+
+	if(!var->visible) continue;
+	if(var->array.basevar != NULL) continue;
+
+#ifdef DEBUG1
+fprintf(stderr,"buildvars.candidate=|%s|\n",var->ncfullname);
+#endif
+
+	vardims = var->array.dimsetall;
+	ncrank = nclistlength(vardims);
+	if(ncrank > 0) {
+            for(j=0;j<ncrank;j++) {
+                CDFnode* dim = (CDFnode*)nclistget(vardims,j);
+                dimids[j] = dim->ncid;
+ 	    }
+        }   
+
+
+
+	definename = getdefinename(var);
+
+#ifdef DEBUG1
+fprintf(stderr,"define: var: %s/%s",
+		definename,var->ocname);
+if(ncrank > 0) {
+int k;
+for(k=0;k<ncrank;k++) {
+CDFnode* dim = (CDFnode*)nclistget(vardims,k);
+fprintf(stderr,"[%ld]",dim->dim.declsize);
+ }
+ }
+fprintf(stderr,"\n");
+#endif
+        ncstat = nc_def_var(drno->substrate,
+		        definename,
+                        var->externaltype,
+                        ncrank,
+                        (ncrank==0?NULL:dimids),
+                        &varid);
+	nullfree(definename);
+        if(ncstat != NC_NOERR) {
+	    THROWCHK(ncstat);
+	    goto done;
+	}
+        var->ncid = varid;
+	if(var->attributes != NULL) {
+	    for(j=0;j<nclistlength(var->attributes);j++) {
+		NCattribute* att = (NCattribute*)nclistget(var->attributes,j);
+		ncstat = buildattribute3a(dapcomm,att,var->etype,varid);
+        	if(ncstat != NC_NOERR) goto done;
+	    }
+	}
+	/* Tag the variable with its DAP path */
+	if(paramcheck34(dapcomm,"show","projection"))
+	    showprojection3(dapcomm,var);
+    }    
+done:
+    return THROW(ncstat);
+}
+
+static NCerror
+buildglobalattrs3(NCDAPCOMMON* dapcomm, CDFnode* root)
+{
+    int i;
+    NCerror ncstat = NC_NOERR;
+    const char* txt;
+    char *nltxt, *p;
+    NCbytes* buf = NULL;
+    NClist* cdfnodes;
+    NC* drno = dapcomm->controller;
+
+    if(root->attributes != NULL) {
+        for(i=0;i<nclistlength(root->attributes);i++) {
+   	    NCattribute* att = (NCattribute*)nclistget(root->attributes,i);
+	    ncstat = buildattribute3a(dapcomm,att,NC_NAT,NC_GLOBAL);
+            if(ncstat != NC_NOERR) goto done;
+	}
+    }
+
+    /* Add global attribute identifying the sequence dimensions */
+    if(paramcheck34(dapcomm,"show","seqdims")) {
+        buf = ncbytesnew();
+        cdfnodes = dapcomm->cdf.ddsroot->tree->nodes;
+        for(i=0;i<nclistlength(cdfnodes);i++) {
+	    CDFnode* dim = (CDFnode*)nclistget(cdfnodes,i);
+	    if(dim->nctype != NC_Dimension) continue;
+	    if(DIMFLAG(dim,CDFDIMSEQ)) {
+	        char* cname = cdflegalname3(dim->ocname);
+	        if(ncbyteslength(buf) > 0) ncbytescat(buf,", ");
+	        ncbytescat(buf,cname);
+	        nullfree(cname);
+	    }
+	}
+        if(ncbyteslength(buf) > 0) {
+            ncstat = nc_put_att_text(drno->substrate,NC_GLOBAL,"_sequence_dimensions",
+	           ncbyteslength(buf),ncbytescontents(buf));
+	}
+    }
+
+    /* Define some additional system global attributes
+       depending on show= clientparams*/
+    /* Ignore failures*/
+
+    if(paramcheck34(dapcomm,"show","translate")) {
+        /* Add a global attribute to show the translation */
+        ncstat = nc_put_att_text(drno->substrate,NC_GLOBAL,"_translate",
+	           strlen("netcdf-3"),"netcdf-3");
+    }
+    if(paramcheck34(dapcomm,"show","url")) {
+	if(dapcomm->oc.rawurltext != NULL)
+            ncstat = nc_put_att_text(drno->substrate,NC_GLOBAL,"_url",
+				       strlen(dapcomm->oc.rawurltext),dapcomm->oc.rawurltext);
+    }
+    if(paramcheck34(dapcomm,"show","dds")) {
+	txt = NULL;
+	if(dapcomm->cdf.ddsroot != NULL)
+  	    txt = oc_inq_text(dapcomm->oc.conn,dapcomm->cdf.ddsroot->ocnode);
+	if(txt != NULL) {
+	    /* replace newlines with spaces*/
+	    nltxt = nulldup(txt);
+	    for(p=nltxt;*p;p++) {if(*p == '\n' || *p == '\r' || *p == '\t') {*p = ' ';}};
+            ncstat = nc_put_att_text(drno->substrate,NC_GLOBAL,"_dds",strlen(nltxt),nltxt);
+	    nullfree(nltxt);
+	}
+    }
+    if(paramcheck34(dapcomm,"show","das")) {
+	txt = NULL;
+	if(dapcomm->oc.ocdasroot != OCNULL)
+	    txt = oc_inq_text(dapcomm->oc.conn,dapcomm->oc.ocdasroot);
+	if(txt != NULL) {
+	    nltxt = nulldup(txt);
+	    for(p=nltxt;*p;p++) {if(*p == '\n' || *p == '\r' || *p == '\t') {*p = ' ';}};
+            ncstat = nc_put_att_text(drno->substrate,NC_GLOBAL,"_das",strlen(nltxt),nltxt);
+	    nullfree(nltxt);
+	}
+    }
+
+done:
+    ncbytesfree(buf);
+    return THROW(ncstat);
+}
+
+static NCerror
+buildattribute3a(NCDAPCOMMON* dapcomm, NCattribute* att, nc_type vartype, int varid)
+{
+    int i;
+    NCerror ncstat = NC_NOERR;
+    unsigned int nvalues = nclistlength(att->values);
+    NC* drno = dapcomm->controller;
+
+    /* If the type of the attribute is string, then we need*/
+    /* to convert to a single character string by concatenation.
+	modified: 10/23/09 to insert newlines.
+	modified: 10/28/09 to interpret escapes
+    */
+    if(att->etype == NC_STRING || att->etype == NC_URL) {
+	char* newstring;
+	size_t newlen = 0;
+	for(i=0;i<nvalues;i++) {
+	    char* s = (char*)nclistget(att->values,i);
+	    newlen += (1+strlen(s));
+	}
+	newstring = (char*)malloc(newlen);
+        MEMCHECK(newstring,NC_ENOMEM);
+	newstring[0] = '\0';
+	for(i=0;i<nvalues;i++) {
+	    char* s = (char*)nclistget(att->values,i);
+	    if(i > 0) strcat(newstring,"\n");
+	    strcat(newstring,s);
+	}
+        dapexpandescapes(newstring);
+	if(newstring[0]=='\0')
+	    ncstat = nc_put_att_text(drno->substrate,varid,att->name,1,newstring);
+	else
+	    ncstat = nc_put_att_text(drno->substrate,varid,att->name,strlen(newstring),newstring);
+	free(newstring);
+    } else {
+	nc_type atype;
+	unsigned int typesize;
+	void* mem;
+	/* It turns out that some servers upgrade the type
+           of _FillValue in order to correctly preserve the
+           original value. However, since the type of the
+           underlying variable is not changes, we get a type
+           mismatch. So, make sure the type of the fillvalue
+           is the same as that of the controlling variable.
+	*/
+        if(varid != NC_GLOBAL && strcmp(att->name,"_FillValue")==0)
+	    atype = nctypeconvert(dapcomm,vartype);
+	else
+	    atype = nctypeconvert(dapcomm,att->etype);
+	typesize = nctypesizeof(atype);
+	mem = malloc(typesize * nvalues);
+        ncstat = dapcvtattrval3(atype,mem,att->values);
+        ncstat = nc_put_att(drno->substrate,varid,att->name,atype,nvalues,mem);
+	nullfree(mem);
+    }
+    return THROW(ncstat);
+}
+
+static char*
+getdefinename(CDFnode* node)
+{
+    char* spath = NULL;
+    NClist* path = NULL;
+
+    switch (node->nctype) {
+    case NC_Primitive:
+	/* The define name is same as the fullname with elided nodes */
+	path = nclistnew();
+        collectnodepath3(node,path,!WITHDATASET);
+        spath = makepathstring3(path,".",PATHNC|PATHELIDE);
+        nclistfree(path);
+	break;
+
+    case NC_Dimension:
+	/* Return just the node's ncname */
+	spath = nulldup(node->ncbasename);	
+	break;
+
+    default:
+	PANIC("unexpected nctype");
+    }
+    return spath;
+}
+
+int
+NCDAP_ping(const char* url)
+{
+    OCerror ocstat = OC_NOERR;
+    ocstat = oc_ping(url);
+    return ocerrtoncerr(ocstat);
+}
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/src_netcdf4/ncdap3.h
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/src_netcdf4/ncdap3.h	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/src_netcdf4/ncdap3.h	(revision 1749)
@@ -0,0 +1,149 @@
+/*********************************************************************
+  *   Copyright 1993, UCAR/Unidata
+  *   See netcdf/COPYRIGHT file for copying and redistribution conditions.
+  *   $Header: /upc/share/CVS/netcdf-3/libncdap3/ncdap3.h,v 1.40 2010/05/30 19:45:52 dmh Exp $
+  *********************************************************************/
+#ifndef NCDAP3_H
+#define NCDAP3_H 1
+
+#include "config.h"
+#include <stdlib.h>
+#include <unistd.h>
+#include <fcntl.h>
+#include <sys/stat.h>
+#include <string.h>
+#include <stdio.h>
+
+#include "ncbytes.h"
+#include "nclist.h"
+#include "nchashmap.h"
+#include "nclog.h"
+#include "nc_uri.h"
+#include "fbits.h"
+#include "dceconstraints.h"
+
+#include "oc.h"
+
+#include "nc.h"
+#include "netcdf.h"
+#include "ncdispatch.h"
+ /* netcdf overrides*/
+#include "dapnc.h"
+
+#include "dapdebug.h"
+#include "daputil.h"
+
+/**************************************************/
+/* sigh, do the forwards */
+struct NCprojection;
+struct NCselection;
+struct Getvara;
+struct NCcachenode;
+struct NCcache;
+struct NCslice;
+struct NCsegment;
+
+/**************************************************/
+
+#include "nccommon.h"
+#include "getvara.h"
+#include "constraints3.h"
+
+/**************************************************/
+
+#ifndef USE_NETCDF4
+#define	NC_UBYTE 	7	/* unsigned 1 byte int */
+#define	NC_USHORT 	8	/* unsigned 2-byte int */
+#define	NC_UINT 	9	/* unsigned 4-byte int */
+#define	NC_INT64 	10	/* signed 8-byte int */
+#define	NC_UINT64 	11	/* unsigned 8-byte int */
+#define	NC_STRING 	12	/* string */
+
+#define NC_MAX_BYTE 127
+#define NC_MIN_BYTE (-NC_MAX_BYTE-1)
+#define NC_MAX_CHAR 255
+#define NC_MAX_SHORT 32767
+#define NC_MIN_SHORT (-NC_MAX_SHORT - 1)
+#define NC_MAX_INT 2147483647
+#define NC_MIN_INT (-NC_MAX_INT - 1)
+#define NC_MAX_FLOAT 3.402823466e+38f
+#define NC_MIN_FLOAT (-NC_MAX_FLOAT)
+#define NC_MAX_DOUBLE 1.7976931348623157e+308 
+#define NC_MIN_DOUBLE (-NC_MAX_DOUBLE)
+#define NC_MAX_UBYTE NC_MAX_CHAR
+#define NC_MAX_USHORT 65535U
+#define NC_MAX_UINT 4294967295U
+#define NC_MAX_INT64 (9223372036854775807LL)
+#define NC_MIN_INT64 (-9223372036854775807LL-1)
+#define NC_MAX_UINT64 (18446744073709551615ULL)
+#define X_INT64_MAX     (9223372036854775807LL)
+#define X_INT64_MIN     (-X_INT64_MAX - 1)
+#define X_UINT64_MAX    (18446744073709551615ULL)
+#endif /*USE_NETCDF4*/
+
+
+/**************************************************/
+
+extern struct NCTMODEL nctmodels[];
+
+/**************************************************/
+/* Import some internal procedures from libsrc*/
+
+/* Internal, but non-static procedures */
+extern NCerror computecdfvarnames3(NCDAPCOMMON*,CDFnode*,NClist*);
+extern NCerror computecdfnodesets3(NCDAPCOMMON* drno);
+extern NCerror computevarnodes3(NCDAPCOMMON*, NClist*, NClist*);
+extern NCerror collectvardefdims(NCDAPCOMMON* drno, CDFnode* var, NClist* dimset);
+extern NCerror fixgrids3(NCDAPCOMMON* drno);
+extern NCerror dapmerge3(NCDAPCOMMON* drno, CDFnode* node, OCobject dasroot);
+extern NCerror sequencecheck3(NCDAPCOMMON* drno);
+extern NCerror computecdfdimnames3(NCDAPCOMMON*);
+extern NCerror attachdatadds3(struct NCDAPCOMMON*);
+extern NCerror detachdatadds3(struct NCDAPCOMMON*);
+extern void dapdispatch3init(void);
+
+/*
+extern void dereference3(NCconstraint* constraint);
+extern NCerror rereference3(NCconstraint*, NClist*);
+*/
+
+extern NCerror buildvaraprojection3(struct Getvara*,
+		     const size_t* startp, const size_t* countp, const ptrdiff_t* stridep,
+		     struct DCEprojection** projectionlist);
+
+extern NCerror nc3d_getvarx(int ncid, int varid,
+	    const size_t *startp,
+	    const size_t *countp,
+	    const ptrdiff_t *stridep,
+	    void *data,
+	    nc_type dsttype0);
+
+/**************************************************/
+
+/* From: ncdap3.c*/
+extern NCerror nc3d_open(const char* path, int mode, int* ncidp);
+extern int nc3d_close(int ncid);
+extern int nc3dinitialize(void);
+extern NCerror regrid3(CDFnode* ddsroot, CDFnode* template, NClist*);
+extern void setvisible(CDFnode* root, int visible);
+extern NCerror mapnodes3(CDFnode* dstroot, CDFnode* srcroot);
+extern void unmap3(CDFnode* root);
+
+/* From: ncdap3a.c*/
+extern NCerror fetchtemplatemetadata3(NCDAPCOMMON* nccomm);
+extern NCerror fetchconstrainedmetadata3(NCDAPCOMMON* nccomm);
+extern void applyclientparamcontrols3(NCDAPCOMMON*);
+extern NCerror suppressunusablevars3(NCDAPCOMMON*);
+extern NCerror addstringdims(NCDAPCOMMON* drno);
+extern NCerror defseqdims(NCDAPCOMMON* drno);
+extern NCerror fixzerodims3(NCDAPCOMMON*);
+extern void estimatevarsizes3(NCDAPCOMMON*);
+extern NCerror defrecorddim3(NCDAPCOMMON*);
+extern NCerror showprojection3(NCDAPCOMMON*, CDFnode* var);
+
+
+/* From: dapcvt.c*/
+extern NCerror dapconvert3(nc_type, nc_type, char*, char*, size_t);
+extern int dapcvtattrval3(nc_type, void*, NClist*);
+
+#endif /*NCDAP3_H*/
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/src_netcdf4/ncdap3a.c
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/src_netcdf4/ncdap3a.c	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/src_netcdf4/ncdap3a.c	(revision 1749)
@@ -0,0 +1,800 @@
+/*********************************************************************
+ *   Copyright 1993, UCAR/Unidata
+ *   See netcdf/COPYRIGHT file for copying and redistribution conditions.
+ *********************************************************************/
+
+#include "ncdap3.h"
+#include "nc3dispatch.h"
+#include "ncd3dispatch.h"
+#include "dapalign.h"
+#include "dapdump.h"
+#include "oc.h"
+
+#define getncid(drno) (((NC*)drno)->ext_ncid)
+
+/*Forward*/
+static NCerror getseqdimsize(NCDAPCOMMON*, CDFnode* seq, size_t* sizep);
+static int fieldindex(CDFnode* parent, CDFnode* child);
+static NCerror countsequence(NCDAPCOMMON*, CDFnode* node, size_t*);
+static NCerror makeseqdim(NCDAPCOMMON*, CDFnode* node, size_t, CDFnode**);
+static NCerror computeseqcountconstraints3(NCDAPCOMMON*,CDFnode*,NCbytes*);
+static void computeseqcountconstraints3r(NCDAPCOMMON*, CDFnode*, CDFnode**);
+
+void
+freegetvara(Getvara* vara)
+{
+    if(vara == NULL) return;
+    dcefree((DCEnode*)vara->varaprojection);
+    nullfree(vara);
+}
+
+NCerror
+freeNCDAPCOMMON(NCDAPCOMMON* dapcomm)
+{
+    /* abort the metadata file */
+    (void)nc_abort(getncid(dapcomm));
+    freenccache(dapcomm,dapcomm->cdf.cache);
+    nclistfree(dapcomm->cdf.varnodes);
+    nclistfree(dapcomm->cdf.seqnodes);
+    nclistfree(dapcomm->cdf.gridnodes);
+    nclistfree(dapcomm->cdf.usertypes);
+    nullfree(dapcomm->cdf.recorddimname);
+
+    /* free the trees */
+    freecdfroot34(dapcomm->cdf.ddsroot);
+    dapcomm->cdf.ddsroot = NULL;
+    freecdfroot34(dapcomm->cdf.fullddsroot);
+    dapcomm->cdf.fullddsroot = NULL;
+    if(dapcomm->oc.ocdasroot != NULL)
+        oc_root_free(dapcomm->oc.conn,dapcomm->oc.ocdasroot);
+    dapcomm->oc.ocdasroot = NULL;
+    oc_close(dapcomm->oc.conn); /* also reclaims remaining OC trees */
+    nc_urifree(dapcomm->oc.url);
+    nullfree(dapcomm->oc.urltext);
+    nullfree(dapcomm->oc.rawurltext);
+
+    dcefree((DCEnode*)dapcomm->oc.dapconstraint);
+    dapcomm->oc.dapconstraint = NULL;
+
+    free(dapcomm);
+
+    return NC_NOERR;
+}
+
+NCerror
+addstringdims(NCDAPCOMMON* dapcomm)
+{
+    /* for all variables of string type, we will need another dimension
+       to represent the string; Accumulate the needed sizes and create
+       the dimensions with a specific name: either as specified
+       in DODS{...} attribute set or defaulting to the variable name.
+       All such dimensions are global.
+    */
+    int i;
+    NClist* varnodes = dapcomm->cdf.varnodes;
+    CDFnode* globalsdim = NULL;
+    char dimname[4096];
+    size_t dimsize;
+
+    /* Start by creating the global string dimension */
+    snprintf(dimname,sizeof(dimname),"maxStrlen%lu",
+	    (unsigned long)dapcomm->cdf.defaultstringlength);
+    globalsdim = makecdfnode34(dapcomm, dimname, OC_Dimension, OCNULL,
+                                 dapcomm->cdf.ddsroot);
+    nclistpush(dapcomm->cdf.ddsroot->tree->nodes,(ncelem)globalsdim);
+    DIMFLAGSET(globalsdim,CDFDIMSTRING);
+    globalsdim->dim.declsize = dapcomm->cdf.defaultstringlength;
+    globalsdim->dim.declsize0 = globalsdim->dim.declsize;
+    globalsdim->dim.array = dapcomm->cdf.ddsroot;
+    globalsdim->ncbasename = cdflegalname3(dimname);
+    globalsdim->ncfullname = nulldup(globalsdim->ncbasename);
+    dapcomm->cdf.globalstringdim = globalsdim;
+
+    for(i=0;i<nclistlength(varnodes);i++) {
+	CDFnode* var = (CDFnode*)nclistget(varnodes,i);
+	CDFnode* sdim = NULL;
+
+	/* Does this node need a string dim? */
+	if(var->etype != NC_STRING && var->etype != NC_URL) continue;
+
+	dimsize = 0;
+	if(var->dodsspecial.maxstrlen > 0)
+	    dimsize = var->dodsspecial.maxstrlen;
+	else
+	    dimsize = var->maxstringlength;
+
+	/* check is a variable-specific string length was specified */
+	if(dimsize == 0) 
+	    sdim = dapcomm->cdf.globalstringdim; /* use default */
+	else {
+	    /* create a psuedo dimension for the charification of the string*/
+	    if(var->dodsspecial.dimname != NULL)
+	        strncpy(dimname,var->dodsspecial.dimname,sizeof(dimname));
+	    else
+	        snprintf(dimname,sizeof(dimname),"maxStrlen%lu",
+			 (unsigned long)dimsize);
+	    sdim = makecdfnode34(dapcomm, dimname, OC_Dimension, OCNULL,
+                                 dapcomm->cdf.ddsroot);
+	    if(sdim == NULL) return THROW(NC_ENOMEM);
+	    nclistpush(dapcomm->cdf.ddsroot->tree->nodes,(ncelem)sdim);
+	    DIMFLAGSET(sdim,CDFDIMSTRING);
+	    sdim->dim.declsize = dimsize;
+	    sdim->dim.declsize0 = dimsize;
+	    sdim->dim.array = var;
+	    sdim->ncbasename = cdflegalname3(sdim->ocname);
+	    sdim->ncfullname = nulldup(sdim->ncbasename);
+	}
+	/* tag the variable with its string dimension*/
+	var->array.stringdim = sdim;
+    }
+    return NC_NOERR;
+}
+
+NCerror
+defrecorddim3(NCDAPCOMMON* dapcomm)
+{
+    unsigned int i;
+    NCerror ncstat = NC_NOERR;
+    NClist* basedims;
+
+    if(dapcomm->cdf.recorddimname == NULL) return NC_NOERR; /* ignore */
+    /* Locate the base dimension matching the record dim */
+    basedims = dapcomm->cdf.dimnodes;
+    for(i=0;i<nclistlength(basedims);i++) {
+        CDFnode* dim = (CDFnode*)nclistget(basedims,i);
+	if(strcmp(dim->ocname,dapcomm->cdf.recorddimname) != 0) continue;
+        DIMFLAGSET(dim,CDFDIMRECORD);
+	dapcomm->cdf.recorddim = dim;
+	break;
+    }
+
+    return ncstat;
+}
+
+NCerror
+defseqdims(NCDAPCOMMON* dapcomm)
+{
+    unsigned int i;
+    NCerror ncstat = NC_NOERR;
+    int seqdims = 1; /* default is to compute seq dims counts */
+
+    /* Does the user want to compute actual sequence sizes? */
+    if(paramvalue34(dapcomm,"noseqdims")) seqdims = 0;
+
+    /*
+	Compute and define pseudo dimensions for sequences
+	meeting the following qualifications:
+	1. all parents (transitively) of the sequence must
+           be either a dataset or a scalar structure.
+	2. it must be possible to find a usable sequence constraint.
+	All other sequences will be ignored.
+    */
+
+    for(i=0;i<nclistlength(dapcomm->cdf.seqnodes);i++) {
+        CDFnode* seq = (CDFnode*)nclistget(dapcomm->cdf.seqnodes,i);
+	size_t seqsize;
+	CDFnode* sqdim = NULL;
+	CDFnode* container;
+	/* Does this sequence match the requirements for use ? */
+	seq->usesequence = 1; /* assume */
+	for(container=seq->container;container != NULL;container=container->container) {
+	    if(container->nctype == NC_Dataset) break;
+	    if(container->nctype != NC_Structure
+	       || nclistlength(container->array.dimset0) > 0)
+		{seq->usesequence = 0; break;}/* no good */
+	}	
+	/* Does the user want us to compute the actual sequence dim size? */
+	if(seq->usesequence && seqdims) {
+	    ncstat = getseqdimsize(dapcomm,seq,&seqsize);
+	    if(ncstat != NC_NOERR) {
+                /* Cannot read sequence; mark as unusable */
+	        seq->usesequence = 0;
+	    }
+	} else { /* !seqdims default to size = 1 */
+	    seqsize = 1; 
+	}
+	if(seq->usesequence) {
+	    /* Note: we are making the dimension in the dds root tree */
+            ncstat = makeseqdim(dapcomm,seq,seqsize,&sqdim);
+            if(ncstat) goto fail;
+            seq->array.seqdim = sqdim;
+	} else
+            seq->array.seqdim = NULL;
+    }
+
+fail:
+    return ncstat;
+}
+
+static NCerror
+getseqdimsize(NCDAPCOMMON* dapcomm, CDFnode* seq, size_t* sizep)
+{
+    NCerror ncstat = NC_NOERR;
+    OCerror ocstat = OC_NOERR;
+    OCconnection conn = dapcomm->oc.conn;
+    OCdata rootcontent = OCNULL;
+    OCobject ocroot;
+    CDFnode* dxdroot;
+    CDFnode* xseq;
+    NCbytes* seqcountconstraints = ncbytesnew();
+    size_t seqsize;
+
+    /* Read the minimal amount of data in order to get the count */
+    /* If the url is unconstrainable, then get the whole thing */
+    computeseqcountconstraints3(dapcomm,seq,seqcountconstraints);
+#ifdef DEBUG
+fprintf(stderr,"seqcountconstraints: %s\n",ncbytescontents(seqcountconstraints));
+#endif
+
+    /* Fetch the minimal data */
+    if(FLAGSET(dapcomm->controls,NCF_UNCONSTRAINABLE))
+        ocstat = dap_fetch(dapcomm,conn,NULL,OCDATADDS,&ocroot);
+    else
+        ocstat = dap_fetch(dapcomm,conn,ncbytescontents(seqcountconstraints),OCDATADDS,&ocroot);
+    if(ocstat) goto fail;
+
+    ncstat = buildcdftree34(dapcomm,ocroot,OCDATA,&dxdroot);
+    if(ncstat) goto fail;	
+    /* attach DATADDS to DDS */
+    ncstat = attach34(dxdroot,seq);
+    if(ncstat) goto fail;	
+
+    /* WARNING: we are now switching to datadds tree */
+    xseq = seq->attachment;
+    ncstat = countsequence(dapcomm,xseq,&seqsize);
+    if(ncstat) goto fail;
+
+#ifdef DEBUG
+fprintf(stderr,"sequencesize: %s = %lu\n",seq->ocname,(unsigned long)seqsize);
+#endif
+
+    /* throw away the fetch'd trees */
+    unattach34(dapcomm->cdf.ddsroot);
+    freecdfroot34(dxdroot);
+    if(ncstat != NC_NOERR) {
+        /* Cannot get DATADDDS*/
+	char* code;
+	char* msg;
+	long httperr;
+	oc_svcerrordata(dapcomm->oc.conn,&code,&msg,&httperr);
+	if(code != NULL) {
+	    nclog(NCLOGERR,"oc_fetch_datadds failed: %s %s %l",
+			code,msg,httperr);
+	}
+	ocstat = OC_NOERR;
+    }		
+    if(sizep) *sizep = seqsize;
+
+fail:
+    ncbytesfree(seqcountconstraints);
+    oc_data_free(conn,rootcontent);
+    if(ocstat) ncstat = ocerrtoncerr(ocstat);
+    return ncstat;
+}
+
+static NCerror
+makeseqdim(NCDAPCOMMON* dapcomm, CDFnode* seq, size_t count, CDFnode** sqdimp)
+{
+    CDFnode* sqdim;
+    CDFnode* root = seq->root;
+    CDFtree* tree = root->tree;
+
+    /* build the dimension with given size; keep the dimension anonymous */
+    sqdim = makecdfnode34(dapcomm,seq->ocname,OC_Dimension,OCNULL,root);
+    if(sqdim == NULL) return THROW(NC_ENOMEM);
+    nclistpush(tree->nodes,(ncelem)sqdim);
+    /* Assign a name to the sequence node */
+    sqdim->ncbasename = cdflegalname3(seq->ocname);
+    sqdim->ncfullname = nulldup(sqdim->ncbasename);
+    DIMFLAGSET(sqdim,CDFDIMSEQ);
+    sqdim->dim.declsize = count;
+    sqdim->dim.declsize0 = count;
+    sqdim->dim.array = seq;
+    if(sqdimp) *sqdimp = sqdim;
+    return NC_NOERR;
+}
+
+static NCerror
+countsequence(NCDAPCOMMON* dapcomm, CDFnode* xseq, size_t* sizep)
+{
+    unsigned int i;
+    NClist* path = nclistnew();
+    int index;
+    OCerror ocstat = OC_NOERR;
+    NCerror ncstat = NC_NOERR;
+    OCconnection conn = dapcomm->oc.conn;
+    size_t recordcount;
+    CDFnode* xroot;
+    CDFnode* current;
+    OCdata datacontainer = OCNULL;
+    OCmode mode;
+
+    ASSERT((xseq->nctype == NC_Sequence));
+
+    /* collect the path to the sequence node */
+    collectnodepath3(xseq,path,WITHDATASET);
+
+    /* Get tree root */
+    xroot = xseq->root;
+    datacontainer = oc_data_new(conn);
+    ocstat = oc_data_root(conn,xroot->tree->ocroot,datacontainer);
+    if(ocstat) goto fail;
+
+    /* walk to the sequence object; control the movement to the next node
+       based on mode */
+    current = (CDFnode*)nclistget(path,0);
+    for(i=0;;) {
+	OCdata child = OCNULL;
+        CDFnode* next = NULL;
+	ocstat = oc_data_mode(conn,datacontainer,&mode);
+	if(ocstat != OC_NOERR) goto fail;
+	switch (mode) {
+	case OCFIELDMODE:
+	    i++;
+	    next = (CDFnode*)nclistget(path,i);
+	    index = fieldindex(current,next);
+	    break;	    
+	case OCARRAYMODE:
+	    index = 0;
+	    break;
+	case OCSEQUENCEMODE:
+	    goto exitloop;
+	default:
+	    PANIC("unexpected mode");
+	    return NC_EINVAL;
+        }
+	child = oc_data_new(conn);
+	ocstat = oc_data_ith(conn,datacontainer,index,child);
+	if(ocstat) goto fail;
+	/* move to the next node only if it is defined */
+	if(next != NULL)
+	    current = next;
+	oc_data_free(conn,datacontainer);
+        datacontainer = child;
+    }
+exitloop:
+    ASSERT(current == xseq && mode == OCSEQUENCEMODE);
+    oc_data_count(conn,datacontainer,&recordcount);
+    if(sizep) *sizep = recordcount;
+
+fail:
+    oc_data_free(conn,datacontainer);
+    nclistfree(path);
+    if(ocstat) ncstat = ocerrtoncerr(ocstat);
+    return THROW(ncstat);
+}
+
+static int
+fieldindex(CDFnode* parent, CDFnode* child)
+{
+    unsigned int i;
+    for(i=0;i<nclistlength(parent->subnodes);i++) {
+	CDFnode* node = (CDFnode*)nclistget(parent->subnodes,i);
+	if(node == child) return i;
+    }
+    return -1;
+}
+
+NCerror
+showprojection3(NCDAPCOMMON* dapcomm, CDFnode* var)
+{
+    int i,rank;
+    NCerror ncstat = NC_NOERR;
+    NCbytes* projection = ncbytesnew();
+    NClist* path = nclistnew();
+    NC* drno = dapcomm->controller;
+
+    /* Collect the set of DDS node name forming the xpath */
+    collectnodepath3(var,path,WITHOUTDATASET);
+    for(i=0;i<nclistlength(path);i++) {
+        CDFnode* node = (CDFnode*)nclistget(path,i);
+	if(i > 0) ncbytescat(projection,".");
+	ncbytescat(projection,node->ocname);
+    }
+    /* Now, add the dimension info */
+    rank = nclistlength(var->array.dimset0);
+    for(i=0;i<rank;i++) {
+	CDFnode* dim = (CDFnode*)nclistget(var->array.dimset0,i);
+	char tmp[32];
+	ncbytescat(projection,"[");
+	snprintf(tmp,sizeof(tmp),"%lu",(unsigned long)dim->dim.declsize);
+	ncbytescat(projection,tmp);
+	ncbytescat(projection,"]");
+    }    
+    /* Define the attribute */
+    ncstat = nc_put_att_text(getncid(drno),var->ncid,
+                               "_projection",
+		               ncbyteslength(projection),
+			       ncbytescontents(projection));
+    return ncstat;
+}
+
+/*
+This is more complex than one might think. We want to find
+a path to a variable inside the given node so that we can
+ask for a single instance of that variable to minimize the
+amount of data we retrieve. However, we want to avoid passing
+through any nested sequence. This is possible because of the way
+that sequencecheck() works.
+TODO: some servers will not accept an unconstrained fetch, so
+make sure we always have a constraint.
+*/
+
+static NCerror
+computeseqcountconstraints3(NCDAPCOMMON* dapcomm, CDFnode* seq, NCbytes* seqcountconstraints)
+{
+    int i,j;
+    NClist* path = NULL;
+    CDFnode* var = NULL;
+
+    ASSERT(seq->nctype == NC_Sequence);
+    computeseqcountconstraints3r(dapcomm,seq,&var);
+
+    ASSERT((var != NULL));
+
+    /* Compute var path */
+    path = nclistnew();
+    collectnodepath3(var,path,WITHOUTDATASET);
+
+    /* construct the projection path using minimal index values */
+    for(i=0;i<nclistlength(path);i++) {
+	CDFnode* node = (CDFnode*)nclistget(path,i);
+	if(i > 0) ncbytescat(seqcountconstraints,".");
+	ncbytescat(seqcountconstraints,node->ocname);
+	if(node == seq) {
+	    /* Use the limit */
+	    if(node->sequencelimit > 0) {
+		char tmp[64];
+		snprintf(tmp,sizeof(tmp),"[0:%lu]",
+		         (unsigned long)(node->sequencelimit - 1));
+		ncbytescat(seqcountconstraints,tmp);
+	    }
+	} else if(nclistlength(node->array.dimset0) > 0) {
+	    int ndims = nclistlength(node->array.dimset0);
+	    for(j=0;j<ndims;j++) {
+		CDFnode* dim = (CDFnode*)nclistget(node->array.dimset0,j);
+		if(DIMFLAG(dim,CDFDIMSTRING)) {
+		    ASSERT((j == (ndims - 1)));
+		    break;
+		}
+		ncbytescat(seqcountconstraints,"[0]");
+	    }
+	}
+    }
+    /* Finally, add in any selection from the original URL */
+    if(dapcomm->oc.url->selection != NULL)
+        ncbytescat(seqcountconstraints,dapcomm->oc.url->selection);
+    nclistfree(path);
+    return NC_NOERR;    
+}
+
+
+/* Given an existing candidate, see if we prefer newchoice */
+static CDFnode*
+prefer(CDFnode* candidate, CDFnode* newchoice)
+{
+    nc_type newtyp;
+    nc_type cantyp;
+    int newisstring;
+    int canisstring;
+    int newisscalar;
+    int canisscalar;
+
+    /* always choose !null over null */
+    if(newchoice == NULL)
+	return candidate;
+    if(candidate == NULL)
+	return newchoice;
+
+    newtyp = newchoice->etype;
+    cantyp = candidate->etype;
+    newisstring = (newtyp == NC_STRING || newtyp == NC_URL);
+    canisstring = (cantyp == NC_STRING || cantyp == NC_URL);
+    newisscalar = (nclistlength(newchoice->array.dimset0) == 0);
+    canisscalar = (nclistlength(candidate->array.dimset0) == 0);
+
+    ASSERT(candidate->nctype == NC_Primitive && newchoice->nctype == NC_Primitive);
+    
+    /* choose non-string over string */
+    if(canisstring && !newisstring)
+	return newchoice;
+    if(!canisstring && newisstring)
+	return candidate;
+
+    /* choose scalar over array */
+    if(canisscalar && !newisscalar)
+	return candidate;
+    if(!canisscalar && newisscalar)
+	return candidate;
+
+    /* otherwise choose existing candidate */
+    return candidate;
+}
+
+/* computeseqcountconstraints3 recursive helper function */
+static void
+computeseqcountconstraints3r(NCDAPCOMMON* dapcomm, CDFnode* node, CDFnode** candidatep)
+{
+    CDFnode* candidate;
+    CDFnode* compound;
+    unsigned int i;
+
+    candidate = NULL;
+    compound = NULL;
+
+    for(i=0;i<nclistlength(node->subnodes);i++){
+        CDFnode* subnode = (CDFnode*)nclistget(node->subnodes,i);
+        if(subnode->nctype == NC_Structure || subnode->nctype == NC_Grid)
+	    compound = subnode; /* save for later recursion */
+	else if(subnode->nctype == NC_Primitive) {
+	    candidate = prefer(candidate,subnode);
+	}
+    }
+    if(candidate == NULL && compound == NULL) {
+	PANIC("cannot find candidate for seqcountconstraints for a sequence");
+    } else if(candidate != NULL && candidatep != NULL) {
+	*candidatep = candidate;
+    } else { /* compound != NULL by construction */
+	/* recurse on a nested grids or strucures */
+        computeseqcountconstraints3r(dapcomm,compound,candidatep);
+    }
+}
+
+
+static unsigned long
+cdftotalsize3(NClist* dimensions)
+{
+    unsigned int i;
+    unsigned long total = 1;
+    if(dimensions != NULL) {
+	for(i=0;i<nclistlength(dimensions);i++) {
+	    CDFnode* dim = (CDFnode*)nclistget(dimensions,i);
+	    total *= dim->dim.declsize;
+	}
+    }
+    return total;
+}
+
+/* Estimate variables sizes and then resort the variable list
+   by that size
+*/
+void
+estimatevarsizes3(NCDAPCOMMON* dapcomm)
+{
+    int ivar;
+    unsigned int rank;
+    size_t totalsize = 0;
+
+    for(ivar=0;ivar<nclistlength(dapcomm->cdf.varnodes);ivar++) {
+        CDFnode* var = (CDFnode*)nclistget(dapcomm->cdf.varnodes,ivar);
+	NClist* ncdims = var->array.dimset0;
+	rank = nclistlength(ncdims);
+	if(rank == 0) { /* use instance size of the type */
+	    var->estimatedsize = nctypesizeof(var->etype);
+#ifdef DEBUG1
+fprintf(stderr,"scalar %s.estimatedsize = %lu\n",
+	makecdfpathstring3(var,"."),var->estimatedsize);
+#endif
+	} else {
+	    unsigned long size = cdftotalsize3(ncdims);
+	    size *= nctypesizeof(var->etype);
+#ifdef DEBUG1
+fprintf(stderr,"array %s(%u).estimatedsize = %lu\n",
+	makecdfpathstring3(var,"."),rank,size);
+#endif
+	    var->estimatedsize = size;
+	}
+	totalsize += var->estimatedsize;
+    }
+#ifdef DEBUG1
+fprintf(stderr,"total estimatedsize = %lu\n",totalsize);
+#endif
+    dapcomm->cdf.totalestimatedsize = totalsize;
+}
+
+NCerror
+fetchtemplatemetadata3(NCDAPCOMMON* dapcomm)
+{
+    NCerror ncstat = NC_NOERR;
+    OCerror ocstat = OC_NOERR;
+    OCobject ocroot = OCNULL;
+    CDFnode* ddsroot = NULL;
+    char* ce = NULL;
+
+    /* Temporary hack: we need to get the selection string
+       from the url
+    */
+    /* Get (almost) unconstrained DDS; In order to handle functions
+       correctly, those selections must always be included
+    */
+    if(FLAGSET(dapcomm->controls,NCF_UNCONSTRAINABLE))
+	ce = NULL;
+    else
+        ce = nulldup(dapcomm->oc.url->selection);
+
+    /* Get selection constrained DDS */
+    ocstat = dap_fetch(dapcomm,dapcomm->oc.conn,ce,OCDDS,&ocroot);
+    if(ocstat != OC_NOERR) {
+	/* Special Hack. If the protocol is file, then see if
+           we can get the dds from the .dods file
+        */
+	if(strcmp(dapcomm->oc.url->protocol,"file") != 0) {
+	    THROWCHK(ocstat); goto done;
+	}
+	/* Fetch the data dds */
+        ocstat = dap_fetch(dapcomm,dapcomm->oc.conn,ce,OCDATADDS,&ocroot);
+        if(ocstat != OC_NOERR) {
+	    THROWCHK(ocstat); goto done;
+	}
+	/* Note what we did */
+	nclog(NCLOGWARN,"Cannot locate .dds file, using .dods file");
+    }
+
+    /* Get selection constrained DAS */
+    ocstat = dap_fetch(dapcomm,dapcomm->oc.conn,ce,OCDAS,&dapcomm->oc.ocdasroot);
+    if(ocstat != OC_NOERR) {
+	/* Ignore but complain */
+	nclog(NCLOGWARN,"Could not read DAS; ignored");
+        dapcomm->oc.ocdasroot = OCNULL;	
+	ocstat = OC_NOERR;
+    }
+
+    /* Construct our parallel dds tree */
+    ncstat = buildcdftree34(dapcomm,ocroot,OCDDS,&ddsroot);
+    if(ncstat != NC_NOERR) {THROWCHK(ncstat); goto done;}
+    dapcomm->cdf.fullddsroot = ddsroot;
+
+done:
+    nullfree(ce);
+    if(ocstat != OC_NOERR) ncstat = ocerrtoncerr(ocstat);
+    return ncstat;
+}
+
+NCerror
+fetchconstrainedmetadata3(NCDAPCOMMON* dapcomm)
+{
+    NCerror ncstat = NC_NOERR;
+    OCerror ocstat = OC_NOERR;
+    OCobject ocroot;
+    CDFnode* ddsroot; /* constrained */
+    char* ce = NULL;
+
+    if(FLAGSET(dapcomm->controls,NCF_UNCONSTRAINABLE))
+	ce = NULL;
+    else
+        ce = buildconstraintstring3(dapcomm->oc.dapconstraint);
+
+    {
+        ocstat = dap_fetch(dapcomm,dapcomm->oc.conn,ce,OCDDS,&ocroot);
+        if(ocstat != OC_NOERR) {THROWCHK(ocstat); goto fail;}
+
+        /* Construct our parallel dds tree; including attributes*/
+        ncstat = buildcdftree34(dapcomm,ocroot,OCDDS,&ddsroot);
+        if(ncstat) goto fail;
+
+	dapcomm->cdf.ddsroot = ddsroot;
+
+        if(!FLAGSET(dapcomm->controls,NCF_UNCONSTRAINABLE)) {
+            /* fix DAP server problem by adding back any missing grid structure nodes */
+            ncstat = regrid3(ddsroot,dapcomm->cdf.fullddsroot,dapcomm->oc.dapconstraint->projections);    
+            if(ncstat) goto fail;
+	}
+
+#ifdef DEBUG
+fprintf(stderr,"constrained:\n%s",dumptree(ddsroot));
+#endif
+
+        /* Combine DDS and DAS */
+	if(dapcomm->oc.ocdasroot != NULL) {
+            ncstat = dapmerge3(dapcomm,ddsroot,dapcomm->oc.ocdasroot);
+            if(ncstat != NC_NOERR) {THROWCHK(ncstat); goto fail;}
+	}
+
+        /* map the constrained DDS to the unconstrained DDS */
+        ncstat = mapnodes3(ddsroot,dapcomm->cdf.fullddsroot);
+        if(ncstat) goto fail;
+
+    }
+
+fail:
+    nullfree(ce);
+    if(ocstat != OC_NOERR) ncstat = ocerrtoncerr(ocstat);
+    return ncstat;
+}
+
+/* Suppress variables not in usable sequences*/
+NCerror
+suppressunusablevars3(NCDAPCOMMON* dapcomm)
+{
+    int i,j;
+    int found = 1;
+    NClist* path = nclistnew();
+
+    while(found) {
+	found = 0;
+	/* Walk backwards to aid removal semantics */
+	for(i=nclistlength(dapcomm->cdf.varnodes)-1;i>=0;i--) {
+	    CDFnode* var = (CDFnode*)nclistget(dapcomm->cdf.varnodes,i);
+	    /* See if this var is under an unusable sequence */
+	    nclistclear(path);
+	    collectnodepath3(var,path,WITHOUTDATASET);
+	    for(j=0;j<nclistlength(path);j++) {
+		CDFnode* node = (CDFnode*)nclistget(path,j);
+		if(node->nctype == NC_Sequence
+		   && !node->usesequence) {
+#ifdef DEBUG
+fprintf(stderr,"suppressing var in unusable sequence: %s.%s\n",node->ncfullname,var->ncbasename);
+#endif
+		    found = 1;
+		    break;
+		}
+	    }
+	    if(found) break;
+	}
+        if(found) nclistremove(dapcomm->cdf.varnodes,i);
+    }
+    nclistfree(path);
+    return NC_NOERR;
+}
+
+
+/*
+For variables which have a zero size dimension,
+make them invisible.
+*/
+NCerror
+fixzerodims3(NCDAPCOMMON* dapcomm)
+{
+    int i,j;
+    for(i=0;i<nclistlength(dapcomm->cdf.varnodes);i++) {
+	CDFnode* var = (CDFnode*)nclistget(dapcomm->cdf.varnodes,i);
+        NClist* ncdims = var->array.dimsetplus;
+	if(nclistlength(ncdims) == 0) continue;
+        for(j=0;j<nclistlength(ncdims);j++) {
+	    CDFnode* dim = (CDFnode*)nclistget(ncdims,j);
+	    if(dim->dim.declsize == 0) {
+	 	/* make node invisible */
+		var->visible = 0;
+		var->zerodim = 1;
+	    }
+	}
+    }
+    return NC_NOERR;
+}
+
+void
+applyclientparamcontrols3(NCDAPCOMMON* dapcomm)
+{
+    /* clear the flags */
+    CLRFLAG(dapcomm->controls,NCF_CACHE);
+    CLRFLAG(dapcomm->controls,NCF_PREFETCH);
+    CLRFLAG(dapcomm->controls,NCF_SHOWFETCH);
+    CLRFLAG(dapcomm->controls,NCF_NC3);
+    CLRFLAG(dapcomm->controls,NCF_NCDAP);
+
+    /* Turn on any default on flags */
+    SETFLAG(dapcomm->controls,DFALT_ON_FLAGS);    
+    SETFLAG(dapcomm->controls,(NCF_NC3|NCF_NCDAP));
+
+    /* enable/disable caching */
+    if(paramcheck34(dapcomm,"cache",NULL))
+	SETFLAG(dapcomm->controls,NCF_CACHE);
+    else if(paramcheck34(dapcomm,"nocache",NULL))
+	CLRFLAG(dapcomm->controls,NCF_CACHE);
+
+    /* enable/disable cache prefetch */
+    if(paramcheck34(dapcomm,"prefetch",NULL))
+	SETFLAG(dapcomm->controls,NCF_PREFETCH);
+    else if(paramcheck34(dapcomm,"noprefetch",NULL))
+	CLRFLAG(dapcomm->controls,NCF_PREFETCH);
+
+
+    if(FLAGSET(dapcomm->controls,NCF_UNCONSTRAINABLE))
+	SETFLAG(dapcomm->controls,NCF_CACHE);
+
+    if(paramcheck34(dapcomm,"show","fetch"))
+	SETFLAG(dapcomm->controls,NCF_SHOWFETCH);
+
+    nclog(NCLOGNOTE,"Caching=%d",FLAGSET(dapcomm->controls,NCF_CACHE));
+
+}
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/src_netcdf4/ncdaperr.c
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/src_netcdf4/ncdaperr.c	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/src_netcdf4/ncdaperr.c	(revision 1749)
@@ -0,0 +1,43 @@
+/*********************************************************************
+ *   Copyright 1993, UCAR/Unidata
+ *   See netcdf/COPYRIGHT file for copying and redistribution conditions.
+ *   $Header: /upc/share/CVS/netcdf-3/libncdap3/ncdaperr.c,v 1.10 2009/09/23 22:26:08 dmh Exp $
+ *********************************************************************/
+
+#include "ncdap3.h"
+
+NCerror
+ocerrtoncerr(OCerror ocerr)
+{
+    if(ocerr >= 0) return ocerr; /* really a system error*/
+    switch (ocerr) {
+    case OC_NOERR:	  return NC_NOERR;
+    case OC_EBADID:	  return NC_EBADID;
+    case OC_ECHAR:	  return NC_ECHAR;
+    case OC_EDIMSIZE:	  return NC_EDIMSIZE;
+    case OC_EEDGE:	  return NC_EEDGE;
+    case OC_EINVAL:	  return NC_EINVAL;
+    case OC_EINVALCOORDS: return NC_EINVALCOORDS;
+    case OC_ENOMEM:	  return NC_ENOMEM;
+    case OC_ENOTVAR:	  return NC_ENOTVAR;
+    case OC_EPERM:	  return NC_EPERM;
+    case OC_ESTRIDE:	  return NC_ESTRIDE;
+    case OC_EDAP:	  return NC_EDAP;
+    case OC_EXDR:	  return NC_EDAP;
+    case OC_ECURL:	  return NC_EIO;
+    case OC_EBADURL:	  return NC_EDAPURL;
+    case OC_EBADVAR:	  return NC_EDAP;
+    case OC_EOPEN:	  return NC_EIO;
+    case OC_EIO:	  return NC_EIO;
+    case OC_ENODATA:	  return NC_ENODATA;
+    case OC_EDAPSVC:	  return NC_EDAPSVC;
+    case OC_ENAMEINUSE:	  return NC_ENAMEINUSE;
+    case OC_EDAS:	  return NC_EDAS;
+    case OC_EDDS:	  return NC_EDDS;
+    case OC_EDATADDS:	  return NC_EDATADDS;
+    case OC_ERCFILE:	  return NC_EDAP;
+    case OC_ENOFILE:	  return NC_ECANTREAD;
+    default: break;
+    }
+    return NC_EDAP; /* default;*/
+}
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/src_netcdf4/ncdimscale.h
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/src_netcdf4/ncdimscale.h	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/src_netcdf4/ncdimscale.h	(revision 1749)
@@ -0,0 +1,12 @@
+/* This is part of the netCDF package.
+   Copyright 2011 University Corporation for Atmospheric Research/Unidata
+   See COPYRIGHT file for conditions of use.
+
+   Includes for some HDF5 stuff needed by tests.
+*/
+
+typedef struct hdf5_objid 
+{
+   unsigned long fileno[2]; /* file number */
+   haddr_t objno[2]; /* object number */
+} HDF5_OBJID_T; 
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/src_netcdf4/ncdispatch.h
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/src_netcdf4/ncdispatch.h	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/src_netcdf4/ncdispatch.h	(revision 1749)
@@ -0,0 +1,386 @@
+/*********************************************************************
+ *   Copyright 2010, UCAR/Unidata
+ *   See netcdf/COPYRIGHT file for copying and redistribution conditions.
+ *********************************************************************/
+
+/* $Id: ncdispatch.h,v 1.18 2010/06/01 20:11:59 dmh Exp $ */
+/* $Header: /upc/share/CVS/netcdf-3/libdispatch/ncdispatch.h,v 1.18 2010/06/01 20:11:59 dmh Exp $ */
+
+#ifndef _DISPATCH_H
+#define _DISPATCH_H
+
+#include "config.h"
+#include <stdlib.h>
+#include <stdio.h>
+#include <string.h>
+#include <assert.h>
+#ifdef USE_PARALLEL
+#include "netcdf_par.h"
+#endif
+#include "netcdf.h"
+#include "nc.h"
+#include "nc_uri.h"
+
+#define longtype ((sizeof(long) == sizeof(int) ? NC_INT : NC_INT64))
+
+extern int nc_get_vara_ubyte(int ncid, int varid,
+                  const size_t* start, const size_t* count,
+		  unsigned char* value);
+extern int nc_get_vara_ushort(int ncid, int varid,
+                  const size_t* start, const size_t* count,
+		  unsigned short* value);
+extern int nc_get_vara_uint(int ncid, int varid,
+                  const size_t* start, const size_t* count,
+		  unsigned int* value);
+extern int nc_get_vara_ulonglong(int ncid, int varid,
+                  const size_t* start, const size_t* count,
+		  unsigned long long* value);
+
+extern int nc_put_vara_ushort(int ncid, int varid,
+                  const size_t* start, const size_t* count,
+		  const unsigned short* value);
+extern int nc_put_vara_uint(int ncid, int varid,
+                  const size_t* start, const size_t* count,
+		  const unsigned int* value);
+extern int nc_put_vara_ulonglong(int ncid, int varid,
+                  const size_t* start, const size_t* count,
+		  const unsigned long long* value);
+
+#define X_INT_MAX	2147483647
+
+/* Given a filename, check its magic number */
+#define MAGIC_NUMBER_LEN 4
+#define MAGIC_HDF5_FILE 1
+#define MAGIC_HDF4_FILE 2
+#define MAGIC_CDF1_FILE 1 /* std classic format */
+#define MAGIC_CDF2_FILE 2 /* classic 64 bit */
+
+/* Define the mappings from fcn name types
+   to corresponding NC types. */
+#define T_text   NC_CHAR
+#define T_schar  NC_BYTE
+#define T_char   NC_CHAR
+#define T_short  NC_SHORT
+#define T_int    NC_INT
+#define T_float  NC_FLOAT
+#define T_double NC_DOUBLE
+#define T_ubyte  NC_UBYTE
+#define T_ushort NC_USHORT
+#define T_uint   NC_UINT
+#define T_longlong  NC_INT64
+#define T_ulonglong  NC_UINT64
+#ifdef USE_NETCDF4
+#define T_string NC_STRING
+#endif
+
+/* Synthetic type to handle special memtypes */
+#define T_uchar  NC_UBYTE
+#define T_long   longtype
+#define T_ulong   ulongtype
+
+/**************************************************/
+/* Define the known classes of dispatchers */
+/* Flags may be or'd => powers of 2*/
+#define NC_DISPATCH_NC3    1
+#define NC_DISPATCH_NC4    2
+#define NC_DISPATCH_NCD    4
+#define NC_DISPATCH_NCR    8
+
+/* Define a type for use when doing e.g. nc_get_vara_long, etc. */
+/* Should matche values in libsrc4/netcdf.h */
+#ifndef NC_UINT64
+#define	NC_UBYTE 	7	/* unsigned 1 byte int */
+#define	NC_USHORT 	8	/* unsigned 2-byte int */
+#define	NC_UINT 	9	/* unsigned 4-byte int */
+#define	NC_INT64 	10	/* signed 8-byte int */
+#define	NC_UINT64 	11	/* unsigned 8-byte int */
+#define	NC_STRING 	12	/* char* */
+#endif
+
+/* Define the range of Atomic types */
+#ifdef USE_NETCDF4
+#define ATOMICTYPEMAX NC_STRING
+#else
+#define ATOMICTYPEMAX NC_DOUBLE
+#endif
+
+/* Define an alias for int to indicate an error return */
+typedef int NCerror;
+
+/* Define a struct to hold the MPI info so it can be passed down the
+ * call stack. This is used internally by the netCDF library. It
+ * should not be used by netcdf users. */
+#ifdef USE_PARALLEL
+typedef struct NC_MPI_INFO {
+    MPI_Comm comm;
+    MPI_Info info;
+} NC_MPI_INFO;
+#endif
+
+/* Define known dispatch tables and initializers */
+
+/*Forward*/
+typedef struct NC_Dispatch NC_Dispatch;
+
+extern NC_Dispatch* NCSUBSTRATE_dispatch_table;
+extern int NCDISPATCH_initialize(void);
+
+extern NC_Dispatch* NC3_dispatch_table;
+extern int NC3_initialize(void);
+
+#ifdef USE_DAP
+extern NC_Dispatch* NCD3_dispatch_table;
+extern int NCD3_initialize(void);
+#endif
+
+#ifdef USE_NETCDF4
+
+extern NC_Dispatch* NC4_dispatch_table;
+extern int NC4_initialize(void);
+
+#ifdef USE_DAP
+extern NC_Dispatch* NCD4_dispatch_table;
+extern int NCD4_initialize(void);
+#endif
+
+#ifdef USE_CDMREMOTE
+extern NC_Dispatch* NCCR_dispatch_table;
+extern int NCCR_initialize(void);
+#endif
+
+#ifdef BUILD_RPC
+extern NC_Dispatch* NCRPC_dispatch_table;
+extern int NCRPC_initialize(void);
+#endif
+
+#endif /*USE_NETCDF4*/
+
+/* Vectors of ones and zeros */
+extern size_t nc_sizevector0[NC_MAX_DIMS];
+extern size_t nc_sizevector1[NC_MAX_DIMS];
+extern ptrdiff_t nc_ptrdiffvector1[NC_MAX_DIMS];
+
+/**************************************************/
+/* Forward */
+#ifndef USE_NETCDF4
+/* Taken from libsrc4/netcdf.h */
+struct nc_vlen_t;
+#define NC_NETCDF4 0x1000
+#define NC_CLASSIC_MODEL 0x0100
+#define NC_ENOPAR (-114)
+#endif /*USE_NETCDF4*/
+
+struct NC;
+
+/* WARNING: this must match libsrc4/netcdf.h */
+#ifndef USE_PARALLEL
+#ifndef MPI_Comm
+#define MPI_Comm int
+#define MPI_Info int
+#define MPI_COMM_WORLD 0
+#ifndef MPI_INFO_NULL
+#define MPI_INFO_NULL 0
+#endif
+#endif
+#endif
+
+int NC_create(const char *path, int cmode,
+	      size_t initialsz, int basepe, size_t *chunksizehintp, 
+	      int useparallel,void* mpi_info,
+	      int *ncidp);
+int NC_open(const char *path, int cmode,
+	    int basepe, size_t *chunksizehintp,
+	    int useparallel, void* mpi_info,
+	    int *ncidp);
+
+/* Expose the default vars and varm dispatch entries */
+extern int NCDEFAULT_get_vars(int, int, const size_t*,
+	       const size_t*, const ptrdiff_t*, void*, nc_type);
+extern int NCDEFAULT_put_vars(int, int, const size_t*,
+	       const size_t*, const ptrdiff_t*, const void*, nc_type);
+extern int NCDEFAULT_get_varm(int, int, const size_t*,
+               const size_t*, const ptrdiff_t*, const ptrdiff_t*,
+               void*, nc_type);
+extern int NCDEFAULT_put_varm(int, int, const size_t*,
+               const size_t*, const ptrdiff_t*, const ptrdiff_t*,
+               const void*, nc_type);
+
+/**************************************************/
+/* Forward */
+struct NCHDR;
+
+struct NC_Dispatch {
+
+int model; /* one of the NC_DISPATCH #'s above */
+
+int (*new_nc)(struct NC**); /* Create an nc instance;free is not needed,
+				because it can be done by close and abort*/
+
+/* Warning: these two will create appropriate NC instances
+   using new_nc dispatch function
+*/
+int (*create)(const char *path, int cmode,
+	  size_t initialsz, int basepe, size_t *chunksizehintp, 
+	  int use_parallel, void* parameters,
+	  struct NC_Dispatch* table, NC** ncp);
+int (*open)(const char *path, int mode,
+	    int basepe, size_t *chunksizehintp,
+	    int use_parallel, void* parameters,
+	    struct NC_Dispatch* table, NC** ncp);
+
+int (*redef)(int);
+int (*_enddef)(int,size_t,size_t,size_t,size_t);
+int (*sync)(int);
+int (*abort)(int);
+int (*close)(int);
+int (*set_fill)(int,int,int*);
+int (*inq_base_pe)(int,int*);
+int (*set_base_pe)(int,int);
+int (*inq_format)(int,int*);
+
+int (*inq)(int,int*,int*,int*,int*);
+int (*inq_type)(int, nc_type, char*, size_t*);
+
+int (*def_dim)(int, const char*, size_t, int*);
+int (*inq_dimid)(int, const char*, int*);
+int (*inq_dim)(int, int, char*, size_t*);
+int (*inq_unlimdim)(int ncid,  int *unlimdimidp);
+int (*rename_dim)(int, int, const char*);
+
+int (*inq_att)(int, int, const char*, nc_type*, size_t*);
+int (*inq_attid)(int, int, const char*, int*);
+int (*inq_attname)(int, int, int, char*);
+int (*rename_att)(int, int, const char*, const char*);
+int (*del_att)(int, int, const char*);
+int (*get_att)(int, int, const char*, void*, nc_type);
+int (*put_att)(int, int, const char*, nc_type, size_t, const void*, nc_type);
+
+int (*def_var)(int, const char*, nc_type, int, const int*, int*);
+int (*inq_varid)(int, const char*, int*);
+int (*rename_var)(int, int, const char*);
+
+int (*get_vara)(int, int, const size_t*, const size_t*, void*, nc_type);
+int (*put_vara)(int, int, const size_t*, const size_t*, const void*, nc_type);
+
+/* Added to solve Ferret performance problem with Opendap */
+int (*get_vars)(int, int, const size_t*, const size_t*, const ptrdiff_t*, void*, nc_type);
+int (*put_vars)(int, int, const size_t*, const size_t*, const ptrdiff_t*, const void*, nc_type);
+
+int (*get_varm)(int, int, const size_t*, const size_t*, const ptrdiff_t*, const ptrdiff_t*, void*, nc_type);
+int (*put_varm)(int, int, const size_t*, const size_t*, const ptrdiff_t*, const ptrdiff_t*, const void*, nc_type);
+
+
+int (*inq_var_all)(int ncid, int varid, char *name, nc_type *xtypep, 
+               int *ndimsp, int *dimidsp, int *nattsp, 
+               int *shufflep, int *deflatep, int *deflate_levelp,
+               int *fletcher32p, int *contiguousp, size_t *chunksizesp, 
+               int *no_fill, void *fill_valuep, int *endiannessp, 
+	       int *options_maskp, int *pixels_per_blockp);
+
+/* Note the following may still be invoked by netcdf client code
+   even when the file is a classic file
+*/
+#ifdef USE_NETCDF4
+int (*show_metadata)(int);
+int (*inq_unlimdims)(int, int*, int*);
+int (*var_par_access)(int, int, int);
+int (*inq_ncid)(int, const char*, int*);
+int (*inq_grps)(int, int*, int*);
+int (*inq_grpname)(int, char*);
+int (*inq_grpname_full)(int, size_t*, char*);
+int (*inq_grp_parent)(int, int*);
+int (*inq_grp_full_ncid)(int, const char*, int*);
+int (*inq_varids)(int, int* nvars, int*);
+int (*inq_dimids)(int, int* ndims, int*, int);
+int (*inq_typeids)(int, int* ntypes, int*);
+int (*inq_type_equal)(int, nc_type, int, nc_type, int*);
+int (*def_grp)(int, const char*, int*);
+int (*inq_user_type)(int, nc_type, char*, size_t*, nc_type*, size_t*, int*);
+int (*inq_typeid)(int, const char*, nc_type*);
+
+int (*def_compound)(int, size_t, const char*, nc_type*);
+int (*insert_compound)(int, nc_type, const char*, size_t, nc_type);
+int (*insert_array_compound)(int, nc_type, const char*, size_t, nc_type, int, const int*);
+int (*inq_compound_field)(int, nc_type, int, char*, size_t*, nc_type*, int*, int*);
+int (*inq_compound_fieldindex)(int, nc_type, const char*, int*);
+int (*def_vlen)(int, const char*, nc_type base_typeid, nc_type*);
+int (*put_vlen_element)(int, int, void*, size_t, const void*);
+int (*get_vlen_element)(int, int, const void*, size_t*, void*);
+int (*def_enum)(int, nc_type, const char*, nc_type*);
+int (*insert_enum)(int, nc_type, const char*, const void*);
+int (*inq_enum_member)(int, nc_type, int, char*, void*);
+int (*inq_enum_ident)(int, nc_type, long long, char*);
+int (*def_opaque)(int, size_t, const char*, nc_type*);
+int (*def_var_deflate)(int, int, int, int, int);
+int (*def_var_fletcher32)(int, int, int);
+int (*def_var_chunking)(int, int, int, const size_t*);
+int (*def_var_fill)(int, int, int, const void*);
+int (*def_var_endian)(int, int, int);
+int (*set_var_chunk_cache)(int, int, size_t, size_t, float);
+int (*get_var_chunk_cache)(int ncid, int varid, size_t *sizep, size_t *nelemsp, float *preemptionp);
+#endif /*USE_NETCDF4*/
+
+};
+
+/* Following functions must be handled as non-dispatch */
+#ifdef NONDISPATCH
+void(*nc_advise)(const char*cdf_routine_name,interr,const char*fmt,...);
+void(*nc_set_log_level)(int);
+const char* (*nc_inq_libvers)(void);
+const char* (*nc_strerror)(int);
+int(*nc_delete)(const char*path);
+int(*nc_delete_mp)(const char*path,intbasepe);
+#endif /*NONDISPATCH*/
+
+/* Define the common fields for NC and NC_FILE_INFO_T etc */
+typedef struct NCcommon {
+	int ext_ncid; /* uid << 16 */
+	int int_ncid; /* unspecified other id */
+	struct NC_Dispatch* dispatch;	
+	void* dispatchdata; /* per-protocol instance data */
+	char* path; /* as specified at open or create */
+	int   substrate; /* ncid for another protocol on which to build */
+} NCcommon;
+
+extern int NC_atomictypelen(nc_type xtype);
+extern char* NC_atomictypename(nc_type xtype);
+
+/* Provide an initializer */
+extern int NC_initialize(void);
+
+/* Provide a dispatch table overlay facility */
+extern int NC_dispatch_overlay(const NC_Dispatch* overlay,
+                                        const NC_Dispatch* base,
+					NC_Dispatch* merge);
+
+/* Get/set the override dispatch table */
+extern NC_Dispatch* NC_get_dispatch_override(void);
+extern void NC_set_dispatch_override(NC_Dispatch*);
+
+/* Does the path look like a url? */
+extern int NC_testurl(const char* path);
+/* Return model (0 or 3 or 4) as specified by the url */
+extern int NC_urlmodel(const char* path);
+
+/* allow access url parse and params without exposing nc_url.h */
+extern int NCDAP_urlparse(const char* s, void** dapurl);
+extern void NCDAP_urlfree(void* dapurl);
+extern const char* NCDAP_urllookup(void* dapurl, const char* param);
+
+/* Test for specific set of servers */
+extern const char* NC_findtestserver(const char*);
+/* Ping a specific server */
+extern int NCDAP_ping(const char*);
+
+/* Misc */
+
+extern int NC_getshape(int ncid, int varid, int ndims, size_t* shape);
+extern int NC_is_recvar(int ncid, int varid, size_t* nrecs);
+
+#define nullstring(s) (s==NULL?"(null)":s)
+
+extern size_t* NC_coord_zero;
+extern size_t* NC_coord_one;
+
+#endif /* _DISPATCH_H */
+
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/src_netcdf4/ncfunc.c
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/src_netcdf4/ncfunc.c	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/src_netcdf4/ncfunc.c	(revision 1749)
@@ -0,0 +1,100 @@
+/*
+
+This file is part of netcdf-4, a netCDF-like interface for HDF5, or a
+HDF5 backend for netCDF, depending on your point of view.
+
+This file handles the nc_ calls, calling the appropriate nc3 or nc4
+function, depending on ncid.
+
+Copyright 2003, University Corporation for Atmospheric Research. See
+netcdf-4/docs/COPYRIGHT file for copying and redistribution
+conditions.
+*/
+
+#include "nc4internal.h"
+#include "nc3dispatch.h"
+
+#ifdef IGNORE
+/* Keep a linked list of file info objects. */
+extern NC_FILE_INFO_T *nc_file;
+#endif
+
+#ifdef IGNORE
+/* This function deletes a member of parliment. Be careful! Last time
+ * this function was used, Labor got in! This function only does
+ * anything for netcdf-3 files. */
+
+int
+nc_delete(const char *path)
+{
+   return NC3_delete_mp(path, 0);
+}
+
+int
+nc_delete_mp(const char *path, int basepe)
+{
+   return NC3_delete_mp(path, basepe);
+}
+#endif
+
+/* This will return the length of a netcdf data type in bytes. Since
+   we haven't added any new types, I just call the v3 function.
+   Ed Hartnett 10/43/03
+*/
+
+/* This function only does anything for netcdf-3 files. */
+int
+NC4_set_base_pe(int ncid, int pe)
+{
+   NC_FILE_INFO_T *nc;
+   if (!(nc = nc4_find_nc_file(ncid)))
+      return NC_EBADID;
+   if (nc->nc4_info)
+      return NC_ENOTNC3;
+   return NC3_set_base_pe(nc->int_ncid,  pe);
+}
+
+/* This function only does anything for netcdf-3 files. */
+int
+NC4_inq_base_pe(int ncid, int *pe)
+{
+   NC_FILE_INFO_T *nc;
+   if (!(nc = nc4_find_nc_file(ncid)))
+      return NC_EBADID;
+   if (nc->nc4_info)
+      return NC_ENOTNC3;
+   return NC3_inq_base_pe(nc->int_ncid, pe);
+}
+
+/* Get the format (i.e. classic, 64-bit-offset, or netcdf-4) of an
+ * open file. */
+int
+NC4_inq_format(int ncid, int *formatp)
+{
+   NC_FILE_INFO_T *nc;
+
+   LOG((2, "nc_inq_format: ncid 0x%x", ncid));
+
+   if (!formatp)
+      return NC_NOERR;
+
+   /* Find the file metadata. */
+   if (!(nc = nc4_find_nc_file(ncid)))
+      return NC_EBADID;
+
+   /* If this isn't a netcdf-4 file, pass this call on to the netcdf-3
+    * library. */
+   if (!nc->nc4_info)
+      return NC3_inq_format(nc->int_ncid, formatp);
+   
+   /* Otherwise, this is a netcdf-4 file. Check if classic NC3 rules
+    * are in effect for this file. */
+   if (nc->nc4_info->cmode & NC_CLASSIC_MODEL)
+      *formatp = NC_FORMAT_NETCDF4_CLASSIC;
+   else
+      *formatp = NC_FORMAT_NETCDF4;
+
+   return NC_NOERR;
+}
+
+
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/src_netcdf4/nchashmap.c
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/src_netcdf4/nchashmap.c	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/src_netcdf4/nchashmap.c	(revision 1749)
@@ -0,0 +1,194 @@
+/*********************************************************************
+ *   Copyright 1993, UCAR/Unidata
+ *   See netcdf/COPYRIGHT file for copying and redistribution conditions.
+ *   $Header: /upc/share/CVS/netcdf-3/libncdap3/nchashmap.c,v 1.4 2009/09/23 22:26:08 dmh Exp $
+ *********************************************************************/
+#include <stdlib.h>
+#include <stdio.h>
+#include <string.h>
+
+#include "nchashmap.h"
+
+static ncelem ncDATANULL = (ncelem)0;
+
+#ifndef TRUE
+#define TRUE 1
+#endif
+#ifndef FALSE
+#define FALSE 0
+#endif
+
+#define DEFAULTALLOC 31
+
+NChashmap* nchashnew(void) {return nchashnew0(DEFAULTALLOC);}
+
+NChashmap* nchashnew0(int alloc)
+{
+  NChashmap* hm;
+  hm = (NChashmap*)malloc(sizeof(NChashmap));
+  if(!hm) return NULL;
+  hm->alloc = alloc;
+  hm->table = (NClist**)malloc(hm->alloc*sizeof(NClist*));
+  if(!hm->table) {free(hm); return NULL;}
+  memset((void*)hm->table,0,hm->alloc*sizeof(NClist*));
+  return hm;
+}
+
+int
+nchashfree(NChashmap* hm)
+{
+  if(hm) {
+    int i;
+    for(i=0;i<hm->alloc;i++) {
+	if(hm->table[i] != NULL) nclistfree(hm->table[i]);
+    }
+    free(hm->table);
+    free(hm);
+  }
+  return TRUE;
+}
+
+/* Insert a <nchashid,ncelem> pair into the table*/
+/* Fail if already there*/
+int
+nchashinsert(NChashmap* hm, nchashid hash, ncelem value)
+{
+    int i,offset,len;
+    NClist* seq;
+    ncelem* list;
+
+    offset = (hash % hm->alloc);    
+    seq = hm->table[offset];
+    if(seq == NULL) {seq = nclistnew(); hm->table[offset] = seq;}
+    len = nclistlength(seq);
+    list = nclistcontents(seq);
+    for(i=0;i<len;i+=2,list+=2) {
+	if(*list == hash) return FALSE;
+    }    
+    nclistpush(seq,(ncelem)hash);
+    nclistpush(seq,value);
+    hm->size++;
+    return TRUE;
+}
+
+/* Insert a <nchashid,ncelem> pair into the table*/
+/* Overwrite if already there*/
+int
+nchashreplace(NChashmap* hm, nchashid hash, ncelem value)
+{
+    int i,offset,len;
+    NClist* seq;
+    ncelem* list;
+
+    offset = (hash % hm->alloc);    
+    seq = hm->table[offset];
+    if(seq == NULL) {seq = nclistnew(); hm->table[offset] = seq;}
+    len = nclistlength(seq);
+    list = nclistcontents(seq);
+    for(i=0;i<len;i+=2,list+=2) {
+	if(*list == hash) {list[1] = value; return TRUE;}
+    }    
+    nclistpush(seq,(ncelem)hash);
+    nclistpush(seq,value);
+    hm->size++;
+    return TRUE;
+}
+
+/* remove a nchashid*/
+/* return TRUE if found, false otherwise*/
+int
+nchashremove(NChashmap* hm, nchashid hash)
+{
+    int i,offset,len;
+    NClist* seq;
+    ncelem* list;
+
+    offset = (hash % hm->alloc);    
+    seq = hm->table[offset];
+    if(seq == NULL) return TRUE;
+    len = nclistlength(seq);
+    list = nclistcontents(seq);
+    for(i=0;i<len;i+=2,list+=2) {
+	if(*list == hash) {
+	    nclistremove(seq,i+1);
+	    nclistremove(seq,i);
+	    hm->size--;
+	    if(nclistlength(seq) == 0) {nclistfree(seq); hm->table[offset] = NULL;}
+	    return TRUE;
+	}
+    }    
+    return FALSE;
+}
+
+/* lookup a nchashid; return DATANULL if not found*/
+/* (use hashlookup if the possible values include 0)*/
+ncelem
+nchashget(NChashmap* hm, nchashid hash)
+{
+    ncelem value;
+    if(!nchashlookup(hm,hash,&value)) return ncDATANULL;
+    return value;
+}
+
+int
+nchashlookup(NChashmap* hm, nchashid hash, ncelem* valuep)
+{
+    int i,offset,len;
+    NClist* seq;
+    ncelem* list;
+
+    offset = (hash % hm->alloc);    
+    seq = hm->table[offset];
+    if(seq == NULL) return TRUE;
+    len = nclistlength(seq);
+    list = nclistcontents(seq);
+    for(i=0;i<len;i+=2,list+=2) {
+	if(*list == hash) {if(valuep) {*valuep = list[1]; return TRUE;}}
+    }
+    return FALSE;
+}
+
+/* Return the ith pair; order is completely arbitrary*/
+/* Can be expensive*/
+int
+nchashith(NChashmap* hm, int index, nchashid* hashp, ncelem* elemp)
+{
+    int i;
+    if(hm == NULL) return FALSE;
+    for(i=0;i<hm->alloc;i++) {
+	NClist* seq = hm->table[i];
+	int len = nclistlength(seq) / 2;
+	if(len == 0) continue;
+	if((index - len) < 0) {
+	    if(hashp) *hashp = (nchashid)nclistget(seq,index*2);
+	    if(elemp) *elemp = nclistget(seq,(index*2)+1);
+	    return TRUE;
+	}
+	index -= len;
+    }
+    return FALSE;
+}
+
+/* Return all the keys; order is completely arbitrary*/
+/* Can be expensive*/
+int
+nchashkeys(NChashmap* hm, nchashid** keylist)
+{
+    int i,j,index;
+    nchashid* keys;
+    if(hm == NULL) return FALSE;
+    if(hm->size == 0) {
+	keys = NULL;
+    } else {
+        keys = (nchashid*)malloc(sizeof(nchashid)*hm->size);
+        for(index=0,i=0;i<hm->alloc;i++) {
+ 	    NClist* seq = hm->table[i];
+	    for(j=0;j<nclistlength(seq);j+=2) {	
+	        keys[index++] = (nchashid)nclistget(seq,j);
+	    }
+	}
+    }
+    if(keylist) {*keylist = keys;}
+    return TRUE;
+}
+
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/src_netcdf4/nchashmap.h
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/src_netcdf4/nchashmap.h	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/src_netcdf4/nchashmap.h	(revision 1749)
@@ -0,0 +1,60 @@
+/*********************************************************************
+ *   Copyright 1993, UCAR/Unidata
+ *   See netcdf/COPYRIGHT file for copying and redistribution conditions.
+ *   $Header: /upc/share/CVS/netcdf-3/libncdap3/nchashmap.h,v 1.4 2009/09/23 22:26:08 dmh Exp $
+ *********************************************************************/
+#ifndef NCHASHMAP_H
+#define NCHASHMAP_H 1
+
+#include "nclist.h"
+
+/* Define the type of the elements in the hashmap*/
+
+#if defined(_CPLUSPLUS_) || defined(__CPLUSPLUS__)
+#define EXTERNC extern "C"
+#else
+#define EXTERNC extern
+#endif
+
+typedef unsigned long nchashid;
+
+EXTERNC int nchashnull(ncelem);
+
+typedef struct NChashmap {
+  int alloc;
+  int size; /* # of pairs still in table*/
+  NClist** table;
+} NChashmap;
+
+EXTERNC NChashmap* nchashnew(void);
+EXTERNC NChashmap* nchashnew0(int);
+EXTERNC int nchashfree(NChashmap*);
+
+/* Insert a (ncnchashid,ncelem) pair into the table*/
+/* Fail if already there*/
+EXTERNC int nchashinsert(NChashmap*, nchashid nchash, ncelem value);
+
+/* Insert a (nchashid,ncelem) pair into the table*/
+/* Overwrite if already there*/
+EXTERNC int nchashreplace(NChashmap*, nchashid nchash, ncelem value);
+
+/* lookup a nchashid and return found/notfound*/
+EXTERNC int nchashlookup(NChashmap*, nchashid nchash, ncelem* valuep);
+
+/* lookup a nchashid and return 0 or the value*/
+EXTERNC ncelem nchashget(NChashmap*, nchashid nchash);
+
+/* remove a nchashid*/
+EXTERNC int nchashremove(NChashmap*, nchashid nchash);
+
+/* Return the ith pair; order is completely arbitrary*/
+/* Can be expensive*/
+EXTERNC int nchashith(NChashmap*, int i, nchashid*, ncelem*);
+
+EXTERNC int nchashkeys(NChashmap* hm, nchashid** keylist);
+
+/* return the # of pairs in table*/
+#define nchashsize(hm) ((hm)?(hm)->size:0)
+
+#endif /*NCHASHMAP_H*/
+
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/src_netcdf4/ncio.c
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/src_netcdf4/ncio.c	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/src_netcdf4/ncio.c	(revision 1749)
@@ -0,0 +1,132 @@
+/*
+ *	Copyright 1996, University Corporation for Atmospheric Research
+ *      See netcdf/COPYRIGHT file for copying and redistribution conditions.
+ */
+
+#include <config.h>
+#include <stdlib.h>
+
+#include "netcdf.h"
+#include "ncio.h"
+#include "fbits.h"
+
+/* With the advent of diskless io, we need to provide
+   for multiple ncio packages at the same time,
+   so we have multiple versions of ncio_create.
+*/
+
+/* Define known ncio packages */
+extern int posixio_create(const char*,int,size_t,off_t,size_t,size_t*,ncio**,void** const);
+extern int posixio_open(const char*,int,off_t,size_t,size_t*,ncio**,void** const);
+
+#ifdef USE_FFIO
+extern int ffio_create(const char*,int,size_t,off_t,size_t,size_t*,ncio**,void** const);
+extern int ffio_open(const char*,int,off_t,size_t,size_t*,ncio**,void** const);
+#endif
+
+#ifdef USE_DISKLESS
+#  ifdef USE_MMAP
+     extern int mmapio_create(const char*,int,size_t,off_t,size_t,size_t*,ncio**,void** const);
+     extern int mmapio_open(const char*,int,off_t,size_t,size_t*,ncio**,void** const);
+#  endif
+     extern int memio_create(const char*,int,size_t,off_t,size_t,size_t*,ncio**,void** const);
+     extern int memio_open(const char*,int,off_t,size_t,size_t*,ncio**,void** const);
+#endif
+
+int
+ncio_create(const char *path, int ioflags, size_t initialsz,
+                       off_t igeto, size_t igetsz, size_t *sizehintp,
+                       ncio** iopp, void** const mempp)
+{
+#ifdef USE_DISKLESS
+    if(fIsSet(ioflags,NC_DISKLESS)) {
+#  ifdef USE_MMAP
+      if(fIsSet(ioflags,NC_MMAP))
+        return mmapio_create(path,ioflags,initialsz,igeto,igetsz,sizehintp,iopp,mempp);
+      else
+#  endif /*USE_MMAP*/
+        return memio_create(path,ioflags,initialsz,igeto,igetsz,sizehintp,iopp,mempp);
+    }
+#endif
+
+#ifdef USE_FFIO
+    return ffio_create(path,ioflags,initialsz,igeto,igetsz,sizehintp,iopp,mempp);
+#else
+    return posixio_create(path,ioflags,initialsz,igeto,igetsz,sizehintp,iopp,mempp);
+#endif
+}
+
+int
+ncio_open(const char *path, int ioflags,
+                     off_t igeto, size_t igetsz, size_t *sizehintp,
+                     ncio** iopp, void** const mempp)
+{
+    /* Diskless open has the following constraints:
+       1. file must be classic version 1 or 2
+     */
+#ifdef USE_DISKLESS
+    if(fIsSet(ioflags,NC_DISKLESS)) {
+#  ifdef USE_MMAP
+      if(fIsSet(ioflags,NC_MMAP))
+        return mmapio_open(path,ioflags,igeto,igetsz,sizehintp,iopp,mempp);
+      else
+#  endif /*USE_MMAP*/
+        return memio_open(path,ioflags,igeto,igetsz,sizehintp,iopp,mempp);
+    }
+#endif
+#ifdef USE_FFIO
+    return ffio_open(path,ioflags,igeto,igetsz,sizehintp,iopp,mempp);
+#else
+    return posixio_open(path,ioflags,igeto,igetsz,sizehintp,iopp,mempp);
+#endif
+}
+
+/**************************************************/
+/* wrapper functions for the ncio dispatch table */
+
+int
+ncio_rel(ncio *const nciop, off_t offset, int rflags)
+{
+    return nciop->rel(nciop,offset,rflags);
+}
+
+int
+ncio_get(ncio *const nciop, off_t offset, size_t extent,
+			int rflags, void **const vpp)
+{
+    return nciop->get(nciop,offset,extent,rflags,vpp);
+}
+
+int
+ncio_move(ncio *const nciop, off_t to, off_t from, size_t nbytes, int rflags)
+{
+    return nciop->move(nciop,to,from,nbytes,rflags);
+}
+
+int
+ncio_sync(ncio *const nciop)
+{
+    return nciop->sync(nciop);
+}
+
+int
+ncio_filesize(ncio *nciop, off_t *filesizep)
+{
+    return nciop->filesize(nciop,filesizep);
+}
+
+int
+ncio_pad_length(ncio* nciop, off_t length)
+{
+    return nciop->pad_length(nciop,length);
+}
+
+int
+ncio_close(ncio *nciop, int doUnlink)
+{
+    /* close and release all resources associated
+       with nciop, including nciop
+    */
+    int status = nciop->close(nciop,doUnlink);
+    return status;
+}
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/src_netcdf4/ncio.h
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/src_netcdf4/ncio.h	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/src_netcdf4/ncio.h	(revision 1749)
@@ -0,0 +1,175 @@
+/*
+ *	Copyright 1996, University Corporation for Atmospheric Research
+ *	See netcdf/COPYRIGHT file for copying and redistribution conditions.
+ */
+/* $Id: ncio.h,v 1.27 2006/01/03 04:56:28 russ Exp $ */
+
+#ifndef _NCIO_H_
+#define _NCIO_H_
+
+#include <stddef.h>	/* size_t */
+#include <sys/types.h>	/* off_t */
+#include "netcdf.h"
+
+typedef struct ncio ncio;	/* forward reference */
+
+/*
+ * A value which is an invalid off_t
+ */
+#define OFF_NONE  ((off_t)(-1))
+
+/*
+ * Flags used by the region layer,
+ *  'rflags' argument to ncio.rel() and ncio.get().
+ */
+#define RGN_NOLOCK	0x1	/* Don't lock region.
+				 * Used when contention control handled
+				 * elsewhere.
+				 */
+#define RGN_NOWAIT	0x2	/* return immediate if can't lock, else wait */
+
+#define RGN_WRITE	0x4	/* we intend to modify, else read only */
+
+#define RGN_MODIFIED	0x8	/* we did modify, else, discard */
+
+
+/*
+ * The next four typedefs define the signatures
+ * of function pointers in struct ncio below.
+ * They are not used outside of this file and ncio.h,
+ * They just make some casts in the ncio.c more readable.
+ */
+	/*
+	 * Indicate that you are done with the region which begins
+	 * at offset. Only reasonable flag value is RGN_MODIFIED.
+	 */
+typedef int ncio_relfunc(ncio *const nciop,
+		 off_t offset, int rflags);
+
+	/*
+	 * Request that the region (offset, extent)
+	 * be made available through *vpp.
+	 */
+typedef int ncio_getfunc(ncio *const nciop,
+			off_t offset, size_t extent,
+			int rflags,
+			void **const vpp);
+
+	/*
+	 * Like memmove(), safely move possibly overlapping data.
+	 * Only reasonable flag value is RGN_NOLOCK.
+	 */
+typedef int ncio_movefunc(ncio *const nciop, off_t to, off_t from,
+			size_t nbytes, int rflags);
+
+	/*
+	 * Write out any dirty buffers to disk and
+	 * ensure that next read will get data from disk.
+	 */
+typedef int ncio_syncfunc(ncio *const nciop);
+
+/*
+ *  Sync any changes to disk, then truncate or extend file so its size
+ *  is length.  This is only intended to be called before close, if the
+ *  file is open for writing and the actual size does not match the
+ *  calculated size, perhaps as the result of having been previously
+ *  written in NOFILL mode.
+  */
+typedef int ncio_pad_lengthfunc(ncio* nciop, off_t length);
+
+/* 
+ *  Get file size in bytes.
+ */ 
+typedef int ncio_filesizefunc(ncio *nciop, off_t *filesizep);
+
+/* Write out any dirty buffers and
+   ensure that next read will not get cached data.
+   Sync any changes, then close the open file associated with the ncio
+   struct, and free its memory.
+   nciop - pointer to ncio to close.
+   doUnlink - if true, unlink file
+*/
+typedef int ncio_closefunc(ncio *nciop, int doUnlink);
+
+/* Get around cplusplus "const xxx in class ncio without constructor" error */
+#if defined(__cplusplus)
+#define NCIO_CONST
+#else
+#define NCIO_CONST const
+#endif
+
+/*
+ * netcdf i/o abstraction
+ */
+struct ncio {
+	/*
+	 * A copy of the ioflags argument passed in to ncio_open()
+	 * or ncio_create().
+	 */
+	int ioflags;
+
+	/*
+	 * The file descriptor of the netcdf file.
+	 * This gets handed to the user as the netcdf id.
+	 */
+	NCIO_CONST int fd;
+
+	/* member functions do the work */
+
+	ncio_relfunc *NCIO_CONST rel;
+
+	ncio_getfunc *NCIO_CONST get;
+
+	ncio_movefunc *NCIO_CONST move;
+
+	ncio_syncfunc *NCIO_CONST sync;
+
+	ncio_pad_lengthfunc *NCIO_CONST pad_length;
+
+	ncio_filesizefunc *NCIO_CONST filesize;
+
+	ncio_closefunc *NCIO_CONST close;
+
+	/*
+	 * A copy of the 'path' argument passed in to ncio_open()
+	 * or ncio_create(). Used by ncabort() to remove (unlink)
+	 * the file and by error messages.
+	 */
+	const char *path;
+
+	/* implementation private stuff */
+	void *pvt;
+};
+
+#undef NCIO_CONST
+
+/* Define wrappers around the ncio dispatch table */
+
+extern int ncio_rel(ncio* const, off_t, int);
+extern int ncio_get(ncio* const, off_t, size_t, int, void** const);
+extern int ncio_move(ncio* const, off_t, off_t, size_t, int);
+extern int ncio_sync(ncio* const);
+extern int ncio_filesize(ncio* const, off_t*);
+extern int ncio_pad_length(ncio* const, off_t);
+extern int ncio_close(ncio* const, int);
+
+extern int ncio_create(const char *path, int ioflags, size_t initialsz,
+                       off_t igeto, size_t igetsz, size_t *sizehintp,
+                       ncio** nciopp, void** const mempp);
+
+extern int ncio_open(const char *path, int ioflags,
+                     off_t igeto, size_t igetsz, size_t *sizehintp,
+                     ncio** nciopp, void** const mempp);
+
+/* With the advent of diskless io, we need to provide
+   for multiple ncio packages at the same time,
+   so we have multiple versions of ncio_create.
+   If you create a new package, the you must do the following.
+   1. add an extern definition for it in ncio.c
+   2. modify ncio_create and ncio_open in ncio.c to invoke
+      the new package when appropriate.
+*/
+
+
+
+#endif /* _NCIO_H_ */
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/src_netcdf4/nclist.c
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/src_netcdf4/nclist.c	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/src_netcdf4/nclist.c	(revision 1749)
@@ -0,0 +1,224 @@
+/* Copyright 2009, UCAR/Unidata and OPeNDAP, Inc.
+   See the COPYRIGHT file for more information. */
+#include <stdlib.h>
+#include <stdio.h>
+#include <string.h>
+
+#include "nclist.h"
+
+static ncelem ncDATANULL = (ncelem)0;
+/*static int ncinitialized=0;*/
+
+int nclistnull(ncelem e) {return e == ncDATANULL;}
+
+#ifndef TRUE
+#define TRUE 1
+#endif
+#ifndef FALSE
+#define FALSE 0
+#endif
+
+#define DEFAULTALLOC 16
+#define ALLOCINCR 16
+
+NClist* nclistnew(void)
+{
+  NClist* l;
+/*
+  if(!ncinitialized) {
+    memset((void*)&ncDATANULL,0,sizeof(ncelem));
+    ncinitialized = 1;
+  }
+*/
+  l = (NClist*)malloc(sizeof(NClist));
+  if(l) {
+    l->alloc=0;
+    l->length=0;
+    l->content=NULL;
+  }
+  return l;
+}
+
+int
+nclistfree(NClist* l)
+{
+  if(l) {
+    l->alloc = 0;
+    if(l->content != NULL) {free(l->content); l->content = NULL;}
+    free(l);
+  }
+  return TRUE;
+}
+
+int
+nclistsetalloc(NClist* l, unsigned int sz)
+{
+  ncelem* newcontent;
+  if(l == NULL) return FALSE;
+  if(sz <= 0) {sz = (l->length?2*l->length:DEFAULTALLOC);}
+  if(l->alloc >= sz) {return TRUE;}
+  newcontent=(ncelem*)calloc(sz,sizeof(ncelem));
+  if(l->alloc > 0 && l->length > 0 && l->content != NULL) {
+    memcpy((void*)newcontent,(void*)l->content,sizeof(ncelem)*l->length);
+  }
+  if(l->content != NULL) free(l->content);
+  l->content=newcontent;
+  l->alloc=sz;
+  return TRUE;
+}
+
+int
+nclistsetlength(NClist* l, unsigned int sz)
+{
+  if(l == NULL) return FALSE;
+  if(sz > l->alloc && !nclistsetalloc(l,sz)) return FALSE;
+  l->length = sz;
+  return TRUE;
+}
+
+ncelem
+nclistget(NClist* l, unsigned int index)
+{
+  if(l == NULL || l->length == 0) return ncDATANULL;
+  if(index >= l->length) return ncDATANULL;
+  return l->content[index];
+}
+
+int
+nclistset(NClist* l, unsigned int index, ncelem elem)
+{
+  if(l == NULL) return FALSE;
+  if(index >= l->length) return FALSE;
+  l->content[index] = elem;
+  return TRUE;
+}
+
+/* Insert at position i of l; will push up elements i..|seq|. */
+int
+nclistinsert(NClist* l, unsigned int index, ncelem elem)
+{
+  int i; /* do not make unsigned */
+  if(l == NULL) return FALSE;
+  if(index > l->length) return FALSE;
+  nclistsetalloc(l,0);
+  for(i=(int)l->length;i>index;i--) l->content[i] = l->content[i-1];
+  l->content[index] = elem;
+  l->length++;
+  return TRUE;
+}
+
+int
+nclistpush(NClist* l, ncelem elem)
+{
+  if(l == NULL) return FALSE;
+  if(l->length >= l->alloc) nclistsetalloc(l,0);
+  l->content[l->length] = elem;
+  l->length++;
+  return TRUE;
+}
+
+ncelem
+nclistpop(NClist* l)
+{
+  if(l == NULL || l->length == 0) return ncDATANULL;
+  l->length--;  
+  return l->content[l->length];
+}
+
+ncelem
+nclisttop(NClist* l)
+{
+  if(l == NULL || l->length == 0) return ncDATANULL;
+  return l->content[l->length - 1];
+}
+
+ncelem
+nclistremove(NClist* l, unsigned int i)
+{
+  unsigned int len;
+  ncelem elem;
+  if(l == NULL || (len=l->length) == 0) return ncDATANULL;
+  if(i >= len) return ncDATANULL;
+  elem = l->content[i];
+  for(i+=1;i<len;i++) l->content[i-1] = l->content[i];
+  l->length--;
+  return elem;  
+}
+
+/* Duplicate and return the content (null terminate) */
+ncelem*
+nclistdup(NClist* l)
+{
+    ncelem* result = (ncelem*)malloc(sizeof(ncelem)*(l->length+1));
+    memcpy((void*)result,(void*)l->content,sizeof(ncelem)*l->length);
+    result[l->length] = (ncelem)0;
+    return result;
+}
+
+int
+nclistcontains(NClist* list, ncelem elem)
+{
+    unsigned int i;
+    for(i=0;i<nclistlength(list);i++) {
+	if(elem == nclistget(list,i)) return 1;
+    }
+    return 0;
+}
+
+/* Remove element by value; only removes first encountered */
+int
+nclistelemremove(NClist* l, ncelem elem)
+{
+  unsigned int len;
+  unsigned int i;
+  int found = 0;
+  if(l == NULL || (len=l->length) == 0) return ncDATANULL;
+  for(i=0;i<nclistlength(l);i++) {
+    ncelem candidate = l->content[i];
+    if(elem == candidate) {
+      for(i+=1;i<len;i++) l->content[i-1] = l->content[i];
+      l->length--;
+      found = 1;
+      break;
+    }
+  }
+  return found;
+}
+
+
+
+
+/* Extends nclist to include a unique operator 
+   which remove duplicate values; NULL values removed
+   return value is always 1.
+*/
+
+int
+nclistunique(NClist* list)
+{
+    unsigned int i,j,k,len;
+    ncelem* content;
+    if(list == NULL || list->length == 0) return 1;
+    len = list->length;
+    content = list->content;
+    for(i=0;i<len;i++) {
+        for(j=i+1;j<len;j++) {
+	    if(content[i] == content[j]) {
+		/* compress out jth element */
+                for(k=j+1;k<len;k++) content[k-1] = content[k];	
+		len--;
+	    }
+	}
+    }
+    list->length = len;
+    return 1;
+}
+
+NClist*
+nclistclone(NClist* list)
+{
+    NClist* clone = nclistnew();
+    *clone = *list;
+    clone->content = nclistdup(list);
+    return clone;
+}
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/src_netcdf4/nclist.h
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/src_netcdf4/nclist.h	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/src_netcdf4/nclist.h	(revision 1749)
@@ -0,0 +1,67 @@
+/* Copyright 2009, UCAR/Unidata and OPeNDAP, Inc.
+   See the COPYRIGHT file for more information. */
+#ifndef NCLIST_H
+#define NCLIST_H 1
+
+/* Define the type of the elements in the list*/
+
+#if defined(_CPLUSPLUS_) || defined(__CPLUSPLUS__)
+#define EXTERNC extern "C"
+#else
+#define EXTERNC extern
+#endif
+
+typedef unsigned long ncelem;
+
+EXTERNC int nclistnull(ncelem);
+
+typedef struct NClist {
+  unsigned int alloc;
+  unsigned int length;
+  ncelem* content;
+} NClist;
+
+EXTERNC NClist* nclistnew(void);
+EXTERNC int nclistfree(NClist*);
+EXTERNC int nclistsetalloc(NClist*,unsigned int);
+EXTERNC int nclistsetlength(NClist*,unsigned int);
+
+/* Set the ith element */
+EXTERNC int nclistset(NClist*,unsigned int,ncelem);
+/* Get value at position i */
+EXTERNC ncelem nclistget(NClist*,unsigned int);/* Return the ith element of l */
+/* Insert at position i; will push up elements i..|seq|. */
+EXTERNC int nclistinsert(NClist*,unsigned int,ncelem);
+/* Remove element at position i; will move higher elements down */
+EXTERNC ncelem nclistremove(NClist* l, unsigned int i);
+
+/* Tail operations */
+EXTERNC int nclistpush(NClist*,ncelem); /* Add at Tail */
+EXTERNC ncelem nclistpop(NClist*);
+EXTERNC ncelem nclisttop(NClist*);
+
+/* Duplicate and return the content (null terminate) */
+EXTERNC ncelem* nclistdup(NClist*);
+
+/* Look for value match */
+EXTERNC int nclistcontains(NClist*, ncelem);
+
+/* Remove element by value; only removes first encountered */
+EXTERNC int nclistelemremove(NClist* l, ncelem elem);
+
+
+/* remove duplicates */
+EXTERNC int nclistunique(NClist*);
+
+/* Create a clone of a list */
+EXTERNC NClist* nclistclone(NClist*);
+
+/* Following are always "in-lined"*/
+#define nclistclear(l) nclistsetlength((l),0U)
+#define nclistextend(l,len) nclistsetalloc((l),(len)+(l->alloc))
+#define nclistcontents(l) ((l)->content)
+#define nclistlength(l)  ((l)?(l)->length:0U)
+
+#endif /*NCLIST_H*/
+
+
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/src_netcdf4/nclistmgr.c
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/src_netcdf4/nclistmgr.c	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/src_netcdf4/nclistmgr.c	(revision 1749)
@@ -0,0 +1,80 @@
+/*********************************************************************
+   Copyright 2010, UCAR/Unidata See netcdf/COPYRIGHT file for
+   copying and redistribution conditions.
+ *********************************************************************/
+
+#include <config.h>
+#include <stdlib.h>
+#include <string.h>
+#include <assert.h>
+#include "nc.h"
+
+#define ID_SHIFT (16)
+#define NCFILELISTLENGTH 0x10000
+/* Version one just allocates the max space (sizeof(NC*)*2^16)*/
+static NC** nc_filelist = NULL;
+
+static int numfiles = 0;
+
+/* Common */
+int
+count_NCList(void)
+{
+    return numfiles;
+}
+
+
+void
+free_NCList(void)
+{
+    if(numfiles > 0) return; /* not empty */
+    if(nc_filelist != NULL) free(nc_filelist);
+    nc_filelist = NULL;
+}
+
+int
+add_to_NCList(NC* ncp)
+{
+    int i;
+    int new_id;
+    if(nc_filelist == NULL) {
+	if (!(nc_filelist = calloc(1, sizeof(NC*)*NCFILELISTLENGTH)))
+	    return NC_ENOMEM;
+	numfiles = 0;
+    }
+    new_id = 0; /* id's begin at 1 */
+    for(i=1;i<0x10000;i++) {
+	if(nc_filelist[i] == NULL) {new_id = i; break;}
+    }
+    if(new_id == 0) return NC_ENOMEM; /* no more slots */
+    nc_filelist[new_id] = ncp;
+    numfiles++;
+    new_id = (new_id << ID_SHIFT);
+    ncp->ext_ncid = new_id;
+    return NC_NOERR;
+}
+
+void
+del_from_NCList(NC* ncp)
+{
+   unsigned int ncid = ((unsigned int)ncp->ext_ncid) >> ID_SHIFT;
+   if(numfiles == 0 || ncid == 0 || nc_filelist == NULL) return;
+   if(nc_filelist[ncid] != ncp) return;
+   nc_filelist[ncid] = NULL;
+   numfiles--;
+
+   /* If all files have been closed, release the filelist memory. */
+   if (numfiles == 0)
+      free_NCList();
+}
+
+NC *
+find_in_NCList(int ext_ncid)
+{
+   NC* f = NULL;
+   unsigned int ncid = ((unsigned int)ext_ncid) >> ID_SHIFT;
+   if(numfiles > 0 && nc_filelist != NULL && ncid < NCFILELISTLENGTH)
+	f = nc_filelist[ncid];
+   return f;
+}
+
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/src_netcdf4/nclog.h
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/src_netcdf4/nclog.h	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/src_netcdf4/nclog.h	(revision 1749)
@@ -0,0 +1,31 @@
+/*********************************************************************
+ *   Copyright 2010, UCAR/Unidata
+ *   See netcdf/COPYRIGHT file for copying and redistribution conditions.
+ *   $Header$
+ *********************************************************************/
+
+#ifndef NCLOG_H
+#define NCLOG_H
+
+#define ENVFLAG "NCLOGFILE"
+
+/* Suggested tag values */
+#define NCLOGNOTE 0
+#define NCLOGWARN 1
+#define NCLOGERR 2
+#define NCLOGDBG 3
+
+extern void ncloginit(void);
+extern void ncsetlogging(int tf);
+extern void nclogopen(const char* file);
+extern void nclogclose(void);
+
+/* The tag value is an arbitrary integer */
+extern void nclog(int tag, const char* fmt, ...);
+extern void nclogtext(int tag, const char* text);
+extern void nclogtextn(int tag, const char* text, size_t count);
+
+/* Provide printable names for tags */
+extern void nclogsettags(char** tagset, char* dfalt);
+
+#endif /*NCLOG_H*/
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/src_netcdf4/nctime.c
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/src_netcdf4/nctime.c	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/src_netcdf4/nctime.c	(revision 1749)
@@ -0,0 +1,1169 @@
+/*********************************************************************
+ *   Copyright 2008, University Corporation for Atmospheric Research
+ *   See netcdf/COPYRIGHT file for copying and redistribution conditions.
+ *   $Id: nctime.c,v 1.9 2010/05/05 22:15:39 dmh Exp $
+ *********************************************************************/
+
+/* 
+ * This code was extracted with permission from the CDMS time
+ * conversion and arithmetic routines developed by Bob Drach, Lawrence
+ * Livermore National Laboratory as part of the cdtime library.  Russ
+ * Rew of the UCAR Unidata Program made changes and additions to
+ * support the "-t" option of the netCDF ncdump utility, including a
+ * 366-day climate calendar.
+ *
+ * For the complete time conversion and climate calendar facilities of
+ * the CDMS library, get the original sources from LLNL.
+ */
+
+#include <stdlib.h>
+#include <stdio.h>
+#include <ctype.h>
+#include <math.h>
+#include <string.h>
+#include <stdarg.h>
+#include <assert.h>
+#include "nctime.h"
+
+static int cuErrOpts;			     /* Error options */
+static int cuErrorOccurred = 0;		     /* True iff cdError was called */
+
+#define CU_FATAL 1			     /* Exit immediately on fatal error */
+#define CU_VERBOSE 2			     /* Report errors */
+
+#define CD_DEFAULT_BASEYEAR "1979"	     /* Default base year for relative time (no 'since' clause) */
+#define VALCMP(a,b) ((a)<(b)?-1:(b)<(a)?1:0)
+
+/* forward declarations */
+static void cdComp2Rel(cdCalenType timetype, cdCompTime comptime, char* relunits, double* reltime);
+static void cdRel2CompMixed(double reltime, cdUnitTime unit, cdCompTime basetime, cdCompTime *comptime);
+static void cdRel2Comp(cdCalenType timetype, char* relunits, double reltime, cdCompTime* comptime);
+
+/* Trim trailing whitespace, up to n characters. */
+/* If no whitespace up to the last character, set */
+/* the last character to null, else set the first */
+/* whitespace character to null. */
+static void
+cdTrim(char* s, int n)
+{
+	char* c;
+
+	if(s==NULL)
+		return;
+	for(c=s; *c && c<s+n-1 && !isspace(*c); c++);
+	*c='\0';
+	return;
+}
+
+static
+void cdError(char *fmt, ...){
+	va_list args;
+	
+	cuErrorOccurred = 1;
+	if(cuErrOpts & CU_VERBOSE){
+		va_start(args,fmt);
+		fprintf(stderr, "CDMS error: ");
+		vfprintf(stderr, fmt, args);
+		fprintf(stderr, "\n");
+		va_end(args);
+	}
+	if(cuErrOpts & CU_FATAL)
+		exit(1);
+	return;
+}
+
+#define ISLEAP(year,timeType)	((timeType & Cd366) || (((timeType) & CdHasLeap) && (!((year) % 4) && (((timeType) & CdJulianType) || (((year) % 100) || !((year) % 400))))))
+static int mon_day_cnt[12] = {31,28,31,30,31,30,31,31,30,31,30,31};
+static int days_sum[12] = {0,31,59,90,120,151,181,212,243,273,304,334};
+
+/* Compute month and day from year and day-of-year.
+ *
+ *	Input:
+ *		doy	     (int)  (day-of-year)
+ *		date->year   (long)  (year since 0 BC)
+ *              date->timeType (CdTimetype) (time type)
+ *              date->baseYear   base year for relative times
+ *	Output: 
+ *		date->month  (short)  (month in year) 
+ *		date->day    (short)  (day in month)
+ *
+ * 
+ * Derived from NRL NEONS V3.6.
+ */
+
+static void
+CdMonthDay(int *doy, CdTime *date)
+{
+	int i;				/* month counter */
+	int idoy;			/* day of year counter */
+	long year;
+
+	if ((idoy = *doy) < 1) {
+		date->month = 0;
+		date->day   = 0;
+		return;
+	}
+
+	if(!(date->timeType & CdChronCal))   /* Ignore year for Clim calendar */
+		year = 0;
+	else if(!(date->timeType & CdBase1970))	/* year is offset from base for relative time */
+		year = date->baseYear + date->year;
+	else
+		year = date->year;
+
+	if (ISLEAP(year,date->timeType)) {
+		mon_day_cnt[1] = 29;
+	} else {
+		mon_day_cnt[1] = 28;
+	}
+	date->month	= 0;
+	for (i = 0; i < 12; i++) {
+		(date->month)++;
+		date->day	= idoy;
+		if ((idoy -= ((date->timeType & Cd365) ? (mon_day_cnt[date->month-1]) : 30)) <= 0) {
+			return;
+		}
+	}
+	return;
+}
+
+/* Compute day-of-year from year, month and day
+ * 
+ *	Input:
+ *		date->year  (long)  (year since 0 BC)
+ *		date->month (short)  (month in year)
+ *		date->day   (short)  (day in month)
+ *              date->baseYear   base year for relative times
+ *	Output: doy         (int)  (day-of-year)
+ * 
+ * Derived from NRL NEONS V3.6
+ */
+
+static void
+CdDayOfYear(CdTime *date, int *doy)
+{
+	int leap_add = 0;		/* add 1 day if leap year */
+	int month;			/* month */
+	long year;
+
+   	month	= date->month;
+	if (month < 1 || month > 12) {
+		cdError( "Day-of-year error; month: %d\n", month);
+		month = 1;	
+	}
+
+	if(!(date->timeType & CdChronCal))   /* Ignore year for Clim calendar */
+		year = 0;
+	else if(!(date->timeType & CdBase1970))	/* year is offset from base for relative time */
+		year = date->baseYear + date->year;
+	else
+		year = date->year;
+
+	if (ISLEAP(year,date->timeType) && month > 2) leap_add = 1;
+	if( ((date->timeType) & Cd365) || ((date->timeType) & Cd366) ) {
+	    *doy = days_sum[month-1] + date->day + leap_add ;
+	} else {		/* date->timeType & Cd360 */
+	    *doy = 30*(month-1) + date->day + leap_add ;
+	}
+	return;
+}
+
+/* Convert epochal time (hours since 00 jan 1, 1970)
+ *   to human time (structured)
+ * 
+ * Input: 
+ *   etime = epochal time representation
+ *   timeType = time type (e.g., CdChron, CdClim, etc.) as defined in cdms.h
+ *   baseYear = base real, used for relative time types only
+ * 
+ * Output: htime = human (structured) time representation
+ * 
+ * Derived from NRL Neons V3.6
+ */
+void
+Cde2h(double etime, CdTimeType timeType, long baseYear, CdTime *htime)
+{
+	long 	ytemp;			/* temporary year holder */
+	int 	yr_day_cnt;		/* count of days in year */
+	int 	doy;			/* day of year */
+	int     daysInLeapYear;		     /* number of days in a leap year */
+	int     daysInYear;		     /* days in non-leap year */
+	extern void CdMonthDay(int *doy, CdTime *date);
+
+	doy	= (long) floor(etime / 24.) + 1;
+	htime->hour	= etime - (double) (doy - 1) * 24.;
+
+					     /* Correct for goofy floor func on J90 */
+	if(htime->hour >= 24.){
+		doy += 1;
+		htime->hour -= 24.;
+	}
+
+	htime->baseYear = (timeType & CdBase1970) ? 1970 : baseYear;
+	if(!(timeType & CdChronCal)) htime->baseYear = 0; /* Set base year to 0 for Clim */
+	if(timeType & Cd366) {
+	    daysInLeapYear = 366;
+	    daysInYear = 366;
+	} else {
+	    daysInLeapYear = (timeType & Cd365) ? 366 : 360;
+	    daysInYear = (timeType & Cd365) ? 365 : 360;
+	}
+
+	if (doy > 0) {
+		for (ytemp = htime->baseYear; ; ytemp++) {
+			yr_day_cnt = ISLEAP(ytemp,timeType) ? daysInLeapYear : daysInYear;
+			if (doy <= yr_day_cnt) break;
+			doy -= yr_day_cnt;
+		}
+	} else {
+		for (ytemp = htime->baseYear-1; ; ytemp--) {
+			yr_day_cnt = ISLEAP(ytemp,timeType) ? daysInLeapYear : daysInYear;
+			doy += yr_day_cnt;
+			if (doy > 0) break;
+		}
+	}
+        htime->year = (timeType & CdBase1970) ? ytemp : (ytemp - htime->baseYear);
+	if(!(timeType & CdChronCal)) htime->year = 0; /* Set year to 0 for Clim */
+	htime->timeType = timeType;
+	CdMonthDay(&doy,htime);
+
+        return;
+}
+
+/* Add 'nDel' times 'delTime' to epochal time 'begEtm',
+ * return the result in epochal time 'endEtm'.
+ */
+static void
+CdAddDelTime(double begEtm, long nDel, CdDeltaTime delTime, CdTimeType timeType,
+	     long baseYear, double *endEtm)
+{
+	double delHours;
+	long delMonths, delYears;
+	CdTime bhtime, ehtime;
+
+	extern void Cde2h(double etime, CdTimeType timeType, long baseYear, CdTime *htime);
+	extern void Cdh2e(CdTime *htime, double *etime);
+
+	switch(delTime.units){
+	  case CdYear:
+		delMonths = 12;
+		break;
+	  case CdSeason:
+		delMonths = 3;
+		break;
+	  case CdMonth:
+		delMonths = 1;
+		break;
+	  case CdWeek:
+		delHours = 168.0;
+		break;
+	  case CdDay:
+		delHours = 24.0;
+		break;
+	  case CdHour:
+		delHours = 1.0;
+		break;
+	  case CdMinute:
+		delHours = 1./60.;
+		break;
+	  case CdSecond:
+		delHours = 1./3600.;
+		break;
+	  default:
+		cdError("Invalid delta time units: %d\n",delTime.units);
+		return;
+	}
+
+	switch(delTime.units){
+	  case CdYear: case CdSeason: case CdMonth:
+		Cde2h(begEtm,timeType,baseYear,&bhtime);
+		delMonths = delMonths * nDel * delTime.count + bhtime.month - 1;
+		delYears = (delMonths >= 0 ? (delMonths/12) : (delMonths+1)/12 - 1);
+		ehtime.year = bhtime.year + delYears;
+		ehtime.month = delMonths - (12 * delYears) + 1;
+		ehtime.day = 1;
+		ehtime.hour = 0.0;
+		ehtime.timeType = timeType;
+		ehtime.baseYear = !(timeType & CdChronCal) ? 0 :
+			(timeType & CdBase1970) ? 1970 : baseYear; /* base year is 0 for Clim, */
+								   /* 1970 for Chron, */
+								   /* or input base year for Rel */
+		Cdh2e(&ehtime,endEtm);
+		break;
+	  case CdWeek: case CdDay: case CdHour: case CdMinute: case CdSecond:
+		delHours *= (nDel * delTime.count);
+		*endEtm = begEtm + delHours;
+		break;
+	  default: break;
+	}
+	return;
+}
+
+/* Parse relative units, returning the unit and base component time. */
+/* Function returns 1 if error, 0 on success */
+int
+cdParseRelunits(cdCalenType timetype, char* relunits, cdUnitTime* unit, cdCompTime* base_comptime)
+{
+	char charunits[CD_MAX_RELUNITS];
+	char basetime_1[CD_MAX_CHARTIME];
+	char basetime_2[CD_MAX_CHARTIME];
+	char basetime[CD_MAX_CHARTIME];
+	int nconv1, nconv2, nconv;
+
+					     /* Parse the relunits */
+	/* Allow ISO-8601 "T" date-time separator as well as blank separator */
+	nconv1 = sscanf(relunits,"%s since %[^T]T%s",charunits,basetime_1,basetime_2);
+	if(nconv1==EOF || nconv1==0){
+		cdError("Error on relative units conversion, string = %s\n",relunits);
+		return 1;
+	}
+	nconv2 = sscanf(relunits,"%s since %s %s",charunits,basetime_1,basetime_2);
+	if(nconv2==EOF || nconv2==0){
+		cdError("Error on relative units conversion, string = %s\n",relunits);
+		return 1;
+	}
+	if(nconv1 < nconv2) {
+	    nconv = nconv2;
+	} else {
+	    nconv = sscanf(relunits,"%s since %[^T]T%s",charunits,basetime_1,basetime_2);
+	}
+					     /* Get the units */
+	cdTrim(charunits,CD_MAX_RELUNITS);
+	if(!strncmp(charunits,"sec",3) || !strcmp(charunits,"s")){
+		*unit = cdSecond;
+	}
+	else if(!strncmp(charunits,"min",3) || !strcmp(charunits,"mn")){
+		*unit = cdMinute;
+	}
+	else if(!strncmp(charunits,"hour",4) || !strcmp(charunits,"hr")){
+		*unit = cdHour;
+	}
+	else if(!strncmp(charunits,"day",3) || !strcmp(charunits,"dy")){
+		*unit = cdDay;
+	}
+	else if(!strncmp(charunits,"week",4) || !strcmp(charunits,"wk")){
+		*unit = cdWeek;
+	}
+	else if(!strncmp(charunits,"month",5) || !strcmp(charunits,"mo")){
+		*unit = cdMonth;
+	}
+	else if(!strncmp(charunits,"season",6)){
+		*unit = cdSeason;
+	}
+	else if(!strncmp(charunits,"year",4) || !strcmp(charunits,"yr")){
+		if(!(timetype & cdStandardCal)){
+			cdError("Error on relative units conversion: climatological units cannot be 'years'.\n");
+			return 1;
+		}
+		*unit = cdYear;
+	}
+	else {
+		cdError("Error on relative units conversion: invalid units = %s\n",charunits);
+		return 1;
+	}
+
+					     /* Build the basetime, if any (default is 1979), */
+					     /* or month 1 for climatological time. */
+	if(nconv == 1){
+		if(timetype & cdStandardCal)
+			strcpy(basetime,CD_DEFAULT_BASEYEAR);
+		else
+			strcpy(basetime,"1");
+	}
+					     /* Convert the basetime to component, then epochal (hours since 1970) */
+	else{
+		if(nconv == 2){
+			cdTrim(basetime_1,CD_MAX_CHARTIME);
+			strcpy(basetime,basetime_1);
+		}
+		else{
+			cdTrim(basetime_1,CD_MAX_CHARTIME);
+			cdTrim(basetime_2,CD_MAX_CHARTIME);
+			sprintf(basetime,"%s %s",basetime_1,basetime_2);
+		}
+	}
+
+	cdChar2Comp(timetype, basetime, base_comptime);
+
+	return 0;
+}
+
+/* ca - cb in Gregorian calendar */
+/* Result is in hours. */
+static double
+cdDiffGregorian(cdCompTime ca, cdCompTime cb){
+
+	double rela, relb;
+
+	cdComp2Rel(cdStandard, ca, "hours", &rela);
+	cdComp2Rel(cdStandard, cb, "hours", &relb);
+	return (rela - relb);
+}
+
+/* Return -1, 0, 1 as ca is less than, equal to, */
+/* or greater than cb, respectively. */
+static int 
+cdCompCompare(cdCompTime ca, cdCompTime cb){
+
+	int test;
+
+	if ((test = VALCMP(ca.year, cb.year)))
+		return test;
+	else if ((test = VALCMP(ca.month, cb.month)))
+		return test;
+	else if ((test = VALCMP(ca.day, cb.day)))
+		return test;
+	else
+		return (VALCMP(ca.hour, cb.hour));
+}
+
+/* ca - cb in Julian calendar.  Result is in hours. */
+static double
+cdDiffJulian(cdCompTime ca, cdCompTime cb){
+
+	double rela, relb;
+
+	cdComp2Rel(cdJulian, ca, "hours", &rela);
+	cdComp2Rel(cdJulian, cb, "hours", &relb);
+	return (rela - relb);
+}
+
+/* ca - cb in mixed Julian/Gregorian calendar. */
+/* Result is in hours. */
+static double
+cdDiffMixed(cdCompTime ca, cdCompTime cb){
+
+	static cdCompTime ZA = {1582, 10, 5, 0.0};
+	static cdCompTime ZB = {1582, 10, 15, 0.0};
+	double result;
+
+	if (cdCompCompare(cb, ZB) == -1){
+		if (cdCompCompare(ca, ZB) == -1) {
+			result = cdDiffJulian(ca, cb);
+		}
+		else {
+			result = cdDiffGregorian(ca, ZB) + cdDiffJulian(ZA, cb);
+		}
+	}
+	else {
+		if (cdCompCompare(ca, ZB) == -1){
+			result = cdDiffJulian(ca, ZA) + cdDiffGregorian(ZB, cb);
+		}
+		else {
+			result = cdDiffGregorian(ca, cb);
+		}
+	}
+	return result;
+}
+
+/* Divide ('endEtm' - 'begEtm') by 'delTime',
+ * return the integer portion of the result in 'nDel'.
+ */
+static void
+CdDivDelTime(double begEtm, double endEtm, CdDeltaTime delTime, CdTimeType timeType,
+	     long baseYear, long *nDel)
+{
+	double delHours, frange;
+	long delMonths, range;
+	CdTime bhtime, ehtime;
+	int hoursInYear;
+	
+	extern void Cde2h(double etime, CdTimeType timeType, long baseYear, CdTime *htime);
+
+	switch(delTime.units){
+	  case CdYear:
+		delMonths = 12;
+		break;
+	  case CdSeason:
+		delMonths = 3;
+		break;
+	  case CdMonth:
+		delMonths = 1;
+		break;
+	  case CdWeek:
+		delHours = 168.0;
+		break;
+	  case CdDay:
+		delHours = 24.0;
+		break;
+	  case CdHour:
+		delHours = 1.0;
+		break;
+	  case CdMinute:
+		delHours = 1./60.;
+		break;
+	  case CdSecond:
+		delHours = 1./3600.;
+		break;
+	  default:
+		cdError("Invalid delta time units: %d\n",delTime.units);
+		return;
+	}
+
+	switch(delTime.units){
+	  case CdYear: case CdSeason: case CdMonth:
+		delMonths *= delTime.count;
+		Cde2h(begEtm,timeType,baseYear,&bhtime);
+		Cde2h(endEtm,timeType,baseYear,&ehtime);
+		if(timeType & CdChronCal){   /* Chron and Rel time */
+			range = 12*(ehtime.year - bhtime.year)
+				+ (ehtime.month - bhtime.month);
+		}
+		else{			     /* Clim time, ignore year */
+			range = (ehtime.month - bhtime.month);
+			if(range < 0) range += 12;
+		}
+		*nDel = abs(range)/delMonths;
+		break;
+	  case CdWeek: case CdDay: case CdHour: case CdMinute: case CdSecond:
+		delHours *= (double)delTime.count;
+		if(timeType & CdChronCal){   /* Chron and Rel time */
+			frange = fabs(endEtm - begEtm);
+		}
+		else{			     /* Clim time, ignore year, but */
+					     /* wraparound relative to hours-in-year*/
+			frange = endEtm - begEtm;
+			if(timeType & Cd366) {
+			    hoursInYear = 8784;
+			} else {
+			    hoursInYear = (timeType & Cd365) ? 8760. : 8640.;
+			}
+					     /* Normalize frange to interval [0,hoursInYear) */
+			if(frange < 0.0 || frange >= hoursInYear)
+				frange -= hoursInYear * floor(frange/hoursInYear);
+		}
+		*nDel = (frange + 1.e-10*delHours)/delHours;
+		break;
+	    default: break;
+	}
+	return;
+}
+
+/* Value is in hours. Translate to units. */
+static double
+cdFromHours(double value, cdUnitTime unit){
+	double result;
+
+	switch(unit){
+	case cdSecond:
+		result = value * 3600.0;
+		break;
+	case cdMinute:
+		result = value * 60.0;
+		break;
+	case cdHour:
+		result = value;
+		break;
+	case cdDay:
+		result = value/24.0;
+		break;
+	case cdWeek:
+		result = value/168.0;
+		break;
+	case cdMonth:
+	case cdSeason:
+	case cdYear:
+	case cdFraction:
+	default:
+    		cdError("Error on conversion from hours to vague unit");
+		result = 0;
+		break;
+	}
+	return result;
+}
+					     /* Map to old timetypes */
+static int
+cdToOldTimetype(cdCalenType newtype, CdTimeType* oldtype)
+{
+	switch(newtype){
+	  case cdStandard:
+		*oldtype = CdChron;
+		break;
+	  case cdJulian:
+		*oldtype = CdJulianCal;
+		break;
+	  case cdNoLeap:
+		*oldtype = CdChronNoLeap;
+		break;
+	  case cd360:
+		*oldtype = CdChron360;
+		break;
+	  case cd366:
+		*oldtype = CdChron366;
+		break;
+	  case cdClim:
+		*oldtype = CdClim;
+		break;
+	  case cdClimLeap:
+		*oldtype = CdClimLeap;
+		break;
+	  case cdClim360:
+		*oldtype = CdClim360;
+		break;
+	  default:
+		cdError("Error on relative units conversion, invalid timetype = %d",newtype);
+		return 1;
+	}
+	return 0;
+}
+
+/* Convert human time to epochal time (hours since 00 jan 1, 1970)
+ * 
+ * Input: htime = human time representation
+ * 
+ * Output: etime = epochal time representation
+ * 
+ * Derived from NRL Neons V3.6
+ */
+void
+Cdh2e(CdTime *htime, double *etime)
+{
+	long 	ytemp, year;			/* temporary year holder */
+	int	day_cnt;		/* count of days */
+	int 	doy;			/* day of year */
+	long    baseYear;		     /* base year for epochal time */
+	int     daysInLeapYear;		     /* number of days in a leap year */
+	int     daysInYear;		     /* days in non-leap year */
+	extern void CdDayOfYear(CdTime *date, int *doy);
+
+	CdDayOfYear(htime,&doy);
+	
+	day_cnt	= 0;
+
+	baseYear = ((htime->timeType) & CdBase1970) ? 1970 : htime->baseYear;
+	year = ((htime->timeType) & CdBase1970) ? htime->year : (htime->year + htime->baseYear);
+	if(!((htime->timeType) & CdChronCal)) baseYear = year = 0;	/* set year and baseYear to 0 for Clim */
+	if((htime->timeType) & Cd366) {
+	    daysInLeapYear = 366;
+	    daysInYear = 366;
+	} else {
+	    daysInLeapYear = ((htime->timeType) & Cd365) ? 366 : 360;
+	    daysInYear = ((htime->timeType) & Cd365) ? 365 : 360;
+	}
+	
+	if (year > baseYear) {
+		for (ytemp = year - 1; ytemp >= baseYear; ytemp--) {
+			day_cnt += ISLEAP(ytemp,htime->timeType) ? daysInLeapYear : daysInYear;
+		}
+	} else if (year < baseYear) {
+		for (ytemp = year; ytemp < baseYear; ytemp++) {
+			day_cnt -= ISLEAP(ytemp,htime->timeType) ? daysInLeapYear : daysInYear;
+		}
+	}	
+	*etime	= (double) (day_cnt + doy - 1) * 24. + htime->hour;
+        return;
+}
+
+/* Validate the component time, return 0 if valid, 1 if not */
+static int
+cdValidateTime(cdCalenType timetype, cdCompTime comptime)
+{
+	if(comptime.month<1 || comptime.month>12){
+		cdError("Error on time conversion: invalid month = %hd\n",comptime.month);
+		return 1;
+	}
+	if(comptime.day<1 || comptime.day>31){
+		cdError("Error on time conversion: invalid day = %hd\n",comptime.day);
+		return 1;
+	}
+	if(comptime.hour<0.0 || comptime.hour>24.0){
+		cdError("Error on time conversion: invalid hour = %lf\n",comptime.hour);
+		return 1;
+	}
+	return 0;
+}
+
+void
+cdChar2Comp(cdCalenType timetype, char* chartime, cdCompTime* comptime)
+{
+	double sec;
+	int ihr, imin, nconv;
+	long year;
+	short day;
+	short month;
+
+	comptime->year = CD_NULL_YEAR;
+	comptime->month = CD_NULL_MONTH;
+	comptime->day = CD_NULL_DAY;
+	comptime->hour = CD_NULL_HOUR;
+	
+	if(timetype & cdStandardCal){
+		nconv = sscanf(chartime,"%ld-%hd-%hd %d:%d:%lf",&year,&month,&day,&ihr,&imin,&sec);
+		if(nconv==EOF || nconv==0){
+			cdError("Error on character time conversion, string = %s\n",chartime);
+			return;
+		}
+		if(nconv >= 1){
+			comptime->year = year;
+		}
+		if(nconv >= 2){
+			comptime->month = month;
+		}
+		if(nconv >= 3){
+			comptime->day = day;
+		}
+		if(nconv >= 4){
+			if(ihr<0 || ihr>23){
+				cdError("Error on character time conversion: invalid hour = %d\n",ihr);
+				return;
+			}
+			comptime->hour = (double)ihr;
+		}
+		if(nconv >= 5){
+			if(imin<0 || imin>59){
+				cdError("Error on character time conversion: invalid minute = %d\n",imin);
+				return;
+			}
+			comptime->hour += (double)imin/60.;
+		}
+		if(nconv >= 6){
+			if(sec<0.0 || sec>60.0){
+				cdError("Error on character time conversion: invalid second = %lf\n",sec);
+				return;
+			}
+			comptime->hour += sec/3600.;
+		}
+	}
+	else{				     /* Climatological */
+		nconv = sscanf(chartime,"%hd-%hd %d:%d:%lf",&month,&day,&ihr,&imin,&sec);
+		if(nconv==EOF || nconv==0){
+			cdError("Error on character time conversion, string = %s",chartime);
+			return;
+		}
+		if(nconv >= 1){
+			comptime->month = month;
+		}
+		if(nconv >= 2){
+			comptime->day = day;
+		}
+		if(nconv >= 3){
+			if(ihr<0 || ihr>23){
+				cdError("Error on character time conversion: invalid hour = %d\n",ihr);
+				return;
+			}
+			comptime->hour = (double)ihr;
+		}
+		if(nconv >= 4){
+			if(imin<0 || imin>59){
+				cdError("Error on character time conversion: invalid minute = %d\n",imin);
+				return;
+			}
+			comptime->hour += (double)imin/60.;
+		}
+		if(nconv >= 5){
+			if(sec<0.0 || sec>60.0){
+				cdError("Error on character time conversion: invalid second = %lf\n",sec);
+				return;
+			}
+			comptime->hour += sec/3600.;
+		}
+	}
+	(void)cdValidateTime(timetype,*comptime);
+	return;
+}
+
+/* Convert ct to relunits (unit, basetime) */
+/* in the mixed Julian/Gregorian calendar. */
+/* unit is anything but year, season, month. unit and basetime are */
+/* from the parsed relunits. Return result in reltime. */
+static void
+cdComp2RelMixed(cdCompTime ct, cdUnitTime unit, cdCompTime basetime, double *reltime){
+
+	double hourdiff;
+
+	hourdiff = cdDiffMixed(ct, basetime);
+	*reltime = cdFromHours(hourdiff, unit);
+	return;
+}
+
+static void
+cdComp2Rel(cdCalenType timetype, cdCompTime comptime, char* relunits, double* reltime)
+{
+	cdCompTime base_comptime;
+	CdDeltaTime deltime;
+	CdTime humantime;
+	CdTimeType old_timetype;
+	cdUnitTime unit;
+	double base_etm, etm, delta;
+	long ndel, hoursInYear;
+	
+					     /* Parse the relunits */
+	if(cdParseRelunits(timetype, relunits, &unit, &base_comptime))
+		return;
+
+					     /* Handle mixed Julian/Gregorian calendar */
+	if (timetype == cdMixed){
+		switch(unit){
+		case cdWeek: case cdDay: case cdHour: case cdMinute: case cdSecond:
+			cdComp2RelMixed(comptime, unit, base_comptime, reltime);
+			return;
+		case cdYear: case cdSeason: case cdMonth:
+			timetype = cdStandard;
+			break;
+		case cdFraction:
+		        cdError("invalid unit in conversion");
+		        break;
+		default: break;
+		}
+	}
+	
+					     /* Convert basetime to epochal */
+	humantime.year = base_comptime.year;
+	humantime.month = base_comptime.month;
+	humantime.day = base_comptime.day;
+	humantime.hour = base_comptime.hour;
+	humantime.baseYear = 1970;
+					     /* Map to old-style timetype */
+	if(cdToOldTimetype(timetype,&old_timetype))
+		return;
+	humantime.timeType = old_timetype;
+	Cdh2e(&humantime,&base_etm);
+
+					     /* Map end time to epochal */
+	humantime.year = comptime.year;
+	humantime.month = comptime.month;
+	humantime.day = comptime.day;
+	humantime.hour = comptime.hour;
+	Cdh2e(&humantime,&etm);
+					     /* Calculate relative time value for months or hours */
+	deltime.count = 1;
+	deltime.units = (CdTimeUnit)unit;
+	switch(unit){
+	  case cdWeek: case cdDay: case cdHour: case cdMinute: case cdSecond:
+		delta = etm - base_etm;
+		if(!(timetype & cdStandardCal)){	/* Climatological time */
+			hoursInYear = (timetype & cd365Days) ? 8760. : (timetype & cdHasLeap) ? 8784. : 8640.;
+					     /* Normalize delta to interval [0,hoursInYear) */
+			if(delta < 0.0 || delta >= hoursInYear)
+				delta -= hoursInYear * floor(delta/hoursInYear);
+		}
+		break;
+	  case cdYear: case cdSeason: case cdMonth:
+		CdDivDelTime(base_etm, etm, deltime, old_timetype, 1970, &ndel);
+		break;
+	  case cdFraction:
+	        cdError("invalid unit in conversion");
+		break;
+	  default: break;
+	}
+
+					     /* Convert to output units */
+	switch(unit){
+	  case cdSecond:
+		*reltime = 3600.0 * delta;
+		break;
+	  case cdMinute:
+		*reltime = 60.0 * delta;
+		break;
+	  case cdHour:
+		*reltime = delta;
+		break;
+	  case cdDay:
+		*reltime = delta/24.0;
+		break;
+	  case cdWeek:
+		*reltime = delta/168.0;
+		break;
+	  case cdMonth: case cdSeason: case cdYear: /* Already in correct units */
+		if(timetype & cdStandardCal)
+			*reltime = (base_etm <= etm) ? (double)ndel : (double)(-ndel);
+		else			     /* Climatological time is already normalized*/
+			*reltime = (double)ndel;
+		break;
+	  default:
+		cdError("invalid unit in conversion");
+		break;
+	}
+
+	return;
+}
+
+/* Add (value,unit) to comptime. */
+/* value is in hours. */
+/* calendar is anything but cdMixed. */
+static void
+cdCompAdd(cdCompTime comptime, double value, cdCalenType calendar, cdCompTime *result){
+
+	double reltime;
+
+	cdComp2Rel(calendar, comptime, "hours", &reltime);
+	reltime += value;
+	cdRel2Comp(calendar, "hours", reltime, result);
+	return;
+}
+
+/* Add value in hours to ct, in the mixed Julian/Gregorian
+ * calendar. */
+static void
+cdCompAddMixed(cdCompTime ct, double value, cdCompTime *result){
+
+	static cdCompTime ZA = {1582, 10, 5, 0.0};
+	static cdCompTime ZB = {1582, 10, 15, 0.0};
+	double xj, xg;
+
+	if (cdCompCompare(ct, ZB) == -1){
+		xj = cdDiffJulian(ZA, ct);
+		if (value <= xj){
+			cdCompAdd(ct, value, cdJulian, result);
+		}
+		else {
+			cdCompAdd(ZB, value-xj, cdStandard, result);
+		}
+	}
+	else {
+		xg = cdDiffGregorian(ZB, ct);
+		if (value > xg){
+			cdCompAdd(ct, value, cdStandard, result);
+		}
+		else {
+			cdCompAdd(ZA, value-xg, cdJulian, result);
+		}
+	}
+	return;
+}
+
+/* Return value expressed in hours. */
+static double
+cdToHours(double value, cdUnitTime unit){
+
+	double result = 0;
+
+	switch(unit){
+	case cdSecond:
+		result = value/3600.0;
+		break;
+	case cdMinute:
+		result = value/60.0;
+		break;
+	case cdHour:
+		result = value;
+		break;
+	case cdDay:
+		result = 24.0 * value;
+		break;
+	case cdWeek:
+		result = 168.0 * value;
+		break;
+	default:
+	        cdError("invalid unit in conversion");
+		break;
+
+	}
+	return result;
+}
+
+/* Convert relative time (reltime, unit, basetime) to comptime in the
+ * mixed Julian/Gregorian calendar. unit is anything but year, season,
+ * month. unit and basetime are from the parsed relunits. Return
+ * result in comptime. */
+static void
+cdRel2CompMixed(double reltime, cdUnitTime unit, cdCompTime basetime, cdCompTime *comptime){
+
+	reltime = cdToHours(reltime, unit);
+	cdCompAddMixed(basetime, reltime, comptime);
+	return;
+}
+
+
+static void
+cdRel2Comp(cdCalenType timetype, char* relunits, double reltime, cdCompTime* comptime)
+{
+	CdDeltaTime deltime;
+	CdTime humantime;
+	CdTimeType old_timetype;
+	cdCompTime base_comptime;
+	cdUnitTime unit, baseunits;
+	double base_etm, result_etm;
+	double delta;
+	long idelta;
+
+					     /* Parse the relunits */
+	if(cdParseRelunits(timetype, relunits, &unit, &base_comptime))
+		return;
+
+	if (timetype == cdMixed){
+		switch(unit){
+		case cdWeek: case cdDay: case cdHour: case cdMinute: case cdSecond:
+			cdRel2CompMixed(reltime, unit, base_comptime, comptime);
+			return;
+		case cdYear: case cdSeason: case cdMonth:
+			timetype = cdStandard;
+			break;
+		case cdFraction:
+		        cdError("invalid unit in conversion");
+		        break;
+		default: break;
+		}
+	}
+
+	baseunits =cdBadUnit;
+	switch(unit){
+	  case cdSecond:
+		delta = reltime/3600.0;
+		baseunits = cdHour;
+		break;
+	  case cdMinute:
+		delta = reltime/60.0;
+		baseunits = cdHour;
+		break;
+	  case cdHour:
+		delta = reltime;
+		baseunits = cdHour;
+		break;
+	  case cdDay:
+		delta = 24.0 * reltime;
+		baseunits = cdHour;
+		break;
+	  case cdWeek:
+		delta = 168.0 * reltime;
+		baseunits = cdHour;
+		break;
+	  case cdMonth:
+		idelta = (long)(reltime + (reltime<0 ? -1.e-10 : 1.e-10));
+		baseunits = cdMonth;
+		break;
+	  case cdSeason:
+		idelta = (long)(3.0 * reltime + (reltime<0 ? -1.e-10 : 1.e-10));
+		baseunits = cdMonth;
+		break;
+	  case cdYear:
+		idelta = (long)(12 * reltime + (reltime<0 ? -1.e-10 : 1.e-10));
+		baseunits = cdMonth;
+		break;
+	  default:
+	        cdError("invalid unit in conversion");
+		break;
+	}
+
+	deltime.count = 1;
+	deltime.units = (CdTimeUnit)baseunits;
+
+	humantime.year = base_comptime.year;
+	humantime.month = base_comptime.month;
+	humantime.day = base_comptime.day;
+	humantime.hour = base_comptime.hour;
+	humantime.baseYear = 1970;
+					     /* Map to old-style timetype */
+	if(cdToOldTimetype(timetype,&old_timetype))
+		return;
+	humantime.timeType = old_timetype;
+
+	Cdh2e(&humantime,&base_etm);
+					     /* If months, seasons, or years, */
+	if(baseunits == cdMonth){
+
+					     /* Calculate new epochal time from integer months. */
+					     /* Convert back to human, then comptime. */
+					     /* For zero reltime, just return the basetime*/
+		if(reltime != 0.0){
+			CdAddDelTime(base_etm,idelta,deltime,old_timetype,1970,&result_etm);
+			Cde2h(result_etm, old_timetype, 1970, &humantime);
+		}
+	}
+					     /* Calculate new epochal time. */
+					     /* Convert back to human, then comptime. */
+	else if(baseunits == cdHour){
+		Cde2h(base_etm+delta, old_timetype, 1970, &humantime);
+		
+	}
+	comptime->year = humantime.year;
+	comptime->month = humantime.month;
+	comptime->day = humantime.day;
+	comptime->hour = humantime.hour;
+
+	return;
+}
+
+/* rkr: output as ISO 8601 strings */
+static void
+cdComp2Iso(cdCalenType timetype, int separator, cdCompTime comptime, char* time)
+{
+	double dtmp, sec;
+	int ihr, imin, isec;
+	int nskip;
+
+	if(cdValidateTime(timetype,comptime))
+		return;
+	
+	ihr = (int)comptime.hour;
+	dtmp = 60.0 * (comptime.hour - (double)ihr);
+	imin = (int)dtmp;
+	sec = 60.0 * (dtmp - (double)imin);
+	isec = sec;
+
+	if(sec == isec)
+	    if(isec == 0)
+		if(imin == 0)
+		    if(ihr == 0)
+			nskip = 4;
+		    else
+			nskip = 3;
+		else
+		    nskip = 2;
+	    else
+		nskip = 1;
+	else
+	    nskip = 0;
+
+	if(timetype & cdStandardCal){
+	    switch (nskip) {
+	    case 0:		/* sec != 0 && (int)sec != sec */
+		sprintf(time,"%4.4ld-%2.2hd-%2.2hd%c%2.2d:%2.2d:%lf",
+			comptime.year,comptime.month,comptime.day,separator,ihr,imin,sec);
+		break;
+	    case 1:
+		sprintf(time,"%4.4ld-%2.2hd-%2.2hd%c%2.2d:%2.2d:%2.2d",
+			comptime.year,comptime.month,comptime.day,separator,ihr,imin,isec);
+		break;
+	    case 2:
+		sprintf(time,"%4.4ld-%2.2hd-%2.2hd%c%2.2d:%2.2d",
+			comptime.year,comptime.month,comptime.day,separator,ihr,imin);
+		break;
+	    case 3:
+		sprintf(time,"%4.4ld-%2.2hd-%2.2hd%c%2.2d",
+			comptime.year,comptime.month,comptime.day,separator,ihr);
+		break;
+	    case 4:
+		sprintf(time,"%4.4ld-%2.2hd-%2.2hd",
+			comptime.year,comptime.month,comptime.day);
+		break;
+	    }
+	}
+	else {				     /* Climatological */
+	    switch (nskip) {
+	    case 0:		/* sec != 0 && (int)sec != sec */
+		sprintf(time,"%2.2hd-%2.2hd%c%2.2d:%2.2d:%lf",
+			comptime.month,comptime.day,separator,ihr,imin,sec);
+		break;
+	    case 1:
+		sprintf(time,"%2.2hd-%2.2hd%c%2.2d:%2.2d:%2.2d",
+			comptime.month,comptime.day,separator,ihr,imin,isec);
+		break;
+	    case 2:
+		sprintf(time,"%2.2hd-%2.2hd%c%2.2d:%2.2d",
+			comptime.month,comptime.day,separator,ihr,imin);
+		break;
+	    case 3:
+		sprintf(time,"%2.2hd-%2.2hd%c%2.2d",
+			comptime.month,comptime.day,separator,ihr);
+		break;
+	    case 4:
+		sprintf(time,"%2.2hd-%2.2hd",
+			comptime.month,comptime.day);
+		break;
+	    }
+	}
+	return;
+}
+
+/* rkr: added for output closer to ISO 8601 */
+void
+cdRel2Iso(cdCalenType timetype, char* relunits, int separator, double reltime, char* chartime)
+{
+	cdCompTime comptime;
+
+	cdRel2Comp(timetype, relunits, reltime, &comptime);
+	cdComp2Iso(timetype, separator, comptime, chartime);
+
+	return;
+}
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/src_netcdf4/nctime.h
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/src_netcdf4/nctime.h	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/src_netcdf4/nctime.h	(revision 1749)
@@ -0,0 +1,159 @@
+/*********************************************************************
+ *   Copyright 2008, University Corporation for Atmospheric Research
+ *   See netcdf/COPYRIGHT file for copying and redistribution conditions.
+ *   $Id: nctime.h,v 1.6 2010/03/18 19:24:26 russ Exp $
+ *********************************************************************/
+
+struct bounds_node{
+    int ncid;	  /* group (or file) in which variable with associated
+		   * bounds variable resides */
+    int varid; /* has "bounds" attribute naming its bounds variable */
+    char *bounds_name; /* the named variable, which stores bounds for varid */
+    struct bounds_node *next; /* next node on list or NULL ifn last list node */
+};
+
+typedef struct bounds_node bounds_node_t;
+
+/* 
+ * This code was extracted with permission from the CDMS time
+ * conversion and arithmetic routines developed by Bob Drach, Lawrence
+ * Livermore National Laboratory as part of the cdtime library.
+ * Changes and additions were made to support the "-t" option of the
+ * netCDF ncdump utility.
+ *
+ * For the complete time conversion and climate calendar facilities of
+ * the CDMS library, get the original sources from LLNL.
+ */
+
+#define CD_MAX_RELUNITS 64	/* Max characters in relative units */
+#define CD_MAX_CHARTIME 48	/* Max characters in character time */
+#define CD_NULL_DAY 1		/* Null day value */
+#define CD_NULL_HOUR 0.0	/* Null hour value */
+#define CD_NULL_ID 0		/* Reserved ID */
+#define CD_NULL_MONTH 1		/* Null month value */
+#define CD_NULL_YEAR 0		/* Null year value, component time */
+
+typedef enum CdTimeUnit {
+        CdBadTimeUnit = 0,
+	CdMinute = 1,
+	CdHour = 2,
+	CdDay = 3,
+	CdWeek = 4,		/* Always = 7 days */
+	CdMonth = 5,
+	CdSeason = 6,		/* Always = 3 months */
+	CdYear = 7,
+	CdSecond = 8
+} CdTimeUnit;
+
+typedef enum cdUnit {
+    cdBadUnit = CdBadTimeUnit,
+	cdMinute = CdMinute,
+	cdHour = CdHour,
+	cdDay = CdDay,
+	cdWeek = CdWeek,	/* Always = 7 days */
+	cdMonth = CdMonth,
+	cdSeason = CdSeason,	/* Always = 3 months */
+	cdYear = CdYear,
+	cdSecond = CdSecond,
+	cdFraction		/* Fractional part of absolute time */
+} cdUnitTime;
+
+#define CdChronCal    0x1
+#define CdClimCal     0x0
+#define CdBaseRel    0x00
+#define CdBase1970   0x10
+#define CdHasLeap   0x100
+#define CdNoLeap    0x000
+#define Cd366      0x2000
+#define Cd365      0x1000
+#define Cd360      0x0000
+#define CdJulianType 0x10000
+
+typedef enum CdTimeType {
+	CdChron       = ( CdChronCal | CdBase1970 | CdHasLeap | Cd365),	/* 4369 */
+	CdJulianCal   = ( CdChronCal | CdBase1970 | CdHasLeap | Cd365 | CdJulianType),
+	CdChronNoLeap = ( CdChronCal | CdBase1970 | CdNoLeap  | Cd365),	/* 4113 */
+	CdChron360    = ( CdChronCal | CdBase1970 | CdNoLeap  | Cd360),	/*   17 */
+	CdRel         = ( CdChronCal | CdBaseRel  | CdHasLeap | Cd365),	/* 4353 */
+	CdRelNoLeap   = ( CdChronCal | CdBaseRel  | CdNoLeap  | Cd365),	/* 4097 */
+	CdClim        = ( CdClimCal  | CdBaseRel  | CdNoLeap  | Cd365), /* 4096 */
+	CdClimLeap    = ( CdClimCal  | CdBaseRel  | CdHasLeap | Cd365),
+	CdClim360     = ( CdClimCal  | CdBaseRel  | CdNoLeap  | Cd365),
+	CdChron366    = ( CdChronCal | CdBase1970 | CdNoLeap  | Cd366)
+}  CdTimeType;
+
+typedef struct {
+	long    		year;	     /* e.g., 1979 */
+	short			month;	     /* e.g., CdDec */
+	short			day;	     /* e.g., 30 */
+	double			hour;	     /* hour and fractional hour */
+	long			baseYear;    /* base year for relative, 1970 for CdChron */
+	CdTimeType		timeType;    /* e.g., CdChron */
+} CdTime;
+
+#define cdStandardCal   0x11
+#define cdClimCal        0x0
+#define cdHasLeap      0x100
+#define cdHasNoLeap    0x000
+#define cd366Days      0x2000
+#define cd365Days     0x1000
+#define cd360Days     0x0000
+#define cdJulianCal  0x10000
+#define cdMixedCal   0x20000
+
+typedef enum cdCalenType {
+	cdStandard    = ( cdStandardCal | cdHasLeap   | cd365Days),
+	cdJulian      = ( cdStandardCal | cdHasLeap   | cd365Days | cdJulianCal),
+	cdNoLeap      = ( cdStandardCal | cdHasNoLeap | cd365Days),
+	cd360         = ( cdStandardCal | cdHasNoLeap | cd360Days),
+	cd366         = ( cdStandardCal | cdHasNoLeap | cd366Days),
+	cdClim        = ( cdClimCal     | cdHasNoLeap | cd365Days),
+	cdClimLeap    = ( cdClimCal     | cdHasLeap   | cd365Days),
+	cdClim360     = ( cdClimCal     | cdHasNoLeap | cd360Days),
+	cdMixed       = ( cdStandardCal | cdHasLeap   | cd365Days | cdMixedCal)
+}  cdCalenType;
+
+/* Component time */
+typedef struct {
+	long 		year;		     /* Year */
+	short 		month;		     /* Numerical month (1..12) */
+	short 		day;		     /* Day of month (1..31) */
+	double 		hour;		     /* Hour and fractional hours */
+} cdCompTime;
+
+typedef struct {
+	long   			count;	     /* units count  */
+	CdTimeUnit		units;	     /* time interval units */
+} CdDeltaTime;
+
+typedef struct timeinfo_t {
+    cdCalenType calendar;
+    cdUnitTime unit;
+    char *units;
+    cdCompTime origin;
+} timeinfo_t;
+
+
+
+#if defined(DLL_NETCDF) /* Defined when library is a DLL */
+# if defined(DLL_EXPORT) /* define when building the library. */
+#   define MSC_NCTIME_EXTRA __declspec(dllexport)
+# else
+#   define MSC_NCTIME_EXTRA __declspec(dllimport)
+# endif
+
+MSC_NCTIME_EXTRA extern void cdRel2Iso(cdCalenType timetype, char* relunits, int separator, double reltime, char* chartime);
+MSC_NCTIME_EXTRA extern void cdChar2Comp(cdCalenType timetype, char* chartime, cdCompTime* comptime);
+MSC_NCTIME_EXTRA extern void Cdh2e(CdTime *htime, double *etime);
+MSC_NCTIME_EXTRA extern void Cde2h(double etime, CdTimeType timeType, long baseYear, CdTime *htime);
+MSC_NCTIME_EXTRA extern int cdParseRelunits(cdCalenType timetype, char* relunits, cdUnitTime* unit, cdCompTime* base_comptime);
+#else
+extern void cdRel2Iso(cdCalenType timetype, char* relunits, int separator, double reltime, char* chartime);
+extern void cdChar2Comp(cdCalenType timetype, char* chartime, cdCompTime* comptime);
+extern void Cdh2e(CdTime *htime, double *etime);
+extern void Cde2h(double etime, CdTimeType timeType, long baseYear, CdTime *htime);
+extern int cdParseRelunits(cdCalenType timetype, char* relunits, cdUnitTime* unit, cdCompTime* base_comptime);
+#endif /* DLL Considerations. */
+
+
+
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/src_netcdf4/ncx.c
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/src_netcdf4/ncx.c	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/src_netcdf4/ncx.c	(revision 1749)
@@ -0,0 +1,8385 @@
+/* Do not edit this file. It is produced from the corresponding .m4 source */
+/*
+ *	Copyright 1996, University Corporation for Atmospheric Research
+ *	See netcdf/COPYRIGHT file for copying and redistribution conditions.
+ * 	
+ * 	This file contains some routines derived from code
+ *	which is copyrighted by Sun Microsystems, Inc.
+ *	The "#ifdef vax" versions of
+ *		 ncx_put_float_float()
+ *		 ncx_get_float_float()
+ *		 ncx_put_double_double()
+ *		 ncx_get_double_double()
+ *		 ncx_putn_float_float()
+ *		 ncx_getn_float_float()
+ *		 ncx_putn_double_double()
+ *		 ncx_getn_double_double()
+ * 	are derived from xdr_float() and xdr_double() routines
+ *	in the freely available, copyrighted Sun RPCSRC 3.9
+ *	distribution, xdr_float.c.
+ * 	Our "value added" is that these are always memory to memory,
+ *	they handle IEEE subnormals properly, and their "n" versions
+ *	operate speedily on arrays.
+ */
+/* $Id: ncx.m4,v 2.58 2010/05/26 18:11:08 dmh Exp $ */
+
+/*
+ * An external data representation interface.
+ */
+
+#include "ncx.h"
+#include "nc3dispatch.h"
+#include <string.h>
+#include <limits.h>
+
+/* alias poorly named limits.h macros */
+#define  SHORT_MAX  SHRT_MAX
+#define  SHORT_MIN  SHRT_MIN
+#define USHORT_MAX USHRT_MAX
+#ifndef LLONG_MAX
+#   define LLONG_MAX	9223372036854775807LL
+#   define LLONG_MIN	(-LLONG_MAX - 1LL)
+#   define ULLONG_MAX	18446744073709551615ULL
+#endif
+#define LONG_LONG_MAX LLONG_MAX
+#define LONG_LONG_MIN LLONG_MIN
+#define ULONG_LONG_MAX ULLONG_MAX
+#include <float.h>
+#ifndef FLT_MAX /* This POSIX macro missing on some systems */
+# ifndef NO_IEEE_FLOAT
+# define FLT_MAX 3.40282347e+38f
+# else
+# error "You will need to define FLT_MAX"
+# endif
+#endif
+/* alias poorly named float.h macros */
+#define FLOAT_MAX FLT_MAX
+#define FLOAT_MIN (-FLT_MAX)
+#define DOUBLE_MAX DBL_MAX
+#define DOUBLE_MIN (-DBL_MAX)
+#define FLOAT_MAX_EXP FLT_MAX_EXP
+#define DOUBLE_MAX_EXP DBL_MAX_EXP
+#include <assert.h>
+#define UCHAR_MIN 0
+#define Min(a,b) ((a) < (b) ? (a) : (b))
+#define Max(a,b) ((a) > (b) ? (a) : (b))
+
+/*
+ * If the machine's float domain is "smaller" than the external one
+ * use the machine domain
+ */
+#if defined(FLT_MAX_EXP) && FLT_MAX_EXP < 128 /* 128 is X_FLT_MAX_EXP */
+#undef X_FLOAT_MAX
+# define X_FLOAT_MAX FLT_MAX
+#undef X_FLOAT_MIN
+# define X_FLOAT_MIN (-X_FLOAT_MAX)
+#endif
+
+#if _SX /* NEC SUPER UX */
+#define LOOPCNT 256    /* must be no longer than hardware vector length */
+#if _INT64
+#undef  INT_MAX /* workaround cpp bug */
+#define INT_MAX  X_INT_MAX
+#undef  INT_MIN /* workaround cpp bug */
+#define INT_MIN  X_INT_MIN
+#undef  LONG_MAX /* workaround cpp bug */
+#define LONG_MAX  X_INT_MAX
+#undef  LONG_MIN /* workaround cpp bug */
+#define LONG_MIN  X_INT_MIN
+#elif _LONG64
+#undef  LONG_MAX /* workaround cpp bug */
+#define LONG_MAX  4294967295L
+#undef  LONG_MIN /* workaround cpp bug */
+#define LONG_MIN -4294967295L
+#endif
+#if !_FLOAT0
+#error "FLOAT1 and FLOAT2 not supported"
+#endif
+#endif /* _SX */
+
+static const char nada[X_ALIGN] = {0, 0, 0, 0};
+
+#ifndef WORDS_BIGENDIAN
+/* LITTLE_ENDIAN: DEC and intel */
+/*
+ * Routines to convert to BIGENDIAN.
+ * Optimize the swapn?b() and swap?b() routines aggressivly.
+ */
+
+#define SWAP2(a) ( (((a) & 0xff) << 8) | \
+		(((a) >> 8) & 0xff) )
+
+#define SWAP4(a) ( ((a) << 24) | \
+		(((a) <<  8) & 0x00ff0000) | \
+		(((a) >>  8) & 0x0000ff00) | \
+		(((a) >> 24) & 0x000000ff) )
+
+
+static void
+swapn2b(void *dst, const void *src, size_t nn)
+{
+	char *op = dst;
+	const char *ip = src;
+
+/* unroll the following to reduce loop overhead
+ *
+ *	while(nn-- != 0)
+ *	{
+ *		*op++ = *(++ip);
+ *		*op++ = *(ip++ -1);
+ *	}                                       
+ */
+	while(nn > 3)
+	{
+		*op++ = *(++ip);
+		*op++ = *(ip++ -1);
+		*op++ = *(++ip);
+		*op++ = *(ip++ -1);
+		*op++ = *(++ip);
+		*op++ = *(ip++ -1);
+		*op++ = *(++ip);
+		*op++ = *(ip++ -1);
+		nn -= 4;
+	}
+	while(nn-- != 0)
+	{
+		*op++ = *(++ip);
+		*op++ = *(ip++ -1);
+	}
+}
+
+# ifndef vax
+static void
+swap4b(void *dst, const void *src)
+{
+	char *op = dst;
+	const char *ip = src;
+	op[0] = ip[3];
+	op[1] = ip[2];
+	op[2] = ip[1];
+	op[3] = ip[0];
+}
+# endif /* !vax */
+
+static void
+swapn4b(void *dst, const void *src, size_t nn)
+{
+	char *op = dst;
+	const char *ip = src;
+
+/* unroll the following to reduce loop overhead
+ *	while(nn-- != 0)
+ *	{
+ *		op[0] = ip[3];
+ *		op[1] = ip[2];
+ *		op[2] = ip[1];
+ *		op[3] = ip[0];
+ *		op += 4;
+ *		ip += 4;
+ *	}
+ */
+	while(nn > 3)
+	{
+		op[0] = ip[3];
+		op[1] = ip[2];
+		op[2] = ip[1];
+		op[3] = ip[0];
+		op[4] = ip[7];
+		op[5] = ip[6];
+		op[6] = ip[5];
+		op[7] = ip[4];
+		op[8] = ip[11];
+		op[9] = ip[10];
+		op[10] = ip[9];
+		op[11] = ip[8];
+		op[12] = ip[15];
+		op[13] = ip[14];
+		op[14] = ip[13];
+		op[15] = ip[12];
+		op += 16;
+		ip += 16;
+		nn -= 4;
+	}
+	while(nn-- != 0)
+	{
+		op[0] = ip[3];
+		op[1] = ip[2];
+		op[2] = ip[1];
+		op[3] = ip[0];
+		op += 4;
+		ip += 4;
+	}
+}
+
+# ifndef vax
+static void
+swap8b(void *dst, const void *src)
+{
+	char *op = dst;
+	const char *ip = src;
+#  ifndef FLOAT_WORDS_BIGENDIAN
+	op[0] = ip[7];
+	op[1] = ip[6];
+	op[2] = ip[5];
+	op[3] = ip[4];
+	op[4] = ip[3];
+	op[5] = ip[2];
+	op[6] = ip[1];
+	op[7] = ip[0];
+#  else
+	op[0] = ip[3];
+	op[1] = ip[2];
+	op[2] = ip[1];
+	op[3] = ip[0];
+	op[4] = ip[7];
+	op[5] = ip[6];
+	op[6] = ip[5];
+	op[7] = ip[4];
+#  endif
+}
+# endif /* !vax */
+
+# ifndef vax
+static void
+swapn8b(void *dst, const void *src, size_t nn)
+{
+	char *op = dst;
+	const char *ip = src;
+
+/* unroll the following to reduce loop overhead
+ *	while(nn-- != 0)
+ *	{
+ *		op[0] = ip[7];
+ *		op[1] = ip[6];
+ *		op[2] = ip[5];
+ *		op[3] = ip[4];
+ *		op[4] = ip[3];
+ *		op[5] = ip[2];
+ *		op[6] = ip[1];
+ *		op[7] = ip[0];
+ *		op += 8;
+ *		ip += 8;
+ *	}
+ */
+#  ifndef FLOAT_WORDS_BIGENDIAN
+	while(nn > 1)
+	{
+		op[0] = ip[7];
+		op[1] = ip[6];
+		op[2] = ip[5];
+		op[3] = ip[4];
+		op[4] = ip[3];
+		op[5] = ip[2];
+		op[6] = ip[1];
+		op[7] = ip[0];
+		op[8] = ip[15];
+		op[9] = ip[14];
+		op[10] = ip[13];
+		op[11] = ip[12];
+		op[12] = ip[11];
+		op[13] = ip[10];
+		op[14] = ip[9];
+		op[15] = ip[8];
+		op += 16;
+		ip += 16;
+		nn -= 2;
+	}
+	while(nn-- != 0)
+	{
+		op[0] = ip[7];
+		op[1] = ip[6];
+		op[2] = ip[5];
+		op[3] = ip[4];
+		op[4] = ip[3];
+		op[5] = ip[2];
+		op[6] = ip[1];
+		op[7] = ip[0];
+		op += 8;
+		ip += 8;
+	}
+#  else
+	while(nn-- != 0)
+	{
+		op[0] = ip[3];
+		op[1] = ip[2];
+		op[2] = ip[1];
+		op[3] = ip[0];
+		op[4] = ip[7];
+		op[5] = ip[6];
+		op[6] = ip[5];
+		op[7] = ip[4];
+		op += 8;
+		ip += 8;
+	}
+#  endif
+}
+# endif /* !vax */
+
+#endif /* LITTLE_ENDIAN */
+
+
+/*
+ * Primitive numeric conversion functions.
+ */
+
+/* x_schar */
+
+/* We don't implement any x_schar primitives. */
+
+
+/* x_short */
+
+#if SHORT_MAX == X_SHORT_MAX
+typedef short ix_short;
+#define SIZEOF_IX_SHORT SIZEOF_SHORT
+#define IX_SHORT_MAX SHORT_MAX
+#elif INT_MAX >= X_SHORT_MAX
+typedef int ix_short;
+#define SIZEOF_IX_SHORT SIZEOF_INT
+#define IX_SHORT_MAX INT_MAX
+#elif LONG_MAX >= X_SHORT_MAX
+typedef long ix_short;
+#define SIZEOF_IX_SHORT SIZEOF_LONG
+#define IX_SHORT_MAX LONG_MAX
+#elif LLONG_MAX >= X_SHORT_MAX
+typedef long long ix_short;
+#define SIZEOF_IX_SHORT SIZEOF_LONG_LONG
+#define IX_SHORT_MAX LLONG_MAX
+#else
+#error "ix_short implementation"
+#endif
+
+static void
+get_ix_short(const void *xp, ix_short *ip)
+{
+	const uchar *cp = (const uchar *) xp;
+	*ip = *cp++ << 8;
+#if SIZEOF_IX_SHORT > X_SIZEOF_SHORT
+	if(*ip & 0x8000)
+	{
+		/* extern is negative */
+		*ip |= (~(0xffff)); /* N.B. Assumes "twos complement" */
+	}
+#endif
+	*ip |= *cp; 
+}
+
+static void
+put_ix_short(void *xp, const ix_short *ip)
+{
+	uchar *cp = (uchar *) xp;
+	*cp++ = (*ip) >> 8;
+	*cp = (*ip) & 0xff;
+}
+
+
+int
+ncx_get_short_schar(const void *xp, schar *ip)
+{
+	ix_short xx;
+	get_ix_short(xp, &xx);
+	*ip = xx;
+	if(xx > SCHAR_MAX || xx < SCHAR_MIN)
+		return NC_ERANGE;
+	return ENOERR;
+}
+
+int
+ncx_get_short_uchar(const void *xp, uchar *ip)
+{
+	ix_short xx;
+	get_ix_short(xp, &xx);
+	*ip = xx;
+	if(xx > UCHAR_MAX || xx < 0)
+		return NC_ERANGE;
+	return ENOERR;
+}
+
+int
+ncx_get_short_short(const void *xp, short *ip)
+{
+#if SIZEOF_IX_SHORT == SIZEOF_SHORT && IX_SHORT_MAX == SHORT_MAX
+	get_ix_short(xp, (ix_short *)ip);
+	return ENOERR;
+#else
+	ix_short xx;
+	get_ix_short(xp, &xx);
+	*ip = xx;
+#   if IX_SHORT_MAX > SHORT_MAX
+	if(xx > SHORT_MAX || xx < SHORT_MIN)
+		return NC_ERANGE;
+#   endif
+	return ENOERR;
+#endif
+}
+
+int
+ncx_get_short_int(const void *xp, int *ip)
+{
+#if SIZEOF_IX_SHORT == SIZEOF_INT && IX_SHORT_MAX == INT_MAX
+	get_ix_short(xp, (ix_short *)ip);
+	return ENOERR;
+#else
+	ix_short xx;
+	get_ix_short(xp, &xx);
+	*ip = xx;
+#   if IX_SHORT_MAX > INT_MAX
+	if(xx > INT_MAX || xx < INT_MIN)
+		return NC_ERANGE;
+#   endif
+	return ENOERR;
+#endif
+}
+
+int
+ncx_get_short_uint(const void *xp, unsigned int *ip)
+{
+#if SIZEOF_IX_SHORT == SIZEOF_INT && IX_SHORT_MAX == INT_MAX
+	get_ix_short(xp, (ix_short *)ip);
+	return ENOERR;
+#else
+	ix_short xx;
+	get_ix_short(xp, &xx);
+	*ip = xx;
+#   if IX_SHORT_MAX > INT_MAX
+	if(xx > UINT_MAX || xx < 0)
+		return NC_ERANGE;
+#   endif
+	return ENOERR;
+#endif
+}
+
+int
+ncx_get_short_longlong(const void *xp, long long *ip)
+{
+#if SIZEOF_IX_SHORT == SIZEOF_LONG_LONG && IX_SHORT_MAX == LONG_LONG_MAX
+	get_ix_short(xp, (ix_short *)ip);
+	return ENOERR;
+#else
+	/* assert(LONG_LONG_MAX >= X_SHORT_MAX); */
+	ix_short xx;
+	get_ix_short(xp, &xx);
+	*ip = xx;
+	return ENOERR;
+#endif
+}
+
+int
+ncx_get_short_ulonglong(const void *xp, unsigned long long *ip)
+{
+#if SIZEOF_IX_SHORT == SIZEOF_LONG && IX_SHORT_MAX == LONG_MAX
+	get_ix_short(xp, (ix_short *)ip);
+	return ENOERR;
+#else
+	/* assert(LONG_LONG_MAX >= X_SHORT_MAX); */
+	ix_short xx;
+	get_ix_short(xp, &xx);
+	*ip = xx;
+	if(xx < 0)
+		return NC_ERANGE;
+	return ENOERR;
+#endif
+}
+
+int
+ncx_get_short_float(const void *xp, float *ip)
+{
+	ix_short xx;
+	get_ix_short(xp, &xx);
+	*ip = xx;
+#if 0	/* TODO: determine when necessary */
+	if(xx > FLT_MAX || xx < (-FLT_MAX))
+		return NC_ERANGE;
+#endif
+	return ENOERR;
+}
+
+int
+ncx_get_short_double(const void *xp, double *ip)
+{
+	/* assert(DBL_MAX >= X_SHORT_MAX); */
+	ix_short xx;
+	get_ix_short(xp, &xx);
+	*ip = xx;
+	return ENOERR;
+}
+
+int
+ncx_put_short_schar(void *xp, const schar *ip)
+{
+	uchar *cp = (uchar *) xp;
+	if(*ip & 0x80)
+		*cp++ = 0xff;
+	else
+		*cp++ = 0;
+	*cp = (uchar)*ip;
+	return ENOERR;
+}
+
+int
+ncx_put_short_uchar(void *xp, const uchar *ip)
+{
+	uchar *cp = (uchar *) xp;
+	*cp++ = 0;
+	*cp = *ip;
+	return ENOERR;
+}
+
+int
+ncx_put_short_short(void *xp, const short *ip)
+{
+#if SIZEOF_IX_SHORT == SIZEOF_SHORT && X_SHORT_MAX == SHORT_MAX
+	put_ix_short(xp, (const ix_short *)ip);
+	return ENOERR;
+#else
+	ix_short xx = (ix_short)*ip;
+	put_ix_short(xp, &xx);
+# if X_SHORT_MAX < SHORT_MAX
+	if(*ip > X_SHORT_MAX || *ip < X_SHORT_MIN)
+		return NC_ERANGE;
+# endif
+	return ENOERR;
+#endif
+}
+
+int
+ncx_put_short_int(void *xp, const int *ip)
+{
+#if SIZEOF_IX_SHORT == SIZEOF_INT && X_SHORT_MAX == INT_MAX
+	put_ix_short(xp, (const ix_short *)ip);
+	return ENOERR;
+#else
+	ix_short xx = (ix_short)*ip;
+	put_ix_short(xp, &xx);
+# if X_SHORT_MAX < INT_MAX
+	if(*ip > X_SHORT_MAX || *ip < X_SHORT_MIN)
+		return NC_ERANGE;
+# endif
+	return ENOERR;
+#endif
+}
+
+int
+ncx_put_short_uint(void *xp, const unsigned int *ip)
+{
+#if SIZEOF_IX_SHORT == SIZEOF_INT && X_SHORT_MAX == INT_MAX
+	put_ix_short(xp, (const ix_short *)ip);
+	return ENOERR;
+#else
+	ix_short xx = (ix_short)*ip;
+	put_ix_short(xp, &xx);
+# if X_SHORT_MAX < INT_MAX
+	if(*ip > X_SHORT_MAX)
+		return NC_ERANGE;
+# endif
+	return ENOERR;
+#endif
+}
+
+int
+ncx_put_short_longlong(void *xp, const long long *ip)
+{
+#if SIZEOF_IX_SHORT == SIZEOF_LONG_LONG && X_SHORT_MAX == LONG_LONG_MAX
+	put_ix_short(xp, (const ix_short *)ip);
+	return ENOERR;
+#else
+	ix_short xx = (ix_short)*ip;
+	put_ix_short(xp, &xx);
+# if X_SHORT_MAX < LONG_LONG_MAX
+	if(*ip > X_SHORT_MAX || *ip < X_SHORT_MIN)
+		return NC_ERANGE;
+# endif
+	return ENOERR;
+#endif
+}
+
+int
+ncx_put_short_ulonglong(void *xp, const unsigned long long *ip)
+{
+#if SIZEOF_IX_SHORT == SIZEOF_LONG_LONG && X_SHORT_MAX == LONG_LONG_MAX
+	put_ix_short(xp, (const ix_short *)ip);
+	return ENOERR;
+#else
+	ix_short xx = (ix_short)*ip;
+	put_ix_short(xp, &xx);
+# if X_SHORT_MAX < LONG_LONG_MAX
+	if(*ip > X_SHORT_MAX)
+		return NC_ERANGE;
+# endif
+	return ENOERR;
+#endif
+}
+
+int
+ncx_put_short_float(void *xp, const float *ip)
+{
+	ix_short xx = *ip;
+	put_ix_short(xp, &xx);
+	if(*ip > X_SHORT_MAX || *ip < X_SHORT_MIN)
+		return NC_ERANGE;
+	return ENOERR;
+}
+
+int
+ncx_put_short_double(void *xp, const double *ip)
+{
+	ix_short xx = *ip;
+	put_ix_short(xp, &xx);
+	if(*ip > X_SHORT_MAX || *ip < X_SHORT_MIN)
+		return NC_ERANGE;
+	return ENOERR;
+}
+
+/* x_int */
+
+#if SHORT_MAX == X_INT_MAX
+typedef short ix_int;
+#define SIZEOF_IX_INT SIZEOF_SHORT
+#define IX_INT_MAX SHORT_MAX
+#elif INT_MAX  >= X_INT_MAX
+typedef int ix_int;
+#define SIZEOF_IX_INT SIZEOF_INT
+#define IX_INT_MAX INT_MAX
+#elif LONG_MAX  >= X_INT_MAX
+typedef long ix_int;
+#define SIZEOF_IX_INT SIZEOF_LONG
+#define IX_INT_MAX LONG_MAX
+#else
+#error "ix_int implementation"
+#endif
+
+
+static void
+get_ix_int(const void *xp, ix_int *ip)
+{
+	const uchar *cp = (const uchar *) xp;
+
+	*ip = *cp++ << 24;
+#if SIZEOF_IX_INT > X_SIZEOF_INT
+	if(*ip & 0x80000000)
+	{
+		/* extern is negative */
+		*ip |= (~(0xffffffff)); /* N.B. Assumes "twos complement" */
+	}
+#endif
+	*ip |= (*cp++ << 16);
+	*ip |= (*cp++ << 8);
+	*ip |= *cp; 
+}
+
+static void
+put_ix_int(void *xp, const ix_int *ip)
+{
+	uchar *cp = (uchar *) xp;
+
+	*cp++ = (*ip) >> 24;
+	*cp++ = ((*ip) & 0x00ff0000) >> 16;
+	*cp++ = ((*ip) & 0x0000ff00) >>  8;
+	*cp   = ((*ip) & 0x000000ff);
+}
+
+
+int
+ncx_get_int_schar(const void *xp, schar *ip)
+{
+	ix_int xx;
+	get_ix_int(xp, &xx);
+	*ip = xx;
+	if(xx > SCHAR_MAX || xx < SCHAR_MIN)
+		return NC_ERANGE;
+	return ENOERR;
+}
+
+int
+ncx_get_int_uchar(const void *xp, uchar *ip)
+{
+	ix_int xx;
+	get_ix_int(xp, &xx);
+	*ip = xx;
+	if(xx > UCHAR_MAX || xx < 0)
+		return NC_ERANGE;
+	return ENOERR;
+}
+
+int
+ncx_get_int_short(const void *xp, short *ip)
+{
+#if SIZEOF_IX_INT == SIZEOF_SHORT && IX_INT_MAX == SHORT_MAX
+	get_ix_int(xp, (ix_int *)ip);
+	return ENOERR;
+#else
+	ix_int xx;
+	get_ix_int(xp, &xx);
+	*ip = xx;
+#  if IX_INT_MAX > SHORT_MAX
+	if(xx > SHORT_MAX || xx < SHORT_MIN)
+		return NC_ERANGE;
+#  endif
+	return ENOERR;
+#endif
+}
+
+int
+ncx_get_int_int(const void *xp, int *ip)
+{
+#if SIZEOF_IX_INT == SIZEOF_INT && IX_INT_MAX == INT_MAX
+	get_ix_int(xp, (ix_int *)ip);
+	return ENOERR;
+#else
+	ix_int xx;
+	get_ix_int(xp, &xx);
+	*ip = xx;
+#  if IX_INT_MAX > INT_MAX
+	if(xx > INT_MAX || xx < INT_MIN)
+		return NC_ERANGE;
+#  endif
+	return ENOERR;
+#endif
+}
+
+int
+ncx_get_int_uint(const void *xp, unsigned int *ip)
+{
+	ix_int xx;
+	get_ix_int(xp, &xx);
+	*ip = xx;
+	if(xx > UINT_MAX || xx < 0)
+		return NC_ERANGE;
+	return ENOERR;
+}
+
+int
+ncx_get_int_longlong(const void *xp, long long *ip)
+{
+	ix_int xx;
+	get_ix_int(xp, &xx);
+	*ip = xx;
+	return ENOERR;
+}
+
+int
+ncx_get_int_ulonglong(const void *xp, unsigned long long *ip)
+{
+	ix_int xx;
+	get_ix_int(xp, &xx);
+	*ip = xx;
+	if(xx < 0)
+	      return NC_ERANGE;
+	return ENOERR;
+}
+
+int
+ncx_get_int_float(const void *xp, float *ip)
+{
+	ix_int xx;
+	get_ix_int(xp, &xx);
+	*ip = xx;
+#if 0	/* TODO: determine when necessary */
+	if(xx > FLT_MAX || xx < (-FLT_MAX))
+		return NC_ERANGE;
+#endif
+	return ENOERR;
+}
+
+int
+ncx_get_int_double(const void *xp, double *ip)
+{
+	/* assert((DBL_MAX >= X_INT_MAX); */
+	ix_int xx;
+	get_ix_int(xp, &xx);
+	*ip = xx;
+	return ENOERR;
+}
+
+int
+ncx_put_int_schar(void *xp, const schar *ip)
+{
+	uchar *cp = (uchar *) xp;
+	if(*ip & 0x80)
+	{
+		*cp++ = 0xff;
+		*cp++ = 0xff;
+		*cp++ = 0xff;
+	}
+	else
+	{
+		*cp++ = 0x00;
+		*cp++ = 0x00;
+		*cp++ = 0x00;
+	}
+	*cp = (uchar)*ip;
+	return ENOERR;
+}
+
+int
+ncx_put_int_uchar(void *xp, const uchar *ip)
+{
+	uchar *cp = (uchar *) xp;
+	*cp++ = 0x00;
+	*cp++ = 0x00;
+	*cp++ = 0x00;
+	*cp   = *ip;
+	return ENOERR;
+}
+
+int
+ncx_put_int_short(void *xp, const short *ip)
+{
+#if SIZEOF_IX_INT == SIZEOF_SHORT && IX_INT_MAX == SHORT_MAX
+	put_ix_int(xp, (ix_int *)ip);
+	return ENOERR;
+#else
+	ix_int xx = (ix_int)(*ip);
+	put_ix_int(xp, &xx);
+#   if IX_INT_MAX < SHORT_MAX
+	if(*ip > X_INT_MAX || *ip < X_INT_MIN)
+		return NC_ERANGE;
+#   endif
+	return ENOERR;
+#endif
+}
+
+int
+ncx_put_int_int(void *xp, const int *ip)
+{
+#if SIZEOF_IX_INT == SIZEOF_INT && IX_INT_MAX == INT_MAX
+	put_ix_int(xp, (ix_int *)ip);
+	return ENOERR;
+#else
+	ix_int xx = (ix_int)(*ip);
+	put_ix_int(xp, &xx);
+#   if IX_INT_MAX < INT_MAX
+	if(*ip > X_INT_MAX || *ip < X_INT_MIN)
+		return NC_ERANGE;
+#   endif
+	return ENOERR;
+#endif
+}
+
+int
+ncx_put_int_uint(void *xp, const unsigned int *ip)
+{
+#if SIZEOF_IX_INT == SIZEOF_INT && IX_INT_MAX == INT_MAX
+	put_ix_int(xp, (ix_int *)ip);
+	return ENOERR;
+#else
+	ix_int xx = (ix_int)(*ip);
+	put_ix_int(xp, &xx);
+	if(*ip > X_UINT_MAX)
+		return NC_ERANGE;
+	return ENOERR;
+#endif
+}
+
+int
+ncx_put_int_longlong(void *xp, const longlong *ip)
+{
+#if SIZEOF_IX_INT == SIZEOF_LONG && IX_INT_MAX == LONG_MAX
+	put_ix_int(xp, (ix_int *)ip);
+	return ENOERR;
+#else
+	ix_int xx = (ix_int)(*ip);
+	put_ix_int(xp, &xx);
+#   if IX_INT_MAX < LONG_LONG_MAX
+	if(*ip > X_INT_MAX || *ip < X_INT_MIN)
+		return NC_ERANGE;
+#   endif
+	return ENOERR;
+#endif
+}
+
+int
+ncx_put_int_ulonglong(void *xp, const unsigned long long *ip)
+{
+#if SIZEOF_IX_INT == SIZEOF_LONG && IX_INT_MAX == LONG_MAX
+	put_ix_int(xp, (ix_int *)ip);
+	return ENOERR;
+#else
+	ix_int xx = (ix_int)(*ip);
+	put_ix_int(xp, &xx);
+#   if IX_INT_MAX < LONG_MAX
+	if(*ip > X_INT_MAX)
+		return NC_ERANGE;
+#   endif
+	return ENOERR;
+#endif
+}
+
+int
+ncx_put_int_float(void *xp, const float *ip)
+{
+	ix_int xx = (ix_int)(*ip);
+	put_ix_int(xp, &xx);
+	if(*ip > (double)X_INT_MAX || *ip < (double)X_INT_MIN)
+		return NC_ERANGE;
+	return ENOERR;
+}
+
+int
+ncx_put_int_double(void *xp, const double *ip)
+{
+	ix_int xx = (ix_int)(*ip);
+	put_ix_int(xp, &xx);
+	if(*ip > X_INT_MAX || *ip < X_INT_MIN)
+		return NC_ERANGE;
+	return ENOERR;
+}
+ 
+
+/* x_float */
+
+#if X_SIZEOF_FLOAT == SIZEOF_FLOAT && !defined(NO_IEEE_FLOAT)
+
+static void
+get_ix_float(const void *xp, float *ip)
+{
+#ifdef WORDS_BIGENDIAN
+	(void) memcpy(ip, xp, sizeof(float));
+#else
+	swap4b(ip, xp);
+#endif
+}
+
+static void
+put_ix_float(void *xp, const float *ip)
+{
+#ifdef WORDS_BIGENDIAN
+	(void) memcpy(xp, ip, X_SIZEOF_FLOAT);
+#else
+	swap4b(xp, ip);
+#endif
+}
+
+#elif vax
+
+/* What IEEE single precision floating point looks like on a Vax */
+struct	ieee_single {
+	unsigned int	exp_hi       : 7;
+	unsigned int	sign         : 1;
+	unsigned int 	mant_hi      : 7;
+	unsigned int	exp_lo       : 1;
+	unsigned int	mant_lo_hi   : 8;
+	unsigned int	mant_lo_lo   : 8;
+};
+
+/* Vax single precision floating point */
+struct	vax_single {
+	unsigned int	mantissa1 : 7;
+	unsigned int	exp       : 8;
+	unsigned int	sign      : 1;
+	unsigned int	mantissa2 : 16;
+};
+
+#define VAX_SNG_BIAS	0x81
+#define IEEE_SNG_BIAS	0x7f
+
+static struct sgl_limits {
+	struct vax_single s;
+	struct ieee_single ieee;
+} max = {
+	{ 0x7f, 0xff, 0x0, 0xffff },	/* Max Vax */
+	{ 0x7f, 0x0, 0x0, 0x1, 0x0, 0x0 }		/* Max IEEE */
+};
+static struct sgl_limits min = {
+	{ 0x0, 0x0, 0x0, 0x0 },	/* Min Vax */
+	{ 0x0, 0x0, 0x0, 0x0, 0x0, 0x0 }		/* Min IEEE */
+};
+
+static void
+get_ix_float(const void *xp, float *ip)
+{
+		struct vax_single *const vsp = (struct vax_single *) ip;
+		const struct ieee_single *const isp =
+			 (const struct ieee_single *) xp;
+		unsigned exp = isp->exp_hi << 1 | isp->exp_lo;
+
+		switch(exp) {
+		case 0 :
+			/* ieee subnormal */
+			if(isp->mant_hi == min.ieee.mant_hi
+				&& isp->mant_lo_hi == min.ieee.mant_lo_hi
+				&& isp->mant_lo_lo == min.ieee.mant_lo_lo)
+			{
+				*vsp = min.s;
+			}
+			else
+			{
+				unsigned mantissa = (isp->mant_hi << 16)
+					 | isp->mant_lo_hi << 8
+					 | isp->mant_lo_lo;
+				unsigned tmp = mantissa >> 20;
+				if(tmp >= 4) {
+					vsp->exp = 2;
+				} else if (tmp >= 2) {
+					vsp->exp = 1;
+				} else {
+					*vsp = min.s;
+					break;
+				} /* else */
+				tmp = mantissa - (1 << (20 + vsp->exp ));
+				tmp <<= 3 - vsp->exp;
+				vsp->mantissa2 = tmp;
+				vsp->mantissa1 = (tmp >> 16);
+			}
+			break;
+		case 0xfe :
+		case 0xff :
+			*vsp = max.s;
+			break;
+		default :
+			vsp->exp = exp - IEEE_SNG_BIAS + VAX_SNG_BIAS;
+			vsp->mantissa2 = isp->mant_lo_hi << 8 | isp->mant_lo_lo;
+			vsp->mantissa1 = isp->mant_hi;
+		}
+
+		vsp->sign = isp->sign;
+
+}
+
+
+static void
+put_ix_float(void *xp, const float *ip)
+{
+		const struct vax_single *const vsp =
+			 (const struct vax_single *)ip;
+		struct ieee_single *const isp = (struct ieee_single *) xp;
+
+		switch(vsp->exp){
+		case 0 :
+			/* all vax float with zero exponent map to zero */
+			*isp = min.ieee;
+			break;
+		case 2 :
+		case 1 :
+		{
+			/* These will map to subnormals */
+			unsigned mantissa = (vsp->mantissa1 << 16)
+					 | vsp->mantissa2;
+			mantissa >>= 3 - vsp->exp;
+			mantissa += (1 << (20 + vsp->exp));
+			isp->mant_lo_lo = mantissa;
+			isp->mant_lo_hi = mantissa >> 8;
+			isp->mant_hi = mantissa >> 16;
+			isp->exp_lo = 0;
+			isp->exp_hi = 0;
+		}
+			break;
+		case 0xff : /* max.s.exp */
+			if( vsp->mantissa2 == max.s.mantissa2
+				&& vsp->mantissa1 == max.s.mantissa1)
+			{
+				/* map largest vax float to ieee infinity */
+				*isp = max.ieee;
+				break;
+			} /* else, fall thru */
+		default :
+		{
+			unsigned exp = vsp->exp - VAX_SNG_BIAS + IEEE_SNG_BIAS;
+			isp->exp_hi = exp >> 1;
+			isp->exp_lo = exp;
+			isp->mant_lo_lo = vsp->mantissa2;
+			isp->mant_lo_hi = vsp->mantissa2 >> 8;
+			isp->mant_hi = vsp->mantissa1;
+		}
+		}
+
+		isp->sign = vsp->sign;
+
+}
+
+	/* vax */
+#elif defined(_CRAY) && !defined(__crayx1)
+
+/*
+ * Return the number of bytes until the next "word" boundary
+ * N.B. This is based on the very wierd YMP address structure,
+ * which puts the address within a word in the leftmost 3 bits
+ * of the address.
+ */
+static size_t
+word_align(const void *vp)
+{
+	const size_t rem = ((size_t)vp >> (64 - 3)) & 0x7;
+	return (rem != 0);
+}
+
+struct ieee_single_hi {
+	unsigned int	sign	: 1;
+	unsigned int	 exp	: 8;
+	unsigned int	mant	:23;
+	unsigned int	pad	:32;
+};
+typedef struct ieee_single_hi ieee_single_hi;
+
+struct ieee_single_lo {
+	unsigned int	pad	:32;
+	unsigned int	sign	: 1;
+	unsigned int	 exp	: 8;
+	unsigned int	mant	:23;
+};
+typedef struct ieee_single_lo ieee_single_lo;
+
+static const int ieee_single_bias = 0x7f;
+
+struct ieee_double {
+	unsigned int	sign	: 1;
+	unsigned int	 exp	:11;
+	unsigned int	mant	:52;
+};
+typedef struct ieee_double ieee_double;
+
+static const int ieee_double_bias = 0x3ff;
+
+#if defined(NO_IEEE_FLOAT)
+
+struct cray_single {
+	unsigned int	sign	: 1;
+	unsigned int	 exp	:15;
+	unsigned int	mant	:48;
+};
+typedef struct cray_single cray_single;
+
+static const int cs_ieis_bias = 0x4000 - 0x7f;
+
+static const int cs_id_bias = 0x4000 - 0x3ff;
+
+
+static void
+get_ix_float(const void *xp, float *ip)
+{
+
+	if(word_align(xp) == 0)
+	{
+		const ieee_single_hi *isp = (const ieee_single_hi *) xp;
+		cray_single *csp = (cray_single *) ip;
+
+		if(isp->exp == 0)
+		{
+			/* ieee subnormal */
+			*ip = (double)isp->mant;
+			if(isp->mant != 0)
+			{
+				csp->exp -= (ieee_single_bias + 22);
+			}
+		}
+		else
+		{
+			csp->exp  = isp->exp + cs_ieis_bias + 1;
+			csp->mant = isp->mant << (48 - 1 - 23);
+			csp->mant |= (1 << (48 - 1));
+		}
+		csp->sign = isp->sign;
+
+
+	}
+	else
+	{
+		const ieee_single_lo *isp = (const ieee_single_lo *) xp;
+		cray_single *csp = (cray_single *) ip;
+
+		if(isp->exp == 0)
+		{
+			/* ieee subnormal */
+			*ip = (double)isp->mant;
+			if(isp->mant != 0)
+			{
+				csp->exp -= (ieee_single_bias + 22);
+			}
+		}
+		else
+		{
+			csp->exp  = isp->exp + cs_ieis_bias + 1;
+			csp->mant = isp->mant << (48 - 1 - 23);
+			csp->mant |= (1 << (48 - 1));
+		}
+		csp->sign = isp->sign;
+
+
+	}
+}
+
+static void
+put_ix_float(void *xp, const float *ip)
+{
+	if(word_align(xp) == 0)
+	{
+		ieee_single_hi *isp = (ieee_single_hi*)xp;
+	const cray_single *csp = (const cray_single *) ip;
+	int ieee_exp = csp->exp - cs_ieis_bias -1;
+
+	isp->sign = csp->sign;
+
+	if(ieee_exp >= 0xff)
+	{
+		/* NC_ERANGE => ieee Inf */
+		isp->exp = 0xff;
+		isp->mant = 0x0;
+	}
+	else if(ieee_exp > 0)
+	{
+		/* normal ieee representation */
+		isp->exp  = ieee_exp;
+		/* assumes cray rep is in normal form */
+		assert(csp->mant & 0x800000000000);
+		isp->mant = (((csp->mant << 1) &
+				0xffffffffffff) >> (48 - 23));
+	}
+	else if(ieee_exp > -23)
+	{
+		/* ieee subnormal, right shift */
+		const int rshift = (48 - 23 - ieee_exp);
+
+		isp->mant = csp->mant >> rshift;
+
+#if 0
+		if(csp->mant & (1 << (rshift -1)))
+		{
+			/* round up */
+			isp->mant++;
+		}
+#endif
+
+		isp->exp  = 0;
+	}
+	else
+	{
+		/* smaller than ieee can represent */
+		isp->exp = 0;
+		isp->mant = 0;
+	}
+
+	}
+	else
+	{
+		ieee_single_lo *isp = (ieee_single_lo*)xp;
+	const cray_single *csp = (const cray_single *) ip;
+	int ieee_exp = csp->exp - cs_ieis_bias -1;
+
+	isp->sign = csp->sign;
+
+	if(ieee_exp >= 0xff)
+	{
+		/* NC_ERANGE => ieee Inf */
+		isp->exp = 0xff;
+		isp->mant = 0x0;
+	}
+	else if(ieee_exp > 0)
+	{
+		/* normal ieee representation */
+		isp->exp  = ieee_exp;
+		/* assumes cray rep is in normal form */
+		assert(csp->mant & 0x800000000000);
+		isp->mant = (((csp->mant << 1) &
+				0xffffffffffff) >> (48 - 23));
+	}
+	else if(ieee_exp > -23)
+	{
+		/* ieee subnormal, right shift */
+		const int rshift = (48 - 23 - ieee_exp);
+
+		isp->mant = csp->mant >> rshift;
+
+#if 0
+		if(csp->mant & (1 << (rshift -1)))
+		{
+			/* round up */
+			isp->mant++;
+		}
+#endif
+
+		isp->exp  = 0;
+	}
+	else
+	{
+		/* smaller than ieee can represent */
+		isp->exp = 0;
+		isp->mant = 0;
+	}
+
+	}
+}
+
+#else
+	/* IEEE Cray with only doubles */
+static void
+get_ix_float(const void *xp, float *ip)
+{
+
+	ieee_double *idp = (ieee_double *) ip;
+
+	if(word_align(xp) == 0)
+	{
+		const ieee_single_hi *isp = (const ieee_single_hi *) xp;
+		if(isp->exp == 0 && isp->mant == 0)
+		{
+			idp->exp = 0;
+			idp->mant = 0;
+		}
+		else
+		{
+			idp->exp = isp->exp + (ieee_double_bias - ieee_single_bias);
+			idp->mant = isp->mant << (52 - 23);
+		}
+		idp->sign = isp->sign;
+	}
+	else
+	{
+		const ieee_single_lo *isp = (const ieee_single_lo *) xp;
+		if(isp->exp == 0 && isp->mant == 0)
+		{
+			idp->exp = 0;
+			idp->mant = 0;
+		}
+		else
+		{
+			idp->exp = isp->exp + (ieee_double_bias - ieee_single_bias);
+			idp->mant = isp->mant << (52 - 23);
+		}
+		idp->sign = isp->sign;
+	}
+}
+
+static void
+put_ix_float(void *xp, const float *ip)
+{
+	const ieee_double *idp = (const ieee_double *) ip;
+	if(word_align(xp) == 0)
+	{
+		ieee_single_hi *isp = (ieee_single_hi*)xp;
+		if(idp->exp > (ieee_double_bias - ieee_single_bias))
+			isp->exp = idp->exp - (ieee_double_bias - ieee_single_bias);
+		else
+			isp->exp = 0;
+		isp->mant = idp->mant >> (52 - 23);
+		isp->sign = idp->sign;
+	}
+	else
+	{
+		ieee_single_lo *isp = (ieee_single_lo*)xp;
+		if(idp->exp > (ieee_double_bias - ieee_single_bias))
+			isp->exp = idp->exp - (ieee_double_bias - ieee_single_bias);
+		else
+			isp->exp = 0;
+		isp->mant = idp->mant >> (52 - 23);
+		isp->sign = idp->sign;
+	}
+}
+#endif
+
+#else
+#error "ix_float implementation"
+#endif
+
+
+int
+ncx_get_float_schar(const void *xp, schar *ip)
+{
+	float xx;
+	get_ix_float(xp, &xx);
+	*ip = (schar) xx;
+	if(xx > SCHAR_MAX || xx < SCHAR_MIN)
+		return NC_ERANGE;
+	return ENOERR;
+}
+
+int
+ncx_get_float_uchar(const void *xp, uchar *ip)
+{
+	float xx;
+	get_ix_float(xp, &xx);
+	*ip = (uchar) xx;
+	if(xx > UCHAR_MAX || xx < 0)
+		return NC_ERANGE;
+	return ENOERR;
+}
+
+int
+ncx_get_float_short(const void *xp, short *ip)
+{
+	float xx;
+	get_ix_float(xp, &xx);
+	*ip = (short) xx;
+	if(xx > SHORT_MAX || xx < SHORT_MIN)
+		return NC_ERANGE;
+	return ENOERR;
+}
+
+int
+ncx_get_float_int(const void *xp, int *ip)
+{
+	float xx;
+	get_ix_float(xp, &xx);
+	*ip = (int) xx;
+	if(xx > (double)INT_MAX || xx < (double)INT_MIN)
+		return NC_ERANGE;
+	return ENOERR;
+}
+
+int
+ncx_get_float_uint(const void *xp, unsigned int *ip)
+{
+	float xx;
+	get_ix_float(xp, &xx);
+	*ip = (unsigned int) xx;
+	if(xx > (double)UINT_MAX || xx < 0)
+		return NC_ERANGE;
+	return ENOERR;
+}
+
+int
+ncx_get_float_longlong(const void *xp, longlong *ip)
+{
+	float xx;
+	get_ix_float(xp, &xx);
+	*ip = (longlong) xx;
+	if(xx > (double)LONG_LONG_MAX || xx < (double)LONG_LONG_MIN)
+		return NC_ERANGE;
+	return ENOERR;
+}
+
+int
+ncx_get_float_ulonglong(const void *xp, unsigned long long *ip)
+{
+	float xx;
+	get_ix_float(xp, &xx);
+	*ip = (longlong) xx;
+	if(xx > (double)ULONG_LONG_MAX || xx < 0)
+		return NC_ERANGE;
+	return ENOERR;
+}
+
+int
+ncx_get_float_float(const void *xp, float *ip)
+{
+	/* TODO */
+	get_ix_float(xp, ip);
+	return ENOERR;
+}
+
+int
+ncx_get_float_double(const void *xp, double *ip)
+{
+	/* TODO */
+	float xx;
+	get_ix_float(xp, &xx);
+	*ip = xx;
+	return ENOERR;
+}
+
+
+int
+ncx_put_float_schar(void *xp, const schar *ip)
+{
+	float xx = (float) *ip;
+	put_ix_float(xp, &xx);
+	return ENOERR;
+}
+
+int
+ncx_put_float_uchar(void *xp, const uchar *ip)
+{
+	float xx = (float) *ip;
+	put_ix_float(xp, &xx);
+	return ENOERR;
+}
+
+int
+ncx_put_float_short(void *xp, const short *ip)
+{
+	float xx = (float) *ip;
+	put_ix_float(xp, &xx);
+#if 0	/* TODO: figure this out */
+	if((float)(*ip) > X_FLOAT_MAX || (float)(*ip) < X_FLOAT_MIN)
+		return NC_ERANGE;
+#endif
+	return ENOERR;
+}
+
+int
+ncx_put_float_int(void *xp, const int *ip)
+{
+	float xx = (float) *ip;
+	put_ix_float(xp, &xx);
+#if 1	/* TODO: figure this out */
+	if((float)(*ip) > X_FLOAT_MAX || (float)(*ip) < X_FLOAT_MIN)
+		return NC_ERANGE;
+#endif
+	return ENOERR;
+}
+
+int
+ncx_put_float_uint(void *xp, const unsigned int *ip)
+{
+	float xx = (float) *ip;
+	put_ix_float(xp, &xx);
+#if 1	/* TODO: figure this out */
+	if((float)(*ip) > X_FLOAT_MAX)
+		return NC_ERANGE;
+#endif
+	return ENOERR;
+}
+
+int
+ncx_put_float_longlong(void *xp, const longlong *ip)
+{
+	float xx = (float) *ip;
+	put_ix_float(xp, &xx);
+#if 1	/* TODO: figure this out */
+	if((float)(*ip) > X_FLOAT_MAX || (float)(*ip) < X_FLOAT_MIN)
+		return NC_ERANGE;
+#endif
+	return ENOERR;
+}
+
+int
+ncx_put_float_ulonglong(void *xp, const unsigned long long *ip)
+{
+	float xx = (float) *ip;
+	put_ix_float(xp, &xx);
+#if 1	/* TODO: figure this out */
+	if((float)(*ip) > X_FLOAT_MAX)
+		return NC_ERANGE;
+#endif
+	return ENOERR;
+}
+
+int
+ncx_put_float_float(void *xp, const float *ip)
+{
+	put_ix_float(xp, ip);
+#ifdef NO_IEEE_FLOAT
+	if(*ip > X_FLOAT_MAX || *ip < X_FLOAT_MIN)
+		return NC_ERANGE;
+#endif
+	return ENOERR;
+}
+
+int
+ncx_put_float_double(void *xp, const double *ip)
+{
+	float xx = (float) *ip;
+	put_ix_float(xp, &xx);
+	if(*ip > X_FLOAT_MAX || *ip < X_FLOAT_MIN)
+		return NC_ERANGE;
+	return ENOERR;
+}
+
+/* x_double */
+
+#if X_SIZEOF_DOUBLE == SIZEOF_DOUBLE  && !defined(NO_IEEE_FLOAT)
+
+static void
+get_ix_double(const void *xp, double *ip)
+{
+#ifdef WORDS_BIGENDIAN
+	(void) memcpy(ip, xp, sizeof(double));
+#else
+	swap8b(ip, xp);
+#endif
+}
+
+static void
+put_ix_double(void *xp, const double *ip)
+{
+#ifdef WORDS_BIGENDIAN
+	(void) memcpy(xp, ip, X_SIZEOF_DOUBLE);
+#else
+	swap8b(xp, ip);
+#endif
+}
+
+#elif vax
+
+/* What IEEE double precision floating point looks like on a Vax */
+struct	ieee_double {
+	unsigned int	exp_hi   : 7;
+	unsigned int	sign     : 1;
+	unsigned int 	mant_6   : 4;
+	unsigned int	exp_lo   : 4;
+	unsigned int	mant_5   : 8;
+	unsigned int	mant_4   : 8;
+
+	unsigned int	mant_lo  : 32;
+};
+
+/* Vax double precision floating point */
+struct  vax_double {
+	unsigned int	mantissa1 : 7;
+	unsigned int	exp       : 8;
+	unsigned int	sign      : 1;
+	unsigned int	mantissa2 : 16;
+	unsigned int	mantissa3 : 16;
+	unsigned int	mantissa4 : 16;
+};
+
+#define VAX_DBL_BIAS	0x81
+#define IEEE_DBL_BIAS	0x3ff
+#define MASK(nbits)	((1 << nbits) - 1)
+
+static const struct dbl_limits {
+	struct	vax_double d;
+	struct	ieee_double ieee;
+} dbl_limits[2] = {
+	{{ 0x7f, 0xff, 0x0, 0xffff, 0xffff, 0xffff },	/* Max Vax */
+	{ 0x7f, 0x0, 0x0, 0xf, 0x0, 0x0, 0x0}}, /* Max IEEE */
+	{{ 0x0, 0x0, 0x0, 0x0, 0x0, 0x0},		/* Min Vax */
+	{ 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0}}, /* Min IEEE */
+};
+
+
+static void
+get_ix_double(const void *xp, double *ip)
+{
+	struct vax_double *const vdp =
+			 (struct vax_double *)ip;
+	const struct ieee_double *const idp =
+			 (const struct ieee_double *) xp;
+	{
+		const struct dbl_limits *lim;
+		int ii;
+		for (ii = 0, lim = dbl_limits;
+			ii < sizeof(dbl_limits)/sizeof(struct dbl_limits);
+			ii++, lim++)
+		{
+			if ((idp->mant_lo == lim->ieee.mant_lo)
+				&& (idp->mant_4 == lim->ieee.mant_4)
+				&& (idp->mant_5 == lim->ieee.mant_5)
+				&& (idp->mant_6 == lim->ieee.mant_6)
+				&& (idp->exp_lo == lim->ieee.exp_lo)
+				&& (idp->exp_hi == lim->ieee.exp_hi)
+				)
+			{
+				*vdp = lim->d;
+				goto doneit;
+			}
+		}
+	}
+	{
+		unsigned exp = idp->exp_hi << 4 | idp->exp_lo;
+		vdp->exp = exp - IEEE_DBL_BIAS + VAX_DBL_BIAS;
+	}
+	{
+		unsigned mant_hi = ((idp->mant_6 << 16)
+				 | (idp->mant_5 << 8)
+				 | idp->mant_4);
+		unsigned mant_lo = SWAP4(idp->mant_lo);
+		vdp->mantissa1 = (mant_hi >> 13);
+		vdp->mantissa2 = ((mant_hi & MASK(13)) << 3)
+				| (mant_lo >> 29);
+		vdp->mantissa3 = (mant_lo >> 13);
+		vdp->mantissa4 = (mant_lo << 3);
+	}
+	doneit:
+		vdp->sign = idp->sign;
+
+}
+
+
+static void
+put_ix_double(void *xp, const double *ip)
+{
+	const struct vax_double *const vdp = 
+			(const struct vax_double *)ip;
+	struct ieee_double *const idp =
+			 (struct ieee_double *) xp;
+
+	if ((vdp->mantissa4 > (dbl_limits[0].d.mantissa4 - 3)) &&
+		(vdp->mantissa3 == dbl_limits[0].d.mantissa3) &&
+		(vdp->mantissa2 == dbl_limits[0].d.mantissa2) &&
+		(vdp->mantissa1 == dbl_limits[0].d.mantissa1) &&
+		(vdp->exp == dbl_limits[0].d.exp))
+	{
+		*idp = dbl_limits[0].ieee;
+		goto shipit;
+	}
+	if ((vdp->mantissa4 == dbl_limits[1].d.mantissa4) &&
+		(vdp->mantissa3 == dbl_limits[1].d.mantissa3) &&
+		(vdp->mantissa2 == dbl_limits[1].d.mantissa2) &&
+		(vdp->mantissa1 == dbl_limits[1].d.mantissa1) &&
+		(vdp->exp == dbl_limits[1].d.exp))
+	{
+		*idp = dbl_limits[1].ieee;
+		goto shipit;
+	}
+
+	{
+		unsigned exp = vdp->exp - VAX_DBL_BIAS + IEEE_DBL_BIAS;
+
+		unsigned mant_lo = ((vdp->mantissa2 & MASK(3)) << 29) |
+			(vdp->mantissa3 << 13) |
+			((vdp->mantissa4 >> 3) & MASK(13));
+
+		unsigned mant_hi = (vdp->mantissa1 << 13)
+				 | (vdp->mantissa2 >> 3);
+
+		if((vdp->mantissa4 & 7) > 4)
+		{
+			/* round up */
+			mant_lo++;
+			if(mant_lo == 0)
+			{
+				mant_hi++;
+				if(mant_hi > 0xffffff)
+				{
+					mant_hi = 0;
+					exp++;
+				}
+			}
+		}
+
+		idp->mant_lo = SWAP4(mant_lo);
+		idp->mant_6 = mant_hi >> 16;
+		idp->mant_5 = (mant_hi & 0xff00) >> 8;
+		idp->mant_4 = mant_hi;
+		idp->exp_hi = exp >> 4;
+		idp->exp_lo = exp;
+	}
+		
+	shipit:
+		idp->sign = vdp->sign;
+
+}
+
+	/* vax */
+#elif defined(_CRAY) && !defined(__crayx1)
+
+static void
+get_ix_double(const void *xp, double *ip)
+{
+	const ieee_double *idp = (const ieee_double *) xp;
+	cray_single *csp = (cray_single *) ip;
+
+	if(idp->exp == 0)
+	{
+		/* ieee subnormal */
+		*ip = (double)idp->mant;
+		if(idp->mant != 0)
+		{
+			csp->exp -= (ieee_double_bias + 51);
+		}
+	}
+	else
+	{
+		csp->exp  = idp->exp + cs_id_bias + 1;
+		csp->mant = idp->mant >> (52 - 48 + 1);
+		csp->mant |= (1 << (48 - 1));
+	}
+	csp->sign = idp->sign;
+}
+
+static void
+put_ix_double(void *xp, const double *ip)
+{
+	ieee_double *idp = (ieee_double *) xp;
+	const cray_single *csp = (const cray_single *) ip;
+
+	int ieee_exp = csp->exp - cs_id_bias -1;
+
+	idp->sign = csp->sign;
+
+	if(ieee_exp >= 0x7ff)
+	{
+		/* NC_ERANGE => ieee Inf */
+		idp->exp = 0x7ff;
+		idp->mant = 0x0;
+	}
+	else if(ieee_exp > 0)
+	{
+		/* normal ieee representation */
+		idp->exp  = ieee_exp;
+		/* assumes cray rep is in normal form */
+		assert(csp->mant & 0x800000000000);
+		idp->mant = (((csp->mant << 1) &
+				0xffffffffffff) << (52 - 48));
+	}
+	else if(ieee_exp >= (-(52 -48)))
+	{
+		/* ieee subnormal, left shift */
+		const int lshift = (52 - 48) + ieee_exp;
+		idp->mant = csp->mant << lshift;
+		idp->exp  = 0;
+	}
+	else if(ieee_exp >= -52)
+	{
+		/* ieee subnormal, right shift */
+		const int rshift = (- (52 - 48) - ieee_exp);
+
+		idp->mant = csp->mant >> rshift;
+
+#if 0
+		if(csp->mant & (1 << (rshift -1)))
+		{
+			/* round up */
+			idp->mant++;
+		}
+#endif
+
+		idp->exp  = 0;
+	}
+	else
+	{
+		/* smaller than ieee can represent */
+		idp->exp = 0;
+		idp->mant = 0;
+	}
+}
+#else
+#error "ix_double implementation"
+#endif
+
+int
+ncx_get_double_schar(const void *xp, schar *ip)
+{
+	double xx;
+	get_ix_double(xp, &xx);
+	*ip = (schar) xx;
+	if(xx > SCHAR_MAX || xx < SCHAR_MIN)
+		return NC_ERANGE;
+	return ENOERR;
+}
+
+int
+ncx_get_double_uchar(const void *xp, uchar *ip)
+{
+	double xx;
+	get_ix_double(xp, &xx);
+	*ip = (uchar) xx;
+	if(xx > UCHAR_MAX || xx < 0)
+		return NC_ERANGE;
+	return ENOERR;
+}
+
+int
+ncx_get_double_short(const void *xp, short *ip)
+{
+	double xx;
+	get_ix_double(xp, &xx);
+	*ip = (short) xx;
+	if(xx > SHORT_MAX || xx < SHORT_MIN)
+		return NC_ERANGE;
+	return ENOERR;
+}
+
+int
+ncx_get_double_int(const void *xp, int *ip)
+{
+	double xx;
+	get_ix_double(xp, &xx);
+	*ip = (int) xx;
+	if(xx > INT_MAX || xx < INT_MIN)
+		return NC_ERANGE;
+	return ENOERR;
+}
+
+int
+ncx_get_double_uint(const void *xp, unsigned int *ip)
+{
+	double xx;
+	get_ix_double(xp, &xx);
+	*ip = (unsigned int) xx;
+	if(xx > UINT_MAX || xx < 0)
+		return NC_ERANGE;
+	return ENOERR;
+}
+
+int
+ncx_get_double_longlong(const void *xp, longlong *ip)
+{
+	double xx;
+	get_ix_double(xp, &xx);
+	*ip = (longlong) xx;
+	if(xx > LONG_LONG_MAX || xx < LONG_LONG_MIN)
+		return NC_ERANGE;
+	return ENOERR;
+}
+
+int
+ncx_get_double_ulonglong(const void *xp, unsigned long long *ip)
+{
+	double xx;
+	get_ix_double(xp, &xx);
+	*ip = (unsigned longlong) xx;
+	if(xx > ULONG_LONG_MAX || xx < 0)
+		return NC_ERANGE;
+	return ENOERR;
+}
+
+int
+ncx_get_double_float(const void *xp, float *ip)
+{
+	double xx;
+	get_ix_double(xp, &xx);
+	if(xx > FLT_MAX)
+	{
+		*ip = FLT_MAX;
+		return NC_ERANGE;
+	}
+	if(xx < (-FLT_MAX))
+	{
+		*ip = (-FLT_MAX);
+		return NC_ERANGE;
+	}
+	*ip = (float) xx;
+	return ENOERR;
+}
+
+int
+ncx_get_double_double(const void *xp, double *ip)
+{
+	/* TODO */
+	get_ix_double(xp, ip);
+	return ENOERR;
+}
+
+
+int
+ncx_put_double_schar(void *xp, const schar *ip)
+{
+	double xx = (double) *ip;
+	put_ix_double(xp, &xx);
+	return ENOERR;
+}
+
+int
+ncx_put_double_uchar(void *xp, const uchar *ip)
+{
+	double xx = (double) *ip;
+	put_ix_double(xp, &xx);
+	return ENOERR;
+}
+
+int
+ncx_put_double_short(void *xp, const short *ip)
+{
+	double xx = (double) *ip;
+	put_ix_double(xp, &xx);
+#if 0	/* TODO: figure this out */
+	if((double)(*ip) > X_DOUBLE_MAX || (double)(*ip) < X_DOUBLE_MIN)
+		return NC_ERANGE;
+#endif
+	return ENOERR;
+}
+
+int
+ncx_put_double_int(void *xp, const int *ip)
+{
+	double xx = (double) *ip;
+	put_ix_double(xp, &xx);
+#if 0	/* TODO: figure this out */
+	if((double)(*ip) > X_DOUBLE_MAX || (double)(*ip) < X_DOUBLE_MIN)
+		return NC_ERANGE;
+#endif
+	return ENOERR;
+}
+
+int
+ncx_put_double_uint(void *xp, const unsigned int *ip)
+{
+	double xx = (double) *ip;
+	put_ix_double(xp, &xx);
+#if 0	/* TODO: figure this out */
+	if((double)(*ip) > X_DOUBLE_MAX)
+		return NC_ERANGE;
+#endif
+	return ENOERR;
+}
+
+int
+ncx_put_double_longlong(void *xp, const longlong *ip)
+{
+	double xx = (double) *ip;
+	put_ix_double(xp, &xx);
+#if 1	/* TODO: figure this out */
+	if((double)(*ip) > X_DOUBLE_MAX || (double)(*ip) < X_DOUBLE_MIN)
+		return NC_ERANGE;
+#endif
+	return ENOERR;
+}
+
+int
+ncx_put_double_ulonglong(void *xp, const unsigned long long *ip)
+{
+	double xx = (double) *ip;
+	put_ix_double(xp, &xx);
+#if 1	/* TODO: figure this out */
+	if((double)(*ip) > X_DOUBLE_MAX)
+		return NC_ERANGE;
+#endif
+	return ENOERR;
+}
+
+int
+ncx_put_double_float(void *xp, const float *ip)
+{
+	double xx = (double) *ip;
+	put_ix_double(xp, &xx);
+#if 1	/* TODO: figure this out */
+	if((double)(*ip) > X_DOUBLE_MAX || (double)(*ip) < X_DOUBLE_MIN)
+		return NC_ERANGE;
+#endif
+	return ENOERR;
+}
+
+int
+ncx_put_double_double(void *xp, const double *ip)
+{
+	put_ix_double(xp, ip);
+#ifdef NO_IEEE_FLOAT
+	if(*ip > X_DOUBLE_MAX || *ip < X_DOUBLE_MIN)
+		return NC_ERANGE;
+#endif
+	return ENOERR;
+}
+
+
+/* x_size_t */
+
+#if SIZEOF_SIZE_T < X_SIZEOF_SIZE_T
+#error "x_size_t implementation"
+/* netcdf requires size_t which can hold a values from 0 to 2^32 -1 */
+#endif
+
+int
+ncx_put_size_t(void **xpp, const size_t *ulp)
+{
+	/* similar to put_ix_int() */
+	uchar *cp = (uchar *) *xpp;
+	assert(*ulp <= X_SIZE_MAX);
+
+	*cp++ = (uchar)((*ulp) >> 24);
+	*cp++ = (uchar)(((*ulp) & 0x00ff0000) >> 16);
+	*cp++ = (uchar)(((*ulp) & 0x0000ff00) >>  8);
+	*cp   = (uchar)((*ulp) & 0x000000ff);
+
+	*xpp = (void *)((char *)(*xpp) + X_SIZEOF_SIZE_T);
+	return ENOERR;
+}
+
+int
+ncx_get_size_t(const void **xpp,  size_t *ulp)
+{
+	/* similar to get_ix_int */
+	const uchar *cp = (const uchar *) *xpp;
+
+	*ulp = (unsigned)(*cp++ << 24);
+	*ulp |= (*cp++ << 16);
+	*ulp |= (*cp++ << 8);
+	*ulp |= *cp; 
+
+	*xpp = (const void *)((const char *)(*xpp) + X_SIZEOF_SIZE_T);
+	return ENOERR;
+}
+
+/* x_off_t */
+
+int
+ncx_put_off_t(void **xpp, const off_t *lp, size_t sizeof_off_t)
+{
+	/* similar to put_ix_int() */
+	uchar *cp = (uchar *) *xpp;
+		/* No negative offsets stored in netcdf */
+	if (*lp < 0) {
+	  /* Assume this is an overflow of a 32-bit int... */
+	  return ERANGE;
+	}
+	  
+	assert(sizeof_off_t == 4 || sizeof_off_t == 8);
+
+	if (sizeof_off_t == 4) {
+		*cp++ = (uchar) ((*lp)               >> 24);
+		*cp++ = (uchar)(((*lp) & 0x00ff0000) >> 16);
+		*cp++ = (uchar)(((*lp) & 0x0000ff00) >>  8);
+		*cp   = (uchar)( (*lp) & 0x000000ff);
+	} else {
+#if SIZEOF_OFF_T == 4
+/* Write a 64-bit offset on a system with only a 32-bit offset */
+		*cp++ = (uchar)0;
+		*cp++ = (uchar)0;
+		*cp++ = (uchar)0;
+		*cp++ = (uchar)0;
+
+		*cp++ = (uchar)(((*lp) & 0xff000000) >> 24);
+		*cp++ = (uchar)(((*lp) & 0x00ff0000) >> 16);
+		*cp++ = (uchar)(((*lp) & 0x0000ff00) >>  8);
+		*cp   = (uchar)( (*lp) & 0x000000ff);
+#else
+		*cp++ = (uchar) ((*lp)                          >> 56);
+		*cp++ = (uchar)(((*lp) & 0x00ff000000000000ULL) >> 48);
+		*cp++ = (uchar)(((*lp) & 0x0000ff0000000000ULL) >> 40);
+		*cp++ = (uchar)(((*lp) & 0x000000ff00000000ULL) >> 32);
+		*cp++ = (uchar)(((*lp) & 0x00000000ff000000ULL) >> 24);
+		*cp++ = (uchar)(((*lp) & 0x0000000000ff0000ULL) >> 16);
+		*cp++ = (uchar)(((*lp) & 0x000000000000ff00ULL) >>  8);
+		*cp   = (uchar)( (*lp) & 0x00000000000000ffULL);
+#endif
+	}
+	*xpp = (void *)((char *)(*xpp) + sizeof_off_t);
+	return ENOERR;
+}
+
+int
+ncx_get_off_t(const void **xpp, off_t *lp, size_t sizeof_off_t)
+{
+	/* similar to get_ix_int() */
+	const uchar *cp = (const uchar *) *xpp;
+	assert(sizeof_off_t == 4 || sizeof_off_t == 8);
+
+ 	if (sizeof_off_t == 4) {
+		*lp = *cp++ << 24;
+		*lp |= (*cp++ << 16);
+		*lp |= (*cp++ <<  8);
+		*lp |= *cp; 
+	} else {
+#if SIZEOF_OFF_T == 4
+/* Read a 64-bit offset on a system with only a 32-bit offset */
+/* If the offset overflows, set an error code and return */
+		*lp =  ((off_t)(*cp++) << 24);
+		*lp |= ((off_t)(*cp++) << 16);
+		*lp |= ((off_t)(*cp++) <<  8);
+		*lp |= ((off_t)(*cp++));
+/*
+ * lp now contains the upper 32-bits of the 64-bit offset.  if lp is
+ * not zero, then the dataset is larger than can be represented
+ * on this system.  Set an error code and return.
+ */
+		if (*lp != 0) {
+		  return ERANGE;
+		}
+
+		*lp  = ((off_t)(*cp++) << 24);
+		*lp |= ((off_t)(*cp++) << 16);
+		*lp |= ((off_t)(*cp++) <<  8);
+		*lp |=  (off_t)*cp;
+
+		if (*lp < 0) {
+		  /*
+		   * If this fails, then the offset is >2^31, but less
+		   * than 2^32 which is not allowed, but is not caught
+		   * by the previous check
+		   */
+		  return ERANGE;
+		}
+#else
+		*lp =  ((off_t)(*cp++) << 56);
+		*lp |= ((off_t)(*cp++) << 48);
+		*lp |= ((off_t)(*cp++) << 40);
+		*lp |= ((off_t)(*cp++) << 32);
+		*lp |= ((off_t)(*cp++) << 24);
+		*lp |= ((off_t)(*cp++) << 16);
+		*lp |= ((off_t)(*cp++) <<  8);
+		*lp |=  (off_t)*cp;
+#endif
+	}
+	*xpp = (const void *)((const char *)(*xpp) + sizeof_off_t);
+	return ENOERR;
+}
+
+
+/*
+ * Aggregate numeric conversion functions.
+ */
+
+
+
+/* schar */
+
+int
+ncx_getn_schar_schar(const void **xpp, size_t nelems, schar *tp)
+{
+		(void) memcpy(tp, *xpp, nelems);
+	*xpp = (void *)((char *)(*xpp) + nelems);
+	return ENOERR;
+
+}
+int
+ncx_getn_schar_uchar(const void **xpp, size_t nelems, uchar *tp)
+{
+		(void) memcpy(tp, *xpp, nelems);
+	*xpp = (void *)((char *)(*xpp) + nelems);
+	return ENOERR;
+
+}
+int
+ncx_getn_schar_short(const void **xpp, size_t nelems, short *tp)
+{
+	schar *xp = (schar *)(*xpp);
+
+	while(nelems-- != 0)
+	{
+		*tp++ = *xp++;
+	}
+
+	*xpp = (const void *)xp;
+	return ENOERR;
+}
+
+int
+ncx_getn_schar_int(const void **xpp, size_t nelems, int *tp)
+{
+	schar *xp = (schar *)(*xpp);
+
+	while(nelems-- != 0)
+	{
+		*tp++ = *xp++;
+	}
+
+	*xpp = (const void *)xp;
+	return ENOERR;
+}
+
+int
+ncx_getn_schar_float(const void **xpp, size_t nelems, float *tp)
+{
+	schar *xp = (schar *)(*xpp);
+
+	while(nelems-- != 0)
+	{
+		*tp++ = *xp++;
+	}
+
+	*xpp = (const void *)xp;
+	return ENOERR;
+}
+
+int
+ncx_getn_schar_double(const void **xpp, size_t nelems, double *tp)
+{
+	schar *xp = (schar *)(*xpp);
+
+	while(nelems-- != 0)
+	{
+		*tp++ = *xp++;
+	}
+
+	*xpp = (const void *)xp;
+	return ENOERR;
+}
+
+int
+ncx_getn_schar_uint(const void **xpp, size_t nelems, uint *tp)
+{
+	schar *xp = (schar *)(*xpp);
+
+	while(nelems-- != 0)
+	{
+		*tp++ = *xp++;
+	}
+
+	*xpp = (const void *)xp;
+	return ENOERR;
+}
+
+int
+ncx_getn_schar_longlong(const void **xpp, size_t nelems, longlong *tp)
+{
+	schar *xp = (schar *)(*xpp);
+
+	while(nelems-- != 0)
+	{
+		*tp++ = *xp++;
+	}
+
+	*xpp = (const void *)xp;
+	return ENOERR;
+}
+
+int
+ncx_getn_schar_ulonglong(const void **xpp, size_t nelems, ulonglong *tp)
+{
+	schar *xp = (schar *)(*xpp);
+
+	while(nelems-- != 0)
+	{
+		*tp++ = *xp++;
+	}
+
+	*xpp = (const void *)xp;
+	return ENOERR;
+}
+
+
+int
+ncx_pad_getn_schar_schar(const void **xpp, size_t nelems, schar *tp)
+{
+		size_t rndup = nelems % X_ALIGN;
+
+	if(rndup)
+		rndup = X_ALIGN - rndup;
+
+	(void) memcpy(tp, *xpp, nelems);
+	*xpp = (void *)((char *)(*xpp) + nelems + rndup);
+
+	return ENOERR;
+
+}
+int
+ncx_pad_getn_schar_uchar(const void **xpp, size_t nelems, uchar *tp)
+{
+		size_t rndup = nelems % X_ALIGN;
+
+	if(rndup)
+		rndup = X_ALIGN - rndup;
+
+	(void) memcpy(tp, *xpp, nelems);
+	*xpp = (void *)((char *)(*xpp) + nelems + rndup);
+
+	return ENOERR;
+
+}
+int
+ncx_pad_getn_schar_short(const void **xpp, size_t nelems, short *tp)
+{
+	size_t rndup = nelems % X_ALIGN;
+	schar *xp = (schar *) *xpp;
+
+	if(rndup)
+		rndup = X_ALIGN - rndup;
+
+	while(nelems-- != 0)
+	{
+		*tp++ = *xp++;
+	}
+
+	*xpp = (void *)(xp + rndup);
+	return ENOERR;
+}
+
+int
+ncx_pad_getn_schar_int(const void **xpp, size_t nelems, int *tp)
+{
+	size_t rndup = nelems % X_ALIGN;
+	schar *xp = (schar *) *xpp;
+
+	if(rndup)
+		rndup = X_ALIGN - rndup;
+
+	while(nelems-- != 0)
+	{
+		*tp++ = *xp++;
+	}
+
+	*xpp = (void *)(xp + rndup);
+	return ENOERR;
+}
+
+int
+ncx_pad_getn_schar_float(const void **xpp, size_t nelems, float *tp)
+{
+	size_t rndup = nelems % X_ALIGN;
+	schar *xp = (schar *) *xpp;
+
+	if(rndup)
+		rndup = X_ALIGN - rndup;
+
+	while(nelems-- != 0)
+	{
+		*tp++ = *xp++;
+	}
+
+	*xpp = (void *)(xp + rndup);
+	return ENOERR;
+}
+
+int
+ncx_pad_getn_schar_double(const void **xpp, size_t nelems, double *tp)
+{
+	size_t rndup = nelems % X_ALIGN;
+	schar *xp = (schar *) *xpp;
+
+	if(rndup)
+		rndup = X_ALIGN - rndup;
+
+	while(nelems-- != 0)
+	{
+		*tp++ = *xp++;
+	}
+
+	*xpp = (void *)(xp + rndup);
+	return ENOERR;
+}
+
+int
+ncx_pad_getn_schar_uint(const void **xpp, size_t nelems, uint *tp)
+{
+	size_t rndup = nelems % X_ALIGN;
+	schar *xp = (schar *) *xpp;
+
+	if(rndup)
+		rndup = X_ALIGN - rndup;
+
+	while(nelems-- != 0)
+	{
+		*tp++ = *xp++;
+	}
+
+	*xpp = (void *)(xp + rndup);
+	return ENOERR;
+}
+
+int
+ncx_pad_getn_schar_longlong(const void **xpp, size_t nelems, longlong *tp)
+{
+	size_t rndup = nelems % X_ALIGN;
+	schar *xp = (schar *) *xpp;
+
+	if(rndup)
+		rndup = X_ALIGN - rndup;
+
+	while(nelems-- != 0)
+	{
+		*tp++ = *xp++;
+	}
+
+	*xpp = (void *)(xp + rndup);
+	return ENOERR;
+}
+
+int
+ncx_pad_getn_schar_ulonglong(const void **xpp, size_t nelems, ulonglong *tp)
+{
+	size_t rndup = nelems % X_ALIGN;
+	schar *xp = (schar *) *xpp;
+
+	if(rndup)
+		rndup = X_ALIGN - rndup;
+
+	while(nelems-- != 0)
+	{
+		*tp++ = *xp++;
+	}
+
+	*xpp = (void *)(xp + rndup);
+	return ENOERR;
+}
+
+
+int
+ncx_putn_schar_schar(void **xpp, size_t nelems, const schar *tp)
+{
+		(void) memcpy(*xpp, tp, nelems);
+	*xpp = (void *)((char *)(*xpp) + nelems);
+
+	return ENOERR;
+
+}
+int
+ncx_putn_schar_uchar(void **xpp, size_t nelems, const uchar *tp)
+{
+		(void) memcpy(*xpp, tp, nelems);
+	*xpp = (void *)((char *)(*xpp) + nelems);
+
+	return ENOERR;
+
+}
+int
+ncx_putn_schar_short(void **xpp, size_t nelems, const short *tp)
+{
+	int status = ENOERR;
+	schar *xp = (schar *) *xpp;
+
+	while(nelems-- != 0)
+	{
+		if(*tp > X_SCHAR_MAX || *tp < X_SCHAR_MIN)
+			status = NC_ERANGE;
+		*xp++ = (schar) *tp++;
+	}
+
+	*xpp = (void *)xp;
+	return status;
+}
+
+int
+ncx_putn_schar_int(void **xpp, size_t nelems, const int *tp)
+{
+	int status = ENOERR;
+	schar *xp = (schar *) *xpp;
+
+	while(nelems-- != 0)
+	{
+		if(*tp > X_SCHAR_MAX || *tp < X_SCHAR_MIN)
+			status = NC_ERANGE;
+		*xp++ = (schar) *tp++;
+	}
+
+	*xpp = (void *)xp;
+	return status;
+}
+
+int
+ncx_putn_schar_float(void **xpp, size_t nelems, const float *tp)
+{
+	int status = ENOERR;
+	schar *xp = (schar *) *xpp;
+
+	while(nelems-- != 0)
+	{
+		if(*tp > X_SCHAR_MAX || *tp < X_SCHAR_MIN)
+			status = NC_ERANGE;
+		*xp++ = (schar) *tp++;
+	}
+
+	*xpp = (void *)xp;
+	return status;
+}
+
+int
+ncx_putn_schar_double(void **xpp, size_t nelems, const double *tp)
+{
+	int status = ENOERR;
+	schar *xp = (schar *) *xpp;
+
+	while(nelems-- != 0)
+	{
+		if(*tp > X_SCHAR_MAX || *tp < X_SCHAR_MIN)
+			status = NC_ERANGE;
+		*xp++ = (schar) *tp++;
+	}
+
+	*xpp = (void *)xp;
+	return status;
+}
+
+int
+ncx_putn_schar_uint(void **xpp, size_t nelems, const uint *tp)
+{
+	int status = ENOERR;
+	schar *xp = (schar *) *xpp;
+
+	while(nelems-- != 0)
+	{
+		if(*tp > X_SCHAR_MAX || *tp < X_SCHAR_MIN)
+			status = NC_ERANGE;
+		*xp++ = (schar) *tp++;
+	}
+
+	*xpp = (void *)xp;
+	return status;
+}
+
+int
+ncx_putn_schar_longlong(void **xpp, size_t nelems, const longlong *tp)
+{
+	int status = ENOERR;
+	schar *xp = (schar *) *xpp;
+
+	while(nelems-- != 0)
+	{
+		if(*tp > X_SCHAR_MAX || *tp < X_SCHAR_MIN)
+			status = NC_ERANGE;
+		*xp++ = (schar) *tp++;
+	}
+
+	*xpp = (void *)xp;
+	return status;
+}
+
+int
+ncx_putn_schar_ulonglong(void **xpp, size_t nelems, const ulonglong *tp)
+{
+	int status = ENOERR;
+	schar *xp = (schar *) *xpp;
+
+	while(nelems-- != 0)
+	{
+		if(*tp > X_SCHAR_MAX || *tp < X_SCHAR_MIN)
+			status = NC_ERANGE;
+		*xp++ = (schar) *tp++;
+	}
+
+	*xpp = (void *)xp;
+	return status;
+}
+
+
+int
+ncx_pad_putn_schar_schar(void **xpp, size_t nelems, const schar *tp)
+{
+		size_t rndup = nelems % X_ALIGN;
+
+	if(rndup)
+		rndup = X_ALIGN - rndup;
+
+	(void) memcpy(*xpp, tp, nelems);
+	*xpp = (void *)((char *)(*xpp) + nelems);
+
+	if(rndup)
+	{
+		(void) memcpy(*xpp, nada, rndup);
+		*xpp = (void *)((char *)(*xpp) + rndup);
+	}
+	
+	return ENOERR;
+
+}
+int
+ncx_pad_putn_schar_uchar(void **xpp, size_t nelems, const uchar *tp)
+{
+		size_t rndup = nelems % X_ALIGN;
+
+	if(rndup)
+		rndup = X_ALIGN - rndup;
+
+	(void) memcpy(*xpp, tp, nelems);
+	*xpp = (void *)((char *)(*xpp) + nelems);
+
+	if(rndup)
+	{
+		(void) memcpy(*xpp, nada, rndup);
+		*xpp = (void *)((char *)(*xpp) + rndup);
+	}
+	
+	return ENOERR;
+
+}
+int
+ncx_pad_putn_schar_short(void **xpp, size_t nelems, const short *tp)
+{
+	int status = ENOERR;
+	size_t rndup = nelems % X_ALIGN;
+	schar *xp = (schar *) *xpp;
+
+	if(rndup)
+		rndup = X_ALIGN - rndup;
+
+	while(nelems-- != 0)
+	{
+		/* N.B. schar as signed */
+		if(*tp > X_SCHAR_MAX || *tp < X_SCHAR_MIN)
+			status = NC_ERANGE;
+		*xp++ = (schar) *tp++;
+	}
+
+
+	if(rndup)
+	{
+		(void) memcpy(xp, nada, rndup);
+		xp += rndup;
+	}
+
+	*xpp = (void *)xp;
+	return status;
+}
+
+int
+ncx_pad_putn_schar_int(void **xpp, size_t nelems, const int *tp)
+{
+	int status = ENOERR;
+	size_t rndup = nelems % X_ALIGN;
+	schar *xp = (schar *) *xpp;
+
+	if(rndup)
+		rndup = X_ALIGN - rndup;
+
+	while(nelems-- != 0)
+	{
+		/* N.B. schar as signed */
+		if(*tp > X_SCHAR_MAX || *tp < X_SCHAR_MIN)
+			status = NC_ERANGE;
+		*xp++ = (schar) *tp++;
+	}
+
+
+	if(rndup)
+	{
+		(void) memcpy(xp, nada, rndup);
+		xp += rndup;
+	}
+
+	*xpp = (void *)xp;
+	return status;
+}
+
+int
+ncx_pad_putn_schar_float(void **xpp, size_t nelems, const float *tp)
+{
+	int status = ENOERR;
+	size_t rndup = nelems % X_ALIGN;
+	schar *xp = (schar *) *xpp;
+
+	if(rndup)
+		rndup = X_ALIGN - rndup;
+
+	while(nelems-- != 0)
+	{
+		/* N.B. schar as signed */
+		if(*tp > X_SCHAR_MAX || *tp < X_SCHAR_MIN)
+			status = NC_ERANGE;
+		*xp++ = (schar) *tp++;
+	}
+
+
+	if(rndup)
+	{
+		(void) memcpy(xp, nada, rndup);
+		xp += rndup;
+	}
+
+	*xpp = (void *)xp;
+	return status;
+}
+
+int
+ncx_pad_putn_schar_double(void **xpp, size_t nelems, const double *tp)
+{
+	int status = ENOERR;
+	size_t rndup = nelems % X_ALIGN;
+	schar *xp = (schar *) *xpp;
+
+	if(rndup)
+		rndup = X_ALIGN - rndup;
+
+	while(nelems-- != 0)
+	{
+		/* N.B. schar as signed */
+		if(*tp > X_SCHAR_MAX || *tp < X_SCHAR_MIN)
+			status = NC_ERANGE;
+		*xp++ = (schar) *tp++;
+	}
+
+
+	if(rndup)
+	{
+		(void) memcpy(xp, nada, rndup);
+		xp += rndup;
+	}
+
+	*xpp = (void *)xp;
+	return status;
+}
+
+int
+ncx_pad_putn_schar_uint(void **xpp, size_t nelems, const uint *tp)
+{
+	int status = ENOERR;
+	size_t rndup = nelems % X_ALIGN;
+	schar *xp = (schar *) *xpp;
+
+	if(rndup)
+		rndup = X_ALIGN - rndup;
+
+	while(nelems-- != 0)
+	{
+		/* N.B. schar as signed */
+		if(*tp > X_SCHAR_MAX || *tp < X_SCHAR_MIN)
+			status = NC_ERANGE;
+		*xp++ = (schar) *tp++;
+	}
+
+
+	if(rndup)
+	{
+		(void) memcpy(xp, nada, rndup);
+		xp += rndup;
+	}
+
+	*xpp = (void *)xp;
+	return status;
+}
+
+int
+ncx_pad_putn_schar_longlong(void **xpp, size_t nelems, const longlong *tp)
+{
+	int status = ENOERR;
+	size_t rndup = nelems % X_ALIGN;
+	schar *xp = (schar *) *xpp;
+
+	if(rndup)
+		rndup = X_ALIGN - rndup;
+
+	while(nelems-- != 0)
+	{
+		/* N.B. schar as signed */
+		if(*tp > X_SCHAR_MAX || *tp < X_SCHAR_MIN)
+			status = NC_ERANGE;
+		*xp++ = (schar) *tp++;
+	}
+
+
+	if(rndup)
+	{
+		(void) memcpy(xp, nada, rndup);
+		xp += rndup;
+	}
+
+	*xpp = (void *)xp;
+	return status;
+}
+
+int
+ncx_pad_putn_schar_ulonglong(void **xpp, size_t nelems, const ulonglong *tp)
+{
+	int status = ENOERR;
+	size_t rndup = nelems % X_ALIGN;
+	schar *xp = (schar *) *xpp;
+
+	if(rndup)
+		rndup = X_ALIGN - rndup;
+
+	while(nelems-- != 0)
+	{
+		/* N.B. schar as signed */
+		if(*tp > X_SCHAR_MAX || *tp < X_SCHAR_MIN)
+			status = NC_ERANGE;
+		*xp++ = (schar) *tp++;
+	}
+
+
+	if(rndup)
+	{
+		(void) memcpy(xp, nada, rndup);
+		xp += rndup;
+	}
+
+	*xpp = (void *)xp;
+	return status;
+}
+
+
+
+/* short */
+
+int
+ncx_getn_short_schar(const void **xpp, size_t nelems, schar *tp)
+{
+#if _SX && \
+           X_SIZEOF_SHORT == SIZEOF_SHORT
+
+ /* basic algorithm is:
+  *   - ensure sane alignment of input data
+  *   - copy (conversion happens automatically) input data
+  *     to output
+  *   - update xpp to point at next unconverted input, and tp to point
+  *     at next location for converted output
+  */
+  long i, j, ni;
+  short tmp[LOOPCNT];        /* in case input is misaligned */
+  short *xp;
+  int nrange = 0;         /* number of range errors */
+  int realign = 0;        /* "do we need to fix input data alignment?" */
+  long cxp = (long) *((char**)xpp);
+
+  realign = (cxp & 7) % SIZEOF_SHORT;
+  /* sjl: manually stripmine so we can limit amount of
+   * vector work space reserved to LOOPCNT elements. Also
+   * makes vectorisation easy */
+  for (j=0; j<nelems && nrange==0; j+=LOOPCNT) {
+    ni=Min(nelems-j,LOOPCNT);
+    if (realign) {
+      memcpy(tmp, *xpp, ni*SIZEOF_SHORT);
+      xp = tmp;
+    } else {
+      xp = (short *) *xpp;
+    }
+   /* copy the next block */
+#pragma cdir loopcnt=LOOPCNT
+#pragma cdir shortloop
+    for (i=0; i<ni; i++) {
+      tp[i] = (schar) Max( SCHAR_MIN, Min(SCHAR_MAX, (schar) xp[i]));
+     /* test for range errors (not always needed but do it anyway) */
+      nrange += xp[i] < SCHAR_MIN || xp[i] > SCHAR_MAX;
+    }
+   /* update xpp and tp */
+    if (realign) xp = (short *) *xpp;
+    xp += ni;
+    tp += ni;
+    *xpp = (void*)xp;
+  }
+  return nrange == 0 ? ENOERR : NC_ERANGE;
+
+#else   /* not SX */
+	const char *xp = (const char *) *xpp;
+	int status = ENOERR;
+
+	for( ; nelems != 0; nelems--, xp += X_SIZEOF_SHORT, tp++)
+	{
+		const int lstatus = ncx_get_short_schar(xp, tp);
+		if(lstatus != ENOERR)
+			status = lstatus;
+	}
+
+	*xpp = (const void *)xp;
+	return status;
+#  endif
+}
+
+int
+ncx_getn_short_uchar(const void **xpp, size_t nelems, uchar *tp)
+{
+#if _SX && \
+           X_SIZEOF_SHORT == SIZEOF_SHORT
+
+ /* basic algorithm is:
+  *   - ensure sane alignment of input data
+  *   - copy (conversion happens automatically) input data
+  *     to output
+  *   - update xpp to point at next unconverted input, and tp to point
+  *     at next location for converted output
+  */
+  long i, j, ni;
+  short tmp[LOOPCNT];        /* in case input is misaligned */
+  short *xp;
+  int nrange = 0;         /* number of range errors */
+  int realign = 0;        /* "do we need to fix input data alignment?" */
+  long cxp = (long) *((char**)xpp);
+
+  realign = (cxp & 7) % SIZEOF_SHORT;
+  /* sjl: manually stripmine so we can limit amount of
+   * vector work space reserved to LOOPCNT elements. Also
+   * makes vectorisation easy */
+  for (j=0; j<nelems && nrange==0; j+=LOOPCNT) {
+    ni=Min(nelems-j,LOOPCNT);
+    if (realign) {
+      memcpy(tmp, *xpp, ni*SIZEOF_SHORT);
+      xp = tmp;
+    } else {
+      xp = (short *) *xpp;
+    }
+   /* copy the next block */
+#pragma cdir loopcnt=LOOPCNT
+#pragma cdir shortloop
+    for (i=0; i<ni; i++) {
+      tp[i] = (uchar) Max( UCHAR_MIN, Min(UCHAR_MAX, (uchar) xp[i]));
+     /* test for range errors (not always needed but do it anyway) */
+      nrange += xp[i] < UCHAR_MIN || xp[i] > UCHAR_MAX;
+    }
+   /* update xpp and tp */
+    if (realign) xp = (short *) *xpp;
+    xp += ni;
+    tp += ni;
+    *xpp = (void*)xp;
+  }
+  return nrange == 0 ? ENOERR : NC_ERANGE;
+
+#else   /* not SX */
+	const char *xp = (const char *) *xpp;
+	int status = ENOERR;
+
+	for( ; nelems != 0; nelems--, xp += X_SIZEOF_SHORT, tp++)
+	{
+		const int lstatus = ncx_get_short_uchar(xp, tp);
+		if(lstatus != ENOERR)
+			status = lstatus;
+	}
+
+	*xpp = (const void *)xp;
+	return status;
+#  endif
+}
+
+#if X_SIZEOF_SHORT == SIZEOF_SHORT
+/* optimized version */
+int
+ncx_getn_short_short(const void **xpp, size_t nelems, short *tp)
+{
+#ifdef WORDS_BIGENDIAN
+	(void) memcpy(tp, *xpp, nelems * sizeof(short));
+# else
+	swapn2b(tp, *xpp, nelems);
+# endif
+	*xpp = (const void *)((const char *)(*xpp) + nelems * X_SIZEOF_SHORT);
+	return ENOERR;
+}
+#else
+int
+ncx_getn_short_short(const void **xpp, size_t nelems, short *tp)
+{
+#if _SX && \
+           X_SIZEOF_SHORT == SIZEOF_SHORT
+
+ /* basic algorithm is:
+  *   - ensure sane alignment of input data
+  *   - copy (conversion happens automatically) input data
+  *     to output
+  *   - update xpp to point at next unconverted input, and tp to point
+  *     at next location for converted output
+  */
+  long i, j, ni;
+  short tmp[LOOPCNT];        /* in case input is misaligned */
+  short *xp;
+  int nrange = 0;         /* number of range errors */
+  int realign = 0;        /* "do we need to fix input data alignment?" */
+  long cxp = (long) *((char**)xpp);
+
+  realign = (cxp & 7) % SIZEOF_SHORT;
+  /* sjl: manually stripmine so we can limit amount of
+   * vector work space reserved to LOOPCNT elements. Also
+   * makes vectorisation easy */
+  for (j=0; j<nelems && nrange==0; j+=LOOPCNT) {
+    ni=Min(nelems-j,LOOPCNT);
+    if (realign) {
+      memcpy(tmp, *xpp, ni*SIZEOF_SHORT);
+      xp = tmp;
+    } else {
+      xp = (short *) *xpp;
+    }
+   /* copy the next block */
+#pragma cdir loopcnt=LOOPCNT
+#pragma cdir shortloop
+    for (i=0; i<ni; i++) {
+      tp[i] = (short) Max( SHORT_MIN, Min(SHORT_MAX, (short) xp[i]));
+     /* test for range errors (not always needed but do it anyway) */
+      nrange += xp[i] < SHORT_MIN || xp[i] > SHORT_MAX;
+    }
+   /* update xpp and tp */
+    if (realign) xp = (short *) *xpp;
+    xp += ni;
+    tp += ni;
+    *xpp = (void*)xp;
+  }
+  return nrange == 0 ? ENOERR : NC_ERANGE;
+
+#else   /* not SX */
+	const char *xp = (const char *) *xpp;
+	int status = ENOERR;
+
+	for( ; nelems != 0; nelems--, xp += X_SIZEOF_SHORT, tp++)
+	{
+		const int lstatus = ncx_get_short_short(xp, tp);
+		if(lstatus != ENOERR)
+			status = lstatus;
+	}
+
+	*xpp = (const void *)xp;
+	return status;
+#  endif
+}
+
+#endif
+int
+ncx_getn_short_int(const void **xpp, size_t nelems, int *tp)
+{
+#if _SX && \
+           X_SIZEOF_SHORT == SIZEOF_SHORT
+
+ /* basic algorithm is:
+  *   - ensure sane alignment of input data
+  *   - copy (conversion happens automatically) input data
+  *     to output
+  *   - update xpp to point at next unconverted input, and tp to point
+  *     at next location for converted output
+  */
+  long i, j, ni;
+  short tmp[LOOPCNT];        /* in case input is misaligned */
+  short *xp;
+  int nrange = 0;         /* number of range errors */
+  int realign = 0;        /* "do we need to fix input data alignment?" */
+  long cxp = (long) *((char**)xpp);
+
+  realign = (cxp & 7) % SIZEOF_SHORT;
+  /* sjl: manually stripmine so we can limit amount of
+   * vector work space reserved to LOOPCNT elements. Also
+   * makes vectorisation easy */
+  for (j=0; j<nelems && nrange==0; j+=LOOPCNT) {
+    ni=Min(nelems-j,LOOPCNT);
+    if (realign) {
+      memcpy(tmp, *xpp, ni*SIZEOF_SHORT);
+      xp = tmp;
+    } else {
+      xp = (short *) *xpp;
+    }
+   /* copy the next block */
+#pragma cdir loopcnt=LOOPCNT
+#pragma cdir shortloop
+    for (i=0; i<ni; i++) {
+      tp[i] = (int) Max( INT_MIN, Min(INT_MAX, (int) xp[i]));
+     /* test for range errors (not always needed but do it anyway) */
+      nrange += xp[i] < INT_MIN || xp[i] > INT_MAX;
+    }
+   /* update xpp and tp */
+    if (realign) xp = (short *) *xpp;
+    xp += ni;
+    tp += ni;
+    *xpp = (void*)xp;
+  }
+  return nrange == 0 ? ENOERR : NC_ERANGE;
+
+#else   /* not SX */
+	const char *xp = (const char *) *xpp;
+	int status = ENOERR;
+
+	for( ; nelems != 0; nelems--, xp += X_SIZEOF_SHORT, tp++)
+	{
+		const int lstatus = ncx_get_short_int(xp, tp);
+		if(lstatus != ENOERR)
+			status = lstatus;
+	}
+
+	*xpp = (const void *)xp;
+	return status;
+#  endif
+}
+
+int
+ncx_getn_short_float(const void **xpp, size_t nelems, float *tp)
+{
+#if _SX && \
+           X_SIZEOF_SHORT == SIZEOF_SHORT
+
+ /* basic algorithm is:
+  *   - ensure sane alignment of input data
+  *   - copy (conversion happens automatically) input data
+  *     to output
+  *   - update xpp to point at next unconverted input, and tp to point
+  *     at next location for converted output
+  */
+  long i, j, ni;
+  short tmp[LOOPCNT];        /* in case input is misaligned */
+  short *xp;
+  int nrange = 0;         /* number of range errors */
+  int realign = 0;        /* "do we need to fix input data alignment?" */
+  long cxp = (long) *((char**)xpp);
+
+  realign = (cxp & 7) % SIZEOF_SHORT;
+  /* sjl: manually stripmine so we can limit amount of
+   * vector work space reserved to LOOPCNT elements. Also
+   * makes vectorisation easy */
+  for (j=0; j<nelems && nrange==0; j+=LOOPCNT) {
+    ni=Min(nelems-j,LOOPCNT);
+    if (realign) {
+      memcpy(tmp, *xpp, ni*SIZEOF_SHORT);
+      xp = tmp;
+    } else {
+      xp = (short *) *xpp;
+    }
+   /* copy the next block */
+#pragma cdir loopcnt=LOOPCNT
+#pragma cdir shortloop
+    for (i=0; i<ni; i++) {
+      tp[i] = (float) Max( FLOAT_MIN, Min(FLOAT_MAX, (float) xp[i]));
+     /* test for range errors (not always needed but do it anyway) */
+      nrange += xp[i] < FLOAT_MIN || xp[i] > FLOAT_MAX;
+    }
+   /* update xpp and tp */
+    if (realign) xp = (short *) *xpp;
+    xp += ni;
+    tp += ni;
+    *xpp = (void*)xp;
+  }
+  return nrange == 0 ? ENOERR : NC_ERANGE;
+
+#else   /* not SX */
+	const char *xp = (const char *) *xpp;
+	int status = ENOERR;
+
+	for( ; nelems != 0; nelems--, xp += X_SIZEOF_SHORT, tp++)
+	{
+		const int lstatus = ncx_get_short_float(xp, tp);
+		if(lstatus != ENOERR)
+			status = lstatus;
+	}
+
+	*xpp = (const void *)xp;
+	return status;
+#  endif
+}
+
+int
+ncx_getn_short_double(const void **xpp, size_t nelems, double *tp)
+{
+#if _SX && \
+           X_SIZEOF_SHORT == SIZEOF_SHORT
+
+ /* basic algorithm is:
+  *   - ensure sane alignment of input data
+  *   - copy (conversion happens automatically) input data
+  *     to output
+  *   - update xpp to point at next unconverted input, and tp to point
+  *     at next location for converted output
+  */
+  long i, j, ni;
+  short tmp[LOOPCNT];        /* in case input is misaligned */
+  short *xp;
+  int nrange = 0;         /* number of range errors */
+  int realign = 0;        /* "do we need to fix input data alignment?" */
+  long cxp = (long) *((char**)xpp);
+
+  realign = (cxp & 7) % SIZEOF_SHORT;
+  /* sjl: manually stripmine so we can limit amount of
+   * vector work space reserved to LOOPCNT elements. Also
+   * makes vectorisation easy */
+  for (j=0; j<nelems && nrange==0; j+=LOOPCNT) {
+    ni=Min(nelems-j,LOOPCNT);
+    if (realign) {
+      memcpy(tmp, *xpp, ni*SIZEOF_SHORT);
+      xp = tmp;
+    } else {
+      xp = (short *) *xpp;
+    }
+   /* copy the next block */
+#pragma cdir loopcnt=LOOPCNT
+#pragma cdir shortloop
+    for (i=0; i<ni; i++) {
+      tp[i] = (double) Max( DOUBLE_MIN, Min(DOUBLE_MAX, (double) xp[i]));
+     /* test for range errors (not always needed but do it anyway) */
+      nrange += xp[i] < DOUBLE_MIN || xp[i] > DOUBLE_MAX;
+    }
+   /* update xpp and tp */
+    if (realign) xp = (short *) *xpp;
+    xp += ni;
+    tp += ni;
+    *xpp = (void*)xp;
+  }
+  return nrange == 0 ? ENOERR : NC_ERANGE;
+
+#else   /* not SX */
+	const char *xp = (const char *) *xpp;
+	int status = ENOERR;
+
+	for( ; nelems != 0; nelems--, xp += X_SIZEOF_SHORT, tp++)
+	{
+		const int lstatus = ncx_get_short_double(xp, tp);
+		if(lstatus != ENOERR)
+			status = lstatus;
+	}
+
+	*xpp = (const void *)xp;
+	return status;
+#  endif
+}
+
+int
+ncx_getn_short_uint(const void **xpp, size_t nelems, uint *tp)
+{
+#if _SX && \
+           X_SIZEOF_SHORT == SIZEOF_SHORT
+
+ /* basic algorithm is:
+  *   - ensure sane alignment of input data
+  *   - copy (conversion happens automatically) input data
+  *     to output
+  *   - update xpp to point at next unconverted input, and tp to point
+  *     at next location for converted output
+  */
+  long i, j, ni;
+  short tmp[LOOPCNT];        /* in case input is misaligned */
+  short *xp;
+  int nrange = 0;         /* number of range errors */
+  int realign = 0;        /* "do we need to fix input data alignment?" */
+  long cxp = (long) *((char**)xpp);
+
+  realign = (cxp & 7) % SIZEOF_SHORT;
+  /* sjl: manually stripmine so we can limit amount of
+   * vector work space reserved to LOOPCNT elements. Also
+   * makes vectorisation easy */
+  for (j=0; j<nelems && nrange==0; j+=LOOPCNT) {
+    ni=Min(nelems-j,LOOPCNT);
+    if (realign) {
+      memcpy(tmp, *xpp, ni*SIZEOF_SHORT);
+      xp = tmp;
+    } else {
+      xp = (short *) *xpp;
+    }
+   /* copy the next block */
+#pragma cdir loopcnt=LOOPCNT
+#pragma cdir shortloop
+    for (i=0; i<ni; i++) {
+      tp[i] = (uint) Max( UINT_MIN, Min(UINT_MAX, (uint) xp[i]));
+     /* test for range errors (not always needed but do it anyway) */
+      nrange += xp[i] < UINT_MIN || xp[i] > UINT_MAX;
+    }
+   /* update xpp and tp */
+    if (realign) xp = (short *) *xpp;
+    xp += ni;
+    tp += ni;
+    *xpp = (void*)xp;
+  }
+  return nrange == 0 ? ENOERR : NC_ERANGE;
+
+#else   /* not SX */
+	const char *xp = (const char *) *xpp;
+	int status = ENOERR;
+
+	for( ; nelems != 0; nelems--, xp += X_SIZEOF_SHORT, tp++)
+	{
+		const int lstatus = ncx_get_short_uint(xp, tp);
+		if(lstatus != ENOERR)
+			status = lstatus;
+	}
+
+	*xpp = (const void *)xp;
+	return status;
+#  endif
+}
+
+int
+ncx_getn_short_longlong(const void **xpp, size_t nelems, longlong *tp)
+{
+#if _SX && \
+           X_SIZEOF_SHORT == SIZEOF_SHORT
+
+ /* basic algorithm is:
+  *   - ensure sane alignment of input data
+  *   - copy (conversion happens automatically) input data
+  *     to output
+  *   - update xpp to point at next unconverted input, and tp to point
+  *     at next location for converted output
+  */
+  long i, j, ni;
+  short tmp[LOOPCNT];        /* in case input is misaligned */
+  short *xp;
+  int nrange = 0;         /* number of range errors */
+  int realign = 0;        /* "do we need to fix input data alignment?" */
+  long cxp = (long) *((char**)xpp);
+
+  realign = (cxp & 7) % SIZEOF_SHORT;
+  /* sjl: manually stripmine so we can limit amount of
+   * vector work space reserved to LOOPCNT elements. Also
+   * makes vectorisation easy */
+  for (j=0; j<nelems && nrange==0; j+=LOOPCNT) {
+    ni=Min(nelems-j,LOOPCNT);
+    if (realign) {
+      memcpy(tmp, *xpp, ni*SIZEOF_SHORT);
+      xp = tmp;
+    } else {
+      xp = (short *) *xpp;
+    }
+   /* copy the next block */
+#pragma cdir loopcnt=LOOPCNT
+#pragma cdir shortloop
+    for (i=0; i<ni; i++) {
+      tp[i] = (longlong) Max( LONGLONG_MIN, Min(LONGLONG_MAX, (longlong) xp[i]));
+     /* test for range errors (not always needed but do it anyway) */
+      nrange += xp[i] < LONGLONG_MIN || xp[i] > LONGLONG_MAX;
+    }
+   /* update xpp and tp */
+    if (realign) xp = (short *) *xpp;
+    xp += ni;
+    tp += ni;
+    *xpp = (void*)xp;
+  }
+  return nrange == 0 ? ENOERR : NC_ERANGE;
+
+#else   /* not SX */
+	const char *xp = (const char *) *xpp;
+	int status = ENOERR;
+
+	for( ; nelems != 0; nelems--, xp += X_SIZEOF_SHORT, tp++)
+	{
+		const int lstatus = ncx_get_short_longlong(xp, tp);
+		if(lstatus != ENOERR)
+			status = lstatus;
+	}
+
+	*xpp = (const void *)xp;
+	return status;
+#  endif
+}
+
+int
+ncx_getn_short_ulonglong(const void **xpp, size_t nelems, ulonglong *tp)
+{
+#if _SX && \
+           X_SIZEOF_SHORT == SIZEOF_SHORT
+
+ /* basic algorithm is:
+  *   - ensure sane alignment of input data
+  *   - copy (conversion happens automatically) input data
+  *     to output
+  *   - update xpp to point at next unconverted input, and tp to point
+  *     at next location for converted output
+  */
+  long i, j, ni;
+  short tmp[LOOPCNT];        /* in case input is misaligned */
+  short *xp;
+  int nrange = 0;         /* number of range errors */
+  int realign = 0;        /* "do we need to fix input data alignment?" */
+  long cxp = (long) *((char**)xpp);
+
+  realign = (cxp & 7) % SIZEOF_SHORT;
+  /* sjl: manually stripmine so we can limit amount of
+   * vector work space reserved to LOOPCNT elements. Also
+   * makes vectorisation easy */
+  for (j=0; j<nelems && nrange==0; j+=LOOPCNT) {
+    ni=Min(nelems-j,LOOPCNT);
+    if (realign) {
+      memcpy(tmp, *xpp, ni*SIZEOF_SHORT);
+      xp = tmp;
+    } else {
+      xp = (short *) *xpp;
+    }
+   /* copy the next block */
+#pragma cdir loopcnt=LOOPCNT
+#pragma cdir shortloop
+    for (i=0; i<ni; i++) {
+      tp[i] = (ulonglong) Max( ULONGLONG_MIN, Min(ULONGLONG_MAX, (ulonglong) xp[i]));
+     /* test for range errors (not always needed but do it anyway) */
+      nrange += xp[i] < ULONGLONG_MIN || xp[i] > ULONGLONG_MAX;
+    }
+   /* update xpp and tp */
+    if (realign) xp = (short *) *xpp;
+    xp += ni;
+    tp += ni;
+    *xpp = (void*)xp;
+  }
+  return nrange == 0 ? ENOERR : NC_ERANGE;
+
+#else   /* not SX */
+	const char *xp = (const char *) *xpp;
+	int status = ENOERR;
+
+	for( ; nelems != 0; nelems--, xp += X_SIZEOF_SHORT, tp++)
+	{
+		const int lstatus = ncx_get_short_ulonglong(xp, tp);
+		if(lstatus != ENOERR)
+			status = lstatus;
+	}
+
+	*xpp = (const void *)xp;
+	return status;
+#  endif
+}
+
+
+int
+ncx_pad_getn_short_schar(const void **xpp, size_t nelems, schar *tp)
+{
+	const size_t rndup = nelems % 2;
+
+	const char *xp = (const char *) *xpp;
+	int status = ENOERR;
+
+	for( ; nelems != 0; nelems--, xp += X_SIZEOF_SHORT, tp++)
+	{
+		const int lstatus = ncx_get_short_schar(xp, tp);
+		if(lstatus != ENOERR)
+			status = lstatus;
+	}
+
+	if(rndup != 0)
+		xp += X_SIZEOF_SHORT;
+		
+	*xpp = (void *)xp;
+	return status;
+}
+
+int
+ncx_pad_getn_short_uchar(const void **xpp, size_t nelems, uchar *tp)
+{
+	const size_t rndup = nelems % 2;
+
+	const char *xp = (const char *) *xpp;
+	int status = ENOERR;
+
+	for( ; nelems != 0; nelems--, xp += X_SIZEOF_SHORT, tp++)
+	{
+		const int lstatus = ncx_get_short_uchar(xp, tp);
+		if(lstatus != ENOERR)
+			status = lstatus;
+	}
+
+	if(rndup != 0)
+		xp += X_SIZEOF_SHORT;
+		
+	*xpp = (void *)xp;
+	return status;
+}
+
+int
+ncx_pad_getn_short_short(const void **xpp, size_t nelems, short *tp)
+{
+	const size_t rndup = nelems % 2;
+
+	const char *xp = (const char *) *xpp;
+	int status = ENOERR;
+
+	for( ; nelems != 0; nelems--, xp += X_SIZEOF_SHORT, tp++)
+	{
+		const int lstatus = ncx_get_short_short(xp, tp);
+		if(lstatus != ENOERR)
+			status = lstatus;
+	}
+
+	if(rndup != 0)
+		xp += X_SIZEOF_SHORT;
+		
+	*xpp = (void *)xp;
+	return status;
+}
+
+int
+ncx_pad_getn_short_int(const void **xpp, size_t nelems, int *tp)
+{
+	const size_t rndup = nelems % 2;
+
+	const char *xp = (const char *) *xpp;
+	int status = ENOERR;
+
+	for( ; nelems != 0; nelems--, xp += X_SIZEOF_SHORT, tp++)
+	{
+		const int lstatus = ncx_get_short_int(xp, tp);
+		if(lstatus != ENOERR)
+			status = lstatus;
+	}
+
+	if(rndup != 0)
+		xp += X_SIZEOF_SHORT;
+		
+	*xpp = (void *)xp;
+	return status;
+}
+
+int
+ncx_pad_getn_short_float(const void **xpp, size_t nelems, float *tp)
+{
+	const size_t rndup = nelems % 2;
+
+	const char *xp = (const char *) *xpp;
+	int status = ENOERR;
+
+	for( ; nelems != 0; nelems--, xp += X_SIZEOF_SHORT, tp++)
+	{
+		const int lstatus = ncx_get_short_float(xp, tp);
+		if(lstatus != ENOERR)
+			status = lstatus;
+	}
+
+	if(rndup != 0)
+		xp += X_SIZEOF_SHORT;
+		
+	*xpp = (void *)xp;
+	return status;
+}
+
+int
+ncx_pad_getn_short_double(const void **xpp, size_t nelems, double *tp)
+{
+	const size_t rndup = nelems % 2;
+
+	const char *xp = (const char *) *xpp;
+	int status = ENOERR;
+
+	for( ; nelems != 0; nelems--, xp += X_SIZEOF_SHORT, tp++)
+	{
+		const int lstatus = ncx_get_short_double(xp, tp);
+		if(lstatus != ENOERR)
+			status = lstatus;
+	}
+
+	if(rndup != 0)
+		xp += X_SIZEOF_SHORT;
+		
+	*xpp = (void *)xp;
+	return status;
+}
+
+int
+ncx_pad_getn_short_uint(const void **xpp, size_t nelems, uint *tp)
+{
+	const size_t rndup = nelems % 2;
+
+	const char *xp = (const char *) *xpp;
+	int status = ENOERR;
+
+	for( ; nelems != 0; nelems--, xp += X_SIZEOF_SHORT, tp++)
+	{
+		const int lstatus = ncx_get_short_uint(xp, tp);
+		if(lstatus != ENOERR)
+			status = lstatus;
+	}
+
+	if(rndup != 0)
+		xp += X_SIZEOF_SHORT;
+		
+	*xpp = (void *)xp;
+	return status;
+}
+
+int
+ncx_pad_getn_short_longlong(const void **xpp, size_t nelems, longlong *tp)
+{
+	const size_t rndup = nelems % 2;
+
+	const char *xp = (const char *) *xpp;
+	int status = ENOERR;
+
+	for( ; nelems != 0; nelems--, xp += X_SIZEOF_SHORT, tp++)
+	{
+		const int lstatus = ncx_get_short_longlong(xp, tp);
+		if(lstatus != ENOERR)
+			status = lstatus;
+	}
+
+	if(rndup != 0)
+		xp += X_SIZEOF_SHORT;
+		
+	*xpp = (void *)xp;
+	return status;
+}
+
+int
+ncx_pad_getn_short_ulonglong(const void **xpp, size_t nelems, ulonglong *tp)
+{
+	const size_t rndup = nelems % 2;
+
+	const char *xp = (const char *) *xpp;
+	int status = ENOERR;
+
+	for( ; nelems != 0; nelems--, xp += X_SIZEOF_SHORT, tp++)
+	{
+		const int lstatus = ncx_get_short_ulonglong(xp, tp);
+		if(lstatus != ENOERR)
+			status = lstatus;
+	}
+
+	if(rndup != 0)
+		xp += X_SIZEOF_SHORT;
+		
+	*xpp = (void *)xp;
+	return status;
+}
+
+
+int
+ncx_putn_short_schar(void **xpp, size_t nelems, const schar *tp)
+{
+#if _SX && \
+           X_SIZEOF_SHORT == SIZEOF_SHORT
+
+ /* basic algorithm is:
+  *   - ensure sane alignment of output data
+  *   - copy (conversion happens automatically) input data
+  *     to output
+  *   - update tp to point at next unconverted input, and xpp to point
+  *     at next location for converted output
+  */
+  long i, j, ni;
+  short tmp[LOOPCNT];        /* in case input is misaligned */
+  short *xp;
+  int nrange = 0;         /* number of range errors */
+  int realign = 0;        /* "do we need to fix input data alignment?" */
+  long cxp = (long) *((char**)xpp);
+
+  realign = (cxp & 7) % SIZEOF_SHORT;
+  /* sjl: manually stripmine so we can limit amount of
+   * vector work space reserved to LOOPCNT elements. Also
+   * makes vectorisation easy */
+  for (j=0; j<nelems && nrange==0; j+=LOOPCNT) {
+    ni=Min(nelems-j,LOOPCNT);
+    if (realign) {
+      xp = tmp;
+    } else {
+      xp = (short *) *xpp;
+    }
+   /* copy the next block */
+#pragma cdir loopcnt=LOOPCNT
+#pragma cdir shortloop
+    for (i=0; i<ni; i++) {
+      /* the normal case: */
+      xp[i] = (short) Max( X_SHORT_MIN, Min(X_SHORT_MAX, (short) tp[i]));
+     /* test for range errors (not always needed but do it anyway) */
+      nrange += tp[i] < X_SHORT_MIN || tp[i] > X_SHORT_MAX;
+    }
+   /* copy workspace back if necessary */ 
+    if (realign) {
+      memcpy(*xpp, tmp, ni*X_SIZEOF_SHORT);
+      xp = (short *) *xpp;
+    }
+   /* update xpp and tp */
+    xp += ni;
+    tp += ni;
+    *xpp = (void*)xp;
+  }
+  return nrange == 0 ? ENOERR : NC_ERANGE;
+
+#else   /* not SX */
+
+	char *xp = (char *) *xpp;
+	int status = ENOERR;
+
+	for( ; nelems != 0; nelems--, xp += X_SIZEOF_SHORT, tp++)
+	{
+		int lstatus = ncx_put_short_schar(xp, tp);
+		if(lstatus != ENOERR)
+			status = lstatus;
+	}
+
+	*xpp = (void *)xp;
+	return status;
+#endif
+}
+
+int
+ncx_putn_short_uchar(void **xpp, size_t nelems, const uchar *tp)
+{
+#if _SX && \
+           X_SIZEOF_SHORT == SIZEOF_SHORT
+
+ /* basic algorithm is:
+  *   - ensure sane alignment of output data
+  *   - copy (conversion happens automatically) input data
+  *     to output
+  *   - update tp to point at next unconverted input, and xpp to point
+  *     at next location for converted output
+  */
+  long i, j, ni;
+  short tmp[LOOPCNT];        /* in case input is misaligned */
+  short *xp;
+  int nrange = 0;         /* number of range errors */
+  int realign = 0;        /* "do we need to fix input data alignment?" */
+  long cxp = (long) *((char**)xpp);
+
+  realign = (cxp & 7) % SIZEOF_SHORT;
+  /* sjl: manually stripmine so we can limit amount of
+   * vector work space reserved to LOOPCNT elements. Also
+   * makes vectorisation easy */
+  for (j=0; j<nelems && nrange==0; j+=LOOPCNT) {
+    ni=Min(nelems-j,LOOPCNT);
+    if (realign) {
+      xp = tmp;
+    } else {
+      xp = (short *) *xpp;
+    }
+   /* copy the next block */
+#pragma cdir loopcnt=LOOPCNT
+#pragma cdir shortloop
+    for (i=0; i<ni; i++) {
+      /* the normal case: */
+      xp[i] = (short) Max( X_SHORT_MIN, Min(X_SHORT_MAX, (short) tp[i]));
+     /* test for range errors (not always needed but do it anyway) */
+      nrange += tp[i] < X_SHORT_MIN || tp[i] > X_SHORT_MAX;
+    }
+   /* copy workspace back if necessary */ 
+    if (realign) {
+      memcpy(*xpp, tmp, ni*X_SIZEOF_SHORT);
+      xp = (short *) *xpp;
+    }
+   /* update xpp and tp */
+    xp += ni;
+    tp += ni;
+    *xpp = (void*)xp;
+  }
+  return nrange == 0 ? ENOERR : NC_ERANGE;
+
+#else   /* not SX */
+
+	char *xp = (char *) *xpp;
+	int status = ENOERR;
+
+	for( ; nelems != 0; nelems--, xp += X_SIZEOF_SHORT, tp++)
+	{
+		int lstatus = ncx_put_short_uchar(xp, tp);
+		if(lstatus != ENOERR)
+			status = lstatus;
+	}
+
+	*xpp = (void *)xp;
+	return status;
+#endif
+}
+
+#if X_SIZEOF_SHORT == SIZEOF_SHORT
+/* optimized version */
+int
+ncx_putn_short_short(void **xpp, size_t nelems, const short *tp)
+{
+#ifdef WORDS_BIGENDIAN
+	(void) memcpy(*xpp, tp, nelems * X_SIZEOF_SHORT);
+# else
+	swapn2b(*xpp, tp, nelems);
+# endif
+	*xpp = (void *)((char *)(*xpp) + nelems * X_SIZEOF_SHORT);
+	return ENOERR;
+}
+#else
+int
+ncx_putn_short_short(void **xpp, size_t nelems, const short *tp)
+{
+#if _SX && \
+           X_SIZEOF_SHORT == SIZEOF_SHORT
+
+ /* basic algorithm is:
+  *   - ensure sane alignment of output data
+  *   - copy (conversion happens automatically) input data
+  *     to output
+  *   - update tp to point at next unconverted input, and xpp to point
+  *     at next location for converted output
+  */
+  long i, j, ni;
+  short tmp[LOOPCNT];        /* in case input is misaligned */
+  short *xp;
+  int nrange = 0;         /* number of range errors */
+  int realign = 0;        /* "do we need to fix input data alignment?" */
+  long cxp = (long) *((char**)xpp);
+
+  realign = (cxp & 7) % SIZEOF_SHORT;
+  /* sjl: manually stripmine so we can limit amount of
+   * vector work space reserved to LOOPCNT elements. Also
+   * makes vectorisation easy */
+  for (j=0; j<nelems && nrange==0; j+=LOOPCNT) {
+    ni=Min(nelems-j,LOOPCNT);
+    if (realign) {
+      xp = tmp;
+    } else {
+      xp = (short *) *xpp;
+    }
+   /* copy the next block */
+#pragma cdir loopcnt=LOOPCNT
+#pragma cdir shortloop
+    for (i=0; i<ni; i++) {
+      /* the normal case: */
+      xp[i] = (short) Max( X_SHORT_MIN, Min(X_SHORT_MAX, (short) tp[i]));
+     /* test for range errors (not always needed but do it anyway) */
+      nrange += tp[i] < X_SHORT_MIN || tp[i] > X_SHORT_MAX;
+    }
+   /* copy workspace back if necessary */ 
+    if (realign) {
+      memcpy(*xpp, tmp, ni*X_SIZEOF_SHORT);
+      xp = (short *) *xpp;
+    }
+   /* update xpp and tp */
+    xp += ni;
+    tp += ni;
+    *xpp = (void*)xp;
+  }
+  return nrange == 0 ? ENOERR : NC_ERANGE;
+
+#else   /* not SX */
+
+	char *xp = (char *) *xpp;
+	int status = ENOERR;
+
+	for( ; nelems != 0; nelems--, xp += X_SIZEOF_SHORT, tp++)
+	{
+		int lstatus = ncx_put_short_short(xp, tp);
+		if(lstatus != ENOERR)
+			status = lstatus;
+	}
+
+	*xpp = (void *)xp;
+	return status;
+#endif
+}
+
+#endif
+int
+ncx_putn_short_int(void **xpp, size_t nelems, const int *tp)
+{
+#if _SX && \
+           X_SIZEOF_SHORT == SIZEOF_SHORT
+
+ /* basic algorithm is:
+  *   - ensure sane alignment of output data
+  *   - copy (conversion happens automatically) input data
+  *     to output
+  *   - update tp to point at next unconverted input, and xpp to point
+  *     at next location for converted output
+  */
+  long i, j, ni;
+  short tmp[LOOPCNT];        /* in case input is misaligned */
+  short *xp;
+  int nrange = 0;         /* number of range errors */
+  int realign = 0;        /* "do we need to fix input data alignment?" */
+  long cxp = (long) *((char**)xpp);
+
+  realign = (cxp & 7) % SIZEOF_SHORT;
+  /* sjl: manually stripmine so we can limit amount of
+   * vector work space reserved to LOOPCNT elements. Also
+   * makes vectorisation easy */
+  for (j=0; j<nelems && nrange==0; j+=LOOPCNT) {
+    ni=Min(nelems-j,LOOPCNT);
+    if (realign) {
+      xp = tmp;
+    } else {
+      xp = (short *) *xpp;
+    }
+   /* copy the next block */
+#pragma cdir loopcnt=LOOPCNT
+#pragma cdir shortloop
+    for (i=0; i<ni; i++) {
+      /* the normal case: */
+      xp[i] = (short) Max( X_SHORT_MIN, Min(X_SHORT_MAX, (short) tp[i]));
+     /* test for range errors (not always needed but do it anyway) */
+      nrange += tp[i] < X_SHORT_MIN || tp[i] > X_SHORT_MAX;
+    }
+   /* copy workspace back if necessary */ 
+    if (realign) {
+      memcpy(*xpp, tmp, ni*X_SIZEOF_SHORT);
+      xp = (short *) *xpp;
+    }
+   /* update xpp and tp */
+    xp += ni;
+    tp += ni;
+    *xpp = (void*)xp;
+  }
+  return nrange == 0 ? ENOERR : NC_ERANGE;
+
+#else   /* not SX */
+
+	char *xp = (char *) *xpp;
+	int status = ENOERR;
+
+	for( ; nelems != 0; nelems--, xp += X_SIZEOF_SHORT, tp++)
+	{
+		int lstatus = ncx_put_short_int(xp, tp);
+		if(lstatus != ENOERR)
+			status = lstatus;
+	}
+
+	*xpp = (void *)xp;
+	return status;
+#endif
+}
+
+int
+ncx_putn_short_float(void **xpp, size_t nelems, const float *tp)
+{
+#if _SX && \
+           X_SIZEOF_SHORT == SIZEOF_SHORT
+
+ /* basic algorithm is:
+  *   - ensure sane alignment of output data
+  *   - copy (conversion happens automatically) input data
+  *     to output
+  *   - update tp to point at next unconverted input, and xpp to point
+  *     at next location for converted output
+  */
+  long i, j, ni;
+  short tmp[LOOPCNT];        /* in case input is misaligned */
+  short *xp;
+  int nrange = 0;         /* number of range errors */
+  int realign = 0;        /* "do we need to fix input data alignment?" */
+  long cxp = (long) *((char**)xpp);
+
+  realign = (cxp & 7) % SIZEOF_SHORT;
+  /* sjl: manually stripmine so we can limit amount of
+   * vector work space reserved to LOOPCNT elements. Also
+   * makes vectorisation easy */
+  for (j=0; j<nelems && nrange==0; j+=LOOPCNT) {
+    ni=Min(nelems-j,LOOPCNT);
+    if (realign) {
+      xp = tmp;
+    } else {
+      xp = (short *) *xpp;
+    }
+   /* copy the next block */
+#pragma cdir loopcnt=LOOPCNT
+#pragma cdir shortloop
+    for (i=0; i<ni; i++) {
+      /* the normal case: */
+      xp[i] = (short) Max( X_SHORT_MIN, Min(X_SHORT_MAX, (short) tp[i]));
+     /* test for range errors (not always needed but do it anyway) */
+      nrange += tp[i] < X_SHORT_MIN || tp[i] > X_SHORT_MAX;
+    }
+   /* copy workspace back if necessary */ 
+    if (realign) {
+      memcpy(*xpp, tmp, ni*X_SIZEOF_SHORT);
+      xp = (short *) *xpp;
+    }
+   /* update xpp and tp */
+    xp += ni;
+    tp += ni;
+    *xpp = (void*)xp;
+  }
+  return nrange == 0 ? ENOERR : NC_ERANGE;
+
+#else   /* not SX */
+
+	char *xp = (char *) *xpp;
+	int status = ENOERR;
+
+	for( ; nelems != 0; nelems--, xp += X_SIZEOF_SHORT, tp++)
+	{
+		int lstatus = ncx_put_short_float(xp, tp);
+		if(lstatus != ENOERR)
+			status = lstatus;
+	}
+
+	*xpp = (void *)xp;
+	return status;
+#endif
+}
+
+int
+ncx_putn_short_double(void **xpp, size_t nelems, const double *tp)
+{
+#if _SX && \
+           X_SIZEOF_SHORT == SIZEOF_SHORT
+
+ /* basic algorithm is:
+  *   - ensure sane alignment of output data
+  *   - copy (conversion happens automatically) input data
+  *     to output
+  *   - update tp to point at next unconverted input, and xpp to point
+  *     at next location for converted output
+  */
+  long i, j, ni;
+  short tmp[LOOPCNT];        /* in case input is misaligned */
+  short *xp;
+  int nrange = 0;         /* number of range errors */
+  int realign = 0;        /* "do we need to fix input data alignment?" */
+  long cxp = (long) *((char**)xpp);
+
+  realign = (cxp & 7) % SIZEOF_SHORT;
+  /* sjl: manually stripmine so we can limit amount of
+   * vector work space reserved to LOOPCNT elements. Also
+   * makes vectorisation easy */
+  for (j=0; j<nelems && nrange==0; j+=LOOPCNT) {
+    ni=Min(nelems-j,LOOPCNT);
+    if (realign) {
+      xp = tmp;
+    } else {
+      xp = (short *) *xpp;
+    }
+   /* copy the next block */
+#pragma cdir loopcnt=LOOPCNT
+#pragma cdir shortloop
+    for (i=0; i<ni; i++) {
+      /* the normal case: */
+      xp[i] = (short) Max( X_SHORT_MIN, Min(X_SHORT_MAX, (short) tp[i]));
+     /* test for range errors (not always needed but do it anyway) */
+      nrange += tp[i] < X_SHORT_MIN || tp[i] > X_SHORT_MAX;
+    }
+   /* copy workspace back if necessary */ 
+    if (realign) {
+      memcpy(*xpp, tmp, ni*X_SIZEOF_SHORT);
+      xp = (short *) *xpp;
+    }
+   /* update xpp and tp */
+    xp += ni;
+    tp += ni;
+    *xpp = (void*)xp;
+  }
+  return nrange == 0 ? ENOERR : NC_ERANGE;
+
+#else   /* not SX */
+
+	char *xp = (char *) *xpp;
+	int status = ENOERR;
+
+	for( ; nelems != 0; nelems--, xp += X_SIZEOF_SHORT, tp++)
+	{
+		int lstatus = ncx_put_short_double(xp, tp);
+		if(lstatus != ENOERR)
+			status = lstatus;
+	}
+
+	*xpp = (void *)xp;
+	return status;
+#endif
+}
+
+int
+ncx_putn_short_uint(void **xpp, size_t nelems, const uint *tp)
+{
+#if _SX && \
+           X_SIZEOF_SHORT == SIZEOF_SHORT
+
+ /* basic algorithm is:
+  *   - ensure sane alignment of output data
+  *   - copy (conversion happens automatically) input data
+  *     to output
+  *   - update tp to point at next unconverted input, and xpp to point
+  *     at next location for converted output
+  */
+  long i, j, ni;
+  short tmp[LOOPCNT];        /* in case input is misaligned */
+  short *xp;
+  int nrange = 0;         /* number of range errors */
+  int realign = 0;        /* "do we need to fix input data alignment?" */
+  long cxp = (long) *((char**)xpp);
+
+  realign = (cxp & 7) % SIZEOF_SHORT;
+  /* sjl: manually stripmine so we can limit amount of
+   * vector work space reserved to LOOPCNT elements. Also
+   * makes vectorisation easy */
+  for (j=0; j<nelems && nrange==0; j+=LOOPCNT) {
+    ni=Min(nelems-j,LOOPCNT);
+    if (realign) {
+      xp = tmp;
+    } else {
+      xp = (short *) *xpp;
+    }
+   /* copy the next block */
+#pragma cdir loopcnt=LOOPCNT
+#pragma cdir shortloop
+    for (i=0; i<ni; i++) {
+      /* the normal case: */
+      xp[i] = (short) Max( X_SHORT_MIN, Min(X_SHORT_MAX, (short) tp[i]));
+     /* test for range errors (not always needed but do it anyway) */
+      nrange += tp[i] < X_SHORT_MIN || tp[i] > X_SHORT_MAX;
+    }
+   /* copy workspace back if necessary */ 
+    if (realign) {
+      memcpy(*xpp, tmp, ni*X_SIZEOF_SHORT);
+      xp = (short *) *xpp;
+    }
+   /* update xpp and tp */
+    xp += ni;
+    tp += ni;
+    *xpp = (void*)xp;
+  }
+  return nrange == 0 ? ENOERR : NC_ERANGE;
+
+#else   /* not SX */
+
+	char *xp = (char *) *xpp;
+	int status = ENOERR;
+
+	for( ; nelems != 0; nelems--, xp += X_SIZEOF_SHORT, tp++)
+	{
+		int lstatus = ncx_put_short_uint(xp, tp);
+		if(lstatus != ENOERR)
+			status = lstatus;
+	}
+
+	*xpp = (void *)xp;
+	return status;
+#endif
+}
+
+int
+ncx_putn_short_longlong(void **xpp, size_t nelems, const longlong *tp)
+{
+#if _SX && \
+           X_SIZEOF_SHORT == SIZEOF_SHORT
+
+ /* basic algorithm is:
+  *   - ensure sane alignment of output data
+  *   - copy (conversion happens automatically) input data
+  *     to output
+  *   - update tp to point at next unconverted input, and xpp to point
+  *     at next location for converted output
+  */
+  long i, j, ni;
+  short tmp[LOOPCNT];        /* in case input is misaligned */
+  short *xp;
+  int nrange = 0;         /* number of range errors */
+  int realign = 0;        /* "do we need to fix input data alignment?" */
+  long cxp = (long) *((char**)xpp);
+
+  realign = (cxp & 7) % SIZEOF_SHORT;
+  /* sjl: manually stripmine so we can limit amount of
+   * vector work space reserved to LOOPCNT elements. Also
+   * makes vectorisation easy */
+  for (j=0; j<nelems && nrange==0; j+=LOOPCNT) {
+    ni=Min(nelems-j,LOOPCNT);
+    if (realign) {
+      xp = tmp;
+    } else {
+      xp = (short *) *xpp;
+    }
+   /* copy the next block */
+#pragma cdir loopcnt=LOOPCNT
+#pragma cdir shortloop
+    for (i=0; i<ni; i++) {
+      /* the normal case: */
+      xp[i] = (short) Max( X_SHORT_MIN, Min(X_SHORT_MAX, (short) tp[i]));
+     /* test for range errors (not always needed but do it anyway) */
+      nrange += tp[i] < X_SHORT_MIN || tp[i] > X_SHORT_MAX;
+    }
+   /* copy workspace back if necessary */ 
+    if (realign) {
+      memcpy(*xpp, tmp, ni*X_SIZEOF_SHORT);
+      xp = (short *) *xpp;
+    }
+   /* update xpp and tp */
+    xp += ni;
+    tp += ni;
+    *xpp = (void*)xp;
+  }
+  return nrange == 0 ? ENOERR : NC_ERANGE;
+
+#else   /* not SX */
+
+	char *xp = (char *) *xpp;
+	int status = ENOERR;
+
+	for( ; nelems != 0; nelems--, xp += X_SIZEOF_SHORT, tp++)
+	{
+		int lstatus = ncx_put_short_longlong(xp, tp);
+		if(lstatus != ENOERR)
+			status = lstatus;
+	}
+
+	*xpp = (void *)xp;
+	return status;
+#endif
+}
+
+int
+ncx_putn_short_ulonglong(void **xpp, size_t nelems, const ulonglong *tp)
+{
+#if _SX && \
+           X_SIZEOF_SHORT == SIZEOF_SHORT
+
+ /* basic algorithm is:
+  *   - ensure sane alignment of output data
+  *   - copy (conversion happens automatically) input data
+  *     to output
+  *   - update tp to point at next unconverted input, and xpp to point
+  *     at next location for converted output
+  */
+  long i, j, ni;
+  short tmp[LOOPCNT];        /* in case input is misaligned */
+  short *xp;
+  int nrange = 0;         /* number of range errors */
+  int realign = 0;        /* "do we need to fix input data alignment?" */
+  long cxp = (long) *((char**)xpp);
+
+  realign = (cxp & 7) % SIZEOF_SHORT;
+  /* sjl: manually stripmine so we can limit amount of
+   * vector work space reserved to LOOPCNT elements. Also
+   * makes vectorisation easy */
+  for (j=0; j<nelems && nrange==0; j+=LOOPCNT) {
+    ni=Min(nelems-j,LOOPCNT);
+    if (realign) {
+      xp = tmp;
+    } else {
+      xp = (short *) *xpp;
+    }
+   /* copy the next block */
+#pragma cdir loopcnt=LOOPCNT
+#pragma cdir shortloop
+    for (i=0; i<ni; i++) {
+      /* the normal case: */
+      xp[i] = (short) Max( X_SHORT_MIN, Min(X_SHORT_MAX, (short) tp[i]));
+     /* test for range errors (not always needed but do it anyway) */
+      nrange += tp[i] < X_SHORT_MIN || tp[i] > X_SHORT_MAX;
+    }
+   /* copy workspace back if necessary */ 
+    if (realign) {
+      memcpy(*xpp, tmp, ni*X_SIZEOF_SHORT);
+      xp = (short *) *xpp;
+    }
+   /* update xpp and tp */
+    xp += ni;
+    tp += ni;
+    *xpp = (void*)xp;
+  }
+  return nrange == 0 ? ENOERR : NC_ERANGE;
+
+#else   /* not SX */
+
+	char *xp = (char *) *xpp;
+	int status = ENOERR;
+
+	for( ; nelems != 0; nelems--, xp += X_SIZEOF_SHORT, tp++)
+	{
+		int lstatus = ncx_put_short_ulonglong(xp, tp);
+		if(lstatus != ENOERR)
+			status = lstatus;
+	}
+
+	*xpp = (void *)xp;
+	return status;
+#endif
+}
+
+
+int
+ncx_pad_putn_short_schar(void **xpp, size_t nelems, const schar *tp)
+{
+	const size_t rndup = nelems % 2;
+
+	char *xp = (char *) *xpp;
+	int status = ENOERR;
+
+	for( ; nelems != 0; nelems--, xp += X_SIZEOF_SHORT, tp++)
+	{
+		int lstatus = ncx_put_short_schar(xp, tp);
+		if(lstatus != ENOERR)
+			status = lstatus;
+	}
+
+	if(rndup != 0)
+	{
+		(void) memcpy(xp, nada, X_SIZEOF_SHORT);
+		xp += X_SIZEOF_SHORT;	
+	}
+		
+	*xpp = (void *)xp;
+	return status;
+}
+
+int
+ncx_pad_putn_short_uchar(void **xpp, size_t nelems, const uchar *tp)
+{
+	const size_t rndup = nelems % 2;
+
+	char *xp = (char *) *xpp;
+	int status = ENOERR;
+
+	for( ; nelems != 0; nelems--, xp += X_SIZEOF_SHORT, tp++)
+	{
+		int lstatus = ncx_put_short_uchar(xp, tp);
+		if(lstatus != ENOERR)
+			status = lstatus;
+	}
+
+	if(rndup != 0)
+	{
+		(void) memcpy(xp, nada, X_SIZEOF_SHORT);
+		xp += X_SIZEOF_SHORT;	
+	}
+		
+	*xpp = (void *)xp;
+	return status;
+}
+
+int
+ncx_pad_putn_short_short(void **xpp, size_t nelems, const short *tp)
+{
+	const size_t rndup = nelems % 2;
+
+	char *xp = (char *) *xpp;
+	int status = ENOERR;
+
+	for( ; nelems != 0; nelems--, xp += X_SIZEOF_SHORT, tp++)
+	{
+		int lstatus = ncx_put_short_short(xp, tp);
+		if(lstatus != ENOERR)
+			status = lstatus;
+	}
+
+	if(rndup != 0)
+	{
+		(void) memcpy(xp, nada, X_SIZEOF_SHORT);
+		xp += X_SIZEOF_SHORT;	
+	}
+		
+	*xpp = (void *)xp;
+	return status;
+}
+
+int
+ncx_pad_putn_short_int(void **xpp, size_t nelems, const int *tp)
+{
+	const size_t rndup = nelems % 2;
+
+	char *xp = (char *) *xpp;
+	int status = ENOERR;
+
+	for( ; nelems != 0; nelems--, xp += X_SIZEOF_SHORT, tp++)
+	{
+		int lstatus = ncx_put_short_int(xp, tp);
+		if(lstatus != ENOERR)
+			status = lstatus;
+	}
+
+	if(rndup != 0)
+	{
+		(void) memcpy(xp, nada, X_SIZEOF_SHORT);
+		xp += X_SIZEOF_SHORT;	
+	}
+		
+	*xpp = (void *)xp;
+	return status;
+}
+
+int
+ncx_pad_putn_short_float(void **xpp, size_t nelems, const float *tp)
+{
+	const size_t rndup = nelems % 2;
+
+	char *xp = (char *) *xpp;
+	int status = ENOERR;
+
+	for( ; nelems != 0; nelems--, xp += X_SIZEOF_SHORT, tp++)
+	{
+		int lstatus = ncx_put_short_float(xp, tp);
+		if(lstatus != ENOERR)
+			status = lstatus;
+	}
+
+	if(rndup != 0)
+	{
+		(void) memcpy(xp, nada, X_SIZEOF_SHORT);
+		xp += X_SIZEOF_SHORT;	
+	}
+		
+	*xpp = (void *)xp;
+	return status;
+}
+
+int
+ncx_pad_putn_short_double(void **xpp, size_t nelems, const double *tp)
+{
+	const size_t rndup = nelems % 2;
+
+	char *xp = (char *) *xpp;
+	int status = ENOERR;
+
+	for( ; nelems != 0; nelems--, xp += X_SIZEOF_SHORT, tp++)
+	{
+		int lstatus = ncx_put_short_double(xp, tp);
+		if(lstatus != ENOERR)
+			status = lstatus;
+	}
+
+	if(rndup != 0)
+	{
+		(void) memcpy(xp, nada, X_SIZEOF_SHORT);
+		xp += X_SIZEOF_SHORT;	
+	}
+		
+	*xpp = (void *)xp;
+	return status;
+}
+
+int
+ncx_pad_putn_short_uint(void **xpp, size_t nelems, const uint *tp)
+{
+	const size_t rndup = nelems % 2;
+
+	char *xp = (char *) *xpp;
+	int status = ENOERR;
+
+	for( ; nelems != 0; nelems--, xp += X_SIZEOF_SHORT, tp++)
+	{
+		int lstatus = ncx_put_short_uint(xp, tp);
+		if(lstatus != ENOERR)
+			status = lstatus;
+	}
+
+	if(rndup != 0)
+	{
+		(void) memcpy(xp, nada, X_SIZEOF_SHORT);
+		xp += X_SIZEOF_SHORT;	
+	}
+		
+	*xpp = (void *)xp;
+	return status;
+}
+
+int
+ncx_pad_putn_short_longlong(void **xpp, size_t nelems, const longlong *tp)
+{
+	const size_t rndup = nelems % 2;
+
+	char *xp = (char *) *xpp;
+	int status = ENOERR;
+
+	for( ; nelems != 0; nelems--, xp += X_SIZEOF_SHORT, tp++)
+	{
+		int lstatus = ncx_put_short_longlong(xp, tp);
+		if(lstatus != ENOERR)
+			status = lstatus;
+	}
+
+	if(rndup != 0)
+	{
+		(void) memcpy(xp, nada, X_SIZEOF_SHORT);
+		xp += X_SIZEOF_SHORT;	
+	}
+		
+	*xpp = (void *)xp;
+	return status;
+}
+
+int
+ncx_pad_putn_short_ulonglong(void **xpp, size_t nelems, const ulonglong *tp)
+{
+	const size_t rndup = nelems % 2;
+
+	char *xp = (char *) *xpp;
+	int status = ENOERR;
+
+	for( ; nelems != 0; nelems--, xp += X_SIZEOF_SHORT, tp++)
+	{
+		int lstatus = ncx_put_short_ulonglong(xp, tp);
+		if(lstatus != ENOERR)
+			status = lstatus;
+	}
+
+	if(rndup != 0)
+	{
+		(void) memcpy(xp, nada, X_SIZEOF_SHORT);
+		xp += X_SIZEOF_SHORT;	
+	}
+		
+	*xpp = (void *)xp;
+	return status;
+}
+
+
+
+/* int */
+
+int
+ncx_getn_int_schar(const void **xpp, size_t nelems, schar *tp)
+{
+#if _SX && \
+           X_SIZEOF_INT == SIZEOF_INT
+
+ /* basic algorithm is:
+  *   - ensure sane alignment of input data
+  *   - copy (conversion happens automatically) input data
+  *     to output
+  *   - update xpp to point at next unconverted input, and tp to point
+  *     at next location for converted output
+  */
+  long i, j, ni;
+  int tmp[LOOPCNT];        /* in case input is misaligned */
+  int *xp;
+  int nrange = 0;         /* number of range errors */
+  int realign = 0;        /* "do we need to fix input data alignment?" */
+  long cxp = (long) *((char**)xpp);
+
+  realign = (cxp & 7) % SIZEOF_INT;
+  /* sjl: manually stripmine so we can limit amount of
+   * vector work space reserved to LOOPCNT elements. Also
+   * makes vectorisation easy */
+  for (j=0; j<nelems && nrange==0; j+=LOOPCNT) {
+    ni=Min(nelems-j,LOOPCNT);
+    if (realign) {
+      memcpy(tmp, *xpp, ni*SIZEOF_INT);
+      xp = tmp;
+    } else {
+      xp = (int *) *xpp;
+    }
+   /* copy the next block */
+#pragma cdir loopcnt=LOOPCNT
+#pragma cdir shortloop
+    for (i=0; i<ni; i++) {
+      tp[i] = (schar) Max( SCHAR_MIN, Min(SCHAR_MAX, (schar) xp[i]));
+     /* test for range errors (not always needed but do it anyway) */
+      nrange += xp[i] < SCHAR_MIN || xp[i] > SCHAR_MAX;
+    }
+   /* update xpp and tp */
+    if (realign) xp = (int *) *xpp;
+    xp += ni;
+    tp += ni;
+    *xpp = (void*)xp;
+  }
+  return nrange == 0 ? ENOERR : NC_ERANGE;
+
+#else   /* not SX */
+	const char *xp = (const char *) *xpp;
+	int status = ENOERR;
+
+	for( ; nelems != 0; nelems--, xp += X_SIZEOF_INT, tp++)
+	{
+		const int lstatus = ncx_get_int_schar(xp, tp);
+		if(lstatus != ENOERR)
+			status = lstatus;
+	}
+
+	*xpp = (const void *)xp;
+	return status;
+#  endif
+}
+
+int
+ncx_getn_int_uchar(const void **xpp, size_t nelems, uchar *tp)
+{
+#if _SX && \
+           X_SIZEOF_INT == SIZEOF_INT
+
+ /* basic algorithm is:
+  *   - ensure sane alignment of input data
+  *   - copy (conversion happens automatically) input data
+  *     to output
+  *   - update xpp to point at next unconverted input, and tp to point
+  *     at next location for converted output
+  */
+  long i, j, ni;
+  int tmp[LOOPCNT];        /* in case input is misaligned */
+  int *xp;
+  int nrange = 0;         /* number of range errors */
+  int realign = 0;        /* "do we need to fix input data alignment?" */
+  long cxp = (long) *((char**)xpp);
+
+  realign = (cxp & 7) % SIZEOF_INT;
+  /* sjl: manually stripmine so we can limit amount of
+   * vector work space reserved to LOOPCNT elements. Also
+   * makes vectorisation easy */
+  for (j=0; j<nelems && nrange==0; j+=LOOPCNT) {
+    ni=Min(nelems-j,LOOPCNT);
+    if (realign) {
+      memcpy(tmp, *xpp, ni*SIZEOF_INT);
+      xp = tmp;
+    } else {
+      xp = (int *) *xpp;
+    }
+   /* copy the next block */
+#pragma cdir loopcnt=LOOPCNT
+#pragma cdir shortloop
+    for (i=0; i<ni; i++) {
+      tp[i] = (uchar) Max( UCHAR_MIN, Min(UCHAR_MAX, (uchar) xp[i]));
+     /* test for range errors (not always needed but do it anyway) */
+      nrange += xp[i] < UCHAR_MIN || xp[i] > UCHAR_MAX;
+    }
+   /* update xpp and tp */
+    if (realign) xp = (int *) *xpp;
+    xp += ni;
+    tp += ni;
+    *xpp = (void*)xp;
+  }
+  return nrange == 0 ? ENOERR : NC_ERANGE;
+
+#else   /* not SX */
+	const char *xp = (const char *) *xpp;
+	int status = ENOERR;
+
+	for( ; nelems != 0; nelems--, xp += X_SIZEOF_INT, tp++)
+	{
+		const int lstatus = ncx_get_int_uchar(xp, tp);
+		if(lstatus != ENOERR)
+			status = lstatus;
+	}
+
+	*xpp = (const void *)xp;
+	return status;
+#  endif
+}
+
+int
+ncx_getn_int_short(const void **xpp, size_t nelems, short *tp)
+{
+#if _SX && \
+           X_SIZEOF_INT == SIZEOF_INT
+
+ /* basic algorithm is:
+  *   - ensure sane alignment of input data
+  *   - copy (conversion happens automatically) input data
+  *     to output
+  *   - update xpp to point at next unconverted input, and tp to point
+  *     at next location for converted output
+  */
+  long i, j, ni;
+  int tmp[LOOPCNT];        /* in case input is misaligned */
+  int *xp;
+  int nrange = 0;         /* number of range errors */
+  int realign = 0;        /* "do we need to fix input data alignment?" */
+  long cxp = (long) *((char**)xpp);
+
+  realign = (cxp & 7) % SIZEOF_INT;
+  /* sjl: manually stripmine so we can limit amount of
+   * vector work space reserved to LOOPCNT elements. Also
+   * makes vectorisation easy */
+  for (j=0; j<nelems && nrange==0; j+=LOOPCNT) {
+    ni=Min(nelems-j,LOOPCNT);
+    if (realign) {
+      memcpy(tmp, *xpp, ni*SIZEOF_INT);
+      xp = tmp;
+    } else {
+      xp = (int *) *xpp;
+    }
+   /* copy the next block */
+#pragma cdir loopcnt=LOOPCNT
+#pragma cdir shortloop
+    for (i=0; i<ni; i++) {
+      tp[i] = (short) Max( SHORT_MIN, Min(SHORT_MAX, (short) xp[i]));
+     /* test for range errors (not always needed but do it anyway) */
+      nrange += xp[i] < SHORT_MIN || xp[i] > SHORT_MAX;
+    }
+   /* update xpp and tp */
+    if (realign) xp = (int *) *xpp;
+    xp += ni;
+    tp += ni;
+    *xpp = (void*)xp;
+  }
+  return nrange == 0 ? ENOERR : NC_ERANGE;
+
+#else   /* not SX */
+	const char *xp = (const char *) *xpp;
+	int status = ENOERR;
+
+	for( ; nelems != 0; nelems--, xp += X_SIZEOF_INT, tp++)
+	{
+		const int lstatus = ncx_get_int_short(xp, tp);
+		if(lstatus != ENOERR)
+			status = lstatus;
+	}
+
+	*xpp = (const void *)xp;
+	return status;
+#  endif
+}
+
+#if X_SIZEOF_INT == SIZEOF_INT
+/* optimized version */
+int
+ncx_getn_int_int(const void **xpp, size_t nelems, int *tp)
+{
+#ifdef WORDS_BIGENDIAN
+	(void) memcpy(tp, *xpp, nelems * sizeof(int));
+# else
+	swapn4b(tp, *xpp, nelems);
+# endif
+	*xpp = (const void *)((const char *)(*xpp) + nelems * X_SIZEOF_INT);
+	return ENOERR;
+}
+int
+ncx_getn_int_uint(const void **xpp, size_t nelems, unsigned int *tp)
+{
+#ifdef WORDS_BIGENDIAN
+	(void) memcpy(tp, *xpp, nelems * sizeof(int));
+# else
+	swapn4b(tp, *xpp, nelems);
+# endif
+	*xpp = (const void *)((const char *)(*xpp) + nelems * X_SIZEOF_INT);
+	return ENOERR;
+}
+#else
+int
+ncx_getn_int_int(const void **xpp, size_t nelems, int *tp)
+{
+#if _SX && \
+           X_SIZEOF_INT == SIZEOF_INT
+
+ /* basic algorithm is:
+  *   - ensure sane alignment of input data
+  *   - copy (conversion happens automatically) input data
+  *     to output
+  *   - update xpp to point at next unconverted input, and tp to point
+  *     at next location for converted output
+  */
+  long i, j, ni;
+  int tmp[LOOPCNT];        /* in case input is misaligned */
+  int *xp;
+  int nrange = 0;         /* number of range errors */
+  int realign = 0;        /* "do we need to fix input data alignment?" */
+  long cxp = (long) *((char**)xpp);
+
+  realign = (cxp & 7) % SIZEOF_INT;
+  /* sjl: manually stripmine so we can limit amount of
+   * vector work space reserved to LOOPCNT elements. Also
+   * makes vectorisation easy */
+  for (j=0; j<nelems && nrange==0; j+=LOOPCNT) {
+    ni=Min(nelems-j,LOOPCNT);
+    if (realign) {
+      memcpy(tmp, *xpp, ni*SIZEOF_INT);
+      xp = tmp;
+    } else {
+      xp = (int *) *xpp;
+    }
+   /* copy the next block */
+#pragma cdir loopcnt=LOOPCNT
+#pragma cdir shortloop
+    for (i=0; i<ni; i++) {
+      tp[i] = (int) Max( INT_MIN, Min(INT_MAX, (int) xp[i]));
+     /* test for range errors (not always needed but do it anyway) */
+      nrange += xp[i] < INT_MIN || xp[i] > INT_MAX;
+    }
+   /* update xpp and tp */
+    if (realign) xp = (int *) *xpp;
+    xp += ni;
+    tp += ni;
+    *xpp = (void*)xp;
+  }
+  return nrange == 0 ? ENOERR : NC_ERANGE;
+
+#else   /* not SX */
+	const char *xp = (const char *) *xpp;
+	int status = ENOERR;
+
+	for( ; nelems != 0; nelems--, xp += X_SIZEOF_INT, tp++)
+	{
+		const int lstatus = ncx_get_int_int(xp, tp);
+		if(lstatus != ENOERR)
+			status = lstatus;
+	}
+
+	*xpp = (const void *)xp;
+	return status;
+#  endif
+}
+
+int
+ncx_getn_int_uint(const void **xpp, size_t nelems, uint *tp)
+{
+#if _SX && \
+           X_SIZEOF_INT == SIZEOF_INT
+
+ /* basic algorithm is:
+  *   - ensure sane alignment of input data
+  *   - copy (conversion happens automatically) input data
+  *     to output
+  *   - update xpp to point at next unconverted input, and tp to point
+  *     at next location for converted output
+  */
+  long i, j, ni;
+  int tmp[LOOPCNT];        /* in case input is misaligned */
+  int *xp;
+  int nrange = 0;         /* number of range errors */
+  int realign = 0;        /* "do we need to fix input data alignment?" */
+  long cxp = (long) *((char**)xpp);
+
+  realign = (cxp & 7) % SIZEOF_INT;
+  /* sjl: manually stripmine so we can limit amount of
+   * vector work space reserved to LOOPCNT elements. Also
+   * makes vectorisation easy */
+  for (j=0; j<nelems && nrange==0; j+=LOOPCNT) {
+    ni=Min(nelems-j,LOOPCNT);
+    if (realign) {
+      memcpy(tmp, *xpp, ni*SIZEOF_INT);
+      xp = tmp;
+    } else {
+      xp = (int *) *xpp;
+    }
+   /* copy the next block */
+#pragma cdir loopcnt=LOOPCNT
+#pragma cdir shortloop
+    for (i=0; i<ni; i++) {
+      tp[i] = (uint) Max( UINT_MIN, Min(UINT_MAX, (uint) xp[i]));
+     /* test for range errors (not always needed but do it anyway) */
+      nrange += xp[i] < UINT_MIN || xp[i] > UINT_MAX;
+    }
+   /* update xpp and tp */
+    if (realign) xp = (int *) *xpp;
+    xp += ni;
+    tp += ni;
+    *xpp = (void*)xp;
+  }
+  return nrange == 0 ? ENOERR : NC_ERANGE;
+
+#else   /* not SX */
+	const char *xp = (const char *) *xpp;
+	int status = ENOERR;
+
+	for( ; nelems != 0; nelems--, xp += X_SIZEOF_INT, tp++)
+	{
+		const int lstatus = ncx_get_int_uint(xp, tp);
+		if(lstatus != ENOERR)
+			status = lstatus;
+	}
+
+	*xpp = (const void *)xp;
+	return status;
+#  endif
+}
+
+#endif
+
+int
+ncx_getn_int_longlong(const void **xpp, size_t nelems, longlong *tp)
+{
+#if _SX && \
+           X_SIZEOF_INT == SIZEOF_INT
+
+ /* basic algorithm is:
+  *   - ensure sane alignment of input data
+  *   - copy (conversion happens automatically) input data
+  *     to output
+  *   - update xpp to point at next unconverted input, and tp to point
+  *     at next location for converted output
+  */
+  long i, j, ni;
+  int tmp[LOOPCNT];        /* in case input is misaligned */
+  int *xp;
+  int nrange = 0;         /* number of range errors */
+  int realign = 0;        /* "do we need to fix input data alignment?" */
+  long cxp = (long) *((char**)xpp);
+
+  realign = (cxp & 7) % SIZEOF_INT;
+  /* sjl: manually stripmine so we can limit amount of
+   * vector work space reserved to LOOPCNT elements. Also
+   * makes vectorisation easy */
+  for (j=0; j<nelems && nrange==0; j+=LOOPCNT) {
+    ni=Min(nelems-j,LOOPCNT);
+    if (realign) {
+      memcpy(tmp, *xpp, ni*SIZEOF_INT);
+      xp = tmp;
+    } else {
+      xp = (int *) *xpp;
+    }
+   /* copy the next block */
+#pragma cdir loopcnt=LOOPCNT
+#pragma cdir shortloop
+    for (i=0; i<ni; i++) {
+      tp[i] = (longlong) Max( LONGLONG_MIN, Min(LONGLONG_MAX, (longlong) xp[i]));
+     /* test for range errors (not always needed but do it anyway) */
+      nrange += xp[i] < LONGLONG_MIN || xp[i] > LONGLONG_MAX;
+    }
+   /* update xpp and tp */
+    if (realign) xp = (int *) *xpp;
+    xp += ni;
+    tp += ni;
+    *xpp = (void*)xp;
+  }
+  return nrange == 0 ? ENOERR : NC_ERANGE;
+
+#else   /* not SX */
+	const char *xp = (const char *) *xpp;
+	int status = ENOERR;
+
+	for( ; nelems != 0; nelems--, xp += X_SIZEOF_INT, tp++)
+	{
+		const int lstatus = ncx_get_int_longlong(xp, tp);
+		if(lstatus != ENOERR)
+			status = lstatus;
+	}
+
+	*xpp = (const void *)xp;
+	return status;
+#  endif
+}
+
+int
+ncx_getn_int_ulonglong(const void **xpp, size_t nelems, ulonglong *tp)
+{
+#if _SX && \
+           X_SIZEOF_INT == SIZEOF_INT
+
+ /* basic algorithm is:
+  *   - ensure sane alignment of input data
+  *   - copy (conversion happens automatically) input data
+  *     to output
+  *   - update xpp to point at next unconverted input, and tp to point
+  *     at next location for converted output
+  */
+  long i, j, ni;
+  int tmp[LOOPCNT];        /* in case input is misaligned */
+  int *xp;
+  int nrange = 0;         /* number of range errors */
+  int realign = 0;        /* "do we need to fix input data alignment?" */
+  long cxp = (long) *((char**)xpp);
+
+  realign = (cxp & 7) % SIZEOF_INT;
+  /* sjl: manually stripmine so we can limit amount of
+   * vector work space reserved to LOOPCNT elements. Also
+   * makes vectorisation easy */
+  for (j=0; j<nelems && nrange==0; j+=LOOPCNT) {
+    ni=Min(nelems-j,LOOPCNT);
+    if (realign) {
+      memcpy(tmp, *xpp, ni*SIZEOF_INT);
+      xp = tmp;
+    } else {
+      xp = (int *) *xpp;
+    }
+   /* copy the next block */
+#pragma cdir loopcnt=LOOPCNT
+#pragma cdir shortloop
+    for (i=0; i<ni; i++) {
+      tp[i] = (ulonglong) Max( ULONGLONG_MIN, Min(ULONGLONG_MAX, (ulonglong) xp[i]));
+     /* test for range errors (not always needed but do it anyway) */
+      nrange += xp[i] < ULONGLONG_MIN || xp[i] > ULONGLONG_MAX;
+    }
+   /* update xpp and tp */
+    if (realign) xp = (int *) *xpp;
+    xp += ni;
+    tp += ni;
+    *xpp = (void*)xp;
+  }
+  return nrange == 0 ? ENOERR : NC_ERANGE;
+
+#else   /* not SX */
+	const char *xp = (const char *) *xpp;
+	int status = ENOERR;
+
+	for( ; nelems != 0; nelems--, xp += X_SIZEOF_INT, tp++)
+	{
+		const int lstatus = ncx_get_int_ulonglong(xp, tp);
+		if(lstatus != ENOERR)
+			status = lstatus;
+	}
+
+	*xpp = (const void *)xp;
+	return status;
+#  endif
+}
+
+
+int
+ncx_getn_int_float(const void **xpp, size_t nelems, float *tp)
+{
+#if _SX && \
+           X_SIZEOF_INT == SIZEOF_INT
+
+ /* basic algorithm is:
+  *   - ensure sane alignment of input data
+  *   - copy (conversion happens automatically) input data
+  *     to output
+  *   - update xpp to point at next unconverted input, and tp to point
+  *     at next location for converted output
+  */
+  long i, j, ni;
+  int tmp[LOOPCNT];        /* in case input is misaligned */
+  int *xp;
+  int nrange = 0;         /* number of range errors */
+  int realign = 0;        /* "do we need to fix input data alignment?" */
+  long cxp = (long) *((char**)xpp);
+
+  realign = (cxp & 7) % SIZEOF_INT;
+  /* sjl: manually stripmine so we can limit amount of
+   * vector work space reserved to LOOPCNT elements. Also
+   * makes vectorisation easy */
+  for (j=0; j<nelems && nrange==0; j+=LOOPCNT) {
+    ni=Min(nelems-j,LOOPCNT);
+    if (realign) {
+      memcpy(tmp, *xpp, ni*SIZEOF_INT);
+      xp = tmp;
+    } else {
+      xp = (int *) *xpp;
+    }
+   /* copy the next block */
+#pragma cdir loopcnt=LOOPCNT
+#pragma cdir shortloop
+    for (i=0; i<ni; i++) {
+      tp[i] = (float) Max( FLOAT_MIN, Min(FLOAT_MAX, (float) xp[i]));
+     /* test for range errors (not always needed but do it anyway) */
+      nrange += xp[i] < FLOAT_MIN || xp[i] > FLOAT_MAX;
+    }
+   /* update xpp and tp */
+    if (realign) xp = (int *) *xpp;
+    xp += ni;
+    tp += ni;
+    *xpp = (void*)xp;
+  }
+  return nrange == 0 ? ENOERR : NC_ERANGE;
+
+#else   /* not SX */
+	const char *xp = (const char *) *xpp;
+	int status = ENOERR;
+
+	for( ; nelems != 0; nelems--, xp += X_SIZEOF_INT, tp++)
+	{
+		const int lstatus = ncx_get_int_float(xp, tp);
+		if(lstatus != ENOERR)
+			status = lstatus;
+	}
+
+	*xpp = (const void *)xp;
+	return status;
+#  endif
+}
+
+int
+ncx_getn_int_double(const void **xpp, size_t nelems, double *tp)
+{
+#if _SX && \
+           X_SIZEOF_INT == SIZEOF_INT
+
+ /* basic algorithm is:
+  *   - ensure sane alignment of input data
+  *   - copy (conversion happens automatically) input data
+  *     to output
+  *   - update xpp to point at next unconverted input, and tp to point
+  *     at next location for converted output
+  */
+  long i, j, ni;
+  int tmp[LOOPCNT];        /* in case input is misaligned */
+  int *xp;
+  int nrange = 0;         /* number of range errors */
+  int realign = 0;        /* "do we need to fix input data alignment?" */
+  long cxp = (long) *((char**)xpp);
+
+  realign = (cxp & 7) % SIZEOF_INT;
+  /* sjl: manually stripmine so we can limit amount of
+   * vector work space reserved to LOOPCNT elements. Also
+   * makes vectorisation easy */
+  for (j=0; j<nelems && nrange==0; j+=LOOPCNT) {
+    ni=Min(nelems-j,LOOPCNT);
+    if (realign) {
+      memcpy(tmp, *xpp, ni*SIZEOF_INT);
+      xp = tmp;
+    } else {
+      xp = (int *) *xpp;
+    }
+   /* copy the next block */
+#pragma cdir loopcnt=LOOPCNT
+#pragma cdir shortloop
+    for (i=0; i<ni; i++) {
+      tp[i] = (double) Max( DOUBLE_MIN, Min(DOUBLE_MAX, (double) xp[i]));
+     /* test for range errors (not always needed but do it anyway) */
+      nrange += xp[i] < DOUBLE_MIN || xp[i] > DOUBLE_MAX;
+    }
+   /* update xpp and tp */
+    if (realign) xp = (int *) *xpp;
+    xp += ni;
+    tp += ni;
+    *xpp = (void*)xp;
+  }
+  return nrange == 0 ? ENOERR : NC_ERANGE;
+
+#else   /* not SX */
+	const char *xp = (const char *) *xpp;
+	int status = ENOERR;
+
+	for( ; nelems != 0; nelems--, xp += X_SIZEOF_INT, tp++)
+	{
+		const int lstatus = ncx_get_int_double(xp, tp);
+		if(lstatus != ENOERR)
+			status = lstatus;
+	}
+
+	*xpp = (const void *)xp;
+	return status;
+#  endif
+}
+
+
+int
+ncx_putn_int_schar(void **xpp, size_t nelems, const schar *tp)
+{
+#if _SX && \
+           X_SIZEOF_INT == SIZEOF_INT
+
+ /* basic algorithm is:
+  *   - ensure sane alignment of output data
+  *   - copy (conversion happens automatically) input data
+  *     to output
+  *   - update tp to point at next unconverted input, and xpp to point
+  *     at next location for converted output
+  */
+  long i, j, ni;
+  int tmp[LOOPCNT];        /* in case input is misaligned */
+  int *xp;
+  int nrange = 0;         /* number of range errors */
+  int realign = 0;        /* "do we need to fix input data alignment?" */
+  long cxp = (long) *((char**)xpp);
+
+  realign = (cxp & 7) % SIZEOF_INT;
+  /* sjl: manually stripmine so we can limit amount of
+   * vector work space reserved to LOOPCNT elements. Also
+   * makes vectorisation easy */
+  for (j=0; j<nelems && nrange==0; j+=LOOPCNT) {
+    ni=Min(nelems-j,LOOPCNT);
+    if (realign) {
+      xp = tmp;
+    } else {
+      xp = (int *) *xpp;
+    }
+   /* copy the next block */
+#pragma cdir loopcnt=LOOPCNT
+#pragma cdir shortloop
+    for (i=0; i<ni; i++) {
+      /* the normal case: */
+      xp[i] = (int) Max( X_INT_MIN, Min(X_INT_MAX, (int) tp[i]));
+     /* test for range errors (not always needed but do it anyway) */
+      nrange += tp[i] < X_INT_MIN || tp[i] > X_INT_MAX;
+    }
+   /* copy workspace back if necessary */ 
+    if (realign) {
+      memcpy(*xpp, tmp, ni*X_SIZEOF_INT);
+      xp = (int *) *xpp;
+    }
+   /* update xpp and tp */
+    xp += ni;
+    tp += ni;
+    *xpp = (void*)xp;
+  }
+  return nrange == 0 ? ENOERR : NC_ERANGE;
+
+#else   /* not SX */
+
+	char *xp = (char *) *xpp;
+	int status = ENOERR;
+
+	for( ; nelems != 0; nelems--, xp += X_SIZEOF_INT, tp++)
+	{
+		int lstatus = ncx_put_int_schar(xp, tp);
+		if(lstatus != ENOERR)
+			status = lstatus;
+	}
+
+	*xpp = (void *)xp;
+	return status;
+#endif
+}
+
+int
+ncx_putn_int_uchar(void **xpp, size_t nelems, const uchar *tp)
+{
+#if _SX && \
+           X_SIZEOF_INT == SIZEOF_INT
+
+ /* basic algorithm is:
+  *   - ensure sane alignment of output data
+  *   - copy (conversion happens automatically) input data
+  *     to output
+  *   - update tp to point at next unconverted input, and xpp to point
+  *     at next location for converted output
+  */
+  long i, j, ni;
+  int tmp[LOOPCNT];        /* in case input is misaligned */
+  int *xp;
+  int nrange = 0;         /* number of range errors */
+  int realign = 0;        /* "do we need to fix input data alignment?" */
+  long cxp = (long) *((char**)xpp);
+
+  realign = (cxp & 7) % SIZEOF_INT;
+  /* sjl: manually stripmine so we can limit amount of
+   * vector work space reserved to LOOPCNT elements. Also
+   * makes vectorisation easy */
+  for (j=0; j<nelems && nrange==0; j+=LOOPCNT) {
+    ni=Min(nelems-j,LOOPCNT);
+    if (realign) {
+      xp = tmp;
+    } else {
+      xp = (int *) *xpp;
+    }
+   /* copy the next block */
+#pragma cdir loopcnt=LOOPCNT
+#pragma cdir shortloop
+    for (i=0; i<ni; i++) {
+      /* the normal case: */
+      xp[i] = (int) Max( X_INT_MIN, Min(X_INT_MAX, (int) tp[i]));
+     /* test for range errors (not always needed but do it anyway) */
+      nrange += tp[i] < X_INT_MIN || tp[i] > X_INT_MAX;
+    }
+   /* copy workspace back if necessary */ 
+    if (realign) {
+      memcpy(*xpp, tmp, ni*X_SIZEOF_INT);
+      xp = (int *) *xpp;
+    }
+   /* update xpp and tp */
+    xp += ni;
+    tp += ni;
+    *xpp = (void*)xp;
+  }
+  return nrange == 0 ? ENOERR : NC_ERANGE;
+
+#else   /* not SX */
+
+	char *xp = (char *) *xpp;
+	int status = ENOERR;
+
+	for( ; nelems != 0; nelems--, xp += X_SIZEOF_INT, tp++)
+	{
+		int lstatus = ncx_put_int_uchar(xp, tp);
+		if(lstatus != ENOERR)
+			status = lstatus;
+	}
+
+	*xpp = (void *)xp;
+	return status;
+#endif
+}
+
+int
+ncx_putn_int_short(void **xpp, size_t nelems, const short *tp)
+{
+#if _SX && \
+           X_SIZEOF_INT == SIZEOF_INT
+
+ /* basic algorithm is:
+  *   - ensure sane alignment of output data
+  *   - copy (conversion happens automatically) input data
+  *     to output
+  *   - update tp to point at next unconverted input, and xpp to point
+  *     at next location for converted output
+  */
+  long i, j, ni;
+  int tmp[LOOPCNT];        /* in case input is misaligned */
+  int *xp;
+  int nrange = 0;         /* number of range errors */
+  int realign = 0;        /* "do we need to fix input data alignment?" */
+  long cxp = (long) *((char**)xpp);
+
+  realign = (cxp & 7) % SIZEOF_INT;
+  /* sjl: manually stripmine so we can limit amount of
+   * vector work space reserved to LOOPCNT elements. Also
+   * makes vectorisation easy */
+  for (j=0; j<nelems && nrange==0; j+=LOOPCNT) {
+    ni=Min(nelems-j,LOOPCNT);
+    if (realign) {
+      xp = tmp;
+    } else {
+      xp = (int *) *xpp;
+    }
+   /* copy the next block */
+#pragma cdir loopcnt=LOOPCNT
+#pragma cdir shortloop
+    for (i=0; i<ni; i++) {
+      /* the normal case: */
+      xp[i] = (int) Max( X_INT_MIN, Min(X_INT_MAX, (int) tp[i]));
+     /* test for range errors (not always needed but do it anyway) */
+      nrange += tp[i] < X_INT_MIN || tp[i] > X_INT_MAX;
+    }
+   /* copy workspace back if necessary */ 
+    if (realign) {
+      memcpy(*xpp, tmp, ni*X_SIZEOF_INT);
+      xp = (int *) *xpp;
+    }
+   /* update xpp and tp */
+    xp += ni;
+    tp += ni;
+    *xpp = (void*)xp;
+  }
+  return nrange == 0 ? ENOERR : NC_ERANGE;
+
+#else   /* not SX */
+
+	char *xp = (char *) *xpp;
+	int status = ENOERR;
+
+	for( ; nelems != 0; nelems--, xp += X_SIZEOF_INT, tp++)
+	{
+		int lstatus = ncx_put_int_short(xp, tp);
+		if(lstatus != ENOERR)
+			status = lstatus;
+	}
+
+	*xpp = (void *)xp;
+	return status;
+#endif
+}
+
+#if X_SIZEOF_INT == SIZEOF_INT
+/* optimized version */
+int
+ncx_putn_int_int(void **xpp, size_t nelems, const int *tp)
+{
+#ifdef WORDS_BIGENDIAN
+	(void) memcpy(*xpp, tp, nelems * X_SIZEOF_INT);
+# else
+	swapn4b(*xpp, tp, nelems);
+# endif
+	*xpp = (void *)((char *)(*xpp) + nelems * X_SIZEOF_INT);
+	return ENOERR;
+}
+int
+ncx_putn_int_uint(void **xpp, size_t nelems, const unsigned int *tp)
+{
+#ifdef WORDS_BIGENDIAN
+	(void) memcpy(*xpp, tp, nelems * X_SIZEOF_INT);
+# else
+	swapn4b(*xpp, tp, nelems);
+# endif
+	*xpp = (void *)((char *)(*xpp) + nelems * X_SIZEOF_INT);
+	return ENOERR;
+}
+#else
+int
+ncx_putn_int_int(void **xpp, size_t nelems, const int *tp)
+{
+#if _SX && \
+           X_SIZEOF_INT == SIZEOF_INT
+
+ /* basic algorithm is:
+  *   - ensure sane alignment of output data
+  *   - copy (conversion happens automatically) input data
+  *     to output
+  *   - update tp to point at next unconverted input, and xpp to point
+  *     at next location for converted output
+  */
+  long i, j, ni;
+  int tmp[LOOPCNT];        /* in case input is misaligned */
+  int *xp;
+  int nrange = 0;         /* number of range errors */
+  int realign = 0;        /* "do we need to fix input data alignment?" */
+  long cxp = (long) *((char**)xpp);
+
+  realign = (cxp & 7) % SIZEOF_INT;
+  /* sjl: manually stripmine so we can limit amount of
+   * vector work space reserved to LOOPCNT elements. Also
+   * makes vectorisation easy */
+  for (j=0; j<nelems && nrange==0; j+=LOOPCNT) {
+    ni=Min(nelems-j,LOOPCNT);
+    if (realign) {
+      xp = tmp;
+    } else {
+      xp = (int *) *xpp;
+    }
+   /* copy the next block */
+#pragma cdir loopcnt=LOOPCNT
+#pragma cdir shortloop
+    for (i=0; i<ni; i++) {
+      /* the normal case: */
+      xp[i] = (int) Max( X_INT_MIN, Min(X_INT_MAX, (int) tp[i]));
+     /* test for range errors (not always needed but do it anyway) */
+      nrange += tp[i] < X_INT_MIN || tp[i] > X_INT_MAX;
+    }
+   /* copy workspace back if necessary */ 
+    if (realign) {
+      memcpy(*xpp, tmp, ni*X_SIZEOF_INT);
+      xp = (int *) *xpp;
+    }
+   /* update xpp and tp */
+    xp += ni;
+    tp += ni;
+    *xpp = (void*)xp;
+  }
+  return nrange == 0 ? ENOERR : NC_ERANGE;
+
+#else   /* not SX */
+
+	char *xp = (char *) *xpp;
+	int status = ENOERR;
+
+	for( ; nelems != 0; nelems--, xp += X_SIZEOF_INT, tp++)
+	{
+		int lstatus = ncx_put_int_int(xp, tp);
+		if(lstatus != ENOERR)
+			status = lstatus;
+	}
+
+	*xpp = (void *)xp;
+	return status;
+#endif
+}
+
+int
+ncx_putn_int_uint(void **xpp, size_t nelems, const uint *tp)
+{
+#if _SX && \
+           X_SIZEOF_INT == SIZEOF_INT
+
+ /* basic algorithm is:
+  *   - ensure sane alignment of output data
+  *   - copy (conversion happens automatically) input data
+  *     to output
+  *   - update tp to point at next unconverted input, and xpp to point
+  *     at next location for converted output
+  */
+  long i, j, ni;
+  int tmp[LOOPCNT];        /* in case input is misaligned */
+  int *xp;
+  int nrange = 0;         /* number of range errors */
+  int realign = 0;        /* "do we need to fix input data alignment?" */
+  long cxp = (long) *((char**)xpp);
+
+  realign = (cxp & 7) % SIZEOF_INT;
+  /* sjl: manually stripmine so we can limit amount of
+   * vector work space reserved to LOOPCNT elements. Also
+   * makes vectorisation easy */
+  for (j=0; j<nelems && nrange==0; j+=LOOPCNT) {
+    ni=Min(nelems-j,LOOPCNT);
+    if (realign) {
+      xp = tmp;
+    } else {
+      xp = (int *) *xpp;
+    }
+   /* copy the next block */
+#pragma cdir loopcnt=LOOPCNT
+#pragma cdir shortloop
+    for (i=0; i<ni; i++) {
+      /* the normal case: */
+      xp[i] = (int) Max( X_INT_MIN, Min(X_INT_MAX, (int) tp[i]));
+     /* test for range errors (not always needed but do it anyway) */
+      nrange += tp[i] < X_INT_MIN || tp[i] > X_INT_MAX;
+    }
+   /* copy workspace back if necessary */ 
+    if (realign) {
+      memcpy(*xpp, tmp, ni*X_SIZEOF_INT);
+      xp = (int *) *xpp;
+    }
+   /* update xpp and tp */
+    xp += ni;
+    tp += ni;
+    *xpp = (void*)xp;
+  }
+  return nrange == 0 ? ENOERR : NC_ERANGE;
+
+#else   /* not SX */
+
+	char *xp = (char *) *xpp;
+	int status = ENOERR;
+
+	for( ; nelems != 0; nelems--, xp += X_SIZEOF_INT, tp++)
+	{
+		int lstatus = ncx_put_int_uint(xp, tp);
+		if(lstatus != ENOERR)
+			status = lstatus;
+	}
+
+	*xpp = (void *)xp;
+	return status;
+#endif
+}
+
+#endif
+
+int
+ncx_putn_int_longlong(void **xpp, size_t nelems, const longlong *tp)
+{
+#if _SX && \
+           X_SIZEOF_INT == SIZEOF_INT
+
+ /* basic algorithm is:
+  *   - ensure sane alignment of output data
+  *   - copy (conversion happens automatically) input data
+  *     to output
+  *   - update tp to point at next unconverted input, and xpp to point
+  *     at next location for converted output
+  */
+  long i, j, ni;
+  int tmp[LOOPCNT];        /* in case input is misaligned */
+  int *xp;
+  int nrange = 0;         /* number of range errors */
+  int realign = 0;        /* "do we need to fix input data alignment?" */
+  long cxp = (long) *((char**)xpp);
+
+  realign = (cxp & 7) % SIZEOF_INT;
+  /* sjl: manually stripmine so we can limit amount of
+   * vector work space reserved to LOOPCNT elements. Also
+   * makes vectorisation easy */
+  for (j=0; j<nelems && nrange==0; j+=LOOPCNT) {
+    ni=Min(nelems-j,LOOPCNT);
+    if (realign) {
+      xp = tmp;
+    } else {
+      xp = (int *) *xpp;
+    }
+   /* copy the next block */
+#pragma cdir loopcnt=LOOPCNT
+#pragma cdir shortloop
+    for (i=0; i<ni; i++) {
+      /* the normal case: */
+      xp[i] = (int) Max( X_INT_MIN, Min(X_INT_MAX, (int) tp[i]));
+     /* test for range errors (not always needed but do it anyway) */
+      nrange += tp[i] < X_INT_MIN || tp[i] > X_INT_MAX;
+    }
+   /* copy workspace back if necessary */ 
+    if (realign) {
+      memcpy(*xpp, tmp, ni*X_SIZEOF_INT);
+      xp = (int *) *xpp;
+    }
+   /* update xpp and tp */
+    xp += ni;
+    tp += ni;
+    *xpp = (void*)xp;
+  }
+  return nrange == 0 ? ENOERR : NC_ERANGE;
+
+#else   /* not SX */
+
+	char *xp = (char *) *xpp;
+	int status = ENOERR;
+
+	for( ; nelems != 0; nelems--, xp += X_SIZEOF_INT, tp++)
+	{
+		int lstatus = ncx_put_int_longlong(xp, tp);
+		if(lstatus != ENOERR)
+			status = lstatus;
+	}
+
+	*xpp = (void *)xp;
+	return status;
+#endif
+}
+
+int
+ncx_putn_int_ulonglong(void **xpp, size_t nelems, const ulonglong *tp)
+{
+#if _SX && \
+           X_SIZEOF_INT == SIZEOF_INT
+
+ /* basic algorithm is:
+  *   - ensure sane alignment of output data
+  *   - copy (conversion happens automatically) input data
+  *     to output
+  *   - update tp to point at next unconverted input, and xpp to point
+  *     at next location for converted output
+  */
+  long i, j, ni;
+  int tmp[LOOPCNT];        /* in case input is misaligned */
+  int *xp;
+  int nrange = 0;         /* number of range errors */
+  int realign = 0;        /* "do we need to fix input data alignment?" */
+  long cxp = (long) *((char**)xpp);
+
+  realign = (cxp & 7) % SIZEOF_INT;
+  /* sjl: manually stripmine so we can limit amount of
+   * vector work space reserved to LOOPCNT elements. Also
+   * makes vectorisation easy */
+  for (j=0; j<nelems && nrange==0; j+=LOOPCNT) {
+    ni=Min(nelems-j,LOOPCNT);
+    if (realign) {
+      xp = tmp;
+    } else {
+      xp = (int *) *xpp;
+    }
+   /* copy the next block */
+#pragma cdir loopcnt=LOOPCNT
+#pragma cdir shortloop
+    for (i=0; i<ni; i++) {
+      /* the normal case: */
+      xp[i] = (int) Max( X_INT_MIN, Min(X_INT_MAX, (int) tp[i]));
+     /* test for range errors (not always needed but do it anyway) */
+      nrange += tp[i] < X_INT_MIN || tp[i] > X_INT_MAX;
+    }
+   /* copy workspace back if necessary */ 
+    if (realign) {
+      memcpy(*xpp, tmp, ni*X_SIZEOF_INT);
+      xp = (int *) *xpp;
+    }
+   /* update xpp and tp */
+    xp += ni;
+    tp += ni;
+    *xpp = (void*)xp;
+  }
+  return nrange == 0 ? ENOERR : NC_ERANGE;
+
+#else   /* not SX */
+
+	char *xp = (char *) *xpp;
+	int status = ENOERR;
+
+	for( ; nelems != 0; nelems--, xp += X_SIZEOF_INT, tp++)
+	{
+		int lstatus = ncx_put_int_ulonglong(xp, tp);
+		if(lstatus != ENOERR)
+			status = lstatus;
+	}
+
+	*xpp = (void *)xp;
+	return status;
+#endif
+}
+
+int
+ncx_putn_int_float(void **xpp, size_t nelems, const float *tp)
+{
+#if _SX && \
+           X_SIZEOF_INT == SIZEOF_INT
+
+ /* basic algorithm is:
+  *   - ensure sane alignment of output data
+  *   - copy (conversion happens automatically) input data
+  *     to output
+  *   - update tp to point at next unconverted input, and xpp to point
+  *     at next location for converted output
+  */
+  long i, j, ni;
+  int tmp[LOOPCNT];        /* in case input is misaligned */
+  int *xp;
+  double d;               /* special case for ncx_putn_int_float */
+  int nrange = 0;         /* number of range errors */
+  int realign = 0;        /* "do we need to fix input data alignment?" */
+  long cxp = (long) *((char**)xpp);
+
+  realign = (cxp & 7) % SIZEOF_INT;
+  /* sjl: manually stripmine so we can limit amount of
+   * vector work space reserved to LOOPCNT elements. Also
+   * makes vectorisation easy */
+  for (j=0; j<nelems && nrange==0; j+=LOOPCNT) {
+    ni=Min(nelems-j,LOOPCNT);
+    if (realign) {
+      xp = tmp;
+    } else {
+      xp = (int *) *xpp;
+    }
+   /* copy the next block */
+#pragma cdir loopcnt=LOOPCNT
+#pragma cdir shortloop
+    for (i=0; i<ni; i++) {
+      /* for some reason int to float, for putn, requires a special case */ 
+      d = tp[i];
+      xp[i] = (int) Max( X_INT_MIN, Min(X_INT_MAX, (int) d));
+      nrange += d < X_INT_MIN || d > X_INT_MAX;
+    }
+   /* copy workspace back if necessary */ 
+    if (realign) {
+      memcpy(*xpp, tmp, ni*X_SIZEOF_INT);
+      xp = (int *) *xpp;
+    }
+   /* update xpp and tp */
+    xp += ni;
+    tp += ni;
+    *xpp = (void*)xp;
+  }
+  return nrange == 0 ? ENOERR : NC_ERANGE;
+
+#else   /* not SX */
+
+	char *xp = (char *) *xpp;
+	int status = ENOERR;
+
+	for( ; nelems != 0; nelems--, xp += X_SIZEOF_INT, tp++)
+	{
+		int lstatus = ncx_put_int_float(xp, tp);
+		if(lstatus != ENOERR)
+			status = lstatus;
+	}
+
+	*xpp = (void *)xp;
+	return status;
+#endif
+}
+
+int
+ncx_putn_int_double(void **xpp, size_t nelems, const double *tp)
+{
+#if _SX && \
+           X_SIZEOF_INT == SIZEOF_INT
+
+ /* basic algorithm is:
+  *   - ensure sane alignment of output data
+  *   - copy (conversion happens automatically) input data
+  *     to output
+  *   - update tp to point at next unconverted input, and xpp to point
+  *     at next location for converted output
+  */
+  long i, j, ni;
+  int tmp[LOOPCNT];        /* in case input is misaligned */
+  int *xp;
+  int nrange = 0;         /* number of range errors */
+  int realign = 0;        /* "do we need to fix input data alignment?" */
+  long cxp = (long) *((char**)xpp);
+
+  realign = (cxp & 7) % SIZEOF_INT;
+  /* sjl: manually stripmine so we can limit amount of
+   * vector work space reserved to LOOPCNT elements. Also
+   * makes vectorisation easy */
+  for (j=0; j<nelems && nrange==0; j+=LOOPCNT) {
+    ni=Min(nelems-j,LOOPCNT);
+    if (realign) {
+      xp = tmp;
+    } else {
+      xp = (int *) *xpp;
+    }
+   /* copy the next block */
+#pragma cdir loopcnt=LOOPCNT
+#pragma cdir shortloop
+    for (i=0; i<ni; i++) {
+      /* the normal case: */
+      xp[i] = (int) Max( X_INT_MIN, Min(X_INT_MAX, (int) tp[i]));
+     /* test for range errors (not always needed but do it anyway) */
+      nrange += tp[i] < X_INT_MIN || tp[i] > X_INT_MAX;
+    }
+   /* copy workspace back if necessary */ 
+    if (realign) {
+      memcpy(*xpp, tmp, ni*X_SIZEOF_INT);
+      xp = (int *) *xpp;
+    }
+   /* update xpp and tp */
+    xp += ni;
+    tp += ni;
+    *xpp = (void*)xp;
+  }
+  return nrange == 0 ? ENOERR : NC_ERANGE;
+
+#else   /* not SX */
+
+	char *xp = (char *) *xpp;
+	int status = ENOERR;
+
+	for( ; nelems != 0; nelems--, xp += X_SIZEOF_INT, tp++)
+	{
+		int lstatus = ncx_put_int_double(xp, tp);
+		if(lstatus != ENOERR)
+			status = lstatus;
+	}
+
+	*xpp = (void *)xp;
+	return status;
+#endif
+}
+
+
+
+/* float */
+
+int
+ncx_getn_float_schar(const void **xpp, size_t nelems, schar *tp)
+{
+#if _SX && \
+           X_SIZEOF_FLOAT == SIZEOF_FLOAT
+
+ /* basic algorithm is:
+  *   - ensure sane alignment of input data
+  *   - copy (conversion happens automatically) input data
+  *     to output
+  *   - update xpp to point at next unconverted input, and tp to point
+  *     at next location for converted output
+  */
+  long i, j, ni;
+  float tmp[LOOPCNT];        /* in case input is misaligned */
+  float *xp;
+  int nrange = 0;         /* number of range errors */
+  int realign = 0;        /* "do we need to fix input data alignment?" */
+  long cxp = (long) *((char**)xpp);
+
+  realign = (cxp & 7) % SIZEOF_FLOAT;
+  /* sjl: manually stripmine so we can limit amount of
+   * vector work space reserved to LOOPCNT elements. Also
+   * makes vectorisation easy */
+  for (j=0; j<nelems && nrange==0; j+=LOOPCNT) {
+    ni=Min(nelems-j,LOOPCNT);
+    if (realign) {
+      memcpy(tmp, *xpp, ni*SIZEOF_FLOAT);
+      xp = tmp;
+    } else {
+      xp = (float *) *xpp;
+    }
+   /* copy the next block */
+#pragma cdir loopcnt=LOOPCNT
+#pragma cdir shortloop
+    for (i=0; i<ni; i++) {
+      tp[i] = (schar) Max( SCHAR_MIN, Min(SCHAR_MAX, (schar) xp[i]));
+     /* test for range errors (not always needed but do it anyway) */
+      nrange += xp[i] < SCHAR_MIN || xp[i] > SCHAR_MAX;
+    }
+   /* update xpp and tp */
+    if (realign) xp = (float *) *xpp;
+    xp += ni;
+    tp += ni;
+    *xpp = (void*)xp;
+  }
+  return nrange == 0 ? ENOERR : NC_ERANGE;
+
+#else   /* not SX */
+	const char *xp = (const char *) *xpp;
+	int status = ENOERR;
+
+	for( ; nelems != 0; nelems--, xp += X_SIZEOF_FLOAT, tp++)
+	{
+		const int lstatus = ncx_get_float_schar(xp, tp);
+		if(lstatus != ENOERR)
+			status = lstatus;
+	}
+
+	*xpp = (const void *)xp;
+	return status;
+#  endif
+}
+
+int
+ncx_getn_float_uchar(const void **xpp, size_t nelems, uchar *tp)
+{
+#if _SX && \
+           X_SIZEOF_FLOAT == SIZEOF_FLOAT
+
+ /* basic algorithm is:
+  *   - ensure sane alignment of input data
+  *   - copy (conversion happens automatically) input data
+  *     to output
+  *   - update xpp to point at next unconverted input, and tp to point
+  *     at next location for converted output
+  */
+  long i, j, ni;
+  float tmp[LOOPCNT];        /* in case input is misaligned */
+  float *xp;
+  int nrange = 0;         /* number of range errors */
+  int realign = 0;        /* "do we need to fix input data alignment?" */
+  long cxp = (long) *((char**)xpp);
+
+  realign = (cxp & 7) % SIZEOF_FLOAT;
+  /* sjl: manually stripmine so we can limit amount of
+   * vector work space reserved to LOOPCNT elements. Also
+   * makes vectorisation easy */
+  for (j=0; j<nelems && nrange==0; j+=LOOPCNT) {
+    ni=Min(nelems-j,LOOPCNT);
+    if (realign) {
+      memcpy(tmp, *xpp, ni*SIZEOF_FLOAT);
+      xp = tmp;
+    } else {
+      xp = (float *) *xpp;
+    }
+   /* copy the next block */
+#pragma cdir loopcnt=LOOPCNT
+#pragma cdir shortloop
+    for (i=0; i<ni; i++) {
+      tp[i] = (uchar) Max( UCHAR_MIN, Min(UCHAR_MAX, (uchar) xp[i]));
+     /* test for range errors (not always needed but do it anyway) */
+      nrange += xp[i] < UCHAR_MIN || xp[i] > UCHAR_MAX;
+    }
+   /* update xpp and tp */
+    if (realign) xp = (float *) *xpp;
+    xp += ni;
+    tp += ni;
+    *xpp = (void*)xp;
+  }
+  return nrange == 0 ? ENOERR : NC_ERANGE;
+
+#else   /* not SX */
+	const char *xp = (const char *) *xpp;
+	int status = ENOERR;
+
+	for( ; nelems != 0; nelems--, xp += X_SIZEOF_FLOAT, tp++)
+	{
+		const int lstatus = ncx_get_float_uchar(xp, tp);
+		if(lstatus != ENOERR)
+			status = lstatus;
+	}
+
+	*xpp = (const void *)xp;
+	return status;
+#  endif
+}
+
+int
+ncx_getn_float_short(const void **xpp, size_t nelems, short *tp)
+{
+#if _SX && \
+           X_SIZEOF_FLOAT == SIZEOF_FLOAT
+
+ /* basic algorithm is:
+  *   - ensure sane alignment of input data
+  *   - copy (conversion happens automatically) input data
+  *     to output
+  *   - update xpp to point at next unconverted input, and tp to point
+  *     at next location for converted output
+  */
+  long i, j, ni;
+  float tmp[LOOPCNT];        /* in case input is misaligned */
+  float *xp;
+  int nrange = 0;         /* number of range errors */
+  int realign = 0;        /* "do we need to fix input data alignment?" */
+  long cxp = (long) *((char**)xpp);
+
+  realign = (cxp & 7) % SIZEOF_FLOAT;
+  /* sjl: manually stripmine so we can limit amount of
+   * vector work space reserved to LOOPCNT elements. Also
+   * makes vectorisation easy */
+  for (j=0; j<nelems && nrange==0; j+=LOOPCNT) {
+    ni=Min(nelems-j,LOOPCNT);
+    if (realign) {
+      memcpy(tmp, *xpp, ni*SIZEOF_FLOAT);
+      xp = tmp;
+    } else {
+      xp = (float *) *xpp;
+    }
+   /* copy the next block */
+#pragma cdir loopcnt=LOOPCNT
+#pragma cdir shortloop
+    for (i=0; i<ni; i++) {
+      tp[i] = (short) Max( SHORT_MIN, Min(SHORT_MAX, (short) xp[i]));
+     /* test for range errors (not always needed but do it anyway) */
+      nrange += xp[i] < SHORT_MIN || xp[i] > SHORT_MAX;
+    }
+   /* update xpp and tp */
+    if (realign) xp = (float *) *xpp;
+    xp += ni;
+    tp += ni;
+    *xpp = (void*)xp;
+  }
+  return nrange == 0 ? ENOERR : NC_ERANGE;
+
+#else   /* not SX */
+	const char *xp = (const char *) *xpp;
+	int status = ENOERR;
+
+	for( ; nelems != 0; nelems--, xp += X_SIZEOF_FLOAT, tp++)
+	{
+		const int lstatus = ncx_get_float_short(xp, tp);
+		if(lstatus != ENOERR)
+			status = lstatus;
+	}
+
+	*xpp = (const void *)xp;
+	return status;
+#  endif
+}
+
+int
+ncx_getn_float_int(const void **xpp, size_t nelems, int *tp)
+{
+#if _SX && \
+           X_SIZEOF_FLOAT == SIZEOF_FLOAT
+
+ /* basic algorithm is:
+  *   - ensure sane alignment of input data
+  *   - copy (conversion happens automatically) input data
+  *     to output
+  *   - update xpp to point at next unconverted input, and tp to point
+  *     at next location for converted output
+  */
+  long i, j, ni;
+  float tmp[LOOPCNT];        /* in case input is misaligned */
+  float *xp;
+  int nrange = 0;         /* number of range errors */
+  int realign = 0;        /* "do we need to fix input data alignment?" */
+  long cxp = (long) *((char**)xpp);
+
+  realign = (cxp & 7) % SIZEOF_FLOAT;
+  /* sjl: manually stripmine so we can limit amount of
+   * vector work space reserved to LOOPCNT elements. Also
+   * makes vectorisation easy */
+  for (j=0; j<nelems && nrange==0; j+=LOOPCNT) {
+    ni=Min(nelems-j,LOOPCNT);
+    if (realign) {
+      memcpy(tmp, *xpp, ni*SIZEOF_FLOAT);
+      xp = tmp;
+    } else {
+      xp = (float *) *xpp;
+    }
+   /* copy the next block */
+#pragma cdir loopcnt=LOOPCNT
+#pragma cdir shortloop
+    for (i=0; i<ni; i++) {
+      tp[i] = (int) Max( INT_MIN, Min(INT_MAX, (int) xp[i]));
+     /* test for range errors (not always needed but do it anyway) */
+      nrange += xp[i] < INT_MIN || xp[i] > INT_MAX;
+    }
+   /* update xpp and tp */
+    if (realign) xp = (float *) *xpp;
+    xp += ni;
+    tp += ni;
+    *xpp = (void*)xp;
+  }
+  return nrange == 0 ? ENOERR : NC_ERANGE;
+
+#else   /* not SX */
+	const char *xp = (const char *) *xpp;
+	int status = ENOERR;
+
+	for( ; nelems != 0; nelems--, xp += X_SIZEOF_FLOAT, tp++)
+	{
+		const int lstatus = ncx_get_float_int(xp, tp);
+		if(lstatus != ENOERR)
+			status = lstatus;
+	}
+
+	*xpp = (const void *)xp;
+	return status;
+#  endif
+}
+
+#if X_SIZEOF_FLOAT == SIZEOF_FLOAT && !defined(NO_IEEE_FLOAT)
+/* optimized version */
+int
+ncx_getn_float_float(const void **xpp, size_t nelems, float *tp)
+{
+#ifdef WORDS_BIGENDIAN
+	(void) memcpy(tp, *xpp, nelems * sizeof(float));
+# else
+	swapn4b(tp, *xpp, nelems);
+# endif
+	*xpp = (const void *)((const char *)(*xpp) + nelems * X_SIZEOF_FLOAT);
+	return ENOERR;
+}
+#elif vax
+int
+ncx_getn_float_float(const void **xpp, size_t nfloats, float *ip)
+{
+	float *const end = ip + nfloats;
+
+	while(ip < end)
+	{
+		struct vax_single *const vsp = (struct vax_single *) ip;
+		const struct ieee_single *const isp =
+			 (const struct ieee_single *) (*xpp);
+		unsigned exp = isp->exp_hi << 1 | isp->exp_lo;
+
+		switch(exp) {
+		case 0 :
+			/* ieee subnormal */
+			if(isp->mant_hi == min.ieee.mant_hi
+				&& isp->mant_lo_hi == min.ieee.mant_lo_hi
+				&& isp->mant_lo_lo == min.ieee.mant_lo_lo)
+			{
+				*vsp = min.s;
+			}
+			else
+			{
+				unsigned mantissa = (isp->mant_hi << 16)
+					 | isp->mant_lo_hi << 8
+					 | isp->mant_lo_lo;
+				unsigned tmp = mantissa >> 20;
+				if(tmp >= 4) {
+					vsp->exp = 2;
+				} else if (tmp >= 2) {
+					vsp->exp = 1;
+				} else {
+					*vsp = min.s;
+					break;
+				} /* else */
+				tmp = mantissa - (1 << (20 + vsp->exp ));
+				tmp <<= 3 - vsp->exp;
+				vsp->mantissa2 = tmp;
+				vsp->mantissa1 = (tmp >> 16);
+			}
+			break;
+		case 0xfe :
+		case 0xff :
+			*vsp = max.s;
+			break;
+		default :
+			vsp->exp = exp - IEEE_SNG_BIAS + VAX_SNG_BIAS;
+			vsp->mantissa2 = isp->mant_lo_hi << 8 | isp->mant_lo_lo;
+			vsp->mantissa1 = isp->mant_hi;
+		}
+
+		vsp->sign = isp->sign;
+
+
+		ip++;
+		*xpp = (char *)(*xpp) + X_SIZEOF_FLOAT;
+	}
+	return ENOERR;
+}
+#else
+int
+ncx_getn_float_float(const void **xpp, size_t nelems, float *tp)
+{
+	const char *xp = *xpp;
+	int status = ENOERR;
+
+	for( ; nelems != 0; nelems--, xp += X_SIZEOF_FLOAT, tp++)
+	{
+		const int lstatus = ncx_get_float_float(xp, tp);
+		if(lstatus != ENOERR)
+			status = lstatus;
+	}
+
+	*xpp = (const void *)xp;
+	return status;
+}
+
+#endif
+int
+ncx_getn_float_double(const void **xpp, size_t nelems, double *tp)
+{
+#if _SX && \
+           X_SIZEOF_FLOAT == SIZEOF_FLOAT
+
+ /* basic algorithm is:
+  *   - ensure sane alignment of input data
+  *   - copy (conversion happens automatically) input data
+  *     to output
+  *   - update xpp to point at next unconverted input, and tp to point
+  *     at next location for converted output
+  */
+  long i, j, ni;
+  float tmp[LOOPCNT];        /* in case input is misaligned */
+  float *xp;
+  int nrange = 0;         /* number of range errors */
+  int realign = 0;        /* "do we need to fix input data alignment?" */
+  long cxp = (long) *((char**)xpp);
+
+  realign = (cxp & 7) % SIZEOF_FLOAT;
+  /* sjl: manually stripmine so we can limit amount of
+   * vector work space reserved to LOOPCNT elements. Also
+   * makes vectorisation easy */
+  for (j=0; j<nelems && nrange==0; j+=LOOPCNT) {
+    ni=Min(nelems-j,LOOPCNT);
+    if (realign) {
+      memcpy(tmp, *xpp, ni*SIZEOF_FLOAT);
+      xp = tmp;
+    } else {
+      xp = (float *) *xpp;
+    }
+   /* copy the next block */
+#pragma cdir loopcnt=LOOPCNT
+#pragma cdir shortloop
+    for (i=0; i<ni; i++) {
+      tp[i] = (double) Max( DOUBLE_MIN, Min(DOUBLE_MAX, (double) xp[i]));
+     /* test for range errors (not always needed but do it anyway) */
+      nrange += xp[i] < DOUBLE_MIN || xp[i] > DOUBLE_MAX;
+    }
+   /* update xpp and tp */
+    if (realign) xp = (float *) *xpp;
+    xp += ni;
+    tp += ni;
+    *xpp = (void*)xp;
+  }
+  return nrange == 0 ? ENOERR : NC_ERANGE;
+
+#else   /* not SX */
+	const char *xp = (const char *) *xpp;
+	int status = ENOERR;
+
+	for( ; nelems != 0; nelems--, xp += X_SIZEOF_FLOAT, tp++)
+	{
+		const int lstatus = ncx_get_float_double(xp, tp);
+		if(lstatus != ENOERR)
+			status = lstatus;
+	}
+
+	*xpp = (const void *)xp;
+	return status;
+#  endif
+}
+
+int
+ncx_getn_float_uint(const void **xpp, size_t nelems, uint *tp)
+{
+#if _SX && \
+           X_SIZEOF_FLOAT == SIZEOF_FLOAT
+
+ /* basic algorithm is:
+  *   - ensure sane alignment of input data
+  *   - copy (conversion happens automatically) input data
+  *     to output
+  *   - update xpp to point at next unconverted input, and tp to point
+  *     at next location for converted output
+  */
+  long i, j, ni;
+  float tmp[LOOPCNT];        /* in case input is misaligned */
+  float *xp;
+  int nrange = 0;         /* number of range errors */
+  int realign = 0;        /* "do we need to fix input data alignment?" */
+  long cxp = (long) *((char**)xpp);
+
+  realign = (cxp & 7) % SIZEOF_FLOAT;
+  /* sjl: manually stripmine so we can limit amount of
+   * vector work space reserved to LOOPCNT elements. Also
+   * makes vectorisation easy */
+  for (j=0; j<nelems && nrange==0; j+=LOOPCNT) {
+    ni=Min(nelems-j,LOOPCNT);
+    if (realign) {
+      memcpy(tmp, *xpp, ni*SIZEOF_FLOAT);
+      xp = tmp;
+    } else {
+      xp = (float *) *xpp;
+    }
+   /* copy the next block */
+#pragma cdir loopcnt=LOOPCNT
+#pragma cdir shortloop
+    for (i=0; i<ni; i++) {
+      tp[i] = (uint) Max( UINT_MIN, Min(UINT_MAX, (uint) xp[i]));
+     /* test for range errors (not always needed but do it anyway) */
+      nrange += xp[i] < UINT_MIN || xp[i] > UINT_MAX;
+    }
+   /* update xpp and tp */
+    if (realign) xp = (float *) *xpp;
+    xp += ni;
+    tp += ni;
+    *xpp = (void*)xp;
+  }
+  return nrange == 0 ? ENOERR : NC_ERANGE;
+
+#else   /* not SX */
+	const char *xp = (const char *) *xpp;
+	int status = ENOERR;
+
+	for( ; nelems != 0; nelems--, xp += X_SIZEOF_FLOAT, tp++)
+	{
+		const int lstatus = ncx_get_float_uint(xp, tp);
+		if(lstatus != ENOERR)
+			status = lstatus;
+	}
+
+	*xpp = (const void *)xp;
+	return status;
+#  endif
+}
+
+int
+ncx_getn_float_longlong(const void **xpp, size_t nelems, longlong *tp)
+{
+#if _SX && \
+           X_SIZEOF_FLOAT == SIZEOF_FLOAT
+
+ /* basic algorithm is:
+  *   - ensure sane alignment of input data
+  *   - copy (conversion happens automatically) input data
+  *     to output
+  *   - update xpp to point at next unconverted input, and tp to point
+  *     at next location for converted output
+  */
+  long i, j, ni;
+  float tmp[LOOPCNT];        /* in case input is misaligned */
+  float *xp;
+  int nrange = 0;         /* number of range errors */
+  int realign = 0;        /* "do we need to fix input data alignment?" */
+  long cxp = (long) *((char**)xpp);
+
+  realign = (cxp & 7) % SIZEOF_FLOAT;
+  /* sjl: manually stripmine so we can limit amount of
+   * vector work space reserved to LOOPCNT elements. Also
+   * makes vectorisation easy */
+  for (j=0; j<nelems && nrange==0; j+=LOOPCNT) {
+    ni=Min(nelems-j,LOOPCNT);
+    if (realign) {
+      memcpy(tmp, *xpp, ni*SIZEOF_FLOAT);
+      xp = tmp;
+    } else {
+      xp = (float *) *xpp;
+    }
+   /* copy the next block */
+#pragma cdir loopcnt=LOOPCNT
+#pragma cdir shortloop
+    for (i=0; i<ni; i++) {
+      tp[i] = (longlong) Max( LONGLONG_MIN, Min(LONGLONG_MAX, (longlong) xp[i]));
+     /* test for range errors (not always needed but do it anyway) */
+      nrange += xp[i] < LONGLONG_MIN || xp[i] > LONGLONG_MAX;
+    }
+   /* update xpp and tp */
+    if (realign) xp = (float *) *xpp;
+    xp += ni;
+    tp += ni;
+    *xpp = (void*)xp;
+  }
+  return nrange == 0 ? ENOERR : NC_ERANGE;
+
+#else   /* not SX */
+	const char *xp = (const char *) *xpp;
+	int status = ENOERR;
+
+	for( ; nelems != 0; nelems--, xp += X_SIZEOF_FLOAT, tp++)
+	{
+		const int lstatus = ncx_get_float_longlong(xp, tp);
+		if(lstatus != ENOERR)
+			status = lstatus;
+	}
+
+	*xpp = (const void *)xp;
+	return status;
+#  endif
+}
+
+int
+ncx_getn_float_ulonglong(const void **xpp, size_t nelems, ulonglong *tp)
+{
+#if _SX && \
+           X_SIZEOF_FLOAT == SIZEOF_FLOAT
+
+ /* basic algorithm is:
+  *   - ensure sane alignment of input data
+  *   - copy (conversion happens automatically) input data
+  *     to output
+  *   - update xpp to point at next unconverted input, and tp to point
+  *     at next location for converted output
+  */
+  long i, j, ni;
+  float tmp[LOOPCNT];        /* in case input is misaligned */
+  float *xp;
+  int nrange = 0;         /* number of range errors */
+  int realign = 0;        /* "do we need to fix input data alignment?" */
+  long cxp = (long) *((char**)xpp);
+
+  realign = (cxp & 7) % SIZEOF_FLOAT;
+  /* sjl: manually stripmine so we can limit amount of
+   * vector work space reserved to LOOPCNT elements. Also
+   * makes vectorisation easy */
+  for (j=0; j<nelems && nrange==0; j+=LOOPCNT) {
+    ni=Min(nelems-j,LOOPCNT);
+    if (realign) {
+      memcpy(tmp, *xpp, ni*SIZEOF_FLOAT);
+      xp = tmp;
+    } else {
+      xp = (float *) *xpp;
+    }
+   /* copy the next block */
+#pragma cdir loopcnt=LOOPCNT
+#pragma cdir shortloop
+    for (i=0; i<ni; i++) {
+      tp[i] = (ulonglong) Max( ULONGLONG_MIN, Min(ULONGLONG_MAX, (ulonglong) xp[i]));
+     /* test for range errors (not always needed but do it anyway) */
+      nrange += xp[i] < ULONGLONG_MIN || xp[i] > ULONGLONG_MAX;
+    }
+   /* update xpp and tp */
+    if (realign) xp = (float *) *xpp;
+    xp += ni;
+    tp += ni;
+    *xpp = (void*)xp;
+  }
+  return nrange == 0 ? ENOERR : NC_ERANGE;
+
+#else   /* not SX */
+	const char *xp = (const char *) *xpp;
+	int status = ENOERR;
+
+	for( ; nelems != 0; nelems--, xp += X_SIZEOF_FLOAT, tp++)
+	{
+		const int lstatus = ncx_get_float_ulonglong(xp, tp);
+		if(lstatus != ENOERR)
+			status = lstatus;
+	}
+
+	*xpp = (const void *)xp;
+	return status;
+#  endif
+}
+
+
+int
+ncx_putn_float_schar(void **xpp, size_t nelems, const schar *tp)
+{
+#if _SX && \
+           X_SIZEOF_FLOAT == SIZEOF_FLOAT
+
+ /* basic algorithm is:
+  *   - ensure sane alignment of output data
+  *   - copy (conversion happens automatically) input data
+  *     to output
+  *   - update tp to point at next unconverted input, and xpp to point
+  *     at next location for converted output
+  */
+  long i, j, ni;
+  float tmp[LOOPCNT];        /* in case input is misaligned */
+  float *xp;
+  int nrange = 0;         /* number of range errors */
+  int realign = 0;        /* "do we need to fix input data alignment?" */
+  long cxp = (long) *((char**)xpp);
+
+  realign = (cxp & 7) % SIZEOF_FLOAT;
+  /* sjl: manually stripmine so we can limit amount of
+   * vector work space reserved to LOOPCNT elements. Also
+   * makes vectorisation easy */
+  for (j=0; j<nelems && nrange==0; j+=LOOPCNT) {
+    ni=Min(nelems-j,LOOPCNT);
+    if (realign) {
+      xp = tmp;
+    } else {
+      xp = (float *) *xpp;
+    }
+   /* copy the next block */
+#pragma cdir loopcnt=LOOPCNT
+#pragma cdir shortloop
+    for (i=0; i<ni; i++) {
+      /* the normal case: */
+      xp[i] = (float) Max( X_FLOAT_MIN, Min(X_FLOAT_MAX, (float) tp[i]));
+     /* test for range errors (not always needed but do it anyway) */
+      nrange += tp[i] < X_FLOAT_MIN || tp[i] > X_FLOAT_MAX;
+    }
+   /* copy workspace back if necessary */ 
+    if (realign) {
+      memcpy(*xpp, tmp, ni*X_SIZEOF_FLOAT);
+      xp = (float *) *xpp;
+    }
+   /* update xpp and tp */
+    xp += ni;
+    tp += ni;
+    *xpp = (void*)xp;
+  }
+  return nrange == 0 ? ENOERR : NC_ERANGE;
+
+#else   /* not SX */
+
+	char *xp = (char *) *xpp;
+	int status = ENOERR;
+
+	for( ; nelems != 0; nelems--, xp += X_SIZEOF_FLOAT, tp++)
+	{
+		int lstatus = ncx_put_float_schar(xp, tp);
+		if(lstatus != ENOERR)
+			status = lstatus;
+	}
+
+	*xpp = (void *)xp;
+	return status;
+#endif
+}
+
+int
+ncx_putn_float_uchar(void **xpp, size_t nelems, const uchar *tp)
+{
+#if _SX && \
+           X_SIZEOF_FLOAT == SIZEOF_FLOAT
+
+ /* basic algorithm is:
+  *   - ensure sane alignment of output data
+  *   - copy (conversion happens automatically) input data
+  *     to output
+  *   - update tp to point at next unconverted input, and xpp to point
+  *     at next location for converted output
+  */
+  long i, j, ni;
+  float tmp[LOOPCNT];        /* in case input is misaligned */
+  float *xp;
+  int nrange = 0;         /* number of range errors */
+  int realign = 0;        /* "do we need to fix input data alignment?" */
+  long cxp = (long) *((char**)xpp);
+
+  realign = (cxp & 7) % SIZEOF_FLOAT;
+  /* sjl: manually stripmine so we can limit amount of
+   * vector work space reserved to LOOPCNT elements. Also
+   * makes vectorisation easy */
+  for (j=0; j<nelems && nrange==0; j+=LOOPCNT) {
+    ni=Min(nelems-j,LOOPCNT);
+    if (realign) {
+      xp = tmp;
+    } else {
+      xp = (float *) *xpp;
+    }
+   /* copy the next block */
+#pragma cdir loopcnt=LOOPCNT
+#pragma cdir shortloop
+    for (i=0; i<ni; i++) {
+      /* the normal case: */
+      xp[i] = (float) Max( X_FLOAT_MIN, Min(X_FLOAT_MAX, (float) tp[i]));
+     /* test for range errors (not always needed but do it anyway) */
+      nrange += tp[i] < X_FLOAT_MIN || tp[i] > X_FLOAT_MAX;
+    }
+   /* copy workspace back if necessary */ 
+    if (realign) {
+      memcpy(*xpp, tmp, ni*X_SIZEOF_FLOAT);
+      xp = (float *) *xpp;
+    }
+   /* update xpp and tp */
+    xp += ni;
+    tp += ni;
+    *xpp = (void*)xp;
+  }
+  return nrange == 0 ? ENOERR : NC_ERANGE;
+
+#else   /* not SX */
+
+	char *xp = (char *) *xpp;
+	int status = ENOERR;
+
+	for( ; nelems != 0; nelems--, xp += X_SIZEOF_FLOAT, tp++)
+	{
+		int lstatus = ncx_put_float_uchar(xp, tp);
+		if(lstatus != ENOERR)
+			status = lstatus;
+	}
+
+	*xpp = (void *)xp;
+	return status;
+#endif
+}
+
+int
+ncx_putn_float_short(void **xpp, size_t nelems, const short *tp)
+{
+#if _SX && \
+           X_SIZEOF_FLOAT == SIZEOF_FLOAT
+
+ /* basic algorithm is:
+  *   - ensure sane alignment of output data
+  *   - copy (conversion happens automatically) input data
+  *     to output
+  *   - update tp to point at next unconverted input, and xpp to point
+  *     at next location for converted output
+  */
+  long i, j, ni;
+  float tmp[LOOPCNT];        /* in case input is misaligned */
+  float *xp;
+  int nrange = 0;         /* number of range errors */
+  int realign = 0;        /* "do we need to fix input data alignment?" */
+  long cxp = (long) *((char**)xpp);
+
+  realign = (cxp & 7) % SIZEOF_FLOAT;
+  /* sjl: manually stripmine so we can limit amount of
+   * vector work space reserved to LOOPCNT elements. Also
+   * makes vectorisation easy */
+  for (j=0; j<nelems && nrange==0; j+=LOOPCNT) {
+    ni=Min(nelems-j,LOOPCNT);
+    if (realign) {
+      xp = tmp;
+    } else {
+      xp = (float *) *xpp;
+    }
+   /* copy the next block */
+#pragma cdir loopcnt=LOOPCNT
+#pragma cdir shortloop
+    for (i=0; i<ni; i++) {
+      /* the normal case: */
+      xp[i] = (float) Max( X_FLOAT_MIN, Min(X_FLOAT_MAX, (float) tp[i]));
+     /* test for range errors (not always needed but do it anyway) */
+      nrange += tp[i] < X_FLOAT_MIN || tp[i] > X_FLOAT_MAX;
+    }
+   /* copy workspace back if necessary */ 
+    if (realign) {
+      memcpy(*xpp, tmp, ni*X_SIZEOF_FLOAT);
+      xp = (float *) *xpp;
+    }
+   /* update xpp and tp */
+    xp += ni;
+    tp += ni;
+    *xpp = (void*)xp;
+  }
+  return nrange == 0 ? ENOERR : NC_ERANGE;
+
+#else   /* not SX */
+
+	char *xp = (char *) *xpp;
+	int status = ENOERR;
+
+	for( ; nelems != 0; nelems--, xp += X_SIZEOF_FLOAT, tp++)
+	{
+		int lstatus = ncx_put_float_short(xp, tp);
+		if(lstatus != ENOERR)
+			status = lstatus;
+	}
+
+	*xpp = (void *)xp;
+	return status;
+#endif
+}
+
+int
+ncx_putn_float_int(void **xpp, size_t nelems, const int *tp)
+{
+#if _SX && \
+           X_SIZEOF_FLOAT == SIZEOF_FLOAT
+
+ /* basic algorithm is:
+  *   - ensure sane alignment of output data
+  *   - copy (conversion happens automatically) input data
+  *     to output
+  *   - update tp to point at next unconverted input, and xpp to point
+  *     at next location for converted output
+  */
+  long i, j, ni;
+  float tmp[LOOPCNT];        /* in case input is misaligned */
+  float *xp;
+  int nrange = 0;         /* number of range errors */
+  int realign = 0;        /* "do we need to fix input data alignment?" */
+  long cxp = (long) *((char**)xpp);
+
+  realign = (cxp & 7) % SIZEOF_FLOAT;
+  /* sjl: manually stripmine so we can limit amount of
+   * vector work space reserved to LOOPCNT elements. Also
+   * makes vectorisation easy */
+  for (j=0; j<nelems && nrange==0; j+=LOOPCNT) {
+    ni=Min(nelems-j,LOOPCNT);
+    if (realign) {
+      xp = tmp;
+    } else {
+      xp = (float *) *xpp;
+    }
+   /* copy the next block */
+#pragma cdir loopcnt=LOOPCNT
+#pragma cdir shortloop
+    for (i=0; i<ni; i++) {
+      /* the normal case: */
+      xp[i] = (float) Max( X_FLOAT_MIN, Min(X_FLOAT_MAX, (float) tp[i]));
+     /* test for range errors (not always needed but do it anyway) */
+      nrange += tp[i] < X_FLOAT_MIN || tp[i] > X_FLOAT_MAX;
+    }
+   /* copy workspace back if necessary */ 
+    if (realign) {
+      memcpy(*xpp, tmp, ni*X_SIZEOF_FLOAT);
+      xp = (float *) *xpp;
+    }
+   /* update xpp and tp */
+    xp += ni;
+    tp += ni;
+    *xpp = (void*)xp;
+  }
+  return nrange == 0 ? ENOERR : NC_ERANGE;
+
+#else   /* not SX */
+
+	char *xp = (char *) *xpp;
+	int status = ENOERR;
+
+	for( ; nelems != 0; nelems--, xp += X_SIZEOF_FLOAT, tp++)
+	{
+		int lstatus = ncx_put_float_int(xp, tp);
+		if(lstatus != ENOERR)
+			status = lstatus;
+	}
+
+	*xpp = (void *)xp;
+	return status;
+#endif
+}
+
+#if X_SIZEOF_FLOAT == SIZEOF_FLOAT && !defined(NO_IEEE_FLOAT)
+/* optimized version */
+int
+ncx_putn_float_float(void **xpp, size_t nelems, const float *tp)
+{
+#ifdef WORDS_BIGENDIAN
+	(void) memcpy(*xpp, tp, nelems * X_SIZEOF_FLOAT);
+# else
+	swapn4b(*xpp, tp, nelems);
+# endif
+	*xpp = (void *)((char *)(*xpp) + nelems * X_SIZEOF_FLOAT);
+	return ENOERR;
+}
+#elif vax
+int
+ncx_putn_float_float(void **xpp, size_t nfloats, const float *ip)
+{
+	const float *const end = ip + nfloats;
+
+	while(ip < end)
+	{
+		const struct vax_single *const vsp =
+			 (const struct vax_single *)ip;
+		struct ieee_single *const isp = (struct ieee_single *) (*xpp);
+
+		switch(vsp->exp){
+		case 0 :
+			/* all vax float with zero exponent map to zero */
+			*isp = min.ieee;
+			break;
+		case 2 :
+		case 1 :
+		{
+			/* These will map to subnormals */
+			unsigned mantissa = (vsp->mantissa1 << 16)
+					 | vsp->mantissa2;
+			mantissa >>= 3 - vsp->exp;
+			mantissa += (1 << (20 + vsp->exp));
+			isp->mant_lo_lo = mantissa;
+			isp->mant_lo_hi = mantissa >> 8;
+			isp->mant_hi = mantissa >> 16;
+			isp->exp_lo = 0;
+			isp->exp_hi = 0;
+		}
+			break;
+		case 0xff : /* max.s.exp */
+			if( vsp->mantissa2 == max.s.mantissa2
+				&& vsp->mantissa1 == max.s.mantissa1)
+			{
+				/* map largest vax float to ieee infinity */
+				*isp = max.ieee;
+				break;
+			} /* else, fall thru */
+		default :
+		{
+			unsigned exp = vsp->exp - VAX_SNG_BIAS + IEEE_SNG_BIAS;
+			isp->exp_hi = exp >> 1;
+			isp->exp_lo = exp;
+			isp->mant_lo_lo = vsp->mantissa2;
+			isp->mant_lo_hi = vsp->mantissa2 >> 8;
+			isp->mant_hi = vsp->mantissa1;
+		}
+		}
+
+		isp->sign = vsp->sign;
+
+	
+		ip++;
+		*xpp = (char *)(*xpp) + X_SIZEOF_FLOAT;
+	}
+	return ENOERR;
+}
+#else
+int
+ncx_putn_float_float(void **xpp, size_t nelems, const float *tp)
+{
+	char *xp = *xpp;
+	int status = ENOERR;
+
+	for( ; nelems != 0; nelems--, xp += X_SIZEOF_FLOAT, tp++)
+	{
+		int lstatus = ncx_put_float_float(xp, tp);
+		if(lstatus != ENOERR)
+			status = lstatus;
+	}
+
+	*xpp = (void *)xp;
+	return status;
+}
+
+#endif
+int
+ncx_putn_float_double(void **xpp, size_t nelems, const double *tp)
+{
+#if _SX && \
+           X_SIZEOF_FLOAT == SIZEOF_FLOAT
+
+ /* basic algorithm is:
+  *   - ensure sane alignment of output data
+  *   - copy (conversion happens automatically) input data
+  *     to output
+  *   - update tp to point at next unconverted input, and xpp to point
+  *     at next location for converted output
+  */
+  long i, j, ni;
+  float tmp[LOOPCNT];        /* in case input is misaligned */
+  float *xp;
+  int nrange = 0;         /* number of range errors */
+  int realign = 0;        /* "do we need to fix input data alignment?" */
+  long cxp = (long) *((char**)xpp);
+
+  realign = (cxp & 7) % SIZEOF_FLOAT;
+  /* sjl: manually stripmine so we can limit amount of
+   * vector work space reserved to LOOPCNT elements. Also
+   * makes vectorisation easy */
+  for (j=0; j<nelems && nrange==0; j+=LOOPCNT) {
+    ni=Min(nelems-j,LOOPCNT);
+    if (realign) {
+      xp = tmp;
+    } else {
+      xp = (float *) *xpp;
+    }
+   /* copy the next block */
+#pragma cdir loopcnt=LOOPCNT
+#pragma cdir shortloop
+    for (i=0; i<ni; i++) {
+      /* the normal case: */
+      xp[i] = (float) Max( X_FLOAT_MIN, Min(X_FLOAT_MAX, (float) tp[i]));
+     /* test for range errors (not always needed but do it anyway) */
+      nrange += tp[i] < X_FLOAT_MIN || tp[i] > X_FLOAT_MAX;
+    }
+   /* copy workspace back if necessary */ 
+    if (realign) {
+      memcpy(*xpp, tmp, ni*X_SIZEOF_FLOAT);
+      xp = (float *) *xpp;
+    }
+   /* update xpp and tp */
+    xp += ni;
+    tp += ni;
+    *xpp = (void*)xp;
+  }
+  return nrange == 0 ? ENOERR : NC_ERANGE;
+
+#else   /* not SX */
+
+	char *xp = (char *) *xpp;
+	int status = ENOERR;
+
+	for( ; nelems != 0; nelems--, xp += X_SIZEOF_FLOAT, tp++)
+	{
+		int lstatus = ncx_put_float_double(xp, tp);
+		if(lstatus != ENOERR)
+			status = lstatus;
+	}
+
+	*xpp = (void *)xp;
+	return status;
+#endif
+}
+
+int
+ncx_putn_float_uint(void **xpp, size_t nelems, const uint *tp)
+{
+#if _SX && \
+           X_SIZEOF_FLOAT == SIZEOF_FLOAT
+
+ /* basic algorithm is:
+  *   - ensure sane alignment of output data
+  *   - copy (conversion happens automatically) input data
+  *     to output
+  *   - update tp to point at next unconverted input, and xpp to point
+  *     at next location for converted output
+  */
+  long i, j, ni;
+  float tmp[LOOPCNT];        /* in case input is misaligned */
+  float *xp;
+  int nrange = 0;         /* number of range errors */
+  int realign = 0;        /* "do we need to fix input data alignment?" */
+  long cxp = (long) *((char**)xpp);
+
+  realign = (cxp & 7) % SIZEOF_FLOAT;
+  /* sjl: manually stripmine so we can limit amount of
+   * vector work space reserved to LOOPCNT elements. Also
+   * makes vectorisation easy */
+  for (j=0; j<nelems && nrange==0; j+=LOOPCNT) {
+    ni=Min(nelems-j,LOOPCNT);
+    if (realign) {
+      xp = tmp;
+    } else {
+      xp = (float *) *xpp;
+    }
+   /* copy the next block */
+#pragma cdir loopcnt=LOOPCNT
+#pragma cdir shortloop
+    for (i=0; i<ni; i++) {
+      /* the normal case: */
+      xp[i] = (float) Max( X_FLOAT_MIN, Min(X_FLOAT_MAX, (float) tp[i]));
+     /* test for range errors (not always needed but do it anyway) */
+      nrange += tp[i] < X_FLOAT_MIN || tp[i] > X_FLOAT_MAX;
+    }
+   /* copy workspace back if necessary */ 
+    if (realign) {
+      memcpy(*xpp, tmp, ni*X_SIZEOF_FLOAT);
+      xp = (float *) *xpp;
+    }
+   /* update xpp and tp */
+    xp += ni;
+    tp += ni;
+    *xpp = (void*)xp;
+  }
+  return nrange == 0 ? ENOERR : NC_ERANGE;
+
+#else   /* not SX */
+
+	char *xp = (char *) *xpp;
+	int status = ENOERR;
+
+	for( ; nelems != 0; nelems--, xp += X_SIZEOF_FLOAT, tp++)
+	{
+		int lstatus = ncx_put_float_uint(xp, tp);
+		if(lstatus != ENOERR)
+			status = lstatus;
+	}
+
+	*xpp = (void *)xp;
+	return status;
+#endif
+}
+
+int
+ncx_putn_float_longlong(void **xpp, size_t nelems, const longlong *tp)
+{
+#if _SX && \
+           X_SIZEOF_FLOAT == SIZEOF_FLOAT
+
+ /* basic algorithm is:
+  *   - ensure sane alignment of output data
+  *   - copy (conversion happens automatically) input data
+  *     to output
+  *   - update tp to point at next unconverted input, and xpp to point
+  *     at next location for converted output
+  */
+  long i, j, ni;
+  float tmp[LOOPCNT];        /* in case input is misaligned */
+  float *xp;
+  int nrange = 0;         /* number of range errors */
+  int realign = 0;        /* "do we need to fix input data alignment?" */
+  long cxp = (long) *((char**)xpp);
+
+  realign = (cxp & 7) % SIZEOF_FLOAT;
+  /* sjl: manually stripmine so we can limit amount of
+   * vector work space reserved to LOOPCNT elements. Also
+   * makes vectorisation easy */
+  for (j=0; j<nelems && nrange==0; j+=LOOPCNT) {
+    ni=Min(nelems-j,LOOPCNT);
+    if (realign) {
+      xp = tmp;
+    } else {
+      xp = (float *) *xpp;
+    }
+   /* copy the next block */
+#pragma cdir loopcnt=LOOPCNT
+#pragma cdir shortloop
+    for (i=0; i<ni; i++) {
+      /* the normal case: */
+      xp[i] = (float) Max( X_FLOAT_MIN, Min(X_FLOAT_MAX, (float) tp[i]));
+     /* test for range errors (not always needed but do it anyway) */
+      nrange += tp[i] < X_FLOAT_MIN || tp[i] > X_FLOAT_MAX;
+    }
+   /* copy workspace back if necessary */ 
+    if (realign) {
+      memcpy(*xpp, tmp, ni*X_SIZEOF_FLOAT);
+      xp = (float *) *xpp;
+    }
+   /* update xpp and tp */
+    xp += ni;
+    tp += ni;
+    *xpp = (void*)xp;
+  }
+  return nrange == 0 ? ENOERR : NC_ERANGE;
+
+#else   /* not SX */
+
+	char *xp = (char *) *xpp;
+	int status = ENOERR;
+
+	for( ; nelems != 0; nelems--, xp += X_SIZEOF_FLOAT, tp++)
+	{
+		int lstatus = ncx_put_float_longlong(xp, tp);
+		if(lstatus != ENOERR)
+			status = lstatus;
+	}
+
+	*xpp = (void *)xp;
+	return status;
+#endif
+}
+
+int
+ncx_putn_float_ulonglong(void **xpp, size_t nelems, const ulonglong *tp)
+{
+#if _SX && \
+           X_SIZEOF_FLOAT == SIZEOF_FLOAT
+
+ /* basic algorithm is:
+  *   - ensure sane alignment of output data
+  *   - copy (conversion happens automatically) input data
+  *     to output
+  *   - update tp to point at next unconverted input, and xpp to point
+  *     at next location for converted output
+  */
+  long i, j, ni;
+  float tmp[LOOPCNT];        /* in case input is misaligned */
+  float *xp;
+  int nrange = 0;         /* number of range errors */
+  int realign = 0;        /* "do we need to fix input data alignment?" */
+  long cxp = (long) *((char**)xpp);
+
+  realign = (cxp & 7) % SIZEOF_FLOAT;
+  /* sjl: manually stripmine so we can limit amount of
+   * vector work space reserved to LOOPCNT elements. Also
+   * makes vectorisation easy */
+  for (j=0; j<nelems && nrange==0; j+=LOOPCNT) {
+    ni=Min(nelems-j,LOOPCNT);
+    if (realign) {
+      xp = tmp;
+    } else {
+      xp = (float *) *xpp;
+    }
+   /* copy the next block */
+#pragma cdir loopcnt=LOOPCNT
+#pragma cdir shortloop
+    for (i=0; i<ni; i++) {
+      /* the normal case: */
+      xp[i] = (float) Max( X_FLOAT_MIN, Min(X_FLOAT_MAX, (float) tp[i]));
+     /* test for range errors (not always needed but do it anyway) */
+      nrange += tp[i] < X_FLOAT_MIN || tp[i] > X_FLOAT_MAX;
+    }
+   /* copy workspace back if necessary */ 
+    if (realign) {
+      memcpy(*xpp, tmp, ni*X_SIZEOF_FLOAT);
+      xp = (float *) *xpp;
+    }
+   /* update xpp and tp */
+    xp += ni;
+    tp += ni;
+    *xpp = (void*)xp;
+  }
+  return nrange == 0 ? ENOERR : NC_ERANGE;
+
+#else   /* not SX */
+
+	char *xp = (char *) *xpp;
+	int status = ENOERR;
+
+	for( ; nelems != 0; nelems--, xp += X_SIZEOF_FLOAT, tp++)
+	{
+		int lstatus = ncx_put_float_ulonglong(xp, tp);
+		if(lstatus != ENOERR)
+			status = lstatus;
+	}
+
+	*xpp = (void *)xp;
+	return status;
+#endif
+}
+
+
+/* double */
+
+int
+ncx_getn_double_schar(const void **xpp, size_t nelems, schar *tp)
+{
+#if _SX && \
+           X_SIZEOF_DOUBLE == SIZEOF_DOUBLE
+
+ /* basic algorithm is:
+  *   - ensure sane alignment of input data
+  *   - copy (conversion happens automatically) input data
+  *     to output
+  *   - update xpp to point at next unconverted input, and tp to point
+  *     at next location for converted output
+  */
+  long i, j, ni;
+  double tmp[LOOPCNT];        /* in case input is misaligned */
+  double *xp;
+  int nrange = 0;         /* number of range errors */
+  int realign = 0;        /* "do we need to fix input data alignment?" */
+  long cxp = (long) *((char**)xpp);
+
+  realign = (cxp & 7) % SIZEOF_DOUBLE;
+  /* sjl: manually stripmine so we can limit amount of
+   * vector work space reserved to LOOPCNT elements. Also
+   * makes vectorisation easy */
+  for (j=0; j<nelems && nrange==0; j+=LOOPCNT) {
+    ni=Min(nelems-j,LOOPCNT);
+    if (realign) {
+      memcpy(tmp, *xpp, ni*SIZEOF_DOUBLE);
+      xp = tmp;
+    } else {
+      xp = (double *) *xpp;
+    }
+   /* copy the next block */
+#pragma cdir loopcnt=LOOPCNT
+#pragma cdir shortloop
+    for (i=0; i<ni; i++) {
+      tp[i] = (schar) Max( SCHAR_MIN, Min(SCHAR_MAX, (schar) xp[i]));
+     /* test for range errors (not always needed but do it anyway) */
+      nrange += xp[i] < SCHAR_MIN || xp[i] > SCHAR_MAX;
+    }
+   /* update xpp and tp */
+    if (realign) xp = (double *) *xpp;
+    xp += ni;
+    tp += ni;
+    *xpp = (void*)xp;
+  }
+  return nrange == 0 ? ENOERR : NC_ERANGE;
+
+#else   /* not SX */
+	const char *xp = (const char *) *xpp;
+	int status = ENOERR;
+
+	for( ; nelems != 0; nelems--, xp += X_SIZEOF_DOUBLE, tp++)
+	{
+		const int lstatus = ncx_get_double_schar(xp, tp);
+		if(lstatus != ENOERR)
+			status = lstatus;
+	}
+
+	*xpp = (const void *)xp;
+	return status;
+#  endif
+}
+
+int
+ncx_getn_double_uchar(const void **xpp, size_t nelems, uchar *tp)
+{
+#if _SX && \
+           X_SIZEOF_DOUBLE == SIZEOF_DOUBLE
+
+ /* basic algorithm is:
+  *   - ensure sane alignment of input data
+  *   - copy (conversion happens automatically) input data
+  *     to output
+  *   - update xpp to point at next unconverted input, and tp to point
+  *     at next location for converted output
+  */
+  long i, j, ni;
+  double tmp[LOOPCNT];        /* in case input is misaligned */
+  double *xp;
+  int nrange = 0;         /* number of range errors */
+  int realign = 0;        /* "do we need to fix input data alignment?" */
+  long cxp = (long) *((char**)xpp);
+
+  realign = (cxp & 7) % SIZEOF_DOUBLE;
+  /* sjl: manually stripmine so we can limit amount of
+   * vector work space reserved to LOOPCNT elements. Also
+   * makes vectorisation easy */
+  for (j=0; j<nelems && nrange==0; j+=LOOPCNT) {
+    ni=Min(nelems-j,LOOPCNT);
+    if (realign) {
+      memcpy(tmp, *xpp, ni*SIZEOF_DOUBLE);
+      xp = tmp;
+    } else {
+      xp = (double *) *xpp;
+    }
+   /* copy the next block */
+#pragma cdir loopcnt=LOOPCNT
+#pragma cdir shortloop
+    for (i=0; i<ni; i++) {
+      tp[i] = (uchar) Max( UCHAR_MIN, Min(UCHAR_MAX, (uchar) xp[i]));
+     /* test for range errors (not always needed but do it anyway) */
+      nrange += xp[i] < UCHAR_MIN || xp[i] > UCHAR_MAX;
+    }
+   /* update xpp and tp */
+    if (realign) xp = (double *) *xpp;
+    xp += ni;
+    tp += ni;
+    *xpp = (void*)xp;
+  }
+  return nrange == 0 ? ENOERR : NC_ERANGE;
+
+#else   /* not SX */
+	const char *xp = (const char *) *xpp;
+	int status = ENOERR;
+
+	for( ; nelems != 0; nelems--, xp += X_SIZEOF_DOUBLE, tp++)
+	{
+		const int lstatus = ncx_get_double_uchar(xp, tp);
+		if(lstatus != ENOERR)
+			status = lstatus;
+	}
+
+	*xpp = (const void *)xp;
+	return status;
+#  endif
+}
+
+int
+ncx_getn_double_short(const void **xpp, size_t nelems, short *tp)
+{
+#if _SX && \
+           X_SIZEOF_DOUBLE == SIZEOF_DOUBLE
+
+ /* basic algorithm is:
+  *   - ensure sane alignment of input data
+  *   - copy (conversion happens automatically) input data
+  *     to output
+  *   - update xpp to point at next unconverted input, and tp to point
+  *     at next location for converted output
+  */
+  long i, j, ni;
+  double tmp[LOOPCNT];        /* in case input is misaligned */
+  double *xp;
+  int nrange = 0;         /* number of range errors */
+  int realign = 0;        /* "do we need to fix input data alignment?" */
+  long cxp = (long) *((char**)xpp);
+
+  realign = (cxp & 7) % SIZEOF_DOUBLE;
+  /* sjl: manually stripmine so we can limit amount of
+   * vector work space reserved to LOOPCNT elements. Also
+   * makes vectorisation easy */
+  for (j=0; j<nelems && nrange==0; j+=LOOPCNT) {
+    ni=Min(nelems-j,LOOPCNT);
+    if (realign) {
+      memcpy(tmp, *xpp, ni*SIZEOF_DOUBLE);
+      xp = tmp;
+    } else {
+      xp = (double *) *xpp;
+    }
+   /* copy the next block */
+#pragma cdir loopcnt=LOOPCNT
+#pragma cdir shortloop
+    for (i=0; i<ni; i++) {
+      tp[i] = (short) Max( SHORT_MIN, Min(SHORT_MAX, (short) xp[i]));
+     /* test for range errors (not always needed but do it anyway) */
+      nrange += xp[i] < SHORT_MIN || xp[i] > SHORT_MAX;
+    }
+   /* update xpp and tp */
+    if (realign) xp = (double *) *xpp;
+    xp += ni;
+    tp += ni;
+    *xpp = (void*)xp;
+  }
+  return nrange == 0 ? ENOERR : NC_ERANGE;
+
+#else   /* not SX */
+	const char *xp = (const char *) *xpp;
+	int status = ENOERR;
+
+	for( ; nelems != 0; nelems--, xp += X_SIZEOF_DOUBLE, tp++)
+	{
+		const int lstatus = ncx_get_double_short(xp, tp);
+		if(lstatus != ENOERR)
+			status = lstatus;
+	}
+
+	*xpp = (const void *)xp;
+	return status;
+#  endif
+}
+
+int
+ncx_getn_double_int(const void **xpp, size_t nelems, int *tp)
+{
+#if _SX && \
+           X_SIZEOF_DOUBLE == SIZEOF_DOUBLE
+
+ /* basic algorithm is:
+  *   - ensure sane alignment of input data
+  *   - copy (conversion happens automatically) input data
+  *     to output
+  *   - update xpp to point at next unconverted input, and tp to point
+  *     at next location for converted output
+  */
+  long i, j, ni;
+  double tmp[LOOPCNT];        /* in case input is misaligned */
+  double *xp;
+  int nrange = 0;         /* number of range errors */
+  int realign = 0;        /* "do we need to fix input data alignment?" */
+  long cxp = (long) *((char**)xpp);
+
+  realign = (cxp & 7) % SIZEOF_DOUBLE;
+  /* sjl: manually stripmine so we can limit amount of
+   * vector work space reserved to LOOPCNT elements. Also
+   * makes vectorisation easy */
+  for (j=0; j<nelems && nrange==0; j+=LOOPCNT) {
+    ni=Min(nelems-j,LOOPCNT);
+    if (realign) {
+      memcpy(tmp, *xpp, ni*SIZEOF_DOUBLE);
+      xp = tmp;
+    } else {
+      xp = (double *) *xpp;
+    }
+   /* copy the next block */
+#pragma cdir loopcnt=LOOPCNT
+#pragma cdir shortloop
+    for (i=0; i<ni; i++) {
+      tp[i] = (int) Max( INT_MIN, Min(INT_MAX, (int) xp[i]));
+     /* test for range errors (not always needed but do it anyway) */
+      nrange += xp[i] < INT_MIN || xp[i] > INT_MAX;
+    }
+   /* update xpp and tp */
+    if (realign) xp = (double *) *xpp;
+    xp += ni;
+    tp += ni;
+    *xpp = (void*)xp;
+  }
+  return nrange == 0 ? ENOERR : NC_ERANGE;
+
+#else   /* not SX */
+	const char *xp = (const char *) *xpp;
+	int status = ENOERR;
+
+	for( ; nelems != 0; nelems--, xp += X_SIZEOF_DOUBLE, tp++)
+	{
+		const int lstatus = ncx_get_double_int(xp, tp);
+		if(lstatus != ENOERR)
+			status = lstatus;
+	}
+
+	*xpp = (const void *)xp;
+	return status;
+#  endif
+}
+
+int
+ncx_getn_double_float(const void **xpp, size_t nelems, float *tp)
+{
+#if _SX && \
+           X_SIZEOF_DOUBLE == SIZEOF_DOUBLE
+
+ /* basic algorithm is:
+  *   - ensure sane alignment of input data
+  *   - copy (conversion happens automatically) input data
+  *     to output
+  *   - update xpp to point at next unconverted input, and tp to point
+  *     at next location for converted output
+  */
+  long i, j, ni;
+  double tmp[LOOPCNT];        /* in case input is misaligned */
+  double *xp;
+  int nrange = 0;         /* number of range errors */
+  int realign = 0;        /* "do we need to fix input data alignment?" */
+  long cxp = (long) *((char**)xpp);
+
+  realign = (cxp & 7) % SIZEOF_DOUBLE;
+  /* sjl: manually stripmine so we can limit amount of
+   * vector work space reserved to LOOPCNT elements. Also
+   * makes vectorisation easy */
+  for (j=0; j<nelems && nrange==0; j+=LOOPCNT) {
+    ni=Min(nelems-j,LOOPCNT);
+    if (realign) {
+      memcpy(tmp, *xpp, ni*SIZEOF_DOUBLE);
+      xp = tmp;
+    } else {
+      xp = (double *) *xpp;
+    }
+   /* copy the next block */
+#pragma cdir loopcnt=LOOPCNT
+#pragma cdir shortloop
+    for (i=0; i<ni; i++) {
+      tp[i] = (float) Max( FLOAT_MIN, Min(FLOAT_MAX, (float) xp[i]));
+     /* test for range errors (not always needed but do it anyway) */
+      nrange += xp[i] < FLOAT_MIN || xp[i] > FLOAT_MAX;
+    }
+   /* update xpp and tp */
+    if (realign) xp = (double *) *xpp;
+    xp += ni;
+    tp += ni;
+    *xpp = (void*)xp;
+  }
+  return nrange == 0 ? ENOERR : NC_ERANGE;
+
+#else   /* not SX */
+	const char *xp = (const char *) *xpp;
+	int status = ENOERR;
+
+	for( ; nelems != 0; nelems--, xp += X_SIZEOF_DOUBLE, tp++)
+	{
+		const int lstatus = ncx_get_double_float(xp, tp);
+		if(lstatus != ENOERR)
+			status = lstatus;
+	}
+
+	*xpp = (const void *)xp;
+	return status;
+#  endif
+}
+
+int
+ncx_getn_double_uint(const void **xpp, size_t nelems, uint *tp)
+{
+#if _SX && \
+           X_SIZEOF_DOUBLE == SIZEOF_DOUBLE
+
+ /* basic algorithm is:
+  *   - ensure sane alignment of input data
+  *   - copy (conversion happens automatically) input data
+  *     to output
+  *   - update xpp to point at next unconverted input, and tp to point
+  *     at next location for converted output
+  */
+  long i, j, ni;
+  double tmp[LOOPCNT];        /* in case input is misaligned */
+  double *xp;
+  int nrange = 0;         /* number of range errors */
+  int realign = 0;        /* "do we need to fix input data alignment?" */
+  long cxp = (long) *((char**)xpp);
+
+  realign = (cxp & 7) % SIZEOF_DOUBLE;
+  /* sjl: manually stripmine so we can limit amount of
+   * vector work space reserved to LOOPCNT elements. Also
+   * makes vectorisation easy */
+  for (j=0; j<nelems && nrange==0; j+=LOOPCNT) {
+    ni=Min(nelems-j,LOOPCNT);
+    if (realign) {
+      memcpy(tmp, *xpp, ni*SIZEOF_DOUBLE);
+      xp = tmp;
+    } else {
+      xp = (double *) *xpp;
+    }
+   /* copy the next block */
+#pragma cdir loopcnt=LOOPCNT
+#pragma cdir shortloop
+    for (i=0; i<ni; i++) {
+      tp[i] = (uint) Max( UINT_MIN, Min(UINT_MAX, (uint) xp[i]));
+     /* test for range errors (not always needed but do it anyway) */
+      nrange += xp[i] < UINT_MIN || xp[i] > UINT_MAX;
+    }
+   /* update xpp and tp */
+    if (realign) xp = (double *) *xpp;
+    xp += ni;
+    tp += ni;
+    *xpp = (void*)xp;
+  }
+  return nrange == 0 ? ENOERR : NC_ERANGE;
+
+#else   /* not SX */
+	const char *xp = (const char *) *xpp;
+	int status = ENOERR;
+
+	for( ; nelems != 0; nelems--, xp += X_SIZEOF_DOUBLE, tp++)
+	{
+		const int lstatus = ncx_get_double_uint(xp, tp);
+		if(lstatus != ENOERR)
+			status = lstatus;
+	}
+
+	*xpp = (const void *)xp;
+	return status;
+#  endif
+}
+
+int
+ncx_getn_double_longlong(const void **xpp, size_t nelems, longlong *tp)
+{
+#if _SX && \
+           X_SIZEOF_DOUBLE == SIZEOF_DOUBLE
+
+ /* basic algorithm is:
+  *   - ensure sane alignment of input data
+  *   - copy (conversion happens automatically) input data
+  *     to output
+  *   - update xpp to point at next unconverted input, and tp to point
+  *     at next location for converted output
+  */
+  long i, j, ni;
+  double tmp[LOOPCNT];        /* in case input is misaligned */
+  double *xp;
+  int nrange = 0;         /* number of range errors */
+  int realign = 0;        /* "do we need to fix input data alignment?" */
+  long cxp = (long) *((char**)xpp);
+
+  realign = (cxp & 7) % SIZEOF_DOUBLE;
+  /* sjl: manually stripmine so we can limit amount of
+   * vector work space reserved to LOOPCNT elements. Also
+   * makes vectorisation easy */
+  for (j=0; j<nelems && nrange==0; j+=LOOPCNT) {
+    ni=Min(nelems-j,LOOPCNT);
+    if (realign) {
+      memcpy(tmp, *xpp, ni*SIZEOF_DOUBLE);
+      xp = tmp;
+    } else {
+      xp = (double *) *xpp;
+    }
+   /* copy the next block */
+#pragma cdir loopcnt=LOOPCNT
+#pragma cdir shortloop
+    for (i=0; i<ni; i++) {
+      tp[i] = (longlong) Max( LONGLONG_MIN, Min(LONGLONG_MAX, (longlong) xp[i]));
+     /* test for range errors (not always needed but do it anyway) */
+      nrange += xp[i] < LONGLONG_MIN || xp[i] > LONGLONG_MAX;
+    }
+   /* update xpp and tp */
+    if (realign) xp = (double *) *xpp;
+    xp += ni;
+    tp += ni;
+    *xpp = (void*)xp;
+  }
+  return nrange == 0 ? ENOERR : NC_ERANGE;
+
+#else   /* not SX */
+	const char *xp = (const char *) *xpp;
+	int status = ENOERR;
+
+	for( ; nelems != 0; nelems--, xp += X_SIZEOF_DOUBLE, tp++)
+	{
+		const int lstatus = ncx_get_double_longlong(xp, tp);
+		if(lstatus != ENOERR)
+			status = lstatus;
+	}
+
+	*xpp = (const void *)xp;
+	return status;
+#  endif
+}
+
+int
+ncx_getn_double_ulonglong(const void **xpp, size_t nelems, ulonglong *tp)
+{
+#if _SX && \
+           X_SIZEOF_DOUBLE == SIZEOF_DOUBLE
+
+ /* basic algorithm is:
+  *   - ensure sane alignment of input data
+  *   - copy (conversion happens automatically) input data
+  *     to output
+  *   - update xpp to point at next unconverted input, and tp to point
+  *     at next location for converted output
+  */
+  long i, j, ni;
+  double tmp[LOOPCNT];        /* in case input is misaligned */
+  double *xp;
+  int nrange = 0;         /* number of range errors */
+  int realign = 0;        /* "do we need to fix input data alignment?" */
+  long cxp = (long) *((char**)xpp);
+
+  realign = (cxp & 7) % SIZEOF_DOUBLE;
+  /* sjl: manually stripmine so we can limit amount of
+   * vector work space reserved to LOOPCNT elements. Also
+   * makes vectorisation easy */
+  for (j=0; j<nelems && nrange==0; j+=LOOPCNT) {
+    ni=Min(nelems-j,LOOPCNT);
+    if (realign) {
+      memcpy(tmp, *xpp, ni*SIZEOF_DOUBLE);
+      xp = tmp;
+    } else {
+      xp = (double *) *xpp;
+    }
+   /* copy the next block */
+#pragma cdir loopcnt=LOOPCNT
+#pragma cdir shortloop
+    for (i=0; i<ni; i++) {
+      tp[i] = (ulonglong) Max( ULONGLONG_MIN, Min(ULONGLONG_MAX, (ulonglong) xp[i]));
+     /* test for range errors (not always needed but do it anyway) */
+      nrange += xp[i] < ULONGLONG_MIN || xp[i] > ULONGLONG_MAX;
+    }
+   /* update xpp and tp */
+    if (realign) xp = (double *) *xpp;
+    xp += ni;
+    tp += ni;
+    *xpp = (void*)xp;
+  }
+  return nrange == 0 ? ENOERR : NC_ERANGE;
+
+#else   /* not SX */
+	const char *xp = (const char *) *xpp;
+	int status = ENOERR;
+
+	for( ; nelems != 0; nelems--, xp += X_SIZEOF_DOUBLE, tp++)
+	{
+		const int lstatus = ncx_get_double_ulonglong(xp, tp);
+		if(lstatus != ENOERR)
+			status = lstatus;
+	}
+
+	*xpp = (const void *)xp;
+	return status;
+#  endif
+}
+
+#if X_SIZEOF_DOUBLE == SIZEOF_DOUBLE && !defined(NO_IEEE_FLOAT)
+/* optimized version */
+int
+ncx_getn_double_double(const void **xpp, size_t nelems, double *tp)
+{
+#ifdef WORDS_BIGENDIAN
+	(void) memcpy(tp, *xpp, nelems * sizeof(double));
+# else
+	swapn8b(tp, *xpp, nelems);
+# endif
+	*xpp = (const void *)((const char *)(*xpp) + nelems * X_SIZEOF_DOUBLE);
+	return ENOERR;
+}
+#elif vax
+int
+ncx_getn_double_double(const void **xpp, size_t ndoubles, double *ip)
+{
+	double *const end = ip + ndoubles;
+
+	while(ip < end)
+	{
+	struct vax_double *const vdp =
+			 (struct vax_double *)ip;
+	const struct ieee_double *const idp =
+			 (const struct ieee_double *) (*xpp);
+	{
+		const struct dbl_limits *lim;
+		int ii;
+		for (ii = 0, lim = dbl_limits;
+			ii < sizeof(dbl_limits)/sizeof(struct dbl_limits);
+			ii++, lim++)
+		{
+			if ((idp->mant_lo == lim->ieee.mant_lo)
+				&& (idp->mant_4 == lim->ieee.mant_4)
+				&& (idp->mant_5 == lim->ieee.mant_5)
+				&& (idp->mant_6 == lim->ieee.mant_6)
+				&& (idp->exp_lo == lim->ieee.exp_lo)
+				&& (idp->exp_hi == lim->ieee.exp_hi)
+				)
+			{
+				*vdp = lim->d;
+				goto doneit;
+			}
+		}
+	}
+	{
+		unsigned exp = idp->exp_hi << 4 | idp->exp_lo;
+		vdp->exp = exp - IEEE_DBL_BIAS + VAX_DBL_BIAS;
+	}
+	{
+		unsigned mant_hi = ((idp->mant_6 << 16)
+				 | (idp->mant_5 << 8)
+				 | idp->mant_4);
+		unsigned mant_lo = SWAP4(idp->mant_lo);
+		vdp->mantissa1 = (mant_hi >> 13);
+		vdp->mantissa2 = ((mant_hi & MASK(13)) << 3)
+				| (mant_lo >> 29);
+		vdp->mantissa3 = (mant_lo >> 13);
+		vdp->mantissa4 = (mant_lo << 3);
+	}
+	doneit:
+		vdp->sign = idp->sign;
+
+		ip++;
+		*xpp = (char *)(*xpp) + X_SIZEOF_DOUBLE;
+	}
+	return ENOERR;
+}
+	/* vax */
+#else
+int
+ncx_getn_double_double(const void **xpp, size_t nelems, double *tp)
+{
+	const char *xp = *xpp;
+	int status = ENOERR;
+
+	for( ; nelems != 0; nelems--, xp += X_SIZEOF_DOUBLE, tp++)
+	{
+		const int lstatus = ncx_get_double_double(xp, tp);
+		if(lstatus != ENOERR)
+			status = lstatus;
+	}
+
+	*xpp = (const void *)xp;
+	return status;
+}
+
+#endif
+
+int
+ncx_putn_double_schar(void **xpp, size_t nelems, const schar *tp)
+{
+#if _SX && \
+           X_SIZEOF_DOUBLE == SIZEOF_DOUBLE
+
+ /* basic algorithm is:
+  *   - ensure sane alignment of output data
+  *   - copy (conversion happens automatically) input data
+  *     to output
+  *   - update tp to point at next unconverted input, and xpp to point
+  *     at next location for converted output
+  */
+  long i, j, ni;
+  double tmp[LOOPCNT];        /* in case input is misaligned */
+  double *xp;
+  int nrange = 0;         /* number of range errors */
+  int realign = 0;        /* "do we need to fix input data alignment?" */
+  long cxp = (long) *((char**)xpp);
+
+  realign = (cxp & 7) % SIZEOF_DOUBLE;
+  /* sjl: manually stripmine so we can limit amount of
+   * vector work space reserved to LOOPCNT elements. Also
+   * makes vectorisation easy */
+  for (j=0; j<nelems && nrange==0; j+=LOOPCNT) {
+    ni=Min(nelems-j,LOOPCNT);
+    if (realign) {
+      xp = tmp;
+    } else {
+      xp = (double *) *xpp;
+    }
+   /* copy the next block */
+#pragma cdir loopcnt=LOOPCNT
+#pragma cdir shortloop
+    for (i=0; i<ni; i++) {
+      /* the normal case: */
+      xp[i] = (double) Max( X_DOUBLE_MIN, Min(X_DOUBLE_MAX, (double) tp[i]));
+     /* test for range errors (not always needed but do it anyway) */
+      nrange += tp[i] < X_DOUBLE_MIN || tp[i] > X_DOUBLE_MAX;
+    }
+   /* copy workspace back if necessary */ 
+    if (realign) {
+      memcpy(*xpp, tmp, ni*X_SIZEOF_DOUBLE);
+      xp = (double *) *xpp;
+    }
+   /* update xpp and tp */
+    xp += ni;
+    tp += ni;
+    *xpp = (void*)xp;
+  }
+  return nrange == 0 ? ENOERR : NC_ERANGE;
+
+#else   /* not SX */
+
+	char *xp = (char *) *xpp;
+	int status = ENOERR;
+
+	for( ; nelems != 0; nelems--, xp += X_SIZEOF_DOUBLE, tp++)
+	{
+		int lstatus = ncx_put_double_schar(xp, tp);
+		if(lstatus != ENOERR)
+			status = lstatus;
+	}
+
+	*xpp = (void *)xp;
+	return status;
+#endif
+}
+
+int
+ncx_putn_double_uchar(void **xpp, size_t nelems, const uchar *tp)
+{
+#if _SX && \
+           X_SIZEOF_DOUBLE == SIZEOF_DOUBLE
+
+ /* basic algorithm is:
+  *   - ensure sane alignment of output data
+  *   - copy (conversion happens automatically) input data
+  *     to output
+  *   - update tp to point at next unconverted input, and xpp to point
+  *     at next location for converted output
+  */
+  long i, j, ni;
+  double tmp[LOOPCNT];        /* in case input is misaligned */
+  double *xp;
+  int nrange = 0;         /* number of range errors */
+  int realign = 0;        /* "do we need to fix input data alignment?" */
+  long cxp = (long) *((char**)xpp);
+
+  realign = (cxp & 7) % SIZEOF_DOUBLE;
+  /* sjl: manually stripmine so we can limit amount of
+   * vector work space reserved to LOOPCNT elements. Also
+   * makes vectorisation easy */
+  for (j=0; j<nelems && nrange==0; j+=LOOPCNT) {
+    ni=Min(nelems-j,LOOPCNT);
+    if (realign) {
+      xp = tmp;
+    } else {
+      xp = (double *) *xpp;
+    }
+   /* copy the next block */
+#pragma cdir loopcnt=LOOPCNT
+#pragma cdir shortloop
+    for (i=0; i<ni; i++) {
+      /* the normal case: */
+      xp[i] = (double) Max( X_DOUBLE_MIN, Min(X_DOUBLE_MAX, (double) tp[i]));
+     /* test for range errors (not always needed but do it anyway) */
+      nrange += tp[i] < X_DOUBLE_MIN || tp[i] > X_DOUBLE_MAX;
+    }
+   /* copy workspace back if necessary */ 
+    if (realign) {
+      memcpy(*xpp, tmp, ni*X_SIZEOF_DOUBLE);
+      xp = (double *) *xpp;
+    }
+   /* update xpp and tp */
+    xp += ni;
+    tp += ni;
+    *xpp = (void*)xp;
+  }
+  return nrange == 0 ? ENOERR : NC_ERANGE;
+
+#else   /* not SX */
+
+	char *xp = (char *) *xpp;
+	int status = ENOERR;
+
+	for( ; nelems != 0; nelems--, xp += X_SIZEOF_DOUBLE, tp++)
+	{
+		int lstatus = ncx_put_double_uchar(xp, tp);
+		if(lstatus != ENOERR)
+			status = lstatus;
+	}
+
+	*xpp = (void *)xp;
+	return status;
+#endif
+}
+
+int
+ncx_putn_double_short(void **xpp, size_t nelems, const short *tp)
+{
+#if _SX && \
+           X_SIZEOF_DOUBLE == SIZEOF_DOUBLE
+
+ /* basic algorithm is:
+  *   - ensure sane alignment of output data
+  *   - copy (conversion happens automatically) input data
+  *     to output
+  *   - update tp to point at next unconverted input, and xpp to point
+  *     at next location for converted output
+  */
+  long i, j, ni;
+  double tmp[LOOPCNT];        /* in case input is misaligned */
+  double *xp;
+  int nrange = 0;         /* number of range errors */
+  int realign = 0;        /* "do we need to fix input data alignment?" */
+  long cxp = (long) *((char**)xpp);
+
+  realign = (cxp & 7) % SIZEOF_DOUBLE;
+  /* sjl: manually stripmine so we can limit amount of
+   * vector work space reserved to LOOPCNT elements. Also
+   * makes vectorisation easy */
+  for (j=0; j<nelems && nrange==0; j+=LOOPCNT) {
+    ni=Min(nelems-j,LOOPCNT);
+    if (realign) {
+      xp = tmp;
+    } else {
+      xp = (double *) *xpp;
+    }
+   /* copy the next block */
+#pragma cdir loopcnt=LOOPCNT
+#pragma cdir shortloop
+    for (i=0; i<ni; i++) {
+      /* the normal case: */
+      xp[i] = (double) Max( X_DOUBLE_MIN, Min(X_DOUBLE_MAX, (double) tp[i]));
+     /* test for range errors (not always needed but do it anyway) */
+      nrange += tp[i] < X_DOUBLE_MIN || tp[i] > X_DOUBLE_MAX;
+    }
+   /* copy workspace back if necessary */ 
+    if (realign) {
+      memcpy(*xpp, tmp, ni*X_SIZEOF_DOUBLE);
+      xp = (double *) *xpp;
+    }
+   /* update xpp and tp */
+    xp += ni;
+    tp += ni;
+    *xpp = (void*)xp;
+  }
+  return nrange == 0 ? ENOERR : NC_ERANGE;
+
+#else   /* not SX */
+
+	char *xp = (char *) *xpp;
+	int status = ENOERR;
+
+	for( ; nelems != 0; nelems--, xp += X_SIZEOF_DOUBLE, tp++)
+	{
+		int lstatus = ncx_put_double_short(xp, tp);
+		if(lstatus != ENOERR)
+			status = lstatus;
+	}
+
+	*xpp = (void *)xp;
+	return status;
+#endif
+}
+
+int
+ncx_putn_double_int(void **xpp, size_t nelems, const int *tp)
+{
+#if _SX && \
+           X_SIZEOF_DOUBLE == SIZEOF_DOUBLE
+
+ /* basic algorithm is:
+  *   - ensure sane alignment of output data
+  *   - copy (conversion happens automatically) input data
+  *     to output
+  *   - update tp to point at next unconverted input, and xpp to point
+  *     at next location for converted output
+  */
+  long i, j, ni;
+  double tmp[LOOPCNT];        /* in case input is misaligned */
+  double *xp;
+  int nrange = 0;         /* number of range errors */
+  int realign = 0;        /* "do we need to fix input data alignment?" */
+  long cxp = (long) *((char**)xpp);
+
+  realign = (cxp & 7) % SIZEOF_DOUBLE;
+  /* sjl: manually stripmine so we can limit amount of
+   * vector work space reserved to LOOPCNT elements. Also
+   * makes vectorisation easy */
+  for (j=0; j<nelems && nrange==0; j+=LOOPCNT) {
+    ni=Min(nelems-j,LOOPCNT);
+    if (realign) {
+      xp = tmp;
+    } else {
+      xp = (double *) *xpp;
+    }
+   /* copy the next block */
+#pragma cdir loopcnt=LOOPCNT
+#pragma cdir shortloop
+    for (i=0; i<ni; i++) {
+      /* the normal case: */
+      xp[i] = (double) Max( X_DOUBLE_MIN, Min(X_DOUBLE_MAX, (double) tp[i]));
+     /* test for range errors (not always needed but do it anyway) */
+      nrange += tp[i] < X_DOUBLE_MIN || tp[i] > X_DOUBLE_MAX;
+    }
+   /* copy workspace back if necessary */ 
+    if (realign) {
+      memcpy(*xpp, tmp, ni*X_SIZEOF_DOUBLE);
+      xp = (double *) *xpp;
+    }
+   /* update xpp and tp */
+    xp += ni;
+    tp += ni;
+    *xpp = (void*)xp;
+  }
+  return nrange == 0 ? ENOERR : NC_ERANGE;
+
+#else   /* not SX */
+
+	char *xp = (char *) *xpp;
+	int status = ENOERR;
+
+	for( ; nelems != 0; nelems--, xp += X_SIZEOF_DOUBLE, tp++)
+	{
+		int lstatus = ncx_put_double_int(xp, tp);
+		if(lstatus != ENOERR)
+			status = lstatus;
+	}
+
+	*xpp = (void *)xp;
+	return status;
+#endif
+}
+
+int
+ncx_putn_double_float(void **xpp, size_t nelems, const float *tp)
+{
+#if _SX && \
+           X_SIZEOF_DOUBLE == SIZEOF_DOUBLE
+
+ /* basic algorithm is:
+  *   - ensure sane alignment of output data
+  *   - copy (conversion happens automatically) input data
+  *     to output
+  *   - update tp to point at next unconverted input, and xpp to point
+  *     at next location for converted output
+  */
+  long i, j, ni;
+  double tmp[LOOPCNT];        /* in case input is misaligned */
+  double *xp;
+  int nrange = 0;         /* number of range errors */
+  int realign = 0;        /* "do we need to fix input data alignment?" */
+  long cxp = (long) *((char**)xpp);
+
+  realign = (cxp & 7) % SIZEOF_DOUBLE;
+  /* sjl: manually stripmine so we can limit amount of
+   * vector work space reserved to LOOPCNT elements. Also
+   * makes vectorisation easy */
+  for (j=0; j<nelems && nrange==0; j+=LOOPCNT) {
+    ni=Min(nelems-j,LOOPCNT);
+    if (realign) {
+      xp = tmp;
+    } else {
+      xp = (double *) *xpp;
+    }
+   /* copy the next block */
+#pragma cdir loopcnt=LOOPCNT
+#pragma cdir shortloop
+    for (i=0; i<ni; i++) {
+      /* the normal case: */
+      xp[i] = (double) Max( X_DOUBLE_MIN, Min(X_DOUBLE_MAX, (double) tp[i]));
+     /* test for range errors (not always needed but do it anyway) */
+      nrange += tp[i] < X_DOUBLE_MIN || tp[i] > X_DOUBLE_MAX;
+    }
+   /* copy workspace back if necessary */ 
+    if (realign) {
+      memcpy(*xpp, tmp, ni*X_SIZEOF_DOUBLE);
+      xp = (double *) *xpp;
+    }
+   /* update xpp and tp */
+    xp += ni;
+    tp += ni;
+    *xpp = (void*)xp;
+  }
+  return nrange == 0 ? ENOERR : NC_ERANGE;
+
+#else   /* not SX */
+
+	char *xp = (char *) *xpp;
+	int status = ENOERR;
+
+	for( ; nelems != 0; nelems--, xp += X_SIZEOF_DOUBLE, tp++)
+	{
+		int lstatus = ncx_put_double_float(xp, tp);
+		if(lstatus != ENOERR)
+			status = lstatus;
+	}
+
+	*xpp = (void *)xp;
+	return status;
+#endif
+}
+
+int
+ncx_putn_double_uint(void **xpp, size_t nelems, const uint *tp)
+{
+#if _SX && \
+           X_SIZEOF_DOUBLE == SIZEOF_DOUBLE
+
+ /* basic algorithm is:
+  *   - ensure sane alignment of output data
+  *   - copy (conversion happens automatically) input data
+  *     to output
+  *   - update tp to point at next unconverted input, and xpp to point
+  *     at next location for converted output
+  */
+  long i, j, ni;
+  double tmp[LOOPCNT];        /* in case input is misaligned */
+  double *xp;
+  int nrange = 0;         /* number of range errors */
+  int realign = 0;        /* "do we need to fix input data alignment?" */
+  long cxp = (long) *((char**)xpp);
+
+  realign = (cxp & 7) % SIZEOF_DOUBLE;
+  /* sjl: manually stripmine so we can limit amount of
+   * vector work space reserved to LOOPCNT elements. Also
+   * makes vectorisation easy */
+  for (j=0; j<nelems && nrange==0; j+=LOOPCNT) {
+    ni=Min(nelems-j,LOOPCNT);
+    if (realign) {
+      xp = tmp;
+    } else {
+      xp = (double *) *xpp;
+    }
+   /* copy the next block */
+#pragma cdir loopcnt=LOOPCNT
+#pragma cdir shortloop
+    for (i=0; i<ni; i++) {
+      /* the normal case: */
+      xp[i] = (double) Max( X_DOUBLE_MIN, Min(X_DOUBLE_MAX, (double) tp[i]));
+     /* test for range errors (not always needed but do it anyway) */
+      nrange += tp[i] < X_DOUBLE_MIN || tp[i] > X_DOUBLE_MAX;
+    }
+   /* copy workspace back if necessary */ 
+    if (realign) {
+      memcpy(*xpp, tmp, ni*X_SIZEOF_DOUBLE);
+      xp = (double *) *xpp;
+    }
+   /* update xpp and tp */
+    xp += ni;
+    tp += ni;
+    *xpp = (void*)xp;
+  }
+  return nrange == 0 ? ENOERR : NC_ERANGE;
+
+#else   /* not SX */
+
+	char *xp = (char *) *xpp;
+	int status = ENOERR;
+
+	for( ; nelems != 0; nelems--, xp += X_SIZEOF_DOUBLE, tp++)
+	{
+		int lstatus = ncx_put_double_uint(xp, tp);
+		if(lstatus != ENOERR)
+			status = lstatus;
+	}
+
+	*xpp = (void *)xp;
+	return status;
+#endif
+}
+
+int
+ncx_putn_double_longlong(void **xpp, size_t nelems, const longlong *tp)
+{
+#if _SX && \
+           X_SIZEOF_DOUBLE == SIZEOF_DOUBLE
+
+ /* basic algorithm is:
+  *   - ensure sane alignment of output data
+  *   - copy (conversion happens automatically) input data
+  *     to output
+  *   - update tp to point at next unconverted input, and xpp to point
+  *     at next location for converted output
+  */
+  long i, j, ni;
+  double tmp[LOOPCNT];        /* in case input is misaligned */
+  double *xp;
+  int nrange = 0;         /* number of range errors */
+  int realign = 0;        /* "do we need to fix input data alignment?" */
+  long cxp = (long) *((char**)xpp);
+
+  realign = (cxp & 7) % SIZEOF_DOUBLE;
+  /* sjl: manually stripmine so we can limit amount of
+   * vector work space reserved to LOOPCNT elements. Also
+   * makes vectorisation easy */
+  for (j=0; j<nelems && nrange==0; j+=LOOPCNT) {
+    ni=Min(nelems-j,LOOPCNT);
+    if (realign) {
+      xp = tmp;
+    } else {
+      xp = (double *) *xpp;
+    }
+   /* copy the next block */
+#pragma cdir loopcnt=LOOPCNT
+#pragma cdir shortloop
+    for (i=0; i<ni; i++) {
+      /* the normal case: */
+      xp[i] = (double) Max( X_DOUBLE_MIN, Min(X_DOUBLE_MAX, (double) tp[i]));
+     /* test for range errors (not always needed but do it anyway) */
+      nrange += tp[i] < X_DOUBLE_MIN || tp[i] > X_DOUBLE_MAX;
+    }
+   /* copy workspace back if necessary */ 
+    if (realign) {
+      memcpy(*xpp, tmp, ni*X_SIZEOF_DOUBLE);
+      xp = (double *) *xpp;
+    }
+   /* update xpp and tp */
+    xp += ni;
+    tp += ni;
+    *xpp = (void*)xp;
+  }
+  return nrange == 0 ? ENOERR : NC_ERANGE;
+
+#else   /* not SX */
+
+	char *xp = (char *) *xpp;
+	int status = ENOERR;
+
+	for( ; nelems != 0; nelems--, xp += X_SIZEOF_DOUBLE, tp++)
+	{
+		int lstatus = ncx_put_double_longlong(xp, tp);
+		if(lstatus != ENOERR)
+			status = lstatus;
+	}
+
+	*xpp = (void *)xp;
+	return status;
+#endif
+}
+
+int
+ncx_putn_double_ulonglong(void **xpp, size_t nelems, const ulonglong *tp)
+{
+#if _SX && \
+           X_SIZEOF_DOUBLE == SIZEOF_DOUBLE
+
+ /* basic algorithm is:
+  *   - ensure sane alignment of output data
+  *   - copy (conversion happens automatically) input data
+  *     to output
+  *   - update tp to point at next unconverted input, and xpp to point
+  *     at next location for converted output
+  */
+  long i, j, ni;
+  double tmp[LOOPCNT];        /* in case input is misaligned */
+  double *xp;
+  int nrange = 0;         /* number of range errors */
+  int realign = 0;        /* "do we need to fix input data alignment?" */
+  long cxp = (long) *((char**)xpp);
+
+  realign = (cxp & 7) % SIZEOF_DOUBLE;
+  /* sjl: manually stripmine so we can limit amount of
+   * vector work space reserved to LOOPCNT elements. Also
+   * makes vectorisation easy */
+  for (j=0; j<nelems && nrange==0; j+=LOOPCNT) {
+    ni=Min(nelems-j,LOOPCNT);
+    if (realign) {
+      xp = tmp;
+    } else {
+      xp = (double *) *xpp;
+    }
+   /* copy the next block */
+#pragma cdir loopcnt=LOOPCNT
+#pragma cdir shortloop
+    for (i=0; i<ni; i++) {
+      /* the normal case: */
+      xp[i] = (double) Max( X_DOUBLE_MIN, Min(X_DOUBLE_MAX, (double) tp[i]));
+     /* test for range errors (not always needed but do it anyway) */
+      nrange += tp[i] < X_DOUBLE_MIN || tp[i] > X_DOUBLE_MAX;
+    }
+   /* copy workspace back if necessary */ 
+    if (realign) {
+      memcpy(*xpp, tmp, ni*X_SIZEOF_DOUBLE);
+      xp = (double *) *xpp;
+    }
+   /* update xpp and tp */
+    xp += ni;
+    tp += ni;
+    *xpp = (void*)xp;
+  }
+  return nrange == 0 ? ENOERR : NC_ERANGE;
+
+#else   /* not SX */
+
+	char *xp = (char *) *xpp;
+	int status = ENOERR;
+
+	for( ; nelems != 0; nelems--, xp += X_SIZEOF_DOUBLE, tp++)
+	{
+		int lstatus = ncx_put_double_ulonglong(xp, tp);
+		if(lstatus != ENOERR)
+			status = lstatus;
+	}
+
+	*xpp = (void *)xp;
+	return status;
+#endif
+}
+
+#if X_SIZEOF_DOUBLE == SIZEOF_DOUBLE && !defined(NO_IEEE_FLOAT)
+/* optimized version */
+int
+ncx_putn_double_double(void **xpp, size_t nelems, const double *tp)
+{
+#ifdef WORDS_BIGENDIAN
+	(void) memcpy(*xpp, tp, nelems * X_SIZEOF_DOUBLE);
+# else
+	swapn8b(*xpp, tp, nelems);
+# endif
+	*xpp = (void *)((char *)(*xpp) + nelems * X_SIZEOF_DOUBLE);
+	return ENOERR;
+}
+#elif vax
+int
+ncx_putn_double_double(void **xpp, size_t ndoubles, const double *ip)
+{
+	const double *const end = ip + ndoubles;
+
+	while(ip < end)
+	{
+	const struct vax_double *const vdp = 
+			(const struct vax_double *)ip;
+	struct ieee_double *const idp =
+			 (struct ieee_double *) (*xpp);
+
+	if ((vdp->mantissa4 > (dbl_limits[0].d.mantissa4 - 3)) &&
+		(vdp->mantissa3 == dbl_limits[0].d.mantissa3) &&
+		(vdp->mantissa2 == dbl_limits[0].d.mantissa2) &&
+		(vdp->mantissa1 == dbl_limits[0].d.mantissa1) &&
+		(vdp->exp == dbl_limits[0].d.exp))
+	{
+		*idp = dbl_limits[0].ieee;
+		goto shipit;
+	}
+	if ((vdp->mantissa4 == dbl_limits[1].d.mantissa4) &&
+		(vdp->mantissa3 == dbl_limits[1].d.mantissa3) &&
+		(vdp->mantissa2 == dbl_limits[1].d.mantissa2) &&
+		(vdp->mantissa1 == dbl_limits[1].d.mantissa1) &&
+		(vdp->exp == dbl_limits[1].d.exp))
+	{
+		*idp = dbl_limits[1].ieee;
+		goto shipit;
+	}
+
+	{
+		unsigned exp = vdp->exp - VAX_DBL_BIAS + IEEE_DBL_BIAS;
+
+		unsigned mant_lo = ((vdp->mantissa2 & MASK(3)) << 29) |
+			(vdp->mantissa3 << 13) |
+			((vdp->mantissa4 >> 3) & MASK(13));
+
+		unsigned mant_hi = (vdp->mantissa1 << 13)
+				 | (vdp->mantissa2 >> 3);
+
+		if((vdp->mantissa4 & 7) > 4)
+		{
+			/* round up */
+			mant_lo++;
+			if(mant_lo == 0)
+			{
+				mant_hi++;
+				if(mant_hi > 0xffffff)
+				{
+					mant_hi = 0;
+					exp++;
+				}
+			}
+		}
+
+		idp->mant_lo = SWAP4(mant_lo);
+		idp->mant_6 = mant_hi >> 16;
+		idp->mant_5 = (mant_hi & 0xff00) >> 8;
+		idp->mant_4 = mant_hi;
+		idp->exp_hi = exp >> 4;
+		idp->exp_lo = exp;
+	}
+		
+	shipit:
+		idp->sign = vdp->sign;
+
+		ip++;
+		*xpp = (char *)(*xpp) + X_SIZEOF_DOUBLE;
+	}
+	return ENOERR;
+}
+	/* vax */
+#else
+int
+ncx_putn_double_double(void **xpp, size_t nelems, const double *tp)
+{
+	char *xp = *xpp;
+	int status = ENOERR;
+
+	for( ; nelems != 0; nelems--, xp += X_SIZEOF_DOUBLE, tp++)
+	{
+		int lstatus = ncx_put_double_double(xp, tp);
+		if(lstatus != ENOERR)
+			status = lstatus;
+	}
+
+	*xpp = (void *)xp;
+	return status;
+}
+
+#endif
+
+
+/*
+ * Other aggregate conversion functions.
+ */
+
+/* text */
+
+int
+ncx_getn_text(const void **xpp, size_t nelems, char *tp)
+{
+	(void) memcpy(tp, *xpp, nelems);
+	*xpp = (void *)((char *)(*xpp) + nelems);
+	return ENOERR;
+
+}
+
+int
+ncx_pad_getn_text(const void **xpp, size_t nelems, char *tp)
+{
+	size_t rndup = nelems % X_ALIGN;
+
+	if(rndup)
+		rndup = X_ALIGN - rndup;
+
+	(void) memcpy(tp, *xpp, nelems);
+	*xpp = (void *)((char *)(*xpp) + nelems + rndup);
+
+	return ENOERR;
+
+}
+
+int
+ncx_putn_text(void **xpp, size_t nelems, const char *tp)
+{
+	(void) memcpy(*xpp, tp, nelems);
+	*xpp = (void *)((char *)(*xpp) + nelems);
+
+	return ENOERR;
+
+}
+
+int
+ncx_pad_putn_text(void **xpp, size_t nelems, const char *tp)
+{
+	size_t rndup = nelems % X_ALIGN;
+
+	if(rndup)
+		rndup = X_ALIGN - rndup;
+
+	(void) memcpy(*xpp, tp, nelems);
+	*xpp = (void *)((char *)(*xpp) + nelems);
+
+	if(rndup)
+	{
+		(void) memcpy(*xpp, nada, rndup);
+		*xpp = (void *)((char *)(*xpp) + rndup);
+	}
+	
+	return ENOERR;
+
+}
+
+
+/* opaque */
+
+int
+ncx_getn_void(const void **xpp, size_t nelems, void *tp)
+{
+	(void) memcpy(tp, *xpp, nelems);
+	*xpp = (void *)((char *)(*xpp) + nelems);
+	return ENOERR;
+
+}
+
+int
+ncx_pad_getn_void(const void **xpp, size_t nelems, void *tp)
+{
+	size_t rndup = nelems % X_ALIGN;
+
+	if(rndup)
+		rndup = X_ALIGN - rndup;
+
+	(void) memcpy(tp, *xpp, nelems);
+	*xpp = (void *)((char *)(*xpp) + nelems + rndup);
+
+	return ENOERR;
+
+}
+
+int
+ncx_putn_void(void **xpp, size_t nelems, const void *tp)
+{
+	(void) memcpy(*xpp, tp, nelems);
+	*xpp = (void *)((char *)(*xpp) + nelems);
+
+	return ENOERR;
+
+}
+
+int
+ncx_pad_putn_void(void **xpp, size_t nelems, const void *tp)
+{
+	size_t rndup = nelems % X_ALIGN;
+
+	if(rndup)
+		rndup = X_ALIGN - rndup;
+
+	(void) memcpy(*xpp, tp, nelems);
+	*xpp = (void *)((char *)(*xpp) + nelems);
+
+	if(rndup)
+	{
+		(void) memcpy(*xpp, nada, rndup);
+		*xpp = (void *)((char *)(*xpp) + rndup);
+	}
+	
+	return ENOERR;
+
+}
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/src_netcdf4/ncx.h
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/src_netcdf4/ncx.h	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/src_netcdf4/ncx.h	(revision 1749)
@@ -0,0 +1,753 @@
+/*
+ *	Copyright 1996, University Corporation for Atmospheric Research
+ *	See netcdf/COPYRIGHT file for copying and redistribution conditions.
+ */
+/* "$Id: ncx.h,v 1.65 2010/05/26 18:11:08 dmh Exp $" */
+
+#ifndef _NCX_H_
+#define _NCX_H_
+
+#include "ncdispatch.h"
+#include "ncio.h"
+#include "fbits.h"
+
+/*
+ * An external data representation interface.
+
+ *
+ * This started out as a general replacement for ONC XDR,
+ * specifically, the xdrmem family of functions.
+ * 
+ * We eventually realized that we could write more portable
+ * code if we decoupled any association between the 'C' types
+ * and the external types. (XDR has this association between the 'C'
+ * types and the external representations, like xdr_int() takes
+ * an int argument and goes to an external int representation.) 
+ * So, now there is a matrix of functions.
+ * 
+ */
+
+#include <config.h> /* output of 'configure' */
+#include "rnd.h"
+#include <stddef.h> /* size_t */
+#include <errno.h>
+#include <sys/types.h> /* off_t */
+#include <ncdispatch.h>
+#define longlong long long
+
+#if defined(_CRAY) && !defined(_CRAYIEEE) && !defined(__crayx1)
+#define CRAYFLOAT 1 /* CRAY Floating point */
+#elif defined(_SX) && defined(_FLOAT2)	/* NEC SUPER-UX in CRAY mode */
+#define CRAYFLOAT 1 /* CRAY Floating point */
+#endif
+
+/*
+ * The integer return code for the conversion routines
+ * is 0 (ENOERR) when no error occured, or NC_ERANGE as appropriate
+ * for an overflow conversion.
+ */
+#ifndef ENOERR
+#define ENOERR 0
+#endif
+#ifndef NC_ERANGE
+#define NC_ERANGE (-60) /* N.B. must match value in netcdf.h */
+#endif
+#ifndef NC_ENOMEM
+#define NC_ENOMEM (-61) /* N.B. must match value in netcdf.h */
+#endif
+
+
+/*
+ * External sizes of the primitive elements.
+ */
+#define X_SIZEOF_CHAR		1
+#define X_SIZEOF_SHORT		2
+#define X_SIZEOF_INT		4	/* xdr_int */
+#if 0
+#define X_SIZEOF_LONG		8 */	/* xdr_long_long */
+#endif
+#define X_SIZEOF_FLOAT		4
+#define X_SIZEOF_DOUBLE		8
+
+/*
+ * For now, netcdf is limited to 32 bit sizes,
+ * If compiled with support for "large files", then
+ * netcdf will use a 64 bit off_t and it can then write a file
+ * using 64 bit offsets. 
+ *  see also X_SIZE_MAX, X_OFF_MAX below
+ */
+#define X_SIZEOF_OFF_T		(sizeof(off_t))
+#define X_SIZEOF_SIZE_T		X_SIZEOF_INT
+
+/*
+ * limits of the external representation
+ */
+#define X_SCHAR_MIN	(-128)
+#define X_SCHAR_MAX	127
+#define X_UCHAR_MAX	255U
+#define X_SHORT_MIN	(-32768)
+#define X_SHRT_MIN	X_SHORT_MIN	/* alias compatible with limits.h */
+#define X_SHORT_MAX	32767
+#define X_SHRT_MAX	X_SHORT_MAX	/* alias compatible with limits.h */
+#define X_USHORT_MAX	65535U
+#define X_USHRT_MAX	X_USHORT_MAX	/* alias compatible with limits.h */
+#define X_INT_MIN	(-2147483647-1)
+#define X_INT_MAX	2147483647
+#define X_UINT_MAX	4294967295U
+#define X_LONGLONG_MIN	(-9223372036854775807LL-1LL)
+#define X_LONGLONG_MAX	9223372036854775807LL
+#define X_ULONGLONG_MAX	18446744073709551615ULL
+#define X_FLOAT_MAX	3.402823466e+38f
+#define X_FLOAT_MIN	(-X_FLOAT_MAX)
+#define X_FLT_MAX	X_FLOAT_MAX	/* alias compatible with limits.h */
+#if CRAYFLOAT
+/* ldexp(1. - ldexp(.5 , -46), 1024) */
+#define X_DOUBLE_MAX    1.79769313486230e+308
+#else
+/* scalb(1. - scalb(.5 , -52), 1024) */
+#define X_DOUBLE_MAX	1.7976931348623157e+308 
+#endif
+#define X_DOUBLE_MIN	(-X_DOUBLE_MAX)
+#define X_DBL_MAX	X_DOUBLE_MAX	/* alias compatible with limits.h */
+
+#define X_SIZE_MAX	X_UINT_MAX
+#define X_OFF_MAX	X_INT_MAX
+
+
+/* Begin ncx_len */
+
+/*
+ * ncx_len_xxx() interfaces are defined as macros below, 
+ * These give the length of an array of nelems of the type.
+ * N.B. The 'char' and 'short' interfaces give the X_ALIGNED length.
+ */
+#define X_ALIGN			4	/* a.k.a. BYTES_PER_XDR_UNIT */
+
+#define ncx_len_char(nelems) \
+	_RNDUP((nelems), X_ALIGN)
+
+#define ncx_len_short(nelems) \
+	(((nelems) + (nelems)%2)  * X_SIZEOF_SHORT)
+
+#define ncx_len_int(nelems) \
+	((nelems) * X_SIZEOF_INT)
+
+#define ncx_len_long(nelems) \
+	((nelems) * X_SIZEOF_LONG)
+
+#define ncx_len_float(nelems) \
+	((nelems) * X_SIZEOF_FLOAT)
+
+#define ncx_len_double(nelems) \
+	((nelems) * X_SIZEOF_DOUBLE)
+
+/* End ncx_len */
+
+#if __CHAR_UNSIGNED__
+	/* 'char' is unsigned, declare ncbyte as 'signed char' */
+typedef signed char schar;
+
+#else
+	/* 'char' is signed */
+typedef signed char schar;
+
+#endif	/* __CHAR_UNSIGNED__ */
+
+/*
+ * Primitive numeric conversion functions.
+ * The `put' functions convert from native internal
+ * type to the external type, while the `get' functions
+ * convert from the external to the internal.
+ *
+ * These take the form
+ *	int ncx_get_{external_type}_{internal_type}(
+ *		const void *xp,
+ *		internal_type *ip
+ *	);
+ *	int ncx_put_{external_type}_{internal_type}(
+ *		void *xp,
+ *		const internal_type *ip
+ *	);
+ * where
+ *	`external_type' and `internal_type' chosen from
+		schar
+		uchar
+		short
+		ushort
+		int
+		uint
+		long
+		ulong
+		float
+		double
+ *
+ * Not all combinations make sense.
+ * We may not implement all combinations that make sense.
+ * The netcdf functions that use this ncx interface don't
+ * use these primitive conversion functions. They use the
+ * aggregate conversion functions declared below.
+ *
+ * Storage for a single element of external type is at the `void * xp'
+ * argument.
+ *
+ * Storage for a single element of internal type is at `ip' argument.
+ *
+ * These functions return 0 (ENOERR) when no error occured,
+ * or NC_ERANGE when the value being converted is too large.
+ * When NC_ERANGE occurs, an undefined (implementation dependent)
+ * conversion may have occured.
+ *
+ * Note that loss of precision may occur silently.
+ *
+ */
+
+#if 0
+extern int
+ncx_get_schar_schar(const void *xp, schar *ip);
+extern int
+ncx_get_schar_uchar(const void *xp, uchar *ip);
+extern int
+ncx_get_schar_short(const void *xp, short *ip);
+extern int
+ncx_get_schar_int(const void *xp, int *ip);
+extern int
+ncx_get_schar_long(const void *xp, long *ip);
+extern int
+ncx_get_schar_float(const void *xp, float *ip);
+extern int
+ncx_get_schar_double(const void *xp, double *ip);
+
+extern int
+ncx_put_schar_schar(void *xp, const schar *ip);
+extern int
+ncx_put_schar_uchar(void *xp, const uchar *ip);
+extern int
+ncx_put_schar_short(void *xp, const short *ip);
+extern int
+ncx_put_schar_int(void *xp, const int *ip);
+extern int
+ncx_put_schar_long(void *xp, const long *ip);
+extern int
+ncx_put_schar_float(void *xp, const float *ip);
+extern int
+ncx_put_schar_double(void *xp, const double *ip);
+#endif
+ 
+
+extern int
+ncx_get_short_schar(const void *xp, schar *ip);
+extern int
+ncx_get_short_uchar(const void *xp, uchar *ip);
+extern int
+ncx_get_short_short(const void *xp, short *ip);
+extern int
+ncx_get_short_int(const void *xp, int *ip);
+extern int
+ncx_get_short_long(const void *xp, long *ip);
+extern int
+ncx_get_short_float(const void *xp, float *ip);
+extern int
+ncx_get_short_double(const void *xp, double *ip);
+
+extern int
+ncx_put_short_schar(void *xp, const schar *ip);
+extern int
+ncx_put_short_uchar(void *xp, const uchar *ip);
+extern int
+ncx_put_short_short(void *xp, const short *ip);
+extern int
+ncx_put_short_int(void *xp, const int *ip);
+extern int
+ncx_put_short_long(void *xp, const long *ip);
+extern int
+ncx_put_short_float(void *xp, const float *ip);
+extern int
+ncx_put_short_double(void *xp, const double *ip);
+ 
+
+extern int
+ncx_get_int_schar(const void *xp, schar *ip);
+extern int
+ncx_get_int_uchar(const void *xp, uchar *ip);
+extern int
+ncx_get_int_short(const void *xp, short *ip);
+extern int
+ncx_get_int_int(const void *xp, int *ip);
+extern int
+ncx_get_int_long(const void *xp, long *ip);
+extern int
+ncx_get_int_float(const void *xp, float *ip);
+extern int
+ncx_get_int_double(const void *xp, double *ip);
+
+extern int
+ncx_put_int_schar(void *xp, const schar *ip);
+extern int
+ncx_put_int_uchar(void *xp, const uchar *ip);
+extern int
+ncx_put_int_short(void *xp, const short *ip);
+extern int
+ncx_put_int_int(void *xp, const int *ip);
+extern int
+ncx_put_int_long(void *xp, const long *ip);
+extern int
+ncx_put_int_float(void *xp, const float *ip);
+extern int
+ncx_put_int_double(void *xp, const double *ip);
+ 
+
+extern int
+ncx_get_float_schar(const void *xp, schar *ip);
+extern int
+ncx_get_float_uchar(const void *xp, uchar *ip);
+extern int
+ncx_get_float_short(const void *xp, short *ip);
+extern int
+ncx_get_float_int(const void *xp, int *ip);
+extern int
+ncx_get_float_long(const void *xp, long *ip);
+extern int
+ncx_get_float_float(const void *xp, float *ip);
+extern int
+ncx_get_float_double(const void *xp, double *ip);
+
+extern int
+ncx_put_float_schar(void *xp, const schar *ip);
+extern int
+ncx_put_float_uchar(void *xp, const uchar *ip);
+extern int
+ncx_put_float_short(void *xp, const short *ip);
+extern int
+ncx_put_float_int(void *xp, const int *ip);
+extern int
+ncx_put_float_long(void *xp, const long *ip);
+extern int
+ncx_put_float_float(void *xp, const float *ip);
+extern int
+ncx_put_float_double(void *xp, const double *ip);
+ 
+
+extern int
+ncx_get_double_schar(const void *xp, schar *ip);
+extern int
+ncx_get_double_uchar(const void *xp, uchar *ip);
+extern int
+ncx_get_double_short(const void *xp, short *ip);
+extern int
+ncx_get_double_int(const void *xp, int *ip);
+extern int
+ncx_get_double_long(const void *xp, long *ip);
+extern int
+ncx_get_double_float(const void *xp, float *ip);
+extern int
+ncx_get_double_double(const void *xp, double *ip);
+
+extern int
+ncx_put_double_schar(void *xp, const schar *ip);
+extern int
+ncx_put_double_uchar(void *xp, const uchar *ip);
+extern int
+ncx_put_double_short(void *xp, const short *ip);
+extern int
+ncx_put_double_int(void *xp, const int *ip);
+extern int
+ncx_put_double_long(void *xp, const long *ip);
+extern int
+ncx_put_double_float(void *xp, const float *ip);
+extern int
+ncx_put_double_double(void *xp, const double *ip);
+ 
+
+/*
+ * Other primitive conversion functions
+ * N.B. slightly different interface
+ * Used by netcdf.
+ */
+
+/* ncx_get_int_size_t */
+extern int
+ncx_get_size_t(const void **xpp, size_t *ulp);
+/* ncx_get_int_off_t */
+extern int
+ncx_get_off_t(const void **xpp, off_t *lp, size_t sizeof_off_t);
+
+/* ncx_put_int_size_t */
+extern int
+ncx_put_size_t(void **xpp, const size_t *ulp);
+/* ncx_put_int_off_t */
+extern int
+ncx_put_off_t(void **xpp, const off_t *lp, size_t sizeof_off_t);
+
+
+/*
+ * Aggregate numeric conversion functions.
+ * Convert an array.  Replaces xdr_array(...).
+ * These functions are used by netcdf. Unlike the xdr
+ * interface, we optimize for aggregate conversions.
+ * This functions should be implemented to take advantage
+ * of multiple processor / parallel hardware where available.
+ *
+ * These take the form
+ *	int ncx_getn_{external_type}_{internal_type}(
+ *		const void *xpp,
+ *		size_t nelems,
+ *		internal_type *ip
+ *	);
+ *	int ncx_putn_{external_type}_{internal_type}(
+ *		void **xpp,
+ *		size_t nelems,
+ *		const internal_type *ip
+ *	);
+ * Where the types are as in the primitive numeric conversion functions.
+ *
+ * The value of the pointer to pointer argument, *xpp, is
+ * expected to reference storage for `nelems' of the external
+ * type.  On return, it modified to reference just past the last
+ * converted external element.
+ *
+ * The types whose external size is less than X_ALIGN also have `pad'
+ * interfaces. These round (and zero fill on put) *xpp up to X_ALIGN
+ * boundaries. (This is the usual xdr behavior.)
+ *
+ * The `ip' argument should point to an array of `nelems' of
+ * internal_type.
+ *
+ * Range errors (NC_ERANGE) for a individual values in the array 
+ * DO NOT terminate the array conversion. All elements are converted,
+ * with some having undefined values.
+ * If any range error occurs, the function returns NC_ERANGE.
+ *
+ */
+
+extern int
+ncx_getn_schar_schar(const void **xpp, size_t nelems, schar *ip);
+extern int
+ncx_getn_schar_uchar(const void **xpp, size_t nelems, uchar *ip);
+extern int
+ncx_getn_schar_short(const void **xpp, size_t nelems, short *ip);
+extern int
+ncx_getn_schar_int(const void **xpp, size_t nelems, int *ip);
+extern int
+ncx_getn_schar_long(const void **xpp, size_t nelems, long *ip);
+extern int
+ncx_getn_schar_float(const void **xpp, size_t nelems, float *ip);
+extern int
+ncx_getn_schar_double(const void **xpp, size_t nelems, double *ip);
+extern int
+ncx_getn_schar_uint(const void **xpp, size_t nelems, unsigned int *ip);
+extern int
+ncx_getn_schar_longlong(const void **xpp, size_t nelems, longlong *ip);
+extern int
+ncx_getn_schar_ulonglong(const void **xpp, size_t nelems, ulonglong *ip);
+
+extern int
+ncx_pad_getn_schar_schar(const void **xpp, size_t nelems, schar *ip);
+extern int
+ncx_pad_getn_schar_uchar(const void **xpp, size_t nelems, uchar *ip);
+extern int
+ncx_pad_getn_schar_short(const void **xpp, size_t nelems, short *ip);
+extern int
+ncx_pad_getn_schar_int(const void **xpp, size_t nelems, int *ip);
+extern int
+ncx_pad_getn_schar_long(const void **xpp, size_t nelems, long *ip);
+extern int
+ncx_pad_getn_schar_float(const void **xpp, size_t nelems, float *ip);
+extern int
+ncx_pad_getn_schar_double(const void **xpp, size_t nelems, double *ip);
+extern int
+ncx_pad_getn_schar_uint(const void **xpp, size_t nelems, unsigned int *ip);
+extern int
+ncx_pad_getn_schar_longlong(const void **xpp, size_t nelems, longlong *ip);
+extern int
+ncx_pad_getn_schar_ulonglong(const void **xpp, size_t nelems, ulonglong *ip);
+
+extern int
+ncx_putn_schar_schar(void **xpp, size_t nelems, const schar *ip);
+extern int
+ncx_putn_schar_uchar(void **xpp, size_t nelems, const uchar *ip);
+extern int
+ncx_putn_schar_short(void **xpp, size_t nelems, const short *ip);
+extern int
+ncx_putn_schar_int(void **xpp, size_t nelems, const int *ip);
+extern int
+ncx_putn_schar_long(void **xpp, size_t nelems, const long *ip);
+extern int
+ncx_putn_schar_float(void **xpp, size_t nelems, const float *ip);
+extern int
+ncx_putn_schar_double(void **xpp, size_t nelems, const double *ip);
+extern int
+ncx_putn_schar_uint(void **xpp, size_t nelems, const unsigned int *ip);
+extern int
+ncx_putn_schar_longlong(void **xpp, size_t nelems, const longlong *ip);
+extern int
+ncx_putn_schar_ulonglong(void **xpp, size_t nelems, const ulonglong *ip);
+ 
+extern int
+ncx_pad_putn_schar_schar(void **xpp, size_t nelems, const schar *ip);
+extern int
+ncx_pad_putn_schar_uchar(void **xpp, size_t nelems, const uchar *ip);
+extern int
+ncx_pad_putn_schar_short(void **xpp, size_t nelems, const short *ip);
+extern int
+ncx_pad_putn_schar_int(void **xpp, size_t nelems, const int *ip);
+extern int
+ncx_pad_putn_schar_long(void **xpp, size_t nelems, const long *ip);
+extern int
+ncx_pad_putn_schar_float(void **xpp, size_t nelems, const float *ip);
+extern int
+ncx_pad_putn_schar_double(void **xpp, size_t nelems, const double *ip);
+extern int
+ncx_pad_putn_schar_uint(void **xpp, size_t nelems, const unsigned int *ip);
+extern int
+ncx_pad_putn_schar_longlong(void **xpp, size_t nelems, const longlong *ip);
+extern int
+ncx_pad_putn_schar_ulonglong(void **xpp, size_t nelems, const ulonglong *ip);
+
+
+extern int
+ncx_getn_short_schar(const void **xpp, size_t nelems, schar *ip);
+extern int
+ncx_getn_short_uchar(const void **xpp, size_t nelems, uchar *ip);
+extern int
+ncx_getn_short_short(const void **xpp, size_t nelems, short *ip);
+extern int
+ncx_getn_short_int(const void **xpp, size_t nelems, int *ip);
+extern int
+ncx_getn_short_long(const void **xpp, size_t nelems, long *ip);
+extern int
+ncx_getn_short_float(const void **xpp, size_t nelems, float *ip);
+extern int
+ncx_getn_short_double(const void **xpp, size_t nelems, double *ip);
+extern int
+ncx_getn_short_uint(const void **xpp, size_t nelems, unsigned int *ip);
+extern int
+ncx_getn_short_longlong(const void **xpp, size_t nelems, longlong *ip);
+extern int
+ncx_getn_short_ulonglong(const void **xpp, size_t nelems, ulonglong *ip);
+
+extern int
+ncx_pad_getn_short_schar(const void **xpp, size_t nelems, schar *ip);
+extern int
+ncx_pad_getn_short_uchar(const void **xpp, size_t nelems, uchar *ip);
+extern int
+ncx_pad_getn_short_short(const void **xpp, size_t nelems, short *ip);
+extern int
+ncx_pad_getn_short_int(const void **xpp, size_t nelems, int *ip);
+extern int
+ncx_pad_getn_short_long(const void **xpp, size_t nelems, long *ip);
+extern int
+ncx_pad_getn_short_float(const void **xpp, size_t nelems, float *ip);
+extern int
+ncx_pad_getn_short_double(const void **xpp, size_t nelems, double *ip);
+extern int
+ncx_pad_getn_short_uint(const void **xpp, size_t nelems, unsigned int *ip);
+extern int
+ncx_pad_getn_short_longlong(const void **xpp, size_t nelems, longlong *ip);
+extern int
+ncx_pad_getn_short_ulonglong(const void **xpp, size_t nelems, ulonglong *ip);
+
+extern int
+ncx_putn_short_schar(void **xpp, size_t nelems, const schar *ip);
+extern int
+ncx_putn_short_uchar(void **xpp, size_t nelems, const uchar *ip);
+extern int
+ncx_putn_short_short(void **xpp, size_t nelems, const short *ip);
+extern int
+ncx_putn_short_int(void **xpp, size_t nelems, const int *ip);
+extern int
+ncx_putn_short_long(void **xpp, size_t nelems, const long *ip);
+extern int
+ncx_putn_short_float(void **xpp, size_t nelems, const float *ip);
+extern int
+ncx_putn_short_double(void **xpp, size_t nelems, const double *ip);
+extern int
+ncx_putn_short_uint(void **xpp, size_t nelems, const unsigned int *ip);
+extern int
+ncx_putn_short_longlong(void **xpp, size_t nelems, const longlong *ip);
+extern int
+ncx_putn_short_ulonglong(void **xpp, size_t nelems, const ulonglong *ip);
+ 
+extern int
+ncx_pad_putn_short_schar(void **xpp, size_t nelems, const schar *ip);
+extern int
+ncx_pad_putn_short_uchar(void **xpp, size_t nelems, const uchar *ip);
+extern int
+ncx_pad_putn_short_short(void **xpp, size_t nelems, const short *ip);
+extern int
+ncx_pad_putn_short_int(void **xpp, size_t nelems, const int *ip);
+extern int
+ncx_pad_putn_short_long(void **xpp, size_t nelems, const long *ip);
+extern int
+ncx_pad_putn_short_float(void **xpp, size_t nelems, const float *ip);
+extern int
+ncx_pad_putn_short_double(void **xpp, size_t nelems, const double *ip);
+extern int
+ncx_pad_putn_short_uint(void **xpp, size_t nelems, const unsigned int *ip);
+extern int
+ncx_pad_putn_short_longlong(void **xpp, size_t nelems, const longlong *ip);
+extern int
+ncx_pad_putn_short_ulonglong(void **xpp, size_t nelems, const ulonglong *ip);
+
+
+extern int
+ncx_getn_int_schar(const void **xpp, size_t nelems, schar *ip);
+extern int
+ncx_getn_int_uchar(const void **xpp, size_t nelems, uchar *ip);
+extern int
+ncx_getn_int_short(const void **xpp, size_t nelems, short *ip);
+extern int
+ncx_getn_int_int(const void **xpp, size_t nelems, int *ip);
+extern int
+ncx_getn_int_long(const void **xpp, size_t nelems, long *ip);
+extern int
+ncx_getn_int_float(const void **xpp, size_t nelems, float *ip);
+extern int
+ncx_getn_int_double(const void **xpp, size_t nelems, double *ip);
+extern int
+ncx_getn_int_uint(const void **xpp, size_t nelems, unsigned int *ip);
+extern int
+ncx_getn_int_longlong(const void **xpp, size_t nelems, longlong *ip);
+extern int
+ncx_getn_int_ulonglong(const void **xpp, size_t nelems, ulonglong *ip);
+
+extern int
+ncx_putn_int_schar(void **xpp, size_t nelems, const schar *ip);
+extern int
+ncx_putn_int_uchar(void **xpp, size_t nelems, const uchar *ip);
+extern int
+ncx_putn_int_short(void **xpp, size_t nelems, const short *ip);
+extern int
+ncx_putn_int_int(void **xpp, size_t nelems, const int *ip);
+extern int
+ncx_putn_int_long(void **xpp, size_t nelems, const long *ip);
+extern int
+ncx_putn_int_float(void **xpp, size_t nelems, const float *ip);
+extern int
+ncx_putn_int_double(void **xpp, size_t nelems, const double *ip);
+extern int
+ncx_putn_int_uint(void **xpp, size_t nelems, const unsigned int *ip);
+extern int
+ncx_putn_int_longlong(void **xpp, size_t nelems, const longlong *ip);
+extern int
+ncx_putn_int_ulonglong(void **xpp, size_t nelems, const ulonglong *ip);
+ 
+
+extern int
+ncx_getn_float_schar(const void **xpp, size_t nelems, schar *ip);
+extern int
+ncx_getn_float_uchar(const void **xpp, size_t nelems, uchar *ip);
+extern int
+ncx_getn_float_short(const void **xpp, size_t nelems, short *ip);
+extern int
+ncx_getn_float_int(const void **xpp, size_t nelems, int *ip);
+extern int
+ncx_getn_float_long(const void **xpp, size_t nelems, long *ip);
+extern int
+ncx_getn_float_float(const void **xpp, size_t nelems, float *ip);
+extern int
+ncx_getn_float_double(const void **xpp, size_t nelems, double *ip);
+extern int
+ncx_getn_float_uint(const void **xpp, size_t nelems, unsigned int *ip);
+extern int
+ncx_getn_float_longlong(const void **xpp, size_t nelems, longlong *ip);
+extern int
+ncx_getn_float_ulonglong(const void **xpp, size_t nelems, ulonglong *ip);
+
+extern int
+ncx_putn_float_schar(void **xpp, size_t nelems, const schar *ip);
+extern int
+ncx_putn_float_uchar(void **xpp, size_t nelems, const uchar *ip);
+extern int
+ncx_putn_float_short(void **xpp, size_t nelems, const short *ip);
+extern int
+ncx_putn_float_int(void **xpp, size_t nelems, const int *ip);
+extern int
+ncx_putn_float_long(void **xpp, size_t nelems, const long *ip);
+extern int
+ncx_putn_float_float(void **xpp, size_t nelems, const float *ip);
+extern int
+ncx_putn_float_double(void **xpp, size_t nelems, const double *ip);
+extern int
+ncx_putn_float_uint(void **xpp, size_t nelems, const unsigned int *ip);
+extern int
+ncx_putn_float_longlong(void **xpp, size_t nelems, const longlong *ip);
+extern int
+ncx_putn_float_ulonglong(void **xpp, size_t nelems, const ulonglong *ip);
+ 
+
+extern int
+ncx_getn_double_schar(const void **xpp, size_t nelems, schar *ip);
+extern int
+ncx_getn_double_uchar(const void **xpp, size_t nelems, uchar *ip);
+extern int
+ncx_getn_double_short(const void **xpp, size_t nelems, short *ip);
+extern int
+ncx_getn_double_int(const void **xpp, size_t nelems, int *ip);
+extern int
+ncx_getn_double_long(const void **xpp, size_t nelems, long *ip);
+extern int
+ncx_getn_double_float(const void **xpp, size_t nelems, float *ip);
+extern int
+ncx_getn_double_double(const void **xpp, size_t nelems, double *ip);
+extern int
+ncx_getn_double_uint(const void **xpp, size_t nelems, unsigned int *ip);
+extern int
+ncx_getn_double_longlong(const void **xpp, size_t nelems, longlong *ip);
+extern int
+ncx_getn_double_ulonglong(const void **xpp, size_t nelems, ulonglong *ip);
+
+extern int
+ncx_putn_double_schar(void **xpp, size_t nelems, const schar *ip);
+extern int
+ncx_putn_double_uchar(void **xpp, size_t nelems, const uchar *ip);
+extern int
+ncx_putn_double_short(void **xpp, size_t nelems, const short *ip);
+extern int
+ncx_putn_double_int(void **xpp, size_t nelems, const int *ip);
+extern int
+ncx_putn_double_long(void **xpp, size_t nelems, const long *ip);
+extern int
+ncx_putn_double_float(void **xpp, size_t nelems, const float *ip);
+extern int
+ncx_putn_double_double(void **xpp, size_t nelems, const double *ip);
+extern int
+ncx_putn_double_uint(void **xpp, size_t nelems, const unsigned int *ip);
+extern int
+ncx_putn_double_longlong(void **xpp, size_t nelems, const longlong *ip);
+extern int
+ncx_putn_double_ulonglong(void **xpp, size_t nelems, const ulonglong *ip);
+ 
+
+/*
+ * Other aggregate conversion functions.
+ */
+
+/* read ASCII characters */
+extern int
+ncx_getn_text(const void **xpp, size_t nchars, char *cp);
+extern int
+ncx_pad_getn_text(const void **xpp, size_t nchars, char *cp);
+
+/* write ASCII characters */
+extern int
+ncx_putn_text(void **xpp, size_t nchars, const char *cp);
+extern int
+ncx_pad_putn_text(void **xpp, size_t nchars, const char *cp);
+
+/* for symmetry */
+#define ncx_getn_char_char(xpp, nelems, fillp) ncx_getn_text(xpp, nelems, fillp)
+#define ncx_putn_char_char(xpp, nelems, fillp) ncx_putn_text(xpp, nelems, fillp)
+
+/* read opaque data */
+extern int
+ncx_getn_void(const void **xpp, size_t nchars, void *vp);
+extern int
+ncx_pad_getn_void(const void **xpp, size_t nchars, void *vp);
+
+/* write opaque data */
+extern int
+ncx_putn_void(void **xpp, size_t nchars, const void *vp);
+extern int
+ncx_pad_putn_void(void **xpp, size_t nchars, const void *vp);
+
+#endif /* _NCX_H_ */
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/src_netcdf4/netcdf.h
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/src_netcdf4/netcdf.h	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/src_netcdf4/netcdf.h	(revision 1749)
@@ -0,0 +1,1883 @@
+/*! \file
+
+Main header file for the C API.
+
+Copyright 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 University
+Corporation for Atmospheric Research/Unidata. See \ref copyright file
+for more info.
+*/
+
+#ifndef _NETCDF_
+#define _NETCDF_
+
+#include <stddef.h> /* size_t, ptrdiff_t */
+#include <errno.h>  /* netcdf functions sometimes return system errors */
+
+/*! The nc_type type is just an int. */
+typedef int nc_type;
+
+#if defined(__cplusplus)
+extern "C" {
+#endif
+
+/*
+ *  The netcdf external data types
+ */
+#define	NC_NAT 	        0	/**< Not A Type */
+#define	NC_BYTE         1	/**< signed 1 byte integer */
+#define	NC_CHAR 	2	/**< ISO/ASCII character */
+#define	NC_SHORT 	3	/**< signed 2 byte integer */
+#define	NC_INT 	        4	/**< signed 4 byte integer */
+#define NC_LONG         NC_INT  /**< deprecated, but required for backward compatibility. */
+#define	NC_FLOAT 	5	/**< single precision floating point number */
+#define	NC_DOUBLE 	6	/**< double precision floating point number */
+#define	NC_UBYTE 	7	/**< unsigned 1 byte int */
+#define	NC_USHORT 	8	/**< unsigned 2-byte int */
+#define	NC_UINT 	9	/**< unsigned 4-byte int */
+#define	NC_INT64 	10	/**< signed 8-byte int */
+#define	NC_UINT64 	11	/**< unsigned 8-byte int */
+#define	NC_STRING 	12	/**< string */
+
+#define NC_MAX_ATOMIC_TYPE NC_STRING
+
+/* The following are use internally in support of user-defines
+ * types. They are also the class returned by nc_inq_user_type. */
+#define	NC_VLEN 	13	/**< vlen types */
+#define	NC_OPAQUE 	14	/**< opaque types */
+#define	NC_ENUM 	15	/**< enum types */
+#define	NC_COMPOUND 	16	/**< compound types */
+
+/* Define the first user defined type id (leave some room) */
+#define NC_FIRSTUSERTYPEID 32
+
+/** Default fill value. This is used unless _FillValue attribute
+ * is set.  These values are stuffed into newly allocated space as
+ * appropriate.  The hope is that one might use these to notice that a
+ * particular datum has not been set. */
+/**@{*/
+#define NC_FILL_BYTE	((signed char)-127)
+#define NC_FILL_CHAR	((char)0)
+#define NC_FILL_SHORT	((short)-32767)
+#define NC_FILL_INT	(-2147483647L)
+#define NC_FILL_FLOAT	(9.9692099683868690e+36f) /* near 15 * 2^119 */
+#define NC_FILL_DOUBLE	(9.9692099683868690e+36)
+#define NC_FILL_UBYTE   (255)
+#define NC_FILL_USHORT  (65535)
+#define NC_FILL_UINT    (4294967295U)
+#define NC_FILL_INT64   ((long long)-9223372036854775806LL)
+#define NC_FILL_UINT64  ((unsigned long long)18446744073709551614ULL)
+#define NC_FILL_STRING  ""
+/**@}*/
+
+/*! Max or min values for a type. Nothing greater/smaller can be
+ * stored in a netCDF file for their associated types. Recall that a C
+ * compiler may define int to be any length it wants, but a NC_INT is
+ * *always* a 4 byte signed int. On a platform with 64 bit ints,
+ * there will be many ints which are outside the range supported by
+ * NC_INT. But since NC_INT is an external format, it has to mean the
+ * same thing everywhere. */
+/**@{*/
+#define NC_MAX_BYTE 127
+#define NC_MIN_BYTE (-NC_MAX_BYTE-1)
+#define NC_MAX_CHAR 255
+#define NC_MAX_SHORT 32767
+#define NC_MIN_SHORT (-NC_MAX_SHORT - 1)
+#define NC_MAX_INT 2147483647
+#define NC_MIN_INT (-NC_MAX_INT - 1)
+#define NC_MAX_FLOAT 3.402823466e+38f
+#define NC_MIN_FLOAT (-NC_MAX_FLOAT)
+#define NC_MAX_DOUBLE 1.7976931348623157e+308 
+#define NC_MIN_DOUBLE (-NC_MAX_DOUBLE)
+#define NC_MAX_UBYTE NC_MAX_CHAR
+#define NC_MAX_USHORT 65535U
+#define NC_MAX_UINT 4294967295U
+#define NC_MAX_INT64 (9223372036854775807LL)
+#define NC_MIN_INT64 (-9223372036854775807LL-1)
+#define NC_MAX_UINT64 (18446744073709551615ULL)
+#define X_INT64_MAX     (9223372036854775807LL)
+#define X_INT64_MIN     (-X_INT64_MAX - 1)
+#define X_UINT64_MAX    (18446744073709551615ULL)
+/**@}*/
+
+/** Name of fill value attribute.  If you wish a variable to use a
+ * different value than the above defaults, create an attribute with
+ * the same type as the variable and this reserved name. The value you
+ * give the attribute will be used as the fill value for that
+ * variable. */
+#define _FillValue	"_FillValue"
+#define NC_FILL		0	/**< Argument to nc_set_fill() to clear NC_NOFILL */
+#define NC_NOFILL	0x100	/**< Argument to nc_set_fill() to turn off filling of data. */
+
+/* Define the ioflags bits for nc_create and nc_open.
+   currently unused: 0x0010,0x0020,0x0040,0x0080
+   and the whole upper 16 bits
+*/
+
+#define NC_NOWRITE	 0x0000	/**< Set read-only access for nc_open(). */
+#define NC_WRITE    	 0x0001	/**< Set read-write access for nc_open(). */
+/* unused: 0x0002 */
+#define NC_CLOBBER	 0x0000 /**< Destroy existing file. Mode flag for nc_create(). */
+#define NC_NOCLOBBER     0x0004	/**< Don't destroy existing file. Mode flag for nc_create(). */
+
+#define NC_DISKLESS      0x0008  /**< Use diskless file. Mode flag for nc_open() or nc_create(). */
+#define NC_MMAP          0x0010  /**< Use diskless file with mmap. Mode flag for nc_open() or nc_create(). */
+
+#define NC_CLASSIC_MODEL 0x0100 /**< Enforce classic model. Mode flag for nc_create(). */
+#define NC_64BIT_OFFSET  0x0200  /**< Use large (64-bit) file offsets. Mode flag for nc_create(). */
+
+/** \deprecated The following flag currently is ignored, but use in
+ * nc_open() or nc_create() may someday support use of advisory
+ * locking to prevent multiple writers from clobbering a file
+ */
+#define NC_LOCK          0x0400	
+
+/** Share updates, limit cacheing.
+Use this in mode flags for both nc_create() and nc_open(). */
+#define NC_SHARE         0x0800	
+
+#define NC_NETCDF4       0x1000  /**< Use netCDF-4/HDF5 format. Mode flag for nc_create(). */
+
+/** Turn on MPI I/O.
+Use this in mode flags for both nc_create() and nc_open(). */
+#define NC_MPIIO         0x2000 
+/** Turn on MPI POSIX I/O.
+Use this in mode flags for both nc_create() and nc_open(). */
+#define NC_MPIPOSIX      0x4000
+#define NC_PNETCDF       0x8000	/**< Use parallel-netcdf library. Mode flag for nc_open(). */
+
+/** Format specifier for nc_set_default_format().  Starting with
+ * version 3.6, there are different format netCDF files. 4.0
+ * introduces the third one. \see netcdf_format
+ */
+/**@{*/
+#define NC_FORMAT_CLASSIC (1)
+#define NC_FORMAT_64BIT   (2)
+#define NC_FORMAT_NETCDF4 (3)
+#define NC_FORMAT_NETCDF4_CLASSIC  (4)
+/**@}*/
+
+/** Let nc__create() or nc__open() figure out as suitable chunk
+ * size. */
+#define NC_SIZEHINT_DEFAULT 0
+
+/** In nc__enddef(), align to the chunk size. */
+#define NC_ALIGN_CHUNK ((size_t)(-1))
+
+/** Size argument to nc_def_dim() for an unlimited dimension. */
+#define NC_UNLIMITED 0L
+
+/** Attribute id to put/get a global attribute. */
+#define NC_GLOBAL -1
+
+/** 
+Maximum for classic library.
+
+In the classic netCDF model there are maximum values for the number of
+dimensions in the file (\ref NC_MAX_DIMS), the number of global or per
+variable attributes (\ref NC_MAX_ATTRS), the number of variables in
+the file (\ref NC_MAX_VARS), and the length of a name (\ref
+NC_MAX_NAME).
+
+This maximum is enforced by the interface, to facilitate writing
+applications and utilities.  However, nothing is statically allocated
+to this size internally.
+
+This maximum is not used for netCDF-4/HDF5 files unless they were
+created with the ::NC_CLASSIC_MODEL flag.
+
+As a rule, NC_MAX_VAR_DIMS <= NC_MAX_DIMS.
+*/
+/**@{*/
+#define NC_MAX_DIMS	1024	
+#define NC_MAX_ATTRS	8192	
+#define NC_MAX_VARS	8192	
+#define NC_MAX_NAME	256	
+#define NC_MAX_VAR_DIMS	1024 /**< max per variable dimensions */
+/**@}*/
+
+/** This is the max size of an SD dataset name in HDF4 (from HDF4 documentation).*/
+#define NC_MAX_HDF4_NAME 64 
+
+/** In HDF5 files you can set the endianness of variables with
+    nc_def_var_endian(). This define is used there. */   
+/**@{*/
+#define NC_ENDIAN_NATIVE 0
+#define NC_ENDIAN_LITTLE 1
+#define NC_ENDIAN_BIG    2
+/**@}*/
+
+/** In HDF5 files you can set storage for each variable to be either
+ * contiguous or chunked, with nc_def_var_chunking().  This define is
+ * used there. */
+/**@{*/
+#define NC_CHUNKED    0
+#define NC_CONTIGUOUS 1
+/**@}*/
+
+/** In HDF5 files you can set check-summing for each variable.
+Currently the only checksum available is Fletcher-32, which can be set
+with the function nc_def_var_fletcher32.  These defines are used
+there. */
+/**@{*/
+#define NC_NOCHECKSUM 0
+#define NC_FLETCHER32 1
+/**@}*/
+
+/**@{*/
+/** Control the HDF5 shuffle filter. In HDF5 files you can specify
+ * that a shuffle filter should be used on each chunk of a variable to
+ * improve compression for that variable. This per-variable shuffle
+ * property can be set with the function nc_def_var_deflate(). */
+#define NC_NOSHUFFLE 0
+#define NC_SHUFFLE   1
+/**@}*/
+
+/** The netcdf version 3 functions all return integer error status.
+ * These are the possible values, in addition to certain values from
+ * the system errno.h.
+ */
+#define NC_ISSYSERR(err)	((err) > 0)
+
+#define	NC_NOERR	0   /**< No Error */
+#define NC2_ERR         (-1)       /**< Returned for all errors in the v2 API. */
+
+/** Not a netcdf id.
+
+The specified netCDF ID does not refer to an
+open netCDF dataset. */
+#define	NC_EBADID	(-33)	   
+#define	NC_ENFILE	(-34)	   /**< Too many netcdfs open */
+#define	NC_EEXIST	(-35)	   /**< netcdf file exists && NC_NOCLOBBER */
+#define	NC_EINVAL	(-36)	   /**< Invalid Argument */
+#define	NC_EPERM	(-37)	   /**< Write to read only */
+
+/** Operation not allowed in data mode. This is returned for netCDF
+classic or 64-bit offset files, or for netCDF-4 files, when they were
+been created with ::NC_CLASSIC_MODEL flag in nc_create(). */
+#define NC_ENOTINDEFINE	(-38)	   
+
+/** Operation not allowed in define mode.
+
+The specified netCDF is in define mode rather than data mode. 
+
+With netCDF-4/HDF5 files, this error will not occur, unless
+::NC_CLASSIC_MODEL was used in nc_create().
+ */
+#define	NC_EINDEFINE	(-39)	   
+
+/** Index exceeds dimension bound.
+
+The specified corner indices were out of range for the rank of the
+specified variable. For example, a negative index or an index that is
+larger than the corresponding dimension length will cause an error. */
+#define	NC_EINVALCOORDS	(-40)	   
+#define	NC_EMAXDIMS	(-41)	   /**< NC_MAX_DIMS exceeded */
+#define	NC_ENAMEINUSE	(-42)	   /**< String match to name in use */
+#define NC_ENOTATT	(-43)	   /**< Attribute not found */
+#define	NC_EMAXATTS	(-44)	   /**< NC_MAX_ATTRS exceeded */
+#define NC_EBADTYPE	(-45)	   /**< Not a netcdf data type */
+#define NC_EBADDIM	(-46)	   /**< Invalid dimension id or name */
+#define NC_EUNLIMPOS	(-47)	   /**< NC_UNLIMITED in the wrong index */
+
+/** NC_MAX_VARS exceeded. Max number of variables exceeded in a
+classic or 64-bit offset file, or an netCDF-4 file with
+::NC_CLASSIC_MODEL on. */
+#define	NC_EMAXVARS	(-48)	   
+
+/** Variable not found.
+
+The variable ID is invalid for the specified netCDF dataset. */
+#define NC_ENOTVAR	(-49)	   
+#define NC_EGLOBAL	(-50)	   /**< Action prohibited on NC_GLOBAL varid */
+#define NC_ENOTNC	(-51)	   /**< Not a netcdf file */
+#define NC_ESTS        	(-52)	   /**< In Fortran, string too short */
+#define NC_EMAXNAME    	(-53)	   /**< NC_MAX_NAME exceeded */
+#define NC_EUNLIMIT    	(-54)	   /**< NC_UNLIMITED size already in use */
+#define NC_ENORECVARS  	(-55)	   /**< nc_rec op when there are no record vars */
+#define NC_ECHAR	(-56)	   /**< Attempt to convert between text & numbers */
+
+/** Start+count exceeds dimension bound.
+
+The specified edge lengths added to the specified corner would have
+referenced data out of range for the rank of the specified
+variable. For example, an edge length that is larger than the
+corresponding dimension length minus the corner index will cause an
+error. */
+#define NC_EEDGE	(-57)	   
+#define NC_ESTRIDE	(-58)	   /**< Illegal stride */
+#define NC_EBADNAME	(-59)	   /**< Attribute or variable name contains illegal characters */
+/* N.B. following must match value in ncx.h */
+
+/** Math result not representable.
+
+One or more of the values are out of the range of values representable
+by the desired type. */
+#define NC_ERANGE	(-60)	   
+#define NC_ENOMEM	(-61)	   /**< Memory allocation (malloc) failure */
+#define NC_EVARSIZE     (-62)      /**< One or more variable sizes violate format constraints */ 
+#define NC_EDIMSIZE     (-63)      /**< Invalid dimension size */
+#define NC_ETRUNC       (-64)      /**< File likely truncated or possibly corrupted */
+#define NC_EAXISTYPE    (-65)      /**< Unknown axis type. */
+
+/* Following errors are added for DAP */
+#define NC_EDAP         (-66)      /**< Generic DAP error */
+#define NC_ECURL        (-67)      /**< Generic libcurl error */
+#define NC_EIO          (-68)      /**< Generic IO error */
+#define NC_ENODATA      (-69)      /**< Attempt to access variable with no data */
+#define NC_EDAPSVC      (-70)      /**< DAP server error */
+#define NC_EDAS		(-71)      /**< Malformed or inaccessible DAS */
+#define NC_EDDS		(-72)      /**< Malformed or inaccessible DDS */
+#define NC_EDATADDS	(-73)      /**< Malformed or inaccessible DATADDS */
+#define NC_EDAPURL	(-74)      /**< Malformed DAP URL */
+#define NC_EDAPCONSTRAINT (-75)      /**< Malformed DAP Constraint*/
+#define NC_ETRANSLATION (-76)      /**< Untranslatable construct */
+
+/* The following was added in support of netcdf-4. Make all netcdf-4
+   error codes < -100 so that errors can be added to netcdf-3 if
+   needed. */
+#define NC4_FIRST_ERROR  (-100)
+
+/** Error at HDF5 layer. */
+#define NC_EHDFERR       (-101)    
+#define NC_ECANTREAD     (-102)    /**< Can't read. */
+#define NC_ECANTWRITE    (-103)    /**< Can't write. */
+#define NC_ECANTCREATE   (-104)    /**< Can't create. */
+#define NC_EFILEMETA     (-105)    /**< Problem with file metadata. */
+#define NC_EDIMMETA      (-106)    /**< Problem with dimension metadata. */
+#define NC_EATTMETA      (-107)    /**< Problem with attribute metadata. */
+#define NC_EVARMETA      (-108)    /**< Problem with variable metadata. */
+#define NC_ENOCOMPOUND   (-109)    /**< Not a compound type. */
+#define NC_EATTEXISTS    (-110)    /**< Attribute already exists. */
+#define NC_ENOTNC4       (-111)    /**< Attempting netcdf-4 operation on netcdf-3 file. */  
+
+/** Attempting netcdf-4 operation on strict nc3 netcdf-4 file. */  
+#define NC_ESTRICTNC3    (-112)    
+#define NC_ENOTNC3       (-113)    /**< Attempting netcdf-3 operation on netcdf-4 file. */  
+#define NC_ENOPAR        (-114)    /**< Parallel operation on file opened for non-parallel access. */  
+#define NC_EPARINIT      (-115)    /**< Error initializing for parallel access. */  
+#define NC_EBADGRPID     (-116)    /**< Bad group ID. */  
+#define NC_EBADTYPID     (-117)    /**< Bad type ID. */  
+#define NC_ETYPDEFINED   (-118)    /**< Type has already been defined and may not be edited. */
+#define NC_EBADFIELD     (-119)    /**< Bad field ID. */  
+#define NC_EBADCLASS     (-120)    /**< Bad class. */  
+#define NC_EMAPTYPE      (-121)    /**< Mapped access for atomic types only. */  
+#define NC_ELATEFILL     (-122)    /**< Attempt to define fill value when data already exists. */
+#define NC_ELATEDEF      (-123)    /**< Attempt to define var properties, like deflate, after enddef. */
+#define NC_EDIMSCALE     (-124)    /**< Probem with HDF5 dimscales. */
+#define NC_ENOGRP        (-125)    /**< No group found. */
+#define NC_ESTORAGE      (-126)    /**< Can't specify both contiguous and chunking. */
+#define NC_EBADCHUNK     (-127)    /**< Bad chunksize. */
+#define NC_ENOTBUILT     (-128)    /**< Attempt to use feature that was not turned on when netCDF was built. */
+#define NC_EDISKLESS     (-129)    /**< Error in using diskless  access. */ 
+
+#define NC4_LAST_ERROR   (-129) 
+
+/* This is used in netCDF-4 files for dimensions without coordinate
+ * vars. */
+#define DIM_WITHOUT_VARIABLE "This is a netCDF dimension but not a netCDF variable."
+
+/* This is here at the request of the NCO team to support our
+ * mistake of having chunksizes be first ints, then size_t. Doh! */
+#define NC_HAVE_NEW_CHUNKING_API 1
+
+
+/*Errors for all remote access methods(e.g. DAP and CDMREMOTE)*/
+#define NC_EURL		(NC_EDAPURL)   /* Malformed URL */
+#define NC_ECONSTRAINT  (NC_EDAPCONSTRAINT)   /* Malformed Constraint*/
+
+
+/*
+ * The Interface
+ */
+
+/* Declaration modifiers for DLL support (MSC et al) */
+
+#if defined(DLL_NETCDF) /* define when library is a DLL */
+#  if defined(DLL_EXPORT) /* define when building the library */
+#   define MSC_EXTRA __declspec(dllexport)
+#  else
+#   define MSC_EXTRA __declspec(dllimport)
+#  endif
+#include <io.h>
+/*#define lseek _lseeki64
+  #define off_t __int64*/
+#else
+#define MSC_EXTRA
+#endif	/* defined(DLL_NETCDF) */
+
+# define EXTERNL MSC_EXTRA extern
+
+#if defined(DLL_NETCDF) /* define when library is a DLL */
+EXTERNL int ncerr;
+EXTERNL int ncopts;
+#endif
+
+EXTERNL const char *
+nc_inq_libvers(void);
+
+EXTERNL const char *
+nc_strerror(int ncerr);
+
+EXTERNL int
+nc__create(const char *path, int cmode, size_t initialsz,
+	 size_t *chunksizehintp, int *ncidp);
+
+EXTERNL int
+nc_create(const char *path, int cmode, int *ncidp);
+
+EXTERNL int
+nc__open(const char *path, int mode, 
+	size_t *chunksizehintp, int *ncidp);
+
+EXTERNL int
+nc_open(const char *path, int mode, int *ncidp);
+
+/* Learn the path used to open/create the file. */
+EXTERNL int
+nc_inq_path(int ncid, size_t *pathlen, char *path);
+
+/* Use these with nc_var_par_access(). */
+#define NC_INDEPENDENT 0
+#define NC_COLLECTIVE 1
+
+/* Set parallel access for a variable to independent (the default) or
+ * collective. */
+EXTERNL int
+nc_var_par_access(int ncid, int varid, int par_access);
+
+/* Given an ncid and group name (NULL gets root group), return
+ * locid. */
+EXTERNL int
+nc_inq_ncid(int ncid, const char *name, int *grp_ncid);
+
+/* Given a location id, return the number of groups it contains, and
+ * an array of their locids. */
+EXTERNL int
+nc_inq_grps(int ncid, int *numgrps, int *ncids);
+
+/* Given locid, find name of group. (Root group is named "/".) */
+EXTERNL int
+nc_inq_grpname(int ncid, char *name);
+
+/* Given ncid, find full name and len of full name. (Root group is
+ * named "/", with length 1.) */
+EXTERNL int
+nc_inq_grpname_full(int ncid, size_t *lenp, char *full_name);
+
+/* Given ncid, find len of full name. */
+EXTERNL int
+nc_inq_grpname_len(int ncid, size_t *lenp);
+
+/* Given an ncid, find the ncid of its parent group. */
+EXTERNL int
+nc_inq_grp_parent(int ncid, int *parent_ncid);
+
+/* Given a name and parent ncid, find group ncid. */
+EXTERNL int
+nc_inq_grp_ncid(int ncid, const char *grp_name, int *grp_ncid);
+
+/* Given a full name and ncid, find group ncid. */
+EXTERNL int
+nc_inq_grp_full_ncid(int ncid, const char *full_name, int *grp_ncid);
+
+/* Get a list of ids for all the variables in a group. */
+EXTERNL int 
+nc_inq_varids(int ncid, int *nvars, int *varids);
+
+/* Find all dimids for a location. This finds all dimensions in a
+ * group, or any of its parents. */
+EXTERNL int 
+nc_inq_dimids(int ncid, int *ndims, int *dimids, int include_parents);
+
+/* Find all user-defined types for a location. This finds all
+ * user-defined types in a group. */
+EXTERNL int 
+nc_inq_typeids(int ncid, int *ntypes, int *typeids);
+
+/* Are two types equal? */
+EXTERNL int
+nc_inq_type_equal(int ncid1, nc_type typeid1, int ncid2, 
+		  nc_type typeid2, int *equal);
+
+/* Create a group. its ncid is returned in the new_ncid pointer. */
+EXTERNL int
+nc_def_grp(int parent_ncid, const char *name, int *new_ncid);
+
+/* Here are functions for dealing with compound types. */
+
+/* Create a compound type. */
+EXTERNL int
+nc_def_compound(int ncid, size_t size, const char *name, nc_type *typeidp);
+
+/* Insert a named field into a compound type. */
+EXTERNL int
+nc_insert_compound(int ncid, nc_type xtype, const char *name, 
+		   size_t offset, nc_type field_typeid);
+
+/* Insert a named array into a compound type. */
+EXTERNL int
+nc_insert_array_compound(int ncid, nc_type xtype, const char *name, 
+			 size_t offset, nc_type field_typeid,
+			 int ndims, const int *dim_sizes);
+
+/* Get the name and size of a type. */
+EXTERNL int
+nc_inq_type(int ncid, nc_type xtype, char *name, size_t *size);
+
+/* Get the id of a type from the name. */
+EXTERNL int
+nc_inq_typeid(int ncid, const char *name, nc_type *typeidp);
+
+/* Get the name, size, and number of fields in a compound type. */
+EXTERNL int
+nc_inq_compound(int ncid, nc_type xtype, char *name, size_t *sizep, 
+		size_t *nfieldsp);
+
+/* Get the name of a compound type. */
+EXTERNL int
+nc_inq_compound_name(int ncid, nc_type xtype, char *name);
+
+/* Get the size of a compound type. */
+EXTERNL int
+nc_inq_compound_size(int ncid, nc_type xtype, size_t *sizep);
+
+/* Get the number of fields in this compound type. */
+EXTERNL int
+nc_inq_compound_nfields(int ncid, nc_type xtype, size_t *nfieldsp);
+
+/* Given the xtype and the fieldid, get all info about it. */
+EXTERNL int
+nc_inq_compound_field(int ncid, nc_type xtype, int fieldid, char *name, 
+		      size_t *offsetp, nc_type *field_typeidp, int *ndimsp, 
+		      int *dim_sizesp);
+
+/* Given the typeid and the fieldid, get the name. */
+EXTERNL int
+nc_inq_compound_fieldname(int ncid, nc_type xtype, int fieldid, 
+			  char *name);
+
+/* Given the xtype and the name, get the fieldid. */
+EXTERNL int
+nc_inq_compound_fieldindex(int ncid, nc_type xtype, const char *name, 
+			   int *fieldidp);
+
+/* Given the xtype and fieldid, get the offset. */
+EXTERNL int
+nc_inq_compound_fieldoffset(int ncid, nc_type xtype, int fieldid, 
+			    size_t *offsetp);
+
+/* Given the xtype and the fieldid, get the type of that field. */
+EXTERNL int
+nc_inq_compound_fieldtype(int ncid, nc_type xtype, int fieldid, 
+			  nc_type *field_typeidp);
+
+/* Given the xtype and the fieldid, get the number of dimensions for
+ * that field (scalars are 0). */
+EXTERNL int
+nc_inq_compound_fieldndims(int ncid, nc_type xtype, int fieldid, 
+			   int *ndimsp);
+
+/* Given the xtype and the fieldid, get the sizes of dimensions for
+ * that field. User must have allocated storage for the dim_sizes. */
+EXTERNL int
+nc_inq_compound_fielddim_sizes(int ncid, nc_type xtype, int fieldid, 
+			       int *dim_sizes);
+
+/** This is the type of arrays of vlens. */
+typedef struct {
+    size_t len; /**< Length of VL data (in base type units) */
+    void *p;    /**< Pointer to VL data */
+} nc_vlen_t;
+
+/** Calculate an offset for creating a compound type. This calls a
+ * mysterious C macro which was found carved into one of the blocks of
+ * the Newgrange passage tomb in County Meath, Ireland. This code has
+ * been carbon dated to 3200 B.C.E. */
+#define NC_COMPOUND_OFFSET(S,M)    (offsetof(S,M))
+
+/* Create a variable length type. */
+EXTERNL int
+nc_def_vlen(int ncid, const char *name, nc_type base_typeid, nc_type *xtypep);
+
+/* Find out about a vlen. */
+EXTERNL int
+nc_inq_vlen(int ncid, nc_type xtype, char *name, size_t *datum_sizep, 
+	    nc_type *base_nc_typep);
+
+/* When you read VLEN type the library will actually allocate the
+ * storage space for the data. This storage space must be freed, so
+ * pass the pointer back to this function, when you're done with the
+ * data, and it will free the vlen memory. */
+EXTERNL int
+nc_free_vlen(nc_vlen_t *vl);
+
+EXTERNL int
+nc_free_vlens(size_t len, nc_vlen_t vlens[]);
+
+/* Put or get one element in a vlen array. */
+EXTERNL int
+nc_put_vlen_element(int ncid, int typeid1, void *vlen_element, 
+		    size_t len, const void *data);
+
+EXTERNL int
+nc_get_vlen_element(int ncid, int typeid1, const void *vlen_element, 
+		    size_t *len, void *data);
+   
+/* When you read the string type the library will allocate the storage
+ * space for the data. This storage space must be freed, so pass the
+ * pointer back to this function, when you're done with the data, and
+ * it will free the string memory. */
+EXTERNL int
+nc_free_string(size_t len, char **data);
+
+/* Find out about a user defined type. */
+EXTERNL int
+nc_inq_user_type(int ncid, nc_type xtype, char *name, size_t *size, 
+		 nc_type *base_nc_typep, size_t *nfieldsp, int *classp);
+
+/* Write an attribute of any type. */
+EXTERNL int
+nc_put_att(int ncid, int varid, const char *name, nc_type xtype, 
+	   size_t len, const void *op);
+
+/* Read an attribute of any type. */
+EXTERNL int
+nc_get_att(int ncid, int varid, const char *name, void *ip);
+
+/* Enum type. */
+
+/* Create an enum type. Provide a base type and a name. At the moment
+ * only ints are accepted as base types. */
+EXTERNL int
+nc_def_enum(int ncid, nc_type base_typeid, const char *name, 
+	    nc_type *typeidp);
+
+/* Insert a named value into an enum type. The value must fit within
+ * the size of the enum type, the name size must be <= NC_MAX_NAME. */
+EXTERNL int
+nc_insert_enum(int ncid, nc_type xtype, const char *name, 
+	       const void *value);
+
+/* Get information about an enum type: its name, base type and the
+ * number of members defined. */
+EXTERNL int
+nc_inq_enum(int ncid, nc_type xtype, char *name, nc_type *base_nc_typep, 
+	    size_t *base_sizep, size_t *num_membersp);
+
+/* Get information about an enum member: a name and value. Name size
+ * will be <= NC_MAX_NAME. */
+EXTERNL int
+nc_inq_enum_member(int ncid, nc_type xtype, int idx, char *name, 
+		   void *value);
+
+
+/* Get enum name from enum value. Name size will be <= NC_MAX_NAME. */
+EXTERNL int
+nc_inq_enum_ident(int ncid, nc_type xtype, long long value, char *identifier);
+
+/* Opaque type. */
+
+/* Create an opaque type. Provide a size and a name. */
+EXTERNL int
+nc_def_opaque(int ncid, size_t size, const char *name, nc_type *xtypep);
+
+/* Get information about an opaque type. */
+EXTERNL int
+nc_inq_opaque(int ncid, nc_type xtype, char *name, size_t *sizep);
+
+/* Write entire var of any type. */
+EXTERNL int
+nc_put_var(int ncid, int varid,  const void *op);
+
+/* Read entire var of any type. */
+EXTERNL int
+nc_get_var(int ncid, int varid,  void *ip);
+
+/* Write one value. */
+EXTERNL int
+nc_put_var1(int ncid, int varid,  const size_t *indexp,
+	    const void *op);
+
+/* Read one value. */
+EXTERNL int
+nc_get_var1(int ncid, int varid,  const size_t *indexp, void *ip);
+
+/* Write an array of values. */
+EXTERNL int
+nc_put_vara(int ncid, int varid,  const size_t *startp, 
+	    const size_t *countp, const void *op);
+
+/* Read an array of values. */
+EXTERNL int
+nc_get_vara(int ncid, int varid,  const size_t *startp, 
+	    const size_t *countp, void *ip);
+
+/* Write slices of an array of values. */
+EXTERNL int
+nc_put_vars(int ncid, int varid,  const size_t *startp, 
+	    const size_t *countp, const ptrdiff_t *stridep,
+	    const void *op);
+
+/* Read slices of an array of values. */
+EXTERNL int
+nc_get_vars(int ncid, int varid,  const size_t *startp, 
+	    const size_t *countp, const ptrdiff_t *stridep,
+	    void *ip);
+
+/* Write mapped slices of an array of values. */
+EXTERNL int
+nc_put_varm(int ncid, int varid,  const size_t *startp, 
+	    const size_t *countp, const ptrdiff_t *stridep,
+	    const ptrdiff_t *imapp, const void *op);
+
+/* Read mapped slices of an array of values. */
+EXTERNL int
+nc_get_varm(int ncid, int varid,  const size_t *startp, 
+	    const size_t *countp, const ptrdiff_t *stridep,
+	    const ptrdiff_t *imapp, void *ip);
+
+/* Extra netcdf-4 stuff. */
+
+/* Set compression settings for a variable. Lower is faster, higher is
+ * better. Must be called after nc_def_var and before nc_enddef. */
+EXTERNL int
+nc_def_var_deflate(int ncid, int varid, int shuffle, int deflate, 
+		   int deflate_level);
+
+/* Find out compression settings of a var. */
+EXTERNL int
+nc_inq_var_deflate(int ncid, int varid, int *shufflep, 
+		   int *deflatep, int *deflate_levelp);
+
+/* Find out szip settings of a var. */
+EXTERNL int
+nc_inq_var_szip(int ncid, int varid, int *options_maskp, int *pixels_per_blockp);
+
+/* Set fletcher32 checksum for a var. This must be done after nc_def_var
+   and before nc_enddef. */
+EXTERNL int
+nc_def_var_fletcher32(int ncid, int varid, int fletcher32);
+   
+/* Inquire about fletcher32 checksum for a var. */
+EXTERNL int
+nc_inq_var_fletcher32(int ncid, int varid, int *fletcher32p);
+
+/* Define chunking for a variable. This must be done after nc_def_var
+   and before nc_enddef. */
+EXTERNL int
+nc_def_var_chunking(int ncid, int varid, int storage, const size_t *chunksizesp);
+
+/* Inq chunking stuff for a var. */
+EXTERNL int
+nc_inq_var_chunking(int ncid, int varid, int *storagep, size_t *chunksizesp);
+
+/* Define fill value behavior for a variable. This must be done after
+   nc_def_var and before nc_enddef. */
+EXTERNL int
+nc_def_var_fill(int ncid, int varid, int no_fill, const void *fill_value);
+
+/* Inq fill value setting for a var. */
+EXTERNL int
+nc_inq_var_fill(int ncid, int varid, int *no_fill, void *fill_valuep);
+
+/* Define the endianness of a variable. */
+EXTERNL int
+nc_def_var_endian(int ncid, int varid, int endian);
+
+/* Learn about the endianness of a variable. */
+EXTERNL int
+nc_inq_var_endian(int ncid, int varid, int *endianp);
+
+/* Set the fill mode (classic or 64-bit offset files only). */
+EXTERNL int
+nc_set_fill(int ncid, int fillmode, int *old_modep);
+
+/* Set the default nc_create format to NC_FORMAT_CLASSIC,
+ * NC_FORMAT_64BIT, NC_FORMAT_NETCDF4, NC_FORMAT_NETCDF4_CLASSIC. */
+EXTERNL int
+nc_set_default_format(int format, int *old_formatp);
+
+/* Set the cache size, nelems, and preemption policy. */
+EXTERNL int
+nc_set_chunk_cache(size_t size, size_t nelems, float preemption);
+
+/* Get the cache size, nelems, and preemption policy. */
+EXTERNL int
+nc_get_chunk_cache(size_t *sizep, size_t *nelemsp, float *preemptionp);
+
+/* Set the per-variable cache size, nelems, and preemption policy. */
+EXTERNL int
+nc_set_var_chunk_cache(int ncid, int varid, size_t size, size_t nelems, 
+		       float preemption);
+
+/* Set the per-variable cache size, nelems, and preemption policy. */
+EXTERNL int
+nc_get_var_chunk_cache(int ncid, int varid, size_t *sizep, size_t *nelemsp, 
+		       float *preemptionp);
+
+EXTERNL int
+nc_redef(int ncid);
+
+EXTERNL int
+nc__enddef(int ncid, size_t h_minfree, size_t v_align,
+	size_t v_minfree, size_t r_align);
+
+EXTERNL int
+nc_enddef(int ncid);
+
+EXTERNL int
+nc_sync(int ncid);
+
+EXTERNL int
+nc_abort(int ncid);
+
+EXTERNL int
+nc_close(int ncid);
+
+EXTERNL int
+nc_inq(int ncid, int *ndimsp, int *nvarsp, int *nattsp, int *unlimdimidp);
+
+EXTERNL int 
+nc_inq_ndims(int ncid, int *ndimsp);
+
+EXTERNL int 
+nc_inq_nvars(int ncid, int *nvarsp);
+
+EXTERNL int 
+nc_inq_natts(int ncid, int *nattsp);
+
+EXTERNL int 
+nc_inq_unlimdim(int ncid, int *unlimdimidp);
+
+/* The next function is for NetCDF-4 only */
+EXTERNL int 
+nc_inq_unlimdims(int ncid, int *nunlimdimsp, int *unlimdimidsp);
+
+/* Added in 3.6.1 to return format of netCDF file. */
+EXTERNL int
+nc_inq_format(int ncid, int *formatp);
+
+/* Begin _dim */
+
+EXTERNL int
+nc_def_dim(int ncid, const char *name, size_t len, int *idp);
+
+EXTERNL int
+nc_inq_dimid(int ncid, const char *name, int *idp);
+
+EXTERNL int
+nc_inq_dim(int ncid, int dimid, char *name, size_t *lenp);
+
+EXTERNL int 
+nc_inq_dimname(int ncid, int dimid, char *name);
+
+EXTERNL int 
+nc_inq_dimlen(int ncid, int dimid, size_t *lenp);
+
+EXTERNL int
+nc_rename_dim(int ncid, int dimid, const char *name);
+
+/* End _dim */
+/* Begin _att */
+
+EXTERNL int
+nc_inq_att(int ncid, int varid, const char *name,
+	   nc_type *xtypep, size_t *lenp);
+
+EXTERNL int 
+nc_inq_attid(int ncid, int varid, const char *name, int *idp);
+
+EXTERNL int 
+nc_inq_atttype(int ncid, int varid, const char *name, nc_type *xtypep);
+
+EXTERNL int 
+nc_inq_attlen(int ncid, int varid, const char *name, size_t *lenp);
+
+EXTERNL int
+nc_inq_attname(int ncid, int varid, int attnum, char *name);
+
+EXTERNL int
+nc_copy_att(int ncid_in, int varid_in, const char *name, int ncid_out, int varid_out);
+
+EXTERNL int
+nc_rename_att(int ncid, int varid, const char *name, const char *newname);
+
+EXTERNL int
+nc_del_att(int ncid, int varid, const char *name);
+
+/* End _att */
+/* Begin {put,get}_att */
+
+EXTERNL int
+nc_put_att_text(int ncid, int varid, const char *name,
+		size_t len, const char *op);
+
+EXTERNL int
+nc_get_att_text(int ncid, int varid, const char *name, char *ip);
+
+EXTERNL int
+nc_put_att_uchar(int ncid, int varid, const char *name, nc_type xtype,
+		 size_t len, const unsigned char *op);
+
+EXTERNL int
+nc_get_att_uchar(int ncid, int varid, const char *name, unsigned char *ip);
+
+EXTERNL int
+nc_put_att_schar(int ncid, int varid, const char *name, nc_type xtype,
+		 size_t len, const signed char *op);
+
+EXTERNL int
+nc_get_att_schar(int ncid, int varid, const char *name, signed char *ip);
+
+EXTERNL int
+nc_put_att_short(int ncid, int varid, const char *name, nc_type xtype,
+		 size_t len, const short *op);
+
+EXTERNL int
+nc_get_att_short(int ncid, int varid, const char *name, short *ip);
+
+EXTERNL int
+nc_put_att_int(int ncid, int varid, const char *name, nc_type xtype,
+	       size_t len, const int *op);
+
+EXTERNL int
+nc_get_att_int(int ncid, int varid, const char *name, int *ip);
+
+EXTERNL int
+nc_put_att_long(int ncid, int varid, const char *name, nc_type xtype,
+		size_t len, const long *op);
+
+EXTERNL int
+nc_get_att_long(int ncid, int varid, const char *name, long *ip);
+
+EXTERNL int
+nc_put_att_float(int ncid, int varid, const char *name, nc_type xtype,
+		 size_t len, const float *op);
+
+EXTERNL int
+nc_get_att_float(int ncid, int varid, const char *name, float *ip);
+
+EXTERNL int
+nc_put_att_double(int ncid, int varid, const char *name, nc_type xtype,
+		  size_t len, const double *op);
+
+EXTERNL int
+nc_get_att_double(int ncid, int varid, const char *name, double *ip);
+
+EXTERNL int
+nc_put_att_ushort(int ncid, int varid, const char *name, nc_type xtype,
+		  size_t len, const unsigned short *op);
+
+EXTERNL int
+nc_get_att_ushort(int ncid, int varid, const char *name, unsigned short *ip);
+
+EXTERNL int
+nc_put_att_uint(int ncid, int varid, const char *name, nc_type xtype,
+		size_t len, const unsigned int *op);
+
+EXTERNL int
+nc_get_att_uint(int ncid, int varid, const char *name, unsigned int *ip);
+
+EXTERNL int
+nc_put_att_longlong(int ncid, int varid, const char *name, nc_type xtype,
+		 size_t len, const long long *op);
+
+EXTERNL int
+nc_get_att_longlong(int ncid, int varid, const char *name, long long *ip);
+
+EXTERNL int
+nc_put_att_ulonglong(int ncid, int varid, const char *name, nc_type xtype,
+		     size_t len, const unsigned long long *op);
+
+EXTERNL int
+nc_get_att_ulonglong(int ncid, int varid, const char *name, 
+		     unsigned long long *ip);
+
+EXTERNL int
+nc_put_att_string(int ncid, int varid, const char *name, 
+		  size_t len, const char **op);
+
+EXTERNL int
+nc_get_att_string(int ncid, int varid, const char *name, char **ip);
+
+/* End {put,get}_att */
+/* Begin _var */
+
+EXTERNL int
+nc_def_var(int ncid, const char *name, nc_type xtype, int ndims, 
+	   const int *dimidsp, int *varidp);
+
+EXTERNL int
+nc_inq_var(int ncid, int varid, char *name, nc_type *xtypep, 
+	   int *ndimsp, int *dimidsp, int *nattsp);
+
+EXTERNL int
+nc_inq_varid(int ncid, const char *name, int *varidp);
+
+EXTERNL int 
+nc_inq_varname(int ncid, int varid, char *name);
+
+EXTERNL int 
+nc_inq_vartype(int ncid, int varid, nc_type *xtypep);
+
+EXTERNL int 
+nc_inq_varndims(int ncid, int varid, int *ndimsp);
+
+EXTERNL int 
+nc_inq_vardimid(int ncid, int varid, int *dimidsp);
+
+EXTERNL int 
+nc_inq_varnatts(int ncid, int varid, int *nattsp);
+
+EXTERNL int
+nc_rename_var(int ncid, int varid, const char *name);
+
+EXTERNL int
+nc_copy_var(int ncid_in, int varid, int ncid_out);
+
+#ifndef ncvarcpy
+/* support the old name for now */
+#define ncvarcpy(ncid_in, varid, ncid_out) ncvarcopy((ncid_in), (varid), (ncid_out))
+#endif
+
+/* End _var */
+/* Begin {put,get}_var1 */
+
+EXTERNL int
+nc_put_var1_text(int ncid, int varid, const size_t *indexp, const char *op);
+
+EXTERNL int
+nc_get_var1_text(int ncid, int varid, const size_t *indexp, char *ip);
+
+EXTERNL int
+nc_put_var1_uchar(int ncid, int varid, const size_t *indexp,
+		  const unsigned char *op);
+
+EXTERNL int
+nc_get_var1_uchar(int ncid, int varid, const size_t *indexp,
+		  unsigned char *ip);
+
+EXTERNL int
+nc_put_var1_schar(int ncid, int varid, const size_t *indexp,
+		  const signed char *op);
+
+EXTERNL int
+nc_get_var1_schar(int ncid, int varid, const size_t *indexp,
+		  signed char *ip);
+
+EXTERNL int
+nc_put_var1_short(int ncid, int varid, const size_t *indexp,
+		  const short *op);
+
+EXTERNL int
+nc_get_var1_short(int ncid, int varid, const size_t *indexp,
+		  short *ip);
+
+EXTERNL int
+nc_put_var1_int(int ncid, int varid, const size_t *indexp, const int *op);
+
+EXTERNL int
+nc_get_var1_int(int ncid, int varid, const size_t *indexp, int *ip);
+
+EXTERNL int
+nc_put_var1_long(int ncid, int varid, const size_t *indexp, const long *op);
+
+EXTERNL int
+nc_get_var1_long(int ncid, int varid, const size_t *indexp, long *ip);
+
+EXTERNL int
+nc_put_var1_float(int ncid, int varid, const size_t *indexp, const float *op);
+
+EXTERNL int
+nc_get_var1_float(int ncid, int varid, const size_t *indexp, float *ip);
+
+EXTERNL int
+nc_put_var1_double(int ncid, int varid, const size_t *indexp, const double *op);
+
+EXTERNL int
+nc_get_var1_double(int ncid, int varid, const size_t *indexp, double *ip);
+
+EXTERNL int
+nc_put_var1_ushort(int ncid, int varid, const size_t *indexp, 
+		   const unsigned short *op);
+
+EXTERNL int
+nc_get_var1_ushort(int ncid, int varid, const size_t *indexp, 
+		   unsigned short *ip);
+
+EXTERNL int
+nc_put_var1_uint(int ncid, int varid, const size_t *indexp, 
+		 const unsigned int *op);
+
+EXTERNL int
+nc_get_var1_uint(int ncid, int varid, const size_t *indexp, 
+		 unsigned int *ip);
+
+EXTERNL int
+nc_put_var1_longlong(int ncid, int varid, const size_t *indexp, 
+		     const long long *op);
+
+EXTERNL int
+nc_get_var1_longlong(int ncid, int varid, const size_t *indexp, 
+		  long long *ip);
+
+EXTERNL int
+nc_put_var1_ulonglong(int ncid, int varid, const size_t *indexp, 
+		   const unsigned long long *op);
+
+EXTERNL int
+nc_get_var1_ulonglong(int ncid, int varid, const size_t *indexp, 
+		   unsigned long long *ip);
+
+EXTERNL int
+nc_put_var1_string(int ncid, int varid, const size_t *indexp, 
+		   const char **op);
+
+EXTERNL int
+nc_get_var1_string(int ncid, int varid, const size_t *indexp, 
+		   char **ip);
+
+/* End {put,get}_var1 */
+/* Begin {put,get}_vara */
+
+EXTERNL int
+nc_put_vara_text(int ncid, int varid, const size_t *startp, 
+		 const size_t *countp, const char *op);
+
+EXTERNL int
+nc_get_vara_text(int ncid, int varid, const size_t *startp, 
+		 const size_t *countp, char *ip);
+
+EXTERNL int
+nc_put_vara_uchar(int ncid, int varid, const size_t *startp, 
+		  const size_t *countp, const unsigned char *op);
+
+EXTERNL int
+nc_get_vara_uchar(int ncid, int varid, const size_t *startp, 
+		  const size_t *countp, unsigned char *ip);
+
+EXTERNL int
+nc_put_vara_schar(int ncid, int varid, const size_t *startp, 
+		  const size_t *countp, const signed char *op);
+
+EXTERNL int
+nc_get_vara_schar(int ncid, int varid, const size_t *startp, 
+		  const size_t *countp, signed char *ip);
+
+EXTERNL int
+nc_put_vara_short(int ncid, int varid, const size_t *startp, 
+		  const size_t *countp, const short *op);
+
+EXTERNL int
+nc_get_vara_short(int ncid, int varid, const size_t *startp, 
+		  const size_t *countp, short *ip);
+
+EXTERNL int
+nc_put_vara_int(int ncid, int varid, const size_t *startp, 
+		const size_t *countp, const int *op);
+
+EXTERNL int
+nc_get_vara_int(int ncid, int varid, const size_t *startp, 
+		const size_t *countp, int *ip);
+
+EXTERNL int
+nc_put_vara_long(int ncid, int varid, const size_t *startp, 
+		 const size_t *countp, const long *op);
+
+EXTERNL int
+nc_get_vara_long(int ncid, int varid,
+	const size_t *startp, const size_t *countp, long *ip);
+
+EXTERNL int
+nc_put_vara_float(int ncid, int varid,
+	const size_t *startp, const size_t *countp, const float *op);
+
+EXTERNL int
+nc_get_vara_float(int ncid, int varid,
+	const size_t *startp, const size_t *countp, float *ip);
+
+EXTERNL int
+nc_put_vara_double(int ncid, int varid, const size_t *startp, 
+		   const size_t *countp, const double *op);
+
+EXTERNL int
+nc_get_vara_double(int ncid, int varid, const size_t *startp, 
+		   const size_t *countp, double *ip);
+
+EXTERNL int
+nc_put_vara_ushort(int ncid, int varid, const size_t *startp, 
+		   const size_t *countp, const unsigned short *op);
+
+EXTERNL int
+nc_get_vara_ushort(int ncid, int varid, const size_t *startp, 
+		   const size_t *countp, unsigned short *ip);
+
+EXTERNL int
+nc_put_vara_uint(int ncid, int varid, const size_t *startp, 
+		 const size_t *countp, const unsigned int *op);
+
+EXTERNL int
+nc_get_vara_uint(int ncid, int varid, const size_t *startp, 
+		 const size_t *countp, unsigned int *ip);
+
+EXTERNL int
+nc_put_vara_longlong(int ncid, int varid, const size_t *startp, 
+		  const size_t *countp, const long long *op);
+
+EXTERNL int
+nc_get_vara_longlong(int ncid, int varid, const size_t *startp, 
+		  const size_t *countp, long long *ip);
+
+EXTERNL int
+nc_put_vara_ulonglong(int ncid, int varid, const size_t *startp, 
+		   const size_t *countp, const unsigned long long *op);
+
+EXTERNL int
+nc_get_vara_ulonglong(int ncid, int varid, const size_t *startp, 
+		   const size_t *countp, unsigned long long *ip);
+
+EXTERNL int
+nc_put_vara_string(int ncid, int varid, const size_t *startp, 
+		   const size_t *countp, const char **op);
+
+EXTERNL int
+nc_get_vara_string(int ncid, int varid, const size_t *startp, 
+		   const size_t *countp, char **ip);
+
+/* End {put,get}_vara */
+/* Begin {put,get}_vars */
+
+EXTERNL int
+nc_put_vars_text(int ncid, int varid,
+	const size_t *startp, const size_t *countp, const ptrdiff_t *stridep,
+	const char *op);
+
+EXTERNL int
+nc_get_vars_text(int ncid, int varid,
+	const size_t *startp, const size_t *countp, const ptrdiff_t *stridep,
+	char *ip);
+
+EXTERNL int
+nc_put_vars_uchar(int ncid, int varid,
+	const size_t *startp, const size_t *countp, const ptrdiff_t *stridep,
+	const unsigned char *op);
+
+EXTERNL int
+nc_get_vars_uchar(int ncid, int varid,
+	const size_t *startp, const size_t *countp, const ptrdiff_t *stridep,
+	unsigned char *ip);
+
+EXTERNL int
+nc_put_vars_schar(int ncid, int varid,
+	const size_t *startp, const size_t *countp, const ptrdiff_t *stridep,
+	const signed char *op);
+
+EXTERNL int
+nc_get_vars_schar(int ncid, int varid,
+	const size_t *startp, const size_t *countp, const ptrdiff_t *stridep,
+	signed char *ip);
+
+EXTERNL int
+nc_put_vars_short(int ncid, int varid,
+	const size_t *startp, const size_t *countp, const ptrdiff_t *stridep,
+	const short *op);
+
+EXTERNL int
+nc_get_vars_short(int ncid, int varid, const size_t *startp, 
+		  const size_t *countp, const ptrdiff_t *stridep,
+		  short *ip);
+
+EXTERNL int
+nc_put_vars_int(int ncid, int varid,
+	const size_t *startp, const size_t *countp, const ptrdiff_t *stridep,
+	const int *op);
+
+EXTERNL int
+nc_get_vars_int(int ncid, int varid,
+	const size_t *startp, const size_t *countp, const ptrdiff_t *stridep,
+	int *ip);
+
+EXTERNL int
+nc_put_vars_long(int ncid, int varid,
+	const size_t *startp, const size_t *countp, const ptrdiff_t *stridep,
+	const long *op);
+
+EXTERNL int
+nc_get_vars_long(int ncid, int varid,
+	const size_t *startp, const size_t *countp, const ptrdiff_t *stridep,
+	long *ip);
+
+EXTERNL int
+nc_put_vars_float(int ncid, int varid,
+	const size_t *startp, const size_t *countp, const ptrdiff_t *stridep,
+	const float *op);
+
+EXTERNL int
+nc_get_vars_float(int ncid, int varid,
+	const size_t *startp, const size_t *countp, const ptrdiff_t *stridep,
+	float *ip);
+
+EXTERNL int
+nc_put_vars_double(int ncid, int varid,
+	const size_t *startp, const size_t *countp, const ptrdiff_t *stridep,
+	const double *op);
+
+EXTERNL int
+nc_get_vars_double(int ncid, int varid,	const size_t *startp, 
+		   const size_t *countp, const ptrdiff_t *stridep,
+		   double *ip);
+
+EXTERNL int
+nc_put_vars_ushort(int ncid, int varid, const size_t *startp, 
+		   const size_t *countp, const ptrdiff_t *stridep, 
+		   const unsigned short *op);
+
+EXTERNL int
+nc_get_vars_ushort(int ncid, int varid, const size_t *startp, 
+		   const size_t *countp, const ptrdiff_t *stridep, 
+		   unsigned short *ip);
+
+EXTERNL int
+nc_put_vars_uint(int ncid, int varid, const size_t *startp, 
+		 const size_t *countp, const ptrdiff_t *stridep, 
+		 const unsigned int *op);
+
+EXTERNL int
+nc_get_vars_uint(int ncid, int varid, const size_t *startp, 
+		 const size_t *countp, const ptrdiff_t *stridep, 
+		 unsigned int *ip);
+
+EXTERNL int
+nc_put_vars_longlong(int ncid, int varid, const size_t *startp, 
+		  const size_t *countp, const ptrdiff_t *stridep, 
+		  const long long *op);
+
+EXTERNL int
+nc_get_vars_longlong(int ncid, int varid, const size_t *startp, 
+		  const size_t *countp, const ptrdiff_t *stridep, 
+		  long long *ip);
+
+EXTERNL int
+nc_put_vars_ulonglong(int ncid, int varid, const size_t *startp, 
+		   const size_t *countp, const ptrdiff_t *stridep, 
+		   const unsigned long long *op);
+
+EXTERNL int
+nc_get_vars_ulonglong(int ncid, int varid, const size_t *startp, 
+		   const size_t *countp, const ptrdiff_t *stridep, 
+		   unsigned long long *ip);
+
+EXTERNL int
+nc_put_vars_string(int ncid, int varid, const size_t *startp, 
+		   const size_t *countp, const ptrdiff_t *stridep, 
+		   const char **op);
+
+EXTERNL int
+nc_get_vars_string(int ncid, int varid, const size_t *startp, 
+		   const size_t *countp, const ptrdiff_t *stridep, 
+		   char **ip);
+
+/* End {put,get}_vars */
+/* Begin {put,get}_varm */
+
+EXTERNL int
+nc_put_varm_text(int ncid, int varid, const size_t *startp, 
+		 const size_t *countp, const ptrdiff_t *stridep,
+		 const ptrdiff_t *imapp, const char *op);
+
+EXTERNL int
+nc_get_varm_text(int ncid, int varid, const size_t *startp, 
+		 const size_t *countp, const ptrdiff_t *stridep,
+		 const ptrdiff_t *imapp, char *ip);
+
+EXTERNL int
+nc_put_varm_uchar(int ncid, int varid, const size_t *startp, 
+		  const size_t *countp, const ptrdiff_t *stridep,
+		  const ptrdiff_t *imapp, const unsigned char *op);
+
+EXTERNL int
+nc_get_varm_uchar(int ncid, int varid, const size_t *startp, 
+		  const size_t *countp, const ptrdiff_t *stridep,
+		  const ptrdiff_t *imapp, unsigned char *ip);
+
+EXTERNL int
+nc_put_varm_schar(int ncid, int varid, const size_t *startp, 
+		  const size_t *countp, const ptrdiff_t *stridep,
+		  const ptrdiff_t *imapp, const signed char *op);
+
+EXTERNL int
+nc_get_varm_schar(int ncid, int varid, const size_t *startp, 
+		  const size_t *countp, const ptrdiff_t *stridep,
+		  const ptrdiff_t *imapp, signed char *ip);
+
+EXTERNL int
+nc_put_varm_short(int ncid, int varid, const size_t *startp, 
+		  const size_t *countp, const ptrdiff_t *stridep,
+		  const ptrdiff_t *imapp, const short *op);
+
+EXTERNL int
+nc_get_varm_short(int ncid, int varid, const size_t *startp, 
+		  const size_t *countp, const ptrdiff_t *stridep,
+		  const ptrdiff_t *imapp, short *ip);
+
+EXTERNL int
+nc_put_varm_int(int ncid, int varid, const size_t *startp, 
+		const size_t *countp, const ptrdiff_t *stridep,
+		const ptrdiff_t *imapp, const int *op);
+
+EXTERNL int
+nc_get_varm_int(int ncid, int varid, const size_t *startp, 
+		const size_t *countp, const ptrdiff_t *stridep,
+		const ptrdiff_t *imapp, int *ip);
+
+EXTERNL int
+nc_put_varm_long(int ncid, int varid, const size_t *startp, 
+		 const size_t *countp, const ptrdiff_t *stridep,
+		 const ptrdiff_t *imapp, const long *op);
+
+EXTERNL int
+nc_get_varm_long(int ncid, int varid, const size_t *startp, 
+		 const size_t *countp, const ptrdiff_t *stridep,
+		 const ptrdiff_t *imapp, long *ip);
+
+EXTERNL int
+nc_put_varm_float(int ncid, int varid,const size_t *startp, 
+		  const size_t *countp, const ptrdiff_t *stridep,
+		  const ptrdiff_t *imapp, const float *op);
+
+EXTERNL int
+nc_get_varm_float(int ncid, int varid,const size_t *startp, 
+		  const size_t *countp, const ptrdiff_t *stridep,
+		  const ptrdiff_t *imapp, float *ip);
+
+EXTERNL int
+nc_put_varm_double(int ncid, int varid,	const size_t *startp, 
+		   const size_t *countp, const ptrdiff_t *stridep,
+		   const ptrdiff_t *imapp, const double *op);
+
+EXTERNL int
+nc_get_varm_double(int ncid, int varid,	const size_t *startp, 
+		   const size_t *countp, const ptrdiff_t *stridep,
+		   const ptrdiff_t * imapp, double *ip);
+
+EXTERNL int
+nc_put_varm_ushort(int ncid, int varid, const size_t *startp, 
+		   const size_t *countp, const ptrdiff_t *stridep, 
+		   const ptrdiff_t * imapp, const unsigned short *op);
+
+EXTERNL int
+nc_get_varm_ushort(int ncid, int varid, const size_t *startp, 
+		   const size_t *countp, const ptrdiff_t *stridep, 
+		   const ptrdiff_t * imapp, unsigned short *ip);
+
+EXTERNL int
+nc_put_varm_uint(int ncid, int varid, const size_t *startp, 
+		 const size_t *countp, const ptrdiff_t *stridep, 
+		 const ptrdiff_t * imapp, const unsigned int *op);
+
+EXTERNL int
+nc_get_varm_uint(int ncid, int varid, const size_t *startp, 
+		 const size_t *countp, const ptrdiff_t *stridep, 
+		 const ptrdiff_t * imapp, unsigned int *ip);
+
+EXTERNL int
+nc_put_varm_longlong(int ncid, int varid, const size_t *startp, 
+		  const size_t *countp, const ptrdiff_t *stridep, 
+		  const ptrdiff_t * imapp, const long long *op);
+
+EXTERNL int
+nc_get_varm_longlong(int ncid, int varid, const size_t *startp, 
+		  const size_t *countp, const ptrdiff_t *stridep, 
+		  const ptrdiff_t * imapp, long long *ip);
+
+EXTERNL int
+nc_put_varm_ulonglong(int ncid, int varid, const size_t *startp, 
+		   const size_t *countp, const ptrdiff_t *stridep, 
+		   const ptrdiff_t * imapp, const unsigned long long *op);
+
+EXTERNL int
+nc_get_varm_ulonglong(int ncid, int varid, const size_t *startp, 
+		   const size_t *countp, const ptrdiff_t *stridep, 
+		   const ptrdiff_t * imapp, unsigned long long *ip);
+
+EXTERNL int
+nc_put_varm_string(int ncid, int varid, const size_t *startp, 
+		   const size_t *countp, const ptrdiff_t *stridep, 
+		   const ptrdiff_t * imapp, const char **op);
+
+EXTERNL int
+nc_get_varm_string(int ncid, int varid, const size_t *startp, 
+		   const size_t *countp, const ptrdiff_t *stridep, 
+		   const ptrdiff_t * imapp, char **ip);
+
+/* End {put,get}_varm */
+/* Begin {put,get}_var */
+
+EXTERNL int
+nc_put_var_text(int ncid, int varid, const char *op);
+
+EXTERNL int
+nc_get_var_text(int ncid, int varid, char *ip);
+
+EXTERNL int
+nc_put_var_uchar(int ncid, int varid, const unsigned char *op);
+
+EXTERNL int
+nc_get_var_uchar(int ncid, int varid, unsigned char *ip);
+
+EXTERNL int
+nc_put_var_schar(int ncid, int varid, const signed char *op);
+
+EXTERNL int
+nc_get_var_schar(int ncid, int varid, signed char *ip);
+
+EXTERNL int
+nc_put_var_short(int ncid, int varid, const short *op);
+
+EXTERNL int
+nc_get_var_short(int ncid, int varid, short *ip);
+
+EXTERNL int
+nc_put_var_int(int ncid, int varid, const int *op);
+
+EXTERNL int
+nc_get_var_int(int ncid, int varid, int *ip);
+
+EXTERNL int
+nc_put_var_long(int ncid, int varid, const long *op);
+
+EXTERNL int
+nc_get_var_long(int ncid, int varid, long *ip);
+
+EXTERNL int
+nc_put_var_float(int ncid, int varid, const float *op);
+
+EXTERNL int
+nc_get_var_float(int ncid, int varid, float *ip);
+
+EXTERNL int
+nc_put_var_double(int ncid, int varid, const double *op);
+
+EXTERNL int
+nc_get_var_double(int ncid, int varid, double *ip);
+
+EXTERNL int
+nc_put_var_ushort(int ncid, int varid, const unsigned short *op);
+
+EXTERNL int
+nc_get_var_ushort(int ncid, int varid, unsigned short *ip);
+
+EXTERNL int
+nc_put_var_uint(int ncid, int varid, const unsigned int *op);
+
+EXTERNL int
+nc_get_var_uint(int ncid, int varid, unsigned int *ip);
+
+EXTERNL int
+nc_put_var_longlong(int ncid, int varid, const long long *op);
+
+EXTERNL int
+nc_get_var_longlong(int ncid, int varid, long long *ip);
+
+EXTERNL int
+nc_put_var_ulonglong(int ncid, int varid, const unsigned long long *op);
+
+EXTERNL int
+nc_get_var_ulonglong(int ncid, int varid, unsigned long long *ip);
+
+EXTERNL int
+nc_put_var_string(int ncid, int varid, const char **op);
+
+EXTERNL int
+nc_get_var_string(int ncid, int varid, char **ip);
+
+/* Begin Deprecated, same as functions with "_ubyte" replaced by "_uchar" */
+EXTERNL int
+nc_put_att_ubyte(int ncid, int varid, const char *name, nc_type xtype,
+		 size_t len, const unsigned char *op);
+EXTERNL int
+nc_get_att_ubyte(int ncid, int varid, const char *name, 
+		 unsigned char *ip);
+EXTERNL int
+nc_put_var1_ubyte(int ncid, int varid, const size_t *indexp, 
+		  const unsigned char *op);
+EXTERNL int
+nc_get_var1_ubyte(int ncid, int varid, const size_t *indexp, 
+		  unsigned char *ip);
+EXTERNL int
+nc_put_vara_ubyte(int ncid, int varid, const size_t *startp, 
+		  const size_t *countp, const unsigned char *op);
+EXTERNL int
+nc_get_vara_ubyte(int ncid, int varid, const size_t *startp, 
+		  const size_t *countp, unsigned char *ip);
+EXTERNL int
+nc_put_vars_ubyte(int ncid, int varid, const size_t *startp, 
+		  const size_t *countp, const ptrdiff_t *stridep, 
+		  const unsigned char *op);
+EXTERNL int
+nc_get_vars_ubyte(int ncid, int varid, const size_t *startp, 
+		  const size_t *countp, const ptrdiff_t *stridep, 
+		  unsigned char *ip);
+EXTERNL int
+nc_put_varm_ubyte(int ncid, int varid, const size_t *startp, 
+		  const size_t *countp, const ptrdiff_t *stridep, 
+		  const ptrdiff_t * imapp, const unsigned char *op);
+EXTERNL int
+nc_get_varm_ubyte(int ncid, int varid, const size_t *startp, 
+		  const size_t *countp, const ptrdiff_t *stridep, 
+		  const ptrdiff_t * imapp, unsigned char *ip);
+EXTERNL int
+nc_put_var_ubyte(int ncid, int varid, const unsigned char *op);
+EXTERNL int
+nc_get_var_ubyte(int ncid, int varid, unsigned char *ip);
+/* End Deprecated */
+
+#ifdef LOGGING
+
+/* Set the log level. 0 shows only errors, 1 only major messages,
+ * etc., to 5, which shows way too much information. */
+EXTERNL int
+nc_set_log_level(int new_level);
+
+/* Use this to turn off logging by calling
+   nc_log_level(NC_TURN_OFF_LOGGING) */
+#define NC_TURN_OFF_LOGGING (-1)
+
+#else /* not LOGGING */
+
+#define nc_set_log_level(e)
+
+#endif /* LOGGING */
+
+/* Show the netCDF library's in-memory metadata for a file. */
+EXTERNL int 
+nc_show_metadata(int ncid);
+
+/* End {put,get}_var */
+
+/* #ifdef _CRAYMPP */
+/*
+ * Public interfaces to better support
+ * CRAY multi-processor systems like T3E.
+ * A tip of the hat to NERSC.
+ */
+/*
+ * It turns out we need to declare and define
+ * these public interfaces on all platforms
+ * or things get ugly working out the
+ * FORTRAN interface. On !_CRAYMPP platforms,
+ * these functions work as advertised, but you
+ * can only use "processor element" 0.
+ */
+
+EXTERNL int
+nc__create_mp(const char *path, int cmode, size_t initialsz, int basepe,
+	 size_t *chunksizehintp, int *ncidp);
+
+EXTERNL int
+nc__open_mp(const char *path, int mode, int basepe,
+	size_t *chunksizehintp, int *ncidp);
+
+EXTERNL int
+nc_delete(const char *path);
+
+EXTERNL int
+nc_delete_mp(const char *path, int basepe);
+
+EXTERNL int
+nc_set_base_pe(int ncid, int pe);
+
+EXTERNL int
+nc_inq_base_pe(int ncid, int *pe);
+
+/* #endif _CRAYMPP */
+
+/* This v2 function is used in the nc_test program. */
+EXTERNL int
+nctypelen(nc_type datatype);
+
+/* Begin v2.4 backward compatiblity */
+/*
+ * defining NO_NETCDF_2 to the preprocessor
+ * turns off backward compatiblity declarations.
+ */
+#ifndef NO_NETCDF_2
+
+/** Backward compatible alias. */
+/**@{*/
+#define FILL_BYTE	NC_FILL_BYTE
+#define FILL_CHAR	NC_FILL_CHAR
+#define FILL_SHORT	NC_FILL_SHORT
+#define FILL_LONG	NC_FILL_INT
+#define FILL_FLOAT	NC_FILL_FLOAT
+#define FILL_DOUBLE	NC_FILL_DOUBLE
+
+#define MAX_NC_DIMS	NC_MAX_DIMS
+#define MAX_NC_ATTRS	NC_MAX_ATTRS
+#define MAX_NC_VARS	NC_MAX_VARS
+#define MAX_NC_NAME	NC_MAX_NAME
+#define MAX_VAR_DIMS	NC_MAX_VAR_DIMS
+/**@}*/
+
+
+/*
+ * Global error status
+ */
+EXTERNL int ncerr;
+
+#define NC_ENTOOL       NC_EMAXNAME   /* Backward compatibility */
+#define	NC_EXDR		(-32)	/* */
+#define	NC_SYSERR	(-31)
+
+/*
+ * Global options variable.
+ * Used to determine behavior of error handler.
+ */
+#define	NC_FATAL	1
+#define	NC_VERBOSE	2
+
+EXTERNL int ncopts;	/* default is (NC_FATAL | NC_VERBOSE) */
+
+EXTERNL void
+nc_advise(const char *cdf_routine_name, int err, const char *fmt,...);
+
+/*
+ * C data type corresponding to a netCDF NC_LONG argument,
+ * a signed 32 bit object.
+ * 
+ * This is the only thing in this file which architecture dependent.
+ */
+typedef int nclong;
+
+EXTERNL int
+nccreate(const char* path, int cmode);
+
+EXTERNL int
+ncopen(const char* path, int mode);
+
+EXTERNL int
+ncsetfill(int ncid, int fillmode);
+
+EXTERNL int
+ncredef(int ncid);
+
+EXTERNL int
+ncendef(int ncid);
+
+EXTERNL int
+ncsync(int ncid);
+
+EXTERNL int
+ncabort(int ncid);
+
+EXTERNL int
+ncclose(int ncid);
+
+EXTERNL int
+ncinquire(int ncid, int *ndimsp, int *nvarsp, int *nattsp, int *unlimdimp);
+
+EXTERNL int
+ncdimdef(int ncid, const char *name, long len);
+
+EXTERNL int
+ncdimid(int ncid, const char *name);
+
+EXTERNL int
+ncdiminq(int ncid, int dimid, char *name, long *lenp);
+
+EXTERNL int
+ncdimrename(int ncid, int dimid, const char *name);
+
+EXTERNL int
+ncattput(int ncid, int varid, const char *name, nc_type xtype,
+	int len, const void *op);
+
+EXTERNL int
+ncattinq(int ncid, int varid, const char *name, nc_type *xtypep, int *lenp);
+
+EXTERNL int
+ncattget(int ncid, int varid, const char *name, void *ip);
+
+EXTERNL int
+ncattcopy(int ncid_in, int varid_in, const char *name, int ncid_out,
+	int varid_out);
+
+EXTERNL int
+ncattname(int ncid, int varid, int attnum, char *name);
+
+EXTERNL int
+ncattrename(int ncid, int varid, const char *name, const char *newname);
+
+EXTERNL int
+ncattdel(int ncid, int varid, const char *name);
+
+EXTERNL int
+ncvardef(int ncid, const char *name, nc_type xtype,
+	int ndims, const int *dimidsp);
+
+EXTERNL int
+ncvarid(int ncid, const char *name);
+
+EXTERNL int
+ncvarinq(int ncid, int varid, char *name, nc_type *xtypep,
+	int *ndimsp, int *dimidsp, int *nattsp);
+
+EXTERNL int
+ncvarput1(int ncid, int varid, const long *indexp, const void *op);
+
+EXTERNL int
+ncvarget1(int ncid, int varid, const long *indexp, void *ip);
+
+EXTERNL int
+ncvarput(int ncid, int varid, const long *startp, const long *countp,
+	const void *op);
+
+EXTERNL int
+ncvarget(int ncid, int varid, const long *startp, const long *countp, 
+	void *ip);
+
+EXTERNL int
+ncvarputs(int ncid, int varid, const long *startp, const long *countp,
+	const long *stridep, const void *op);
+
+EXTERNL int
+ncvargets(int ncid, int varid, const long *startp, const long *countp,
+	const long *stridep, void *ip);
+
+EXTERNL int
+ncvarputg(int ncid, int varid, const long *startp, const long *countp,
+	const long *stridep, const long *imapp, const void *op);
+
+EXTERNL int
+ncvargetg(int ncid, int varid, const long *startp, const long *countp,
+	const long *stridep, const long *imapp, void *ip);
+
+EXTERNL int
+ncvarrename(int ncid, int varid, const char *name);
+
+EXTERNL int
+ncrecinq(int ncid, int *nrecvarsp, int *recvaridsp, long *recsizesp);
+
+EXTERNL int
+ncrecget(int ncid, long recnum, void **datap);
+
+EXTERNL int
+ncrecput(int ncid, long recnum, void *const *datap);
+
+/* End v2.4 backward compatiblity */
+#endif /*!NO_NETCDF_2*/
+
+#if defined(__cplusplus)
+}
+#endif
+
+/* Temporary hack to shut up warnings */
+#ifndef __MINGW32_VERSION 
+#define END_OF_MAIN()
+#endif
+
+#endif /* _NETCDF_ */
+
+
+
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/src_netcdf4/netcdf_f.h
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/src_netcdf4/netcdf_f.h	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/src_netcdf4/netcdf_f.h	(revision 1749)
@@ -0,0 +1,63 @@
+/*
+ * Copyright 1993-2011 University Corporation for Atmospheric Research/Unidata
+ * 
+ * This header contains prototypes for functions only called by fortran 77.
+ */
+#ifndef _NETCDF_F_
+#define _NETCDF_F_
+
+#include <netcdf.h>
+
+#if defined(__cplusplus)
+extern "C" {
+#endif
+
+EXTERNL int
+nc_inq_var_chunking_ints(int ncid, int varid, int *contiguousp, int *chunksizesp);
+
+EXTERNL int
+nc_def_var_chunking_ints(int ncid, int varid, int contiguous, int *chunksizesp);
+
+EXTERNL int
+nc_open_par_fortran(const char *path, int mode, int comm, 
+		    int info, int *ncidp);
+
+EXTERNL int
+nc_create_par_fortran(const char *path, int cmode, int comm, 
+		      int info, int *ncidp);
+
+EXTERNL int
+nc_set_chunk_cache_ints(int size, int nelems, int preemption);
+
+EXTERNL int
+nc_get_chunk_cache_ints(int *sizep, int *nelemsp, int *preemptionp);
+
+EXTERNL int
+nc_set_var_chunk_cache_ints(int ncid, int varid, int size, int nelems, 
+			    int preemption);
+EXTERNL int
+nc_get_var_chunk_cache_ints(int ncid, int varid, int *sizep, 
+			    int *nelemsp, int *preemptionp);
+
+/* Prototypes for some extra functions in fort-lib.c. */
+EXTERNL int 
+nc_inq_varids_f(int ncid, int *nvars, int *fvarids);
+
+EXTERNL int 
+nc_inq_dimids_f(int ncid, int *ndims, int *fdimids, int parent);
+
+EXTERNL int 
+nc_insert_array_compound_f(int ncid, int typeid, char *name, 
+			   size_t offset, nc_type field_typeid,
+			   int ndims, int *dim_sizesp);
+
+EXTERNL int 
+nc_inq_compound_field_f(int ncid, nc_type xtype, int fieldid, char *name, 
+			size_t *offsetp, nc_type *field_typeidp, int *ndimsp, 
+			int *dim_sizesp);
+
+#if defined(__cplusplus)
+}
+#endif
+
+#endif
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/src_netcdf4/netcdf_par.h
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/src_netcdf4/netcdf_par.h	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/src_netcdf4/netcdf_par.h	(revision 1749)
@@ -0,0 +1,50 @@
+/*
+ * Copyright 2010 University Corporation for Atmospheric
+ * Research/Unidata. See COPYRIGHT file for more info.
+ *
+ * This header file is for the parallel I/O functions of netCDF.
+ * 
+ */
+/* "$Id: netcdf_par.h,v 1.1 2010/06/01 15:46:49 ed Exp $" */
+
+#ifndef NETCDF_PAR_H
+#define NETCDF_PAR_H 1
+
+#include <mpi.h>
+#include <netcdf.h>
+
+#if defined(__cplusplus)
+extern "C" {
+#endif
+
+/* Use these with nc_var_par_access(). */
+#define NC_INDEPENDENT 0
+#define NC_COLLECTIVE 1
+
+/* Create a file and enable parallel I/O. */
+extern int
+nc_create_par(const char *path, int cmode, MPI_Comm comm, MPI_Info info,
+	      int *ncidp);
+
+/* Open a file and enable parallel I/O. */
+extern int
+nc_open_par(const char *path, int mode, MPI_Comm comm, MPI_Info info,
+	    int *ncidp);
+
+/* Change a variable from independent (the default) to collective
+ * access. */
+extern int
+nc_var_par_access(int ncid, int varid, int par_access);
+
+extern int
+nc_create_par_fortran(const char *path, int cmode, int comm, 
+		      int info, int *ncidp);
+extern int
+nc_open_par_fortran(const char *path, int mode, int comm, 
+		    int info, int *ncidp);
+
+#if defined(__cplusplus)
+}
+#endif
+
+#endif /* NETCDF_PAR_H */
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/src_netcdf4/oc.c
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/src_netcdf4/oc.c	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/src_netcdf4/oc.c	(revision 1749)
@@ -0,0 +1,957 @@
+/* Copyright 2009, UCAR/Unidata and OPeNDAP, Inc.
+   See the COPYRIGHT file for more information. */
+
+#include "config.h"
+#include <stdlib.h>
+#include <assert.h>
+#include <string.h>
+
+#include "oc.h"
+#include "ocinternal.h"
+#include "occontent.h"
+#include "ocdebug.h"
+#include "ocdump.h"
+#include "oclog.h"
+#include "occlientparams.h"
+#include "ochttp.h"
+
+#undef TRACK
+
+/**************************************************/
+
+static int ocinitialized = 0;
+
+/**************************************************/
+/* Track legal ids */
+
+#ifdef OC_FASTCONSISTENCY
+
+#define ocverify(object) ((object) != NULL && (*(object) == OCMAGIC)?1:0)
+
+#define ocassign(object) ((OCobject)(object))
+#define ocassignall(list)
+
+#else /*!OC_FASTCONSISTENCY*/
+
+static OClist* ocmap = NULL;
+
+static int
+ocverify(unsigned long object)
+{
+    unsigned int i;
+    void** map = (void**)oclistcontents(ocmap);
+    unsigned int len = oclistlength(ocmap);
+#ifdef TRACK
+fprintf(stderr,"verify: %lu\n",object); fflush(stderr);
+#endif
+    if(object > 0) {
+        for(i=0;i<len;i++,map++) {
+	    if(*map == (void*)object) {
+		return 1;
+	    }
+	}
+    }
+    fprintf(stderr,"illegal object id: %lu\n",(unsigned long)object);
+    fflush(stderr);
+    return 0;
+}
+
+static OCobject
+ocassign(void* object)
+{
+#ifdef TRACK
+fprintf(stderr,"assign: %lu\n",(unsigned long)object); fflush(stderr);
+#endif
+    oclistpush(ocmap,(ocelem)object);
+    return (OCobject)object;
+}
+
+static void
+ocassignall(OClist* list)
+{
+    unsigned int i;
+    if(list != NULL)
+	for(i=0;i<oclistlength(list);i++) {
+            void* object = (void*)oclistget(list,i);
+#ifdef TRACK
+fprintf(stderr,"assign: %lu\n",(unsigned long)object); fflush(stderr);
+#endif
+            oclistpush(ocmap,(ocelem)object);
+	}
+}
+#endif /*!OC_FASTCONSISTENCY*/
+
+#define OCVERIFYX(T,s,x,r) if(!ocverify(x)) {return (r);}
+#define OCVERIFY(T,s,x) OCVERIFYX(T,s,x,OC_EINVAL)
+
+#define OCDEREF(T,s,x) (s)=(T)(x)
+
+/**************************************************/
+
+static int
+oc_initialize(void)
+{
+    int status = OC_NOERR;
+#ifndef OC_FASTCONSISTENCY
+    ocmap = oclistnew();    
+    oclistsetalloc(ocmap,1024);
+#endif
+    status = ocinternalinitialize();
+    ocinitialized = 1;
+    return status;
+}
+
+/**************************************************/
+
+OCerror
+oc_open(const char* url, OCconnection* connp)
+{
+    OCerror ocerr;
+    OCstate* state;
+    if(!ocinitialized) oc_initialize();
+    ocerr = ocopen(&state,url);
+    if(ocerr == OC_NOERR && connp) {
+	*connp = (OCconnection)ocassign(state);
+    }
+    return ocerr;
+}
+
+OCerror
+oc_close(OCconnection conn)
+{
+    OCstate* state;
+    OCVERIFY(OCstate*,state,conn);
+    OCDEREF(OCstate*,state,conn);
+    occlose(state);
+    return OC_NOERR;
+}
+
+/* Release/reclaim the tree of objects associated with a given root */
+OCerror
+oc_root_free(OCconnection conn, OCobject root0)
+{
+    OCnode* root;
+    OCVERIFY(OCnode*,root,root0);
+    OCDEREF(OCnode*,root,root0);
+
+    ocfreeroot(root);
+    return OC_NOERR;
+}
+
+/* Return the # of  OCobjects associated with a tree with specified root */
+unsigned int
+oc_inq_nobjects(OCconnection conn, OCobject root0)
+{
+    OCnode* root;
+    OClist* nodes;
+    unsigned int nobjects;
+    OCVERIFYX(OCnode*,root,root0,-1);
+    OCDEREF(OCnode*,root,root0);
+
+    if(root == NULL) return 0;
+    root = root->root;
+    if(root == NULL) return 0;
+    nodes = root->tree->nodes;
+    nobjects = oclistlength(nodes);
+    return nobjects;
+}
+
+/* Return all the OCobjects associated with a tree with specified root */
+OCobject*
+oc_inq_objects(OCconnection conn, OCobject root0)
+{
+    unsigned int i;
+    OCnode* root;
+    OClist* nodes;
+    OCobject* objects = NULL;
+    unsigned int nobjects;
+    OCVERIFYX(OCnode*,root,root0,OCNULL);
+    OCDEREF(OCnode*,root,root0);
+
+    if(root == NULL) return NULL;
+    root = root->root;
+    if(root == NULL) return NULL;
+    nodes = root->tree->nodes;
+    nobjects = oclistlength(nodes);
+    if(nodes != NULL && nobjects > 0) {
+	size_t len = sizeof(OCobject)*(1+nobjects);
+        objects = (OCobject*)ocmalloc(len);
+	for(i=0;i<oclistlength(nodes);i++) {
+	    objects[i] = (OCobject)oclistget(nodes,i);
+	}
+	objects[nobjects] = OCNULL; /* null terminate */
+    }
+    return objects;
+}
+
+/* Return the text of the DDS or DAS as received from the server */
+/* Return NULL if no fetch was ever made. */
+const char*
+oc_inq_text(OCconnection conn, OCobject root0)
+{
+    OCnode* root;
+    OCVERIFYX(OCnode*,root,root0,NULL);
+    OCDEREF(OCnode*,root,root0);
+
+    if(root == NULL) return NULL;
+    root = root->root;
+    if(root == NULL) return NULL;
+    return root->tree->text;
+}
+
+OCerror
+oc_inq_object(OCconnection conn,
+	  OCobject node0,
+	  char** namep,
+	  OCtype* objecttypep,
+	  OCtype* primitivetypep, /* if objecttype == OC_Primitive */
+	  OCobject* containerp,
+	  unsigned int* rankp,
+	  unsigned int* subnodesp,
+	  unsigned int* nattrp)
+{
+    OCnode* node;
+    OCVERIFY(OCnode*,node,node0);
+    OCDEREF(OCnode*,node,node0);
+
+    if(namep) *namep = nulldup(node->name);
+    if(objecttypep) *objecttypep = node->octype;
+    if(primitivetypep) *primitivetypep = node->etype;
+    if(rankp) *rankp = node->array.rank;
+    if(containerp) *containerp = (OCobject)node->container;    
+    if(subnodesp) *subnodesp = oclistlength(node->subnodes);
+    if(nattrp) {
+        if(node->octype == OC_Attribute) {
+            *nattrp = oclistlength(node->att.values);
+        } else {
+            *nattrp = oclistlength(node->attributes);
+	}
+    }
+    return OC_NOERR;
+}
+
+/* Useful accessor functions */
+OCerror
+oc_inq_name(OCconnection conn, OCobject node0, char** namep)
+{
+    OCstate* state;
+    OCnode* node;
+    OCVERIFY(OCstate*,state,conn);
+    OCDEREF(OCstate*,state,conn);
+    OCVERIFY(OCnode*,node,node0);
+    OCDEREF(OCnode*,node,node0);
+
+    if(state == NULL || node == NULL) return OC_EINVAL;
+    if(namep) *namep = nulldup(node->name);
+    return OC_NOERR;
+}
+
+OCerror
+oc_inq_nsubnodes(OCconnection conn, OCobject node0, unsigned int* nsubnodesp)
+{
+    OCnode* node;
+    OCVERIFY(OCnode*,node,node0);
+    OCDEREF(OCnode*,node,node0);
+
+    if(nsubnodesp) *nsubnodesp = oclistlength(node->subnodes);
+    return OC_NOERR;
+}
+
+OCerror
+oc_inq_primtype(OCconnection conn, OCobject node0, OCtype* typep)
+{
+    OCnode* node;
+    OCVERIFY(OCnode*,node,node0);
+    OCDEREF(OCnode*,node,node0);
+
+    if(typep) *typep = node->etype;
+    return OC_NOERR;
+}
+
+/* Alias for oc_inq_class */
+OCerror
+oc_inq_type(OCconnection conn, OCobject node0, OCtype* typep)
+{
+    return oc_inq_class(conn,node0,typep);
+}
+
+OCerror
+oc_inq_class(OCconnection conn, OCobject node0, OCtype* typep)
+{
+    OCnode* node;
+    OCVERIFY(OCnode*,node,node0);
+    OCDEREF(OCnode*,node,node0);
+
+    if(typep) *typep = node->octype;
+    return OC_NOERR;
+}
+
+OCerror
+oc_inq_rank(OCconnection conn, OCobject node0, unsigned int* rankp)
+{
+    OCnode* node;
+    OCVERIFY(OCnode*,node,node0);
+    OCDEREF(OCnode*,node,node0);
+
+    if(rankp) *rankp = node->array.rank;
+    return OC_NOERR;
+}
+
+OCerror
+oc_inq_nattr(OCconnection conn, OCobject node0, unsigned int* nattrp)
+{
+    OCnode* node;
+    OCVERIFY(OCnode*,node,node0);
+    OCDEREF(OCnode*,node,node0);
+
+    if(nattrp) {
+        if(node->octype == OC_Attribute) {
+            *nattrp = oclistlength(node->att.values);
+        } else {
+            *nattrp = oclistlength(node->attributes);
+	}
+    }
+    return OC_NOERR;
+}
+
+OCerror
+oc_inq_root(OCconnection conn, OCobject node0, OCobject* rootp)
+{
+    OCnode* node;
+    OCVERIFY(OCnode*,node,node0);
+    OCDEREF(OCnode*,node,node0);
+
+    if(rootp) *rootp = (OCobject)node->root;
+    return OC_NOERR;
+}
+
+OCerror
+oc_inq_container(OCconnection conn, OCobject node0, OCobject* containerp)
+{
+    OCnode* node;
+    OCVERIFY(OCnode*,node,node0);
+    OCDEREF(OCnode*,node,node0);
+
+    if(containerp) *containerp = (OCobject)node->container;
+    return OC_NOERR;
+}
+
+/* Return the subnode objects, if any, for a given object */
+/* Caller must free returned list */
+OCerror
+oc_inq_subnodes(OCconnection conn, OCobject node0, OCobject** subnodesp)
+{
+    OCnode* node;
+    OCobject* subnodes = NULL;
+    unsigned int len;
+    OCVERIFY(OCnode*,node,node0);
+    OCDEREF(OCnode*,node,node0);
+
+    len = oclistlength(node->subnodes);
+    if(len > 0) {
+	unsigned int i;
+	subnodes = (OCobject*)occalloc(sizeof(OCobject),len+1);
+	for(i=0;i<len;i++) {
+	    OCnode* ocnode = (OCnode*)oclistget(node->subnodes,i);
+	    subnodes[i] = (OCobject)ocnode;
+	}	
+        subnodes[len] = OCNULL; /* NULL terminate */
+    }
+    if(subnodesp) *subnodesp = subnodes;
+    return OC_NOERR;
+}
+
+OCerror
+oc_inq_ith(OCconnection conn,
+           OCobject node0, unsigned int index, OCobject* subnodeidp)
+{
+    OCnode* node;
+    OCobject subnodeid = OCNULL;
+    unsigned int nsubnodes;
+    OCVERIFY(OCnode*,node,node0);
+    OCDEREF(OCnode*,node,node0);
+
+    nsubnodes = oclistlength(node->subnodes);
+    if(nsubnodes > 0 &&  index < nsubnodes) {
+        subnodeid = (OCobject)oclistget(node->subnodes,index);
+    } else
+	return OC_EINVAL;
+    if(subnodeidp) *subnodeidp = subnodeid;
+    return OC_NOERR;
+}
+
+/* Return the dimension objects, if any, for a given object */
+/* Caller must free returned dimids */
+OCerror
+oc_inq_dimset(OCconnection conn, OCobject node0, OCobject** dimids)
+{
+    OCnode* node;
+    OCobject* dims = NULL;
+    OCVERIFY(OCnode*,node,node0);
+    OCDEREF(OCnode*,node,node0);
+
+    if(node->array.rank > 0) {
+	unsigned int i;
+	dims = (OCobject*)occalloc(sizeof(OCobject),node->array.rank+1);
+	for(i=0;i<node->array.rank;i++) {
+	    OCnode* dim = (OCnode*)oclistget(node->array.dimensions,i);
+	    dims[i] = (OCobject)dim;
+	}	
+	dims[node->array.rank] = OCNULL;
+    }
+    if(dimids) *dimids = dims;
+    return OC_NOERR;
+}
+
+
+OCerror
+oc_inq_ithdim(OCconnection conn, OCobject node0, unsigned int index, OCobject* dimidp)
+{
+    OCnode* node;
+    OCobject dimid = OCNULL;
+    OCVERIFY(OCnode*,node,node0);
+    OCDEREF(OCnode*,node,node0);
+
+    if(node->array.rank > 0 && index < node->array.rank) {
+        dimid = (OCobject)oclistget(node->array.dimensions,index);
+    } else
+	return OC_EINVAL;
+    if(dimidp) *dimidp = dimid;
+    return OC_NOERR;
+}
+
+OCerror
+oc_inq_dim(OCconnection conn, OCobject node0, size_t* sizep, char** namep)
+{
+    OCnode* dim;
+    OCVERIFY(OCnode*,dim,node0);
+    OCDEREF(OCnode*,dim,node0);
+
+    if(dim->octype != OC_Dimension) return OC_EINVAL;
+    if(sizep) *sizep = dim->dim.declsize;
+    if(namep) *namep = nulldup(dim->name);
+    return OC_NOERR;
+}
+
+/* Obtain info about the ith attribute attached to a given DDS node*/
+
+/* This procedure returns the value as the original DAS string */
+OCerror
+oc_inq_attrstrings(OCconnection conn, OCobject node0, unsigned int i,
+			   char** namep, OCtype* octypep,
+			   unsigned int* nvaluesp, char*** stringsp)
+{
+    OCnode* node;
+    OCattribute* attr;
+    unsigned int nattrs;
+    OCVERIFY(OCnode*,node,node0);
+    OCDEREF(OCnode*,node,node0);
+
+    nattrs = oclistlength(node->attributes);
+    if(i >= nattrs) return OC_EINVAL;
+    attr = (OCattribute*)oclistget(node->attributes,i);
+    if(namep) *namep = strdup(attr->name);
+    if(octypep) *octypep = attr->etype;
+    if(nvaluesp) *nvaluesp = attr->nvalues;
+    if(stringsp) {
+	if(attr->nvalues > 0) {
+	    size_t space = attr->nvalues * sizeof(char*);
+	    char** strings = ocmalloc(space);
+	    for(i=0;i<attr->nvalues;i++)
+	        strings[i] = nulldup(attr->values[i]);
+	    *stringsp = strings;
+	} else
+	    *stringsp = NULL;
+    }
+    return OC_NOERR;    
+}
+
+/* This procedure returns the value as the default binary value 
+   corresponding to the string value
+*/
+
+OCerror
+oc_inq_attr(OCconnection conn, OCobject node0, unsigned int i,
+	    char** namep, OCtype* octypep, unsigned int* nvaluesp, void** valuesp)
+{
+    OCnode* node;
+    OCattribute* attr;
+    unsigned int nattrs;
+    OCVERIFY(OCnode*,node,node0);
+    OCDEREF(OCnode*,node,node0);
+
+    nattrs = oclistlength(node->attributes);
+    if(i >= nattrs) return OC_EINVAL;
+    attr = (OCattribute*)oclistget(node->attributes,i);
+    if(namep) *namep = strdup(attr->name);
+    if(octypep) *octypep = attr->etype;
+    if(nvaluesp) *nvaluesp = attr->nvalues;
+    if(valuesp && attr->nvalues > 0) {
+	void* memory = NULL;
+        memory = oclinearize(attr->etype,attr->nvalues,attr->values);
+	*valuesp = memory;
+    }
+    return OC_NOERR;    
+}
+
+/* Convenience function */
+void
+oc_attr_reclaim(OCtype etype, unsigned int nvalues, void* values)
+{
+    if(nvalues == 0 || values == NULL) return;
+    if(etype == OC_String || etype == OC_URL) {
+        unsigned int i;
+	char** strings = (char**)values;
+	for(i=0;i<nvalues;i++) {ocfree(strings[i]);}	
+    }
+    ocfree(values);    
+}
+
+OCerror
+oc_inq_dasattr_nvalues(OCconnection conn, OCobject node0,
+			unsigned int* nvaluesp)
+{
+    OCnode* attr;
+    OCVERIFY(OCnode*,attr,node0);
+    OCDEREF(OCnode*,attr,node0);
+    if(attr->octype != OC_Attribute) return OC_EINVAL;
+    if(nvaluesp) *nvaluesp = oclistlength(attr->att.values);
+    return OC_NOERR;
+}
+
+OCerror
+oc_inq_dasattr(OCconnection conn, OCobject node0, unsigned int i,
+               OCtype* primtypep, char** valuep)
+{
+    OCnode* attr;
+    unsigned int nvalues;
+    OCVERIFY(OCnode*,attr,node0);
+    OCDEREF(OCnode*,attr,node0);
+
+    if(attr->octype != OC_Attribute) return OC_EINVAL;
+    nvalues = oclistlength(attr->att.values);
+    if(i >= nvalues) return OC_EINVAL;
+    if(valuep) *valuep = nulldup((char*)oclistget(attr->att.values,i));
+    if(primtypep) *primtypep = attr->etype;
+    return OC_NOERR;
+}
+
+/**************************************************/
+/* Fetch and parse a given class of DXD the server specified
+   at open time, and using a specified set of constraints.
+   Return the root node of the parsed tree of objects.
+*/
+OCerror oc_fetch(OCconnection conn, const char* constraint,
+                 OCdxd dxdkind, OCobject* rootp)
+{
+    return oc_fetchf(conn,constraint,dxdkind,0,rootp);
+}
+
+OCerror oc_fetchf(OCconnection conn, const char* constraint,
+                 OCdxd dxdkind, OCflags flags, OCobject* rootp)
+{
+    OCstate* state;
+    OCerror ocerr = OC_NOERR;
+    OCnode* root;
+    OCVERIFY(OCstate*,state,conn);
+    OCDEREF(OCstate*,state,conn);
+
+    ocerr = ocfetchf(state,constraint,dxdkind,flags,&root);
+    if(ocerr) return ocerr;
+
+    ocassignall(root->tree->nodes);
+    if(rootp) *rootp = (OCobject)ocassign(root);
+    return ocerr;
+}
+
+
+OCerror
+oc_data_root(OCconnection conn, OCobject root0, OCdata content0)
+{
+    OCstate* state;
+    OCnode* root;
+    OCcontent* content;
+    OCerror ocerr = OC_NOERR;
+    OCVERIFY(OCstate*,state,conn);
+    OCDEREF(OCstate*,state,conn);
+    OCVERIFY(OCnode*,root,root0);
+    OCDEREF(OCnode*,root,root0);
+    OCVERIFY(OCcontent*,content,content0);
+    OCDEREF(OCcontent*,content,content0);
+
+    if(root->tree == NULL) {OCTHROWCHK((ocerr=OC_EINVAL)); goto fail;}
+    ocerr = ocrootdata(state,root,content);
+
+fail:
+    return ocerr;
+}
+
+OCdata
+oc_data_new(OCconnection conn)
+{
+    OCstate* state;
+    OCVERIFYX(OCstate*,state,conn,OCNULL);
+    OCDEREF(OCstate*,state,conn);
+
+    return (OCdata)ocassign(ocnewcontent(state));
+}
+
+OCerror
+oc_data_free(OCconnection conn, OCdata content0)
+{
+    OCstate* state;
+    OCcontent* content;
+    if(content0 == OCNULL) return OC_NOERR;
+    OCVERIFY(OCstate*,state,conn);
+    OCDEREF(OCstate*,state,conn);
+    OCVERIFY(OCcontent*,content,content0);
+    OCDEREF(OCcontent*,content,content0);
+
+    ocfreecontent(state,content);
+    return OC_NOERR;
+}
+
+OCerror
+oc_data_ith(OCconnection conn, OCdata parentdata, size_t index, OCdata subdata)
+{
+    OCstate* state;
+    OCcontent* parent;
+    OCcontent* child;
+    OCerror ocerr = OC_NOERR;
+    OCVERIFY(OCstate*,state,conn);
+    OCDEREF(OCstate*,state,conn);
+    OCVERIFY(OCcontent*,parent,parentdata);
+    OCDEREF(OCcontent*,parent,parentdata);
+    OCVERIFY(OCcontent*,child,subdata);
+    OCDEREF(OCcontent*,child,subdata);
+    ocerr = ocdataith(state,parent,index,child);
+    return ocerr;
+}
+
+OCerror
+oc_data_get(OCconnection conn, OCdata currentcontent,
+            void* memory, size_t memsize, size_t start, size_t count)
+{
+    OCstate* state;
+    OCcontent* current;
+    OCerror ocerr = OC_NOERR;
+    OCVERIFY(OCstate*,state,conn);
+    OCDEREF(OCstate*,state,conn);
+    OCVERIFY(OCcontent*,current,currentcontent);
+    OCDEREF(OCcontent*,current,currentcontent);
+
+    ocerr = ocgetcontent(state,current,memory,memsize,start,count);
+
+    if(ocerr == OC_EDATADDS) ocdataddsmsg(state,current->tree);
+
+    return ocerr;
+}
+
+OCerror
+oc_data_count(OCconnection conn, OCdata content0, size_t* sizep)
+{
+    OCstate* state;
+    OCcontent* current;
+    OCerror ocerr = OC_NOERR;
+    OCVERIFY(OCstate*,state,conn);
+    OCDEREF(OCstate*,state,conn);
+    OCVERIFY(OCcontent*,current,content0);
+    OCDEREF(OCcontent*,current,content0);
+    ocerr = ocdatacount(state, current, sizep);
+    return ocerr;
+}
+
+OCerror
+oc_data_index(OCconnection conn, OCdata content0, size_t* sizep)
+{
+    OCcontent* current;
+    OCerror ocerr = OC_NOERR;
+    OCVERIFY(OCcontent*,current,content0);
+    OCDEREF(OCcontent*,current,content0);
+
+    if(sizep)
+	*sizep = (current->cache.valid ? current->cache.index : 0);
+    return ocerr;
+}
+
+OCerror
+oc_data_object(OCconnection conn, OCdata content0, OCobject* op)
+{
+    OCcontent* current;
+    OCerror ocerr = OC_NOERR;
+    OCVERIFY(OCcontent*,current,content0);
+    OCDEREF(OCcontent*,current,content0);
+
+    if(op) *op = (OCobject)current->node;
+    return ocerr;
+}
+
+OCerror
+oc_data_mode(OCconnection conn, OCdata content0, OCmode* modep)
+{
+    OCcontent* current;
+    OCerror ocerr = OC_NOERR;
+    OCVERIFY(OCcontent*,current,content0);
+    OCDEREF(OCcontent*,current,content0);
+
+    if(modep) *modep = current->mode;
+    return ocerr;
+}
+
+/**************************************************/
+/* OCtype management */
+size_t oc_typesize(OCtype etype)
+{
+    return octypesize(etype);
+}
+
+const char*
+oc_typetostring(OCtype octype)
+{
+    return octypetoddsstring(octype);
+}
+
+OCerror
+oc_typeprint(OCtype etype, char* buf, size_t bufsize, void* value)
+{
+    return octypeprint(etype,buf,bufsize,value);
+}
+
+/**************************************************/
+/* The oc_logXXX procedures are define in oclog.c */
+
+/**************************************************/
+/* Miscellaneous */
+
+const char*
+oc_errstring(int err)
+{
+    return ocerrstring(err);
+}
+
+/* Get clientparameters from the URL */
+const char*
+oc_clientparam_get(OCconnection conn, const char* param)
+{
+    OCstate* state;
+    OCVERIFYX(OCstate*,state,conn,NULL);
+    OCDEREF(OCstate*,state,conn);
+
+    return ocparamlookup(state,param);
+}
+
+#ifdef OCIGNORE
+/* Delete client parameter
+   return value:
+	OC_NOERR => defined; deletion performed
+	OC_EINVAL => not already defined
+*/
+OCerror
+oc_clientparam_delete(OCconnection conn, const char* param)
+{
+    OCstate* state;
+    OCVERIFY(OCstate*,state,conn);
+    OCDEREF(OCstate*,state,conn);
+
+    return ocparamdelete(state->clientparams,param);
+}
+
+/* Insert client parameter
+   return value:
+	OC_NOERR => not already define; insertion performed
+	OC_EINVAL => already defined
+*/
+OCerror
+oc_clientparam_insert(OCconnection conn, const char* param, const char* value)
+{
+    OCstate* state;
+    OCVERIFY(OCstate*,state,conn);
+    OCDEREF(OCstate*,state,conn);
+
+    state->clientparams = dapparaminsert(state->clientparams,param,value);
+    return OC_NOERR;
+}
+
+/* Replace client parameter
+   return value:
+	OC_NOERR => already define; replacement performed
+	OC_EINVAL => not already defined
+*/
+OCerror
+oc_clientparam_replace(OCconnection conn, const char* param, const char* value)
+{
+    OCstate* state;
+    OCVERIFY(OCstate*,state,conn);
+    OCDEREF(OCstate*,state,conn);
+
+    return dapparamreplace(state->clientparams,param,value);
+}
+#endif
+
+OCerror
+oc_dd(OCconnection conn, OCobject root0, int level)
+{
+    OCstate* state;
+    OCnode* root;
+    OCVERIFY(OCstate*,state,conn);
+    OCDEREF(OCstate*,state,conn);
+    OCVERIFY(OCnode*,root,root0);
+    OCDEREF(OCnode*,root,root0);
+
+    ocdd(state,root,1,level);
+    return OC_NOERR;
+}
+
+OCerror
+oc_ddnode(OCconnection conn, OCobject root0)
+{
+    OCnode* root;
+    OCVERIFY(OCnode*,root,root0);
+    OCDEREF(OCnode*,root,root0);
+
+    ocdumpnode(root);
+    return OC_NOERR;
+}
+
+/* Merge a specified DAS into a specified DDS or DATADDS */
+OCerror
+oc_attach_das(OCconnection conn, OCobject dasroot, OCobject ddsroot)
+{
+    OCstate* state;
+    OCnode* das;
+    OCnode* dds;
+    OCVERIFY(OCstate*,state,conn);
+    OCDEREF(OCstate*,state,conn);
+    OCVERIFY(OCnode*,das,dasroot);
+    OCDEREF(OCnode*,das,dasroot);
+    OCVERIFY(OCnode*,dds,ddsroot);
+    OCDEREF(OCnode*,dds,ddsroot);
+
+    return ocddsdasmerge(state,das,dds);
+}
+
+#if 0
+/*
+I suppressed this operation because I realized that it
+appears to be impossible to implement correctly in general.
+It also exposes a flaw in the protocol.
+If I have a dds with two identical Grids, G1 and G2,
+and I ask for the projection ?G1.temp,G2.temp,
+then I get back a DATADDS with duplicated temp fields,
+which means the DATADDS is illegal.  The problem is that
+the protocol throws away important scoping information
+about the fact that each temp field is part of a different
+grid.
+*/
+/* Connect a specified DATADDS tree to a specified DDS tree */
+OCerror
+oc_attach_datadds(OCconnection conn, OCobject dataddsroot, OCobject ddsroot)
+{
+    OCstate* state;
+    OCnode* dxd;
+    OCnode* dds;
+    OCVERIFY(OCstate*,state,conn);
+    OCDEREF(OCstate*,state,conn);
+    OCVERIFY(OCnode*,dxd,dataddsroot);
+    OCDEREF(OCnode*,dxd,dataddsroot);
+    OCVERIFY(OCnode*,dds,ddsroot);
+    OCDEREF(OCnode*,dds,ddsroot);
+
+    /* get the true roots */
+    dds = dds->root;
+    dxd = dxd->root;
+    if(dds == NULL || dxd == NULL) return OC_EBADID;    
+    /* correlate the DATADDS to the DDS */
+    return occorrelate(dxd,dds);
+}
+
+/* Return the attached DATADDS object for a given DDS object */
+OCerror oc_inq_datadds(OCconnection conn, OCobject dds0, OCobject* dataddsp)
+{
+    OCstate* state;
+    OCnode* dds;
+    OCVERIFY(OCstate*,state,conn);
+    OCDEREF(OCstate*,state,conn);
+    OCVERIFY(OCnode*,dds,dds0);
+    OCDEREF(OCnode*,dds,dds0);
+
+    if(dataddsp) *dataddsp = (OCobject)dds->datadds;
+    return OC_NOERR;
+}
+#endif
+
+/**************************************************/
+
+OCerror
+oc_svcerrordata(OCconnection conn, char** codep,
+                               char** msgp, long* httpp)
+{
+    OCstate* state;
+    OCVERIFY(OCstate*,state,conn);
+    OCDEREF(OCstate*,state,conn);
+    return ocsvcerrordata(state,codep,msgp,httpp);
+}
+
+
+/**************************************************/
+/* Experimental: this is useful for the netcdf
+   DRNO project.
+*/
+
+/* New 10/31/2009: return the size (in bytes)
+   of the fetched datadds.
+*/
+
+OCerror
+oc_raw_xdrsize(OCconnection conn, OCobject root0, size_t* sizep)
+{
+    OCnode* root;
+    OCerror ocerr = OC_NOERR;
+    OCVERIFY(OCnode*,root,root0);
+    OCDEREF(OCnode*,root,root0);
+
+    if(sizep == NULL) goto done;
+    if(root->tree == NULL || root->tree->dxdclass != OCDATADDS)
+	{OCTHROWCHK((ocerr=OC_EINVAL)); goto done;}
+    if(sizep) *sizep = root->tree->data.datasize;
+
+done:
+    return ocerr;
+}
+
+/* Resend a url as a head request to check the Last-Modified time */
+OCerror
+oc_update_lastmodified_data(OCconnection conn)
+{
+    OCstate* state;
+    OCVERIFY(OCstate*,state,conn);
+    OCDEREF(OCstate*,state,conn);
+    return ocupdatelastmodifieddata(state);
+}
+
+long
+oc_get_lastmodified_data(OCconnection conn)
+{
+    OCstate* state;
+    OCVERIFY(OCstate*,state,conn);
+    OCDEREF(OCstate*,state,conn);
+    return state->datalastmodified;
+}
+
+int
+oc_dumpnode(OCconnection conn, OCobject root0)
+{
+    OCnode* root;
+    OCerror ocerr = OC_NOERR;
+    OCVERIFY(OCnode*,root,root0);
+    OCDEREF(OCnode*,root,root0);
+    ocdumpnode(root);
+    return ocerr;
+}
+
+OCerror
+oc_ping(const char* url)
+{
+    return ocping(url);
+}
+    
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/src_netcdf4/oc.h
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/src_netcdf4/oc.h	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/src_netcdf4/oc.h	(revision 1749)
@@ -0,0 +1,443 @@
+/* Copyright 2009, UCAR/Unidata and OPeNDAP, Inc.
+   See the COPYRIGHT dap for more information. */
+
+/*
+Draft OC External Interface
+Created: 4/4/2009
+Last Revised: 4/14/2009
+*/
+
+#ifndef OC_H
+#define OC_H
+
+#include <stdlib.h>
+#include <stdio.h>
+
+/* if defined, use magic numbers for consistency]) */
+#define OC_FASTCONSISTENCY
+
+/* OC_MAX_DIMS should be greater or equal to max allowed by dap or netcdf*/
+#define OC_MAX_DIMS 1024
+
+/* Specifies the OCtype.*/
+/* Primitives = Duplicate of the NODE_Byte..Node_URL union nc_type*/
+
+typedef unsigned long OCtype;
+
+/* Note: use #define rather than enum so we can extend if needed
+   more easily */
+/* Primitives*/
+/* OC_Ubyte, OC_Char, OC_Int64 and OC_UInt64 are defined for future extension*/
+#define OC_NAT ((OCtype)0)
+#define OC_Char ((OCtype)1)
+#define OC_Byte ((OCtype)2)
+#define OC_UByte ((OCtype)3)
+#define OC_Int16 ((OCtype)4)
+#define OC_UInt16 ((OCtype)5)
+#define OC_Int32 ((OCtype)6)
+#define OC_UInt32 ((OCtype)7)
+#define OC_Int64 ((OCtype)8)
+#define OC_UInt64 ((OCtype)9)
+#define OC_Float32 ((OCtype)10)
+#define OC_Float64 ((OCtype)11)
+#define OC_String ((OCtype)12)
+#define OC_URL ((OCtype)13)
+
+/* Non-primitives*/
+#define OC_Dataset	((OCtype)100)
+#define OC_Sequence	((OCtype)101)
+#define OC_Grid		((OCtype)102)
+#define OC_Structure	((OCtype)103)
+#define OC_Dimension	((OCtype)104)
+#define OC_Attribute	((OCtype)105)
+#define OC_Attributeset	((OCtype)106)
+#define OC_Primitive	((OCtype)107)
+#define OC_Group	((OCtype)108)
+#define OC_Type		((OCtype)109)
+
+/* Define a set of error
+  positive are system errors
+  (needs work)
+*/
+
+typedef int OCerror;
+#define OC_NOERR	(0)
+#define OC_EBADID	(-1)
+#define OC_ECHAR	(-2)
+#define OC_EDIMSIZE	(-3)
+#define OC_EEDGE	(-4)
+#define OC_EINVAL	(-5)
+#define OC_EINVALCOORDS	(-6)
+#define OC_ENOMEM	(-7)
+#define OC_ENOTVAR	(-8)
+#define OC_EPERM	(-9)
+#define OC_ESTRIDE	(-10)
+#define OC_EDAP		(-11)
+#define OC_EXDR		(-12)
+#define OC_ECURL	(-13)
+#define OC_EBADURL	(-14)
+#define OC_EBADVAR	(-15)
+#define OC_EOPEN	(-16)
+#define OC_EIO   	(-17)
+#define OC_ENODATA   	(-18)
+#define OC_EDAPSVC   	(-19)
+#define OC_ENAMEINUSE  	(-20)
+#define OC_EDAS		(-21)
+#define OC_EDDS		(-22)
+#define OC_EDATADDS	(-23)
+#define OC_ERCFILE	(-24)
+#define OC_ENOFILE	(-25)
+
+/* Define the classes of DAP DXD objects */
+typedef int OCdxd;
+#define OCDDS     0
+#define OCDAS     1
+#define OCDATADDS 2
+#define OCDATA OCDATADDS
+
+/* Define flags */
+typedef int OCflags;
+#define OCONDISK 1
+
+typedef enum OCmode {
+OCNULLMODE = 0,
+OCFIELDMODE = 1,
+OCSEQUENCEMODE = 2,
+OCARRAYMODE = 3,
+OCPRIMITIVEMODE = 4,
+OCEMPTYMODE = 0x8000000 /* internal use only */
+} OCmode;
+
+
+/* Define an unsigned alternative to off(64)_t*/
+typedef unsigned long long ocoffset_t;
+
+/* Define a wrapper for dimension sizes */
+typedef size_t ocindex_t;
+
+/* Define the effective API */
+
+#ifndef OCINTERNAL_H
+
+/* The OCobject type references a component of a DAS or DDS
+   (e.g. Sequence, Grid, Dataset, etc). These objects
+   are nested, so most objects reference a container object
+   and subnode objects.
+*/
+
+
+#ifdef OC_FASTCONSISTENCY
+/* Use unsigned int * so we can dereference to get magic number */
+typedef unsigned int* OCobject;
+#define OCNULL NULL
+#else
+typedef unsigned long OCobject;
+#define OCNULL ((OCobject)0)
+#endif
+
+/* These are the two critical types*/
+/* Think of OClink as analogous to the C stdio FILE structure;
+   it "holds" all the other state info about
+   a connection to the server, the url request, and the DAS/DDS/DATADDSinfo.
+*/
+/* Renamed from OCconnection because of confusion about term "connection"
+   3/24/2010 by dmh
+*/
+typedef OCobject OClink;
+
+/* Keep old name for back compatibility */
+typedef OClink OCconnection; /*Deprecated*/
+
+/* Tag kind of log entry*/
+#define OCLOGNOTE 0
+#define OCLOGWARN 1
+#define OCLOGERR 2
+#define OCLOGDBG 3
+
+/**************************************************/
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+extern int oc_dumpnode(OClink conn, OCobject root0);
+
+/**************************************************/
+/* Link management */
+
+extern OCerror oc_open(const char* url, OClink*);
+extern OCerror oc_close(OClink);
+
+/**************************************************/
+/* Root management */
+/* Fetch and parse a given class of DXD the server specified
+   at open time, and using a specified set of constraints
+   and flags.
+   Return the root node of the parsed tree of objects.
+*/
+extern OCerror oc_fetchf(OClink,
+			const char* constraints,
+			OCdxd,
+			OCflags,
+			OCobject* rootp);
+
+
+/*
+  Equivalent to oc_fetchf with zero flag parameter
+*/
+extern OCerror oc_fetch(OClink,
+			const char* constraints,
+			OCdxd,
+			OCobject* rootp);
+
+/* Release/reclaim the tree of objects associated with a given root */
+extern OCerror oc_root_free(OClink, OCobject root);
+
+/* Return the # of  OCobjects associated with a tree with specified root */
+extern unsigned int oc_inq_nobjects(OClink, OCobject root);
+
+/* Return all the OCobjects associated with a tree with specified root */
+extern OCobject* oc_inq_objects(OClink, OCobject root);
+
+/* Return the text of the DDS or DAS as received from the server */
+extern const char* oc_inq_text(OClink, OCobject root);
+
+/**************************************************/
+/* Object Management */
+
+/* Any of the pointers may be NULL in the following procedure call;
+  If the object is of type Dataset, then return # of global attributes
+  If the object is of type Attribute, then return the # of values in nattrp.
+  The caller must free the resulting name string.
+*/
+extern OCerror oc_inq_object(OClink, OCobject,
+		  char** namep,
+		  OCtype* typep,
+		  OCtype* primitivetypep, /* if objecttype == OC_Primitive */
+		  OCobject* parentp,
+		  unsigned int* rankp,
+		  unsigned int* nsubnodesp,
+		  unsigned int* nattrp);
+
+/* Also define some more individual accessors */
+
+extern OCerror oc_inq_name(OClink,OCobject,char**);
+extern OCerror oc_inq_class(OClink,OCobject,OCtype*);
+extern OCerror oc_inq_type(OClink,OCobject,OCtype*); /*alias for oc_inq_class*/
+extern OCerror oc_inq_primtype(OClink,OCobject,OCtype*);
+extern OCerror oc_inq_nsubnodes(OClink,OCobject,unsigned int*);
+extern OCerror oc_inq_rank(OClink,OCobject,unsigned int*);
+extern OCerror oc_inq_nattr(OClink,OCobject,unsigned int*);
+extern OCerror oc_inq_root(OClink,OCobject,OCobject*);
+extern OCerror oc_inq_container(OClink,OCobject,OCobject*);
+
+/* Return the subnode objects, if any, associated with a given object.
+Caller must free the returned subnodes memory.
+*/
+extern OCerror oc_inq_subnodes(OClink,OCobject,OCobject** subnodes);
+
+/* Return the i'th subnode object, if any, associated with a given object */
+/* If there is none such, then return OC_EINVAL */
+extern OCerror oc_inq_ith(OClink,OCobject, unsigned int, OCobject*);
+
+/* Return the dimension objects, if any, associated with a given object */
+/* Caller must free returned vector for dimids */
+/* If there are no dimensions (i.e. rank == 0), then return NULL */
+extern OCerror oc_inq_dimset(OClink,OCobject, OCobject** dimids);
+
+/* Return the i'th dim object, if any, associated with a given object */
+/* If there is no such dim, then return OC_EINVAL */
+extern OCerror oc_inq_ithdim(OClink,OCobject, unsigned int, OCobject*);
+
+/* Return the size and name associated with a given dimension object
+   as defined in the DDS
+*/
+extern OCerror oc_inq_dim(OClink,OCobject,ocindex_t*,char**);
+
+/* Attribute Management */
+
+/* Added: 11/2/2009 DMH:
+   Provide access to DDS node attributes
+   in the form of the original underlying
+   DAS string.
+   One specifies the DDS root to get the global attributes.
+   Caller must free returned strings.
+*/
+
+extern OCerror oc_inq_attrstrings(OClink,OCobject, unsigned int i,
+			   char** name, OCtype* octype,
+			   unsigned int* nvalues,char*** stringvalues);
+
+/* Obtain the attributes associated with a given DDS OCobject.
+   One specifies the DDS root to get the global attributes
+   This code takes the DAS strings and does a default
+   conversion to binary values.
+*/
+extern OCerror oc_inq_attr(OClink,OCobject, unsigned int i,
+			   char** name,OCtype* octype,
+			   unsigned int* nvalues,void** values);
+
+/* Convenience function to simplify reclaiming the allocated attribute
+   value memory
+*/
+extern void oc_attr_reclaim(OCtype, unsigned int nvalues, void* values);
+
+/* Access ith value string of a DAS object.
+   OCtype of the object is assumed to be OC_Attribute.
+   Note that this is  different than the above inq_attr
+   and inq_attrstrings, which work on DDS
+   objects. Note also that the return value is always a string.
+   Caller must free returned string.
+*/
+
+extern OCerror oc_inq_dasattr_nvalues(OClink, OCobject,
+			unsigned int* nvaluesp);
+
+extern OCerror oc_inq_dasattr(OClink,OCobject, unsigned int,
+			      OCtype* primtypep, char** valuep);
+
+/**************************************************/
+/* Data management */
+
+/*
+These procedures allow for the location and extraction
+of data from the data packet part of a DATADDS.
+See ocuserman.html for detailed description.
+*/
+
+typedef OCobject OCdata;
+
+/* Obtain the OCdata object that references the
+   whole data from a DATADDS fetch request specified
+   by the root object. This does not access the server.
+*/
+extern OCerror oc_data_root(OClink, OCobject root, OCdata);
+
+/* Create an empty OCdata object */
+extern OCdata oc_data_new(OClink);
+
+/* Reclaim a no longer needed OCdata object */
+extern OCerror oc_data_free(OClink, OCdata);
+
+/* Given an OCdata object, set the nested subnode OCdata object
+   to refer to the data associated with the i'th element of
+   the parent data object. NOTE: if the i'th element is not
+   present then this function will return OC_ENODATA.
+   See the user's manual for details on mapping multi-
+   dimensional arrays to single indices.
+*/
+extern OCerror oc_data_ith(OClink,
+				OCdata parentdata,
+				ocindex_t index,
+				OCdata subdata);
+
+/* Return the actual data values associated with the specified OCdata.
+   The OCdata is assumed to be referencing either a scalar
+   primitive value or a (1d) array of primitive values.
+   If scalar, then index must be 0 and count must be 1.
+*/
+extern OCerror oc_data_get(OClink,OCdata,
+                         void* memory, size_t memsize,
+                         ocindex_t index, ocindex_t count);
+
+/* Return the OCdata's current index */
+extern OCerror oc_data_index(OClink,OCdata, ocindex_t*);
+
+/* Return the mode associated the specified OCdata object */
+extern OCerror oc_data_mode(OClink,OCdata, OCmode*);
+
+/* Return the OCobject associated the specified OCdata object */
+extern OCerror oc_data_object(OClink,OCdata, OCobject*);
+
+/* Compute the the count associated with the specified OCdata
+   instance. Note: this is potentially computationally costly
+   when computing # records.
+*/
+extern OCerror oc_data_count(OClink, OCdata, ocindex_t*);
+
+/**************************************************/
+/* Misc. OCtype-related functions */
+
+/* Return size of the given type (Primitive only) */
+extern size_t oc_typesize(OCtype);
+
+/* Return a canonical printable string describing a given type:
+   e.g. Byte, Int16, etc.
+*/
+extern const char* oc_typetostring(OCtype);
+
+/* Given a value of a primitive OC type, provide a canonical
+   string representing that value
+*/
+extern OCerror oc_typeprint(OCtype, char* buf, size_t bufsize, void* value);
+
+/**************************************************/
+/* Logging */
+
+extern void oc_loginit(void);
+extern void oc_setlogging(int onoff); /* 1=>start logging 0=>stop */
+extern void oc_logopen(const char* logfilename);
+extern void oc_logclose(void);
+
+extern void oc_logtext(int tag, const char* text);
+
+extern void oc_log(int tag, const char* fmt, ...);
+
+/**************************************************/
+/* Miscellaneous */
+
+/* Convert an OCerror to a human readable string */
+extern const char* oc_errstring(int err);
+
+/* Get client parameters from the URL
+   DO NOT free the result
+*/
+extern const char* oc_clientparam_get(OClink, const char* param);
+
+extern OCerror oc_clientparam_delete(OClink, const char* param);
+extern OCerror oc_clientparam_insert(OClink, const char* param, const char* value);
+extern OCerror oc_clientparam_replace(OClink, const char* param, const char* value);
+
+/**************************************************/
+/* Merging operations */
+
+/* Merge a specified DAS into a specified DDS or DATADDS */
+extern OCerror oc_attach_das(OClink, OCobject dasroot, OCobject ddsroot);
+
+/**************************************************/
+/* Debugging */
+extern OCerror oc_dd(OClink,OCobject,int level);
+extern OCerror oc_ddnode(OClink,OCobject);
+
+/* When a server error is detected, then it is possible
+   to get the server error info using this procedure */
+extern OCerror oc_svcerrordata(OClink link, char** codep,
+                               char** msgp, long* httpp);
+
+
+
+/**************************************************/
+/* Experimental */
+
+/* New 10/31/2009: return raw information about a datadds
+*/
+
+extern OCerror oc_raw_xdrsize(OClink, OCobject, size_t*);
+
+/* Resend a url as a head request to check the Last-Modified time */
+extern OCerror oc_update_lastmodified_data(OClink);
+
+/* Get last known modification time; -1 => data unknown */
+extern long oc_get_lastmodified_data(OClink);
+
+extern OCerror oc_ping(const char* url);
+
+/**************************************************/
+
+#endif /*OCINTERNAL_H*/
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /*OC_H*/
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/src_netcdf4/ocbytes.c
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/src_netcdf4/ocbytes.c	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/src_netcdf4/ocbytes.c	(revision 1749)
@@ -0,0 +1,190 @@
+/* Copyright 2009, UCAR/Unidata and OPeNDAP, Inc.
+   See the COPYRIGHT file for more information. */
+
+#include "config.h"
+
+#include <stdlib.h>
+#include <stdio.h>
+#include <string.h>
+
+#include "ocbytes.h"
+
+#ifndef TRUE
+#define TRUE 1
+#endif
+#ifndef FALSE
+#define FALSE 0
+#endif
+
+#define DEFAULTALLOC 1024
+#define ALLOCINCR 1024
+
+static int ocbytesdebug = 1;
+
+static long
+ocbytesfail(void)
+{
+    fflush(stdout);
+    fprintf(stderr,"bytebuffer failure\n");
+    fflush(stderr);
+    if(ocbytesdebug) abort();
+    return FALSE;
+}
+
+OCbytes*
+ocbytesnew(void)
+{
+  OCbytes* bb = (OCbytes*)malloc(sizeof(OCbytes));
+  if(bb == NULL) return (OCbytes*)ocbytesfail();
+  bb->alloc=0;
+  bb->length=0;
+  bb->content=NULL;
+  bb->nonextendible = 0;
+  return bb;
+}
+
+int
+ocbytessetalloc(OCbytes* bb, unsigned int sz)
+{
+  char* newcontent;
+  if(bb == NULL) return ocbytesfail();
+  if(sz <= 0) {sz = (bb->alloc?2*bb->alloc:DEFAULTALLOC);}
+  if(bb->alloc >= sz) return TRUE;
+  if(bb->nonextendible) return ocbytesfail();
+  newcontent=(char*)calloc(sz,sizeof(char));
+  if(newcontent == NULL) return FALSE;
+  if(bb->alloc > 0 && bb->length > 0 && bb->content != NULL) {
+    memcpy((void*)newcontent,(void*)bb->content,sizeof(char)*bb->length);
+  }
+  if(bb->content != NULL) free(bb->content);
+  bb->content=newcontent;
+  bb->alloc=sz;
+  return TRUE;
+}
+
+void
+ocbytesfree(OCbytes* bb)
+{
+  if(bb == NULL) return;
+  if(!bb->nonextendible && bb->content != NULL) free(bb->content);
+  free(bb);
+}
+
+int
+ocbytessetlength(OCbytes* bb, unsigned int sz)
+{
+  if(bb == NULL) return ocbytesfail();
+  if(sz > bb->alloc) {if(!ocbytessetalloc(bb,sz)) return ocbytesfail();}
+  bb->length = sz;
+  return TRUE;
+}
+
+int
+ocbytesfill(OCbytes* bb, char fill)
+{
+  unsigned int i;
+  if(bb == NULL) return ocbytesfail();
+  for(i=0;i<bb->length;i++) bb->content[i] = fill;
+  return TRUE;
+}
+
+int
+ocbytesget(OCbytes* bb, unsigned int index)
+{
+  if(bb == NULL) return -1;
+  if(index >= bb->length) return -1;
+  return bb->content[index];
+}
+
+int
+ocbytesset(OCbytes* bb, unsigned int index, char elem)
+{
+  if(bb == NULL) return ocbytesfail();
+  if(index >= bb->length) return ocbytesfail();
+  bb->content[index] = elem;
+  return TRUE;
+}
+
+int
+ocbytesappend(OCbytes* bb, char elem)
+{
+  if(bb == NULL) return ocbytesfail();
+  /* We need space for the char + null */
+  while(bb->length+1 >= bb->alloc) {
+	if(!ocbytessetalloc(bb,0)) return ocbytesfail();
+  }
+  bb->content[bb->length] = elem;
+  bb->length++;
+  bb->content[bb->length] = '\0';
+  return TRUE;
+}
+
+/* This assumes s is a null terminated string*/
+int
+ocbytescat(OCbytes* bb, char* s)
+{
+    ocbytesappendn(bb,(void*)s,strlen(s)+1); /* include trailing null*/
+    /* back up over the trailing null*/
+    if(bb->length == 0) return ocbytesfail();
+    bb->length--;
+    return 1;
+}
+
+int
+ocbytesappendn(OCbytes* bb, void* elem, unsigned int n)
+{
+  if(bb == NULL || elem == NULL) return ocbytesfail();
+  if(n == 0) {n = strlen((char*)elem);}
+  while(!ocbytesavail(bb,n+1)) {
+    if(!ocbytessetalloc(bb,0)) return ocbytesfail();
+  }
+  memcpy((void*)&bb->content[bb->length],(void*)elem,n);
+  bb->length += n;
+  bb->content[bb->length] = '\0';
+  return TRUE;
+}
+
+int
+ocbytesprepend(OCbytes* bb, char elem)
+{
+  int i; /* do not make unsigned */
+  if(bb == NULL) return ocbytesfail();
+  if(bb->length >= bb->alloc) if(!ocbytessetalloc(bb,0)) return ocbytesfail();
+  /* could we trust memcpy? instead */
+  for(i=bb->alloc;i>=1;i--) {bb->content[i]=bb->content[i-1];}
+  bb->content[0] = elem;
+  bb->length++;
+  return TRUE;
+}
+
+char*
+ocbytesdup(OCbytes* bb)
+{
+    char* result = (char*)malloc(bb->length+1);
+    memcpy((void*)result,(const void*)bb->content,bb->length);
+    result[bb->length] = '\0'; /* just in case it is a string*/
+    return result;
+}
+
+char*
+ocbytesextract(OCbytes* bb)
+{
+    char* result = bb->content;
+    bb->alloc = 0;
+    bb->length = 0;
+    bb->content = NULL;
+    return result;
+}
+
+int
+ocbytessetcontents(OCbytes* bb, char* contents, unsigned int alloc)
+{
+    if(bb == NULL) return ocbytesfail();
+    ocbytesclear(bb);
+    if(!bb->nonextendible && bb->content != NULL) free(bb->content);
+    bb->content = contents;
+    bb->length = 0;
+    bb->alloc = alloc;
+    bb->nonextendible = 1;
+    return 1;
+}
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/src_netcdf4/ocbytes.h
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/src_netcdf4/ocbytes.h	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/src_netcdf4/ocbytes.h	(revision 1749)
@@ -0,0 +1,54 @@
+/* Copyright 2009, UCAR/Unidata and OPeNDAP, Inc.
+   See the COPYRIGHT file for more information. */
+
+#ifndef OCBYTES_H
+#define OCBYTES_H 1
+
+typedef struct OCbytes {
+  int nonextendible; /* 1 => fail if an attempt is made to extend this buffer*/
+  unsigned int alloc;
+  unsigned int length;
+  char* content;
+} OCbytes;
+
+#if defined(_CPLUSPLUS_) || defined(__CPLUSPLUS__) || defined(__CPLUSPLUS)
+#define EXTERNC extern "C"
+#else
+#define EXTERNC extern
+#endif
+
+EXTERNC OCbytes* ocbytesnew(void);
+EXTERNC void ocbytesfree(OCbytes*);
+EXTERNC int ocbytessetalloc(OCbytes*,unsigned int);
+EXTERNC int ocbytessetlength(OCbytes*,unsigned int);
+EXTERNC int ocbytesfill(OCbytes*, char fill);
+
+/* Produce a duplicate of the contents*/
+EXTERNC char* ocbytesdup(OCbytes*);
+/* Extract the contents and leave buffer empty */
+EXTERNC char* ocbytesextract(OCbytes*);
+
+/* Return the ith byte; -1 if no such index */
+EXTERNC int ocbytesget(OCbytes*,unsigned int);
+/* Set the ith byte */
+EXTERNC int ocbytesset(OCbytes*,unsigned int,char);
+
+/* Append one byte */
+EXTERNC int ocbytesappend(OCbytes*,char); /* Add at Tail */
+/* Append n bytes */
+EXTERNC int ocbytesappendn(OCbytes*,void*,unsigned int); /* Add at Tail */
+
+/* Concatenate a null-terminated string to the end of the buffer */
+EXTERNC int ocbytescat(OCbytes*,char*);
+/* Set the contents of the buffer; mark the buffer as non-extendible */
+EXTERNC int ocbytessetcontents(OCbytes*, char*, unsigned int);
+
+/* Following are always "in-lined"*/
+#define ocbyteslength(bb) ((bb)?(bb)->length:0U)
+#define ocbytesalloc(bb) ((bb)?(bb)->alloc:0U)
+#define ocbytescontents(bb) ((bb && bb->content)?(bb)->content:(char*)"")
+#define ocbytesextend(bb,len) ocbytessetalloc((bb),(len)+(bb->alloc))
+#define ocbytesclear(bb) ((bb)?(bb)->length=0:0U)
+#define ocbytesavail(bb,n) ((bb)?((bb)->alloc - (bb)->length) >= (n):0U)
+
+#endif /*OCBYTES_H*/
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/src_netcdf4/occlientparams.c
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/src_netcdf4/occlientparams.c	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/src_netcdf4/occlientparams.c	(revision 1749)
@@ -0,0 +1,128 @@
+/* Copyright 2009, UCAR/Unidata and OPeNDAP, Inc.
+   See the COPYRIGHT file for more information. */
+
+#include "config.h"
+#include "ocinternal.h"
+#include "ocdebug.h"
+
+#define LBRACKET '['
+#define RBRACKET ']'
+
+
+
+/*
+Client parameters are assumed to be
+one or more instances of bracketed pairs:
+e.g "[...][...]...".
+The bracket content in turn is assumed to be a
+comma separated list of <name>=<value> pairs.
+e.g. x=y,z=,a=b.
+If the same parameter is specifed more than once,
+then the first occurrence is used; this is so that
+is possible to forcibly override user specified
+parameters by prefixing.
+IMPORTANT: client parameter string is assumed to
+have blanks compress out.
+*/
+
+int
+ocparamdecode(OCstate* state)
+{
+    int i;
+    i = ocuridecodeparams(state->uri);
+    return i?OC_NOERR:OC_EBADURL;
+}
+
+
+const char*
+ocparamlookup(OCstate* state, const char* key)
+{
+    if(state == NULL || key == NULL || state->uri == NULL) return NULL;
+    return ocurilookup(state->uri,key);
+}
+
+int
+ocparamset(OCstate* state, const char* params)
+{
+    int i;
+    i = ocurisetparams(state->uri,params);
+    return i?OC_NOERR:OC_EBADURL;
+}
+
+#ifdef OCIGNORE
+void
+ocparamfree(OClist* params)
+{
+    int i;
+    if(params == NULL) return;
+    for(i=0;i<oclistlength(params);i++) {
+	char* s = (char*)oclistget(params,i);
+	if(s != NULL) free((void*)s);
+    }
+    oclistfree(params);
+}
+
+/*
+Delete the entry.
+return value = 1 => found and deleted;
+               0 => param not found
+*/
+int
+ocparamdelete(OClist* params, const char* clientparam)
+{
+    int i,found = 0;
+    if(params == NULL || clientparam == NULL) return 0;
+    for(i=0;i<oclistlength(params);i+=2) {
+	char* name = (char*)oclistget(params,i);
+	if(strcmp(clientparam,name)==0) {found=1; break;}
+    }
+    if(found) {
+	oclistremove(params,i+1); /* remove value */
+	oclistremove(params,i); /* remove name */
+    }
+    return found;
+}
+
+
+/*
+Insert new client param (name,value);
+return value = 1 => not already defined
+               0 => param already defined (no change)
+*/
+int
+ocparaminsert(OClist* params, const char* clientparam, const char* value)
+{
+    int i;
+    if(params == NULL || clientparam == NULL) return 0;
+    for(i=0;i<oclistlength(params);i+=2) {
+	char* name = (char*)oclistget(params,i);
+	if(strcmp(clientparam,name)==0) return 0;
+    }
+    /* not found, append */
+    oclistpush(params,(ocelem)nulldup(clientparam));
+    oclistpush(params,(ocelem)nulldup(value));
+    return 1;
+}
+
+
+/*
+Replace new client param (name,value);
+return value = 1 => replacement performed
+               0 => insertion performed
+*/
+int
+ocparamreplace(OClist* params, const char* clientparam, const char* value)
+{
+    int i;
+    if(params == NULL || clientparam == NULL) return 0;
+    for(i=0;i<oclistlength(params);i+=2) {
+	char* name = (char*)oclistget(params,i);
+	if(strcmp(clientparam,name)==0) {
+	    oclistinsert(params,i+1,(ocelem)nulldup(value));
+	    return 1;
+	}
+    }
+    ocparaminsert(params,clientparam,value);
+    return 0;
+}
+#endif
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/src_netcdf4/occlientparams.h
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/src_netcdf4/occlientparams.h	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/src_netcdf4/occlientparams.h	(revision 1749)
@@ -0,0 +1,11 @@
+/* Copyright 2009, UCAR/Unidata and OPeNDAP, Inc.
+  See the COPYRIGHT file for more information. */
+
+#ifndef OCCLIENTPARAMS_H
+#define OCCLIENTPARAMS_H
+
+extern OClist* ocparamdecode(OCstate*);
+extern const char* ocparamlookup(OCstate*, const char*);
+extern void ocparamset(OCstate*,const char*);
+
+#endif /*OCCLIENTPARAMS_H*/
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/src_netcdf4/occonstraints.h
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/src_netcdf4/occonstraints.h	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/src_netcdf4/occonstraints.h	(revision 1749)
@@ -0,0 +1,39 @@
+/* Copyright 2009, UCAR/Unidata and OPeNDAP, Inc.
+   See the COPYRIGHT file for more information. */
+
+#ifndef CONSTRAINTS_H
+#define CONSTRAINTS_H 1
+
+/*! Specifies an OCslice. */
+typedef struct OCslice {
+    size_t first;
+    size_t count;
+    size_t stride;
+    size_t stop; /* == first + count */
+    size_t declsize;  /* from defining dimension, if any.*/
+} OCslice;
+
+/*! Specifies a form of path where each element can have a set of associated indices */
+typedef struct OCpath {
+    OClist* names;
+    OClist* indexsets; /* oclist<oclist<Slice>> */
+} OCpath;
+
+/*! Specifies a ProjectionClause. */
+typedef struct OCprojectionclause {
+    char* target; /* "variable name" as mentioned in the projection */
+    OClist* indexsets; /* oclist<oclist<OCslice>> */
+    struct OCnode* node; /* node with name matching target, if any. */
+    int    gridconstraint; /*  used only for testing purposes */
+} OCprojectionclause;
+
+/*! Selection is the node type for selection expression trees */
+typedef struct OCselectionclause {
+    int op;
+    char* value;
+    struct OCselectionclause* lhs;
+    OClist* rhs;
+} OCselectionclause;
+
+
+#endif /*CONSTRAINTS_H*/
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/src_netcdf4/occontent.c
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/src_netcdf4/occontent.c	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/src_netcdf4/occontent.c	(revision 1749)
@@ -0,0 +1,1174 @@
+/* Copyright 2009, UCAR/Unidata and OPeNDAP, Inc.
+   See the COPYRIGHT file for more information. */
+
+#include "config.h"
+#include "ocinternal.h"
+#include "occontent.h"
+#include "ocdebug.h"
+
+/* Mnemonic*/
+#define ISPACKED 1
+
+/* Define the skipstate flags */
+#ifdef OCDEBUG
+typedef enum Skipstate {
+SKIPFIELDS = 1, /* skip instance without leading tag or arraycount */
+SKIPINSTANCE = 2, /*skip leading sequence tag or array counts */
+SKIPWHOLE = 4 /* skip complete object */
+} Skipstate;
+#else
+#define SKIPFIELDS	1 /* skip instance without leading tag or arraycount */
+#define SKIPINSTANCE	2 /*skip leading sequence tag or array counts */
+#define SKIPWHOLE	4 /* skip complete object */
+#endif
+
+/* Forward*/
+static OCmode modetransition(OCnode*,OCmode);
+static int ocgetsequencetag(XXDR* xdrs);
+static int ocskipcounts(XXDR* xdrs, OCnode*, off_t expected);
+
+static int ocarrayith(OCstate*, OCcontent*, OCcontent*, size_t);
+static int ocsequenceith(OCstate*, OCcontent*, OCcontent*, size_t);
+static int ocfieldith(OCstate*, OCcontent*, OCcontent*, size_t);
+
+static size_t ocarraycount(OCstate*, struct OCcontent*);
+static size_t ocsequencecount(OCstate*, struct OCcontent*);
+static size_t ocfieldcount(OCstate*, struct OCcontent*);
+static size_t ocprimcount(OCstate*, struct OCcontent*);
+
+static OCcontent* occlearcontent(struct OCstate* state, OCcontent* content);
+
+
+#ifdef OCDEBUG
+static void
+report(size_t memsize, char* memory)
+{
+#ifdef OCIGNORE
+    switch(memsize) {
+    case 1:
+        oc_log(LOGNOTE,"reading xdr: %lu bytes = |%2x|",(unsigned long)memsize,memory[0]);
+	break;
+    case 4:
+        oc_log(LOGNOTE,"reading xdr: %lu bytes = |%4lu|",(unsigned long)memsize,*(unsigned int*)memory);
+	break;
+    case 8:
+        oc_log(LOGNOTE,"reading xdr: %lu bytes = |%8lu|",(unsigned long)memsize,*(unsigned long long*)memory);
+	break;
+    default:
+        oc_log(LOGNOTE,"reading xdr: %lu bytes",(unsigned long)memsize);
+	break;
+    }    
+    oc_log(LOGNOTE,"reading xdr: %lu bytes",(unsigned long)memsize);
+#endif
+}
+
+static char*
+modestring(OCmode mode)
+{
+    switch(mode) {
+    case OCFIELDMODE: return "FIELD";
+    case OCSEQUENCEMODE: return "SEQUENCE";
+    case OCARRAYMODE: return "ARRAY";
+    case OCPRIMITIVEMODE: return "PRIMITIVE";
+    case OCNULLMODE: return "NULL";
+    case OCEMPTYMODE: return "EMPTY";
+    }
+    return "?";
+}
+
+void
+octrace1(char* proc, OCstate* state, OCcontent* content, int start, int count)
+{
+    unsigned long pos = xxdr_getpos(content->tree->data.xdrs);
+    fprintf(stderr,"trace: %s mode=%s node=%s (%s)",
+	    proc,modestring(content->mode),content->node->fullname,
+            octypetostring(content->node->octype));
+    if(content->packed)
+        fprintf(stderr," packed=%d",content->packed);
+    if(count >= 0)
+        fprintf(stderr," start=%lu count=%lu",
+	    (unsigned long)start,(unsigned long)count);
+    else
+        fprintf(stderr," index=%lu",(unsigned long)start);
+    fprintf(stderr," xdrs.pos=%lu",pos);
+    fprintf(stderr,"\n");
+    if(content->cache.valid) {
+	fprintf(stderr,"\tcache{index=%lu maxindex=%lu offset=%lu}\n",
+		(unsigned long)content->cache.index,
+		(unsigned long)content->cache.maxindex,
+		(unsigned long)content->cache.offset);
+    }
+    fflush(stderr);
+}
+
+void
+octrace(char* proc, OCstate* state, OCcontent* content, int index)
+{
+    octrace1(proc,state,content,index,-1);
+}
+
+
+#else
+#define octrace(proc,state,content,index)
+#define octrace1(proc,state,content,start,count)
+#define report(memsize,memory)
+#endif /*OCDEBUG*/
+
+OCmode
+ocgetmode(OCcontent* content)
+{
+    return (content == NULL ? OCNULLMODE : content->mode);
+}
+
+OCcontent*
+ocnewcontent(OCstate* state)
+{
+    OCcontent* content;
+    if(state == NULL) return NULL;
+    content = state->contentlist;
+    /* Search for an unused content node*/
+    while(content != NULL && content->mode != OCEMPTYMODE) {
+	content = content->next;
+    }
+    if(content == NULL) {
+	content = (OCcontent*)ocmalloc(sizeof(OCcontent));
+	MEMCHECK(content,(OCcontent*)NULL);
+	content->magic = OCMAGIC;
+        content->next = state->contentlist;
+        state->contentlist = content;
+    }
+    return occlearcontent(state,content);
+}
+
+void
+ocfreecontent(OCstate* state, OCcontent* content)
+{
+    if(content != NULL) {content->mode = OCEMPTYMODE;}
+}
+
+static OCcontent*
+occlearcontent(struct OCstate* state, OCcontent* content)
+{
+    /* save fields that should not be cleared */
+    unsigned int magic = content->magic;
+    OCcontent* next = content->next;
+    memset((void*)content,sizeof(OCcontent),0);
+    /* set/restore non-null fields */
+    content->magic = magic;
+    content->next = next;
+    content->state = state;
+    content->mode = OCNULLMODE;
+    return content;
+}
+
+static OCcontent*
+ocsetcontent(OCcontent* childcontent, OCcontent* parent, OCnode* node, int packed)
+{
+    childcontent->state = parent->state;
+    childcontent->cache.valid = 0;
+    childcontent->node = node;
+    childcontent->tree = node->root->tree;
+    childcontent->mode = modetransition(node,parent->mode);
+    childcontent->packed = packed;
+    return childcontent;
+}
+
+#ifdef OCIGNORE
+static OCcontent*
+occlonecontent(OCstate* state, OCcontent* content)
+{
+    OCcontent* clone = ocnewcontent(state);
+    clone->mode = content->mode;
+    clone->node = content->node;
+    clone->cache = content->indexcache;
+    return clone;
+}
+#endif
+
+OCerror
+ocdataith(OCstate* state, OCcontent* parent, size_t index, OCcontent* child)
+{
+    OCerror ocerr = OC_NOERR;
+    switch (parent->mode) {
+    case OCARRAYMODE:
+        ocerr = ocarrayith(state,parent,child,index);
+	break;
+    case OCSEQUENCEMODE:
+	ocerr = ocsequenceith(state,parent,child,index);
+	break;
+    case OCFIELDMODE:
+	ocerr = ocfieldith(state,parent,child,index);
+	break;
+    default: return OC_EINVAL;
+    }
+    if(ocerr == OC_EDATADDS)
+	ocdataddsmsg(state,parent->tree);
+    return ocerr;
+}
+
+OCerror
+ocdatacount(OCstate* state, OCcontent* current, size_t* sizep)
+{
+    OCerror ocerr = OC_NOERR;
+    size_t count = 0;
+    switch(current->mode) {
+    case OCARRAYMODE:
+	count = ocarraycount(state,current);
+	break;
+    case OCSEQUENCEMODE:
+	count = ocsequencecount(state,current);
+	break;
+    case OCFIELDMODE:
+	count = ocfieldcount(state,current);
+	break;
+    case OCPRIMITIVEMODE:
+	count = ocprimcount(state,current);        
+	break;
+    default: 
+	return OC_EINVAL;
+    }
+    current->cache.maxindex = ocmax(count,current->cache.maxindex);
+    if(sizep) *sizep = count;
+    return ocerr;
+}
+
+OCerror
+ocrootdata(OCstate* state, OCnode* root, OCcontent* content)
+{
+    OCtree* tree;
+    if(state == NULL || root == NULL || content == NULL)
+	return OCTHROW(OC_EINVAL);
+    if(root->tree == NULL) return OCTHROW(OC_EINVAL);
+    tree = root->tree;
+    if(tree->dxdclass != OCDATADDS) return OCTHROW(OC_ENODATA);
+    if(tree->nodes == NULL) return OCTHROW(OC_EINVAL);
+    if(tree->data.xdrs == NULL)
+	return OCTHROW(OC_EXDR);
+
+    occlearcontent(state,content);
+    content->mode = OCFIELDMODE;
+    content->node = root;
+    content->tree = tree;
+
+    content->cache.index = 0;
+    content->cache.maxindex = oclistlength(content->node->subnodes);
+    content->cache.offset = 0;
+    content->cache.valid = 1;
+
+    return OCTHROW(OC_NOERR);
+}
+
+/* Remember: we are operating wrt the datadds count, not the dds count */
+static OCerror
+ocarrayith(OCstate* state, OCcontent* content, OCcontent* elemcontent, size_t index)
+{
+    unsigned int i;
+    int stat = OC_NOERR;
+    XXDR* xdrs;
+    int packed, scalar;
+    OCtype etype,octype;
+    OCnode* node;
+    int startindex = 0;
+
+    octrace("ocarrayith", state, content, index);
+
+    if(state == NULL || content == NULL) return OCTHROW(OC_EINVAL);
+    if(content->mode != OCARRAYMODE) return OCTHROW(OC_EINVAL);
+
+    etype = content->node->etype;
+    octype = content->node->octype;
+    node = content->node;
+    scalar = (node->array.rank == 0 ? 1 : 0);
+    packed = (!scalar && octype == OC_Primitive &&
+              (etype == OC_Byte || etype == OC_UByte || etype == OC_Char));
+
+    xdrs = content->tree->data.xdrs;
+    if(xdrs == NULL) return OCTHROW(OC_EXDR);
+
+    if(!content->cache.valid) {
+        content->cache.index = 0; /* because we will have to walk to index'th data */
+        content->cache.maxindex = totaldimsize(node);
+	content->cache.valid = 1;
+        /* skip past the initial counts, if any */
+	if(!scalar) {
+	    if(!ocskipcounts(xdrs,node,node->skip.count)) return OCTHROW(OC_EDATADDS);
+    	}
+	/* checkpoint xdr position */
+	content->cache.offset = xxdr_getpos(xdrs);
+    }
+
+    /* move to the checkpoint position */
+    startindex = content->cache.index;
+    if(!xxdr_setpos(xdrs,content->cache.offset)) return xdrerror();
+
+    /* skip to the index'th item */
+    if(packed) {
+        content->cache.index = 0; /* keep at beginning */
+    } else {
+        for(i=startindex;i<index;i++) {
+            stat = ocskipinstance(node,xdrs,SKIPINSTANCE,NULL);
+            if(stat != OC_NOERR) return OCTHROW(stat);
+	}
+        content->cache.index = index; /* now we are at the index'th item */
+    }
+
+    /* update cache */
+    content->cache.index = index;
+    content->cache.offset = xxdr_getpos(xdrs);
+
+    /* set up the content for the current item in the array */
+    ocsetcontent(elemcontent,content,node,packed); /*keep same node */
+    if (index == content->cache.maxindex) {
+        /* mark eod */
+	elemcontent->mode = OCNULLMODE;	
+    }
+
+    return OCTHROW(stat);
+}
+
+static int
+ocsequenceith(OCstate* state, OCcontent* content, OCcontent* structcontent, size_t index)
+{
+    unsigned int i;
+    int stat = OC_NOERR;
+    XXDR* xdrs;
+    OCtype octype,etype;
+    int packed,scalar;
+    OCnode* node = content->node;
+    int startindex, tag;
+
+    octrace("ocsequenceith", state, content, index);
+
+    if(state == NULL || content == NULL) goto einval;
+    if(content->mode != OCSEQUENCEMODE) goto einval;
+    if(node->octype != OC_Sequence) goto einval;
+
+    octype = node->octype;
+    etype = node->etype;
+    scalar = (node->array.rank == 0 ? 1 : 0);
+    packed = (!scalar && octype == OC_Primitive &&
+              (etype == OC_Byte || etype == OC_UByte || etype == OC_Char));
+
+    xdrs = content->tree->data.xdrs;
+    if(xdrs == NULL) goto exdr;
+
+    if(!content->cache.valid) {
+	content->cache.valid = 1;
+        content->cache.index = 0;
+        content->cache.maxindex = 0;
+	content->cache.offset = xxdr_getpos(xdrs);
+    }
+
+    /* move to checkpoint position*/
+    startindex = content->cache.index;
+    if(!xxdr_setpos(xdrs,content->cache.offset)) goto exdr;
+
+    /* Walk past the first (index-1) records */
+    for(tag=StartOfSequence,i=startindex;i<index;i++) {
+        /* skip instance, including tag, but leave xdr at next tag */
+        stat = ocskipinstance(node,xdrs,SKIPINSTANCE,&tag);
+	if(stat != OC_NOERR) goto done;
+        if(tag == EndOfSequence)
+            break;
+        if(tag != StartOfSequence) {
+            oc_log(LOGERR,"missing/invalid begin/end record marker\n");
+            goto einvalcoords;
+        }
+    }
+    if(stat != OC_NOERR) goto done;
+
+    /* update cache; should be pointing to index'th record tag */
+    content->cache.index = index;
+    content->cache.maxindex = ocmax(index,content->cache.index);
+
+    /* this is a bit (too) tricky */
+    /* move to point to fields */
+    tag = ocgetsequencetag(xdrs);
+    if(tag == EndOfSequence) {
+	/* point past end of sequence */
+        content->cache.offset = xxdr_getpos(xdrs);
+    } else {/*tag == StartOfSequence*/
+	/* point to (next) start of sequence */
+        content->cache.offset = xxdr_getpos(xdrs) - XDRUNIT;
+    }
+    /* at this point, xdrs should point unconditionally
+       past the index'th tag */
+
+    /* Set state of new content: keep same node */
+    ocsetcontent(structcontent,content,node,packed);
+    if(tag == EndOfSequence) {
+        /* mark eod */
+	structcontent->mode = OCNULLMODE;	
+    }
+done:
+    return OCTHROW(stat);
+einval:
+    stat = OC_EINVAL;
+    goto done;
+exdr:
+    stat = OC_EXDR;
+    goto done;
+einvalcoords:
+    stat = OC_EINVALCOORDS;
+    goto done;
+}
+
+/*
+The ocfieldcontent procedure has to deal with the fact
+that the dap constraints may have removed some fields
+from the datadds and hence some fields may have no
+representation in the xdr data (or compiled data).
+Assume that xdr points to start of 0th field.
+*/
+static int
+ocfieldith(OCstate* state, OCcontent* content, OCcontent* fieldcontent, size_t index)
+{
+    unsigned int i;
+    int stat = OC_NOERR;
+    XXDR* xdrs;
+    OCtype octype,etype;
+    int packed;
+    int isscalar;
+    OCnode* node;
+    int startindex;
+
+    octrace("ocfieldith", state, content, index);
+
+    if(state == NULL || content == NULL) return OCTHROW(OC_EINVAL);
+    if(content->mode != OCFIELDMODE) return OCTHROW(OC_EINVAL);
+
+    node = content->node;
+    octype = node->octype;
+    etype = node->etype;
+    isscalar = (node->array.rank == 0 ? 1 : 0);
+    packed = (!isscalar && octype == OC_Primitive
+              && (etype == OC_Byte || etype == OC_UByte || etype == OC_Char));
+
+    xdrs = content->tree->data.xdrs;
+    if(xdrs == NULL) return OCTHROW(OC_EXDR);
+
+    if(!content->cache.valid) {
+        content->cache.index = 0;
+        content->cache.maxindex = oclistlength(node->subnodes);
+	content->cache.valid = 1;
+	/* checkpoint xdr position */
+	content->cache.offset = xxdr_getpos(xdrs);
+    }
+
+    /* move to the checkpoint position */
+    startindex = content->cache.index;
+    if(!xxdr_setpos(xdrs,content->cache.offset)) return xdrerror();
+
+    switch (octype) {
+    case OC_Sequence: /* assume xdrs points past sequence tag */
+    case OC_Grid: /* Note that the Grid array is field 0 and the maps are 1..nsubnodes*/
+    case OC_Dataset:
+    case OC_Structure:
+	/* walk to (i-1)'th field */
+        for(i=startindex;i<index;i++) { /* walk field by field */
+  	    OCnode* ithfield = (OCnode*)oclistget(node->subnodes,i);
+	    stat = ocskipinstance(ithfield,xdrs,SKIPWHOLE,NULL);
+	    if(stat != OC_NOERR) return OCTHROW(stat);
+	}
+	break;
+
+    default: return OCTHROW(OC_EINVAL);
+    }
+
+    /* update cache */
+    content->cache.index = index;
+    content->cache.offset = xxdr_getpos(xdrs);
+    /* Set state of new content: node changes to field node */
+    ocsetcontent(fieldcontent,content,
+		     (OCnode*)oclistget(node->subnodes,index),
+		     packed);
+    if(index >= content->cache.maxindex) {
+        /* mark eod */
+        fieldcontent->mode = OCNULLMODE;	
+    }
+
+    return OCTHROW(stat);
+}
+
+/*
+In order to actually extract data,
+one must move to the specific primitive typed
+field containing the data of interest by using
+ocfieldcontent().
+Then, oc_getcontent() is invoked to extract
+some subsequence of items from the field.
+Note that oc_getcontent() will also work for scalars,
+but the start must be zero and the count must be one.
+*/
+
+int
+ocgetcontent(OCstate* state, OCcontent* content, void* memory, size_t memsize,
+                 size_t start, size_t count)
+{
+    int stat = OC_NOERR;
+    XXDR* xdrs;
+    OCtype etype, octype;
+    int isscalar, packed;
+    size_t elemsize, totalsize;
+    OCnode* node = content->node;
+
+    octrace1("ocgetcontent", state, content, start, count);
+
+    if(state == NULL || content == NULL || memory == NULL)
+	{OCTHROWCHK(stat=OC_EINVAL); goto done;}
+    if(content->mode != OCPRIMITIVEMODE || node->octype != OC_Primitive)
+	{OCTHROWCHK(stat=OC_EINVAL); goto done;}
+
+    octype = node->octype;
+    etype = node->etype;
+
+    isscalar = (node->array.rank == 0);
+    packed = (!isscalar && octype == OC_Primitive
+              && (etype == OC_Byte || etype == OC_UByte || etype == OC_Char));
+
+    if(isscalar && (start != 0 || count != 1))
+	{OCTHROWCHK(stat=OC_EINVALCOORDS); goto done;}
+
+    /* validate memory space*/
+    elemsize = octypesize(etype);
+    totalsize = elemsize*count;
+    if(memsize < totalsize) return OCTHROW(OC_EINVAL);
+
+    xdrs = content->tree->data.xdrs;
+    if(xdrs == NULL) return OCTHROW(OC_EXDR);
+
+    /* Need to setup the cache */
+    if(!content->cache.valid) {
+        content->cache.valid = 1;
+        content->cache.index = 0;
+        content->cache.maxindex = totaldimsize(content->node);
+	if(!ocskipcounts(xdrs,content->node,content->cache.maxindex))
+	    return OCTHROW(OC_EXDR);
+        content->cache.offset = xxdr_getpos(xdrs);
+    }
+
+    if(content->cache.valid && content->cache.maxindex < (start+count))
+	return OCTHROW(OC_ENODATA);
+
+    /* utilize the cache */
+    if(!xxdr_setpos(xdrs,content->cache.offset)) return OCTHROW(OC_EXDR);
+
+    /* Extract the data */
+    stat = ocxdrread(content,xdrs,(char*)memory,memsize,start,count);
+
+#ifdef OCDEBUG
+    report(memsize,memory+start);
+#endif
+
+    /* Update the cache */
+    if(!packed) {
+        content->cache.index = (start+count);
+        content->cache.offset = xxdr_getpos(xdrs);
+    }
+
+done:
+    return OCTHROW(stat);
+}
+
+static size_t
+ocfieldcount(OCstate* state, OCcontent* content)
+{
+    OCnode* node = content->node;
+    size_t count;
+    OCASSERT((node != NULL));
+    count = oclistlength(node->subnodes);
+    return count;
+}
+
+static size_t
+ocarraycount(OCstate* state, OCcontent* content)
+{
+    unsigned int count;
+    OCnode* node = content->node;
+
+    OCASSERT((node != NULL));
+    OCASSERT((content->mode == OCARRAYMODE));
+
+    count = totaldimsize(node);
+
+#ifdef VERIFY
+    if(node->array.rank > 0) {
+	off_t checkpoint;
+	XXDR* xdrs;
+	unsigned int xdrcount;
+        /* verify against xdr */
+	xdrs = content->tree->data.xdrs;
+        OCASSERT((xdrs != NULL));
+        /* checkpoint current location */
+        checkpoint = xxdr_getpos(xdrs);
+        /* extract the count*/
+        if(!xxdr_uint(xdrs,&xdrcount)) return 0;
+	if(xdrcount != count) return 0;
+        /* return to checkpoint position*/
+        if(!xxdr_setpos(xdrs,checkpoint)) return 0;
+    }
+#endif /*VERIFY*/
+    return (size_t)count;
+}
+
+/* Counting records actually requires walking the xdr packet
+   so it is not necessarily cheap*/
+static size_t
+ocsequencecount(OCstate* state, OCcontent* content)
+{
+    size_t count;
+    OCnode* node = content->node;
+    XXDR* xdrs;
+    off_t checkpoint;
+
+    OCASSERT((node != NULL));
+    OCASSERT((node->octype == OC_Sequence));
+    OCASSERT((content->mode == OCSEQUENCEMODE));
+
+    xdrs = content->tree->data.xdrs;
+    OCASSERT((xdrs != NULL));
+
+    /* checkpoint location */
+    checkpoint = xxdr_getpos(xdrs);
+
+    for(count=0;;count++) {
+	int tag;
+        OCerror stat = ocskipinstance(node,xdrs,SKIPINSTANCE,&tag);
+	if(stat != OC_NOERR) {count = 0; break;}
+        if(tag == EndOfSequence) {
+            break; /* done with the count*/
+        } else if(tag != StartOfSequence) {
+            oc_log(LOGERR,"missing/invalid begin/end record marker\n");
+	    return 0;
+	}
+    }
+
+    /* move back to checkpoint position*/
+    if(!xxdr_setpos(xdrs,checkpoint)) return 0;
+
+    return count;
+}
+
+static size_t
+ocprimcount(OCstate* state, OCcontent* content)
+{
+    unsigned int count;
+    OCnode* node = content->node;
+
+    OCASSERT((node != NULL));
+    OCASSERT((content->mode == OCPRIMITIVEMODE));
+
+    count = totaldimsize(node);
+
+#ifdef VERIFY
+    if(node->array.rank > 0) {
+	off_t checkpoint;
+	XXDR* xdrs;
+	unsigned int xdrcount;
+        /* verify against xdr */
+	xdrs = content->tree->data.xdrs;
+        OCASSERT((xdrs != NULL));
+        /* checkpoint current location */
+        checkpoint = xxdr_getpos(xdrs);
+        /* extract the count*/
+        if(!xxdr_uint(xdrs,&xdrcount)) return 0;
+	if(xdrcount != count) return 0;
+        /* return to checkpoint position*/
+        if(!xxdr_setpos(xdrs,checkpoint)) return 0;
+    }
+#endif /*VERIFY*/
+    return (size_t)count;
+}
+
+static OCmode
+modetransition(OCnode* node, OCmode srcmode)
+{
+    OCmode  newmode = OCNULLMODE;
+    switch (srcmode) {
+    case OCARRAYMODE:
+	switch (node->octype) {
+	case OC_Sequence:
+	    newmode = OCSEQUENCEMODE;
+	    break;
+	case OC_Grid:
+	case OC_Structure:
+	    newmode = OCFIELDMODE;
+	    break;
+	default:
+	    break;
+	}
+	break;
+
+    case OCSEQUENCEMODE:
+	switch (node->octype) {
+	default:
+	    newmode = OCFIELDMODE;
+	    break;
+	}
+	break;
+
+    case OCFIELDMODE:
+	switch (node->octype) {
+	case OC_Sequence:
+	case OC_Grid:
+	case OC_Structure:
+	    newmode = OCARRAYMODE;
+	    break;
+	case OC_Primitive:
+	    newmode = OCPRIMITIVEMODE;
+	    break;
+	default:
+	    break;
+	}
+	break;
+
+    case OCPRIMITIVEMODE:
+    case OCNULLMODE:
+    case OCEMPTYMODE:
+    default:
+	newmode = OCNULLMODE;
+	break;
+    }
+    if(newmode == OCNULLMODE)
+        OCPANIC1("No defined mode transition: %d",(int)srcmode);
+    return newmode;
+}
+
+/* get the presumed current sequence tag */
+static int
+ocgetsequencetag(XXDR* xdrs)
+{
+    char tag[XDRUNIT];
+    if(!xxdr_getbytes(xdrs,tag,sizeof(tag))) return 0;
+    return tag[0];
+}
+
+static int
+ocskipcounts(XXDR* xdrs, OCnode* node, off_t expected)
+{
+    if(node->array.rank == 0) return 1; /* simple scalar */
+#ifdef VERIFY
+    unsigned int xdrcount0,xdrcount1;
+    /* Collect the dimension count from the xdr data packet*/
+    if(!xxdr_uint(xdrs,&xdrcount0)) OCGOTO(shortxdr);
+    if(expected >= 0 && xdrcount0 != expected) return 0;
+    /* pull out redundant second count*/
+    /* (note that String/URL do not have redundant count)*/
+    if(node->octype == OC_Primitive
+       && node->etype != OC_String && node->etype != OC_URL) {
+	if(!xxdr_uint(xdrs,&xdrcount1)) return 0;
+	if(xdrcount0 != xdrcount1) return 0;
+    }
+#else
+    /* skip the counts */
+    expected = expected; /*shut up compiler*/
+    if(node->octype == OC_Primitive
+       && node->etype != OC_String && node->etype != OC_URL) {
+        if(!xxdr_skip(xdrs,2*XDRUNIT)) return 0;
+    } else {
+	if(!xxdr_skip(xdrs,XDRUNIT)) return 0;
+    }
+#endif
+    return 1;
+}
+
+/**************************************************/
+/* Moved ocdata.c here */
+/**************************************************/
+
+const char StartOfSequence = '\x5A';
+const char EndOfSequence = '\xA5';
+
+static int ocerrorstring(XXDR* xdrs);
+
+#define LOCALMEMMAX 1024
+
+/*
+Skip arbitrary object based on its octype
+and a state 
+
+Cases:
+
+octype		Skip State	actions
+-------------------------------------------
+Structure
+  |Grid
+  |DataSet	SKIPINSTANCE	Skip single instance
+		  |SKIPFIELDS
+		SKIPWHOLE	Skip array of instances
+				including leading counts
+
+Sequence	SKIPFIELDS	Skip single record
+				(assume leading tag already skipped)
+		SKIPINSTANCE	Skip single record
+				(including leading tag)
+						    
+		SKIPWHOLE	Skip all records
+				including leading tags
+				and trailing end marker
+
+Primitive	<any>		Skip whole primitive array
+				including leading counts
+
+Notes:
+1. unlisted combinations are not legal/possible.
+2. assume that xxdr_getpos is properly positioned.
+3. If octype is OC_Sequence, tagp will be set with the
+   last tag encountered.
+*/
+
+OCerror
+ocskipinstance(OCnode* node, XXDR* xdrs, int state, int* tagp)
+{
+    int i,tag;
+    int stat = OC_NOERR;
+
+/* Support switch on combination of octype X state to simply code */
+#define CASE(octype,state) ((octype)<<3 | state)
+
+    switch (CASE(node->octype,state)) {
+
+    case CASE(OC_Dataset,SKIPINSTANCE):
+    case CASE(OC_Grid,SKIPINSTANCE):
+    case CASE(OC_Structure,SKIPINSTANCE):
+
+    case CASE(OC_Dataset,SKIPFIELDS):
+    case CASE(OC_Grid,SKIPFIELDS):
+    case CASE(OC_Structure,SKIPFIELDS):
+    case CASE(OC_Sequence,SKIPFIELDS): /* NOTE this special case */
+	if(node->skip.instancesize != OCINDETERMINATE) {
+	    if(!xxdr_skip(xdrs,node->skip.instancesize)) OCGOTO(shortxdr);
+	} else {/* skip field by field */
+	    for(i=0;i<oclistlength(node->subnodes);i++) {
+		OCnode* field = (OCnode*)oclistget(node->subnodes,i);
+		stat = ocskipinstance(field, xdrs, SKIPWHOLE,NULL);
+		if(stat != OC_NOERR) {OCTHROWCHK(stat); goto done;}
+	    }
+	}
+	break;
+
+    case CASE(OC_Dataset,SKIPWHOLE):
+    case CASE(OC_Grid,SKIPWHOLE):
+    case CASE(OC_Structure,SKIPWHOLE):
+	OCASSERT(node->skip.count != OCINDETERMINATE);
+	if(node->skip.totalsize != OCINDETERMINATE) {
+	    if(!xxdr_skip(xdrs,node->skip.totalsize)) goto badxdr;
+	} else {/* skip each instance */
+	    if(node->array.rank > 0) {
+	        if(!ocskipcounts(xdrs,node,node->skip.count)) goto badxdr;
+                for(i=0;i<node->skip.count;i++) {
+                    stat = ocskipinstance(node, xdrs, SKIPFIELDS,NULL);
+                    if(stat != OC_NOERR) {OCTHROWCHK(stat); goto done;}
+                }
+            } else { /* scalar */
+                stat = ocskipinstance(node, xdrs, SKIPINSTANCE,NULL);
+                if(stat != OC_NOERR) {OCTHROWCHK(stat); goto done;}
+            }
+        }
+	break;
+
+    case CASE(OC_Sequence,SKIPINSTANCE): /* Skip record including tag */
+	tag = ocgetsequencetag(xdrs); /* always read the tag */
+	if(tagp) *tagp = tag;
+	if(tag == StartOfSequence) { /* skip record fields */
+	    stat = ocskipinstance(node, xdrs, SKIPFIELDS,NULL);
+	    if(stat != OC_NOERR) {OCTHROWCHK(stat); break;}
+	} /* let caller handle */
+	break;
+	
+    case CASE(OC_Sequence,SKIPWHOLE): /* Skip multiple records including tags */
+	for(i=0;;i++) {
+	    stat = ocskipinstance(node, xdrs, SKIPINSTANCE, &tag);
+	    if(stat != OC_NOERR) {OCTHROWCHK(stat); break;}
+	    if(tag == EndOfSequence) break; /* done */
+	    if(tag != StartOfSequence) goto badxdr; /* malformed */
+	}
+	break;
+
+    case CASE(OC_Primitive,SKIPWHOLE):
+    case CASE(OC_Primitive,SKIPINSTANCE):
+    case CASE(OC_Primitive,SKIPFIELDS):
+	OCASSERT(node->skip.count != OCINDETERMINATE);
+	if(node->skip.totalsize != OCINDETERMINATE) {
+	    /* skip directly past it */
+	    if(!xxdr_skip(xdrs,node->skip.totalsize)) goto badxdr;
+	} else {/* Walk instance by instance */
+	    if(state == SKIPWHOLE) {
+		/* read the counts */
+		if(!ocskipcounts(xdrs,node,node->skip.count))
+		    goto badxdr;
+	    }
+	    OCASSERT(node->etype == OC_String || node->etype == OC_URL);
+	    /* get the count */
+	    for(i=0;i<node->skip.count;i++) {
+		/* read and skip the string */
+	        unsigned int len;
+		/* read string size */
+		if(!xxdr_uint(xdrs,&len)) OCGOTO(shortxdr);
+		/* round up to next XDRUNIT and skip string contents */
+		len = RNDUP(len);
+		if(!xxdr_skip(xdrs,(size_t)len)) OCGOTO(shortxdr);
+            }
+	}
+	break;
+
+        default:
+	    OCPANIC2("ocskipinstance: encountered unexpected node type or state: %d,%d",
+			node->octype,state);
+	    break;
+    }
+done:
+    return OCTHROW(stat);
+shortxdr:
+    oc_log(LOGERR,"short xdr packet");
+    stat = OC_EXDR;
+    goto done;
+badxdr:
+    oc_log(LOGERR,"malformed xdr packet");
+    stat = OC_EXDR;
+    goto done;
+}
+
+/*
+Extract data from the xdr packet into a chunk of memory.
+Normally, it is assumed that we are (at least virtually)
+"at" a single instance in the xdr packet; which we read.
+Virtually because for packed data, we need to point to
+the beginning of the packed data and use the index to indicate
+which packed element to get. Assume that in any case,
+any leading counts have been passed.
+*/
+OCerror
+ocxdrread(OCcontent* content, XXDR* xdrs, char* memory, size_t memsize,
+          ocindex_t start, ocindex_t count)
+{
+    int stat = OC_NOERR;
+    unsigned int i;
+    size_t elemsize;
+    size_t readsize;
+    size_t skipsize;
+    char localmem[LOCALMEMMAX];
+    char* srcmem;    
+    unsigned int* p;
+    int packed;
+    int scalar;
+    OCtype octype,etype;
+    ocindex_t localstart = start; /* will change if node is cacheing */
+    OCnode* node;
+
+    node = content->node;
+    octype = node->octype;
+    etype = node->etype;
+
+    elemsize = octypesize(etype);
+
+    scalar = (node->array.rank == 0 ? 1 : 0);
+
+    /* check if the data is packed*/
+    packed = (octype == OC_Primitive && !scalar
+              && (etype == OC_Byte || etype == OC_UByte || etype == OC_Char));
+	 
+    /* validate memory space*/
+    if(memsize < elemsize*count) return OCTHROW(OC_EINVAL);
+
+#ifdef OCIGNORE
+    if(!scalar && (!node->cache.cacheable || !node->cache.valid)) {
+        unsigned int xdrcount0,xdrcount1;
+	/* assume xdr position is correct */
+        /* Read leading double count if ! scalar*/
+        if(!xxdr_uint(xdrs,&xdrcount0)) OCGOTO(shortxdr);
+        if(!xxdr_uint(xdrs,&xdrcount1)) OCGOTO(shortxdr);
+        if(xdrcount0 != xdrcount1) return OCTHROW(OC_EXDR);
+        if(xdrcount0 < start+count) OCGOTO(shortxdr);
+    }
+#endif
+ 
+    /* Handle packed data specially*/
+    if(packed) {
+	readsize = count*1; /* |OC_(Char,Byte,UByte)| == 1 */
+	skipsize = start*1; /* |OC_(Char,Byte,UByte)| == 1 */
+	/* skip to start of what we want to read */
+	if(!xxdr_skip(xdrs,skipsize)) OCGOTO(shortxdr);
+	/* read data, keeping xdrs on XDRUNIT boundary */
+	if(!xxdr_opaque(xdrs,memory,readsize))
+	    OCGOTO(shortxdr);
+	return OCTHROW(OC_NOERR);
+    }
+
+    /* Not packed */
+
+#ifdef OCIGNORE
+    /* If this (primitive) object is cacheable and is valid cache,
+       then modify start and set the xdr position accordingly
+    */
+    if(node->cache.cacheable && node->cache.valid) {
+	if(node->cache.index <= start) {
+	    localstart -= node->cache.index;
+	    if(!xxdr_setpos(xdrs,node->cache.offset)) return xdrerror();
+	}
+    }
+#endif
+
+    /* Compute how much to skip based on the content's cache index */
+    localstart = start - content->cache.index;
+    if(localstart < 0) localstart = 0;
+
+    /* extract count items; use xxdr_getbytes to speed up*/
+    srcmem = memory;
+    switch (etype) {
+    case OC_Float64: case OC_Int64: case OC_UInt64:
+	readsize = count*2*XDRUNIT;
+	skipsize = localstart*2*XDRUNIT;
+	/* skip to start of what we want to read */
+	if(!xxdr_skip(xdrs,skipsize)) OCGOTO(shortxdr);
+	if(!xxdr_opaque(xdrs,(char*)srcmem,readsize)) OCGOTO(shortxdr);
+	if(etype == OC_Float64) {
+	    double* dp;
+	    for(dp=(double*)srcmem,i=0;i<count;i++,dp++) {
+		double swap;
+		xxdrntohdouble((char*)dp,&swap);
+		*dp = swap;
+	    }
+	} else if(!xxdr_network_order) {
+	    unsigned long long* llp;
+	    for(llp=(unsigned long long*)srcmem,i=0;i<count;i++,p++) {
+		swapinline64(llp);
+	    }
+	}
+	break;
+
+    case OC_String: case OC_URL: {
+	/* Read string by string */
+        char* s = NULL;
+	char** pmem = (char**)srcmem;
+	/* First skip to the starting string */
+	for(i=0;i<localstart;i++) {
+	    unsigned int slen;
+            if(!xxdr_uint(xdrs,&slen)) OCGOTO(shortxdr);
+	    slen = RNDUP(slen);
+            if(!xxdr_skip(xdrs,slen)) OCGOTO(shortxdr);
+        }
+	/* Read count strings */
+	for(i=0;i<count;i++) {
+	    off_t slen;
+	    /* xxdr_string will always alloc the space */	
+            if(!xxdr_string(xdrs,&s,&slen)) 
+		OCGOTO(shortxdr);
+	    pmem[i] = s;
+	}
+    } break;
+
+
+    case OC_Char: case OC_Byte: case OC_UByte:
+    case OC_Int16: case OC_UInt16:
+	/* We need to store the xdr data locally until we can convert it out 
+           because  elemsize < sizeof(int) */
+	srcmem = localmem;
+	if(count*elemsize > sizeof(localmem)) {
+	    srcmem = (char*)ocmalloc(count*sizeof(unsigned int));
+	    if(srcmem == NULL) {stat = OCTHROW(OC_ENOMEM); goto done;}
+	}
+	/* fall thru */		
+    case OC_Int32: case OC_UInt32:
+    case OC_Float32:
+        readsize = (count)*XDRUNIT;
+        skipsize = (localstart)*XDRUNIT;
+	if(!xxdr_skip(xdrs,skipsize)) OCGOTO(shortxdr);
+	if(!xxdr_opaque(xdrs,(char*)srcmem,readsize)) OCGOTO(shortxdr);
+	if(!xxdr_network_order) {
+	    for(p=(unsigned int*)srcmem,i=0;i<count;i++,p++) {
+		swapinline32(p);
+	    }
+	}
+	break;
+
+    default: OCPANIC("unexpected etype"); break;
+    }
+
+    /* Convert memory to right format */
+    switch (etype) {
+
+    case OC_Char: case OC_Byte: case OC_UByte: {
+	char* pmem = (char*)memory;
+	p = (unsigned int*)srcmem;
+	for(i=0;i<count;i++) {
+	    unsigned int tmp = *p++;
+	    *pmem++ = (unsigned char)tmp;
+	}
+    } break;
+
+    case OC_Int16: case OC_UInt16: {
+	unsigned short* pmem = (unsigned short*)memory;
+	p = (unsigned int*)srcmem;
+	for(i=0;i<count;i++) {
+	    unsigned int tmp = *p++;
+	    *pmem++ = (unsigned short)tmp;
+	}
+    } break;
+
+    default: 
+	break; /* already handled above */
+    }
+
+    /* set cache */
+    content->cache.index = start + count; /* should be our current index */
+    content->cache.offset = xxdr_getpos(xdrs); /* should be our current position */
+
+done:
+    return OCTHROW(stat);
+
+shortxdr:
+    content->cache.valid = 0; /* no longer valid */
+    if(!ocerrorstring(xdrs))
+        oc_log(LOGERR,"DAP DATADDS packet is apparently too short");
+    stat = OCTHROW(OC_EDATADDS);
+    goto done;    
+}
+
+int
+occountrecords(OCnode* node, XXDR* xdrs, size_t* nrecordsp)
+{
+    int stat = OC_NOERR;
+    size_t nrecords = 0;
+
+    if(node->octype != OC_Sequence) return OCTHROW(OC_EINVAL);
+    /* checkpoint the xdr position*/
+    for(nrecords=0;;nrecords++) {
+	int tag = 0;
+	stat = ocskipinstance(node,xdrs,SKIPINSTANCE,&tag);
+        if(stat != OC_NOERR) break;
+        if(tag == EndOfSequence) break;
+        if(tag != StartOfSequence) {
+            oc_log(LOGERR,"missing/invalid begin/end record marker\n");
+            stat = OC_EINVALCOORDS;
+            break;
+        }
+        if(stat != OC_NOERR) break;
+    }
+    if(nrecordsp != NULL) *nrecordsp = nrecords;
+    return OCTHROW(stat);
+}
+
+
+
+#define tag "Error {\n"
+
+static int
+ocerrorstring(XXDR* xdrs)
+{
+    /* Check to see if the xdrs contains "Error {\n'; assume it is at the beginning of data */
+    off_t avail = xxdr_getavail(xdrs);
+    char* data = (char*)malloc(avail);
+    if(!xxdr_setpos(xdrs,0)) return 0;
+    if(!xxdr_opaque(xdrs,data,avail)) return 0;
+    /* check for error tag at front */
+    if(ocstrncmp(data,tag,sizeof(tag))==0) {
+	char* p;
+        if((p=strchr(data,'}')) != NULL) *(++p)='\0';
+        oc_log(LOGERR,"Server error: %s",data);
+        /* Since important, report to stderr as well */
+        fprintf(stderr,"Server error: %s",data);
+	return 1;
+    }
+    return 0;
+}
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/src_netcdf4/occontent.h
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/src_netcdf4/occontent.h	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/src_netcdf4/occontent.h	(revision 1749)
@@ -0,0 +1,35 @@
+/* Copyright 2009, UCAR/Unidata and OPeNDAP, Inc.
+   See the COPYRIGHT file for more information. */
+
+#ifndef OCCONTENT_H
+#define OCCONTENT_H
+
+/*! Specifies the OCcontent*/
+typedef struct OCcontent {
+    unsigned int magic;
+    OCmode mode;
+    struct OCstate* state;
+    struct OCnode* node;
+    struct OCtree* tree;
+    int    packed; /* track OC_Char and OC_Byte specially*/
+    struct OCCACHE {
+	int valid;
+        ocindex_t index;      /* index corresponding to offset */
+        ocindex_t maxindex;   /* max allowable index, if known0 => max unknown */
+        ocoffset_t offset;    /* location of this content in the xdr data */
+    } cache;  /* track last xdr position and index of this content */
+    struct OCcontent* next;
+} OCcontent;
+
+extern OCcontent* ocnewcontent(OCstate* state);
+extern void ocfreecontent(OCstate* state, OCcontent* content);
+extern OCmode ocgetmode(OCcontent* content);
+
+extern int ocdataith(struct OCstate*, OCcontent*, size_t, OCcontent*);
+extern int ocdatacount(struct OCstate*, OCcontent*, size_t*);
+
+extern int ocrootdata(struct OCstate*, struct OCnode*, struct OCcontent*);
+extern int ocgetcontent(struct OCstate*, struct OCcontent*, void* memory,
+                        size_t memsize, size_t start, size_t count);
+
+#endif /*OCCONTENT_H*/
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/src_netcdf4/occurlfunctions.c
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/src_netcdf4/occurlfunctions.c	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/src_netcdf4/occurlfunctions.c	(revision 1749)
@@ -0,0 +1,206 @@
+/* Copyright 2009, UCAR/Unidata and OPeNDAP, Inc.
+   See the COPYRIGHT file for more information. */
+
+#include "config.h"
+#include "ocinternal.h"
+#include "ocdebug.h"
+#include "ocdata.h"
+#include "occontent.h"
+
+#include "ocrc.h"
+
+/* Condition on libcurl version */
+/* Set up an alias as needed */
+#ifndef HAVE_CURLOPT_KEYPASSWD
+#define CURLOPT_KEYPASSWD CURLOPT_SSLKEYPASSWD
+#endif
+
+static char* combinecredentials(const char* user, const char* pwd);
+
+
+/* Set various general curl flags */
+int
+ocset_curl_flags(OCstate* state)
+{
+    CURLcode cstat = CURLE_OK;
+    CURL* curl = state->curl;
+    struct OCcurlflags* flags = &state->curlflags;
+
+#ifdef CURLOPT_ENCODING
+    if (flags->compress) {
+	cstat = curl_easy_setopt(curl, CURLOPT_ENCODING,"deflate, gzip");
+	if(cstat != CURLE_OK) goto done;
+	OCDBG(1,"CURLOPT_ENCODING=deflate, gzip");
+    }
+#endif
+    if (flags->cookiejar || flags->cookiefile) {
+	cstat = curl_easy_setopt(curl, CURLOPT_COOKIESESSION, 1);
+	if (cstat != CURLE_OK) goto done;
+	OCDBG(1,"CURLOPT_COOKIESESSION=1");
+    }
+    if (flags->cookiejar) {
+	cstat = curl_easy_setopt(curl, CURLOPT_COOKIEJAR, flags->cookiejar);
+	if (cstat != CURLE_OK) goto done;
+	OCDBG1(1,"CURLOPT_COOKIEJAR=%s",flags->cookiejar);
+    }
+    if (flags->cookiefile) {
+	cstat = curl_easy_setopt(curl, CURLOPT_COOKIEFILE, flags->cookiefile);
+	if (cstat != CURLE_OK) goto done;
+	OCDBG1(1,"CURLOPT_COOKIEFILE=%s",flags->cookiefile);
+    }
+    if (flags->verbose) {
+	cstat = curl_easy_setopt(curl, CURLOPT_VERBOSE, 1L);
+	if (cstat != CURLE_OK) goto done;
+	OCDBG1(1,"CURLOPT_VERBOSE=%ld",1L);
+    }
+
+    if (flags->timeout) {
+	cstat = curl_easy_setopt(curl, CURLOPT_TIMEOUT, (long)flags->timeout);
+	if (cstat != CURLE_OK) goto done;
+	OCDBG1(1,"CURLOPT_TIMEOUT=%ld",1L);
+    }
+
+    /* Following are always set */
+    cstat = curl_easy_setopt(curl, CURLOPT_FOLLOWLOCATION, 1L);
+    OCDBG1(1,"CURLOPT_FOLLOWLOCATION=%ld",1L);
+    cstat = curl_easy_setopt(curl, CURLOPT_MAXREDIRS, 10L);
+    OCDBG1(1,"CURLOPT_FOLLOWLOCATION=%ld",1L);
+
+    cstat = curl_easy_setopt(curl, CURLOPT_ERRORBUFFER, state->error.curlerrorbuf);
+    OCDBG1(1,"CURLOPT_ERRORBUFFER",0);
+
+done:
+    return cstat;
+}
+
+int
+ocset_proxy(OCstate* state)
+{
+    CURLcode cstat;
+    CURL* curl = state->curl;
+    struct OCproxy *proxy = &state->proxy;
+    struct OCcredentials *creds = &state->creds;
+
+    cstat = curl_easy_setopt(curl, CURLOPT_PROXY, proxy->host);
+    if (cstat != CURLE_OK) return OC_ECURL;
+    OCDBG1(1,"CURLOPT_PROXY=%s",proxy->host);
+
+    cstat = curl_easy_setopt(curl, CURLOPT_PROXYPORT, proxy->port);
+    if (cstat != CURLE_OK) return OC_ECURL;
+    OCDBG1(1,"CURLOPT_PROXYPORT=%d",proxy->port);
+
+    if (creds->username) {
+        char *combined = combinecredentials(creds->username,creds->password);
+        if (!combined) return OC_ENOMEM;
+        cstat = curl_easy_setopt(curl, CURLOPT_PROXYUSERPWD, combined);
+        if (cstat != CURLE_OK) return OC_ECURL;
+	OCDBG1(1,"CURLOPT_PROXYUSERPWD=%s",combined);
+#ifdef CURLOPT_PROXYAUTH
+        cstat = curl_easy_setopt(curl, CURLOPT_PROXYAUTH, (long)CURLAUTH_ANY);
+        if(cstat != CURLE_OK) goto fail;
+	OCDBG1(1,"CURLOPT_PROXYAUTH=%ld",(long)CURLAUTH_ANY);
+#endif
+        free(combined);
+    }
+    return OC_NOERR;
+}
+
+int
+ocset_ssl(OCstate* state)
+{
+    CURLcode cstat = CURLE_OK;
+    CURL* curl = state->curl;
+    struct OCSSL* ssl = &state->ssl;
+    long verify = (ssl->validate?1L:0L);
+    cstat=curl_easy_setopt(curl, CURLOPT_SSL_VERIFYPEER, verify);
+    if (cstat != CURLE_OK) goto fail;
+    OCDBG1(1,"CURLOPT_SSL_VERIFYPEER=%ld",verify);
+    cstat=curl_easy_setopt(curl, CURLOPT_SSL_VERIFYHOST, (verify?2L:0L));
+    if (cstat != CURLE_OK) goto fail;
+    OCDBG1(1,"CURLOPT_SSL_VERIFYHOST=%ld",(verify?2L:0L));
+#ifdef OCIGNORE
+    if(verify)
+#endif
+    {
+        if(ssl->certificate) {
+            cstat = curl_easy_setopt(curl, CURLOPT_SSLCERT, ssl->certificate);
+            if(cstat != CURLE_OK) goto fail;
+	    OCDBG1(1,"CURLOPT_SSLCERT=%s",ssl->certificate);
+        }
+        if(ssl->key) {
+            cstat = curl_easy_setopt(curl, CURLOPT_SSLKEY, ssl->key);
+            if(cstat != CURLE_OK) goto fail;
+	    OCDBG1(1,"CURLOPT_SSLKEY=%s",ssl->key);
+        }
+        if(ssl->keypasswd) {
+            /* libcurl prior to 7.16.4 used 'CURLOPT_SSLKEYPASSWD' */
+            cstat = curl_easy_setopt(curl, CURLOPT_KEYPASSWD, ssl->keypasswd);
+            if(cstat != CURLE_OK) goto fail;
+	    OCDBG1(1,"CURLOPT_SSLKEY=%s",ssl->key);
+        }
+        if(ssl->cainfo) {
+            cstat = curl_easy_setopt(curl, CURLOPT_CAINFO, ssl->cainfo);
+            if(cstat != CURLE_OK) goto fail;
+	    OCDBG1(1,"CURLOPT_CAINFO=%s",ssl->cainfo);
+        }
+        if(ssl->capath) {
+            cstat = curl_easy_setopt(curl, CURLOPT_CAPATH, ssl->capath);
+            if(cstat != CURLE_OK) goto fail;
+	    OCDBG1(1,"CURLOPT_CAPATH=%s",ssl->capath);
+        }
+        {
+            cstat = curl_easy_setopt(curl, CURLOPT_SSL_VERIFYPEER, ssl->verifypeer);
+            if(cstat != CURLE_OK) goto fail;
+	    OCDBG1(1,"CURLOPT_SSL_VERIFYPEER=%d",ssl->verifypeer);
+        }
+    }    
+    return OC_NOERR;
+
+fail:
+    return OC_ECURL;
+}
+
+/* This is called with arguments while the other functions in this file are
+ * used with global values read from the.dodsrc file. The reason is that
+ * we may have multiple password sources.
+ */
+int
+ocset_user_password(OCstate* state)
+{
+    CURLcode cstat;
+    CURL* curl = state->curl;
+    char* combined = NULL;
+    const char* userC = state->creds.username;
+    const char* passwordC = state->creds.password;
+
+    if(userC == NULL || passwordC == NULL) return OC_NOERR;
+
+    combined = combinecredentials(userC,passwordC);
+    if (!combined) return OC_ENOMEM;
+    cstat = curl_easy_setopt(curl, CURLOPT_USERPWD, combined);
+    if (cstat != CURLE_OK) goto done;
+    OCDBG1(1,"CURLOPT_USERPWD=%s",combined);
+    cstat = curl_easy_setopt(curl, CURLOPT_HTTPAUTH, (long) CURLAUTH_ANY);
+    if (cstat != CURLE_OK) goto done;
+    OCDBG1(1,"CURLOPT_HTTPAUTH=%ld",(long)CURLAUTH_ANY);
+
+done:
+    if(combined != NULL) free(combined);
+    return (cstat == CURLE_OK?OC_NOERR:OC_ECURL);
+}
+
+
+static char*
+combinecredentials(const char* user, const char* pwd)
+{
+    int userPassSize = strlen(user) + strlen(pwd) + 2;
+    char *userPassword = malloc(sizeof(char) * userPassSize);
+    if (!userPassword) {
+        oc_log(LOGERR,"Out of Memory\n");
+	return NULL;
+    }
+    strcpy(userPassword, user);
+    strcat(userPassword, ":");
+    strcat(userPassword, pwd);
+    return userPassword;
+}
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/src_netcdf4/occurlfunctions.h
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/src_netcdf4/occurlfunctions.h	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/src_netcdf4/occurlfunctions.h	(revision 1749)
@@ -0,0 +1,19 @@
+/*
+ * rc.h
+ *
+ *  Created on: Mar 5, 2009
+ *      Author: rikki
+ */
+
+#ifndef _CURLFUNCTION_H_
+#define _CURLFUNCTION_H_
+
+extern int ocset_curl_flags(OCstate*);
+extern int ocset_user_password(OCstate*);
+extern int ocset_proxy(OCstate*);
+extern int ocset_ssl(OCstate*);
+
+#endif /*_CURLFUNCTION_H_*/
+
+
+
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/src_netcdf4/ocdata.h
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/src_netcdf4/ocdata.h	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/src_netcdf4/ocdata.h	(revision 1749)
@@ -0,0 +1,28 @@
+/* Copyright 2009, UCAR/Unidata and OPeNDAP, Inc.
+   See the COPYRIGHT file for more information. */
+
+#ifndef OCDATA_H
+#define OCDATA_H
+
+typedef struct OCdimcounter {
+    int rank;
+    size_t index[OC_MAX_DIMS];
+    size_t size[OC_MAX_DIMS];
+} OCdimcounter;
+
+extern const char StartOfSequence;
+extern const char EndOfSequence;
+
+/*Forward */
+struct OCcontent;
+
+/* Skip arbitrary dimensioned instance; Handles dimensioning.*/
+extern int ocskip(OCnode* node, XXDR* xdrs);
+
+extern int occountrecords(OCnode* node, XXDR* xdrs, size_t* nrecordsp);
+
+extern int ocxdrread(struct OCcontent*, XXDR*, char* memory, size_t, ocindex_t index, ocindex_t count);
+
+extern int ocskipinstance(OCnode* node, XXDR* xdrs, int state, int* tagp);
+
+#endif /*OCDATA_H*/
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/src_netcdf4/ocdatatypes.h
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/src_netcdf4/ocdatatypes.h	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/src_netcdf4/ocdatatypes.h	(revision 1749)
@@ -0,0 +1,61 @@
+/* Copyright 2009, UCAR/Unidata and OPeNDAP, Inc.
+   See the COPYRIGHT file for more information. */
+
+#ifndef OCDATATYPES_H
+#define OCDATATYPES_H
+
+/* Define some useful info about the supported
+   primitive datatypes*/
+
+#define DCHAR char
+#define DBYTE signed char
+#define DUBYTE unsigned char
+#define DINT16 short
+#define DUINT16 unsigned short
+#define DINT32 int
+#define DUINT32 unsigned int
+#define DINT64 int
+#define DUINT64 unsigned int
+#define DFLOAT32 float
+#define DFLOAT64 double
+
+#define	OC_CHAR_MIN	((char)0x00)
+#define	OC_CHAR_MAX	((char)0xff)
+#define	OC_BYTE_MIN	-128
+#define	OC_BYTE_MAX	127
+#define	OC_UBYTE_MIN	0
+#define	OC_UBYTE_MAX	255U
+#define	OC_INT16_MIN	-32768
+#define	OC_INT16_MAX	32767
+#define	OC_UINT16_MIN	0
+#define	OC_UINT16_MAX	65535U
+#define	OC_INT32_MIN	(-2147483647 - 1)
+#define	OC_INT32_MAX	2147483647
+#define	OC_UINT32_MIN	0
+#define	OC_UINT32_MAX	4294967295U
+#define OC_INT64_MIN    (-9223372036854775807LL-1)
+#define OC_INT64_MAX    (9223372036854775807LL)
+#define OC_UINT64_MIN   0LL
+#define OC_UINT64_MAX   (18446744073709551615ULL)
+#define	OC_FLOAT32_MAX	3.402823466E+38F	/* max decimal value of a "float" */
+#define	OC_FLOAT32_MIN	(-OC_FLOAT_MAX)
+#define	OC_FLOAT64_MAX	1.7976931348623157E+308	/* max decimal value of a double */
+#define	OC_FLOAT64_MIN	(-OC_FLOAT64_MAX)
+
+/* Similar to netcdf*/
+#define OC_FILL_CHAR	((char)0)
+#define OC_FILL_BYTE	((signed char)-127)
+#define OC_FILL_UBYTE   (255)
+#define OC_FILL_INT16	((short)-32767)
+#define OC_FILL_UINT16  (65535)
+#define OC_FILL_INT32	(-2147483647L)
+#define OC_FILL_UINT32    (4294967295U)
+#define OC_FILL_INT64   ((long long)-9223372036854775806LL)
+#define OC_FILL_UINT64  ((unsigned long long)18446744073709551614ULL)
+#define OC_FILL_FLOAT32	(9.9692099683868690e+36f) /* near 15 * 2^119 */
+#define OC_FILL_FLOAT64	(9.9692099683868690e+36)
+#define OC_FILL_STRING  ""
+#define OC_FILL_URL  ""
+
+
+#endif /*OCDATATYPES_H*/
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/src_netcdf4/ocdebug.c
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/src_netcdf4/ocdebug.c	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/src_netcdf4/ocdebug.c	(revision 1749)
@@ -0,0 +1,67 @@
+/* Copyright 2009, UCAR/Unidata and OPeNDAP, Inc.
+   See the COPYRIGHT file for more information. */
+
+#include "config.h"
+#include <stdarg.h>
+#include "ocinternal.h"
+#include "ocdebug.h"
+
+int ocdebug;
+
+#ifdef OCCATCHERROR
+/* Place breakpoint here to catch errors close to where they occur*/
+int
+ocbreakpoint(int err) {return err;}
+
+int
+octhrow(int err)
+{
+    if(err == 0) return err;
+    return ocbreakpoint(err);
+}
+#endif
+
+int
+xdrerror(void)
+{
+    oc_log(LOGERR,"xdr failure");
+    return OCTHROW(OC_EDATADDS);
+}
+
+
+void*
+occalloc(size_t size, size_t nelems)
+{
+    return ocmalloc(size*nelems);
+}
+
+void*
+ocmalloc(size_t size)
+{
+    void* memory = calloc(size,1); /* use calloc to zero memory*/
+    if(memory == NULL) oc_log(LOGERR,"ocmalloc: out of memory");
+    return memory;
+}
+
+void
+ocfree(void* mem)
+{
+    if(mem != NULL) free(mem);
+}
+
+int
+ocpanic(const char* fmt, ...)
+{
+    va_list args;
+    if(fmt != NULL) {
+      va_start(args, fmt);
+      vfprintf(stderr, fmt, args);
+      fprintf(stderr, "\n" );
+      va_end( args );
+    } else {
+      fprintf(stderr, "panic" );
+    }
+    fprintf(stderr, "\n" );
+    fflush(stderr);
+    return 0;
+}
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/src_netcdf4/ocdebug.h
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/src_netcdf4/ocdebug.h	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/src_netcdf4/ocdebug.h	(revision 1749)
@@ -0,0 +1,93 @@
+/* Copyright 2009, UCAR/Unidata and OPeNDAP, Inc.
+   See the COPYRIGHT file for more information. */
+
+#ifndef OCOCDBG_H
+#define OCOCDBG_H
+
+#include <stdarg.h>
+
+#if 0
+#define OCDEBUG
+#define DAPDEBUG 1
+#endif
+
+#ifdef OCDEBUG
+#define OCVERBOSE
+#endif
+
+/* OCCATCHERROR is used to detect errors as close
+   to their point of origin as possible. When
+   enabled, one can set a breakpoint in ocbreakpoint()
+   to catch the failure. Turing it on incurs a significant
+   performance penalty, so it is off by default.*/
+
+#define OCCATCHERROR
+
+#define OCPANIC(msg) assert(ocpanic(msg))
+#define OCPANIC1(msg,arg) assert(ocpanic(msg,arg))
+#define OCPANIC2(msg,arg1,arg2) assert(ocpanic(msg,arg1,arg2))
+
+/* Make it possible to catch assertion failures by breakpointing ocpanic*/
+#define OCASSERT(expr) if(!(expr)) {OCPANIC((#expr));} else {}
+
+/* Need some syntactic trickery to make these macros work*/
+#ifdef OCDEBUG
+#define OCDBG(l,msg) {oc_log(LOGDBG,msg);}
+#define OCDBG1(l,msg,arg) {oc_log(LOGDBG,msg,arg);}
+#define OCDBG2(l,msg,arg1,arg2) {oc_log(LOGDBG,msg,arg1,arg2);}
+#define OCDBGTEXT(l,text) {oc_logtext(LOGNOTE,text);} else {}
+#define OCDBGCODE(l,code) {code;}
+
+#else
+#define OCDBG(l,msg)
+#define OCDBG1(l,msg,arg)
+#define OCDBG2(l,msg,arg1,arg2)
+#define OCDBGTEXT(l,text)
+#define OCDBGCODE(l,code)
+#endif
+
+
+/*
+OCPROGRESS attempts to provide some info
+about how IO is getting along.
+*/
+#undef OCPROGRESS
+
+extern int ocdebug;
+extern int cedebug;
+
+/*extern char* dent2(int n);*/
+/*/extern char* dent(int n);*/
+extern int ocpanic(const char* fmt, ...);
+
+extern int xdrerror(void);
+
+/*
+Provide wrapped versions of calloc and malloc.
+The wrapped version panics if memory
+is exhausted.  It also guarantees that the
+memory has been zero'd.
+*/
+
+extern void* occalloc(size_t size, size_t nelems);
+extern void* ocmalloc(size_t size);
+extern void  ocfree(void*);
+
+#define MEMCHECK(var,throw) {if((var)==NULL) return (throw);}
+
+#ifdef OCCATCHERROR
+/* Place breakpoint on ocbreakpoint to catch errors close to where they occur*/
+#define OCTHROW(e) octhrow(e)
+#define OCTHROWCHK(e) (void)octhrow(e)
+#define OCGOTO(label) {ocbreakpoint(-1); goto label;}
+extern int ocbreakpoint(int err);
+extern int octhrow(int err);
+#else
+#define OCTHROW(e) (e)
+#define OCTHROWCHK(e)
+#define OCGOTO(label) goto label
+#endif
+
+
+#endif /*OCOCDBG_H*/
+
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/src_netcdf4/ocdrno.c
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/src_netcdf4/ocdrno.c	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/src_netcdf4/ocdrno.c	(revision 1749)
@@ -0,0 +1,62 @@
+/* Copyright 2009, UCAR/Unidata and OPeNDAP, Inc.
+   See the COPYRIGHT file for more information. */
+
+#include "config.h"
+#include "oc.h"
+#include "ocinternal.h"
+#include "ocdebug.h"
+
+/*
+This file exports procedures
+that access the internals of
+oc. They are intended to be called
+by the drno code to avoid at least
+the appearance of breaking the oc
+encapsulation.
+*/
+
+#if 0
+
+OCerror
+oc_svcerrordata(OCconnection conn, char** codep, char** msgp, long* httpp)
+{
+    OCstate* state = (OCstate*)conn;
+    if(codep) *codep = state->error.code;
+    if(msgp) *msgp = state->error.message;
+    if(httpp) *httpp = state->error.httpcode;
+    return OC_NOERR;    
+}
+
+/* DRNO need to explicitly get and walk string values*/
+int
+oc_stringcontent(OCstate* state, OCcontent* content, char** stringp, size_t* slenp)
+{
+    int stat = OC_NOERR;
+    XDR* xdrs;
+    unsigned int slen;
+    char* stringmemory;
+
+    if(state == NULL || content == NULL) return OCTHROW(OC_EINVAL);
+
+    if(content->node->octype != OC_Primitive) return OCTHROW(OC_EINVAL);
+    if(content->node->etype != OC_String
+       && content->node->etype != OC_URL) return OCTHROW(OC_EINVAL);
+
+    xdrs = state->dap.xdrs;
+    if(xdrs == NULL) return OCTHROW(OC_EXDR);
+
+    if(oc_contentmode(state,content) != Datamode) return OCTHROW(OC_EINVAL);
+    /* We are at a single instance of a string data type*/
+    if(!xdr_setpos(xdrs,content->xdroffset)) return xdrerror();
+    if(!xdr_u_int(xdrs,&slen)) return xdrerror();
+    stringmemory = (char*)ocmalloc(slen+1);
+    MEMCHECK(stringmemory,OC_ENOMEM);
+    if(!xdr_opaque(xdrs,stringmemory,slen)) return xdrerror();
+    stringmemory[slen] = '\0';
+    /* restore location*/
+    if(!xdr_setpos(xdrs,content->xdroffset)) return xdrerror();
+    if(stringp != NULL) *stringp = stringmemory;
+    if(slenp != NULL) *slenp = slen;
+    return OCTHROW(stat);
+}
+#endif
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/src_netcdf4/ocdrno.h
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/src_netcdf4/ocdrno.h	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/src_netcdf4/ocdrno.h	(revision 1749)
@@ -0,0 +1,18 @@
+/* Copyright 2009, UCAR/Unidata and OPeNDAP, Inc.
+   See the COPYRIGHT file for more information. */
+
+#ifndef OCDRNO_H
+#define OCDRNO_H
+/*
+This file exports procedures
+that access the internals of
+oc. They are intended to be called
+by the drno code to avoid at least
+the appearance of breaking the oc
+encapsulation. 
+*/
+
+/* DO NOT FREE THE RETURNED STRINGS */
+extern OCerror ocdaperrorcode(OCconnection,char**,char**,long*);
+
+#endif /*OCDRNO_H*/
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/src_netcdf4/ocdump.c
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/src_netcdf4/ocdump.c	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/src_netcdf4/ocdump.c	(revision 1749)
@@ -0,0 +1,482 @@
+/* Copyright 2009, UCAR/Unidata and OPeNDAP, Inc.
+   See the COPYRIGHT file for more information.
+*/
+
+#include "config.h"
+#include <sys/stat.h>
+
+#ifdef NETINET_IN_H
+#include <netinet/in.h>
+#endif
+
+#include "ocinternal.h"
+#include "ocdata.h"
+#include "ocdebug.h"
+
+#define MAXLEVEL 1
+
+/*Forward*/
+static void dumpocnode1(OCnode* node, int depth);
+static void dumpdimensions(OCnode* node);
+static void dumpattvalue(OCtype nctype, char** aset, int index);
+
+static char* sindent = NULL;
+
+static char*
+dent(int n)
+{
+    if(sindent == NULL) {
+	sindent = (char*)ocmalloc(102);
+	MEMCHECK(sindent,NULL);
+	memset((void*)sindent,(int)' ',(size_t)101);
+	sindent[101] = '\0';
+    }
+    if(n > 100) n = 100;
+    return sindent+(100-n);
+}
+
+/* support [dd] leader*/
+static char*
+dent2(int n) {return dent(n+4);}
+
+void
+ocdumpnode(OCnode* node)
+{
+    if(node != NULL) {
+        dumpocnode1(node,0);
+    } else {
+	fprintf(stdout,"<NULL>\n");
+    }
+    fflush(stdout);
+}
+
+static void
+dumpskip(OCnode* node)
+{
+    char tmpc[64];
+    char tmpi[64];
+    char tmpt[64];
+    char tmpo[64];
+    if(node->skip.count == OCINDETERMINATE)
+	strcpy(tmpc,"?");
+    else
+        snprintf(tmpc,sizeof(tmpc),"%lu",(unsigned long)node->skip.count);
+    if(node->skip.instancesize == OCINDETERMINATE)
+	strcpy(tmpi,"?");
+    else
+        snprintf(tmpi,sizeof(tmpi),"%lu",(unsigned long)node->skip.instancesize);
+    if(node->skip.totalsize == OCINDETERMINATE)
+	strcpy(tmpt,"?");
+    else
+        snprintf(tmpt,sizeof(tmpt),"%lu",(unsigned long)node->skip.totalsize);
+    if(node->skip.offset == OCINDETERMINATE)
+	strcpy(tmpo,"?");
+    else
+        snprintf(tmpo,sizeof(tmpo),"%lu",(unsigned long)node->skip.offset);
+
+    fprintf(stdout," [(%s*%s)/%s@%s]",tmpi,tmpc,tmpt,tmpo);
+}
+
+static void
+dumpocnode1(OCnode* node, int depth)
+{
+    unsigned int n;
+    switch (node->octype) {
+    case OC_Primitive: {
+        fprintf(stdout,"[%2d]%s ",depth,dent(depth));
+	if(node->name == NULL) OCPANIC("prim without name");
+	fprintf(stdout,"%s %s",octypetostring(node->etype),node->name);
+	dumpdimensions(node);
+#ifdef OCIGNORE
+	if(node->cache.cacheable) fprintf(stdout," [cached]");
+#endif
+	dumpskip(node);
+	fprintf(stdout," &%lx",(unsigned long)node);
+	fprintf(stdout,"\n");
+    } break;
+
+    case OC_Dataset: {
+        fprintf(stdout,"[%2d]%s ",depth,dent(depth));
+	fprintf(stdout,"dataset %s\n",
+		(node->name?node->name:""));
+	for(n=0;n<oclistlength(node->subnodes);n++) {
+	    dumpocnode1((OCnode*)oclistget(node->subnodes,n),depth+1);
+	}
+    } break;
+
+    case OC_Structure: {
+        fprintf(stdout,"[%2d]%s ",depth,dent(depth));
+	fprintf(stdout,"struct %s",
+		(node->name?node->name:""));
+	dumpdimensions(node);
+	dumpskip(node);
+	fprintf(stdout," &%lx",(unsigned long)node);
+	fprintf(stdout,"\n");
+	for(n=0;n<oclistlength(node->subnodes);n++) {
+	    dumpocnode1((OCnode*)oclistget(node->subnodes,n),depth+1);
+	}
+    } break;
+
+    case OC_Sequence: {
+        fprintf(stdout,"[%2d]%s ",depth,dent(depth));
+	fprintf(stdout,"sequence %s",
+		(node->name?node->name:""));
+	dumpdimensions(node);
+	dumpskip(node);
+	fprintf(stdout," &%lx",(unsigned long)node);
+	fprintf(stdout,"\n");
+	for(n=0;n<oclistlength(node->subnodes);n++) {
+	    dumpocnode1((OCnode*)oclistget(node->subnodes,n),depth+1);
+	}
+    } break;
+
+    case OC_Grid: {
+	unsigned int i;
+        fprintf(stdout,"[%2d]%s ",depth,dent(depth));
+	fprintf(stdout,"grid %s",
+		(node->name?node->name:""));
+	dumpdimensions(node);
+	dumpskip(node);
+	fprintf(stdout," &%lx",(unsigned long)node);
+	fprintf(stdout,"\n");
+	fprintf(stdout,"%sarray:\n",dent2(depth+1));
+	dumpocnode1((OCnode*)oclistget(node->subnodes,0),depth+2);
+	fprintf(stdout,"%smaps:\n",dent2(depth+1));
+	for(i=1;i<oclistlength(node->subnodes);i++) {
+	    dumpocnode1((OCnode*)oclistget(node->subnodes,i),depth+2);
+	}
+    } break;
+
+    case OC_Attribute: {
+        fprintf(stdout,"[%2d]%s ",depth,dent(depth));
+	if(node->name == NULL) OCPANIC("Attribute without name");
+	fprintf(stdout,"%s %s",octypetostring(node->etype),node->name);
+	for(n=0;n<oclistlength(node->att.values);n++) {
+	    char* value = (char*)oclistget(node->att.values,n);
+	    if(n > 0) fprintf(stdout,",");
+	    fprintf(stdout," %s",value);
+	}
+	fprintf(stdout," &%lx",(unsigned long)node);
+	fprintf(stdout,"\n");
+    } break;
+
+    case OC_Attributeset: {
+        fprintf(stdout,"[%2d]%s ",depth,dent(depth));
+	fprintf(stdout,"%s:\n",node->name?node->name:"Attributes");
+	for(n=0;n<oclistlength(node->subnodes);n++) {
+	    dumpocnode1((OCnode*)oclistget(node->subnodes,n),depth+1);
+	}
+    } break;
+
+    default:
+	OCPANIC1("encountered unexpected node type: %x",node->octype);
+    }
+
+    if(node->attributes != NULL) {
+	unsigned int i;
+	for(i=0;i<oclistlength(node->attributes);i++) {
+	    OCattribute* att = (OCattribute*)oclistget(node->attributes,i);
+	    fprintf(stdout,"%s[%s=",dent2(depth+2),att->name);
+	    if(att->nvalues == 0)
+		OCPANIC("Attribute.nvalues == 0");
+	    if(att->nvalues == 1) {
+		dumpattvalue(att->etype,att->values,0);
+	    } else {
+		unsigned int j;
+	        fprintf(stdout,"{");
+		for(j=0;j<att->nvalues;j++) {
+		    if(j>0) fprintf(stdout,", ");
+		    dumpattvalue(att->etype,att->values,j);
+		}
+	        fprintf(stdout,"}");
+	    }
+	    fprintf(stdout,"]\n");
+	}
+    }
+}
+
+static void
+dumpdimensions(OCnode* node)
+{
+    unsigned int i;
+    for(i=0;i<node->array.rank;i++) {
+        OCnode* dim = (OCnode*)oclistget(node->array.dimensions,i);
+        fprintf(stdout,"[%s=%lu]",
+			(dim->name?dim->name:"?"),
+			(unsigned long)dim->dim.declsize);
+    }
+}
+
+static void
+dumpattvalue(OCtype nctype, char** strings, int index)
+{
+    if(nctype == OC_String || nctype == OC_URL) {
+        fprintf(stdout,"\"%s\"",strings[index]);
+    } else {
+        fprintf(stdout,"%s",strings[index]);
+    }
+}
+
+void
+ocdumpslice(OCslice* slice)
+{
+    fprintf(stdout,"[");
+    fprintf(stdout,"%lu",(unsigned long)slice->first);
+    if(slice->stride > 1) fprintf(stdout,":%lu",(unsigned long)slice->stride);
+    fprintf(stdout,":%lu",(unsigned long)(slice->first+slice->count)-1);
+    fprintf(stdout,"]");
+}
+
+void
+ocdumpclause(OCprojectionclause* ref)
+{
+    unsigned int i;
+    OClist* path = oclistnew();
+    occollectpathtonode(ref->node,path);
+    for(i=0;i<oclistlength(path);i++) {
+        OClist* sliceset;
+	OCnode* node = (OCnode*)oclistget(path,i);
+	if(node->tree != NULL) continue; /* leave off the root node*/
+	fprintf(stdout,"%s%s",(i>0?PATHSEPARATOR:""),node->name);
+	sliceset = (OClist*)oclistget(ref->indexsets,i);
+	if(sliceset != NULL) {
+	    unsigned int j;
+	    for(j=0;j<oclistlength(sliceset);j++) {
+	        OCslice* slice = (OCslice*)oclistget(sliceset,j);
+	        ocdumpslice(slice);
+	    }
+	}
+    }
+}
+
+
+static void
+addfield(char* field, char* line, int align)
+{
+    int len,rem;
+    strcat(line,"|");
+    strcat(line,field);
+    len = strlen(field);
+    rem = (align - len);
+    while(rem-- > 0) strcat(line," ");
+}
+
+static void
+dumpfield(int index, char* n8, int isxdr)
+{
+    char line[1024];
+    char tmp[32];
+
+    union {
+	unsigned int uv;
+	int sv;
+	char cv[4];
+	float fv;
+    } form;
+    union {
+	char cv[8];
+        unsigned long long ll;
+        double d;
+    } dform;
+
+    line[0] = '\0';
+
+    /* offset */
+    sprintf(tmp,"%6d",index);
+    addfield(tmp,line,5);
+
+    memcpy(form.cv,n8,4);
+
+    /* straight hex*/
+    sprintf(tmp,"%08x",form.uv);
+    addfield(tmp,line,8);
+
+    if(isxdr) {swapinline32(&form.uv);}
+
+    /* unsigned integer */
+    sprintf(tmp,"%12u",form.uv);
+    addfield(tmp,line,12);
+
+    /* signed integer */
+    sprintf(tmp,"%12d",form.sv);
+    addfield(tmp,line,12);
+
+    /* float */
+    sprintf(tmp,"%#g",form.fv);
+    addfield(tmp,line,12);
+
+    /* char[4] */
+    {
+        /* use raw form (i.e. n8)*/
+        int i;
+	tmp[0] = '\0';
+        for(i=0;i<4;i++) {
+	    char stmp[64];
+	    unsigned int c = (n8[i] & 0xff);
+	    if(c < ' ' || c > 126)
+                sprintf(stmp,"\\%02x",c);
+	    else
+                sprintf(stmp,"%c",c);
+	    strcat(tmp,stmp);
+        }
+    }
+
+    addfield(tmp,line,16);
+
+    /* double */
+    memcpy(dform.cv,n8,2*XDRUNIT);
+    if(isxdr) xxdrntohdouble(dform.cv,&dform.d);
+    sprintf(tmp,"%#g",dform.d);
+    addfield(tmp,line,12);
+
+    fprintf(stdout,"%s\n",line);
+}
+
+static void
+typedmemorydump(char* memory, size_t len, int fromxdr)
+{
+    unsigned int i,count,rem;
+    char line[1024];
+    char* pmem;
+    char mem[8];
+
+    assert(memory[len] == 0);
+
+    /* build the header*/
+    line[0] = '\0';
+    addfield("offset",line,6);
+    addfield("hex",line,8);
+    addfield("uint",line,12);
+    addfield("int",line,12);
+    addfield("float",line,12);
+    addfield("char[4]",line,16);
+    addfield("double",line,12);
+    strcat(line,"\n");
+    fprintf(stdout,"%s",line);
+
+    count = (len / sizeof(int));
+    rem = (len % sizeof(int));
+
+    for(pmem=memory,i=0;i<count;i++,pmem+=4) {
+	memset(mem,0,8);
+	if(i<(count-1))
+	    memcpy(mem,pmem,8);
+	else
+	    memcpy(mem,pmem,4);
+	dumpfield(i*sizeof(unsigned int),mem,fromxdr);
+    }
+    if(rem > 0) {
+	memset(mem,0,8);
+	memcpy(mem,pmem,4);
+	dumpfield(i*sizeof(unsigned int),mem,fromxdr);
+    }
+    fflush(stdout);
+}
+
+static void
+simplememorydump(char* memory, size_t len, int fromxdr)
+{
+    unsigned int i,count,rem;
+    int* imemory;
+    char tmp[32];
+    char line[1024];
+
+    assert(memory[len] == 0);
+
+    /* build the header*/
+    line[0] = '\0';
+    addfield("offset",line,6);
+    addfield("XDR (hex)",line,9);
+    addfield("!XDR (hex)",line,10);
+    fprintf(stdout,"%s\n",line);
+
+    count = (len / sizeof(int));
+    rem = (len % sizeof(int));
+    if(rem != 0)
+	fprintf(stderr,"ocdump: |mem|%%4 != 0\n");
+    imemory = (int*)memory;
+
+    for(i=0;i<count;i++) {
+	unsigned int vx = (unsigned int)imemory[i];
+	unsigned int v = vx;
+	if(!xxdr_network_order) swapinline32(&v);
+        line[0] = '\0';
+        sprintf(tmp,"%6d",i);
+        addfield(tmp,line,6);
+        sprintf(tmp,"%08x",vx);
+        addfield(tmp,line,9);
+        sprintf(tmp,"%08x",v);
+        addfield(tmp,line,10);
+        fprintf(stdout,"%s\n",line);
+    }
+    fflush(stdout);
+}
+
+void
+ocdumpmemory(char* memory, size_t len, int xdrencoded, int level)
+{
+    if(level > MAXLEVEL) level = MAXLEVEL;
+    switch (level) {
+    case 1: /* Do a multi-type dump */
+        typedmemorydump(memory,len,xdrencoded);
+	break;
+    case 0: /* Dump a simple linear list of the contents of the memory as 32-bit hex and decimal */
+    default:
+        simplememorydump(memory,len,xdrencoded);
+	break;
+    }
+}
+
+static int
+ocreadfile(FILE* file, int datastart, char** memp, size_t* lenp)
+{
+    char* mem;
+    size_t len;
+    size_t pos;
+    size_t red;
+    struct stat stats;
+
+    pos = ftell(file);
+    fseek(file,0,SEEK_SET);
+    fseek(file,datastart,SEEK_SET);
+
+    fstat(fileno(file),&stats);
+    len = stats.st_size;
+    len -= datastart;
+    
+    mem = (char*)calloc(len+1,1);
+    if(mem == NULL) return 0;
+
+    /* Read only the data part */
+    red = fread(mem,1,len,file);
+    if(red < len) {
+	fprintf(stderr,"ocreadfile: short file\n");
+	return 0;
+    }	
+    fseek(file,pos,SEEK_SET); /* leave it as we found it*/
+    if(memp) *memp = mem;
+    if(lenp) *lenp = len;
+    return 1;
+}
+
+void
+ocdd(OCstate* state, OCnode* root, int xdrencoded, int level)
+{
+    char* mem;
+    size_t len;
+    if(root->tree->data.file != NULL) {
+        if(!ocreadfile(root->tree->data.file,root->tree->data.bod,&mem,&len)) {
+    	    fprintf(stderr,"ocdd could not read data file\n");
+	    return;
+	}
+        ocdumpmemory(mem,len,xdrencoded,level);
+        free(mem);
+    } else {
+        mem = root->tree->data.memory;
+        mem += root->tree->data.bod;
+        len = root->tree->data.datasize;
+        len -= root->tree->data.bod;
+        ocdumpmemory(mem,len,xdrencoded,level);
+    }
+}
+
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/src_netcdf4/ocdump.h
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/src_netcdf4/ocdump.h	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/src_netcdf4/ocdump.h	(revision 1749)
@@ -0,0 +1,16 @@
+/* Copyright 2009, UCAR/Unidata and OPeNDAP, Inc.
+   See the COPYRIGHT file for more information. */
+
+#ifndef OCDUMP_H
+#define OCDUMP_H
+
+extern void ocdumpnode(OCnode* node);
+
+extern void ocdumpslice(OCslice* slice);
+extern void ocdumpclause(OCprojectionclause* ref);
+
+extern void ocdumpmemory(char* memory, size_t len, int xdrencoded, int level);
+
+extern void ocdd(OCstate*,OCnode*,int xdrencoded, int level);
+
+#endif /*OCDUMP_H*/
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/src_netcdf4/ochttp.c
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/src_netcdf4/ochttp.c	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/src_netcdf4/ochttp.c	(revision 1749)
@@ -0,0 +1,338 @@
+/* Copyright 2009, UCAR/Unidata and OPeNDAP, Inc.
+ See the COPYRIGHT file for more information. */
+
+#include "config.h"
+#include <sys/stat.h>
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+#include <fcntl.h>
+#include "ocinternal.h"
+#include "ocdebug.h"
+#include "ochttp.h"
+#include "ocrc.h"
+
+static size_t WriteFileCallback(void*, size_t, size_t, void*);
+static size_t WriteMemoryCallback(void*, size_t, size_t, void*);
+
+struct Fetchdata {
+	FILE* stream;
+	size_t size;
+};
+
+long
+ocfetchhttpcode(CURL* curl)
+{
+    long httpcode;
+    CURLcode cstat = CURLE_OK;
+    /* Extract the http code */
+    cstat = curl_easy_getinfo(curl,CURLINFO_RESPONSE_CODE,&httpcode);
+    if(cstat != CURLE_OK) httpcode = 0;
+    return httpcode;
+}
+
+int
+ocfetchurl_file(CURL* curl, const char* url, FILE* stream,
+		unsigned long* sizep, long* filetime)
+{
+	int stat = OC_NOERR;
+	CURLcode cstat = CURLE_OK;
+	struct Fetchdata fetchdata;
+
+	/* Set the URL */
+	cstat = curl_easy_setopt(curl, CURLOPT_URL, (void*)url);
+	if (cstat != CURLE_OK)
+		goto fail;
+
+	/* send all data to this function  */
+	cstat = curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, WriteFileCallback);
+	if (cstat != CURLE_OK)
+		goto fail;
+
+	/* we pass our file to the callback function */
+	cstat = curl_easy_setopt(curl, CURLOPT_WRITEDATA, (void *)&fetchdata);
+	if (cstat != CURLE_OK)
+		goto fail;
+
+        /* One last thing; always try to get the last modified time */
+        cstat = curl_easy_setopt(curl, CURLOPT_FILETIME, (long)1);
+	if (cstat != CURLE_OK)
+		goto fail;
+
+	fetchdata.stream = stream;
+	fetchdata.size = 0;
+	cstat = curl_easy_perform(curl);
+	if (cstat != CURLE_OK)
+	    goto fail;
+
+	if (stat == OC_NOERR) {
+	    /* return the file size*/
+#ifdef OCDEBUG
+	    oc_log(LOGNOTE,"filesize: %lu bytes",fetchdata.size);
+#endif
+	    if (sizep != NULL)
+		*sizep = fetchdata.size;
+	    /* Get the last modified time */
+	    if(filetime != NULL)
+                cstat = curl_easy_getinfo(curl,CURLINFO_FILETIME,filetime);
+            if(cstat != CURLE_OK) goto fail;
+	}
+	return OCTHROW(stat);
+
+fail:
+	oc_log(LOGERR, "curl error: %s", curl_easy_strerror(cstat));
+	return OCTHROW(OC_ECURL);
+}
+
+int
+ocfetchurl(CURL* curl, const char* url, OCbytes* buf, long* filetime)
+{
+	int stat = OC_NOERR;
+	CURLcode cstat = CURLE_OK;
+	size_t len;
+
+	/* Set the URL */
+	cstat = curl_easy_setopt(curl, CURLOPT_URL, (void*)url);
+	if (cstat != CURLE_OK)
+		goto fail;
+
+	/* send all data to this function  */
+	cstat = curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, WriteMemoryCallback);
+	if (cstat != CURLE_OK)
+		goto fail;
+
+	/* we pass our file to the callback function */
+	cstat = curl_easy_setopt(curl, CURLOPT_WRITEDATA, (void*)buf);
+	if (cstat != CURLE_OK)
+		goto fail;
+
+        /* One last thing; always try to get the last modified time */
+	cstat = curl_easy_setopt(curl, CURLOPT_FILETIME, (long)1);
+
+	cstat = curl_easy_perform(curl);
+	if(cstat == CURLE_PARTIAL_FILE) {
+	    /* Log it but otherwise ignore */
+	    oc_log(LOGWARN, "curl error: %s; ignored",
+		   curl_easy_strerror(cstat));
+	    cstat = CURLE_OK;
+	}
+	if(cstat != CURLE_OK) goto fail;
+
+        /* Get the last modified time */
+	if(filetime != NULL)
+            cstat = curl_easy_getinfo(curl,CURLINFO_FILETIME,filetime);
+        if(cstat != CURLE_OK) goto fail;
+
+	/* Null terminate the buffer*/
+	len = ocbyteslength(buf);
+	ocbytesappend(buf, '\0');
+	ocbytessetlength(buf, len); /* dont count null in buffer size*/
+#ifdef OCDEBUG
+	oc_log(LOGNOTE,"buffersize: %lu bytes",(unsigned long)ocbyteslength(buf));
+#endif
+
+	return OCTHROW(stat);
+
+fail:
+	oc_log(LOGERR, "curl error: %s", curl_easy_strerror(cstat));
+	return OCTHROW(OC_ECURL);
+}
+
+static size_t
+WriteFileCallback(void* ptr, size_t size, size_t nmemb,	void* data)
+{
+	size_t realsize = size * nmemb;
+	size_t count;
+	struct Fetchdata* fetchdata;
+	fetchdata = (struct Fetchdata*) data;
+        if(realsize == 0)
+	    oc_log(LOGWARN,"WriteFileCallback: zero sized chunk");
+	count = fwrite(ptr, size, nmemb, fetchdata->stream);
+	if (count > 0) {
+		fetchdata->size += (count * size);
+	} else {
+	    oc_log(LOGWARN,"WriteFileCallback: zero sized write");
+	}
+#ifdef OCPROGRESS
+        oc_log(LOGNOTE,"callback: %lu bytes",(unsigned long)realsize);
+#endif
+	return count;
+}
+
+static size_t
+WriteMemoryCallback(void *ptr, size_t size, size_t nmemb, void *data)
+{
+	size_t realsize = size * nmemb;
+	OCbytes* buf = (OCbytes*) data;
+        if(realsize == 0)
+	    oc_log(LOGWARN,"WriteMemoryCallback: zero sized chunk");
+	/* Optimize for reading potentially large dods datasets */
+	if(!ocbytesavail(buf,realsize)) {
+	    /* double the size of the packet */
+	    ocbytessetalloc(buf,2*ocbytesalloc(buf));
+	}
+	ocbytesappendn(buf, ptr, realsize);
+#ifdef OCPROGRESS
+        oc_log(LOGNOTE,"callback: %lu bytes",(unsigned long)realsize);
+#endif
+	return realsize;
+}
+
+#if 0
+static void
+assembleurl(DAPURL* durl, OCbytes* buf, int what)
+{
+	encodeurltext(durl->url,buf);
+	if(what & WITHPROJ) {
+		ocbytescat(buf,"?");
+		encodeurltext(durl->projection,buf);
+	}
+	if(what & WITHSEL) encodeurltext(durl->selection,buf);
+
+}
+
+static char mustencode="";
+static char hexchars[16] = {
+	'0', '1', '2', '3',
+	'4', '5', '6', '7',
+	'8', '9', 'a', 'b',
+	'c', 'd', 'e', 'f',
+};
+
+static void
+encodeurltext(char* text, OCbytes* buf)
+{
+	/* Encode the URL to handle illegal characters */
+	len = strlen(url);
+	encoded = ocmalloc(len*4+1); /* should never be larger than this*/
+	if(encoded==NULL) return;
+	p = url; q = encoded;
+	while((c=*p++)) {
+		if(strchr(mustencode,c) != NULL) {
+			char tmp[8];
+			int hex1, hex2;
+			hex1 = (c & 0x0F);
+			hex2 = (c & 0xF0) >> 4;
+			tmp[0] = '0'; tmp[1] = 'x';
+			tmp[2] = hexchars[hex2]; tmp[3] = hexchars[hex1];
+			tmp[4] = '\0';
+			ocbytescat(buf,tmp);
+		} else *q++ = (char)c;
+	}
+
+}
+
+#endif
+
+int
+occurlopen(CURL** curlp)
+{
+	int stat = OC_NOERR;
+	CURLcode cstat = CURLE_OK;
+	CURL* curl;
+	/* initialize curl*/
+	curl = curl_easy_init();
+	if (curl == NULL)
+		stat = OC_ECURL;
+	else {
+		cstat = curl_easy_setopt(curl, CURLOPT_NOPROGRESS, 1);
+		if (cstat != CURLE_OK)
+			stat = OC_ECURL;
+		/* some servers don't like requests that are made without a user-agent */
+		cstat = curl_easy_setopt(curl, CURLOPT_USERAGENT, "libcurl-agent/1.0");
+		if (cstat != CURLE_OK)
+			stat = OC_ECURL;
+	}
+	if (curlp)
+		*curlp = curl;
+	return OCTHROW(stat);
+}
+
+void
+occurlclose(CURL* curl)
+{
+	if (curl != NULL)
+		curl_easy_cleanup(curl);
+}
+
+int
+ocfetchlastmodified(CURL* curl, char* url, long* filetime)
+{
+    int stat = OC_NOERR;
+    CURLcode cstat = CURLE_OK;
+
+    /* Set the URL */
+    cstat = curl_easy_setopt(curl, CURLOPT_URL, (void*)url);
+    if (cstat != CURLE_OK)
+        goto fail;
+
+    /* Ask for head */
+    cstat = curl_easy_setopt(curl, CURLOPT_TIMEOUT, 30); /* 30sec timeout*/
+    cstat = curl_easy_setopt(curl, CURLOPT_CONNECTTIMEOUT, 2);
+    cstat = curl_easy_setopt(curl, CURLOPT_HEADER, 1);
+    cstat = curl_easy_setopt(curl, CURLOPT_NOBODY, 1);
+    cstat = curl_easy_setopt(curl, CURLOPT_NOPROGRESS, 1);
+    cstat = curl_easy_setopt(curl, CURLOPT_FILETIME, (long)1);
+
+    cstat = curl_easy_perform(curl);
+    if(cstat != CURLE_OK) goto fail;
+    if(filetime != NULL)
+        cstat = curl_easy_getinfo(curl,CURLINFO_FILETIME,filetime);
+    if(cstat != CURLE_OK) goto fail;
+
+    return OCTHROW(stat);
+
+fail:
+    oc_log(LOGERR, "curl error: %s", curl_easy_strerror(cstat));
+    return OCTHROW(OC_ECURL);
+}
+
+int
+ocping(const char* url)
+{
+    int stat = OC_NOERR;
+    CURLcode cstat = CURLE_OK;
+    CURL* curl = NULL;
+    OCbytes* buf = NULL;
+
+    /* Create a CURL instance */
+    stat = occurlopen(&curl);
+    if(stat != OC_NOERR) return stat;    
+
+    /* use a very short timeout: 10 seconds */
+    cstat = curl_easy_setopt(curl, CURLOPT_TIMEOUT, (long)10);
+    if (cstat != CURLE_OK)
+        goto done;
+
+    /* fail on HTTP 400 code errors */
+    cstat = curl_easy_setopt(curl, CURLOPT_FAILONERROR, (long)1);
+    if (cstat != CURLE_OK)
+        goto done;
+
+    /* Try to get the file */
+    buf = ocbytesnew();
+    stat = ocfetchurl(curl,url,buf,NULL);
+    if(stat == OC_NOERR) {
+	/* Don't trust curl to return an error when request gets 404 */
+	long http_code = 0;
+	cstat = curl_easy_getinfo(curl,CURLINFO_RESPONSE_CODE, &http_code);
+        if (cstat != CURLE_OK)
+            goto done;
+	if(http_code >= 400) {
+	    cstat = CURLE_HTTP_RETURNED_ERROR;
+	    goto done;
+	}
+    } else
+        goto done;
+
+done:
+    ocbytesfree(buf);
+    occurlclose(curl);
+    if(cstat != CURLE_OK) {
+        oc_log(LOGERR, "curl error: %s", curl_easy_strerror(cstat));
+        stat = OC_EDAPSVC;
+    }
+    return OCTHROW(stat);
+}
+
+
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/src_netcdf4/ochttp.h
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/src_netcdf4/ochttp.h	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/src_netcdf4/ochttp.h	(revision 1749)
@@ -0,0 +1,22 @@
+/* Copyright 2009, UCAR/Unidata and OPeNDAP, Inc.
+   See the COPYRIGHT file for more information. */
+
+#ifndef HTTP_H
+#define HTTP_H 1
+
+extern int curlopen(CURL** curlp);
+extern void curlclose(CURL*);
+
+extern int ocfetchurl(CURL*, const char*, OCbytes*, long*);
+extern int ocfetchurl_file(CURL*, const char*, FILE*, unsigned long*, long*);
+
+extern long ocfetchhttpcode(CURL* curl);
+
+extern int ocfetchlastmodified(CURL* curl, char* url, long* filetime);
+
+extern int occurlopen(CURL** curlp);
+extern void occurlclose(CURL* curlp);
+
+extern int ocping(const char* url);
+
+#endif /*HTTP_H*/
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/src_netcdf4/ocinternal.c
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/src_netcdf4/ocinternal.c	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/src_netcdf4/ocinternal.c	(revision 1749)
@@ -0,0 +1,574 @@
+/* Copyright 2009, UCAR/Unidata and OPeNDAP, Inc.
+   See the COPYRIGHT file for more information. */
+
+#include "config.h"
+#include <stdio.h>
+#include <fcntl.h>
+#include <errno.h>
+
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+
+#include "ocinternal.h"
+#include "ocdebug.h"
+#include "ocdata.h"
+#include "occontent.h"
+#include "occlientparams.h"
+#include "ocrc.h"
+#include "occurlfunctions.h"
+
+#include "ochttp.h"
+#include "ocread.h"
+
+/* Note: TMPPATH must end in '/' */
+#ifdef __CYGWIN__
+#define TMPPATH1 "/cygdrive/c/temp/"
+#define TMPPATH2 "./"
+#elifdef WIN32
+#define TMPPATH1 "c:\\temp/"
+#define TMPPATH2 ".\\"
+#else
+#define TMPPATH1 "/tmp/"
+#define TMPPATH2 "./"
+#endif
+
+/* Define default rc files and aliases*/
+static char* rcfilenames[3] = {".dodsrc",".ocrc",NULL};
+
+static int ocextractddsinmemory(OCstate*,OCtree*,int);
+static int ocextractddsinfile(OCstate*,OCtree*,int);
+static char* constraintescape(const char* url);
+static OCerror createtempfile(OCstate*,OCtree*);
+static int createtempfile1(char*,char**);
+
+static void ocsetcurlproperties(OCstate*);
+
+extern OCnode* makeunlimiteddimension(void);
+
+#ifdef WIN32
+#include <fcntl.h>
+#define _S_IREAD 256
+#define _S_IWRITE 128
+#else
+#include <sys/stat.h>
+#endif
+
+/* Global flags*/
+int oc_curl_file_supported;
+int oc_curl_https_supported;
+
+int
+ocinternalinitialize(void)
+{
+    int stat = OC_NOERR;
+
+    /* Compute some xdr related flags */
+    xxdr_init();
+
+    oc_loginit();
+
+    /* Determine if this version of curl supports
+       "file://..." &/or "https://..." urls.
+    */
+    {
+        const char* const* proto; /*weird*/
+        curl_version_info_data* curldata;
+        curldata = curl_version_info(CURLVERSION_NOW);
+        oc_curl_file_supported = 0;
+        oc_curl_https_supported = 0;
+        for(proto=curldata->protocols;*proto;proto++) {
+            if(strcmp("file",*proto)==0) {oc_curl_file_supported=1;break;}
+            if(strcmp("https",*proto)==0) {oc_curl_https_supported=1;break;}
+        }
+        if(ocdebug > 0) {
+            oc_log(LOGNOTE,"Curl file:// support = %d",oc_curl_file_supported);
+            oc_log(LOGNOTE,"Curl https:// support = %d",oc_curl_file_supported);
+        }
+    }
+
+    /* compile the .dodsrc, if any */
+    {
+        char* path = NULL;
+        char* homepath = NULL;
+	char** alias;
+	FILE* f = NULL;
+        /* locate the configuration files: . first in '.',  then $HOME */
+	for(alias=rcfilenames;*alias;alias++) {
+            path = (char*)malloc(strlen("./")+strlen(*alias)+1);
+	    if(path == NULL) return OC_ENOMEM;
+            strcpy(path,"./");
+            strcat(path,*alias);
+  	    /* see if file is readable */
+	    f = fopen(path,"r");
+	    if(f != NULL) break;
+    	    if(path != NULL) {free(path); path = NULL;} /* cleanup */
+	}
+	if(f == NULL) { /* try $HOME */
+	    OCASSERT(path == NULL);
+            homepath = getenv("HOME");
+            if (homepath!= NULL) {
+	        for(alias=rcfilenames;*alias;alias++) {
+	            path = (char*)malloc(strlen(homepath)+1+strlen(*alias)+1);
+	            if(path == NULL) return OC_ENOMEM;
+	            strcpy(path,homepath);
+	            strcat(path,"/");
+	            strcat(path,*alias);
+		    f = fopen(path,"r");
+		    if(f != NULL) break;
+ 	            if(path != NULL) {free(path); path=NULL;}
+		}
+            }
+	}
+        if(f == NULL) {
+            oc_log(LOGDBG,"Cannot find runtime configuration file");
+	} else {
+	    OCASSERT(path != NULL);
+       	    fclose(f);
+            if(ocdebug > 1)
+		fprintf(stderr, "DODS RC file: %s\n", path);
+            if(ocdodsrc_read(*alias,path) == 0)
+	        oc_log(LOGERR, "Error parsing %s\n",path);
+        }
+        if(path != NULL) free(path);
+    }
+    return OCTHROW(stat);
+}
+
+/**************************************************/
+OCerror
+ocopen(OCstate** statep, const char* url)
+{
+    int stat = OC_NOERR;
+    OCstate * state = NULL;
+    OCURI* tmpurl = NULL;
+    CURL* curl = NULL; /* curl handle*/
+
+    if(!ocuriparse(url,&tmpurl)) {OCTHROWCHK(stat=OC_EBADURL); goto fail;}
+    
+    stat = occurlopen(&curl);
+    if(stat != OC_NOERR) {OCTHROWCHK(stat); goto fail;}
+
+    state = (OCstate*)ocmalloc(sizeof(OCstate)); /* ocmalloc zeros memory*/
+    if(state == NULL) {OCTHROWCHK(stat=OC_ENOMEM); goto fail;}
+
+    /* Setup DAP state*/
+    state->magic = OCMAGIC;
+    state->curl = curl;
+    state->trees = oclistnew();
+    state->uri = tmpurl;
+    if(!ocuridecodeparams(state->uri)) {
+	oc_log(LOGWARN,"Could not parse client parameters");
+    }
+    state->packet = ocbytesnew();
+    ocbytessetalloc(state->packet,DFALTPACKETSIZE); /*initial reasonable size*/
+
+    /* set curl properties for this link */
+    ocsetcurlproperties(state);
+
+    /* Set up list to support reuse/reclamation of OCcontent objects. */
+    state->contentlist = NULL;
+
+    if(statep) *statep = state;
+    return OCTHROW(stat);   
+
+fail:
+    ocurifree(tmpurl);
+    if(state != NULL) ocfree(state);
+    if(curl != NULL) occurlclose(curl);
+    return OCTHROW(stat);
+}
+
+OCerror
+ocfetchf(OCstate* state, const char* constraint, OCdxd kind, OCflags flags,
+        OCnode** rootp)
+{
+    OCtree* tree = NULL;
+    OCnode* root = NULL;
+    OCerror stat = OC_NOERR;
+    
+    tree = (OCtree*)ocmalloc(sizeof(OCtree));
+    MEMCHECK(tree,OC_ENOMEM);
+    memset((void*)tree,0,sizeof(OCtree));
+    tree->dxdclass = kind;
+    tree->state = state;
+    tree->constraint = constraintescape(constraint);
+    if(tree->constraint == NULL)
+	tree->constraint = nulldup(constraint);
+
+    /* Set curl properties: pwd, flags, proxies, ssl */
+    if((stat=ocset_user_password(state))!= OC_NOERR) goto fail;
+    if((stat=ocset_curl_flags(state)) != OC_NOERR) goto fail;
+    if((stat=ocset_proxy(state)) != OC_NOERR) goto fail;
+    if((stat=ocset_ssl(state)) != OC_NOERR) goto fail;
+
+    ocbytesclear(state->packet);
+
+    switch (kind) {
+    case OCDAS:
+        stat = readDAS(state,tree);
+	if(stat == OC_NOERR) {
+            tree->text = ocbytesdup(state->packet);
+	    if(tree->text == NULL) stat = OC_EDAS;
+	}
+	break;
+    case OCDDS:
+        stat = readDDS(state,tree);
+	if(stat == OC_NOERR) {
+            tree->text = ocbytesdup(state->packet);
+	    if(tree->text == NULL) stat = OC_EDDS;
+	}
+	break;
+    case OCDATADDS:
+	if((flags & OCONDISK) != 0) {/* store in file */
+	    /* Create the datadds file immediately
+               so that DRNO can reference it*/
+            /* Make the tmp file*/
+            stat = createtempfile(state,tree);
+            if(stat) {OCTHROWCHK(stat); goto unwind;}
+            stat = readDATADDS(state,tree,flags);
+	    if(stat == OC_NOERR) {
+                /* Separate the DDS from data and return the dds;
+                   will modify packet */
+                stat = ocextractddsinfile(state,tree,flags);
+	    }
+	} else { /*in memory*/
+            stat = readDATADDS(state,tree,flags);
+	    if(stat == OC_NOERR) {
+                /* Separate the DDS from data and return the dds;
+               will modify packet */
+            stat = ocextractddsinmemory(state,tree,flags);
+	}
+	}
+	break;
+    }/*switch*/
+    if(stat != OC_NOERR) {
+	/* Obtain any http code */
+	state->error.httpcode = ocfetchhttpcode(state->curl);
+	if(state->error.httpcode >= 400) {
+	    oc_log(LOGWARN,"oc_open: Could not read url; http error = %l",state->error.httpcode);
+	} else {
+	    oc_log(LOGWARN,"oc_open: Could not read url");
+	}
+	return OCTHROW(stat);
+    }
+
+    tree->nodes = NULL;
+    stat = DAPparse(state,tree,tree->text);
+    /* Check and report on an error return from the server */
+    if(stat == OC_EDAPSVC  && state->error.code != NULL) {
+	oc_log(LOGERR,"oc_open: server error retrieving url: code=%s message=\"%s\"",
+		  state->error.code,	
+		  (state->error.message?state->error.message:""));
+    }
+    if(stat) {OCTHROWCHK(stat); goto unwind;}
+    root = tree->root;
+    /* make sure */
+    tree->root = root;
+    root->tree = tree;
+
+    /* Verify the parse */
+    switch (kind) {
+    case OCDAS:
+        if(root->octype != OC_Attributeset)
+	    {OCTHROWCHK(stat=OC_EDAS); goto unwind;}
+	break;
+    case OCDDS:
+        if(root->octype != OC_Dataset)
+	    {OCTHROWCHK(stat=OC_EDDS); goto unwind;}
+	break;
+    case OCDATADDS:
+        if(root->octype != OC_Dataset)
+	    {OCTHROWCHK(stat=OC_EDATADDS); goto unwind;}
+	/* Modify the tree kind */
+	tree->dxdclass = OCDATADDS;
+	break;
+    default: return OC_EINVAL;
+    }
+
+    if(kind != OCDAS) {
+        /* Process ocnodes to assign offsets and sizes where possible */
+        occomputeskipdata(state,root);
+        /* Process ocnodes to mark those that are cacheable */
+        ocmarkcacheable(state,root);
+        /* Process ocnodes to handle various semantic issues*/
+        occomputesemantics(tree->nodes);
+    }
+
+    /* Process ocnodes to compute name info*/
+    occomputefullnames(tree->root);
+
+     if(kind == OCDATADDS) {
+	if((flags & OCONDISK) != 0) {
+            tree->data.xdrs = xxdr_filecreate(tree->data.file,tree->data.bod);
+	} else {
+	    /* Switch to zero based memory */
+            tree->data.xdrs
+		= xxdr_memcreate(tree->data.memory,tree->data.datasize,tree->data.bod);
+	}
+        MEMCHECK(tree->data.xdrs,OC_ENOMEM);
+    }
+
+    /* Put root into the state->trees list */
+    oclistpush(state->trees,(ocelem)root);
+
+    if(rootp) *rootp = root;
+    return stat;
+
+unwind:
+    ocfreetree(tree);
+fail:
+    return OCTHROW(stat);
+}
+
+void
+occlose(OCstate* state)
+{
+    unsigned int i;
+    if(state == NULL) return;
+
+    /* Warning: ocfreeroot will attempt to remove the root from state->trees */
+    /* Ok in this case because we are popping the root out of state->trees */
+    for(i=0;i<oclistlength(state->trees);i++) {
+	OCnode* root = (OCnode*)oclistpop(state->trees);
+	ocfreeroot(root);
+    }
+    oclistfree(state->trees);
+    ocurifree(state->uri);
+    ocbytesfree(state->packet);
+    ocfree(state->error.code);
+    ocfree(state->error.message);
+    if(state->contentlist != NULL) {
+	struct OCcontent* next;
+	struct OCcontent* curr = state->contentlist;
+	while(curr != NULL) {
+	    next = curr->next;
+	    ocfree(curr);
+	    curr = next;
+	}
+    }
+    ocfree(state->curlflags.useragent);
+    ocfree(state->curlflags.cookiejar);
+    ocfree(state->curlflags.cookiefile);
+    ocfree(state->ssl.certificate);
+    ocfree(state->ssl.key);
+    ocfree(state->ssl.keypasswd);
+    ocfree(state->ssl.cainfo);
+    ocfree(state->ssl.capath); 
+    ocfree(state->proxy.host);
+    ocfree(state->creds.username);
+    ocfree(state->creds.password);
+    if(state->curl != NULL) occurlclose(state->curl);
+    ocfree(state);
+}
+
+static OCerror
+ocextractddsinmemory(OCstate* state, OCtree* tree, OCflags flags)
+{
+    OCerror stat = OC_NOERR;
+    size_t ddslen, bod, bodfound;
+    /* Read until we find the separator (or EOF)*/
+    bodfound = findbod(state->packet,&bod,&ddslen);
+    if(!bodfound) {/* No BOD; pretend */
+	bod = tree->data.bod;
+	ddslen = tree->data.datasize;
+    }
+    tree->data.bod = bod;
+    tree->data.ddslen = ddslen;
+    /* copy out the dds */
+    if(ddslen > 0) {
+        tree->text = (char*)ocmalloc(ddslen+1);
+        memcpy((void*)tree->text,(void*)ocbytescontents(state->packet),ddslen);
+        tree->text[ddslen] = '\0';
+    } else
+	tree->text = NULL;
+    /* Extract the inmemory contents */
+    tree->data.memory = ocbytesextract(state->packet);
+#ifdef OCIGNORE
+    /* guarantee the data part is on an 8 byte boundary */
+    if(tree->data.bod % 8 != 0) {
+        unsigned long count = tree->data.datasize - tree->data.bod;
+        memcpy(tree->xdrmemory,tree->xdrmemory+tree->data.bod,count);
+        tree->data.datasize = count;
+	tree->data.bod = 0;
+	tree->data.ddslen = 0;
+    }
+#endif
+    if(tree->text == NULL) stat = OC_EDATADDS;
+    return OCTHROW(stat);
+}
+
+static OCerror
+ocextractddsinfile(OCstate* state, OCtree* tree, OCflags flags)
+{
+    OCerror stat = OC_NOERR;
+    size_t ddslen, bod, bodfound;
+
+    /* Read until we find the separator (or EOF)*/
+    ocbytesclear(state->packet);
+    rewind(tree->data.file);
+    bodfound = 0;
+    do {
+        char chunk[1024];
+	size_t count;
+	/* read chunks of the file until we find the separator*/
+        count = fread(chunk,1,sizeof(chunk),tree->data.file);
+	if(count <= 0) break; /* EOF;*/
+        ocbytesappendn(state->packet,chunk,count);
+	bodfound = findbod(state->packet,&bod,&ddslen);
+    } while(!bodfound);
+    if(!bodfound) {/* No BOD; pretend */
+	bod = tree->data.bod;
+	ddslen = tree->data.datasize;
+    }
+    tree->data.bod = bod;
+    tree->data.ddslen = ddslen;
+    /* copy out the dds */
+    if(ddslen > 0) {
+        tree->text = (char*)ocmalloc(ddslen+1);
+        memcpy((void*)tree->text,(void*)ocbytescontents(state->packet),ddslen);
+        tree->text[ddslen] = '\0';
+    } else
+	tree->text = NULL;
+    /* reset the position of the tmp file*/
+    fseek(tree->data.file,tree->data.bod,SEEK_SET);
+    if(tree->text == NULL) stat = OC_EDATADDS;
+    return OCTHROW(stat);
+}
+
+static OCerror
+createtempfile(OCstate* state, OCtree* tree)
+{
+    int fd;
+    char* name = NULL;
+    fd = createtempfile1(TMPPATH1,&name);
+    if(fd < 0)
+        fd = createtempfile1(TMPPATH2,&name);
+    if(fd < 0) {
+        oc_log(LOGERR,"oc_open: attempt to open tmp file failed: %s",name);
+        return errno;
+    }
+#ifdef OCDEBUG
+    oc_log(LOGNOTE,"oc_open: using tmp file: %s",name);
+#endif
+    tree->data.filename = name; /* remember our tmp file name */
+    tree->data.file = fdopen(fd,"w+");
+    if(tree->data.file == NULL) return OC_EOPEN;
+    /* unlink the temp file so it will automatically be reclaimed */
+    if(ocdebug == 0) unlink(tree->data.filename);
+    return OC_NOERR;
+}
+
+int
+createtempfile1(char* tmppath, char** tmpnamep)
+{
+    int fd = 0;
+    char* tmpname = NULL;
+    tmpname = (char*)malloc(strlen(tmppath)+strlen("dataddsXXXXXX")+1);
+    if(tmpname == NULL) return -1;
+    strcpy(tmpname,tmppath);
+#ifdef HAVE_MKSTEMP
+    strcat(tmpname,"dataddsXXXXXX");
+    /* Note Potential problem: old versions of this function
+       leave the file in mode 0666 instead of 0600 */
+    fd = mkstemp(tmpname);
+#else /* !HAVE_MKSTEMP */
+    /* Need to simulate by using some kind of pseudo-random number */
+    strcat(tmpname,"datadds");
+    {
+	int rno = rand();
+	char spid[7];
+	if(rno < 0) rno = -rno;
+        sprintf(spid,"%06d",rno);
+        strcat(tmpname,spid);
+#  ifdef WIN32
+        fd=open(tmpname,O_RDWR|O_BINARY|O_CREAT|O_EXCL|FILE_ATTRIBUTE_TEMPORARY, _S_IREAD|_S_IWRITE);
+#  else
+        fd=open(tmpname,O_RDWR|O_CREAT|O_EXCL, S_IRWXU);
+#  endif
+    }
+#endif /* !HAVE_MKSTEMP */
+    if(tmpname == NULL) return -1;
+    if(tmpnamep) *tmpnamep = tmpname;
+    return fd;
+}
+
+/* Allow these (non-alpha-numerics) to pass thru */
+static char okchars[] = "&/:;,.=?@'\"<>{}!|\\^[]`~";
+static char hexdigits[] = "0123456789abcdef";
+
+
+/* Modify constraint to use %XX escapes */
+static char*
+constraintescape(const char* url)
+{
+    size_t len;
+    char* p;
+    int c;
+    char* eurl;
+
+    if(url == NULL) return NULL;
+    len = strlen(url);
+    eurl = ocmalloc(1+3*len); /* worst case: c -> %xx */
+    MEMCHECK(eurl,NULL);
+    p = eurl;
+    *p = '\0';
+    while((c=*url++)) {
+	if(c >= '0' && c <= '9') {*p++ = c;}
+	else if(c >= 'a' && c <= 'z') {*p++ = c;}
+	else if(c >= 'A' && c <= 'Z') {*p++ = c;}
+	else if(strchr(okchars,c) != NULL) {*p++ = c;}
+	else {
+	    *p++ = '%';
+	    *p++ = hexdigits[(c & 0xf0)>>4];
+	    *p++ = hexdigits[(c & 0xf)];
+	}
+    }
+    *p = '\0';
+    return eurl;
+}
+
+OCerror
+ocupdatelastmodifieddata(OCstate* state)
+{
+    OCerror status = OC_NOERR;
+    long lastmodified;
+    char* base = NULL;
+    base = ocuribuild(state->uri,NULL,NULL,OCURIENCODE);
+    status = ocfetchlastmodified(state->curl, base, &lastmodified);
+    free(base);
+    if(status == OC_NOERR) {
+	state->datalastmodified = lastmodified;
+    }
+    return status;
+}
+
+/*
+    Set curl properties for link based on rc files
+*/
+static void
+ocsetcurlproperties(OCstate* state)
+{
+    CURLcode cstat = CURLE_OK;
+
+    /* process the triple store wrt to this state */
+    if(ocdodsrc_process(state) != OC_NOERR) {
+	oc_log(LOGERR,"Malformed .opendaprc configuration file");
+	goto fail;
+    }
+    if(state->creds.username == NULL && state->creds.password == NULL) {
+        if(state->uri->user != NULL && state->uri->password != NULL) {
+	    /* this overrides .dodsrc */
+            if(state->creds.password) free(state->creds.password);
+            state->creds.password = nulldup(state->uri->password);
+            if(state->creds.username) free(state->creds.username);
+            state->creds.username = nulldup(state->uri->user);
+	}
+    }
+    return;
+
+fail:
+    if(cstat != CURLE_OK)
+	oc_log(LOGERR, "curl error: %s", curl_easy_strerror(cstat));
+    return;
+}
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/src_netcdf4/ocinternal.h
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/src_netcdf4/ocinternal.h	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/src_netcdf4/ocinternal.h	(revision 1749)
@@ -0,0 +1,198 @@
+/* Copyright 2009, UCAR/Unidata and OPeNDAP, Inc.
+   See the COPYRIGHT file for more information. */
+
+#ifndef OCINTERNAL_H
+#define OCINTERNAL_H
+
+#include "config.h"
+
+#ifdef _AIX
+#include <netinet/in.h>
+#endif
+
+#include <stdlib.h>
+#include <assert.h>
+#include <string.h>
+#ifndef WIN32
+#include <strings.h>
+#endif
+#include <stdarg.h>
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+#ifdef HAVE_SYS_TYPES_H
+#include <sys/types.h>
+#endif
+
+#define CURL_DISABLE_TYPECHECK 1
+#include <curl/curl.h>
+
+#include "oclist.h"
+#include "ocbytes.h"
+#include "ocuri.h"
+
+#define OCCACHEPOS
+
+#include "oc.h"
+#include "ocdatatypes.h"
+#include "occonstraints.h"
+#include "ocnode.h"
+#include "ocutil.h"
+#include "oclog.h"
+#include "xxdr.h"
+#include "ocdata.h"
+
+#ifndef nulldup
+#define nulldup(s) (s==NULL?NULL:strdup(s))
+#endif
+
+#define nullstring(s) (s==NULL?"(null)":s)
+#define PATHSEPARATOR "."
+
+/* Default initial memory packet size */
+#define DFALTPACKETSIZE 0x20000 /*approximately 100k bytes*/
+
+/* Default maximum memory packet size */
+#define DFALTMAXPACKETSIZE 0x3000000 /*approximately 50M bytes*/
+
+/* Extend the OCdxd type */
+#define OCVER 3
+
+/* Define a magic number to mark externally visible oc objects */
+#define OCMAGIC ((unsigned int)0x0c0c0c0c) /*clever, huh?*/
+
+/*! Specifies the OCstate. */
+typedef struct OCstate
+{
+    unsigned int magic; /* Mark each structure type */
+    CURL* curl; /* curl handle*/
+    OClist* trees; /* list<OCnode*> ; all root objects */
+    OCURI* uri; /* base URI*/
+    OCbytes* packet; /* shared by all trees during construction */
+    /* OCContent information */
+    struct OCcontent* contentlist;
+    struct OCerrdata {/* Hold info for an error return from server */
+	char* code;
+	char* message;
+	long  httpcode;
+	char  curlerrorbuf[CURL_ERROR_SIZE]; /* to get curl error message */
+    } error;
+    /* Store .rc file info */
+    struct OCcurlflags {
+	int compress;
+	int verbose;
+	int timeout;
+	int followlocation;
+	int maxredirs;
+	char* useragent;
+	char* cookiejar;
+	char* cookiefile;
+    } curlflags;
+    struct OCSSL {
+	int   validate;
+        char* certificate;
+	char* key;
+	char* keypasswd;
+        char* cainfo; /* certificate authority */
+	char* capath; 
+	int   verifypeer;
+    } ssl;
+    struct OCproxy {
+	char *host;
+	int port;
+    } proxy;
+    struct OCcredentials {
+	char *username;
+	char *password;
+    } creds;
+    long ddslastmodified;
+    long datalastmodified;
+} OCstate;
+
+
+/*! Specifies all the info about a particular DAP tree
+    i.e. DAS, DDS, or DATADDS as obtained from a fetch response
+    This is associated with the root object.
+*/
+typedef struct OCtree
+{
+    OCdxd  dxdclass;
+    char* constraint;
+    char* text;
+    struct OCnode* root; /* cross link */
+    struct OCstate* state; /* cross link */
+    OClist* nodes; /* all nodes in tree*/
+    /* when dxdclass == OCDATADDS */
+    struct {
+	char* memory;           /* allocated memory if OC_INMEMORY is set */
+        char* filename;
+        FILE* file;
+        unsigned long datasize; /* xdr size on disk or in memory */
+        unsigned long bod;      /* offset of the beginning of packet data */
+        unsigned long ddslen;   /* length of ddslen (assert(ddslen <= bod)) */
+        XXDR* xdrs;		/* access either memory or file */
+    } data;
+} OCtree;
+
+/* (Almost) All shared procedure definitions are kept here
+   except for: ocdebug.h ocutil.h
+   The true external interface is defined in oc.h
+*/
+
+/* Location: ocnode.c */
+extern OCnode* ocmakenode(char* name, OCtype ptype, OCnode* root);
+extern void occollectpathtonode(OCnode* node, OClist* path);
+extern void occomputefullnames(OCnode* root);
+extern void occomputesemantics(OClist*);
+extern void ocaddattribute(OCattribute* attr, OCnode* parent);
+extern OCattribute* ocmakeattribute(char* name, OCtype ptype, OClist* values);
+extern size_t ocsetsize(OCnode* node);
+extern OCerror occorrelate(OCnode*,OCnode*);
+extern OCerror occomputeskipdata(OCstate*, OCnode*);
+extern void ocmarkcacheable(OCstate* state, OCnode* ddsroot);
+
+/* Location: dapparselex.c*/
+extern int dapdebug;
+extern OCerror DAPparse(OCstate*, struct OCtree*, char*);
+extern char* dimnameanon(char* basename, unsigned int index);
+
+/* Location: ceparselex.c*/
+extern int cedebug;
+extern OClist* CEparse(OCstate*,char* input);
+
+/* Location: ocinternal.c*/
+extern OCerror ocopen(OCstate** statep, const char* url);
+extern void occlose(OCstate* state);
+
+extern OCerror ocfetchf(OCstate*, const char*, OCdxd, OCflags, OCnode**);
+
+/* Location: ocinternal.c */
+extern int oc_network_order;
+extern int oc_invert_xdr_double;
+extern int ocinternalinitialize(void);
+
+/* Location: ocnode.c */
+extern void ocfreetree(OCtree* tree);
+extern void ocfreeroot(OCnode* root);
+extern void ocfreenodes(OClist*);
+
+extern void ocddsclear(struct OCstate*);
+extern void ocdasclear(struct OCstate*);
+extern void ocdataddsclear(struct OCstate*);
+extern void* oclinearize(OCtype etype, unsigned int, char**);
+
+/* Merge DAS with DDS or DATADDS*/
+extern int ocddsdasmerge(struct OCstate*, OCnode* das, OCnode* dds);
+
+extern OCerror ocupdatelastmodifieddata(OCstate* state);
+
+extern int ocinternalinitialize(void);
+
+
+extern OCerror ocsetrcfile(char* rcfile);
+
+/* Global stateflags */
+extern int oc_curl_file_supported;
+extern int oc_curl_https_supported;
+
+#endif /*COMMON_H*/
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/src_netcdf4/oclist.c
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/src_netcdf4/oclist.c	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/src_netcdf4/oclist.c	(revision 1749)
@@ -0,0 +1,171 @@
+/* Copyright 2009, UCAR/Unidata and OPeNDAP, Inc.
+   See the COPYRIGHT file for more information. */
+
+#include "config.h"
+
+#include <stdlib.h>
+#include <stdio.h>
+#include <string.h>
+
+#include "oclist.h"
+
+static ocelem ocDATANULL = (ocelem)0;
+/*static int ocinitialized=0;*/
+
+int oclistnull(ocelem e) {return e == ocDATANULL;}
+
+#ifndef TRUE
+#define TRUE 1
+#endif
+#ifndef FALSE
+#define FALSE 0
+#endif
+
+#define DEFAULTALLOC 16
+#define ALLOCINCR 16
+
+OClist* oclistnewn(int prealloc)
+{
+  OClist* l;
+/*
+  if(!ocinitialized) {
+    memset((void*)&ocDATANULL,0,sizeof(ocelem));
+    ocinitialized = 1;
+  }
+*/
+  if(prealloc < 0) prealloc = 0;
+  l = (OClist*)malloc(sizeof(OClist));
+  if(l) {
+    l->alloc=prealloc;
+    l->length=prealloc;
+    l->content=(prealloc==0?NULL:(ocelem*)calloc(prealloc,sizeof(ocelem)));
+    if(l == NULL) {free(l);return 0;}
+  }
+  return l;
+}
+
+int
+oclistfree(OClist* l)
+{
+  if(l) {
+    l->alloc = 0;
+    if(l->content != NULL) {free(l->content); l->content = NULL;}
+    free(l);
+  }
+  return TRUE;
+}
+
+int
+oclistsetalloc(OClist* l, unsigned int sz)
+{
+  ocelem* newcontent;
+  if(l == NULL) return FALSE;
+  if(sz <= 0) {sz = (l->length?2*l->length:DEFAULTALLOC);}
+  if(l->alloc >= sz) {return TRUE;}
+  newcontent=(ocelem*)calloc(sz,sizeof(ocelem));
+  if(l->alloc > 0 && l->length > 0 && l->content != NULL) {
+    memcpy((void*)newcontent,(void*)l->content,sizeof(ocelem)*l->length);
+    free(l->content);
+  }
+  l->content=newcontent;
+  l->alloc=sz;
+  return TRUE;
+}
+
+int
+oclistsetlength(OClist* l, unsigned int sz)
+{
+  if(l == NULL) return FALSE;
+  if(sz > l->alloc && !oclistsetalloc(l,sz)) return FALSE;
+  l->length = sz;
+  return TRUE;
+}
+
+ocelem
+oclistget(OClist* l, unsigned int index)
+{
+  if(l == NULL || l->length == 0) return ocDATANULL;
+  if(index >= l->length) return ocDATANULL;
+  return l->content[index];
+}
+
+int
+oclistset(OClist* l, unsigned int index, ocelem elem)
+{
+  if(l == NULL) return FALSE;
+  if(index >= l->length) return FALSE;
+  l->content[index] = elem;
+  return TRUE;
+}
+
+/* Insert at position i of l; will push up elements i..|seq|. */
+int
+oclistinsert(OClist* l, unsigned int index, ocelem elem)
+{
+  unsigned int i;
+  if(l == NULL) return FALSE;
+  if(index > l->length) return FALSE;
+  oclistsetalloc(l,0);
+  for(i=l->length;i>index;i--) l->content[i] = l->content[i-1];
+  l->content[index] = elem;
+  l->length++;
+  return TRUE;
+}
+
+int
+oclistpush(OClist* l, ocelem elem)
+{
+  if(l == NULL) return FALSE;
+  if(l->length >= l->alloc) oclistsetalloc(l,0);
+  l->content[l->length] = elem;
+  l->length++;
+  return TRUE;
+}
+
+ocelem
+oclistpop(OClist* l)
+{
+  if(l == NULL || l->length == 0) return ocDATANULL;
+  l->length--;  
+  return l->content[l->length];
+}
+
+ocelem
+oclisttop(OClist* l)
+{
+  if(l == NULL || l->length == 0) return ocDATANULL;
+  return l->content[l->length - 1];
+}
+
+ocelem
+oclistremove(OClist* l, unsigned int i)
+{
+  unsigned int len;
+  ocelem elem;
+  if(l == NULL || (len=l->length) == 0) return ocDATANULL;
+  if(i >= len) return ocDATANULL;
+  elem = l->content[i];
+  for(i++;i<len;i++) l->content[i-1] = l->content[i];
+  l->length--;
+  return elem;  
+}
+
+/* Duplicate and return the content (null terminate) */
+ocelem*
+oclistdup(OClist* l)
+{
+    ocelem* result = (ocelem*)malloc(sizeof(ocelem)*(l->length+1));
+    memcpy((void*)result,(void*)l->content,sizeof(ocelem)*l->length);
+    result[l->length] = (ocelem)0;
+    return result;
+}
+
+int
+oclistcontains(OClist* list, ocelem elem)
+{
+    unsigned int i;
+    for(i=0;i<oclistlength(list);i++) {
+	if(elem == oclistget(list,i)) return 1;
+    }
+    return 0;
+}
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/src_netcdf4/oclist.h
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/src_netcdf4/oclist.h	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/src_netcdf4/oclist.h	(revision 1749)
@@ -0,0 +1,57 @@
+/* Copyright 2009, UCAR/Unidata and OPeNDAP, Inc.
+   See the COPYRIGHT file for more information. */
+#ifndef OCLIST_H
+#define OCLIST_H 1
+
+/* Define the type of the elements in the list*/
+
+#if defined(_CPLUSPLUS_) || defined(__CPLUSPLUS__)
+#define EXTERNC extern "C"
+#else
+#define EXTERNC extern
+#endif
+
+typedef unsigned long ocelem;
+
+EXTERNC int oclistnull(ocelem);
+
+typedef struct OClist {
+  unsigned int alloc;
+  unsigned int length;
+  ocelem* content;
+} OClist;
+
+EXTERNC OClist* oclistnewn(int);
+EXTERNC int oclistfree(OClist*);
+EXTERNC int oclistsetalloc(OClist*,unsigned int);
+EXTERNC int oclistsetlength(OClist*,unsigned int);
+
+/* Set the ith element */
+EXTERNC int oclistset(OClist*,unsigned int,ocelem);
+/* Get value at position i */
+EXTERNC ocelem oclistget(OClist*,unsigned int);/* Return the ith element of l */
+/* Insert at position i; will push up elements i..|seq|. */
+EXTERNC int oclistinsert(OClist*,unsigned int,ocelem);
+/* Remove element at position i; will move higher elements down */
+EXTERNC ocelem oclistremove(OClist* l, unsigned int i);
+
+/* Tail operations */
+EXTERNC int oclistpush(OClist*,ocelem); /* Add at Tail */
+EXTERNC ocelem oclistpop(OClist*);
+EXTERNC ocelem oclisttop(OClist*);
+
+/* Duplicate and return the content (null terminate) */
+EXTERNC ocelem* oclistdup(OClist*);
+
+/* Look for value match */
+EXTERNC int oclistcontains(OClist*, ocelem);
+
+/* Following are always "in-lined"*/
+#define oclistnew() oclistnewn(0)
+#define oclistclear(l) oclistsetlength((l),0U)
+#define oclistextend(l,len) oclistsetalloc((l),(len)+(l->alloc))
+#define oclistcontents(l) ((l)->content)
+#define oclistlength(l)  ((l)?(l)->length:0U)
+
+#endif /*OCLIST_H*/
+
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/src_netcdf4/oclog.c
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/src_netcdf4/oclog.c	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/src_netcdf4/oclog.c	(revision 1749)
@@ -0,0 +1,132 @@
+/* Copyright 2009, UCAR/Unidata and OPeNDAP, Inc.
+   See the COPYRIGHT file for more information. */
+
+#include "config.h"
+
+#include "ocinternal.h"
+#include <stdio.h>
+#include <fcntl.h>
+
+#define PREFIXLEN 8
+
+#define ENVFLAG "OCLOGFILE"
+
+static int ocloginit = 0;
+static int oclogging = 0;
+static char* oclogfile = NULL;
+static FILE* oclogstream = NULL;
+
+void
+oc_loginit(void)
+{
+    ocloginit = 1;
+    oc_setlogging(0);
+    oclogfile = NULL;
+    oclogstream = NULL;
+    /* Use environment variables to preset oclogging state*/
+    /* I hope this is portable*/
+    if(getenv(ENVFLAG) != NULL) {
+	const char* file = getenv(ENVFLAG);
+	oc_setlogging(1);
+	oc_logopen(file);
+    }
+}
+
+void
+oc_setlogging(int tf)
+{
+    if(!ocloginit) oc_loginit();
+    oclogging = tf;
+}
+
+void
+oc_logopen(const char* file)
+{
+    if(!ocloginit) oc_loginit();
+    if(oclogfile != NULL) {
+	fclose(oclogstream);
+	free(oclogfile);
+	oclogfile = NULL;
+    }
+    if(file == NULL || strlen(file) == 0) {
+	/* use stderr*/
+	oclogstream = stderr;
+	oclogfile = NULL;
+    } else {
+	int fd;
+	oclogfile = (char*)malloc(strlen(file)+1);
+	strcpy(oclogfile,file);
+	oclogstream = NULL;
+	/* We need to deal with this file carefully
+	   to avoid unauthorized access*/
+	fd = open(oclogfile,O_WRONLY|O_APPEND|O_CREAT,0600);
+	if(fd >= 0) {
+	    oclogstream = fdopen(fd,"a");
+	} else {
+	    free(oclogfile);
+	    oclogfile = NULL;
+	    oc_setlogging(0);
+	}
+    }
+}
+
+void
+oc_logclose(void)
+{
+    if(oclogfile != NULL && oclogstream != NULL) {
+	fclose(oclogstream);
+	oclogstream = NULL;
+	if(oclogfile != NULL) free(oclogfile);
+	oclogfile = NULL;
+    }
+}
+
+void
+oc_log(int tag, const char* fmt, ...)
+{
+    va_list args;
+    char* prefix;
+    if(!oclogging || oclogstream == NULL) return;
+
+    switch (tag) {
+    case LOGWARN: prefix = "Warning:"; break;
+    case LOGERR:  prefix = "Error:  "; break;
+    case LOGNOTE: prefix = "Note:   "; break;
+    case LOGDBG:  prefix = "Debug:  "; break;
+    default:
+        fprintf(oclogstream,"Error:  Bad log prefix: %d\n",tag);
+	prefix = "Error:  ";
+	break;
+    }
+    fprintf(oclogstream,"%s:",prefix);
+
+    if(fmt != NULL) {
+      va_start(args, fmt);
+      vfprintf(oclogstream, fmt, args);
+      va_end( args );
+    }
+    fprintf(oclogstream, "\n" );
+    fflush(oclogstream);
+}
+
+void
+oc_logtext(int tag, const char* text)
+{
+    char line[1024];
+    size_t delta = 0;
+    const char* eol = text;
+
+    if(!oclogging || oclogstream == NULL) return;
+
+    while(*text) {
+	eol = strchr(text,'\n');
+	if(eol == NULL)
+	    delta = strlen(text);
+	else
+	    delta = (eol - text);
+	if(delta > 0) memcpy(line,text,delta);
+	line[delta] = '\0';
+	fprintf(oclogstream,"        %s\n",line);
+	text = eol+1;
+    }
+}
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/src_netcdf4/oclog.h
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/src_netcdf4/oclog.h	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/src_netcdf4/oclog.h	(revision 1749)
@@ -0,0 +1,20 @@
+/* Copyright 2009, UCAR/Unidata and OPeNDAP, Inc.
+   See the COPYRIGHT file for more information. */
+
+#ifndef OCLOG_H
+#define OCLOG_H
+
+#define LOGNOTE 0
+#define LOGWARN 1
+#define LOGERR 2
+#define LOGDBG 3
+
+extern void oc_loginit(void);
+extern void oc_setlogging(int tf);
+extern void oc_logopen(const char* file);
+extern void oc_logclose(void);
+
+extern void oc_log(int tag, const char* fmt, ...);
+extern void oc_logtext(int tag, const char* text);
+
+#endif /*OCLOG_H*/
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/src_netcdf4/ocnode.c
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/src_netcdf4/ocnode.c	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/src_netcdf4/ocnode.c	(revision 1749)
@@ -0,0 +1,757 @@
+/* Copyright 2009, UCAR/Unidata and OPeNDAP, Inc.
+   See the COPYRIGHT file for more information. */
+
+#include "config.h"
+#include "ocinternal.h"
+#include "ocdebug.h"
+
+static const unsigned int MAX_UINT = 0xffffffff;
+
+static OCerror occomputeskipdatar(OCstate*, OCnode*, ocoffset_t offset);
+static int mergedas1(OCnode* dds, OCnode* das);
+static int converttype(OCtype etype, char* value, char* memory);
+static char* pathtostring(OClist* path, char* separator, int usecdfname);
+static void computefullname(OCnode* node);
+
+/* Process ocnodes to fix various semantic issues*/
+void
+occomputesemantics(OClist* ocnodes)
+{
+    unsigned int i;
+    OCASSERT((ocnodes != NULL));
+    for(i=0;i<oclistlength(ocnodes);i++) {
+	OCnode* node = (OCnode*)oclistget(ocnodes,i);
+	/* set the container for dims*/
+	if(node->octype == OC_Dimension && node->dim.array != NULL) {
+	    node->container = node->dim.array->container;
+	}
+    }
+}
+
+void
+occomputefullnames(OCnode* root)
+{
+    unsigned int i;
+    if(root->name != NULL) computefullname(root);
+    if(root->subnodes != NULL) { /* recurse*/
+        for(i=0;i<oclistlength(root->subnodes);i++) {
+	    OCnode* node = (OCnode*)oclistget(root->subnodes,i);
+	    occomputefullnames(node);
+	}
+    }
+}
+
+static void
+computefullname(OCnode* node)
+{
+    char* tmp;
+    char* fullname;
+    OClist* path;
+
+    OCASSERT((node->name != NULL));
+    path = oclistnew();
+    occollectpathtonode(node,path);
+    tmp = pathtostring(path,PATHSEPARATOR,1);
+    if(tmp == NULL) {
+        fullname = nulldup(node->name);
+    } else {
+        fullname = tmp;
+    }
+    node->fullname = fullname;
+    oclistfree(path);
+}
+
+/* Convert path to a string; leave off the dataset name*/
+static char*
+pathtostring(OClist* path, char* separator, int usecdfname)
+{
+    int slen,i,len;
+    char* pathname;
+    if(path == NULL || (len = oclistlength(path))==0) return NULL;
+    for(slen=0,i=0;i<len;i++) {
+	OCnode* node = (OCnode*)oclistget(path,i);
+	if(node->container == NULL || node->name == NULL) continue;
+	slen += strlen(node->name);
+    }
+    slen += ((len-1)*strlen(separator));
+    slen += 1;   /* for null terminator*/
+    pathname = (char*)ocmalloc(slen);
+    MEMCHECK(pathname,NULL);
+    pathname[0] = '\0';
+    for(i=0;i<len;i++) {
+	OCnode* node = (OCnode*)oclistget(path,i);
+	if(node->container == NULL || node->name == NULL) continue;
+	if(strlen(pathname) > 0) strcat(pathname,separator);
+        strcat(pathname,node->name);
+    }
+    return pathname;
+}
+
+/* Collect the set of nodes ending in "node"*/
+void
+occollectpathtonode(OCnode* node, OClist* path)
+{
+    if(node == NULL) return;
+    occollectpathtonode(node->container,path);
+    oclistpush(path,(ocelem)node);
+}
+
+OCnode*
+ocmakenode(char* name, OCtype ptype, OCnode* root)
+{
+    OCnode* cdf = (OCnode*)ocmalloc(sizeof(OCnode));
+    MEMCHECK(cdf,(OCnode*)NULL);
+    memset((void*)cdf,0,sizeof(OCnode));
+    cdf->magic = OCMAGIC;
+    cdf->name = (name?nulldup(name):NULL);
+    cdf->octype = ptype;
+    cdf->array.dimensions = NULL;
+    cdf->root = root;
+    return cdf;
+}
+
+OCattribute*
+makeattribute(char* name, OCtype ptype, OClist* values)
+{
+    OCattribute* att = (OCattribute*)ocmalloc(sizeof(OCattribute)); /* ocmalloc zeros*/
+    MEMCHECK(att,(OCattribute*)NULL);
+    att->name = nulldup(name);
+    att->etype = ptype;
+    att->nvalues = oclistlength(values);
+    att->values = NULL;
+    if(att->nvalues > 0) {
+	int i;
+        att->values = (char**)ocmalloc(sizeof(char*)*att->nvalues);
+        for(i=0;i<att->nvalues;i++)
+	    att->values[i] = nulldup((char*)oclistget(values,i));
+    }
+    return att;
+}
+
+static void
+marklostattribute(OCnode* att)
+{
+    oc_log(LOGWARN,"Lost attribute: %s",att->name);
+}
+
+void*
+oclinearize(OCtype etype, unsigned int nstrings, char** strings)
+{
+    int i;
+    size_t typesize;
+    char* memp;
+    char* memory;
+
+    if(nstrings == 0) return NULL;
+    typesize = octypesize(etype);
+    memory = (char*)ocmalloc(nstrings*typesize);
+    MEMCHECK(memory,NULL);
+    memp = memory;
+    for(i=0;i<nstrings;i++) {
+	char* value = strings[i];
+        converttype(etype,value,memp);
+	memp += typesize;
+    }
+    return memory;
+}
+
+static int
+converttype(OCtype etype, char* value, char* memory)
+{
+    long iv;
+    unsigned long uiv;
+    double dv;
+    char c[1];
+    int outofrange = 0;
+#ifdef HAVE_LONG_LONG_INT
+    long long llv;
+    unsigned long long ullv;
+#endif
+
+    switch (etype) {
+    case OC_Char:
+	if(sscanf(value,"%c",c) != 1) goto fail;
+	*((char*)memory) = c[0];
+	break;
+    case OC_Byte:
+	if(sscanf(value,"%ld",&iv) != 1) goto fail;
+        else if(iv > OC_BYTE_MAX || iv < OC_BYTE_MIN) {iv = OC_BYTE_MAX; outofrange = 1;}
+	*((signed char*)memory) = (signed char)iv;
+	break;
+    case OC_UByte:
+	if(sscanf(value,"%lu",&uiv) != 1) goto fail;
+        else if(uiv > OC_UBYTE_MAX) {uiv = OC_UBYTE_MAX; outofrange = 1;}
+	*((unsigned char*)memory) = (unsigned char)uiv;
+	break;
+    case OC_Int16:
+	if(sscanf(value,"%ld",&iv) != 1) goto fail;
+        else if(iv > OC_INT16_MAX || iv < OC_INT16_MIN) {iv = OC_INT16_MAX; outofrange = 1;}
+	*((signed short*)memory) = (signed short)iv;
+	break;
+    case OC_UInt16:
+	if(sscanf(value,"%lu",&uiv) != 1) goto fail;
+        else if(uiv > OC_UINT16_MAX) {uiv = OC_UINT16_MAX; outofrange = 1;}
+	*((unsigned short*)memory) = (unsigned short)uiv;
+	break;
+    case OC_Int32:
+	if(sscanf(value,"%ld",&iv) != 1) goto fail;
+        else if(iv > OC_INT32_MAX || iv < OC_INT32_MIN) {iv = OC_INT32_MAX; outofrange = 1;}
+	*((signed int*)memory) = (signed int)iv;
+	break;
+    case OC_UInt32:
+	if(sscanf(value,"%lu",&uiv) != 1) goto fail;
+        else if(uiv > OC_UINT32_MAX) {uiv = OC_UINT32_MAX; outofrange = 1;}
+	*((unsigned char*)memory) = (unsigned int)uiv;
+	break;
+#ifdef HAVE_LONG_LONG_INT
+    case OC_Int64:
+	if(sscanf(value,"%lld",&llv) != 1) goto fail;
+        /*else if(iv > OC_INT64_MAX || iv < OC_INT64_MIN) goto fail;*/
+	*((signed long long*)memory) = (signed long long)llv;
+	break;
+    case OC_UInt64:
+	if(sscanf(value,"%llu",&ullv) != 1) goto fail;
+	*((unsigned long long*)memory) = (unsigned long long)ullv;
+	break;
+#endif
+    case OC_Float32:
+	if(sscanf(value,"%lf",&dv) != 1) goto fail;
+	*((float*)memory) = (float)dv;
+	break;
+    case OC_Float64:
+	if(sscanf(value,"%lf",&dv) != 1) goto fail;
+	*((double*)memory) = (double)dv;
+	break;
+    case OC_String: case OC_URL:
+	*((char**)memory) = nulldup(value);
+	break;
+    default:
+	goto fail;
+    }
+    if(outofrange)
+        oc_log(LOGWARN,"converttype range failure: %d: %s",etype,value);
+    return 1;
+fail:
+    oc_log(LOGERR,"converttype bad value: %d: %s",etype,value);
+    return 0;
+}
+
+
+void
+ocfreeroot(OCnode* root)
+{
+    OCtree* tree;
+    OCstate* state;
+    int i;
+
+    if(root == NULL || root->tree == NULL) return;
+
+    tree = root->tree;
+    /* Remove the root from the state->trees list */
+    state = tree->state;
+    for(i=0;i<oclistlength(state->trees);i++) {
+	OCnode* node = (OCnode*)oclistget(state->trees,i);
+	if(root == node)
+	    oclistremove(state->trees,i);
+    }
+    /* Note: it is ok if state->trees does not contain this root */    
+    ocfreetree(tree);
+}
+
+void
+ocfreetree(OCtree* tree)
+{
+    if(tree == NULL) return;
+    ocfreenodes(tree->nodes);
+    ocfree(tree->constraint);
+    ocfree(tree->text);
+    if(tree->data.xdrs != NULL) {
+        xxdr_free(tree->data.xdrs);
+    }
+    ocfree(tree->data.filename); /* may be null */
+    if(tree->data.file != NULL) fclose(tree->data.file);
+    ocfree(tree->data.memory);
+    ocfree(tree);
+}
+
+void
+ocfreenodes(OClist* nodes)
+{
+    unsigned int i,j;
+    for(i=0;i<oclistlength(nodes);i++) {
+	OCnode* node = (OCnode*)oclistget(nodes,i);
+        ocfree(node->name);
+        ocfree(node->fullname);
+        while(oclistlength(node->att.values) > 0) {
+	    char* value = (char*)oclistpop(node->att.values);
+	    ocfree(value);
+        }
+        while(oclistlength(node->attributes) > 0) {
+            OCattribute* attr = (OCattribute*)oclistpop(node->attributes);
+	    ocfree(attr->name);
+	    /* If the attribute type is string, then we need to free them*/
+	    if(attr->etype == OC_String || attr->etype == OC_URL) {
+		char** strings = (char**)attr->values;
+		for(j=0;j<attr->nvalues;j++) {ocfree(*strings); strings++;}
+	    }
+	    ocfree(attr->values);
+	    ocfree(attr);
+        }
+        if(node->array.dimensions != NULL) oclistfree(node->array.dimensions);
+        if(node->subnodes != NULL) oclistfree(node->subnodes);
+        if(node->att.values != NULL) oclistfree(node->att.values);
+        if(node->attributes != NULL) oclistfree(node->attributes);
+        ocfree(node);
+    }
+    oclistfree(nodes);
+}
+
+/*
+In order to be as compatible as possible with libdap,
+we try to use the same algorithm for DAS->DDS matching.
+As described there, the algorithm is as follows.
+    If the [attribute] name contains one or
+    more field separators then look for a [DDS]variable whose
+    name matches exactly. If the name contains no field separators then
+    the look first in the top level [of the DDS] and then in all subsequent
+    levels and return the first occurrence found. In general, this
+    searches constructor types in the order in which they appear
+    in the DDS, but there is no requirement that it do so.
+
+    Note: If a dataset contains two constructor types which have field names
+    that are the same (say point.x and pair.x) one should use fully qualified
+    names to get each of those variables.
+*/
+
+int
+ocddsdasmerge(OCstate* state, OCnode* dasroot, OCnode* ddsroot)
+{
+    OClist* dasglobals = oclistnew();
+    OClist* dasnodes = oclistnew();
+    OClist* varnodes = oclistnew();
+    OClist* ddsnodes;
+    unsigned int i,j;
+
+    if(dasroot->tree == NULL || dasroot->tree->dxdclass != OCDAS)
+	return OCTHROW(OC_EINVAL);
+    if(ddsroot->tree == NULL || (ddsroot->tree->dxdclass != OCDDS
+        && ddsroot->tree->dxdclass != OCDATADDS))
+	return OCTHROW(OC_EINVAL);
+
+    ddsnodes = ddsroot->tree->nodes;
+
+    /* 1. collect all the relevant DAS nodes;
+          namely those that contain at least one
+          attribute value.
+          Simultaneously look for potential ambiguities
+          if found; complain but continue: result are indeterminate.
+          also collect globals separately*/
+    for(i=0;i<oclistlength(dasroot->tree->nodes);i++) {
+	OCnode* das = (OCnode*)oclistget(dasroot->tree->nodes,i);
+	int hasattributes = 0;
+	if(das->octype == OC_Attribute) continue; /* ignore these for now*/
+	if(das->name == NULL || das->att.isglobal) {
+	    oclistpush(dasglobals,(ocelem)das);
+	    continue;
+	}
+	for(j=0;j<oclistlength(das->subnodes);j++) {
+	    OCnode* subnode = (OCnode*)oclistget(das->subnodes,j);
+	    if(subnode->octype == OC_Attribute) {hasattributes = 1; break;}
+	}
+	if(hasattributes) {
+	    /* Look for previously collected nodes with same name*/
+            for(j=0;j<oclistlength(dasnodes);j++) {
+	        OCnode* das2 = (OCnode*)oclistget(dasnodes,j);
+		if(das->name == NULL || das2->name == NULL) continue;
+		if(strcmp(das->name,das2->name)==0) {
+		    oc_log(LOGWARN,"oc_mergedas: potentially ambiguous DAS name: %s",das->name);
+		}
+	    }
+	    oclistpush(dasnodes,(ocelem)das);
+	}
+    }
+
+    /* 2. collect all the leaf DDS nodes (of type OC_Primitive)*/
+    for(i=0;i<oclistlength(ddsnodes);i++) {
+	OCnode* dds = (OCnode*)oclistget(ddsnodes,i);
+	if(dds->octype == OC_Primitive) oclistpush(varnodes,(ocelem)dds);
+    }
+
+    /* 3. For each das node, locate matching DDS node(s) and attach
+          attributes to the DDS node(s).
+          Match means:
+          1. DAS->fullname :: DDS->fullname
+          2. DAS->name :: DDS->fullname (support DAS names with embedded '.'
+          3. DAS->name :: DDS->name
+    */
+    for(i=0;i<oclistlength(dasnodes);i++) {
+	OCnode* das = (OCnode*)oclistget(dasnodes,i);
+        for(j=0;j<oclistlength(varnodes);j++) {
+	    OCnode* dds = (OCnode*)oclistget(varnodes,j);
+	    if(strcmp(das->fullname,dds->fullname)==0
+	       || strcmp(das->name,dds->fullname)==0
+	       || strcmp(das->name,dds->name)==0) {
+		mergedas1(dds,das);
+		/* remove from dasnodes list*/
+		oclistset(dasnodes,i,(ocelem)NULL);
+	    }
+	}
+    }
+
+    /* 4. If there are attributes left, then complain about them being lost.*/
+    for(i=0;i<oclistlength(dasnodes);i++) {
+	OCnode* das = (OCnode*)oclistget(dasnodes,i);
+	if(das != NULL) marklostattribute(das);
+    }
+
+    /* 5. Assign globals*/
+    for(i=0;i<oclistlength(dasglobals);i++) {
+	OCnode* das = (OCnode*)oclistget(dasglobals,i);
+	mergedas1(ddsroot,das);
+    }
+    /* cleanup*/
+    oclistfree(dasglobals);
+    oclistfree(dasnodes);
+    oclistfree(varnodes);
+    return OCTHROW(OC_NOERR);
+}
+
+static int
+mergedas1(OCnode* dds, OCnode* das)
+{
+    unsigned int i;
+    int stat = OC_NOERR;
+    if(das == NULL) return OC_NOERR; /* nothing to do */
+    if(dds->attributes == NULL) dds->attributes = oclistnew();
+    /* assign the simple attributes in the das set to this dds node*/
+    for(i=0;i<oclistlength(das->subnodes);i++) {
+	OCnode* attnode = (OCnode*)oclistget(das->subnodes,i);
+	if(attnode->octype == OC_Attribute) {
+	    OCattribute* att = makeattribute(attnode->name,
+						attnode->etype,
+						attnode->att.values);
+            oclistpush(dds->attributes,(ocelem)att);
+	}
+    }
+    return OCTHROW(stat);
+}
+
+
+
+#ifdef OCIGNORE
+
+int
+ocddsdasmerge(OCstate* state, OCnode* ddsroot, OCnode* dasroot)
+{
+    int i,j;
+    int stat = OC_NOERR;
+    OClist* globals = oclistnew();
+    if(dasroot == NULL) return OCTHROW(stat);
+    /* Start by looking for global attributes*/
+    for(i=0;i<oclistlength(dasroot->subnodes);i++) {
+	OCnode* node = (OCnode*)oclistget(dasroot->subnodes,i);
+	if(node->att.isglobal) {
+	    for(j=0;j<oclistlength(node->subnodes);j++) {
+		OCnode* attnode = (OCnode*)oclistget(node->subnodes,j);
+		Attribute* att = makeattribute(attnode->name,
+						attnode->etype,
+						attnode->att.values);
+		oclistpush(globals,(ocelem)att);
+	    }
+	}
+    }
+    ddsroot->attributes = globals;
+    /* Now try to match subnode names with attribute set names*/
+    for(i=0;i<oclistlength(dasroot->subnodes);i++) {
+	OCnode* das = (OCnode*)oclistget(dasroot->subnodes,i);
+	int match = 0;
+        if(das->att.isglobal) continue;
+        if(das->octype == OC_Attributeset) {
+            for(j=0;j<oclistlength(ddsroot->subnodes) && !match;j++) {
+	        OCnode* dds = (OCnode*)oclistget(ddsroot->subnodes,j);
+	        if(strcmp(das->name,dds->name) == 0) {
+		    match = 1;
+	            stat = mergedas1(dds,das);
+	            if(stat != OC_NOERR) break;
+		}
+	    }
+	}
+        if(!match) {marklostattribute(das);}
+    }
+    if(stat == OC_NOERR) ddsroot->attributed = 1;
+    return OCTHROW(stat);
+}
+
+/* Merge das attributes into the dds node*/
+
+static int
+mergedas1(OCnode* dds, OCnode* das)
+{
+    int i,j;
+    int stat = OC_NOERR;
+    if(dds->attributes == NULL) dds->attributes = oclistnew();
+    /* assign the simple attributes in the das set to this dds node*/
+    for(i=0;i<oclistlength(das->subnodes);i++) {
+	OCnode* attnode = (OCnode*)oclistget(das->subnodes,i);
+	if(attnode->octype == OC_Attribute) {
+	    Attribute* att = makeattribute(attnode->name,
+						attnode->etype,
+						attnode->att.values);
+            oclistpush(dds->attributes,(ocelem)att);
+	}
+    }
+    /* Try to merge any enclosed sets with subnodes of dds*/
+    for(i=0;i<oclistlength(das->subnodes);i++) {
+	OCnode* dasnode = (OCnode*)oclistget(das->subnodes,i);
+	int match = 0;
+        if(dasnode->octype == OC_Attribute) continue; /* already dealt with above*/
+        for(j=0;j<oclistlength(dds->subnodes) && !match;j++) {
+	    OCnode* ddsnode = (OCnode*)oclistget(dds->subnodes,j);
+	    if(strcmp(dasnode->name,ddsnode->name) == 0) {
+	        match = 1;
+	        stat = mergedas1(ddsnode,dasnode);
+	        if(stat != OC_NOERR) break;
+	    }
+	}
+        if(!match) {marklostattribute(dasnode);}
+    }
+    return OCTHROW(stat);
+}
+#endif
+
+static void
+ocuncorrelate(OCnode* root)
+{
+    OCtree* tree = root->tree;
+    unsigned int i;
+    if(tree == NULL) return;
+    for(i=0;i<oclistlength(tree->nodes);i++) {
+	OCnode* node = (OCnode*)oclistget(tree->nodes,i);
+	node->datadds = NULL;
+    }        
+}
+
+static OCerror
+occorrelater(OCnode* dds, OCnode* dxd)
+{
+    int i,j;
+    OCerror ocstat = OC_NOERR;
+
+    if(dds->octype != dxd->octype) {
+	OCTHROWCHK((ocstat = OC_EINVAL)); goto fail;
+    }
+    if(dxd->name != NULL && dxd->name != NULL
+       && strcmp(dxd->name,dds->name) != 0) {
+	OCTHROWCHK((ocstat = OC_EINVAL)); goto fail;
+    } else if(dxd->name != dxd->name) { /* test NULL==NULL */
+	OCTHROWCHK((ocstat = OC_EINVAL)); goto fail;
+    }
+
+    if(dxd->array.rank != dds->array.rank) {
+	OCTHROWCHK((ocstat = OC_EINVAL)); goto fail;
+    }
+
+    dds->datadds = dxd;
+
+    switch (dds->octype) {
+    case OC_Dataset:
+    case OC_Structure:
+    case OC_Grid:
+    case OC_Sequence:
+	/* Remember: there may be fewer datadds fields than dds fields */
+	for(i=0;i<oclistlength(dxd->subnodes);i++) {
+	    OCnode* dxd1 = (OCnode*)oclistget(dxd->subnodes,i);
+	    for(j=0;j<oclistlength(dds->subnodes);j++) {
+		OCnode* dds1 = (OCnode*)oclistget(dds->subnodes,j);
+		if(strcmp(dxd1->name,dds1->name) == 0) {
+		    ocstat = occorrelater(dds1,dxd1);
+		    if(ocstat != OC_NOERR) {OCTHROWCHK(ocstat); goto fail;}
+		    break;
+		}
+	    }
+	}
+	break;
+    case OC_Dimension:
+    case OC_Primitive:
+	break;
+    default: OCPANIC1("unexpected node type: %d",dds->octype);
+    }
+    /* Correlate the dimensions */
+    if(dds->array.rank > 0) {
+	for(i=0;i<oclistlength(dxd->subnodes);i++) {
+	    OCnode* ddsdim = (OCnode*)oclistget(dds->array.dimensions,i);
+	    OCnode* dxddim = (OCnode*)oclistget(dxd->array.dimensions,i);
+	    ocstat = occorrelater(ddsdim,dxddim);
+	    if(!ocstat) goto fail;	    
+	}	
+    }
+
+fail:
+    return OCTHROW(ocstat);
+
+}
+
+OCerror
+occorrelate(OCnode* dds, OCnode* dxd)
+{
+    if(dds == NULL || dxd == NULL) return OC_EINVAL;
+    ocuncorrelate(dds);
+    return occorrelater(dds,dxd);
+}
+
+/*
+Mark cacheable those primitive String/URL typed nodes
+that are contained only in structures with rank > 0.
+*/
+void
+ocmarkcacheable(OCstate* state, OCnode* ddsroot)
+{
+    int i,j;
+#ifdef OCIGNORE
+    int ok;
+#endif
+    OClist* treenodes = ddsroot->tree->nodes;
+    OClist* path = oclistnew();
+    for(i=0;i<oclistlength(treenodes);i++) {
+        OCnode* node = (OCnode*)oclistget(treenodes,i);
+	if(node->octype != OC_Primitive) continue;
+	if(node->etype != OC_String && node->etype != OC_URL) continue;
+	/* collect node path */
+        oclistclear(path);
+        occollectpathtonode(node,path);	
+#ifdef OCIGNORE
+        ok = 1;
+#endif
+	for(j=1;j<oclistlength(path)-1;j++) {/* skip top level dataset and node itself*/
+            OCnode* pathnode = (OCnode*)oclistget(path,j);
+	    if(pathnode->octype != OC_Structure
+		|| pathnode->array.rank > 0) {
+#ifdef OCIGNORE
+	    ok=0;
+#endif
+	    break;
+	    }
+	}	
+#ifdef OCIGNORE
+	if(ok) {
+   	    node->cache.cacheable = 1;
+	    node->cache.valid = 0;
+	}
+#endif
+    }
+    oclistfree(path);
+}
+
+
+/*
+Fill in the OCnode.skip fields
+*/
+OCerror
+occomputeskipdata(OCstate* state, OCnode* ddsroot)
+{
+    OCerror stat = OC_NOERR;
+    OCASSERT(ddsroot->octype == OC_Dataset);
+    stat = occomputeskipdatar(state,ddsroot,0);    
+    return stat;
+}
+
+/* Recursive helper for computeskipdata */
+static OCerror
+occomputeskipdatar(OCstate* state, OCnode* xnode, ocoffset_t offset)
+{
+    OCerror stat = OC_NOERR;
+    int i,nfields;
+    int scalar = 0;
+    ocoffset_t instancesize = 0;
+    ocoffset_t totalsize = 0;
+
+    scalar = (xnode->array.rank == 0 ? 1 : 0);
+
+    /* Set skip count and offset*/
+    if(xnode->octype == OC_Sequence)
+	xnode->skip.count = OCINDETERMINATE;
+    else
+        xnode->skip.count = totaldimsize(xnode);
+
+    xnode->skip.offset = offset; /* possibly overridden below */
+
+    switch (xnode->octype) {
+
+    case OC_Primitive:
+	switch(xnode->etype) {
+	case OC_String: case OC_URL:
+	    instancesize = OCINDETERMINATE;
+	    totalsize = OCINDETERMINATE;
+	    break;
+	case OC_Char: case OC_Byte: case OC_UByte:
+	    if(!scalar) {/*=>packed*/
+		instancesize = octypesize(xnode->etype);
+		totalsize = instancesize * xnode->skip.count;
+		totalsize = RNDUP(totalsize);
+		totalsize += 2*XDRUNIT; /* overhead is double count */
+		break;
+	    }
+	    /* !packed => singleton char object */
+	    /* fall thru */
+	case OC_Int16: case OC_UInt16:
+	case OC_Int32: case OC_UInt32:
+	case OC_Int64:	case OC_UInt64:
+	case OC_Float32: case OC_Float64:
+	    instancesize = octypesize(xnode->etype);
+	    instancesize = RNDUP(instancesize); /* make multiple of XDRUNIT */
+	    totalsize = (instancesize*xnode->skip.count); /* overhead is double count */
+	    if(!scalar)
+		totalsize += 2*XDRUNIT; /* overhead is double count */
+	    break;
+
+	default:
+	    OCPANIC("unexpected etype"); /* better not happen */
+	}
+	break;
+
+    case OC_Sequence:
+	offset = (xnode->skip.offset = OCINDETERMINATE); /* do not know field offsets for arbitrary record */
+    case OC_Dataset:
+    case OC_Grid:    
+    case OC_Structure:
+	/* Compute size of each field and sum */
+	nfields = oclistlength(xnode->subnodes);
+	instancesize = 0; /* of structure as a whole */
+	for(i=0;i<nfields;i++) {
+	    OCnode* subnode = (OCnode*)oclistget(xnode->subnodes,i);
+	    ocoffset_t fieldsize;
+	    if(offset == OCINDETERMINATE || instancesize == OCINDETERMINATE)
+	        stat = occomputeskipdatar(state,subnode,OCINDETERMINATE);
+	    else 
+                stat = occomputeskipdatar(state,subnode,offset+instancesize);
+	    if(stat != OC_NOERR) goto done;
+	    fieldsize = subnode->skip.totalsize;
+	    if(instancesize == OCINDETERMINATE || fieldsize == OCINDETERMINATE)
+		instancesize = OCINDETERMINATE;
+	    else
+		instancesize += fieldsize; 
+	}
+	if(instancesize != OCINDETERMINATE) {
+            instancesize = RNDUP(instancesize); /* make multiple of XDRUNIT */
+	    totalsize = (instancesize*xnode->skip.count); /* overhead is single count */
+	    if(!scalar)
+	        totalsize += XDRUNIT; /* overhead is single count */
+        } else {
+	    totalsize = OCINDETERMINATE; 
+	}
+	if(xnode->octype == OC_Sequence) {
+            totalsize = OCINDETERMINATE;
+            offset = OCINDETERMINATE;
+	}
+	break;
+
+    default: OCPANIC("unexpected octype"); /* better not happen */
+    }
+
+    xnode->skip.offset = offset;
+    xnode->skip.instancesize = instancesize;
+    xnode->skip.totalsize = totalsize;
+
+done:
+    return stat;
+}
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/src_netcdf4/ocnode.h
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/src_netcdf4/ocnode.h	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/src_netcdf4/ocnode.h	(revision 1749)
@@ -0,0 +1,81 @@
+/* Copyright 2009, UCAR/Unidata and OPeNDAP, Inc.
+   See the COPYRIGHT file for more information. */
+
+#ifndef OCNODE_H
+#define OCNODE_H
+
+/*! Specifies the Diminfo. */
+/* Track info purely about declared dimensions.
+   More information is included in the Dimdata structure (dim.h)
+*/
+typedef struct OCdiminfo {
+    struct OCnode* array;   /* defining array node (if known)*/
+    unsigned int arrayindex;/* rank position ofthis dimension in the array*/
+    ocindex_t declsize;	    /* from DDS*/
+} OCdiminfo;
+
+/*! Specifies the Arrayinfo.*/
+typedef struct OCarrayinfo {
+    /* The complete set of dimension info applicable to this node*/
+    OClist*  dimensions;
+    /* convenience (because they are computed so often*/
+    unsigned int rank; /* == |dimensions|*/
+} OCarrayinfo;
+
+/*! Specifies Attribute info */
+typedef struct OCattribute {
+    char*   name;
+    OCtype etype; /* type of the attribute */
+    size_t  nvalues;
+    char**  values;  /* |values| = nvalues*sizeof(char**)*/
+} OCattribute;
+
+/*! Specifies the Attinfo.*/
+/* This is the form as it comes out of the DAS parser*/
+typedef struct OCattinfo {
+    int isglobal;   /* is this supposed to be a global attribute set?*/
+    OClist* values; /* oclist<char*>*/
+} OCattinfo;
+
+/*! Specifies the OCnode. */
+typedef struct OCnode {
+    unsigned int    magic;
+    OCtype	    octype;
+    OCtype          etype; /* essentially the dap type from the dds*/
+    char*           name;
+    char*           fullname;
+    struct OCnode*  container; /* this node is subnode of container */
+    struct OCnode*  root;      /* root node of tree containing this node */
+    struct OCtree*  tree;      /* !NULL iff this is a root node */
+    struct OCnode*  datadds;   /* correlated datadds node, if any */
+    OCdiminfo       dim;       /* octype == OC_Dimension*/
+    OCarrayinfo     array;     /* octype == {OC_Structure, OC_Primitive}*/
+    OCattinfo       att;       /* octype == OC_Attribute */
+    /* primary edge info*/
+    OClist* subnodes; /*oclist<OCnode*>*/
+    /*int     attributed;*/ /* 1 if merge was done*/
+    OClist* attributes; /* oclist<OCattribute*>*/
+    struct OCSKIP {/* Support fast skipping ; in following, 0 => undefined */
+	ocindex_t count;        /* no. instances (== dimension cross product); may be indeterminate*/
+	ocoffset_t instancesize;/*size of single instance; may be indeterminate*/
+	ocoffset_t totalsize;   /* usually: count*instancesize + overhead; may be indeterminate */
+	ocoffset_t offset;      /* mostly for debugging */
+    } skip;
+#ifdef OCIGNORE
+    struct {/* do simple index cache */
+	int cacheable; /* is this object cacheable? */
+	int valid;   /* is this cache valid */
+	ocindex_t index; /* last index */
+	ocoffset_t offset; /* position of the last indexed instance */	
+    } cache;
+#endif
+} OCnode;
+
+#if SIZEOF_SIZE_T == 4
+#define OCINDETERMINATE  ((size_t)0xffffffff)
+#endif
+#if SIZEOF_SIZE_T == 8
+#define OCINDETERMINATE  ((size_t)0xffffffffffffffff)
+#endif
+
+#endif /*OCNODE_H*/
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/src_netcdf4/ocrc.c
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/src_netcdf4/ocrc.c	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/src_netcdf4/ocrc.c	(revision 1749)
@@ -0,0 +1,548 @@
+/* Copyright 2009, UCAR/Unidata and OPeNDAP, Inc.
+   See the COPYRIGHT file for more information. */
+
+#include "config.h"
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+
+#include "ocinternal.h"
+#include "ocdebug.h"
+#include "ocdata.h"
+#include "occontent.h"
+#include "oclog.h"
+
+#include "ocrc.h"
+
+#define RTAG ']'
+#define LTAG '['
+
+#define TRIMCHARS " \t\r\n"
+
+#define TRIM(x) rctrimright(rctrimleft((x),TRIMCHARS),TRIMCHARS)
+
+#define HTTPPREFIXDEPRECATED "CURL."
+#define HTTPPREFIX           "HTTP."
+
+/* the .dodsrc triple store */
+struct OCTriplestore* ocdodsrc = NULL;
+
+static int parseproxy(OCstate* state, char* v);
+static int rcreadline(FILE* f, char* more, int morelen);
+static char* rctrimright(char* more, char* trimchars);
+static char* rctrimleft(char* more, char* trimchars);
+
+static void ocdodsrcdump(char* msg, struct OCTriple*, int ntriples);
+
+static char* curllookup(char* suffix,char* url);
+
+/* The Username and password are in the URL if the URL is of the form:
+ * http://<name>:<passwd>@<host>/....
+ */
+int
+occredentials_in_url(const char *url)
+{
+	char *pos = strstr(url, "http://");
+	if (!pos)
+		return 0;
+	pos += 7;
+	if (strchr(pos, '@') && strchr(pos, ':'))
+		return 1;
+
+	return 0;
+}
+
+int
+ocextract_credentials(const char *url, char **name, char **pw, char **result_url)
+{
+	char *pos;
+	char *end;
+	char *middle;
+	int up_len = 0;
+	int mid_len = 0;
+	int midpas_len = 0;
+	int url_len = 0;
+
+	if (strchr(url, '@')) {
+		pos = strstr(url, "http://");
+		if (pos)
+			pos += 7;
+		middle = strchr(pos, ':');
+		mid_len = middle - pos;
+		*name = malloc(sizeof(char) * (mid_len + 1));
+		strncpy(*name, pos, mid_len);
+		(*name)[mid_len] = '\0';
+
+		if (middle)
+			middle += 1;
+
+		end = strchr(middle, '@');
+		midpas_len = end - middle;
+		*pw = malloc(sizeof(char) * (midpas_len + 1));
+		strncpy(*pw, middle, midpas_len);
+		(*pw)[midpas_len] = '\0';
+
+		up_len = end - pos;
+		url_len = strlen(url) - up_len;
+
+		*result_url = malloc(sizeof(char) * (url_len + 1));
+		if (!result_url)
+			return OC_ENOMEM;
+
+		strncpy(*result_url, url, pos - url);
+		strncpy(*result_url + (pos - url), end + 1, url_len - (pos - url));
+
+#if 0
+		fprintf(stderr, "URL without username and password: %s:%d\n", sURL, url_len );
+		fprintf(stderr, "URL username and password: %s:%d\n", sUP, up_len);
+		fprintf(stderr, "URL username: %s:%d\n", sUser, mid_len);
+		fprintf(stderr, "URL password: %s:%d\n", sPassword, midpas_len);
+#endif
+		(*result_url)[url_len] = '\0';
+
+		return OC_NOERR;
+	}
+	else {
+		return OC_EIO;
+	}
+}
+
+static int
+rcreadline(FILE* f, char* more, int morelen)
+{
+    int i = 0;
+    int c = getc(f);
+    if(c < 0) return 0;
+    for(;;) {
+	if(i < morelen)  /* ignore excess characters */
+	    more[i++]=c;
+	c = getc(f);
+	if(c < 0) break; /* eof */
+        if(c == '\n') break; /* eol */
+    }
+    /* null terminate more */
+    more[i] = '\0';
+    return 1;
+}
+
+/* Trim specified characters from front/left */
+static char*
+rctrimleft(char* more, char* trimchars)
+{
+    char* p = more;
+    int c;
+    while((c=*p) != '\0') {if(strchr(trimchars,c) != NULL) p++; else break;}
+    return p;
+}
+
+/* Trim specified characters from end/right */
+static char*
+rctrimright(char* more, char* trimchars)
+{
+    int len = strlen(more);
+    char* p = more + (len - 1);
+    while(p != more) {if(strchr(trimchars,*p) != NULL) p--; else break;}
+    /* null terminate */
+    p[1] = '\0';
+    return more;
+}
+
+static int
+parseproxy(OCstate* state, char* v)
+{
+    char *host_pos = NULL;
+    char *port_pos = NULL;
+
+    if(strlen(v) == 0) return OC_NOERR; /* nothing there*/
+    if (occredentials_in_url(v)) {
+        char *result_url = NULL;
+        ocextract_credentials(v, &state->creds.username,
+                            &state->creds.password,
+                            &result_url);
+        v = result_url;
+    }
+    /* allocating a bit more than likely needed ... */
+    host_pos = strstr(v, "http://");
+    if (host_pos)
+        host_pos += strlen("http://");
+    else
+	host_pos = v;
+    port_pos = strchr(host_pos, ':');
+    if (port_pos) {
+        int host_len;
+        char *port_sep = port_pos;
+        port_pos++;
+        *port_sep = '\0';
+        host_len = strlen(host_pos);
+        state->proxy.host = malloc(sizeof(char) * host_len + 1);
+        if (!state->proxy.host)
+            return OC_ENOMEM;
+
+        strncpy(state->proxy.host, host_pos, host_len);
+        state->proxy.host[host_len + 1] = '\0';
+
+        state->proxy.port = atoi(port_pos);
+    } else {
+        int host_len = strlen(host_pos);
+        state->proxy.host = malloc(sizeof(char) * host_len + 1);
+        if (!state->proxy.host)
+            return OC_ENOMEM;
+
+        strncpy(state->proxy.host, host_pos, host_len);
+        state->proxy.host[host_len + 1] = '\0';
+
+        state->proxy.port = 80;
+    }
+#if 0
+    state->proxy.host[v_len] = '\0';
+    state->proxy.port = atoi(v);
+    s_len = strlen(v);
+    state->proxy.user = malloc(sizeof(char) * s_len + 1);
+    if (!state->proxy.user)
+        return OC_ENOMEM;
+     strncpy(state->proxy.user, v, s_len);
+     state->proxy.user[s_len] = '\0';
+     p_len = strlen(v);
+     state->proxy.password = malloc(sizeof(char) * p_len + 1);
+     if (!state->proxy.password)
+         return OC_ENOMEM;
+     strncpy(state->proxy.password, v, p_len);
+     state->proxy.password[p_len] = '\0';
+#endif /*0*/
+     if (ocdebug > 1) {
+         oc_log(LOGNOTE,"host name: %s", state->proxy.host);
+         oc_log(LOGNOTE,"user name: %s", state->creds.username);
+#ifdef INSECURE
+         oc_log(LOGNOTE,"password: %s", state->creds.password);
+#endif
+         oc_log(LOGNOTE,"port number: %d", state->proxy.port);
+    }
+    if(v) free(v);
+    return OC_NOERR;
+}
+
+/* insertion sort the triplestore based on url */
+static void
+sorttriplestore(void)
+{
+    int i, nsorted;
+    struct OCTriple* sorted = NULL;
+
+    if(ocdodsrc->ntriples <= 1) return; /* nothing to sort */
+   if(ocdebug > 2)
+        ocdodsrcdump("initial:",ocdodsrc->triples,ocdodsrc->ntriples);
+
+    sorted = (struct OCTriple*)malloc(sizeof(struct OCTriple)*ocdodsrc->ntriples);
+    if(sorted == NULL) {
+        oc_log(LOGERR,"sorttriplestore: out of memory");
+        return;
+    }
+
+    nsorted = 0;
+    while(nsorted < ocdodsrc->ntriples) {
+	int largest;
+	/* locate first non killed entry */
+	for(largest=0;largest<ocdodsrc->ntriples;largest++) {
+            if(ocdodsrc->triples[largest].key[0] != '\0') break;
+	}
+        OCASSERT(ocdodsrc->triples[largest].key[0] != '\0');
+	for(i=0;i<ocdodsrc->ntriples;i++) {
+	    if(ocdodsrc->triples[i].key[0] != '\0') { /* avoid empty slots */
+	        int lexorder = strcmp(ocdodsrc->triples[i].url,ocdodsrc->triples[largest].url);
+   	        int leni = strlen(ocdodsrc->triples[i].url);
+ 	        int lenlarge = strlen(ocdodsrc->triples[largest].url);
+	        /* this defines the ordering */
+	        if(leni == 0 && lenlarge == 0) continue; /* if no urls, then leave in order */
+	        if(leni != 0 && lenlarge == 0) largest = i;
+	        else if(lexorder > 0) largest = i;
+	    }
+	}
+	/* Move the largest entry */
+	OCASSERT(ocdodsrc->triples[largest].key[0] != 0);
+	sorted[nsorted] = ocdodsrc->triples[largest];
+	ocdodsrc->triples[largest].key[0] = '\0'; /* kill entry */
+	nsorted++;
+      if(ocdebug > 2)
+            ocdodsrcdump("pass:",sorted,nsorted);
+    }    
+
+    memcpy((void*)ocdodsrc->triples,(void*)sorted,sizeof(struct OCTriple)*nsorted);
+    free(sorted);
+
+    if(ocdebug > 0)
+	ocdodsrcdump("final .dodsrc order:",ocdodsrc->triples,ocdodsrc->ntriples);
+}
+
+/* Create a triple store from a file */
+int
+ocdodsrc_read(char* basename, char* path)
+{
+    char line0[MAXRCLINESIZE];
+    FILE *in_file = NULL;
+    int linecount = 0;
+
+    if(ocdodsrc == NULL) {
+        ocdodsrc = (struct OCTriplestore*)malloc(sizeof(struct OCTriplestore));
+        if(ocdodsrc == NULL) {
+	    oc_log(LOGERR,"ocdodsrc_read: out of memory");
+	    return 0;
+	}
+    }
+    ocdodsrc->ntriples = 0;
+
+    in_file = fopen(path, "r"); /* Open the file to read it */
+    if (in_file == NULL) {
+	oc_log(LOGERR, "Could not open configuration file: %s",basename);
+	return OC_EPERM;
+    }
+
+    for(;;) {
+	char *line,*key,*value;
+        if(!rcreadline(in_file,line0,sizeof(line0))) break;
+	linecount++;
+	if(linecount >= MAXRCLINES) {
+	    oc_log(LOGERR, ".dodsrc has too many lines");
+	    return 0;
+	}	    	
+	line = line0;
+	/* check for comment */
+        if (line[0] == '#') continue;
+	/* trim leading blanks */
+	line = rctrimleft(line,TRIMCHARS);
+	if(strlen(line) >= MAXRCLINESIZE) {
+	    oc_log(LOGERR, "%s line too long: %s",basename,line0);
+	    return 0;
+	}	    	
+        /* parse the line */
+	ocdodsrc->triples[ocdodsrc->ntriples].url[0] = '\0'; /*assume no url*/
+	if(line[0] == LTAG) {
+	    char* url = ++line;
+	    char* rtag = strchr(line,RTAG);
+	    if(rtag == NULL) {
+		oc_log(LOGERR, "Malformed [url] in %s entry: %s",basename,line);
+		continue;
+	    }	    
+	    line = rtag + 1;
+	    *rtag = '\0';
+	    /* trim again */
+   	    line = rctrimleft(line,TRIMCHARS);
+	    /* save the url */
+	    strcpy(ocdodsrc->triples[ocdodsrc->ntriples].url,TRIM(url));
+	}
+	if(strlen(line)==0) continue; /* empty line */
+	/* split off key and value */
+	key=line;
+	value = strchr(line, '=');
+	if(value == NULL) {
+	    /* add fake '=1' */
+	    if(strlen(line) + strlen("=1") >= MAXRCLINESIZE) {
+		oc_log(LOGERR, "%s entry too long: %s",basename,line);
+		continue;
+	    }
+	    strcat(line,"=1");
+	    value = strchr(line,'=');
+	}
+        *value = '\0';
+	value++;
+	strcpy(ocdodsrc->triples[ocdodsrc->ntriples].key,TRIM(key));
+	strcpy(ocdodsrc->triples[ocdodsrc->ntriples].value,TRIM(value));
+	ocdodsrc->ntriples++;
+    }
+    fclose(in_file);
+    sorttriplestore();
+    return 1;
+}
+
+
+int
+ocdodsrc_process(OCstate* state)
+{
+    int stat = 0;
+    char* value;
+    char* url = ocuribuild(state->uri,NULL,NULL,OCURIENCODE);
+    if(ocdodsrc == NULL) goto done;
+    value = curllookup("DEFLATE",url);
+    if(value != NULL) {
+        if(atoi(value)) state->curlflags.compress = 1;
+        if(ocdebug > 0)
+            oc_log(LOGNOTE,"Compression: %ld", state->curlflags.compress);
+    }
+    if((value = curllookup("VERBOSE",url)) != NULL) {
+        if(atoi(value)) state->curlflags.verbose = 1;
+        if(ocdebug > 0)
+            oc_log(LOGNOTE,"curl.verbose: %ld", state->curlflags.verbose);
+    }
+    if((value = curllookup("TIMEOUT",url)) != NULL) {
+        if(atoi(value)) state->curlflags.timeout = atoi(value);
+        if(ocdebug > 0)
+            oc_log(LOGNOTE,"curl.timeout: %ld", state->curlflags.timeout);
+    }
+
+    if((value = curllookup("COOKIEFILE",url)) != NULL) {
+        state->curlflags.cookiefile = strdup(TRIM(value));
+        if(!state->curlflags.cookiefile) {stat = OC_ENOMEM; goto done;}
+        if(ocdebug > 0)
+            oc_log(LOGNOTE,"COOKIEFILE: %s", state->curlflags.cookiefile);
+    }
+    if((value = curllookup("COOKIEJAR",url))
+       || (value = curllookup("COOKIE_JAR",url))) {
+        state->curlflags.cookiejar = strdup(TRIM(value));
+        if(!state->curlflags.cookiejar) {stat = OC_ENOMEM; goto done;}
+        if(ocdebug > 0)
+            oc_log(LOGNOTE,"COOKIEJAR: %s", state->curlflags.cookiejar);
+    }
+
+    /* Some servers (e.g. thredds) appear to require a place
+       to put cookies in order for some security functions to work
+    */
+    if(state->curlflags.cookiejar == NULL
+       && state->curlflags.cookiefile == NULL) {
+	state->curlflags.cookiefile = strdup("");
+    }
+
+    if((value = curllookup("PROXY_SERVER",url)) != NULL) {
+        stat = parseproxy(state,TRIM(value));
+        if(stat != OC_NOERR) goto done;
+    }
+
+    if((value = curllookup("SSL.VALIDATE",url)) != NULL) {
+        if(atoi(value)) state->ssl.validate = 1;
+        if(ocdebug > 0)
+            oc_log(LOGNOTE,"CURL.SSL.VALIDATE: %ld", state->ssl.validate);
+    }
+
+    if((value = curllookup("SSL.CERTIFICATE",url)) != NULL) {
+        state->ssl.certificate = strdup(TRIM(value));
+        if(!state->ssl.certificate) {stat = OC_ENOMEM; goto done;}
+        if(ocdebug > 0)
+            oc_log(LOGNOTE,"CREDENTIALS.SSL.CERTIFICATE: %s", state->ssl.certificate);
+    }
+
+    if((value = curllookup("SSL.KEY",url)) != NULL) {
+        state->ssl.key = strdup(TRIM(value));
+        if(!state->ssl.key) {stat = OC_ENOMEM; goto done;}
+        if(ocdebug > 0)
+            oc_log(LOGNOTE,"CREDENTIALS.SSL.KEY: %s", state->ssl.key);
+    }
+
+    if((value = curllookup("SSL.KEYPASSWORD",url)) != NULL) {
+        state->ssl.keypasswd = strdup(TRIM(value));
+        if(!state->ssl.keypasswd) {stat = OC_ENOMEM; goto done;}
+#ifdef INSECURE
+        if(ocdebug > 0)
+            oc_log(LOGNOTE,"CREDENTIALS.SSL.KEYPASSWORD: %s", state->ssl.keypasswd);
+#endif
+    }
+
+    if((value = curllookup("SSL.CAINFO",url)) != NULL) {
+        state->ssl.cainfo = strdup(TRIM(value));
+        if(!state->ssl.cainfo) {stat = OC_ENOMEM; goto done;}
+        if(ocdebug > 0)
+            oc_log(LOGNOTE,"SSL.CAINFO: %s", state->ssl.cainfo);
+    }
+
+    if((value = curllookup("SSL.CAPATH",url)) != NULL) {
+        state->ssl.capath = strdup(TRIM(value));
+        if(!state->ssl.capath) {stat = OC_ENOMEM; goto done;}
+        if(ocdebug > 0)
+            oc_log(LOGNOTE,"SSL.CAPATH: %s", state->ssl.capath);
+    }
+
+    if((value = curllookup("SSL.VERIFYPEER",url)) != NULL) {
+	char* s = strdup(TRIM(value));
+	int tf = 0;
+	if(s == NULL || strcmp(s,"0")==0 || strcasecmp(s,"false")==0)
+	    tf = 0;
+	else if(strcmp(s,"1")==0 || strcasecmp(s,"true")==0)
+	    tf = 1;
+	else
+	    tf = 1; /* default if not null */
+        state->ssl.verifypeer = tf;
+        if(ocdebug > 0)
+            oc_log(LOGNOTE,"SSL.VERIFYPEER: %d", state->ssl.verifypeer);
+    }
+
+    if((value = curllookup("CREDENTIALS.USER",url)) != NULL) {
+        state->creds.username = strdup(TRIM(value));
+        if(!state->creds.username) {stat = OC_ENOMEM; goto done;}
+        if(ocdebug > 0)
+            oc_log(LOGNOTE,"CREDENTIALS.USER: %s", state->creds.username);
+    }
+
+    if((value = curllookup("CREDENTIALS.PASSWORD",url)) != NULL) {
+        state->creds.password = strdup(TRIM(value));
+        if(!state->creds.password) {stat = OC_ENOMEM; goto done;}
+    }
+    /* else ignore */    
+
+done:
+    if(url != NULL) free(url);
+    return stat;
+}
+    
+char*
+ocdodsrc_lookup(char* key, char* url)
+{
+    int i,found;
+    struct OCTriple* triple = ocdodsrc->triples;
+    if(key == NULL || ocdodsrc == NULL) return NULL;
+    if(url == NULL) url = "";
+    /* Assume that the triple store has been properly sorted */
+    for(found=0,i=0;i<ocdodsrc->ntriples;i++,triple++) {
+	int triplelen = strlen(triple->url);
+	int t;
+	if(strcmp(key,triple->key) != 0) continue; /* keys do not match */
+	/* If the triple entry has no url, then use it (because we have checked all other cases)*/
+	if(triplelen == 0) {found=1;break;}
+	/* do url prefix comparison */
+	t = ocstrncmp(url,triple->url,triplelen);
+	if(t ==  0) {found=1; break;}
+    }
+    if(ocdebug > 2)
+    {
+	if(found) {
+	    fprintf(stderr,"lookup %s: [%s]%s = %s\n",url,triple->url,triple->key,triple->value);
+	}
+    }    
+    return (found ? triple->value : NULL);
+}
+
+
+static void
+ocdodsrcdump(char* msg, struct OCTriple* triples, int ntriples)
+{
+    int i;
+    if(msg != NULL) fprintf(stderr,"%s\n",msg);
+    if(ocdodsrc == NULL) {
+	fprintf(stderr,"<EMPTY>\n");
+	return;
+    }
+    if(triples == NULL) triples= ocdodsrc->triples;
+    if(ntriples < 0 ) ntriples= ocdodsrc->ntriples;
+    for(i=0;i<ntriples;i++) {
+        fprintf(stderr,"\t%s\t%s\t%s\n",
+		(strlen(triples[i].url)==0?"--":triples[i].url),
+		triples[i].key,
+		triples[i].value);
+    }
+}
+
+/* Isolate the "CURL." prefix to allow changing to something else */
+static char*
+curllookup(char* suffix, char* url)
+{
+    char key[2048];
+    char* value = NULL;
+    strcpy(key,HTTPPREFIX);
+    strcat(key,suffix);
+    value = ocdodsrc_lookup(key,url);
+    if(value == NULL) {
+	strcpy(key,HTTPPREFIXDEPRECATED);
+	strcat(key,suffix);
+        value = ocdodsrc_lookup(key,url);
+    }
+    return value;
+}
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/src_netcdf4/ocrc.h
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/src_netcdf4/ocrc.h	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/src_netcdf4/ocrc.h	(revision 1749)
@@ -0,0 +1,36 @@
+/*
+ * rc.h
+ *
+ *  Created on: Mar 5, 2009
+ *      Author: rikki
+ */
+
+#ifndef RC_H_
+#define RC_H_
+
+/* Max .dodsrc line size */
+#define MAXRCLINESIZE 2048
+
+/* Max number of triples in a .dodsrc */
+#define MAXRCLINES 2048
+
+/* Create a triple store for (url,key,value) and sorted by url */
+
+/* Actual triple store */
+extern struct OCTriplestore {
+    int ntriples;
+    struct OCTriple {
+        char url[MAXRCLINESIZE];
+        char key[MAXRCLINESIZE];
+        char value[MAXRCLINESIZE];
+   } triples[MAXRCLINES];
+} *ocdodsrc;
+
+extern int ocdodsrc_read(char* basename,char *in_file_name);
+extern int ocdodsrc_process(OCstate* state);
+extern char* ocdodsrc_lookup(char* key, char* url);
+
+extern int occredentials_in_url(const char *url);
+extern int ocextract_credentials(const char *url, char **name, char **pw, char **result_url);
+
+#endif /* RC_H_ */
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/src_netcdf4/ocread.c
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/src_netcdf4/ocread.c	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/src_netcdf4/ocread.c	(revision 1749)
@@ -0,0 +1,202 @@
+/* Copyright 2009, UCAR/Unidata and OPeNDAP, Inc.
+   See the COPYRIGHT file for more information. */
+
+#include "config.h"
+#include <sys/stat.h>
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+#include <fcntl.h>
+#include <sys/types.h>
+#ifdef HAVE_NETINET_IN_H
+#include <netinet/in.h>
+#endif
+#include "ocinternal.h"
+#include "ocdebug.h"
+#include "ochttp.h"
+#include "ocread.h"
+#include "ocrc.h"
+#include "occurlfunctions.h"
+
+extern int oc_curl_file_supported;
+
+/*Forward*/
+static int readpacket(CURL*, OCURI*, OCbytes*, OCdxd, long*);
+static int readfile(char* path, char* suffix, OCbytes* packet);
+static int readfiletofile(char* path, char* suffix, FILE* stream, unsigned long*);
+
+int
+readDDS(OCstate* state, OCtree* tree)
+{
+    int stat = OC_NOERR;
+    long lastmodified = -1;
+
+
+    ocurisetconstraints(state->uri,tree->constraint);
+
+ocset_user_password(state);
+
+    stat = readpacket(state->curl,state->uri,state->packet,OCDDS,
+			&lastmodified);
+    if(stat == OC_NOERR) state->ddslastmodified = lastmodified;
+
+    return stat;
+}
+
+int
+readDAS(OCstate* state, OCtree* tree)
+{
+    int stat = OC_NOERR;
+
+    ocurisetconstraints(state->uri,tree->constraint);
+    stat = readpacket(state->curl,state->uri,state->packet,OCDAS,NULL);
+
+    return stat;
+}
+
+int
+readversion(CURL* curl, OCURI* url, OCbytes* packet)
+{
+   return readpacket(curl,url,packet,OCVER,NULL);
+}
+
+static
+char* ocdxdextension[] ={
+".dds",  /*OCDDS*/
+".das",  /*OCDAS*/
+".dods", /*OCDATADDS*/
+".vers", /*OCVERS*/
+};
+
+static int
+readpacket(CURL* curl,OCURI* url,OCbytes* packet,OCdxd dxd,long* lastmodified)
+{
+   int stat = OC_NOERR;
+   int fileprotocol = 0;
+   char* suffix = ocdxdextension[dxd];
+   char* fetchurl = NULL;
+
+   fileprotocol = (strcmp(url->protocol,"file")==0);
+
+   if(fileprotocol && !oc_curl_file_supported) {
+        /* Short circuit file://... urls*/
+	/* We do this because the test code always needs to read files*/
+	fetchurl = ocuribuild(url,NULL,NULL,0);
+	stat = readfile(fetchurl,suffix,packet);
+    } else {
+	int flags = 0;
+	if(!fileprotocol) flags |= OCURICONSTRAINTS;
+	flags |= OCURIENCODE;
+        fetchurl = ocuribuild(url,NULL,suffix,flags);
+	MEMCHECK(fetchurl,OC_ENOMEM);
+	if(ocdebug > 0)
+            {fprintf(stderr,"fetch url=%s\n",fetchurl); fflush(stderr);}
+        stat = ocfetchurl(curl,fetchurl,packet,lastmodified);
+	if(ocdebug > 0)
+            {fprintf(stderr,"fetch complete\n"); fflush(stderr);}
+    }
+    free(fetchurl);
+    return OCTHROW(stat);
+}
+
+int
+readDATADDS(OCstate* state, OCtree* tree, OCflags flags)
+{
+    int stat = OC_NOERR;
+    long lastmod = -1;
+
+    if((flags & OCONDISK) == 0) {
+        ocurisetconstraints(state->uri,tree->constraint);
+        stat = readpacket(state->curl,state->uri,state->packet,OCDATADDS,&lastmod);
+        if(stat == OC_NOERR)
+            state->datalastmodified = lastmod;
+        tree->data.datasize = ocbyteslength(state->packet);
+    } else {
+        OCURI* url = state->uri;
+        int fileprotocol = 0;
+        char* readurl = NULL;
+
+        fileprotocol = (strcmp(url->protocol,"file")==0);
+
+        if(fileprotocol && !oc_curl_file_supported) {
+            readurl = ocuribuild(url,NULL,NULL,0);
+            stat = readfiletofile(readurl, ".dods", tree->data.file, &tree->data.datasize);
+        } else {
+            int flags = 0;
+            if(!fileprotocol) flags |= OCURICONSTRAINTS;
+            flags |= OCURIENCODE;
+            ocurisetconstraints(url,tree->constraint);
+            readurl = ocuribuild(url,NULL,".dods",flags);
+            MEMCHECK(readurl,OC_ENOMEM);
+            if (ocdebug > 0) 
+                {fprintf(stderr, "fetch url=%s\n", readurl);fflush(stderr);}
+            stat = ocfetchurl_file(state->curl, readurl, tree->data.file,
+                                   &tree->data.datasize, &lastmod);
+            if(stat == OC_NOERR)
+                state->datalastmodified = lastmod;
+            if (ocdebug > 0) 
+                {fprintf(stderr,"fetch complete\n"); fflush(stderr);}
+        }
+        free(readurl);
+    }
+    return OCTHROW(stat);
+}
+
+static int
+readfiletofile(char* path, char* suffix, FILE* stream, unsigned long* sizep)
+{
+    int stat = OC_NOERR;
+    OCbytes* packet = ocbytesnew();
+    size_t len;
+    /* check for leading file:/// */
+    if(ocstrncmp(path,"file:///",8)==0) path += 7; /* assume absolute path*/
+    stat = readfile(path,suffix,packet);
+    if(stat != OC_NOERR) goto unwind;
+    len = oclistlength(packet);
+    if(stat == OC_NOERR) {
+	size_t written;
+        fseek(stream,0,SEEK_SET);
+	written = fwrite(ocbytescontents(packet),1,len,stream);
+	if(written != len) stat = OC_EIO;
+    }
+    if(sizep != NULL) *sizep = len;
+unwind:
+    ocbytesfree(packet);
+    return OCTHROW(stat);
+}
+
+static int
+readfile(char* path, char* suffix, OCbytes* packet)
+{
+    int stat = OC_NOERR;
+    char buf[1024];
+    char filename[1024];
+    int count,size,fd;
+    /* check for leading file:/// */
+    if(ocstrncmp(path,"file://",7)==0) path += 7; /* assume absolute path*/
+    strcpy(filename,path);
+    if(suffix != NULL) strcat(filename,suffix);
+    fd = open(filename,O_RDONLY);
+    if(fd < 0) {
+	oc_log(LOGERR,"open failed:%s",filename);
+	return OCTHROW(OC_EOPEN);
+    }
+    size=0;
+    stat = OC_NOERR;
+    for(;;) {
+	count = read(fd,buf,sizeof(buf));
+	if(count <= 0)
+	    break;
+	else if(count <  0) {
+	    stat = OC_EIO;
+	    oc_log(LOGERR,"read failed: %s",filename);
+	    break;
+	}
+	ocbytesappendn(packet,buf,count);
+	size += count;
+    }
+    close(fd);
+    return OCTHROW(stat);
+}
+
+
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/src_netcdf4/ocread.h
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/src_netcdf4/ocread.h	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/src_netcdf4/ocread.h	(revision 1749)
@@ -0,0 +1,15 @@
+/* Copyright 2009, UCAR/Unidata and OPeNDAP, Inc.
+   See the COPYRIGHT file for more information. */
+
+#ifndef READ_H
+#define READ_H
+
+
+extern int readDDS(OCstate*, OCtree*);
+extern int readDAS(OCstate*, OCtree*);
+
+extern int readDATADDS(OCstate*, OCtree*, int inmemory);
+
+extern int readversion(CURL*, OCURI*, OCbytes*);
+
+#endif /*READ_H*/
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/src_netcdf4/ocuri.c
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/src_netcdf4/ocuri.c	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/src_netcdf4/ocuri.c	(revision 1749)
@@ -0,0 +1,737 @@
+/*********************************************************************
+ *   Copyright 2010, UCAR/Unidata
+ *   See netcdf/COPYRIGHT file for copying and redistribution conditions.
+ *   $Header$
+ *********************************************************************/
+
+#include "config.h"
+
+#include <stdlib.h>
+#include <string.h>
+#include <stdio.h>
+
+#include "oc.h"
+#include "ocuri.h"
+
+#define OCURIDEBUG
+
+#define LBRACKET '['
+#define RBRACKET ']'
+
+#ifndef FIX
+#define FIX(s) ((s)==NULL?"":(s))
+#endif
+
+#ifndef NILLEN
+#define NILLEN(s) ((s)==NULL?0:strlen(s))
+#endif
+
+#ifdef HAVE_STRDUP
+#  ifndef nulldup
+#  define nulldup(s) ((s)==NULL?NULL:strdup(s))
+#  endif
+#endif
+
+#ifndef HAVE_STRDUP
+static char* nulldup(char* s)
+{
+    char* dup = NULL;
+    if(s != NULL) {
+	dup = (char*)malloc(strlen(s)+1);
+	if(dup != NULL)
+	    strcpy(dup,s);
+    }
+    return dup;
+}
+#endif
+
+#ifdef OCIGNORE
+/* Not all systems have strndup, so provide one*/
+static char*
+ocstrndup(const char* s, size_t len)
+{
+    char* dup;
+    if(s == NULL) return NULL;
+    dup = (char*)ocmalloc(len+1);
+    MEMCHECK(dup,NULL);
+    memcpy((void*)dup,s,len);
+    dup[len] = '\0';
+    return dup;
+}
+#endif
+
+/* Do not trust strncmp */
+static int
+ocuristrncmp(const char* s1, const char* s2, size_t len)
+{
+    const char *p,*q;
+    if(s1 == s2) return 0;
+    if(s1 == NULL) return -1;
+    if(s2 == NULL) return +1;
+    for(p=s1,q=s2;len > 0;p++,q++,len--) {
+	if(*p != *q)
+	    return (*p - *q);	
+	if(*p == 0) return 0; /* *p == *q == 0 */
+    }
+    /* 1st len chars are same */
+    return 0;
+}
+
+static char* legalprotocols[] = {
+"file:",
+"http:",
+"https:",
+"ftp:",
+NULL /* NULL terminate*/
+};
+
+/* Allowable character sets for encode */
+static char* fileallow = 
+"0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ!#$&'()*+,-./:;=?@_~";
+
+static char* queryallow = 
+"0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ!#$&'()*+,-./:;=?@_~";
+
+static void ocparamfree(char** params);
+static int ocfind(char** params, const char* key);
+
+/* Do a simple uri parse: return 0 if fail, 1 otherwise*/
+int
+ocuriparse(const char* uri0, OCURI** ocurip)
+{
+    OCURI* ocuri = NULL;
+    char* uri;
+    char** pp;
+    char* p;
+    char* p1;
+    int c;
+
+    /* accumulate parse points*/
+    char* protocol = NULL;
+    char* params = NULL;
+    char* host = NULL;
+    char* port = NULL;
+    char* constraint = NULL;
+    char* user = NULL;
+    char* pwd = NULL;
+    char* file = NULL;
+
+    if(uri0 == NULL)
+	return OC_EBADURL;
+
+    ocuri = (OCURI*)calloc(1,sizeof(OCURI));
+    if(ocuri == NULL) return 0;
+
+    /* make local copy of uri */
+    uri = nulldup(uri0);
+
+    /* remove all whitespace*/
+    p = uri;
+    p1 = uri;
+    while((c=*p1++)) {if(c != ' ' && c != '\t') *p++ = c;}
+
+    p = uri;
+
+    /* break up the uri string into pieces*/
+
+    /* 1. leading bracketed parameters */
+    if(*p == LBRACKET) {
+	params = p+1;
+	/* find end of the clientparams*/
+        for(;*p;p++) {if(p[0] == RBRACKET && p[1] != LBRACKET) break;}
+	if(*p == 0) goto fail; /* malformed client params*/
+	*p = '\0'; /* leave off the trailing rbracket for now */
+	p++; /* move past the params*/
+    }
+
+    /* verify that the uri starts with an acceptable protocol*/
+    for(pp=legalprotocols;*pp;pp++) {
+        if(ocuristrncmp(p,*pp,strlen(*pp))==0) break;
+    }
+    if(*pp == NULL) goto fail; /* illegal protocol*/
+    /* save the protocol */
+    protocol = *pp;
+
+    /* 4. skip protocol */
+    p += strlen(protocol);
+
+    /* 5. skip // */
+    if(*p != '/' && *(p+1) != '/')
+	goto fail;
+    p += 2;
+
+    /* 6. Mark the end of the host section */
+    file = strchr(p,'/');
+    if(file) {
+	*file++ = '\0'; /* warning: we just overwrote the leading / */
+    } else
+        goto fail;
+
+    /* 7. extract any user:pwd */
+    p1 = strchr(p,'@');
+    if(p1) {/* Assume we have user:pwd@ */
+	*p1 = '\0';
+	user = p;
+	pwd = strchr(p,':');
+	if(!pwd) goto fail; /* malformed */
+	*pwd++ = '\0';
+	p = pwd+strlen(pwd)+1;
+    }
+
+    /* 8. extract host and port */
+    host = p;
+    port = strchr(p,':');
+    if(port) {
+	*port++ = '\0';
+    }
+
+    /* 9. Look for '?' */
+    constraint = strchr(file,'?');
+    if(constraint) {
+	*constraint++ = '\0';
+    }
+
+    /* assemble the component pieces*/
+    if(uri0 && strlen(uri0) > 0)
+        ocuri->uri = nulldup(uri0);
+    if(protocol && strlen(protocol) > 0) {
+        ocuri->protocol = nulldup(protocol);
+        /* remove trailing ':' */
+        ocuri->protocol[strlen(protocol)-1] = '\0';
+    }
+    if(user && strlen(user) > 0)
+        ocuri->user = nulldup(user);
+    if(pwd && strlen(pwd) > 0)
+        ocuri->password = nulldup(pwd);
+    if(host && strlen(host) > 0)
+        ocuri->host = nulldup(host);
+    if(port && strlen(port) > 0)
+        ocuri->port = nulldup(port);
+    if(file && strlen(file) > 0) {
+	/* Add back the leading / */
+        ocuri->file = malloc(strlen(file)+2);
+	strcpy(ocuri->file,"/");
+        strcat(ocuri->file,file);
+    }
+    if(constraint && strlen(constraint) > 0)
+        ocuri->constraint = nulldup(constraint);
+    ocurisetconstraints(ocuri,constraint);
+    if(params != NULL && strlen(params) > 0) {
+        ocuri->params = (char*)malloc(1+2+strlen(params));
+        strcpy(ocuri->params,"[");
+        strcat(ocuri->params,params);
+        strcat(ocuri->params,"]");
+    }
+
+#ifdef OCXDEBUG
+	{
+        fprintf(stderr,"ocuri:");
+        fprintf(stderr," params=|%s|",FIX(ocuri->params));
+        fprintf(stderr," protocol=|%s|",FIX(ocuri->protocol));
+        fprintf(stderr," host=|%s|",FIX(ocuri->host));
+        fprintf(stderr," port=|%s|",FIX(ocuri->port));
+        fprintf(stderr," file=|%s|",FIX(ocuri->file));
+        fprintf(stderr," constraint=|%s|",FIX(ocuri->constraint));
+        fprintf(stderr,"\n");
+    }
+#endif
+    free(uri);
+    if(ocurip != NULL) *ocurip = ocuri;
+    return 1;
+
+fail:
+    if(ocuri) ocurifree(ocuri);
+    if(uri != NULL) free(uri);
+    return 0;
+}
+
+void
+ocurifree(OCURI* ocuri)
+{
+    if(ocuri == NULL) return;
+    if(ocuri->uri != NULL) {free(ocuri->uri);}
+    if(ocuri->protocol != NULL) {free(ocuri->protocol);}
+    if(ocuri->user != NULL) {free(ocuri->user);}
+    if(ocuri->password != NULL) {free(ocuri->password);}
+    if(ocuri->host != NULL) {free(ocuri->host);}
+    if(ocuri->port != NULL) {free(ocuri->port);}
+    if(ocuri->file != NULL) {free(ocuri->file);}
+    if(ocuri->constraint != NULL) {free(ocuri->constraint);}
+    if(ocuri->projection != NULL) {free(ocuri->projection);}
+    if(ocuri->selection != NULL) {free(ocuri->selection);}
+    if(ocuri->params != NULL) {free(ocuri->params);}
+    if(ocuri->paramlist != NULL) ocparamfree(ocuri->paramlist);
+    free(ocuri);
+}
+
+/* Replace the constraints */
+void
+ocurisetconstraints(OCURI* duri,const char* constraints)
+{
+    char* proj = NULL;
+    char* select = NULL;
+    const char* p;
+
+    if(duri->constraint == NULL) free(duri->constraint);
+    if(duri->projection != NULL) free(duri->projection);
+    if(duri->selection != NULL) free(duri->selection);
+    duri->constraint = NULL;	
+    duri->projection = NULL;	
+    duri->selection = NULL;
+
+    if(constraints == NULL || strlen(constraints)==0) return;
+
+    duri->constraint = nulldup(constraints);
+    if(*duri->constraint == '?')
+	strcpy(duri->constraint,duri->constraint+1);
+
+    p = duri->constraint;
+    proj = (char*) p;
+    select = strchr(proj,'&');
+    if(select != NULL) {
+        size_t plen = (select - proj);
+	if(plen == 0) {
+	    proj = NULL;
+	} else {
+	    proj = (char*)malloc(plen+1);
+	    memcpy((void*)proj,p,plen);
+	    proj[plen] = '\0';
+	}
+	select = nulldup(select);
+    } else {
+	proj = nulldup(proj);
+	select = NULL;
+    }
+    duri->projection = proj;
+    duri->selection = select;
+}
+
+
+/* Construct a complete OC URI without the client params
+   and optionally with the constraints;
+   caller frees returned string.
+   Optionally encode the pieces.
+*/
+
+char*
+ocuribuild(OCURI* duri, const char* prefix, const char* suffix, int flags)
+{
+    size_t len = 0;
+    char* newuri;
+    char* tmpfile;
+    char* tmpsuffix;
+    char* tmpquery;
+
+    int withparams = ((flags&OCURIPARAMS)
+			&& duri->params != NULL);
+    int withuserpwd = ((flags&OCURIUSERPWD)
+	               && duri->user != NULL && duri->password != NULL);
+    int withconstraints = ((flags&OCURICONSTRAINTS)
+	                   && duri->constraint != NULL);
+#ifdef NEWESCAPE
+    int encode = (flags&OCURIENCODE);
+#else
+    int encode = 0;
+#endif
+
+    if(prefix != NULL) len += NILLEN(prefix);
+    if(withparams) {
+	len += NILLEN("[]");
+	len += NILLEN(duri->params);
+    }
+    len += (NILLEN(duri->protocol)+NILLEN("://"));
+    if(withuserpwd) {
+	len += (NILLEN(duri->user)+NILLEN(duri->password)+NILLEN(":@"));
+    }
+    len += (NILLEN(duri->host));
+    if(duri->port != NULL) {
+	len += (NILLEN(":")+NILLEN(duri->port));
+    }
+    
+    tmpfile = duri->file;
+    if(encode)
+	tmpfile = ocuriencode(tmpfile,fileallow);
+    len += (NILLEN(tmpfile));
+
+    if(suffix != NULL) {
+        tmpsuffix = (char*)suffix;
+        if(encode)
+	    tmpsuffix = ocuriencode(tmpsuffix,fileallow);
+        len += (NILLEN(tmpsuffix));
+    }
+
+    if(withconstraints) {
+	tmpquery = duri->constraint;
+        if(encode)
+	    tmpquery = ocuriencode(tmpquery,queryallow);
+        len += (NILLEN("?")+NILLEN(tmpquery));
+    }
+
+    len += 1; /* null terminator */
+    
+    newuri = (char*)malloc(len);
+    if(newuri == NULL) return NULL;
+
+    newuri[0] = '\0';
+    if(prefix != NULL) strcat(newuri,prefix);
+    if(withparams) {
+	strcat(newuri,"[");
+	strcat(newuri,duri->params);
+	strcat(newuri,"]");
+    }
+    if(duri->protocol != NULL)
+	strcat(newuri,duri->protocol);
+    strcat(newuri,"://");
+    if(withuserpwd) {
+        strcat(newuri,duri->user);
+        strcat(newuri,":");
+        strcat(newuri,duri->password);	
+        strcat(newuri,"@");
+    }
+    if(duri->host != NULL) { /* may be null if using file: protocol */
+        strcat(newuri,duri->host);	
+    }
+    if(duri->port != NULL) {
+        strcat(newuri,":");
+        strcat(newuri,duri->port);
+    }
+
+    strcat(newuri,tmpfile);
+    if(suffix != NULL) strcat(newuri,tmpsuffix);
+    if(withconstraints) {
+	strcat(newuri,"?");
+	strcat(newuri,tmpquery);
+    }
+    return newuri;
+}
+
+/**************************************************/
+/* Parameter support */
+
+/*
+Client parameters are assumed to be
+one or more instances of bracketed pairs:
+e.g "[...][...]...".
+The bracket content in turn is assumed to be a
+comma separated list of <name>=<value> pairs.
+e.g. x=y,z=,a=b.
+If the same parameter is specifed more than once,
+then the first occurrence is used; this is so that
+is possible to forcibly override user specified
+parameters by prefixing.
+IMPORTANT: client parameter string is assumed to
+have blanks compress out.
+Returns 1 if parse suceeded, 0 otherwise;
+*/
+
+int
+ocuridecodeparams(OCURI* ocuri)
+{
+    char* cp;
+    char* cq;
+    int c;
+    int i;
+    int nparams;
+    char* params0;
+    char* params;
+    char* params1;
+    char** plist;
+
+    if(ocuri == NULL) return 0;
+    if(ocuri->params == NULL) return 1;
+
+    params0 = ocuri->params;
+
+    /* Pass 1 to replace beginning '[' and ending ']' */
+    if(params0[0] == '[') 
+	params = nulldup(params0+1);
+    else
+	params = nulldup(params0);	
+
+    if(params[strlen(params)-1] == ']')
+	params[strlen(params)-1] = '\0';
+
+    /* Pass 2 to replace "][" pairs with ','*/
+    params1 = nulldup(params);
+    cp=params; cq = params1;
+    while((c=*cp++)) {
+	if(c == RBRACKET && *cp == LBRACKET) {cp++; c = ',';}
+	*cq++ = c;
+    }
+    *cq = '\0';
+    free(params);
+    params = params1;
+
+    /* Pass 3 to break string into pieces and count # of pairs */
+    nparams=0;
+    for(cp=params;(c=*cp);cp++) {
+	if(c == ',') {*cp = '\0'; nparams++;}
+    }
+    nparams++; /* for last one */
+
+    /* plist is an env style list */
+    plist = (char**)calloc(1,sizeof(char*)*(2*nparams+1)); /* +1 for null termination */
+
+    /* Pass 4 to break up each pass into a (name,value) pair*/
+    /* and insert into the param list */
+    /* parameters of the form name name= are converted to name=""*/
+    cp = params;
+    for(i=0;i<nparams;i++) {
+	char* next = cp+strlen(cp)+1; /* save ptr to next pair*/
+	char* vp;
+	/*break up the ith param*/
+	vp = strchr(cp,'=');
+	if(vp != NULL) {*vp = '\0'; vp++;} else {vp = "";}
+	plist[2*i] = nulldup(cp);	
+	plist[2*i+1] = nulldup(vp);
+	cp = next;
+    }
+    plist[2*nparams] = NULL;
+    free(params);
+    if(ocuri->paramlist != NULL)
+	ocparamfree(ocuri->paramlist);
+    ocuri->paramlist = plist;
+    return 1;
+}
+
+const char*
+ocurilookup(OCURI* uri, const char* key)
+{
+    int i;
+    if(uri == NULL || key == NULL || uri->params == NULL) return NULL;
+    if(uri->paramlist == NULL) {
+	i = ocuridecodeparams(uri);
+	if(!i) return 0;
+    }
+    i = ocfind(uri->paramlist,key);
+    if(i >= 0)
+	return uri->paramlist[(2*i)+1];
+    return NULL;
+}
+
+int
+ocurisetparams(OCURI* uri, const char* newparams)
+{
+    if(uri == NULL) return 0;
+    if(uri->paramlist != NULL) ocparamfree(uri->paramlist);
+    uri->paramlist = NULL;
+    if(uri->params != NULL) free(uri->params);
+    uri->params = nulldup(newparams);
+    return 1;
+}
+
+/* Internal version of lookup; returns the paired index of the key */
+static int
+ocfind(char** params, const char* key)
+{
+    int i;
+    char** p;
+    for(i=0,p=params;*p;p+=2,i++) {
+	if(strcmp(key,*p)==0) return i;
+    }
+    return -1;
+}
+
+static void
+ocparamfree(char** params)
+{
+    char** p;
+    if(params == NULL) return;
+    for(p=params;*p;p+=2) {
+	free(*p);
+	if(p[1] != NULL) free(p[1]);
+    }
+    free(params);
+}
+
+#ifdef OCIGNORE
+/*
+Delete the entry.
+return value = 1 => found and deleted;
+               0 => param not found
+*/
+int
+ocparamdelete(char** params, const char* key)
+{
+    int i;
+    char** p;
+    char** q;
+    if(params == NULL || key == NULL) return 0;
+    i = ocfind(params,key);
+    if(i < 0) return 0;
+    p = params+(2*i);
+    for(q=p+2;*q;) {	
+	*p++ = *q++;
+    }
+    *p = NULL;
+    return 1;
+}
+
+static int
+oclength(char** params)
+{
+    int i = 0;
+    if(params != NULL) {
+	while(*params) {params+=2; i++;}
+    }
+    return i;
+}
+
+/*
+Insert new client param (name,value);
+return value = 1 => not already defined
+               0 => param already defined (no change)
+*/
+char**
+ocparaminsert(char** params, const char* key, const char* value)
+{
+    int i;
+    char** newp;
+    size_t len;
+    if(params == NULL || key == NULL) return 0;
+    i = ocfind(params,key);
+    if(i >= 0) return 0;
+    /* not found, append */
+    i = oclength(params);
+    len = sizeof(char*)*((2*i)+1);
+    newp = realloc(params,len+2*sizeof(char*));
+    memcpy(newp,params,len);
+    newp[2*i] = nulldup(key);
+    newp[2*i+1] = (value==NULL?NULL:nulldup(value));
+    return newp;
+}
+
+/*
+Replace new client param (name,value);
+return value = 1 => replacement performed
+               0 => key not found (no change)
+*/
+int
+ocparamreplace(char** params, const char* key, const char* value)
+{
+    int i;
+    if(params == NULL || key == NULL) return 0;
+    i = ocfind(params,key);
+    if(i < 0) return 0;
+    if(params[2*i+1] != NULL) free(params[2*i+1]);
+    params[2*i+1] = nulldup(value);
+    return 1;
+}
+#endif
+
+
+/* Provide % encoders and decoders */
+
+
+static char* hexchars = "0123456789abcdefABCDEF";
+
+static void
+toHex(unsigned int b, char hex[2])
+{
+    hex[0] = hexchars[(b >> 4) & 0xff];
+    hex[1] = hexchars[(b) & 0xff];
+}
+
+
+static unsigned int
+fromHex(int c)
+{
+    if(c >= '0' && c <= '9') return (c - '0');
+    if(c >= 'a' && c <= 'f') return (10 + (c - 'a'));
+    if(c >= 'A' && c <= 'F') return (10 + (c - 'A'));
+    return -1;
+}
+
+
+/* Return a string representing encoding of input; caller must free;
+   watch out: will encode whole string, so watch what you give it.
+   Allowable argument specifies characters that do not need escaping.
+ */
+
+char*
+ocuriencode(char* s, char* allowable)
+{
+    size_t slen;
+    char* encoded;
+    char* inptr;
+    char* outptr;
+
+    if(s == NULL) return NULL;
+
+    slen = strlen(s);
+    encoded = (char*)malloc((3*slen) + 1); /* max possible size */
+
+    for(inptr=s,outptr=encoded;*inptr;) {
+	int c = *inptr++;
+        if(c == ' ') {
+	    *outptr++ = '+';
+        } else {
+            /* search allowable */
+            int c2;
+	    char* a = allowable;
+	    while((c2=*a++)) {
+		if(c == c2) break;
+	    }
+            if(c2) {*outptr++ = c;}
+            else {
+		char hex[2];
+		toHex(c,hex);
+		*outptr++ = '%';
+		*outptr++ = hex[0];
+		*outptr++ = hex[1];
+            }
+        }
+    }
+    *outptr = '\0';
+    return encoded;
+}
+
+/* Return a string representing decoding of input; caller must free;*/
+char*
+ocuridecode(char* s)
+{
+    return ocuridecodeonly(s,NULL);
+}
+
+/* Return a string representing decoding of input only for specified
+   characters;  caller must free
+*/
+char*
+ocuridecodeonly(char* s, char* only)
+{
+    size_t slen;
+    char* decoded;
+    char* outptr;
+    char* inptr;
+    unsigned int c;
+    
+    if (s == NULL) return NULL;
+    if(only == NULL) only = "";
+
+    slen = strlen(s);
+    decoded = (char*)malloc(slen+1); /* Should be max we need */
+
+    outptr = decoded;
+    inptr = s;
+    while((c = *inptr++)) {
+	if(c == '+' && strchr(only,'+') != NULL)
+	    *outptr++ = ' ';
+	else if(c == '%') {
+            /* try to pull two hex more characters */
+	    if(inptr[0] != '\0' && inptr[1] != '\0'
+		&& strchr(hexchars,inptr[0]) != NULL
+		&& strchr(hexchars,inptr[1]) != NULL) {
+		/* test conversion */
+		int xc = (fromHex(inptr[0]) << 4) | (fromHex(inptr[1]));
+		if(strchr(only,xc) != NULL) {
+		    inptr += 2; /* decode it */
+		    c = xc;
+                }
+            }
+        }
+        *outptr++ = c;
+    }
+    *outptr = '\0';
+    return decoded;
+}
+
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/src_netcdf4/ocuri.h
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/src_netcdf4/ocuri.h	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/src_netcdf4/ocuri.h	(revision 1749)
@@ -0,0 +1,52 @@
+/* Copyright 2009, UCAR/Unidata and OPeNDAP, Inc.
+   See the COPYRIGHT file for more information. */
+
+#ifndef OCURI_H
+#define OCURI_H
+
+/*! This is an open structure meaning
+	it is ok to directly access its fields*/
+typedef struct OCURI {
+    char* uri;        /* as passed by the caller */
+    char* protocol;
+    char* user; /* from user:password@ */
+    char* password; /* from user:password@ */
+    char* host;	      /*!< host*/
+    char* port;	      /*!< host */
+    char* file;	      /*!< file */
+    char* constraint; /*!< projection+selection */
+    char* projection; /*!< without leading '?'*/
+    char* selection;  /*!< with leading '&'*/
+    char* params;     /* all params */
+    char** paramlist;    /*!<null terminated list */
+} OCURI;
+
+extern int ocuriparse(const char* s, OCURI** ocuri);
+extern void ocurifree(OCURI* ocuri);
+
+/* Replace the constraints */
+extern void ocurisetconstraints(OCURI*,const char* constraints);
+
+/* Construct a complete OC URI; caller frees returned string */
+
+/* Define flags to control what is included */
+#define OCURICONSTRAINTS 1
+#define OCURIUSERPWD	 2
+#define OCURIPARAMS	 4
+#define OCURIENCODE	 8 /* If output should be encoded */
+
+extern char* ocuribuild(OCURI*,const char* prefix, const char* suffix, int flags);
+
+/* Param Management */
+extern int ocuridecodeparams(OCURI* ocuri);
+extern int ocurisetparams(OCURI* ocuri,const char*);
+
+/*! NULL result => entry not found.
+    Empty value should be represented as a zero length string */
+extern const char* ocurilookup(OCURI*, const char* param);
+
+extern char* ocuriencode(char* s, char* allowable);
+extern char* ocuridecode(char* s);
+extern char* ocuridecodeonly(char* s, char*);
+
+#endif /*OCURI_H*/
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/src_netcdf4/ocutil.c
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/src_netcdf4/ocutil.c	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/src_netcdf4/ocutil.c	(revision 1749)
@@ -0,0 +1,442 @@
+/* Copyright 2009, UCAR/Unidata and OPeNDAP, Inc.
+   See the COPYRIGHT file for more information. */
+
+#include "config.h"
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+#include <fcntl.h>
+#include "ocinternal.h"
+#include "ocdebug.h"
+
+#ifdef WIN32
+#define snprintf _snprintf
+#endif
+
+/* Order is important: longest first */
+static char* DDSdatamarks[3] = {"Data:\r\n","Data:\n",(char*)NULL};
+
+/* Not all systems have strndup, so provide one*/
+char*
+ocstrndup(const char* s, size_t len)
+{
+    char* dup;
+    if(s == NULL) return NULL;
+    dup = (char*)ocmalloc(len+1);
+    MEMCHECK(dup,NULL);
+    memcpy((void*)dup,s,len);
+    dup[len] = '\0';
+    return dup;
+}
+
+/* Do not trust strncmp semantics */
+int
+ocstrncmp(const char* s1, const char* s2, size_t len)
+{
+    const char *p,*q;
+    if(s1 == s2) return 0;
+    if(s1 == NULL) return -1;
+    if(s2 == NULL) return +1;
+    for(p=s1,q=s2;len > 0;p++,q++,len--) {
+	if(*p == 0 && *q == 0) return 0; /* *p == *q == 0 */
+	if(*p != *q)
+	    return (*p - *q);	
+    }
+    /* 1st len chars are same */
+    return 0;
+}
+
+
+void
+makedimlist(OClist* path, OClist* dims)
+{
+    unsigned int i,j;
+    for(i=0;i<oclistlength(path);i++) {
+	OCnode* node = (OCnode*)oclistget(path,i);
+        unsigned int rank = node->array.rank;
+	for(j=0;j<rank;j++) {
+	    OCnode* dim = (OCnode*)oclistget(node->array.dimensions,j);
+	    oclistpush(dims,(ocelem)dim);
+        }
+    }
+}
+
+void
+ocfreeprojectionclause(OCprojectionclause* clause)
+{
+    if(clause->target != NULL) free(clause->target);
+    while(oclistlength(clause->indexsets) > 0) {
+	OClist* slices = (OClist*)oclistpop(clause->indexsets);
+        while(oclistlength(slices) > 0) {
+	    OCslice* slice = (OCslice*)oclistpop(slices);
+	    if(slice != NULL) free(slice);
+	}
+        oclistfree(slices);
+    }
+    oclistfree(clause->indexsets);
+    free(clause);
+}
+
+static void
+freeAttributes(OClist* attset)
+{
+    unsigned int i,j;
+    for(i=0;i<oclistlength(attset);i++) {
+	OCattribute* att = (OCattribute*)oclistget(attset,i);
+	if(att->name != NULL) free(att->name);
+	if(att->etype == OC_String || att->etype == OC_URL) {
+	    for(j=0;j<att->nvalues;j++) {
+		char* s = ((char**)att->values)[j];
+		if(s != NULL) free(s);
+	    }
+	} else {
+	    free(att->values);
+	}
+    }
+}
+
+void
+freeOCnode(OCnode* cdf, int deep)
+{
+    unsigned int i;
+    if(cdf == NULL) return;
+    if(cdf->name != NULL) free(cdf->name);
+    if(cdf->fullname != NULL) free(cdf->fullname);
+    if(cdf->attributes != NULL) freeAttributes(cdf->attributes);
+    if(cdf->subnodes != NULL) {
+	if(deep) {
+            for(i=0;i<oclistlength(cdf->subnodes);i++) {
+	        OCnode* node = (OCnode*)oclistget(cdf->subnodes,i);
+		freeOCnode(node,deep);
+	    }
+	}
+        oclistfree(cdf->subnodes);
+    }
+    free(cdf);
+}
+
+int
+findbod(OCbytes* buffer, size_t* bodp, size_t* ddslenp)
+{
+    unsigned int i;
+    char* content;
+    size_t len = ocbyteslength(buffer);
+    char** marks;
+    
+    content = ocbytescontents(buffer);
+
+    for(marks = DDSdatamarks;*marks;marks++) {
+	char* mark = *marks;
+        int tlen = strlen(mark);
+        for(i=0;i<len;i++) {
+	    if((i+tlen) <= len 
+	        && (ocstrncmp(content+i,mark,tlen)==0)) {
+	       *ddslenp = i;
+	        i += tlen;
+	        *bodp = i;
+	        return 1;
+	    }
+	}
+    }
+    *ddslenp = 0;
+    *bodp = 0;
+    return 0; /* tag not found; not necessarily an error*/
+}
+
+/* Compute total # of elements if dimensioned*/
+size_t
+totaldimsize(OCnode* node)
+{
+    unsigned int i;
+    size_t count = 1;
+    for(i=0;i<node->array.rank;i++) {
+        OCnode* dim = (OCnode*)oclistget(node->array.dimensions,i);
+        count *= (dim->dim.declsize);
+    }
+    return count;
+}
+
+#ifdef OCIGNORE
+size_t
+totaldimsize(unsigned int rank, size_t* dimsizes)
+{
+    unsigned int i;
+    int unlim = 0;
+    unsigned long size = 1;
+    for(i=0;i<rank;i++) {
+        if(dimsizes[i] != 0) size = (size * dimsizes[i]); else unlim = 1;
+    }
+    return size;
+}
+#endif
+
+size_t
+octypesize(OCtype etype)
+{
+    switch (etype) {
+    case OC_Char:	return sizeof(char);
+    case OC_Byte:	return sizeof(signed char);
+    case OC_UByte:	return sizeof(unsigned char);
+    case OC_Int16:	return sizeof(short);
+    case OC_UInt16:	return sizeof(unsigned short);
+    case OC_Int32:	return sizeof(int);
+    case OC_UInt32:	return sizeof(unsigned int);
+    case OC_Float32:	return sizeof(float);
+    case OC_Float64:	return sizeof(double);
+#ifdef HAVE_LONG_LONG_INT
+    case OC_Int64:	return sizeof(long long);
+    case OC_UInt64:	return sizeof(unsigned long long);
+#endif
+    case OC_String:	return sizeof(char*);
+    case OC_URL:	return sizeof(char*);
+    default: break;     /* Ignore all others */
+    }
+    return 0;
+}
+
+char*
+octypetostring(OCtype octype)
+{
+    switch (octype) {
+    case OC_NAT:          return "OC_NAT";
+    case OC_Char:         return "OC_Char";
+    case OC_Byte:         return "OC_Byte";
+    case OC_UByte:	   return "OC_UByte";
+    case OC_Int16:        return "OC_Int16";
+    case OC_UInt16:       return "OC_UInt16";
+    case OC_Int32:        return "OC_Int32";
+    case OC_UInt32:       return "OC_UInt32";
+    case OC_Int64:        return "OC_Int64";
+    case OC_UInt64:       return "OC_UInt64";
+    case OC_Float32:      return "OC_Float32";
+    case OC_Float64:      return "OC_Float64";
+    case OC_String:       return "OC_String";
+    case OC_URL:          return "OC_URL";
+    /* Non-primitives*/
+    case OC_Dataset:      return "OC_Dataset";
+    case OC_Sequence:     return "OC_Sequence";
+    case OC_Grid:         return "OC_Grid";
+    case OC_Structure:    return "OC_Structure";
+    case OC_Dimension:    return "OC_Dimension";
+    case OC_Attribute:    return "OC_Attribute";
+    case OC_Attributeset: return "OC_Attributeset";
+    case OC_Primitive:    return "OC_Primitive";
+    default: break;
+    }
+    return NULL;
+}
+
+char*
+octypetoddsstring(OCtype octype)
+{
+    switch (octype) {
+    case OC_Byte:         return "Byte";
+    case OC_Int16:        return "Int16";
+    case OC_UInt16:       return "UInt16";
+    case OC_Int32:        return "Int32";
+    case OC_UInt32:       return "UInt32";
+    case OC_Float32:      return "Float32";
+    case OC_Float64:      return "Float64";
+    case OC_String:       return "String";
+    case OC_URL:          return "Url";
+    default: break;
+    }
+    return "<unknown>";
+}
+
+
+OCerror
+octypeprint(OCtype etype, char* buf, size_t bufsize, void* value)
+{
+    if(buf == NULL || bufsize == 0 || value == NULL) return OC_EINVAL;
+    buf[0] = '\0';
+    switch (etype) {
+    case OC_Char:
+	snprintf(buf,bufsize,"'%c'",*(char*)value);
+	break;
+    case OC_Byte:
+	snprintf(buf,bufsize,"%d",*(signed char*)value);
+	break;
+    case OC_UByte:
+	snprintf(buf,bufsize,"%u",*(unsigned char*)value);
+	break;
+    case OC_Int16:
+	snprintf(buf,bufsize,"%d",*(short*)value);
+	break;
+    case OC_UInt16:
+	snprintf(buf,bufsize,"%u",*(unsigned short*)value);
+	break;
+    case OC_Int32:
+	snprintf(buf,bufsize,"%d",*(int*)value);
+	break;
+    case OC_UInt32:
+	snprintf(buf,bufsize,"%u",*(unsigned int*)value);
+	break;
+    case OC_Float32:
+	snprintf(buf,bufsize,"%g",*(float*)value);
+	break;
+    case OC_Float64:
+	snprintf(buf,bufsize,"%g",*(double*)value);
+	break;
+#ifdef HAVE_LONG_LONG_INT
+    case OC_Int64:
+	snprintf(buf,bufsize,"%lld",*(long long*)value);
+	break;
+    case OC_UInt64:
+	snprintf(buf,bufsize,"%llu",*(unsigned long long*)value);
+	break;
+#endif
+    case OC_String:
+    case OC_URL: {
+	char* s = *(char**)value;
+	snprintf(buf,bufsize,"\"%s\"",s);
+	} break;
+    default: break;
+    }
+    return OC_NOERR;
+}
+
+size_t
+xxdrsize(OCtype etype)
+{
+    switch (etype) {
+    case OC_Char:
+    case OC_Byte:
+    case OC_UByte:
+    case OC_Int16:
+    case OC_UInt16:
+    case OC_Int32:
+    case OC_UInt32:
+	return XDRUNIT;
+    case OC_Int64:
+    case OC_UInt64:
+	return (2*XDRUNIT);
+    case OC_Float32:
+	return XDRUNIT;
+    case OC_Float64:
+	return (2*XDRUNIT);
+    case OC_String:
+    case OC_URL:
+    default: break;
+    }
+    return 0;
+}
+
+/**************************************/
+
+char*
+ocerrstring(int err)
+{
+    if(err == 0) return "no error";
+    if(err > 0) return strerror(err);
+    switch (err) {
+	case OC_EBADID:
+	    return "OC_EBADID: Not a valid ID";
+	case OC_EINVAL:
+	    return "OC_EINVAL: Invalid argument";
+	case OC_EPERM:
+	    return "OC_EPERM: Write to read only";
+	case OC_EINVALCOORDS:
+	    return "OC_EINVALCOORDS: Index exceeds dimension bound";
+	case OC_ENOTVAR:
+	    return "OC_ENOTVAR: Variable not found";
+	case OC_ECHAR:
+	    return "OC_ECHAR: Attempt to convert between text & numbers";
+	case OC_EEDGE:
+	    return "OC_EEDGE: Start+count exceeds dimension bound";
+	case OC_ESTRIDE:
+	    return "OC_ESTRIDE: Illegal stride";
+	case OC_ENOMEM:
+	    return "OC_ENOMEM: Memory allocation (malloc) failure";
+	case OC_EDIMSIZE:
+	    return "OC_EDIMSIZE: Invalid dimension size";
+	case OC_EDAP:
+	    return "OC_EDAP: DAP failure";
+	case OC_EXDR:
+	    return "OC_EXDR: XDR failure";
+	case OC_ECURL:
+	    return "OC_ECURL: libcurl failure";
+	case OC_EBADURL:
+	    return "OC_EBADURL: malformed url";
+	case OC_EBADVAR:
+	    return "OC_EBADVAR: no such variable";
+	case OC_EOPEN:
+	    return "OC_EOPEN: temporary file open failed";	
+	case OC_EIO:
+	    return "OC_EIO: I/O failure";
+	case OC_ENODATA:
+	    return "OC_ENODATA: Variable has no data in DAP request";
+	case OC_EDAPSVC:
+	    return "OC_EDAPSVC: DAP Server error";
+	case OC_ENAMEINUSE:
+	    return "OC_ENAMEINUSE: Duplicate name in DDS";
+	case OC_EDAS:
+	    return "OC_EDAS: Malformed or unreadable DAS";
+	case OC_EDDS:
+	    return "OC_EDDS: Malformed or unreadable DDS";
+	case OC_EDATADDS:
+	    return "OC_EDATADDS: Malformed or unreadable DATADDS";
+	case OC_ERCFILE:
+	    return "OC_ERCFILE: Malformed or unreadable run-time configuration file";
+	case OC_ENOFILE:
+	    return "OC_ENOFILE: cannot read content of URL";
+	default: break;
+    }
+    return "<unknown error code>";
+}
+
+OCerror
+ocsvcerrordata(OCstate* state, char** codep, char** msgp, long* httpp)
+{
+    if(codep) *codep = state->error.code;
+    if(msgp) *msgp = state->error.message;
+    if(httpp) *httpp = state->error.httpcode;
+    return OC_NOERR;    
+}
+
+/* if we get OC_EDATADDS error, then try to capture any
+   error message and log it; assumes that in this case,
+   the datadds is not big.
+*/
+void
+ocdataddsmsg(OCstate* state, OCtree* tree)
+{
+#define ERRCHUNK 1024
+#define ERRFILL ' '
+#define ERRTAG "Error {" 
+    unsigned int i,j,len;
+    XXDR* xdrs;
+    char* contents;
+    off_t ckp;
+
+    if(tree == NULL) return;
+    /* get available space */
+    xdrs = tree->data.xdrs;
+    len = xxdr_length(xdrs);
+    if(len < strlen(ERRTAG))
+	return; /* no room */
+    ckp = xxdr_getpos(xdrs);
+    xxdr_setpos(xdrs,0);
+    /* read the whole thing */
+    contents = (char*)malloc(len+1);
+    xxdr_getbytes(xdrs,contents,len);
+    contents[len] = '\0';
+    /* Look for error tag */
+    for(i=0;i<len;i++) {
+        if(ocstrncmp(contents+i,ERRTAG,strlen(ERRTAG))==0) {
+	    /* log the error message */
+	    /* Do a quick and dirty escape */
+	    for(j=i;j<len;j++) {
+	        int c = contents[i+j];
+		if(c > 0 && (c < ' ' || c >= '\177'))
+		    contents[i+j] = ERRFILL;
+	    }
+	    oc_log(LOGERR,"DATADDS failure, possible message: '%s'\n",
+			contents+i);
+	    goto done;
+	}
+    }
+    xxdr_setpos(xdrs,ckp);
+done:
+    return;
+}
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/src_netcdf4/ocutil.h
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/src_netcdf4/ocutil.h	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/src_netcdf4/ocutil.h	(revision 1749)
@@ -0,0 +1,36 @@
+/* Copyright 2009, UCAR/Unidata and OPeNDAP, Inc.
+   See the COPYRIGHT file for more information. */
+
+#ifndef OCUTIL_H
+#define OCUTIL_H 1
+
+/* Forward */
+struct OCstate;
+
+#define ocmax(x,y) ((x) > (y) ? (x) : (y))
+
+extern char* ocstrndup(const char* s, size_t len);
+extern int ocstrncmp(const char* s1, const char* s2, size_t len);
+
+extern size_t octypesize(OCtype etype);
+extern char*  octypetostring(OCtype octype);
+extern char*  octypetoddsstring(OCtype octype);
+extern char* ocerrstring(int err);
+extern OCerror ocsvcerrordata(struct OCstate*,char**,char**,long*);
+extern OCerror octypeprint(OCtype etype, char* buf, size_t bufsize, void* value);
+extern size_t xxdrsize(OCtype etype);
+
+extern size_t totaldimsize(OCnode*);
+
+extern void makedimlist(OClist* path, OClist* dims);
+
+extern int findbod(OCbytes* buffer, size_t*, size_t*);
+
+/* Reclaimers*/
+extern void freeOCnode(OCnode*,int);
+extern void ocfreeprojectionclause(OCprojectionclause* clause);
+
+/* Misc. */
+extern void ocdataddsmsg(struct OCstate*, struct OCtree*);
+
+#endif /*UTIL_H*/
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/src_netcdf4/onstack.h
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/src_netcdf4/onstack.h	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/src_netcdf4/onstack.h	(revision 1749)
@@ -0,0 +1,71 @@
+/*
+ *	Copyright 1997, University Corporation for Atmospheric Research
+ *	See netcdf/COPYRIGHT file for copying and redistribution conditions.
+ */
+/* $Id: onstack.h,v 2.7 2006/09/15 20:40:39 ed Exp $ */
+
+#ifndef _ONSTACK_H_
+#define _ONSTACK_H_
+/**
+ * This file provides definitions which allow us to
+ * "allocate" arrays on the stack where possible.
+ * (Where not possible, malloc and free are used.)
+ *
+ * The macro ALLOC_ONSTACK(name, type, nelems) is used to declare 
+ * an array of 'type' named 'name' which is 'nelems' long.
+ * FREE_ONSTACK(name) is placed at the end of the scope of 'name'
+ * to call 'free' if necessary.
+ * 
+ * The macro ALLOC_ONSTACK wraps a call to alloca() on most systems.
+ */
+
+#if HAVE_ALLOCA
+/*
+ * Implementation based on alloca()
+ */
+
+#if defined(__GNUC__)
+# if !defined(alloca)
+# define alloca __builtin_alloca
+# endif
+#else
+# if HAVE_ALLOCA_H
+#  include <alloca.h>
+# elif defined(_AIX)
+#  pragma alloca
+# endif /* HAVE_ALLOCA_H */
+#endif /* __GNUC__ */
+
+# if !defined(ALLOCA_ARG_T)
+# define ALLOCA_ARG_T int /* the usual type of the alloca argument */
+# endif
+
+# define ALLOC_ONSTACK(name, type, nelems) \
+	type *const name = (type *) alloca((ALLOCA_ARG_T)((nelems) * sizeof(type)))
+
+# define FREE_ONSTACK(name)
+
+#elif defined(_CRAYC) && !defined(__crayx1) && !__cplusplus && __STDC__ > 1
+/*
+ * Cray C allows sizing of arrays with non-constant values.
+ */
+
+# define ALLOC_ONSTACK(name, type, nelems) \
+	type name[nelems]
+
+# define FREE_ONSTACK(name)
+
+#else
+/*
+ * Default implementation. When all else fails, use malloc/free.
+ */
+
+# define ALLOC_ONSTACK(name, type, nelems) \
+	type *const name = (type *) malloc((nelems) * sizeof(type))
+
+# define FREE_ONSTACK(name) \
+	free(name)
+
+#endif
+	
+#endif /* _ONSTACK_H_ */
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/src_netcdf4/posixio.c
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/src_netcdf4/posixio.c	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/src_netcdf4/posixio.c	(revision 1749)
@@ -0,0 +1,1802 @@
+/*
+ *	Copyright 1996, University Corporation for Atmospheric Research
+ *	See netcdf/COPYRIGHT file for copying and redistribution conditions.
+ */
+/* $Id: posixio.c,v 1.89 2010/05/22 21:59:08 dmh Exp $ */
+
+/* For MinGW Build */
+#if defined(_WIN32) || defined(_WIN64)
+#include <windows.h>
+#include <winbase.h>
+#include <io.h>
+#define fstat64 fstat
+#define lseek64 lseek
+#endif
+
+#include <config.h>
+#include <assert.h>
+#include <stdlib.h>
+#include <errno.h>
+#ifndef ENOERR
+#define ENOERR 0
+#endif
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <fcntl.h>
+#include <string.h>
+#ifdef _MSC_VER /* Microsoft Compilers */
+#include <io.h>
+#else
+#include <unistd.h>
+#endif
+#ifndef HAVE_SSIZE_T
+#define ssize_t int
+#endif
+
+#ifndef SEEK_SET
+#define SEEK_SET 0
+#define SEEK_CUR 1
+#define SEEK_END 2
+#endif
+
+#include "ncio.h"
+#include "fbits.h"
+#include "rnd.h"
+
+/* #define INSTRUMENT 1 */
+#if INSTRUMENT /* debugging */
+#undef NDEBUG
+#include <stdio.h>
+/*#include "instr.h"*/
+#endif
+
+#undef MIN  /* system may define MIN somewhere and complain */
+#define MIN(mm,nn) (((mm) < (nn)) ? (mm) : (nn))
+
+#if !defined(NDEBUG) && !defined(X_INT_MAX)
+#define  X_INT_MAX 2147483647
+#endif
+
+#if 0 /* !defined(NDEBUG) && !defined(X_ALIGN) */
+#define  X_ALIGN 4
+#else
+#undef X_ALIGN
+#endif
+
+/* These are needed on mingw to get a dll to compile. They really
+ * should be provided in sys/stats.h, but what the heck. Let's not be
+ * too picky! */
+#ifndef S_IRGRP
+#define S_IRGRP   0000040
+#endif
+#ifndef S_IROTH
+#define S_IROTH   0000004
+#endif
+#ifndef S_IWGRP
+#define S_IWGRP   0000020
+#endif
+#ifndef S_IWOTH
+#define S_IWOTH   0000002
+#endif
+
+/*Forward*/
+static int ncio_px_filesize(ncio *nciop, off_t *filesizep);
+static int ncio_px_pad_length(ncio *nciop, off_t length);
+static int ncio_px_close(ncio *nciop, int doUnlink);
+static int ncio_spx_close(ncio *nciop, int doUnlink);
+
+
+/*
+ * Define the following for debugging.
+ */
+/* #define ALWAYS_NC_SHARE 1 */
+
+/* Begin OS */
+
+#ifndef POSIXIO_DEFAULT_PAGESIZE
+#define POSIXIO_DEFAULT_PAGESIZE 4096
+#endif
+/*
+ * What is the system pagesize?
+ */
+static size_t
+pagesize(void)
+{
+  size_t pgsz;
+#if defined(_WIN32) || defined(_WIN64)
+  SYSTEM_INFO info;
+#endif
+/* Hmm, aren't standards great? */
+#if defined(_SC_PAGE_SIZE) && !defined(_SC_PAGESIZE)
+#define _SC_PAGESIZE _SC_PAGE_SIZE
+#endif
+
+  /* For MinGW Builds */
+#if defined(_WIN32) || defined(_WIN64)
+  GetSystemInfo(&info);
+  pgsz = (size_t)info.dwPageSize;
+#elif defined(_SC_PAGESIZE)
+  pgsz = (size_t)sysconf(_SC_PAGESIZE);
+#elif defined(HAVE_GETPAGESIZE)
+  pgsz = (size_t) getpagesize();
+#endif
+  if(pgsz > 0)
+    return (size_t) pgsz;
+   return (size_t)POSIXIO_DEFAULT_PAGESIZE;
+}
+
+/*
+ * What is the preferred I/O block size?
+ */
+static size_t
+blksize(int fd)
+{
+#if defined(HAVE_ST_BLKSIZE)
+	struct stat sb;
+	if (fstat(fd, &sb) > -1)
+	{
+		if(sb.st_blksize >= 8192)
+			return (size_t) sb.st_blksize;
+		return 8192;
+	}
+	/* else, silent in the face of error */
+#endif
+	return (size_t) 2 * pagesize();
+}
+
+
+/*
+ * Sortof like ftruncate, except won't make the
+ * file shorter.
+ */
+static int
+fgrow(const int fd, const off_t len)
+{
+	struct stat sb;
+	if (fstat(fd, &sb) < 0)
+		return errno;
+	if (len < sb.st_size)
+		return ENOERR;
+	{
+	    const long dumb = 0;
+	    /* we don't use ftruncate() due to problem with FAT32 file systems */
+	    /* cache current position */
+	    const off_t pos = lseek(fd, 0, SEEK_CUR);
+	    if(pos < 0)
+		return errno;
+	    if (lseek(fd, len-sizeof(dumb), SEEK_SET) < 0)
+		return errno;
+	    if(write(fd, &dumb, sizeof(dumb)) < 0)
+		return errno;
+	    if (lseek(fd, pos, SEEK_SET) < 0)
+		return errno;
+	}
+	return ENOERR;
+}
+
+
+/*
+ * Sortof like ftruncate, except won't make the file shorter.  Differs
+ * from fgrow by only writing one byte at designated seek position, if
+ * needed.
+ */
+static int
+fgrow2(const int fd, const off_t len)
+{
+	struct stat sb;
+	if (fstat(fd, &sb) < 0)
+		return errno;
+	if (len <= sb.st_size)
+		return ENOERR;
+	{
+	    const char dumb = 0;
+	    /* we don't use ftruncate() due to problem with FAT32 file systems */
+	    /* cache current position */
+	    const off_t pos = lseek(fd, 0, SEEK_CUR);
+	    if(pos < 0)
+		return errno;
+	    if (lseek(fd, len-1, SEEK_SET) < 0)
+		return errno;
+	    if(write(fd, &dumb, sizeof(dumb)) < 0)
+		return errno;
+	    if (lseek(fd, pos, SEEK_SET) < 0)
+		return errno;
+	}
+	return ENOERR;
+}
+/* End OS */
+/* Begin px */
+
+/* The px_ functions are for posix systems, when NC_SHARE is not in
+   effect. */
+
+/* Write out a "page" of data to the file. The size of the page
+   (i.e. the extent) varies.
+
+   nciop - pointer to the file metadata.
+   offset - where in the file should this page be written.
+   extent - how many bytes should be written.
+   vp - pointer to the data to write.
+   posp - pointer to current position in file, updated after write.
+*/
+static int
+px_pgout(ncio *const nciop, 
+	off_t const offset,  const size_t extent,
+	void *const vp, off_t *posp)
+{
+    ssize_t partial;
+    size_t nextent;
+    char *nvp;
+#ifdef X_ALIGN
+	assert(offset % X_ALIGN == 0);
+#endif
+
+	assert(*posp == OFF_NONE || *posp == lseek(nciop->fd, 0, SEEK_CUR));
+
+	if(*posp != offset)
+	{
+		if(lseek(nciop->fd, offset, SEEK_SET) != offset)
+		{
+			return errno;
+		}
+		*posp = offset;
+	}
+	/* Old write, didn't handle partial writes correctly */
+	/* if(write(nciop->fd, vp, extent) != (ssize_t) extent) */
+	/* { */
+	/* 	return errno; */
+	/* } */
+	nextent = extent;
+        nvp = vp;
+	while((partial = write(nciop->fd, nvp, nextent)) != -1) {
+	    if(partial == nextent)
+		break;
+	    nvp += partial;		
+	    nextent -= partial;
+	}
+	if(partial == -1)
+	    return errno;
+	*posp += extent;
+
+	return ENOERR;
+}
+
+/* Read in a page of data. 
+
+   nciop - a pointer to the ncio struct for this file.
+   offset - byte offset in file where read starts.
+   extent - the size of the page that will be read.
+   vp - a pointer to where the data will end up.
+   nreadp - returned number of bytes actually read (may be less than extent).
+   posp - pointer to current position in file, updated after read.
+*/
+static int
+px_pgin(ncio *const nciop,
+	off_t const offset, const size_t extent,
+	void *const vp, size_t *nreadp, off_t *posp)
+{
+	int status;
+	ssize_t nread;
+
+#ifdef X_ALIGN
+	assert(offset % X_ALIGN == 0);
+	assert(extent % X_ALIGN == 0);
+#endif
+
+	assert(*posp == OFF_NONE || *posp == lseek(nciop->fd, 0, SEEK_CUR));
+
+	if(*posp != offset)
+	{
+		if(lseek(nciop->fd, offset, SEEK_SET) != offset)
+		{
+			status = errno;
+			return status;
+		}
+		*posp = offset;
+	}
+
+	errno = 0;
+	nread = read(nciop->fd, vp, extent);
+	if(nread != (ssize_t) extent)
+	{
+		status = errno;
+		if(nread == -1 || status != ENOERR)
+			return status;
+		/* else it's okay we read less than asked for */
+		(void) memset((char *)vp + nread, 0, (ssize_t)extent - nread);
+	}
+	*nreadp = nread;
+	*posp += nread;
+
+	return ENOERR;
+}
+
+/* This struct is for POSIX systems, with NC_SHARE not in effect. If
+   NC_SHARE is used, see ncio_spx.
+
+   blksz - block size for reads and writes to file.
+   pos - current read/write position in file.
+   bf_offset - file offset corresponding to start of memory buffer
+   bf_extent - number of bytes in I/O request
+   bf_cnt - number of bytes available in buffer
+   bf_base - pointer to beginning of buffer.
+   bf_rflags - buffer region flags (defined in ncio.h) tell the lock
+   status, read/write permissions, and modification status of regions
+   of data in the buffer.
+   bf_refcount - buffer reference count.
+   slave - used in moves.
+*/
+typedef struct ncio_px {
+	size_t blksz;
+	off_t pos;
+	/* buffer */
+	off_t	bf_offset; 
+	size_t	bf_extent;
+	size_t	bf_cnt;
+	void	*bf_base;
+	int	bf_rflags;
+	int	bf_refcount;
+	/* chain for double buffering in px_move */
+	struct ncio_px *slave;
+} ncio_px;
+
+
+/*ARGSUSED*/
+/* This function indicates the file region starting at offset may be
+   released.
+
+   This is for POSIX, without NC_SHARE.  If called with RGN_MODIFIED
+   flag, sets the modified flag in pxp->bf_rflags and decrements the
+   reference count.
+
+   pxp - pointer to posix non-share ncio_px struct.
+
+   offset - file offset for beginning of to region to be
+   released.
+
+   rflags - only RGN_MODIFIED is relevent to this function, others ignored
+*/
+static int
+px_rel(ncio_px *const pxp, off_t offset, int rflags)
+{
+	assert(pxp->bf_offset <= offset
+		 && offset < pxp->bf_offset + (off_t) pxp->bf_extent);
+	assert(pIf(fIsSet(rflags, RGN_MODIFIED),
+		fIsSet(pxp->bf_rflags, RGN_WRITE)));
+
+	if(fIsSet(rflags, RGN_MODIFIED))
+	{
+		fSet(pxp->bf_rflags, RGN_MODIFIED);
+	}
+	pxp->bf_refcount--;
+
+	return ENOERR;
+}
+
+/* This function indicates the file region starting at offset may be
+   released.  Each read or write to the file is bracketed by a call to
+   the "get" region function and a call to the "rel" region function.
+   If you only read from the memory region, release it with a flag of
+   0, if you modify the region, release it with a flag of
+   RGN_MODIFIED.
+
+   For POSIX system, without NC_SHARE, this becomes the rel function
+   pointed to by the ncio rel function pointer. It mearly checks for
+   file write permission, then calls px_rel to do everything.
+
+   nciop - pointer to ncio struct.
+   offset - num bytes from beginning of buffer to region to be
+   released.
+   rflags - only RGN_MODIFIED is relevent to this function, others ignored
+*/
+static int
+ncio_px_rel(ncio *const nciop, off_t offset, int rflags)
+{
+	ncio_px *const pxp = (ncio_px *)nciop->pvt;
+
+	if(fIsSet(rflags, RGN_MODIFIED) && !fIsSet(nciop->ioflags, NC_WRITE))
+		return EPERM; /* attempt to write readonly file */
+
+	return px_rel(pxp, offset, rflags);
+}
+
+/* POSIX get. This will "make a region available." Since we're using
+   buffered IO, this means that if needed, we'll fetch a new page from
+   the file, otherwise, just return a pointer to what's in memory
+   already. 
+
+   nciop - pointer to ncio struct, containing file info.
+   pxp - pointer to ncio_px struct, which contains special metadate
+   for posix files without NC_SHARE.
+   offset - start byte of region to get.
+   extent - how many bytes to read.
+   rflags - One of the RGN_* flags defined in ncio.h.
+   vpp - pointer to pointer that will recieve data.
+
+   NOTES: 
+
+   * For blkoffset round offset down to the nearest pxp->blksz. This
+   provides the offset (in bytes) to the beginning of the block that
+   holds the current offset.
+
+   * diff tells how far into the current block we are.
+
+   * For blkextent round up to the number of bytes at the beginning of
+   the next block, after the one that holds our current position, plus
+   whatever extra (i.e. the extent) that we are about to grab.
+
+   * The blkextent can't be more than twice the pxp->blksz. That's
+   because the pxp->blksize is the sizehint, and in ncio_px_init2 the
+   buffer (pointed to by pxp->bf-base) is allocated with 2 *
+   *sizehintp. This is checked (unneccesarily) more than once in
+   asserts.
+
+   * If this is called on a newly opened file, pxp->bf_offset will be
+   OFF_NONE and we'll jump to label pgin to immediately read in a
+   page. 
+*/
+static int
+px_get(ncio *const nciop, ncio_px *const pxp,
+		off_t offset, size_t extent,
+		int rflags,
+		void **const vpp)
+{
+	int status = ENOERR;
+
+	const off_t blkoffset = _RNDDOWN(offset, (off_t)pxp->blksz);
+	off_t diff = (size_t)(offset - blkoffset);
+	off_t blkextent = _RNDUP(diff + extent, pxp->blksz);
+	
+	assert(extent != 0);
+	assert(extent < X_INT_MAX); /* sanity check */
+	assert(offset >= 0); /* sanity check */
+
+	if(2 * pxp->blksz < blkextent)
+		return E2BIG; /* TODO: temporary kludge */
+	if(pxp->bf_offset == OFF_NONE)
+	{
+		/* Uninitialized */
+		if(pxp->bf_base == NULL)
+		{
+			assert(pxp->bf_extent == 0);
+			assert(blkextent <= 2 * pxp->blksz);
+			pxp->bf_base = malloc(2 * pxp->blksz);
+			if(pxp->bf_base == NULL)
+				return ENOMEM;
+		}
+		goto pgin;
+	}
+	/* else */
+	assert(blkextent <= 2 * pxp->blksz);
+
+	if(blkoffset == pxp->bf_offset)
+	{
+		/* hit */
+ 		if(blkextent > pxp->bf_extent) 
+		{
+			/* page in upper */
+			void *const middle =
+			 	(void *)((char *)pxp->bf_base + pxp->blksz);
+			assert(pxp->bf_extent == pxp->blksz);
+			status = px_pgin(nciop,
+				 pxp->bf_offset + (off_t)pxp->blksz,
+				 pxp->blksz,
+				 middle,
+				 &pxp->bf_cnt,
+				 &pxp->pos);
+			if(status != ENOERR)
+				return status;
+			pxp->bf_extent = 2 * pxp->blksz;
+			pxp->bf_cnt += pxp->blksz;
+		}
+		goto done;
+	}
+	/* else */
+
+	if(pxp->bf_extent > pxp->blksz
+		 && blkoffset == pxp->bf_offset + (off_t)pxp->blksz)
+	{
+		/* hit in upper half */
+		if(blkextent == pxp->blksz)
+		{
+			/* all in upper half, no fault needed */
+			diff += pxp->blksz;
+			goto done;
+		}
+		/* else */
+		if(pxp->bf_cnt > pxp->blksz)
+		{
+			/* data in upper half */
+			void *const middle =
+				(void *)((char *)pxp->bf_base + pxp->blksz);
+			assert(pxp->bf_extent == 2 * pxp->blksz);
+			if(fIsSet(pxp->bf_rflags, RGN_MODIFIED))
+			{
+				/* page out lower half */
+				assert(pxp->bf_refcount <= 0);
+				status = px_pgout(nciop,
+					pxp->bf_offset,
+					pxp->blksz,
+					pxp->bf_base,
+					&pxp->pos);
+				if(status != ENOERR)
+					return status;
+			}
+			pxp->bf_cnt -= pxp->blksz;
+			/* copy upper half into lower half */
+			(void) memcpy(pxp->bf_base, middle, pxp->bf_cnt);
+		}
+		else		/* added to fix nofill bug */
+		{
+			assert(pxp->bf_extent == 2 * pxp->blksz);
+			/* still have to page out lower half, if modified */
+			if(fIsSet(pxp->bf_rflags, RGN_MODIFIED))
+			{
+				assert(pxp->bf_refcount <= 0);
+				status = px_pgout(nciop,
+					pxp->bf_offset,
+					pxp->blksz,
+					pxp->bf_base,
+					&pxp->pos);
+				if(status != ENOERR)
+					return status;
+			}
+		}
+		pxp->bf_offset = blkoffset;
+		/* pxp->bf_extent = pxp->blksz; */
+
+ 		assert(blkextent == 2 * pxp->blksz);
+		{
+			/* page in upper */
+			void *const middle =
+			 	(void *)((char *)pxp->bf_base + pxp->blksz);
+			status = px_pgin(nciop,
+				 pxp->bf_offset + (off_t)pxp->blksz,
+				 pxp->blksz,
+				 middle,
+				 &pxp->bf_cnt,
+				 &pxp->pos);
+			if(status != ENOERR)
+				return status;
+			pxp->bf_extent = 2 * pxp->blksz;
+			pxp->bf_cnt += pxp->blksz;
+		}
+		goto done;
+	}
+	/* else */
+
+	if(blkoffset == pxp->bf_offset - (off_t)pxp->blksz)
+	{
+		/* wants the page below */
+		void *const middle =
+			(void *)((char *)pxp->bf_base + pxp->blksz);
+		size_t upper_cnt = 0;
+		if(pxp->bf_cnt > pxp->blksz)
+		{
+			/* data in upper half */
+			assert(pxp->bf_extent == 2 * pxp->blksz);
+			if(fIsSet(pxp->bf_rflags, RGN_MODIFIED))
+			{
+				/* page out upper half */
+				assert(pxp->bf_refcount <= 0);
+				status = px_pgout(nciop,
+					pxp->bf_offset + (off_t)pxp->blksz,
+					pxp->bf_cnt - pxp->blksz,
+					middle,
+					&pxp->pos);
+				if(status != ENOERR)
+					return status;
+			}
+			pxp->bf_cnt = pxp->blksz;
+			pxp->bf_extent = pxp->blksz;
+		}
+		if(pxp->bf_cnt > 0)
+		{
+			/* copy lower half into upper half */
+			(void) memcpy(middle, pxp->bf_base, pxp->blksz);
+			upper_cnt = pxp->bf_cnt;
+		}
+		/* read page below into lower half */
+		status = px_pgin(nciop,
+			 blkoffset,
+			 pxp->blksz,
+			 pxp->bf_base,
+			 &pxp->bf_cnt,
+			 &pxp->pos);
+		if(status != ENOERR)
+			return status;
+		pxp->bf_offset = blkoffset;
+		if(upper_cnt != 0)
+		{
+			pxp->bf_extent = 2 * pxp->blksz;
+			pxp->bf_cnt = pxp->blksz + upper_cnt;
+		}
+		else
+		{
+			pxp->bf_extent = pxp->blksz;
+		}
+		goto done;
+	}
+	/* else */
+
+	/* no overlap */
+	if(fIsSet(pxp->bf_rflags, RGN_MODIFIED))
+	{
+		assert(pxp->bf_refcount <= 0);
+		status = px_pgout(nciop,
+			pxp->bf_offset,
+			pxp->bf_cnt,
+			pxp->bf_base,
+			&pxp->pos);
+		if(status != ENOERR)
+			return status;
+		pxp->bf_rflags = 0;
+	}
+
+pgin:
+	status = px_pgin(nciop,
+		 blkoffset,
+		 blkextent,
+		 pxp->bf_base,
+		 &pxp->bf_cnt,
+		 &pxp->pos);
+	if(status != ENOERR)
+		return status;
+	 pxp->bf_offset = blkoffset;
+	 pxp->bf_extent = blkextent;
+
+done:
+	extent += diff;
+	if(pxp->bf_cnt < extent)
+		pxp->bf_cnt = extent;
+	assert(pxp->bf_cnt <= pxp->bf_extent);
+
+	pxp->bf_rflags |= rflags;
+	pxp->bf_refcount++;
+
+	*vpp = (char *)pxp->bf_base + diff;
+	return ENOERR;
+}
+
+/* Request that the region (offset, extent) be made available through
+   *vpp.
+
+   This function converts a file region specified by an offset and
+   extent to a memory pointer. The region may be locked until the
+   corresponding call to rel().
+
+   For POSIX systems, without NC_SHARE. This function gets a page of
+   size extent? 
+
+   This is a wrapper for the function px_get, which does all the heavy
+   lifting.
+
+   nciop - pointer to ncio struct for this file.
+   offset - offset (from beginning of file?) to the data we want to
+   read.
+   extent - the number of bytes to read from the file.
+   rflags - One of the RGN_* flags defined in ncio.h.
+   vpp - handle to point at data when it's been read.
+*/
+static int
+ncio_px_get(ncio *const nciop, 
+		off_t offset, size_t extent,
+		int rflags,
+		void **const vpp)
+{
+	ncio_px *const pxp = (ncio_px *)nciop->pvt;
+	
+	if(fIsSet(rflags, RGN_WRITE) && !fIsSet(nciop->ioflags, NC_WRITE))
+		return EPERM; /* attempt to write readonly file */
+
+	/* reclaim space used in move */
+	if(pxp->slave != NULL)
+	{
+		if(pxp->slave->bf_base != NULL)
+		{
+			free(pxp->slave->bf_base);
+			pxp->slave->bf_base = NULL;
+			pxp->slave->bf_extent = 0;
+			pxp->slave->bf_offset = OFF_NONE;
+		}
+		free(pxp->slave);
+		pxp->slave = NULL;
+	}
+	return px_get(nciop, pxp, offset, extent, rflags, vpp);
+}
+
+
+/* ARGSUSED */
+static int
+px_double_buffer(ncio *const nciop, off_t to, off_t from,
+			size_t nbytes, int rflags)
+{
+	ncio_px *const pxp = (ncio_px *)nciop->pvt;
+	int status = ENOERR;
+	void *src;
+	void *dest;
+	
+#if INSTRUMENT
+fprintf(stderr, "\tdouble_buffr %ld %ld %ld\n",
+		 (long)to, (long)from, (long)nbytes);
+#endif
+	status = px_get(nciop, pxp, to, nbytes, RGN_WRITE,
+			&dest);
+	if(status != ENOERR)
+		return status;
+
+	if(pxp->slave == NULL)
+	{
+		pxp->slave = (ncio_px *) malloc(sizeof(ncio_px));
+		if(pxp->slave == NULL)
+			return ENOMEM;
+
+		pxp->slave->blksz = pxp->blksz;
+		/* pos done below */
+		pxp->slave->bf_offset = pxp->bf_offset; 
+		pxp->slave->bf_extent = pxp->bf_extent;
+		pxp->slave->bf_cnt = pxp->bf_cnt;
+		pxp->slave->bf_base = malloc(2 * pxp->blksz);
+		if(pxp->slave->bf_base == NULL)
+			return ENOMEM;
+		(void) memcpy(pxp->slave->bf_base, pxp->bf_base,
+			 pxp->bf_extent);
+		pxp->slave->bf_rflags = 0;
+		pxp->slave->bf_refcount = 0;
+		pxp->slave->slave = NULL;
+	}
+	
+	pxp->slave->pos = pxp->pos;
+	status = px_get(nciop, pxp->slave, from, nbytes, 0,
+			&src);
+	if(status != ENOERR)
+		return status;
+	if(pxp->pos != pxp->slave->pos)
+	{
+		/* position changed, sync */
+		pxp->pos = pxp->slave->pos;
+	}
+
+	(void) memcpy(dest, src, nbytes);
+
+	(void)px_rel(pxp->slave, from, 0);
+	(void)px_rel(pxp, to, RGN_MODIFIED);
+	
+	return status;
+}
+
+/* Like memmove(), safely move possibly overlapping data.
+
+   Copy one region to another without making anything available to
+   higher layers. May be just implemented in terms of get() and rel(),
+   or may be tricky to be efficient. Only used in by nc_enddef()
+   after redefinition.
+
+   nciop - pointer to ncio struct with file info.
+   to - src for move?
+   from - dest for move?
+   nbytes - number of bytes to move.
+   rflags - One of the RGN_* flags defined in ncio.h. The only
+   reasonable flag value is RGN_NOLOCK.
+*/
+static int
+ncio_px_move(ncio *const nciop, off_t to, off_t from,
+			size_t nbytes, int rflags)
+{
+	ncio_px *const pxp = (ncio_px *)nciop->pvt;
+	int status = ENOERR;
+	off_t lower;	
+	off_t upper;
+	char *base;
+	size_t diff;
+	size_t extent;
+
+	if(to == from)
+		return ENOERR; /* NOOP */
+	
+	if(fIsSet(rflags, RGN_WRITE) && !fIsSet(nciop->ioflags, NC_WRITE))
+		return EPERM; /* attempt to write readonly file */
+
+	rflags &= RGN_NOLOCK; /* filter unwanted flags */
+
+	if(to > from)
+	{
+		/* growing */
+		lower = from;	
+		upper = to;
+	}
+	else
+	{
+		/* shrinking */
+		lower = to;
+		upper = from;
+	}
+	diff = (size_t)(upper - lower);
+	extent = diff + nbytes;
+
+#if INSTRUMENT
+fprintf(stderr, "ncio_px_move %ld %ld %ld %ld %ld\n",
+		 (long)to, (long)from, (long)nbytes, (long)lower, (long)extent);
+#endif
+	if(extent > pxp->blksz)
+	{
+		size_t remaining = nbytes;
+
+if(to > from)
+{
+		off_t frm = from + nbytes;
+		off_t toh = to + nbytes;
+		for(;;)
+		{
+			size_t loopextent = MIN(remaining, pxp->blksz);
+			frm -= loopextent;
+			toh -= loopextent;
+
+			status = px_double_buffer(nciop, toh, frm,
+				 	loopextent, rflags) ;
+			if(status != ENOERR)
+				return status;
+			remaining -= loopextent;
+
+			if(remaining == 0)
+				break; /* normal loop exit */
+		}
+}
+else
+{
+		for(;;)
+		{
+			size_t loopextent = MIN(remaining, pxp->blksz);
+
+			status = px_double_buffer(nciop, to, from,
+				 	loopextent, rflags) ;
+			if(status != ENOERR)
+				return status;
+			remaining -= loopextent;
+
+			if(remaining == 0)
+				break; /* normal loop exit */
+			to += loopextent;
+			from += loopextent;
+		}
+}
+		return ENOERR;
+	}
+	
+#if INSTRUMENT
+fprintf(stderr, "\tncio_px_move small\n");
+#endif
+	status = px_get(nciop, pxp, lower, extent, RGN_WRITE|rflags,
+			(void **)&base);
+
+	if(status != ENOERR)
+		return status;
+
+	if(to > from)
+		(void) memmove(base + diff, base, nbytes); 
+	else
+		(void) memmove(base, base + diff, nbytes); 
+		
+	(void) px_rel(pxp, lower, RGN_MODIFIED);
+
+	return status;
+}
+
+
+/* Flush any buffers to disk. May be a no-op on if I/O is unbuffered.
+   This function is used when NC_SHARE is NOT used.
+*/
+static int
+ncio_px_sync(ncio *const nciop)
+{
+	ncio_px *const pxp = (ncio_px *)nciop->pvt;
+	int status = ENOERR;
+	if(fIsSet(pxp->bf_rflags, RGN_MODIFIED))
+	{
+		assert(pxp->bf_refcount <= 0);
+		status = px_pgout(nciop, pxp->bf_offset,
+			pxp->bf_cnt,
+			pxp->bf_base, &pxp->pos);
+		if(status != ENOERR)
+			return status;
+		pxp->bf_rflags = 0;
+	}
+	else if (!fIsSet(pxp->bf_rflags, RGN_WRITE))
+	{
+	    /*
+	     * The dataset is readonly.  Invalidate the buffers so
+	     * that the next ncio_px_get() will actually read data.
+	     */
+	    pxp->bf_offset = OFF_NONE;
+	    pxp->bf_cnt = 0;
+	}
+	return status;
+}
+
+/* Internal function called at close to
+   free up anything hanging off pvt.
+*/
+static void
+ncio_px_freepvt(void *const pvt)
+{
+	ncio_px *const pxp = (ncio_px *)pvt;
+	if(pxp == NULL)
+		return;
+
+	if(pxp->slave != NULL)
+	{
+		if(pxp->slave->bf_base != NULL)
+		{
+			free(pxp->slave->bf_base);
+			pxp->slave->bf_base = NULL;
+			pxp->slave->bf_extent = 0;
+			pxp->slave->bf_offset = OFF_NONE;
+		}
+		free(pxp->slave);
+		pxp->slave = NULL;
+	}
+		
+	if(pxp->bf_base != NULL)
+	{
+		free(pxp->bf_base);
+		pxp->bf_base = NULL;
+		pxp->bf_extent = 0;
+		pxp->bf_offset = OFF_NONE;
+	}
+}
+
+
+/* This is the second half of the ncio initialization. This is called
+   after the file has actually been opened.
+
+   The most important thing that happens is the allocation of a block
+   of memory at pxp->bf_base. This is going to be twice the size of
+   the chunksizehint (rounded up to the nearest sizeof(double)) passed
+   in from nc__create or nc__open. The rounded chunksizehint (passed
+   in here in sizehintp) is going to be stored as pxp->blksize.
+
+   According to our "contract" we are not allowed to ask for an extent
+   larger than this chunksize/sizehint/blksize from the ncio get
+   function.
+
+   nciop - pointer to the ncio struct
+   sizehintp - pointer to a size hint that will be rounded up and
+   passed back to the caller.
+   isNew - true if this is being called from ncio_create for a new
+   file.
+*/
+static int
+ncio_px_init2(ncio *const nciop, size_t *sizehintp, int isNew)
+{
+	ncio_px *const pxp = (ncio_px *)nciop->pvt;
+	const size_t bufsz = 2 * *sizehintp;
+
+	assert(nciop->fd >= 0);
+
+	pxp->blksz = *sizehintp;
+
+	assert(pxp->bf_base == NULL);
+
+	/* this is separate allocation because it may grow */
+	pxp->bf_base = malloc(bufsz);
+	if(pxp->bf_base == NULL)
+		return ENOMEM;
+	/* else */
+	pxp->bf_cnt = 0;
+	if(isNew)
+	{
+		/* save a read */
+		pxp->pos = 0;
+		pxp->bf_offset = 0;
+		pxp->bf_extent = bufsz;
+		(void) memset(pxp->bf_base, 0, pxp->bf_extent);
+	}
+	return ENOERR;
+}
+
+
+/* This is the first of a two-part initialization of the ncio struct.
+   Here the rel, get, move, sync, and free function pointers are set
+   to their POSIX non-NC_SHARE functions (ncio_px_*).
+
+   The ncio_px struct is also partially initialized.
+*/
+static void
+ncio_px_init(ncio *const nciop)
+{
+	ncio_px *const pxp = (ncio_px *)nciop->pvt;
+
+	*((ncio_relfunc **)&nciop->rel) = ncio_px_rel; /* cast away const */
+	*((ncio_getfunc **)&nciop->get) = ncio_px_get; /* cast away const */
+	*((ncio_movefunc **)&nciop->move) = ncio_px_move; /* cast away const */
+	*((ncio_syncfunc **)&nciop->sync) = ncio_px_sync; /* cast away const */
+	*((ncio_filesizefunc **)&nciop->filesize) = ncio_px_filesize; /* cast away const */
+	*((ncio_pad_lengthfunc **)&nciop->pad_length) = ncio_px_pad_length; /* cast away const */
+	*((ncio_closefunc **)&nciop->close) = ncio_px_close; /* cast away const */
+
+	pxp->blksz = 0;
+	pxp->pos = -1;
+	pxp->bf_offset = OFF_NONE;
+	pxp->bf_extent = 0;
+	pxp->bf_rflags = 0;
+	pxp->bf_refcount = 0;
+	pxp->bf_base = NULL;
+	pxp->slave = NULL;
+
+}
+
+/* Begin spx */
+
+/* This is the struct that gets hung of ncio->pvt(?) when the NC_SHARE
+   flag is used.
+*/
+typedef struct ncio_spx {
+	off_t pos;
+	/* buffer */
+	off_t	bf_offset; 
+	size_t	bf_extent;
+	size_t	bf_cnt;
+	void	*bf_base;
+} ncio_spx;
+
+
+/*ARGSUSED*/
+/* This function releases the region specified by offset.
+
+   For POSIX system, with NC_SHARE, this becomes the rel function
+   pointed to by the ncio rel function pointer. It mearly checks for
+   file write permission, then calls px_rel to do everything.
+
+   nciop - pointer to ncio struct.
+
+   offset - beginning of region.
+
+   rflags - One of the RGN_* flags defined in ncio.h. If set to
+   RGN_MODIFIED it means that the data in this region were modified,
+   and it needs to be written out to the disk immediately (since we
+   are not buffering with NC_SHARE on).
+
+*/
+static int
+ncio_spx_rel(ncio *const nciop, off_t offset, int rflags)
+{
+	ncio_spx *const pxp = (ncio_spx *)nciop->pvt;
+	int status = ENOERR;
+
+	assert(pxp->bf_offset <= offset);
+	assert(pxp->bf_cnt != 0);
+	assert(pxp->bf_cnt <= pxp->bf_extent);
+#ifdef X_ALIGN
+	assert(offset < pxp->bf_offset + X_ALIGN);
+	assert(pxp->bf_cnt % X_ALIGN == 0 );
+#endif
+
+	if(fIsSet(rflags, RGN_MODIFIED))
+	{
+		if(!fIsSet(nciop->ioflags, NC_WRITE))
+			return EPERM; /* attempt to write readonly file */
+
+		status = px_pgout(nciop, pxp->bf_offset,
+			pxp->bf_cnt,
+			pxp->bf_base, &pxp->pos);
+		/* if error, invalidate buffer anyway */
+	}
+	pxp->bf_offset = OFF_NONE;
+	pxp->bf_cnt = 0;
+	return status;
+}
+
+
+/* Request that the region (offset, extent) be made available through
+   *vpp.
+
+   This function converts a file region specified by an offset and
+   extent to a memory pointer. The region may be locked until the
+   corresponding call to rel().
+
+   For POSIX systems, with NC_SHARE.
+
+   nciop - pointer to ncio struct for this file.
+   offset - offset (from beginning of file?) to the data we want to
+   read.
+   extent - the number of bytes we want.
+   rflags - One of the RGN_* flags defined in ncio.h. May be RGN_NOLOCK.
+   vpp - handle to point at data when it's been read.
+*/
+static int
+ncio_spx_get(ncio *const nciop,
+		off_t offset, size_t extent,
+		int rflags,
+		void **const vpp)
+{
+	ncio_spx *const pxp = (ncio_spx *)nciop->pvt;
+	int status = ENOERR;
+#ifdef X_ALIGN
+	size_t rem;
+#endif
+	
+	if(fIsSet(rflags, RGN_WRITE) && !fIsSet(nciop->ioflags, NC_WRITE))
+		return EPERM; /* attempt to write readonly file */
+
+	assert(extent != 0);
+	assert(extent < X_INT_MAX); /* sanity check */
+
+	assert(pxp->bf_cnt == 0);
+
+#ifdef X_ALIGN
+	rem = (size_t)(offset % X_ALIGN);
+	if(rem != 0)
+	{
+		offset -= rem;
+		extent += rem;
+	}
+
+	{
+		const size_t rndup = extent % X_ALIGN;
+		if(rndup != 0)
+			extent += X_ALIGN - rndup;
+	}
+
+	assert(offset % X_ALIGN == 0);
+	assert(extent % X_ALIGN == 0);
+#endif
+
+	if(pxp->bf_extent < extent)
+	{
+		if(pxp->bf_base != NULL)
+		{
+			free(pxp->bf_base);
+			pxp->bf_base = NULL;
+			pxp->bf_extent = 0;
+		}
+		assert(pxp->bf_extent == 0);
+		pxp->bf_base = malloc(extent);
+		if(pxp->bf_base == NULL)
+			return ENOMEM;
+		pxp->bf_extent = extent;
+	}
+
+	status = px_pgin(nciop, offset,
+		 extent,
+		 pxp->bf_base,
+		 &pxp->bf_cnt, &pxp->pos);
+	if(status != ENOERR)
+		return status;
+
+	pxp->bf_offset = offset;
+
+	if(pxp->bf_cnt < extent)
+		pxp->bf_cnt = extent;
+
+#ifdef X_ALIGN
+	*vpp = (char *)pxp->bf_base + rem;
+#else
+	*vpp = pxp->bf_base;
+#endif
+	return ENOERR;
+}
+
+
+#if 0
+/*ARGSUSED*/
+static int
+strategy(ncio *const nciop, off_t to, off_t offset,
+			size_t extent, int rflags)
+{
+	static ncio_spx pxp[1];
+	int status = ENOERR;
+#ifdef X_ALIGN
+	size_t rem;
+#endif
+	
+	assert(extent != 0);
+	assert(extent < X_INT_MAX); /* sanity check */
+#if INSTRUMENT
+fprintf(stderr, "strategy %ld at %ld to %ld\n",
+	 (long)extent, (long)offset, (long)to);
+#endif
+
+
+#ifdef X_ALIGN
+	rem = (size_t)(offset % X_ALIGN);
+	if(rem != 0)
+	{
+		offset -= rem;
+		extent += rem;
+	}
+
+	{
+		const size_t rndup = extent % X_ALIGN;
+		if(rndup != 0)
+			extent += X_ALIGN - rndup;
+	}
+
+	assert(offset % X_ALIGN == 0);
+	assert(extent % X_ALIGN == 0);
+#endif
+
+	if(pxp->bf_extent < extent)
+	{
+		if(pxp->bf_base != NULL)
+		{
+			free(pxp->bf_base);
+			pxp->bf_base = NULL;
+			pxp->bf_extent = 0;
+		}
+		assert(pxp->bf_extent == 0);
+		pxp->bf_base = malloc(extent);
+		if(pxp->bf_base == NULL)
+			return ENOMEM;
+		pxp->bf_extent = extent;
+	}
+
+	status = px_pgin(nciop, offset,
+		 extent,
+		 pxp->bf_base,
+		 &pxp->bf_cnt, &pxp->pos);
+	if(status != ENOERR)
+		return status;
+
+	pxp->bf_offset = to; /* TODO: XALIGN */
+	
+	if(pxp->bf_cnt < extent)
+		pxp->bf_cnt = extent;
+
+	status = px_pgout(nciop, pxp->bf_offset,
+		pxp->bf_cnt,
+		pxp->bf_base, &pxp->pos);
+	/* if error, invalidate buffer anyway */
+	pxp->bf_offset = OFF_NONE;
+	pxp->bf_cnt = 0;
+	return status;
+}
+#endif
+
+/* Copy one region to another without making anything available to
+   higher layers. May be just implemented in terms of get() and rel(),
+   or may be tricky to be efficient.  Only used in by nc_enddef()
+   after redefinition.
+
+   nciop - pointer to ncio struct for this file.
+   to - dest for move?
+   from - src for move?
+   nbytes - number of bytes to move.
+   rflags - One of the RGN_* flags defined in ncio.h.
+*/
+static int
+ncio_spx_move(ncio *const nciop, off_t to, off_t from,
+			size_t nbytes, int rflags)
+{
+	int status = ENOERR;
+	off_t lower = from;	
+	off_t upper = to;
+	char *base;
+	size_t diff;
+	size_t extent;
+
+	rflags &= RGN_NOLOCK; /* filter unwanted flags */
+
+	if(to == from)
+		return ENOERR; /* NOOP */
+	
+	if(to > from)
+	{
+		/* growing */
+		lower = from;	
+		upper = to;
+	}
+	else
+	{
+		/* shrinking */
+		lower = to;
+		upper = from;
+	}
+
+	diff = (size_t)(upper - lower);
+	extent = diff + nbytes;
+
+	status = ncio_spx_get(nciop, lower, extent, RGN_WRITE|rflags,
+			(void **)&base);
+
+	if(status != ENOERR)
+		return status;
+
+	if(to > from)
+		(void) memmove(base + diff, base, nbytes); 
+	else
+		(void) memmove(base, base + diff, nbytes); 
+		
+	(void) ncio_spx_rel(nciop, lower, RGN_MODIFIED);
+
+	return status;
+}
+
+
+/*ARGSUSED*/
+/* Flush any buffers to disk. May be a no-op on if I/O is unbuffered.
+*/
+static int
+ncio_spx_sync(ncio *const nciop)
+{
+	/* NOOP */
+	return ENOERR;
+}
+
+static void
+ncio_spx_freepvt(void *const pvt)
+{
+	ncio_spx *const pxp = (ncio_spx *)pvt;
+	if(pxp == NULL)
+		return;
+
+	if(pxp->bf_base != NULL)
+	{
+		free(pxp->bf_base);
+		pxp->bf_base = NULL;
+		pxp->bf_offset = OFF_NONE;
+		pxp->bf_extent = 0;
+		pxp->bf_cnt = 0;
+	}
+}
+
+
+/* This does the second half of the ncio_spx struct initialization for
+   POSIX systems, with NC_SHARE on. 
+
+   nciop - pointer to ncio struct for this file. File has been opened.
+   sizehintp - pointer to a size which will be rounded up to the
+   nearest 8-byt boundary and then used as the max size "chunk" (or
+   page) to read from the file. 
+*/
+static int
+ncio_spx_init2(ncio *const nciop, const size_t *const sizehintp)
+{
+	ncio_spx *const pxp = (ncio_spx *)nciop->pvt;
+
+	assert(nciop->fd >= 0);
+
+	pxp->bf_extent = *sizehintp;
+
+	assert(pxp->bf_base == NULL);
+
+	/* this is separate allocation because it may grow */
+	pxp->bf_base = malloc(pxp->bf_extent);
+	if(pxp->bf_base == NULL)
+	{
+		pxp->bf_extent = 0;
+		return ENOMEM;
+	}
+	/* else */
+	return ENOERR;
+}
+
+
+/* First half of init for ncio_spx struct, setting the rel, get, move,
+   snyc, and free function pointers to the NC_SHARE versions of these
+   functions (i.e. the ncio_spx_* functions).
+*/
+static void
+ncio_spx_init(ncio *const nciop)
+{
+	ncio_spx *const pxp = (ncio_spx *)nciop->pvt;
+
+	*((ncio_relfunc **)&nciop->rel) = ncio_spx_rel; /* cast away const */
+	*((ncio_getfunc **)&nciop->get) = ncio_spx_get; /* cast away const */
+	*((ncio_movefunc **)&nciop->move) = ncio_spx_move; /* cast away const */
+	*((ncio_syncfunc **)&nciop->sync) = ncio_spx_sync; /* cast away const */
+	/* shared with _px_ */
+	*((ncio_filesizefunc **)&nciop->filesize) = ncio_px_filesize; /* cast away const */
+	*((ncio_pad_lengthfunc **)&nciop->pad_length) = ncio_px_pad_length; /* cast away const */
+	*((ncio_closefunc **)&nciop->close) = ncio_spx_close; /* cast away const */
+
+	pxp->pos = -1;
+	pxp->bf_offset = OFF_NONE;
+	pxp->bf_extent = 0;
+	pxp->bf_cnt = 0;
+	pxp->bf_base = NULL;
+}
+
+
+/* */
+
+/* This will call whatever free function is attached to the free
+   function pointer in ncio. It's called from ncio_close, and from
+   ncio_open and ncio_create when an error occurs that the file
+   metadata must be freed.
+*/
+static void
+ncio_px_free(ncio *nciop)
+{
+	if(nciop == NULL)
+		return;
+	if(nciop->pvt != NULL)
+		ncio_px_freepvt(nciop->pvt);
+	free(nciop);
+}
+
+static void
+ncio_spx_free(ncio *nciop)
+{
+	if(nciop == NULL)
+		return;
+	if(nciop->pvt != NULL)
+		ncio_spx_freepvt(nciop->pvt);
+	free(nciop);
+}
+
+
+/* Create a new ncio struct to hold info about the file. This will
+   create and init the ncio_px or ncio_spx struct (the latter if
+   NC_SHARE is used.)
+*/
+static ncio *
+ncio_px_new(const char *path, int ioflags)
+{
+	size_t sz_ncio = M_RNDUP(sizeof(ncio));
+	size_t sz_path = M_RNDUP(strlen(path) +1);
+	size_t sz_ncio_pvt;
+	ncio *nciop;
+ 
+#if ALWAYS_NC_SHARE /* DEBUG */
+	fSet(ioflags, NC_SHARE);
+#endif
+
+	if(fIsSet(ioflags, NC_SHARE))
+		sz_ncio_pvt = sizeof(ncio_spx);
+	else
+		sz_ncio_pvt = sizeof(ncio_px);
+
+	nciop = (ncio *) malloc(sz_ncio + sz_path + sz_ncio_pvt);
+	if(nciop == NULL)
+		return NULL;
+	
+	nciop->ioflags = ioflags;
+	*((int *)&nciop->fd) = -1; /* cast away const */
+
+	nciop->path = (char *) ((char *)nciop + sz_ncio);
+	(void) strcpy((char *)nciop->path, path); /* cast away const */
+
+				/* cast away const */
+	*((void **)&nciop->pvt) = (void *)(nciop->path + sz_path);
+
+	if(fIsSet(ioflags, NC_SHARE))
+		ncio_spx_init(nciop);
+	else
+		ncio_px_init(nciop);
+
+	return nciop;
+}
+
+
+/* Public below this point */
+#ifndef NCIO_MINBLOCKSIZE
+#define NCIO_MINBLOCKSIZE 256
+#endif
+#ifndef NCIO_MAXBLOCKSIZE
+#define NCIO_MAXBLOCKSIZE 268435456 /* sanity check, about X_SIZE_T_MAX/8 */
+#endif
+
+#ifdef S_IRUSR
+#define NC_DEFAULT_CREAT_MODE \
+        (S_IRUSR|S_IWUSR|S_IRGRP|S_IWGRP|S_IROTH|S_IWOTH) /* 0666 */
+
+#else
+#define NC_DEFAULT_CREAT_MODE 0666
+#endif
+
+/* Create a file, and the ncio struct to go with it. This funtion is
+   only called from nc__create_mp.
+
+   path - path of file to create.
+   ioflags - flags from nc_create
+   initialsz - From the netcdf man page: "The argument
+   Iinitialsize sets the initial size of the file at creation time."
+   igeto - 
+   igetsz - 
+   sizehintp - this eventually goes into pxp->blksz and is the size of
+   a page of data for buffered reads and writes.
+   nciopp - pointer to a pointer that will get location of newly
+   created and inited ncio struct.
+   igetvpp - pointer to pointer which will get the location of ?
+*/
+int
+posixio_create(const char *path, int ioflags,
+	size_t initialsz,
+	off_t igeto, size_t igetsz, size_t *sizehintp,
+	ncio **nciopp, void **const igetvpp)
+{
+	ncio *nciop;
+	int oflags = (O_RDWR|O_CREAT);
+	int fd;
+	int status;
+
+	if(initialsz < (size_t)igeto + igetsz)
+		initialsz = (size_t)igeto + igetsz;
+
+	fSet(ioflags, NC_WRITE);
+
+	if(path == NULL || *path == 0)
+		return EINVAL;
+
+	nciop = ncio_px_new(path, ioflags);
+	if(nciop == NULL)
+		return ENOMEM;
+
+	if(fIsSet(ioflags, NC_NOCLOBBER))
+		fSet(oflags, O_EXCL);
+	else
+		fSet(oflags, O_TRUNC);
+#ifdef O_BINARY
+	fSet(oflags, O_BINARY);
+#endif
+#ifdef vms
+	fd = open(path, oflags, NC_DEFAULT_CREAT_MODE, "ctx=stm");
+#else
+	/* Should we mess with the mode based on NC_SHARE ?? */
+	fd = open(path, oflags, NC_DEFAULT_CREAT_MODE);
+#endif
+#if 0
+	(void) fprintf(stderr, "ncio_create(): path=\"%s\"\n", path);
+	(void) fprintf(stderr, "ncio_create(): oflags=0x%x\n", oflags);
+#endif
+	if(fd < 0)
+	{
+		status = errno;
+		goto unwind_new;
+	}
+	*((int *)&nciop->fd) = fd; /* cast away const */
+
+	if(*sizehintp < NCIO_MINBLOCKSIZE)
+	{
+		/* Use default */
+		*sizehintp = blksize(fd);
+	}
+	else if(*sizehintp >= NCIO_MAXBLOCKSIZE)
+	{
+		/* Use maximum allowed value */
+		*sizehintp = NCIO_MAXBLOCKSIZE;
+	}
+	else
+	{
+		*sizehintp = M_RNDUP(*sizehintp);
+	}
+
+	if(fIsSet(nciop->ioflags, NC_SHARE))
+		status = ncio_spx_init2(nciop, sizehintp);
+	else
+		status = ncio_px_init2(nciop, sizehintp, 1);
+
+	if(status != ENOERR)
+		goto unwind_open;
+
+	if(initialsz != 0)
+	{
+		status = fgrow(fd, (off_t)initialsz);
+		if(status != ENOERR)
+			goto unwind_open;
+	}
+
+	if(igetsz != 0)
+	{
+		status = nciop->get(nciop,
+				igeto, igetsz,
+                        	RGN_WRITE,
+                        	igetvpp);
+		if(status != ENOERR)
+			goto unwind_open;
+	}
+
+	*nciopp = nciop;
+	return ENOERR;
+
+unwind_open:
+	(void) close(fd);
+	/* ?? unlink */
+	/*FALLTHRU*/
+unwind_new:
+	ncio_close(nciop,!fIsSet(ioflags, NC_NOCLOBBER));
+	return status;
+}
+
+
+/* This function opens the data file. It is only called from nc.c,
+   from nc__open_mp and nc_delete_mp.
+
+   path - path of data file.
+
+   ioflags - flags passed into nc_open.
+   
+   igeto - looks like this function can do an initial page get, and
+   igeto is going to be the offset for that. But it appears to be
+   unused 
+
+   igetsz - the size in bytes of initial page get (a.k.a. extent). Not
+   ever used in the library.
+   
+   sizehintp - pointer to sizehint parameter from nc__open or
+   nc__create. This is used to set pxp->blksz. 
+   
+   Here's what the man page has to say:
+
+   "The argument referenced by chunksize controls a space versus time
+   tradeoff, memory allocated in the netcdf library versus number of
+   system calls.
+
+   Because of internal requirements, the value may not be set to
+   exactly the value requested. The actual value chosen is returned by reference.
+
+   Using the value NC_SIZEHINT_DEFAULT causes the library to choose a
+   default. How the system choses the default depends on the
+   system. On many systems, the "preferred I/O block size" is
+   available from the stat() system call, struct stat member
+   st_blksize. If this is available it is used. Lacking that, twice
+   the system pagesize is used. Lacking a call to discover the system
+   pagesize, we just set default chunksize to 8192.
+
+   The chunksize is a property of a given open netcdf descriptor ncid,
+   it is not a persistent property of the netcdf dataset."
+
+   nciopp - pointer to pointer that will get address of newly created
+   and inited ncio struct.
+
+   igetvpp - handle to pass back pointer to data from inital page
+   read, if this were ever used, which it isn't.
+*/
+int
+posixio_open(const char *path,
+	int ioflags,
+	off_t igeto, size_t igetsz, size_t *sizehintp,
+	ncio **nciopp, void **const igetvpp)
+{
+	ncio *nciop;
+	int oflags = fIsSet(ioflags, NC_WRITE) ? O_RDWR : O_RDONLY;
+	int fd;
+	int status;
+
+	if(path == NULL || *path == 0)
+		return EINVAL;
+
+	nciop = ncio_px_new(path, ioflags);
+	if(nciop == NULL)
+		return ENOMEM;
+
+#ifdef O_BINARY
+	fSet(oflags, O_BINARY);
+#endif
+#ifdef vms
+	fd = open(path, oflags, 0, "ctx=stm");
+#else
+	fd = open(path, oflags, 0);
+#endif
+	if(fd < 0)
+	{
+		status = errno;
+		goto unwind_new;
+	}
+	*((int *)&nciop->fd) = fd; /* cast away const */
+
+	if(*sizehintp < NCIO_MINBLOCKSIZE)
+	{
+		/* Use default */
+		*sizehintp = blksize(fd);
+	}
+	else if(*sizehintp >= NCIO_MAXBLOCKSIZE)
+	{
+		/* Use maximum allowed value */
+		*sizehintp = NCIO_MAXBLOCKSIZE;
+	}
+	else
+	{
+		*sizehintp = M_RNDUP(*sizehintp);
+	}
+
+	if(fIsSet(nciop->ioflags, NC_SHARE))
+		status = ncio_spx_init2(nciop, sizehintp);
+	else
+		status = ncio_px_init2(nciop, sizehintp, 0);
+
+	if(status != ENOERR)
+		goto unwind_open;
+
+	if(igetsz != 0)
+	{
+		status = nciop->get(nciop,
+				igeto, igetsz,
+                        	0,
+                        	igetvpp);
+		if(status != ENOERR)
+			goto unwind_open;
+	}
+
+	*nciopp = nciop;
+	return ENOERR;
+
+unwind_open:
+	(void) close(fd);
+	/*FALLTHRU*/
+unwind_new:
+	ncio_close(nciop,0);
+	return status;
+}
+
+/* 
+ * Get file size in bytes.
+ */
+static int
+ncio_px_filesize(ncio *nciop, off_t *filesizep)
+{
+    struct stat sb;
+
+    assert(nciop != NULL);
+    if (fstat(nciop->fd, &sb) < 0)
+	return errno;
+    *filesizep = sb.st_size;
+    return ENOERR;
+}
+
+/*
+ * Sync any changes to disk, then truncate or extend file so its size
+ * is length.  This is only intended to be called before close, if the
+ * file is open for writing and the actual size does not match the
+ * calculated size, perhaps as the result of having been previously
+ * written in NOFILL mode.
+ */
+static int
+ncio_px_pad_length(ncio *nciop, off_t length)
+{
+	int status = ENOERR;
+
+	if(nciop == NULL)
+		return EINVAL;
+
+	if(!fIsSet(nciop->ioflags, NC_WRITE))
+	        return EPERM; /* attempt to write readonly file */
+
+	status = nciop->sync(nciop);
+	if(status != ENOERR)
+	        return status;
+
+ 	status = fgrow2(nciop->fd, length);
+ 	if(status != ENOERR)
+	        return status;
+	return ENOERR;
+}
+
+
+/* Write out any dirty buffers to disk and
+   ensure that next read will get data from disk.
+
+   Sync any changes, then close the open file associated with the ncio
+   struct, and free its memory.
+   
+   nciop - pointer to ncio to close.
+
+   doUnlink - if true, unlink file
+*/
+static int 
+ncio_px_close(ncio *nciop, int doUnlink)
+{
+	int status = ENOERR;
+	if(nciop == NULL)
+		return EINVAL;
+	status = nciop->sync(nciop);
+	(void) close(nciop->fd);
+	if(doUnlink)
+		(void) unlink(nciop->path);
+	ncio_px_free(nciop);
+	return status;
+}
+
+static int 
+ncio_spx_close(ncio *nciop, int doUnlink)
+{
+	int status = ENOERR;
+	if(nciop == NULL)
+		return EINVAL;
+	status = nciop->sync(nciop);
+	(void) close(nciop->fd);
+	if(doUnlink)
+		(void) unlink(nciop->path);
+	ncio_spx_free(nciop);
+	return status;
+}
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/src_netcdf4/pstdint.h
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/src_netcdf4/pstdint.h	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/src_netcdf4/pstdint.h	(revision 1749)
@@ -0,0 +1,799 @@
+/*  A portable stdint.h
+ ****************************************************************************
+ *  BSD License:
+ ****************************************************************************
+ *
+ *  Copyright (c) 2005-2007 Paul Hsieh
+ *  All rights reserved.
+ *  
+ *  Redistribution and use in source and binary forms, with or without
+ *  modification, are permitted provided that the following conditions
+ *  are met:
+ *  
+ *  1. Redistributions of source code must retain the above copyright
+ *     notice, this list of conditions and the following disclaimer.
+ *  2. Redistributions in binary form must reproduce the above copyright
+ *     notice, this list of conditions and the following disclaimer in the
+ *     documentation and/or other materials provided with the distribution.
+ *  3. The name of the author may not be used to endorse or promote products
+ *     derived from this software without specific prior written permission.
+ *  
+ *  THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+ *  IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ *  OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ *  IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
+ *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ *  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ *  DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ *  THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ *  (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ *  THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ ****************************************************************************
+ *
+ *  Version 0.1.11
+ *
+ *  The ANSI C standard committee, for the C99 standard, specified the
+ *  inclusion of a new standard include file called stdint.h.  This is
+ *  a very useful and long desired include file which contains several
+ *  very precise definitions for integer scalar types that is
+ *  critically important for making portable several classes of
+ *  applications including cryptography, hashing, variable length
+ *  integer libraries and so on.  But for most developers its likely
+ *  useful just for programming sanity.
+ *
+ *  The problem is that most compiler vendors have decided not to
+ *  implement the C99 standard, and the next C++ language standard
+ *  (which has a lot more mindshare these days) will be a long time in
+ *  coming and its unknown whether or not it will include stdint.h or
+ *  how much adoption it will have.  Either way, it will be a long time
+ *  before all compilers come with a stdint.h and it also does nothing
+ *  for the extremely large number of compilers available today which
+ *  do not include this file, or anything comparable to it.
+ *
+ *  So that's what this file is all about.  Its an attempt to build a
+ *  single universal include file that works on as many platforms as
+ *  possible to deliver what stdint.h is supposed to.  A few things
+ *  that should be noted about this file:
+ *
+ *    1) It is not guaranteed to be portable and/or present an identical
+ *       interface on all platforms.  The extreme variability of the
+ *       ANSI C standard makes this an impossibility right from the
+ *       very get go. Its really only meant to be useful for the vast
+ *       majority of platforms that possess the capability of
+ *       implementing usefully and precisely defined, standard sized
+ *       integer scalars.  Systems which are not intrinsically 2s
+ *       complement may produce invalid constants.
+ *
+ *    2) There is an unavoidable use of non-reserved symbols.
+ *
+ *    3) Other standard include files are invoked.
+ *
+ *    4) This file may come in conflict with future platforms that do
+ *       include stdint.h.  The hope is that one or the other can be
+ *       used with no real difference.
+ *
+ *    5) In the current verison, if your platform can't represent
+ *       int32_t, int16_t and int8_t, it just dumps out with a compiler
+ *       error.
+ *
+ *    6) 64 bit integers may or may not be defined.  Test for their
+ *       presence with the test: #ifdef INT64_MAX or #ifdef UINT64_MAX.
+ *       Note that this is different from the C99 specification which
+ *       requires the existence of 64 bit support in the compiler.  If
+ *       this is not defined for your platform, yet it is capable of
+ *       dealing with 64 bits then it is because this file has not yet
+ *       been extended to cover all of your system's capabilities.
+ *
+ *    7) (u)intptr_t may or may not be defined.  Test for its presence
+ *       with the test: #ifdef PTRDIFF_MAX.  If this is not defined
+ *       for your platform, then it is because this file has not yet
+ *       been extended to cover all of your system's capabilities, not
+ *       because its optional.
+ *
+ *    8) The following might not been defined even if your platform is
+ *       capable of defining it:
+ *
+ *       WCHAR_MIN
+ *       WCHAR_MAX
+ *       (u)int64_t
+ *       PTRDIFF_MIN
+ *       PTRDIFF_MAX
+ *       (u)intptr_t
+ *
+ *    9) The following have not been defined:
+ *
+ *       WINT_MIN
+ *       WINT_MAX
+ *
+ *   10) The criteria for defining (u)int_least(*)_t isn't clear,
+ *       except for systems which don't have a type that precisely
+ *       defined 8, 16, or 32 bit types (which this include file does
+ *       not support anyways). Default definitions have been given.
+ *
+ *   11) The criteria for defining (u)int_fast(*)_t isn't something I
+ *       would trust to any particular compiler vendor or the ANSI C
+ *       committee.  It is well known that "compatible systems" are
+ *       commonly created that have very different performance
+ *       characteristics from the systems they are compatible with,
+ *       especially those whose vendors make both the compiler and the
+ *       system.  Default definitions have been given, but its strongly
+ *       recommended that users never use these definitions for any
+ *       reason (they do *NOT* deliver any serious guarantee of
+ *       improved performance -- not in this file, nor any vendor's
+ *       stdint.h).
+ *
+ *   12) The following macros:
+ *
+ *       PRINTF_INTMAX_MODIFIER
+ *       PRINTF_INT64_MODIFIER
+ *       PRINTF_INT32_MODIFIER
+ *       PRINTF_INT16_MODIFIER
+ *       PRINTF_LEAST64_MODIFIER
+ *       PRINTF_LEAST32_MODIFIER
+ *       PRINTF_LEAST16_MODIFIER
+ *       PRINTF_INTPTR_MODIFIER
+ *
+ *       are strings which have been defined as the modifiers required
+ *       for the "d", "u" and "x" printf formats to correctly output
+ *       (u)intmax_t, (u)int64_t, (u)int32_t, (u)int16_t, (u)least64_t,
+ *       (u)least32_t, (u)least16_t and (u)intptr_t types respectively.
+ *       PRINTF_INTPTR_MODIFIER is not defined for some systems which
+ *       provide their own stdint.h.  PRINTF_INT64_MODIFIER is not
+ *       defined if INT64_MAX is not defined.  These are an extension
+ *       beyond what C99 specifies must be in stdint.h.
+ *
+ *       In addition, the following macros are defined:
+ *
+ *       PRINTF_INTMAX_HEX_WIDTH
+ *       PRINTF_INT64_HEX_WIDTH
+ *       PRINTF_INT32_HEX_WIDTH
+ *       PRINTF_INT16_HEX_WIDTH
+ *       PRINTF_INT8_HEX_WIDTH
+ *       PRINTF_INTMAX_DEC_WIDTH
+ *       PRINTF_INT64_DEC_WIDTH
+ *       PRINTF_INT32_DEC_WIDTH
+ *       PRINTF_INT16_DEC_WIDTH
+ *       PRINTF_INT8_DEC_WIDTH
+ *
+ *       Which specifies the maximum number of characters required to
+ *       print the number of that type in either hexadecimal or decimal.
+ *       These are an extension beyond what C99 specifies must be in
+ *       stdint.h.
+ *
+ *  Compilers tested (all with 0 warnings at their highest respective
+ *  settings): Borland Turbo C 2.0, WATCOM C/C++ 11.0 (16 bits and 32
+ *  bits), Microsoft Visual C++ 6.0 (32 bit), Microsoft Visual Studio
+ *  .net (VC7), Intel C++ 4.0, GNU gcc v3.3.3
+ *
+ *  This file should be considered a work in progress.  Suggestions for
+ *  improvements, especially those which increase coverage are strongly
+ *  encouraged.
+ *
+ *  Acknowledgements
+ *
+ *  The following people have made significant contributions to the
+ *  development and testing of this file:
+ *
+ *  Chris Howie
+ *  John Steele Scott
+ *  Dave Thorup
+ *
+ */
+
+#include <stddef.h>
+#include <limits.h>
+#include <signal.h>
+
+/*
+ *  For gcc with _STDINT_H, fill in the PRINTF_INT*_MODIFIER macros, and
+ *  do nothing else.  On the Mac OS X version of gcc this is _STDINT_H_.
+ */
+
+#if ((defined(__STDC__) && __STDC__ && __STDC_VERSION__ >= 199901L) || (defined (__WATCOMC__) && (defined (_STDINT_H_INCLUDED) || __WATCOMC__ >= 1250)) || (defined(__GNUC__) && (defined(_STDINT_H) || defined(_STDINT_H_)) )) && !defined (_PSTDINT_H_INCLUDED)
+#include <stdint.h>
+#define _PSTDINT_H_INCLUDED
+# ifndef PRINTF_INT64_MODIFIER
+#  define PRINTF_INT64_MODIFIER "ll"
+# endif
+# ifndef PRINTF_INT32_MODIFIER
+#  define PRINTF_INT32_MODIFIER "l"
+# endif
+# ifndef PRINTF_INT16_MODIFIER
+#  define PRINTF_INT16_MODIFIER "h"
+# endif
+# ifndef PRINTF_INTMAX_MODIFIER
+#  define PRINTF_INTMAX_MODIFIER PRINTF_INT64_MODIFIER
+# endif
+# ifndef PRINTF_INT64_HEX_WIDTH
+#  define PRINTF_INT64_HEX_WIDTH "16"
+# endif
+# ifndef PRINTF_INT32_HEX_WIDTH
+#  define PRINTF_INT32_HEX_WIDTH "8"
+# endif
+# ifndef PRINTF_INT16_HEX_WIDTH
+#  define PRINTF_INT16_HEX_WIDTH "4"
+# endif
+# ifndef PRINTF_INT8_HEX_WIDTH
+#  define PRINTF_INT8_HEX_WIDTH "2"
+# endif
+# ifndef PRINTF_INT64_DEC_WIDTH
+#  define PRINTF_INT64_DEC_WIDTH "20"
+# endif
+# ifndef PRINTF_INT32_DEC_WIDTH
+#  define PRINTF_INT32_DEC_WIDTH "10"
+# endif
+# ifndef PRINTF_INT16_DEC_WIDTH
+#  define PRINTF_INT16_DEC_WIDTH "5"
+# endif
+# ifndef PRINTF_INT8_DEC_WIDTH
+#  define PRINTF_INT8_DEC_WIDTH "3"
+# endif
+# ifndef PRINTF_INTMAX_HEX_WIDTH
+#  define PRINTF_INTMAX_HEX_WIDTH PRINTF_INT64_HEX_WIDTH
+# endif
+# ifndef PRINTF_INTMAX_DEC_WIDTH
+#  define PRINTF_INTMAX_DEC_WIDTH PRINTF_INT64_DEC_WIDTH
+# endif
+
+/*
+ *  Something really weird is going on with Open Watcom.  Just pull some of
+ *  these duplicated definitions from Open Watcom's stdint.h file for now.
+ */
+
+# if defined (__WATCOMC__) && __WATCOMC__ >= 1250
+#  if !defined (INT64_C)
+#   define INT64_C(x)   (x + (INT64_MAX - INT64_MAX))
+#  endif
+#  if !defined (UINT64_C)
+#   define UINT64_C(x)  (x + (UINT64_MAX - UINT64_MAX))
+#  endif
+#  if !defined (INT32_C)
+#   define INT32_C(x)   (x + (INT32_MAX - INT32_MAX))
+#  endif
+#  if !defined (UINT32_C)
+#   define UINT32_C(x)  (x + (UINT32_MAX - UINT32_MAX))
+#  endif
+#  if !defined (INT16_C)
+#   define INT16_C(x)   (x)
+#  endif
+#  if !defined (UINT16_C)
+#   define UINT16_C(x)  (x)
+#  endif
+#  if !defined (INT8_C)
+#   define INT8_C(x)   (x)
+#  endif
+#  if !defined (UINT8_C)
+#   define UINT8_C(x)  (x)
+#  endif
+#  if !defined (UINT64_MAX)
+#   define UINT64_MAX  18446744073709551615ULL
+#  endif
+#  if !defined (INT64_MAX)
+#   define INT64_MAX  9223372036854775807LL
+#  endif
+#  if !defined (UINT32_MAX)
+#   define UINT32_MAX  4294967295UL
+#  endif
+#  if !defined (INT32_MAX)
+#   define INT32_MAX  2147483647L
+#  endif
+#  if !defined (INTMAX_MAX)
+#   define INTMAX_MAX INT64_MAX
+#  endif
+#  if !defined (INTMAX_MIN)
+#   define INTMAX_MIN INT64_MIN
+#  endif
+# endif
+#endif
+
+#ifndef _PSTDINT_H_INCLUDED
+#define _PSTDINT_H_INCLUDED
+
+#ifndef SIZE_MAX
+# define SIZE_MAX (~(size_t)0)
+#endif
+
+/*
+ *  Deduce the type assignments from limits.h under the assumption that
+ *  integer sizes in bits are powers of 2, and follow the ANSI
+ *  definitions.
+ */
+
+#ifndef UINT8_MAX
+# define UINT8_MAX 0xff
+#endif
+#ifndef uint8_t
+# if (UCHAR_MAX == UINT8_MAX) || defined (S_SPLINT_S)
+    typedef unsigned char uint8_t;
+#   define UINT8_C(v) ((uint8_t) v)
+# else
+#   error "Platform not supported"
+# endif
+#endif
+
+#ifndef INT8_MAX
+# define INT8_MAX 0x7f
+#endif
+#ifndef INT8_MIN
+# define INT8_MIN INT8_C(0x80)
+#endif
+#ifndef int8_t
+# if (SCHAR_MAX == INT8_MAX) || defined (S_SPLINT_S)
+    typedef signed char int8_t;
+#   define INT8_C(v) ((int8_t) v)
+# else
+#   error "Platform not supported"
+# endif
+#endif
+
+#ifndef UINT16_MAX
+# define UINT16_MAX 0xffff
+#endif
+#ifndef uint16_t
+#if (UINT_MAX == UINT16_MAX) || defined (S_SPLINT_S)
+  typedef unsigned int uint16_t;
+# ifndef PRINTF_INT16_MODIFIER
+#  define PRINTF_INT16_MODIFIER ""
+# endif
+# define UINT16_C(v) ((uint16_t) (v))
+#elif (USHRT_MAX == UINT16_MAX)
+  typedef unsigned short uint16_t;
+# define UINT16_C(v) ((uint16_t) (v))
+# ifndef PRINTF_INT16_MODIFIER
+#  define PRINTF_INT16_MODIFIER "h"
+# endif
+#else
+#error "Platform not supported"
+#endif
+#endif
+
+#ifndef INT16_MAX
+# define INT16_MAX 0x7fff
+#endif
+#ifndef INT16_MIN
+# define INT16_MIN INT16_C(0x8000)
+#endif
+#ifndef int16_t
+#if (INT_MAX == INT16_MAX) || defined (S_SPLINT_S)
+  typedef signed int int16_t;
+# define INT16_C(v) ((int16_t) (v))
+# ifndef PRINTF_INT16_MODIFIER
+#  define PRINTF_INT16_MODIFIER ""
+# endif
+#elif (SHRT_MAX == INT16_MAX)
+  typedef signed short int16_t;
+# define INT16_C(v) ((int16_t) (v))
+# ifndef PRINTF_INT16_MODIFIER
+#  define PRINTF_INT16_MODIFIER "h"
+# endif
+#else
+#error "Platform not supported"
+#endif
+#endif
+
+#ifndef UINT32_MAX
+# define UINT32_MAX (0xffffffffUL)
+#endif
+#ifndef uint32_t
+#if (ULONG_MAX == UINT32_MAX) || defined (S_SPLINT_S)
+  typedef unsigned long uint32_t;
+# define UINT32_C(v) v ## UL
+# ifndef PRINTF_INT32_MODIFIER
+#  define PRINTF_INT32_MODIFIER "l"
+# endif
+#elif (UINT_MAX == UINT32_MAX)
+  typedef unsigned int uint32_t;
+# ifndef PRINTF_INT32_MODIFIER
+#  define PRINTF_INT32_MODIFIER ""
+# endif
+# define UINT32_C(v) v ## U
+#elif (USHRT_MAX == UINT32_MAX)
+  typedef unsigned short uint32_t;
+# define UINT32_C(v) ((unsigned short) (v))
+# ifndef PRINTF_INT32_MODIFIER
+#  define PRINTF_INT32_MODIFIER ""
+# endif
+#else
+#error "Platform not supported"
+#endif
+#endif
+
+#ifndef INT32_MAX
+# define INT32_MAX (0x7fffffffL)
+#endif
+#ifndef INT32_MIN
+# define INT32_MIN INT32_C(0x80000000)
+#endif
+#ifndef int32_t
+#if (LONG_MAX == INT32_MAX) || defined (S_SPLINT_S)
+  typedef signed long int32_t;
+# define INT32_C(v) v ## L
+# ifndef PRINTF_INT32_MODIFIER
+#  define PRINTF_INT32_MODIFIER "l"
+# endif
+#elif (INT_MAX == INT32_MAX)
+  typedef signed int int32_t;
+# define INT32_C(v) v
+# ifndef PRINTF_INT32_MODIFIER
+#  define PRINTF_INT32_MODIFIER ""
+# endif
+#elif (SHRT_MAX == INT32_MAX)
+  typedef signed short int32_t;
+# define INT32_C(v) ((short) (v))
+# ifndef PRINTF_INT32_MODIFIER
+#  define PRINTF_INT32_MODIFIER ""
+# endif
+#else
+#error "Platform not supported"
+#endif
+#endif
+
+/*
+ *  The macro stdint_int64_defined is temporarily used to record
+ *  whether or not 64 integer support is available.  It must be
+ *  defined for any 64 integer extensions for new platforms that are
+ *  added.
+ */
+
+#undef stdint_int64_defined
+#if (defined(__STDC__) && defined(__STDC_VERSION__)) || defined (S_SPLINT_S)
+# if (__STDC__ && __STDC_VERSION >= 199901L) || defined (S_SPLINT_S)
+#  define stdint_int64_defined
+   typedef long long int64_t;
+   typedef unsigned long long uint64_t;
+#  define UINT64_C(v) v ## ULL
+#  define  INT64_C(v) v ## LL
+#  ifndef PRINTF_INT64_MODIFIER
+#   define PRINTF_INT64_MODIFIER "ll"
+#  endif
+# endif
+#endif
+
+#if !defined (stdint_int64_defined)
+# if defined(__GNUC__)
+#  define stdint_int64_defined
+   __extension__ typedef long long int64_t;
+   __extension__ typedef unsigned long long uint64_t;
+#  define UINT64_C(v) v ## ULL
+#  define  INT64_C(v) v ## LL
+#  ifndef PRINTF_INT64_MODIFIER
+#   define PRINTF_INT64_MODIFIER "ll"
+#  endif
+# elif defined(__MWERKS__) || defined (__SUNPRO_C) || defined (__SUNPRO_CC) || defined (__APPLE_CC__) || defined (_LONG_LONG) || defined (_CRAYC) || defined (S_SPLINT_S)
+#  define stdint_int64_defined
+   typedef long long int64_t;
+   typedef unsigned long long uint64_t;
+#  define UINT64_C(v) v ## ULL
+#  define  INT64_C(v) v ## LL
+#  ifndef PRINTF_INT64_MODIFIER
+#   define PRINTF_INT64_MODIFIER "ll"
+#  endif
+# elif (defined(__WATCOMC__) && defined(__WATCOM_INT64__)) || (defined(_MSC_VER) && _INTEGRAL_MAX_BITS >= 64) || (defined (__BORLANDC__) && __BORLANDC__ > 0x460) || defined (__alpha) || defined (__DECC)
+#  define stdint_int64_defined
+   typedef __int64 int64_t;
+   typedef unsigned __int64 uint64_t;
+#  define UINT64_C(v) v ## UI64
+#  define  INT64_C(v) v ## I64
+#  ifndef PRINTF_INT64_MODIFIER
+#   define PRINTF_INT64_MODIFIER "I64"
+#  endif
+# endif
+#endif
+
+#if !defined (LONG_LONG_MAX) && defined (INT64_C)
+# define LONG_LONG_MAX INT64_C (9223372036854775807)
+#endif
+#ifndef ULONG_LONG_MAX
+# define ULONG_LONG_MAX UINT64_C (18446744073709551615)
+#endif
+
+#if !defined (INT64_MAX) && defined (INT64_C)
+# define INT64_MAX INT64_C (9223372036854775807)
+#endif
+#if !defined (INT64_MIN) && defined (INT64_C)
+# define INT64_MIN INT64_C (-9223372036854775808)
+#endif
+#if !defined (UINT64_MAX) && defined (INT64_C)
+# define UINT64_MAX UINT64_C (18446744073709551615)
+#endif
+
+/*
+ *  Width of hexadecimal for number field.
+ */
+
+#ifndef PRINTF_INT64_HEX_WIDTH
+# define PRINTF_INT64_HEX_WIDTH "16"
+#endif
+#ifndef PRINTF_INT32_HEX_WIDTH
+# define PRINTF_INT32_HEX_WIDTH "8"
+#endif
+#ifndef PRINTF_INT16_HEX_WIDTH
+# define PRINTF_INT16_HEX_WIDTH "4"
+#endif
+#ifndef PRINTF_INT8_HEX_WIDTH
+# define PRINTF_INT8_HEX_WIDTH "2"
+#endif
+
+#ifndef PRINTF_INT64_DEC_WIDTH
+# define PRINTF_INT64_DEC_WIDTH "20"
+#endif
+#ifndef PRINTF_INT32_DEC_WIDTH
+# define PRINTF_INT32_DEC_WIDTH "10"
+#endif
+#ifndef PRINTF_INT16_DEC_WIDTH
+# define PRINTF_INT16_DEC_WIDTH "5"
+#endif
+#ifndef PRINTF_INT8_DEC_WIDTH
+# define PRINTF_INT8_DEC_WIDTH "3"
+#endif
+
+/*
+ *  Ok, lets not worry about 128 bit integers for now.  Moore's law says
+ *  we don't need to worry about that until about 2040 at which point
+ *  we'll have bigger things to worry about.
+ */
+
+#ifdef stdint_int64_defined
+  typedef int64_t intmax_t;
+  typedef uint64_t uintmax_t;
+# define  INTMAX_MAX   INT64_MAX
+# define  INTMAX_MIN   INT64_MIN
+# define UINTMAX_MAX  UINT64_MAX
+# define UINTMAX_C(v) UINT64_C(v)
+# define  INTMAX_C(v)  INT64_C(v)
+# ifndef PRINTF_INTMAX_MODIFIER
+#   define PRINTF_INTMAX_MODIFIER PRINTF_INT64_MODIFIER
+# endif
+# ifndef PRINTF_INTMAX_HEX_WIDTH
+#  define PRINTF_INTMAX_HEX_WIDTH PRINTF_INT64_HEX_WIDTH
+# endif
+# ifndef PRINTF_INTMAX_DEC_WIDTH
+#  define PRINTF_INTMAX_DEC_WIDTH PRINTF_INT64_DEC_WIDTH
+# endif
+#else
+  typedef int32_t intmax_t;
+  typedef uint32_t uintmax_t;
+# define  INTMAX_MAX   INT32_MAX
+# define UINTMAX_MAX  UINT32_MAX
+# define UINTMAX_C(v) UINT32_C(v)
+# define  INTMAX_C(v)  INT32_C(v)
+# ifndef PRINTF_INTMAX_MODIFIER
+#   define PRINTF_INTMAX_MODIFIER PRINTF_INT32_MODIFIER
+# endif
+# ifndef PRINTF_INTMAX_HEX_WIDTH
+#  define PRINTF_INTMAX_HEX_WIDTH PRINTF_INT32_HEX_WIDTH
+# endif
+# ifndef PRINTF_INTMAX_DEC_WIDTH
+#  define PRINTF_INTMAX_DEC_WIDTH PRINTF_INT32_DEC_WIDTH
+# endif
+#endif
+
+/*
+ *  Because this file currently only supports platforms which have
+ *  precise powers of 2 as bit sizes for the default integers, the
+ *  least definitions are all trivial.  Its possible that a future
+ *  version of this file could have different definitions.
+ */
+
+#ifndef stdint_least_defined
+  typedef   int8_t   int_least8_t;
+  typedef  uint8_t  uint_least8_t;
+  typedef  int16_t  int_least16_t;
+  typedef uint16_t uint_least16_t;
+  typedef  int32_t  int_least32_t;
+  typedef uint32_t uint_least32_t;
+# define PRINTF_LEAST32_MODIFIER PRINTF_INT32_MODIFIER
+# define PRINTF_LEAST16_MODIFIER PRINTF_INT16_MODIFIER
+# define  UINT_LEAST8_MAX  UINT8_MAX
+# define   INT_LEAST8_MAX   INT8_MAX
+# define UINT_LEAST16_MAX UINT16_MAX
+# define  INT_LEAST16_MAX  INT16_MAX
+# define UINT_LEAST32_MAX UINT32_MAX
+# define  INT_LEAST32_MAX  INT32_MAX
+# define   INT_LEAST8_MIN   INT8_MIN
+# define  INT_LEAST16_MIN  INT16_MIN
+# define  INT_LEAST32_MIN  INT32_MIN
+# ifdef stdint_int64_defined
+    typedef  int64_t  int_least64_t;
+    typedef uint64_t uint_least64_t;
+#   define PRINTF_LEAST64_MODIFIER PRINTF_INT64_MODIFIER
+#   define UINT_LEAST64_MAX UINT64_MAX
+#   define  INT_LEAST64_MAX  INT64_MAX
+#   define  INT_LEAST64_MIN  INT64_MIN
+# endif
+#endif
+#undef stdint_least_defined
+
+/*
+ *  The ANSI C committee pretending to know or specify anything about
+ *  performance is the epitome of misguided arrogance.  The mandate of
+ *  this file is to *ONLY* ever support that absolute minimum
+ *  definition of the fast integer types, for compatibility purposes.
+ *  No extensions, and no attempt to suggest what may or may not be a
+ *  faster integer type will ever be made in this file.  Developers are
+ *  warned to stay away from these types when using this or any other
+ *  stdint.h.
+ */
+
+typedef   int_least8_t   int_fast8_t;
+typedef  uint_least8_t  uint_fast8_t;
+typedef  int_least16_t  int_fast16_t;
+typedef uint_least16_t uint_fast16_t;
+typedef  int_least32_t  int_fast32_t;
+typedef uint_least32_t uint_fast32_t;
+#define  UINT_FAST8_MAX  UINT_LEAST8_MAX
+#define   INT_FAST8_MAX   INT_LEAST8_MAX
+#define UINT_FAST16_MAX UINT_LEAST16_MAX
+#define  INT_FAST16_MAX  INT_LEAST16_MAX
+#define UINT_FAST32_MAX UINT_LEAST32_MAX
+#define  INT_FAST32_MAX  INT_LEAST32_MAX
+#define   INT_FAST8_MIN   INT_LEAST8_MIN
+#define  INT_FAST16_MIN  INT_LEAST16_MIN
+#define  INT_FAST32_MIN  INT_LEAST32_MIN
+#ifdef stdint_int64_defined
+  typedef  int_least64_t  int_fast64_t;
+  typedef uint_least64_t uint_fast64_t;
+# define UINT_FAST64_MAX UINT_LEAST64_MAX
+# define  INT_FAST64_MAX  INT_LEAST64_MAX
+# define  INT_FAST64_MIN  INT_LEAST64_MIN
+#endif
+
+#undef stdint_int64_defined
+
+/*
+ *  Whatever piecemeal, per compiler thing we can do about the wchar_t
+ *  type limits.
+ */
+
+#if defined(__WATCOMC__) || defined(_MSC_VER) || defined (__GNUC__)
+# include <wchar.h>
+# ifndef WCHAR_MIN
+#  define WCHAR_MIN 0
+# endif
+# ifndef WCHAR_MAX
+#  define WCHAR_MAX ((wchar_t)-1)
+# endif
+#endif
+
+/*
+ *  Whatever piecemeal, per compiler/platform thing we can do about the
+ *  (u)intptr_t types and limits.
+ */
+
+#if defined (_MSC_VER) && defined (_UINTPTR_T_DEFINED)
+# define STDINT_H_UINTPTR_T_DEFINED
+#endif
+
+#ifndef STDINT_H_UINTPTR_T_DEFINED
+# if defined (__alpha__) || defined (__ia64__) || defined (__x86_64__) || defined (_WIN64)
+#  define stdint_intptr_bits 64
+# elif defined (__WATCOMC__) || defined (__TURBOC__)
+#  if defined(__TINY__) || defined(__SMALL__) || defined(__MEDIUM__)
+#    define stdint_intptr_bits 16
+#  else
+#    define stdint_intptr_bits 32
+#  endif
+# elif defined (__i386__) || defined (_WIN32) || defined (WIN32)
+#  define stdint_intptr_bits 32
+# elif defined (__INTEL_COMPILER)
+/* TODO -- what will Intel do about x86-64? */
+# endif
+
+# ifdef stdint_intptr_bits
+#  define stdint_intptr_glue3_i(a,b,c)  a##b##c
+#  define stdint_intptr_glue3(a,b,c)    stdint_intptr_glue3_i(a,b,c)
+#  ifndef PRINTF_INTPTR_MODIFIER
+#    define PRINTF_INTPTR_MODIFIER      stdint_intptr_glue3(PRINTF_INT,stdint_intptr_bits,_MODIFIER)
+#  endif
+#  ifndef PTRDIFF_MAX
+#    define PTRDIFF_MAX                 stdint_intptr_glue3(INT,stdint_intptr_bits,_MAX)
+#  endif
+#  ifndef PTRDIFF_MIN
+#    define PTRDIFF_MIN                 stdint_intptr_glue3(INT,stdint_intptr_bits,_MIN)
+#  endif
+#  ifndef UINTPTR_MAX
+#    define UINTPTR_MAX                 stdint_intptr_glue3(UINT,stdint_intptr_bits,_MAX)
+#  endif
+#  ifndef INTPTR_MAX
+#    define INTPTR_MAX                  stdint_intptr_glue3(INT,stdint_intptr_bits,_MAX)
+#  endif
+#  ifndef INTPTR_MIN
+#    define INTPTR_MIN                  stdint_intptr_glue3(INT,stdint_intptr_bits,_MIN)
+#  endif
+#  ifndef INTPTR_C
+#    define INTPTR_C(x)                 stdint_intptr_glue3(INT,stdint_intptr_bits,_C)(x)
+#  endif
+#  ifndef UINTPTR_C
+#    define UINTPTR_C(x)                stdint_intptr_glue3(UINT,stdint_intptr_bits,_C)(x)
+#  endif
+  typedef stdint_intptr_glue3(uint,stdint_intptr_bits,_t) uintptr_t;
+  typedef stdint_intptr_glue3( int,stdint_intptr_bits,_t)  intptr_t;
+# else
+/* TODO -- This following is likely wrong for some platforms, and does
+   nothing for the definition of uintptr_t. */
+  typedef ptrdiff_t intptr_t;
+# endif
+# define STDINT_H_UINTPTR_T_DEFINED
+#endif
+
+/*
+ *  Assumes sig_atomic_t is signed and we have a 2s complement machine.
+ */
+
+#ifndef SIG_ATOMIC_MAX
+# define SIG_ATOMIC_MAX ((((sig_atomic_t) 1) << (sizeof (sig_atomic_t)*CHAR_BIT-1)) - 1)
+#endif
+
+#endif
+
+#if defined (__TEST_PSTDINT_FOR_CORRECTNESS)
+
+/* 
+ *  Please compile with the maximum warning settings to make sure macros are not
+ *  defined more than once.
+ */
+ 
+#include <stdlib.h>
+#include <stdio.h>
+#include <string.h>
+ 
+#define glue3_aux(x,y,z) x ## y ## z
+#define glue3(x,y,z) glue3_aux(x,y,z)
+
+#define DECLU(bits) glue3(uint,bits,_t) glue3(u,bits,=) glue3(UINT,bits,_C) (0);
+#define DECLI(bits) glue3(int,bits,_t) glue3(i,bits,=) glue3(INT,bits,_C) (0);
+
+#define DECL(us,bits) glue3(DECL,us,) (bits)
+
+#define TESTUMAX(bits) glue3(u,bits,=) glue3(~,u,bits); if (glue3(UINT,bits,_MAX) glue3(!=,u,bits)) printf ("Something wrong with UINT%d_MAX\n", bits)
+ 
+int main () {
+	DECL(I,8)
+	DECL(U,8)
+	DECL(I,16)
+	DECL(U,16)
+	DECL(I,32)
+	DECL(U,32)
+#ifdef INT64_MAX
+	DECL(I,64)
+	DECL(U,64)
+#endif
+	intmax_t imax = INTMAX_C(0);
+	uintmax_t umax = UINTMAX_C(0);
+	char str0[256], str1[256];
+
+	sprintf (str0, "%d %x\n", 0, ~0);
+	
+	sprintf (str1, "%d %x\n",  i8, ~0);
+	if (0 != strcmp (str0, str1)) printf ("Something wrong with i8 : %s\n", str1);
+	sprintf (str1, "%u %x\n",  u8, ~0);
+	if (0 != strcmp (str0, str1)) printf ("Something wrong with u8 : %s\n", str1);
+	sprintf (str1, "%d %x\n",  i16, ~0);
+	if (0 != strcmp (str0, str1)) printf ("Something wrong with i16 : %s\n", str1);
+	sprintf (str1, "%u %x\n",  u16, ~0);
+	if (0 != strcmp (str0, str1)) printf ("Something wrong with u16 : %s\n", str1);	
+	sprintf (str1, "%" PRINTF_INT32_MODIFIER "d %x\n",  i32, ~0);
+	if (0 != strcmp (str0, str1)) printf ("Something wrong with i32 : %s\n", str1);
+	sprintf (str1, "%" PRINTF_INT32_MODIFIER "u %x\n",  u32, ~0);
+	if (0 != strcmp (str0, str1)) printf ("Something wrong with u32 : %s\n", str1);
+#ifdef INT64_MAX	
+	sprintf (str1, "%" PRINTF_INT64_MODIFIER "d %x\n",  i64, ~0);
+	if (0 != strcmp (str0, str1)) printf ("Something wrong with i64 : %s\n", str1);
+#endif
+	sprintf (str1, "%" PRINTF_INTMAX_MODIFIER "d %x\n",  imax, ~0);
+	if (0 != strcmp (str0, str1)) printf ("Something wrong with imax : %s\n", str1);
+	sprintf (str1, "%" PRINTF_INTMAX_MODIFIER "u %x\n",  umax, ~0);
+	if (0 != strcmp (str0, str1)) printf ("Something wrong with umax : %s\n", str1);	
+	
+	TESTUMAX(8);
+	TESTUMAX(16);
+	TESTUMAX(32);
+#ifdef INT64_MAX
+	TESTUMAX(64);
+#endif
+
+	return EXIT_SUCCESS;
+}
+
+#endif
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/src_netcdf4/putget.c
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/src_netcdf4/putget.c	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/src_netcdf4/putget.c	(revision 1749)
@@ -0,0 +1,5362 @@
+/* Do not edit this file. It is produced from the corresponding .m4 source */
+/*
+ *	Copyright 1996, University Corporation for Atmospheric Research
+ *      See netcdf/COPYRIGHT file for copying and redistribution conditions.
+ */
+/* $Id: putget.m4,v 2.79 2010/05/29 22:25:01 russ Exp $ */
+
+#include "config.h"
+#include <string.h>
+#include <stdlib.h>
+#include <assert.h>
+
+#include "netcdf.h"
+#include "nc.h"
+#include "ncx.h"
+#include "fbits.h"
+#include "onstack.h"
+#ifdef LOCKNUMREC
+#  include <mpp/shmem.h>	/* for SGI/Cray SHMEM routines */
+#  ifdef LN_TEST
+#    include <stdio.h>
+#  endif
+#endif
+#include "nc3dispatch.h"
+
+
+#undef MIN  /* system may define MIN somewhere and complain */
+#define MIN(mm,nn) (((mm) < (nn)) ? (mm) : (nn))
+
+static int
+readNCv(const NC* ncp, const NC_var* varp, const size_t* start,
+        const size_t nelems, void* value, const nc_type memtype);
+static int
+writeNCv(NC* ncp, const NC_var* varp, const size_t* start,
+         const size_t nelems, const void* value, const nc_type memtype);
+
+
+/* #define ODEBUG 1 */
+
+#if ODEBUG
+#include <stdio.h>
+/*
+ * Print the values of an array of size_t
+ */
+void
+arrayp(const char *label, size_t count, const size_t *array)
+{
+	(void) fprintf(stderr, "%s", label);
+	(void) fputc('\t',stderr);	
+	for(; count > 0; count--, array++)
+		(void) fprintf(stderr," %lu", (unsigned long)*array);
+	(void) fputc('\n',stderr);	
+}
+#endif /* ODEBUG */
+
+
+/* Begin fill */
+/*
+ * This is tunable parameter.
+ * It essentially controls the tradeoff between the number of times
+ * memcpy() gets called to copy the external data to fill 
+ * a large buffer vs the number of times its called to
+ * prepare the external data.
+ */
+#if	_SX
+/* NEC SX specific optimization */
+#define	NFILL	2048
+#else
+#define	NFILL	16
+#endif
+
+
+
+/*
+ * Next 6 type specific functions
+ * Fill a some memory with the default special value.
+ * Formerly
+NC_arrayfill()
+ */
+static int
+NC_fill_schar(
+	void **xpp,
+	size_t nelems)	/* how many */
+{
+	schar fillp[NFILL * sizeof(double)/X_SIZEOF_CHAR];
+
+	assert(nelems <= sizeof(fillp)/sizeof(fillp[0]));
+
+	{
+		schar *vp = fillp;	/* lower bound of area to be filled */
+		const schar *const end = vp + nelems;
+		while(vp < end)
+		{
+			*vp++ = NC_FILL_BYTE;
+		}
+	}
+	return ncx_putn_schar_schar(xpp, nelems, fillp);
+}
+
+static int
+NC_fill_char(
+	void **xpp,
+	size_t nelems)	/* how many */
+{
+	char fillp[NFILL * sizeof(double)/X_SIZEOF_CHAR];
+
+	assert(nelems <= sizeof(fillp)/sizeof(fillp[0]));
+
+	{
+		char *vp = fillp;	/* lower bound of area to be filled */
+		const char *const end = vp + nelems;
+		while(vp < end)
+		{
+			*vp++ = NC_FILL_CHAR;
+		}
+	}
+	return ncx_putn_char_char(xpp, nelems, fillp);
+}
+
+static int
+NC_fill_short(
+	void **xpp,
+	size_t nelems)	/* how many */
+{
+	short fillp[NFILL * sizeof(double)/X_SIZEOF_SHORT];
+
+	assert(nelems <= sizeof(fillp)/sizeof(fillp[0]));
+
+	{
+		short *vp = fillp;	/* lower bound of area to be filled */
+		const short *const end = vp + nelems;
+		while(vp < end)
+		{
+			*vp++ = NC_FILL_SHORT;
+		}
+	}
+	return ncx_putn_short_short(xpp, nelems, fillp);
+}
+
+
+#if (SIZEOF_INT >= X_SIZEOF_INT)
+static int
+NC_fill_int(
+	void **xpp,
+	size_t nelems)	/* how many */
+{
+	int fillp[NFILL * sizeof(double)/X_SIZEOF_INT];
+
+	assert(nelems <= sizeof(fillp)/sizeof(fillp[0]));
+
+	{
+		int *vp = fillp;	/* lower bound of area to be filled */
+		const int *const end = vp + nelems;
+		while(vp < end)
+		{
+			*vp++ = NC_FILL_INT;
+		}
+	}
+	return ncx_putn_int_int(xpp, nelems, fillp);
+}
+
+#elif SIZEOF_LONG == X_SIZEOF_INT
+static int
+NC_fill_int(
+	void **xpp,
+	size_t nelems)	/* how many */
+{
+	long fillp[NFILL * sizeof(double)/X_SIZEOF_INT];
+
+	assert(nelems <= sizeof(fillp)/sizeof(fillp[0]));
+
+	{
+		long *vp = fillp;	/* lower bound of area to be filled */
+		const long *const end = vp + nelems;
+		while(vp < end)
+		{
+			*vp++ = NC_FILL_INT;
+		}
+	}
+	return ncx_putn_int_long(xpp, nelems, fillp);
+}
+
+#else
+#error "NC_fill_int implementation"
+#endif
+
+static int
+NC_fill_float(
+	void **xpp,
+	size_t nelems)	/* how many */
+{
+	float fillp[NFILL * sizeof(double)/X_SIZEOF_FLOAT];
+
+	assert(nelems <= sizeof(fillp)/sizeof(fillp[0]));
+
+	{
+		float *vp = fillp;	/* lower bound of area to be filled */
+		const float *const end = vp + nelems;
+		while(vp < end)
+		{
+			*vp++ = NC_FILL_FLOAT;
+		}
+	}
+	return ncx_putn_float_float(xpp, nelems, fillp);
+}
+
+static int
+NC_fill_double(
+	void **xpp,
+	size_t nelems)	/* how many */
+{
+	double fillp[NFILL * sizeof(double)/X_SIZEOF_DOUBLE];
+
+	assert(nelems <= sizeof(fillp)/sizeof(fillp[0]));
+
+	{
+		double *vp = fillp;	/* lower bound of area to be filled */
+		const double *const end = vp + nelems;
+		while(vp < end)
+		{
+			*vp++ = NC_FILL_DOUBLE;
+		}
+	}
+	return ncx_putn_double_double(xpp, nelems, fillp);
+}
+
+
+
+
+
+/* 
+ * Fill the external space for variable 'varp' values at 'recno' with
+ * the appropriate value. If 'varp' is not a record variable, fill the
+ * whole thing.  For the special case when 'varp' is the only record
+ * variable and it is of type byte, char, or short, varsize should be
+ * ncp->recsize, otherwise it should be varp->len.
+ * Formerly
+xdr_NC_fill()
+ */
+int
+fill_NC_var(NC *ncp, const NC_var *varp, size_t varsize, size_t recno)
+{
+	char xfillp[NFILL * X_SIZEOF_DOUBLE];
+	const size_t step = varp->xsz;
+	const size_t nelems = sizeof(xfillp)/step;
+	const size_t xsz = varp->xsz * nelems;
+	NC_attr **attrpp = NULL;
+	off_t offset;
+	size_t remaining = varsize;
+
+	void *xp;
+	int status = NC_NOERR;
+
+	/*
+	 * Set up fill value
+	 */
+	attrpp = NC_findattr(&varp->attrs, _FillValue);
+	if( attrpp != NULL )
+	{
+		/* User defined fill value */
+		if( (*attrpp)->type != varp->type || (*attrpp)->nelems != 1 )
+		{
+			return NC_EBADTYPE;
+		}
+		else
+		{
+			/* Use the user defined value */
+			char *cp = xfillp;
+			const char *const end = &xfillp[sizeof(xfillp)];
+
+			assert(step <= (*attrpp)->xsz);
+
+			for( /*NADA*/; cp < end; cp += step)
+			{
+				(void) memcpy(cp, (*attrpp)->xvalue, step);
+			}
+		}
+	}
+	else
+	{
+		/* use the default */
+		
+		assert(xsz % X_ALIGN == 0);
+		assert(xsz <= sizeof(xfillp));
+	
+		xp = xfillp;
+	
+		switch(varp->type){
+		case NC_BYTE :
+			status = NC_fill_schar(&xp, nelems);
+			break;
+		case NC_CHAR :
+			status = NC_fill_char(&xp, nelems);
+			break;
+		case NC_SHORT :
+			status = NC_fill_short(&xp, nelems);
+			break;
+		case NC_INT :
+			status = NC_fill_int(&xp, nelems);
+			break;
+		case NC_FLOAT :
+			status = NC_fill_float(&xp, nelems);
+			break;
+		case NC_DOUBLE : 
+			status = NC_fill_double(&xp, nelems);
+			break;
+		default :
+			assert("fill_NC_var invalid type" == 0);
+			status = NC_EBADTYPE;
+			break;
+		}
+		if(status != NC_NOERR)
+			return status;
+	
+		assert(xp == xfillp + xsz);
+	}
+
+	/*
+	 * copyout:
+	 * xfillp now contains 'nelems' elements of the fill value
+	 * in external representation.
+	 */
+
+	/*
+	 * Copy it out.
+	 */
+
+	offset = varp->begin;
+	if(IS_RECVAR(varp))
+	{
+		offset += (off_t)ncp->recsize * recno;
+	}
+
+	assert(remaining > 0);
+	for(;;)
+	{
+		const size_t chunksz = MIN(remaining, ncp->chunk);
+		size_t ii;
+
+		status = ncio_get(ncp->nciop, offset, chunksz,
+				 RGN_WRITE, &xp);	
+		if(status != NC_NOERR)
+		{
+			return status;
+		}
+
+		/*
+		 * fill the chunksz buffer in units  of xsz
+		 */
+		for(ii = 0; ii < chunksz/xsz; ii++)
+		{
+			(void) memcpy(xp, xfillp, xsz);
+			xp = (char *)xp + xsz;
+		}
+		/*
+		 * Deal with any remainder
+		 */
+		{
+			const size_t rem = chunksz % xsz;
+			if(rem != 0)
+			{
+				(void) memcpy(xp, xfillp, rem);
+				/* xp = (char *)xp + xsz; */
+			}
+
+		}
+
+		status = ncio_rel(ncp->nciop, offset, RGN_MODIFIED);
+
+		if(status != NC_NOERR)
+		{
+			break;
+		}
+
+		remaining -= chunksz;
+		if(remaining == 0)
+			break;	/* normal loop exit */
+		offset += chunksz;
+
+	}
+
+	return status;
+}
+/* End fill */
+
+
+/*
+ * Add a record containing the fill values.
+ */
+static int
+NCfillrecord(NC *ncp, const NC_var *const *varpp, size_t recno)
+{
+	size_t ii = 0;
+	for(; ii < ncp->vars.nelems; ii++, varpp++)
+	{
+		if( !IS_RECVAR(*varpp) )
+		{
+			continue;	/* skip non-record variables */
+		}
+		{
+		const int status = fill_NC_var(ncp, *varpp, (*varpp)->len, recno);
+		if(status != NC_NOERR)
+			return status;
+		}
+	}
+	return NC_NOERR;
+}
+
+
+/*
+ * Add a record containing the fill values in the special case when
+ * there is exactly one record variable, where we don't require each
+ * record to be four-byte aligned (no record padding).
+ */
+static int
+NCfillspecialrecord(NC *ncp, const NC_var *varp, size_t recno)
+{
+    int status;
+    assert(IS_RECVAR(varp));
+    status = fill_NC_var(ncp, varp, ncp->recsize, recno);
+    if(status != NC_NOERR)
+	return status;
+    return NC_NOERR;
+}
+
+
+/*
+ * It is advantageous to
+ * #define TOUCH_LAST
+ * when using memory mapped io.
+ */
+#if TOUCH_LAST
+/*
+ * Grow the file to a size which can contain recno
+ */
+static int
+NCtouchlast(NC *ncp, const NC_var *const *varpp, size_t recno)
+{
+	int status = NC_NOERR;
+	const NC_var *varp = NULL;
+	
+	{
+	size_t ii = 0;
+	for(; ii < ncp->vars.nelems; ii++, varpp++)
+	{
+		if( !IS_RECVAR(*varpp) )
+		{
+			continue;	/* skip non-record variables */
+		}
+		varp = *varpp;
+	}
+	}
+	assert(varp != NULL);
+	assert( IS_RECVAR(varp) );
+	{
+		const off_t offset = varp->begin
+				+ (off_t)(recno-1) * (off_t)ncp->recsize
+				+ (off_t)(varp->len - varp->xsz);
+		void *xp;
+
+
+		status = ncio_get(ncp->nciop, offset, varp->xsz,
+				 RGN_WRITE, &xp);	
+		if(status != NC_NOERR)
+			return status;
+		(void)memset(xp, 0, varp->xsz);
+		status = ncio_rel(ncp->nciop, offset, RGN_MODIFIED);
+	}
+	return status;
+}
+#endif /* TOUCH_LAST */
+
+
+/*
+ * Ensure that the netcdf file has 'numrecs' records,
+ * add records and fill as neccessary.
+ */
+static int
+NCvnrecs(NC *ncp, size_t numrecs)
+{
+	int status = NC_NOERR;
+#ifdef LOCKNUMREC
+	ushmem_t myticket = 0, nowserving = 0;
+	ushmem_t numpe = (ushmem_t) _num_pes();
+
+	/* get ticket and wait */
+	myticket = shmem_short_finc((shmem_t *) ncp->lock + LOCKNUMREC_LOCK,
+		ncp->lock[LOCKNUMREC_BASEPE]);
+#ifdef LN_TEST
+		fprintf(stderr,"%d of %d : ticket = %hu\n",
+			_my_pe(), _num_pes(), myticket);
+#endif
+	do {
+		shmem_short_get((shmem_t *) &nowserving,
+			(shmem_t *) ncp->lock + LOCKNUMREC_SERVING, 1,
+			ncp->lock[LOCKNUMREC_BASEPE]);
+#ifdef LN_TEST
+		fprintf(stderr,"%d of %d : serving = %hu\n",
+			_my_pe(), _num_pes(), nowserving);
+#endif
+		/* work-around for non-unique tickets */
+		if (nowserving > myticket && nowserving < myticket + numpe ) {
+			/* get a new ticket ... you've been bypassed */ 
+			/* and handle the unlikely wrap-around effect */
+			myticket = shmem_short_finc(
+				(shmem_t *) ncp->lock + LOCKNUMREC_LOCK,
+				ncp->lock[LOCKNUMREC_BASEPE]);
+#ifdef LN_TEST
+				fprintf(stderr,"%d of %d : new ticket = %hu\n",
+					_my_pe(), _num_pes(), myticket);
+#endif
+		}
+	} while(nowserving != myticket);
+	/* now our turn to check & update value */
+#endif
+
+	if(numrecs > NC_get_numrecs(ncp))
+	{
+
+
+#if TOUCH_LAST
+		status = NCtouchlast(ncp,
+			(const NC_var *const*)ncp->vars.value,
+			numrecs);
+		if(status != NC_NOERR)
+			goto common_return;
+#endif /* TOUCH_LAST */
+
+		set_NC_ndirty(ncp);
+
+		if(!NC_dofill(ncp))
+		{
+			/* Simply set the new numrecs value */
+			NC_set_numrecs(ncp, numrecs);
+		}
+		else
+		{
+		    /* Treat two cases differently: 
+		        - exactly one record variable (no padding)
+                        - multiple record variables (each record padded 
+                          to 4-byte alignment)
+		    */
+		    NC_var **vpp = (NC_var **)ncp->vars.value;
+		    NC_var *const *const end = &vpp[ncp->vars.nelems];
+		    NC_var *recvarp = NULL;	/* last record var */
+		    int numrecvars = 0;
+		    size_t cur_nrecs;
+		    
+		    /* determine how many record variables */
+		    for( /*NADA*/; vpp < end; vpp++) {
+			if(IS_RECVAR(*vpp)) {
+			    recvarp = *vpp;
+			    numrecvars++;
+			}
+		    }
+		    
+		    if (numrecvars != 1) { /* usual case */
+			/* Fill each record out to numrecs */
+			while((cur_nrecs = NC_get_numrecs(ncp)) < numrecs)
+			    {
+				status = NCfillrecord(ncp,
+					(const NC_var *const*)ncp->vars.value,
+					cur_nrecs);
+				if(status != NC_NOERR)
+				{
+					break;
+				}
+				NC_increase_numrecs(ncp, cur_nrecs +1);
+			}
+			if(status != NC_NOERR)
+				goto common_return;
+		    } else {	/* special case */
+			/* Fill each record out to numrecs */
+			while((cur_nrecs = NC_get_numrecs(ncp)) < numrecs)
+			    {
+				status = NCfillspecialrecord(ncp,
+					recvarp,
+					cur_nrecs);
+				if(status != NC_NOERR)
+				{
+					break;
+				}
+				NC_increase_numrecs(ncp, cur_nrecs +1);
+			}
+			if(status != NC_NOERR)
+				goto common_return;
+			
+		    }
+		}
+
+		if(NC_doNsync(ncp))
+		{
+			status = write_numrecs(ncp);
+		}
+
+	}
+common_return:
+#ifdef LOCKNUMREC
+	/* finished with our lock - increment serving number */
+	(void) shmem_short_finc((shmem_t *) ncp->lock + LOCKNUMREC_SERVING,
+		ncp->lock[LOCKNUMREC_BASEPE]);
+#endif
+	return status;
+}
+
+
+/* 
+ * Check whether 'coord' values are valid for the variable.
+ */
+static int
+NCcoordck(NC *ncp, const NC_var *varp, const size_t *coord)
+{
+	const size_t *ip;
+	size_t *up;
+
+	if(varp->ndims == 0)
+		return NC_NOERR;	/* 'scalar' variable */
+
+	if(IS_RECVAR(varp))
+	{
+		if(*coord > X_UINT_MAX) /* rkr: bug fix from previous X_INT_MAX */
+			return NC_EINVALCOORDS; /* sanity check */
+		if(NC_readonly(ncp) && *coord >= NC_get_numrecs(ncp))
+		{
+			if(!NC_doNsync(ncp))
+				return NC_EINVALCOORDS;
+			/* else */
+			{
+				/* Update from disk and check again */
+				const int status = read_numrecs(ncp);
+				if(status != NC_NOERR)
+					return status;
+				if(*coord >= NC_get_numrecs(ncp))
+					return NC_EINVALCOORDS;
+			}
+		}
+		ip = coord + 1;
+		up = varp->shape + 1;
+	}
+	else
+	{
+		ip = coord;
+		up = varp->shape;
+	}
+	
+#ifdef CDEBUG
+fprintf(stderr,"	NCcoordck: coord %ld, count %d, ip %ld\n",
+		coord, varp->ndims, ip );
+#endif /* CDEBUG */
+
+	for(; ip < coord + varp->ndims; ip++, up++)
+	{
+
+#ifdef CDEBUG
+fprintf(stderr,"	NCcoordck: ip %p, *ip %ld, up %p, *up %lu\n",
+			ip, *ip, up, *up );
+#endif /* CDEBUG */
+
+		/* cast needed for braindead systems with signed size_t */
+		if((unsigned long) *ip >= (unsigned long) *up )
+			return NC_EINVALCOORDS;
+	}
+
+	return NC_NOERR;
+}
+
+
+/* 
+ * Check whether 'edges' are valid for the variable and 'start'
+ */
+/*ARGSUSED*/
+static int
+NCedgeck(const NC *ncp, const NC_var *varp,
+	 const size_t *start, const size_t *edges)
+{
+	const size_t *const end = start + varp->ndims;
+	const size_t *shp = varp->shape;
+
+	if(varp->ndims == 0)
+		return NC_NOERR;	/* 'scalar' variable */
+
+	if(IS_RECVAR(varp))
+	{
+		start++;
+		edges++;
+		shp++;
+	}
+
+	for(; start < end; start++, edges++, shp++)
+	{
+		/* cast needed for braindead systems with signed size_t */
+		if((unsigned long) *edges > *shp ||
+			(unsigned long) *start + (unsigned long) *edges > *shp)
+		{
+			return(NC_EEDGE);
+		}
+	}
+	return NC_NOERR;
+}
+
+
+/* 
+ * Translate the (variable, coord) pair into a seek index
+ */
+static off_t
+NC_varoffset(const NC *ncp, const NC_var *varp, const size_t *coord)
+{
+	if(varp->ndims == 0) /* 'scalar' variable */
+		return varp->begin;
+
+	if(varp->ndims == 1)
+	{
+		if(IS_RECVAR(varp))
+			return varp->begin +
+				 (off_t)(*coord) * (off_t)ncp->recsize;
+		/* else */
+		return varp->begin + (off_t)(*coord) * (off_t)varp->xsz;
+	}
+	/* else */
+	{
+		off_t lcoord = (off_t)coord[varp->ndims -1];
+
+		off_t *up = varp->dsizes +1;
+		const size_t *ip = coord;
+		const off_t *const end = varp->dsizes + varp->ndims;
+		
+		if(IS_RECVAR(varp))
+			up++, ip++;
+
+		for(; up < end; up++, ip++)
+			lcoord += (off_t)(*up) * (off_t)(*ip);
+
+		lcoord *= varp->xsz;
+		
+		if(IS_RECVAR(varp))
+			lcoord += (off_t)(*coord) * ncp->recsize;
+		
+		lcoord += varp->begin;
+		return lcoord;
+	}
+}
+
+
+
+static int
+putNCvx_char_char(NC *ncp, const NC_var *varp,
+		 const size_t *start, size_t nelems, const char *value)
+{
+	off_t offset = NC_varoffset(ncp, varp, start);
+	size_t remaining = varp->xsz * nelems;
+	int status = NC_NOERR;
+	void *xp;
+
+	if(nelems == 0)
+		return NC_NOERR;
+
+	assert(value != NULL);
+
+	for(;;)
+	{
+		size_t extent = MIN(remaining, ncp->chunk);
+		size_t nput = ncx_howmany(varp->type, extent);
+
+		int lstatus = ncio_get(ncp->nciop, offset, extent,
+				 RGN_WRITE, &xp);	
+		if(lstatus != NC_NOERR)
+			return lstatus;
+		
+		lstatus = ncx_putn_char_char(&xp, nput, value);
+		if(lstatus != NC_NOERR && status == NC_NOERR)
+		{
+			/* not fatal to the loop */
+			status = lstatus;
+		}
+
+		(void) ncio_rel(ncp->nciop, offset,
+				 RGN_MODIFIED);	
+
+		remaining -= extent;
+		if(remaining == 0)
+			break; /* normal loop exit */
+		offset += extent;
+		value += nput;
+
+	}
+
+	return status;
+}
+
+
+static int
+putNCvx_schar_schar(NC *ncp, const NC_var *varp,
+		 const size_t *start, size_t nelems, const schar *value)
+{
+	off_t offset = NC_varoffset(ncp, varp, start);
+	size_t remaining = varp->xsz * nelems;
+	int status = NC_NOERR;
+	void *xp;
+
+	if(nelems == 0)
+		return NC_NOERR;
+
+	assert(value != NULL);
+
+	for(;;)
+	{
+		size_t extent = MIN(remaining, ncp->chunk);
+		size_t nput = ncx_howmany(varp->type, extent);
+
+		int lstatus = ncio_get(ncp->nciop, offset, extent,
+				 RGN_WRITE, &xp);	
+		if(lstatus != NC_NOERR)
+			return lstatus;
+		
+		lstatus = ncx_putn_schar_schar(&xp, nput, value);
+		if(lstatus != NC_NOERR && status == NC_NOERR)
+		{
+			/* not fatal to the loop */
+			status = lstatus;
+		}
+
+		(void) ncio_rel(ncp->nciop, offset,
+				 RGN_MODIFIED);	
+
+		remaining -= extent;
+		if(remaining == 0)
+			break; /* normal loop exit */
+		offset += extent;
+		value += nput;
+
+	}
+
+	return status;
+}
+
+static int
+putNCvx_schar_uchar(NC *ncp, const NC_var *varp,
+		 const size_t *start, size_t nelems, const uchar *value)
+{
+	off_t offset = NC_varoffset(ncp, varp, start);
+	size_t remaining = varp->xsz * nelems;
+	int status = NC_NOERR;
+	void *xp;
+
+	if(nelems == 0)
+		return NC_NOERR;
+
+	assert(value != NULL);
+
+	for(;;)
+	{
+		size_t extent = MIN(remaining, ncp->chunk);
+		size_t nput = ncx_howmany(varp->type, extent);
+
+		int lstatus = ncio_get(ncp->nciop, offset, extent,
+				 RGN_WRITE, &xp);	
+		if(lstatus != NC_NOERR)
+			return lstatus;
+		
+		lstatus = ncx_putn_schar_uchar(&xp, nput, value);
+		if(lstatus != NC_NOERR && status == NC_NOERR)
+		{
+			/* not fatal to the loop */
+			status = lstatus;
+		}
+
+		(void) ncio_rel(ncp->nciop, offset,
+				 RGN_MODIFIED);	
+
+		remaining -= extent;
+		if(remaining == 0)
+			break; /* normal loop exit */
+		offset += extent;
+		value += nput;
+
+	}
+
+	return status;
+}
+
+static int
+putNCvx_schar_short(NC *ncp, const NC_var *varp,
+		 const size_t *start, size_t nelems, const short *value)
+{
+	off_t offset = NC_varoffset(ncp, varp, start);
+	size_t remaining = varp->xsz * nelems;
+	int status = NC_NOERR;
+	void *xp;
+
+	if(nelems == 0)
+		return NC_NOERR;
+
+	assert(value != NULL);
+
+	for(;;)
+	{
+		size_t extent = MIN(remaining, ncp->chunk);
+		size_t nput = ncx_howmany(varp->type, extent);
+
+		int lstatus = ncio_get(ncp->nciop, offset, extent,
+				 RGN_WRITE, &xp);	
+		if(lstatus != NC_NOERR)
+			return lstatus;
+		
+		lstatus = ncx_putn_schar_short(&xp, nput, value);
+		if(lstatus != NC_NOERR && status == NC_NOERR)
+		{
+			/* not fatal to the loop */
+			status = lstatus;
+		}
+
+		(void) ncio_rel(ncp->nciop, offset,
+				 RGN_MODIFIED);	
+
+		remaining -= extent;
+		if(remaining == 0)
+			break; /* normal loop exit */
+		offset += extent;
+		value += nput;
+
+	}
+
+	return status;
+}
+
+static int
+putNCvx_schar_int(NC *ncp, const NC_var *varp,
+		 const size_t *start, size_t nelems, const int *value)
+{
+	off_t offset = NC_varoffset(ncp, varp, start);
+	size_t remaining = varp->xsz * nelems;
+	int status = NC_NOERR;
+	void *xp;
+
+	if(nelems == 0)
+		return NC_NOERR;
+
+	assert(value != NULL);
+
+	for(;;)
+	{
+		size_t extent = MIN(remaining, ncp->chunk);
+		size_t nput = ncx_howmany(varp->type, extent);
+
+		int lstatus = ncio_get(ncp->nciop, offset, extent,
+				 RGN_WRITE, &xp);	
+		if(lstatus != NC_NOERR)
+			return lstatus;
+		
+		lstatus = ncx_putn_schar_int(&xp, nput, value);
+		if(lstatus != NC_NOERR && status == NC_NOERR)
+		{
+			/* not fatal to the loop */
+			status = lstatus;
+		}
+
+		(void) ncio_rel(ncp->nciop, offset,
+				 RGN_MODIFIED);	
+
+		remaining -= extent;
+		if(remaining == 0)
+			break; /* normal loop exit */
+		offset += extent;
+		value += nput;
+
+	}
+
+	return status;
+}
+
+static int
+putNCvx_schar_float(NC *ncp, const NC_var *varp,
+		 const size_t *start, size_t nelems, const float *value)
+{
+	off_t offset = NC_varoffset(ncp, varp, start);
+	size_t remaining = varp->xsz * nelems;
+	int status = NC_NOERR;
+	void *xp;
+
+	if(nelems == 0)
+		return NC_NOERR;
+
+	assert(value != NULL);
+
+	for(;;)
+	{
+		size_t extent = MIN(remaining, ncp->chunk);
+		size_t nput = ncx_howmany(varp->type, extent);
+
+		int lstatus = ncio_get(ncp->nciop, offset, extent,
+				 RGN_WRITE, &xp);	
+		if(lstatus != NC_NOERR)
+			return lstatus;
+		
+		lstatus = ncx_putn_schar_float(&xp, nput, value);
+		if(lstatus != NC_NOERR && status == NC_NOERR)
+		{
+			/* not fatal to the loop */
+			status = lstatus;
+		}
+
+		(void) ncio_rel(ncp->nciop, offset,
+				 RGN_MODIFIED);	
+
+		remaining -= extent;
+		if(remaining == 0)
+			break; /* normal loop exit */
+		offset += extent;
+		value += nput;
+
+	}
+
+	return status;
+}
+
+static int
+putNCvx_schar_double(NC *ncp, const NC_var *varp,
+		 const size_t *start, size_t nelems, const double *value)
+{
+	off_t offset = NC_varoffset(ncp, varp, start);
+	size_t remaining = varp->xsz * nelems;
+	int status = NC_NOERR;
+	void *xp;
+
+	if(nelems == 0)
+		return NC_NOERR;
+
+	assert(value != NULL);
+
+	for(;;)
+	{
+		size_t extent = MIN(remaining, ncp->chunk);
+		size_t nput = ncx_howmany(varp->type, extent);
+
+		int lstatus = ncio_get(ncp->nciop, offset, extent,
+				 RGN_WRITE, &xp);	
+		if(lstatus != NC_NOERR)
+			return lstatus;
+		
+		lstatus = ncx_putn_schar_double(&xp, nput, value);
+		if(lstatus != NC_NOERR && status == NC_NOERR)
+		{
+			/* not fatal to the loop */
+			status = lstatus;
+		}
+
+		(void) ncio_rel(ncp->nciop, offset,
+				 RGN_MODIFIED);	
+
+		remaining -= extent;
+		if(remaining == 0)
+			break; /* normal loop exit */
+		offset += extent;
+		value += nput;
+
+	}
+
+	return status;
+}
+
+static int
+putNCvx_schar_longlong(NC *ncp, const NC_var *varp,
+		 const size_t *start, size_t nelems, const longlong *value)
+{
+	off_t offset = NC_varoffset(ncp, varp, start);
+	size_t remaining = varp->xsz * nelems;
+	int status = NC_NOERR;
+	void *xp;
+
+	if(nelems == 0)
+		return NC_NOERR;
+
+	assert(value != NULL);
+
+	for(;;)
+	{
+		size_t extent = MIN(remaining, ncp->chunk);
+		size_t nput = ncx_howmany(varp->type, extent);
+
+		int lstatus = ncio_get(ncp->nciop, offset, extent,
+				 RGN_WRITE, &xp);	
+		if(lstatus != NC_NOERR)
+			return lstatus;
+		
+		lstatus = ncx_putn_schar_longlong(&xp, nput, value);
+		if(lstatus != NC_NOERR && status == NC_NOERR)
+		{
+			/* not fatal to the loop */
+			status = lstatus;
+		}
+
+		(void) ncio_rel(ncp->nciop, offset,
+				 RGN_MODIFIED);	
+
+		remaining -= extent;
+		if(remaining == 0)
+			break; /* normal loop exit */
+		offset += extent;
+		value += nput;
+
+	}
+
+	return status;
+}
+
+
+static int
+putNCvx_short_schar(NC *ncp, const NC_var *varp,
+		 const size_t *start, size_t nelems, const schar *value)
+{
+	off_t offset = NC_varoffset(ncp, varp, start);
+	size_t remaining = varp->xsz * nelems;
+	int status = NC_NOERR;
+	void *xp;
+
+	if(nelems == 0)
+		return NC_NOERR;
+
+	assert(value != NULL);
+
+	for(;;)
+	{
+		size_t extent = MIN(remaining, ncp->chunk);
+		size_t nput = ncx_howmany(varp->type, extent);
+
+		int lstatus = ncio_get(ncp->nciop, offset, extent,
+				 RGN_WRITE, &xp);	
+		if(lstatus != NC_NOERR)
+			return lstatus;
+		
+		lstatus = ncx_putn_short_schar(&xp, nput, value);
+		if(lstatus != NC_NOERR && status == NC_NOERR)
+		{
+			/* not fatal to the loop */
+			status = lstatus;
+		}
+
+		(void) ncio_rel(ncp->nciop, offset,
+				 RGN_MODIFIED);	
+
+		remaining -= extent;
+		if(remaining == 0)
+			break; /* normal loop exit */
+		offset += extent;
+		value += nput;
+
+	}
+
+	return status;
+}
+
+static int
+putNCvx_short_uchar(NC *ncp, const NC_var *varp,
+		 const size_t *start, size_t nelems, const uchar *value)
+{
+	off_t offset = NC_varoffset(ncp, varp, start);
+	size_t remaining = varp->xsz * nelems;
+	int status = NC_NOERR;
+	void *xp;
+
+	if(nelems == 0)
+		return NC_NOERR;
+
+	assert(value != NULL);
+
+	for(;;)
+	{
+		size_t extent = MIN(remaining, ncp->chunk);
+		size_t nput = ncx_howmany(varp->type, extent);
+
+		int lstatus = ncio_get(ncp->nciop, offset, extent,
+				 RGN_WRITE, &xp);	
+		if(lstatus != NC_NOERR)
+			return lstatus;
+		
+		lstatus = ncx_putn_short_uchar(&xp, nput, value);
+		if(lstatus != NC_NOERR && status == NC_NOERR)
+		{
+			/* not fatal to the loop */
+			status = lstatus;
+		}
+
+		(void) ncio_rel(ncp->nciop, offset,
+				 RGN_MODIFIED);	
+
+		remaining -= extent;
+		if(remaining == 0)
+			break; /* normal loop exit */
+		offset += extent;
+		value += nput;
+
+	}
+
+	return status;
+}
+
+static int
+putNCvx_short_short(NC *ncp, const NC_var *varp,
+		 const size_t *start, size_t nelems, const short *value)
+{
+	off_t offset = NC_varoffset(ncp, varp, start);
+	size_t remaining = varp->xsz * nelems;
+	int status = NC_NOERR;
+	void *xp;
+
+	if(nelems == 0)
+		return NC_NOERR;
+
+	assert(value != NULL);
+
+	for(;;)
+	{
+		size_t extent = MIN(remaining, ncp->chunk);
+		size_t nput = ncx_howmany(varp->type, extent);
+
+		int lstatus = ncio_get(ncp->nciop, offset, extent,
+				 RGN_WRITE, &xp);	
+		if(lstatus != NC_NOERR)
+			return lstatus;
+		
+		lstatus = ncx_putn_short_short(&xp, nput, value);
+		if(lstatus != NC_NOERR && status == NC_NOERR)
+		{
+			/* not fatal to the loop */
+			status = lstatus;
+		}
+
+		(void) ncio_rel(ncp->nciop, offset,
+				 RGN_MODIFIED);	
+
+		remaining -= extent;
+		if(remaining == 0)
+			break; /* normal loop exit */
+		offset += extent;
+		value += nput;
+
+	}
+
+	return status;
+}
+
+static int
+putNCvx_short_int(NC *ncp, const NC_var *varp,
+		 const size_t *start, size_t nelems, const int *value)
+{
+	off_t offset = NC_varoffset(ncp, varp, start);
+	size_t remaining = varp->xsz * nelems;
+	int status = NC_NOERR;
+	void *xp;
+
+	if(nelems == 0)
+		return NC_NOERR;
+
+	assert(value != NULL);
+
+	for(;;)
+	{
+		size_t extent = MIN(remaining, ncp->chunk);
+		size_t nput = ncx_howmany(varp->type, extent);
+
+		int lstatus = ncio_get(ncp->nciop, offset, extent,
+				 RGN_WRITE, &xp);	
+		if(lstatus != NC_NOERR)
+			return lstatus;
+		
+		lstatus = ncx_putn_short_int(&xp, nput, value);
+		if(lstatus != NC_NOERR && status == NC_NOERR)
+		{
+			/* not fatal to the loop */
+			status = lstatus;
+		}
+
+		(void) ncio_rel(ncp->nciop, offset,
+				 RGN_MODIFIED);	
+
+		remaining -= extent;
+		if(remaining == 0)
+			break; /* normal loop exit */
+		offset += extent;
+		value += nput;
+
+	}
+
+	return status;
+}
+
+static int
+putNCvx_short_float(NC *ncp, const NC_var *varp,
+		 const size_t *start, size_t nelems, const float *value)
+{
+	off_t offset = NC_varoffset(ncp, varp, start);
+	size_t remaining = varp->xsz * nelems;
+	int status = NC_NOERR;
+	void *xp;
+
+	if(nelems == 0)
+		return NC_NOERR;
+
+	assert(value != NULL);
+
+	for(;;)
+	{
+		size_t extent = MIN(remaining, ncp->chunk);
+		size_t nput = ncx_howmany(varp->type, extent);
+
+		int lstatus = ncio_get(ncp->nciop, offset, extent,
+				 RGN_WRITE, &xp);	
+		if(lstatus != NC_NOERR)
+			return lstatus;
+		
+		lstatus = ncx_putn_short_float(&xp, nput, value);
+		if(lstatus != NC_NOERR && status == NC_NOERR)
+		{
+			/* not fatal to the loop */
+			status = lstatus;
+		}
+
+		(void) ncio_rel(ncp->nciop, offset,
+				 RGN_MODIFIED);	
+
+		remaining -= extent;
+		if(remaining == 0)
+			break; /* normal loop exit */
+		offset += extent;
+		value += nput;
+
+	}
+
+	return status;
+}
+
+static int
+putNCvx_short_double(NC *ncp, const NC_var *varp,
+		 const size_t *start, size_t nelems, const double *value)
+{
+	off_t offset = NC_varoffset(ncp, varp, start);
+	size_t remaining = varp->xsz * nelems;
+	int status = NC_NOERR;
+	void *xp;
+
+	if(nelems == 0)
+		return NC_NOERR;
+
+	assert(value != NULL);
+
+	for(;;)
+	{
+		size_t extent = MIN(remaining, ncp->chunk);
+		size_t nput = ncx_howmany(varp->type, extent);
+
+		int lstatus = ncio_get(ncp->nciop, offset, extent,
+				 RGN_WRITE, &xp);	
+		if(lstatus != NC_NOERR)
+			return lstatus;
+		
+		lstatus = ncx_putn_short_double(&xp, nput, value);
+		if(lstatus != NC_NOERR && status == NC_NOERR)
+		{
+			/* not fatal to the loop */
+			status = lstatus;
+		}
+
+		(void) ncio_rel(ncp->nciop, offset,
+				 RGN_MODIFIED);	
+
+		remaining -= extent;
+		if(remaining == 0)
+			break; /* normal loop exit */
+		offset += extent;
+		value += nput;
+
+	}
+
+	return status;
+}
+
+static int
+putNCvx_short_longlong(NC *ncp, const NC_var *varp,
+		 const size_t *start, size_t nelems, const longlong *value)
+{
+	off_t offset = NC_varoffset(ncp, varp, start);
+	size_t remaining = varp->xsz * nelems;
+	int status = NC_NOERR;
+	void *xp;
+
+	if(nelems == 0)
+		return NC_NOERR;
+
+	assert(value != NULL);
+
+	for(;;)
+	{
+		size_t extent = MIN(remaining, ncp->chunk);
+		size_t nput = ncx_howmany(varp->type, extent);
+
+		int lstatus = ncio_get(ncp->nciop, offset, extent,
+				 RGN_WRITE, &xp);	
+		if(lstatus != NC_NOERR)
+			return lstatus;
+		
+		lstatus = ncx_putn_short_longlong(&xp, nput, value);
+		if(lstatus != NC_NOERR && status == NC_NOERR)
+		{
+			/* not fatal to the loop */
+			status = lstatus;
+		}
+
+		(void) ncio_rel(ncp->nciop, offset,
+				 RGN_MODIFIED);	
+
+		remaining -= extent;
+		if(remaining == 0)
+			break; /* normal loop exit */
+		offset += extent;
+		value += nput;
+
+	}
+
+	return status;
+}
+
+
+static int
+putNCvx_int_schar(NC *ncp, const NC_var *varp,
+		 const size_t *start, size_t nelems, const schar *value)
+{
+	off_t offset = NC_varoffset(ncp, varp, start);
+	size_t remaining = varp->xsz * nelems;
+	int status = NC_NOERR;
+	void *xp;
+
+	if(nelems == 0)
+		return NC_NOERR;
+
+	assert(value != NULL);
+
+	for(;;)
+	{
+		size_t extent = MIN(remaining, ncp->chunk);
+		size_t nput = ncx_howmany(varp->type, extent);
+
+		int lstatus = ncio_get(ncp->nciop, offset, extent,
+				 RGN_WRITE, &xp);	
+		if(lstatus != NC_NOERR)
+			return lstatus;
+		
+		lstatus = ncx_putn_int_schar(&xp, nput, value);
+		if(lstatus != NC_NOERR && status == NC_NOERR)
+		{
+			/* not fatal to the loop */
+			status = lstatus;
+		}
+
+		(void) ncio_rel(ncp->nciop, offset,
+				 RGN_MODIFIED);	
+
+		remaining -= extent;
+		if(remaining == 0)
+			break; /* normal loop exit */
+		offset += extent;
+		value += nput;
+
+	}
+
+	return status;
+}
+
+static int
+putNCvx_int_uchar(NC *ncp, const NC_var *varp,
+		 const size_t *start, size_t nelems, const uchar *value)
+{
+	off_t offset = NC_varoffset(ncp, varp, start);
+	size_t remaining = varp->xsz * nelems;
+	int status = NC_NOERR;
+	void *xp;
+
+	if(nelems == 0)
+		return NC_NOERR;
+
+	assert(value != NULL);
+
+	for(;;)
+	{
+		size_t extent = MIN(remaining, ncp->chunk);
+		size_t nput = ncx_howmany(varp->type, extent);
+
+		int lstatus = ncio_get(ncp->nciop, offset, extent,
+				 RGN_WRITE, &xp);	
+		if(lstatus != NC_NOERR)
+			return lstatus;
+		
+		lstatus = ncx_putn_int_uchar(&xp, nput, value);
+		if(lstatus != NC_NOERR && status == NC_NOERR)
+		{
+			/* not fatal to the loop */
+			status = lstatus;
+		}
+
+		(void) ncio_rel(ncp->nciop, offset,
+				 RGN_MODIFIED);	
+
+		remaining -= extent;
+		if(remaining == 0)
+			break; /* normal loop exit */
+		offset += extent;
+		value += nput;
+
+	}
+
+	return status;
+}
+
+static int
+putNCvx_int_short(NC *ncp, const NC_var *varp,
+		 const size_t *start, size_t nelems, const short *value)
+{
+	off_t offset = NC_varoffset(ncp, varp, start);
+	size_t remaining = varp->xsz * nelems;
+	int status = NC_NOERR;
+	void *xp;
+
+	if(nelems == 0)
+		return NC_NOERR;
+
+	assert(value != NULL);
+
+	for(;;)
+	{
+		size_t extent = MIN(remaining, ncp->chunk);
+		size_t nput = ncx_howmany(varp->type, extent);
+
+		int lstatus = ncio_get(ncp->nciop, offset, extent,
+				 RGN_WRITE, &xp);	
+		if(lstatus != NC_NOERR)
+			return lstatus;
+		
+		lstatus = ncx_putn_int_short(&xp, nput, value);
+		if(lstatus != NC_NOERR && status == NC_NOERR)
+		{
+			/* not fatal to the loop */
+			status = lstatus;
+		}
+
+		(void) ncio_rel(ncp->nciop, offset,
+				 RGN_MODIFIED);	
+
+		remaining -= extent;
+		if(remaining == 0)
+			break; /* normal loop exit */
+		offset += extent;
+		value += nput;
+
+	}
+
+	return status;
+}
+
+static int
+putNCvx_int_int(NC *ncp, const NC_var *varp,
+		 const size_t *start, size_t nelems, const int *value)
+{
+	off_t offset = NC_varoffset(ncp, varp, start);
+	size_t remaining = varp->xsz * nelems;
+	int status = NC_NOERR;
+	void *xp;
+
+	if(nelems == 0)
+		return NC_NOERR;
+
+	assert(value != NULL);
+
+	for(;;)
+	{
+		size_t extent = MIN(remaining, ncp->chunk);
+		size_t nput = ncx_howmany(varp->type, extent);
+
+		int lstatus = ncio_get(ncp->nciop, offset, extent,
+				 RGN_WRITE, &xp);	
+		if(lstatus != NC_NOERR)
+			return lstatus;
+		
+		lstatus = ncx_putn_int_int(&xp, nput, value);
+		if(lstatus != NC_NOERR && status == NC_NOERR)
+		{
+			/* not fatal to the loop */
+			status = lstatus;
+		}
+
+		(void) ncio_rel(ncp->nciop, offset,
+				 RGN_MODIFIED);	
+
+		remaining -= extent;
+		if(remaining == 0)
+			break; /* normal loop exit */
+		offset += extent;
+		value += nput;
+
+	}
+
+	return status;
+}
+
+static int
+putNCvx_int_float(NC *ncp, const NC_var *varp,
+		 const size_t *start, size_t nelems, const float *value)
+{
+	off_t offset = NC_varoffset(ncp, varp, start);
+	size_t remaining = varp->xsz * nelems;
+	int status = NC_NOERR;
+	void *xp;
+
+	if(nelems == 0)
+		return NC_NOERR;
+
+	assert(value != NULL);
+
+	for(;;)
+	{
+		size_t extent = MIN(remaining, ncp->chunk);
+		size_t nput = ncx_howmany(varp->type, extent);
+
+		int lstatus = ncio_get(ncp->nciop, offset, extent,
+				 RGN_WRITE, &xp);	
+		if(lstatus != NC_NOERR)
+			return lstatus;
+		
+		lstatus = ncx_putn_int_float(&xp, nput, value);
+		if(lstatus != NC_NOERR && status == NC_NOERR)
+		{
+			/* not fatal to the loop */
+			status = lstatus;
+		}
+
+		(void) ncio_rel(ncp->nciop, offset,
+				 RGN_MODIFIED);	
+
+		remaining -= extent;
+		if(remaining == 0)
+			break; /* normal loop exit */
+		offset += extent;
+		value += nput;
+
+	}
+
+	return status;
+}
+
+static int
+putNCvx_int_double(NC *ncp, const NC_var *varp,
+		 const size_t *start, size_t nelems, const double *value)
+{
+	off_t offset = NC_varoffset(ncp, varp, start);
+	size_t remaining = varp->xsz * nelems;
+	int status = NC_NOERR;
+	void *xp;
+
+	if(nelems == 0)
+		return NC_NOERR;
+
+	assert(value != NULL);
+
+	for(;;)
+	{
+		size_t extent = MIN(remaining, ncp->chunk);
+		size_t nput = ncx_howmany(varp->type, extent);
+
+		int lstatus = ncio_get(ncp->nciop, offset, extent,
+				 RGN_WRITE, &xp);	
+		if(lstatus != NC_NOERR)
+			return lstatus;
+		
+		lstatus = ncx_putn_int_double(&xp, nput, value);
+		if(lstatus != NC_NOERR && status == NC_NOERR)
+		{
+			/* not fatal to the loop */
+			status = lstatus;
+		}
+
+		(void) ncio_rel(ncp->nciop, offset,
+				 RGN_MODIFIED);	
+
+		remaining -= extent;
+		if(remaining == 0)
+			break; /* normal loop exit */
+		offset += extent;
+		value += nput;
+
+	}
+
+	return status;
+}
+
+static int
+putNCvx_int_longlong(NC *ncp, const NC_var *varp,
+		 const size_t *start, size_t nelems, const longlong *value)
+{
+	off_t offset = NC_varoffset(ncp, varp, start);
+	size_t remaining = varp->xsz * nelems;
+	int status = NC_NOERR;
+	void *xp;
+
+	if(nelems == 0)
+		return NC_NOERR;
+
+	assert(value != NULL);
+
+	for(;;)
+	{
+		size_t extent = MIN(remaining, ncp->chunk);
+		size_t nput = ncx_howmany(varp->type, extent);
+
+		int lstatus = ncio_get(ncp->nciop, offset, extent,
+				 RGN_WRITE, &xp);	
+		if(lstatus != NC_NOERR)
+			return lstatus;
+		
+		lstatus = ncx_putn_int_longlong(&xp, nput, value);
+		if(lstatus != NC_NOERR && status == NC_NOERR)
+		{
+			/* not fatal to the loop */
+			status = lstatus;
+		}
+
+		(void) ncio_rel(ncp->nciop, offset,
+				 RGN_MODIFIED);	
+
+		remaining -= extent;
+		if(remaining == 0)
+			break; /* normal loop exit */
+		offset += extent;
+		value += nput;
+
+	}
+
+	return status;
+}
+
+
+static int
+putNCvx_float_schar(NC *ncp, const NC_var *varp,
+		 const size_t *start, size_t nelems, const schar *value)
+{
+	off_t offset = NC_varoffset(ncp, varp, start);
+	size_t remaining = varp->xsz * nelems;
+	int status = NC_NOERR;
+	void *xp;
+
+	if(nelems == 0)
+		return NC_NOERR;
+
+	assert(value != NULL);
+
+	for(;;)
+	{
+		size_t extent = MIN(remaining, ncp->chunk);
+		size_t nput = ncx_howmany(varp->type, extent);
+
+		int lstatus = ncio_get(ncp->nciop, offset, extent,
+				 RGN_WRITE, &xp);	
+		if(lstatus != NC_NOERR)
+			return lstatus;
+		
+		lstatus = ncx_putn_float_schar(&xp, nput, value);
+		if(lstatus != NC_NOERR && status == NC_NOERR)
+		{
+			/* not fatal to the loop */
+			status = lstatus;
+		}
+
+		(void) ncio_rel(ncp->nciop, offset,
+				 RGN_MODIFIED);	
+
+		remaining -= extent;
+		if(remaining == 0)
+			break; /* normal loop exit */
+		offset += extent;
+		value += nput;
+
+	}
+
+	return status;
+}
+
+static int
+putNCvx_float_uchar(NC *ncp, const NC_var *varp,
+		 const size_t *start, size_t nelems, const uchar *value)
+{
+	off_t offset = NC_varoffset(ncp, varp, start);
+	size_t remaining = varp->xsz * nelems;
+	int status = NC_NOERR;
+	void *xp;
+
+	if(nelems == 0)
+		return NC_NOERR;
+
+	assert(value != NULL);
+
+	for(;;)
+	{
+		size_t extent = MIN(remaining, ncp->chunk);
+		size_t nput = ncx_howmany(varp->type, extent);
+
+		int lstatus = ncio_get(ncp->nciop, offset, extent,
+				 RGN_WRITE, &xp);	
+		if(lstatus != NC_NOERR)
+			return lstatus;
+		
+		lstatus = ncx_putn_float_uchar(&xp, nput, value);
+		if(lstatus != NC_NOERR && status == NC_NOERR)
+		{
+			/* not fatal to the loop */
+			status = lstatus;
+		}
+
+		(void) ncio_rel(ncp->nciop, offset,
+				 RGN_MODIFIED);	
+
+		remaining -= extent;
+		if(remaining == 0)
+			break; /* normal loop exit */
+		offset += extent;
+		value += nput;
+
+	}
+
+	return status;
+}
+
+static int
+putNCvx_float_short(NC *ncp, const NC_var *varp,
+		 const size_t *start, size_t nelems, const short *value)
+{
+	off_t offset = NC_varoffset(ncp, varp, start);
+	size_t remaining = varp->xsz * nelems;
+	int status = NC_NOERR;
+	void *xp;
+
+	if(nelems == 0)
+		return NC_NOERR;
+
+	assert(value != NULL);
+
+	for(;;)
+	{
+		size_t extent = MIN(remaining, ncp->chunk);
+		size_t nput = ncx_howmany(varp->type, extent);
+
+		int lstatus = ncio_get(ncp->nciop, offset, extent,
+				 RGN_WRITE, &xp);	
+		if(lstatus != NC_NOERR)
+			return lstatus;
+		
+		lstatus = ncx_putn_float_short(&xp, nput, value);
+		if(lstatus != NC_NOERR && status == NC_NOERR)
+		{
+			/* not fatal to the loop */
+			status = lstatus;
+		}
+
+		(void) ncio_rel(ncp->nciop, offset,
+				 RGN_MODIFIED);	
+
+		remaining -= extent;
+		if(remaining == 0)
+			break; /* normal loop exit */
+		offset += extent;
+		value += nput;
+
+	}
+
+	return status;
+}
+
+static int
+putNCvx_float_int(NC *ncp, const NC_var *varp,
+		 const size_t *start, size_t nelems, const int *value)
+{
+	off_t offset = NC_varoffset(ncp, varp, start);
+	size_t remaining = varp->xsz * nelems;
+	int status = NC_NOERR;
+	void *xp;
+
+	if(nelems == 0)
+		return NC_NOERR;
+
+	assert(value != NULL);
+
+	for(;;)
+	{
+		size_t extent = MIN(remaining, ncp->chunk);
+		size_t nput = ncx_howmany(varp->type, extent);
+
+		int lstatus = ncio_get(ncp->nciop, offset, extent,
+				 RGN_WRITE, &xp);	
+		if(lstatus != NC_NOERR)
+			return lstatus;
+		
+		lstatus = ncx_putn_float_int(&xp, nput, value);
+		if(lstatus != NC_NOERR && status == NC_NOERR)
+		{
+			/* not fatal to the loop */
+			status = lstatus;
+		}
+
+		(void) ncio_rel(ncp->nciop, offset,
+				 RGN_MODIFIED);	
+
+		remaining -= extent;
+		if(remaining == 0)
+			break; /* normal loop exit */
+		offset += extent;
+		value += nput;
+
+	}
+
+	return status;
+}
+
+static int
+putNCvx_float_float(NC *ncp, const NC_var *varp,
+		 const size_t *start, size_t nelems, const float *value)
+{
+	off_t offset = NC_varoffset(ncp, varp, start);
+	size_t remaining = varp->xsz * nelems;
+	int status = NC_NOERR;
+	void *xp;
+
+	if(nelems == 0)
+		return NC_NOERR;
+
+	assert(value != NULL);
+
+	for(;;)
+	{
+		size_t extent = MIN(remaining, ncp->chunk);
+		size_t nput = ncx_howmany(varp->type, extent);
+
+		int lstatus = ncio_get(ncp->nciop, offset, extent,
+				 RGN_WRITE, &xp);	
+		if(lstatus != NC_NOERR)
+			return lstatus;
+		
+		lstatus = ncx_putn_float_float(&xp, nput, value);
+		if(lstatus != NC_NOERR && status == NC_NOERR)
+		{
+			/* not fatal to the loop */
+			status = lstatus;
+		}
+
+		(void) ncio_rel(ncp->nciop, offset,
+				 RGN_MODIFIED);	
+
+		remaining -= extent;
+		if(remaining == 0)
+			break; /* normal loop exit */
+		offset += extent;
+		value += nput;
+
+	}
+
+	return status;
+}
+
+static int
+putNCvx_float_double(NC *ncp, const NC_var *varp,
+		 const size_t *start, size_t nelems, const double *value)
+{
+	off_t offset = NC_varoffset(ncp, varp, start);
+	size_t remaining = varp->xsz * nelems;
+	int status = NC_NOERR;
+	void *xp;
+
+	if(nelems == 0)
+		return NC_NOERR;
+
+	assert(value != NULL);
+
+	for(;;)
+	{
+		size_t extent = MIN(remaining, ncp->chunk);
+		size_t nput = ncx_howmany(varp->type, extent);
+
+		int lstatus = ncio_get(ncp->nciop, offset, extent,
+				 RGN_WRITE, &xp);	
+		if(lstatus != NC_NOERR)
+			return lstatus;
+		
+		lstatus = ncx_putn_float_double(&xp, nput, value);
+		if(lstatus != NC_NOERR && status == NC_NOERR)
+		{
+			/* not fatal to the loop */
+			status = lstatus;
+		}
+
+		(void) ncio_rel(ncp->nciop, offset,
+				 RGN_MODIFIED);	
+
+		remaining -= extent;
+		if(remaining == 0)
+			break; /* normal loop exit */
+		offset += extent;
+		value += nput;
+
+	}
+
+	return status;
+}
+
+static int
+putNCvx_float_longlong(NC *ncp, const NC_var *varp,
+		 const size_t *start, size_t nelems, const longlong *value)
+{
+	off_t offset = NC_varoffset(ncp, varp, start);
+	size_t remaining = varp->xsz * nelems;
+	int status = NC_NOERR;
+	void *xp;
+
+	if(nelems == 0)
+		return NC_NOERR;
+
+	assert(value != NULL);
+
+	for(;;)
+	{
+		size_t extent = MIN(remaining, ncp->chunk);
+		size_t nput = ncx_howmany(varp->type, extent);
+
+		int lstatus = ncio_get(ncp->nciop, offset, extent,
+				 RGN_WRITE, &xp);	
+		if(lstatus != NC_NOERR)
+			return lstatus;
+		
+		lstatus = ncx_putn_float_longlong(&xp, nput, value);
+		if(lstatus != NC_NOERR && status == NC_NOERR)
+		{
+			/* not fatal to the loop */
+			status = lstatus;
+		}
+
+		(void) ncio_rel(ncp->nciop, offset,
+				 RGN_MODIFIED);	
+
+		remaining -= extent;
+		if(remaining == 0)
+			break; /* normal loop exit */
+		offset += extent;
+		value += nput;
+
+	}
+
+	return status;
+}
+
+
+static int
+putNCvx_double_schar(NC *ncp, const NC_var *varp,
+		 const size_t *start, size_t nelems, const schar *value)
+{
+	off_t offset = NC_varoffset(ncp, varp, start);
+	size_t remaining = varp->xsz * nelems;
+	int status = NC_NOERR;
+	void *xp;
+
+	if(nelems == 0)
+		return NC_NOERR;
+
+	assert(value != NULL);
+
+	for(;;)
+	{
+		size_t extent = MIN(remaining, ncp->chunk);
+		size_t nput = ncx_howmany(varp->type, extent);
+
+		int lstatus = ncio_get(ncp->nciop, offset, extent,
+				 RGN_WRITE, &xp);	
+		if(lstatus != NC_NOERR)
+			return lstatus;
+		
+		lstatus = ncx_putn_double_schar(&xp, nput, value);
+		if(lstatus != NC_NOERR && status == NC_NOERR)
+		{
+			/* not fatal to the loop */
+			status = lstatus;
+		}
+
+		(void) ncio_rel(ncp->nciop, offset,
+				 RGN_MODIFIED);	
+
+		remaining -= extent;
+		if(remaining == 0)
+			break; /* normal loop exit */
+		offset += extent;
+		value += nput;
+
+	}
+
+	return status;
+}
+
+static int
+putNCvx_double_uchar(NC *ncp, const NC_var *varp,
+		 const size_t *start, size_t nelems, const uchar *value)
+{
+	off_t offset = NC_varoffset(ncp, varp, start);
+	size_t remaining = varp->xsz * nelems;
+	int status = NC_NOERR;
+	void *xp;
+
+	if(nelems == 0)
+		return NC_NOERR;
+
+	assert(value != NULL);
+
+	for(;;)
+	{
+		size_t extent = MIN(remaining, ncp->chunk);
+		size_t nput = ncx_howmany(varp->type, extent);
+
+		int lstatus = ncio_get(ncp->nciop, offset, extent,
+				 RGN_WRITE, &xp);	
+		if(lstatus != NC_NOERR)
+			return lstatus;
+		
+		lstatus = ncx_putn_double_uchar(&xp, nput, value);
+		if(lstatus != NC_NOERR && status == NC_NOERR)
+		{
+			/* not fatal to the loop */
+			status = lstatus;
+		}
+
+		(void) ncio_rel(ncp->nciop, offset,
+				 RGN_MODIFIED);	
+
+		remaining -= extent;
+		if(remaining == 0)
+			break; /* normal loop exit */
+		offset += extent;
+		value += nput;
+
+	}
+
+	return status;
+}
+
+static int
+putNCvx_double_short(NC *ncp, const NC_var *varp,
+		 const size_t *start, size_t nelems, const short *value)
+{
+	off_t offset = NC_varoffset(ncp, varp, start);
+	size_t remaining = varp->xsz * nelems;
+	int status = NC_NOERR;
+	void *xp;
+
+	if(nelems == 0)
+		return NC_NOERR;
+
+	assert(value != NULL);
+
+	for(;;)
+	{
+		size_t extent = MIN(remaining, ncp->chunk);
+		size_t nput = ncx_howmany(varp->type, extent);
+
+		int lstatus = ncio_get(ncp->nciop, offset, extent,
+				 RGN_WRITE, &xp);	
+		if(lstatus != NC_NOERR)
+			return lstatus;
+		
+		lstatus = ncx_putn_double_short(&xp, nput, value);
+		if(lstatus != NC_NOERR && status == NC_NOERR)
+		{
+			/* not fatal to the loop */
+			status = lstatus;
+		}
+
+		(void) ncio_rel(ncp->nciop, offset,
+				 RGN_MODIFIED);	
+
+		remaining -= extent;
+		if(remaining == 0)
+			break; /* normal loop exit */
+		offset += extent;
+		value += nput;
+
+	}
+
+	return status;
+}
+
+static int
+putNCvx_double_int(NC *ncp, const NC_var *varp,
+		 const size_t *start, size_t nelems, const int *value)
+{
+	off_t offset = NC_varoffset(ncp, varp, start);
+	size_t remaining = varp->xsz * nelems;
+	int status = NC_NOERR;
+	void *xp;
+
+	if(nelems == 0)
+		return NC_NOERR;
+
+	assert(value != NULL);
+
+	for(;;)
+	{
+		size_t extent = MIN(remaining, ncp->chunk);
+		size_t nput = ncx_howmany(varp->type, extent);
+
+		int lstatus = ncio_get(ncp->nciop, offset, extent,
+				 RGN_WRITE, &xp);	
+		if(lstatus != NC_NOERR)
+			return lstatus;
+		
+		lstatus = ncx_putn_double_int(&xp, nput, value);
+		if(lstatus != NC_NOERR && status == NC_NOERR)
+		{
+			/* not fatal to the loop */
+			status = lstatus;
+		}
+
+		(void) ncio_rel(ncp->nciop, offset,
+				 RGN_MODIFIED);	
+
+		remaining -= extent;
+		if(remaining == 0)
+			break; /* normal loop exit */
+		offset += extent;
+		value += nput;
+
+	}
+
+	return status;
+}
+
+static int
+putNCvx_double_float(NC *ncp, const NC_var *varp,
+		 const size_t *start, size_t nelems, const float *value)
+{
+	off_t offset = NC_varoffset(ncp, varp, start);
+	size_t remaining = varp->xsz * nelems;
+	int status = NC_NOERR;
+	void *xp;
+
+	if(nelems == 0)
+		return NC_NOERR;
+
+	assert(value != NULL);
+
+	for(;;)
+	{
+		size_t extent = MIN(remaining, ncp->chunk);
+		size_t nput = ncx_howmany(varp->type, extent);
+
+		int lstatus = ncio_get(ncp->nciop, offset, extent,
+				 RGN_WRITE, &xp);	
+		if(lstatus != NC_NOERR)
+			return lstatus;
+		
+		lstatus = ncx_putn_double_float(&xp, nput, value);
+		if(lstatus != NC_NOERR && status == NC_NOERR)
+		{
+			/* not fatal to the loop */
+			status = lstatus;
+		}
+
+		(void) ncio_rel(ncp->nciop, offset,
+				 RGN_MODIFIED);	
+
+		remaining -= extent;
+		if(remaining == 0)
+			break; /* normal loop exit */
+		offset += extent;
+		value += nput;
+
+	}
+
+	return status;
+}
+
+static int
+putNCvx_double_double(NC *ncp, const NC_var *varp,
+		 const size_t *start, size_t nelems, const double *value)
+{
+	off_t offset = NC_varoffset(ncp, varp, start);
+	size_t remaining = varp->xsz * nelems;
+	int status = NC_NOERR;
+	void *xp;
+
+	if(nelems == 0)
+		return NC_NOERR;
+
+	assert(value != NULL);
+
+	for(;;)
+	{
+		size_t extent = MIN(remaining, ncp->chunk);
+		size_t nput = ncx_howmany(varp->type, extent);
+
+		int lstatus = ncio_get(ncp->nciop, offset, extent,
+				 RGN_WRITE, &xp);	
+		if(lstatus != NC_NOERR)
+			return lstatus;
+		
+		lstatus = ncx_putn_double_double(&xp, nput, value);
+		if(lstatus != NC_NOERR && status == NC_NOERR)
+		{
+			/* not fatal to the loop */
+			status = lstatus;
+		}
+
+		(void) ncio_rel(ncp->nciop, offset,
+				 RGN_MODIFIED);	
+
+		remaining -= extent;
+		if(remaining == 0)
+			break; /* normal loop exit */
+		offset += extent;
+		value += nput;
+
+	}
+
+	return status;
+}
+
+static int
+putNCvx_double_longlong(NC *ncp, const NC_var *varp,
+		 const size_t *start, size_t nelems, const longlong *value)
+{
+	off_t offset = NC_varoffset(ncp, varp, start);
+	size_t remaining = varp->xsz * nelems;
+	int status = NC_NOERR;
+	void *xp;
+
+	if(nelems == 0)
+		return NC_NOERR;
+
+	assert(value != NULL);
+
+	for(;;)
+	{
+		size_t extent = MIN(remaining, ncp->chunk);
+		size_t nput = ncx_howmany(varp->type, extent);
+
+		int lstatus = ncio_get(ncp->nciop, offset, extent,
+				 RGN_WRITE, &xp);	
+		if(lstatus != NC_NOERR)
+			return lstatus;
+		
+		lstatus = ncx_putn_double_longlong(&xp, nput, value);
+		if(lstatus != NC_NOERR && status == NC_NOERR)
+		{
+			/* not fatal to the loop */
+			status = lstatus;
+		}
+
+		(void) ncio_rel(ncp->nciop, offset,
+				 RGN_MODIFIED);	
+
+		remaining -= extent;
+		if(remaining == 0)
+			break; /* normal loop exit */
+		offset += extent;
+		value += nput;
+
+	}
+
+	return status;
+}
+
+
+#ifdef NOTUSED
+static int
+putNCvx_schar_uint(NC *ncp, const NC_var *varp,
+		 const size_t *start, size_t nelems, const uint *value)
+{
+	off_t offset = NC_varoffset(ncp, varp, start);
+	size_t remaining = varp->xsz * nelems;
+	int status = NC_NOERR;
+	void *xp;
+
+	if(nelems == 0)
+		return NC_NOERR;
+
+	assert(value != NULL);
+
+	for(;;)
+	{
+		size_t extent = MIN(remaining, ncp->chunk);
+		size_t nput = ncx_howmany(varp->type, extent);
+
+		int lstatus = ncio_get(ncp->nciop, offset, extent,
+				 RGN_WRITE, &xp);	
+		if(lstatus != NC_NOERR)
+			return lstatus;
+		
+		lstatus = ncx_putn_schar_uint(&xp, nput, value);
+		if(lstatus != NC_NOERR && status == NC_NOERR)
+		{
+			/* not fatal to the loop */
+			status = lstatus;
+		}
+
+		(void) ncio_rel(ncp->nciop, offset,
+				 RGN_MODIFIED);	
+
+		remaining -= extent;
+		if(remaining == 0)
+			break; /* normal loop exit */
+		offset += extent;
+		value += nput;
+
+	}
+
+	return status;
+}
+
+static int
+putNCvx_schar_ulonglong(NC *ncp, const NC_var *varp,
+		 const size_t *start, size_t nelems, const ulonglong *value)
+{
+	off_t offset = NC_varoffset(ncp, varp, start);
+	size_t remaining = varp->xsz * nelems;
+	int status = NC_NOERR;
+	void *xp;
+
+	if(nelems == 0)
+		return NC_NOERR;
+
+	assert(value != NULL);
+
+	for(;;)
+	{
+		size_t extent = MIN(remaining, ncp->chunk);
+		size_t nput = ncx_howmany(varp->type, extent);
+
+		int lstatus = ncio_get(ncp->nciop, offset, extent,
+				 RGN_WRITE, &xp);	
+		if(lstatus != NC_NOERR)
+			return lstatus;
+		
+		lstatus = ncx_putn_schar_ulonglong(&xp, nput, value);
+		if(lstatus != NC_NOERR && status == NC_NOERR)
+		{
+			/* not fatal to the loop */
+			status = lstatus;
+		}
+
+		(void) ncio_rel(ncp->nciop, offset,
+				 RGN_MODIFIED);	
+
+		remaining -= extent;
+		if(remaining == 0)
+			break; /* normal loop exit */
+		offset += extent;
+		value += nput;
+
+	}
+
+	return status;
+}
+
+static int
+putNCvx_short_uint(NC *ncp, const NC_var *varp,
+		 const size_t *start, size_t nelems, const uint *value)
+{
+	off_t offset = NC_varoffset(ncp, varp, start);
+	size_t remaining = varp->xsz * nelems;
+	int status = NC_NOERR;
+	void *xp;
+
+	if(nelems == 0)
+		return NC_NOERR;
+
+	assert(value != NULL);
+
+	for(;;)
+	{
+		size_t extent = MIN(remaining, ncp->chunk);
+		size_t nput = ncx_howmany(varp->type, extent);
+
+		int lstatus = ncio_get(ncp->nciop, offset, extent,
+				 RGN_WRITE, &xp);	
+		if(lstatus != NC_NOERR)
+			return lstatus;
+		
+		lstatus = ncx_putn_short_uint(&xp, nput, value);
+		if(lstatus != NC_NOERR && status == NC_NOERR)
+		{
+			/* not fatal to the loop */
+			status = lstatus;
+		}
+
+		(void) ncio_rel(ncp->nciop, offset,
+				 RGN_MODIFIED);	
+
+		remaining -= extent;
+		if(remaining == 0)
+			break; /* normal loop exit */
+		offset += extent;
+		value += nput;
+
+	}
+
+	return status;
+}
+
+static int
+putNCvx_short_ulonglong(NC *ncp, const NC_var *varp,
+		 const size_t *start, size_t nelems, const ulonglong *value)
+{
+	off_t offset = NC_varoffset(ncp, varp, start);
+	size_t remaining = varp->xsz * nelems;
+	int status = NC_NOERR;
+	void *xp;
+
+	if(nelems == 0)
+		return NC_NOERR;
+
+	assert(value != NULL);
+
+	for(;;)
+	{
+		size_t extent = MIN(remaining, ncp->chunk);
+		size_t nput = ncx_howmany(varp->type, extent);
+
+		int lstatus = ncio_get(ncp->nciop, offset, extent,
+				 RGN_WRITE, &xp);	
+		if(lstatus != NC_NOERR)
+			return lstatus;
+		
+		lstatus = ncx_putn_short_ulonglong(&xp, nput, value);
+		if(lstatus != NC_NOERR && status == NC_NOERR)
+		{
+			/* not fatal to the loop */
+			status = lstatus;
+		}
+
+		(void) ncio_rel(ncp->nciop, offset,
+				 RGN_MODIFIED);	
+
+		remaining -= extent;
+		if(remaining == 0)
+			break; /* normal loop exit */
+		offset += extent;
+		value += nput;
+
+	}
+
+	return status;
+}
+
+static int
+putNCvx_int_uint(NC *ncp, const NC_var *varp,
+		 const size_t *start, size_t nelems, const uint *value)
+{
+	off_t offset = NC_varoffset(ncp, varp, start);
+	size_t remaining = varp->xsz * nelems;
+	int status = NC_NOERR;
+	void *xp;
+
+	if(nelems == 0)
+		return NC_NOERR;
+
+	assert(value != NULL);
+
+	for(;;)
+	{
+		size_t extent = MIN(remaining, ncp->chunk);
+		size_t nput = ncx_howmany(varp->type, extent);
+
+		int lstatus = ncio_get(ncp->nciop, offset, extent,
+				 RGN_WRITE, &xp);	
+		if(lstatus != NC_NOERR)
+			return lstatus;
+		
+		lstatus = ncx_putn_int_uint(&xp, nput, value);
+		if(lstatus != NC_NOERR && status == NC_NOERR)
+		{
+			/* not fatal to the loop */
+			status = lstatus;
+		}
+
+		(void) ncio_rel(ncp->nciop, offset,
+				 RGN_MODIFIED);	
+
+		remaining -= extent;
+		if(remaining == 0)
+			break; /* normal loop exit */
+		offset += extent;
+		value += nput;
+
+	}
+
+	return status;
+}
+
+static int
+putNCvx_int_ulonglong(NC *ncp, const NC_var *varp,
+		 const size_t *start, size_t nelems, const ulonglong *value)
+{
+	off_t offset = NC_varoffset(ncp, varp, start);
+	size_t remaining = varp->xsz * nelems;
+	int status = NC_NOERR;
+	void *xp;
+
+	if(nelems == 0)
+		return NC_NOERR;
+
+	assert(value != NULL);
+
+	for(;;)
+	{
+		size_t extent = MIN(remaining, ncp->chunk);
+		size_t nput = ncx_howmany(varp->type, extent);
+
+		int lstatus = ncio_get(ncp->nciop, offset, extent,
+				 RGN_WRITE, &xp);	
+		if(lstatus != NC_NOERR)
+			return lstatus;
+		
+		lstatus = ncx_putn_int_ulonglong(&xp, nput, value);
+		if(lstatus != NC_NOERR && status == NC_NOERR)
+		{
+			/* not fatal to the loop */
+			status = lstatus;
+		}
+
+		(void) ncio_rel(ncp->nciop, offset,
+				 RGN_MODIFIED);	
+
+		remaining -= extent;
+		if(remaining == 0)
+			break; /* normal loop exit */
+		offset += extent;
+		value += nput;
+
+	}
+
+	return status;
+}
+
+static int
+putNCvx_float_uint(NC *ncp, const NC_var *varp,
+		 const size_t *start, size_t nelems, const uint *value)
+{
+	off_t offset = NC_varoffset(ncp, varp, start);
+	size_t remaining = varp->xsz * nelems;
+	int status = NC_NOERR;
+	void *xp;
+
+	if(nelems == 0)
+		return NC_NOERR;
+
+	assert(value != NULL);
+
+	for(;;)
+	{
+		size_t extent = MIN(remaining, ncp->chunk);
+		size_t nput = ncx_howmany(varp->type, extent);
+
+		int lstatus = ncio_get(ncp->nciop, offset, extent,
+				 RGN_WRITE, &xp);	
+		if(lstatus != NC_NOERR)
+			return lstatus;
+		
+		lstatus = ncx_putn_float_uint(&xp, nput, value);
+		if(lstatus != NC_NOERR && status == NC_NOERR)
+		{
+			/* not fatal to the loop */
+			status = lstatus;
+		}
+
+		(void) ncio_rel(ncp->nciop, offset,
+				 RGN_MODIFIED);	
+
+		remaining -= extent;
+		if(remaining == 0)
+			break; /* normal loop exit */
+		offset += extent;
+		value += nput;
+
+	}
+
+	return status;
+}
+
+static int
+putNCvx_float_ulonglong(NC *ncp, const NC_var *varp,
+		 const size_t *start, size_t nelems, const ulonglong *value)
+{
+	off_t offset = NC_varoffset(ncp, varp, start);
+	size_t remaining = varp->xsz * nelems;
+	int status = NC_NOERR;
+	void *xp;
+
+	if(nelems == 0)
+		return NC_NOERR;
+
+	assert(value != NULL);
+
+	for(;;)
+	{
+		size_t extent = MIN(remaining, ncp->chunk);
+		size_t nput = ncx_howmany(varp->type, extent);
+
+		int lstatus = ncio_get(ncp->nciop, offset, extent,
+				 RGN_WRITE, &xp);	
+		if(lstatus != NC_NOERR)
+			return lstatus;
+		
+		lstatus = ncx_putn_float_ulonglong(&xp, nput, value);
+		if(lstatus != NC_NOERR && status == NC_NOERR)
+		{
+			/* not fatal to the loop */
+			status = lstatus;
+		}
+
+		(void) ncio_rel(ncp->nciop, offset,
+				 RGN_MODIFIED);	
+
+		remaining -= extent;
+		if(remaining == 0)
+			break; /* normal loop exit */
+		offset += extent;
+		value += nput;
+
+	}
+
+	return status;
+}
+
+static int
+putNCvx_double_uint(NC *ncp, const NC_var *varp,
+		 const size_t *start, size_t nelems, const uint *value)
+{
+	off_t offset = NC_varoffset(ncp, varp, start);
+	size_t remaining = varp->xsz * nelems;
+	int status = NC_NOERR;
+	void *xp;
+
+	if(nelems == 0)
+		return NC_NOERR;
+
+	assert(value != NULL);
+
+	for(;;)
+	{
+		size_t extent = MIN(remaining, ncp->chunk);
+		size_t nput = ncx_howmany(varp->type, extent);
+
+		int lstatus = ncio_get(ncp->nciop, offset, extent,
+				 RGN_WRITE, &xp);	
+		if(lstatus != NC_NOERR)
+			return lstatus;
+		
+		lstatus = ncx_putn_double_uint(&xp, nput, value);
+		if(lstatus != NC_NOERR && status == NC_NOERR)
+		{
+			/* not fatal to the loop */
+			status = lstatus;
+		}
+
+		(void) ncio_rel(ncp->nciop, offset,
+				 RGN_MODIFIED);	
+
+		remaining -= extent;
+		if(remaining == 0)
+			break; /* normal loop exit */
+		offset += extent;
+		value += nput;
+
+	}
+
+	return status;
+}
+
+static int
+putNCvx_double_ulonglong(NC *ncp, const NC_var *varp,
+		 const size_t *start, size_t nelems, const ulonglong *value)
+{
+	off_t offset = NC_varoffset(ncp, varp, start);
+	size_t remaining = varp->xsz * nelems;
+	int status = NC_NOERR;
+	void *xp;
+
+	if(nelems == 0)
+		return NC_NOERR;
+
+	assert(value != NULL);
+
+	for(;;)
+	{
+		size_t extent = MIN(remaining, ncp->chunk);
+		size_t nput = ncx_howmany(varp->type, extent);
+
+		int lstatus = ncio_get(ncp->nciop, offset, extent,
+				 RGN_WRITE, &xp);	
+		if(lstatus != NC_NOERR)
+			return lstatus;
+		
+		lstatus = ncx_putn_double_ulonglong(&xp, nput, value);
+		if(lstatus != NC_NOERR && status == NC_NOERR)
+		{
+			/* not fatal to the loop */
+			status = lstatus;
+		}
+
+		(void) ncio_rel(ncp->nciop, offset,
+				 RGN_MODIFIED);	
+
+		remaining -= extent;
+		if(remaining == 0)
+			break; /* normal loop exit */
+		offset += extent;
+		value += nput;
+
+	}
+
+	return status;
+}
+
+#endif /*NOTUSED*/
+
+
+static int
+getNCvx_char_char(const NC *ncp, const NC_var *varp,
+		 const size_t *start, size_t nelems, char *value)
+{
+	off_t offset = NC_varoffset(ncp, varp, start);
+	size_t remaining = varp->xsz * nelems;
+	int status = NC_NOERR;
+	const void *xp;
+
+	if(nelems == 0)
+		return NC_NOERR;
+
+	assert(value != NULL);
+
+	for(;;)
+	{
+		size_t extent = MIN(remaining, ncp->chunk);
+		size_t nget = ncx_howmany(varp->type, extent);
+
+		int lstatus = ncio_get(ncp->nciop, offset, extent,
+				 0, (void **)&xp);	/* cast away const */
+		if(lstatus != NC_NOERR)
+			return lstatus;
+		
+		lstatus = ncx_getn_char_char(&xp, nget, value);
+		if(lstatus != NC_NOERR && status == NC_NOERR)
+			status = lstatus;
+
+		(void) ncio_rel(ncp->nciop, offset, 0);	
+
+		remaining -= extent;
+		if(remaining == 0)
+			break; /* normal loop exit */
+		offset += extent;
+		value += nget;
+	}
+
+	return status;
+}
+
+
+static int
+getNCvx_schar_schar(const NC *ncp, const NC_var *varp,
+		 const size_t *start, size_t nelems, schar *value)
+{
+	off_t offset = NC_varoffset(ncp, varp, start);
+	size_t remaining = varp->xsz * nelems;
+	int status = NC_NOERR;
+	const void *xp;
+
+	if(nelems == 0)
+		return NC_NOERR;
+
+	assert(value != NULL);
+
+	for(;;)
+	{
+		size_t extent = MIN(remaining, ncp->chunk);
+		size_t nget = ncx_howmany(varp->type, extent);
+
+		int lstatus = ncio_get(ncp->nciop, offset, extent,
+				 0, (void **)&xp);	/* cast away const */
+		if(lstatus != NC_NOERR)
+			return lstatus;
+		
+		lstatus = ncx_getn_schar_schar(&xp, nget, value);
+		if(lstatus != NC_NOERR && status == NC_NOERR)
+			status = lstatus;
+
+		(void) ncio_rel(ncp->nciop, offset, 0);	
+
+		remaining -= extent;
+		if(remaining == 0)
+			break; /* normal loop exit */
+		offset += extent;
+		value += nget;
+	}
+
+	return status;
+}
+
+static int
+getNCvx_schar_short(const NC *ncp, const NC_var *varp,
+		 const size_t *start, size_t nelems, short *value)
+{
+	off_t offset = NC_varoffset(ncp, varp, start);
+	size_t remaining = varp->xsz * nelems;
+	int status = NC_NOERR;
+	const void *xp;
+
+	if(nelems == 0)
+		return NC_NOERR;
+
+	assert(value != NULL);
+
+	for(;;)
+	{
+		size_t extent = MIN(remaining, ncp->chunk);
+		size_t nget = ncx_howmany(varp->type, extent);
+
+		int lstatus = ncio_get(ncp->nciop, offset, extent,
+				 0, (void **)&xp);	/* cast away const */
+		if(lstatus != NC_NOERR)
+			return lstatus;
+		
+		lstatus = ncx_getn_schar_short(&xp, nget, value);
+		if(lstatus != NC_NOERR && status == NC_NOERR)
+			status = lstatus;
+
+		(void) ncio_rel(ncp->nciop, offset, 0);	
+
+		remaining -= extent;
+		if(remaining == 0)
+			break; /* normal loop exit */
+		offset += extent;
+		value += nget;
+	}
+
+	return status;
+}
+
+static int
+getNCvx_schar_int(const NC *ncp, const NC_var *varp,
+		 const size_t *start, size_t nelems, int *value)
+{
+	off_t offset = NC_varoffset(ncp, varp, start);
+	size_t remaining = varp->xsz * nelems;
+	int status = NC_NOERR;
+	const void *xp;
+
+	if(nelems == 0)
+		return NC_NOERR;
+
+	assert(value != NULL);
+
+	for(;;)
+	{
+		size_t extent = MIN(remaining, ncp->chunk);
+		size_t nget = ncx_howmany(varp->type, extent);
+
+		int lstatus = ncio_get(ncp->nciop, offset, extent,
+				 0, (void **)&xp);	/* cast away const */
+		if(lstatus != NC_NOERR)
+			return lstatus;
+		
+		lstatus = ncx_getn_schar_int(&xp, nget, value);
+		if(lstatus != NC_NOERR && status == NC_NOERR)
+			status = lstatus;
+
+		(void) ncio_rel(ncp->nciop, offset, 0);	
+
+		remaining -= extent;
+		if(remaining == 0)
+			break; /* normal loop exit */
+		offset += extent;
+		value += nget;
+	}
+
+	return status;
+}
+
+static int
+getNCvx_schar_float(const NC *ncp, const NC_var *varp,
+		 const size_t *start, size_t nelems, float *value)
+{
+	off_t offset = NC_varoffset(ncp, varp, start);
+	size_t remaining = varp->xsz * nelems;
+	int status = NC_NOERR;
+	const void *xp;
+
+	if(nelems == 0)
+		return NC_NOERR;
+
+	assert(value != NULL);
+
+	for(;;)
+	{
+		size_t extent = MIN(remaining, ncp->chunk);
+		size_t nget = ncx_howmany(varp->type, extent);
+
+		int lstatus = ncio_get(ncp->nciop, offset, extent,
+				 0, (void **)&xp);	/* cast away const */
+		if(lstatus != NC_NOERR)
+			return lstatus;
+		
+		lstatus = ncx_getn_schar_float(&xp, nget, value);
+		if(lstatus != NC_NOERR && status == NC_NOERR)
+			status = lstatus;
+
+		(void) ncio_rel(ncp->nciop, offset, 0);	
+
+		remaining -= extent;
+		if(remaining == 0)
+			break; /* normal loop exit */
+		offset += extent;
+		value += nget;
+	}
+
+	return status;
+}
+
+static int
+getNCvx_schar_double(const NC *ncp, const NC_var *varp,
+		 const size_t *start, size_t nelems, double *value)
+{
+	off_t offset = NC_varoffset(ncp, varp, start);
+	size_t remaining = varp->xsz * nelems;
+	int status = NC_NOERR;
+	const void *xp;
+
+	if(nelems == 0)
+		return NC_NOERR;
+
+	assert(value != NULL);
+
+	for(;;)
+	{
+		size_t extent = MIN(remaining, ncp->chunk);
+		size_t nget = ncx_howmany(varp->type, extent);
+
+		int lstatus = ncio_get(ncp->nciop, offset, extent,
+				 0, (void **)&xp);	/* cast away const */
+		if(lstatus != NC_NOERR)
+			return lstatus;
+		
+		lstatus = ncx_getn_schar_double(&xp, nget, value);
+		if(lstatus != NC_NOERR && status == NC_NOERR)
+			status = lstatus;
+
+		(void) ncio_rel(ncp->nciop, offset, 0);	
+
+		remaining -= extent;
+		if(remaining == 0)
+			break; /* normal loop exit */
+		offset += extent;
+		value += nget;
+	}
+
+	return status;
+}
+
+static int
+getNCvx_schar_longlong(const NC *ncp, const NC_var *varp,
+		 const size_t *start, size_t nelems, longlong *value)
+{
+	off_t offset = NC_varoffset(ncp, varp, start);
+	size_t remaining = varp->xsz * nelems;
+	int status = NC_NOERR;
+	const void *xp;
+
+	if(nelems == 0)
+		return NC_NOERR;
+
+	assert(value != NULL);
+
+	for(;;)
+	{
+		size_t extent = MIN(remaining, ncp->chunk);
+		size_t nget = ncx_howmany(varp->type, extent);
+
+		int lstatus = ncio_get(ncp->nciop, offset, extent,
+				 0, (void **)&xp);	/* cast away const */
+		if(lstatus != NC_NOERR)
+			return lstatus;
+		
+		lstatus = ncx_getn_schar_longlong(&xp, nget, value);
+		if(lstatus != NC_NOERR && status == NC_NOERR)
+			status = lstatus;
+
+		(void) ncio_rel(ncp->nciop, offset, 0);	
+
+		remaining -= extent;
+		if(remaining == 0)
+			break; /* normal loop exit */
+		offset += extent;
+		value += nget;
+	}
+
+	return status;
+}
+
+static int
+getNCvx_schar_uint(const NC *ncp, const NC_var *varp,
+		 const size_t *start, size_t nelems, uint *value)
+{
+	off_t offset = NC_varoffset(ncp, varp, start);
+	size_t remaining = varp->xsz * nelems;
+	int status = NC_NOERR;
+	const void *xp;
+
+	if(nelems == 0)
+		return NC_NOERR;
+
+	assert(value != NULL);
+
+	for(;;)
+	{
+		size_t extent = MIN(remaining, ncp->chunk);
+		size_t nget = ncx_howmany(varp->type, extent);
+
+		int lstatus = ncio_get(ncp->nciop, offset, extent,
+				 0, (void **)&xp);	/* cast away const */
+		if(lstatus != NC_NOERR)
+			return lstatus;
+		
+		lstatus = ncx_getn_schar_uint(&xp, nget, value);
+		if(lstatus != NC_NOERR && status == NC_NOERR)
+			status = lstatus;
+
+		(void) ncio_rel(ncp->nciop, offset, 0);	
+
+		remaining -= extent;
+		if(remaining == 0)
+			break; /* normal loop exit */
+		offset += extent;
+		value += nget;
+	}
+
+	return status;
+}
+
+static int
+getNCvx_schar_ulonglong(const NC *ncp, const NC_var *varp,
+		 const size_t *start, size_t nelems, ulonglong *value)
+{
+	off_t offset = NC_varoffset(ncp, varp, start);
+	size_t remaining = varp->xsz * nelems;
+	int status = NC_NOERR;
+	const void *xp;
+
+	if(nelems == 0)
+		return NC_NOERR;
+
+	assert(value != NULL);
+
+	for(;;)
+	{
+		size_t extent = MIN(remaining, ncp->chunk);
+		size_t nget = ncx_howmany(varp->type, extent);
+
+		int lstatus = ncio_get(ncp->nciop, offset, extent,
+				 0, (void **)&xp);	/* cast away const */
+		if(lstatus != NC_NOERR)
+			return lstatus;
+		
+		lstatus = ncx_getn_schar_ulonglong(&xp, nget, value);
+		if(lstatus != NC_NOERR && status == NC_NOERR)
+			status = lstatus;
+
+		(void) ncio_rel(ncp->nciop, offset, 0);	
+
+		remaining -= extent;
+		if(remaining == 0)
+			break; /* normal loop exit */
+		offset += extent;
+		value += nget;
+	}
+
+	return status;
+}
+
+
+static int
+getNCvx_short_schar(const NC *ncp, const NC_var *varp,
+		 const size_t *start, size_t nelems, schar *value)
+{
+	off_t offset = NC_varoffset(ncp, varp, start);
+	size_t remaining = varp->xsz * nelems;
+	int status = NC_NOERR;
+	const void *xp;
+
+	if(nelems == 0)
+		return NC_NOERR;
+
+	assert(value != NULL);
+
+	for(;;)
+	{
+		size_t extent = MIN(remaining, ncp->chunk);
+		size_t nget = ncx_howmany(varp->type, extent);
+
+		int lstatus = ncio_get(ncp->nciop, offset, extent,
+				 0, (void **)&xp);	/* cast away const */
+		if(lstatus != NC_NOERR)
+			return lstatus;
+		
+		lstatus = ncx_getn_short_schar(&xp, nget, value);
+		if(lstatus != NC_NOERR && status == NC_NOERR)
+			status = lstatus;
+
+		(void) ncio_rel(ncp->nciop, offset, 0);	
+
+		remaining -= extent;
+		if(remaining == 0)
+			break; /* normal loop exit */
+		offset += extent;
+		value += nget;
+	}
+
+	return status;
+}
+
+static int
+getNCvx_short_uchar(const NC *ncp, const NC_var *varp,
+		 const size_t *start, size_t nelems, uchar *value)
+{
+	off_t offset = NC_varoffset(ncp, varp, start);
+	size_t remaining = varp->xsz * nelems;
+	int status = NC_NOERR;
+	const void *xp;
+
+	if(nelems == 0)
+		return NC_NOERR;
+
+	assert(value != NULL);
+
+	for(;;)
+	{
+		size_t extent = MIN(remaining, ncp->chunk);
+		size_t nget = ncx_howmany(varp->type, extent);
+
+		int lstatus = ncio_get(ncp->nciop, offset, extent,
+				 0, (void **)&xp);	/* cast away const */
+		if(lstatus != NC_NOERR)
+			return lstatus;
+		
+		lstatus = ncx_getn_short_uchar(&xp, nget, value);
+		if(lstatus != NC_NOERR && status == NC_NOERR)
+			status = lstatus;
+
+		(void) ncio_rel(ncp->nciop, offset, 0);	
+
+		remaining -= extent;
+		if(remaining == 0)
+			break; /* normal loop exit */
+		offset += extent;
+		value += nget;
+	}
+
+	return status;
+}
+
+static int
+getNCvx_short_short(const NC *ncp, const NC_var *varp,
+		 const size_t *start, size_t nelems, short *value)
+{
+	off_t offset = NC_varoffset(ncp, varp, start);
+	size_t remaining = varp->xsz * nelems;
+	int status = NC_NOERR;
+	const void *xp;
+
+	if(nelems == 0)
+		return NC_NOERR;
+
+	assert(value != NULL);
+
+	for(;;)
+	{
+		size_t extent = MIN(remaining, ncp->chunk);
+		size_t nget = ncx_howmany(varp->type, extent);
+
+		int lstatus = ncio_get(ncp->nciop, offset, extent,
+				 0, (void **)&xp);	/* cast away const */
+		if(lstatus != NC_NOERR)
+			return lstatus;
+		
+		lstatus = ncx_getn_short_short(&xp, nget, value);
+		if(lstatus != NC_NOERR && status == NC_NOERR)
+			status = lstatus;
+
+		(void) ncio_rel(ncp->nciop, offset, 0);	
+
+		remaining -= extent;
+		if(remaining == 0)
+			break; /* normal loop exit */
+		offset += extent;
+		value += nget;
+	}
+
+	return status;
+}
+
+static int
+getNCvx_short_int(const NC *ncp, const NC_var *varp,
+		 const size_t *start, size_t nelems, int *value)
+{
+	off_t offset = NC_varoffset(ncp, varp, start);
+	size_t remaining = varp->xsz * nelems;
+	int status = NC_NOERR;
+	const void *xp;
+
+	if(nelems == 0)
+		return NC_NOERR;
+
+	assert(value != NULL);
+
+	for(;;)
+	{
+		size_t extent = MIN(remaining, ncp->chunk);
+		size_t nget = ncx_howmany(varp->type, extent);
+
+		int lstatus = ncio_get(ncp->nciop, offset, extent,
+				 0, (void **)&xp);	/* cast away const */
+		if(lstatus != NC_NOERR)
+			return lstatus;
+		
+		lstatus = ncx_getn_short_int(&xp, nget, value);
+		if(lstatus != NC_NOERR && status == NC_NOERR)
+			status = lstatus;
+
+		(void) ncio_rel(ncp->nciop, offset, 0);	
+
+		remaining -= extent;
+		if(remaining == 0)
+			break; /* normal loop exit */
+		offset += extent;
+		value += nget;
+	}
+
+	return status;
+}
+
+static int
+getNCvx_short_float(const NC *ncp, const NC_var *varp,
+		 const size_t *start, size_t nelems, float *value)
+{
+	off_t offset = NC_varoffset(ncp, varp, start);
+	size_t remaining = varp->xsz * nelems;
+	int status = NC_NOERR;
+	const void *xp;
+
+	if(nelems == 0)
+		return NC_NOERR;
+
+	assert(value != NULL);
+
+	for(;;)
+	{
+		size_t extent = MIN(remaining, ncp->chunk);
+		size_t nget = ncx_howmany(varp->type, extent);
+
+		int lstatus = ncio_get(ncp->nciop, offset, extent,
+				 0, (void **)&xp);	/* cast away const */
+		if(lstatus != NC_NOERR)
+			return lstatus;
+		
+		lstatus = ncx_getn_short_float(&xp, nget, value);
+		if(lstatus != NC_NOERR && status == NC_NOERR)
+			status = lstatus;
+
+		(void) ncio_rel(ncp->nciop, offset, 0);	
+
+		remaining -= extent;
+		if(remaining == 0)
+			break; /* normal loop exit */
+		offset += extent;
+		value += nget;
+	}
+
+	return status;
+}
+
+static int
+getNCvx_short_double(const NC *ncp, const NC_var *varp,
+		 const size_t *start, size_t nelems, double *value)
+{
+	off_t offset = NC_varoffset(ncp, varp, start);
+	size_t remaining = varp->xsz * nelems;
+	int status = NC_NOERR;
+	const void *xp;
+
+	if(nelems == 0)
+		return NC_NOERR;
+
+	assert(value != NULL);
+
+	for(;;)
+	{
+		size_t extent = MIN(remaining, ncp->chunk);
+		size_t nget = ncx_howmany(varp->type, extent);
+
+		int lstatus = ncio_get(ncp->nciop, offset, extent,
+				 0, (void **)&xp);	/* cast away const */
+		if(lstatus != NC_NOERR)
+			return lstatus;
+		
+		lstatus = ncx_getn_short_double(&xp, nget, value);
+		if(lstatus != NC_NOERR && status == NC_NOERR)
+			status = lstatus;
+
+		(void) ncio_rel(ncp->nciop, offset, 0);	
+
+		remaining -= extent;
+		if(remaining == 0)
+			break; /* normal loop exit */
+		offset += extent;
+		value += nget;
+	}
+
+	return status;
+}
+
+static int
+getNCvx_short_longlong(const NC *ncp, const NC_var *varp,
+		 const size_t *start, size_t nelems, longlong *value)
+{
+	off_t offset = NC_varoffset(ncp, varp, start);
+	size_t remaining = varp->xsz * nelems;
+	int status = NC_NOERR;
+	const void *xp;
+
+	if(nelems == 0)
+		return NC_NOERR;
+
+	assert(value != NULL);
+
+	for(;;)
+	{
+		size_t extent = MIN(remaining, ncp->chunk);
+		size_t nget = ncx_howmany(varp->type, extent);
+
+		int lstatus = ncio_get(ncp->nciop, offset, extent,
+				 0, (void **)&xp);	/* cast away const */
+		if(lstatus != NC_NOERR)
+			return lstatus;
+		
+		lstatus = ncx_getn_short_longlong(&xp, nget, value);
+		if(lstatus != NC_NOERR && status == NC_NOERR)
+			status = lstatus;
+
+		(void) ncio_rel(ncp->nciop, offset, 0);	
+
+		remaining -= extent;
+		if(remaining == 0)
+			break; /* normal loop exit */
+		offset += extent;
+		value += nget;
+	}
+
+	return status;
+}
+
+static int
+getNCvx_short_uint(const NC *ncp, const NC_var *varp,
+		 const size_t *start, size_t nelems, uint *value)
+{
+	off_t offset = NC_varoffset(ncp, varp, start);
+	size_t remaining = varp->xsz * nelems;
+	int status = NC_NOERR;
+	const void *xp;
+
+	if(nelems == 0)
+		return NC_NOERR;
+
+	assert(value != NULL);
+
+	for(;;)
+	{
+		size_t extent = MIN(remaining, ncp->chunk);
+		size_t nget = ncx_howmany(varp->type, extent);
+
+		int lstatus = ncio_get(ncp->nciop, offset, extent,
+				 0, (void **)&xp);	/* cast away const */
+		if(lstatus != NC_NOERR)
+			return lstatus;
+		
+		lstatus = ncx_getn_short_uint(&xp, nget, value);
+		if(lstatus != NC_NOERR && status == NC_NOERR)
+			status = lstatus;
+
+		(void) ncio_rel(ncp->nciop, offset, 0);	
+
+		remaining -= extent;
+		if(remaining == 0)
+			break; /* normal loop exit */
+		offset += extent;
+		value += nget;
+	}
+
+	return status;
+}
+
+static int
+getNCvx_short_ulonglong(const NC *ncp, const NC_var *varp,
+		 const size_t *start, size_t nelems, ulonglong *value)
+{
+	off_t offset = NC_varoffset(ncp, varp, start);
+	size_t remaining = varp->xsz * nelems;
+	int status = NC_NOERR;
+	const void *xp;
+
+	if(nelems == 0)
+		return NC_NOERR;
+
+	assert(value != NULL);
+
+	for(;;)
+	{
+		size_t extent = MIN(remaining, ncp->chunk);
+		size_t nget = ncx_howmany(varp->type, extent);
+
+		int lstatus = ncio_get(ncp->nciop, offset, extent,
+				 0, (void **)&xp);	/* cast away const */
+		if(lstatus != NC_NOERR)
+			return lstatus;
+		
+		lstatus = ncx_getn_short_ulonglong(&xp, nget, value);
+		if(lstatus != NC_NOERR && status == NC_NOERR)
+			status = lstatus;
+
+		(void) ncio_rel(ncp->nciop, offset, 0);	
+
+		remaining -= extent;
+		if(remaining == 0)
+			break; /* normal loop exit */
+		offset += extent;
+		value += nget;
+	}
+
+	return status;
+}
+
+
+static int
+getNCvx_int_schar(const NC *ncp, const NC_var *varp,
+		 const size_t *start, size_t nelems, schar *value)
+{
+	off_t offset = NC_varoffset(ncp, varp, start);
+	size_t remaining = varp->xsz * nelems;
+	int status = NC_NOERR;
+	const void *xp;
+
+	if(nelems == 0)
+		return NC_NOERR;
+
+	assert(value != NULL);
+
+	for(;;)
+	{
+		size_t extent = MIN(remaining, ncp->chunk);
+		size_t nget = ncx_howmany(varp->type, extent);
+
+		int lstatus = ncio_get(ncp->nciop, offset, extent,
+				 0, (void **)&xp);	/* cast away const */
+		if(lstatus != NC_NOERR)
+			return lstatus;
+		
+		lstatus = ncx_getn_int_schar(&xp, nget, value);
+		if(lstatus != NC_NOERR && status == NC_NOERR)
+			status = lstatus;
+
+		(void) ncio_rel(ncp->nciop, offset, 0);	
+
+		remaining -= extent;
+		if(remaining == 0)
+			break; /* normal loop exit */
+		offset += extent;
+		value += nget;
+	}
+
+	return status;
+}
+
+static int
+getNCvx_int_uchar(const NC *ncp, const NC_var *varp,
+		 const size_t *start, size_t nelems, uchar *value)
+{
+	off_t offset = NC_varoffset(ncp, varp, start);
+	size_t remaining = varp->xsz * nelems;
+	int status = NC_NOERR;
+	const void *xp;
+
+	if(nelems == 0)
+		return NC_NOERR;
+
+	assert(value != NULL);
+
+	for(;;)
+	{
+		size_t extent = MIN(remaining, ncp->chunk);
+		size_t nget = ncx_howmany(varp->type, extent);
+
+		int lstatus = ncio_get(ncp->nciop, offset, extent,
+				 0, (void **)&xp);	/* cast away const */
+		if(lstatus != NC_NOERR)
+			return lstatus;
+		
+		lstatus = ncx_getn_int_uchar(&xp, nget, value);
+		if(lstatus != NC_NOERR && status == NC_NOERR)
+			status = lstatus;
+
+		(void) ncio_rel(ncp->nciop, offset, 0);	
+
+		remaining -= extent;
+		if(remaining == 0)
+			break; /* normal loop exit */
+		offset += extent;
+		value += nget;
+	}
+
+	return status;
+}
+
+static int
+getNCvx_int_short(const NC *ncp, const NC_var *varp,
+		 const size_t *start, size_t nelems, short *value)
+{
+	off_t offset = NC_varoffset(ncp, varp, start);
+	size_t remaining = varp->xsz * nelems;
+	int status = NC_NOERR;
+	const void *xp;
+
+	if(nelems == 0)
+		return NC_NOERR;
+
+	assert(value != NULL);
+
+	for(;;)
+	{
+		size_t extent = MIN(remaining, ncp->chunk);
+		size_t nget = ncx_howmany(varp->type, extent);
+
+		int lstatus = ncio_get(ncp->nciop, offset, extent,
+				 0, (void **)&xp);	/* cast away const */
+		if(lstatus != NC_NOERR)
+			return lstatus;
+		
+		lstatus = ncx_getn_int_short(&xp, nget, value);
+		if(lstatus != NC_NOERR && status == NC_NOERR)
+			status = lstatus;
+
+		(void) ncio_rel(ncp->nciop, offset, 0);	
+
+		remaining -= extent;
+		if(remaining == 0)
+			break; /* normal loop exit */
+		offset += extent;
+		value += nget;
+	}
+
+	return status;
+}
+
+static int
+getNCvx_int_int(const NC *ncp, const NC_var *varp,
+		 const size_t *start, size_t nelems, int *value)
+{
+	off_t offset = NC_varoffset(ncp, varp, start);
+	size_t remaining = varp->xsz * nelems;
+	int status = NC_NOERR;
+	const void *xp;
+
+	if(nelems == 0)
+		return NC_NOERR;
+
+	assert(value != NULL);
+
+	for(;;)
+	{
+		size_t extent = MIN(remaining, ncp->chunk);
+		size_t nget = ncx_howmany(varp->type, extent);
+
+		int lstatus = ncio_get(ncp->nciop, offset, extent,
+				 0, (void **)&xp);	/* cast away const */
+		if(lstatus != NC_NOERR)
+			return lstatus;
+		
+		lstatus = ncx_getn_int_int(&xp, nget, value);
+		if(lstatus != NC_NOERR && status == NC_NOERR)
+			status = lstatus;
+
+		(void) ncio_rel(ncp->nciop, offset, 0);	
+
+		remaining -= extent;
+		if(remaining == 0)
+			break; /* normal loop exit */
+		offset += extent;
+		value += nget;
+	}
+
+	return status;
+}
+
+static int
+getNCvx_int_float(const NC *ncp, const NC_var *varp,
+		 const size_t *start, size_t nelems, float *value)
+{
+	off_t offset = NC_varoffset(ncp, varp, start);
+	size_t remaining = varp->xsz * nelems;
+	int status = NC_NOERR;
+	const void *xp;
+
+	if(nelems == 0)
+		return NC_NOERR;
+
+	assert(value != NULL);
+
+	for(;;)
+	{
+		size_t extent = MIN(remaining, ncp->chunk);
+		size_t nget = ncx_howmany(varp->type, extent);
+
+		int lstatus = ncio_get(ncp->nciop, offset, extent,
+				 0, (void **)&xp);	/* cast away const */
+		if(lstatus != NC_NOERR)
+			return lstatus;
+		
+		lstatus = ncx_getn_int_float(&xp, nget, value);
+		if(lstatus != NC_NOERR && status == NC_NOERR)
+			status = lstatus;
+
+		(void) ncio_rel(ncp->nciop, offset, 0);	
+
+		remaining -= extent;
+		if(remaining == 0)
+			break; /* normal loop exit */
+		offset += extent;
+		value += nget;
+	}
+
+	return status;
+}
+
+static int
+getNCvx_int_double(const NC *ncp, const NC_var *varp,
+		 const size_t *start, size_t nelems, double *value)
+{
+	off_t offset = NC_varoffset(ncp, varp, start);
+	size_t remaining = varp->xsz * nelems;
+	int status = NC_NOERR;
+	const void *xp;
+
+	if(nelems == 0)
+		return NC_NOERR;
+
+	assert(value != NULL);
+
+	for(;;)
+	{
+		size_t extent = MIN(remaining, ncp->chunk);
+		size_t nget = ncx_howmany(varp->type, extent);
+
+		int lstatus = ncio_get(ncp->nciop, offset, extent,
+				 0, (void **)&xp);	/* cast away const */
+		if(lstatus != NC_NOERR)
+			return lstatus;
+		
+		lstatus = ncx_getn_int_double(&xp, nget, value);
+		if(lstatus != NC_NOERR && status == NC_NOERR)
+			status = lstatus;
+
+		(void) ncio_rel(ncp->nciop, offset, 0);	
+
+		remaining -= extent;
+		if(remaining == 0)
+			break; /* normal loop exit */
+		offset += extent;
+		value += nget;
+	}
+
+	return status;
+}
+
+static int
+getNCvx_int_longlong(const NC *ncp, const NC_var *varp,
+		 const size_t *start, size_t nelems, longlong *value)
+{
+	off_t offset = NC_varoffset(ncp, varp, start);
+	size_t remaining = varp->xsz * nelems;
+	int status = NC_NOERR;
+	const void *xp;
+
+	if(nelems == 0)
+		return NC_NOERR;
+
+	assert(value != NULL);
+
+	for(;;)
+	{
+		size_t extent = MIN(remaining, ncp->chunk);
+		size_t nget = ncx_howmany(varp->type, extent);
+
+		int lstatus = ncio_get(ncp->nciop, offset, extent,
+				 0, (void **)&xp);	/* cast away const */
+		if(lstatus != NC_NOERR)
+			return lstatus;
+		
+		lstatus = ncx_getn_int_longlong(&xp, nget, value);
+		if(lstatus != NC_NOERR && status == NC_NOERR)
+			status = lstatus;
+
+		(void) ncio_rel(ncp->nciop, offset, 0);	
+
+		remaining -= extent;
+		if(remaining == 0)
+			break; /* normal loop exit */
+		offset += extent;
+		value += nget;
+	}
+
+	return status;
+}
+
+static int
+getNCvx_int_uint(const NC *ncp, const NC_var *varp,
+		 const size_t *start, size_t nelems, uint *value)
+{
+	off_t offset = NC_varoffset(ncp, varp, start);
+	size_t remaining = varp->xsz * nelems;
+	int status = NC_NOERR;
+	const void *xp;
+
+	if(nelems == 0)
+		return NC_NOERR;
+
+	assert(value != NULL);
+
+	for(;;)
+	{
+		size_t extent = MIN(remaining, ncp->chunk);
+		size_t nget = ncx_howmany(varp->type, extent);
+
+		int lstatus = ncio_get(ncp->nciop, offset, extent,
+				 0, (void **)&xp);	/* cast away const */
+		if(lstatus != NC_NOERR)
+			return lstatus;
+		
+		lstatus = ncx_getn_int_uint(&xp, nget, value);
+		if(lstatus != NC_NOERR && status == NC_NOERR)
+			status = lstatus;
+
+		(void) ncio_rel(ncp->nciop, offset, 0);	
+
+		remaining -= extent;
+		if(remaining == 0)
+			break; /* normal loop exit */
+		offset += extent;
+		value += nget;
+	}
+
+	return status;
+}
+
+static int
+getNCvx_int_ulonglong(const NC *ncp, const NC_var *varp,
+		 const size_t *start, size_t nelems, ulonglong *value)
+{
+	off_t offset = NC_varoffset(ncp, varp, start);
+	size_t remaining = varp->xsz * nelems;
+	int status = NC_NOERR;
+	const void *xp;
+
+	if(nelems == 0)
+		return NC_NOERR;
+
+	assert(value != NULL);
+
+	for(;;)
+	{
+		size_t extent = MIN(remaining, ncp->chunk);
+		size_t nget = ncx_howmany(varp->type, extent);
+
+		int lstatus = ncio_get(ncp->nciop, offset, extent,
+				 0, (void **)&xp);	/* cast away const */
+		if(lstatus != NC_NOERR)
+			return lstatus;
+		
+		lstatus = ncx_getn_int_ulonglong(&xp, nget, value);
+		if(lstatus != NC_NOERR && status == NC_NOERR)
+			status = lstatus;
+
+		(void) ncio_rel(ncp->nciop, offset, 0);	
+
+		remaining -= extent;
+		if(remaining == 0)
+			break; /* normal loop exit */
+		offset += extent;
+		value += nget;
+	}
+
+	return status;
+}
+
+
+static int
+getNCvx_float_schar(const NC *ncp, const NC_var *varp,
+		 const size_t *start, size_t nelems, schar *value)
+{
+	off_t offset = NC_varoffset(ncp, varp, start);
+	size_t remaining = varp->xsz * nelems;
+	int status = NC_NOERR;
+	const void *xp;
+
+	if(nelems == 0)
+		return NC_NOERR;
+
+	assert(value != NULL);
+
+	for(;;)
+	{
+		size_t extent = MIN(remaining, ncp->chunk);
+		size_t nget = ncx_howmany(varp->type, extent);
+
+		int lstatus = ncio_get(ncp->nciop, offset, extent,
+				 0, (void **)&xp);	/* cast away const */
+		if(lstatus != NC_NOERR)
+			return lstatus;
+		
+		lstatus = ncx_getn_float_schar(&xp, nget, value);
+		if(lstatus != NC_NOERR && status == NC_NOERR)
+			status = lstatus;
+
+		(void) ncio_rel(ncp->nciop, offset, 0);	
+
+		remaining -= extent;
+		if(remaining == 0)
+			break; /* normal loop exit */
+		offset += extent;
+		value += nget;
+	}
+
+	return status;
+}
+
+static int
+getNCvx_float_uchar(const NC *ncp, const NC_var *varp,
+		 const size_t *start, size_t nelems, uchar *value)
+{
+	off_t offset = NC_varoffset(ncp, varp, start);
+	size_t remaining = varp->xsz * nelems;
+	int status = NC_NOERR;
+	const void *xp;
+
+	if(nelems == 0)
+		return NC_NOERR;
+
+	assert(value != NULL);
+
+	for(;;)
+	{
+		size_t extent = MIN(remaining, ncp->chunk);
+		size_t nget = ncx_howmany(varp->type, extent);
+
+		int lstatus = ncio_get(ncp->nciop, offset, extent,
+				 0, (void **)&xp);	/* cast away const */
+		if(lstatus != NC_NOERR)
+			return lstatus;
+		
+		lstatus = ncx_getn_float_uchar(&xp, nget, value);
+		if(lstatus != NC_NOERR && status == NC_NOERR)
+			status = lstatus;
+
+		(void) ncio_rel(ncp->nciop, offset, 0);	
+
+		remaining -= extent;
+		if(remaining == 0)
+			break; /* normal loop exit */
+		offset += extent;
+		value += nget;
+	}
+
+	return status;
+}
+
+static int
+getNCvx_float_short(const NC *ncp, const NC_var *varp,
+		 const size_t *start, size_t nelems, short *value)
+{
+	off_t offset = NC_varoffset(ncp, varp, start);
+	size_t remaining = varp->xsz * nelems;
+	int status = NC_NOERR;
+	const void *xp;
+
+	if(nelems == 0)
+		return NC_NOERR;
+
+	assert(value != NULL);
+
+	for(;;)
+	{
+		size_t extent = MIN(remaining, ncp->chunk);
+		size_t nget = ncx_howmany(varp->type, extent);
+
+		int lstatus = ncio_get(ncp->nciop, offset, extent,
+				 0, (void **)&xp);	/* cast away const */
+		if(lstatus != NC_NOERR)
+			return lstatus;
+		
+		lstatus = ncx_getn_float_short(&xp, nget, value);
+		if(lstatus != NC_NOERR && status == NC_NOERR)
+			status = lstatus;
+
+		(void) ncio_rel(ncp->nciop, offset, 0);	
+
+		remaining -= extent;
+		if(remaining == 0)
+			break; /* normal loop exit */
+		offset += extent;
+		value += nget;
+	}
+
+	return status;
+}
+
+static int
+getNCvx_float_int(const NC *ncp, const NC_var *varp,
+		 const size_t *start, size_t nelems, int *value)
+{
+	off_t offset = NC_varoffset(ncp, varp, start);
+	size_t remaining = varp->xsz * nelems;
+	int status = NC_NOERR;
+	const void *xp;
+
+	if(nelems == 0)
+		return NC_NOERR;
+
+	assert(value != NULL);
+
+	for(;;)
+	{
+		size_t extent = MIN(remaining, ncp->chunk);
+		size_t nget = ncx_howmany(varp->type, extent);
+
+		int lstatus = ncio_get(ncp->nciop, offset, extent,
+				 0, (void **)&xp);	/* cast away const */
+		if(lstatus != NC_NOERR)
+			return lstatus;
+		
+		lstatus = ncx_getn_float_int(&xp, nget, value);
+		if(lstatus != NC_NOERR && status == NC_NOERR)
+			status = lstatus;
+
+		(void) ncio_rel(ncp->nciop, offset, 0);	
+
+		remaining -= extent;
+		if(remaining == 0)
+			break; /* normal loop exit */
+		offset += extent;
+		value += nget;
+	}
+
+	return status;
+}
+
+static int
+getNCvx_float_float(const NC *ncp, const NC_var *varp,
+		 const size_t *start, size_t nelems, float *value)
+{
+	off_t offset = NC_varoffset(ncp, varp, start);
+	size_t remaining = varp->xsz * nelems;
+	int status = NC_NOERR;
+	const void *xp;
+
+	if(nelems == 0)
+		return NC_NOERR;
+
+	assert(value != NULL);
+
+	for(;;)
+	{
+		size_t extent = MIN(remaining, ncp->chunk);
+		size_t nget = ncx_howmany(varp->type, extent);
+
+		int lstatus = ncio_get(ncp->nciop, offset, extent,
+				 0, (void **)&xp);	/* cast away const */
+		if(lstatus != NC_NOERR)
+			return lstatus;
+		
+		lstatus = ncx_getn_float_float(&xp, nget, value);
+		if(lstatus != NC_NOERR && status == NC_NOERR)
+			status = lstatus;
+
+		(void) ncio_rel(ncp->nciop, offset, 0);	
+
+		remaining -= extent;
+		if(remaining == 0)
+			break; /* normal loop exit */
+		offset += extent;
+		value += nget;
+	}
+
+	return status;
+}
+
+static int
+getNCvx_float_double(const NC *ncp, const NC_var *varp,
+		 const size_t *start, size_t nelems, double *value)
+{
+	off_t offset = NC_varoffset(ncp, varp, start);
+	size_t remaining = varp->xsz * nelems;
+	int status = NC_NOERR;
+	const void *xp;
+
+	if(nelems == 0)
+		return NC_NOERR;
+
+	assert(value != NULL);
+
+	for(;;)
+	{
+		size_t extent = MIN(remaining, ncp->chunk);
+		size_t nget = ncx_howmany(varp->type, extent);
+
+		int lstatus = ncio_get(ncp->nciop, offset, extent,
+				 0, (void **)&xp);	/* cast away const */
+		if(lstatus != NC_NOERR)
+			return lstatus;
+		
+		lstatus = ncx_getn_float_double(&xp, nget, value);
+		if(lstatus != NC_NOERR && status == NC_NOERR)
+			status = lstatus;
+
+		(void) ncio_rel(ncp->nciop, offset, 0);	
+
+		remaining -= extent;
+		if(remaining == 0)
+			break; /* normal loop exit */
+		offset += extent;
+		value += nget;
+	}
+
+	return status;
+}
+
+static int
+getNCvx_float_longlong(const NC *ncp, const NC_var *varp,
+		 const size_t *start, size_t nelems, longlong *value)
+{
+	off_t offset = NC_varoffset(ncp, varp, start);
+	size_t remaining = varp->xsz * nelems;
+	int status = NC_NOERR;
+	const void *xp;
+
+	if(nelems == 0)
+		return NC_NOERR;
+
+	assert(value != NULL);
+
+	for(;;)
+	{
+		size_t extent = MIN(remaining, ncp->chunk);
+		size_t nget = ncx_howmany(varp->type, extent);
+
+		int lstatus = ncio_get(ncp->nciop, offset, extent,
+				 0, (void **)&xp);	/* cast away const */
+		if(lstatus != NC_NOERR)
+			return lstatus;
+		
+		lstatus = ncx_getn_float_longlong(&xp, nget, value);
+		if(lstatus != NC_NOERR && status == NC_NOERR)
+			status = lstatus;
+
+		(void) ncio_rel(ncp->nciop, offset, 0);	
+
+		remaining -= extent;
+		if(remaining == 0)
+			break; /* normal loop exit */
+		offset += extent;
+		value += nget;
+	}
+
+	return status;
+}
+
+static int
+getNCvx_float_uint(const NC *ncp, const NC_var *varp,
+		 const size_t *start, size_t nelems, uint *value)
+{
+	off_t offset = NC_varoffset(ncp, varp, start);
+	size_t remaining = varp->xsz * nelems;
+	int status = NC_NOERR;
+	const void *xp;
+
+	if(nelems == 0)
+		return NC_NOERR;
+
+	assert(value != NULL);
+
+	for(;;)
+	{
+		size_t extent = MIN(remaining, ncp->chunk);
+		size_t nget = ncx_howmany(varp->type, extent);
+
+		int lstatus = ncio_get(ncp->nciop, offset, extent,
+				 0, (void **)&xp);	/* cast away const */
+		if(lstatus != NC_NOERR)
+			return lstatus;
+		
+		lstatus = ncx_getn_float_uint(&xp, nget, value);
+		if(lstatus != NC_NOERR && status == NC_NOERR)
+			status = lstatus;
+
+		(void) ncio_rel(ncp->nciop, offset, 0);	
+
+		remaining -= extent;
+		if(remaining == 0)
+			break; /* normal loop exit */
+		offset += extent;
+		value += nget;
+	}
+
+	return status;
+}
+
+static int
+getNCvx_float_ulonglong(const NC *ncp, const NC_var *varp,
+		 const size_t *start, size_t nelems, ulonglong *value)
+{
+	off_t offset = NC_varoffset(ncp, varp, start);
+	size_t remaining = varp->xsz * nelems;
+	int status = NC_NOERR;
+	const void *xp;
+
+	if(nelems == 0)
+		return NC_NOERR;
+
+	assert(value != NULL);
+
+	for(;;)
+	{
+		size_t extent = MIN(remaining, ncp->chunk);
+		size_t nget = ncx_howmany(varp->type, extent);
+
+		int lstatus = ncio_get(ncp->nciop, offset, extent,
+				 0, (void **)&xp);	/* cast away const */
+		if(lstatus != NC_NOERR)
+			return lstatus;
+		
+		lstatus = ncx_getn_float_ulonglong(&xp, nget, value);
+		if(lstatus != NC_NOERR && status == NC_NOERR)
+			status = lstatus;
+
+		(void) ncio_rel(ncp->nciop, offset, 0);	
+
+		remaining -= extent;
+		if(remaining == 0)
+			break; /* normal loop exit */
+		offset += extent;
+		value += nget;
+	}
+
+	return status;
+}
+
+
+static int
+getNCvx_double_schar(const NC *ncp, const NC_var *varp,
+		 const size_t *start, size_t nelems, schar *value)
+{
+	off_t offset = NC_varoffset(ncp, varp, start);
+	size_t remaining = varp->xsz * nelems;
+	int status = NC_NOERR;
+	const void *xp;
+
+	if(nelems == 0)
+		return NC_NOERR;
+
+	assert(value != NULL);
+
+	for(;;)
+	{
+		size_t extent = MIN(remaining, ncp->chunk);
+		size_t nget = ncx_howmany(varp->type, extent);
+
+		int lstatus = ncio_get(ncp->nciop, offset, extent,
+				 0, (void **)&xp);	/* cast away const */
+		if(lstatus != NC_NOERR)
+			return lstatus;
+		
+		lstatus = ncx_getn_double_schar(&xp, nget, value);
+		if(lstatus != NC_NOERR && status == NC_NOERR)
+			status = lstatus;
+
+		(void) ncio_rel(ncp->nciop, offset, 0);	
+
+		remaining -= extent;
+		if(remaining == 0)
+			break; /* normal loop exit */
+		offset += extent;
+		value += nget;
+	}
+
+	return status;
+}
+
+static int
+getNCvx_double_uchar(const NC *ncp, const NC_var *varp,
+		 const size_t *start, size_t nelems, uchar *value)
+{
+	off_t offset = NC_varoffset(ncp, varp, start);
+	size_t remaining = varp->xsz * nelems;
+	int status = NC_NOERR;
+	const void *xp;
+
+	if(nelems == 0)
+		return NC_NOERR;
+
+	assert(value != NULL);
+
+	for(;;)
+	{
+		size_t extent = MIN(remaining, ncp->chunk);
+		size_t nget = ncx_howmany(varp->type, extent);
+
+		int lstatus = ncio_get(ncp->nciop, offset, extent,
+				 0, (void **)&xp);	/* cast away const */
+		if(lstatus != NC_NOERR)
+			return lstatus;
+		
+		lstatus = ncx_getn_double_uchar(&xp, nget, value);
+		if(lstatus != NC_NOERR && status == NC_NOERR)
+			status = lstatus;
+
+		(void) ncio_rel(ncp->nciop, offset, 0);	
+
+		remaining -= extent;
+		if(remaining == 0)
+			break; /* normal loop exit */
+		offset += extent;
+		value += nget;
+	}
+
+	return status;
+}
+
+static int
+getNCvx_double_short(const NC *ncp, const NC_var *varp,
+		 const size_t *start, size_t nelems, short *value)
+{
+	off_t offset = NC_varoffset(ncp, varp, start);
+	size_t remaining = varp->xsz * nelems;
+	int status = NC_NOERR;
+	const void *xp;
+
+	if(nelems == 0)
+		return NC_NOERR;
+
+	assert(value != NULL);
+
+	for(;;)
+	{
+		size_t extent = MIN(remaining, ncp->chunk);
+		size_t nget = ncx_howmany(varp->type, extent);
+
+		int lstatus = ncio_get(ncp->nciop, offset, extent,
+				 0, (void **)&xp);	/* cast away const */
+		if(lstatus != NC_NOERR)
+			return lstatus;
+		
+		lstatus = ncx_getn_double_short(&xp, nget, value);
+		if(lstatus != NC_NOERR && status == NC_NOERR)
+			status = lstatus;
+
+		(void) ncio_rel(ncp->nciop, offset, 0);	
+
+		remaining -= extent;
+		if(remaining == 0)
+			break; /* normal loop exit */
+		offset += extent;
+		value += nget;
+	}
+
+	return status;
+}
+
+static int
+getNCvx_double_int(const NC *ncp, const NC_var *varp,
+		 const size_t *start, size_t nelems, int *value)
+{
+	off_t offset = NC_varoffset(ncp, varp, start);
+	size_t remaining = varp->xsz * nelems;
+	int status = NC_NOERR;
+	const void *xp;
+
+	if(nelems == 0)
+		return NC_NOERR;
+
+	assert(value != NULL);
+
+	for(;;)
+	{
+		size_t extent = MIN(remaining, ncp->chunk);
+		size_t nget = ncx_howmany(varp->type, extent);
+
+		int lstatus = ncio_get(ncp->nciop, offset, extent,
+				 0, (void **)&xp);	/* cast away const */
+		if(lstatus != NC_NOERR)
+			return lstatus;
+		
+		lstatus = ncx_getn_double_int(&xp, nget, value);
+		if(lstatus != NC_NOERR && status == NC_NOERR)
+			status = lstatus;
+
+		(void) ncio_rel(ncp->nciop, offset, 0);	
+
+		remaining -= extent;
+		if(remaining == 0)
+			break; /* normal loop exit */
+		offset += extent;
+		value += nget;
+	}
+
+	return status;
+}
+
+static int
+getNCvx_double_float(const NC *ncp, const NC_var *varp,
+		 const size_t *start, size_t nelems, float *value)
+{
+	off_t offset = NC_varoffset(ncp, varp, start);
+	size_t remaining = varp->xsz * nelems;
+	int status = NC_NOERR;
+	const void *xp;
+
+	if(nelems == 0)
+		return NC_NOERR;
+
+	assert(value != NULL);
+
+	for(;;)
+	{
+		size_t extent = MIN(remaining, ncp->chunk);
+		size_t nget = ncx_howmany(varp->type, extent);
+
+		int lstatus = ncio_get(ncp->nciop, offset, extent,
+				 0, (void **)&xp);	/* cast away const */
+		if(lstatus != NC_NOERR)
+			return lstatus;
+		
+		lstatus = ncx_getn_double_float(&xp, nget, value);
+		if(lstatus != NC_NOERR && status == NC_NOERR)
+			status = lstatus;
+
+		(void) ncio_rel(ncp->nciop, offset, 0);	
+
+		remaining -= extent;
+		if(remaining == 0)
+			break; /* normal loop exit */
+		offset += extent;
+		value += nget;
+	}
+
+	return status;
+}
+
+static int
+getNCvx_double_double(const NC *ncp, const NC_var *varp,
+		 const size_t *start, size_t nelems, double *value)
+{
+	off_t offset = NC_varoffset(ncp, varp, start);
+	size_t remaining = varp->xsz * nelems;
+	int status = NC_NOERR;
+	const void *xp;
+
+	if(nelems == 0)
+		return NC_NOERR;
+
+	assert(value != NULL);
+
+	for(;;)
+	{
+		size_t extent = MIN(remaining, ncp->chunk);
+		size_t nget = ncx_howmany(varp->type, extent);
+
+		int lstatus = ncio_get(ncp->nciop, offset, extent,
+				 0, (void **)&xp);	/* cast away const */
+		if(lstatus != NC_NOERR)
+			return lstatus;
+		
+		lstatus = ncx_getn_double_double(&xp, nget, value);
+		if(lstatus != NC_NOERR && status == NC_NOERR)
+			status = lstatus;
+
+		(void) ncio_rel(ncp->nciop, offset, 0);	
+
+		remaining -= extent;
+		if(remaining == 0)
+			break; /* normal loop exit */
+		offset += extent;
+		value += nget;
+	}
+
+	return status;
+}
+
+static int
+getNCvx_double_longlong(const NC *ncp, const NC_var *varp,
+		 const size_t *start, size_t nelems, longlong *value)
+{
+	off_t offset = NC_varoffset(ncp, varp, start);
+	size_t remaining = varp->xsz * nelems;
+	int status = NC_NOERR;
+	const void *xp;
+
+	if(nelems == 0)
+		return NC_NOERR;
+
+	assert(value != NULL);
+
+	for(;;)
+	{
+		size_t extent = MIN(remaining, ncp->chunk);
+		size_t nget = ncx_howmany(varp->type, extent);
+
+		int lstatus = ncio_get(ncp->nciop, offset, extent,
+				 0, (void **)&xp);	/* cast away const */
+		if(lstatus != NC_NOERR)
+			return lstatus;
+		
+		lstatus = ncx_getn_double_longlong(&xp, nget, value);
+		if(lstatus != NC_NOERR && status == NC_NOERR)
+			status = lstatus;
+
+		(void) ncio_rel(ncp->nciop, offset, 0);	
+
+		remaining -= extent;
+		if(remaining == 0)
+			break; /* normal loop exit */
+		offset += extent;
+		value += nget;
+	}
+
+	return status;
+}
+
+static int
+getNCvx_double_uint(const NC *ncp, const NC_var *varp,
+		 const size_t *start, size_t nelems, uint *value)
+{
+	off_t offset = NC_varoffset(ncp, varp, start);
+	size_t remaining = varp->xsz * nelems;
+	int status = NC_NOERR;
+	const void *xp;
+
+	if(nelems == 0)
+		return NC_NOERR;
+
+	assert(value != NULL);
+
+	for(;;)
+	{
+		size_t extent = MIN(remaining, ncp->chunk);
+		size_t nget = ncx_howmany(varp->type, extent);
+
+		int lstatus = ncio_get(ncp->nciop, offset, extent,
+				 0, (void **)&xp);	/* cast away const */
+		if(lstatus != NC_NOERR)
+			return lstatus;
+		
+		lstatus = ncx_getn_double_uint(&xp, nget, value);
+		if(lstatus != NC_NOERR && status == NC_NOERR)
+			status = lstatus;
+
+		(void) ncio_rel(ncp->nciop, offset, 0);	
+
+		remaining -= extent;
+		if(remaining == 0)
+			break; /* normal loop exit */
+		offset += extent;
+		value += nget;
+	}
+
+	return status;
+}
+
+static int
+getNCvx_double_ulonglong(const NC *ncp, const NC_var *varp,
+		 const size_t *start, size_t nelems, ulonglong *value)
+{
+	off_t offset = NC_varoffset(ncp, varp, start);
+	size_t remaining = varp->xsz * nelems;
+	int status = NC_NOERR;
+	const void *xp;
+
+	if(nelems == 0)
+		return NC_NOERR;
+
+	assert(value != NULL);
+
+	for(;;)
+	{
+		size_t extent = MIN(remaining, ncp->chunk);
+		size_t nget = ncx_howmany(varp->type, extent);
+
+		int lstatus = ncio_get(ncp->nciop, offset, extent,
+				 0, (void **)&xp);	/* cast away const */
+		if(lstatus != NC_NOERR)
+			return lstatus;
+		
+		lstatus = ncx_getn_double_ulonglong(&xp, nget, value);
+		if(lstatus != NC_NOERR && status == NC_NOERR)
+			status = lstatus;
+
+		(void) ncio_rel(ncp->nciop, offset, 0);	
+
+		remaining -= extent;
+		if(remaining == 0)
+			break; /* normal loop exit */
+		offset += extent;
+		value += nget;
+	}
+
+	return status;
+}
+
+
+#ifdef NOTUSED
+static int
+getNCvx_schar_uchar(const NC *ncp, const NC_var *varp,
+		 const size_t *start, size_t nelems, uchar *value)
+{
+	off_t offset = NC_varoffset(ncp, varp, start);
+	size_t remaining = varp->xsz * nelems;
+	int status = NC_NOERR;
+	const void *xp;
+
+	if(nelems == 0)
+		return NC_NOERR;
+
+	assert(value != NULL);
+
+	for(;;)
+	{
+		size_t extent = MIN(remaining, ncp->chunk);
+		size_t nget = ncx_howmany(varp->type, extent);
+
+		int lstatus = ncio_get(ncp->nciop, offset, extent,
+				 0, (void **)&xp);	/* cast away const */
+		if(lstatus != NC_NOERR)
+			return lstatus;
+		
+		lstatus = ncx_getn_schar_uchar(&xp, nget, value);
+		if(lstatus != NC_NOERR && status == NC_NOERR)
+			status = lstatus;
+
+		(void) ncio_rel(ncp->nciop, offset, 0);	
+
+		remaining -= extent;
+		if(remaining == 0)
+			break; /* normal loop exit */
+		offset += extent;
+		value += nget;
+	}
+
+	return status;
+}
+
+#endif /*NOTUSED*/
+
+/*
+ *  For ncvar{put,get},
+ *  find the largest contiguous block from within 'edges'.
+ *  returns the index to the left of this (which may be -1).
+ *  Compute the number of contiguous elements and return
+ *  that in *iocountp.
+ *  The presence of "record" variables makes this routine
+ *  overly subtle.
+ */
+static int
+NCiocount(const NC *const ncp, const NC_var *const varp,
+	const size_t *const edges,
+	size_t *const iocountp)
+{
+	const size_t *edp0 = edges;
+	const size_t *edp = edges + varp->ndims;
+	const size_t *shp = varp->shape + varp->ndims;
+
+	if(IS_RECVAR(varp))
+	{
+		if(varp->ndims == 1 && ncp->recsize <= varp->len)
+		{
+			/* one dimensional && the only 'record' variable */
+			*iocountp = *edges;
+			return(0);
+		}
+		/* else */
+		edp0++;
+	}
+
+	assert(edges != NULL);
+
+	/* find max contiguous */
+	while(edp > edp0)
+	{
+		shp--; edp--;
+		if(*edp < *shp )
+		{
+			const size_t *zedp = edp;
+			while(zedp >= edp0)
+			{
+				if(*zedp == 0)
+				{
+					*iocountp = 0;
+					goto done;
+				}
+				/* Tip of the hat to segmented architectures */
+				if(zedp == edp0)
+					break;
+				zedp--;
+			}
+			break;
+		}
+		assert(*edp == *shp);
+	}
+
+	/*
+	 * edp, shp reference rightmost index s.t. *(edp +1) == *(shp +1)
+	 *
+	 * Or there is only one dimension.
+	 * If there is only one dimension and it is 'non record' dimension,
+	 * 	edp is &edges[0] and we will return -1.
+	 * If there is only one dimension and and it is a "record dimension",
+	 *	edp is &edges[1] (out of bounds) and we will return 0;
+	 */
+	assert(shp >= varp->shape + varp->ndims -1 
+		|| *(edp +1) == *(shp +1));
+
+	/* now accumulate max count for a single io operation */
+	for(*iocountp = 1, edp0 = edp;
+		 	edp0 < edges + varp->ndims;
+			edp0++)
+	{
+		*iocountp *= *edp0;
+	}
+
+done:
+	return((int)(edp - edges) - 1);
+}
+
+
+/*
+ * Set the elements of the array 'upp' to
+ * the sum of the corresponding elements of
+ * 'stp' and 'edp'. 'end' should be &stp[nelems].
+ */
+static void
+set_upper(size_t *upp, /* modified on return */
+	const size_t *stp,
+	const size_t *edp,
+	const size_t *const end)
+{
+	while(upp < end) {
+		*upp++ = *stp++ + *edp++;
+	}
+}
+
+
+/*
+ * The infamous and oft-discussed odometer code.
+ *
+ * 'start[]' is the starting coordinate.
+ * 'upper[]' is the upper bound s.t. start[ii] < upper[ii].
+ * 'coord[]' is the register, the current coordinate value.
+ * For some ii,
+ * upp == &upper[ii]
+ * cdp == &coord[ii]
+ * 
+ * Running this routine increments *cdp.
+ *
+ * If after the increment, *cdp is equal to *upp
+ * (and cdp is not the leftmost dimension),
+ * *cdp is "zeroed" to the starting value and
+ * we need to "carry", eg, increment one place to
+ * the left.
+ * 
+ * TODO: Some architectures hate recursion?
+ * 	Reimplement non-recursively.
+ */
+static void
+odo1(const size_t *const start, const size_t *const upper,
+	size_t *const coord, /* modified on return */
+	const size_t *upp,
+	size_t *cdp)
+{
+	assert(coord <= cdp && cdp <= coord + NC_MAX_VAR_DIMS);
+	assert(upper <= upp && upp <= upper + NC_MAX_VAR_DIMS);
+	assert(upp - upper == cdp - coord);
+	
+	assert(*cdp <= *upp);
+
+	(*cdp)++;
+	if(cdp != coord && *cdp >= *upp)
+	{
+		*cdp = start[cdp - coord];
+		odo1(start, upper, coord, upp -1, cdp -1);
+	}
+}
+#ifdef _CRAYC
+#pragma _CRI noinline odo1
+#endif
+
+
+
+/* Define a macro to allow hash on two type values */
+#define CASE(nc1,nc2) (nc1*256+nc2)
+
+static int
+readNCv(const NC* ncp, const NC_var* varp, const size_t* start,
+        const size_t nelems, void* value, const nc_type memtype)
+{
+    int status = NC_NOERR;
+    switch (CASE(varp->type,memtype)) {
+    case CASE(NC_CHAR,NC_CHAR):
+    case CASE(NC_CHAR,NC_UBYTE):
+        status = getNCvx_char_char(ncp,varp,start,nelems,(char*)value);
+        break;
+
+    case CASE(NC_BYTE,NC_BYTE):
+    case CASE(NC_BYTE,NC_UBYTE):
+        status = getNCvx_schar_schar(ncp,varp,start,nelems,(signed char*)value);
+        break;
+    case CASE(NC_BYTE,NC_SHORT):
+        status = getNCvx_schar_short(ncp,varp,start,nelems,(short*)value);
+        break;
+    case CASE(NC_BYTE,NC_INT):
+        status = getNCvx_schar_int(ncp,varp,start,nelems,(int*)value);
+        break;
+    case CASE(NC_BYTE,NC_FLOAT):
+        status = getNCvx_schar_float(ncp,varp,start,nelems,(float*)value);
+        break;
+    case CASE(NC_BYTE,NC_DOUBLE):
+        status = getNCvx_schar_double(ncp,varp,start,nelems,(double *)value);
+        break;
+    case CASE(NC_BYTE,NC_INT64):
+        status = getNCvx_schar_longlong(ncp,varp,start,nelems,(long long*)value);
+        break;
+    case CASE(NC_BYTE,NC_UINT):
+        status = getNCvx_schar_uint(ncp,varp,start,nelems,(unsigned int*)value);
+        break;
+    case CASE(NC_BYTE,NC_UINT64):
+        status = getNCvx_schar_ulonglong(ncp,varp,start,nelems,(unsigned long long*)value);
+        break;
+
+    case CASE(NC_SHORT,NC_BYTE):
+        status = getNCvx_short_schar(ncp,varp,start,nelems,(signed char*)value);
+        break;
+    case CASE(NC_SHORT,NC_UBYTE):
+        status = getNCvx_short_uchar(ncp,varp,start,nelems,(unsigned char*)value);
+        break;
+    case CASE(NC_SHORT,NC_SHORT):
+        status = getNCvx_short_short(ncp,varp,start,nelems,(short*)value);
+        break;
+    case CASE(NC_SHORT,NC_INT):
+        status = getNCvx_short_int(ncp,varp,start,nelems,(int*)value);
+        break;
+    case CASE(NC_SHORT,NC_FLOAT):
+        status = getNCvx_short_float(ncp,varp,start,nelems,(float*)value);
+        break;
+    case CASE(NC_SHORT,NC_DOUBLE):
+        status = getNCvx_short_double(ncp,varp,start,nelems,(double*)value);
+        break;
+    case CASE(NC_SHORT,NC_INT64):
+        status = getNCvx_short_longlong(ncp,varp,start,nelems,(long long*)value);
+        break;
+    case CASE(NC_SHORT,NC_UINT):
+        status = getNCvx_short_uint(ncp,varp,start,nelems,(unsigned int*)value);
+        break;
+    case CASE(NC_SHORT,NC_UINT64):
+        status = getNCvx_short_ulonglong(ncp,varp,start,nelems,(unsigned long long*)value);
+        break;
+
+
+    case CASE(NC_INT,NC_BYTE):
+        status = getNCvx_int_schar(ncp,varp,start,nelems,(signed char*)value);
+        break;
+    case CASE(NC_INT,NC_UBYTE):
+        status = getNCvx_int_uchar(ncp,varp,start,nelems,(unsigned char*)value);
+        break;
+    case CASE(NC_INT,NC_SHORT):
+        status = getNCvx_int_short(ncp,varp,start,nelems,(short*)value);
+        break;
+    case CASE(NC_INT,NC_INT):
+        status = getNCvx_int_int(ncp,varp,start,nelems,(int*)value);
+        break;
+    case CASE(NC_INT,NC_FLOAT):
+        status = getNCvx_int_float(ncp,varp,start,nelems,(float*)value);
+        break;
+    case CASE(NC_INT,NC_DOUBLE):
+        status = getNCvx_int_double(ncp,varp,start,nelems,(double*)value);
+        break;
+    case CASE(NC_INT,NC_INT64):
+        status = getNCvx_int_longlong(ncp,varp,start,nelems,(long long*)value);
+        break;
+    case CASE(NC_INT,NC_UINT):
+        status = getNCvx_int_uint(ncp,varp,start,nelems,(unsigned int*)value);
+        break;
+    case CASE(NC_INT,NC_UINT64):
+        status = getNCvx_int_ulonglong(ncp,varp,start,nelems,(unsigned long long*)value);
+        break;
+
+
+    case CASE(NC_FLOAT,NC_BYTE):
+        status = getNCvx_float_schar(ncp,varp,start,nelems,(signed char*)value);
+        break;
+    case CASE(NC_FLOAT,NC_UBYTE):
+        status = getNCvx_float_uchar(ncp,varp,start,nelems,(unsigned char*)value);
+        break;
+    case CASE(NC_FLOAT,NC_SHORT):
+        status = getNCvx_float_short(ncp,varp,start,nelems,(short*)value);
+        break;
+    case CASE(NC_FLOAT,NC_INT):
+        status = getNCvx_float_int(ncp,varp,start,nelems,(int*)value);
+        break;
+    case CASE(NC_FLOAT,NC_FLOAT):
+        status = getNCvx_float_float(ncp,varp,start,nelems,(float*)value);
+        break;
+    case CASE(NC_FLOAT,NC_DOUBLE):
+        status = getNCvx_float_double(ncp,varp,start,nelems,(double*)value);
+        break;
+    case CASE(NC_FLOAT,NC_INT64):
+        status = getNCvx_float_longlong(ncp,varp,start,nelems,(long long*)value);
+        break;
+    case CASE(NC_FLOAT,NC_UINT):
+        status = getNCvx_float_uint(ncp,varp,start,nelems,(unsigned int*)value);
+        break;
+    case CASE(NC_FLOAT,NC_UINT64):
+        status = getNCvx_float_ulonglong(ncp,varp,start,nelems,(unsigned long long*)value);
+        break;
+
+
+    case CASE(NC_DOUBLE,NC_BYTE):
+        status = getNCvx_double_schar(ncp,varp,start,nelems,(signed char*)value);
+        break;
+    case CASE(NC_DOUBLE,NC_UBYTE):
+        status = getNCvx_double_uchar(ncp,varp,start,nelems,(unsigned char*)value);
+        break;
+    case CASE(NC_DOUBLE,NC_SHORT):
+        status = getNCvx_double_short(ncp,varp,start,nelems,(short*)value);
+        break;
+    case CASE(NC_DOUBLE,NC_INT):
+        status = getNCvx_double_int(ncp,varp,start,nelems,(int*)value);
+        break;
+    case CASE(NC_DOUBLE,NC_FLOAT):
+        status = getNCvx_double_float(ncp,varp,start,nelems,(float*)value);
+        break;
+    case CASE(NC_DOUBLE,NC_DOUBLE):
+        status = getNCvx_double_double(ncp,varp,start,nelems,(double*)value);
+        break;
+    case CASE(NC_DOUBLE,NC_INT64):
+        status = getNCvx_double_longlong(ncp,varp,start,nelems,(long long*)value);
+        break;
+    case CASE(NC_DOUBLE,NC_UINT):
+        status = getNCvx_double_uint(ncp,varp,start,nelems,(unsigned int*)value);
+        break;
+    case CASE(NC_DOUBLE,NC_UINT64):
+        status = getNCvx_double_ulonglong(ncp,varp,start,nelems,(unsigned long long*)value);
+        break;
+
+    default:
+	return NC_EBADTYPE;
+    }
+    return status;
+}
+
+
+static int
+writeNCv(NC* ncp, const NC_var* varp, const size_t* start,
+         const size_t nelems, const void* value, const nc_type memtype)
+{
+    int status = NC_NOERR;
+    switch (CASE(varp->type,memtype)) {
+    case CASE(NC_CHAR,NC_CHAR):
+    case CASE(NC_CHAR,NC_UBYTE):
+        status = putNCvx_char_char(ncp,varp,start,nelems,(char*)value);
+        break;
+
+    case CASE(NC_BYTE,NC_BYTE):
+        status = putNCvx_schar_schar(ncp,varp,start,nelems,(signed char*)value);
+        break;
+    case CASE(NC_BYTE,NC_UBYTE):
+        status = putNCvx_schar_uchar(ncp,varp,start,nelems,(unsigned char*)value);
+        break;
+    case CASE(NC_BYTE,NC_SHORT):
+        status = putNCvx_schar_short(ncp,varp,start,nelems,(short*)value);
+        break;
+    case CASE(NC_BYTE,NC_INT):
+        status = putNCvx_schar_int(ncp,varp,start,nelems,(int*)value);
+        break;
+    case CASE(NC_BYTE,NC_FLOAT):
+        status = putNCvx_schar_float(ncp,varp,start,nelems,(float*)value);
+        break;
+    case CASE(NC_BYTE,NC_DOUBLE):
+        status = putNCvx_schar_double(ncp,varp,start,nelems,(double *)value);
+        break;
+    case CASE(NC_BYTE,NC_INT64):
+        status = putNCvx_schar_longlong(ncp,varp,start,nelems,(long long*)value);
+        break;
+
+    case CASE(NC_SHORT,NC_BYTE):
+        status = putNCvx_short_schar(ncp,varp,start,nelems,(signed char*)value);
+        break;
+    case CASE(NC_SHORT,NC_UBYTE):
+        status = putNCvx_short_uchar(ncp,varp,start,nelems,(unsigned char*)value);
+        break;
+    case CASE(NC_SHORT,NC_SHORT):
+        status = putNCvx_short_short(ncp,varp,start,nelems,(short*)value);
+        break;
+    case CASE(NC_SHORT,NC_INT):
+        status = putNCvx_short_int(ncp,varp,start,nelems,(int*)value);
+        break;
+    case CASE(NC_SHORT,NC_FLOAT):
+        status = putNCvx_short_float(ncp,varp,start,nelems,(float*)value);
+        break;
+    case CASE(NC_SHORT,NC_DOUBLE):
+        status = putNCvx_short_double(ncp,varp,start,nelems,(double*)value);
+        break;
+    case CASE(NC_SHORT,NC_INT64):
+        status = putNCvx_short_longlong(ncp,varp,start,nelems,(long long*)value);
+        break;
+
+    case CASE(NC_INT,NC_BYTE):
+        status = putNCvx_int_schar(ncp,varp,start,nelems,(signed char*)value);
+        break;
+    case CASE(NC_INT,NC_UBYTE):
+        status = putNCvx_int_uchar(ncp,varp,start,nelems,(unsigned char*)value);
+        break;
+    case CASE(NC_INT,NC_SHORT):
+        status = putNCvx_int_short(ncp,varp,start,nelems,(short*)value);
+        break;
+    case CASE(NC_INT,NC_INT):
+        status = putNCvx_int_int(ncp,varp,start,nelems,(int*)value);
+        break;
+    case CASE(NC_INT,NC_FLOAT):
+        status = putNCvx_int_float(ncp,varp,start,nelems,(float*)value);
+        break;
+    case CASE(NC_INT,NC_DOUBLE):
+        status = putNCvx_int_double(ncp,varp,start,nelems,(double*)value);
+        break;
+    case CASE(NC_INT,NC_INT64):
+        status = putNCvx_int_longlong(ncp,varp,start,nelems,(long long*)value);
+        break;
+
+    case CASE(NC_FLOAT,NC_BYTE):
+        status = putNCvx_float_schar(ncp,varp,start,nelems,(signed char*)value);
+        break;
+    case CASE(NC_FLOAT,NC_UBYTE):
+        status = putNCvx_float_uchar(ncp,varp,start,nelems,(unsigned char*)value);
+        break;
+    case CASE(NC_FLOAT,NC_SHORT):
+        status = putNCvx_float_short(ncp,varp,start,nelems,(short*)value);
+        break;
+    case CASE(NC_FLOAT,NC_INT):
+        status = putNCvx_float_int(ncp,varp,start,nelems,(int*)value);
+        break;
+    case CASE(NC_FLOAT,NC_FLOAT):
+        status = putNCvx_float_float(ncp,varp,start,nelems,(float*)value);
+        break;
+    case CASE(NC_FLOAT,NC_DOUBLE):
+        status = putNCvx_float_double(ncp,varp,start,nelems,(double*)value);
+        break;
+    case CASE(NC_FLOAT,NC_INT64):
+        status = putNCvx_float_longlong(ncp,varp,start,nelems,(long long*)value);
+        break;
+
+    case CASE(NC_DOUBLE,NC_BYTE):
+        status = putNCvx_double_schar(ncp,varp,start,nelems,(signed char*)value);
+        break;
+    case CASE(NC_DOUBLE,NC_UBYTE):
+        status = putNCvx_double_uchar(ncp,varp,start,nelems,(unsigned char*)value);
+        break;
+    case CASE(NC_DOUBLE,NC_SHORT):
+        status = putNCvx_double_short(ncp,varp,start,nelems,(short*)value);
+        break;
+    case CASE(NC_DOUBLE,NC_INT):
+        status = putNCvx_double_int(ncp,varp,start,nelems,(int*)value);
+        break;
+    case CASE(NC_DOUBLE,NC_FLOAT):
+        status = putNCvx_double_float(ncp,varp,start,nelems,(float*)value);
+        break;
+    case CASE(NC_DOUBLE,NC_DOUBLE):
+        status = putNCvx_double_double(ncp,varp,start,nelems,(double*)value);
+        break;
+    case CASE(NC_DOUBLE,NC_INT64):
+        status = putNCvx_double_longlong(ncp,varp,start,nelems,(long long*)value);
+        break;
+
+    default:
+	return NC_EBADTYPE;
+    }
+    return status;
+}
+
+/**************************************************/
+
+int
+NC3_get_vara(int ncid, int varid,
+	    const size_t *start, const size_t *edges0,
+            void *value0,
+	    nc_type memtype)
+{
+    int status = NC_NOERR;
+    NC* ncp;
+    NC_var *varp;
+    int ii;
+    size_t iocount;
+    size_t memtypelen;
+    char* value = (char*) value0; /* legally allow ptr arithmetic */
+    const size_t* edges = edges0; /* so we can modify for special cases */
+    size_t modedges[NC_MAX_VAR_DIMS];
+
+    status = NC_check_id(ncid, &ncp); 
+    if(status != NC_NOERR)
+        return status;
+
+    if(NC_indef(ncp))
+        return NC_EINDEFINE;
+
+    varp = NC_lookupvar(ncp, varid);
+    if(varp == NULL)
+        return NC_ENOTVAR;
+
+    if(memtype == NC_NAT) memtype=varp->type;
+
+    if(memtype == NC_CHAR && varp->type != NC_CHAR)
+        return NC_ECHAR;
+    else if(memtype != NC_CHAR && varp->type == NC_CHAR)  
+        return NC_ECHAR;
+
+    /* If edges is NULL, then this was called from nc_get_var() */
+    if(edges == NULL && varp->ndims > 0) {
+	/* If this is a record variable, then we have to
+           substitute the number of records into dimension 0. */
+	if(varp->shape[0] == 0) {
+	    (void*)memcpy((void*)modedges,(void*)varp->shape,
+                          sizeof(size_t)*varp->ndims);
+	    modedges[0] = NC_get_numrecs(ncp);
+	    edges = modedges;
+	} else
+	    edges = varp->shape;
+    }
+
+    status = NCcoordck(ncp, varp, start);
+    if(status != NC_NOERR)
+        return status;
+
+    status = NCedgeck(ncp, varp, start, edges);
+    if(status != NC_NOERR)
+        return status;
+
+    /* Get the size of the memtype */
+    memtypelen = nctypelen(memtype);
+
+    if(varp->ndims == 0) /* scalar variable */
+    {
+        return( readNCv(ncp, varp, start, 1, (void*)value, memtype) );
+    }
+
+    if(IS_RECVAR(varp))
+    {
+        if(*start + *edges > NC_get_numrecs(ncp))
+            return NC_EEDGE;
+        if(varp->ndims == 1 && ncp->recsize <= varp->len)
+        {
+            /* one dimensional && the only record variable  */
+            return( readNCv(ncp, varp, start, *edges, (void*)value, memtype) );
+        }
+    }
+
+    /*
+     * find max contiguous
+     *   and accumulate max count for a single io operation
+     */
+    ii = NCiocount(ncp, varp, edges, &iocount);
+
+    if(ii == -1)
+    {
+        return( readNCv(ncp, varp, start, iocount, (void*)value, memtype) );
+    }
+
+    assert(ii >= 0);
+
+    { /* inline */
+    ALLOC_ONSTACK(coord, size_t, varp->ndims);
+    ALLOC_ONSTACK(upper, size_t, varp->ndims);
+    const size_t index = ii;
+
+    /* copy in starting indices */
+    (void) memcpy(coord, start, varp->ndims * sizeof(size_t));
+
+    /* set up in maximum indices */
+    set_upper(upper, start, edges, &upper[varp->ndims]);
+
+    /* ripple counter */
+    while(*coord < *upper)
+    {
+        const int lstatus = readNCv(ncp, varp, coord, iocount, (void*)value, memtype);
+	if(lstatus != NC_NOERR)
+        {
+            if(lstatus != NC_ERANGE)
+            {
+                status = lstatus;
+                /* fatal for the loop */
+                break;
+            }
+            /* else NC_ERANGE, not fatal for the loop */
+            if(status == NC_NOERR)
+                status = lstatus;
+        }
+        value += (iocount * memtypelen);
+        odo1(start, upper, coord, &upper[index], &coord[index]);
+    }
+
+    FREE_ONSTACK(upper);
+    FREE_ONSTACK(coord);
+    } /* end inline */
+
+    return status;
+}
+
+int
+NC3_put_vara(int ncid, int varid,
+	    const size_t *start, const size_t *edges0,
+            const void *value0,
+	    nc_type memtype)
+{
+    int status = NC_NOERR;
+    NC *ncp;
+    NC_var *varp;
+    int ii;
+    size_t iocount;
+    size_t memtypelen;
+    char* value = (char*) value0; /* legally allow ptr arithmetic */
+    const size_t* edges = edges0; /* so we can modify for special cases */
+    size_t modedges[NC_MAX_VAR_DIMS];
+
+    status = NC_check_id(ncid, &ncp); 
+    if(status != NC_NOERR)
+        return status;
+
+    if(NC_readonly(ncp))
+        return NC_EPERM;
+
+    if(NC_indef(ncp))
+        return NC_EINDEFINE;
+
+    varp = NC_lookupvar(ncp, varid);
+    if(varp == NULL)
+        return NC_ENOTVAR; /* TODO: lost NC_EGLOBAL */
+
+    if(memtype == NC_NAT) memtype=varp->type;
+
+    if(memtype == NC_CHAR && varp->type != NC_CHAR)
+        return NC_ECHAR;
+    else if(memtype != NC_CHAR && varp->type == NC_CHAR)  
+        return NC_ECHAR;
+
+    /* Get the size of the memtype */
+    memtypelen = nctypelen(memtype);
+
+    /* If edges is NULL, then this was called from nc_get_var() */
+    if(edges == NULL && varp->ndims > 0) {
+	/* If this is a record variable, then we have to
+           substitute the number of records into dimension 0. */
+	if(varp->shape[0] == 0) {
+	    (void*)memcpy((void*)modedges,(void*)varp->shape,
+                          sizeof(size_t)*varp->ndims);
+	    modedges[0] = NC_get_numrecs(ncp);
+	    edges = modedges;
+	} else
+	    edges = varp->shape;
+    }
+
+    status = NCcoordck(ncp, varp, start);
+    if(status != NC_NOERR)
+        return status;
+    status = NCedgeck(ncp, varp, start, edges);
+    if(status != NC_NOERR)
+        return status;
+
+    if(varp->ndims == 0) /* scalar variable */
+    {
+        return( writeNCv(ncp, varp, start, 1, (void*)value, memtype) );
+    }
+
+    if(IS_RECVAR(varp))
+    {
+        status = NCvnrecs(ncp, *start + *edges);
+        if(status != NC_NOERR)
+            return status;
+
+        if(varp->ndims == 1
+            && ncp->recsize <= varp->len)
+        {
+            /* one dimensional && the only record variable  */
+            return( writeNCv(ncp, varp, start, *edges, (void*)value, memtype) );
+        }
+    }
+
+    /*
+     * find max contiguous
+     *   and accumulate max count for a single io operation
+     */
+    ii = NCiocount(ncp, varp, edges, &iocount);
+
+    if(ii == -1)
+    {
+        return( writeNCv(ncp, varp, start, iocount, (void*)value, memtype) );
+    }
+
+    assert(ii >= 0);
+
+    { /* inline */
+    ALLOC_ONSTACK(coord, size_t, varp->ndims);
+    ALLOC_ONSTACK(upper, size_t, varp->ndims);
+    const size_t index = ii;
+
+    /* copy in starting indices */
+    (void) memcpy(coord, start, varp->ndims * sizeof(size_t));
+
+    /* set up in maximum indices */
+    set_upper(upper, start, edges, &upper[varp->ndims]);
+
+    /* ripple counter */
+    while(*coord < *upper)
+    {
+        const int lstatus = writeNCv(ncp, varp, coord, iocount, (void*)value, memtype);
+        if(lstatus != NC_NOERR)
+        {
+            if(lstatus != NC_ERANGE)
+            {
+                status = lstatus;
+                /* fatal for the loop */
+                break;
+            }
+            /* else NC_ERANGE, not fatal for the loop */
+            if(status == NC_NOERR)
+                status = lstatus;
+        }
+        value += (iocount * memtypelen);
+        odo1(start, upper, coord, &upper[index], &coord[index]);
+    }
+
+    FREE_ONSTACK(upper);
+    FREE_ONSTACK(coord);
+    } /* end inline */
+
+    return status;
+}
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/src_netcdf4/rnd.h
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/src_netcdf4/rnd.h	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/src_netcdf4/rnd.h	(revision 1749)
@@ -0,0 +1,17 @@
+/*
+ *	Copyright 1996, University Corporation for Atmospheric Research
+ *      See netcdf/COPYRIGHT file for copying and redistribution conditions.
+ */
+/* $Id: rnd.h,v 2.13 1996/12/11 05:46:54 davis Exp $ */
+#ifndef _RNDUP
+
+/* useful for aligning memory */
+#define	_RNDUP(x, unit)  ((((x) + (unit) - 1) / (unit)) \
+	* (unit))
+#define	_RNDDOWN(x, unit)  ((x) - ((x)%(unit)))
+
+#define M_RND_UNIT	(sizeof(double))
+#define	M_RNDUP(x) _RNDUP(x, M_RND_UNIT)
+#define	M_RNDDOWN(x)  __RNDDOWN(x, M_RND_UNIT)
+
+#endif
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/src_netcdf4/stub.c
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/src_netcdf4/stub.c	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/src_netcdf4/stub.c	(revision 1749)
@@ -0,0 +1,71 @@
+/*********************************************************************
+ *   Copyright 2010, UCAR/Unidata
+ *   See netcdf/COPYRIGHT file for copying and redistribution conditions.
+ *********************************************************************/
+
+#include "config.h"
+#include "ncdispatch.h"
+
+extern int NC3_initialize(void);
+
+#ifdef USE_NETCDF4
+extern int NC4_initialize(void);
+#endif
+
+#ifdef USE_DAP
+extern int NCD3_initialize(void);
+#ifdef USE_NETCDF4
+extern int NCD4_initialize(void);
+#endif
+#endif
+
+#ifdef USE_CDMREMOTE
+extern int NCCR_initialize(void);
+#endif
+
+#ifdef BUILD_RPC
+extern int NCRPC_initialize(void);
+#endif
+
+int
+NC_initialize(void)
+{
+    int stat = NC_NOERR;
+
+    /* Allow libdispatch to do initialization */
+    if((stat = NCDISPATCH_initialize())) return stat;
+
+    /* Initialize each active protocol */
+
+    if((stat = NC3_initialize())) return stat;
+
+#ifdef USE_DAP
+    if((stat = NCD3_initialize())) return stat;
+#endif
+
+#ifdef USE_NETCDF4
+    if((stat = NC4_initialize())) return stat;
+
+    /* if((stat = NCD_initialize())) return stat; */
+
+#ifdef USE_DAP
+#ifdef NOTUSED
+    if((stat = NCD4_initialize())) return stat;
+#endif
+#endif
+
+#ifdef USE_CDMREMOTE
+    if((stat = NCCR_initialize())) return stat;
+#endif
+
+#ifdef USE_RPC
+    if((stat = NCRPC_initialize())) return stat;
+#endif
+
+#endif /* USE_NETCDF4 */
+
+
+    return NC_NOERR;
+}
+
+
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/src_netcdf4/utf8proc.h
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/src_netcdf4/utf8proc.h	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/src_netcdf4/utf8proc.h	(revision 1749)
@@ -0,0 +1,397 @@
+/*
+ *  Copyright (c) 2006-2007 Jan Behrens, FlexiGuided GmbH, Berlin
+ *
+ *  Permission is hereby granted, free of charge, to any person obtaining a
+ *  copy of this software and associated documentation files (the "Software"),
+ *  to deal in the Software without restriction, including without limitation
+ *  the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ *  and/or sell copies of the Software, and to permit persons to whom the
+ *  Software is furnished to do so, subject to the following conditions:
+ *
+ *  The above copyright notice and this permission notice shall be included in
+ *  all copies or substantial portions of the Software.
+ *
+ *  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ *  FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ *  DEALINGS IN THE SOFTWARE.
+ */
+
+
+/*
+ *  File name:    utf8proc.h
+ *  Version:      1.1.1
+ *  Last changed: 2007-07-22
+ *  Changed 2008-05-16 by rkr to add config.h and replacement for stdbool.h
+ *                            for pre-C99 compilers that don't support bool.
+ *  Changed 2008-06-05 by rkr to add utf8proc_check(str, options) function for
+ *                            for just checking UTF-8 validity
+ *  Description:
+ *  Header files for libutf8proc, which is a mapping tool for UTF-8 strings
+ *  with following features:
+ *  - decomposing and composing of strings
+ *  - replacing compatibility characters with their equivalents
+ *  - stripping of "default ignorable characters"
+ *    like SOFT-HYPHEN or ZERO-WIDTH-SPACE
+ *  - folding of certain characters for string comparison
+ *    (e.g. HYPHEN U+2010 and MINUS U+2212 to ASCII "-")
+ *    (see "LUMP" option)
+ *  - optional rejection of strings containing non-assigned code points
+ *  - stripping of control characters
+ *  - stripping of character marks (accents, etc.)
+ *  - transformation of LF, CRLF, CR and NEL to line-feed (LF)
+ *    or to the unicode chararacters for paragraph separation (PS)
+ *    or line separation (LS).
+ *  - unicode case folding (for case insensitive string comparisons)
+ *  - rejection of illegal UTF-8 data
+ *    (i.e. UTF-8 encoded UTF-16 surrogates)
+ *  - support for korean hangul characters
+ *  Unicode Version 5.0.0 is supported.
+ */
+
+
+#ifndef UTF8PROC_H
+#define UTF8PROC_H
+
+
+#include "config.h"
+
+#include <stdlib.h>
+#ifdef HAVE_STDBOOL_H
+#include <stdbool.h>
+#else
+# if ! HAVE__BOOL
+#  ifdef __cplusplus
+typedef bool _Bool;
+#  else
+typedef unsigned char _Bool;
+#  endif
+# endif
+# define bool _Bool
+# define false 0
+# define true 1
+# define __bool_true_false_are_defined 1
+#endif
+#include <sys/types.h>
+#ifdef HAVE_INTTYPES_H
+#include <inttypes.h>
+#else /* HAVE_INTTYPES_H */
+#include <pstdint.h>
+#endif /* HAVE_INTTYPES_H */ 
+#include <limits.h>
+
+#ifndef HAVE_SSIZE_T
+#define ssize_t int
+#endif
+
+#ifndef SSIZE_MAX
+#define SSIZE_MAX (SIZE_MAX/2)
+#endif
+
+#define UTF8PROC_NULLTERM  (1<<0)
+#define UTF8PROC_STABLE    (1<<1)
+#define UTF8PROC_COMPAT    (1<<2)
+#define UTF8PROC_COMPOSE   (1<<3)
+#define UTF8PROC_DECOMPOSE (1<<4)
+#define UTF8PROC_IGNORE    (1<<5)
+#define UTF8PROC_REJECTNA  (1<<6)
+#define UTF8PROC_NLF2LS    (1<<7)
+#define UTF8PROC_NLF2PS    (1<<8)
+#define UTF8PROC_NLF2LF    (UTF8PROC_NLF2LS | UTF8PROC_NLF2PS)
+#define UTF8PROC_STRIPCC   (1<<9)
+#define UTF8PROC_CASEFOLD  (1<<10)
+#define UTF8PROC_CHARBOUND (1<<11)
+#define UTF8PROC_LUMP      (1<<12)
+#define UTF8PROC_STRIPMARK (1<<13)
+/*
+ *  Flags being regarded by several functions in the library:
+ *  NULLTERM:  The given UTF-8 input is NULL terminated.
+ *  STABLE:    Unicode Versioning Stability has to be respected.
+ *  COMPAT:    Compatiblity decomposition
+ *             (i.e. formatting information is lost)
+ *  COMPOSE:   Return a result with composed characters.
+ *  DECOMPOSE: Return a result with decomposed characters.
+ *  IGNORE:    Strip "default ignorable characters"
+ *  REJECTNA:  Return an error, if the input contains unassigned
+ *             code points.
+ *  NLF2LS:    Indicating that NLF-sequences (LF, CRLF, CR, NEL) are
+ *             representing a line break, and should be converted to the
+ *             unicode character for line separation (LS).
+ *  NLF2PS:    Indicating that NLF-sequences are representing a paragraph
+ *             break, and should be converted to the unicode character for
+ *             paragraph separation (PS).
+ *  NLF2LF:    Indicating that the meaning of NLF-sequences is unknown.
+ *  STRIPCC:   Strips and/or convers control characters.
+ *             NLF-sequences are transformed into space, except if one of
+ *             the NLF2LS/PS/LF options is given.
+ *             HorizontalTab (HT) and FormFeed (FF) are treated as a
+ *             NLF-sequence in this case.
+ *             All other control characters are simply removed.
+ *  CASEFOLD:  Performs unicode case folding, to be able to do a
+ *             case-insensitive string comparison.
+ *  CHARBOUND: Inserts 0xFF bytes at the beginning of each sequence which
+ *             is representing a single grapheme cluster (see UAX#29).
+ *  LUMP:      Lumps certain characters together
+ *             (e.g. HYPHEN U+2010 and MINUS U+2212 to ASCII "-").
+ *             (See lump.txt for details.)
+ *             If NLF2LF is set, this includes a transformation of
+ *             paragraph and line separators to ASCII line-feed (LF).
+ *  STRIPMARK: Strips all character markings
+ *             (non-spacing, spacing and enclosing) (i.e. accents)
+ *             NOTE: this option works only with COMPOSE or DECOMPOSE
+ */
+
+#define UTF8PROC_ERROR_NOMEM -1
+#define UTF8PROC_ERROR_OVERFLOW -2
+#define UTF8PROC_ERROR_INVALIDUTF8 -3
+#define UTF8PROC_ERROR_NOTASSIGNED -4
+#define UTF8PROC_ERROR_INVALIDOPTS -5
+/*
+ *  Error codes being returned by almost all functions:
+ *  ERROR_NOMEM:       Memory could not be allocated.
+ *  ERROR_OVERFLOW:    The given string is too long to be processed.
+ *  ERROR_INVALIDUTF8: The given string is not a legal UTF-8 string.
+ *  ERROR_NOTASSIGNED: The REJECTNA flag was set,
+ *                     and an unassigned code point was found.
+ *  ERROR_INVALIDOPTS: Invalid options have been used.
+ */
+
+typedef int16_t utf8proc_propval_t;
+typedef struct utf8proc_property_struct {
+  utf8proc_propval_t category;
+  utf8proc_propval_t combining_class;
+  utf8proc_propval_t bidi_class;
+  utf8proc_propval_t decomp_type;
+  const int32_t *decomp_mapping;
+  unsigned bidi_mirrored:1;
+  int32_t uppercase_mapping;
+  int32_t lowercase_mapping;
+  int32_t titlecase_mapping;
+  int32_t comb1st_index;
+  int32_t comb2nd_index;
+  unsigned comp_exclusion:1;
+  unsigned ignorable:1;
+  unsigned control_boundary:1;
+  unsigned extend:1;
+  const int32_t *casefold_mapping;
+} utf8proc_property_t;
+
+#define UTF8PROC_CATEGORY_LU  1
+#define UTF8PROC_CATEGORY_LL  2
+#define UTF8PROC_CATEGORY_LT  3
+#define UTF8PROC_CATEGORY_LM  4
+#define UTF8PROC_CATEGORY_LO  5
+#define UTF8PROC_CATEGORY_MN  6
+#define UTF8PROC_CATEGORY_MC  7
+#define UTF8PROC_CATEGORY_ME  8
+#define UTF8PROC_CATEGORY_ND  9
+#define UTF8PROC_CATEGORY_NL 10
+#define UTF8PROC_CATEGORY_NO 11
+#define UTF8PROC_CATEGORY_PC 12
+#define UTF8PROC_CATEGORY_PD 13
+#define UTF8PROC_CATEGORY_PS 14
+#define UTF8PROC_CATEGORY_PE 15
+#define UTF8PROC_CATEGORY_PI 16
+#define UTF8PROC_CATEGORY_PF 17
+#define UTF8PROC_CATEGORY_PO 18
+#define UTF8PROC_CATEGORY_SM 19
+#define UTF8PROC_CATEGORY_SC 20
+#define UTF8PROC_CATEGORY_SK 21
+#define UTF8PROC_CATEGORY_SO 22
+#define UTF8PROC_CATEGORY_ZS 23
+#define UTF8PROC_CATEGORY_ZL 24
+#define UTF8PROC_CATEGORY_ZP 25
+#define UTF8PROC_CATEGORY_CC 26
+#define UTF8PROC_CATEGORY_CF 27
+#define UTF8PROC_CATEGORY_CS 28
+#define UTF8PROC_CATEGORY_CO 29
+#define UTF8PROC_CATEGORY_CN 30
+#define UTF8PROC_BIDI_CLASS_L    1
+#define UTF8PROC_BIDI_CLASS_LRE  2
+#define UTF8PROC_BIDI_CLASS_LRO  3
+#define UTF8PROC_BIDI_CLASS_R    4
+#define UTF8PROC_BIDI_CLASS_AL   5
+#define UTF8PROC_BIDI_CLASS_RLE  6
+#define UTF8PROC_BIDI_CLASS_RLO  7
+#define UTF8PROC_BIDI_CLASS_PDF  8
+#define UTF8PROC_BIDI_CLASS_EN   9
+#define UTF8PROC_BIDI_CLASS_ES  10
+#define UTF8PROC_BIDI_CLASS_ET  11
+#define UTF8PROC_BIDI_CLASS_AN  12
+#define UTF8PROC_BIDI_CLASS_CS  13
+#define UTF8PROC_BIDI_CLASS_NSM 14
+#define UTF8PROC_BIDI_CLASS_BN  15
+#define UTF8PROC_BIDI_CLASS_B   16
+#define UTF8PROC_BIDI_CLASS_S   17
+#define UTF8PROC_BIDI_CLASS_WS  18
+#define UTF8PROC_BIDI_CLASS_ON  19
+#define UTF8PROC_DECOMP_TYPE_FONT      1
+#define UTF8PROC_DECOMP_TYPE_NOBREAK   2
+#define UTF8PROC_DECOMP_TYPE_INITIAL   3
+#define UTF8PROC_DECOMP_TYPE_MEDIAL    4
+#define UTF8PROC_DECOMP_TYPE_FINAL     5
+#define UTF8PROC_DECOMP_TYPE_ISOLATED  6
+#define UTF8PROC_DECOMP_TYPE_CIRCLE    7
+#define UTF8PROC_DECOMP_TYPE_SUPER     8
+#define UTF8PROC_DECOMP_TYPE_SUB       9
+#define UTF8PROC_DECOMP_TYPE_VERTICAL 10
+#define UTF8PROC_DECOMP_TYPE_WIDE     11
+#define UTF8PROC_DECOMP_TYPE_NARROW   12
+#define UTF8PROC_DECOMP_TYPE_SMALL    13
+#define UTF8PROC_DECOMP_TYPE_SQUARE   14
+#define UTF8PROC_DECOMP_TYPE_FRACTION 15
+#define UTF8PROC_DECOMP_TYPE_COMPAT   16
+
+extern const int8_t utf8proc_utf8class[256];
+
+const char *utf8proc_errmsg(ssize_t errcode);
+/*
+ *  Returns a static error string for the given error code.
+ */
+
+ssize_t utf8proc_iterate(const uint8_t *str, ssize_t strlen, int32_t *dst);
+/*
+ *  Reads a single char from the UTF-8 sequence being pointed to by 'str'.
+ *  The maximum number of bytes read is 'strlen', unless 'strlen' is
+ *  negative.
+ *  If a valid unicode char could be read, it is stored in the variable
+ *  being pointed to by 'dst', otherwise that variable will be set to -1.
+ *  In case of success the number of bytes read is returned, otherwise a
+ *  negative error code is returned.
+ */
+
+bool utf8proc_codepoint_valid(int32_t uc);
+/*
+ *  Returns 1, if the given unicode code-point is valid, otherwise 0.
+ */
+
+ssize_t utf8proc_encode_char(int32_t uc, uint8_t *dst);
+/*
+ *  Encodes the unicode char with the code point 'uc' as an UTF-8 string in
+ *  the byte array being pointed to by 'dst'. This array has to be at least
+ *  4 bytes long.
+ *  In case of success the number of bytes written is returned,
+ *  otherwise 0.
+ *  This function does not check if 'uc' is a valid unicode code point.
+ */
+
+const utf8proc_property_t *utf8proc_get_property(int32_t uc);
+/*
+ *  Returns a pointer to a (constant) struct containing information about
+ *  the unicode char with the given code point 'uc'.
+ *  If the character is not existent a pointer to a special struct is
+ *  returned, where 'category' is a NULL pointer.
+ *  WARNING: The parameter 'uc' has to be in the range of 0x0000 to
+ *           0x10FFFF, otherwise the program might crash!
+ */
+
+ssize_t utf8proc_decompose_char(
+  int32_t uc, int32_t *dst, ssize_t bufsize,
+  int options, int *last_boundclass
+);
+/*
+ *  Writes a decomposition of the unicode char 'uc' into the array being
+ *  pointed to by 'dst'.
+ *  Following flags in the 'options' field are regarded:
+ *  REJECTNA:  an unassigned unicode code point leads to an error
+ *  IGNORE:    "default ignorable" chars are stripped
+ *  CASEFOLD:  unicode casefolding is applied
+ *  COMPAT:    replace certain characters with their
+ *             compatibility decomposition
+ *  CHARBOUND: Inserts 0xFF bytes before each grapheme cluster
+ *  LUMP:      lumps certain different characters together
+ *  STRIPMARK: removes all character marks
+ *  The pointer 'last_boundclass' has to point to an integer variable which
+ *  is storing the last character boundary class, if the CHARBOUND option
+ *  is used.
+ *  In case of success the number of chars written is returned,
+ *  in case of an error, a negative error code is returned.
+ *  If the number of written chars would be bigger than 'bufsize',
+ *  the buffer (up to 'bufsize') has inpredictable data, and the needed
+ *  buffer size is returned.
+ *  WARNING: The parameter 'uc' has to be in the range of 0x0000 to
+ *           0x10FFFF, otherwise the program might crash!
+ */
+
+ssize_t utf8proc_decompose(
+  const uint8_t *str, ssize_t strlen,
+  int32_t *buffer, ssize_t bufsize, int options
+);
+/*
+ *  Does the same as 'utf8proc_decompose_char', but acts on a whole UTF-8
+ *  string, and orders the decomposed sequences correctly.
+ *  If the NULLTERM flag in 'options' is set, processing will be stopped,
+ *  when a NULL byte is encounted, otherwise 'strlen' bytes are processed.
+ *  The result in form of unicode code points is written into the buffer
+ *  being pointed to by 'buffer', having the length of 'bufsize' entries.
+ *  In case of success the number of chars written is returned,
+ *  in case of an error, a negative error code is returned.
+ *  If the number of written chars would be bigger than 'bufsize',
+ *  the buffer (up to 'bufsize') has inpredictable data, and the needed
+ *  buffer size is returned.
+ */
+
+ssize_t utf8proc_reencode(int32_t *buffer, ssize_t length, int options);
+/*
+ *  Reencodes the sequence of unicode characters given by the pointer
+ *  'buffer' and 'length' as UTF-8.
+ *  The result is stored in the same memory area where the data is read.
+ *  Following flags in the 'options' field are regarded:
+ *  NLF2LS:  converts LF, CRLF, CR and NEL into LS
+ *  NLF2PS:  converts LF, CRLF, CR and NEL into PS
+ *  NLF2LF:  converts LF, CRLF, CR and NEL into LF
+ *  STRIPCC: strips or converts all non-affected control characters
+ *  COMPOSE: tries to combine decomposed characters into composite
+ *           characters
+ *  STABLE:  prohibits combining characters which would violate
+ *           the unicode versioning stability
+ *  In case of success the length of the resulting UTF-8 string is
+ *  returned, otherwise a negative error code is returned.
+ *  WARNING: The amount of free space being pointed to by 'buffer', has to
+ *           exceed the amount of the input data by one byte, and the
+ *           entries of the array pointed to by 'str' have to be in the
+ *           range of 0x0000 to 0x10FFFF, otherwise the program might
+ *           crash!
+ */
+
+ssize_t utf8proc_map(
+  const uint8_t *str, ssize_t strlen, uint8_t **dstptr, int options
+);
+/*
+ *  Maps the given UTF-8 string being pointed to by 'str' to a new UTF-8
+ *  string, which is allocated dynamically, and afterwards pointed to by
+ *  the pointer being pointed to by 'dstptr'.
+ *  If the NULLTERM flag in the 'options' field is set, the length is
+ *  determined by a NULL terminator, otherwise the parameter 'strlen' is
+ *  evaluated to determine the string length, but in any case the result
+ *  will be NULL terminated (though it might contain NULL characters
+ *  before). Other flags in the 'options' field are passed to the functions
+ *  defined above, and regarded as described.
+ *  In case of success the length of the new string is returned,
+ *  otherwise a negative error code is returned.
+ *  NOTICE: The memory of the new UTF-8 string will have been allocated with
+ *          'malloc', and has theirfore to be freed with 'free'.
+ */
+
+uint8_t *utf8proc_NFD(const uint8_t *str);
+uint8_t *utf8proc_NFC(const uint8_t *str);
+uint8_t *utf8proc_NFKD(const uint8_t *str);
+uint8_t *utf8proc_NFKC(const uint8_t *str);
+/*
+ *  Returns a pointer to newly allocated memory of a NFD, NFC, NFKD or NFKC
+ *  normalized version of the null-terminated string 'str'.
+ */
+
+ssize_t utf8proc_check(const uint8_t *str);
+/*
+ * Just checks UTF-8 string for validity, returns 0 if valid or one of
+ * the negative UTF8PROC_ERROR_* codes if invalid or memory exhausted
+ * checking.  Assumes null-terminated string str and UTF8PROC_STABLE
+ * option.
+ */
+
+#endif
+
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/src_netcdf4/utf8proc_data.h
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/src_netcdf4/utf8proc_data.h	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/src_netcdf4/utf8proc_data.h	(revision 1749)
@@ -0,0 +1,13383 @@
+/*
+ *  This file contains derived data from a modified version of the
+ *  Unicode data files.
+ *
+ *  The original data files are available at
+ *  http://www.unicode.org/Public/UNIDATA/
+ *
+ *
+ *  COPYRIGHT AND PERMISSION NOTICE
+ *
+ *  Copyright (c) 1991-2007 Unicode, Inc. All rights reserved. Distributed
+ *  under the Terms of Use in http://www.unicode.org/copyright.html.
+ *
+ *  Permission is hereby granted, free of charge, to any person obtaining a
+ *  copy of the Unicode data files and any associated documentation (the "Data
+ *  Files") or Unicode software and any associated documentation (the
+ *  "Software") to deal in the Data Files or Software without restriction,
+ *  including without limitation the rights to use, copy, modify, merge,
+ *  publish, distribute, and/or sell copies of the Data Files or Software, and
+ *  to permit persons to whom the Data Files or Software are furnished to do
+ *  so, provided that (a) the above copyright notice(s) and this permission
+ *  notice appear with all copies of the Data Files or Software, (b) both the
+ *  above copyright notice(s) and this permission notice appear in associated
+ *  documentation, and (c) there is clear notice in each modified Data File or
+ *  in the Software as well as in the documentation associated with the Data
+ *  File(s) or Software that the data or software has been modified.
+ *
+ *  THE DATA FILES AND SOFTWARE ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY
+ *  KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ *  MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF
+ *  THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR HOLDERS
+ *  INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL INDIRECT OR
+ *  CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF
+ *  USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
+ *  TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
+ *  PERFORMANCE OF THE DATA FILES OR SOFTWARE.
+ *
+ *  Except as contained in this notice, the name of a copyright holder shall
+ *  not be used in advertising or otherwise to promote the sale, use or other
+ *  dealings in these Data Files or Software without prior written
+ *  authorization of the copyright holder.
+ */
+
+
+const int32_t utf8proc_sequences[] = {
+  97, -1, 98, -1, 99, -1, 100, 
+  -1, 101, -1, 102, -1, 103, -1, 104, 
+  -1, 105, -1, 106, -1, 107, -1, 108, 
+  -1, 109, -1, 110, -1, 111, -1, 112, 
+  -1, 113, -1, 114, -1, 115, -1, 116, 
+  -1, 117, -1, 118, -1, 119, -1, 120, 
+  -1, 121, -1, 122, -1, 32, -1, 32, 
+  776, -1, 32, 772, -1, 50, -1, 51, 
+  -1, 32, 769, -1, 956, -1, 32, 807, 
+  -1, 49, -1, 49, 8260, 52, -1, 49, 
+  8260, 50, -1, 51, 8260, 52, -1, 65, 
+  768, -1, 224, -1, 65, 769, -1, 225, 
+  -1, 65, 770, -1, 226, -1, 65, 771, 
+  -1, 227, -1, 65, 776, -1, 228, -1, 
+  65, 778, -1, 229, -1, 230, -1, 67, 
+  807, -1, 231, -1, 69, 768, -1, 232, 
+  -1, 69, 769, -1, 233, -1, 69, 770, 
+  -1, 234, -1, 69, 776, -1, 235, -1, 
+  73, 768, -1, 236, -1, 73, 769, -1, 
+  237, -1, 73, 770, -1, 238, -1, 73, 
+  776, -1, 239, -1, 240, -1, 78, 771, 
+  -1, 241, -1, 79, 768, -1, 242, -1, 
+  79, 769, -1, 243, -1, 79, 770, -1, 
+  244, -1, 79, 771, -1, 245, -1, 79, 
+  776, -1, 246, -1, 248, -1, 85, 768, 
+  -1, 249, -1, 85, 769, -1, 250, -1, 
+  85, 770, -1, 251, -1, 85, 776, -1, 
+  252, -1, 89, 769, -1, 253, -1, 254, 
+  -1, 115, 115, -1, 97, 768, -1, 97, 
+  769, -1, 97, 770, -1, 97, 771, -1, 
+  97, 776, -1, 97, 778, -1, 99, 807, 
+  -1, 101, 768, -1, 101, 769, -1, 101, 
+  770, -1, 101, 776, -1, 105, 768, -1, 
+  105, 769, -1, 105, 770, -1, 105, 776, 
+  -1, 110, 771, -1, 111, 768, -1, 111, 
+  769, -1, 111, 770, -1, 111, 771, -1, 
+  111, 776, -1, 117, 768, -1, 117, 769, 
+  -1, 117, 770, -1, 117, 776, -1, 121, 
+  769, -1, 121, 776, -1, 65, 772, -1, 
+  257, -1, 97, 772, -1, 65, 774, -1, 
+  259, -1, 97, 774, -1, 65, 808, -1, 
+  261, -1, 97, 808, -1, 67, 769, -1, 
+  263, -1, 99, 769, -1, 67, 770, -1, 
+  265, -1, 99, 770, -1, 67, 775, -1, 
+  267, -1, 99, 775, -1, 67, 780, -1, 
+  269, -1, 99, 780, -1, 68, 780, -1, 
+  271, -1, 100, 780, -1, 273, -1, 69, 
+  772, -1, 275, -1, 101, 772, -1, 69, 
+  774, -1, 277, -1, 101, 774, -1, 69, 
+  775, -1, 279, -1, 101, 775, -1, 69, 
+  808, -1, 281, -1, 101, 808, -1, 69, 
+  780, -1, 283, -1, 101, 780, -1, 71, 
+  770, -1, 285, -1, 103, 770, -1, 71, 
+  774, -1, 287, -1, 103, 774, -1, 71, 
+  775, -1, 289, -1, 103, 775, -1, 71, 
+  807, -1, 291, -1, 103, 807, -1, 72, 
+  770, -1, 293, -1, 104, 770, -1, 295, 
+  -1, 73, 771, -1, 297, -1, 105, 771, 
+  -1, 73, 772, -1, 299, -1, 105, 772, 
+  -1, 73, 774, -1, 301, -1, 105, 774, 
+  -1, 73, 808, -1, 303, -1, 105, 808, 
+  -1, 73, 775, -1, 105, 775, -1, 73, 
+  74, -1, 307, -1, 105, 106, -1, 74, 
+  770, -1, 309, -1, 106, 770, -1, 75, 
+  807, -1, 311, -1, 107, 807, -1, 76, 
+  769, -1, 314, -1, 108, 769, -1, 76, 
+  807, -1, 316, -1, 108, 807, -1, 76, 
+  780, -1, 318, -1, 108, 780, -1, 76, 
+  183, -1, 320, -1, 108, 183, -1, 322, 
+  -1, 78, 769, -1, 324, -1, 110, 769, 
+  -1, 78, 807, -1, 326, -1, 110, 807, 
+  -1, 78, 780, -1, 328, -1, 110, 780, 
+  -1, 700, 110, -1, 331, -1, 79, 772, 
+  -1, 333, -1, 111, 772, -1, 79, 774, 
+  -1, 335, -1, 111, 774, -1, 79, 779, 
+  -1, 337, -1, 111, 779, -1, 339, -1, 
+  82, 769, -1, 341, -1, 114, 769, -1, 
+  82, 807, -1, 343, -1, 114, 807, -1, 
+  82, 780, -1, 345, -1, 114, 780, -1, 
+  83, 769, -1, 347, -1, 115, 769, -1, 
+  83, 770, -1, 349, -1, 115, 770, -1, 
+  83, 807, -1, 351, -1, 115, 807, -1, 
+  83, 780, -1, 353, -1, 115, 780, -1, 
+  84, 807, -1, 355, -1, 116, 807, -1, 
+  84, 780, -1, 357, -1, 116, 780, -1, 
+  359, -1, 85, 771, -1, 361, -1, 117, 
+  771, -1, 85, 772, -1, 363, -1, 117, 
+  772, -1, 85, 774, -1, 365, -1, 117, 
+  774, -1, 85, 778, -1, 367, -1, 117, 
+  778, -1, 85, 779, -1, 369, -1, 117, 
+  779, -1, 85, 808, -1, 371, -1, 117, 
+  808, -1, 87, 770, -1, 373, -1, 119, 
+  770, -1, 89, 770, -1, 375, -1, 121, 
+  770, -1, 89, 776, -1, 255, -1, 90, 
+  769, -1, 378, -1, 122, 769, -1, 90, 
+  775, -1, 380, -1, 122, 775, -1, 90, 
+  780, -1, 382, -1, 122, 780, -1, 595, 
+  -1, 387, -1, 389, -1, 596, -1, 392, 
+  -1, 598, -1, 599, -1, 396, -1, 477, 
+  -1, 601, -1, 603, -1, 402, -1, 608, 
+  -1, 611, -1, 617, -1, 616, -1, 409, 
+  -1, 623, -1, 626, -1, 629, -1, 79, 
+  795, -1, 417, -1, 111, 795, -1, 419, 
+  -1, 421, -1, 640, -1, 424, -1, 643, 
+  -1, 429, -1, 648, -1, 85, 795, -1, 
+  432, -1, 117, 795, -1, 650, -1, 651, 
+  -1, 436, -1, 438, -1, 658, -1, 441, 
+  -1, 445, -1, 68, 381, -1, 454, -1, 
+  68, 382, -1, 100, 382, -1, 76, 74, 
+  -1, 457, -1, 76, 106, -1, 108, 106, 
+  -1, 78, 74, -1, 460, -1, 78, 106, 
+  -1, 110, 106, -1, 65, 780, -1, 462, 
+  -1, 97, 780, -1, 73, 780, -1, 464, 
+  -1, 105, 780, -1, 79, 780, -1, 466, 
+  -1, 111, 780, -1, 85, 780, -1, 468, 
+  -1, 117, 780, -1, 220, 772, -1, 470, 
+  -1, 252, 772, -1, 220, 769, -1, 472, 
+  -1, 252, 769, -1, 220, 780, -1, 474, 
+  -1, 252, 780, -1, 220, 768, -1, 476, 
+  -1, 252, 768, -1, 196, 772, -1, 479, 
+  -1, 228, 772, -1, 550, 772, -1, 481, 
+  -1, 551, 772, -1, 198, 772, -1, 483, 
+  -1, 230, 772, -1, 485, -1, 71, 780, 
+  -1, 487, -1, 103, 780, -1, 75, 780, 
+  -1, 489, -1, 107, 780, -1, 79, 808, 
+  -1, 491, -1, 111, 808, -1, 490, 772, 
+  -1, 493, -1, 491, 772, -1, 439, 780, 
+  -1, 495, -1, 658, 780, -1, 106, 780, 
+  -1, 68, 90, -1, 499, -1, 68, 122, 
+  -1, 100, 122, -1, 71, 769, -1, 501, 
+  -1, 103, 769, -1, 405, -1, 447, -1, 
+  78, 768, -1, 505, -1, 110, 768, -1, 
+  197, 769, -1, 507, -1, 229, 769, -1, 
+  198, 769, -1, 509, -1, 230, 769, -1, 
+  216, 769, -1, 511, -1, 248, 769, -1, 
+  65, 783, -1, 513, -1, 97, 783, -1, 
+  65, 785, -1, 515, -1, 97, 785, -1, 
+  69, 783, -1, 517, -1, 101, 783, -1, 
+  69, 785, -1, 519, -1, 101, 785, -1, 
+  73, 783, -1, 521, -1, 105, 783, -1, 
+  73, 785, -1, 523, -1, 105, 785, -1, 
+  79, 783, -1, 525, -1, 111, 783, -1, 
+  79, 785, -1, 527, -1, 111, 785, -1, 
+  82, 783, -1, 529, -1, 114, 783, -1, 
+  82, 785, -1, 531, -1, 114, 785, -1, 
+  85, 783, -1, 533, -1, 117, 783, -1, 
+  85, 785, -1, 535, -1, 117, 785, -1, 
+  83, 806, -1, 537, -1, 115, 806, -1, 
+  84, 806, -1, 539, -1, 116, 806, -1, 
+  541, -1, 72, 780, -1, 543, -1, 104, 
+  780, -1, 414, -1, 547, -1, 549, -1, 
+  65, 775, -1, 551, -1, 97, 775, -1, 
+  69, 807, -1, 553, -1, 101, 807, -1, 
+  214, 772, -1, 555, -1, 246, 772, -1, 
+  213, 772, -1, 557, -1, 245, 772, -1, 
+  79, 775, -1, 559, -1, 111, 775, -1, 
+  558, 772, -1, 561, -1, 559, 772, -1, 
+  89, 772, -1, 563, -1, 121, 772, -1, 
+  11365, -1, 572, -1, 410, -1, 11366, -1, 
+  578, -1, 384, -1, 649, -1, 652, -1, 
+  583, -1, 585, -1, 587, -1, 589, -1, 
+  591, -1, 614, -1, 633, -1, 635, -1, 
+  641, -1, 32, 774, -1, 32, 775, -1, 
+  32, 778, -1, 32, 808, -1, 32, 771, 
+  -1, 32, 779, -1, 661, -1, 768, -1, 
+  769, -1, 787, -1, 776, 769, -1, 953, 
+  -1, 697, -1, 32, 837, -1, 59, -1, 
+  168, 769, -1, 913, 769, -1, 940, -1, 
+  183, -1, 917, 769, -1, 941, -1, 919, 
+  769, -1, 942, -1, 921, 769, -1, 943, 
+  -1, 927, 769, -1, 972, -1, 933, 769, 
+  -1, 973, -1, 937, 769, -1, 974, -1, 
+  970, 769, -1, 953, 776, 769, -1, 945, 
+  -1, 946, -1, 947, -1, 948, -1, 949, 
+  -1, 950, -1, 951, -1, 952, -1, 954, 
+  -1, 955, -1, 957, -1, 958, -1, 959, 
+  -1, 960, -1, 961, -1, 963, -1, 964, 
+  -1, 965, -1, 966, -1, 967, -1, 968, 
+  -1, 969, -1, 921, 776, -1, 970, -1, 
+  933, 776, -1, 971, -1, 945, 769, -1, 
+  949, 769, -1, 951, 769, -1, 953, 769, 
+  -1, 971, 769, -1, 965, 776, 769, -1, 
+  953, 776, -1, 965, 776, -1, 959, 769, 
+  -1, 965, 769, -1, 969, 769, -1, 933, 
+  -1, 978, 769, -1, 978, 776, -1, 985, 
+  -1, 987, -1, 989, -1, 991, -1, 993, 
+  -1, 995, -1, 997, -1, 999, -1, 1001, 
+  -1, 1003, -1, 1005, -1, 1007, -1, 962, 
+  -1, 920, -1, 1016, -1, 931, -1, 1010, 
+  -1, 1019, -1, 891, -1, 892, -1, 893, 
+  -1, 1045, 768, -1, 1104, -1, 1045, 776, 
+  -1, 1105, -1, 1106, -1, 1043, 769, -1, 
+  1107, -1, 1108, -1, 1109, -1, 1110, -1, 
+  1030, 776, -1, 1111, -1, 1112, -1, 1113, 
+  -1, 1114, -1, 1115, -1, 1050, 769, -1, 
+  1116, -1, 1048, 768, -1, 1117, -1, 1059, 
+  774, -1, 1118, -1, 1119, -1, 1072, -1, 
+  1073, -1, 1074, -1, 1075, -1, 1076, -1, 
+  1077, -1, 1078, -1, 1079, -1, 1080, -1, 
+  1048, 774, -1, 1081, -1, 1082, -1, 1083, 
+  -1, 1084, -1, 1085, -1, 1086, -1, 1087, 
+  -1, 1088, -1, 1089, -1, 1090, -1, 1091, 
+  -1, 1092, -1, 1093, -1, 1094, -1, 1095, 
+  -1, 1096, -1, 1097, -1, 1098, -1, 1099, 
+  -1, 1100, -1, 1101, -1, 1102, -1, 1103, 
+  -1, 1080, 774, -1, 1077, 768, -1, 1077, 
+  776, -1, 1075, 769, -1, 1110, 776, -1, 
+  1082, 769, -1, 1080, 768, -1, 1091, 774, 
+  -1, 1121, -1, 1123, -1, 1125, -1, 1127, 
+  -1, 1129, -1, 1131, -1, 1133, -1, 1135, 
+  -1, 1137, -1, 1139, -1, 1141, -1, 1140, 
+  783, -1, 1143, -1, 1141, 783, -1, 1145, 
+  -1, 1147, -1, 1149, -1, 1151, -1, 1153, 
+  -1, 1163, -1, 1165, -1, 1167, -1, 1169, 
+  -1, 1171, -1, 1173, -1, 1175, -1, 1177, 
+  -1, 1179, -1, 1181, -1, 1183, -1, 1185, 
+  -1, 1187, -1, 1189, -1, 1191, -1, 1193, 
+  -1, 1195, -1, 1197, -1, 1199, -1, 1201, 
+  -1, 1203, -1, 1205, -1, 1207, -1, 1209, 
+  -1, 1211, -1, 1213, -1, 1215, -1, 1231, 
+  -1, 1046, 774, -1, 1218, -1, 1078, 774, 
+  -1, 1220, -1, 1222, -1, 1224, -1, 1226, 
+  -1, 1228, -1, 1230, -1, 1040, 774, -1, 
+  1233, -1, 1072, 774, -1, 1040, 776, -1, 
+  1235, -1, 1072, 776, -1, 1237, -1, 1045, 
+  774, -1, 1239, -1, 1077, 774, -1, 1241, 
+  -1, 1240, 776, -1, 1243, -1, 1241, 776, 
+  -1, 1046, 776, -1, 1245, -1, 1078, 776, 
+  -1, 1047, 776, -1, 1247, -1, 1079, 776, 
+  -1, 1249, -1, 1048, 772, -1, 1251, -1, 
+  1080, 772, -1, 1048, 776, -1, 1253, -1, 
+  1080, 776, -1, 1054, 776, -1, 1255, -1, 
+  1086, 776, -1, 1257, -1, 1256, 776, -1, 
+  1259, -1, 1257, 776, -1, 1069, 776, -1, 
+  1261, -1, 1101, 776, -1, 1059, 772, -1, 
+  1263, -1, 1091, 772, -1, 1059, 776, -1, 
+  1265, -1, 1091, 776, -1, 1059, 779, -1, 
+  1267, -1, 1091, 779, -1, 1063, 776, -1, 
+  1269, -1, 1095, 776, -1, 1271, -1, 1067, 
+  776, -1, 1273, -1, 1099, 776, -1, 1275, 
+  -1, 1277, -1, 1279, -1, 1281, -1, 1283, 
+  -1, 1285, -1, 1287, -1, 1289, -1, 1291, 
+  -1, 1293, -1, 1295, -1, 1297, -1, 1299, 
+  -1, 1377, -1, 1378, -1, 1379, -1, 1380, 
+  -1, 1381, -1, 1382, -1, 1383, -1, 1384, 
+  -1, 1385, -1, 1386, -1, 1387, -1, 1388, 
+  -1, 1389, -1, 1390, -1, 1391, -1, 1392, 
+  -1, 1393, -1, 1394, -1, 1395, -1, 1396, 
+  -1, 1397, -1, 1398, -1, 1399, -1, 1400, 
+  -1, 1401, -1, 1402, -1, 1403, -1, 1404, 
+  -1, 1405, -1, 1406, -1, 1407, -1, 1408, 
+  -1, 1409, -1, 1410, -1, 1411, -1, 1412, 
+  -1, 1413, -1, 1414, -1, 1381, 1410, -1, 
+  1575, 1619, -1, 1575, 1620, -1, 1608, 1620, 
+  -1, 1575, 1621, -1, 1610, 1620, -1, 1575, 
+  1652, -1, 1608, 1652, -1, 1735, 1652, -1, 
+  1610, 1652, -1, 1749, 1620, -1, 1729, 1620, 
+  -1, 1746, 1620, -1, 2344, 2364, -1, 2352, 
+  2364, -1, 2355, 2364, -1, 2325, 2364, -1, 
+  2326, 2364, -1, 2327, 2364, -1, 2332, 2364, 
+  -1, 2337, 2364, -1, 2338, 2364, -1, 2347, 
+  2364, -1, 2351, 2364, -1, 2503, 2494, -1, 
+  2503, 2519, -1, 2465, 2492, -1, 2466, 2492, 
+  -1, 2479, 2492, -1, 2610, 2620, -1, 2616, 
+  2620, -1, 2582, 2620, -1, 2583, 2620, -1, 
+  2588, 2620, -1, 2603, 2620, -1, 2887, 2902, 
+  -1, 2887, 2878, -1, 2887, 2903, -1, 2849, 
+  2876, -1, 2850, 2876, -1, 2962, 3031, -1, 
+  3014, 3006, -1, 3015, 3006, -1, 3014, 3031, 
+  -1, 3142, 3158, -1, 3263, 3285, -1, 3270, 
+  3285, -1, 3270, 3286, -1, 3270, 3266, -1, 
+  3274, 3285, -1, 3398, 3390, -1, 3399, 3390, 
+  -1, 3398, 3415, -1, 3545, 3530, -1, 3545, 
+  3535, -1, 3548, 3530, -1, 3545, 3551, -1, 
+  3661, 3634, -1, 3789, 3762, -1, 3755, 3737, 
+  -1, 3755, 3745, -1, 3851, -1, 3906, 4023, 
+  -1, 3916, 4023, -1, 3921, 4023, -1, 3926, 
+  4023, -1, 3931, 4023, -1, 3904, 4021, -1, 
+  3953, 3954, -1, 3953, 3956, -1, 4018, 3968, 
+  -1, 4018, 3969, -1, 4019, 3968, -1, 4019, 
+  3969, -1, 3953, 3968, -1, 3986, 4023, -1, 
+  3996, 4023, -1, 4001, 4023, -1, 4006, 4023, 
+  -1, 4011, 4023, -1, 3984, 4021, -1, 4133, 
+  4142, -1, 11520, -1, 11521, -1, 11522, -1, 
+  11523, -1, 11524, -1, 11525, -1, 11526, -1, 
+  11527, -1, 11528, -1, 11529, -1, 11530, -1, 
+  11531, -1, 11532, -1, 11533, -1, 11534, -1, 
+  11535, -1, 11536, -1, 11537, -1, 11538, -1, 
+  11539, -1, 11540, -1, 11541, -1, 11542, -1, 
+  11543, -1, 11544, -1, 11545, -1, 11546, -1, 
+  11547, -1, 11548, -1, 11549, -1, 11550, -1, 
+  11551, -1, 11552, -1, 11553, -1, 11554, -1, 
+  11555, -1, 11556, -1, 11557, -1, 4316, -1, 
+  6917, 6965, -1, 6919, 6965, -1, 6921, 6965, 
+  -1, 6923, 6965, -1, 6925, 6965, -1, 6929, 
+  6965, -1, 6970, 6965, -1, 6972, 6965, -1, 
+  6974, 6965, -1, 6975, 6965, -1, 6978, 6965, 
+  -1, 65, -1, 198, -1, 66, -1, 68, 
+  -1, 69, -1, 398, -1, 71, -1, 72, 
+  -1, 73, -1, 74, -1, 75, -1, 76, 
+  -1, 77, -1, 78, -1, 79, -1, 546, 
+  -1, 80, -1, 82, -1, 84, -1, 85, 
+  -1, 87, -1, 592, -1, 593, -1, 7426, 
+  -1, 604, -1, 7446, -1, 7447, -1, 7453, 
+  -1, 7461, -1, 594, -1, 597, -1, 607, 
+  -1, 609, -1, 613, -1, 618, -1, 7547, 
+  -1, 669, -1, 621, -1, 7557, -1, 671, 
+  -1, 625, -1, 624, -1, 627, -1, 628, 
+  -1, 632, -1, 642, -1, 427, -1, 7452, 
+  -1, 656, -1, 657, -1, 65, 805, -1, 
+  7681, -1, 97, 805, -1, 66, 775, -1, 
+  7683, -1, 98, 775, -1, 66, 803, -1, 
+  7685, -1, 98, 803, -1, 66, 817, -1, 
+  7687, -1, 98, 817, -1, 199, 769, -1, 
+  7689, -1, 231, 769, -1, 68, 775, -1, 
+  7691, -1, 100, 775, -1, 68, 803, -1, 
+  7693, -1, 100, 803, -1, 68, 817, -1, 
+  7695, -1, 100, 817, -1, 68, 807, -1, 
+  7697, -1, 100, 807, -1, 68, 813, -1, 
+  7699, -1, 100, 813, -1, 274, 768, -1, 
+  7701, -1, 275, 768, -1, 274, 769, -1, 
+  7703, -1, 275, 769, -1, 69, 813, -1, 
+  7705, -1, 101, 813, -1, 69, 816, -1, 
+  7707, -1, 101, 816, -1, 552, 774, -1, 
+  7709, -1, 553, 774, -1, 70, 775, -1, 
+  7711, -1, 102, 775, -1, 71, 772, -1, 
+  7713, -1, 103, 772, -1, 72, 775, -1, 
+  7715, -1, 104, 775, -1, 72, 803, -1, 
+  7717, -1, 104, 803, -1, 72, 776, -1, 
+  7719, -1, 104, 776, -1, 72, 807, -1, 
+  7721, -1, 104, 807, -1, 72, 814, -1, 
+  7723, -1, 104, 814, -1, 73, 816, -1, 
+  7725, -1, 105, 816, -1, 207, 769, -1, 
+  7727, -1, 239, 769, -1, 75, 769, -1, 
+  7729, -1, 107, 769, -1, 75, 803, -1, 
+  7731, -1, 107, 803, -1, 75, 817, -1, 
+  7733, -1, 107, 817, -1, 76, 803, -1, 
+  7735, -1, 108, 803, -1, 7734, 772, -1, 
+  7737, -1, 7735, 772, -1, 76, 817, -1, 
+  7739, -1, 108, 817, -1, 76, 813, -1, 
+  7741, -1, 108, 813, -1, 77, 769, -1, 
+  7743, -1, 109, 769, -1, 77, 775, -1, 
+  7745, -1, 109, 775, -1, 77, 803, -1, 
+  7747, -1, 109, 803, -1, 78, 775, -1, 
+  7749, -1, 110, 775, -1, 78, 803, -1, 
+  7751, -1, 110, 803, -1, 78, 817, -1, 
+  7753, -1, 110, 817, -1, 78, 813, -1, 
+  7755, -1, 110, 813, -1, 213, 769, -1, 
+  7757, -1, 245, 769, -1, 213, 776, -1, 
+  7759, -1, 245, 776, -1, 332, 768, -1, 
+  7761, -1, 333, 768, -1, 332, 769, -1, 
+  7763, -1, 333, 769, -1, 80, 769, -1, 
+  7765, -1, 112, 769, -1, 80, 775, -1, 
+  7767, -1, 112, 775, -1, 82, 775, -1, 
+  7769, -1, 114, 775, -1, 82, 803, -1, 
+  7771, -1, 114, 803, -1, 7770, 772, -1, 
+  7773, -1, 7771, 772, -1, 82, 817, -1, 
+  7775, -1, 114, 817, -1, 83, 775, -1, 
+  7777, -1, 115, 775, -1, 83, 803, -1, 
+  7779, -1, 115, 803, -1, 346, 775, -1, 
+  7781, -1, 347, 775, -1, 352, 775, -1, 
+  7783, -1, 353, 775, -1, 7778, 775, -1, 
+  7785, -1, 7779, 775, -1, 84, 775, -1, 
+  7787, -1, 116, 775, -1, 84, 803, -1, 
+  7789, -1, 116, 803, -1, 84, 817, -1, 
+  7791, -1, 116, 817, -1, 84, 813, -1, 
+  7793, -1, 116, 813, -1, 85, 804, -1, 
+  7795, -1, 117, 804, -1, 85, 816, -1, 
+  7797, -1, 117, 816, -1, 85, 813, -1, 
+  7799, -1, 117, 813, -1, 360, 769, -1, 
+  7801, -1, 361, 769, -1, 362, 776, -1, 
+  7803, -1, 363, 776, -1, 86, 771, -1, 
+  7805, -1, 118, 771, -1, 86, 803, -1, 
+  7807, -1, 118, 803, -1, 87, 768, -1, 
+  7809, -1, 119, 768, -1, 87, 769, -1, 
+  7811, -1, 119, 769, -1, 87, 776, -1, 
+  7813, -1, 119, 776, -1, 87, 775, -1, 
+  7815, -1, 119, 775, -1, 87, 803, -1, 
+  7817, -1, 119, 803, -1, 88, 775, -1, 
+  7819, -1, 120, 775, -1, 88, 776, -1, 
+  7821, -1, 120, 776, -1, 89, 775, -1, 
+  7823, -1, 121, 775, -1, 90, 770, -1, 
+  7825, -1, 122, 770, -1, 90, 803, -1, 
+  7827, -1, 122, 803, -1, 90, 817, -1, 
+  7829, -1, 122, 817, -1, 104, 817, -1, 
+  116, 776, -1, 119, 778, -1, 121, 778, 
+  -1, 97, 702, -1, 383, 775, -1, 65, 
+  803, -1, 7841, -1, 97, 803, -1, 65, 
+  777, -1, 7843, -1, 97, 777, -1, 194, 
+  769, -1, 7845, -1, 226, 769, -1, 194, 
+  768, -1, 7847, -1, 226, 768, -1, 194, 
+  777, -1, 7849, -1, 226, 777, -1, 194, 
+  771, -1, 7851, -1, 226, 771, -1, 7840, 
+  770, -1, 7853, -1, 7841, 770, -1, 258, 
+  769, -1, 7855, -1, 259, 769, -1, 258, 
+  768, -1, 7857, -1, 259, 768, -1, 258, 
+  777, -1, 7859, -1, 259, 777, -1, 258, 
+  771, -1, 7861, -1, 259, 771, -1, 7840, 
+  774, -1, 7863, -1, 7841, 774, -1, 69, 
+  803, -1, 7865, -1, 101, 803, -1, 69, 
+  777, -1, 7867, -1, 101, 777, -1, 69, 
+  771, -1, 7869, -1, 101, 771, -1, 202, 
+  769, -1, 7871, -1, 234, 769, -1, 202, 
+  768, -1, 7873, -1, 234, 768, -1, 202, 
+  777, -1, 7875, -1, 234, 777, -1, 202, 
+  771, -1, 7877, -1, 234, 771, -1, 7864, 
+  770, -1, 7879, -1, 7865, 770, -1, 73, 
+  777, -1, 7881, -1, 105, 777, -1, 73, 
+  803, -1, 7883, -1, 105, 803, -1, 79, 
+  803, -1, 7885, -1, 111, 803, -1, 79, 
+  777, -1, 7887, -1, 111, 777, -1, 212, 
+  769, -1, 7889, -1, 244, 769, -1, 212, 
+  768, -1, 7891, -1, 244, 768, -1, 212, 
+  777, -1, 7893, -1, 244, 777, -1, 212, 
+  771, -1, 7895, -1, 244, 771, -1, 7884, 
+  770, -1, 7897, -1, 7885, 770, -1, 416, 
+  769, -1, 7899, -1, 417, 769, -1, 416, 
+  768, -1, 7901, -1, 417, 768, -1, 416, 
+  777, -1, 7903, -1, 417, 777, -1, 416, 
+  771, -1, 7905, -1, 417, 771, -1, 416, 
+  803, -1, 7907, -1, 417, 803, -1, 85, 
+  803, -1, 7909, -1, 117, 803, -1, 85, 
+  777, -1, 7911, -1, 117, 777, -1, 431, 
+  769, -1, 7913, -1, 432, 769, -1, 431, 
+  768, -1, 7915, -1, 432, 768, -1, 431, 
+  777, -1, 7917, -1, 432, 777, -1, 431, 
+  771, -1, 7919, -1, 432, 771, -1, 431, 
+  803, -1, 7921, -1, 432, 803, -1, 89, 
+  768, -1, 7923, -1, 121, 768, -1, 89, 
+  803, -1, 7925, -1, 121, 803, -1, 89, 
+  777, -1, 7927, -1, 121, 777, -1, 89, 
+  771, -1, 7929, -1, 121, 771, -1, 945, 
+  787, -1, 945, 788, -1, 7936, 768, -1, 
+  7937, 768, -1, 7936, 769, -1, 7937, 769, 
+  -1, 7936, 834, -1, 7937, 834, -1, 913, 
+  787, -1, 7936, -1, 913, 788, -1, 7937, 
+  -1, 7944, 768, -1, 7938, -1, 7945, 768, 
+  -1, 7939, -1, 7944, 769, -1, 7940, -1, 
+  7945, 769, -1, 7941, -1, 7944, 834, -1, 
+  7942, -1, 7945, 834, -1, 7943, -1, 949, 
+  787, -1, 949, 788, -1, 7952, 768, -1, 
+  7953, 768, -1, 7952, 769, -1, 7953, 769, 
+  -1, 917, 787, -1, 7952, -1, 917, 788, 
+  -1, 7953, -1, 7960, 768, -1, 7954, -1, 
+  7961, 768, -1, 7955, -1, 7960, 769, -1, 
+  7956, -1, 7961, 769, -1, 7957, -1, 951, 
+  787, -1, 951, 788, -1, 7968, 768, -1, 
+  7969, 768, -1, 7968, 769, -1, 7969, 769, 
+  -1, 7968, 834, -1, 7969, 834, -1, 919, 
+  787, -1, 7968, -1, 919, 788, -1, 7969, 
+  -1, 7976, 768, -1, 7970, -1, 7977, 768, 
+  -1, 7971, -1, 7976, 769, -1, 7972, -1, 
+  7977, 769, -1, 7973, -1, 7976, 834, -1, 
+  7974, -1, 7977, 834, -1, 7975, -1, 953, 
+  787, -1, 953, 788, -1, 7984, 768, -1, 
+  7985, 768, -1, 7984, 769, -1, 7985, 769, 
+  -1, 7984, 834, -1, 7985, 834, -1, 921, 
+  787, -1, 7984, -1, 921, 788, -1, 7985, 
+  -1, 7992, 768, -1, 7986, -1, 7993, 768, 
+  -1, 7987, -1, 7992, 769, -1, 7988, -1, 
+  7993, 769, -1, 7989, -1, 7992, 834, -1, 
+  7990, -1, 7993, 834, -1, 7991, -1, 959, 
+  787, -1, 959, 788, -1, 8000, 768, -1, 
+  8001, 768, -1, 8000, 769, -1, 8001, 769, 
+  -1, 927, 787, -1, 8000, -1, 927, 788, 
+  -1, 8001, -1, 8008, 768, -1, 8002, -1, 
+  8009, 768, -1, 8003, -1, 8008, 769, -1, 
+  8004, -1, 8009, 769, -1, 8005, -1, 965, 
+  787, -1, 965, 788, -1, 8016, 768, -1, 
+  965, 787, 768, -1, 8017, 768, -1, 8016, 
+  769, -1, 965, 787, 769, -1, 8017, 769, 
+  -1, 8016, 834, -1, 965, 787, 834, -1, 
+  8017, 834, -1, 933, 788, -1, 8017, -1, 
+  8025, 768, -1, 8019, -1, 8025, 769, -1, 
+  8021, -1, 8025, 834, -1, 8023, -1, 969, 
+  787, -1, 969, 788, -1, 8032, 768, -1, 
+  8033, 768, -1, 8032, 769, -1, 8033, 769, 
+  -1, 8032, 834, -1, 8033, 834, -1, 937, 
+  787, -1, 8032, -1, 937, 788, -1, 8033, 
+  -1, 8040, 768, -1, 8034, -1, 8041, 768, 
+  -1, 8035, -1, 8040, 769, -1, 8036, -1, 
+  8041, 769, -1, 8037, -1, 8040, 834, -1, 
+  8038, -1, 8041, 834, -1, 8039, -1, 945, 
+  768, -1, 949, 768, -1, 951, 768, -1, 
+  953, 768, -1, 959, 768, -1, 965, 768, 
+  -1, 969, 768, -1, 7936, 837, -1, 7936, 
+  953, -1, 7937, 837, -1, 7937, 953, -1, 
+  7938, 837, -1, 7938, 953, -1, 7939, 837, 
+  -1, 7939, 953, -1, 7940, 837, -1, 7940, 
+  953, -1, 7941, 837, -1, 7941, 953, -1, 
+  7942, 837, -1, 7942, 953, -1, 7943, 837, 
+  -1, 7943, 953, -1, 7944, 837, -1, 8064, 
+  -1, 7945, 837, -1, 8065, -1, 7946, 837, 
+  -1, 8066, -1, 7947, 837, -1, 8067, -1, 
+  7948, 837, -1, 8068, -1, 7949, 837, -1, 
+  8069, -1, 7950, 837, -1, 8070, -1, 7951, 
+  837, -1, 8071, -1, 7968, 837, -1, 7968, 
+  953, -1, 7969, 837, -1, 7969, 953, -1, 
+  7970, 837, -1, 7970, 953, -1, 7971, 837, 
+  -1, 7971, 953, -1, 7972, 837, -1, 7972, 
+  953, -1, 7973, 837, -1, 7973, 953, -1, 
+  7974, 837, -1, 7974, 953, -1, 7975, 837, 
+  -1, 7975, 953, -1, 7976, 837, -1, 8080, 
+  -1, 7977, 837, -1, 8081, -1, 7978, 837, 
+  -1, 8082, -1, 7979, 837, -1, 8083, -1, 
+  7980, 837, -1, 8084, -1, 7981, 837, -1, 
+  8085, -1, 7982, 837, -1, 8086, -1, 7983, 
+  837, -1, 8087, -1, 8032, 837, -1, 8032, 
+  953, -1, 8033, 837, -1, 8033, 953, -1, 
+  8034, 837, -1, 8034, 953, -1, 8035, 837, 
+  -1, 8035, 953, -1, 8036, 837, -1, 8036, 
+  953, -1, 8037, 837, -1, 8037, 953, -1, 
+  8038, 837, -1, 8038, 953, -1, 8039, 837, 
+  -1, 8039, 953, -1, 8040, 837, -1, 8096, 
+  -1, 8041, 837, -1, 8097, -1, 8042, 837, 
+  -1, 8098, -1, 8043, 837, -1, 8099, -1, 
+  8044, 837, -1, 8100, -1, 8045, 837, -1, 
+  8101, -1, 8046, 837, -1, 8102, -1, 8047, 
+  837, -1, 8103, -1, 945, 774, -1, 945, 
+  772, -1, 8048, 837, -1, 8048, 953, -1, 
+  945, 837, -1, 945, 953, -1, 940, 837, 
+  -1, 940, 953, -1, 945, 834, -1, 8118, 
+  837, -1, 945, 834, 953, -1, 913, 774, 
+  -1, 8112, -1, 913, 772, -1, 8113, -1, 
+  913, 768, -1, 8048, -1, 902, -1, 8049, 
+  -1, 913, 837, -1, 8115, -1, 32, 787, 
+  -1, 32, 834, -1, 168, 834, -1, 8052, 
+  837, -1, 8052, 953, -1, 951, 837, -1, 
+  951, 953, -1, 942, 837, -1, 942, 953, 
+  -1, 951, 834, -1, 8134, 837, -1, 951, 
+  834, 953, -1, 917, 768, -1, 8050, -1, 
+  904, -1, 8051, -1, 919, 768, -1, 8052, 
+  -1, 905, -1, 8053, -1, 919, 837, -1, 
+  8131, -1, 8127, 768, -1, 8127, 769, -1, 
+  8127, 834, -1, 953, 774, -1, 953, 772, 
+  -1, 970, 768, -1, 953, 776, 768, -1, 
+  912, -1, 953, 834, -1, 970, 834, -1, 
+  953, 776, 834, -1, 921, 774, -1, 8144, 
+  -1, 921, 772, -1, 8145, -1, 921, 768, 
+  -1, 8054, -1, 906, -1, 8055, -1, 8190, 
+  768, -1, 8190, 769, -1, 8190, 834, -1, 
+  965, 774, -1, 965, 772, -1, 971, 768, 
+  -1, 965, 776, 768, -1, 944, -1, 961, 
+  787, -1, 961, 788, -1, 965, 834, -1, 
+  971, 834, -1, 965, 776, 834, -1, 933, 
+  774, -1, 8160, -1, 933, 772, -1, 8161, 
+  -1, 933, 768, -1, 8058, -1, 910, -1, 
+  8059, -1, 929, 788, -1, 8165, -1, 168, 
+  768, -1, 901, -1, 96, -1, 8060, 837, 
+  -1, 8060, 953, -1, 969, 837, -1, 969, 
+  953, -1, 974, 837, -1, 974, 953, -1, 
+  969, 834, -1, 8182, 837, -1, 969, 834, 
+  953, -1, 927, 768, -1, 8056, -1, 908, 
+  -1, 8057, -1, 937, 768, -1, 8060, -1, 
+  911, -1, 8061, -1, 937, 837, -1, 8179, 
+  -1, 180, -1, 32, 788, -1, 8194, -1, 
+  8195, -1, 8208, -1, 32, 819, -1, 46, 
+  -1, 46, 46, -1, 46, 46, 46, -1, 
+  8242, 8242, -1, 8242, 8242, 8242, -1, 8245, 
+  8245, -1, 8245, 8245, 8245, -1, 33, 33, 
+  -1, 32, 773, -1, 63, 63, -1, 63, 
+  33, -1, 33, 63, -1, 8242, 8242, 8242, 
+  8242, -1, 48, -1, 52, -1, 53, -1, 
+  54, -1, 55, -1, 56, -1, 57, -1, 
+  43, -1, 8722, -1, 61, -1, 40, -1, 
+  41, -1, 82, 115, -1, 97, 47, 99, 
+  -1, 97, 47, 115, -1, 67, -1, 176, 
+  67, -1, 99, 47, 111, -1, 99, 47, 
+  117, -1, 400, -1, 176, 70, -1, 78, 
+  111, -1, 81, -1, 83, 77, -1, 84, 
+  69, 76, -1, 84, 77, -1, 90, -1, 
+  937, -1, 197, -1, 70, -1, 8526, -1, 
+  1488, -1, 1489, -1, 1490, -1, 1491, -1, 
+  70, 65, 88, -1, 915, -1, 928, -1, 
+  8721, -1, 49, 8260, 51, -1, 50, 8260, 
+  51, -1, 49, 8260, 53, -1, 50, 8260, 
+  53, -1, 51, 8260, 53, -1, 52, 8260, 
+  53, -1, 49, 8260, 54, -1, 53, 8260, 
+  54, -1, 49, 8260, 56, -1, 51, 8260, 
+  56, -1, 53, 8260, 56, -1, 55, 8260, 
+  56, -1, 49, 8260, -1, 8560, -1, 73, 
+  73, -1, 8561, -1, 73, 73, 73, -1, 
+  8562, -1, 73, 86, -1, 8563, -1, 86, 
+  -1, 8564, -1, 86, 73, -1, 8565, -1, 
+  86, 73, 73, -1, 8566, -1, 86, 73, 
+  73, 73, -1, 8567, -1, 73, 88, -1, 
+  8568, -1, 88, -1, 8569, -1, 88, 73, 
+  -1, 8570, -1, 88, 73, 73, -1, 8571, 
+  -1, 8572, -1, 8573, -1, 8574, -1, 8575, 
+  -1, 105, 105, -1, 105, 105, 105, -1, 
+  105, 118, -1, 118, 105, -1, 118, 105, 
+  105, -1, 118, 105, 105, 105, -1, 105, 
+  120, -1, 120, 105, -1, 120, 105, 105, 
+  -1, 8580, -1, 8592, 824, -1, 8594, 824, 
+  -1, 8596, 824, -1, 8656, 824, -1, 8660, 
+  824, -1, 8658, 824, -1, 8707, 824, -1, 
+  8712, 824, -1, 8715, 824, -1, 8739, 824, 
+  -1, 8741, 824, -1, 8747, 8747, -1, 8747, 
+  8747, 8747, -1, 8750, 8750, -1, 8750, 8750, 
+  8750, -1, 8764, 824, -1, 8771, 824, -1, 
+  8773, 824, -1, 8776, 824, -1, 61, 824, 
+  -1, 8801, 824, -1, 8781, 824, -1, 60, 
+  824, -1, 62, 824, -1, 8804, 824, -1, 
+  8805, 824, -1, 8818, 824, -1, 8819, 824, 
+  -1, 8822, 824, -1, 8823, 824, -1, 8826, 
+  824, -1, 8827, 824, -1, 8834, 824, -1, 
+  8835, 824, -1, 8838, 824, -1, 8839, 824, 
+  -1, 8866, 824, -1, 8872, 824, -1, 8873, 
+  824, -1, 8875, 824, -1, 8828, 824, -1, 
+  8829, 824, -1, 8849, 824, -1, 8850, 824, 
+  -1, 8882, 824, -1, 8883, 824, -1, 8884, 
+  824, -1, 8885, 824, -1, 12296, -1, 12297, 
+  -1, 49, 48, -1, 49, 49, -1, 49, 
+  50, -1, 49, 51, -1, 49, 52, -1, 
+  49, 53, -1, 49, 54, -1, 49, 55, 
+  -1, 49, 56, -1, 49, 57, -1, 50, 
+  48, -1, 40, 49, 41, -1, 40, 50, 
+  41, -1, 40, 51, 41, -1, 40, 52, 
+  41, -1, 40, 53, 41, -1, 40, 54, 
+  41, -1, 40, 55, 41, -1, 40, 56, 
+  41, -1, 40, 57, 41, -1, 40, 49, 
+  48, 41, -1, 40, 49, 49, 41, -1, 
+  40, 49, 50, 41, -1, 40, 49, 51, 
+  41, -1, 40, 49, 52, 41, -1, 40, 
+  49, 53, 41, -1, 40, 49, 54, 41, 
+  -1, 40, 49, 55, 41, -1, 40, 49, 
+  56, 41, -1, 40, 49, 57, 41, -1, 
+  40, 50, 48, 41, -1, 49, 46, -1, 
+  50, 46, -1, 51, 46, -1, 52, 46, 
+  -1, 53, 46, -1, 54, 46, -1, 55, 
+  46, -1, 56, 46, -1, 57, 46, -1, 
+  49, 48, 46, -1, 49, 49, 46, -1, 
+  49, 50, 46, -1, 49, 51, 46, -1, 
+  49, 52, 46, -1, 49, 53, 46, -1, 
+  49, 54, 46, -1, 49, 55, 46, -1, 
+  49, 56, 46, -1, 49, 57, 46, -1, 
+  50, 48, 46, -1, 40, 97, 41, -1, 
+  40, 98, 41, -1, 40, 99, 41, -1, 
+  40, 100, 41, -1, 40, 101, 41, -1, 
+  40, 102, 41, -1, 40, 103, 41, -1, 
+  40, 104, 41, -1, 40, 105, 41, -1, 
+  40, 106, 41, -1, 40, 107, 41, -1, 
+  40, 108, 41, -1, 40, 109, 41, -1, 
+  40, 110, 41, -1, 40, 111, 41, -1, 
+  40, 112, 41, -1, 40, 113, 41, -1, 
+  40, 114, 41, -1, 40, 115, 41, -1, 
+  40, 116, 41, -1, 40, 117, 41, -1, 
+  40, 118, 41, -1, 40, 119, 41, -1, 
+  40, 120, 41, -1, 40, 121, 41, -1, 
+  40, 122, 41, -1, 9424, -1, 9425, -1, 
+  9426, -1, 9427, -1, 9428, -1, 9429, -1, 
+  9430, -1, 9431, -1, 9432, -1, 9433, -1, 
+  9434, -1, 9435, -1, 9436, -1, 9437, -1, 
+  9438, -1, 9439, -1, 9440, -1, 9441, -1, 
+  83, -1, 9442, -1, 9443, -1, 9444, -1, 
+  9445, -1, 9446, -1, 9447, -1, 89, -1, 
+  9448, -1, 9449, -1, 8747, 8747, 8747, 8747, 
+  -1, 58, 58, 61, -1, 61, 61, -1, 
+  61, 61, 61, -1, 10973, 824, -1, 11312, 
+  -1, 11313, -1, 11314, -1, 11315, -1, 11316, 
+  -1, 11317, -1, 11318, -1, 11319, -1, 11320, 
+  -1, 11321, -1, 11322, -1, 11323, -1, 11324, 
+  -1, 11325, -1, 11326, -1, 11327, -1, 11328, 
+  -1, 11329, -1, 11330, -1, 11331, -1, 11332, 
+  -1, 11333, -1, 11334, -1, 11335, -1, 11336, 
+  -1, 11337, -1, 11338, -1, 11339, -1, 11340, 
+  -1, 11341, -1, 11342, -1, 11343, -1, 11344, 
+  -1, 11345, -1, 11346, -1, 11347, -1, 11348, 
+  -1, 11349, -1, 11350, -1, 11351, -1, 11352, 
+  -1, 11353, -1, 11354, -1, 11355, -1, 11356, 
+  -1, 11357, -1, 11358, -1, 11361, -1, 619, 
+  -1, 7549, -1, 637, -1, 11368, -1, 11370, 
+  -1, 11372, -1, 11382, -1, 11393, -1, 11395, 
+  -1, 11397, -1, 11399, -1, 11401, -1, 11403, 
+  -1, 11405, -1, 11407, -1, 11409, -1, 11411, 
+  -1, 11413, -1, 11415, -1, 11417, -1, 11419, 
+  -1, 11421, -1, 11423, -1, 11425, -1, 11427, 
+  -1, 11429, -1, 11431, -1, 11433, -1, 11435, 
+  -1, 11437, -1, 11439, -1, 11441, -1, 11443, 
+  -1, 11445, -1, 11447, -1, 11449, -1, 11451, 
+  -1, 11453, -1, 11455, -1, 11457, -1, 11459, 
+  -1, 11461, -1, 11463, -1, 11465, -1, 11467, 
+  -1, 11469, -1, 11471, -1, 11473, -1, 11475, 
+  -1, 11477, -1, 11479, -1, 11481, -1, 11483, 
+  -1, 11485, -1, 11487, -1, 11489, -1, 11491, 
+  -1, 11617, -1, 27597, -1, 40863, -1, 19968, 
+  -1, 20008, -1, 20022, -1, 20031, -1, 20057, 
+  -1, 20101, -1, 20108, -1, 20128, -1, 20154, 
+  -1, 20799, -1, 20837, -1, 20843, -1, 20866, 
+  -1, 20886, -1, 20907, -1, 20960, -1, 20981, 
+  -1, 20992, -1, 21147, -1, 21241, -1, 21269, 
+  -1, 21274, -1, 21304, -1, 21313, -1, 21340, 
+  -1, 21353, -1, 21378, -1, 21430, -1, 21448, 
+  -1, 21475, -1, 22231, -1, 22303, -1, 22763, 
+  -1, 22786, -1, 22794, -1, 22805, -1, 22823, 
+  -1, 22899, -1, 23376, -1, 23424, -1, 23544, 
+  -1, 23567, -1, 23586, -1, 23608, -1, 23662, 
+  -1, 23665, -1, 24027, -1, 24037, -1, 24049, 
+  -1, 24062, -1, 24178, -1, 24186, -1, 24191, 
+  -1, 24308, -1, 24318, -1, 24331, -1, 24339, 
+  -1, 24400, -1, 24417, -1, 24435, -1, 24515, 
+  -1, 25096, -1, 25142, -1, 25163, -1, 25903, 
+  -1, 25908, -1, 25991, -1, 26007, -1, 26020, 
+  -1, 26041, -1, 26080, -1, 26085, -1, 26352, 
+  -1, 26376, -1, 26408, -1, 27424, -1, 27490, 
+  -1, 27513, -1, 27571, -1, 27595, -1, 27604, 
+  -1, 27611, -1, 27663, -1, 27668, -1, 27700, 
+  -1, 28779, -1, 29226, -1, 29238, -1, 29243, 
+  -1, 29247, -1, 29255, -1, 29273, -1, 29275, 
+  -1, 29356, -1, 29572, -1, 29577, -1, 29916, 
+  -1, 29926, -1, 29976, -1, 29983, -1, 29992, 
+  -1, 30000, -1, 30091, -1, 30098, -1, 30326, 
+  -1, 30333, -1, 30382, -1, 30399, -1, 30446, 
+  -1, 30683, -1, 30690, -1, 30707, -1, 31034, 
+  -1, 31160, -1, 31166, -1, 31348, -1, 31435, 
+  -1, 31481, -1, 31859, -1, 31992, -1, 32566, 
+  -1, 32593, -1, 32650, -1, 32701, -1, 32769, 
+  -1, 32780, -1, 32786, -1, 32819, -1, 32895, 
+  -1, 32905, -1, 33251, -1, 33258, -1, 33267, 
+  -1, 33276, -1, 33292, -1, 33307, -1, 33311, 
+  -1, 33390, -1, 33394, -1, 33400, -1, 34381, 
+  -1, 34411, -1, 34880, -1, 34892, -1, 34915, 
+  -1, 35198, -1, 35211, -1, 35282, -1, 35328, 
+  -1, 35895, -1, 35910, -1, 35925, -1, 35960, 
+  -1, 35997, -1, 36196, -1, 36208, -1, 36275, 
+  -1, 36523, -1, 36554, -1, 36763, -1, 36784, 
+  -1, 36789, -1, 37009, -1, 37193, -1, 37318, 
+  -1, 37324, -1, 37329, -1, 38263, -1, 38272, 
+  -1, 38428, -1, 38582, -1, 38585, -1, 38632, 
+  -1, 38737, -1, 38750, -1, 38754, -1, 38761, 
+  -1, 38859, -1, 38893, -1, 38899, -1, 38913, 
+  -1, 39080, -1, 39131, -1, 39135, -1, 39318, 
+  -1, 39321, -1, 39340, -1, 39592, -1, 39640, 
+  -1, 39647, -1, 39717, -1, 39727, -1, 39730, 
+  -1, 39740, -1, 39770, -1, 40165, -1, 40565, 
+  -1, 40575, -1, 40613, -1, 40635, -1, 40643, 
+  -1, 40653, -1, 40657, -1, 40697, -1, 40701, 
+  -1, 40718, -1, 40723, -1, 40736, -1, 40763, 
+  -1, 40778, -1, 40786, -1, 40845, -1, 40860, 
+  -1, 40864, -1, 12306, -1, 21316, -1, 21317, 
+  -1, 12363, 12441, -1, 12365, 12441, -1, 12367, 
+  12441, -1, 12369, 12441, -1, 12371, 12441, -1, 
+  12373, 12441, -1, 12375, 12441, -1, 12377, 12441, 
+  -1, 12379, 12441, -1, 12381, 12441, -1, 12383, 
+  12441, -1, 12385, 12441, -1, 12388, 12441, -1, 
+  12390, 12441, -1, 12392, 12441, -1, 12399, 12441, 
+  -1, 12399, 12442, -1, 12402, 12441, -1, 12402, 
+  12442, -1, 12405, 12441, -1, 12405, 12442, -1, 
+  12408, 12441, -1, 12408, 12442, -1, 12411, 12441, 
+  -1, 12411, 12442, -1, 12358, 12441, -1, 32, 
+  12441, -1, 32, 12442, -1, 12445, 12441, -1, 
+  12424, 12426, -1, 12459, 12441, -1, 12461, 12441, 
+  -1, 12463, 12441, -1, 12465, 12441, -1, 12467, 
+  12441, -1, 12469, 12441, -1, 12471, 12441, -1, 
+  12473, 12441, -1, 12475, 12441, -1, 12477, 12441, 
+  -1, 12479, 12441, -1, 12481, 12441, -1, 12484, 
+  12441, -1, 12486, 12441, -1, 12488, 12441, -1, 
+  12495, 12441, -1, 12495, 12442, -1, 12498, 12441, 
+  -1, 12498, 12442, -1, 12501, 12441, -1, 12501, 
+  12442, -1, 12504, 12441, -1, 12504, 12442, -1, 
+  12507, 12441, -1, 12507, 12442, -1, 12454, 12441, 
+  -1, 12527, 12441, -1, 12528, 12441, -1, 12529, 
+  12441, -1, 12530, 12441, -1, 12541, 12441, -1, 
+  12467, 12488, -1, 4352, -1, 4353, -1, 4522, 
+  -1, 4354, -1, 4524, -1, 4525, -1, 4355, 
+  -1, 4356, -1, 4357, -1, 4528, -1, 4529, 
+  -1, 4530, -1, 4531, -1, 4532, -1, 4533, 
+  -1, 4378, -1, 4358, -1, 4359, -1, 4360, 
+  -1, 4385, -1, 4361, -1, 4362, -1, 4363, 
+  -1, 4364, -1, 4365, -1, 4366, -1, 4367, 
+  -1, 4368, -1, 4369, -1, 4370, -1, 4449, 
+  -1, 4450, -1, 4451, -1, 4452, -1, 4453, 
+  -1, 4454, -1, 4455, -1, 4456, -1, 4457, 
+  -1, 4458, -1, 4459, -1, 4460, -1, 4461, 
+  -1, 4462, -1, 4463, -1, 4464, -1, 4465, 
+  -1, 4466, -1, 4467, -1, 4468, -1, 4469, 
+  -1, 4448, -1, 4372, -1, 4373, -1, 4551, 
+  -1, 4552, -1, 4556, -1, 4558, -1, 4563, 
+  -1, 4567, -1, 4569, -1, 4380, -1, 4573, 
+  -1, 4575, -1, 4381, -1, 4382, -1, 4384, 
+  -1, 4386, -1, 4387, -1, 4391, -1, 4393, 
+  -1, 4395, -1, 4396, -1, 4397, -1, 4398, 
+  -1, 4399, -1, 4402, -1, 4406, -1, 4416, 
+  -1, 4423, -1, 4428, -1, 4593, -1, 4594, 
+  -1, 4439, -1, 4440, -1, 4441, -1, 4484, 
+  -1, 4485, -1, 4488, -1, 4497, -1, 4498, 
+  -1, 4500, -1, 4510, -1, 4513, -1, 19977, 
+  -1, 22235, -1, 19978, -1, 20013, -1, 19979, 
+  -1, 30002, -1, 19993, -1, 19969, -1, 22825, 
+  -1, 22320, -1, 40, 4352, 41, -1, 40, 
+  4354, 41, -1, 40, 4355, 41, -1, 40, 
+  4357, 41, -1, 40, 4358, 41, -1, 40, 
+  4359, 41, -1, 40, 4361, 41, -1, 40, 
+  4363, 41, -1, 40, 4364, 41, -1, 40, 
+  4366, 41, -1, 40, 4367, 41, -1, 40, 
+  4368, 41, -1, 40, 4369, 41, -1, 40, 
+  4370, 41, -1, 40, 4352, 4449, 41, -1, 
+  40, 4354, 4449, 41, -1, 40, 4355, 4449, 
+  41, -1, 40, 4357, 4449, 41, -1, 40, 
+  4358, 4449, 41, -1, 40, 4359, 4449, 41, 
+  -1, 40, 4361, 4449, 41, -1, 40, 4363, 
+  4449, 41, -1, 40, 4364, 4449, 41, -1, 
+  40, 4366, 4449, 41, -1, 40, 4367, 4449, 
+  41, -1, 40, 4368, 4449, 41, -1, 40, 
+  4369, 4449, 41, -1, 40, 4370, 4449, 41, 
+  -1, 40, 4364, 4462, 41, -1, 40, 4363, 
+  4457, 4364, 4453, 4523, 41, -1, 40, 4363, 
+  4457, 4370, 4462, 41, -1, 40, 19968, 41, 
+  -1, 40, 20108, 41, -1, 40, 19977, 41, 
+  -1, 40, 22235, 41, -1, 40, 20116, 41, 
+  -1, 40, 20845, 41, -1, 40, 19971, 41, 
+  -1, 40, 20843, 41, -1, 40, 20061, 41, 
+  -1, 40, 21313, 41, -1, 40, 26376, 41, 
+  -1, 40, 28779, 41, -1, 40, 27700, 41, 
+  -1, 40, 26408, 41, -1, 40, 37329, 41, 
+  -1, 40, 22303, 41, -1, 40, 26085, 41, 
+  -1, 40, 26666, 41, -1, 40, 26377, 41, 
+  -1, 40, 31038, 41, -1, 40, 21517, 41, 
+  -1, 40, 29305, 41, -1, 40, 36001, 41, 
+  -1, 40, 31069, 41, -1, 40, 21172, 41, 
+  -1, 40, 20195, 41, -1, 40, 21628, 41, 
+  -1, 40, 23398, 41, -1, 40, 30435, 41, 
+  -1, 40, 20225, 41, -1, 40, 36039, 41, 
+  -1, 40, 21332, 41, -1, 40, 31085, 41, 
+  -1, 40, 20241, 41, -1, 40, 33258, 41, 
+  -1, 40, 33267, 41, -1, 80, 84, 69, 
+  -1, 50, 49, -1, 50, 50, -1, 50, 
+  51, -1, 50, 52, -1, 50, 53, -1, 
+  50, 54, -1, 50, 55, -1, 50, 56, 
+  -1, 50, 57, -1, 51, 48, -1, 51, 
+  49, -1, 51, 50, -1, 51, 51, -1, 
+  51, 52, -1, 51, 53, -1, 4352, 4449, 
+  -1, 4354, 4449, -1, 4355, 4449, -1, 4357, 
+  4449, -1, 4358, 4449, -1, 4359, 4449, -1, 
+  4361, 4449, -1, 4363, 4449, -1, 4364, 4449, 
+  -1, 4366, 4449, -1, 4367, 4449, -1, 4368, 
+  4449, -1, 4369, 4449, -1, 4370, 4449, -1, 
+  4366, 4449, 4535, 4352, 4457, -1, 4364, 4462, 
+  4363, 4468, -1, 4363, 4462, -1, 20116, -1, 
+  20845, -1, 19971, -1, 20061, -1, 26666, -1, 
+  26377, -1, 31038, -1, 21517, -1, 29305, -1, 
+  36001, -1, 31069, -1, 21172, -1, 31192, -1, 
+  30007, -1, 36969, -1, 20778, -1, 21360, -1, 
+  27880, -1, 38917, -1, 20241, -1, 20889, -1, 
+  27491, -1, 24038, -1, 21491, -1, 21307, -1, 
+  23447, -1, 23398, -1, 30435, -1, 20225, -1, 
+  36039, -1, 21332, -1, 22812, -1, 51, 54, 
+  -1, 51, 55, -1, 51, 56, -1, 51, 
+  57, -1, 52, 48, -1, 52, 49, -1, 
+  52, 50, -1, 52, 51, -1, 52, 52, 
+  -1, 52, 53, -1, 52, 54, -1, 52, 
+  55, -1, 52, 56, -1, 52, 57, -1, 
+  53, 48, -1, 49, 26376, -1, 50, 26376, 
+  -1, 51, 26376, -1, 52, 26376, -1, 53, 
+  26376, -1, 54, 26376, -1, 55, 26376, -1, 
+  56, 26376, -1, 57, 26376, -1, 49, 48, 
+  26376, -1, 49, 49, 26376, -1, 49, 50, 
+  26376, -1, 72, 103, -1, 101, 114, 103, 
+  -1, 101, 86, -1, 76, 84, 68, -1, 
+  12450, -1, 12452, -1, 12454, -1, 12456, -1, 
+  12458, -1, 12459, -1, 12461, -1, 12463, -1, 
+  12465, -1, 12467, -1, 12469, -1, 12471, -1, 
+  12473, -1, 12475, -1, 12477, -1, 12479, -1, 
+  12481, -1, 12484, -1, 12486, -1, 12488, -1, 
+  12490, -1, 12491, -1, 12492, -1, 12493, -1, 
+  12494, -1, 12495, -1, 12498, -1, 12501, -1, 
+  12504, -1, 12507, -1, 12510, -1, 12511, -1, 
+  12512, -1, 12513, -1, 12514, -1, 12516, -1, 
+  12518, -1, 12520, -1, 12521, -1, 12522, -1, 
+  12523, -1, 12524, -1, 12525, -1, 12527, -1, 
+  12528, -1, 12529, -1, 12530, -1, 12450, 12497, 
+  12540, 12488, -1, 12450, 12523, 12501, 12449, -1, 
+  12450, 12531, 12506, 12450, -1, 12450, 12540, 12523, 
+  -1, 12452, 12491, 12531, 12464, -1, 12452, 12531, 
+  12481, -1, 12454, 12457, 12531, -1, 12456, 12473, 
+  12463, 12540, 12489, -1, 12456, 12540, 12459, 12540, 
+  -1, 12458, 12531, 12473, -1, 12458, 12540, 12512, 
+  -1, 12459, 12452, 12522, -1, 12459, 12521, 12483, 
+  12488, -1, 12459, 12525, 12522, 12540, -1, 12460, 
+  12525, 12531, -1, 12460, 12531, 12510, -1, 12462, 
+  12460, -1, 12462, 12491, 12540, -1, 12461, 12517, 
+  12522, 12540, -1, 12462, 12523, 12480, 12540, -1, 
+  12461, 12525, -1, 12461, 12525, 12464, 12521, 12512, 
+  -1, 12461, 12525, 12513, 12540, 12488, 12523, -1, 
+  12461, 12525, 12527, 12483, 12488, -1, 12464, 12521, 
+  12512, -1, 12464, 12521, 12512, 12488, 12531, -1, 
+  12463, 12523, 12476, 12452, 12525, -1, 12463, 12525, 
+  12540, 12493, -1, 12465, 12540, 12473, -1, 12467, 
+  12523, 12490, -1, 12467, 12540, 12509, -1, 12469, 
+  12452, 12463, 12523, -1, 12469, 12531, 12481, 12540, 
+  12512, -1, 12471, 12522, 12531, 12464, -1, 12475, 
+  12531, 12481, -1, 12475, 12531, 12488, -1, 12480, 
+  12540, 12473, -1, 12487, 12471, -1, 12489, 12523, 
+  -1, 12488, 12531, -1, 12490, 12494, -1, 12494, 
+  12483, 12488, -1, 12495, 12452, 12484, -1, 12497, 
+  12540, 12475, 12531, 12488, -1, 12497, 12540, 12484, 
+  -1, 12496, 12540, 12524, 12523, -1, 12500, 12450, 
+  12473, 12488, 12523, -1, 12500, 12463, 12523, -1, 
+  12500, 12467, -1, 12499, 12523, -1, 12501, 12449, 
+  12521, 12483, 12489, -1, 12501, 12451, 12540, 12488, 
+  -1, 12502, 12483, 12471, 12455, 12523, -1, 12501, 
+  12521, 12531, -1, 12504, 12463, 12479, 12540, 12523, 
+  -1, 12506, 12477, -1, 12506, 12491, 12498, -1, 
+  12504, 12523, 12484, -1, 12506, 12531, 12473, -1, 
+  12506, 12540, 12472, -1, 12505, 12540, 12479, -1, 
+  12509, 12452, 12531, 12488, -1, 12508, 12523, 12488, 
+  -1, 12507, 12531, -1, 12509, 12531, 12489, -1, 
+  12507, 12540, 12523, -1, 12507, 12540, 12531, -1, 
+  12510, 12452, 12463, 12525, -1, 12510, 12452, 12523, 
+  -1, 12510, 12483, 12495, -1, 12510, 12523, 12463, 
+  -1, 12510, 12531, 12471, 12519, 12531, -1, 12511, 
+  12463, 12525, 12531, -1, 12511, 12522, -1, 12511, 
+  12522, 12496, 12540, 12523, -1, 12513, 12460, -1, 
+  12513, 12460, 12488, 12531, -1, 12513, 12540, 12488, 
+  12523, -1, 12516, 12540, 12489, -1, 12516, 12540, 
+  12523, -1, 12518, 12450, 12531, -1, 12522, 12483, 
+  12488, 12523, -1, 12522, 12521, -1, 12523, 12500, 
+  12540, -1, 12523, 12540, 12502, 12523, -1, 12524, 
+  12512, -1, 12524, 12531, 12488, 12466, 12531, -1, 
+  12527, 12483, 12488, -1, 48, 28857, -1, 49, 
+  28857, -1, 50, 28857, -1, 51, 28857, -1, 
+  52, 28857, -1, 53, 28857, -1, 54, 28857, 
+  -1, 55, 28857, -1, 56, 28857, -1, 57, 
+  28857, -1, 49, 48, 28857, -1, 49, 49, 
+  28857, -1, 49, 50, 28857, -1, 49, 51, 
+  28857, -1, 49, 52, 28857, -1, 49, 53, 
+  28857, -1, 49, 54, 28857, -1, 49, 55, 
+  28857, -1, 49, 56, 28857, -1, 49, 57, 
+  28857, -1, 50, 48, 28857, -1, 50, 49, 
+  28857, -1, 50, 50, 28857, -1, 50, 51, 
+  28857, -1, 50, 52, 28857, -1, 104, 80, 
+  97, -1, 100, 97, -1, 65, 85, -1, 
+  98, 97, 114, -1, 111, 86, -1, 112, 
+  99, -1, 100, 109, -1, 100, 109, 178, 
+  -1, 100, 109, 179, -1, 73, 85, -1, 
+  24179, 25104, -1, 26157, 21644, -1, 22823, 27491, 
+  -1, 26126, 27835, -1, 26666, 24335, 20250, 31038, 
+  -1, 112, 65, -1, 110, 65, -1, 956, 
+  65, -1, 109, 65, -1, 107, 65, -1, 
+  75, 66, -1, 77, 66, -1, 71, 66, 
+  -1, 99, 97, 108, -1, 107, 99, 97, 
+  108, -1, 112, 70, -1, 110, 70, -1, 
+  956, 70, -1, 956, 103, -1, 109, 103, 
+  -1, 107, 103, -1, 72, 122, -1, 107, 
+  72, 122, -1, 77, 72, 122, -1, 71, 
+  72, 122, -1, 84, 72, 122, -1, 956, 
+  8467, -1, 109, 8467, -1, 100, 8467, -1, 
+  107, 8467, -1, 102, 109, -1, 110, 109, 
+  -1, 956, 109, -1, 109, 109, -1, 99, 
+  109, -1, 107, 109, -1, 109, 109, 178, 
+  -1, 99, 109, 178, -1, 109, 178, -1, 
+  107, 109, 178, -1, 109, 109, 179, -1, 
+  99, 109, 179, -1, 109, 179, -1, 107, 
+  109, 179, -1, 109, 8725, 115, -1, 109, 
+  8725, 115, 178, -1, 80, 97, -1, 107, 
+  80, 97, -1, 77, 80, 97, -1, 71, 
+  80, 97, -1, 114, 97, 100, -1, 114, 
+  97, 100, 8725, 115, -1, 114, 97, 100, 
+  8725, 115, 178, -1, 112, 115, -1, 110, 
+  115, -1, 956, 115, -1, 109, 115, -1, 
+  112, 86, -1, 110, 86, -1, 956, 86, 
+  -1, 109, 86, -1, 107, 86, -1, 77, 
+  86, -1, 112, 87, -1, 110, 87, -1, 
+  956, 87, -1, 109, 87, -1, 107, 87, 
+  -1, 77, 87, -1, 107, 937, -1, 77, 
+  937, -1, 97, 46, 109, 46, -1, 66, 
+  113, -1, 99, 99, -1, 99, 100, -1, 
+  67, 8725, 107, 103, -1, 67, 111, 46, 
+  -1, 100, 66, -1, 71, 121, -1, 104, 
+  97, -1, 72, 80, -1, 105, 110, -1, 
+  75, 75, -1, 75, 77, -1, 107, 116, 
+  -1, 108, 109, -1, 108, 110, -1, 108, 
+  111, 103, -1, 108, 120, -1, 109, 98, 
+  -1, 109, 105, 108, -1, 109, 111, 108, 
+  -1, 80, 72, -1, 112, 46, 109, 46, 
+  -1, 80, 80, 77, -1, 80, 82, -1, 
+  115, 114, -1, 83, 118, -1, 87, 98, 
+  -1, 86, 8725, 109, -1, 65, 8725, 109, 
+  -1, 49, 26085, -1, 50, 26085, -1, 51, 
+  26085, -1, 52, 26085, -1, 53, 26085, -1, 
+  54, 26085, -1, 55, 26085, -1, 56, 26085, 
+  -1, 57, 26085, -1, 49, 48, 26085, -1, 
+  49, 49, 26085, -1, 49, 50, 26085, -1, 
+  49, 51, 26085, -1, 49, 52, 26085, -1, 
+  49, 53, 26085, -1, 49, 54, 26085, -1, 
+  49, 55, 26085, -1, 49, 56, 26085, -1, 
+  49, 57, 26085, -1, 50, 48, 26085, -1, 
+  50, 49, 26085, -1, 50, 50, 26085, -1, 
+  50, 51, 26085, -1, 50, 52, 26085, -1, 
+  50, 53, 26085, -1, 50, 54, 26085, -1, 
+  50, 55, 26085, -1, 50, 56, 26085, -1, 
+  50, 57, 26085, -1, 51, 48, 26085, -1, 
+  51, 49, 26085, -1, 103, 97, 108, -1, 
+  35912, -1, 26356, -1, 36040, -1, 28369, -1, 
+  20018, -1, 21477, -1, 22865, -1, 21895, -1, 
+  22856, -1, 25078, -1, 30313, -1, 32645, -1, 
+  34367, -1, 34746, -1, 35064, -1, 37007, -1, 
+  27138, -1, 27931, -1, 28889, -1, 29662, -1, 
+  33853, -1, 37226, -1, 39409, -1, 20098, -1, 
+  21365, -1, 27396, -1, 29211, -1, 34349, -1, 
+  40478, -1, 23888, -1, 28651, -1, 34253, -1, 
+  35172, -1, 25289, -1, 33240, -1, 34847, -1, 
+  24266, -1, 26391, -1, 28010, -1, 29436, -1, 
+  37070, -1, 20358, -1, 20919, -1, 21214, -1, 
+  25796, -1, 27347, -1, 29200, -1, 30439, -1, 
+  34310, -1, 34396, -1, 36335, -1, 38706, -1, 
+  39791, -1, 40442, -1, 30860, -1, 31103, -1, 
+  32160, -1, 33737, -1, 37636, -1, 35542, -1, 
+  22751, -1, 24324, -1, 31840, -1, 32894, -1, 
+  29282, -1, 30922, -1, 36034, -1, 38647, -1, 
+  22744, -1, 23650, -1, 27155, -1, 28122, -1, 
+  28431, -1, 32047, -1, 32311, -1, 38475, -1, 
+  21202, -1, 32907, -1, 20956, -1, 20940, -1, 
+  31260, -1, 32190, -1, 33777, -1, 38517, -1, 
+  35712, -1, 25295, -1, 35582, -1, 20025, -1, 
+  23527, -1, 24594, -1, 29575, -1, 30064, -1, 
+  21271, -1, 30971, -1, 20415, -1, 24489, -1, 
+  19981, -1, 27852, -1, 25976, -1, 32034, -1, 
+  21443, -1, 22622, -1, 30465, -1, 33865, -1, 
+  35498, -1, 27578, -1, 27784, -1, 25342, -1, 
+  33509, -1, 25504, -1, 30053, -1, 20142, -1, 
+  20841, -1, 20937, -1, 26753, -1, 31975, -1, 
+  33391, -1, 35538, -1, 37327, -1, 21237, -1, 
+  21570, -1, 24300, -1, 26053, -1, 28670, -1, 
+  31018, -1, 38317, -1, 39530, -1, 40599, -1, 
+  40654, -1, 26310, -1, 27511, -1, 36706, -1, 
+  24180, -1, 24976, -1, 25088, -1, 25754, -1, 
+  28451, -1, 29001, -1, 29833, -1, 31178, -1, 
+  32244, -1, 32879, -1, 36646, -1, 34030, -1, 
+  36899, -1, 37706, -1, 21015, -1, 21155, -1, 
+  21693, -1, 28872, -1, 35010, -1, 24265, -1, 
+  24565, -1, 25467, -1, 27566, -1, 31806, -1, 
+  29557, -1, 20196, -1, 22265, -1, 23994, -1, 
+  24604, -1, 29618, -1, 29801, -1, 32666, -1, 
+  32838, -1, 37428, -1, 38646, -1, 38728, -1, 
+  38936, -1, 20363, -1, 31150, -1, 37300, -1, 
+  38584, -1, 24801, -1, 20102, -1, 20698, -1, 
+  23534, -1, 23615, -1, 26009, -1, 29134, -1, 
+  30274, -1, 34044, -1, 36988, -1, 26248, -1, 
+  38446, -1, 21129, -1, 26491, -1, 26611, -1, 
+  27969, -1, 28316, -1, 29705, -1, 30041, -1, 
+  30827, -1, 32016, -1, 39006, -1, 25134, -1, 
+  38520, -1, 20523, -1, 23833, -1, 28138, -1, 
+  36650, -1, 24459, -1, 24900, -1, 26647, -1, 
+  38534, -1, 21033, -1, 21519, -1, 23653, -1, 
+  26131, -1, 26446, -1, 26792, -1, 27877, -1, 
+  29702, -1, 30178, -1, 32633, -1, 35023, -1, 
+  35041, -1, 38626, -1, 21311, -1, 28346, -1, 
+  21533, -1, 29136, -1, 29848, -1, 34298, -1, 
+  38563, -1, 40023, -1, 40607, -1, 26519, -1, 
+  28107, -1, 33256, -1, 31520, -1, 31890, -1, 
+  29376, -1, 28825, -1, 35672, -1, 20160, -1, 
+  33590, -1, 21050, -1, 20999, -1, 24230, -1, 
+  25299, -1, 31958, -1, 23429, -1, 27934, -1, 
+  26292, -1, 36667, -1, 38477, -1, 24275, -1, 
+  20800, -1, 21952, -1, 22618, -1, 26228, -1, 
+  20958, -1, 29482, -1, 30410, -1, 31036, -1, 
+  31070, -1, 31077, -1, 31119, -1, 38742, -1, 
+  31934, -1, 34322, -1, 35576, -1, 36920, -1, 
+  37117, -1, 39151, -1, 39164, -1, 39208, -1, 
+  40372, -1, 20398, -1, 20711, -1, 20813, -1, 
+  21193, -1, 21220, -1, 21329, -1, 21917, -1, 
+  22022, -1, 22120, -1, 22592, -1, 22696, -1, 
+  23652, -1, 24724, -1, 24936, -1, 24974, -1, 
+  25074, -1, 25935, -1, 26082, -1, 26257, -1, 
+  26757, -1, 28023, -1, 28186, -1, 28450, -1, 
+  29038, -1, 29227, -1, 29730, -1, 30865, -1, 
+  31049, -1, 31048, -1, 31056, -1, 31062, -1, 
+  31117, -1, 31118, -1, 31296, -1, 31361, -1, 
+  31680, -1, 32265, -1, 32321, -1, 32626, -1, 
+  32773, -1, 33261, -1, 33401, -1, 33879, -1, 
+  35088, -1, 35222, -1, 35585, -1, 35641, -1, 
+  36051, -1, 36104, -1, 36790, -1, 38627, -1, 
+  38911, -1, 38971, -1, 20006, -1, 20917, -1, 
+  20840, -1, 20352, -1, 20805, -1, 20864, -1, 
+  21191, -1, 21242, -1, 21845, -1, 21913, -1, 
+  21986, -1, 22707, -1, 22852, -1, 22868, -1, 
+  23138, -1, 23336, -1, 24274, -1, 24281, -1, 
+  24425, -1, 24493, -1, 24792, -1, 24910, -1, 
+  24840, -1, 24928, -1, 25140, -1, 25540, -1, 
+  25628, -1, 25682, -1, 25942, -1, 26395, -1, 
+  26454, -1, 28379, -1, 28363, -1, 28702, -1, 
+  30631, -1, 29237, -1, 29359, -1, 29809, -1, 
+  29958, -1, 30011, -1, 30237, -1, 30239, -1, 
+  30427, -1, 30452, -1, 30538, -1, 30528, -1, 
+  30924, -1, 31409, -1, 31867, -1, 32091, -1, 
+  32574, -1, 33618, -1, 33775, -1, 34681, -1, 
+  35137, -1, 35206, -1, 35519, -1, 35531, -1, 
+  35565, -1, 35722, -1, 36664, -1, 36978, -1, 
+  37273, -1, 37494, -1, 38524, -1, 38875, -1, 
+  38923, -1, 39698, -1, 141386, -1, 141380, -1, 
+  144341, -1, 15261, -1, 16408, -1, 16441, -1, 
+  152137, -1, 154832, -1, 163539, -1, 40771, -1, 
+  40846, -1, 102, 102, -1, 102, 105, -1, 
+  102, 108, -1, 102, 102, 105, -1, 102, 
+  102, 108, -1, 383, 116, -1, 115, 116, 
+  -1, 1396, 1398, -1, 1396, 1381, -1, 1396, 
+  1387, -1, 1406, 1398, -1, 1396, 1389, -1, 
+  1497, 1460, -1, 1522, 1463, -1, 1506, -1, 
+  1492, -1, 1499, -1, 1500, -1, 1501, -1, 
+  1512, -1, 1514, -1, 1513, 1473, -1, 1513, 
+  1474, -1, 64329, 1473, -1, 64329, 1474, -1, 
+  1488, 1463, -1, 1488, 1464, -1, 1488, 1468, 
+  -1, 1489, 1468, -1, 1490, 1468, -1, 1491, 
+  1468, -1, 1492, 1468, -1, 1493, 1468, -1, 
+  1494, 1468, -1, 1496, 1468, -1, 1497, 1468, 
+  -1, 1498, 1468, -1, 1499, 1468, -1, 1500, 
+  1468, -1, 1502, 1468, -1, 1504, 1468, -1, 
+  1505, 1468, -1, 1507, 1468, -1, 1508, 1468, 
+  -1, 1510, 1468, -1, 1511, 1468, -1, 1512, 
+  1468, -1, 1513, 1468, -1, 1514, 1468, -1, 
+  1493, 1465, -1, 1489, 1471, -1, 1499, 1471, 
+  -1, 1508, 1471, -1, 1488, 1500, -1, 1649, 
+  -1, 1659, -1, 1662, -1, 1664, -1, 1658, 
+  -1, 1663, -1, 1657, -1, 1700, -1, 1702, 
+  -1, 1668, -1, 1667, -1, 1670, -1, 1671, 
+  -1, 1677, -1, 1676, -1, 1678, -1, 1672, 
+  -1, 1688, -1, 1681, -1, 1705, -1, 1711, 
+  -1, 1715, -1, 1713, -1, 1722, -1, 1723, 
+  -1, 1728, -1, 1729, -1, 1726, -1, 1746, 
+  -1, 1747, -1, 1709, -1, 1735, -1, 1734, 
+  -1, 1736, -1, 1655, -1, 1739, -1, 1733, 
+  -1, 1737, -1, 1744, -1, 1609, -1, 1574, 
+  1575, -1, 1574, 1749, -1, 1574, 1608, -1, 
+  1574, 1735, -1, 1574, 1734, -1, 1574, 1736, 
+  -1, 1574, 1744, -1, 1574, 1609, -1, 1740, 
+  -1, 1574, 1580, -1, 1574, 1581, -1, 1574, 
+  1605, -1, 1574, 1610, -1, 1576, 1580, -1, 
+  1576, 1581, -1, 1576, 1582, -1, 1576, 1605, 
+  -1, 1576, 1609, -1, 1576, 1610, -1, 1578, 
+  1580, -1, 1578, 1581, -1, 1578, 1582, -1, 
+  1578, 1605, -1, 1578, 1609, -1, 1578, 1610, 
+  -1, 1579, 1580, -1, 1579, 1605, -1, 1579, 
+  1609, -1, 1579, 1610, -1, 1580, 1581, -1, 
+  1580, 1605, -1, 1581, 1580, -1, 1581, 1605, 
+  -1, 1582, 1580, -1, 1582, 1581, -1, 1582, 
+  1605, -1, 1587, 1580, -1, 1587, 1581, -1, 
+  1587, 1582, -1, 1587, 1605, -1, 1589, 1581, 
+  -1, 1589, 1605, -1, 1590, 1580, -1, 1590, 
+  1581, -1, 1590, 1582, -1, 1590, 1605, -1, 
+  1591, 1581, -1, 1591, 1605, -1, 1592, 1605, 
+  -1, 1593, 1580, -1, 1593, 1605, -1, 1594, 
+  1580, -1, 1594, 1605, -1, 1601, 1580, -1, 
+  1601, 1581, -1, 1601, 1582, -1, 1601, 1605, 
+  -1, 1601, 1609, -1, 1601, 1610, -1, 1602, 
+  1581, -1, 1602, 1605, -1, 1602, 1609, -1, 
+  1602, 1610, -1, 1603, 1575, -1, 1603, 1580, 
+  -1, 1603, 1581, -1, 1603, 1582, -1, 1603, 
+  1604, -1, 1603, 1605, -1, 1603, 1609, -1, 
+  1603, 1610, -1, 1604, 1580, -1, 1604, 1581, 
+  -1, 1604, 1582, -1, 1604, 1605, -1, 1604, 
+  1609, -1, 1604, 1610, -1, 1605, 1580, -1, 
+  1605, 1581, -1, 1605, 1582, -1, 1605, 1605, 
+  -1, 1605, 1609, -1, 1605, 1610, -1, 1606, 
+  1580, -1, 1606, 1581, -1, 1606, 1582, -1, 
+  1606, 1605, -1, 1606, 1609, -1, 1606, 1610, 
+  -1, 1607, 1580, -1, 1607, 1605, -1, 1607, 
+  1609, -1, 1607, 1610, -1, 1610, 1580, -1, 
+  1610, 1581, -1, 1610, 1582, -1, 1610, 1605, 
+  -1, 1610, 1609, -1, 1610, 1610, -1, 1584, 
+  1648, -1, 1585, 1648, -1, 1609, 1648, -1, 
+  32, 1612, 1617, -1, 32, 1613, 1617, -1, 
+  32, 1614, 1617, -1, 32, 1615, 1617, -1, 
+  32, 1616, 1617, -1, 32, 1617, 1648, -1, 
+  1574, 1585, -1, 1574, 1586, -1, 1574, 1606, 
+  -1, 1576, 1585, -1, 1576, 1586, -1, 1576, 
+  1606, -1, 1578, 1585, -1, 1578, 1586, -1, 
+  1578, 1606, -1, 1579, 1585, -1, 1579, 1586, 
+  -1, 1579, 1606, -1, 1605, 1575, -1, 1606, 
+  1585, -1, 1606, 1586, -1, 1606, 1606, -1, 
+  1610, 1585, -1, 1610, 1586, -1, 1610, 1606, 
+  -1, 1574, 1582, -1, 1574, 1607, -1, 1576, 
+  1607, -1, 1578, 1607, -1, 1589, 1582, -1, 
+  1604, 1607, -1, 1606, 1607, -1, 1607, 1648, 
+  -1, 1610, 1607, -1, 1579, 1607, -1, 1587, 
+  1607, -1, 1588, 1605, -1, 1588, 1607, -1, 
+  1600, 1614, 1617, -1, 1600, 1615, 1617, -1, 
+  1600, 1616, 1617, -1, 1591, 1609, -1, 1591, 
+  1610, -1, 1593, 1609, -1, 1593, 1610, -1, 
+  1594, 1609, -1, 1594, 1610, -1, 1587, 1609, 
+  -1, 1587, 1610, -1, 1588, 1609, -1, 1588, 
+  1610, -1, 1581, 1609, -1, 1581, 1610, -1, 
+  1580, 1609, -1, 1580, 1610, -1, 1582, 1609, 
+  -1, 1582, 1610, -1, 1589, 1609, -1, 1589, 
+  1610, -1, 1590, 1609, -1, 1590, 1610, -1, 
+  1588, 1580, -1, 1588, 1581, -1, 1588, 1582, 
+  -1, 1588, 1585, -1, 1587, 1585, -1, 1589, 
+  1585, -1, 1590, 1585, -1, 1575, 1611, -1, 
+  1578, 1580, 1605, -1, 1578, 1581, 1580, -1, 
+  1578, 1581, 1605, -1, 1578, 1582, 1605, -1, 
+  1578, 1605, 1580, -1, 1578, 1605, 1581, -1, 
+  1578, 1605, 1582, -1, 1580, 1605, 1581, -1, 
+  1581, 1605, 1610, -1, 1581, 1605, 1609, -1, 
+  1587, 1581, 1580, -1, 1587, 1580, 1581, -1, 
+  1587, 1580, 1609, -1, 1587, 1605, 1581, -1, 
+  1587, 1605, 1580, -1, 1587, 1605, 1605, -1, 
+  1589, 1581, 1581, -1, 1589, 1605, 1605, -1, 
+  1588, 1581, 1605, -1, 1588, 1580, 1610, -1, 
+  1588, 1605, 1582, -1, 1588, 1605, 1605, -1, 
+  1590, 1581, 1609, -1, 1590, 1582, 1605, -1, 
+  1591, 1605, 1581, -1, 1591, 1605, 1605, -1, 
+  1591, 1605, 1610, -1, 1593, 1580, 1605, -1, 
+  1593, 1605, 1605, -1, 1593, 1605, 1609, -1, 
+  1594, 1605, 1605, -1, 1594, 1605, 1610, -1, 
+  1594, 1605, 1609, -1, 1601, 1582, 1605, -1, 
+  1602, 1605, 1581, -1, 1602, 1605, 1605, -1, 
+  1604, 1581, 1605, -1, 1604, 1581, 1610, -1, 
+  1604, 1581, 1609, -1, 1604, 1580, 1580, -1, 
+  1604, 1582, 1605, -1, 1604, 1605, 1581, -1, 
+  1605, 1581, 1580, -1, 1605, 1581, 1605, -1, 
+  1605, 1581, 1610, -1, 1605, 1580, 1581, -1, 
+  1605, 1580, 1605, -1, 1605, 1582, 1580, -1, 
+  1605, 1582, 1605, -1, 1605, 1580, 1582, -1, 
+  1607, 1605, 1580, -1, 1607, 1605, 1605, -1, 
+  1606, 1581, 1605, -1, 1606, 1581, 1609, -1, 
+  1606, 1580, 1605, -1, 1606, 1580, 1609, -1, 
+  1606, 1605, 1610, -1, 1606, 1605, 1609, -1, 
+  1610, 1605, 1605, -1, 1576, 1582, 1610, -1, 
+  1578, 1580, 1610, -1, 1578, 1580, 1609, -1, 
+  1578, 1582, 1610, -1, 1578, 1582, 1609, -1, 
+  1578, 1605, 1610, -1, 1578, 1605, 1609, -1, 
+  1580, 1605, 1610, -1, 1580, 1581, 1609, -1, 
+  1580, 1605, 1609, -1, 1587, 1582, 1609, -1, 
+  1589, 1581, 1610, -1, 1588, 1581, 1610, -1, 
+  1590, 1581, 1610, -1, 1604, 1580, 1610, -1, 
+  1604, 1605, 1610, -1, 1610, 1581, 1610, -1, 
+  1610, 1580, 1610, -1, 1610, 1605, 1610, -1, 
+  1605, 1605, 1610, -1, 1602, 1605, 1610, -1, 
+  1606, 1581, 1610, -1, 1593, 1605, 1610, -1, 
+  1603, 1605, 1610, -1, 1606, 1580, 1581, -1, 
+  1605, 1582, 1610, -1, 1604, 1580, 1605, -1, 
+  1603, 1605, 1605, -1, 1580, 1581, 1610, -1, 
+  1581, 1580, 1610, -1, 1605, 1580, 1610, -1, 
+  1601, 1605, 1610, -1, 1576, 1581, 1610, -1, 
+  1587, 1582, 1610, -1, 1606, 1580, 1610, -1, 
+  1589, 1604, 1746, -1, 1602, 1604, 1746, -1, 
+  1575, 1604, 1604, 1607, -1, 1575, 1603, 1576, 
+  1585, -1, 1605, 1581, 1605, 1583, -1, 1589, 
+  1604, 1593, 1605, -1, 1585, 1587, 1608, 1604, 
+  -1, 1593, 1604, 1610, 1607, -1, 1608, 1587, 
+  1604, 1605, -1, 1589, 1604, 1609, -1, 1589, 
+  1604, 1609, 32, 1575, 1604, 1604, 1607, 32, 
+  1593, 1604, 1610, 1607, 32, 1608, 1587, 1604, 
+  1605, -1, 1580, 1604, 32, 1580, 1604, 1575, 
+  1604, 1607, -1, 1585, 1740, 1575, 1604, -1, 
+  44, -1, 12289, -1, 12290, -1, 58, -1, 
+  33, -1, 63, -1, 12310, -1, 12311, -1, 
+  8230, -1, 8229, -1, 8212, -1, 8211, -1, 
+  95, -1, 123, -1, 125, -1, 12308, -1, 
+  12309, -1, 12304, -1, 12305, -1, 12298, -1, 
+  12299, -1, 12300, -1, 12301, -1, 12302, -1, 
+  12303, -1, 91, -1, 93, -1, 8254, -1, 
+  35, -1, 38, -1, 42, -1, 45, -1, 
+  60, -1, 62, -1, 92, -1, 36, -1, 
+  37, -1, 64, -1, 32, 1611, -1, 1600, 
+  1611, -1, 32, 1612, -1, 32, 1613, -1, 
+  32, 1614, -1, 1600, 1614, -1, 32, 1615, 
+  -1, 1600, 1615, -1, 32, 1616, -1, 1600, 
+  1616, -1, 32, 1617, -1, 1600, 1617, -1, 
+  32, 1618, -1, 1600, 1618, -1, 1569, -1, 
+  1570, -1, 1571, -1, 1572, -1, 1573, -1, 
+  1574, -1, 1575, -1, 1576, -1, 1577, -1, 
+  1578, -1, 1579, -1, 1580, -1, 1581, -1, 
+  1582, -1, 1583, -1, 1584, -1, 1585, -1, 
+  1586, -1, 1587, -1, 1588, -1, 1589, -1, 
+  1590, -1, 1591, -1, 1592, -1, 1593, -1, 
+  1594, -1, 1601, -1, 1602, -1, 1603, -1, 
+  1604, -1, 1605, -1, 1606, -1, 1607, -1, 
+  1608, -1, 1610, -1, 1604, 1570, -1, 1604, 
+  1571, -1, 1604, 1573, -1, 1604, 1575, -1, 
+  34, -1, 39, -1, 47, -1, 65345, -1, 
+  65346, -1, 65347, -1, 65348, -1, 65349, -1, 
+  65350, -1, 65351, -1, 65352, -1, 65353, -1, 
+  65354, -1, 65355, -1, 65356, -1, 65357, -1, 
+  65358, -1, 65359, -1, 65360, -1, 65361, -1, 
+  65362, -1, 65363, -1, 65364, -1, 65365, -1, 
+  65366, -1, 65367, -1, 65368, -1, 65369, -1, 
+  65370, -1, 94, -1, 124, -1, 126, -1, 
+  10629, -1, 10630, -1, 12539, -1, 12449, -1, 
+  12451, -1, 12453, -1, 12455, -1, 12457, -1, 
+  12515, -1, 12517, -1, 12519, -1, 12483, -1, 
+  12540, -1, 12531, -1, 12441, -1, 12442, -1, 
+  12644, -1, 12593, -1, 12594, -1, 12595, -1, 
+  12596, -1, 12597, -1, 12598, -1, 12599, -1, 
+  12600, -1, 12601, -1, 12602, -1, 12603, -1, 
+  12604, -1, 12605, -1, 12606, -1, 12607, -1, 
+  12608, -1, 12609, -1, 12610, -1, 12611, -1, 
+  12612, -1, 12613, -1, 12614, -1, 12615, -1, 
+  12616, -1, 12617, -1, 12618, -1, 12619, -1, 
+  12620, -1, 12621, -1, 12622, -1, 12623, -1, 
+  12624, -1, 12625, -1, 12626, -1, 12627, -1, 
+  12628, -1, 12629, -1, 12630, -1, 12631, -1, 
+  12632, -1, 12633, -1, 12634, -1, 12635, -1, 
+  12636, -1, 12637, -1, 12638, -1, 12639, -1, 
+  12640, -1, 12641, -1, 12642, -1, 12643, -1, 
+  162, -1, 163, -1, 172, -1, 175, -1, 
+  166, -1, 165, -1, 8361, -1, 9474, -1, 
+  8592, -1, 8593, -1, 8594, -1, 8595, -1, 
+  9632, -1, 9675, -1, 66600, -1, 66601, -1, 
+  66602, -1, 66603, -1, 66604, -1, 66605, -1, 
+  66606, -1, 66607, -1, 66608, -1, 66609, -1, 
+  66610, -1, 66611, -1, 66612, -1, 66613, -1, 
+  66614, -1, 66615, -1, 66616, -1, 66617, -1, 
+  66618, -1, 66619, -1, 66620, -1, 66621, -1, 
+  66622, -1, 66623, -1, 66624, -1, 66625, -1, 
+  66626, -1, 66627, -1, 66628, -1, 66629, -1, 
+  66630, -1, 66631, -1, 66632, -1, 66633, -1, 
+  66634, -1, 66635, -1, 66636, -1, 66637, -1, 
+  66638, -1, 66639, -1, 119127, 119141, -1, 119128, 
+  119141, -1, 119135, 119150, -1, 119135, 119151, -1, 
+  119135, 119152, -1, 119135, 119153, -1, 119135, 119154, 
+  -1, 119225, 119141, -1, 119226, 119141, -1, 119227, 
+  119150, -1, 119228, 119150, -1, 119227, 119151, -1, 
+  119228, 119151, -1, 305, -1, 567, -1, 913, 
+  -1, 914, -1, 916, -1, 917, -1, 918, 
+  -1, 919, -1, 921, -1, 922, -1, 923, 
+  -1, 924, -1, 925, -1, 926, -1, 927, 
+  -1, 929, -1, 1012, -1, 932, -1, 934, 
+  -1, 935, -1, 936, -1, 8711, -1, 8706, 
+  -1, 1013, -1, 977, -1, 1008, -1, 981, 
+  -1, 1009, -1, 982, -1, 988, -1, 20029, 
+  -1, 20024, -1, 20033, -1, 131362, -1, 20320, 
+  -1, 20411, -1, 20482, -1, 20602, -1, 20633, 
+  -1, 20687, -1, 13470, -1, 132666, -1, 20820, 
+  -1, 20836, -1, 20855, -1, 132380, -1, 13497, 
+  -1, 20839, -1, 20877, -1, 132427, -1, 20887, 
+  -1, 20900, -1, 20172, -1, 20908, -1, 168415, 
+  -1, 20995, -1, 13535, -1, 21051, -1, 21062, 
+  -1, 21106, -1, 21111, -1, 13589, -1, 21253, 
+  -1, 21254, -1, 21321, -1, 21338, -1, 21363, 
+  -1, 21373, -1, 21375, -1, 133676, -1, 28784, 
+  -1, 21450, -1, 21471, -1, 133987, -1, 21483, 
+  -1, 21489, -1, 21510, -1, 21662, -1, 21560, 
+  -1, 21576, -1, 21608, -1, 21666, -1, 21750, 
+  -1, 21776, -1, 21843, -1, 21859, -1, 21892, 
+  -1, 21931, -1, 21939, -1, 21954, -1, 22294, 
+  -1, 22295, -1, 22097, -1, 22132, -1, 22766, 
+  -1, 22478, -1, 22516, -1, 22541, -1, 22411, 
+  -1, 22578, -1, 22577, -1, 22700, -1, 136420, 
+  -1, 22770, -1, 22775, -1, 22790, -1, 22810, 
+  -1, 22818, -1, 22882, -1, 136872, -1, 136938, 
+  -1, 23020, -1, 23067, -1, 23079, -1, 23000, 
+  -1, 23142, -1, 14062, -1, 14076, -1, 23304, 
+  -1, 23358, -1, 137672, -1, 23491, -1, 23512, 
+  -1, 23539, -1, 138008, -1, 23551, -1, 23558, 
+  -1, 24403, -1, 14209, -1, 23648, -1, 23744, 
+  -1, 23693, -1, 138724, -1, 23875, -1, 138726, 
+  -1, 23918, -1, 23915, -1, 23932, -1, 24033, 
+  -1, 24034, -1, 14383, -1, 24061, -1, 24104, 
+  -1, 24125, -1, 24169, -1, 14434, -1, 139651, 
+  -1, 14460, -1, 24240, -1, 24243, -1, 24246, 
+  -1, 172946, -1, 140081, -1, 33281, -1, 24354, 
+  -1, 14535, -1, 144056, -1, 156122, -1, 24418, 
+  -1, 24427, -1, 14563, -1, 24474, -1, 24525, 
+  -1, 24535, -1, 24569, -1, 24705, -1, 14650, 
+  -1, 14620, -1, 141012, -1, 24775, -1, 24904, 
+  -1, 24908, -1, 24954, -1, 25010, -1, 24996, 
+  -1, 25007, -1, 25054, -1, 25104, -1, 25115, 
+  -1, 25181, -1, 25265, -1, 25300, -1, 25424, 
+  -1, 142092, -1, 25405, -1, 25340, -1, 25448, 
+  -1, 25475, -1, 25572, -1, 142321, -1, 25634, 
+  -1, 25541, -1, 25513, -1, 14894, -1, 25705, 
+  -1, 25726, -1, 25757, -1, 25719, -1, 14956, 
+  -1, 25964, -1, 143370, -1, 26083, -1, 26360, 
+  -1, 26185, -1, 15129, -1, 15112, -1, 15076, 
+  -1, 20882, -1, 20885, -1, 26368, -1, 26268, 
+  -1, 32941, -1, 17369, -1, 26401, -1, 26462, 
+  -1, 26451, -1, 144323, -1, 15177, -1, 26618, 
+  -1, 26501, -1, 26706, -1, 144493, -1, 26766, 
+  -1, 26655, -1, 26900, -1, 26946, -1, 27043, 
+  -1, 27114, -1, 27304, -1, 145059, -1, 27355, 
+  -1, 15384, -1, 27425, -1, 145575, -1, 27476, 
+  -1, 15438, -1, 27506, -1, 27551, -1, 27579, 
+  -1, 146061, -1, 138507, -1, 146170, -1, 27726, 
+  -1, 146620, -1, 27839, -1, 27853, -1, 27751, 
+  -1, 27926, -1, 27966, -1, 28009, -1, 28024, 
+  -1, 28037, -1, 146718, -1, 27956, -1, 28207, 
+  -1, 28270, -1, 15667, -1, 28359, -1, 147153, 
+  -1, 28153, -1, 28526, -1, 147294, -1, 147342, 
+  -1, 28614, -1, 28729, -1, 28699, -1, 15766, 
+  -1, 28746, -1, 28797, -1, 28791, -1, 28845, 
+  -1, 132389, -1, 28997, -1, 148067, -1, 29084, 
+  -1, 148395, -1, 29224, -1, 29264, -1, 149000, 
+  -1, 29312, -1, 29333, -1, 149301, -1, 149524, 
+  -1, 29562, -1, 29579, -1, 16044, -1, 29605, 
+  -1, 16056, -1, 29767, -1, 29788, -1, 29829, 
+  -1, 29898, -1, 16155, -1, 29988, -1, 150582, 
+  -1, 30014, -1, 150674, -1, 139679, -1, 30224, 
+  -1, 151457, -1, 151480, -1, 151620, -1, 16380, 
+  -1, 16392, -1, 151795, -1, 151794, -1, 151833, 
+  -1, 151859, -1, 30494, -1, 30495, -1, 30603, 
+  -1, 16454, -1, 16534, -1, 152605, -1, 30798, 
+  -1, 16611, -1, 153126, -1, 153242, -1, 153285, 
+  -1, 31211, -1, 16687, -1, 31306, -1, 31311, 
+  -1, 153980, -1, 154279, -1, 31470, -1, 16898, 
+  -1, 154539, -1, 31686, -1, 31689, -1, 16935, 
+  -1, 154752, -1, 31954, -1, 17056, -1, 31976, 
+  -1, 31971, -1, 32000, -1, 155526, -1, 32099, 
+  -1, 17153, -1, 32199, -1, 32258, -1, 32325, 
+  -1, 17204, -1, 156200, -1, 156231, -1, 17241, 
+  -1, 156377, -1, 32634, -1, 156478, -1, 32661, 
+  -1, 32762, -1, 156890, -1, 156963, -1, 32864, 
+  -1, 157096, -1, 32880, -1, 144223, -1, 17365, 
+  -1, 32946, -1, 33027, -1, 17419, -1, 33086, 
+  -1, 23221, -1, 157607, -1, 157621, -1, 144275, 
+  -1, 144284, -1, 33284, -1, 36766, -1, 17515, 
+  -1, 33425, -1, 33419, -1, 33437, -1, 21171, 
+  -1, 33457, -1, 33459, -1, 33469, -1, 33510, 
+  -1, 158524, -1, 33565, -1, 33635, -1, 33709, 
+  -1, 33571, -1, 33725, -1, 33767, -1, 33619, 
+  -1, 33738, -1, 33740, -1, 33756, -1, 158774, 
+  -1, 159083, -1, 158933, -1, 17707, -1, 34033, 
+  -1, 34035, -1, 34070, -1, 160714, -1, 34148, 
+  -1, 159532, -1, 17757, -1, 17761, -1, 159665, 
+  -1, 159954, -1, 17771, -1, 34384, -1, 34407, 
+  -1, 34409, -1, 34473, -1, 34440, -1, 34574, 
+  -1, 34530, -1, 34600, -1, 34667, -1, 34694, 
+  -1, 17879, -1, 34785, -1, 34817, -1, 17913, 
+  -1, 34912, -1, 161383, -1, 35031, -1, 35038, 
+  -1, 17973, -1, 35066, -1, 13499, -1, 161966, 
+  -1, 162150, -1, 18110, -1, 18119, -1, 35488, 
+  -1, 162984, -1, 36011, -1, 36033, -1, 36123, 
+  -1, 36215, -1, 163631, -1, 133124, -1, 36299, 
+  -1, 36284, -1, 36336, -1, 133342, -1, 36564, 
+  -1, 165330, -1, 165357, -1, 37012, -1, 37105, 
+  -1, 37137, -1, 165678, -1, 37147, -1, 37432, 
+  -1, 37591, -1, 37592, -1, 37500, -1, 37881, 
+  -1, 37909, -1, 166906, -1, 38283, -1, 18837, 
+  -1, 38327, -1, 167287, -1, 18918, -1, 38595, 
+  -1, 23986, -1, 38691, -1, 168261, -1, 168474, 
+  -1, 19054, -1, 19062, -1, 38880, -1, 168970, 
+  -1, 19122, -1, 169110, -1, 38953, -1, 169398, 
+  -1, 39138, -1, 19251, -1, 39209, -1, 39335, 
+  -1, 39362, -1, 39422, -1, 19406, -1, 170800, 
+  -1, 40000, -1, 40189, -1, 19662, -1, 19693, 
+  -1, 40295, -1, 172238, -1, 19704, -1, 172293, 
+  -1, 172558, -1, 172689, -1, 19798, -1, 40702, 
+  -1, 40709, -1, 40719, -1, 40726, -1, 173568, 
+  -1, };
+
+const uint16_t utf8proc_stage1table[] = {
+  0, 256, 512, 768, 1024, 1280, 1536, 
+  1792, 2048, 2304, 2560, 2816, 3072, 3328, 3584, 
+  3840, 4096, 4352, 4608, 4864, 5120, 5376, 5632, 
+  5888, 6144, 6400, 6656, 6912, 2048, 7168, 7424, 
+  7680, 7936, 8192, 8448, 8704, 8960, 9216, 9472, 
+  9728, 9984, 10240, 10496, 10752, 11008, 11264, 11520, 
+  11776, 12032, 12288, 12544, 12800, 5376, 5376, 5376, 
+  5376, 5376, 5376, 5376, 5376, 5376, 5376, 5376, 
+  5376, 5376, 5376, 5376, 5376, 5376, 5376, 5376, 
+  5376, 5376, 5376, 5376, 5376, 5376, 13056, 5376, 
+  5376, 5376, 5376, 5376, 5376, 5376, 5376, 5376, 
+  5376, 5376, 5376, 5376, 5376, 5376, 5376, 5376, 
+  5376, 5376, 5376, 5376, 5376, 5376, 5376, 5376, 
+  5376, 5376, 5376, 5376, 5376, 5376, 5376, 5376, 
+  5376, 5376, 5376, 5376, 5376, 5376, 5376, 5376, 
+  5376, 5376, 5376, 5376, 5376, 5376, 5376, 5376, 
+  5376, 5376, 5376, 5376, 5376, 5376, 5376, 5376, 
+  5376, 5376, 5376, 5376, 5376, 5376, 5376, 5376, 
+  5376, 5376, 5376, 5376, 5376, 5376, 5376, 5376, 
+  5376, 5376, 5376, 5376, 5376, 5376, 5376, 5376, 
+  13312, 13568, 5376, 5376, 5376, 13824, 2048, 2048, 
+  14080, 14336, 2048, 2048, 2048, 5376, 5376, 5376, 
+  5376, 5376, 5376, 5376, 5376, 5376, 5376, 5376, 
+  5376, 5376, 5376, 5376, 5376, 5376, 5376, 5376, 
+  5376, 5376, 5376, 5376, 5376, 5376, 5376, 5376, 
+  5376, 5376, 5376, 5376, 5376, 5376, 5376, 5376, 
+  5376, 5376, 5376, 5376, 5376, 5376, 5376, 5376, 
+  14592, 14848, 14848, 14848, 14848, 14848, 14848, 14848, 
+  14848, 15104, 15104, 15104, 15104, 15104, 15104, 15104, 
+  15104, 15104, 15104, 15104, 15104, 15104, 15104, 15104, 
+  15104, 15104, 15104, 15104, 15104, 15104, 15104, 15104, 
+  15104, 15104, 15360, 15616, 15872, 16128, 16384, 16640, 
+  16896, 17152, 17408, 2048, 17664, 17920, 2048, 2048, 
+  2048, 18176, 18432, 18688, 2048, 2048, 2048, 2048, 
+  2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 
+  2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 
+  2048, 5376, 5376, 5376, 18944, 19200, 2048, 2048, 
+  2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 
+  2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 
+  2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 
+  2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 
+  2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 
+  2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 
+  2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 
+  2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 
+  2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 
+  2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 
+  2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 
+  2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 
+  2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 
+  2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 
+  2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 
+  2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 
+  2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 
+  2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 
+  2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 
+  2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 
+  2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 
+  2048, 19456, 19712, 19968, 20224, 20480, 20736, 20992, 
+  21248, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 
+  2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 
+  2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 
+  2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 
+  2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 
+  2048, 5376, 5376, 5376, 5376, 5376, 5376, 5376, 
+  5376, 5376, 5376, 5376, 5376, 5376, 5376, 5376, 
+  5376, 5376, 5376, 5376, 5376, 5376, 5376, 5376, 
+  5376, 5376, 5376, 5376, 5376, 5376, 5376, 5376, 
+  5376, 5376, 5376, 5376, 5376, 5376, 5376, 5376, 
+  5376, 5376, 5376, 5376, 5376, 5376, 5376, 5376, 
+  5376, 5376, 5376, 5376, 5376, 5376, 5376, 5376, 
+  5376, 5376, 5376, 5376, 5376, 5376, 5376, 5376, 
+  5376, 5376, 5376, 5376, 5376, 5376, 5376, 5376, 
+  5376, 5376, 5376, 5376, 5376, 5376, 5376, 5376, 
+  5376, 5376, 5376, 5376, 5376, 5376, 5376, 5376, 
+  5376, 5376, 5376, 5376, 5376, 5376, 5376, 5376, 
+  5376, 5376, 5376, 5376, 5376, 5376, 5376, 5376, 
+  5376, 5376, 5376, 5376, 5376, 5376, 5376, 5376, 
+  5376, 5376, 5376, 5376, 5376, 5376, 5376, 5376, 
+  5376, 5376, 5376, 5376, 5376, 5376, 5376, 5376, 
+  5376, 5376, 5376, 5376, 5376, 5376, 5376, 5376, 
+  5376, 5376, 5376, 5376, 5376, 5376, 5376, 5376, 
+  5376, 5376, 5376, 5376, 5376, 5376, 5376, 5376, 
+  5376, 5376, 5376, 5376, 5376, 5376, 5376, 5376, 
+  5376, 5376, 5376, 5376, 5376, 5376, 5376, 21504, 
+  2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 
+  2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 
+  2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 
+  2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 
+  2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 
+  2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 
+  2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 
+  2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 
+  2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 
+  2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 
+  2048, 21760, 22016, 22272, 2048, 2048, 2048, 2048, 
+  2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 
+  2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 
+  2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 
+  2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 
+  2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 
+  2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 
+  2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 
+  2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 
+  2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 
+  2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 
+  2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 
+  2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 
+  2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 
+  2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 
+  2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 
+  2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 
+  2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 
+  2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 
+  2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 
+  2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 
+  2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 
+  2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 
+  2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 
+  2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 
+  2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 
+  2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 
+  2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 
+  2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 
+  2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 
+  2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 
+  2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 
+  2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 
+  2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 
+  2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 
+  2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 
+  2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 
+  2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 
+  2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 
+  2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 
+  2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 
+  2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 
+  2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 
+  2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 
+  2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 
+  2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 
+  2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 
+  2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 
+  2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 
+  2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 
+  2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 
+  2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 
+  2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 
+  2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 
+  2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 
+  2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 
+  2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 
+  2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 
+  2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 
+  2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 
+  2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 
+  2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 
+  2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 
+  2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 
+  2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 
+  2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 
+  2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 
+  2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 
+  2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 
+  2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 
+  2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 
+  2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 
+  2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 
+  2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 
+  2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 
+  2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 
+  2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 
+  2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 
+  2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 
+  2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 
+  2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 
+  2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 
+  2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 
+  2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 
+  2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 
+  2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 
+  2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 
+  2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 
+  2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 
+  2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 
+  2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 
+  2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 
+  2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 
+  2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 
+  2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 
+  2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 
+  2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 
+  2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 
+  2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 
+  2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 
+  2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 
+  2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 
+  2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 
+  2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 
+  2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 
+  2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 
+  2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 
+  2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 
+  2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 
+  2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 
+  2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 
+  2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 
+  2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 
+  2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 
+  2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 
+  2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 
+  2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 
+  2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 
+  2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 
+  2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 
+  2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 
+  2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 
+  2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 
+  2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 
+  2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 
+  2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 
+  2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 
+  2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 
+  2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 
+  2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 
+  2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 
+  2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 
+  2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 
+  2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 
+  2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 
+  2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 
+  2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 
+  2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 
+  2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 
+  2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 
+  2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 
+  2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 
+  2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 
+  2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 
+  2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 
+  2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 
+  2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 
+  2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 
+  2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 
+  2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 
+  2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 
+  2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 
+  2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 
+  2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 
+  2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 
+  2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 
+  2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 
+  2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 
+  2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 
+  2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 
+  2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 
+  2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 
+  2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 
+  2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 
+  2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 
+  2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 
+  2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 
+  2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 
+  2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 
+  2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 
+  2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 
+  2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 
+  2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 
+  2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 
+  2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 
+  2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 
+  2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 
+  2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 
+  2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 
+  2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 
+  2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 
+  2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 
+  2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 
+  2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 
+  2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 
+  2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 
+  2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 
+  2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 
+  2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 
+  2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 
+  2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 
+  2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 
+  2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 
+  2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 
+  2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 
+  2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 
+  2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 
+  2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 
+  2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 
+  2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 
+  2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 
+  2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 
+  2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 
+  2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 
+  2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 
+  2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 
+  2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 
+  2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 
+  2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 
+  2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 
+  2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 
+  2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 
+  2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 
+  2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 
+  2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 
+  2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 
+  2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 
+  2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 
+  2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 
+  2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 
+  2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 
+  2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 
+  2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 
+  2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 
+  2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 
+  2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 
+  2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 
+  2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 
+  2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 
+  2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 
+  2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 
+  2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 
+  2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 
+  2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 
+  2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 
+  2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 
+  2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 
+  2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 
+  2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 
+  2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 
+  2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 
+  2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 
+  2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 
+  2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 
+  2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 
+  2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 
+  2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 
+  2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 
+  2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 
+  2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 
+  2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 
+  2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 
+  2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 
+  2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 
+  2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 
+  2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 
+  2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 
+  2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 
+  2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 
+  2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 
+  2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 
+  2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 
+  2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 
+  2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 
+  2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 
+  2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 
+  2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 
+  2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 
+  2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 
+  2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 
+  2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 
+  2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 
+  2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 
+  2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 
+  2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 
+  2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 
+  2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 
+  2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 
+  2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 
+  2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 
+  2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 
+  2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 
+  2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 
+  2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 
+  2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 
+  2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 
+  2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 
+  2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 
+  2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 
+  2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 
+  2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 
+  2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 
+  2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 
+  2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 
+  2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 
+  2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 
+  2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 
+  2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 
+  2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 
+  2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 
+  2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 
+  2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 
+  2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 
+  2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 
+  2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 
+  2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 
+  2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 
+  2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 
+  2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 
+  2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 
+  2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 
+  2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 
+  2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 
+  2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 
+  2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 
+  2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 
+  2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 
+  2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 
+  2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 
+  2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 
+  2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 
+  2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 
+  2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 
+  2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 
+  2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 
+  2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 
+  2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 
+  2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 
+  2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 
+  2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 
+  2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 
+  2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 
+  2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 
+  2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 
+  2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 
+  2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 
+  2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 
+  2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 
+  2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 
+  2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 
+  2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 
+  2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 
+  2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 
+  2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 
+  2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 
+  2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 
+  2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 
+  2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 
+  2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 
+  2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 
+  2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 
+  2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 
+  2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 
+  2048, 22528, 22784, 2048, 2048, 2048, 2048, 2048, 
+  2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 
+  2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 
+  2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 
+  2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 
+  2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 
+  2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 
+  2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 
+  2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 
+  2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 
+  2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 
+  2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 
+  2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 
+  2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 
+  2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 
+  2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 
+  2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 
+  2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 
+  2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 
+  2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 
+  2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 
+  2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 
+  2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 
+  2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 
+  2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 
+  2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 
+  2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 
+  2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 
+  2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 
+  2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 
+  2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 
+  2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 
+  2048, 15104, 15104, 15104, 15104, 15104, 15104, 15104, 
+  15104, 15104, 15104, 15104, 15104, 15104, 15104, 15104, 
+  15104, 15104, 15104, 15104, 15104, 15104, 15104, 15104, 
+  15104, 15104, 15104, 15104, 15104, 15104, 15104, 15104, 
+  15104, 15104, 15104, 15104, 15104, 15104, 15104, 15104, 
+  15104, 15104, 15104, 15104, 15104, 15104, 15104, 15104, 
+  15104, 15104, 15104, 15104, 15104, 15104, 15104, 15104, 
+  15104, 15104, 15104, 15104, 15104, 15104, 15104, 15104, 
+  15104, 15104, 15104, 15104, 15104, 15104, 15104, 15104, 
+  15104, 15104, 15104, 15104, 15104, 15104, 15104, 15104, 
+  15104, 15104, 15104, 15104, 15104, 15104, 15104, 15104, 
+  15104, 15104, 15104, 15104, 15104, 15104, 15104, 15104, 
+  15104, 15104, 15104, 15104, 15104, 15104, 15104, 15104, 
+  15104, 15104, 15104, 15104, 15104, 15104, 15104, 15104, 
+  15104, 15104, 15104, 15104, 15104, 15104, 15104, 15104, 
+  15104, 15104, 15104, 15104, 15104, 15104, 15104, 15104, 
+  15104, 15104, 15104, 15104, 15104, 15104, 15104, 15104, 
+  15104, 15104, 15104, 15104, 15104, 15104, 15104, 15104, 
+  15104, 15104, 15104, 15104, 15104, 15104, 15104, 15104, 
+  15104, 15104, 15104, 15104, 15104, 15104, 15104, 15104, 
+  15104, 15104, 15104, 15104, 15104, 15104, 15104, 15104, 
+  15104, 15104, 15104, 15104, 15104, 15104, 15104, 15104, 
+  15104, 15104, 15104, 15104, 15104, 15104, 15104, 15104, 
+  15104, 15104, 15104, 15104, 15104, 15104, 15104, 15104, 
+  15104, 15104, 15104, 15104, 15104, 15104, 15104, 15104, 
+  15104, 15104, 15104, 15104, 15104, 15104, 15104, 15104, 
+  15104, 15104, 15104, 15104, 15104, 15104, 15104, 15104, 
+  15104, 15104, 15104, 15104, 15104, 15104, 15104, 15104, 
+  15104, 15104, 15104, 15104, 15104, 15104, 15104, 15104, 
+  15104, 15104, 15104, 15104, 15104, 15104, 15104, 15104, 
+  15104, 15104, 15104, 15104, 15104, 15104, 15104, 15104, 
+  15104, 15104, 15104, 15104, 15104, 15104, 15104, 15104, 
+  23040, 15104, 15104, 15104, 15104, 15104, 15104, 15104, 
+  15104, 15104, 15104, 15104, 15104, 15104, 15104, 15104, 
+  15104, 15104, 15104, 15104, 15104, 15104, 15104, 15104, 
+  15104, 15104, 15104, 15104, 15104, 15104, 15104, 15104, 
+  15104, 15104, 15104, 15104, 15104, 15104, 15104, 15104, 
+  15104, 15104, 15104, 15104, 15104, 15104, 15104, 15104, 
+  15104, 15104, 15104, 15104, 15104, 15104, 15104, 15104, 
+  15104, 15104, 15104, 15104, 15104, 15104, 15104, 15104, 
+  15104, 15104, 15104, 15104, 15104, 15104, 15104, 15104, 
+  15104, 15104, 15104, 15104, 15104, 15104, 15104, 15104, 
+  15104, 15104, 15104, 15104, 15104, 15104, 15104, 15104, 
+  15104, 15104, 15104, 15104, 15104, 15104, 15104, 15104, 
+  15104, 15104, 15104, 15104, 15104, 15104, 15104, 15104, 
+  15104, 15104, 15104, 15104, 15104, 15104, 15104, 15104, 
+  15104, 15104, 15104, 15104, 15104, 15104, 15104, 15104, 
+  15104, 15104, 15104, 15104, 15104, 15104, 15104, 15104, 
+  15104, 15104, 15104, 15104, 15104, 15104, 15104, 15104, 
+  15104, 15104, 15104, 15104, 15104, 15104, 15104, 15104, 
+  15104, 15104, 15104, 15104, 15104, 15104, 15104, 15104, 
+  15104, 15104, 15104, 15104, 15104, 15104, 15104, 15104, 
+  15104, 15104, 15104, 15104, 15104, 15104, 15104, 15104, 
+  15104, 15104, 15104, 15104, 15104, 15104, 15104, 15104, 
+  15104, 15104, 15104, 15104, 15104, 15104, 15104, 15104, 
+  15104, 15104, 15104, 15104, 15104, 15104, 15104, 15104, 
+  15104, 15104, 15104, 15104, 15104, 15104, 15104, 15104, 
+  15104, 15104, 15104, 15104, 15104, 15104, 15104, 15104, 
+  15104, 15104, 15104, 15104, 15104, 15104, 15104, 15104, 
+  15104, 15104, 15104, 15104, 15104, 15104, 15104, 15104, 
+  15104, 15104, 15104, 15104, 15104, 15104, 15104, 15104, 
+  15104, 15104, 15104, 15104, 15104, 15104, 15104, 15104, 
+  15104, 15104, 15104, 15104, 15104, 15104, 15104, 15104, 
+  15104, 15104, 15104, 15104, 15104, 15104, 15104, 15104, 
+  23040, };
+
+const uint16_t utf8proc_stage2table[] = {
+  1, 1, 1, 1, 1, 1, 1, 
+  1, 1, 2, 3, 2, 4, 3, 1, 
+  1, 1, 1, 1, 1, 1, 1, 1, 
+  1, 1, 1, 1, 1, 5, 5, 5, 
+  6, 7, 8, 8, 9, 10, 9, 8, 
+  8, 11, 12, 8, 13, 14, 15, 14, 
+  14, 16, 16, 16, 16, 16, 16, 16, 
+  16, 16, 16, 14, 8, 17, 18, 19, 
+  8, 8, 20, 21, 22, 23, 24, 25, 
+  26, 27, 28, 29, 30, 31, 32, 33, 
+  34, 35, 36, 37, 38, 39, 40, 41, 
+  42, 43, 44, 45, 11, 8, 12, 46, 
+  47, 46, 48, 49, 50, 51, 52, 53, 
+  54, 55, 56, 57, 58, 59, 60, 61, 
+  62, 63, 64, 65, 66, 67, 68, 69, 
+  70, 71, 72, 73, 11, 74, 12, 74, 
+  1, 1, 1, 1, 1, 1, 3, 1, 
+  1, 1, 1, 1, 1, 1, 1, 1, 
+  1, 1, 1, 1, 1, 1, 1, 1, 
+  1, 1, 1, 1, 1, 1, 1, 1, 
+  1, 75, 8, 10, 10, 10, 10, 76, 
+  76, 77, 76, 78, 79, 74, 80, 76, 
+  81, 82, 83, 84, 85, 86, 87, 76, 
+  8, 88, 89, 90, 91, 92, 93, 94, 
+  8, 95, 96, 97, 98, 99, 100, 101, 
+  102, 103, 104, 105, 106, 107, 108, 109, 
+  110, 111, 112, 113, 114, 115, 116, 117, 
+  74, 118, 119, 120, 121, 122, 123, 124, 
+  125, 126, 127, 128, 129, 130, 131, 132, 
+  133, 134, 135, 136, 137, 138, 139, 140, 
+  141, 142, 143, 144, 145, 146, 147, 148, 
+  74, 149, 150, 151, 152, 153, 154, 155, 
+  156, 157, 158, 159, 160, 161, 162, 163, 
+  164, 165, 166, 167, 168, 169, 170, 171, 
+  172, 173, 174, 175, 176, 177, 178, 179, 
+  180, 181, 182, 183, 184, 185, 186, 187, 
+  188, 189, 190, 191, 192, 193, 194, 195, 
+  196, 197, 198, 199, 200, 201, 202, 203, 
+  204, 205, 206, 207, 208, 209, 210, 211, 
+  212, 213, 214, 215, 216, 217, 218, 219, 
+  220, 221, 222, 223, 224, 225, 226, 227, 
+  228, 229, 230, 231, 232, 233, 234, 235, 
+  236, 237, 238, 239, 240, 241, 242, 243, 
+  244, 245, 246, 247, 248, 249, 250, 251, 
+  252, 253, 254, 255, 256, 257, 258, 259, 
+  260, 261, 262, 263, 264, 265, 266, 267, 
+  268, 269, 270, 271, 272, 273, 274, 275, 
+  276, 277, 278, 279, 280, 281, 282, 283, 
+  284, 285, 286, 287, 288, 289, 290, 291, 
+  292, 293, 294, 295, 296, 297, 213, 298, 
+  299, 300, 301, 302, 303, 304, 305, 306, 
+  307, 308, 309, 310, 213, 311, 312, 313, 
+  314, 315, 316, 317, 318, 319, 320, 321, 
+  322, 323, 324, 213, 213, 325, 326, 327, 
+  328, 329, 330, 331, 332, 333, 334, 335, 
+  336, 337, 338, 213, 339, 340, 341, 213, 
+  342, 339, 339, 339, 339, 343, 344, 345, 
+  346, 347, 348, 349, 350, 351, 352, 353, 
+  354, 355, 356, 357, 358, 359, 360, 361, 
+  362, 363, 364, 365, 366, 367, 368, 369, 
+  370, 371, 372, 373, 374, 375, 376, 377, 
+  378, 379, 380, 381, 382, 383, 384, 385, 
+  386, 387, 388, 389, 390, 391, 392, 393, 
+  394, 395, 396, 397, 398, 399, 400, 401, 
+  402, 403, 404, 405, 406, 407, 408, 409, 
+  410, 411, 412, 413, 414, 415, 416, 417, 
+  418, 419, 420, 421, 422, 423, 424, 425, 
+  426, 427, 428, 429, 430, 431, 432, 433, 
+  434, 435, 213, 436, 437, 438, 439, 440, 
+  441, 442, 443, 444, 445, 446, 447, 448, 
+  449, 450, 451, 452, 453, 213, 213, 213, 
+  213, 213, 213, 454, 455, 456, 457, 458, 
+  213, 213, 459, 460, 461, 462, 463, 464, 
+  465, 466, 467, 468, 469, 470, 471, 472, 
+  473, 213, 213, 213, 474, 475, 213, 476, 
+  477, 213, 478, 213, 479, 213, 213, 213, 
+  213, 480, 213, 213, 481, 213, 213, 213, 
+  213, 482, 483, 213, 484, 213, 213, 213, 
+  485, 213, 213, 486, 213, 213, 487, 213, 
+  213, 213, 213, 213, 213, 213, 488, 213, 
+  213, 489, 213, 213, 490, 213, 213, 213, 
+  213, 491, 492, 493, 494, 495, 213, 213, 
+  213, 213, 213, 496, 213, 339, 213, 213, 
+  213, 213, 213, 213, 213, 213, 213, 213, 
+  213, 213, 213, 213, 213, 213, 213, 213, 
+  213, 213, 213, 213, 213, 213, 213, 213, 
+  213, 497, 498, 499, 500, 501, 502, 503, 
+  504, 505, 506, 506, 507, 507, 507, 507, 
+  507, 507, 507, 46, 46, 46, 46, 506, 
+  506, 506, 506, 506, 506, 506, 506, 506, 
+  506, 507, 507, 46, 46, 46, 46, 46, 
+  46, 508, 509, 510, 511, 512, 513, 46, 
+  46, 514, 515, 516, 517, 518, 46, 46, 
+  46, 46, 46, 46, 46, 46, 46, 507, 
+  46, 46, 46, 46, 46, 46, 46, 46, 
+  46, 46, 46, 46, 46, 46, 46, 46, 
+  46, 519, 520, 521, 522, 523, 524, 525, 
+  526, 527, 528, 529, 530, 531, 524, 524, 
+  532, 524, 533, 524, 534, 535, 536, 537, 
+  537, 537, 537, 536, 538, 537, 537, 537, 
+  537, 537, 539, 539, 540, 541, 542, 543, 
+  544, 545, 537, 537, 537, 537, 546, 547, 
+  537, 548, 549, 537, 537, 550, 550, 550, 
+  550, 551, 537, 537, 537, 537, 524, 524, 
+  524, 552, 553, 554, 555, 556, 557, 524, 
+  537, 537, 537, 524, 524, 524, 537, 537, 
+  558, 524, 524, 524, 537, 537, 537, 537, 
+  524, 536, 537, 537, 524, 559, 560, 560, 
+  559, 560, 560, 559, 524, 524, 524, 524, 
+  524, 524, 524, 524, 524, 524, 524, 524, 
+  524, 0, 0, 0, 0, 561, 46, 0, 
+  0, 0, 0, 562, 563, 564, 565, 566, 
+  0, 0, 0, 0, 0, 86, 567, 568, 
+  569, 570, 571, 572, 0, 573, 0, 574, 
+  575, 576, 577, 578, 579, 580, 581, 582, 
+  583, 584, 585, 586, 587, 588, 589, 590, 
+  591, 592, 593, 0, 594, 595, 596, 597, 
+  598, 599, 600, 601, 602, 603, 604, 605, 
+  606, 607, 608, 609, 610, 611, 612, 613, 
+  614, 615, 616, 617, 618, 619, 620, 621, 
+  622, 623, 624, 625, 626, 627, 628, 629, 
+  630, 631, 632, 633, 634, 635, 636, 637, 
+  0, 638, 639, 640, 641, 642, 643, 644, 
+  213, 645, 646, 647, 648, 649, 650, 651, 
+  652, 653, 654, 655, 656, 657, 658, 659, 
+  660, 661, 662, 663, 664, 665, 666, 667, 
+  668, 669, 670, 671, 213, 672, 673, 74, 
+  674, 675, 676, 677, 678, 213, 679, 680, 
+  681, 682, 683, 684, 685, 686, 687, 688, 
+  689, 690, 691, 692, 693, 694, 695, 696, 
+  697, 698, 699, 700, 701, 702, 703, 704, 
+  705, 706, 707, 708, 709, 710, 711, 712, 
+  713, 714, 715, 716, 717, 718, 719, 720, 
+  721, 722, 723, 724, 725, 726, 727, 728, 
+  729, 730, 731, 732, 733, 734, 735, 736, 
+  737, 738, 739, 740, 741, 742, 743, 744, 
+  745, 746, 747, 748, 749, 750, 751, 752, 
+  753, 754, 755, 756, 757, 758, 759, 760, 
+  761, 762, 763, 764, 765, 766, 767, 768, 
+  769, 770, 771, 772, 773, 774, 775, 776, 
+  777, 778, 779, 780, 781, 782, 783, 784, 
+  785, 786, 787, 788, 789, 790, 791, 792, 
+  793, 794, 795, 796, 797, 798, 799, 800, 
+  801, 802, 803, 804, 805, 806, 807, 808, 
+  809, 810, 811, 812, 524, 524, 524, 524, 
+  0, 813, 813, 814, 815, 816, 817, 818, 
+  819, 820, 821, 822, 823, 824, 825, 826, 
+  827, 828, 829, 830, 831, 832, 833, 834, 
+  835, 836, 837, 838, 839, 840, 841, 842, 
+  843, 844, 845, 846, 847, 848, 849, 850, 
+  851, 852, 853, 854, 855, 856, 857, 858, 
+  859, 860, 861, 862, 863, 864, 865, 866, 
+  867, 868, 869, 870, 871, 872, 873, 874, 
+  875, 876, 877, 878, 879, 880, 881, 882, 
+  883, 884, 885, 886, 887, 888, 889, 890, 
+  891, 892, 893, 894, 895, 896, 897, 898, 
+  899, 900, 901, 902, 903, 904, 905, 906, 
+  907, 908, 909, 910, 911, 912, 913, 914, 
+  915, 916, 917, 918, 919, 920, 921, 922, 
+  923, 924, 925, 926, 927, 928, 929, 930, 
+  931, 932, 933, 934, 935, 936, 937, 938, 
+  939, 940, 941, 942, 943, 944, 945, 946, 
+  947, 948, 949, 950, 951, 0, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 0, 952, 953, 954, 955, 956, 957, 
+  958, 959, 960, 961, 962, 963, 964, 965, 
+  966, 967, 968, 969, 970, 971, 972, 973, 
+  974, 975, 976, 977, 978, 979, 980, 981, 
+  982, 983, 984, 985, 986, 987, 988, 989, 
+  0, 0, 507, 990, 990, 990, 990, 990, 
+  990, 0, 991, 992, 993, 994, 995, 996, 
+  997, 998, 999, 1000, 1001, 1002, 1003, 1004, 
+  1005, 1006, 1007, 1008, 1009, 1010, 1011, 1012, 
+  1013, 1014, 1015, 1016, 1017, 1018, 1019, 1020, 
+  1021, 1022, 1023, 1024, 1025, 1026, 1027, 1028, 
+  1029, 0, 990, 1030, 0, 0, 0, 0, 
+  0, 0, 537, 524, 524, 524, 524, 537, 
+  524, 524, 524, 1031, 537, 524, 524, 524, 
+  524, 524, 524, 537, 537, 537, 537, 537, 
+  537, 524, 524, 537, 524, 524, 1031, 1032, 
+  524, 1033, 1034, 1035, 1036, 1037, 1038, 1039, 
+  1040, 1041, 1042, 1042, 1043, 1044, 1045, 1046, 
+  1047, 1046, 1048, 1049, 1046, 524, 537, 1046, 
+  1041, 0, 0, 0, 0, 0, 0, 0, 
+  0, 1050, 1050, 1050, 1050, 1050, 1050, 1050, 
+  1050, 1050, 1050, 1050, 1050, 1050, 1050, 1050, 
+  1050, 1050, 1050, 1050, 1050, 1050, 1050, 1050, 
+  1050, 1050, 1050, 1050, 0, 0, 0, 0, 
+  0, 1050, 1050, 1050, 1046, 1046, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 1051, 1051, 1051, 1051, 0, 0, 0, 
+  0, 0, 0, 0, 1052, 14, 1053, 76, 
+  76, 524, 524, 524, 524, 524, 524, 0, 
+  0, 0, 0, 0, 1053, 0, 0, 1053, 
+  1053, 0, 1054, 1055, 1056, 1057, 1058, 1059, 
+  1060, 1054, 1054, 1054, 1054, 1054, 1054, 1054, 
+  1054, 1054, 1054, 1054, 1054, 1054, 1054, 1054, 
+  1054, 1054, 1054, 1054, 0, 0, 0, 0, 
+  0, 1061, 1054, 1054, 1054, 1054, 1054, 1054, 
+  1054, 1062, 1054, 1063, 1064, 1065, 1066, 1067, 
+  1068, 1069, 1070, 1071, 1072, 1073, 1074, 537, 
+  524, 524, 524, 524, 524, 537, 524, 524, 
+  0, 1075, 1075, 1075, 1075, 1075, 1075, 1075, 
+  1075, 1075, 1075, 9, 1076, 1076, 1053, 1054, 
+  1054, 1077, 1054, 1054, 1054, 1054, 1078, 1079, 
+  1080, 1081, 1054, 1054, 1054, 1054, 1054, 1054, 
+  1054, 1054, 1054, 1054, 1054, 1054, 1054, 1054, 
+  1054, 1054, 1054, 1054, 1054, 1054, 1054, 1054, 
+  1054, 1054, 1054, 1054, 1054, 1054, 1054, 1054, 
+  1054, 1054, 1054, 1054, 1054, 1054, 1054, 1054, 
+  1054, 1054, 1054, 1054, 1054, 1054, 1054, 1054, 
+  1054, 1054, 1054, 1054, 1054, 1054, 1054, 1054, 
+  1054, 1054, 1054, 1054, 1054, 1054, 1054, 1054, 
+  1054, 1054, 1054, 1054, 1054, 1054, 1054, 1054, 
+  1054, 1082, 1083, 1084, 1054, 1054, 1054, 1054, 
+  1054, 1054, 1054, 1054, 1054, 1054, 1054, 1054, 
+  1054, 1054, 1054, 1085, 1086, 1053, 1087, 524, 
+  524, 524, 524, 524, 524, 524, 1051, 813, 
+  524, 524, 524, 524, 537, 524, 1061, 1061, 
+  524, 524, 76, 537, 524, 524, 537, 1054, 
+  1054, 16, 16, 16, 16, 16, 16, 16, 
+  16, 16, 16, 1054, 1054, 1054, 1088, 1088, 
+  1054, 1053, 1053, 1053, 1053, 1053, 1053, 1053, 
+  1053, 1053, 1053, 1053, 1053, 1053, 1053, 0, 
+  80, 1054, 1089, 1054, 1054, 1054, 1054, 1054, 
+  1054, 1054, 1054, 1054, 1054, 1054, 1054, 1054, 
+  1054, 1054, 1054, 1054, 1054, 1054, 1054, 1054, 
+  1054, 1054, 1054, 1054, 1054, 1054, 1054, 1054, 
+  1054, 524, 537, 524, 524, 537, 524, 524, 
+  537, 537, 537, 524, 537, 537, 524, 537, 
+  524, 524, 524, 537, 524, 537, 524, 537, 
+  524, 537, 524, 524, 0, 0, 1054, 1054, 
+  1054, 1054, 1054, 1054, 1054, 1054, 1054, 1054, 
+  1054, 1054, 1054, 1054, 1054, 1054, 1054, 1054, 
+  1054, 1054, 1054, 1054, 1054, 1054, 1054, 1054, 
+  1054, 1054, 1054, 1054, 1054, 1054, 1054, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 1054, 1054, 1054, 1054, 1054, 1054, 1054, 
+  1054, 1054, 1054, 1054, 1054, 1054, 1054, 1054, 
+  1054, 1054, 1054, 1054, 1054, 1054, 1054, 1054, 
+  1054, 1054, 1054, 1054, 1054, 1054, 1054, 1054, 
+  1054, 1054, 1054, 1054, 1054, 1054, 1054, 1090, 
+  1090, 1090, 1090, 1090, 1090, 1090, 1090, 1090, 
+  1090, 1090, 1054, 0, 0, 0, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 1091, 1091, 1091, 1091, 1091, 1091, 1091, 
+  1091, 1091, 1091, 1050, 1050, 1050, 1050, 1050, 
+  1050, 1050, 1050, 1050, 1050, 1050, 1050, 1050, 
+  1050, 1050, 1050, 1050, 1050, 1050, 1050, 1050, 
+  1050, 1050, 1050, 1050, 1050, 1050, 1050, 1050, 
+  1050, 1050, 1050, 1050, 524, 524, 524, 524, 
+  524, 524, 524, 537, 524, 1092, 1092, 76, 
+  8, 8, 8, 1092, 0, 0, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 0, 1090, 1090, 1093, 339, 339, 339, 
+  339, 339, 339, 339, 339, 339, 339, 339, 
+  339, 339, 339, 339, 339, 339, 339, 339, 
+  339, 339, 339, 339, 339, 339, 339, 339, 
+  339, 339, 339, 339, 339, 339, 339, 339, 
+  339, 1094, 1095, 339, 339, 339, 339, 339, 
+  339, 1096, 1097, 339, 1098, 1099, 339, 339, 
+  339, 339, 339, 0, 0, 1100, 339, 1093, 
+  1093, 1093, 1090, 1090, 1090, 1090, 1090, 1090, 
+  1090, 1090, 1093, 1093, 1093, 1093, 1101, 0, 
+  0, 339, 524, 537, 524, 524, 0, 0, 
+  0, 1102, 1103, 1104, 1105, 1106, 1107, 1108, 
+  1109, 339, 339, 1090, 1090, 990, 990, 1110, 
+  1110, 1110, 1110, 1110, 1110, 1110, 1110, 1110, 
+  1110, 990, 0, 0, 0, 0, 0, 0, 
+  0, 0, 0, 0, 339, 339, 339, 339, 
+  339, 0, 1090, 1093, 1093, 0, 339, 339, 
+  339, 339, 339, 339, 339, 339, 0, 0, 
+  339, 339, 0, 0, 339, 339, 339, 339, 
+  339, 339, 339, 339, 339, 339, 339, 339, 
+  339, 339, 339, 339, 339, 339, 339, 339, 
+  339, 339, 0, 339, 339, 339, 339, 339, 
+  339, 339, 0, 339, 0, 0, 0, 339, 
+  339, 339, 339, 0, 0, 1111, 339, 1112, 
+  1093, 1093, 1090, 1090, 1090, 1090, 0, 0, 
+  1113, 1093, 0, 0, 1114, 1115, 1101, 339, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  1116, 0, 0, 0, 0, 1117, 1118, 0, 
+  1119, 339, 339, 1090, 1090, 0, 0, 1110, 
+  1110, 1110, 1110, 1110, 1110, 1110, 1110, 1110, 
+  1110, 339, 339, 10, 10, 1120, 1120, 1120, 
+  1120, 1120, 1120, 812, 0, 0, 0, 0, 
+  0, 0, 1090, 1090, 1093, 0, 339, 339, 
+  339, 339, 339, 339, 0, 0, 0, 0, 
+  339, 339, 0, 0, 339, 339, 339, 339, 
+  339, 339, 339, 339, 339, 339, 339, 339, 
+  339, 339, 339, 339, 339, 339, 339, 339, 
+  339, 339, 0, 339, 339, 339, 339, 339, 
+  339, 339, 0, 339, 1121, 0, 339, 1122, 
+  0, 339, 339, 0, 0, 1111, 0, 1093, 
+  1093, 1093, 1090, 1090, 0, 0, 0, 0, 
+  1090, 1090, 0, 0, 1090, 1090, 1101, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 0, 1123, 1124, 1125, 339, 0, 1126, 
+  0, 0, 0, 0, 0, 0, 0, 1110, 
+  1110, 1110, 1110, 1110, 1110, 1110, 1110, 1110, 
+  1110, 1090, 1090, 339, 339, 339, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 0, 1090, 1090, 1093, 0, 339, 339, 
+  339, 339, 339, 339, 339, 339, 339, 0, 
+  339, 339, 339, 0, 339, 339, 339, 339, 
+  339, 339, 339, 339, 339, 339, 339, 339, 
+  339, 339, 339, 339, 339, 339, 339, 339, 
+  339, 339, 0, 339, 339, 339, 339, 339, 
+  339, 339, 0, 339, 339, 0, 339, 339, 
+  339, 339, 339, 0, 0, 1111, 339, 1093, 
+  1093, 1093, 1090, 1090, 1090, 1090, 1090, 0, 
+  1090, 1090, 1093, 0, 1093, 1093, 1101, 0, 
+  0, 339, 0, 0, 0, 0, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 339, 339, 1090, 1090, 0, 0, 1110, 
+  1110, 1110, 1110, 1110, 1110, 1110, 1110, 1110, 
+  1110, 0, 10, 0, 0, 0, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 0, 1090, 1093, 1093, 0, 339, 339, 
+  339, 339, 339, 339, 339, 339, 0, 0, 
+  339, 339, 0, 0, 339, 339, 339, 339, 
+  339, 339, 339, 339, 339, 339, 339, 339, 
+  339, 339, 339, 339, 339, 339, 339, 339, 
+  339, 339, 0, 339, 339, 339, 339, 339, 
+  339, 339, 0, 339, 339, 0, 339, 339, 
+  339, 339, 339, 0, 0, 1111, 339, 1127, 
+  1090, 1093, 1090, 1090, 1090, 0, 0, 0, 
+  1128, 1129, 0, 0, 1130, 1131, 1101, 0, 
+  0, 0, 0, 0, 0, 0, 0, 1132, 
+  1133, 0, 0, 0, 0, 1134, 1135, 0, 
+  339, 339, 339, 0, 0, 0, 0, 1110, 
+  1110, 1110, 1110, 1110, 1110, 1110, 1110, 1110, 
+  1110, 812, 339, 0, 0, 0, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 0, 0, 1090, 339, 0, 339, 339, 
+  339, 339, 339, 339, 0, 0, 0, 339, 
+  339, 339, 0, 1136, 339, 1137, 339, 0, 
+  0, 0, 339, 339, 0, 339, 0, 339, 
+  339, 0, 0, 0, 339, 339, 0, 0, 
+  0, 339, 339, 339, 0, 0, 0, 339, 
+  339, 339, 339, 339, 339, 339, 339, 339, 
+  339, 339, 339, 0, 0, 0, 0, 1138, 
+  1093, 1090, 1093, 1093, 0, 0, 0, 1139, 
+  1140, 1093, 0, 1141, 1142, 1143, 1101, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  1144, 0, 0, 0, 0, 0, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 1110, 
+  1110, 1110, 1110, 1110, 1110, 1110, 1110, 1110, 
+  1110, 1120, 1120, 1120, 76, 76, 76, 76, 
+  76, 76, 10, 76, 0, 0, 0, 0, 
+  0, 0, 1093, 1093, 1093, 0, 339, 339, 
+  339, 339, 339, 339, 339, 339, 0, 339, 
+  339, 339, 0, 339, 339, 339, 339, 339, 
+  339, 339, 339, 339, 339, 339, 339, 339, 
+  339, 339, 339, 339, 339, 339, 339, 339, 
+  339, 339, 0, 339, 339, 339, 339, 339, 
+  339, 339, 339, 339, 339, 0, 339, 339, 
+  339, 339, 339, 0, 0, 0, 0, 1090, 
+  1090, 1090, 1093, 1093, 1093, 1093, 0, 1145, 
+  1090, 1146, 0, 1090, 1090, 1090, 1101, 0, 
+  0, 0, 0, 0, 0, 0, 1147, 1148, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 339, 339, 0, 0, 0, 0, 1110, 
+  1110, 1110, 1110, 1110, 1110, 1110, 1110, 1110, 
+  1110, 0, 0, 0, 0, 0, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 0, 0, 1093, 1093, 0, 339, 339, 
+  339, 339, 339, 339, 339, 339, 0, 339, 
+  339, 339, 0, 339, 339, 339, 339, 339, 
+  339, 339, 339, 339, 339, 339, 339, 339, 
+  339, 339, 339, 339, 339, 339, 339, 339, 
+  339, 339, 0, 339, 339, 339, 339, 339, 
+  339, 339, 339, 339, 339, 0, 339, 339, 
+  339, 339, 339, 0, 0, 1111, 339, 1093, 
+  1149, 1150, 1093, 1151, 1093, 1093, 0, 1152, 
+  1153, 1154, 0, 1155, 1156, 1090, 1101, 0, 
+  0, 0, 0, 0, 0, 0, 1157, 1158, 
+  0, 0, 0, 0, 0, 0, 0, 339, 
+  0, 339, 339, 1090, 1090, 0, 0, 1110, 
+  1110, 1110, 1110, 1110, 1110, 1110, 1110, 1110, 
+  1110, 0, 76, 76, 0, 0, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 0, 0, 1093, 1093, 0, 339, 339, 
+  339, 339, 339, 339, 339, 339, 0, 339, 
+  339, 339, 0, 339, 339, 339, 339, 339, 
+  339, 339, 339, 339, 339, 339, 339, 339, 
+  339, 339, 339, 339, 339, 339, 339, 339, 
+  339, 339, 0, 339, 339, 339, 339, 339, 
+  339, 339, 339, 339, 339, 339, 339, 339, 
+  339, 339, 339, 0, 0, 0, 0, 1159, 
+  1093, 1093, 1090, 1090, 1090, 0, 0, 1160, 
+  1161, 1093, 0, 1162, 1163, 1164, 1101, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  1165, 0, 0, 0, 0, 0, 0, 0, 
+  0, 339, 339, 0, 0, 0, 0, 1110, 
+  1110, 1110, 1110, 1110, 1110, 1110, 1110, 1110, 
+  1110, 0, 0, 0, 0, 0, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 0, 0, 1093, 1093, 0, 339, 339, 
+  339, 339, 339, 339, 339, 339, 339, 339, 
+  339, 339, 339, 339, 339, 339, 339, 339, 
+  0, 0, 0, 339, 339, 339, 339, 339, 
+  339, 339, 339, 339, 339, 339, 339, 339, 
+  339, 339, 339, 339, 339, 339, 339, 339, 
+  339, 339, 339, 0, 339, 339, 339, 339, 
+  339, 339, 339, 339, 339, 0, 339, 0, 
+  0, 339, 339, 339, 339, 339, 339, 339, 
+  0, 0, 0, 1166, 0, 0, 0, 0, 
+  1167, 1093, 1093, 1090, 1090, 1090, 0, 1090, 
+  0, 1093, 1168, 1169, 1093, 1170, 1171, 1172, 
+  1173, 0, 0, 0, 0, 0, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 0, 0, 1093, 1093, 990, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 0, 339, 339, 339, 339, 339, 339, 
+  339, 339, 339, 339, 339, 339, 339, 339, 
+  339, 339, 339, 339, 339, 339, 339, 339, 
+  339, 339, 339, 339, 339, 339, 339, 339, 
+  339, 339, 339, 339, 339, 339, 339, 339, 
+  339, 339, 339, 339, 339, 339, 339, 339, 
+  339, 339, 1090, 339, 1174, 1090, 1090, 1090, 
+  1090, 1175, 1175, 1101, 0, 0, 0, 0, 
+  10, 339, 339, 339, 339, 339, 339, 507, 
+  1090, 1176, 1176, 1176, 1176, 1090, 1090, 1090, 
+  990, 1110, 1110, 1110, 1110, 1110, 1110, 1110, 
+  1110, 1110, 1110, 990, 990, 0, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 0, 339, 339, 0, 339, 0, 0, 
+  339, 339, 0, 339, 0, 0, 339, 0, 
+  0, 0, 0, 0, 0, 339, 339, 339, 
+  339, 0, 339, 339, 339, 339, 339, 339, 
+  339, 0, 339, 339, 339, 0, 339, 0, 
+  339, 0, 0, 339, 339, 0, 339, 339, 
+  339, 339, 1090, 339, 1177, 1090, 1090, 1090, 
+  1090, 1178, 1178, 0, 1090, 1090, 339, 0, 
+  0, 339, 339, 339, 339, 339, 0, 507, 
+  0, 1179, 1179, 1179, 1179, 1090, 1090, 0, 
+  0, 1110, 1110, 1110, 1110, 1110, 1110, 1110, 
+  1110, 1110, 1110, 0, 0, 1180, 1181, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 339, 812, 812, 812, 990, 990, 990, 
+  990, 990, 990, 990, 990, 1182, 990, 990, 
+  990, 990, 990, 990, 812, 812, 812, 812, 
+  812, 537, 537, 812, 812, 812, 812, 812, 
+  812, 1110, 1110, 1110, 1110, 1110, 1110, 1110, 
+  1110, 1110, 1110, 1120, 1120, 1120, 1120, 1120, 
+  1120, 1120, 1120, 1120, 1120, 812, 537, 812, 
+  537, 812, 1183, 11, 12, 11, 12, 1093, 
+  1093, 339, 339, 339, 1184, 339, 339, 339, 
+  339, 0, 339, 339, 339, 339, 1185, 339, 
+  339, 339, 339, 1186, 339, 339, 339, 339, 
+  1187, 339, 339, 339, 339, 1188, 339, 339, 
+  339, 339, 339, 339, 339, 339, 339, 339, 
+  339, 339, 1189, 339, 0, 0, 0, 0, 
+  0, 0, 1190, 1191, 1192, 1193, 1194, 1195, 
+  1196, 1197, 1198, 1191, 1191, 1191, 1191, 1090, 
+  1093, 1191, 1199, 524, 524, 1101, 990, 524, 
+  524, 339, 339, 339, 339, 0, 0, 0, 
+  0, 1090, 1090, 1090, 1200, 1090, 1090, 1090, 
+  1090, 0, 1090, 1090, 1090, 1090, 1201, 1090, 
+  1090, 1090, 1090, 1202, 1090, 1090, 1090, 1090, 
+  1203, 1090, 1090, 1090, 1090, 1204, 1090, 1090, 
+  1090, 1090, 1090, 1090, 1090, 1090, 1090, 1090, 
+  1090, 1090, 1205, 1090, 1090, 1090, 0, 812, 
+  812, 812, 812, 812, 812, 812, 812, 537, 
+  812, 812, 812, 812, 812, 812, 0, 0, 
+  812, 990, 990, 0, 0, 0, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 339, 339, 339, 339, 339, 339, 339, 
+  339, 339, 339, 339, 339, 339, 339, 339, 
+  339, 339, 339, 339, 339, 339, 339, 339, 
+  339, 339, 339, 339, 339, 339, 339, 339, 
+  339, 339, 339, 0, 339, 339, 1206, 1207, 
+  339, 0, 339, 339, 0, 1093, 1090, 1208, 
+  1090, 1090, 1093, 1090, 0, 0, 0, 1090, 
+  1111, 1093, 1101, 0, 0, 0, 0, 0, 
+  0, 1110, 1110, 1110, 1110, 1110, 1110, 1110, 
+  1110, 1110, 1110, 990, 990, 990, 990, 990, 
+  990, 339, 339, 339, 339, 339, 339, 1093, 
+  1093, 1090, 1090, 0, 0, 0, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 1209, 1210, 1211, 1212, 1213, 1214, 1215, 
+  1216, 1217, 1218, 1219, 1220, 1221, 1222, 1223, 
+  1224, 1225, 1226, 1227, 1228, 1229, 1230, 1231, 
+  1232, 1233, 1234, 1235, 1236, 1237, 1238, 1239, 
+  1240, 1241, 1242, 1243, 1244, 1245, 1246, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 339, 339, 339, 339, 339, 339, 339, 
+  339, 339, 339, 339, 339, 339, 339, 339, 
+  339, 339, 339, 339, 339, 339, 339, 339, 
+  339, 339, 339, 339, 339, 339, 339, 339, 
+  339, 339, 339, 339, 339, 339, 339, 339, 
+  339, 339, 339, 339, 990, 1247, 0, 0, 
+  0, 339, 339, 339, 339, 339, 339, 339, 
+  339, 339, 339, 339, 339, 339, 339, 339, 
+  339, 339, 339, 339, 339, 339, 339, 339, 
+  339, 339, 339, 339, 339, 339, 339, 339, 
+  339, 339, 339, 339, 339, 339, 339, 339, 
+  339, 339, 339, 339, 339, 339, 339, 339, 
+  339, 339, 339, 339, 339, 339, 339, 339, 
+  339, 339, 339, 339, 339, 339, 339, 339, 
+  339, 339, 339, 339, 339, 339, 339, 339, 
+  339, 339, 339, 339, 339, 339, 339, 339, 
+  339, 339, 339, 339, 339, 339, 339, 339, 
+  339, 339, 339, 0, 0, 0, 0, 0, 
+  1248, 1248, 339, 339, 339, 339, 339, 339, 
+  339, 339, 339, 339, 339, 339, 339, 339, 
+  339, 339, 339, 339, 339, 339, 339, 339, 
+  339, 339, 339, 339, 339, 339, 339, 339, 
+  339, 339, 339, 339, 339, 339, 339, 339, 
+  339, 339, 339, 339, 339, 339, 339, 339, 
+  339, 339, 339, 339, 339, 339, 339, 339, 
+  339, 339, 339, 339, 339, 339, 339, 339, 
+  339, 339, 339, 339, 0, 0, 0, 0, 
+  0, 339, 339, 339, 339, 339, 339, 339, 
+  339, 339, 339, 339, 339, 339, 339, 339, 
+  339, 339, 339, 339, 339, 339, 339, 339, 
+  339, 339, 339, 339, 339, 339, 339, 339, 
+  339, 339, 339, 339, 339, 339, 339, 339, 
+  339, 339, 339, 339, 339, 339, 339, 339, 
+  339, 339, 339, 339, 339, 339, 339, 339, 
+  339, 339, 339, 339, 339, 339, 339, 339, 
+  339, 339, 339, 339, 339, 339, 339, 339, 
+  339, 339, 339, 339, 339, 339, 339, 339, 
+  339, 339, 339, 0, 0, 0, 0, 0, 
+  0, 339, 339, 339, 339, 339, 339, 339, 
+  339, 339, 339, 339, 339, 339, 339, 339, 
+  339, 339, 339, 339, 339, 339, 339, 339, 
+  339, 339, 339, 339, 339, 339, 339, 339, 
+  339, 339, 339, 339, 339, 339, 339, 339, 
+  339, 339, 339, 339, 339, 339, 339, 339, 
+  339, 339, 339, 339, 339, 339, 339, 339, 
+  339, 339, 339, 339, 339, 339, 339, 339, 
+  339, 339, 339, 339, 339, 339, 339, 339, 
+  339, 339, 0, 339, 339, 339, 339, 0, 
+  0, 339, 339, 339, 339, 339, 339, 339, 
+  0, 339, 0, 339, 339, 339, 339, 0, 
+  0, 339, 339, 339, 339, 339, 339, 339, 
+  339, 339, 339, 339, 339, 339, 339, 339, 
+  339, 339, 339, 339, 339, 339, 339, 339, 
+  339, 339, 339, 339, 339, 339, 339, 339, 
+  339, 339, 339, 339, 339, 339, 339, 339, 
+  339, 339, 0, 339, 339, 339, 339, 0, 
+  0, 339, 339, 339, 339, 339, 339, 339, 
+  339, 339, 339, 339, 339, 339, 339, 339, 
+  339, 339, 339, 339, 339, 339, 339, 339, 
+  339, 339, 339, 339, 339, 339, 339, 339, 
+  339, 339, 0, 339, 339, 339, 339, 0, 
+  0, 339, 339, 339, 339, 339, 339, 339, 
+  0, 339, 0, 339, 339, 339, 339, 0, 
+  0, 339, 339, 339, 339, 339, 339, 339, 
+  339, 339, 339, 339, 339, 339, 339, 339, 
+  0, 339, 339, 339, 339, 339, 339, 339, 
+  339, 339, 339, 339, 339, 339, 339, 339, 
+  339, 339, 339, 339, 339, 339, 339, 339, 
+  339, 339, 339, 339, 339, 339, 339, 339, 
+  339, 339, 339, 339, 339, 339, 339, 339, 
+  339, 339, 339, 339, 339, 339, 339, 339, 
+  339, 339, 339, 339, 339, 339, 339, 339, 
+  339, 339, 0, 339, 339, 339, 339, 0, 
+  0, 339, 339, 339, 339, 339, 339, 339, 
+  339, 339, 339, 339, 339, 339, 339, 339, 
+  339, 339, 339, 339, 339, 339, 339, 339, 
+  339, 339, 339, 339, 339, 339, 339, 339, 
+  339, 339, 339, 339, 339, 339, 339, 339, 
+  339, 339, 339, 339, 339, 339, 339, 339, 
+  339, 339, 339, 339, 339, 339, 339, 339, 
+  339, 339, 339, 339, 339, 339, 339, 339, 
+  339, 339, 339, 339, 0, 0, 0, 0, 
+  524, 812, 990, 990, 990, 990, 990, 990, 
+  990, 990, 1120, 1120, 1120, 1120, 1120, 1120, 
+  1120, 1120, 1120, 1120, 1120, 1120, 1120, 1120, 
+  1120, 1120, 1120, 1120, 1120, 1120, 0, 0, 
+  0, 339, 339, 339, 339, 339, 339, 339, 
+  339, 339, 339, 339, 339, 339, 339, 339, 
+  339, 76, 76, 76, 76, 76, 76, 76, 
+  76, 76, 76, 0, 0, 0, 0, 0, 
+  0, 339, 339, 339, 339, 339, 339, 339, 
+  339, 339, 339, 339, 339, 339, 339, 339, 
+  339, 339, 339, 339, 339, 339, 339, 339, 
+  339, 339, 339, 339, 339, 339, 339, 339, 
+  339, 339, 339, 339, 339, 339, 339, 339, 
+  339, 339, 339, 339, 339, 339, 339, 339, 
+  339, 339, 339, 339, 339, 339, 339, 339, 
+  339, 339, 339, 339, 339, 339, 339, 339, 
+  339, 339, 339, 339, 339, 339, 339, 339, 
+  339, 339, 339, 339, 339, 339, 339, 339, 
+  339, 339, 339, 339, 339, 339, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 0, 339, 339, 339, 339, 339, 339, 
+  339, 339, 339, 339, 339, 339, 339, 339, 
+  339, 339, 339, 339, 339, 339, 339, 339, 
+  339, 339, 339, 339, 339, 339, 339, 339, 
+  339, 339, 339, 339, 339, 339, 339, 339, 
+  339, 339, 339, 339, 339, 339, 339, 339, 
+  339, 339, 339, 339, 339, 339, 339, 339, 
+  339, 339, 339, 339, 339, 339, 339, 339, 
+  339, 339, 339, 339, 339, 339, 339, 339, 
+  339, 339, 339, 339, 339, 339, 339, 339, 
+  339, 339, 339, 339, 339, 339, 339, 339, 
+  339, 339, 339, 339, 339, 339, 339, 339, 
+  339, 339, 339, 339, 339, 339, 339, 339, 
+  339, 339, 339, 339, 339, 339, 339, 339, 
+  339, 339, 339, 339, 339, 339, 339, 339, 
+  339, 339, 339, 339, 339, 339, 339, 339, 
+  339, 339, 339, 339, 339, 339, 339, 339, 
+  339, 339, 339, 339, 339, 339, 339, 339, 
+  339, 339, 339, 339, 339, 339, 339, 339, 
+  339, 339, 339, 339, 339, 339, 339, 339, 
+  339, 339, 339, 339, 339, 339, 339, 339, 
+  339, 339, 339, 339, 339, 339, 339, 339, 
+  339, 339, 339, 339, 339, 339, 339, 339, 
+  339, 339, 339, 339, 339, 339, 339, 339, 
+  339, 339, 339, 339, 339, 339, 339, 339, 
+  339, 339, 339, 339, 339, 339, 339, 339, 
+  339, 339, 339, 339, 339, 339, 339, 339, 
+  339, 339, 339, 339, 339, 339, 339, 339, 
+  339, 339, 339, 339, 339, 339, 339, 339, 
+  339, 339, 339, 339, 339, 339, 339, 339, 
+  339, 339, 339, 339, 339, 339, 339, 339, 
+  339, 339, 339, 339, 339, 339, 339, 339, 
+  339, 339, 339, 339, 339, 339, 339, 339, 
+  339, 339, 339, 339, 339, 339, 339, 339, 
+  339, 339, 339, 339, 339, 339, 339, 339, 
+  339, 339, 339, 339, 339, 339, 339, 339, 
+  339, 339, 339, 339, 339, 339, 339, 339, 
+  339, 339, 339, 339, 339, 339, 339, 339, 
+  339, 339, 339, 339, 339, 339, 339, 339, 
+  339, 339, 339, 339, 339, 339, 339, 339, 
+  339, 339, 339, 339, 339, 339, 339, 339, 
+  339, 339, 339, 339, 339, 339, 339, 339, 
+  339, 339, 339, 339, 339, 339, 339, 339, 
+  339, 339, 339, 339, 339, 339, 339, 339, 
+  339, 339, 339, 339, 339, 339, 339, 339, 
+  339, 339, 339, 339, 339, 339, 339, 339, 
+  339, 339, 339, 339, 339, 339, 339, 339, 
+  339, 339, 339, 339, 339, 339, 339, 339, 
+  339, 339, 339, 339, 339, 339, 339, 339, 
+  339, 339, 339, 339, 339, 339, 339, 339, 
+  339, 339, 339, 339, 339, 339, 339, 339, 
+  339, 339, 339, 339, 339, 339, 339, 339, 
+  339, 339, 339, 339, 339, 339, 339, 339, 
+  339, 339, 339, 339, 339, 339, 339, 339, 
+  339, 339, 339, 339, 339, 339, 339, 339, 
+  339, 339, 339, 339, 339, 339, 339, 339, 
+  339, 339, 339, 339, 339, 339, 339, 339, 
+  339, 339, 339, 339, 339, 339, 339, 339, 
+  339, 339, 339, 339, 339, 339, 339, 339, 
+  339, 339, 339, 339, 339, 339, 339, 339, 
+  339, 339, 339, 339, 339, 339, 339, 339, 
+  339, 339, 339, 339, 339, 339, 339, 339, 
+  339, 339, 339, 339, 339, 339, 339, 339, 
+  339, 339, 339, 339, 339, 339, 339, 339, 
+  339, 339, 339, 339, 339, 339, 339, 339, 
+  339, 339, 339, 339, 339, 339, 339, 339, 
+  339, 339, 339, 339, 339, 339, 339, 339, 
+  339, 339, 339, 339, 339, 339, 339, 339, 
+  339, 339, 339, 339, 339, 339, 339, 339, 
+  339, 339, 339, 339, 339, 339, 339, 339, 
+  339, 339, 339, 339, 339, 339, 339, 339, 
+  339, 339, 339, 339, 339, 339, 339, 339, 
+  339, 339, 339, 339, 339, 339, 339, 339, 
+  339, 339, 339, 339, 339, 339, 339, 339, 
+  339, 339, 339, 339, 339, 339, 339, 339, 
+  339, 339, 339, 339, 339, 339, 339, 339, 
+  339, 339, 339, 339, 339, 339, 339, 339, 
+  339, 339, 339, 339, 339, 339, 990, 990, 
+  339, 339, 339, 339, 339, 339, 339, 339, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 7, 339, 339, 339, 339, 339, 339, 
+  339, 339, 339, 339, 339, 339, 339, 339, 
+  339, 339, 339, 339, 339, 339, 339, 339, 
+  339, 339, 339, 339, 11, 12, 0, 0, 
+  0, 339, 339, 339, 339, 339, 339, 339, 
+  339, 339, 339, 339, 339, 339, 339, 339, 
+  339, 339, 339, 339, 339, 339, 339, 339, 
+  339, 339, 339, 339, 339, 339, 339, 339, 
+  339, 339, 339, 339, 339, 339, 339, 339, 
+  339, 339, 339, 339, 339, 339, 339, 339, 
+  339, 339, 339, 339, 339, 339, 339, 339, 
+  339, 339, 339, 339, 339, 339, 339, 339, 
+  339, 339, 339, 339, 339, 339, 339, 339, 
+  339, 339, 339, 339, 990, 990, 990, 1249, 
+  1249, 1249, 0, 0, 0, 0, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 339, 339, 339, 339, 339, 339, 339, 
+  339, 339, 339, 339, 339, 339, 0, 339, 
+  339, 339, 339, 1090, 1090, 1101, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 339, 339, 339, 339, 339, 339, 339, 
+  339, 339, 339, 339, 339, 339, 339, 339, 
+  339, 339, 339, 1090, 1090, 1101, 990, 990, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 339, 339, 339, 339, 339, 339, 339, 
+  339, 339, 339, 339, 339, 339, 339, 339, 
+  339, 339, 339, 1090, 1090, 0, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 339, 339, 339, 339, 339, 339, 339, 
+  339, 339, 339, 339, 339, 339, 0, 339, 
+  339, 339, 0, 1090, 1090, 0, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 339, 339, 339, 339, 339, 339, 339, 
+  339, 339, 339, 339, 339, 339, 339, 339, 
+  339, 339, 339, 339, 339, 339, 339, 339, 
+  339, 339, 339, 339, 339, 339, 339, 339, 
+  339, 339, 339, 339, 339, 339, 339, 339, 
+  339, 339, 339, 339, 339, 339, 339, 339, 
+  339, 339, 339, 339, 339, 1250, 1250, 1093, 
+  1090, 1090, 1090, 1090, 1090, 1090, 1090, 1093, 
+  1093, 1093, 1093, 1093, 1093, 1093, 1093, 1090, 
+  1093, 1093, 1090, 1090, 1090, 1090, 1090, 1090, 
+  1090, 1090, 1090, 1101, 1090, 990, 990, 990, 
+  507, 990, 990, 990, 10, 339, 524, 0, 
+  0, 1110, 1110, 1110, 1110, 1110, 1110, 1110, 
+  1110, 1110, 1110, 0, 0, 0, 0, 0, 
+  0, 1251, 1251, 1251, 1251, 1251, 1251, 1251, 
+  1251, 1251, 1251, 0, 0, 0, 0, 0, 
+  0, 8, 8, 8, 8, 8, 8, 1030, 
+  8, 8, 8, 8, 558, 558, 558, 7, 
+  0, 1110, 1110, 1110, 1110, 1110, 1110, 1110, 
+  1110, 1110, 1110, 0, 0, 0, 0, 0, 
+  0, 339, 339, 339, 339, 339, 339, 339, 
+  339, 339, 339, 339, 339, 339, 339, 339, 
+  339, 339, 339, 339, 339, 339, 339, 339, 
+  339, 339, 339, 339, 339, 339, 339, 339, 
+  339, 339, 339, 339, 507, 339, 339, 339, 
+  339, 339, 339, 339, 339, 339, 339, 339, 
+  339, 339, 339, 339, 339, 339, 339, 339, 
+  339, 339, 339, 339, 339, 339, 339, 339, 
+  339, 339, 339, 339, 339, 339, 339, 339, 
+  339, 339, 339, 339, 339, 339, 339, 339, 
+  339, 339, 339, 339, 339, 339, 339, 339, 
+  339, 0, 0, 0, 0, 0, 0, 0, 
+  0, 339, 339, 339, 339, 339, 339, 339, 
+  339, 339, 339, 339, 339, 339, 339, 339, 
+  339, 339, 339, 339, 339, 339, 339, 339, 
+  339, 339, 339, 339, 339, 339, 339, 339, 
+  339, 339, 339, 339, 339, 339, 339, 339, 
+  339, 339, 1032, 0, 0, 0, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 339, 339, 339, 339, 339, 339, 339, 
+  339, 339, 339, 339, 339, 339, 339, 339, 
+  339, 339, 339, 339, 339, 339, 339, 339, 
+  339, 339, 339, 339, 339, 339, 0, 0, 
+  0, 1090, 1090, 1090, 1093, 1093, 1093, 1093, 
+  1090, 1090, 1252, 1252, 1252, 0, 0, 0, 
+  0, 1093, 1093, 1090, 1093, 1093, 1093, 1093, 
+  1093, 1093, 1031, 524, 537, 0, 0, 0, 
+  0, 76, 0, 0, 0, 8, 8, 1110, 
+  1110, 1110, 1110, 1110, 1110, 1110, 1110, 1110, 
+  1110, 339, 339, 339, 339, 339, 339, 339, 
+  339, 339, 339, 339, 339, 339, 339, 339, 
+  339, 339, 339, 339, 339, 339, 339, 339, 
+  339, 339, 339, 339, 339, 339, 339, 0, 
+  0, 339, 339, 339, 339, 339, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 339, 339, 339, 339, 339, 339, 339, 
+  339, 339, 339, 339, 339, 339, 339, 339, 
+  339, 339, 339, 339, 339, 339, 339, 339, 
+  339, 339, 339, 339, 339, 339, 339, 339, 
+  339, 339, 339, 339, 339, 339, 339, 339, 
+  339, 339, 339, 0, 0, 0, 0, 0, 
+  0, 1093, 1093, 1093, 1093, 1093, 1093, 1093, 
+  1093, 1093, 1093, 1093, 1093, 1093, 1093, 1093, 
+  1093, 1093, 339, 339, 339, 339, 339, 339, 
+  339, 1093, 1093, 0, 0, 0, 0, 0, 
+  0, 1110, 1110, 1110, 1110, 1110, 1110, 1110, 
+  1110, 1110, 1110, 0, 0, 0, 0, 8, 
+  8, 76, 76, 76, 76, 76, 76, 76, 
+  76, 76, 76, 76, 76, 76, 76, 76, 
+  76, 76, 76, 76, 76, 76, 76, 76, 
+  76, 76, 76, 76, 76, 76, 76, 76, 
+  76, 339, 339, 339, 339, 339, 339, 339, 
+  339, 339, 339, 339, 339, 339, 339, 339, 
+  339, 339, 339, 339, 339, 339, 339, 339, 
+  524, 537, 1093, 1093, 1093, 0, 0, 990, 
+  990, 0, 0, 0, 0, 0, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 1090, 1090, 1090, 1090, 1093, 1253, 1254, 
+  1255, 1256, 1257, 1258, 1259, 1260, 1261, 1262, 
+  339, 339, 1263, 1264, 339, 339, 339, 339, 
+  339, 339, 339, 339, 339, 339, 339, 339, 
+  339, 339, 339, 339, 339, 339, 339, 339, 
+  339, 339, 339, 339, 339, 339, 339, 339, 
+  339, 339, 339, 339, 339, 1111, 1265, 1090, 
+  1090, 1090, 1090, 1266, 1267, 1268, 1269, 1270, 
+  1271, 1272, 1273, 1274, 1275, 1276, 339, 339, 
+  339, 339, 339, 339, 339, 0, 0, 0, 
+  0, 1110, 1110, 1110, 1110, 1110, 1110, 1110, 
+  1110, 1110, 1110, 990, 990, 990, 990, 990, 
+  990, 990, 812, 812, 812, 812, 812, 812, 
+  812, 812, 812, 812, 524, 537, 524, 524, 
+  524, 524, 524, 524, 524, 812, 812, 812, 
+  812, 812, 812, 812, 812, 812, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 213, 213, 213, 213, 213, 213, 213, 
+  213, 213, 213, 213, 213, 213, 213, 213, 
+  213, 213, 213, 213, 213, 213, 213, 213, 
+  213, 213, 213, 213, 213, 213, 213, 213, 
+  213, 213, 213, 213, 213, 213, 213, 213, 
+  213, 213, 213, 213, 213, 1277, 1278, 1279, 
+  507, 1280, 1281, 1282, 1283, 1284, 1285, 1286, 
+  1287, 1288, 1289, 1290, 507, 1291, 1292, 1293, 
+  1294, 1295, 1296, 1297, 1298, 1299, 1300, 1301, 
+  1302, 1303, 1304, 1305, 1306, 1307, 1308, 507, 
+  1309, 1310, 1311, 1312, 1313, 1314, 1315, 1316, 
+  1317, 1318, 1319, 1320, 1321, 1322, 1323, 1324, 
+  1325, 1326, 1327, 1328, 1329, 1330, 1331, 1332, 
+  1333, 1334, 1335, 1336, 213, 213, 213, 213, 
+  213, 213, 213, 213, 213, 213, 213, 213, 
+  213, 1337, 213, 213, 213, 213, 1338, 213, 
+  213, 213, 213, 213, 213, 213, 213, 213, 
+  213, 213, 213, 213, 213, 213, 213, 213, 
+  213, 213, 213, 213, 213, 213, 213, 213, 
+  213, 213, 213, 213, 1339, 1340, 1341, 1342, 
+  1307, 1343, 1344, 1345, 1346, 1347, 1348, 1349, 
+  1350, 1351, 1352, 1353, 1354, 1355, 1356, 1357, 
+  1358, 1359, 1360, 1361, 1362, 1363, 1364, 1365, 
+  1366, 1367, 1368, 1369, 1370, 1371, 1372, 1373, 
+  1374, 524, 524, 537, 524, 524, 524, 524, 
+  524, 524, 524, 537, 0, 0, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 524, 
+  537, 1375, 1376, 1377, 1378, 1379, 1380, 1381, 
+  1382, 1383, 1384, 1385, 1386, 1387, 1388, 1389, 
+  1390, 1391, 1392, 1393, 1394, 1395, 1396, 1397, 
+  1398, 1399, 1400, 1401, 1402, 1403, 1404, 1405, 
+  1406, 1407, 1408, 1409, 1410, 1411, 1412, 1413, 
+  1414, 1415, 1416, 1417, 1418, 1419, 1420, 1421, 
+  1422, 1423, 1424, 1425, 1426, 1427, 1428, 1429, 
+  1430, 1431, 1432, 1433, 1434, 1435, 1436, 1437, 
+  1438, 1439, 1440, 1441, 1442, 1443, 1444, 1445, 
+  1446, 1447, 1448, 1449, 1450, 1451, 1452, 1453, 
+  1454, 1455, 1456, 1457, 1458, 1459, 1460, 1461, 
+  1462, 1463, 1464, 1465, 1466, 1467, 1468, 1469, 
+  1470, 1471, 1472, 1473, 1474, 1475, 1476, 1477, 
+  1478, 1479, 1480, 1481, 1482, 1483, 1484, 1485, 
+  1486, 1487, 1488, 1489, 1490, 1491, 1492, 1493, 
+  1494, 1495, 1496, 1497, 1498, 1499, 1500, 1501, 
+  1502, 1503, 1504, 1505, 1506, 1507, 1508, 1509, 
+  1510, 1511, 1512, 1513, 1514, 1515, 1516, 1517, 
+  1518, 1519, 1520, 1521, 1522, 1523, 1524, 1525, 
+  1526, 1527, 1528, 1529, 1530, 0, 0, 0, 
+  0, 1531, 1532, 1533, 1534, 1535, 1536, 1537, 
+  1538, 1539, 1540, 1541, 1542, 1543, 1544, 1545, 
+  1546, 1547, 1548, 1549, 1550, 1551, 1552, 1553, 
+  1554, 1555, 1556, 1557, 1558, 1559, 1560, 1561, 
+  1562, 1563, 1564, 1565, 1566, 1567, 1568, 1569, 
+  1570, 1571, 1572, 1573, 1574, 1575, 1576, 1577, 
+  1578, 1579, 1580, 1581, 1582, 1583, 1584, 1585, 
+  1586, 1587, 1588, 1589, 1590, 1591, 1592, 1593, 
+  1594, 1595, 1596, 1597, 1598, 1599, 1600, 1601, 
+  1602, 1603, 1604, 1605, 1606, 1607, 1608, 1609, 
+  1610, 1611, 1612, 1613, 1614, 1615, 1616, 1617, 
+  1618, 1619, 1620, 0, 0, 0, 0, 0, 
+  0, 1621, 1622, 1623, 1624, 1625, 1626, 1627, 
+  1628, 1629, 1630, 1631, 1632, 1633, 1634, 1635, 
+  1636, 1637, 1638, 1639, 1640, 1641, 1642, 0, 
+  0, 1643, 1644, 1645, 1646, 1647, 1648, 0, 
+  0, 1649, 1650, 1651, 1652, 1653, 1654, 1655, 
+  1656, 1657, 1658, 1659, 1660, 1661, 1662, 1663, 
+  1664, 1665, 1666, 1667, 1668, 1669, 1670, 1671, 
+  1672, 1673, 1674, 1675, 1676, 1677, 1678, 1679, 
+  1680, 1681, 1682, 1683, 1684, 1685, 1686, 0, 
+  0, 1687, 1688, 1689, 1690, 1691, 1692, 0, 
+  0, 1693, 1694, 1695, 1696, 1697, 1698, 1699, 
+  1700, 0, 1701, 0, 1702, 0, 1703, 0, 
+  1704, 1705, 1706, 1707, 1708, 1709, 1710, 1711, 
+  1712, 1713, 1714, 1715, 1716, 1717, 1718, 1719, 
+  1720, 1721, 1722, 1723, 1724, 1725, 1726, 1727, 
+  1728, 1729, 1730, 1731, 1732, 1733, 1734, 0, 
+  0, 1735, 1736, 1737, 1738, 1739, 1740, 1741, 
+  1742, 1743, 1744, 1745, 1746, 1747, 1748, 1749, 
+  1750, 1751, 1752, 1753, 1754, 1755, 1756, 1757, 
+  1758, 1759, 1760, 1761, 1762, 1763, 1764, 1765, 
+  1766, 1767, 1768, 1769, 1770, 1771, 1772, 1773, 
+  1774, 1775, 1776, 1777, 1778, 1779, 1780, 1781, 
+  1782, 1783, 1784, 1785, 1786, 1787, 0, 1788, 
+  1789, 1790, 1791, 1792, 1793, 1794, 1795, 1796, 
+  1797, 1798, 1799, 1800, 1801, 1802, 0, 1803, 
+  1804, 1805, 1806, 1807, 1808, 1809, 1810, 1811, 
+  1812, 1813, 1814, 1815, 1816, 0, 0, 1817, 
+  1818, 1819, 1820, 1821, 1822, 0, 1823, 1824, 
+  1825, 1826, 1827, 1828, 1829, 1830, 1831, 1832, 
+  1833, 1834, 1835, 1836, 1837, 1838, 1839, 1840, 
+  1841, 0, 0, 1842, 1843, 1844, 0, 1845, 
+  1846, 1847, 1848, 1849, 1850, 1851, 1852, 1853, 
+  0, 1854, 1855, 1856, 1856, 1856, 1856, 1856, 
+  1857, 1856, 1856, 1856, 80, 1858, 1858, 1250, 
+  1859, 1030, 1860, 1030, 1030, 1030, 1030, 8, 
+  1861, 79, 91, 11, 79, 79, 91, 11, 
+  79, 8, 8, 8, 8, 1862, 1863, 1864, 
+  8, 1865, 1866, 1867, 1868, 1869, 1870, 1871, 
+  75, 9, 9, 9, 1872, 1873, 8, 1874, 
+  1875, 8, 79, 91, 8, 1876, 8, 1877, 
+  47, 47, 8, 8, 8, 1878, 11, 12, 
+  1879, 1880, 1881, 8, 8, 8, 8, 8, 
+  8, 8, 8, 74, 8, 47, 8, 8, 
+  1882, 8, 8, 8, 8, 8, 8, 8, 
+  1856, 80, 80, 80, 80, 0, 0, 0, 
+  0, 0, 0, 80, 80, 80, 80, 80, 
+  80, 1883, 1884, 0, 0, 1885, 1886, 1887, 
+  1888, 1889, 1890, 1891, 1892, 1893, 1894, 1895, 
+  1896, 1897, 1898, 1899, 1900, 1901, 1902, 1903, 
+  1904, 1905, 1906, 1907, 1908, 1909, 1910, 1911, 
+  0, 1912, 1913, 1914, 1915, 1916, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 10, 10, 10, 10, 10, 10, 10, 
+  10, 1917, 10, 10, 10, 10, 10, 10, 
+  10, 10, 10, 10, 10, 10, 10, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 524, 524, 550, 550, 524, 524, 524, 
+  524, 550, 550, 550, 524, 524, 813, 813, 
+  813, 813, 524, 813, 813, 813, 550, 550, 
+  524, 537, 524, 550, 550, 537, 537, 537, 
+  537, 0, 0, 0, 0, 0, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 1918, 1919, 1920, 1921, 76, 1922, 1923, 
+  1924, 76, 1925, 1926, 1927, 1927, 1927, 1928, 
+  1929, 1930, 1930, 1931, 1932, 76, 1933, 1934, 
+  76, 76, 1935, 1936, 1937, 1937, 1937, 76, 
+  76, 1938, 1939, 1940, 76, 1941, 76, 1942, 
+  76, 1941, 76, 1943, 1944, 1945, 1920, 82, 
+  1946, 1947, 1948, 1949, 1950, 1951, 1952, 1953, 
+  1954, 1955, 1956, 76, 1957, 1958, 1959, 1960, 
+  1961, 1962, 74, 74, 74, 74, 1963, 1964, 
+  1946, 1956, 1965, 76, 74, 76, 76, 1966, 
+  0, 0, 0, 0, 1967, 1968, 1969, 1970, 
+  1971, 1972, 1973, 1974, 1975, 1976, 1977, 1978, 
+  1979, 1980, 1981, 1982, 1983, 1984, 1985, 1986, 
+  1987, 1988, 1989, 1990, 1991, 1992, 1993, 1994, 
+  1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 
+  2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 
+  2011, 1249, 1249, 1249, 2012, 2013, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 2014, 74, 2015, 74, 2016, 76, 76, 
+  76, 76, 76, 2017, 2018, 76, 76, 76, 
+  76, 74, 76, 76, 74, 76, 76, 74, 
+  76, 76, 76, 76, 76, 76, 76, 2019, 
+  76, 76, 76, 76, 76, 76, 76, 76, 
+  76, 76, 76, 76, 76, 76, 76, 76, 
+  76, 76, 76, 76, 76, 76, 76, 76, 
+  76, 76, 76, 76, 76, 76, 2020, 2021, 
+  2022, 2023, 76, 2024, 76, 2025, 76, 76, 
+  76, 76, 76, 76, 76, 76, 76, 76, 
+  76, 76, 76, 76, 76, 76, 76, 76, 
+  76, 76, 76, 76, 76, 76, 76, 76, 
+  76, 76, 76, 76, 76, 74, 74, 74, 
+  74, 74, 74, 74, 74, 74, 74, 74, 
+  74, 74, 2026, 2026, 2027, 2028, 74, 74, 
+  74, 2029, 2030, 2026, 2031, 2032, 2026, 74, 
+  74, 74, 2026, 13, 83, 74, 2026, 2026, 
+  74, 74, 74, 2026, 2026, 2026, 2026, 74, 
+  2026, 2026, 2026, 2026, 2033, 2034, 2035, 2036, 
+  74, 74, 74, 74, 2026, 2037, 2038, 2026, 
+  2039, 2040, 2026, 2026, 2026, 74, 74, 74, 
+  74, 74, 2026, 74, 2026, 2041, 2026, 2026, 
+  2026, 2026, 2042, 2026, 2043, 2044, 2045, 2026, 
+  2046, 2047, 2048, 2026, 2026, 2026, 2049, 74, 
+  74, 74, 74, 2026, 2026, 2026, 2026, 74, 
+  74, 74, 74, 74, 74, 74, 74, 74, 
+  2026, 2050, 2051, 2052, 74, 2053, 2054, 2026, 
+  2026, 2026, 2026, 2026, 2026, 74, 2055, 2056, 
+  2057, 2058, 2059, 2060, 2061, 2062, 2063, 2064, 
+  2065, 2066, 2067, 2068, 2069, 2070, 2071, 2026, 
+  2026, 2072, 2073, 2074, 2075, 2076, 2077, 2078, 
+  2079, 2080, 2081, 2026, 2026, 2026, 74, 74, 
+  2026, 2026, 2082, 2083, 74, 74, 74, 74, 
+  74, 2026, 74, 74, 74, 74, 74, 74, 
+  74, 74, 74, 2084, 2026, 74, 74, 2026, 
+  2026, 2085, 2086, 2026, 2087, 2088, 2089, 2090, 
+  2091, 2026, 2026, 2092, 2093, 2094, 2095, 2026, 
+  2026, 2026, 74, 74, 74, 74, 74, 2026, 
+  2026, 74, 74, 74, 74, 74, 74, 74, 
+  74, 74, 2026, 2026, 2026, 2026, 2026, 74, 
+  74, 2026, 2026, 74, 74, 74, 74, 2026, 
+  2026, 2026, 2026, 2026, 2026, 2026, 2026, 2026, 
+  2026, 2096, 2097, 2098, 2099, 2026, 2026, 2026, 
+  2026, 2026, 2026, 2100, 2101, 2102, 2103, 74, 
+  74, 2026, 2026, 2026, 2026, 2026, 2026, 2026, 
+  2026, 2026, 2026, 2026, 2026, 2026, 2026, 2026, 
+  2026, 76, 76, 76, 76, 76, 76, 76, 
+  76, 2026, 2026, 2026, 2026, 76, 76, 76, 
+  76, 76, 76, 76, 76, 76, 76, 76, 
+  76, 76, 76, 76, 76, 76, 76, 76, 
+  76, 2026, 2026, 76, 76, 76, 76, 76, 
+  76, 76, 2104, 2105, 76, 76, 76, 76, 
+  76, 76, 76, 76, 76, 76, 76, 812, 
+  812, 812, 812, 812, 812, 812, 812, 812, 
+  812, 812, 812, 812, 812, 812, 812, 812, 
+  812, 812, 812, 812, 812, 812, 812, 812, 
+  812, 812, 812, 812, 812, 812, 812, 812, 
+  812, 812, 812, 812, 812, 812, 812, 812, 
+  812, 812, 812, 812, 812, 812, 812, 812, 
+  812, 812, 812, 812, 812, 812, 812, 812, 
+  812, 812, 812, 812, 812, 812, 812, 812, 
+  812, 812, 812, 812, 76, 74, 76, 76, 
+  76, 76, 76, 76, 76, 76, 76, 76, 
+  76, 76, 76, 76, 76, 76, 76, 76, 
+  76, 76, 76, 76, 76, 76, 812, 76, 
+  76, 76, 76, 76, 74, 74, 74, 74, 
+  74, 74, 74, 74, 74, 74, 74, 74, 
+  74, 74, 74, 74, 74, 74, 74, 74, 
+  74, 74, 74, 74, 74, 76, 76, 76, 
+  76, 76, 76, 76, 76, 76, 76, 76, 
+  76, 76, 76, 76, 76, 76, 76, 76, 
+  76, 76, 76, 76, 76, 76, 76, 76, 
+  76, 76, 76, 76, 76, 76, 76, 76, 
+  76, 76, 76, 76, 76, 74, 74, 74, 
+  74, 74, 74, 76, 76, 76, 76, 76, 
+  76, 0, 0, 0, 0, 0, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 76, 76, 76, 76, 76, 76, 76, 
+  76, 76, 76, 76, 76, 76, 76, 76, 
+  76, 76, 76, 76, 76, 76, 76, 76, 
+  76, 76, 76, 76, 76, 76, 76, 76, 
+  76, 76, 76, 76, 76, 76, 76, 76, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 76, 76, 76, 76, 76, 76, 76, 
+  76, 76, 76, 76, 0, 0, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 2106, 2107, 2108, 2109, 2110, 2111, 2112, 
+  2113, 2114, 2115, 2116, 2117, 2118, 2119, 2120, 
+  2121, 2122, 2123, 2124, 2125, 2126, 2127, 2128, 
+  2129, 2130, 2131, 2132, 2133, 2134, 2135, 2136, 
+  2137, 2138, 2139, 2140, 2141, 2142, 2143, 2144, 
+  2145, 2146, 2147, 2148, 2149, 2150, 2151, 2152, 
+  2153, 2154, 2155, 2156, 2157, 2158, 2159, 2160, 
+  2161, 2162, 2163, 2164, 2165, 2166, 2167, 2168, 
+  2169, 2170, 2171, 2172, 2173, 2174, 2175, 2176, 
+  2177, 2178, 2179, 2180, 2181, 2182, 2183, 2184, 
+  2185, 2186, 2187, 2188, 2189, 2190, 2191, 2192, 
+  2193, 2194, 2195, 2196, 2197, 2198, 2199, 2200, 
+  2201, 2202, 2203, 2204, 2205, 2206, 2207, 2208, 
+  2209, 2210, 2211, 2212, 2213, 2214, 2215, 2216, 
+  2217, 2218, 2219, 2220, 2221, 2222, 2223, 2224, 
+  2225, 2226, 2227, 2228, 2229, 2230, 2231, 2232, 
+  2233, 2234, 2235, 2236, 2237, 2238, 2239, 2240, 
+  2241, 2242, 2243, 2244, 1251, 1251, 1251, 1251, 
+  1251, 1251, 1251, 1251, 1251, 1251, 1251, 1251, 
+  1251, 1251, 1251, 1251, 1251, 1251, 1251, 1251, 
+  1251, 76, 76, 76, 76, 76, 76, 76, 
+  76, 76, 76, 76, 76, 76, 76, 76, 
+  76, 76, 76, 76, 76, 76, 76, 76, 
+  76, 76, 76, 76, 76, 76, 76, 76, 
+  76, 76, 76, 76, 76, 76, 76, 76, 
+  76, 76, 76, 76, 76, 76, 76, 76, 
+  76, 76, 76, 76, 76, 76, 76, 76, 
+  76, 76, 76, 76, 76, 76, 76, 76, 
+  76, 76, 76, 76, 76, 76, 76, 76, 
+  76, 76, 76, 76, 76, 76, 76, 76, 
+  76, 76, 76, 76, 76, 76, 76, 76, 
+  76, 76, 76, 76, 76, 76, 76, 76, 
+  76, 76, 76, 76, 76, 76, 76, 76, 
+  76, 76, 76, 76, 76, 76, 76, 76, 
+  76, 76, 76, 76, 76, 76, 76, 76, 
+  76, 76, 76, 76, 76, 76, 76, 76, 
+  76, 76, 76, 76, 76, 76, 76, 76, 
+  76, 76, 76, 76, 76, 76, 76, 76, 
+  76, 76, 76, 76, 76, 76, 76, 76, 
+  76, 76, 76, 76, 76, 76, 76, 76, 
+  76, 76, 76, 76, 76, 76, 76, 76, 
+  76, 76, 76, 76, 76, 76, 76, 76, 
+  76, 76, 76, 76, 76, 76, 76, 76, 
+  74, 76, 76, 76, 76, 76, 76, 76, 
+  76, 76, 74, 76, 76, 76, 76, 76, 
+  76, 76, 76, 76, 76, 76, 76, 76, 
+  76, 76, 76, 76, 76, 76, 76, 76, 
+  76, 76, 76, 76, 76, 76, 76, 76, 
+  76, 76, 76, 76, 76, 76, 76, 76, 
+  76, 76, 76, 76, 76, 76, 76, 76, 
+  76, 76, 76, 76, 76, 76, 76, 76, 
+  76, 74, 74, 74, 74, 74, 74, 74, 
+  74, 76, 76, 76, 76, 76, 76, 76, 
+  76, 76, 76, 76, 76, 76, 76, 76, 
+  76, 76, 76, 76, 76, 76, 76, 76, 
+  76, 76, 76, 76, 76, 76, 76, 76, 
+  76, 76, 76, 76, 76, 76, 76, 76, 
+  76, 76, 76, 76, 76, 76, 76, 76, 
+  76, 76, 76, 76, 76, 76, 76, 76, 
+  76, 76, 76, 76, 76, 76, 76, 76, 
+  76, 76, 76, 76, 76, 76, 76, 76, 
+  76, 76, 76, 76, 76, 76, 76, 76, 
+  76, 76, 76, 76, 76, 76, 76, 76, 
+  76, 76, 76, 76, 76, 76, 76, 76, 
+  76, 76, 76, 76, 76, 76, 76, 76, 
+  76, 76, 76, 76, 76, 76, 76, 76, 
+  74, 76, 76, 76, 76, 76, 76, 76, 
+  76, 76, 76, 76, 76, 76, 76, 76, 
+  76, 76, 76, 76, 76, 76, 76, 76, 
+  76, 76, 76, 76, 76, 76, 76, 76, 
+  76, 76, 76, 76, 76, 76, 76, 76, 
+  76, 76, 76, 76, 76, 76, 0, 0, 
+  0, 76, 76, 76, 76, 76, 76, 76, 
+  76, 76, 76, 76, 76, 812, 76, 76, 
+  76, 76, 76, 76, 0, 0, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 0, 76, 76, 76, 76, 0, 76, 
+  76, 76, 76, 0, 0, 76, 76, 76, 
+  76, 76, 76, 76, 76, 76, 76, 76, 
+  76, 76, 76, 76, 76, 76, 76, 76, 
+  76, 76, 76, 76, 76, 76, 76, 76, 
+  76, 0, 76, 76, 76, 76, 76, 76, 
+  76, 76, 76, 76, 76, 76, 76, 76, 
+  76, 76, 76, 76, 76, 76, 76, 76, 
+  76, 76, 76, 76, 76, 76, 76, 76, 
+  76, 76, 76, 76, 76, 0, 76, 0, 
+  76, 76, 76, 76, 0, 0, 0, 76, 
+  0, 76, 76, 76, 76, 76, 76, 76, 
+  0, 0, 76, 76, 76, 76, 76, 76, 
+  76, 11, 12, 11, 12, 11, 12, 11, 
+  12, 11, 12, 11, 12, 11, 12, 1251, 
+  1251, 1251, 1251, 1251, 1251, 1251, 1251, 1251, 
+  1251, 1251, 1251, 1251, 1251, 1251, 1251, 1251, 
+  1251, 1251, 1251, 1251, 1251, 1251, 1251, 1251, 
+  1251, 1251, 1251, 1251, 1251, 76, 0, 0, 
+  0, 76, 76, 76, 76, 76, 76, 76, 
+  76, 76, 76, 76, 76, 76, 76, 76, 
+  76, 76, 76, 76, 76, 76, 76, 76, 
+  76, 0, 76, 76, 76, 76, 76, 76, 
+  76, 76, 76, 76, 76, 76, 76, 76, 
+  0, 2026, 74, 74, 2026, 2026, 11, 12, 
+  74, 74, 74, 74, 0, 0, 0, 0, 
+  0, 74, 74, 74, 2026, 2026, 2026, 2026, 
+  74, 74, 74, 74, 74, 2026, 2026, 2026, 
+  74, 74, 74, 2026, 2026, 2026, 2026, 11, 
+  12, 11, 12, 11, 12, 0, 0, 0, 
+  0, 74, 74, 74, 74, 74, 74, 74, 
+  74, 74, 74, 74, 74, 74, 74, 74, 
+  74, 812, 812, 812, 812, 812, 812, 812, 
+  812, 812, 812, 812, 812, 812, 812, 812, 
+  812, 812, 812, 812, 812, 812, 812, 812, 
+  812, 812, 812, 812, 812, 812, 812, 812, 
+  812, 812, 812, 812, 812, 812, 812, 812, 
+  812, 812, 812, 812, 812, 812, 812, 812, 
+  812, 812, 812, 812, 812, 812, 812, 812, 
+  812, 812, 812, 812, 812, 812, 812, 812, 
+  812, 812, 812, 812, 812, 812, 812, 812, 
+  812, 812, 812, 812, 812, 812, 812, 812, 
+  812, 812, 812, 812, 812, 812, 812, 812, 
+  812, 812, 812, 812, 812, 812, 812, 812, 
+  812, 812, 812, 812, 812, 812, 812, 812, 
+  812, 812, 812, 812, 812, 812, 812, 812, 
+  812, 812, 812, 812, 812, 812, 812, 812, 
+  812, 812, 812, 812, 812, 812, 812, 812, 
+  812, 812, 812, 812, 812, 812, 812, 812, 
+  812, 812, 812, 812, 812, 812, 812, 812, 
+  812, 812, 812, 812, 812, 812, 812, 812, 
+  812, 812, 812, 812, 812, 812, 812, 812, 
+  812, 812, 812, 812, 812, 812, 812, 812, 
+  812, 812, 812, 812, 812, 812, 812, 812, 
+  812, 812, 812, 812, 812, 812, 812, 812, 
+  812, 812, 812, 812, 812, 812, 812, 812, 
+  812, 812, 812, 812, 812, 812, 812, 812, 
+  812, 812, 812, 812, 812, 812, 812, 812, 
+  812, 812, 812, 812, 812, 812, 812, 812, 
+  812, 812, 812, 812, 812, 812, 812, 812, 
+  812, 812, 812, 812, 812, 812, 812, 812, 
+  812, 812, 812, 812, 812, 812, 812, 812, 
+  812, 812, 812, 812, 812, 812, 812, 812, 
+  812, 812, 812, 812, 812, 812, 812, 812, 
+  812, 74, 74, 74, 74, 74, 74, 74, 
+  74, 74, 74, 74, 74, 74, 74, 74, 
+  74, 74, 74, 74, 74, 74, 74, 74, 
+  74, 74, 74, 74, 74, 74, 74, 74, 
+  74, 74, 74, 74, 74, 74, 74, 74, 
+  74, 74, 74, 74, 74, 74, 74, 74, 
+  74, 74, 74, 74, 74, 74, 74, 74, 
+  74, 74, 74, 74, 74, 74, 74, 74, 
+  74, 74, 74, 74, 74, 74, 74, 74, 
+  74, 74, 74, 74, 74, 74, 74, 74, 
+  74, 74, 74, 74, 74, 74, 74, 74, 
+  74, 74, 74, 74, 74, 74, 74, 74, 
+  74, 74, 74, 74, 74, 74, 74, 74, 
+  74, 74, 74, 74, 74, 74, 74, 74, 
+  74, 74, 74, 74, 74, 74, 74, 74, 
+  74, 74, 74, 74, 74, 74, 74, 74, 
+  74, 74, 74, 74, 11, 12, 11, 12, 
+  11, 12, 11, 12, 11, 12, 11, 12, 
+  11, 12, 11, 12, 11, 12, 11, 12, 
+  11, 12, 74, 74, 2026, 2026, 2026, 2026, 
+  2026, 2026, 2026, 2026, 2026, 2026, 2026, 2026, 
+  2026, 2026, 2026, 2026, 2026, 2026, 2026, 2026, 
+  2026, 74, 74, 74, 74, 74, 74, 74, 
+  74, 2026, 74, 74, 74, 74, 74, 74, 
+  74, 2026, 2026, 2026, 2026, 2026, 2026, 74, 
+  74, 74, 2026, 74, 74, 74, 74, 2026, 
+  2026, 2026, 2026, 2026, 74, 2026, 2026, 74, 
+  74, 11, 12, 11, 12, 2026, 74, 74, 
+  74, 74, 2026, 74, 2026, 2026, 2026, 74, 
+  74, 2026, 2026, 74, 74, 74, 74, 74, 
+  74, 74, 74, 74, 74, 2026, 2026, 2026, 
+  2026, 2026, 2026, 74, 74, 11, 12, 74, 
+  74, 74, 74, 74, 74, 74, 74, 74, 
+  74, 74, 74, 2026, 2026, 2245, 2026, 2026, 
+  2026, 2026, 2026, 2026, 2026, 2026, 2026, 2026, 
+  2026, 2026, 2026, 2026, 2026, 2026, 74, 2026, 
+  2026, 2026, 2026, 74, 74, 2026, 74, 2026, 
+  74, 74, 2026, 74, 2026, 2026, 2026, 2026, 
+  74, 74, 74, 74, 74, 2026, 2026, 74, 
+  74, 74, 74, 74, 74, 2026, 2026, 2026, 
+  74, 74, 74, 74, 74, 74, 74, 74, 
+  74, 74, 74, 74, 74, 74, 74, 74, 
+  74, 74, 74, 74, 74, 74, 74, 74, 
+  2026, 2026, 74, 74, 74, 74, 74, 74, 
+  74, 74, 74, 74, 74, 2026, 2026, 74, 
+  74, 74, 74, 2026, 2026, 2026, 2026, 74, 
+  2026, 2026, 74, 74, 2026, 2246, 2247, 2248, 
+  74, 74, 2026, 2026, 2026, 2026, 2026, 2026, 
+  2026, 2026, 2026, 2026, 2026, 2026, 2026, 2026, 
+  2026, 2026, 2026, 2026, 2026, 2026, 2026, 2026, 
+  2026, 2026, 2026, 2026, 2026, 2026, 2026, 2026, 
+  2026, 2026, 2026, 2026, 2026, 2026, 2026, 2026, 
+  2026, 2026, 2026, 2026, 2026, 74, 74, 2026, 
+  2026, 2026, 2026, 2026, 2026, 2026, 2026, 74, 
+  2026, 2026, 2026, 2026, 2026, 2026, 2026, 2026, 
+  2026, 2026, 2026, 2026, 2026, 2026, 2026, 2026, 
+  2026, 2026, 2026, 2026, 2026, 2026, 2026, 2026, 
+  2026, 2026, 2026, 2026, 2026, 2026, 2026, 2026, 
+  2026, 2026, 2026, 2026, 2026, 2026, 2026, 2026, 
+  74, 74, 74, 74, 74, 2249, 2250, 2026, 
+  74, 74, 74, 2026, 2026, 2026, 2026, 2026, 
+  74, 74, 74, 74, 74, 2026, 2026, 2026, 
+  74, 74, 74, 74, 2026, 74, 74, 74, 
+  2026, 2026, 2026, 2026, 2026, 74, 2026, 74, 
+  74, 76, 76, 76, 76, 76, 76, 76, 
+  76, 76, 76, 76, 76, 76, 76, 76, 
+  76, 76, 76, 76, 76, 76, 76, 76, 
+  76, 76, 76, 76, 0, 0, 0, 0, 
+  0, 76, 76, 76, 76, 0, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 2251, 2252, 2253, 2254, 2255, 2256, 2257, 
+  2258, 2259, 2260, 2261, 2262, 2263, 2264, 2265, 
+  2266, 2267, 2268, 2269, 2270, 2271, 2272, 2273, 
+  2274, 2275, 2276, 2277, 2278, 2279, 2280, 2281, 
+  2282, 2283, 2284, 2285, 2286, 2287, 2288, 2289, 
+  2290, 2291, 2292, 2293, 2294, 2295, 2296, 2297, 
+  0, 2298, 2299, 2300, 2301, 2302, 2303, 2304, 
+  2305, 2306, 2307, 2308, 2309, 2310, 2311, 2312, 
+  2313, 2314, 2315, 2316, 2317, 2318, 2319, 2320, 
+  2321, 2322, 2323, 2324, 2325, 2326, 2327, 2328, 
+  2329, 2330, 2331, 2332, 2333, 2334, 2335, 2336, 
+  2337, 2338, 2339, 2340, 2341, 2342, 2343, 2344, 
+  0, 2345, 2346, 2347, 2348, 2349, 2350, 2351, 
+  2352, 2353, 2354, 2355, 2356, 2357, 0, 0, 
+  0, 0, 0, 0, 0, 213, 2358, 2359, 
+  213, 0, 0, 0, 0, 0, 0, 0, 
+  0, 2360, 2361, 2362, 2363, 2364, 2365, 2366, 
+  2367, 2368, 2369, 2370, 2371, 2372, 2373, 2374, 
+  2375, 2376, 2377, 2378, 2379, 2380, 2381, 2382, 
+  2383, 2384, 2385, 2386, 2387, 2388, 2389, 2390, 
+  2391, 2392, 2393, 2394, 2395, 2396, 2397, 2398, 
+  2399, 2400, 2401, 2402, 2403, 2404, 2405, 2406, 
+  2407, 2408, 2409, 2410, 2411, 2412, 2413, 2414, 
+  2415, 2416, 2417, 2418, 2419, 2420, 2421, 2422, 
+  2423, 2424, 2425, 2426, 2427, 2428, 2429, 2430, 
+  2431, 2432, 2433, 2434, 2435, 2436, 2437, 2438, 
+  2439, 2440, 2441, 2442, 2443, 2444, 2445, 2446, 
+  2447, 2448, 2449, 2450, 2451, 2452, 2453, 2454, 
+  2455, 2456, 2457, 2458, 2459, 213, 76, 76, 
+  76, 76, 76, 76, 0, 0, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 0, 8, 8, 8, 8, 1251, 8, 
+  8, 2460, 2461, 2462, 2463, 2464, 2465, 2466, 
+  2467, 2468, 2469, 2470, 2471, 2472, 2473, 2474, 
+  2475, 2476, 2477, 2478, 2479, 2480, 2481, 2482, 
+  2483, 2484, 2485, 2486, 2487, 2488, 2489, 2490, 
+  2491, 2492, 2493, 2494, 2495, 2496, 2497, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 339, 339, 339, 339, 339, 339, 339, 
+  339, 339, 339, 339, 339, 339, 339, 339, 
+  339, 339, 339, 339, 339, 339, 339, 339, 
+  339, 339, 339, 339, 339, 339, 339, 339, 
+  339, 339, 339, 339, 339, 339, 339, 339, 
+  339, 339, 339, 339, 339, 339, 339, 339, 
+  339, 339, 339, 339, 339, 339, 339, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  2498, 0, 0, 0, 0, 0, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 339, 339, 339, 339, 339, 339, 339, 
+  339, 339, 339, 339, 339, 339, 339, 339, 
+  339, 339, 339, 339, 339, 339, 339, 339, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 339, 339, 339, 339, 339, 339, 339, 
+  0, 339, 339, 339, 339, 339, 339, 339, 
+  0, 339, 339, 339, 339, 339, 339, 339, 
+  0, 339, 339, 339, 339, 339, 339, 339, 
+  0, 339, 339, 339, 339, 339, 339, 339, 
+  0, 339, 339, 339, 339, 339, 339, 339, 
+  0, 339, 339, 339, 339, 339, 339, 339, 
+  0, 339, 339, 339, 339, 339, 339, 339, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 8, 8, 79, 91, 79, 91, 8, 
+  8, 8, 79, 91, 8, 79, 91, 8, 
+  8, 8, 8, 8, 8, 8, 8, 8, 
+  1030, 0, 0, 0, 0, 79, 91, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 76, 76, 76, 76, 76, 76, 76, 
+  76, 76, 76, 76, 76, 76, 76, 76, 
+  76, 76, 76, 76, 76, 76, 76, 76, 
+  76, 76, 76, 0, 76, 76, 76, 76, 
+  2499, 76, 76, 76, 76, 76, 76, 76, 
+  76, 76, 76, 76, 76, 76, 76, 76, 
+  76, 76, 76, 76, 76, 76, 76, 76, 
+  76, 76, 76, 76, 76, 76, 76, 76, 
+  76, 76, 76, 76, 76, 76, 76, 76, 
+  76, 76, 76, 76, 76, 76, 76, 76, 
+  76, 76, 76, 76, 76, 76, 76, 76, 
+  76, 76, 76, 76, 76, 76, 76, 76, 
+  76, 76, 76, 76, 76, 76, 76, 76, 
+  76, 76, 76, 76, 76, 76, 76, 76, 
+  76, 76, 76, 76, 2500, 0, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 2501, 2502, 2503, 2504, 2505, 2506, 2507, 
+  2508, 2509, 2510, 2511, 2512, 2513, 2514, 2515, 
+  2516, 2517, 2518, 2519, 2520, 2521, 2522, 2523, 
+  2524, 2525, 2526, 2527, 2528, 2529, 2530, 2531, 
+  2532, 2533, 2534, 2535, 2536, 2537, 2538, 2539, 
+  2540, 2541, 2542, 2543, 2544, 2545, 2546, 2547, 
+  2548, 2549, 2550, 2551, 2552, 2553, 2554, 2555, 
+  2556, 2557, 2558, 2559, 2560, 2561, 2562, 2563, 
+  2564, 2565, 2566, 2567, 2568, 2569, 2570, 2571, 
+  2572, 2573, 2574, 2575, 2576, 2577, 2578, 2579, 
+  2580, 2581, 2582, 2583, 2584, 2585, 2586, 2587, 
+  2588, 2589, 2590, 2591, 2592, 2593, 2594, 2595, 
+  2596, 2597, 2598, 2599, 2600, 2601, 2602, 2603, 
+  2604, 2605, 2606, 2607, 2608, 2609, 2610, 2611, 
+  2612, 2613, 2614, 2615, 2616, 2617, 2618, 2619, 
+  2620, 2621, 2622, 2623, 2624, 2625, 2626, 2627, 
+  2628, 2629, 2630, 2631, 2632, 2633, 2634, 2635, 
+  2636, 2637, 2638, 2639, 2640, 2641, 2642, 2643, 
+  2644, 2645, 2646, 2647, 2648, 2649, 2650, 2651, 
+  2652, 2653, 2654, 2655, 2656, 2657, 2658, 2659, 
+  2660, 2661, 2662, 2663, 2664, 2665, 2666, 2667, 
+  2668, 2669, 2670, 2671, 2672, 2673, 2674, 2675, 
+  2676, 2677, 2678, 2679, 2680, 2681, 2682, 2683, 
+  2684, 2685, 2686, 2687, 2688, 2689, 2690, 2691, 
+  2692, 2693, 2694, 2695, 2696, 2697, 2698, 2699, 
+  2700, 2701, 2702, 2703, 2704, 2705, 2706, 2707, 
+  2708, 2709, 2710, 2711, 2712, 2713, 2714, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 76, 76, 76, 76, 76, 76, 76, 
+  76, 76, 76, 76, 76, 0, 0, 0, 
+  0, 2715, 8, 8, 8, 76, 507, 339, 
+  1249, 11, 12, 11, 12, 11, 12, 11, 
+  12, 11, 12, 76, 76, 11, 12, 11, 
+  12, 11, 12, 11, 12, 1030, 11, 12, 
+  12, 76, 1249, 1249, 1249, 1249, 1249, 1249, 
+  1249, 1249, 1249, 2716, 1032, 536, 1031, 2717, 
+  2717, 1030, 507, 507, 507, 507, 507, 2718, 
+  76, 2719, 2720, 2721, 507, 339, 8, 76, 
+  76, 0, 339, 339, 339, 339, 339, 2722, 
+  339, 339, 339, 339, 2723, 2724, 2725, 2726, 
+  2727, 2728, 2729, 2730, 2731, 2732, 2733, 2734, 
+  2735, 2736, 2737, 2738, 2739, 2740, 2741, 2742, 
+  2743, 2744, 2745, 2746, 339, 2747, 2748, 2749, 
+  2750, 2751, 2752, 339, 339, 339, 339, 339, 
+  2753, 2754, 2755, 2756, 2757, 2758, 2759, 2760, 
+  2761, 2762, 2763, 2764, 2765, 2766, 2767, 339, 
+  339, 339, 339, 339, 339, 339, 339, 339, 
+  339, 339, 339, 339, 339, 339, 339, 339, 
+  339, 339, 339, 339, 339, 2768, 339, 339, 
+  0, 0, 2769, 2770, 2771, 2772, 2773, 2774, 
+  2775, 1030, 339, 339, 339, 339, 339, 2776, 
+  339, 339, 339, 339, 2777, 2778, 2779, 2780, 
+  2781, 2782, 2783, 2784, 2785, 2786, 2787, 2788, 
+  2789, 2790, 2791, 2792, 2793, 2794, 2795, 2796, 
+  2797, 2798, 2799, 2800, 339, 2801, 2802, 2803, 
+  2804, 2805, 2806, 339, 339, 339, 339, 339, 
+  2807, 2808, 2809, 2810, 2811, 2812, 2813, 2814, 
+  2815, 2816, 2817, 2818, 2819, 2820, 2821, 339, 
+  339, 339, 339, 339, 339, 339, 339, 339, 
+  339, 339, 339, 339, 339, 339, 339, 339, 
+  2822, 2823, 2824, 2825, 339, 2826, 339, 339, 
+  2827, 2828, 2829, 2830, 8, 507, 2831, 2832, 
+  2833, 0, 0, 0, 0, 0, 339, 339, 
+  339, 339, 339, 339, 339, 339, 339, 339, 
+  339, 339, 339, 339, 339, 339, 339, 339, 
+  339, 339, 339, 339, 339, 339, 339, 339, 
+  339, 339, 339, 339, 339, 339, 339, 339, 
+  339, 339, 339, 339, 339, 339, 0, 0, 
+  0, 0, 2834, 2835, 2836, 2837, 2838, 2839, 
+  2840, 2841, 2842, 2843, 2844, 2845, 2846, 2847, 
+  2848, 2849, 2850, 2851, 2852, 2853, 2854, 2855, 
+  2856, 2857, 2858, 2859, 2860, 2861, 2862, 2863, 
+  2864, 2865, 2866, 2867, 2868, 2869, 2870, 2871, 
+  2872, 2873, 2874, 2875, 2876, 2877, 2878, 2879, 
+  2880, 2881, 2882, 2883, 2884, 2885, 2886, 2887, 
+  2888, 2889, 2890, 2891, 2892, 2893, 2894, 2895, 
+  2896, 2897, 2898, 2899, 2900, 2901, 2902, 2903, 
+  2904, 2905, 2906, 2907, 2908, 2909, 2910, 2911, 
+  2912, 2913, 2914, 2915, 2916, 2917, 2918, 2919, 
+  2920, 2921, 2922, 2923, 2924, 2925, 2926, 2927, 
+  0, 812, 812, 2928, 2929, 2930, 2931, 2932, 
+  2933, 2934, 2935, 2936, 2937, 2938, 2939, 2940, 
+  2941, 339, 339, 339, 339, 339, 339, 339, 
+  339, 339, 339, 339, 339, 339, 339, 339, 
+  339, 339, 339, 339, 339, 339, 339, 339, 
+  339, 0, 0, 0, 0, 0, 0, 0, 
+  0, 76, 76, 76, 76, 76, 76, 76, 
+  76, 76, 76, 76, 76, 76, 76, 76, 
+  76, 0, 0, 0, 0, 0, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 339, 339, 339, 339, 339, 339, 339, 
+  339, 339, 339, 339, 339, 339, 339, 339, 
+  339, 2942, 2943, 2944, 2945, 2946, 2947, 2948, 
+  2949, 2950, 2951, 2952, 2953, 2954, 2955, 2956, 
+  2957, 2958, 2959, 2960, 2961, 2962, 2963, 2964, 
+  2965, 2966, 2967, 2968, 2969, 2970, 2971, 2972, 
+  0, 2973, 2974, 2975, 2976, 2977, 2978, 2979, 
+  2980, 2981, 2982, 2983, 2984, 2985, 2986, 2987, 
+  2988, 2989, 2990, 2991, 2992, 2993, 2994, 2995, 
+  2996, 2997, 2998, 2999, 3000, 3001, 3002, 3003, 
+  3004, 3005, 3006, 3007, 3008, 0, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 3009, 3010, 3011, 3012, 3013, 3014, 3015, 
+  3016, 3017, 3018, 3019, 3020, 3021, 3022, 3023, 
+  3024, 3025, 3026, 3027, 3028, 3029, 3030, 3031, 
+  3032, 3033, 3034, 3035, 3036, 3037, 3038, 3039, 
+  3040, 3041, 3042, 3043, 3044, 3045, 3046, 3047, 
+  3048, 3049, 3050, 3051, 3052, 3053, 3054, 3055, 
+  812, 3056, 3057, 3058, 3059, 3060, 3061, 3062, 
+  3063, 3064, 3065, 3066, 3067, 3068, 3069, 3070, 
+  3071, 3072, 3073, 3074, 3075, 3076, 3077, 3078, 
+  3079, 3080, 3081, 3082, 3083, 3084, 3085, 3086, 
+  3087, 3088, 3089, 3090, 3091, 3092, 3093, 3094, 
+  3095, 3096, 3097, 3098, 3099, 3100, 3101, 3102, 
+  3103, 3104, 3105, 3106, 3107, 3108, 3109, 3110, 
+  3111, 3112, 3113, 3114, 3115, 3116, 3117, 3118, 
+  3119, 3120, 3121, 3122, 3123, 3124, 3125, 3126, 
+  3127, 3128, 3129, 3130, 3131, 3132, 3133, 3134, 
+  3135, 3136, 3137, 3138, 3139, 3140, 3141, 3142, 
+  3143, 3144, 3145, 3146, 3147, 3148, 3149, 3150, 
+  3151, 3152, 3153, 3154, 3155, 3156, 3157, 3158, 
+  3159, 3160, 3161, 3162, 3163, 3164, 3165, 3166, 
+  3167, 3168, 3169, 3170, 3171, 3172, 3173, 3174, 
+  3175, 3176, 3177, 3178, 3179, 3180, 3181, 3182, 
+  0, 3183, 3184, 3185, 3186, 3187, 3188, 3189, 
+  3190, 3191, 3192, 3193, 3194, 3195, 3196, 3197, 
+  3198, 3199, 3200, 3201, 3202, 3203, 3204, 3205, 
+  3206, 3207, 3208, 3209, 3210, 3211, 3212, 3213, 
+  3214, 3215, 3216, 3217, 3218, 3219, 3220, 3221, 
+  3222, 3223, 3224, 3225, 3226, 3227, 3228, 3229, 
+  3230, 3231, 3232, 3233, 3234, 3235, 3236, 3237, 
+  3238, 3239, 3240, 3241, 3242, 3243, 3244, 3245, 
+  3246, 3247, 3248, 3249, 3250, 3251, 3252, 3253, 
+  3254, 3255, 3256, 3257, 3258, 3259, 3260, 3261, 
+  3262, 3263, 3264, 3265, 3266, 3267, 3268, 3269, 
+  3270, 3271, 3272, 3273, 3274, 3275, 3276, 3277, 
+  3278, 3279, 3280, 3281, 3282, 3283, 3284, 3285, 
+  3286, 3287, 3288, 3289, 3290, 3291, 3292, 3293, 
+  3294, 3295, 3296, 3297, 3298, 3299, 3300, 3301, 
+  3302, 3303, 3304, 3305, 3306, 3307, 3308, 3309, 
+  3310, 3311, 3312, 3313, 3314, 3315, 3316, 3317, 
+  3318, 3319, 3320, 3321, 3322, 3323, 3324, 3325, 
+  3326, 3327, 3328, 3329, 3330, 3331, 3332, 3333, 
+  3334, 3335, 3336, 3337, 3338, 3339, 3340, 3341, 
+  3342, 3343, 3344, 3345, 3346, 3347, 3348, 3349, 
+  3350, 3351, 3352, 3353, 3354, 3355, 3356, 3357, 
+  3358, 3359, 3360, 3361, 3362, 3363, 3364, 3365, 
+  3366, 3367, 3368, 3369, 3370, 3371, 3372, 3373, 
+  3374, 3375, 3376, 3377, 3378, 3379, 3380, 3381, 
+  3382, 3383, 3384, 3385, 3386, 3387, 3388, 3389, 
+  3390, 3391, 3392, 3393, 3394, 3395, 3396, 3397, 
+  3398, 3399, 3400, 3401, 3402, 3403, 3404, 3405, 
+  3406, 3407, 3408, 3409, 3410, 3411, 3412, 3413, 
+  3414, 3415, 3416, 3417, 3418, 3419, 3420, 3421, 
+  3422, 3423, 3424, 3425, 3426, 3427, 3428, 3429, 
+  3430, 3431, 3432, 3433, 3434, 3435, 3436, 3437, 
+  3438, 339, 339, 339, 339, 339, 339, 339, 
+  339, 339, 339, 339, 339, 339, 339, 339, 
+  339, 339, 339, 339, 339, 339, 339, 339, 
+  339, 339, 339, 339, 339, 339, 339, 339, 
+  339, 339, 339, 339, 339, 339, 339, 339, 
+  339, 339, 339, 339, 339, 339, 339, 339, 
+  339, 339, 339, 339, 339, 339, 339, 339, 
+  339, 339, 339, 339, 339, 339, 339, 339, 
+  339, 339, 339, 339, 339, 339, 339, 339, 
+  339, 339, 339, 339, 339, 339, 339, 339, 
+  339, 339, 339, 339, 339, 339, 339, 339, 
+  339, 339, 339, 339, 339, 339, 339, 339, 
+  339, 339, 339, 339, 339, 339, 339, 339, 
+  339, 339, 339, 339, 339, 339, 339, 339, 
+  339, 339, 339, 339, 339, 339, 339, 339, 
+  339, 339, 339, 339, 339, 339, 339, 339, 
+  339, 339, 339, 339, 339, 339, 339, 339, 
+  339, 339, 339, 339, 339, 339, 339, 339, 
+  339, 339, 339, 339, 339, 339, 339, 339, 
+  339, 339, 339, 339, 339, 339, 339, 339, 
+  339, 339, 339, 339, 339, 339, 339, 339, 
+  339, 339, 339, 339, 339, 339, 339, 339, 
+  339, 339, 339, 339, 339, 339, 339, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 76, 76, 76, 76, 76, 76, 76, 
+  76, 76, 76, 76, 76, 76, 76, 76, 
+  76, 76, 76, 76, 76, 76, 76, 76, 
+  76, 76, 76, 76, 76, 76, 76, 76, 
+  76, 76, 76, 76, 76, 76, 76, 76, 
+  76, 76, 76, 76, 76, 76, 76, 76, 
+  76, 76, 76, 76, 76, 76, 76, 76, 
+  76, 76, 76, 76, 76, 76, 76, 76, 
+  76, 339, 339, 339, 339, 339, 339, 339, 
+  339, 339, 339, 339, 339, 339, 339, 339, 
+  339, 339, 339, 339, 339, 339, 339, 339, 
+  339, 339, 339, 339, 339, 339, 339, 339, 
+  339, 339, 339, 339, 339, 339, 339, 339, 
+  339, 339, 339, 339, 339, 339, 339, 339, 
+  339, 339, 339, 339, 339, 339, 339, 339, 
+  339, 339, 339, 339, 339, 339, 339, 339, 
+  339, 339, 339, 339, 339, 339, 339, 339, 
+  339, 339, 339, 339, 339, 339, 339, 339, 
+  339, 339, 339, 339, 339, 339, 339, 339, 
+  339, 339, 339, 339, 339, 339, 339, 339, 
+  339, 339, 339, 339, 339, 339, 339, 339, 
+  339, 339, 339, 339, 339, 339, 339, 339, 
+  339, 339, 339, 339, 339, 339, 339, 339, 
+  339, 339, 339, 339, 339, 339, 339, 339, 
+  339, 339, 339, 339, 339, 339, 339, 339, 
+  339, 339, 339, 339, 339, 339, 339, 339, 
+  339, 339, 339, 339, 339, 339, 339, 339, 
+  339, 339, 339, 339, 339, 339, 339, 339, 
+  339, 339, 339, 339, 339, 339, 339, 339, 
+  339, 339, 339, 339, 339, 339, 339, 339, 
+  339, 339, 339, 339, 339, 339, 339, 339, 
+  339, 339, 339, 339, 339, 0, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 339, 339, 339, 339, 339, 339, 339, 
+  339, 339, 339, 339, 339, 339, 339, 339, 
+  339, 339, 339, 339, 339, 339, 507, 339, 
+  339, 339, 339, 339, 339, 339, 339, 339, 
+  339, 339, 339, 339, 339, 339, 339, 339, 
+  339, 339, 339, 339, 339, 339, 339, 339, 
+  339, 339, 339, 339, 339, 339, 339, 339, 
+  339, 339, 339, 339, 339, 339, 339, 339, 
+  339, 339, 339, 339, 339, 339, 339, 339, 
+  339, 339, 339, 339, 339, 339, 339, 339, 
+  339, 339, 339, 339, 339, 339, 339, 339, 
+  339, 339, 339, 339, 339, 339, 339, 339, 
+  339, 339, 339, 339, 339, 339, 339, 339, 
+  339, 339, 339, 339, 339, 339, 339, 339, 
+  339, 339, 339, 339, 339, 339, 339, 339, 
+  339, 339, 339, 339, 339, 339, 339, 339, 
+  339, 339, 339, 339, 339, 339, 339, 339, 
+  339, 339, 339, 339, 339, 339, 339, 339, 
+  339, 339, 339, 339, 339, 339, 339, 339, 
+  339, 339, 339, 339, 339, 339, 339, 339, 
+  339, 339, 339, 339, 339, 339, 339, 339, 
+  339, 339, 339, 339, 339, 339, 339, 339, 
+  339, 339, 339, 339, 339, 339, 339, 339, 
+  339, 339, 339, 339, 339, 339, 339, 339, 
+  339, 339, 339, 339, 339, 339, 339, 339, 
+  339, 339, 339, 339, 339, 339, 339, 339, 
+  339, 339, 339, 339, 339, 339, 339, 339, 
+  339, 339, 339, 339, 339, 339, 339, 339, 
+  339, 339, 339, 339, 339, 339, 339, 339, 
+  339, 339, 339, 339, 339, 339, 339, 339, 
+  339, 339, 339, 339, 339, 339, 339, 339, 
+  339, 339, 339, 339, 339, 339, 339, 339, 
+  339, 339, 339, 339, 339, 339, 339, 339, 
+  339, 339, 339, 339, 339, 339, 339, 339, 
+  339, 339, 339, 339, 339, 339, 339, 339, 
+  339, 339, 339, 339, 339, 339, 339, 339, 
+  339, 339, 339, 339, 339, 339, 339, 339, 
+  339, 339, 339, 339, 339, 339, 339, 339, 
+  339, 339, 339, 339, 339, 339, 339, 339, 
+  339, 339, 339, 339, 339, 339, 339, 339, 
+  339, 339, 339, 339, 339, 339, 339, 339, 
+  339, 339, 339, 339, 339, 339, 339, 339, 
+  339, 339, 339, 339, 339, 339, 339, 339, 
+  339, 339, 339, 339, 339, 339, 339, 339, 
+  339, 339, 339, 339, 339, 339, 339, 339, 
+  339, 339, 339, 339, 339, 339, 339, 339, 
+  339, 339, 339, 339, 339, 339, 339, 339, 
+  339, 339, 339, 339, 339, 339, 339, 339, 
+  339, 339, 339, 339, 339, 339, 339, 339, 
+  339, 339, 339, 339, 339, 339, 0, 0, 
+  0, 76, 76, 76, 76, 76, 76, 76, 
+  76, 76, 76, 76, 76, 76, 76, 76, 
+  76, 76, 76, 76, 76, 76, 76, 76, 
+  76, 76, 76, 76, 76, 76, 76, 76, 
+  76, 76, 76, 76, 76, 76, 76, 76, 
+  76, 76, 76, 76, 76, 76, 76, 76, 
+  76, 76, 76, 76, 76, 76, 76, 76, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 46, 46, 46, 46, 46, 46, 46, 
+  46, 46, 46, 46, 46, 46, 46, 46, 
+  46, 46, 46, 46, 46, 46, 46, 46, 
+  506, 506, 506, 506, 0, 0, 0, 0, 
+  0, 46, 46, 0, 0, 0, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 339, 339, 1252, 339, 339, 339, 1101, 
+  339, 339, 339, 339, 1090, 339, 339, 339, 
+  339, 339, 339, 339, 339, 339, 339, 339, 
+  339, 339, 339, 339, 339, 339, 339, 339, 
+  339, 339, 339, 339, 1093, 1093, 1090, 1090, 
+  1093, 76, 76, 76, 76, 0, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 339, 339, 339, 339, 339, 339, 339, 
+  339, 339, 339, 339, 339, 339, 339, 339, 
+  339, 339, 339, 339, 339, 339, 339, 339, 
+  339, 339, 339, 339, 339, 339, 339, 339, 
+  339, 339, 339, 339, 339, 339, 339, 339, 
+  339, 339, 339, 339, 339, 339, 339, 339, 
+  339, 339, 339, 339, 339, 8, 8, 8, 
+  8, 0, 0, 0, 0, 0, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 339, 339, 339, 339, 339, 339, 339, 
+  339, 339, 339, 339, 339, 339, 339, 339, 
+  339, 339, 339, 339, 339, 339, 339, 339, 
+  339, 339, 339, 339, 339, 339, 339, 339, 
+  339, 339, 339, 339, 339, 339, 339, 339, 
+  339, 339, 339, 339, 339, 339, 339, 339, 
+  339, 339, 339, 339, 339, 339, 339, 339, 
+  339, 339, 339, 339, 339, 339, 339, 339, 
+  339, 339, 339, 339, 339, 339, 339, 339, 
+  339, 339, 339, 339, 339, 339, 339, 339, 
+  339, 339, 339, 339, 339, 339, 339, 339, 
+  339, 339, 339, 339, 339, 339, 339, 339, 
+  339, 339, 339, 339, 339, 339, 339, 339, 
+  339, 339, 339, 339, 339, 339, 339, 339, 
+  339, 339, 339, 339, 339, 339, 339, 339, 
+  339, 339, 339, 339, 339, 339, 339, 339, 
+  339, 339, 339, 339, 339, 339, 339, 339, 
+  339, 339, 339, 339, 339, 339, 339, 339, 
+  339, 339, 339, 339, 339, 339, 339, 339, 
+  339, 339, 339, 339, 339, 339, 339, 339, 
+  339, 339, 339, 339, 339, 0, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 3439, 3439, 3439, 3439, 3439, 3439, 3439, 
+  3439, 3439, 3439, 3439, 3439, 3439, 3439, 3439, 
+  3439, 3439, 3439, 3439, 3439, 3439, 3439, 3439, 
+  3439, 3439, 3439, 3439, 3439, 3439, 3439, 3439, 
+  3439, 3439, 3439, 3439, 3439, 3439, 3439, 3439, 
+  3439, 3439, 3439, 3439, 3439, 3439, 3439, 3439, 
+  3439, 3439, 3439, 3439, 3439, 3439, 3439, 3439, 
+  3439, 3439, 3439, 3439, 3439, 3439, 3439, 3439, 
+  3439, 3439, 3439, 3439, 3439, 3439, 3439, 3439, 
+  3439, 3439, 3439, 3439, 3439, 3439, 3439, 3439, 
+  3439, 3439, 3439, 3439, 3439, 3439, 3439, 3439, 
+  3439, 3439, 3439, 3439, 3439, 3439, 3439, 3439, 
+  3439, 3439, 3439, 3439, 3439, 3439, 3439, 3439, 
+  3439, 3439, 3439, 3439, 3439, 3439, 3439, 3439, 
+  3439, 3439, 3439, 3439, 3439, 3439, 3439, 3439, 
+  3439, 3439, 3439, 3439, 3439, 3439, 3439, 3439, 
+  3439, 3439, 3439, 3439, 3439, 3439, 3439, 3439, 
+  3439, 3439, 3439, 3439, 3439, 3439, 3439, 3439, 
+  3439, 3439, 3439, 3439, 3439, 3439, 3439, 3439, 
+  3439, 3439, 3439, 3439, 3439, 3439, 3439, 3439, 
+  3439, 3439, 3439, 3439, 3439, 3439, 3439, 3439, 
+  3439, 3439, 3439, 3439, 3439, 3439, 3439, 3439, 
+  3439, 3439, 3439, 3439, 3439, 3439, 3439, 3439, 
+  3439, 3439, 3439, 3439, 3439, 3439, 3439, 3439, 
+  3439, 3439, 3439, 3439, 3439, 3439, 3439, 3439, 
+  3439, 3439, 3439, 3439, 3439, 3439, 3439, 3439, 
+  3439, 3439, 3439, 3439, 3439, 3439, 3439, 3439, 
+  3439, 3439, 3439, 3439, 3439, 3439, 3439, 3439, 
+  3439, 3439, 3439, 3439, 3439, 3439, 3439, 3439, 
+  3439, 3439, 3439, 3439, 3439, 3439, 3439, 3439, 
+  3439, 3439, 3439, 3439, 3439, 3439, 3439, 3439, 
+  3439, 3439, 3439, 3439, 3439, 3439, 3439, 3439, 
+  3439, 3440, 3440, 3440, 3440, 3440, 3440, 3440, 
+  3440, 3440, 3440, 3440, 3440, 3440, 3440, 3440, 
+  3440, 3440, 3440, 3440, 3440, 3440, 3440, 3440, 
+  3440, 3440, 3440, 3440, 3440, 3440, 3440, 3440, 
+  3440, 3440, 3440, 3440, 3440, 3440, 3440, 3440, 
+  3440, 3440, 3440, 3440, 3440, 3440, 3440, 3440, 
+  3440, 3440, 3440, 3440, 3440, 3440, 3440, 3440, 
+  3440, 3440, 3440, 3440, 3440, 3440, 3440, 3440, 
+  3440, 3440, 3440, 3440, 3440, 3440, 3440, 3440, 
+  3440, 3440, 3440, 3440, 3440, 3440, 3440, 3440, 
+  3440, 3440, 3440, 3440, 3440, 3440, 3440, 3440, 
+  3440, 3440, 3440, 3440, 3440, 3440, 3440, 3440, 
+  3440, 3440, 3440, 3440, 3440, 3440, 3440, 3440, 
+  3440, 3440, 3440, 3440, 3440, 3440, 3440, 3440, 
+  3440, 3440, 3440, 3440, 3440, 3440, 3440, 3440, 
+  3440, 3440, 3440, 3440, 3440, 3440, 3440, 3440, 
+  3440, 3440, 3440, 3440, 3440, 3440, 3440, 3440, 
+  3440, 3440, 3440, 3440, 3440, 3440, 3440, 3440, 
+  3440, 3440, 3440, 3440, 3440, 3440, 3440, 3440, 
+  3440, 3440, 3440, 3440, 3440, 3440, 3440, 3440, 
+  3440, 3440, 3440, 3440, 3440, 3440, 3440, 3440, 
+  3440, 3440, 3440, 3440, 3440, 3440, 3440, 3440, 
+  3440, 3440, 3440, 3440, 3440, 3440, 3440, 3440, 
+  3440, 3440, 3440, 3440, 3440, 3440, 3440, 3440, 
+  3440, 3440, 3440, 3440, 3440, 3440, 3440, 3440, 
+  3440, 3440, 3440, 3440, 3440, 3440, 3440, 3440, 
+  3440, 3440, 3440, 3440, 3440, 3440, 3440, 3440, 
+  3440, 3440, 3440, 3440, 3440, 3440, 3440, 3440, 
+  3440, 3440, 3440, 3440, 3440, 3440, 3440, 3440, 
+  3440, 3440, 3440, 3440, 3440, 3440, 3440, 3440, 
+  3440, 3440, 3440, 3440, 3440, 3440, 3440, 3440, 
+  3440, 3440, 3440, 3440, 3440, 3440, 3440, 3440, 
+  3440, 3441, 3442, 3443, 3444, 3445, 3446, 3447, 
+  3448, 3448, 3449, 3450, 3451, 3452, 3453, 3454, 
+  3455, 3456, 3457, 3458, 3459, 3460, 3461, 3462, 
+  3463, 3464, 3465, 3466, 3467, 3468, 3469, 3470, 
+  3471, 3472, 3473, 3474, 3475, 3476, 3477, 3478, 
+  3479, 3480, 3481, 3482, 3483, 3484, 3485, 3486, 
+  3487, 3488, 3489, 3490, 3491, 3492, 3493, 3494, 
+  3495, 3496, 3497, 3498, 3499, 3500, 3501, 3502, 
+  3503, 3504, 3505, 3506, 3507, 3508, 3509, 3510, 
+  3511, 3512, 3513, 3514, 3515, 3516, 3517, 3518, 
+  3519, 3520, 3521, 3522, 3523, 3524, 3525, 3526, 
+  3527, 3528, 3529, 3530, 3531, 3460, 3532, 3533, 
+  3534, 3535, 3536, 3537, 3538, 3539, 3540, 3541, 
+  3542, 3543, 3544, 3545, 3546, 3547, 3548, 3549, 
+  3550, 3551, 3552, 3553, 3554, 3555, 3556, 3557, 
+  3558, 3559, 3560, 3561, 3562, 3563, 3564, 3565, 
+  3566, 3567, 3568, 3569, 3570, 3571, 3572, 3573, 
+  3574, 3575, 3576, 3577, 3578, 3579, 3580, 3581, 
+  3582, 3583, 3584, 3585, 3586, 3587, 3588, 3589, 
+  3590, 3591, 3592, 3593, 3594, 3595, 3596, 3597, 
+  3598, 3599, 3550, 3600, 3601, 3602, 3603, 3604, 
+  3605, 3606, 3607, 3534, 3608, 3609, 3610, 3611, 
+  3612, 3613, 3614, 3615, 3616, 3617, 3618, 3619, 
+  3620, 3621, 3622, 3623, 3624, 3625, 3626, 3627, 
+  3460, 3628, 3629, 3630, 3631, 3632, 3633, 3634, 
+  3635, 3636, 3637, 3638, 3639, 3640, 3641, 3642, 
+  3643, 3644, 3645, 3646, 3647, 3648, 3649, 3650, 
+  3651, 3652, 3653, 3654, 3536, 3655, 3656, 3657, 
+  3658, 3659, 3660, 3661, 3662, 3663, 3664, 3665, 
+  3666, 3667, 3668, 3669, 3670, 3671, 3672, 3673, 
+  3674, 3675, 3676, 3677, 3678, 3679, 3680, 3681, 
+  3682, 3683, 3684, 3685, 3686, 3687, 3688, 3689, 
+  3690, 3691, 3692, 3693, 3694, 3695, 3696, 3697, 
+  3698, 3699, 3700, 3701, 3702, 3703, 3704, 339, 
+  339, 3705, 339, 3706, 339, 339, 3707, 3708, 
+  3709, 3710, 3711, 3712, 3713, 3714, 3715, 3716, 
+  339, 3717, 339, 3718, 339, 339, 3719, 3720, 
+  339, 339, 339, 3721, 3722, 3723, 3724, 0, 
+  0, 3725, 3726, 3727, 3728, 3729, 3730, 3731, 
+  3732, 3733, 3734, 3735, 3736, 3737, 3738, 3739, 
+  3740, 3741, 3742, 3743, 3744, 3745, 3746, 3747, 
+  3748, 3749, 3750, 3751, 3752, 3753, 3754, 3755, 
+  3756, 3757, 3758, 3759, 3760, 3761, 3762, 3763, 
+  3589, 3764, 3765, 3766, 3767, 3768, 3769, 3769, 
+  3770, 3771, 3772, 3773, 3774, 3775, 3776, 3777, 
+  3719, 3778, 3779, 3780, 0, 0, 0, 0, 
+  0, 3781, 3782, 3783, 3784, 3785, 3786, 3787, 
+  3788, 3731, 3789, 3790, 3791, 3705, 3792, 3793, 
+  3794, 3795, 3796, 3797, 3798, 3799, 3800, 3801, 
+  3802, 3803, 3740, 3804, 3741, 3805, 3806, 3807, 
+  3808, 3809, 3706, 3481, 3810, 3811, 3812, 3551, 
+  3638, 3813, 3814, 3748, 3815, 3749, 3816, 3817, 
+  3818, 3708, 3819, 3820, 3821, 3822, 3823, 3709, 
+  3824, 3825, 3826, 3827, 3828, 3829, 3763, 3830, 
+  3831, 3589, 3832, 3767, 3833, 3834, 3835, 3836, 
+  3837, 3772, 3838, 3718, 3839, 3773, 3532, 3840, 
+  3774, 3841, 3776, 3842, 3843, 3844, 3845, 3846, 
+  3778, 3714, 3847, 3779, 3848, 3780, 3849, 3448, 
+  3850, 3851, 3852, 3853, 3854, 3855, 3856, 3857, 
+  3858, 3859, 3860, 0, 0, 0, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 3861, 3862, 3863, 3864, 3865, 3866, 3867, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 0, 0, 0, 3868, 3869, 3870, 3871, 
+  3872, 0, 0, 0, 0, 0, 3873, 3874, 
+  3875, 3876, 3877, 3878, 3879, 3880, 3881, 3882, 
+  3883, 3884, 3885, 3886, 3887, 3888, 3889, 3890, 
+  3891, 3892, 3893, 3894, 3895, 3896, 3897, 3898, 
+  0, 3899, 3900, 3901, 3902, 3903, 0, 3904, 
+  0, 3905, 3906, 0, 3907, 3908, 0, 3909, 
+  3910, 3911, 3912, 3913, 3914, 3915, 3916, 3917, 
+  3918, 3919, 3920, 3921, 3922, 3923, 3924, 3925, 
+  3926, 3927, 3928, 3929, 3930, 3931, 3932, 3933, 
+  3934, 3935, 3936, 3937, 3938, 3939, 3940, 3941, 
+  3942, 3943, 3944, 3945, 3946, 3947, 3948, 3949, 
+  3950, 3951, 3952, 3953, 3954, 3955, 3956, 3957, 
+  3958, 3959, 3960, 3961, 3962, 3963, 3964, 3965, 
+  3966, 3967, 3968, 3969, 3970, 3971, 3972, 3973, 
+  3974, 3975, 3976, 3977, 3978, 3979, 3980, 3981, 
+  3982, 3983, 3984, 3985, 3986, 3987, 3988, 3989, 
+  3990, 3991, 3992, 3993, 3994, 3995, 3996, 3997, 
+  3998, 3999, 4000, 4001, 4002, 4003, 4004, 4005, 
+  4006, 4007, 4008, 4009, 4010, 4011, 4012, 4013, 
+  4014, 4015, 4016, 0, 0, 0, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 0, 0, 0, 4017, 4018, 4019, 4020, 
+  4021, 4022, 4023, 4024, 4025, 4026, 4027, 4028, 
+  4029, 4030, 4031, 4032, 4033, 4034, 4035, 4036, 
+  4037, 4038, 4039, 4040, 4041, 4042, 4043, 4044, 
+  4045, 4046, 4047, 4048, 4049, 4050, 4051, 4052, 
+  4053, 4054, 4055, 4056, 4057, 4058, 4059, 4060, 
+  4061, 4062, 4063, 4064, 4055, 4065, 4066, 4067, 
+  4068, 4069, 4070, 4071, 4072, 4073, 4074, 4075, 
+  4076, 4077, 4078, 4079, 4080, 4081, 4082, 4083, 
+  4084, 4085, 4086, 4087, 4088, 4089, 4090, 4091, 
+  4092, 4093, 4094, 4095, 4096, 4097, 4098, 4099, 
+  4100, 4101, 4102, 4103, 4104, 4105, 4106, 4107, 
+  4108, 4109, 4110, 4111, 4112, 4113, 4114, 4115, 
+  4116, 4117, 4118, 4119, 4120, 4121, 4122, 4123, 
+  4124, 4125, 4126, 4127, 4128, 4129, 4130, 4131, 
+  4132, 4133, 4134, 4135, 4136, 4137, 4138, 4139, 
+  4140, 4141, 4142, 4143, 4144, 4145, 4146, 4147, 
+  4148, 4149, 4150, 4151, 4152, 4153, 4154, 4155, 
+  4156, 4157, 4158, 4159, 4160, 4161, 4162, 4163, 
+  4164, 4056, 4165, 4166, 4167, 4168, 4169, 4170, 
+  4171, 4172, 4173, 4174, 4175, 4176, 4177, 4178, 
+  4179, 4180, 4181, 4182, 4183, 4184, 4185, 4186, 
+  4187, 4188, 4189, 4190, 4191, 4192, 4193, 4194, 
+  4195, 4196, 4197, 4198, 4199, 4200, 4201, 4202, 
+  4203, 4204, 4205, 4206, 4207, 4208, 4209, 4210, 
+  4211, 4212, 4213, 4214, 4215, 4216, 4217, 4218, 
+  4219, 4220, 4221, 4222, 4223, 4224, 4225, 4226, 
+  4227, 4228, 4229, 4230, 4231, 4232, 4233, 4234, 
+  4235, 4236, 4237, 4238, 4239, 4240, 4241, 4242, 
+  4243, 4244, 4245, 4246, 4247, 4248, 4249, 4250, 
+  4251, 4252, 4253, 4254, 4255, 4256, 4257, 4258, 
+  4259, 4260, 4261, 4262, 4263, 4264, 4265, 4266, 
+  4267, 4268, 4269, 4270, 4271, 4272, 4273, 4274, 
+  4275, 4276, 4277, 4278, 4279, 4280, 4281, 4282, 
+  4283, 4284, 4285, 4286, 4287, 4288, 4289, 4290, 
+  4291, 4292, 4293, 4294, 4295, 4296, 4297, 4298, 
+  4299, 4300, 4301, 4302, 4303, 4304, 4305, 4306, 
+  4307, 4308, 4309, 4310, 4311, 4312, 4313, 4314, 
+  4315, 4316, 4317, 4318, 4319, 4320, 4321, 4322, 
+  4323, 4324, 4325, 4326, 4327, 4328, 4329, 4330, 
+  4331, 4332, 4333, 4334, 4335, 4336, 4337, 4338, 
+  4339, 4340, 4341, 4342, 4343, 4344, 4345, 4346, 
+  4347, 4348, 4349, 4350, 4351, 4352, 4353, 4354, 
+  4355, 4356, 4357, 4358, 4359, 4360, 4361, 4362, 
+  4363, 4364, 4365, 4366, 4367, 4368, 4369, 4370, 
+  4371, 4372, 4373, 4374, 4375, 4376, 4377, 4378, 
+  4379, 0, 0, 0, 0, 0, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 4380, 4381, 4382, 4383, 4384, 4385, 4386, 
+  4387, 4388, 4389, 4390, 4391, 4392, 4393, 4394, 
+  4395, 4396, 4397, 4398, 4399, 4400, 4401, 4402, 
+  4403, 4404, 4405, 4406, 4407, 4408, 4409, 4410, 
+  4411, 4412, 4413, 4414, 4415, 4416, 4417, 4418, 
+  4419, 4420, 4421, 4422, 4423, 4424, 4425, 4426, 
+  4427, 4428, 4429, 4430, 4431, 4432, 4433, 4434, 
+  4435, 4436, 4437, 4438, 4439, 4440, 4441, 4442, 
+  4443, 0, 0, 4444, 4445, 4446, 4447, 4448, 
+  4449, 4450, 4451, 4452, 4453, 4454, 4455, 4456, 
+  4457, 4458, 4459, 4460, 4461, 4462, 4463, 4464, 
+  4465, 4466, 4467, 4468, 4469, 4470, 4471, 4472, 
+  4473, 4474, 4475, 4476, 4477, 4478, 4479, 4480, 
+  4481, 4482, 4483, 4484, 4485, 4486, 4487, 4488, 
+  4489, 4490, 4491, 4492, 4493, 4494, 4495, 4496, 
+  4497, 0, 0, 0, 0, 0, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 4498, 4499, 4500, 4501, 4502, 4503, 4504, 
+  4505, 4506, 4507, 4508, 4509, 4510, 76, 0, 
+  0, 558, 558, 558, 558, 558, 558, 558, 
+  558, 558, 558, 558, 558, 558, 558, 558, 
+  558, 4511, 4512, 4513, 4514, 4515, 4516, 4517, 
+  4518, 4519, 4520, 0, 0, 0, 0, 0, 
+  0, 524, 524, 524, 524, 0, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 4521, 4522, 4523, 4524, 4524, 4525, 4526, 
+  4527, 4528, 4529, 4530, 4531, 4532, 4533, 4534, 
+  4535, 4536, 4537, 4538, 4539, 4540, 8, 8, 
+  4541, 4542, 4543, 4543, 4543, 4543, 4544, 4544, 
+  4544, 4545, 4546, 4547, 0, 4548, 4549, 4550, 
+  4551, 4552, 4553, 4554, 4555, 4556, 4557, 4558, 
+  4559, 4560, 4561, 4562, 4563, 4564, 4565, 4566, 
+  0, 4567, 4568, 4569, 4570, 0, 0, 0, 
+  0, 4571, 4572, 4573, 1054, 4574, 0, 4575, 
+  4576, 4577, 4578, 4579, 4580, 4581, 4582, 4583, 
+  4584, 4585, 4586, 4587, 4588, 4589, 4590, 4591, 
+  4592, 4593, 4594, 4595, 4596, 4597, 4598, 4599, 
+  4600, 4601, 4602, 4603, 4604, 4605, 4606, 4607, 
+  4608, 4609, 4610, 4611, 4612, 4613, 4614, 4615, 
+  4616, 4617, 4618, 4619, 4620, 4621, 4622, 4623, 
+  4624, 4625, 4626, 4627, 4628, 4629, 4630, 4631, 
+  4632, 4633, 4634, 4635, 4636, 4637, 4638, 4639, 
+  4640, 4641, 4642, 4643, 4644, 4645, 4646, 4647, 
+  4648, 4649, 4650, 4651, 4652, 4653, 4654, 4655, 
+  4656, 4657, 4658, 4659, 4660, 4661, 4662, 4663, 
+  4664, 4665, 4666, 4667, 4668, 4669, 4670, 4671, 
+  4672, 4673, 4674, 4675, 4676, 4677, 4678, 4679, 
+  4680, 4681, 4682, 4683, 4684, 4685, 4686, 4687, 
+  4688, 4689, 4690, 4691, 4692, 4693, 4694, 4695, 
+  4696, 4697, 4698, 4699, 4700, 4701, 4702, 4703, 
+  4704, 4705, 4706, 4707, 4708, 4709, 0, 0, 
+  80, 0, 4710, 4711, 4712, 4713, 4714, 4715, 
+  4716, 4717, 4718, 4719, 4720, 4721, 4722, 4723, 
+  4724, 4725, 4726, 4727, 4728, 4729, 4730, 4731, 
+  4732, 4733, 4734, 4735, 4736, 4737, 4738, 4739, 
+  4740, 4741, 4742, 4743, 4744, 4745, 4746, 4747, 
+  4748, 4749, 4750, 4751, 4752, 4753, 4754, 4755, 
+  4756, 4757, 4758, 4759, 4760, 4761, 4762, 4763, 
+  4764, 4765, 4766, 4767, 4768, 4769, 4770, 4771, 
+  4772, 4773, 4774, 4775, 4776, 4777, 4778, 4779, 
+  4780, 4781, 4782, 4783, 4784, 4785, 4786, 4787, 
+  4788, 4789, 4790, 4791, 4792, 4793, 4794, 4795, 
+  4796, 4797, 4798, 4799, 4800, 4801, 4802, 4803, 
+  4804, 4805, 4806, 4807, 4808, 4809, 4810, 4811, 
+  4812, 4813, 4814, 4815, 4816, 4817, 4818, 4819, 
+  4820, 4821, 4822, 4823, 4824, 4825, 4826, 4827, 
+  4828, 4829, 4830, 4831, 4832, 4833, 4834, 4835, 
+  4836, 4837, 4838, 4839, 4840, 4841, 4842, 4843, 
+  4844, 4845, 4846, 4847, 4848, 4849, 4850, 4851, 
+  4852, 4853, 4854, 4855, 4856, 4857, 4858, 4859, 
+  4860, 4861, 4862, 4863, 4864, 4865, 4866, 4867, 
+  4868, 4869, 4870, 4871, 4872, 4873, 4874, 4875, 
+  4876, 4877, 4878, 4879, 4880, 4881, 4882, 4883, 
+  4884, 4885, 4886, 4887, 4888, 4889, 4890, 4891, 
+  4892, 4893, 4894, 4895, 4896, 4897, 4898, 4899, 
+  0, 0, 0, 4900, 4901, 4902, 4903, 4904, 
+  4905, 0, 0, 4906, 4907, 4908, 4909, 4910, 
+  4911, 0, 0, 4912, 4913, 4914, 4915, 4916, 
+  4917, 0, 0, 4918, 4919, 4920, 0, 0, 
+  0, 4921, 4922, 4923, 4924, 4925, 4926, 4927, 
+  0, 4928, 4929, 4930, 4931, 4932, 4933, 4934, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 0, 4935, 4935, 4935, 76, 76, 0, 
+  0, 339, 339, 339, 339, 339, 339, 339, 
+  339, 339, 339, 339, 339, 0, 339, 339, 
+  339, 339, 339, 339, 339, 339, 339, 339, 
+  339, 339, 339, 339, 339, 339, 339, 339, 
+  339, 339, 339, 339, 339, 339, 339, 339, 
+  0, 339, 339, 339, 339, 339, 339, 339, 
+  339, 339, 339, 339, 339, 339, 339, 339, 
+  339, 339, 339, 339, 0, 339, 339, 0, 
+  339, 339, 339, 339, 339, 339, 339, 339, 
+  339, 339, 339, 339, 339, 339, 339, 0, 
+  0, 339, 339, 339, 339, 339, 339, 339, 
+  339, 339, 339, 339, 339, 339, 339, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 339, 339, 339, 339, 339, 339, 339, 
+  339, 339, 339, 339, 339, 339, 339, 339, 
+  339, 339, 339, 339, 339, 339, 339, 339, 
+  339, 339, 339, 339, 339, 339, 339, 339, 
+  339, 339, 339, 339, 339, 339, 339, 339, 
+  339, 339, 339, 339, 339, 339, 339, 339, 
+  339, 339, 339, 339, 339, 339, 339, 339, 
+  339, 339, 339, 339, 339, 339, 339, 339, 
+  339, 339, 339, 339, 339, 339, 339, 339, 
+  339, 339, 339, 339, 339, 339, 339, 339, 
+  339, 339, 339, 339, 339, 339, 339, 339, 
+  339, 339, 339, 339, 339, 339, 339, 339, 
+  339, 339, 339, 339, 339, 339, 339, 339, 
+  339, 339, 339, 339, 339, 339, 339, 339, 
+  339, 339, 339, 339, 339, 339, 339, 339, 
+  339, 339, 339, 339, 0, 0, 0, 0, 
+  0, 990, 8, 812, 0, 0, 0, 0, 
+  1120, 1120, 1120, 1120, 1120, 1120, 1120, 1120, 
+  1120, 1120, 1120, 1120, 1120, 1120, 1120, 1120, 
+  1120, 1120, 1120, 1120, 1120, 1120, 1120, 1120, 
+  1120, 1120, 1120, 1120, 1120, 1120, 1120, 1120, 
+  1120, 1120, 1120, 1120, 1120, 1120, 1120, 1120, 
+  1120, 1120, 1120, 1120, 1120, 0, 0, 0, 
+  812, 812, 812, 812, 812, 812, 812, 812, 
+  812, 4936, 4936, 4936, 4936, 4936, 4936, 4936, 
+  4936, 4936, 4936, 4936, 4936, 4936, 4936, 4936, 
+  4936, 4936, 4936, 4936, 4936, 4936, 4936, 4936, 
+  4936, 4936, 4936, 4936, 4936, 4936, 4936, 4936, 
+  4936, 4936, 4936, 4936, 4936, 4936, 4936, 4936, 
+  4936, 4936, 4936, 4936, 4936, 4936, 4936, 4936, 
+  4936, 4936, 4936, 4936, 4936, 4936, 1251, 1251, 
+  1251, 1251, 76, 76, 76, 76, 76, 76, 
+  76, 76, 76, 76, 76, 76, 76, 76, 
+  76, 76, 76, 1251, 0, 0, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 339, 339, 339, 339, 339, 339, 339, 
+  339, 339, 339, 339, 339, 339, 339, 339, 
+  339, 339, 339, 339, 339, 339, 339, 339, 
+  339, 339, 339, 339, 339, 339, 339, 339, 
+  0, 1120, 1120, 1120, 1120, 0, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 339, 339, 339, 339, 339, 339, 339, 
+  339, 339, 339, 339, 339, 339, 339, 339, 
+  339, 339, 1249, 339, 339, 339, 339, 339, 
+  339, 339, 339, 1249, 0, 0, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 339, 339, 339, 339, 339, 339, 339, 
+  339, 339, 339, 339, 339, 339, 339, 339, 
+  339, 339, 339, 339, 339, 339, 339, 339, 
+  339, 339, 339, 339, 339, 339, 339, 0, 
+  990, 339, 339, 339, 339, 339, 339, 339, 
+  339, 339, 339, 339, 339, 339, 339, 339, 
+  339, 339, 339, 339, 339, 339, 339, 339, 
+  339, 339, 339, 339, 339, 339, 339, 339, 
+  339, 339, 339, 339, 339, 0, 0, 0, 
+  0, 339, 339, 339, 339, 339, 339, 339, 
+  339, 990, 1249, 1249, 1249, 1249, 1249, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 4937, 4938, 4939, 4940, 4941, 4942, 4943, 
+  4944, 4945, 4946, 4947, 4948, 4949, 4950, 4951, 
+  4952, 4953, 4954, 4955, 4956, 4957, 4958, 4959, 
+  4960, 4961, 4962, 4963, 4964, 4965, 4966, 4967, 
+  4968, 4969, 4970, 4971, 4972, 4973, 4974, 4975, 
+  4976, 4977, 4978, 4979, 4980, 4981, 4982, 4983, 
+  4984, 4985, 4986, 4987, 4988, 4989, 4990, 4991, 
+  4992, 4993, 4994, 4995, 4996, 4997, 4998, 4999, 
+  5000, 5001, 5002, 5003, 5004, 5005, 5006, 5007, 
+  5008, 5009, 5010, 5011, 5012, 5013, 5014, 5015, 
+  5016, 339, 339, 339, 339, 339, 339, 339, 
+  339, 339, 339, 339, 339, 339, 339, 339, 
+  339, 339, 339, 339, 339, 339, 339, 339, 
+  339, 339, 339, 339, 339, 339, 339, 339, 
+  339, 339, 339, 339, 339, 339, 339, 339, 
+  339, 339, 339, 339, 339, 339, 339, 339, 
+  339, 339, 339, 339, 339, 339, 339, 339, 
+  339, 339, 339, 339, 339, 339, 339, 339, 
+  339, 339, 339, 339, 339, 339, 339, 339, 
+  339, 339, 339, 339, 339, 339, 339, 0, 
+  0, 1110, 1110, 1110, 1110, 1110, 1110, 1110, 
+  1110, 1110, 1110, 0, 0, 0, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 1050, 1050, 1050, 1050, 1050, 1050, 0, 
+  0, 1050, 0, 1050, 1050, 1050, 1050, 1050, 
+  1050, 1050, 1050, 1050, 1050, 1050, 1050, 1050, 
+  1050, 1050, 1050, 1050, 1050, 1050, 1050, 1050, 
+  1050, 1050, 1050, 1050, 1050, 1050, 1050, 1050, 
+  1050, 1050, 1050, 1050, 1050, 1050, 1050, 1050, 
+  1050, 1050, 1050, 1050, 1050, 1050, 1050, 0, 
+  1050, 1050, 0, 0, 0, 1050, 0, 0, 
+  1050, 0, 0, 0, 0, 0, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 1050, 1050, 1050, 1050, 1050, 1050, 1050, 
+  1050, 1050, 1050, 1050, 1050, 1050, 1050, 1050, 
+  1050, 1050, 1050, 1050, 1050, 1050, 1050, 5017, 
+  5017, 5017, 5017, 0, 0, 0, 0, 0, 
+  8, 0, 0, 0, 0, 0, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 1050, 1090, 1090, 1090, 0, 1090, 1090, 
+  0, 0, 0, 0, 0, 1090, 537, 1090, 
+  524, 1050, 1050, 1050, 1050, 0, 1050, 1050, 
+  1050, 0, 1050, 1050, 1050, 1050, 1050, 1050, 
+  1050, 1050, 1050, 1050, 1050, 1050, 1050, 1050, 
+  1050, 1050, 1050, 1050, 1050, 1050, 1050, 1050, 
+  1050, 1050, 1050, 1050, 1050, 0, 0, 0, 
+  0, 524, 550, 537, 0, 0, 0, 0, 
+  1101, 5017, 5017, 5017, 5017, 5017, 5017, 5017, 
+  5017, 0, 0, 0, 0, 0, 0, 0, 
+  0, 1046, 1046, 1046, 1046, 1046, 1046, 1046, 
+  1046, 1046, 0, 0, 0, 0, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 339, 339, 339, 339, 339, 339, 339, 
+  339, 339, 339, 339, 339, 339, 339, 339, 
+  339, 339, 339, 339, 339, 339, 339, 339, 
+  339, 339, 339, 339, 339, 339, 339, 339, 
+  339, 339, 339, 339, 339, 339, 339, 339, 
+  339, 339, 339, 339, 339, 339, 339, 339, 
+  339, 339, 339, 339, 339, 339, 339, 339, 
+  339, 339, 339, 339, 339, 339, 339, 339, 
+  339, 339, 339, 339, 339, 339, 339, 339, 
+  339, 339, 339, 339, 339, 339, 339, 339, 
+  339, 339, 339, 339, 339, 339, 339, 339, 
+  339, 339, 339, 339, 339, 339, 339, 339, 
+  339, 339, 339, 339, 339, 339, 339, 339, 
+  339, 339, 339, 339, 339, 339, 339, 339, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 1249, 1249, 1249, 1249, 1249, 1249, 1249, 
+  1249, 1249, 1249, 1249, 1249, 1249, 1249, 1249, 
+  1249, 1249, 1249, 1249, 1249, 1249, 1249, 1249, 
+  1249, 1249, 1249, 1249, 1249, 1249, 1249, 1249, 
+  1249, 1249, 1249, 1249, 1249, 1249, 1249, 1249, 
+  1249, 1249, 1249, 1249, 1249, 1249, 1249, 1249, 
+  1249, 1249, 1249, 1249, 1249, 1249, 1249, 1249, 
+  1249, 1249, 1249, 1249, 1249, 1249, 1249, 1249, 
+  1249, 1249, 1249, 1249, 1249, 1249, 1249, 1249, 
+  1249, 1249, 1249, 1249, 1249, 1249, 1249, 1249, 
+  1249, 1249, 1249, 1249, 1249, 1249, 1249, 1249, 
+  1249, 1249, 1249, 1249, 1249, 1249, 1249, 1249, 
+  1249, 1249, 1249, 1249, 0, 0, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 990, 990, 990, 990, 0, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 812, 812, 812, 812, 812, 812, 812, 
+  812, 812, 812, 812, 812, 812, 812, 812, 
+  812, 812, 812, 812, 812, 812, 812, 812, 
+  812, 812, 812, 812, 812, 812, 812, 812, 
+  812, 812, 812, 812, 812, 812, 812, 812, 
+  812, 812, 812, 812, 812, 812, 812, 812, 
+  812, 812, 812, 812, 812, 812, 812, 812, 
+  812, 812, 812, 812, 812, 812, 812, 812, 
+  812, 812, 812, 812, 812, 812, 812, 812, 
+  812, 812, 812, 812, 812, 812, 812, 812, 
+  812, 812, 812, 812, 812, 812, 812, 812, 
+  812, 812, 812, 812, 812, 812, 812, 812, 
+  812, 812, 812, 812, 812, 812, 812, 812, 
+  812, 812, 812, 812, 812, 812, 812, 812, 
+  812, 812, 812, 812, 812, 812, 812, 812, 
+  812, 812, 812, 812, 812, 812, 812, 812, 
+  812, 812, 812, 812, 812, 812, 812, 812, 
+  812, 812, 812, 812, 812, 812, 812, 812, 
+  812, 812, 812, 812, 812, 812, 812, 812, 
+  812, 812, 812, 812, 812, 812, 812, 812, 
+  812, 812, 812, 812, 812, 812, 812, 812, 
+  812, 812, 812, 812, 812, 812, 812, 812, 
+  812, 812, 812, 812, 812, 812, 812, 812, 
+  812, 812, 812, 812, 812, 812, 812, 812, 
+  812, 812, 812, 812, 812, 812, 812, 812, 
+  812, 812, 812, 812, 812, 812, 812, 812, 
+  812, 812, 812, 812, 812, 812, 812, 812, 
+  812, 812, 812, 812, 812, 812, 812, 812, 
+  812, 812, 812, 812, 812, 812, 812, 812, 
+  812, 812, 812, 812, 812, 812, 812, 812, 
+  812, 812, 812, 812, 812, 812, 812, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 812, 812, 812, 812, 812, 812, 812, 
+  812, 812, 812, 812, 812, 812, 812, 812, 
+  812, 812, 812, 812, 812, 812, 812, 812, 
+  812, 812, 812, 812, 812, 812, 812, 812, 
+  812, 812, 812, 812, 812, 812, 812, 812, 
+  0, 0, 0, 812, 812, 812, 812, 812, 
+  812, 812, 812, 812, 812, 812, 812, 812, 
+  812, 812, 812, 812, 812, 812, 812, 812, 
+  812, 812, 812, 812, 812, 812, 812, 812, 
+  812, 812, 812, 812, 812, 812, 812, 812, 
+  812, 812, 812, 812, 812, 812, 812, 812, 
+  5018, 5019, 812, 812, 812, 812, 812, 5020, 
+  5021, 5022, 5023, 5024, 5025, 5026, 5027, 5028, 
+  550, 550, 550, 812, 812, 812, 5029, 5030, 
+  5031, 5032, 5033, 5034, 80, 80, 80, 80, 
+  80, 80, 80, 80, 537, 537, 537, 537, 
+  537, 537, 537, 537, 812, 812, 524, 524, 
+  524, 524, 524, 537, 537, 812, 812, 812, 
+  812, 812, 812, 812, 812, 812, 812, 812, 
+  812, 812, 812, 812, 812, 812, 812, 812, 
+  812, 812, 812, 812, 812, 812, 812, 812, 
+  812, 812, 812, 524, 524, 524, 524, 812, 
+  812, 812, 812, 812, 812, 812, 812, 812, 
+  812, 812, 5035, 5036, 5037, 5038, 5039, 5040, 
+  5041, 5042, 812, 812, 812, 812, 812, 812, 
+  812, 812, 812, 812, 812, 812, 812, 812, 
+  812, 812, 812, 812, 812, 812, 812, 812, 
+  812, 812, 812, 812, 812, 812, 812, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 76, 76, 76, 76, 76, 76, 76, 
+  76, 76, 76, 76, 76, 76, 76, 76, 
+  76, 76, 76, 76, 76, 76, 76, 76, 
+  76, 76, 76, 76, 76, 76, 76, 76, 
+  76, 76, 76, 76, 76, 76, 76, 76, 
+  76, 76, 76, 76, 76, 76, 76, 76, 
+  76, 76, 76, 76, 76, 76, 76, 76, 
+  76, 76, 76, 76, 76, 76, 76, 76, 
+  76, 76, 76, 524, 524, 524, 76, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 76, 76, 76, 76, 76, 76, 76, 
+  76, 76, 76, 76, 76, 76, 76, 76, 
+  76, 76, 76, 76, 76, 76, 76, 76, 
+  76, 76, 76, 76, 76, 76, 76, 76, 
+  76, 76, 76, 76, 76, 76, 76, 76, 
+  76, 76, 76, 76, 76, 76, 76, 76, 
+  76, 76, 76, 76, 76, 76, 76, 76, 
+  76, 76, 76, 76, 76, 76, 76, 76, 
+  76, 76, 76, 76, 76, 76, 76, 76, 
+  76, 76, 76, 76, 76, 76, 76, 76, 
+  76, 76, 76, 76, 76, 76, 76, 76, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 1120, 1120, 1120, 1120, 1120, 1120, 1120, 
+  1120, 1120, 1120, 1120, 1120, 1120, 1120, 1120, 
+  1120, 1120, 1120, 0, 0, 0, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 5043, 1945, 1920, 1963, 1947, 1948, 5044, 
+  1927, 1930, 5045, 5046, 1931, 1950, 1933, 5047, 
+  1935, 1936, 1937, 5048, 5049, 5050, 5051, 5052, 
+  5053, 5054, 1941, 5055, 5056, 5057, 1964, 1946, 
+  5058, 1926, 1928, 1956, 1965, 5059, 1932, 5060, 
+  5061, 1951, 5062, 5063, 5064, 5065, 5066, 5067, 
+  5068, 5069, 5070, 5071, 5072, 5043, 1945, 1920, 
+  1963, 1947, 1948, 5044, 1927, 1930, 5045, 5046, 
+  1931, 1950, 1933, 5047, 1935, 1936, 1937, 5048, 
+  5049, 5050, 5051, 5052, 5053, 5054, 1941, 5055, 
+  5056, 5057, 1964, 1946, 5058, 1926, 0, 1956, 
+  1965, 5059, 1932, 5060, 5061, 1951, 5062, 5063, 
+  5064, 5065, 5066, 5067, 5068, 5069, 5070, 5071, 
+  5072, 5043, 1945, 1920, 1963, 1947, 1948, 5044, 
+  1927, 1930, 5045, 5046, 1931, 1950, 1933, 5047, 
+  1935, 1936, 1937, 5048, 5049, 5050, 5051, 5052, 
+  5053, 5054, 1941, 5055, 5056, 5057, 1964, 1946, 
+  5058, 1926, 1928, 1956, 1965, 5059, 1932, 5060, 
+  5061, 1951, 5062, 5063, 5064, 5065, 5066, 5067, 
+  5068, 5069, 5070, 5071, 5072, 5043, 0, 1920, 
+  1963, 0, 0, 5044, 0, 0, 5045, 5046, 
+  0, 0, 1933, 5047, 1935, 1936, 0, 5048, 
+  5049, 5050, 5051, 5052, 5053, 5054, 1941, 5055, 
+  5056, 5057, 1964, 0, 5058, 0, 1928, 1956, 
+  1965, 5059, 1932, 5060, 5061, 0, 5062, 5063, 
+  5064, 5065, 5066, 5067, 5068, 5069, 5070, 5071, 
+  5072, 5043, 1945, 1920, 1963, 1947, 1948, 5044, 
+  1927, 1930, 5045, 5046, 1931, 1950, 1933, 5047, 
+  1935, 1936, 1937, 5048, 5049, 5050, 5051, 5052, 
+  5053, 5054, 1941, 5055, 5056, 5057, 1964, 1946, 
+  5058, 1926, 1928, 1956, 1965, 5059, 1932, 5060, 
+  5061, 1951, 5062, 5063, 5064, 5065, 5066, 5067, 
+  5068, 5069, 5070, 5071, 5072, 5043, 1945, 0, 
+  1963, 1947, 1948, 5044, 0, 0, 5045, 5046, 
+  1931, 1950, 1933, 5047, 1935, 1936, 0, 5048, 
+  5049, 5050, 5051, 5052, 5053, 5054, 0, 5055, 
+  5056, 5057, 1964, 1946, 5058, 1926, 1928, 1956, 
+  1965, 5059, 1932, 5060, 5061, 1951, 5062, 5063, 
+  5064, 5065, 5066, 5067, 5068, 5069, 5070, 5071, 
+  5072, 5043, 1945, 0, 1963, 1947, 1948, 5044, 
+  0, 1930, 5045, 5046, 1931, 1950, 0, 5047, 
+  0, 0, 0, 5048, 5049, 5050, 5051, 5052, 
+  5053, 5054, 0, 5055, 5056, 5057, 1964, 1946, 
+  5058, 1926, 1928, 1956, 1965, 5059, 1932, 5060, 
+  5061, 1951, 5062, 5063, 5064, 5065, 5066, 5067, 
+  5068, 5069, 5070, 5071, 5072, 5043, 1945, 1920, 
+  1963, 1947, 1948, 5044, 1927, 1930, 5045, 5046, 
+  1931, 1950, 1933, 5047, 1935, 1936, 1937, 5048, 
+  5049, 5050, 5051, 5052, 5053, 5054, 1941, 5055, 
+  5056, 5057, 1964, 1946, 5058, 1926, 1928, 1956, 
+  1965, 5059, 1932, 5060, 5061, 1951, 5062, 5063, 
+  5064, 5065, 5066, 5067, 5068, 5069, 5070, 5071, 
+  5072, 5043, 1945, 1920, 1963, 1947, 1948, 5044, 
+  1927, 1930, 5045, 5046, 1931, 1950, 1933, 5047, 
+  1935, 1936, 1937, 5048, 5049, 5050, 5051, 5052, 
+  5053, 5054, 1941, 5055, 5056, 5057, 1964, 1946, 
+  5058, 1926, 1928, 1956, 1965, 5059, 1932, 5060, 
+  5061, 1951, 5062, 5063, 5064, 5065, 5066, 5067, 
+  5068, 5069, 5070, 5071, 5072, 5043, 1945, 1920, 
+  1963, 1947, 1948, 5044, 1927, 1930, 5045, 5046, 
+  1931, 1950, 1933, 5047, 1935, 1936, 1937, 5048, 
+  5049, 5050, 5051, 5052, 5053, 5054, 1941, 5055, 
+  5056, 5057, 1964, 1946, 5058, 1926, 1928, 1956, 
+  1965, 5059, 1932, 5060, 5061, 1951, 5062, 5063, 
+  5064, 5065, 5066, 5067, 5068, 5069, 5070, 5071, 
+  5072, 5043, 1945, 1920, 1963, 1947, 1948, 5044, 
+  1927, 1930, 5045, 5046, 1931, 1950, 1933, 5047, 
+  1935, 1936, 1937, 5048, 5049, 5050, 5051, 5052, 
+  5053, 5054, 1941, 5055, 5056, 5057, 1964, 1946, 
+  5058, 1926, 1928, 1956, 1965, 5059, 1932, 5060, 
+  5061, 1951, 5062, 5063, 5064, 5065, 5066, 5067, 
+  5068, 5069, 5070, 5071, 5072, 5043, 1945, 1920, 
+  1963, 1947, 1948, 5044, 1927, 1930, 5045, 5046, 
+  1931, 1950, 1933, 5047, 1935, 1936, 1937, 5048, 
+  5049, 5050, 5051, 5052, 5053, 5054, 1941, 5055, 
+  5056, 5057, 1964, 1946, 5058, 1926, 1928, 1956, 
+  1965, 5059, 1932, 5060, 5061, 1951, 5062, 5063, 
+  5064, 5065, 5066, 5067, 5068, 5069, 5070, 5071, 
+  5072, 5043, 1945, 1920, 1963, 1947, 1948, 5044, 
+  1927, 1930, 5045, 5046, 1931, 1950, 1933, 5047, 
+  1935, 1936, 1937, 5048, 5049, 5050, 5051, 5052, 
+  5053, 5054, 1941, 5055, 5056, 5057, 1964, 1946, 
+  5058, 1926, 1928, 1956, 1965, 5059, 1932, 5060, 
+  5061, 1951, 5062, 5063, 5064, 5065, 5066, 5067, 
+  5068, 5069, 5070, 5071, 5072, 5073, 5074, 0, 
+  0, 5075, 5076, 1960, 5077, 5078, 5079, 5080, 
+  5081, 5082, 5083, 5084, 5085, 5086, 5087, 5088, 
+  1961, 5089, 5090, 5091, 5092, 5093, 5094, 5095, 
+  5096, 5097, 5098, 5099, 5100, 1959, 5101, 5102, 
+  5103, 5104, 5105, 5106, 5107, 5108, 5109, 5110, 
+  5111, 5112, 1958, 5113, 5114, 5115, 5116, 5117, 
+  5118, 5119, 5120, 5121, 5122, 5123, 5124, 5125, 
+  5126, 5127, 5128, 5075, 5076, 1960, 5077, 5078, 
+  5079, 5080, 5081, 5082, 5083, 5084, 5085, 5086, 
+  5087, 5088, 1961, 5089, 5090, 5091, 5092, 5093, 
+  5094, 5095, 5096, 5097, 5098, 5099, 5100, 1959, 
+  5101, 5102, 5103, 5104, 5105, 5106, 5107, 5108, 
+  5109, 5110, 5111, 5112, 1958, 5113, 5114, 5115, 
+  5116, 5117, 5118, 5119, 5120, 5121, 5122, 5123, 
+  5124, 5125, 5126, 5127, 5128, 5075, 5076, 1960, 
+  5077, 5078, 5079, 5080, 5081, 5082, 5083, 5084, 
+  5085, 5086, 5087, 5088, 1961, 5089, 5090, 5091, 
+  5092, 5093, 5094, 5095, 5096, 5097, 5098, 5099, 
+  5100, 1959, 5101, 5102, 5103, 5104, 5105, 5106, 
+  5107, 5108, 5109, 5110, 5111, 5112, 1958, 5113, 
+  5114, 5115, 5116, 5117, 5118, 5119, 5120, 5121, 
+  5122, 5123, 5124, 5125, 5126, 5127, 5128, 5075, 
+  5076, 1960, 5077, 5078, 5079, 5080, 5081, 5082, 
+  5083, 5084, 5085, 5086, 5087, 5088, 1961, 5089, 
+  5090, 5091, 5092, 5093, 5094, 5095, 5096, 5097, 
+  5098, 5099, 5100, 1959, 5101, 5102, 5103, 5104, 
+  5105, 5106, 5107, 5108, 5109, 5110, 5111, 5112, 
+  1958, 5113, 5114, 5115, 5116, 5117, 5118, 5119, 
+  5120, 5121, 5122, 5123, 5124, 5125, 5126, 5127, 
+  5128, 5075, 5076, 1960, 5077, 5078, 5079, 5080, 
+  5081, 5082, 5083, 5084, 5085, 5086, 5087, 5088, 
+  1961, 5089, 5090, 5091, 5092, 5093, 5094, 5095, 
+  5096, 5097, 5098, 5099, 5100, 1959, 5101, 5102, 
+  5103, 5104, 5105, 5106, 5107, 5108, 5109, 5110, 
+  5111, 5112, 1958, 5113, 5114, 5115, 5116, 5117, 
+  5118, 5119, 5120, 5121, 5122, 5123, 5124, 5125, 
+  5126, 5127, 5128, 5129, 5130, 0, 0, 5131, 
+  5132, 5133, 5134, 5135, 5136, 5137, 5138, 5139, 
+  5140, 5131, 5132, 5133, 5134, 5135, 5136, 5137, 
+  5138, 5139, 5140, 5131, 5132, 5133, 5134, 5135, 
+  5136, 5137, 5138, 5139, 5140, 5131, 5132, 5133, 
+  5134, 5135, 5136, 5137, 5138, 5139, 5140, 5131, 
+  5132, 5133, 5134, 5135, 5136, 5137, 5138, 5139, 
+  5140, 339, 339, 339, 339, 339, 339, 339, 
+  339, 339, 339, 339, 339, 339, 339, 339, 
+  339, 339, 339, 339, 339, 339, 339, 339, 
+  339, 339, 339, 339, 339, 339, 339, 339, 
+  339, 339, 339, 339, 339, 339, 339, 339, 
+  339, 339, 339, 339, 339, 339, 339, 339, 
+  339, 339, 339, 339, 339, 339, 339, 339, 
+  339, 339, 339, 339, 339, 339, 339, 339, 
+  339, 339, 339, 339, 339, 339, 339, 339, 
+  339, 339, 339, 339, 339, 339, 339, 339, 
+  339, 339, 339, 339, 339, 339, 339, 339, 
+  339, 339, 339, 339, 339, 339, 339, 339, 
+  339, 339, 339, 339, 339, 339, 339, 339, 
+  339, 339, 339, 339, 339, 339, 339, 339, 
+  339, 339, 339, 339, 339, 339, 339, 339, 
+  339, 339, 339, 339, 339, 339, 339, 339, 
+  339, 339, 339, 339, 339, 339, 339, 339, 
+  339, 339, 339, 339, 339, 339, 339, 339, 
+  339, 339, 339, 339, 339, 339, 339, 339, 
+  339, 339, 339, 339, 339, 339, 339, 339, 
+  339, 339, 339, 339, 339, 339, 339, 339, 
+  339, 339, 339, 339, 339, 339, 339, 339, 
+  339, 339, 339, 339, 339, 339, 339, 339, 
+  339, 339, 339, 339, 339, 339, 339, 339, 
+  339, 339, 339, 339, 339, 339, 339, 339, 
+  339, 339, 339, 339, 339, 339, 339, 339, 
+  339, 339, 339, 339, 339, 339, 339, 339, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 5141, 5142, 5143, 5144, 5145, 3725, 5146, 
+  5147, 5148, 5149, 3726, 5150, 5151, 5152, 3727, 
+  5153, 5154, 5155, 5156, 5157, 5158, 5159, 5160, 
+  5161, 5162, 5163, 5164, 3782, 5165, 5166, 5167, 
+  5168, 5169, 5170, 5171, 5172, 5173, 3787, 3728, 
+  3729, 3788, 5174, 5175, 3538, 5176, 3730, 5177, 
+  5178, 5179, 5180, 5180, 5180, 5181, 5182, 5183, 
+  5184, 5185, 5186, 5187, 5188, 5189, 5190, 5191, 
+  5192, 5193, 5194, 5195, 5196, 5197, 5198, 5198, 
+  3790, 5199, 5200, 5201, 5202, 3732, 5203, 5204, 
+  5205, 3691, 5206, 5207, 5208, 5209, 5210, 5211, 
+  5212, 5213, 5214, 5215, 5216, 5217, 5218, 5219, 
+  5220, 5221, 5222, 5223, 5224, 5225, 5226, 5227, 
+  5228, 5229, 5230, 5231, 5231, 5232, 5233, 5234, 
+  3534, 5235, 5236, 5237, 5238, 5239, 5240, 5241, 
+  5242, 3737, 5243, 5244, 5245, 5246, 5247, 5248, 
+  5249, 5250, 5251, 5252, 5253, 5254, 5255, 5256, 
+  5257, 5258, 5259, 5260, 5261, 5262, 5263, 3480, 
+  5264, 5265, 5266, 5266, 5267, 5268, 5268, 5269, 
+  5270, 5271, 5272, 5273, 5274, 5275, 5276, 5277, 
+  5278, 5279, 5280, 5281, 3738, 5282, 5283, 5284, 
+  5285, 3802, 5285, 5286, 3740, 5287, 5288, 5289, 
+  5290, 3741, 3453, 5291, 5292, 5293, 5294, 5295, 
+  5296, 5297, 5298, 5299, 5300, 5301, 5302, 5303, 
+  5304, 5305, 5306, 5307, 5308, 5309, 5310, 5311, 
+  5312, 3742, 5313, 5314, 5315, 5316, 5317, 5318, 
+  3744, 5319, 5320, 5321, 5322, 5323, 5324, 5325, 
+  5326, 3481, 3810, 5327, 5328, 5329, 5330, 5331, 
+  5332, 5333, 5334, 3745, 5335, 5336, 5337, 5338, 
+  3853, 5339, 5340, 5341, 5342, 5343, 5344, 5345, 
+  5346, 5347, 5348, 5349, 5350, 5351, 3551, 5352, 
+  5353, 5354, 5355, 5356, 5357, 5358, 5359, 5360, 
+  5361, 5362, 3746, 3638, 5363, 5364, 5365, 5366, 
+  5367, 5368, 5369, 5370, 3814, 5371, 5372, 5373, 
+  5374, 5375, 5376, 5377, 5378, 3815, 5379, 5380, 
+  5381, 5382, 5383, 5384, 5385, 5386, 5387, 5388, 
+  5389, 5390, 3817, 5391, 5392, 5393, 5394, 5395, 
+  5396, 5397, 5398, 5399, 5400, 5401, 5401, 5402, 
+  5403, 3819, 5404, 5405, 5406, 5407, 5408, 5409, 
+  5410, 3537, 5411, 5412, 5413, 5414, 5415, 5416, 
+  5417, 3825, 5418, 5419, 5420, 5421, 5422, 5423, 
+  5423, 3826, 3855, 5424, 5425, 5426, 5427, 5428, 
+  3499, 3828, 5429, 5430, 3757, 5431, 5432, 3713, 
+  5433, 5434, 3761, 5435, 5436, 5437, 5438, 5438, 
+  5439, 5440, 5441, 5442, 5443, 5444, 5445, 5446, 
+  5447, 5448, 5449, 5450, 5451, 5452, 5453, 5454, 
+  5455, 5456, 5457, 5458, 5459, 5460, 5461, 5462, 
+  5463, 5464, 5465, 3767, 5466, 5467, 5468, 5469, 
+  5470, 5471, 5472, 5473, 5474, 5475, 5476, 5477, 
+  5478, 5479, 5480, 5481, 5267, 5482, 5483, 5484, 
+  5485, 5486, 5487, 5488, 5489, 5490, 5491, 5492, 
+  5493, 3555, 5494, 5495, 5496, 5497, 5498, 5499, 
+  3770, 5500, 5501, 5502, 5503, 5504, 5505, 5506, 
+  5507, 5508, 5509, 5510, 5511, 5512, 5513, 5514, 
+  5515, 5516, 5517, 5518, 5519, 3494, 5520, 5521, 
+  5522, 5523, 5524, 5525, 3835, 5526, 5527, 5528, 
+  5529, 5530, 5531, 5532, 5533, 5534, 5535, 5536, 
+  5537, 5538, 5539, 5540, 5541, 5542, 5543, 5544, 
+  5545, 3840, 3841, 5546, 5547, 5548, 5549, 5550, 
+  5551, 5552, 5553, 5554, 5555, 5556, 5557, 5558, 
+  3842, 5559, 5560, 5561, 5562, 5563, 5564, 5565, 
+  5566, 5567, 5568, 5569, 5570, 5571, 5572, 5573, 
+  5574, 5575, 5576, 5577, 5578, 5579, 5580, 5581, 
+  5582, 5583, 5584, 5585, 5586, 5587, 5588, 3848, 
+  3848, 5589, 5590, 5591, 5592, 5593, 5594, 5595, 
+  5596, 5597, 5598, 3849, 5599, 5600, 5601, 5602, 
+  5603, 5604, 5605, 5606, 5607, 5608, 5609, 5610, 
+  5611, 5612, 5613, 5614, 5615, 5616, 5617, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 0, 80, 0, 0, 0, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 80, 80, 80, 80, 80, 80, 80, 
+  80, 80, 80, 80, 80, 80, 80, 80, 
+  80, 80, 80, 80, 80, 80, 80, 80, 
+  80, 80, 80, 80, 80, 80, 80, 80, 
+  80, 80, 80, 80, 80, 80, 80, 80, 
+  80, 80, 80, 80, 80, 80, 80, 80, 
+  80, 80, 80, 80, 80, 80, 80, 80, 
+  80, 80, 80, 80, 80, 80, 80, 80, 
+  80, 80, 80, 80, 80, 80, 80, 80, 
+  80, 80, 80, 80, 80, 80, 80, 80, 
+  80, 80, 80, 80, 80, 80, 80, 80, 
+  80, 80, 80, 80, 80, 80, 80, 80, 
+  80, 0, 0, 0, 0, 0, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 558, 558, 558, 558, 558, 558, 558, 
+  558, 558, 558, 558, 558, 558, 558, 558, 
+  558, 558, 558, 558, 558, 558, 558, 558, 
+  558, 558, 558, 558, 558, 558, 558, 558, 
+  558, 558, 558, 558, 558, 558, 558, 558, 
+  558, 558, 558, 558, 558, 558, 558, 558, 
+  558, 558, 558, 558, 558, 558, 558, 558, 
+  558, 558, 558, 558, 558, 558, 558, 558, 
+  558, 558, 558, 558, 558, 558, 558, 558, 
+  558, 558, 558, 558, 558, 558, 558, 558, 
+  558, 558, 558, 558, 558, 558, 558, 558, 
+  558, 558, 558, 558, 558, 558, 558, 558, 
+  558, 558, 558, 558, 558, 558, 558, 558, 
+  558, 558, 558, 558, 558, 558, 558, 558, 
+  558, 558, 558, 558, 558, 558, 558, 558, 
+  558, 558, 558, 558, 558, 558, 558, 558, 
+  558, 558, 558, 558, 558, 558, 558, 558, 
+  558, 558, 558, 558, 558, 558, 558, 558, 
+  558, 558, 558, 558, 558, 558, 558, 558, 
+  558, 558, 558, 558, 558, 558, 558, 558, 
+  558, 558, 558, 558, 558, 558, 558, 558, 
+  558, 558, 558, 558, 558, 558, 558, 558, 
+  558, 558, 558, 558, 558, 558, 558, 558, 
+  558, 558, 558, 558, 558, 558, 558, 558, 
+  558, 558, 558, 558, 558, 558, 558, 558, 
+  558, 558, 558, 558, 558, 558, 558, 558, 
+  558, 558, 558, 558, 558, 558, 558, 558, 
+  558, 558, 558, 558, 558, 558, 558, 558, 
+  558, 558, 558, 558, 558, 558, 558, 558, 
+  558, 558, 558, 558, 558, 558, 558, 558, 
+  558, 0, 0, 0, 0, 0, 0, 0, 
+  0, 0, 0, 0, 0, 0, 0, 0, 
+  0, 3440, 3440, 3440, 3440, 3440, 3440, 3440, 
+  3440, 3440, 3440, 3440, 3440, 3440, 3440, 3440, 
+  3440, 3440, 3440, 3440, 3440, 3440, 3440, 3440, 
+  3440, 3440, 3440, 3440, 3440, 3440, 3440, 3440, 
+  3440, 3440, 3440, 3440, 3440, 3440, 3440, 3440, 
+  3440, 3440, 3440, 3440, 3440, 3440, 3440, 3440, 
+  3440, 3440, 3440, 3440, 3440, 3440, 3440, 3440, 
+  3440, 3440, 3440, 3440, 3440, 3440, 3440, 3440, 
+  3440, 3440, 3440, 3440, 3440, 3440, 3440, 3440, 
+  3440, 3440, 3440, 3440, 3440, 3440, 3440, 3440, 
+  3440, 3440, 3440, 3440, 3440, 3440, 3440, 3440, 
+  3440, 3440, 3440, 3440, 3440, 3440, 3440, 3440, 
+  3440, 3440, 3440, 3440, 3440, 3440, 3440, 3440, 
+  3440, 3440, 3440, 3440, 3440, 3440, 3440, 3440, 
+  3440, 3440, 3440, 3440, 3440, 3440, 3440, 3440, 
+  3440, 3440, 3440, 3440, 3440, 3440, 3440, 3440, 
+  3440, 3440, 3440, 3440, 3440, 3440, 3440, 3440, 
+  3440, 3440, 3440, 3440, 3440, 3440, 3440, 3440, 
+  3440, 3440, 3440, 3440, 3440, 3440, 3440, 3440, 
+  3440, 3440, 3440, 3440, 3440, 3440, 3440, 3440, 
+  3440, 3440, 3440, 3440, 3440, 3440, 3440, 3440, 
+  3440, 3440, 3440, 3440, 3440, 3440, 3440, 3440, 
+  3440, 3440, 3440, 3440, 3440, 3440, 3440, 3440, 
+  3440, 3440, 3440, 3440, 3440, 3440, 3440, 3440, 
+  3440, 3440, 3440, 3440, 3440, 3440, 3440, 3440, 
+  3440, 3440, 3440, 3440, 3440, 3440, 3440, 3440, 
+  3440, 3440, 3440, 3440, 3440, 3440, 3440, 3440, 
+  3440, 3440, 3440, 3440, 3440, 3440, 3440, 3440, 
+  3440, 3440, 3440, 3440, 3440, 3440, 3440, 3440, 
+  3440, 3440, 3440, 3440, 3440, 3440, 3440, 3440, 
+  3440, 3440, 3440, 3440, 3440, 3440, 3440, 3440, 
+  3440, 3440, 3440, 3440, 3440, 3440, 3440, 0, 
+  0, };
+
+const utf8proc_property_t utf8proc_properties[] = {
+  {0, 0, 0, 0, NULL, false, -1, -1, -1, -1, -1, false},
+  {UTF8PROC_CATEGORY_CC, 0, UTF8PROC_BIDI_CLASS_BN, 0, NULL, false, -1, -1, -1, -1, -1, false, true, true, false, NULL},
+  {UTF8PROC_CATEGORY_CC, 0, UTF8PROC_BIDI_CLASS_S, 0, NULL, false, -1, -1, -1, -1, -1, false, false, true, false, NULL},
+  {UTF8PROC_CATEGORY_CC, 0, UTF8PROC_BIDI_CLASS_B, 0, NULL, false, -1, -1, -1, -1, -1, false, false, true, false, NULL},
+  {UTF8PROC_CATEGORY_CC, 0, UTF8PROC_BIDI_CLASS_WS, 0, NULL, false, -1, -1, -1, -1, -1, false, false, true, false, NULL},
+  {UTF8PROC_CATEGORY_CC, 0, UTF8PROC_BIDI_CLASS_B, 0, NULL, false, -1, -1, -1, -1, -1, false, true, true, false, NULL},
+  {UTF8PROC_CATEGORY_CC, 0, UTF8PROC_BIDI_CLASS_S, 0, NULL, false, -1, -1, -1, -1, -1, false, true, true, false, NULL},
+  {UTF8PROC_CATEGORY_ZS, 0, UTF8PROC_BIDI_CLASS_WS, 0, NULL, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_PO, 0, UTF8PROC_BIDI_CLASS_ON, 0, NULL, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_PO, 0, UTF8PROC_BIDI_CLASS_ET, 0, NULL, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SC, 0, UTF8PROC_BIDI_CLASS_ET, 0, NULL, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_PS, 0, UTF8PROC_BIDI_CLASS_ON, 0, NULL, true, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_PE, 0, UTF8PROC_BIDI_CLASS_ON, 0, NULL, true, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SM, 0, UTF8PROC_BIDI_CLASS_ES, 0, NULL, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_PO, 0, UTF8PROC_BIDI_CLASS_CS, 0, NULL, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_PD, 0, UTF8PROC_BIDI_CLASS_ES, 0, NULL, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_ND, 0, UTF8PROC_BIDI_CLASS_EN, 0, NULL, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SM, 0, UTF8PROC_BIDI_CLASS_ON, 0, NULL, true, -1, -1, -1, 17580, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SM, 0, UTF8PROC_BIDI_CLASS_ON, 0, NULL, false, -1, -1, -1, 17400, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SM, 0, UTF8PROC_BIDI_CLASS_ON, 0, NULL, true, -1, -1, -1, 17640, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, 97, -1, 0, -1, false, false, false, false, utf8proc_sequences + 0},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, 98, -1, 8640, -1, false, false, false, false, utf8proc_sequences + 2},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, 99, -1, 60, -1, false, false, false, false, utf8proc_sequences + 4},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, 100, -1, 960, -1, false, false, false, false, utf8proc_sequences + 6},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, 101, -1, 120, -1, false, false, false, false, utf8proc_sequences + 8},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, 102, -1, 9120, -1, false, false, false, false, utf8proc_sequences + 10},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, 103, -1, 1080, -1, false, false, false, false, utf8proc_sequences + 12},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, 104, -1, 1200, -1, false, false, false, false, utf8proc_sequences + 14},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, 105, -1, 180, -1, false, false, false, false, utf8proc_sequences + 16},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, 106, -1, 1320, -1, false, false, false, false, utf8proc_sequences + 18},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, 107, -1, 1440, -1, false, false, false, false, utf8proc_sequences + 20},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, 108, -1, 1560, -1, false, false, false, false, utf8proc_sequences + 22},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, 109, -1, 9480, -1, false, false, false, false, utf8proc_sequences + 24},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, 110, -1, 240, -1, false, false, false, false, utf8proc_sequences + 26},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, 111, -1, 300, -1, false, false, false, false, utf8proc_sequences + 28},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, 112, -1, 9720, -1, false, false, false, false, utf8proc_sequences + 30},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, 113, -1, -1, -1, false, false, false, false, utf8proc_sequences + 32},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, 114, -1, 1680, -1, false, false, false, false, utf8proc_sequences + 34},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, 115, -1, 1800, -1, false, false, false, false, utf8proc_sequences + 36},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, 116, -1, 1920, -1, false, false, false, false, utf8proc_sequences + 38},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, 117, -1, 360, -1, false, false, false, false, utf8proc_sequences + 40},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, 118, -1, 10560, -1, false, false, false, false, utf8proc_sequences + 42},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, 119, -1, 2040, -1, false, false, false, false, utf8proc_sequences + 44},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, 120, -1, 10680, -1, false, false, false, false, utf8proc_sequences + 46},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, 121, -1, 420, -1, false, false, false, false, utf8proc_sequences + 48},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, 122, -1, 2160, -1, false, false, false, false, utf8proc_sequences + 50},
+  {UTF8PROC_CATEGORY_SK, 0, UTF8PROC_BIDI_CLASS_ON, 0, NULL, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_PC, 0, UTF8PROC_BIDI_CLASS_ON, 0, NULL, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, 65, -1, 65, 480, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, 66, -1, 66, 8700, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, 67, -1, 67, 540, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, 68, -1, 68, 1020, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, 69, -1, 69, 600, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, 70, -1, 70, 9180, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, 71, -1, 71, 1140, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, 72, -1, 72, 1260, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, 73, -1, 73, 660, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, 74, -1, 74, 1380, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, 75, -1, 75, 1500, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, 76, -1, 76, 1620, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, 77, -1, 77, 9540, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, 78, -1, 78, 720, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, 79, -1, 79, 780, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, 80, -1, 80, 9780, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, 81, -1, 81, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, 82, -1, 82, 1740, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, 83, -1, 83, 1860, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, 84, -1, 84, 1980, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, 85, -1, 85, 840, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, 86, -1, 86, 10620, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, 87, -1, 87, 2100, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, 88, -1, 88, 10740, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, 89, -1, 89, 900, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, 90, -1, 90, 2220, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SM, 0, UTF8PROC_BIDI_CLASS_ON, 0, NULL, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_ZS, 0, UTF8PROC_BIDI_CLASS_CS, UTF8PROC_DECOMP_TYPE_NOBREAK, utf8proc_sequences + 52, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_ON, 0, NULL, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SK, 0, UTF8PROC_BIDI_CLASS_ON, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 54, false, -1, -1, -1, 3600, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_SUPER, utf8proc_sequences + 0, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_PI, 0, UTF8PROC_BIDI_CLASS_ON, 0, NULL, true, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_CF, 0, UTF8PROC_BIDI_CLASS_BN, 0, NULL, false, -1, -1, -1, -1, -1, false, true, true, false, NULL},
+  {UTF8PROC_CATEGORY_SK, 0, UTF8PROC_BIDI_CLASS_ON, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 57, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_ET, 0, NULL, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SM, 0, UTF8PROC_BIDI_CLASS_ET, 0, NULL, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_NO, 0, UTF8PROC_BIDI_CLASS_EN, UTF8PROC_DECOMP_TYPE_SUPER, utf8proc_sequences + 60, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_NO, 0, UTF8PROC_BIDI_CLASS_EN, UTF8PROC_DECOMP_TYPE_SUPER, utf8proc_sequences + 62, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SK, 0, UTF8PROC_BIDI_CLASS_ON, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 64, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 67, false, 924, -1, 924, -1, -1, false, false, false, false, utf8proc_sequences + 67},
+  {UTF8PROC_CATEGORY_SK, 0, UTF8PROC_BIDI_CLASS_ON, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 69, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_NO, 0, UTF8PROC_BIDI_CLASS_EN, UTF8PROC_DECOMP_TYPE_SUPER, utf8proc_sequences + 72, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_SUPER, utf8proc_sequences + 28, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_PF, 0, UTF8PROC_BIDI_CLASS_ON, 0, NULL, true, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_NO, 0, UTF8PROC_BIDI_CLASS_ON, UTF8PROC_DECOMP_TYPE_FRACTION, utf8proc_sequences + 74, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_NO, 0, UTF8PROC_BIDI_CLASS_ON, UTF8PROC_DECOMP_TYPE_FRACTION, utf8proc_sequences + 78, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_NO, 0, UTF8PROC_BIDI_CLASS_ON, UTF8PROC_DECOMP_TYPE_FRACTION, utf8proc_sequences + 82, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 86, false, -1, 224, -1, -1, -1, false, false, false, false, utf8proc_sequences + 89},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 91, false, -1, 225, -1, -1, -1, false, false, false, false, utf8proc_sequences + 94},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 96, false, -1, 226, -1, 10860, -1, false, false, false, false, utf8proc_sequences + 99},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 101, false, -1, 227, -1, -1, -1, false, false, false, false, utf8proc_sequences + 104},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 106, false, -1, 228, -1, 2400, -1, false, false, false, false, utf8proc_sequences + 109},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 111, false, -1, 229, -1, 3000, -1, false, false, false, false, utf8proc_sequences + 114},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, 230, -1, 2640, -1, false, false, false, false, utf8proc_sequences + 116},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 118, false, -1, 231, -1, 8760, -1, false, false, false, false, utf8proc_sequences + 121},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 123, false, -1, 232, -1, -1, -1, false, false, false, false, utf8proc_sequences + 126},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 128, false, -1, 233, -1, -1, -1, false, false, false, false, utf8proc_sequences + 131},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 133, false, -1, 234, -1, 11220, -1, false, false, false, false, utf8proc_sequences + 136},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 138, false, -1, 235, -1, -1, -1, false, false, false, false, utf8proc_sequences + 141},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 143, false, -1, 236, -1, -1, -1, false, false, false, false, utf8proc_sequences + 146},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 148, false, -1, 237, -1, -1, -1, false, false, false, false, utf8proc_sequences + 151},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 153, false, -1, 238, -1, -1, -1, false, false, false, false, utf8proc_sequences + 156},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 158, false, -1, 239, -1, 9240, -1, false, false, false, false, utf8proc_sequences + 161},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, 240, -1, -1, -1, false, false, false, false, utf8proc_sequences + 163},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 165, false, -1, 241, -1, -1, -1, false, false, false, false, utf8proc_sequences + 168},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 170, false, -1, 242, -1, -1, -1, false, false, false, false, utf8proc_sequences + 173},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 175, false, -1, 243, -1, -1, -1, false, false, false, false, utf8proc_sequences + 178},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 180, false, -1, 244, -1, 11460, -1, false, false, false, false, utf8proc_sequences + 183},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 185, false, -1, 245, -1, 3360, -1, false, false, false, false, utf8proc_sequences + 188},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 190, false, -1, 246, -1, 3240, -1, false, false, false, false, utf8proc_sequences + 193},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, 248, -1, 3120, -1, false, false, false, false, utf8proc_sequences + 195},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 197, false, -1, 249, -1, -1, -1, false, false, false, false, utf8proc_sequences + 200},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 202, false, -1, 250, -1, -1, -1, false, false, false, false, utf8proc_sequences + 205},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 207, false, -1, 251, -1, -1, -1, false, false, false, false, utf8proc_sequences + 210},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 212, false, -1, 252, -1, 2280, -1, false, false, false, false, utf8proc_sequences + 215},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 217, false, -1, 253, -1, -1, -1, false, false, false, false, utf8proc_sequences + 220},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, 254, -1, -1, -1, false, false, false, false, utf8proc_sequences + 222},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, -1, -1, -1, -1, false, false, false, false, utf8proc_sequences + 224},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 227, false, 192, -1, 192, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 230, false, 193, -1, 193, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 233, false, 194, -1, 194, 10920, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 236, false, 195, -1, 195, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 239, false, 196, -1, 196, 2460, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 242, false, 197, -1, 197, 3060, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, 198, -1, 198, 2700, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 245, false, 199, -1, 199, 8820, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 248, false, 200, -1, 200, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 251, false, 201, -1, 201, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 254, false, 202, -1, 202, 11280, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 257, false, 203, -1, 203, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 260, false, 204, -1, 204, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 263, false, 205, -1, 205, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 266, false, 206, -1, 206, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 269, false, 207, -1, 207, 9300, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, 208, -1, 208, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 272, false, 209, -1, 209, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 275, false, 210, -1, 210, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 278, false, 211, -1, 211, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 281, false, 212, -1, 212, 11520, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 284, false, 213, -1, 213, 3420, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 287, false, 214, -1, 214, 3300, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, 216, -1, 216, 3180, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 290, false, 217, -1, 217, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 293, false, 218, -1, 218, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 296, false, 219, -1, 219, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 299, false, 220, -1, 220, 2340, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 302, false, 221, -1, 221, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, 222, -1, 222, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 305, false, 376, -1, 376, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 308, false, -1, 257, -1, -1, -1, false, false, false, false, utf8proc_sequences + 311},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 313, false, 256, -1, 256, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 316, false, -1, 259, -1, 11100, -1, false, false, false, false, utf8proc_sequences + 319},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 321, false, 258, -1, 258, 11160, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 324, false, -1, 261, -1, -1, -1, false, false, false, false, utf8proc_sequences + 327},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 329, false, 260, -1, 260, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 332, false, -1, 263, -1, -1, -1, false, false, false, false, utf8proc_sequences + 335},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 337, false, 262, -1, 262, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 340, false, -1, 265, -1, -1, -1, false, false, false, false, utf8proc_sequences + 343},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 345, false, 264, -1, 264, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 348, false, -1, 267, -1, -1, -1, false, false, false, false, utf8proc_sequences + 351},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 353, false, 266, -1, 266, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 356, false, -1, 269, -1, -1, -1, false, false, false, false, utf8proc_sequences + 359},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 361, false, 268, -1, 268, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 364, false, -1, 271, -1, -1, -1, false, false, false, false, utf8proc_sequences + 367},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 369, false, 270, -1, 270, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, 273, -1, -1, -1, false, false, false, false, utf8proc_sequences + 372},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, 272, -1, 272, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 374, false, -1, 275, -1, 8880, -1, false, false, false, false, utf8proc_sequences + 377},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 379, false, 274, -1, 274, 8940, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 382, false, -1, 277, -1, -1, -1, false, false, false, false, utf8proc_sequences + 385},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 387, false, 276, -1, 276, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 390, false, -1, 279, -1, -1, -1, false, false, false, false, utf8proc_sequences + 393},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 395, false, 278, -1, 278, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 398, false, -1, 281, -1, -1, -1, false, false, false, false, utf8proc_sequences + 401},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 403, false, 280, -1, 280, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 406, false, -1, 283, -1, -1, -1, false, false, false, false, utf8proc_sequences + 409},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 411, false, 282, -1, 282, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 414, false, -1, 285, -1, -1, -1, false, false, false, false, utf8proc_sequences + 417},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 419, false, 284, -1, 284, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 422, false, -1, 287, -1, -1, -1, false, false, false, false, utf8proc_sequences + 425},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 427, false, 286, -1, 286, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 430, false, -1, 289, -1, -1, -1, false, false, false, false, utf8proc_sequences + 433},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 435, false, 288, -1, 288, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 438, false, -1, 291, -1, -1, -1, false, false, false, false, utf8proc_sequences + 441},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 443, false, 290, -1, 290, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 446, false, -1, 293, -1, -1, -1, false, false, false, false, utf8proc_sequences + 449},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 451, false, 292, -1, 292, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, 295, -1, -1, -1, false, false, false, false, utf8proc_sequences + 454},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, 294, -1, 294, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 456, false, -1, 297, -1, -1, -1, false, false, false, false, utf8proc_sequences + 459},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 461, false, 296, -1, 296, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 464, false, -1, 299, -1, -1, -1, false, false, false, false, utf8proc_sequences + 467},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 469, false, 298, -1, 298, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 472, false, -1, 301, -1, -1, -1, false, false, false, false, utf8proc_sequences + 475},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 477, false, 300, -1, 300, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 480, false, -1, 303, -1, -1, -1, false, false, false, false, utf8proc_sequences + 483},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 485, false, 302, -1, 302, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 488, false, -1, 105, -1, -1, -1, false, false, false, false, utf8proc_sequences + 491},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, 73, -1, 73, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 494, false, -1, 307, -1, -1, -1, false, false, false, false, utf8proc_sequences + 497},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 499, false, 306, -1, 306, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 502, false, -1, 309, -1, -1, -1, false, false, false, false, utf8proc_sequences + 505},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 507, false, 308, -1, 308, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 510, false, -1, 311, -1, -1, -1, false, false, false, false, utf8proc_sequences + 513},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 515, false, 310, -1, 310, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 518, false, -1, 314, -1, -1, -1, false, false, false, false, utf8proc_sequences + 521},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 523, false, 313, -1, 313, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 526, false, -1, 316, -1, -1, -1, false, false, false, false, utf8proc_sequences + 529},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 531, false, 315, -1, 315, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 534, false, -1, 318, -1, -1, -1, false, false, false, false, utf8proc_sequences + 537},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 539, false, 317, -1, 317, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 542, false, -1, 320, -1, -1, -1, false, false, false, false, utf8proc_sequences + 545},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 547, false, 319, -1, 319, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, 322, -1, -1, -1, false, false, false, false, utf8proc_sequences + 550},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, 321, -1, 321, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 552, false, -1, 324, -1, -1, -1, false, false, false, false, utf8proc_sequences + 555},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 557, false, 323, -1, 323, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 560, false, -1, 326, -1, -1, -1, false, false, false, false, utf8proc_sequences + 563},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 565, false, 325, -1, 325, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 568, false, -1, 328, -1, -1, -1, false, false, false, false, utf8proc_sequences + 571},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 573, false, 327, -1, 327, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 576, false, -1, -1, -1, -1, -1, false, false, false, false, utf8proc_sequences + 576},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, 331, -1, -1, -1, false, false, false, false, utf8proc_sequences + 579},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, 330, -1, 330, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 581, false, -1, 333, -1, 9600, -1, false, false, false, false, utf8proc_sequences + 584},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 586, false, 332, -1, 332, 9660, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 589, false, -1, 335, -1, -1, -1, false, false, false, false, utf8proc_sequences + 592},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 594, false, 334, -1, 334, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 597, false, -1, 337, -1, -1, -1, false, false, false, false, utf8proc_sequences + 600},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 602, false, 336, -1, 336, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, 339, -1, -1, -1, false, false, false, false, utf8proc_sequences + 605},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, 338, -1, 338, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 607, false, -1, 341, -1, -1, -1, false, false, false, false, utf8proc_sequences + 610},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 612, false, 340, -1, 340, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 615, false, -1, 343, -1, -1, -1, false, false, false, false, utf8proc_sequences + 618},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 620, false, 342, -1, 342, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 623, false, -1, 345, -1, -1, -1, false, false, false, false, utf8proc_sequences + 626},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 628, false, 344, -1, 344, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 631, false, -1, 347, -1, 9960, -1, false, false, false, false, utf8proc_sequences + 634},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 636, false, 346, -1, 346, 10020, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 639, false, -1, 349, -1, -1, -1, false, false, false, false, utf8proc_sequences + 642},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 644, false, 348, -1, 348, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 647, false, -1, 351, -1, -1, -1, false, false, false, false, utf8proc_sequences + 650},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 652, false, 350, -1, 350, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 655, false, -1, 353, -1, 10080, -1, false, false, false, false, utf8proc_sequences + 658},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 660, false, 352, -1, 352, 10140, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 663, false, -1, 355, -1, -1, -1, false, false, false, false, utf8proc_sequences + 666},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 668, false, 354, -1, 354, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 671, false, -1, 357, -1, -1, -1, false, false, false, false, utf8proc_sequences + 674},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 676, false, 356, -1, 356, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, 359, -1, -1, -1, false, false, false, false, utf8proc_sequences + 679},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, 358, -1, 358, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 681, false, -1, 361, -1, 10320, -1, false, false, false, false, utf8proc_sequences + 684},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 686, false, 360, -1, 360, 10380, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 689, false, -1, 363, -1, 10440, -1, false, false, false, false, utf8proc_sequences + 692},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 694, false, 362, -1, 362, 10500, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 697, false, -1, 365, -1, -1, -1, false, false, false, false, utf8proc_sequences + 700},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 702, false, 364, -1, 364, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 705, false, -1, 367, -1, -1, -1, false, false, false, false, utf8proc_sequences + 708},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 710, false, 366, -1, 366, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 713, false, -1, 369, -1, -1, -1, false, false, false, false, utf8proc_sequences + 716},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 718, false, 368, -1, 368, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 721, false, -1, 371, -1, -1, -1, false, false, false, false, utf8proc_sequences + 724},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 726, false, 370, -1, 370, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 729, false, -1, 373, -1, -1, -1, false, false, false, false, utf8proc_sequences + 732},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 734, false, 372, -1, 372, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 737, false, -1, 375, -1, -1, -1, false, false, false, false, utf8proc_sequences + 740},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 742, false, 374, -1, 374, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 745, false, -1, 255, -1, -1, -1, false, false, false, false, utf8proc_sequences + 748},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 750, false, -1, 378, -1, -1, -1, false, false, false, false, utf8proc_sequences + 753},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 755, false, 377, -1, 377, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 758, false, -1, 380, -1, -1, -1, false, false, false, false, utf8proc_sequences + 761},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 763, false, 379, -1, 379, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 766, false, -1, 382, -1, -1, -1, false, false, false, false, utf8proc_sequences + 769},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 771, false, 381, -1, 381, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 36, false, 83, -1, 83, 10800, -1, false, false, false, false, utf8proc_sequences + 36},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, 579, -1, 579, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, 595, -1, -1, -1, false, false, false, false, utf8proc_sequences + 774},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, 387, -1, -1, -1, false, false, false, false, utf8proc_sequences + 776},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, 386, -1, 386, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, 389, -1, -1, -1, false, false, false, false, utf8proc_sequences + 778},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, 388, -1, 388, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, 596, -1, -1, -1, false, false, false, false, utf8proc_sequences + 780},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, 392, -1, -1, -1, false, false, false, false, utf8proc_sequences + 782},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, 391, -1, 391, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, 598, -1, -1, -1, false, false, false, false, utf8proc_sequences + 784},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, 599, -1, -1, -1, false, false, false, false, utf8proc_sequences + 786},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, 396, -1, -1, -1, false, false, false, false, utf8proc_sequences + 788},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, 395, -1, 395, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, 477, -1, -1, -1, false, false, false, false, utf8proc_sequences + 790},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, 601, -1, -1, -1, false, false, false, false, utf8proc_sequences + 792},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, 603, -1, -1, -1, false, false, false, false, utf8proc_sequences + 794},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, 402, -1, -1, -1, false, false, false, false, utf8proc_sequences + 796},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, 401, -1, 401, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, 608, -1, -1, -1, false, false, false, false, utf8proc_sequences + 798},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, 611, -1, -1, -1, false, false, false, false, utf8proc_sequences + 800},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, 502, -1, 502, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, 617, -1, -1, -1, false, false, false, false, utf8proc_sequences + 802},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, 616, -1, -1, -1, false, false, false, false, utf8proc_sequences + 804},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, 409, -1, -1, -1, false, false, false, false, utf8proc_sequences + 806},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, 408, -1, 408, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, 573, -1, 573, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, 623, -1, -1, -1, false, false, false, false, utf8proc_sequences + 808},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, 626, -1, -1, -1, false, false, false, false, utf8proc_sequences + 810},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, 544, -1, 544, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, 629, -1, -1, -1, false, false, false, false, utf8proc_sequences + 812},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 814, false, -1, 417, -1, 11700, -1, false, false, false, false, utf8proc_sequences + 817},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 819, false, 416, -1, 416, 11760, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, 419, -1, -1, -1, false, false, false, false, utf8proc_sequences + 822},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, 418, -1, 418, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, 421, -1, -1, -1, false, false, false, false, utf8proc_sequences + 824},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, 420, -1, 420, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, 640, -1, -1, -1, false, false, false, false, utf8proc_sequences + 826},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, 424, -1, -1, -1, false, false, false, false, utf8proc_sequences + 828},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, 423, -1, 423, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, 643, -1, -1, -1, false, false, false, false, utf8proc_sequences + 830},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, 429, -1, -1, -1, false, false, false, false, utf8proc_sequences + 832},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, 428, -1, 428, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, 648, -1, -1, -1, false, false, false, false, utf8proc_sequences + 834},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 836, false, -1, 432, -1, 11820, -1, false, false, false, false, utf8proc_sequences + 839},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 841, false, 431, -1, 431, 11880, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, 650, -1, -1, -1, false, false, false, false, utf8proc_sequences + 844},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, 651, -1, -1, -1, false, false, false, false, utf8proc_sequences + 846},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, 436, -1, -1, -1, false, false, false, false, utf8proc_sequences + 848},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, 435, -1, 435, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, 438, -1, -1, -1, false, false, false, false, utf8proc_sequences + 850},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, 437, -1, 437, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, 658, -1, 2880, -1, false, false, false, false, utf8proc_sequences + 852},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, 441, -1, -1, -1, false, false, false, false, utf8proc_sequences + 854},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, 440, -1, 440, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, 445, -1, -1, -1, false, false, false, false, utf8proc_sequences + 856},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, 444, -1, 444, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, 503, -1, 503, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 858, false, -1, 454, 453, -1, -1, false, false, false, false, utf8proc_sequences + 861},
+  {UTF8PROC_CATEGORY_LT, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 863, false, 452, 454, 453, -1, -1, false, false, false, false, utf8proc_sequences + 861},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 866, false, 452, -1, 453, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 869, false, -1, 457, 456, -1, -1, false, false, false, false, utf8proc_sequences + 872},
+  {UTF8PROC_CATEGORY_LT, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 874, false, 455, 457, 456, -1, -1, false, false, false, false, utf8proc_sequences + 872},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 877, false, 455, -1, 456, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 880, false, -1, 460, 459, -1, -1, false, false, false, false, utf8proc_sequences + 883},
+  {UTF8PROC_CATEGORY_LT, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 885, false, 458, 460, 459, -1, -1, false, false, false, false, utf8proc_sequences + 883},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 888, false, 458, -1, 459, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 891, false, -1, 462, -1, -1, -1, false, false, false, false, utf8proc_sequences + 894},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 896, false, 461, -1, 461, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 899, false, -1, 464, -1, -1, -1, false, false, false, false, utf8proc_sequences + 902},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 904, false, 463, -1, 463, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 907, false, -1, 466, -1, -1, -1, false, false, false, false, utf8proc_sequences + 910},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 912, false, 465, -1, 465, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 915, false, -1, 468, -1, -1, -1, false, false, false, false, utf8proc_sequences + 918},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 920, false, 467, -1, 467, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 923, false, -1, 470, -1, -1, -1, false, false, false, false, utf8proc_sequences + 926},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 928, false, 469, -1, 469, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 931, false, -1, 472, -1, -1, -1, false, false, false, false, utf8proc_sequences + 934},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 936, false, 471, -1, 471, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 939, false, -1, 474, -1, -1, -1, false, false, false, false, utf8proc_sequences + 942},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 944, false, 473, -1, 473, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 947, false, -1, 476, -1, -1, -1, false, false, false, false, utf8proc_sequences + 950},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 952, false, 475, -1, 475, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, 398, -1, 398, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 955, false, -1, 479, -1, -1, -1, false, false, false, false, utf8proc_sequences + 958},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 960, false, 478, -1, 478, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 963, false, -1, 481, -1, -1, -1, false, false, false, false, utf8proc_sequences + 966},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 968, false, 480, -1, 480, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 971, false, -1, 483, -1, -1, -1, false, false, false, false, utf8proc_sequences + 974},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 976, false, 482, -1, 482, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, 485, -1, -1, -1, false, false, false, false, utf8proc_sequences + 979},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, 484, -1, 484, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 981, false, -1, 487, -1, -1, -1, false, false, false, false, utf8proc_sequences + 984},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 986, false, 486, -1, 486, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 989, false, -1, 489, -1, -1, -1, false, false, false, false, utf8proc_sequences + 992},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 994, false, 488, -1, 488, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 997, false, -1, 491, -1, 2760, -1, false, false, false, false, utf8proc_sequences + 1000},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 1002, false, 490, -1, 490, 2820, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 1005, false, -1, 493, -1, -1, -1, false, false, false, false, utf8proc_sequences + 1008},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 1010, false, 492, -1, 492, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 1013, false, -1, 495, -1, -1, -1, false, false, false, false, utf8proc_sequences + 1016},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 1018, false, 494, -1, 494, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 1021, false, -1, -1, -1, -1, -1, false, false, false, false, utf8proc_sequences + 1021},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 1024, false, -1, 499, 498, -1, -1, false, false, false, false, utf8proc_sequences + 1027},
+  {UTF8PROC_CATEGORY_LT, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 1029, false, 497, 499, 498, -1, -1, false, false, false, false, utf8proc_sequences + 1027},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 1032, false, 497, -1, 498, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 1035, false, -1, 501, -1, -1, -1, false, false, false, false, utf8proc_sequences + 1038},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 1040, false, 500, -1, 500, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, 405, -1, -1, -1, false, false, false, false, utf8proc_sequences + 1043},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, 447, -1, -1, -1, false, false, false, false, utf8proc_sequences + 1045},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 1047, false, -1, 505, -1, -1, -1, false, false, false, false, utf8proc_sequences + 1050},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 1052, false, 504, -1, 504, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 1055, false, -1, 507, -1, -1, -1, false, false, false, false, utf8proc_sequences + 1058},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 1060, false, 506, -1, 506, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 1063, false, -1, 509, -1, -1, -1, false, false, false, false, utf8proc_sequences + 1066},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 1068, false, 508, -1, 508, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 1071, false, -1, 511, -1, -1, -1, false, false, false, false, utf8proc_sequences + 1074},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 1076, false, 510, -1, 510, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 1079, false, -1, 513, -1, -1, -1, false, false, false, false, utf8proc_sequences + 1082},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 1084, false, 512, -1, 512, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 1087, false, -1, 515, -1, -1, -1, false, false, false, false, utf8proc_sequences + 1090},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 1092, false, 514, -1, 514, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 1095, false, -1, 517, -1, -1, -1, false, false, false, false, utf8proc_sequences + 1098},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 1100, false, 516, -1, 516, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 1103, false, -1, 519, -1, -1, -1, false, false, false, false, utf8proc_sequences + 1106},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 1108, false, 518, -1, 518, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 1111, false, -1, 521, -1, -1, -1, false, false, false, false, utf8proc_sequences + 1114},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 1116, false, 520, -1, 520, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 1119, false, -1, 523, -1, -1, -1, false, false, false, false, utf8proc_sequences + 1122},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 1124, false, 522, -1, 522, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 1127, false, -1, 525, -1, -1, -1, false, false, false, false, utf8proc_sequences + 1130},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 1132, false, 524, -1, 524, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 1135, false, -1, 527, -1, -1, -1, false, false, false, false, utf8proc_sequences + 1138},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 1140, false, 526, -1, 526, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 1143, false, -1, 529, -1, -1, -1, false, false, false, false, utf8proc_sequences + 1146},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 1148, false, 528, -1, 528, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 1151, false, -1, 531, -1, -1, -1, false, false, false, false, utf8proc_sequences + 1154},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 1156, false, 530, -1, 530, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 1159, false, -1, 533, -1, -1, -1, false, false, false, false, utf8proc_sequences + 1162},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 1164, false, 532, -1, 532, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 1167, false, -1, 535, -1, -1, -1, false, false, false, false, utf8proc_sequences + 1170},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 1172, false, 534, -1, 534, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 1175, false, -1, 537, -1, -1, -1, false, false, false, false, utf8proc_sequences + 1178},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 1180, false, 536, -1, 536, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 1183, false, -1, 539, -1, -1, -1, false, false, false, false, utf8proc_sequences + 1186},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 1188, false, 538, -1, 538, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, 541, -1, -1, -1, false, false, false, false, utf8proc_sequences + 1191},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, 540, -1, 540, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 1193, false, -1, 543, -1, -1, -1, false, false, false, false, utf8proc_sequences + 1196},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 1198, false, 542, -1, 542, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, 414, -1, -1, -1, false, false, false, false, utf8proc_sequences + 1201},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, 547, -1, -1, -1, false, false, false, false, utf8proc_sequences + 1203},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, 546, -1, 546, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, 549, -1, -1, -1, false, false, false, false, utf8proc_sequences + 1205},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, 548, -1, 548, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 1207, false, -1, 551, -1, 2520, -1, false, false, false, false, utf8proc_sequences + 1210},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 1212, false, 550, -1, 550, 2580, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 1215, false, -1, 553, -1, 9000, -1, false, false, false, false, utf8proc_sequences + 1218},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 1220, false, 552, -1, 552, 9060, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 1223, false, -1, 555, -1, -1, -1, false, false, false, false, utf8proc_sequences + 1226},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 1228, false, 554, -1, 554, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 1231, false, -1, 557, -1, -1, -1, false, false, false, false, utf8proc_sequences + 1234},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 1236, false, 556, -1, 556, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 1239, false, -1, 559, -1, 3480, -1, false, false, false, false, utf8proc_sequences + 1242},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 1244, false, 558, -1, 558, 3540, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 1247, false, -1, 561, -1, -1, -1, false, false, false, false, utf8proc_sequences + 1250},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 1252, false, 560, -1, 560, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 1255, false, -1, 563, -1, -1, -1, false, false, false, false, utf8proc_sequences + 1258},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 1260, false, 562, -1, 562, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, 11365, -1, -1, -1, false, false, false, false, utf8proc_sequences + 1263},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, 572, -1, -1, -1, false, false, false, false, utf8proc_sequences + 1265},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, 571, -1, 571, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, 410, -1, -1, -1, false, false, false, false, utf8proc_sequences + 1267},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, 11366, -1, -1, -1, false, false, false, false, utf8proc_sequences + 1269},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, 578, -1, -1, -1, false, false, false, false, utf8proc_sequences + 1271},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, 577, -1, 577, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, 384, -1, -1, -1, false, false, false, false, utf8proc_sequences + 1273},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, 649, -1, -1, -1, false, false, false, false, utf8proc_sequences + 1275},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, 652, -1, -1, -1, false, false, false, false, utf8proc_sequences + 1277},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, 583, -1, -1, -1, false, false, false, false, utf8proc_sequences + 1279},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, 582, -1, 582, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, 585, -1, -1, -1, false, false, false, false, utf8proc_sequences + 1281},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, 584, -1, 584, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, 587, -1, -1, -1, false, false, false, false, utf8proc_sequences + 1283},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, 586, -1, 586, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, 589, -1, -1, -1, false, false, false, false, utf8proc_sequences + 1285},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, 588, -1, 588, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, 591, -1, -1, -1, false, false, false, false, utf8proc_sequences + 1287},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, 590, -1, 590, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, 385, -1, 385, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, 390, -1, 390, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, 393, -1, 393, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, 394, -1, 394, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, 399, -1, 399, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, 400, -1, 400, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, 403, -1, 403, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, 404, -1, 404, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, 407, -1, 407, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, 406, -1, 406, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, 11362, -1, 11362, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, 412, -1, 412, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, 413, -1, 413, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, 415, -1, 415, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, 11364, -1, 11364, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, 422, -1, 422, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, 425, -1, 425, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, 430, -1, 430, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, 580, -1, 580, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, 433, -1, 433, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, 434, -1, 434, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, 581, -1, 581, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, 439, -1, 439, 2940, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LM, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_SUPER, utf8proc_sequences + 14, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LM, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_SUPER, utf8proc_sequences + 1289, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LM, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_SUPER, utf8proc_sequences + 18, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LM, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_SUPER, utf8proc_sequences + 34, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LM, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_SUPER, utf8proc_sequences + 1291, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LM, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_SUPER, utf8proc_sequences + 1293, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LM, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_SUPER, utf8proc_sequences + 1295, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LM, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_SUPER, utf8proc_sequences + 44, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LM, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_SUPER, utf8proc_sequences + 48, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LM, 0, UTF8PROC_BIDI_CLASS_ON, 0, NULL, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LM, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SK, 0, UTF8PROC_BIDI_CLASS_ON, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 1297, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SK, 0, UTF8PROC_BIDI_CLASS_ON, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 1300, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SK, 0, UTF8PROC_BIDI_CLASS_ON, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 1303, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SK, 0, UTF8PROC_BIDI_CLASS_ON, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 1306, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SK, 0, UTF8PROC_BIDI_CLASS_ON, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 1309, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SK, 0, UTF8PROC_BIDI_CLASS_ON, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 1312, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LM, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_SUPER, utf8proc_sequences + 800, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LM, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_SUPER, utf8proc_sequences + 22, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LM, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_SUPER, utf8proc_sequences + 36, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LM, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_SUPER, utf8proc_sequences + 46, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LM, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_SUPER, utf8proc_sequences + 1315, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_MN, 230, UTF8PROC_BIDI_CLASS_NSM, 0, NULL, false, -1, -1, -1, -1, 0, false, false, false, true, NULL},
+  {UTF8PROC_CATEGORY_MN, 230, UTF8PROC_BIDI_CLASS_NSM, 0, NULL, false, -1, -1, -1, -1, 1, false, false, false, true, NULL},
+  {UTF8PROC_CATEGORY_MN, 230, UTF8PROC_BIDI_CLASS_NSM, 0, NULL, false, -1, -1, -1, -1, 2, false, false, false, true, NULL},
+  {UTF8PROC_CATEGORY_MN, 230, UTF8PROC_BIDI_CLASS_NSM, 0, NULL, false, -1, -1, -1, -1, 3, false, false, false, true, NULL},
+  {UTF8PROC_CATEGORY_MN, 230, UTF8PROC_BIDI_CLASS_NSM, 0, NULL, false, -1, -1, -1, -1, 7, false, false, false, true, NULL},
+  {UTF8PROC_CATEGORY_MN, 230, UTF8PROC_BIDI_CLASS_NSM, 0, NULL, false, -1, -1, -1, -1, -1, false, false, false, true, NULL},
+  {UTF8PROC_CATEGORY_MN, 230, UTF8PROC_BIDI_CLASS_NSM, 0, NULL, false, -1, -1, -1, -1, 8, false, false, false, true, NULL},
+  {UTF8PROC_CATEGORY_MN, 230, UTF8PROC_BIDI_CLASS_NSM, 0, NULL, false, -1, -1, -1, -1, 10, false, false, false, true, NULL},
+  {UTF8PROC_CATEGORY_MN, 230, UTF8PROC_BIDI_CLASS_NSM, 0, NULL, false, -1, -1, -1, -1, 4, false, false, false, true, NULL},
+  {UTF8PROC_CATEGORY_MN, 230, UTF8PROC_BIDI_CLASS_NSM, 0, NULL, false, -1, -1, -1, -1, 46, false, false, false, true, NULL},
+  {UTF8PROC_CATEGORY_MN, 230, UTF8PROC_BIDI_CLASS_NSM, 0, NULL, false, -1, -1, -1, -1, 5, false, false, false, true, NULL},
+  {UTF8PROC_CATEGORY_MN, 230, UTF8PROC_BIDI_CLASS_NSM, 0, NULL, false, -1, -1, -1, -1, 12, false, false, false, true, NULL},
+  {UTF8PROC_CATEGORY_MN, 230, UTF8PROC_BIDI_CLASS_NSM, 0, NULL, false, -1, -1, -1, -1, 11, false, false, false, true, NULL},
+  {UTF8PROC_CATEGORY_MN, 230, UTF8PROC_BIDI_CLASS_NSM, 0, NULL, false, -1, -1, -1, -1, 14, false, false, false, true, NULL},
+  {UTF8PROC_CATEGORY_MN, 230, UTF8PROC_BIDI_CLASS_NSM, 0, NULL, false, -1, -1, -1, -1, 15, false, false, false, true, NULL},
+  {UTF8PROC_CATEGORY_MN, 230, UTF8PROC_BIDI_CLASS_NSM, 0, NULL, false, -1, -1, -1, -1, 47, false, false, false, true, NULL},
+  {UTF8PROC_CATEGORY_MN, 230, UTF8PROC_BIDI_CLASS_NSM, 0, NULL, false, -1, -1, -1, -1, 48, false, false, false, true, NULL},
+  {UTF8PROC_CATEGORY_MN, 232, UTF8PROC_BIDI_CLASS_NSM, 0, NULL, false, -1, -1, -1, -1, -1, false, false, false, true, NULL},
+  {UTF8PROC_CATEGORY_MN, 220, UTF8PROC_BIDI_CLASS_NSM, 0, NULL, false, -1, -1, -1, -1, -1, false, false, false, true, NULL},
+  {UTF8PROC_CATEGORY_MN, 216, UTF8PROC_BIDI_CLASS_NSM, 0, NULL, false, -1, -1, -1, -1, 13, false, false, false, true, NULL},
+  {UTF8PROC_CATEGORY_MN, 202, UTF8PROC_BIDI_CLASS_NSM, 0, NULL, false, -1, -1, -1, -1, -1, false, false, false, true, NULL},
+  {UTF8PROC_CATEGORY_MN, 220, UTF8PROC_BIDI_CLASS_NSM, 0, NULL, false, -1, -1, -1, -1, 40, false, false, false, true, NULL},
+  {UTF8PROC_CATEGORY_MN, 220, UTF8PROC_BIDI_CLASS_NSM, 0, NULL, false, -1, -1, -1, -1, 45, false, false, false, true, NULL},
+  {UTF8PROC_CATEGORY_MN, 220, UTF8PROC_BIDI_CLASS_NSM, 0, NULL, false, -1, -1, -1, -1, 39, false, false, false, true, NULL},
+  {UTF8PROC_CATEGORY_MN, 220, UTF8PROC_BIDI_CLASS_NSM, 0, NULL, false, -1, -1, -1, -1, 16, false, false, false, true, NULL},
+  {UTF8PROC_CATEGORY_MN, 202, UTF8PROC_BIDI_CLASS_NSM, 0, NULL, false, -1, -1, -1, -1, 6, false, false, false, true, NULL},
+  {UTF8PROC_CATEGORY_MN, 202, UTF8PROC_BIDI_CLASS_NSM, 0, NULL, false, -1, -1, -1, -1, 9, false, false, false, true, NULL},
+  {UTF8PROC_CATEGORY_MN, 220, UTF8PROC_BIDI_CLASS_NSM, 0, NULL, false, -1, -1, -1, -1, 42, false, false, false, true, NULL},
+  {UTF8PROC_CATEGORY_MN, 220, UTF8PROC_BIDI_CLASS_NSM, 0, NULL, false, -1, -1, -1, -1, 44, false, false, false, true, NULL},
+  {UTF8PROC_CATEGORY_MN, 220, UTF8PROC_BIDI_CLASS_NSM, 0, NULL, false, -1, -1, -1, -1, 43, false, false, false, true, NULL},
+  {UTF8PROC_CATEGORY_MN, 220, UTF8PROC_BIDI_CLASS_NSM, 0, NULL, false, -1, -1, -1, -1, 41, false, false, false, true, NULL},
+  {UTF8PROC_CATEGORY_MN, 1, UTF8PROC_BIDI_CLASS_NSM, 0, NULL, false, -1, -1, -1, -1, -1, false, false, false, true, NULL},
+  {UTF8PROC_CATEGORY_MN, 1, UTF8PROC_BIDI_CLASS_NSM, 0, NULL, false, -1, -1, -1, -1, 51, false, false, false, true, NULL},
+  {UTF8PROC_CATEGORY_MN, 230, UTF8PROC_BIDI_CLASS_NSM, 0, utf8proc_sequences + 1317, false, -1, -1, -1, -1, -1, false, false, false, true, NULL},
+  {UTF8PROC_CATEGORY_MN, 230, UTF8PROC_BIDI_CLASS_NSM, 0, utf8proc_sequences + 1319, false, -1, -1, -1, -1, -1, false, false, false, true, NULL},
+  {UTF8PROC_CATEGORY_MN, 230, UTF8PROC_BIDI_CLASS_NSM, 0, NULL, false, -1, -1, -1, -1, 49, false, false, false, true, NULL},
+  {UTF8PROC_CATEGORY_MN, 230, UTF8PROC_BIDI_CLASS_NSM, 0, utf8proc_sequences + 1321, false, -1, -1, -1, -1, -1, false, false, false, true, NULL},
+  {UTF8PROC_CATEGORY_MN, 230, UTF8PROC_BIDI_CLASS_NSM, 0, utf8proc_sequences + 1323, false, -1, -1, -1, -1, -1, false, false, false, true, NULL},
+  {UTF8PROC_CATEGORY_MN, 240, UTF8PROC_BIDI_CLASS_NSM, 0, NULL, false, 921, -1, 921, -1, 50, false, false, false, true, utf8proc_sequences + 1326},
+  {UTF8PROC_CATEGORY_MN, 0, UTF8PROC_BIDI_CLASS_NSM, 0, NULL, false, -1, -1, -1, -1, -1, false, true, false, true, NULL},
+  {UTF8PROC_CATEGORY_MN, 233, UTF8PROC_BIDI_CLASS_NSM, 0, NULL, false, -1, -1, -1, -1, -1, false, false, false, true, NULL},
+  {UTF8PROC_CATEGORY_MN, 234, UTF8PROC_BIDI_CLASS_NSM, 0, NULL, false, -1, -1, -1, -1, -1, false, false, false, true, NULL},
+  {UTF8PROC_CATEGORY_SK, 0, UTF8PROC_BIDI_CLASS_ON, 0, utf8proc_sequences + 1328, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LM, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 1330, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, 1021, -1, 1021, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, 1022, -1, 1022, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, 1023, -1, 1023, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_PO, 0, UTF8PROC_BIDI_CLASS_ON, 0, utf8proc_sequences + 1333, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SK, 0, UTF8PROC_BIDI_CLASS_ON, 0, utf8proc_sequences + 1335, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 1338, false, -1, 940, -1, -1, -1, false, false, false, false, utf8proc_sequences + 1341},
+  {UTF8PROC_CATEGORY_PO, 0, UTF8PROC_BIDI_CLASS_ON, 0, utf8proc_sequences + 1343, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 1345, false, -1, 941, -1, -1, -1, false, false, false, false, utf8proc_sequences + 1348},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 1350, false, -1, 942, -1, -1, -1, false, false, false, false, utf8proc_sequences + 1353},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 1355, false, -1, 943, -1, -1, -1, false, false, false, false, utf8proc_sequences + 1358},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 1360, false, -1, 972, -1, -1, -1, false, false, false, false, utf8proc_sequences + 1363},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 1365, false, -1, 973, -1, -1, -1, false, false, false, false, utf8proc_sequences + 1368},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 1370, false, -1, 974, -1, -1, -1, false, false, false, false, utf8proc_sequences + 1373},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 1375, false, -1, -1, -1, -1, -1, false, false, false, false, utf8proc_sequences + 1378},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, 945, -1, 3660, -1, false, false, false, false, utf8proc_sequences + 1382},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, 946, -1, -1, -1, false, false, false, false, utf8proc_sequences + 1384},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, 947, -1, -1, -1, false, false, false, false, utf8proc_sequences + 1386},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, 948, -1, -1, -1, false, false, false, false, utf8proc_sequences + 1388},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, 949, -1, 3720, -1, false, false, false, false, utf8proc_sequences + 1390},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, 950, -1, -1, -1, false, false, false, false, utf8proc_sequences + 1392},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, 951, -1, 3780, -1, false, false, false, false, utf8proc_sequences + 1394},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, 952, -1, -1, -1, false, false, false, false, utf8proc_sequences + 1396},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, 953, -1, 3840, -1, false, false, false, false, utf8proc_sequences + 1326},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, 954, -1, -1, -1, false, false, false, false, utf8proc_sequences + 1398},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, 955, -1, -1, -1, false, false, false, false, utf8proc_sequences + 1400},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, 956, -1, -1, -1, false, false, false, false, utf8proc_sequences + 67},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, 957, -1, -1, -1, false, false, false, false, utf8proc_sequences + 1402},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, 958, -1, -1, -1, false, false, false, false, utf8proc_sequences + 1404},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, 959, -1, 3900, -1, false, false, false, false, utf8proc_sequences + 1406},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, 960, -1, -1, -1, false, false, false, false, utf8proc_sequences + 1408},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, 961, -1, 16260, -1, false, false, false, false, utf8proc_sequences + 1410},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, 963, -1, -1, -1, false, false, false, false, utf8proc_sequences + 1412},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, 964, -1, -1, -1, false, false, false, false, utf8proc_sequences + 1414},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, 965, -1, 3960, -1, false, false, false, false, utf8proc_sequences + 1416},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, 966, -1, -1, -1, false, false, false, false, utf8proc_sequences + 1418},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, 967, -1, -1, -1, false, false, false, false, utf8proc_sequences + 1420},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, 968, -1, -1, -1, false, false, false, false, utf8proc_sequences + 1422},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, 969, -1, 4020, -1, false, false, false, false, utf8proc_sequences + 1424},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 1426, false, -1, 970, -1, -1, -1, false, false, false, false, utf8proc_sequences + 1429},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 1431, false, -1, 971, -1, -1, -1, false, false, false, false, utf8proc_sequences + 1434},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 1436, false, 902, -1, 902, 15780, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 1439, false, 904, -1, 904, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 1442, false, 905, -1, 905, 15960, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 1445, false, 906, -1, 906, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 1448, false, -1, -1, -1, -1, -1, false, false, false, false, utf8proc_sequences + 1451},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, 913, -1, 913, 4140, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, 914, -1, 914, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, 915, -1, 915, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, 916, -1, 916, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, 917, -1, 917, 4200, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, 918, -1, 918, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, 919, -1, 919, 4260, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, 920, -1, 920, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, 921, -1, 921, 4320, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, 922, -1, 922, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, 923, -1, 923, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, 924, -1, 924, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, 925, -1, 925, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, 926, -1, 926, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, 927, -1, 927, 4500, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, 928, -1, 928, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, 929, -1, 929, 16200, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, 931, -1, 931, -1, -1, false, false, false, false, utf8proc_sequences + 1412},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, 931, -1, 931, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, 932, -1, 932, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, 933, -1, 933, 4440, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, 934, -1, 934, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, 935, -1, 935, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, 936, -1, 936, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, 937, -1, 937, 4560, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 1455, false, 938, -1, 938, 4080, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 1458, false, 939, -1, 939, 4380, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 1461, false, 908, -1, 908, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 1464, false, 910, -1, 910, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 1467, false, 911, -1, 911, 16380, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 1384, false, 914, -1, 914, -1, -1, false, false, false, false, utf8proc_sequences + 1384},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 1396, false, 920, -1, 920, -1, -1, false, false, false, false, utf8proc_sequences + 1396},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 1470, false, -1, -1, -1, 4620, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 1472, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 1475, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 1418, false, 934, -1, 934, -1, -1, false, false, false, false, utf8proc_sequences + 1418},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 1408, false, 928, -1, 928, -1, -1, false, false, false, false, utf8proc_sequences + 1408},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, 985, -1, -1, -1, false, false, false, false, utf8proc_sequences + 1478},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, 984, -1, 984, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, 987, -1, -1, -1, false, false, false, false, utf8proc_sequences + 1480},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, 986, -1, 986, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, 989, -1, -1, -1, false, false, false, false, utf8proc_sequences + 1482},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, 988, -1, 988, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, 991, -1, -1, -1, false, false, false, false, utf8proc_sequences + 1484},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, 990, -1, 990, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, 993, -1, -1, -1, false, false, false, false, utf8proc_sequences + 1486},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, 992, -1, 992, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, 995, -1, -1, -1, false, false, false, false, utf8proc_sequences + 1488},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, 994, -1, 994, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, 997, -1, -1, -1, false, false, false, false, utf8proc_sequences + 1490},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, 996, -1, 996, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, 999, -1, -1, -1, false, false, false, false, utf8proc_sequences + 1492},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, 998, -1, 998, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, 1001, -1, -1, -1, false, false, false, false, utf8proc_sequences + 1494},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, 1000, -1, 1000, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, 1003, -1, -1, -1, false, false, false, false, utf8proc_sequences + 1496},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, 1002, -1, 1002, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, 1005, -1, -1, -1, false, false, false, false, utf8proc_sequences + 1498},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, 1004, -1, 1004, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, 1007, -1, -1, -1, false, false, false, false, utf8proc_sequences + 1500},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, 1006, -1, 1006, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 1398, false, 922, -1, 922, -1, -1, false, false, false, false, utf8proc_sequences + 1398},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 1410, false, 929, -1, 929, -1, -1, false, false, false, false, utf8proc_sequences + 1410},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 1502, false, 1017, -1, 1017, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 1504, false, -1, 952, -1, -1, -1, false, false, false, false, utf8proc_sequences + 1396},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 1390, false, 917, -1, 917, -1, -1, false, false, false, false, utf8proc_sequences + 1390},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, 1016, -1, -1, -1, false, false, false, false, utf8proc_sequences + 1506},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, 1015, -1, 1015, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 1508, false, -1, 1010, -1, -1, -1, false, false, false, false, utf8proc_sequences + 1510},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, 1019, -1, -1, -1, false, false, false, false, utf8proc_sequences + 1512},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, 1018, -1, 1018, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, 891, -1, -1, -1, false, false, false, false, utf8proc_sequences + 1514},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, 892, -1, -1, -1, false, false, false, false, utf8proc_sequences + 1516},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, 893, -1, -1, -1, false, false, false, false, utf8proc_sequences + 1518},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 1520, false, -1, 1104, -1, -1, -1, false, false, false, false, utf8proc_sequences + 1523},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 1525, false, -1, 1105, -1, -1, -1, false, false, false, false, utf8proc_sequences + 1528},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, 1106, -1, -1, -1, false, false, false, false, utf8proc_sequences + 1530},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 1532, false, -1, 1107, -1, -1, -1, false, false, false, false, utf8proc_sequences + 1535},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, 1108, -1, -1, -1, false, false, false, false, utf8proc_sequences + 1537},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, 1109, -1, -1, -1, false, false, false, false, utf8proc_sequences + 1539},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, 1110, -1, 4800, -1, false, false, false, false, utf8proc_sequences + 1541},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 1543, false, -1, 1111, -1, -1, -1, false, false, false, false, utf8proc_sequences + 1546},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, 1112, -1, -1, -1, false, false, false, false, utf8proc_sequences + 1548},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, 1113, -1, -1, -1, false, false, false, false, utf8proc_sequences + 1550},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, 1114, -1, -1, -1, false, false, false, false, utf8proc_sequences + 1552},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, 1115, -1, -1, -1, false, false, false, false, utf8proc_sequences + 1554},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 1556, false, -1, 1116, -1, -1, -1, false, false, false, false, utf8proc_sequences + 1559},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 1561, false, -1, 1117, -1, -1, -1, false, false, false, false, utf8proc_sequences + 1564},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 1566, false, -1, 1118, -1, -1, -1, false, false, false, false, utf8proc_sequences + 1569},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, 1119, -1, -1, -1, false, false, false, false, utf8proc_sequences + 1571},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, 1072, -1, 5640, -1, false, false, false, false, utf8proc_sequences + 1573},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, 1073, -1, -1, -1, false, false, false, false, utf8proc_sequences + 1575},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, 1074, -1, -1, -1, false, false, false, false, utf8proc_sequences + 1577},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, 1075, -1, 4740, -1, false, false, false, false, utf8proc_sequences + 1579},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, 1076, -1, -1, -1, false, false, false, false, utf8proc_sequences + 1581},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, 1077, -1, 4680, -1, false, false, false, false, utf8proc_sequences + 1583},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, 1078, -1, 5520, -1, false, false, false, false, utf8proc_sequences + 1585},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, 1079, -1, 5880, -1, false, false, false, false, utf8proc_sequences + 1587},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, 1080, -1, 4920, -1, false, false, false, false, utf8proc_sequences + 1589},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 1591, false, -1, 1081, -1, -1, -1, false, false, false, false, utf8proc_sequences + 1594},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, 1082, -1, 4860, -1, false, false, false, false, utf8proc_sequences + 1596},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, 1083, -1, -1, -1, false, false, false, false, utf8proc_sequences + 1598},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, 1084, -1, -1, -1, false, false, false, false, utf8proc_sequences + 1600},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, 1085, -1, -1, -1, false, false, false, false, utf8proc_sequences + 1602},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, 1086, -1, 6000, -1, false, false, false, false, utf8proc_sequences + 1604},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, 1087, -1, -1, -1, false, false, false, false, utf8proc_sequences + 1606},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, 1088, -1, -1, -1, false, false, false, false, utf8proc_sequences + 1608},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, 1089, -1, -1, -1, false, false, false, false, utf8proc_sequences + 1610},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, 1090, -1, -1, -1, false, false, false, false, utf8proc_sequences + 1612},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, 1091, -1, 4980, -1, false, false, false, false, utf8proc_sequences + 1614},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, 1092, -1, -1, -1, false, false, false, false, utf8proc_sequences + 1616},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, 1093, -1, -1, -1, false, false, false, false, utf8proc_sequences + 1618},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, 1094, -1, -1, -1, false, false, false, false, utf8proc_sequences + 1620},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, 1095, -1, 6360, -1, false, false, false, false, utf8proc_sequences + 1622},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, 1096, -1, -1, -1, false, false, false, false, utf8proc_sequences + 1624},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, 1097, -1, -1, -1, false, false, false, false, utf8proc_sequences + 1626},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, 1098, -1, -1, -1, false, false, false, false, utf8proc_sequences + 1628},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, 1099, -1, 6480, -1, false, false, false, false, utf8proc_sequences + 1630},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, 1100, -1, -1, -1, false, false, false, false, utf8proc_sequences + 1632},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, 1101, -1, 6240, -1, false, false, false, false, utf8proc_sequences + 1634},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, 1102, -1, -1, -1, false, false, false, false, utf8proc_sequences + 1636},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, 1103, -1, -1, -1, false, false, false, false, utf8proc_sequences + 1638},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, 1040, -1, 1040, 5700, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, 1041, -1, 1041, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, 1042, -1, 1042, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, 1043, -1, 1043, 5160, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, 1044, -1, 1044, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, 1045, -1, 1045, 5100, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, 1046, -1, 1046, 5580, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, 1047, -1, 1047, 5940, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, 1048, -1, 1048, 5040, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 1640, false, 1049, -1, 1049, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, 1050, -1, 1050, 5280, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, 1051, -1, 1051, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, 1052, -1, 1052, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, 1053, -1, 1053, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, 1054, -1, 1054, 6060, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, 1055, -1, 1055, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, 1056, -1, 1056, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, 1057, -1, 1057, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, 1058, -1, 1058, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, 1059, -1, 1059, 5340, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, 1060, -1, 1060, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, 1061, -1, 1061, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, 1062, -1, 1062, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, 1063, -1, 1063, 6420, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, 1064, -1, 1064, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, 1065, -1, 1065, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, 1066, -1, 1066, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, 1067, -1, 1067, 6540, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, 1068, -1, 1068, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, 1069, -1, 1069, 6300, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, 1070, -1, 1070, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, 1071, -1, 1071, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 1643, false, 1024, -1, 1024, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 1646, false, 1025, -1, 1025, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, 1026, -1, 1026, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 1649, false, 1027, -1, 1027, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, 1028, -1, 1028, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, 1029, -1, 1029, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, 1030, -1, 1030, 5220, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 1652, false, 1031, -1, 1031, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, 1032, -1, 1032, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, 1033, -1, 1033, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, 1034, -1, 1034, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, 1035, -1, 1035, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 1655, false, 1036, -1, 1036, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 1658, false, 1037, -1, 1037, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 1661, false, 1038, -1, 1038, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, 1039, -1, 1039, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, 1121, -1, -1, -1, false, false, false, false, utf8proc_sequences + 1664},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, 1120, -1, 1120, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, 1123, -1, -1, -1, false, false, false, false, utf8proc_sequences + 1666},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, 1122, -1, 1122, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, 1125, -1, -1, -1, false, false, false, false, utf8proc_sequences + 1668},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, 1124, -1, 1124, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, 1127, -1, -1, -1, false, false, false, false, utf8proc_sequences + 1670},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, 1126, -1, 1126, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, 1129, -1, -1, -1, false, false, false, false, utf8proc_sequences + 1672},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, 1128, -1, 1128, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, 1131, -1, -1, -1, false, false, false, false, utf8proc_sequences + 1674},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, 1130, -1, 1130, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, 1133, -1, -1, -1, false, false, false, false, utf8proc_sequences + 1676},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, 1132, -1, 1132, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, 1135, -1, -1, -1, false, false, false, false, utf8proc_sequences + 1678},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, 1134, -1, 1134, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, 1137, -1, -1, -1, false, false, false, false, utf8proc_sequences + 1680},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, 1136, -1, 1136, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, 1139, -1, -1, -1, false, false, false, false, utf8proc_sequences + 1682},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, 1138, -1, 1138, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, 1141, -1, 5400, -1, false, false, false, false, utf8proc_sequences + 1684},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, 1140, -1, 1140, 5460, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 1686, false, -1, 1143, -1, -1, -1, false, false, false, false, utf8proc_sequences + 1689},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 1691, false, 1142, -1, 1142, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, 1145, -1, -1, -1, false, false, false, false, utf8proc_sequences + 1694},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, 1144, -1, 1144, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, 1147, -1, -1, -1, false, false, false, false, utf8proc_sequences + 1696},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, 1146, -1, 1146, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, 1149, -1, -1, -1, false, false, false, false, utf8proc_sequences + 1698},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, 1148, -1, 1148, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, 1151, -1, -1, -1, false, false, false, false, utf8proc_sequences + 1700},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, 1150, -1, 1150, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, 1153, -1, -1, -1, false, false, false, false, utf8proc_sequences + 1702},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, 1152, -1, 1152, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_ME, 0, UTF8PROC_BIDI_CLASS_NSM, 0, NULL, false, -1, -1, -1, -1, -1, false, false, false, true, NULL},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, 1163, -1, -1, -1, false, false, false, false, utf8proc_sequences + 1704},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, 1162, -1, 1162, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, 1165, -1, -1, -1, false, false, false, false, utf8proc_sequences + 1706},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, 1164, -1, 1164, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, 1167, -1, -1, -1, false, false, false, false, utf8proc_sequences + 1708},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, 1166, -1, 1166, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, 1169, -1, -1, -1, false, false, false, false, utf8proc_sequences + 1710},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, 1168, -1, 1168, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, 1171, -1, -1, -1, false, false, false, false, utf8proc_sequences + 1712},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, 1170, -1, 1170, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, 1173, -1, -1, -1, false, false, false, false, utf8proc_sequences + 1714},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, 1172, -1, 1172, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, 1175, -1, -1, -1, false, false, false, false, utf8proc_sequences + 1716},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, 1174, -1, 1174, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, 1177, -1, -1, -1, false, false, false, false, utf8proc_sequences + 1718},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, 1176, -1, 1176, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, 1179, -1, -1, -1, false, false, false, false, utf8proc_sequences + 1720},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, 1178, -1, 1178, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, 1181, -1, -1, -1, false, false, false, false, utf8proc_sequences + 1722},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, 1180, -1, 1180, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, 1183, -1, -1, -1, false, false, false, false, utf8proc_sequences + 1724},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, 1182, -1, 1182, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, 1185, -1, -1, -1, false, false, false, false, utf8proc_sequences + 1726},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, 1184, -1, 1184, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, 1187, -1, -1, -1, false, false, false, false, utf8proc_sequences + 1728},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, 1186, -1, 1186, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, 1189, -1, -1, -1, false, false, false, false, utf8proc_sequences + 1730},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, 1188, -1, 1188, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, 1191, -1, -1, -1, false, false, false, false, utf8proc_sequences + 1732},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, 1190, -1, 1190, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, 1193, -1, -1, -1, false, false, false, false, utf8proc_sequences + 1734},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, 1192, -1, 1192, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, 1195, -1, -1, -1, false, false, false, false, utf8proc_sequences + 1736},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, 1194, -1, 1194, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, 1197, -1, -1, -1, false, false, false, false, utf8proc_sequences + 1738},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, 1196, -1, 1196, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, 1199, -1, -1, -1, false, false, false, false, utf8proc_sequences + 1740},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, 1198, -1, 1198, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, 1201, -1, -1, -1, false, false, false, false, utf8proc_sequences + 1742},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, 1200, -1, 1200, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, 1203, -1, -1, -1, false, false, false, false, utf8proc_sequences + 1744},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, 1202, -1, 1202, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, 1205, -1, -1, -1, false, false, false, false, utf8proc_sequences + 1746},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, 1204, -1, 1204, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, 1207, -1, -1, -1, false, false, false, false, utf8proc_sequences + 1748},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, 1206, -1, 1206, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, 1209, -1, -1, -1, false, false, false, false, utf8proc_sequences + 1750},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, 1208, -1, 1208, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, 1211, -1, -1, -1, false, false, false, false, utf8proc_sequences + 1752},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, 1210, -1, 1210, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, 1213, -1, -1, -1, false, false, false, false, utf8proc_sequences + 1754},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, 1212, -1, 1212, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, 1215, -1, -1, -1, false, false, false, false, utf8proc_sequences + 1756},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, 1214, -1, 1214, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, 1231, -1, -1, -1, false, false, false, false, utf8proc_sequences + 1758},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 1760, false, -1, 1218, -1, -1, -1, false, false, false, false, utf8proc_sequences + 1763},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 1765, false, 1217, -1, 1217, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, 1220, -1, -1, -1, false, false, false, false, utf8proc_sequences + 1768},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, 1219, -1, 1219, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, 1222, -1, -1, -1, false, false, false, false, utf8proc_sequences + 1770},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, 1221, -1, 1221, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, 1224, -1, -1, -1, false, false, false, false, utf8proc_sequences + 1772},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, 1223, -1, 1223, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, 1226, -1, -1, -1, false, false, false, false, utf8proc_sequences + 1774},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, 1225, -1, 1225, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, 1228, -1, -1, -1, false, false, false, false, utf8proc_sequences + 1776},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, 1227, -1, 1227, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, 1230, -1, -1, -1, false, false, false, false, utf8proc_sequences + 1778},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, 1229, -1, 1229, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, 1216, -1, 1216, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 1780, false, -1, 1233, -1, -1, -1, false, false, false, false, utf8proc_sequences + 1783},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 1785, false, 1232, -1, 1232, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 1788, false, -1, 1235, -1, -1, -1, false, false, false, false, utf8proc_sequences + 1791},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 1793, false, 1234, -1, 1234, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, 1237, -1, -1, -1, false, false, false, false, utf8proc_sequences + 1796},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, 1236, -1, 1236, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 1798, false, -1, 1239, -1, -1, -1, false, false, false, false, utf8proc_sequences + 1801},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 1803, false, 1238, -1, 1238, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, 1241, -1, 5760, -1, false, false, false, false, utf8proc_sequences + 1806},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, 1240, -1, 1240, 5820, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 1808, false, -1, 1243, -1, -1, -1, false, false, false, false, utf8proc_sequences + 1811},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 1813, false, 1242, -1, 1242, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 1816, false, -1, 1245, -1, -1, -1, false, false, false, false, utf8proc_sequences + 1819},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 1821, false, 1244, -1, 1244, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 1824, false, -1, 1247, -1, -1, -1, false, false, false, false, utf8proc_sequences + 1827},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 1829, false, 1246, -1, 1246, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, 1249, -1, -1, -1, false, false, false, false, utf8proc_sequences + 1832},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, 1248, -1, 1248, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 1834, false, -1, 1251, -1, -1, -1, false, false, false, false, utf8proc_sequences + 1837},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 1839, false, 1250, -1, 1250, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 1842, false, -1, 1253, -1, -1, -1, false, false, false, false, utf8proc_sequences + 1845},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 1847, false, 1252, -1, 1252, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 1850, false, -1, 1255, -1, -1, -1, false, false, false, false, utf8proc_sequences + 1853},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 1855, false, 1254, -1, 1254, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, 1257, -1, 6120, -1, false, false, false, false, utf8proc_sequences + 1858},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, 1256, -1, 1256, 6180, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 1860, false, -1, 1259, -1, -1, -1, false, false, false, false, utf8proc_sequences + 1863},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 1865, false, 1258, -1, 1258, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 1868, false, -1, 1261, -1, -1, -1, false, false, false, false, utf8proc_sequences + 1871},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 1873, false, 1260, -1, 1260, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 1876, false, -1, 1263, -1, -1, -1, false, false, false, false, utf8proc_sequences + 1879},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 1881, false, 1262, -1, 1262, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 1884, false, -1, 1265, -1, -1, -1, false, false, false, false, utf8proc_sequences + 1887},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 1889, false, 1264, -1, 1264, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 1892, false, -1, 1267, -1, -1, -1, false, false, false, false, utf8proc_sequences + 1895},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 1897, false, 1266, -1, 1266, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 1900, false, -1, 1269, -1, -1, -1, false, false, false, false, utf8proc_sequences + 1903},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 1905, false, 1268, -1, 1268, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, 1271, -1, -1, -1, false, false, false, false, utf8proc_sequences + 1908},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, 1270, -1, 1270, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 1910, false, -1, 1273, -1, -1, -1, false, false, false, false, utf8proc_sequences + 1913},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 1915, false, 1272, -1, 1272, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, 1275, -1, -1, -1, false, false, false, false, utf8proc_sequences + 1918},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, 1274, -1, 1274, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, 1277, -1, -1, -1, false, false, false, false, utf8proc_sequences + 1920},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, 1276, -1, 1276, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, 1279, -1, -1, -1, false, false, false, false, utf8proc_sequences + 1922},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, 1278, -1, 1278, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, 1281, -1, -1, -1, false, false, false, false, utf8proc_sequences + 1924},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, 1280, -1, 1280, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, 1283, -1, -1, -1, false, false, false, false, utf8proc_sequences + 1926},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, 1282, -1, 1282, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, 1285, -1, -1, -1, false, false, false, false, utf8proc_sequences + 1928},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, 1284, -1, 1284, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, 1287, -1, -1, -1, false, false, false, false, utf8proc_sequences + 1930},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, 1286, -1, 1286, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, 1289, -1, -1, -1, false, false, false, false, utf8proc_sequences + 1932},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, 1288, -1, 1288, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, 1291, -1, -1, -1, false, false, false, false, utf8proc_sequences + 1934},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, 1290, -1, 1290, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, 1293, -1, -1, -1, false, false, false, false, utf8proc_sequences + 1936},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, 1292, -1, 1292, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, 1295, -1, -1, -1, false, false, false, false, utf8proc_sequences + 1938},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, 1294, -1, 1294, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, 1297, -1, -1, -1, false, false, false, false, utf8proc_sequences + 1940},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, 1296, -1, 1296, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, 1299, -1, -1, -1, false, false, false, false, utf8proc_sequences + 1942},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, 1298, -1, 1298, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, 1377, -1, -1, -1, false, false, false, false, utf8proc_sequences + 1944},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, 1378, -1, -1, -1, false, false, false, false, utf8proc_sequences + 1946},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, 1379, -1, -1, -1, false, false, false, false, utf8proc_sequences + 1948},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, 1380, -1, -1, -1, false, false, false, false, utf8proc_sequences + 1950},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, 1381, -1, -1, -1, false, false, false, false, utf8proc_sequences + 1952},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, 1382, -1, -1, -1, false, false, false, false, utf8proc_sequences + 1954},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, 1383, -1, -1, -1, false, false, false, false, utf8proc_sequences + 1956},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, 1384, -1, -1, -1, false, false, false, false, utf8proc_sequences + 1958},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, 1385, -1, -1, -1, false, false, false, false, utf8proc_sequences + 1960},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, 1386, -1, -1, -1, false, false, false, false, utf8proc_sequences + 1962},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, 1387, -1, -1, -1, false, false, false, false, utf8proc_sequences + 1964},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, 1388, -1, -1, -1, false, false, false, false, utf8proc_sequences + 1966},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, 1389, -1, -1, -1, false, false, false, false, utf8proc_sequences + 1968},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, 1390, -1, -1, -1, false, false, false, false, utf8proc_sequences + 1970},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, 1391, -1, -1, -1, false, false, false, false, utf8proc_sequences + 1972},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, 1392, -1, -1, -1, false, false, false, false, utf8proc_sequences + 1974},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, 1393, -1, -1, -1, false, false, false, false, utf8proc_sequences + 1976},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, 1394, -1, -1, -1, false, false, false, false, utf8proc_sequences + 1978},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, 1395, -1, -1, -1, false, false, false, false, utf8proc_sequences + 1980},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, 1396, -1, -1, -1, false, false, false, false, utf8proc_sequences + 1982},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, 1397, -1, -1, -1, false, false, false, false, utf8proc_sequences + 1984},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, 1398, -1, -1, -1, false, false, false, false, utf8proc_sequences + 1986},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, 1399, -1, -1, -1, false, false, false, false, utf8proc_sequences + 1988},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, 1400, -1, -1, -1, false, false, false, false, utf8proc_sequences + 1990},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, 1401, -1, -1, -1, false, false, false, false, utf8proc_sequences + 1992},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, 1402, -1, -1, -1, false, false, false, false, utf8proc_sequences + 1994},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, 1403, -1, -1, -1, false, false, false, false, utf8proc_sequences + 1996},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, 1404, -1, -1, -1, false, false, false, false, utf8proc_sequences + 1998},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, 1405, -1, -1, -1, false, false, false, false, utf8proc_sequences + 2000},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, 1406, -1, -1, -1, false, false, false, false, utf8proc_sequences + 2002},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, 1407, -1, -1, -1, false, false, false, false, utf8proc_sequences + 2004},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, 1408, -1, -1, -1, false, false, false, false, utf8proc_sequences + 2006},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, 1409, -1, -1, -1, false, false, false, false, utf8proc_sequences + 2008},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, 1410, -1, -1, -1, false, false, false, false, utf8proc_sequences + 2010},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, 1411, -1, -1, -1, false, false, false, false, utf8proc_sequences + 2012},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, 1412, -1, -1, -1, false, false, false, false, utf8proc_sequences + 2014},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, 1413, -1, -1, -1, false, false, false, false, utf8proc_sequences + 2016},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, 1414, -1, -1, -1, false, false, false, false, utf8proc_sequences + 2018},
+  {UTF8PROC_CATEGORY_PO, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, 1329, -1, 1329, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, 1330, -1, 1330, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, 1331, -1, 1331, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, 1332, -1, 1332, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, 1333, -1, 1333, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, 1334, -1, 1334, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, 1335, -1, 1335, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, 1336, -1, 1336, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, 1337, -1, 1337, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, 1338, -1, 1338, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, 1339, -1, 1339, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, 1340, -1, 1340, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, 1341, -1, 1341, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, 1342, -1, 1342, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, 1343, -1, 1343, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, 1344, -1, 1344, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, 1345, -1, 1345, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, 1346, -1, 1346, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, 1347, -1, 1347, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, 1348, -1, 1348, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, 1349, -1, 1349, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, 1350, -1, 1350, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, 1351, -1, 1351, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, 1352, -1, 1352, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, 1353, -1, 1353, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, 1354, -1, 1354, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, 1355, -1, 1355, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, 1356, -1, 1356, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, 1357, -1, 1357, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, 1358, -1, 1358, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, 1359, -1, 1359, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, 1360, -1, 1360, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, 1361, -1, 1361, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, 1362, -1, 1362, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, 1363, -1, 1363, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, 1364, -1, 1364, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, 1365, -1, 1365, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, 1366, -1, 1366, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 2020, false, -1, -1, -1, -1, -1, false, false, false, false, utf8proc_sequences + 2020},
+  {UTF8PROC_CATEGORY_PD, 0, UTF8PROC_BIDI_CLASS_ON, 0, NULL, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_MN, 222, UTF8PROC_BIDI_CLASS_NSM, 0, NULL, false, -1, -1, -1, -1, -1, false, false, false, true, NULL},
+  {UTF8PROC_CATEGORY_MN, 228, UTF8PROC_BIDI_CLASS_NSM, 0, NULL, false, -1, -1, -1, -1, -1, false, false, false, true, NULL},
+  {UTF8PROC_CATEGORY_MN, 10, UTF8PROC_BIDI_CLASS_NSM, 0, NULL, false, -1, -1, -1, -1, -1, false, false, false, true, NULL},
+  {UTF8PROC_CATEGORY_MN, 11, UTF8PROC_BIDI_CLASS_NSM, 0, NULL, false, -1, -1, -1, -1, -1, false, false, false, true, NULL},
+  {UTF8PROC_CATEGORY_MN, 12, UTF8PROC_BIDI_CLASS_NSM, 0, NULL, false, -1, -1, -1, -1, -1, false, false, false, true, NULL},
+  {UTF8PROC_CATEGORY_MN, 13, UTF8PROC_BIDI_CLASS_NSM, 0, NULL, false, -1, -1, -1, -1, -1, false, false, false, true, NULL},
+  {UTF8PROC_CATEGORY_MN, 14, UTF8PROC_BIDI_CLASS_NSM, 0, NULL, false, -1, -1, -1, -1, -1, false, false, false, true, NULL},
+  {UTF8PROC_CATEGORY_MN, 15, UTF8PROC_BIDI_CLASS_NSM, 0, NULL, false, -1, -1, -1, -1, -1, false, false, false, true, NULL},
+  {UTF8PROC_CATEGORY_MN, 16, UTF8PROC_BIDI_CLASS_NSM, 0, NULL, false, -1, -1, -1, -1, -1, false, false, false, true, NULL},
+  {UTF8PROC_CATEGORY_MN, 17, UTF8PROC_BIDI_CLASS_NSM, 0, NULL, false, -1, -1, -1, -1, -1, false, false, false, true, NULL},
+  {UTF8PROC_CATEGORY_MN, 18, UTF8PROC_BIDI_CLASS_NSM, 0, NULL, false, -1, -1, -1, -1, -1, false, false, false, true, NULL},
+  {UTF8PROC_CATEGORY_MN, 19, UTF8PROC_BIDI_CLASS_NSM, 0, NULL, false, -1, -1, -1, -1, -1, false, false, false, true, NULL},
+  {UTF8PROC_CATEGORY_MN, 20, UTF8PROC_BIDI_CLASS_NSM, 0, NULL, false, -1, -1, -1, -1, -1, false, false, false, true, NULL},
+  {UTF8PROC_CATEGORY_MN, 21, UTF8PROC_BIDI_CLASS_NSM, 0, NULL, false, -1, -1, -1, -1, -1, false, false, false, true, NULL},
+  {UTF8PROC_CATEGORY_MN, 22, UTF8PROC_BIDI_CLASS_NSM, 0, NULL, false, -1, -1, -1, -1, -1, false, false, false, true, NULL},
+  {UTF8PROC_CATEGORY_PO, 0, UTF8PROC_BIDI_CLASS_R, 0, NULL, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_MN, 23, UTF8PROC_BIDI_CLASS_NSM, 0, NULL, false, -1, -1, -1, -1, -1, false, false, false, true, NULL},
+  {UTF8PROC_CATEGORY_MN, 24, UTF8PROC_BIDI_CLASS_NSM, 0, NULL, false, -1, -1, -1, -1, -1, false, false, false, true, NULL},
+  {UTF8PROC_CATEGORY_MN, 25, UTF8PROC_BIDI_CLASS_NSM, 0, NULL, false, -1, -1, -1, -1, -1, false, false, false, true, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_R, 0, NULL, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_CF, 0, UTF8PROC_BIDI_CLASS_AL, 0, NULL, false, -1, -1, -1, -1, -1, false, true, true, false, NULL},
+  {UTF8PROC_CATEGORY_SC, 0, UTF8PROC_BIDI_CLASS_AL, 0, NULL, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_PO, 0, UTF8PROC_BIDI_CLASS_AL, 0, NULL, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, 0, NULL, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, 0, utf8proc_sequences + 2023, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, 0, utf8proc_sequences + 2026, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, 0, utf8proc_sequences + 2029, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, 0, utf8proc_sequences + 2032, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, 0, utf8proc_sequences + 2035, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, 0, NULL, false, -1, -1, -1, 6600, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LM, 0, UTF8PROC_BIDI_CLASS_AL, 0, NULL, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, 0, NULL, false, -1, -1, -1, 6660, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, 0, NULL, false, -1, -1, -1, 6720, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_MN, 27, UTF8PROC_BIDI_CLASS_NSM, 0, NULL, false, -1, -1, -1, -1, -1, false, false, false, true, NULL},
+  {UTF8PROC_CATEGORY_MN, 28, UTF8PROC_BIDI_CLASS_NSM, 0, NULL, false, -1, -1, -1, -1, -1, false, false, false, true, NULL},
+  {UTF8PROC_CATEGORY_MN, 29, UTF8PROC_BIDI_CLASS_NSM, 0, NULL, false, -1, -1, -1, -1, -1, false, false, false, true, NULL},
+  {UTF8PROC_CATEGORY_MN, 30, UTF8PROC_BIDI_CLASS_NSM, 0, NULL, false, -1, -1, -1, -1, -1, false, false, false, true, NULL},
+  {UTF8PROC_CATEGORY_MN, 31, UTF8PROC_BIDI_CLASS_NSM, 0, NULL, false, -1, -1, -1, -1, -1, false, false, false, true, NULL},
+  {UTF8PROC_CATEGORY_MN, 32, UTF8PROC_BIDI_CLASS_NSM, 0, NULL, false, -1, -1, -1, -1, -1, false, false, false, true, NULL},
+  {UTF8PROC_CATEGORY_MN, 33, UTF8PROC_BIDI_CLASS_NSM, 0, NULL, false, -1, -1, -1, -1, -1, false, false, false, true, NULL},
+  {UTF8PROC_CATEGORY_MN, 34, UTF8PROC_BIDI_CLASS_NSM, 0, NULL, false, -1, -1, -1, -1, -1, false, false, false, true, NULL},
+  {UTF8PROC_CATEGORY_MN, 230, UTF8PROC_BIDI_CLASS_NSM, 0, NULL, false, -1, -1, -1, -1, 17, false, false, false, true, NULL},
+  {UTF8PROC_CATEGORY_MN, 230, UTF8PROC_BIDI_CLASS_NSM, 0, NULL, false, -1, -1, -1, -1, 18, false, false, false, true, NULL},
+  {UTF8PROC_CATEGORY_MN, 220, UTF8PROC_BIDI_CLASS_NSM, 0, NULL, false, -1, -1, -1, -1, 19, false, false, false, true, NULL},
+  {UTF8PROC_CATEGORY_ND, 0, UTF8PROC_BIDI_CLASS_AN, 0, NULL, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_PO, 0, UTF8PROC_BIDI_CLASS_AN, 0, NULL, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_MN, 35, UTF8PROC_BIDI_CLASS_NSM, 0, NULL, false, -1, -1, -1, -1, -1, false, false, false, true, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 2038, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 2041, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 2044, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 2047, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, 0, utf8proc_sequences + 2050, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, 0, NULL, false, -1, -1, -1, 6840, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, 0, utf8proc_sequences + 2053, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, 0, NULL, false, -1, -1, -1, 6900, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, 0, utf8proc_sequences + 2056, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, 0, NULL, false, -1, -1, -1, 6780, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_AL, 0, NULL, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_MN, 36, UTF8PROC_BIDI_CLASS_NSM, 0, NULL, false, -1, -1, -1, -1, -1, false, false, false, true, NULL},
+  {UTF8PROC_CATEGORY_MN, 0, UTF8PROC_BIDI_CLASS_NSM, 0, NULL, false, -1, -1, -1, -1, -1, false, false, false, true, NULL},
+  {UTF8PROC_CATEGORY_ND, 0, UTF8PROC_BIDI_CLASS_R, 0, NULL, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LM, 0, UTF8PROC_BIDI_CLASS_R, 0, NULL, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_MC, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, -1, -1, 6960, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 2059, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, -1, -1, 7020, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 2062, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, -1, -1, 7080, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 2065, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_MN, 7, UTF8PROC_BIDI_CLASS_NSM, 0, NULL, false, -1, -1, -1, -1, 20, false, false, false, true, NULL},
+  {UTF8PROC_CATEGORY_MN, 9, UTF8PROC_BIDI_CLASS_NSM, 0, NULL, false, -1, -1, -1, -1, -1, false, false, false, true, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 2068, false, -1, -1, -1, -1, -1, true, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 2071, false, -1, -1, -1, -1, -1, true, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 2074, false, -1, -1, -1, -1, -1, true, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 2077, false, -1, -1, -1, -1, -1, true, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 2080, false, -1, -1, -1, -1, -1, true, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 2083, false, -1, -1, -1, -1, -1, true, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 2086, false, -1, -1, -1, -1, -1, true, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 2089, false, -1, -1, -1, -1, -1, true, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_ND, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_MN, 7, UTF8PROC_BIDI_CLASS_NSM, 0, NULL, false, -1, -1, -1, -1, -1, false, false, false, true, NULL},
+  {UTF8PROC_CATEGORY_MC, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, -1, -1, -1, 21, false, false, false, true, NULL},
+  {UTF8PROC_CATEGORY_MC, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, -1, -1, 7140, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_MC, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 2092, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_MC, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 2095, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_MC, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, -1, -1, -1, 22, false, false, false, true, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 2098, false, -1, -1, -1, -1, -1, true, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 2101, false, -1, -1, -1, -1, -1, true, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 2104, false, -1, -1, -1, -1, -1, true, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_NO, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 2107, false, -1, -1, -1, -1, -1, true, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 2110, false, -1, -1, -1, -1, -1, true, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 2113, false, -1, -1, -1, -1, -1, true, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 2116, false, -1, -1, -1, -1, -1, true, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 2119, false, -1, -1, -1, -1, -1, true, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 2122, false, -1, -1, -1, -1, -1, true, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_MC, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, -1, -1, -1, 24, false, false, false, true, NULL},
+  {UTF8PROC_CATEGORY_MC, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, -1, -1, 7200, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_MC, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 2125, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_MC, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 2128, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_MC, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 2131, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_MN, 0, UTF8PROC_BIDI_CLASS_NSM, 0, NULL, false, -1, -1, -1, -1, 23, false, false, false, true, NULL},
+  {UTF8PROC_CATEGORY_MC, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, -1, -1, -1, 25, false, false, false, true, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 2134, false, -1, -1, -1, -1, -1, true, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 2137, false, -1, -1, -1, -1, -1, true, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, -1, -1, 7260, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 2140, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_MC, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, -1, -1, -1, 27, false, false, false, true, NULL},
+  {UTF8PROC_CATEGORY_MC, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, -1, -1, 7320, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_MC, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, -1, -1, 7380, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_MC, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 2143, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_MC, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 2146, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_MC, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 2149, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_MC, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, -1, -1, -1, 26, false, false, false, true, NULL},
+  {UTF8PROC_CATEGORY_MN, 0, UTF8PROC_BIDI_CLASS_NSM, 0, NULL, false, -1, -1, -1, 7440, -1, false, false, false, true, NULL},
+  {UTF8PROC_CATEGORY_MN, 0, UTF8PROC_BIDI_CLASS_NSM, 0, utf8proc_sequences + 2152, false, -1, -1, -1, -1, -1, false, false, false, true, NULL},
+  {UTF8PROC_CATEGORY_MN, 84, UTF8PROC_BIDI_CLASS_NSM, 0, NULL, false, -1, -1, -1, -1, -1, false, false, false, true, NULL},
+  {UTF8PROC_CATEGORY_MN, 91, UTF8PROC_BIDI_CLASS_NSM, 0, NULL, false, -1, -1, -1, -1, 28, false, false, false, true, NULL},
+  {UTF8PROC_CATEGORY_MN, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, -1, -1, 7500, -1, false, false, false, true, NULL},
+  {UTF8PROC_CATEGORY_MC, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 2155, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_MC, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, -1, -1, -1, 31, false, false, false, true, NULL},
+  {UTF8PROC_CATEGORY_MN, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, -1, -1, 7560, -1, false, false, false, true, NULL},
+  {UTF8PROC_CATEGORY_MC, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 2158, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_MC, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 2161, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_MC, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 2164, false, -1, -1, -1, 7620, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_MC, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 2167, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_MC, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, -1, -1, -1, 29, false, false, false, true, NULL},
+  {UTF8PROC_CATEGORY_MC, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, -1, -1, -1, 30, false, false, false, true, NULL},
+  {UTF8PROC_CATEGORY_MC, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, -1, -1, -1, 32, false, false, false, true, NULL},
+  {UTF8PROC_CATEGORY_MC, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, -1, -1, 7680, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_MC, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, -1, -1, 7740, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_MC, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 2170, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_MC, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 2173, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_MC, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 2176, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_MC, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, -1, -1, -1, 33, false, false, false, true, NULL},
+  {UTF8PROC_CATEGORY_MN, 9, UTF8PROC_BIDI_CLASS_NSM, 0, NULL, false, -1, -1, -1, -1, 34, false, false, false, true, NULL},
+  {UTF8PROC_CATEGORY_MC, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, -1, -1, -1, 35, false, false, false, true, NULL},
+  {UTF8PROC_CATEGORY_MC, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, -1, -1, 7800, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_MC, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 2179, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_MC, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 2182, false, -1, -1, -1, 7860, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_MC, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 2185, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_MC, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 2188, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_MC, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, -1, -1, -1, 36, false, false, false, true, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 2191, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_MN, 103, UTF8PROC_BIDI_CLASS_NSM, 0, NULL, false, -1, -1, -1, -1, -1, false, false, false, true, NULL},
+  {UTF8PROC_CATEGORY_MN, 107, UTF8PROC_BIDI_CLASS_NSM, 0, NULL, false, -1, -1, -1, -1, -1, false, false, false, true, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 2194, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_MN, 118, UTF8PROC_BIDI_CLASS_NSM, 0, NULL, false, -1, -1, -1, -1, -1, false, false, false, true, NULL},
+  {UTF8PROC_CATEGORY_MN, 122, UTF8PROC_BIDI_CLASS_NSM, 0, NULL, false, -1, -1, -1, -1, -1, false, false, false, true, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 2197, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 2200, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_PO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_NOBREAK, utf8proc_sequences + 2203, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_MN, 216, UTF8PROC_BIDI_CLASS_NSM, 0, NULL, false, -1, -1, -1, -1, -1, false, false, false, true, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 2205, false, -1, -1, -1, -1, -1, true, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 2208, false, -1, -1, -1, -1, -1, true, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 2211, false, -1, -1, -1, -1, -1, true, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 2214, false, -1, -1, -1, -1, -1, true, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 2217, false, -1, -1, -1, -1, -1, true, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 2220, false, -1, -1, -1, -1, -1, true, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_MN, 129, UTF8PROC_BIDI_CLASS_NSM, 0, NULL, false, -1, -1, -1, -1, -1, false, false, false, true, NULL},
+  {UTF8PROC_CATEGORY_MN, 130, UTF8PROC_BIDI_CLASS_NSM, 0, NULL, false, -1, -1, -1, -1, -1, false, false, false, true, NULL},
+  {UTF8PROC_CATEGORY_MN, 0, UTF8PROC_BIDI_CLASS_NSM, 0, utf8proc_sequences + 2223, false, -1, -1, -1, -1, -1, false, false, false, true, NULL},
+  {UTF8PROC_CATEGORY_MN, 132, UTF8PROC_BIDI_CLASS_NSM, 0, NULL, false, -1, -1, -1, -1, -1, false, false, false, true, NULL},
+  {UTF8PROC_CATEGORY_MN, 0, UTF8PROC_BIDI_CLASS_NSM, 0, utf8proc_sequences + 2226, false, -1, -1, -1, -1, -1, false, false, false, true, NULL},
+  {UTF8PROC_CATEGORY_MN, 0, UTF8PROC_BIDI_CLASS_NSM, 0, utf8proc_sequences + 2229, false, -1, -1, -1, -1, -1, true, false, false, true, NULL},
+  {UTF8PROC_CATEGORY_MN, 0, UTF8PROC_BIDI_CLASS_NSM, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 2232, false, -1, -1, -1, -1, -1, false, false, false, true, NULL},
+  {UTF8PROC_CATEGORY_MN, 0, UTF8PROC_BIDI_CLASS_NSM, 0, utf8proc_sequences + 2235, false, -1, -1, -1, -1, -1, true, false, false, true, NULL},
+  {UTF8PROC_CATEGORY_MN, 0, UTF8PROC_BIDI_CLASS_NSM, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 2238, false, -1, -1, -1, -1, -1, false, false, false, true, NULL},
+  {UTF8PROC_CATEGORY_MN, 0, UTF8PROC_BIDI_CLASS_NSM, 0, utf8proc_sequences + 2241, false, -1, -1, -1, -1, -1, false, false, false, true, NULL},
+  {UTF8PROC_CATEGORY_MN, 0, UTF8PROC_BIDI_CLASS_NSM, 0, utf8proc_sequences + 2244, false, -1, -1, -1, -1, -1, true, false, false, true, NULL},
+  {UTF8PROC_CATEGORY_MN, 0, UTF8PROC_BIDI_CLASS_NSM, 0, utf8proc_sequences + 2247, false, -1, -1, -1, -1, -1, true, false, false, true, NULL},
+  {UTF8PROC_CATEGORY_MN, 0, UTF8PROC_BIDI_CLASS_NSM, 0, utf8proc_sequences + 2250, false, -1, -1, -1, -1, -1, true, false, false, true, NULL},
+  {UTF8PROC_CATEGORY_MN, 0, UTF8PROC_BIDI_CLASS_NSM, 0, utf8proc_sequences + 2253, false, -1, -1, -1, -1, -1, true, false, false, true, NULL},
+  {UTF8PROC_CATEGORY_MN, 0, UTF8PROC_BIDI_CLASS_NSM, 0, utf8proc_sequences + 2256, false, -1, -1, -1, -1, -1, true, false, false, true, NULL},
+  {UTF8PROC_CATEGORY_MN, 0, UTF8PROC_BIDI_CLASS_NSM, 0, utf8proc_sequences + 2259, false, -1, -1, -1, -1, -1, true, false, false, true, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, -1, -1, 7920, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 2262, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_MN, 0, UTF8PROC_BIDI_CLASS_NSM, 0, NULL, false, -1, -1, -1, -1, 37, false, false, false, true, NULL},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, 11520, -1, -1, -1, false, false, false, false, utf8proc_sequences + 2265},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, 11521, -1, -1, -1, false, false, false, false, utf8proc_sequences + 2267},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, 11522, -1, -1, -1, false, false, false, false, utf8proc_sequences + 2269},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, 11523, -1, -1, -1, false, false, false, false, utf8proc_sequences + 2271},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, 11524, -1, -1, -1, false, false, false, false, utf8proc_sequences + 2273},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, 11525, -1, -1, -1, false, false, false, false, utf8proc_sequences + 2275},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, 11526, -1, -1, -1, false, false, false, false, utf8proc_sequences + 2277},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, 11527, -1, -1, -1, false, false, false, false, utf8proc_sequences + 2279},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, 11528, -1, -1, -1, false, false, false, false, utf8proc_sequences + 2281},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, 11529, -1, -1, -1, false, false, false, false, utf8proc_sequences + 2283},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, 11530, -1, -1, -1, false, false, false, false, utf8proc_sequences + 2285},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, 11531, -1, -1, -1, false, false, false, false, utf8proc_sequences + 2287},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, 11532, -1, -1, -1, false, false, false, false, utf8proc_sequences + 2289},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, 11533, -1, -1, -1, false, false, false, false, utf8proc_sequences + 2291},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, 11534, -1, -1, -1, false, false, false, false, utf8proc_sequences + 2293},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, 11535, -1, -1, -1, false, false, false, false, utf8proc_sequences + 2295},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, 11536, -1, -1, -1, false, false, false, false, utf8proc_sequences + 2297},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, 11537, -1, -1, -1, false, false, false, false, utf8proc_sequences + 2299},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, 11538, -1, -1, -1, false, false, false, false, utf8proc_sequences + 2301},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, 11539, -1, -1, -1, false, false, false, false, utf8proc_sequences + 2303},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, 11540, -1, -1, -1, false, false, false, false, utf8proc_sequences + 2305},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, 11541, -1, -1, -1, false, false, false, false, utf8proc_sequences + 2307},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, 11542, -1, -1, -1, false, false, false, false, utf8proc_sequences + 2309},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, 11543, -1, -1, -1, false, false, false, false, utf8proc_sequences + 2311},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, 11544, -1, -1, -1, false, false, false, false, utf8proc_sequences + 2313},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, 11545, -1, -1, -1, false, false, false, false, utf8proc_sequences + 2315},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, 11546, -1, -1, -1, false, false, false, false, utf8proc_sequences + 2317},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, 11547, -1, -1, -1, false, false, false, false, utf8proc_sequences + 2319},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, 11548, -1, -1, -1, false, false, false, false, utf8proc_sequences + 2321},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, 11549, -1, -1, -1, false, false, false, false, utf8proc_sequences + 2323},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, 11550, -1, -1, -1, false, false, false, false, utf8proc_sequences + 2325},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, 11551, -1, -1, -1, false, false, false, false, utf8proc_sequences + 2327},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, 11552, -1, -1, -1, false, false, false, false, utf8proc_sequences + 2329},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, 11553, -1, -1, -1, false, false, false, false, utf8proc_sequences + 2331},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, 11554, -1, -1, -1, false, false, false, false, utf8proc_sequences + 2333},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, 11555, -1, -1, -1, false, false, false, false, utf8proc_sequences + 2335},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, 11556, -1, -1, -1, false, false, false, false, utf8proc_sequences + 2337},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, 11557, -1, -1, -1, false, false, false, false, utf8proc_sequences + 2339},
+  {UTF8PROC_CATEGORY_LM, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_SUPER, utf8proc_sequences + 2341, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, -1, -1, -1, -1, false, true, false, false, NULL},
+  {UTF8PROC_CATEGORY_NL, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_CF, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, -1, -1, -1, -1, false, true, true, false, NULL},
+  {UTF8PROC_CATEGORY_NO, 0, UTF8PROC_BIDI_CLASS_ON, 0, NULL, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_MC, 0, UTF8PROC_BIDI_CLASS_NSM, 0, NULL, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, -1, -1, 7980, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 2343, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, -1, -1, 8040, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 2346, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, -1, -1, 8100, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 2349, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, -1, -1, 8160, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 2352, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, -1, -1, 8220, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 2355, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, -1, -1, 8280, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 2358, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_MC, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, -1, -1, -1, 38, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_MN, 0, UTF8PROC_BIDI_CLASS_NSM, 0, NULL, false, -1, -1, -1, 8340, -1, false, false, false, true, NULL},
+  {UTF8PROC_CATEGORY_MC, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 2361, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_MN, 0, UTF8PROC_BIDI_CLASS_NSM, 0, NULL, false, -1, -1, -1, 8400, -1, false, false, false, true, NULL},
+  {UTF8PROC_CATEGORY_MC, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 2364, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_MC, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, -1, -1, 8460, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_MC, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, -1, -1, 8520, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_MC, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 2367, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_MC, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 2370, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_MN, 0, UTF8PROC_BIDI_CLASS_NSM, 0, NULL, false, -1, -1, -1, 8580, -1, false, false, false, true, NULL},
+  {UTF8PROC_CATEGORY_MC, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 2373, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_MC, 9, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LM, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_SUPER, utf8proc_sequences + 2376, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LM, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_SUPER, utf8proc_sequences + 2378, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LM, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_SUPER, utf8proc_sequences + 2380, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LM, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_SUPER, utf8proc_sequences + 2382, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LM, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_SUPER, utf8proc_sequences + 2384, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LM, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_SUPER, utf8proc_sequences + 2386, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LM, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_SUPER, utf8proc_sequences + 2388, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LM, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_SUPER, utf8proc_sequences + 2390, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LM, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_SUPER, utf8proc_sequences + 2392, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LM, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_SUPER, utf8proc_sequences + 2394, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LM, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_SUPER, utf8proc_sequences + 2396, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LM, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_SUPER, utf8proc_sequences + 2398, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LM, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_SUPER, utf8proc_sequences + 2400, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LM, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_SUPER, utf8proc_sequences + 2402, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LM, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_SUPER, utf8proc_sequences + 2404, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LM, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_SUPER, utf8proc_sequences + 2406, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LM, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_SUPER, utf8proc_sequences + 2408, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LM, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_SUPER, utf8proc_sequences + 2410, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LM, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_SUPER, utf8proc_sequences + 2412, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LM, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_SUPER, utf8proc_sequences + 2414, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LM, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_SUPER, utf8proc_sequences + 2416, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LM, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_SUPER, utf8proc_sequences + 0, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LM, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_SUPER, utf8proc_sequences + 2418, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LM, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_SUPER, utf8proc_sequences + 2420, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LM, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_SUPER, utf8proc_sequences + 2422, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LM, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_SUPER, utf8proc_sequences + 2, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LM, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_SUPER, utf8proc_sequences + 6, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LM, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_SUPER, utf8proc_sequences + 8, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LM, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_SUPER, utf8proc_sequences + 792, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LM, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_SUPER, utf8proc_sequences + 794, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LM, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_SUPER, utf8proc_sequences + 2424, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LM, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_SUPER, utf8proc_sequences + 12, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LM, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_SUPER, utf8proc_sequences + 20, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LM, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_SUPER, utf8proc_sequences + 24, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LM, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_SUPER, utf8proc_sequences + 579, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LM, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_SUPER, utf8proc_sequences + 28, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LM, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_SUPER, utf8proc_sequences + 780, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LM, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_SUPER, utf8proc_sequences + 2426, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LM, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_SUPER, utf8proc_sequences + 2428, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LM, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_SUPER, utf8proc_sequences + 30, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LM, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_SUPER, utf8proc_sequences + 38, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LM, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_SUPER, utf8proc_sequences + 40, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LM, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_SUPER, utf8proc_sequences + 2430, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LM, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_SUPER, utf8proc_sequences + 808, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LM, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_SUPER, utf8proc_sequences + 42, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LM, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_SUPER, utf8proc_sequences + 2432, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LM, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_SUPER, utf8proc_sequences + 1384, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LM, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_SUPER, utf8proc_sequences + 1386, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LM, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_SUPER, utf8proc_sequences + 1388, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LM, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_SUPER, utf8proc_sequences + 1418, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LM, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_SUPER, utf8proc_sequences + 1420, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_SUB, utf8proc_sequences + 16, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_SUB, utf8proc_sequences + 34, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_SUB, utf8proc_sequences + 40, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_SUB, utf8proc_sequences + 42, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_SUB, utf8proc_sequences + 1384, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_SUB, utf8proc_sequences + 1386, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_SUB, utf8proc_sequences + 1410, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_SUB, utf8proc_sequences + 1418, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_SUB, utf8proc_sequences + 1420, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LM, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_SUPER, utf8proc_sequences + 1602, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, 11363, -1, 11363, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LM, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_SUPER, utf8proc_sequences + 2434, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LM, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_SUPER, utf8proc_sequences + 4, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LM, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_SUPER, utf8proc_sequences + 2436, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LM, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_SUPER, utf8proc_sequences + 163, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LM, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_SUPER, utf8proc_sequences + 10, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LM, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_SUPER, utf8proc_sequences + 2438, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LM, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_SUPER, utf8proc_sequences + 2440, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LM, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_SUPER, utf8proc_sequences + 2442, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LM, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_SUPER, utf8proc_sequences + 804, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LM, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_SUPER, utf8proc_sequences + 802, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LM, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_SUPER, utf8proc_sequences + 2444, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LM, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_SUPER, utf8proc_sequences + 2446, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LM, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_SUPER, utf8proc_sequences + 2448, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LM, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_SUPER, utf8proc_sequences + 2450, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LM, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_SUPER, utf8proc_sequences + 2452, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LM, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_SUPER, utf8proc_sequences + 2454, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LM, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_SUPER, utf8proc_sequences + 2456, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LM, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_SUPER, utf8proc_sequences + 2458, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LM, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_SUPER, utf8proc_sequences + 810, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LM, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_SUPER, utf8proc_sequences + 2460, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LM, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_SUPER, utf8proc_sequences + 2462, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LM, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_SUPER, utf8proc_sequences + 812, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LM, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_SUPER, utf8proc_sequences + 2464, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LM, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_SUPER, utf8proc_sequences + 2466, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LM, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_SUPER, utf8proc_sequences + 830, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LM, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_SUPER, utf8proc_sequences + 2468, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LM, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_SUPER, utf8proc_sequences + 1275, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LM, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_SUPER, utf8proc_sequences + 844, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LM, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_SUPER, utf8proc_sequences + 2470, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LM, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_SUPER, utf8proc_sequences + 846, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LM, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_SUPER, utf8proc_sequences + 1277, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LM, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_SUPER, utf8proc_sequences + 50, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LM, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_SUPER, utf8proc_sequences + 2472, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LM, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_SUPER, utf8proc_sequences + 2474, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LM, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_SUPER, utf8proc_sequences + 852, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LM, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_SUPER, utf8proc_sequences + 1396, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 2476, false, -1, 7681, -1, -1, -1, false, false, false, false, utf8proc_sequences + 2479},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 2481, false, 7680, -1, 7680, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 2484, false, -1, 7683, -1, -1, -1, false, false, false, false, utf8proc_sequences + 2487},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 2489, false, 7682, -1, 7682, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 2492, false, -1, 7685, -1, -1, -1, false, false, false, false, utf8proc_sequences + 2495},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 2497, false, 7684, -1, 7684, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 2500, false, -1, 7687, -1, -1, -1, false, false, false, false, utf8proc_sequences + 2503},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 2505, false, 7686, -1, 7686, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 2508, false, -1, 7689, -1, -1, -1, false, false, false, false, utf8proc_sequences + 2511},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 2513, false, 7688, -1, 7688, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 2516, false, -1, 7691, -1, -1, -1, false, false, false, false, utf8proc_sequences + 2519},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 2521, false, 7690, -1, 7690, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 2524, false, -1, 7693, -1, -1, -1, false, false, false, false, utf8proc_sequences + 2527},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 2529, false, 7692, -1, 7692, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 2532, false, -1, 7695, -1, -1, -1, false, false, false, false, utf8proc_sequences + 2535},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 2537, false, 7694, -1, 7694, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 2540, false, -1, 7697, -1, -1, -1, false, false, false, false, utf8proc_sequences + 2543},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 2545, false, 7696, -1, 7696, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 2548, false, -1, 7699, -1, -1, -1, false, false, false, false, utf8proc_sequences + 2551},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 2553, false, 7698, -1, 7698, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 2556, false, -1, 7701, -1, -1, -1, false, false, false, false, utf8proc_sequences + 2559},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 2561, false, 7700, -1, 7700, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 2564, false, -1, 7703, -1, -1, -1, false, false, false, false, utf8proc_sequences + 2567},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 2569, false, 7702, -1, 7702, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 2572, false, -1, 7705, -1, -1, -1, false, false, false, false, utf8proc_sequences + 2575},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 2577, false, 7704, -1, 7704, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 2580, false, -1, 7707, -1, -1, -1, false, false, false, false, utf8proc_sequences + 2583},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 2585, false, 7706, -1, 7706, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 2588, false, -1, 7709, -1, -1, -1, false, false, false, false, utf8proc_sequences + 2591},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 2593, false, 7708, -1, 7708, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 2596, false, -1, 7711, -1, -1, -1, false, false, false, false, utf8proc_sequences + 2599},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 2601, false, 7710, -1, 7710, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 2604, false, -1, 7713, -1, -1, -1, false, false, false, false, utf8proc_sequences + 2607},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 2609, false, 7712, -1, 7712, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 2612, false, -1, 7715, -1, -1, -1, false, false, false, false, utf8proc_sequences + 2615},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 2617, false, 7714, -1, 7714, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 2620, false, -1, 7717, -1, -1, -1, false, false, false, false, utf8proc_sequences + 2623},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 2625, false, 7716, -1, 7716, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 2628, false, -1, 7719, -1, -1, -1, false, false, false, false, utf8proc_sequences + 2631},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 2633, false, 7718, -1, 7718, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 2636, false, -1, 7721, -1, -1, -1, false, false, false, false, utf8proc_sequences + 2639},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 2641, false, 7720, -1, 7720, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 2644, false, -1, 7723, -1, -1, -1, false, false, false, false, utf8proc_sequences + 2647},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 2649, false, 7722, -1, 7722, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 2652, false, -1, 7725, -1, -1, -1, false, false, false, false, utf8proc_sequences + 2655},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 2657, false, 7724, -1, 7724, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 2660, false, -1, 7727, -1, -1, -1, false, false, false, false, utf8proc_sequences + 2663},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 2665, false, 7726, -1, 7726, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 2668, false, -1, 7729, -1, -1, -1, false, false, false, false, utf8proc_sequences + 2671},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 2673, false, 7728, -1, 7728, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 2676, false, -1, 7731, -1, -1, -1, false, false, false, false, utf8proc_sequences + 2679},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 2681, false, 7730, -1, 7730, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 2684, false, -1, 7733, -1, -1, -1, false, false, false, false, utf8proc_sequences + 2687},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 2689, false, 7732, -1, 7732, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 2692, false, -1, 7735, -1, 9360, -1, false, false, false, false, utf8proc_sequences + 2695},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 2697, false, 7734, -1, 7734, 9420, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 2700, false, -1, 7737, -1, -1, -1, false, false, false, false, utf8proc_sequences + 2703},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 2705, false, 7736, -1, 7736, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 2708, false, -1, 7739, -1, -1, -1, false, false, false, false, utf8proc_sequences + 2711},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 2713, false, 7738, -1, 7738, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 2716, false, -1, 7741, -1, -1, -1, false, false, false, false, utf8proc_sequences + 2719},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 2721, false, 7740, -1, 7740, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 2724, false, -1, 7743, -1, -1, -1, false, false, false, false, utf8proc_sequences + 2727},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 2729, false, 7742, -1, 7742, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 2732, false, -1, 7745, -1, -1, -1, false, false, false, false, utf8proc_sequences + 2735},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 2737, false, 7744, -1, 7744, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 2740, false, -1, 7747, -1, -1, -1, false, false, false, false, utf8proc_sequences + 2743},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 2745, false, 7746, -1, 7746, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 2748, false, -1, 7749, -1, -1, -1, false, false, false, false, utf8proc_sequences + 2751},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 2753, false, 7748, -1, 7748, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 2756, false, -1, 7751, -1, -1, -1, false, false, false, false, utf8proc_sequences + 2759},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 2761, false, 7750, -1, 7750, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 2764, false, -1, 7753, -1, -1, -1, false, false, false, false, utf8proc_sequences + 2767},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 2769, false, 7752, -1, 7752, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 2772, false, -1, 7755, -1, -1, -1, false, false, false, false, utf8proc_sequences + 2775},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 2777, false, 7754, -1, 7754, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 2780, false, -1, 7757, -1, -1, -1, false, false, false, false, utf8proc_sequences + 2783},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 2785, false, 7756, -1, 7756, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 2788, false, -1, 7759, -1, -1, -1, false, false, false, false, utf8proc_sequences + 2791},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 2793, false, 7758, -1, 7758, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 2796, false, -1, 7761, -1, -1, -1, false, false, false, false, utf8proc_sequences + 2799},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 2801, false, 7760, -1, 7760, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 2804, false, -1, 7763, -1, -1, -1, false, false, false, false, utf8proc_sequences + 2807},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 2809, false, 7762, -1, 7762, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 2812, false, -1, 7765, -1, -1, -1, false, false, false, false, utf8proc_sequences + 2815},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 2817, false, 7764, -1, 7764, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 2820, false, -1, 7767, -1, -1, -1, false, false, false, false, utf8proc_sequences + 2823},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 2825, false, 7766, -1, 7766, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 2828, false, -1, 7769, -1, -1, -1, false, false, false, false, utf8proc_sequences + 2831},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 2833, false, 7768, -1, 7768, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 2836, false, -1, 7771, -1, 9840, -1, false, false, false, false, utf8proc_sequences + 2839},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 2841, false, 7770, -1, 7770, 9900, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 2844, false, -1, 7773, -1, -1, -1, false, false, false, false, utf8proc_sequences + 2847},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 2849, false, 7772, -1, 7772, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 2852, false, -1, 7775, -1, -1, -1, false, false, false, false, utf8proc_sequences + 2855},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 2857, false, 7774, -1, 7774, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 2860, false, -1, 7777, -1, -1, -1, false, false, false, false, utf8proc_sequences + 2863},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 2865, false, 7776, -1, 7776, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 2868, false, -1, 7779, -1, 10200, -1, false, false, false, false, utf8proc_sequences + 2871},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 2873, false, 7778, -1, 7778, 10260, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 2876, false, -1, 7781, -1, -1, -1, false, false, false, false, utf8proc_sequences + 2879},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 2881, false, 7780, -1, 7780, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 2884, false, -1, 7783, -1, -1, -1, false, false, false, false, utf8proc_sequences + 2887},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 2889, false, 7782, -1, 7782, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 2892, false, -1, 7785, -1, -1, -1, false, false, false, false, utf8proc_sequences + 2895},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 2897, false, 7784, -1, 7784, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 2900, false, -1, 7787, -1, -1, -1, false, false, false, false, utf8proc_sequences + 2903},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 2905, false, 7786, -1, 7786, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 2908, false, -1, 7789, -1, -1, -1, false, false, false, false, utf8proc_sequences + 2911},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 2913, false, 7788, -1, 7788, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 2916, false, -1, 7791, -1, -1, -1, false, false, false, false, utf8proc_sequences + 2919},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 2921, false, 7790, -1, 7790, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 2924, false, -1, 7793, -1, -1, -1, false, false, false, false, utf8proc_sequences + 2927},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 2929, false, 7792, -1, 7792, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 2932, false, -1, 7795, -1, -1, -1, false, false, false, false, utf8proc_sequences + 2935},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 2937, false, 7794, -1, 7794, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 2940, false, -1, 7797, -1, -1, -1, false, false, false, false, utf8proc_sequences + 2943},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 2945, false, 7796, -1, 7796, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 2948, false, -1, 7799, -1, -1, -1, false, false, false, false, utf8proc_sequences + 2951},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 2953, false, 7798, -1, 7798, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 2956, false, -1, 7801, -1, -1, -1, false, false, false, false, utf8proc_sequences + 2959},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 2961, false, 7800, -1, 7800, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 2964, false, -1, 7803, -1, -1, -1, false, false, false, false, utf8proc_sequences + 2967},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 2969, false, 7802, -1, 7802, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 2972, false, -1, 7805, -1, -1, -1, false, false, false, false, utf8proc_sequences + 2975},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 2977, false, 7804, -1, 7804, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 2980, false, -1, 7807, -1, -1, -1, false, false, false, false, utf8proc_sequences + 2983},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 2985, false, 7806, -1, 7806, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 2988, false, -1, 7809, -1, -1, -1, false, false, false, false, utf8proc_sequences + 2991},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 2993, false, 7808, -1, 7808, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 2996, false, -1, 7811, -1, -1, -1, false, false, false, false, utf8proc_sequences + 2999},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 3001, false, 7810, -1, 7810, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 3004, false, -1, 7813, -1, -1, -1, false, false, false, false, utf8proc_sequences + 3007},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 3009, false, 7812, -1, 7812, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 3012, false, -1, 7815, -1, -1, -1, false, false, false, false, utf8proc_sequences + 3015},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 3017, false, 7814, -1, 7814, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 3020, false, -1, 7817, -1, -1, -1, false, false, false, false, utf8proc_sequences + 3023},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 3025, false, 7816, -1, 7816, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 3028, false, -1, 7819, -1, -1, -1, false, false, false, false, utf8proc_sequences + 3031},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 3033, false, 7818, -1, 7818, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 3036, false, -1, 7821, -1, -1, -1, false, false, false, false, utf8proc_sequences + 3039},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 3041, false, 7820, -1, 7820, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 3044, false, -1, 7823, -1, -1, -1, false, false, false, false, utf8proc_sequences + 3047},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 3049, false, 7822, -1, 7822, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 3052, false, -1, 7825, -1, -1, -1, false, false, false, false, utf8proc_sequences + 3055},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 3057, false, 7824, -1, 7824, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 3060, false, -1, 7827, -1, -1, -1, false, false, false, false, utf8proc_sequences + 3063},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 3065, false, 7826, -1, 7826, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 3068, false, -1, 7829, -1, -1, -1, false, false, false, false, utf8proc_sequences + 3071},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 3073, false, 7828, -1, 7828, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 3076, false, -1, -1, -1, -1, -1, false, false, false, false, utf8proc_sequences + 3076},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 3079, false, -1, -1, -1, -1, -1, false, false, false, false, utf8proc_sequences + 3079},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 3082, false, -1, -1, -1, -1, -1, false, false, false, false, utf8proc_sequences + 3082},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 3085, false, -1, -1, -1, -1, -1, false, false, false, false, utf8proc_sequences + 3085},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 3088, false, -1, -1, -1, -1, -1, false, false, false, false, utf8proc_sequences + 3088},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 3091, false, 7776, -1, 7776, -1, -1, false, false, false, false, utf8proc_sequences + 2863},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 3094, false, -1, 7841, -1, 10980, -1, false, false, false, false, utf8proc_sequences + 3097},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 3099, false, 7840, -1, 7840, 11040, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 3102, false, -1, 7843, -1, -1, -1, false, false, false, false, utf8proc_sequences + 3105},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 3107, false, 7842, -1, 7842, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 3110, false, -1, 7845, -1, -1, -1, false, false, false, false, utf8proc_sequences + 3113},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 3115, false, 7844, -1, 7844, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 3118, false, -1, 7847, -1, -1, -1, false, false, false, false, utf8proc_sequences + 3121},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 3123, false, 7846, -1, 7846, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 3126, false, -1, 7849, -1, -1, -1, false, false, false, false, utf8proc_sequences + 3129},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 3131, false, 7848, -1, 7848, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 3134, false, -1, 7851, -1, -1, -1, false, false, false, false, utf8proc_sequences + 3137},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 3139, false, 7850, -1, 7850, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 3142, false, -1, 7853, -1, -1, -1, false, false, false, false, utf8proc_sequences + 3145},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 3147, false, 7852, -1, 7852, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 3150, false, -1, 7855, -1, -1, -1, false, false, false, false, utf8proc_sequences + 3153},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 3155, false, 7854, -1, 7854, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 3158, false, -1, 7857, -1, -1, -1, false, false, false, false, utf8proc_sequences + 3161},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 3163, false, 7856, -1, 7856, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 3166, false, -1, 7859, -1, -1, -1, false, false, false, false, utf8proc_sequences + 3169},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 3171, false, 7858, -1, 7858, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 3174, false, -1, 7861, -1, -1, -1, false, false, false, false, utf8proc_sequences + 3177},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 3179, false, 7860, -1, 7860, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 3182, false, -1, 7863, -1, -1, -1, false, false, false, false, utf8proc_sequences + 3185},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 3187, false, 7862, -1, 7862, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 3190, false, -1, 7865, -1, 11340, -1, false, false, false, false, utf8proc_sequences + 3193},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 3195, false, 7864, -1, 7864, 11400, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 3198, false, -1, 7867, -1, -1, -1, false, false, false, false, utf8proc_sequences + 3201},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 3203, false, 7866, -1, 7866, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 3206, false, -1, 7869, -1, -1, -1, false, false, false, false, utf8proc_sequences + 3209},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 3211, false, 7868, -1, 7868, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 3214, false, -1, 7871, -1, -1, -1, false, false, false, false, utf8proc_sequences + 3217},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 3219, false, 7870, -1, 7870, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 3222, false, -1, 7873, -1, -1, -1, false, false, false, false, utf8proc_sequences + 3225},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 3227, false, 7872, -1, 7872, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 3230, false, -1, 7875, -1, -1, -1, false, false, false, false, utf8proc_sequences + 3233},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 3235, false, 7874, -1, 7874, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 3238, false, -1, 7877, -1, -1, -1, false, false, false, false, utf8proc_sequences + 3241},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 3243, false, 7876, -1, 7876, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 3246, false, -1, 7879, -1, -1, -1, false, false, false, false, utf8proc_sequences + 3249},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 3251, false, 7878, -1, 7878, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 3254, false, -1, 7881, -1, -1, -1, false, false, false, false, utf8proc_sequences + 3257},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 3259, false, 7880, -1, 7880, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 3262, false, -1, 7883, -1, -1, -1, false, false, false, false, utf8proc_sequences + 3265},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 3267, false, 7882, -1, 7882, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 3270, false, -1, 7885, -1, 11580, -1, false, false, false, false, utf8proc_sequences + 3273},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 3275, false, 7884, -1, 7884, 11640, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 3278, false, -1, 7887, -1, -1, -1, false, false, false, false, utf8proc_sequences + 3281},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 3283, false, 7886, -1, 7886, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 3286, false, -1, 7889, -1, -1, -1, false, false, false, false, utf8proc_sequences + 3289},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 3291, false, 7888, -1, 7888, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 3294, false, -1, 7891, -1, -1, -1, false, false, false, false, utf8proc_sequences + 3297},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 3299, false, 7890, -1, 7890, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 3302, false, -1, 7893, -1, -1, -1, false, false, false, false, utf8proc_sequences + 3305},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 3307, false, 7892, -1, 7892, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 3310, false, -1, 7895, -1, -1, -1, false, false, false, false, utf8proc_sequences + 3313},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 3315, false, 7894, -1, 7894, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 3318, false, -1, 7897, -1, -1, -1, false, false, false, false, utf8proc_sequences + 3321},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 3323, false, 7896, -1, 7896, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 3326, false, -1, 7899, -1, -1, -1, false, false, false, false, utf8proc_sequences + 3329},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 3331, false, 7898, -1, 7898, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 3334, false, -1, 7901, -1, -1, -1, false, false, false, false, utf8proc_sequences + 3337},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 3339, false, 7900, -1, 7900, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 3342, false, -1, 7903, -1, -1, -1, false, false, false, false, utf8proc_sequences + 3345},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 3347, false, 7902, -1, 7902, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 3350, false, -1, 7905, -1, -1, -1, false, false, false, false, utf8proc_sequences + 3353},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 3355, false, 7904, -1, 7904, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 3358, false, -1, 7907, -1, -1, -1, false, false, false, false, utf8proc_sequences + 3361},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 3363, false, 7906, -1, 7906, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 3366, false, -1, 7909, -1, -1, -1, false, false, false, false, utf8proc_sequences + 3369},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 3371, false, 7908, -1, 7908, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 3374, false, -1, 7911, -1, -1, -1, false, false, false, false, utf8proc_sequences + 3377},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 3379, false, 7910, -1, 7910, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 3382, false, -1, 7913, -1, -1, -1, false, false, false, false, utf8proc_sequences + 3385},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 3387, false, 7912, -1, 7912, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 3390, false, -1, 7915, -1, -1, -1, false, false, false, false, utf8proc_sequences + 3393},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 3395, false, 7914, -1, 7914, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 3398, false, -1, 7917, -1, -1, -1, false, false, false, false, utf8proc_sequences + 3401},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 3403, false, 7916, -1, 7916, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 3406, false, -1, 7919, -1, -1, -1, false, false, false, false, utf8proc_sequences + 3409},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 3411, false, 7918, -1, 7918, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 3414, false, -1, 7921, -1, -1, -1, false, false, false, false, utf8proc_sequences + 3417},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 3419, false, 7920, -1, 7920, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 3422, false, -1, 7923, -1, -1, -1, false, false, false, false, utf8proc_sequences + 3425},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 3427, false, 7922, -1, 7922, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 3430, false, -1, 7925, -1, -1, -1, false, false, false, false, utf8proc_sequences + 3433},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 3435, false, 7924, -1, 7924, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 3438, false, -1, 7927, -1, -1, -1, false, false, false, false, utf8proc_sequences + 3441},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 3443, false, 7926, -1, 7926, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 3446, false, -1, 7929, -1, -1, -1, false, false, false, false, utf8proc_sequences + 3449},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 3451, false, 7928, -1, 7928, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 3454, false, 7944, -1, 7944, 11940, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 3457, false, 7945, -1, 7945, 12000, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 3460, false, 7946, -1, 7946, 13560, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 3463, false, 7947, -1, 7947, 13620, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 3466, false, 7948, -1, 7948, 13680, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 3469, false, 7949, -1, 7949, 13740, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 3472, false, 7950, -1, 7950, 13800, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 3475, false, 7951, -1, 7951, 13860, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 3478, false, -1, 7936, -1, 12060, -1, false, false, false, false, utf8proc_sequences + 3481},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 3483, false, -1, 7937, -1, 12120, -1, false, false, false, false, utf8proc_sequences + 3486},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 3488, false, -1, 7938, -1, 13920, -1, false, false, false, false, utf8proc_sequences + 3491},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 3493, false, -1, 7939, -1, 13980, -1, false, false, false, false, utf8proc_sequences + 3496},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 3498, false, -1, 7940, -1, 14040, -1, false, false, false, false, utf8proc_sequences + 3501},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 3503, false, -1, 7941, -1, 14100, -1, false, false, false, false, utf8proc_sequences + 3506},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 3508, false, -1, 7942, -1, 14160, -1, false, false, false, false, utf8proc_sequences + 3511},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 3513, false, -1, 7943, -1, 14220, -1, false, false, false, false, utf8proc_sequences + 3516},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 3518, false, 7960, -1, 7960, 12180, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 3521, false, 7961, -1, 7961, 12240, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 3524, false, 7962, -1, 7962, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 3527, false, 7963, -1, 7963, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 3530, false, 7964, -1, 7964, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 3533, false, 7965, -1, 7965, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 3536, false, -1, 7952, -1, 12300, -1, false, false, false, false, utf8proc_sequences + 3539},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 3541, false, -1, 7953, -1, 12360, -1, false, false, false, false, utf8proc_sequences + 3544},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 3546, false, -1, 7954, -1, -1, -1, false, false, false, false, utf8proc_sequences + 3549},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 3551, false, -1, 7955, -1, -1, -1, false, false, false, false, utf8proc_sequences + 3554},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 3556, false, -1, 7956, -1, -1, -1, false, false, false, false, utf8proc_sequences + 3559},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 3561, false, -1, 7957, -1, -1, -1, false, false, false, false, utf8proc_sequences + 3564},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 3566, false, 7976, -1, 7976, 12420, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 3569, false, 7977, -1, 7977, 12480, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 3572, false, 7978, -1, 7978, 14280, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 3575, false, 7979, -1, 7979, 14340, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 3578, false, 7980, -1, 7980, 14400, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 3581, false, 7981, -1, 7981, 14460, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 3584, false, 7982, -1, 7982, 14520, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 3587, false, 7983, -1, 7983, 14580, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 3590, false, -1, 7968, -1, 12540, -1, false, false, false, false, utf8proc_sequences + 3593},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 3595, false, -1, 7969, -1, 12600, -1, false, false, false, false, utf8proc_sequences + 3598},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 3600, false, -1, 7970, -1, 14640, -1, false, false, false, false, utf8proc_sequences + 3603},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 3605, false, -1, 7971, -1, 14700, -1, false, false, false, false, utf8proc_sequences + 3608},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 3610, false, -1, 7972, -1, 14760, -1, false, false, false, false, utf8proc_sequences + 3613},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 3615, false, -1, 7973, -1, 14820, -1, false, false, false, false, utf8proc_sequences + 3618},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 3620, false, -1, 7974, -1, 14880, -1, false, false, false, false, utf8proc_sequences + 3623},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 3625, false, -1, 7975, -1, 14940, -1, false, false, false, false, utf8proc_sequences + 3628},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 3630, false, 7992, -1, 7992, 12660, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 3633, false, 7993, -1, 7993, 12720, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 3636, false, 7994, -1, 7994, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 3639, false, 7995, -1, 7995, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 3642, false, 7996, -1, 7996, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 3645, false, 7997, -1, 7997, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 3648, false, 7998, -1, 7998, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 3651, false, 7999, -1, 7999, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 3654, false, -1, 7984, -1, 12780, -1, false, false, false, false, utf8proc_sequences + 3657},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 3659, false, -1, 7985, -1, 12840, -1, false, false, false, false, utf8proc_sequences + 3662},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 3664, false, -1, 7986, -1, -1, -1, false, false, false, false, utf8proc_sequences + 3667},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 3669, false, -1, 7987, -1, -1, -1, false, false, false, false, utf8proc_sequences + 3672},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 3674, false, -1, 7988, -1, -1, -1, false, false, false, false, utf8proc_sequences + 3677},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 3679, false, -1, 7989, -1, -1, -1, false, false, false, false, utf8proc_sequences + 3682},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 3684, false, -1, 7990, -1, -1, -1, false, false, false, false, utf8proc_sequences + 3687},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 3689, false, -1, 7991, -1, -1, -1, false, false, false, false, utf8proc_sequences + 3692},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 3694, false, 8008, -1, 8008, 12900, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 3697, false, 8009, -1, 8009, 12960, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 3700, false, 8010, -1, 8010, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 3703, false, 8011, -1, 8011, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 3706, false, 8012, -1, 8012, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 3709, false, 8013, -1, 8013, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 3712, false, -1, 8000, -1, 13020, -1, false, false, false, false, utf8proc_sequences + 3715},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 3717, false, -1, 8001, -1, 13080, -1, false, false, false, false, utf8proc_sequences + 3720},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 3722, false, -1, 8002, -1, -1, -1, false, false, false, false, utf8proc_sequences + 3725},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 3727, false, -1, 8003, -1, -1, -1, false, false, false, false, utf8proc_sequences + 3730},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 3732, false, -1, 8004, -1, -1, -1, false, false, false, false, utf8proc_sequences + 3735},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 3737, false, -1, 8005, -1, -1, -1, false, false, false, false, utf8proc_sequences + 3740},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 3742, false, -1, -1, -1, 13140, -1, false, false, false, false, utf8proc_sequences + 3742},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 3745, false, 8025, -1, 8025, 13200, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 3748, false, -1, -1, -1, -1, -1, false, false, false, false, utf8proc_sequences + 3751},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 3755, false, 8027, -1, 8027, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 3758, false, -1, -1, -1, -1, -1, false, false, false, false, utf8proc_sequences + 3761},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 3765, false, 8029, -1, 8029, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 3768, false, -1, -1, -1, -1, -1, false, false, false, false, utf8proc_sequences + 3771},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 3775, false, 8031, -1, 8031, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 3778, false, -1, 8017, -1, 13260, -1, false, false, false, false, utf8proc_sequences + 3781},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 3783, false, -1, 8019, -1, -1, -1, false, false, false, false, utf8proc_sequences + 3786},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 3788, false, -1, 8021, -1, -1, -1, false, false, false, false, utf8proc_sequences + 3791},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 3793, false, -1, 8023, -1, -1, -1, false, false, false, false, utf8proc_sequences + 3796},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 3798, false, 8040, -1, 8040, 13320, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 3801, false, 8041, -1, 8041, 13380, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 3804, false, 8042, -1, 8042, 15000, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 3807, false, 8043, -1, 8043, 15060, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 3810, false, 8044, -1, 8044, 15120, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 3813, false, 8045, -1, 8045, 15180, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 3816, false, 8046, -1, 8046, 15240, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 3819, false, 8047, -1, 8047, 15300, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 3822, false, -1, 8032, -1, 13440, -1, false, false, false, false, utf8proc_sequences + 3825},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 3827, false, -1, 8033, -1, 13500, -1, false, false, false, false, utf8proc_sequences + 3830},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 3832, false, -1, 8034, -1, 15360, -1, false, false, false, false, utf8proc_sequences + 3835},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 3837, false, -1, 8035, -1, 15420, -1, false, false, false, false, utf8proc_sequences + 3840},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 3842, false, -1, 8036, -1, 15480, -1, false, false, false, false, utf8proc_sequences + 3845},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 3847, false, -1, 8037, -1, 15540, -1, false, false, false, false, utf8proc_sequences + 3850},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 3852, false, -1, 8038, -1, 15600, -1, false, false, false, false, utf8proc_sequences + 3855},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 3857, false, -1, 8039, -1, 15660, -1, false, false, false, false, utf8proc_sequences + 3860},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 3862, false, 8122, -1, 8122, 15720, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 1341, false, 8123, -1, 8123, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 3865, false, 8136, -1, 8136, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 1348, false, 8137, -1, 8137, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 3868, false, 8138, -1, 8138, 15900, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 1353, false, 8139, -1, 8139, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 3871, false, 8154, -1, 8154, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 1358, false, 8155, -1, 8155, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 3874, false, 8184, -1, 8184, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 1363, false, 8185, -1, 8185, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 3877, false, 8170, -1, 8170, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 1368, false, 8171, -1, 8171, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 3880, false, 8186, -1, 8186, 16320, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 1373, false, 8187, -1, 8187, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 3883, false, 8072, -1, 8072, -1, -1, false, false, false, false, utf8proc_sequences + 3886},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 3889, false, 8073, -1, 8073, -1, -1, false, false, false, false, utf8proc_sequences + 3892},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 3895, false, 8074, -1, 8074, -1, -1, false, false, false, false, utf8proc_sequences + 3898},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 3901, false, 8075, -1, 8075, -1, -1, false, false, false, false, utf8proc_sequences + 3904},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 3907, false, 8076, -1, 8076, -1, -1, false, false, false, false, utf8proc_sequences + 3910},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 3913, false, 8077, -1, 8077, -1, -1, false, false, false, false, utf8proc_sequences + 3916},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 3919, false, 8078, -1, 8078, -1, -1, false, false, false, false, utf8proc_sequences + 3922},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 3925, false, 8079, -1, 8079, -1, -1, false, false, false, false, utf8proc_sequences + 3928},
+  {UTF8PROC_CATEGORY_LT, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 3931, false, -1, 8064, -1, -1, -1, false, false, false, false, utf8proc_sequences + 3934},
+  {UTF8PROC_CATEGORY_LT, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 3936, false, -1, 8065, -1, -1, -1, false, false, false, false, utf8proc_sequences + 3939},
+  {UTF8PROC_CATEGORY_LT, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 3941, false, -1, 8066, -1, -1, -1, false, false, false, false, utf8proc_sequences + 3944},
+  {UTF8PROC_CATEGORY_LT, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 3946, false, -1, 8067, -1, -1, -1, false, false, false, false, utf8proc_sequences + 3949},
+  {UTF8PROC_CATEGORY_LT, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 3951, false, -1, 8068, -1, -1, -1, false, false, false, false, utf8proc_sequences + 3954},
+  {UTF8PROC_CATEGORY_LT, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 3956, false, -1, 8069, -1, -1, -1, false, false, false, false, utf8proc_sequences + 3959},
+  {UTF8PROC_CATEGORY_LT, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 3961, false, -1, 8070, -1, -1, -1, false, false, false, false, utf8proc_sequences + 3964},
+  {UTF8PROC_CATEGORY_LT, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 3966, false, -1, 8071, -1, -1, -1, false, false, false, false, utf8proc_sequences + 3969},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 3971, false, 8088, -1, 8088, -1, -1, false, false, false, false, utf8proc_sequences + 3974},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 3977, false, 8089, -1, 8089, -1, -1, false, false, false, false, utf8proc_sequences + 3980},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 3983, false, 8090, -1, 8090, -1, -1, false, false, false, false, utf8proc_sequences + 3986},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 3989, false, 8091, -1, 8091, -1, -1, false, false, false, false, utf8proc_sequences + 3992},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 3995, false, 8092, -1, 8092, -1, -1, false, false, false, false, utf8proc_sequences + 3998},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 4001, false, 8093, -1, 8093, -1, -1, false, false, false, false, utf8proc_sequences + 4004},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 4007, false, 8094, -1, 8094, -1, -1, false, false, false, false, utf8proc_sequences + 4010},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 4013, false, 8095, -1, 8095, -1, -1, false, false, false, false, utf8proc_sequences + 4016},
+  {UTF8PROC_CATEGORY_LT, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 4019, false, -1, 8080, -1, -1, -1, false, false, false, false, utf8proc_sequences + 4022},
+  {UTF8PROC_CATEGORY_LT, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 4024, false, -1, 8081, -1, -1, -1, false, false, false, false, utf8proc_sequences + 4027},
+  {UTF8PROC_CATEGORY_LT, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 4029, false, -1, 8082, -1, -1, -1, false, false, false, false, utf8proc_sequences + 4032},
+  {UTF8PROC_CATEGORY_LT, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 4034, false, -1, 8083, -1, -1, -1, false, false, false, false, utf8proc_sequences + 4037},
+  {UTF8PROC_CATEGORY_LT, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 4039, false, -1, 8084, -1, -1, -1, false, false, false, false, utf8proc_sequences + 4042},
+  {UTF8PROC_CATEGORY_LT, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 4044, false, -1, 8085, -1, -1, -1, false, false, false, false, utf8proc_sequences + 4047},
+  {UTF8PROC_CATEGORY_LT, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 4049, false, -1, 8086, -1, -1, -1, false, false, false, false, utf8proc_sequences + 4052},
+  {UTF8PROC_CATEGORY_LT, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 4054, false, -1, 8087, -1, -1, -1, false, false, false, false, utf8proc_sequences + 4057},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 4059, false, 8104, -1, 8104, -1, -1, false, false, false, false, utf8proc_sequences + 4062},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 4065, false, 8105, -1, 8105, -1, -1, false, false, false, false, utf8proc_sequences + 4068},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 4071, false, 8106, -1, 8106, -1, -1, false, false, false, false, utf8proc_sequences + 4074},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 4077, false, 8107, -1, 8107, -1, -1, false, false, false, false, utf8proc_sequences + 4080},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 4083, false, 8108, -1, 8108, -1, -1, false, false, false, false, utf8proc_sequences + 4086},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 4089, false, 8109, -1, 8109, -1, -1, false, false, false, false, utf8proc_sequences + 4092},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 4095, false, 8110, -1, 8110, -1, -1, false, false, false, false, utf8proc_sequences + 4098},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 4101, false, 8111, -1, 8111, -1, -1, false, false, false, false, utf8proc_sequences + 4104},
+  {UTF8PROC_CATEGORY_LT, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 4107, false, -1, 8096, -1, -1, -1, false, false, false, false, utf8proc_sequences + 4110},
+  {UTF8PROC_CATEGORY_LT, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 4112, false, -1, 8097, -1, -1, -1, false, false, false, false, utf8proc_sequences + 4115},
+  {UTF8PROC_CATEGORY_LT, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 4117, false, -1, 8098, -1, -1, -1, false, false, false, false, utf8proc_sequences + 4120},
+  {UTF8PROC_CATEGORY_LT, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 4122, false, -1, 8099, -1, -1, -1, false, false, false, false, utf8proc_sequences + 4125},
+  {UTF8PROC_CATEGORY_LT, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 4127, false, -1, 8100, -1, -1, -1, false, false, false, false, utf8proc_sequences + 4130},
+  {UTF8PROC_CATEGORY_LT, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 4132, false, -1, 8101, -1, -1, -1, false, false, false, false, utf8proc_sequences + 4135},
+  {UTF8PROC_CATEGORY_LT, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 4137, false, -1, 8102, -1, -1, -1, false, false, false, false, utf8proc_sequences + 4140},
+  {UTF8PROC_CATEGORY_LT, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 4142, false, -1, 8103, -1, -1, -1, false, false, false, false, utf8proc_sequences + 4145},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 4147, false, 8120, -1, 8120, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 4150, false, 8121, -1, 8121, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 4153, false, -1, -1, -1, -1, -1, false, false, false, false, utf8proc_sequences + 4156},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 4159, false, 8124, -1, 8124, -1, -1, false, false, false, false, utf8proc_sequences + 4162},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 4165, false, -1, -1, -1, -1, -1, false, false, false, false, utf8proc_sequences + 4168},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 4171, false, -1, -1, -1, 15840, -1, false, false, false, false, utf8proc_sequences + 4171},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 4174, false, -1, -1, -1, -1, -1, false, false, false, false, utf8proc_sequences + 4177},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 4181, false, -1, 8112, -1, -1, -1, false, false, false, false, utf8proc_sequences + 4184},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 4186, false, -1, 8113, -1, -1, -1, false, false, false, false, utf8proc_sequences + 4189},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 4191, false, -1, 8048, -1, -1, -1, false, false, false, false, utf8proc_sequences + 4194},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 4196, false, -1, 8049, -1, -1, -1, false, false, false, false, utf8proc_sequences + 4198},
+  {UTF8PROC_CATEGORY_LT, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 4200, false, -1, 8115, -1, -1, -1, false, false, false, false, utf8proc_sequences + 4203},
+  {UTF8PROC_CATEGORY_SK, 0, UTF8PROC_BIDI_CLASS_ON, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 4205, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 1326, false, 921, -1, 921, -1, -1, false, false, false, false, utf8proc_sequences + 1326},
+  {UTF8PROC_CATEGORY_SK, 0, UTF8PROC_BIDI_CLASS_ON, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 4205, false, -1, -1, -1, 16080, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SK, 0, UTF8PROC_BIDI_CLASS_ON, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 4208, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SK, 0, UTF8PROC_BIDI_CLASS_ON, 0, utf8proc_sequences + 4211, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 4214, false, -1, -1, -1, -1, -1, false, false, false, false, utf8proc_sequences + 4217},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 4220, false, 8140, -1, 8140, -1, -1, false, false, false, false, utf8proc_sequences + 4223},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 4226, false, -1, -1, -1, -1, -1, false, false, false, false, utf8proc_sequences + 4229},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 4232, false, -1, -1, -1, 16020, -1, false, false, false, false, utf8proc_sequences + 4232},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 4235, false, -1, -1, -1, -1, -1, false, false, false, false, utf8proc_sequences + 4238},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 4242, false, -1, 8050, -1, -1, -1, false, false, false, false, utf8proc_sequences + 4245},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 4247, false, -1, 8051, -1, -1, -1, false, false, false, false, utf8proc_sequences + 4249},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 4251, false, -1, 8052, -1, -1, -1, false, false, false, false, utf8proc_sequences + 4254},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 4256, false, -1, 8053, -1, -1, -1, false, false, false, false, utf8proc_sequences + 4258},
+  {UTF8PROC_CATEGORY_LT, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 4260, false, -1, 8131, -1, -1, -1, false, false, false, false, utf8proc_sequences + 4263},
+  {UTF8PROC_CATEGORY_SK, 0, UTF8PROC_BIDI_CLASS_ON, 0, utf8proc_sequences + 4265, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SK, 0, UTF8PROC_BIDI_CLASS_ON, 0, utf8proc_sequences + 4268, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SK, 0, UTF8PROC_BIDI_CLASS_ON, 0, utf8proc_sequences + 4271, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 4274, false, 8152, -1, 8152, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 4277, false, 8153, -1, 8153, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 4280, false, -1, -1, -1, -1, -1, false, false, false, false, utf8proc_sequences + 4283},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 4287, false, -1, -1, -1, -1, -1, false, false, false, false, utf8proc_sequences + 1378},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 4289, false, -1, -1, -1, -1, -1, false, false, false, false, utf8proc_sequences + 4289},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 4292, false, -1, -1, -1, -1, -1, false, false, false, false, utf8proc_sequences + 4295},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 4299, false, -1, 8144, -1, -1, -1, false, false, false, false, utf8proc_sequences + 4302},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 4304, false, -1, 8145, -1, -1, -1, false, false, false, false, utf8proc_sequences + 4307},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 4309, false, -1, 8054, -1, -1, -1, false, false, false, false, utf8proc_sequences + 4312},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 4314, false, -1, 8055, -1, -1, -1, false, false, false, false, utf8proc_sequences + 4316},
+  {UTF8PROC_CATEGORY_SK, 0, UTF8PROC_BIDI_CLASS_ON, 0, utf8proc_sequences + 4318, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SK, 0, UTF8PROC_BIDI_CLASS_ON, 0, utf8proc_sequences + 4321, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SK, 0, UTF8PROC_BIDI_CLASS_ON, 0, utf8proc_sequences + 4324, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 4327, false, 8168, -1, 8168, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 4330, false, 8169, -1, 8169, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 4333, false, -1, -1, -1, -1, -1, false, false, false, false, utf8proc_sequences + 4336},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 4340, false, -1, -1, -1, -1, -1, false, false, false, false, utf8proc_sequences + 1451},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 4342, false, -1, -1, -1, -1, -1, false, false, false, false, utf8proc_sequences + 4342},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 4345, false, 8172, -1, 8172, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 4348, false, -1, -1, -1, -1, -1, false, false, false, false, utf8proc_sequences + 4348},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 4351, false, -1, -1, -1, -1, -1, false, false, false, false, utf8proc_sequences + 4354},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 4358, false, -1, 8160, -1, -1, -1, false, false, false, false, utf8proc_sequences + 4361},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 4363, false, -1, 8161, -1, -1, -1, false, false, false, false, utf8proc_sequences + 4366},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 4368, false, -1, 8058, -1, -1, -1, false, false, false, false, utf8proc_sequences + 4371},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 4373, false, -1, 8059, -1, -1, -1, false, false, false, false, utf8proc_sequences + 4375},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 4377, false, -1, 8165, -1, -1, -1, false, false, false, false, utf8proc_sequences + 4380},
+  {UTF8PROC_CATEGORY_SK, 0, UTF8PROC_BIDI_CLASS_ON, 0, utf8proc_sequences + 4382, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SK, 0, UTF8PROC_BIDI_CLASS_ON, 0, utf8proc_sequences + 4385, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SK, 0, UTF8PROC_BIDI_CLASS_ON, 0, utf8proc_sequences + 4387, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 4389, false, -1, -1, -1, -1, -1, false, false, false, false, utf8proc_sequences + 4392},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 4395, false, 8188, -1, 8188, -1, -1, false, false, false, false, utf8proc_sequences + 4398},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 4401, false, -1, -1, -1, -1, -1, false, false, false, false, utf8proc_sequences + 4404},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 4407, false, -1, -1, -1, 16440, -1, false, false, false, false, utf8proc_sequences + 4407},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 4410, false, -1, -1, -1, -1, -1, false, false, false, false, utf8proc_sequences + 4413},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 4417, false, -1, 8056, -1, -1, -1, false, false, false, false, utf8proc_sequences + 4420},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 4422, false, -1, 8057, -1, -1, -1, false, false, false, false, utf8proc_sequences + 4424},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 4426, false, -1, 8060, -1, -1, -1, false, false, false, false, utf8proc_sequences + 4429},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 4431, false, -1, 8061, -1, -1, -1, false, false, false, false, utf8proc_sequences + 4433},
+  {UTF8PROC_CATEGORY_LT, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 4435, false, -1, 8179, -1, -1, -1, false, false, false, false, utf8proc_sequences + 4438},
+  {UTF8PROC_CATEGORY_SK, 0, UTF8PROC_BIDI_CLASS_ON, 0, utf8proc_sequences + 4440, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SK, 0, UTF8PROC_BIDI_CLASS_ON, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 4442, false, -1, -1, -1, 16140, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_ZS, 0, UTF8PROC_BIDI_CLASS_WS, 0, utf8proc_sequences + 4445, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_ZS, 0, UTF8PROC_BIDI_CLASS_WS, 0, utf8proc_sequences + 4447, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_ZS, 0, UTF8PROC_BIDI_CLASS_WS, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 52, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_ZS, 0, UTF8PROC_BIDI_CLASS_WS, UTF8PROC_DECOMP_TYPE_NOBREAK, utf8proc_sequences + 52, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_CF, 0, UTF8PROC_BIDI_CLASS_BN, 0, NULL, false, -1, -1, -1, -1, -1, false, true, true, true, NULL},
+  {UTF8PROC_CATEGORY_CF, 0, UTF8PROC_BIDI_CLASS_R, 0, NULL, false, -1, -1, -1, -1, -1, false, true, true, false, NULL},
+  {UTF8PROC_CATEGORY_PD, 0, UTF8PROC_BIDI_CLASS_ON, UTF8PROC_DECOMP_TYPE_NOBREAK, utf8proc_sequences + 4449, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_PO, 0, UTF8PROC_BIDI_CLASS_ON, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 4451, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_PO, 0, UTF8PROC_BIDI_CLASS_ON, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 4454, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_PO, 0, UTF8PROC_BIDI_CLASS_ON, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 4456, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_PO, 0, UTF8PROC_BIDI_CLASS_ON, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 4459, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_ZL, 0, UTF8PROC_BIDI_CLASS_WS, 0, NULL, false, -1, -1, -1, -1, -1, false, false, true, false, NULL},
+  {UTF8PROC_CATEGORY_ZP, 0, UTF8PROC_BIDI_CLASS_B, 0, NULL, false, -1, -1, -1, -1, -1, false, false, true, false, NULL},
+  {UTF8PROC_CATEGORY_CF, 0, UTF8PROC_BIDI_CLASS_LRE, 0, NULL, false, -1, -1, -1, -1, -1, false, true, true, false, NULL},
+  {UTF8PROC_CATEGORY_CF, 0, UTF8PROC_BIDI_CLASS_RLE, 0, NULL, false, -1, -1, -1, -1, -1, false, true, true, false, NULL},
+  {UTF8PROC_CATEGORY_CF, 0, UTF8PROC_BIDI_CLASS_PDF, 0, NULL, false, -1, -1, -1, -1, -1, false, true, true, false, NULL},
+  {UTF8PROC_CATEGORY_CF, 0, UTF8PROC_BIDI_CLASS_LRO, 0, NULL, false, -1, -1, -1, -1, -1, false, true, true, false, NULL},
+  {UTF8PROC_CATEGORY_CF, 0, UTF8PROC_BIDI_CLASS_RLO, 0, NULL, false, -1, -1, -1, -1, -1, false, true, true, false, NULL},
+  {UTF8PROC_CATEGORY_PO, 0, UTF8PROC_BIDI_CLASS_ET, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 4463, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_PO, 0, UTF8PROC_BIDI_CLASS_ET, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 4466, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_PO, 0, UTF8PROC_BIDI_CLASS_ON, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 4470, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_PO, 0, UTF8PROC_BIDI_CLASS_ON, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 4473, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_PO, 0, UTF8PROC_BIDI_CLASS_ON, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 4477, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_PO, 0, UTF8PROC_BIDI_CLASS_ON, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 4480, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SM, 0, UTF8PROC_BIDI_CLASS_CS, 0, NULL, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_PO, 0, UTF8PROC_BIDI_CLASS_ON, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 4483, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_PO, 0, UTF8PROC_BIDI_CLASS_ON, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 4486, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_PO, 0, UTF8PROC_BIDI_CLASS_ON, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 4489, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_PO, 0, UTF8PROC_BIDI_CLASS_ON, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 4492, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_NO, 0, UTF8PROC_BIDI_CLASS_EN, UTF8PROC_DECOMP_TYPE_SUPER, utf8proc_sequences + 4497, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_SUPER, utf8proc_sequences + 16, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_NO, 0, UTF8PROC_BIDI_CLASS_EN, UTF8PROC_DECOMP_TYPE_SUPER, utf8proc_sequences + 4499, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_NO, 0, UTF8PROC_BIDI_CLASS_EN, UTF8PROC_DECOMP_TYPE_SUPER, utf8proc_sequences + 4501, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_NO, 0, UTF8PROC_BIDI_CLASS_EN, UTF8PROC_DECOMP_TYPE_SUPER, utf8proc_sequences + 4503, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_NO, 0, UTF8PROC_BIDI_CLASS_EN, UTF8PROC_DECOMP_TYPE_SUPER, utf8proc_sequences + 4505, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_NO, 0, UTF8PROC_BIDI_CLASS_EN, UTF8PROC_DECOMP_TYPE_SUPER, utf8proc_sequences + 4507, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_NO, 0, UTF8PROC_BIDI_CLASS_EN, UTF8PROC_DECOMP_TYPE_SUPER, utf8proc_sequences + 4509, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SM, 0, UTF8PROC_BIDI_CLASS_ES, UTF8PROC_DECOMP_TYPE_SUPER, utf8proc_sequences + 4511, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SM, 0, UTF8PROC_BIDI_CLASS_ES, UTF8PROC_DECOMP_TYPE_SUPER, utf8proc_sequences + 4513, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SM, 0, UTF8PROC_BIDI_CLASS_ON, UTF8PROC_DECOMP_TYPE_SUPER, utf8proc_sequences + 4515, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_PS, 0, UTF8PROC_BIDI_CLASS_ON, UTF8PROC_DECOMP_TYPE_SUPER, utf8proc_sequences + 4517, true, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_PE, 0, UTF8PROC_BIDI_CLASS_ON, UTF8PROC_DECOMP_TYPE_SUPER, utf8proc_sequences + 4519, true, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_SUPER, utf8proc_sequences + 26, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_NO, 0, UTF8PROC_BIDI_CLASS_EN, UTF8PROC_DECOMP_TYPE_SUB, utf8proc_sequences + 4497, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_NO, 0, UTF8PROC_BIDI_CLASS_EN, UTF8PROC_DECOMP_TYPE_SUB, utf8proc_sequences + 72, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_NO, 0, UTF8PROC_BIDI_CLASS_EN, UTF8PROC_DECOMP_TYPE_SUB, utf8proc_sequences + 60, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_NO, 0, UTF8PROC_BIDI_CLASS_EN, UTF8PROC_DECOMP_TYPE_SUB, utf8proc_sequences + 62, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_NO, 0, UTF8PROC_BIDI_CLASS_EN, UTF8PROC_DECOMP_TYPE_SUB, utf8proc_sequences + 4499, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_NO, 0, UTF8PROC_BIDI_CLASS_EN, UTF8PROC_DECOMP_TYPE_SUB, utf8proc_sequences + 4501, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_NO, 0, UTF8PROC_BIDI_CLASS_EN, UTF8PROC_DECOMP_TYPE_SUB, utf8proc_sequences + 4503, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_NO, 0, UTF8PROC_BIDI_CLASS_EN, UTF8PROC_DECOMP_TYPE_SUB, utf8proc_sequences + 4505, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_NO, 0, UTF8PROC_BIDI_CLASS_EN, UTF8PROC_DECOMP_TYPE_SUB, utf8proc_sequences + 4507, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_NO, 0, UTF8PROC_BIDI_CLASS_EN, UTF8PROC_DECOMP_TYPE_SUB, utf8proc_sequences + 4509, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SM, 0, UTF8PROC_BIDI_CLASS_ES, UTF8PROC_DECOMP_TYPE_SUB, utf8proc_sequences + 4511, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SM, 0, UTF8PROC_BIDI_CLASS_ES, UTF8PROC_DECOMP_TYPE_SUB, utf8proc_sequences + 4513, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SM, 0, UTF8PROC_BIDI_CLASS_ON, UTF8PROC_DECOMP_TYPE_SUB, utf8proc_sequences + 4515, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_PS, 0, UTF8PROC_BIDI_CLASS_ON, UTF8PROC_DECOMP_TYPE_SUB, utf8proc_sequences + 4517, true, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_PE, 0, UTF8PROC_BIDI_CLASS_ON, UTF8PROC_DECOMP_TYPE_SUB, utf8proc_sequences + 4519, true, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LM, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_SUB, utf8proc_sequences + 0, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LM, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_SUB, utf8proc_sequences + 8, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LM, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_SUB, utf8proc_sequences + 28, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LM, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_SUB, utf8proc_sequences + 46, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LM, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_SUB, utf8proc_sequences + 792, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SC, 0, UTF8PROC_BIDI_CLASS_ET, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 4521, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_ON, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 4524, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_ON, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 4528, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_FONT, utf8proc_sequences + 4532, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_ON, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 4534, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_ON, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 4537, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_ON, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 4541, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 4545, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_ON, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 4547, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_FONT, utf8proc_sequences + 12, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_FONT, utf8proc_sequences + 2390, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_FONT, utf8proc_sequences + 14, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_FONT, utf8proc_sequences + 454, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_FONT, utf8proc_sequences + 2392, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_FONT, utf8proc_sequences + 2398, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_FONT, utf8proc_sequences + 22, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_FONT, utf8proc_sequences + 2402, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_ON, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 4550, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_FONT, utf8proc_sequences + 2408, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_FONT, utf8proc_sequences + 4553, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_FONT, utf8proc_sequences + 2410, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_ON, UTF8PROC_DECOMP_TYPE_SUPER, utf8proc_sequences + 4555, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_ON, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 4558, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_ON, UTF8PROC_DECOMP_TYPE_SUPER, utf8proc_sequences + 4562, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_FONT, utf8proc_sequences + 4565, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 4567, false, -1, 969, -1, -1, -1, false, false, false, false, utf8proc_sequences + 1424},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 2396, false, -1, 107, -1, -1, -1, false, false, false, false, utf8proc_sequences + 20},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 4569, false, -1, 229, -1, -1, -1, false, false, false, false, utf8proc_sequences + 114},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_FONT, utf8proc_sequences + 2380, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_FONT, utf8proc_sequences + 8, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_FONT, utf8proc_sequences + 2384, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_FONT, utf8proc_sequences + 4571, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, 8526, -1, -1, -1, false, false, false, false, utf8proc_sequences + 4573},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_FONT, utf8proc_sequences + 2400, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_FONT, utf8proc_sequences + 28, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 4575, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 4577, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 4579, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 4581, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_FONT, utf8proc_sequences + 16, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_ON, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 4583, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_FONT, utf8proc_sequences + 1408, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_FONT, utf8proc_sequences + 1386, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_FONT, utf8proc_sequences + 4587, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_FONT, utf8proc_sequences + 4589, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SM, 0, UTF8PROC_BIDI_CLASS_ON, UTF8PROC_DECOMP_TYPE_FONT, utf8proc_sequences + 4591, true, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_FONT, utf8proc_sequences + 2382, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_FONT, utf8proc_sequences + 6, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_FONT, utf8proc_sequences + 18, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, 8498, -1, 8498, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_NO, 0, UTF8PROC_BIDI_CLASS_ON, UTF8PROC_DECOMP_TYPE_FRACTION, utf8proc_sequences + 4593, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_NO, 0, UTF8PROC_BIDI_CLASS_ON, UTF8PROC_DECOMP_TYPE_FRACTION, utf8proc_sequences + 4597, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_NO, 0, UTF8PROC_BIDI_CLASS_ON, UTF8PROC_DECOMP_TYPE_FRACTION, utf8proc_sequences + 4601, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_NO, 0, UTF8PROC_BIDI_CLASS_ON, UTF8PROC_DECOMP_TYPE_FRACTION, utf8proc_sequences + 4605, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_NO, 0, UTF8PROC_BIDI_CLASS_ON, UTF8PROC_DECOMP_TYPE_FRACTION, utf8proc_sequences + 4609, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_NO, 0, UTF8PROC_BIDI_CLASS_ON, UTF8PROC_DECOMP_TYPE_FRACTION, utf8proc_sequences + 4613, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_NO, 0, UTF8PROC_BIDI_CLASS_ON, UTF8PROC_DECOMP_TYPE_FRACTION, utf8proc_sequences + 4617, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_NO, 0, UTF8PROC_BIDI_CLASS_ON, UTF8PROC_DECOMP_TYPE_FRACTION, utf8proc_sequences + 4621, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_NO, 0, UTF8PROC_BIDI_CLASS_ON, UTF8PROC_DECOMP_TYPE_FRACTION, utf8proc_sequences + 4625, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_NO, 0, UTF8PROC_BIDI_CLASS_ON, UTF8PROC_DECOMP_TYPE_FRACTION, utf8proc_sequences + 4629, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_NO, 0, UTF8PROC_BIDI_CLASS_ON, UTF8PROC_DECOMP_TYPE_FRACTION, utf8proc_sequences + 4633, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_NO, 0, UTF8PROC_BIDI_CLASS_ON, UTF8PROC_DECOMP_TYPE_FRACTION, utf8proc_sequences + 4637, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_NO, 0, UTF8PROC_BIDI_CLASS_ON, UTF8PROC_DECOMP_TYPE_FRACTION, utf8proc_sequences + 4641, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_NL, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 2392, false, -1, 8560, -1, -1, -1, false, false, false, false, utf8proc_sequences + 4644},
+  {UTF8PROC_CATEGORY_NL, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 4646, false, -1, 8561, -1, -1, -1, false, false, false, false, utf8proc_sequences + 4649},
+  {UTF8PROC_CATEGORY_NL, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 4651, false, -1, 8562, -1, -1, -1, false, false, false, false, utf8proc_sequences + 4655},
+  {UTF8PROC_CATEGORY_NL, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 4657, false, -1, 8563, -1, -1, -1, false, false, false, false, utf8proc_sequences + 4660},
+  {UTF8PROC_CATEGORY_NL, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 4662, false, -1, 8564, -1, -1, -1, false, false, false, false, utf8proc_sequences + 4664},
+  {UTF8PROC_CATEGORY_NL, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 4666, false, -1, 8565, -1, -1, -1, false, false, false, false, utf8proc_sequences + 4669},
+  {UTF8PROC_CATEGORY_NL, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 4671, false, -1, 8566, -1, -1, -1, false, false, false, false, utf8proc_sequences + 4675},
+  {UTF8PROC_CATEGORY_NL, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 4677, false, -1, 8567, -1, -1, -1, false, false, false, false, utf8proc_sequences + 4682},
+  {UTF8PROC_CATEGORY_NL, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 4684, false, -1, 8568, -1, -1, -1, false, false, false, false, utf8proc_sequences + 4687},
+  {UTF8PROC_CATEGORY_NL, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 4689, false, -1, 8569, -1, -1, -1, false, false, false, false, utf8proc_sequences + 4691},
+  {UTF8PROC_CATEGORY_NL, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 4693, false, -1, 8570, -1, -1, -1, false, false, false, false, utf8proc_sequences + 4696},
+  {UTF8PROC_CATEGORY_NL, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 4698, false, -1, 8571, -1, -1, -1, false, false, false, false, utf8proc_sequences + 4702},
+  {UTF8PROC_CATEGORY_NL, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 2398, false, -1, 8572, -1, -1, -1, false, false, false, false, utf8proc_sequences + 4704},
+  {UTF8PROC_CATEGORY_NL, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 4532, false, -1, 8573, -1, -1, -1, false, false, false, false, utf8proc_sequences + 4706},
+  {UTF8PROC_CATEGORY_NL, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 2382, false, -1, 8574, -1, -1, -1, false, false, false, false, utf8proc_sequences + 4708},
+  {UTF8PROC_CATEGORY_NL, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 2400, false, -1, 8575, -1, -1, -1, false, false, false, false, utf8proc_sequences + 4710},
+  {UTF8PROC_CATEGORY_NL, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 16, false, 8544, -1, 8544, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_NL, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 4712, false, 8545, -1, 8545, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_NL, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 4715, false, 8546, -1, 8546, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_NL, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 4719, false, 8547, -1, 8547, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_NL, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 42, false, 8548, -1, 8548, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_NL, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 4722, false, 8549, -1, 8549, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_NL, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 4725, false, 8550, -1, 8550, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_NL, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 4729, false, 8551, -1, 8551, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_NL, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 4734, false, 8552, -1, 8552, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_NL, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 46, false, 8553, -1, 8553, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_NL, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 4737, false, 8554, -1, 8554, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_NL, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 4740, false, 8555, -1, 8555, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_NL, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 22, false, 8556, -1, 8556, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_NL, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 4, false, 8557, -1, 8557, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_NL, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 6, false, 8558, -1, 8558, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_NL, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 24, false, 8559, -1, 8559, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, 8580, -1, -1, -1, false, false, false, false, utf8proc_sequences + 4744},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, 8579, -1, 8579, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SM, 0, UTF8PROC_BIDI_CLASS_ON, 0, NULL, false, -1, -1, -1, 16500, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SM, 0, UTF8PROC_BIDI_CLASS_ON, 0, NULL, false, -1, -1, -1, 16560, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SM, 0, UTF8PROC_BIDI_CLASS_ON, 0, NULL, false, -1, -1, -1, 16620, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SM, 0, UTF8PROC_BIDI_CLASS_ON, 0, utf8proc_sequences + 4746, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SM, 0, UTF8PROC_BIDI_CLASS_ON, 0, utf8proc_sequences + 4749, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SM, 0, UTF8PROC_BIDI_CLASS_ON, 0, utf8proc_sequences + 4752, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_ON, 0, utf8proc_sequences + 4755, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SM, 0, UTF8PROC_BIDI_CLASS_ON, 0, utf8proc_sequences + 4758, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SM, 0, UTF8PROC_BIDI_CLASS_ON, 0, utf8proc_sequences + 4761, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_ON, 0, NULL, false, -1, -1, -1, 16680, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SM, 0, UTF8PROC_BIDI_CLASS_ON, 0, NULL, false, -1, -1, -1, 16800, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SM, 0, UTF8PROC_BIDI_CLASS_ON, 0, NULL, false, -1, -1, -1, 16740, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SM, 0, UTF8PROC_BIDI_CLASS_ON, 0, NULL, true, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SM, 0, UTF8PROC_BIDI_CLASS_ON, 0, NULL, true, -1, -1, -1, 16860, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SM, 0, UTF8PROC_BIDI_CLASS_ON, 0, utf8proc_sequences + 4764, true, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SM, 0, UTF8PROC_BIDI_CLASS_ON, 0, NULL, true, -1, -1, -1, 16920, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SM, 0, UTF8PROC_BIDI_CLASS_ON, 0, utf8proc_sequences + 4767, true, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SM, 0, UTF8PROC_BIDI_CLASS_ON, 0, NULL, true, -1, -1, -1, 16980, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SM, 0, UTF8PROC_BIDI_CLASS_ON, 0, utf8proc_sequences + 4770, true, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SM, 0, UTF8PROC_BIDI_CLASS_ON, 0, NULL, false, -1, -1, -1, 17040, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SM, 0, UTF8PROC_BIDI_CLASS_ON, 0, utf8proc_sequences + 4773, true, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SM, 0, UTF8PROC_BIDI_CLASS_ON, 0, NULL, false, -1, -1, -1, 17100, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SM, 0, UTF8PROC_BIDI_CLASS_ON, 0, utf8proc_sequences + 4776, true, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SM, 0, UTF8PROC_BIDI_CLASS_ON, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 4779, true, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SM, 0, UTF8PROC_BIDI_CLASS_ON, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 4782, true, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SM, 0, UTF8PROC_BIDI_CLASS_ON, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 4786, true, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SM, 0, UTF8PROC_BIDI_CLASS_ON, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 4789, true, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SM, 0, UTF8PROC_BIDI_CLASS_ON, 0, NULL, true, -1, -1, -1, 17160, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SM, 0, UTF8PROC_BIDI_CLASS_ON, 0, utf8proc_sequences + 4793, true, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SM, 0, UTF8PROC_BIDI_CLASS_ON, 0, NULL, true, -1, -1, -1, 17220, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SM, 0, UTF8PROC_BIDI_CLASS_ON, 0, utf8proc_sequences + 4796, true, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SM, 0, UTF8PROC_BIDI_CLASS_ON, 0, NULL, true, -1, -1, -1, 17280, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SM, 0, UTF8PROC_BIDI_CLASS_ON, 0, utf8proc_sequences + 4799, true, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SM, 0, UTF8PROC_BIDI_CLASS_ON, 0, NULL, true, -1, -1, -1, 17340, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SM, 0, UTF8PROC_BIDI_CLASS_ON, 0, utf8proc_sequences + 4802, true, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SM, 0, UTF8PROC_BIDI_CLASS_ON, 0, NULL, false, -1, -1, -1, 17520, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SM, 0, UTF8PROC_BIDI_CLASS_ON, 0, utf8proc_sequences + 4805, true, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SM, 0, UTF8PROC_BIDI_CLASS_ON, 0, NULL, false, -1, -1, -1, 17460, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SM, 0, UTF8PROC_BIDI_CLASS_ON, 0, utf8proc_sequences + 4808, true, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SM, 0, UTF8PROC_BIDI_CLASS_ON, 0, NULL, true, -1, -1, -1, 17700, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SM, 0, UTF8PROC_BIDI_CLASS_ON, 0, NULL, true, -1, -1, -1, 17760, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SM, 0, UTF8PROC_BIDI_CLASS_ON, 0, utf8proc_sequences + 4811, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SM, 0, UTF8PROC_BIDI_CLASS_ON, 0, utf8proc_sequences + 4814, true, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SM, 0, UTF8PROC_BIDI_CLASS_ON, 0, utf8proc_sequences + 4817, true, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SM, 0, UTF8PROC_BIDI_CLASS_ON, 0, utf8proc_sequences + 4820, true, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SM, 0, UTF8PROC_BIDI_CLASS_ON, 0, utf8proc_sequences + 4823, true, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SM, 0, UTF8PROC_BIDI_CLASS_ON, 0, NULL, true, -1, -1, -1, 17820, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SM, 0, UTF8PROC_BIDI_CLASS_ON, 0, NULL, true, -1, -1, -1, 17880, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SM, 0, UTF8PROC_BIDI_CLASS_ON, 0, utf8proc_sequences + 4826, true, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SM, 0, UTF8PROC_BIDI_CLASS_ON, 0, utf8proc_sequences + 4829, true, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SM, 0, UTF8PROC_BIDI_CLASS_ON, 0, NULL, true, -1, -1, -1, 17940, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SM, 0, UTF8PROC_BIDI_CLASS_ON, 0, NULL, true, -1, -1, -1, 18000, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SM, 0, UTF8PROC_BIDI_CLASS_ON, 0, utf8proc_sequences + 4832, true, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SM, 0, UTF8PROC_BIDI_CLASS_ON, 0, utf8proc_sequences + 4835, true, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SM, 0, UTF8PROC_BIDI_CLASS_ON, 0, NULL, true, -1, -1, -1, 18060, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SM, 0, UTF8PROC_BIDI_CLASS_ON, 0, NULL, true, -1, -1, -1, 18120, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SM, 0, UTF8PROC_BIDI_CLASS_ON, 0, NULL, true, -1, -1, -1, 18660, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SM, 0, UTF8PROC_BIDI_CLASS_ON, 0, NULL, true, -1, -1, -1, 18720, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SM, 0, UTF8PROC_BIDI_CLASS_ON, 0, utf8proc_sequences + 4838, true, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SM, 0, UTF8PROC_BIDI_CLASS_ON, 0, utf8proc_sequences + 4841, true, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SM, 0, UTF8PROC_BIDI_CLASS_ON, 0, NULL, true, -1, -1, -1, 18180, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SM, 0, UTF8PROC_BIDI_CLASS_ON, 0, NULL, true, -1, -1, -1, 18240, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SM, 0, UTF8PROC_BIDI_CLASS_ON, 0, utf8proc_sequences + 4844, true, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SM, 0, UTF8PROC_BIDI_CLASS_ON, 0, utf8proc_sequences + 4847, true, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SM, 0, UTF8PROC_BIDI_CLASS_ON, 0, NULL, true, -1, -1, -1, 18300, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SM, 0, UTF8PROC_BIDI_CLASS_ON, 0, NULL, true, -1, -1, -1, 18360, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SM, 0, UTF8PROC_BIDI_CLASS_ON, 0, utf8proc_sequences + 4850, true, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SM, 0, UTF8PROC_BIDI_CLASS_ON, 0, utf8proc_sequences + 4853, true, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SM, 0, UTF8PROC_BIDI_CLASS_ON, 0, NULL, true, -1, -1, -1, 18780, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SM, 0, UTF8PROC_BIDI_CLASS_ON, 0, NULL, true, -1, -1, -1, 18840, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SM, 0, UTF8PROC_BIDI_CLASS_ON, 0, NULL, true, -1, -1, -1, 18420, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SM, 0, UTF8PROC_BIDI_CLASS_ON, 0, NULL, true, -1, -1, -1, 18480, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SM, 0, UTF8PROC_BIDI_CLASS_ON, 0, NULL, true, -1, -1, -1, 18540, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SM, 0, UTF8PROC_BIDI_CLASS_ON, 0, NULL, true, -1, -1, -1, 18600, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SM, 0, UTF8PROC_BIDI_CLASS_ON, 0, utf8proc_sequences + 4856, true, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SM, 0, UTF8PROC_BIDI_CLASS_ON, 0, utf8proc_sequences + 4859, true, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SM, 0, UTF8PROC_BIDI_CLASS_ON, 0, utf8proc_sequences + 4862, true, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SM, 0, UTF8PROC_BIDI_CLASS_ON, 0, utf8proc_sequences + 4865, true, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SM, 0, UTF8PROC_BIDI_CLASS_ON, 0, NULL, true, -1, -1, -1, 18900, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SM, 0, UTF8PROC_BIDI_CLASS_ON, 0, NULL, true, -1, -1, -1, 18960, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SM, 0, UTF8PROC_BIDI_CLASS_ON, 0, NULL, true, -1, -1, -1, 19020, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SM, 0, UTF8PROC_BIDI_CLASS_ON, 0, NULL, true, -1, -1, -1, 19080, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SM, 0, UTF8PROC_BIDI_CLASS_ON, 0, utf8proc_sequences + 4868, true, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SM, 0, UTF8PROC_BIDI_CLASS_ON, 0, utf8proc_sequences + 4871, true, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SM, 0, UTF8PROC_BIDI_CLASS_ON, 0, utf8proc_sequences + 4874, true, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SM, 0, UTF8PROC_BIDI_CLASS_ON, 0, utf8proc_sequences + 4877, true, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SM, 0, UTF8PROC_BIDI_CLASS_ON, 0, utf8proc_sequences + 4880, true, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SM, 0, UTF8PROC_BIDI_CLASS_ON, 0, utf8proc_sequences + 4883, true, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SM, 0, UTF8PROC_BIDI_CLASS_ON, 0, utf8proc_sequences + 4886, true, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SM, 0, UTF8PROC_BIDI_CLASS_ON, 0, utf8proc_sequences + 4889, true, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_PS, 0, UTF8PROC_BIDI_CLASS_ON, 0, utf8proc_sequences + 4892, true, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_PE, 0, UTF8PROC_BIDI_CLASS_ON, 0, utf8proc_sequences + 4894, true, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_NO, 0, UTF8PROC_BIDI_CLASS_ON, UTF8PROC_DECOMP_TYPE_CIRCLE, utf8proc_sequences + 72, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_NO, 0, UTF8PROC_BIDI_CLASS_ON, UTF8PROC_DECOMP_TYPE_CIRCLE, utf8proc_sequences + 60, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_NO, 0, UTF8PROC_BIDI_CLASS_ON, UTF8PROC_DECOMP_TYPE_CIRCLE, utf8proc_sequences + 62, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_NO, 0, UTF8PROC_BIDI_CLASS_ON, UTF8PROC_DECOMP_TYPE_CIRCLE, utf8proc_sequences + 4499, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_NO, 0, UTF8PROC_BIDI_CLASS_ON, UTF8PROC_DECOMP_TYPE_CIRCLE, utf8proc_sequences + 4501, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_NO, 0, UTF8PROC_BIDI_CLASS_ON, UTF8PROC_DECOMP_TYPE_CIRCLE, utf8proc_sequences + 4503, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_NO, 0, UTF8PROC_BIDI_CLASS_ON, UTF8PROC_DECOMP_TYPE_CIRCLE, utf8proc_sequences + 4505, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_NO, 0, UTF8PROC_BIDI_CLASS_ON, UTF8PROC_DECOMP_TYPE_CIRCLE, utf8proc_sequences + 4507, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_NO, 0, UTF8PROC_BIDI_CLASS_ON, UTF8PROC_DECOMP_TYPE_CIRCLE, utf8proc_sequences + 4509, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_NO, 0, UTF8PROC_BIDI_CLASS_ON, UTF8PROC_DECOMP_TYPE_CIRCLE, utf8proc_sequences + 4896, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_NO, 0, UTF8PROC_BIDI_CLASS_ON, UTF8PROC_DECOMP_TYPE_CIRCLE, utf8proc_sequences + 4899, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_NO, 0, UTF8PROC_BIDI_CLASS_ON, UTF8PROC_DECOMP_TYPE_CIRCLE, utf8proc_sequences + 4902, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_NO, 0, UTF8PROC_BIDI_CLASS_ON, UTF8PROC_DECOMP_TYPE_CIRCLE, utf8proc_sequences + 4905, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_NO, 0, UTF8PROC_BIDI_CLASS_ON, UTF8PROC_DECOMP_TYPE_CIRCLE, utf8proc_sequences + 4908, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_NO, 0, UTF8PROC_BIDI_CLASS_ON, UTF8PROC_DECOMP_TYPE_CIRCLE, utf8proc_sequences + 4911, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_NO, 0, UTF8PROC_BIDI_CLASS_ON, UTF8PROC_DECOMP_TYPE_CIRCLE, utf8proc_sequences + 4914, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_NO, 0, UTF8PROC_BIDI_CLASS_ON, UTF8PROC_DECOMP_TYPE_CIRCLE, utf8proc_sequences + 4917, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_NO, 0, UTF8PROC_BIDI_CLASS_ON, UTF8PROC_DECOMP_TYPE_CIRCLE, utf8proc_sequences + 4920, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_NO, 0, UTF8PROC_BIDI_CLASS_ON, UTF8PROC_DECOMP_TYPE_CIRCLE, utf8proc_sequences + 4923, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_NO, 0, UTF8PROC_BIDI_CLASS_ON, UTF8PROC_DECOMP_TYPE_CIRCLE, utf8proc_sequences + 4926, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_NO, 0, UTF8PROC_BIDI_CLASS_ON, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 4929, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_NO, 0, UTF8PROC_BIDI_CLASS_ON, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 4933, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_NO, 0, UTF8PROC_BIDI_CLASS_ON, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 4937, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_NO, 0, UTF8PROC_BIDI_CLASS_ON, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 4941, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_NO, 0, UTF8PROC_BIDI_CLASS_ON, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 4945, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_NO, 0, UTF8PROC_BIDI_CLASS_ON, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 4949, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_NO, 0, UTF8PROC_BIDI_CLASS_ON, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 4953, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_NO, 0, UTF8PROC_BIDI_CLASS_ON, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 4957, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_NO, 0, UTF8PROC_BIDI_CLASS_ON, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 4961, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_NO, 0, UTF8PROC_BIDI_CLASS_ON, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 4965, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_NO, 0, UTF8PROC_BIDI_CLASS_ON, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 4970, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_NO, 0, UTF8PROC_BIDI_CLASS_ON, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 4975, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_NO, 0, UTF8PROC_BIDI_CLASS_ON, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 4980, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_NO, 0, UTF8PROC_BIDI_CLASS_ON, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 4985, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_NO, 0, UTF8PROC_BIDI_CLASS_ON, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 4990, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_NO, 0, UTF8PROC_BIDI_CLASS_ON, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 4995, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_NO, 0, UTF8PROC_BIDI_CLASS_ON, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 5000, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_NO, 0, UTF8PROC_BIDI_CLASS_ON, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 5005, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_NO, 0, UTF8PROC_BIDI_CLASS_ON, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 5010, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_NO, 0, UTF8PROC_BIDI_CLASS_ON, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 5015, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_NO, 0, UTF8PROC_BIDI_CLASS_EN, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 5020, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_NO, 0, UTF8PROC_BIDI_CLASS_EN, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 5023, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_NO, 0, UTF8PROC_BIDI_CLASS_EN, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 5026, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_NO, 0, UTF8PROC_BIDI_CLASS_EN, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 5029, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_NO, 0, UTF8PROC_BIDI_CLASS_EN, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 5032, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_NO, 0, UTF8PROC_BIDI_CLASS_EN, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 5035, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_NO, 0, UTF8PROC_BIDI_CLASS_EN, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 5038, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_NO, 0, UTF8PROC_BIDI_CLASS_EN, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 5041, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_NO, 0, UTF8PROC_BIDI_CLASS_EN, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 5044, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_NO, 0, UTF8PROC_BIDI_CLASS_EN, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 5047, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_NO, 0, UTF8PROC_BIDI_CLASS_EN, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 5051, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_NO, 0, UTF8PROC_BIDI_CLASS_EN, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 5055, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_NO, 0, UTF8PROC_BIDI_CLASS_EN, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 5059, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_NO, 0, UTF8PROC_BIDI_CLASS_EN, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 5063, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_NO, 0, UTF8PROC_BIDI_CLASS_EN, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 5067, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_NO, 0, UTF8PROC_BIDI_CLASS_EN, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 5071, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_NO, 0, UTF8PROC_BIDI_CLASS_EN, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 5075, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_NO, 0, UTF8PROC_BIDI_CLASS_EN, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 5079, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_NO, 0, UTF8PROC_BIDI_CLASS_EN, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 5083, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_NO, 0, UTF8PROC_BIDI_CLASS_EN, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 5087, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 5091, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 5095, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 5099, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 5103, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 5107, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 5111, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 5115, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 5119, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 5123, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 5127, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 5131, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 5135, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 5139, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 5143, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 5147, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 5151, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 5155, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 5159, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 5163, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 5167, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 5171, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 5175, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 5179, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 5183, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 5187, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 5191, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_CIRCLE, utf8proc_sequences + 2376, false, -1, 9424, -1, -1, -1, false, false, false, false, utf8proc_sequences + 5195},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_CIRCLE, utf8proc_sequences + 2380, false, -1, 9425, -1, -1, -1, false, false, false, false, utf8proc_sequences + 5197},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_CIRCLE, utf8proc_sequences + 4532, false, -1, 9426, -1, -1, -1, false, false, false, false, utf8proc_sequences + 5199},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_CIRCLE, utf8proc_sequences + 2382, false, -1, 9427, -1, -1, -1, false, false, false, false, utf8proc_sequences + 5201},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_CIRCLE, utf8proc_sequences + 2384, false, -1, 9428, -1, -1, -1, false, false, false, false, utf8proc_sequences + 5203},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_CIRCLE, utf8proc_sequences + 4571, false, -1, 9429, -1, -1, -1, false, false, false, false, utf8proc_sequences + 5205},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_CIRCLE, utf8proc_sequences + 2388, false, -1, 9430, -1, -1, -1, false, false, false, false, utf8proc_sequences + 5207},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_CIRCLE, utf8proc_sequences + 2390, false, -1, 9431, -1, -1, -1, false, false, false, false, utf8proc_sequences + 5209},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_CIRCLE, utf8proc_sequences + 2392, false, -1, 9432, -1, -1, -1, false, false, false, false, utf8proc_sequences + 5211},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_CIRCLE, utf8proc_sequences + 2394, false, -1, 9433, -1, -1, -1, false, false, false, false, utf8proc_sequences + 5213},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_CIRCLE, utf8proc_sequences + 2396, false, -1, 9434, -1, -1, -1, false, false, false, false, utf8proc_sequences + 5215},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_CIRCLE, utf8proc_sequences + 2398, false, -1, 9435, -1, -1, -1, false, false, false, false, utf8proc_sequences + 5217},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_CIRCLE, utf8proc_sequences + 2400, false, -1, 9436, -1, -1, -1, false, false, false, false, utf8proc_sequences + 5219},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_CIRCLE, utf8proc_sequences + 2402, false, -1, 9437, -1, -1, -1, false, false, false, false, utf8proc_sequences + 5221},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_CIRCLE, utf8proc_sequences + 2404, false, -1, 9438, -1, -1, -1, false, false, false, false, utf8proc_sequences + 5223},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_CIRCLE, utf8proc_sequences + 2408, false, -1, 9439, -1, -1, -1, false, false, false, false, utf8proc_sequences + 5225},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_CIRCLE, utf8proc_sequences + 4553, false, -1, 9440, -1, -1, -1, false, false, false, false, utf8proc_sequences + 5227},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_CIRCLE, utf8proc_sequences + 2410, false, -1, 9441, -1, -1, -1, false, false, false, false, utf8proc_sequences + 5229},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_CIRCLE, utf8proc_sequences + 5231, false, -1, 9442, -1, -1, -1, false, false, false, false, utf8proc_sequences + 5233},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_CIRCLE, utf8proc_sequences + 2412, false, -1, 9443, -1, -1, -1, false, false, false, false, utf8proc_sequences + 5235},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_CIRCLE, utf8proc_sequences + 2414, false, -1, 9444, -1, -1, -1, false, false, false, false, utf8proc_sequences + 5237},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_CIRCLE, utf8proc_sequences + 4662, false, -1, 9445, -1, -1, -1, false, false, false, false, utf8proc_sequences + 5239},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_CIRCLE, utf8proc_sequences + 2416, false, -1, 9446, -1, -1, -1, false, false, false, false, utf8proc_sequences + 5241},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_CIRCLE, utf8proc_sequences + 4689, false, -1, 9447, -1, -1, -1, false, false, false, false, utf8proc_sequences + 5243},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_CIRCLE, utf8proc_sequences + 5245, false, -1, 9448, -1, -1, -1, false, false, false, false, utf8proc_sequences + 5247},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_CIRCLE, utf8proc_sequences + 4565, false, -1, 9449, -1, -1, -1, false, false, false, false, utf8proc_sequences + 5249},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_CIRCLE, utf8proc_sequences + 0, false, 9398, -1, 9398, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_CIRCLE, utf8proc_sequences + 2, false, 9399, -1, 9399, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_CIRCLE, utf8proc_sequences + 4, false, 9400, -1, 9400, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_CIRCLE, utf8proc_sequences + 6, false, 9401, -1, 9401, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_CIRCLE, utf8proc_sequences + 8, false, 9402, -1, 9402, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_CIRCLE, utf8proc_sequences + 10, false, 9403, -1, 9403, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_CIRCLE, utf8proc_sequences + 12, false, 9404, -1, 9404, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_CIRCLE, utf8proc_sequences + 14, false, 9405, -1, 9405, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_CIRCLE, utf8proc_sequences + 16, false, 9406, -1, 9406, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_CIRCLE, utf8proc_sequences + 18, false, 9407, -1, 9407, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_CIRCLE, utf8proc_sequences + 20, false, 9408, -1, 9408, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_CIRCLE, utf8proc_sequences + 22, false, 9409, -1, 9409, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_CIRCLE, utf8proc_sequences + 24, false, 9410, -1, 9410, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_CIRCLE, utf8proc_sequences + 26, false, 9411, -1, 9411, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_CIRCLE, utf8proc_sequences + 28, false, 9412, -1, 9412, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_CIRCLE, utf8proc_sequences + 30, false, 9413, -1, 9413, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_CIRCLE, utf8proc_sequences + 32, false, 9414, -1, 9414, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_CIRCLE, utf8proc_sequences + 34, false, 9415, -1, 9415, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_CIRCLE, utf8proc_sequences + 36, false, 9416, -1, 9416, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_CIRCLE, utf8proc_sequences + 38, false, 9417, -1, 9417, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_CIRCLE, utf8proc_sequences + 40, false, 9418, -1, 9418, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_CIRCLE, utf8proc_sequences + 42, false, 9419, -1, 9419, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_CIRCLE, utf8proc_sequences + 44, false, 9420, -1, 9420, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_CIRCLE, utf8proc_sequences + 46, false, 9421, -1, 9421, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_CIRCLE, utf8proc_sequences + 48, false, 9422, -1, 9422, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_CIRCLE, utf8proc_sequences + 50, false, 9423, -1, 9423, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_NO, 0, UTF8PROC_BIDI_CLASS_ON, UTF8PROC_DECOMP_TYPE_CIRCLE, utf8proc_sequences + 4497, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SM, 0, UTF8PROC_BIDI_CLASS_ON, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 5251, true, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SM, 0, UTF8PROC_BIDI_CLASS_ON, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 5256, true, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SM, 0, UTF8PROC_BIDI_CLASS_ON, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 5260, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SM, 0, UTF8PROC_BIDI_CLASS_ON, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 5263, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SM, 0, UTF8PROC_BIDI_CLASS_ON, 0, utf8proc_sequences + 5267, true, -1, -1, -1, -1, -1, true, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SM, 0, UTF8PROC_BIDI_CLASS_ON, 0, NULL, false, -1, -1, -1, 19140, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, 11312, -1, -1, -1, false, false, false, false, utf8proc_sequences + 5270},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, 11313, -1, -1, -1, false, false, false, false, utf8proc_sequences + 5272},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, 11314, -1, -1, -1, false, false, false, false, utf8proc_sequences + 5274},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, 11315, -1, -1, -1, false, false, false, false, utf8proc_sequences + 5276},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, 11316, -1, -1, -1, false, false, false, false, utf8proc_sequences + 5278},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, 11317, -1, -1, -1, false, false, false, false, utf8proc_sequences + 5280},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, 11318, -1, -1, -1, false, false, false, false, utf8proc_sequences + 5282},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, 11319, -1, -1, -1, false, false, false, false, utf8proc_sequences + 5284},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, 11320, -1, -1, -1, false, false, false, false, utf8proc_sequences + 5286},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, 11321, -1, -1, -1, false, false, false, false, utf8proc_sequences + 5288},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, 11322, -1, -1, -1, false, false, false, false, utf8proc_sequences + 5290},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, 11323, -1, -1, -1, false, false, false, false, utf8proc_sequences + 5292},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, 11324, -1, -1, -1, false, false, false, false, utf8proc_sequences + 5294},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, 11325, -1, -1, -1, false, false, false, false, utf8proc_sequences + 5296},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, 11326, -1, -1, -1, false, false, false, false, utf8proc_sequences + 5298},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, 11327, -1, -1, -1, false, false, false, false, utf8proc_sequences + 5300},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, 11328, -1, -1, -1, false, false, false, false, utf8proc_sequences + 5302},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, 11329, -1, -1, -1, false, false, false, false, utf8proc_sequences + 5304},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, 11330, -1, -1, -1, false, false, false, false, utf8proc_sequences + 5306},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, 11331, -1, -1, -1, false, false, false, false, utf8proc_sequences + 5308},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, 11332, -1, -1, -1, false, false, false, false, utf8proc_sequences + 5310},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, 11333, -1, -1, -1, false, false, false, false, utf8proc_sequences + 5312},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, 11334, -1, -1, -1, false, false, false, false, utf8proc_sequences + 5314},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, 11335, -1, -1, -1, false, false, false, false, utf8proc_sequences + 5316},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, 11336, -1, -1, -1, false, false, false, false, utf8proc_sequences + 5318},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, 11337, -1, -1, -1, false, false, false, false, utf8proc_sequences + 5320},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, 11338, -1, -1, -1, false, false, false, false, utf8proc_sequences + 5322},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, 11339, -1, -1, -1, false, false, false, false, utf8proc_sequences + 5324},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, 11340, -1, -1, -1, false, false, false, false, utf8proc_sequences + 5326},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, 11341, -1, -1, -1, false, false, false, false, utf8proc_sequences + 5328},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, 11342, -1, -1, -1, false, false, false, false, utf8proc_sequences + 5330},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, 11343, -1, -1, -1, false, false, false, false, utf8proc_sequences + 5332},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, 11344, -1, -1, -1, false, false, false, false, utf8proc_sequences + 5334},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, 11345, -1, -1, -1, false, false, false, false, utf8proc_sequences + 5336},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, 11346, -1, -1, -1, false, false, false, false, utf8proc_sequences + 5338},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, 11347, -1, -1, -1, false, false, false, false, utf8proc_sequences + 5340},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, 11348, -1, -1, -1, false, false, false, false, utf8proc_sequences + 5342},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, 11349, -1, -1, -1, false, false, false, false, utf8proc_sequences + 5344},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, 11350, -1, -1, -1, false, false, false, false, utf8proc_sequences + 5346},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, 11351, -1, -1, -1, false, false, false, false, utf8proc_sequences + 5348},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, 11352, -1, -1, -1, false, false, false, false, utf8proc_sequences + 5350},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, 11353, -1, -1, -1, false, false, false, false, utf8proc_sequences + 5352},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, 11354, -1, -1, -1, false, false, false, false, utf8proc_sequences + 5354},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, 11355, -1, -1, -1, false, false, false, false, utf8proc_sequences + 5356},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, 11356, -1, -1, -1, false, false, false, false, utf8proc_sequences + 5358},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, 11357, -1, -1, -1, false, false, false, false, utf8proc_sequences + 5360},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, 11358, -1, -1, -1, false, false, false, false, utf8proc_sequences + 5362},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, 11264, -1, 11264, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, 11265, -1, 11265, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, 11266, -1, 11266, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, 11267, -1, 11267, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, 11268, -1, 11268, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, 11269, -1, 11269, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, 11270, -1, 11270, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, 11271, -1, 11271, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, 11272, -1, 11272, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, 11273, -1, 11273, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, 11274, -1, 11274, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, 11275, -1, 11275, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, 11276, -1, 11276, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, 11277, -1, 11277, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, 11278, -1, 11278, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, 11279, -1, 11279, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, 11280, -1, 11280, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, 11281, -1, 11281, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, 11282, -1, 11282, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, 11283, -1, 11283, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, 11284, -1, 11284, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, 11285, -1, 11285, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, 11286, -1, 11286, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, 11287, -1, 11287, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, 11288, -1, 11288, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, 11289, -1, 11289, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, 11290, -1, 11290, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, 11291, -1, 11291, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, 11292, -1, 11292, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, 11293, -1, 11293, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, 11294, -1, 11294, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, 11295, -1, 11295, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, 11296, -1, 11296, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, 11297, -1, 11297, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, 11298, -1, 11298, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, 11299, -1, 11299, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, 11300, -1, 11300, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, 11301, -1, 11301, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, 11302, -1, 11302, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, 11303, -1, 11303, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, 11304, -1, 11304, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, 11305, -1, 11305, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, 11306, -1, 11306, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, 11307, -1, 11307, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, 11308, -1, 11308, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, 11309, -1, 11309, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, 11310, -1, 11310, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, 11361, -1, -1, -1, false, false, false, false, utf8proc_sequences + 5364},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, 11360, -1, 11360, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, 619, -1, -1, -1, false, false, false, false, utf8proc_sequences + 5366},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, 7549, -1, -1, -1, false, false, false, false, utf8proc_sequences + 5368},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, 637, -1, -1, -1, false, false, false, false, utf8proc_sequences + 5370},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, 570, -1, 570, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, 574, -1, 574, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, 11368, -1, -1, -1, false, false, false, false, utf8proc_sequences + 5372},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, 11367, -1, 11367, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, 11370, -1, -1, -1, false, false, false, false, utf8proc_sequences + 5374},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, 11369, -1, 11369, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, 11372, -1, -1, -1, false, false, false, false, utf8proc_sequences + 5376},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, 11371, -1, 11371, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, 11382, -1, -1, -1, false, false, false, false, utf8proc_sequences + 5378},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, 11381, -1, 11381, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, 11393, -1, -1, -1, false, false, false, false, utf8proc_sequences + 5380},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, 11392, -1, 11392, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, 11395, -1, -1, -1, false, false, false, false, utf8proc_sequences + 5382},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, 11394, -1, 11394, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, 11397, -1, -1, -1, false, false, false, false, utf8proc_sequences + 5384},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, 11396, -1, 11396, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, 11399, -1, -1, -1, false, false, false, false, utf8proc_sequences + 5386},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, 11398, -1, 11398, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, 11401, -1, -1, -1, false, false, false, false, utf8proc_sequences + 5388},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, 11400, -1, 11400, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, 11403, -1, -1, -1, false, false, false, false, utf8proc_sequences + 5390},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, 11402, -1, 11402, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, 11405, -1, -1, -1, false, false, false, false, utf8proc_sequences + 5392},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, 11404, -1, 11404, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, 11407, -1, -1, -1, false, false, false, false, utf8proc_sequences + 5394},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, 11406, -1, 11406, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, 11409, -1, -1, -1, false, false, false, false, utf8proc_sequences + 5396},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, 11408, -1, 11408, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, 11411, -1, -1, -1, false, false, false, false, utf8proc_sequences + 5398},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, 11410, -1, 11410, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, 11413, -1, -1, -1, false, false, false, false, utf8proc_sequences + 5400},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, 11412, -1, 11412, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, 11415, -1, -1, -1, false, false, false, false, utf8proc_sequences + 5402},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, 11414, -1, 11414, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, 11417, -1, -1, -1, false, false, false, false, utf8proc_sequences + 5404},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, 11416, -1, 11416, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, 11419, -1, -1, -1, false, false, false, false, utf8proc_sequences + 5406},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, 11418, -1, 11418, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, 11421, -1, -1, -1, false, false, false, false, utf8proc_sequences + 5408},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, 11420, -1, 11420, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, 11423, -1, -1, -1, false, false, false, false, utf8proc_sequences + 5410},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, 11422, -1, 11422, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, 11425, -1, -1, -1, false, false, false, false, utf8proc_sequences + 5412},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, 11424, -1, 11424, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, 11427, -1, -1, -1, false, false, false, false, utf8proc_sequences + 5414},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, 11426, -1, 11426, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, 11429, -1, -1, -1, false, false, false, false, utf8proc_sequences + 5416},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, 11428, -1, 11428, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, 11431, -1, -1, -1, false, false, false, false, utf8proc_sequences + 5418},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, 11430, -1, 11430, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, 11433, -1, -1, -1, false, false, false, false, utf8proc_sequences + 5420},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, 11432, -1, 11432, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, 11435, -1, -1, -1, false, false, false, false, utf8proc_sequences + 5422},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, 11434, -1, 11434, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, 11437, -1, -1, -1, false, false, false, false, utf8proc_sequences + 5424},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, 11436, -1, 11436, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, 11439, -1, -1, -1, false, false, false, false, utf8proc_sequences + 5426},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, 11438, -1, 11438, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, 11441, -1, -1, -1, false, false, false, false, utf8proc_sequences + 5428},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, 11440, -1, 11440, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, 11443, -1, -1, -1, false, false, false, false, utf8proc_sequences + 5430},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, 11442, -1, 11442, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, 11445, -1, -1, -1, false, false, false, false, utf8proc_sequences + 5432},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, 11444, -1, 11444, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, 11447, -1, -1, -1, false, false, false, false, utf8proc_sequences + 5434},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, 11446, -1, 11446, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, 11449, -1, -1, -1, false, false, false, false, utf8proc_sequences + 5436},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, 11448, -1, 11448, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, 11451, -1, -1, -1, false, false, false, false, utf8proc_sequences + 5438},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, 11450, -1, 11450, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, 11453, -1, -1, -1, false, false, false, false, utf8proc_sequences + 5440},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, 11452, -1, 11452, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, 11455, -1, -1, -1, false, false, false, false, utf8proc_sequences + 5442},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, 11454, -1, 11454, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, 11457, -1, -1, -1, false, false, false, false, utf8proc_sequences + 5444},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, 11456, -1, 11456, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, 11459, -1, -1, -1, false, false, false, false, utf8proc_sequences + 5446},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, 11458, -1, 11458, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, 11461, -1, -1, -1, false, false, false, false, utf8proc_sequences + 5448},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, 11460, -1, 11460, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, 11463, -1, -1, -1, false, false, false, false, utf8proc_sequences + 5450},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, 11462, -1, 11462, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, 11465, -1, -1, -1, false, false, false, false, utf8proc_sequences + 5452},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, 11464, -1, 11464, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, 11467, -1, -1, -1, false, false, false, false, utf8proc_sequences + 5454},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, 11466, -1, 11466, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, 11469, -1, -1, -1, false, false, false, false, utf8proc_sequences + 5456},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, 11468, -1, 11468, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, 11471, -1, -1, -1, false, false, false, false, utf8proc_sequences + 5458},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, 11470, -1, 11470, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, 11473, -1, -1, -1, false, false, false, false, utf8proc_sequences + 5460},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, 11472, -1, 11472, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, 11475, -1, -1, -1, false, false, false, false, utf8proc_sequences + 5462},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, 11474, -1, 11474, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, 11477, -1, -1, -1, false, false, false, false, utf8proc_sequences + 5464},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, 11476, -1, 11476, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, 11479, -1, -1, -1, false, false, false, false, utf8proc_sequences + 5466},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, 11478, -1, 11478, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, 11481, -1, -1, -1, false, false, false, false, utf8proc_sequences + 5468},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, 11480, -1, 11480, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, 11483, -1, -1, -1, false, false, false, false, utf8proc_sequences + 5470},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, 11482, -1, 11482, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, 11485, -1, -1, -1, false, false, false, false, utf8proc_sequences + 5472},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, 11484, -1, 11484, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, 11487, -1, -1, -1, false, false, false, false, utf8proc_sequences + 5474},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, 11486, -1, 11486, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, 11489, -1, -1, -1, false, false, false, false, utf8proc_sequences + 5476},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, 11488, -1, 11488, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, 11491, -1, -1, -1, false, false, false, false, utf8proc_sequences + 5478},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, 11490, -1, 11490, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, 4256, -1, 4256, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, 4257, -1, 4257, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, 4258, -1, 4258, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, 4259, -1, 4259, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, 4260, -1, 4260, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, 4261, -1, 4261, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, 4262, -1, 4262, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, 4263, -1, 4263, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, 4264, -1, 4264, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, 4265, -1, 4265, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, 4266, -1, 4266, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, 4267, -1, 4267, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, 4268, -1, 4268, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, 4269, -1, 4269, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, 4270, -1, 4270, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, 4271, -1, 4271, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, 4272, -1, 4272, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, 4273, -1, 4273, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, 4274, -1, 4274, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, 4275, -1, 4275, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, 4276, -1, 4276, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, 4277, -1, 4277, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, 4278, -1, 4278, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, 4279, -1, 4279, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, 4280, -1, 4280, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, 4281, -1, 4281, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, 4282, -1, 4282, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, 4283, -1, 4283, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, 4284, -1, 4284, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, 4285, -1, 4285, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, 4286, -1, 4286, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, 4287, -1, 4287, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, 4288, -1, 4288, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, 4289, -1, 4289, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, 4290, -1, 4290, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, 4291, -1, 4291, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, 4292, -1, 4292, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, 4293, -1, 4293, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LM, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_SUPER, utf8proc_sequences + 5480, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_ON, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 5482, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_ON, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 5484, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_ON, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 5486, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_ON, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 5488, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_ON, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 5490, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_ON, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 5492, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_ON, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 5494, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_ON, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 5496, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_ON, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 5498, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_ON, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 5500, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_ON, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 5502, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_ON, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 5504, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_ON, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 5506, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_ON, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 5508, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_ON, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 5510, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_ON, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 5512, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_ON, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 5514, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_ON, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 5516, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_ON, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 5518, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_ON, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 5520, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_ON, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 5522, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_ON, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 5524, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_ON, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 5526, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_ON, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 5528, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_ON, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 5530, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_ON, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 5532, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_ON, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 5534, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_ON, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 5536, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_ON, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 5538, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_ON, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 5540, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_ON, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 5542, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_ON, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 5544, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_ON, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 5546, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_ON, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 5548, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_ON, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 5550, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_ON, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 5552, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_ON, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 5554, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_ON, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 5556, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_ON, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 5558, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_ON, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 5560, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_ON, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 5562, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_ON, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 5564, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_ON, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 5566, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_ON, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 5568, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_ON, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 5570, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_ON, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 5572, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_ON, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 5574, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_ON, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 5576, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_ON, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 5578, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_ON, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 5580, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_ON, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 5582, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_ON, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 5584, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_ON, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 5586, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_ON, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 5588, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_ON, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 5590, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_ON, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 5592, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_ON, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 5594, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_ON, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 5596, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_ON, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 5598, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_ON, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 5600, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_ON, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 5602, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_ON, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 5604, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_ON, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 5606, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_ON, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 5608, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_ON, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 5610, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_ON, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 5612, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_ON, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 5614, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_ON, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 5616, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_ON, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 5618, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_ON, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 5620, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_ON, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 5622, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_ON, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 5624, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_ON, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 5626, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_ON, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 5628, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_ON, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 5630, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_ON, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 5632, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_ON, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 5634, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_ON, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 5636, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_ON, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 5638, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_ON, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 5640, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_ON, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 5642, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_ON, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 5644, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_ON, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 5646, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_ON, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 5648, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_ON, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 5650, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_ON, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 5652, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_ON, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 5654, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_ON, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 5656, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_ON, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 5658, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_ON, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 5660, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_ON, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 5662, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_ON, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 5664, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_ON, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 5666, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_ON, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 5668, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_ON, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 5670, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_ON, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 5672, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_ON, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 5674, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_ON, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 5676, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_ON, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 5678, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_ON, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 5680, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_ON, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 5682, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_ON, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 5684, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_ON, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 5686, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_ON, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 5688, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_ON, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 5690, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_ON, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 5692, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_ON, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 5694, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_ON, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 5696, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_ON, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 5698, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_ON, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 5700, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_ON, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 5702, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_ON, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 5704, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_ON, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 5706, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_ON, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 5708, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_ON, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 5710, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_ON, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 5712, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_ON, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 5714, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_ON, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 5716, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_ON, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 5718, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_ON, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 5720, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_ON, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 5722, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_ON, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 5724, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_ON, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 5726, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_ON, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 5728, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_ON, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 5730, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_ON, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 5732, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_ON, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 5734, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_ON, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 5736, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_ON, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 5738, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_ON, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 5740, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_ON, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 5742, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_ON, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 5744, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_ON, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 5746, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_ON, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 5748, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_ON, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 5750, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_ON, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 5752, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_ON, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 5754, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_ON, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 5756, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_ON, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 5758, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_ON, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 5760, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_ON, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 5762, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_ON, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 5764, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_ON, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 5766, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_ON, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 5768, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_ON, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 5770, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_ON, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 5772, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_ON, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 5774, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_ON, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 5776, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_ON, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 5778, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_ON, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 5780, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_ON, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 5782, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_ON, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 5784, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_ON, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 5786, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_ON, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 5788, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_ON, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 5790, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_ON, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 5792, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_ON, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 5794, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_ON, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 5796, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_ON, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 5798, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_ON, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 5800, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_ON, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 5802, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_ON, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 5804, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_ON, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 5806, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_ON, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 5808, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_ON, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 5810, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_ON, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 5812, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_ON, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 5814, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_ON, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 5816, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_ON, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 5818, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_ON, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 5820, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_ON, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 5822, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_ON, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 5824, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_ON, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 5826, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_ON, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 5828, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_ON, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 5830, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_ON, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 5832, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_ON, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 5834, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_ON, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 5836, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_ON, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 5838, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_ON, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 5840, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_ON, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 5842, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_ON, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 5844, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_ON, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 5846, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_ON, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 5848, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_ON, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 5850, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_ON, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 5852, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_ON, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 5854, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_ON, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 5856, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_ON, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 5858, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_ON, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 5860, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_ON, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 5862, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_ON, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 5864, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_ON, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 5866, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_ON, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 5868, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_ON, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 5870, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_ON, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 5872, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_ON, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 5874, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_ON, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 5876, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_ON, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 5878, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_ON, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 5880, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_ON, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 5882, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_ON, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 5884, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_ON, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 5886, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_ON, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 5888, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_ON, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 5890, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_ON, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 5892, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_ON, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 5894, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_ON, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 5896, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_ON, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 5898, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_ON, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 5900, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_ON, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 5902, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_ON, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 5904, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_ON, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 5906, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_ON, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 5908, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_ON, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 5910, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_ON, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 5912, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_ZS, 0, UTF8PROC_BIDI_CLASS_WS, UTF8PROC_DECOMP_TYPE_WIDE, utf8proc_sequences + 52, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_MN, 218, UTF8PROC_BIDI_CLASS_NSM, 0, NULL, false, -1, -1, -1, -1, -1, false, false, false, true, NULL},
+  {UTF8PROC_CATEGORY_MN, 224, UTF8PROC_BIDI_CLASS_NSM, 0, NULL, false, -1, -1, -1, -1, -1, false, false, false, true, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_ON, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 5914, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_NL, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 5532, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_NL, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 5916, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_NL, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 5918, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, -1, -1, 20400, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, -1, -1, 19200, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 5920, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, -1, -1, 19260, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 5923, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, -1, -1, 19320, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 5926, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, -1, -1, 19380, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 5929, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, -1, -1, 19440, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 5932, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, -1, -1, 19500, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 5935, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, -1, -1, 19560, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 5938, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, -1, -1, 19620, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 5941, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, -1, -1, 19680, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 5944, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, -1, -1, 19740, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 5947, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, -1, -1, 19800, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 5950, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, -1, -1, 19860, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 5953, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, -1, -1, 19920, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 5956, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, -1, -1, 19980, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 5959, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, -1, -1, 20040, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 5962, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, -1, -1, 20100, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 5965, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 5968, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, -1, -1, 20160, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 5971, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 5974, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, -1, -1, 20220, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 5977, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 5980, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, -1, -1, 20280, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 5983, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 5986, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, -1, -1, 20340, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 5989, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 5992, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 5995, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_MN, 8, UTF8PROC_BIDI_CLASS_NSM, 0, NULL, false, -1, -1, -1, -1, 52, false, false, false, true, NULL},
+  {UTF8PROC_CATEGORY_MN, 8, UTF8PROC_BIDI_CLASS_NSM, 0, NULL, false, -1, -1, -1, -1, 53, false, false, false, true, NULL},
+  {UTF8PROC_CATEGORY_SK, 0, UTF8PROC_BIDI_CLASS_ON, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 5998, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SK, 0, UTF8PROC_BIDI_CLASS_ON, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 6001, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LM, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, -1, -1, 20460, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LM, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 6004, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_VERTICAL, utf8proc_sequences + 6007, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, -1, -1, 21720, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, -1, -1, 20520, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 6010, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, -1, -1, 20580, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 6013, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, -1, -1, 20640, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 6016, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, -1, -1, 20700, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 6019, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, -1, -1, 20760, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 6022, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, -1, -1, 20820, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 6025, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, -1, -1, 20880, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 6028, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, -1, -1, 20940, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 6031, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, -1, -1, 21000, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 6034, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, -1, -1, 21060, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 6037, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, -1, -1, 21120, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 6040, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, -1, -1, 21180, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 6043, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, -1, -1, 21240, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 6046, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, -1, -1, 21300, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 6049, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, -1, -1, 21360, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 6052, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, -1, -1, 21420, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 6055, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 6058, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, -1, -1, 21480, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 6061, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 6064, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, -1, -1, 21540, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 6067, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 6070, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, -1, -1, 21600, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 6073, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 6076, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, -1, -1, 21660, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 6079, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 6082, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, -1, -1, 21780, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, -1, -1, 21840, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, -1, -1, 21900, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, -1, -1, 21960, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 6085, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 6088, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 6091, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 6094, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 6097, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LM, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, -1, -1, 22020, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LM, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 6100, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_VERTICAL, utf8proc_sequences + 6103, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 6106, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 6108, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 6110, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 6112, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 6114, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 6116, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 6118, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 6120, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 6122, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 6124, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 6126, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 6128, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 6130, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 6132, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 6134, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 6136, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 6138, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 6140, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 6142, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 6144, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 6146, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 6148, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 6150, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 6152, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 6154, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 6156, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 6158, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 6160, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 6162, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 6164, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 6166, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 6168, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 6170, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 6172, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 6174, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 6176, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 6178, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 6180, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 6182, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 6184, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 6186, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 6188, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 6190, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 6192, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 6194, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 6196, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 6198, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 6200, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 6202, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 6204, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 6206, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 6208, false, -1, -1, -1, -1, -1, false, true, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 6210, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 6212, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 6214, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 6216, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 6218, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 6220, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 6222, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 6224, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 6226, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 6228, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 6230, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 6232, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 6234, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 6236, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 6238, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 6240, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 6242, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 6244, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 6246, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 6248, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 6250, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 6252, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 6254, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 6256, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 6258, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 6260, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 6262, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 6264, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 6266, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 6268, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 6270, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 6272, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 6274, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 6276, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 6278, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 6280, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 6282, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 6284, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 6286, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 6288, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 6290, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 6292, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_NO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_SUPER, utf8proc_sequences + 5486, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_NO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_SUPER, utf8proc_sequences + 5498, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_NO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_SUPER, utf8proc_sequences + 6294, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_NO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_SUPER, utf8proc_sequences + 6296, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_SUPER, utf8proc_sequences + 6298, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_SUPER, utf8proc_sequences + 6300, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_SUPER, utf8proc_sequences + 6302, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_SUPER, utf8proc_sequences + 6304, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_SUPER, utf8proc_sequences + 5494, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_SUPER, utf8proc_sequences + 6306, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_SUPER, utf8proc_sequences + 6308, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_SUPER, utf8proc_sequences + 6310, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_SUPER, utf8proc_sequences + 6312, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_SUPER, utf8proc_sequences + 5502, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 6314, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 6318, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 6322, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 6326, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 6330, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 6334, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 6338, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 6342, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 6346, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 6350, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 6354, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 6358, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 6362, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 6366, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 6370, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 6375, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 6380, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 6385, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 6390, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 6395, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 6400, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 6405, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 6410, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 6415, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 6420, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 6425, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 6430, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 6435, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 6440, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_ON, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 6445, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_ON, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 6453, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_NO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 6460, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_NO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 6464, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_NO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 6468, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_NO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 6472, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_NO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 6476, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_NO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 6480, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_NO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 6484, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_NO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 6488, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_NO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 6492, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_NO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 6496, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 6500, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 6504, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 6508, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 6512, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 6516, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 6520, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 6524, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 6528, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 6532, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 6536, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 6540, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 6544, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 6548, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 6552, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 6556, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 6560, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 6564, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 6568, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 6572, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 6576, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 6580, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 6584, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 6588, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 6592, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 6596, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 6600, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_ON, UTF8PROC_DECOMP_TYPE_SQUARE, utf8proc_sequences + 6604, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_NO, 0, UTF8PROC_BIDI_CLASS_ON, UTF8PROC_DECOMP_TYPE_CIRCLE, utf8proc_sequences + 6608, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_NO, 0, UTF8PROC_BIDI_CLASS_ON, UTF8PROC_DECOMP_TYPE_CIRCLE, utf8proc_sequences + 6611, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_NO, 0, UTF8PROC_BIDI_CLASS_ON, UTF8PROC_DECOMP_TYPE_CIRCLE, utf8proc_sequences + 6614, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_NO, 0, UTF8PROC_BIDI_CLASS_ON, UTF8PROC_DECOMP_TYPE_CIRCLE, utf8proc_sequences + 6617, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_NO, 0, UTF8PROC_BIDI_CLASS_ON, UTF8PROC_DECOMP_TYPE_CIRCLE, utf8proc_sequences + 6620, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_NO, 0, UTF8PROC_BIDI_CLASS_ON, UTF8PROC_DECOMP_TYPE_CIRCLE, utf8proc_sequences + 6623, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_NO, 0, UTF8PROC_BIDI_CLASS_ON, UTF8PROC_DECOMP_TYPE_CIRCLE, utf8proc_sequences + 6626, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_NO, 0, UTF8PROC_BIDI_CLASS_ON, UTF8PROC_DECOMP_TYPE_CIRCLE, utf8proc_sequences + 6629, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_NO, 0, UTF8PROC_BIDI_CLASS_ON, UTF8PROC_DECOMP_TYPE_CIRCLE, utf8proc_sequences + 6632, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_NO, 0, UTF8PROC_BIDI_CLASS_ON, UTF8PROC_DECOMP_TYPE_CIRCLE, utf8proc_sequences + 6635, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_NO, 0, UTF8PROC_BIDI_CLASS_ON, UTF8PROC_DECOMP_TYPE_CIRCLE, utf8proc_sequences + 6638, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_NO, 0, UTF8PROC_BIDI_CLASS_ON, UTF8PROC_DECOMP_TYPE_CIRCLE, utf8proc_sequences + 6641, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_NO, 0, UTF8PROC_BIDI_CLASS_ON, UTF8PROC_DECOMP_TYPE_CIRCLE, utf8proc_sequences + 6644, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_NO, 0, UTF8PROC_BIDI_CLASS_ON, UTF8PROC_DECOMP_TYPE_CIRCLE, utf8proc_sequences + 6647, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_NO, 0, UTF8PROC_BIDI_CLASS_ON, UTF8PROC_DECOMP_TYPE_CIRCLE, utf8proc_sequences + 6650, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_CIRCLE, utf8proc_sequences + 6106, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_CIRCLE, utf8proc_sequences + 6112, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_CIRCLE, utf8proc_sequences + 6118, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_CIRCLE, utf8proc_sequences + 6122, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_CIRCLE, utf8proc_sequences + 6138, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_CIRCLE, utf8proc_sequences + 6140, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_CIRCLE, utf8proc_sequences + 6146, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_CIRCLE, utf8proc_sequences + 6150, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_CIRCLE, utf8proc_sequences + 6152, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_CIRCLE, utf8proc_sequences + 6156, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_CIRCLE, utf8proc_sequences + 6158, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_CIRCLE, utf8proc_sequences + 6160, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_CIRCLE, utf8proc_sequences + 6162, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_CIRCLE, utf8proc_sequences + 6164, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_CIRCLE, utf8proc_sequences + 6653, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_CIRCLE, utf8proc_sequences + 6656, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_CIRCLE, utf8proc_sequences + 6659, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_CIRCLE, utf8proc_sequences + 6662, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_CIRCLE, utf8proc_sequences + 6665, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_CIRCLE, utf8proc_sequences + 6668, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_CIRCLE, utf8proc_sequences + 6671, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_CIRCLE, utf8proc_sequences + 6674, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_CIRCLE, utf8proc_sequences + 6677, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_CIRCLE, utf8proc_sequences + 6680, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_CIRCLE, utf8proc_sequences + 6683, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_CIRCLE, utf8proc_sequences + 6686, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_CIRCLE, utf8proc_sequences + 6689, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_CIRCLE, utf8proc_sequences + 6692, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_ON, UTF8PROC_DECOMP_TYPE_CIRCLE, utf8proc_sequences + 6695, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_ON, UTF8PROC_DECOMP_TYPE_CIRCLE, utf8proc_sequences + 6701, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_ON, UTF8PROC_DECOMP_TYPE_CIRCLE, utf8proc_sequences + 6706, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_NO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_CIRCLE, utf8proc_sequences + 5486, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_NO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_CIRCLE, utf8proc_sequences + 5498, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_NO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_CIRCLE, utf8proc_sequences + 6294, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_NO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_CIRCLE, utf8proc_sequences + 6296, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_NO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_CIRCLE, utf8proc_sequences + 6709, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_NO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_CIRCLE, utf8proc_sequences + 6711, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_NO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_CIRCLE, utf8proc_sequences + 6713, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_NO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_CIRCLE, utf8proc_sequences + 5508, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_NO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_CIRCLE, utf8proc_sequences + 6715, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_NO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_CIRCLE, utf8proc_sequences + 5532, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_CIRCLE, utf8proc_sequences + 5632, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_CIRCLE, utf8proc_sequences + 5656, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_CIRCLE, utf8proc_sequences + 5654, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_CIRCLE, utf8proc_sequences + 5634, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_CIRCLE, utf8proc_sequences + 5818, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_CIRCLE, utf8proc_sequences + 5548, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_CIRCLE, utf8proc_sequences + 5628, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_CIRCLE, utf8proc_sequences + 6717, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_CIRCLE, utf8proc_sequences + 6719, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_CIRCLE, utf8proc_sequences + 6721, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_CIRCLE, utf8proc_sequences + 6723, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_CIRCLE, utf8proc_sequences + 6725, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_CIRCLE, utf8proc_sequences + 6727, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_CIRCLE, utf8proc_sequences + 6729, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_CIRCLE, utf8proc_sequences + 6731, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_CIRCLE, utf8proc_sequences + 6733, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_CIRCLE, utf8proc_sequences + 6735, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_CIRCLE, utf8proc_sequences + 5560, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_CIRCLE, utf8proc_sequences + 6737, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_CIRCLE, utf8proc_sequences + 6739, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_CIRCLE, utf8proc_sequences + 6741, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_CIRCLE, utf8proc_sequences + 6743, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_CIRCLE, utf8proc_sequences + 6745, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_CIRCLE, utf8proc_sequences + 6747, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_CIRCLE, utf8proc_sequences + 6749, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_CIRCLE, utf8proc_sequences + 6751, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_CIRCLE, utf8proc_sequences + 6298, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_CIRCLE, utf8proc_sequences + 6300, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_CIRCLE, utf8proc_sequences + 6302, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_CIRCLE, utf8proc_sequences + 6753, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_CIRCLE, utf8proc_sequences + 6755, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_CIRCLE, utf8proc_sequences + 6757, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_CIRCLE, utf8proc_sequences + 6759, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_CIRCLE, utf8proc_sequences + 6761, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_CIRCLE, utf8proc_sequences + 6763, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_CIRCLE, utf8proc_sequences + 6765, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_CIRCLE, utf8proc_sequences + 6767, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_CIRCLE, utf8proc_sequences + 6769, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_CIRCLE, utf8proc_sequences + 6771, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_NO, 0, UTF8PROC_BIDI_CLASS_ON, UTF8PROC_DECOMP_TYPE_CIRCLE, utf8proc_sequences + 6773, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_NO, 0, UTF8PROC_BIDI_CLASS_ON, UTF8PROC_DECOMP_TYPE_CIRCLE, utf8proc_sequences + 6776, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_NO, 0, UTF8PROC_BIDI_CLASS_ON, UTF8PROC_DECOMP_TYPE_CIRCLE, utf8proc_sequences + 6779, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_NO, 0, UTF8PROC_BIDI_CLASS_ON, UTF8PROC_DECOMP_TYPE_CIRCLE, utf8proc_sequences + 6782, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_NO, 0, UTF8PROC_BIDI_CLASS_ON, UTF8PROC_DECOMP_TYPE_CIRCLE, utf8proc_sequences + 6785, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_NO, 0, UTF8PROC_BIDI_CLASS_ON, UTF8PROC_DECOMP_TYPE_CIRCLE, utf8proc_sequences + 6788, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_NO, 0, UTF8PROC_BIDI_CLASS_ON, UTF8PROC_DECOMP_TYPE_CIRCLE, utf8proc_sequences + 6791, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_NO, 0, UTF8PROC_BIDI_CLASS_ON, UTF8PROC_DECOMP_TYPE_CIRCLE, utf8proc_sequences + 6794, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_NO, 0, UTF8PROC_BIDI_CLASS_ON, UTF8PROC_DECOMP_TYPE_CIRCLE, utf8proc_sequences + 6797, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_NO, 0, UTF8PROC_BIDI_CLASS_ON, UTF8PROC_DECOMP_TYPE_CIRCLE, utf8proc_sequences + 6800, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_NO, 0, UTF8PROC_BIDI_CLASS_ON, UTF8PROC_DECOMP_TYPE_CIRCLE, utf8proc_sequences + 6803, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_NO, 0, UTF8PROC_BIDI_CLASS_ON, UTF8PROC_DECOMP_TYPE_CIRCLE, utf8proc_sequences + 6806, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_NO, 0, UTF8PROC_BIDI_CLASS_ON, UTF8PROC_DECOMP_TYPE_CIRCLE, utf8proc_sequences + 6809, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_NO, 0, UTF8PROC_BIDI_CLASS_ON, UTF8PROC_DECOMP_TYPE_CIRCLE, utf8proc_sequences + 6812, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_NO, 0, UTF8PROC_BIDI_CLASS_ON, UTF8PROC_DECOMP_TYPE_CIRCLE, utf8proc_sequences + 6815, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 6818, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 6821, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 6824, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 6827, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 6830, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 6833, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 6836, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 6839, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 6842, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 6845, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 6849, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 6853, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_ON, UTF8PROC_DECOMP_TYPE_SQUARE, utf8proc_sequences + 6857, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_ON, UTF8PROC_DECOMP_TYPE_SQUARE, utf8proc_sequences + 6860, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_ON, UTF8PROC_DECOMP_TYPE_SQUARE, utf8proc_sequences + 6864, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_ON, UTF8PROC_DECOMP_TYPE_SQUARE, utf8proc_sequences + 6867, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_CIRCLE, utf8proc_sequences + 6871, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_CIRCLE, utf8proc_sequences + 6873, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_CIRCLE, utf8proc_sequences + 6875, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_CIRCLE, utf8proc_sequences + 6877, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_CIRCLE, utf8proc_sequences + 6879, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_CIRCLE, utf8proc_sequences + 6881, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_CIRCLE, utf8proc_sequences + 6883, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_CIRCLE, utf8proc_sequences + 6885, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_CIRCLE, utf8proc_sequences + 6887, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_CIRCLE, utf8proc_sequences + 6889, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_CIRCLE, utf8proc_sequences + 6891, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_CIRCLE, utf8proc_sequences + 6893, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_CIRCLE, utf8proc_sequences + 6895, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_CIRCLE, utf8proc_sequences + 6897, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_CIRCLE, utf8proc_sequences + 6899, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_CIRCLE, utf8proc_sequences + 6901, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_CIRCLE, utf8proc_sequences + 6903, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_CIRCLE, utf8proc_sequences + 6905, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_CIRCLE, utf8proc_sequences + 6907, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_CIRCLE, utf8proc_sequences + 6909, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_CIRCLE, utf8proc_sequences + 6911, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_CIRCLE, utf8proc_sequences + 6913, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_CIRCLE, utf8proc_sequences + 6915, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_CIRCLE, utf8proc_sequences + 6917, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_CIRCLE, utf8proc_sequences + 6919, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_CIRCLE, utf8proc_sequences + 6921, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_CIRCLE, utf8proc_sequences + 6923, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_CIRCLE, utf8proc_sequences + 6925, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_CIRCLE, utf8proc_sequences + 6927, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_CIRCLE, utf8proc_sequences + 6929, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_CIRCLE, utf8proc_sequences + 6931, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_CIRCLE, utf8proc_sequences + 6933, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_CIRCLE, utf8proc_sequences + 6935, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_CIRCLE, utf8proc_sequences + 6937, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_CIRCLE, utf8proc_sequences + 6939, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_CIRCLE, utf8proc_sequences + 6941, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_CIRCLE, utf8proc_sequences + 6943, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_CIRCLE, utf8proc_sequences + 6945, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_CIRCLE, utf8proc_sequences + 6947, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_CIRCLE, utf8proc_sequences + 6949, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_CIRCLE, utf8proc_sequences + 6951, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_CIRCLE, utf8proc_sequences + 6953, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_CIRCLE, utf8proc_sequences + 6955, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_CIRCLE, utf8proc_sequences + 6957, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_CIRCLE, utf8proc_sequences + 6959, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_CIRCLE, utf8proc_sequences + 6961, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_CIRCLE, utf8proc_sequences + 6963, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_SQUARE, utf8proc_sequences + 6965, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_SQUARE, utf8proc_sequences + 6970, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_SQUARE, utf8proc_sequences + 6975, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_SQUARE, utf8proc_sequences + 6980, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_SQUARE, utf8proc_sequences + 6984, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_SQUARE, utf8proc_sequences + 6989, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_SQUARE, utf8proc_sequences + 6993, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_SQUARE, utf8proc_sequences + 6997, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_SQUARE, utf8proc_sequences + 7003, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_SQUARE, utf8proc_sequences + 7008, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_SQUARE, utf8proc_sequences + 7012, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_SQUARE, utf8proc_sequences + 7016, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_SQUARE, utf8proc_sequences + 7020, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_SQUARE, utf8proc_sequences + 7025, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_SQUARE, utf8proc_sequences + 7030, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_SQUARE, utf8proc_sequences + 7034, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_SQUARE, utf8proc_sequences + 7038, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_SQUARE, utf8proc_sequences + 7041, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_SQUARE, utf8proc_sequences + 7045, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_SQUARE, utf8proc_sequences + 7050, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_SQUARE, utf8proc_sequences + 7055, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_SQUARE, utf8proc_sequences + 7058, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_SQUARE, utf8proc_sequences + 7064, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_SQUARE, utf8proc_sequences + 7071, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_SQUARE, utf8proc_sequences + 7077, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_SQUARE, utf8proc_sequences + 7081, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_SQUARE, utf8proc_sequences + 7087, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_SQUARE, utf8proc_sequences + 7093, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_SQUARE, utf8proc_sequences + 7098, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_SQUARE, utf8proc_sequences + 7102, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_SQUARE, utf8proc_sequences + 7106, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_SQUARE, utf8proc_sequences + 7110, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_SQUARE, utf8proc_sequences + 7115, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_SQUARE, utf8proc_sequences + 7121, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_SQUARE, utf8proc_sequences + 7126, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_SQUARE, utf8proc_sequences + 7130, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_SQUARE, utf8proc_sequences + 7134, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_SQUARE, utf8proc_sequences + 7138, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_SQUARE, utf8proc_sequences + 7141, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_SQUARE, utf8proc_sequences + 7144, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_SQUARE, utf8proc_sequences + 7147, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_SQUARE, utf8proc_sequences + 7150, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_SQUARE, utf8proc_sequences + 7154, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_SQUARE, utf8proc_sequences + 7158, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_SQUARE, utf8proc_sequences + 7164, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_SQUARE, utf8proc_sequences + 7168, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_SQUARE, utf8proc_sequences + 7173, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_SQUARE, utf8proc_sequences + 7179, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_SQUARE, utf8proc_sequences + 7183, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_SQUARE, utf8proc_sequences + 7186, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_SQUARE, utf8proc_sequences + 7189, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_SQUARE, utf8proc_sequences + 7195, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_SQUARE, utf8proc_sequences + 7200, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_SQUARE, utf8proc_sequences + 7206, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_SQUARE, utf8proc_sequences + 7210, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_SQUARE, utf8proc_sequences + 7216, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_SQUARE, utf8proc_sequences + 7219, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_SQUARE, utf8proc_sequences + 7223, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_SQUARE, utf8proc_sequences + 7227, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_SQUARE, utf8proc_sequences + 7231, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_SQUARE, utf8proc_sequences + 7235, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_SQUARE, utf8proc_sequences + 7239, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_SQUARE, utf8proc_sequences + 7244, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_SQUARE, utf8proc_sequences + 7248, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_SQUARE, utf8proc_sequences + 7251, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_SQUARE, utf8proc_sequences + 7255, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_SQUARE, utf8proc_sequences + 7259, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_SQUARE, utf8proc_sequences + 7263, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_SQUARE, utf8proc_sequences + 7268, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_SQUARE, utf8proc_sequences + 7272, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_SQUARE, utf8proc_sequences + 7276, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_SQUARE, utf8proc_sequences + 7280, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_SQUARE, utf8proc_sequences + 7286, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_SQUARE, utf8proc_sequences + 7291, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_SQUARE, utf8proc_sequences + 7294, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_SQUARE, utf8proc_sequences + 7300, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_SQUARE, utf8proc_sequences + 7303, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_SQUARE, utf8proc_sequences + 7308, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_SQUARE, utf8proc_sequences + 7313, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_SQUARE, utf8proc_sequences + 7317, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_SQUARE, utf8proc_sequences + 7321, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_SQUARE, utf8proc_sequences + 7325, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_SQUARE, utf8proc_sequences + 7330, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_SQUARE, utf8proc_sequences + 7333, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_SQUARE, utf8proc_sequences + 7337, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_SQUARE, utf8proc_sequences + 7342, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_SQUARE, utf8proc_sequences + 7345, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_SQUARE, utf8proc_sequences + 7351, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 7355, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 7358, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 7361, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 7364, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 7367, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 7370, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 7373, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 7376, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 7379, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 7382, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 7385, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 7389, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 7393, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 7397, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 7401, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 7405, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 7409, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 7413, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 7417, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 7421, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 7425, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 7429, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 7433, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 7437, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 7441, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_SQUARE, utf8proc_sequences + 7445, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_SQUARE, utf8proc_sequences + 7449, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_SQUARE, utf8proc_sequences + 7452, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_SQUARE, utf8proc_sequences + 7455, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_SQUARE, utf8proc_sequences + 7459, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_SQUARE, utf8proc_sequences + 7462, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_ON, UTF8PROC_DECOMP_TYPE_SQUARE, utf8proc_sequences + 7465, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_ON, UTF8PROC_DECOMP_TYPE_SQUARE, utf8proc_sequences + 7468, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_ON, UTF8PROC_DECOMP_TYPE_SQUARE, utf8proc_sequences + 7472, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_ON, UTF8PROC_DECOMP_TYPE_SQUARE, utf8proc_sequences + 7476, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_SQUARE, utf8proc_sequences + 7479, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_SQUARE, utf8proc_sequences + 7482, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_SQUARE, utf8proc_sequences + 7485, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_SQUARE, utf8proc_sequences + 7488, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_SQUARE, utf8proc_sequences + 7491, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_SQUARE, utf8proc_sequences + 7496, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_SQUARE, utf8proc_sequences + 7499, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_SQUARE, utf8proc_sequences + 7502, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_SQUARE, utf8proc_sequences + 7505, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_SQUARE, utf8proc_sequences + 7508, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_SQUARE, utf8proc_sequences + 7511, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_SQUARE, utf8proc_sequences + 7514, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_SQUARE, utf8proc_sequences + 7517, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_SQUARE, utf8proc_sequences + 7520, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_SQUARE, utf8proc_sequences + 7524, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_SQUARE, utf8proc_sequences + 7529, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_SQUARE, utf8proc_sequences + 7532, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_SQUARE, utf8proc_sequences + 7535, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_SQUARE, utf8proc_sequences + 7538, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_SQUARE, utf8proc_sequences + 7541, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_SQUARE, utf8proc_sequences + 7544, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_SQUARE, utf8proc_sequences + 7547, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_SQUARE, utf8proc_sequences + 7550, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_SQUARE, utf8proc_sequences + 7554, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_SQUARE, utf8proc_sequences + 7558, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_SQUARE, utf8proc_sequences + 7562, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_SQUARE, utf8proc_sequences + 7566, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_SQUARE, utf8proc_sequences + 7569, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_SQUARE, utf8proc_sequences + 7572, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_SQUARE, utf8proc_sequences + 7575, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_SQUARE, utf8proc_sequences + 7578, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_SQUARE, utf8proc_sequences + 7581, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_SQUARE, utf8proc_sequences + 7584, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_SQUARE, utf8proc_sequences + 7587, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_SQUARE, utf8proc_sequences + 7590, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_SQUARE, utf8proc_sequences + 7593, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_SQUARE, utf8proc_sequences + 7596, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_SQUARE, utf8proc_sequences + 7600, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_SQUARE, utf8proc_sequences + 7604, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_SQUARE, utf8proc_sequences + 7607, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_SQUARE, utf8proc_sequences + 7611, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_SQUARE, utf8proc_sequences + 7615, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_SQUARE, utf8proc_sequences + 7619, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_SQUARE, utf8proc_sequences + 7622, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_SQUARE, utf8proc_sequences + 7626, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_SQUARE, utf8proc_sequences + 7630, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_SQUARE, utf8proc_sequences + 7635, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_SQUARE, utf8proc_sequences + 7638, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_SQUARE, utf8proc_sequences + 7642, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_SQUARE, utf8proc_sequences + 7646, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_SQUARE, utf8proc_sequences + 7650, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_SQUARE, utf8proc_sequences + 7654, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_SQUARE, utf8proc_sequences + 7660, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_SQUARE, utf8proc_sequences + 7667, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_SQUARE, utf8proc_sequences + 7670, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_SQUARE, utf8proc_sequences + 7673, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_SQUARE, utf8proc_sequences + 7676, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_SQUARE, utf8proc_sequences + 7679, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_SQUARE, utf8proc_sequences + 7682, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_SQUARE, utf8proc_sequences + 7685, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_SQUARE, utf8proc_sequences + 7688, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_SQUARE, utf8proc_sequences + 7691, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_SQUARE, utf8proc_sequences + 7694, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_SQUARE, utf8proc_sequences + 7697, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_SQUARE, utf8proc_sequences + 7700, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_SQUARE, utf8proc_sequences + 7703, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_SQUARE, utf8proc_sequences + 7706, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_SQUARE, utf8proc_sequences + 7709, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_SQUARE, utf8proc_sequences + 7712, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_SQUARE, utf8proc_sequences + 7715, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_SQUARE, utf8proc_sequences + 7718, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_SQUARE, utf8proc_sequences + 7721, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_SQUARE, utf8proc_sequences + 7726, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_SQUARE, utf8proc_sequences + 7729, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_SQUARE, utf8proc_sequences + 7732, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_SQUARE, utf8proc_sequences + 7735, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_SQUARE, utf8proc_sequences + 7740, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_SQUARE, utf8proc_sequences + 7744, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_SQUARE, utf8proc_sequences + 7747, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_SQUARE, utf8proc_sequences + 7750, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_SQUARE, utf8proc_sequences + 7753, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_SQUARE, utf8proc_sequences + 7756, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_SQUARE, utf8proc_sequences + 7759, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_SQUARE, utf8proc_sequences + 7762, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_SQUARE, utf8proc_sequences + 7765, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_SQUARE, utf8proc_sequences + 7768, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_SQUARE, utf8proc_sequences + 7771, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_SQUARE, utf8proc_sequences + 7774, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_SQUARE, utf8proc_sequences + 7778, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_SQUARE, utf8proc_sequences + 7781, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_SQUARE, utf8proc_sequences + 7784, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_SQUARE, utf8proc_sequences + 7788, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_SQUARE, utf8proc_sequences + 7792, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_SQUARE, utf8proc_sequences + 7795, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_SQUARE, utf8proc_sequences + 7800, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_SQUARE, utf8proc_sequences + 7804, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_SQUARE, utf8proc_sequences + 7807, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_SQUARE, utf8proc_sequences + 7810, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_SQUARE, utf8proc_sequences + 7813, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_ON, UTF8PROC_DECOMP_TYPE_SQUARE, utf8proc_sequences + 7816, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_ON, UTF8PROC_DECOMP_TYPE_SQUARE, utf8proc_sequences + 7820, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 7824, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 7827, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 7830, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 7833, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 7836, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 7839, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 7842, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 7845, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 7848, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 7851, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 7855, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 7859, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 7863, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 7867, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 7871, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 7875, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 7879, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 7883, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 7887, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 7891, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 7895, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 7899, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 7903, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 7907, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 7911, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 7915, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 7919, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 7923, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 7927, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 7931, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 7935, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_ON, UTF8PROC_DECOMP_TYPE_SQUARE, utf8proc_sequences + 7939, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_CS, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, -1, -1, -1, -1, false, true, false, false, NULL},
+  {UTF8PROC_CATEGORY_CO, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 7943, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 7945, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 5802, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 7947, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 7949, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 7951, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 7953, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 5910, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 7955, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 5818, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 7957, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 7959, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 7961, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 7963, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 7965, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 7967, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 7969, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 7971, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 7973, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 7975, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 7977, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 7979, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 7981, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 7983, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 7985, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 7987, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 7989, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 7991, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 7993, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 7995, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 7997, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 7999, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 8001, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 8003, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 8005, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 8007, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 8009, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 8011, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 8013, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 8015, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 8017, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 8019, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 8021, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 8023, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 8025, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 8027, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 8029, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 8031, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 8033, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 8035, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 8037, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 5734, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 8039, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 8041, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 8043, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 8045, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 8047, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 8049, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 8051, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 8053, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 8055, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 8057, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 8059, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 5880, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 8061, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 8063, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 8065, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 8067, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 8069, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 8071, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 8073, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 8075, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 8077, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 8079, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 8081, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 8083, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 8085, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 8087, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 8089, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 8091, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 8093, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 8095, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 8097, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 8099, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 8101, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 8103, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 8105, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 8107, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 8109, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 8111, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 8113, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 8115, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 8117, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 8119, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 8121, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 8123, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 8125, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 8127, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 8129, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 8131, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 8133, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 8135, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 8137, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 8139, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 8141, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 8143, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 8145, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 8147, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 8149, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 8151, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 8153, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 5806, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 8155, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 8157, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 8159, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 8161, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 8163, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 8165, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 8167, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 8169, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 8171, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 8173, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 8175, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 8177, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 8179, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 8181, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 8183, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 5560, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 8185, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 8187, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 8189, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 8191, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 8193, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 8195, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 8197, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 8199, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 5522, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 8201, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 8203, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 8205, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 8207, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 8209, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 8211, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 8213, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 8215, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 8217, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 8219, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 8221, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 8223, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 8225, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 8227, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 8229, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 8231, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 8233, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 8235, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 8237, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 8239, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 8241, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 8243, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 8245, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 8247, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 8249, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 8251, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 8253, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 8255, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 8257, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 8259, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 8261, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 8263, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 8265, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 8267, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 8269, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 8271, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 8273, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 8275, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 8277, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 8279, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 8281, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 8283, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 8285, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 8287, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 8289, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 8291, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 8293, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 8295, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 8297, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 8299, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 8301, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 8303, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 8305, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 8307, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 5908, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 8309, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 8311, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 8313, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 8315, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 8317, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 8319, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 8321, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 8323, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 8325, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 8327, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 8329, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 8331, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 6711, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 8333, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 8335, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 8337, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 8339, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 8341, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 8343, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 8345, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 8347, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 8349, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 8351, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 8353, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 8355, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 8357, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 8359, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 8361, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 8363, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 8365, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 8367, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 8369, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 8371, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 8373, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 8375, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 5816, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 8377, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 8379, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 8381, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 8383, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 8385, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 8387, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 8389, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 8391, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 8393, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 8395, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 8397, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 8399, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 8401, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 5718, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 8403, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 8405, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 8407, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 8409, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 8411, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 8413, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 8415, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 8417, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 8419, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 8421, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 8423, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 8425, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 8427, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 8429, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 8431, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 8433, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 5772, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 8435, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 5778, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 8437, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 8439, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 8441, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 8443, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 8445, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 8447, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 8449, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 8451, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 8453, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 8455, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 8457, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 8459, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 8461, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 8463, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 5732, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 8465, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 8467, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 8469, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 8471, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 8473, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 8475, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 8477, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 8479, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 8481, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 8483, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 8485, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 8487, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 8489, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 8491, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 8493, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 8495, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 8497, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 8499, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 8501, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 8503, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 5574, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 8505, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 8507, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 8509, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 8511, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 8513, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 8515, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 8517, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 8519, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 8521, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 8523, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 8525, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 8527, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 8529, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 8531, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 8533, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 6721, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 8535, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 8537, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 8539, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 8541, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 6729, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 8543, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 8545, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 8547, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 8549, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 8551, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 8553, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 8555, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 8557, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 8559, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 8561, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 8563, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 8565, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 8567, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 8569, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 8571, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 8573, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 8575, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 8577, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 8579, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 8581, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 8583, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 8585, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 8587, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 8589, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 8591, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 8593, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 8595, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 8597, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 8599, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 8601, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 8603, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 8605, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 8607, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 8609, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 8611, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 8613, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 8615, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 8617, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 8619, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 8621, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 8623, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 8625, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 8627, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 8629, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 8631, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 8633, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 8635, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 8637, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 8639, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 8641, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 8643, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 8645, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 8647, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 5640, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 8649, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 8651, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 8653, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 8655, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 8657, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 8659, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 8661, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 8663, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 8665, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 8667, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 8669, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 8671, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 8673, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 8675, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 8677, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 8679, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 8681, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 8683, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 8685, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 8687, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 8689, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 8691, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 8693, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 8695, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 8697, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 8699, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 8701, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 8703, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 8705, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 8707, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 8709, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 8711, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 8713, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 8715, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 8717, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 8719, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 8721, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 8723, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 8725, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 8727, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 8729, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 8731, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 8733, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 8735, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 8737, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 8739, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 8741, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 8743, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 8745, false, -1, -1, -1, -1, -1, false, false, false, false, utf8proc_sequences + 8745},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 8748, false, -1, -1, -1, -1, -1, false, false, false, false, utf8proc_sequences + 8748},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 8751, false, -1, -1, -1, -1, -1, false, false, false, false, utf8proc_sequences + 8751},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 8754, false, -1, -1, -1, -1, -1, false, false, false, false, utf8proc_sequences + 8754},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 8758, false, -1, -1, -1, -1, -1, false, false, false, false, utf8proc_sequences + 8758},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 8762, false, -1, -1, -1, -1, -1, false, false, false, false, utf8proc_sequences + 8765},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 8765, false, -1, -1, -1, -1, -1, false, false, false, false, utf8proc_sequences + 8765},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 8768, false, -1, -1, -1, -1, -1, false, false, false, false, utf8proc_sequences + 8768},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 8771, false, -1, -1, -1, -1, -1, false, false, false, false, utf8proc_sequences + 8771},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 8774, false, -1, -1, -1, -1, -1, false, false, false, false, utf8proc_sequences + 8774},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 8777, false, -1, -1, -1, -1, -1, false, false, false, false, utf8proc_sequences + 8777},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 8780, false, -1, -1, -1, -1, -1, false, false, false, false, utf8proc_sequences + 8780},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_R, 0, utf8proc_sequences + 8783, false, -1, -1, -1, -1, -1, true, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_MN, 26, UTF8PROC_BIDI_CLASS_NSM, 0, NULL, false, -1, -1, -1, -1, -1, false, false, false, true, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_R, 0, utf8proc_sequences + 8786, false, -1, -1, -1, -1, -1, true, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_R, UTF8PROC_DECOMP_TYPE_FONT, utf8proc_sequences + 8789, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_R, UTF8PROC_DECOMP_TYPE_FONT, utf8proc_sequences + 4575, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_R, UTF8PROC_DECOMP_TYPE_FONT, utf8proc_sequences + 4581, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_R, UTF8PROC_DECOMP_TYPE_FONT, utf8proc_sequences + 8791, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_R, UTF8PROC_DECOMP_TYPE_FONT, utf8proc_sequences + 8793, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_R, UTF8PROC_DECOMP_TYPE_FONT, utf8proc_sequences + 8795, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_R, UTF8PROC_DECOMP_TYPE_FONT, utf8proc_sequences + 8797, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_R, UTF8PROC_DECOMP_TYPE_FONT, utf8proc_sequences + 8799, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_R, UTF8PROC_DECOMP_TYPE_FONT, utf8proc_sequences + 8801, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SM, 0, UTF8PROC_BIDI_CLASS_ES, UTF8PROC_DECOMP_TYPE_FONT, utf8proc_sequences + 4511, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_R, 0, utf8proc_sequences + 8803, false, -1, -1, -1, -1, -1, true, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_R, 0, utf8proc_sequences + 8806, false, -1, -1, -1, -1, -1, true, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_R, 0, utf8proc_sequences + 8809, false, -1, -1, -1, -1, -1, true, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_R, 0, utf8proc_sequences + 8812, false, -1, -1, -1, -1, -1, true, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_R, 0, utf8proc_sequences + 8815, false, -1, -1, -1, -1, -1, true, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_R, 0, utf8proc_sequences + 8818, false, -1, -1, -1, -1, -1, true, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_R, 0, utf8proc_sequences + 8821, false, -1, -1, -1, -1, -1, true, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_R, 0, utf8proc_sequences + 8824, false, -1, -1, -1, -1, -1, true, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_R, 0, utf8proc_sequences + 8827, false, -1, -1, -1, -1, -1, true, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_R, 0, utf8proc_sequences + 8830, false, -1, -1, -1, -1, -1, true, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_R, 0, utf8proc_sequences + 8833, false, -1, -1, -1, -1, -1, true, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_R, 0, utf8proc_sequences + 8836, false, -1, -1, -1, -1, -1, true, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_R, 0, utf8proc_sequences + 8839, false, -1, -1, -1, -1, -1, true, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_R, 0, utf8proc_sequences + 8842, false, -1, -1, -1, -1, -1, true, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_R, 0, utf8proc_sequences + 8845, false, -1, -1, -1, -1, -1, true, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_R, 0, utf8proc_sequences + 8848, false, -1, -1, -1, -1, -1, true, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_R, 0, utf8proc_sequences + 8851, false, -1, -1, -1, -1, -1, true, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_R, 0, utf8proc_sequences + 8854, false, -1, -1, -1, -1, -1, true, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_R, 0, utf8proc_sequences + 8857, false, -1, -1, -1, -1, -1, true, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_R, 0, utf8proc_sequences + 8860, false, -1, -1, -1, -1, -1, true, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_R, 0, utf8proc_sequences + 8863, false, -1, -1, -1, -1, -1, true, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_R, 0, utf8proc_sequences + 8866, false, -1, -1, -1, -1, -1, true, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_R, 0, utf8proc_sequences + 8869, false, -1, -1, -1, -1, -1, true, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_R, 0, utf8proc_sequences + 8872, false, -1, -1, -1, -1, -1, true, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_R, 0, utf8proc_sequences + 8875, false, -1, -1, -1, -1, -1, true, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_R, 0, utf8proc_sequences + 8878, false, -1, -1, -1, -1, -1, true, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_R, 0, utf8proc_sequences + 8881, false, -1, -1, -1, -1, -1, true, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_R, 0, utf8proc_sequences + 8884, false, -1, -1, -1, -1, -1, true, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_R, 0, utf8proc_sequences + 8887, false, -1, -1, -1, -1, -1, true, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_R, 0, utf8proc_sequences + 8890, false, -1, -1, -1, -1, -1, true, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_R, 0, utf8proc_sequences + 8893, false, -1, -1, -1, -1, -1, true, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_R, 0, utf8proc_sequences + 8896, false, -1, -1, -1, -1, -1, true, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_R, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 8899, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_ISOLATED, utf8proc_sequences + 8902, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_FINAL, utf8proc_sequences + 8902, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_ISOLATED, utf8proc_sequences + 8904, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_FINAL, utf8proc_sequences + 8904, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_INITIAL, utf8proc_sequences + 8904, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_MEDIAL, utf8proc_sequences + 8904, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_ISOLATED, utf8proc_sequences + 8906, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_FINAL, utf8proc_sequences + 8906, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_INITIAL, utf8proc_sequences + 8906, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_MEDIAL, utf8proc_sequences + 8906, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_ISOLATED, utf8proc_sequences + 8908, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_FINAL, utf8proc_sequences + 8908, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_INITIAL, utf8proc_sequences + 8908, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_MEDIAL, utf8proc_sequences + 8908, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_ISOLATED, utf8proc_sequences + 8910, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_FINAL, utf8proc_sequences + 8910, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_INITIAL, utf8proc_sequences + 8910, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_MEDIAL, utf8proc_sequences + 8910, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_ISOLATED, utf8proc_sequences + 8912, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_FINAL, utf8proc_sequences + 8912, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_INITIAL, utf8proc_sequences + 8912, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_MEDIAL, utf8proc_sequences + 8912, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_ISOLATED, utf8proc_sequences + 8914, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_FINAL, utf8proc_sequences + 8914, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_INITIAL, utf8proc_sequences + 8914, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_MEDIAL, utf8proc_sequences + 8914, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_ISOLATED, utf8proc_sequences + 8916, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_FINAL, utf8proc_sequences + 8916, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_INITIAL, utf8proc_sequences + 8916, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_MEDIAL, utf8proc_sequences + 8916, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_ISOLATED, utf8proc_sequences + 8918, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_FINAL, utf8proc_sequences + 8918, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_INITIAL, utf8proc_sequences + 8918, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_MEDIAL, utf8proc_sequences + 8918, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_ISOLATED, utf8proc_sequences + 8920, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_FINAL, utf8proc_sequences + 8920, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_INITIAL, utf8proc_sequences + 8920, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_MEDIAL, utf8proc_sequences + 8920, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_ISOLATED, utf8proc_sequences + 8922, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_FINAL, utf8proc_sequences + 8922, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_INITIAL, utf8proc_sequences + 8922, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_MEDIAL, utf8proc_sequences + 8922, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_ISOLATED, utf8proc_sequences + 8924, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_FINAL, utf8proc_sequences + 8924, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_INITIAL, utf8proc_sequences + 8924, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_MEDIAL, utf8proc_sequences + 8924, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_ISOLATED, utf8proc_sequences + 8926, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_FINAL, utf8proc_sequences + 8926, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_INITIAL, utf8proc_sequences + 8926, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_MEDIAL, utf8proc_sequences + 8926, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_ISOLATED, utf8proc_sequences + 8928, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_FINAL, utf8proc_sequences + 8928, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_ISOLATED, utf8proc_sequences + 8930, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_FINAL, utf8proc_sequences + 8930, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_ISOLATED, utf8proc_sequences + 8932, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_FINAL, utf8proc_sequences + 8932, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_ISOLATED, utf8proc_sequences + 8934, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_FINAL, utf8proc_sequences + 8934, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_ISOLATED, utf8proc_sequences + 8936, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_FINAL, utf8proc_sequences + 8936, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_ISOLATED, utf8proc_sequences + 8938, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_FINAL, utf8proc_sequences + 8938, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_ISOLATED, utf8proc_sequences + 8940, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_FINAL, utf8proc_sequences + 8940, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_INITIAL, utf8proc_sequences + 8940, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_MEDIAL, utf8proc_sequences + 8940, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_ISOLATED, utf8proc_sequences + 8942, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_FINAL, utf8proc_sequences + 8942, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_INITIAL, utf8proc_sequences + 8942, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_MEDIAL, utf8proc_sequences + 8942, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_ISOLATED, utf8proc_sequences + 8944, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_FINAL, utf8proc_sequences + 8944, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_INITIAL, utf8proc_sequences + 8944, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_MEDIAL, utf8proc_sequences + 8944, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_ISOLATED, utf8proc_sequences + 8946, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_FINAL, utf8proc_sequences + 8946, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_INITIAL, utf8proc_sequences + 8946, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_MEDIAL, utf8proc_sequences + 8946, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_ISOLATED, utf8proc_sequences + 8948, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_FINAL, utf8proc_sequences + 8948, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_ISOLATED, utf8proc_sequences + 8950, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_FINAL, utf8proc_sequences + 8950, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_INITIAL, utf8proc_sequences + 8950, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_MEDIAL, utf8proc_sequences + 8950, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_ISOLATED, utf8proc_sequences + 8952, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_FINAL, utf8proc_sequences + 8952, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_ISOLATED, utf8proc_sequences + 8954, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_FINAL, utf8proc_sequences + 8954, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_INITIAL, utf8proc_sequences + 8954, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_MEDIAL, utf8proc_sequences + 8954, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_ISOLATED, utf8proc_sequences + 8956, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_FINAL, utf8proc_sequences + 8956, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_INITIAL, utf8proc_sequences + 8956, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_MEDIAL, utf8proc_sequences + 8956, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_ISOLATED, utf8proc_sequences + 8958, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_FINAL, utf8proc_sequences + 8958, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_ISOLATED, utf8proc_sequences + 8960, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_FINAL, utf8proc_sequences + 8960, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_ISOLATED, utf8proc_sequences + 8962, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_FINAL, utf8proc_sequences + 8962, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_INITIAL, utf8proc_sequences + 8962, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_MEDIAL, utf8proc_sequences + 8962, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_ISOLATED, utf8proc_sequences + 8964, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_FINAL, utf8proc_sequences + 8964, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_ISOLATED, utf8proc_sequences + 8966, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_FINAL, utf8proc_sequences + 8966, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_ISOLATED, utf8proc_sequences + 8968, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_FINAL, utf8proc_sequences + 8968, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_ISOLATED, utf8proc_sequences + 8970, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_ISOLATED, utf8proc_sequences + 8972, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_FINAL, utf8proc_sequences + 8972, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_ISOLATED, utf8proc_sequences + 8974, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_FINAL, utf8proc_sequences + 8974, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_ISOLATED, utf8proc_sequences + 8976, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_FINAL, utf8proc_sequences + 8976, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_ISOLATED, utf8proc_sequences + 8978, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_FINAL, utf8proc_sequences + 8978, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_INITIAL, utf8proc_sequences + 8978, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_MEDIAL, utf8proc_sequences + 8978, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_INITIAL, utf8proc_sequences + 8980, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_MEDIAL, utf8proc_sequences + 8980, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_ISOLATED, utf8proc_sequences + 8982, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_FINAL, utf8proc_sequences + 8982, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_ISOLATED, utf8proc_sequences + 8985, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_FINAL, utf8proc_sequences + 8985, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_ISOLATED, utf8proc_sequences + 8988, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_FINAL, utf8proc_sequences + 8988, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_ISOLATED, utf8proc_sequences + 8991, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_FINAL, utf8proc_sequences + 8991, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_ISOLATED, utf8proc_sequences + 8994, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_FINAL, utf8proc_sequences + 8994, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_ISOLATED, utf8proc_sequences + 8997, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_FINAL, utf8proc_sequences + 8997, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_ISOLATED, utf8proc_sequences + 9000, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_FINAL, utf8proc_sequences + 9000, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_INITIAL, utf8proc_sequences + 9000, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_ISOLATED, utf8proc_sequences + 9003, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_FINAL, utf8proc_sequences + 9003, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_INITIAL, utf8proc_sequences + 9003, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_ISOLATED, utf8proc_sequences + 9006, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_FINAL, utf8proc_sequences + 9006, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_INITIAL, utf8proc_sequences + 9006, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_MEDIAL, utf8proc_sequences + 9006, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_ISOLATED, utf8proc_sequences + 9008, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_ISOLATED, utf8proc_sequences + 9011, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_ISOLATED, utf8proc_sequences + 9014, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_ISOLATED, utf8proc_sequences + 9017, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_ISOLATED, utf8proc_sequences + 9020, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_ISOLATED, utf8proc_sequences + 9023, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_ISOLATED, utf8proc_sequences + 9026, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_ISOLATED, utf8proc_sequences + 9029, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_ISOLATED, utf8proc_sequences + 9032, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_ISOLATED, utf8proc_sequences + 9035, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_ISOLATED, utf8proc_sequences + 9038, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_ISOLATED, utf8proc_sequences + 9041, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_ISOLATED, utf8proc_sequences + 9044, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_ISOLATED, utf8proc_sequences + 9047, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_ISOLATED, utf8proc_sequences + 9050, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_ISOLATED, utf8proc_sequences + 9053, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_ISOLATED, utf8proc_sequences + 9056, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_ISOLATED, utf8proc_sequences + 9059, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_ISOLATED, utf8proc_sequences + 9062, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_ISOLATED, utf8proc_sequences + 9065, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_ISOLATED, utf8proc_sequences + 9068, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_ISOLATED, utf8proc_sequences + 9071, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_ISOLATED, utf8proc_sequences + 9074, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_ISOLATED, utf8proc_sequences + 9077, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_ISOLATED, utf8proc_sequences + 9080, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_ISOLATED, utf8proc_sequences + 9083, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_ISOLATED, utf8proc_sequences + 9086, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_ISOLATED, utf8proc_sequences + 9089, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_ISOLATED, utf8proc_sequences + 9092, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_ISOLATED, utf8proc_sequences + 9095, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_ISOLATED, utf8proc_sequences + 9098, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_ISOLATED, utf8proc_sequences + 9101, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_ISOLATED, utf8proc_sequences + 9104, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_ISOLATED, utf8proc_sequences + 9107, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_ISOLATED, utf8proc_sequences + 9110, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_ISOLATED, utf8proc_sequences + 9113, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_ISOLATED, utf8proc_sequences + 9116, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_ISOLATED, utf8proc_sequences + 9119, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_ISOLATED, utf8proc_sequences + 9122, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_ISOLATED, utf8proc_sequences + 9125, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_ISOLATED, utf8proc_sequences + 9128, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_ISOLATED, utf8proc_sequences + 9131, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_ISOLATED, utf8proc_sequences + 9134, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_ISOLATED, utf8proc_sequences + 9137, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_ISOLATED, utf8proc_sequences + 9140, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_ISOLATED, utf8proc_sequences + 9143, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_ISOLATED, utf8proc_sequences + 9146, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_ISOLATED, utf8proc_sequences + 9149, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_ISOLATED, utf8proc_sequences + 9152, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_ISOLATED, utf8proc_sequences + 9155, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_ISOLATED, utf8proc_sequences + 9158, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_ISOLATED, utf8proc_sequences + 9161, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_ISOLATED, utf8proc_sequences + 9164, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_ISOLATED, utf8proc_sequences + 9167, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_ISOLATED, utf8proc_sequences + 9170, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_ISOLATED, utf8proc_sequences + 9173, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_ISOLATED, utf8proc_sequences + 9176, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_ISOLATED, utf8proc_sequences + 9179, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_ISOLATED, utf8proc_sequences + 9182, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_ISOLATED, utf8proc_sequences + 9185, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_ISOLATED, utf8proc_sequences + 9188, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_ISOLATED, utf8proc_sequences + 9191, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_ISOLATED, utf8proc_sequences + 9194, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_ISOLATED, utf8proc_sequences + 9197, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_ISOLATED, utf8proc_sequences + 9200, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_ISOLATED, utf8proc_sequences + 9203, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_ISOLATED, utf8proc_sequences + 9206, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_ISOLATED, utf8proc_sequences + 9209, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_ISOLATED, utf8proc_sequences + 9212, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_ISOLATED, utf8proc_sequences + 9215, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_ISOLATED, utf8proc_sequences + 9218, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_ISOLATED, utf8proc_sequences + 9221, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_ISOLATED, utf8proc_sequences + 9224, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_ISOLATED, utf8proc_sequences + 9227, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_ISOLATED, utf8proc_sequences + 9230, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_ISOLATED, utf8proc_sequences + 9233, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_ISOLATED, utf8proc_sequences + 9236, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_ISOLATED, utf8proc_sequences + 9239, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_ISOLATED, utf8proc_sequences + 9242, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_ISOLATED, utf8proc_sequences + 9245, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_ISOLATED, utf8proc_sequences + 9248, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_ISOLATED, utf8proc_sequences + 9251, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_ISOLATED, utf8proc_sequences + 9254, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_ISOLATED, utf8proc_sequences + 9257, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_ISOLATED, utf8proc_sequences + 9260, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_ISOLATED, utf8proc_sequences + 9263, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_ISOLATED, utf8proc_sequences + 9266, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_ISOLATED, utf8proc_sequences + 9269, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_ISOLATED, utf8proc_sequences + 9272, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_ISOLATED, utf8proc_sequences + 9275, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_ISOLATED, utf8proc_sequences + 9278, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_ISOLATED, utf8proc_sequences + 9281, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_ISOLATED, utf8proc_sequences + 9284, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_ISOLATED, utf8proc_sequences + 9287, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_ISOLATED, utf8proc_sequences + 9291, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_ISOLATED, utf8proc_sequences + 9295, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_ISOLATED, utf8proc_sequences + 9299, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_ISOLATED, utf8proc_sequences + 9303, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_ISOLATED, utf8proc_sequences + 9307, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_FINAL, utf8proc_sequences + 9311, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_FINAL, utf8proc_sequences + 9314, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_FINAL, utf8proc_sequences + 9014, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_FINAL, utf8proc_sequences + 9317, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_FINAL, utf8proc_sequences + 9017, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_FINAL, utf8proc_sequences + 9320, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_FINAL, utf8proc_sequences + 9323, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_FINAL, utf8proc_sequences + 9029, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_FINAL, utf8proc_sequences + 9326, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_FINAL, utf8proc_sequences + 9032, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_FINAL, utf8proc_sequences + 9035, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_FINAL, utf8proc_sequences + 9329, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_FINAL, utf8proc_sequences + 9332, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_FINAL, utf8proc_sequences + 9047, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_FINAL, utf8proc_sequences + 9335, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_FINAL, utf8proc_sequences + 9050, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_FINAL, utf8proc_sequences + 9053, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_FINAL, utf8proc_sequences + 9338, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_FINAL, utf8proc_sequences + 9341, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_FINAL, utf8proc_sequences + 9059, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_FINAL, utf8proc_sequences + 9344, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_FINAL, utf8proc_sequences + 9062, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_FINAL, utf8proc_sequences + 9065, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_FINAL, utf8proc_sequences + 9152, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_FINAL, utf8proc_sequences + 9155, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_FINAL, utf8proc_sequences + 9164, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_FINAL, utf8proc_sequences + 9167, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_FINAL, utf8proc_sequences + 9170, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_FINAL, utf8proc_sequences + 9182, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_FINAL, utf8proc_sequences + 9185, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_FINAL, utf8proc_sequences + 9188, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_FINAL, utf8proc_sequences + 9191, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_FINAL, utf8proc_sequences + 9203, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_FINAL, utf8proc_sequences + 9206, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_FINAL, utf8proc_sequences + 9209, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_FINAL, utf8proc_sequences + 9347, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_FINAL, utf8proc_sequences + 9221, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_FINAL, utf8proc_sequences + 9350, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_FINAL, utf8proc_sequences + 9353, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_FINAL, utf8proc_sequences + 9239, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_FINAL, utf8proc_sequences + 9356, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_FINAL, utf8proc_sequences + 9242, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_FINAL, utf8proc_sequences + 9245, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_FINAL, utf8proc_sequences + 9284, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_FINAL, utf8proc_sequences + 9359, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_FINAL, utf8proc_sequences + 9362, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_FINAL, utf8proc_sequences + 9269, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_FINAL, utf8proc_sequences + 9365, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_FINAL, utf8proc_sequences + 9272, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_FINAL, utf8proc_sequences + 9275, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_INITIAL, utf8proc_sequences + 9008, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_INITIAL, utf8proc_sequences + 9011, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_INITIAL, utf8proc_sequences + 9368, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_INITIAL, utf8proc_sequences + 9014, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_INITIAL, utf8proc_sequences + 9371, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_INITIAL, utf8proc_sequences + 9020, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_INITIAL, utf8proc_sequences + 9023, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_INITIAL, utf8proc_sequences + 9026, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_INITIAL, utf8proc_sequences + 9029, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_INITIAL, utf8proc_sequences + 9374, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_INITIAL, utf8proc_sequences + 9038, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_INITIAL, utf8proc_sequences + 9041, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_INITIAL, utf8proc_sequences + 9044, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_INITIAL, utf8proc_sequences + 9047, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_INITIAL, utf8proc_sequences + 9377, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_INITIAL, utf8proc_sequences + 9059, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_INITIAL, utf8proc_sequences + 9068, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_INITIAL, utf8proc_sequences + 9071, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_INITIAL, utf8proc_sequences + 9074, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_INITIAL, utf8proc_sequences + 9077, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_INITIAL, utf8proc_sequences + 9080, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_INITIAL, utf8proc_sequences + 9086, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_INITIAL, utf8proc_sequences + 9089, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_INITIAL, utf8proc_sequences + 9092, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_INITIAL, utf8proc_sequences + 9095, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_INITIAL, utf8proc_sequences + 9098, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_INITIAL, utf8proc_sequences + 9101, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_INITIAL, utf8proc_sequences + 9380, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_INITIAL, utf8proc_sequences + 9104, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_INITIAL, utf8proc_sequences + 9107, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_INITIAL, utf8proc_sequences + 9110, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_INITIAL, utf8proc_sequences + 9113, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_INITIAL, utf8proc_sequences + 9116, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_INITIAL, utf8proc_sequences + 9119, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_INITIAL, utf8proc_sequences + 9125, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_INITIAL, utf8proc_sequences + 9128, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_INITIAL, utf8proc_sequences + 9131, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_INITIAL, utf8proc_sequences + 9134, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_INITIAL, utf8proc_sequences + 9137, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_INITIAL, utf8proc_sequences + 9140, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_INITIAL, utf8proc_sequences + 9143, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_INITIAL, utf8proc_sequences + 9146, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_INITIAL, utf8proc_sequences + 9149, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_INITIAL, utf8proc_sequences + 9158, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_INITIAL, utf8proc_sequences + 9161, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_INITIAL, utf8proc_sequences + 9173, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_INITIAL, utf8proc_sequences + 9176, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_INITIAL, utf8proc_sequences + 9179, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_INITIAL, utf8proc_sequences + 9182, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_INITIAL, utf8proc_sequences + 9185, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_INITIAL, utf8proc_sequences + 9194, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_INITIAL, utf8proc_sequences + 9197, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_INITIAL, utf8proc_sequences + 9200, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_INITIAL, utf8proc_sequences + 9203, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_INITIAL, utf8proc_sequences + 9383, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_INITIAL, utf8proc_sequences + 9212, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_INITIAL, utf8proc_sequences + 9215, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_INITIAL, utf8proc_sequences + 9218, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_INITIAL, utf8proc_sequences + 9221, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_INITIAL, utf8proc_sequences + 9230, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_INITIAL, utf8proc_sequences + 9233, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_INITIAL, utf8proc_sequences + 9236, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_INITIAL, utf8proc_sequences + 9239, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_INITIAL, utf8proc_sequences + 9386, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_INITIAL, utf8proc_sequences + 9248, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_INITIAL, utf8proc_sequences + 9251, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_INITIAL, utf8proc_sequences + 9389, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_INITIAL, utf8proc_sequences + 9260, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_INITIAL, utf8proc_sequences + 9263, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_INITIAL, utf8proc_sequences + 9266, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_INITIAL, utf8proc_sequences + 9269, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_INITIAL, utf8proc_sequences + 9392, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_MEDIAL, utf8proc_sequences + 9014, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_MEDIAL, utf8proc_sequences + 9371, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_MEDIAL, utf8proc_sequences + 9029, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_MEDIAL, utf8proc_sequences + 9374, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_MEDIAL, utf8proc_sequences + 9047, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_MEDIAL, utf8proc_sequences + 9377, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_MEDIAL, utf8proc_sequences + 9059, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_MEDIAL, utf8proc_sequences + 9395, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_MEDIAL, utf8proc_sequences + 9098, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_MEDIAL, utf8proc_sequences + 9398, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_MEDIAL, utf8proc_sequences + 9401, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_MEDIAL, utf8proc_sequences + 9404, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_MEDIAL, utf8proc_sequences + 9182, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_MEDIAL, utf8proc_sequences + 9185, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_MEDIAL, utf8proc_sequences + 9203, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_MEDIAL, utf8proc_sequences + 9239, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_MEDIAL, utf8proc_sequences + 9386, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_MEDIAL, utf8proc_sequences + 9269, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_MEDIAL, utf8proc_sequences + 9392, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_MEDIAL, utf8proc_sequences + 9407, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_MEDIAL, utf8proc_sequences + 9411, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_MEDIAL, utf8proc_sequences + 9415, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_ISOLATED, utf8proc_sequences + 9419, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_ISOLATED, utf8proc_sequences + 9422, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_ISOLATED, utf8proc_sequences + 9425, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_ISOLATED, utf8proc_sequences + 9428, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_ISOLATED, utf8proc_sequences + 9431, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_ISOLATED, utf8proc_sequences + 9434, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_ISOLATED, utf8proc_sequences + 9437, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_ISOLATED, utf8proc_sequences + 9440, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_ISOLATED, utf8proc_sequences + 9443, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_ISOLATED, utf8proc_sequences + 9446, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_ISOLATED, utf8proc_sequences + 9449, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_ISOLATED, utf8proc_sequences + 9452, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_ISOLATED, utf8proc_sequences + 9455, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_ISOLATED, utf8proc_sequences + 9458, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_ISOLATED, utf8proc_sequences + 9461, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_ISOLATED, utf8proc_sequences + 9464, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_ISOLATED, utf8proc_sequences + 9467, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_ISOLATED, utf8proc_sequences + 9470, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_ISOLATED, utf8proc_sequences + 9473, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_ISOLATED, utf8proc_sequences + 9476, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_ISOLATED, utf8proc_sequences + 9479, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_ISOLATED, utf8proc_sequences + 9482, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_ISOLATED, utf8proc_sequences + 9485, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_ISOLATED, utf8proc_sequences + 9401, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_ISOLATED, utf8proc_sequences + 9488, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_ISOLATED, utf8proc_sequences + 9491, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_ISOLATED, utf8proc_sequences + 9494, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_ISOLATED, utf8proc_sequences + 9497, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_FINAL, utf8proc_sequences + 9419, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_FINAL, utf8proc_sequences + 9422, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_FINAL, utf8proc_sequences + 9425, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_FINAL, utf8proc_sequences + 9428, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_FINAL, utf8proc_sequences + 9431, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_FINAL, utf8proc_sequences + 9434, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_FINAL, utf8proc_sequences + 9437, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_FINAL, utf8proc_sequences + 9440, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_FINAL, utf8proc_sequences + 9443, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_FINAL, utf8proc_sequences + 9446, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_FINAL, utf8proc_sequences + 9449, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_FINAL, utf8proc_sequences + 9452, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_FINAL, utf8proc_sequences + 9455, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_FINAL, utf8proc_sequences + 9458, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_FINAL, utf8proc_sequences + 9461, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_FINAL, utf8proc_sequences + 9464, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_FINAL, utf8proc_sequences + 9467, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_FINAL, utf8proc_sequences + 9470, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_FINAL, utf8proc_sequences + 9473, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_FINAL, utf8proc_sequences + 9476, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_FINAL, utf8proc_sequences + 9479, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_FINAL, utf8proc_sequences + 9482, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_FINAL, utf8proc_sequences + 9485, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_FINAL, utf8proc_sequences + 9401, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_FINAL, utf8proc_sequences + 9488, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_FINAL, utf8proc_sequences + 9491, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_FINAL, utf8proc_sequences + 9494, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_FINAL, utf8proc_sequences + 9497, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_INITIAL, utf8proc_sequences + 9479, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_INITIAL, utf8proc_sequences + 9482, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_INITIAL, utf8proc_sequences + 9485, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_INITIAL, utf8proc_sequences + 9401, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_INITIAL, utf8proc_sequences + 9398, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_INITIAL, utf8proc_sequences + 9404, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_INITIAL, utf8proc_sequences + 9122, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_MEDIAL, utf8proc_sequences + 9089, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_MEDIAL, utf8proc_sequences + 9092, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_MEDIAL, utf8proc_sequences + 9095, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_MEDIAL, utf8proc_sequences + 9479, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_MEDIAL, utf8proc_sequences + 9482, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_MEDIAL, utf8proc_sequences + 9485, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_MEDIAL, utf8proc_sequences + 9122, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_MEDIAL, utf8proc_sequences + 9125, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_FINAL, utf8proc_sequences + 9500, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_ISOLATED, utf8proc_sequences + 9500, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_PS, 0, UTF8PROC_BIDI_CLASS_ON, 0, NULL, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_PE, 0, UTF8PROC_BIDI_CLASS_ON, 0, NULL, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_INITIAL, utf8proc_sequences + 9503, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_FINAL, utf8proc_sequences + 9507, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_INITIAL, utf8proc_sequences + 9507, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_INITIAL, utf8proc_sequences + 9511, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_INITIAL, utf8proc_sequences + 9515, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_INITIAL, utf8proc_sequences + 9519, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_INITIAL, utf8proc_sequences + 9523, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_INITIAL, utf8proc_sequences + 9527, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_FINAL, utf8proc_sequences + 9531, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_INITIAL, utf8proc_sequences + 9531, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_FINAL, utf8proc_sequences + 9535, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_FINAL, utf8proc_sequences + 9539, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_INITIAL, utf8proc_sequences + 9543, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_INITIAL, utf8proc_sequences + 9547, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_FINAL, utf8proc_sequences + 9551, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_FINAL, utf8proc_sequences + 9555, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_INITIAL, utf8proc_sequences + 9555, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_INITIAL, utf8proc_sequences + 9559, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_FINAL, utf8proc_sequences + 9563, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_INITIAL, utf8proc_sequences + 9563, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_FINAL, utf8proc_sequences + 9567, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_INITIAL, utf8proc_sequences + 9567, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_FINAL, utf8proc_sequences + 9571, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_FINAL, utf8proc_sequences + 9575, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_INITIAL, utf8proc_sequences + 9575, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_FINAL, utf8proc_sequences + 9579, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_FINAL, utf8proc_sequences + 9583, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_INITIAL, utf8proc_sequences + 9583, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_FINAL, utf8proc_sequences + 9587, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_INITIAL, utf8proc_sequences + 9587, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_FINAL, utf8proc_sequences + 9591, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_FINAL, utf8proc_sequences + 9595, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_INITIAL, utf8proc_sequences + 9595, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_FINAL, utf8proc_sequences + 9599, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_INITIAL, utf8proc_sequences + 9599, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_INITIAL, utf8proc_sequences + 9603, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_FINAL, utf8proc_sequences + 9607, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_FINAL, utf8proc_sequences + 9611, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_FINAL, utf8proc_sequences + 9615, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_INITIAL, utf8proc_sequences + 9615, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_FINAL, utf8proc_sequences + 9619, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_FINAL, utf8proc_sequences + 9623, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_FINAL, utf8proc_sequences + 9627, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_FINAL, utf8proc_sequences + 9631, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_FINAL, utf8proc_sequences + 9635, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_INITIAL, utf8proc_sequences + 9635, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_FINAL, utf8proc_sequences + 9639, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_FINAL, utf8proc_sequences + 9643, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_FINAL, utf8proc_sequences + 9647, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_FINAL, utf8proc_sequences + 9651, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_FINAL, utf8proc_sequences + 9655, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_INITIAL, utf8proc_sequences + 9659, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_FINAL, utf8proc_sequences + 9659, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_FINAL, utf8proc_sequences + 9663, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_INITIAL, utf8proc_sequences + 9663, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_FINAL, utf8proc_sequences + 9667, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_INITIAL, utf8proc_sequences + 9667, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_INITIAL, utf8proc_sequences + 9671, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_INITIAL, utf8proc_sequences + 9675, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_FINAL, utf8proc_sequences + 9679, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_INITIAL, utf8proc_sequences + 9683, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_INITIAL, utf8proc_sequences + 9687, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_INITIAL, utf8proc_sequences + 9691, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_INITIAL, utf8proc_sequences + 9695, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_INITIAL, utf8proc_sequences + 9699, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_INITIAL, utf8proc_sequences + 9703, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_INITIAL, utf8proc_sequences + 9707, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_INITIAL, utf8proc_sequences + 9711, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_FINAL, utf8proc_sequences + 9715, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_FINAL, utf8proc_sequences + 9719, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_INITIAL, utf8proc_sequences + 9719, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_FINAL, utf8proc_sequences + 9723, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_FINAL, utf8proc_sequences + 9727, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_FINAL, utf8proc_sequences + 9731, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_FINAL, utf8proc_sequences + 9735, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_INITIAL, utf8proc_sequences + 9735, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_FINAL, utf8proc_sequences + 9739, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_FINAL, utf8proc_sequences + 9743, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_FINAL, utf8proc_sequences + 9747, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_FINAL, utf8proc_sequences + 9751, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_FINAL, utf8proc_sequences + 9755, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_FINAL, utf8proc_sequences + 9759, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_FINAL, utf8proc_sequences + 9763, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_FINAL, utf8proc_sequences + 9767, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_FINAL, utf8proc_sequences + 9771, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_FINAL, utf8proc_sequences + 9775, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_FINAL, utf8proc_sequences + 9779, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_FINAL, utf8proc_sequences + 9783, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_FINAL, utf8proc_sequences + 9787, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_FINAL, utf8proc_sequences + 9791, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_FINAL, utf8proc_sequences + 9795, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_FINAL, utf8proc_sequences + 9799, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_FINAL, utf8proc_sequences + 9803, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_FINAL, utf8proc_sequences + 9807, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_FINAL, utf8proc_sequences + 9811, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_FINAL, utf8proc_sequences + 9815, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_FINAL, utf8proc_sequences + 9819, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_FINAL, utf8proc_sequences + 9823, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_INITIAL, utf8proc_sequences + 9639, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_INITIAL, utf8proc_sequences + 9647, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_FINAL, utf8proc_sequences + 9827, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_FINAL, utf8proc_sequences + 9831, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_INITIAL, utf8proc_sequences + 9835, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_FINAL, utf8proc_sequences + 9839, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_INITIAL, utf8proc_sequences + 9843, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_FINAL, utf8proc_sequences + 9847, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_FINAL, utf8proc_sequences + 9843, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_FINAL, utf8proc_sequences + 9835, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_FINAL, utf8proc_sequences + 9851, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_FINAL, utf8proc_sequences + 9855, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_FINAL, utf8proc_sequences + 9859, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_FINAL, utf8proc_sequences + 9863, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_FINAL, utf8proc_sequences + 9867, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_INITIAL, utf8proc_sequences + 9847, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_INITIAL, utf8proc_sequences + 9611, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_INITIAL, utf8proc_sequences + 9571, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_FINAL, utf8proc_sequences + 9871, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_FINAL, utf8proc_sequences + 9875, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_ISOLATED, utf8proc_sequences + 9879, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_ISOLATED, utf8proc_sequences + 9883, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_ISOLATED, utf8proc_sequences + 9887, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_ISOLATED, utf8proc_sequences + 9892, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_ISOLATED, utf8proc_sequences + 9897, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_ISOLATED, utf8proc_sequences + 9902, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_ISOLATED, utf8proc_sequences + 9907, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_ISOLATED, utf8proc_sequences + 9912, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_ISOLATED, utf8proc_sequences + 9917, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_ISOLATED, utf8proc_sequences + 9922, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_ISOLATED, utf8proc_sequences + 9926, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_ISOLATED, utf8proc_sequences + 9945, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SC, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_ISOLATED, utf8proc_sequences + 9954, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_PO, 0, UTF8PROC_BIDI_CLASS_ON, UTF8PROC_DECOMP_TYPE_VERTICAL, utf8proc_sequences + 9959, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_PO, 0, UTF8PROC_BIDI_CLASS_ON, UTF8PROC_DECOMP_TYPE_VERTICAL, utf8proc_sequences + 9961, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_PO, 0, UTF8PROC_BIDI_CLASS_ON, UTF8PROC_DECOMP_TYPE_VERTICAL, utf8proc_sequences + 9963, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_PO, 0, UTF8PROC_BIDI_CLASS_ON, UTF8PROC_DECOMP_TYPE_VERTICAL, utf8proc_sequences + 9965, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_PO, 0, UTF8PROC_BIDI_CLASS_ON, UTF8PROC_DECOMP_TYPE_VERTICAL, utf8proc_sequences + 1333, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_PO, 0, UTF8PROC_BIDI_CLASS_ON, UTF8PROC_DECOMP_TYPE_VERTICAL, utf8proc_sequences + 9967, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_PO, 0, UTF8PROC_BIDI_CLASS_ON, UTF8PROC_DECOMP_TYPE_VERTICAL, utf8proc_sequences + 9969, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_PS, 0, UTF8PROC_BIDI_CLASS_ON, UTF8PROC_DECOMP_TYPE_VERTICAL, utf8proc_sequences + 9971, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_PE, 0, UTF8PROC_BIDI_CLASS_ON, UTF8PROC_DECOMP_TYPE_VERTICAL, utf8proc_sequences + 9973, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_PO, 0, UTF8PROC_BIDI_CLASS_ON, UTF8PROC_DECOMP_TYPE_VERTICAL, utf8proc_sequences + 9975, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_PO, 0, UTF8PROC_BIDI_CLASS_ON, UTF8PROC_DECOMP_TYPE_VERTICAL, utf8proc_sequences + 9977, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_PD, 0, UTF8PROC_BIDI_CLASS_ON, UTF8PROC_DECOMP_TYPE_VERTICAL, utf8proc_sequences + 9979, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_PD, 0, UTF8PROC_BIDI_CLASS_ON, UTF8PROC_DECOMP_TYPE_VERTICAL, utf8proc_sequences + 9981, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_PC, 0, UTF8PROC_BIDI_CLASS_ON, UTF8PROC_DECOMP_TYPE_VERTICAL, utf8proc_sequences + 9983, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_PS, 0, UTF8PROC_BIDI_CLASS_ON, UTF8PROC_DECOMP_TYPE_VERTICAL, utf8proc_sequences + 4517, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_PE, 0, UTF8PROC_BIDI_CLASS_ON, UTF8PROC_DECOMP_TYPE_VERTICAL, utf8proc_sequences + 4519, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_PS, 0, UTF8PROC_BIDI_CLASS_ON, UTF8PROC_DECOMP_TYPE_VERTICAL, utf8proc_sequences + 9985, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_PE, 0, UTF8PROC_BIDI_CLASS_ON, UTF8PROC_DECOMP_TYPE_VERTICAL, utf8proc_sequences + 9987, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_PS, 0, UTF8PROC_BIDI_CLASS_ON, UTF8PROC_DECOMP_TYPE_VERTICAL, utf8proc_sequences + 9989, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_PE, 0, UTF8PROC_BIDI_CLASS_ON, UTF8PROC_DECOMP_TYPE_VERTICAL, utf8proc_sequences + 9991, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_PS, 0, UTF8PROC_BIDI_CLASS_ON, UTF8PROC_DECOMP_TYPE_VERTICAL, utf8proc_sequences + 9993, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_PE, 0, UTF8PROC_BIDI_CLASS_ON, UTF8PROC_DECOMP_TYPE_VERTICAL, utf8proc_sequences + 9995, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_PS, 0, UTF8PROC_BIDI_CLASS_ON, UTF8PROC_DECOMP_TYPE_VERTICAL, utf8proc_sequences + 9997, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_PE, 0, UTF8PROC_BIDI_CLASS_ON, UTF8PROC_DECOMP_TYPE_VERTICAL, utf8proc_sequences + 9999, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_PS, 0, UTF8PROC_BIDI_CLASS_ON, UTF8PROC_DECOMP_TYPE_VERTICAL, utf8proc_sequences + 4892, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_PE, 0, UTF8PROC_BIDI_CLASS_ON, UTF8PROC_DECOMP_TYPE_VERTICAL, utf8proc_sequences + 4894, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_PS, 0, UTF8PROC_BIDI_CLASS_ON, UTF8PROC_DECOMP_TYPE_VERTICAL, utf8proc_sequences + 10001, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_PE, 0, UTF8PROC_BIDI_CLASS_ON, UTF8PROC_DECOMP_TYPE_VERTICAL, utf8proc_sequences + 10003, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_PS, 0, UTF8PROC_BIDI_CLASS_ON, UTF8PROC_DECOMP_TYPE_VERTICAL, utf8proc_sequences + 10005, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_PE, 0, UTF8PROC_BIDI_CLASS_ON, UTF8PROC_DECOMP_TYPE_VERTICAL, utf8proc_sequences + 10007, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_PS, 0, UTF8PROC_BIDI_CLASS_ON, UTF8PROC_DECOMP_TYPE_VERTICAL, utf8proc_sequences + 10009, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_PE, 0, UTF8PROC_BIDI_CLASS_ON, UTF8PROC_DECOMP_TYPE_VERTICAL, utf8proc_sequences + 10011, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_PO, 0, UTF8PROC_BIDI_CLASS_ON, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 10013, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_PC, 0, UTF8PROC_BIDI_CLASS_ON, UTF8PROC_DECOMP_TYPE_COMPAT, utf8proc_sequences + 9983, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_PO, 0, UTF8PROC_BIDI_CLASS_CS, UTF8PROC_DECOMP_TYPE_SMALL, utf8proc_sequences + 9959, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_PO, 0, UTF8PROC_BIDI_CLASS_ON, UTF8PROC_DECOMP_TYPE_SMALL, utf8proc_sequences + 9961, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_PO, 0, UTF8PROC_BIDI_CLASS_CS, UTF8PROC_DECOMP_TYPE_SMALL, utf8proc_sequences + 4454, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_PO, 0, UTF8PROC_BIDI_CLASS_ON, UTF8PROC_DECOMP_TYPE_SMALL, utf8proc_sequences + 1333, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_PO, 0, UTF8PROC_BIDI_CLASS_CS, UTF8PROC_DECOMP_TYPE_SMALL, utf8proc_sequences + 9965, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_PO, 0, UTF8PROC_BIDI_CLASS_ON, UTF8PROC_DECOMP_TYPE_SMALL, utf8proc_sequences + 9969, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_PO, 0, UTF8PROC_BIDI_CLASS_ON, UTF8PROC_DECOMP_TYPE_SMALL, utf8proc_sequences + 9967, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_PD, 0, UTF8PROC_BIDI_CLASS_ON, UTF8PROC_DECOMP_TYPE_SMALL, utf8proc_sequences + 9979, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_PS, 0, UTF8PROC_BIDI_CLASS_ON, UTF8PROC_DECOMP_TYPE_SMALL, utf8proc_sequences + 4517, true, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_PE, 0, UTF8PROC_BIDI_CLASS_ON, UTF8PROC_DECOMP_TYPE_SMALL, utf8proc_sequences + 4519, true, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_PS, 0, UTF8PROC_BIDI_CLASS_ON, UTF8PROC_DECOMP_TYPE_SMALL, utf8proc_sequences + 9985, true, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_PE, 0, UTF8PROC_BIDI_CLASS_ON, UTF8PROC_DECOMP_TYPE_SMALL, utf8proc_sequences + 9987, true, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_PS, 0, UTF8PROC_BIDI_CLASS_ON, UTF8PROC_DECOMP_TYPE_SMALL, utf8proc_sequences + 9989, true, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_PE, 0, UTF8PROC_BIDI_CLASS_ON, UTF8PROC_DECOMP_TYPE_SMALL, utf8proc_sequences + 9991, true, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_PO, 0, UTF8PROC_BIDI_CLASS_ET, UTF8PROC_DECOMP_TYPE_SMALL, utf8proc_sequences + 10015, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_PO, 0, UTF8PROC_BIDI_CLASS_ON, UTF8PROC_DECOMP_TYPE_SMALL, utf8proc_sequences + 10017, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_PO, 0, UTF8PROC_BIDI_CLASS_ON, UTF8PROC_DECOMP_TYPE_SMALL, utf8proc_sequences + 10019, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SM, 0, UTF8PROC_BIDI_CLASS_ES, UTF8PROC_DECOMP_TYPE_SMALL, utf8proc_sequences + 4511, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_PD, 0, UTF8PROC_BIDI_CLASS_ES, UTF8PROC_DECOMP_TYPE_SMALL, utf8proc_sequences + 10021, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SM, 0, UTF8PROC_BIDI_CLASS_ON, UTF8PROC_DECOMP_TYPE_SMALL, utf8proc_sequences + 10023, true, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SM, 0, UTF8PROC_BIDI_CLASS_ON, UTF8PROC_DECOMP_TYPE_SMALL, utf8proc_sequences + 10025, true, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SM, 0, UTF8PROC_BIDI_CLASS_ON, UTF8PROC_DECOMP_TYPE_SMALL, utf8proc_sequences + 4515, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_PO, 0, UTF8PROC_BIDI_CLASS_ON, UTF8PROC_DECOMP_TYPE_SMALL, utf8proc_sequences + 10027, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SC, 0, UTF8PROC_BIDI_CLASS_ET, UTF8PROC_DECOMP_TYPE_SMALL, utf8proc_sequences + 10029, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_PO, 0, UTF8PROC_BIDI_CLASS_ET, UTF8PROC_DECOMP_TYPE_SMALL, utf8proc_sequences + 10031, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_PO, 0, UTF8PROC_BIDI_CLASS_ON, UTF8PROC_DECOMP_TYPE_SMALL, utf8proc_sequences + 10033, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_ISOLATED, utf8proc_sequences + 10035, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_MEDIAL, utf8proc_sequences + 10038, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_ISOLATED, utf8proc_sequences + 10041, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_ISOLATED, utf8proc_sequences + 10044, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_ISOLATED, utf8proc_sequences + 10047, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_MEDIAL, utf8proc_sequences + 10050, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_ISOLATED, utf8proc_sequences + 10053, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_MEDIAL, utf8proc_sequences + 10056, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_ISOLATED, utf8proc_sequences + 10059, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_MEDIAL, utf8proc_sequences + 10062, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_ISOLATED, utf8proc_sequences + 10065, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_MEDIAL, utf8proc_sequences + 10068, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_ISOLATED, utf8proc_sequences + 10071, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_MEDIAL, utf8proc_sequences + 10074, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_ISOLATED, utf8proc_sequences + 10077, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_ISOLATED, utf8proc_sequences + 10079, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_FINAL, utf8proc_sequences + 10079, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_ISOLATED, utf8proc_sequences + 10081, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_FINAL, utf8proc_sequences + 10081, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_ISOLATED, utf8proc_sequences + 10083, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_FINAL, utf8proc_sequences + 10083, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_ISOLATED, utf8proc_sequences + 10085, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_FINAL, utf8proc_sequences + 10085, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_ISOLATED, utf8proc_sequences + 10087, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_FINAL, utf8proc_sequences + 10087, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_INITIAL, utf8proc_sequences + 10087, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_MEDIAL, utf8proc_sequences + 10087, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_ISOLATED, utf8proc_sequences + 10089, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_FINAL, utf8proc_sequences + 10089, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_ISOLATED, utf8proc_sequences + 10091, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_FINAL, utf8proc_sequences + 10091, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_INITIAL, utf8proc_sequences + 10091, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_MEDIAL, utf8proc_sequences + 10091, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_ISOLATED, utf8proc_sequences + 10093, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_FINAL, utf8proc_sequences + 10093, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_ISOLATED, utf8proc_sequences + 10095, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_FINAL, utf8proc_sequences + 10095, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_INITIAL, utf8proc_sequences + 10095, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_MEDIAL, utf8proc_sequences + 10095, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_ISOLATED, utf8proc_sequences + 10097, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_FINAL, utf8proc_sequences + 10097, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_INITIAL, utf8proc_sequences + 10097, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_MEDIAL, utf8proc_sequences + 10097, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_ISOLATED, utf8proc_sequences + 10099, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_FINAL, utf8proc_sequences + 10099, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_INITIAL, utf8proc_sequences + 10099, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_MEDIAL, utf8proc_sequences + 10099, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_ISOLATED, utf8proc_sequences + 10101, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_FINAL, utf8proc_sequences + 10101, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_INITIAL, utf8proc_sequences + 10101, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_MEDIAL, utf8proc_sequences + 10101, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_ISOLATED, utf8proc_sequences + 10103, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_FINAL, utf8proc_sequences + 10103, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_INITIAL, utf8proc_sequences + 10103, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_MEDIAL, utf8proc_sequences + 10103, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_ISOLATED, utf8proc_sequences + 10105, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_FINAL, utf8proc_sequences + 10105, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_ISOLATED, utf8proc_sequences + 10107, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_FINAL, utf8proc_sequences + 10107, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_ISOLATED, utf8proc_sequences + 10109, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_FINAL, utf8proc_sequences + 10109, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_ISOLATED, utf8proc_sequences + 10111, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_FINAL, utf8proc_sequences + 10111, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_ISOLATED, utf8proc_sequences + 10113, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_FINAL, utf8proc_sequences + 10113, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_INITIAL, utf8proc_sequences + 10113, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_MEDIAL, utf8proc_sequences + 10113, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_ISOLATED, utf8proc_sequences + 10115, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_FINAL, utf8proc_sequences + 10115, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_INITIAL, utf8proc_sequences + 10115, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_MEDIAL, utf8proc_sequences + 10115, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_ISOLATED, utf8proc_sequences + 10117, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_FINAL, utf8proc_sequences + 10117, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_INITIAL, utf8proc_sequences + 10117, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_MEDIAL, utf8proc_sequences + 10117, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_ISOLATED, utf8proc_sequences + 10119, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_FINAL, utf8proc_sequences + 10119, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_INITIAL, utf8proc_sequences + 10119, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_MEDIAL, utf8proc_sequences + 10119, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_ISOLATED, utf8proc_sequences + 10121, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_FINAL, utf8proc_sequences + 10121, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_INITIAL, utf8proc_sequences + 10121, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_MEDIAL, utf8proc_sequences + 10121, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_ISOLATED, utf8proc_sequences + 10123, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_FINAL, utf8proc_sequences + 10123, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_INITIAL, utf8proc_sequences + 10123, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_MEDIAL, utf8proc_sequences + 10123, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_ISOLATED, utf8proc_sequences + 10125, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_FINAL, utf8proc_sequences + 10125, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_INITIAL, utf8proc_sequences + 10125, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_MEDIAL, utf8proc_sequences + 10125, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_ISOLATED, utf8proc_sequences + 10127, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_FINAL, utf8proc_sequences + 10127, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_INITIAL, utf8proc_sequences + 10127, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_MEDIAL, utf8proc_sequences + 10127, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_ISOLATED, utf8proc_sequences + 10129, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_FINAL, utf8proc_sequences + 10129, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_INITIAL, utf8proc_sequences + 10129, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_MEDIAL, utf8proc_sequences + 10129, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_ISOLATED, utf8proc_sequences + 10131, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_FINAL, utf8proc_sequences + 10131, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_INITIAL, utf8proc_sequences + 10131, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_MEDIAL, utf8proc_sequences + 10131, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_ISOLATED, utf8proc_sequences + 10133, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_FINAL, utf8proc_sequences + 10133, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_INITIAL, utf8proc_sequences + 10133, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_MEDIAL, utf8proc_sequences + 10133, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_ISOLATED, utf8proc_sequences + 10135, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_FINAL, utf8proc_sequences + 10135, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_INITIAL, utf8proc_sequences + 10135, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_MEDIAL, utf8proc_sequences + 10135, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_ISOLATED, utf8proc_sequences + 10137, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_FINAL, utf8proc_sequences + 10137, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_INITIAL, utf8proc_sequences + 10137, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_MEDIAL, utf8proc_sequences + 10137, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_ISOLATED, utf8proc_sequences + 10139, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_FINAL, utf8proc_sequences + 10139, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_INITIAL, utf8proc_sequences + 10139, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_MEDIAL, utf8proc_sequences + 10139, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_ISOLATED, utf8proc_sequences + 10141, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_FINAL, utf8proc_sequences + 10141, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_INITIAL, utf8proc_sequences + 10141, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_MEDIAL, utf8proc_sequences + 10141, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_ISOLATED, utf8proc_sequences + 10143, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_FINAL, utf8proc_sequences + 10143, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_ISOLATED, utf8proc_sequences + 8980, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_FINAL, utf8proc_sequences + 8980, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_ISOLATED, utf8proc_sequences + 10145, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_FINAL, utf8proc_sequences + 10145, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_INITIAL, utf8proc_sequences + 10145, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_MEDIAL, utf8proc_sequences + 10145, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_ISOLATED, utf8proc_sequences + 10147, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_FINAL, utf8proc_sequences + 10147, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_ISOLATED, utf8proc_sequences + 10150, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_FINAL, utf8proc_sequences + 10150, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_ISOLATED, utf8proc_sequences + 10153, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_FINAL, utf8proc_sequences + 10153, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_ISOLATED, utf8proc_sequences + 10156, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_AL, UTF8PROC_DECOMP_TYPE_FINAL, utf8proc_sequences + 10156, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_PO, 0, UTF8PROC_BIDI_CLASS_ON, UTF8PROC_DECOMP_TYPE_WIDE, utf8proc_sequences + 9967, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_PO, 0, UTF8PROC_BIDI_CLASS_ON, UTF8PROC_DECOMP_TYPE_WIDE, utf8proc_sequences + 10159, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_PO, 0, UTF8PROC_BIDI_CLASS_ET, UTF8PROC_DECOMP_TYPE_WIDE, utf8proc_sequences + 10015, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SC, 0, UTF8PROC_BIDI_CLASS_ET, UTF8PROC_DECOMP_TYPE_WIDE, utf8proc_sequences + 10029, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_PO, 0, UTF8PROC_BIDI_CLASS_ET, UTF8PROC_DECOMP_TYPE_WIDE, utf8proc_sequences + 10031, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_PO, 0, UTF8PROC_BIDI_CLASS_ON, UTF8PROC_DECOMP_TYPE_WIDE, utf8proc_sequences + 10017, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_PO, 0, UTF8PROC_BIDI_CLASS_ON, UTF8PROC_DECOMP_TYPE_WIDE, utf8proc_sequences + 10161, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_PS, 0, UTF8PROC_BIDI_CLASS_ON, UTF8PROC_DECOMP_TYPE_WIDE, utf8proc_sequences + 4517, true, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_PE, 0, UTF8PROC_BIDI_CLASS_ON, UTF8PROC_DECOMP_TYPE_WIDE, utf8proc_sequences + 4519, true, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_PO, 0, UTF8PROC_BIDI_CLASS_ON, UTF8PROC_DECOMP_TYPE_WIDE, utf8proc_sequences + 10019, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SM, 0, UTF8PROC_BIDI_CLASS_ES, UTF8PROC_DECOMP_TYPE_WIDE, utf8proc_sequences + 4511, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_PO, 0, UTF8PROC_BIDI_CLASS_CS, UTF8PROC_DECOMP_TYPE_WIDE, utf8proc_sequences + 9959, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_PD, 0, UTF8PROC_BIDI_CLASS_ES, UTF8PROC_DECOMP_TYPE_WIDE, utf8proc_sequences + 10021, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_PO, 0, UTF8PROC_BIDI_CLASS_CS, UTF8PROC_DECOMP_TYPE_WIDE, utf8proc_sequences + 4454, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_PO, 0, UTF8PROC_BIDI_CLASS_CS, UTF8PROC_DECOMP_TYPE_WIDE, utf8proc_sequences + 10163, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_ND, 0, UTF8PROC_BIDI_CLASS_EN, UTF8PROC_DECOMP_TYPE_WIDE, utf8proc_sequences + 4497, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_ND, 0, UTF8PROC_BIDI_CLASS_EN, UTF8PROC_DECOMP_TYPE_WIDE, utf8proc_sequences + 72, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_ND, 0, UTF8PROC_BIDI_CLASS_EN, UTF8PROC_DECOMP_TYPE_WIDE, utf8proc_sequences + 60, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_ND, 0, UTF8PROC_BIDI_CLASS_EN, UTF8PROC_DECOMP_TYPE_WIDE, utf8proc_sequences + 62, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_ND, 0, UTF8PROC_BIDI_CLASS_EN, UTF8PROC_DECOMP_TYPE_WIDE, utf8proc_sequences + 4499, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_ND, 0, UTF8PROC_BIDI_CLASS_EN, UTF8PROC_DECOMP_TYPE_WIDE, utf8proc_sequences + 4501, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_ND, 0, UTF8PROC_BIDI_CLASS_EN, UTF8PROC_DECOMP_TYPE_WIDE, utf8proc_sequences + 4503, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_ND, 0, UTF8PROC_BIDI_CLASS_EN, UTF8PROC_DECOMP_TYPE_WIDE, utf8proc_sequences + 4505, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_ND, 0, UTF8PROC_BIDI_CLASS_EN, UTF8PROC_DECOMP_TYPE_WIDE, utf8proc_sequences + 4507, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_ND, 0, UTF8PROC_BIDI_CLASS_EN, UTF8PROC_DECOMP_TYPE_WIDE, utf8proc_sequences + 4509, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_PO, 0, UTF8PROC_BIDI_CLASS_CS, UTF8PROC_DECOMP_TYPE_WIDE, utf8proc_sequences + 9965, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_PO, 0, UTF8PROC_BIDI_CLASS_ON, UTF8PROC_DECOMP_TYPE_WIDE, utf8proc_sequences + 1333, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SM, 0, UTF8PROC_BIDI_CLASS_ON, UTF8PROC_DECOMP_TYPE_WIDE, utf8proc_sequences + 10023, true, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SM, 0, UTF8PROC_BIDI_CLASS_ON, UTF8PROC_DECOMP_TYPE_WIDE, utf8proc_sequences + 4515, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SM, 0, UTF8PROC_BIDI_CLASS_ON, UTF8PROC_DECOMP_TYPE_WIDE, utf8proc_sequences + 10025, true, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_PO, 0, UTF8PROC_BIDI_CLASS_ON, UTF8PROC_DECOMP_TYPE_WIDE, utf8proc_sequences + 9969, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_PO, 0, UTF8PROC_BIDI_CLASS_ON, UTF8PROC_DECOMP_TYPE_WIDE, utf8proc_sequences + 10033, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_WIDE, utf8proc_sequences + 2376, false, -1, 65345, -1, -1, -1, false, false, false, false, utf8proc_sequences + 10165},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_WIDE, utf8proc_sequences + 2380, false, -1, 65346, -1, -1, -1, false, false, false, false, utf8proc_sequences + 10167},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_WIDE, utf8proc_sequences + 4532, false, -1, 65347, -1, -1, -1, false, false, false, false, utf8proc_sequences + 10169},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_WIDE, utf8proc_sequences + 2382, false, -1, 65348, -1, -1, -1, false, false, false, false, utf8proc_sequences + 10171},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_WIDE, utf8proc_sequences + 2384, false, -1, 65349, -1, -1, -1, false, false, false, false, utf8proc_sequences + 10173},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_WIDE, utf8proc_sequences + 4571, false, -1, 65350, -1, -1, -1, false, false, false, false, utf8proc_sequences + 10175},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_WIDE, utf8proc_sequences + 2388, false, -1, 65351, -1, -1, -1, false, false, false, false, utf8proc_sequences + 10177},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_WIDE, utf8proc_sequences + 2390, false, -1, 65352, -1, -1, -1, false, false, false, false, utf8proc_sequences + 10179},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_WIDE, utf8proc_sequences + 2392, false, -1, 65353, -1, -1, -1, false, false, false, false, utf8proc_sequences + 10181},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_WIDE, utf8proc_sequences + 2394, false, -1, 65354, -1, -1, -1, false, false, false, false, utf8proc_sequences + 10183},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_WIDE, utf8proc_sequences + 2396, false, -1, 65355, -1, -1, -1, false, false, false, false, utf8proc_sequences + 10185},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_WIDE, utf8proc_sequences + 2398, false, -1, 65356, -1, -1, -1, false, false, false, false, utf8proc_sequences + 10187},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_WIDE, utf8proc_sequences + 2400, false, -1, 65357, -1, -1, -1, false, false, false, false, utf8proc_sequences + 10189},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_WIDE, utf8proc_sequences + 2402, false, -1, 65358, -1, -1, -1, false, false, false, false, utf8proc_sequences + 10191},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_WIDE, utf8proc_sequences + 2404, false, -1, 65359, -1, -1, -1, false, false, false, false, utf8proc_sequences + 10193},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_WIDE, utf8proc_sequences + 2408, false, -1, 65360, -1, -1, -1, false, false, false, false, utf8proc_sequences + 10195},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_WIDE, utf8proc_sequences + 4553, false, -1, 65361, -1, -1, -1, false, false, false, false, utf8proc_sequences + 10197},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_WIDE, utf8proc_sequences + 2410, false, -1, 65362, -1, -1, -1, false, false, false, false, utf8proc_sequences + 10199},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_WIDE, utf8proc_sequences + 5231, false, -1, 65363, -1, -1, -1, false, false, false, false, utf8proc_sequences + 10201},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_WIDE, utf8proc_sequences + 2412, false, -1, 65364, -1, -1, -1, false, false, false, false, utf8proc_sequences + 10203},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_WIDE, utf8proc_sequences + 2414, false, -1, 65365, -1, -1, -1, false, false, false, false, utf8proc_sequences + 10205},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_WIDE, utf8proc_sequences + 4662, false, -1, 65366, -1, -1, -1, false, false, false, false, utf8proc_sequences + 10207},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_WIDE, utf8proc_sequences + 2416, false, -1, 65367, -1, -1, -1, false, false, false, false, utf8proc_sequences + 10209},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_WIDE, utf8proc_sequences + 4689, false, -1, 65368, -1, -1, -1, false, false, false, false, utf8proc_sequences + 10211},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_WIDE, utf8proc_sequences + 5245, false, -1, 65369, -1, -1, -1, false, false, false, false, utf8proc_sequences + 10213},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_WIDE, utf8proc_sequences + 4565, false, -1, 65370, -1, -1, -1, false, false, false, false, utf8proc_sequences + 10215},
+  {UTF8PROC_CATEGORY_PS, 0, UTF8PROC_BIDI_CLASS_ON, UTF8PROC_DECOMP_TYPE_WIDE, utf8proc_sequences + 10009, true, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_PO, 0, UTF8PROC_BIDI_CLASS_ON, UTF8PROC_DECOMP_TYPE_WIDE, utf8proc_sequences + 10027, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_PE, 0, UTF8PROC_BIDI_CLASS_ON, UTF8PROC_DECOMP_TYPE_WIDE, utf8proc_sequences + 10011, true, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SK, 0, UTF8PROC_BIDI_CLASS_ON, UTF8PROC_DECOMP_TYPE_WIDE, utf8proc_sequences + 10217, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_PC, 0, UTF8PROC_BIDI_CLASS_ON, UTF8PROC_DECOMP_TYPE_WIDE, utf8proc_sequences + 9983, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SK, 0, UTF8PROC_BIDI_CLASS_ON, UTF8PROC_DECOMP_TYPE_WIDE, utf8proc_sequences + 4387, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_WIDE, utf8proc_sequences + 0, false, 65313, -1, 65313, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_WIDE, utf8proc_sequences + 2, false, 65314, -1, 65314, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_WIDE, utf8proc_sequences + 4, false, 65315, -1, 65315, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_WIDE, utf8proc_sequences + 6, false, 65316, -1, 65316, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_WIDE, utf8proc_sequences + 8, false, 65317, -1, 65317, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_WIDE, utf8proc_sequences + 10, false, 65318, -1, 65318, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_WIDE, utf8proc_sequences + 12, false, 65319, -1, 65319, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_WIDE, utf8proc_sequences + 14, false, 65320, -1, 65320, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_WIDE, utf8proc_sequences + 16, false, 65321, -1, 65321, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_WIDE, utf8proc_sequences + 18, false, 65322, -1, 65322, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_WIDE, utf8proc_sequences + 20, false, 65323, -1, 65323, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_WIDE, utf8proc_sequences + 22, false, 65324, -1, 65324, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_WIDE, utf8proc_sequences + 24, false, 65325, -1, 65325, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_WIDE, utf8proc_sequences + 26, false, 65326, -1, 65326, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_WIDE, utf8proc_sequences + 28, false, 65327, -1, 65327, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_WIDE, utf8proc_sequences + 30, false, 65328, -1, 65328, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_WIDE, utf8proc_sequences + 32, false, 65329, -1, 65329, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_WIDE, utf8proc_sequences + 34, false, 65330, -1, 65330, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_WIDE, utf8proc_sequences + 36, false, 65331, -1, 65331, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_WIDE, utf8proc_sequences + 38, false, 65332, -1, 65332, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_WIDE, utf8proc_sequences + 40, false, 65333, -1, 65333, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_WIDE, utf8proc_sequences + 42, false, 65334, -1, 65334, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_WIDE, utf8proc_sequences + 44, false, 65335, -1, 65335, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_WIDE, utf8proc_sequences + 46, false, 65336, -1, 65336, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_WIDE, utf8proc_sequences + 48, false, 65337, -1, 65337, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_WIDE, utf8proc_sequences + 50, false, 65338, -1, 65338, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_PS, 0, UTF8PROC_BIDI_CLASS_ON, UTF8PROC_DECOMP_TYPE_WIDE, utf8proc_sequences + 9985, true, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SM, 0, UTF8PROC_BIDI_CLASS_ON, UTF8PROC_DECOMP_TYPE_WIDE, utf8proc_sequences + 10219, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_PE, 0, UTF8PROC_BIDI_CLASS_ON, UTF8PROC_DECOMP_TYPE_WIDE, utf8proc_sequences + 9987, true, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SM, 0, UTF8PROC_BIDI_CLASS_ON, UTF8PROC_DECOMP_TYPE_WIDE, utf8proc_sequences + 10221, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_PS, 0, UTF8PROC_BIDI_CLASS_ON, UTF8PROC_DECOMP_TYPE_WIDE, utf8proc_sequences + 10223, true, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_PE, 0, UTF8PROC_BIDI_CLASS_ON, UTF8PROC_DECOMP_TYPE_WIDE, utf8proc_sequences + 10225, true, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_PO, 0, UTF8PROC_BIDI_CLASS_ON, UTF8PROC_DECOMP_TYPE_NARROW, utf8proc_sequences + 9963, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_PS, 0, UTF8PROC_BIDI_CLASS_ON, UTF8PROC_DECOMP_TYPE_NARROW, utf8proc_sequences + 10001, true, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_PE, 0, UTF8PROC_BIDI_CLASS_ON, UTF8PROC_DECOMP_TYPE_NARROW, utf8proc_sequences + 10003, true, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_PO, 0, UTF8PROC_BIDI_CLASS_ON, UTF8PROC_DECOMP_TYPE_NARROW, utf8proc_sequences + 9961, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_PO, 0, UTF8PROC_BIDI_CLASS_ON, UTF8PROC_DECOMP_TYPE_NARROW, utf8proc_sequences + 10227, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_NARROW, utf8proc_sequences + 6963, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_NARROW, utf8proc_sequences + 10229, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_NARROW, utf8proc_sequences + 10231, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_NARROW, utf8proc_sequences + 10233, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_NARROW, utf8proc_sequences + 10235, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_NARROW, utf8proc_sequences + 10237, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_NARROW, utf8proc_sequences + 10239, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_NARROW, utf8proc_sequences + 10241, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_NARROW, utf8proc_sequences + 10243, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_NARROW, utf8proc_sequences + 10245, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LM, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_NARROW, utf8proc_sequences + 10247, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_NARROW, utf8proc_sequences + 6871, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_NARROW, utf8proc_sequences + 6873, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_NARROW, utf8proc_sequences + 6875, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_NARROW, utf8proc_sequences + 6877, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_NARROW, utf8proc_sequences + 6879, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_NARROW, utf8proc_sequences + 6881, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_NARROW, utf8proc_sequences + 6883, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_NARROW, utf8proc_sequences + 6885, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_NARROW, utf8proc_sequences + 6887, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_NARROW, utf8proc_sequences + 6889, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_NARROW, utf8proc_sequences + 6891, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_NARROW, utf8proc_sequences + 6893, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_NARROW, utf8proc_sequences + 6895, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_NARROW, utf8proc_sequences + 6897, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_NARROW, utf8proc_sequences + 6899, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_NARROW, utf8proc_sequences + 6901, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_NARROW, utf8proc_sequences + 6903, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_NARROW, utf8proc_sequences + 6905, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_NARROW, utf8proc_sequences + 6907, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_NARROW, utf8proc_sequences + 6909, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_NARROW, utf8proc_sequences + 6911, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_NARROW, utf8proc_sequences + 6913, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_NARROW, utf8proc_sequences + 6915, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_NARROW, utf8proc_sequences + 6917, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_NARROW, utf8proc_sequences + 6919, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_NARROW, utf8proc_sequences + 6921, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_NARROW, utf8proc_sequences + 6923, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_NARROW, utf8proc_sequences + 6925, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_NARROW, utf8proc_sequences + 6927, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_NARROW, utf8proc_sequences + 6929, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_NARROW, utf8proc_sequences + 6931, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_NARROW, utf8proc_sequences + 6933, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_NARROW, utf8proc_sequences + 6935, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_NARROW, utf8proc_sequences + 6937, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_NARROW, utf8proc_sequences + 6939, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_NARROW, utf8proc_sequences + 6941, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_NARROW, utf8proc_sequences + 6943, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_NARROW, utf8proc_sequences + 6945, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_NARROW, utf8proc_sequences + 6947, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_NARROW, utf8proc_sequences + 6949, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_NARROW, utf8proc_sequences + 6951, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_NARROW, utf8proc_sequences + 6953, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_NARROW, utf8proc_sequences + 6955, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_NARROW, utf8proc_sequences + 6957, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_NARROW, utf8proc_sequences + 10249, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LM, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_NARROW, utf8proc_sequences + 10251, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LM, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_NARROW, utf8proc_sequences + 10253, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_NARROW, utf8proc_sequences + 10255, false, -1, -1, -1, -1, -1, false, true, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_NARROW, utf8proc_sequences + 10257, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_NARROW, utf8proc_sequences + 10259, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_NARROW, utf8proc_sequences + 10261, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_NARROW, utf8proc_sequences + 10263, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_NARROW, utf8proc_sequences + 10265, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_NARROW, utf8proc_sequences + 10267, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_NARROW, utf8proc_sequences + 10269, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_NARROW, utf8proc_sequences + 10271, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_NARROW, utf8proc_sequences + 10273, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_NARROW, utf8proc_sequences + 10275, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_NARROW, utf8proc_sequences + 10277, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_NARROW, utf8proc_sequences + 10279, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_NARROW, utf8proc_sequences + 10281, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_NARROW, utf8proc_sequences + 10283, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_NARROW, utf8proc_sequences + 10285, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_NARROW, utf8proc_sequences + 10287, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_NARROW, utf8proc_sequences + 10289, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_NARROW, utf8proc_sequences + 10291, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_NARROW, utf8proc_sequences + 10293, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_NARROW, utf8proc_sequences + 10295, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_NARROW, utf8proc_sequences + 10297, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_NARROW, utf8proc_sequences + 10299, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_NARROW, utf8proc_sequences + 10301, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_NARROW, utf8proc_sequences + 10303, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_NARROW, utf8proc_sequences + 10305, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_NARROW, utf8proc_sequences + 10307, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_NARROW, utf8proc_sequences + 10309, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_NARROW, utf8proc_sequences + 10311, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_NARROW, utf8proc_sequences + 10313, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_NARROW, utf8proc_sequences + 10315, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_NARROW, utf8proc_sequences + 10317, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_NARROW, utf8proc_sequences + 10319, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_NARROW, utf8proc_sequences + 10321, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_NARROW, utf8proc_sequences + 10323, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_NARROW, utf8proc_sequences + 10325, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_NARROW, utf8proc_sequences + 10327, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_NARROW, utf8proc_sequences + 10329, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_NARROW, utf8proc_sequences + 10331, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_NARROW, utf8proc_sequences + 10333, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_NARROW, utf8proc_sequences + 10335, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_NARROW, utf8proc_sequences + 10337, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_NARROW, utf8proc_sequences + 10339, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_NARROW, utf8proc_sequences + 10341, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_NARROW, utf8proc_sequences + 10343, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_NARROW, utf8proc_sequences + 10345, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_NARROW, utf8proc_sequences + 10347, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_NARROW, utf8proc_sequences + 10349, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_NARROW, utf8proc_sequences + 10351, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_NARROW, utf8proc_sequences + 10353, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_NARROW, utf8proc_sequences + 10355, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_NARROW, utf8proc_sequences + 10357, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SC, 0, UTF8PROC_BIDI_CLASS_ET, UTF8PROC_DECOMP_TYPE_WIDE, utf8proc_sequences + 10359, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SC, 0, UTF8PROC_BIDI_CLASS_ET, UTF8PROC_DECOMP_TYPE_WIDE, utf8proc_sequences + 10361, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SM, 0, UTF8PROC_BIDI_CLASS_ON, UTF8PROC_DECOMP_TYPE_WIDE, utf8proc_sequences + 10363, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SK, 0, UTF8PROC_BIDI_CLASS_ON, UTF8PROC_DECOMP_TYPE_WIDE, utf8proc_sequences + 10365, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_ON, UTF8PROC_DECOMP_TYPE_WIDE, utf8proc_sequences + 10367, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SC, 0, UTF8PROC_BIDI_CLASS_ET, UTF8PROC_DECOMP_TYPE_WIDE, utf8proc_sequences + 10369, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SC, 0, UTF8PROC_BIDI_CLASS_ET, UTF8PROC_DECOMP_TYPE_WIDE, utf8proc_sequences + 10371, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_ON, UTF8PROC_DECOMP_TYPE_NARROW, utf8proc_sequences + 10373, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SM, 0, UTF8PROC_BIDI_CLASS_ON, UTF8PROC_DECOMP_TYPE_NARROW, utf8proc_sequences + 10375, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SM, 0, UTF8PROC_BIDI_CLASS_ON, UTF8PROC_DECOMP_TYPE_NARROW, utf8proc_sequences + 10377, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SM, 0, UTF8PROC_BIDI_CLASS_ON, UTF8PROC_DECOMP_TYPE_NARROW, utf8proc_sequences + 10379, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SM, 0, UTF8PROC_BIDI_CLASS_ON, UTF8PROC_DECOMP_TYPE_NARROW, utf8proc_sequences + 10381, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_ON, UTF8PROC_DECOMP_TYPE_NARROW, utf8proc_sequences + 10383, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_ON, UTF8PROC_DECOMP_TYPE_NARROW, utf8proc_sequences + 10385, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_CF, 0, UTF8PROC_BIDI_CLASS_ON, 0, NULL, false, -1, -1, -1, -1, -1, false, false, true, false, NULL},
+  {UTF8PROC_CATEGORY_NL, 0, UTF8PROC_BIDI_CLASS_ON, 0, NULL, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, 66600, -1, -1, -1, false, false, false, false, utf8proc_sequences + 10387},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, 66601, -1, -1, -1, false, false, false, false, utf8proc_sequences + 10389},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, 66602, -1, -1, -1, false, false, false, false, utf8proc_sequences + 10391},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, 66603, -1, -1, -1, false, false, false, false, utf8proc_sequences + 10393},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, 66604, -1, -1, -1, false, false, false, false, utf8proc_sequences + 10395},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, 66605, -1, -1, -1, false, false, false, false, utf8proc_sequences + 10397},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, 66606, -1, -1, -1, false, false, false, false, utf8proc_sequences + 10399},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, 66607, -1, -1, -1, false, false, false, false, utf8proc_sequences + 10401},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, 66608, -1, -1, -1, false, false, false, false, utf8proc_sequences + 10403},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, 66609, -1, -1, -1, false, false, false, false, utf8proc_sequences + 10405},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, 66610, -1, -1, -1, false, false, false, false, utf8proc_sequences + 10407},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, 66611, -1, -1, -1, false, false, false, false, utf8proc_sequences + 10409},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, 66612, -1, -1, -1, false, false, false, false, utf8proc_sequences + 10411},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, 66613, -1, -1, -1, false, false, false, false, utf8proc_sequences + 10413},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, 66614, -1, -1, -1, false, false, false, false, utf8proc_sequences + 10415},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, 66615, -1, -1, -1, false, false, false, false, utf8proc_sequences + 10417},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, 66616, -1, -1, -1, false, false, false, false, utf8proc_sequences + 10419},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, 66617, -1, -1, -1, false, false, false, false, utf8proc_sequences + 10421},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, 66618, -1, -1, -1, false, false, false, false, utf8proc_sequences + 10423},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, 66619, -1, -1, -1, false, false, false, false, utf8proc_sequences + 10425},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, 66620, -1, -1, -1, false, false, false, false, utf8proc_sequences + 10427},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, 66621, -1, -1, -1, false, false, false, false, utf8proc_sequences + 10429},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, 66622, -1, -1, -1, false, false, false, false, utf8proc_sequences + 10431},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, 66623, -1, -1, -1, false, false, false, false, utf8proc_sequences + 10433},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, 66624, -1, -1, -1, false, false, false, false, utf8proc_sequences + 10435},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, 66625, -1, -1, -1, false, false, false, false, utf8proc_sequences + 10437},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, 66626, -1, -1, -1, false, false, false, false, utf8proc_sequences + 10439},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, 66627, -1, -1, -1, false, false, false, false, utf8proc_sequences + 10441},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, 66628, -1, -1, -1, false, false, false, false, utf8proc_sequences + 10443},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, 66629, -1, -1, -1, false, false, false, false, utf8proc_sequences + 10445},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, 66630, -1, -1, -1, false, false, false, false, utf8proc_sequences + 10447},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, 66631, -1, -1, -1, false, false, false, false, utf8proc_sequences + 10449},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, 66632, -1, -1, -1, false, false, false, false, utf8proc_sequences + 10451},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, 66633, -1, -1, -1, false, false, false, false, utf8proc_sequences + 10453},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, 66634, -1, -1, -1, false, false, false, false, utf8proc_sequences + 10455},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, 66635, -1, -1, -1, false, false, false, false, utf8proc_sequences + 10457},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, 66636, -1, -1, -1, false, false, false, false, utf8proc_sequences + 10459},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, 66637, -1, -1, -1, false, false, false, false, utf8proc_sequences + 10461},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, 66638, -1, -1, -1, false, false, false, false, utf8proc_sequences + 10463},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, 66639, -1, -1, -1, false, false, false, false, utf8proc_sequences + 10465},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, 66560, -1, 66560, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, 66561, -1, 66561, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, 66562, -1, 66562, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, 66563, -1, 66563, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, 66564, -1, 66564, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, 66565, -1, 66565, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, 66566, -1, 66566, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, 66567, -1, 66567, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, 66568, -1, 66568, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, 66569, -1, 66569, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, 66570, -1, 66570, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, 66571, -1, 66571, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, 66572, -1, 66572, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, 66573, -1, 66573, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, 66574, -1, 66574, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, 66575, -1, 66575, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, 66576, -1, 66576, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, 66577, -1, 66577, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, 66578, -1, 66578, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, 66579, -1, 66579, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, 66580, -1, 66580, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, 66581, -1, 66581, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, 66582, -1, 66582, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, 66583, -1, 66583, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, 66584, -1, 66584, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, 66585, -1, 66585, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, 66586, -1, 66586, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, 66587, -1, 66587, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, 66588, -1, 66588, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, 66589, -1, 66589, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, 66590, -1, 66590, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, 66591, -1, 66591, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, 66592, -1, 66592, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, 66593, -1, 66593, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, 66594, -1, 66594, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, 66595, -1, 66595, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, 66596, -1, 66596, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, 66597, -1, 66597, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, 66598, -1, 66598, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, 66599, -1, 66599, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_NO, 0, UTF8PROC_BIDI_CLASS_R, 0, NULL, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, -1, -1, 22080, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, -1, -1, 22140, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 10467, false, -1, -1, -1, -1, -1, true, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 10470, false, -1, -1, -1, 22200, -1, true, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 10473, false, -1, -1, -1, -1, -1, true, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 10476, false, -1, -1, -1, -1, -1, true, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 10479, false, -1, -1, -1, -1, -1, true, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 10482, false, -1, -1, -1, -1, -1, true, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 10485, false, -1, -1, -1, -1, -1, true, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_MC, 216, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, -1, -1, -1, 54, false, false, false, true, NULL},
+  {UTF8PROC_CATEGORY_MC, 216, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_MC, 226, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_MC, 216, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, -1, -1, -1, 55, false, false, false, true, NULL},
+  {UTF8PROC_CATEGORY_MC, 216, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, -1, -1, -1, 56, false, false, false, true, NULL},
+  {UTF8PROC_CATEGORY_MC, 216, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, -1, -1, -1, 57, false, false, false, true, NULL},
+  {UTF8PROC_CATEGORY_MC, 216, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, -1, -1, -1, 58, false, false, false, true, NULL},
+  {UTF8PROC_CATEGORY_MC, 216, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, -1, -1, -1, 59, false, false, false, true, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, -1, -1, 22260, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, 0, NULL, false, -1, -1, -1, 22320, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 10488, false, -1, -1, -1, 22380, -1, true, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 10491, false, -1, -1, -1, 22440, -1, true, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 10494, false, -1, -1, -1, -1, -1, true, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 10497, false, -1, -1, -1, -1, -1, true, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 10500, false, -1, -1, -1, -1, -1, true, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 10503, false, -1, -1, -1, -1, -1, true, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_FONT, utf8proc_sequences + 2376, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_FONT, utf8proc_sequences + 2388, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_FONT, utf8proc_sequences + 2394, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_FONT, utf8proc_sequences + 2396, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_FONT, utf8proc_sequences + 2404, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_FONT, utf8proc_sequences + 5231, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_FONT, utf8proc_sequences + 2412, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_FONT, utf8proc_sequences + 2414, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_FONT, utf8proc_sequences + 4662, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_FONT, utf8proc_sequences + 2416, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_FONT, utf8proc_sequences + 4689, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_FONT, utf8proc_sequences + 5245, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_FONT, utf8proc_sequences + 0, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_FONT, utf8proc_sequences + 2, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_FONT, utf8proc_sequences + 4, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_FONT, utf8proc_sequences + 10, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_FONT, utf8proc_sequences + 20, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_FONT, utf8proc_sequences + 24, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_FONT, utf8proc_sequences + 26, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_FONT, utf8proc_sequences + 30, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_FONT, utf8proc_sequences + 32, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_FONT, utf8proc_sequences + 34, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_FONT, utf8proc_sequences + 36, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_FONT, utf8proc_sequences + 38, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_FONT, utf8proc_sequences + 40, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_FONT, utf8proc_sequences + 42, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_FONT, utf8proc_sequences + 44, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_FONT, utf8proc_sequences + 46, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_FONT, utf8proc_sequences + 48, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_FONT, utf8proc_sequences + 50, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_FONT, utf8proc_sequences + 10506, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_FONT, utf8proc_sequences + 10508, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_FONT, utf8proc_sequences + 10510, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_FONT, utf8proc_sequences + 10512, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_FONT, utf8proc_sequences + 10514, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_FONT, utf8proc_sequences + 10516, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_FONT, utf8proc_sequences + 10518, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_FONT, utf8proc_sequences + 10520, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_FONT, utf8proc_sequences + 1504, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_FONT, utf8proc_sequences + 10522, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_FONT, utf8proc_sequences + 10524, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_FONT, utf8proc_sequences + 10526, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_FONT, utf8proc_sequences + 10528, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_FONT, utf8proc_sequences + 10530, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_FONT, utf8proc_sequences + 10532, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_FONT, utf8proc_sequences + 10534, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_FONT, utf8proc_sequences + 10536, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_FONT, utf8proc_sequences + 10538, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_FONT, utf8proc_sequences + 1508, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_FONT, utf8proc_sequences + 10540, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_FONT, utf8proc_sequences + 1470, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_FONT, utf8proc_sequences + 10542, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_FONT, utf8proc_sequences + 10544, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_FONT, utf8proc_sequences + 10546, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_FONT, utf8proc_sequences + 4567, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SM, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_FONT, utf8proc_sequences + 10548, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_FONT, utf8proc_sequences + 1382, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_FONT, utf8proc_sequences + 1384, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_FONT, utf8proc_sequences + 1388, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_FONT, utf8proc_sequences + 1390, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_FONT, utf8proc_sequences + 1392, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_FONT, utf8proc_sequences + 1394, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_FONT, utf8proc_sequences + 1396, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_FONT, utf8proc_sequences + 1326, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_FONT, utf8proc_sequences + 1398, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_FONT, utf8proc_sequences + 1400, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_FONT, utf8proc_sequences + 67, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_FONT, utf8proc_sequences + 1402, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_FONT, utf8proc_sequences + 1404, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_FONT, utf8proc_sequences + 1406, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_FONT, utf8proc_sequences + 1410, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_FONT, utf8proc_sequences + 1502, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_FONT, utf8proc_sequences + 1412, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_FONT, utf8proc_sequences + 1414, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_FONT, utf8proc_sequences + 1416, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_FONT, utf8proc_sequences + 1418, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_FONT, utf8proc_sequences + 1420, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_FONT, utf8proc_sequences + 1422, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_FONT, utf8proc_sequences + 1424, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_SM, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_FONT, utf8proc_sequences + 10550, true, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_FONT, utf8proc_sequences + 10552, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_FONT, utf8proc_sequences + 10554, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_FONT, utf8proc_sequences + 10556, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_FONT, utf8proc_sequences + 10558, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_FONT, utf8proc_sequences + 10560, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_FONT, utf8proc_sequences + 10562, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LU, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_FONT, utf8proc_sequences + 10564, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LL, 0, UTF8PROC_BIDI_CLASS_L, UTF8PROC_DECOMP_TYPE_FONT, utf8proc_sequences + 1482, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_ND, 0, UTF8PROC_BIDI_CLASS_EN, UTF8PROC_DECOMP_TYPE_FONT, utf8proc_sequences + 4497, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_ND, 0, UTF8PROC_BIDI_CLASS_EN, UTF8PROC_DECOMP_TYPE_FONT, utf8proc_sequences + 72, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_ND, 0, UTF8PROC_BIDI_CLASS_EN, UTF8PROC_DECOMP_TYPE_FONT, utf8proc_sequences + 60, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_ND, 0, UTF8PROC_BIDI_CLASS_EN, UTF8PROC_DECOMP_TYPE_FONT, utf8proc_sequences + 62, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_ND, 0, UTF8PROC_BIDI_CLASS_EN, UTF8PROC_DECOMP_TYPE_FONT, utf8proc_sequences + 4499, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_ND, 0, UTF8PROC_BIDI_CLASS_EN, UTF8PROC_DECOMP_TYPE_FONT, utf8proc_sequences + 4501, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_ND, 0, UTF8PROC_BIDI_CLASS_EN, UTF8PROC_DECOMP_TYPE_FONT, utf8proc_sequences + 4503, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_ND, 0, UTF8PROC_BIDI_CLASS_EN, UTF8PROC_DECOMP_TYPE_FONT, utf8proc_sequences + 4505, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_ND, 0, UTF8PROC_BIDI_CLASS_EN, UTF8PROC_DECOMP_TYPE_FONT, utf8proc_sequences + 4507, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_ND, 0, UTF8PROC_BIDI_CLASS_EN, UTF8PROC_DECOMP_TYPE_FONT, utf8proc_sequences + 4509, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 10566, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 10568, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 10570, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 10572, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 10574, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 10576, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 10578, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 10580, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 10582, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 10584, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 10586, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 10588, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 10590, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 10592, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 10594, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 10596, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 10598, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 10600, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 10602, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 10604, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 10606, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 10608, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 10610, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 10612, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 10614, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 5518, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 10616, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 10618, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 10620, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 10622, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 10624, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 10626, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 10628, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 10630, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 10632, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 10634, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 10636, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 10638, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 10640, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 10642, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 10644, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 10646, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 10648, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 10650, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 10652, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 10654, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 10656, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 10658, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 10660, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 10662, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 10664, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 10666, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 10668, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 10670, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 10672, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 10674, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 10676, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 10678, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 10680, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 10682, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 10684, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 10686, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 10688, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 10690, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 10692, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 10694, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 10696, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 10698, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 10700, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 10702, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 10704, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 10706, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 10708, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 10710, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 10712, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 10714, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 10716, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 10718, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 10720, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 10722, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 10724, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 10726, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 10728, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 10730, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 10732, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 10734, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 10736, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 10738, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 10740, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 10742, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 10744, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 10746, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 10748, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 10750, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 10752, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 10754, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 10756, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 10758, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 10760, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 5570, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 10762, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 10764, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 10766, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 10768, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 10770, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 10772, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 10774, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 10776, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 10778, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 10780, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 10782, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 10784, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 10786, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 10788, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 10790, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 10792, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 10794, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 10796, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 10798, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 10800, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 10802, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 10804, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 10806, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 10808, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 5594, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 10810, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 10812, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 10814, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 10816, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 10818, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 10820, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 10822, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 10824, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 10826, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 10828, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 10830, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 10832, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 10834, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 10836, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 10838, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 10840, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 10842, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 10844, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 10846, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 10848, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 10850, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 10852, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 10854, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 10856, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 10858, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 10860, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 10862, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 10864, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 10866, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 10868, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 10870, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 10872, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 10874, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 10876, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 10878, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 10880, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 10882, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 10884, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 10886, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 10888, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 10890, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 10892, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 10894, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 10896, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 10898, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 10900, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 10902, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 10904, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 10906, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 10908, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 10910, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 10912, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 10914, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 10916, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 10918, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 10920, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 10922, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 10924, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 10926, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 10928, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 10930, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 10932, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 10934, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 10936, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 10938, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 10940, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 10942, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 10944, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 10946, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 10948, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 10950, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 10952, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 10954, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 10956, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 10958, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 10960, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 10962, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 10964, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 10966, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 10968, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 10970, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 10972, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 10974, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 10976, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 10978, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 10980, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 10982, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 10984, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 10986, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 10988, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 10990, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 10992, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 10994, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 10996, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 10998, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 11000, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 11002, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 11004, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 11006, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 11008, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 11010, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 11012, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 11014, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 11016, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 11018, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 11020, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 11022, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 11024, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 11026, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 11028, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 11030, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 11032, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 11034, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 11036, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 11038, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 11040, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 11042, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 11044, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 11046, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 11048, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 11050, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 11052, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 11054, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 11056, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 11058, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 11060, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 11062, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 11064, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 11066, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 11068, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 11070, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 11072, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 11074, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 11076, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 11078, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 11080, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 11082, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 11084, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 11086, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 11088, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 11090, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 11092, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 11094, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 11096, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 11098, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 11100, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 11102, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 11104, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 11106, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 11108, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 11110, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 11112, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 11114, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 11116, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 11118, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 11120, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 11122, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 11124, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 11126, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 11128, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 11130, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 11132, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 11134, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 11136, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 11138, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 11140, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 11142, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 11144, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 11146, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 11148, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 11150, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 11152, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 11154, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 11156, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 11158, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 11160, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 11162, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 11164, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 11166, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 11168, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 11170, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 11172, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 11174, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 11176, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 11178, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 11180, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 11182, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 11184, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 11186, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 11188, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 11190, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 11192, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 11194, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 11196, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 11198, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 11200, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 11202, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 11204, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 11206, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 11208, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 11210, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 11212, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 11214, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 11216, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 11218, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 11220, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 11222, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 11224, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 11226, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 11228, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 11230, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 11232, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 11234, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 11236, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 11238, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 11240, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 11242, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 11244, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 11246, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 11248, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 11250, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 11252, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 11254, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 11256, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 11258, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 11260, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 11262, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 11264, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 11266, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 11268, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 11270, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 11272, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 11274, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 11276, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 11278, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 11280, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 11282, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 11284, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 11286, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 11288, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 11290, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 11292, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 11294, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 11296, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 11298, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 11300, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 11302, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 11304, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 11306, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 11308, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 11310, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 11312, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 11314, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 11316, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 11318, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 11320, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 11322, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 11324, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 11326, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 11328, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 11330, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 11332, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 11334, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 11336, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 11338, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 11340, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 11342, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 11344, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 5774, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 11346, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 11348, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 11350, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 11352, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 11354, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 11356, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 11358, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 11360, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 11362, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 11364, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 11366, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 5788, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 11368, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 11370, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 11372, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 11374, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 11376, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 11378, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 11380, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 11382, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 11384, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 11386, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 11388, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 11390, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 11392, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 11394, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 11396, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 11398, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 11400, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 11402, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 11404, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 11406, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 11408, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 11410, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 11412, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 11414, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 11416, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 11418, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 11420, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 11422, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 11424, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 11426, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 11428, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 11430, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 11432, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 11434, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 11436, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 11438, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 11440, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 11442, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 11444, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 11446, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 11448, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 11450, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 11452, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 11454, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 11456, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 11458, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 11460, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 11462, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 11464, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 11466, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 11468, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 11470, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 11472, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 11474, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 11476, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 11478, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 11480, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 11482, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 11484, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 11486, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 11488, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 11490, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 5884, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 11492, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 5892, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 11494, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 11496, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 11498, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 11500, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 5902, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+  {UTF8PROC_CATEGORY_LO, 0, UTF8PROC_BIDI_CLASS_L, 0, utf8proc_sequences + 11502, false, -1, -1, -1, -1, -1, false, false, false, false, NULL},
+};
+
+const int32_t utf8proc_combinations[] = {
+  192, 193, 194, 195, 196, 197, -1, 
+  256, 258, 260, 550, 461, -1, -1, 512, 
+  514, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  7680, 7840, -1, -1, -1, -1, -1, 7842, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, 262, 264, 
+  -1, -1, -1, 199, -1, -1, -1, 266, 
+  268, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, 200, 201, 202, 7868, 203, -1, 552, 
+  274, 276, 280, 278, 282, -1, -1, 516, 
+  518, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, 7864, -1, 7704, 7706, -1, -1, 7866, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, 204, 205, 206, 
+  296, 207, -1, -1, 298, 300, 302, 304, 
+  463, -1, -1, 520, 522, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, 7882, -1, -1, 
+  7724, -1, -1, 7880, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, 504, 323, -1, 209, -1, -1, 325, 
+  -1, -1, -1, 7748, 327, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, 7750, 7752, 7754, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, 210, 211, 212, 
+  213, 214, -1, -1, 332, 334, 490, 558, 
+  465, 336, 416, 524, 526, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, 7884, -1, -1, 
+  -1, -1, -1, 7886, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, 217, 218, 219, 360, 220, 366, -1, 
+  362, 364, 370, -1, 467, 368, 431, 532, 
+  534, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, 7908, -1, 7798, 7796, -1, 7794, 7910, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, 7922, 221, 374, 
+  7928, 376, -1, -1, 562, -1, -1, 7822, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, 7924, -1, -1, 
+  -1, -1, -1, 7926, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, 224, 225, 226, 227, 228, 229, -1, 
+  257, 259, 261, 551, 462, -1, -1, 513, 
+  515, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  7681, 7841, -1, -1, -1, -1, -1, 7843, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, 263, 265, 
+  -1, -1, -1, 231, -1, -1, -1, 267, 
+  269, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, 232, 233, 234, 7869, 235, -1, 553, 
+  275, 277, 281, 279, 283, -1, -1, 517, 
+  519, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, 7865, -1, 7705, 7707, -1, -1, 7867, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, 236, 237, 238, 
+  297, 239, -1, -1, 299, 301, 303, -1, 
+  464, -1, -1, 521, 523, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, 7883, -1, -1, 
+  7725, -1, -1, 7881, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, 505, 324, -1, 241, -1, -1, 326, 
+  -1, -1, -1, 7749, 328, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, 7751, 7753, 7755, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, 242, 243, 244, 
+  245, 246, -1, -1, 333, 335, 491, 559, 
+  466, 337, 417, 525, 527, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, 7885, -1, -1, 
+  -1, -1, -1, 7887, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, 249, 250, 251, 361, 252, 367, -1, 
+  363, 365, 371, -1, 468, 369, 432, 533, 
+  535, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, 7909, -1, 7799, 7797, -1, 7795, 7911, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, 7923, 253, 375, 
+  7929, 255, 7833, -1, 563, -1, -1, 7823, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, 7925, -1, -1, 
+  -1, -1, -1, 7927, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, 7696, 
+  -1, -1, -1, 7690, 270, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, 7692, 7694, 7698, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, 7697, -1, -1, -1, 7691, 
+  271, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, 7693, 7695, 7699, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, 500, 284, -1, -1, -1, 290, 
+  7712, 286, -1, 288, 486, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, 501, 285, 
+  -1, -1, -1, 291, 7713, 287, -1, 289, 
+  487, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, 292, -1, 7718, -1, 7720, 
+  -1, -1, -1, 7714, 542, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, 7716, -1, -1, -1, 7722, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, 293, 
+  -1, 7719, -1, 7721, -1, -1, -1, 7715, 
+  543, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, 7717, 7830, -1, 
+  -1, 7723, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, 308, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, 309, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  496, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, 7728, -1, -1, -1, -1, 310, 
+  -1, -1, -1, -1, 488, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, 7730, 7732, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, 7729, -1, 
+  -1, -1, -1, 311, -1, -1, -1, -1, 
+  489, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, 7731, 7733, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, 313, -1, -1, -1, -1, 315, 
+  -1, -1, -1, -1, 317, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, 7734, 7738, 7740, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, 314, -1, 
+  -1, -1, -1, 316, -1, -1, -1, -1, 
+  318, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, 7735, 7739, 7741, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, 340, -1, -1, -1, -1, 342, 
+  -1, -1, -1, 7768, 344, -1, -1, 528, 
+  530, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, 7770, 7774, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, 341, -1, 
+  -1, -1, -1, 343, -1, -1, -1, 7769, 
+  345, -1, -1, 529, 531, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, 7771, 7775, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, 346, 348, -1, -1, -1, 350, 
+  -1, -1, -1, 7776, 352, -1, -1, -1, 
+  -1, 536, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, 7778, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, 347, 349, 
+  -1, -1, -1, 351, -1, -1, -1, 7777, 
+  353, -1, -1, -1, -1, 537, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, 7779, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, 354, 
+  -1, -1, -1, 7786, 356, -1, -1, -1, 
+  -1, 538, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, 7788, 7790, 7792, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, 7831, -1, 355, -1, -1, -1, 7787, 
+  357, -1, -1, -1, -1, 539, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, 7789, 7791, 7793, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, 7808, 7810, 372, -1, 7812, -1, -1, 
+  -1, -1, -1, 7814, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, 7816, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, 7809, 7811, 373, 
+  -1, 7813, 7832, -1, -1, -1, -1, 7815, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, 7817, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, 377, 7824, -1, -1, -1, -1, 
+  -1, -1, -1, 379, 381, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, 7826, 7828, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, 378, 7825, 
+  -1, -1, -1, -1, -1, -1, -1, 380, 
+  382, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, 7827, 7829, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, 475, 471, -1, -1, -1, -1, -1, 
+  469, -1, -1, -1, 473, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, 476, 472, -1, 
+  -1, -1, -1, -1, 470, -1, -1, -1, 
+  474, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  478, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, 479, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  480, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, 481, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, 508, -1, -1, -1, -1, -1, 
+  482, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, 509, -1, 
+  -1, -1, -1, -1, 483, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  492, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, 493, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, 494, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  495, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, 506, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, 507, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, 510, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, 511, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  554, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, 555, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, 7756, -1, -1, 7758, -1, -1, 
+  556, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, 7757, -1, 
+  -1, 7759, -1, -1, 557, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  560, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, 561, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, 8173, 901, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, 8129, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, 8122, 902, -1, 
+  -1, -1, -1, -1, 8121, 8120, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, 7944, 7945, -1, 8124, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, 8136, 904, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  7960, 7961, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, 8138, 905, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, 7976, 7977, -1, 8140, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, 8154, 906, -1, -1, 938, -1, -1, 
+  8153, 8152, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  7992, 7993, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, 8184, 908, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, 8008, 8009, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, 8170, 910, -1, -1, 939, -1, -1, 
+  8169, 8168, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, 8025, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, 8186, 911, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, 8040, 8041, -1, 8188, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, 8146, 912, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, 8151, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, 8048, 940, -1, 
+  -1, -1, -1, -1, 8113, 8112, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, 7936, 7937, 8118, 8115, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, 8050, 941, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  7952, 7953, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, 8052, 942, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, 7968, 7969, 8134, 8131, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, 8054, 943, -1, -1, 970, -1, -1, 
+  8145, 8144, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  7984, 7985, 8150, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, 8162, 944, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, 8167, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, 8058, 973, -1, -1, 971, -1, -1, 
+  8161, 8160, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  8016, 8017, 8166, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, 8056, 972, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, 8000, 8001, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, 8060, 974, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  8032, 8033, 8182, 8179, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, 979, -1, 
+  -1, 980, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, 1024, -1, -1, -1, 1025, -1, -1, 
+  -1, 1238, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, 1027, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, 1031, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, 1036, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, 1037, -1, -1, -1, 1252, -1, -1, 
+  1250, 1049, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, 1264, -1, -1, 1262, 1038, -1, -1, 
+  -1, 1266, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, 1117, -1, -1, -1, 1253, -1, -1, 
+  1251, 1081, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, 1104, -1, -1, 
+  -1, 1105, -1, -1, -1, 1239, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, 1107, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, 1111, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, 1116, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, 1265, -1, -1, 1263, 1118, -1, -1, 
+  -1, 1267, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, 1142, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, 1143, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, 1244, -1, -1, 
+  -1, 1217, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, 1245, -1, -1, -1, 1218, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, 1234, -1, -1, 
+  -1, 1232, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, 1235, -1, -1, -1, 1233, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, 1242, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, 1243, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, 1246, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, 1247, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, 1254, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, 1255, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, 1258, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, 1259, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, 1260, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, 1261, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, 1268, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, 1269, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, 1272, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, 1273, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, 1570, 1571, 1573, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, 1572, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, 1574, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, 1728, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, 1730, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, 1747, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, 2345, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, 2353, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, 2356, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, 2507, 2508, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  2888, 2891, 2892, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, 2964, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, 3020, 3018, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  3019, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, 3144, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, 3264, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, 3271, 3272, 
+  3274, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, 3275, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, 3402, 3404, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, 3403, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, 3546, 3548, 3550, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, 3549, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, 4134, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, 6918, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, 6920, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, 6922, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, 6924, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, 6926, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, 6930, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, 6971, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, 6973, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, 6976, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, 6977, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, 6979, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, 7682, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, 7684, 7686, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, 7683, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, 7685, 7687, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, 7688, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, 7689, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, 7700, 7702, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, 7701, 7703, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, 7708, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, 7709, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, 7710, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, 7711, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, 7726, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, 7727, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  7736, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, 7737, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, 7742, -1, -1, -1, -1, -1, 
+  -1, -1, -1, 7744, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, 7746, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, 7743, -1, 
+  -1, -1, -1, -1, -1, -1, -1, 7745, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, 7747, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, 7760, 7762, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, 7761, 7763, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, 7764, -1, -1, -1, -1, -1, 
+  -1, -1, -1, 7766, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, 7765, -1, 
+  -1, -1, -1, -1, -1, -1, -1, 7767, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  7772, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, 7773, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, 7780, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, 7781, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, 7782, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, 7783, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, 7784, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, 7785, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, 7800, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, 7801, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, 7802, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, 7803, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, 7804, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, 7806, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  7805, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, 7807, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, 7820, -1, -1, 
+  -1, -1, -1, 7818, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, 7821, -1, -1, -1, -1, -1, 7819, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, 7835, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, 7846, 7844, -1, 
+  7850, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, 7848, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, 7847, 7845, -1, 7851, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, 7849, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, 7852, 
+  -1, -1, -1, -1, -1, 7862, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, 7853, -1, -1, -1, -1, 
+  -1, 7863, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, 7856, 7854, -1, 
+  7860, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, 7858, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, 7857, 7855, -1, 7861, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, 7859, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, 7872, 7870, -1, 
+  7876, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, 7874, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, 7873, 7871, -1, 7877, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, 7875, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, 7878, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, 7879, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, 7890, 7888, -1, 
+  7894, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, 7892, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, 7891, 7889, -1, 7895, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, 7893, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, 7896, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, 7897, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, 7900, 7898, -1, 
+  7904, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, 7906, -1, -1, 
+  -1, -1, -1, 7902, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, 7901, 7899, -1, 7905, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, 7907, -1, -1, -1, -1, -1, 7903, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, 7914, 7912, -1, 
+  7918, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, 7920, -1, -1, 
+  -1, -1, -1, 7916, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, 7915, 7913, -1, 7919, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, 7921, -1, -1, -1, -1, -1, 7917, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, 7938, 7940, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, 7942, 8064, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, 7939, 7941, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, 7943, 8065, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, 7946, 7948, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, 7950, 8072, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, 7947, 7949, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, 7951, 8073, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, 7954, 7956, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, 7955, 7957, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, 7962, 7964, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, 7963, 7965, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, 7970, 7972, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, 7974, 8080, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, 7971, 7973, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, 7975, 8081, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, 7978, 7980, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, 7982, 8088, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, 7979, 7981, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, 7983, 8089, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, 7986, 7988, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, 7990, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, 7987, 7989, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, 7991, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, 7994, 7996, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, 7998, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, 7995, 7997, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, 7999, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, 8002, 8004, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, 8003, 8005, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, 8010, 8012, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, 8011, 8013, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, 8018, 8020, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, 8022, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, 8019, 8021, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, 8023, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, 8027, 8029, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, 8031, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, 8034, 8036, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, 8038, 8096, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, 8035, 8037, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, 8039, 8097, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, 8042, 8044, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, 8046, 8104, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, 8043, 8045, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, 8047, 8105, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, 8066, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, 8067, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, 8068, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, 8069, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, 8070, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, 8071, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, 8074, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, 8075, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, 8076, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, 8077, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, 8078, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, 8079, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, 8082, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, 8083, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, 8084, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, 8085, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, 8086, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, 8087, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, 8090, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, 8091, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, 8092, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, 8093, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, 8094, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, 8095, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, 8098, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, 8099, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, 8100, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, 8101, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, 8102, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, 8103, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, 8106, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, 8107, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, 8108, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, 8109, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, 8110, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, 8111, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, 8114, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, 8116, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, 8119, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, 8130, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, 8132, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, 8135, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, 8141, 8142, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, 8143, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, 8157, 8158, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, 8159, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  8164, 8165, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, 8172, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, 8178, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, 8180, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, 8183, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  8602, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, 8603, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  8622, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, 8653, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  8654, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, 8655, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  8708, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, 8713, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  8716, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, 8740, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  8742, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, 8769, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  8772, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, 8775, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  8777, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, 8800, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  8802, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, 8813, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  8814, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, 8815, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  8816, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, 8817, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  8820, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, 8821, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  8824, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, 8825, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  8832, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, 8833, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  8836, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, 8837, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  8840, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, 8841, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  8876, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, 8877, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  8878, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, 8879, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  8928, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, 8929, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  8930, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, 8931, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  8938, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, 8939, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  8940, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, 8941, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  10972, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, 12364, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, 12366, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, 12368, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, 12370, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, 12372, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, 12374, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, 12376, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, 12378, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, 12380, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, 12382, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, 12384, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, 12386, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, 12389, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, 12391, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, 12393, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, 12400, 12401, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, 12403, 12404, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, 12406, 12407, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, 12409, 12410, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, 12412, 12413, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, 12436, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, 12446, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, 12460, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, 12462, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, 12464, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, 12466, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, 12468, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, 12470, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, 12472, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, 12474, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, 12476, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, 12478, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, 12480, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, 12482, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, 12485, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, 12487, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, 12489, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, 12496, 12497, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, 12499, 12500, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, 12502, 12503, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, 12505, 12506, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, 12508, 12509, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, 12532, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, 12535, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, 12536, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, 12537, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, 12538, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, 12542, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, 119134, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, 119135, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  119136, 119137, 119138, 119139, 119140, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, 119227, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, 119228, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, 119229, 119231, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  -1, -1, -1, -1, -1, -1, -1, -1, 
+  119230, 119232, -1, -1, -1, };
+
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/src_netcdf4/v1hpg.c
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/src_netcdf4/v1hpg.c	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/src_netcdf4/v1hpg.c	(revision 1749)
@@ -0,0 +1,1400 @@
+/*
+ *	Copyright 1996, University Corporation for Atmospheric Research
+ *      See netcdf/COPYRIGHT file for copying and redistribution conditions.
+ */
+/* $Id: v1hpg.c,v 1.70 2010/05/26 21:43:34 dmh Exp $ */
+
+#include "config.h"
+#include "nc.h"
+#include <stdlib.h>
+#include <stdio.h>
+#include <string.h>
+#include <assert.h>
+#include "rnd.h"
+#include "ncx.h"
+
+/*
+ * This module defines the external representation
+ * of the "header" of a netcdf version one file and
+ * the version two variant that uses 64-bit file 
+ * offsets instead of the 32-bit file offsets in version 
+ * one files.
+ * For each of the components of the NC structure,
+ * There are (static) ncx_len_XXX(), v1h_put_XXX()
+ * and v1h_get_XXX() functions. These define the
+ * external representation of the components.
+ * The exported entry points for the whole NC structure
+ * are built up from these.
+ */
+
+
+/*
+ * "magic number" at beginning of file: 0x43444601 (big endian)
+ * assert(sizeof(ncmagic) % X_ALIGN == 0);
+ */
+static const schar ncmagic[] = {'C', 'D', 'F', 0x02};
+static const schar ncmagic1[] = {'C', 'D', 'F', 0x01};
+
+
+/*
+ * v1hs == "Version 1 Header Stream"
+ *
+ * The netcdf file version 1 header is
+ * of unknown and potentially unlimited size.
+ * So, we don't know how much to get() on
+ * the initial read. We build a stream, 'v1hs'
+ * on top of ncio to do the header get.
+ */
+typedef struct v1hs {
+	ncio *nciop;
+	off_t offset;	/* argument to nciop->get() */
+	size_t extent;	/* argument to nciop->get() */
+	int flags;	/* set to RGN_WRITE for write */
+        int version;    /* format variant: NC_FORMAT_CLASSIC or NC_FORMAT_64BIT */
+	void *base;	/* beginning of current buffer */
+	void *pos;	/* current position in buffer */
+	void *end;	/* end of current buffer = base + extent */
+} v1hs;
+
+
+/*
+ * Release the stream, invalidate buffer
+ */
+static int
+rel_v1hs(v1hs *gsp)
+{
+	int status;
+	if(gsp->offset == OFF_NONE || gsp->base == NULL)
+		return ENOERR;
+	status = ncio_rel(gsp->nciop, gsp->offset,
+			 gsp->flags == RGN_WRITE ? RGN_MODIFIED : 0);
+	gsp->end = NULL;
+	gsp->pos = NULL;
+	gsp->base = NULL;
+	return status;
+}
+
+
+/*
+ * Release the current chunk and get the next one.
+ * Also used for initialization when gsp->base == NULL.
+ */
+static int
+fault_v1hs(v1hs *gsp, size_t extent)
+{
+	int status;
+
+	if(gsp->base != NULL)
+	{
+		const ptrdiff_t incr = (char *)gsp->pos - (char *)gsp->base;
+		status = rel_v1hs(gsp);
+		if(status)
+			return status;
+		gsp->offset += incr;
+	}
+	
+	if(extent > gsp->extent)
+		gsp->extent = extent;	
+
+	status = ncio_get(gsp->nciop,
+		 	gsp->offset, gsp->extent,
+			gsp->flags, &gsp->base);
+	if(status)
+		return status;
+
+	gsp->pos = gsp->base;
+	gsp->end = (char *)gsp->base + gsp->extent;
+
+	return ENOERR;
+}
+
+
+/*
+ * Ensure that 'nextread' bytes are available.
+ */
+static int
+check_v1hs(v1hs *gsp, size_t nextread)
+{
+
+#if 0 /* DEBUG */
+fprintf(stderr, "nextread %lu, remaining %lu\n",
+	(unsigned long)nextread,
+	(unsigned long)((char *)gsp->end - (char *)gsp->pos));
+#endif
+
+	if((char *)gsp->pos + nextread <= (char *)gsp->end)
+		return ENOERR;
+	return fault_v1hs(gsp, nextread);
+}
+
+/* End v1hs */
+
+/* Write a size_t to the header */
+static int
+v1h_put_size_t(v1hs *psp, const size_t *sp)
+{
+	int status = check_v1hs(psp, X_SIZEOF_SIZE_T);
+	if(status != ENOERR)
+		return status;
+	return ncx_put_size_t(&psp->pos, sp);
+}
+
+
+/* Read a size_t from the header */
+static int
+v1h_get_size_t(v1hs *gsp, size_t *sp)
+{
+	int status = check_v1hs(gsp, X_SIZEOF_SIZE_T);
+	if(status != ENOERR)
+		return status;
+	return ncx_get_size_t((const void **)(&gsp->pos), sp);
+}
+
+
+/* Begin nc_type */
+
+#define X_SIZEOF_NC_TYPE X_SIZEOF_INT
+
+/* Write a nc_type to the header */
+static int
+v1h_put_nc_type(v1hs *psp, const nc_type *typep)
+{
+	const int itype = (int) *typep;
+	int status = check_v1hs(psp, X_SIZEOF_INT);
+	if(status != ENOERR)
+		return status;
+	status =  ncx_put_int_int(psp->pos, &itype);
+	psp->pos = (void *)((char *)psp->pos + X_SIZEOF_INT);
+	return status;
+}
+
+
+/* Read a nc_type from the header */
+static int
+v1h_get_nc_type(v1hs *gsp, nc_type *typep)
+{
+	int type = 0;
+	int status = check_v1hs(gsp, X_SIZEOF_INT);
+	if(status != ENOERR)
+		return status;
+	status =  ncx_get_int_int(gsp->pos, &type);
+	gsp->pos = (void *)((char *)gsp->pos + X_SIZEOF_INT);
+	if(status != ENOERR)
+		return status;
+
+	assert(type == NC_BYTE
+		|| type == NC_CHAR
+		|| type == NC_SHORT
+		|| type == NC_INT
+		|| type == NC_FLOAT
+		|| type == NC_DOUBLE);
+
+	/* else */
+	*typep = (nc_type) type;
+
+	return ENOERR;
+}
+
+/* End nc_type */
+/* Begin NCtype (internal tags) */
+
+#define X_SIZEOF_NCTYPE X_SIZEOF_INT
+
+/* Write a NCtype to the header */
+static int
+v1h_put_NCtype(v1hs *psp, NCtype type)
+{
+	const int itype = (int) type;
+	int status = check_v1hs(psp, X_SIZEOF_INT);
+	if(status != ENOERR)
+		return status;
+	status = ncx_put_int_int(psp->pos, &itype);
+	psp->pos = (void *)((char *)psp->pos + X_SIZEOF_INT);
+	return status;
+}
+
+/* Read a NCtype from the header */
+static int
+v1h_get_NCtype(v1hs *gsp, NCtype *typep)
+{
+	int type = 0;
+	int status = check_v1hs(gsp, X_SIZEOF_INT);
+	if(status != ENOERR)
+		return status;
+	status =  ncx_get_int_int(gsp->pos, &type);
+	gsp->pos = (void *)((char *)gsp->pos + X_SIZEOF_INT);
+	if(status != ENOERR)
+		return status;
+	/* else */
+	*typep = (NCtype) type;
+	return ENOERR;
+}
+
+/* End NCtype */
+/* Begin NC_string */
+
+/*
+ * How much space will the xdr'd string take.
+ * Formerly
+NC_xlen_string(cdfstr)
+ */
+static size_t
+ncx_len_NC_string(const NC_string *ncstrp)
+{
+	size_t sz = X_SIZEOF_SIZE_T; /* nchars */
+
+	assert(ncstrp != NULL);
+
+	if(ncstrp->nchars != 0) 
+	{
+#if 0
+		assert(ncstrp->nchars % X_ALIGN == 0);
+		sz += ncstrp->nchars;
+#else
+		sz += _RNDUP(ncstrp->nchars, X_ALIGN);
+#endif
+	}
+	return sz;
+}
+
+
+/* Write a NC_string to the header */
+static int
+v1h_put_NC_string(v1hs *psp, const NC_string *ncstrp)
+{
+	int status;
+
+#if 0
+	assert(ncstrp->nchars % X_ALIGN == 0);
+#endif
+
+	status = v1h_put_size_t(psp, &ncstrp->nchars);
+	if(status != ENOERR)
+		return status;
+	status = check_v1hs(psp, _RNDUP(ncstrp->nchars, X_ALIGN));
+	if(status != ENOERR)
+		return status;
+	status = ncx_pad_putn_text(&psp->pos, ncstrp->nchars, ncstrp->cp);
+	if(status != ENOERR)
+		return status;
+
+	return ENOERR;
+}
+
+
+/* Read a NC_string from the header */
+static int
+v1h_get_NC_string(v1hs *gsp, NC_string **ncstrpp)
+{
+	int status;
+	size_t nchars = 0;
+	NC_string *ncstrp;
+
+	status = v1h_get_size_t(gsp, &nchars);
+	if(status != ENOERR)
+		return status;
+
+	ncstrp = new_NC_string(nchars, NULL);
+	if(ncstrp == NULL)
+	{
+		return NC_ENOMEM;
+	}
+
+
+#if 0
+/* assert(ncstrp->nchars == nchars || ncstrp->nchars - nchars < X_ALIGN); */
+	assert(ncstrp->nchars % X_ALIGN == 0);
+	status = check_v1hs(gsp, ncstrp->nchars);
+#else
+	
+	status = check_v1hs(gsp, _RNDUP(ncstrp->nchars, X_ALIGN));
+#endif
+	if(status != ENOERR)
+		goto unwind_alloc;
+
+	status = ncx_pad_getn_text((const void **)(&gsp->pos),
+		 nchars, ncstrp->cp);
+	if(status != ENOERR)
+		goto unwind_alloc;
+
+	*ncstrpp = ncstrp;
+
+	return ENOERR;
+
+unwind_alloc:
+	free_NC_string(ncstrp);
+	return status;
+	
+}
+
+/* End NC_string */
+/* Begin NC_dim */
+
+/*
+ * How much space will the xdr'd dim take.
+ * Formerly
+NC_xlen_dim(dpp)
+ */
+static size_t
+ncx_len_NC_dim(const NC_dim *dimp)
+{
+	size_t sz;
+
+	assert(dimp != NULL);
+
+	sz = ncx_len_NC_string(dimp->name);
+	sz += X_SIZEOF_SIZE_T;
+
+	return(sz);
+}
+
+
+/* Write a NC_dim to the header */
+static int
+v1h_put_NC_dim(v1hs *psp, const NC_dim *dimp)
+{
+	int status;
+
+	status = v1h_put_NC_string(psp, dimp->name);
+	if(status != ENOERR)
+		return status;
+
+	status = v1h_put_size_t(psp, &dimp->size);
+	if(status != ENOERR)
+		return status;
+
+	return ENOERR;
+}
+
+/* Read a NC_dim from the header */
+static int
+v1h_get_NC_dim(v1hs *gsp, NC_dim **dimpp)
+{
+	int status;
+	NC_string *ncstrp;
+	NC_dim *dimp;
+
+	status = v1h_get_NC_string(gsp, &ncstrp);
+	if(status != ENOERR)
+		return status;
+
+	dimp = new_x_NC_dim(ncstrp);
+	if(dimp == NULL)
+	{
+		status = NC_ENOMEM;
+		goto unwind_name;
+	}
+
+	status = v1h_get_size_t(gsp, &dimp->size);
+	if(status != ENOERR)
+	{
+		free_NC_dim(dimp); /* frees name */
+		return status;
+	}
+
+	*dimpp = dimp;
+
+	return ENOERR;
+
+unwind_name:
+	free_NC_string(ncstrp);
+	return status;
+}
+
+
+/* How much space in the header is required for this NC_dimarray? */
+static size_t
+ncx_len_NC_dimarray(const NC_dimarray *ncap)
+{
+	size_t xlen = X_SIZEOF_NCTYPE;	/* type */
+	xlen += X_SIZEOF_SIZE_T;	/* count */
+	if(ncap == NULL)
+		return xlen;
+	/* else */
+	{
+		const NC_dim **dpp = (const NC_dim **)ncap->value;
+		const NC_dim *const *const end = &dpp[ncap->nelems];
+		for(  /*NADA*/; dpp < end; dpp++)
+		{
+			xlen += ncx_len_NC_dim(*dpp);
+		}
+	}
+	return xlen;
+}
+
+
+/* Write a NC_dimarray to the header */
+static int
+v1h_put_NC_dimarray(v1hs *psp, const NC_dimarray *ncap)
+{
+	int status;
+
+	assert(psp != NULL);
+
+	if(ncap == NULL
+#if 1
+		/* Backward:
+		 * This clause is for 'byte for byte'
+		 * backward compatibility.
+		 * Strickly speaking, it is 'bug for bug'.
+		 */
+		|| ncap->nelems == 0
+#endif
+		)
+	{
+		/*
+		 * Handle empty netcdf
+		 */
+		const size_t nosz = 0;
+
+		status = v1h_put_NCtype(psp, NC_UNSPECIFIED);
+		if(status != ENOERR)
+			return status;
+		status = v1h_put_size_t(psp, &nosz);
+		if(status != ENOERR)
+			return status;
+		return ENOERR;
+	}
+	/* else */
+
+	status = v1h_put_NCtype(psp, NC_DIMENSION);
+	if(status != ENOERR)
+		return status;
+	status = v1h_put_size_t(psp, &ncap->nelems);
+	if(status != ENOERR)
+		return status;
+
+	{
+		const NC_dim **dpp = (const NC_dim **)ncap->value;
+		const NC_dim *const *const end = &dpp[ncap->nelems];
+		for( /*NADA*/; dpp < end; dpp++)
+		{
+			status = v1h_put_NC_dim(psp, *dpp);
+			if(status)
+				return status;
+		}
+	}
+	return ENOERR;
+}
+
+
+/* Read a NC_dimarray from the header */
+static int
+v1h_get_NC_dimarray(v1hs *gsp, NC_dimarray *ncap)
+{
+	int status;
+	NCtype type = NC_UNSPECIFIED;
+
+	assert(gsp != NULL && gsp->pos != NULL);
+	assert(ncap != NULL);
+	assert(ncap->value == NULL);
+
+	status = v1h_get_NCtype(gsp, &type);
+	if(status != ENOERR)
+		return status;
+
+	status = v1h_get_size_t(gsp, &ncap->nelems);
+	if(status != ENOERR)
+		return status;
+	
+	if(ncap->nelems == 0)
+		return ENOERR;
+	/* else */
+	if(type != NC_DIMENSION)
+		return EINVAL;
+
+	ncap->value = (NC_dim **) malloc(ncap->nelems * sizeof(NC_dim *));
+	if(ncap->value == NULL)
+		return NC_ENOMEM;
+	ncap->nalloc = ncap->nelems;
+
+	{
+		NC_dim **dpp = ncap->value;
+		NC_dim *const *const end = &dpp[ncap->nelems];
+		for( /*NADA*/; dpp < end; dpp++)
+		{
+			status = v1h_get_NC_dim(gsp, dpp);
+			if(status)
+			{
+				ncap->nelems = (size_t)(dpp - ncap->value);
+				free_NC_dimarrayV(ncap);
+				return status;
+			}
+		}
+	}
+
+	return ENOERR;
+}
+
+
+/* End NC_dim */
+/* Begin NC_attr */
+
+
+/*
+ * How much space will 'attrp' take in external representation?
+ * Formerly
+NC_xlen_attr(app)
+ */
+static size_t
+ncx_len_NC_attr(const NC_attr *attrp)
+{
+	size_t sz;
+
+	assert(attrp != NULL);
+
+	sz = ncx_len_NC_string(attrp->name);
+	sz += X_SIZEOF_NC_TYPE; /* type */
+	sz += X_SIZEOF_SIZE_T; /* nelems */
+	sz += attrp->xsz;
+
+	return(sz);
+}
+
+
+#undef MIN
+#define MIN(mm,nn) (((mm) < (nn)) ? (mm) : (nn))
+
+/*
+ * Put the values of an attribute
+ * The loop is necessary since attrp->nelems
+ * could potentially be quite large.
+ */
+static int
+v1h_put_NC_attrV(v1hs *psp, const NC_attr *attrp)
+{
+	int status;
+	const size_t perchunk =  psp->extent;
+	size_t remaining = attrp->xsz;
+	void *value = attrp->xvalue;
+	size_t nbytes; 
+
+	assert(psp->extent % X_ALIGN == 0);
+	
+	do {
+		nbytes = MIN(perchunk, remaining);
+	
+		status = check_v1hs(psp, nbytes);
+		if(status != ENOERR)
+			return status;
+	
+		(void) memcpy(psp->pos, value, nbytes);
+
+		psp->pos = (void *)((char *)psp->pos + nbytes);
+		value = (void *)((char *)value + nbytes);
+		remaining -= nbytes;
+
+	} while(remaining != 0); 
+
+	return ENOERR;
+}
+
+/* Write a NC_attr to the header */
+static int
+v1h_put_NC_attr(v1hs *psp, const NC_attr *attrp)
+{
+	int status;
+
+	status = v1h_put_NC_string(psp, attrp->name);
+	if(status != ENOERR)
+		return status;
+
+	status = v1h_put_nc_type(psp, &attrp->type);
+	if(status != ENOERR)
+		return status;
+
+	status = v1h_put_size_t(psp, &attrp->nelems);
+	if(status != ENOERR)
+		return status;
+
+	status = v1h_put_NC_attrV(psp, attrp);
+	if(status != ENOERR)
+		return status;
+
+	return ENOERR;
+}
+
+
+/*
+ * Get the values of an attribute
+ * The loop is necessary since attrp->nelems
+ * could potentially be quite large.
+ */
+static int
+v1h_get_NC_attrV(v1hs *gsp, NC_attr *attrp)
+{
+	int status;
+	const size_t perchunk =  gsp->extent;
+	size_t remaining = attrp->xsz;
+	void *value = attrp->xvalue;
+	size_t nget; 
+
+	do {
+		nget = MIN(perchunk, remaining);
+	
+		status = check_v1hs(gsp, nget);
+		if(status != ENOERR)
+			return status;
+	
+		(void) memcpy(value, gsp->pos, nget);
+
+		gsp->pos = (void *)((char *)gsp->pos + nget);
+		value = (void *)((char *)value + nget);
+		remaining -= nget;
+
+	} while(remaining != 0); 
+
+	return ENOERR;
+}
+
+
+/* Read a NC_attr from the header */
+static int
+v1h_get_NC_attr(v1hs *gsp, NC_attr **attrpp)
+{
+	NC_string *strp;
+	int status;
+	nc_type type;
+	size_t nelems;
+	NC_attr *attrp;
+
+	status = v1h_get_NC_string(gsp, &strp);
+	if(status != ENOERR)
+		return status;
+
+	status = v1h_get_nc_type(gsp, &type);
+	if(status != ENOERR)
+		goto unwind_name;
+
+	status = v1h_get_size_t(gsp, &nelems);
+	if(status != ENOERR)
+		goto unwind_name;
+
+	attrp = new_x_NC_attr(strp, type, nelems);
+	if(attrp == NULL)
+	{
+		status = NC_ENOMEM;
+		goto unwind_name;
+	}
+	
+	status = v1h_get_NC_attrV(gsp, attrp);
+	if(status != ENOERR)
+	{
+		free_NC_attr(attrp); /* frees strp */
+		return status;
+	}
+
+	*attrpp = attrp;
+
+	return ENOERR;
+
+unwind_name:
+	free_NC_string(strp);
+	return status;
+}
+
+
+/* How much space in the header is required for this NC_attrarray? */
+static size_t
+ncx_len_NC_attrarray(const NC_attrarray *ncap)
+{
+	size_t xlen = X_SIZEOF_NCTYPE;	/* type */
+	xlen += X_SIZEOF_SIZE_T;	/* count */
+	if(ncap == NULL)
+		return xlen;
+	/* else */
+	{
+		const NC_attr **app = (const NC_attr **)ncap->value;
+		const NC_attr *const *const end = &app[ncap->nelems];
+		for( /*NADA*/; app < end; app++)
+		{
+			xlen += ncx_len_NC_attr(*app);
+		}
+	}
+	return xlen;
+}
+
+
+/* Write a NC_attrarray to the header */
+static int
+v1h_put_NC_attrarray(v1hs *psp, const NC_attrarray *ncap)
+{
+	int status;
+
+	assert(psp != NULL);
+
+	if(ncap == NULL
+#if 1
+		/* Backward:
+		 * This clause is for 'byte for byte'
+		 * backward compatibility.
+		 * Strickly speaking, it is 'bug for bug'.
+		 */
+		|| ncap->nelems == 0
+#endif
+		)
+	{
+		/*
+		 * Handle empty netcdf
+		 */
+		const size_t nosz = 0;
+
+		status = v1h_put_NCtype(psp, NC_UNSPECIFIED);
+		if(status != ENOERR)
+			return status;
+		status = v1h_put_size_t(psp, &nosz);
+		if(status != ENOERR)
+			return status;
+		return ENOERR;
+	}
+	/* else */
+
+	status = v1h_put_NCtype(psp, NC_ATTRIBUTE);
+	if(status != ENOERR)
+		return status;
+	status = v1h_put_size_t(psp, &ncap->nelems);
+	if(status != ENOERR)
+		return status;
+
+	{
+		const NC_attr **app = (const NC_attr **)ncap->value;
+		const NC_attr *const *const end = &app[ncap->nelems];
+		for( /*NADA*/; app < end; app++)
+		{
+			status = v1h_put_NC_attr(psp, *app);
+			if(status)
+				return status;
+		}
+	}
+	return ENOERR;
+}
+
+
+/* Read a NC_attrarray from the header */
+static int
+v1h_get_NC_attrarray(v1hs *gsp, NC_attrarray *ncap)
+{
+	int status;
+	NCtype type = NC_UNSPECIFIED;
+
+	assert(gsp != NULL && gsp->pos != NULL);
+	assert(ncap != NULL);
+	assert(ncap->value == NULL);
+
+	status = v1h_get_NCtype(gsp, &type);
+	if(status != ENOERR)
+		return status;
+	status = v1h_get_size_t(gsp, &ncap->nelems);
+	if(status != ENOERR)
+		return status;
+	
+	if(ncap->nelems == 0)
+		return ENOERR;
+	/* else */
+	if(type != NC_ATTRIBUTE)
+		return EINVAL;
+
+	ncap->value = (NC_attr **) malloc(ncap->nelems * sizeof(NC_attr *));
+	if(ncap->value == NULL)
+		return NC_ENOMEM;
+	ncap->nalloc = ncap->nelems;
+
+	{
+		NC_attr **app = ncap->value;
+		NC_attr *const *const end = &app[ncap->nelems];
+		for( /*NADA*/; app < end; app++)
+		{
+			status = v1h_get_NC_attr(gsp, app);
+			if(status)
+			{
+				ncap->nelems = (size_t)(app - ncap->value);
+				free_NC_attrarrayV(ncap);
+				return status;
+			}
+		}
+	}
+
+	return ENOERR;
+}
+
+/* End NC_attr */
+/* Begin NC_var */
+
+/*
+ * How much space will the xdr'd var take.
+ * Formerly
+NC_xlen_var(vpp)
+ */
+static size_t
+ncx_len_NC_var(const NC_var *varp, size_t sizeof_off_t)
+{
+	size_t sz;
+
+	assert(varp != NULL);
+	assert(sizeof_off_t != 0);
+
+	sz = ncx_len_NC_string(varp->name);
+	sz += X_SIZEOF_SIZE_T; /* ndims */
+	sz += ncx_len_int(varp->ndims); /* dimids */
+	sz += ncx_len_NC_attrarray(&varp->attrs);
+	sz += X_SIZEOF_NC_TYPE; /* type */
+	sz += X_SIZEOF_SIZE_T; /* len */
+	sz += sizeof_off_t; /* begin */
+
+	return(sz);
+}
+
+
+/* Write a NC_var to the header */
+static int
+v1h_put_NC_var(v1hs *psp, const NC_var *varp)
+{
+	int status;
+
+	status = v1h_put_NC_string(psp, varp->name);
+	if(status != ENOERR)
+		return status;
+
+	status = v1h_put_size_t(psp, &varp->ndims);
+	if(status != ENOERR)
+		return status;
+
+	status = check_v1hs(psp, ncx_len_int(varp->ndims));
+	if(status != ENOERR)
+		return status;
+	status = ncx_putn_int_int(&psp->pos,
+			varp->ndims, varp->dimids);
+	if(status != ENOERR)
+		return status;
+
+	status = v1h_put_NC_attrarray(psp, &varp->attrs);
+	if(status != ENOERR)
+		return status;
+
+	status = v1h_put_nc_type(psp, &varp->type);
+	if(status != ENOERR)
+		return status;
+
+	status = v1h_put_size_t(psp, &varp->len);
+	if(status != ENOERR)
+		return status;
+
+	status = check_v1hs(psp, psp->version == 1 ? 4 : 8);
+	if(status != ENOERR)
+		 return status;
+	status = ncx_put_off_t(&psp->pos, &varp->begin, psp->version == 1 ? 4 : 8);
+	if(status != ENOERR)
+		return status;
+
+	return ENOERR;
+}
+
+
+/* Read a NC_var from the header */
+static int
+v1h_get_NC_var(v1hs *gsp, NC_var **varpp)
+{
+	NC_string *strp;
+	int status;
+	size_t ndims;
+	NC_var *varp;
+
+	status = v1h_get_NC_string(gsp, &strp);
+	if(status != ENOERR)
+		return status;
+
+	status = v1h_get_size_t(gsp, &ndims);
+	if(status != ENOERR)
+		goto unwind_name;
+
+	varp = new_x_NC_var(strp, ndims);
+	if(varp == NULL)
+	{
+		status = NC_ENOMEM;
+		goto unwind_name;
+	}
+
+	status = check_v1hs(gsp, ncx_len_int(ndims));
+	if(status != ENOERR)
+		goto unwind_alloc;
+	status = ncx_getn_int_int((const void **)(&gsp->pos),
+			ndims, varp->dimids);
+	if(status != ENOERR)
+		goto unwind_alloc;
+
+	status = v1h_get_NC_attrarray(gsp, &varp->attrs);
+	if(status != ENOERR)
+		goto unwind_alloc;
+
+	status = v1h_get_nc_type(gsp, &varp->type);
+	if(status != ENOERR)
+		 goto unwind_alloc;
+
+	status = v1h_get_size_t(gsp, &varp->len);
+	if(status != ENOERR)
+		 goto unwind_alloc;
+
+	status = check_v1hs(gsp, gsp->version == 1 ? 4 : 8);
+	if(status != ENOERR)
+		 goto unwind_alloc;
+	status = ncx_get_off_t((const void **)&gsp->pos,
+			       &varp->begin, gsp->version == 1 ? 4 : 8);
+	if(status != ENOERR)
+		 goto unwind_alloc;
+	
+	*varpp = varp;
+	return ENOERR;
+
+unwind_alloc:
+	free_NC_var(varp); /* frees name */
+	return status;
+
+unwind_name:
+	free_NC_string(strp);
+	return status;
+}
+
+
+/* How much space in the header is required for this NC_vararray? */
+static size_t
+ncx_len_NC_vararray(const NC_vararray *ncap, size_t sizeof_off_t)
+{
+	size_t xlen = X_SIZEOF_NCTYPE;	/* type */
+	xlen += X_SIZEOF_SIZE_T;	/* count */
+	if(ncap == NULL)
+		return xlen;
+	/* else */
+	{
+		const NC_var **vpp = (const NC_var **)ncap->value;
+		const NC_var *const *const end = &vpp[ncap->nelems];
+		for( /*NADA*/; vpp < end; vpp++)
+		{
+			xlen += ncx_len_NC_var(*vpp, sizeof_off_t);
+		}
+	}
+	return xlen;
+}
+
+
+/* Write a NC_vararray to the header */
+static int
+v1h_put_NC_vararray(v1hs *psp, const NC_vararray *ncap)
+{
+	int status;
+
+	assert(psp != NULL);
+
+	if(ncap == NULL
+#if 1
+		/* Backward:
+		 * This clause is for 'byte for byte'
+		 * backward compatibility.
+		 * Strickly speaking, it is 'bug for bug'.
+		 */
+		|| ncap->nelems == 0
+#endif
+		)
+	{
+		/*
+		 * Handle empty netcdf
+		 */
+		const size_t nosz = 0;
+
+		status = v1h_put_NCtype(psp, NC_UNSPECIFIED);
+		if(status != ENOERR)
+			return status;
+		status = v1h_put_size_t(psp, &nosz);
+		if(status != ENOERR)
+			return status;
+		return ENOERR;
+	}
+	/* else */
+
+	status = v1h_put_NCtype(psp, NC_VARIABLE);
+	if(status != ENOERR)
+		return status;
+	status = v1h_put_size_t(psp, &ncap->nelems);
+	if(status != ENOERR)
+		return status;
+
+	{
+		const NC_var **vpp = (const NC_var **)ncap->value;
+		const NC_var *const *const end = &vpp[ncap->nelems];
+		for( /*NADA*/; vpp < end; vpp++)
+		{
+			status = v1h_put_NC_var(psp, *vpp);
+			if(status)
+				return status;
+		}
+	}
+	return ENOERR;
+}
+
+
+/* Read a NC_vararray from the header */
+static int
+v1h_get_NC_vararray(v1hs *gsp, NC_vararray *ncap)
+{
+	int status;
+	NCtype type = NC_UNSPECIFIED;
+
+	assert(gsp != NULL && gsp->pos != NULL);
+	assert(ncap != NULL);
+	assert(ncap->value == NULL);
+
+	status = v1h_get_NCtype(gsp, &type);
+	if(status != ENOERR)
+		return status;
+	
+	status = v1h_get_size_t(gsp, &ncap->nelems);
+	if(status != ENOERR)
+		return status;
+	
+	if(ncap->nelems == 0)
+		return ENOERR;
+	/* else */
+	if(type != NC_VARIABLE)
+		return EINVAL;
+
+	ncap->value = (NC_var **) malloc(ncap->nelems * sizeof(NC_var *));
+	if(ncap->value == NULL)
+		return NC_ENOMEM;
+	ncap->nalloc = ncap->nelems;
+
+	{
+		NC_var **vpp = ncap->value;
+		NC_var *const *const end = &vpp[ncap->nelems];
+		for( /*NADA*/; vpp < end; vpp++)
+		{
+			status = v1h_get_NC_var(gsp, vpp);
+			if(status)
+			{
+				ncap->nelems = (size_t)(vpp - ncap->value);
+				free_NC_vararrayV(ncap);
+				return status;
+			}
+		}
+	}
+
+	return ENOERR;
+}
+
+
+/* End NC_var */
+/* Begin NC */
+
+/*
+ * Recompute the shapes of all variables
+ * Sets ncp->begin_var to start of first variable.
+ * Sets ncp->begin_rec to start of first record variable.
+ * Returns -1 on error. The only possible error is a reference
+ * to a non existent dimension, which could occur for a corrupted
+ * netcdf file.
+ */
+static int
+NC_computeshapes(NC *ncp)
+{
+	NC_var **vpp = (NC_var **)ncp->vars.value;
+	NC_var *const *const end = &vpp[ncp->vars.nelems];
+	NC_var *first_var = NULL;	/* first "non-record" var */
+	NC_var *first_rec = NULL;	/* first "record" var */
+	int status;
+
+	ncp->begin_var = (off_t) ncp->xsz;
+	ncp->begin_rec = (off_t) ncp->xsz;
+	ncp->recsize = 0;
+
+	if(ncp->vars.nelems == 0)
+		return(0);
+	
+	for( /*NADA*/; vpp < end; vpp++)
+	{
+		status = NC_var_shape(*vpp, &ncp->dims);
+		if(status != ENOERR)
+			return(status);
+
+	  	if(IS_RECVAR(*vpp))	
+		{
+	  		if(first_rec == NULL)	
+				first_rec = *vpp;
+			if((*vpp)->len == UINT32_MAX)
+			    ncp->recsize += (*vpp)->dsizes[0];
+			else
+			    ncp->recsize += (*vpp)->len;
+		}
+		else
+		{
+		        if(first_var == NULL)
+			        first_var = *vpp;
+			/*
+			 * Overwritten each time thru.
+			 * Usually overwritten in first_rec != NULL clause below.
+			 */
+			ncp->begin_rec = (*vpp)->begin + (off_t)(*vpp)->len;
+		}
+	}
+
+	if(first_rec != NULL)
+	{
+		assert(ncp->begin_rec <= first_rec->begin);
+		ncp->begin_rec = first_rec->begin;
+		/*
+	 	 * for special case of exactly one record variable, pack value
+	 	 */
+		if(ncp->recsize == first_rec->len)
+			ncp->recsize = *first_rec->dsizes * first_rec->xsz;
+	}
+
+	if(first_var != NULL)
+	{
+		ncp->begin_var = first_var->begin;
+	}
+	else
+	{
+		ncp->begin_var = ncp->begin_rec;
+	}
+
+	assert(ncp->begin_var > 0);
+	assert(ncp->xsz <= (size_t)ncp->begin_var);
+	assert(ncp->begin_rec > 0);
+	assert(ncp->begin_var <= ncp->begin_rec);
+	
+	return(ENOERR);
+}
+
+/* How much space in the header is required for the NC data structure? */
+size_t
+ncx_len_NC(const NC *ncp, size_t sizeof_off_t)
+{
+	size_t xlen = sizeof(ncmagic);
+
+	assert(ncp != NULL);
+	
+	xlen += X_SIZEOF_SIZE_T; /* numrecs */
+	xlen += ncx_len_NC_dimarray(&ncp->dims);
+	xlen += ncx_len_NC_attrarray(&ncp->attrs);
+	xlen += ncx_len_NC_vararray(&ncp->vars, sizeof_off_t);
+
+	return xlen;
+}
+
+
+/* Write the file header */
+int
+ncx_put_NC(const NC *ncp, void **xpp, off_t offset, size_t extent)
+{
+	int status = ENOERR;
+	v1hs ps; /* the get stream */
+
+	assert(ncp != NULL);
+
+	/* Initialize stream ps */
+
+	ps.nciop = ncp->nciop;
+	ps.flags = RGN_WRITE;
+
+	if (ncp->flags & NC_64BIT_OFFSET)
+	  ps.version = 2;
+	else 
+	  ps.version = 1;
+
+	if(xpp == NULL)
+	{
+		/*
+		 * Come up with a reasonable stream read size.
+		 */
+		extent = ncp->xsz;
+		if(extent <= MIN_NC_XSZ)
+		{
+			/* first time read */
+			extent = ncp->chunk;
+			/* Protection for when ncp->chunk is huge;
+			 * no need to read hugely. */
+	      		if(extent > 4096)
+				extent = 4096;
+		}
+		else if(extent > ncp->chunk)
+		    extent = ncp->chunk;
+		
+		ps.offset = 0;
+		ps.extent = extent;
+		ps.base = NULL;
+		ps.pos = ps.base;
+
+		status = fault_v1hs(&ps, extent);
+		if(status)
+			return status;
+	}
+	else
+	{
+		ps.offset = offset;
+		ps.extent = extent;
+		ps.base = *xpp;
+		ps.pos = ps.base;
+		ps.end = (char *)ps.base + ps.extent;
+	}
+
+	if (ps.version == 2)
+	  status = ncx_putn_schar_schar(&ps.pos, sizeof(ncmagic), ncmagic);
+	else
+	  status = ncx_putn_schar_schar(&ps.pos, sizeof(ncmagic1), ncmagic1);
+	if(status != ENOERR)
+		goto release;
+
+	{
+	const size_t nrecs = NC_get_numrecs(ncp);
+	status = ncx_put_size_t(&ps.pos, &nrecs);
+	if(status != ENOERR)
+		goto release;
+	}
+
+	assert((char *)ps.pos < (char *)ps.end);
+
+	status = v1h_put_NC_dimarray(&ps, &ncp->dims);
+	if(status != ENOERR)
+		goto release;
+
+	status = v1h_put_NC_attrarray(&ps, &ncp->attrs);
+	if(status != ENOERR)
+		goto release;
+
+	status = v1h_put_NC_vararray(&ps, &ncp->vars);
+	if(status != ENOERR)
+		goto release;
+
+release:
+	(void) rel_v1hs(&ps);
+
+	return status;
+}
+
+
+/* Make the in-memory NC structure from reading the file header */
+int
+nc_get_NC(NC *ncp)
+{
+	int status;
+	v1hs gs; /* the get stream */
+
+	assert(ncp != NULL);
+
+	/* Initialize stream gs */
+
+	gs.nciop = ncp->nciop;
+	gs.offset = 0; /* beginning of file */
+	gs.extent = 0;
+	gs.flags = 0;
+	gs.version = 0;
+	gs.base = NULL;
+	gs.pos = gs.base;
+
+	{
+		/*
+		 * Come up with a reasonable stream read size.
+		 */
+	        off_t filesize;
+		size_t extent = MIN_NC_XSZ;
+		
+		extent = ncp->xsz;
+		if(extent <= MIN_NC_XSZ)
+		{
+		        status = ncio_filesize(ncp->nciop, &filesize);
+			if(status)
+			    return status;
+			if(filesize < sizeof(ncmagic)) { /* too small, not netcdf */
+
+			    status = NC_ENOTNC;
+			    return status;
+			}
+			/* first time read */
+			extent = ncp->chunk;
+			/* Protection for when ncp->chunk is huge;
+			 * no need to read hugely. */
+	      		if(extent > 4096)
+				extent = 4096;
+			if(extent > filesize)
+			        extent = filesize;
+		}
+		else if(extent > ncp->chunk)
+		    extent = ncp->chunk;
+
+		/*
+		 * Invalidate the I/O buffers to force a read of the header
+		 * region.
+		 */
+		status = ncio_sync(gs.nciop);
+		if(status)
+			return status;
+
+		status = fault_v1hs(&gs, extent);
+		if(status)
+			return status;
+	}
+
+	/* get the header from the stream gs */
+
+	{
+		/* Get & check magic number */
+		schar magic[sizeof(ncmagic)];
+		(void) memset(magic, 0, sizeof(magic));
+
+		status = ncx_getn_schar_schar(
+			(const void **)(&gs.pos), sizeof(magic), magic);
+		if(status != ENOERR)
+			goto unwind_get;
+	
+		if(memcmp(magic, ncmagic, sizeof(ncmagic)-1) != 0)
+		{
+			status = NC_ENOTNC;
+			goto unwind_get;
+		}
+		/* Check version number in last byte of magic */
+		if (magic[sizeof(ncmagic)-1] == 0x1) {
+		  gs.version = 1;
+		} else if (magic[sizeof(ncmagic)-1] == 0x2) {
+		  gs.version = 2;
+		  fSet(ncp->flags, NC_64BIT_OFFSET);
+		  /* Now we support version 2 file access on non-LFS systems -- rkr */
+#if 0
+		  if (sizeof(off_t) != 8) {
+		    fprintf(stderr, "NETCDF WARNING: Version 2 file on 32-bit system.\n");
+		  }
+#endif
+		} else {
+			status = NC_ENOTNC;
+			goto unwind_get;
+		}
+	}
+	
+	{
+	size_t nrecs = 0;
+	status = ncx_get_size_t((const void **)(&gs.pos), &nrecs);
+	if(status != ENOERR)
+		goto unwind_get;
+	NC_set_numrecs(ncp, nrecs);
+	}
+
+	assert((char *)gs.pos < (char *)gs.end);
+
+	status = v1h_get_NC_dimarray(&gs, &ncp->dims);
+	if(status != ENOERR)
+		goto unwind_get;
+
+	status = v1h_get_NC_attrarray(&gs, &ncp->attrs);
+	if(status != ENOERR)
+		goto unwind_get;
+
+	status = v1h_get_NC_vararray(&gs, &ncp->vars);
+	if(status != ENOERR)
+		goto unwind_get;
+		
+	ncp->xsz = ncx_len_NC(ncp, (gs.version == 1) ? 4 : 8);
+
+	status = NC_computeshapes(ncp);
+	if(status != ENOERR)
+		goto unwind_get;
+
+unwind_get:
+	(void) rel_v1hs(&gs);
+	return status;
+}
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/src_netcdf4/var.c
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/src_netcdf4/var.c	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/src_netcdf4/var.c	(revision 1749)
@@ -0,0 +1,740 @@
+/*
+ *	Copyright 1996, University Corporation for Atmospheric Research
+ *      See netcdf/COPYRIGHT file for copying and redistribution conditions.
+ */
+/* $Id: var.c,v 1.144 2010/05/30 00:50:35 russ Exp $ */
+
+#include "nc.h"
+#include <stdlib.h>
+#include <string.h>
+#include <assert.h>
+#include <limits.h>
+#include "ncx.h"
+#include "rnd.h"
+#include "utf8proc.h"
+
+#ifndef OFF_T_MAX
+#define OFF_T_MAX (~ (off_t) 0 - (~ (off_t) 0 << (CHAR_BIT * sizeof (off_t) - 1)))
+#endif
+
+/*
+ * Free var
+ * Formerly
+NC_free_var(var)
+ */
+void
+free_NC_var(NC_var *varp)
+{
+	if(varp == NULL)
+		return;
+	free_NC_attrarrayV(&varp->attrs);
+	free_NC_string(varp->name);
+#ifndef MALLOCHACK
+	if(varp->dimids != NULL) free(varp->dimids);
+	if(varp->shape != NULL) free(varp->shape);
+	if(varp->dsizes != NULL) free(varp->dsizes);
+#endif /*!MALLOCHACK*/
+	free(varp);
+}
+
+
+/* 
+ * Common code for new_NC_var() 
+ * and ncx_get_NC_var()
+ */
+NC_var *
+new_x_NC_var(
+	NC_string *strp,
+	size_t ndims)
+{
+	NC_var *varp;
+	const size_t o1 = M_RNDUP(ndims * sizeof(int));
+	const size_t o2 = M_RNDUP(ndims * sizeof(size_t));
+
+#ifdef MALLOCHACK
+	const size_t sz =  M_RNDUP(sizeof(NC_var)) +
+		 o1 + o2 + ndims * sizeof(off_t);
+#else /*!MALLOCHACK*/
+	const size_t o3 = ndims * sizeof(off_t);
+	const size_t sz = sizeof(NC_var);
+#endif /*!MALLOCHACK*/
+
+	varp = (NC_var *) malloc(sz);
+	if(varp == NULL )
+		return NULL;
+	(void) memset(varp, 0, sz);
+	varp->name = strp;
+	varp->ndims = ndims;
+ 	varp->hash = hash_fast(strp->cp, strlen(strp->cp));
+
+	if(ndims != 0)
+	{
+#ifdef MALLOCHACK
+		/*
+		 * NOTE: lint may complain about the next 3 lines:
+		 * "pointer cast may result in improper alignment".
+		 * We use the M_RNDUP() macro to get the proper alignment.
+		 */
+		varp->dimids = (int *)((char *)varp + M_RNDUP(sizeof(NC_var)));
+		varp->shape = (size_t *)((char *)varp->dimids + o1);
+		varp->dsizes = (off_t *)((char *)varp->shape + o2);
+#else /*!MALLOCHACK*/
+		varp->dimids = (int*)malloc(o1);
+		varp->shape = (size_t*)malloc(o2);
+		varp->dsizes = (off_t*)malloc(o3);
+#endif /*!MALLOCHACK*/
+	}
+
+	varp->xsz = 0;
+	varp->len = 0;
+	varp->begin = 0;
+
+	return varp;
+}
+
+
+/*
+ * Formerly
+NC_new_var()
+ */
+static NC_var *
+new_NC_var(const char *uname, nc_type type,
+	size_t ndims, const int *dimids)
+{
+	NC_string *strp;
+	NC_var *varp;
+
+	char *name = (char *)utf8proc_NFC((const unsigned char *)uname);
+	if(name == NULL)
+	    return NULL;
+	strp = new_NC_string(strlen(name), name);
+	free(name);
+	if(strp == NULL)
+		return NULL;
+
+	varp = new_x_NC_var(strp, ndims);
+	if(varp == NULL )
+	{
+		free_NC_string(strp);
+		return NULL;
+	}
+	
+	varp->type = type;
+
+	if( ndims != 0 && dimids != NULL)
+		(void) memcpy(varp->dimids, dimids, ndims * sizeof(int));
+
+	return(varp);
+}
+
+
+static NC_var *
+dup_NC_var(const NC_var *rvarp)
+{
+	NC_var *varp = new_NC_var(rvarp->name->cp, rvarp->type,
+		 rvarp->ndims, rvarp->dimids);
+	if(varp == NULL)
+		return NULL;
+
+	
+	if(dup_NC_attrarrayV(&varp->attrs, &rvarp->attrs) != NC_NOERR)
+	{
+		free_NC_var(varp);
+		return NULL;
+	}
+
+	(void) memcpy(varp->shape, rvarp->shape,
+			 rvarp->ndims * sizeof(size_t));
+	(void) memcpy(varp->dsizes, rvarp->dsizes,
+			 rvarp->ndims * sizeof(size_t));
+	varp->xsz = rvarp->xsz;
+	varp->len = rvarp->len;
+	varp->begin = rvarp->begin;
+
+	return varp;
+}
+
+
+/* vararray */
+
+
+/*
+ * Free the stuff "in" (referred to by) an NC_vararray.
+ * Leaves the array itself allocated.
+ */
+void
+free_NC_vararrayV0(NC_vararray *ncap)
+{
+	assert(ncap != NULL);
+
+	if(ncap->nelems == 0)
+		return;
+
+	assert(ncap->value != NULL);
+
+	{
+		NC_var **vpp = ncap->value;
+		NC_var *const *const end = &vpp[ncap->nelems];
+		for( /*NADA*/; vpp < end; vpp++)
+		{
+			free_NC_var(*vpp);
+			*vpp = NULL;
+		}
+	}
+	ncap->nelems = 0;
+}
+
+
+/*
+ * Free NC_vararray values.
+ * formerly
+NC_free_array()
+ */
+void
+free_NC_vararrayV(NC_vararray *ncap)
+{
+	assert(ncap != NULL);
+	
+	if(ncap->nalloc == 0)
+		return;
+
+	assert(ncap->value != NULL);
+
+	free_NC_vararrayV0(ncap);
+
+	free(ncap->value);
+	ncap->value = NULL;
+	ncap->nalloc = 0;
+}
+
+
+int
+dup_NC_vararrayV(NC_vararray *ncap, const NC_vararray *ref)
+{
+	int status = NC_NOERR;
+
+	assert(ref != NULL);
+	assert(ncap != NULL);
+
+	if(ref->nelems != 0)
+	{
+		const size_t sz = ref->nelems * sizeof(NC_var *);
+		ncap->value = (NC_var **) malloc(sz);
+		if(ncap->value == NULL)
+			return NC_ENOMEM;
+		(void) memset(ncap->value, 0, sz);
+		ncap->nalloc = ref->nelems;
+	}
+
+	ncap->nelems = 0;
+	{
+		NC_var **vpp = ncap->value;
+		const NC_var **drpp = (const NC_var **)ref->value;
+		NC_var *const *const end = &vpp[ref->nelems];
+		for( /*NADA*/; vpp < end; drpp++, vpp++, ncap->nelems++)
+		{
+			*vpp = dup_NC_var(*drpp);
+			if(*vpp == NULL)
+			{
+				status = NC_ENOMEM;
+				break;
+			}
+		}
+	}
+
+	if(status != NC_NOERR)
+	{
+		free_NC_vararrayV(ncap);
+		return status;
+	}
+
+	assert(ncap->nelems == ref->nelems);
+
+	return NC_NOERR;
+}
+
+
+/*
+ * Add a new handle on the end of an array of handles
+ * Formerly
+NC_incr_array(array, tail)
+ */
+static int
+incr_NC_vararray(NC_vararray *ncap, NC_var *newelemp)
+{
+	NC_var **vp;
+
+	assert(ncap != NULL);
+
+	if(ncap->nalloc == 0)
+	{
+		assert(ncap->nelems == 0);
+		vp = (NC_var **) malloc(NC_ARRAY_GROWBY * sizeof(NC_var *));
+		if(vp == NULL)
+			return NC_ENOMEM;
+		ncap->value = vp;
+		ncap->nalloc = NC_ARRAY_GROWBY;
+	}
+	else if(ncap->nelems +1 > ncap->nalloc)
+	{
+		vp = (NC_var **) realloc(ncap->value,
+			(ncap->nalloc + NC_ARRAY_GROWBY) * sizeof(NC_var *));
+		if(vp == NULL)
+			return NC_ENOMEM;
+		ncap->value = vp;
+		ncap->nalloc += NC_ARRAY_GROWBY;
+	}
+
+	if(newelemp != NULL)
+	{
+		ncap->value[ncap->nelems] = newelemp;
+		ncap->nelems++;
+	}
+	return NC_NOERR;
+}
+
+
+static NC_var *
+elem_NC_vararray(const NC_vararray *ncap, size_t elem)
+{
+	assert(ncap != NULL);
+		/* cast needed for braindead systems with signed size_t */
+	if(ncap->nelems == 0 || (unsigned long)elem >= ncap->nelems)
+		return NULL;
+
+	assert(ncap->value != NULL);
+
+	return ncap->value[elem];
+}
+
+
+/* End vararray per se */
+
+
+/*
+ * Step thru NC_VARIABLE array, seeking match on name.
+ * Return varid or -1 on not found.
+ * *varpp is set to the appropriate NC_var.
+ * Formerly (sort of)
+NC_hvarid
+ */
+int
+NC_findvar(const NC_vararray *ncap, const char *uname, NC_var **varpp)
+{
+	NC_var **loc;
+ 	uint32_t shash;
+	int varid;
+	char *name;
+
+	assert(ncap != NULL);
+
+	if(ncap->nelems == 0)
+		return -1;
+
+	loc = (NC_var **) ncap->value;
+
+	/* normalized version of uname */
+	name = (char *)utf8proc_NFC((const unsigned char *)uname);
+	if(name == NULL)
+	    return NC_ENOMEM;
+ 	shash = hash_fast(name, strlen(name));
+
+	for(varid = 0; (size_t) varid < ncap->nelems; varid++, loc++)
+	{
+		if((*loc)->hash == shash &&
+		   strncmp((*loc)->name->cp, name, strlen(name)) == 0)
+		{
+			if(varpp != NULL)
+				*varpp = *loc;
+			free(name);
+			return(varid); /* Normal return */
+		}
+	}
+	free(name);
+	return(-1); /* not found */
+}
+
+/* 
+ * For a netcdf type
+ *  return the size of one element in the external representation.
+ * Note that arrays get rounded up to X_ALIGN boundaries.
+ * Formerly
+NC_xtypelen
+ * See also ncx_len()
+ */
+size_t
+ncx_szof(nc_type type)
+{
+	switch(type){
+	case NC_BYTE:
+	case NC_CHAR:
+		return(1);
+	case NC_SHORT :
+		return(2);
+	case NC_INT:
+		return X_SIZEOF_INT;
+	case NC_FLOAT:
+		return X_SIZEOF_FLOAT;
+	case NC_DOUBLE : 
+		return X_SIZEOF_DOUBLE;
+	default:
+	        assert("ncx_szof invalid type" == 0);
+	        return 0;
+	}
+}
+
+
+/*
+ * 'compile' the shape and len of a variable
+ *  Formerly
+NC_var_shape(var, dims)
+ */
+int
+NC_var_shape(NC_var *varp, const NC_dimarray *dims)
+{
+	size_t *shp, *op;
+	off_t *dsp;
+	int *ip;
+	const NC_dim *dimp;
+	off_t product = 1;
+	
+	varp->xsz = ncx_szof(varp->type);
+
+	if(varp->ndims == 0)
+	{
+		goto out;
+	}
+
+	/*
+	 * use the user supplied dimension indices
+	 * to determine the shape
+	 */
+	for(ip = varp->dimids, op = varp->shape
+		; ip < &varp->dimids[varp->ndims]; ip++, op++)
+	{
+		if(*ip < 0 || (size_t) (*ip) >= ((dims != NULL) ? dims->nelems : 1) )
+			return NC_EBADDIM;
+		
+		dimp = elem_NC_dimarray(dims, (size_t)*ip);
+		*op = dimp->size;
+		if(*op == NC_UNLIMITED && ip != varp->dimids)
+			return NC_EUNLIMPOS;
+	}
+
+	/* 
+	 * Compute the dsizes
+	 */
+				/* ndims is > 0 here */
+	for(shp = varp->shape + varp->ndims -1,
+				dsp = varp->dsizes + varp->ndims -1;
+ 			shp >= varp->shape;
+			shp--, dsp--)
+	{
+		if(!(shp == varp->shape && IS_RECVAR(varp)))
+		{
+		    if( (off_t)(*shp) <= OFF_T_MAX / product ) 
+			{
+				product *= *shp;
+			} else 
+			{
+				product = OFF_T_MAX ;
+			}
+		}
+		*dsp = product;
+	}
+
+
+out :
+    if( varp->xsz <= (X_UINT_MAX - 1) / product ) /* if integer multiply will not overflow */
+	{
+	        varp->len = product * varp->xsz;
+		switch(varp->type) {
+		case NC_BYTE :
+		case NC_CHAR :
+		case NC_SHORT :
+		        if( varp->len%4 != 0 )
+			{
+			        varp->len += 4 - varp->len%4; /* round up */
+		/*		*dsp += 4 - *dsp%4; */
+		    }
+		    break;
+		default:
+			/* already aligned */
+			break;
+		}
+        } else
+	{	/* OK for last var to be "too big", indicated by this special len */
+	        varp->len = X_UINT_MAX;
+        }
+#if 0
+	arrayp("\tshape", varp->ndims, varp->shape);
+	arrayp("\tdsizes", varp->ndims, varp->dsizes);
+#endif
+	return NC_NOERR;
+}
+
+/*
+ * Check whether variable size is less than or equal to vlen_max,
+ * without overflowing in arithmetic calculations.  If OK, return 1,
+ * else, return 0.  For CDF1 format or for CDF2 format on non-LFS
+ * platforms, vlen_max should be 2^31 - 4, but for CDF2 format on
+ * systems with LFS it should be 2^32 - 4.
+ */
+int
+NC_check_vlen(NC_var *varp, size_t vlen_max) {
+    size_t prod=varp->xsz;	/* product of xsz and dimensions so far */
+
+    int ii;
+
+    assert(varp != NULL);
+    for(ii = IS_RECVAR(varp) ? 1 : 0; ii < varp->ndims; ii++) {
+	if (varp->shape[ii] > vlen_max / prod) {
+	    return 0;		/* size in bytes won't fit in a 32-bit int */
+	}
+	prod *= varp->shape[ii];
+    }
+    return 1;			/* OK */
+}
+
+
+/*
+ * Given valid ncp and varid, return var
+ *  else NULL on error
+ * Formerly
+NC_hlookupvar()
+ */
+NC_var *
+NC_lookupvar(NC *ncp, int varid)
+{
+	NC_var *varp;
+
+	if(varid == NC_GLOBAL)
+	{
+		/* Global is error in this context */
+		return(NULL);
+	}
+
+	varp = elem_NC_vararray(&ncp->vars, (size_t)varid);
+	if(varp == NULL)
+	{
+		return NULL;
+	}
+
+	assert(varp != NULL);
+
+	return(varp);
+}
+
+
+/* Public */
+
+int
+NC3_def_var( int ncid, const char *name, nc_type type,
+	 int ndims, const int *dimids, int *varidp)
+{
+	int status;
+	NC *ncp;
+	int varid;
+	NC_var *varp;
+
+	status = NC_check_id(ncid, &ncp); 
+	if(status != NC_NOERR)
+		return status;
+
+	if(!NC_indef(ncp))
+	{
+		return NC_ENOTINDEFINE;
+	}
+
+	status = NC_check_name(name);
+	if(status != NC_NOERR)
+		return status;
+
+	status = nc_cktype(type);
+	if(status != NC_NOERR)
+		return status;
+
+		/* cast needed for braindead systems with signed size_t */
+	if((unsigned long) ndims > X_INT_MAX) /* Backward compat */
+	{
+		return NC_EINVAL;
+	} 
+
+	if(ncp->vars.nelems >= NC_MAX_VARS)
+	{
+		return NC_EMAXVARS;
+	}
+
+	varid = NC_findvar(&ncp->vars, name, &varp);
+	if(varid != -1)
+	{
+		return NC_ENAMEINUSE;
+	}
+	
+	varp = new_NC_var(name, type, ndims, dimids);
+	if(varp == NULL)
+		return NC_ENOMEM;
+
+	status = NC_var_shape(varp, &ncp->dims);
+	if(status != NC_NOERR)
+	{
+		free_NC_var(varp);
+		return status;
+	}
+
+	status = incr_NC_vararray(&ncp->vars, varp);
+	if(status != NC_NOERR)
+	{
+		free_NC_var(varp);
+		return status;
+	}
+
+	if(varidp != NULL)
+		*varidp = (int)ncp->vars.nelems -1; /* varid */
+	return NC_NOERR;
+}
+
+
+int
+NC3_inq_varid(int ncid, const char *name, int *varid_ptr)
+{
+	int status;
+	NC *ncp;
+	NC_var *varp;
+	int varid;
+
+	status = NC_check_id(ncid, &ncp); 
+	if(status != NC_NOERR)
+		return status;
+
+	varid = NC_findvar(&ncp->vars, name, &varp);
+	if(varid == -1)
+	{
+		return NC_ENOTVAR;
+	}
+
+	*varid_ptr = varid;
+	return NC_NOERR;
+}
+
+
+int
+NC3_inq_var(int ncid,
+	int varid,
+	char *name,
+	nc_type *typep,
+	int *ndimsp,
+	int *dimids,
+	int *nattsp)
+{
+	int status;
+	NC *ncp;
+	NC_var *varp;
+	size_t ii;
+
+	status = NC_check_id(ncid, &ncp); 
+	if(status != NC_NOERR)
+		return status;
+
+	varp = elem_NC_vararray(&ncp->vars, (size_t)varid);
+	if(varp == NULL)
+		return NC_ENOTVAR;
+
+	if(name != NULL)
+	{
+		(void) strncpy(name, varp->name->cp, varp->name->nchars);
+		name[varp->name->nchars] = 0;
+	}
+
+	if(typep != 0)
+		*typep = varp->type;
+	if(ndimsp != 0)
+	{
+		*ndimsp = (int) varp->ndims;
+	}
+	if(dimids != 0)
+	{
+		for(ii = 0; ii < varp->ndims; ii++)
+		{
+			dimids[ii] = varp->dimids[ii];
+		}
+	}
+	if(nattsp != 0)
+	{
+		*nattsp = (int) varp->attrs.nelems;
+	}
+
+	return NC_NOERR;
+}
+
+int
+NC3_rename_var(int ncid, int varid, const char *unewname)
+{
+	int status;
+	NC *ncp;
+	NC_var *varp;
+	NC_string *old, *newStr;
+	int other;
+	char *newname;		/* normalized */
+
+	status = NC_check_id(ncid, &ncp); 
+	if(status != NC_NOERR)
+		return status;
+
+	if(NC_readonly(ncp))
+	{
+		return NC_EPERM;
+	}
+
+	status = NC_check_name(unewname);
+	if(status != NC_NOERR)
+		return status;
+
+	/* check for name in use */
+	other = NC_findvar(&ncp->vars, unewname, &varp);
+	if(other != -1)
+	{
+		return NC_ENAMEINUSE;
+	}
+	
+	varp = NC_lookupvar(ncp, varid);
+	if(varp == NULL)
+	{
+		/* invalid varid */
+		return NC_ENOTVAR; /* TODO: is this the right error code? */
+	}
+
+	old = varp->name;
+	newname = (char *)utf8proc_NFC((const unsigned char *)unewname);
+	if(newname == NULL)
+	    return NC_ENOMEM;
+	if(NC_indef(ncp))
+	{
+		newStr = new_NC_string(strlen(newname),newname);
+		free(newname);
+		if(newStr == NULL)
+			return(-1);
+		varp->name = newStr;
+		varp->hash = hash_fast(newStr->cp, strlen(newStr->cp));
+		free_NC_string(old);
+		return NC_NOERR;
+	}
+
+	/* else, not in define mode */
+	status = set_NC_string(varp->name, newname);
+	varp->hash = hash_fast(newname, strlen(newname));
+	free(newname);
+	if(status != NC_NOERR)
+		return status;
+
+	set_NC_hdirty(ncp);
+
+	if(NC_doHsync(ncp))
+	{
+		status = NC_sync(ncp);
+		if(status != NC_NOERR)
+			return status;
+	}
+
+	return NC_NOERR;
+}
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/src_netcdf4/xxdr.c
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/src_netcdf4/xxdr.c	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/src_netcdf4/xxdr.c	(revision 1749)
@@ -0,0 +1,463 @@
+/* Copyright 2009, UCAR/Unidata and OPeNDAP, Inc.
+   See the COPYRIGHT file for more information. */
+
+/*
+ * Copyright (c) 2009, Sun Microsystems, Inc.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * - Redistributions of source code must retain the above copyright notice,
+ *   this list of conditions and the following disclaimer.
+ * - Redistributions in binary form must reproduce the above copyright notice,
+ *   this list of conditions and the following disclaimer in the documentation
+ *   and/or other materials provided with the distribution.
+ * - Neither the name of Sun Microsystems, Inc. nor the names of its
+ *   contributors may be used to endorse or promote products derived
+ *   from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ *
+ *      from: @(#)xdr.h 1.19 87/04/22 SMI
+ *      from: @(#)xdr.h        2.2 88/07/29 4.0 RPCSRC
+ *      $FreeBSD: src/include/rpc/xdr.h,v 1.23 2003/03/07 13:19:40 nectar Exp $
+ *      $NetBSD: xdr.h,v 1.19 2000/07/17 05:00:45 matt Exp $
+ */
+
+/* Define our own implementation of the needed
+   elements of XDR. Assumes read-only
+*/
+
+#undef XXDRTRACE
+
+#include "config.h"
+#include <stdlib.h>
+#include <stdio.h>
+#include <assert.h>
+#include <string.h>
+#include <stdarg.h>
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+
+#include "xxdr.h"
+
+int xxdr_network_order; /* network order is big endian */
+static int xxdr_big_endian; /* what is this machine? */
+
+#ifdef XXDRTRACE
+static void
+xxdrtrace(XXDR* xdr, char* where, off_t arg)
+{
+fprintf(stderr,"xxdr: %s: arg=%ld ; pos=%ld len=%ld\n",
+        where,arg,(long)xdr->pos,(long)xdr->length);
+fflush(stderr);
+}
+#else
+#define xxdrtrace(x,y,z)
+#endif
+
+/* Read-only operations */
+
+int xxdr_getbytes(XXDR* xdrs, char* memory, off_t count)
+{
+    if(!memory) return 0;
+    if(!xdrs->getbytes(xdrs,memory,count))
+	return 0;
+    return 1;
+}
+
+
+/* get a unsigned int from underlying stream*/
+int
+xxdr_uint(XXDR* xdr, unsigned int* ip)
+{
+   if(!ip) return 0;
+   if(!xdr->getbytes(xdr,(char*)ip,sizeof(*ip)))
+	return 0;
+    /*convert from network order*/
+    if(!xxdr_network_order) {
+        swapinline32(ip);
+    }
+    return 1;
+}
+
+/* get a long long  from underlying stream*/
+int
+xxdr_ulonglong(XXDR* xdr, unsigned long* llp)
+{
+   /* Pull two units */
+   if(!llp) return 0;
+   if(!xdr->getbytes(xdr,(char*)llp,sizeof(*llp)))
+       return 0;
+   /* Convert to signed/unsigned  */
+   /*convert from network order*/
+   if(!xxdr_network_order) {
+       swapinline64(llp);
+   }
+   return 1;
+}
+
+/* get some bytes from underlying stream;
+   will move xdrs pointer to next XDRUNIT boundary*/
+int
+xxdr_opaque(XXDR* xdr, char* mem, off_t count)
+{
+    off_t pos,rounded;
+    if(!xdr->getbytes(xdr,mem,count))
+	return 0;
+    pos = xxdr_getpos(xdr);
+    rounded = RNDUP(pos);
+    return xxdr_skip(xdr,(rounded - pos));
+}
+
+/* get counted string from underlying stream*/
+int
+xxdr_string(XXDR* xdrs, char** sp, off_t* lenp)
+{
+    char* s;
+    unsigned int len;
+    if(!xxdr_uint(xdrs,&len)) return 0;
+    s = (char*)malloc((off_t)len+1);
+    if(s == NULL) return 0;
+    if(!xxdr_opaque(xdrs,s,len)) {
+	free((void*)s);	
+	return 0;
+    }
+    s[len] = '\0'; /* make sure it is null terminated */
+    if(sp) *sp = s;
+    if(lenp) *lenp = len;
+    /* xxdr_opaque will have skippped any trailing bytes */
+    return 1;    
+}
+
+/* returns bytes off from beginning*/
+off_t
+xxdr_getpos(XXDR* xdr)
+{
+    return xdr->getpos(xdr);
+}
+
+/* reposition the stream*/
+int
+xxdr_setpos(XXDR* xdr, off_t pos)
+{
+    return xdr->setpos(xdr,pos);
+}
+
+/* returns total available starting at current position */
+off_t
+xxdr_getavail(XXDR* xdr)
+{
+    return xdr->getavail(xdr);
+}
+
+/* free up XXDR  structure */
+void
+xxdr_free(XXDR* xdr)
+{
+    xdr->free(xdr);    
+}
+
+/***********************************/
+
+/* Skip exacly "len" bytes in the input; any rounding must be done by the caller*/
+int
+xxdr_skip(XXDR* xdrs, off_t len)
+{
+    unsigned int pos;
+    pos = xxdr_getpos(xdrs);
+    pos = (pos + len);
+    if(pos < 0) pos = 0;
+    return xxdr_setpos(xdrs,pos);
+}
+
+/* skip "n" string/bytestring instances in the input*/
+int
+xxdr_skip_strings(XXDR* xdrs, off_t n)
+{
+    while(n-- > 0) {
+        unsigned int slen;
+	if(!xxdr_uint(xdrs,&slen)) return 0;
+	slen = RNDUP(slen);
+	if(xxdr_skip(xdrs,slen)) return 0;
+    }
+    return 1;
+}
+
+unsigned int
+xdr_roundup(unsigned int n)
+{
+    unsigned int rounded;
+    rounded = RNDUP(n);
+    return rounded;
+}
+
+unsigned int
+ocbyteswap(unsigned int i)
+{
+    unsigned int swap,b0,b1,b2,b3;
+    b0 = (i>>24) & 0x000000ff;
+    b1 = (i>>16) & 0x000000ff;
+    b2 = (i>>8) & 0x000000ff;
+    b3 = (i) & 0x000000ff;
+    swap = (b0 | (b1 << 8) | (b2 << 16) | (b3 << 24));
+    return swap;
+}
+
+/**************************************************/
+/* File based xdr */
+static void
+xxdr_filefree(XXDR* xdrs)
+{
+    if(xdrs != NULL) {
+        (void)fflush((FILE *)xdrs->data);
+        free(xdrs);
+    }
+}
+
+static int
+xxdr_filegetbytes(XXDR* xdrs, char* addr, off_t len)
+{
+    int ok = 1;
+    int count;
+
+xxdrtrace(xdrs,"getbytes",len);
+    if(len < 0) len = 0;
+    if(!xdrs->valid)
+    {
+        if(fseek((FILE *)xdrs->data, xdrs->pos + xdrs->base, 0) != 0) {
+	    ok=0;
+	    goto done;
+	}
+	xdrs->valid = 1;
+    }
+    if(xdrs->pos + len > xdrs->length)
+        return 0;
+    if(len > 0) {
+        count = fread(addr, len, 1, (FILE*)xdrs->data);
+        if(count <= 0) {
+	    ok=0;
+	    goto done;
+	}
+    }
+    xdrs->pos += len;
+done:
+    return ok;
+}
+
+static off_t
+xxdr_filegetpos(XXDR* xdrs)
+{
+xxdrtrace(xdrs,"getpos",0);
+    return xdrs->pos;
+}
+
+static off_t
+xxdr_filegetavail(XXDR* xdrs)
+{
+xxdrtrace(xdrs,"getavail",0);
+    return (xdrs->length - xdrs->pos);
+}
+
+static int
+xxdr_filesetpos(XXDR* xdrs, off_t pos) 
+{ 
+    int ok = 1;
+xxdrtrace(xdrs,"setpos",pos);
+    if(pos == xdrs->pos) goto done;
+    if(pos < 0) pos = 0;
+    if(pos > xdrs->length) {ok=0;goto done;}
+    xdrs->pos = pos;
+    xdrs->valid = 0;
+done:
+    return ok;
+}
+
+
+/*
+Modified to track the current position to avoid the file io
+operation.  Not sure if this worth the effort because I
+don't actually know the cost to doing an fseek
+*/
+
+/*
+ * Initialize a stdio xdr stream.
+ * Sets the xdr stream handle xdrs for use on the stream file.
+ * Operation flag is set to op.
+ */
+XXDR*
+xxdr_filecreate(FILE* file, off_t base)
+{
+    XXDR* xdrs = (XXDR*)calloc(1,sizeof(XXDR));
+    if(xdrs != NULL) {
+        xdrs->data = (void*)file;
+        xdrs->base = base;
+        xdrs->pos = 0;
+	xdrs->valid = 0;
+        if(fseek(file,0L,SEEK_END)) return NULL;
+	xdrs->length = (off_t)ftell(file);
+	xdrs->length -= xdrs->base;
+        xdrs->getbytes = xxdr_filegetbytes;
+        xdrs->setpos = xxdr_filesetpos;
+        xdrs->getpos = xxdr_filegetpos;
+        xdrs->getavail = xxdr_filegetavail;
+        xdrs->free = xxdr_filefree;
+    }
+xxdrtrace(xdrs,"create",base);
+    return xdrs;
+}
+
+/**************************************************/
+/* memory based xdr */
+
+static void
+xxdr_memfree(XXDR* xdrs)
+{
+    if(xdrs != NULL) {
+        free(xdrs);
+    }
+}
+
+static int
+xxdr_memgetbytes(XXDR* xdrs, char* addr, off_t len)
+{
+    int ok = 1;
+
+xxdrtrace(xdrs,"getbytes",len);
+    if(len < 0) len = 0;
+    if(xdrs->pos+len > xdrs->length) {ok=0; goto done;}
+    if(len > 0) {
+        memcpy(addr,(char*)xdrs->data+xdrs->base+xdrs->pos, len);
+    }
+    xdrs->pos += len;
+done:
+    return ok;
+}
+
+static off_t
+xxdr_memgetpos(XXDR* xdrs)
+{
+xxdrtrace(xdrs,"getpos",0);
+    return xdrs->pos;
+}
+
+static off_t
+xxdr_memgetavail(XXDR* xdrs)
+{
+xxdrtrace(xdrs,"getavail",0);
+    return (xdrs->length - xdrs->pos);
+}
+
+
+static int
+xxdr_memsetpos(XXDR* xdrs, off_t pos) 
+{ 
+    int ok = 1;
+xxdrtrace(xdrs,"setpos",pos);
+    if(pos == xdrs->pos) goto done;
+    if(pos > xdrs->length) {ok=0; goto done;}
+    xdrs->pos = pos;
+done:
+    return ok;
+}
+
+/*
+Modified to track the current position to avoid the file io
+operation.  Not sure if this worth the effort because I
+don't actually know the cost to doing an fseek
+*/
+
+/*
+ * Initialize a stdio xdr stream.
+ * Sets the xdr stream handle xdrs for use on the
+ * given memory starting at base offset.
+ */
+XXDR*
+xxdr_memcreate(char* mem, off_t memsize, off_t base)
+{
+    XXDR* xdrs = (XXDR*)calloc(1,sizeof(XXDR));
+    if(xdrs != NULL) {
+	/* zero base memory */
+        xdrs->data = (void*)(mem + base);
+	xdrs->base = 0;
+        xdrs->length = memsize - base;
+        xdrs->pos = 0;
+        xdrs->getbytes = xxdr_memgetbytes;
+        xdrs->setpos = xxdr_memsetpos;
+        xdrs->getpos = xxdr_memgetpos;
+        xdrs->getavail = xxdr_memgetavail;
+        xdrs->free = xxdr_memfree;
+    }
+xxdrtrace(xdrs,"create",base);
+    return xdrs;
+}
+
+/* Float utility types */
+
+/* get a float from underlying stream*/
+int
+xxdr_float(XXDR* xdr, float* fp)
+{
+   int status = 0;
+   float f;
+   unsigned int* data = (unsigned int*)&f;
+   /* Pull one unit directly into a float */
+   status = xxdr_uint(xdr,data);
+   if(status && fp)
+	*fp = f;
+   return status;
+}
+
+/* Get a double from underlying stream */
+int
+xxdr_double(XXDR* xdr, double* dp)
+{
+   int status = 0;
+   char data[2*XDRUNIT];
+   /* Pull two units */
+   status = xxdr_opaque(xdr,data,2*XDRUNIT);
+   if(status && dp) {
+	xxdrntohdouble(data,dp);
+   }
+   return status;
+}
+
+/* Double needs special handling */
+void
+xxdrntohdouble(char* c8, double* dp)
+{
+    unsigned int ii[2];
+    memcpy(ii,c8,2*XDRUNIT);
+    if(!xxdr_big_endian) {
+	unsigned int tmp;
+	/* reverse byte order */
+	swapinline32(&ii[0]);
+	swapinline32(&ii[1]);
+	/* interchange ii[0] and ii[1] */
+	tmp = ii[0];
+	ii[0] = ii[1];
+	ii[1] = tmp;
+    }
+    if(dp) *dp = *(double*)ii;
+}
+
+void
+xxdr_init()
+{
+    /* Compute if we are same as network order v-a-v xdr */
+    int testint = 0x00000001;
+    char *byte = (char *)&testint;
+    xxdr_big_endian = (byte[0] == 0 ? 1 : 0);
+    xxdr_network_order = xxdr_big_endian;
+}
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/src_netcdf4/xxdr.h
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/src_netcdf4/xxdr.h	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/extern/src_netcdf4/xxdr.h	(revision 1749)
@@ -0,0 +1,183 @@
+/* Copyright 2009, UCAR/Unidata and OPeNDAP, Inc.
+   See the COPYRIGHT file for more information.
+*/
+
+/*
+ * Copyright (c) 2009, Sun Microsystems, Inc.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * - Redistributions of source code must retain the above copyright notice,
+ *   this list of conditions and the following disclaimer.
+ * - Redistributions in binary form must reproduce the above copyright notice,
+ *   this list of conditions and the following disclaimer in the documentation
+ *   and/or other materials provided with the distribution.
+ * - Neither the name of Sun Microsystems, Inc. nor the names of its
+ *   contributors may be used to endorse or promote products derived
+ *   from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ *
+ *      from: @(#)xdr.h 1.19 87/04/22 SMI
+ *      from: @(#)xdr.h        2.2 88/07/29 4.0 RPCSRC
+ *      $FreeBSD: src/include/rpc/xdr.h,v 1.23 2003/03/07 13:19:40 nectar Exp $
+ *      $NetBSD: xdr.h,v 1.19 2000/07/17 05:00:45 matt Exp $
+ */
+
+/* Define our own implementation of the needed
+   elements of XDR. Assumes read-only
+*/
+
+#ifndef XXDR_H
+#define XXDR_H
+
+/*
+ * This is the number of bytes per unit of external data.
+ */
+#define XDRUNIT        (4)
+
+#if 1
+/* faster version when XDRUNIT is a power of two */
+# define RNDUP(x)  (((x) + XDRUNIT - 1) & ~(XDRUNIT - 1))
+#else /* old version */
+#define RNDUP(x)  ((((x) + XDRUNIT - 1) / XDRUNIT) \
+    * XDRUNIT)
+#endif
+
+/* signature: void swapinline32(unsigned int* ip) */
+#define swapinline32(ip) \
+{ \
+    char dst[4]; \
+    char* src = (char*)(ip); \
+    dst[0] = src[3]; \
+    dst[1] = src[2]; \
+    dst[2] = src[1]; \
+    dst[3] = src[0]; \
+    *(ip) = *((unsigned int*)dst); \
+}
+
+/* signature: void swapinline64(unsigned long long* ip) */
+#define swapinline64(ip) \
+{ \
+    char dst[8]; \
+    char* src = (char*)(ip); \
+    dst[0] = src[7]; \
+    dst[1] = src[6]; \
+    dst[2] = src[5]; \
+    dst[3] = src[4]; \
+    dst[4] = src[3]; \
+    dst[5] = src[2]; \
+    dst[6] = src[1]; \
+    dst[7] = src[0]; \
+    *ip = *((unsigned long long*)dst); \
+}
+
+
+#ifdef OCIGNORE
+/* Warning dst and src should not be the same memory (assert &iswap != &i) */
+#define xxdrntoh(dst,src) if(xxdr_network_order){dst=src;}else{swapinline32(dst,src);}
+#define xxdrntohll(dst,src) if(xxdr_network_order){dst=src;}else{swapinline64(dst,src);}
+#define xxdrhton(dst,src) xxdrntoh(dst,src)
+#define xxdrhtonll(dst,src) xxdrntohll(dst,src)
+#endif
+
+/* Double needs special handling */
+extern void xxdrntohdouble(char*,double*);
+
+/*
+ * The XDR handle.
+ * Contains operation which is being applied to the stream,
+ * an operations vector for the particular implementation (e.g. see xdr_mem.c),
+ * and two private fields for the use of the particular implementation.
+ */
+typedef struct XXDR XXDR; /* forward */
+
+/* Assume |off_t| == |void*| */
+struct XXDR {
+  char* data;
+  off_t pos; /* relative to data;
+                 may be a cache of underlying stream pos */
+  int valid;         /* 1=>underlying stream pos == pos */
+  off_t base; /* beginning of data in case bod != 0*/
+  off_t length; /* total size of available data (relative to base)*/
+  /* Define minimum needed case specific operators */
+  int (*getbytes)(XXDR*,char*,off_t);
+  int (*setpos)(XXDR*,off_t);
+  off_t (*getpos)(XXDR*);
+  off_t (*getavail)(XXDR*);
+  void (*free)(XXDR*);		  /* xdr kind specific free function */
+};
+
+/* Track network order */
+extern int xxdr_network_order; /* does this machine match network order? */
+
+/* Read-only operations */
+
+/* Get exactly count bytes from underlying
+   stream; unlike opaque, this will
+   not round up to the XDRUNIT boundary
+*/
+extern int xxdr_getbytes(XXDR*,char*,off_t);
+
+/* get an int from underlying stream*/
+extern int xxdr_uint(XXDR* , unsigned int*);
+
+/* get an int from underlying stream*/
+extern int xxdr_ulonglong(XXDR* , unsigned long*);
+
+/* get a float from underlying stream*/
+extern int xxdr_float(XXDR* , float*);
+
+/* get a double from underlying stream*/
+extern int xxdr_double(XXDR* , double*);
+
+/* get some bytes from underlying stream;
+   Warning: will read upto the next XDRUNIT boundary
+*/
+extern int xxdr_opaque(XXDR*, char*, off_t);
+
+/* get counted string from underlying stream*/
+extern int xxdr_string(XXDR*, char**, off_t*);
+
+/* returns bytes off from beginning*/
+extern off_t xxdr_getpos(XXDR*);
+
+/* reposition the stream*/
+extern int xxdr_setpos(XXDR*, off_t);
+
+/* get remaining data available starting at current position */
+extern off_t xxdr_getavail(XXDR*);
+
+/* free up XXDR  structure */
+void xxdr_free(XXDR*);
+
+/* File and memory creators */
+extern XXDR* xxdr_filecreate(FILE* file, off_t bod);
+extern XXDR* xxdr_memcreate(char* mem, off_t memsize, off_t bod);
+
+/* Misc */
+extern int xxdr_skip(XXDR* xdrs, off_t len); /* WARNING: will skip exactly len bytes;
+                                                any rounding must be done by caller */
+
+extern int xxdr_skip_strings(XXDR* xdrs, off_t n);
+
+extern unsigned int xxdr_roundup(off_t n); /* procedural version of RNDUP macro */
+
+extern void xxdr_init();
+
+/* Define some inlines */
+#define xxdr_length(xdrs) ((xdrs)->length)
+
+#endif /*XXDR_H*/
+
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/header_licence
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/header_licence	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/header_licence	(revision 1749)
@@ -0,0 +1,10 @@
+Software name   : XIOS (Xml I/O Server)
+                  http://forge.ipsl.jussieu.fr/ioserver
+Creation date   : January 2009
+Licence         : CeCCIL version2
+                  see license file in root directory : Licence_CeCILL_V2-en.txt
+                  or http://www.cecill.info/licences/Licence_CeCILL_V2-en.html
+Holder          : CEA/LSCE (Laboratoire des Sciences du CLimat et de l'Environnement)
+                  CNRS/IPSL (Institut Pierre Simon Laplace)
+Project Manager : Yann Meurdesoif
+                  yann.meurdesoif@cea.fr      
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/inputs/Basic/iodef.xml
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/inputs/Basic/iodef.xml	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/inputs/Basic/iodef.xml	(revision 1749)
@@ -0,0 +1,51 @@
+<?xml version="1.0"?>
+<simulation>
+  <context id="test_domain">
+    <file_definition type="one_file" par_access="collective"  output_freq="6h" sync_freq="6h" output_level="10" enabled=".TRUE.">
+      <file id="output_domain">
+        <field id="field_domain_1" grid_ref="domain" operation="average" freq_op="1ts" prec="8" />
+        <field id="field_domain_2" domain_ref="domain" operation="average" freq_op="1ts" prec="8" />
+      </file>
+    </file_definition>
+
+    <grid_definition>
+      <grid id="domain">
+        <domain domain_ref="domain"/>
+      </grid>
+    </grid_definition>
+
+   <domain_definition>
+    <domain id="domain"/>
+  </domain_definition>
+  </context>
+
+  <context id="test_axis">
+    <file_definition type="one_file" par_access="collective"  output_freq="6h" sync_freq="6h" output_level="10" enabled=".TRUE.">
+      <file id="output_axis">
+        <field id="field_axis" grid_ref="domain" operation="average" freq_op="1ts" prec="8" />
+      </file>
+    </file_definition>
+
+    <grid_definition>
+      <grid id="domain">
+        <axis id="x" />
+        <axis id="y" />
+      </grid>
+    </grid_definition>
+  </context>
+
+  <context id="xios">
+      <variable_definition>
+        <variable_group id="buffer">
+            <variable id="optimal_buffer_size" type="string">performance</variable>
+            <variable id="buffer_size_factor" type="double">1.0</variable>
+        </variable_group>
+
+        <variable_group id="parameters" >
+          <variable id="using_server" type="bool">false</variable>
+          <variable id="info_level" type="int">50</variable>
+          <variable id="print_file" type="bool">true</variable>
+        </variable_group>
+      </variable_definition>
+  </context>
+</simulation>
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/inputs/COMPLETE/context_atmosphere.xml
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/inputs/COMPLETE/context_atmosphere.xml	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/inputs/COMPLETE/context_atmosphere.xml	(revision 1749)
@@ -0,0 +1,45 @@
+<!-- Context atm -->
+
+<context id="atmosphere">
+
+  <field_definition level="1" enabled=".FALSE." default_value="9.96921e+36">
+    <field id="field_A_atm"  name="field_A_atm_origin" operation="average" freq_op="1ts" grid_ref="grid_A_atm" />
+    <field id="field_A_atm_zoom"  name="field_A_atm" operation="average" freq_op="1ts" field_ref="field_A_atm" grid_ref="grid_A_atm_zoom" />
+  </field_definition>
+
+  <file_definition type="multiple_file" par_access="collective" output_freq="6h" sync_freq="6h" output_level="10" enabled=".TRUE.">
+    <file id="output_atmosphere" name="output_atmosphere">
+      <field field_ref="field_A_atm" />
+    </file>
+    <file id="output_atmosphere_zoom" name="output_atmosphere_zoom">
+      <field field_ref="field_A_atm_zoom" name="field_A_atm_zoom" />
+    </file>
+  </file_definition>
+
+  <axis_definition>
+    <axis id="axis_atm"/>
+    <axis id="axis_atm_zoom" axis_ref="axis_atm">
+      <zoom_axis id="axis_atm_zoom" n="4"/>
+    </axis>
+  </axis_definition>
+
+  <domain_definition>
+    <domain id="domain_atm" />
+    <domain id="domain_atm_zoom" domain_ref="domain_atm">
+      <zoom_domain id="domain_atm_zoom" />
+    </domain>
+  </domain_definition>
+
+  <grid_definition>
+   <grid id="grid_A_atm">
+     <domain domain_ref="domain_atm" />
+     <axis axis_ref="axis_atm" />
+   </grid>
+   <grid id="grid_A_atm_zoom">
+     <domain domain_ref="domain_atm_zoom" />
+     <axis axis_ref="axis_atm_zoom" />
+   </grid>
+  </grid_definition>
+
+
+</context>
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/inputs/COMPLETE/context_surface.xml
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/inputs/COMPLETE/context_surface.xml	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/inputs/COMPLETE/context_surface.xml	(revision 1749)
@@ -0,0 +1,60 @@
+<!-- Context surface -->
+
+<context id="surface">
+
+  <field_definition level="1" enabled=".TRUE." domain_ref="domain_srf"  axis_ref="axis_srf" operation="average" freq_op="1ts" default_value="9.96921e+36" prec="4">
+    <field id="field_A_srf"  name="field_A_srf" long_name="Champ en degC" operation="average" unit="degC" />
+    <field id="field_A_srf_2" field_ref="field_A_srf" />
+    <field id="field_A_srf_K" name="field_A_srf_K" field_ref="field_A_srf" long_name="Champ en degK" unit="degK"> field_A_srf + 273.15 </field>
+    <field id="field_A_srf_K_2" field_ref="field_A_srf_K" />
+    <field id="field_A_srf_max" name="field_A_srf_max" field_ref="field_A_srf" long_name="maximum field_A_srf" operation="maximum" />
+    <field id="field_D_srf" name="field_D_srf" long_name="Somme champ A et C"> field_A_srf + field_C_srf </field>
+  </field_definition>
+
+  <file_definition type="multiple_file" par_access="collective" output_level="10" enabled=".TRUE.">
+    <file id="output_surface" name="output_surface_6h" output_freq="6h">
+      <field field_ref="field_A_srf">
+        <variable id="my_attribute1" type="string">surf_att</variable>
+        <variable id="my_attribute2" type="int"> 10 </variable>
+        <variable id="my_attribute3" type="float">6.8</variable>
+        <variable id="my_attribute5" type="double">100.201</variable>
+      </field>
+      <field field_ref="field_A_srf_K" />
+      <field field_ref="field_A_srf_K_2" name="field_A_srf_K_2" /> <!-- Should be identical to field_A_srf_K -->
+      <field field_ref="field_A_srf_K" name="field_A_srf_K_3">field_A_srf_K</field> <!-- Should be identical to field_A_srf_K -->
+      <field field_ref="field_A_srf_K_2" name="field_A_srf_K_max_mean" long_name="Maximum of hourly average over 6h" operation="maximum" freq_op="1h"> @field_A_srf_K </field>
+      <field field_ref="field_A_srf" name="field_A_srf_min" operation="minimum" />
+      <field field_ref="field_A_srf_2" name="field_A_srf_min_2" operation="minimum" /> <!-- Should be identical to field_A_srf_min -->
+      <field field_ref="field_A_srf" name="field_A_srf_max" operation="maximum" />
+      <field field_ref="field_A_srf" name="field_A_srf_prec4" prec="8" />
+      <field field_ref="field_A_srf_max" name="field_A_srf_mean_max" long_name="Average of hourly maximum over 6h" operation="average" freq_op="1h"> @field_A_srf_max </field>
+      <variable id="my_global_attribute" type="string">file_6h</variable>
+    </file>
+
+    <file type="one_file" id="output_surface_1d" name="output_surface_1d" output_freq="1d" enabled="TRUE">
+      <field field_ref="field_A_srf" indexed_output="TRUE">
+        <variable id="my_attribute1" type="string">surf_att</variable>
+        <variable id="my_attribute2" type="int">10</variable>
+        <variable id="my_attribute3" type="float">6.8</variable>
+        <variable id="my_attribute4" type="double">100.201</variable>
+      </field>
+      <field field_ref="field_A_srf_K" />
+      <field field_ref="field_A_srf" name="field_A_srf_min" operation="minimum" />
+      <field field_ref="field_A_srf" name="field_A_srf_max" operation="maximum" />
+      <field field_ref="field_A_srf" name="field_A_srf_prec4" prec="8" />
+      <field field_ref="field_A_srf_max" name="field_A_srf_mean_max" long_name="Average of hourly maximum over 1d" operation="average" freq_op="1h"> @field_A_srf_max </field>
+      <variable id="my_global_attribute" type="string" >file_1d</variable>
+    </file>
+  </file_definition>
+
+  <axis_definition>
+    <axis id="axis_srf" />
+  </axis_definition>
+
+  <domain_definition>
+    <domain id="domain_srf" />
+  </domain_definition>
+
+  <grid_definition />
+
+</context>
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/inputs/COMPLETE/iodef.xml
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/inputs/COMPLETE/iodef.xml	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/inputs/COMPLETE/iodef.xml	(revision 1749)
@@ -0,0 +1,27 @@
+<?xml version="1.0"?>
+<simulation>
+
+  <context id="atmosphere" src="./context_atmosphere.xml"/>
+
+  <context id="surface" src="./context_surface.xml"/>
+
+  <context id="xios">
+      <variable_definition>
+        <variable_group id="server">
+            <variable id="using_server2" type="bool">true</variable>
+            <variable id="ratio_server2" type="int">50</variable>
+        </variable_group>
+
+        <variable_group id="buffer">
+            <variable id="optimal_buffer_size" type="string">memory</variable>
+            <variable id="buffer_size_factor" type="double">1.0</variable>
+         </variable_group>
+
+        <variable_group id="parameters" >
+          <variable id="info_level" type="int">100</variable>
+          <variable id="print_file" type="bool">true</variable>
+        </variable_group>
+      </variable_definition>
+  </context>
+
+</simulation>
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/inputs/REMAP/iodef.xml
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/inputs/REMAP/iodef.xml	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/inputs/REMAP/iodef.xml	(revision 1749)
@@ -0,0 +1,192 @@
+<?xml version="1.0"?>
+<simulation>
+
+ <context id="test">
+   <calendar type="Gregorian" start_date="2012-03-01 15:00:00" time_origin="2012-02-28 15:00:00 + 1d" />
+   <field_definition level="1" >
+    <field_group id="fields_src" operation="instant">
+       <field id="src_field_2D" domain_ref="src_domain"/>
+       <field id="src_field_2D_clone" domain_ref="src_domain_clone"/>
+       <field id="src_field_3D" domain_ref="src_domain" axis_ref="src_axis"/>       
+       <field id="src_field_3D_pression" grid_ref="src_grid_3D"/>
+       <field id="src_field_4D" grid_ref="grid_4D"/>       
+    </field_group>
+    <field_group  id="fields_dst">
+      <field id="dst_field_2D" field_ref="src_field_2D" domain_ref="dst_domain"/>
+      <field id="dst_field_2D_regular_pole" field_ref="src_field_2D" domain_ref="dst_domain_regular_pole"/>
+      <field id="dst_field_3D" field_ref="src_field_3D" grid_ref="dst_grid_3D"/>
+      <field id="dst_field_3D_interp" field_ref="src_field_3D" axis_ref="dst_axis"/>       
+      <field id="dst_field_4D_extract" field_ref="src_field_4D" grid_ref="grid_4D_extract"/>      
+      <field id="dst_field_2D_clone" field_ref="src_field_2D_clone" domain_ref="dst_domain"/>
+    </field_group>
+    <field_group id="read_fields" operation="instant" enabled="FALSE">
+      <field id="tmp_field_0" domain_ref="src_domain_regular_read" enabled="true"/>
+      <field id="tmp_field_clone" field_ref="tmp_field_0"/>
+      <field id="tmp_field_1" grid_ref="src_grid_curvilinear_read" />
+      <field id="tmp_field_2" grid_ref="src_grid_unstructured_read" />
+      <field id="dst_field_regular" field_ref="tmp_field_2" grid_ref="dst_grid_regular"/>      
+      <field id="dst_field_regular_pole_0" field_ref="tmp_field_0" domain_ref="dst_domain_regular_pole"/>
+      <field id="dst_field_regular_pole_1" field_ref="tmp_field_clone" domain_ref="dst_domain_regular_pole"/>
+    </field_group> 
+   </field_definition>
+
+   <file_definition type="one_file" par_access="collective" output_freq="1ts" output_level="10" enabled=".TRUE.">
+      <file_group id="write_files" >
+        <file id="output_2D" name="output_2D" >
+          <field field_ref="src_field_2D" name="field_src" />
+          <field field_ref="src_field_2D" name="field_dst_regular_0"  domain_ref="dst_domain_regular_pole" default_value="10.e+5"/>
+          <field field_ref="dst_field_2D" name="field_dst_regular_1" />
+          <field field_ref="dst_field_2D_regular_pole" name="field_dst_regular_2" />
+          <field field_ref="dst_field_2D_clone" name="field_dst_regular_3" />
+        </file> 
+       <file id="output_3D" name="output_3D" >
+          <field field_ref="src_field_3D" name="field_src" />
+          <field field_ref="src_field_3D_pression" name="field" />
+          <field field_ref="dst_field_3D_interp" name="field_dst_interp_domain" />
+          <field field_ref="dst_field_3D_interp" name="field_dst_interp_domain_axis" domain_ref="dst_domain_regular_pole"/>  
+       </file>
+       <file id="output_4D" name="output_4D" >
+          <field field_ref="src_field_4D" name="field_4D" />
+          <field field_ref="dst_field_4D_extract" name="field_4D_extract" />
+        </file>
+     </file_group>
+     <file_group id="read_files" >
+       <file id="output_src_regular" name="output_src_regular" mode="read" >
+          <field id="src_field_regular" name="field" grid_ref="src_grid_regular_read" operation="instant"/>
+       </file>
+<!--        <file id="output_src_curvilinear" name="output_src_curvilinear" mode="read" >
+          <field id="src_field_curvilinear" name="field_A" grid_ref="src_grid_curvilinear_read" operation="instant"/>
+       </file>
+       <file id="output_src_unstructured" name="output_src_unstructured" mode="read" >
+          <field id="src_field_unstructured" name="field" grid_ref="src_grid_unstructured_read" operation="instant"/>
+       </file> -->
+      </file_group>
+     <file_group id="read_then_write_files" enabled=".FALSE.">
+<!--        <file id="output_regular_pole" name="output_dst_regular" >
+          <field field_ref="dst_field_regular" name="field_regular" />
+          <field field_ref="dst_field_regular_pole_0" name="field_regular_pole_0" />
+          <field field_ref="dst_field_regular_pole_1" name="field_regular_pole_1" />
+       </file>
+       <file id="output_dst_curvilinear" name="output_dst_curvilinear">
+          <field field_ref="tmp_field_1" operation="instant"/>
+       </file>
+       <file id="output_dst_unstructured" name="output_dst_unstructured" >
+          <field field_ref="tmp_field_2" operation="instant"/>
+       </file> -->
+     </file_group>
+   </file_definition>
+
+   <axis_definition>
+    <axis_group id="axis_src">
+      <axis id="src_axis" positive="down" />
+      <axis id="nq" positive="down" />
+      <axis id="src_axis_curvilinear_read" />
+    </axis_group>
+    <axis_group id="axis_dst">
+     <axis id="dst_axis" positive="down" n_glo="2" value="(0,1)[120 220]">
+       <interpolate_axis type="polynomial" order="1" coordinate="src_field_3D_pression"/>
+       <!-- <interpolate_axis type="polynomial" order="1" />         -->
+     </axis>
+    </axis_group>
+   </axis_definition>
+
+   <domain_definition>
+    <domain_group id="read_domains">
+      <domain id="src_domain_regular_read" type="rectilinear">
+        <generate_rectilinear_domain />
+      </domain>
+      <domain id="src_domain_curvilinear_read" type="curvilinear">
+        <generate_rectilinear_domain />
+      </domain>
+      <domain id="src_domain_unstructured_read" type="unstructured">
+      </domain>
+    </domain_group>
+    <domain_group id="domain_src">
+      <domain id="src_domain" />
+      <domain id="src_domain_clone"/>
+    </domain_group>
+
+    <domain_group id="domain_dst">
+     <domain id="dst_domain">
+       <interpolate_domain/>
+     </domain>
+     <domain id="dst_domain_regular_pole" ni_glo="90" nj_glo="45" type="rectilinear">
+       <generate_rectilinear_domain id="domain_regular_pole"/>
+       <interpolate_domain/>       
+       <zoom_domain ibegin="0" ni="45" jbegin="0" nj="45" />
+     </domain>
+     <domain id="dst_domain_regular" ni_glo="90" nj_glo="45" type="rectilinear">
+       <generate_rectilinear_domain />
+       <interpolate_domain/>       
+     </domain>
+    </domain_group>
+   </domain_definition>
+
+  <grid_definition>
+    <grid_group id="read_grids">
+      <grid id="src_grid_regular_read">
+        <domain domain_ref="src_domain_regular_read"/>
+      </grid>
+      <grid id="src_grid_curvilinear_read">
+        <domain domain_ref="src_domain_curvilinear_read"/>
+        <axis axis_ref="src_axis_curvilinear_read" />
+      </grid>
+      <grid id="src_grid_unstructured_read">
+        <domain domain_ref="src_domain_unstructured_read"/>
+      </grid>
+    </grid_group>
+
+    <grid_group id="grid_src">
+      <grid id="src_grid_3D">
+        <domain domain_ref="src_domain"/>
+        <axis axis_ref="src_axis"/>
+      </grid>
+      <grid id="grid_4D">
+        <domain domain_ref="src_domain"/>
+        <axis axis_ref="src_axis"/>
+        <axis axis_ref="nq"/>
+      </grid>
+    </grid_group>
+
+    <grid_group id="grid_dst">
+      <grid id="dst_grid_regular">
+        <domain domain_ref="dst_domain_regular"/>
+      </grid>
+      <grid id="dst_grid_3D">
+        <domain domain_ref="src_domain"/>
+        <axis axis_ref="dst_axis"/>
+      </grid>
+      <grid id="grid_4D_extract">
+        <domain domain_ref="dst_domain_regular_pole"/>      
+        <axis axis_ref="src_axis"/>        
+        <scalar >
+          <extract_axis position="1"/>
+        </scalar>      
+      </grid>
+    </grid_group>
+  </grid_definition>
+  </context>
+
+  <context id="xios">
+      <variable_definition>
+         <variable_group id="server">
+            <variable id="using_server2" type="bool">true</variable>
+            <variable id="ratio_server2" type="int">50</variable>
+         </variable_group>
+
+        <variable_group id="buffer">
+            <variable id="optimal_buffer_size" type="string">performance</variable>
+            <variable id="buffer_size_factor" type="double">30.0</variable>
+            <variable id="min_buffer_size" type="double">800000</variable>
+         </variable_group>
+
+        <variable_group id="parameters" >
+          <variable id="using_server" type="bool">true</variable>
+          <variable id="info_level" type="int">50</variable>
+          <variable id="print_file" type="bool">true</variable>
+        </variable_group>
+      </variable_definition>
+  </context>
+
+</simulation>
+
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/inputs/Regular_ugrid/context_atmosphere.xml
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/inputs/Regular_ugrid/context_atmosphere.xml	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/inputs/Regular_ugrid/context_atmosphere.xml	(revision 1749)
@@ -0,0 +1,21 @@
+<!-- Context atm -->
+
+<context id="atmosphere">
+
+  <field_definition freq_op="1ts" enabled=".TRUE." operation="instant" >
+   <field id="temp" name="temp" long_name="Surface Temperature" unit="K" domain_ref="face" />
+  </field_definition>
+
+  <file_definition type="one_file" output_freq="1h" par_access="collective" enabled=".TRUE.">
+    <file id="output_cube_CF" name="output_cube_CF" >
+      <field field_ref="temp"/>
+    </file> 
+    <file id="output_cube_UGRID" name="output_cube_UGRID" convention="UGRID">
+      <field field_ref="temp"/>
+   </file>
+ </file_definition>
+
+  <domain_definition>
+   <domain id="face" name="mesh" nvertex="4"/>  
+ </domain_definition>
+ </context>
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/inputs/Regular_ugrid/iodef.xml
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/inputs/Regular_ugrid/iodef.xml	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/inputs/Regular_ugrid/iodef.xml	(revision 1749)
@@ -0,0 +1,20 @@
+<?xml version="1.0"?>
+<simulation>
+
+  <context id="atmosphere" src="./context_atmosphere.xml"/> 
+
+  <context id="xios">
+      <variable_definition>
+        <variable_group id="buffer">
+            <variable id="optimal_buffer_size" type="string">performance</variable>
+            <variable id="buffer_size_factor" type="double">1.0</variable>
+         </variable_group>
+
+        <variable_group id="parameters" >
+          <variable id="info_level" type="int">1</variable>
+          <variable id="print_file" type="bool">true</variable>
+        </variable_group>
+      </variable_definition>
+  </context>
+
+</simulation>
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/inputs/Second_server/context_atmosphere.xml
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/inputs/Second_server/context_atmosphere.xml	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/inputs/Second_server/context_atmosphere.xml	(revision 1749)
@@ -0,0 +1,32 @@
+<!-- Context atm -->
+
+<context id="atmosphere">
+
+  <field_definition freq_op="1ts" enabled=".TRUE." operation="instant" domain_ref="atm_face" >
+   <field id="atm_temp1" name="atm_temp1" long_name="Surface Temperature" unit="K" />
+   <field id="atm_temp2" name="atm_temp2" long_name="Surface Temperature" unit="K" /> 
+  </field_definition>
+
+  <file_definition type="one_file" output_freq="3600s" par_access="collective" enabled=".TRUE.">
+   <file id="atm_output9" name="atm_output9" compression_level="9" >
+    <!--  <field field_ref="atm_temp1" />-->
+      <field field_ref="atm_temp2"/>
+    </file> 
+<!--    <file id="atm_output2" name="atm_output2" timeseries="both" ts_prefix="TS" >
+      <field field_ref="atm_temp2" ts_enabled=".TRUE." ts_split_freq="2h"/>
+    </file> -->
+<!--    <file id="atm_output0" name="atm_output0" >
+      <field field_ref="atm_temp1" />
+      <field field_ref="atm_temp2"/>
+    </file> 
+   <file id="atm_output2" name="atm_output2" compression_level="2" >
+      <field field_ref="atm_temp1" />
+      <field field_ref="atm_temp2"/>
+    </file> 
+-->
+ </file_definition>
+
+  <domain_definition>
+   <domain id="atm_face" name="mesh" nvertex="4"/>  
+</domain_definition>
+ </context>
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/inputs/Second_server/context_surface.xml
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/inputs/Second_server/context_surface.xml	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/inputs/Second_server/context_surface.xml	(revision 1749)
@@ -0,0 +1,18 @@
+<!-- Context surface -->
+
+<context id="atmosphere">
+
+  <field_definition freq_op="1ts" enabled=".TRUE." operation="instant" >
+   <field id="srf_temp" name="srf_temp" long_name="Surface Temperature" unit="K" domain_ref="domain_srf" />
+  </field_definition>
+
+  <file_definition type="one_file" output_freq="1h" par_access="collective" enabled=".TRUE.">
+    <file id="srf_output" name="srf_output" >
+      <field field_ref="srf_temp" />
+    </file> 
+  </file_definition>
+
+  <domain_definition>
+   <domain id="domain_srf" name="mesh" nvertex="4"/>  
+  </domain_definition>
+ </context>
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/inputs/Second_server/iodef.xml
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/inputs/Second_server/iodef.xml	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/inputs/Second_server/iodef.xml	(revision 1749)
@@ -0,0 +1,27 @@
+<?xml version="1.0"?>
+<simulation>
+
+  <context id="atmosphere" src="./context_atmosphere.xml"/> 
+  <context id="surface" src="./context_surface.xml"/>  
+
+  <context id="xios">
+      <variable_definition>
+
+         <variable_group id="server">
+            <variable id="using_server2" type="bool">true</variable>
+            <variable id="ratio_server2" type="int">50</variable>
+         </variable_group>
+
+        <variable_group id="buffer">
+            <variable id="optimal_buffer_size" type="string">performance</variable>
+            <variable id="buffer_size_factor" type="double">1.0</variable>
+         </variable_group>
+
+        <variable_group id="parameters" >
+          <variable id="info_level" type="int">100</variable>
+          <variable id="print_file" type="bool">true</variable>
+        </variable_group>
+      </variable_definition>
+  </context>
+
+</simulation>
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/inputs/Unstruct/iodef.xml
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/inputs/Unstruct/iodef.xml	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/inputs/Unstruct/iodef.xml	(revision 1749)
@@ -0,0 +1,58 @@
+<?xml version="1.0"?>
+<simulation>
+
+ <context id="surface">
+   <calendar type="Gregorian" start_date="2012-03-01 15:00:00" time_origin="2012-02-28 15:00:00 + 1d" />
+
+   <field_definition level="1" enabled=".TRUE." default_value="1000">
+     <field id="field_A_srf"  operation="average" freq_op="3600s" grid_ref="grid_A"/>
+     <field id="field_A_expand"  operation="average" grid_ref="grid_dst" field_ref="field_A_srf"/>
+   </field_definition>
+
+   <file_definition type="one_file" par_access="collective" output_freq="1h" output_level="10" enabled=".TRUE." >
+     <file id="output" name="output">
+        <field field_ref="field_A_expand" name="field"/>
+     </file>
+   </file_definition>
+
+   <axis_definition>
+     <axis id="axis_srf" positive="up"/>
+   </axis_definition>
+
+   <domain_definition>
+     <domain id="domain_srf" />     
+     <domain id="domain_dst" domain_ref="domain_srf" >
+       <expand_domain/>
+       <compute_connectivity_domain id="compute" type="node"/>
+     </domain>
+   </domain_definition>
+
+   <grid_definition>
+     <grid id="grid_A">
+       <domain domain_ref="domain_srf" />
+       <axis axis_ref="axis_srf" />
+     </grid>
+     <grid id="grid_dst">
+       <domain domain_ref="domain_dst" />
+       <axis axis_ref="axis_srf" />
+     </grid>
+   </grid_definition>
+  </context>
+
+  <context id="xios">
+      <variable_definition>
+        <variable_group id="buffer">
+            <variable id="optimal_buffer_size" type="string">performance</variable>
+            <variable id="buffer_size_factor" type="double">1.0</variable>
+         </variable_group>
+
+        <variable_group id="parameters" >
+          <variable id="using_server" type="bool">false</variable>
+          <variable id="info_level" type="int">50</variable>
+          <variable id="print_file" type="bool">true</variable>
+        </variable_group>
+      </variable_definition>
+  </context>
+
+</simulation>
+
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/inputs/Version2/iodef.xml
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/inputs/Version2/iodef.xml	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/inputs/Version2/iodef.xml	(revision 1749)
@@ -0,0 +1,146 @@
+<?xml version="1.0"?>
+<simulation>
+
+ <context id="test">
+   <calendar type="Gregorian" start_date="2012-03-01 15:00:00" time_origin="2012-02-29 15:00:00" />
+
+   <field_definition level="1" enabled=".FALSE." default_value="9.96921e+36">
+     <field id="field_Domain_Axis"  operation="average" freq_op="3600s" domain_ref="domain_A"  axis_ref="axis_A" />
+     <field id="field_A"  operation="average" freq_op="3600s" grid_ref="grid_A" />
+     <field id="field_Axis"  operation="average" freq_op="3600s" grid_ref="grid_Axis" />
+     <field id="field_Two_Axis"  operation="average" freq_op="3600s" grid_ref="grid_Two_Axis" />
+     <field id="field_All_Axis" operation="average" freq_op="3600s" grid_ref="grid_All_Axis" />
+     <field id="field_Axis_transformed"  operation="average" freq_op="3600s" field_ref="field_A" grid_ref="grid_Axis_tranformed" />
+     <field id="field_Axis_transformed_Interpolated"  operation="average" freq_op="3600s" field_ref="field_Axis" grid_ref="grid_Axis_tranformed_Interpolated" />
+     <field id="field_Domain_transformed_Interpolated"  operation="average" freq_op="3600s" field_ref="field_A" grid_ref="grid_Domain_tranformed_Interpolated" />
+     <field id="field_Scalar" operation="average" freq_op="3600s" grid_ref="ScalarGrid" />
+     <field id="field_ReduceScalar" operation="average" field_ref="field_A" freq_op="3600s" grid_ref="ScalarReduceGrid" />
+     <field id="field_Value"  operation="average" freq_op="3600s" grid_ref="grid_A" />
+   </field_definition>
+
+   <file_definition type="multiple_file" par_access="collective" output_freq="6h" output_level="10" enabled=".TRUE.">
+     <file id="output" name="output" type="one_file">
+        <field field_ref="field_A" />
+     </file>
+     <file id="output_Axis" name="output_Axis" type="one_file">
+        <field field_ref="field_Axis" />
+     </file>
+     <file id="output_Two_Axis" name="output_Two_Axis" type="one_file">
+        <field field_ref="field_Two_Axis" />
+     </file>
+     <file id="output_All_Axis" name="output_All_Axis" type="one_file">
+        <field field_ref="field_All_Axis" />
+     </file>
+     <file id="output_Axis_transformed" name="output_Axis_transformed" type="one_file">
+        <field field_ref="field_Axis_transformed" />
+     </file>
+     <file id="output_Axis_transformed_interpolated" name="output_Axis_transformed_interpolated">
+        <field field_ref="field_Axis_transformed_Interpolated" />
+     </file>
+     <file id="output_Domain_transformed_interpolated" name="output_Domain_transformed_interpolated" type="one_file">
+        <field field_ref="field_Domain_transformed_Interpolated" />
+     </file>
+     <file id="output_Scalar" name="output_Scalar" type="one_file">
+        <field field_ref="field_Scalar" />
+     </file>
+     <file id="output_ReduceScalar" name="output_ReduceScalar" type="one_file">
+        <field field_ref="field_ReduceScalar" />
+     </file>
+   </file_definition>
+
+   <axis_definition>
+     <axis id="axis_A" />
+     <axis id="axis_B" />
+     <axis id="axis_C" />
+     <axis id="axis_D" />
+     <axis id="axis_E">
+       <interpolate_axis type="polynomial" order="3"/>
+     </axis>
+     <axis id="axis_F" axis_ref="axis_C">
+       <interpolate_axis type="polynomial" order="3" coordinate="field_Value"/>
+<!--       <inverse_axis />-->
+<!--        <zoom_axis begin="0" n="4" />-->
+<!--        <inverse_axis />-->
+     </axis>
+   </axis_definition>
+
+   <scalar_definition>
+     <scalar id="scalar" value="10.0">
+       <reduce_axis operation="max"/>
+     </scalar>
+   </scalar_definition>
+
+   <domain_definition>
+     <domain id="domain_A" />
+     <domain id="domain_A_transformed">
+       <generate_rectilinear_domain />
+     </domain>
+   </domain_definition>
+
+   <grid_definition>
+     <grid_group id="gridGroup">
+       <grid id="grid_A">
+         <domain domain_ref="domain_A" />
+         <axis axis_ref="axis_C" positive="up"/>
+       </grid>
+       <grid id="grid_Axis">
+         <axis axis_ref="axis_D" />
+       </grid>
+       <grid id="grid_Two_Axis">
+         <axis axis_ref="axis_A" />
+         <axis axis_ref="axis_B" />
+       </grid>
+       <grid id="grid_All_Axis">
+         <axis axis_ref="axis_A" />
+         <axis axis_ref="axis_B" />
+         <axis axis_ref="axis_C" />
+       </grid>
+       <grid id="grid_Axis_tranformed">
+         <domain domain_ref="domain_A" />
+         <axis axis_ref="axis_F" />
+       </grid>
+       <grid id="grid_Domain_tranformed_Interpolated">
+         <domain domain_ref="domain_A_transformed" />
+         <axis axis_ref="axis_C" />
+       </grid>
+       <grid id="grid_Axis_tranformed_Interpolated">
+         <axis axis_ref="axis_E" />
+       </grid>
+       <grid id="ScalarReduceGrid">
+        <domain domain_ref="domain_A" />
+        <scalar scalar_ref="scalar"/>
+       </grid>
+       <grid id="ScalarGrid">
+        <scalar scalar_ref="scalar"/>
+       </grid>
+     </grid_group>
+   </grid_definition>
+
+  </context>
+
+  <context id="toto" >
+  </context>
+
+  <context id="titi">
+  </context>
+
+  <context id="tata">
+  </context>
+
+  <context id="xios">
+      <variable_definition>
+        <variable_group id="buffer">
+            <variable id="optimal_buffer_size" type="string">performance</variable>
+            <variable id="buffer_size_factor" type="double">1.0</variable>
+         </variable_group>
+
+        <variable_group id="parameters" >
+          <variable id="using_server" type="bool">false</variable>
+          <variable id="info_level" type="int">50</variable>
+	        <variable id="print_file" type="bool">true</variable>
+        </variable_group>
+      </variable_definition>
+  </context>
+
+</simulation>
+
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/inputs/iodef.xml
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/inputs/iodef.xml	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/inputs/iodef.xml	(revision 1749)
@@ -0,0 +1,88 @@
+<?xml version="1.0"?>
+<simulation>
+
+ <context id="test">
+   <calendar type="Gregorian" start_date="2012-03-01 15:00:00" time_origin="2012-02-28 15:00:00 + 1d" />
+
+
+   <field_definition level="1" enabled=".TRUE.">
+     <field id="field_A"  operation="average" freq_op="3600s" grid_ref="grid_A"/>
+     <field id="field_Axis"  operation="average" freq_op="3600s" axis_ref="axis_A"/>
+     <field id="field_Domain"  operation="average" freq_op="3600s" domain_ref="domain_A"/>
+     <field id="field_A_zoom"  operation="average" freq_op="3600s" field_ref="field_A" grid_ref="grid_A_zoom"/>
+     <field id="field_Scalar"  operation="average" freq_op="3600s" grid_ref="grid_Scalar"/>
+   </field_definition>
+
+
+   <file_definition type="one_file" par_access="collective" output_freq="1h" output_level="10" enabled=".FALSE.">
+      <file id="output" name="output" enabled=".TRUE.">
+        <!-- <field field_ref="field_Domain" name="field_A" /> -->
+        <field field_ref="field_A" name="field_A" /> 
+        <field field_ref="field_A_zoom" name="field_B" />
+     </file>
+     <file id="output1" name="output1" enabled=".TRUE.">
+        <!-- <field field_ref="field_Domain" name="field_A" /> -->
+        <field field_ref="field_A" name="field_A" />        
+     </file> 
+     <file id="output2" name="output2" enabled=".TRUE.">
+        <!-- <field field_ref="field_Domain" name="field_A" /> -->
+        <field field_ref="field_Scalar" name="field_A" />        
+     </file>
+ <!--     <file id="output_s" name="output_s" mode="read" >
+       <field id="field" name="field_A" grid_ref="grid_Scalar" operation="instant" />
+     </file> -->
+   </file_definition>
+
+  <scalar_defintion>
+    <scalar id="scalar_A"/>
+  </scalar_defintion>
+
+   <axis_definition>
+     <axis id="axis_A"/>
+     <axis id="axis_A_zoom" axis_ref="axis_A">
+       <zoom_axis index="(0,1)[0 2]" />
+     </axis>
+   </axis_definition>
+
+   <domain_definition>
+     <domain id="domain_A" />
+
+   </domain_definition>
+
+   <grid_definition>
+     <grid id="grid_A">
+       <domain domain_ref="domain_A" />
+       <axis axis_ref="axis_A" />
+     </grid>
+     <grid id="grid_A_zoom">
+       <domain domain_ref="domain_A" />
+       <axis axis_ref="axis_A_zoom" />
+     </grid>
+     <grid id="grid_Scalar">
+      <scalar id="scalar_A"/>
+     </grid>
+   </grid_definition>
+  </context>
+
+  <context id="xios">
+      <variable_definition>
+         <variable_group id="server">
+            <variable id="using_server2" type="bool">true</variable>
+            <variable id="ratio_server2" type="int">50</variable>
+         </variable_group>
+
+        <variable_group id="buffer">
+            <variable id="optimal_buffer_size" type="string">performance</variable>
+            <variable id="buffer_size_factor" type="double">10.0</variable>
+         </variable_group>
+
+        <variable_group id="parameters" >
+          <variable id="using_server" type="bool">false</variable>
+          <variable id="info_level" type="int">50</variable>
+          <variable id="print_file" type="bool">true</variable>
+        </variable_group>
+      </variable_definition>
+  </context>
+
+</simulation>
+
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/inputs/test_diurnal_cycle/iodef.xml
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/inputs/test_diurnal_cycle/iodef.xml	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/inputs/test_diurnal_cycle/iodef.xml	(revision 1749)
@@ -0,0 +1,64 @@
+<?xml version="1.0"?>
+<simulation>
+
+ <context id="test">
+   <calendar type="Gregorian" start_date="2012-03-01 15:00:00" time_origin="2012-02-28 15:00:00 + 1d" />
+
+
+   <field_definition level="1" enabled=".TRUE." default_value="1e20">
+     <field id="field_A"  operation="instant" freq_op="3600s" grid_ref="grid_A"/>
+   </field_definition>
+
+
+   <file_definition type="one_file" par_access="collective" output_freq="4h" output_level="10" enabled=".FALSE.">
+      <file id="output" name="output" enabled=".TRUE.">
+        <field field_ref="field_A" name="field_B" default_value="1e20" grid_ref="grid_B" /> 
+        <field field_ref="field_A" name="field_A" default_value="1e20"  /> 
+     </file>
+   </file_definition>
+
+  <axis_definition>
+     <axis id="axis_A" />
+     <axis id="pressure" n_glo="10" value="(0,9)[9 8 7 6 5 4 3 2 1 0]" />
+  </axis_definition>    
+  
+   <grid_definition>
+     <grid id="grid_A">
+       <axis axis_ref="axis_A" />
+       <axis axis_ref="pressure" />
+       <scalar />
+     </grid>
+
+     <grid id="grid_B">
+       <axis axis_ref="axis_A" />
+       <axis axis_ref="pressure" />
+       <axis id="axis_B" n_glo="4" value="(0,3)[6 12 18 24]" >
+         <temporal_splitting />
+       </axis>
+     </grid>
+
+   </grid_definition>
+  </context>
+
+  <context id="xios">
+      <variable_definition>
+         <variable_group id="server">
+            <variable id="using_server2" type="bool">false</variable>
+            <variable id="ratio_server2" type="int">50</variable>
+         </variable_group>
+
+        <variable_group id="buffer">
+            <variable id="optimal_buffer_size" type="string">performance</variable>
+            <variable id="buffer_size_factor" type="double">10.0</variable>
+         </variable_group>
+
+        <variable_group id="parameters" >
+          <variable id="using_server" type="bool">false</variable>
+          <variable id="info_level" type="int">50</variable>
+          <variable id="print_file" type="bool">true</variable>
+        </variable_group>
+      </variable_definition>
+  </context>
+
+</simulation>
+
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/make_xios
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/make_xios	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/make_xios	(revision 1749)
@@ -0,0 +1,298 @@
+#!/bin/bash
+
+install_dir=$PWD
+compil_full="false"
+use_oasis="false"
+oasis="oasis3_mct"
+build_path="./"
+build_dir="./"
+build_suffixed="false"
+use_extern_boost="false"
+use_extern_blitz="false"
+use_memtrack="false"
+job="1"
+netcdf_lib="netcdf4_par"
+compil_mode="prod"
+arch_path=$PWD/"arch"
+arch_default_path=$PWD/"arch"
+arch_defined="FALSE"
+arch_path_defined="FALSE"
+
+# Traitement de la ligne de commande
+while (($# > 0))
+   do
+      case $1 in
+         "-h"|"--help"|"-help")
+            echo "make_xios - installs XIOS on your architecture"
+	    echo "make_xios [options]"
+	    echo "options :"
+	    echo "       [--prod] : compilation in production mode (default)"
+	    echo "       [--dev] : compilation in development mode"
+	    echo "       [--debug] : compilation in debug mode"
+	    echo "       --arch arch : to choose target architecture"
+	    echo "       [--avail] : to know available target architectures "
+	    echo "       [--full] : to generate dependencies and recompile from scratch"
+	    echo "       [--use_oasis 'oasis3' 'oasis3_mct' : default oasis3_mct] : to use Oasis coupler"
+        echo "       [--build_path : absolute path to the build directory"
+        echo "       [--build_dir : name of the build directory"
+        echo "       [--build_suffixed : generate automatically suffixed name of the build directory (e.g. config_X64_CURIE_prod)"
+        echo "       [--use_extern_boost : to use external boost library"
+        echo "       [--use_extern_blitz : to use external blitz library"
+	    echo "       [--doc] : to generate Doxygen documentation (not available yet)"
+	    echo "       [--job ntasks] : to use parallel compilation with ntasks"
+	    echo "       [--netcdf_lib 'netcdf4_par'/'netcdf4_seq'/'netcdf4_internal' : default netcdf4_par] : choice of netcdf library"
+	    echo "       [--memtrack] : tracking memory leak - developper only"
+	    echo "Example : ./make_xios --prod --arch PW6_VARGAS"
+	    echo "Example : ./make_xios --avail"
+            exit;;
+         "--prod")  compil_mode="prod"  ; shift ;;
+         "--dev")   compil_mode="dev"   ; shift ;;
+         "--debug") compil_mode="debug" ; shift ;;
+         "--arch")  arch=$2     ; arch_defined="TRUE"; shift ; shift ;;
+         "--arch_path")  arch_path=$2     ; arch_path_defined="TRUE"; shift ; shift ;;
+         "--avail") ls arch/*.fcm | cut -d"-" -f2 | cut -d"." -f1 ; exit ;; 
+         "--full")  compil_full="true"  ; shift ;;
+         "--use_oasis")  use_oasis="true" oasis=$2 ; shift ; shift  ;;
+         "--build_path")  build_path=$2     ; shift ; shift ;;
+         "--build_dir")  build_dir=$2     ; shift ; shift ;;
+         "--build_suffixed")  build_suffixed="true" ; shift  ;;
+         "--use_extern_boost")  use_extern_boost="true" ; shift  ;;
+         "--use_extern_blitz")  use_extern_blitz="true" ; shift  ;;
+         "--doc")   doc="true"          ; shift ;;
+         "--job")   job=$2              ; shift ; shift ;;
+         "--netcdf_lib")   netcdf_lib=$2 ; shift ; shift ;;
+         "--memtrack")  use_memtrack="true" memtrack=$2  ; shift ; shift ;;
+         *)         code="$1"           ; shift ;;
+      esac
+   done
+
+# Installation des sources
+nb_files_gz=`ls $install_dir/tools/archive | grep tar.gz | wc -l`
+if [ ${nb_files_gz} -ne 0 ]		   
+then
+    echo -e "- uncompress archives ..."		
+    for tarname in `ls $install_dir/tools/archive/*.tar.gz` ; do
+        if  ( [[ ${tarname} == "${install_dir}/tools/archive/boost.tar.gz" ]] && [[ "$use_extern_boost" == "true" ]] ) || ( [[ ${tarname} == "${install_dir}/tools/archive/blitz.tar.gz" ]] && [[ "$use_extern_blitz" == "true" ]] )
+        then
+                continue
+        fi
+	gunzip -f "$tarname"
+	tar -xf ${tarname%.gz}
+    done
+fi
+
+# Definition of the root directory of the build
+
+if [[ "$build_path" == "./" ]]; then
+  install_dir=$PWD
+else
+  install_dir=${build_path}
+fi
+
+if [[ "$build_suffixed" == "true" ]]; then
+    install_dir="${install_dir}/config_${arch}_${compil_mode}"
+else
+    install_dir="${install_dir}/${build_dir}"
+fi
+
+mkdir -p $install_dir
+
+rm -f ${PWD}/bld_dir.cfg
+echo "inc    ${install_dir}/arch.fcm" >> ${PWD}/bld_dir.cfg 
+echo "inc    ${install_dir}/config.fcm" >> ${PWD}/bld_dir.cfg
+echo "dir::root  ${install_dir}"   >> ${PWD}/bld_dir.cfg
+
+# VÃ©rification de la prÃ©sence d'un identifiant d'architecture.
+
+###############################################################
+# lecture des chemins propres a l'architecture de la machine #
+#           et configuration de l'environnement              #
+###############################################################
+
+rm -f .void_file
+echo > .void_file
+rm -rf .void_dir
+mkdir .void_dir
+
+if [[ "$arch_defined" == "TRUE" ]]
+then
+  rm -f ${install_dir}/arch.path
+  rm -f ${install_dir}/arch.fcm
+  rm -f ${install_dir}/arch.env
+
+  if test -f $arch_path/arch-${arch}.path
+  then
+    ln -s $arch_path/arch-${arch}.path ${install_dir}/arch.path
+  elif test -f $arch_default_path/arch-${arch}.path
+  then
+    ln -s $arch_default_path/arch-${arch}.path ${install_dir}/arch.path
+  fi
+        
+  if test -f $arch_path/arch-${arch}.fcm
+  then
+    ln -s $arch_path/arch-${arch}.fcm ${install_dir}/arch.fcm
+  elif test -f $arch_default_path/arch-${arch}.fcm
+  then
+    ln -s $arch_default_path/arch-${arch}.fcm ${install_dir}/arch.fcm
+  fi
+
+  if test -f $arch_path/arch-${arch}.env
+  then
+    ln -s $arch_path/arch-${arch}.env ${install_dir}/arch.env
+  elif test -f $arch_default_path/arch-${arch}.env
+  then
+    ln -s $arch_default_path/arch-${arch}.env ${install_dir}/arch.env
+  else
+    ln -s .void_file ${install_dir}/arch.env
+  fi
+  source ${install_dir}/arch.env
+  source ${install_dir}/arch.path
+else
+      echo "Please choose a target achitecture --> list all available architecture using make_xios --avail!"
+      exit 1
+fi
+
+# VÃ©rification de la prÃ©sence d'un mode de compilation.
+
+if [[ "$compil_mode" == "prod" ]]
+   then
+      COMPIL_CFLAGS="%PROD_CFLAGS"
+      COMPIL_FFLAGS="%PROD_FFLAGS"
+elif [[ "$compil_mode" == "dev" ]]
+   then 
+      COMPIL_CFLAGS="%DEV_CFLAGS"
+      COMPIL_FFLAGS="%DEV_FFLAGS"
+elif [[ "$compil_mode" == "debug" ]]
+   then
+      COMPIL_CFLAGS="%DEBUG_CFLAGS"
+      COMPIL_FFLAGS="%DEBUG_FFLAGS"
+fi
+
+rm -r $PWD/extern/netcdf4
+
+if [[ "$netcdf_lib" == "netcdf4_par" ]]
+   then
+     ln -s $PWD/.void_dir $PWD/extern/netcdf4
+     XIOS_CPPKEY="$XIOS_CPPKEY USING_NETCDF_PAR"
+elif [[ "$netcdf_lib" == "netcdf4_seq" ]]
+  then 
+    ln -s $PWD/.void_dir $PWD/extern/netcdf4
+elif [[ "$netcdf_lib" == "netcdf4_internal" ]]
+  then 
+    ln -s $PWD/extern/src_netcdf4 $PWD/extern/netcdf4
+    XIOS_CPPKEY="$XIOS_CPPKEY USING_NETCDF_PAR USING_NETCDF_INTERNAL"
+    export NETCDF_INCDIR="-I${PWD}/extern/netcdf4"
+    export NETCDF_LIBDIR=""
+    export NETCDF_LIB=""
+else
+   echo "Bad choice for --netcdf_lib argument : choose between 'netcdf4_par','netcdf4_seq' or 'netcdf4_internal'"
+   exit
+fi
+
+if [[ "$use_oasis" == "true" ]]
+   then
+    if [[ "$oasis" == "oasis3_mct" ]]
+    then
+	XIOS_CPPKEY="$XIOS_CPPKEY USE_OMCT"
+    elif [[ "$oasis" == "oasis3"  ]]
+    then
+	XIOS_CPPKEY="$XIOS_CPPKEY USE_OASIS"
+	OASIS_INCDIR="-I$PWD/../../prism/X64/build/lib/psmile.MPI1"
+	OASIS_LIBDIR="-L$PWD/../../prism/X64/lib"
+	OASIS_LIB="-lpsmile.MPI1 -lmpp_io"
+    else
+	echo "Bad choice for --use_oasis argument : choose between 'oasis3','oasis3_mct'"
+	exit
+    fi
+    NETCDF_LIB="-lnetcdff -lnetcdf"
+    XIOS_FINCDIR="$OASIS_INCDIR $XIOS_FINCDIR"
+    XIOS_LIB="$OASIS_LIBDIR $OASIS_LIB $XIOS_LIB"
+fi 
+
+# Setting path for boost
+if [[ "$use_extern_boost" == "true" ]]
+then
+   rm -r $PWD/extern/boost
+   ln -s $PWD/.void_dir $PWD/extern/boost
+else
+   export BOOST_INCDIR="-I${PWD}/extern/boost"
+   export BOOST_LIBDIR=""
+   export BOOST_LIB=""
+fi
+
+# Setting path for blitz
+if [[ "$use_extern_blitz" == "true" ]]
+then
+   rm -r $PWD/extern/blitz
+   ln -s $PWD/.void_dir $PWD/extern/blitz
+else
+   echo "src::blitz $PWD/extern/blitz/src" >> ${PWD}/bld_dir.cfg
+   export BLITZ_INCDIR="-I${PWD}/extern/blitz"
+   export BLITZ_LIBDIR=""
+   export BLITZ_LIB=""
+fi
+
+
+if [[ "$use_memtrack" == "true" ]]
+   then
+   XIOS_CPPKEY="$XIOS_CPPKEY XIOS_MEMTRACK"
+
+    if [[ "$memtrack" == "light" ]]
+    then
+	XIOS_CPPKEY="$XIOS_CPPKEY XIOS_MEMTRACK_LIGHT"
+    elif [[ "$memtrack" == "FULL"  ]]
+    then
+      XIOS_LIB="$ADDR2LINE_LIBDIR $ADDR2LINE_LIB $XIOS_LIB"
+      XIOS_CPPKEY="$XIOS_CPPKEY XIOS_MEMTRACK_FULL"
+    else
+	echo "Bad choice for --memtrack argument : choose between 'light','full'"
+	exit
+    fi
+fi 
+
+XIOS_CINCDIR="$NETCDF_INCDIR $HDF5_INCDIR $MPI_INCDIR $BOOST_INCDIR $BLITZ_INCDIR"
+XIOS_FINCDIR="$NETCDF_INCDIR $XIOS_FINCDIR $MPI_INCDIR $BOOST_INCDIR $BLITZ_INCDIR"
+
+XIOS_LIB="$XIOS_LIB $NETCDF_LIBDIR $HDF5_LIBDIR $MPI_LIBDIR $NETCDF_LIB $HDF5_LIB $MPI_LIB"
+
+rm -f ${install_dir}/config.fcm
+echo "%COMPIL_CFLAGS $COMPIL_CFLAGS" >> ${install_dir}/config.fcm
+echo "%COMPIL_FFLAGS $COMPIL_FFLAGS" >> ${install_dir}/config.fcm
+echo "%CPP_KEY       $XIOS_CPPKEY"   >> ${install_dir}/config.fcm
+
+echo "%CBASE_INC     $XIOS_CINCDIR" >> ${install_dir}/config.fcm     
+echo "%FBASE_INC     $XIOS_FINCDIR" >> ${install_dir}/config.fcm
+echo "%ARCH_LD       $XIOS_LIB"     >> ${install_dir}/config.fcm 
+
+echo "=> Using "$compil_mode" mode for compiling under architecture \""$arch"\" !"
+
+# CrÃ©ation de la documentation doxygen.
+if [[ !(-z $doc) ]]
+   then
+      echo -e "- Create Doxygen documentation (disabled)..."
+      #doxygen -s
+fi
+
+make_dir=$PWD
+
+export PATH=$PWD/tools/FCM/bin:$PATH
+
+if [[ "$compil_full" == "true" ]]
+   then
+   fcm build --clean --ignore-lock 
+   fcm build -f --ignore-lock -j $job
+else
+  fcm build --ignore-lock -j $job
+fi
+
+build_exit_status=$?
+
+if [[ $build_exit_status == 0 ]]
+  then
+  set nothing
+#    cd $WORKDIR/XIOS_NEMO_COUPLE/modeles/NEMO/WORK
+#    cd $WORKDIR/XIOS_NEMO/modeles/NEMO/WORK
+#    make
+fi
+
+exit $build_exit_status
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/array.hpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/array.hpp	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/array.hpp	(revision 1749)
@@ -0,0 +1,92 @@
+#ifndef __XIOS_CArray__
+#define __XIOS_CArray__
+
+/// boost headers ///
+#include <boost/cstdint.hpp>
+#include <boost/multi_array.hpp>
+
+/// XIOS headers ///
+#include "xios_spl.hpp"
+#include "buffer_in.hpp"
+#include "buffer_out.hpp"
+
+
+namespace xios
+{
+   template<size_t numDims>
+   inline detail::multi_array::extent_gen<numDims> getExtentNull(void) { return getExtentNull<numDims-1>()[0];}
+   
+   template<>
+   inline detail::multi_array::extent_gen<1> getExtentNull<1>(void) { return extents[0]; }
+
+   /// ////////////////////// DÃ©clarations ////////////////////// ///
+   
+   template <typename ValueType, StdSize  NumDims, typename Allocator = std::allocator<ValueType> >
+   class CArray : public boost::multi_array<ValueType, NumDims, Allocator>
+   {
+         /// DÃ©finition de type ///
+         typedef boost::multi_array<ValueType, NumDims, Allocator> SuperClass;
+
+      public:
+
+         typedef ValueType ValType;
+
+         /// Constructeurs ///
+//         template <typename ExtentList>
+//            explicit CArray(const ExtentList & sizes);
+      template <typename ExtentList> CArray(const ExtentList & sizes)
+            : boost::multi_array<ValueType, NumDims, Allocator>
+                  (sizes, boost::fortran_storage_order())
+   { /* Ne rien faire de plus */ }
+
+
+         explicit CArray();
+
+//         template <typename ExtentList>
+//            CArray(const ExtentList & sizes, const boost::general_storage_order<NumDims> & store);
+      template <typename ExtentList>  CArray(const ExtentList & sizes, const boost::general_storage_order<NumDims> & store)
+               : boost::multi_array<ValueType, NumDims, Allocator> (sizes, store)
+   { /* Ne rien faire de plus */ }
+
+         CArray(const CArray & array);       // NEVER IMPLEMENTED.
+         CArray(const CArray * const array); // NEVER IMPLEMENTED.
+
+      public:
+
+         /// Flux ///
+         template <typename U, StdSize V, typename W>
+            friend StdOStream & operator << 
+                  (StdOStream & os, const CArray<U, V, W> & array);
+
+         template <typename U, StdSize V, typename W>
+            friend StdIStream & operator >> 
+                  (StdIStream & is, CArray<U, V, W> & array);
+
+      public:
+
+         void toBinary  (StdOStream & os) const;
+         void fromBinary(StdIStream & is);
+
+         size_t getSize(void) const ;
+         bool toBuffer  (CBufferOut& buffer) const;
+         bool fromBuffer(CBufferIn& buffer);
+
+
+         /// Destructeur ///
+         virtual ~CArray(void);
+
+   }; // class CArray
+
+   ///---------------------------------------------------------------
+
+} // namespace xios
+
+//#include "array_impl.hpp"
+#include "array_mac.hpp"
+namespace xios
+{
+   template <typename ValueType> void FromBinary(StdIStream & is, ARRAY(ValueType, 1) & array) ;
+   template <typename ValueType> void FromBinary(StdIStream & is, ARRAY(ValueType, 2) & array) ;
+   template <typename ValueType> void FromBinary(StdIStream & is, ARRAY(ValueType, 3) & array) ;
+}
+#endif // __XIOS_CArray__
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/array_mac.hpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/array_mac.hpp	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/array_mac.hpp	(revision 1749)
@@ -0,0 +1,26 @@
+#ifndef __XIOS_CArray_mac__
+#define __XIOS_CArray_mac__
+
+/// ////////////////////// Macros ////////////////////// ///
+
+// Type Fortran
+#define ARRAY(valuetype, numdims) std::shared_ptr<CArray<valuetype, numdims> >
+
+#define ARRAY_ASSIGN(value, valuetype, numdims, extent)\
+   value.reset(new CArray<valuetype, numdims>(boost::extents extent)) 
+
+#define ARRAY_CREATE(value, valuetype, numdims, extent)\
+   ARRAY(valuetype, numdims) value =                   \
+   ARRAY(valuetype, numdims)(new CArray<valuetype, numdims>(boost::extents extent))
+
+// Type C
+#define ARRAY_C_ASSIGN(value, valuetype, numdims, extent)\
+   value = ARRAY(valuetype, numdims)                     \
+   (new CArray<valuetype, numdims>(boost::extents extent, c_storage_order()))
+
+#define ARRAY_C_CREATE(value, valuetype, numdims, extent)\
+   ARRAY_C_ASSIGN(ARRAY(valuetype, numdims) value, valuetype, numdims, extent)
+
+///---------------------------------------------------------------
+
+#endif // __XIOS_CArray_mac__
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/array_new.hpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/array_new.hpp	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/array_new.hpp	(revision 1749)
@@ -0,0 +1,684 @@
+#ifndef __XIOS_ARRAY_HPP__
+#define __XIOS_ARRAY_HPP__
+
+#define BZ_COLUMN_MAJOR_ARRAY
+#include <blitz/array.h>
+#include "buffer_in.hpp"
+#include "buffer_out.hpp"
+#include "message.hpp"
+#include <cmath>
+
+using namespace blitz;
+BZ_DECLARE_FUNCTION(round)
+
+namespace xios
+{
+  template <typename T_numtype,int N_rank>
+  class CArray : public Array<T_numtype,N_rank>, public virtual CBaseType
+  {
+    private:
+      bool initialized;
+
+    public:
+      typedef typename Array<T_numtype,N_rank>::T_default_storage T_default_storage;
+      using Array<T_numtype,N_rank>::operator =;
+
+      template<typename T_expr> explicit CArray(_bz_ArrayExpr<T_expr> expr)
+        : Array<T_numtype,N_rank>(expr)
+        , initialized(true)
+      {}
+
+      CArray(GeneralArrayStorage<N_rank> storage = T_default_storage())
+        : Array<T_numtype,N_rank>(storage)
+        , initialized(false)
+      {}
+
+      explicit CArray(int length0, GeneralArrayStorage<N_rank> storage = T_default_storage())
+        : Array<T_numtype,N_rank>(length0, storage)
+        , initialized(true)
+      {}
+
+      CArray(int length0, int length1, GeneralArrayStorage<N_rank> storage = T_default_storage())
+        : Array<T_numtype,N_rank>(length0, length1, storage)
+        , initialized(true)
+      {}
+
+      CArray(int length0, int length1, int length2, GeneralArrayStorage<N_rank> storage = T_default_storage())
+        : Array<T_numtype,N_rank>(length0, length1, length2, storage)
+        , initialized(true)
+      {}
+
+      CArray(int length0, int length1, int length2, int length3, GeneralArrayStorage<N_rank> storage = T_default_storage())
+        : Array<T_numtype,N_rank>(length0, length1, length2, length3, storage)
+        , initialized(true)
+      {}
+
+      CArray(int length0, int length1, int length2, int length3, int length4, GeneralArrayStorage<N_rank> storage = T_default_storage())
+        : Array<T_numtype,N_rank>(length0,length1, length2, length3, length4, storage)
+        , initialized(true)
+      {}
+
+      CArray(int length0, int length1, int length2, int length3, int length4, int length5, GeneralArrayStorage<N_rank> storage = T_default_storage())
+        : Array<T_numtype,N_rank>(length0, length1, length2, length3, length4, length5, storage)
+        , initialized(true)
+      {}
+
+      CArray(int length0, int length1, int length2, int length3, int length4, int length5, int length6, GeneralArrayStorage<N_rank> storage = T_default_storage())
+        : Array<T_numtype,N_rank>(length0, length1, length2, length3, length4, length5, length6, storage)
+        , initialized(true)
+      {}
+
+      CArray(int length0, int length1, int length2, int length3, int length4, int length5, int length6, int length7,
+             GeneralArrayStorage<N_rank> storage = T_default_storage())
+        : Array<T_numtype,N_rank>(length0, length1, length2, length3, length4, length5, length6, length7, storage)
+        , initialized(true)
+      {}
+
+      CArray(int length0, int length1, int length2, int length3, int length4, int length5, int length6,
+             int length7, int length8, GeneralArrayStorage<N_rank> storage = T_default_storage())
+       : Array<T_numtype,N_rank>(length0, length1, length2, length3, length4, length5, length6, length7, length8, storage)
+       , initialized(true)
+      {}
+
+      CArray(int length0, int length1, int length2, int length3, int length4,
+             int length5, int length6, int length7, int length8, int length9, GeneralArrayStorage<N_rank> storage = T_default_storage())
+        : Array<T_numtype,N_rank>(length0, length1, length2, length3, length4, length5, length6, length7, length8, length9, storage)
+        , initialized(true)
+      {}
+
+      CArray(int length0, int length1, int length2, int length3, int length4, int length5, int length6,
+             int length7, int length8, int length9, int length10, GeneralArrayStorage<N_rank> storage = T_default_storage())
+       : Array<T_numtype,N_rank>(length0, length1, length2, length3, length4, length5, length6, length7, length8, length9, length10, storage)
+       , initialized(true)
+      {}
+
+      CArray(T_numtype* restrict dataFirst, TinyVector<int, N_rank> shape, GeneralArrayStorage<N_rank> storage = T_default_storage())
+        : Array<T_numtype,N_rank>(dataFirst, shape, storage)
+        , initialized(true)
+      {}
+
+      CArray(T_numtype* restrict dataFirst, TinyVector<int, N_rank> shape, TinyVector<diffType, N_rank> stride,
+             GeneralArrayStorage<N_rank> storage = T_default_storage())
+        : Array<T_numtype,N_rank>(dataFirst, shape, stride, storage)
+        , initialized(true)
+      {}
+
+      CArray(T_numtype* restrict dataFirst, TinyVector<int, N_rank> shape, preexistingMemoryPolicy deletionPolicy,
+            GeneralArrayStorage<N_rank> storage = T_default_storage())
+        : Array<T_numtype,N_rank>(dataFirst, shape, deletionPolicy, storage)
+        , initialized(true)
+      {}
+
+      CArray(T_numtype* restrict dataFirst, TinyVector<int, N_rank> shape, TinyVector<diffType, N_rank> stride,
+             preexistingMemoryPolicy deletionPolicy, GeneralArrayStorage<N_rank> storage = T_default_storage())
+        : Array<T_numtype,N_rank>(dataFirst, shape, stride, deletionPolicy, storage)
+        , initialized(true)
+      {}
+
+      CArray(const TinyVector<int, N_rank>& extent, GeneralArrayStorage<N_rank> storage = T_default_storage())
+        : Array<T_numtype,N_rank>(extent, storage)
+        , initialized(true)
+      {}
+
+      CArray(const TinyVector<int, N_rank>& lbounds, const TinyVector<int, N_rank>& extent,
+             const GeneralArrayStorage<N_rank>& storage)
+        : Array<T_numtype,N_rank>(lbounds, extent, storage)
+        , initialized(true)
+      {}
+
+      CArray(Range r0, GeneralArrayStorage<N_rank> storage = T_default_storage())
+        : Array<T_numtype,N_rank>(r0, storage)
+        , initialized(true)
+      {}
+
+      CArray(Range r0, Range r1, GeneralArrayStorage<N_rank> storage = T_default_storage())
+        : Array<T_numtype,N_rank>(r0, r1, storage)
+        , initialized(true)
+      {}
+
+      CArray(Range r0, Range r1, Range r2, GeneralArrayStorage<N_rank> storage = T_default_storage())
+        : Array<T_numtype,N_rank>(r0, r1, r2, storage)
+        , initialized(true)
+      {}
+
+      CArray(Range r0, Range r1, Range r2, Range r3, GeneralArrayStorage<N_rank> storage = T_default_storage())
+        : Array<T_numtype,N_rank>(r0, r1, r2, r3, storage)
+        , initialized(true)
+      {}
+
+      CArray(Range r0, Range r1, Range r2, Range r3, Range r4, GeneralArrayStorage<N_rank> storage = T_default_storage())
+        : Array<T_numtype,N_rank>(r0, r1, r2, r3, r4, storage)
+        , initialized(true)
+      {}
+
+      CArray(Range r0, Range r1, Range r2, Range r3, Range r4, Range r5, GeneralArrayStorage<N_rank> storage = T_default_storage())
+        : Array<T_numtype,N_rank>(r0, r1, r2, r3, r4, r5, storage)
+        , initialized(true)
+      {}
+
+      CArray(Range r0, Range r1, Range r2, Range r3, Range r4, Range r5, Range r6,
+             GeneralArrayStorage<N_rank> storage = T_default_storage())
+        : Array<T_numtype,N_rank>(r0, r1, r2, r3, r4, r5, r6, storage)
+        , initialized(true)
+      {}
+
+      CArray(Range r0, Range r1, Range r2, Range r3, Range r4, Range r5, Range r6, Range r7,
+             GeneralArrayStorage<N_rank> storage = T_default_storage())
+        : Array<T_numtype,N_rank>(r0, r1, r2, r3, r4, r5, r6, r7, storage)
+        , initialized(true)
+      {}
+
+      CArray(Range r0, Range r1, Range r2, Range r3, Range r4, Range r5,
+             Range r6, Range r7, Range r8, GeneralArrayStorage<N_rank> storage = T_default_storage())
+        : Array<T_numtype,N_rank>(r0, r1, r2, r3, r4, r5, r6, r7, r8, storage)
+        , initialized(true)
+      {}
+
+      CArray(Range r0, Range r1, Range r2, Range r3, Range r4, Range r5,
+             Range r6, Range r7, Range r8, Range r9, GeneralArrayStorage<N_rank> storage = T_default_storage())
+        : Array<T_numtype,N_rank>(r0, r1, r2, r3, r4, r5, r6, r7, r8, r9, storage)
+        , initialized(true)
+      {}
+
+      CArray(Range r0, Range r1, Range r2, Range r3, Range r4, Range r5, Range r6, Range r7,
+             Range r8, Range r9, Range r10, GeneralArrayStorage<N_rank> storage = T_default_storage())
+        : Array<T_numtype,N_rank>(r0, r1, r2, r3, r4, r5, r6, r7, r8, r9, r10, storage)
+        , initialized(true)
+      {}
+
+      CArray(const CArray<T_numtype, N_rank>& array)
+        : Array<T_numtype,N_rank>(array)
+        , initialized(array.initialized)
+      {}
+
+      CArray(const Array<T_numtype, N_rank>& array)
+        : Array<T_numtype,N_rank>(array)
+        , initialized(true)
+      {}
+
+      CArray(const TinyVector<int,N_rank-1>& shape, int lastExtent, const GeneralArrayStorage<N_rank>& storage)
+        : Array<T_numtype,N_rank>(shape, lastExtent, storage)
+        , initialized(true)
+      {}
+
+      CArray(Array<T_numtype, N_rank>& array, Range r0)
+        : Array<T_numtype,N_rank>(array, r0)
+        , initialized(true)
+      {}
+
+      CArray(Array<T_numtype, N_rank>& array, Range r0, Range r1)
+        : Array<T_numtype,N_rank>(array, r0, r1)
+        , initialized(true)
+      {}
+
+      CArray(Array<T_numtype, N_rank>& array, Range r0, Range r1, Range r2)
+        : Array<T_numtype,N_rank>( array, r0, r1, r2)
+        , initialized(true)
+      {}
+
+      CArray(Array<T_numtype, N_rank>& array, Range r0, Range r1, Range r2, Range r3)
+        : Array<T_numtype,N_rank>(array, r0, r1, r2, r3)
+        , initialized(true)
+      {}
+
+      CArray(Array<T_numtype, N_rank>& array, Range r0, Range r1, Range r2,
+             Range r3, Range r4)
+        : Array<T_numtype,N_rank>(array, r0, r1, r2, r3,  r4)
+        , initialized(true)
+      {}
+
+      CArray(Array<T_numtype, N_rank>& array, Range r0, Range r1, Range r2,
+             Range r3, Range r4, Range r5)
+        : Array<T_numtype,N_rank>( array, r0, r1, r2, r3, r4, r5)
+        , initialized(true)
+      {}
+
+      CArray(Array<T_numtype, N_rank>& array, Range r0, Range r1, Range r2, Range r3,
+             Range r4, Range r5, Range r6)
+        : Array<T_numtype,N_rank>( array, r0, r1, r2, r3, r4, r5, r6)
+        , initialized(true)
+      {}
+
+      CArray(Array<T_numtype, N_rank>& array, Range r0, Range r1, Range r2, Range r3, Range r4,
+             Range r5, Range r6, Range r7)
+        : Array<T_numtype,N_rank>(array, r0, r1, r2, r3, r4, r5, r6, r7)
+        , initialized(true)
+      {}
+
+      CArray(Array<T_numtype, N_rank>& array, Range r0, Range r1, Range r2, Range r3, Range r4, Range r5,
+             Range r6, Range r7, Range r8)
+        : Array<T_numtype,N_rank>(array, r0, r1, r2, r3, r4, r5, r6, r7, r8)
+        , initialized(true)
+      {}
+
+      CArray(Array<T_numtype, N_rank>& array, Range r0, Range r1, Range r2, Range r3, Range r4, Range r5,
+             Range r6, Range r7, Range r8, Range r9)
+        : Array<T_numtype,N_rank>(array, r0, r1, r2, r3, r4, r5, r6, r7, r8, r9)
+        , initialized(true)
+      {}
+
+      CArray(Array<T_numtype, N_rank>& array, Range r0, Range r1, Range r2, Range r3, Range r4, Range r5, Range r6,
+             Range r7, Range r8, Range r9, Range r10)
+        : Array<T_numtype,N_rank>(array, r0, r1, r2, r3, r4, r5, r6, r7, r8, r9, r10)
+        , initialized(true)
+      {}
+
+      CArray(Array<T_numtype, N_rank>& array, const RectDomain<N_rank>& subdomain)
+        : Array<T_numtype,N_rank>(array, subdomain)
+        , initialized(true)
+      {}
+
+      CArray(Array<T_numtype, N_rank>& array, const StridedDomain<N_rank>& subdomain)
+        : Array<T_numtype,N_rank>(array, subdomain)
+        , initialized(true)
+      {}
+
+      template<int N_rank2, typename R0, typename R1, typename R2, typename R3, typename R4, typename R5,
+                            typename R6, typename R7, typename R8, typename R9, typename R10>
+      CArray(Array<T_numtype,N_rank2>& array, R0 r0, R1 r1, R2 r2, R3 r3, R4 r4, R5 r5, R6 r6, R7 r7, R8 r8, R9 r9, R10 r10)
+        : Array<T_numtype,N_rank>(array, r0,r1, r2, r3, r4, r5, r6, r7, r8, r9, r10)
+        , initialized(true)
+      {}
+
+      virtual ~CArray() {}
+
+      CArray<T_numtype, N_rank> copy() const
+      {
+        CArray<T_numtype, N_rank> copy = Array<T_numtype, N_rank>::copy();
+        copy.initialized = initialized;
+        return copy;
+      }
+
+      void reference(const CArray<T_numtype, N_rank>& array)
+      {
+        Array<T_numtype,N_rank>::reference(array);
+        initialized = array.initialized;
+      }
+
+      void reference(const Array<T_numtype,N_rank>& array)
+      {
+        Array<T_numtype,N_rank>::reference(array);
+        initialized = true;
+      }
+
+      bool operator== (const CArray<T_numtype,N_rank>& array)
+      {
+        size_t nbThis = this->numElements();
+        size_t nbArr  = array.numElements();
+        if (nbThis != nbArr) return false;
+        if (nbThis==0 && nbArr==0) return true;
+        typename Array<T_numtype,N_rank>::const_iterator itx=array.begin(), itxe=array.end(), ity=this->begin() ;
+        for(;itx!=itxe;++itx,++ity) if (*itx!=*ity) return false ;
+        return true;
+      }
+
+      bool operator== (const Array<T_numtype,N_rank>& array)
+      {
+        return ((*this) == (dynamic_cast<const CArray<T_numtype,N_rank>& >(array)));
+      }
+
+      void resize(int extent)
+      {
+        Array<T_numtype,N_rank>::resize(extent);
+        initialized = true;
+      }
+      void resize(int extent1, int extent2)
+      {
+        Array<T_numtype,N_rank>::resize(extent1, extent2);
+        initialized = true;
+      }
+      void resize(int extent1, int extent2, int extent3)
+      {
+        Array<T_numtype,N_rank>::resize(extent1, extent2, extent3);
+        initialized = true;
+      }
+      void resize(int extent1, int extent2, int extent3, int extent4)
+      {
+        Array<T_numtype,N_rank>::resize(extent1, extent2, extent3, extent4);
+        initialized = true;
+      }
+      void resize(int extent1, int extent2, int extent3, int extent4, int extent5)
+      {
+        Array<T_numtype,N_rank>::resize(extent1, extent2, extent3, extent4, extent5);
+        initialized = true;
+      }
+      void resize(int extent1, int extent2, int extent3, int extent4, int extent5, int extent6)
+      {
+        Array<T_numtype,N_rank>::resize(extent1, extent2, extent3, extent4, extent5, extent6);
+        initialized = true;
+      }
+      void resize(int extent1, int extent2, int extent3, int extent4, int extent5,
+                  int extent6, int extent7)
+      {
+        Array<T_numtype,N_rank>::resize(extent1, extent2, extent3, extent4, extent5,
+                                        extent6, extent7);
+        initialized = true;
+      }
+      void resize(int extent1, int extent2, int extent3, int extent4, int extent5,
+                  int extent6, int extent7, int extent8)
+      {
+        Array<T_numtype,N_rank>::resize(extent1, extent2, extent3, extent4, extent5,
+                                        extent6, extent7, extent8);
+        initialized = true;
+      }
+      void resize(int extent1, int extent2, int extent3, int extent4, int extent5,
+                  int extent6, int extent7, int extent8, int extent9)
+      {
+        Array<T_numtype,N_rank>::resize(extent1, extent2, extent3, extent4, extent5,
+                                        extent6, extent7, extent8, extent9);
+        initialized = true;
+      }
+      void resize(int extent1, int extent2, int extent3, int extent4, int extent5,
+                  int extent6, int extent7, int extent8, int extent9, int extent10)
+      {
+        Array<T_numtype,N_rank>::resize(extent1, extent2, extent3, extent4, extent5,
+                                        extent6, extent7, extent8, extent9, extent10);
+        initialized = true;
+      }
+      void resize(int extent1, int extent2, int extent3, int extent4, int extent5, int extent6,
+                  int extent7, int extent8, int extent9, int extent10, int extent11)
+      {
+        Array<T_numtype,N_rank>::resize(extent1, extent2, extent3, extent4, extent5, extent6,
+                                        extent7, extent8, extent9, extent10, extent11);
+        initialized = true;
+      }
+
+      void resize(Range r1)
+      {
+        Array<T_numtype,N_rank>::resize(r1);
+        initialized = true;
+      }
+      void resize(Range r1, Range r2)
+      {
+        Array<T_numtype,N_rank>::resize(r1, r2);
+        initialized = true;
+      }
+      void resize(Range r1, Range r2, Range r3)
+      {
+        Array<T_numtype,N_rank>::resize(r1, r2, r3);
+        initialized = true;
+      }
+      void resize(Range r1, Range r2, Range r3, Range r4)
+      {
+        Array<T_numtype,N_rank>::resize(r1, r2, r3, r4);
+        initialized = true;
+      }
+      void resize(Range r1, Range r2, Range r3, Range r4, Range r5)
+      {
+        Array<T_numtype,N_rank>::resize(r1, r2, r3, r4, r5);
+        initialized = true;
+      }
+      void resize(Range r1, Range r2, Range r3, Range r4, Range r5, Range r6)
+      {
+        Array<T_numtype,N_rank>::resize(r1, r2, r3, r4, r5, r6);
+        initialized = true;
+      }
+      void resize(Range r1, Range r2, Range r3, Range r4, Range r5,
+                  Range r6, Range r7)
+      {
+        Array<T_numtype,N_rank>::resize(r1, r2, r3, r4, r5,
+                                        r6, r7);
+        initialized = true;
+      }
+      void resize(Range r1, Range r2, Range r3, Range r4, Range r5,
+                  Range r6, Range r7, Range r8)
+      {
+        Array<T_numtype,N_rank>::resize(r1, r2, r3, r4, r5,
+                                        r6, r7, r8);
+        initialized = true;
+      }
+      void resize(Range r1, Range r2, Range r3, Range r4, Range r5,
+                  Range r6, Range r7, Range r8, Range r9)
+      {
+        Array<T_numtype,N_rank>::resize(r1, r2, r3, r4, r5,
+                                        r6, r7, r8, r9);
+        initialized = true;
+      }
+      void resize(Range r1, Range r2, Range r3, Range r4, Range r5,
+                  Range r6, Range r7, Range r8, Range r9, Range r10)
+      {
+        Array<T_numtype,N_rank>::resize(r1, r2, r3, r4, r5,
+                                        r6, r7, r8, r9, r10);
+        initialized = true;
+      }
+      void resize(Range r1, Range r2, Range r3, Range r4, Range r5, Range r6,
+                  Range r7, Range r8, Range r9, Range r10, Range r11)
+      {
+        Array<T_numtype,N_rank>::resize(r1, r2, r3, r4, r5, r6,
+                                        r7, r8, r9, r10, r11);
+        initialized = true;
+      }
+
+      void resize(const TinyVector<int,N_rank>& extent)
+      {
+        Array<T_numtype,N_rank>::resize(extent);
+        initialized = true;
+      }
+
+      void resizeAndPreserve(const TinyVector<int,N_rank>& extent)
+      {
+        Array<T_numtype,N_rank>::resizeAndPreserve(extent);
+        initialized = true;
+      }
+
+      void resizeAndPreserve(int extent)
+      {
+        Array<T_numtype,N_rank>::resizeAndPreserve(extent);
+        initialized = true;
+      }
+      void resizeAndPreserve(int extent1, int extent2)
+      {
+        Array<T_numtype,N_rank>::resizeAndPreserve(extent1, extent2);
+        initialized = true;
+      }
+      void resizeAndPreserve(int extent1, int extent2, int extent3)
+      {
+        Array<T_numtype,N_rank>::resizeAndPreserve(extent1, extent2, extent3);
+        initialized = true;
+      }
+      void resizeAndPreserve(int extent1, int extent2, int extent3, int extent4)
+      {
+        Array<T_numtype,N_rank>::resizeAndPreserve(extent1, extent2, extent3, extent4);
+        initialized = true;
+      }
+      void resizeAndPreserve(int extent1, int extent2, int extent3, int extent4, int extent5)
+      {
+        Array<T_numtype,N_rank>::resizeAndPreserve(extent1, extent2, extent3, extent4, extent5);
+        initialized = true;
+      }
+      void resizeAndPreserve(int extent1, int extent2, int extent3, int extent4,
+                             int extent5, int extent6)
+      {
+        Array<T_numtype,N_rank>::resizeAndPreserve(extent1, extent2, extent3, extent4,
+                                                   extent5, extent6);
+        initialized = true;
+      }
+      void resizeAndPreserve(int extent1, int extent2, int extent3, int extent4,
+                             int extent5, int extent6, int extent7)
+      {
+        Array<T_numtype,N_rank>::resizeAndPreserve(extent1, extent2, extent3, extent4,
+                                                   extent5, extent6, extent7);
+        initialized = true;
+      }
+      void resizeAndPreserve(int extent1, int extent2, int extent3, int extent4,
+                             int extent5, int extent6, int extent7, int extent8)
+      {
+        Array<T_numtype,N_rank>::resizeAndPreserve(extent1, extent2, extent3, extent4,
+                                                   extent5, extent6, extent7, extent8);
+        initialized = true;
+      }
+      void resizeAndPreserve(int extent1, int extent2, int extent3, int extent4, int extent5,
+                             int extent6, int extent7, int extent8, int extent9)
+      {
+        Array<T_numtype,N_rank>::resizeAndPreserve(extent1, extent2, extent3, extent4, extent5,
+                                                   extent6, extent7, extent8, extent9);
+        initialized = true;
+      }
+      void resizeAndPreserve(int extent1, int extent2, int extent3, int extent4, int extent5,
+                             int extent6, int extent7, int extent8, int extent9, int extent10)
+      {
+        Array<T_numtype,N_rank>::resizeAndPreserve(extent1, extent2, extent3, extent4, extent5,
+                                                   extent6, extent7, extent8, extent9, extent10);
+        initialized = true;
+      }
+      void resizeAndPreserve(int extent1, int extent2, int extent3, int extent4, int extent5, int extent6,
+                             int extent7, int extent8, int extent9, int extent10, int extent11)
+      {
+        Array<T_numtype,N_rank>::resizeAndPreserve(extent1, extent2, extent3, extent4, extent5, extent6,
+                                                   extent7, extent8, extent9, extent10, extent11);
+        initialized = true;
+      }
+
+      virtual void fromString(const string& str) { istringstream iss(str); iss >> *this; initialized = true; }
+      virtual string toString(void) const { ostringstream oss; oss << *this; return oss.str(); }
+
+      virtual string dump(void) const
+      {
+        ostringstream oss;
+        oss << this->shape()<<" ";
+        if (this->shape().numElements() == 1 && this->shape().dataFirst()[0] == 1)
+          oss << this->dataFirst()[0];
+        else
+          oss << this->dataFirst()[0] <<" ... "<< this->dataFirst()[this->numElements()-1];
+        return oss.str();
+      }
+
+      virtual void reset(void) { this->free(); initialized = false; }
+      virtual bool isEmpty(void) const { return !initialized; }
+      virtual size_t size(void) const { return size(this->numElements()); }
+      static size_t size(sizeType numElements) { return (N_rank + 1) * sizeof(int) + sizeof(size_t) + numElements * sizeof(T_numtype); }
+
+      virtual CBaseType* clone(void) const { return new CArray(*this); }
+
+      virtual bool toBuffer(CBufferOut& buffer) const
+      {
+        bool ret;
+        ret =  buffer.put(this->dimensions());
+        ret &= buffer.put(this->shape().data(), this->dimensions());
+        ret &= buffer.put(this->numElements());
+        ret &= buffer.put(this->dataFirst(), this->numElements());
+        return ret;
+      }
+
+      virtual bool fromBuffer(CBufferIn& buffer)
+      {
+        bool ret;
+        int numDim;
+        TinyVector<int,N_rank> vect;
+        size_t ne;
+
+        ret =  buffer.get(numDim);
+        ret &= buffer.get(vect.data(), N_rank);
+        this->resize(vect);
+        ret &= buffer.get(ne);
+        ret &= buffer.get(this->dataFirst(), ne);
+
+        initialized = true;
+
+        return ret;
+      }
+  };
+
+
+#define macro(NRANK)\
+\
+  template <>\
+  inline size_t CArray<StdString,NRANK>::size(void) const\
+  {\
+    size_t size=(1 + NRANK) * sizeof(int) ;\
+    Array<StdString,NRANK>::const_iterator it, itb=this->begin(), ite=this->end() ;\
+\
+    for(it=itb;it!=ite;++it)\
+    {\
+      size+= sizeof(size_t) ;\
+      size+= (*it).size();\
+    } \
+    return size ;\
+  }\
+\
+/* for array string this function is an evaluation of maximum size of the array, considering stringArrayLen is the maximum size of the strings*/ \
+  template <>\
+  inline size_t CArray<StdString,NRANK>::size(sizeType numElements)\
+  {\
+    return (NRANK + 1) * sizeof(int) + numElements * stringArrayLen;\
+  }\
+  \
+  template <>\
+  inline bool CArray<StdString,NRANK>::toBuffer(CBufferOut& buffer) const\
+  {\
+    bool ret;\
+    ret =  buffer.put(this->dimensions());\
+    ret &= buffer.put(this->shape().data(), this->dimensions());\
+\
+    Array<StdString,NRANK>::const_iterator it, itb=this->begin(), ite=this->end() ;\
+\
+    for(it=itb;it!=ite;++it)\
+    {\
+      ret &= buffer.put((*it).size()) ;\
+      ret &= buffer.put((*it).data(),(*it).size());\
+    } \
+    return ret;\
+  }\
+\
+  template <>\
+  inline bool CArray<StdString,NRANK>::fromBuffer(CBufferIn& buffer)\
+  {\
+     bool ret;\
+     int numDim;\
+     TinyVector<int,NRANK> vect;\
+     size_t ne;\
+\
+     ret =  buffer.get(numDim);\
+     ret &= buffer.get(vect.data(), NRANK);\
+     this->resize(vect);\
+\
+     Array<StdString,NRANK>::iterator it, itb=this->begin(), ite=this->end() ;\
+     for(it=itb;it!=ite;++it)\
+     {\
+       ret &= buffer.get(ne) ;\
+       char* str = new char[ne] ;\
+       ret &= buffer.get(str, ne);\
+       *it = string(str,ne) ;\
+       delete [] str ;\
+     }\
+     initialized = true;\
+     return ret;\
+  }
+macro(1)
+macro(2)
+macro(3)
+macro(4)
+macro(5)
+macro(6)
+macro(7)
+
+#undef macro
+
+  template <typename T_numtype,int N_rank> inline CBufferOut& operator<<(CBufferOut& buffer, const CArray<T_numtype,N_rank>& array)
+  {
+    if (!array.toBuffer(buffer)) ERROR("template <typename T_numtype,int N_rank> inline CBufferOut& operator<<(CBufferOut& buffer, const CArray& array)",
+                                       << "Not enough free space in buffer to queue the array.");
+    return buffer;
+  }
+
+  template <typename T_numtype,int N_rank> inline CBufferIn& operator>>(CBufferIn& buffer, CArray<T_numtype, N_rank>& array)
+  {
+    if (!array.fromBuffer(buffer)) ERROR("template <typename T_numtype,int N_rank> inline CBufferIn& operator>>(CBufferIn& buffer, CArray& array)",
+                                         << "Not enough data in buffer to unqueue the array.");
+    return buffer;
+  }
+
+  template <typename T_numtype,int N_rank> inline CMessage& operator<<(CMessage& msg, const CArray<T_numtype, N_rank>& array)
+  {
+    msg.push(array);
+    return msg;
+  }
+
+  template <typename T_numtype,int N_rank> inline CMessage& operator<<(CMessage& msg, CArray<T_numtype, N_rank>& array)
+  {
+    msg.push(array);
+    return msg;
+  }
+}
+
+#endif
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/attribute.cpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/attribute.cpp	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/attribute.cpp	(revision 1749)
@@ -0,0 +1,85 @@
+#include "attribute.hpp"
+#include "base_type.hpp"
+#include "generate_interface.hpp"
+
+
+namespace xios
+{
+
+      const StdString CAttribute::resetInheritanceStr("_reset_") ;
+
+      /// ////////////////////// DÃ©finitions ////////////////////// ///
+      CAttribute::CAttribute(const StdString & id)
+         : CObject(id), CBaseType(), _canInherite(true)
+//         , value()
+      { /* Ne rien faire de plus */ }
+/*
+*/      
+      CAttribute::~CAttribute(void)
+      { /* Ne rien faire de plus */ }
+      
+      ///--------------------------------------------------------------
+
+      const StdString & CAttribute::getName(void) const
+      { 
+         return (this->getId()); 
+      }
+   
+      void CAttribute::generateCInterfaceIsDefined(ostream& oss, const string& className)
+      {
+        CInterface::AttributeIsDefinedCInterface(oss, className, this->getName()) ;
+      }
+      
+      void CAttribute::generateFortran2003InterfaceIsDefined(ostream& oss, const string& className)
+      {
+        CInterface::AttributeIsDefinedFortran2003Interface(oss, className, this->getName()) ;
+      }
+      
+      
+      void CAttribute::generateFortranInterfaceIsDefinedDeclaration_(ostream& oss,const string& className)
+      {
+        CInterface::AttributeFortranInterfaceIsDefinedDeclaration(oss, className, this->getName()+"_") ;
+      }
+
+      void CAttribute::generateFortranInterfaceIsDefinedDeclaration(ostream& oss,const string& className)
+      {
+        CInterface::AttributeFortranInterfaceIsDefinedDeclaration(oss, className, this->getName()) ;
+      }
+
+      void CAttribute::generateFortranInterfaceIsDefinedBody_(ostream& oss,const string& className)
+      {
+        CInterface::AttributeFortranInterfaceIsDefinedBody(oss, className, this->getName()) ;
+      }
+
+      ///--------------------------------------------------------------
+
+      CMessage& operator<<(CMessage& msg,CAttribute& type)
+      {
+        msg.push(type) ;
+        return msg ;
+      }
+
+     CMessage& operator<<(CMessage& msg, const CAttribute& type)
+     {
+//       msg.push(*type.clone()) ;
+       return msg ;
+     }
+ 
+      CBufferOut& operator<<(CBufferOut& buffer, CAttribute& type)
+     {
+    
+       if (!type.toBuffer(buffer)) ERROR("CBufferOut& operator<<(CBufferOut& buffer, CAttribute& type)",
+                                         << "Not enough free space in buffer to queue the attribute.");
+      return buffer ;
+     }
+     
+     CBufferIn& operator>>(CBufferIn& buffer, CAttribute& type)
+     {
+    
+       if (!type.fromBuffer(buffer)) ERROR("CBufferInt& operator>>(CBufferIn& buffer, CAttribute& type)",
+                                           << "Not enough data in buffer to unqueue the attribute.");
+       return buffer ;
+     }
+
+ 
+} // namespace xios
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/attribute.hpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/attribute.hpp	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/attribute.hpp	(revision 1749)
@@ -0,0 +1,88 @@
+#ifndef __XIOS_CAttribute__
+#define __XIOS_CAttribute__
+
+/// boost headers ///
+#include <boost/any.hpp>
+
+/// XIOS headers ///
+#include "xios_spl.hpp"
+#include "object.hpp"
+#include "base_type.hpp"
+#include "message.hpp"
+#include "buffer_in.hpp"
+#include "buffer_out.hpp"
+
+namespace xios
+{
+      /// ////////////////////// DÃ©clarations ////////////////////// ///
+   /*!
+   \class CAttribute
+      The fundamental class which describes the attributes of other different class in XIOS.
+      This class only plays a role of interface, its class child will have specific implelemtation corresponding to type of attribute
+   */
+      class CAttribute : public CObject, public virtual CBaseType
+      {
+            typedef CObject SuperClass;
+
+         public :
+
+            /// Constructeurs ///
+            explicit CAttribute(const StdString & id);
+
+            /// Accesseurs ///
+            const StdString & getName(void) const;
+
+            virtual void set(const CAttribute& ) =0 ;
+            virtual void reset(void ) =0 ;
+            /// Destructeur ///
+            virtual ~CAttribute(void);
+
+            /// Autres ///
+            virtual StdString toString(void) const = 0;
+            virtual void fromString(const StdString & str) = 0;
+            virtual StdString dump(void) const = 0;
+            virtual bool isEqual(const CAttribute& ) = 0;
+
+            //! Returns true if and only if the attribute should be publicly exposed in the API
+            virtual bool isPublic() const { return true; }
+            
+            //! Return true if the attribute should be sent to other clients or servers
+            virtual bool doSend() const { return true; }
+
+            /*
+              Groupd of functions to generate C and Fortran interface 
+            */
+            virtual void generateCInterface(ostream& oss, const string& className) = 0 ;
+            virtual void generateCInterfaceIsDefined(ostream& oss, const string& className) ;
+            virtual void generateFortran2003Interface(ostream& oss, const string& className) = 0 ;
+            virtual void generateFortran2003InterfaceIsDefined(ostream& oss, const string& className) ;
+            virtual void generateFortranInterfaceDeclaration_(ostream& oss,const string& className) = 0 ;
+            virtual void generateFortranInterfaceDeclaration(ostream& oss,const string& className) = 0 ;
+            virtual void generateFortranInterfaceBody_(ostream& oss,const string& className) = 0 ;
+            virtual void generateFortranInterfaceGetDeclaration_(ostream& oss,const string& className) = 0 ;
+            virtual void generateFortranInterfaceGetDeclaration(ostream& oss,const string& className) = 0 ;
+            virtual void generateFortranInterfaceGetBody_(ostream& oss,const string& className) = 0 ;
+            virtual void generateFortranInterfaceIsDefinedDeclaration_(ostream& oss,const string& className) ;
+            virtual void generateFortranInterfaceIsDefinedDeclaration(ostream& oss,const string& className)  ;
+            virtual void generateFortranInterfaceIsDefinedBody_(ostream& oss,const string& className) ;
+
+            virtual void setInheritedValue(const CAttribute& ) = 0 ;
+            virtual bool hasInheritedValue(void) const = 0;
+
+            bool canInherite(void) {return _canInherite ;}
+         protected : 
+            bool _canInherite ;
+            static const StdString resetInheritanceStr ; 
+
+      }; // class CAttribute
+
+   CMessage& operator<<(CMessage& msg,CAttribute& type) ;
+   CMessage& operator<<(CMessage& msg, const CAttribute&  type) ;
+ 
+   CBufferOut& operator<<(CBufferOut& buffer,CAttribute& type) ;
+   CBufferIn& operator>>(CBufferIn& buffer, CAttribute&  type) ;
+
+}
+  // namespace xios
+
+#endif // __XIOS_CAttribute__
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/attribute_array.hpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/attribute_array.hpp	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/attribute_array.hpp	(revision 1749)
@@ -0,0 +1,79 @@
+#ifndef __XIOS_ATTRIBUTE_ARRAY__
+#define __XIOS_ATTRIBUTE_ARRAY__
+
+/// XIOS headers ///
+#include "xios_spl.hpp"
+#include "exception.hpp"
+#include "attribute.hpp"
+#include "buffer_in.hpp"
+#include "buffer_out.hpp"
+#include "array_new.hpp"
+
+namespace xios
+{
+      /// ////////////////////// DÃ©clarations ////////////////////// ///
+      /*!
+        \class CAttributeArray
+        This class implements the attribute representing array of value
+      */
+      template <typename T_numtype, int N_rank>
+         class CAttributeArray : public CAttribute, public CArray<T_numtype, N_rank>
+      {
+        public :
+
+           using CArray<T_numtype,N_rank>::operator = ;
+
+            /// Constructeurs ///
+            explicit CAttributeArray(const StdString & id);
+            CAttributeArray(const StdString & id, xios_map<StdString, CAttribute*> & umap);
+            CAttributeArray(const StdString & id, const CArray<T_numtype, N_rank>& value);
+            CAttributeArray(const StdString & id, const CArray<T_numtype, N_rank>& value,
+                           xios_map<StdString, CAttribute*> & umap);
+
+            /// Accesseur ///
+            CArray<T_numtype, N_rank> getValue(void) const;
+
+            /// Mutateurs ///
+            void setValue(const CArray<T_numtype, N_rank>& value);
+            void set(const CAttribute& attr) ;
+            void set(const CAttributeArray& attr) ;
+            void reset(void) ;
+            void setInheritedValue(const CAttributeArray& attr );
+            void setInheritedValue(const CAttribute& attr );
+            CArray<T_numtype, N_rank> getInheritedValue(void) const ;
+            bool hasInheritedValue(void) const;
+                        
+            bool isEqual(const CAttribute& attr);
+
+            /// Destructeur ///
+            virtual ~CAttributeArray(void) { }
+
+
+            /// Autre ///
+            virtual string toString(void) const { return _toString();}
+            virtual void fromString(const StdString & str) { if (str==resetInheritanceStr) { reset(); _canInherite=false ;}  else _fromString(str);}
+            virtual bool toBuffer  (CBufferOut& buffer) const { return _toBuffer(buffer);}
+            virtual bool fromBuffer(CBufferIn& buffer) { return _fromBuffer(buffer); }
+            virtual string dump(void) const { return _dump();}
+
+            virtual void generateCInterface(ostream& oss,const string& className) ;
+            virtual void generateFortran2003Interface(ostream& oss,const string& className) ;
+            virtual void generateFortranInterfaceDeclaration_(ostream& oss,const string& className) ;
+            virtual void generateFortranInterfaceBody_(ostream& oss,const string& className) ;
+            virtual void generateFortranInterfaceDeclaration(ostream& oss,const string& className) ;
+            virtual void generateFortranInterfaceGetDeclaration_(ostream& oss,const string& className) ;
+            virtual void generateFortranInterfaceGetBody_(ostream& oss,const string& className) ;
+            virtual void generateFortranInterfaceGetDeclaration(ostream& oss,const string& className) ;
+
+         private :
+          bool isEqual_(const CAttributeArray& attr);
+          CArray<T_numtype, N_rank> inheritedValue ;
+          StdString _toString(void) const;
+          StdString _dump(void) const;
+          void _fromString(const StdString & str);
+          bool _toBuffer  (CBufferOut& buffer) const;
+          bool _fromBuffer(CBufferIn& buffer) ;
+      }; // class CAttributeEnum
+} // namespace xios
+
+#endif // __XIOS_ATTRIBUTE_ARRAY__
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/attribute_array_decl.cpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/attribute_array_decl.cpp	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/attribute_array_decl.cpp	(revision 1749)
@@ -0,0 +1,21 @@
+#include "attribute_array_impl.hpp"
+
+
+
+namespace xios
+{
+  template class CAttributeArray<double,1> ;
+  template class CAttributeArray<double,2> ;
+  template class CAttributeArray<double,3> ;
+  template class CAttributeArray<int,1> ;
+  template class CAttributeArray<int,2> ;
+  template class CAttributeArray<bool,1> ;
+  template class CAttributeArray<bool,2> ;
+  template class CAttributeArray<bool,3> ;
+  template class CAttributeArray<bool,4> ;
+  template class CAttributeArray<bool,5> ;
+  template class CAttributeArray<bool,6> ;
+  template class CAttributeArray<bool,7> ;
+  template class CAttributeArray<StdString,1> ;
+  template class CAttributeArray<StdString,2> ;
+}
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/attribute_array_impl.hpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/attribute_array_impl.hpp	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/attribute_array_impl.hpp	(revision 1749)
@@ -0,0 +1,208 @@
+#ifndef __XIOS_ATTRIBUTE_ARRAY_IMPL_HPP__
+#define __XIOS_ATTRIBUTE_ARRAY_IMPL_HPP__
+
+#include "buffer_in.hpp"
+#include "buffer_out.hpp"
+#include "generate_interface.hpp"
+#include "attribute_array.hpp"
+
+
+namespace xios
+{
+      /// ////////////////////// DÃ©finitions ////////////////////// ///
+      template <typename T_numtype, int N_rank>
+      CAttributeArray<T_numtype, N_rank>::CAttributeArray(const StdString & id)
+         : CAttribute(id)
+      { /* Ne rien faire de plus */ }
+
+      template <typename T_numtype, int N_rank>
+      CAttributeArray<T_numtype,N_rank>::CAttributeArray(const StdString & id, const CArray<T_numtype,N_rank>& value)
+         : CAttribute(id)
+      {
+         this->setValue(value);
+      }
+
+      template <typename T_numtype, int N_rank>
+      CAttributeArray<T_numtype, N_rank>::CAttributeArray(const StdString & id, xios_map<StdString, CAttribute*> & umap)
+         : CAttribute(id)
+      {
+         umap.insert(umap.end(), std::make_pair(id, this));
+      }
+
+      template <typename T_numtype, int N_rank>
+      CAttributeArray<T_numtype, N_rank>::CAttributeArray (const StdString & id, const CArray<T_numtype,N_rank>& value,
+                                                           xios_map<StdString, CAttribute*> & umap)
+         : CAttribute(id)
+      {
+         this->setValue(value);
+         umap.insert(umap.end(), std::make_pair(id, this));
+      }
+
+      ///--------------------------------------------------------------
+
+      template <typename T_numtype, int N_rank>
+      void CAttributeArray<T_numtype, N_rank>::reset(void)
+      {
+        CArray<T_numtype, N_rank>::reset() ;
+        inheritedValue.reset() ;
+      }
+
+      template <typename T_numtype, int N_rank>
+      CArray<T_numtype,N_rank> CAttributeArray<T_numtype, N_rank>::getValue(void) const
+      {
+        return this->copy() ;
+      }
+
+      template <typename T_numtype, int N_rank>
+      void CAttributeArray<T_numtype,N_rank>::setValue(const CArray<T_numtype,N_rank>& value)
+      {
+        this->resize(value.shape()) ;
+        *this=value ;
+      }
+
+    template <typename T_numtype, int N_rank>
+    void CAttributeArray<T_numtype,N_rank>::set(const CAttribute& attr)
+    {
+      this->set(dynamic_cast<const CAttributeArray<T_numtype,N_rank>& >(attr)) ;
+    }
+
+    template <typename T_numtype, int N_rank>
+    void CAttributeArray<T_numtype,N_rank>::set(const CAttributeArray& attr)
+    {
+      this->setValue(attr) ;
+    }
+
+
+    template <typename T_numtype, int N_rank>
+    void CAttributeArray<T_numtype,N_rank>::setInheritedValue(const CAttribute& attr)
+    {
+      this->setInheritedValue(dynamic_cast<const CAttributeArray<T_numtype,N_rank>& >(attr)) ;
+    }
+
+    template <typename T_numtype, int N_rank>
+    void CAttributeArray<T_numtype,N_rank>::setInheritedValue(const CAttributeArray& attr)
+    {
+      if (this->isEmpty() && _canInherite && attr.hasInheritedValue())
+      {
+        inheritedValue.resize(attr.shape()) ;
+        inheritedValue=attr ;
+      }
+    }
+
+    template <typename T_numtype, int N_rank>
+    CArray<T_numtype,N_rank> CAttributeArray<T_numtype,N_rank>::getInheritedValue(void) const
+    {
+      if (this->isEmpty()) return inheritedValue.copy() ;
+      else return getValue() ;
+    }
+
+    template <typename T_numtype, int N_rank>
+    bool CAttributeArray<T_numtype,N_rank>::hasInheritedValue(void) const
+    {
+      return !this->isEmpty() || !inheritedValue.isEmpty() ;
+    }
+
+    template <typename T_numtype, int N_rank>
+    bool CAttributeArray<T_numtype,N_rank>::isEqual(const CAttribute& attr)
+    {
+      const CAttributeArray<T_numtype,N_rank>& tmp = dynamic_cast<const CAttributeArray<T_numtype,N_rank>& >(attr);
+      return this->isEqual_(tmp);      
+    }
+
+    template <typename T_numtype, int N_rank>
+    bool CAttributeArray<T_numtype,N_rank>::isEqual_(const CAttributeArray& attr)
+    {
+      if ((!this->hasInheritedValue() && !attr.hasInheritedValue()))
+          return true;
+      if (this->hasInheritedValue() && attr.hasInheritedValue())
+          return (this->getInheritedValue() == attr.getInheritedValue());
+      else 
+        return false;      
+    }
+
+    template <typename T_numtype, int N_rank>
+    StdString CAttributeArray<T_numtype,N_rank>::_toString(void) const
+    {
+      StdOStringStream oss;
+      if (! isEmpty() && this->hasId()) oss << this->getName() << "=\"" << CArray<T_numtype, N_rank>::toString() << "\"";
+      return (oss.str());
+    }
+
+    template <typename T_numtype, int N_rank>
+    StdString CAttributeArray<T_numtype,N_rank>::_dump(void) const
+    {
+      StdOStringStream oss;
+      if (! isEmpty() && this->hasId() && (this->numElements()!=0))
+        oss << this->getName() << "=\"" << CArray<T_numtype, N_rank>::dump() << "\"";
+      return (oss.str());
+    }
+
+
+      template <typename T_numtype, int N_rank>
+         void CAttributeArray<T_numtype, N_rank>::_fromString(const StdString & str)
+      {
+        CArray<T_numtype, N_rank>::fromString(str) ;
+      }
+
+      template <typename T_numtype, int N_rank>
+      bool CAttributeArray<T_numtype, N_rank>::_toBuffer (CBufferOut& buffer) const
+      {
+         return CArray<T_numtype, N_rank>::toBuffer(buffer) ;
+      }
+
+      template <typename T_numtype, int N_rank>
+      bool CAttributeArray<T_numtype, N_rank>::_fromBuffer(CBufferIn& buffer)
+      {
+        return CArray<T_numtype, N_rank>::fromBuffer(buffer) ;
+      }
+
+      template <typename T_numtype, int N_rank>
+      void CAttributeArray<T_numtype, N_rank>::generateCInterface(ostream& oss,const string& className)
+      {
+        CInterface::AttributeCInterface<CArray<T_numtype, N_rank> >(oss, className, this->getName());
+      }
+
+      template <typename T_numtype, int N_rank>
+      void CAttributeArray<T_numtype, N_rank>::generateFortran2003Interface(ostream& oss,const string& className)
+      {
+        CInterface::AttributeFortran2003Interface<CArray<T_numtype, N_rank> >(oss, className, this->getName());
+      }
+
+      template <typename T_numtype, int N_rank>
+      void CAttributeArray<T_numtype, N_rank>::generateFortranInterfaceDeclaration_(ostream& oss,const string& className)
+      {
+        CInterface::AttributeFortranInterfaceDeclaration<CArray<T_numtype, N_rank> >(oss, className, this->getName() + "_");
+      }
+
+      template <typename T_numtype, int N_rank>
+      void CAttributeArray<T_numtype, N_rank>::generateFortranInterfaceBody_(ostream& oss,const string& className)
+      {
+        CInterface::AttributeFortranInterfaceBody<CArray<T_numtype, N_rank> >(oss, className, this->getName());
+      }
+
+      template <typename T_numtype, int N_rank>
+      void CAttributeArray<T_numtype, N_rank>::generateFortranInterfaceDeclaration(ostream& oss,const string& className)
+      {
+        CInterface::AttributeFortranInterfaceDeclaration<CArray<T_numtype, N_rank> >(oss, className, this->getName());
+      }
+
+      template <typename T_numtype, int N_rank>
+      void CAttributeArray<T_numtype, N_rank>::generateFortranInterfaceGetDeclaration_(ostream& oss,const string& className)
+      {
+        CInterface::AttributeFortranInterfaceGetDeclaration<CArray<T_numtype, N_rank> >(oss, className, this->getName() + "_");
+      }
+
+      template <typename T_numtype, int N_rank>
+      void CAttributeArray<T_numtype, N_rank>::generateFortranInterfaceGetBody_(ostream& oss,const string& className)
+      {
+        CInterface::AttributeFortranInterfaceGetBody<CArray<T_numtype, N_rank> >(oss, className, this->getName());
+      }
+
+      template <typename T_numtype, int N_rank>
+      void CAttributeArray<T_numtype, N_rank>::generateFortranInterfaceGetDeclaration(ostream& oss,const string& className)
+      {
+        CInterface::AttributeFortranInterfaceGetDeclaration<CArray<T_numtype, N_rank> >(oss, className, this->getName());
+      }
+} // namespace xios
+
+#endif // __XIOS_ATTRIBUTE_ENUM_IMPL_HPP__
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/attribute_enum.hpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/attribute_enum.hpp	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/attribute_enum.hpp	(revision 1749)
@@ -0,0 +1,89 @@
+#ifndef __XIOS_ATTRIBUTE_ENUM__
+#define __XIOS_ATTRIBUTE_ENUM__
+
+/// XIOS headers ///
+#include "xios_spl.hpp"
+#include "exception.hpp"
+#include "attribute.hpp"
+#include "buffer_in.hpp"
+#include "buffer_out.hpp"
+#include "type.hpp"
+#include "enum.hpp"
+
+
+namespace xios
+{
+      /// ////////////////////// Declarations ////////////////////// ///
+        /*!
+        \class CAttributeEnum
+        This class implements the attribute representing enumeration
+      */
+      template <class T>
+         class CAttributeEnum : public CAttribute, public CEnum<T>
+      {
+        typedef typename T::t_enum T_enum ;
+        public :
+
+            /// Constructeurs ///
+            explicit CAttributeEnum(const StdString & id);
+            CAttributeEnum(const StdString & id,
+                               xios_map<StdString, CAttribute*> & umap);
+            CAttributeEnum(const StdString & id, const T_enum & value);
+            CAttributeEnum(const StdString & id, const T_enum & value,
+                               xios_map<StdString, CAttribute*> & umap);
+
+            /// Accesseur ///
+            T_enum getValue(void) const;
+            string getStringValue(void) const;
+
+
+            /// Mutateurs ///
+            void setValue(const T_enum & value);
+            
+            void set(const CAttribute& attr) ;
+            void set(const CAttributeEnum& attr) ;
+            void reset(void);
+            
+            void setInheritedValue(const CAttributeEnum& attr );
+            void setInheritedValue(const CAttribute& attr );
+            T_enum getInheritedValue(void)  const;
+            string getInheritedStringValue(void) const;
+            bool hasInheritedValue(void) const;                    
+            
+            bool isEqual(const CAttribute& attr );
+
+            /// Destructeur ///
+            virtual ~CAttributeEnum(void) { }
+
+            /// Operateur ///
+            CAttributeEnum& operator=(const T_enum & value);
+
+            /// Autre ///
+            virtual StdString toString(void) const { return _toString();}
+            virtual void fromString(const StdString & str) { if (str==resetInheritanceStr) { reset(); _canInherite=false ;}  else _fromString(str);}
+            virtual StdString dump(void) const { return _toString();}
+
+            virtual bool toBuffer  (CBufferOut& buffer) const { return _toBuffer(buffer);} 
+            virtual bool fromBuffer(CBufferIn& buffer) { return _fromBuffer(buffer); } 
+            
+            virtual void generateCInterface(ostream& oss,const string& className) ;
+            virtual void generateFortran2003Interface(ostream& oss,const string& className) ;
+            virtual void generateFortranInterfaceDeclaration_(ostream& oss,const string& className) ;
+            virtual void generateFortranInterfaceBody_(ostream& oss,const string& className) ;
+            virtual void generateFortranInterfaceDeclaration(ostream& oss,const string& className) ;
+            virtual void generateFortranInterfaceGetDeclaration_(ostream& oss,const string& className) ;
+            virtual void generateFortranInterfaceGetBody_(ostream& oss,const string& className) ;
+            virtual void generateFortranInterfaceGetDeclaration(ostream& oss,const string& className) ;      
+
+         private :
+          bool isEqual_(const CAttributeEnum& attr );
+          StdString _toString(void) const;
+          void _fromString(const StdString & str);
+          bool _toBuffer  (CBufferOut& buffer) const;
+          bool _fromBuffer(CBufferIn& buffer) ;
+          CEnum<T> inheritedValue ;
+      }; // class CAttributeEnum    
+   
+} // namespace xios
+
+#endif // __XIOS_ATTRIBUTE_ENUM__
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/attribute_enum_impl.hpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/attribute_enum_impl.hpp	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/attribute_enum_impl.hpp	(revision 1749)
@@ -0,0 +1,218 @@
+#ifndef __XIOS_ATTRIBUTE_ENUM_IMPL_HPP__
+#define __XIOS_ATTRIBUTE_ENUM_IMPL_HPP__
+
+#include "enum.hpp"
+#include "buffer_in.hpp"
+#include "buffer_out.hpp"
+#include "generate_interface.hpp"
+#include "attribute_enum.hpp"
+
+namespace xios
+{
+  /// ////////////////////// Définitions ////////////////////// ///
+  template <class T>
+  CAttributeEnum<T>::CAttributeEnum(const StdString & id)
+     : CAttribute(id)
+  { /* Ne rien faire de plus */ }
+
+  template <class T>
+  CAttributeEnum<T>::CAttributeEnum(const StdString & id, const T_enum & value)
+     : CAttribute(id)
+  {
+     this->setValue(value);
+  }
+
+  template <class T>
+  CAttributeEnum<T>::CAttributeEnum(const StdString & id,
+                                    xios_map<StdString, CAttribute*> & umap)
+     : CAttribute(id)
+  {
+     umap.insert(umap.end(), std::make_pair(id, this));
+  }
+
+  template <class T>
+  CAttributeEnum<T>::CAttributeEnum
+        (const StdString & id, const T_enum & value,
+         xios_map<StdString, CAttribute*> & umap)
+     : CAttribute(id)
+  {
+     this->setValue(value);
+     umap.insert(umap.end(), std::make_pair(id, this));
+  }
+
+  ///--------------------------------------------------------------
+  template <class T>
+  void CAttributeEnum<T>::reset(void)
+  {
+     CEnum<T>::reset();
+     inheritedValue.reset();
+  }
+
+  template <class T>
+  typename T::t_enum CAttributeEnum<T>::getValue(void) const
+  {
+     return CEnum<T>::get();
+  }
+
+  template <class T>
+  string CAttributeEnum<T>::getStringValue(void) const
+  {
+     return CEnum<T>::toString();
+  }
+
+  template <class T>
+  void CAttributeEnum<T>::setValue(const typename T::t_enum & value)
+  {
+     CEnum<T>::set(value);
+  }
+
+  template <class T>
+  void CAttributeEnum<T>::set(const CAttribute& attr)
+  {
+    this->set(dynamic_cast<const CAttributeEnum<T>& >(attr));
+  }
+
+ template <class T>
+  void CAttributeEnum<T>::set(const CAttributeEnum& attr)
+  {
+    CEnum<T>::set(attr);
+  }
+
+  template <class T>
+  void CAttributeEnum<T>::setInheritedValue(const CAttribute& attr)
+  {
+    this->setInheritedValue(dynamic_cast<const CAttributeEnum<T>& >(attr));
+  }
+
+  template <class T>
+  void CAttributeEnum<T>::setInheritedValue(const CAttributeEnum& attr)
+  {
+    if (this->isEmpty() && _canInherite && attr.hasInheritedValue()) inheritedValue.set(attr.getInheritedValue());
+  }
+
+  template <class T>
+  typename T::t_enum CAttributeEnum<T>::getInheritedValue(void) const
+  {
+    if (this->isEmpty()) return inheritedValue.get();
+    else return getValue();
+  }
+
+  template <class T>
+  string CAttributeEnum<T>::getInheritedStringValue(void) const
+  {
+     if (this->isEmpty()) return inheritedValue.toString();
+     else return CEnum<T>::toString();;
+  }
+
+  template <class T>
+  bool CAttributeEnum<T>::hasInheritedValue(void) const
+  {
+    return !this->isEmpty() || !inheritedValue.isEmpty();
+  }
+
+  template <class T>
+  bool CAttributeEnum<T>::isEqual(const CAttribute& attr)
+  {
+    const CAttributeEnum<T>& tmp = dynamic_cast<const CAttributeEnum<T>& >(attr);
+    return this->isEqual_(tmp);
+  }
+
+  template <class T>
+  bool CAttributeEnum<T>::isEqual_(const CAttributeEnum& attr)
+  {
+    if ((!this->hasInheritedValue() && !attr.hasInheritedValue()))
+        return true;
+    if (this->hasInheritedValue() && attr.hasInheritedValue())
+        return (this->getInheritedValue() == attr.getInheritedValue());
+    else 
+      return false;    
+  }
+
+  //---------------------------------------------------------------
+
+  template <class T>
+  CAttributeEnum<T>& CAttributeEnum<T>::operator=(const T_enum & value)
+  {
+     this->setValue(value);
+     return *this;
+  }
+
+  //---------------------------------------------------------------
+
+  template <class T>
+  StdString CAttributeEnum<T>::_toString(void) const
+  {
+     StdOStringStream oss;
+     if (!CEnum<T>::isEmpty() && this->hasId())
+        oss << this->getName() << "=\"" << CEnum<T>::toString() << "\"";
+     return (oss.str());
+  }
+
+  template <class T>
+  void CAttributeEnum<T>::_fromString(const StdString & str)
+  {
+    CEnum<T>::fromString(str);
+  }
+
+  template <class T>
+  bool CAttributeEnum<T>::_toBuffer (CBufferOut& buffer) const
+  {
+     return CEnum<T>::toBuffer(buffer);
+  }
+
+  template <class T>
+  bool CAttributeEnum<T>::_fromBuffer(CBufferIn& buffer)
+  {
+    return CEnum<T>::fromBuffer(buffer);
+  }
+
+  template <typename T>
+  void CAttributeEnum<T>::generateCInterface(ostream& oss,const string& className)
+  {
+    CInterface::AttributeCInterface<CEnumBase>(oss, className, this->getName());
+  }
+
+  template <typename T>
+  void CAttributeEnum<T>::generateFortran2003Interface(ostream& oss,const string& className)
+  {
+    CInterface::AttributeFortran2003Interface<string>(oss, className, this->getName());
+  }
+
+  template <typename T>
+  void CAttributeEnum<T>::generateFortranInterfaceDeclaration_(ostream& oss,const string& className)
+  {
+    CInterface::AttributeFortranInterfaceDeclaration<string>(oss, className, this->getName()+"_");
+  }
+
+  template <typename T>
+  void CAttributeEnum<T>::generateFortranInterfaceBody_(ostream& oss,const string& className)
+  {
+    CInterface::AttributeFortranInterfaceBody<string>(oss, className, this->getName());
+  }
+
+  template <typename T>
+  void CAttributeEnum<T>::generateFortranInterfaceDeclaration(ostream& oss,const string& className)
+  {
+    CInterface::AttributeFortranInterfaceDeclaration<string>(oss, className, this->getName());
+  }
+
+  template <typename T>
+  void CAttributeEnum<T>::generateFortranInterfaceGetDeclaration_(ostream& oss,const string& className)
+  {
+    CInterface::AttributeFortranInterfaceGetDeclaration<string>(oss, className, this->getName()+"_");
+  }
+
+  template <typename T>
+  void CAttributeEnum<T>::generateFortranInterfaceGetBody_(ostream& oss,const string& className)
+  {
+    CInterface::AttributeFortranInterfaceGetBody<string>(oss, className, this->getName());
+  }
+
+  template <typename T>
+  void CAttributeEnum<T>::generateFortranInterfaceGetDeclaration(ostream& oss,const string& className)
+  {
+    CInterface::AttributeFortranInterfaceGetDeclaration<string>(oss, className, this->getName());
+  }
+} // namespace xios
+
+#endif // __XIOS_ATTRIBUTE_ENUM_IMPL_HPP__
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/attribute_map.cpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/attribute_map.cpp	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/attribute_map.cpp	(revision 1749)
@@ -0,0 +1,872 @@
+#include "attribute_map.hpp"
+#include "indent.hpp"
+
+namespace xios
+{
+      /// ////////////////////// DÃ©finitions ////////////////////// ///
+      CAttributeMap* CAttributeMap::Current = NULL;
+
+      CAttributeMap::CAttributeMap(void)
+         : xios_map<StdString, CAttribute*>()
+      { CAttributeMap::Current = this; }
+
+      CAttributeMap::~CAttributeMap(void)
+      { /* Ne rien faire de plus */ }
+
+      ///--------------------------------------------------------------
+
+      /*!
+         Clear all attributes of an object and reset them to empty state
+      */
+      void CAttributeMap::clearAllAttributes(void)
+      {
+         typedef std::pair<StdString, CAttribute*> StdStrAttPair;
+         SuperClassMap::const_iterator it = SuperClassMap::begin(), end = SuperClassMap::end();
+         for (; it != end; it++)
+         {
+            const StdStrAttPair& att = *it;
+            att.second->reset();
+         }
+      }
+
+      ///--------------------------------------------------------------
+      /*!
+         Dump of all non-empty attributes of an object
+      */
+      StdString CAttributeMap::dumpXiosAttributes(void) const
+      {
+        int maxNbChar = 250;
+        StdString str;
+        typedef std::pair<StdString, CAttribute*> StdStrAttPair;
+        auto it = SuperClassMap::begin(), end = SuperClassMap::end();
+        for (; it != end; it++)
+        {
+          const StdStrAttPair& att = *it;
+          if (!att.second->isEmpty())
+          {
+            if (str.length() < maxNbChar)
+            {
+              str.append(att.second->dump());
+              str.append(" ");
+            }
+            else if (str.length() == maxNbChar)
+            {
+              str.append("...");
+            }
+          }
+        }
+        return str;
+      }
+
+      //---------------------------------------------------------------
+
+      /*
+        Clear an attribute and reset its value
+        \param[in] key id of attribute
+      */
+      void CAttributeMap::clearAttribute(const StdString& key)
+      {
+        if (hasAttribute(key)) this->find(key)->second->reset();
+      }
+
+      //---------------------------------------------------------------
+
+      /*!
+        Set an attribute of certain id with a value
+        \param[in] key id of the attribute
+        \param[in] attr value of attribute
+      */
+      void CAttributeMap::setAttribute(const StdString& key, CAttribute* const attr)
+      {
+         if (!this->hasAttribute(key))
+            ERROR("CAttributeMap::setAttribute(key, attr)",
+                   << "[ key = " << key << "] key not found !");
+         if (attr == NULL)
+            ERROR("CAttributeMap::setAttribute(key, attr)",
+                   << "[ key = " << key << "] attr is null !");
+         this->find(key)->second->set(*attr);
+//       this->find(key)->second->setAnyValue(attr->getAnyValue());
+      }
+
+      //---------------------------------------------------------------
+
+      /*!
+        Subscript operator. Return attribute with a specific id
+      */
+      CAttribute* CAttributeMap::operator[](const StdString& key)
+      {
+         if (!this->hasAttribute(key))
+            ERROR("CAttributeMap::operator[](const StdString& key)",
+                  << "[ key = " << key << "] key not found !");
+         return SuperClassMap::operator[](key);
+      }
+
+      //---------------------------------------------------------------
+
+      StdString CAttributeMap::toString(void) const
+      {
+         typedef std::pair<StdString, CAttribute*> StdStrAttPair;
+         StdOStringStream oss;
+
+         SuperClassMap::const_iterator it = SuperClassMap::begin(), end = SuperClassMap::end();
+         for (; it != end; it++)
+         {
+            const StdStrAttPair& att = *it;
+            if (!att.second->isEmpty())
+               oss << *att.second << " ";
+         }
+         return oss.str();
+      }
+
+      //---------------------------------------------------------------
+
+      void CAttributeMap::fromString(const StdString& str)
+      {
+         ERROR("CAttributeMap::fromString(const StdString& str)",
+               << "[ str = " << str << "] Not implemented yet !");
+      }
+
+      //---------------------------------------------------------------
+
+      //StdOStream& operator << (StdOStream& os, const CAttributeMap& attributmap)
+      //{ os << attributmap.toString(); return (os); }
+
+      //---------------------------------------------------------------
+
+      void CAttributeMap::setAttributes(const xml::THashAttributes& attributes)
+      {
+         for (xml::THashAttributes::const_iterator it  = attributes.begin();
+                                                   it != attributes.end();
+                                                   it++)
+         {
+            if ((*it).first.compare(StdString("id")) != 0 && (*it).first.compare(StdString("src")) != 0)
+            {
+               //if (CAttributeMap::operator[]((*it).first)->isEmpty())
+               CAttributeMap::operator[]((*it).first)->fromString((*it).second);
+            }
+         }
+      }
+
+      /*!
+         Compare two attribute maps
+         \param [in] another attribute map to compare
+         \param [in] excludedAttrs attribute to be excluded from comparasion
+         \return true if these two maps have same attributes whose value are identical
+      */
+      bool CAttributeMap::isEqual(const CAttributeMap& another, const vector<StdString>& excludedAttrs)
+      {
+         SuperClassMap::const_iterator itb = another.begin(), ite = another.end(), it;
+         for (it = itb; it !=ite; ++it)
+         {
+            bool excluded = false;
+            for (int idx = 0; idx < excludedAttrs.size(); ++idx)
+            {
+               if (0 == (*it).first.compare(excludedAttrs[idx]))
+               {
+                 excluded = true;
+                 break;
+               } 
+            }
+
+            if (!excluded)
+            {
+              if ((*it).first.compare(StdString("id")) != 0 && (*it).first.compare(StdString("src")) != 0)
+              {
+                if (this->hasAttribute(it->first))
+                { 
+                  if (!((*it).second->isEqual(*(*this)[it->first])))
+                  {
+                    return false;
+                  }
+                }
+                else
+                  return false;
+              }
+            }
+         }
+
+         return true;
+      }
+
+
+      //---------------------------------------------------------------
+
+      /*!
+      \brief Set attributes from a specific attributemap, considered parent.
+         The child attribute map will insert the attributes of its parent into its current attribute map.
+      The existing attributes can be filled with the values of the parent map if they are empty or
+      simply replaced by these values depending on choice of user.
+      \param [in] _parent Attribute map from which the current map gets attributes.
+      \param [in] apply Specify if current attribute map is replaced by the attributes of parent (false)
+                    or filled in in case of emptyp (true)
+      */
+      void CAttributeMap::setAttributes(const CAttributeMap* const _parent, bool apply)
+      {
+         typedef std::pair<StdString, CAttribute*> StdStrAttPair;
+
+         SuperClassMap::const_iterator it = _parent->begin(), end = _parent->end();
+         for (; it != end; it++)
+         {
+            const StdStrAttPair& el = *it;
+            if (this->hasAttribute(el.first))
+            {
+               CAttribute* currentAtt = CAttributeMap::operator[](el.first);
+               CAttribute* parentAtt = el.second;
+               if (apply)
+               {
+                 if (currentAtt->isEmpty() && currentAtt->canInherite() && !el.second->isEmpty())
+                 {
+                    this->setAttribute(el.first, el.second);
+                 }
+               }
+               else currentAtt->setInheritedValue(*parentAtt);
+            }
+         }
+      }
+
+      /*!
+        Duplicate attribute map with a specific attribute map.
+        Copy all non-empty attribute of the current attribute map
+        \param [in] srcAttr attribute map which is copied from.
+      */
+      void CAttributeMap::duplicateAttributes(const CAttributeMap* const srcAttr)
+      {
+         typedef std::pair<StdString, CAttribute*> StdStrAttPair;
+
+         SuperClassMap::const_iterator it = srcAttr->begin(), end = srcAttr->end();
+         for (; it != end; it++)
+         {
+            const StdStrAttPair& el = *it;
+            if (this->hasAttribute(el.first))
+            {
+               if (!el.second->isEmpty())
+               {
+                 this->setAttribute(el.first, el.second);
+               }
+            }
+         }
+      }
+
+      //---------------------------------------------------------------
+/*
+      void CAttributeMap::toBinary(StdOStream& os) const
+      {
+         typedef std::pair<StdString, CAttribute*> StdStrAttPair;
+         SuperClassMap::const_iterator it = this->begin(), end = this->end();
+
+         const StdSize nbatt = SuperClassMap::size();
+         os.write (reinterpret_cast<const char*>(&nbatt) , sizeof(StdSize));
+
+         for (; it != end; it++)
+         {
+            const StdString& key   = it->first;
+            const CAttribute* value = it->second;
+            const StdSize size = key.size();
+
+            os.write (reinterpret_cast<const char*>(&size) , sizeof(StdSize));
+            os.write (key.data(), size* sizeof(char));
+
+            if (!value->isEmpty())
+            {
+               bool b = true;
+               os.write (reinterpret_cast<const char*>(&b) , sizeof(bool));
+               value->toBinary(os);
+            }
+            else
+            {
+               bool b = false;
+               os.write (reinterpret_cast<const char*>(&b) , sizeof(bool));
+            }
+         }
+      }
+
+      //---------------------------------------------------------------
+
+      void CAttributeMap::fromBinary(StdIStream& is)
+      {
+         StdSize nbatt = 0;
+         is.read (reinterpret_cast<char*>(&nbatt), sizeof(StdSize));
+
+         for (StdSize i = 0; i < nbatt; i++)
+         {
+            bool hasValue = false;
+            StdSize size  = 0;
+            is.read (reinterpret_cast<char*>(&size), sizeof(StdSize));
+            StdString key(size, ' ');
+            is.read (const_cast<char *>(key.data()), size* sizeof(char));
+
+            if (!this->hasAttribute(key))
+               ERROR("CAttributeMap::fromBinary(StdIStream& is)",
+                     << "[ key = " << key << "] key not found !");
+
+            is.read (reinterpret_cast<char*>(&hasValue), sizeof(bool));
+
+            if (hasValue)
+               this->operator[](key)->fromBinary(is);
+         }
+      }
+ */
+      
+      void CAttributeMap::generateCInterface(ostream& oss, const string& className)
+      {
+         SuperClassMap::const_iterator it = SuperClassMap::begin(), end = SuperClassMap::end();
+         for (; it != end; it++)
+         {
+           if (it->second->isPublic())
+           {
+             oss << std::endl << iendl;
+             it->second->generateCInterface(oss, className);
+             oss << iendl;
+             it->second->generateCInterfaceIsDefined(oss, className);
+           }
+         }
+      }
+
+      void CAttributeMap::generateFortran2003Interface(ostream& oss, const string& className)
+      {
+         SuperClassMap::const_iterator it = SuperClassMap::begin(), end = SuperClassMap::end();
+         for (; it != end; it++)
+         {
+           if (it->second->isPublic())
+           {
+             oss << std::endl << iendl;
+             it->second->generateFortran2003Interface(oss, className);
+             oss << iendl;
+             it->second->generateFortran2003InterfaceIsDefined(oss, className);
+           }
+         }
+      }
+
+      ///--------------------------------------------------------------
+
+      void CAttributeMap::generateFortranInterface_hdl_(ostream& oss, const string& className)
+      {
+         oss << "SUBROUTINE xios(set_" << className << "_attr_hdl_)   &" << iendl++;
+         SuperClassMap::const_iterator it;
+         SuperClassMap::const_iterator begin = SuperClassMap::begin(), end = SuperClassMap::end();
+
+         long startPos = oss.tellp();
+
+         oss << "( " << className << "_hdl";
+         for (it = begin; it != end; it++)
+         {
+           if (it->second->isPublic())
+           {
+             oss << ", " << it->second->getName() << "_";
+             if (oss.tellp() - startPos > 90)
+             {
+               oss << "  &" << iendl;
+               startPos = oss.tellp();
+             }
+           }
+         }
+         oss << " )";
+         oss << std::endl;
+         oss << iendl;
+
+         oss << "IMPLICIT NONE" << iendl++;
+         oss << "TYPE(txios(" << className << ")) , INTENT(IN) :: " << className << "_hdl";
+
+         for (it = begin; it != end; it++)
+         {
+           if (it->second->isPublic())
+           {
+             oss << iendl;
+             it->second->generateFortranInterfaceDeclaration_(oss, className);
+           }
+         }
+
+         for (it = begin; it != end; it++)
+         {
+           if (it->second->isPublic())
+           {
+             oss << std::endl << iendl;
+             it->second->generateFortranInterfaceBody_(oss, className);
+           }
+         }
+
+         oss << std::endl << (iendl -= 2);
+         oss << "END SUBROUTINE xios(set_" << className << "_attr_hdl_)" << std::endl;
+      }
+
+      void CAttributeMap::generateFortranInterfaceGet_hdl_(ostream& oss, const string& className)
+      {
+         oss << "SUBROUTINE xios(get_" << className << "_attr_hdl_)   &" << iendl++;
+         SuperClassMap::const_iterator it;
+         SuperClassMap::const_iterator begin = SuperClassMap::begin(), end = SuperClassMap::end();
+
+         long startPos = oss.tellp();
+
+         oss << "( " << className << "_hdl";
+         for (it = begin; it != end; it++)
+         {
+           if (it->second->isPublic())
+           {
+             oss << ", " << it->second->getName() << "_";
+             if (oss.tellp() - startPos > 90)
+             {
+               oss << "  &" << iendl;
+               startPos = oss.tellp();
+             }
+           }
+         }
+         oss << " )";
+         oss << std::endl;
+         oss << iendl;
+
+         oss << "IMPLICIT NONE" << iendl++;
+         oss << "TYPE(txios(" << className << ")) , INTENT(IN) :: " << className << "_hdl";
+
+         for (it = begin; it != end; it++)
+         {
+           if (it->second->isPublic())
+           {
+             oss << iendl;
+             it->second->generateFortranInterfaceGetDeclaration_(oss, className);
+           }
+         }
+
+         for (it = begin; it != end; it++)
+         {
+           if (it->second->isPublic())
+           {
+             oss << std::endl << iendl;
+             it->second->generateFortranInterfaceGetBody_(oss, className);
+           }
+         }
+
+         oss << std::endl << (iendl -= 2);
+         oss << "END SUBROUTINE xios(get_" << className << "_attr_hdl_)" << std::endl;
+      }
+
+      void CAttributeMap::generateFortranInterfaceIsDefined_hdl_(ostream& oss, const string& className)
+      {
+         oss << "SUBROUTINE xios(is_defined_" << className << "_attr_hdl_)   &" << iendl++;
+         SuperClassMap::const_iterator it;
+         SuperClassMap::const_iterator begin = SuperClassMap::begin(), end = SuperClassMap::end();
+
+         long startPos = oss.tellp();
+
+         oss << "( " << className << "_hdl";
+         for (it = begin; it != end; it++)
+         {
+           if (it->second->isPublic())
+           {
+             oss << ", " << it->second->getName() << "_";
+             if (oss.tellp() - startPos > 90)
+             {
+               oss << "  &" << iendl;
+               startPos = oss.tellp();
+             }
+           }
+         }
+         oss << " )";
+         oss << std::endl;
+         oss << iendl;
+
+         oss << "IMPLICIT NONE" << iendl++;
+         oss << "TYPE(txios(" << className << ")) , INTENT(IN) :: " << className << "_hdl";
+
+         for (it = begin; it != end; it++)
+         {
+           if (it->second->isPublic())
+           {
+             oss << iendl;
+             it->second->generateFortranInterfaceIsDefinedDeclaration_(oss, className);
+           }
+         }
+
+         for (it = begin; it != end; it++)
+         {
+           if (it->second->isPublic())
+           {
+             oss << std::endl << iendl;
+             it->second->generateFortranInterfaceIsDefinedBody_(oss, className);
+           }
+         }
+
+         oss << std::endl << (iendl -= 2);
+         oss << "END SUBROUTINE xios(is_defined_" << className << "_attr_hdl_)" << std::endl;
+      }
+
+      void CAttributeMap::generateFortranInterface_hdl(ostream& oss, const string& className)
+      {
+         oss << "SUBROUTINE xios(set_" << className << "_attr_hdl)  &" << iendl++;
+         SuperClassMap::const_iterator it;
+         SuperClassMap::const_iterator begin = SuperClassMap::begin(), end = SuperClassMap::end();
+
+         long startPos = oss.tellp();
+
+         oss << "( " << className << "_hdl";
+         for (it = begin; it != end; it++)
+         {
+           if (it->second->isPublic())
+           {
+             oss << ", " << it->second->getName();
+             if (oss.tellp() - startPos > 90)
+             {
+               oss << "  &" << iendl;
+               startPos = oss.tellp();
+             }
+           }
+         }
+         oss << " )";
+         oss << std::endl;
+         oss << iendl;
+
+         oss << "IMPLICIT NONE" << iendl++;
+         oss << "TYPE(txios(" << className << ")) , INTENT(IN) :: " << className << "_hdl";
+
+         for (it = begin; it != end; it++)
+         {
+           if (it->second->isPublic())
+           {
+             oss << iendl;
+             it->second->generateFortranInterfaceDeclaration(oss, className);
+           }
+         }
+
+         oss << std::endl << iendl;
+
+         oss << "CALL xios(set_" << className << "_attr_hdl_)  &" << iendl;
+
+         startPos = oss.tellp();
+
+         oss << "( " << className << "_hdl";
+         for (it = begin; it != end; it++)
+         {
+           if (it->second->isPublic())
+           {
+             oss << ", " << it->second->getName();
+             if (oss.tellp() - startPos > 90)
+             {
+               oss << "  &" << iendl;
+               startPos = oss.tellp();
+             }
+           }
+         }
+         oss << " )";
+
+         oss << std::endl << (iendl -= 2);
+         oss << "END SUBROUTINE xios(set_" << className << "_attr_hdl)" << std::endl;
+      }
+
+      void CAttributeMap::generateFortranInterfaceGet_hdl(ostream& oss, const string& className)
+      {
+         oss << "SUBROUTINE xios(get_" << className << "_attr_hdl)  &" << iendl++;
+         SuperClassMap::const_iterator it;
+         SuperClassMap::const_iterator begin = SuperClassMap::begin(), end = SuperClassMap::end();
+
+         long startPos = oss.tellp();
+
+         oss << "( " << className << "_hdl";
+         for (it = begin; it != end; it++)
+         {
+           if (it->second->isPublic())
+           {
+             oss << ", " << it->second->getName();
+             if (oss.tellp() - startPos > 90)
+             {
+               oss << "  &" << iendl;
+               startPos = oss.tellp();
+             }
+           }
+         }
+         oss << " )";
+         oss << std::endl;
+         oss << iendl;
+
+         oss << "IMPLICIT NONE" << iendl++;
+         oss << "TYPE(txios(" << className << ")) , INTENT(IN) :: " << className << "_hdl";
+
+         for (it = begin; it != end; it++)
+         {
+           if (it->second->isPublic())
+           {
+             oss << iendl;
+             it->second->generateFortranInterfaceGetDeclaration(oss, className);
+           }
+         }
+
+         oss << std::endl << iendl;
+
+         oss << "CALL xios(get_" << className << "_attr_hdl_)  &" << iendl;
+
+         startPos = oss.tellp();
+
+         oss << "( " << className << "_hdl";
+         for (it = begin; it != end; it++)
+         {
+           if (it->second->isPublic())
+           {
+             oss << ", " << it->second->getName();
+             if (oss.tellp() - startPos > 90)
+             {
+               oss << "  &" << iendl;
+               startPos = oss.tellp();
+             }
+           }
+         }
+         oss << " )";
+
+         oss << std::endl << (iendl -= 2);
+         oss << "END SUBROUTINE xios(get_" << className << "_attr_hdl)" << std::endl;
+      }
+
+      void CAttributeMap::generateFortranInterfaceIsDefined_hdl(ostream& oss, const string& className)
+      {
+         oss << "SUBROUTINE xios(is_defined_" << className << "_attr_hdl)  &" << iendl++;
+         SuperClassMap::const_iterator it;
+         SuperClassMap::const_iterator begin = SuperClassMap::begin(), end = SuperClassMap::end();
+
+         long startPos = oss.tellp();
+
+         oss << "( " << className << "_hdl";
+         for (it = begin; it != end; it++)
+         {
+           if (it->second->isPublic())
+           {
+             oss << ", " << it->second->getName();
+             if (oss.tellp() - startPos > 90)
+             {
+               oss << "  &" << iendl;
+               startPos = oss.tellp();
+             }
+           }
+         }
+         oss << " )";
+         oss << std::endl;
+         oss << iendl;
+
+         oss << "IMPLICIT NONE" << iendl++;
+         oss << "TYPE(txios(" << className << ")) , INTENT(IN) :: " << className << "_hdl";
+
+         for (it = begin; it != end; it++)
+         {
+           if (it->second->isPublic())
+           {
+             oss << iendl;
+             it->second->generateFortranInterfaceIsDefinedDeclaration(oss, className);
+           }
+         }
+
+         oss << std::endl << iendl;
+
+         oss << "CALL xios(is_defined_" << className << "_attr_hdl_)  &" << iendl;
+
+         startPos = oss.tellp();
+
+         oss << "( " << className << "_hdl";
+         for (it = begin; it != end; it++)
+         {
+           if (it->second->isPublic())
+           {
+             oss << ", " << it->second->getName();
+             if (oss.tellp() - startPos > 90)
+             {
+               oss << "  &" << iendl;
+               startPos = oss.tellp();
+             }
+           }
+         }
+         oss << " )";
+
+         oss << std::endl << (iendl -= 2);
+         oss << "END SUBROUTINE xios(is_defined_" << className << "_attr_hdl)" << std::endl;
+      }
+
+      void CAttributeMap::generateFortranInterface_id(ostream& oss, const string& className)
+      {
+         oss << "SUBROUTINE xios(set_" << className << "_attr)  &" << iendl++;
+         SuperClassMap::const_iterator it;
+         SuperClassMap::const_iterator begin = SuperClassMap::begin(), end = SuperClassMap::end();
+
+         long startPos = oss.tellp();
+
+         oss << "( " << className << "_id";
+         for (it = begin; it != end; it++)
+         {
+           if (it->second->isPublic())
+           {
+             oss << ", " << it->second->getName();
+             if (oss.tellp() - startPos > 90)
+             {
+               oss << "  &" << iendl;
+               startPos = oss.tellp();
+             }
+           }
+         }
+         oss << " )";
+         oss << std::endl;
+         oss << iendl;
+
+         oss << "IMPLICIT NONE" << iendl++;
+
+         oss << "TYPE(txios(" << className << "))  :: " << className << "_hdl" << iendl;
+         oss << "CHARACTER(LEN=*), INTENT(IN) ::" << className << "_id";
+
+         for (it = begin; it != end; it++)
+         {
+           if (it->second->isPublic())
+           {
+             oss << iendl;
+             it->second->generateFortranInterfaceDeclaration(oss, className);
+           }
+         }
+
+         oss << std::endl << iendl;
+         oss << "CALL xios(get_" << className << "_handle) &" << iendl;
+         oss << "(" << className << "_id," << className << "_hdl)" << iendl;
+         oss << "CALL xios(set_" << className << "_attr_hdl_)   &" << iendl;
+
+         startPos = oss.tellp();
+
+         oss << "( " << className << "_hdl";
+         for (it = begin; it != end; it++)
+         {
+           if (it->second->isPublic())
+           {
+             oss << ", " << it->second->getName();
+             if (oss.tellp() - startPos > 90)
+             {
+               oss << "  &" << iendl;
+               startPos = oss.tellp();
+             }
+           }
+         }
+         oss << " )";
+
+         oss << std::endl << (iendl -= 2);
+         oss << "END SUBROUTINE xios(set_" << className << "_attr)" << std::endl;
+      }
+
+      void CAttributeMap::generateFortranInterfaceGet_id(ostream& oss, const string& className)
+      {
+         oss << "SUBROUTINE xios(get_" << className << "_attr)  &" << iendl++;
+         SuperClassMap::const_iterator it;
+         SuperClassMap::const_iterator begin = SuperClassMap::begin(), end = SuperClassMap::end();
+
+         long startPos = oss.tellp();
+
+         oss << "( " << className << "_id";
+         for (it = begin; it != end; it++)
+         {
+           if (it->second->isPublic())
+           {
+             oss << ", " << it->second->getName();
+             if (oss.tellp() - startPos > 90)
+             {
+               oss << "  &" << iendl;
+               startPos = oss.tellp();
+             }
+           }
+         }
+         oss << " )";
+         oss << std::endl;
+         oss << iendl;
+
+         oss << "IMPLICIT NONE" << iendl++;
+
+         oss << "TYPE(txios(" << className << "))  :: " << className << "_hdl" << iendl;
+         oss << "CHARACTER(LEN=*), INTENT(IN) ::" << className << "_id";
+
+         for (it = begin; it != end; it++)
+         {
+           if (it->second->isPublic())
+           {
+             oss << iendl;
+             it->second->generateFortranInterfaceGetDeclaration(oss, className);
+           }
+         }
+
+         oss << std::endl << iendl;
+         oss << "CALL xios(get_" << className << "_handle) &" << iendl;
+         oss << "(" << className << "_id," << className << "_hdl)" << iendl;
+         oss << "CALL xios(get_" << className << "_attr_hdl_)   &" << iendl;
+
+         startPos = oss.tellp();
+
+         oss << "( " << className << "_hdl";
+         for (it = begin; it != end; it++)
+         {
+           if (it->second->isPublic())
+           {
+             oss << ", " << it->second->getName();
+             if (oss.tellp() - startPos > 90)
+             {
+               oss << "  &" << iendl;
+               startPos = oss.tellp();
+             }
+           }
+         }
+         oss << " )";
+
+         oss << std::endl << (iendl -= 2);
+         oss << "END SUBROUTINE xios(get_" << className << "_attr)" << std::endl;
+      }
+
+      void CAttributeMap::generateFortranInterfaceIsDefined_id(ostream& oss, const string& className)
+      {
+         oss << "SUBROUTINE xios(is_defined_" << className << "_attr)  &" << iendl++;
+         SuperClassMap::const_iterator it;
+         SuperClassMap::const_iterator begin = SuperClassMap::begin(), end = SuperClassMap::end();
+
+         long startPos = oss.tellp();
+
+         oss << "( " << className << "_id";
+         for (it = begin; it != end; it++)
+         {
+           if (it->second->isPublic())
+           {
+             oss << ", " << it->second->getName();
+             if (oss.tellp() - startPos > 90)
+             {
+               oss << "  &" << iendl;
+               startPos = oss.tellp();
+             }
+           }
+         }
+         oss << " )";
+         oss << std::endl;
+         oss << iendl;
+
+         oss << "IMPLICIT NONE" << iendl++;
+
+         oss << "TYPE(txios(" << className << "))  :: " << className << "_hdl" << iendl;
+         oss << "CHARACTER(LEN=*), INTENT(IN) ::" << className << "_id";
+
+         for (it = begin; it != end; it++)
+         {
+           if (it->second->isPublic())
+           {
+             oss << iendl;
+             it->second->generateFortranInterfaceIsDefinedDeclaration(oss, className);
+           }
+         }
+
+         oss << std::endl << iendl;
+         oss << "CALL xios(get_" << className << "_handle) &" << iendl;
+         oss << "(" << className << "_id," << className << "_hdl)" << iendl;
+         oss << "CALL xios(is_defined_" << className << "_attr_hdl_)   &" << iendl;
+
+         startPos = oss.tellp();
+
+         oss << "( " << className << "_hdl";
+         for (it = begin; it != end; it++)
+         {
+           if (it->second->isPublic())
+           {
+             oss << ", " << it->second->getName();
+             if (oss.tellp() - startPos > 90)
+             {
+               oss << "  &" << iendl;
+               startPos = oss.tellp();
+             }
+           }
+         }
+         oss << " )";
+
+         oss << std::endl << (iendl -= 2);
+         oss << "END SUBROUTINE xios(is_defined_" << className << "_attr)" << std::endl;
+      }
+} // namespace xios
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/attribute_map.hpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/attribute_map.hpp	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/attribute_map.hpp	(revision 1749)
@@ -0,0 +1,89 @@
+#ifndef __XIOS_CAttributeMap__
+#define __XIOS_CAttributeMap__
+
+/// XIOS headers ///
+#include "xios_spl.hpp"
+#include "attribute.hpp"
+#include "attribute_template.hpp"
+#include "exception.hpp"
+#include "xml_node.hpp"
+
+namespace xios
+{
+      /// ////////////////////// DÃ©clarations ////////////////////// ///
+      /*!
+        \class CAttributeMap
+        This class represents the set of attributes which an object can have.
+        Each attribute in the set is represented by an unique id.
+      */
+
+      class CAttributeMap
+         : public xios_map<StdString, CAttribute*>
+      {
+            typedef xios_map<StdString, CAttribute*> SuperClassMap;
+
+         public :
+
+            /// Tests ///
+            bool hasAttribute(const StdString & key) const;
+
+            /// Accesseurs ///
+            CAttribute * operator[](const StdString & key);
+
+            /// Mutateurs ///
+            void setAttribute(const StdString & key, CAttribute * const attr);
+
+            void setAttributes(const xml::THashAttributes & attributes);
+            void setAttributes(const CAttributeMap * const _parent, bool apply=true);
+            void duplicateAttributes(const CAttributeMap* const _parent);
+            void clearAllAttributes(void);
+            StdString dumpXiosAttributes(void) const;
+
+            void clearAttribute(const StdString& key);
+            bool isEqual(const CAttributeMap& another, const vector<StdString>& excludedAttrs);
+
+            /// Destructeur ///
+            virtual ~CAttributeMap(void);
+
+            /// Flux ///
+            // Debug only //
+            // friend StdOStream & operator << (StdOStream & os, const CAttributeMap & attributmap);
+
+            /// Autre ///
+            virtual StdString toString(void) const;
+            virtual void fromString(const StdString & str);
+
+//            virtual void toBinary  (StdOStream & os) const;
+//            virtual void fromBinary(StdIStream & is);
+            virtual void generateCInterface(ostream& oss, const string& className) ;
+            virtual void generateFortran2003Interface(ostream& oss, const string& className) ;
+            virtual void generateFortranInterface_hdl_(ostream& oss, const string& className) ;
+            virtual void generateFortranInterface_hdl(ostream& oss, const string& className) ;
+            virtual void generateFortranInterface_id(ostream& oss, const string& className) ;
+            virtual void generateFortranInterfaceGet_hdl_(ostream& oss, const string& className) ;
+            virtual void generateFortranInterfaceGet_hdl(ostream& oss, const string& className) ;
+            virtual void generateFortranInterfaceGet_id(ostream& oss, const string& className) ;
+            virtual void generateFortranInterfaceIsDefined_hdl_(ostream& oss, const string& className) ;
+            virtual void generateFortranInterfaceIsDefined_hdl(ostream& oss, const string& className) ;
+            virtual void generateFortranInterfaceIsDefined_id(ostream& oss, const string& className) ;
+
+         protected :
+
+            /// Constructeurs ///
+            CAttributeMap(void);
+            CAttributeMap(const xios_map<StdString, CAttribute*> & umap);       // Never implemented.
+            CAttributeMap(const xios_map<StdString, CAttribute*> * const umap); // Not implemented.
+
+            /// PropriÃ©tÃ© statique ///
+            static CAttributeMap * Current;
+
+      };  // class CAttributeMap
+
+      inline bool CAttributeMap::hasAttribute(const StdString& key) const
+      {
+         return (this->find(key) != this->end());
+      }
+
+} // namespace xios
+
+#endif // __XIOS_CAttributeMap__
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/attribute_template.hpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/attribute_template.hpp	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/attribute_template.hpp	(revision 1749)
@@ -0,0 +1,114 @@
+#ifndef __XIOS_CAttributeTemplate__
+#define __XIOS_CAttributeTemplate__
+
+/// boost headers ///
+#include <boost/lexical_cast.hpp>
+
+/// XIOS headers ///
+#include "xios_spl.hpp"
+#include "exception.hpp"
+#include "attribute.hpp"
+#include "buffer_in.hpp"
+#include "buffer_out.hpp"
+#include "type.hpp"
+
+namespace xios
+{
+      /// ////////////////////// DÃ©clarations ////////////////////// ///
+  /*!
+    \class CAttributeTemplate
+    The class implements attribute of some basic types
+  */
+      template <class T>
+         class CAttributeTemplate : public CAttribute, public CType<T>
+      {
+            typedef CAttribute SuperClass;
+
+         public :
+
+            /// Typedef ///
+            typedef T ValueType;
+
+            /// Constructeurs ///
+            explicit CAttributeTemplate(const StdString & id);
+            CAttributeTemplate(const StdString & id,
+                               xios_map<StdString, CAttribute*> & umap);
+            CAttributeTemplate(const StdString & id, const ValueType & value);
+            CAttributeTemplate(const StdString & id, const ValueType & value,
+                               xios_map<StdString, CAttribute*> & umap);
+//            CAttributeTemplate(const CAttribute & attribut) throw (CException);
+//            CAttributeTemplate(const CAttribute * const attribut); // Not implemented.
+
+          public :
+
+            /// Accesseur ///
+            ValueType getValue(void) const;
+//            ValueType* getRef(void) ;
+
+            /// Mutateurs ///
+            void setValue(const ValueType & value);
+
+            void set(const CAttribute& attr) ;
+            void set(const CAttributeTemplate& attr) ;
+            void reset(void) ;
+            void checkEmpty(void) const;
+
+
+            void setInheritedValue(const CAttributeTemplate& attr );
+            void setInheritedValue(const CAttribute& attr );
+            T getInheritedValue(void) const ;
+            bool hasInheritedValue(void) const;
+            
+            bool isEqual(const CAttribute& attr );
+
+            /// Destructeur ///
+            virtual ~CAttributeTemplate(void) { }
+
+            /// Operateur ///
+            CAttributeTemplate& operator=(const ValueType & value);
+
+            /// Autre ///
+            virtual StdString toString(void) const { return _toString();}
+            virtual void fromString(const StdString & str) { if (str==resetInheritanceStr) { reset(); _canInherite=false ;}  else _fromString(str);}
+//            virtual CAttributeTemplate* clone() const {}
+//            virtual void toBinary  (StdOStream & os) const;
+//            virtual void fromBinary(StdIStream & is);
+            virtual StdString dump(void) const { return _dump();}
+
+            virtual bool toBuffer  (CBufferOut& buffer) const { return _toBuffer(buffer);}
+            virtual bool fromBuffer(CBufferIn& buffer) { return _fromBuffer(buffer); }
+//            virtual size_t size(void) const;
+            virtual void generateCInterface(ostream& oss,const string& className) ;
+            virtual void generateFortran2003Interface(ostream& oss,const string& className) ;
+            virtual void generateFortranInterfaceDeclaration_(ostream& oss,const string& className) ;
+            virtual void generateFortranInterfaceBody_(ostream& oss,const string& className) ;
+            virtual void generateFortranInterfaceDeclaration(ostream& oss,const string& className) ;
+            virtual void generateFortranInterfaceGetDeclaration_(ostream& oss,const string& className) ;
+            virtual void generateFortranInterfaceGetBody_(ostream& oss,const string& className) ;
+            virtual void generateFortranInterfaceGetDeclaration(ostream& oss,const string& className) ;
+//            virtual void generateFortranInterfaceIsDefinedDeclaration_(ostream& oss,const string& className) ;
+//            virtual void generateFortranInterfaceIsDefinedBody_(ostream& oss,const string& className) ;
+//            virtual void generateFortranInterfaceIsDefinedDeclaration(ostream& oss,const string& className) ;
+
+
+         protected :
+
+            /// Constructeurs ///
+//            CAttributeTemplate(void); // Not implemented.
+         private :
+          bool isEqual_(const CAttributeTemplate& attr);
+          StdString _toString(void) const;
+          StdString _dump(void) const;
+          void _fromString(const StdString & str);
+          bool _toBuffer  (CBufferOut& buffer) const;
+          bool _fromBuffer(CBufferIn& buffer) ;
+
+          CType<T> inheritedValue ;
+      }; // class CAttribute
+
+
+   template <class T>  void FromBinary(StdIStream & is, T & obj);
+
+} // namespace xios
+
+#endif // __XIOS_CAttributeTemplate__
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/attribute_template_decl.cpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/attribute_template_decl.cpp	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/attribute_template_decl.cpp	(revision 1749)
@@ -0,0 +1,14 @@
+#include "attribute_template_impl.hpp"
+#include "attribute_template_specialisation.hpp"
+#include <string>
+#include "date.hpp"
+
+namespace xios
+{
+  template class CAttributeTemplate<int> ;
+  template class CAttributeTemplate<double> ;
+  template class CAttributeTemplate<bool> ;
+  template class CAttributeTemplate<string> ;
+  template class CAttributeTemplate<CDate> ;
+  template class CAttributeTemplate<CDuration> ;
+}
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/attribute_template_impl.hpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/attribute_template_impl.hpp	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/attribute_template_impl.hpp	(revision 1749)
@@ -0,0 +1,401 @@
+#ifndef __XIOS_CAttributeTemplate_impl__
+#define __XIOS_CAttributeTemplate_impl__
+
+#include "type.hpp"
+#include "buffer_in.hpp"
+#include "buffer_out.hpp"
+#include "generate_interface.hpp"
+#include "attribute_template.hpp"
+
+
+namespace xios
+{
+
+      /// ////////////////////// DÃ©finitions ////////////////////// ///
+      template <class T>
+         CAttributeTemplate<T>::CAttributeTemplate(const StdString & id)
+         : CAttribute(id)
+      { /* Ne rien faire de plus */ }
+
+      template <class T>
+         CAttributeTemplate<T>::CAttributeTemplate(const StdString & id, const T & value)
+         : CAttribute(id)
+      {
+         this->setValue(value);
+      }
+/*
+      template <class T>
+         CAttributeTemplate<T>::CAttributeTemplate(const CAttribute & attribut)
+         throw (CException)
+         : CAttribute(attribut)
+      {
+         if (!attribut.isEmpty() && !attribut.isType<T>())
+            ERROR("CAttributeTemplate", << "Invalid instantiation !");
+      }
+*/
+      template <class T>
+         CAttributeTemplate<T>::CAttributeTemplate(const StdString & id,
+                              xios_map<StdString, CAttribute*> & umap)
+         : CAttribute(id)
+      {
+         umap.insert(umap.end(), std::make_pair(id, this));
+      }
+
+      template <class T>
+         CAttributeTemplate<T>::CAttributeTemplate
+            (const StdString & id, const T & value,
+             xios_map<StdString, CAttribute*> & umap)
+         : CAttribute(id)
+      {
+         this->setValue(value);
+         umap.insert(umap.end(), std::make_pair(id, this));
+      }
+/*
+      template <class T>
+      CAttributeTemplate<T>::~CAttributeTemplate(void)
+      {
+//         this->CType<T>::reset() ;
+//         this->clear();
+      }
+*/
+      ///--------------------------------------------------------------
+      template <class T>
+      void CAttributeTemplate<T>::reset(void)
+      {
+        CType<T>::reset() ;
+        inheritedValue.reset() ;
+      }
+
+      template <class T>
+      void CAttributeTemplate<T>::checkEmpty(void) const
+      {
+        if (CType<T>::empty)
+        {
+          StdString msg("On checking attribute with id=");
+          msg.append(this->getId());
+          msg.append(" : ");
+          msg.append("data is not initialized\n");
+          ERROR("template <typename T> void CType<T>::checkEmpty(void) const", << msg);
+        }
+      }
+
+
+      template <class T>
+         T CAttributeTemplate<T>::getValue(void) const
+      {
+        return CType<T>::get() ;
+
+/*
+        if (SuperClass::isEmpty())
+        {
+           ERROR("T CAttributeTemplate<T>::getValue(void) const",
+                 << "[ id = " << this->getId() << "]"
+                 << " L'attribut est requis mais n'est pas dÃ©fini !");
+         }
+        return (SuperClass::getValue<T>());
+*/
+      }
+
+/*
+      template <class T>
+         T* CAttributeTemplate<T>::getRef(void)
+      {
+         if (SuperClass::isEmpty())
+         {
+            ERROR("T CAttributeTemplate<T>::getValue(void) const",
+                  << "[ id = " << this->getId() << "]"
+                  << " L'attribut est requis mais n'est pas dÃ©fini !");
+          }
+         return (SuperClass::getRef<T>());
+      }
+*/
+
+      template <class T>
+         void CAttributeTemplate<T>::setValue(const T & value)
+      {
+         CType<T>::set(value) ;
+//         SuperClass::setValue<T>(value);
+      }
+
+    template <class T>
+    void CAttributeTemplate<T>::set(const CAttribute& attr)
+    {
+      this->set(dynamic_cast<const CAttributeTemplate<T>& >(attr)) ;
+    }
+
+   template <class T>
+    void CAttributeTemplate<T>::set(const CAttributeTemplate& attr)
+    {
+      CType<T>::set(attr) ;
+    }
+
+    template <class T>
+    void CAttributeTemplate<T>::setInheritedValue(const CAttribute& attr)
+    {
+      this->setInheritedValue(dynamic_cast<const CAttributeTemplate<T>& >(attr)) ;
+    }
+
+    template <class T>
+    void CAttributeTemplate<T>::setInheritedValue(const CAttributeTemplate& attr)
+    {
+      if (this->isEmpty() && _canInherite && attr.hasInheritedValue()) inheritedValue.set(attr.getInheritedValue()) ;
+    }
+
+    template <class T>
+    T CAttributeTemplate<T>::getInheritedValue(void) const
+    {
+      if (this->isEmpty()) return inheritedValue.get() ;
+      else return getValue() ;
+    }
+
+    template <class T>
+    bool CAttributeTemplate<T>::hasInheritedValue(void) const
+    {
+      return !this->isEmpty() || !inheritedValue.isEmpty() ;
+    }
+
+    template <class T>
+    bool CAttributeTemplate<T>::isEqual(const CAttribute& attr)
+    {
+      const CAttributeTemplate<T>& tmp = dynamic_cast<const CAttributeTemplate<T>& >(attr);
+      return this->isEqual_(tmp);
+    }
+
+    template <class T>
+    bool CAttributeTemplate<T>::isEqual_(const CAttributeTemplate& attr)
+    {
+      if ((!this->hasInheritedValue() && !attr.hasInheritedValue()))
+          return true;
+      if (this->hasInheritedValue() && attr.hasInheritedValue())
+          return (this->getInheritedValue() == attr.getInheritedValue());
+      else 
+        return false;
+    }
+
+      //---------------------------------------------------------------
+
+      template <class T>
+         CAttributeTemplate<T>& CAttributeTemplate<T>::operator=(const T & value)
+      {
+         this->setValue(value);
+//         return (this->getValue());
+         return *this;
+      }
+
+      //---------------------------------------------------------------
+
+      template <class T>
+         StdString CAttributeTemplate<T>::_toString(void) const
+      {
+         StdOStringStream oss;
+         if (!CType<T>::isEmpty() && this->hasId())
+            oss << this->getName() << "=\"" << CType<T>::toString() << "\"";
+         return (oss.str());
+      }
+
+      template <class T>
+         void CAttributeTemplate<T>::_fromString(const StdString & str)
+      {
+        CType<T>::fromString(str) ;
+      }
+
+      //---------------------------------------------------------------
+
+      template <class T>
+         StdString CAttributeTemplate<T>::_dump(void) const
+      {
+         StdOStringStream oss;
+         if (!CType<T>::isEmpty() && this->hasId())
+            oss << this->getName() << "=\"" << CType<T>::dump() << "\"";
+         return (oss.str());
+      }
+
+
+      //---------------------------------------------------------------
+/*
+      template <class T>
+         void CAttributeTemplate<T>::toBinary (StdOStream & os) const
+      {
+         this->getValue()->toBinary(os);
+      }
+
+      template <class T>
+         void CAttributeTemplate<T>::fromBinary(StdIStream & is)
+      {
+         T value;
+         FromBinary(is, value);
+         this->setValue(value);
+      }
+*/
+      template <class T>
+         bool CAttributeTemplate<T>::_toBuffer (CBufferOut& buffer) const
+      {
+         return CType<T>::toBuffer(buffer) ;
+/*
+         if (isEmpty()) return buffer.put(true) ;
+         else
+         {
+           bool ret=true ;
+           CType<T> val(*boost::any_cast<T>(&value)) ;
+           ret&=buffer.put(false) ;
+           ret&=val.toBuffer(buffer) ;
+           return ret ;
+         }
+*/
+      }
+
+      template <class T>
+      bool CAttributeTemplate<T>::_fromBuffer(CBufferIn& buffer)
+      {
+        return CType<T>::fromBuffer(buffer) ;
+/*
+        bool empty ;
+        bool ret=true ;
+        ret&=buffer.get(empty) ;
+        if (empty)
+        {
+          clear() ;
+          return ret ;
+        }
+        else
+        {
+          if (isEmpty())
+          {
+            T val ;
+            setValue(val) ;
+          }
+          T* V=const_cast<T*>(boost::any_cast<T>(&value)) ;
+          CType<T> val(*V) ;
+          return val.fromBuffer(buffer) ;
+        }
+*/
+      }
+/*
+      template <class T>
+      size_t CAttributeTemplate<T>::size(void) const
+      {
+        return CType<T>::size() ;*/
+/*
+        if (isEmpty()) return sizeof(bool) ;
+        else
+        {
+          CType<T> val(*const_cast<T*>(boost::any_cast<T>(&value))) ;
+          return val.size()+sizeof(bool) ;
+        }
+*/
+ /*     }*/
+
+      template <typename T>
+      void CAttributeTemplate<T>::generateCInterface(ostream& oss,const string& className)
+      {
+        CInterface::AttributeCInterface<T>(oss, className, this->getName());
+      }
+
+      template <typename T>
+      void CAttributeTemplate<T>::generateFortran2003Interface(ostream& oss,const string& className)
+      {
+        CInterface::AttributeFortran2003Interface<T>(oss, className, this->getName());
+      }
+
+      template <typename T>
+      void CAttributeTemplate<T>::generateFortranInterfaceDeclaration_(ostream& oss,const string& className)
+      {
+        CInterface::AttributeFortranInterfaceDeclaration<T>(oss, className, this->getName() + "_");
+      }
+
+      template <typename T>
+      void CAttributeTemplate<T>::generateFortranInterfaceBody_(ostream& oss,const string& className)
+      {
+        CInterface::AttributeFortranInterfaceBody<T>(oss, className, this->getName());
+      }
+
+      template <typename T>
+      void CAttributeTemplate<T>::generateFortranInterfaceDeclaration(ostream& oss,const string& className)
+      {
+        CInterface::AttributeFortranInterfaceDeclaration<T>(oss, className, this->getName());
+      }
+
+      template <typename T>
+      void CAttributeTemplate<T>::generateFortranInterfaceGetDeclaration_(ostream& oss,const string& className)
+      {
+        CInterface::AttributeFortranInterfaceGetDeclaration<T>(oss, className, this->getName() + "_");
+      }
+
+
+      template <typename T>
+      void CAttributeTemplate<T>::generateFortranInterfaceGetBody_(ostream& oss,const string& className)
+      {
+        CInterface::AttributeFortranInterfaceGetBody<T>(oss, className, this->getName());
+      }
+
+      template <typename T>
+      void CAttributeTemplate<T>::generateFortranInterfaceGetDeclaration(ostream& oss,const string& className)
+      {
+        CInterface::AttributeFortranInterfaceGetDeclaration<T>(oss, className, this->getName());
+      }
+
+
+/*
+      //---------------------------------------------------------------
+
+      // SpÃ©cialisations des templates pour la fonction [toString]
+
+      template <>
+         StdString CAttributeTemplate<bool>::toString(void) const;
+
+      //---------------------------------------------------------------
+
+      // SpÃ©cialisations des templates pour la fonction [fromString]
+
+      template <> // ChaÃ®ne de caractÃšres.
+         void CAttributeTemplate<StdString>::fromString(const StdString & str);
+
+      template <> // Entier
+         void CAttributeTemplate<int>::fromString(const StdString & str);
+
+      template <> // BoolÃ©en
+         void CAttributeTemplate<bool>::fromString(const StdString & str);
+
+      template <> // Double
+         void CAttributeTemplate<double>::fromString(const StdString & str);
+
+      template<> // Tableau
+         void CAttributeTemplate<ARRAY(double, 1)>::fromString(const StdString & str);
+
+      //---------------------------------------------------------------
+
+      // SpÃ©cialisations des templates pour la fonction [toBinary] //
+
+      template <> // ChaÃ®ne de caractÃšres.
+         void CAttributeTemplate<StdString>::toBinary (StdOStream & os) const;
+
+      template <> // Entier
+         void CAttributeTemplate<int>::toBinary(StdOStream & os) const;
+
+      template <> // BoolÃ©en
+         void CAttributeTemplate<bool>::toBinary(StdOStream & os) const;
+
+      template <> // Double
+         void CAttributeTemplate<double>::toBinary(StdOStream & os) const;
+
+      //---------------------------------------------------------------
+
+      // SpÃ©cialisations des templates pour la fonction [fromBinary] //
+
+      template <> // ChaÃ®ne de caractÃšres.
+         void CAttributeTemplate<StdString>::fromBinary(StdIStream & is);
+
+      template <> // Entier
+         void CAttributeTemplate<int>::fromBinary(StdIStream & is);
+
+      template <> // BoolÃ©en
+         void CAttributeTemplate<bool>::fromBinary(StdIStream & is);
+
+      template <> // Double
+         void CAttributeTemplate<double>::fromBinary(StdIStream & is);
+
+      ///--------------------------------------------------------------
+*/
+} // namespace xios
+
+#endif // __XIOS_CAttributeTemplate_impl__
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/attribute_template_specialisation.hpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/attribute_template_specialisation.hpp	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/attribute_template_specialisation.hpp	(revision 1749)
@@ -0,0 +1,217 @@
+#include "attribute_template.hpp"
+#include "attribute_template_impl.hpp"
+
+#include <cfloat>
+
+namespace xios
+{
+/*
+      /// ////////////////////// DÃ©finitions ////////////////////// ///
+
+      /// SpÃ©cialisations des templates pour la fonction [toString] ///
+      
+      template <>
+         StdString CAttributeTemplate<bool>::toString(void) const
+      {
+         StdOStringStream oss;
+         if (!this->isEmpty() && this->hasId())
+         {
+            if (this->getValue())
+               oss << this->getName() << "=\".TRUE.\"";
+            else
+               oss << this->getName() << "=\".FALSE.\"";
+         }
+         return (oss.str());
+      }
+
+      //---------------------------------------------------------------
+
+      /// SpÃ©cialisations des templates pour la fonction [fromString] ///
+
+      template <> // ChaÃ®ne de caractÃšres.
+         void CAttributeTemplate<StdString>::fromString(const StdString & str)
+      { 
+         this->setValue(str); 
+      }
+
+      template <> // Entier
+         void CAttributeTemplate<int>::fromString(const StdString & str)
+      {
+         try
+         {
+            this->setValue(boost::lexical_cast<int>(str));
+         }
+         catch(boost::bad_lexical_cast &)
+         {
+            ERROR("void CAttributeTemplate<int>::fromString(const StdString & str)",
+                  << "[ str = " << str << " ] Bad cast !");
+         }
+      }
+
+      template <> // Double
+         void CAttributeTemplate<double>::fromString(const StdString & str)
+      {
+         if (str.find("max") != StdString::npos)
+         {
+            this->setValue(DBL_MAX);
+            return;
+         }
+         if (str.find("min") != StdString::npos)
+         {
+            this->setValue(DBL_MIN);
+            return;
+         }
+         
+         try
+         {
+            this->setValue(boost::lexical_cast<double>(str));
+         }
+         catch(boost::bad_lexical_cast &)
+         {
+            ERROR("void CAttributeTemplate<double>::fromString(const StdString & str)",
+                  << "[ str = " << str << " ] Bad cast !");
+         }
+      }
+
+      template <> // BoolÃ©en
+         void CAttributeTemplate<bool>::fromString(const StdString & str)
+      {
+         if (str.find(".TRUE.") != StdString::npos)
+            this->setValue(true);
+         else
+            this->setValue(false);
+      }
+
+      //---------------------------------------------------------------
+
+      template<> // Tableau
+         void CAttributeTemplate<ARRAY(double, 1)>::fromString(const StdString & str)
+      {
+         ARRAY_CREATE(array_sptr, double, 1, [1]);
+         CArray<double, 1> & array = *array_sptr;
+         this->setValue(array_sptr);
+
+         StdIStringStream iss(str) ;
+         char c = '\0'; int size = 0;
+         double d = 0.,valsup = 0., valinf = 0.;
+         std::vector<double> vect;
+
+         iss >> d; vect.push_back(d);
+         size = vect.size();
+         if (!iss.eof ())
+         {
+            iss >> c;
+            switch (c)
+            {
+               case ',' : // Le tableau est gÃ©nÃ©rÃ© valeur par valeur.
+                  iss.unget();
+                  while(!iss.eof ())
+                  { // On rÃ©cupÃšre chacune des valeurs une par une jusqu'Ã  ce que le buffer soit vide.
+                     iss >> c >> d;
+                     if (c != ',')
+                        ERROR("CAttributeTemplate<ARRAY(...)>::fromString(const StdString & str)",
+                              << "[ str = " << str << " ] bad definition of array !");
+                     vect.push_back(d);
+                  }
+                  size = vect.size();
+                  break;
+               case '(' : // Le tableau est gÃ©nÃ©rÃ© automatiquement.
+                  if (!iss.eof ())
+                  { // on rÃ©cupÃšre la borne supÃ©rieure
+                     valinf = d;
+                     iss >> size >> c >> d;
+                     if ((c != ')') || (size <= 0))
+                        ERROR("CAttributeTemplate<ARRAY(...)>::fromString(const StdString & str)",
+                              << "[ str = " << str << " ] bad definition of array !");
+                     valsup = d;
+                  }
+                  d = (valsup - valinf) / (double)(size - 1);
+                  for (int j = 1; j <= size; j++)
+                     vect.push_back(valinf + j * d);
+                  break;
+               default :
+                  ERROR("CAttributeTemplate<ARRAY(...)>::fromString(const StdString & str)",
+                        << "[ str = " << str << " ] bad definition of array !");
+            }
+         }
+
+         array.resize(boost::extents[size]);
+         for (int i = 0; i < size; i++)
+            array[i] = vect[i]; 
+
+      }
+
+      //---------------------------------------------------------------
+
+      /// SpÃ©cialisations des templates pour la fonction [toBinary] ///
+
+      template <> // ChaÃ®ne de caractÃšres.
+         void CAttributeTemplate<StdString>::toBinary (StdOStream & os) const
+      {
+         StdString str = this->getValue();
+         StdSize size = str.size();
+         os.write (reinterpret_cast<const char*>(&size) , sizeof(StdSize));
+         os.write (str.data(), size * sizeof(char));
+      }
+
+      template <> // Entier
+         void CAttributeTemplate<int>::toBinary(StdOStream & os) const
+      {
+         int value = this->getValue();
+         os.write (reinterpret_cast<const char*>(&value) , sizeof(int));
+      }
+
+      template <> // BoolÃ©en
+         void CAttributeTemplate<bool>::toBinary(StdOStream & os) const
+      {
+         bool value = this->getValue();
+         os.write (reinterpret_cast<const char*>(&value) , sizeof(bool));
+      }
+
+      template <> // Double
+         void CAttributeTemplate<double>::toBinary(StdOStream & os) const
+      {
+         double value = this->getValue();
+         os.write (reinterpret_cast<const char*>(&value) , sizeof(double));
+      }
+
+      //---------------------------------------------------------------
+
+      /// SpÃ©cialisations des templates pour la fonction [fromBinary] ///
+
+      template <> // ChaÃ®ne de caractÃšres.
+         void CAttributeTemplate<StdString>::fromBinary(StdIStream & is)
+      {
+         StdSize size = 0;
+         is.read (reinterpret_cast<char*>(&size), sizeof(StdSize));
+         StdString value(size, ' ');
+         is.read (const_cast<char *>(value.data()), size * sizeof(char));
+         this->setValue(value);
+      }
+
+      template <> // Entier
+         void CAttributeTemplate<int>::fromBinary(StdIStream & is)
+      {
+         int value = 0;
+         is.read (reinterpret_cast<char*>(&value), sizeof(int));
+         this->setValue(value);
+      }
+
+      template <> // BoolÃ©en
+         void CAttributeTemplate<bool>::fromBinary(StdIStream & is)
+      {
+         bool value = false;
+         is.read (reinterpret_cast<char*>(&value), sizeof(bool));
+         this->setValue(value);
+      }
+
+      template <> // Double
+         void CAttributeTemplate<double>::fromBinary(StdIStream & is)
+      {
+         double value = 0.;
+         is.read (reinterpret_cast<char*>(&value), sizeof(double));
+         this->setValue(value);
+      }
+      ///--------------------------------------------------------------
+*/
+} // namespace xios
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/buffer.cpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/buffer.cpp	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/buffer.cpp	(revision 1749)
@@ -0,0 +1,49 @@
+#include "xios_spl.hpp"
+#include "buffer.hpp"
+
+
+namespace xios
+{
+    CBuffer::CBuffer(void* buffer_,size_t size_)
+    {
+      own=false ;
+      realloc(buffer_,size_) ;
+    }
+    
+    CBuffer::CBuffer(size_t size_)
+    {
+      own=false ;
+      realloc(size_) ;
+    }
+
+    void CBuffer::realloc(size_t size_)
+    {
+      realloc(new char[size_],size_) ;
+      own=true ;
+    }
+
+    void CBuffer::realloc(void* buffer_,size_t size_)
+    {
+      if (own) delete [] buffer ;
+      buffer=(char*)buffer_ ;
+      size=size_ ;
+      count=0 ;
+      read=buffer ;
+      write=buffer ;
+      own=false ;
+    }
+
+    size_t CBuffer::remain(void)
+    {
+      return size-count ;
+    }    
+    
+    CBuffer::~CBuffer()
+    {
+      if (own) delete [] buffer ;
+    }
+    
+}
+    
+      
+    
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/buffer.hpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/buffer.hpp	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/buffer.hpp	(revision 1749)
@@ -0,0 +1,78 @@
+#ifndef __BUFFER_HPP__
+#define __BUFFER_HPP__
+
+
+#include "xios_spl.hpp"
+
+namespace xios
+{
+  
+    class CBuffer
+    {
+    
+      public:
+      
+      CBuffer(size_t size) ;
+      CBuffer(void* buffer,size_t size) ;
+
+      void realloc(size_t size) ;
+      void realloc(void* buffer,size_t size) ;
+      
+      template<class T>
+      bool put(const T& data) ;
+
+      template<class T>
+      bool put(const T* data, size_t n) ;
+
+      template<class T>
+      bool put_ptr(const T*& data_ptr, size_t n) ;
+      
+      template<class T>
+      bool get(T& data) ;
+
+      template<class T>
+      bool get(T* data, size_t n) ;
+
+      template<class T>
+      bool get_ptr(T*& data, size_t n) ;
+
+      
+ 
+      template<class T>
+      bool put_template(const T& data) ;
+
+      template<class T>
+      bool put_template(const T* data, size_t n) ;
+
+      template<class T>
+      bool put_ptr_template(const T*& data, size_t n) ;
+      
+      template<class T>
+      bool get_template(T& data) ;
+
+      template<class T>
+      bool get_template(T* data, size_t n) ;
+
+      template<class T>
+      bool get_ptr_template(T*& data, size_t n) ;
+      
+      size_t remain(void) ;
+                            
+      ~CBuffer() ;
+       char* buffer ;
+       char* read ;
+       char* write ;
+       size_t count ;
+       bool own ; 
+       size_t size ;   
+    } ;
+    
+    
+  
+ 
+}
+
+//#include "buffer_impl.hpp" 
+
+
+#endif
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/buffer_client.cpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/buffer_client.cpp	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/buffer_client.cpp	(revision 1749)
@@ -0,0 +1,116 @@
+#include "xios_spl.hpp"
+#include "exception.hpp"
+#include "log.hpp"
+#include "buffer_out.hpp"
+#include "buffer_client.hpp"
+#include "cxios.hpp"
+#include "mpi.hpp"
+#include "tracer.hpp"
+
+namespace xios
+{
+  size_t CClientBuffer::maxRequestSize = 0;
+
+  CClientBuffer::CClientBuffer(MPI_Comm interComm, int serverRank, StdSize bufferSize, StdSize estimatedMaxEventSize, StdSize maxBufferedEvents)
+    : interComm(interComm)
+    , serverRank(serverRank)
+    , bufferSize(bufferSize)
+    , estimatedMaxEventSize(estimatedMaxEventSize)
+    , maxEventSize(0)
+    , current(0)
+    , count(0)
+    , bufferedEvents(0)
+    , maxBufferedEvents(maxBufferedEvents)
+    , pending(false)
+  {
+    buffer[0] = new char[bufferSize]; // transform it with MPI_ALLOC_MEM later
+    buffer[1] = new char[bufferSize];
+    retBuffer = new CBufferOut(buffer[current], bufferSize);
+    info(10) << "CClientBuffer: allocated 2 x " << bufferSize << " bytes for server " << serverRank << " with a maximum of " << maxBufferedEvents << " buffered events" << endl;
+  }
+
+  CClientBuffer::~CClientBuffer()
+  {
+   delete [] buffer[0];
+   delete [] buffer[1];
+   delete retBuffer;
+  }
+
+  StdSize CClientBuffer::remain(void)
+  {
+    return bufferSize - count;
+  }
+
+  bool CClientBuffer::isBufferFree(StdSize size)
+  {
+    if (size > bufferSize)
+      ERROR("bool CClientBuffer::isBufferFree(StdSize size)",
+            << "The requested size (" << size << " bytes) is too big to fit the buffer (" << bufferSize << " bytes), please increase the client buffer size." << endl);
+
+    if (size > maxEventSize)
+    {
+      maxEventSize = size;
+
+      if (size > estimatedMaxEventSize)
+        error(0) << "WARNING: Unexpected event of size " << size << " for server " << serverRank
+                 << " (estimated max event size = " << estimatedMaxEventSize << ")" << std::endl;
+
+      if (size > maxRequestSize) maxRequestSize = size;
+    }
+
+
+    return (size <= remain() && bufferedEvents < maxBufferedEvents);
+  }
+
+
+  CBufferOut* CClientBuffer::getBuffer(StdSize size)
+  {
+    if (size <= remain())
+    {
+      retBuffer->realloc(buffer[current] + count, size);
+      count += size;
+      bufferedEvents++;
+      return retBuffer;
+    }
+    else
+    {
+      ERROR("CBufferOut* CClientBuffer::getBuffer(StdSize size)",
+            << "Not enough space in buffer, this should not have happened...");
+      return NULL;
+    }
+  }
+
+  bool CClientBuffer::checkBuffer(void)
+  {
+    MPI_Status status;
+    int flag;
+
+    if (pending)
+    {
+      traceOff();
+      MPI_Test(&request, &flag, &status);
+      traceOn();
+      if (flag == true) pending = false;
+    }
+
+    if (!pending)
+    {
+      if (count > 0)
+      {
+        MPI_Issend(buffer[current], count, MPI_CHAR, serverRank, 20, interComm, &request);
+        pending = true;
+        if (current == 1) current = 0;
+        else current = 1;
+        count = 0;
+        bufferedEvents = 0;
+      }
+    }
+
+    return pending;
+  }
+
+  bool CClientBuffer::hasPendingRequest(void)
+  {
+    return (pending || count > 0);
+  }
+}
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/buffer_client.hpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/buffer_client.hpp	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/buffer_client.hpp	(revision 1749)
@@ -0,0 +1,47 @@
+#ifndef __BUFFER_CLIENT_HPP__
+#define __BUFFER_CLIENT_HPP__
+
+#include "xios_spl.hpp"
+#include "buffer_out.hpp"
+#include "mpi.hpp"
+#include "cxios.hpp"
+
+namespace xios
+{
+  class CClientBuffer
+  {
+    public:
+      static size_t maxRequestSize;
+
+      CClientBuffer(MPI_Comm intercomm, int serverRank, StdSize bufferSize, StdSize estimatedMaxEventSize, StdSize maxBufferedEvents);
+      ~CClientBuffer();
+
+      bool isBufferFree(StdSize size);
+      CBufferOut* getBuffer(StdSize size);
+      bool checkBuffer(void);
+      bool hasPendingRequest(void);
+      StdSize remain(void);
+
+    private:
+      char* buffer[2];
+
+      int current;
+
+      StdSize count;
+      StdSize bufferedEvents;
+      StdSize maxEventSize;
+      const StdSize maxBufferedEvents;
+      const StdSize bufferSize;
+      const StdSize estimatedMaxEventSize;
+
+
+      const int serverRank;
+      bool pending;
+
+      MPI_Request request;
+
+      CBufferOut* retBuffer;
+      const MPI_Comm interComm;
+  };
+}
+#endif
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/buffer_decl.cpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/buffer_decl.cpp	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/buffer_decl.cpp	(revision 1749)
@@ -0,0 +1,25 @@
+#include "buffer.hpp"
+#include "buffer_impl.hpp"
+
+namespace xios
+{
+#  define macro(T) \
+    template bool CBuffer::put_template<T>(const T& data) ; \
+    template bool CBuffer::put_template<T>(const T* data, size_t n) ; \
+    template bool CBuffer::put_ptr_template<T>(const T*& data, size_t n) ; \
+    template bool CBuffer::get_template<T>(T& data) ; \
+    template bool CBuffer::get_template<T>(T* data, size_t n) ; \
+    template bool CBuffer::get_ptr_template<T>(T*& data, size_t n) ;
+  
+  
+  macro(char)
+  macro(int)
+  macro(short)
+  macro(long)
+  macro(uint)
+  macro(ushort)
+  macro(ulong)
+  macro(float)
+  macro(double)
+  macro(long double)
+}
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/buffer_impl.hpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/buffer_impl.hpp	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/buffer_impl.hpp	(revision 1749)
@@ -0,0 +1,175 @@
+#ifndef __BUFFER_IMPL_HPP__
+#define __BUFFER_IMPL_HPP__
+
+namespace xios
+{
+
+// template spectialisation : CBuffer::put
+    template <> bool CBuffer::put<char>(const char& data) { return put_template(data) ; }  
+    template <> bool CBuffer::put<int>(const int& data)   { return put_template(data) ; }
+    template <> bool CBuffer::put<short>(const short& data) { return put_template(data) ; }  
+    template <> bool CBuffer::put<long>(const long& data)  { return put_template(data) ; }  
+    template <> bool CBuffer::put<uint>(const uint& data)  { return put_template(data) ; }  
+    template <> bool CBuffer::put<ushort>(const ushort& data) { return put_template(data) ; }  
+    template <> bool CBuffer::put<ulong>(const ulong& data) { return put_template(data) ; }  
+    template <> bool CBuffer::put<float>(const float& data) { return put_template(data) ; }  
+    template <> bool CBuffer::put<double>(const double& data) { return put_template(data) ; }  
+    template <> bool CBuffer::put<long double>(const long double& data) { return put_template(data) ;}  
+
+    template <> bool CBuffer::put<char>(const char* data, size_t n) { return put_template(data,n) ; }  
+    template <> bool CBuffer::put<int>(const int* data, size_t n)   { return put_template(data,n) ; }
+    template <> bool CBuffer::put<short>(const short* data, size_t n) { return put_template(data,n) ; }  
+    template <> bool CBuffer::put<long>(const long* data, size_t n)  { return put_template(data,n) ; }  
+    template <> bool CBuffer::put<uint>(const uint* data, size_t n)  { return put_template(data,n) ; }  
+    template <> bool CBuffer::put<ushort>(const ushort* data, size_t n) { return put_template(data,n) ; }  
+    template <> bool CBuffer::put<ulong>(const ulong* data, size_t n) { return put_template(data,n) ; }  
+    template <> bool CBuffer::put<float>(const float* data, size_t n) { return put_template(data,n) ; }  
+    template <> bool CBuffer::put<double>(const double* data, size_t n) { return put_template(data,n) ; }  
+    template <> bool CBuffer::put<long double>(const long double* data, size_t n) { return put_template(data,n) ;}  
+
+
+    template <> bool CBuffer::put_ptr<char>(const char*& data, size_t n) { return put_ptr_template(data,n) ; }  
+    template <> bool CBuffer::put_ptr<int>(const int*& data, size_t n)   { return put_ptr_template(data,n) ; }
+    template <> bool CBuffer::put_ptr<short>(const short*& data, size_t n) { return put_ptr_template(data,n) ; }  
+    template <> bool CBuffer::put_ptr<long>(const long*& data, size_t n)  { return put_ptr_template(data,n) ; }  
+    template <> bool CBuffer::put_ptr<uint>(const uint*& data, size_t n)  { return put_ptr_template(data,n) ; }  
+    template <> bool CBuffer::put_ptr<ushort>(const ushort*& data, size_t n) { return put_ptr_template(data,n) ; }  
+    template <> bool CBuffer::put_ptr<ulong>(const ulong*& data, size_t n) { return put_ptr_template(data,n) ; }  
+    template <> bool CBuffer::put_ptr<float>(const float*& data, size_t n) { return put_ptr_template(data,n) ; }  
+    template <> bool CBuffer::put_ptr<double>(const double*& data, size_t n) { return put_ptr_template(data,n) ; }  
+    template <> bool CBuffer::put_ptr<long double>(const long double*& data, size_t n) { return put_ptr_template(data,n) ;}  
+
+
+// template spectialisation : CBuffer::get
+    template <> bool CBuffer::get<char>(char& data) { return get_template(data) ; }  
+    template <> bool CBuffer::get<int>(int& data)   { return get_template(data) ; }
+    template <> bool CBuffer::get<short>(short& data) { return get_template(data) ; }  
+    template <> bool CBuffer::get<long>(long& data)  { return get_template(data) ; }  
+    template <> bool CBuffer::get<uint>(uint& data)  { return get_template(data) ; }  
+    template <> bool CBuffer::get<ushort>(ushort& data) { return get_template(data) ; }  
+    template <> bool CBuffer::get<ulong>(ulong& data) { return get_template(data) ; }  
+    template <> bool CBuffer::get<float>(float& data) { return get_template(data) ; }  
+    template <> bool CBuffer::get<double>(double& data) { return get_template(data) ; }  
+    template <> bool CBuffer::get<long double>(long double& data) { return get_template(data) ;}  
+
+    template <> bool CBuffer::get<char>(char* data, size_t n) { return get_template(data,n) ; }  
+    template <> bool CBuffer::get<int>(int* data, size_t n)   { return get_template(data,n) ; }
+    template <> bool CBuffer::get<short>(short* data, size_t n) { return get_template(data,n) ; }  
+    template <> bool CBuffer::get<long>(long* data, size_t n)  { return get_template(data,n) ; }  
+    template <> bool CBuffer::get<uint>(uint* data, size_t n)  { return get_template(data,n) ; }  
+    template <> bool CBuffer::get<ushort>(ushort* data, size_t n) { return get_template(data,n) ; }  
+    template <> bool CBuffer::get<ulong>(ulong* data, size_t n) { return get_template(data,n) ; }  
+    template <> bool CBuffer::get<float>(float* data, size_t n) { return get_template(data,n) ; }  
+    template <> bool CBuffer::get<double>(double* data, size_t n) { return get_template(data,n) ; }  
+    template <> bool CBuffer::get<long double>(long double* data, size_t n) { return get_template(data,n) ;}  
+
+    template <> bool CBuffer::get_ptr<char>(char*& data, size_t n) { return get_ptr_template(data,n) ; }  
+    template <> bool CBuffer::get_ptr<int>(int*& data, size_t n)   { return get_ptr_template(data,n) ; }
+    template <> bool CBuffer::get_ptr<short>(short*& data, size_t n) { return get_ptr_template(data,n) ; }  
+    template <> bool CBuffer::get_ptr<long>(long*& data, size_t n)  { return get_ptr_template(data,n) ; }  
+    template <> bool CBuffer::get_ptr<uint>(uint*& data, size_t n)  { return get_ptr_template(data,n) ; }  
+    template <> bool CBuffer::get_ptr<ushort>(ushort*& data, size_t n) { return get_ptr_template(data,n) ; }  
+    template <> bool CBuffer::get_ptr<ulong>(ulong*& data, size_t n) { return get_ptr_template(data,n) ; }  
+    template <> bool CBuffer::get_ptr<float>(float*& data, size_t n) { return get_ptr_template(data,n) ; }  
+    template <> bool CBuffer::get_ptr<double>(double*& data, size_t n) { return get_ptr_template(data,n) ; }  
+    template <> bool CBuffer::get_ptr<long double>(long double*& data, size_t n) { return get_ptr_template(data,n) ;}  
+    
+    
+    template <class T>
+    bool CBuffer::put_template(const T& data)
+    {
+      return put_template<T>(&data,1);
+    }
+    
+    template <class T>
+    bool CBuffer::put_template(const T* data, size_t n)
+    {
+      bool ret;
+      char* dataBuff ;
+  
+      size_t dataSize=sizeof(T)*n ;
+  
+      if (count+dataSize<=size)
+      {
+        dataBuff=(char*) data ;
+        for(size_t i=0;i<dataSize;i++) write[i]=dataBuff[i] ;
+        write+=dataSize ;
+        count+=dataSize;
+        ret=true ;
+      }
+      else ret=false ;
+  
+      return ret ;
+    }
+
+    template <class T>
+    bool CBuffer::put_ptr_template(const T*& data, size_t n)
+    {
+      bool ret;
+      char* dataBuff ;
+  
+      size_t dataSize=sizeof(T)*n ;
+  
+      if (count+dataSize<=size)
+      {
+        data=(T*) write ;
+        write+=dataSize ;
+        count+=dataSize;
+        ret=true ;
+      }
+      else ret=false ;
+  
+      return ret ;
+    }
+
+
+    template <class T>
+    bool CBuffer::get_template(T& data)
+    {
+      return get_template<T>(&data,1) ;
+      
+    }
+        
+    template <class T>
+    bool CBuffer::get_template(T* data, size_t n)
+    {
+      bool ret;
+      char* dataBuff ;
+  
+      size_t dataSize=sizeof(T)*n ;
+  
+      if (read+dataSize<=buffer+size)
+      {
+        dataBuff=(char*) data ;
+        for(size_t i=0;i<dataSize;i++) dataBuff[i]=read[i] ;
+        read+=dataSize ;
+        ret=true ;
+      }
+      else ret=false ;
+  
+      return ret ;
+    }
+
+    template <class T>
+    bool CBuffer::get_ptr_template(T*& data, size_t n)
+    {
+      bool ret;
+      char* dataBuff ;
+  
+      size_t dataSize=sizeof(T)*n ;
+  
+      if (read+dataSize<=buffer+size)
+      {
+        data=(T*) read ;
+        read+=dataSize ;
+        ret=true ;
+      }
+      else ret=false ;
+  
+      return ret ;
+    }    
+
+}
+  
+
+#endif
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/buffer_in.cpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/buffer_in.cpp	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/buffer_in.cpp	(revision 1749)
@@ -0,0 +1,71 @@
+#include "xios_spl.hpp"
+#include "buffer_in.hpp"
+
+
+namespace xios
+{
+    CBufferIn::CBufferIn(void* buffer,size_t size)
+    {
+      own=false ;
+      size_=0 ;
+      this->realloc(buffer,size) ;
+    }
+    
+    CBufferIn::CBufferIn(size_t size)
+    {
+      own=false ;
+      size_=0 ;
+      realloc(size) ;
+    }
+
+    CBufferIn::CBufferIn(void)
+    {
+      own=false ;
+      size_=0 ;
+    }
+
+    void CBufferIn::realloc(size_t size)
+    {
+      this->realloc(new char[size],size) ;
+      own=true ;
+    }
+
+    void CBufferIn::realloc(void* buffer,size_t size)
+    {
+      if (own) delete [] begin ;
+      begin=(char*)buffer ;
+      size_=size ;
+      current=begin ;
+      end=begin+size_ ;
+      count_=0 ;
+      own=false ;
+    }
+
+    bool CBufferIn::advance(size_t n) { return advance<char>(n); }
+
+    size_t CBufferIn::remain(void)
+    {
+      return size_-count_ ;
+    }    
+
+    size_t CBufferIn::count(void)
+    {
+      return count_ ;
+    }
+
+    size_t CBufferIn::bufferSize(void)
+    {
+      return size_ ;
+    }
+    
+    CBufferIn::~CBufferIn()
+    {
+      if (own) delete [] begin ;
+    }
+
+    void* CBufferIn::ptr(void) { return current; }
+    
+}
+    
+      
+    
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/buffer_in.hpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/buffer_in.hpp	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/buffer_in.hpp	(revision 1749)
@@ -0,0 +1,66 @@
+#ifndef __BUFFER_IN_HPP__
+#define __BUFFER_IN_HPP__
+
+
+#include "xios_spl.hpp"
+
+namespace xios
+{
+  
+    class CBufferIn
+    {
+    
+      public:
+      
+      CBufferIn(size_t size) ;
+      CBufferIn(void) ;
+      CBufferIn(void* buffer,size_t size) ;
+
+      void realloc(size_t size) ;
+      void realloc(void* buffer,size_t size) ;
+      
+
+      template<class T>
+      bool advance(size_t n) ;
+
+      bool advance(size_t n) ;
+      
+      template<class T>
+      bool get(T& data) ;
+
+      template<class T>
+      bool get(T* data, size_t n) ;
+
+      template<class T>
+      bool advance_template(size_t n) ;
+      
+      template<class T>
+      bool get_template(T& data) ;
+
+      template<class T>
+      bool get_template(T* data, size_t n) ;
+
+      void* ptr(void) ;
+      void* start(void) {return begin ; }
+      
+      
+      size_t remain(void) ;
+      size_t count(void) ;                          
+//      size_t size(void) ;
+      size_t bufferSize() ;                       
+      ~CBufferIn() ;
+
+       char* begin ;
+       char* end ;
+       char* current ;
+       size_t count_ ;
+       size_t size_ ;   
+       bool own ; 
+    } ;
+  
+}
+
+//#include "buffer_in_impl.hpp" 
+
+
+#endif
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/buffer_in_decl.cpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/buffer_in_decl.cpp	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/buffer_in_decl.cpp	(revision 1749)
@@ -0,0 +1,23 @@
+#include "buffer_in.hpp"
+#include "buffer_in_impl.hpp"
+
+namespace xios
+{
+# define macro(T) \
+  template bool CBufferIn::get_template<T>(T& data); \
+  template bool CBufferIn::get_template<T>(T* data, size_t n); \
+  template bool CBufferIn::advance_template<T>(size_t n);
+ 
+
+  macro(char)
+  macro(int)
+  macro(short)
+  macro(long)
+  macro(uint)
+  macro(ushort)
+  macro(ulong)
+  macro(float)
+  macro(double)
+  macro(long double)
+}
+
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/buffer_in_impl.hpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/buffer_in_impl.hpp	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/buffer_in_impl.hpp	(revision 1749)
@@ -0,0 +1,94 @@
+#ifndef __BUFFER_IN_IMPL_HPP__
+#define __BUFFER_IN_IMPL_HPP__
+
+namespace xios
+{
+
+// template spectialisation : CBufferIn::get
+
+    template <> bool CBufferIn::get<char>(char& data) { return get_template(data) ; }  
+    template <> bool CBufferIn::get<bool>(bool& data) { return get_template(data) ; }  
+    template <> bool CBufferIn::get<int>(int& data)   { return get_template(data) ; }
+    template <> bool CBufferIn::get<short>(short& data) { return get_template(data) ; }  
+    template <> bool CBufferIn::get<long>(long& data)  { return get_template(data) ; }  
+    template <> bool CBufferIn::get<uint>(uint& data)  { return get_template(data) ; }  
+    template <> bool CBufferIn::get<ushort>(ushort& data) { return get_template(data) ; }  
+    template <> bool CBufferIn::get<ulong>(ulong& data) { return get_template(data) ; }  
+    template <> bool CBufferIn::get<float>(float& data) { return get_template(data) ; }  
+    template <> bool CBufferIn::get<double>(double& data) { return get_template(data) ; }  
+    template <> bool CBufferIn::get<long double>(long double& data) { return get_template(data) ;}  
+
+    template <> bool CBufferIn::get<char>(char* data, size_t n) { return get_template(data,n) ; }  
+    template <> bool CBufferIn::get<bool>(bool* data, size_t n) { return get_template(data,n) ; }  
+    template <> bool CBufferIn::get<int>(int* data, size_t n)   { return get_template(data,n) ; }
+    template <> bool CBufferIn::get<short>(short* data, size_t n) { return get_template(data,n) ; }  
+    template <> bool CBufferIn::get<long>(long* data, size_t n)  { return get_template(data,n) ; }  
+    template <> bool CBufferIn::get<uint>(uint* data, size_t n)  { return get_template(data,n) ; }  
+    template <> bool CBufferIn::get<ushort>(ushort* data, size_t n) { return get_template(data,n) ; }  
+    template <> bool CBufferIn::get<ulong>(ulong* data, size_t n) { return get_template(data,n) ; }  
+    template <> bool CBufferIn::get<float>(float* data, size_t n) { return get_template(data,n) ; }  
+    template <> bool CBufferIn::get<double>(double* data, size_t n) { return get_template(data,n) ; }  
+    template <> bool CBufferIn::get<long double>(long double* data, size_t n) { return get_template(data,n) ;}  
+
+    template <> bool CBufferIn::advance<char>(size_t n) { return advance_template<char>(n) ; }  
+    template <> bool CBufferIn::advance<bool>(size_t n) { return advance_template<bool>(n) ; }  
+    template <> bool CBufferIn::advance<int>(size_t n)   { return advance_template<int>(n) ; }
+    template <> bool CBufferIn::advance<short>(size_t n) { return advance_template<short>(n) ; }  
+    template <> bool CBufferIn::advance<long>(size_t n)  { return advance_template<long>(n) ; }  
+    template <> bool CBufferIn::advance<uint>(size_t n)  { return advance_template<uint>(n) ; }  
+    template <> bool CBufferIn::advance<ushort>(size_t n) { return advance_template<ushort>(n) ; }  
+    template <> bool CBufferIn::advance<ulong>(size_t n) { return advance_template<ulong>(n) ; }  
+    template <> bool CBufferIn::advance<float>(size_t n) { return advance_template<float>(n) ; }  
+    template <> bool CBufferIn::advance<double>(size_t n) { return advance_template<double>(n) ; }  
+    template <> bool CBufferIn::advance<long double>(size_t n) { return advance_template<long double>(n) ;}  
+
+    template <class T>
+    bool CBufferIn::get_template(T& data)
+    {
+      return get_template<T>(&data,1) ;
+    }
+        
+    template <class T>
+    bool CBufferIn::get_template(T* data, size_t n)
+    {
+      bool ret;
+      char* dataBuff ;
+  
+      size_t dataSize=sizeof(T)*n ;
+  
+      if (count_+dataSize<=size_)
+      {
+        dataBuff=(char*) data ;
+        for(size_t i=0;i<dataSize;i++) dataBuff[i]=current[i] ;
+        current+=dataSize ;
+        count_+=dataSize ;
+        ret=true ;
+      }
+      else ret=false ;
+  
+      return ret ;
+    }
+
+    template <class T>
+    bool CBufferIn::advance_template(size_t n)
+    {
+      bool ret;
+      char* dataBuff ;
+  
+      size_t dataSize=sizeof(T)*n ;
+  
+      if (count_+dataSize<=size_)
+      {
+        current+=dataSize ;
+        count_+=dataSize ;
+        ret=true ;
+      }
+      else ret=false ;
+  
+      return ret ;
+    }    
+
+}
+  
+
+#endif
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/buffer_out.cpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/buffer_out.cpp	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/buffer_out.cpp	(revision 1749)
@@ -0,0 +1,72 @@
+#include "xios_spl.hpp"
+#include "buffer_out.hpp"
+
+
+namespace xios
+{
+    CBufferOut::CBufferOut(void* buffer,size_t size)
+    {
+      own=false ;
+      realloc(buffer,size) ;
+    }
+    
+    CBufferOut::CBufferOut(void)
+    {
+      own=false ;
+      realloc(0,0) ;      
+    }
+
+    CBufferOut::CBufferOut(size_t size)
+    {
+      own=false ;
+      realloc(size) ;
+    }
+
+    void CBufferOut::realloc(size_t size)
+    {
+      realloc(new char[size],size) ;
+      own=true ;
+    }
+
+    void CBufferOut::realloc(void* buffer,size_t size)
+    {
+      if (own) delete [] begin ;
+      begin=(char*)buffer ;
+      size_=size ;
+      end=begin+size_ ;
+      count_=0 ;
+      current=begin ;
+      own=false ;
+    }
+
+    bool CBufferOut::advance(size_t n) { return advance<char>(n); }
+
+    void* CBufferOut::ptr(void)
+    {
+      return current ;
+    }
+    
+    size_t CBufferOut::remain(void)
+    {
+      return size_-count_ ;
+    }    
+
+    size_t CBufferOut::count(void)
+    {
+      return count_ ;
+    }
+
+    size_t CBufferOut::bufferSize(void)
+    {
+      return size_ ;
+    }
+        
+    CBufferOut::~CBufferOut()
+    {
+      if (own) delete [] begin ;
+    }
+ 
+}
+    
+      
+    
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/buffer_out.hpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/buffer_out.hpp	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/buffer_out.hpp	(revision 1749)
@@ -0,0 +1,67 @@
+#ifndef __BUFFER_OUT_HPP__
+#define __BUFFER_OUT_HPP__
+
+
+#include "xios_spl.hpp"
+
+namespace xios
+{
+  
+    class CBufferOut
+    {
+    
+      public:
+      
+      CBufferOut(size_t size) ;
+      CBufferOut(void) ;
+      CBufferOut(void* buffer,size_t size) ;
+
+      void realloc(size_t size) ;
+      void realloc(void* buffer,size_t size) ;
+      
+      template<class T>
+      bool put(const T& data) ;
+
+      template<class T>
+      bool put(const T* data, size_t n) ;
+
+    
+      template<class T>
+      bool advance(size_t n) ;
+
+      bool advance(size_t n) ;
+      
+       
+ 
+      template<class T>
+      bool put_template(const T& data) ;
+
+      template<class T>
+      bool put_template(const T* data, size_t n) ;
+
+      template<class T>
+      bool advance_template(size_t n) ;
+      
+      void* ptr(void) ;
+      void* start(void) {return begin ; }
+            
+      size_t remain(void) ;
+      size_t count(void) ;
+      size_t bufferSize(void) ;
+                            
+      ~CBufferOut() ;
+       char* begin ;
+       char* current ;
+       char* end;
+       size_t count_ ;
+       size_t size_ ;
+       bool own ; 
+    } ;
+    
+
+}
+
+//#include "buffer_out_impl.hpp" 
+
+
+#endif
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/buffer_out_decl.cpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/buffer_out_decl.cpp	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/buffer_out_decl.cpp	(revision 1749)
@@ -0,0 +1,23 @@
+#include "buffer_out.hpp"
+#include "buffer_out_impl.hpp"
+
+
+namespace xios
+{
+# define macro(T) \
+  template bool CBufferOut::put_template<T>(const T& data) ; \
+  template bool CBufferOut::put_template<T>(const T* data, size_t n) ; \
+  template bool CBufferOut::advance_template<T>(size_t n) ; \
+ 
+
+  macro(char)
+  macro(int)
+  macro(short)
+  macro(long)
+  macro(uint)
+  macro(ushort)
+  macro(ulong)
+  macro(float)
+  macro(double)
+  macro(long double)
+}
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/buffer_out_impl.hpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/buffer_out_impl.hpp	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/buffer_out_impl.hpp	(revision 1749)
@@ -0,0 +1,94 @@
+#ifndef __BUFFER_OUT_IMPL_HPP__
+#define __BUFFER_OUT_IMPL_HPP__
+
+namespace xios
+{
+
+// template spectialisation : CBufferIn::put
+    template <> bool CBufferOut::put<char>(const char& data) { return put_template(data) ; }  
+    template <> bool CBufferOut::put<bool>(const bool& data) { return put_template(data) ; }  
+    template <> bool CBufferOut::put<int>(const int& data)   { return put_template(data) ; }
+    template <> bool CBufferOut::put<short>(const short& data) { return put_template(data) ; }  
+    template <> bool CBufferOut::put<long>(const long& data)  { return put_template(data) ; }  
+    template <> bool CBufferOut::put<uint>(const uint& data)  { return put_template(data) ; }  
+    template <> bool CBufferOut::put<ushort>(const ushort& data) { return put_template(data) ; }  
+    template <> bool CBufferOut::put<ulong>(const ulong& data) { return put_template(data) ; }  
+    template <> bool CBufferOut::put<float>(const float& data) { return put_template(data) ; }  
+    template <> bool CBufferOut::put<double>(const double& data) { return put_template(data) ; }  
+    template <> bool CBufferOut::put<long double>(const long double& data) { return put_template(data) ;}  
+
+    template <> bool CBufferOut::put<char>(const char* data, size_t n) { return put_template(data,n) ; }  
+    template <> bool CBufferOut::put<bool>(const bool* data, size_t n) { return put_template(data,n) ; }  
+    template <> bool CBufferOut::put<int>(const int* data, size_t n)   { return put_template(data,n) ; }
+    template <> bool CBufferOut::put<short>(const short* data, size_t n) { return put_template(data,n) ; }  
+    template <> bool CBufferOut::put<long>(const long* data, size_t n)  { return put_template(data,n) ; }  
+    template <> bool CBufferOut::put<uint>(const uint* data, size_t n)  { return put_template(data,n) ; }  
+    template <> bool CBufferOut::put<ushort>(const ushort* data, size_t n) { return put_template(data,n) ; }  
+    template <> bool CBufferOut::put<ulong>(const ulong* data, size_t n) { return put_template(data,n) ; }  
+    template <> bool CBufferOut::put<float>(const float* data, size_t n) { return put_template(data,n) ; }  
+    template <> bool CBufferOut::put<double>(const double* data, size_t n) { return put_template(data,n) ; }  
+    template <> bool CBufferOut::put<long double>(const long double* data, size_t n) { return put_template(data,n) ;}  
+
+
+    template <> bool CBufferOut::advance<char>(size_t n) { return advance_template<char>(n) ; }  
+    template <> bool CBufferOut::advance<bool>(size_t n) { return advance_template<bool>(n) ; }  
+    template <> bool CBufferOut::advance<int>(size_t n)   { return advance_template<int>(n) ; }
+    template <> bool CBufferOut::advance<short>(size_t n) { return advance_template<short>(n) ; }  
+    template <> bool CBufferOut::advance<long>(size_t n)  { return advance_template<long>(n) ; }  
+    template <> bool CBufferOut::advance<uint>(size_t n)  { return advance_template<uint>(n) ; }  
+    template <> bool CBufferOut::advance<ushort>(size_t n) { return advance_template<ushort>(n) ; }  
+    template <> bool CBufferOut::advance<ulong>(size_t n) { return advance_template<ulong>(n) ; }  
+    template <> bool CBufferOut::advance<float>(size_t n) { return advance_template<float>(n) ; }  
+    template <> bool CBufferOut::advance<double>(size_t n) { return advance_template<double>(n) ; }  
+    template <> bool CBufferOut::advance<long double>(size_t n) { return advance_template<long double>(n) ;}  
+
+    template <class T>
+    bool CBufferOut::put_template(const T& data)
+    {
+      return put_template<T>(&data,1);
+    }
+    
+    template <class T>
+    bool CBufferOut::put_template(const T* data, size_t n)
+    {
+      bool ret;
+      char* dataBuff ;
+  
+      size_t dataSize=sizeof(T)*n ;
+  
+      if (count_+dataSize<=size_)
+      {
+        dataBuff=(char*) data ;
+        for(size_t i=0;i<dataSize;i++) current[i]=dataBuff[i] ;
+        current+=dataSize ;
+        count_+=dataSize;
+        ret=true ;
+      }
+      else ret=false ;
+  
+      return ret ;
+    }
+
+    template <class T>
+    bool CBufferOut::advance_template(size_t n)
+    {
+      bool ret;
+      char* dataBuff ;
+  
+      size_t dataSize=sizeof(T)*n ;
+  
+      if (count_+dataSize<=size_)
+      {
+        current+=dataSize ;
+        count_+=dataSize;
+        ret=true ;
+      }
+      else ret=false ;
+  
+      return ret ;
+    }
+    
+}
+  
+
+#endif
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/buffer_server.cpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/buffer_server.cpp	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/buffer_server.cpp	(revision 1749)
@@ -0,0 +1,171 @@
+#include "xios_spl.hpp"
+#include "exception.hpp"
+#include "buffer_server.hpp"
+
+
+namespace xios
+{
+
+  CServerBuffer::CServerBuffer(StdSize buffSize)
+  {
+    size = 3 * buffSize;
+    first = 0;
+    current = 1;
+    end = size;
+    buffer = new char[size]; // use MPI_ALLOC_MEM later?
+  }
+
+  CServerBuffer::~CServerBuffer()
+  {
+    delete [] buffer ;
+  }
+
+
+  bool CServerBuffer::isBufferFree(size_t count)
+  {
+    bool ret ;
+
+    if (count==0) return true ;
+
+    if (current>first)
+    {
+      if (current+count<size)
+      {
+        ret=true ;
+      }
+      else if (current+count==size)
+      {
+        if (first>0)
+        {
+          ret=true ;
+        }
+        else
+        {
+          ret=false ;
+        }
+      }
+      else
+      {
+        if (count<first)
+        {
+          ret=true ;
+        }
+        else
+        {
+          ret=false ;
+        }
+      }
+    }
+    else
+    {
+      if (current+count<first)
+      {
+        ret=true ;
+      }
+      else
+      {
+         ret=false ;
+      }
+    }
+
+    return ret ;
+  }
+
+
+  void* CServerBuffer::getBuffer(size_t count)
+  {
+    char* ret ;
+
+    if (count==0) return buffer+current ;
+
+    if (current>first)
+    {
+      if (current+count<size)
+      {
+        ret=buffer+current ;
+        current+=count ;
+      }
+      else if (current+count==size)
+      {
+        if (first>0)
+        {
+          ret=buffer+current ;
+          current=0 ;
+        }
+        else
+        {
+          ERROR("void* CServerBuffer::getBuffer(size_t count)",
+                 <<"cannot allocate required size in buffer") ;
+        }
+      }
+      else
+      {
+        end=current ;
+        if (count<first)
+        {
+          ret=buffer ;
+          current=count ;
+        }
+        else
+        {
+          ERROR("void* CServerBuffer::getBuffer(size_t count)",
+                 <<"cannot allocate required size in buffer") ;
+        }
+      }
+    }
+    else
+    {
+      if (current+count<first)
+      {
+        ret=buffer+current ;
+        current+=count ;
+      }
+      else
+      {
+          ERROR("void* CServerBuffer::getBuffer(size_t count)",
+                 <<"cannot allocate required size in buffer") ;
+      }
+    }
+
+    return ret ;
+  }
+
+  void CServerBuffer::freeBuffer(size_t count)
+  {
+    if (count==0) return ;
+
+    if (first==end-1)
+    {
+      first=0 ;
+      count-- ;
+      end=size ;
+    }
+
+    if (first<=current)
+    {
+      if (first+count <current)
+      {
+        first+=count ;
+      }
+      else
+      {
+          ERROR("void CServerBuffer::freeBuffer(size_t count)",
+                 <<"cannot free required size in buffer") ;
+      }
+
+    }
+    else
+    {
+      if (first+count<end)
+      {
+        first+=count ;
+      }
+      else
+      {
+          ERROR("void CServerBuffer::freeBuffer(size_t count)",
+                 <<"cannot free required size in buffer") ;
+      }
+    }
+  }
+
+}
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/buffer_server.hpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/buffer_server.hpp	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/buffer_server.hpp	(revision 1749)
@@ -0,0 +1,30 @@
+#ifndef __BUFFER_SERVER_HPP__
+#define __BUFFER_SERVER_HPP__
+
+#include "xios_spl.hpp"
+#include "buffer.hpp"
+#include "mpi.hpp"
+#include "cxios.hpp"
+
+namespace xios
+{
+  class CServerBuffer
+  {
+    public:
+      CServerBuffer(StdSize bufSize) ;
+      ~CServerBuffer() ;
+
+      bool isBufferFree(size_t count) ;
+      void* getBuffer(size_t count) ;
+      void freeBuffer(size_t count) ;
+
+    private:
+      char* buffer;
+      size_t first;   // first occupied element
+      size_t current; // first free element
+      size_t end;
+      size_t size;
+  };
+}
+
+#endif
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/calendar.cpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/calendar.cpp	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/calendar.cpp	(revision 1749)
@@ -0,0 +1,328 @@
+#include "calendar.hpp"
+#include "duration.hpp"
+#include "date.hpp"
+#include "calendar_util.hpp"
+
+namespace xios
+{
+      /// ////////////////////// DÃ©finitions ////////////////////// ///
+      CCalendar::CCalendar(void)
+         : CObject()
+         , step(0)
+         , initDate(*this)
+         , timeOrigin(*this)
+         , currentDate(*this)
+      {}
+
+      CCalendar::CCalendar(const StdString& id)
+               : CObject(id)
+               , step(0)
+               , initDate(*this)
+               , timeOrigin(*this)
+               , currentDate(*this)
+      {}
+
+      CCalendar::CCalendar(const StdString& id,
+                           int yr, int mth, int d,
+                           int hr /*= 0*/, int min /*= 0*/, int sec /*= 0*/)
+               : CObject(id)
+               , step(0)
+               , initDate(*this)
+               , timeOrigin(*this)
+               , currentDate(*this)
+      {
+        initializeDate(yr, mth, d, hr, min, sec);
+      }
+
+      CCalendar::CCalendar(const StdString& id, const CDate& startDate)
+               : CObject(id)
+               , step(0)
+               , initDate(startDate)
+               , timeOrigin(startDate)
+               , currentDate(startDate)
+      {
+        // Initialize the dates only in the derivated classes
+        // since we want to use the overloaded virtual functions
+      }
+
+      CCalendar::CCalendar(const StdString& id, const CDate& startDate, const CDate& timeOrigin)
+               : CObject(id)
+               , step(0)
+               , initDate(startDate)
+               , timeOrigin(timeOrigin)
+               , currentDate(startDate)
+      {
+        // Initialize the dates only in the derivated classes
+        // since we want to use the overloaded virtual functions
+      }
+
+      void CCalendar::initializeDate()
+      {
+        if (!initDate.setRelCalendar(*this))
+          ERROR("CCalendar::initializeDate()",
+                "initDate: Bad format or date not conform to the calendar");
+        if (!timeOrigin.setRelCalendar(*this))
+          ERROR("CCalendar::initializeDate()",
+                "timeOrigin: Bad format or date not conform to the calendar");
+        if (!currentDate.setRelCalendar(*this))
+          ERROR("CCalendar::initializeDate()",
+                "currentDate: Bad format or date not conform to the calendar");
+      }
+
+      void CCalendar::initializeDate(int yr, int mth, int d,
+                                     int hr /*= 0*/, int min /*= 0*/, int sec /*= 0*/)
+      {
+        initDate = CDate(*this, yr, mth, d, hr, min, sec);
+        timeOrigin = initDate;
+        currentDate = initDate;
+      }
+
+      void CCalendar::initializeDate(const StdString& dateStr)
+      {
+        initDate = CDate::FromString(dateStr, *this);
+        timeOrigin = initDate;
+        currentDate = initDate;
+      }
+
+      void CCalendar::initializeDate(const StdString& dateStr, const StdString& timeOriginStr)
+      {
+        initDate = CDate::FromString(dateStr, *this);
+        timeOrigin = CDate::FromString(timeOriginStr, *this);
+        currentDate = initDate;
+      }
+
+      CCalendar::~CCalendar(void)
+      { /* Ne rien faire de plus */ }
+
+      ///---------------------------------------------------------------
+
+      StdString CCalendar::toString(void) const
+      {
+         StdOStringStream oss;
+         oss <<   "[type: "   << this->getId()
+             << ", start: "   << this->initDate
+             << ", current: " << this->currentDate << "]";
+         return (oss.str());
+      }
+
+      void CCalendar::fromString(const StdString& str)
+      { ERROR("CCalendar::fromString(str)",
+               << "[ str = " << str << "] Not implemented yet !"); }
+
+      //-----------------------------------------------------------------
+
+      void CCalendar::setTimeStep(const CDuration& timestep)
+      {
+        if (timestep.timestep)
+          ERROR("CCalendar::setTimeStep(const CDuration& timestep)",
+                << "Circular definition of the timestep: the timestep cannot refer to itself.");
+        this->timestep = timestep;
+      }
+
+      int CCalendar::getStep(void) const
+      {
+        return step;
+      }
+
+      const CDate& CCalendar::update(int step)
+      {
+        info(20) << "update step : " << step << " timestep " << this->timestep << std::endl;
+        this->step = step;
+        return (this->currentDate = this->getInitDate() + step * this->timestep);
+      }
+
+      //-----------------------------------------------------------------
+
+      void CCalendar::setInitDate(const CDate& initDate)
+      {
+        if (&initDate.getRelCalendar() != this)
+          ERROR("CCalendar::setInitDate(const CDate& initDate)",
+                << "The init date cannot be attached to another calendar.");
+        this->initDate = initDate;
+      }
+
+      void CCalendar::setTimeOrigin(const CDate& timeOrigin)
+      {
+        if (&timeOrigin.getRelCalendar() != this)
+          ERROR("CCalendar::setInitDate(const CDate& timeOrigin)",
+                << "The time origin cannot be attached to another calendar.");
+        this->timeOrigin = timeOrigin;
+      }
+
+      //-----------------------------------------------------------------
+
+      const CDuration& CCalendar::getTimeStep(void) const { return this->timestep; }
+      const CDate& CCalendar::getInitDate(void) const     { return this->initDate; }
+      const CDate& CCalendar::getTimeOrigin(void) const   { return this->timeOrigin; }
+      const CDate& CCalendar::getCurrentDate(void) const  { return this->currentDate; }
+
+      //-----------------------------------------------------------------
+
+      int CCalendar::getMonthLength(const CDate& date) const
+      { // Retourne la durÃ©e du mois en jour.
+        static const int NoLeapMonthLength[] =
+          { 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 };
+        return NoLeapMonthLength[date.getMonth() - 1];
+      }
+
+      StdString CCalendar::getType(void) const { return StdString(this->getId()); }
+
+      int CCalendar::getYearTotalLength(const CDate& date) const { return (365 * 86400); }
+
+      int CCalendar::getYearLength  (void) const { return 12; }
+      int CCalendar::getDayLength   (void) const { return 24; }
+      int CCalendar::getHourLength  (void) const { return 60; }
+      int CCalendar::getMinuteLength(void) const { return 60; }
+      int CCalendar::getDayLengthInSeconds(void) const { return getDayLength() * getHourLength() * getMinuteLength(); }
+
+      bool CCalendar::hasLeapYear() const { return false; }
+
+      StdString CCalendar::getMonthName(int monthId) const
+      {
+        static const StdString MonthNames[] =
+          { "january", "february", "march",     "april" ,  "may",      "june",
+            "july",    "august",   "september", "october", "november", "december" };
+        return MonthNames[monthId - 1];
+      }
+
+      const StdString CCalendar::getMonthShortName(int monthId) const
+      { StdString value = this->getMonthName(monthId); value.resize(3); return value; }
+
+      CDuration& CCalendar::resolve(CDuration& dur, bool noNegativeTime /*= false*/) const
+      {
+        const int hourLengthInSeconds = getHourLength() * getMinuteLength();
+
+        // Simplify the days, hours, minutes and seconds.
+        // First convert them to seconds
+        Time t = Time(modf(dur.day, &dur.day) * getDayLengthInSeconds()
+                        + (dur.hour * getHourLength() + dur.minute) * getMinuteLength() + dur.second);
+        // Then convert back to days
+        dur.day += int(t / getDayLengthInSeconds());
+        t %= getDayLengthInSeconds();
+
+        // Do we allow hour, minute, second to be negative?
+        if (noNegativeTime)
+        {
+          // If we don't, we remove some days until the time is positive
+          while (t < 0)
+          {
+            t += getDayLengthInSeconds();
+            dur.day -= 1.0;
+          }
+        }
+
+        // hours
+        dur.hour = int(t / hourLengthInSeconds);
+        t %= hourLengthInSeconds;
+        // minutes
+        dur.minute = int(t / getMinuteLength());
+        // secondes
+        dur.second = int(t % getMinuteLength());
+
+        // Nothing to do for the months yet since this depends on an actual date
+
+        // Simplify the years
+        dur.month  += modf(dur.year, &dur.year) * getYearLength();
+        dur.year   += int(dur.month) / getYearLength(); dur.month = int(dur.month) % getYearLength();
+
+        return dur;
+      }
+
+      /*! Parse a date using a generic parser. */
+      void CCalendar::parseDateDefault(StdIStream& in, CDate& date)
+      {
+        char sep = '-'; // Le caractÃšre c est utilisÃ© pour "recueillir" les sÃ©parateurs "/" et ":".
+        char c;
+
+        // Default initialize the date
+        int year = 00, month  = 01, day    = 01;
+        int hour = 00, minute = 00, second = 00;
+
+        in >> year >> c;
+        if (c == sep)
+        {
+          in >> month >> c;
+          if (c == sep)
+          {
+            in >> day;
+            c = in.get();
+            sep = ' ';
+            if (c == sep)
+            {
+              in >> hour >> c;
+              sep = ':';
+              if (c == sep)
+              {
+                in >> minute >> c;
+                if (c == sep)
+                {
+                  in >> second;
+                  in >> c;
+                }
+              }
+            }
+          }
+        }
+
+        date.setDate(year, month, day, hour, minute, second);
+
+        // Delay the verification until we get a calendar we can compare the date to
+        if (date.hasRelCalendar() && !date.checkDate())
+          ERROR("void parseDateDefault(StdIStream& in, CDate& date)",
+                << "Bad date format or not conform to calendar");
+
+        if (c == '+') // We will be adding a duration to the date
+        {
+          CDuration dur;
+          in >> dur;
+          date = date + dur;
+        }
+        else if (!in.eof())
+          ERROR("void parseDateDefault(StdIStream& in, CDate& date)",
+                << "Invalid date format: unexpected trailing character(s)");
+      }
+
+      /*! Parse a date using the calendar's parser. */
+      void CCalendar::parseDate(StdIStream& in, CDate& date) const
+      {
+        parseDateDefault(in, date);
+      }
+
+      /*! Test if a date is valid with regard to the current calendar. */
+      bool CCalendar::checkDate(CDate& date) const
+      {
+        bool isValid = true;
+
+        // VÃ©rification de la valeur du mois.
+        if (date.getMonth() < 1)
+        { isValid = false; date.setMonth(1); }
+        else if (date.getMonth() > getYearLength())
+        { isValid = false; date.setMonth(getYearLength()); }
+
+        // VÃ©rification de la valeur du jour.
+        if (date.getDay() < 1)
+        { isValid = false; date.setDay(1); }
+        else if (date.getDay() > getMonthLength(*this))
+        { isValid = false; date.setDay(getMonthLength(*this)); }
+
+        // VÃ©rification de la valeur de l'heure.
+        if (date.getHour() < 0)
+        { isValid = false; date.setHour(0); }
+        else if (date.getHour() >= getDayLength())
+        { isValid = false; date.setHour(getDayLength() - 1); }
+
+        // VÃ©rification de la valeur des minutes.
+        if (date.getMinute() < 0)
+        { isValid = false; date.setMinute(0); }
+        else if (date.getMinute() >= getHourLength())
+        { isValid = false; date.setMinute(getHourLength() - 1); }
+
+        // VÃ©rification de la valeur des secondes.
+        if (date.getSecond() < 0)
+        { isValid = false; date.setSecond(0); }
+        else if (date.getSecond() >= getMinuteLength())
+        { isValid = false; date.setSecond(getMinuteLength() - 1); }
+
+        return isValid;
+      }
+} // namespace xios
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/calendar.hpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/calendar.hpp	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/calendar.hpp	(revision 1749)
@@ -0,0 +1,128 @@
+#ifndef __XIOS_CCalendar__
+#define __XIOS_CCalendar__
+
+/// XIOS headers ///
+#include "xios_spl.hpp"
+#include "exception.hpp"
+#include "date.hpp"
+
+namespace xios
+{
+      /// ////////////////////// DÃ©clarations ////////////////////// ///
+
+      typedef enum _monthEnum
+      {  JAN = 1, FEB = 2, MAR = 3, APR = 4 , MAY = 5 , JUN = 6 ,
+         JUL = 7, AUG = 8, SEP = 9, OCT = 10, NOV = 11, DEC = 12  } MonthEnum;
+
+      ///---------------------------------------------------------------
+
+      class CDate;
+
+      class CCalendar : public CObject
+      {
+            /// Typedef ///
+            typedef CObject SuperClass;
+
+         public :
+
+            /// Destructeur ///
+            virtual ~CCalendar(void);
+
+         protected :
+
+            /// Constructeurs ///
+            CCalendar(void);
+            CCalendar(const StdString& id);
+            CCalendar(const StdString& id,
+                      int yr, int mth, int d,
+                      int hr = 0, int min = 0, int sec = 0);
+            CCalendar(const StdString& id, const CDate& startDate);
+            CCalendar(const StdString& id, const CDate& startDate, const CDate& timeOrigin);
+
+            CCalendar(const CCalendar& calendar);       // Not implemented yet.
+            CCalendar(const CCalendar* const calendar); // Not implemented yet.
+
+         public :
+
+            //------------------------------------------------------------
+
+            /// Autres ///
+            virtual StdString toString(void) const;
+            virtual void fromString(const StdString& str);
+
+            /// Mutateur ///
+            void setTimeStep(const CDuration& timestep);
+            void setInitDate(const CDate& initDate);
+            void setTimeOrigin(const CDate& timeOrigin);
+
+            /// Traitemants ///
+            const CDate& update(int step);
+
+            /// Accesseurs ///
+            const CDuration& getTimeStep(void) const;
+            const CDate& getInitDate(void) const;
+            const CDate& getTimeOrigin(void) const;
+            const CDate& getCurrentDate(void) const;
+
+         public :
+
+            //------------------------------------------------------------
+            virtual StdString getType(void) const;
+
+            int getStep(void) const;
+
+            virtual int getMonthLength(const CDate& date) const;
+
+            virtual int getYearTotalLength(const CDate& date) const; // Retourne la durÃ©e d'une annÃ©e en seconde.
+
+            virtual int getYearLength  (void) const; // Retourne la durÃ©e d'une annÃ©e en mois.
+            virtual int getDayLength   (void) const; // Retourne la durÃ©e d'un jour en heures.
+            virtual int getHourLength  (void) const; // Retourne la durÃ©e d'une heure en minute.
+            virtual int getMinuteLength(void) const; // Retourne la durÃ©e d'une minute en secondes.
+            /*! Returns the day length expressed in seconds. */
+            virtual int getDayLengthInSeconds(void) const;
+
+            virtual StdString getMonthName(int monthId) const;
+            virtual const StdString getMonthShortName(int monthId) const;
+
+            /*! Test if the calendar can have leap year. */
+            virtual bool hasLeapYear() const;
+
+            void initializeDate(int yr, int mth, int d, int hr = 0, int min = 0, int sec = 0);
+            void initializeDate(const StdString& dateStr);
+            void initializeDate(const StdString& dateStr, const StdString& timeOrigin);
+
+            /*! Simplify a duration based on the calendar information. */
+            virtual CDuration& resolve(CDuration& dur, bool noNegativeTime = false) const;
+
+            /*! Parse a date using a generic parser. */
+            static void parseDateDefault(StdIStream& in, CDate& date);
+            /*! Parse a date using the calendar's parser. */
+            virtual void parseDate(StdIStream& in, CDate& date) const;
+
+            /*! Test if a date is valid with regard to the current calendar. */
+            virtual bool checkDate(CDate& date) const;
+
+            //------------------------------------------------------------
+
+         protected:
+
+            //!< Associate the dates to the calendar and check their validity
+            void initializeDate();
+
+            //------------------------------------------------------------
+
+         private :
+            int step;
+
+            /// PropriÃ©tÃ©s privÃ©es ///
+            CDate initDate;
+            CDate timeOrigin;
+            CDate currentDate;
+            CDuration timestep;
+
+      }; // class CCalendar
+
+} // namespace xios
+
+#endif // __XIOS_CCalendar__
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/calendar_util.cpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/calendar_util.cpp	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/calendar_util.cpp	(revision 1749)
@@ -0,0 +1,254 @@
+#include "calendar_util.hpp"
+
+namespace xios
+{
+    /// ////////////////////// DÃ©finitions ////////////////////// ///
+
+    CDuration operator*(const double& scal, const CDuration& ddr)
+    { return (ddr * scal); }
+
+    CDuration operator-(const CDuration& ddr, const CDuration& dr)
+    {
+      CDuration dur(ddr);
+      dur.year -= dr.year; dur.month  -= dr.month;  dur.day    -= dr.day;
+      dur.hour -= dr.hour; dur.minute -= dr.minute; dur.second -= dr.second; dur.timestep -= dr.timestep;
+      return dur;
+    }
+
+    CDuration operator+(const CDuration& ddr, const CDuration& dr)
+    {
+      CDuration dur(ddr);
+      dur.year += dr.year; dur.month  += dr.month;  dur.day    += dr.day;
+      dur.hour += dr.hour; dur.minute += dr.minute; dur.second += dr.second; dur.timestep += dr.timestep;
+      return dur;
+    }
+
+    CDuration operator*(const CDuration& ddr, const double& scal)
+    {
+      CDuration dur(ddr);
+      dur.year *= scal; dur.month  *= scal; dur.day    *= scal;
+      dur.hour *= scal; dur.minute *= scal; dur.second *= scal; dur.timestep *= scal;
+      return dur;
+    }
+
+    CDuration operator-(const CDuration& ddr)
+    {
+      CDuration dur(ddr);
+      dur.year     = -dur.year;
+      dur.month    = -dur.month;
+      dur.day      = -dur.day;
+      dur.hour     = -dur.hour;
+      dur.minute   = -dur.minute;
+      dur.second   = -dur.second;
+      dur.timestep = -dur.timestep;
+      return dur;
+    }
+
+    //-----------------------------------------------------------------
+
+    CDate operator+(const CDate& dt, const CDuration& dr)
+    {
+      CDuration drr(dr);
+      int year = 0, month = 0, day = 0, hour = 0, minute = 0, second = 0;
+      const CCalendar& c = dt.getRelCalendar();
+      const bool calendarHasMonths = (c.getYearLength() > 0);
+
+      drr.timestep = 0;
+      if (dr.timestep)
+      {
+        if (c.getTimeStep() == NoneDu)
+          ERROR("operator+(const CDate& dt, const CDuration& dr)",
+                << "Impossible to use the timestep before it is set.");
+        drr = drr + dr.timestep * c.getTimeStep();
+      }
+
+      // Handle the time part of the date
+      drr.second += dt.getSecond();
+      drr.minute += dt.getMinute();
+      drr.hour   += dt.getHour();
+
+      if (!calendarHasMonths) // Handle the day and year immediately if there is no months
+      {
+        drr.day  += dt.getDay() - 1;
+        drr.year += dt.getYear();
+      }
+
+      drr.resolve(c, true); // Force the time to be positive
+
+      second = drr.second;
+      minute = drr.minute;
+      hour   = drr.hour;
+
+      if (calendarHasMonths)
+      {
+        // Ajustement des mois en fonction des jours.
+        CDate dtt(dt);
+        drr.day += dtt.getDay() - 1;
+        dtt.setDay(1);
+
+        if (drr.day >= 0)
+        {
+          for(; c.getMonthLength(dtt) <= drr.day; dtt.addMonth(1))
+          { drr.day -= c.getMonthLength(dtt); drr.month += 1; }
+
+          day = drr.day + 1;
+        }
+        else
+        {
+          dtt.addMonth(-1);
+          drr.month -= 1;
+          for(; c.getMonthLength(dtt) < -drr.day; dtt.addMonth(-1))
+          { drr.day += c.getMonthLength(dtt); drr.month -= 1; }
+          day = c.getMonthLength(dtt) + drr.day + 1;
+        }
+
+        drr.resolve(c);
+
+        // Ajustement des annÃ©es en fonction des mois.
+        month += dt.getMonth() + drr.month;
+        if (month < 0) { drr.year--; month += c.getYearLength(); }
+        if (month > c.getYearLength()) { drr.year++; month -= c.getYearLength(); }
+        if (month == 0){ month = c.getYearLength(); drr.year--; }
+
+        year += dt.getYear() + drr.year;
+      }
+      else // if (!calendarHasMonths)
+      {
+        day   = drr.day + 1;
+        month = 1;
+        year  = drr.year;
+      }
+
+      return (CDate(c, year, month, day, hour, minute, second));
+    }
+
+    CDate operator-(const CDate& dt, const CDuration& dr) { return (dt + (-dr)); }
+
+    //-----------------------------------------------------------------
+
+    CDuration operator-(const CDate& dt0, const CDate& dt1)
+    {
+      // TODO :: VÃ©rifier que les deux dates (dt0 et dt1) ont une rÃ©fÃ©rence vers le mÃªme calendrier.
+      CDuration dur( dt0.getYear() - dt1.getYear(), dt0.getMonth()  - dt1.getMonth() , dt0.getDay()   - dt1.getDay(),
+      dt0.getHour() - dt1.getHour(), dt0.getMinute() - dt1.getMinute(), dt0.getSecond() - dt1.getSecond() );
+      return (dur.resolve(dt0.getRelCalendar()));
+    }
+
+    //-----------------------------------------------------------------
+
+    /// Les opÃ©rateurs de comparaison. (Non testÃ©s pour le moment)
+
+    bool operator==(const CDuration& ddr, const CDuration& dr)
+    {
+      return ((ddr.year == dr.year) && (ddr.month  == dr.month)  && (dr.day    == ddr.day) &&
+              (ddr.hour == dr.hour) && (ddr.minute == dr.minute) && (dr.second == ddr.second) &&
+              (ddr.timestep == dr.timestep));
+    }
+
+    bool operator!=(const CDuration& ddr, const CDuration& dr)
+    {
+      return !(ddr == dr);
+    }
+
+    bool operator==(const CDate& dt0, const CDate& dt1)
+    {
+      // TODO :: VÃ©rifier que les deux dates (dt0 et dt1) ont une rÃ©fÃ©rence vers le mÃªme calendrier.
+      return ((dt0.getYear() == dt1.getYear()) && (dt0.getMonth()  == dt1.getMonth())  && (dt1.getDay()    == dt0.getDay()) &&
+              (dt0.getHour() == dt1.getHour()) && (dt0.getMinute() == dt1.getMinute()) && (dt1.getSecond() == dt0.getSecond()));
+    }
+
+    bool operator<(const CDate& dt0, const CDate& dt1)
+    {
+      // TODO :: VÃ©rifier que les deux dates (dt0 et dt1) ont une rÃ©fÃ©rence vers le mÃªme calendrier.
+      if (dt0.getYear() < dt1.getYear())
+      {
+        return true;
+      }
+      else if (dt0.getYear() == dt1.getYear())
+      {
+        if (dt0.getMonth() < dt1.getMonth())
+        {
+          return true;
+        }
+        else if (dt0.getMonth() == dt1.getMonth())
+        {
+          if (dt0.getDay() < dt1.getDay())
+          {
+             return true;
+          }
+          else if (dt0.getDay() == dt1.getDay())
+          {
+            if (dt0.getHour() < dt1.getHour())
+            {
+              return true;
+            }
+            else if (dt0.getHour() == dt1.getHour())
+            {
+              if (dt0.getMinute() < dt1.getMinute())
+              {
+                return true;
+              }
+              else if (dt0.getMinute() == dt1.getMinute())
+              {
+                if (dt0.getSecond() < dt1.getSecond())
+                  return true;
+              }
+            }
+          }
+        }
+      }
+      return false;
+    }
+
+    //-----------------------------------------------------------------
+
+    bool operator!=(const CDate& dt0, const CDate& dt1) { return !(dt1 == dt0); }
+    bool operator> (const CDate& dt0, const CDate& dt1) { return (dt1 < dt0); }
+    bool operator>=(const CDate& dt0, const CDate& dt1) { return (dt0 > dt1 || dt1 == dt0); }
+    bool operator<=(const CDate& dt0, const CDate& dt1) { return (dt0 < dt1 || dt1 == dt0); }
+
+    ///----------------------------------------------------------------
+
+    bool DurationFakeLessComparator::operator()(const CDuration& dur1, const CDuration& dur2) const
+    {
+      if (dur1.year < dur2.year)
+        return true;
+      else if (dur1.year == dur2.year)
+      {
+        if (dur1.month < dur2.month)
+          return true;
+        else if (dur1.month == dur2.month)
+        {
+          if (dur1.day < dur2.day)
+            return true;
+          else if (dur1.day == dur2.day)
+          {
+            if (dur1.hour < dur2.hour)
+              return true;
+            else if (dur1.hour == dur2.hour)
+            {
+              if (dur1.minute < dur2.minute)
+                return true;
+              else if (dur1.minute == dur2.minute)
+              {
+                if (dur1.second < dur2.second)
+                  return true;
+                else if (dur1.second == dur2.second)
+                  return (dur1.timestep < dur2.timestep);
+              }
+            }
+          }
+        }
+      }
+      return false;
+    }
+
+    ///----------------------------------------------------------------
+
+} // namespace xios
+
+
+
+
+
+
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/calendar_util.hpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/calendar_util.hpp	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/calendar_util.hpp	(revision 1749)
@@ -0,0 +1,44 @@
+#ifndef __XIOS_CCalendar_util__
+#define __XIOS_CCalendar_util__
+
+/// XIOS headers ///
+#include "xios_spl.hpp"
+#include "exception.hpp"
+#include "calendar.hpp"
+
+namespace xios
+{
+      /// ////////////////////// DÃ©clarations ////////////////////// ///
+
+      CDuration operator*(const double& scal,   const CDuration& ddr);
+      CDuration operator-(const CDuration& ddr, const CDuration& dr);
+      CDuration operator+(const CDuration& ddr, const CDuration& dr);
+      CDuration operator*(const CDuration& ddr, const double& scal);
+      CDuration operator-(const CDuration& ddr);
+
+      CDate operator+(const CDate& dt, const CDuration& dr); // Non testÃ©e.
+      CDate operator-(const CDate& dt, const CDuration& dr);
+
+      CDuration operator-(const CDate& dt0, const CDate& dt1);
+
+      /// Les opÃ©rateurs de comparaison. (Non testÃ©s pour le moment)
+      bool operator==(const CDuration& ddr, const CDuration& dr);
+      bool operator!=(const CDuration& ddr, const CDuration& dr);
+
+      bool operator==(const CDate& dt0, const CDate& dt1);
+      bool operator< (const CDate& dt0, const CDate& dt1);
+
+      bool operator!=(const CDate& dt0, const CDate& dt1);
+      bool operator> (const CDate& dt0, const CDate& dt1);
+      bool operator>=(const CDate& dt0, const CDate& dt1);
+      bool operator<=(const CDate& dt0, const CDate& dt1);
+
+      ///---------------------------------------------------------------
+
+      //!< Provides a fake "less" comparator for durations that can be used as a comparator for maps
+      struct DurationFakeLessComparator {
+        bool operator()(const CDuration& dur1, const CDuration& dur2) const;
+      };
+} // namespace xios
+
+#endif //__XIOS_CCalendar_util__
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/client.cpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/client.cpp	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/client.cpp	(revision 1749)
@@ -0,0 +1,402 @@
+#include "globalScopeData.hpp"
+#include "xios_spl.hpp"
+#include "cxios.hpp"
+#include "client.hpp"
+#include <boost/functional/hash.hpp>
+#include "type.hpp"
+#include "context.hpp"
+#include "context_client.hpp"
+#include "oasis_cinterface.hpp"
+#include "mpi.hpp"
+#include "timer.hpp"
+#include "buffer_client.hpp"
+#include "string_tools.hpp"
+
+namespace xios
+{
+
+    MPI_Comm CClient::intraComm ;
+    MPI_Comm CClient::interComm ;
+    std::list<MPI_Comm> CClient::contextInterComms;
+    int CClient::serverLeader ;
+    bool CClient::is_MPI_Initialized ;
+    int CClient::rank_ = INVALID_RANK;
+    StdOFStream CClient::m_infoStream;
+    StdOFStream CClient::m_errorStream;
+    MPI_Comm& CClient::getInterComm(void)   { return (interComm); }
+     
+///---------------------------------------------------------------
+/*!
+ * \fn void CClient::initialize(const string& codeId, MPI_Comm& localComm, MPI_Comm& returnComm)
+ * Function creates intraComm (CClient::intraComm) for client group with id=codeId and interComm (CClient::interComm) between client and server groups.
+ * \param [in] codeId identity of context.
+ * \param [in/out] localComm local communicator.
+ * \param [in/out] returnComm (intra)communicator of client group.
+ */
+
+    void CClient::initialize(const string& codeId, MPI_Comm& localComm, MPI_Comm& returnComm)
+    {
+      int initialized ;
+      MPI_Initialized(&initialized) ;
+      if (initialized) is_MPI_Initialized=true ;
+      else is_MPI_Initialized=false ;
+      int rank ;
+
+// don't use OASIS
+      if (!CXios::usingOasis)
+      {
+// localComm isn't given
+        if (localComm == MPI_COMM_NULL)
+        {
+          if (!is_MPI_Initialized)
+          {
+            MPI_Init(NULL, NULL);
+          }
+          CTimer::get("XIOS").resume() ;
+          CTimer::get("XIOS init/finalize").resume() ;
+          boost::hash<string> hashString ;
+
+          unsigned long hashClient=hashString(codeId) ;
+          unsigned long hashServer=hashString(CXios::xiosCodeId) ;
+          unsigned long* hashAll ;
+          int size ;
+          int myColor ;
+          int i,c ;
+          MPI_Comm newComm ;
+
+          MPI_Comm_size(CXios::globalComm,&size) ;
+          MPI_Comm_rank(CXios::globalComm,&rank_);
+
+          hashAll=new unsigned long[size] ;
+
+          MPI_Allgather(&hashClient,1,MPI_LONG,hashAll,1,MPI_LONG,CXios::globalComm) ;
+
+          map<unsigned long, int> colors ;
+          map<unsigned long, int> leaders ;
+
+          for(i=0,c=0;i<size;i++)
+          {
+            if (colors.find(hashAll[i])==colors.end())
+            {
+              colors[hashAll[i]] =c ;
+              leaders[hashAll[i]]=i ;
+              c++ ;
+            }
+          }
+
+          // Verify whether we are on server mode or not
+          CXios::setNotUsingServer();
+          for (i=0; i < size; ++i)
+          {
+            if (hashServer == hashAll[i])
+            {
+              CXios::setUsingServer();
+              break;
+            }
+          }
+
+          myColor=colors[hashClient];
+          MPI_Comm_split(CXios::globalComm,myColor,rank_,&intraComm) ;
+
+          if (CXios::usingServer)
+          {
+            int clientLeader=leaders[hashClient] ;
+            serverLeader=leaders[hashServer] ;
+            int intraCommSize, intraCommRank ;
+            MPI_Comm_size(intraComm,&intraCommSize) ;
+            MPI_Comm_rank(intraComm,&intraCommRank) ;
+            info(50)<<"intercommCreate::client "<<rank_<<" intraCommSize : "<<intraCommSize
+                   <<" intraCommRank :"<<intraCommRank<<"  clientLeader "<< serverLeader<<endl ;
+             MPI_Intercomm_create(intraComm, 0, CXios::globalComm, serverLeader, 0, &interComm) ;
+             //rank_ = intraCommRank;
+          }
+          else
+          {
+            MPI_Comm_dup(intraComm,&interComm) ;
+          }
+          delete [] hashAll ;
+        }
+        // localComm argument is given
+        else
+        {
+          if (CXios::usingServer)
+          {
+            //ERROR("void CClient::initialize(const string& codeId,MPI_Comm& localComm,MPI_Comm& returnComm)", << " giving a local communictor is not compatible with using server mode") ;
+          }
+          else
+          {
+            MPI_Comm_dup(localComm,&intraComm) ;
+            MPI_Comm_dup(intraComm,&interComm) ;
+          }
+        }
+      }
+      // using OASIS
+      else
+      {
+        // localComm isn't given
+        if (localComm == MPI_COMM_NULL)
+        {
+          if (!is_MPI_Initialized) oasis_init(codeId) ;
+          oasis_get_localcomm(localComm) ;
+        }
+        MPI_Comm_dup(localComm,&intraComm) ;
+
+        CTimer::get("XIOS").resume() ;
+        CTimer::get("XIOS init/finalize").resume() ;
+
+        if (CXios::usingServer)
+        {
+          MPI_Status status ;
+          MPI_Comm_rank(intraComm,&rank_) ;
+
+          oasis_get_intercomm(interComm,CXios::xiosCodeId) ;
+          if (rank_==0) MPI_Recv(&serverLeader,1, MPI_INT, 0, 0, interComm, &status) ;
+          MPI_Bcast(&serverLeader,1,MPI_INT,0,intraComm) ;
+        }
+        else MPI_Comm_dup(intraComm,&interComm) ;
+      }
+
+      MPI_Comm_dup(intraComm,&returnComm) ;
+    }
+
+///---------------------------------------------------------------
+/*!
+ * \fn void CClient::registerContext(const string& id, MPI_Comm contextComm)
+ * \brief Sends a request to create a context to server. Creates client/server contexts.
+ * \param [in] id id of context.
+ * \param [in] contextComm.
+ * Function is only called by client.
+ */
+    void CClient::registerContext(const string& id, MPI_Comm contextComm)
+    {
+      CContext::setCurrent(id) ;
+      CContext* context=CContext::create(id);
+      StdString idServer(id);
+      idServer += "_server";
+
+      if (CXios::isServer && !context->hasServer)
+      // Attached mode
+      {
+        MPI_Comm contextInterComm ;
+        MPI_Comm_dup(contextComm,&contextInterComm) ;
+        CContext* contextServer = CContext::create(idServer);
+
+        // Firstly, initialize context on client side
+        context->initClient(contextComm,contextInterComm, contextServer);
+
+        // Secondly, initialize context on server side
+        contextServer->initServer(contextComm,contextInterComm, context);
+
+        // Finally, we should return current context to context client
+        CContext::setCurrent(id);
+
+        contextInterComms.push_back(contextInterComm);
+      }
+      else
+      {
+        int size,rank,globalRank ;
+        size_t message_size ;
+        int leaderRank ;
+        MPI_Comm contextInterComm ;
+
+        MPI_Comm_size(contextComm,&size) ;
+        MPI_Comm_rank(contextComm,&rank) ;
+        MPI_Comm_rank(CXios::globalComm,&globalRank) ;
+        if (rank!=0) globalRank=0 ;
+
+        CMessage msg ;
+        msg<<idServer<<size<<globalRank ;
+//        msg<<id<<size<<globalRank ;
+
+        int messageSize=msg.size() ;
+        char * buff = new char[messageSize] ;
+        CBufferOut buffer((void*)buff,messageSize) ;
+        buffer<<msg ;
+
+        MPI_Send((void*)buff,buffer.count(),MPI_CHAR,serverLeader,1,CXios::globalComm) ;
+
+        MPI_Intercomm_create(contextComm,0,CXios::globalComm,serverLeader,10+globalRank,&contextInterComm) ;
+        info(10)<<"Register new Context : "<<id<<endl ;
+        MPI_Comm inter ;
+        MPI_Intercomm_merge(contextInterComm,0,&inter) ;
+        MPI_Barrier(inter) ;
+
+        context->initClient(contextComm,contextInterComm) ;
+
+        contextInterComms.push_back(contextInterComm);
+        MPI_Comm_free(&inter);
+        delete [] buff ;
+
+      }
+    }
+
+/*!
+ * \fn void CClient::callOasisEnddef(void)
+ * \brief Send the order to the servers to call "oasis_enddef". It must be done by each compound of models before calling oasis_enddef on client side
+ * Function is only called by client.
+ */
+    void CClient::callOasisEnddef(void)
+    {
+      bool oasisEnddef=CXios::getin<bool>("call_oasis_enddef",true) ;
+      if (!oasisEnddef) ERROR("void CClient::callOasisEnddef(void)", <<"Function xios_oasis_enddef called but variable <call_oasis_enddef> is set to false."<<endl
+                                                                     <<"Variable <call_oasis_enddef> must be set to true"<<endl) ;
+      if (CXios::isServer)
+      // Attached mode
+      {
+        // nothing to do   
+      }
+      else
+      {
+        int rank ;
+        int msg=0 ;
+
+        MPI_Comm_rank(intraComm,&rank) ;
+        if (rank==0) 
+        {
+          MPI_Send(&msg,1,MPI_INT,0,5,interComm) ; // tags oasis_endded = 5
+        }
+
+      }
+    }
+
+
+    void CClient::finalize(void)
+    {
+      int rank ;
+      int msg=0 ;
+
+      MPI_Comm_rank(intraComm,&rank) ;
+ 
+      if (!CXios::isServer)
+      {
+        MPI_Comm_rank(intraComm,&rank) ;
+        if (rank==0)
+        {
+          MPI_Send(&msg,1,MPI_INT,0,0,interComm) ;
+        }
+      }
+
+      for (std::list<MPI_Comm>::iterator it = contextInterComms.begin(); it != contextInterComms.end(); it++)
+        MPI_Comm_free(&(*it));
+      MPI_Comm_free(&interComm);
+      MPI_Comm_free(&intraComm);
+
+      CTimer::get("XIOS init/finalize").suspend() ;
+      CTimer::get("XIOS").suspend() ;
+
+      if (!is_MPI_Initialized)
+      {
+        if (CXios::usingOasis) oasis_finalize();
+        else MPI_Finalize() ;
+      }
+      
+      info(20) << "Client side context is finalized"<<endl ;
+      report(0) <<" Performance report : Whole time from XIOS init and finalize: "<< CTimer::get("XIOS init/finalize").getCumulatedTime()<<" s"<<endl ;
+      report(0) <<" Performance report : total time spent for XIOS : "<< CTimer::get("XIOS").getCumulatedTime()<<" s"<<endl ;
+      report(0)<< " Performance report : time spent for waiting free buffer : "<< CTimer::get("Blocking time").getCumulatedTime()<<" s"<<endl ;
+      report(0)<< " Performance report : Ratio : "<< CTimer::get("Blocking time").getCumulatedTime()/CTimer::get("XIOS init/finalize").getCumulatedTime()*100.<<" %"<<endl ;
+      report(0)<< " Performance report : This ratio must be close to zero. Otherwise it may be usefull to increase buffer size or numbers of server"<<endl ;
+//      report(0)<< " Memory report : Current buffer_size : "<<CXios::bufferSize<<endl ;
+      report(0)<< " Memory report : Minimum buffer size required : " << CClientBuffer::maxRequestSize << " bytes" << endl ;
+      report(0)<< " Memory report : increasing it by a factor will increase performance, depending of the volume of data wrote in file at each time step of the file"<<endl ;
+      report(100)<<CTimer::getAllCumulatedTime()<<endl ;
+   }
+
+    /*!
+    * Return global rank without oasis and current rank in model intraComm in case of oasis
+    */
+   int CClient::getRank()
+   {
+     return rank_;
+   }
+
+    /*!
+    * Open a file specified by a suffix and an extension and use it for the given file buffer.
+    * The file name will be suffix+rank+extension.
+    * 
+    * \param fileName[in] protype file name
+    * \param ext [in] extension of the file
+    * \param fb [in/out] the file buffer
+    */
+    void CClient::openStream(const StdString& fileName, const StdString& ext, std::filebuf* fb)
+    {
+      StdStringStream fileNameClient;
+      int numDigit = 0;
+      int size = 0;
+      int rank;
+      MPI_Comm_size(CXios::globalComm, &size);
+      while (size)
+      {
+        size /= 10;
+        ++numDigit;
+      }
+
+      if (CXios::usingOasis)
+      {
+        MPI_Comm_rank(CXios::globalComm,&rank);
+        fileNameClient << fileName << "_" << std::setfill('0') << std::setw(numDigit) << rank << ext;
+      }
+      else
+        fileNameClient << fileName << "_" << std::setfill('0') << std::setw(numDigit) << getRank() << ext;
+
+
+      fb->open(fileNameClient.str().c_str(), std::ios::out);
+      if (!fb->is_open())
+        ERROR("void CClient::openStream(const StdString& fileName, const StdString& ext, std::filebuf* fb)",
+              << std::endl << "Can not open <" << fileNameClient.str() << "> file to write the client log(s).");
+    }
+
+    /*!
+    * \brief Open a file stream to write the info logs
+    * Open a file stream with a specific file name suffix+rank
+    * to write the info logs.
+    * \param fileName [in] protype file name
+    */
+    void CClient::openInfoStream(const StdString& fileName)
+    {
+      std::filebuf* fb = m_infoStream.rdbuf();
+      openStream(fileName, ".out", fb);
+
+      info.write2File(fb);
+      report.write2File(fb);
+    }
+
+    //! Write the info logs to standard output
+    void CClient::openInfoStream()
+    {
+      info.write2StdOut();
+      report.write2StdOut();
+    }
+
+    //! Close the info logs file if it opens
+    void CClient::closeInfoStream()
+    {
+      if (m_infoStream.is_open()) m_infoStream.close();
+    }
+
+    /*!
+    * \brief Open a file stream to write the error log
+    * Open a file stream with a specific file name suffix+rank
+    * to write the error log.
+    * \param fileName [in] protype file name
+    */
+    void CClient::openErrorStream(const StdString& fileName)
+    {
+      std::filebuf* fb = m_errorStream.rdbuf();
+      openStream(fileName, ".err", fb);
+
+      error.write2File(fb);
+    }
+
+    //! Write the error log to standard error output
+    void CClient::openErrorStream()
+    {
+      error.write2StdErr();
+    }
+
+    //! Close the error log file if it opens
+    void CClient::closeErrorStream()
+    {
+      if (m_errorStream.is_open()) m_errorStream.close();
+    }
+}
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/client.hpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/client.hpp	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/client.hpp	(revision 1749)
@@ -0,0 +1,51 @@
+#ifndef __CLIENT_HPP__
+#define __CLIENT_HPP__
+
+#include "xios_spl.hpp"
+#include "mpi.hpp"
+
+namespace xios
+{
+    class CClient
+    {
+      public:
+        static void initialize(const string& codeId, MPI_Comm& localComm, MPI_Comm& returnComm);
+        static void finalize(void);
+        static void registerContext(const string& id, MPI_Comm contextComm);
+        static void callOasisEnddef(void) ;
+
+        static MPI_Comm intraComm;
+        static MPI_Comm interComm;
+        static std::list<MPI_Comm> contextInterComms;
+        static int serverLeader;
+        static bool is_MPI_Initialized ;
+
+        static MPI_Comm& getInterComm();
+
+        //! Get global rank without oasis and current rank in model intraComm in case of oasis
+        static int getRank();
+
+        //! Open a file stream to write the info logs
+        static void openInfoStream(const StdString& fileName);
+        //! Write the info logs to standard output
+        static void openInfoStream();
+        //! Close the info logs file if it opens
+        static void closeInfoStream();
+
+        //! Open a file stream to write the error log
+        static void openErrorStream(const StdString& fileName);
+        //! Write the error log to standard error output
+        static void openErrorStream();
+        //! Close the error log file if it opens
+        static void closeErrorStream();
+
+      protected:
+        static int rank_;                 //!< Rank in model intraComm
+        static StdOFStream m_infoStream;
+        static StdOFStream m_errorStream;
+
+        static void openStream(const StdString& fileName, const StdString& ext, std::filebuf* fb);
+    };
+}
+
+#endif
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/client_client_dht_decl.cpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/client_client_dht_decl.cpp	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/client_client_dht_decl.cpp	(revision 1749)
@@ -0,0 +1,19 @@
+/*!
+   \file client_client_dht.cpp
+   \author Ha NGUYEN
+   \since 05 Oct 2015
+   \date 23 Mars 2016
+
+   \brief Distributed hashed table implementation.
+ */
+#include "client_client_dht_template_impl.hpp"
+
+namespace xios
+{
+
+template class CClientClientDHTTemplate<int>;
+template class CClientClientDHTTemplate<size_t>;
+template class CClientClientDHTTemplate<double>;
+template class CClientClientDHTTemplate<PairIntInt>;
+
+}
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/client_client_dht_template.hpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/client_client_dht_template.hpp	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/client_client_dht_template.hpp	(revision 1749)
@@ -0,0 +1,132 @@
+/*!
+   \file client_client_dht_template.hpp
+   \author Ha NGUYEN
+   \since 01 Oct 2015
+   \date 15 April 2016
+
+   \brief Distributed hashed table implementation.
+ */
+
+#ifndef __XIOS_CLIENT_CLIENT_DHT_TEMPLATE_HPP__
+#define __XIOS_CLIENT_CLIENT_DHT_TEMPLATE_HPP__
+
+#include "xios_spl.hpp"
+#include "array_new.hpp"
+#include "mpi.hpp"
+#include "policy.hpp"
+#include  <unordered_map>
+#include "dht_data_types.hpp"
+
+namespace xios
+{
+template<typename T, class HierarchyPolicy = DivideAdaptiveComm> class CClientClientDHTTemplate;
+
+/*!
+  \class CClientClientDHTTemplate
+  This class provides the similar features like \class CClientServerMappingDistributed,
+which implements a simple distributed hashed table; Moreover, by extending with hierarchical structure,
+it allows to reduce greatly the number of communication among processes.
+*/
+template<typename T, typename HierarchyPolicy>
+class CClientClientDHTTemplate: public HierarchyPolicy
+{
+  public:
+    typedef T InfoType;
+    static const int infoTypeSize = sizeof(InfoType);
+//    typedef typename std::unordered_map<InfoType, std::vector<size_t> > InfoType2IndexMap;
+    typedef typename std::unordered_map<size_t,InfoType> Index2InfoTypeMap;
+    typedef typename std::unordered_map<size_t,std::vector<InfoType> > Index2VectorInfoTypeMap;
+
+  public:
+    CClientClientDHTTemplate(const Index2InfoTypeMap& indexInfoInitMap,
+                             const MPI_Comm& clientIntraComm);
+
+    CClientClientDHTTemplate(const Index2VectorInfoTypeMap& indexInfoInitMap,
+                             const MPI_Comm& clientIntraComm);
+
+    void computeIndexInfoMapping(const CArray<size_t,1>& indices);
+
+    const Index2VectorInfoTypeMap& getInfoIndexMap() const {return indexToInfoMappingLevel_; }
+    Index2VectorInfoTypeMap& getInfoIndexMap() {return indexToInfoMappingLevel_; }
+    int getNbClient() { return nbClient_; }
+
+    /** Default destructor */
+    virtual ~CClientClientDHTTemplate();
+
+  protected:
+    CClientClientDHTTemplate(const MPI_Comm& clientIntraComm);
+
+  protected:
+
+
+    // Redistribute index and info among clients
+    void computeDistributedIndex(const Index2InfoTypeMap& indexInfoInitMap,
+                                 const MPI_Comm& intraCommLevel,
+                                 int level);
+
+    void computeDistributedIndex(const Index2VectorInfoTypeMap& indexInfoInitMap,
+                                 const MPI_Comm& intraCommLevel,
+                                 int level);
+
+
+    void computeHashIndex(std::vector<size_t>& indexClientHash, int nbClient);
+
+    void computeIndexInfoMappingLevel(const CArray<size_t,1>& indices,
+                                      const MPI_Comm& intraCommLevel,
+                                      int level);
+
+    void computeSendRecvRank(int level, int rank);
+
+    void sendRecvRank(int level,
+                      const std::vector<int>& sendNbRank, const std::vector<int>& sendNbElements,
+                      std::vector<int>& recvNbRank, std::vector<int>& recvNbElements);
+
+  protected:
+    // Send information to clients
+    void sendInfoToClients(int clientDestRank, unsigned char* info, int infoSize,
+                           const MPI_Comm& clientIntraComm,
+                           std::vector<MPI_Request>& requestSendInfo);
+
+    void recvInfoFromClients(int clientSrcRank, unsigned char* info, int infoSize,
+                            const MPI_Comm& clientIntraComm,
+                            std::vector<MPI_Request>& requestRecvInfo);
+
+    // Send global index to clients
+    void sendIndexToClients(int clientDestRank, size_t* indices, size_t indiceSize,
+                            const MPI_Comm& clientIntraComm,
+                            std::vector<MPI_Request>& requestSendIndexGlobal);
+
+    void recvIndexFromClients(int clientSrcRank, size_t* indices, size_t indiceSize,
+                             const MPI_Comm& clientIntraComm,
+                             std::vector<MPI_Request>& requestRecvIndex);
+
+    void sendRecvOnReturn(const std::vector<int>& sendNbRank, std::vector<int>& sendNbElements,
+                          const std::vector<int>& recvNbRank, std::vector<int>& recvNbElements);
+
+  protected:
+    //! Mapping of global index to the corresponding client
+    Index2VectorInfoTypeMap index2InfoMapping_;
+
+    //! A mapping of index to the corresponding information in each level of hierarchy
+    Index2VectorInfoTypeMap indexToInfoMappingLevel_;
+
+    //! Rank of client to send on each DHT level
+    std::vector<std::vector<int> > sendRank_;
+
+    //! Rank of client to receive on each DHT level
+    std::vector<std::vector<int> > recvRank_;
+
+    //! Flag to specify whether data is distributed or not
+    bool isDataDistributed_;
+
+    //! Number of client
+    int nbClient_;
+};
+
+typedef CClientClientDHTTemplate<int> CClientClientDHTInt;
+typedef CClientClientDHTTemplate<size_t> CClientClientDHTSizet;
+typedef CClientClientDHTTemplate<double> CClientClientDHTDouble;
+typedef CClientClientDHTTemplate<PairIntInt> CClientClientDHTPairIntInt;
+
+} // namespace xios
+#endif // __XIOS_CLIENT_CLIENT_DHT_TEMPLATE_HPP__
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/client_client_dht_template_impl.hpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/client_client_dht_template_impl.hpp	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/client_client_dht_template_impl.hpp	(revision 1749)
@@ -0,0 +1,737 @@
+/*!
+   \file client_client_dht_template_impl.hpp
+   \author Ha NGUYEN
+   \since 05 Oct 2015
+   \date 23 Mars 2016
+
+   \brief Distributed hashed table implementation.
+ */
+#include "client_client_dht_template.hpp"
+#include "utils.hpp"
+#include "mpi_tag.hpp"
+
+namespace xios
+{
+template<typename T, typename H>
+CClientClientDHTTemplate<T,H>::CClientClientDHTTemplate(const MPI_Comm& clientIntraComm)
+  : H(clientIntraComm), index2InfoMapping_(), indexToInfoMappingLevel_(), nbClient_(0)
+{
+  MPI_Comm_size(clientIntraComm, &nbClient_);
+  this->computeMPICommLevel();
+  int nbLvl = this->getNbLevel();
+  sendRank_.resize(nbLvl);
+  recvRank_.resize(nbLvl);
+}
+
+/*!
+  Constructor with initial distribution information and the corresponding index
+  Each client (process) holds a piece of information as well as the attached index, the index
+will be redistributed (projected) into size_t space as long as the associated information.
+  \param [in] indexInfoMap initial index and information mapping
+  \param [in] clientIntraComm communicator of clients
+  \param [in] hierarLvl level of hierarchy
+*/
+template<typename T, typename H>
+CClientClientDHTTemplate<T,H>::CClientClientDHTTemplate(const Index2InfoTypeMap& indexInfoMap,
+                                                        const MPI_Comm& clientIntraComm)
+  : H(clientIntraComm), index2InfoMapping_(), indexToInfoMappingLevel_(), nbClient_(0)
+{
+  MPI_Comm_size(clientIntraComm, &nbClient_);
+  this->computeMPICommLevel();
+  int nbLvl = this->getNbLevel();
+  sendRank_.resize(nbLvl);
+  recvRank_.resize(nbLvl);
+  Index2VectorInfoTypeMap indexToVecInfoMap;
+  indexToVecInfoMap.rehash(std::ceil(indexInfoMap.size()/indexToVecInfoMap.max_load_factor()));
+  typename Index2InfoTypeMap::const_iterator it = indexInfoMap.begin(), ite = indexInfoMap.end();
+  for (; it != ite; ++it) indexToVecInfoMap[it->first].push_back(it->second);
+  computeDistributedIndex(indexToVecInfoMap, clientIntraComm, nbLvl-1);
+}
+
+/*!
+  Constructor with initial distribution information and the corresponding index
+  Each client (process) holds a piece of information as well as the attached index, the index
+will be redistributed (projected) into size_t space as long as the associated information.
+  \param [in] indexInfoMap initial index and information mapping
+  \param [in] clientIntraComm communicator of clients
+  \param [in] hierarLvl level of hierarchy
+*/
+template<typename T, typename H>
+CClientClientDHTTemplate<T,H>::CClientClientDHTTemplate(const Index2VectorInfoTypeMap& indexInfoMap,
+                                                        const MPI_Comm& clientIntraComm)
+  : H(clientIntraComm), index2InfoMapping_(), indexToInfoMappingLevel_(), nbClient_(0)
+{
+  MPI_Comm_size(clientIntraComm, &nbClient_);
+  this->computeMPICommLevel();
+  int nbLvl = this->getNbLevel();
+  sendRank_.resize(nbLvl);
+  recvRank_.resize(nbLvl);
+  computeDistributedIndex(indexInfoMap, clientIntraComm, nbLvl-1);
+}
+
+template<typename T, typename H>
+CClientClientDHTTemplate<T,H>::~CClientClientDHTTemplate()
+{
+}
+
+/*!
+  Compute mapping between indices and information corresponding to these indices
+  \param [in] indices indices a proc has
+*/
+template<typename T, typename H>
+void CClientClientDHTTemplate<T,H>::computeIndexInfoMapping(const CArray<size_t,1>& indices)
+{
+  int nbLvl = this->getNbLevel();
+  computeIndexInfoMappingLevel(indices, this->internalComm_, nbLvl-1);
+}
+
+/*!
+    Compute mapping between indices and information corresponding to these indices
+for each level of hierarchical DHT. Recursive function
+   \param [in] indices indices a proc has
+   \param [in] commLevel communicator of current level
+   \param [in] level current level
+*/
+template<typename T, typename H>
+void CClientClientDHTTemplate<T,H>::computeIndexInfoMappingLevel(const CArray<size_t,1>& indices,
+                                                                 const MPI_Comm& commLevel,
+                                                                 int level)
+{
+  int clientRank;
+  MPI_Comm_rank(commLevel,&clientRank);
+  int groupRankBegin = this->getGroupBegin()[level];
+  int nbClient = this->getNbInGroup()[level];
+  std::vector<size_t> hashedIndex;
+  computeHashIndex(hashedIndex, nbClient);
+
+  size_t ssize = indices.numElements(), hashedVal;
+
+  std::vector<size_t>::const_iterator itbClientHash = hashedIndex.begin(), itClientHash,
+                                      iteClientHash = hashedIndex.end();
+  std::vector<int> sendBuff(nbClient,0);
+  std::vector<int> sendNbIndexBuff(nbClient,0);
+
+  // Number of global index whose mapping server are on other clients
+  int nbIndexToSend = 0;
+  size_t index;
+  HashXIOS<size_t> hashGlobalIndex;
+  std::unordered_map<size_t,int> nbIndices;
+  nbIndices.rehash(std::ceil(ssize/nbIndices.max_load_factor()));
+  for (int i = 0; i < ssize; ++i)
+  {
+    index = indices(i);
+    if (0 == nbIndices.count(index))
+    {
+      hashedVal  = hashGlobalIndex(index);
+      itClientHash = std::upper_bound(itbClientHash, iteClientHash, hashedVal);
+      int indexClient = std::distance(itbClientHash, itClientHash)-1;
+      ++sendNbIndexBuff[indexClient];
+      nbIndices[index] = 1;
+    }
+  }
+
+  std::unordered_map<int, size_t* > client2ClientIndex;
+  for (int idx = 0; idx < nbClient; ++idx)
+  {
+    if (0 != sendNbIndexBuff[idx])
+    {
+      client2ClientIndex[idx+groupRankBegin] = new unsigned long [sendNbIndexBuff[idx]];
+      nbIndexToSend += sendNbIndexBuff[idx];
+      sendBuff[idx] = 1;
+      sendNbIndexBuff[idx] = 0;
+    }
+  }
+
+  for (int i = 0; i < ssize; ++i)
+  {
+    index = indices(i);
+    if (1 == nbIndices[index])
+    {
+      hashedVal  = hashGlobalIndex(index);
+      itClientHash = std::upper_bound(itbClientHash, iteClientHash, hashedVal);
+      int indexClient = std::distance(itbClientHash, itClientHash)-1;
+      client2ClientIndex[indexClient+groupRankBegin][sendNbIndexBuff[indexClient]] = index;
+      ++sendNbIndexBuff[indexClient];
+      ++nbIndices[index];
+    }
+  }
+
+  std::vector<int> recvRankClient, recvNbIndexClientCount;
+  sendRecvRank(level, sendBuff, sendNbIndexBuff,
+               recvRankClient, recvNbIndexClientCount);
+
+  int recvNbIndexCount = 0;
+  for (int idx = 0; idx < recvNbIndexClientCount.size(); ++idx)
+    recvNbIndexCount += recvNbIndexClientCount[idx];
+
+  unsigned long* recvIndexBuff;
+  if (0 != recvNbIndexCount)
+    recvIndexBuff = new unsigned long[recvNbIndexCount];
+
+  std::vector<MPI_Request> request;
+  std::vector<int>::iterator itbRecvIndex = recvRankClient.begin(), itRecvIndex,
+                             iteRecvIndex = recvRankClient.end(),
+                           itbRecvNbIndex = recvNbIndexClientCount.begin(),
+                           itRecvNbIndex;
+  int currentIndex = 0;
+  int nbRecvClient = recvRankClient.size();
+  for (int idx = 0; idx < nbRecvClient; ++idx)
+  {
+    if (0 != recvNbIndexClientCount[idx])
+      recvIndexFromClients(recvRankClient[idx], recvIndexBuff+currentIndex, recvNbIndexClientCount[idx], commLevel, request);
+    currentIndex += recvNbIndexClientCount[idx];
+  }
+
+  std::unordered_map<int, size_t* >::iterator itbIndex = client2ClientIndex.begin(), itIndex,
+                                                iteIndex = client2ClientIndex.end();
+  for (itIndex = itbIndex; itIndex != iteIndex; ++itIndex)
+    sendIndexToClients(itIndex->first, (itIndex->second), sendNbIndexBuff[itIndex->first-groupRankBegin], commLevel, request);
+
+  std::vector<MPI_Status> status(request.size());
+  MPI_Waitall(request.size(), &request[0], &status[0]);
+
+  CArray<size_t,1>* tmpGlobalIndex;
+  if (0 != recvNbIndexCount)
+    tmpGlobalIndex = new CArray<size_t,1>(recvIndexBuff, shape(recvNbIndexCount), neverDeleteData);
+  else
+    tmpGlobalIndex = new CArray<size_t,1>();
+
+  // OK, we go to the next level and do something recursive
+  if (0 < level)
+  {
+    --level;
+    computeIndexInfoMappingLevel(*tmpGlobalIndex, this->internalComm_, level);
+  }
+  else // Now, we are in the last level where necessary mappings are.
+    indexToInfoMappingLevel_= (index2InfoMapping_);
+
+  typename Index2VectorInfoTypeMap::const_iterator iteIndexToInfoMap = indexToInfoMappingLevel_.end(), itIndexToInfoMap;
+  std::vector<int> sendNbIndexOnReturn(nbRecvClient,0);
+  currentIndex = 0;
+  for (int idx = 0; idx < nbRecvClient; ++idx)
+  {
+    for (int i = 0; i < recvNbIndexClientCount[idx]; ++i)
+    {
+      itIndexToInfoMap = indexToInfoMappingLevel_.find(*(recvIndexBuff+currentIndex+i));
+      if (iteIndexToInfoMap != itIndexToInfoMap)
+        sendNbIndexOnReturn[idx] += itIndexToInfoMap->second.size();
+    }
+    currentIndex += recvNbIndexClientCount[idx];
+  }
+
+  std::vector<int> recvRankOnReturn(client2ClientIndex.size());
+  std::vector<int> recvNbIndexOnReturn(client2ClientIndex.size(),0);
+  int indexIndex = 0;
+  for (itIndex = itbIndex; itIndex != iteIndex; ++itIndex, ++indexIndex)
+  {
+    recvRankOnReturn[indexIndex] = itIndex->first;
+  }
+  sendRecvOnReturn(recvRankClient, sendNbIndexOnReturn,
+                   recvRankOnReturn, recvNbIndexOnReturn);
+
+  int recvNbIndexCountOnReturn = 0;
+  for (int idx = 0; idx < recvRankOnReturn.size(); ++idx)
+    recvNbIndexCountOnReturn += recvNbIndexOnReturn[idx];
+
+  unsigned long* recvIndexBuffOnReturn;
+  unsigned char* recvInfoBuffOnReturn;
+  if (0 != recvNbIndexCountOnReturn)
+  {
+    recvIndexBuffOnReturn = new unsigned long[recvNbIndexCountOnReturn];
+    recvInfoBuffOnReturn = new unsigned char[recvNbIndexCountOnReturn*ProcessDHTElement<InfoType>::typeSize()];
+  }
+
+  std::vector<MPI_Request> requestOnReturn;
+  currentIndex = 0;
+  for (int idx = 0; idx < recvRankOnReturn.size(); ++idx)
+  {
+    if (0 != recvNbIndexOnReturn[idx])
+    {
+      recvIndexFromClients(recvRankOnReturn[idx], recvIndexBuffOnReturn+currentIndex, recvNbIndexOnReturn[idx], commLevel, requestOnReturn);
+      recvInfoFromClients(recvRankOnReturn[idx],
+                          recvInfoBuffOnReturn+currentIndex*ProcessDHTElement<InfoType>::typeSize(),
+                          recvNbIndexOnReturn[idx]*ProcessDHTElement<InfoType>::typeSize(),
+                          commLevel, requestOnReturn);
+    }
+    currentIndex += recvNbIndexOnReturn[idx];
+  }
+
+  std::unordered_map<int,unsigned char*> client2ClientInfoOnReturn;
+  std::unordered_map<int,size_t*> client2ClientIndexOnReturn;
+  currentIndex = 0;
+  for (int idx = 0; idx < nbRecvClient; ++idx)
+  {
+    if (0 != sendNbIndexOnReturn[idx])
+    {
+      int rank = recvRankClient[idx];
+      client2ClientIndexOnReturn[rank] = new unsigned long [sendNbIndexOnReturn[idx]];
+      client2ClientInfoOnReturn[rank] = new unsigned char [sendNbIndexOnReturn[idx]*ProcessDHTElement<InfoType>::typeSize()];
+      unsigned char* tmpInfoPtr = client2ClientInfoOnReturn[rank];
+      int infoIndex = 0;
+      int nb = 0;
+      for (int i = 0; i < recvNbIndexClientCount[idx]; ++i)
+      {
+        itIndexToInfoMap = indexToInfoMappingLevel_.find(*(recvIndexBuff+currentIndex+i));
+        if (iteIndexToInfoMap != itIndexToInfoMap)
+        {
+          const std::vector<InfoType>& infoTmp = itIndexToInfoMap->second;
+          for (int k = 0; k < infoTmp.size(); ++k)
+          {
+            client2ClientIndexOnReturn[rank][nb] = itIndexToInfoMap->first;
+            ProcessDHTElement<InfoType>::packElement(infoTmp[k], tmpInfoPtr, infoIndex);
+            ++nb;
+          }
+        }
+      }
+
+      sendIndexToClients(rank, client2ClientIndexOnReturn[rank],
+                         sendNbIndexOnReturn[idx], commLevel, requestOnReturn);
+      sendInfoToClients(rank, client2ClientInfoOnReturn[rank],
+                        sendNbIndexOnReturn[idx]*ProcessDHTElement<InfoType>::typeSize(), commLevel, requestOnReturn);
+    }
+    currentIndex += recvNbIndexClientCount[idx];
+  }
+
+  std::vector<MPI_Status> statusOnReturn(requestOnReturn.size());
+  MPI_Waitall(requestOnReturn.size(), &requestOnReturn[0], &statusOnReturn[0]);
+
+  Index2VectorInfoTypeMap indexToInfoMapping;
+  indexToInfoMapping.rehash(std::ceil(recvNbIndexCountOnReturn/indexToInfoMapping.max_load_factor()));
+  int infoIndex = 0;
+  InfoType unpackedInfo;
+  for (int idx = 0; idx < recvNbIndexCountOnReturn; ++idx)
+  {
+    ProcessDHTElement<InfoType>::unpackElement(unpackedInfo, recvInfoBuffOnReturn, infoIndex);
+    indexToInfoMapping[recvIndexBuffOnReturn[idx]].push_back(unpackedInfo);
+  }
+
+  indexToInfoMappingLevel_.swap(indexToInfoMapping);
+  if (0 != recvNbIndexCount) delete [] recvIndexBuff;
+  for (std::unordered_map<int,size_t*>::const_iterator it = client2ClientIndex.begin();
+                                                        it != client2ClientIndex.end(); ++it)
+      delete [] it->second;
+  delete tmpGlobalIndex;
+
+  if (0 != recvNbIndexCountOnReturn)
+  {
+    delete [] recvIndexBuffOnReturn;
+    delete [] recvInfoBuffOnReturn;
+  }
+
+  for (std::unordered_map<int,unsigned char*>::const_iterator it = client2ClientInfoOnReturn.begin();
+                                                               it != client2ClientInfoOnReturn.end(); ++it)
+      delete [] it->second;
+
+  for (std::unordered_map<int,size_t*>::const_iterator it = client2ClientIndexOnReturn.begin();
+                                            it != client2ClientIndexOnReturn.end(); ++it)
+      delete [] it->second;
+}
+
+/*!
+  Compute the hash index distribution of whole size_t space then each client will have a range of this distribution
+*/
+template<typename T, typename H>
+void CClientClientDHTTemplate<T,H>::computeHashIndex(std::vector<size_t>& hashedIndex, int nbClient)
+{
+  // Compute range of hash index for each client
+  hashedIndex.resize(nbClient+1);
+  size_t nbHashIndexMax = std::numeric_limits<size_t>::max();
+  size_t nbHashIndex;
+  hashedIndex[0] = 0;
+  for (int i = 1; i < nbClient; ++i)
+  {
+    nbHashIndex = nbHashIndexMax / nbClient;
+    if (i < (nbHashIndexMax%nbClient)) ++nbHashIndex;
+    hashedIndex[i] = hashedIndex[i-1] + nbHashIndex;
+  }
+  hashedIndex[nbClient] = nbHashIndexMax;
+}
+
+/*!
+  Compute distribution of global index for servers
+  Each client already holds a piece of information and its associated index.
+This information will be redistributed among processes by projecting indices into size_t space,
+the corresponding information will be also distributed on size_t space.
+After the redistribution, each client holds rearranged index and its corresponding information.
+  \param [in] indexInfoMap index and its corresponding info (usually server index)
+  \param [in] commLevel communicator of current level
+  \param [in] level current level
+*/
+template<typename T, typename H>
+void CClientClientDHTTemplate<T,H>::computeDistributedIndex(const Index2VectorInfoTypeMap& indexInfoMap,
+                                                            const MPI_Comm& commLevel,
+                                                            int level)
+{
+  int clientRank;
+  MPI_Comm_rank(commLevel,&clientRank);
+  computeSendRecvRank(level, clientRank);
+
+  int groupRankBegin = this->getGroupBegin()[level];
+  int nbClient = this->getNbInGroup()[level];
+  std::vector<size_t> hashedIndex;
+  computeHashIndex(hashedIndex, nbClient);
+
+  std::vector<int> sendBuff(nbClient,0);
+  std::vector<int> sendNbIndexBuff(nbClient,0);
+  std::vector<size_t>::const_iterator itbClientHash = hashedIndex.begin(), itClientHash,
+                                      iteClientHash = hashedIndex.end();
+  typename Index2VectorInfoTypeMap::const_iterator itb = indexInfoMap.begin(),it,
+                                                   ite = indexInfoMap.end();
+  HashXIOS<size_t> hashGlobalIndex;
+
+  // Compute size of sending and receving buffer
+  for (it = itb; it != ite; ++it)
+  {
+    size_t hashIndex = hashGlobalIndex(it->first);
+    itClientHash = std::upper_bound(itbClientHash, iteClientHash, hashIndex);
+    int indexClient = std::distance(itbClientHash, itClientHash)-1;
+    sendNbIndexBuff[indexClient] += it->second.size();
+  }
+
+  std::unordered_map<int, size_t*> client2ClientIndex;
+  std::unordered_map<int, unsigned char*> client2ClientInfo;
+  for (int idx = 0; idx < nbClient; ++idx)
+  {
+    if (0 != sendNbIndexBuff[idx])
+    {
+      client2ClientIndex[idx+groupRankBegin] = new unsigned long [sendNbIndexBuff[idx]];
+      client2ClientInfo[idx+groupRankBegin] = new unsigned char [sendNbIndexBuff[idx]*ProcessDHTElement<InfoType>::typeSize()];
+      sendNbIndexBuff[idx] = 0;
+      sendBuff[idx] = 1;
+    }
+  }
+
+  std::vector<int> sendNbInfo(nbClient,0);
+  for (it = itb; it != ite; ++it)
+  {
+    const std::vector<InfoType>& infoTmp = it->second;
+    size_t hashIndex = hashGlobalIndex(it->first);
+    itClientHash = std::upper_bound(itbClientHash, iteClientHash, hashIndex);
+    int indexClient = std::distance(itbClientHash, itClientHash)-1;
+    for (int idx = 0; idx < infoTmp.size(); ++idx)
+    {
+      client2ClientIndex[indexClient + groupRankBegin][sendNbIndexBuff[indexClient]] = it->first;;
+  //          ProcessDHTElement<InfoType>::packElement(it->second, client2ClientInfo[indexClient + groupRankBegin], sendNbInfo[indexClient]);
+      ProcessDHTElement<InfoType>::packElement(infoTmp[idx], client2ClientInfo[indexClient + groupRankBegin], sendNbInfo[indexClient]);
+      ++sendNbIndexBuff[indexClient];
+    }
+  }
+
+  // Calculate from how many clients each client receive message.
+  // Calculate size of buffer for receiving message
+  std::vector<int> recvRankClient, recvNbIndexClientCount;
+  sendRecvRank(level, sendBuff, sendNbIndexBuff,
+               recvRankClient, recvNbIndexClientCount);
+
+  int recvNbIndexCount = 0;
+  for (int idx = 0; idx < recvNbIndexClientCount.size(); ++idx)
+    recvNbIndexCount += recvNbIndexClientCount[idx];
+
+  unsigned long* recvIndexBuff;
+  unsigned char* recvInfoBuff;
+  if (0 != recvNbIndexCount)
+  {
+    recvIndexBuff = new unsigned long[recvNbIndexCount];
+    recvInfoBuff = new unsigned char[recvNbIndexCount*ProcessDHTElement<InfoType>::typeSize()];
+  }
+
+  // If a client holds information about index and the corresponding which don't belong to it,
+  // it will send a message to the correct clients.
+  // Contents of the message are index and its corresponding informatioin
+  std::vector<MPI_Request> request;
+  int currentIndex = 0;
+  int nbRecvClient = recvRankClient.size();
+  for (int idx = 0; idx < nbRecvClient; ++idx)
+  {
+    if (0 != recvNbIndexClientCount[idx])
+    {
+      recvIndexFromClients(recvRankClient[idx], recvIndexBuff+currentIndex, recvNbIndexClientCount[idx], commLevel, request);
+      recvInfoFromClients(recvRankClient[idx],
+                          recvInfoBuff+currentIndex*ProcessDHTElement<InfoType>::typeSize(),
+                          recvNbIndexClientCount[idx]*ProcessDHTElement<InfoType>::typeSize(),
+                          commLevel, request);
+    }
+    currentIndex += recvNbIndexClientCount[idx];
+  }
+
+  std::unordered_map<int, size_t* >::iterator itbIndex = client2ClientIndex.begin(), itIndex,
+                                                iteIndex = client2ClientIndex.end();
+  for (itIndex = itbIndex; itIndex != iteIndex; ++itIndex)
+    sendIndexToClients(itIndex->first, itIndex->second, sendNbIndexBuff[itIndex->first-groupRankBegin], commLevel, request);
+  std::unordered_map<int, unsigned char*>::iterator itbInfo = client2ClientInfo.begin(), itInfo,
+                                                      iteInfo = client2ClientInfo.end();
+  for (itInfo = itbInfo; itInfo != iteInfo; ++itInfo)
+    sendInfoToClients(itInfo->first, itInfo->second, sendNbInfo[itInfo->first-groupRankBegin], commLevel, request);
+
+  std::vector<MPI_Status> status(request.size());
+  MPI_Waitall(request.size(), &request[0], &status[0]);
+
+  Index2VectorInfoTypeMap indexToInfoMapping;
+  indexToInfoMapping.rehash(std::ceil(currentIndex/indexToInfoMapping.max_load_factor()));
+  currentIndex = 0;
+  InfoType infoValue;
+  int infoIndex = 0;
+  unsigned char* infoBuff = recvInfoBuff;
+  for (int idx = 0; idx < nbRecvClient; ++idx)
+  {
+    size_t index;
+    int count = recvNbIndexClientCount[idx];
+    for (int i = 0; i < count; ++i)
+    {
+      ProcessDHTElement<InfoType>::unpackElement(infoValue, infoBuff, infoIndex);
+      indexToInfoMapping[*(recvIndexBuff+currentIndex+i)].push_back(infoValue);
+    }
+    currentIndex += count;
+  }
+
+  if (0 != recvNbIndexCount)
+  {
+    delete [] recvIndexBuff;
+    delete [] recvInfoBuff;
+  }
+  for (std::unordered_map<int,unsigned char*>::const_iterator it = client2ClientInfo.begin();
+                                                               it != client2ClientInfo.end(); ++it)
+      delete [] it->second;
+
+  for (std::unordered_map<int,size_t*>::const_iterator it = client2ClientIndex.begin();
+                                                        it != client2ClientIndex.end(); ++it)
+      delete [] it->second;
+
+  // Ok, now do something recursive
+  if (0 < level)
+  {
+    --level;
+    computeDistributedIndex(indexToInfoMapping, this->internalComm_, level);
+  }
+  else
+    index2InfoMapping_.swap(indexToInfoMapping);
+}
+
+/*!
+  Send message containing index to clients
+  \param [in] clientDestRank rank of destination client
+  \param [in] indices index to send
+  \param [in] indiceSize size of index array to send
+  \param [in] clientIntraComm communication group of client
+  \param [in] requestSendIndex list of sending request
+*/
+template<typename T, typename H>
+void CClientClientDHTTemplate<T,H>::sendIndexToClients(int clientDestRank, size_t* indices, size_t indiceSize,
+                                                       const MPI_Comm& clientIntraComm,
+                                                       std::vector<MPI_Request>& requestSendIndex)
+{
+  MPI_Request request;
+  requestSendIndex.push_back(request);
+  MPI_Isend(indices, indiceSize, MPI_UNSIGNED_LONG,
+            clientDestRank, MPI_DHT_INDEX, clientIntraComm, &(requestSendIndex.back()));
+}
+
+/*!
+  Receive message containing index to clients
+  \param [in] clientDestRank rank of destination client
+  \param [in] indices index to send
+  \param [in] clientIntraComm communication group of client
+  \param [in] requestRecvIndex list of receiving request
+*/
+template<typename T, typename H>
+void CClientClientDHTTemplate<T,H>::recvIndexFromClients(int clientSrcRank, size_t* indices, size_t indiceSize,
+                                                         const MPI_Comm& clientIntraComm,
+                                                         std::vector<MPI_Request>& requestRecvIndex)
+{
+  MPI_Request request;
+  requestRecvIndex.push_back(request);
+  MPI_Irecv(indices, indiceSize, MPI_UNSIGNED_LONG,
+            clientSrcRank, MPI_DHT_INDEX, clientIntraComm, &(requestRecvIndex.back()));
+}
+
+/*!
+  Send message containing information to clients
+  \param [in] clientDestRank rank of destination client
+  \param [in] info info array to send
+  \param [in] infoSize info array size to send
+  \param [in] clientIntraComm communication group of client
+  \param [in] requestSendInfo list of sending request
+*/
+template<typename T, typename H>
+void CClientClientDHTTemplate<T,H>::sendInfoToClients(int clientDestRank, unsigned char* info, int infoSize,
+                                                      const MPI_Comm& clientIntraComm,
+                                                      std::vector<MPI_Request>& requestSendInfo)
+{
+  MPI_Request request;
+  requestSendInfo.push_back(request);
+
+  MPI_Isend(info, infoSize, MPI_CHAR,
+            clientDestRank, MPI_DHT_INFO, clientIntraComm, &(requestSendInfo.back()));
+}
+
+/*!
+  Receive message containing information from other clients
+  \param [in] clientDestRank rank of destination client
+  \param [in] info info array to receive
+  \param [in] infoSize info array size to receive
+  \param [in] clientIntraComm communication group of client
+  \param [in] requestRecvInfo list of sending request
+*/
+template<typename T, typename H>
+void CClientClientDHTTemplate<T,H>::recvInfoFromClients(int clientSrcRank, unsigned char* info, int infoSize,
+                                                        const MPI_Comm& clientIntraComm,
+                                                        std::vector<MPI_Request>& requestRecvInfo)
+{
+  MPI_Request request;
+  requestRecvInfo.push_back(request);
+
+  MPI_Irecv(info, infoSize, MPI_CHAR,
+            clientSrcRank, MPI_DHT_INFO, clientIntraComm, &(requestRecvInfo.back()));
+}
+
+/*!
+  Compute how many processes one process needs to send to and from how many processes it will receive.
+  This computation is only based on hierachical structure of distributed hash table (e.x: number of processes)
+*/
+template<typename T, typename H>
+void CClientClientDHTTemplate<T,H>::computeSendRecvRank(int level, int rank)
+{
+  int groupBegin = this->getGroupBegin()[level];
+  int nbInGroup  = this->getNbInGroup()[level];
+  const std::vector<int>& groupParentBegin = this->getGroupParentsBegin()[level];
+  const std::vector<int>& nbInGroupParents = this->getNbInGroupParents()[level];
+
+  std::vector<size_t> hashedIndexGroup;
+  computeHashIndex(hashedIndexGroup, nbInGroup);
+  size_t a = hashedIndexGroup[rank-groupBegin];
+  size_t b = hashedIndexGroup[rank-groupBegin+1]-1;
+
+  int currentGroup, offset;
+  size_t e,f;
+
+  // Do a simple math [a,b) intersect [c,d)
+  for (int idx = 0; idx < groupParentBegin.size(); ++idx)
+  {
+    std::vector<size_t> hashedIndexGroupParent;
+    int nbInGroupParent = nbInGroupParents[idx];
+    if (0 != nbInGroupParent)
+      computeHashIndex(hashedIndexGroupParent, nbInGroupParent);
+    for (int i = 0; i < nbInGroupParent; ++i)
+    {
+      size_t c = hashedIndexGroupParent[i];
+      size_t d = hashedIndexGroupParent[i+1]-1;
+
+    if (!((d < a) || (b <c)))
+        recvRank_[level].push_back(groupParentBegin[idx]+i);
+    }
+
+    offset = rank - groupParentBegin[idx];
+    if ((offset<nbInGroupParents[idx]) && (0 <= offset))
+    {
+      e = hashedIndexGroupParent[offset];
+      f = hashedIndexGroupParent[offset+1]-1;
+    }
+  }
+
+  std::vector<size_t>::const_iterator itbHashGroup = hashedIndexGroup.begin(), itHashGroup,
+                                      iteHashGroup = hashedIndexGroup.end();
+  itHashGroup = std::lower_bound(itbHashGroup, iteHashGroup, e+1);
+  int begin = std::distance(itbHashGroup, itHashGroup)-1;
+  itHashGroup = std::upper_bound(itbHashGroup, iteHashGroup, f);
+  int end = std::distance(itbHashGroup, itHashGroup) -1;
+  sendRank_[level].resize(end-begin+1);
+  for (int idx = 0; idx < sendRank_[level].size(); ++idx) sendRank_[level][idx] = idx + groupBegin + begin;
+}
+
+/*!
+  Compute number of clients as well as corresponding number of elements each client will receive on returning searching result
+  \param [in] sendNbRank Rank of clients to send to
+  \param [in] sendNbElements Number of elements each client to send to
+  \param [in] receiveNbRank Rank of clients to receive from
+  \param [out] recvNbElements Number of elements each client to send to
+*/
+template<typename T, typename H>
+void CClientClientDHTTemplate<T,H>::sendRecvOnReturn(const std::vector<int>& sendNbRank, std::vector<int>& sendNbElements,
+                                                     const std::vector<int>& recvNbRank, std::vector<int>& recvNbElements)
+{
+  recvNbElements.resize(recvNbRank.size());
+  std::vector<MPI_Request> request(sendNbRank.size()+recvNbRank.size());
+  std::vector<MPI_Status> requestStatus(sendNbRank.size()+recvNbRank.size());
+
+  int nRequest = 0;
+  for (int idx = 0; idx < recvNbRank.size(); ++idx)
+  {
+    MPI_Irecv(&recvNbElements[0]+idx, 1, MPI_INT,
+              recvNbRank[idx], MPI_DHT_INDEX_1, this->internalComm_, &request[nRequest]);
+    ++nRequest;
+  }
+
+  for (int idx = 0; idx < sendNbRank.size(); ++idx)
+  {
+    MPI_Isend(&sendNbElements[0]+idx, 1, MPI_INT,
+              sendNbRank[idx], MPI_DHT_INDEX_1, this->internalComm_, &request[nRequest]);
+    ++nRequest;
+  }
+
+  MPI_Waitall(sendNbRank.size()+recvNbRank.size(), &request[0], &requestStatus[0]);
+}
+
+/*!
+  Send and receive number of process each process need to listen to as well as number
+  of index it will receive during the initalization phase
+  \param [in] level current level
+  \param [in] sendNbRank Rank of clients to send to
+  \param [in] sendNbElements Number of elements each client to send to
+  \param [out] receiveNbRank Rank of clients to receive from
+  \param [out] recvNbElements Number of elements each client to send to
+*/
+template<typename T, typename H>
+void CClientClientDHTTemplate<T,H>::sendRecvRank(int level,
+                                                 const std::vector<int>& sendNbRank, const std::vector<int>& sendNbElements,
+                                                 std::vector<int>& recvNbRank, std::vector<int>& recvNbElements)
+{
+  int groupBegin = this->getGroupBegin()[level];
+
+  int offSet = 0;
+  std::vector<int>& sendRank = sendRank_[level];
+  std::vector<int>& recvRank = recvRank_[level];
+  int sendBuffSize = sendRank.size();
+  std::vector<int> sendBuff(sendBuffSize*2);
+  int recvBuffSize = recvRank.size();
+  std::vector<int> recvBuff(recvBuffSize*2,0);
+
+  std::vector<MPI_Request> request(sendBuffSize+recvBuffSize);
+  std::vector<MPI_Status> requestStatus(sendBuffSize+recvBuffSize);
+
+  int nRequest = 0;
+  for (int idx = 0; idx < recvBuffSize; ++idx)
+  {
+    MPI_Irecv(&recvBuff[0]+2*idx, 2, MPI_INT,
+              recvRank[idx], MPI_DHT_INDEX_0, this->internalComm_, &request[nRequest]);
+    ++nRequest;
+  }
+
+  for (int idx = 0; idx < sendBuffSize; ++idx)
+  {
+    offSet = sendRank[idx]-groupBegin;
+    sendBuff[idx*2] = sendNbRank[offSet];
+    sendBuff[idx*2+1] = sendNbElements[offSet];
+  }
+
+  for (int idx = 0; idx < sendBuffSize; ++idx)
+  {
+    MPI_Isend(&sendBuff[idx*2], 2, MPI_INT,
+              sendRank[idx], MPI_DHT_INDEX_0, this->internalComm_, &request[nRequest]);
+    ++nRequest;
+  }
+
+  MPI_Waitall(sendBuffSize+recvBuffSize, &request[0], &requestStatus[0]);
+  int nbRecvRank = 0, nbRecvElements = 0;
+  recvNbRank.clear();
+  recvNbElements.clear();
+  for (int idx = 0; idx < recvBuffSize; ++idx)
+  {
+    if (0 != recvBuff[2*idx])
+    {
+      recvNbRank.push_back(recvRank[idx]);
+      recvNbElements.push_back(recvBuff[2*idx+1]);
+    }
+  }
+}
+
+}
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/client_server_mapping.cpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/client_server_mapping.cpp	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/client_server_mapping.cpp	(revision 1749)
@@ -0,0 +1,104 @@
+/*!
+   \file client_server_mapping.hpp
+   \author Ha NGUYEN
+   \since 04 Feb 2015
+   \date 09 Mars 2015
+
+   \brief Mapping between index client and server.
+ */
+#include "client_server_mapping.hpp"
+
+namespace xios {
+
+CClientServerMapping::CClientServerMapping()
+  : indexGlobalOnServer_()
+{
+}
+
+CClientServerMapping::~CClientServerMapping()
+{
+}
+
+/*!
+  Compute how many clients each server will receive data from
+  On client can send data to several servers as well as one server can receive data originated from
+some clients. In order to write data correctly, each server must know from how many clients it receives data
+  \param [in] nbServer number of servers
+  \param [in] nClient number of clients
+  \param [in] clientIntraComm MPI communication of clients
+  \param [in] connectedServerRank Rank of servers connected to one client
+*/
+std::map<int,int> CClientServerMapping::computeConnectedClients(int nbServer, int nbClient,
+                                                                MPI_Comm& clientIntraComm,
+                                                                const std::vector<int>& connectedServerRank)
+{
+  std::map<int, int> connectedClients; // number of clients connected to a server
+
+  std::vector<int>::const_iterator itbVec, iteVec, it;
+  itbVec = it = connectedServerRank.begin();
+  iteVec = connectedServerRank.end();
+
+  std::vector<int> connectedServer;
+  std::vector<bool> isConnected(nbServer,false);
+
+  for (it = itbVec; it != iteVec; ++it)
+  {
+    for (int serverNum = 0; serverNum < nbServer; ++serverNum)
+      if (*it == serverNum) isConnected[serverNum] = true;
+  }
+
+  for(int serverNum = 0; serverNum<nbServer; ++serverNum)
+    if (isConnected[serverNum])
+      connectedServer.push_back(serverNum);
+
+
+  int nbConnectedServer=connectedServer.size();
+  int* recvCount=new int[nbClient];
+  int* displ=new int[nbClient];
+  int* sendBuff=new int[nbConnectedServer];
+  valarray<int> clientRes(0,nbServer);
+
+  for(int n=0;n<nbConnectedServer;n++) sendBuff[n]=connectedServer[n] ;
+
+  // get connected server for everybody
+  MPI_Allgather(&nbConnectedServer,1,MPI_INT,recvCount,1,MPI_INT,clientIntraComm) ;
+
+  displ[0]=0 ;
+  for(int n=1;n<nbClient;n++) displ[n]=displ[n-1]+recvCount[n-1] ;
+  int recvSize=displ[nbClient-1]+recvCount[nbClient-1] ;
+  int* recvBuff=new int[recvSize] ;
+
+
+  MPI_Allgatherv(sendBuff,nbConnectedServer,MPI_INT,recvBuff,recvCount,displ,MPI_INT,clientIntraComm) ;
+  for(int n=0;n<recvSize;n++) clientRes[recvBuff[n]]++ ;
+
+  for(int n=0;n<nbConnectedServer;n++)
+  {
+    connectedClients[connectedServer[n]] = clientRes[connectedServer[n]];
+  }
+
+  delete [] recvCount ;
+  delete [] displ ;
+  delete [] sendBuff ;
+  delete [] recvBuff ;
+
+  return connectedClients;
+}
+
+/*!
+  Return global index of data on each connected server.
+  On receiving data sent from client(s), each server with this global index, is able to
+know where the data should be written.
+  \return mapping of server rank and its global index.
+*/
+const CClientServerMapping::GlobalIndexMap& CClientServerMapping::getGlobalIndexOnServer() const
+{
+  return indexGlobalOnServer_;
+}
+
+CClientServerMapping::GlobalIndexMap& CClientServerMapping::getGlobalIndexOnServer()
+{
+  return indexGlobalOnServer_;
+}
+
+} //namespace xios
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/client_server_mapping.hpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/client_server_mapping.hpp	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/client_server_mapping.hpp	(revision 1749)
@@ -0,0 +1,52 @@
+/*!
+   \file client_server_mapping.hpp
+   \author Ha NGUYEN
+   \since 04 Feb 2015
+   \date 09 Mars 2015
+
+   \brief Mapping between index client and server.
+ */
+#ifndef __XIOS_CLIENT_SERVER_MAPPING_HPP__
+#define __XIOS_CLIENT_SERVER_MAPPING_HPP__
+
+#include "xios_spl.hpp"
+#include "array_new.hpp"
+#include "mpi.hpp"
+#include <unordered_map>
+
+namespace xios {
+
+/*!
+  \class CClientServerMapping
+  This class computes index of data which are sent to server as well as index of data
+on server side.
+*/
+class CClientServerMapping
+{
+public:
+  typedef std::unordered_map<int, std::vector<size_t> > GlobalIndexMap;
+  public:
+    /** Default constructor */
+    CClientServerMapping();
+
+    /** Default destructor */
+    virtual ~CClientServerMapping();
+
+    // Only need global index on client to calculate mapping (supposed client has info of distribution)
+    virtual void computeServerIndexMapping(const CArray<size_t,1>& globalIndexOnClient, int nbServer) = 0;
+
+    static std::map<int,int> computeConnectedClients(int nbServer, int nbClient,
+                                                     MPI_Comm& clientIntraComm,
+                                                     const std::vector<int>& connectedServerRank);
+
+    const GlobalIndexMap& getGlobalIndexOnServer() const;
+
+    GlobalIndexMap& getGlobalIndexOnServer();
+
+  protected:
+    //! Global index of data on SERVER, which are calculated by client(s)
+    GlobalIndexMap indexGlobalOnServer_;
+};
+
+} // namespace xios
+#endif // __XIOS_CLIENT_SERVER_MAPPING_HPP__
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/client_server_mapping_distributed.cpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/client_server_mapping_distributed.cpp	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/client_server_mapping_distributed.cpp	(revision 1749)
@@ -0,0 +1,68 @@
+/*!
+   \file client_server_mapping.hpp
+   \author Ha NGUYEN
+   \since 27 Feb 2015
+   \date 16 Mars 2016
+
+   \brief Mapping between index client and server.
+   Clients pre-calculate all information of server distribution.
+ */
+#include "client_server_mapping_distributed.hpp"
+#include <limits>
+#include <boost/functional/hash.hpp>
+#include "utils.hpp"
+#include "mpi_tag.hpp"
+#include "context.hpp"
+#include "context_client.hpp"
+
+namespace xios
+{
+
+CClientServerMappingDistributed::CClientServerMappingDistributed(const std::unordered_map<size_t,int>& globalIndexOfServer,
+                                                                 const MPI_Comm& clientIntraComm, bool isDataDistributed)
+  : CClientServerMapping(), ccDHT_(0)
+{
+  ccDHT_ = new CClientClientDHTInt(globalIndexOfServer,
+                                   clientIntraComm);
+}
+
+CClientServerMappingDistributed::~CClientServerMappingDistributed()
+{
+  if (0 != ccDHT_) delete ccDHT_;
+}
+
+/*!
+   Compute mapping global index of server which client sends to.
+   \param [in] globalIndexOnClient global index client has
+   \param [in] nbServer size of server's intracomm
+*/
+void CClientServerMappingDistributed::computeServerIndexMapping(const CArray<size_t,1>& globalIndexOnClient, int nbServer)
+{
+
+  ccDHT_->computeIndexInfoMapping(globalIndexOnClient);
+  const CClientClientDHTInt::Index2VectorInfoTypeMap& infoIndexMap = (ccDHT_->getInfoIndexMap());
+  CClientClientDHTInt::Index2VectorInfoTypeMap::const_iterator itb = infoIndexMap.begin(), ite = infoIndexMap.end(), it;
+  std::vector<size_t> nbInfoIndex(std::max(ccDHT_->getNbClient(),nbServer),0);
+
+  for (it = itb; it != ite; ++it)
+  {
+    ++nbInfoIndex[it->second[0]];
+  }
+
+  for (int idx = 0; idx < nbInfoIndex.size(); ++idx)
+  {
+    if (0 != nbInfoIndex[idx])
+    {
+      indexGlobalOnServer_[idx].resize(nbInfoIndex[idx]);
+      nbInfoIndex[idx] = 0;
+    }
+  }
+
+  for (it = itb; it != ite; ++it)
+  {
+    indexGlobalOnServer_[it->second[0]][nbInfoIndex[it->second[0]]] = (it->first);
+    ++nbInfoIndex[it->second[0]];
+  }
+}
+
+}
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/client_server_mapping_distributed.hpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/client_server_mapping_distributed.hpp	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/client_server_mapping_distributed.hpp	(revision 1749)
@@ -0,0 +1,50 @@
+/*!
+   \file client_server_mapping.hpp
+   \author Ha NGUYEN
+   \since 27 Feb 2015
+   \date 09 Mars 2015
+
+   \brief Mapping between index client and server.
+   Clients pre-calculate all information of server distribution.
+ */
+
+#ifndef __XIOS_CLIENT_SERVER_MAPPING_DISTRIBUTED_HPP__
+#define __XIOS_CLIENT_SERVER_MAPPING_DISTRIBUTED_HPP__
+
+#include <client_server_mapping.hpp>
+#include "xios_spl.hpp"
+#include "array_new.hpp"
+#include "mpi.hpp"
+#include <unordered_map>
+#include "client_client_dht_template.hpp"
+
+namespace xios
+{
+/*!
+  \class CClientServerMappingDistributed
+  This class computes index of data which are sent to server as well as index of data
+on server side with a distributed alogrithm. Each client has a piece of information about the distribution
+of servers. To find out all these info, first of all, all client join a discovering process in which each client
+announces the others about the info they have as well as demand others info they are lacked of. After this process,
+each client has enough info to decide to which client it need to send a demand for corresponding server of a global index.
+The alogrithm depends on hashed index.
+*/
+class CClientServerMappingDistributed : public CClientServerMapping
+{
+  public:
+    /** Default constructor */
+    CClientServerMappingDistributed(const std::unordered_map<size_t,int>& globalIndexOfServer,
+                                    const MPI_Comm& clientIntraComm,
+                                    bool isDataDistributed = true);
+
+    virtual void computeServerIndexMapping(const CArray<size_t,1>& globalIndexOnClientSendToServer, int nbServer);
+
+    /** Default destructor */
+    virtual ~CClientServerMappingDistributed();
+
+  protected:
+    CClientClientDHTInt* ccDHT_;
+};
+
+} // namespace xios
+#endif // __XIOS_CLIENT_SERVER_MAPPING_DISTRIBUTED_HPP__
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/config/axis_attribute.conf
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/config/axis_attribute.conf	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/config/axis_attribute.conf	(revision 1749)
@@ -0,0 +1,42 @@
+DECLARE_ATTRIBUTE(StdString, name)
+DECLARE_ATTRIBUTE(StdString, standard_name)
+DECLARE_ATTRIBUTE(StdString, long_name)
+
+DECLARE_ATTRIBUTE(StdString, comment)
+
+DECLARE_ATTRIBUTE(StdString, unit)
+DECLARE_ATTRIBUTE(StdString, formula)
+DECLARE_ATTRIBUTE(StdString, formula_term)
+DECLARE_ATTRIBUTE(StdString, formula_bounds)
+DECLARE_ATTRIBUTE(StdString, formula_term_bounds)
+DECLARE_ATTRIBUTE(StdString, bounds_name)
+
+DECLARE_ATTRIBUTE(int,       n_glo)
+DECLARE_ENUM2(positive, up, down)
+DECLARE_ENUM4(axis_type, X, Y, Z, T)
+
+DECLARE_ATTRIBUTE(StdString, dim_name)
+
+/* GLOBAL */
+DECLARE_ATTRIBUTE(int,       n_distributed_partition)
+
+/* LOCAL */
+DECLARE_ARRAY(double , 1   , value)
+DECLARE_ATTRIBUTE(StdString, axis_ref)
+
+DECLARE_ARRAY(int    ,1    , index)
+
+/* LOCAL */
+DECLARE_ATTRIBUTE(int,       data_n)
+DECLARE_ATTRIBUTE(int,       data_begin)
+DECLARE_ARRAY(int    ,   1 , data_index)
+
+/*LOCAL */
+DECLARE_ATTRIBUTE(int,       begin)
+DECLARE_ATTRIBUTE(int,       n)
+
+/* LOCAL */
+DECLARE_ARRAY(bool, 1 , mask)
+DECLARE_ARRAY(double, 2 , bounds)
+DECLARE_ATTRIBUTE(int,       prec)
+DECLARE_ARRAY(StdString    ,1    , label)
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/config/calendar_type.conf
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/config/calendar_type.conf	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/config/calendar_type.conf	(revision 1749)
@@ -0,0 +1,19 @@
+#ifdef __XIOS_CAllLeapCalendar__
+   DECLARE_CALENDAR(AllLeap, AllLeap)
+#endif //__XIOS_CAllLeapCalendar__
+
+#ifdef __XIOS_CD360Calendar__
+   DECLARE_CALENDAR(D360, D360)
+#endif //__XIOS_CD360Calendar__
+
+#ifdef __XIOS_CGregorianCalendar__
+   DECLARE_CALENDAR(Gregorian, Gregorian)
+#endif //__XIOS_CGregorianCalendar__
+
+#ifdef __XIOS_CJulianCalendar__
+   DECLARE_CALENDAR(Julian, Julian)
+#endif //__XIOS_CJulianCalendar__
+
+#ifdef __XIOS_CNoLeapCalendar__
+   DECLARE_CALENDAR(NoLeap, NoLeap)
+#endif //__XIOS_CNoLeapCalendar__
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/config/calendar_wrapper_attribute.conf
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/config/calendar_wrapper_attribute.conf	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/config/calendar_wrapper_attribute.conf	(revision 1749)
@@ -0,0 +1,13 @@
+DECLARE_ATTRIBUTE(StdString, comment)
+DECLARE_ENUM6(type, D360, AllLeap, NoLeap, Julian, Gregorian, user_defined)
+DECLARE_ATTRIBUTE(CDuration, timestep)
+// The start date and time origin are declared as string attributes instead
+// of CDate attributes so that we can control when they are parsed exactly
+DECLARE_ATTRIBUTE(string, start_date)
+DECLARE_ATTRIBUTE(string, time_origin)
+DECLARE_ATTRIBUTE(int, day_length)
+DECLARE_ARRAY(int, 1, month_lengths)
+DECLARE_ATTRIBUTE(int, year_length)
+DECLARE_ATTRIBUTE(double, leap_year_drift)
+DECLARE_ATTRIBUTE(double, leap_year_drift_offset)
+DECLARE_ATTRIBUTE(int, leap_year_month)
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/config/compute_connectivity_domain_attribute.conf
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/config/compute_connectivity_domain_attribute.conf	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/config/compute_connectivity_domain_attribute.conf	(revision 1749)
@@ -0,0 +1,7 @@
+/* INPUT */
+DECLARE_ENUM2(type,node,edge)
+
+/* OUTPUT */
+DECLARE_ARRAY(int, 1 , n_neighbor)
+DECLARE_ARRAY(int, 2 , local_neighbor)
+DECLARE_ATTRIBUTE(int, n_neighbor_max)
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/config/context_attribute.conf
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/config/context_attribute.conf	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/config/context_attribute.conf	(revision 1749)
@@ -0,0 +1,1 @@
+DECLARE_ATTRIBUTE(StdString, output_dir)
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/config/domain_attribute.conf
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/config/domain_attribute.conf	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/config/domain_attribute.conf	(revision 1749)
@@ -0,0 +1,64 @@
+/* GLOBAL */
+DECLARE_ATTRIBUTE(StdString       , name)
+DECLARE_ATTRIBUTE(StdString       , standard_name)
+DECLARE_ATTRIBUTE(StdString       , long_name)
+DECLARE_ATTRIBUTE(StdString       , lon_name)
+DECLARE_ATTRIBUTE(StdString       , lat_name)
+DECLARE_ATTRIBUTE(StdString       , bounds_lon_name)
+DECLARE_ATTRIBUTE(StdString       , bounds_lat_name)
+DECLARE_ATTRIBUTE(StdString       , dim_i_name)
+DECLARE_ATTRIBUTE(StdString       , dim_j_name)
+
+DECLARE_ATTRIBUTE(StdString, comment)
+
+/* GLOBAL */
+DECLARE_ATTRIBUTE(int             , ni_glo)
+DECLARE_ATTRIBUTE(int             , nj_glo)
+
+/* LOCAL */
+DECLARE_ATTRIBUTE(int             , ibegin, false)
+DECLARE_ATTRIBUTE(int             , ni, false)
+
+/* LOCAL */
+DECLARE_ATTRIBUTE(int             , jbegin, false)
+DECLARE_ATTRIBUTE(int             , nj, false)
+
+
+DECLARE_ARRAY(int,1             , i_index, false)
+DECLARE_ARRAY(int,1             , j_index, false)
+
+/* LOCAL */
+DECLARE_ARRAY(bool, 1 , mask_1d, false)
+DECLARE_ARRAY(bool, 2 , mask_2d, false)
+
+/* GLOBAL */
+DECLARE_ATTRIBUTE(int             , data_dim)
+
+/* LOCAL */
+DECLARE_ATTRIBUTE(int             , data_ni, false)
+DECLARE_ATTRIBUTE(int             , data_nj, false)
+DECLARE_ATTRIBUTE(int             , data_ibegin, false)
+DECLARE_ATTRIBUTE(int             , data_jbegin, false)
+
+/* LOCAL */
+DECLARE_ARRAY(int, 1 , data_i_index, false)
+DECLARE_ARRAY(int, 1,  data_j_index, false)
+
+/* LOCAL */
+DECLARE_ARRAY(double, 1, lonvalue_1d, false)
+DECLARE_ARRAY(double, 1, latvalue_1d, false)
+DECLARE_ARRAY(double, 2, lonvalue_2d, false)
+DECLARE_ARRAY(double, 2, latvalue_2d, false)
+
+DECLARE_ATTRIBUTE(int, nvertex)
+DECLARE_ARRAY(double, 2, bounds_lon_1d, false)
+DECLARE_ARRAY(double, 2, bounds_lat_1d, false)
+DECLARE_ARRAY(double, 3, bounds_lon_2d, false)
+DECLARE_ARRAY(double, 3, bounds_lat_2d, false)
+
+DECLARE_ARRAY(double, 2, area)
+DECLARE_ATTRIBUTE(double, radius)
+
+DECLARE_ENUM4(type,rectilinear,curvilinear,unstructured, gaussian)
+DECLARE_ATTRIBUTE(StdString, domain_ref)
+DECLARE_ATTRIBUTE(int,       prec)
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/config/domain_attribute_private.conf
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/config/domain_attribute_private.conf	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/config/domain_attribute_private.conf	(revision 1749)
@@ -0,0 +1,26 @@
+/* PRIVATE ATTRIBUTES */
+DECLARE_ATTRIBUTE_PRIVATE(double,  lon_start)
+DECLARE_ATTRIBUTE_PRIVATE(double,  lon_end)
+DECLARE_ATTRIBUTE_PRIVATE(double,  lat_start)
+DECLARE_ATTRIBUTE_PRIVATE(double,  lat_end)
+
+DECLARE_ATTRIBUTE_PRIVATE(double,  bounds_lon_start)
+DECLARE_ATTRIBUTE_PRIVATE(double,  bounds_lon_end)
+DECLARE_ATTRIBUTE_PRIVATE(double,  bounds_lat_start)
+DECLARE_ATTRIBUTE_PRIVATE(double,  bounds_lat_end)
+
+//  Array contain whole value (non distributed) of longitude and latitude read from a file
+DECLARE_ARRAY_PRIVATE(double, 1, lonvalue_rectilinear_read_from_file)
+DECLARE_ARRAY_PRIVATE(double, 1, latvalue_rectilinear_read_from_file)
+
+// Array containing longitude and latitude of LOCAL curvilinear domain to be read from a file
+DECLARE_ARRAY_PRIVATE(double, 2, lonvalue_curvilinear_read_from_file)
+DECLARE_ARRAY_PRIVATE(double, 2, latvalue_curvilinear_read_from_file)
+DECLARE_ARRAY_PRIVATE(double, 3, bounds_lonvalue_curvilinear_read_from_file)
+DECLARE_ARRAY_PRIVATE(double, 3, bounds_latvalue_curvilinear_read_from_file)
+
+// Array containing longitude and latitude of LOCAL unstructured domain to be read from a file
+DECLARE_ARRAY_PRIVATE(double, 1, lonvalue_unstructured_read_from_file)
+DECLARE_ARRAY_PRIVATE(double, 1, latvalue_unstructured_read_from_file)
+DECLARE_ARRAY_PRIVATE(double, 2, bounds_lonvalue_unstructured_read_from_file)
+DECLARE_ARRAY_PRIVATE(double, 2, bounds_latvalue_unstructured_read_from_file)
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/config/expand_domain_attribute.conf
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/config/expand_domain_attribute.conf	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/config/expand_domain_attribute.conf	(revision 1749)
@@ -0,0 +1,7 @@
+DECLARE_ATTRIBUTE(int, order)
+
+DECLARE_ENUM2(type,node,edge)
+
+// Flag to determine if domain expension should be periodic (and in which direction)
+DECLARE_ATTRIBUTE(bool,      i_periodic)
+DECLARE_ATTRIBUTE(bool,      j_periodic)
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/config/extract_axis_attribute.conf
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/config/extract_axis_attribute.conf	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/config/extract_axis_attribute.conf	(revision 1749)
@@ -0,0 +1,4 @@
+/*  GLOBAL   */
+DECLARE_ATTRIBUTE(int,       begin)
+DECLARE_ATTRIBUTE(int,       n)
+DECLARE_ARRAY(int    ,1    , index)
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/config/extract_axis_to_scalar_attribute.conf
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/config/extract_axis_to_scalar_attribute.conf	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/config/extract_axis_to_scalar_attribute.conf	(revision 1749)
@@ -0,0 +1,2 @@
+/* Position of extracted slice */
+DECLARE_ATTRIBUTE(int,           position)
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/config/extract_domain_attribute.conf
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/config/extract_domain_attribute.conf	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/config/extract_domain_attribute.conf	(revision 1749)
@@ -0,0 +1,5 @@
+/* GLOBAL */
+DECLARE_ATTRIBUTE(int             , ni)
+DECLARE_ATTRIBUTE(int             , nj)
+DECLARE_ATTRIBUTE(int             , ibegin)
+DECLARE_ATTRIBUTE(int             , jbegin)
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/config/extract_domain_to_axis_attribute.conf
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/config/extract_domain_to_axis_attribute.conf	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/config/extract_domain_to_axis_attribute.conf	(revision 1749)
@@ -0,0 +1,5 @@
+/* Direction to apply operation (i, j) */
+DECLARE_ENUM2(direction, iDir, jDir)
+
+/* Position of extracted slice */
+DECLARE_ATTRIBUTE(int,           position)
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/config/field_attribute.conf
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/config/field_attribute.conf	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/config/field_attribute.conf	(revision 1749)
@@ -0,0 +1,41 @@
+DECLARE_ATTRIBUTE(StdString, name)
+DECLARE_ATTRIBUTE(StdString, standard_name)
+DECLARE_ATTRIBUTE(StdString, long_name)
+
+DECLARE_ATTRIBUTE(StdString, comment)
+
+DECLARE_ATTRIBUTE(StdString, unit)
+DECLARE_ATTRIBUTE(StdString, operation)
+DECLARE_ATTRIBUTE(bool,      detect_missing_value)
+
+DECLARE_ATTRIBUTE(CDuration, freq_op)
+DECLARE_ATTRIBUTE(CDuration, freq_offset)
+DECLARE_ATTRIBUTE(int,       level)
+DECLARE_ATTRIBUTE(int,       prec)
+DECLARE_ATTRIBUTE(StdString, expr)
+
+DECLARE_ATTRIBUTE(bool,      enabled)
+DECLARE_ATTRIBUTE(bool,      read_access)
+DECLARE_ATTRIBUTE(bool,      indexed_output)
+DECLARE_ATTRIBUTE(bool,      check_if_active)
+
+DECLARE_ATTRIBUTE(StdString, domain_ref, false)
+DECLARE_ATTRIBUTE(StdString, axis_ref, false)
+DECLARE_ATTRIBUTE(StdString, scalar_ref, false)
+DECLARE_ATTRIBUTE(StdString, grid_ref)
+DECLARE_ATTRIBUTE(StdString, field_ref)
+DECLARE_ATTRIBUTE(StdString, grid_path)
+
+DECLARE_ATTRIBUTE(double,    default_value)
+DECLARE_ATTRIBUTE(double,    valid_min)
+DECLARE_ATTRIBUTE(double,    valid_max)
+DECLARE_ATTRIBUTE(double,    add_offset)
+DECLARE_ATTRIBUTE(double,    scale_factor)
+
+DECLARE_ATTRIBUTE(int,       compression_level)
+
+DECLARE_ATTRIBUTE(bool,      ts_enabled)
+DECLARE_ATTRIBUTE(CDuration, ts_split_freq)
+
+DECLARE_ATTRIBUTE(StdString, cell_methods)
+DECLARE_ENUM4(cell_methods_mode,  overwrite, prefix, suffix, none)
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/config/file_attribute.conf
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/config/file_attribute.conf	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/config/file_attribute.conf	(revision 1749)
@@ -0,0 +1,39 @@
+DECLARE_ATTRIBUTE(StdString, name)
+DECLARE_ATTRIBUTE(StdString, description)
+
+DECLARE_ATTRIBUTE(StdString, comment)
+
+DECLARE_ATTRIBUTE(StdString, name_suffix)
+DECLARE_ATTRIBUTE(int,       min_digits )
+
+DECLARE_ATTRIBUTE(CDuration, output_freq)
+DECLARE_ATTRIBUTE(int,       output_level)
+DECLARE_ATTRIBUTE(CDuration, sync_freq)
+DECLARE_ATTRIBUTE(CDuration, split_freq)
+DECLARE_ATTRIBUTE(StdString, split_freq_format)
+DECLARE_ATTRIBUTE(CDuration, split_start_offset)
+DECLARE_ATTRIBUTE(CDuration, split_end_offset)
+DECLARE_ATTRIBUTE(string,     split_last_date)
+DECLARE_ATTRIBUTE(bool,      enabled)
+DECLARE_ENUM2(type,          one_file, multiple_file)
+DECLARE_ENUM2(format,        netcdf4, netcdf4_classic)
+DECLARE_ENUM2(convention,    CF, UGRID)
+DECLARE_ATTRIBUTE(StdString, convention_str)
+DECLARE_ENUM2(par_access,    collective, independent)
+DECLARE_ATTRIBUTE(bool,      append)
+DECLARE_ENUM2(mode,          read, write)
+DECLARE_ATTRIBUTE(bool,      read_metadata_par)
+DECLARE_ENUM7(time_counter,  centered, instant, record, exclusive, centered_exclusive, instant_exclusive, none)
+DECLARE_ATTRIBUTE(StdString, time_counter_name)
+DECLARE_ENUM2(time_units, seconds, days)
+DECLARE_ATTRIBUTE(int,       record_offset)
+DECLARE_ATTRIBUTE(bool,      cyclic)
+
+DECLARE_ATTRIBUTE(int,       compression_level)
+
+DECLARE_ENUM4(timeseries,    none, only, both, exclusive)
+DECLARE_ATTRIBUTE(StdString, ts_prefix)
+DECLARE_ATTRIBUTE(StdString, time_stamp_name)
+DECLARE_ATTRIBUTE(StdString, time_stamp_format)
+DECLARE_ATTRIBUTE(StdString, uuid_name)
+DECLARE_ATTRIBUTE(StdString, uuid_format)
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/config/functor_type.conf
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/config/functor_type.conf	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/config/functor_type.conf	(revision 1749)
@@ -0,0 +1,26 @@
+#ifdef __XIOS_CAverage__
+   DECLARE_FUNCTOR(Average  , average)
+#endif //__XIOS_CAverage__
+
+#ifdef __XIOS_CAccumulate__
+   DECLARE_FUNCTOR(Accumulate  , accumulate)
+#endif //__XIOS_CAccumulate__
+
+#ifdef __XIOS_CInstant__
+   DECLARE_FUNCTOR(Instant, instant)
+#endif //__XIOS_CInstant__
+
+#ifdef __XIOS_COnce__
+   DECLARE_FUNCTOR(Once, once)
+#endif //__XIOS_COnce__
+
+#ifdef __XIOS_CMaximum__
+   DECLARE_FUNCTOR(Maximum , maximum)
+#endif //__XIOS_CMaximum__
+
+#ifdef __XIOS_CMinimum__
+   DECLARE_FUNCTOR(Minimum , minimum)
+#endif //__XIOS_CMinimum__
+
+
+#undef DECLARE_FUNCTOR
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/config/generate_rectilinear_domain_attribute.conf
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/config/generate_rectilinear_domain_attribute.conf	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/config/generate_rectilinear_domain_attribute.conf	(revision 1749)
@@ -0,0 +1,10 @@
+/* GLOBAL */
+DECLARE_ATTRIBUTE(double    , bounds_lon_start)
+DECLARE_ATTRIBUTE(double    , bounds_lon_end)
+DECLARE_ATTRIBUTE(double    , bounds_lat_start)
+DECLARE_ATTRIBUTE(double    , bounds_lat_end)
+
+DECLARE_ATTRIBUTE(double    , lon_start)
+DECLARE_ATTRIBUTE(double    , lon_end)
+DECLARE_ATTRIBUTE(double    , lat_start)
+DECLARE_ATTRIBUTE(double    , lat_end)
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/config/grid_attribute.conf
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/config/grid_attribute.conf	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/config/grid_attribute.conf	(revision 1749)
@@ -0,0 +1,19 @@
+DECLARE_ATTRIBUTE(StdString, name)
+DECLARE_ATTRIBUTE(StdString, description)
+
+DECLARE_ATTRIBUTE(StdString, comment)
+
+DECLARE_ARRAY(bool, 1, mask_1d, false)
+DECLARE_ARRAY(bool, 2, mask_2d, false)
+DECLARE_ARRAY(bool, 3, mask_3d, false)
+DECLARE_ARRAY(bool, 4, mask_4d, false)
+DECLARE_ARRAY(bool, 5, mask_5d, false)
+DECLARE_ARRAY(bool, 6, mask_6d, false)
+DECLARE_ARRAY(bool, 7, mask_7d, false)
+
+// Meaningless, only server for coherent purpose (for scalar grid)
+DECLARE_ARRAY(bool, 1, mask_0d, false)
+
+// An array contains order of axis and domains composing of the grid
+// Value of element: domain 2, axis 1 and sclar 0
+DECLARE_ARRAY_PRIVATE(int, 1, axis_domain_order)
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/config/interpolate_axis_attribute.conf
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/config/interpolate_axis_attribute.conf	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/config/interpolate_axis_attribute.conf	(revision 1749)
@@ -0,0 +1,4 @@
+/*  GLOBAL   */
+DECLARE_ATTRIBUTE(StdString, type)
+DECLARE_ATTRIBUTE(int, order)
+DECLARE_ATTRIBUTE(StdString, coordinate)
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/config/interpolate_domain_attribute.conf
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/config/interpolate_domain_attribute.conf	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/config/interpolate_domain_attribute.conf	(revision 1749)
@@ -0,0 +1,12 @@
+/* GLOBAL */
+DECLARE_ATTRIBUTE(int, order)
+DECLARE_ATTRIBUTE(bool, renormalize)
+DECLARE_ATTRIBUTE(bool, quantity)
+DECLARE_ATTRIBUTE(bool, detect_missing_value)
+
+/* Write interpolation weights into file */
+DECLARE_ENUM3(mode,compute,read,read_or_compute)
+DECLARE_ATTRIBUTE(StdString, weight_filename)
+DECLARE_ATTRIBUTE(bool, write_weight)
+DECLARE_ENUM2(read_write_convention, c, fortran)
+DECLARE_ATTRIBUTE(bool, use_area)
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/config/node_type.conf
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/config/node_type.conf	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/config/node_type.conf	(revision 1749)
@@ -0,0 +1,122 @@
+#ifdef __XIOS_CAxis__
+   DECLARE_NODE(Axis  , axis  )
+#endif //__XIOS_CAxis__
+
+#ifdef __XIOS_CDomain__
+   DECLARE_NODE(Domain, domain)
+#endif //__XIOS_CDomain__
+
+#ifdef __XIOS_CField__
+   DECLARE_NODE(Field , field )
+#endif //__XIOS_CField__
+
+#ifdef __XIOS_CFile__
+   DECLARE_NODE(File  , file  )
+#endif //__XIOS_CFile__
+
+#ifdef __XIOS_CGrid__
+   DECLARE_NODE(Grid  , grid  )
+#endif //__XIOS_CGrid__
+
+//#ifdef __XIOS_CMethod__
+//   DECLARE_NODE(Method, method)
+//#endif //__XIOS_CMethod__
+
+#ifdef __XIOS_CVariable__
+   DECLARE_NODE(Variable, variable)
+#endif //__XIOS_CVariable__
+
+#ifdef __XIOS_CCalendarWrapper__
+   DECLARE_NODE(CalendarWrapper, calendarwrapper)
+#endif //__XIOS_CCalendarWrapper__
+
+#ifdef __XIOS_CInverseAxis__
+   DECLARE_NODE(InverseAxis, inverse_axis)
+#endif //__XIOS_CInverseAxis__
+
+#ifdef __XIOS_CZoomAxis__
+   DECLARE_NODE(ZoomAxis, zoom_axis)
+#endif //__XIOS_CZoomAxis__
+
+#ifdef __XIOS_CInterpolateAxis__
+   DECLARE_NODE(InterpolateAxis, interpolate_axis)
+#endif //__XIOS_CInterpolateAxis__
+
+#ifdef __XIOS_CZoomDomain__
+   DECLARE_NODE(ZoomDomain, zoom_domain)
+#endif //__XIOS_CZoomDomain__
+
+#ifdef __XIOS_CInterpolateDomain__
+   DECLARE_NODE(InterpolateDomain, interpolate_domain)
+#endif //__XIOS_CInterpolateDomain__
+
+#ifdef __XIOS_CGenerateRectilinearDomain__
+   DECLARE_NODE(GenerateRectilinearDomain, generate_rectilinear_domain)
+#endif //__XIOS_CGenerateRectilinearDomain__
+
+#ifdef __XIOS_CScalar__
+   DECLARE_NODE(Scalar, scalar)
+#endif //__XIOS_CScalar__
+
+#ifdef __XIOS_CReduceAxisToScalar__
+   DECLARE_NODE(ReduceAxisToScalar, reduce_axis)
+#endif //__XIOS_CReduceAxisToScalar__
+
+#ifdef __XIOS_CReduceDomainToAxis__
+   DECLARE_NODE(ReduceDomainToAxis, reduce_domain)
+#endif //__XIOS_CReduceDomainToAxis__
+
+#ifdef __XIOS_CReduceAxisToAxis__
+   DECLARE_NODE(ReduceAxisToAxis, reduce_axis_to_axis)
+#endif //__XIOS_CReduceAxisToAxis__
+
+#ifdef __XIOS_CExtractDomainToAxis__
+   DECLARE_NODE(ExtractDomainToAxis, extract_domain)
+#endif //__XIOS_CExtractDomainToAxis__
+
+#ifdef __XIOS_CComputeConnectivityDomain__
+   DECLARE_NODE(ComputeConnectivityDomain, compute_connectivity_domain)
+#endif //__XIOS_CComputeConnectivityDomain__
+
+#ifdef __XIOS_CExpandDomain__
+   DECLARE_NODE(ExpandDomain, expand_domain)
+#endif //__XIOS_CExpandDomain__
+
+#ifdef __XIOS_CExtractAxisToScalar__
+   DECLARE_NODE(ExtractAxisToScalar, extract_axis)
+#endif //__XIOS_CExtractAxisToScalar__
+
+#ifdef __XIOS_CReduceDomainToScalar__
+   DECLARE_NODE(ReduceDomainToScalar, reduce_domain_to_scalar)
+#endif //__XIOS_CReduceDomainToScalar__
+
+#ifdef __XIOS_CTemporalSplitting__
+   DECLARE_NODE(TemporalSplitting, temporal_splitting)
+#endif //__XIOS_CTemporalSplitting__
+
+#ifdef __XIOS_CDuplicateScalarToAxis__
+   DECLARE_NODE(DuplicateScalarToAxis, duplicate_scalar_to_axis)
+#endif //__XIOS_CDuplicateScalarToAxis__
+
+#ifdef __XIOS_CReduceScalarToScalar__
+   DECLARE_NODE(ReduceScalarToScalar, reduce_scalar_to_scalar)
+#endif //__XIOS_CReduceScalarToScalar_
+
+#ifdef __XIOS_CReorderDomain__
+   DECLARE_NODE(ReorderDomain, reorder_domain)
+#endif //__XIOS_CReorderDomain_
+
+#ifdef __XIOS_CExtractDomain__
+   DECLARE_NODE(ExtractDomain, extract_domain)
+#endif //__XIOS_CExtractDomain__
+
+#ifdef __XIOS_CExtractAxis__
+   DECLARE_NODE(ExtractAxis, extract_axis)
+#endif //__XIOS_CExtractAxis__
+
+#ifdef __XIOS_CContext__
+   DECLARE_NODE_PAR(Context, context)
+#endif //__XIOS_CContext__
+
+#undef DECLARE_NODE
+#undef DECLARE_NODE_PAR
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/config/properties.conf
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/config/properties.conf	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/config/properties.conf	(revision 1749)
@@ -0,0 +1,24 @@
+/// Author ///
+DECLARE_PROPERTY  (StdString, AUTHOR, "OZDOBA Herve, MEURDESOIF Yann")
+
+/// Version number ///
+DECLARE_PROPERTY  (StdString, VERSION, "0.1")
+
+/// Time name ///
+DECLARE_PROPERTY  (StdString, TIME_NAME, "time")
+
+/// Output config ///
+//DECLARE_PROPERTY  (StdString, NETCDF_OUTPUT,  "MULTI_FILE") // (ONE_FILE, TWO_FILE, MULTI_FILE)
+DECLARE_PROPERTY  (StdString, NETCDF_OUTPUT,  "ONE_FILE") // (ONE_FILE, TWO_FILE, MULTI_FILE)
+DECLARE_PROPERTY  (StdString, FILE_SUFFIX,    "_node"   )
+DECLARE_PROPERTY  (StdString, FILE_EXTENSION, ".nc"     )
+DECLARE_PROPERTY  (StdString, OUTPUT_PATH,    "./data/" )
+
+/// Default Value ///
+DECLARE_PROPERTY (double, FIELD_DEFAULT_VALUE,  1E-10)
+
+/// Buffer Size ///
+DECLARE_PROPERTY (StdSize, BUFFER_CLIENT_SIZE,  100E6) // 100 Mo
+DECLARE_PROPERTY (StdSize, BUFFER_SERVER_SIZE, 1000E6) // 1000 Mo
+
+
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/config/reduce_axis_to_axis_attribute.conf
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/config/reduce_axis_to_axis_attribute.conf	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/config/reduce_axis_to_axis_attribute.conf	(revision 1749)
@@ -0,0 +1,1 @@
+DECLARE_ENUM4(operation, min, max, sum, average)
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/config/reduce_axis_to_scalar_attribute.conf
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/config/reduce_axis_to_scalar_attribute.conf	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/config/reduce_axis_to_scalar_attribute.conf	(revision 1749)
@@ -0,0 +1,3 @@
+DECLARE_ENUM4(operation, min, max, sum, average)
+
+
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/config/reduce_domain_to_axis_attribute.conf
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/config/reduce_domain_to_axis_attribute.conf	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/config/reduce_domain_to_axis_attribute.conf	(revision 1749)
@@ -0,0 +1,5 @@
+DECLARE_ENUM4(operation, min, max, sum, average)
+
+/* Direction to apply operation (i, j) */
+DECLARE_ENUM2(direction,  iDir, jDir)
+DECLARE_ATTRIBUTE(bool, local)
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/config/reduce_domain_to_scalar_attribute.conf
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/config/reduce_domain_to_scalar_attribute.conf	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/config/reduce_domain_to_scalar_attribute.conf	(revision 1749)
@@ -0,0 +1,2 @@
+DECLARE_ENUM4(operation, min, max, sum, average)
+DECLARE_ATTRIBUTE(bool, local)
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/config/reduce_scalar_to_scalar_attribute.conf
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/config/reduce_scalar_to_scalar_attribute.conf	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/config/reduce_scalar_to_scalar_attribute.conf	(revision 1749)
@@ -0,0 +1,2 @@
+DECLARE_ENUM4(operation, min, max, sum, average)
+
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/config/reorder_domain_attribute.conf
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/config/reorder_domain_attribute.conf	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/config/reorder_domain_attribute.conf	(revision 1749)
@@ -0,0 +1,4 @@
+DECLARE_ATTRIBUTE(bool, invert_lat)
+DECLARE_ATTRIBUTE(double, shift_lon_fraction)
+DECLARE_ATTRIBUTE(double, min_lon)
+DECLARE_ATTRIBUTE(double, max_lon)
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/config/scalar_attribute.conf
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/config/scalar_attribute.conf	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/config/scalar_attribute.conf	(revision 1749)
@@ -0,0 +1,19 @@
+DECLARE_ATTRIBUTE(StdString, name)
+DECLARE_ATTRIBUTE(StdString, standard_name)
+DECLARE_ATTRIBUTE(StdString, long_name)
+
+DECLARE_ATTRIBUTE(StdString, comment)
+
+DECLARE_ATTRIBUTE(StdString, unit)
+
+/* LOCAL and GLOBAL*/
+DECLARE_ATTRIBUTE(double, value)
+DECLARE_ATTRIBUTE(StdString, bounds_name)
+DECLARE_ARRAY(double, 1 , bounds)
+
+DECLARE_ATTRIBUTE(StdString, scalar_ref)
+DECLARE_ATTRIBUTE(int, prec)
+
+DECLARE_ENUM4(axis_type, X, Y, Z, T)
+DECLARE_ENUM2(positive, up, down)
+DECLARE_ATTRIBUTE(StdString, label)
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/config/var_attribute.conf
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/config/var_attribute.conf	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/config/var_attribute.conf	(revision 1749)
@@ -0,0 +1,3 @@
+DECLARE_TYPE(type)
+DECLARE_ATTRIBUTE(StdString, name)
+DECLARE_ENUM4(ts_target, file, field, both, none)
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/config/zoom_axis_attribute.conf
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/config/zoom_axis_attribute.conf	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/config/zoom_axis_attribute.conf	(revision 1749)
@@ -0,0 +1,4 @@
+/*  GLOBAL   */
+DECLARE_ATTRIBUTE(int,       begin)
+DECLARE_ATTRIBUTE(int,       n)
+DECLARE_ARRAY(int    ,1    , index)
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/config/zoom_domain_attribute.conf
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/config/zoom_domain_attribute.conf	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/config/zoom_domain_attribute.conf	(revision 1749)
@@ -0,0 +1,5 @@
+/* GLOBAL */
+DECLARE_ATTRIBUTE(int             , ni)
+DECLARE_ATTRIBUTE(int             , nj)
+DECLARE_ATTRIBUTE(int             , ibegin)
+DECLARE_ATTRIBUTE(int             , jbegin)
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/config/zoom_domain_attribute_private.conf
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/config/zoom_domain_attribute_private.conf	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/config/zoom_domain_attribute_private.conf	(revision 1749)
@@ -0,0 +1,5 @@
+/* LOCAL */
+DECLARE_ATTRIBUTE_PRIVATE(int             , zoom_ni_loc)
+DECLARE_ATTRIBUTE_PRIVATE(int             , zoom_nj_loc)
+DECLARE_ATTRIBUTE_PRIVATE(int             , zoom_ibegin_loc)
+DECLARE_ATTRIBUTE_PRIVATE(int             , zoom_jbegin_loc)
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/configure.cpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/configure.cpp	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/configure.cpp	(revision 1749)
@@ -0,0 +1,14 @@
+#define __XIOS_Configure__ // < Ne pas supprimer
+
+/// XIOS headers ///
+#include "xios_spl.hpp"
+
+/// /////////// Macros /////////// ///
+#undef  DECLARE_PROPERTY
+#define DECLARE_PROPERTY(type, name, value) \
+   type name = value;
+
+namespace xios
+{
+#include "properties.conf"
+} // namespace xios
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/configure.hpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/configure.hpp	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/configure.hpp	(revision 1749)
@@ -0,0 +1,14 @@
+#ifndef __XIOS_Configure__
+#define __XIOS_Configure__
+
+
+/// /////////// Macros /////////// ///
+#define DECLARE_PROPERTY(type, name, value) \
+   extern type name; // = value
+
+namespace xios
+{
+#include "properties.conf"
+} // namespace xios
+
+#endif // __XIOS_Configure__
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/context_client.cpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/context_client.cpp	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/context_client.cpp	(revision 1749)
@@ -0,0 +1,476 @@
+#include "xios_spl.hpp"
+#include "context_client.hpp"
+#include "context_server.hpp"
+#include "event_client.hpp"
+#include "buffer_out.hpp"
+#include "buffer_client.hpp"
+#include "type.hpp"
+#include "event_client.hpp"
+#include "context.hpp"
+#include "mpi.hpp"
+#include "timer.hpp"
+#include "cxios.hpp"
+#include "server.hpp"
+
+namespace xios
+{
+    /*!
+    \param [in] parent Pointer to context on client side
+    \param [in] intraComm_ communicator of group client
+    \param [in] interComm_ communicator of group server
+    \cxtSer [in] cxtSer Pointer to context of server side. (It is only used in case of attached mode).
+    */
+    CContextClient::CContextClient(CContext* parent, MPI_Comm intraComm_, MPI_Comm interComm_, CContext* cxtSer)
+     : mapBufferSize_(), parentServer(cxtSer), maxBufferedEvents(4)
+    {
+      context = parent;
+      intraComm = intraComm_;
+      interComm = interComm_;
+      MPI_Comm_rank(intraComm, &clientRank);
+      MPI_Comm_size(intraComm, &clientSize);
+
+      int flag;
+      MPI_Comm_test_inter(interComm, &flag);
+      if (flag) MPI_Comm_remote_size(interComm, &serverSize);
+      else  MPI_Comm_size(interComm, &serverSize);
+
+      computeLeader(clientRank, clientSize, serverSize, ranksServerLeader, ranksServerNotLeader);
+
+      timeLine = 0;
+    }
+
+    void CContextClient::computeLeader(int clientRank, int clientSize, int serverSize,
+                                       std::list<int>& rankRecvLeader,
+                                       std::list<int>& rankRecvNotLeader)
+    {
+      if ((0 == clientSize) || (0 == serverSize)) return;
+
+      if (clientSize < serverSize)
+      {
+        int serverByClient = serverSize / clientSize;
+        int remain = serverSize % clientSize;
+        int rankStart = serverByClient * clientRank;
+
+        if (clientRank < remain)
+        {
+          serverByClient++;
+          rankStart += clientRank;
+        }
+        else
+          rankStart += remain;
+
+        for (int i = 0; i < serverByClient; i++)
+          rankRecvLeader.push_back(rankStart + i);
+
+        rankRecvNotLeader.resize(0);
+      }
+      else
+      {
+        int clientByServer = clientSize / serverSize;
+        int remain = clientSize % serverSize;
+
+        if (clientRank < (clientByServer + 1) * remain)
+        {
+          if (clientRank % (clientByServer + 1) == 0)
+            rankRecvLeader.push_back(clientRank / (clientByServer + 1));
+          else
+            rankRecvNotLeader.push_back(clientRank / (clientByServer + 1));
+        }
+        else
+        {
+          int rank = clientRank - (clientByServer + 1) * remain;
+          if (rank % clientByServer == 0)
+            rankRecvLeader.push_back(remain + rank / clientByServer);
+          else
+            rankRecvNotLeader.push_back(remain + rank / clientByServer);
+        }
+      }
+    }
+
+    /*!
+    In case of attached mode, the current context must be reset to context for client
+    \param [in] event Event sent to server
+    */
+    void CContextClient::sendEvent(CEventClient& event)
+    {
+      list<int> ranks = event.getRanks();
+      info(100)<<"Event "<<timeLine<<" of context "<<context->getId()<<endl ;
+      if (CXios::checkEventSync)
+      {
+        int typeId, classId, typeId_in, classId_in, timeLine_out;
+        typeId_in=event.getTypeId() ;
+        classId_in=event.getClassId() ;
+//        MPI_Allreduce(&timeLine,&timeLine_out, 1, MPI_UINT64_T, MPI_SUM, intraComm) ; // MPI_UINT64_T standardized by MPI 3
+        MPI_Allreduce(&timeLine,&timeLine_out, 1, MPI_LONG_LONG_INT, MPI_SUM, intraComm) ; 
+        MPI_Allreduce(&typeId_in,&typeId, 1, MPI_INT, MPI_SUM, intraComm) ;
+        MPI_Allreduce(&classId_in,&classId, 1, MPI_INT, MPI_SUM, intraComm) ;
+        if (typeId/clientSize!=event.getTypeId() || classId/clientSize!=event.getClassId() || timeLine_out/clientSize!=timeLine)
+        {
+           ERROR("void CContextClient::sendEvent(CEventClient& event)",
+               << "Event are not coherent between client.");
+        }
+      }
+
+      if (!event.isEmpty())
+      {
+        list<int> sizes = event.getSizes();
+
+        // We force the getBuffers call to be non-blocking on classical servers
+        list<CBufferOut*> buffList;
+        bool couldBuffer = getBuffers(ranks, sizes, buffList, (!CXios::isClient && (CServer::serverLevel == 0) ));
+//        bool couldBuffer = getBuffers(ranks, sizes, buffList, CXios::isServer );
+
+        if (couldBuffer)
+        {
+          event.send(timeLine, sizes, buffList);
+          info(100)<<"Event "<<timeLine<<" of context "<<context->getId()<<"  sent"<<endl ;
+
+          checkBuffers(ranks);
+
+          if (isAttachedModeEnabled()) // couldBuffer is always true in attached mode
+          {
+            waitEvent(ranks);
+            CContext::setCurrent(context->getId());
+          }
+        }
+        else
+        {
+          tmpBufferedEvent.ranks = ranks;
+          tmpBufferedEvent.sizes = sizes;
+
+          for (list<int>::const_iterator it = sizes.begin(); it != sizes.end(); it++)
+            tmpBufferedEvent.buffers.push_back(new CBufferOut(*it));
+          info(100)<<"DEBUG : temporaly event created : timeline "<<timeLine<<endl ;
+          event.send(timeLine, tmpBufferedEvent.sizes, tmpBufferedEvent.buffers);
+          info(100)<<"Event "<<timeLine<<" of context "<<context->getId()<<"  sent"<<endl ;
+        }
+      }
+
+      timeLine++;
+    }
+
+    /*!
+     * Send the temporarily buffered event (if any).
+     *
+     * \return true if a temporarily buffered event could be sent, false otherwise 
+     */
+    bool CContextClient::sendTemporarilyBufferedEvent()
+    {
+      bool couldSendTmpBufferedEvent = false;
+
+      if (hasTemporarilyBufferedEvent())
+      {
+        list<CBufferOut*> buffList;
+        if (getBuffers(tmpBufferedEvent.ranks, tmpBufferedEvent.sizes, buffList, true)) // Non-blocking call
+        {
+          list<CBufferOut*>::iterator it, itBuffer;
+
+          for (it = tmpBufferedEvent.buffers.begin(), itBuffer = buffList.begin(); it != tmpBufferedEvent.buffers.end(); it++, itBuffer++)
+            (*itBuffer)->put((char*)(*it)->start(), (*it)->count());
+
+          info(100)<<"DEBUG : temporaly event sent "<<endl ;
+          checkBuffers(tmpBufferedEvent.ranks);
+
+          tmpBufferedEvent.clear();
+
+          couldSendTmpBufferedEvent = true;
+        }
+      }
+
+      return couldSendTmpBufferedEvent;
+    }
+
+    /*!
+    If client is also server (attached mode), after sending event, it should process right away
+    the incoming event.
+    \param [in] ranks list rank of server connected this client
+    */
+    void CContextClient::waitEvent(list<int>& ranks)
+    {
+      parentServer->server->setPendingEvent();
+      while (checkBuffers(ranks))
+      {
+        parentServer->server->listen();
+        parentServer->server->checkPendingRequest();
+      }
+
+      while (parentServer->server->hasPendingEvent())
+      {
+       parentServer->server->eventLoop();
+      }
+    }
+
+    /*!
+     * Get buffers for each connection to the servers. This function blocks until there is enough room in the buffers unless
+     * it is explicitly requested to be non-blocking.
+     *
+     * \param [in] serverList list of rank of connected server
+     * \param [in] sizeList size of message corresponding to each connection
+     * \param [out] retBuffers list of buffers that can be used to store an event
+     * \param [in] nonBlocking whether this function should be non-blocking
+     * \return whether the already allocated buffers could be used
+    */
+    bool CContextClient::getBuffers(const list<int>& serverList, const list<int>& sizeList, list<CBufferOut*>& retBuffers,
+                                    bool nonBlocking /*= false*/)
+    {
+      list<int>::const_iterator itServer, itSize;
+      list<CClientBuffer*> bufferList;
+      map<int,CClientBuffer*>::const_iterator it;
+      list<CClientBuffer*>::iterator itBuffer;
+      bool areBuffersFree;
+
+      for (itServer = serverList.begin(); itServer != serverList.end(); itServer++)
+      {
+        it = buffers.find(*itServer);
+        if (it == buffers.end())
+        {
+          newBuffer(*itServer);
+          it = buffers.find(*itServer);
+        }
+        bufferList.push_back(it->second);
+      }
+
+      CTimer::get("Blocking time").resume();
+      do
+      {
+        areBuffersFree = true;
+        for (itBuffer = bufferList.begin(), itSize = sizeList.begin(); itBuffer != bufferList.end(); itBuffer++, itSize++)
+          areBuffersFree &= (*itBuffer)->isBufferFree(*itSize);
+
+        if (!areBuffersFree)
+        {
+          checkBuffers();
+          if (CServer::serverLevel == 0)
+            context->server->listen();
+
+          else if (CServer::serverLevel == 1)
+          {
+            context->server->listen();
+            for (int i = 0; i < context->serverPrimServer.size(); ++i)
+              context->serverPrimServer[i]->listen();
+            CServer::contextEventLoop(false) ; // avoid dead-lock at finalize...
+          }
+
+          else if (CServer::serverLevel == 2)
+            context->server->listen();
+
+        }
+      } while (!areBuffersFree && !nonBlocking);
+
+      CTimer::get("Blocking time").suspend();
+
+      if (areBuffersFree)
+      {
+        for (itBuffer = bufferList.begin(), itSize = sizeList.begin(); itBuffer != bufferList.end(); itBuffer++, itSize++)
+          retBuffers.push_back((*itBuffer)->getBuffer(*itSize));
+      }
+
+      return areBuffersFree;
+   }
+
+   /*!
+   Make a new buffer for a certain connection to server with specific rank
+   \param [in] rank rank of connected server
+   */
+   void CContextClient::newBuffer(int rank)
+   {
+      if (!mapBufferSize_.count(rank))
+      {
+        error(0) << "WARNING: Unexpected request for buffer to communicate with server " << rank << std::endl;
+        mapBufferSize_[rank] = CXios::minBufferSize;
+        maxEventSizes[rank] = CXios::minBufferSize;
+      }
+      CClientBuffer* buffer = buffers[rank] = new CClientBuffer(interComm, rank, mapBufferSize_[rank], maxEventSizes[rank], maxBufferedEvents);
+      // Notify the server
+      CBufferOut* bufOut = buffer->getBuffer(sizeof(StdSize));
+      bufOut->put(mapBufferSize_[rank]); // Stupid C++
+      buffer->checkBuffer();
+   }
+
+   /*!
+   Verify state of buffers. Buffer is under pending state if there is no message on it
+   \return state of buffers, pending(true), ready(false)
+   */
+   bool CContextClient::checkBuffers(void)
+   {
+      map<int,CClientBuffer*>::iterator itBuff;
+      bool pending = false;
+      for (itBuff = buffers.begin(); itBuff != buffers.end(); itBuff++)
+        pending |= itBuff->second->checkBuffer();
+      return pending;
+   }
+
+   //! Release all buffers
+   void CContextClient::releaseBuffers()
+   {
+      map<int,CClientBuffer*>::iterator itBuff;
+      for (itBuff = buffers.begin(); itBuff != buffers.end(); itBuff++)
+      {
+          delete itBuff->second;
+      }
+      buffers.clear();
+   }
+
+   /*!
+   Verify state of buffers corresponding to a connection
+   \param [in] ranks list rank of server to which client connects to
+   \return state of buffers, pending(true), ready(false)
+   */
+   bool CContextClient::checkBuffers(list<int>& ranks)
+   {
+      list<int>::iterator it;
+      bool pending = false;
+      for (it = ranks.begin(); it != ranks.end(); it++) pending |= buffers[*it]->checkBuffer();
+      return pending;
+   }
+
+   /*!
+    * Set the buffer size for each connection. Warning: This function is collective.
+    *
+    * \param [in] mapSize maps the rank of the connected servers to the size of the correspoinding buffer
+    * \param [in] maxEventSize maps the rank of the connected servers to the size of the biggest event
+   */
+   void CContextClient::setBufferSize(const std::map<int,StdSize>& mapSize, const std::map<int,StdSize>& maxEventSize)
+   {
+     mapBufferSize_ = mapSize;
+     maxEventSizes = maxEventSize;
+
+     // Compute the maximum number of events that can be safely buffered.
+     double minBufferSizeEventSizeRatio = std::numeric_limits<double>::max();
+     for (std::map<int,StdSize>::const_iterator it = mapSize.begin(), ite = mapSize.end(); it != ite; ++it)
+     {
+       double ratio = double(it->second) / maxEventSizes[it->first];
+       if (ratio < minBufferSizeEventSizeRatio) minBufferSizeEventSizeRatio = ratio;
+     }
+     MPI_Allreduce(MPI_IN_PLACE, &minBufferSizeEventSizeRatio, 1, MPI_DOUBLE, MPI_MIN, intraComm);
+
+     if (minBufferSizeEventSizeRatio < 1.0)
+     {
+       ERROR("void CContextClient::setBufferSize(const std::map<int,StdSize>& mapSize, const std::map<int,StdSize>& maxEventSize)",
+             << "The buffer sizes and the maximum events sizes are incoherent.");
+     }
+     else if (minBufferSizeEventSizeRatio == std::numeric_limits<double>::max())
+       minBufferSizeEventSizeRatio = 1.0; // In this case, maxBufferedEvents will never be used but we want to avoid any floating point exception
+
+     maxBufferedEvents = size_t(2 * minBufferSizeEventSizeRatio) // there is room for two local buffers on the server
+                          + size_t(minBufferSizeEventSizeRatio)  // one local buffer can always be fully used
+                          + 1;                                   // the other local buffer might contain only one event
+   }
+
+  /*!
+  Get leading server in the group of connected server
+  \return ranks of leading servers
+  */
+  const std::list<int>& CContextClient::getRanksServerNotLeader(void) const
+  {
+    return ranksServerNotLeader;
+  }
+
+  /*!
+  Check if client connects to leading server
+  \return connected(true), not connected (false)
+  */
+  bool CContextClient::isServerNotLeader(void) const
+  {
+    return !ranksServerNotLeader.empty();
+  }
+
+  /*!
+  Get leading server in the group of connected server
+  \return ranks of leading servers
+  */
+  const std::list<int>& CContextClient::getRanksServerLeader(void) const
+  {
+    return ranksServerLeader;
+  }
+
+  /*!
+  Check if client connects to leading server
+  \return connected(true), not connected (false)
+  */
+  bool CContextClient::isServerLeader(void) const
+  {
+    return !ranksServerLeader.empty();
+  }
+
+  /*!
+   * Check if the attached mode is used.
+   *
+   * \return true if and only if attached mode is used
+   */
+  bool CContextClient::isAttachedModeEnabled() const
+  {
+    return (parentServer != 0);
+  }
+
+   /*!
+   * Finalize context client and do some reports. Function is non-blocking.
+   */
+  void CContextClient::finalize(void)
+  {
+    map<int,CClientBuffer*>::iterator itBuff;
+    bool stop = false;
+
+    CTimer::get("Blocking time").resume();
+    while (hasTemporarilyBufferedEvent())
+    {
+      checkBuffers();
+      sendTemporarilyBufferedEvent();
+    }
+    CTimer::get("Blocking time").suspend();
+
+    CEventClient event(CContext::GetType(), CContext::EVENT_ID_CONTEXT_FINALIZE);
+    if (isServerLeader())
+    {
+      CMessage msg;
+      const std::list<int>& ranks = getRanksServerLeader();
+      for (std::list<int>::const_iterator itRank = ranks.begin(), itRankEnd = ranks.end(); itRank != itRankEnd; ++itRank)
+      {
+        info(100)<<"DEBUG : Sent context Finalize event to rank "<<*itRank<<endl ;
+        event.push(*itRank, 1, msg);
+      }
+      sendEvent(event);
+    }
+    else sendEvent(event);
+
+    CTimer::get("Blocking time").resume();
+//    while (!stop)
+    {
+      checkBuffers();
+      if (hasTemporarilyBufferedEvent())
+        sendTemporarilyBufferedEvent();
+
+      stop = true;
+//      for (itBuff = buffers.begin(); itBuff != buffers.end(); itBuff++) stop &= !itBuff->second->hasPendingRequest();
+    }
+    CTimer::get("Blocking time").suspend();
+
+    std::map<int,StdSize>::const_iterator itbMap = mapBufferSize_.begin(),
+                                          iteMap = mapBufferSize_.end(), itMap;
+
+    StdSize totalBuf = 0;
+    for (itMap = itbMap; itMap != iteMap; ++itMap)
+    {
+      report(10) << " Memory report : Context <" << context->getId() << "> : client side : memory used for buffer of each connection to server" << endl
+                 << "  +) To server with rank " << itMap->first << " : " << itMap->second << " bytes " << endl;
+      totalBuf += itMap->second;
+    }
+    report(0) << " Memory report : Context <" << context->getId() << "> : client side : total memory used for buffer " << totalBuf << " bytes" << endl;
+
+    //releaseBuffers(); // moved to CContext::finalize()
+  }
+
+
+  /*!
+  */
+  bool CContextClient::havePendingRequests(void)
+  {
+    bool pending = false;
+    map<int,CClientBuffer*>::iterator itBuff;
+    for (itBuff = buffers.begin(); itBuff != buffers.end(); itBuff++)
+      pending |= itBuff->second->hasPendingRequest();
+    return pending;
+  }
+
+
+}
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/context_client.hpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/context_client.hpp	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/context_client.hpp	(revision 1749)
@@ -0,0 +1,115 @@
+#ifndef __CONTEXT_CLIENT_HPP__
+#define __CONTEXT_CLIENT_HPP__
+
+#include "xios_spl.hpp"
+#include "buffer_out.hpp"
+#include "buffer_in.hpp"
+#include "buffer_client.hpp"
+#include "event_client.hpp"
+#include "event_server.hpp"
+#include "mpi.hpp"
+#include "registry.hpp"
+
+namespace xios
+{
+  class CContext;
+
+  /*!
+  \class CContextClient
+  A context can be both on client and on server side. In order to differenciate the role of
+  context on each side, e.x client sending events, server receiving and processing events, there is a need of
+  concrete "context" classes for both sides.
+  CContextClient processes and sends events from client to server where CContextServer receives these events
+  and processes them.
+  */
+  class CContextClient
+  {
+    public:
+      // Contructor
+      CContextClient(CContext* parent, MPI_Comm intraComm, MPI_Comm interComm, CContext* parentServer = 0);
+
+      // Send event to server
+      void sendEvent(CEventClient& event);
+      bool sendTemporarilyBufferedEvent();
+      void waitEvent(list<int>& ranks);
+
+      // Functions to set/get buffers
+      bool getBuffers(const list<int>& serverList, const list<int>& sizeList, list<CBufferOut*>& retBuffers, bool nonBlocking = false);
+      void newBuffer(int rank);
+      bool checkBuffers(list<int>& ranks);
+      bool checkBuffers(void);
+      void releaseBuffers(void);
+      bool havePendingRequests(void);
+
+      bool isServerLeader(void) const;
+      bool isServerNotLeader(void) const;
+      const std::list<int>& getRanksServerLeader(void) const;
+      const std::list<int>& getRanksServerNotLeader(void) const;
+
+      bool isAttachedModeEnabled() const;
+      bool hasTemporarilyBufferedEvent() const { return !tmpBufferedEvent.isEmpty(); };
+
+      static void computeLeader(int clientRank, int clientSize, int serverSize,
+                                std::list<int>& rankRecvLeader,
+                                std::list<int>& rankRecvNotLeader);
+
+      // Close and finalize context client
+//      void closeContext(void);  Never been implemented.
+      void finalize(void);
+
+      void setBufferSize(const std::map<int,StdSize>& mapSize, const std::map<int,StdSize>& maxEventSize);
+
+    public:
+      CContext* context; //!< Context for client
+
+      size_t timeLine; //!< Timeline of each event
+
+      int clientRank; //!< Rank of current client
+
+      int clientSize; //!< Size of client group
+
+      int serverSize; //!< Size of server group
+
+      MPI_Comm interComm; //!< Communicator of server group
+
+      MPI_Comm intraComm; //!< Communicator of client group
+
+      map<int,CClientBuffer*> buffers; //!< Buffers for connection to servers
+
+    private:
+      //! Mapping of server and buffer size for each connection to server
+      std::map<int,StdSize> mapBufferSize_;
+      //! Maximum event sizes estimated for each connection to server
+      std::map<int,StdSize> maxEventSizes;
+      //! Maximum number of events that can be buffered
+      StdSize maxBufferedEvents;
+
+      struct {
+        std::list<int> ranks, sizes;
+        std::list<CBufferOut*> buffers;
+
+        bool isEmpty() const { return ranks.empty(); };
+        void clear() {
+          ranks.clear();
+          sizes.clear();
+
+          for (std::list<CBufferOut*>::iterator it = buffers.begin(); it != buffers.end(); it++)
+            delete *it;
+
+          buffers.clear();
+        };
+      } tmpBufferedEvent; //! Event temporarily buffered (used only on the server)
+
+      //! Context for server (Only used in attached mode)
+      CContext* parentServer;
+
+      //! List of server ranks for which the client is leader
+      std::list<int> ranksServerLeader;
+
+      //! List of server ranks for which the client is not leader
+      std::list<int> ranksServerNotLeader;
+
+  };
+}
+
+#endif // __CONTEXT_CLIENT_HPP__
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/context_server.cpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/context_server.cpp	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/context_server.cpp	(revision 1749)
@@ -0,0 +1,289 @@
+#include "context_server.hpp"
+#include "buffer_in.hpp"
+#include "type.hpp"
+#include "context.hpp"
+#include "object_template.hpp"
+#include "group_template.hpp"
+#include "attribute_template.hpp"
+#include "domain.hpp"
+#include "field.hpp"
+#include "file.hpp"
+#include "grid.hpp"
+#include "mpi.hpp"
+#include "tracer.hpp"
+#include "timer.hpp"
+#include "cxios.hpp"
+#include "event_scheduler.hpp"
+#include "server.hpp"
+#include <boost/functional/hash.hpp>
+
+
+
+namespace xios
+{
+
+  CContextServer::CContextServer(CContext* parent,MPI_Comm intraComm_,MPI_Comm interComm_)
+  {
+    context=parent;
+    intraComm=intraComm_;
+    MPI_Comm_size(intraComm,&intraCommSize);
+    MPI_Comm_rank(intraComm,&intraCommRank);
+
+    interComm=interComm_;
+    int flag;
+    MPI_Comm_test_inter(interComm,&flag);
+    if (flag) MPI_Comm_remote_size(interComm,&commSize);
+    else  MPI_Comm_size(interComm,&commSize);
+
+    currentTimeLine=0;
+    scheduled=false;
+    finished=false;
+    boost::hash<string> hashString;
+    if (CServer::serverLevel == 1)
+      hashId=hashString(context->getId() + boost::lexical_cast<string>(context->clientPrimServer.size()));
+    else
+      hashId=hashString(context->getId());
+  }
+
+  void CContextServer::setPendingEvent(void)
+  {
+    pendingEvent=true;
+  }
+
+  bool CContextServer::hasPendingEvent(void)
+  {
+    return pendingEvent;
+  }
+
+  bool CContextServer::hasFinished(void)
+  {
+    return finished;
+  }
+
+  bool CContextServer::eventLoop(bool enableEventsProcessing /*= true*/)
+  {
+    listen();
+    checkPendingRequest();
+    if (enableEventsProcessing)
+      processEvents();
+    return finished;
+  }
+
+  void CContextServer::listen(void)
+  {
+    int rank;
+    int flag;
+    int count;
+    char * addr;
+    MPI_Status status;
+    map<int,CServerBuffer*>::iterator it;
+    bool okLoop;
+
+    traceOff();
+    MPI_Iprobe(MPI_ANY_SOURCE, 20,interComm,&flag,&status);
+    traceOn();
+
+    if (flag==true)
+    {
+      rank=status.MPI_SOURCE ;
+      okLoop = true;
+      if (pendingRequest.find(rank)==pendingRequest.end())
+        okLoop = !listenPendingRequest(status) ;
+      if (okLoop)
+      {
+        for(rank=0;rank<commSize;rank++)
+        {
+          if (pendingRequest.find(rank)==pendingRequest.end())
+          {
+
+            traceOff();
+            MPI_Iprobe(rank, 20,interComm,&flag,&status);
+            traceOn();
+            if (flag==true) listenPendingRequest(status) ;
+          }
+        }
+      }
+    }
+  }
+
+  bool CContextServer::listenPendingRequest(MPI_Status& status)
+  {
+    int count;
+    char * addr;
+    map<int,CServerBuffer*>::iterator it;
+    int rank=status.MPI_SOURCE ;
+
+    it=buffers.find(rank);
+    if (it==buffers.end()) // Receive the buffer size and allocate the buffer
+    {
+       StdSize buffSize = 0;
+       MPI_Recv(&buffSize, 1, MPI_LONG, rank, 20, interComm, &status);
+       mapBufferSize_.insert(std::make_pair(rank, buffSize));
+       it=(buffers.insert(pair<int,CServerBuffer*>(rank,new CServerBuffer(buffSize)))).first;
+       return true;
+    }
+    else
+    {
+      MPI_Get_count(&status,MPI_CHAR,&count);
+      if (it->second->isBufferFree(count))
+      {
+         addr=(char*)it->second->getBuffer(count);
+         MPI_Irecv(addr,count,MPI_CHAR,rank,20,interComm,&pendingRequest[rank]);
+         bufferRequest[rank]=addr;
+         return true;
+       }
+      else
+        return false;
+    }
+  }
+
+
+  void CContextServer::checkPendingRequest(void)
+  {
+    map<int,MPI_Request>::iterator it;
+    list<int> recvRequest;
+    list<int>::iterator itRecv;
+    int rank;
+    int flag;
+    int count;
+    MPI_Status status;
+
+    for(it=pendingRequest.begin();it!=pendingRequest.end();it++)
+    {
+      rank=it->first;
+      traceOff();
+      MPI_Test(& it->second, &flag, &status);
+      traceOn();
+      if (flag==true)
+      {
+        recvRequest.push_back(rank);
+        MPI_Get_count(&status,MPI_CHAR,&count);
+        processRequest(rank,bufferRequest[rank],count);
+      }
+    }
+
+    for(itRecv=recvRequest.begin();itRecv!=recvRequest.end();itRecv++)
+    {
+      pendingRequest.erase(*itRecv);
+      bufferRequest.erase(*itRecv);
+    }
+  }
+
+  void CContextServer::processRequest(int rank, char* buff,int count)
+  {
+
+    CBufferIn buffer(buff,count);
+    char* startBuffer,endBuffer;
+    int size, offset;
+    size_t timeLine;
+    map<size_t,CEventServer*>::iterator it;
+
+    CTimer::get("Process request").resume();
+    while(count>0)
+    {
+      char* startBuffer=(char*)buffer.ptr();
+      CBufferIn newBuffer(startBuffer,buffer.remain());
+      newBuffer>>size>>timeLine;
+
+      it=events.find(timeLine);
+      if (it==events.end()) it=events.insert(pair<int,CEventServer*>(timeLine,new CEventServer)).first;
+      it->second->push(rank,buffers[rank],startBuffer,size);
+
+      buffer.advance(size);
+      count=buffer.remain();
+    }
+    CTimer::get("Process request").suspend();
+  }
+
+  void CContextServer::processEvents(void)
+  {
+    map<size_t,CEventServer*>::iterator it;
+    CEventServer* event;
+
+    it=events.find(currentTimeLine);
+    if (it!=events.end())
+    {
+      event=it->second;
+
+      if (event->isFull())
+      {
+        if (!scheduled && CServer::eventScheduler) // Skip event scheduling for attached mode and reception on client side
+        {
+          CServer::eventScheduler->registerEvent(currentTimeLine,hashId);
+          scheduled=true;
+        }
+        else if (!CServer::eventScheduler || CServer::eventScheduler->queryEvent(currentTimeLine,hashId) )
+        {
+         // When using attached mode, synchronise the processes to avoid that differents event be scheduled by differents processes
+         // The best way to properly solve this problem will be to use the event scheduler also in attached mode
+         // for now just set up a MPI barrier
+         if (!CServer::eventScheduler && CXios::isServer) MPI_Barrier(intraComm) ;
+
+         CTimer::get("Process events").resume();
+         dispatchEvent(*event);
+         CTimer::get("Process events").suspend();
+         pendingEvent=false;
+         delete event;
+         events.erase(it);
+         currentTimeLine++;
+         scheduled = false;
+        }
+      }
+    }
+  }
+
+  CContextServer::~CContextServer()
+  {
+    map<int,CServerBuffer*>::iterator it;
+    for(it=buffers.begin();it!=buffers.end();++it) delete it->second;
+  }
+
+  void CContextServer::dispatchEvent(CEventServer& event)
+  {
+    string contextName;
+    string buff;
+    int MsgSize;
+    int rank;
+    list<CEventServer::SSubEvent>::iterator it;
+    StdString ctxId = context->getId();
+    CContext::setCurrent(ctxId);
+    StdSize totalBuf = 0;
+
+    if (event.classId==CContext::GetType() && event.type==CContext::EVENT_ID_CONTEXT_FINALIZE)
+    {
+      finished=true;
+      info(20)<<" CContextServer: Receive context <"<<context->getId()<<"> finalize."<<endl;
+      context->finalize();
+      std::map<int, StdSize>::const_iterator itbMap = mapBufferSize_.begin(),
+                           iteMap = mapBufferSize_.end(), itMap;
+      for (itMap = itbMap; itMap != iteMap; ++itMap)
+      {
+        rank = itMap->first;
+        report(10)<< " Memory report : Context <"<<ctxId<<"> : server side : memory used for buffer of each connection to client" << endl
+            << "  +) With client of rank " << rank << " : " << itMap->second << " bytes " << endl;
+        totalBuf += itMap->second;
+      }
+      report(0)<< " Memory report : Context <"<<ctxId<<"> : server side : total memory used for buffer "<<totalBuf<<" bytes"<<endl;
+    }
+    else if (event.classId==CContext::GetType()) CContext::dispatchEvent(event);
+    else if (event.classId==CContextGroup::GetType()) CContextGroup::dispatchEvent(event);
+    else if (event.classId==CCalendarWrapper::GetType()) CCalendarWrapper::dispatchEvent(event);
+    else if (event.classId==CDomain::GetType()) CDomain::dispatchEvent(event);
+    else if (event.classId==CDomainGroup::GetType()) CDomainGroup::dispatchEvent(event);
+    else if (event.classId==CAxis::GetType()) CAxis::dispatchEvent(event);
+    else if (event.classId==CAxisGroup::GetType()) CAxisGroup::dispatchEvent(event);
+    else if (event.classId==CScalar::GetType()) CScalar::dispatchEvent(event);
+    else if (event.classId==CScalarGroup::GetType()) CScalarGroup::dispatchEvent(event);
+    else if (event.classId==CGrid::GetType()) CGrid::dispatchEvent(event);
+    else if (event.classId==CGridGroup::GetType()) CGridGroup::dispatchEvent(event);
+    else if (event.classId==CField::GetType()) CField::dispatchEvent(event);
+    else if (event.classId==CFieldGroup::GetType()) CFieldGroup::dispatchEvent(event);
+    else if (event.classId==CFile::GetType()) CFile::dispatchEvent(event);
+    else if (event.classId==CFileGroup::GetType()) CFileGroup::dispatchEvent(event);
+    else if (event.classId==CVariable::GetType()) CVariable::dispatchEvent(event);
+    else
+    {
+      ERROR("void CContextServer::dispatchEvent(CEventServer& event)",<<" Bad event class Id"<<endl);
+    }
+  }
+}
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/context_server.hpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/context_server.hpp	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/context_server.hpp	(revision 1749)
@@ -0,0 +1,56 @@
+#ifndef __CONTEXT_SERVER_HPP__
+#define __CONTEXT_SERVER_HPP__
+#include "xios_spl.hpp"
+#include "event_server.hpp"
+#include "buffer_server.hpp"
+#include "mpi.hpp"
+
+namespace xios
+{
+  class CContext ;
+
+  class CContextServer
+  {
+    public:
+
+    CContextServer(CContext* parent,MPI_Comm intraComm,MPI_Comm interComm) ;
+    bool eventLoop(bool enableEventsProcessing = true);
+    void listen(void) ;
+    bool listenPendingRequest(MPI_Status& status) ;
+    void checkPendingRequest(void) ;
+    void processRequest(int rank, char* buff,int count) ;
+    void processEvents(void) ;
+    bool hasFinished(void);
+    void dispatchEvent(CEventServer& event) ;
+    void setPendingEvent(void) ;
+    bool hasPendingEvent(void) ;
+
+    MPI_Comm intraComm ;
+    int intraCommSize ;
+    int intraCommRank ;
+
+    MPI_Comm interComm ;
+    int commSize ;
+
+    map<int,CServerBuffer*> buffers ;
+    map<int,MPI_Request> pendingRequest ;
+    map<int,char*> bufferRequest ;
+
+    map<size_t,CEventServer*> events ;
+    size_t currentTimeLine ;
+    CContext* context ;
+      
+    bool finished ;
+    bool pendingEvent ;
+    bool scheduled  ;    /*!< event of current timeline is alreading scheduled ? */
+    size_t hashId ;
+
+    ~CContextServer() ;
+
+    private:
+      std::map<int, StdSize> mapBufferSize_;
+  } ;
+
+}
+
+#endif
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/cxios.cpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/cxios.cpp	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/cxios.cpp	(revision 1749)
@@ -0,0 +1,307 @@
+
+#include "xios_spl.hpp"
+#include "cxios.hpp"
+#include "client.hpp"
+#include "server.hpp"
+#include "xml_parser.hpp"
+#include <boost/functional/hash.hpp>
+#include "mpi.hpp"
+#include "memory.hpp"
+#include <new>
+#include "memtrack.hpp"
+#include "registry.hpp"
+
+namespace xios
+{
+  string CXios::rootFile="./iodef.xml" ;
+  string CXios::xiosCodeId="xios.x" ;
+  string CXios::clientFile="./xios_client";
+  string CXios::serverFile="./xios_server";
+  string CXios::serverPrmFile="./xios_server1";
+  string CXios::serverSndFile="./xios_server2";
+
+  bool CXios::xiosStack = true;
+  bool CXios::systemStack = false;
+
+  bool CXios::isClient ;
+  bool CXios::isServer ;
+  MPI_Comm CXios::globalComm ;
+  bool CXios::usingOasis ;
+  bool CXios::usingServer = false;
+  bool CXios::usingServer2 = false;
+  int CXios::ratioServer2 = 50;
+  int CXios::nbPoolsServer2 = 1;
+  double CXios::bufferSizeFactor = 1.0;
+  const double CXios::defaultBufferSizeFactor = 1.0;
+  StdSize CXios::minBufferSize = 1024 * sizeof(double);
+  StdSize CXios::maxBufferSize = std::numeric_limits<int>::max() ;
+  bool CXios::printLogs2Files;
+  bool CXios::isOptPerformance = true;
+  CRegistry* CXios::globalRegistry = 0;
+  double CXios::recvFieldTimeout = 300.0;
+  bool CXios::checkEventSync=false ;
+ 
+  //! Parse configuration file and create some objects from it
+  void CXios::initialize()
+  {
+    set_new_handler(noMemory);
+    parseFile(rootFile);
+    parseXiosConfig();
+  }
+
+  /*!
+  \brief Parse xios part of configuration file (.iodef.xml)
+   Both client and server need information returned from this function
+  */
+  void CXios::parseXiosConfig()
+  {
+    usingOasis=getin<bool>("using_oasis",false) ;
+    usingServer=getin<bool>("using_server",false) ;
+    usingServer2=getin<bool>("using_server2",false) ;
+    ratioServer2=getin<int>("ratio_server2",50);
+    nbPoolsServer2=getin<int>("number_pools_server2",0);
+    info.setLevel(getin<int>("info_level",0)) ;
+    report.setLevel(getin<int>("info_level",50));
+    printLogs2Files=getin<bool>("print_file",false);
+
+    xiosStack=getin<bool>("xios_stack",true) ;
+    systemStack=getin<bool>("system_stack",false) ;
+    if (xiosStack && systemStack)
+    {
+      xiosStack = false;
+    }
+
+    StdString bufMemory("memory");
+    StdString bufPerformance("performance");
+    StdString bufOpt = getin<StdString>("optimal_buffer_size", bufPerformance);
+    std::transform(bufOpt.begin(), bufOpt.end(), bufOpt.begin(), ::tolower);
+    if (0 == bufOpt.compare(bufMemory)) isOptPerformance = false;
+    else if (0 != bufOpt.compare(bufPerformance))
+    {
+      ERROR("CXios::parseXiosConfig()", << "optimal_buffer_size must be memory or performance "<< endl );
+    }
+
+    bufferSizeFactor = getin<double>("buffer_size_factor", defaultBufferSizeFactor);
+    minBufferSize = getin<int>("min_buffer_size", 1024 * sizeof(double));
+    maxBufferSize = getin<int>("max_buffer_size", std::numeric_limits<int>::max());
+    recvFieldTimeout = getin<double>("recv_field_timeout", recvFieldTimeout);
+    if (recvFieldTimeout < 0.0)
+      ERROR("CXios::parseXiosConfig()", "recv_field_timeout cannot be negative.");
+
+    checkEventSync = getin<bool>("check_event_sync", checkEventSync);
+
+    globalComm=MPI_COMM_WORLD ;
+  }
+
+  /*!
+  Initialize client
+  \param [in] codeId identity of context
+  \param [in] localComm local communicator
+  \param [in/out] returnComm communicator corresponding to group of client with same codeId
+  */
+  void CXios::initClientSide(const string& codeId, MPI_Comm& localComm, MPI_Comm& returnComm)
+  TRY
+  {
+    initialize() ;
+
+    isClient = true;
+
+    CClient::initialize(codeId,localComm,returnComm) ;
+    if (CClient::getRank()==0) globalRegistry = new CRegistry(returnComm) ;
+
+    // If there are no server processes then we are in attached mode
+    // and the clients are also servers
+    isServer = !usingServer;
+
+    if (printLogs2Files)
+    {
+      CClient::openInfoStream(clientFile);
+      CClient::openErrorStream(clientFile);
+    }
+    else
+    {
+      CClient::openInfoStream();
+      CClient::openErrorStream();
+    }
+  }
+  CATCH
+
+  void CXios::clientFinalize(void)
+  {
+     CClient::finalize() ;
+     if (CClient::getRank()==0)
+     {
+       info(80)<<"Write data base Registry"<<endl<<globalRegistry->toString()<<endl ;
+       globalRegistry->toFile("xios_registry.bin") ;
+       delete globalRegistry ;
+     }
+
+#ifdef XIOS_MEMTRACK
+
+#ifdef XIOS_MEMTRACK_LIGHT
+       report(10) << " Memory report : current memory used by XIOS : "<<  MemTrack::getCurrentMemorySize()*1.0/(1024*1024)<<" Mbyte" << endl ;
+       report(10) << " Memory report : maximum memory used by XIOS : "<<  MemTrack::getMaxMemorySize()*1.0/(1024*1024)<<" Mbyte" << endl ;
+#endif
+
+#ifdef XIOS_MEMTRACK_FULL
+     MemTrack::TrackListMemoryUsage() ;
+     MemTrack::TrackDumpBlocks();
+#endif
+
+     CClient::closeInfoStream();
+
+#endif
+  }
+
+  //! Init server by parsing only xios part of config file
+  void CXios::initServer()
+  {
+    set_new_handler(noMemory);
+    std::set<StdString> parseList;
+    parseList.insert("xios");
+    xml::CXMLParser::ParseFile(rootFile, parseList);
+    parseXiosConfig();
+  }
+
+  //! Initialize server then put it into listening state
+  void CXios::initServerSide(void)
+  {
+    initServer();
+    isClient = false;
+    isServer = true;
+
+    // Initialize all aspects MPI
+    CServer::initialize();
+    if (CServer::getRank()==0 && CServer::serverLevel != 1) globalRegistry = new CRegistry(CServer::intraComm) ;
+    
+    if (printLogs2Files)
+    {
+      if (CServer::serverLevel == 0)
+      {
+        CServer::openInfoStream(serverFile);
+        CServer::openErrorStream(serverFile);
+      }
+      else if (CServer::serverLevel == 1)
+      {
+        CServer::openInfoStream(serverPrmFile);
+        CServer::openErrorStream(serverPrmFile);
+      }
+      else
+      {
+        CServer::openInfoStream(serverSndFile);
+        CServer::openErrorStream(serverSndFile);
+      }
+    }
+    else
+    {
+      CServer::openInfoStream();
+      CServer::openErrorStream();
+    }
+
+    // Enter the loop to listen message from Client
+    CServer::eventLoop();
+
+    // Finalize
+    if (CServer::serverLevel == 0)
+    {
+      if (CServer::getRank()==0)
+      {
+        info(80)<<"Write data base Registry"<<endl<<globalRegistry->toString()<<endl ;
+        globalRegistry->toFile("xios_registry.bin") ;
+        delete globalRegistry ;
+      }
+    }
+    else
+    {
+      // If using two server levels:
+      // (1) merge registries on each pool
+      // (2) send merged registries to the first pool
+      // (3) merge received registries on the first pool
+      if (CServer::serverLevel == 2)
+      {
+        vector<int>& secondaryServerGlobalRanks = CServer::getSecondaryServerGlobalRanks();
+        int firstPoolGlobalRank = secondaryServerGlobalRanks[0];
+        int rankGlobal;
+        MPI_Comm_rank(globalComm, &rankGlobal);
+
+        // Merge registries defined on each pools
+        CRegistry globalRegistrySndServers (CServer::intraComm);
+
+        // All pools (except the first): send globalRegistry to the first pool
+        for (int i=1; i<secondaryServerGlobalRanks.size(); i++)
+        {
+          if (rankGlobal == secondaryServerGlobalRanks[i])
+          {
+            globalRegistrySndServers.mergeRegistry(*globalRegistry) ;
+            int registrySize = globalRegistrySndServers.size();
+            MPI_Send(&registrySize,1,MPI_LONG,firstPoolGlobalRank,15,CXios::globalComm) ;
+            CBufferOut buffer(registrySize) ;
+            globalRegistrySndServers.toBuffer(buffer) ;
+            MPI_Send(buffer.start(),registrySize,MPI_CHAR,firstPoolGlobalRank,15,CXios::globalComm) ;
+          }
+        }
+
+        // First pool: receive globalRegistry of all secondary server pools, merge and write the resultant registry
+        if (rankGlobal == firstPoolGlobalRank)
+        {
+          MPI_Status status;
+          char* recvBuff;
+
+          globalRegistrySndServers.mergeRegistry(*globalRegistry) ;
+
+          for (int i=1; i< secondaryServerGlobalRanks.size(); i++)
+          {
+            int rank = secondaryServerGlobalRanks[i];
+            int registrySize = 0;
+            MPI_Recv(&registrySize, 1, MPI_LONG, rank, 15, CXios::globalComm, &status);
+            recvBuff = new char[registrySize];
+            MPI_Recv(recvBuff, registrySize, MPI_CHAR, rank, 15, CXios::globalComm, &status);
+            CBufferIn buffer(recvBuff, registrySize) ;
+            CRegistry recvRegistry;
+            recvRegistry.fromBuffer(buffer) ;
+            globalRegistrySndServers.mergeRegistry(recvRegistry) ;
+            delete[] recvBuff;
+          }
+
+          info(80)<<"Write data base Registry"<<endl<<globalRegistrySndServers.toString()<<endl ;
+          globalRegistrySndServers.toFile("xios_registry.bin") ;
+
+        }
+      }
+      delete globalRegistry;
+    }
+    CServer::finalize();
+
+#ifdef XIOS_MEMTRACK
+
+#ifdef XIOS_MEMTRACK_LIGHT
+       report(10) << " Memory report : current memory used by XIOS : "<<  MemTrack::getCurrentMemorySize()*1.0/(1024*1024)<<" Mbyte" << endl ;
+       report(10) << " Memory report : maximum memory used by XIOS : "<<  MemTrack::getMaxMemorySize()*1.0/(1024*1024)<<" Mbyte" << endl ;
+#endif
+
+#ifdef XIOS_MEMTRACK_FULL
+     MemTrack::TrackListMemoryUsage() ;
+     MemTrack::TrackDumpBlocks();
+#endif
+#endif
+    CServer::closeInfoStream();
+  }
+
+  //! Parse configuration file
+  void CXios::parseFile(const string& filename)
+  {
+    xml::CXMLParser::ParseFile(filename);
+  }
+
+  //! Set using server
+  void CXios::setUsingServer()
+  {
+    usingServer = true;
+  }
+
+  //! Unset using server
+  void CXios::setNotUsingServer()
+  {
+    usingServer = false;
+  }
+}
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/cxios.hpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/cxios.hpp	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/cxios.hpp	(revision 1749)
@@ -0,0 +1,76 @@
+#ifndef __XIOS_HPP__
+#define __XIOS_HPP__
+
+#include "xios_spl.hpp"
+#include "mpi.hpp"
+#include "registry.hpp"
+
+namespace xios
+{
+  /*!
+  \class CXios
+  */
+  class CXios
+  {
+    public:
+     static void initialize(void) ;
+     static void initClientSide(const string & codeId, MPI_Comm& localComm, MPI_Comm& returnComm) ;
+     static void initServerSide(void) ;
+     static void clientFinalize(void) ;
+     static void parseFile(const string& filename) ;
+
+     template <typename T>
+     static T getin(const string& id,const T& defaultValue) ;
+
+     template <typename T>
+     static T getin(const string& id) ;
+
+    public:
+     static string rootFile ; //!< Configuration filename
+     static string xiosCodeId ; //!< Identity for XIOS
+     static string clientFile;        //!< Filename template for client
+     static string serverFile;        //!< Filename template for server
+     static string serverPrmFile;  //!< Filename template for primary server in case of two server levels
+     static string serverSndFile;  //!< Filename template for secondary server in case of two server levels
+
+     static bool xiosStack;    //!< Exception handling
+     static bool systemStack;  //!< Exception handling
+
+     static bool isClient ; //!< Check if xios is client
+     static bool isServer ; //!< Check if xios is server
+
+     static MPI_Comm globalComm ; //!< Global communicator
+
+     static bool printLogs2Files; //!< Printing out logs into files
+     static bool usingOasis ;     //!< Using Oasis
+     static bool usingServer ;    //!< Using server (server mode)
+     static bool usingServer2 ;   //!< Using secondary server (server mode). IMPORTANT: Use this variable ONLY in CServer::initialize().
+     static int ratioServer2 ;    //!< Percentage of server processors dedicated to secondary server
+     static int nbPoolsServer2 ;  //!< Number of pools created on the secondary server
+     static double bufferSizeFactor; //!< Factor used to tune the buffer size
+     static const double defaultBufferSizeFactor; //!< Default factor value
+     static StdSize minBufferSize; //!< Minimum buffer size
+     static StdSize maxBufferSize; //!< Maximum buffer size
+     static bool isOptPerformance; //!< Check if buffer size is for performance (as large as possible)
+     static CRegistry* globalRegistry ; //!< global registry which is wrote by the root process of the servers
+     static double recvFieldTimeout; //!< Time to wait for data before issuing an error when receiving a field
+     static bool checkEventSync; //!< For debuuging, check if event are coherent and synchrone on client side
+
+    public:
+     //! Setting xios to use server mode
+     static void setUsingServer();
+
+     //! Setting xios NOT to use server mode
+     static void setNotUsingServer();
+
+     //! Initialize server (if any)
+     static  void initServer();
+
+    private:
+      //! Parse only Xios part of configuration file
+      static void parseXiosConfig();
+  } ;
+}
+
+//#include "cxios_impl.hpp"
+#endif // __XIOS_HPP__
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/cxios_decl.cpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/cxios_decl.cpp	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/cxios_decl.cpp	(revision 1749)
@@ -0,0 +1,16 @@
+#include "cxios_impl.hpp"
+#include "xios_spl.hpp"
+#include <string>
+
+namespace xios
+{
+# define macro(T) \
+  template T CXios::getin<T>(const string& id) ; \
+  template T CXios::getin<T>(const string& id, const T& defaultValue) ;
+  
+  macro(int)
+  macro(double)
+  macro(bool)
+  macro(StdSize)
+  macro(string)
+}
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/cxios_impl.hpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/cxios_impl.hpp	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/cxios_impl.hpp	(revision 1749)
@@ -0,0 +1,26 @@
+#ifndef __XIOS_IMPL_HPP__
+#define __XIOS_IMPL_HPP__
+
+#include "xios_spl.hpp"
+#include "variable.hpp"
+#include "object_template.hpp"
+#include "cxios.hpp"
+
+namespace xios
+{
+  template <typename T>
+  T CXios::getin(const string& id)
+  {
+    return CVariable::get("xios",id)->getData<T>() ;
+  }
+
+  template <typename T>
+  T CXios::getin(const string& id, const T& defaultValue)
+  {
+    if (CVariable::has("xios",id)) return CVariable::get("xios",id)->getData<T>() ;
+    else return defaultValue ;
+  }
+
+
+}
+#endif
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/data_input.cpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/data_input.cpp	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/data_input.cpp	(revision 1749)
@@ -0,0 +1,42 @@
+#include "data_input.hpp"
+
+#include "attribute_template.hpp"
+#include "group_template.hpp"
+#include "context.hpp"
+
+namespace xios
+{
+  CDataInput::~CDataInput(void)
+  { /* Nothing to do */ }
+
+  //----------------------------------------------------------------
+
+  StdSize CDataInput::getFieldNbRecords(CField* field)
+  {
+    return this->getFieldNbRecords_(field);
+  }
+
+  //----------------------------------------------------------------
+
+  void CDataInput::readFieldData(CField* field)
+  {
+    this->readFieldData_(field);
+  }
+
+  //----------------------------------------------------------------
+
+  void CDataInput::closeFile(void)
+  {
+    this->closeFile_();
+  }
+
+  void CDataInput::readFieldAttributesMetaData(CField* field)
+  {
+    this->readFieldAttributes_(field, false);
+  }
+
+  void CDataInput::readFieldAttributesValues(CField* field)
+  {
+    this->readFieldAttributes_(field, true);
+  }
+} // namespace xios
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/data_input.hpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/data_input.hpp	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/data_input.hpp	(revision 1749)
@@ -0,0 +1,38 @@
+#ifndef __XIOS_DATA_INPUT__
+#define __XIOS_DATA_INPUT__
+
+/// XIOS headers ///
+#include "xios_spl.hpp"
+#include "exception.hpp"
+#include "field.hpp"
+
+
+namespace xios
+{
+  class CDataInput
+  {
+    public:
+      /// Input type ///
+      typedef enum { ONE_FILE = 0, MULTI_GROUP, MULTI_FILE } EDataInputType;
+
+      /// Read methods ///
+      StdSize getFieldNbRecords(CField* field);
+      void readFieldData(CField* field);
+      void readFieldAttributesMetaData(CField* field);
+      void readFieldAttributesValues(CField* field);
+      void closeFile(void);
+
+      virtual ~CDataInput(void);
+
+    protected:
+      virtual StdSize getFieldNbRecords_(CField* field) = 0;
+      virtual void readFieldData_(CField* field) = 0;
+      virtual void readFieldAttributes_(CField* field, bool readAttributeValues) = 0;
+      virtual void closeFile_(void) = 0;
+
+      /// Protected properties ///
+      EDataInputType type;
+  }; // class CDataInput
+} // namespace xios
+
+#endif //__XIOS_DATA_INPUT__
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/data_output.cpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/data_output.cpp	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/data_output.cpp	(revision 1749)
@@ -0,0 +1,135 @@
+#include "data_output.hpp"
+
+#include "attribute_template.hpp"
+#include "group_template.hpp"
+#include "context.hpp"
+
+namespace xios
+{
+      /// ////////////////////// DÃ©finitions ////////////////////// ///
+
+      CDataOutput::~CDataOutput(void)
+      { /* Ne rien faire de plus */ }
+
+      //----------------------------------------------------------------
+
+      void CDataOutput::writeGrid(CGrid* grid, bool allowCompressedOutput /*= false*/)
+      {
+        this->writeGrid(grid->getDomains(), grid->getAxis(), grid->getScalars());
+
+        if (allowCompressedOutput)
+          writeGridCompressed_(grid);
+      }
+
+      //----------------------------------------------------------------
+
+      void CDataOutput::writeFile(CFile*  file)
+      {
+         this->writeFile_(file);
+      }
+
+      void CDataOutput::writeAttribute(CVariable*  var)
+      {
+         this->writeAttribute_(var) ;
+      }
+
+      void CDataOutput::syncFile(void)
+      {
+         this->syncFile_();
+      }
+
+      void CDataOutput::closeFile(void)
+      {
+         this->closeFile_();
+      }
+
+      //----------------------------------------------------------------
+
+      void CDataOutput::writeGrid(CDomain* domain, CAxis* axis)
+      TRY
+      {
+         this->writeDomain_(domain);
+         this->writeAxis_(axis);
+      }
+      CATCH
+
+      void CDataOutput::writeGrid(std::vector<CDomain*> domains, std::vector<CAxis*> axis)
+      TRY
+      {
+        int domSize = domains.size();
+        int aSize = axis.size();
+        for (int i = 0; i < domSize; ++i) this->writeDomain_(domains[i]);
+        for (int i = 0; i < aSize; ++i) this->writeAxis_(axis[i]);
+      }
+      CATCH
+
+      void CDataOutput::writeGrid(std::vector<CDomain*> domains, std::vector<CAxis*> axis, std::vector<CScalar*> scalars)
+      TRY
+      {
+        int domSize = domains.size();
+        int aSize = axis.size();
+        int sSize = scalars.size();
+        for (int i = 0; i < domSize; ++i) this->writeDomain_(domains[i]);
+        for (int i = 0; i < aSize; ++i) this->writeAxis_(axis[i]);
+        for (int i = 0; i < sSize; ++i) this->writeScalar_(scalars[i]);
+      }
+      CATCH
+
+      //----------------------------------------------------------------
+
+      void CDataOutput::writeGrid(CDomain* domain)
+      TRY
+      {
+         this->writeDomain_(domain);
+      }
+      CATCH
+
+      void CDataOutput::writeTimeDimension(void)
+      TRY
+      {
+         this->writeTimeDimension_();
+      }
+      CATCH
+
+      //----------------------------------------------------------------
+
+      void CDataOutput::writeFieldTimeAxis(CField* field)
+      TRY
+      {
+         CContext* context = CContext::getCurrent() ;
+         std::shared_ptr<CCalendar> calendar = context->getCalendar();
+
+         this->writeTimeAxis_(field, calendar);
+      }
+      CATCH
+
+      void CDataOutput::writeField(CField* field)
+      TRY
+      {
+         this->writeField_(field);
+      }
+      CATCH
+
+      //----------------------------------------------------------------
+
+      void CDataOutput::writeFieldGrid(CField* field)
+      TRY
+      {
+         this->writeGrid(field->getRelGrid(),
+                         !field->indexed_output.isEmpty() && field->indexed_output);
+      }
+      CATCH
+      //----------------------------------------------------------------
+
+      void CDataOutput::writeFieldData(CField* field)
+      TRY
+      {
+//         CGrid* grid = CGrid::get(field->grid_ref.getValue());
+//         CDomain* domain = CDomain::get(grid->domain_ref.getValue());
+         this->writeFieldData_(field);
+      }
+      CATCH
+
+      ///----------------------------------------------------------------
+
+} // namespace xios
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/data_output.hpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/data_output.hpp	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/data_output.hpp	(revision 1749)
@@ -0,0 +1,71 @@
+#ifndef __XIOS_DATA_OUTPUT__
+#define __XIOS_DATA_OUTPUT__
+
+/// XIOS headers ///
+#include "xios_spl.hpp"
+#include "exception.hpp"
+#include "grid.hpp"
+#include "field.hpp"
+
+
+namespace xios
+{
+      /// ////////////////////// DÃ©clarations ////////////////////// ///
+      class CDataOutput
+      {
+         public :
+
+            /// DÃ©finition de type ///
+            typedef enum { ONE_FILE = 0, MULTI_GROUP, MULTI_FILE } EDataOutputType;
+
+            /// Ecriture ///
+            void writeFile     (CFile*     file);
+            void writeAttribute(CVariable* var);
+            void syncFile      (void);
+            void closeFile     (void);
+            void writeField    (CField* field);
+            void writeFieldTimeAxis(CField* field) ;
+            void writeFieldGrid(CField* field);
+            void writeTimeDimension(void);
+            void writeFieldData(CField* field);
+
+            virtual void definition_start(void) = 0;
+            virtual void definition_end(void)   = 0;
+
+            //!< Test if the file was opened in append mode
+            virtual bool IsInAppendMode() const { return appendMode; };
+
+            virtual ~CDataOutput(void);
+
+         protected:
+
+            /// Ecriture ///
+            void writeGrid(CGrid* grid, bool allowCompressedOutput = false);
+            void writeGrid(CDomain* domain, CAxis* axis);
+            void writeGrid(CDomain* domain);
+            void writeGrid(std::vector<CDomain*> domain, std::vector<CAxis*> axis);
+            void writeGrid(std::vector<CDomain*> domains, std::vector<CAxis*> axis, std::vector<CScalar*> scalars);
+
+            virtual void writeFile_     (CFile*      file)   = 0;
+            virtual void writeAttribute_(CVariable*  var)    = 0;
+            virtual void closeFile_     (void)               = 0;
+            virtual void syncFile_      (void)               = 0;
+            virtual void writeField_    (CField*     field)  = 0;
+            virtual void writeFieldData_(CField*     field)  = 0;
+            virtual void writeDomain_   (CDomain*    domain) = 0;
+            virtual void writeAxis_     (CAxis*      axis)   = 0;
+            virtual void writeScalar_   (CScalar*    scalar) = 0;
+            virtual void writeGridCompressed_(CGrid* grid)   = 0;
+            virtual void writeTimeDimension_(void)           = 0;
+            virtual void writeTimeAxis_ (CField*     field,
+                                         const std::shared_ptr<CCalendar> cal) = 0;
+
+            /// PropriÃ©tÃ©s protÃ©gÃ©es ///
+            EDataOutputType type;
+            bool appendMode; //!< If true, we are appending data to an existing file
+
+      }; // class CDataOutput
+
+} // namespace xios
+
+#endif //__XIOS_DATA_OUTPUT__
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/date.cpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/date.cpp	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/date.cpp	(revision 1749)
@@ -0,0 +1,360 @@
+#include "date.hpp"
+#include "calendar.hpp"
+#include "calendar_type.hpp"
+#include "calendar_util.hpp"
+#include <boost/date_time/gregorian/gregorian.hpp>
+#include <boost/date_time/posix_time/posix_time.hpp>
+
+using namespace boost::posix_time;
+using namespace boost::gregorian;
+
+namespace xios
+{
+      /// ////////////////////// DÃ©finitions ////////////////////// ///
+      CDate::CDate(void)
+        : relCalendar(NULL)
+        , year(0), month(1),  day(1)
+        , hour(0), minute(0), second(0)
+      {}
+
+      CDate::CDate(const CCalendar& calendar)
+         : relCalendar(&calendar)
+         , year(0), month(1),  day(1)
+         , hour(0), minute(0), second(0)
+      {}
+
+      CDate::CDate(const CCalendar& calendar,
+                   int yr, int mth, int d,
+                   int hr, int min, int sec)
+         : relCalendar(&calendar)
+         , year(yr), month(mth),  day(d)
+         , hour(hr), minute(min), second(sec)
+      {
+         if (!this->checkDate())
+         {
+            DEBUG(<< "La date initialisÃ©e a Ã©tÃ© modifiÃ©e "
+                  << "car elle Ã©tait incorrecte par rapport au calendrier souhaitÃ©.");
+         }
+      }
+
+      CDate::CDate(const CDate& date)
+        : relCalendar(date.relCalendar)
+        , year(date.year), month(date.month),   day(date.day)
+        , hour(date.hour), minute(date.minute), second(date.second)
+      {
+        // Delay the verification until we get a calendar we can compare the date to
+        if (relCalendar && !checkDate())
+        {
+          DEBUG(<< "La date initialisÃ©e a Ã©tÃ© modifiÃ©e "
+                << "car elle Ã©tait incorrecte par rapport au calendrier souhaitÃ©.");
+        }
+      }
+
+      CDate::~CDate(void)
+      { /* Ne rien faire de plus */ }
+
+      ///---------------------------------------------------------------
+
+      CDate& CDate::operator=(const CDate& date)
+      {
+         relCalendar = date.relCalendar;
+         year = date.year; month  = date.month; day    = date.day;
+         hour = date.hour; minute = date.minute; second = date.second;
+         return (*this);
+      }
+
+      bool CDate::operator==(const CDate& date)
+      {         
+         return (&(*relCalendar) == &(*date.relCalendar) &&
+                 year == date.year && month  == date.month  && day == date.day &&
+                 hour == date.hour && minute == date.minute && second == date.second);
+         
+      }
+
+      StdOStream& operator<<(StdOStream& out, const CDate& date)
+      {
+        std::streamsize s;
+        char c;
+
+        int width=4;
+        double maxSize=10000;
+        while (date.year>=maxSize)
+        {
+          maxSize*=10;
+          width++;
+        }
+        s = out.width(width); c = out.fill('0'); out << date.year << '-';
+
+        s = out.width(2); c = out.fill('0'); out << date.month << '-';
+        s = out.width(2); c = out.fill('0'); out << date.day << ' ';
+        s = out.width(2); c = out.fill('0'); out << date.hour << ':';
+        s = out.width(2); c = out.fill('0'); out << date.minute << ':';
+        s = out.width(2); c = out.fill('0'); out << date.second;
+
+        return out;
+      }
+
+      StdIStream& operator>>(StdIStream& in, CDate& date)
+      {
+        if (date.relCalendar)
+          date.relCalendar->parseDate(in, date);
+        else
+          CCalendar::parseDateDefault(in, date);
+
+        return in;
+      }
+
+      CDate::operator Time(void) const // Non vÃ©rifiÃ©e, pas optimisÃ©e ...
+      {
+        // This will check that a calendar was correctly associated to the date
+        const CCalendar& c = getRelCalendar();
+
+        // Todo : Tester si la date courante est supÃ©rieure Ã  la date initiale.
+        Time t = getSecondOfYear() - c.getTimeOrigin().getSecondOfYear();
+
+        if (c.hasLeapYear())
+        {
+          for (CDate d(c.getTimeOrigin()); d.getYear() < getYear(); d.setYear(d.getYear() + 1))
+            t += c.getYearTotalLength(d);
+        }
+        else
+          t += Time(getYear() - c.getTimeOrigin().getYear()) * c.getYearTotalLength(*this);
+
+        return t;
+      }
+
+      //----------------------------------------------------------------
+
+      bool CDate::checkDate(void)
+      {
+        // This will also check that a calendar was correctly associated to the date
+        return getRelCalendar().checkDate(*this);
+      }
+
+      //----------------------------------------------------------------
+
+      int CDate::getYear  (void) const { return (this->year  ); }
+      int CDate::getMonth (void) const { return (this->month ); }
+      int CDate::getDay   (void) const { return (this->day   ); }
+      int CDate::getHour  (void) const { return (this->hour  ); }
+      int CDate::getMinute(void) const { return (this->minute); }
+      int CDate::getSecond(void) const { return (this->second); }
+
+      //----------------------------------------------------------------
+
+      const CCalendar& CDate::getRelCalendar(void) const
+      {
+        if (!this->relCalendar)
+          ERROR("const CCalendar& CDate::getRelCalendar(void) const",
+                "Invalid state: The date is not associated with any calendar.");
+        return (*this->relCalendar);
+      }
+
+      bool CDate::hasRelCalendar(void) const
+      { return (this->relCalendar != NULL); }
+
+      //----------------------------------------------------------------
+
+      /*!
+        Get the number of seconds since the beginning of the year.
+        \return the number of seconds since the beginning of the year.
+      */
+      int CDate::getSecondOfYear() const
+      {
+        CDate yearStart(*this);
+        const CCalendar& c = getRelCalendar();
+        int nbDay = 0;
+
+        for (yearStart.setMonth(1); yearStart.getMonth() < getMonth(); yearStart.setMonth(yearStart.getMonth() + 1))
+          nbDay += c.getMonthLength(yearStart);
+
+        // We need to use getDayLengthInSeconds instead of getDayLength since we might
+        // have a non-integral number of hours per day for user defined calendars
+        return ((nbDay + getDay() - 1) * c.getDayLengthInSeconds()
+                  + (getHour() * c.getHourLength() + getMinute()) * c.getMinuteLength() + getSecond());
+      }
+
+      /*!
+        Get the number of days (expressed as a real number) since the beginning of the year.
+        \return the number of days (expressed as a real number) since the beginning of the year.
+      */
+      double CDate::getDayOfYear() const
+      {
+        return double(getSecondOfYear()) / getRelCalendar().getDayLengthInSeconds();
+      }
+
+      /*!
+        Get the fraction of the current year as a real number between 0 and 1.
+        \return the fraction of the current year.
+      */
+      double CDate::getFractionOfYear() const
+      {
+        return double(getSecondOfYear()) / getRelCalendar().getYearTotalLength(*this);
+      }
+
+      /*!
+        Get the number of seconds since the beginning of the day.
+        \return the number of seconds since the beginning of the day.
+      */
+      int CDate::getSecondOfDay() const
+      {
+        const CCalendar& c = getRelCalendar();
+        return ((getHour() * c.getHourLength() + getMinute()) * c.getMinuteLength() + getSecond());
+      }
+
+      /*!
+        Get the fraction of the current day as a real number between 0 and 1.
+        \return the fraction of the current day.
+      */
+      double CDate::getFractionOfDay() const
+      {
+        return double(getSecondOfDay()) / getRelCalendar().getDayLengthInSeconds();
+      }
+
+      //----------------------------------------------------------------
+
+      void CDate::setYear  (int newyear)   { this->year   = newyear; }
+      void CDate::setMonth (int newmonth)  { this->month  = newmonth; }
+      void CDate::setDay   (int newday)    { this->day    = newday; }
+      void CDate::setHour  (int newhour)   { this->hour   = newhour; }
+      void CDate::setMinute(int newminute) { this->minute = newminute; }
+      void CDate::setSecond(int newsecond) { this->second = newsecond; }
+
+      void CDate::setDate(int yr, int mth, int d, int hr, int min, int sec)
+      {
+        this->year   = yr;
+        this->month  = mth;
+        this->day    = d;
+        this->hour   = hr;
+        this->minute = min;
+        this->second = sec;
+      }
+
+      //----------------------------------------------------------------
+
+      void CDate::addMonth(int value)
+      {// Value doit Ãªtre Ã©gale Ã  1 ou -1.
+
+        const CCalendar& c = getRelCalendar();
+        int nbMonthsPerYear = c.getYearLength();
+
+        this->month += value;
+
+        if (this->month == nbMonthsPerYear + 1) { year++; this->month = 1; }
+        if (this->month == 0)  { year--; this->month = nbMonthsPerYear; }
+      }
+
+      //----------------------------------------------------------------
+
+      bool CDate::setRelCalendar(const CCalendar& relCalendar)
+      {
+        this->relCalendar = &relCalendar;
+        return this->checkDate();
+      }
+
+      //----------------------------------------------------------------
+
+      CDate CDate::FromString(const StdString& str, const CCalendar& calendar)
+      {
+        CDate dt(calendar);
+        StdIStringStream iss(str);
+        iss >> dt;
+        return dt;
+      }
+
+      //----------------------------------------------------------------
+
+      StdString CDate::getStryyyymmdd(void) const
+      {
+        std::streamsize s;
+        char c;
+
+        ostringstream oss;
+
+        s = oss.width(4); c = oss.fill('0'); oss << year;
+        s = oss.width(2); c = oss.fill('0'); oss << month;
+        s = oss.width(2); c = oss.fill('0'); oss << day;
+
+        return oss.str();
+      }
+
+      string CDate::getStr(const string& str) const
+      {
+        ostringstream oss;
+        int level;
+
+        level=0;
+        for(string::const_iterator it=str.begin();it!=str.end();++it)
+        {
+          if (level==0)
+          {
+            if (*it=='%') level++;
+            else oss<<*it;
+          }
+          else if (level==1)
+          {
+            switch (*it)
+            {
+              case 'y' :
+                oss.width(4); oss.fill('0'); oss << year;
+                level=0;
+                break;
+              case 'm' : // month or minute
+                level++;
+                break;
+              case 'd' :
+                oss.width(2); oss.fill('0'); oss << day;
+                level=0;
+                break;
+              case 'h' :
+                oss.width(2); oss.fill('0'); oss << hour;
+                level=0;
+                break;
+              case 's' :
+                oss.width(2); oss.fill('0'); oss << second;
+                level=0;
+                break;
+              case 'S' : // seconds since time origin
+                oss.width(0); oss << Time(*this);
+                level=0;
+                break;
+              case 'D' : // days since time origin
+                oss.width(0); oss << Time(*this) / getRelCalendar().getDayLengthInSeconds();
+                level=0;
+                break;
+              default :
+                oss<<'%'<<*it;
+                level=0;
+            }
+          }
+          else if (level==2)
+          {
+            switch (*it)
+            {
+              case 'o' : // month
+                oss.width(2); oss.fill('0'); oss << month;
+                level=0;
+                break;
+              case 'i' : //minute
+                oss.width(2); oss.fill('0'); oss << minute;
+                level=0;
+                break;
+              default :
+                oss<<"%m"<<*it;
+                level=0;
+            }
+          }
+        }
+        return oss.str();
+      }
+
+      StdString CDate::toString(void) const
+      {
+        StdOStringStream oss;
+        oss << *this;
+        return oss.str();
+      }
+
+      ///---------------------------------------------------------------
+
+} // namespace xios
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/date.hpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/date.hpp	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/date.hpp	(revision 1749)
@@ -0,0 +1,104 @@
+#ifndef __XIOS_CDate__
+#define __XIOS_CDate__
+
+/// XIOS headers ///
+#include "xios_spl.hpp"
+#include "exception.hpp"
+#include "duration.hpp"
+
+namespace xios
+{
+      /// ////////////////////// DÃ©clarations ////////////////////// ///
+      class CCalendar;
+
+      class CDate
+      {
+         public :
+
+            /// Constructeurs ///
+            //!< Create an empty date associated to no calendar
+            CDate(void);
+            //!< Create an empty date associated to the specified calendar
+            CDate(const CCalendar& cal);
+            //!< Create a date associated to the specified calendar
+            CDate(const CCalendar& cal, int yr, int mth, int d,
+                                        int hr = 0, int min = 0, int sec = 0);
+            CDate(const CDate& odate);
+            CDate(const CDate* const odate); // Not implemented yet
+
+            /// Destructeur ///
+            ~CDate(void);
+
+            /// OpÃ©rateurs ///
+            CDate& operator=(const CDate& date);
+            bool operator==(const CDate& date);
+            friend StdOStream& operator<<(StdOStream& out, const CDate& date);
+            friend StdIStream& operator>>(StdIStream& in, CDate& date);
+
+            //!< Return the number of seconds since the time origin fixed when creating the calendar
+            operator Time(void) const;
+
+            /// Traitements ///
+            bool checkDate(void); // VÃ©rifie la validitÃ© de la date.
+
+            /// Divers accesseurs ///
+            int getYear  (void) const;
+            int getMonth (void) const;
+            int getDay   (void) const;
+            int getHour  (void) const;
+            int getMinute(void) const;
+            int getSecond(void) const;
+
+            //!< Get the calendar associated to the date
+            const CCalendar& getRelCalendar(void) const;
+            bool hasRelCalendar(void) const;
+
+            //!< Get the number of seconds since the beginning of the year
+            int getSecondOfYear() const;
+            //!< Get the number of days (expressed as a real number) since the beginning of the year
+            double getDayOfYear() const;
+            //!< Get the fraction of the current year as a real number between 0 and 1
+            double getFractionOfYear() const;
+            //!< Get the number of seconds since the beginning of the day
+            int getSecondOfDay() const;
+            //!< Get the fraction of the current day as a real number between 0 and 1
+            double getFractionOfDay() const;
+
+            /// Mutateurs ///
+            void setYear  (int newyear);
+            void setMonth (int newmonth);
+            void setDay   (int newday);
+            void setHour  (int newhour);
+            void setMinute(int newminute);
+            void setSecond(int newsecond);
+
+            void setDate(int yr, int mth, int d,
+                         int hr = 0, int min = 0, int sec = 0);
+
+            void addMonth (int value);
+
+            //!< Set the calendar associated to the date
+            bool setRelCalendar(const CCalendar& relCalendar);
+
+            /// Autres ///
+            StdString toString(void) const;
+            StdString getStryyyymmdd(void) const;
+            string getStr(const string& str) const;
+
+
+         public : /* static */
+
+            static CDate FromString(const StdString& str, const CCalendar& calendar);
+
+         private :
+
+            /// PropriÃ©tÃ©s privÃ©es ///
+            const CCalendar* relCalendar; //!< Calendar associated to the date
+            int year, month, day, hour, minute, second; // AnnÃ©e, mois, ...
+
+
+      }; // class CDate;
+
+} // namespace xios
+
+#endif // __XIOS_CDate__
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/date/allleap.cpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/date/allleap.cpp	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/date/allleap.cpp	(revision 1749)
@@ -0,0 +1,49 @@
+#include "allleap.hpp"
+
+namespace xios
+{
+      /// ////////////////////// DÃ©finitions ////////////////////// ///
+
+      CAllLeapCalendar::CAllLeapCalendar(const CDate& startDate)
+         : CCalendar("AllLeap", startDate)
+      {
+         // This will check that the dates are conform with the calendar.
+         // We cannot call this from the parent constructor because we
+         // want the methods of this class to be used
+         initializeDate();
+      }
+
+      CAllLeapCalendar::CAllLeapCalendar(const CDate& startDate, const CDate& timeOrigin)
+         : CCalendar("AllLeap", startDate, timeOrigin)
+      {
+         // This will check that the dates are conform with the calendar.
+         // We cannot call this from the parent constructor because we
+         // want the methods of this class to be used
+         initializeDate();
+      }
+
+      CAllLeapCalendar::CAllLeapCalendar(int yr, int mth, int d,
+                                         int hr, int min, int sec)
+         : CCalendar("AllLeap")
+      { initializeDate(yr, mth, d, hr, min, sec) ; }
+
+      CAllLeapCalendar::~CAllLeapCalendar(void)
+      { /* Ne rien faire de plus */ }
+
+      ///--------------------------------------------------------------
+
+      int CAllLeapCalendar::getYearTotalLength(const CDate & date) const
+      { return (366 * 86400); }
+
+      int CAllLeapCalendar::getMonthLength(const CDate & date) const
+      {
+         if (date.getMonth() == 2) return (29);
+         return (CCalendar::getMonthLength(date));
+      }
+
+      StdString CAllLeapCalendar::getType(void) const
+      { return (StdString("all_leap")); }
+
+      ///--------------------------------------------------------------
+} // namespace xios
+
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/date/allleap.hpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/date/allleap.hpp	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/date/allleap.hpp	(revision 1749)
@@ -0,0 +1,39 @@
+#ifndef __XIOS_CAllLeapCalendar__
+#define __XIOS_CAllLeapCalendar__
+
+/// XIOS headers ///
+#include "xios_spl.hpp"
+#include "calendar.hpp"
+
+namespace xios
+{
+      /// ////////////////////// DÃ©clarations ////////////////////// ///
+      class CAllLeapCalendar : public CCalendar
+      {
+            /// Typedef ///
+            typedef CCalendar SuperClass;
+
+         public :
+
+            /// Constructeur ///
+//            CAllLeapCalendar(void);                                   // Not implemented yet.
+            CAllLeapCalendar(const CDate& startDate);
+            CAllLeapCalendar(const CDate& startDate, const CDate& timeOriginStr);
+            CAllLeapCalendar(int yr = 0, int mth = 1, int d   = 1,
+                             int hr = 0, int min = 0, int sec = 0);
+            CAllLeapCalendar(const CAllLeapCalendar& calendar);       // Not implemented yet.
+            CAllLeapCalendar(const CAllLeapCalendar* calendar);       // Not implemented yet.
+
+            /// Accesseurs ///
+            virtual int getYearTotalLength(const CDate & date) const;
+            virtual int getMonthLength(const CDate & date) const;
+            virtual StdString getType(void) const;
+
+            /// Destructeur ///
+            virtual ~CAllLeapCalendar(void);
+
+      }; // class CAllLeapCalendar
+
+} // namespace xios
+
+#endif // __XIOS_CAllLeapCalendar__
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/date/calendar_type.hpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/date/calendar_type.hpp	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/date/calendar_type.hpp	(revision 1749)
@@ -0,0 +1,11 @@
+#ifndef __XIOS_calendar_type__
+#define __XIOS_calendar_type__
+
+#include "allleap.hpp"
+#include "d360.hpp"
+#include "gregorian.hpp"
+#include "julian.hpp"
+#include "noleap.hpp"
+#include "user_defined.hpp"
+
+#endif //__XIOS_calendar_type__
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/date/d360.cpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/date/d360.cpp	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/date/d360.cpp	(revision 1749)
@@ -0,0 +1,46 @@
+#include "d360.hpp"
+
+namespace xios
+{
+      /// ////////////////////// DÃ©finitions ////////////////////// ///
+
+      CD360Calendar::CD360Calendar(const CDate& startDate)
+         : CCalendar("D360", startDate)
+      {
+         // This will check that the dates are conform with the calendar.
+         // We cannot call this from the parent constructor because we
+         // want the methods of this class to be used
+         initializeDate();
+      }
+
+      CD360Calendar::CD360Calendar(const CDate& startDate, const CDate& timeOrigin)
+         : CCalendar("D360", startDate, timeOrigin)
+      {
+         // This will check that the dates are conform with the calendar.
+         // We cannot call this from the parent constructor because we
+         // want the methods of this class to be used
+         initializeDate();
+      }
+
+      CD360Calendar::CD360Calendar(int yr, int mth, int d,
+                                   int hr, int min, int sec)
+         : CCalendar("D360")
+      { initializeDate(yr, mth, d, hr, min, sec) ; }
+
+      CD360Calendar::~CD360Calendar(void)
+      { /* Ne rien faire de plus */ }
+
+      ///--------------------------------------------------------------
+
+      int CD360Calendar::getYearTotalLength(const CDate & date) const
+      { return (360 * 86400); }
+
+      int CD360Calendar::getMonthLength(const CDate & date) const
+      { return (30); }
+
+      StdString CD360Calendar::getType(void) const
+      { return (StdString("360_day")); }
+
+      ///--------------------------------------------------------------
+} // namespace xios
+
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/date/d360.hpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/date/d360.hpp	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/date/d360.hpp	(revision 1749)
@@ -0,0 +1,40 @@
+#ifndef __XIOS_CD360Calendar__
+#define __XIOS_CD360Calendar__
+
+/// XIOS headers ///
+#include "xios_spl.hpp"
+#include "calendar.hpp"
+
+namespace xios
+{
+      /// ////////////////////// DÃ©clarations ////////////////////// ///
+      class CD360Calendar : public CCalendar
+      {
+            /// Typedef ///
+            typedef CCalendar SuperClass;
+
+         public :
+
+            /// Constructeur ///
+            //CD360Calendar(void);                                   // Not implemented yet.
+            CD360Calendar(const CDate& startDate);
+            CD360Calendar(const CDate& startDate, const CDate& timeOrigin);
+            CD360Calendar(int yr = 0, int mth = 1, int d   = 1,
+                          int hr = 0, int min = 0, int sec = 0);
+            CD360Calendar(const CD360Calendar& calendar);       // Not implemented yet.
+            CD360Calendar(const CD360Calendar* calendar);       // Not implemented yet.
+
+            /// Accesseurs ///
+            virtual int getYearTotalLength(const CDate & date) const;
+            virtual int getMonthLength(const CDate & date) const;
+            virtual StdString getType(void) const;
+
+            /// Destructeur ///
+            virtual ~CD360Calendar(void);
+
+      }; // class CD360Calendar
+
+} // namespace xios
+
+#endif // __XIOS_CD360Calendar__
+
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/date/gregorian.cpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/date/gregorian.cpp	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/date/gregorian.cpp	(revision 1749)
@@ -0,0 +1,64 @@
+#include "gregorian.hpp"
+
+namespace xios
+{
+      /// ////////////////////// DÃ©finitions ////////////////////// ///
+
+      CGregorianCalendar::CGregorianCalendar(const CDate& startDate)
+         : CCalendar("Gregorian", startDate)
+      {
+         // This will check that the dates are conform with the calendar.
+         // We cannot call this from the parent constructor because we
+         // want the methods of this class to be used
+         initializeDate();
+      }
+
+      CGregorianCalendar::CGregorianCalendar(const CDate& startDate, const CDate& timeOrigin)
+         : CCalendar("Gregorian", startDate, timeOrigin)
+      {
+         // This will check that the dates are conform with the calendar.
+         // We cannot call this from the parent constructor because we
+         // want the methods of this class to be used
+         initializeDate();
+      }
+
+      CGregorianCalendar::CGregorianCalendar(int yr, int mth, int d,
+                                             int hr, int min, int sec)
+         : CCalendar("Gregorian")
+      { initializeDate(yr, mth, d, hr, min, sec) ; }
+
+      CGregorianCalendar::~CGregorianCalendar(void)
+      { /* Ne rien faire de plus */ }
+
+      ///--------------------------------------------------------------
+
+      int CGregorianCalendar::getYearTotalLength(const CDate& date) const
+      { // Retourne la durÃ©e d'une annÃ©e en seconde.
+         if ((date.getYear() % 4   == 0) &&
+            ((date.getYear() % 100 != 0)  ||
+             (date.getYear() % 400 == 0)  ))
+            return (366 * 86400);
+         return (365 * 86400);
+      }
+
+      int CGregorianCalendar::getMonthLength(const CDate& date) const
+      { // Retourne la durÃ©e du mois en jour.
+         if (date.getMonth() == 2)
+         { // Traitement du cas particulier en FÃ©vrier.
+            if ((date.getYear() % 4   == 0) &&
+               ((date.getYear() % 100 != 0) ||
+                (date.getYear() % 400 == 0) ))
+               return (29);
+            return (28);
+         }
+         return (CCalendar::getMonthLength(date));
+      }
+
+      StdString CGregorianCalendar::getType(void) const
+      { return (StdString("gregorian")); }
+
+      bool CGregorianCalendar::hasLeapYear() const { return true; }
+
+      ///--------------------------------------------------------------
+} // namespace xios
+
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/date/gregorian.hpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/date/gregorian.hpp	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/date/gregorian.hpp	(revision 1749)
@@ -0,0 +1,41 @@
+#ifndef __XIOS_CGregorianCalendar__
+#define __XIOS_CGregorianCalendar__
+
+/// XIOS headers ///
+#include "xios_spl.hpp"
+#include "calendar.hpp"
+
+namespace xios
+{
+      /// ////////////////////// DÃ©clarations ////////////////////// ///
+      class CGregorianCalendar : public CCalendar
+      {
+            /// Typedef ///
+            typedef CCalendar SuperClass;
+
+         public :
+
+            /// Constructeur ///
+//            CGregorianCalendar(void);                                   // Not implemented yet.
+            CGregorianCalendar(const CDate& startDate);
+            CGregorianCalendar(const CDate& startDate, const CDate& timeOrigin);
+            CGregorianCalendar(int yr = 0, int mth = 1, int d   = 1,
+                               int hr = 0, int min = 0, int sec = 0);
+            CGregorianCalendar(const CGregorianCalendar& calendar);       // Not implemented yet.
+            CGregorianCalendar(const CGregorianCalendar* calendar);       // Not implemented yet.
+
+            /// Accesseurs ///
+            virtual int getYearTotalLength(const CDate & date) const;
+            virtual int getMonthLength(const CDate & date) const;
+            virtual StdString getType(void) const;
+
+            virtual bool hasLeapYear() const;
+
+            /// Destructeur ///
+            virtual ~CGregorianCalendar(void);
+
+      }; // class CGregorianCalendar
+
+} // namespace xios
+
+#endif // __XIOS_CGregorianCalendar__
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/date/julian.cpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/date/julian.cpp	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/date/julian.cpp	(revision 1749)
@@ -0,0 +1,57 @@
+#include "julian.hpp"
+
+namespace xios
+{
+      /// ////////////////////// DÃ©finitions ////////////////////// ///
+
+      CJulianCalendar::CJulianCalendar(const CDate& startDate)
+         : CCalendar("Julian", startDate)
+      {
+         // This will check that the dates are conform with the calendar.
+         // We cannot call this from the parent constructor because we
+         // want the methods of this class to be used
+         initializeDate();
+      }
+
+      CJulianCalendar::CJulianCalendar(const CDate& startDate, const CDate& timeOrigin)
+         : CCalendar("Julian", startDate, timeOrigin)
+      {
+         // This will check that the dates are conform with the calendar.
+         // We cannot call this from the parent constructor because we
+         // want the methods of this class to be used
+         initializeDate();
+      }
+
+      CJulianCalendar::CJulianCalendar(int yr, int mth, int d,
+                                       int hr, int min, int sec)
+         : CCalendar("Julian")
+      { initializeDate(yr, mth, d, hr, min, sec) ; }
+
+      CJulianCalendar::~CJulianCalendar(void)
+      { /* Ne rien faire de plus */ }
+
+      ///--------------------------------------------------------------
+
+      int CJulianCalendar::getYearTotalLength(const CDate& date) const
+      { // Retourne la durÃ©e d'une annÃ©e en seconde.
+         if (date.getYear() % 4 == 0) return (366 * 86400);
+         return (365 * 86400);
+      }
+
+      int CJulianCalendar::getMonthLength(const CDate& date) const
+      { // Retourne la durÃ©e du mois en jour.
+         if (date.getMonth() == 2)
+         {
+            if (date.getYear()%4 == 0) return 29;
+               return 28;
+         }
+         return (CCalendar::getMonthLength(date));
+      }
+
+      StdString CJulianCalendar::getType(void) const
+      { return (StdString("julian")); }
+
+      bool CJulianCalendar::hasLeapYear() const { return true; }
+
+      ///--------------------------------------------------------------
+} // namespace xios
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/date/julian.hpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/date/julian.hpp	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/date/julian.hpp	(revision 1749)
@@ -0,0 +1,41 @@
+#ifndef __XIOS_CJulianCalendar__
+#define __XIOS_CJulianCalendar__
+
+/// XIOS headers ///
+#include "xios_spl.hpp"
+#include "calendar.hpp"
+
+namespace xios
+{
+      /// ////////////////////// DÃ©clarations ////////////////////// ///
+      class CJulianCalendar : public CCalendar
+      {
+            /// Typedef ///
+            typedef CCalendar SuperClass;
+
+         public :
+
+            /// Constructeur ///
+//            CJulianCalendar(void);                                   // Not implemented yet.
+            CJulianCalendar(const CDate& startDate);
+            CJulianCalendar(const CDate& startDate, const CDate& timeOrigin);
+            CJulianCalendar(int yr = 0, int mth = 1, int d   = 1,
+                            int hr = 0, int min = 0, int sec = 0);
+            CJulianCalendar(const CJulianCalendar& calendar);       // Not implemented yet.
+            CJulianCalendar(const CJulianCalendar* calendar);       // Not implemented yet.
+
+            /// Accesseurs ///
+            virtual int getYearTotalLength(const CDate & date) const;
+            virtual int getMonthLength(const CDate & date) const;
+            virtual StdString getType(void) const;
+
+            virtual bool hasLeapYear() const;
+
+            /// Destructeur ///
+            virtual ~CJulianCalendar(void);
+
+      }; // class CJulianCalendar
+
+} // namespace xios
+
+#endif // __XIOS_CJulianCalendar__
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/date/noleap.cpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/date/noleap.cpp	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/date/noleap.cpp	(revision 1749)
@@ -0,0 +1,42 @@
+#include "noleap.hpp"
+#include "calendar.hpp"
+
+namespace xios
+{
+      /// ////////////////////// DÃ©finitions ////////////////////// ///
+
+      CNoLeapCalendar::CNoLeapCalendar(const CDate& startDate)
+         : CCalendar("NoLeap", startDate)
+      {
+         // This will check that the dates are conform with the calendar.
+         // We cannot call this from the parent constructor because we
+         // want the methods of this class to be used
+         initializeDate();
+      }
+
+      CNoLeapCalendar::CNoLeapCalendar(const CDate& startDate, const CDate& timeOrigin)
+         : CCalendar("NoLeap", startDate, timeOrigin)
+      {
+         // This will check that the dates are conform with the calendar.
+         // We cannot call this from the parent constructor because we
+         // want the methods of this class to be used
+         initializeDate();
+      }
+
+      CNoLeapCalendar::CNoLeapCalendar(int yr, int mth, int d,
+                                       int hr, int min, int sec)
+         : CCalendar("NoLeap")
+      { initializeDate(yr, mth, d, hr, min, sec) ; }
+
+
+      CNoLeapCalendar::~CNoLeapCalendar(void)
+      { /* Ne rien faire de plus */ }
+
+      ///--------------------------------------------------------------
+
+      StdString CNoLeapCalendar::getType(void) const
+      { return (StdString("noleap")); }
+
+      ///--------------------------------------------------------------
+} // namespace xios
+
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/date/noleap.hpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/date/noleap.hpp	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/date/noleap.hpp	(revision 1749)
@@ -0,0 +1,38 @@
+#ifndef __XIOS_CNoLeapCalendar__
+#define __XIOS_CNoLeapCalendar__
+
+/// XIOS headers ///
+#include "xios_spl.hpp"
+#include "calendar.hpp"
+
+namespace xios
+{
+      /// ////////////////////// DÃ©clarations ////////////////////// ///
+      class CNoLeapCalendar : public CCalendar
+      {
+            /// Typedef ///
+            typedef CCalendar SuperClass;
+
+         public :
+
+            /// Constructeur ///
+//            CNoLeapCalendar(void);                                   // Not implemented yet.
+            CNoLeapCalendar(const CDate& startDate);
+            CNoLeapCalendar(const CDate& startDate, const CDate& timeOrigin);
+            CNoLeapCalendar(int yr = 0, int mth = 1, int d   = 1,
+                            int hr = 0, int min = 0, int sec = 0);
+            CNoLeapCalendar(const CNoLeapCalendar& calendar);       // Not implemented yet.
+            CNoLeapCalendar(const CNoLeapCalendar* calendar);       // Not implemented yet.
+
+            /// Accesseurs ///
+            virtual StdString getType(void) const;
+
+            /// Destructeur ///
+            virtual ~CNoLeapCalendar(void);
+
+      }; // class CNoLeapCalendar
+
+} // namespace xios
+
+#endif // __XIOS_CNoLeapCalendar__
+
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/date/user_defined.cpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/date/user_defined.cpp	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/date/user_defined.cpp	(revision 1749)
@@ -0,0 +1,268 @@
+#include "user_defined.hpp"
+#include "calendar_util.hpp"
+
+namespace xios
+{
+  /// ////////////////////// DÃ©finitions ////////////////////// ///
+
+  CUserDefinedCalendar::CUserDefinedCalendar(int dayLength, const CArray<int,1>& monthLengths)
+    : CCalendar("user_defined")
+    , dayLength(dayLength)
+    , monthLengths(monthLengths)
+    , yearLength(sum(monthLengths) * dayLength)
+    , leapYearMonth(0)
+    , leapYearDrift(0.0)
+    , leapYearDriftOffset(0.0)
+  {
+    if (dayLength <= 0)
+      ERROR("CUserDefinedCalendar::CUserDefinedCalendar(int dayLength, const CArray<int,1>& monthLengths)",
+            << "The day length must be strictly positive.");
+    if (monthLengths.numElements() == 0)
+      ERROR("CUserDefinedCalendar::CUserDefinedCalendar(int dayLength, const CArray<int,1>& monthLengths)",
+            << "The month lengths must be specified.");
+    if (min(monthLengths) <= 0)
+      ERROR("CUserDefinedCalendar::CUserDefinedCalendar(int dayLength, const CArray<int,1>& monthLengths)",
+            << "All month lengths must be strictly positive.");
+    // Ensure that the month lengths array is always 0-indexed
+    this->monthLengths.reindexSelf(TinyVector<int, 1>(0));
+  }
+
+  CUserDefinedCalendar::CUserDefinedCalendar(int dayLength, int yearLength)
+    : CCalendar("user_defined")
+    , dayLength(dayLength)
+    , yearLength(yearLength)
+    , leapYearMonth(0)
+    , leapYearDrift(0.0)
+    , leapYearDriftOffset(0.0)
+  {
+    if (dayLength <= 0)
+      ERROR("CUserDefinedCalendar::CUserDefinedCalendar(int dayLength, int yearLength)",
+            << "The day length must be strictly positive.");
+    if (yearLength <= 0)
+      ERROR("CUserDefinedCalendar::CUserDefinedCalendar(int dayLength, int yearLength)",
+            << "The year length must be strictly positive.");
+  }
+
+  CUserDefinedCalendar::~CUserDefinedCalendar(void)
+  { /* Nothing to do here */ }
+
+  ///--------------------------------------------------------------
+
+  void CUserDefinedCalendar::configureLeapYear(int leapYearMonth, double leapYearDrift, double leapYearDriftOffset /*= 0.0*/)
+  {
+    if (monthLengths.numElements() == 0)
+      ERROR("void CUserDefinedCalendar::configureLeapYear(int leapYearMonth, double leapYearDrift, double leapYearDriftOffset /*= 0.0*/)",
+            << "Impossible to define leap years on a calendar without months.");
+    if (leapYearMonth < 1 || leapYearMonth > monthLengths.numElements())
+      ERROR("void CUserDefinedCalendar::configureLeapYear(int leapYearMonth, double leapYearDrift, double leapYearDriftOffset /*= 0.0*/)",
+            << "The month chosen for the additional day must be in the range [1, " << monthLengths.numElements() << "].");
+    if (leapYearDrift < 0.0 || leapYearDrift >= 1.0)
+      ERROR("void CUserDefinedCalendar::configureLeapYear(int leapYearMonth, double leapYearDrift, double leapYearDriftOffset /*= 0.0*/)",
+            << "The year drift must be in the range [0.0, 1.0).");
+    if (leapYearDriftOffset < 0.0 || leapYearDriftOffset >= 1.0)
+      ERROR("void CUserDefinedCalendar::configureLeapYear(int leapYearMonth, double leapYearDrift, double leapYearDriftOffset /*= 0.0*/)",
+            << "The year drift offset must be in the range [0.0, 1.0).");
+
+    this->leapYearMonth = leapYearMonth;
+    this->leapYearDrift = leapYearDrift;
+    this->leapYearDriftOffset = leapYearDriftOffset;
+  }
+
+  ///--------------------------------------------------------------
+
+  StdString CUserDefinedCalendar::getType(void) const { return StdString("user_defined"); }
+
+  /*! Returns the duration of the date's month in days. */
+  int CUserDefinedCalendar::getMonthLength(const CDate& date) const
+  {
+    int monthLength = 0;
+    if (monthLengths.numElements() > 0)
+    {
+      monthLength = monthLengths(date.getMonth() - 1);
+      if (date.getMonth() == leapYearMonth && isLeapYear(date.getYear()))
+        monthLength++;
+    }
+    return monthLength;
+  }
+
+  /*! Returns the duration of the date's year in seconds. */
+  int CUserDefinedCalendar::getYearTotalLength(const CDate& date) const
+  {
+    return isLeapYear(date.getYear()) ? yearLength + dayLength : yearLength;
+  }
+
+  /*! Returns the duration of a day in hours. Note that this value is
+      not necessarily exact since it can be rounded but it is always
+      the smallest integer number of hours that can hold a day. */
+  int CUserDefinedCalendar::getDayLength(void) const { return int(ceil(double(dayLength) / (getHourLength() * getMinuteLength()))); }
+
+  /*! Returns the duration of a year in months. */
+  int CUserDefinedCalendar::getYearLength(void) const { return monthLengths.numElements(); }
+
+  /*! Returns the day length expressed in seconds. */
+  int CUserDefinedCalendar::getDayLengthInSeconds(void) const { return dayLength; }
+
+  /*! Test if the calendar can have leap year. */
+  bool CUserDefinedCalendar::hasLeapYear() const{ return (leapYearDrift != 0.0); }
+
+  /*!
+    Test if the specified year is a leap year.
+    \param year the year to be tested
+    \return true if and only the specified year is a leap year
+  */
+  bool CUserDefinedCalendar::isLeapYear(int year) const
+  {
+    double intPart; // dummy variable
+    return (hasLeapYear() &&
+            (abs(1.0 - (modf(leapYearDriftOffset + (year - getTimeOrigin().getYear()) * leapYearDrift, &intPart) + leapYearDrift)) < 1e-14));
+  }
+
+  CDuration& CUserDefinedCalendar::resolve(CDuration& dur, bool noNegativeTime /*= false*/) const
+  {
+    if (monthLengths.numElements() > 0) // normal case, we can rely on the generic function
+      return CCalendar::resolve(dur, noNegativeTime);
+
+    if (dur.month)
+      ERROR("CDuration& CUserDefinedCalendar::resolve(CDuration& dur, bool noNegativeTime /*= false*/) const",
+            << "month = " << dur.month << " but the user defined calendar has no month.");
+
+    const int hourLengthInSeconds = getHourLength() * getMinuteLength();
+
+    // Convert everything in seconds
+    Time t = Time(dur.year * yearLength + dur.day * dayLength
+                    + (dur.hour * getHourLength() + dur.minute) * getMinuteLength() + dur.second);
+
+    // Then convert back to years
+    dur.year = int(t / yearLength);
+    t %= yearLength;
+
+    // days
+    dur.day = int(t / dayLength);
+    t %= dayLength;
+
+    // Do we allow hour, minute, second to be negative?
+    if (noNegativeTime)
+    {
+      // If we don't, we remove some days or years until the time is positive
+      double& val = (dayLength < yearLength) ? dur.day : dur.year;
+      int length  = (dayLength < yearLength) ? dayLength : yearLength;
+      while (t < 0)
+      {
+        t += length;
+        val -= 1.0;
+      }
+    }
+
+    // hours
+    dur.hour = int(t / hourLengthInSeconds);
+    t %= hourLengthInSeconds;
+    // minutes
+    dur.minute = int(t / getMinuteLength());
+    // secondes
+    dur.second = int(t % getMinuteLength());
+
+    return dur;
+  }
+
+  /*! Parse a date using the calendar's parser. */
+  void CUserDefinedCalendar::parseDate(StdIStream& in, CDate& date) const
+  {
+    if (monthLengths.numElements() > 0) // normal case, we can rely on the generic function
+    {
+      CCalendar::parseDate(in, date);
+      return;
+    }
+
+    char sep = '-'; // Le caractÃšre c est utilisÃ© pour "recueillir" les sÃ©parateurs "/" et ":".
+    char c;
+
+    // Default initialize the date
+    int year = 00, month  = 01, day    = 01;
+    int hour = 00, minute = 00, second = 00;
+
+    // Read the year
+    in >> year;
+    // Read the day only if the day length is smaller than the year length
+    c = in.get();
+    if (c == sep && dayLength < yearLength)
+    {
+      in >> day;
+      c = in.get();
+    }
+    // Read the time
+    sep = ' ';
+    if (c == sep)
+    {
+      in >> hour >> c;
+      sep = ':';
+      if (c == sep)
+      {
+        in >> minute >> c;
+        if (c == sep)
+        {
+          in >> second;
+          in >> c;
+        }
+      }
+    }
+
+    date.setDate(year, month, day, hour, minute, second);
+
+    // Delay the verification until we get a calendar we can compare the date to
+    if (!checkDate(date))
+      ERROR("void CUserDefinedCalendar::parseDate(StdIStream& in, CDate& date) const",
+            << "Bad date format or not conform to calendar");
+
+    if (c == '+') // We will be adding a duration to the date
+    {
+      CDuration dur;
+      in >> dur;
+      date = date + dur;
+    }
+    else if (!in.eof())
+      ERROR("void CUserDefinedCalendar::parseDate(StdIStream& in, CDate& date) const",
+            << "Invalid date format: unexpected trailing character(s)");
+  }
+
+  /*! Test if a date is valid with regard to the current calendar. */
+  bool CUserDefinedCalendar::checkDate(CDate& date) const
+  {
+    if (monthLengths.numElements() > 0) // normal case, we can rely on the generic function
+      return CCalendar::checkDate(date);
+
+    const int maxDay = (yearLength + dayLength - 1) / dayLength;
+
+    bool isValid = true;
+
+    // VÃ©rification de la valeur du mois.
+    if (date.getMonth() != 1)
+    { isValid = false; date.setMonth(1); }
+
+    // VÃ©rification de la valeur du jour.
+    if (date.getDay() < 1)
+    { isValid = false; date.setDay(1); }
+    else if (date.getDay() > maxDay)
+    { isValid = false; date.setDay(maxDay); }
+
+    // VÃ©rification de la valeur de l'heure.
+    if (date.getHour() < 0)
+    { isValid = false; date.setHour(0); }
+    else if (date.getHour() >= getDayLength())
+    { isValid = false; date.setHour(getDayLength() - 1); }
+
+    // VÃ©rification de la valeur des minutes.
+    if (date.getMinute() < 0)
+    { isValid = false; date.setMinute(0); }
+    else if (date.getMinute() >= getHourLength())
+    { isValid = false; date.setMinute(getHourLength() - 1); }
+
+    // VÃ©rification de la valeur des secondes.
+    if (date.getSecond() < 0)
+    { isValid = false; date.setSecond(0); }
+    else if (date.getSecond() >= getMinuteLength())
+    { isValid = false; date.setSecond(getMinuteLength() - 1); }
+
+    return isValid;
+  }
+} // namespace xios
+
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/date/user_defined.hpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/date/user_defined.hpp	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/date/user_defined.hpp	(revision 1749)
@@ -0,0 +1,73 @@
+#ifndef __XIOS_CUserDefinedCalendar__
+#define __XIOS_CUserDefinedCalendar__
+
+/// XIOS headers ///
+#include "xios_spl.hpp"
+#include "calendar.hpp"
+#include "array_new.hpp"
+
+namespace xios
+{
+  /// ////////////////////// DÃ©clarations ////////////////////// ///
+  /*! A custom calendar that we can configured to be suitable for planets other than the Earth. */
+  class CUserDefinedCalendar : public CCalendar
+  {
+    private:
+      /// Typedef ///
+      typedef CCalendar SuperClass;
+
+    public:
+      /// Constructor ///
+      CUserDefinedCalendar(int dayLength, const CArray<int,1>& monthLengths);
+      CUserDefinedCalendar(int dayLength, int yearLength);
+
+      /// Destructor ///
+      virtual ~CUserDefinedCalendar(void);
+
+      /// Setters ///
+      /*! Configure the leap year information. */
+      void configureLeapYear(int leapYearMonth, double leapYearDrift, double leapYearDriftOffset = 0.0);
+
+      /// Getters ///
+      virtual StdString getType(void) const;
+
+      /*! Returns the duration of the date's month in days. */
+      virtual int getMonthLength(const CDate& date) const;
+      /*! Returns the duration of the date's year in seconds. */
+      virtual int getYearTotalLength(const CDate& date) const;
+      /*! Returns the duration of a day in hours. Note that this value is
+          not necessarily exact since it can be rounded but it is always
+          the smallest integer number of hours that can hold a day. */
+      virtual int getDayLength(void) const;
+      /*! Returns the duration of a year in months. */
+      virtual int getYearLength(void) const;
+      /*! Returns the day length expressed in seconds. */
+      virtual int getDayLengthInSeconds(void) const;
+      /*! Test if the calendar can have leap year. */
+      virtual bool hasLeapYear() const;
+
+      /*! Simplify a duration based on the calendar information. */
+      virtual CDuration& resolve(CDuration& dur, bool noNegativeTime = false) const;
+
+      /*! Parse a date using the calendar's parser. */
+      virtual void parseDate(StdIStream& in, CDate& date) const;
+
+      /*! Test if a date is valid with regard to the current calendar. */
+      virtual bool checkDate(CDate& date) const;
+
+    private:
+      int dayLength; //!< length of a day in seconds
+      CArray<int,1> monthLengths; //!< length of each months in days
+      int yearLength; //!< length of a year in seconds
+
+      int leapYearMonth; //!< month to which an extra day should be added in case of a leap year
+      double leapYearDrift; //!< yearly drift (fraction of a day, must be in range [0, 1))
+      double leapYearDriftOffset; //!< initial drift (fraction of a day, must be in range [0, 1))
+
+      /*! Test if the specified year is a leap year. */
+      bool isLeapYear(int year) const;
+  }; // class CUserDefinedCalendar
+
+} // namespace xios
+
+#endif // __XIOS_CUserDefinedCalendar__
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/declare_attribute.hpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/declare_attribute.hpp	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/declare_attribute.hpp	(revision 1749)
@@ -0,0 +1,175 @@
+#ifndef __XIOS_DECLARE_ATTRIBUTE__
+#define __XIOS_DECLARE_ATTRIBUTE__
+
+/// ///////////////////////////// Macros ///////////////////////////// ///
+#define DECLARE_ATTRIBUTE(type, name, ...)                        \
+   class name##_attr : public CAttributeTemplate<type>            \
+   {                                                              \
+      public :                                                    \
+         name##_attr(void)                                        \
+            : CAttributeTemplate<type>                            \
+            (#name, *CAttributeMap::Current)                      \
+         { /* Ne rien faire de plus */ }                          \
+         type operator=(const type & value)                       \
+         { return (CAttributeTemplate<type>::operator=(value)); } \
+         virtual bool doSend() const { return helper(__VA_ARGS__); }   \
+         bool helper(bool returnTrue=true) const { return returnTrue; }   \
+         virtual ~name##_attr(void)                               \
+         { /* Ne rien faire de plus */ }                          \
+   } name;
+
+#define DECLARE_ATTRIBUTE_PRIVATE(type, name, ...)                \
+   class name##_attr : public CAttributeTemplate<type>            \
+   {                                                              \
+      public :                                                    \
+         name##_attr(void)                                        \
+            : CAttributeTemplate<type>                            \
+            (#name, *CAttributeMap::Current)                      \
+         { /* Ne rien faire de plus */ }                          \
+         type operator=(const type & value)                       \
+         { return (CAttributeTemplate<type>::operator=(value)); } \
+         virtual bool isPublic() const                            \
+         { return false; }                                        \
+         virtual bool doSend() const { return helper(__VA_ARGS__); }   \
+         bool helper(bool returnTrue=true) const { return returnTrue; }   \
+         virtual ~name##_attr(void)                               \
+         { /* Ne rien faire de plus */ }                          \
+   } name;
+
+#define DECLARE_ARRAY(T_num, T_rank, name, ...)                   \
+   class name##_attr : public CAttributeArray<T_num, T_rank>      \
+   {                                                              \
+      public :                                                    \
+         using CAttributeArray<T_num, T_rank>::operator = ;       \
+         name##_attr(void) : CAttributeArray<T_num, T_rank> (#name, *CAttributeMap::Current) {} \
+         virtual bool doSend() const { return helper(__VA_ARGS__); }   \
+         bool helper(bool returnTrue=true) const { return returnTrue; }   \
+         virtual ~name##_attr(void) {}                            \
+   } name;
+
+#define DECLARE_ARRAY_PRIVATE(T_num, T_rank, name, ...)           \
+   class name##_attr : public CAttributeArray<T_num, T_rank>      \
+   {                                                              \
+      public :                                                    \
+         using CAttributeArray<T_num, T_rank>::operator = ;       \
+         name##_attr(void) : CAttributeArray<T_num, T_rank> (#name, *CAttributeMap::Current) {} \
+         virtual bool isPublic() const                            \
+         { return false; }                                        \
+         virtual bool doSend() const { return helper(__VA_ARGS__); }   \
+         bool helper(bool returnTrue=true) const { return returnTrue; }   \
+         virtual ~name##_attr(void) {}                            \
+   } name;
+
+#define DECLARE_CLASS_ENUM(name, ...)                             \
+   class name##_attr : public CAttributeEnum<Enum_##name>         \
+   {                                                              \
+      public :                                                    \
+         name##_attr(void) : CAttributeEnum<Enum_##name>(#name, *CAttributeMap::Current) { } \
+         virtual bool doSend() const { return helper(__VA_ARGS__); }   \
+         bool helper(bool returnTrue=true) const { return returnTrue; }   \
+         virtual ~name##_attr(void) {}                            \
+   } name;
+
+#define DECLARE_ENUM2(name,arg1,arg2)                             \
+   class Enum_##name                                              \
+   {                                                              \
+     public:                                                      \
+     enum t_enum { arg1=0, arg2} ;                                \
+     const char** getStr(void) const { static const char * enumStr[] = { #arg1, #arg2 } ; return enumStr ; }   \
+     int getSize(void) const { return 2 ; }                       \
+   } ;                                                            \
+   DECLARE_CLASS_ENUM(name)
+
+#define DECLARE_ENUM3(name,arg1,arg2,arg3)                        \
+   class Enum_##name                                              \
+   {                                                              \
+     public:                                                      \
+     enum t_enum { arg1=0, arg2, arg3} ;                          \
+     const char** getStr(void) const { static const char * enumStr[] = { #arg1, #arg2, #arg3 } ; return enumStr ; }   \
+     int getSize(void) const { return 3 ; }                       \
+   } ;                                                            \
+   DECLARE_CLASS_ENUM(name)
+
+#define DECLARE_ENUM4(name,arg1,arg2,arg3,arg4)                   \
+   class Enum_##name                                              \
+   {                                                              \
+     public:                                                      \
+     enum t_enum { arg1=0, arg2, arg3,arg4} ;                     \
+     const char** getStr(void) const { static const char * enumStr[] = { #arg1, #arg2, #arg3,#arg4 } ; return enumStr ; }   \
+     int getSize(void) const { return 4 ; }                       \
+   } ;                                                            \
+   DECLARE_CLASS_ENUM(name)
+
+#define DECLARE_ENUM5(name,arg1,arg2,arg3,arg4,arg5)              \
+   class Enum_##name                                              \
+   {                                                              \
+     public:                                                      \
+     enum t_enum { arg1=0, arg2, arg3,arg4,arg5} ;                \
+     const char** getStr(void) const { static const char * enumStr[] = { #arg1, #arg2, #arg3,#arg4,#arg5 } ; return enumStr ; }   \
+     int getSize(void) const { return 5 ; }                       \
+   } ;                                                            \
+   DECLARE_CLASS_ENUM(name)
+
+#define DECLARE_ENUM6(name,arg1,arg2,arg3,arg4,arg5,arg6)         \
+   class Enum_##name                                              \
+   {                                                              \
+     public:                                                      \
+     enum t_enum { arg1=0, arg2, arg3,arg4,arg5,arg6} ;           \
+     const char** getStr(void) const { static const char * enumStr[] = { #arg1, #arg2, #arg3,#arg4,#arg5,#arg6 } ; return enumStr ; }   \
+     int getSize(void) const { return 6 ; }                       \
+   } ;                                                            \
+   DECLARE_CLASS_ENUM(name)
+
+#define DECLARE_ENUM7(name,arg1,arg2,arg3,arg4,arg5,arg6,arg7)    \
+   class Enum_##name                                              \
+   {                                                              \
+     public:                                                      \
+     enum t_enum { arg1=0, arg2, arg3,arg4,arg5,arg6,arg7} ;      \
+     const char** getStr(void) const { static const char * enumStr[] = { #arg1, #arg2, #arg3,#arg4,#arg5,#arg6,#arg7 } ; return enumStr ; }   \
+     int getSize(void) const { return 7 ; }                       \
+   } ;                                                            \
+   DECLARE_CLASS_ENUM(name)
+
+#define DECLARE_ENUM8(name,arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8)                             \
+   class Enum_##name                                              \
+   {                                                              \
+     public:                                                      \
+     enum t_enum { arg1=0, arg2, arg3,arg4,arg5,arg6,arg7,arg8} ; \
+     const char** getStr(void) const { static const char * enumStr[] = { #arg1, #arg2, #arg3,#arg4,#arg5,#arg6,#arg7,#arg8 } ; return enumStr ; }   \
+     int getSize(void) const { return 8 ; }                       \
+   } ;                                                            \
+   DECLARE_CLASS_ENUM(name)
+
+  #define DECLARE_ENUM9(name,arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9)                             \
+   class Enum_##name                                              \
+   {                                                              \
+     public:                                                      \
+     enum t_enum { arg1=0, arg2, arg3,arg4,arg5,arg6,arg7,arg8,arg9} ;                                \
+     const char** getStr(void) const { static const char * enumStr[] = { #arg1, #arg2, #arg3,#arg4,#arg5,#arg6,#arg7,#arg8,#arg9 } ; return enumStr ; }   \
+     int getSize(void) const { return 9 ; }                       \
+   } ;                                                            \
+   DECLARE_CLASS_ENUM(name)
+
+  #define DECLARE_TYPE(name)                                      \
+   class Enum_##name                                              \
+   {                                                              \
+     public:                                                      \
+     enum t_enum { t_bool=0, t_int16, t_int, t_int32, t_int64, t_float, t_double, t_string }; \
+     const char** getStr(void) const { static const char * enumStr[] = { "bool", "int16", "int", "int32", "int64", "float", "double", "string" }; return enumStr; } \
+     int getSize(void) const { return 8; }                        \
+   };                                                             \
+   DECLARE_CLASS_ENUM(name)
+
+#define BEGIN_DECLARE_ATTRIBUTE_MAP(type)                  \
+   class type##Attributes : public virtual CAttributeMap   \
+   {                                                       \
+      public :
+
+#define END_DECLARE_ATTRIBUTE_MAP(type)            \
+         type##Attributes (void) : CAttributeMap() \
+         { /* Ne rien faire de plus */ }           \
+         virtual ~type##Attributes (void)          \
+         { /* Ne rien faire de plus */ }           \
+   };
+
+#endif // __XIOS_DECLARE_ATTRIBUTE__
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/declare_group.hpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/declare_group.hpp	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/declare_group.hpp	(revision 1749)
@@ -0,0 +1,58 @@
+#ifndef __XIOS_DECLARE_GROUP__
+#define __XIOS_DECLARE_GROUP__
+
+/// ///////////////////////////// Macros ///////////////////////////// ///
+
+#define DECLARE_GROUP(type)                                           \
+   class type##Group                                                  \
+      : public CGroupTemplate<type, type##Group, type##Attributes>    \
+   {                                                                  \
+      public:                                                         \
+         typedef type              RelChild;                          \
+         typedef type##Group       RelGroup;                          \
+         typedef type##Attributes  RelAttributes;                     \
+                                                                      \
+         type##Group(void)                                            \
+            : CGroupTemplate<RelChild, RelGroup, RelAttributes> ()    \
+         { /* Ne rien faire de plus */ }                              \
+         type##Group(const StdString& _id)                            \
+            : CGroupTemplate<RelChild, RelGroup, RelAttributes> (_id) \
+         { /* Ne rien faire de plus */ }                              \
+                                                                      \
+         static ENodeType GetType(void)                               \
+         { return static_cast<ENodeType>(RelChild::GetType()+1); }    \
+                                                                      \
+         virtual ~type##Group(void)                                   \
+         { /* Ne rien faire de plus */ }                              \
+   };                                                                 \
+   typedef type##Group type##Definition
+   
+#define DECLARE_GROUP_PARSE_REDEF(type)                                  \
+   class type##Group                                                     \
+      : public CGroupTemplate<type, type##Group, type##Attributes>       \
+   {                                                                     \
+      public:                                                            \
+         typedef type              RelChild;                             \
+         typedef type##Group       RelGroup;                             \
+         typedef type##Attributes  RelAttributes;                        \
+         typedef CGroupTemplate<type, type##Group, type##Attributes>     \
+                 SuperClass;                                             \
+                                                                         \
+         type##Group(void)                                               \
+            : CGroupTemplate<RelChild, RelGroup, RelAttributes> ()       \
+         { /* Ne rien faire de plus */ }                                 \
+         type##Group(const StdString& _id)                               \
+            : CGroupTemplate<RelChild, RelGroup, RelAttributes> (_id)    \
+         { /* Ne rien faire de plus */ }                                 \
+                                                                         \
+         static ENodeType GetType(void)                                  \
+         { return static_cast<ENodeType>(RelChild::GetType()+1); }       \
+                                                                         \
+         virtual void parse(xml::CXMLNode & node, bool withAttr = true); \
+                                                                         \
+         virtual ~type##Group(void)                                      \
+         { /* Ne rien faire de plus */ }                                 \
+   };                                                                    \
+   typedef type##Group type##Definition
+
+#endif // __XIOS_DECLARE_GROUP__
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/declare_ref_func.hpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/declare_ref_func.hpp	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/declare_ref_func.hpp	(revision 1749)
@@ -0,0 +1,133 @@
+/*!
+   \file declare_ref_func.hpp
+   \author Ha NGUYEN
+   \date 02 Dec 2014
+   \since 02 Dec 2014
+
+   \brief Macros to add functions used to solve references in class CDomain, CAxis and CField
+ */
+#ifndef __XIOS_DECLARE_REF_FUNC_HPP__
+#define __XIOS_DECLARE_REF_FUNC_HPP__
+
+// Declarations
+
+#define DECLARE_REF_FUNC(type, name_)                       \
+public:                                                     \
+  void solveRefInheritance(bool apply = true);              \
+  void removeRefInheritance();                              \
+  bool hasDirect##type##Reference(void) const;              \
+  C##type* getDirect##type##Reference(void) const;          \
+  const StdString get##type##OutputName(void) const;        \
+  void setAttributesReference(bool apply = true);           \
+  bool hasRefTo(C##type* ref) const;                        \
+                                                                       \
+private:                                                               \
+  std::vector<C##type*> refObjects;
+
+// Definitions
+
+#define DEFINE_REF_FUNC(type, name_)                                   \
+void C##type::solveRefInheritance(bool apply)                          \
+{                                                                      \
+  std::set<C##type*> tmpRefObjects;                                    \
+  C##type* refer_ptr = this;                                           \
+  std::vector<C##type*>().swap(refObjects);                            \
+  refObjects.push_back(this);                                          \
+                                                                       \
+  while (refer_ptr->hasDirect##type##Reference())                      \
+  {                                                                    \
+    tmpRefObjects.insert(refer_ptr);                                   \
+                                                                       \
+    refer_ptr = refer_ptr->getDirect##type##Reference();               \
+                                                                       \
+    if (tmpRefObjects.end() != tmpRefObjects.find(refer_ptr))          \
+    {                                                                  \
+      ERROR("void C" #type "::solveRefInheritance(bool apply)",        \
+            << "Circular dependency stopped for " #name_ " object "    \
+            << "with id = \"" << refer_ptr->getId() << "\".");         \
+    }                                                                  \
+                                                                       \
+    refObjects.push_back(refer_ptr);                                   \
+    SuperClassAttribute::setAttributes(refer_ptr, apply);              \
+  }                                                                    \
+  if (this->hasAttribute("name") && this->name.isEmpty())              \
+    this->name.setValue(this->get##type##OutputName());                \
+}                                                                      \
+                                                                       \
+void C##type::setAttributesReference(bool apply)                       \
+{                                                                      \
+  for (int i = 1; i < refObjects.size(); ++i)                          \
+    refObjects[i]->setAttributes(refObjects[i-1], apply);              \
+  if (refObjects.size() > 1)                                           \
+    refObjects[refObjects.size()-1]->removeRefInheritance();           \
+}                                                                      \
+                                                                       \
+void C##type::removeRefInheritance()                                   \
+{                                                                      \
+  if (!this->name_##_ref.isEmpty())                                    \
+    this->name_##_ref.reset();                                         \
+}                                                                      \
+                                                                       \
+bool C##type::hasDirect##type##Reference(void) const                   \
+{                                                                      \
+  return (!this->name_##_ref.isEmpty() &&                              \
+          C##type::has(this->name_##_ref));                            \
+}                                                                      \
+                                                                       \
+C##type* C##type::getDirect##type##Reference(void) const               \
+{                                                                      \
+  if (this->name_##_ref.isEmpty())                                     \
+    ERROR("C" #type "* C" #type "::getDirect" #type "Reference(void)", \
+          << "The " #name_ " with id = '" << getId() << "'"            \
+          << " has no " #name_ "_ref.");                               \
+                                                                       \
+  if (!C##type::has(this->name_##_ref))                                \
+    ERROR("C" #type "* C" #type "::getDirect" #type "Reference(void)", \
+          << this->name_##_ref                                         \
+          << " refers to an unknown " #name_ " id.");                  \
+                                                                       \
+  return C##type::get(this->name_##_ref);                              \
+}                                                                      \
+                                                                       \
+const StdString C##type::get##type##OutputName(void) const             \
+{                                                                      \
+  if (!this->name.isEmpty())  return this->name;                       \
+  else if (this->hasAutoGeneratedId() && hasDirect##type##Reference()) \
+  {                                                                    \
+    const C##type* refer_ptr = this, *tmp_ptr;                         \
+    StdString nameRef = this->name_##_ref;                             \
+    std::set<const C##type*> tmpRefObjects;                            \
+    while (refer_ptr->hasAutoGeneratedId() &&                          \
+          (C##type::has(nameRef)))                                     \
+    {                                                                  \
+      tmpRefObjects.insert(refer_ptr);                                 \
+      tmp_ptr = refer_ptr;                                             \
+      refer_ptr = tmp_ptr->getDirect##type##Reference();               \
+      if (refer_ptr->hasAutoGeneratedId() &&                           \
+          refer_ptr->hasDirect##type##Reference())                     \
+        nameRef = refer_ptr->name_##_ref;                              \
+      else {                                                           \
+        nameRef = refer_ptr->getId(); break;                           \
+      }                                                                \
+      if (tmpRefObjects.end() != tmpRefObjects.find(refer_ptr))        \
+      {                                                                \
+        ERROR("const StdString& C" #type "::get" #type "OutputName(void) const ",      \
+              << "Circular dependency stopped for " #name_ " object "  \
+              << "with id = \"" << refer_ptr->getId() << "\".");       \
+      }                                                                \
+    }                                                                  \
+    return nameRef;                                                    \
+  }                                                                    \
+  else                                                                 \
+    return getId();                                                    \
+}                                                                      \
+                                                                       \
+bool C##type::hasRefTo(C##type* ref) const                             \
+{                                                                      \
+  bool found = false;                                                  \
+  for (int idx = 0; idx < refObjects.size(); ++idx)                    \
+    if (ref == refObjects[idx]) { found = true; break; }                \
+  return found;                                                        \
+}
+
+#endif // __XIOS_DECLARE_REF_FUNC_HPP__
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/declare_virtual_node.hpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/declare_virtual_node.hpp	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/declare_virtual_node.hpp	(revision 1749)
@@ -0,0 +1,31 @@
+#ifndef __XMLIO_DECLARE_VIRTUAL_NODE__
+#define __XMLIO_DECLARE_VIRTUAL_NODE__
+
+/// ///////////////////////////// Macros ///////////////////////////// ///
+
+#define DECLARE_VIRTUAL_NODE(type)                                    \
+   class CVirtual##type                                               \
+      : public CVirtualNode<C##type>                                     \
+   {                                                                  \
+      public:                                                         \
+         typedef C##type           RelType;                           \
+                                                                      \
+         CVirtual##type() : CVirtualNode<RelType> ()                  \
+         { /* Ne rien faire de plus */ }                              \
+                                                                      \
+         void setVirtual##type(RelType* newRelTypePtr)                \
+         { CVirtualNode<C##type>::setVirtualNode(newRelTypePtr); }                     \
+                                                                      \
+         void setVirtual##type()                                      \
+         { CVirtualNode<C##type>::setVirtualNode(); }                     \
+                                                                      \
+         RelType* getVirtual##type() const                            \
+         { return CVirtualNode<C##type>::getVirtualNode(); }                           \
+                                                                      \
+         virtual ~CVirtual##type()                                    \
+         { /* Ne rien faire de plus */ }                              \
+   };                                                                 \
+   typedef CVirtual##type CVirtual##type##Definition
+
+
+#endif // __XMLIO_DECLARE_VIRTUAL_NODE__
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/dht_auto_indexing.cpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/dht_auto_indexing.cpp	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/dht_auto_indexing.cpp	(revision 1749)
@@ -0,0 +1,115 @@
+/*!
+   \file dht_auto_indexing.cpp
+   \author Ha NGUYEN
+   \since 6 Jul 2016
+   \date 6 Jul 2016
+
+   \brief Auto assign global index across processes.
+ */
+#include "dht_auto_indexing.hpp"
+
+namespace xios
+{
+
+  CDHTAutoIndexing::~CDHTAutoIndexing()
+  {
+  }
+
+  /*!
+    \param [in]
+    \param [in]
+  */
+
+  CDHTAutoIndexing::CDHTAutoIndexing(const CArray<size_t,1>& hashValue,
+                                     const MPI_Comm& clientIntraComm)
+    : CClientClientDHTTemplate<size_t>(clientIntraComm)
+  {
+
+    nbIndexOnProc_ = hashValue.size();
+    size_t nbIndexAccum;
+    MPI_Scan(&nbIndexOnProc_, &nbIndexAccum, 1, MPI_UNSIGNED_LONG, MPI_SUM, clientIntraComm);
+
+    // Broadcasting the total number of indexes
+    int rank, size;
+    MPI_Comm_rank(clientIntraComm, &rank);
+    MPI_Comm_size(clientIntraComm, &size);
+    if (rank == (size-1)) nbIndexesGlobal_ = nbIndexAccum;
+    MPI_Bcast(&nbIndexesGlobal_, 1, MPI_UNSIGNED_LONG, size-1, clientIntraComm);
+
+    CArray<size_t,1>::const_iterator itbIdx = hashValue.begin(), itIdx,
+                                     iteIdx = hashValue.end();
+
+    size_t idx = 0;
+    beginIndexOnProc_ = nbIndexAccum - nbIndexOnProc_;
+    globalIndex_.resize(nbIndexOnProc_);
+    for (itIdx = itbIdx; itIdx != iteIdx; ++itIdx)
+    {
+      globalIndex_[idx] = beginIndexOnProc_ + idx;
+      ++idx ;
+    }
+  }
+
+  /*!
+   * \fn void CDHTAutoIndexing::CDHTAutoIndexing(Index2VectorInfoTypeMap& hashInitMap, const MPI_Comm& clientIntraComm)
+   * Assigns a global index to unique input indexes.
+   * The returned map has unique indexes as a key and global indexes as a mapped value.
+   * \param [in] hashInitMap map<size_t, vector<size_t>> is a map of unique indexes.
+   * \param [in] clientIntraComm
+  */
+  CDHTAutoIndexing::CDHTAutoIndexing(Index2VectorInfoTypeMap& hashInitMap,
+                                     const MPI_Comm& clientIntraComm)
+    : CClientClientDHTTemplate<size_t>(clientIntraComm)
+  {
+
+    nbIndexOnProc_ = hashInitMap.size();
+    size_t nbIndexAccum;
+    MPI_Scan(&nbIndexOnProc_, &nbIndexAccum, 1, MPI_UNSIGNED_LONG, MPI_SUM, clientIntraComm);
+
+    int rank, size;
+    MPI_Comm_rank(clientIntraComm, &rank);
+    MPI_Comm_size(clientIntraComm, &size);
+    if (rank == (size-1)) nbIndexesGlobal_ = nbIndexAccum;
+    MPI_Bcast(&nbIndexesGlobal_, 1, MPI_UNSIGNED_LONG, size-1, clientIntraComm);
+
+    Index2VectorInfoTypeMap::iterator itbIdx = hashInitMap.begin(), itIdx,
+                                      iteIdx = hashInitMap.end();
+    size_t idx = 0;
+    beginIndexOnProc_ = nbIndexAccum - nbIndexOnProc_;
+    globalIndex_.resize(nbIndexOnProc_);
+    for (itIdx = itbIdx; itIdx != iteIdx; ++itIdx)
+    {
+//      (itIdx->second)[0] = beginIndexOnProc_ + idx;
+      (itIdx->second)[1] = beginIndexOnProc_ + idx;
+      globalIndex_[idx] = beginIndexOnProc_ + idx;
+      ++idx ;
+    }
+  }
+
+  /*!
+   * \fn size_t CDHTAutoIndexing::getNbIndexesGlobal() const
+   * Returns the total number of global indexes.
+  */
+  size_t CDHTAutoIndexing::getNbIndexesGlobal() const
+  {
+    return nbIndexesGlobal_;
+  }
+
+  /*!
+   * \fn size_t CDHTAutoIndexing::getIndexStart() const
+   * Returns the starting global index for a proc.
+  */
+  size_t CDHTAutoIndexing::getIndexStart() const
+  {
+    return beginIndexOnProc_;
+  }
+
+  /*!
+   * \fn size_t CDHTAutoIndexing::getIndexCount() const
+   * Returns the number of global indexes on a proc.
+  */
+  size_t CDHTAutoIndexing::getIndexCount() const
+  {
+    return nbIndexOnProc_;
+  }
+
+}
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/dht_auto_indexing.hpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/dht_auto_indexing.hpp	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/dht_auto_indexing.hpp	(revision 1749)
@@ -0,0 +1,47 @@
+/*!
+   \file dht_auto_indexing.hpp
+   \author Ha NGUYEN
+   \since 6 Jul 2016
+   \date 6 Jul 2016
+
+   \brief Auto assign global index across processes.
+ */
+
+#ifndef __XIOS_DHT_AUTO_INDEXING_HPP__
+#define __XIOS_DHT_AUTO_INDEXING_HPP__
+
+#include "client_client_dht_template.hpp"
+
+namespace xios
+{
+
+/*!
+  \class CDHTAutoIndexing
+  .
+*/
+class CDHTAutoIndexing: public CClientClientDHTTemplate<size_t>
+{
+  public:
+
+    CDHTAutoIndexing(const CArray<size_t,1>& hashValue,
+                     const MPI_Comm& clientIntraComm);
+
+    CDHTAutoIndexing(Index2VectorInfoTypeMap& hashInitMap,
+                     const MPI_Comm& clientIntraComm);
+
+    size_t getNbIndexesGlobal() const;
+    size_t getIndexStart() const;
+    size_t getIndexCount() const;
+
+    /** Default destructor */
+    virtual ~CDHTAutoIndexing();
+
+  protected:
+    std::vector<size_t> globalIndex_;
+    size_t nbIndexesGlobal_;
+    size_t nbIndexOnProc_ ;
+    size_t beginIndexOnProc_ ;
+};
+
+} // namespace xios
+#endif // __XIOS_DHT_AUTO_INDEXING_HPP__
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/dht_data_types.hpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/dht_data_types.hpp	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/dht_data_types.hpp	(revision 1749)
@@ -0,0 +1,77 @@
+/*!
+   \file dht_data_types.hpp
+   \author Ha NGUYEN
+   \since 17 Mars 2016
+   \date 17 Mars 2016
+
+   \brief Customized data type for dht
+ */
+
+#ifndef __XIOS_DHT_DATATYPES_HPP__
+#define __XIOS_DHT_DATATYPES_HPP__
+
+#include "utils.hpp"
+
+namespace xios
+{
+typedef std::pair<int,int> PairIntInt;
+
+template<typename T>
+struct ProcessDHTElement
+{
+  typedef T Type;
+  static int typeSize()
+  {
+    return sizeof(Type);
+  }
+
+  static void packElement(const T& inputElement, unsigned char* packedElement, int& index)
+  {
+    if (NULL == packedElement) index += sizeof(Type);
+    else
+    {
+      *(T *)(&packedElement[index]) = inputElement;
+      index+=sizeof(Type);
+    }
+  }
+
+  static void unpackElement(T& outputElement, unsigned char* unpackedElement, int& index)
+  {
+    outputElement = *(Type*)(&unpackedElement[index]);
+    index+=sizeof(Type);
+  }
+};
+
+template<>
+struct ProcessDHTElement<PairIntInt>
+{
+  typedef PairIntInt Type;
+  static int typeSize()
+  {
+    return (2*sizeof(int));
+  }
+
+  static void packElement(const PairIntInt& inputElement, unsigned char* packedElement, int& index)
+  {
+    if (NULL == packedElement) index +=(2*sizeof(int));
+    else
+    {
+      *(int *)(&packedElement[index]) = inputElement.first;
+      index+=sizeof(int);
+      *(int *)(&packedElement[index]) = inputElement.second;
+      index+=sizeof(int);
+    }
+  }
+
+  static void unpackElement(PairIntInt& outputElement, unsigned char* unpackedElement, int& index)
+  {
+    outputElement.first=*(int *)(&unpackedElement[index]);
+    index+=sizeof(int);
+    outputElement.second=*(int *)(&unpackedElement[index]);
+    index+=sizeof(int);
+  }
+};
+
+}
+
+#endif // __XIOS_DHT_DATATYPES_HPP__
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/distribute_file_server2.cpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/distribute_file_server2.cpp	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/distribute_file_server2.cpp	(revision 1749)
@@ -0,0 +1,218 @@
+#include "distribute_file_server2.hpp"
+#include <fstream>
+#include <vector>
+#include <string>
+#include <map>
+#include <iostream>
+#include <cstdlib>
+#include <cmath>
+
+namespace xios
+{
+
+
+using namespace std ;
+
+
+void distributeFileOverServer2(int nbServers, int nGrids, SDistGrid* grids, int nFiles, SDistFile* files)
+{
+
+  double maxBandwith=0 ;
+  for(int i=0; i<nFiles; i++) if (maxBandwith<files[i].bandwith_) maxBandwith=files[i].bandwith_ ;
+  double maxMemory=0 ;
+  for(int i=0; i<nGrids; i++) if (maxMemory<grids[i].size_) maxMemory=grids[i].size_ ;
+  double T0=maxBandwith+maxMemory ;
+  
+  // initialise
+  vector<SDistServer> servers(nbServers) ;
+  for(int i=0;i<nbServers;++i) servers[i].initialize(i,nGrids, grids, nFiles,files) ;
+  
+  double p ;
+  double Em, energy, newEnergy;
+  double T, deltaE ;
+  vector<int> listFile(nFiles);
+    
+  for(int i=0; i<nFiles; ++i) servers[i%nbServers].addFile(i) ;
+
+// compute energy
+  energy=0;
+  for(int i=0;i<nbServers;++i) if (energy<servers[i].energy_) energy=servers[i].energy_ ;
+
+  int nf1,nf2,si,sj ;
+
+//  T=energy ;
+  T=T0 ;
+  int itMax=10*nFiles*nFiles ;
+
+  srand(314159) ;
+  for(int it=0;it<itMax;++it)
+  { 
+     T=T/(1+10./itMax) ;
+  // metropolis step i->j
+
+    nf1=rand()%nFiles ;
+    si=files[nf1].assignedServer_ ;
+    sj=rand()%nbServers ;
+
+    servers[si].removeFile(nf1) ;
+    servers[sj].addFile(nf1) ;
+
+    newEnergy=0;
+    for(int i=0;i<nbServers;++i) if (newEnergy<servers[i].energy_) newEnergy=servers[i].energy_ ;
+    deltaE=newEnergy-energy ;
+    
+    if (deltaE>0) 
+    {
+      p=rand()*1./RAND_MAX ;
+      if ( p > exp(-deltaE/T)) // don't accept configuration
+      {
+        servers[sj].removeFile(nf1) ;
+        servers[si].addFile(nf1) ;
+      }
+      else energy=newEnergy ;
+    }
+    else energy=newEnergy ;
+
+// metropolis step i<->j
+
+    nf1=rand()%nFiles ;
+    nf2=rand()%nFiles ;
+
+    si=files[nf1].assignedServer_ ;
+    sj=files[nf2].assignedServer_ ;
+    
+    servers[si].removeFile(nf1) ;
+    servers[sj].removeFile(nf2) ;
+    servers[si].addFile(nf2) ;
+    servers[sj].addFile(nf1) ;
+
+    newEnergy=0;
+    for(int i=0;i<nbServers;++i) if (newEnergy<servers[i].energy_) newEnergy=servers[i].energy_  ;
+    deltaE=newEnergy-energy ;
+    
+    if (deltaE>0) 
+    {
+      p=rand()*1./RAND_MAX ;
+      if ( p > exp(-deltaE/T)) // don't accept configuration
+      {
+
+        servers[si].removeFile(nf2) ;
+        servers[sj].removeFile(nf1) ;
+        servers[si].addFile(nf1) ;
+        servers[sj].addFile(nf2) ;
+      }
+      else energy=newEnergy ;
+    }
+    else energy=newEnergy ;
+
+// metropolis switch grid
+    if (it%10==0)
+    {
+      int sum=0 ;
+      while(sum==0)
+      {
+        si=rand()%nbServers ;
+        for(int i=0;i<nGrids;++i) sum+=servers[si].assignedGrid_[i] ;
+      }    
+      sj=rand()%nbServers ;
+      int numGrid=rand()%nGrids ;
+      while (servers[si].assignedGrid_[numGrid]==0) numGrid=rand()%nGrids ;  
+      
+      int nListFile=0 ;
+      for(int i=0;i<nFiles; i++)
+      {
+        if (files[i].assignedServer_==si)
+        {
+          for (int j=0;j<files[i].nbGrids_;++j)
+          {
+            if (files[i].assignedGrid_[j]==numGrid)
+            {
+              servers[si].removeFile(i) ;
+              servers[sj].addFile(i) ;
+              listFile[nListFile]=i ;
+              nListFile++ ;
+              break ;
+            }
+          }
+        }
+      }
+
+      newEnergy=0;
+      for(int i=0;i<nbServers;++i) if (newEnergy<servers[i].energy_) newEnergy=servers[i].energy_ ;
+      deltaE=newEnergy-energy ;
+    
+      if (deltaE>0) 
+      {
+        p=rand()*1./RAND_MAX ;
+        if ( p > exp(-deltaE/T)) // don't accept configuration
+        {
+
+          for(int i=0;i<nListFile;++i)
+          {
+            servers[sj].removeFile(listFile[i]) ;
+            servers[si].addFile(listFile[i]) ;
+          }
+        }
+        else energy=newEnergy ;
+      }
+      else energy=newEnergy ;
+    }  
+    
+    if (it%1000==0) cout<<"T "<<T<<"  ;  energy "<<energy<<endl ;
+  }
+}
+
+
+void SDistServer::initialize(int num, int nMaxGrid, SDistGrid* grids, int nMaxFile, SDistFile* files)
+{
+  
+   num_=num ;
+   nMaxGrid_=nMaxGrid;
+   grids_=grids ;
+   nMaxFile=nMaxFile;
+   files_=files ; 
+   energy_=0. ;
+   bandwith_=0.;
+   assignedGrid_=new int[nMaxGrid] ;
+   for(int i=0;i<nMaxGrid;++i) assignedGrid_[i]=0 ;
+}
+
+void SDistServer::finalize()
+{
+  delete [] assignedGrid_ ;
+}
+
+
+
+double SDistServer::addFile(int numFile)
+{
+  int numGrid ;
+  bandwith_+=files_[numFile].bandwith_ ;
+  files_[numFile].assignedServer_=num_ ;
+  
+  for(int i=0;i<files_[numFile].nbGrids_;i++)
+  {
+    numGrid=files_[numFile].assignedGrid_[i] ;
+    if (assignedGrid_[numGrid]==0) memory_+=grids_[numGrid].size_ ;
+    assignedGrid_[numGrid]++ ;
+  }
+  energy_=bandwith_+memory_ ; 
+  return energy_ ;
+}
+
+
+double SDistServer::removeFile(int numFile)
+{
+  int numGrid ;
+  bandwith_-=files_[numFile].bandwith_ ;
+  for(int i=0;i<files_[numFile].nbGrids_;i++)
+  {
+    numGrid=files_[numFile].assignedGrid_[i] ;
+    if (assignedGrid_[numGrid]==1) memory_-=grids_[numGrid].size_ ;
+    assignedGrid_[numGrid]-- ;
+  }
+  energy_=bandwith_+memory_ ; 
+  return energy_ ;
+}
+
+}
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/distribute_file_server2.hpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/distribute_file_server2.hpp	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/distribute_file_server2.hpp	(revision 1749)
@@ -0,0 +1,53 @@
+#ifndef __XIOS_DISTRIBUTE_FILE_SERVER2_HPP__
+#define __XIOS_DISTRIBUTE_FILE_SERVER2_HPP__
+
+#include <cstddef>
+#include <string>
+
+namespace xios
+{
+
+
+struct SDistServer ;
+struct SDistFiles ;
+struct SDistGrid ;
+
+struct SDistFile
+{
+  SDistServer* servers_ ;
+  std::string id_;
+  
+  double bandwith_ ;
+  int nbGrids_ ;
+  int* assignedGrid_ ;
+  int assignedServer_ ;
+
+} ;
+ 
+struct SDistServer
+{
+  SDistFile* files_ ;
+  SDistGrid* grids_ ;
+  
+  double energy_ ;
+  double bandwith_ ;
+  double memory_ ;
+  int  nMaxGrid_ ;
+  int* assignedGrid_ ;
+  int num_ ;
+  
+  void initialize(int num, int nMaxGrid, SDistGrid* grids, int nMaxFile, SDistFile* files) ;
+  void finalize(void) ;
+  
+  double addFile(int numFile) ;
+  double removeFile(int numFile) ;
+} ;  
+  
+struct SDistGrid
+{
+  double size_ ;
+} ;
+
+void distributeFileOverServer2(int nbServers, int nGrids, SDistGrid* grids, int nFiles, SDistFile* files);
+}
+#endif
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/distribution.cpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/distribution.cpp	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/distribution.cpp	(revision 1749)
@@ -0,0 +1,38 @@
+/*!
+   \file distribution.hpp
+   \author Ha NGUYEN
+   \since 13 Jan 2015
+   \date 09 Feb 2015
+
+   \brief Index distribution on server side.
+ */
+#include "distribution.hpp"
+
+namespace xios {
+
+CDistribution::CDistribution(int rank, int dims, const CArray<size_t,1>& globalIndex)
+  : rank_(rank), dims_(dims), globalIndex_(globalIndex.shape())
+{
+  if (0 != globalIndex.numElements())
+    globalIndex_ = globalIndex;
+}
+
+const CArray<size_t,1>& CDistribution:: getGlobalIndex() const 
+{ 
+  return globalIndex_; 
+}
+
+CDistribution::~CDistribution()
+{ /* Nothing to do */ }
+
+int CDistribution::getDims() const
+{
+  return dims_;
+}
+
+int CDistribution::getRank() const
+{
+  return rank_;
+}
+
+} // namespace xios
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/distribution.hpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/distribution.hpp	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/distribution.hpp	(revision 1749)
@@ -0,0 +1,49 @@
+/*!
+   \file distribution.hpp
+   \author Ha NGUYEN
+   \since 13 Jan 2015
+   \date 09 Feb 2015
+
+   \brief Index distribution on server side.
+ */
+#ifndef __XIOS_DISTRIBUTION_HPP__
+#define __XIOS_DISTRIBUTION_HPP__
+
+#include "xios_spl.hpp"
+#include "array_new.hpp"
+#include <unordered_map>
+
+namespace xios {
+/*!
+ \class CDistribution
+ The parent class of CDistributionClient and CDistributionServer, which declares and defines
+some basic methods and properties for its children. This class allows its descendants to calculate
+distribution of index on client or server side.
+*/
+class CDistribution
+{
+  public:
+  typedef std::unordered_map<size_t,int> GlobalLocalMap;
+
+  public:
+    /** Default constructor */
+    CDistribution(int rank, int dims, const CArray<size_t,1>& globalIndex = CArray<size_t,1>());
+
+    /** Default destructor */
+    virtual ~CDistribution();
+
+    int getDims() const; //! Get dimension size
+    int getRank() const; //! Get rank of current process
+    const CArray<size_t,1>& getGlobalIndex() const;
+    
+  protected:
+    virtual void createGlobalIndex() {};
+
+  protected:
+    CArray<size_t,1> globalIndex_;
+    int dims_;
+    int rank_;
+};
+
+} // namespace xios
+#endif // __XIOS_DISTRIBUTION_HPP__
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/distribution_client.cpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/distribution_client.cpp	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/distribution_client.cpp	(revision 1749)
@@ -0,0 +1,609 @@
+/*!
+   \file distribution_client.cpp
+   \author Ha NGUYEN
+   \since 13 Jan 2015
+   \date 09 Mars 2015
+
+   \brief Index distribution on client side.
+ */
+#include "distribution_client.hpp"
+
+namespace xios {
+
+CDistributionClient::CDistributionClient(int rank, CGrid* grid)
+   : CDistribution(rank, 0)
+   , axisDomainOrder_()
+   , nLocal_(), nGlob_(), nBeginLocal_(), nBeginGlobal_()
+   , dataNIndex_(), dataDims_(), dataBegin_(), dataIndex_()
+   , gridMask_(), indexMap_()
+   , isDataDistributed_(true), axisNum_(0), domainNum_(0)
+   , localDataIndex_(), localMaskIndex_()
+   , globalLocalDataSendToServerMap_()
+   , infoIndex_(), isComputed_(false)
+   , elementLocalIndex_(), elementGlobalIndex_(), elementIndexData_()
+   , elementNLocal_(), elementNGlobal_()
+{
+  readDistributionInfo(grid);
+  createGlobalIndex();
+}
+
+CDistributionClient::~CDistributionClient()
+{ /* Nothing to do */ }
+
+void CDistributionClient::partialClear()
+{
+  GlobalLocalMap void1 ;
+  GlobalLocalMap void2 ;
+  std::vector<int> void3 ;
+  std::vector<bool> void4 ;
+
+  globalLocalDataSendToServerMap_.swap(void1) ;
+  globalDataIndex_.swap(void2) ;
+  localDataIndex_.swap(void3);
+  localMaskIndex_.swap(void4) ;
+}
+
+/*!
+  Read information of a grid to generate distribution.
+  Every grid is composed of several axis or/and domain(s). Their information are processed
+stored and used to calculate index distribution between client and server
+  \param [in] grid Grid to read
+*/
+void CDistributionClient::readDistributionInfo(CGrid* grid)
+{
+  std::vector<CDomain*> domList = grid->getDomains();
+  std::vector<CAxis*> axisList = grid->getAxis();
+  std::vector<CScalar*> scalarList = grid->getScalars();
+  CArray<int,1> axisDomainOrder = grid->axis_domain_order;
+
+  readDistributionInfo(domList, axisList, scalarList, axisDomainOrder);
+
+  // Then check mask of grid
+  int gridDim = domList.size() * 2 + axisList.size();
+  switch (gridDim) {
+    case 0:
+      gridMask_.resize(1);
+      gridMask_(0) = true;
+      break;
+    case 1:
+      if (!grid->mask_1d.isEmpty()) readGridMaskInfo(grid->mask_1d);
+      break;
+    case 2:
+      if (!grid->mask_2d.isEmpty()) readGridMaskInfo(grid->mask_2d);
+      break;
+    case 3:
+      if (!grid->mask_3d.isEmpty()) readGridMaskInfo(grid->mask_3d);
+      break;
+    case 4:
+      if (!grid->mask_4d.isEmpty()) readGridMaskInfo(grid->mask_4d);
+      break;
+    case 5:
+      if (!grid->mask_5d.isEmpty()) readGridMaskInfo(grid->mask_5d);
+      break;
+    case 6:
+      if (!grid->mask_6d.isEmpty()) readGridMaskInfo(grid->mask_6d);
+      break;
+    case 7:
+      if (!grid->mask_7d.isEmpty()) readGridMaskInfo(grid->mask_7d);
+      break;
+    default:
+      break;
+  }
+}
+
+/*!
+  Read information from domain(s) and axis to generate distribution.
+  All information related to domain, e.g ibegin, jbegin, ni, nj, ni_glo, nj_glo
+as well as related to axis, e.g dataNIndex, dataIndex will be stored to compute
+the distribution between clients and servers. Till now, every data structure of domain has been kept
+like before, e.g: data_n_index to make sure a compability, however, it should be changed?
+  \param [in] domList List of domains of grid
+  \param [in] axisList List of axis of grid
+  \param [in] scalarList List of scalar of grid
+  \param [in] axisDomainOrder order of axis and domain inside a grid. 2 if domain, 1 if axis and zero if scalar
+//  \param [in] gridMask Mask of grid, for now, keep it 3 dimension, but it needs changing
+*/
+void CDistributionClient::readDistributionInfo(const std::vector<CDomain*>& domList,
+                                               const std::vector<CAxis*>& axisList,
+                                               const std::vector<CScalar*>& scalarList,
+                                               const CArray<int,1>& axisDomainOrder)
+{
+  domainNum_ = domList.size();
+  axisNum_   = axisList.size();
+  numElement_ = axisDomainOrder.numElements(); // Number of element, e.x: Axis, Domain
+
+  axisDomainOrder_.resize(numElement_);
+  axisDomainOrder_ = axisDomainOrder;
+
+  // Because domain and axis can be in any order (axis1, domain1, axis2, axis3, )
+  // their position should be specified. In axisDomainOrder, domain == true, axis == false
+  int idx = 0;
+  indexMap_.resize(numElement_);
+  this->dims_ = numElement_;
+  for (int i = 0; i < numElement_; ++i)
+  {
+    indexMap_[i] = idx;
+    if (2 == axisDomainOrder(i))
+    {
+      ++(this->dims_);
+      idx += 2;
+    }
+    else ++idx;
+  }
+
+  // Size of each dimension (local and global)
+  nLocal_.resize(this->dims_);
+  nGlob_.resize(this->dims_);
+  nBeginLocal_.resize(this->dims_,0);
+  nBeginGlobal_.resize(this->dims_,0);
+
+  // Data_n_index of domain or axis (For now, axis uses its size as data_n_index
+  dataNIndex_.resize(numElement_);
+  dataDims_.resize(numElement_);
+  dataBegin_.resize(this->dims_);
+
+  // Data_*_index of each dimension
+  dataIndex_.resize(this->dims_);
+  infoIndex_.resize(this->dims_);
+
+  // A trick to determine position of each domain in domainList
+  int domIndex = 0, axisIndex = 0, scalarIndex = 0;
+  idx = 0;
+
+  elementLocalIndex_.resize(numElement_);
+  elementGlobalIndex_.resize(numElement_);
+  elementIndexData_.resize(numElement_);
+  elementNLocal_.resize(numElement_);
+  elementNGlobal_.resize(numElement_);
+  elementNLocal_[0] = 1;
+  elementNGlobal_[0] = 1;
+  size_t localSize = 1, globalSize = 1;
+
+  isDataDistributed_ = false;
+  // Update all the vectors above
+  for (idx = 0; idx < numElement_; ++idx)
+  {
+    int eleDim = axisDomainOrder(idx);
+    elementNLocal_[idx] = localSize;
+    elementNGlobal_[idx] = globalSize;
+
+    // If this is a domain
+    if (2 == eleDim)
+    {
+      // On the j axis
+      nLocal_.at(indexMap_[idx]+1) = domList[domIndex]->nj.getValue();
+      nGlob_.at(indexMap_[idx]+1)  = domList[domIndex]->nj_glo.getValue();
+      nBeginLocal_.at(indexMap_[idx]+1) = 0;
+      nBeginGlobal_.at(indexMap_[idx]+1) = domList[domIndex]->jbegin;
+
+      dataBegin_.at(indexMap_[idx]+1) = domList[domIndex]->data_jbegin.getValue();
+      dataIndex_.at(indexMap_[idx]+1).reference(domList[domIndex]->data_j_index);
+      infoIndex_.at(indexMap_[idx]+1).reference(domList[domIndex]->j_index);
+
+      // On the i axis
+      nLocal_.at(indexMap_[idx]) = domList[domIndex]->ni.getValue();
+      nGlob_.at(indexMap_[idx]) = domList[domIndex]->ni_glo.getValue();
+      nBeginLocal_.at(indexMap_[idx]) = 0;
+      nBeginGlobal_.at(indexMap_[idx]) = domList[domIndex]->ibegin;
+
+      dataBegin_.at(indexMap_[idx]) = domList[domIndex]->data_ibegin.getValue();
+      dataIndex_.at(indexMap_[idx]).reference(domList[domIndex]->data_i_index);
+      infoIndex_.at(indexMap_[idx]).reference(domList[domIndex]->i_index);
+
+      dataNIndex_.at(idx) = domList[domIndex]->data_i_index.numElements();
+      dataDims_.at(idx) = domList[domIndex]->data_dim.getValue();
+
+      isDataDistributed_ |= domList[domIndex]->isDistributed();
+
+      localSize *= nLocal_.at(indexMap_[idx]+1)* nLocal_.at(indexMap_[idx]);
+      globalSize *= nGlob_.at(indexMap_[idx]+1)* nGlob_.at(indexMap_[idx]);
+      ++domIndex;
+    }
+    else if (1 == eleDim)// So it's an axis
+    {
+      nLocal_.at(indexMap_[idx]) = axisList[axisIndex]->n.getValue();
+      nGlob_.at(indexMap_[idx]) = axisList[axisIndex]->n_glo.getValue();
+      nBeginLocal_.at(indexMap_[idx]) = 0;
+      nBeginGlobal_.at(indexMap_[idx]) = axisList[axisIndex]->begin.getValue();
+
+      dataBegin_.at(indexMap_[idx]) = axisList[axisIndex]->data_begin.getValue();
+      dataIndex_.at(indexMap_[idx]).reference(axisList[axisIndex]->data_index);
+      infoIndex_.at(indexMap_[idx]).reference(axisList[axisIndex]->index);
+      dataNIndex_.at(idx) = axisList[axisIndex]->data_index.numElements();
+      dataDims_.at(idx) = 1;
+
+      isDataDistributed_ |= axisList[axisIndex]->isDistributed();
+
+      localSize *= nLocal_.at(indexMap_[idx]);
+      globalSize *= nGlob_.at(indexMap_[idx]);
+
+      ++axisIndex;
+    }
+    else // scalar
+    {
+      nLocal_.at(indexMap_[idx]) = 1;
+      nGlob_.at(indexMap_[idx]) = 1;
+      nBeginLocal_.at(indexMap_[idx]) = 0;
+      nBeginGlobal_.at(indexMap_[idx]) = 1;
+
+      dataBegin_.at(indexMap_[idx]) = 0;
+      dataIndex_.at(indexMap_[idx]).resize(1); dataIndex_.at(indexMap_[idx])(0) = 0;
+      infoIndex_.at(indexMap_[idx]).resize(1); infoIndex_.at(indexMap_[idx])(0) = 0;
+      dataNIndex_.at(idx) = 1;
+      dataDims_.at(idx) = 1;
+
+      isDataDistributed_ |= false;
+
+      localSize *= nLocal_.at(indexMap_[idx]);
+      globalSize *= nGlob_.at(indexMap_[idx]);
+
+      ++scalarIndex;
+    }
+  }
+}
+
+/*!
+  Create local index of domain(s).
+  A domain can have data index which even contains the "ghost" points. Very often, these
+data surround the true data. In order to send correct data to server,
+a client need to know index of the true data.
+*/
+void CDistributionClient::createLocalDomainDataIndex()
+{
+  int idxDomain = 0;
+  for (int i = 0; i < axisDomainOrder_.numElements(); ++i)
+  {
+    if (2 == axisDomainOrder_(i))
+    {
+      elementIndexData_[i].resize(dataNIndex_[i]);
+      elementIndexData_[i] = false;
+      int iIdx, jIdx = 0, count = 0, localIndex;
+      for (int j = 0; j < dataNIndex_[i]; ++j)
+      {
+        iIdx = getDomainIndex((dataIndex_[indexMap_[i]])(j), (dataIndex_[indexMap_[i]+1])(j),
+                              dataBegin_[indexMap_[i]], dataBegin_[indexMap_[i]+1],
+                              dataDims_[i], nLocal_[indexMap_[i]], jIdx);
+
+        if ((iIdx >= nBeginLocal_[indexMap_[i]]) && (iIdx < nLocal_[indexMap_[i]]) &&
+           (jIdx >= nBeginLocal_[indexMap_[i]+1]) && (jIdx < nLocal_[indexMap_[i]+1]))
+        {
+          ++count;
+          elementIndexData_[i](j) = true;
+        }
+      }
+
+      elementLocalIndex_[i].resize(count);
+      elementGlobalIndex_[i].resize(count);
+      count = 0;
+      CArray<bool,1>& tmpIndexElementData = elementIndexData_[i];
+      CArray<int,1>& tmpLocalElementIndex = elementLocalIndex_[i];
+      CArray<size_t,1>& tmpGlobalElementIndex = elementGlobalIndex_[i];
+      for (int j = 0; j < dataNIndex_[i]; ++j)
+      {
+        if (tmpIndexElementData(j))
+        {
+          iIdx = getDomainIndex((dataIndex_[indexMap_[i]])(j), (dataIndex_[indexMap_[i]+1])(j),
+                                dataBegin_[indexMap_[i]], dataBegin_[indexMap_[i]+1],
+                                dataDims_[i], nLocal_[indexMap_[i]], jIdx);
+          localIndex = tmpLocalElementIndex(count) = iIdx + jIdx * nLocal_[indexMap_[i]];
+          tmpGlobalElementIndex(count) = (infoIndex_[indexMap_[i]])(localIndex) + ((infoIndex_[indexMap_[i]+1])(localIndex))*nGlob_[indexMap_[i]];
+          ++count;
+        }
+      }
+      ++idxDomain;
+    }
+  }
+}
+
+/*!
+  Create local index of axis.
+*/
+void CDistributionClient::createLocalAxisDataIndex()
+{
+  int idxAxis = 0;
+  for (int i = 0; i < axisDomainOrder_.numElements(); ++i)
+  {
+    if (1 == axisDomainOrder_(i))
+    {
+      elementIndexData_[i].resize(dataNIndex_[i]);
+      elementIndexData_[i] = false;
+      int iIdx = 0, count = 0;
+      for (int j = 0; j < dataNIndex_[i]; ++j)
+      {
+        iIdx = getAxisIndex((dataIndex_[indexMap_[i]])(j), dataBegin_[indexMap_[i]], nLocal_[indexMap_[i]]);
+        if ((iIdx >= nBeginLocal_[indexMap_[i]]) &&
+           (iIdx < nLocal_[indexMap_[i]]) )//&& (axisMasks_[idxAxis](iIdx)))
+        {
+          ++count;
+          elementIndexData_[i](j) = true;
+        }
+      }
+
+      elementLocalIndex_[i].resize(count);
+      elementGlobalIndex_[i].resize(count);
+      count = 0;
+      CArray<bool,1>& tmpIndexElementData = elementIndexData_[i];
+      CArray<int,1>& tmpLocalElementIndex = elementLocalIndex_[i];
+      CArray<size_t,1>& tmpGlobalElementIndex = elementGlobalIndex_[i];
+      for (int j = 0; j < dataNIndex_[i]; ++j)
+      {
+        if (tmpIndexElementData(j))
+        {
+          iIdx = tmpLocalElementIndex(count) = getAxisIndex((dataIndex_[indexMap_[i]])(j), dataBegin_[indexMap_[i]], nLocal_[indexMap_[i]]);
+          tmpGlobalElementIndex(count) = (infoIndex_[indexMap_[i]])(iIdx);
+          ++count;
+        }
+      }
+      ++idxAxis;
+    }
+  }
+}
+
+/*!
+  Create local index of scalar.
+*/
+void CDistributionClient::createLocalScalarDataIndex()
+{
+  int idxAxis = 0;
+  for (int i = 0; i < axisDomainOrder_.numElements(); ++i)
+  {
+    if (0 == axisDomainOrder_(i))
+    {
+      elementIndexData_[i].resize(dataNIndex_[i]);
+      elementIndexData_[i] = true;
+      int count = 1;
+
+      elementLocalIndex_[i].resize(count);
+      elementLocalIndex_[i] = 0;
+      elementGlobalIndex_[i].resize(count);
+      elementGlobalIndex_[i] = 0;
+    }
+  }
+}
+
+/*!
+   Create global index on client
+   In order to do the mapping between client-server, each client creates its own
+global index of sending data. This global index is then used to calculate to which server
+the client needs to send it data as well as which part of data belongs to the server.
+So as to make clients and server coherent in order of index, global index is calculated by
+take into account of C-convention, the rightmost dimension varies faster.
+*/
+void CDistributionClient::createGlobalIndexSendToServer()
+{
+  if (isComputed_) return;
+  isComputed_ = true;
+  createLocalDomainDataIndex();
+  createLocalAxisDataIndex();
+  createLocalScalarDataIndex();
+
+  int idxDomain = 0, idxAxis = 0;
+  std::vector<int> eachElementSize(numElement_);
+
+  // Precompute size of the loop
+  for (int i = 0; i < numElement_; ++i)
+  {
+    eachElementSize[i] = elementLocalIndex_[i].numElements();
+  }
+
+  //   Compute size of the global index on client
+  std::vector<StdSize> idxLoop(numElement_,0);
+  std::vector<StdSize> currentIndex(numElement_,0);
+  std::vector<StdSize> currentGlobalIndex(numElement_,0);
+  int innerLoopSize = eachElementSize[0];
+  size_t idx = 0, indexLocalDataOnClientCount = 0;
+  size_t ssize = 1;
+
+  for (int i = 0; i < numElement_; ++i) ssize *= eachElementSize[i];
+
+  localDataIndex_.resize(ssize);
+  if (!gridMask_.isEmpty()) localMaskIndex_.resize(ssize);
+  localMaskedDataIndex_.resize(ssize);
+  globalDataIndex_.rehash(std::ceil(ssize/globalDataIndex_.max_load_factor()));
+  globalLocalDataSendToServerMap_.rehash(std::ceil(ssize/globalLocalDataSendToServerMap_.max_load_factor()));
+
+
+  // We need to loop with data index
+  idxLoop.assign(numElement_,0);
+  idx = indexLocalDataOnClientCount = 0;
+  ssize = 1; for (int i = 0; i < numElement_; ++i) ssize *= dataNIndex_[i];
+  innerLoopSize = dataNIndex_[0];
+  int countLocalData = 0;
+  std::vector<int> correctIndexOfElement(numElement_,0);
+  bool isOuterIndexCorrect = true;
+  while (idx < ssize)
+  {
+    for (int i = 0; i < numElement_-1; ++i)
+    {
+      if (idxLoop[i] == dataNIndex_[i])
+      {
+        idxLoop[i] = 0;
+        correctIndexOfElement[i] = 0;
+        ++idxLoop[i+1];
+        if (isOuterIndexCorrect) ++correctIndexOfElement[i+1];
+      }
+    }
+
+    // Depending the inner-most element axis or domain,
+    // The outer loop index begins correspondingly at one (1) or zero (0)
+    bool isIndexElementDataCorrect = true;
+    for (int i = 1; i < numElement_; ++i)
+    {
+      if (elementIndexData_[i](idxLoop[i]))
+      {
+        currentIndex[i] = elementLocalIndex_[i](correctIndexOfElement[i]);
+        currentGlobalIndex[i] = elementGlobalIndex_[i](correctIndexOfElement[i]);
+        isIndexElementDataCorrect &= true;
+      }
+      else isIndexElementDataCorrect = false;
+    }
+
+    isOuterIndexCorrect = isIndexElementDataCorrect;
+
+    if (isOuterIndexCorrect)
+    {
+      // Inner most index
+      int correctIndexInnerElement = 0;
+      for (int i = 0; i < innerLoopSize; ++i)
+      {
+        bool isCurrentIndexDataCorrect = isOuterIndexCorrect;
+        if (elementIndexData_[0](i))
+        {
+          currentIndex[0] = elementLocalIndex_[0](correctIndexInnerElement);
+          currentGlobalIndex[0] = elementGlobalIndex_[0](correctIndexInnerElement);
+          isCurrentIndexDataCorrect &= true;
+          ++correctIndexInnerElement;
+        }
+        else isCurrentIndexDataCorrect = false;
+
+        if (isCurrentIndexDataCorrect)
+        {
+          bool maskTmp = true;
+          bool maskGridTmp = true;
+          size_t globalIndex = 0;
+          for (int k = 0; k < numElement_; ++k)
+          {
+            globalIndex += (currentGlobalIndex[k])*elementNGlobal_[k];
+          }
+          globalDataIndex_[globalIndex] = indexLocalDataOnClientCount;
+          localDataIndex_[indexLocalDataOnClientCount] = countLocalData;
+          globalLocalDataSendToServerMap_[globalIndex] = indexLocalDataOnClientCount;
+          localMaskedDataIndex_[indexLocalDataOnClientCount] = indexLocalDataOnClientCount;
+
+          // Grid mask: unmasked values will be replaces by NaN and then all values will be sent
+          if (!gridMask_.isEmpty())
+          {
+            int gridMaskIndex = 0;
+            for (int k = 0; k < this->numElement_; ++k)
+            {
+              gridMaskIndex += (currentIndex[k])*elementNLocal_[k];
+            }
+            maskGridTmp =  gridMask_(gridMaskIndex);
+            if (maskGridTmp)
+              localMaskIndex_[indexLocalDataOnClientCount] = true;
+            else
+              localMaskIndex_[indexLocalDataOnClientCount] = false;
+          }
+
+          ++indexLocalDataOnClientCount;
+
+        }
+        ++countLocalData;
+        correctIndexOfElement[0] = correctIndexInnerElement;;
+      }
+    }
+    else countLocalData+=innerLoopSize ;
+
+    idxLoop[0] += innerLoopSize;
+    idx += innerLoopSize;
+  }
+}
+
+void CDistributionClient::createGlobalIndex()
+{
+}
+
+/*!
+  Retrieve index i and index j of a domain from its data index
+  Data contains not only true data, which are sent to servers, but also ghost data, which
+very often play a role of border of each local data, so does data index. Because data of a domain
+can be one dimension, or two dimensions, there is a need to convert data index to domain index
+  \param [in] dataIIndex index of i data
+  \param [in] dataJIndex index of j data
+  \param [in] dataIBegin index begin of i data
+  \param [in] dataJBegin index begin of j data
+  \param [in] dataDim dimension of data (1 or 2)
+  \param [in] ni local size ni of domain
+  \param [out] j j index of domain
+  \return i index of domain
+*/
+int CDistributionClient::getDomainIndex(const int& dataIIndex, const int& dataJIndex,
+                                        const int& dataIBegin, const int& dataJBegin,
+                                        const int& dataDim, const int& ni, int& j)
+{
+  int i;
+  int tempI = dataIIndex + dataIBegin,
+      tempJ = (dataJIndex + dataJBegin);
+  if (ni == 0)
+  {
+    i = -1;
+    j = -1;
+    return i;
+  }
+  if ((tempI < 0) || (tempJ < 0))
+  {
+    i = -1;
+    j = -1;
+    return i;
+  }
+  else
+  {
+    i = (dataDim == 1) ? (tempI) % ni : (tempI) ;
+    j = (dataDim == 1) ? (tempI) / ni : (tempJ) ;
+  }
+  return i;
+}
+
+/*!
+  Retrieve index of an axis from its data index
+  \param [in] dataIndex index of data
+  \param [in] dataBegin index begin of data
+  \param [in] ni local size of axis
+  \return index of domain
+*/
+int CDistributionClient::getAxisIndex(const int& dataIndex, const int& dataBegin, const int& ni)
+{
+  if (ni == 0)
+  {
+    return -1;
+  }
+  int tempI = dataIndex;
+  if ((tempI < 0) || (tempI > ni))
+    return -1;
+  else
+    return tempI;
+}
+
+/*!
+  Return global local data mapping of client
+*/
+CDistributionClient::GlobalLocalDataMap& CDistributionClient::getGlobalLocalDataSendToServer()
+{
+  if (!isComputed_) createGlobalIndexSendToServer();
+  return globalLocalDataSendToServerMap_;
+}
+
+CDistributionClient::GlobalLocalDataMap& CDistributionClient::getGlobalDataIndexOnClient()
+{
+  if (!isComputed_) createGlobalIndexSendToServer();
+  return globalDataIndex_;
+}
+
+/*!
+  Return local data index of client
+*/
+const std::vector<int>& CDistributionClient::getLocalDataIndexOnClient()
+{
+  if (!isComputed_) createGlobalIndexSendToServer();
+  return localDataIndex_;
+}
+
+/*!
+  Return local mask index of client
+*/
+const std::vector<bool>& CDistributionClient::getLocalMaskIndexOnClient()
+{
+  if (!isComputed_) createGlobalIndexSendToServer();
+  return localMaskIndex_;
+}
+
+/*!
+  Return local mask index of client
+*/
+const std::vector<int>& CDistributionClient::getLocalMaskedDataIndexOnClient()
+{
+  if (!isComputed_) createGlobalIndexSendToServer();
+  return localMaskedDataIndex_;
+}
+
+} // namespace xios
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/distribution_client.hpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/distribution_client.hpp	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/distribution_client.hpp	(revision 1749)
@@ -0,0 +1,183 @@
+/*!
+   \file distribution_client.hpp
+   \author Ha NGUYEN
+   \since 13 Jan 2015
+   \date 09 Mars 2015
+
+   \brief Index distribution on client side.
+ */
+#ifndef __XIOS_DISTRIBUTIONCLIENT_HPP__
+#define __XIOS_DISTRIBUTIONCLIENT_HPP__
+
+#include <distribution.hpp>
+#include "axis.hpp"
+#include "domain.hpp"
+#include "grid.hpp"
+
+namespace xios {
+
+class CGrid;
+class CDomain;
+class CAxis;
+class CScalar;
+
+/*!
+  \class CDistributionClient
+  This class bases on the knowledge of distribution on client side (decided by users)
+to calculate the global index of its local data.
+*/
+class CDistributionClient : public CDistribution
+{
+public:
+  typedef CDistribution::GlobalLocalMap GlobalLocalDataMap;
+
+  public:
+    /** Default constructor */
+    CDistributionClient(int rank, CGrid* grid);
+
+    void createGlobalIndexSendToServer();
+
+    /** Default destructor */
+    virtual ~CDistributionClient();
+
+    virtual const std::vector<int>& getLocalDataIndexOnClient();
+    GlobalLocalDataMap& getGlobalLocalDataSendToServer();
+    GlobalLocalDataMap& getGlobalDataIndexOnClient();
+    const std::vector<bool>& getLocalMaskIndexOnClient();
+    const std::vector<int>& getLocalMaskedDataIndexOnClient();
+
+    std::vector<int> getNGlob() { return nGlob_; }
+    std::vector<int> getDataNIndex() { return dataNIndex_; }
+
+    bool isDataDistributed() { return isDataDistributed_; }
+
+    static int getDomainIndex(const int& dataIIndex, const int& dataJIndex,
+                                     const int& dataIBegin, const int& dataJBegin,
+                                     const int& dataDim, const int& ni, int& j);
+    static int getAxisIndex(const int& dataIndex, const int& dataBegin, const int& ni);
+
+    void partialClear(void) ;  //! clear heavy sized attibutes
+
+  protected:
+    void createGlobalIndex();
+    void readDistributionInfo(CGrid* grid);
+    void readDistributionInfo(const std::vector<CDomain*>& domList,
+                              const std::vector<CAxis*>& axisList,
+                              const std::vector<CScalar*>& scalarList,
+                              const CArray<int,1>& axisDomainOrder);
+  private:
+    //! Create local index of a domain
+    void createLocalDomainDataIndex();
+
+    //! Create local index of an axis
+    void createLocalAxisDataIndex();
+
+    //! Create local index of a scalar
+    void createLocalScalarDataIndex();
+
+    template<int N>
+    void readGridMaskInfo(const CArray<bool,N>& gridMask);
+
+  private:
+    //!< LocalData index on client
+    GlobalLocalDataMap globalLocalDataSendToServerMap_;
+    GlobalLocalDataMap globalDataIndex_;
+
+    /*! Array holding masked data indexes.
+     * It includes:
+     *  masking on data (data_i/j_index or data_ni/nj and data_ibegin)
+     *  masking on grid elements (domains, axes or scalars)
+     * It DOES NOT include grid mask.
+     * The array size defines the data size entering the workflow. It is used by source filter of client or server1.
+    */
+    std::vector<int> localDataIndex_;
+
+    /*! Array holding grid mask. If grid mask is not defined, its size is zero.
+     * It is used by source filter of client for replacing unmasked data by NaN.
+    */
+    std::vector<bool> localMaskIndex_;
+
+    std::vector<int> localMaskedDataIndex_;
+
+  private:
+    /*! Domains and axis are considered elements.
+     * A grid composed of 1 domain and 1 axis has 2 elements */
+    int numElement_;
+    CArray<int,1> axisDomainOrder_; //!< Order of axis and domain of a grid
+
+    std::vector<int> nLocal_; //!< Local size of each dimension (ni, nj, etc, ...)
+    std::vector<int> nGlob_; //!< Global size of each dimension (e.x: ni_glo, nj_glo, etc, ...)
+    std::vector<int> nBeginLocal_;//!< Begin index of each dimension (e.x: for domain, it's always 0, for axis, it's zoom_begin, ...)
+    std::vector<int> nBeginGlobal_; //!< Begin index of each dimension (e.x: ibegin, jbegin, ...)
+
+    // Data_n_index of domain or axis (For now, axis uses its size as data_n_index
+    std::vector<int> dataNIndex_; //!< Data_n_index in case of domain
+    std::vector<int> dataDims_; //!< Data_dim, domain can have data_dim == 1 or 2
+    std::vector<int> dataBegin_; //!< Data begin (data_ibegin, data_jbegin, etc)
+    std::vector<CArray<int,1> > dataIndex_; //!< Data index
+    std::vector<CArray<int,1> > infoIndex_; //!< i_index, j_index
+
+    std::vector<int> indexMap_; //!< Mapping element index to dimension index
+    std::vector<CArray<int,1> > elementLocalIndex_;  //!< Local index of each element
+    std::vector<CArray<size_t,1> > elementGlobalIndex_; //!< Global index of each element
+    std::vector<CArray<bool,1> > elementIndexData_; //!< // The correct index of a domain has true value, the ghost one has false value
+    std::vector<size_t> elementNLocal_;
+    std::vector<size_t> elementNGlobal_;
+
+    //!< (Only for grid with one axis or scalar)Flag to determine whether data is distributed or not
+    bool isDataDistributed_;
+    int axisNum_;
+    int domainNum_;
+    bool isComputed_;
+
+  private:
+    // Just suppose that grid mask has 3 dimension. Need change
+    CArray<bool,1> gridMask_; //!< Mask of grid
+
+  private:
+    CDistributionClient(const CDistributionClient& distClient); //! Not implement
+};
+
+/*!
+  A grid can have multiple dimension, so can its mask in the form of multi-dimension array.
+It's not a good idea to store all multi-dimension arrays corresponding to each mask.
+One of the ways is to convert this array into 1-dimension one and every process is taken place on it.
+  \param [in] multi-dimension array grid mask
+*/
+template<int N>
+void CDistributionClient::readGridMaskInfo(const CArray<bool,N>& gridMask)
+{
+  int dim = gridMask.dimensions();
+  std::vector<int> dimensionSizes(dim);
+  for (int i = 0; i < dim; ++i) dimensionSizes[i] = gridMask.extent(i);
+
+  std::vector<int> idxLoop(dim,0);
+  int ssize = gridMask.numElements(), idx = 0;
+  gridMask_.resize(ssize);
+  while (idx < ssize)
+  {
+    for (int i = 0; i < dim-1; ++i)
+    {
+      if (idxLoop[i] == dimensionSizes[i])
+      {
+        idxLoop[i] = 0;
+        ++idxLoop[i+1];
+      }
+    }
+
+    int maskIndex = idxLoop[0];
+    int mulDim = 1;
+    for (int k = 1; k < dim; ++k)
+    {
+      mulDim *= dimensionSizes[k-1];
+      maskIndex += idxLoop[k]*mulDim;
+    }
+    gridMask_(maskIndex) = *(gridMask.dataFirst()+maskIndex);
+
+    ++idxLoop[0];
+    ++idx;
+  }
+}
+
+} // namespace xios
+#endif // __XIOS_DISTRIBUTIONCLIENT_HPP__
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/distribution_server.cpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/distribution_server.cpp	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/distribution_server.cpp	(revision 1749)
@@ -0,0 +1,223 @@
+/*!
+   \file distribution_server.cpp
+   \author Ha NGUYEN
+   \since 13 Jan 2015
+   \date 10 Sep 2016
+
+   \brief Index distribution on server side.
+ */
+#include "distribution_server.hpp"
+#include "utils.hpp"
+
+namespace xios {
+
+CDistributionServer::CDistributionServer(int rank, const std::vector<int>& nBegin,
+                                         const std::vector<int>& nSize,
+                                         const std::vector<int>& nBeginGlobal,
+                                         const std::vector<int>& nGlobal)
+  : CDistribution(rank, nGlobal.size()), nGlobal_(nGlobal), nBeginGlobal_(nBeginGlobal),
+    nSize_(nSize), nBegin_(nBegin), globalLocalIndexMap_()
+{
+  createGlobalIndex();
+}
+
+CDistributionServer::CDistributionServer(int rank,
+                                        const std::vector<CArray<int,1> >& globalIndexElements,
+                                        const CArray<int,1>& elementOrder,
+                                        const std::vector<int>& nBegin,
+                                        const std::vector<int>& nSize,
+                                        const std::vector<int>& nBeginGlobal,
+                                        const std::vector<int>& nGlobal)
+  : CDistribution(rank, nGlobal.size()), nGlobal_(nGlobal), nBeginGlobal_(nBeginGlobal),
+    nSize_(nSize), nBegin_(nBegin), globalLocalIndexMap_()
+{
+  createGlobalIndex(globalIndexElements, elementOrder);
+}
+
+CDistributionServer::~CDistributionServer()
+{
+}
+
+/*!
+  Create global index on server side
+  Like the similar function on client side, this function serves on creating global index
+for data written by the server. The global index is used to calculating local index of data
+written on each server
+*/
+void CDistributionServer::createGlobalIndex()
+{
+  size_t idx = 0, ssize = 1;
+  for (int i = 0; i < nSize_.size(); ++i) ssize *= nSize_[i];
+
+  this->globalIndex_.resize(ssize);
+  std::vector<int> idxLoop(this->getDims(),0);
+  std::vector<int> currentIndex(this->getDims());
+  int innerLoopSize = nSize_[0];
+
+  globalLocalIndexMap_.rehash(std::ceil(ssize/globalLocalIndexMap_.max_load_factor()));
+  while (idx<ssize)
+  {
+    for (int i = 0; i < this->dims_-1; ++i)
+    {
+      if (idxLoop[i] == nSize_[i])
+      {
+        idxLoop[i] = 0;
+        ++idxLoop[i+1];
+      }
+    }
+
+    for (int i = 1; i < this->dims_; ++i)  currentIndex[i] = idxLoop[i] + nBegin_[i];
+
+    size_t mulDim, globalIndex;
+    for (int i = 0; i < innerLoopSize; ++i)
+    {
+      mulDim = 1;
+      globalIndex = i + nBegin_[0];
+
+      for (int k = 1; k < this->dims_; ++k)
+      {
+        mulDim *= nGlobal_[k-1];
+        globalIndex += (currentIndex[k])*mulDim;
+      }
+      globalLocalIndexMap_[globalIndex] = idx;
+      this->globalIndex_(idx) = globalIndex;
+
+      ++idx;
+    }
+    idxLoop[0] += innerLoopSize;
+  }
+}
+
+/*!
+  Create global index on server side
+  Like the similar function on client side, this function serves on creating global index
+for data written by the server. The global index is used to calculating local index of data
+written on each server
+  \param[in] globalIndexElement global index on server side of each element of grid (scalar, axis, domain)
+  \param[in] elementOrder the order of elements of grid (e.x: domain->axis or domain->scalar)
+*/
+void CDistributionServer::createGlobalIndex(const std::vector<CArray<int,1> >& globalIndexElements,
+                                            const CArray<int,1>& elementOrder)
+{
+  int numElement = elementOrder.numElements(), elementIdx = 0;  
+  std::vector<int> indexMap(numElement);
+  for (int i = 0; i < numElement; ++i)
+  {
+    indexMap[i] = elementIdx;
+    if (2 == elementOrder(i))
+    {      
+      elementIdx += 2;
+    }
+    else
+      ++elementIdx;
+  }
+
+  std::vector<size_t> elementGlobalSize(numElement);
+  size_t globalSize = 1;
+  for (int i = 0; i < numElement; ++i)
+  {
+    int elementType = elementOrder(i);
+    elementGlobalSize[i] = globalSize;
+    if (2 == elementType) // domain
+    {
+      globalSize *= nGlobal_[indexMap[i]+1] * nGlobal_[indexMap[i]];
+    }
+    else // axis or scalar
+    {
+      globalSize *= nGlobal_[indexMap[i]];
+    }
+  } 
+
+  size_t ssize = 1;
+  for (int i = 0; i < globalIndexElements.size(); ++i) ssize *= globalIndexElements[i].numElements();
+  this->globalIndex_.resize(ssize);
+  globalLocalIndexMap_.rehash(std::ceil(ssize/globalLocalIndexMap_.max_load_factor()));
+
+  std::vector<int> idxLoop(numElement,0);
+  std::vector<int> currentIndex(numElement);
+  int innerLoopSize = globalIndexElements[0].numElements();
+
+  size_t idx = 0;
+  while (idx<ssize)
+  {
+    for (int i = 0; i < numElement-1; ++i)
+    {
+      if (idxLoop[i] == globalIndexElements[i].numElements())
+      {
+        idxLoop[i] = 0;
+        ++idxLoop[i+1];
+      }
+    }
+
+    for (int i = 1; i < numElement; ++i)  currentIndex[i] = globalIndexElements[i](idxLoop[i]);
+
+    size_t mulDim, globalIndex;
+    for (int i = 0; i < innerLoopSize; ++i)
+    {      
+      globalIndex = 0;
+      currentIndex[0] = globalIndexElements[0](i);
+
+      for (int k = 0; k < numElement; ++k)
+      {     
+        globalIndex += (currentIndex[k])*elementGlobalSize[k];
+      }
+      globalLocalIndexMap_[globalIndex] = idx;
+      this->globalIndex_(idx) = globalIndex;
+      ++idx;
+    }
+    idxLoop[0] += innerLoopSize;
+  }
+}
+
+/*!
+  Compute local index for writing data on server
+  \param [in] globalIndex Global index received from client
+*/
+void CDistributionServer::computeLocalIndex(CArray<size_t,1>& globalIndex)
+{
+  size_t ssize = globalIndex.numElements();
+  size_t localIndexSize = std::min(globalIndex_.numElements(), ssize);
+  CArray<size_t,1> localIndex(localIndexSize);
+  GlobalLocalMap::const_iterator ite = globalLocalIndexMap_.end(), it;
+  int i = 0;
+  for (size_t idx = 0; idx < ssize; ++idx)
+  {
+    it = globalLocalIndexMap_.find(globalIndex(idx));
+    if (ite != it)
+    {
+      localIndex(i) = it->second;
+      ++i;
+    }
+  }
+
+  globalIndex.reference(localIndex);
+}
+
+/*!
+  Transforms local indexes owned by the server into global indexes
+  \param [in/out] indexes on input, local indexes of the server,
+                          on output, the corresponding global indexes
+*/
+void CDistributionServer::computeGlobalIndex(CArray<int,1>& indexes) const
+{
+  for (int i = 0; i < indexes.numElements(); ++i)
+  {
+    indexes(i) = globalIndex_(indexes(i));
+  }
+}
+
+/*!
+  Get the size of grid index in server (e.x: sizeGrid *= size of each dimensiion)
+*/
+int CDistributionServer::getGridSize() const
+{
+   return globalLocalIndexMap_.size();
+}
+
+void CDistributionServer::partialClear(void)
+{
+  GlobalLocalMap void1 ;
+  globalLocalIndexMap_.swap(void1) ;
+}
+  
+} // namespace xios
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/distribution_server.hpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/distribution_server.hpp	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/distribution_server.hpp	(revision 1749)
@@ -0,0 +1,68 @@
+/*!
+   \file distribution_server.hpp
+   \author Ha NGUYEN
+   \since 13 Jan 2015
+   \date 04 Feb 2015
+
+   \brief Index distribution on server side.
+ */
+
+#ifndef __XIOS_DISTRIBUTION_SERVER_HPP__
+#define __XIOS_DISTRIBUTION_SERVER_HPP__
+
+#include "distribution.hpp"
+
+namespace xios {
+
+/*!
+  \class CDistributionServer
+  The class, for now, plays a role of computing local index for writing data on server
+*/
+class CDistributionServer : public CDistribution
+{
+  public:
+    /** Default constructor */
+    CDistributionServer(int rank, int dims, const CArray<size_t,1>& globalIndex = CArray<size_t,1>());
+    CDistributionServer(int rank, const std::vector<int>& nBeginServer,
+                        const std::vector<int>& nSizeServer, const std::vector<int>& nGlobal);
+    CDistributionServer(int rank, const std::vector<int>& nBeginServer,
+                        const std::vector<int>& nSizeServer,
+                        const std::vector<int>& nBeginGlobal,
+                        const std::vector<int>& nGlobal);
+
+    CDistributionServer(int rank,
+                        const std::vector<CArray<int,1> >& globalIndexElements,
+                        const CArray<int,1>& elementOrder,
+                        const std::vector<int>& nBeginServer,
+                        const std::vector<int>& nSizeServer,
+                        const std::vector<int>& nBeginGlobal,
+                        const std::vector<int>& nGlobal);
+
+    /** Default destructor */
+    virtual ~CDistributionServer();
+
+    const GlobalLocalMap& getGlobalLocalIndex() const { return globalLocalIndexMap_; }    
+    int getGridSize() const;
+    
+    virtual void computeLocalIndex(CArray<size_t,1>& globalIndex);
+    virtual void computeGlobalIndex(CArray<int,1>& indexes) const;
+    virtual void partialClear(void); //! clear heavy sized attibutes
+
+  protected:
+    virtual void createGlobalIndex();
+    void createGlobalIndex(const std::vector<CArray<int,1> >& globalIndexElements,
+                           const CArray<int,1>& elementOrder);
+    
+  protected:
+    GlobalLocalMap globalLocalIndexMap_;
+
+  private:
+    std::vector<int> nGlobal_;
+    std::vector<int> nBeginGlobal_;
+    std::vector<int> nSize_;
+    std::vector<int> nBegin_;
+
+};
+
+} // namespace xios
+#endif // __XIOS_DISTRIBUTION_SERVER_HPP__
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/duration.cpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/duration.cpp	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/duration.cpp	(revision 1749)
@@ -0,0 +1,187 @@
+#include "duration.hpp"
+#include "date.hpp"
+#include "calendar.hpp"
+#include "calendar_util.hpp"
+
+namespace xios
+{
+      /// ////////////////////// DÃ©finitions ////////////////////// ///
+
+      const CDuration Year     ( 1.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 );
+      const CDuration Month    ( 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 0.0 );
+      const CDuration Week     ( 0.0, 0.0, 7.0, 0.0, 0.0, 0.0, 0.0 );
+      const CDuration Day      ( 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0 );
+      const CDuration Hour     ( 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0 );
+      const CDuration Minute   ( 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0 );
+      const CDuration Second   ( 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0 );
+      const CDuration TimeStep ( 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0 );
+      const CDuration NoneDu   ( 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 );
+
+      ///---------------------------------------------------------------
+
+      CDuration::CDuration(double y, double m, double d, double h, double min, double s, double ts) :
+      year(y), month(m), day(d), hour(h), minute(min), second(s), timestep(ts)
+      {
+      }
+
+      ///---------------------------------------------------------------
+
+      CDuration& CDuration::operator=(const CDuration& duration)
+      {
+        year = duration.year; month  = duration.month;  day    = duration.day;
+        hour = duration.hour; minute = duration.minute; second = duration.second; timestep = duration.timestep;
+        return *this;
+      }
+
+      /*!
+        This operation may not serve much, it's here because of the need of operator== from generic class CType<T>
+      */
+      bool CDuration::operator==(const CDuration& duration)
+      {
+        return (year == duration.year && month  == duration.month  && day == duration.day &&
+                hour == duration.hour && minute == duration.minute && second == duration.second && timestep == duration.timestep);        
+      }
+
+      StdOStream& operator<<(StdOStream& out, const CDuration& duration)
+      {
+         out << duration.toString();
+         return out;
+      }
+
+      StdIStream& operator>>(StdIStream& in , CDuration& duration)
+      {
+        duration = NoneDu;
+        double v = 1.0;
+        char   c = '/';
+        bool   invalidUnit = false;
+        CDuration sentinel = NoneDu;
+
+#define setDuration(unit, value)                                                  \
+        {                                                                         \
+          if (sentinel.unit)                                                      \
+            ERROR("StdIStream& operator>>(StdIStream& in , CDuration& duration)", \
+                  << "Bad duration format: " #unit " has already been set.");      \
+                                                                                  \
+          duration.unit = value;                                                  \
+          sentinel.unit = 1.0;                                                    \
+        }
+
+        do
+        {
+          in >> v >> c;
+          if (in.fail())
+            ERROR("StdIStream& operator>>(StdIStream& in , CDuration& duration)",
+                  << "Bad duration format: impossible to read a pair (value, unit).");
+
+          switch (c)
+          {
+            case 'y': setDuration(year, v) break;
+            case 'd': setDuration(day, v) break;
+            case 'h': setDuration(hour, v) break;
+            case 's': setDuration(second, v) break;
+            case 'm':
+            {
+              in >> c;
+              if      (c == 'i') setDuration(minute, v)
+              else if (c == 'o') setDuration(month, v)
+              else invalidUnit = true;
+              break;
+            }
+            case 't':
+            {
+              in >> c;
+              if (c == 's') setDuration(timestep, v)
+              else invalidUnit = true;
+              break;
+            }
+            default:
+              invalidUnit = true;
+              break;
+          }
+
+          if (invalidUnit)
+            ERROR("StdIStream& operator>>(StdIStream& in , CDuration& duration)",
+                  << "Bad duration format: invalid unit, unexpected '" << c << "' character.");
+        } while (in.peek() != EOF); // check whether there is a next character to read
+
+#undef setDuration
+
+        return in;
+      }
+
+      //-----------------------------------------------------------------
+
+      bool CDuration::isNone(void) const
+      {
+        return (*this == NoneDu);
+      }
+
+      //-----------------------------------------------------------------
+
+      CDuration& CDuration::solveTimeStep(const CCalendar& c)
+      {
+        CDuration timeStep = c.getTimeStep();
+        second += timestep * timeStep.second;
+        minute += timestep * timeStep.minute;
+        hour   += timestep * timeStep.hour;
+        day    += timestep * timeStep.day;
+        month  += timestep * timeStep.month;
+        year   += timestep * timeStep.year;
+        timestep = 0.0;
+        return *this;
+      }
+
+      CDuration& CDuration::resolve(const CCalendar& c, bool noNegativeTime /*= false*/)
+      {
+        return c.resolve(*this, noNegativeTime);
+      }
+
+      //-----------------------------------------------------------------
+
+      StdString CDuration::toString(void) const
+      {
+        StdOStringStream sout;
+        bool forceOutput = true;
+
+        if (year   != 0.0) { forceOutput = false; sout << year   << "y "; }
+        if (month  != 0.0) { forceOutput = false; sout << month  << "mo "; }
+        if (day    != 0.0) { forceOutput = false; sout << day    << "d "; }
+        if (hour   != 0.0) { forceOutput = false; sout << hour   << "h "; }
+        if (minute != 0.0) { forceOutput = false; sout << minute << "mi "; }
+        if (second != 0.0) { forceOutput = false; sout << second << "s "; }
+        if (timestep != 0.0 || forceOutput)     { sout << timestep << "ts "; }
+
+         // Remove the trailing space
+        StdString strOut = sout.str();
+        return strOut.erase(strOut.size() - 1);
+      }
+
+      StdString CDuration::toStringUDUnits(void) const
+      {
+         if (timestep != 0.0)
+           ERROR("StdString CDuration::toStringUDUnits(void) const",
+                 "Impossible to convert a duration to string using UDUnits when a timestep is set.");
+
+         StdOStringStream sout;
+         bool forceOutput = true;
+
+         if (year   != 0.0) { forceOutput = false; sout << year   << " yr "; }
+         if (month  != 0.0) { forceOutput = false; sout << month  << " month "; }
+         if (day    != 0.0) { forceOutput = false; sout << day    << " d "; }
+         if (hour   != 0.0) { forceOutput = false; sout << hour   << " h "; }
+         if (minute != 0.0) { forceOutput = false; sout << minute << " min "; }
+         if (second != 0.0 || forceOutput)       { sout << second << " s "; }
+
+         // Remove the trailing space
+         StdString strOut = sout.str();
+         return strOut.erase(strOut.size() - 1);
+      }
+
+      CDuration CDuration::FromString(const StdString& str)
+      {
+        CDuration dr = NoneDu;
+        StdIStringStream iss(str); iss >> dr;
+        return dr;
+      }
+} // namespace xios
+
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/duration.hpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/duration.hpp	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/duration.hpp	(revision 1749)
@@ -0,0 +1,51 @@
+#ifndef __XIOS_CDuration__
+#define __XIOS_CDuration__
+
+/// XIOS headers ///
+#include "xios_spl.hpp"
+#include "exception.hpp"
+
+namespace xios
+{
+      /// ////////////////////// DÃ©clarations ////////////////////// ///
+      typedef long long int Time;
+      class CCalendar;
+
+      ///---------------------------------------------------------------
+
+      struct CDuration
+      {
+         public: /* static */
+            static CDuration FromString(const StdString& str);
+
+         public:
+            CDuration(double year=0.0, double month=0.0, double day=0.0, double hour=0.0, double minute=0.0, double second=0.0, double timestep=0.0);
+
+            /// OpÃ©rateurs ///
+            CDuration& operator=(const CDuration& duration);
+            bool operator==(const CDuration& duration);
+
+            friend StdOStream& operator<<(StdOStream& out, const CDuration& duration);
+            friend StdIStream& operator>>(StdIStream& in , CDuration& duration);
+
+            /// Test ///
+            bool isNone(void) const;
+
+            /// Traitement ///
+            CDuration& resolve(const CCalendar& calendar, bool noNegativeTime = false);
+            CDuration& solveTimeStep(const CCalendar& c);
+            /// Autres ///
+            StdString toString(void) const;
+            StdString toStringUDUnits(void) const;
+
+            /// PropriÃ©tÃ©s publiques ///
+            double year, month, day, hour, minute, second, timestep;
+      };
+
+      ///---------------------------------------------------------------
+
+      const extern CDuration Year, Month,  Week,   Day,
+                             Hour, Minute, Second, TimeStep, NoneDu;
+} // namespace xios
+
+#endif // __XIOS_CDuration__
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/event_client.cpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/event_client.cpp	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/event_client.cpp	(revision 1749)
@@ -0,0 +1,58 @@
+#include "xios_spl.hpp"
+#include "event_client.hpp"
+#include "buffer_out.hpp"
+#include "message.hpp"
+#include "type.hpp"
+#include "mpi.hpp"
+#include "cxios.hpp"
+
+namespace xios
+{
+   const size_t CEventClient::headerSize = sizeof(int) + sizeof(size_t) + sizeof(int) + sizeof(int) + sizeof(int); // The two last one signify sizeof(classId) and sizeof(typeId)
+
+
+   CEventClient::CEventClient(int classId_, int typeId_)
+   {
+     classId = classId_;
+     typeId = typeId_;
+   }
+
+   void CEventClient::push(int rank, int nbSender, CMessage& msg)
+   {
+     nbSenders.push_back(nbSender);
+     ranks.push_back(rank);
+     messages.push_back(&msg);
+   }
+
+   bool CEventClient::isEmpty(void)
+   {
+     return ranks.empty();
+   }
+
+   std::list<int> CEventClient::getRanks(void)
+   {
+     return ranks;
+   }
+
+   std::list<int> CEventClient::getSizes(void)
+   {
+     std::list<CMessage*>::iterator it;
+     std::list<int> sizes;
+
+     for (it = messages.begin(); it != messages.end(); ++it) sizes.push_back((*it)->size() + headerSize);
+     return sizes;
+   }
+
+   void CEventClient::send(size_t timeLine, const std::list<int>& sizes, std::list<CBufferOut*>& buffers)
+   {
+     std::list<CBufferOut*>::iterator itBuff = buffers.begin();
+     std::list<int>::const_iterator itSizes = sizes.begin(), itSenders = nbSenders.begin();
+     std::list<CMessage*>::iterator itMsg = messages.begin();
+
+     if (CXios::checkEventSync) info(100)<<"Send event "<<timeLine<<" classId : "<<classId<<"  typeId : "<<typeId<<endl ;
+     for (; itBuff != buffers.end(); ++itBuff, ++itSizes, ++itSenders, ++itMsg)
+     {
+       **itBuff << *itSizes << timeLine << *itSenders << classId << typeId << **itMsg;
+     }
+   }
+}
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/event_client.hpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/event_client.hpp	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/event_client.hpp	(revision 1749)
@@ -0,0 +1,35 @@
+#ifndef __EVENT_CLIENT_HPP__
+#define __EVENT_CLIENT_HPP__
+
+#include "xios_spl.hpp"
+#include "buffer_out.hpp"
+#include "message.hpp"
+
+namespace xios
+{
+  class CEventClient
+  {
+    public:
+      static const size_t headerSize;
+
+      CEventClient(int classId, int typeId);
+
+      void push(int rank, int nbSender, CMessage& msg);
+      void send(size_t timeLine, const std::list<int>& sizes, std::list<CBufferOut*>&); 
+
+      bool isEmpty(void);
+      std::list<int> getRanks(void);
+      std::list<int> getSizes(void);
+      int getClassId(void) { return classId; }
+      int getTypeId(void) { return typeId; }
+      
+    private:
+      int classId;
+      int typeId;
+      std::list<int> ranks;
+      std::list<int> nbSenders;
+      std::list<CMessage*> messages;
+  };
+}
+
+#endif
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/event_scheduler.cpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/event_scheduler.cpp	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/event_scheduler.cpp	(revision 1749)
@@ -0,0 +1,259 @@
+#include "event_scheduler.hpp"
+#include "xios_spl.hpp"
+#include "mpi.hpp"
+#include "tracer.hpp"
+
+namespace xios
+{
+ 
+ 
+  CEventScheduler::CEventScheduler(const MPI_Comm& comm) 
+  {
+    MPI_Comm_dup(comm, &communicator) ;
+    MPI_Comm_size(communicator,&mpiSize) ;
+    MPI_Comm_rank(communicator,&mpiRank);
+
+
+    int maxChild=1 ;
+
+    int m ;
+    do
+    {
+      m=1 ;
+      maxChild=maxChild+1 ;
+      for(int i=0;i<maxChild;i++) m=m*maxChild ;
+     } while(m<mpiSize) ;
+    
+    
+    int maxLevel=0 ;
+    for(int size=1; size<=mpiSize; size*=maxChild) maxLevel++ ; 
+
+    int begin, end, nb ;
+    int pos, n ;
+ 
+    parent=vector<int>(maxLevel+1) ;
+    child=vector<vector<int> >(maxLevel+1,vector<int>(maxChild)) ;
+    nbChild=vector<int> (maxLevel+1) ;
+   
+    level=0 ;
+    begin=0 ;
+    end=mpiSize-1 ;     
+    nb=end-begin+1 ;
+     
+    do
+    {
+      n=0 ;
+      pos=begin ;
+      nbChild[level]=0 ;
+      parent[level+1]=begin ;
+      for(int i=0;i<maxChild && i<nb ;i++)
+      {
+        if (i<nb%maxChild) n = nb/maxChild + 1 ;
+        else n = nb/maxChild ;
+      
+        if (mpiRank>=pos && mpiRank<pos+n)
+        {
+          begin=pos ;
+          end=pos+n-1 ;
+        }
+        child[level][i]=pos ;
+        pos=pos+n ;
+        nbChild[level]++ ;
+      } 
+      nb=end-begin+1 ;
+      level=level+1 ;
+    } while (nb>1) ;
+
+    
+  }
+
+  CEventScheduler::~CEventScheduler()
+  {
+
+  } 
+
+  void CEventScheduler::registerEvent(const size_t timeLine, const size_t contextHashId)
+  {
+    registerEvent(timeLine, contextHashId, level) ;
+  }
+  
+  void CEventScheduler::registerEvent(const size_t timeLine, const size_t contextHashId, const size_t lev)
+  {
+       
+    traceOff() ;
+    SPendingRequest* sentRequest=new SPendingRequest ;
+    sentRequest->buffer[0]=timeLine ;
+    sentRequest->buffer[1]=contextHashId ;
+    sentRequest->buffer[2]=lev-1 ;
+
+    pendingSentParentRequest.push(sentRequest) ;
+    MPI_Isend(sentRequest->buffer,3, MPI_UNSIGNED_LONG, parent[lev], 0, communicator, &sentRequest->request) ;
+    traceOn() ;
+  } 
+
+  bool CEventScheduler::queryEvent(const size_t timeLine, const size_t contextHashId)
+  {
+
+    if (! eventStack.empty() && eventStack.front().first==timeLine && eventStack.front().second==contextHashId)
+    {
+      eventStack.pop() ;
+      return true ;
+    }
+    else return false ; 
+  } 
+  
+  void CEventScheduler::checkEvent(void)
+  {
+    traceOff() ;
+    checkChildRequest() ;
+    checkParentRequest() ;
+    traceOn() ;
+    
+  }
+  
+  void CEventScheduler::checkParentRequest(void)
+  {
+    int completed ;
+    MPI_Status status ;
+    int received ;
+    SPendingRequest* recvRequest ;
+    completed=true ;
+    
+    // check sent request to parent
+    while (! pendingSentParentRequest.empty() && completed)
+    {
+      MPI_Test( & pendingSentParentRequest.front()->request, &completed, &status) ;
+      if (completed) 
+      {
+        delete pendingSentParentRequest.front() ;
+        pendingSentParentRequest.pop() ;
+      }
+    }
+    
+    // probe if a message is coming from parent
+    received=true ;
+    while(received)
+    {
+      MPI_Iprobe(MPI_ANY_SOURCE,1,communicator,&received, &status) ;
+      if (received)
+      {
+        recvRequest=new SPendingRequest ;
+        MPI_Irecv(recvRequest->buffer, 3, MPI_UNSIGNED_LONG, MPI_ANY_SOURCE, 1, communicator, &(recvRequest->request)) ;
+        pendingRecvParentRequest.push(recvRequest) ;
+      }
+    }
+    
+     // check sent request from parent
+    completed=true ;
+    while (! pendingRecvParentRequest.empty() && completed)
+    {
+      recvRequest=pendingRecvParentRequest.front() ;
+      MPI_Test( &(recvRequest->request), &completed, &status) ;
+      if (completed) 
+      {
+        size_t timeLine=recvRequest->buffer[0] ;
+        size_t hashId=recvRequest->buffer[1] ;
+        size_t lev=recvRequest->buffer[2] ;
+        delete recvRequest ;
+        pendingRecvParentRequest.pop() ;       
+ 
+        if (lev==level) eventStack.push(pair<size_t,size_t>(timeLine,hashId)) ;
+        else  bcastEvent(timeLine, hashId, lev) ;
+      }
+    }   
+    
+  }
+
+  void CEventScheduler::checkChildRequest(void)
+  {
+// function call only by parent mpi process
+
+    MPI_Status status ; 
+    int received ;
+    received=true ;
+    SPendingRequest* recvRequest ;
+    
+    // check for posted requests and make the corresponding receive
+    while(received)
+    {
+      MPI_Iprobe(MPI_ANY_SOURCE,0,communicator,&received, &status) ;
+      if (received)
+      {
+        recvRequest=new SPendingRequest ;
+        MPI_Irecv(recvRequest->buffer, 3, MPI_UNSIGNED_LONG, MPI_ANY_SOURCE, 0, communicator, &recvRequest->request) ;
+        pendingRecvChildRequest.push_back(recvRequest) ;
+      }
+    }
+    
+    // check if receive request is achieved
+    
+    for(list<SPendingRequest*>::iterator it=pendingRecvChildRequest.begin(); it!=pendingRecvChildRequest.end() ; )
+    {
+      MPI_Test(&((*it)->request),&received,&status) ;
+      if (received)
+      {
+        size_t timeLine=(*it)->buffer[0] ;
+        size_t hashId=(*it)->buffer[1] ;
+        size_t lev=(*it)->buffer[2] ;
+        
+        SEvent event={timeLine,hashId,lev} ;
+        delete *it ; // free mem
+        it=pendingRecvChildRequest.erase(it) ; // get out of the list
+        
+        map< SEvent,int>::iterator itEvent=recvEvent.find(event) ;
+        if (itEvent==recvEvent.end()) 
+        {
+          itEvent=(recvEvent.insert(pair< SEvent ,int > (event,1))).first ;
+ 
+        }
+        else (itEvent->second)++ ;
+        if (itEvent->second==nbChild[lev])
+        {
+          if (lev==0)
+          {
+            bcastEvent(timeLine,hashId,lev) ;
+            recvEvent.erase(itEvent) ;
+          }
+          else
+          {
+            registerEvent( timeLine,hashId,lev) ;
+          }
+        }
+      }
+      else ++it ;
+    }
+    
+    // check if bcast request is achieved
+
+    for(list<SPendingRequest*>::iterator it=pendingSentChildRequest.begin(); it!=pendingSentChildRequest.end() ; )
+    {
+      MPI_Test(&(*it)->request,&received,&status) ;
+      if (received)
+      {
+        delete *it ;    // free memory
+        it = pendingSentChildRequest.erase(it) ;          // get out of the list
+
+      }
+      else ++it ;
+        
+    }
+  }
+  
+  void CEventScheduler::bcastEvent(const size_t timeLine, const size_t contextHashId, const size_t lev)
+  {
+    SPendingRequest* sentRequest ;
+     
+    
+    for(int i=0; i<nbChild[lev];i++)
+    {
+      sentRequest=new SPendingRequest ;
+      sentRequest->buffer[0]=timeLine ;
+      sentRequest->buffer[1]=contextHashId ;
+      sentRequest->buffer[2]=lev+1 ;
+      MPI_Isend(sentRequest->buffer,3, MPI_UNSIGNED_LONG, child[lev][i], 1, communicator, & sentRequest->request) ;
+      pendingSentChildRequest.push_back(sentRequest) ;
+    }
+  }
+   
+
+}
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/event_scheduler.hpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/event_scheduler.hpp	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/event_scheduler.hpp	(revision 1749)
@@ -0,0 +1,176 @@
+#ifndef __EVENT_SCHEDULER_HPP__
+#define __EVENT_SCHEDULER_HPP__
+
+#include "xios_spl.hpp"
+#include "mpi.hpp"
+
+namespace xios
+{
+
+    //!  Event scheduling class. An instance of this class is used to order the event providing from different context to avoid dead lock.
+    /*!
+     *   Event are ordered in a same context using the timeLine id, so each server will process the same event. But between different
+     *   context, events are not scheduled and servers may choose to process different events and deadlock or MPI crash may occurs if
+     *   collective MPI communication are involved by the events. 
+     *   This class solve the problem by scheduling the event and choose which event must be process by each server to insure correct
+     *   synchronisation. Information is send by asynchronous MPI communication to the root process that order the different events
+     *   (First In First Out) and brodcast the information to the other servers. To avoid to much incoming communication for the root
+     *   process, and hierachical tree is used for communicating from a limited number of child processes to the parent.  
+     */
+    
+    class CEventScheduler
+    {
+       public:
+       //!  Constructor
+       /*! A new communicator is created by duplicate comm. The communicating tree hierarchy is created.
+        *  @param[in] comm : MPI communicator du duplicate for internal use
+        */
+       CEventScheduler(const MPI_Comm& comm) ;
+
+
+       //! Destructor
+       ~CEventScheduler() ;
+
+
+
+       //! public interface for registring an event from the server
+       /*!
+        *  @param[in] timeLine : Time line id of the event
+        *  @param[in] contextHashId : Hashed id of the context
+        */
+       void registerEvent(const size_t timeLine, const size_t contextHashId) ;
+
+
+
+       //! public interface for query if the event defined by timeLine and hashId is sheduled next
+       /*!
+        *  @param[in] timeLine : Time line id of the event
+        *  @param[in] contextHasId : Hashed id of the context
+        *  @return  : boolean value, true is the event is scheduled next
+        *
+        *  If the event is scheduled next, it is remove from the `eventStack` queue list  
+        */    
+       bool queryEvent(const size_t timeLine, const size_t contextHashId) ;
+
+
+       //! Public interface to give the hand to the instance to check pending or incoming message.
+       /*!
+        * Must be called periodicaly. Call `checkParentRequest` and `checkChildRequest` private method.
+        */
+       void checkEvent(void) ;
+
+       private:
+
+
+       //! Send an event to the parent of level `lev+1`
+       /*!
+        *  @param[in] timeLine : Time line id of the event
+        *  @param[in] contextHasId : Hashed id of the context
+        *  @param[in] lev : actual level of the child in the hierarchy
+        *  The event is sent by an asynchrounous MPI_ISend
+        */
+       void registerEvent(const size_t timeLine, const size_t contextHashId, const size_t lev) ;
+
+
+
+       //! Children side. Check potential incoming message and if pending request are completed 
+       /*!
+        *  - Check by `MPI_Test` if pending request sent to parents are complete.
+        *  - Probe incoming message from parent by using `MPI_Probe`. If yes, post an asynchronous reception by `MPI_IRecv`
+        *  - Check by `MPI_Test` if pending received requests are complete. if yes :
+        *    + Broadcast the event to the childrens if is also a parent
+        *    + Otherwise : push the incomming event in the `eventStack` queue.
+        */
+       void checkParentRequest(void) ;
+
+
+
+       //! Parent side. Check potential incoming message and if pending request are completed
+       /*!
+        *  - Probe incoming message from chidren by using `MPI_Probe`. If yes, post an asynchronous reception by `MPI_IRecv`.
+        *  - Check pending received event request from children using `MPI_Probe`. If and event is received, it is incerted in the
+        *    map `recvEvent` which is increased by 1. If the number of request received from children for this event is equal to the number
+        *    of children then :
+        *    + if the event level is 0, bcast the event to the children.
+        *    + else send the event to the parent.
+        *  - Check pending sent event request to children using `MPI_TEST` and if complete release the corresponding buffer 
+        */
+       void checkChildRequest(void) ;
+
+
+
+       //! Parent side. Broadcast a received event from the parent to the children.
+       /*!
+        *  @param[in] timeLine : Time line id of the event
+        *  @param[in] contextHasId : Hashed id of the context
+        *  @param[in] lev : actual level of the child in the hierarchy
+        * Asynchronus MPI_ISend is used.
+        */
+       void bcastEvent(const size_t timeLine, const size_t contextHashId, const size_t lev) ;
+       
+
+
+
+       //! Structure defining an event, composed of the timeLine, the context hashId and the hierachical level of the communication.
+       struct SEvent
+       {
+         size_t timeLine ; /*!< Time line id of the event in the context */
+         size_t hashId ; /*!< hassh id of the context */
+         size_t level ;  /*!<hierarchical level of the communication*/
+
+         //! Definition of the == operator : needed to order the object in a map container
+         /*!
+            @param[in] e : object to compare with
+            @return : boolean result of the comparison
+         */
+         bool operator==(const SEvent& e) const
+         { 
+           if (timeLine == e.timeLine && hashId == e.hashId && level==e.level) return true ;
+           else return false ;
+         } ;
+        
+
+         //! Definition of the < operator : needed to order the object in a map container
+         /*!
+            @param[in] e : object to compare with
+            @return : boolean result of the comparison
+         */
+
+         bool operator<(const SEvent& e) const
+         { 
+           if (timeLine < e.timeLine) return true ;
+           else if (timeLine == e.timeLine && hashId < e.hashId) return true ;
+           else if (timeLine == e.timeLine && hashId == e.hashId && level<e.level) return true ;
+           else return false ;
+         } ;
+       } ;       
+        
+
+       //! Pending request struture. It keep send or receive buffer from asynchronous communication while the request is not complete.
+       struct SPendingRequest
+       {
+         size_t buffer[3] ;      /*!< communication buffer : timeLine, hashId, level */
+         MPI_Request request ;   /*!< pending MPI request */ 
+       } ;
+       
+       MPI_Comm communicator ;  /*!< Internal MPI communicator */ 
+       int mpiRank ;            /*!< Rank in the communicator */
+       int mpiSize ;            /*!< Size of the communicator */
+ 
+       queue< pair<size_t, size_t> > eventStack ;          
+       queue<SPendingRequest* > pendingSentParentRequest ;   /*!< Pending request sent to parent   */
+       queue<SPendingRequest*>  pendingRecvParentRequest ;   /*!< Pending request recv from parent */    
+       list<SPendingRequest* >  pendingRecvChildRequest ;    /*!< Pending request recv from child  */
+       list<SPendingRequest*>   pendingSentChildRequest ;    /*!< Pending request sent to child    */
+       map< SEvent, int > recvEvent ;                        /*!< list of event received from children. Contains the currnet number children that have already post the same event */
+       
+       
+       int level ;                   /*!< Number of hierachical level for communication */
+       vector<int> parent ;          /*!< Parent rank for each level */ 
+       vector<vector<int> >  child ; /*!< List of child rank for each level */
+       vector<int> nbChild ;         /*!< Number of child for each level */    
+
+    } ;
+}
+
+#endif
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/event_server.cpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/event_server.cpp	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/event_server.cpp	(revision 1749)
@@ -0,0 +1,61 @@
+#include "xios_spl.hpp"
+#include "buffer_in.hpp"
+#include "type.hpp"
+#include "event_server.hpp"
+#include "buffer_server.hpp"
+
+namespace xios
+{
+  void CEventServer::push(int rank, CServerBuffer* serverBuffer, char* startBuffer, int size)
+  {
+    CBufferIn buffer(startBuffer, size);
+    size_t timeLine;
+    int myClassId, myType, myNbSender;
+  
+    buffer >> size >> timeLine >> myNbSender >> myClassId >> myType;
+  
+    if (subEvents.empty())
+    {  
+      nbSender = myNbSender;
+      classId = myClassId;
+      type = myType;
+    }
+    else
+    {
+      if (classId != myClassId || type != myType || nbSender != myNbSender)
+        ERROR("void CEventServer::push(int rank, CServerBuffer* serverBuffer, char* startBuffer, int size)",
+              << "The callers of event " << timeLine << " are not coherent." << std::endl
+              << "Received subevent: classId = " << myClassId << ", type = " << myType << ", nbSender = " << myNbSender << std::endl
+              << "Expected subevent: classId = " << classId << ", type = " << type << ", nbSender = " << nbSender);
+    }
+
+    SSubEvent ev;
+    ev.rank = rank;
+    ev.serverBuffer = serverBuffer;
+    ev.buffer = new CBufferIn(buffer.ptr(), buffer.remain());
+    ev.size = size;  
+    subEvents.push_back(ev);
+  
+    if (subEvents.size() > nbSender)
+    {
+        ERROR("void CEventServer::push(int rank, CServerBuffer* serverBuffer, char* startBuffer, int size)",
+              << "The callers of event " << timeLine << " are not coherent." << std::endl
+              << "Too many subevents have been received (" << subEvents.size() << " instead of " << nbSender << ").");
+    }
+  }
+
+  bool CEventServer::isFull(void)  
+  {
+    return (nbSender == subEvents.size());
+  }
+
+  CEventServer::~CEventServer()
+  {
+    list<SSubEvent>::iterator it;
+    for (it = subEvents.begin(); it != subEvents.end(); it++)
+    {
+      it->serverBuffer->freeBuffer(it->size);
+      delete it->buffer;
+    }
+  }
+}
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/event_server.hpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/event_server.hpp	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/event_server.hpp	(revision 1749)
@@ -0,0 +1,38 @@
+#ifndef __EVENT_SERVER_HPP__
+#define __EVENT_SERVER_HPP__
+
+#include "xios_spl.hpp"
+#include "buffer_in.hpp"
+#include "buffer_server.hpp"
+
+namespace xios
+{
+
+  class CEventServer
+  {
+    public:
+    
+    int classId ;
+    int type ;
+    int nbSender ;
+
+
+    void push(int rank,CServerBuffer* serverBuffer ,char* startBuffer,int size) ;
+
+    struct SSubEvent
+    {
+      int rank ;
+      CServerBuffer* serverBuffer ;
+      CBufferIn*  buffer ;
+      int size ;
+    } ;
+    
+    list<SSubEvent> subEvents ;    
+    
+    bool isFull(void) ;
+    ~CEventServer() ; 
+  } ;
+
+}
+
+#endif
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/exception.cpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/exception.cpp	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/exception.cpp	(revision 1749)
@@ -0,0 +1,67 @@
+#include "exception.hpp"
+
+/// boost headers ///
+#include <boost/cast.hpp>
+#include "client.hpp"
+#include "server.hpp"
+#include "log.hpp"
+
+namespace xios
+{
+  /// ////////////////////// DÃ©finitions ////////////////////// ///
+   CException::CException(void)
+      : CObject(), desc_rethrow(true), stream()
+   { /* Ne rien faire de plus */ }
+
+   CException::CException(const std::string & id)
+      : CObject(id), desc_rethrow(true), stream()
+   { /* Ne rien faire de plus */ }
+
+   CException::CException(const CException & exception)
+//      : std::basic_ios<char>()
+       : CObject(exception.getId())
+//      , StdOStringStream()
+//      , desc_rethrow(false)
+   { (*this) << exception.str(); }
+
+   CException::~CException(void)
+   {
+//      if (desc_rethrow)
+//#ifdef __XIOS_NOABORT
+//      {
+//        throw (*this);
+//      }
+//#else
+//     {
+//      error << this->getMessage() << std::endl;
+//        throw 4;
+//      MPI_Abort(CXios::globalComm, -1); //abort();
+//      }
+//#endif
+   }
+
+   //---------------------------------------------------------------
+
+   std::string CException::getMessage(void) const
+   {
+//     StdOStringStream oss;
+//     oss << "> Error [" << this->getId() << "] : " << this->str();
+//     return (oss.str());
+     return (stream.str());
+   }
+
+   StdOStringStream &  CException::getStream(void)
+//   { return (*boost::polymorphic_cast<StdOStringStream*>(this)); }
+   { return stream; }
+
+   std::string CException::toString(void) const
+//   { return (std::string(this->getMessage())); }
+   { return stream.str(); }
+
+   void CException::fromString(const std::string & str)
+   { }
+//   { this->str(str); }
+
+   //---------------------------------------------------------------
+
+} // namespace xios
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/exception.hpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/exception.hpp	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/exception.hpp	(revision 1749)
@@ -0,0 +1,161 @@
+#ifndef __XIOS_CException__
+#define __XIOS_CException__
+
+/// XIOS headers ///
+#include "xios_spl.hpp"
+#include "object.hpp"
+#include <iomanip>
+#include <stdexcept>
+
+namespace xios
+{
+   /// ////////////////////// DÃ©clarations ////////////////////// ///
+
+   class CException
+      : private CObject, public StdOStringStream
+   {
+         typedef CObject SuperClass;
+
+      public :
+
+         /// Constructeurs ///
+         CException(void);
+         explicit CException(const StdString & id);
+         CException(const CException & exception);
+         CException(const CException * const exception); // Not implemented.
+
+         /// Accesseurs ///
+         StdString getMessage(void) const;
+         StdOStringStream & getStream(void);
+
+         /// Destructeur ///
+         virtual ~CException(void);
+
+         /// Autre ///
+         virtual StdString toString(void) const;
+         virtual void fromString(const StdString & str);
+
+         struct StackInfo
+         {
+           StdString file;
+           StdString function;
+           int line;
+           StdString info;
+         };
+
+         std::list<StackInfo> stack;
+
+      private :
+
+         /// PropriÃ©tÃ©s ///
+         bool desc_rethrow; // throw destructor
+         StdOStringStream stream;
+
+   }; // CException
+} // namespace xios
+
+/// //////////////////////////// Macros //////////////////////////// ///
+
+#define FILE_NAME (std::strrchr("/" __FILE__, '/') + 1)
+
+#define FUNCTION_NAME (StdString(BOOST_CURRENT_FUNCTION).length() > 100 ? \
+                       StdString(BOOST_CURRENT_FUNCTION).substr(0,100).append("...)") : BOOST_CURRENT_FUNCTION)
+
+#define INFO(x) \
+   "In file \""<< FILE_NAME <<"\", function \"" << BOOST_CURRENT_FUNCTION <<"\",  line " << __LINE__ << " -> " x << std::endl;
+
+#ifdef __XIOS_DEBUG
+#  define DEBUG(x) std::clog << "> Debug " << INFO(x)
+#else
+#  define DEBUG(x)
+#endif
+
+#define ERROR(id, x)  \
+{                     \
+       xios::CException exc(id);                \
+       exc.getStream() << INFO(x);              \
+       error << exc.getMessage() << std::endl;  \
+       throw exc;                               \
+}
+
+#ifdef __XIOS_EXCEPTION
+  #define TRY                          \
+    {                                  \
+      int funcFirstLine = __LINE__;    \
+      try
+  #define CATCH                              \
+      catch(CException& e)                   \
+      {                                      \
+        CException::StackInfo stk;           \
+        stk.file = FILE_NAME;                \
+        stk.function = FUNCTION_NAME;        \
+        stk.line = funcFirstLine;            \
+        e.stack.push_back(stk);              \
+        if (CXios::xiosStack)                \
+          throw;                             \
+       else                                  \
+         throw 0;                            \
+      }                                      \
+    }
+  #define CATCH_DUMP_ATTR                    \
+      catch(CException& e)                   \
+      {                                      \
+        CException::StackInfo stk;           \
+        stk.info.append(StdString("Object id=\"" + this->getId()) + "\" object type=\"" + this->getName() + "\"\n"); \
+        stk.info.append("*** XIOS attributes as defined in XML file(s) or via Fortran interface:\n");                \
+        stk.info.append("[" + this->dumpXiosAttributes() + "]\n");     \
+        stk.info.append("*** Additional information:\n");              \
+        stk.info.append("[" + this->dumpClassAttributes() + "]\n");    \
+        stk.file = FILE_NAME;                \
+        stk.function = FUNCTION_NAME;        \
+        stk.line = funcFirstLine;            \
+        e.stack.push_back(stk);              \
+        if (CXios::xiosStack)                \
+          throw;                             \
+       else                                  \
+         throw 0;                            \
+      }                                      \
+    }
+  #define CATCH_DUMP_STACK                                           \
+      catch(CException& e)                                           \
+      {                                                              \
+        CException::StackInfo stk;                                   \
+        int i = 1;                                                   \
+        stk.file = FILE_NAME;                                        \
+        stk.function = FUNCTION_NAME;                                \
+        stk.line = funcFirstLine;                                    \
+        e.stack.push_back(stk);                                      \
+        for (auto itr = e.stack.crbegin(); itr!=e.stack.crend(); ++itr) \
+        {                                                            \
+          error << "("<< i <<") **************** ";                  \
+          error << itr->function << std::endl;                       \
+          error << itr->info << std::endl;                           \
+          ++i;                                                       \
+        }                                                            \
+        error << left << "      ";                                   \
+        error << left << std::setw(40) << "File " ;                  \
+        error << left << std::setw(106) << "Function " ;             \
+        error << std::setw(5)   << "Line " << std::endl;             \
+        i = e.stack.size();                                          \
+        for (auto itr = e.stack.begin(); itr!=e.stack.end(); itr++)  \
+        {                                                            \
+          StdOStringStream tmp;                                      \
+          tmp <<  "("<< i <<")";                                     \
+          error << left << std::setw(6) << tmp.str();                \
+          error << left << std::setw(40)  << itr->file;              \
+          error << left << std::setw(106) << itr->function;          \
+          error << left << std::setw(5)   << itr->line << std::endl; \
+          --i;                                                       \
+        }                                                            \
+        throw;                                                       \
+      }                                                              \
+    }
+#else
+  #define TRY
+  #define CATCH
+  #define CATCH_DUMP_ATTR
+  #define CATCH_DUMP_STACK
+#endif
+
+#endif // __XIOS_CException__
+
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/filter/binary_arithmetic_filter.cpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/filter/binary_arithmetic_filter.cpp	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/filter/binary_arithmetic_filter.cpp	(revision 1749)
@@ -0,0 +1,66 @@
+#include "binary_arithmetic_filter.hpp"
+
+namespace xios
+{
+  CScalarFieldArithmeticFilter::CScalarFieldArithmeticFilter(CGarbageCollector& gc, const std::string& op, double value)
+    : CFilter(gc, 1, this)
+    , op(operatorExpr.getOpScalarField(op))
+    , value(value)
+  { /* Nothing to do */ };
+
+  CDataPacketPtr CScalarFieldArithmeticFilter::apply(std::vector<CDataPacketPtr> data)
+  {
+    CDataPacketPtr packet(new CDataPacket);
+    packet->date = data[0]->date;
+    packet->timestamp = data[0]->timestamp;
+    packet->status = data[0]->status;
+
+    if (packet->status == CDataPacket::NO_ERROR)
+      packet->data.reference(op(value, data[0]->data));
+
+    return packet;
+  }
+
+  CFieldScalarArithmeticFilter::CFieldScalarArithmeticFilter(CGarbageCollector& gc, const std::string& op, double value)
+    : CFilter(gc, 1, this)
+    , op(operatorExpr.getOpFieldScalar(op))
+    , value(value)
+  { /* Nothing to do */ };
+
+  CDataPacketPtr CFieldScalarArithmeticFilter::apply(std::vector<CDataPacketPtr> data)
+  {
+    CDataPacketPtr packet(new CDataPacket);
+    packet->date = data[0]->date;
+    packet->timestamp = data[0]->timestamp;
+    packet->status = data[0]->status;
+
+    if (packet->status == CDataPacket::NO_ERROR)
+      packet->data.reference(op(data[0]->data, value));
+
+    return packet;
+  }
+
+  CFieldFieldArithmeticFilter::CFieldFieldArithmeticFilter(CGarbageCollector& gc, const std::string& op)
+    : CFilter(gc, 2, this)
+    , op(operatorExpr.getOpFieldField(op))
+  { /* Nothing to do */ };
+
+  CDataPacketPtr CFieldFieldArithmeticFilter::apply(std::vector<CDataPacketPtr> data)
+  {
+    CDataPacketPtr packet(new CDataPacket);
+    packet->date = data[0]->date;
+    packet->timestamp = data[0]->timestamp;
+
+    if (data[0]->status != CDataPacket::NO_ERROR)
+      packet->status = data[0]->status;
+    else if (data[1]->status != CDataPacket::NO_ERROR)
+      packet->status = data[1]->status;
+    else
+    {
+      packet->status = CDataPacket::NO_ERROR;
+      packet->data.reference(op(data[0]->data, data[1]->data));
+    }
+
+    return packet;
+  }
+} // namespace xios
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/filter/binary_arithmetic_filter.hpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/filter/binary_arithmetic_filter.hpp	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/filter/binary_arithmetic_filter.hpp	(revision 1749)
@@ -0,0 +1,94 @@
+#ifndef __XIOS_CBinaryArithmeticFilter__
+#define __XIOS_CBinaryArithmeticFilter__
+
+#include "filter.hpp"
+#include <string>
+#include "operator_expr.hpp"
+#include <unordered_map>
+
+namespace xios
+{
+  /*!
+   * A generic binary arithmetic filter wrapping any type of binary scalar-field operator.
+   */
+  class CScalarFieldArithmeticFilter : public CFilter, public IFilterEngine
+  {
+    public:
+      /*!
+       * Constructs an binary scalar-field arithmetic filter wrapping the specified operator.
+       *
+       * \param gc the associated garbage collector
+       * \param op the string identifing the binary scalar-field operator
+       * \param value the scalar value
+       */
+      CScalarFieldArithmeticFilter(CGarbageCollector& gc, const std::string& op, double value);
+
+    protected:
+      COperatorExpr::functionScalarField op; //!< The binary scalar-field operator attached to the binary arithmeric filter
+      double value; //!< The scalar value associated with the binary arithmeric filter
+
+      /*!
+       * Applies the binary scalar-field operator to the input data and returns the result.
+       *
+       * \param data a vector of packets corresponding to each slot (one in this case)
+       * \return the result of the binary operation
+       */
+      CDataPacketPtr virtual apply(std::vector<CDataPacketPtr> data);
+  }; // class CScalarFieldArithmeticFilter
+
+  /*!
+   * A generic binary arithmetic filter wrapping any type of binary scalar-field operator.
+   */
+  class CFieldScalarArithmeticFilter : public CFilter, public IFilterEngine
+  {
+    public:
+      /*!
+       * Constructs an binary field-scalar arithmetic filter wrapping the specified operator.
+       *
+       * \param gc the associated garbage collector
+       * \param op the string identifing the binary field-scalar operator
+       * \param value the scalar value
+       */
+      CFieldScalarArithmeticFilter(CGarbageCollector& gc, const std::string& op, double value);
+
+    protected:
+      COperatorExpr::functionFieldScalar op; //!< The binary field-scalar operator attached to the binary arithmeric filter
+      double value; //!< The scalar value associated with the binary arithmeric filter
+
+      /*!
+       * Applies the binary field-scalar operator to the input data and returns the result.
+       *
+       * \param data a vector of packets corresponding to each slot (one in this case)
+       * \return the result of the binary operation
+       */
+      CDataPacketPtr virtual apply(std::vector<CDataPacketPtr> data);
+  }; // class CFieldScalarArithmeticFilter
+
+  /*!
+   * A generic binary arithmetic filter wrapping any type of binary scalar-field operator.
+   */
+  class CFieldFieldArithmeticFilter : public CFilter, public IFilterEngine
+  {
+    public:
+      /*!
+       * Constructs an binary field-field arithmetic filter wrapping the specified operator.
+       *
+       * \param gc the associated garbage collector
+       * \param op the string identifing the binary field-field operator
+       */
+      CFieldFieldArithmeticFilter(CGarbageCollector& gc, const std::string& op);
+
+    protected:
+      COperatorExpr::functionFieldField op; //!< The binary field-field operator attached to the binary arithmeric filter
+
+      /*!
+       * Applies the binary field-field operator to the input data and returns the result.
+       *
+       * \param data a vector of packets corresponding to each slot (one in this case)
+       * \return the result of the binary operation
+       */
+      CDataPacketPtr virtual apply(std::vector<CDataPacketPtr> data);
+  }; // class CFieldFieldArithmeticFilter
+} // namespace xios
+
+#endif //__XIOS_CBinaryArithmeticFilter__
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/filter/data_packet.hpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/filter/data_packet.hpp	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/filter/data_packet.hpp	(revision 1749)
@@ -0,0 +1,49 @@
+#ifndef __XIOS_CDataPacket__
+#define __XIOS_CDataPacket__
+
+#include <memory>
+
+#include "array_new.hpp"
+#include "date.hpp"
+
+namespace xios
+{
+  /*!
+   * A packet corresponds to a timestamped array of data.
+   */
+  struct CDataPacket
+  {
+    /*!
+     * Describes the status associated to a packet
+     */
+    enum StatusCode {
+      NO_ERROR,     //!< No error were encountered when handling the packet
+      END_OF_STREAM //!< Last packet of the stream, does not have data
+    };
+
+    CArray<double, 1> data; //!< Array containing the data
+    CDate date;             //!< Date associated to the data
+    Time timestamp;         //!< Timestamp of the data
+    StatusCode status;      //!< Status of the packet
+
+    /*!
+     * Creates a deep copy of the packet.
+     *
+     * \return a deep copy of the packet
+     */
+    CDataPacket* copy() const {
+      CDataPacket* p = new CDataPacket;
+      p->data.resize(data.shape());
+      p->data = data;
+      p->date = date;
+      p->timestamp = timestamp;
+      p->status = status;
+      return p;
+    };
+  }; // struct CDataPacket
+
+  typedef std::shared_ptr<CDataPacket> CDataPacketPtr;
+  typedef std::shared_ptr<const CDataPacket> CConstDataPacketPtr;
+} // namespace xios
+
+#endif //__XIOS_CDataPacket__
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/filter/file_server_writer_filter.cpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/filter/file_server_writer_filter.cpp	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/filter/file_server_writer_filter.cpp	(revision 1749)
@@ -0,0 +1,30 @@
+#include "file_server_writer_filter.hpp"
+#include "exception.hpp"
+#include "field.hpp"
+
+namespace xios
+{
+  CFileServerWriterFilter::CFileServerWriterFilter(CGarbageCollector& gc, CField* field)
+    : CInputPin(gc, 1)
+    , field(field)
+  {
+    if (!field)
+      ERROR("CFileServerWriterFilter::CFileServerWriterFilter(CField* field)",
+            "The field cannot be null.");
+  }
+
+  void CFileServerWriterFilter::onInputReady(std::vector<CDataPacketPtr> data)
+  {
+    field->writeUpdateData(data[0]->data);
+  }
+
+  bool CFileServerWriterFilter::mustAutoTrigger() const
+  {
+    return true;
+  }
+
+  bool CFileServerWriterFilter::isDataExpected(const CDate& date) const
+  {
+    return true;
+  }
+} // namespace xios
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/filter/file_server_writer_filter.hpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/filter/file_server_writer_filter.hpp	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/filter/file_server_writer_filter.hpp	(revision 1749)
@@ -0,0 +1,53 @@
+#ifndef __XIOS_CFileServerWriterFilter__
+#define __XIOS_CFileServerWriterFilter__
+
+#include "input_pin.hpp"
+
+namespace xios
+{
+  class CField;
+
+  /*!
+   * A terminal filter which writes the packets it receives in a file.
+   */
+  class CFileServerWriterFilter : public CInputPin
+  {
+    public:
+      /*!
+       * Constructs the filter (with one input slot) associated to the specified field
+       * and a garbage collector.
+       *
+       * \param gc the associated garbage collector
+       * \param field the associated field
+       */
+      CFileServerWriterFilter(CGarbageCollector& gc, CField* field);
+
+      /*!
+       * Tests if the filter must auto-trigger.
+       *
+       * \return true if the filter must auto-trigger
+       */
+      bool virtual mustAutoTrigger() const;
+
+      /*!
+       * Tests whether data is expected for the specified date.
+       *
+       * \param date the date associated to the data
+       */
+      bool virtual isDataExpected(const CDate& date) const;
+
+    protected:
+      /*!
+       * Callbacks a field to write a packet to a file.
+       *
+       * \param data a vector of packets corresponding to each slot
+       */
+      void virtual onInputReady(std::vector<CDataPacketPtr> data);
+
+    private:
+      CField* field; //<! The associated field
+      std::map<Time, CDataPacketPtr> packets; //<! The stored packets
+  }; // class CFileServerWriterFilter
+} // namespace xios
+
+#endif //__XIOS_CFileServerWriterFilter__
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/filter/file_writer_filter.cpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/filter/file_writer_filter.cpp	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/filter/file_writer_filter.cpp	(revision 1749)
@@ -0,0 +1,48 @@
+#include "file_writer_filter.hpp"
+#include "exception.hpp"
+#include "field.hpp"
+#include "utils.hpp"
+
+namespace xios
+{
+  CFileWriterFilter::CFileWriterFilter(CGarbageCollector& gc, CField* field)
+    : CInputPin(gc, 1)
+    , field(field)
+  {
+    if (!field)
+      ERROR("CFileWriterFilter::CFileWriterFilter(CField* field)",
+            "The field cannot be null.");
+  }
+
+  void CFileWriterFilter::onInputReady(std::vector<CDataPacketPtr> data)
+  {
+    const bool detectMissingValue = ( !field->default_value.isEmpty() &&
+                               ( (!field->detect_missing_value.isEmpty() || field->detect_missing_value == true)
+                                 || field->hasGridMask()) );
+
+    CArray<double, 1> dataArray = (detectMissingValue) ? data[0]->data.copy() : data[0]->data;
+
+    if (detectMissingValue)
+    {
+      const double missingValue = field->default_value;
+      const size_t nbData = dataArray.numElements();
+      for (size_t idx = 0; idx < nbData; ++idx)
+      {
+        if (NumTraits<double>::isNan(dataArray(idx)))
+          dataArray(idx) = missingValue;
+      }
+    }
+
+    field->sendUpdateData(dataArray);
+  }
+
+  bool CFileWriterFilter::mustAutoTrigger() const
+  {
+    return true;
+  }
+
+  bool CFileWriterFilter::isDataExpected(const CDate& date) const
+  {
+    return true;
+  }
+} // namespace xios
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/filter/file_writer_filter.hpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/filter/file_writer_filter.hpp	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/filter/file_writer_filter.hpp	(revision 1749)
@@ -0,0 +1,53 @@
+#ifndef __XIOS_CFileWriterFilter__
+#define __XIOS_CFileWriterFilter__
+
+#include "input_pin.hpp"
+
+namespace xios
+{
+  class CField;
+
+  /*!
+   * A terminal filter which transmits the packets it receives to a field for writting in a file.
+   */
+  class CFileWriterFilter : public CInputPin
+  {
+    public:
+      /*!
+       * Constructs the filter (with one input slot) associated to the specified field
+       * and a garbage collector.
+       *
+       * \param gc the associated garbage collector
+       * \param field the associated field
+       */
+      CFileWriterFilter(CGarbageCollector& gc, CField* field);
+
+      /*!
+       * Tests if the filter must auto-trigger.
+       *
+       * \return true if the filter must auto-trigger
+       */
+      bool virtual mustAutoTrigger() const;
+
+      /*!
+       * Tests whether data is expected for the specified date.
+       *
+       * \param date the date associated to the data
+       */
+      bool virtual isDataExpected(const CDate& date) const;
+
+    protected:
+      /*!
+       * Callbacks a field to write a packet to a file.
+       *
+       * \param data a vector of packets corresponding to each slot
+       */
+      void virtual onInputReady(std::vector<CDataPacketPtr> data);
+
+    private:
+      CField* field; //<! The associated field
+      std::map<Time, CDataPacketPtr> packets; //<! The stored packets
+  }; // class CFileWriterFilter
+} // namespace xios
+
+#endif //__XIOS_CFileWriterFilter__
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/filter/filter.cpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/filter/filter.cpp	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/filter/filter.cpp	(revision 1749)
@@ -0,0 +1,52 @@
+#include "filter.hpp"
+
+namespace xios
+{
+  CFilter::CFilter(CGarbageCollector& gc, size_t inputSlotsCount, IFilterEngine* engine)
+    : CInputPin(gc, inputSlotsCount)
+    , COutputPin(gc)
+    , engine(engine)
+    , inputSlotCount(inputSlotCount)
+  { /* Nothing to do */ }
+
+  void CFilter::onInputReady(std::vector<CDataPacketPtr> data)
+  {
+    CDataPacketPtr outputPacket = engine->apply(data);
+    if (outputPacket)
+      onOutputReady(outputPacket);
+  }
+
+  void CFilter::setInputTrigger(size_t inputSlot, COutputPin* trigger)
+  {
+    // Was the filter already triggerable? If not, we need to inform
+    // all downstream filters.
+    bool wasTriggerable = canBeTriggered();
+
+    CInputPin::setInputTrigger(inputSlot, trigger);
+
+    if (!wasTriggerable)
+      setOutputTriggers();
+  }
+
+  void CFilter::trigger(Time timestamp)
+  {
+    CInputPin::trigger(timestamp);
+
+    COutputPin::trigger(timestamp);
+  }
+
+  bool CFilter::canBeTriggered() const
+  {
+    return (CInputPin::canBeTriggered() || COutputPin::canBeTriggered());
+  }
+
+  bool CFilter::mustAutoTrigger() const
+  {
+    return COutputPin::mustAutoTrigger();
+  }
+
+  bool CFilter::isDataExpected(const CDate& date) const
+  {
+    return COutputPin::isDataExpected(date);
+  }
+} // namespace xios
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/filter/filter.hpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/filter/filter.hpp	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/filter/filter.hpp	(revision 1749)
@@ -0,0 +1,79 @@
+#ifndef __XIOS_CFilter__
+#define __XIOS_CFilter__
+
+#include "input_pin.hpp"
+#include "output_pin.hpp"
+#include "filter_engine.hpp"
+
+namespace xios
+{
+  /*!
+   * A generic filter with an input pin and an output pin.
+   * A filter can delegate the internal work to an engine
+   * which may be shared by multiple filter instances.
+   */
+  class CFilter : public CInputPin, public COutputPin
+  {
+    public:
+      /*!
+       * Constructs a filter with the specified number of input slots
+       * and the specified engine.
+       *
+       * \param gc the associated garbage collector
+       * \param inputSlotsCount the number of input slots
+       * \param engine the filter engine
+       */
+      CFilter(CGarbageCollector& gc, size_t inputSlotsCount, IFilterEngine* engine);
+
+      /*!
+       * Sets the trigger for a specific input slot.
+       *
+       * \param inputSlot the input slot number
+       * \param trigger the corresponding trigger
+       */
+      void virtual setInputTrigger(size_t inputSlot, COutputPin* trigger);
+
+      /*!
+       * Triggers the filter for the specified timestamp.
+       *
+       * \param timestamp the timestamp for which we are triggering the filter
+       */
+      void virtual trigger(Time timestamp);
+
+      /*!
+       * Tests if the filter can be triggered.
+       *
+       * \return true if the filter can be triggered
+       */
+      bool virtual canBeTriggered() const;
+
+      /*!
+       * Tests if the filter must auto-trigger.
+       *
+       * \return true if the filter must auto-trigger
+       */
+      bool virtual mustAutoTrigger() const;
+
+      /*!
+       * Tests whether data is expected for the specified date.
+       *
+       * \param date the date associated to the data
+       */
+      bool virtual isDataExpected(const CDate& date) const;
+
+    protected:
+      IFilterEngine* engine; //!< The filter engine, might be the filter itself
+      size_t inputSlotCount; //!< Number of slot on filter
+
+      /*!
+       * Generic implementation of the input pin notification function, processes
+       * the data using the filter engine and passes the resulting packet (if any)
+       * to the downstreams filters.
+       *
+       * \param data a vector of packets corresponding to each slot
+       */
+      void virtual onInputReady(std::vector<CDataPacketPtr> data);
+  }; // class CFilter
+} // namespace xios
+
+#endif //__XIOS_CFilter__
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/filter/filter_engine.hpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/filter/filter_engine.hpp	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/filter/filter_engine.hpp	(revision 1749)
@@ -0,0 +1,28 @@
+#ifndef __XIOS_IFilterEngine__
+#define __XIOS_IFilterEngine__
+
+#include "data_packet.hpp"
+
+namespace xios
+{
+  /*!
+   * An engine filter processes the data handled by a filter.
+   */
+  class IFilterEngine
+  {
+    public:
+      /*!
+       * Processes the data and returns a new packet if needed.
+       * Temporal filter engines will not return a new packet
+       * for every call being that they accumulate data.
+       * The filter engine is not allowed to modify the data
+       * in place.
+       *
+       * \param data a vector of packets corresponding to each slot
+       * \return a new data packet or null if the engine is accumulating data
+       */
+       CDataPacketPtr virtual apply(std::vector<CDataPacketPtr> data) = 0;
+  }; // class IFilterEngine
+} // namespace xios
+
+#endif //__XIOS_IFilterEngine__
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/filter/garbage_collector.cpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/filter/garbage_collector.cpp	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/filter/garbage_collector.cpp	(revision 1749)
@@ -0,0 +1,30 @@
+#include "garbage_collector.hpp"
+
+namespace xios
+{
+  void CGarbageCollector::registerObject(InvalidableObject* Object, Time timestamp)
+  {
+    registeredObjects[timestamp].insert(Object);
+  }
+
+  void CGarbageCollector::unregisterObject(InvalidableObject* Object, Time timestamp)
+  {
+    std::map<Time, std::set<InvalidableObject*> >::iterator it = registeredObjects.find(timestamp);
+    if (it != registeredObjects.end())
+      it->second.erase(Object);
+  }
+
+  void CGarbageCollector::invalidate(Time timestamp)
+  {
+    std::map<Time, std::set<InvalidableObject*> >::iterator it    = registeredObjects.begin(),
+                                                            itEnd = registeredObjects.lower_bound(timestamp);
+    for (; it != itEnd; ++it)
+    {
+      std::set<InvalidableObject*>::iterator itObject    = it->second.begin(),
+                                             itObjectEnd = it->second.end();
+      for (; itObject != itObjectEnd; ++itObject)
+        (*itObject)->invalidate(timestamp);
+    }
+    registeredObjects.erase(registeredObjects.begin(), itEnd);
+  }
+} // namespace xios
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/filter/garbage_collector.hpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/filter/garbage_collector.hpp	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/filter/garbage_collector.hpp	(revision 1749)
@@ -0,0 +1,67 @@
+#ifndef __XIOS_CGarbageCollector__
+#define __XIOS_CGarbageCollector__
+
+#include <map>
+#include <set>
+
+#include "date.hpp"
+
+namespace xios
+{
+  /*!
+   * Interface shared by all objects that might need to invalidate packets.
+   */
+  struct InvalidableObject
+  {
+    /*!
+     * Removes all pending packets which are older than the specified timestamp.
+     *
+     * \param timestamp the timestamp used for invalidation
+     */
+    void virtual invalidate(Time timestamp) = 0;
+  }; // struct InvalidableObject
+
+  /*!
+   * A basic garbage collector which ensures no old packets linger in the filter graph.
+   */
+  class CGarbageCollector
+  {
+    public:
+      /*!
+       * Constructs a garbage collector.
+       */
+      CGarbageCollector()
+      { /* Nothing to do */ };
+
+      /*!
+       * Registers an object for a specified timestamp.
+       *
+       * \param object the object to register
+       * \param timestamp the timestamp for which the object is registered
+       */
+      void registerObject(InvalidableObject* object, Time timestamp);
+
+      /*!
+       * Removes a object previously registered for a specified timestamp.
+       *
+       * \param object the object to unregister
+       * \param timestamp the timestamp for which the object is unregistered
+       */
+      void unregisterObject(InvalidableObject* object, Time timestamp);
+
+      /*!
+       * Ensures all registered objects invalidate packets older than the specified timestamp.
+       *
+       * \param timestamp the timestamp used for invalidation
+       */
+      void invalidate(Time timestamp);
+
+    private:
+      CGarbageCollector(const CGarbageCollector&);
+      CGarbageCollector& operator=(const CGarbageCollector&);
+
+      std::map<Time, std::set<InvalidableObject*> > registeredObjects; //!< Currently registered objects
+  }; // class CGarbageCollector
+} // namespace xios
+
+#endif //__XIOS_CGarbageCollector__
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/filter/input_pin.cpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/filter/input_pin.cpp	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/filter/input_pin.cpp	(revision 1749)
@@ -0,0 +1,79 @@
+#include "input_pin.hpp"
+#include "output_pin.hpp"
+#include "garbage_collector.hpp"
+#include "exception.hpp"
+
+namespace xios
+{
+  CInputPin::CInputPin(CGarbageCollector& gc, size_t slotsCount)
+    : gc(gc)
+    , slotsCount(slotsCount)
+    , triggers(slotsCount)
+    , hasTriggers(false)
+  { /* Nothing to do */ }
+
+  void CInputPin::setInput(size_t inputSlot, CDataPacketPtr packet)
+  {
+    if (inputSlot >= slotsCount)
+      ERROR("void CInputPin::setInput(size_t inputSlot, CDataPacketPtr packet)",
+            "The input slot " << inputSlot << " does not exist.");
+    if (!packet)
+      ERROR("void CInputPin::setInput(size_t inputSlot, CDataPacketPtr packet)",
+            "The packet cannot be null.");
+
+    std::map<Time, InputBuffer>::iterator it = inputs.find(packet->timestamp);
+    if (it == inputs.end())
+    {
+      it = inputs.insert(std::make_pair(packet->timestamp, InputBuffer(slotsCount))).first;
+      gc.registerObject(this, packet->timestamp);
+    }
+    it->second.slotsFilled++;
+    it->second.packets[inputSlot] = packet;
+
+    if (it->second.slotsFilled == slotsCount)
+    {
+      // Unregister before calling onInputReady in case the filter registers again
+      gc.unregisterObject(this, packet->timestamp);
+      onInputReady(it->second.packets);
+      inputs.erase(it);
+    }
+  }
+
+  void CInputPin::setInputTrigger(size_t inputSlot, COutputPin* trigger)
+  {
+    if (inputSlot >= slotsCount)
+      ERROR("void CInputPin::setInputTrigger(size_t inputSlot, COutputPin* trigger)",
+            "The input slot " << inputSlot << " does not exist.");
+    if (triggers[inputSlot])
+      ERROR("void CInputPin::setInputTrigger(size_t inputSlot, COutputPin* trigger)",
+            "The trigger for input slot " << inputSlot << " has already been set.");
+
+    triggers[inputSlot] = trigger;
+    hasTriggers = true;
+  }
+
+  void CInputPin::trigger(Time timestamp)
+  {
+    if (hasTriggers) // Don't use canBeTriggered here, this function is virtual and can be overriden
+    {
+      std::map<Time, InputBuffer>::iterator it = inputs.find(timestamp);
+      bool nothingReceived = (it == inputs.end());
+
+      for (size_t s = 0; s < slotsCount; s++)
+      {
+        if (triggers[s] && (nothingReceived || !it->second.packets[s]))
+          triggers[s]->trigger(timestamp);
+      }
+    }
+  }
+
+  bool CInputPin::canBeTriggered() const
+  {
+    return hasTriggers;
+  }
+
+  void CInputPin::invalidate(Time timestamp)
+  {
+    inputs.erase(inputs.begin(), inputs.lower_bound(timestamp));
+  }
+} // namespace xios
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/filter/input_pin.hpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/filter/input_pin.hpp	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/filter/input_pin.hpp	(revision 1749)
@@ -0,0 +1,127 @@
+#ifndef __XIOS_CInputPin__
+#define __XIOS_CInputPin__
+
+#include <vector>
+#include <map>
+
+#include "garbage_collector.hpp"
+#include "data_packet.hpp"
+
+namespace xios
+{
+  class COutputPin;
+
+  /*!
+   * An input pin handles the data packets received by a filter.
+   */
+  class CInputPin : public InvalidableObject
+  {
+    public:
+      /*!
+       * Constructs an input pin with the specified number of slots
+       * and an associated garbage collector.
+       *
+       * \param gc the garbage collector associated with this input pin
+       * \param slotsCount the number of slots
+       */
+      CInputPin(CGarbageCollector& gc, size_t slotsCount);
+
+      /*!
+       * Sets the trigger for a specific input slot.
+       *
+       * \param inputSlot the input slot number
+       * \param trigger the corresponding trigger
+       */
+      void virtual setInputTrigger(size_t inputSlot, COutputPin* trigger);
+
+      /*!
+       * Receives a data packet from an upstream filter on
+       * the specified input slot.
+       * The receiving filter takes ownership of the packet.
+       *
+       * \param inputSlot the input slot number
+       * \param packet the data packet to be received
+       */
+      void setInput(size_t inputSlot, CDataPacketPtr packet);
+
+      /*!
+       * Triggers the input of any buffered packet for the specified timestamp.
+       *
+       * \param timestamp the timestamp for which we are triggering the input
+       */
+      void virtual trigger(Time timestamp);
+
+      /*!
+       * Tests if the pin can be triggered.
+       *
+       * \return true if the pin can be triggered
+       */
+      bool virtual canBeTriggered() const;
+
+      /*!
+       * Tests if the pin must auto-trigger.
+       *
+       * \return true if the pin must auto-trigger
+       */
+      bool virtual mustAutoTrigger() const = 0;
+
+      /*!
+       * Tests whether data is expected for the specified date.
+       *
+       * \param date the date associated to the data
+       */
+      bool virtual isDataExpected(const CDate& date) const = 0;
+
+      /*!
+       * Removes all pending packets which are older than the specified timestamp.
+       *
+       * \param timestamp the timestamp used for invalidation
+       */
+      void virtual invalidate(Time timestamp);
+
+    protected:
+      /*!
+       * Function triggered when all slots have been filled for a specific timestamp.
+       * It should be implemented by the filter class to process the data.
+       *
+       * \param data a vector of packets corresponding to each slot
+       */
+      void virtual onInputReady(std::vector<CDataPacketPtr> data) = 0;
+
+    private:
+      /*!
+       * Helper structure, groups a vector of packets corresponding to each slot
+       * with the number of slots currently filled
+       */
+      struct InputBuffer
+      {
+        size_t slotsFilled; //!< Number of slots currently filled
+        std::vector<CDataPacketPtr> packets; //< Vector of packets corresponding to each slot
+
+        /*!
+         * Initialize an empty input buffer for the specified number of slots.
+         *
+         * \param slotsCount the number of slots
+         */
+        InputBuffer(size_t slotsCount)
+          : slotsFilled(0)
+          , packets(slotsCount)
+        { /* Nothing to do */ };
+      };
+
+      CGarbageCollector& gc; //!< The garbage collector associated to the input pin
+
+      size_t slotsCount; //!< The number of slots
+
+      //! Input buffer, store the packets until all slots are full for a timestep
+      std::map<Time, InputBuffer> inputs;
+
+      //! Store the triggers corresponding to the input slots
+      std::vector<COutputPin*> triggers;
+
+      //! Whether some triggers have been set
+      bool hasTriggers;
+  }; // class CInputPin
+} // namespace xios
+
+#endif //__XIOS_CInputPin__
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/filter/output_pin.cpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/filter/output_pin.cpp	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/filter/output_pin.cpp	(revision 1749)
@@ -0,0 +1,103 @@
+#include "output_pin.hpp"
+#include "exception.hpp"
+
+namespace xios
+{
+  COutputPin::COutputPin(CGarbageCollector& gc, bool manualTrigger /*= false*/)
+    : gc(gc)
+    , manualTrigger(manualTrigger)
+  { /* Nothing to do */ }
+
+  void COutputPin::connectOutput(std::shared_ptr<CInputPin> inputPin, size_t inputSlot)
+  {
+    if (!inputPin)
+      ERROR("void COutputPin::connectOutput(CInputPin* inputPin, size_t inputSlot)",
+            "The input pin cannot be null.");
+
+    outputs.push_back(std::make_pair(inputPin, inputSlot));
+
+    if (canBeTriggered())
+      inputPin->setInputTrigger(inputSlot, this);
+  }
+
+  void COutputPin::onOutputReady(CDataPacketPtr packet)
+  {
+    if (!packet)
+      ERROR("void COutputPin::onOutputReady(CDataPacketPtr packet)",
+            "The packet cannot be null.");
+
+    if (manualTrigger) // Don't use canBeTriggered here, this function is virtual and can be overriden
+    {
+      outputPackets[packet->timestamp] = packet;
+      gc.registerObject(this, packet->timestamp);
+    }
+    else
+      deliverOuput(packet);
+  }
+
+  void COutputPin::deliverOuput(CDataPacketPtr packet)
+  {
+    if (!packet)
+      ERROR("void COutputPin::deliverOuput(CDataPacketPtr packet)",
+            "The packet cannot be null.");
+
+    std::vector<std::pair<std::shared_ptr<CInputPin>, size_t> >::iterator it, itEnd;
+    for (it = outputs.begin(), itEnd = outputs.end(); it != itEnd; ++it)
+      it->first->setInput(it->second, packet);
+  }
+
+  void COutputPin::trigger(Time timestamp)
+  {
+    if (manualTrigger) // Don't use canBeTriggered here, this function is virtual and can be overriden
+    {
+      std::map<Time, CDataPacketPtr>::iterator it = outputPackets.find(timestamp);
+      if (it != outputPackets.end())
+      {
+        gc.unregisterObject(this, timestamp);
+        deliverOuput(it->second);
+        outputPackets.erase(it);
+      }
+    }
+  }
+
+  bool COutputPin::canBeTriggered() const
+  {
+    return manualTrigger;
+  }
+
+  bool COutputPin::mustAutoTrigger() const
+  {
+    std::vector<std::pair<std::shared_ptr<CInputPin>, size_t> >::const_iterator it, itEnd;
+    for (it = outputs.begin(), itEnd = outputs.end(); it != itEnd; ++it)
+    {
+      if (it->first->mustAutoTrigger())
+        return true;
+    }
+
+    return false;
+  }
+
+  void COutputPin::setOutputTriggers()
+  {
+    std::vector<std::pair<std::shared_ptr<CInputPin>, size_t> >::iterator it, itEnd;
+    for (it = outputs.begin(), itEnd = outputs.end(); it != itEnd; ++it)
+      it->first->setInputTrigger(it->second, this);
+  }
+
+  bool COutputPin::isDataExpected(const CDate& date) const
+  {
+    std::vector<std::pair<std::shared_ptr<CInputPin>, size_t> >::const_iterator it, itEnd;
+    for (it = outputs.begin(), itEnd = outputs.end(); it != itEnd; ++it)
+    {
+      if (it->first->isDataExpected(date))
+        return true;
+    }
+
+    return false;
+  }
+
+  void COutputPin::invalidate(Time timestamp)
+  {
+    outputPackets.erase(outputPackets.begin(), outputPackets.lower_bound(timestamp));
+  }
+} // namespace xios
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/filter/output_pin.hpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/filter/output_pin.hpp	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/filter/output_pin.hpp	(revision 1749)
@@ -0,0 +1,102 @@
+#ifndef __XIOS_COutputPin__
+#define __XIOS_COutputPin__
+
+#include "garbage_collector.hpp"
+#include "input_pin.hpp"
+
+namespace xios
+{
+  /*!
+   * An output pin handles the connections with downstream filters.
+   */
+  class COutputPin : public InvalidableObject
+  {
+    public:
+      /*!
+       * Constructs an ouput pin with manual or automatic trigger
+       * and an associated garbage collector.
+       *
+       * \param gc the garbage collector associated with this ouput pin
+       * \param slotsCount the number of slots
+       */
+      COutputPin(CGarbageCollector& gc, bool manualTrigger = false);
+
+      /*!
+       * Connects to a specific slot of the input pin of a downstream filter.
+       * Note that the output pin holds a reference on the downstream filter.
+       *
+       * \param inputPin the input pin to connect
+       * \param inputSlot the input slot number
+       */
+      void connectOutput(std::shared_ptr<CInputPin> inputPin, size_t inputSlot);
+
+      /*!
+       * Triggers the output of any buffered packet for the specified timestamp.
+       *
+       * \param timestamp the timestamp for which we are triggering the output
+       */
+      void virtual trigger(Time timestamp);
+
+      /*!
+       * Tests if the pin can be triggered.
+       *
+       * \return true if the pin can be triggered
+       */
+      bool virtual canBeTriggered() const;
+
+      /*!
+       * Tests if the pin must auto-trigger.
+       *
+       * \return true if the pin must auto-trigger
+       */
+      bool virtual mustAutoTrigger() const;
+
+      /*!
+       * Tests whether data is expected for the specified date.
+       *
+       * \param date the date associated to the data
+       */
+      bool virtual isDataExpected(const CDate& date) const;
+
+      /*!
+       * Removes all pending packets which are older than the specified timestamp.
+       *
+       * \param timestamp the timestamp used for invalidation
+       */
+      void virtual invalidate(Time timestamp);
+
+    protected:
+      /*!
+       * Function triggered when a packet is ready to be delivered.
+       *
+       * \param packet the packet ready for output
+       */
+      void onOutputReady(CDataPacketPtr packet);
+
+      /*!
+       * Informs the downstream pins that this output pin should be triggered.
+       */
+      void setOutputTriggers();
+
+    private:
+      /*!
+       * Delivers an output packet to the downstreams filter.
+       *
+       * \param packet the packet to output
+       */
+      void deliverOuput(CDataPacketPtr packet);
+
+      CGarbageCollector& gc; //!< The garbage collector associated to the output pin
+
+      //!< Whether the ouput should be triggered manually
+      bool manualTrigger;
+
+      //!< The list of connected filters and the corresponding slot numbers
+      std::vector<std::pair<std::shared_ptr<CInputPin>, size_t> > outputs;
+
+      //! Output buffer, store the packets until the output is triggered
+      std::map<Time, CDataPacketPtr> outputPackets;
+  }; // class COutputPin
+} // namespace xios
+
+#endif //__XIOS_COutputPin__
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/filter/pass_through_filter.cpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/filter/pass_through_filter.cpp	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/filter/pass_through_filter.cpp	(revision 1749)
@@ -0,0 +1,13 @@
+#include "pass_through_filter.hpp"
+
+namespace xios
+{
+  CPassThroughFilter::CPassThroughFilter(CGarbageCollector& gc)
+    : CFilter(gc, 1, this)
+  { /* Nothing to do */ }
+
+  CDataPacketPtr CPassThroughFilter::apply(std::vector<CDataPacketPtr> data)
+  {
+    return data[0];
+  }
+} // namespace xios
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/filter/pass_through_filter.hpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/filter/pass_through_filter.hpp	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/filter/pass_through_filter.hpp	(revision 1749)
@@ -0,0 +1,33 @@
+#ifndef __XIOS_CPassThroughFilter__
+#define __XIOS_CPassThroughFilter__
+
+#include "filter.hpp"
+
+namespace xios
+{
+  /*!
+   * A simple pass-through filter with one input slot.
+   * The pass-through filter is used to handle references on a field.
+   */
+  class CPassThroughFilter : public CFilter, public IFilterEngine
+  {
+    public:
+      /*!
+       * Constructs a pass-through filter with the one input slot.
+       *
+       * \param gc the associated garbage collector
+       */
+      CPassThroughFilter(CGarbageCollector& gc);
+
+    protected:
+      /*!
+       * Returns the input packet without making any modification to it.
+       *
+       * \param data a vector of packets corresponding to each slot
+       * \return the untouched source data packet
+       */
+      CDataPacketPtr virtual apply(std::vector<CDataPacketPtr> data);
+  }; // class CPassThroughFilter
+} // namespace xios
+
+#endif //__XIOS_CPassThroughFilter__
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/filter/source_filter.cpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/filter/source_filter.cpp	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/filter/source_filter.cpp	(revision 1749)
@@ -0,0 +1,121 @@
+#include "source_filter.hpp"
+#include "grid.hpp"
+#include "exception.hpp"
+#include "calendar_util.hpp"
+#include <limits> 
+
+namespace xios
+{
+  CSourceFilter::CSourceFilter(CGarbageCollector& gc, CGrid* grid,
+                               bool compression /*= true*/, bool mask /*= false*/,
+                               const CDuration offset /*= NoneDu*/, bool manualTrigger /*= false*/,
+                               bool hasMissingValue /*= false*/,
+                               double defaultValue /*= 0.0*/)
+    : COutputPin(gc, manualTrigger)
+    , grid(grid)
+    , compression(compression)
+    , mask(mask)
+    , offset(offset)
+    , hasMissingValue(hasMissingValue), defaultValue(defaultValue)
+  {
+    if (!grid)
+      ERROR("CSourceFilter::CSourceFilter(CGrid* grid)",
+            "Impossible to construct a source filter without providing a grid.");
+  }
+
+  template <int N>
+  void CSourceFilter::streamData(CDate date, const CArray<double, N>& data)
+  {
+    date = date + offset; // this is a temporary solution, it should be part of a proper temporal filter
+
+    CDataPacketPtr packet(new CDataPacket);
+    packet->date = date;
+    packet->timestamp = date;
+    packet->status = CDataPacket::NO_ERROR;
+
+    packet->data.resize(grid->storeIndex_client.numElements());    
+    
+    if (compression)
+    {
+      packet->data = defaultValue;
+      grid->uncompressField(data, packet->data);    
+    }
+    else
+    {
+      if (mask)
+        grid->maskField(data, packet->data);
+      else
+        grid->inputField(data, packet->data);
+    }
+    // Convert missing values to NaN
+    if (hasMissingValue)
+    {
+      const double nanValue = std::numeric_limits<double>::quiet_NaN();
+      const size_t nbData = packet->data.numElements();
+      for (size_t idx = 0; idx < nbData; ++idx)
+      {
+        if (defaultValue == packet->data(idx))
+          packet->data(idx) = nanValue;
+      }
+    }
+
+    onOutputReady(packet);
+  }
+
+  template void CSourceFilter::streamData<1>(CDate date, const CArray<double, 1>& data);
+  template void CSourceFilter::streamData<2>(CDate date, const CArray<double, 2>& data);
+  template void CSourceFilter::streamData<3>(CDate date, const CArray<double, 3>& data);
+  template void CSourceFilter::streamData<4>(CDate date, const CArray<double, 4>& data);
+  template void CSourceFilter::streamData<5>(CDate date, const CArray<double, 5>& data);
+  template void CSourceFilter::streamData<6>(CDate date, const CArray<double, 6>& data);
+  template void CSourceFilter::streamData<7>(CDate date, const CArray<double, 7>& data);
+
+  void CSourceFilter::streamDataFromServer(CDate date, const std::map<int, CArray<double, 1> >& data)
+  {
+    date = date + offset; // this is a temporary solution, it should be part of a proper temporal filter
+
+    CDataPacketPtr packet(new CDataPacket);
+    packet->date = date;
+    packet->timestamp = date;
+    packet->status = CDataPacket::NO_ERROR;
+    
+    if (data.size() != grid->storeIndex_fromSrv.size())
+      ERROR("CSourceFilter::streamDataFromServer(CDate date, const std::map<int, CArray<double, 1> >& data)",
+            << "Incoherent data received from servers,"
+            << " expected " << grid->storeIndex_fromSrv.size() << " chunks but " << data.size() << " were given.");
+
+    packet->data.resize(grid->storeIndex_client.numElements());
+    std::map<int, CArray<double, 1> >::const_iterator it, itEnd = data.end();
+    for (it = data.begin(); it != itEnd; it++)
+    {      
+      CArray<int,1>& index = grid->storeIndex_fromSrv[it->first];
+      for (int n = 0; n < index.numElements(); n++)
+        packet->data(index(n)) = it->second(n);
+    }
+
+    // Convert missing values to NaN
+    if (hasMissingValue)
+    {
+      const double nanValue = std::numeric_limits<double>::quiet_NaN();
+      const size_t nbData = packet->data.numElements();
+      for (size_t idx = 0; idx < nbData; ++idx)
+      {
+        if (defaultValue == packet->data(idx))
+          packet->data(idx) = nanValue;
+      }
+    }
+
+    onOutputReady(packet);
+  }
+
+  void CSourceFilter::signalEndOfStream(CDate date)
+  {
+    date = date + offset; // this is a temporary solution, it should be part of a proper temporal filter
+
+    CDataPacketPtr packet(new CDataPacket);
+    packet->date = date;
+    packet->timestamp = date;
+    packet->status = CDataPacket::END_OF_STREAM;
+    onOutputReady(packet);
+  }
+} // namespace xios
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/filter/source_filter.hpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/filter/source_filter.hpp	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/filter/source_filter.hpp	(revision 1749)
@@ -0,0 +1,75 @@
+#ifndef __XIOS_CSourceFilter__
+#define __XIOS_CSourceFilter__
+
+#include <map>
+
+#include "output_pin.hpp"
+
+namespace xios
+{
+  class CGrid;
+
+  /*!
+   * A source filter is the entry point of the data in the graph of filters.
+   */
+  class CSourceFilter : public COutputPin
+  {
+    public:
+      /*!
+       * Constructs a source filter accepting data attached to the specified grid.
+       *
+       * \param gc the garbage collector associated with this filter
+       * \param grid the grid to which the data is attached
+       * \param compression
+       * \param mask
+       * \param offset the offset applied to the timestamp of all packets
+       * \param manualTrigger whether the output should be triggered manually
+       * \param hasMissingValue whether data has missing value
+       * \param defaultValue missing value to detect
+       */
+      CSourceFilter(CGarbageCollector& gc, CGrid* grid,
+                    bool compression = true,
+                    bool mask = false,
+                    const CDuration offset = NoneDu, bool manualTrigger = false,
+                    bool hasMissingValue = false,
+                    double defaultValue = 0.0);
+
+      /*!
+       * Transforms the data received from the model into a packet and send it
+       * in the filter graph. The array containing the data can safely be reused
+       * immediately after this method returns.
+       *
+       * \param date the date associated to the data
+       * \param data an array containing the data
+       */
+      template <int N>
+      void streamData(CDate date, const CArray<double, N>& data);
+
+      /*!
+       * Transforms the data received from the server into a packet and send it
+       * in the filter graph. The array containing the data can safely be reused
+       * immediately after this method returns.
+       *
+       * \param date the date associated to the data
+       * \param data an array containing the data
+       */
+      void streamDataFromServer(CDate date, const std::map<int, CArray<double, 1> >& data);
+
+      /*!
+       * Signals the filter graph that the end of stream was reached.
+       *
+       * \param date the date at which the end of stream occurred
+       */
+      void signalEndOfStream(CDate date);
+
+    private:
+      CGrid* grid;             //!< The grid attached to the data the filter can accept
+      const CDuration offset;  //!< The offset applied to the timestamp of all packets
+      const bool hasMissingValue;
+      const double defaultValue;
+      const bool compression ; //!< indicates if data need to be compressed : on client side : true, on server side : false
+      const bool mask ;        //!< indicates whether grid mask should be applied (true for clients, false for servers)
+  }; // class CSourceFilter
+} // namespace xios
+
+#endif //__XIOS_CSourceFilter__
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/filter/spatial_transform_filter.cpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/filter/spatial_transform_filter.cpp	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/filter/spatial_transform_filter.cpp	(revision 1749)
@@ -0,0 +1,345 @@
+#include "spatial_transform_filter.hpp"
+#include "grid_transformation.hpp"
+#include "context.hpp"
+#include "context_client.hpp"
+#include "timer.hpp"
+
+namespace xios
+{
+  CSpatialTransformFilter::CSpatialTransformFilter(CGarbageCollector& gc, CSpatialTransformFilterEngine* engine, double outputValue, size_t inputSlotsCount)
+    : CFilter(gc, inputSlotsCount, engine), outputDefaultValue(outputValue)
+  { /* Nothing to do */ }
+
+  std::pair<std::shared_ptr<CSpatialTransformFilter>, std::shared_ptr<CSpatialTransformFilter> >
+  CSpatialTransformFilter::buildFilterGraph(CGarbageCollector& gc, CGrid* srcGrid, CGrid* destGrid, bool hasMissingValue, double missingValue)
+  {
+    if (!srcGrid || !destGrid)
+      ERROR("std::pair<std::shared_ptr<CSpatialTransformFilter>, std::shared_ptr<CSpatialTransformFilter> >"
+            "buildFilterGraph(CGarbageCollector& gc, CGrid* srcGrid, CGrid* destGrid)",
+            "Impossible to build the filter graph if either the source or the destination grid are null.");
+
+    std::shared_ptr<CSpatialTransformFilter> firstFilter, lastFilter;
+    // Note that this loop goes from the last transformation to the first transformation
+    do
+    {
+      CGridTransformation* gridTransformation = destGrid->getTransformations();
+      CSpatialTransformFilterEngine* engine = CSpatialTransformFilterEngine::get(destGrid->getTransformations());
+      const std::vector<StdString>& auxInputs = gridTransformation->getAuxInputs();
+      size_t inputCount = 1 + (auxInputs.empty() ? 0 : auxInputs.size());
+      double defaultValue  = (hasMissingValue) ? std::numeric_limits<double>::quiet_NaN() : 0.0;
+
+
+      const CGridTransformationSelector::ListAlgoType& algoList = gridTransformation->getAlgoList() ;
+      CGridTransformationSelector::ListAlgoType::const_iterator it  ;
+
+      bool isSpatialTemporal=false ;
+      for (it=algoList.begin();it!=algoList.end();++it)  if (it->second.first == TRANS_TEMPORAL_SPLITTING) isSpatialTemporal=true ;
+
+      std::shared_ptr<CSpatialTransformFilter> filter ;
+      if( isSpatialTemporal) filter = std::shared_ptr<CSpatialTransformFilter>(new CSpatialTemporalFilter(gc, engine, gridTransformation, defaultValue, inputCount));
+      else filter = std::shared_ptr<CSpatialTransformFilter>(new CSpatialTransformFilter(gc, engine, defaultValue, inputCount));
+
+      
+      if (!lastFilter)
+        lastFilter = filter;
+      else
+        filter->connectOutput(firstFilter, 0);
+
+      firstFilter = filter;
+      for (size_t idx = 0; idx < auxInputs.size(); ++idx)
+      {
+        CField* fieldAuxInput = CField::get(auxInputs[idx]);
+        fieldAuxInput->buildFilterGraph(gc, false);
+        fieldAuxInput->getInstantDataFilter()->connectOutput(firstFilter,idx+1);
+      }
+
+      destGrid = gridTransformation->getGridSource();
+    }
+    while (destGrid != srcGrid);
+
+    return std::make_pair(firstFilter, lastFilter);
+  }
+
+  void CSpatialTransformFilter::onInputReady(std::vector<CDataPacketPtr> data)
+  {
+    CSpatialTransformFilterEngine* spaceFilter = static_cast<CSpatialTransformFilterEngine*>(engine);
+    CDataPacketPtr outputPacket = spaceFilter->applyFilter(data, outputDefaultValue);
+    if (outputPacket)
+      onOutputReady(outputPacket);
+  }
+
+  CSpatialTemporalFilter::CSpatialTemporalFilter(CGarbageCollector& gc, CSpatialTransformFilterEngine* engine, CGridTransformation* gridTransformation, double outputValue, size_t inputSlotsCount)
+    : CSpatialTransformFilter(gc, engine, outputValue, inputSlotsCount), record(0)
+  {
+      const CGridTransformationSelector::ListAlgoType& algoList = gridTransformation->getAlgoList() ;
+      CGridTransformationSelector::ListAlgoType::const_iterator it  ;
+
+      int pos ;
+      for (it=algoList.begin();it!=algoList.end();++it) 
+        if (it->second.first == TRANS_TEMPORAL_SPLITTING)
+        {
+          pos=it->first ;
+          if (pos < algoList.size()-1)
+            ERROR("SpatialTemporalFilter::CSpatialTemporalFilter(CGarbageCollector& gc, CSpatialTransformFilterEngine* engine, CGridTransformation* gridTransformation, double outputValue, size_t inputSlotsCount))",
+                  "temporal splitting operation must be the last of whole transformation on same grid") ;
+        }
+          
+      CGrid* grid=gridTransformation->getGridDestination() ;
+
+      CAxis* axis = grid->getAxis(gridTransformation->getElementPositionInGridDst2AxisPosition().find(pos)->second) ;
+
+      nrecords = axis->index.numElements() ;
+  }
+
+
+  void CSpatialTemporalFilter::onInputReady(std::vector<CDataPacketPtr> data)
+  {
+    CSpatialTransformFilterEngine* spaceFilter = static_cast<CSpatialTransformFilterEngine*>(engine);
+    CDataPacketPtr outputPacket = spaceFilter->applyFilter(data, outputDefaultValue);
+
+    if (outputPacket)
+    {
+      size_t nelements=outputPacket->data.numElements() ;
+      if (!tmpData.numElements())
+      {
+        tmpData.resize(nelements);
+        tmpData=outputDefaultValue ;
+      }
+
+      nelements/=nrecords ;
+      size_t offset=nelements*record ;
+      for(size_t i=0;i<nelements;++i)  tmpData(i+offset) = outputPacket->data(i) ;
+    
+      record ++ ;
+      if (record==nrecords)
+      {
+        record=0 ;
+        CDataPacketPtr packet = CDataPacketPtr(new CDataPacket);
+        packet->date = data[0]->date;
+        packet->timestamp = data[0]->timestamp;
+        packet->status = data[0]->status;
+        packet->data.resize(tmpData.numElements());
+        packet->data = tmpData;
+        onOutputReady(packet);
+        tmpData.resize(0) ;
+      }
+    }
+  }
+
+
+  CSpatialTransformFilterEngine::CSpatialTransformFilterEngine(CGridTransformation* gridTransformation)
+    : gridTransformation(gridTransformation)
+  {
+    if (!gridTransformation)
+      ERROR("CSpatialTransformFilterEngine::CSpatialTransformFilterEngine(CGridTransformation* gridTransformation)",
+            "Impossible to construct a spatial transform filter engine without a valid grid transformation.");
+  }
+
+  std::map<CGridTransformation*, std::shared_ptr<CSpatialTransformFilterEngine> > CSpatialTransformFilterEngine::engines;
+
+  CSpatialTransformFilterEngine* CSpatialTransformFilterEngine::get(CGridTransformation* gridTransformation)
+  {
+    if (!gridTransformation)
+      ERROR("CSpatialTransformFilterEngine& CSpatialTransformFilterEngine::get(CGridTransformation* gridTransformation)",
+            "Impossible to get the requested engine, the grid transformation is invalid.");
+
+    std::map<CGridTransformation*, std::shared_ptr<CSpatialTransformFilterEngine> >::iterator it = engines.find(gridTransformation);
+    if (it == engines.end())
+    {
+      std::shared_ptr<CSpatialTransformFilterEngine> engine(new CSpatialTransformFilterEngine(gridTransformation));
+      it = engines.insert(std::make_pair(gridTransformation, engine)).first;
+    }
+
+    return it->second.get();
+  }
+
+  CDataPacketPtr CSpatialTransformFilterEngine::apply(std::vector<CDataPacketPtr> data)
+  {
+    /* Nothing to do */
+  }
+
+  CDataPacketPtr CSpatialTransformFilterEngine::applyFilter(std::vector<CDataPacketPtr> data, double defaultValue)
+  {
+    CDataPacketPtr packet(new CDataPacket);
+    packet->date = data[0]->date;
+    packet->timestamp = data[0]->timestamp;
+    packet->status = data[0]->status;
+
+    if (packet->status == CDataPacket::NO_ERROR)
+    {
+      if (1 < data.size())  // Dynamical transformations
+      {
+        std::vector<CArray<double,1>* > dataAuxInputs(data.size()-1);
+        for (size_t idx = 0; idx < dataAuxInputs.size(); ++idx) dataAuxInputs[idx] = &(data[idx+1]->data);
+        gridTransformation->computeAll(dataAuxInputs, packet->timestamp);
+      }
+      packet->data.resize(gridTransformation->getGridDestination()->storeIndex_client.numElements());
+      if (0 != packet->data.numElements())
+        (packet->data)(0) = defaultValue;
+      apply(data[0]->data, packet->data);
+    }
+
+    return packet;
+  }
+
+  void CSpatialTransformFilterEngine::apply(const CArray<double, 1>& dataSrc, CArray<double,1>& dataDest)
+  {
+    CTimer::get("CSpatialTransformFilterEngine::apply").resume(); 
+    
+    CContextClient* client = CContext::getCurrent()->client;
+    int rank;
+    MPI_Comm_rank (client->intraComm, &rank);
+
+    // Get default value for output data
+    bool ignoreMissingValue = false; 
+    double defaultValue = std::numeric_limits<double>::quiet_NaN();
+    if (0 != dataDest.numElements()) ignoreMissingValue = NumTraits<double>::isNan(dataDest(0));
+
+    const std::list<CGridTransformation::SendingIndexGridSourceMap>& listLocalIndexSend = gridTransformation->getLocalIndexToSendFromGridSource();
+    const std::list<CGridTransformation::RecvIndexGridDestinationMap>& listLocalIndexToReceive = gridTransformation->getLocalIndexToReceiveOnGridDest();
+    const std::list<size_t>& listNbLocalIndexToReceive = gridTransformation->getNbLocalIndexToReceiveOnGridDest();
+    const std::vector<CGenericAlgorithmTransformation*>& listAlgos = gridTransformation->getAlgos();
+
+    CArray<double,1> dataCurrentDest(dataSrc.copy());
+
+    std::list<CGridTransformation::SendingIndexGridSourceMap>::const_iterator itListSend  = listLocalIndexSend.begin(),
+                                                                              iteListSend = listLocalIndexSend.end();
+    std::list<CGridTransformation::RecvIndexGridDestinationMap>::const_iterator itListRecv = listLocalIndexToReceive.begin();
+    std::list<size_t>::const_iterator itNbListRecv = listNbLocalIndexToReceive.begin();
+    std::vector<CGenericAlgorithmTransformation*>::const_iterator itAlgo = listAlgos.begin();
+
+    for (; itListSend != iteListSend; ++itListSend, ++itListRecv, ++itNbListRecv, ++itAlgo)
+    {
+      CArray<double,1> dataCurrentSrc(dataCurrentDest);
+      const CGridTransformation::SendingIndexGridSourceMap& localIndexToSend = *itListSend;
+
+      // Sending data from field sources to do transformations
+      std::map<int, CArray<int,1> >::const_iterator itbSend = localIndexToSend.begin(), itSend,
+                                                    iteSend = localIndexToSend.end();
+      int idxSendBuff = 0;
+      std::vector<double*> sendBuff(localIndexToSend.size());
+      double* sendBuffRank;
+      for (itSend = itbSend; itSend != iteSend; ++itSend, ++idxSendBuff)
+      {
+        int destRank = itSend->first;
+        if (0 != itSend->second.numElements())
+        {
+          if (rank != itSend->first)
+            sendBuff[idxSendBuff] = new double[itSend->second.numElements()];
+          else
+            sendBuffRank = new double[itSend->second.numElements()];
+        }
+      }
+
+      idxSendBuff = 0;
+      std::vector<MPI_Request> sendRecvRequest;
+      for (itSend = itbSend; itSend != iteSend; ++itSend, ++idxSendBuff)
+      {
+        int destRank = itSend->first;
+        const CArray<int,1>& localIndex_p = itSend->second;
+        int countSize = localIndex_p.numElements();
+        if (destRank != rank)
+        {
+          for (int idx = 0; idx < countSize; ++idx)
+          {
+            sendBuff[idxSendBuff][idx] = dataCurrentSrc(localIndex_p(idx));
+          }
+          sendRecvRequest.push_back(MPI_Request());
+          MPI_Isend(sendBuff[idxSendBuff], countSize, MPI_DOUBLE, destRank, 12, client->intraComm, &sendRecvRequest.back());
+        }
+        else
+        {
+          for (int idx = 0; idx < countSize; ++idx)
+          {
+            sendBuffRank[idx] = dataCurrentSrc(localIndex_p(idx));
+          }
+        }
+      }
+
+      // Receiving data on destination fields
+      const CGridTransformation::RecvIndexGridDestinationMap& localIndexToReceive = *itListRecv;
+      CGridTransformation::RecvIndexGridDestinationMap::const_iterator itbRecv = localIndexToReceive.begin(), itRecv,
+                                                                       iteRecv = localIndexToReceive.end();
+      int recvBuffSize = 0;
+      for (itRecv = itbRecv; itRecv != iteRecv; ++itRecv)
+      {
+        if (itRecv->first != rank )
+          recvBuffSize += itRecv->second.size();
+      }
+      //(recvBuffSize < itRecv->second.size()) ? itRecv->second.size() : recvBuffSize;
+      double* recvBuff;
+
+      if (0 != recvBuffSize) recvBuff = new double[recvBuffSize];
+      int currentBuff = 0;
+      for (itRecv = itbRecv; itRecv != iteRecv; ++itRecv)
+      {
+        int srcRank = itRecv->first;
+        if (srcRank != rank)
+        {
+          int countSize = itRecv->second.size();
+          sendRecvRequest.push_back(MPI_Request());
+          MPI_Irecv(recvBuff + currentBuff, countSize, MPI_DOUBLE, srcRank, 12, client->intraComm, &sendRecvRequest.back());
+          currentBuff += countSize;
+        }
+      }
+      std::vector<MPI_Status> status(sendRecvRequest.size());
+      MPI_Waitall(sendRecvRequest.size(), &sendRecvRequest[0], &status[0]);
+
+      dataCurrentDest.resize(*itNbListRecv);
+      dataCurrentDest = 0.0;
+
+      std::vector<bool> localInitFlag(dataCurrentDest.numElements(), true);
+      currentBuff = 0;
+      bool firstPass=true; 
+      for (itRecv = itbRecv; itRecv != iteRecv; ++itRecv)
+      {
+        const std::vector<std::pair<int,double> >& localIndex_p = itRecv->second;
+        int srcRank = itRecv->first;
+        if (srcRank != rank)
+        {
+          int countSize = itRecv->second.size();
+          (*itAlgo)->apply(localIndex_p,
+                           recvBuff+currentBuff,
+                           dataCurrentDest,
+                           localInitFlag,
+                           ignoreMissingValue,firstPass);
+          currentBuff += countSize;
+        }
+        else
+        {
+          (*itAlgo)->apply(localIndex_p,
+                           sendBuffRank,
+                           dataCurrentDest,
+                           localInitFlag,
+                           ignoreMissingValue,firstPass);
+        }
+
+        firstPass=false ;
+      }
+
+      (*itAlgo)->updateData(dataCurrentDest);
+
+      idxSendBuff = 0;
+      for (itSend = itbSend; itSend != iteSend; ++itSend, ++idxSendBuff)
+      {
+        if (0 != itSend->second.numElements())
+        {
+          if (rank != itSend->first)
+            delete [] sendBuff[idxSendBuff];
+          else
+            delete [] sendBuffRank;
+        }
+      }
+      if (0 != recvBuffSize) delete [] recvBuff;
+    }
+    if (dataCurrentDest.numElements() != dataDest.numElements())
+    ERROR("CSpatialTransformFilterEngine::apply(const CArray<double, 1>& dataSrc, CArray<double,1>& dataDest)",
+          "Incoherent between the received size and expected size. " << std::endl 
+          << "Expected size: " << dataDest.numElements() << std::endl 
+          << "Received size: " << dataCurrentDest.numElements());
+
+    dataDest = dataCurrentDest;
+
+    CTimer::get("CSpatialTransformFilterEngine::apply").suspend() ;
+  }
+} // namespace xios
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/filter/spatial_transform_filter.hpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/filter/spatial_transform_filter.hpp	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/filter/spatial_transform_filter.hpp	(revision 1749)
@@ -0,0 +1,147 @@
+#ifndef __XIOS_CSpatialTransformFilter__
+#define __XIOS_CSpatialTransformFilter__
+
+#include "filter.hpp"
+
+namespace xios
+{
+  class CGrid;
+  class CGridTransformation;
+  class CSpatialTransformFilterEngine;
+
+  /*!
+   * A generic filter with multiple input slots wrapping any type of spatial transformations.
+   */
+  class CSpatialTransformFilter : public CFilter
+  {
+    public:
+      /*!
+       * Constructs a filter wrapping the specified spatial transformation.
+       *
+       * \param gc the associated garbage collector
+       * \param engine the engine defining the spatial transformation
+       * \param outputValue default value of output pin
+       * \param [in] inputSlotsCount number of input, by default there is only one for field src
+       */
+      CSpatialTransformFilter(CGarbageCollector& gc, CSpatialTransformFilterEngine* engine, double outputValue, size_t inputSlotsCount = 1);
+
+      /*!
+       * Builds the filter graph needed to transform the specified source grid into the specified destination grid.
+       *
+       * \param gc the associated garbage collector
+       * \param srcGrid the source grid
+       * \param destGrid the destination grid
+       * \param hasMissingValue whether field source has missing value
+       * \param defaultValue default value
+       * \return the first and the last filters of the filter graph
+       */
+      static std::pair<std::shared_ptr<CSpatialTransformFilter>, std::shared_ptr<CSpatialTransformFilter> >
+      buildFilterGraph(CGarbageCollector& gc, CGrid* srcGrid, CGrid* destGrid, bool hasMissingValue, double defaultValue);
+
+    protected:
+      /*!
+        Overriding this function to process transformations with auxillary inputs
+      */
+      void virtual onInputReady(std::vector<CDataPacketPtr> data);
+
+    protected:
+      //! Default value of output pin
+      double outputDefaultValue;
+  }; // class CSpatialTransformFilter
+
+
+ /*!
+   * A specific spatial filter for the temporal_splitting transformation scalar -> axis. An incoming flux will be stored in an aditional dimension given by the destination axis.
+   * At each flux received, the storing index (record) is increased. When it reach the size of the axis (nrecords) a new flux is generated and the record is reset to 0
+   */
+
+ class CSpatialTemporalFilter : public CSpatialTransformFilter
+  {
+    public:
+      /*!
+       * Constructs a filter wrapping the specified spatial transformation.
+       *
+       * \param gc the associated garbage collector
+       * \param engine the engine defining the spatial transformation
+       * \param [in] gridTransformation the associated transformations
+       * \param outputValue default value of output pin
+       * \param [in] inputSlotsCount number of input, by default there is only one for field src
+       */
+      CSpatialTemporalFilter(CGarbageCollector& gc, CSpatialTransformFilterEngine* engine, CGridTransformation* gridTransformation, double outputValue, size_t inputSlotsCount = 1);
+
+
+    protected:
+      /*!
+        Overriding this function to process transformations with auxillary inputs
+      */
+      void virtual onInputReady(std::vector<CDataPacketPtr> data);
+      //! Current record in the filter
+      int record ;
+      //! Maximum number of records
+      int nrecords;
+      //! Temporary storage for output flux
+      CArray<double, 1> tmpData; 
+
+
+  }; // class CSpatialTemporalFilter
+
+
+  /*!
+   * A generic filter engine wrapping a grid transformation.
+   */
+  class CSpatialTransformFilterEngine : public IFilterEngine
+  {
+    public:
+      /*!
+       * Returns the engine wrapping the specified grid transformation.
+       * If the engine already exists it is reused, otherwise it is created.
+       *
+       * \param gridTransformation the grid transformation the engine will use
+       * \return the engine wrapping the specified grid transformation
+       */
+      static CSpatialTransformFilterEngine* get(CGridTransformation* gridTransformation);
+
+      /*!
+       * Applies the grid transformation to the input data and returns the result.
+       *
+       * \param data a vector of packets corresponding to each slot (one in this case)
+       * \param [in] defaultValue default value of output data
+       * \return the result of the grid transformation
+       */
+      CDataPacketPtr applyFilter(std::vector<CDataPacketPtr> data, double defaultValue = 0);
+
+       /*!
+       * Applies the grid transformation to the input data and returns the result.
+       *
+       * \param data a vector of packets corresponding to each slot (one in this case)
+       * \return the result of the grid transformation
+       */
+      CDataPacketPtr virtual apply(std::vector<CDataPacketPtr> data);
+
+
+
+    protected:
+      /*!
+       * Constructs a filter engine wrapping the specified grid transformation.
+       *
+       * \param gridTransformation the grid transformation the engine will use
+       */
+      CSpatialTransformFilterEngine(CGridTransformation* gridTransformation);
+
+      /*!
+       * Applies the grid transformation to the input data and returns the result.
+       * This helper function handles all the communications.
+       *
+       * \param dataSrc the source data
+       * \param dataDest the resulting transformed data
+       */
+      void apply(const CArray<double, 1>& dataSrc, CArray<double,1>& dataDest);
+
+      CGridTransformation* gridTransformation; //!< The grid transformation used by the engine
+
+      //! The allocated engines
+      static std::map<CGridTransformation*, std::shared_ptr<CSpatialTransformFilterEngine> > engines;
+  }; // class CSpatialTransformFilterEngine
+} // namespace xios
+
+#endif //__XIOS_CSpatialTransformFilter__
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/filter/store_filter.cpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/filter/store_filter.cpp	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/filter/store_filter.cpp	(revision 1749)
@@ -0,0 +1,128 @@
+#include "store_filter.hpp"
+#include "context.hpp"
+#include "grid.hpp"
+#include "timer.hpp"
+
+namespace xios
+{
+  CStoreFilter::CStoreFilter(CGarbageCollector& gc, CContext* context, CGrid* grid,
+                             bool detectMissingValues /*= false*/, double missingValue /*= 0.0*/)
+    : CInputPin(gc, 1)
+    , gc(gc)
+    , context(context)
+    , grid(grid)
+    , detectMissingValues(detectMissingValues)
+    , missingValue(missingValue)
+  {
+    if (!context)
+      ERROR("CStoreFilter::CStoreFilter(CContext* context, CGrid* grid)",
+            "Impossible to construct a store filter without providing a context.");
+    if (!grid)
+      ERROR("CStoreFilter::CStoreFilter(CContext* context, CGrid* grid)",
+            "Impossible to construct a store filter without providing a grid.");
+  }
+
+  CConstDataPacketPtr CStoreFilter::getPacket(Time timestamp)
+  {
+    CTimer timer("CStoreFilter::getPacket");
+    CConstDataPacketPtr packet;
+    const double timeout = CXios::recvFieldTimeout;
+
+    do
+    {
+      if (canBeTriggered())
+        trigger(timestamp);
+
+      timer.resume();
+
+      std::map<Time, CDataPacketPtr>::const_iterator it = packets.find(timestamp);
+      if (it != packets.end())
+        packet = it->second;
+      else // if the packet is not available yet, check if it can be received
+        context->checkBuffersAndListen();
+
+      timer.suspend();
+    } while (!packet && timer.getCumulatedTime() < timeout);
+
+    if (!packet)
+    {
+      std::map<Time, CDataPacketPtr>::const_iterator it ;
+      info(0)<<"Impossible to get the packet with timestamp = " << timestamp<<std::endl<<"Available timestamp are : "<<std::endl ;
+      for(it=packets.begin();it!=packets.end();++it) info(0)<<it->first<<"  ";
+      info(0)<<std::endl ;
+      ERROR("CConstDataPacketPtr CStoreFilter::getPacket(Time timestamp) const",
+            << "Impossible to get the packet with timestamp = " << timestamp);
+    }
+    return packet;
+  }
+
+  template <int N>
+  CDataPacket::StatusCode CStoreFilter::getData(Time timestamp, CArray<double, N>& data)
+  {
+    CConstDataPacketPtr packet = getPacket(timestamp);
+
+    if (packet->status == CDataPacket::NO_ERROR)
+      grid->outputField(packet->data, data);
+
+    return packet->status;
+  }
+
+  template CDataPacket::StatusCode CStoreFilter::getData<1>(Time timestamp, CArray<double, 1>& data);
+  template CDataPacket::StatusCode CStoreFilter::getData<2>(Time timestamp, CArray<double, 2>& data);
+  template CDataPacket::StatusCode CStoreFilter::getData<3>(Time timestamp, CArray<double, 3>& data);
+  template CDataPacket::StatusCode CStoreFilter::getData<4>(Time timestamp, CArray<double, 4>& data);
+  template CDataPacket::StatusCode CStoreFilter::getData<5>(Time timestamp, CArray<double, 5>& data);
+  template CDataPacket::StatusCode CStoreFilter::getData<6>(Time timestamp, CArray<double, 6>& data);
+  template CDataPacket::StatusCode CStoreFilter::getData<7>(Time timestamp, CArray<double, 7>& data);
+
+  void CStoreFilter::onInputReady(std::vector<CDataPacketPtr> data)
+  {
+
+    CDataPacketPtr packet;
+    if (detectMissingValues)
+    {
+      const size_t nbData = data[0]->data.numElements();
+
+      packet = CDataPacketPtr(new CDataPacket);
+      packet->date = data[0]->date;
+      packet->timestamp = data[0]->timestamp;
+      packet->status = data[0]->status;
+      packet->data.resize(nbData);
+      packet->data = data[0]->data;
+
+      for (size_t idx = 0; idx < nbData; ++idx)
+      {
+        if (NumTraits<double>::isNan(packet->data(idx)))
+          packet->data(idx) = missingValue;
+      }
+
+    }
+
+    else
+    {
+      packet = data[0];
+    }
+
+    packets.insert(std::make_pair(packet->timestamp, packet));
+    // The packet is always destroyed by the garbage collector
+    // so we register but never unregister
+    gc.registerObject(this, packet->timestamp);
+
+  }
+
+  bool CStoreFilter::mustAutoTrigger() const
+  {
+    return false;
+  }
+
+  bool CStoreFilter::isDataExpected(const CDate& date) const
+  {
+    return true;
+  }
+
+  void CStoreFilter::invalidate(Time timestamp)
+  {
+    CInputPin::invalidate(timestamp);
+    packets.erase(packets.begin(), packets.lower_bound(timestamp));
+  }
+} // namespace xios
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/filter/store_filter.hpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/filter/store_filter.hpp	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/filter/store_filter.hpp	(revision 1749)
@@ -0,0 +1,93 @@
+#ifndef __XIOS_CStoreFilter__
+#define __XIOS_CStoreFilter__
+
+#include "input_pin.hpp"
+
+namespace xios
+{
+  class CContext;
+  class CGrid;
+
+  /*!
+   * A terminal filter which stores all the packets it receives.
+   */
+  class CStoreFilter : public CInputPin
+  {
+    public:
+      /*!
+       * Constructs the filter with one input slot and an associated
+       * garbage collector for the specified grid and context.
+       *
+       * \param gc the garbage collector associated with this input pin
+       * \param context the context to which the data belongs
+       * \param grid the grid to which the data is attached
+       * \param detectMissingValues whether missing values should be detected
+       * \param missingValue the value to use to replace missing values
+       */
+      CStoreFilter(CGarbageCollector& gc, CContext* context, CGrid* grid,
+                   bool detectMissingValues = false, double missingValue = 0.0);
+
+      /*!
+       * Accesses the filter storage and retuns the packet corresponding
+       * to the specified timestamp. If there is no packet available for
+       * the specified timestamp, the function waits until the data is
+       * received or a timeout occurs.
+       *
+       * \param timestamp the timestamp of the requested packet
+       * \return a pointer to a read-only packet
+       */
+      CConstDataPacketPtr getPacket(Time timestamp);
+
+      /*!
+       * Accesses the filter storage and retuns the data corresponding
+       * to the specified timestamp. If there is no data available for
+       * the specified timestamp, the function waits until the data is
+       * received or a timeout occurs.
+       *
+       * \param timestamp the timestamp of the requested data
+       * \param data the array where the data is to be copied
+       * \return the status code associated with the data
+       */
+      template <int N>
+      CDataPacket::StatusCode getData(Time timestamp, CArray<double, N>& data);
+
+      /*!
+       * Tests if the filter must auto-trigger.
+       *
+       * \return true if the filter must auto-trigger
+       */
+      bool virtual mustAutoTrigger() const;
+
+      /*!
+       * Tests whether data is expected for the specified date.
+       *
+       * \param date the date associated to the data
+       */
+      bool virtual isDataExpected(const CDate& date) const;
+
+      /*!
+       * Removes all pending packets which are older than the specified timestamp.
+       *
+       * \param timestamp the timestamp used for invalidation
+       */
+      void virtual invalidate(Time timestamp);
+
+    protected:
+      /*!
+       * Stores the packet for later access.
+       *
+       * \param data a vector of packets corresponding to each slot
+       */
+      void virtual onInputReady(std::vector<CDataPacketPtr> data);
+
+    private:
+      CGarbageCollector& gc; //!< The garbage collector associated to the filter
+      CContext* context; //!< The context to which the data belongs
+      CGrid* grid; //!< The grid attached to the data the filter can accept
+      const bool detectMissingValues; //!< Whether missing values should be detected
+      const double missingValue; //!< The value to use to replace missing values
+      std::map<Time, CDataPacketPtr> packets; //<! The stored packets
+  }; // class CStoreFilter
+} // namespace xios
+
+#endif //__XIOS_CStoreFilter__
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/filter/temporal_filter.cpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/filter/temporal_filter.cpp	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/filter/temporal_filter.cpp	(revision 1749)
@@ -0,0 +1,127 @@
+#include "temporal_filter.hpp"
+#include "functor_type.hpp"
+#include "calendar_util.hpp"
+
+namespace xios
+{
+  static func::CFunctor* createFunctor(const std::string& opId, bool ignoreMissingValue, CArray<double, 1>& tmpData);
+
+  CTemporalFilter::CTemporalFilter(CGarbageCollector& gc, const std::string& opId,
+                                   const CDate& initDate, const CDuration samplingFreq, const CDuration samplingOffset, const CDuration opFreq,
+                                   bool ignoreMissingValue /*= false*/)
+    : CFilter(gc, 1, this)
+    , functor(createFunctor(opId, ignoreMissingValue, tmpData))
+    , isOnceOperation(functor->timeType() == func::CFunctor::once)
+    , isInstantOperation(functor->timeType() == func::CFunctor::instant)
+    , samplingFreq(samplingFreq)
+    , samplingOffset(samplingOffset)
+    , opFreq(opFreq)
+    , offsetMonth(0, this->samplingOffset.month, 0, 0, 0, 0, 0)
+    , offsetAllButMonth(this->samplingOffset.year, 0 , this->samplingOffset.day,
+                        this->samplingOffset.hour, this->samplingOffset.minute,
+                        this->samplingOffset.second, this->samplingOffset.timestep)
+    , initDate(initDate)
+//    , nextSamplingDate(initDate + (this->samplingOffset + initDate.getRelCalendar().getTimeStep()))
+    , nextSamplingDate(initDate + offsetMonth + ( offsetAllButMonth + initDate.getRelCalendar().getTimeStep()))
+    , nbOperationDates(1)
+    , nbSamplingDates(0)
+//    , nextOperationDate(initDate + opFreq + this->samplingOffset)
+    , isFirstOperation(true)
+  {
+  }
+
+  CDataPacketPtr CTemporalFilter::apply(std::vector<CDataPacketPtr> data)
+  {
+    CDataPacketPtr packet;
+
+    if (data[0]->status != CDataPacket::END_OF_STREAM)
+    {
+      bool usePacket, outputResult, copyLess;
+      if (isOnceOperation)
+        usePacket = outputResult = copyLess = isFirstOperation;
+      else
+      {
+        usePacket = (data[0]->date >= nextSamplingDate);
+//        outputResult = (data[0]->date + samplingFreq > nextOperationDate);
+        outputResult = (data[0]->date  > initDate + nbOperationDates*opFreq - samplingFreq + offsetMonth + offsetAllButMonth);
+        copyLess = (isInstantOperation && usePacket && outputResult);
+      }
+
+      if (usePacket)
+      {
+        nbSamplingDates ++;
+        if (!copyLess)
+        {
+          if (!tmpData.numElements())
+            tmpData.resize(data[0]->data.numElements());
+
+          (*functor)(data[0]->data);
+        }
+
+        nextSamplingDate = ((initDate + offsetMonth) + nbSamplingDates * samplingFreq) + offsetAllButMonth + initDate.getRelCalendar().getTimeStep();
+      }
+
+      if (outputResult)
+      {
+        nbOperationDates ++;
+        if (!copyLess)
+        {
+          functor->final();
+
+          packet = CDataPacketPtr(new CDataPacket);
+          packet->date = data[0]->date;
+          packet->timestamp = data[0]->timestamp;
+          packet->status = data[0]->status;
+          packet->data.resize(tmpData.numElements());
+          packet->data = tmpData;
+        }
+        else
+          packet = data[0];
+
+        isFirstOperation = false;
+//        nextOperationDate = initDate + samplingFreq + nbOperationDates*opFreq - samplingFreq + offsetMonth + offsetAllButMonth;
+      }
+    }
+
+    return packet;
+  }
+
+  bool CTemporalFilter::mustAutoTrigger() const
+  {
+    return true;
+  }
+
+  bool CTemporalFilter::isDataExpected(const CDate& date) const
+  {
+//    return isOnceOperation ? isFirstOperation : (date >= nextSamplingDate || date + samplingFreq > nextOperationDate);
+    return isOnceOperation ? isFirstOperation : (date >= nextSamplingDate || date > initDate + nbOperationDates*opFreq - samplingFreq + offsetMonth + offsetAllButMonth);
+  }
+
+  static func::CFunctor* createFunctor(const std::string& opId, bool ignoreMissingValue, CArray<double, 1>& tmpData)
+  {
+    func::CFunctor* functor = NULL;
+
+    double defaultValue = std::numeric_limits<double>::quiet_NaN();
+
+#define DECLARE_FUNCTOR(MType, mtype) \
+    if (opId.compare(#mtype) == 0) \
+    { \
+      if (ignoreMissingValue) \
+      { \
+        functor = new func::C##MType(tmpData, defaultValue); \
+      } \
+      else \
+      { \
+        functor = new func::C##MType(tmpData); \
+      } \
+    }
+
+#include "functor_type.conf"
+
+    if (!functor)
+      ERROR("createFunctor(const std::string& opId, ...)",
+            << "\"" << opId << "\" is not a valid operation.");
+
+    return functor;
+  }
+} // namespace xios
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/filter/temporal_filter.hpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/filter/temporal_filter.hpp	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/filter/temporal_filter.hpp	(revision 1749)
@@ -0,0 +1,75 @@
+#ifndef __XIOS_CTemporalFilter__
+#define __XIOS_CTemporalFilter__
+
+#include "filter.hpp"
+#include <boost/smart_ptr/scoped_ptr.hpp>
+#include "functor.hpp"
+#include "array_new.hpp"
+
+namespace xios
+{
+  /*!
+   * A generic temporal filter with one input slot wrapping any type of temporal operation.
+   */
+  class CTemporalFilter : public CFilter, public IFilterEngine
+  {
+    public:
+      /*!
+       * Constructs a temporal filter wrapping the specified temporal operation.
+       *
+       * \param gc the associated garbage collector
+       * \param opId the string identifying the temporal operation
+       * \param initDate the origin of time
+       * \param samplingFreq the sampling frequency, i.e. the frequency at which the input data will be used
+       * \param samplingOffset the sampling offset, i.e. the offset after which the input data will be used
+       * \param opFreq the operation frequency, i.e. the frequency at which the output data will be computed
+       * \param ignoreMissingValue true if and only if the missing value must be ignored
+                                   when doing the operation
+       */
+      CTemporalFilter(CGarbageCollector& gc, const std::string& opId,
+                      const CDate& initDate, const CDuration samplingFreq, const CDuration samplingOffset, const CDuration opFreq,
+                      bool ignoreMissingValue = false);
+
+      /*!
+       * Applies the temporal operation to the input data and returns the result when it is ready.
+       *
+       * \param data a vector of packets corresponding to each slot (one in this case)
+       * \return the result of the temporal operation or null if it is not ready yet
+       */
+      CDataPacketPtr virtual apply(std::vector<CDataPacketPtr> data);
+
+      /*!
+       * Tests if the filter must auto-trigger.
+       *
+       * \return true if the filter must auto-trigger
+       */
+      bool virtual mustAutoTrigger() const;
+
+      /*!
+       * Tests whether data is expected for the specified date.
+       *
+       * \param date the date associated to the data
+       */
+      bool virtual isDataExpected(const CDate& date) const;
+
+    private:
+      // Warning the declaration order matters here, double-check the constructor before changing it
+      CArray<double, 1> tmpData; //!< The array of data used for temporary storage
+      const boost::scoped_ptr<func::CFunctor> functor; //!< The functor corresponding to the temporal operation
+      const bool isOnceOperation; //!< True if the operation should be computed just once
+      const bool isInstantOperation; //!< True if the operation is instant
+      const CDuration samplingFreq; //!< The sampling frequency, i.e. the frequency at which the input data will be used
+      const CDuration samplingOffset; //!< The sampling offset, i.e. the offset after which the input data will be used
+      const CDuration opFreq; //!< The operation frequency, i.e. the frequency at which the output data will be computed
+      const CDuration offsetMonth; //!< The month duration of samplingOffset
+      CDuration offsetAllButMonth; //!< All but the month duration of samplingOffset
+      const CDate initDate;
+      CDate nextSamplingDate; //!< The date of the next sampling
+      int nbOperationDates; //!< The number of times an operation is performed
+      int nbSamplingDates;
+//      CDate nextOperationDate; //!< The date of the next operation
+      bool isFirstOperation; //!< True before the first operation was been computed
+  }; // class CTemporalFilter
+} // namespace xios
+
+#endif //__XIOS_CTemporalFilter__
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/filter/ternary_arithmetic_filter.cpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/filter/ternary_arithmetic_filter.cpp	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/filter/ternary_arithmetic_filter.cpp	(revision 1749)
@@ -0,0 +1,171 @@
+#include "ternary_arithmetic_filter.hpp"
+
+namespace xios
+{
+  CScalarScalarFieldArithmeticFilter::CScalarScalarFieldArithmeticFilter(CGarbageCollector& gc, const std::string& op, double value1, double value2)
+    : CFilter(gc, 1, this)
+    , op(operatorExpr.getOpScalarScalarField(op))
+    , value1(value1)
+    , value2(value2)
+  { /* Nothing to do */ };
+
+  CDataPacketPtr CScalarScalarFieldArithmeticFilter::apply(std::vector<CDataPacketPtr> data)
+  {
+    CDataPacketPtr packet(new CDataPacket);
+    packet->date = data[0]->date;
+    packet->timestamp = data[0]->timestamp;
+    packet->status = data[0]->status;
+
+    if (packet->status == CDataPacket::NO_ERROR)
+      packet->data.reference(op(value1,value2, data[0]->data));
+
+    return packet;
+  }
+
+  CScalarFieldScalarArithmeticFilter::CScalarFieldScalarArithmeticFilter(CGarbageCollector& gc, const std::string& op, double value1, double value2)
+    : CFilter(gc, 1, this)
+    , op(operatorExpr.getOpScalarFieldScalar(op))
+    , value1(value1)
+    , value2(value2)
+  { /* Nothing to do */ };
+
+  CDataPacketPtr CScalarFieldScalarArithmeticFilter::apply(std::vector<CDataPacketPtr> data)
+  {
+    CDataPacketPtr packet(new CDataPacket);
+    packet->date = data[0]->date;
+    packet->timestamp = data[0]->timestamp;
+    packet->status = data[0]->status;
+
+    if (packet->status == CDataPacket::NO_ERROR)
+      packet->data.reference(op(value1, data[0]->data,value2));
+
+    return packet;
+  }
+
+  CScalarFieldFieldArithmeticFilter::CScalarFieldFieldArithmeticFilter(CGarbageCollector& gc, const std::string& op, double value)
+    : CFilter(gc, 2, this)
+    , op(operatorExpr.getOpScalarFieldField(op))
+    , value(value)
+  { /* Nothing to do */ };
+
+  CDataPacketPtr CScalarFieldFieldArithmeticFilter::apply(std::vector<CDataPacketPtr> data)
+  {
+    CDataPacketPtr packet(new CDataPacket);
+    packet->date = data[0]->date;
+    packet->timestamp = data[0]->timestamp;
+    packet->status = data[0]->status;
+
+    if (data[0]->status != CDataPacket::NO_ERROR)
+      packet->status = data[0]->status;
+    else if (data[1]->status != CDataPacket::NO_ERROR)
+      packet->status = data[1]->status;
+    else
+    { 
+      packet->status = CDataPacket::NO_ERROR;
+      packet->data.reference(op(value, data[0]->data, data[1]->data));
+    }
+    return packet;
+
+  }
+
+
+  CFieldScalarScalarArithmeticFilter::CFieldScalarScalarArithmeticFilter(CGarbageCollector& gc, const std::string& op, double value1, double value2)
+    : CFilter(gc, 1, this)
+    , op(operatorExpr.getOpFieldScalarScalar(op))
+    , value1(value1)
+    , value2(value2)
+  { /* Nothing to do */ };
+
+  CDataPacketPtr CFieldScalarScalarArithmeticFilter::apply(std::vector<CDataPacketPtr> data)
+  {
+    CDataPacketPtr packet(new CDataPacket);
+    packet->date = data[0]->date;
+    packet->timestamp = data[0]->timestamp;
+    packet->status = data[0]->status;
+
+    if (packet->status == CDataPacket::NO_ERROR)
+      packet->data.reference(op(data[0]->data, value1, value2));
+
+    return packet;
+  }
+
+
+  CFieldScalarFieldArithmeticFilter::CFieldScalarFieldArithmeticFilter(CGarbageCollector& gc, const std::string& op, double value)
+    : CFilter(gc, 2, this)
+    , op(operatorExpr.getOpFieldScalarField(op))
+    , value(value)
+  { /* Nothing to do */ };
+
+  CDataPacketPtr CFieldScalarFieldArithmeticFilter::apply(std::vector<CDataPacketPtr> data)
+  {
+    CDataPacketPtr packet(new CDataPacket);
+    packet->date = data[0]->date;
+    packet->timestamp = data[0]->timestamp;
+    packet->status = data[0]->status;
+
+    if (data[0]->status != CDataPacket::NO_ERROR)
+      packet->status = data[0]->status;
+    else if (data[1]->status != CDataPacket::NO_ERROR)
+      packet->status = data[1]->status;
+    else
+    { 
+      packet->status = CDataPacket::NO_ERROR;
+      packet->data.reference(op(data[0]->data, value, data[1]->data));
+    }
+    return packet;
+  }
+  
+   CFieldFieldScalarArithmeticFilter::CFieldFieldScalarArithmeticFilter(CGarbageCollector& gc, const std::string& op, double value)
+    : CFilter(gc, 2, this)
+    , op(operatorExpr.getOpFieldFieldScalar(op))
+    , value(value)
+  { /* Nothing to do */ };
+
+  CDataPacketPtr CFieldFieldScalarArithmeticFilter::apply(std::vector<CDataPacketPtr> data)
+  {
+    CDataPacketPtr packet(new CDataPacket);
+    packet->date = data[0]->date;
+    packet->timestamp = data[0]->timestamp;
+    packet->status = data[0]->status;
+
+    if (data[0]->status != CDataPacket::NO_ERROR)
+      packet->status = data[0]->status;
+    else if (data[1]->status != CDataPacket::NO_ERROR)
+      packet->status = data[1]->status;
+    else
+    { 
+      packet->status = CDataPacket::NO_ERROR;
+      packet->data.reference(op(data[0]->data, data[1]->data, value));
+    }
+    return packet;
+  } 
+  
+ 
+  CFieldFieldFieldArithmeticFilter::CFieldFieldFieldArithmeticFilter(CGarbageCollector& gc, const std::string& op)
+    : CFilter(gc, 3, this)
+    , op(operatorExpr.getOpFieldFieldField(op))
+  { /* Nothing to do */ };
+
+  CDataPacketPtr CFieldFieldFieldArithmeticFilter::apply(std::vector<CDataPacketPtr> data)
+  {
+    CDataPacketPtr packet(new CDataPacket);
+    packet->date = data[0]->date;
+    packet->timestamp = data[0]->timestamp;
+    packet->status = data[0]->status;
+
+    if (data[0]->status != CDataPacket::NO_ERROR)
+      packet->status = data[0]->status;
+    else if (data[1]->status != CDataPacket::NO_ERROR)
+      packet->status = data[1]->status;
+    else if (data[2]->status != CDataPacket::NO_ERROR)
+      packet->status = data[2]->status;
+    else
+    { 
+      packet->status = CDataPacket::NO_ERROR;
+      packet->data.reference(op(data[0]->data, data[1]->data, data[2]->data));
+    }
+    return packet;
+  } 
+  
+} // namespace xios
+
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/filter/ternary_arithmetic_filter.hpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/filter/ternary_arithmetic_filter.hpp	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/filter/ternary_arithmetic_filter.hpp	(revision 1749)
@@ -0,0 +1,220 @@
+#ifndef __XIOS_CTernaryArithmeticFilter__
+#define __XIOS_CTernaryArithmeticFilter__
+
+#include "filter.hpp"
+#include <string>
+#include "operator_expr.hpp"
+
+namespace xios
+{
+  /*!
+   * A generic ternary arithmetic filter wrapping any type of ternary scalar-scalar-field operator.
+   */
+  class CScalarScalarFieldArithmeticFilter : public CFilter, public IFilterEngine
+  {
+    public:
+      /*!
+       * Constructs an ternary scalar-field arithmetic filter wrapping the specified operator.
+       *
+       * \param gc the associated garbage collector
+       * \param op the string identifing the ternary scalar-scalar-field operator
+       * \param value1 the scalar value
+       * \param value2 the scalar value
+       */
+      CScalarScalarFieldArithmeticFilter(CGarbageCollector& gc, const std::string& op, double value1, double value2);
+
+    protected:
+      COperatorExpr::functionScalarScalarField op; //!< The ternary scalar-scalar-field operator attached to the ternary arithmeric filter
+      double value1; //!< The scalar value 1 associated with the ternary arithmeric filter
+      double value2; //!< The scalar value 2 associated with the ternary arithmeric filter
+
+      /*!
+       * Applies the ternary scalar-scalar-field operator to the input data and returns the result.
+       *
+       * \param data a vector of packets corresponding to each slot (one in this case)
+       * \return the result of the ternary operation
+       */
+      CDataPacketPtr virtual apply(std::vector<CDataPacketPtr> data);
+  }; // class CScalarScalarFieldArithmeticFilter
+
+ 
+   /*!
+   * A generic ternary arithmetic filter wrapping any type of ternary scalar-field-scalar operator.
+   */
+  class CScalarFieldScalarArithmeticFilter : public CFilter, public IFilterEngine
+  {
+    public:
+      /*!
+       * Constructs an ternary scalar-field arithmetic filter wrapping the specified operator.
+       *
+       * \param gc the associated garbage collector
+       * \param op the string identifing the ternary scalar-field-scalar operator
+       * \param value1 the scalar value
+       * \param value2 the scalar value
+       */
+      CScalarFieldScalarArithmeticFilter(CGarbageCollector& gc, const std::string& op, double value1, double value2);
+
+    protected:
+      COperatorExpr::functionScalarFieldScalar op; //!< The ternary scalar-field-scalar operator attached to the ternary arithmeric filter
+      double value1; //!< The scalar value 1 associated with the ternary arithmeric filter
+      double value2; //!< The scalar value 2 associated with the ternary arithmeric filter
+
+      /*!
+       * Applies the ternary scalar-field-scalar operator to the input data and returns the result.
+       *
+       * \param data a vector of packets corresponding to each slot (one in this case)
+       * \return the result of the ternary operation
+       */
+      CDataPacketPtr virtual apply(std::vector<CDataPacketPtr> data);
+  }; // class CScalarScalarFieldArithmeticFilter
+
+  /*!
+   * A generic ternary arithmetic filter wrapping any type of ternary scalar-field-field operator.
+   */
+  class CScalarFieldFieldArithmeticFilter : public CFilter, public IFilterEngine
+  {
+    public:
+      /*!
+       * Constructs an ternary scalar-field arithmetic filter wrapping the specified operator.
+       *
+       * \param gc the associated garbage collector
+       * \param op the string identifing the ternary scalar-field-field operator
+       * \param value the scalar value
+       */
+      CScalarFieldFieldArithmeticFilter(CGarbageCollector& gc, const std::string& op, double value);
+
+    protected:
+      COperatorExpr::functionScalarFieldField op; //!< The ternary scalar-field-scalar operator attached to the ternary arithmeric filter
+      double value; //!< The scalar value 1 associated with the ternary arithmeric filter
+
+      /*!
+       * Applies the ternary scalar-field-field operator to the input data and returns the result.
+       *
+       * \param data a vector of packets corresponding to each slot (one in this case)
+       * \return the result of the ternary operation
+       */
+      CDataPacketPtr virtual apply(std::vector<CDataPacketPtr> data);
+  }; // class CScalarScalarFieldArithmeticFilter
+
+
+
+ /*!
+   * A generic ternary arithmetic filter wrapping any type of ternary field-scalar-scalar operator.
+   */
+  class CFieldScalarScalarArithmeticFilter : public CFilter, public IFilterEngine
+  {
+    public:
+      /*!
+       * Constructs an ternary field-scalar-scalar arithmetic filter wrapping the specified operator.
+       *
+       * \param gc the associated garbage collector
+       * \param op the string identifing the ternary field-scalar-scalar operator
+       * \param value1 the scalar value
+       * \param value2 the scalar value
+       */
+      CFieldScalarScalarArithmeticFilter(CGarbageCollector& gc, const std::string& op, double value1, double value2);
+
+    protected:
+      COperatorExpr::functionFieldScalarScalar op; //!< The ternary field-scalar-scalar operator attached to the ternary arithmeric filter
+      double value1; //!< The scalar value 1 associated with the ternary arithmeric filter
+      double value2; //!< The scalar value 2 associated with the ternary arithmeric filter
+
+      /*!
+       * Applies the ternary field-scalar-scalar operator to the input data and returns the result.
+       *
+       * \param data a vector of packets corresponding to each slot (one in this case)
+       * \return the result of the ternary operation
+       */
+      CDataPacketPtr virtual apply(std::vector<CDataPacketPtr> data);
+  }; // class CFieldScalarScalarArithmeticFilter
+
+
+/*!
+   * A generic ternary arithmetic filter wrapping any type of ternary field-scalar-field operator.
+   */
+  class CFieldScalarFieldArithmeticFilter : public CFilter, public IFilterEngine
+  {
+    public:
+      /*!
+       * Constructs an ternary field-scalar-field arithmetic filter wrapping the specified operator.
+       *
+       * \param gc the associated garbage collector
+       * \param op the string identifing the ternary field-scalar-field operator
+       * \param value the scalar value
+       */
+      CFieldScalarFieldArithmeticFilter(CGarbageCollector& gc, const std::string& op, double value);
+
+    protected:
+      COperatorExpr::functionFieldScalarField op; //!< The ternary field-scalar-field operator attached to the ternary arithmeric filter
+      double value; //!< The scalar value associated with the ternary arithmeric filter
+
+      /*!
+       * Applies the ternary field-scalar-field operator to the input data and returns the result.
+       *
+       * \param data a vector of packets corresponding to each slot (one in this case)
+       * \return the result of the ternary operation
+       */
+      CDataPacketPtr virtual apply(std::vector<CDataPacketPtr> data);
+  }; // class CFieldScalarFieldArithmeticFilter
+
+
+/*!
+   * A generic ternary arithmetic filter wrapping any type of ternary field-field-scalar operator.
+   */
+  class CFieldFieldScalarArithmeticFilter : public CFilter, public IFilterEngine
+  {
+    public:
+      /*!
+       * Constructs an ternary field-field-scalar arithmetic filter wrapping the specified operator.
+       *
+       * \param gc the associated garbage collector
+       * \param op the string identifing the ternary field-scalar-field operator
+       * \param value the scalar value
+       */
+      CFieldFieldScalarArithmeticFilter(CGarbageCollector& gc, const std::string& op, double value);
+
+    protected:
+      COperatorExpr::functionFieldFieldScalar op; //!< The ternary field-field-scalar operator attached to the ternary arithmeric filter
+      double value; //!< The scalar value associated with the ternary arithmeric filter
+
+      /*!
+       * Applies the ternary field-field-scalar operator to the input data and returns the result.
+       *
+       * \param data a vector of packets corresponding to each slot (one in this case)
+       * \return the result of the ternary operation
+       */
+      CDataPacketPtr virtual apply(std::vector<CDataPacketPtr> data);
+  }; // class CFieldFielScalardArithmeticFilter
+
+
+/*!
+   * A generic ternary arithmetic filter wrapping any type of ternary field-field-field operator.
+   */
+  class CFieldFieldFieldArithmeticFilter : public CFilter, public IFilterEngine
+  {
+    public:
+      /*!
+       * Constructs an ternary field-field-scalar arithmetic filter wrapping the specified operator.
+       *
+       * \param gc the associated garbage collector
+       * \param op the string identifing the ternary field-scalar-field operator
+       */
+      CFieldFieldFieldArithmeticFilter(CGarbageCollector& gc, const std::string& op);
+
+    protected:
+      COperatorExpr::functionFieldFieldField op; //!< The ternary field-field-field operator attached to the ternary arithmeric filter
+
+      /*!
+       * Applies the ternary field-field-field operator to the input data and returns the result.
+       *
+       * \param data a vector of packets corresponding to each slot (one in this case)
+       * \return the result of the ternary operation
+       */
+      CDataPacketPtr virtual apply(std::vector<CDataPacketPtr> data);
+  }; // class CFieldFielFieldArithmeticFilter
+
+
+} // namespace xios
+
+#endif //__XIOS_CTernaryArithmeticFilter__
+
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/filter/unary_arithmetic_filter.cpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/filter/unary_arithmetic_filter.cpp	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/filter/unary_arithmetic_filter.cpp	(revision 1749)
@@ -0,0 +1,22 @@
+#include "unary_arithmetic_filter.hpp"
+
+namespace xios
+{
+  CUnaryArithmeticFilter::CUnaryArithmeticFilter(CGarbageCollector& gc, const std::string& op)
+    : CFilter(gc, 1, this)
+    , op(operatorExpr.getOpField(op))
+  { /* Nothing to do */ };
+
+  CDataPacketPtr CUnaryArithmeticFilter::apply(std::vector<CDataPacketPtr> data)
+  {
+    CDataPacketPtr packet(new CDataPacket);
+    packet->date = data[0]->date;
+    packet->timestamp = data[0]->timestamp;
+    packet->status = data[0]->status;
+
+    if (packet->status == CDataPacket::NO_ERROR)
+      packet->data.reference(op(data[0]->data));
+
+    return packet;
+  }
+} // namespace xios
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/filter/unary_arithmetic_filter.hpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/filter/unary_arithmetic_filter.hpp	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/filter/unary_arithmetic_filter.hpp	(revision 1749)
@@ -0,0 +1,39 @@
+#ifndef __XIOS_CUnaryArithmeticFilter__
+#define __XIOS_CUnaryArithmeticFilter__
+
+#include "filter.hpp"
+#include <string>
+#include "operator_expr.hpp"
+
+namespace xios
+{
+  /*!
+   * A generic unary arithmetic filter wrapping any type of unary operator
+   * which can be applied on fields.
+   */
+  class CUnaryArithmeticFilter : public CFilter, public IFilterEngine
+  {
+    public:
+      /*!
+       * Constructs an unary arithmetic filter wrapping the specified operator.
+       *
+       * \param gc the associated garbage collector
+       * \param op the string identifing the unary operator
+       */
+      CUnaryArithmeticFilter(CGarbageCollector& gc, const std::string& op);
+
+    protected:
+      COperatorExpr::functionField op; //!< The unary operator attached to the unary arithmeric filter
+
+
+      /*!
+       * Applies the unary operator to the input data and returns the result.
+       *
+       * \param data a vector of packets corresponding to each slot (one in this case)
+       * \return the result of the unary operation
+       */
+      CDataPacketPtr virtual apply(std::vector<CDataPacketPtr> data);
+  }; // class CUnaryArithmeticFilter
+} // namespace xios
+
+#endif //__XIOS_CUnaryArithmeticFilter__
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/functor.cpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/functor.cpp	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/functor.cpp	(revision 1749)
@@ -0,0 +1,66 @@
+#include "functor.hpp"
+#include "array_new.hpp"
+
+namespace xios
+{
+   namespace func
+   {
+      /// ////////////////////// DÃ©finitions ////////////////////// ///
+
+      CFunctor::CFunctor(const StdString & id, CArray<double, 1>& doutput)
+         : SuperClass(id), doutput(doutput), nbcall(0),hasMissingValue(false)
+      { /* Ne rien faire de plus */  }
+ 
+      CFunctor::CFunctor(const StdString & id, CArray<double, 1>& doutput, double missingValue)
+         : SuperClass(id), doutput(doutput), nbcall(0),hasMissingValue(true),missingValue(missingValue)
+      { 
+        /* Ne rien faire de plus */
+      }
+
+      CFunctor::~CFunctor(void)
+      { /* Ne rien faire de plus */ }
+
+      //---------------------------------------------------------------
+
+      CArray<double,1> CFunctor::getDataOutput(void) const
+      { 
+         return (this->doutput);
+      }
+
+      //---------------------------------------------------------------
+
+      StdString CFunctor::toString(void) const
+      {
+         ERROR("CFunctor::toString()", << "Not implemented yet !");
+         return (SuperClass::getId());
+      }
+
+      void CFunctor::fromString(const StdString & str)
+      {
+         ERROR("CFunctor::fromString(str)",
+                << "[ str = " << str << "] Not implemented yet !");
+      }
+
+      //---------------------------------------------------------------
+
+      CArray<double,1> CFunctor::operator ()(const CArray<double,1>& dinput)
+      {
+         this->nbcall++;
+         if (dinput.numElements() != this->doutput.numElements())
+            ERROR("CFunctor::operator ()(dinput)",
+                   << "[ input size = "  << dinput.numElements()
+                   << ", output size = " << this->doutput.numElements() << " ]"
+                   << " size of input array !=  size of output array !");
+         this->apply(dinput, this->doutput);
+         return (this->doutput);
+      }
+
+      void CFunctor::final(void) 
+      {
+        this->nbcall = 0;
+      } 
+
+      //---------------------------------------------------------------
+
+   } // namespace func
+} // namespace xios
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/functor.hpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/functor.hpp	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/functor.hpp	(revision 1749)
@@ -0,0 +1,62 @@
+#ifndef __XIOS_CFunctor__
+#define __XIOS_CFunctor__
+
+/// XIOS headers ///
+#include "xios_spl.hpp"
+#include "exception.hpp"
+#include "array_new.hpp"
+
+namespace xios
+{
+   namespace func
+   {
+      /// ////////////////////// DÃ©clarations ////////////////////// ///
+      class CFunctor : public CObject
+      {
+         /// DÃ©finition de type ///
+         typedef CObject SuperClass;
+         public :
+         enum ETimeType { once, instant, centered } ;
+
+            /// Accesseurs ///
+            CArray<double,1> getDataOutput(void) const;
+            /// OpÃ©rateur ///
+            CArray<double,1> operator ()(const CArray<double,1>& dinput);
+            virtual ETimeType timeType(void) = 0 ;
+
+            /// Destructeur ///
+            virtual ~CFunctor(void);
+
+            //Traitement ///
+            virtual void final(void);
+
+         protected :
+
+            /// Traitement ///
+            virtual void apply(const CArray<double,1>& dinput, CArray<double,1>& doutput) = 0;
+
+            /// Autres ///
+            virtual StdString toString(void) const;
+            virtual void fromString(const StdString & str);
+
+            /// Constructeurs ///
+            CFunctor(void);                             // Not implemented.
+            CFunctor(const StdString & id, CArray<double,1>& doutput);
+            CFunctor(const StdString & id, CArray<double,1>& doutput, double missingValue);
+           CFunctor(const CFunctor & functor);         // Not implemented.
+            CFunctor(const CFunctor * const functor);   // Not implemented.
+         protected :
+            /// PropriÃ©tÃ©s privÃ©es ///
+            CArray<double,1>& doutput;
+            /// PropriÃ©tÃ©s protÃ©gÃ©es ///   
+            int nbcall;            
+            bool hasMissingValue ;
+            double missingValue ;
+            CArray<int,1> nbcalls ;
+      }; // class CFunctor
+   } // namespace func
+} // namespace xios
+
+//#include "functor_type.hpp"
+
+#endif // __XIOS_CFunctor__
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/functor/accumulate.cpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/functor/accumulate.cpp	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/functor/accumulate.cpp	(revision 1749)
@@ -0,0 +1,52 @@
+#include "accumulate.hpp"
+#include "array_new.hpp"
+#include "utils.hpp"
+
+namespace xios
+{
+   namespace func
+   {
+      /// ////////////////////// DÃ©finitions ////////////////////// ///
+
+      CAccumulate::CAccumulate(CArray<double,1>& doutput)
+         : SuperClass(StdString("accumulate"), doutput)
+      { /* Ne rien faire de plus */ }
+
+      CAccumulate::CAccumulate(CArray<double,1>& doutput, double missingValue)
+         : SuperClass(StdString("accumulate"), doutput, missingValue)
+      { /* Ne rien faire de plus */ }
+
+      CAccumulate::~CAccumulate(void)
+      { /* Ne rien faire de plus */ }
+
+      //---------------------------------------------------------------
+
+      void CAccumulate::apply(const CArray<double,1>& _dinput,
+                                 CArray<double,1>& _doutput)
+      {
+        if (this->nbcall == 1) _doutput=_dinput ;
+        else 
+        {
+          if (hasMissingValue)
+          {
+            int i, n =_dinput.numElements() ;
+            const double * in=_dinput.dataFirst() ;
+            double* out=_doutput.dataFirst();
+            for (i=0; i<n; ++i,++in,++out) 
+              if (!NumTraits<double>::isNan(*in))
+              {
+                if(!NumTraits<double>::isNan(*out)) *out  += *in;
+                else *out=*in ;
+              }
+          }
+          else _doutput+=_dinput ;
+        }
+      }
+      
+      
+      void CAccumulate::final(void)
+      {
+        this->nbcall = 0; 
+      }
+   } // namespace func
+} // namespace xios
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/functor/accumulate.hpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/functor/accumulate.hpp	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/functor/accumulate.hpp	(revision 1749)
@@ -0,0 +1,41 @@
+#ifndef __XIOS_CAccumulate__
+#define __XIOS_CAccumulate__
+
+/// XIOS headers ///
+#include "functor.hpp"
+#include "array_new.hpp"
+
+namespace xios
+{
+   namespace func
+   {
+      /// ////////////////////// DÃ©clarations ////////////////////// ///
+      class CAccumulate : public CFunctor
+      {
+         /// DÃ©finition de type ///
+         typedef CFunctor SuperClass;
+
+         public :
+
+            /// Constructeurs ///
+            //CAccumulate(void);                             // Not implemented.
+            //CAccumulate(const CFunData & data);
+            CAccumulate(CArray<double,1>& doutput);
+            CAccumulate(CArray<double,1>& doutput, double missingValue);
+            //CAccumulate(const CAccumulate & accumulate);         // Not implemented.
+            //CAccumulate(const CAccumulate * const accumulate);   // Not implemented.
+
+            /// Traitement ///
+            virtual void apply(const CArray<double,1>& dinput, CArray<double,1>& doutput);
+            virtual void final(void) ;
+            virtual ETimeType timeType(void) { return centered ; }
+            
+            /// Destructeur ///
+            virtual ~CAccumulate(void);
+
+      }; // class CAccumulate
+
+   } // namespace func
+} // namespace xios
+
+#endif //__XIOS_CAccumulate__
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/functor/average.cpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/functor/average.cpp	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/functor/average.cpp	(revision 1749)
@@ -0,0 +1,89 @@
+#include "average.hpp"
+#include "array_new.hpp"
+#include "utils.hpp"
+
+namespace xios
+{
+   namespace func
+   {
+      /// ////////////////////// DÃ©finitions ////////////////////// ///
+
+      CAverage::CAverage(CArray<double,1>& doutput)
+         : SuperClass(StdString("average"), doutput)
+      { /* Ne rien faire de plus */ }
+
+      CAverage::CAverage(CArray<double,1>& doutput, double missingValue)
+         : SuperClass(StdString("average"), doutput, missingValue)
+      { /* Ne rien faire de plus */ }
+
+      CAverage::~CAverage(void)
+      { /* Ne rien faire de plus */ }
+
+      //---------------------------------------------------------------
+
+      void CAverage::apply(const CArray<double,1>& _dinput,
+                                 CArray<double,1>& _doutput)
+      {
+        if (hasMissingValue)
+        {
+          if (nbcalls.numElements()==0) 
+          {
+             nbcalls.resize(_dinput.numElements()) ;
+             nbcalls=0 ;
+          }
+        }
+        
+        if (this->nbcall == 1) 
+        {
+          _doutput=_dinput ;
+          if (hasMissingValue) 
+          {
+            int i, n =_dinput.numElements() ;
+            const double * in=_dinput.dataFirst() ;
+            int* nc=nbcalls.dataFirst() ;
+            for (i=0; i<n; ++i,++nc,++in) 
+              if (!NumTraits<double>::isNan(*in)) (*nc) ++;
+          }
+        }
+        else
+        {
+          if (hasMissingValue)
+          {
+            int i, n =_dinput.numElements() ;
+            const double * in=_dinput.dataFirst() ;
+            double* out=_doutput.dataFirst();
+            int* nc=nbcalls.dataFirst() ;
+            for (i=0; i<n; ++i,++in,++out,++nc) 
+              if (!NumTraits<double>::isNan(*in)) 
+              {
+                if (*nc != 0) (*out)  += *in;
+                else *out = *in ;
+                (*nc) ++;
+              } 
+          }
+          else _doutput+=_dinput ;
+        }
+      
+      }
+      
+      void CAverage::final(void)
+      {
+        if (hasMissingValue)
+        {
+          int i, n = nbcalls.numElements() ;
+          double* out= doutput.dataFirst();
+          int* nc=nbcalls.dataFirst() ;
+          for (i=0; i<n; ++i, ++out,++nc) 
+            if (*nc!=0) 
+            {
+              *out  /= *nc;
+              *nc = 0 ;
+            }
+        
+        }  
+        else doutput/=this->nbcall; 
+        this->nbcall = 0; 
+
+      }
+   } // namespace func
+} // namespace xios
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/functor/average.hpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/functor/average.hpp	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/functor/average.hpp	(revision 1749)
@@ -0,0 +1,41 @@
+#ifndef __XIOS_CAverage__
+#define __XIOS_CAverage__
+
+/// XIOS headers ///
+#include "functor.hpp"
+#include "array_new.hpp"
+
+namespace xios
+{
+   namespace func
+   {
+      /// ////////////////////// DÃ©clarations ////////////////////// ///
+      class CAverage : public CFunctor
+      {
+         /// DÃ©finition de type ///
+         typedef CFunctor SuperClass;
+
+         public :
+
+            /// Constructeurs ///
+            //CAverage(void);                             // Not implemented.
+            //CAverage(const CFunData & data);
+            CAverage(CArray<double,1>& doutput);
+            CAverage(CArray<double,1>& doutput, double missingValue);
+            //CAverage(const CAverage & average);         // Not implemented.
+            //CAverage(const CAverage * const average);   // Not implemented.
+
+            /// Traitement ///
+            virtual void apply(const CArray<double,1>& dinput, CArray<double,1>& doutput);
+            virtual void final(void) ;
+            virtual ETimeType timeType(void) { return centered ; }
+
+            /// Destructeur ///
+            virtual ~CAverage(void);
+
+      }; // class CAverage
+
+   } // namespace func
+} // namespace xios
+
+#endif //__XIOS_CAverage__
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/functor/functor_type.hpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/functor/functor_type.hpp	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/functor/functor_type.hpp	(revision 1749)
@@ -0,0 +1,12 @@
+#ifndef __XIOS_functor_type__
+#define __XIOS_functor_type__
+
+#include "average.hpp"
+#include "accumulate.hpp"
+#include "instant.hpp"
+#include "once.hpp"
+#include "maximum.hpp"
+#include "minimum.hpp"
+
+#endif //__XIOS_functor_type__
+
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/functor/instant.cpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/functor/instant.cpp	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/functor/instant.cpp	(revision 1749)
@@ -0,0 +1,36 @@
+#include "instant.hpp"
+#include "array_new.hpp"
+
+namespace xios
+{
+   namespace func
+   {
+      /// ////////////////////// DÃ©finitions ////////////////////// ///
+
+      CInstant::CInstant(CArray<double,1>& doutput)
+         : SuperClass(StdString("instant"), doutput)
+      { /* Ne rien faire de plus */ }
+ 
+      CInstant::CInstant(CArray<double,1>& doutput, double missingValue)
+         : SuperClass(StdString("instant"), doutput, missingValue)
+      { /* Ne rien faire de plus */ }
+
+      CInstant::~CInstant(void)
+      { /* Ne rien faire de plus */ }
+
+      //---------------------------------------------------------------
+
+      void CInstant::apply(const CArray<double,1>& _dinput,
+                                 CArray<double,1>& _doutput)
+      {
+/*       	 const double * it1  = _dinput->data(),
+       	              * end1 = _dinput->data() + _dinput->num_elements();
+       	 double * it   = _doutput->data();
+       	 for (; it1 != end1; it1++, it++) *it  = *it1;*/
+        _doutput=_dinput ;
+      }
+
+      //---------------------------------------------------------------
+
+   } // namespace func
+} // namespace xios
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/functor/instant.hpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/functor/instant.hpp	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/functor/instant.hpp	(revision 1749)
@@ -0,0 +1,40 @@
+#ifndef __XIOS_CInstant__
+#define __XIOS_CInstant__
+
+/// XIOS headers ///
+#include "functor.hpp"
+#include "array_new.hpp"
+
+namespace xios
+{
+   namespace func
+   {
+      /// ////////////////////// DÃ©clarations ////////////////////// ///
+      class CInstant : public CFunctor
+      {
+         /// DÃ©finition de type ///
+         typedef CFunctor SuperClass;
+
+         public :
+
+            /// Constructeurs ///
+            //CInstant(void);                             // Not implemented.
+            //CInstant(const CFunData & data);
+            CInstant(CArray<double,1>& doutput);
+            CInstant(CArray<double,1>& doutput, double missingValue);
+           //CInstant(const CInstant & instant);         // Not implemented.
+            //CInstant(const CInstant * const instant);   // Not implemented.
+
+            /// Traitement ///
+            virtual void apply(const CArray<double,1>& dinput, CArray<double,1>& doutput);
+            virtual ETimeType timeType(void) { return instant ; }
+
+            /// Destructeur ///
+            virtual ~CInstant(void);
+
+      }; // class CInstant
+
+   } // namespace func
+} // namespace xios
+
+#endif //__XIOS_CInstant__
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/functor/maximum.cpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/functor/maximum.cpp	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/functor/maximum.cpp	(revision 1749)
@@ -0,0 +1,51 @@
+#include "maximum.hpp"
+#include "array_new.hpp"
+#include "utils.hpp"
+
+namespace xios
+{
+   namespace func
+   {
+      /// ////////////////////// DÃ©finitions ////////////////////// ///
+
+      CMaximum::CMaximum(CArray<double,1>& doutput)
+         : SuperClass(StdString("maximum"), doutput)
+      { /* Ne rien faire de plus */ }
+
+      CMaximum::CMaximum(CArray<double,1>& doutput, double missingValue)
+         : SuperClass(StdString("maximum"), doutput, missingValue)
+      { /* Ne rien faire de plus */ }
+
+      CMaximum::~CMaximum(void)
+      { /* Ne rien faire de plus */ }
+
+      //---------------------------------------------------------------
+
+      void CMaximum::apply(const CArray<double,1>& _dinput,
+                                 CArray<double,1>& _doutput)
+      {
+        const double * it1  = _dinput.dataFirst(),
+       	             * end1 = _dinput.dataFirst() + _dinput.numElements();
+              double * it   = _doutput.dataFirst();
+         if (this->nbcall == 1) for (; it1 != end1; it1++, it++) *it = *it1;
+         else 
+         {
+           if (hasMissingValue) 
+           { 
+             for (; it1 != end1; it1++, it++) 
+               if (!NumTraits<double>::isNan(*it1))
+               {
+                 if (!NumTraits<double>::isNan(*it)) *it = std::max(*it1, *it);
+                 else *it=*it1 ;  
+               }
+           }
+           else for (; it1 != end1; it1++, it++) *it = std::max(*it1, *it);
+         }
+
+
+      }
+
+      //---------------------------------------------------------------
+
+   } // namespace func
+} // namespace xios
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/functor/maximum.hpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/functor/maximum.hpp	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/functor/maximum.hpp	(revision 1749)
@@ -0,0 +1,40 @@
+#ifndef __XIOS_CMaximum__
+#define __XIOS_CMaximum__
+
+/// XIOS headers ///
+#include "functor.hpp"
+#include "array_new.hpp"
+
+namespace xios
+{
+   namespace func
+   {
+      /// ////////////////////// DÃ©clarations ////////////////////// ///
+      class CMaximum : public CFunctor
+      {
+         /// DÃ©finition de type ///
+         typedef CFunctor SuperClass;
+
+         public :
+
+            /// Constructeurs ///
+            //CMaximum(void);                             // Not implemented.
+            //CMaximum(const CFunData & data);
+            CMaximum(CArray<double,1>& doutput);
+            CMaximum(CArray<double,1>& doutput, double missingValue);
+            //CMaximum(const CMaximum & Maximum);         // Not implemented.
+            //CMaximum(const CMaximum * const Maximum);   // Not implemented.
+
+            /// Traitement ///
+            virtual void apply(const CArray<double,1>& dinput, CArray<double,1>& doutput);
+            virtual ETimeType timeType(void) { return centered ; }
+
+            /// Destructeur ///
+            virtual ~CMaximum(void);
+
+      }; // class CMaximum
+
+   } // namespace func
+} // namespace xios
+
+#endif //__XIOS_CMaximum__
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/functor/minimum.cpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/functor/minimum.cpp	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/functor/minimum.cpp	(revision 1749)
@@ -0,0 +1,52 @@
+#include "minimum.hpp"
+#include "array_new.hpp"
+#include <algorithm>
+#include "utils.hpp"
+
+namespace xios
+{
+   namespace func
+   {
+      /// ////////////////////// DÃ©finitions ////////////////////// ///
+
+      CMinimum::CMinimum(CArray<double,1>& doutput)
+         : SuperClass(StdString("minimum"), doutput)
+      { /* Ne rien faire de plus */ }
+
+      CMinimum::CMinimum(CArray<double,1>& doutput, double missingValue)
+         : SuperClass(StdString("minimum"), doutput, missingValue)
+      { /* Ne rien faire de plus */ }
+
+      CMinimum::~CMinimum(void)
+      { /* Ne rien faire de plus */ }
+
+      //---------------------------------------------------------------
+
+      void CMinimum::apply(const CArray<double,1>& _dinput,
+                                 CArray<double,1>& _doutput)
+      {
+        const double * it1  = _dinput.dataFirst(),
+                      *end1 = _dinput.dataFirst() + _dinput.numElements();
+        double * it   = _doutput.dataFirst();
+        
+        if (this->nbcall == 1)  for (; it1 != end1; it1++, it++) *it = *it1;
+        else 
+        {
+          if (hasMissingValue) 
+          { 
+            for (; it1 != end1; it1++, it++) 
+              if (!NumTraits<double>::isNan(*it1))
+              {
+                if (!NumTraits<double>::isNan(*it)) *it = std::min(*it1, *it);
+                else *it=*it1 ;
+              }
+          }
+          else for (; it1 != end1; it1++, it++) *it = std::min(*it1, *it);
+        }
+
+      }
+
+      //---------------------------------------------------------------
+
+   } // namespace func
+} // namespace xios
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/functor/minimum.hpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/functor/minimum.hpp	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/functor/minimum.hpp	(revision 1749)
@@ -0,0 +1,40 @@
+#ifndef __XIOS_CMinimum__
+#define __XIOS_CMinimum__
+
+/// XIOS headers ///
+#include "functor.hpp"
+#include "array_new.hpp"
+
+namespace xios
+{
+   namespace func
+   {
+      /// ////////////////////// DÃ©clarations ////////////////////// ///
+      class CMinimum : public CFunctor
+      {
+         /// DÃ©finition de type ///
+         typedef CFunctor SuperClass;
+
+         public :
+
+            /// Constructeurs ///
+            //CMinimum(void);                             // Not implemented.
+            //CMinimum(const CFunData & data);
+            CMinimum(CArray<double,1>& doutput);
+            CMinimum(CArray<double,1>& doutput, double missingValue);
+            //CMinimum(const CMinimum & Minimum);         // Not implemented.
+            //CMinimum(const CMinimum * const Minimum);   // Not implemented.
+
+            /// Traitement ///
+            virtual void apply(const CArray<double,1>& dinput, CArray<double,1>& doutput);
+            virtual ETimeType timeType(void) { return centered ; }
+
+            /// Destructeur ///
+            virtual ~CMinimum(void);
+
+      }; // class CMinimum
+
+   } // namespace func
+} // namespace xios
+
+#endif //__XIOS_CMinimum__
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/functor/once.cpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/functor/once.cpp	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/functor/once.cpp	(revision 1749)
@@ -0,0 +1,37 @@
+#include "once.hpp"
+#include "array_new.hpp"
+
+namespace xios
+{
+   namespace func
+   {
+      /// ////////////////////// DÃ©finitions ////////////////////// ///
+
+      COnce::COnce(CArray<double,1>& doutput)
+         : SuperClass(StdString("once"), doutput)
+      { /* Ne rien faire de plus */ }
+
+      COnce::COnce(CArray<double,1>& doutput, double missingValue)
+         : SuperClass(StdString("once"), doutput, missingValue)
+      { /* Ne rien faire de plus */ }
+
+      COnce::~COnce(void)
+      { /* Ne rien faire de plus */ }
+
+      //---------------------------------------------------------------
+
+      void COnce::apply(const CArray<double,1>& _dinput,
+                              CArray<double,1>& _doutput)
+      {
+/*       	 const double * it1  = _dinput->data(),
+       	              * end1 = _dinput->data() + _dinput->num_elements();
+       	       double * it   = _doutput->data();
+        for (; it1 != end1; it1++, it++) *it  = *it1;*/
+        _doutput=_dinput ;
+      }
+
+      //---------------------------------------------------------------
+
+   } // namespace func
+} // namespace xios
+
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/functor/once.hpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/functor/once.hpp	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/functor/once.hpp	(revision 1749)
@@ -0,0 +1,40 @@
+#ifndef __XIOS_COnce__
+#define __XIOS_COnce__
+
+/// XIOS headers ///
+#include "functor.hpp"
+#include "array_new.hpp"
+
+namespace xios
+{
+   namespace func
+   {
+      /// ////////////////////// DÃ©clarations ////////////////////// ///
+      class COnce : public CFunctor
+      {
+         /// DÃ©finition de type ///
+         typedef CFunctor SuperClass;
+
+         public :
+
+            /// Constructeurs ///
+            //COnce(void);                       // Not implemented.
+            COnce(CArray<double,1>& doutput);
+            COnce(CArray<double,1>& doutput, double missingValue);
+            //COnce(const COnce & once);         // Not implemented.
+            //COnce(const COnce * const once);   // Not implemented.
+
+            /// Traitement ///
+            virtual void apply(const CArray<double,1>& dinput, CArray<double,1>& doutput);
+            virtual ETimeType timeType(void) { return once ; }
+
+            /// Destructeur ///
+            virtual ~COnce(void);
+
+      }; // class COnce
+
+   } // namespace func
+} // namespace xios
+
+#endif //__XIOS_COnce__
+
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/generate_fortran_interface.cpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/generate_fortran_interface.cpp	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/generate_fortran_interface.cpp	(revision 1749)
@@ -0,0 +1,493 @@
+#include "xios.hpp"
+#include "generate_interface.hpp"
+#include "indent.hpp"
+#include "attribute_template.hpp"
+#include "object_template.hpp"
+#include "group_template.hpp"
+#include "node_type.hpp"
+
+int main (int argc, char ** argv, char ** UNUSED (env))
+{
+//  string path="./src/attr_interface/";
+  string path="./interface/";
+
+  CContext* context=CContext::create("interface");
+  CCalendarWrapper calendarWrapper;
+  CScalar scalar;
+  CScalarGroup scalargroup;
+  CAxis axis;
+  CAxisGroup axisgroup;
+  CField field;
+  CFieldGroup fieldgroup;
+  CVariable variable;
+  CVariableGroup variablegroup;
+  CDomain domain;
+  CDomainGroup domaingroup;
+  CGrid grid;
+  CGridGroup gridgroup;
+
+  CFile afile;
+  CFileGroup filegroup;
+
+  CInterpolateDomain interpolateDomain;
+  CZoomDomain zoomDomain;
+  CGenerateRectilinearDomain genDomain;
+  CComputeConnectivityDomain compConDomain;
+  CExpandDomain expandDomain;
+  CReorderDomain reorderDomain;
+  CExtractDomain extractDomain;
+
+  CInterpolateAxis interpolateAxis;
+  CZoomAxis zoomAxis;
+  CInverseAxis inverseAxis;
+  CExtractAxis extractAxis;
+
+  CReduceDomainToAxis reduceDomainToAxis;
+  CReduceAxisToAxis reduceAxisToAxis;
+  CExtractDomainToAxis extractDomainToAxis;
+  CTemporalSplitting temporalSplitting;
+
+  CReduceAxisToScalar reduceAxisToScalar;
+  CExtractAxisToScalar extractAxisToScalar;
+  CReduceDomainToScalar reduceDomainToScalar;
+  CDuplicateScalarToAxis duplicateScalarToAxis;
+  CReduceScalarToScalar reduceScalarToScalar;
+  
+  ostringstream oss;
+  ofstream file;
+
+  file.open((path+"scalar_interface_attr.F90").c_str());
+  scalar.generateFortran2003Interface(file);
+  file.close();
+
+  file.open((path+"icscalar_attr.cpp").c_str());
+  scalar.generateCInterface(file);
+  file.close();
+
+  file.open((path+"iscalar_attr.F90").c_str());
+  scalar.generateFortranInterface(file);
+  file.close();
+
+  file.open((path+"scalargroup_interface_attr.F90").c_str());
+  scalargroup.generateFortran2003Interface(file);
+  file.close();
+
+  file.open((path+"icscalargroup_attr.cpp").c_str());
+  scalargroup.generateCInterface(file);
+  file.close();
+
+  file.open((path+"iscalargroup_attr.F90").c_str());
+  scalargroup.generateFortranInterface(file);
+  file.close();
+
+  file.open((path+"axis_interface_attr.F90").c_str());
+  axis.generateFortran2003Interface(file);
+  file.close();
+
+  file.open((path+"icaxis_attr.cpp").c_str());
+  axis.generateCInterface(file);
+  file.close();
+
+  file.open((path+"iaxis_attr.F90").c_str());
+  axis.generateFortranInterface(file);
+  file.close();
+
+  file.open((path+"axisgroup_interface_attr.F90").c_str());
+  axisgroup.generateFortran2003Interface(file);
+  file.close();
+
+  file.open((path+"icaxisgroup_attr.cpp").c_str());
+  axisgroup.generateCInterface(file);
+  file.close();
+
+  file.open((path+"iaxisgroup_attr.F90").c_str());
+  axisgroup.generateFortranInterface(file);
+  file.close();
+
+  file.open((path+"domain_interface_attr.F90").c_str());
+  domain.generateFortran2003Interface(file);
+  file.close();
+
+  file.open((path+"icdomain_attr.cpp").c_str());
+  domain.generateCInterface(file);
+  file.close();
+
+  file.open((path+"idomain_attr.F90").c_str());
+  domain.generateFortranInterface(file);
+  file.close();
+
+  file.open((path+"domaingroup_interface_attr.F90").c_str());
+  domaingroup.generateFortran2003Interface(file);
+  file.close();
+
+  file.open((path+"icdomaingroup_attr.cpp").c_str());
+  domaingroup.generateCInterface(file);
+  file.close();
+
+  file.open((path+"idomaingroup_attr.F90").c_str());
+  domaingroup.generateFortranInterface(file);
+  file.close();
+
+
+  file.open((path+"grid_interface_attr.F90").c_str());
+  grid.generateFortran2003Interface(file);
+  file.close();
+
+  file.open((path+"icgrid_attr.cpp").c_str());
+  grid.generateCInterface(file);
+  file.close();
+
+  file.open((path+"igrid_attr.F90").c_str());
+  grid.generateFortranInterface(file);
+  file.close();
+
+  file.open((path+"gridgroup_interface_attr.F90").c_str());
+  gridgroup.generateFortran2003Interface(file);
+  file.close();
+
+  file.open((path+"icgridgroup_attr.cpp").c_str());
+  gridgroup.generateCInterface(file);
+  file.close();
+
+  file.open((path+"igridgroup_attr.F90").c_str());
+  gridgroup.generateFortranInterface(file);
+  file.close();
+
+
+  file.open((path+"field_interface_attr.F90").c_str());
+  field.generateFortran2003Interface(file);
+  file.close();
+
+  file.open((path+"icfield_attr.cpp").c_str());
+  field.generateCInterface(file);
+  file.close();
+
+  file.open((path+"ifield_attr.F90").c_str());
+  field.generateFortranInterface(file);
+  file.close();
+
+  file.open((path+"fieldgroup_interface_attr.F90").c_str());
+  fieldgroup.generateFortran2003Interface(file);
+  file.close();
+
+  file.open((path+"icfieldgroup_attr.cpp").c_str());
+  fieldgroup.generateCInterface(file);
+  file.close();
+
+  file.open((path+"ifieldgroup_attr.F90").c_str());
+  fieldgroup.generateFortranInterface(file);
+  file.close();
+
+
+
+  file.open((path+"variable_interface_attr.F90").c_str());
+  variable.generateFortran2003Interface(file);
+  file.close();
+
+  file.open((path+"icvariable_attr.cpp").c_str());
+  variable.generateCInterface(file);
+  file.close();
+
+  file.open((path+"ivariable_attr.F90").c_str());
+  variable.generateFortranInterface(file);
+  file.close();
+
+  file.open((path+"variablegroup_interface_attr.F90").c_str());
+  variablegroup.generateFortran2003Interface(file);
+  file.close();
+
+  file.open((path+"icvariablegroup_attr.cpp").c_str());
+  variablegroup.generateCInterface(file);
+  file.close();
+
+  file.open((path+"ivariablegroup_attr.F90").c_str());
+  variablegroup.generateFortranInterface(file);
+  file.close();
+
+
+
+  file.open((path+"file_interface_attr.F90").c_str());
+  afile.generateFortran2003Interface(file);
+  file.close();
+
+  file.open((path+"icfile_attr.cpp").c_str());
+  afile.generateCInterface(file);
+  file.close();
+
+  file.open((path+"ifile_attr.F90").c_str());
+  afile.generateFortranInterface(file);
+  file.close();
+
+  file.open((path+"filegroup_interface_attr.F90").c_str());
+  filegroup.generateFortran2003Interface(file);
+  file.close();
+
+  file.open((path+"icfilegroup_attr.cpp").c_str());
+  filegroup.generateCInterface(file);
+  file.close();
+
+  file.open((path+"ifilegroup_attr.F90").c_str());
+  filegroup.generateFortranInterface(file);
+  file.close();
+
+
+  file.open((path+"calendar_wrapper_interface_attr.F90").c_str());
+  calendarWrapper.generateFortran2003Interface(file);
+  file.close();
+
+  file.open((path+"iccalendar_wrapper_attr.cpp").c_str());
+  calendarWrapper.generateCInterface(file);
+  file.close();
+
+  file.open((path+"icalendar_wrapper_attr.F90").c_str());
+  calendarWrapper.generateFortranInterface(file);
+  file.close();
+
+  /*!
+    Domain transformations
+  */
+  file.open((path+"zoom_domain_interface_attr.F90").c_str());
+  zoomDomain.generateFortran2003Interface(file);
+  file.close();
+
+  file.open((path+"iczoom_domain_attr.cpp").c_str());
+  zoomDomain.generateCInterface(file);
+  file.close();
+
+  file.open((path+"izoom_domain_attr.F90").c_str());
+  zoomDomain.generateFortranInterface(file);
+  file.close();
+
+  file.open((path+"interpolate_domain_interface_attr.F90").c_str());
+  interpolateDomain.generateFortran2003Interface(file);
+  file.close();
+
+  file.open((path+"icinterpolate_domain_attr.cpp").c_str());
+  interpolateDomain.generateCInterface(file);
+  file.close();
+
+  file.open((path+"iinterpolate_domain_attr.F90").c_str());
+  interpolateDomain.generateFortranInterface(file);
+  file.close();
+
+  file.open((path+"generate_rectilinear_domain_interface_attr.F90").c_str());
+  genDomain.generateFortran2003Interface(file);
+  file.close();
+
+  file.open((path+"icgenerate_rectilinear_domain_attr.cpp").c_str());
+  genDomain.generateCInterface(file);
+  file.close();
+
+  file.open((path+"igenerate_rectilinear_domain_attr.F90").c_str());
+  genDomain.generateFortranInterface(file);
+  file.close();
+
+  file.open((path+"compute_connectivity_domain_interface_attr.F90").c_str());
+  compConDomain.generateFortran2003Interface(file);
+  file.close();
+
+  file.open((path+"iccompute_connectivity_domain_attr.cpp").c_str());
+  compConDomain.generateCInterface(file);
+  file.close();
+
+  file.open((path+"icompute_connectivity_domain_attr.F90").c_str());
+  compConDomain.generateFortranInterface(file);
+  file.close();
+
+  file.open((path+"expand_domain_interface_attr.F90").c_str());
+  expandDomain.generateFortran2003Interface(file);
+  file.close();
+
+  file.open((path+"icexpand_domain_attr.cpp").c_str());
+  expandDomain.generateCInterface(file);
+  file.close();
+
+  file.open((path+"iexpand_domain_attr.F90").c_str());
+  expandDomain.generateFortranInterface(file);
+  file.close();
+
+  file.open((path+"reorder_domain_interface_attr.F90").c_str());
+  reorderDomain.generateFortran2003Interface(file);
+  file.close();
+
+  file.open((path+"icreorder_domain_attr.cpp").c_str());
+  reorderDomain.generateCInterface(file);
+  file.close();
+
+  file.open((path+"ireorder_domain_attr.F90").c_str());
+  reorderDomain.generateFortranInterface(file);
+  file.close();
+  
+  /*!
+    Axis transformations
+  */
+  file.open((path+"zoom_axis_interface_attr.F90").c_str());
+  zoomAxis.generateFortran2003Interface(file);
+  file.close();
+
+  file.open((path+"iczoom_axis_attr.cpp").c_str());
+  zoomAxis.generateCInterface(file);
+  file.close();
+
+  file.open((path+"izoom_axis_attr.F90").c_str());
+  zoomAxis.generateFortranInterface(file);
+  file.close();
+
+  file.open((path+"interpolate_axis_interface_attr.F90").c_str());
+  interpolateAxis.generateFortran2003Interface(file);
+  file.close();
+
+  file.open((path+"icinterpolate_axis_attr.cpp").c_str());
+  interpolateAxis.generateCInterface(file);
+  file.close();
+
+  file.open((path+"iinterpolate_axis_attr.F90").c_str());
+  interpolateAxis.generateFortranInterface(file);
+  file.close();
+
+  file.open((path+"inverse_axis_interface_attr.F90").c_str());
+  inverseAxis.generateFortran2003Interface(file);
+  file.close();
+
+  file.open((path+"extract_axis_interface_attr.F90").c_str());
+  extractAxis.generateFortran2003Interface(file);
+  file.close();
+
+  file.open((path+"icinverse_axis_attr.cpp").c_str());
+  inverseAxis.generateCInterface(file);
+  file.close();
+
+  file.open((path+"iinverse_axis_attr.F90").c_str());
+  inverseAxis.generateFortranInterface(file);
+  file.close();
+
+  file.open((path+"reduce_domain_to_axis_interface_attr.F90").c_str());
+  reduceDomainToAxis.generateFortran2003Interface(file);
+  file.close();
+ 
+  file.open((path+"icreduce_domain_to_axis_attr.cpp").c_str());
+  reduceDomainToAxis.generateCInterface(file);
+  file.close();
+
+  file.open((path+"ireduce_domain_to_axis_attr.F90").c_str());
+  reduceDomainToAxis.generateFortranInterface(file);
+  file.close();
+
+  file.open((path+"reduce_axis_to_axis_interface_attr.F90").c_str());
+  reduceAxisToAxis.generateFortran2003Interface(file);
+  file.close();
+ 
+  file.open((path+"icreduce_axis_to_axis_attr.cpp").c_str());
+  reduceAxisToAxis.generateCInterface(file);
+  file.close();
+
+  file.open((path+"ireduce_axis_to_axis_attr.F90").c_str());
+  reduceAxisToAxis.generateFortranInterface(file);
+  file.close();
+  
+  file.open((path+"extract_domain_to_axis_interface_attr.F90").c_str());
+  extractDomainToAxis.generateFortran2003Interface(file);
+  file.close();
+
+  file.open((path+"icextract_domain_to_axis_attr.cpp").c_str());
+  extractDomainToAxis.generateCInterface(file);
+  file.close();
+
+  file.open((path+"iextract_domain_to_axis_attr.F90").c_str());
+  extractDomainToAxis.generateFortranInterface(file);
+  file.close();
+
+
+  file.open((path+"temporal_splitting_interface_attr.F90").c_str());
+  temporalSplitting.generateFortran2003Interface(file);
+  file.close();
+
+  file.open((path+"ictemporal_splitting_attr.cpp").c_str());
+  temporalSplitting.generateCInterface(file);
+  file.close();
+
+  file.open((path+"itemporal_splitting_attr.F90").c_str());
+  temporalSplitting.generateFortranInterface(file);
+  file.close();
+
+
+  file.open((path+"duplicate_scalar_to_axis_interface_attr.F90").c_str());
+  duplicateScalarToAxis.generateFortran2003Interface(file);
+  file.close();
+  
+  file.open((path+"icduplicate_scalar_to_axis_attr.cpp").c_str());
+  duplicateScalarToAxis.generateCInterface(file);
+  file.close();
+  
+  file.open((path+"iduplicate_scalar_to_axis_attr.F90").c_str());
+  duplicateScalarToAxis.generateFortranInterface(file);
+  file.close();
+  /*!
+    Scalar transformations
+  */
+  file.open((path+"reduce_axis_to_scalar_interface_attr.F90").c_str());
+  reduceAxisToScalar.generateFortran2003Interface(file);
+  file.close();
+
+  file.open((path+"icreduce_axis_to_scalar_attr.cpp").c_str());
+  reduceAxisToScalar.generateCInterface(file);
+  file.close();
+
+  file.open((path+"ireduce_axis_to_scalar_attr.F90").c_str());
+  reduceAxisToScalar.generateFortranInterface(file);
+  file.close();
+
+  file.open((path+"extract_axis_to_scalar_interface_attr.F90").c_str());
+  extractAxisToScalar.generateFortran2003Interface(file);
+  file.close();
+
+  file.open((path+"icextract_axis_to_scalar_attr.cpp").c_str());
+  extractAxisToScalar.generateCInterface(file);
+  file.close();
+
+  file.open((path+"iextract_axis_to_scalar_attr.F90").c_str());
+  extractAxisToScalar.generateFortranInterface(file);
+  file.close();
+
+
+  file.open((path+"reduce_domain_to_scalar_interface_attr.F90").c_str());
+  reduceDomainToScalar.generateFortran2003Interface(file);
+  file.close();
+
+  file.open((path+"icreduce_domain_to_scalar_attr.cpp").c_str());
+  reduceDomainToScalar.generateCInterface(file);
+  file.close();
+
+  file.open((path+"ireduce_domain_to_scalar_attr.F90").c_str());
+  reduceDomainToScalar.generateFortranInterface(file);
+  file.close();
+
+
+  file.open((path+"reduce_scalar_to_scalar_interface_attr.F90").c_str());
+  reduceScalarToScalar.generateFortran2003Interface(file);
+  file.close();
+
+  file.open((path+"icreduce_scalar_to_scalar_attr.cpp").c_str());
+  reduceScalarToScalar.generateCInterface(file);
+  file.close();
+
+  file.open((path+"ireduce_scalar_to_scalar_attr.F90").c_str());
+  reduceScalarToScalar.generateFortranInterface(file);
+  file.close();
+
+
+
+
+
+  file.open((path+"context_interface_attr.F90").c_str());
+  context->generateFortran2003Interface(file);
+  file.close();
+
+  file.open((path+"iccontext_attr.cpp").c_str());
+  context->generateCInterface(file);
+  file.close();
+
+  file.open((path+"icontext_attr.F90").c_str());
+  context->generateFortranInterface(file);
+  file.close();
+}
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/generate_interface.hpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/generate_interface.hpp	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/generate_interface.hpp	(revision 1749)
@@ -0,0 +1,72 @@
+#ifndef  __XIOS_GENERATE_INTERFACE_HPP__
+#define  __XIOS_GENERATE_INTERFACE_HPP__
+
+#include "xios_spl.hpp"
+
+namespace xios
+{
+  class CInterface
+  {
+    public:
+    
+    template <class T>
+    static void AttributeCInterface(ostream& oss,const string& className,const string& name) ;
+    static void AttributeIsDefinedCInterface(ostream& oss, const string& className,const string& name);
+  
+   template <class T>
+   static void AttributeFortran2003Interface(ostream& oss,const string& className,const string& name) ;
+   static void AttributeIsDefinedFortran2003Interface(ostream& oss,const string& className,const string& name);
+   
+   template <class T>
+   static void AttributeFortranInterfaceDeclaration(ostream& oss,const string& className,const string& name) ;
+   
+   template <class T>
+   static void AttributeFortranInterfaceGetDeclaration(ostream& oss,const string& className,const string& name) ;
+
+   static void AttributeFortranInterfaceIsDefinedDeclaration(ostream& oss,const string& className,const string& name) ;
+
+   template <class T>
+   static void AttributeFortranInterfaceBody(ostream& oss,const string& className,const string& name) ;
+  
+   template <class T>
+   static void AttributeFortranInterfaceGetBody(ostream& oss,const string& className,const string& name) ;
+ 
+   static void AttributeFortranInterfaceIsDefinedBody(ostream& oss,const string& className,const string& name) ;
+ 
+   template <class T>
+   static string getStrFortranType(void) ;
+
+   template <class T>
+   static string getStrFortranKind(void) ;
+    
+   template <class T>
+   static string getStrFortranKindC(void) ;
+   
+   template <class T>
+   static bool matchingTypeCFortran(void) ;
+   
+
+  };
+/*  
+  template<> string CInterface::getStrFortranType<int>(void) {return string("INTEGER") ;}
+  template<> string CInterface::getStrFortranType<bool>(void) {return string("LOGICAL") ;}
+  template<> string CInterface::getStrFortranType<double>(void) {return string("REAL") ;}
+  template<> string CInterface::getStrFortranType<float>(void) {return string("REAL") ;}
+  
+  template<> string CInterface::getStrFortranKind<int>(void) {return string("") ;}
+  template<> string CInterface::getStrFortranKind<bool>(void) {return string("") ;}
+  template<> string CInterface::getStrFortranKind<double>(void) {return string("(KIND=8)") ;}
+  template<> string CInterface::getStrFortranKind<float>(void) {return string("(KIND=4)") ;}
+  
+  template<> string CInterface::getStrFortranKindC<int>(void) {return string("(KIND=C_INT)") ;}
+  template<> string CInterface::getStrFortranKindC<bool>(void) {return string("(KIND=C_BOOL)") ;}
+  template<> string CInterface::getStrFortranKindC<double>(void) {return string("(KIND=C_DOUBLE)") ;}
+  template<> string CInterface::getStrFortranKindC<float>(void) {return string("(KIND=C_FLOAT)") ;}
+  
+  template<> bool CInterface::matchingTypeCFortran<int>(void) { return true ; } 
+  template<> bool CInterface::matchingTypeCFortran<bool>(void) { return false ;} 
+  template<> bool CInterface::matchingTypeCFortran<double>(void) { return true; }
+  template<> bool CInterface::matchingTypeCFortran<float>(void) { return true; }
+*/
+}
+#endif
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/generate_interface_decl.cpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/generate_interface_decl.cpp	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/generate_interface_decl.cpp	(revision 1749)
@@ -0,0 +1,23 @@
+#include "generate_interface_impl.hpp"
+
+namespace xios
+{
+
+#define macro(T) \
+  template void CInterface::AttributeCInterface<T>(ostream& oss,const string& className,const string& name) ; \
+  template void CInterface::AttributeFortran2003Interface<T>(ostream& oss,const string& className,const string& name) ; \
+  template void CInterface::AttributeFortranInterfaceDeclaration<T>(ostream& oss,const string& className,const string& name) ; \
+  template void CInterface::AttributeFortranInterfaceGetDeclaration<T>(ostream& oss,const string& className,const string& name) ; \
+  template void CInterface::AttributeFortranInterfaceBody<T>(ostream& oss,const string& className,const string& name) ; \
+  template void CInterface::AttributeFortranInterfaceGetBody<T>(ostream& oss,const string& className,const string& name) ; \
+  template string CInterface::getStrFortranType<T>(void) ; \
+  template string CInterface::getStrFortranKind<T>(void) ; \
+  template string CInterface::getStrFortranKindC<T>(void) ; \
+  template bool CInterface::matchingTypeCFortran<T>(void) ; 
+  
+  macro(bool)
+  macro(int)
+  macro(double)
+  macro(CDate)
+  macro(CDuration)
+}
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/generate_interface_impl.hpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/generate_interface_impl.hpp	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/generate_interface_impl.hpp	(revision 1749)
@@ -0,0 +1,1244 @@
+#ifndef __XIOS_GENERATE_INTERFACE_IMPL_HPP__
+#define __XIOS_GENERATE_INTERFACE_IMPL_HPP__
+
+#include "xios_spl.hpp"
+#include "generate_interface.hpp"
+#include "type_util.hpp"
+#include "indent.hpp"
+#include "enum.hpp"
+#include "array_new.hpp"
+#include "date.hpp"
+
+namespace xios
+{
+  template<> string CInterface::getStrFortranType<int>(void) { return string("INTEGER"); }
+  template<> string CInterface::getStrFortranType<bool>(void) { return string("LOGICAL"); }
+  template<> string CInterface::getStrFortranType<double>(void) { return string("REAL"); }
+  template<> string CInterface::getStrFortranType<float>(void) { return string("REAL"); }
+  template<> string CInterface::getStrFortranType<CDate>(void) { return string("TYPE(txios(date))"); }
+  template<> string CInterface::getStrFortranType<CDuration>(void) { return string("TYPE(txios(duration))"); }
+
+  template<> string CInterface::getStrFortranKind<int>(void) { return string(""); }
+  template<> string CInterface::getStrFortranKind<bool>(void) { return string(""); }
+  template<> string CInterface::getStrFortranKind<double>(void) { return string("(KIND=8)"); }
+  template<> string CInterface::getStrFortranKind<float>(void) { return string("(KIND=4)"); }
+  template<> string CInterface::getStrFortranKind<CDate>(void) { return string(""); }
+  template<> string CInterface::getStrFortranKind<CDuration>(void) { return string(""); }
+
+  template<> string CInterface::getStrFortranKindC<int>(void) { return string("(KIND=C_INT)"); }
+  template<> string CInterface::getStrFortranKindC<bool>(void) { return string("(KIND=C_BOOL)"); }
+  template<> string CInterface::getStrFortranKindC<double>(void) { return string("(KIND=C_DOUBLE)"); }
+  template<> string CInterface::getStrFortranKindC<float>(void) { return string("(KIND=C_FLOAT)"); }
+  template<> string CInterface::getStrFortranKindC<CDate>(void) { return string(""); }
+  template<> string CInterface::getStrFortranKindC<CDuration>(void) { return string(""); }
+
+  template<> bool CInterface::matchingTypeCFortran<int>(void) { return true; }
+  template<> bool CInterface::matchingTypeCFortran<bool>(void) { return false; }
+  template<> bool CInterface::matchingTypeCFortran<double>(void) { return true; }
+  template<> bool CInterface::matchingTypeCFortran<float>(void) { return true; }
+  template<> bool CInterface::matchingTypeCFortran<CDate>(void) { return true; }
+  template<> bool CInterface::matchingTypeCFortran<CDuration>(void) { return true; }
+
+// /////////////////////////////////////////////////
+// //                 C Interface                 //
+// /////////////////////////////////////////////////
+
+  void CInterface::AttributeIsDefinedCInterface(ostream& oss, const string& className, const string& name)
+  {
+    oss << "bool cxios_is_defined_" << className << "_" << name << "(" << className << "_Ptr " << className << "_hdl)" << iendl;
+    oss << "{" << iendl;
+    oss << "   CTimer::get(\"XIOS\").resume();" << iendl;
+    oss << "   bool isDefined = " << className << "_hdl->" << name << ".hasInheritedValue();" << iendl;
+    oss << "   CTimer::get(\"XIOS\").suspend();" << iendl;
+    oss << "   return isDefined;" << iendl;
+    oss << "}" << std::endl;
+  }
+
+  template <class T>
+  void CInterface::AttributeCInterface(ostream& oss, const string& className, const string& name)
+  {
+    string typeName = getStrType<T>();
+
+    oss << "void cxios_set_" << className << "_" << name << "(" << className << "_Ptr " << className << "_hdl, " << typeName << " " << name << ")" << iendl;
+    oss << "{" << iendl;
+    oss << "  CTimer::get(\"XIOS\").resume();" << iendl;
+    oss << "  " << className << "_hdl->" << name << ".setValue(" << name << ");" << iendl;
+    oss << "  CTimer::get(\"XIOS\").suspend();" << iendl;
+    oss << "}" << std::endl;
+
+    oss << iendl;
+    oss << "void cxios_get_" << className << "_" << name << "(" << className << "_Ptr " << className << "_hdl, " << typeName << "* " << name << ")" << iendl;
+    oss << "{" << iendl;
+    oss << "  CTimer::get(\"XIOS\").resume();" << iendl;
+    oss << "  *" << name << " = " << className << "_hdl->" << name << ".getInheritedValue();" << iendl;
+    oss << "  CTimer::get(\"XIOS\").suspend();" << iendl;
+    oss << "}" << std::endl;
+  }
+
+  template<>
+  void CInterface::AttributeCInterface<string>(ostream& oss, const string& className, const string& name)
+  {
+    oss << "void cxios_set_" << className << "_" << name << "(" << className << "_Ptr " << className << "_hdl, const char * " << name << ", int " << name << "_size)" << iendl;
+    oss << "{" << iendl;
+    oss << "  std::string " << name << "_str;" << iendl;
+    oss << "  if (!cstr2string(" << name << ", " << name << "_size, " << name << "_str)) return;" << iendl;
+    oss << "  CTimer::get(\"XIOS\").resume();" << iendl;
+    oss << "  " << className << "_hdl->" << name << ".setValue(" << name << "_str);" << iendl;
+    oss << "  CTimer::get(\"XIOS\").suspend();" << iendl;
+    oss << "}" << std::endl;
+
+    oss << iendl;
+
+    oss << "void cxios_get_" << className << "_" << name << "(" << className << "_Ptr " << className << "_hdl, char * " << name << ", int " << name << "_size)" << iendl;
+    oss << "{" << iendl;
+    oss << "  CTimer::get(\"XIOS\").resume();" << iendl;
+    oss << "  if (!string_copy(" << className << "_hdl->" << name << ".getInheritedValue(), " << name << ", " << name << "_size))" << iendl;
+    oss << "    ERROR(\"void cxios_get_" << className << "_" << name << "(" << className << "_Ptr " << className << "_hdl, char * " << name << ", int "
+        << name << "_size)\", << \"Input string is too short\");" << iendl;
+    oss << "  CTimer::get(\"XIOS\").suspend();" << iendl;
+    oss << "}" << std::endl;
+  }
+
+  template<>
+  void CInterface::AttributeCInterface<CEnumBase>(ostream& oss, const string& className, const string& name)
+  {
+    oss << "void cxios_set_" << className << "_" << name << "(" << className << "_Ptr " << className << "_hdl, const char * " << name << ", int " << name << "_size)" << iendl;
+    oss << "{" << iendl;
+    oss << "  std::string " << name << "_str;" << iendl;
+    oss << "  if (!cstr2string(" << name << ", " << name << "_size, " << name << "_str)) return;" << iendl;
+    oss << "  CTimer::get(\"XIOS\").resume();" << iendl;
+    oss << "  " << className << "_hdl->" << name << ".fromString(" << name << "_str);" << iendl;
+    oss << "  CTimer::get(\"XIOS\").suspend();" << iendl;
+    oss << "}" << std::endl;
+
+    oss << iendl;
+
+    oss << "void cxios_get_" << className << "_" << name << "(" << className << "_Ptr " << className << "_hdl, char * " << name << ", int " << name << "_size)" << iendl;
+    oss << "{" << iendl;
+    oss << "  CTimer::get(\"XIOS\").resume();" << iendl;
+    oss << "  if (!string_copy(" << className << "_hdl->" << name << ".getInheritedStringValue(), " << name << ", " << name << "_size))" << iendl;
+    oss << "    ERROR(\"void cxios_get_" << className << "_" << name << "(" << className << "_Ptr " << className << "_hdl, char * " << name << ", int "
+        << name << "_size)\", << \"Input string is too short\");" << iendl;
+    oss << "  CTimer::get(\"XIOS\").suspend();" << iendl;
+    oss << "}" << std::endl;
+  }
+
+  template<>
+  void CInterface::AttributeCInterface<CDate>(ostream& oss, const string& className, const string& name)
+  {
+    oss << "void cxios_set_" << className << "_" << name << "(" << className << "_Ptr " << className << "_hdl, cxios_date " << name << "_c)" << iendl;
+    oss << "{" << iendl;
+    oss << "  CTimer::get(\"XIOS\").resume();" << iendl;
+    oss << "  " << className << "_hdl->" << name << ".allocate();" << iendl;
+    oss << "  CDate& " << name << " = " << className << "_hdl->" << name << ".get();" << iendl;
+    oss << "  " << name << ".setDate(" << name << "_c.year," << iendl;
+    oss << "                         " << name << "_c.month," << iendl;
+    oss << "                         " << name << "_c.day," << iendl;
+    oss << "                         " << name << "_c.hour," << iendl;
+    oss << "                         " << name << "_c.minute," << iendl;
+    oss << "                         " << name << "_c.second);" << iendl;
+    oss << "  if (" << name << ".hasRelCalendar())" << iendl;
+    oss << "    " << name << ".checkDate();" << iendl;
+    oss << "  CTimer::get(\"XIOS\").suspend();" << iendl;
+    oss << "}" << std::endl;
+
+    oss << iendl;
+
+    oss << "void cxios_get_" << className << "_" << name << "(" << className << "_Ptr " << className << "_hdl, cxios_date* " << name << "_c)" << iendl;
+    oss << "{" << iendl;
+    oss << "  CTimer::get(\"XIOS\").resume();" << iendl;
+    oss << "  CDate " << name << " = " << className << "_hdl->" << name << ".getInheritedValue();" << iendl;
+    oss << "  " << name << "_c->year = " << name << ".getYear();" << iendl;
+    oss << "  " << name << "_c->month = " << name << ".getMonth();" << iendl;
+    oss << "  " << name << "_c->day = " << name << ".getDay();" << iendl;
+    oss << "  " << name << "_c->hour = " << name << ".getHour();" << iendl;
+    oss << "  " << name << "_c->minute = " << name << ".getMinute();" << iendl;
+    oss << "  " << name << "_c->second = " << name << ".getSecond();" << iendl;
+    oss << "  CTimer::get(\"XIOS\").suspend();" << iendl;
+    oss << "}" << std::endl;
+  }
+
+  template<>
+  void CInterface::AttributeCInterface<CDuration>(ostream& oss, const string& className, const string& name)
+  {
+    oss << "void cxios_set_" << className << "_" << name << "(" << className << "_Ptr " << className << "_hdl, cxios_duration " << name << "_c)" << iendl;
+    oss << "{" << iendl;
+    oss << "  CTimer::get(\"XIOS\").resume();" << iendl;
+    oss << "  " << className << "_hdl->" << name << ".allocate();" << iendl;
+    oss << "  CDuration& " << name << " = " << className << "_hdl->" << name << ".get();" << iendl;
+    oss << "  " << name << ".year = " << name << "_c.year;" << iendl;
+    oss << "  " << name << ".month = " << name << "_c.month;" << iendl;
+    oss << "  " << name << ".day = " << name << "_c.day;" << iendl;
+    oss << "  " << name << ".hour = " << name << "_c.hour;" << iendl;
+    oss << "  " << name << ".minute = " << name << "_c.minute;" << iendl;
+    oss << "  " << name << ".second = " << name << "_c.second;" << iendl;
+    oss << "  " << name << ".timestep = " << name << "_c.timestep;" << iendl;
+    oss << "  CTimer::get(\"XIOS\").suspend();" << iendl;
+    oss << "}" << std::endl;
+
+    oss << iendl;
+
+    oss << "void cxios_get_" << className << "_" << name << "(" << className << "_Ptr " << className << "_hdl, cxios_duration* " << name << "_c)" << iendl;
+    oss << "{" << iendl;
+    oss << "  CTimer::get(\"XIOS\").resume();" << iendl;
+    oss << "  CDuration " << name << " = " << className << "_hdl->" << name << ".getInheritedValue();" << iendl;
+    oss << "  " << name << "_c->year = " << name << ".year;" << iendl;
+    oss << "  " << name << "_c->month = " << name << ".month;" << iendl;
+    oss << "  " << name << "_c->day = " << name << ".day;" << iendl;
+    oss << "  " << name << "_c->hour = " << name << ".hour;" << iendl;
+    oss << "  " << name << "_c->minute = " << name << ".minute;" << iendl;
+    oss << "  " << name << "_c->second = " << name << ".second;" << iendl;
+    oss << "  " << name << "_c->timestep = " << name << ".timestep;" << iendl;
+    oss << "  CTimer::get(\"XIOS\").suspend();" << iendl;
+    oss << "}" << std::endl;
+  }
+
+#undef macro
+
+// /////////////////////////////////////////////////
+// //          Fortran 2003 Interface             //
+// /////////////////////////////////////////////////
+
+  void CInterface::AttributeIsDefinedFortran2003Interface(ostream& oss, const string& className, const string& name)
+  {
+    oss << "FUNCTION cxios_is_defined_" << className << "_" << name << "(" << className << "_hdl) BIND(C)" << iendl;
+    oss << "  USE ISO_C_BINDING" << iendl;
+    oss << "  LOGICAL(kind=C_BOOL) :: cxios_is_defined_" << className << "_" << name << iendl;
+    oss << "  INTEGER (kind = C_INTPTR_T), VALUE :: " << className << "_hdl" << iendl;
+    oss << "END FUNCTION cxios_is_defined_" << className << "_" << name << std::endl;
+  }
+
+  template <class T>
+  void CInterface::AttributeFortran2003Interface(ostream& oss, const string& className, const string& name)
+  {
+    string fortranType=getStrFortranType<T>();
+    string fortranKindC=getStrFortranKindC<T>();
+
+//    oss << "SUBROUTINE cxios_set_" << className << "_" << name << "(" << className << "_hdl, " << name << ") BIND(C)" << iendl;
+    int indent = oss.iword(iendl.index);
+    string str = "SUBROUTINE cxios_set_" + className + "_" + name + "(" + className + "_hdl, " + name + ") BIND(C)";
+    if ((str.length() + indent) >132)
+    {
+      oss << str.substr(0,130-indent) ;
+      oss << "&" << endl;
+      oss << "&" << str.substr(130-indent,str.length()) ;
+    }
+    else
+    {
+      oss << str;
+    }
+    oss << iendl;
+    oss << "  USE ISO_C_BINDING" << iendl;
+    oss << "  INTEGER (kind = C_INTPTR_T), VALUE :: " << className << "_hdl" << iendl;
+    oss << "  " << fortranType << " " << fortranKindC << "      , VALUE :: " << name << iendl;
+    oss << "END SUBROUTINE cxios_set_" << className << "_" << name << std::endl;
+    oss << iendl;
+    oss << "SUBROUTINE cxios_get_" << className << "_" << name << "(" << className << "_hdl, " << name << ") BIND(C)" << iendl;
+    oss << "  USE ISO_C_BINDING" << iendl;
+    oss << "  INTEGER (kind = C_INTPTR_T), VALUE :: " << className << "_hdl" << iendl;
+    oss << "  " << fortranType << " " << fortranKindC << "             :: " << name << iendl;
+    oss << "END SUBROUTINE cxios_get_" << className << "_" << name << std::endl;
+  }
+
+  template <>
+  void CInterface::AttributeFortran2003Interface<string>(ostream& oss, const string& className, const string& name)
+  {
+//    oss << "SUBROUTINE cxios_set_" << className << "_" << name << "(" << className << "_hdl, " << name << ", " << name << "_size) BIND(C)" << iendl;
+    int indent = oss.iword(iendl.index);
+    string str ="SUBROUTINE cxios_set_" + className + "_" + name + "(" + className + "_hdl, " + name + ", " + name + "_size) BIND(C)";
+    if ((str.length() + indent) >132)
+    {
+      oss << str.substr(0,130-indent) ;
+      oss << "&" << endl;
+      oss << "&" << str.substr(130-indent,str.length()) ;
+    }
+    else
+    {
+      oss << str;
+    }
+    oss << iendl;
+    oss << "  USE ISO_C_BINDING" << iendl;
+    oss << "  INTEGER (kind = C_INTPTR_T), VALUE :: " << className << "_hdl" << iendl;
+    oss << "  CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: " << name << iendl;
+    oss << "  INTEGER  (kind = C_INT)     , VALUE        :: " << name << "_size" << iendl;
+    oss << "END SUBROUTINE cxios_set_" << className << "_" << name << std::endl;
+    oss << iendl;
+//    oss << "SUBROUTINE cxios_get_" << className << "_" << name << "(" << className << "_hdl, " << name << ", " << name << "_size) BIND(C)" << iendl;
+    str = "SUBROUTINE cxios_get_" + className + "_" + name + "(" + className + "_hdl, " + name + ", " + name + "_size) BIND(C)";
+    if ((str.length() + indent) >132)
+    {
+      oss << str.substr(0,130-indent) ;
+      oss << "&" << endl;
+      oss << "&" << str.substr(130-indent,str.length()) ;
+    }
+    else
+    {
+      oss << str;
+    }
+    oss << iendl;
+    oss << "  USE ISO_C_BINDING" << iendl;
+    oss << "  INTEGER (kind = C_INTPTR_T), VALUE :: " << className << "_hdl" << iendl;
+    oss << "  CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: " << name << iendl;
+    oss << "  INTEGER  (kind = C_INT)     , VALUE        :: " << name << "_size" << iendl;
+    oss << "END SUBROUTINE cxios_get_" << className << "_" << name << std::endl;
+  }
+
+  template <>
+  void CInterface::AttributeFortran2003Interface<CDuration>(ostream& oss, const string& className, const string& name)
+  {
+//    oss << "SUBROUTINE cxios_set_" << className << "_" << name << "(" << className << "_hdl, " << name << ") BIND(C)" << iendl;
+    string str = "SUBROUTINE cxios_set_" + className + "_" + name + "(" + className + "_hdl, " + name + ") BIND(C)";
+    int indent = oss.iword(iendl.index);
+    if ((str.length() + indent) >132)
+    {
+      oss << str.substr(0,130-indent) ;
+      oss << "&" << endl;
+      oss << "&" << str.substr(130-indent,str.length()) ;
+    }
+    else
+    {
+      oss << str;
+    }
+    oss << iendl;
+    oss << "  USE ISO_C_BINDING" << iendl;
+    oss << "  USE IDURATION" << iendl;
+    oss << "  INTEGER (kind = C_INTPTR_T), VALUE :: " << className << "_hdl" << iendl;
+    oss << "  TYPE(txios(duration)), VALUE :: " << name << iendl;
+    oss << "END SUBROUTINE cxios_set_" << className << "_" << name << std::endl;
+    oss << iendl;
+    oss << "SUBROUTINE cxios_get_" << className << "_" << name << "(" << className << "_hdl, " << name << ") BIND(C)" << iendl;
+    oss << "  USE ISO_C_BINDING" << iendl;
+    oss << "  USE IDURATION" << iendl;
+    oss << "  INTEGER (kind = C_INTPTR_T), VALUE :: " << className << "_hdl" << iendl;
+    oss << "  TYPE(txios(duration)) :: " << name << iendl;
+    oss << "END SUBROUTINE cxios_get_" << className << "_" << name << std::endl;
+  }
+
+  template <class T>
+  void CInterface::AttributeFortranInterfaceDeclaration(ostream& oss, const string& className, const string& name)
+  {
+    oss << getStrFortranType<T>() << " " << getStrFortranKind<T>() << " , OPTIONAL, INTENT(IN) :: " << name;
+    if (!matchingTypeCFortran<T>()) oss << iendl << getStrFortranType<T>() << " " << getStrFortranKindC<T>() << " :: " << name << "_tmp";
+  }
+
+  template <class T>
+  void CInterface::AttributeFortranInterfaceGetDeclaration(ostream& oss, const string& className, const string& name)
+  {
+    oss << getStrFortranType<T>() << " " << getStrFortranKind<T>() << " , OPTIONAL, INTENT(OUT) :: " << name;
+    if (!matchingTypeCFortran<T>()) oss << iendl << getStrFortranType<T>() << " " << getStrFortranKindC<T>() << " :: " << name << "_tmp";
+  }
+
+  void CInterface::AttributeFortranInterfaceIsDefinedDeclaration(ostream& oss, const string& className, const string& name)
+  {
+    oss << "LOGICAL, OPTIONAL, INTENT(OUT) :: " << name << iendl;
+    oss << "LOGICAL(KIND=C_BOOL) :: " << name << "_tmp";
+  }
+
+  template <>
+  void CInterface::AttributeFortranInterfaceDeclaration<string>(ostream& oss, const string& className, const string& name)
+  {
+    oss << "CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: " << name;
+  }
+
+  template <>
+  void CInterface::AttributeFortranInterfaceGetDeclaration<string>(ostream& oss, const string& className, const string& name)
+  {
+    oss << "CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: " << name;
+  }
+
+  template <class T>
+  void CInterface::AttributeFortranInterfaceBody(ostream& oss, const string& className, const string& name)
+  {
+    string name_tmp=name+"__tmp";
+
+    oss << "IF (PRESENT(" << name << "_)) THEN" << iendl;
+    if (!matchingTypeCFortran<T>())
+    {
+      oss << "  " << name_tmp << " = " << name << "_" << iendl;
+      oss << "  CALL cxios_set_" << className << "_" << name << " &" << iendl;
+      oss << "(" << className << "_hdl%daddr, " << name_tmp << ")" << iendl;
+    }
+    else { oss << "  CALL cxios_set_" << className << "_" << name << " &" << iendl;
+           oss << "(" << className << "_hdl%daddr, " << name << "_)" << iendl; }
+    oss << "ENDIF";
+  }
+
+  template <class T>
+  void CInterface::AttributeFortranInterfaceGetBody(ostream& oss, const string& className, const string& name)
+  {
+    string name_tmp=name+"__tmp";
+
+    oss << "IF (PRESENT(" << name << "_)) THEN" << iendl;
+    if (!matchingTypeCFortran<T>())
+    {
+      oss << "  CALL cxios_get_" << className << "_" << name << " &" << iendl;
+      oss << "(" << className << "_hdl%daddr, " << name_tmp << ")" << iendl;
+      oss << "  " << name << "_ = " << name_tmp << iendl;
+    }
+    else { oss << "  CALL cxios_get_" << className << "_" << name << " &" << iendl;
+           oss << "(" << className << "_hdl%daddr, " << name << "_)" << iendl; }
+    oss << "ENDIF";
+  }
+
+  void CInterface::AttributeFortranInterfaceIsDefinedBody(ostream& oss, const string& className, const string& name)
+  {
+    string name_tmp=name+"__tmp";
+
+    oss << "IF (PRESENT(" << name << "_)) THEN" << iendl;
+    oss << "  " << name << "__tmp = cxios_is_defined_" << className << "_" << name << " &" << iendl;
+    oss << "(" << className << "_hdl%daddr)" << iendl;
+    oss << "  " << name << "_ = " << name_tmp << iendl;
+    oss << "ENDIF";
+  }
+
+  template <>
+  void CInterface::AttributeFortranInterfaceBody<string>(ostream& oss, const string& className, const string& name)
+  {
+    oss << "IF (PRESENT(" << name << "_)) THEN" << iendl;
+    oss << "  CALL cxios_set_" << className << "_" << name << " &" << iendl;
+    oss << "(" << className << "_hdl%daddr, " << name << "_, len(" << name << "_))" << iendl;
+    oss << "ENDIF";
+  }
+
+  template <>
+  void CInterface::AttributeFortranInterfaceGetBody<string>(ostream& oss, const string& className, const string& name)
+  {
+    oss << "IF (PRESENT(" << name << "_)) THEN" << iendl;
+    oss << "  CALL cxios_get_" << className << "_" << name << " &" << iendl;
+    oss << "(" << className << "_hdl%daddr, " << name << "_, len(" << name << "_))" << iendl;
+    oss << "ENDIF";
+  }
+
+// declaration for CArray
+
+#define macro(T) \
+  template <> \
+  void CInterface::AttributeCInterface<CArray<T,1> >(ostream& oss, const string& className, const string& name) \
+  { \
+    string typeName=getStrType<T>(); \
+\
+    oss << "void cxios_set_" << className << "_" << name << "(" << className << "_Ptr " << className << "_hdl, " << typeName << "* " << name << ", int* extent)" << iendl; \
+    oss << "{" << iendl; \
+    oss << "  CTimer::get(\"XIOS\").resume();" << iendl; \
+    oss << "  CArray<" << typeName << ",1> tmp(" << name << ", shape(extent[0]), neverDeleteData);" << iendl; \
+    oss << "  " << className << "_hdl->" << name << ".reference(tmp.copy());" << iendl; \
+    /*oss << "  " << className << "_hdl->sendAttributToServer(" << className << "_hdl->" << name << ");" << iendl;*/ \
+    oss << "   CTimer::get(\"XIOS\").suspend();" << iendl; \
+    oss << "}" << std::endl; \
+    oss << iendl; \
+    oss << "void cxios_get_" << className << "_" << name << "(" << className << "_Ptr " << className << "_hdl, " << typeName << "* " << name << ", int* extent)" << iendl; \
+    oss << "{" << iendl; \
+    oss << "  CTimer::get(\"XIOS\").resume();" << iendl; \
+    oss << "  CArray<" << typeName << ",1> tmp(" << name << ", shape(extent[0]), neverDeleteData);" << iendl; \
+    oss << "  tmp=" << className << "_hdl->" << name << ".getInheritedValue();" << iendl; \
+    oss << "   CTimer::get(\"XIOS\").suspend();" << iendl; \
+    oss << "}" << std::endl; \
+  } \
+\
+  template <> \
+  void CInterface::AttributeCInterface<CArray<T,2> >(ostream& oss, const string& className, const string& name) \
+  { \
+    string typeName=getStrType<T>(); \
+\
+    oss << "void cxios_set_" << className << "_" << name << "(" << className << "_Ptr " << className << "_hdl, " << typeName << "* " << name << ", int* extent)" << iendl; \
+    oss << "{" << iendl; \
+    oss << "  CTimer::get(\"XIOS\").resume();" << iendl; \
+    oss << "  CArray<" << typeName << ",2> tmp(" << name << ", shape(extent[0], extent[1]), neverDeleteData);" << iendl; \
+    oss << "  " << className << "_hdl->" << name << ".reference(tmp.copy());" << iendl; \
+    /*oss << "  " << className << "_hdl->sendAttributToServer(" << className << "_hdl->" << name << ");" << iendl;*/ \
+    oss << "   CTimer::get(\"XIOS\").suspend();" << iendl; \
+    oss << "}" << std::endl; \
+    oss << iendl; \
+    oss << "void cxios_get_" << className << "_" << name << "(" << className << "_Ptr " << className << "_hdl, " << typeName << "* " << name << ", int* extent)" << iendl; \
+    oss << "{" << iendl; \
+    oss << "  CTimer::get(\"XIOS\").resume();" << iendl; \
+    oss << "  CArray<" << typeName << ",2> tmp(" << name << ", shape(extent[0], extent[1]), neverDeleteData);" << iendl; \
+    oss << "  tmp=" << className << "_hdl->" << name << ".getInheritedValue();" << iendl; \
+    oss << "   CTimer::get(\"XIOS\").suspend();" << iendl; \
+    oss << "}" << std::endl; \
+  } \
+\
+  template <> \
+  void CInterface::AttributeCInterface<CArray<T,3> >(ostream& oss, const string& className, const string& name) \
+  { \
+    string typeName=getStrType<T>(); \
+\
+    oss << "void cxios_set_" << className << "_" << name << "(" << className << "_Ptr " << className << "_hdl, " << typeName << "* " << name << ", int* extent)" << iendl; \
+    oss << "{" << iendl; \
+    oss << "  CTimer::get(\"XIOS\").resume();" << iendl; \
+    oss << "  CArray<" << typeName << ",3> tmp(" << name << ", shape(extent[0], extent[1], extent[2]), neverDeleteData);" << iendl; \
+    oss << "  " << className << "_hdl->" << name << ".reference(tmp.copy());" << iendl; \
+    /*oss << "  " << className << "_hdl->sendAttributToServer(" << className << "_hdl->" << name << ");" << iendl;*/ \
+    oss << "   CTimer::get(\"XIOS\").suspend();" << iendl; \
+    oss << "}" << std::endl; \
+    oss << iendl; \
+    oss << "void cxios_get_" << className << "_" << name << "(" << className << "_Ptr " << className << "_hdl, " << typeName << "* " << name << ", int* extent)" << iendl; \
+    oss << "{" << iendl; \
+    oss << "  CTimer::get(\"XIOS\").resume();" << iendl; \
+    oss << "  CArray<" << typeName << ",3> tmp(" << name << ", shape(extent[0], extent[1], extent[2]), neverDeleteData);" << iendl; \
+    oss << "  tmp=" << className << "_hdl->" << name << ".getInheritedValue();" << iendl; \
+    oss << "   CTimer::get(\"XIOS\").suspend();" << iendl; \
+    oss << "}" << std::endl; \
+  } \
+\
+  template <> \
+  void CInterface::AttributeCInterface<CArray<T,4> >(ostream& oss, const string& className, const string& name) \
+  { \
+    string typeName=getStrType<T>(); \
+\
+    oss << "void cxios_set_" << className << "_" << name << "(" << className << "_Ptr " << className << "_hdl, " << typeName << "* " << name << ", int* extent)" << iendl; \
+    oss << "{" << iendl; \
+    oss << "  CTimer::get(\"XIOS\").resume();" << iendl; \
+    oss << "  CArray<" << typeName << ",4> tmp(" << name << ", shape(extent[0], extent[1], extent[2], extent[3]), neverDeleteData);" << iendl; \
+    oss << "  " << className << "_hdl->" << name << ".reference(tmp.copy());" << iendl; \
+    /*oss << "  " << className << "_hdl->sendAttributToServer(" << className << "_hdl->" << name << ");" << iendl;*/ \
+    oss << "   CTimer::get(\"XIOS\").suspend();" << iendl; \
+    oss << "}" << std::endl; \
+    oss << iendl; \
+    oss << "void cxios_get_" << className << "_" << name << "(" << className << "_Ptr " << className << "_hdl, " << typeName << "* " << name << ", int* extent)" << iendl; \
+    oss << "{" << iendl; \
+    oss << "  CTimer::get(\"XIOS\").resume();" << iendl; \
+    oss << "  CArray<" << typeName << ",4> tmp(" << name << ", shape(extent[0], extent[1], extent[2], extent[3]), neverDeleteData);" << iendl; \
+    oss << "  tmp=" << className << "_hdl->" << name << ".getInheritedValue();" << iendl; \
+    oss << "   CTimer::get(\"XIOS\").suspend();" << iendl; \
+    oss << "}" << std::endl; \
+  } \
+\
+  template <> \
+  void CInterface::AttributeCInterface<CArray<T,5> >(ostream& oss, const string& className, const string& name) \
+  { \
+    string typeName=getStrType<T>(); \
+\
+    oss << "void cxios_set_" << className << "_" << name << "(" << className << "_Ptr " << className << "_hdl, " << typeName << "* " << name << ", int* extent)" << iendl; \
+    oss << "{" << iendl; \
+    oss << "  CTimer::get(\"XIOS\").resume();" << iendl; \
+    oss << "  CArray<" << typeName << ",5> tmp(" << name << ", shape(extent[0], extent[1], extent[2], extent[3], extent[4]), neverDeleteData);" << iendl; \
+    oss << "  " << className << "_hdl->" << name << ".reference(tmp.copy());" << iendl; \
+    /*oss << "  " << className << "_hdl->sendAttributToServer(" << className << "_hdl->" << name << ");" << iendl;*/ \
+    oss << "   CTimer::get(\"XIOS\").suspend();" << iendl; \
+    oss << "}" << std::endl; \
+    oss << iendl; \
+    oss << "void cxios_get_" << className << "_" << name << "(" << className << "_Ptr " << className << "_hdl, " << typeName << "* " << name << ", int* extent)" << iendl; \
+    oss << "{" << iendl; \
+    oss << "  CTimer::get(\"XIOS\").resume();" << iendl; \
+    oss << "  CArray<" << typeName << ",5> tmp(" << name << ", shape(extent[0], extent[1], extent[2], extent[3], extent[4]), neverDeleteData);" << iendl; \
+    oss << "  tmp=" << className << "_hdl->" << name << ".getInheritedValue();" << iendl; \
+    oss << "   CTimer::get(\"XIOS\").suspend();" << iendl; \
+    oss << "}" << std::endl; \
+  } \
+\
+  template <> \
+  void CInterface::AttributeCInterface<CArray<T,6> >(ostream& oss, const string& className, const string& name) \
+  { \
+    string typeName=getStrType<T>(); \
+\
+    oss << "void cxios_set_" << className << "_" << name << "(" << className << "_Ptr " << className << "_hdl, " << typeName << "* " << name << ", int* extent)" << iendl; \
+    oss << "{" << iendl; \
+    oss << "  CTimer::get(\"XIOS\").resume();" << iendl; \
+    oss << "  CArray<" << typeName << ",6> tmp(" << name << ", shape(extent[0], extent[1], extent[2], extent[3], extent[4], extent[5]), neverDeleteData);" << iendl; \
+    oss << "  " << className << "_hdl->" << name << ".reference(tmp.copy());" << iendl; \
+    /*oss << "  " << className << "_hdl->sendAttributToServer(" << className << "_hdl->" << name << ");" << iendl;*/ \
+    oss << "   CTimer::get(\"XIOS\").suspend();" << iendl; \
+    oss << "}" << std::endl; \
+    oss << iendl; \
+    oss << "void cxios_get_" << className << "_" << name << "(" << className << "_Ptr " << className << "_hdl, " << typeName << "* " << name << ", int* extent)" << iendl; \
+    oss << "{" << iendl; \
+    oss << "  CTimer::get(\"XIOS\").resume();" << iendl; \
+    oss << "  CArray<" << typeName << ",6> tmp(" << name << ", shape(extent[0], extent[1], extent[2], extent[3], extent[4], extent[5]), neverDeleteData);" << iendl; \
+    oss << "  tmp=" << className << "_hdl->" << name << ".getInheritedValue();" << iendl; \
+    oss << "   CTimer::get(\"XIOS\").suspend();" << iendl; \
+    oss << "}" << std::endl; \
+  }  \
+\
+  template <> \
+  void CInterface::AttributeCInterface<CArray<T,7> >(ostream& oss, const string& className, const string& name) \
+  { \
+    string typeName=getStrType<T>(); \
+\
+    oss << "void cxios_set_" << className << "_" << name << "(" << className << "_Ptr " << className << "_hdl, " << typeName << "* " << name << ", int* extent)" << iendl; \
+    oss << "{" << iendl; \
+    oss << "  CTimer::get(\"XIOS\").resume();" << iendl; \
+    oss << "  CArray<" << typeName << ",7> tmp(" << name << ", shape(extent[0], extent[1], extent[2], extent[3], extent[4], extent[5], extent[6]), neverDeleteData);" << iendl; \
+    oss << "  " << className << "_hdl->" << name << ".reference(tmp.copy());" << iendl; \
+    /*oss << "  " << className << "_hdl->sendAttributToServer(" << className << "_hdl->" << name << ");" << iendl;*/ \
+    oss << "   CTimer::get(\"XIOS\").suspend();" << iendl; \
+    oss << "}" << std::endl; \
+    oss << iendl; \
+    oss << "void cxios_get_" << className << "_" << name << "(" << className << "_Ptr " << className << "_hdl, " << typeName << "* " << name << ", int* extent)" << iendl; \
+    oss << "{" << iendl; \
+    oss << "  CTimer::get(\"XIOS\").resume();" << iendl; \
+    oss << "  CArray<" << typeName << ",7> tmp(" << name << ", shape(extent[0], extent[1], extent[2], extent[3], extent[4], extent[5], extent[6]), neverDeleteData);" << iendl; \
+    oss << "  tmp=" << className << "_hdl->" << name << ".getInheritedValue();" << iendl; \
+    oss << "   CTimer::get(\"XIOS\").suspend();" << iendl; \
+    oss << "}" << std::endl; \
+  }
+
+macro(bool)
+macro(double)
+macro(int)
+
+#undef macro
+
+#define macro(N,EXTENT)\
+  template <>\
+  void CInterface::AttributeCInterface<CArray<StdString,N> >(ostream& oss, const string& className, const string& name)\
+  { \
+    oss << "void cxios_set_" << className << "_" << name << "(" << className << "_Ptr " << className << "_hdl, " << "char* " << name <<", int str_len, int* str_size, int* extent)" << iendl; \
+    oss << "{" << iendl; \
+    oss << "  CTimer::get(\"XIOS\").resume();" << iendl; \
+    oss << "  "<<className<<"_hdl->"<<name<<".resize(shape("<<EXTENT<<"));"<<iendl;\
+    oss << "  Array<StdString,"<<#N<<">::iterator it, itb="<<className<<"_hdl->"<<name<<".begin(), ite="<<className<<"_hdl->"<<name<<".end() ;"<<iendl ;\
+    oss << "  int i, n ;"<< iendl; \
+    oss << "  for(it=itb, i=0, n=0 ; it!=ite ; ++it,n+=str_len,++i) *it=StdString(&"<<name<<"[n],str_size[i]) ;"<<iendl ;\
+    oss << "  CTimer::get(\"XIOS\").suspend();" << iendl; \
+    oss << "}" << std::endl; \
+    oss << iendl; \
+    oss << "void cxios_get_" << className << "_" << name << "(" << className << "_Ptr " << className << "_hdl, " << "char* " << name << ", int str_size, int* extent)" << iendl; \
+    oss << "{" << iendl; \
+    oss << "  CTimer::get(\"XIOS\").resume();" << iendl; \
+    oss << "  Array<StdString,"<<#N<<">::const_iterator it, itb="<<className<<"_hdl->"<<name<<".getInheritedValue().begin(), ite="<<className<<"_hdl->"<<name<<".getInheritedValue().end() ;" << iendl; \
+    oss << "  int n ;"<< iendl; \
+    oss << "  for(it=itb, n=0 ; it!=ite ; ++it, n+=str_size) it->copy(&"<<name<<"[n],it->size()) ; "<< iendl; \
+    oss << "  CTimer::get(\"XIOS\").suspend();" << iendl; \
+    oss << "}" << std::endl; \
+  }
+
+macro(1,"extent[0]")
+macro(2,"extent[0],extent[1]")
+macro(3,"extent[0],extent[1],extent[2]")
+macro(4,"extent[0],extent[1],extent[2],extent[3]")
+macro(5,"extent[0],extent[1],extent[2],extent[3],extent[4]")
+macro(6,"extent[0],extent[1],extent[2],extent[3],extent[4],extent[5]")
+macro(7,"extent[0],extent[1],extent[2],extent[3],extent[4],extent[5],extent[6]")
+#undef macro
+// /////////////////////////////////////////////////
+// //          Fortran 2003 Interface             //
+// /////////////////////////////////////////////////
+
+#define macro(T) \
+  template <> \
+  void CInterface::AttributeFortran2003Interface<CArray<T,1> >(ostream& oss, const string& className, const string& name) \
+  { \
+    string fortranType=getStrFortranType<T>(); \
+    string fortranKindC=getStrFortranKindC<T>(); \
+      \
+    oss << "SUBROUTINE cxios_set_" << className << "_" << name << "(" << className << "_hdl, " << name << ", extent) BIND(C)" << iendl; \
+    oss << "  USE ISO_C_BINDING" << iendl; \
+    oss << "  INTEGER (kind = C_INTPTR_T), VALUE       :: " << className << "_hdl" << iendl; \
+    oss << "  " << fortranType << " " << fortranKindC << "     , DIMENSION(*) :: " << name << iendl; \
+    oss << "  INTEGER (kind = C_INT), DIMENSION(*)     :: extent" << iendl; \
+    oss << "END SUBROUTINE cxios_set_" << className << "_" << name << std::endl; \
+    oss << iendl; \
+    oss << "SUBROUTINE cxios_get_" << className << "_" << name << "(" << className << "_hdl, " << name << ", extent) BIND(C)" << iendl; \
+    oss << "  USE ISO_C_BINDING" << iendl; \
+    oss << "  INTEGER (kind = C_INTPTR_T), VALUE       :: " << className << "_hdl" << iendl; \
+    oss << "  " << fortranType << " " << fortranKindC << "     , DIMENSION(*) :: " << name << iendl; \
+    oss << "  INTEGER (kind = C_INT), DIMENSION(*)     :: extent" << iendl; \
+    oss << "END SUBROUTINE cxios_get_" << className << "_" << name << std::endl; \
+  } \
+ \
+  template <> \
+  void CInterface::AttributeFortran2003Interface<CArray<T,2> >(ostream& oss, const string& className, const string& name) \
+  { \
+    string fortranType=getStrFortranType<T>(); \
+    string fortranKindC=getStrFortranKindC<T>(); \
+      \
+    oss << "SUBROUTINE cxios_set_" << className << "_" << name << "(" << className << "_hdl, " << name << ", extent) BIND(C)" << iendl; \
+    oss << "  USE ISO_C_BINDING" << iendl; \
+    oss << "  INTEGER (kind = C_INTPTR_T), VALUE       :: " << className << "_hdl" << iendl; \
+    oss << "  " << fortranType << " " << fortranKindC << "     , DIMENSION(*) :: " << name << iendl; \
+    oss << "  INTEGER (kind = C_INT), DIMENSION(*)     :: extent" << iendl; \
+    oss << "END SUBROUTINE cxios_set_" << className << "_" << name << std::endl; \
+    oss << iendl; \
+    oss << "SUBROUTINE cxios_get_" << className << "_" << name << "(" << className << "_hdl, " << name << ", extent) BIND(C)" << iendl; \
+    oss << "  USE ISO_C_BINDING" << iendl; \
+    oss << "  INTEGER (kind = C_INTPTR_T), VALUE       :: " << className << "_hdl" << iendl; \
+    oss << "  " << fortranType << " " << fortranKindC << "     , DIMENSION(*) :: " << name << iendl; \
+    oss << "  INTEGER (kind = C_INT), DIMENSION(*)     :: extent" << iendl; \
+    oss << "END SUBROUTINE cxios_get_" << className << "_" << name << std::endl; \
+  } \
+ \
+  template <> \
+  void CInterface::AttributeFortran2003Interface<CArray<T,3> >(ostream& oss, const string& className, const string& name) \
+  { \
+    string fortranType=getStrFortranType<T>(); \
+    string fortranKindC=getStrFortranKindC<T>(); \
+      \
+    oss << "SUBROUTINE cxios_set_" << className << "_" << name << "(" << className << "_hdl, " << name << ", extent) BIND(C)" << iendl; \
+    oss << "  USE ISO_C_BINDING" << iendl; \
+    oss << "  INTEGER (kind = C_INTPTR_T), VALUE       :: " << className << "_hdl" << iendl; \
+    oss << "  " << fortranType << " " << fortranKindC << "     , DIMENSION(*) :: " << name << iendl; \
+    oss << "  INTEGER (kind = C_INT), DIMENSION(*)     :: extent" << iendl; \
+    oss << "END SUBROUTINE cxios_set_" << className << "_" << name << std::endl; \
+    oss << iendl; \
+    oss << "SUBROUTINE cxios_get_" << className << "_" << name << "(" << className << "_hdl, " << name << ", extent) BIND(C)" << iendl; \
+    oss << "  USE ISO_C_BINDING" << iendl; \
+    oss << "  INTEGER (kind = C_INTPTR_T), VALUE       :: " << className << "_hdl" << iendl; \
+    oss << "  " << fortranType << " " << fortranKindC << "     , DIMENSION(*) :: " << name << iendl; \
+    oss << "  INTEGER (kind = C_INT), DIMENSION(*)     :: extent" << iendl; \
+    oss << "END SUBROUTINE cxios_get_" << className << "_" << name << std::endl; \
+  }  \
+ \
+  template <> \
+  void CInterface::AttributeFortran2003Interface<CArray<T,4> >(ostream& oss, const string& className, const string& name) \
+  { \
+    string fortranType=getStrFortranType<T>(); \
+    string fortranKindC=getStrFortranKindC<T>(); \
+      \
+    oss << "SUBROUTINE cxios_set_" << className << "_" << name << "(" << className << "_hdl, " << name << ", extent) BIND(C)" << iendl; \
+    oss << "  USE ISO_C_BINDING" << iendl; \
+    oss << "  INTEGER (kind = C_INTPTR_T), VALUE       :: " << className << "_hdl" << iendl; \
+    oss << "  " << fortranType << " " << fortranKindC << "     , DIMENSION(*) :: " << name << iendl; \
+    oss << "  INTEGER (kind = C_INT), DIMENSION(*)     :: extent" << iendl; \
+    oss << "END SUBROUTINE cxios_set_" << className << "_" << name << std::endl; \
+    oss << iendl; \
+    oss << "SUBROUTINE cxios_get_" << className << "_" << name << "(" << className << "_hdl, " << name << ", extent) BIND(C)" << iendl; \
+    oss << "  USE ISO_C_BINDING" << iendl; \
+    oss << "  INTEGER (kind = C_INTPTR_T), VALUE       :: " << className << "_hdl" << iendl; \
+    oss << "  " << fortranType << " " << fortranKindC << "     , DIMENSION(*) :: " << name << iendl; \
+    oss << "  INTEGER (kind = C_INT), DIMENSION(*)     :: extent" << iendl; \
+    oss << "END SUBROUTINE cxios_get_" << className << "_" << name << std::endl; \
+  }\
+ \
+  template <> \
+  void CInterface::AttributeFortran2003Interface<CArray<T,5> >(ostream& oss, const string& className, const string& name) \
+  { \
+    string fortranType=getStrFortranType<T>(); \
+    string fortranKindC=getStrFortranKindC<T>(); \
+      \
+    oss << "SUBROUTINE cxios_set_" << className << "_" << name << "(" << className << "_hdl, " << name << ", extent) BIND(C)" << iendl; \
+    oss << "  USE ISO_C_BINDING" << iendl; \
+    oss << "  INTEGER (kind = C_INTPTR_T), VALUE       :: " << className << "_hdl" << iendl; \
+    oss << "  " << fortranType << " " << fortranKindC << "     , DIMENSION(*) :: " << name << iendl; \
+    oss << "  INTEGER (kind = C_INT), DIMENSION(*)     :: extent" << iendl; \
+    oss << "END SUBROUTINE cxios_set_" << className << "_" << name << std::endl; \
+    oss << iendl; \
+    oss << "SUBROUTINE cxios_get_" << className << "_" << name << "(" << className << "_hdl, " << name << ", extent) BIND(C)" << iendl; \
+    oss << "  USE ISO_C_BINDING" << iendl; \
+    oss << "  INTEGER (kind = C_INTPTR_T), VALUE       :: " << className << "_hdl" << iendl; \
+    oss << "  " << fortranType << " " << fortranKindC << "     , DIMENSION(*) :: " << name << iendl; \
+    oss << "  INTEGER (kind = C_INT), DIMENSION(*)     :: extent" << iendl; \
+    oss << "END SUBROUTINE cxios_get_" << className << "_" << name << std::endl; \
+  }\
+ \
+  template <> \
+  void CInterface::AttributeFortran2003Interface<CArray<T,6> >(ostream& oss, const string& className, const string& name) \
+  { \
+    string fortranType=getStrFortranType<T>(); \
+    string fortranKindC=getStrFortranKindC<T>(); \
+      \
+    oss << "SUBROUTINE cxios_set_" << className << "_" << name << "(" << className << "_hdl, " << name << ", extent) BIND(C)" << iendl; \
+    oss << "  USE ISO_C_BINDING" << iendl; \
+    oss << "  INTEGER (kind = C_INTPTR_T), VALUE       :: " << className << "_hdl" << iendl; \
+    oss << "  " << fortranType << " " << fortranKindC << "     , DIMENSION(*) :: " << name << iendl; \
+    oss << "  INTEGER (kind = C_INT), DIMENSION(*)     :: extent" << iendl; \
+    oss << "END SUBROUTINE cxios_set_" << className << "_" << name << std::endl; \
+    oss << iendl; \
+    oss << "SUBROUTINE cxios_get_" << className << "_" << name << "(" << className << "_hdl, " << name << ", extent) BIND(C)" << iendl; \
+    oss << "  USE ISO_C_BINDING" << iendl; \
+    oss << "  INTEGER (kind = C_INTPTR_T), VALUE       :: " << className << "_hdl" << iendl; \
+    oss << "  " << fortranType << " " << fortranKindC << "     , DIMENSION(*) :: " << name << iendl; \
+    oss << "  INTEGER (kind = C_INT), DIMENSION(*)     :: extent" << iendl; \
+    oss << "END SUBROUTINE cxios_get_" << className << "_" << name << std::endl; \
+  }\
+ \
+  template <> \
+  void CInterface::AttributeFortran2003Interface<CArray<T,7> >(ostream& oss, const string& className, const string& name) \
+  { \
+    string fortranType=getStrFortranType<T>(); \
+    string fortranKindC=getStrFortranKindC<T>(); \
+      \
+    oss << "SUBROUTINE cxios_set_" << className << "_" << name << "(" << className << "_hdl, " << name << ", extent) BIND(C)" << iendl; \
+    oss << "  USE ISO_C_BINDING" << iendl; \
+    oss << "  INTEGER (kind = C_INTPTR_T), VALUE       :: " << className << "_hdl" << iendl; \
+    oss << "  " << fortranType << " " << fortranKindC << "     , DIMENSION(*) :: " << name << iendl; \
+    oss << "  INTEGER (kind = C_INT), DIMENSION(*)     :: extent" << iendl; \
+    oss << "END SUBROUTINE cxios_set_" << className << "_" << name << std::endl; \
+    oss << iendl; \
+    oss << "SUBROUTINE cxios_get_" << className << "_" << name << "(" << className << "_hdl, " << name << ", extent) BIND(C)" << iendl; \
+    oss << "  USE ISO_C_BINDING" << iendl; \
+    oss << "  INTEGER (kind = C_INTPTR_T), VALUE       :: " << className << "_hdl" << iendl; \
+    oss << "  " << fortranType << " " << fortranKindC << "     , DIMENSION(*) :: " << name << iendl; \
+    oss << "  INTEGER (kind = C_INT), DIMENSION(*)     :: extent" << iendl; \
+    oss << "END SUBROUTINE cxios_get_" << className << "_" << name << std::endl; \
+  }
+
+  macro(bool)
+  macro(double)
+  macro(int)
+
+  #undef macro
+
+#define macro(T)\
+  template <>\
+  void CInterface::AttributeFortran2003Interface<CArray<StdString,T> >(ostream& oss, const string& className, const string& name)\
+  {\
+    oss << "SUBROUTINE cxios_set_" << className << "_" << name << "(" << className << "_hdl, " << name << ", str_len, str_size, extent) BIND(C)" << iendl; \
+    oss << "  USE ISO_C_BINDING" << iendl; \
+    oss << "  INTEGER (kind = C_INTPTR_T), VALUE       :: " << className << "_hdl" << iendl; \
+    oss << "  CHARACTER (KIND=C_CHAR), DIMENSION(*)    :: " << name << iendl; \
+    oss << "  INTEGER (kind = C_INT), VALUE            :: str_len" << iendl; \
+    oss << "  INTEGER (kind = C_INT), DIMENSION(*)     :: str_size" << iendl; \
+    oss << "  INTEGER (kind = C_INT), DIMENSION(*)     :: extent" << iendl; \
+    oss << "END SUBROUTINE cxios_set_" << className << "_" << name << std::endl; \
+    oss << iendl; \
+    oss << "SUBROUTINE cxios_get_" << className << "_" << name << "(" << className << "_hdl, " << name << ", str_size, extent) BIND(C)" << iendl; \
+    oss << "  USE ISO_C_BINDING" << iendl; \
+    oss << "  INTEGER (kind = C_INTPTR_T), VALUE       :: " << className << "_hdl" << iendl; \
+    oss << "  CHARACTER (KIND=C_CHAR), DIMENSION(*)    :: " << name << iendl; \
+    oss << "  INTEGER (kind = C_INT), VALUE            :: str_size" << iendl; \
+    oss << "  INTEGER (kind = C_INT), DIMENSION(*)     :: extent" << iendl; \
+    oss << "END SUBROUTINE cxios_get_" << className << "_" << name << std::endl; \
+  }
+  macro(1)
+  macro(2)
+  macro(3)
+  macro(4)
+  macro(5)
+  macro(6)
+  macro(7)
+
+#undef macro
+
+#define macro(T) \
+  template <> \
+  void CInterface::AttributeFortranInterfaceDeclaration<CArray<T,1> >(ostream& oss, const string& className, const string& name) \
+  { \
+    oss << getStrFortranType<T>() << " " << getStrFortranKind<T>() << " , OPTIONAL, INTENT(IN) :: " << name << "(:)"; \
+    if (!matchingTypeCFortran<T>()) oss << iendl << getStrFortranType<T>() << " " << getStrFortranKindC<T>() << " , ALLOCATABLE :: " << name << "_tmp(:)"; \
+  } \
+  template <> \
+  void CInterface::AttributeFortranInterfaceGetDeclaration<CArray<T,1> >(ostream& oss, const string& className, const string& name) \
+  { \
+    oss << getStrFortranType<T>() << " " << getStrFortranKind<T>() << " , OPTIONAL, INTENT(OUT) :: " << name << "(:)"; \
+    if (!matchingTypeCFortran<T>()) oss << iendl << getStrFortranType<T>() << " " << getStrFortranKindC<T>() << " , ALLOCATABLE :: " << name << "_tmp(:)"; \
+  } \
+ \
+  template <> \
+  void CInterface::AttributeFortranInterfaceDeclaration<CArray<T,2> >(ostream& oss, const string& className, const string& name) \
+  { \
+    oss << getStrFortranType<T>() << " " << getStrFortranKind<T>() << " , OPTIONAL, INTENT(IN) :: " << name << "(:,:)"; \
+    if (!matchingTypeCFortran<T>()) oss << iendl << getStrFortranType<T>() << " " << getStrFortranKindC<T>() << " , ALLOCATABLE :: " << name << "_tmp(:,:)"; \
+  } \
+ \
+  template <> \
+  void CInterface::AttributeFortranInterfaceGetDeclaration<CArray<T,2> >(ostream& oss, const string& className, const string& name) \
+  { \
+    oss << getStrFortranType<T>() << " " << getStrFortranKind<T>() << " , OPTIONAL, INTENT(OUT) :: " << name << "(:,:)"; \
+    if (!matchingTypeCFortran<T>()) oss << iendl << getStrFortranType<T>() << " " << getStrFortranKindC<T>() << " , ALLOCATABLE :: " << name << "_tmp(:,:)"; \
+  } \
+ \
+  template <> \
+  void CInterface::AttributeFortranInterfaceDeclaration<CArray<T,3> >(ostream& oss, const string& className, const string& name) \
+  { \
+    oss << getStrFortranType<T>() << " " << getStrFortranKind<T>() << " , OPTIONAL, INTENT(IN) :: " << name << "(:,:,:)"; \
+    if (!matchingTypeCFortran<T>()) oss << iendl << getStrFortranType<T>() << " " << getStrFortranKindC<T>() << " , ALLOCATABLE :: " << name << "_tmp(:,:,:)"; \
+  } \
+ \
+  template <> \
+  void CInterface::AttributeFortranInterfaceGetDeclaration<CArray<T,3> >(ostream& oss, const string& className, const string& name) \
+  { \
+    oss << getStrFortranType<T>() << " " << getStrFortranKind<T>() << " , OPTIONAL, INTENT(OUT) :: " << name << "(:,:,:)"; \
+    if (!matchingTypeCFortran<T>()) oss << iendl << getStrFortranType<T>() << " " << getStrFortranKindC<T>() << " , ALLOCATABLE :: " << name << "_tmp(:,:,:)"; \
+  }\
+ \
+  template <> \
+  void CInterface::AttributeFortranInterfaceDeclaration<CArray<T,4> >(ostream& oss, const string& className, const string& name) \
+  { \
+    oss << getStrFortranType<T>() << " " << getStrFortranKind<T>() << " , OPTIONAL, INTENT(IN) :: " << name << "(:,:,:,:)"; \
+    if (!matchingTypeCFortran<T>()) oss << iendl << getStrFortranType<T>() << " " << getStrFortranKindC<T>() << " , ALLOCATABLE :: " << name << "_tmp(:,:,:,:)"; \
+  } \
+ \
+  template <> \
+  void CInterface::AttributeFortranInterfaceGetDeclaration<CArray<T,4> >(ostream& oss, const string& className, const string& name) \
+  { \
+    oss << getStrFortranType<T>() << " " << getStrFortranKind<T>() << " , OPTIONAL, INTENT(OUT) :: " << name << "(:,:,:,:)"; \
+    if (!matchingTypeCFortran<T>()) oss << iendl << getStrFortranType<T>() << " " << getStrFortranKindC<T>() << " , ALLOCATABLE :: " << name << "_tmp(:,:,:,:)"; \
+  }\
+ \
+  template <> \
+  void CInterface::AttributeFortranInterfaceDeclaration<CArray<T,5> >(ostream& oss, const string& className, const string& name) \
+  { \
+    oss << getStrFortranType<T>() << " " << getStrFortranKind<T>() << " , OPTIONAL, INTENT(IN) :: " << name << "(:,:,:,:,:)"; \
+    if (!matchingTypeCFortran<T>()) oss << iendl << getStrFortranType<T>() << " " << getStrFortranKindC<T>() << " , ALLOCATABLE :: " << name << "_tmp(:,:,:,:,:)"; \
+  } \
+ \
+  template <> \
+  void CInterface::AttributeFortranInterfaceGetDeclaration<CArray<T,5> >(ostream& oss, const string& className, const string& name) \
+  { \
+    oss << getStrFortranType<T>() << " " << getStrFortranKind<T>() << " , OPTIONAL, INTENT(OUT) :: " << name << "(:,:,:,:,:)"; \
+    if (!matchingTypeCFortran<T>()) oss << iendl << getStrFortranType<T>() << " " << getStrFortranKindC<T>() << " , ALLOCATABLE :: " << name << "_tmp(:,:,:,:,:)"; \
+  }\
+ \
+  template <> \
+  void CInterface::AttributeFortranInterfaceDeclaration<CArray<T,6> >(ostream& oss, const string& className, const string& name) \
+  { \
+    oss << getStrFortranType<T>() << " " << getStrFortranKind<T>() << " , OPTIONAL, INTENT(IN) :: " << name << "(:,:,:,:,:,:)"; \
+    if (!matchingTypeCFortran<T>()) oss << iendl << getStrFortranType<T>() << " " << getStrFortranKindC<T>() << " , ALLOCATABLE :: " << name << "_tmp(:,:,:,:,:,:)"; \
+  } \
+ \
+  template <> \
+  void CInterface::AttributeFortranInterfaceGetDeclaration<CArray<T,6> >(ostream& oss, const string& className, const string& name) \
+  { \
+    oss << getStrFortranType<T>() << " " << getStrFortranKind<T>() << " , OPTIONAL, INTENT(OUT) :: " << name << "(:,:,:,:,:,:)"; \
+    if (!matchingTypeCFortran<T>()) oss << iendl << getStrFortranType<T>() << " " << getStrFortranKindC<T>() << " , ALLOCATABLE :: " << name << "_tmp(:,:,:,:,:,:)"; \
+  }\
+ \
+  template <> \
+  void CInterface::AttributeFortranInterfaceDeclaration<CArray<T,7> >(ostream& oss, const string& className, const string& name) \
+  { \
+    oss << getStrFortranType<T>() << " " << getStrFortranKind<T>() << " , OPTIONAL, INTENT(IN) :: " << name << "(:,:,:,:,:,:,:)"; \
+    if (!matchingTypeCFortran<T>()) oss << iendl << getStrFortranType<T>() << " " << getStrFortranKindC<T>() << " , ALLOCATABLE :: " << name << "_tmp(:,:,:,:,:,:,:)"; \
+  } \
+ \
+  template <> \
+  void CInterface::AttributeFortranInterfaceGetDeclaration<CArray<T,7> >(ostream& oss, const string& className, const string& name) \
+  { \
+    oss << getStrFortranType<T>() << " " << getStrFortranKind<T>() << " , OPTIONAL, INTENT(OUT) :: " << name << "(:,:,:,:,:,:,:)"; \
+    if (!matchingTypeCFortran<T>()) oss << iendl << getStrFortranType<T>() << " " << getStrFortranKindC<T>() << " , ALLOCATABLE :: " << name << "_tmp(:,:,:,:,:,:,:)"; \
+  }
+
+  macro(bool)
+  macro(double)
+  macro(int)
+
+#undef macro
+
+#define macro(T,EXTENT)\
+  template <> \
+  void CInterface::AttributeFortranInterfaceDeclaration<CArray<StdString,T> >(ostream& oss, const string& className, const string& name)\
+  {\
+    oss << "CHARACTER(len=*) , OPTIONAL, INTENT(IN) :: " << name << "("<<EXTENT<<")"; \
+  }\
+\
+  template <>\ 
+  void CInterface::AttributeFortranInterfaceGetDeclaration<CArray<StdString,T> >(ostream& oss, const string& className, const string& name)\
+  {\
+    oss << "CHARACTER(len=*) , OPTIONAL, INTENT(OUT) :: " << name << "("<<EXTENT<<")"; \
+  }
+  macro(1,":")
+  macro(2,":,:")
+  macro(3,":,:,:")
+  macro(4,":,:,:,:")
+  macro(5,":,:,:,:,:")
+  macro(6,":,:,:,:,:,:")
+  macro(7,":,:,:,:,:,:,:")
+
+#undef macro
+
+
+
+
+  
+
+#define macro(T) \
+  template <>  \
+  void CInterface::AttributeFortranInterfaceBody< CArray<T,1> >(ostream& oss, const string& className, const string& name) \
+  {  \
+    string name_tmp=name+"__tmp"; \
+      \
+    oss << "IF (PRESENT(" << name << "_)) THEN" << iendl; \
+    if (!matchingTypeCFortran<T>())  \
+    { \
+      oss << "  ALLOCATE(" << name_tmp << "(SIZE(" << name << "_,1)))" << iendl; \
+      oss << "  " << name_tmp << " = " << name << "_" << iendl; \
+      oss << "  CALL cxios_set_" << className << "_" << name << " &" << iendl; \
+      oss << "(" << className << "_hdl%daddr, " << name_tmp << ", SHAPE(" << name << "_))" << iendl; \
+    } \
+    else { oss << "  CALL cxios_set_" << className << "_" << name << " &" << iendl; \
+           oss << "(" << className << "_hdl%daddr, " << name << "_, SHAPE(" << name << "_))" << iendl; } \
+    oss << "ENDIF"; \
+  } \
+ \
+  template <>  \
+  void CInterface::AttributeFortranInterfaceBody< CArray<T,2> >(ostream& oss, const string& className, const string& name) \
+  {  \
+    string name_tmp=name+"__tmp"; \
+      \
+    oss << "IF (PRESENT(" << name << "_)) THEN" << iendl; \
+    if (!matchingTypeCFortran<T>())  \
+    { \
+      oss << "  ALLOCATE(" << name_tmp << "(SIZE(" << name << "_,1), SIZE(" << name << "_,2)))" << iendl; \
+      oss << "  " << name_tmp << " = " << name << "_" << iendl; \
+      oss << "  CALL cxios_set_" << className << "_" << name << " &" << iendl; \
+      oss << "(" << className << "_hdl%daddr, " << name_tmp << ", SHAPE(" << name << "_))" << iendl; \
+    } \
+    else { oss << "  CALL cxios_set_" << className << "_" << name << " &" << iendl; \
+           oss << "(" << className << "_hdl%daddr, " << name << "_, SHAPE(" << name << "_))" << iendl; } \
+    oss << "ENDIF"; \
+  } \
+  \
+  template <>  \
+  void CInterface::AttributeFortranInterfaceBody< CArray<T,3> >(ostream& oss, const string& className, const string& name) \
+  {  \
+    string name_tmp=name+"__tmp"; \
+      \
+    oss << "IF (PRESENT(" << name << "_)) THEN" << iendl; \
+    if (!matchingTypeCFortran<T>())  \
+    { \
+      oss << "  ALLOCATE(" << name_tmp << "(SIZE(" << name << "_,1), SIZE(" << name << "_,2), SIZE(" << name << "_,3)))" << iendl; \
+      oss << "  " << name_tmp << " = " << name << "_" << iendl; \
+      oss << "  CALL cxios_set_" << className << "_" << name << " &" << iendl; \
+      oss << "(" << className << "_hdl%daddr, " << name_tmp << ", SHAPE(" << name << "_))" << iendl; \
+    } \
+    else { oss << "  CALL cxios_set_" << className << "_" << name << " &" << iendl; \
+           oss << "(" << className << "_hdl%daddr, " << name << "_, SHAPE(" << name << "_))" << iendl; } \
+    oss << "ENDIF"; \
+  }\
+  \
+  template <>  \
+  void CInterface::AttributeFortranInterfaceBody< CArray<T,4> >(ostream& oss, const string& className, const string& name) \
+  {  \
+    string name_tmp=name+"__tmp"; \
+      \
+    oss << "IF (PRESENT(" << name << "_)) THEN" << iendl; \
+    if (!matchingTypeCFortran<T>())  \
+    { \
+      oss << "  ALLOCATE(" << name_tmp << "(SIZE(" << name << "_,1), SIZE(" << name << "_,2), SIZE(" << name << "_,3), &" << iendl; \
+      oss << " SIZE(" << name << "_,4)))" << iendl; \
+      oss << "  " << name_tmp << " = " << name << "_" << iendl; \
+      oss << "  CALL cxios_set_" << className << "_" << name << " &" << iendl; \
+      oss << "(" << className << "_hdl%daddr, " << name_tmp << ", SHAPE(" << name << "_))" << iendl; \
+    } \
+    else { oss << "  CALL cxios_set_" << className << "_" << name << " &" << iendl; \
+           oss << "(" << className << "_hdl%daddr, " << name << "_, SHAPE(" << name << "_))" << iendl; } \
+    oss << "ENDIF"; \
+  }\
+  \
+  template <>  \
+  void CInterface::AttributeFortranInterfaceBody< CArray<T,5> >(ostream& oss, const string& className, const string& name) \
+  {  \
+    string name_tmp=name+"__tmp"; \
+      \
+    oss << "IF (PRESENT(" << name << "_)) THEN" << iendl; \
+    if (!matchingTypeCFortran<T>())  \
+    { \
+      oss << "  ALLOCATE(" << name_tmp << "(SIZE(" << name << "_,1), SIZE(" << name << "_,2), SIZE(" << name << "_,3), &" << iendl; \
+      oss << " SIZE(" << name << "_,4), SIZE(" << name << "_,5)))" << iendl; \
+      oss << "  " << name_tmp << " = " << name << "_" << iendl; \
+      oss << "  CALL cxios_set_" << className << "_" << name << " &" << iendl; \
+      oss << "(" << className << "_hdl%daddr, " << name_tmp << ", SHAPE(" << name << "_))" << iendl; \
+    } \
+    else { oss << "  CALL cxios_set_" << className << "_" << name << " &" << iendl; \
+           oss << "(" << className << "_hdl%daddr, " << name << "_, SHAPE(" << name << "_))" << iendl; } \
+    oss << "ENDIF"; \
+  }\
+  \
+  template <>  \
+  void CInterface::AttributeFortranInterfaceBody< CArray<T,6> >(ostream& oss, const string& className, const string& name) \
+  {  \
+    string name_tmp=name+"__tmp"; \
+      \
+    oss << "IF (PRESENT(" << name << "_)) THEN" << iendl; \
+    if (!matchingTypeCFortran<T>())  \
+    { \
+      oss << "  ALLOCATE(" << name_tmp << "(SIZE(" << name << "_,1), SIZE(" << name << "_,2), SIZE(" << name << "_,3), &" << iendl; \
+      oss << " SIZE(" << name << "_,4), SIZE(" << name << "_,5), SIZE(" << name << "_,6)))" << iendl; \
+      oss << "  " << name_tmp << " = " << name << "_" << iendl; \
+      oss << "  CALL cxios_set_" << className << "_" << name << " &" << iendl; \
+      oss << "(" << className << "_hdl%daddr, " << name_tmp << ", SHAPE(" << name << "_))" << iendl; \
+    } \
+    else { oss << "  CALL cxios_set_" << className << "_" << name << " &" << iendl; \
+           oss << "(" << className << "_hdl%daddr, " << name << "_, SHAPE(" << name << "_))" << iendl; } \
+    oss << "ENDIF"; \
+  }\
+  \
+  template <>  \
+  void CInterface::AttributeFortranInterfaceBody< CArray<T,7> >(ostream& oss, const string& className, const string& name) \
+  {  \
+    string name_tmp=name+"__tmp"; \
+      \
+    oss << "IF (PRESENT(" << name << "_)) THEN" << iendl; \
+    if (!matchingTypeCFortran<T>())  \
+    { \
+      oss << "  ALLOCATE(" << name_tmp << "(SIZE(" << name << "_,1), SIZE(" << name << "_,2), SIZE(" << name << "_,3), &" << iendl; \
+      oss << " SIZE(" << name << "_,4), SIZE(" << name << "_,5), SIZE(" << name << "_,6), &" << iendl; \
+      oss << " SIZE(" << name << "_,7)))" << iendl; \
+      oss << "  " << name_tmp << " = " << name << "_" << iendl; \
+      oss << "  CALL cxios_set_" << className << "_" << name << " &" << iendl; \
+      oss << "(" << className << "_hdl%daddr, " << name_tmp << ", SHAPE(" << name << "_))" << iendl; \
+    } \
+    else { oss << "  CALL cxios_set_" << className << "_" << name << " &" << iendl; \
+           oss << "(" << className << "_hdl%daddr, " << name << "_, SHAPE(" << name << "_))" << iendl; } \
+    oss << "ENDIF"; \
+  }
+
+  macro(bool)
+  macro(double)
+  macro(int)
+
+#undef macro
+
+#define macro(T)\
+  template <>\
+  void CInterface::AttributeFortranInterfaceBody< CArray<StdString,T> >(ostream& oss, const string& className, const string& name)\
+  {\
+     oss << "IF (PRESENT(" << name << "_)) THEN" << iendl; \
+     oss << "  CALL cxios_set_" << className << "_" << name << " &" << iendl; \
+     oss << "(" << className << "_hdl%daddr, " << name <<"_, LEN("<<name<<"_), LEN_TRIM("<<name<< "_), SHAPE(" << name << "_))" << iendl; \
+     oss << "ENDIF"; \
+  }
+
+  macro(1)
+  macro(2)
+#undef macro
+
+#define macro(T) \
+  template <>  \
+  void CInterface::AttributeFortranInterfaceGetBody< CArray<T,1> >(ostream& oss, const string& className, const string& name) \
+  {  \
+    string name_tmp=name+"__tmp"; \
+      \
+    oss << "IF (PRESENT(" << name << "_)) THEN" << iendl; \
+    if (!matchingTypeCFortran<T>())  \
+    { \
+      oss << "  ALLOCATE(" << name_tmp << "(SIZE(" << name << "_,1)))" << iendl; \
+      oss << "  CALL cxios_get_" << className << "_" << name << " &" << iendl; \
+      oss << "(" << className << "_hdl%daddr, " << name_tmp << ", SHAPE(" << name << "_))" << iendl; \
+      oss << "  " << name << "_ = " << name_tmp << iendl; \
+    } \
+    else { oss << "  CALL cxios_get_" << className << "_" << name << " &" << iendl; \
+           oss << "(" << className << "_hdl%daddr, " << name << "_, SHAPE(" << name << "_))" << iendl; } \
+    oss << "ENDIF"; \
+  } \
+ \
+  template <>  \
+  void CInterface::AttributeFortranInterfaceGetBody< CArray<T,2> >(ostream& oss, const string& className, const string& name) \
+  {  \
+    string name_tmp=name+"__tmp"; \
+      \
+    oss << "IF (PRESENT(" << name << "_)) THEN" << iendl; \
+    if (!matchingTypeCFortran<T>())  \
+    { \
+      oss << "  ALLOCATE(" << name_tmp << "(SIZE(" << name << "_,1), SIZE(" << name << "_,2)))" << iendl; \
+      oss << "  CALL cxios_get_" << className << "_" << name << " &" << iendl; \
+      oss << "(" << className << "_hdl%daddr, " << name_tmp << ", SHAPE(" << name << "_))" << iendl; \
+      oss << "  " << name << "_ = " << name_tmp << iendl; \
+    } \
+    else { oss << "  CALL cxios_get_" << className << "_" << name << " &" << iendl; \
+           oss << "(" << className << "_hdl%daddr, " << name << "_, SHAPE(" << name << "_))" << iendl; } \
+    oss << "ENDIF"; \
+  } \
+ \
+  template <>  \
+  void CInterface::AttributeFortranInterfaceGetBody< CArray<T,3> >(ostream& oss, const string& className, const string& name) \
+  {  \
+    string name_tmp=name+"__tmp"; \
+      \
+    oss << "IF (PRESENT(" << name << "_)) THEN" << iendl; \
+    if (!matchingTypeCFortran<T>())  \
+    { \
+      oss << "  ALLOCATE(" << name_tmp << "(SIZE(" << name << "_,1), SIZE(" << name << "_,2), SIZE(" << name << "_,3)))" << iendl; \
+      oss << "  CALL cxios_get_" << className << "_" << name << " &" << iendl; \
+      oss << "(" << className << "_hdl%daddr, " << name_tmp << ", SHAPE(" << name << "_))" << iendl; \
+      oss << "  " << name << "_ = " << name_tmp << iendl; \
+      } \
+    else { oss << "  CALL cxios_get_" << className << "_" << name << " &" << iendl; \
+           oss << "(" << className << "_hdl%daddr, " << name << "_, SHAPE(" << name << "_))" << iendl; } \
+    oss << "ENDIF"; \
+  } \
+ \
+  template <>  \
+  void CInterface::AttributeFortranInterfaceGetBody< CArray<T,4> >(ostream& oss, const string& className, const string& name) \
+  {  \
+    string name_tmp=name+"__tmp"; \
+      \
+    oss << "IF (PRESENT(" << name << "_)) THEN" << iendl; \
+    if (!matchingTypeCFortran<T>())  \
+    { \
+      oss << "  ALLOCATE(" << name_tmp << "(SIZE(" << name << "_,1), SIZE(" << name << "_,2), SIZE(" << name << "_,3), &" << iendl; \
+      oss << " SIZE(" << name << "_,4)))" << iendl; \
+      oss << "  CALL cxios_get_" << className << "_" << name << " &" << iendl; \
+      oss << "(" << className << "_hdl%daddr, " << name_tmp << ", SHAPE(" << name << "_))" << iendl; \
+      oss << "  " << name << "_ = " << name_tmp << iendl; \
+      } \
+    else { oss << "  CALL cxios_get_" << className << "_" << name << " &" << iendl; \
+           oss << "(" << className << "_hdl%daddr, " << name << "_, SHAPE(" << name << "_))" << iendl; }\
+    oss << "ENDIF"; \
+  } \
+ \
+  template <>  \
+  void CInterface::AttributeFortranInterfaceGetBody< CArray<T,5> >(ostream& oss, const string& className, const string& name) \
+  {  \
+    string name_tmp=name+"__tmp"; \
+      \
+    oss << "IF (PRESENT(" << name << "_)) THEN" << iendl; \
+    if (!matchingTypeCFortran<T>())  \
+    { \
+      oss << "  ALLOCATE(" << name_tmp << "(SIZE(" << name << "_,1), SIZE(" << name << "_,2), SIZE(" << name << "_,3), &" << iendl; \
+      oss << " SIZE(" << name << "_,4), SIZE(" << name << "_,5)))" << iendl; \
+      oss << "  CALL cxios_get_" << className << "_" << name << " &" << iendl; \
+      oss << "(" << className << "_hdl%daddr, " << name_tmp << ", SHAPE(" << name << "_))" << iendl; \
+      oss << "  " << name << "_ = " << name_tmp << iendl; \
+      } \
+    else { oss << "  CALL cxios_get_" << className << "_" << name << " &" << iendl; \
+           oss << "(" << className << "_hdl%daddr, " << name << "_, SHAPE(" << name << "_))" << iendl; } \
+    oss << "ENDIF"; \
+  }\
+ \
+  template <>  \
+  void CInterface::AttributeFortranInterfaceGetBody< CArray<T,6> >(ostream& oss, const string& className, const string& name) \
+  {  \
+    string name_tmp=name+"__tmp"; \
+      \
+    oss << "IF (PRESENT(" << name << "_)) THEN" << iendl; \
+    if (!matchingTypeCFortran<T>())  \
+    { \
+      oss << "  ALLOCATE(" << name_tmp << "(SIZE(" << name << "_,1), SIZE(" << name << "_,2), SIZE(" << name << "_,3), &" << iendl; \
+      oss << " SIZE(" << name << "_,4), SIZE(" << name << "_,5), SIZE(" << name << "_,6)))" << iendl; \
+      oss << "  CALL cxios_get_" << className << "_" << name << " &" << iendl; \
+      oss << "(" << className << "_hdl%daddr, " << name_tmp << ", SHAPE(" << name << "_))" << iendl; \
+      oss << "  " << name << "_ = " << name_tmp << iendl; \
+      } \
+    else { oss << "  CALL cxios_get_" << className << "_" << name << " &" << iendl; \
+           oss << "(" << className << "_hdl%daddr, " << name << "_, SHAPE(" << name << "_))" << iendl; } \
+    oss << "ENDIF"; \
+  } \
+ \
+  template <>  \
+  void CInterface::AttributeFortranInterfaceGetBody< CArray<T,7> >(ostream& oss, const string& className, const string& name) \
+  {  \
+    string name_tmp=name+"__tmp"; \
+      \
+    oss << "IF (PRESENT(" << name << "_)) THEN" << iendl; \
+    if (!matchingTypeCFortran<T>())  \
+    { \
+      oss << "  ALLOCATE(" << name_tmp << "(SIZE(" << name << "_,1), SIZE(" << name << "_,2), SIZE(" << name << "_,3), &" << iendl; \
+      oss << " SIZE(" << name << "_,4), SIZE(" << name << "_,5), SIZE(" << name << "_,6), &" << iendl; \
+      oss << " SIZE(" << name << "_,7)))" << iendl; \
+      oss << "  CALL cxios_get_" << className << "_" << name << " &" << iendl; \
+      oss << "(" << className << "_hdl%daddr, " << name_tmp << ", SHAPE(" << name << "_))" << iendl; \
+      oss << "  " << name << "_ = " << name_tmp << iendl; \
+      } \
+    else { oss << "  CALL cxios_get_" << className << "_" << name << " &" << iendl; \
+           oss << "(" << className << "_hdl%daddr, " << name << "_, SHAPE(" << name << "_))" << iendl; } \
+    oss << "ENDIF"; \
+  }
+
+  macro(bool)
+  macro(double)
+  macro(int)
+
+#undef macro
+
+#define macro(T)\
+  template <> \
+  void CInterface::AttributeFortranInterfaceGetBody< CArray<StdString,T> >(ostream& oss, const string& className, const string& name)\
+  {\
+    oss << "IF (PRESENT(" << name << "_)) THEN" << iendl; \
+    oss << "  CALL cxios_get_" << className << "_" << name << " &" << iendl; \
+    oss << "(" << className << "_hdl%daddr, " << name << "_, LEN("<<name<<"_), SHAPE(" << name << "_))" << iendl; \
+    oss << "ENDIF"; \
+  }
+  macro(1)
+  macro(2)
+  macro(3)
+  macro(4)
+  macro(5)
+  macro(6)
+  macro(7)
+
+#undef macro
+  
+}
+#endif
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/globalScopeData.hpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/globalScopeData.hpp	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/globalScopeData.hpp	(revision 1749)
@@ -0,0 +1,14 @@
+/*!
+   \file globalScopeData.hpp
+   \author Ha NGUYEN
+   \since  24 Sep 2014
+   \date 24 Sep 2014
+
+   Global scope variable and object definitions
+ */
+#ifndef __GLOBAL_SCOPE_DATA_HPP__
+#define __GLOBAL_SCOPE_DATA_HPP__
+
+const int INVALID_RANK = -1;
+
+#endif // __GLOBAL_SCOPE_DATA__
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/group_factory.cpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/group_factory.cpp	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/group_factory.cpp	(revision 1749)
@@ -0,0 +1,18 @@
+#include "group_factory.hpp"
+
+namespace xios
+{
+   /// ////////////////////// DÃ©finitions ////////////////////// ///
+   StdString CGroupFactory::CurrContext("");
+
+   void CGroupFactory::SetCurrentContextId(const StdString & context)
+   { 
+      CGroupFactory::CurrContext = context;
+   }
+
+   StdString & CGroupFactory::GetCurrentContextId(void)
+   { 
+      return (CGroupFactory::CurrContext);
+   }
+
+} // namespace xios
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/group_factory.hpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/group_factory.hpp	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/group_factory.hpp	(revision 1749)
@@ -0,0 +1,76 @@
+#ifndef __XIOS_CGroupFactory__
+#define __XIOS_CGroupFactory__
+
+/// XIOS headers ///
+#include "xios_spl.hpp"
+#include "exception.hpp"
+#include "object_factory.hpp"
+#include "group_template.hpp"
+#include "xml_parser.hpp"
+
+namespace xios
+{
+   /// ////////////////////// DÃ©clarations ////////////////////// ///
+   class CGroupFactory
+   {
+      public :
+
+         /// Mutateurs ///
+         static void SetCurrentContextId(const StdString & context);
+
+         template <typename U>
+            static void AddGroup(std::shared_ptr<U> pgroup,
+                                        std::shared_ptr<U> cgroup);
+
+         template <typename U>
+            static void AddChild(std::shared_ptr<U> group,
+                                        std::shared_ptr<typename U::RelChild> child);
+
+         /// Accesseurs ///
+         static StdString & GetCurrentContextId(void);
+
+         template <typename U>
+            static std::shared_ptr<U>
+               GetGroup(std::shared_ptr<U> group, const StdString & id);
+
+         template <typename U>
+            static std::shared_ptr<typename U::RelChild>
+               GetChild(std::shared_ptr<U> group, const StdString & id);
+
+         template <typename U>
+            static int GetGroupNum(std::shared_ptr<U> group);
+         template <typename U>
+            static int GetGroupIdNum(std::shared_ptr<U> group);
+         template <typename U>
+            static int GetChildNum(std::shared_ptr<U> group);
+         template <typename U>
+            static int GetChildIdNum(std::shared_ptr<U> group);
+
+         /// Tests ///
+         template <typename U>
+            static bool HasGroup(std::shared_ptr<U> group, const StdString & id);
+
+         template <typename U>
+            static bool HasChild(std::shared_ptr<U> group, const StdString & id);
+
+         /// Instanciateur ///
+         template <typename U>
+            static std::shared_ptr<U>
+               CreateGroup(std::shared_ptr<U> group, const StdString & id = StdString(""));
+
+         template <typename U>
+            static std::shared_ptr<typename U::RelChild>
+               CreateChild(std::shared_ptr<U> group, const StdString & id = StdString(""));
+
+      private :
+
+         /// PropriÃ©tÃ©s statiques ///
+         static StdString CurrContext;
+
+   }; // class CGroupFactory
+} // namespace xios
+
+//#include "group_factory_impl.hpp"
+//#include "group_parser.hpp"
+
+#endif // __XIOS_CGroupFactory__
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/group_factory_decl.cpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/group_factory_decl.cpp	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/group_factory_decl.cpp	(revision 1749)
@@ -0,0 +1,48 @@
+#include "group_factory_impl.hpp"
+#include "node_type.hpp"
+
+namespace xios
+{
+# define  macro(U) \
+  template void CGroupFactory::AddGroup<U>(std::shared_ptr<U> pgroup, std::shared_ptr<U> cgroup); \
+  template void CGroupFactory::AddChild<U>(std::shared_ptr<U> group, std::shared_ptr<U::RelChild> child); \
+  template std::shared_ptr<U>  CGroupFactory::GetGroup<U>(std::shared_ptr<U> group, const StdString & id); \
+  template std::shared_ptr<U::RelChild> CGroupFactory::GetChild<U>( std::shared_ptr<U> group, const StdString & id); \
+  template int CGroupFactory::GetGroupNum<U>(std::shared_ptr<U> group); \
+  template int CGroupFactory::GetGroupIdNum<U>(std::shared_ptr<U> group); \
+  template int CGroupFactory::GetChildNum<U>(std::shared_ptr<U> group); \
+  template int CGroupFactory::GetChildIdNum<U>(std::shared_ptr<U> group); \
+  template bool CGroupFactory::HasGroup<U>(std::shared_ptr<U> group, const StdString & id); \
+  template bool CGroupFactory::HasChild<U>(std::shared_ptr<U> group, const StdString & id); \
+  template std::shared_ptr<U> CGroupFactory::CreateGroup<U>(std::shared_ptr<U> group, const StdString & id ); \
+  template std::shared_ptr<U::RelChild>  CGroupFactory::CreateChild<U>(std::shared_ptr<U> group, const StdString & id);
+
+  macro(CFieldGroup)
+  macro(CFileGroup)
+  macro(CGridGroup)
+  macro(CAxisGroup)
+  macro(CDomainGroup)
+  macro(CContextGroup)
+  macro(CVariableGroup)
+  macro(CInverseAxisGroup)
+  macro(CZoomAxisGroup)
+  macro(CInterpolateAxisGroup)
+  macro(CExtractAxisGroup)
+  macro(CZoomDomainGroup)
+  macro(CInterpolateDomainGroup)
+  macro(CGenerateRectilinearDomainGroup)
+  macro(CScalarGroup)
+  macro(CReduceAxisToScalarGroup)
+  macro(CReduceDomainToAxisGroup)
+  macro(CReduceAxisToAxisGroup)
+  macro(CExtractDomainToAxisGroup)
+  macro(CComputeConnectivityDomainGroup)
+  macro(CExpandDomainGroup)
+  macro(CExtractAxisToScalarGroup)
+  macro(CReduceDomainToScalarGroup)
+  macro(CTemporalSplittingGroup)
+  macro(CDuplicateScalarToAxisGroup)
+  macro(CReduceScalarToScalarGroup)
+  macro(CReorderDomainGroup)
+  macro(CExtractDomainGroup)
+}
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/group_factory_impl.hpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/group_factory_impl.hpp	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/group_factory_impl.hpp	(revision 1749)
@@ -0,0 +1,140 @@
+#ifndef __XIOS_CGroupFactory_impl__
+#define __XIOS_CGroupFactory_impl__
+
+#include "group_factory.hpp"
+
+namespace xios
+{
+   /// ////////////////////// DÃ©finitions ////////////////////// ///
+
+   template <typename U>
+      void CGroupFactory::AddGroup(std::shared_ptr<U> pgroup,
+                                   std::shared_ptr<U> cgroup)
+   {
+      if (cgroup.get() == NULL || pgroup.get() == NULL )
+         ERROR("CGroupFactory::AddGroup(std::shared_ptr<U> pgroup, std::shared_ptr<U> cgroup)",
+               << " pgroup or cgroup NULL !");
+      if (!cgroup->hasId())
+         pgroup->groupList.insert(pgroup->groupList.end(), cgroup.get());
+      else
+      {
+         pgroup->groupList.insert(pgroup->groupList.end(), cgroup.get());
+         pgroup->groupMap.insert(std::make_pair(cgroup->getId(), cgroup.get()));
+      }
+   }
+
+   template <typename U>
+      void CGroupFactory::AddChild(std::shared_ptr<U> group,
+                                   std::shared_ptr<typename U::RelChild> child)
+   {
+      if (group.get() == NULL || child.get() == NULL )
+         ERROR("CGroupFactory::AddGroup(std::shared_ptr<U> pgroup, std::shared_ptr<U> cgroup)",
+               << " pgroup or cgroup NULL !");
+      if (!child->hasId())
+         group->childList.insert(group->childList.end(), child.get());
+      else
+      {
+         group->childList.insert(group->childList.end(), child.get());
+         group->childMap.insert(std::make_pair(child->getId(), child.get()));
+      }
+   }
+
+   template <typename U>
+      std::shared_ptr<U>
+         CGroupFactory::CreateGroup(std::shared_ptr<U> group, const StdString & id)
+   {
+      CObjectFactory::SetCurrentContextId
+      (CGroupFactory::GetCurrentContextId());
+      if (id.size() == 0)
+      {
+         std::shared_ptr<U> value = CObjectFactory::CreateObject<U>(CObjectFactory::GenUId<U>());
+         group->groupList.insert(group->groupList.end(), value.get());
+         group->groupMap.insert(std::make_pair(value->getId(), value.get()));
+         return (value);
+      }
+      else if (CGroupFactory::HasGroup(group, id))
+         return (CGroupFactory::GetGroup(group, id));
+      else
+      {
+         std::shared_ptr<U> value = CObjectFactory::CreateObject<U>(id);
+         group->groupList.insert(group->groupList.end(), value.get());
+         group->groupMap.insert(std::make_pair(id, value.get()));
+         return (value);
+      }
+   }
+
+   template <typename U>
+      std::shared_ptr<typename U::RelChild>
+         CGroupFactory::CreateChild(std::shared_ptr<U> group, const StdString & id)
+   {
+      CObjectFactory::SetCurrentContextId
+      (CGroupFactory::GetCurrentContextId());
+      if (id.size() == 0)
+      {
+         std::shared_ptr<typename U::RelChild> value =
+               CObjectFactory::CreateObject<typename U::RelChild>();
+         group->childList.insert(group->childList.end(), value.get());
+         group->childMap.insert(std::make_pair(value->getId(), value.get()));
+         return (value);
+      }
+      else if (CGroupFactory::HasChild(group, id))
+         return (CGroupFactory::GetChild(group, id));
+      else
+      {
+         std::shared_ptr<typename U::RelChild> value =
+               CObjectFactory::CreateObject<typename U::RelChild>(id);
+         group->childList.insert(group->childList.end(), value.get());
+         group->childMap.insert(std::make_pair(id, value.get()));
+         return (value);
+      }
+   }
+
+   template <typename U>
+      bool CGroupFactory::HasGroup(std::shared_ptr<U> group, const StdString & id)
+   {  return (group->groupMap.find(id) != group->groupMap.end()); }
+
+   template <typename U>
+      bool CGroupFactory::HasChild(std::shared_ptr<U> group, const StdString & id)
+   {  return (group->childMap.find(id) != group->childMap.end()); }
+
+   template <typename U>
+      int CGroupFactory::GetGroupNum(std::shared_ptr<U> group)
+   { return (group->groupList.size()); }
+
+   template <typename U>
+      int CGroupFactory::GetGroupIdNum(std::shared_ptr<U> group)
+   { return (group->groupMap.size()); }
+
+   template <typename U>
+      int CGroupFactory::GetChildNum(std::shared_ptr<U> group)
+   { return (group->childList.size()); }
+
+   template <typename U>
+      int CGroupFactory::GetChildIdNum(std::shared_ptr<U> group)
+   { return (group->childMap.size()); }
+
+   template <typename U>
+      std::shared_ptr<U>
+         CGroupFactory::GetGroup(std::shared_ptr<U> group, const StdString & id)
+   {
+      if (!CGroupFactory::HasGroup<U>(group, id))
+         ERROR("CGroupFactory::GetGroup(std::shared_ptr<U> group, const StdString & id)",
+               << "[ id = " << id << ", U = " << U::GetName() << " ] "
+               << " group is not referenced !");
+      return (group->groupMap[id]->getShared());
+   }
+
+   template <typename U>
+      std::shared_ptr<typename U::RelChild>
+         CGroupFactory::GetChild(std::shared_ptr<U> group, const StdString & id)
+   {
+      if (!CGroupFactory::HasChild<U>(group, id))
+         ERROR("CGroupFactory::GetChild(std::shared_ptr<U> group, const StdString & id)",
+               << "[ id = " << id << ", U = " << U::GetName() << " ] "
+               << " child is not referenced !");
+      return (group->childMap[id]->getShared());
+   }
+
+} // namespace xios
+
+#endif // __XIOS_CGroupFactory_impl__
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/group_parser.hpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/group_parser.hpp	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/group_parser.hpp	(revision 1749)
@@ -0,0 +1,127 @@
+#ifndef __XIOS_GroupParser__
+#define __XIOS_GroupParser__
+
+/// boost headers ///
+#include <boost/cast.hpp>
+
+namespace xios
+{
+   /// ////////////////////// DÃ©finitions ////////////////////// ///
+   template <class U, class V, class W>
+      void CGroupTemplate<U, V, W>::parse(xml::CXMLNode & node, bool withAttr)
+   {
+
+      StdString name = node.getElementName();
+      xml::THashAttributes attributes = node.getAttributes();
+      if (withAttr)
+      {
+         CGroupTemplate<U, V, W>::SuperClass::parse(node);
+         if (attributes.end() != attributes.find("src"))
+         {
+            StdIFStream ifs ( attributes["src"].c_str() , StdIFStream::in );
+            if ( (ifs.rdstate() & std::ifstream::failbit ) != 0 )
+               ERROR(" void CGroupTemplate<U, V, W>::parse(xml::CXMLNode & node, bool withAttr)",
+                     <<endl<< "Can not open <"<<attributes["src"].c_str()<<"> file" );
+            if (!ifs.good())
+               ERROR("CGroupTemplate<U, V, W>::parse(xml::CXMLNode & node, bool withAttr)",
+                     << "[ filename = " << attributes["src"] << " ] Bad xml stream !");
+            xml::CXMLParser::ParseInclude(ifs, attributes["src"].c_str(), *this);
+         }
+      }
+
+      // PARSING POUR GESTION DES ENFANTS
+           V* group_ptr = (this->hasId()) 
+         ? V::get(this->getId())
+         : boost::polymorphic_downcast<V*>(this);
+
+      if (!(node.goToChildElement()))
+      {
+         if (this->hasId())
+         {
+            DEBUG(<< "L'objet de type \'" << V::GetName()
+                  << "\' nommÃ© \'" << this->getId()
+                  << "\' ne contient pas d\'enfant !");
+         }
+      }
+      else
+      {
+         do { // Parcours pour traitement.
+
+            StdString name = node.getElementName();
+            attributes.clear();
+            attributes = node.getAttributes();
+
+            if (name.compare(V::GetName()) == 0)
+            {
+               if (attributes.end() == attributes.find("id"))
+                  CGroupFactory::CreateGroup(group_ptr->getShared())->parse(node);
+               else
+                  CGroupFactory::CreateGroup(group_ptr->getShared(), attributes["id"])->parse(node);
+               continue;
+            }
+
+            if (name.compare(U::GetName()) == 0)
+            {
+               if (attributes.end() == attributes.find("id"))
+                  CGroupFactory::CreateChild(group_ptr->getShared())->parse(node);
+               else
+                  CGroupFactory::CreateChild(group_ptr->getShared(), attributes["id"])->parse(node);
+               continue;
+            }
+
+            DEBUG(<< "Dans le contexte \'" << CContext::getCurrent()->getId()
+                  << "\', un objet de type \'" << V::GetName()
+                  << "\' ne peut contenir qu'un objet de type \'" << V::GetName()
+                  << "\' ou de type \'" << U::GetName()
+                  << "\' (reÃ§u : " << name << ") !");
+
+         } while (node.goToNextElement());
+         node.goToParentElement(); // Retour au parent
+      }
+   }
+ 
+  /// ////////////////////// DÃ©finitions ////////////////////// ///
+   template <class U, class V, class W>
+      void CGroupTemplate<U, V, W>::parseChild(xml::CXMLNode & node)
+   {
+
+
+      // PARSING POUR GESTION DES ENFANTS
+           V* group_ptr = (this->hasId()) 
+         ? V::get(this->getId())
+         : boost::polymorphic_downcast<V*>(this);
+
+          StdString name = node.getElementName();
+          attributes.clear();
+          attributes = node.getAttributes();
+
+          if (name.compare(V::GetName()) == 0)
+          {
+             if (attributes.end() == attributes.find("id"))
+                CGroupFactory::CreateGroup(group_ptr->getShared())->parse(node);
+                return ;
+             else
+                CGroupFactory::CreateGroup(group_ptr->getShared(), attributes["id"])->parse(node);
+             continue;
+          }
+
+          if (name.compare(U::GetName()) == 0)
+          {
+             if (attributes.end() == attributes.find("id"))
+                CGroupFactory::CreateChild(group_ptr->getShared())->parse(node);
+                return ;
+             else
+                CGroupFactory::CreateChild(group_ptr->getShared(), attributes["id"])->parse(node);
+             continue;
+          }
+
+          DEBUG(<< "Dans le contexte \'" << CContext::getCurrent()->getId()
+                << "\', un objet de type \'" << V::GetName()
+                << "\' ne peut contenir qu'un objet de type \'" << V::GetName()
+                << "\' ou de type \'" << U::GetName()
+                << "\' (reÃ§u : " << name << ") !");
+
+   }
+} // namespace xios
+
+#endif // __XIOS_GroupParser__
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/group_template.hpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/group_template.hpp	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/group_template.hpp	(revision 1749)
@@ -0,0 +1,108 @@
+#ifndef __XIOS_CGroupTemplate__
+#define __XIOS_CGroupTemplate__
+
+#include "xios_spl.hpp"
+#include "declare_attribute.hpp"
+#include "event_server.hpp"
+#include "object_template.hpp"
+#include "context_client.hpp"
+
+namespace xios
+{
+
+   /// ////////////////////// DÃ©clarations ////////////////////// ///
+   template <class U, class V, class W>
+      class CGroupTemplate
+         : public CObjectTemplate<V>, public virtual W
+   {
+         /// Friend ///
+         friend class CGroupFactory;
+
+         /// Typedef ///
+         typedef U Child;
+         typedef V Derived, Group;
+         typedef W SuperClassAttribute;
+         typedef CObjectTemplate<V> SuperClass;
+
+      public :
+      
+         enum EEventId
+         {
+           EVENT_ID_CREATE_CHILD=200, EVENT_ID_CREATE_CHILD_GROUP
+         } ;
+
+         /// SpÃ©cifique ///
+         DECLARE_ATTRIBUTE(StdString, group_ref)
+
+         /// Accesseurs ///
+         const xios_map<StdString,Group*>& getGroupMap(void) const;
+         const vector<Child*>& getChildList(void) const;
+
+         void getAllChildren(vector<Child*> & allc) const;
+         vector<Child*> getAllChildren(void) const;
+
+         /// Autres ///
+         virtual StdString toString(void) const;
+         virtual void fromString(const StdString & str);
+         
+//         virtual void toBinary  (StdOStream & os) const;
+//         virtual void fromBinary(StdIStream & is);
+
+         virtual void parse(xml::CXMLNode & node);
+         virtual void parse(xml::CXMLNode & node, bool withAttr);
+         virtual void parseChild(xml::CXMLNode & node);
+        
+         /// Test ///
+         virtual bool hasChild(void) const;
+
+         /// Accesseurs statiques ///
+         static StdString GetName(void);
+         static StdString GetDefName(void);
+
+         /// Traitements ///
+         virtual void solveDescInheritance(bool apply, const CAttributeMap * const parent = 0);
+         void solveRefInheritance(void);
+//         static bool has(const string & id); 
+//         static std::shared_ptr<V> get(const string& id) ;
+//         static std::shared_ptr<V> create(const string& id=string("")) ;
+         U* createChild(const string& id="") ;
+          
+         void addChild(U* child) ; 
+         V* createChildGroup(const string& id="") ; 
+         void addChildGroup(V* childGroup) ; 
+         static bool dispatchEvent(CEventServer& event) ;
+         void sendCreateChild(const string& id="") ;
+         void sendCreateChild(const string& id, CContextClient* client) ;
+         void sendCreateChildGroup(const string& id="") ;
+         static void recvCreateChild(CEventServer& event) ;
+         void recvCreateChild(CBufferIn& buffer) ;
+         static void recvCreateChildGroup(CEventServer& event) ;
+         void recvCreateChildGroup(CBufferIn& buffer) ;
+         
+         /// Destructeur ///
+         virtual ~CGroupTemplate(void);
+
+      protected :
+
+         /// Constructeurs ///
+         CGroupTemplate(void);
+         CGroupTemplate(const StdString & id);
+         CGroupTemplate(const CGroupTemplate<U, V, W> & group,
+                        bool withAttrList = true, bool withId = true); // Not implemented yet.
+         CGroupTemplate(const CGroupTemplate<U, V, W> * const group);  // Not implemented yet.
+
+      private :
+
+         /// PropriÃ©tÃ©s ///
+         xios_map<StdString, Child* > childMap;
+         vector<Child*> childList;
+
+         xios_map<StdString,Group* > groupMap;
+         vector<Group* > groupList;
+
+   }; // class CGroupTemplate
+} // namespace xios
+
+//#include "group_template_impl.hpp"
+
+#endif // __XIOS_CGroupTemplate__
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/group_template_decl.cpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/group_template_decl.cpp	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/group_template_decl.cpp	(revision 1749)
@@ -0,0 +1,38 @@
+#include "group_template_impl.hpp"
+#include "node_type.hpp"
+
+namespace xios
+{
+#  define macro(T) \
+  template class CGroupTemplate<C##T, C##T##Group, C##T##Attributes> ;
+
+  macro(Context)
+  macro(Field)
+  macro(File)
+  macro(Domain)
+  macro(Grid)
+  macro(Axis)
+  macro(Variable)
+  macro(InverseAxis)
+  macro(ZoomAxis)
+  macro(InterpolateAxis)
+  macro(ExtractAxis)
+  macro(ZoomDomain)
+  macro(InterpolateDomain)
+  macro(GenerateRectilinearDomain)
+  macro(Scalar)
+  macro(ReduceAxisToScalar)
+  macro(ReduceDomainToAxis)
+  macro(ReduceAxisToAxis)
+  macro(ExtractDomainToAxis)
+  macro(ComputeConnectivityDomain)
+  macro(ExpandDomain)
+  macro(ExtractAxisToScalar)
+  macro(ReduceDomainToScalar)
+  macro(TemporalSplitting)
+  macro(DuplicateScalarToAxis)
+  macro(ReduceScalarToScalar)
+  macro(ReorderDomain)
+  macro(ExtractDomain)
+
+}
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/group_template_impl.hpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/group_template_impl.hpp	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/group_template_impl.hpp	(revision 1749)
@@ -0,0 +1,627 @@
+#ifndef __XIOS_CGroupTemplate_impl__
+#define __XIOS_CGroupTemplate_impl__
+
+#include "xios_spl.hpp"
+#include "event_server.hpp"
+#include "object_template.hpp"
+#include "group_template.hpp"
+#include "context.hpp"
+#include "event_client.hpp"
+#include "context_client.hpp"
+#include "message.hpp"
+#include "type.hpp"
+#include "type_util.hpp"
+
+
+namespace xios
+{
+
+   /// ////////////////////// DÃ©finitions ////////////////////// ///
+
+   template <class U, class V, class W>
+      CGroupTemplate<U, V, W>::CGroupTemplate(void)
+         : CObjectTemplate<V>() //, V()
+         , childMap(), childList()
+         , groupMap(), groupList()
+   { /* Ne rien faire de plus */ }
+
+   template <class U, class V, class W>
+      CGroupTemplate<U, V, W>::CGroupTemplate(const StdString & id)
+         : CObjectTemplate<V>(id) //, V()
+         , childMap(), childList()
+         , groupMap(), groupList()
+   { /* Ne rien faire de plus */ }
+
+   template <class U, class V, class W>
+      CGroupTemplate<U, V, W>::~CGroupTemplate(void)
+   { /* Ne rien faire de plus */ }
+   
+   ///--------------------------------------------------------------
+/*
+   template <class U, class V, class W>
+      void CGroupTemplate<U, V, W>::toBinary(StdOStream & os) const
+   {
+      SuperClass::toBinary(os);
+      
+      const StdSize grpnb = this->groupList.size();
+      const StdSize chdnb = this->childList.size();
+      ENodeType cenum = U::GetType();
+      ENodeType genum = V::GetType();
+      
+      os.write (reinterpret_cast<const char*>(&grpnb) , sizeof(StdSize));
+      os.write (reinterpret_cast<const char*>(&chdnb) , sizeof(StdSize));      
+      
+      typename std::vector<V*>::const_iterator  
+         itg = this->groupList.begin(), endg = this->groupList.end();
+      typename std::vector<U*>::const_iterator 
+         itc = this->childList.begin(), endc = this->childList.end();
+            
+      for (; itg != endg; itg++)
+      { 
+         V* group = *itg;
+         bool hid = group->hasId();
+         
+         os.write (reinterpret_cast<const char*>(&genum), sizeof(ENodeType));      
+         os.write (reinterpret_cast<const char*>(&hid), sizeof(bool));
+         
+         if (hid)
+         {
+            const StdString & id = group->getId();
+            const StdSize size   = id.size();
+               
+            os.write (reinterpret_cast<const char*>(&size), sizeof(StdSize));
+            os.write (id.data(), size * sizeof(char));         
+         }              
+         group->toBinary(os);
+      }
+            
+      for (; itc != endc; itc++)
+      { 
+         U* child = *itc;
+         bool hid = child->hasId();
+         
+         os.write (reinterpret_cast<const char*>(&cenum), sizeof(ENodeType));
+         os.write (reinterpret_cast<const char*>(&hid), sizeof(bool));
+         
+         if (hid)
+         {
+            const StdString & id = child->getId();
+            const StdSize size   = id.size();
+               
+            os.write (reinterpret_cast<const char*>(&size), sizeof(StdSize));
+            os.write (id.data(), size * sizeof(char));         
+         }         
+         child->toBinary(os);
+      }
+      
+   }
+   
+   template <class U, class V, class W>
+      void CGroupTemplate<U, V, W>::fromBinary(StdIStream & is)
+   {
+      SuperClass::fromBinary(is);
+      
+      V* group_ptr = (this->hasId())
+         ? V::get(this->getId())
+         : V::get((V*)this);
+      
+      StdSize grpnb = 0;
+      StdSize chdnb = 0;
+      ENodeType renum = Unknown;
+      
+      is.read (reinterpret_cast<char*>(&grpnb), sizeof(StdSize));
+      is.read (reinterpret_cast<char*>(&chdnb), sizeof(StdSize));
+      
+      for (StdSize i = 0; i < grpnb; i++)
+      {
+         bool hid = false;
+         is.read (reinterpret_cast<char*>(&renum), sizeof(ENodeType));
+         is.read (reinterpret_cast<char*>(&hid), sizeof(bool));
+         
+         if (renum != V::GetType())
+            ERROR("CGroupTemplate<U, V, W>::fromBinary(StdIStream & is)",
+                  << "[ renum = " << renum << "] Bad type !");
+                        
+         if (hid)
+         {
+            StdSize size  = 0;
+            is.read (reinterpret_cast<char*>(&size), sizeof(StdSize));
+            StdString id(size, ' ');
+            is.read (const_cast<char *>(id.data()), size * sizeof(char));
+            CGroupFactory::CreateGroup(group_ptr->getShared(), id)->fromBinary(is);
+         }
+         else
+         {
+            CGroupFactory::CreateGroup(group_ptr->getShared())->fromBinary(is);
+         }
+      }
+      
+      for (StdSize j = 0; j < chdnb; j++)
+      {
+         bool hid = false;
+         is.read (reinterpret_cast<char*>(&renum), sizeof(ENodeType));
+         is.read (reinterpret_cast<char*>(&hid), sizeof(bool));
+         
+         if (renum != U::GetType())
+            ERROR("CGroupTemplate<U, V, W>::fromBinary(StdIStream & is)",
+                  << "[ renum = " << renum << "] Bad type !");
+                  
+         if (hid)
+         {
+            StdSize size  = 0;
+            is.read (reinterpret_cast<char*>(&size), sizeof(StdSize));
+            StdString id(size, ' ');
+            is.read (const_cast<char *>(id.data()), size * sizeof(char));
+            CGroupFactory::CreateChild(group_ptr->getShared(), id)->fromBinary(is);            
+         }
+         else
+         {
+            CGroupFactory::CreateChild(group_ptr->getShared())->fromBinary(is);
+         }   
+      }
+   }
+*/
+   //--------------------------------------------------------------
+
+   template <class U, class V, class W>
+      StdString CGroupTemplate<U, V, W>::toString(void) const
+   {
+      StdOStringStream oss;
+      StdString name = (this->getId().compare(V::GetDefName()) != 0)
+                     ? V::GetName() : V::GetDefName();
+
+      oss << "<" << name << " ";
+      if (this->hasId() && (this->getId().compare(V::GetDefName()) != 0))
+         oss << " id=\"" << this->getId() << "\" ";
+         
+      if (this->hasChild())
+      {
+         oss << SuperClassAttribute::toString() << ">" << std::endl;
+         
+         typename std::vector<V*>::const_iterator 
+            itg = this->groupList.begin(), endg = this->groupList.end();
+         typename std::vector<U*>::const_iterator 
+            itc = this->childList.begin(), endc = this->childList.end();
+            
+         for (; itg != endg; itg++)
+         { 
+            V* group = *itg;
+            oss << *group << std::endl;
+         }
+            
+         for (; itc != endc; itc++)
+         { 
+            U* child = *itc;
+            oss << *child << std::endl;
+         }
+            
+         oss << "</" << name << " >";
+      }
+      else
+      {
+         oss << SuperClassAttribute::toString() << "/>";
+      }
+      return (oss.str());
+   }
+
+   template <class U, class V, class W>
+      void CGroupTemplate<U, V, W>::fromString(const StdString & str)
+   { 
+      ERROR("CGroupTemplate<U, V, W>::toString(void)",
+            << "[ str = " << str << "] Not implemented yet !");
+   }
+
+   //---------------------------------------------------------------
+
+   template <class U, class V, class W>
+      StdString CGroupTemplate<U, V, W>::GetName(void)
+   { 
+      return (U::GetName().append("_group")); 
+   }
+
+   template <class U, class V, class W>
+      StdString CGroupTemplate<U, V, W>::GetDefName(void)
+   { 
+      return (U::GetName().append("_definition")); 
+   }
+   
+   //---------------------------------------------------------------   
+
+   template <class U, class V, class W>
+      const std::vector<U*>&
+         CGroupTemplate<U, V, W>::getChildList(void) const
+   { 
+      return (this->childList); 
+   }
+
+   //---------------------------------------------------------------
+
+   template <class U, class V, class W>
+      const xios_map<StdString, V*>&
+         CGroupTemplate<U, V, W>::getGroupMap(void) const
+   { 
+      return (this->groupMap);
+   }
+
+   //---------------------------------------------------------------
+
+   template <class U, class V, class W>
+      bool CGroupTemplate<U, V, W>::hasChild(void) const
+   { 
+      return ((groupList.size() + childList.size()) > 0); 
+   }
+
+   //---------------------------------------------------------------
+
+   template <class U, class V, class W>
+      void CGroupTemplate<U, V, W>::parse(xml::CXMLNode & node)
+   { 
+      this->parse(node, true); 
+   }
+   
+   //---------------------------------------------------------------
+   
+   template <class U, class V, class W>
+      void CGroupTemplate<U, V, W>::solveDescInheritance(bool apply, const CAttributeMap * const parent)
+   {
+      if (parent != NULL)
+         SuperClassAttribute::setAttributes(parent, apply);
+         
+      typename std::vector<U*>::const_iterator 
+         itc = this->childList.begin(), endc = this->childList.end();
+      typename std::vector<V*>::const_iterator 
+         itg = this->groupList.begin(), endg = this->groupList.end();
+             
+      for (; itc != endc; itc++)
+      { 
+         U* child = *itc;
+         child->solveDescInheritance(apply,this);
+      }
+            
+      for (; itg != endg; itg++)
+      { 
+         V* group = *itg;
+         if (apply) group->solveRefInheritance();
+         group->solveDescInheritance(apply,this);
+      }
+   }
+
+   //---------------------------------------------------------------
+
+   template <class U, class V, class W>
+      void CGroupTemplate<U, V, W>::getAllChildren(std::vector<U*>& allc) const
+   {
+      allc.insert (allc.end(), childList.begin(), childList.end());
+      typename std::vector<V*>::const_iterator 
+         itg = this->groupList.begin(), endg = this->groupList.end();
+         
+      for (; itg != endg; itg++)
+      { 
+         V* group = *itg;
+         group->getAllChildren(allc);
+      }
+   }
+
+   //---------------------------------------------------------------
+
+   template <class U, class V, class W>
+      std::vector<U*> CGroupTemplate<U, V, W>::getAllChildren(void) const
+   { 
+      std::vector<U*> allc;
+      this->getAllChildren(allc);
+      return (allc);
+   }
+
+   //---------------------------------------------------------------
+
+   template <class U, class V, class W>
+      void CGroupTemplate<U, V, W>::solveRefInheritance(void)
+   { /* Ne rien faire de plus */ }
+   
+//   template <class U, class V, class W>
+//   bool CGroupTemplate<U, V, W>::has(const string& id) 
+//   {
+//       return CObjectFactory::HasObject<V>(id) ;
+//   }
+
+//   template <class U, class V, class W>
+//   std::shared_ptr<V> CGroupTemplate<U, V, W>::get(const string& id) 
+//   {
+//       return CObjectFactory::GetObject<V>(id) ;
+//   }
+
+//   template <class U, class V, class W>
+//   std::shared_ptr<V> CGroupTemplate<U, V, W>::get() 
+//   {
+//       return CObjectFactory::GetObject<V>(this) ;
+//   }
+   
+//   template <class U, class V, class W>
+//   std::shared_ptr<V> CGroupTemplate<U, V, W>::create(const string& id) 
+//   {
+//       return CObjectFactory::CreateObject<V>(id) ;
+//   }
+   ///--------------------------------------------------------------
+
+  
+   template <class U, class V, class W>
+   U* CGroupTemplate<U, V, W>::createChild(const string& id) 
+  {
+    return CGroupFactory::CreateChild<V>(this->getShared(), id).get() ;
+  }
+
+   template <class U, class V, class W>
+   void CGroupTemplate<U, V, W>::addChild(U* child) 
+  {
+    return CGroupFactory::AddChild<V>(this->getShared(),child->getShared()) ;
+  }
+  
+   template <class U, class V, class W>
+   V* CGroupTemplate<U, V, W>::createChildGroup(const string& id) 
+  {
+    return CGroupFactory::CreateGroup<V>(this->getShared(), id).get() ;
+  }
+
+   template <class U, class V, class W>
+   void CGroupTemplate<U, V, W>::addChildGroup(V* childGroup) 
+  {
+    return CGroupFactory::AddGroup<V>(this->getShared(), childGroup->getShared()) ;
+  }
+
+
+   template <class U, class V, class W>
+   void CGroupTemplate<U, V, W>::sendCreateChild(const string& id)
+   {
+    CContext* context=CContext::getCurrent() ;  
+
+    if (context->hasClient)
+    // if (!context->hasServer )
+    {
+      // Use correct context client to send message
+//      CContextClient* contextClientTmp = (0 != context->clientPrimServer) ? context->clientPrimServer : context->client;
+      int nbSrvPools = (context->hasServer) ? context->clientPrimServer.size() : 1;
+      for (int i = 0; i < nbSrvPools; ++i)
+      {
+         CContextClient* contextClientTmp = (context->hasServer) ? context->clientPrimServer[i] : context->client;
+
+         CEventClient event(this->getType(),EVENT_ID_CREATE_CHILD) ;
+         if (contextClientTmp->isServerLeader())
+         {
+           CMessage msg ;
+           msg<<this->getId() ;
+           msg<<id ;
+           const std::list<int>& ranks = contextClientTmp->getRanksServerLeader();
+           for (std::list<int>::const_iterator itRank = ranks.begin(), itRankEnd = ranks.end(); itRank != itRankEnd; ++itRank)
+             event.push(*itRank,1,msg) ;
+           contextClientTmp->sendEvent(event) ;
+         }
+         else contextClientTmp->sendEvent(event) ;
+      }
+    }
+      
+   }
+
+   template <class U, class V, class W>
+   void CGroupTemplate<U, V, W>::sendCreateChild(const string& id, CContextClient* client)
+   {
+
+    CEventClient event(this->getType(),EVENT_ID_CREATE_CHILD) ;
+    if (client->isServerLeader())
+    {
+      CMessage msg ;
+      msg<<this->getId() ;
+      msg<<id ;
+      const std::list<int>& ranks = client->getRanksServerLeader();
+      for (std::list<int>::const_iterator itRank = ranks.begin(), itRankEnd = ranks.end(); itRank != itRankEnd; ++itRank)
+       event.push(*itRank,1,msg) ;
+      client->sendEvent(event) ;
+    }
+    else client->sendEvent(event) ;
+   }
+
+
+   template <class U, class V, class W>
+   void CGroupTemplate<U, V, W>::sendCreateChildGroup(const string& id)
+   {
+    CContext* context=CContext::getCurrent() ;
+    if (context->hasClient)
+    {
+      // Use correct context client to send message
+      // int nbSrvPools = (context->hasServer) ? context->clientPrimServer.size() : 1;
+      int nbSrvPools = (context->hasServer) ? (context->hasClient ? context->clientPrimServer.size() : 1) : 1;
+      for (int i = 0; i < nbSrvPools; ++i)
+      {
+        CContextClient* contextClientTmp = (context->hasServer) ? context->clientPrimServer[i] : context->client;
+        CEventClient event(this->getType(),EVENT_ID_CREATE_CHILD_GROUP) ;
+        if (contextClientTmp->isServerLeader())
+        {
+          CMessage msg ;
+          msg<<this->getId() ;
+          msg<<id ;
+          const std::list<int>& ranks = contextClientTmp->getRanksServerLeader();
+          for (std::list<int>::const_iterator itRank = ranks.begin(), itRankEnd = ranks.end(); itRank != itRankEnd; ++itRank)
+            event.push(*itRank,1,msg) ;
+          contextClientTmp->sendEvent(event) ;
+        }
+        else contextClientTmp->sendEvent(event) ;
+      }
+    }
+   }
+   
+   template <class U, class V, class W>
+   void CGroupTemplate<U, V, W>::recvCreateChild(CEventServer& event)
+   {
+      CBufferIn* buffer=event.subEvents.begin()->buffer;
+      string id;
+      *buffer>>id ;
+      V::get(id)->recvCreateChild(*buffer) ;
+   }
+   
+   
+   template <class U, class V, class W>
+   void CGroupTemplate<U, V, W>::recvCreateChild(CBufferIn& buffer)
+   {
+      string id ;
+      buffer>>id ;
+      createChild(id) ;
+   }
+
+   template <class U, class V, class W>
+   void CGroupTemplate<U, V, W>::recvCreateChildGroup(CEventServer& event)
+   {
+      
+      CBufferIn* buffer=event.subEvents.begin()->buffer;
+      string id;
+      *buffer>>id ;
+      V::get(id)->recvCreateChildGroup(*buffer) ;
+   }
+   
+   
+   template <class U, class V, class W>
+   void CGroupTemplate<U, V, W>::recvCreateChildGroup(CBufferIn& buffer)
+   {
+      string id ;
+      buffer>>id ;
+      createChildGroup(id) ;
+   }
+   
+
+   template <class U, class V, class W>
+   bool CGroupTemplate<U, V, W>::dispatchEvent(CEventServer& event)
+   {
+      if (CObjectTemplate<V>::dispatchEvent(event)) return true ;
+      else
+      {
+        switch(event.type)
+        {
+           case EVENT_ID_CREATE_CHILD :
+             recvCreateChild(event) ;
+             return true ;
+             break ;
+         
+           case EVENT_ID_CREATE_CHILD_GROUP :
+             recvCreateChildGroup(event) ;
+             return true ;
+             break ;       
+         
+           default :
+           return false ;
+        }
+      }
+   }
+
+   template <class U, class V, class W>
+      void CGroupTemplate<U, V, W>::parse(xml::CXMLNode & node, bool withAttr)
+   {
+
+      StdString name = node.getElementName();
+      xml::THashAttributes attributes = node.getAttributes();
+      if (withAttr)
+      {
+         CGroupTemplate<U, V, W>::SuperClass::parse(node);
+         if (attributes.end() != attributes.find("src"))
+         {
+            StdIFStream ifs ( attributes["src"].c_str() , StdIFStream::in );
+            if ( (ifs.rdstate() & std::ifstream::failbit ) != 0 )
+               ERROR("void CGroupTemplate<U, V, W>::parse(xml::CXMLNode & node, bool withAttr)",
+                     <<endl<< "Can not open <"<<attributes["src"].c_str()<<"> file" );
+            
+            if (!ifs.good())
+               ERROR("CGroupTemplate<U, V, W>::parse(xml::CXMLNode & node, bool withAttr)",
+                     << "[ filename = " << attributes["src"] << " ] Bad xml stream !");
+            xml::CXMLParser::ParseInclude(ifs, attributes["src"].c_str(), *this);
+         }
+      }
+
+      // PARSING POUR GESTION DES ENFANTS
+           V* group_ptr = (this->hasId()) 
+         ? V::get(this->getId())
+         : boost::polymorphic_downcast<V*>(this);
+
+      if (!(node.goToChildElement()))
+      {
+         if (this->hasId())
+         {
+            DEBUG(<< "L'objet de type \'" << V::GetName()
+                  << "\' nommÃ© \'" << this->getId()
+                  << "\' ne contient pas d\'enfant !");
+         }
+      }
+      else
+      {
+         do { // Parcours pour traitement.
+
+            StdString name = node.getElementName();
+            attributes.clear();
+            attributes = node.getAttributes();
+
+            if (name.compare(V::GetName()) == 0)
+            {
+               if (attributes.end() == attributes.find("id"))
+                  CGroupFactory::CreateGroup(group_ptr->getShared())->parse(node);
+               else
+                  CGroupFactory::CreateGroup(group_ptr->getShared(), attributes["id"])->parse(node);
+               continue;
+            }
+
+            if (name.compare(U::GetName()) == 0)
+            {
+               if (attributes.end() == attributes.find("id"))
+                  CGroupFactory::CreateChild(group_ptr->getShared())->parse(node);
+               else
+                  CGroupFactory::CreateChild(group_ptr->getShared(), attributes["id"])->parse(node);
+               continue;
+            }
+
+            DEBUG(<< "Dans le contexte \'" << CContext::getCurrent()->getId()
+                  << "\', un objet de type \'" << V::GetName()
+                  << "\' ne peut contenir qu'un objet de type \'" << V::GetName()
+                  << "\' ou de type \'" << U::GetName()
+                  << "\' (reÃ§u : " << name << ") !");
+
+         } while (node.goToNextElement());
+         node.goToParentElement(); // Retour au parent
+      }
+   }
+   
+   template <class U, class V, class W>
+   void CGroupTemplate<U, V, W>::parseChild(xml::CXMLNode & node)
+   {
+
+
+      // PARSING POUR GESTION DES ENFANTS
+           V* group_ptr = (this->hasId()) 
+         ? V::get(this->getId())
+         : boost::polymorphic_downcast<V*>(this);
+
+          StdString name = node.getElementName();
+          xml::THashAttributes attributes = node.getAttributes();
+
+          if (name.compare(V::GetName()) == 0)
+          {
+             if (attributes.end() == attributes.find("id"))
+                CGroupFactory::CreateGroup(group_ptr->getShared())->parse(node);
+             else
+                CGroupFactory::CreateGroup(group_ptr->getShared(), attributes["id"])->parse(node);
+             return ;
+          }
+          else if (name.compare(U::GetName()) == 0)
+          {
+             if (attributes.end() == attributes.find("id"))
+                CGroupFactory::CreateChild(group_ptr->getShared())->parse(node);
+             else
+                CGroupFactory::CreateChild(group_ptr->getShared(), attributes["id"])->parse(node);
+             return ;
+          }
+
+          DEBUG(<< "Dans le contexte \'" << CContext::getCurrent()->getId()
+                << "\', un objet de type \'" << V::GetName()
+                << "\' ne peut contenir qu'un objet de type \'" << V::GetName()
+                << "\' ou de type \'" << U::GetName()
+                << "\' (reÃ§u : " << name << ") !");
+
+   }
+} // namespace xios
+
+
+#endif // __XIOS_CGroupTemplate_impl__
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/indent.cpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/indent.cpp	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/indent.cpp	(revision 1749)
@@ -0,0 +1,71 @@
+#include "indent.hpp"
+#include <ostream>
+#include <iostream>
+
+using namespace std ;
+
+namespace xios
+{
+  Cindent iendl ;
+  Cindent ireset(0,true) ;
+  int Cindent::defaultIncSize=2 ;
+  int Cindent::index=ios::xalloc() ;
+  
+  Cindent::Cindent(int i,bool r) : offset(i), reset(r), incSize(defaultIncSize) 
+  { }
+  
+  Cindent Cindent::operator++()
+  {
+    return Cindent(incSize) ;
+  }
+  
+  Cindent Cindent::operator--()
+  {
+    return Cindent(-incSize) ;
+  }
+
+  Cindent Cindent::operator++(int)
+  {
+    return Cindent(incSize) ;
+  }
+  
+  Cindent Cindent::operator--(int)
+  {
+    return Cindent(-incSize) ;
+  }
+
+  Cindent Cindent::operator+=(int i)
+  {
+    return Cindent(incSize*i) ;
+  }  
+
+  Cindent Cindent::operator-=(int i)
+  {
+    return Cindent(-incSize*i) ;
+  }  
+
+  ostream& Cindent::iendl(ostream& o) const
+  {
+    if (reset)
+    {
+      o.iword(index)=0 ;
+      return o ;
+    }
+    else
+    {
+      o.iword(index)+=offset ;
+      if (o.iword(index)<0) o.iword(index)=0 ;
+      o<<"\n" ;
+      int mem=o.width(o.iword(index)) ;
+      o<<"";
+      o.width(mem) ;
+      return o ;
+    }
+  }
+  
+  ostream& operator <<(ostream& o, const Cindent& indent) 
+  {
+    return indent.iendl(o) ; 
+  }
+  
+}
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/indent.hpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/indent.hpp	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/indent.hpp	(revision 1749)
@@ -0,0 +1,34 @@
+#ifndef __XIOS_INDENT_HPP__
+#define __XIOS_INDENT_HPP__
+
+#include <ostream>
+
+namespace xios
+{
+  class Cindent  
+  {
+    public:
+    static int defaultIncSize;
+    static int index ;
+    int incSize ;
+    int offset ;
+    bool reset ;
+    public :
+
+    Cindent(int i=0, bool r=false) ;
+    Cindent operator++(int) ;
+    Cindent operator--(int) ;
+    Cindent operator++() ;
+    Cindent operator--() ;
+    Cindent operator+=(int n) ;
+    Cindent operator-=(int n) ;
+    std::ostream& iendl(std::ostream& o) const ;
+  };
+  
+  std::ostream& operator <<(std::ostream& o, const Cindent& indent) ;
+
+  extern Cindent iendl;
+  extern Cindent ireset;
+
+}  
+#endif
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/indent_xml.cpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/indent_xml.cpp	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/indent_xml.cpp	(revision 1749)
@@ -0,0 +1,53 @@
+#include "indent_xml.hpp"
+
+/// boost headers ///
+#include <boost/algorithm/string.hpp>
+#include <boost/algorithm/string/split.hpp>
+
+namespace xios
+{
+   /// ////////////////////// DÃ©finitions ////////////////////// ///
+   unsigned int CIndent::Indent   = 0;
+   StdString    CIndent::Increm   = StdString("   ");
+   bool         CIndent::WithLine = false;
+
+   StdOStream & CIndent::NIndent(StdOStream& out)
+   {
+      static unsigned int LineNB = 1;
+      if (CIndent::WithLine) out << LineNB++ << ". ";
+      for(unsigned int i = 0; i < CIndent::Indent; out << CIndent::Increm , i++){}
+      return (out);
+   }
+
+   StdOStream & CIndent::IncIndent(StdOStream& out)
+   { CIndent::Indent++; return (CIndent::NIndent(out)); }
+
+   StdOStream & CIndent::DecEndl  (StdOStream& out)
+   { CIndent::Indent--; return (out); }
+
+   ///----------------------------------------
+
+   StdString CIndentedXml::Indented(const StdString & content)
+   {
+      StdOStringStream retvalue;
+      std::vector<StdString> str;
+      boost::split(str, content, boost::is_any_of("\n"));
+      
+      std::vector<StdString>::iterator it = str.begin(), end = str.end();
+      
+      for (; it != end; it++)
+      {
+         StdString & line = *it;
+         if (line.find("<? ") != StdString::npos ||
+             line.find(xml::CXMLNode::GetRootName()) != StdString::npos)
+            retvalue << CIndent::NIndent << line <<  std::endl;
+         else if (line.find("</") != StdString::npos)
+            retvalue << CIndent::NIndent   << line << CIndent::DecEndl << std::endl;
+         else if (line.find(" />") != StdString::npos)
+            retvalue << CIndent::IncIndent << line << CIndent::DecEndl << std::endl;
+         else
+            retvalue << CIndent::IncIndent << line <<  std::endl;
+      }
+      return (retvalue.str());
+   }
+} // namespace xios
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/indent_xml.hpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/indent_xml.hpp	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/indent_xml.hpp	(revision 1749)
@@ -0,0 +1,50 @@
+#ifndef __XIOS_CIndent_XML__
+#define __XIOS_CIndent_XML__
+
+/// XIOS headers ///
+#include "xios_spl.hpp"
+#include "xml_node.hpp"
+
+namespace xios
+{
+   /// ////////////////////// DÃ©clarations ////////////////////// ///
+   class CIndent
+   {
+      public :
+
+         /// MÃ©thodes statiques ///
+         static StdOStream & NIndent  (StdOStream & out);
+         static StdOStream & IncIndent(StdOStream & out);
+         static StdOStream & DecEndl  (StdOStream & out);
+
+      private :
+
+         /// PropriÃ©tÃ©s  statiques ///
+         static unsigned int Indent;
+         static StdString    Increm;
+         static bool         WithLine;
+
+   }; // class CIndent
+
+    ///--------------------------------------------------------------
+    
+   class CIndentedXml
+   {
+      public :
+
+         /// MÃ©thode statique ///
+         static StdString Indented(const StdString & content);
+
+   }; // class CIndentedXml
+
+    ///--------------------------------------------------------------
+
+} // namespace xios
+
+   /// ////////////////////// Macros ////////////////////// ///
+   
+#define NIndent   CIndent::NIndent
+#define IncIndent CIndent::IncIndent
+#define DecEndl   CIndent::DecEndl
+
+#endif // __XIOS_CIndent__
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/c/icaxis.cpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/c/icaxis.cpp	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/c/icaxis.cpp	(revision 1749)
@@ -0,0 +1,78 @@
+/* ************************************************************************** *
+ *      Copyright Â© IPSL/LSCE, xios, Avril 2010 - Octobre 2011         *
+ * ************************************************************************** */
+
+#include <boost/multi_array.hpp>
+#include <memory>
+
+#include "xios.hpp"
+
+#include "object_template.hpp"
+#include "group_template.hpp"
+#include "attribute_template.hpp"
+
+#include "icutil.hpp"
+#include "timer.hpp"
+#include "axis.hpp"
+
+extern "C"
+{
+// /////////////////////////////// DÃ©finitions ////////////////////////////// //
+
+   // ----------------------- RedÃ©finition de types ----------------------------
+   
+   typedef xios::CAxis      * XAxisPtr;
+   typedef xios::CAxisGroup * XAxisGroupPtr;
+
+   // ------------------------ CrÃ©ation des handle -----------------------------
+   
+   void cxios_axis_handle_create (XAxisPtr * _ret, const char * _id, int _id_len)
+   TRY
+   {
+      std::string id; 
+      if (!cstr2string(_id, _id_len, id)) return;
+      CTimer::get("XIOS").resume() ;
+      *_ret = xios::CAxis::get(id);
+      CTimer::get("XIOS").suspend() ;
+   }
+   CATCH_DUMP_STACK
+   
+   void cxios_axisgroup_handle_create (XAxisGroupPtr * _ret, const char * _id, int _id_len)
+   TRY
+   {
+      std::string id; 
+      if (!cstr2string(_id, _id_len, id)) return;
+      CTimer::get("XIOS").resume() ;
+      *_ret = xios::CAxisGroup::get(id);
+      CTimer::get("XIOS").suspend() ;
+    }
+   CATCH_DUMP_STACK
+
+   // -------------------- VÃ©rification des identifiants -----------------------
+
+   void cxios_axis_valid_id (bool * _ret, const char * _id, int _id_len)
+   TRY
+   {
+      std::string id;
+      if (!cstr2string(_id, _id_len, id)) return;
+
+      CTimer::get("XIOS").resume() ;
+      *_ret = xios::CAxis::has(id);
+      CTimer::get("XIOS").suspend() ;
+   }
+   CATCH_DUMP_STACK
+
+   void cxios_axisgroup_valid_id (bool * _ret, const char * _id, int _id_len)
+   TRY
+   {
+      std::string id;
+      if (!cstr2string(_id, _id_len, id)) return;
+
+      CTimer::get("XIOS").resume() ;
+      *_ret = xios::CAxisGroup::has(id);
+      CTimer::get("XIOS").suspend() ;
+
+   }
+   CATCH_DUMP_STACK
+   
+} // extern "C"
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/c/iccalendar.cpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/c/iccalendar.cpp	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/c/iccalendar.cpp	(revision 1749)
@@ -0,0 +1,73 @@
+#include "xios.hpp"
+
+#include "icdate.hpp"
+#include "exception.hpp"
+#include "timer.hpp"
+#include "context.hpp"
+#include "context_client.hpp"
+
+extern "C"
+{
+  void cxios_update_calendar(int step)
+  TRY
+  {
+    CTimer::get("XIOS").resume();
+    xios::CContext* context = CContext::getCurrent();
+    if (!context->hasServer && !context->client->isAttachedModeEnabled())
+      context->checkBuffersAndListen();
+    context->updateCalendar(step);
+    context->sendUpdateCalendar(step);
+    CTimer::get("XIOS").suspend();
+  }
+  CATCH_DUMP_STACK
+
+  void cxios_get_current_date(cxios_date* current_date_c)
+  TRY
+  {
+    CTimer::get("XIOS").resume();
+    const xios::CContext* context = CContext::getCurrent();
+    const std::shared_ptr<xios::CCalendar> cal = context->getCalendar();
+    if (!cal)
+      ERROR("void cxios_get_current_date(cxios_date* current_date_c)",
+            << "Impossible to get the current date: no calendar was defined.");
+    const CDate& currentDate = cal->getCurrentDate();
+    current_date_c->year = currentDate.getYear();
+    current_date_c->month = currentDate.getMonth();
+    current_date_c->day = currentDate.getDay();
+    current_date_c->hour = currentDate.getHour();
+    current_date_c->minute = currentDate.getMinute();
+    current_date_c->second = currentDate.getSecond();
+    CTimer::get("XIOS").suspend();
+  }
+  CATCH_DUMP_STACK
+
+  int cxios_get_year_length_in_seconds(int year)
+  TRY
+  {
+    CTimer::get("XIOS").resume();
+    const std::shared_ptr<xios::CCalendar> cal = CContext::getCurrent()->getCalendar();
+    if (!cal)
+      ERROR("int cxios_get_year_length_in_seconds(int year)",
+            << "Impossible to get the year length: no calendar was defined.");
+    int length = cal->getYearTotalLength(CDate(*cal, year, 01, 01));
+    CTimer::get("XIOS").suspend();
+
+    return length;
+  }
+  CATCH_DUMP_STACK
+
+  int cxios_get_day_length_in_seconds()
+  TRY
+  {
+    CTimer::get("XIOS").resume();
+    const std::shared_ptr<xios::CCalendar> cal = CContext::getCurrent()->getCalendar();
+    if (!cal)
+      ERROR("int cxios_get_day_length_in_seconds()",
+            << "Impossible to get the day length: no calendar was defined.");
+    int length = cal->getDayLengthInSeconds();
+    CTimer::get("XIOS").suspend();
+
+    return length;
+  }
+  CATCH_DUMP_STACK
+}
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/c/iccalendar_wrapper.cpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/c/iccalendar_wrapper.cpp	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/c/iccalendar_wrapper.cpp	(revision 1749)
@@ -0,0 +1,146 @@
+/* ************************************************************************** *
+ *      Copyright Â© IPSL/LSCE, xios, Avril 2010 - Octobre 2011         *
+ * ************************************************************************** */
+
+#include <boost/multi_array.hpp>
+
+#include <memory>
+
+#include "xios.hpp"
+
+#include "attribute_template.hpp"
+#include "object_template.hpp"
+#include "group_template.hpp"
+
+#include "icutil.hpp"
+#include "icdate.hpp"
+#include "timer.hpp"
+#include "calendar_wrapper.hpp"
+
+extern "C"
+{
+// /////////////////////////////// DÃ©finitions ////////////////////////////// //
+
+  // ----------------------- RedÃ©finition de type ----------------------------
+
+  typedef xios::CCalendarWrapper *XCalendarWrapperPtr;
+
+  // ------------------------ CrÃ©ation des handle -----------------------------
+
+  void cxios_calendar_wrapper_handle_create(XCalendarWrapperPtr* _ret, const char* _id, int _id_len)
+  TRY
+  {
+    std::string id;
+    if (!cstr2string(_id, _id_len, id)) return;
+    CTimer::get("XIOS").resume();
+    *_ret = CCalendarWrapper::get(id);
+    CTimer::get("XIOS").suspend();
+  }
+  CATCH_DUMP_STACK
+
+  void cxios_get_current_calendar_wrapper(XCalendarWrapperPtr* _ret)
+  TRY
+  {
+    CTimer::get("XIOS").resume();
+    *_ret = CCalendarWrapper::get(CCalendarWrapper::GetDefName());
+    CTimer::get("XIOS").suspend();
+  }
+  CATCH_DUMP_STACK
+
+  // -------------------- VÃ©rification des identifiants -----------------------
+
+  void cxios_calendar_wrapper_valid_id(bool* _ret, const char* _id, int _id_len)
+  TRY
+  {
+    std::string id;
+    if (!cstr2string(_id, _id_len, id)) return;
+    CTimer::get("XIOS").resume();
+    *_ret = CCalendarWrapper::has(id);
+    CTimer::get("XIOS").suspend();
+  }
+  CATCH_DUMP_STACK
+
+  // ----------------------- Custom getters and setters -----------------------
+
+  void cxios_set_calendar_wrapper_date_start_date(XCalendarWrapperPtr calendarWrapper_hdl, cxios_date start_date_c)
+  TRY
+  {
+    CTimer::get("XIOS").resume();
+    CDate start_date(*calendarWrapper_hdl->getCalendar(true),
+                     start_date_c.year,
+                     start_date_c.month,
+                     start_date_c.day,
+                     start_date_c.hour,
+                     start_date_c.minute,
+                     start_date_c.second);
+    calendarWrapper_hdl->setInitDate(start_date);
+    CTimer::get("XIOS").suspend();
+  }
+  CATCH_DUMP_STACK
+
+  void cxios_get_calendar_wrapper_date_start_date(XCalendarWrapperPtr calendarWrapper_hdl, cxios_date* start_date_c)
+  TRY
+  {
+    CTimer::get("XIOS").resume();
+    const CDate& start_date = calendarWrapper_hdl->getInitDate();
+    start_date_c->year = start_date.getYear();
+    start_date_c->month = start_date.getMonth();
+    start_date_c->day = start_date.getDay();
+    start_date_c->hour = start_date.getHour();
+    start_date_c->minute = start_date.getMinute();
+    start_date_c->second = start_date.getSecond();
+    CTimer::get("XIOS").suspend();
+  }
+  CATCH_DUMP_STACK
+
+  void cxios_set_calendar_wrapper_date_time_origin(XCalendarWrapperPtr calendarWrapper_hdl, cxios_date time_origin_c)
+  TRY
+  {
+    CTimer::get("XIOS").resume();
+    CDate time_origin(*calendarWrapper_hdl->getCalendar(true),
+                      time_origin_c.year,
+                      time_origin_c.month,
+                      time_origin_c.day,
+                      time_origin_c.hour,
+                      time_origin_c.minute,
+                      time_origin_c.second);
+    calendarWrapper_hdl->setTimeOrigin(time_origin);
+    CTimer::get("XIOS").suspend();
+  }
+  CATCH_DUMP_STACK
+
+  void cxios_get_calendar_wrapper_date_time_origin(XCalendarWrapperPtr calendarWrapper_hdl, cxios_date* time_origin_c)
+  TRY
+  {
+    CTimer::get("XIOS").resume();
+    const CDate& time_origin = calendarWrapper_hdl->getTimeOrigin();
+    time_origin_c->year = time_origin.getYear();
+    time_origin_c->month = time_origin.getMonth();
+    time_origin_c->day = time_origin.getDay();
+    time_origin_c->hour = time_origin.getHour();
+    time_origin_c->minute = time_origin.getMinute();
+    time_origin_c->second = time_origin.getSecond();
+    CTimer::get("XIOS").suspend();
+  }
+  CATCH_DUMP_STACK
+
+  // ----------------------- Calendar creation and update ----------------------
+
+  void cxios_create_calendar(XCalendarWrapperPtr calendarWrapper_hdl)
+  TRY
+  {
+    CTimer::get("XIOS").resume();
+    calendarWrapper_hdl->createCalendar();
+    CTimer::get("XIOS").suspend();
+  }
+  CATCH_DUMP_STACK
+
+  void cxios_update_calendar_timestep(XCalendarWrapperPtr calendarWrapper_hdl)
+  TRY
+  {
+    CTimer::get("XIOS").resume();
+    calendarWrapper_hdl->updateTimestep();
+    CTimer::get("XIOS").suspend();
+  }
+  CATCH_DUMP_STACK
+} // extern "C"
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/c/iccompute_connectivity_domain.cpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/c/iccompute_connectivity_domain.cpp	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/c/iccompute_connectivity_domain.cpp	(revision 1749)
@@ -0,0 +1,49 @@
+/* ************************************************************************** *
+ *      Copyright Â© IPSL/LSCE, xios, Avril 2010 - Octobre 2011         *
+ * ************************************************************************** */
+
+#include <boost/multi_array.hpp>
+
+#include "xios.hpp"
+
+#include "object_template.hpp"
+#include "group_template.hpp"
+#include "attribute_template.hpp"
+
+#include "icutil.hpp"
+#include "timer.hpp"
+#include "compute_connectivity_domain.hpp"
+
+extern "C"
+{
+// /////////////////////////////// DÃ©finitions ////////////////////////////// //
+
+   // ----------------------- RedÃ©finition de types ----------------------------
+
+   typedef xios::CComputeConnectivityDomain   * XComConDomainPtr;
+
+   // ------------------------ CrÃ©ation des handle -----------------------------
+   void cxios_compute_connectivity_domain_handle_create(XComConDomainPtr * _ret, const char * _id, int _id_len)
+   TRY
+   {
+      std::string id;
+      if (!cstr2string(_id, _id_len, id)) return;
+      CTimer::get("XIOS").resume() ;
+      *_ret = xios::CComputeConnectivityDomain::get(id);
+      CTimer::get("XIOS").suspend() ;
+   }
+   CATCH_DUMP_STACK
+
+   // -------------------- VÃ©rification des identifiants -----------------------
+   void cxios_compute_connectivity_domain_valid_id(bool * _ret, const char * _id, int _id_len)
+   TRY
+   {
+      std::string id;
+      if (!cstr2string(_id, _id_len, id)) return;
+
+      CTimer::get("XIOS").resume() ;
+      *_ret = xios::CComputeConnectivityDomain::has(id);
+      CTimer::get("XIOS").suspend() ;
+   }
+   CATCH_DUMP_STACK
+} // extern "C"
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/c/iccontext.cpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/c/iccontext.cpp	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/c/iccontext.cpp	(revision 1749)
@@ -0,0 +1,103 @@
+/* ************************************************************************** *
+ *      Copyright Â© IPSL/LSCE, xios, Avril 2010 - Octobre 2011         *
+ * ************************************************************************** */
+
+#include <boost/multi_array.hpp>
+
+#include <memory>
+
+#include "xios.hpp"
+
+#include "attribute_template.hpp"
+#include "object_template.hpp"
+#include "group_template.hpp"
+
+#include "calendar_type.hpp"
+
+#include "icutil.hpp"
+#include "timer.hpp"
+#include "context.hpp"
+
+extern "C"
+{
+// /////////////////////////////// DÃ©finitions ////////////////////////////// //
+
+   // ----------------------- RedÃ©finition de types ----------------------------
+
+   typedef enum { D360 = 0 , ALLLEAP, NOLEAP, JULIAN, GREGORIAN } XCalendarType ;
+
+   typedef xios::CContext * XContextPtr;
+
+   // ------------------------ CrÃ©ation des handle -----------------------------
+
+   void cxios_context_handle_create (XContextPtr * _ret, const char * _id, int _id_len)
+   TRY
+   {
+      std::string id;
+      if (!cstr2string(_id, _id_len, id)) return;
+      CTimer::get("XIOS").resume() ;
+
+      std::vector<xios::CContext*> def_vector =
+            xios::CContext::getRoot()->getChildList();
+
+      for (std::size_t i = 0; i < def_vector.size(); i++)
+      {
+          if (def_vector[i]->getId().compare(id) == 0)
+          {
+            *_ret = def_vector[i];
+             CTimer::get("XIOS").suspend() ;
+            return;
+          }
+      }
+       CTimer::get("XIOS").suspend() ;
+       ERROR("void cxios_context_handle_create (XContextPtr * _ret, const char * _id, int _id_len)",
+             << "Context "<<id<<"  unknown");
+      // Lever une exeception ici
+   }
+   CATCH_DUMP_STACK
+
+   // ------------------------ Changements de contextes ------------------------
+
+   void cxios_context_get_current(XContextPtr* context)
+   TRY
+   {
+      CTimer::get("XIOS").resume();
+      *context = CContext::getCurrent();
+      CTimer::get("XIOS").suspend();
+   }
+   CATCH_DUMP_STACK
+
+   void cxios_context_set_current(XContextPtr context, bool withswap)
+   TRY
+   {
+      CTimer::get("XIOS").resume() ;
+      CContext::setCurrent(context->getId());
+      CTimer::get("XIOS").suspend() ;
+   }
+   CATCH_DUMP_STACK
+
+   // -------------------- VÃ©rification des identifiants -----------------------
+
+   void cxios_context_valid_id (bool * _ret, const char * _id, int _id_len)
+   TRY
+   {
+      std::string id;
+      if (!cstr2string(_id, _id_len, id)) return;
+
+      CTimer::get("XIOS").resume();
+      std::vector<xios::CContext*> def_vector =
+            xios::CContext::getRoot()->getChildList();
+
+      *_ret = false;
+      for (std::size_t i = 0; i < def_vector.size(); i++)
+      {
+        if (def_vector[i]->getId().compare(id) == 0)
+        {
+          *_ret = true;
+          break;
+        }
+      }
+      CTimer::get("XIOS").suspend();
+   }
+   CATCH_DUMP_STACK
+} // extern "C"
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/c/icdata.cpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/c/icdata.cpp	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/c/icdata.cpp	(revision 1749)
@@ -0,0 +1,1147 @@
+/* ************************************************************************** *
+ *      Copyright Â© IPSL/LSCE, xios, Avril 2010 - Octobre 2011         *
+ * ************************************************************************** */
+
+#include <boost/multi_array.hpp>
+#include <memory>
+#include <string>
+#include <cstring>
+#include <iostream>
+
+
+#include "xios.hpp"
+#include "oasis_cinterface.hpp"
+
+#include "attribute_template.hpp"
+#include "object_template.hpp"
+#include "group_template.hpp"
+
+#include "icutil.hpp"
+#include "cxios.hpp"
+#include "client.hpp"
+#include "field.hpp"
+#include "context.hpp"
+#include "context_client.hpp"
+#include "mpi.hpp"
+#include "timer.hpp"
+#include "array_new.hpp"
+
+
+extern "C"
+{
+// /////////////////////////////// DÃ©finitions ////////////////////////////// //
+
+   // ----------------------- RedÃ©finition de types ----------------------------
+
+   typedef enum { NETCDF4 = 0 } XFileType;
+
+   typedef xios::CContext* XContextPtr;
+
+   // -------------------- Traitement des donnÃ©es ------------------------------
+
+   // This function is not exported to the public Fortran interface,
+   // it is only used from the parse_xml.exe standalone test tool.
+   void cxios_init(void)
+   TRY
+   {
+     CXios::initialize();
+   }
+   CATCH_DUMP_STACK
+
+   void cxios_init_server(void)
+   TRY
+   {
+     CXios::initServerSide();
+   }
+   CATCH_DUMP_STACK
+
+   void cxios_init_client(const char* client_id , int len_client_id, MPI_Fint* f_local_comm, MPI_Fint* f_return_comm )
+   TRY
+   {
+      std::string str;
+      MPI_Comm local_comm;
+      MPI_Comm return_comm;
+
+      if (!cstr2string(client_id, len_client_id, str)) return;
+
+      int initialized;
+      MPI_Initialized(&initialized);
+      if (initialized) local_comm=MPI_Comm_f2c(*f_local_comm);
+      else local_comm=MPI_COMM_NULL;
+      CXios::initClientSide(str, local_comm, return_comm);
+      *f_return_comm=MPI_Comm_c2f(return_comm);
+      CTimer::get("XIOS init").suspend();
+      CTimer::get("XIOS").suspend();
+   }
+   CATCH_DUMP_STACK
+
+   void cxios_context_initialize(const char* context_id , int len_context_id, MPI_Fint* f_comm)
+   TRY
+   {
+     std::string str;
+     MPI_Comm comm;
+
+     if (!cstr2string(context_id, len_context_id, str)) return;
+     CTimer::get("XIOS").resume();
+     CTimer::get("XIOS init context").resume();
+     comm=MPI_Comm_f2c(*f_comm);
+     CClient::registerContext(str, comm);
+     CTimer::get("XIOS init context").suspend();
+     CTimer::get("XIOS").suspend();
+   }
+   CATCH_DUMP_STACK
+
+   void cxios_oasis_enddef()
+   TRY
+   {
+     CTimer::get("XIOS").resume();
+     CClient::callOasisEnddef();
+     CTimer::get("XIOS").suspend();
+   }
+   CATCH_DUMP_STACK
+
+   void cxios_context_is_initialized(const char* context_id , int len_context_id, bool* initialized)
+   TRY
+   {
+     std::string str;
+
+     if (!cstr2string(context_id, len_context_id, str)) return;
+     CTimer::get("XIOS").resume();
+     CContext* context = CContext::get(str, str);
+     *initialized=context->isInitialized();
+     CTimer::get("XIOS").suspend();
+   }
+   CATCH_DUMP_STACK
+
+   void cxios_context_close_definition()
+   TRY
+   {
+     CTimer::get("XIOS").resume();
+     CTimer::get("XIOS close definition").resume();
+     CContext* context = CContext::getCurrent();
+     context->closeDefinition();
+     CTimer::get("XIOS close definition").suspend();
+     CTimer::get("XIOS").suspend();
+   }
+   CATCH_DUMP_STACK
+
+   void cxios_context_finalize()
+   TRY
+   {
+     CTimer::get("XIOS").resume();
+     CTimer::get("XIOS context finalize").resume();
+     CContext* context = CContext::getCurrent();
+     context->finalize();
+     CTimer::get("XIOS context finalize").suspend();
+     CTimer::get("XIOS").suspend();
+   }
+   CATCH_DUMP_STACK
+
+   void cxios_finalize()
+   TRY
+   {
+     CTimer::get("XIOS").resume();
+     CTimer::get("XIOS finalize").resume();
+     CXios::clientFinalize();
+   }
+   CATCH_DUMP_STACK
+
+   void cxios_solve_inheritance()
+   TRY
+   {
+     CTimer::get("XIOS").resume();
+     CContext* context = CContext::getCurrent();
+     context->solveAllInheritance(false);
+     CTimer::get("XIOS").suspend();
+   }
+   CATCH_DUMP_STACK
+
+   /*! \brief This group of functions retrieve variable information from the configuration file (.xml)
+    *
+    * These functions provide intermediate C interfaces to get variable information of the configuration file (e.x iodef.xml),
+    * from a Fortran one, for example the value of a variable with id = "using_server".
+    * Each function corresponds to each basic type.
+    * \param varId        [in] id of the variable that we'd like to get
+    * \param varIdSize    [in] size of the variable type (integer, float, double, string)
+    * \param dataInt      [in/out] the retrieved data
+    * \param isVarExisted [in/out] Verify whether variable with varId exists
+   */
+   void cxios_get_variable_data_k8(const char* varId, int varIdSize, double* data, bool* isVarExisted)
+   TRY
+   {
+      std::string varIdStr;
+      if (!cstr2string(varId, varIdSize, varIdStr)) return;
+
+      CTimer::get("XIOS").resume();
+      CTimer::get("XIOS get variable data").resume();
+
+      CContext* context = CContext::getCurrent();
+      *isVarExisted = CVariable::has(context->getId(), varIdStr);
+
+      if (*isVarExisted)
+      {
+        *data = CVariable::get(context->getId(), varIdStr)->getData<double>();
+      }
+
+      CTimer::get("XIOS get variable data").suspend();
+      CTimer::get("XIOS").suspend();
+   }
+   CATCH_DUMP_STACK
+
+   void cxios_get_variable_data_k4(const char* varId, int varIdSize, float* data, bool* isVarExisted)
+   TRY
+   {
+      std::string varIdStr;
+      if (!cstr2string(varId, varIdSize, varIdStr)) return;
+
+      CTimer::get("XIOS").resume();
+      CTimer::get("XIOS get variable data").resume();
+
+      CContext* context = CContext::getCurrent();
+      *isVarExisted = CVariable::has(context->getId(), varIdStr);
+
+      if (*isVarExisted)
+      {
+        *data = CVariable::get(context->getId(), varIdStr)->getData<float>();
+      }
+
+      CTimer::get("XIOS get variable data").suspend();
+      CTimer::get("XIOS").suspend();
+   }
+   CATCH_DUMP_STACK
+
+   void cxios_get_variable_data_int(const char* varId, int varIdSize, int* data, bool* isVarExisted)
+   TRY
+   {
+      std::string varIdStr;
+      if (!cstr2string(varId, varIdSize, varIdStr)) return;
+
+      CTimer::get("XIOS").resume();
+      CTimer::get("XIOS get variable data").resume();
+
+      CContext* context = CContext::getCurrent();
+      *isVarExisted = CVariable::has(context->getId(), varIdStr);
+
+      if (*isVarExisted)
+      {
+        *data = CVariable::get(context->getId(), varIdStr)->getData<int>();
+      }
+
+      CTimer::get("XIOS get variable data").suspend();
+      CTimer::get("XIOS").suspend();
+   }
+   CATCH_DUMP_STACK
+
+   void cxios_get_variable_data_logic(const char* varId, int varIdSize, bool* data, bool* isVarExisted)
+   TRY
+   {
+      std::string varIdStr;
+      if (!cstr2string(varId, varIdSize, varIdStr)) return;
+
+      CTimer::get("XIOS").resume();
+      CTimer::get("XIOS get variable data").resume();
+
+      CContext* context = CContext::getCurrent();
+      *isVarExisted = CVariable::has(context->getId(), varIdStr);
+
+      if (*isVarExisted)
+      {
+        *data = CVariable::get(context->getId(), varIdStr)->getData<bool>();
+      }
+
+      CTimer::get("XIOS get variable data").suspend();
+      CTimer::get("XIOS").suspend();
+   }
+   CATCH_DUMP_STACK
+
+   void cxios_get_variable_data_char(const char* varId, int varIdSize, char* data, int dataSizeIn, bool* isVarExisted)
+   TRY
+   {
+      std::string varIdStr;
+      if (!cstr2string(varId, varIdSize, varIdStr)) return;
+
+      CTimer::get("XIOS").resume();
+      CTimer::get("XIOS get variable data").resume();
+
+      CContext* context = CContext::getCurrent();
+      *isVarExisted = CVariable::has(context->getId(), varIdStr);
+
+      if (*isVarExisted)
+      {
+        int dataSizeOut = CVariable::get(context->getId(), varIdStr)->getData<string>().length();
+        strncpy(data, CVariable::get(context->getId(), varIdStr)->getData<string>().c_str(), std::min(dataSizeIn, dataSizeOut));
+      }
+
+      CTimer::get("XIOS get variable data").suspend();
+      CTimer::get("XIOS").suspend();
+   }
+   CATCH_DUMP_STACK
+
+   /*! \brief This group of functions write information into existing variable in the configuration file (.xml)
+    *
+    *  These functions provide intermediate C interfaces to get variable information of the configuration file (e.x iodef.xml),
+    * from a Fortran one, for example the value of a variable with id = "using_server".
+    * Each function corresponds to each basic type.
+    * \param varId        [in] id of the variable that we'd like to get
+    * \param varIdSize    [in] size of the variable type (integer, float, double, string)
+    * \param data         [in] the input data
+    * \param isVarExisted [in/out] Verify whether variable with varId exists
+   */
+   void cxios_set_variable_data_k8(const char* varId, int varIdSize, double data, bool* isVarExisted)
+   TRY
+  {
+      std::string varIdStr;
+      if (!cstr2string(varId, varIdSize, varIdStr)) return;
+
+      CTimer::get("XIOS").resume();
+      CTimer::get("XIOS set variable data").resume();
+
+      CContext* context = CContext::getCurrent();
+      *isVarExisted = CVariable::has(context->getId(), varIdStr);
+
+      if (*isVarExisted)
+      {
+        CVariable::get(context->getId(), varIdStr)->setData<double>(data);
+        //CVariable::get(context->getId(), varIdStr)->sendValue();
+      }
+
+      CTimer::get("XIOS set variable data").suspend();
+      CTimer::get("XIOS").suspend();
+   }
+   CATCH_DUMP_STACK
+
+   void cxios_set_variable_data_k4(const char* varId, int varIdSize, float data, bool* isVarExisted)
+   TRY
+   {
+      std::string varIdStr;
+      if (!cstr2string(varId, varIdSize, varIdStr)) return;
+
+      CTimer::get("XIOS").resume();
+      CTimer::get("XIOS set variable data").resume();
+
+      CContext* context = CContext::getCurrent();
+      *isVarExisted = CVariable::has(context->getId(), varIdStr);
+
+      if (*isVarExisted)
+      {
+        CVariable::get(context->getId(), varIdStr)->setData<float>(data);
+        //CVariable::get(context->getId(), varIdStr)->sendValue();
+      }
+
+      CTimer::get("XIOS set variable data").suspend();
+      CTimer::get("XIOS").suspend();
+   }
+   CATCH_DUMP_STACK
+
+   void cxios_set_variable_data_int(const char* varId, int varIdSize, int data, bool* isVarExisted)
+   TRY
+   {
+      std::string varIdStr;
+      if (!cstr2string(varId, varIdSize, varIdStr)) return;
+
+      CTimer::get("XIOS").resume();
+      CTimer::get("XIOS set variable data").resume();
+
+      CContext* context = CContext::getCurrent();
+      *isVarExisted = CVariable::has(context->getId(), varIdStr);
+
+      if (*isVarExisted)
+      {
+        CVariable::get(context->getId(), varIdStr)->setData<int>(data);
+        //CVariable::get(context->getId(), varIdStr)->sendValue();
+      }
+
+
+      CTimer::get("XIOS set variable data").suspend();
+      CTimer::get("XIOS").suspend();
+   }
+   CATCH_DUMP_STACK
+
+   void cxios_set_variable_data_logic(const char* varId, int varIdSize, bool data, bool* isVarExisted)
+   TRY
+   {
+      std::string varIdStr;
+      if (!cstr2string(varId, varIdSize, varIdStr)) return;
+
+      CTimer::get("XIOS").resume();
+      CTimer::get("XIOS set variable data").resume();
+
+      CContext* context = CContext::getCurrent();
+      *isVarExisted = CVariable::has(context->getId(), varIdStr);
+
+      if (*isVarExisted)
+      {
+        CVariable::get(context->getId(), varIdStr)->setData<bool>(data);
+        //CVariable::get(context->getId(), varIdStr)->sendValue();
+      }
+
+      CTimer::get("XIOS set variable data").suspend();
+      CTimer::get("XIOS").suspend();
+   }
+   CATCH_DUMP_STACK
+
+   void cxios_set_variable_data_char(const char* varId, int varIdSize, const char* data, int dataSizeIn, bool* isVarExisted)
+   TRY
+  {
+      std::string varIdStr, dataStr;
+      if (!cstr2string(varId, varIdSize, varIdStr)) return;
+      if (!cstr2string(data, dataSizeIn, dataStr))
+      {
+        *isVarExisted = false;
+        return;
+      }
+
+      CTimer::get("XIOS").resume();
+      CTimer::get("XIOS set variable data").resume();
+
+      CContext* context = CContext::getCurrent();
+      *isVarExisted = CVariable::has(context->getId(), varIdStr);
+
+      if (*isVarExisted)
+      {
+        CVariable::get(context->getId(), varIdStr)->setData<string>(dataStr);
+        //CVariable::get(context->getId(), varIdStr)->sendValue();
+      }
+
+      CTimer::get("XIOS set variable data").suspend();
+      CTimer::get("XIOS").suspend();
+   }
+   CATCH_DUMP_STACK
+
+   // ---------------------- Ecriture des donnÃ©es ------------------------------
+
+   void cxios_write_data_k80(const char* fieldid, int fieldid_size, double* data_k8, int data_Xsize)
+   TRY
+   {
+      std::string fieldid_str;
+      if (!cstr2string(fieldid, fieldid_size, fieldid_str)) return;
+
+      CTimer::get("XIOS").resume();
+      CTimer::get("XIOS send field").resume();
+      CContext* context = CContext::getCurrent();
+      if (!context->hasServer && !context->client->isAttachedModeEnabled())
+        context->checkBuffersAndListen();
+      CArray<double, 1> data(data_k8, shape(data_Xsize), neverDeleteData);
+      CField::get(fieldid_str)->setData(data);
+      CTimer::get("XIOS send field").suspend();
+      CTimer::get("XIOS").suspend();
+   }
+   CATCH_DUMP_STACK
+
+   void cxios_write_data_k81(const char* fieldid, int fieldid_size, double* data_k8, int data_Xsize)
+   TRY
+   {
+      std::string fieldid_str;
+      if (!cstr2string(fieldid, fieldid_size, fieldid_str)) return;
+
+      CTimer::get("XIOS").resume();
+      CTimer::get("XIOS send field").resume();
+
+      CContext* context = CContext::getCurrent();
+      if (!context->hasServer && !context->client->isAttachedModeEnabled())
+        context->checkBuffersAndListen();
+
+      CArray<double, 1> data(data_k8, shape(data_Xsize), neverDeleteData);
+      CField::get(fieldid_str)->setData(data);
+
+      CTimer::get("XIOS send field").suspend();
+      CTimer::get("XIOS").suspend();
+   }
+   CATCH_DUMP_STACK
+
+   void cxios_write_data_k82(const char* fieldid, int fieldid_size, double* data_k8, int data_Xsize, int data_Ysize)
+   TRY
+   {
+      std::string fieldid_str;
+      if (!cstr2string(fieldid, fieldid_size, fieldid_str)) return;
+
+      CTimer::get("XIOS").resume();
+      CTimer::get("XIOS send field").resume();
+
+      CContext* context = CContext::getCurrent();
+      if (!context->hasServer && !context->client->isAttachedModeEnabled())
+        context->checkBuffersAndListen();
+
+      CArray<double, 2>data(data_k8, shape(data_Xsize, data_Ysize), neverDeleteData);
+      CField::get(fieldid_str)->setData(data);
+
+      CTimer::get("XIOS send field").suspend();
+      CTimer::get("XIOS").suspend();
+   }
+   CATCH_DUMP_STACK
+
+   void cxios_write_data_k83(const char* fieldid, int fieldid_size, double* data_k8, int data_Xsize, int data_Ysize, int data_Zsize)
+   TRY
+   {
+      std::string fieldid_str;
+      if (!cstr2string(fieldid, fieldid_size, fieldid_str)) return;
+
+      CTimer::get("XIOS").resume();
+      CTimer::get("XIOS send field").resume();
+
+      CContext* context = CContext::getCurrent();
+      if (!context->hasServer && !context->client->isAttachedModeEnabled())
+        context->checkBuffersAndListen();
+
+      CArray<double, 3>data(data_k8, shape(data_Xsize, data_Ysize, data_Zsize), neverDeleteData);
+      CField::get(fieldid_str)->setData(data);
+
+      CTimer::get("XIOS send field").suspend();
+      CTimer::get("XIOS").suspend();
+   }
+   CATCH_DUMP_STACK
+
+   void cxios_write_data_k84(const char* fieldid, int fieldid_size, double* data_k8, int data_0size, int data_1size, int data_2size, int data_3size)
+   TRY
+   {
+      std::string fieldid_str;
+      if (!cstr2string(fieldid, fieldid_size, fieldid_str)) return;
+
+      CTimer::get("XIOS").resume();
+      CTimer::get("XIOS send field").resume();
+
+      CContext* context = CContext::getCurrent();
+      if (!context->hasServer && !context->client->isAttachedModeEnabled())
+        context->checkBuffersAndListen();
+
+      CArray<double, 4>data(data_k8, shape(data_0size, data_1size, data_2size, data_3size), neverDeleteData);
+      CField::get(fieldid_str)->setData(data);
+
+      CTimer::get("XIOS send field").suspend();
+      CTimer::get("XIOS").suspend();
+   }
+   CATCH_DUMP_STACK
+
+   void cxios_write_data_k85(const char* fieldid, int fieldid_size, double* data_k8,
+                             int data_0size, int data_1size, int data_2size,
+                             int data_3size, int data_4size)
+   TRY
+   {
+      std::string fieldid_str;
+      if (!cstr2string(fieldid, fieldid_size, fieldid_str)) return;
+
+      CTimer::get("XIOS").resume();
+      CTimer::get("XIOS send field").resume();
+
+      CContext* context = CContext::getCurrent();
+      if (!context->hasServer && !context->client->isAttachedModeEnabled())
+        context->checkBuffersAndListen();
+
+      CArray<double, 5>data(data_k8, shape(data_0size, data_1size, data_2size, data_3size, data_4size), neverDeleteData);
+      CField::get(fieldid_str)->setData(data);
+
+      CTimer::get("XIOS send field").suspend();
+      CTimer::get("XIOS").suspend();
+   }
+   CATCH_DUMP_STACK
+
+   void cxios_write_data_k86(const char* fieldid, int fieldid_size, double* data_k8,
+                             int data_0size, int data_1size, int data_2size,
+                             int data_3size, int data_4size, int data_5size)
+   TRY
+   {
+      std::string fieldid_str;
+      if (!cstr2string(fieldid, fieldid_size, fieldid_str)) return;
+
+      CTimer::get("XIOS").resume();
+      CTimer::get("XIOS send field").resume();
+
+      CContext* context = CContext::getCurrent();
+      if (!context->hasServer && !context->client->isAttachedModeEnabled())
+        context->checkBuffersAndListen();
+
+      CArray<double, 6>data(data_k8, shape(data_0size, data_1size, data_2size, data_3size, data_4size, data_5size), neverDeleteData);
+      CField::get(fieldid_str)->setData(data);
+
+      CTimer::get("XIOS send field").suspend();
+      CTimer::get("XIOS").suspend();
+   }
+   CATCH_DUMP_STACK
+
+   void cxios_write_data_k87(const char* fieldid, int fieldid_size, double* data_k8,
+                             int data_0size, int data_1size, int data_2size,
+                             int data_3size, int data_4size, int data_5size,
+                             int data_6size)
+   TRY
+   {
+      std::string fieldid_str;
+      if (!cstr2string(fieldid, fieldid_size, fieldid_str)) return;
+
+      CTimer::get("XIOS").resume();
+      CTimer::get("XIOS send field").resume();
+
+      CContext* context = CContext::getCurrent();
+      if (!context->hasServer && !context->client->isAttachedModeEnabled())
+        context->checkBuffersAndListen();
+
+      CArray<double, 7>data(data_k8, shape(data_0size, data_1size, data_2size, data_3size, data_4size, data_5size, data_6size), neverDeleteData);
+      CField::get(fieldid_str)->setData(data);
+
+      CTimer::get("XIOS send field").suspend();
+      CTimer::get("XIOS").suspend();
+   }
+   CATCH_DUMP_STACK
+
+   void cxios_write_data_k40(const char* fieldid, int fieldid_size, float* data_k4, int data_Xsize)
+   TRY
+   {
+      std::string fieldid_str;
+      if (!cstr2string(fieldid, fieldid_size, fieldid_str)) return;
+
+      CTimer::get("XIOS").resume();
+      CTimer::get("XIOS send field").resume();
+      CContext* context = CContext::getCurrent();
+      if (!context->hasServer && !context->client->isAttachedModeEnabled())
+        context->checkBuffersAndListen();
+
+      CArray<float, 1> data_tmp(data_k4, shape(data_Xsize), neverDeleteData);
+      CArray<double, 1> data(data_Xsize) ;
+      data = data_tmp;
+      CField::get(fieldid_str)->setData(data);
+      CTimer::get("XIOS send field").suspend();
+      CTimer::get("XIOS").suspend();
+   }
+   CATCH_DUMP_STACK
+
+   void cxios_write_data_k41(const char* fieldid, int fieldid_size, float* data_k4, int data_Xsize)
+   TRY
+   {
+      std::string fieldid_str;
+      if (!cstr2string(fieldid, fieldid_size, fieldid_str)) return;
+
+      CTimer::get("XIOS").resume();
+      CTimer::get("XIOS send field").resume();
+
+      CContext* context = CContext::getCurrent();
+      if (!context->hasServer && !context->client->isAttachedModeEnabled())
+        context->checkBuffersAndListen();
+
+      CArray<float, 1> data_tmp(data_k4, shape(data_Xsize), neverDeleteData);
+      CArray<double, 1> data(data_Xsize);
+      data = data_tmp;
+      CField::get(fieldid_str)->setData(data);
+
+      CTimer::get("XIOS send field").suspend();
+      CTimer::get("XIOS").suspend();
+   }
+   CATCH_DUMP_STACK
+
+   void cxios_write_data_k42(const char* fieldid, int fieldid_size, float* data_k4, int data_Xsize, int data_Ysize)
+   TRY
+   {
+      std::string fieldid_str;
+      if (!cstr2string(fieldid, fieldid_size, fieldid_str)) return;
+
+      CTimer::get("XIOS").resume();
+      CTimer::get("XIOS send field").resume();
+
+      CContext* context = CContext::getCurrent();
+      if (!context->hasServer && !context->client->isAttachedModeEnabled())
+        context->checkBuffersAndListen();
+
+      CArray<float, 2> data_tmp(data_k4, shape(data_Xsize, data_Ysize), neverDeleteData);
+      CArray<double, 2> data(data_Xsize, data_Ysize);
+      data = data_tmp;
+      CField::get(fieldid_str)->setData(data);
+
+      CTimer::get("XIOS send field").suspend();
+      CTimer::get("XIOS").suspend();
+   }
+   CATCH_DUMP_STACK
+
+   void cxios_write_data_k43(const char* fieldid, int fieldid_size, float* data_k4, int data_Xsize, int data_Ysize, int data_Zsize)
+   TRY
+   {
+      std::string fieldid_str;
+      if (!cstr2string(fieldid, fieldid_size, fieldid_str)) return;
+
+      CTimer::get("XIOS").resume();
+      CTimer::get("XIOS send field").resume();
+
+      CContext* context = CContext::getCurrent();
+      if (!context->hasServer && !context->client->isAttachedModeEnabled())
+        context->checkBuffersAndListen();
+
+      CArray<float, 3> data_tmp(data_k4, shape(data_Xsize, data_Ysize, data_Zsize), neverDeleteData);
+      CArray<double, 3> data(data_Xsize, data_Ysize, data_Zsize);
+      data = data_tmp;
+      CField::get(fieldid_str)->setData(data);
+
+      CTimer::get("XIOS send field").suspend();
+      CTimer::get("XIOS").suspend();
+    }
+   CATCH_DUMP_STACK
+
+   void cxios_write_data_k44(const char* fieldid, int fieldid_size, float* data_k4,
+                             int data_0size, int data_1size, int data_2size,
+                             int data_3size)
+   TRY
+   {
+      std::string fieldid_str;
+      if (!cstr2string(fieldid, fieldid_size, fieldid_str)) return;
+
+      CTimer::get("XIOS").resume();
+      CTimer::get("XIOS send field").resume();
+
+      CContext* context = CContext::getCurrent();
+      if (!context->hasServer && !context->client->isAttachedModeEnabled())
+        context->checkBuffersAndListen();
+
+      CArray<float, 4> data_tmp(data_k4, shape(data_0size, data_1size, data_2size, data_3size), neverDeleteData);
+      CArray<double, 4> data(data_0size, data_1size, data_2size, data_3size);
+      data = data_tmp;
+      CField::get(fieldid_str)->setData(data);
+
+      CTimer::get("XIOS send field").suspend();
+      CTimer::get("XIOS").suspend();
+    }
+   CATCH_DUMP_STACK
+
+   void cxios_write_data_k45(const char* fieldid, int fieldid_size, float* data_k4,
+                             int data_0size, int data_1size, int data_2size,
+                             int data_3size, int data_4size)
+   TRY
+   {
+      std::string fieldid_str;
+      if (!cstr2string(fieldid, fieldid_size, fieldid_str)) return;
+
+      CTimer::get("XIOS").resume();
+      CTimer::get("XIOS send field").resume();
+
+      CContext* context = CContext::getCurrent();
+      if (!context->hasServer && !context->client->isAttachedModeEnabled())
+        context->checkBuffersAndListen();
+
+      CArray<float, 5> data_tmp(data_k4, shape(data_0size, data_1size, data_2size, data_3size, data_4size), neverDeleteData);
+      CArray<double, 5> data(data_0size, data_1size, data_2size, data_3size, data_4size);
+      data = data_tmp;
+      CField::get(fieldid_str)->setData(data);
+
+      CTimer::get("XIOS send field").suspend();
+      CTimer::get("XIOS").suspend();
+    }
+   CATCH_DUMP_STACK
+
+   void cxios_write_data_k46(const char* fieldid, int fieldid_size, float* data_k4,
+                             int data_0size, int data_1size, int data_2size,
+                             int data_3size, int data_4size, int data_5size)
+   TRY
+   {
+      std::string fieldid_str;
+      if (!cstr2string(fieldid, fieldid_size, fieldid_str)) return;
+
+      CTimer::get("XIOS").resume();
+      CTimer::get("XIOS send field").resume();
+
+      CContext* context = CContext::getCurrent();
+      if (!context->hasServer && !context->client->isAttachedModeEnabled())
+        context->checkBuffersAndListen();
+
+      CArray<float, 6> data_tmp(data_k4, shape(data_0size, data_1size, data_2size, data_3size, data_4size, data_5size), neverDeleteData);
+      CArray<double, 6> data(data_0size, data_1size, data_2size, data_3size, data_4size, data_5size);
+      data = data_tmp;
+      CField::get(fieldid_str)->setData(data);
+
+      CTimer::get("XIOS send field").suspend();
+      CTimer::get("XIOS").suspend();
+    }
+   CATCH_DUMP_STACK
+
+   void cxios_write_data_k47(const char* fieldid, int fieldid_size, float* data_k4,
+                             int data_0size, int data_1size, int data_2size,
+                             int data_3size, int data_4size, int data_5size,
+                             int data_6size)
+   TRY
+   {
+      std::string fieldid_str;
+      if (!cstr2string(fieldid, fieldid_size, fieldid_str)) return;
+
+      CTimer::get("XIOS").resume();
+      CTimer::get("XIOS send field").resume();
+
+      CContext* context = CContext::getCurrent();
+      if (!context->hasServer && !context->client->isAttachedModeEnabled())
+        context->checkBuffersAndListen();
+
+      CArray<float, 7> data_tmp(data_k4, shape(data_0size, data_1size, data_2size, data_3size, data_4size, data_5size, data_6size), neverDeleteData);
+      CArray<double, 7> data(data_0size, data_1size, data_2size, data_3size, data_4size, data_5size, data_6size);
+      data = data_tmp;
+      CField::get(fieldid_str)->setData(data);
+
+      CTimer::get("XIOS send field").suspend();
+      CTimer::get("XIOS").suspend();
+    }
+   CATCH_DUMP_STACK
+
+   // ---------------------- Lecture des donnÃ©es ------------------------------
+
+   void cxios_read_data_k80(const char* fieldid, int fieldid_size, double* data_k8, int data_Xsize)
+   TRY
+   {
+      std::string fieldid_str;
+      if (!cstr2string(fieldid, fieldid_size, fieldid_str)) return;
+
+      CTimer::get("XIOS").resume();
+      CTimer::get("XIOS recv field").resume();
+
+      CContext* context = CContext::getCurrent();
+      if (!context->hasServer && !context->client->isAttachedModeEnabled())
+        context->checkBuffersAndListen();
+
+      CArray<double, 1> data(data_k8, shape(data_Xsize), neverDeleteData);
+      CField::get(fieldid_str)->getData(data);
+
+      CTimer::get("XIOS recv field").suspend();
+      CTimer::get("XIOS").suspend();
+   }
+   CATCH_DUMP_STACK
+
+   void cxios_read_data_k81(const char* fieldid, int fieldid_size, double* data_k8, int data_Xsize)
+   TRY
+   {
+      std::string fieldid_str;
+      if (!cstr2string(fieldid, fieldid_size, fieldid_str)) return;
+
+      CTimer::get("XIOS").resume();
+      CTimer::get("XIOS recv field").resume();
+
+      CContext* context = CContext::getCurrent();
+      if (!context->hasServer && !context->client->isAttachedModeEnabled())
+        context->checkBuffersAndListen();
+
+      CArray<double, 1> data(data_k8, shape(data_Xsize), neverDeleteData);
+      CField::get(fieldid_str)->getData(data);
+
+      CTimer::get("XIOS recv field").suspend();
+      CTimer::get("XIOS").suspend();
+   }
+   CATCH_DUMP_STACK
+
+   void cxios_read_data_k82(const char* fieldid, int fieldid_size, double* data_k8, int data_Xsize, int data_Ysize)
+   TRY
+   {
+      std::string fieldid_str;
+      if (!cstr2string(fieldid, fieldid_size, fieldid_str)) return;
+
+      CTimer::get("XIOS").resume();
+      CTimer::get("XIOS recv field").resume();
+
+      CContext* context = CContext::getCurrent();
+      if (!context->hasServer && !context->client->isAttachedModeEnabled())
+        context->checkBuffersAndListen();
+
+      CArray<double, 2>data(data_k8, shape(data_Xsize, data_Ysize), neverDeleteData);
+      CField::get(fieldid_str)->getData(data);
+
+      CTimer::get("XIOS recv field").suspend();
+      CTimer::get("XIOS").suspend();
+   }
+   CATCH_DUMP_STACK
+
+   void cxios_read_data_k83(const char* fieldid, int fieldid_size, double* data_k8, int data_Xsize, int data_Ysize, int data_Zsize)
+   TRY
+   {
+      std::string fieldid_str;
+      if (!cstr2string(fieldid, fieldid_size, fieldid_str)) return;
+
+      CTimer::get("XIOS").resume();
+      CTimer::get("XIOS recv field").resume();
+
+      CContext* context = CContext::getCurrent();
+      if (!context->hasServer && !context->client->isAttachedModeEnabled())
+        context->checkBuffersAndListen();
+
+      CArray<double, 3>data(data_k8, shape(data_Xsize, data_Ysize, data_Zsize), neverDeleteData);
+      CField::get(fieldid_str)->getData(data);
+
+      CTimer::get("XIOS recv field").suspend();
+      CTimer::get("XIOS").suspend();
+   }
+   CATCH_DUMP_STACK
+
+   void cxios_read_data_k84(const char* fieldid, int fieldid_size, double* data_k8,
+                            int data_0size, int data_1size, int data_2size,
+                            int data_3size)
+   TRY
+   {
+      std::string fieldid_str;
+      if (!cstr2string(fieldid, fieldid_size, fieldid_str)) return;
+
+      CTimer::get("XIOS").resume();
+      CTimer::get("XIOS recv field").resume();
+
+      CContext* context = CContext::getCurrent();
+      if (!context->hasServer && !context->client->isAttachedModeEnabled())
+        context->checkBuffersAndListen();
+
+      CArray<double, 4>data(data_k8, shape(data_0size, data_1size, data_2size, data_3size), neverDeleteData);
+      CField::get(fieldid_str)->getData(data);
+
+      CTimer::get("XIOS recv field").suspend();
+      CTimer::get("XIOS").suspend();
+   }
+   CATCH_DUMP_STACK
+
+   void cxios_read_data_k85(const char* fieldid, int fieldid_size, double* data_k8,
+                            int data_0size, int data_1size, int data_2size,
+                            int data_3size, int data_4size)
+   TRY
+   {
+      std::string fieldid_str;
+      if (!cstr2string(fieldid, fieldid_size, fieldid_str)) return;
+
+      CTimer::get("XIOS").resume();
+      CTimer::get("XIOS recv field").resume();
+
+      CContext* context = CContext::getCurrent();
+      if (!context->hasServer && !context->client->isAttachedModeEnabled())
+        context->checkBuffersAndListen();
+
+      CArray<double, 5>data(data_k8, shape(data_0size, data_1size, data_2size, data_3size, data_4size), neverDeleteData);
+      CField::get(fieldid_str)->getData(data);
+
+      CTimer::get("XIOS recv field").suspend();
+      CTimer::get("XIOS").suspend();
+   }
+   CATCH_DUMP_STACK
+
+   void cxios_read_data_k86(const char* fieldid, int fieldid_size, double* data_k8,
+                            int data_0size, int data_1size, int data_2size,
+                            int data_3size, int data_4size, int data_5size)
+   TRY
+   {
+      std::string fieldid_str;
+      if (!cstr2string(fieldid, fieldid_size, fieldid_str)) return;
+
+      CTimer::get("XIOS").resume();
+      CTimer::get("XIOS recv field").resume();
+
+      CContext* context = CContext::getCurrent();
+      if (!context->hasServer && !context->client->isAttachedModeEnabled())
+        context->checkBuffersAndListen();
+
+      CArray<double, 6>data(data_k8, shape(data_0size, data_1size, data_2size, data_3size, data_4size, data_5size), neverDeleteData);
+      CField::get(fieldid_str)->getData(data);
+
+      CTimer::get("XIOS recv field").suspend();
+      CTimer::get("XIOS").suspend();
+   }
+   CATCH_DUMP_STACK
+
+   void cxios_read_data_k87(const char* fieldid, int fieldid_size, double* data_k8,
+                            int data_0size, int data_1size, int data_2size,
+                            int data_3size, int data_4size, int data_5size,
+                            int data_6size)
+   TRY
+   {
+      std::string fieldid_str;
+      if (!cstr2string(fieldid, fieldid_size, fieldid_str)) return;
+
+      CTimer::get("XIOS").resume();
+      CTimer::get("XIOS recv field").resume();
+
+      CContext* context = CContext::getCurrent();
+      if (!context->hasServer && !context->client->isAttachedModeEnabled())
+        context->checkBuffersAndListen();
+
+      CArray<double, 7>data(data_k8, shape(data_0size, data_1size, data_2size, data_3size, data_4size, data_5size, data_6size), neverDeleteData);
+      CField::get(fieldid_str)->getData(data);
+
+      CTimer::get("XIOS recv field").suspend();
+      CTimer::get("XIOS").suspend();
+   }
+   CATCH_DUMP_STACK
+
+   void cxios_read_data_k40(const char* fieldid, int fieldid_size, float* data_k4, int data_Xsize)
+   TRY
+   {
+      std::string fieldid_str;
+      if (!cstr2string(fieldid, fieldid_size, fieldid_str)) return;
+
+      CTimer::get("XIOS").resume();
+      CTimer::get("XIOS recv field").resume();
+
+      CContext* context = CContext::getCurrent();
+      if (!context->hasServer && !context->client->isAttachedModeEnabled())
+        context->checkBuffersAndListen();
+
+      CArray<double, 1> data(data_Xsize);
+      CField::get(fieldid_str)->getData(data);
+      CArray<float, 1> data_tmp(data_k4, shape(data_Xsize), neverDeleteData);
+      data_tmp = data;
+
+      CTimer::get("XIOS recv field").suspend();
+      CTimer::get("XIOS").suspend();
+   }
+   CATCH_DUMP_STACK
+
+   void cxios_read_data_k41(const char* fieldid, int fieldid_size, float* data_k4, int data_Xsize)
+   TRY
+   {
+      std::string fieldid_str;
+      if (!cstr2string(fieldid, fieldid_size, fieldid_str)) return;
+
+      CTimer::get("XIOS").resume();
+      CTimer::get("XIOS recv field").resume();
+
+      CContext* context = CContext::getCurrent();
+      if (!context->hasServer && !context->client->isAttachedModeEnabled())
+        context->checkBuffersAndListen();
+
+      CArray<double, 1> data(data_Xsize);
+      CField::get(fieldid_str)->getData(data);
+      CArray<float, 1> data_tmp(data_k4, shape(data_Xsize), neverDeleteData);
+      data_tmp = data;
+
+      CTimer::get("XIOS recv field").suspend();
+      CTimer::get("XIOS").suspend();
+   }
+   CATCH_DUMP_STACK
+
+   void cxios_read_data_k42(const char* fieldid, int fieldid_size, float* data_k4, int data_Xsize, int data_Ysize)
+   TRY
+   {
+      std::string fieldid_str;
+      if (!cstr2string(fieldid, fieldid_size, fieldid_str)) return;
+
+      CTimer::get("XIOS").resume();
+      CTimer::get("XIOS recv field").resume();
+
+      CContext* context = CContext::getCurrent();
+      if (!context->hasServer && !context->client->isAttachedModeEnabled())
+        context->checkBuffersAndListen();
+
+      CArray<double, 2> data(data_Xsize, data_Ysize);
+      CField::get(fieldid_str)->getData(data);
+      CArray<float, 2> data_tmp(data_k4, shape(data_Xsize, data_Ysize), neverDeleteData);
+      data_tmp = data;
+
+      CTimer::get("XIOS recv field").suspend();
+      CTimer::get("XIOS").suspend();
+   }
+   CATCH_DUMP_STACK
+
+   void cxios_read_data_k43(const char* fieldid, int fieldid_size, float* data_k4, int data_Xsize, int data_Ysize, int data_Zsize)
+   TRY
+   {
+      std::string fieldid_str;
+      if (!cstr2string(fieldid, fieldid_size, fieldid_str)) return;
+
+      CTimer::get("XIOS").resume();
+      CTimer::get("XIOS recv field").resume();
+
+      CContext* context = CContext::getCurrent();
+      if (!context->hasServer && !context->client->isAttachedModeEnabled())
+        context->checkBuffersAndListen();
+
+      CArray<double, 3> data(data_Xsize, data_Ysize, data_Zsize);
+      CField::get(fieldid_str)->getData(data);
+      CArray<float, 3> data_tmp(data_k4, shape(data_Xsize, data_Ysize, data_Zsize), neverDeleteData);
+      data_tmp = data;
+
+      CTimer::get("XIOS recv field").suspend();
+      CTimer::get("XIOS").suspend();
+    }
+   CATCH_DUMP_STACK
+
+   void cxios_read_data_k44(const char* fieldid, int fieldid_size, float* data_k4,
+                            int data_0size, int data_1size, int data_2size,
+                            int data_3size)
+   TRY
+   {
+      std::string fieldid_str;
+      if (!cstr2string(fieldid, fieldid_size, fieldid_str)) return;
+
+      CTimer::get("XIOS").resume();
+      CTimer::get("XIOS recv field").resume();
+
+      CContext* context = CContext::getCurrent();
+      if (!context->hasServer && !context->client->isAttachedModeEnabled())
+        context->checkBuffersAndListen();
+
+      CArray<double, 4> data(data_0size, data_1size, data_2size, data_3size);
+      CField::get(fieldid_str)->getData(data);
+      CArray<float, 4> data_tmp(data_k4, shape(data_0size, data_1size, data_2size, data_3size), neverDeleteData);
+      data_tmp = data;
+
+      CTimer::get("XIOS recv field").suspend();
+      CTimer::get("XIOS").suspend();
+    }
+   CATCH_DUMP_STACK
+
+   void cxios_read_data_k45(const char* fieldid, int fieldid_size, float* data_k4,
+                            int data_0size, int data_1size, int data_2size,
+                            int data_3size, int data_4size)
+   TRY
+   {
+      std::string fieldid_str;
+      if (!cstr2string(fieldid, fieldid_size, fieldid_str)) return;
+
+      CTimer::get("XIOS").resume();
+      CTimer::get("XIOS recv field").resume();
+
+      CContext* context = CContext::getCurrent();
+      if (!context->hasServer && !context->client->isAttachedModeEnabled())
+        context->checkBuffersAndListen();
+
+      CArray<double, 5> data(data_0size, data_1size, data_2size, data_3size, data_4size);
+      CField::get(fieldid_str)->getData(data);
+      CArray<float, 5> data_tmp(data_k4, shape(data_0size, data_1size, data_2size, data_3size, data_4size), neverDeleteData);
+      data_tmp = data;
+
+      CTimer::get("XIOS recv field").suspend();
+      CTimer::get("XIOS").suspend();
+    }
+   CATCH_DUMP_STACK
+
+   void cxios_read_data_k46(const char* fieldid, int fieldid_size, float* data_k4,
+                            int data_0size, int data_1size, int data_2size,
+                            int data_3size, int data_4size, int data_5size)
+   TRY
+   {
+      std::string fieldid_str;
+      if (!cstr2string(fieldid, fieldid_size, fieldid_str)) return;
+
+      CTimer::get("XIOS").resume();
+      CTimer::get("XIOS recv field").resume();
+
+      CContext* context = CContext::getCurrent();
+      if (!context->hasServer && !context->client->isAttachedModeEnabled())
+        context->checkBuffersAndListen();
+
+      CArray<double, 6> data(data_0size, data_1size, data_2size, data_3size, data_4size, data_5size);
+      CField::get(fieldid_str)->getData(data);
+      CArray<float, 6> data_tmp(data_k4, shape(data_0size, data_1size, data_2size, data_3size, data_4size, data_5size), neverDeleteData);
+      data_tmp = data;
+
+      CTimer::get("XIOS recv field").suspend();
+      CTimer::get("XIOS").suspend();
+    }
+   CATCH_DUMP_STACK
+
+   void cxios_read_data_k47(const char* fieldid, int fieldid_size, float* data_k4,
+                            int data_0size, int data_1size, int data_2size,
+                            int data_3size, int data_4size, int data_5size,
+                            int data_6size)
+   TRY
+   {
+      std::string fieldid_str;
+      if (!cstr2string(fieldid, fieldid_size, fieldid_str)) return;
+
+      CTimer::get("XIOS").resume();
+      CTimer::get("XIOS recv field").resume();
+
+      CContext* context = CContext::getCurrent();
+      if (!context->hasServer && !context->client->isAttachedModeEnabled())
+        context->checkBuffersAndListen();
+
+      CArray<double, 7> data(data_0size, data_1size, data_2size, data_3size, data_4size, data_5size, data_6size);
+      CField::get(fieldid_str)->getData(data);
+      CArray<float, 7> data_tmp(data_k4, shape(data_0size, data_1size, data_2size, data_3size, data_4size, data_5size, data_6size), neverDeleteData);
+      data_tmp = data;
+
+      CTimer::get("XIOS recv field").suspend();
+      CTimer::get("XIOS").suspend();
+    }
+   CATCH_DUMP_STACK
+} // extern "C"
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/c/icdate.cpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/c/icdate.cpp	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/c/icdate.cpp	(revision 1749)
@@ -0,0 +1,238 @@
+/* ************************************************************************** *
+ *      Copyright Â© IPSL/LSCE, xios, Avril 2010 - Octobre 2011         *
+ * ************************************************************************** */
+
+#include <boost/multi_array.hpp>
+
+#include "xios.hpp"
+
+#include "attribute_template.hpp"
+#include "object_template.hpp"
+#include "group_template.hpp"
+
+#include "calendar_type.hpp"
+
+#include "icutil.hpp"
+#include "icdate.hpp"
+#include "exception.hpp"
+#include "calendar_util.hpp"
+#include "timer.hpp"
+#include "context.hpp"
+#include "context_client.hpp"
+
+static const xios::CCalendar& getCalendar(const std::string& idFunc)
+{
+  const xios::CContext* context = CContext::getCurrent();
+  if (!context)
+    ERROR(idFunc, << "Impossible to do calendar operations: no current context available.");
+  const std::shared_ptr<xios::CCalendar> cal = context->getCalendar();
+  if (!cal)
+    ERROR(idFunc, << "Impossible to do calendar operations: no calendar was defined.");
+  return *cal;
+}
+
+extern "C"
+{
+  long long int cxios_date_convert_to_seconds(cxios_date date_c)
+  TRY
+  {
+    xios::CDate date = xios::CDate(getCalendar("long long int cxios_date_convert_to_seconds(cxios_date date_c)"),
+                                   date_c.year, date_c.month, date_c.day,
+                                   date_c.hour, date_c.minute, date_c.second);
+    return date;
+  }
+  CATCH_DUMP_STACK
+
+  void cxios_date_convert_to_string(cxios_date date_c, char* str, int str_size)
+  TRY
+  {
+    xios::CDate date = xios::CDate(getCalendar("void cxios_date_convert_to_string(cxios_date date_c, char* str, int str_size)"),
+                                   date_c.year, date_c.month, date_c.day,
+                                   date_c.hour, date_c.minute, date_c.second);
+
+    if (!string_copy(date.toString(), str, str_size))
+      ERROR("void cxios_date_convert_to_string(cxios_date date_c, char* str, int str_size)", << "Input string is too short");
+  }
+  CATCH_DUMP_STACK
+
+  cxios_date cxios_date_convert_from_string(const char* str, int str_size)
+  TRY
+  {
+    std::string date_str;
+    xios::CDate date;
+
+    if (cstr2string(str, str_size, date_str))
+      date = xios::CDate::FromString(date_str,
+                                     getCalendar("cxios_date cxios_date_convert_from_string(const char* str, int str_size)"));
+
+    return { date.getYear(), date.getMonth(), date.getDay(), date.getHour(), date.getMinute(), date.getSecond() };
+  }
+  CATCH_DUMP_STACK
+
+  cxios_date cxios_date_add_duration(cxios_date date_c, cxios_duration dur_c)
+  TRY
+  {
+    xios::CDate date = xios::CDate(getCalendar("cxios_date cxios_date_add_duration(cxios_date date_c, cxios_duration dur_c)"),
+                                   date_c.year, date_c.month, date_c.day,
+                                   date_c.hour, date_c.minute, date_c.second);
+    xios::CDuration dur( dur_c.year, dur_c.month, dur_c.day, dur_c.hour, dur_c.minute, dur_c.second, dur_c.timestep );
+    xios::CDate res = date + dur;
+    return { res.getYear(), res.getMonth(), res.getDay(), res.getHour(), res.getMinute(), res.getSecond() };
+  }
+  CATCH_DUMP_STACK
+
+  cxios_date cxios_date_sub_duration(cxios_date date_c, cxios_duration dur_c)
+  TRY
+  {
+    xios::CDate date = xios::CDate(getCalendar("cxios_date cxios_date_sub_duration(cxios_date date_c, cxios_duration dur_c)"),
+                                   date_c.year, date_c.month, date_c.day,
+                                   date_c.hour, date_c.minute, date_c.second);
+    xios::CDuration dur( dur_c.year, dur_c.month, dur_c.day, dur_c.hour, dur_c.minute, dur_c.second, dur_c.timestep );
+
+    xios::CDate res = date - dur;
+    return { res.getYear(), res.getMonth(), res.getDay(), res.getHour(), res.getMinute(), res.getSecond() };
+  }
+  CATCH_DUMP_STACK
+
+  cxios_duration cxios_date_sub(cxios_date date1_c, cxios_date date2_c)
+  TRY
+  {
+    xios::CDate date1 = xios::CDate(getCalendar("cxios_duration cxios_date_sub(cxios_date date1_c, cxios_date date2_c)"),
+                                    date1_c.year, date1_c.month, date1_c.day,
+                                    date1_c.hour, date1_c.minute, date1_c.second);
+    xios::CDate date2 = xios::CDate(getCalendar("cxios_duration cxios_date_sub(cxios_date date1_c, cxios_date date2_c)"),
+                                    date2_c.year, date2_c.month, date2_c.day,
+                                    date2_c.hour, date2_c.minute, date2_c.second);
+    xios::CDuration res = date1 - date2;
+    return { res.year, res.month, res.day, res.hour, res.minute, res.second, res.timestep };
+  }
+  CATCH_DUMP_STACK
+
+  bool cxios_date_eq(cxios_date date1_c, cxios_date date2_c)
+  TRY
+  {
+    xios::CDate date1 = xios::CDate(getCalendar("bool cxios_date_eq(cxios_date date1_c, cxios_date date2_c)"),
+                                    date1_c.year, date1_c.month, date1_c.day,
+                                    date1_c.hour, date1_c.minute, date1_c.second);
+    xios::CDate date2 = xios::CDate(getCalendar("bool cxios_date_eq(cxios_date date1_c, cxios_date date2_c)"),
+                                    date2_c.year, date2_c.month, date2_c.day,
+                                    date2_c.hour, date2_c.minute, date2_c.second);
+    return (date1 == date2);
+  }
+  CATCH_DUMP_STACK
+
+  bool cxios_date_neq(cxios_date date1_c, cxios_date date2_c)
+  TRY
+  {
+    xios::CDate date1 = xios::CDate(getCalendar("bool cxios_date_eq(cxios_date date1_c, cxios_date date2_c)"),
+                                    date1_c.year, date1_c.month, date1_c.day,
+                                    date1_c.hour, date1_c.minute, date1_c.second);
+    xios::CDate date2 = xios::CDate(getCalendar("bool cxios_date_eq(cxios_date date1_c, cxios_date date2_c)"),
+                                    date2_c.year, date2_c.month, date2_c.day,
+                                    date2_c.hour, date2_c.minute, date2_c.second);
+    return (date1 != date2);
+  }
+  CATCH_DUMP_STACK
+
+  bool cxios_date_lt(cxios_date date1_c, cxios_date date2_c)
+  TRY
+  {
+    xios::CDate date1 = xios::CDate(getCalendar("bool cxios_date_eq(cxios_date date1_c, cxios_date date2_c)"),
+                                    date1_c.year, date1_c.month, date1_c.day,
+                                    date1_c.hour, date1_c.minute, date1_c.second);
+    xios::CDate date2 = xios::CDate(getCalendar("bool cxios_date_eq(cxios_date date1_c, cxios_date date2_c)"),
+                                    date2_c.year, date2_c.month, date2_c.day,
+                                    date2_c.hour, date2_c.minute, date2_c.second);
+    return (date1 < date2);
+  }
+  CATCH_DUMP_STACK
+
+  bool cxios_date_le(cxios_date date1_c, cxios_date date2_c)
+  TRY
+  {
+    xios::CDate date1 = xios::CDate(getCalendar("bool cxios_date_eq(cxios_date date1_c, cxios_date date2_c)"),
+                                    date1_c.year, date1_c.month, date1_c.day,
+                                    date1_c.hour, date1_c.minute, date1_c.second);
+    xios::CDate date2 = xios::CDate(getCalendar("bool cxios_date_eq(cxios_date date1_c, cxios_date date2_c)"),
+                                    date2_c.year, date2_c.month, date2_c.day,
+                                    date2_c.hour, date2_c.minute, date2_c.second);
+    return (date1 <= date2);
+  }
+  CATCH_DUMP_STACK
+
+  bool cxios_date_gt(cxios_date date1_c, cxios_date date2_c)
+  TRY
+  {
+    xios::CDate date1 = xios::CDate(getCalendar("bool cxios_date_eq(cxios_date date1_c, cxios_date date2_c)"),
+                                    date1_c.year, date1_c.month, date1_c.day,
+                                    date1_c.hour, date1_c.minute, date1_c.second);
+    xios::CDate date2 = xios::CDate(getCalendar("bool cxios_date_eq(cxios_date date1_c, cxios_date date2_c)"),
+                                    date2_c.year, date2_c.month, date2_c.day,
+                                    date2_c.hour, date2_c.minute, date2_c.second);
+    return (date1 > date2);
+  }
+  CATCH_DUMP_STACK
+
+  bool cxios_date_ge(cxios_date date1_c, cxios_date date2_c)
+  TRY
+  {
+    xios::CDate date1 = xios::CDate(getCalendar("bool cxios_date_eq(cxios_date date1_c, cxios_date date2_c)"),
+                                    date1_c.year, date1_c.month, date1_c.day,
+                                    date1_c.hour, date1_c.minute, date1_c.second);
+    xios::CDate date2 = xios::CDate(getCalendar("bool cxios_date_eq(cxios_date date1_c, cxios_date date2_c)"),
+                                    date2_c.year, date2_c.month, date2_c.day,
+                                    date2_c.hour, date2_c.minute, date2_c.second);
+    return (date1 >= date2);
+  }
+  CATCH_DUMP_STACK
+
+  int cxios_date_get_second_of_year(cxios_date date_c)
+  TRY
+  {
+    xios::CDate date = xios::CDate(getCalendar("int cxios_date_get_second_of_year(cxios_date date_c)"),
+                                   date_c.year, date_c.month, date_c.day,
+                                   date_c.hour, date_c.minute, date_c.second);
+    return date.getSecondOfYear();
+  }
+  CATCH_DUMP_STACK
+
+  double cxios_date_get_day_of_year(cxios_date date_c)
+  TRY
+  {
+    xios::CDate date = xios::CDate(getCalendar("int cxios_date_get_day_of_year(cxios_date date_c)"),
+                                   date_c.year, date_c.month, date_c.day,
+                                   date_c.hour, date_c.minute, date_c.second);
+    return date.getDayOfYear();
+  }
+  CATCH_DUMP_STACK
+
+  double cxios_date_get_fraction_of_year(cxios_date date_c)
+  TRY
+  {
+    xios::CDate date = xios::CDate(getCalendar("int cxios_date_get_fraction_of_year(cxios_date date_c)"),
+                                   date_c.year, date_c.month, date_c.day,
+                                   date_c.hour, date_c.minute, date_c.second);
+    return date.getFractionOfYear();
+  }
+  CATCH_DUMP_STACK
+
+  int cxios_date_get_second_of_day(cxios_date date_c)
+  TRY
+  {
+    xios::CDate date = xios::CDate(getCalendar("int cxios_date_get_second_of_day(cxios_date date_c)"),
+                                   date_c.year, date_c.month, date_c.day,
+                                   date_c.hour, date_c.minute, date_c.second);
+    return date.getSecondOfDay();
+  }
+  CATCH_DUMP_STACK
+
+  double cxios_date_get_fraction_of_day(cxios_date date_c)
+  TRY
+  {
+    xios::CDate date = xios::CDate(getCalendar("int cxios_date_get_fraction_of_day(cxios_date date_c)"),
+                                   date_c.year, date_c.month, date_c.day,
+                                   date_c.hour, date_c.minute, date_c.second);
+    return date.getFractionOfDay();
+  }
+  CATCH_DUMP_STACK
+} // extern "C"
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/c/icdate.hpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/c/icdate.hpp	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/c/icdate.hpp	(revision 1749)
@@ -0,0 +1,7 @@
+extern "C"
+{
+  /////////////////////////////// DÃ©finitions ////////////////////////////// //
+
+  typedef struct { int year, month, day, hour, minute, second; } cxios_date;
+  typedef struct { double year, month, day, hour, minute, second, timestep; } cxios_duration;
+} // extern "C"
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/c/icdomain.cpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/c/icdomain.cpp	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/c/icdomain.cpp	(revision 1749)
@@ -0,0 +1,77 @@
+/* ************************************************************************** *
+ *      Copyright Â© IPSL/LSCE, xios, Avril 2010 - Octobre 2011         *
+ * ************************************************************************** */
+
+#include <boost/multi_array.hpp>
+
+#include <memory>
+
+#include "xios.hpp"
+
+#include "attribute_template.hpp"
+#include "object_template.hpp"
+#include "group_template.hpp"
+
+#include "icutil.hpp"
+#include "timer.hpp"
+#include "domain.hpp"
+
+extern "C"
+{
+// /////////////////////////////// DÃ©finitions ////////////////////////////// //
+
+   // ----------------------- RedÃ©finition de types ----------------------------
+
+   typedef xios::CDomain      * XDomainPtr;
+   typedef xios::CDomainGroup * XDomainGroupPtr;
+
+   // ------------------------ CrÃ©ation des handle -----------------------------
+   
+   void cxios_domain_handle_create (XDomainPtr * _ret, const char * _id, int _id_len)
+   TRY
+   {
+      std::string id; 
+      if (!cstr2string(_id, _id_len, id)) return;
+      CTimer::get("XIOS").resume() ;
+      *_ret = CDomain::get(id);
+      CTimer::get("XIOS").suspend() ;
+   }
+   CATCH_DUMP_STACK
+   
+   void cxios_domaingroup_handle_create (XDomainGroupPtr * _ret, const char * _id, int _id_len)
+   TRY
+   {
+      std::string id; 
+      if (!cstr2string(_id, _id_len, id)) return;
+
+      CTimer::get("XIOS").resume() ;
+      *_ret = CDomainGroup::get(id);
+      CTimer::get("XIOS").suspend() ;
+   }
+   CATCH_DUMP_STACK
+
+   // -------------------- VÃ©rification des identifiants -----------------------
+
+   void cxios_domain_valid_id (bool * _ret, const char * _id, int _id_len)
+   TRY
+   {
+      std::string id;
+      if (!cstr2string(_id, _id_len, id)) return;
+
+      CTimer::get("XIOS").resume() ;
+      *_ret = CDomain::has(id);
+      CTimer::get("XIOS").suspend() ;
+   }
+   CATCH_DUMP_STACK
+
+   void cxios_domaingroup_valid_id (bool * _ret, const char * _id, int _id_len)
+   TRY
+   {
+      std::string id;
+      if (!cstr2string(_id, _id_len, id)) return;
+      CTimer::get("XIOS").resume() ;
+      *_ret = CDomainGroup::has(id);
+      CTimer::get("XIOS").suspend() ;
+   }
+   CATCH_DUMP_STACK
+} // extern "C"
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/c/icduplicate_scalar_to_axis.cpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/c/icduplicate_scalar_to_axis.cpp	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/c/icduplicate_scalar_to_axis.cpp	(revision 1749)
@@ -0,0 +1,51 @@
+/* ************************************************************************** *
+ *      Copyright Â© IPSL/LSCE, xios, Avril 2010 - Octobre 2011         *
+ * ************************************************************************** */
+
+#include <boost/multi_array.hpp>
+#include <memory>
+
+#include "xios.hpp"
+
+#include "object_template.hpp"
+#include "group_template.hpp"
+#include "attribute_template.hpp"
+
+#include "icutil.hpp"
+#include "timer.hpp"
+#include "duplicate_scalar_to_axis.hpp"
+
+extern "C"
+{
+// /////////////////////////////// DÃ©finitions ////////////////////////////// //
+
+   // ----------------------- RedÃ©finition de types ----------------------------
+
+   typedef xios::CDuplicateScalarToAxis      * XDuplicateScalarToAxisPtr;
+   
+   // ------------------------ CrÃ©ation des handle -----------------------------
+   void cxios_duplicate_scalar_to_axis_handle_create(XDuplicateScalarToAxisPtr * _ret, const char * _id, int _id_len)
+   TRY
+   {
+      std::string id;
+      if (!cstr2string(_id, _id_len, id)) return;
+      CTimer::get("XIOS").resume() ;
+      *_ret = xios::CDuplicateScalarToAxis::get(id);
+      CTimer::get("XIOS").suspend() ;
+   }
+   CATCH_DUMP_STACK
+
+   // -------------------- VÃ©rification des identifiants -----------------------
+   void cxios_duplicate_scalar_to_axis_valid_id(bool * _ret, const char * _id, int _id_len)
+   TRY
+   {
+      std::string id;
+      if (!cstr2string(_id, _id_len, id)) return;
+
+      CTimer::get("XIOS").resume() ;
+      *_ret = xios::CDuplicateScalarToAxis::has(id);
+      CTimer::get("XIOS").suspend() ;
+   }
+   CATCH_DUMP_STACK
+
+} // extern "C"
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/c/icduration.cpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/c/icduration.cpp	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/c/icduration.cpp	(revision 1749)
@@ -0,0 +1,89 @@
+#include "xios.hpp"
+
+#include "icutil.hpp"
+#include "icdate.hpp"
+#include "calendar_util.hpp"
+
+extern "C"
+{
+  void cxios_duration_convert_to_string(cxios_duration dur_c, char* str, int str_size)
+  TRY
+  {
+    xios::CDuration dur( dur_c.year, dur_c.month, dur_c.day, dur_c.hour, dur_c.minute, dur_c.second, dur_c.timestep );
+
+    if (!string_copy(dur.toString(), str, str_size))
+      ERROR("void cxios_duration_convert_to_string(cxios_duration dur_c, char* str, int str_size)", << "Input string is too short");
+  }
+  CATCH_DUMP_STACK
+
+  cxios_duration cxios_duration_convert_from_string(const char* str, int str_size)
+  TRY
+  {
+    std::string dur_str;
+    xios::CDuration dur;
+
+    if (cstr2string(str, str_size, dur_str))
+      dur = xios::CDuration::FromString(dur_str);
+
+    return { dur.year, dur.month, dur.day, dur.hour, dur.minute, dur.second, dur.timestep };
+  }
+  CATCH_DUMP_STACK
+
+  cxios_duration cxios_duration_add(cxios_duration dur1_c, cxios_duration dur2_c)
+  TRY
+  {
+    xios::CDuration dur1( dur1_c.year, dur1_c.month, dur1_c.day, dur1_c.hour, dur1_c.minute, dur1_c.second, dur1_c.timestep );
+    xios::CDuration dur2( dur2_c.year, dur2_c.month, dur2_c.day, dur2_c.hour, dur2_c.minute, dur2_c.second, dur2_c.timestep );
+
+    xios::CDuration res = dur1 + dur2;
+    return { res.year, res.month, res.day, res.hour, res.minute, res.second, res.timestep };
+  }
+  CATCH_DUMP_STACK
+
+  cxios_duration cxios_duration_sub(cxios_duration dur1_c, cxios_duration dur2_c)
+  TRY
+  {
+    xios::CDuration dur1( dur1_c.year, dur1_c.month, dur1_c.day, dur1_c.hour, dur1_c.minute, dur1_c.second, dur1_c.timestep );
+    xios::CDuration dur2( dur2_c.year, dur2_c.month, dur2_c.day, dur2_c.hour, dur2_c.minute, dur2_c.second, dur2_c.timestep );
+
+    xios::CDuration res = dur1 - dur2;
+    return { res.year, res.month, res.day, res.hour, res.minute, res.second, res.timestep };
+  }
+  CATCH_DUMP_STACK
+
+  cxios_duration cxios_duration_mult(double val, cxios_duration dur_c)
+  TRY
+  {
+    xios::CDuration dur( dur_c.year, dur_c.month, dur_c.day, dur_c.hour, dur_c.minute, dur_c.second, dur_c.timestep );
+    xios::CDuration res = val * dur;
+    return { res.year, res.month, res.day, res.hour, res.minute, res.second, res.timestep };
+  }
+  CATCH_DUMP_STACK
+
+  cxios_duration cxios_duration_neg(cxios_duration dur_c)
+  TRY
+  {
+    xios::CDuration dur( dur_c.year, dur_c.month, dur_c.day, dur_c.hour, dur_c.minute, dur_c.second, dur_c.timestep );
+    xios::CDuration res = -dur;
+    return { res.year, res.month, res.day, res.hour, res.minute, res.second, res.timestep };
+  }
+  CATCH_DUMP_STACK
+
+  bool cxios_duration_eq(cxios_duration dur1_c, cxios_duration dur2_c)
+  TRY
+  {
+    xios::CDuration dur1( dur1_c.year, dur1_c.month, dur1_c.day, dur1_c.hour, dur1_c.minute, dur1_c.second, dur1_c.timestep );
+    xios::CDuration dur2( dur2_c.year, dur2_c.month, dur2_c.day, dur2_c.hour, dur2_c.minute, dur2_c.second, dur2_c.timestep );
+    return (dur1 == dur2);
+  }
+  CATCH_DUMP_STACK
+
+  bool cxios_duration_neq(cxios_duration dur1_c, cxios_duration dur2_c)
+  TRY
+  {
+    xios::CDuration dur1( dur1_c.year, dur1_c.month, dur1_c.day, dur1_c.hour, dur1_c.minute, dur1_c.second, dur1_c.timestep );
+    xios::CDuration dur2( dur2_c.year, dur2_c.month, dur2_c.day, dur2_c.hour, dur2_c.minute, dur2_c.second, dur2_c.timestep );
+    return (dur1 != dur2);
+  }
+  CATCH_DUMP_STACK
+}
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/c/icexpand_domain.cpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/c/icexpand_domain.cpp	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/c/icexpand_domain.cpp	(revision 1749)
@@ -0,0 +1,51 @@
+/* ************************************************************************** *
+ *      Copyright Â© IPSL/LSCE, xios, Avril 2010 - Octobre 2011         *
+ * ************************************************************************** */
+
+#include <boost/multi_array.hpp>
+
+#include <memory>
+
+#include "xios.hpp"
+
+#include "object_template.hpp"
+#include "group_template.hpp"
+#include "attribute_template.hpp"
+
+#include "icutil.hpp"
+#include "timer.hpp"
+#include "expand_domain.hpp"
+
+extern "C"
+{
+// /////////////////////////////// DÃ©finitions ////////////////////////////// //
+
+   // ----------------------- RedÃ©finition de types ----------------------------
+
+   typedef xios::CExpandDomain   * XExpandDomainPtr;
+
+   // ------------------------ CrÃ©ation des handle -----------------------------
+   void cxios_expand_domain_handle_create(XExpandDomainPtr * _ret, const char * _id, int _id_len)
+   TRY
+   {
+      std::string id;
+      if (!cstr2string(_id, _id_len, id)) return;
+      CTimer::get("XIOS").resume() ;
+      *_ret = xios::CExpandDomain::get(id);
+      CTimer::get("XIOS").suspend() ;
+   }
+   CATCH_DUMP_STACK
+
+   // -------------------- VÃ©rification des identifiants -----------------------
+   void cxios_expand_domain_valid_id(bool * _ret, const char * _id, int _id_len)
+   TRY
+   {
+      std::string id;
+      if (!cstr2string(_id, _id_len, id)) return;
+
+      CTimer::get("XIOS").resume() ;
+      *_ret = xios::CExpandDomain::has(id);
+      CTimer::get("XIOS").suspend() ;
+   }
+   CATCH_DUMP_STACK
+} // extern "C"
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/c/icextract_to_axis.cpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/c/icextract_to_axis.cpp	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/c/icextract_to_axis.cpp	(revision 1749)
@@ -0,0 +1,51 @@
+/* ************************************************************************** *
+ *      Copyright Â© IPSL/LSCE, xios, Avril 2010 - Octobre 2011         *
+ * ************************************************************************** */
+
+#include <boost/multi_array.hpp>
+#include <memory>
+
+#include "xios.hpp"
+
+#include "object_template.hpp"
+#include "group_template.hpp"
+#include "attribute_template.hpp"
+
+#include "icutil.hpp"
+#include "timer.hpp"
+#include "extract_domain_to_axis.hpp"
+
+extern "C"
+{
+// /////////////////////////////// DÃ©finitions ////////////////////////////// //
+
+   // ----------------------- RedÃ©finition de types ----------------------------
+
+   typedef xios::CExtractDomainToAxis      * XExtractDomainToAxisPtr;
+   
+   // ------------------------ CrÃ©ation des handle -----------------------------
+   void cxios_extract_domain_to_axis_handle_create(XExtractDomainToAxisPtr * _ret, const char * _id, int _id_len)
+   TRY
+   {
+      std::string id;
+      if (!cstr2string(_id, _id_len, id)) return;
+      CTimer::get("XIOS").resume() ;
+      *_ret = xios::CExtractDomainToAxis::get(id);
+      CTimer::get("XIOS").suspend() ;
+   }
+   CATCH_DUMP_STACK
+
+   // -------------------- VÃ©rification des identifiants -----------------------
+   void cxios_extract_domain_to_axis_valid_id(bool * _ret, const char * _id, int _id_len)
+   TRY
+   {
+      std::string id;
+      if (!cstr2string(_id, _id_len, id)) return;
+
+      CTimer::get("XIOS").resume() ;
+      *_ret = xios::CExtractDomainToAxis::has(id);
+      CTimer::get("XIOS").suspend() ;
+   }
+   CATCH_DUMP_STACK
+
+} // extern "C"
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/c/icextract_to_scalar.cpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/c/icextract_to_scalar.cpp	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/c/icextract_to_scalar.cpp	(revision 1749)
@@ -0,0 +1,51 @@
+/* ************************************************************************** *
+ *      Copyright Â© IPSL/LSCE, xios, Avril 2010 - Octobre 2011         *
+ * ************************************************************************** */
+
+#include <boost/multi_array.hpp>
+#include <memory>
+
+#include "xios.hpp"
+
+#include "object_template.hpp"
+#include "group_template.hpp"
+#include "attribute_template.hpp"
+
+#include "icutil.hpp"
+#include "timer.hpp"
+#include "extract_axis_to_scalar.hpp"
+
+extern "C"
+{
+// /////////////////////////////// DÃ©finitions ////////////////////////////// //
+
+   // ----------------------- RedÃ©finition de types ----------------------------
+
+   typedef xios::CExtractAxisToScalar      * XExtractAxisToScalarPtr;
+   
+   // ------------------------ CrÃ©ation des handle -----------------------------
+   void cxios_extract_axis_to_scalar_handle_create(XExtractAxisToScalarPtr * _ret, const char * _id, int _id_len)
+   TRY
+   {
+      std::string id;
+      if (!cstr2string(_id, _id_len, id)) return;
+      CTimer::get("XIOS").resume() ;
+      *_ret = xios::CExtractAxisToScalar::get(id);
+      CTimer::get("XIOS").suspend() ;
+   }
+   CATCH_DUMP_STACK
+
+   // -------------------- VÃ©rification des identifiants -----------------------
+   void cxios_extract_axis_to_scalar_valid_id(bool * _ret, const char * _id, int _id_len)
+   TRY
+   {
+      std::string id;
+      if (!cstr2string(_id, _id_len, id)) return;
+
+      CTimer::get("XIOS").resume() ;
+      *_ret = xios::CExtractAxisToScalar::has(id);
+      CTimer::get("XIOS").suspend() ;
+   }
+   CATCH_DUMP_STACK
+
+} // extern "C"
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/c/icfield.cpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/c/icfield.cpp	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/c/icfield.cpp	(revision 1749)
@@ -0,0 +1,124 @@
+/* ************************************************************************** *
+ *      Copyright Â© IPSL/LSCE, xios, Avril 2010 - Octobre 2011         *
+ * ************************************************************************** */
+
+#include <boost/multi_array.hpp>
+
+#include <memory>
+
+#include "xios.hpp"
+
+#include "attribute_template.hpp"
+#include "object_template.hpp"
+#include "group_template.hpp"
+
+#include "icutil.hpp"
+#include "timer.hpp"
+#include "field.hpp"
+
+extern "C"
+{
+// /////////////////////////////// DÃ©finitions ////////////////////////////// //
+
+   // ----------------------- RedÃ©finition de types ----------------------------
+   
+   typedef xios::CField      * XFieldPtr;
+   typedef xios::CFieldGroup * XFieldGroupPtr;
+   
+   typedef xios::CDomain     * XDomainPtr;
+   typedef xios::CAxis       * XAxisPtr;
+   typedef xios::CScalar     * XScalarPtr;
+
+// --------------------------------------------------------------------------   
+// ------------------------ CrÃ©ation des handle -----------------------------
+// --------------------------------------------------------------------------   
+   
+   void cxios_field_handle_create (XFieldPtr * _ret, const char * _id, int _id_len)
+   TRY
+   {
+      std::string id; 
+      if (!cstr2string(_id, _id_len, id)) return;
+      CTimer::get("XIOS").resume() ;
+      *_ret = CField::get(id);
+      CTimer::get("XIOS").suspend() ;
+   }
+   CATCH_DUMP_STACK
+   
+   void cxios_fieldgroup_handle_create (XFieldGroupPtr * _ret, const char * _id, int _id_len)
+   TRY
+   {
+      std::string id; 
+      if (!cstr2string(_id, _id_len, id)) return;
+      CTimer::get("XIOS").resume() ;
+      *_ret = CFieldGroup::get(id);
+      CTimer::get("XIOS").suspend() ;
+   }
+   CATCH_DUMP_STACK
+
+   // -------------------- VÃ©rification des identifiants -----------------------
+
+   void cxios_field_valid_id (bool * _ret, const char * _id, int _id_len)
+   TRY
+   {
+      std::string id;
+      if (!cstr2string(_id, _id_len, id)) return;
+      CTimer::get("XIOS").resume() ;
+      *_ret = CField::has(id);
+      CTimer::get("XIOS").suspend() ;
+   }
+   CATCH_DUMP_STACK
+
+   void cxios_fieldgroup_valid_id (bool * _ret, const char * _id, int _id_len)
+   TRY
+   {
+      std::string id;
+      if (!cstr2string(_id, _id_len, id)) return;
+      CTimer::get("XIOS").resume() ;
+      *_ret = CFieldGroup::has(id);
+      CTimer::get("XIOS").suspend() ;
+   }
+   CATCH_DUMP_STACK
+
+// -----------------------------------------------------------------------------------------------------   
+// ------------------------- Other functions
+// -----------------------------------------------------------------------------------------------------   
+
+  void cxios_field_is_active (XFieldPtr field_hdl, bool at_current_timestep, bool* ret)
+  TRY
+  {
+    CTimer::get("XIOS").resume() ;
+    *ret = field_hdl->isActive(at_current_timestep);
+    CTimer::get("XIOS").suspend() ;
+  }
+  CATCH_DUMP_STACK
+
+// -----------------------------------------------------------------------------------------------------
+// ------------------------- Retrieving information of grid associated to field
+// -----------------------------------------------------------------------------------------------------
+  void cxios_field_get_domain_handle(XDomainPtr * domain_hdl_ret, XFieldPtr field_hdl, int domainIndex)
+  TRY
+  {
+     CTimer::get("XIOS").resume() ;
+     *domain_hdl_ret = field_hdl->grid->getDomain(domainIndex);
+     CTimer::get("XIOS").suspend();
+  }
+  CATCH_DUMP_STACK
+
+  void cxios_field_get_axis_handle(XAxisPtr * axis_hdl_ret, XFieldPtr field_hdl, int axisIndex)
+  TRY
+  {
+     CTimer::get("XIOS").resume() ;
+     *axis_hdl_ret = field_hdl->grid->getAxis(axisIndex);
+     CTimer::get("XIOS").suspend();
+  }
+  CATCH_DUMP_STACK
+
+  void cxios_field_get_scalar_handle(XScalarPtr * scalar_hdl_ret, XFieldPtr field_hdl, int scalarIndex)
+  TRY
+  {
+     CTimer::get("XIOS").resume() ;
+     *scalar_hdl_ret = field_hdl->grid->getScalar(scalarIndex);
+     CTimer::get("XIOS").suspend();
+  }
+  CATCH_DUMP_STACK
+} // extern "C"
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/c/icfile.cpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/c/icfile.cpp	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/c/icfile.cpp	(revision 1749)
@@ -0,0 +1,74 @@
+/* ************************************************************************** *
+ *      Copyright Â© IPSL/LSCE, xios, Avril 2010 - Octobre 2011         *
+ * ************************************************************************** */
+
+#include <boost/multi_array.hpp>
+#include <memory>
+
+#include "xios.hpp"
+
+#include "attribute_template.hpp"
+#include "object_template.hpp"
+#include "group_template.hpp"
+
+#include "icutil.hpp"
+#include "timer.hpp"
+#include "file.hpp"
+
+extern "C"
+{
+// /////////////////////////////// DÃ©finitions ////////////////////////////// //
+
+   // ----------------------- RedÃ©finition de types ----------------------------
+   
+   typedef xios::CFile      * XFilePtr;
+   typedef xios::CFileGroup * XFileGroupPtr;
+
+   // ------------------------ CrÃ©ation des handle -----------------------------
+   
+   void cxios_file_handle_create (XFilePtr * _ret, const char * _id, int _id_len)
+   TRY
+   {
+      std::string id; 
+      if (!cstr2string(_id, _id_len, id)) return;
+      CTimer::get("XIOS").resume() ;
+      *_ret = CFile::get(id);
+      CTimer::get("XIOS").suspend() ;
+   }
+   CATCH_DUMP_STACK
+   
+   void cxios_filegroup_handle_create (XFileGroupPtr * _ret, const char * _id, int _id_len)
+   TRY
+   {
+      std::string id; 
+      if (!cstr2string(_id, _id_len, id)) return;
+      CTimer::get("XIOS").resume() ;
+      *_ret = CFileGroup::get(id);
+      CTimer::get("XIOS").suspend() ;
+   }
+   CATCH_DUMP_STACK
+
+   // -------------------- VÃ©rification des identifiants -----------------------
+
+   void cxios_file_valid_id (bool * _ret, const char * _id, int _id_len)
+   TRY
+   {
+      std::string id;
+      if (!cstr2string(_id, _id_len, id)) return;
+      CTimer::get("XIOS").resume() ;
+      *_ret = CFile::has(id);
+      CTimer::get("XIOS").suspend() ;
+   }
+   CATCH_DUMP_STACK
+
+   void cxios_filegroup_valid_id (bool * _ret, const char * _id, int _id_len)
+   TRY
+   {
+      std::string id;
+      if (!cstr2string(_id, _id_len, id)) return;
+      CTimer::get("XIOS").resume() ;
+      *_ret = CFileGroup::has(id);
+      CTimer::get("XIOS").suspend() ;
+   }
+   CATCH_DUMP_STACK
+} // extern "C"
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/c/icgenerate_rectilinear_domain.cpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/c/icgenerate_rectilinear_domain.cpp	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/c/icgenerate_rectilinear_domain.cpp	(revision 1749)
@@ -0,0 +1,51 @@
+/* ************************************************************************** *
+ *      Copyright Â© IPSL/LSCE, xios, Avril 2010 - Octobre 2011         *
+ * ************************************************************************** */
+
+#include <boost/multi_array.hpp>
+
+#include <memory>
+
+#include "xios.hpp"
+
+#include "object_template.hpp"
+#include "group_template.hpp"
+#include "attribute_template.hpp"
+
+#include "icutil.hpp"
+#include "timer.hpp"
+#include "generate_rectilinear_domain.hpp"
+
+extern "C"
+{
+// /////////////////////////////// DÃ©finitions ////////////////////////////// //
+
+   // ----------------------- RedÃ©finition de types ----------------------------
+
+   typedef xios::CGenerateRectilinearDomain   * XGenDomainPtr;
+
+   // ------------------------ CrÃ©ation des handle -----------------------------
+   void cxios_generate_rectilinear_domain_handle_create(XGenDomainPtr * _ret, const char * _id, int _id_len)
+   TRY
+   {
+      std::string id;
+      if (!cstr2string(_id, _id_len, id)) return;
+      CTimer::get("XIOS").resume() ;
+      *_ret = xios::CGenerateRectilinearDomain::get(id);
+      CTimer::get("XIOS").suspend() ;
+   }
+   CATCH_DUMP_STACK
+
+   // -------------------- VÃ©rification des identifiants -----------------------
+   void cxios_generate_rectilinear_domain_valid_id(bool * _ret, const char * _id, int _id_len)
+   TRY
+   {
+      std::string id;
+      if (!cstr2string(_id, _id_len, id)) return;
+
+      CTimer::get("XIOS").resume() ;
+      *_ret = xios::CGenerateRectilinearDomain::has(id);
+      CTimer::get("XIOS").suspend() ;
+   }
+   CATCH_DUMP_STACK
+} // extern "C"
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/c/icgrid.cpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/c/icgrid.cpp	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/c/icgrid.cpp	(revision 1749)
@@ -0,0 +1,73 @@
+/* ************************************************************************** *
+ *      Copyright Â© IPSL/LSCE, xios, Avril 2010 - Octobre 2011         *
+ * ************************************************************************** */
+
+#include <boost/multi_array.hpp>
+
+#include "xios.hpp"
+
+#include "attribute_template.hpp"
+#include "object_template.hpp"
+#include "group_template.hpp"
+
+#include "icutil.hpp"
+#include "timer.hpp"
+#include "grid.hpp"
+
+extern "C"
+{
+// /////////////////////////////// DÃ©finitions ////////////////////////////// //
+
+   // ----------------------- RedÃ©finition de types ----------------------------
+   
+   typedef xios::CGrid      * XGridPtr;
+   typedef xios::CGridGroup * XGridGroupPtr;
+
+   // ------------------------ CrÃ©ation des handle -----------------------------
+  
+   void cxios_grid_handle_create (XGridPtr * _ret, const char * _id, int _id_len)
+   TRY
+   {
+      std::string id; 
+      if (!cstr2string(_id, _id_len, id)) return;
+      CTimer::get("XIOS").resume() ;
+      *_ret = CGrid::get(id);
+      CTimer::get("XIOS").suspend() ;
+   }
+   CATCH_DUMP_STACK
+   
+   void cxios_gridgroup_handle_create (XGridGroupPtr * _ret, const char * _id, int _id_len)
+   TRY
+   {
+      std::string id; 
+      if (!cstr2string(_id, _id_len, id)) return;
+      CTimer::get("XIOS").resume() ;
+      *_ret = CGridGroup::get(id);
+      CTimer::get("XIOS").suspend() ;
+   }
+   CATCH_DUMP_STACK
+
+   // -------------------- VÃ©rification des identifiants -----------------------
+
+   void cxios_grid_valid_id (bool * _ret, const char * _id, int _id_len)
+   TRY
+   {
+      std::string id;
+      if (!cstr2string(_id, _id_len, id)) return;
+      CTimer::get("XIOS").resume() ;
+      *_ret = CGrid::has(id);
+      CTimer::get("XIOS").suspend() ;
+   }
+   CATCH_DUMP_STACK
+
+   void cxios_gridgroup_valid_id (bool * _ret, const char * _id, int _id_len)
+   TRY
+   {
+      std::string id;
+      if (!cstr2string(_id, _id_len, id)) return;
+      CTimer::get("XIOS").resume() ;
+      *_ret = CGridGroup::has(id);
+      CTimer::get("XIOS").suspend() ;
+   }
+   CATCH_DUMP_STACK
+} // extern "C"
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/c/icinterpolate.cpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/c/icinterpolate.cpp	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/c/icinterpolate.cpp	(revision 1749)
@@ -0,0 +1,76 @@
+/* ************************************************************************** *
+ *      Copyright Â© IPSL/LSCE, xios, Avril 2010 - Octobre 2011         *
+ * ************************************************************************** */
+
+#include <boost/multi_array.hpp>
+
+#include "xios.hpp"
+
+#include "object_template.hpp"
+#include "group_template.hpp"
+#include "attribute_template.hpp"
+
+#include "icutil.hpp"
+#include "timer.hpp"
+#include "interpolate_domain.hpp"
+#include "interpolate_axis.hpp"
+
+extern "C"
+{
+// /////////////////////////////// DÃ©finitions ////////////////////////////// //
+
+   // ----------------------- RedÃ©finition de types ----------------------------
+
+   typedef xios::CInterpolateDomain    * XInterpolateDomainPtr;
+   typedef xios::CInterpolateAxis      * XInterpolateAxisPtr;
+
+   // ------------------------ CrÃ©ation des handle -----------------------------
+   void cxios_interpolate_domain_handle_create(XInterpolateDomainPtr * _ret, const char * _id, int _id_len)
+   TRY
+   {
+      std::string id;
+      if (!cstr2string(_id, _id_len, id)) return;
+      CTimer::get("XIOS").resume() ;
+      *_ret = xios::CInterpolateDomain::get(id);
+      CTimer::get("XIOS").suspend() ;
+   }
+   CATCH_DUMP_STACK
+
+   // -------------------- VÃ©rification des identifiants -----------------------
+   void cxios_interpolate_domain_valid_id(bool * _ret, const char * _id, int _id_len)
+   TRY
+   {
+      std::string id;
+      if (!cstr2string(_id, _id_len, id)) return;
+
+      CTimer::get("XIOS").resume() ;
+      *_ret = xios::CInterpolateDomain::has(id);
+      CTimer::get("XIOS").suspend() ;
+   }
+   CATCH_DUMP_STACK
+
+    // ------------------------ CrÃ©ation des handle -----------------------------
+   void cxios_interpolate_axis_handle_create(XInterpolateAxisPtr * _ret, const char * _id, int _id_len)
+   TRY
+   {
+      std::string id;
+      if (!cstr2string(_id, _id_len, id)) return;
+      CTimer::get("XIOS").resume() ;
+      *_ret = xios::CInterpolateAxis::get(id);
+      CTimer::get("XIOS").suspend() ;
+   }
+   CATCH_DUMP_STACK
+
+   // -------------------- VÃ©rification des identifiants -----------------------
+   void cxios_interpolate_axis_valid_id(bool * _ret, const char * _id, int _id_len)
+   TRY
+   {
+      std::string id;
+      if (!cstr2string(_id, _id_len, id)) return;
+
+      CTimer::get("XIOS").resume() ;
+      *_ret = xios::CInterpolateAxis::has(id);
+      CTimer::get("XIOS").suspend() ;
+   }
+   CATCH_DUMP_STACK
+} // extern "C"
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/c/icinverse_axis.cpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/c/icinverse_axis.cpp	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/c/icinverse_axis.cpp	(revision 1749)
@@ -0,0 +1,51 @@
+/* ************************************************************************** *
+ *      Copyright Â© IPSL/LSCE, xios, Avril 2010 - Octobre 2011         *
+ * ************************************************************************** */
+
+#include <boost/multi_array.hpp>
+
+#include <memory>
+
+#include "xios.hpp"
+
+#include "object_template.hpp"
+#include "group_template.hpp"
+#include "attribute_template.hpp"
+
+#include "icutil.hpp"
+#include "timer.hpp"
+#include "inverse_axis.hpp"
+
+extern "C"
+{
+// /////////////////////////////// DÃ©finitions ////////////////////////////// //
+
+   // ----------------------- RedÃ©finition de types ----------------------------
+
+   typedef xios::CInverseAxis      * XInverseAxisPtr;
+
+   // ------------------------ CrÃ©ation des handle -----------------------------
+   void cxios_inverse_axis_handle_create(XInverseAxisPtr * _ret, const char * _id, int _id_len)
+   TRY
+   {
+      std::string id;
+      if (!cstr2string(_id, _id_len, id)) return;
+      CTimer::get("XIOS").resume() ;
+      *_ret = xios::CInverseAxis::get(id);
+      CTimer::get("XIOS").suspend() ;
+   }
+   CATCH_DUMP_STACK
+
+   // -------------------- VÃ©rification des identifiants -----------------------
+   void cxios_inverse_axis_valid_id(bool * _ret, const char * _id, int _id_len)
+   TRY
+   {
+      std::string id;
+      if (!cstr2string(_id, _id_len, id)) return;
+
+      CTimer::get("XIOS").resume() ;
+      *_ret = xios::CInverseAxis::has(id);
+      CTimer::get("XIOS").suspend() ;
+   }
+   CATCH_DUMP_STACK
+} // extern "C"
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/c/icreduce_axis_to_axis.cpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/c/icreduce_axis_to_axis.cpp	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/c/icreduce_axis_to_axis.cpp	(revision 1749)
@@ -0,0 +1,52 @@
+/* ************************************************************************** *
+ *      Copyright Â© IPSL/LSCE, xios, Avril 2010 - Octobre 2011         *
+ * ************************************************************************** */
+
+#include <boost/multi_array.hpp>
+
+#include <memory>
+
+#include "xios.hpp"
+
+#include "object_template.hpp"
+#include "group_template.hpp"
+#include "attribute_template.hpp"
+
+#include "icutil.hpp"
+#include "timer.hpp"
+#include "reduce_axis_to_axis.hpp"
+
+extern "C"
+{
+// /////////////////////////////// DÃ©finitions ////////////////////////////// //
+
+   // ----------------------- RedÃ©finition de types ----------------------------
+
+   typedef xios::CReduceAxisToAxis      * XReduceAxisToAxisPtr;
+   
+   // ------------------------ CrÃ©ation des handle -----------------------------
+   void cxios_reduce_axis_to_axis_handle_create(XReduceAxisToAxisPtr * _ret, const char * _id, int _id_len)
+   TRY
+   {
+      std::string id;
+      if (!cstr2string(_id, _id_len, id)) return;
+      CTimer::get("XIOS").resume() ;
+      *_ret = xios::CReduceAxisToAxis::get(id);
+      CTimer::get("XIOS").suspend() ;
+   }
+   CATCH_DUMP_STACK
+
+   // -------------------- VÃ©rification des identifiants -----------------------
+   void cxios_reduce_axis_to_axis_valid_id(bool * _ret, const char * _id, int _id_len)
+   TRY
+   {
+      std::string id;
+      if (!cstr2string(_id, _id_len, id)) return;
+
+      CTimer::get("XIOS").resume() ;
+      *_ret = xios::CReduceAxisToAxis::has(id);
+      CTimer::get("XIOS").suspend() ;
+   }
+   CATCH_DUMP_STACK
+
+} // extern "C"
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/c/icreduce_scalar_to_scalar.cpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/c/icreduce_scalar_to_scalar.cpp	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/c/icreduce_scalar_to_scalar.cpp	(revision 1749)
@@ -0,0 +1,52 @@
+/* ************************************************************************** *
+ *      Copyright Â© IPSL/LSCE, xios, Avril 2010 - Octobre 2011         *
+ * ************************************************************************** */
+
+#include <boost/multi_array.hpp>
+
+#include <memory>
+
+#include "xios.hpp"
+
+#include "object_template.hpp"
+#include "group_template.hpp"
+#include "attribute_template.hpp"
+
+#include "icutil.hpp"
+#include "timer.hpp"
+#include "reduce_scalar_to_scalar.hpp"
+
+extern "C"
+{
+// /////////////////////////////// DÃ©finitions ////////////////////////////// //
+
+   // ----------------------- RedÃ©finition de types ----------------------------
+
+   typedef xios::CReduceScalarToScalar      * XReduceScalarToScalarPtr;
+   
+   // ------------------------ CrÃ©ation des handle -----------------------------
+   void cxios_reduce_scalar_to_scalar_handle_create(XReduceScalarToScalarPtr * _ret, const char * _id, int _id_len)
+   TRY
+   {
+      std::string id;
+      if (!cstr2string(_id, _id_len, id)) return;
+      CTimer::get("XIOS").resume() ;
+      *_ret = xios::CReduceScalarToScalar::get(id);
+      CTimer::get("XIOS").suspend() ;
+   }
+   CATCH_DUMP_STACK
+
+   // -------------------- VÃ©rification des identifiants -----------------------
+   void cxios_reduce_scalar_to_scalar_valid_id(bool * _ret, const char * _id, int _id_len)
+   TRY
+   {
+      std::string id;
+      if (!cstr2string(_id, _id_len, id)) return;
+
+      CTimer::get("XIOS").resume() ;
+      *_ret = xios::CReduceScalarToScalar::has(id);
+      CTimer::get("XIOS").suspend() ;
+   }
+   CATCH_DUMP_STACK
+
+} // extern "C"
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/c/icreduce_to_axis.cpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/c/icreduce_to_axis.cpp	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/c/icreduce_to_axis.cpp	(revision 1749)
@@ -0,0 +1,52 @@
+/* ************************************************************************** *
+ *      Copyright Â© IPSL/LSCE, xios, Avril 2010 - Octobre 2011         *
+ * ************************************************************************** */
+
+#include <boost/multi_array.hpp>
+
+#include <memory>
+
+#include "xios.hpp"
+
+#include "object_template.hpp"
+#include "group_template.hpp"
+#include "attribute_template.hpp"
+
+#include "icutil.hpp"
+#include "timer.hpp"
+#include "reduce_domain_to_axis.hpp"
+
+extern "C"
+{
+// /////////////////////////////// DÃ©finitions ////////////////////////////// //
+
+   // ----------------------- RedÃ©finition de types ----------------------------
+
+   typedef xios::CReduceDomainToAxis      * XReduceDomainToAxisPtr;
+   
+   // ------------------------ CrÃ©ation des handle -----------------------------
+   void cxios_reduce_domain_to_axis_handle_create(XReduceDomainToAxisPtr * _ret, const char * _id, int _id_len)
+   TRY
+   {
+      std::string id;
+      if (!cstr2string(_id, _id_len, id)) return;
+      CTimer::get("XIOS").resume() ;
+      *_ret = xios::CReduceDomainToAxis::get(id);
+      CTimer::get("XIOS").suspend() ;
+   }
+   CATCH_DUMP_STACK
+
+   // -------------------- VÃ©rification des identifiants -----------------------
+   void cxios_reduce_domain_to_axis_valid_id(bool * _ret, const char * _id, int _id_len)
+   TRY
+   {
+      std::string id;
+      if (!cstr2string(_id, _id_len, id)) return;
+
+      CTimer::get("XIOS").resume() ;
+      *_ret = xios::CReduceDomainToAxis::has(id);
+      CTimer::get("XIOS").suspend() ;
+   }
+   CATCH_DUMP_STACK
+
+} // extern "C"
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/c/icreduce_to_scalar.cpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/c/icreduce_to_scalar.cpp	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/c/icreduce_to_scalar.cpp	(revision 1749)
@@ -0,0 +1,76 @@
+/* ************************************************************************** *
+ *      Copyright Â© IPSL/LSCE, xios, Avril 2010 - Octobre 2011         *
+ * ************************************************************************** */
+
+#include <boost/multi_array.hpp>
+
+#include "xios.hpp"
+
+#include "object_template.hpp"
+#include "group_template.hpp"
+#include "attribute_template.hpp"
+
+#include "icutil.hpp"
+#include "timer.hpp"
+#include "reduce_axis_to_scalar.hpp"
+#include "reduce_domain_to_scalar.hpp"
+
+extern "C"
+{
+// /////////////////////////////// DÃ©finitions ////////////////////////////// //
+
+   // ----------------------- RedÃ©finition de types ----------------------------
+
+   typedef xios::CReduceAxisToScalar      * XReduceAxisToScalarPtr;
+   typedef xios::CReduceDomainToScalar    * XReduceDomainToScalarPtr;
+
+   // ------------------------ CrÃ©ation des handle -----------------------------
+   void cxios_reduce_axis_to_scalar_handle_create(XReduceAxisToScalarPtr * _ret, const char * _id, int _id_len)
+   TRY
+   {
+      std::string id;
+      if (!cstr2string(_id, _id_len, id)) return;
+      CTimer::get("XIOS").resume() ;
+      *_ret = xios::CReduceAxisToScalar::get(id);
+      CTimer::get("XIOS").suspend() ;
+   }
+   CATCH_DUMP_STACK
+
+   // -------------------- VÃ©rification des identifiants -----------------------
+   void cxios_reduce_axis_to_scalar_valid_id(bool * _ret, const char * _id, int _id_len)
+   TRY
+   {
+      std::string id;
+      if (!cstr2string(_id, _id_len, id)) return;
+
+      CTimer::get("XIOS").resume() ;
+      *_ret = xios::CReduceAxisToScalar::has(id);
+      CTimer::get("XIOS").suspend() ;
+   }
+   CATCH_DUMP_STACK
+
+   void cxios_reduce_domain_to_scalar_handle_create(XReduceDomainToScalarPtr * _ret, const char * _id, int _id_len)
+   TRY
+   {
+      std::string id;
+      if (!cstr2string(_id, _id_len, id)) return;
+      CTimer::get("XIOS").resume() ;
+      *_ret = xios::CReduceDomainToScalar::get(id);
+      CTimer::get("XIOS").suspend() ;
+   }
+   CATCH_DUMP_STACK
+
+   // -------------------- VÃ©rification des identifiants -----------------------
+   void cxios_reduce_domain_to_scalar_valid_id(bool * _ret, const char * _id, int _id_len)
+   TRY
+   {
+      std::string id;
+      if (!cstr2string(_id, _id_len, id)) return;
+
+      CTimer::get("XIOS").resume() ;
+      *_ret = xios::CReduceDomainToScalar::has(id);
+      CTimer::get("XIOS").suspend() ;
+   }
+   CATCH_DUMP_STACK
+
+} // extern "C"
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/c/icreorder_domain.cpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/c/icreorder_domain.cpp	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/c/icreorder_domain.cpp	(revision 1749)
@@ -0,0 +1,51 @@
+/* ************************************************************************** *
+ *      Copyright Â© IPSL/LSCE, xios, Avril 2010 - Octobre 2011         *
+ * ************************************************************************** */
+
+#include <boost/multi_array.hpp>
+
+#include <memory>
+
+#include "xios.hpp"
+
+#include "object_template.hpp"
+#include "group_template.hpp"
+#include "attribute_template.hpp"
+
+#include "icutil.hpp"
+#include "timer.hpp"
+#include "reorder_domain.hpp"
+
+extern "C"
+{
+// /////////////////////////////// DÃ©finitions ////////////////////////////// //
+
+   // ----------------------- RedÃ©finition de types ----------------------------
+
+   typedef xios::CReorderDomain * XReorderDomainPtr;
+
+   // ------------------------ CrÃ©ation des handle -----------------------------
+   void cxios_reorder_domain_handle_create(XReorderDomainPtr * _ret, const char * _id, int _id_len)
+   TRY
+   {
+      std::string id;
+      if (!cstr2string(_id, _id_len, id)) return;
+      CTimer::get("XIOS").resume() ;
+      *_ret = xios::CReorderDomain::get(id);
+      CTimer::get("XIOS").suspend() ;
+   }
+   CATCH_DUMP_STACK
+
+   // -------------------- VÃ©rification des identifiants -----------------------
+   void cxios_reorder_domain_valid_id(bool * _ret, const char * _id, int _id_len)
+   TRY
+   {
+      std::string id;
+      if (!cstr2string(_id, _id_len, id)) return;
+
+      CTimer::get("XIOS").resume() ;
+      *_ret = xios::CReorderDomain::has(id);
+      CTimer::get("XIOS").suspend() ;
+   }
+   CATCH_DUMP_STACK
+} // extern "C"
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/c/icscalar.cpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/c/icscalar.cpp	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/c/icscalar.cpp	(revision 1749)
@@ -0,0 +1,78 @@
+/* ************************************************************************** *
+ *      Copyright Â© IPSL/LSCE, xios, Avril 2010 - Octobre 2011         *
+ * ************************************************************************** */
+
+#include <boost/multi_array.hpp>
+#include <memory>
+
+#include "xios.hpp"
+
+#include "object_template.hpp"
+#include "group_template.hpp"
+#include "attribute_template.hpp"
+
+#include "icutil.hpp"
+#include "timer.hpp"
+#include "scalar.hpp"
+
+extern "C"
+{
+// /////////////////////////////// DÃ©finitions ////////////////////////////// //
+
+   // ----------------------- RedÃ©finition de types ----------------------------
+
+   typedef xios::CScalar      * XScalarPtr;
+   typedef xios::CScalarGroup * XScalarGroupPtr;
+
+   // ------------------------ CrÃ©ation des handle -----------------------------
+
+   void cxios_scalar_handle_create (XScalarPtr * _ret, const char * _id, int _id_len)
+   TRY
+   {
+      std::string id;
+      if (!cstr2string(_id, _id_len, id)) return;
+      CTimer::get("XIOS").resume() ;
+      *_ret = xios::CScalar::get(id);
+      CTimer::get("XIOS").suspend() ;
+   }
+   CATCH_DUMP_STACK
+
+   void cxios_scalargroup_handle_create (XScalarGroupPtr * _ret, const char * _id, int _id_len)
+   TRY
+   {
+      std::string id;
+      if (!cstr2string(_id, _id_len, id)) return;
+      CTimer::get("XIOS").resume() ;
+      *_ret = xios::CScalarGroup::get(id);
+      CTimer::get("XIOS").suspend() ;
+    }
+   CATCH_DUMP_STACK
+
+   // -------------------- VÃ©rification des identifiants -----------------------
+
+   void cxios_scalar_valid_id (bool * _ret, const char * _id, int _id_len)
+   TRY
+   {
+      std::string id;
+      if (!cstr2string(_id, _id_len, id)) return;
+
+      CTimer::get("XIOS").resume() ;
+      *_ret = xios::CScalar::has(id);
+      CTimer::get("XIOS").suspend() ;
+   }
+   CATCH_DUMP_STACK
+
+   void cxios_scalargroup_valid_id (bool * _ret, const char * _id, int _id_len)
+   TRY
+   {
+      std::string id;
+      if (!cstr2string(_id, _id_len, id)) return;
+
+      CTimer::get("XIOS").resume() ;
+      *_ret = xios::CScalarGroup::has(id);
+      CTimer::get("XIOS").suspend() ;
+
+   }
+   CATCH_DUMP_STACK
+
+} // extern "C"
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/c/ictemporal_splitting.cpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/c/ictemporal_splitting.cpp	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/c/ictemporal_splitting.cpp	(revision 1749)
@@ -0,0 +1,52 @@
+/* ************************************************************************** *
+ *      Copyright Â© IPSL/LSCE, xios, Avril 2010 - Octobre 2011         *
+ * ************************************************************************** */
+
+#include <boost/multi_array.hpp>
+
+#include <memory>
+
+#include "xios.hpp"
+
+#include "object_template.hpp"
+#include "group_template.hpp"
+#include "attribute_template.hpp"
+
+#include "icutil.hpp"
+#include "timer.hpp"
+#include "temporal_splitting.hpp"
+
+extern "C"
+{
+// /////////////////////////////// DÃ©finitions ////////////////////////////// //
+
+   // ----------------------- RedÃ©finition de types ----------------------------
+
+   typedef xios::CTemporalSplitting      * XTemporalSplittingPtr;
+   
+   // ------------------------ CrÃ©ation des handle -----------------------------
+   void cxios_temporal_splitting_handle_create(XTemporalSplittingPtr * _ret, const char * _id, int _id_len)
+   TRY
+   {
+      std::string id;
+      if (!cstr2string(_id, _id_len, id)) return;
+      CTimer::get("XIOS").resume() ;
+      *_ret = xios::CTemporalSplitting::get(id);
+      CTimer::get("XIOS").suspend() ;
+   }
+   CATCH_DUMP_STACK
+
+   // -------------------- VÃ©rification des identifiants -----------------------
+   void cxios_temporal_splitting_valid_id(bool * _ret, const char * _id, int _id_len)
+   TRY
+   {
+      std::string id;
+      if (!cstr2string(_id, _id_len, id)) return;
+
+      CTimer::get("XIOS").resume() ;
+      *_ret = xios::CTemporalSplitting::has(id);
+      CTimer::get("XIOS").suspend() ;
+   }
+   CATCH_DUMP_STACK
+
+} // extern "C"
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/c/icutil.hpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/c/icutil.hpp	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/c/icutil.hpp	(revision 1749)
@@ -0,0 +1,44 @@
+/* ************************************************************************** *
+ *      Copyright Â© IPSL/LSCE, xios, Avril 2010 - Octobre 2011         *
+ * ************************************************************************** */
+
+
+#ifndef __ICUTIL_HPP__
+#define __ICUTIL_HPP__
+
+#include <string>
+#include <algorithm>
+
+// ///////////////////////// DÃ©finitions/DÃ©clarations /////////////////////// //
+
+inline bool cstr2string(const char* cstr, int cstr_size, std::string& str)
+{
+  if (cstr_size != -1)
+  { 
+    std::string valtemp;
+    std::size_t d, f = 0;
+
+    valtemp.append(cstr, cstr_size);
+    d = valtemp.find_first_not_of(' ');
+    f = valtemp.find_last_not_of (' ');
+    str = valtemp.substr(d, f - d + 1);
+
+    return true;
+  }
+  else
+     return false;
+}
+
+inline bool string_copy(const std::string& str, char* cstr, int cstr_size)
+{
+  if (str.size() > cstr_size)
+    return false;
+  else
+  {
+    std::fill(cstr, cstr + cstr_size, ' ');
+    str.copy(cstr, cstr_size);
+    return true;
+  }
+}
+
+#endif // __ICUTIL_HPP__
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/c/icvariable.cpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/c/icvariable.cpp	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/c/icvariable.cpp	(revision 1749)
@@ -0,0 +1,80 @@
+/* ************************************************************************** *
+ *      Copyright Â© IPSL/LSCE, xios, Avril 2010 - Octobre 2011         *
+ * ************************************************************************** */
+
+#include <boost/multi_array.hpp>
+
+#include <memory>
+
+#include "xios.hpp"
+
+#include "object_template.hpp"
+#include "group_template.hpp"
+#include "attribute_template.hpp"
+
+#include "icutil.hpp"
+#include "timer.hpp"
+#include "variable.hpp"
+
+extern "C"
+{
+// /////////////////////////////// DÃ©finitions ////////////////////////////// //
+
+   // ----------------------- RedÃ©finition de types ----------------------------
+   
+   typedef xios::CVariable      * XVariablePtr;
+   typedef xios::CVariableGroup * XVariableGroupPtr;
+
+   // ------------------------ CrÃ©ation des handle -----------------------------
+   
+   void cxios_variable_handle_create (XVariablePtr * _ret, const char * _id, int _id_len)
+   TRY
+   {
+      std::string id; 
+      if (!cstr2string(_id, _id_len, id)) return;
+      CTimer::get("XIOS").resume() ;
+      *_ret = xios::CVariable::get(id);
+      CTimer::get("XIOS").suspend() ;
+   }
+   CATCH_DUMP_STACK
+   
+   void cxios_variablegroup_handle_create (XVariableGroupPtr * _ret, const char * _id, int _id_len)
+   TRY
+   {
+      std::string id; 
+      if (!cstr2string(_id, _id_len, id)) return;
+      CTimer::get("XIOS").resume() ;
+      *_ret = xios::CVariableGroup::get(id);
+      CTimer::get("XIOS").suspend() ;
+    }
+   CATCH_DUMP_STACK
+
+   // -------------------- VÃ©rification des identifiants -----------------------
+
+   void cxios_variable_valid_id (bool * _ret, const char * _id, int _id_len)
+   TRY
+   {
+      std::string id;
+      if (!cstr2string(_id, _id_len, id)) return;
+
+      CTimer::get("XIOS").resume() ;
+      *_ret = xios::CVariable::has(id);
+      CTimer::get("XIOS").suspend() ;
+   }
+   CATCH_DUMP_STACK
+
+   void cxios_variablegroup_valid_id (bool * _ret, const char * _id, int _id_len)
+   TRY
+   {
+      std::string id;
+      if (!cstr2string(_id, _id_len, id)) return;
+
+      CTimer::get("XIOS").resume() ;
+      *_ret = xios::CVariableGroup::has(id);
+      CTimer::get("XIOS").suspend() ;
+
+   }
+   CATCH_DUMP_STACK
+   
+} // extern "C"
+
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/c/icxml_tree.cpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/c/icxml_tree.cpp	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/c/icxml_tree.cpp	(revision 1749)
@@ -0,0 +1,705 @@
+/* ************************************************************************** *
+ *      Copyright Â© IPSL/LSCE, xios, Avril 2010 - Octobre 2011         *
+ * ************************************************************************** */
+
+#include <boost/multi_array.hpp>
+#include <memory>
+
+#include "xios.hpp"
+
+#include "attribute_template.hpp"
+#include "object_template.hpp"
+#include "group_template.hpp"
+
+#include "icutil.hpp"
+#include "timer.hpp"
+#include "context.hpp"
+#include "node_type.hpp"
+
+extern "C"
+{
+// /////////////////////////////// DÃ©finitions ////////////////////////////// //
+
+   // ----------------------- RedÃ©finition de types ----------------------------
+
+   typedef xios::CContext * XContextPtr;
+
+   typedef xios::CGrid      * XGridPtr;
+   typedef xios::CGridGroup * XGridGroupPtr;
+
+   typedef xios::CFile      * XFilePtr;
+   typedef xios::CFileGroup * XFileGroupPtr;
+
+   typedef xios::CField      * XFieldPtr;
+   typedef xios::CFieldGroup * XFieldGroupPtr;
+
+   typedef xios::CDomain      * XDomainPtr;
+   typedef xios::CDomainGroup * XDomainGroupPtr;
+
+   typedef xios::CScalar      * XScalarPtr;
+   typedef xios::CScalarGroup * XScalarGroupPtr;
+
+   typedef xios::CAxis      * XAxisPtr;
+   typedef xios::CAxisGroup * XAxisGroupPtr;
+
+   typedef xios::CVariable      *  XVariablePtr;
+   typedef xios::CVariableGroup *  XVariableGroupPtr;
+
+   typedef xios::CTransformation<CDomain>   *  XTransformationDomainPtr;
+   typedef xios::CZoomDomain                *  XZoomDomainPtr;
+   typedef xios::CInterpolateDomain         *  XInterpolateDomainPtr;
+   typedef xios::CGenerateRectilinearDomain *  XGenerateRectilinearDomainPtr;
+   typedef xios::CComputeConnectivityDomain *  XComputeConnectivityDomainPtr;
+   typedef xios::CExpandDomain              *  XExpandDomainPtr;
+
+   typedef xios::CTransformation<CAxis>     *  XTransformationAxisPtr;
+   typedef xios::CZoomAxis                  *  XZoomAxisPtr;
+   typedef xios::CInterpolateAxis           *  XInterpolateAxisPtr;
+   typedef xios::CInverseAxis               *  XInverseAxisPtr;
+   typedef xios::CExtractDomainToAxis       *  XExtractDomainToAxisPtr;
+   typedef xios::CReduceDomainToAxis        *  XReduceDomainToAxisPtr;
+
+   typedef xios::CTransformation<CScalar>   *  XTransformationScalarPtr;
+   typedef xios::CReduceAxisToScalar        *  XReduceAxisToScalarPtr;
+   typedef xios::CReduceDomainToScalar      *  XReduceDomainToScalarPtr;
+   typedef xios::CExtractAxisToScalar       *  XExtractAxisToScalarPtr;
+
+
+   // ----------------------- Ajout d'enfant Ã  un parent -----------------------
+
+   void cxios_xml_tree_add_field
+      (XFieldGroupPtr  parent_, XFieldPtr * child_, const char * child_id, int child_id_size)
+   {
+      std::string child_id_str;
+      CTimer::get("XIOS").resume() ;
+      if (cstr2string(child_id, child_id_size, child_id_str))
+      {
+         *child_ = parent_->createChild(child_id_str) ;
+      }
+      else
+      {
+         *child_ = parent_->createChild() ;
+      }
+      CTimer::get("XIOS").suspend() ;
+  }
+
+   void cxios_xml_tree_add_grid
+      (XGridGroupPtr   parent_, XGridPtr * child_, const char * child_id, int child_id_size)
+   {
+      std::string child_id_str;
+      CTimer::get("XIOS").resume() ;
+      if (cstr2string(child_id, child_id_size, child_id_str))
+      {
+         *child_ = parent_->createChild(child_id_str) ;
+      }
+      else
+      {
+         *child_ = parent_->createChild() ;
+      }
+      CTimer::get("XIOS").suspend() ;
+   }
+
+   void cxios_xml_tree_add_file
+      (XFileGroupPtr parent_, XFilePtr * child_, const char * child_id, int child_id_size)
+   {
+      std::string child_id_str;
+      CTimer::get("XIOS").resume() ;
+      if (cstr2string(child_id, child_id_size, child_id_str))
+      {
+         *child_ = parent_->createChild(child_id_str) ;
+      }
+      else
+      {
+         *child_ = parent_->createChild() ;
+      }
+      CTimer::get("XIOS").suspend() ;
+   }
+
+   void cxios_xml_tree_add_axis
+      (XAxisGroupPtr parent_, XAxisPtr * child_, const char * child_id, int child_id_size)
+   {
+      std::string child_id_str;
+      CTimer::get("XIOS").resume() ;
+      if (cstr2string(child_id, child_id_size, child_id_str))
+      {
+         *child_ = parent_->createChild(child_id_str) ;
+      }
+      else
+      {
+         *child_ = parent_->createChild() ;
+      }
+      CTimer::get("XIOS").suspend() ;
+   }
+
+   void cxios_xml_tree_add_scalar
+      (XScalarGroupPtr parent_, XScalarPtr * child_, const char * child_id, int child_id_size)
+   {
+      std::string child_id_str;
+      CTimer::get("XIOS").resume() ;
+      if (cstr2string(child_id, child_id_size, child_id_str))
+      {
+         *child_ = parent_->createChild(child_id_str) ;
+      }
+      else
+      {
+         *child_ = parent_->createChild() ;
+      }
+      CTimer::get("XIOS").suspend() ;
+   }
+
+   void cxios_xml_tree_add_domain
+      (XDomainGroupPtr parent_, XDomainPtr * child_, const char * child_id, int child_id_size)
+   {
+      std::string child_id_str;
+      CTimer::get("XIOS").resume() ;
+      if (cstr2string(child_id, child_id_size, child_id_str))
+      {
+         *child_ = parent_->createChild(child_id_str) ;
+      }
+      else
+      {
+         *child_ = parent_->createChild() ;
+      }
+      CTimer::get("XIOS").suspend() ;
+   }
+
+   void cxios_xml_tree_add_fieldtofile
+      (XFilePtr parent_, XFieldPtr * child_, const char * child_id, int child_id_size)
+   {
+      std::string child_id_str;
+      CTimer::get("XIOS").resume() ;
+
+      if (cstr2string(child_id, child_id_size, child_id_str))
+      {
+         *child_ = parent_->addField(child_id_str);
+      }
+      else
+      {
+         *child_ = parent_->addField();
+      }
+      CTimer::get("XIOS").suspend() ;
+   }
+
+   void cxios_xml_tree_add_variabletofile
+      (XFilePtr parent_, XVariablePtr * child_, const char * child_id, int child_id_size)
+   {
+      std::string child_id_str;
+      CTimer::get("XIOS").resume() ;
+
+      if (cstr2string(child_id, child_id_size, child_id_str))
+      {
+         *child_ = parent_->addVariable(child_id_str);
+      }
+      else
+      {
+         *child_ = parent_->addVariable();
+      }
+      CTimer::get("XIOS").suspend() ;
+   }
+
+    void cxios_xml_tree_add_variabletofield
+      (XFieldPtr parent_, XVariablePtr * child_, const char * child_id, int child_id_size)
+   {
+      std::string child_id_str;
+      CTimer::get("XIOS").resume() ;
+
+      if (cstr2string(child_id, child_id_size, child_id_str))
+      {
+         *child_ = parent_->addVariable(child_id_str);
+      }
+      else
+      {
+         *child_ = parent_->addVariable();
+      }
+      CTimer::get("XIOS").suspend() ;
+   }
+   // ----------------------- Ajout de groupe Ã  un parent ----------------------
+
+   void cxios_xml_tree_add_fieldgroup
+      (XFieldGroupPtr  parent_, XFieldGroupPtr * child_, const char * child_id, int child_id_size)
+   {
+     std::string child_id_str;
+      CTimer::get("XIOS").resume() ;
+      if (cstr2string(child_id, child_id_size, child_id_str))
+      {
+         *child_ = parent_->createChildGroup(child_id_str) ;
+      }
+      else
+      {
+         *child_ = parent_->createChildGroup() ;
+      }
+      CTimer::get("XIOS").suspend() ;
+   }
+
+   void cxios_xml_tree_add_gridgroup
+      (XGridGroupPtr   parent_, XGridGroupPtr * child_, const char * child_id, int child_id_size)
+   {
+      std::string child_id_str;
+      CTimer::get("XIOS").resume() ;
+      if (cstr2string(child_id, child_id_size, child_id_str))
+      {
+         *child_ = parent_->createChildGroup(child_id_str) ;
+      }
+      else
+      {
+         *child_ = parent_->createChildGroup() ;
+      }
+      CTimer::get("XIOS").suspend() ;
+   }
+
+   void cxios_xml_tree_add_filegroup
+      (XFileGroupPtr parent_, XFileGroupPtr * child_, const char * child_id, int child_id_size)
+   {
+      std::string child_id_str;
+      CTimer::get("XIOS").resume() ;
+      if (cstr2string(child_id, child_id_size, child_id_str))
+      {
+         *child_ = parent_->createChildGroup(child_id_str) ;
+      }
+      else
+      {
+         *child_ = parent_->createChildGroup() ;
+      }
+      CTimer::get("XIOS").suspend() ;
+   }
+
+   void cxios_xml_tree_add_scalargroup
+      (XScalarGroupPtr parent_, XScalarGroupPtr * child_, const char * child_id, int child_id_size)
+   {
+      std::string child_id_str;
+      CTimer::get("XIOS").resume() ;
+      if (cstr2string(child_id, child_id_size, child_id_str))
+      {
+         *child_ = parent_->createChildGroup(child_id_str) ;
+      }
+      else
+      {
+         *child_ = parent_->createChildGroup() ;
+      }
+      CTimer::get("XIOS").suspend() ;
+   }
+
+   void cxios_xml_tree_add_axisgroup
+      (XAxisGroupPtr parent_, XAxisGroupPtr * child_, const char * child_id, int child_id_size)
+   {
+      std::string child_id_str;
+      CTimer::get("XIOS").resume() ;
+      if (cstr2string(child_id, child_id_size, child_id_str))
+      {
+         *child_ = parent_->createChildGroup(child_id_str) ;
+      }
+      else
+      {
+         *child_ = parent_->createChildGroup() ;
+      }
+      CTimer::get("XIOS").suspend() ;
+   }
+
+   void cxios_xml_tree_add_domaingroup
+      (XDomainGroupPtr parent_, XDomainGroupPtr * child_, const char * child_id, int child_id_size)
+   {
+      std::string child_id_str;
+      CTimer::get("XIOS").resume() ;
+      if (cstr2string(child_id, child_id_size, child_id_str))
+      {
+         *child_ = parent_->createChildGroup(child_id_str) ;
+      }
+      else
+      {
+         *child_ = parent_->createChildGroup() ;
+      }
+      CTimer::get("XIOS").suspend() ;
+   }
+
+   void cxios_xml_tree_add_fieldgrouptofile
+      (XFilePtr parent_, XFieldGroupPtr * child_, const char * child_id, int child_id_size)
+   {
+      std::string child_id_str;
+      CTimer::get("XIOS").resume() ;
+      if (cstr2string(child_id, child_id_size, child_id_str))
+      {
+         *child_ = parent_->addFieldGroup(child_id_str);
+      }
+      else
+      {
+         *child_ = parent_->addFieldGroup();
+      }
+      CTimer::get("XIOS").suspend() ;
+   }
+
+   void cxios_xml_tree_add_variablegrouptofile
+      (XFilePtr parent_, XVariableGroupPtr * child_, const char * child_id, int child_id_size)
+   {
+      std::string child_id_str;
+      CTimer::get("XIOS").resume() ;
+      if (cstr2string(child_id, child_id_size, child_id_str))
+      {
+         *child_ = parent_->addVariableGroup(child_id_str);
+      }
+      else
+      {
+         *child_ = parent_->addVariableGroup();
+      }
+      CTimer::get("XIOS").suspend() ;
+   }
+
+   void cxios_xml_tree_add_variablegrouptofield
+      (XFieldPtr parent_, XVariableGroupPtr * child_, const char * child_id, int child_id_size)
+   {
+      std::string child_id_str;
+      CTimer::get("XIOS").resume() ;
+      if (cstr2string(child_id, child_id_size, child_id_str))
+      {
+         *child_ = parent_->addVariableGroup(child_id_str);
+      }
+      else
+      {
+         *child_ = parent_->addVariableGroup();
+      }
+      CTimer::get("XIOS").suspend() ;
+   }
+
+   void cxios_xml_tree_add_scalartogrid
+      (XGridPtr parent_, XScalarPtr * child_, const char * child_id, int child_id_size)
+   {
+      std::string child_id_str;
+      CTimer::get("XIOS").resume() ;
+      if (cstr2string(child_id, child_id_size, child_id_str))
+      {
+         *child_ = parent_->addScalar(child_id_str);
+      }
+      else
+      {
+         *child_ = parent_->addScalar();
+      }
+      CTimer::get("XIOS").suspend() ;
+   }
+
+   void cxios_xml_tree_add_axistogrid
+      (XGridPtr parent_, XAxisPtr * child_, const char * child_id, int child_id_size)
+   {
+      std::string child_id_str;
+      CTimer::get("XIOS").resume() ;
+      if (cstr2string(child_id, child_id_size, child_id_str))
+      {
+         *child_ = parent_->addAxis(child_id_str);
+      }
+      else
+      {
+         *child_ = parent_->addAxis();
+      }
+      CTimer::get("XIOS").suspend() ;
+   }
+
+   void cxios_xml_tree_add_domaintogrid
+      (XGridPtr parent_, XDomainPtr * child_, const char * child_id, int child_id_size)
+   {
+      std::string child_id_str;
+      CTimer::get("XIOS").resume() ;
+      if (cstr2string(child_id, child_id_size, child_id_str))
+      {
+         *child_ = parent_->addDomain(child_id_str);
+      }
+      else
+      {
+         *child_ = parent_->addDomain();
+      }
+      CTimer::get("XIOS").suspend() ;
+   }
+
+   //---------------------------------------------------------------------------
+   //-------------------------Transformations -----------------------------------
+   //---------------------------------------------------------------------------
+   void cxios_xml_tree_add_zoomdomaintodomain
+      (XDomainPtr parent_, XZoomDomainPtr * child_, const char * child_id, int child_id_size)
+   {
+      std::string child_id_str;
+      XTransformationDomainPtr tmpChild_;
+      CTimer::get("XIOS").resume() ;
+      if (cstr2string(child_id, child_id_size, child_id_str))
+      {
+         tmpChild_ = parent_->addTransformation(TRANS_ZOOM_DOMAIN, child_id_str);
+      }
+      else
+      {
+         tmpChild_ = parent_->addTransformation(TRANS_ZOOM_DOMAIN);
+      }
+      *child_ = static_cast<XZoomDomainPtr>(tmpChild_);
+      CTimer::get("XIOS").suspend() ;
+   }
+
+   void cxios_xml_tree_add_interpolatedomaintodomain
+      (XDomainPtr parent_, XInterpolateDomainPtr * child_, const char * child_id, int child_id_size)
+   {
+      std::string child_id_str;
+      XTransformationDomainPtr tmpChild_;
+      CTimer::get("XIOS").resume() ;
+      if (cstr2string(child_id, child_id_size, child_id_str))
+      {
+         tmpChild_ = parent_->addTransformation(TRANS_INTERPOLATE_DOMAIN, child_id_str);
+      }
+      else
+      {
+         tmpChild_ = parent_->addTransformation(TRANS_INTERPOLATE_DOMAIN);
+      }
+      *child_ = static_cast<XInterpolateDomainPtr>(tmpChild_);
+      CTimer::get("XIOS").suspend() ;
+   }
+
+   void cxios_xml_tree_add_generatedomaintodomain
+      (XDomainPtr parent_, XGenerateRectilinearDomainPtr * child_, const char * child_id, int child_id_size)
+   {
+      std::string child_id_str;
+      XTransformationDomainPtr tmpChild_;
+      CTimer::get("XIOS").resume() ;
+      if (cstr2string(child_id, child_id_size, child_id_str))
+      {
+         tmpChild_ = parent_->addTransformation(TRANS_GENERATE_RECTILINEAR_DOMAIN, child_id_str);
+      }
+      else
+      {
+         tmpChild_ = parent_->addTransformation(TRANS_GENERATE_RECTILINEAR_DOMAIN);
+      }
+      *child_ = static_cast<XGenerateRectilinearDomainPtr>(tmpChild_);
+      CTimer::get("XIOS").suspend() ;
+   }
+
+   void cxios_xml_tree_add_computeconnectivitydomaintodomain
+      (XDomainPtr parent_, XComputeConnectivityDomainPtr * child_, const char * child_id, int child_id_size)
+   {
+      std::string child_id_str;
+      XTransformationDomainPtr tmpChild_;
+      CTimer::get("XIOS").resume() ;
+      if (cstr2string(child_id, child_id_size, child_id_str))
+      {
+         tmpChild_ = parent_->addTransformation(TRANS_EXPAND_DOMAIN, child_id_str);
+      }
+      else
+      {
+         tmpChild_ = parent_->addTransformation(TRANS_EXPAND_DOMAIN);
+      }
+      *child_ = static_cast<XComputeConnectivityDomainPtr>(tmpChild_);
+      CTimer::get("XIOS").suspend() ;
+   }
+
+   void cxios_xml_tree_add_expanddomaintodomain
+      (XDomainPtr parent_, XExpandDomainPtr * child_, const char * child_id, int child_id_size)
+   {
+      std::string child_id_str;
+      XTransformationDomainPtr tmpChild_;
+      CTimer::get("XIOS").resume() ;
+      if (cstr2string(child_id, child_id_size, child_id_str))
+      {
+         tmpChild_ = parent_->addTransformation(TRANS_COMPUTE_CONNECTIVITY_DOMAIN, child_id_str);
+      }
+      else
+      {
+         tmpChild_ = parent_->addTransformation(TRANS_COMPUTE_CONNECTIVITY_DOMAIN);
+      }
+      *child_ = static_cast<XExpandDomainPtr>(tmpChild_);
+      CTimer::get("XIOS").suspend() ;
+   }
+
+   // -----------------------Axis transformation--------------------------------
+   void cxios_xml_tree_add_zoomaxistoaxis
+      (XAxisPtr parent_, XZoomAxisPtr * child_, const char * child_id, int child_id_size)
+   {
+      std::string child_id_str;
+      XTransformationAxisPtr tmpChild_;
+      CTimer::get("XIOS").resume() ;
+      if (cstr2string(child_id, child_id_size, child_id_str))
+      {
+         tmpChild_ = parent_->addTransformation(TRANS_ZOOM_AXIS, child_id_str);
+      }
+      else
+      {
+         tmpChild_ = parent_->addTransformation(TRANS_ZOOM_AXIS);
+      }
+      *child_ = static_cast<XZoomAxisPtr>(tmpChild_);
+      CTimer::get("XIOS").suspend() ;
+   }
+
+   void cxios_xml_tree_add_interpolateaxistoaxis
+      (XAxisPtr parent_, XInterpolateAxisPtr * child_, const char * child_id, int child_id_size)
+   {
+      std::string child_id_str;
+      XTransformationAxisPtr tmpChild_;
+      CTimer::get("XIOS").resume() ;
+      if (cstr2string(child_id, child_id_size, child_id_str))
+      {
+         tmpChild_ = parent_->addTransformation(TRANS_INTERPOLATE_AXIS, child_id_str);
+      }
+      else
+      {
+         tmpChild_ = parent_->addTransformation(TRANS_INTERPOLATE_AXIS);
+      }
+      *child_ = static_cast<XInterpolateAxisPtr>(tmpChild_);
+      CTimer::get("XIOS").suspend() ;
+   }
+
+   void cxios_xml_tree_add_inverseaxistoaxis
+      (XAxisPtr parent_, XInverseAxisPtr * child_, const char * child_id, int child_id_size)
+   {
+      std::string child_id_str;
+      XTransformationAxisPtr tmpChild_;
+      CTimer::get("XIOS").resume() ;
+      if (cstr2string(child_id, child_id_size, child_id_str))
+      {
+         tmpChild_ = parent_->addTransformation(TRANS_INVERSE_AXIS, child_id_str);
+      }
+      else
+      {
+         tmpChild_ = parent_->addTransformation(TRANS_INVERSE_AXIS);
+      }
+      *child_ = static_cast<XInverseAxisPtr>(tmpChild_);
+      CTimer::get("XIOS").suspend() ;
+   }
+
+   void cxios_xml_tree_add_extractdomaintoaxistoaxis
+      (XAxisPtr parent_, XExtractDomainToAxisPtr * child_, const char * child_id, int child_id_size)
+   {
+      std::string child_id_str;
+      XTransformationAxisPtr tmpChild_;
+      CTimer::get("XIOS").resume() ;
+      if (cstr2string(child_id, child_id_size, child_id_str))
+      {
+         tmpChild_ = parent_->addTransformation(TRANS_EXTRACT_DOMAIN_TO_AXIS, child_id_str);
+      }
+      else
+      {
+         tmpChild_ = parent_->addTransformation(TRANS_EXTRACT_DOMAIN_TO_AXIS);
+      }
+      *child_ = static_cast<XExtractDomainToAxisPtr>(tmpChild_);
+      CTimer::get("XIOS").suspend() ;
+   }
+
+   void cxios_xml_tree_add_reducedomaintoaxistoaxis
+      (XAxisPtr parent_, XReduceDomainToAxisPtr * child_, const char * child_id, int child_id_size)
+   {
+      std::string child_id_str;
+      XTransformationAxisPtr tmpChild_;
+      CTimer::get("XIOS").resume() ;
+      if (cstr2string(child_id, child_id_size, child_id_str))
+      {
+         tmpChild_ = parent_->addTransformation(TRANS_REDUCE_DOMAIN_TO_AXIS, child_id_str);
+      }
+      else
+      {
+         tmpChild_ = parent_->addTransformation(TRANS_REDUCE_DOMAIN_TO_AXIS);
+      }
+      *child_ = static_cast<XReduceDomainToAxisPtr>(tmpChild_);
+      CTimer::get("XIOS").suspend() ;
+   }
+
+
+   void cxios_xml_tree_add_reduceaxistoscalartoscalar
+      (XScalarPtr parent_, XReduceAxisToScalarPtr * child_, const char * child_id, int child_id_size)
+   {
+      std::string child_id_str;
+      XTransformationScalarPtr tmpChild_;
+      CTimer::get("XIOS").resume() ;
+      if (cstr2string(child_id, child_id_size, child_id_str))
+      {
+         tmpChild_ = parent_->addTransformation(TRANS_REDUCE_AXIS_TO_SCALAR, child_id_str);
+      }
+      else
+      {
+         tmpChild_ = parent_->addTransformation(TRANS_REDUCE_AXIS_TO_SCALAR);
+      }
+      *child_ = static_cast<XReduceAxisToScalarPtr>(tmpChild_);
+      CTimer::get("XIOS").suspend() ;
+   }
+
+   void cxios_xml_tree_add_reducedomaintoscalartoscalar
+      (XScalarPtr parent_, XReduceDomainToScalarPtr * child_, const char * child_id, int child_id_size)
+   {
+      std::string child_id_str;
+      XTransformationScalarPtr tmpChild_;
+      CTimer::get("XIOS").resume() ;
+      if (cstr2string(child_id, child_id_size, child_id_str))
+      {
+         tmpChild_ = parent_->addTransformation(TRANS_REDUCE_DOMAIN_TO_SCALAR, child_id_str);
+      }
+      else
+      {
+         tmpChild_ = parent_->addTransformation(TRANS_REDUCE_DOMAIN_TO_SCALAR);
+      }
+      *child_ = static_cast<XReduceDomainToScalarPtr>(tmpChild_);
+      CTimer::get("XIOS").suspend() ;
+   }
+
+   void cxios_xml_tree_add_extractaxistoscalartoscalar
+      (XScalarPtr parent_, XExtractAxisToScalarPtr * child_, const char * child_id, int child_id_size)
+   {
+      std::string child_id_str;
+      XTransformationScalarPtr tmpChild_;
+      CTimer::get("XIOS").resume() ;
+      if (cstr2string(child_id, child_id_size, child_id_str))
+      {
+         tmpChild_ = parent_->addTransformation(TRANS_EXTRACT_AXIS_TO_SCALAR, child_id_str);
+      }
+      else
+      {
+         tmpChild_ = parent_->addTransformation(TRANS_EXTRACT_AXIS_TO_SCALAR);
+      }
+      *child_ = static_cast<XExtractAxisToScalarPtr>(tmpChild_);
+      CTimer::get("XIOS").suspend() ;
+   }
+
+   // ----------------------- Affichage de l'arborescence ----------------------
+
+//   void cxios_xml_tree_show   (const char * filename, int filename_size)
+//   {
+//      std::string filename_str;
+//      try
+//      {
+//         if (cstr2string(filename, filename_size, filename_str))
+//            xios::CTreeManager::PrintTreeToFile(filename_str);
+//         else
+//            xios::CTreeManager::PrintTreeToStream(std::clog);
+//      }
+//      catch (xios::CException & exc)
+//      {
+//         std::cerr << exc.getMessage() << std::endl;
+//         exit (EXIT_FAILURE);
+//      }
+//  }
+
+
+   // ----------------------- Parsing de document xml --------------------------
+
+//   void cxios_xml_parse_file  (const char * filename  , int filename_size)//
+//   {
+//      std::string filename_str;
+//      if (!cstr2string(filename, filename_size, filename_str)) return;
+//
+//      try
+//      {
+//         xios::CTreeManager::ParseFile(filename_str);
+//      }
+//      catch (xios::CException & exc)
+//      {
+//         std::cerr << exc.getMessage() << std::endl;
+//         exit (EXIT_FAILURE);
+//      }
+//   }
+
+//   void cxios_xml_parse_string(const char * xmlcontent, int xmlcontent_size)
+//   {
+//      std::string xmlcontent_str;
+//      if (!cstr2string(xmlcontent, xmlcontent_size, xmlcontent_str)) return;
+//
+//      try
+//      {
+//         xios::CTreeManager::ParseString(xmlcontent_str);
+//      }
+//      catch (xios::CException & exc)
+//      {
+//         std::cerr << exc.getMessage() << std::endl;
+//         exit (EXIT_FAILURE);
+//      }
+//   }
+
+
+
+} // extern "C"
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/c/iczoom.cpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/c/iczoom.cpp	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/c/iczoom.cpp	(revision 1749)
@@ -0,0 +1,77 @@
+/* ************************************************************************** *
+ *      Copyright Â© IPSL/LSCE, xios, Avril 2010 - Octobre 2011         *
+ * ************************************************************************** */
+
+#include <boost/multi_array.hpp>
+
+#include <memory>
+
+#include "xios.hpp"
+
+#include "object_template.hpp"
+#include "group_template.hpp"
+#include "attribute_template.hpp"
+
+#include "icutil.hpp"
+#include "timer.hpp"
+#include "zoom_axis.hpp"
+#include "zoom_domain.hpp"
+
+extern "C"
+{
+// /////////////////////////////// DÃ©finitions ////////////////////////////// //
+
+   // ----------------------- RedÃ©finition de types ----------------------------
+
+   typedef xios::CZoomAxis   * XZoomAxisPtr;
+   typedef xios::CZoomDomain * XZoomDomainPtr;
+   // ------------------------ CrÃ©ation des handle -----------------------------
+   void cxios_zoom_axis_handle_create (XZoomAxisPtr * _ret, const char * _id, int _id_len)
+   TRY
+   {
+      std::string id;
+      if (!cstr2string(_id, _id_len, id)) return;
+      CTimer::get("XIOS").resume() ;
+      *_ret = xios::CZoomAxis::get(id);
+      CTimer::get("XIOS").suspend() ;
+   }
+   CATCH_DUMP_STACK
+
+   // -------------------- VÃ©rification des identifiants -----------------------
+   void cxios_zoom_axis_valid_id (bool * _ret, const char * _id, int _id_len)
+   TRY
+   {
+      std::string id;
+      if (!cstr2string(_id, _id_len, id)) return;
+
+      CTimer::get("XIOS").resume() ;
+      *_ret = xios::CZoomAxis::has(id);
+      CTimer::get("XIOS").suspend() ;
+   }
+   CATCH_DUMP_STACK
+
+   // ------------------------ CrÃ©ation des handle -----------------------------
+   void cxios_zoom_domain_handle_create(XZoomDomainPtr * _ret, const char * _id, int _id_len)
+   TRY
+   {
+      std::string id;
+      if (!cstr2string(_id, _id_len, id)) return;
+      CTimer::get("XIOS").resume() ;
+      *_ret = xios::CZoomDomain::get(id);
+      CTimer::get("XIOS").suspend() ;
+   }
+   CATCH_DUMP_STACK
+
+   // -------------------- VÃ©rification des identifiants -----------------------
+   void cxios_zoom_domain_valid_id(bool * _ret, const char * _id, int _id_len)
+   TRY
+   {
+      std::string id;
+      if (!cstr2string(_id, _id_len, id)) return;
+
+      CTimer::get("XIOS").resume() ;
+      *_ret = xios::CZoomDomain::has(id);
+      CTimer::get("XIOS").suspend() ;
+   }
+   CATCH_DUMP_STACK
+} // extern "C"
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/c/oasis_cinterface.cpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/c/oasis_cinterface.cpp	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/c/oasis_cinterface.cpp	(revision 1749)
@@ -0,0 +1,46 @@
+#include "oasis_cinterface.hpp"
+#include <string>
+#include "mpi.hpp"
+
+namespace xios
+{ 
+ 
+  void oasis_init(const std::string& server_id)
+  {
+    fxios_oasis_init(server_id.data(),server_id.size()) ;
+  }
+  
+  void oasis_finalize(void)
+  {
+    fxios_oasis_finalize() ;
+  }
+  
+  void oasis_enddef(void)
+  {
+    fxios_oasis_enddef() ;
+  }
+
+  void oasis_get_localcomm(MPI_Comm& comm)
+  {
+    MPI_Fint f_comm ;
+    
+    fxios_oasis_get_localcomm(&f_comm) ;
+    comm=MPI_Comm_f2c(f_comm) ;
+  }
+ 
+  void oasis_get_intracomm(MPI_Comm& comm_client_server,const std::string& server_id)
+  {
+    MPI_Fint f_comm ;
+    
+    fxios_oasis_get_intracomm(&f_comm,server_id.data(),server_id.size()) ;
+    comm_client_server=MPI_Comm_f2c(f_comm) ;
+  }
+ 
+  void oasis_get_intercomm(MPI_Comm& comm_client_server,const std::string& server_id)
+  {
+    MPI_Fint f_comm ;
+    
+    fxios_oasis_get_intercomm(&f_comm,server_id.data(),server_id.size()) ;
+    comm_client_server=MPI_Comm_f2c(f_comm) ;
+  }
+}
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/c/oasis_cinterface.hpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/c/oasis_cinterface.hpp	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/c/oasis_cinterface.hpp	(revision 1749)
@@ -0,0 +1,26 @@
+#ifndef __OASIS_CINTERFACE__
+#define __OASIS_CINTERFACE__
+#include <string>
+#include "mpi.hpp"
+
+extern "C"
+{
+
+  void fxios_oasis_init(const char* server_id,int str_len) ;
+  void fxios_oasis_enddef(void) ;
+  void fxios_oasis_finalize(void) ;
+  void fxios_oasis_get_localcomm(MPI_Fint* f_comm) ;
+  void fxios_oasis_get_intracomm(MPI_Fint* f_comm_client_server,const char* client_id,int str_len) ;
+  void fxios_oasis_get_intercomm(MPI_Fint* f_comm_client_server,const char* client_id,int str_len) ;
+}
+ 
+namespace xios
+{
+  void oasis_init(const std::string& server_id) ;
+  void oasis_enddef(void) ;
+  void oasis_finalize(void) ;
+  void oasis_get_localcomm(MPI_Comm& comm) ;
+  void oasis_get_intracomm(MPI_Comm& comm_client_server,const std::string& server_id) ;
+  void oasis_get_intercomm(MPI_Comm& comm_client_server,const std::string& server_id) ;
+}
+#endif
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/c_attr/icaxis_attr.cpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/c_attr/icaxis_attr.cpp	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/c_attr/icaxis_attr.cpp	(revision 1749)
@@ -0,0 +1,695 @@
+/* ************************************************************************** *
+ *               Interface auto generated - do not modify                     *
+ * ************************************************************************** */
+
+#include <boost/multi_array.hpp>
+#include "xios.hpp"
+#include "attribute_template.hpp"
+#include "object_template.hpp"
+#include "group_template.hpp"
+#include "icutil.hpp"
+#include "icdate.hpp"
+#include "timer.hpp"
+#include "node_type.hpp"
+
+extern "C"
+{
+  typedef xios::CAxis* axis_Ptr;
+
+  void cxios_set_axis_axis_ref(axis_Ptr axis_hdl, const char * axis_ref, int axis_ref_size)
+  {
+    std::string axis_ref_str;
+    if (!cstr2string(axis_ref, axis_ref_size, axis_ref_str)) return;
+    CTimer::get("XIOS").resume();
+    axis_hdl->axis_ref.setValue(axis_ref_str);
+    CTimer::get("XIOS").suspend();
+  }
+
+  void cxios_get_axis_axis_ref(axis_Ptr axis_hdl, char * axis_ref, int axis_ref_size)
+  {
+    CTimer::get("XIOS").resume();
+    if (!string_copy(axis_hdl->axis_ref.getInheritedValue(), axis_ref, axis_ref_size))
+      ERROR("void cxios_get_axis_axis_ref(axis_Ptr axis_hdl, char * axis_ref, int axis_ref_size)", << "Input string is too short");
+    CTimer::get("XIOS").suspend();
+  }
+
+  bool cxios_is_defined_axis_axis_ref(axis_Ptr axis_hdl)
+  {
+     CTimer::get("XIOS").resume();
+     bool isDefined = axis_hdl->axis_ref.hasInheritedValue();
+     CTimer::get("XIOS").suspend();
+     return isDefined;
+  }
+
+
+  void cxios_set_axis_axis_type(axis_Ptr axis_hdl, const char * axis_type, int axis_type_size)
+  {
+    std::string axis_type_str;
+    if (!cstr2string(axis_type, axis_type_size, axis_type_str)) return;
+    CTimer::get("XIOS").resume();
+    axis_hdl->axis_type.fromString(axis_type_str);
+    CTimer::get("XIOS").suspend();
+  }
+
+  void cxios_get_axis_axis_type(axis_Ptr axis_hdl, char * axis_type, int axis_type_size)
+  {
+    CTimer::get("XIOS").resume();
+    if (!string_copy(axis_hdl->axis_type.getInheritedStringValue(), axis_type, axis_type_size))
+      ERROR("void cxios_get_axis_axis_type(axis_Ptr axis_hdl, char * axis_type, int axis_type_size)", << "Input string is too short");
+    CTimer::get("XIOS").suspend();
+  }
+
+  bool cxios_is_defined_axis_axis_type(axis_Ptr axis_hdl)
+  {
+     CTimer::get("XIOS").resume();
+     bool isDefined = axis_hdl->axis_type.hasInheritedValue();
+     CTimer::get("XIOS").suspend();
+     return isDefined;
+  }
+
+
+  void cxios_set_axis_begin(axis_Ptr axis_hdl, int begin)
+  {
+    CTimer::get("XIOS").resume();
+    axis_hdl->begin.setValue(begin);
+    CTimer::get("XIOS").suspend();
+  }
+
+  void cxios_get_axis_begin(axis_Ptr axis_hdl, int* begin)
+  {
+    CTimer::get("XIOS").resume();
+    *begin = axis_hdl->begin.getInheritedValue();
+    CTimer::get("XIOS").suspend();
+  }
+
+  bool cxios_is_defined_axis_begin(axis_Ptr axis_hdl)
+  {
+     CTimer::get("XIOS").resume();
+     bool isDefined = axis_hdl->begin.hasInheritedValue();
+     CTimer::get("XIOS").suspend();
+     return isDefined;
+  }
+
+
+  void cxios_set_axis_bounds(axis_Ptr axis_hdl, double* bounds, int* extent)
+  {
+    CTimer::get("XIOS").resume();
+    CArray<double,2> tmp(bounds, shape(extent[0], extent[1]), neverDeleteData);
+    axis_hdl->bounds.reference(tmp.copy());
+     CTimer::get("XIOS").suspend();
+  }
+
+  void cxios_get_axis_bounds(axis_Ptr axis_hdl, double* bounds, int* extent)
+  {
+    CTimer::get("XIOS").resume();
+    CArray<double,2> tmp(bounds, shape(extent[0], extent[1]), neverDeleteData);
+    tmp=axis_hdl->bounds.getInheritedValue();
+     CTimer::get("XIOS").suspend();
+  }
+
+  bool cxios_is_defined_axis_bounds(axis_Ptr axis_hdl)
+  {
+     CTimer::get("XIOS").resume();
+     bool isDefined = axis_hdl->bounds.hasInheritedValue();
+     CTimer::get("XIOS").suspend();
+     return isDefined;
+  }
+
+
+  void cxios_set_axis_bounds_name(axis_Ptr axis_hdl, const char * bounds_name, int bounds_name_size)
+  {
+    std::string bounds_name_str;
+    if (!cstr2string(bounds_name, bounds_name_size, bounds_name_str)) return;
+    CTimer::get("XIOS").resume();
+    axis_hdl->bounds_name.setValue(bounds_name_str);
+    CTimer::get("XIOS").suspend();
+  }
+
+  void cxios_get_axis_bounds_name(axis_Ptr axis_hdl, char * bounds_name, int bounds_name_size)
+  {
+    CTimer::get("XIOS").resume();
+    if (!string_copy(axis_hdl->bounds_name.getInheritedValue(), bounds_name, bounds_name_size))
+      ERROR("void cxios_get_axis_bounds_name(axis_Ptr axis_hdl, char * bounds_name, int bounds_name_size)", << "Input string is too short");
+    CTimer::get("XIOS").suspend();
+  }
+
+  bool cxios_is_defined_axis_bounds_name(axis_Ptr axis_hdl)
+  {
+     CTimer::get("XIOS").resume();
+     bool isDefined = axis_hdl->bounds_name.hasInheritedValue();
+     CTimer::get("XIOS").suspend();
+     return isDefined;
+  }
+
+
+  void cxios_set_axis_comment(axis_Ptr axis_hdl, const char * comment, int comment_size)
+  {
+    std::string comment_str;
+    if (!cstr2string(comment, comment_size, comment_str)) return;
+    CTimer::get("XIOS").resume();
+    axis_hdl->comment.setValue(comment_str);
+    CTimer::get("XIOS").suspend();
+  }
+
+  void cxios_get_axis_comment(axis_Ptr axis_hdl, char * comment, int comment_size)
+  {
+    CTimer::get("XIOS").resume();
+    if (!string_copy(axis_hdl->comment.getInheritedValue(), comment, comment_size))
+      ERROR("void cxios_get_axis_comment(axis_Ptr axis_hdl, char * comment, int comment_size)", << "Input string is too short");
+    CTimer::get("XIOS").suspend();
+  }
+
+  bool cxios_is_defined_axis_comment(axis_Ptr axis_hdl)
+  {
+     CTimer::get("XIOS").resume();
+     bool isDefined = axis_hdl->comment.hasInheritedValue();
+     CTimer::get("XIOS").suspend();
+     return isDefined;
+  }
+
+
+  void cxios_set_axis_data_begin(axis_Ptr axis_hdl, int data_begin)
+  {
+    CTimer::get("XIOS").resume();
+    axis_hdl->data_begin.setValue(data_begin);
+    CTimer::get("XIOS").suspend();
+  }
+
+  void cxios_get_axis_data_begin(axis_Ptr axis_hdl, int* data_begin)
+  {
+    CTimer::get("XIOS").resume();
+    *data_begin = axis_hdl->data_begin.getInheritedValue();
+    CTimer::get("XIOS").suspend();
+  }
+
+  bool cxios_is_defined_axis_data_begin(axis_Ptr axis_hdl)
+  {
+     CTimer::get("XIOS").resume();
+     bool isDefined = axis_hdl->data_begin.hasInheritedValue();
+     CTimer::get("XIOS").suspend();
+     return isDefined;
+  }
+
+
+  void cxios_set_axis_data_index(axis_Ptr axis_hdl, int* data_index, int* extent)
+  {
+    CTimer::get("XIOS").resume();
+    CArray<int,1> tmp(data_index, shape(extent[0]), neverDeleteData);
+    axis_hdl->data_index.reference(tmp.copy());
+     CTimer::get("XIOS").suspend();
+  }
+
+  void cxios_get_axis_data_index(axis_Ptr axis_hdl, int* data_index, int* extent)
+  {
+    CTimer::get("XIOS").resume();
+    CArray<int,1> tmp(data_index, shape(extent[0]), neverDeleteData);
+    tmp=axis_hdl->data_index.getInheritedValue();
+     CTimer::get("XIOS").suspend();
+  }
+
+  bool cxios_is_defined_axis_data_index(axis_Ptr axis_hdl)
+  {
+     CTimer::get("XIOS").resume();
+     bool isDefined = axis_hdl->data_index.hasInheritedValue();
+     CTimer::get("XIOS").suspend();
+     return isDefined;
+  }
+
+
+  void cxios_set_axis_data_n(axis_Ptr axis_hdl, int data_n)
+  {
+    CTimer::get("XIOS").resume();
+    axis_hdl->data_n.setValue(data_n);
+    CTimer::get("XIOS").suspend();
+  }
+
+  void cxios_get_axis_data_n(axis_Ptr axis_hdl, int* data_n)
+  {
+    CTimer::get("XIOS").resume();
+    *data_n = axis_hdl->data_n.getInheritedValue();
+    CTimer::get("XIOS").suspend();
+  }
+
+  bool cxios_is_defined_axis_data_n(axis_Ptr axis_hdl)
+  {
+     CTimer::get("XIOS").resume();
+     bool isDefined = axis_hdl->data_n.hasInheritedValue();
+     CTimer::get("XIOS").suspend();
+     return isDefined;
+  }
+
+
+  void cxios_set_axis_dim_name(axis_Ptr axis_hdl, const char * dim_name, int dim_name_size)
+  {
+    std::string dim_name_str;
+    if (!cstr2string(dim_name, dim_name_size, dim_name_str)) return;
+    CTimer::get("XIOS").resume();
+    axis_hdl->dim_name.setValue(dim_name_str);
+    CTimer::get("XIOS").suspend();
+  }
+
+  void cxios_get_axis_dim_name(axis_Ptr axis_hdl, char * dim_name, int dim_name_size)
+  {
+    CTimer::get("XIOS").resume();
+    if (!string_copy(axis_hdl->dim_name.getInheritedValue(), dim_name, dim_name_size))
+      ERROR("void cxios_get_axis_dim_name(axis_Ptr axis_hdl, char * dim_name, int dim_name_size)", << "Input string is too short");
+    CTimer::get("XIOS").suspend();
+  }
+
+  bool cxios_is_defined_axis_dim_name(axis_Ptr axis_hdl)
+  {
+     CTimer::get("XIOS").resume();
+     bool isDefined = axis_hdl->dim_name.hasInheritedValue();
+     CTimer::get("XIOS").suspend();
+     return isDefined;
+  }
+
+
+  void cxios_set_axis_formula(axis_Ptr axis_hdl, const char * formula, int formula_size)
+  {
+    std::string formula_str;
+    if (!cstr2string(formula, formula_size, formula_str)) return;
+    CTimer::get("XIOS").resume();
+    axis_hdl->formula.setValue(formula_str);
+    CTimer::get("XIOS").suspend();
+  }
+
+  void cxios_get_axis_formula(axis_Ptr axis_hdl, char * formula, int formula_size)
+  {
+    CTimer::get("XIOS").resume();
+    if (!string_copy(axis_hdl->formula.getInheritedValue(), formula, formula_size))
+      ERROR("void cxios_get_axis_formula(axis_Ptr axis_hdl, char * formula, int formula_size)", << "Input string is too short");
+    CTimer::get("XIOS").suspend();
+  }
+
+  bool cxios_is_defined_axis_formula(axis_Ptr axis_hdl)
+  {
+     CTimer::get("XIOS").resume();
+     bool isDefined = axis_hdl->formula.hasInheritedValue();
+     CTimer::get("XIOS").suspend();
+     return isDefined;
+  }
+
+
+  void cxios_set_axis_formula_bounds(axis_Ptr axis_hdl, const char * formula_bounds, int formula_bounds_size)
+  {
+    std::string formula_bounds_str;
+    if (!cstr2string(formula_bounds, formula_bounds_size, formula_bounds_str)) return;
+    CTimer::get("XIOS").resume();
+    axis_hdl->formula_bounds.setValue(formula_bounds_str);
+    CTimer::get("XIOS").suspend();
+  }
+
+  void cxios_get_axis_formula_bounds(axis_Ptr axis_hdl, char * formula_bounds, int formula_bounds_size)
+  {
+    CTimer::get("XIOS").resume();
+    if (!string_copy(axis_hdl->formula_bounds.getInheritedValue(), formula_bounds, formula_bounds_size))
+      ERROR("void cxios_get_axis_formula_bounds(axis_Ptr axis_hdl, char * formula_bounds, int formula_bounds_size)", << "Input string is too short");
+    CTimer::get("XIOS").suspend();
+  }
+
+  bool cxios_is_defined_axis_formula_bounds(axis_Ptr axis_hdl)
+  {
+     CTimer::get("XIOS").resume();
+     bool isDefined = axis_hdl->formula_bounds.hasInheritedValue();
+     CTimer::get("XIOS").suspend();
+     return isDefined;
+  }
+
+
+  void cxios_set_axis_formula_term(axis_Ptr axis_hdl, const char * formula_term, int formula_term_size)
+  {
+    std::string formula_term_str;
+    if (!cstr2string(formula_term, formula_term_size, formula_term_str)) return;
+    CTimer::get("XIOS").resume();
+    axis_hdl->formula_term.setValue(formula_term_str);
+    CTimer::get("XIOS").suspend();
+  }
+
+  void cxios_get_axis_formula_term(axis_Ptr axis_hdl, char * formula_term, int formula_term_size)
+  {
+    CTimer::get("XIOS").resume();
+    if (!string_copy(axis_hdl->formula_term.getInheritedValue(), formula_term, formula_term_size))
+      ERROR("void cxios_get_axis_formula_term(axis_Ptr axis_hdl, char * formula_term, int formula_term_size)", << "Input string is too short");
+    CTimer::get("XIOS").suspend();
+  }
+
+  bool cxios_is_defined_axis_formula_term(axis_Ptr axis_hdl)
+  {
+     CTimer::get("XIOS").resume();
+     bool isDefined = axis_hdl->formula_term.hasInheritedValue();
+     CTimer::get("XIOS").suspend();
+     return isDefined;
+  }
+
+
+  void cxios_set_axis_formula_term_bounds(axis_Ptr axis_hdl, const char * formula_term_bounds, int formula_term_bounds_size)
+  {
+    std::string formula_term_bounds_str;
+    if (!cstr2string(formula_term_bounds, formula_term_bounds_size, formula_term_bounds_str)) return;
+    CTimer::get("XIOS").resume();
+    axis_hdl->formula_term_bounds.setValue(formula_term_bounds_str);
+    CTimer::get("XIOS").suspend();
+  }
+
+  void cxios_get_axis_formula_term_bounds(axis_Ptr axis_hdl, char * formula_term_bounds, int formula_term_bounds_size)
+  {
+    CTimer::get("XIOS").resume();
+    if (!string_copy(axis_hdl->formula_term_bounds.getInheritedValue(), formula_term_bounds, formula_term_bounds_size))
+      ERROR("void cxios_get_axis_formula_term_bounds(axis_Ptr axis_hdl, char * formula_term_bounds, int formula_term_bounds_size)", << "Input string is too short");
+    CTimer::get("XIOS").suspend();
+  }
+
+  bool cxios_is_defined_axis_formula_term_bounds(axis_Ptr axis_hdl)
+  {
+     CTimer::get("XIOS").resume();
+     bool isDefined = axis_hdl->formula_term_bounds.hasInheritedValue();
+     CTimer::get("XIOS").suspend();
+     return isDefined;
+  }
+
+
+  void cxios_set_axis_index(axis_Ptr axis_hdl, int* index, int* extent)
+  {
+    CTimer::get("XIOS").resume();
+    CArray<int,1> tmp(index, shape(extent[0]), neverDeleteData);
+    axis_hdl->index.reference(tmp.copy());
+     CTimer::get("XIOS").suspend();
+  }
+
+  void cxios_get_axis_index(axis_Ptr axis_hdl, int* index, int* extent)
+  {
+    CTimer::get("XIOS").resume();
+    CArray<int,1> tmp(index, shape(extent[0]), neverDeleteData);
+    tmp=axis_hdl->index.getInheritedValue();
+     CTimer::get("XIOS").suspend();
+  }
+
+  bool cxios_is_defined_axis_index(axis_Ptr axis_hdl)
+  {
+     CTimer::get("XIOS").resume();
+     bool isDefined = axis_hdl->index.hasInheritedValue();
+     CTimer::get("XIOS").suspend();
+     return isDefined;
+  }
+
+
+  void cxios_set_axis_label(axis_Ptr axis_hdl, char* label, int str_len, int* str_size, int* extent)
+  {
+    CTimer::get("XIOS").resume();
+    axis_hdl->label.resize(shape(extent[0]));
+    Array<StdString,1>::iterator it, itb=axis_hdl->label.begin(), ite=axis_hdl->label.end() ;
+    int i, n ;
+    for(it=itb, i=0, n=0 ; it!=ite ; ++it,n+=str_len,++i) *it=StdString(&label[n],str_size[i]) ;
+    CTimer::get("XIOS").suspend();
+  }
+
+  void cxios_get_axis_label(axis_Ptr axis_hdl, char* label, int str_size, int* extent)
+  {
+    CTimer::get("XIOS").resume();
+    Array<StdString,1>::const_iterator it, itb=axis_hdl->label.getInheritedValue().begin(), ite=axis_hdl->label.getInheritedValue().end() ;
+    int n ;
+    for(it=itb, n=0 ; it!=ite ; ++it, n+=str_size) it->copy(&label[n],it->size()) ; 
+    CTimer::get("XIOS").suspend();
+  }
+
+  bool cxios_is_defined_axis_label(axis_Ptr axis_hdl)
+  {
+     CTimer::get("XIOS").resume();
+     bool isDefined = axis_hdl->label.hasInheritedValue();
+     CTimer::get("XIOS").suspend();
+     return isDefined;
+  }
+
+
+  void cxios_set_axis_long_name(axis_Ptr axis_hdl, const char * long_name, int long_name_size)
+  {
+    std::string long_name_str;
+    if (!cstr2string(long_name, long_name_size, long_name_str)) return;
+    CTimer::get("XIOS").resume();
+    axis_hdl->long_name.setValue(long_name_str);
+    CTimer::get("XIOS").suspend();
+  }
+
+  void cxios_get_axis_long_name(axis_Ptr axis_hdl, char * long_name, int long_name_size)
+  {
+    CTimer::get("XIOS").resume();
+    if (!string_copy(axis_hdl->long_name.getInheritedValue(), long_name, long_name_size))
+      ERROR("void cxios_get_axis_long_name(axis_Ptr axis_hdl, char * long_name, int long_name_size)", << "Input string is too short");
+    CTimer::get("XIOS").suspend();
+  }
+
+  bool cxios_is_defined_axis_long_name(axis_Ptr axis_hdl)
+  {
+     CTimer::get("XIOS").resume();
+     bool isDefined = axis_hdl->long_name.hasInheritedValue();
+     CTimer::get("XIOS").suspend();
+     return isDefined;
+  }
+
+
+  void cxios_set_axis_mask(axis_Ptr axis_hdl, bool* mask, int* extent)
+  {
+    CTimer::get("XIOS").resume();
+    CArray<bool,1> tmp(mask, shape(extent[0]), neverDeleteData);
+    axis_hdl->mask.reference(tmp.copy());
+     CTimer::get("XIOS").suspend();
+  }
+
+  void cxios_get_axis_mask(axis_Ptr axis_hdl, bool* mask, int* extent)
+  {
+    CTimer::get("XIOS").resume();
+    CArray<bool,1> tmp(mask, shape(extent[0]), neverDeleteData);
+    tmp=axis_hdl->mask.getInheritedValue();
+     CTimer::get("XIOS").suspend();
+  }
+
+  bool cxios_is_defined_axis_mask(axis_Ptr axis_hdl)
+  {
+     CTimer::get("XIOS").resume();
+     bool isDefined = axis_hdl->mask.hasInheritedValue();
+     CTimer::get("XIOS").suspend();
+     return isDefined;
+  }
+
+
+  void cxios_set_axis_n(axis_Ptr axis_hdl, int n)
+  {
+    CTimer::get("XIOS").resume();
+    axis_hdl->n.setValue(n);
+    CTimer::get("XIOS").suspend();
+  }
+
+  void cxios_get_axis_n(axis_Ptr axis_hdl, int* n)
+  {
+    CTimer::get("XIOS").resume();
+    *n = axis_hdl->n.getInheritedValue();
+    CTimer::get("XIOS").suspend();
+  }
+
+  bool cxios_is_defined_axis_n(axis_Ptr axis_hdl)
+  {
+     CTimer::get("XIOS").resume();
+     bool isDefined = axis_hdl->n.hasInheritedValue();
+     CTimer::get("XIOS").suspend();
+     return isDefined;
+  }
+
+
+  void cxios_set_axis_n_distributed_partition(axis_Ptr axis_hdl, int n_distributed_partition)
+  {
+    CTimer::get("XIOS").resume();
+    axis_hdl->n_distributed_partition.setValue(n_distributed_partition);
+    CTimer::get("XIOS").suspend();
+  }
+
+  void cxios_get_axis_n_distributed_partition(axis_Ptr axis_hdl, int* n_distributed_partition)
+  {
+    CTimer::get("XIOS").resume();
+    *n_distributed_partition = axis_hdl->n_distributed_partition.getInheritedValue();
+    CTimer::get("XIOS").suspend();
+  }
+
+  bool cxios_is_defined_axis_n_distributed_partition(axis_Ptr axis_hdl)
+  {
+     CTimer::get("XIOS").resume();
+     bool isDefined = axis_hdl->n_distributed_partition.hasInheritedValue();
+     CTimer::get("XIOS").suspend();
+     return isDefined;
+  }
+
+
+  void cxios_set_axis_n_glo(axis_Ptr axis_hdl, int n_glo)
+  {
+    CTimer::get("XIOS").resume();
+    axis_hdl->n_glo.setValue(n_glo);
+    CTimer::get("XIOS").suspend();
+  }
+
+  void cxios_get_axis_n_glo(axis_Ptr axis_hdl, int* n_glo)
+  {
+    CTimer::get("XIOS").resume();
+    *n_glo = axis_hdl->n_glo.getInheritedValue();
+    CTimer::get("XIOS").suspend();
+  }
+
+  bool cxios_is_defined_axis_n_glo(axis_Ptr axis_hdl)
+  {
+     CTimer::get("XIOS").resume();
+     bool isDefined = axis_hdl->n_glo.hasInheritedValue();
+     CTimer::get("XIOS").suspend();
+     return isDefined;
+  }
+
+
+  void cxios_set_axis_name(axis_Ptr axis_hdl, const char * name, int name_size)
+  {
+    std::string name_str;
+    if (!cstr2string(name, name_size, name_str)) return;
+    CTimer::get("XIOS").resume();
+    axis_hdl->name.setValue(name_str);
+    CTimer::get("XIOS").suspend();
+  }
+
+  void cxios_get_axis_name(axis_Ptr axis_hdl, char * name, int name_size)
+  {
+    CTimer::get("XIOS").resume();
+    if (!string_copy(axis_hdl->name.getInheritedValue(), name, name_size))
+      ERROR("void cxios_get_axis_name(axis_Ptr axis_hdl, char * name, int name_size)", << "Input string is too short");
+    CTimer::get("XIOS").suspend();
+  }
+
+  bool cxios_is_defined_axis_name(axis_Ptr axis_hdl)
+  {
+     CTimer::get("XIOS").resume();
+     bool isDefined = axis_hdl->name.hasInheritedValue();
+     CTimer::get("XIOS").suspend();
+     return isDefined;
+  }
+
+
+  void cxios_set_axis_positive(axis_Ptr axis_hdl, const char * positive, int positive_size)
+  {
+    std::string positive_str;
+    if (!cstr2string(positive, positive_size, positive_str)) return;
+    CTimer::get("XIOS").resume();
+    axis_hdl->positive.fromString(positive_str);
+    CTimer::get("XIOS").suspend();
+  }
+
+  void cxios_get_axis_positive(axis_Ptr axis_hdl, char * positive, int positive_size)
+  {
+    CTimer::get("XIOS").resume();
+    if (!string_copy(axis_hdl->positive.getInheritedStringValue(), positive, positive_size))
+      ERROR("void cxios_get_axis_positive(axis_Ptr axis_hdl, char * positive, int positive_size)", << "Input string is too short");
+    CTimer::get("XIOS").suspend();
+  }
+
+  bool cxios_is_defined_axis_positive(axis_Ptr axis_hdl)
+  {
+     CTimer::get("XIOS").resume();
+     bool isDefined = axis_hdl->positive.hasInheritedValue();
+     CTimer::get("XIOS").suspend();
+     return isDefined;
+  }
+
+
+  void cxios_set_axis_prec(axis_Ptr axis_hdl, int prec)
+  {
+    CTimer::get("XIOS").resume();
+    axis_hdl->prec.setValue(prec);
+    CTimer::get("XIOS").suspend();
+  }
+
+  void cxios_get_axis_prec(axis_Ptr axis_hdl, int* prec)
+  {
+    CTimer::get("XIOS").resume();
+    *prec = axis_hdl->prec.getInheritedValue();
+    CTimer::get("XIOS").suspend();
+  }
+
+  bool cxios_is_defined_axis_prec(axis_Ptr axis_hdl)
+  {
+     CTimer::get("XIOS").resume();
+     bool isDefined = axis_hdl->prec.hasInheritedValue();
+     CTimer::get("XIOS").suspend();
+     return isDefined;
+  }
+
+
+  void cxios_set_axis_standard_name(axis_Ptr axis_hdl, const char * standard_name, int standard_name_size)
+  {
+    std::string standard_name_str;
+    if (!cstr2string(standard_name, standard_name_size, standard_name_str)) return;
+    CTimer::get("XIOS").resume();
+    axis_hdl->standard_name.setValue(standard_name_str);
+    CTimer::get("XIOS").suspend();
+  }
+
+  void cxios_get_axis_standard_name(axis_Ptr axis_hdl, char * standard_name, int standard_name_size)
+  {
+    CTimer::get("XIOS").resume();
+    if (!string_copy(axis_hdl->standard_name.getInheritedValue(), standard_name, standard_name_size))
+      ERROR("void cxios_get_axis_standard_name(axis_Ptr axis_hdl, char * standard_name, int standard_name_size)", << "Input string is too short");
+    CTimer::get("XIOS").suspend();
+  }
+
+  bool cxios_is_defined_axis_standard_name(axis_Ptr axis_hdl)
+  {
+     CTimer::get("XIOS").resume();
+     bool isDefined = axis_hdl->standard_name.hasInheritedValue();
+     CTimer::get("XIOS").suspend();
+     return isDefined;
+  }
+
+
+  void cxios_set_axis_unit(axis_Ptr axis_hdl, const char * unit, int unit_size)
+  {
+    std::string unit_str;
+    if (!cstr2string(unit, unit_size, unit_str)) return;
+    CTimer::get("XIOS").resume();
+    axis_hdl->unit.setValue(unit_str);
+    CTimer::get("XIOS").suspend();
+  }
+
+  void cxios_get_axis_unit(axis_Ptr axis_hdl, char * unit, int unit_size)
+  {
+    CTimer::get("XIOS").resume();
+    if (!string_copy(axis_hdl->unit.getInheritedValue(), unit, unit_size))
+      ERROR("void cxios_get_axis_unit(axis_Ptr axis_hdl, char * unit, int unit_size)", << "Input string is too short");
+    CTimer::get("XIOS").suspend();
+  }
+
+  bool cxios_is_defined_axis_unit(axis_Ptr axis_hdl)
+  {
+     CTimer::get("XIOS").resume();
+     bool isDefined = axis_hdl->unit.hasInheritedValue();
+     CTimer::get("XIOS").suspend();
+     return isDefined;
+  }
+
+
+  void cxios_set_axis_value(axis_Ptr axis_hdl, double* value, int* extent)
+  {
+    CTimer::get("XIOS").resume();
+    CArray<double,1> tmp(value, shape(extent[0]), neverDeleteData);
+    axis_hdl->value.reference(tmp.copy());
+     CTimer::get("XIOS").suspend();
+  }
+
+  void cxios_get_axis_value(axis_Ptr axis_hdl, double* value, int* extent)
+  {
+    CTimer::get("XIOS").resume();
+    CArray<double,1> tmp(value, shape(extent[0]), neverDeleteData);
+    tmp=axis_hdl->value.getInheritedValue();
+     CTimer::get("XIOS").suspend();
+  }
+
+  bool cxios_is_defined_axis_value(axis_Ptr axis_hdl)
+  {
+     CTimer::get("XIOS").resume();
+     bool isDefined = axis_hdl->value.hasInheritedValue();
+     CTimer::get("XIOS").suspend();
+     return isDefined;
+  }
+}
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/c_attr/icaxisgroup_attr.cpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/c_attr/icaxisgroup_attr.cpp	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/c_attr/icaxisgroup_attr.cpp	(revision 1749)
@@ -0,0 +1,721 @@
+/* ************************************************************************** *
+ *               Interface auto generated - do not modify                     *
+ * ************************************************************************** */
+
+#include <boost/multi_array.hpp>
+#include "xios.hpp"
+#include "attribute_template.hpp"
+#include "object_template.hpp"
+#include "group_template.hpp"
+#include "icutil.hpp"
+#include "icdate.hpp"
+#include "timer.hpp"
+#include "node_type.hpp"
+
+extern "C"
+{
+  typedef xios::CAxisGroup* axisgroup_Ptr;
+
+  void cxios_set_axisgroup_axis_ref(axisgroup_Ptr axisgroup_hdl, const char * axis_ref, int axis_ref_size)
+  {
+    std::string axis_ref_str;
+    if (!cstr2string(axis_ref, axis_ref_size, axis_ref_str)) return;
+    CTimer::get("XIOS").resume();
+    axisgroup_hdl->axis_ref.setValue(axis_ref_str);
+    CTimer::get("XIOS").suspend();
+  }
+
+  void cxios_get_axisgroup_axis_ref(axisgroup_Ptr axisgroup_hdl, char * axis_ref, int axis_ref_size)
+  {
+    CTimer::get("XIOS").resume();
+    if (!string_copy(axisgroup_hdl->axis_ref.getInheritedValue(), axis_ref, axis_ref_size))
+      ERROR("void cxios_get_axisgroup_axis_ref(axisgroup_Ptr axisgroup_hdl, char * axis_ref, int axis_ref_size)", << "Input string is too short");
+    CTimer::get("XIOS").suspend();
+  }
+
+  bool cxios_is_defined_axisgroup_axis_ref(axisgroup_Ptr axisgroup_hdl)
+  {
+     CTimer::get("XIOS").resume();
+     bool isDefined = axisgroup_hdl->axis_ref.hasInheritedValue();
+     CTimer::get("XIOS").suspend();
+     return isDefined;
+  }
+
+
+  void cxios_set_axisgroup_axis_type(axisgroup_Ptr axisgroup_hdl, const char * axis_type, int axis_type_size)
+  {
+    std::string axis_type_str;
+    if (!cstr2string(axis_type, axis_type_size, axis_type_str)) return;
+    CTimer::get("XIOS").resume();
+    axisgroup_hdl->axis_type.fromString(axis_type_str);
+    CTimer::get("XIOS").suspend();
+  }
+
+  void cxios_get_axisgroup_axis_type(axisgroup_Ptr axisgroup_hdl, char * axis_type, int axis_type_size)
+  {
+    CTimer::get("XIOS").resume();
+    if (!string_copy(axisgroup_hdl->axis_type.getInheritedStringValue(), axis_type, axis_type_size))
+      ERROR("void cxios_get_axisgroup_axis_type(axisgroup_Ptr axisgroup_hdl, char * axis_type, int axis_type_size)", << "Input string is too short");
+    CTimer::get("XIOS").suspend();
+  }
+
+  bool cxios_is_defined_axisgroup_axis_type(axisgroup_Ptr axisgroup_hdl)
+  {
+     CTimer::get("XIOS").resume();
+     bool isDefined = axisgroup_hdl->axis_type.hasInheritedValue();
+     CTimer::get("XIOS").suspend();
+     return isDefined;
+  }
+
+
+  void cxios_set_axisgroup_begin(axisgroup_Ptr axisgroup_hdl, int begin)
+  {
+    CTimer::get("XIOS").resume();
+    axisgroup_hdl->begin.setValue(begin);
+    CTimer::get("XIOS").suspend();
+  }
+
+  void cxios_get_axisgroup_begin(axisgroup_Ptr axisgroup_hdl, int* begin)
+  {
+    CTimer::get("XIOS").resume();
+    *begin = axisgroup_hdl->begin.getInheritedValue();
+    CTimer::get("XIOS").suspend();
+  }
+
+  bool cxios_is_defined_axisgroup_begin(axisgroup_Ptr axisgroup_hdl)
+  {
+     CTimer::get("XIOS").resume();
+     bool isDefined = axisgroup_hdl->begin.hasInheritedValue();
+     CTimer::get("XIOS").suspend();
+     return isDefined;
+  }
+
+
+  void cxios_set_axisgroup_bounds(axisgroup_Ptr axisgroup_hdl, double* bounds, int* extent)
+  {
+    CTimer::get("XIOS").resume();
+    CArray<double,2> tmp(bounds, shape(extent[0], extent[1]), neverDeleteData);
+    axisgroup_hdl->bounds.reference(tmp.copy());
+     CTimer::get("XIOS").suspend();
+  }
+
+  void cxios_get_axisgroup_bounds(axisgroup_Ptr axisgroup_hdl, double* bounds, int* extent)
+  {
+    CTimer::get("XIOS").resume();
+    CArray<double,2> tmp(bounds, shape(extent[0], extent[1]), neverDeleteData);
+    tmp=axisgroup_hdl->bounds.getInheritedValue();
+     CTimer::get("XIOS").suspend();
+  }
+
+  bool cxios_is_defined_axisgroup_bounds(axisgroup_Ptr axisgroup_hdl)
+  {
+     CTimer::get("XIOS").resume();
+     bool isDefined = axisgroup_hdl->bounds.hasInheritedValue();
+     CTimer::get("XIOS").suspend();
+     return isDefined;
+  }
+
+
+  void cxios_set_axisgroup_bounds_name(axisgroup_Ptr axisgroup_hdl, const char * bounds_name, int bounds_name_size)
+  {
+    std::string bounds_name_str;
+    if (!cstr2string(bounds_name, bounds_name_size, bounds_name_str)) return;
+    CTimer::get("XIOS").resume();
+    axisgroup_hdl->bounds_name.setValue(bounds_name_str);
+    CTimer::get("XIOS").suspend();
+  }
+
+  void cxios_get_axisgroup_bounds_name(axisgroup_Ptr axisgroup_hdl, char * bounds_name, int bounds_name_size)
+  {
+    CTimer::get("XIOS").resume();
+    if (!string_copy(axisgroup_hdl->bounds_name.getInheritedValue(), bounds_name, bounds_name_size))
+      ERROR("void cxios_get_axisgroup_bounds_name(axisgroup_Ptr axisgroup_hdl, char * bounds_name, int bounds_name_size)", << "Input string is too short");
+    CTimer::get("XIOS").suspend();
+  }
+
+  bool cxios_is_defined_axisgroup_bounds_name(axisgroup_Ptr axisgroup_hdl)
+  {
+     CTimer::get("XIOS").resume();
+     bool isDefined = axisgroup_hdl->bounds_name.hasInheritedValue();
+     CTimer::get("XIOS").suspend();
+     return isDefined;
+  }
+
+
+  void cxios_set_axisgroup_comment(axisgroup_Ptr axisgroup_hdl, const char * comment, int comment_size)
+  {
+    std::string comment_str;
+    if (!cstr2string(comment, comment_size, comment_str)) return;
+    CTimer::get("XIOS").resume();
+    axisgroup_hdl->comment.setValue(comment_str);
+    CTimer::get("XIOS").suspend();
+  }
+
+  void cxios_get_axisgroup_comment(axisgroup_Ptr axisgroup_hdl, char * comment, int comment_size)
+  {
+    CTimer::get("XIOS").resume();
+    if (!string_copy(axisgroup_hdl->comment.getInheritedValue(), comment, comment_size))
+      ERROR("void cxios_get_axisgroup_comment(axisgroup_Ptr axisgroup_hdl, char * comment, int comment_size)", << "Input string is too short");
+    CTimer::get("XIOS").suspend();
+  }
+
+  bool cxios_is_defined_axisgroup_comment(axisgroup_Ptr axisgroup_hdl)
+  {
+     CTimer::get("XIOS").resume();
+     bool isDefined = axisgroup_hdl->comment.hasInheritedValue();
+     CTimer::get("XIOS").suspend();
+     return isDefined;
+  }
+
+
+  void cxios_set_axisgroup_data_begin(axisgroup_Ptr axisgroup_hdl, int data_begin)
+  {
+    CTimer::get("XIOS").resume();
+    axisgroup_hdl->data_begin.setValue(data_begin);
+    CTimer::get("XIOS").suspend();
+  }
+
+  void cxios_get_axisgroup_data_begin(axisgroup_Ptr axisgroup_hdl, int* data_begin)
+  {
+    CTimer::get("XIOS").resume();
+    *data_begin = axisgroup_hdl->data_begin.getInheritedValue();
+    CTimer::get("XIOS").suspend();
+  }
+
+  bool cxios_is_defined_axisgroup_data_begin(axisgroup_Ptr axisgroup_hdl)
+  {
+     CTimer::get("XIOS").resume();
+     bool isDefined = axisgroup_hdl->data_begin.hasInheritedValue();
+     CTimer::get("XIOS").suspend();
+     return isDefined;
+  }
+
+
+  void cxios_set_axisgroup_data_index(axisgroup_Ptr axisgroup_hdl, int* data_index, int* extent)
+  {
+    CTimer::get("XIOS").resume();
+    CArray<int,1> tmp(data_index, shape(extent[0]), neverDeleteData);
+    axisgroup_hdl->data_index.reference(tmp.copy());
+     CTimer::get("XIOS").suspend();
+  }
+
+  void cxios_get_axisgroup_data_index(axisgroup_Ptr axisgroup_hdl, int* data_index, int* extent)
+  {
+    CTimer::get("XIOS").resume();
+    CArray<int,1> tmp(data_index, shape(extent[0]), neverDeleteData);
+    tmp=axisgroup_hdl->data_index.getInheritedValue();
+     CTimer::get("XIOS").suspend();
+  }
+
+  bool cxios_is_defined_axisgroup_data_index(axisgroup_Ptr axisgroup_hdl)
+  {
+     CTimer::get("XIOS").resume();
+     bool isDefined = axisgroup_hdl->data_index.hasInheritedValue();
+     CTimer::get("XIOS").suspend();
+     return isDefined;
+  }
+
+
+  void cxios_set_axisgroup_data_n(axisgroup_Ptr axisgroup_hdl, int data_n)
+  {
+    CTimer::get("XIOS").resume();
+    axisgroup_hdl->data_n.setValue(data_n);
+    CTimer::get("XIOS").suspend();
+  }
+
+  void cxios_get_axisgroup_data_n(axisgroup_Ptr axisgroup_hdl, int* data_n)
+  {
+    CTimer::get("XIOS").resume();
+    *data_n = axisgroup_hdl->data_n.getInheritedValue();
+    CTimer::get("XIOS").suspend();
+  }
+
+  bool cxios_is_defined_axisgroup_data_n(axisgroup_Ptr axisgroup_hdl)
+  {
+     CTimer::get("XIOS").resume();
+     bool isDefined = axisgroup_hdl->data_n.hasInheritedValue();
+     CTimer::get("XIOS").suspend();
+     return isDefined;
+  }
+
+
+  void cxios_set_axisgroup_dim_name(axisgroup_Ptr axisgroup_hdl, const char * dim_name, int dim_name_size)
+  {
+    std::string dim_name_str;
+    if (!cstr2string(dim_name, dim_name_size, dim_name_str)) return;
+    CTimer::get("XIOS").resume();
+    axisgroup_hdl->dim_name.setValue(dim_name_str);
+    CTimer::get("XIOS").suspend();
+  }
+
+  void cxios_get_axisgroup_dim_name(axisgroup_Ptr axisgroup_hdl, char * dim_name, int dim_name_size)
+  {
+    CTimer::get("XIOS").resume();
+    if (!string_copy(axisgroup_hdl->dim_name.getInheritedValue(), dim_name, dim_name_size))
+      ERROR("void cxios_get_axisgroup_dim_name(axisgroup_Ptr axisgroup_hdl, char * dim_name, int dim_name_size)", << "Input string is too short");
+    CTimer::get("XIOS").suspend();
+  }
+
+  bool cxios_is_defined_axisgroup_dim_name(axisgroup_Ptr axisgroup_hdl)
+  {
+     CTimer::get("XIOS").resume();
+     bool isDefined = axisgroup_hdl->dim_name.hasInheritedValue();
+     CTimer::get("XIOS").suspend();
+     return isDefined;
+  }
+
+
+  void cxios_set_axisgroup_formula(axisgroup_Ptr axisgroup_hdl, const char * formula, int formula_size)
+  {
+    std::string formula_str;
+    if (!cstr2string(formula, formula_size, formula_str)) return;
+    CTimer::get("XIOS").resume();
+    axisgroup_hdl->formula.setValue(formula_str);
+    CTimer::get("XIOS").suspend();
+  }
+
+  void cxios_get_axisgroup_formula(axisgroup_Ptr axisgroup_hdl, char * formula, int formula_size)
+  {
+    CTimer::get("XIOS").resume();
+    if (!string_copy(axisgroup_hdl->formula.getInheritedValue(), formula, formula_size))
+      ERROR("void cxios_get_axisgroup_formula(axisgroup_Ptr axisgroup_hdl, char * formula, int formula_size)", << "Input string is too short");
+    CTimer::get("XIOS").suspend();
+  }
+
+  bool cxios_is_defined_axisgroup_formula(axisgroup_Ptr axisgroup_hdl)
+  {
+     CTimer::get("XIOS").resume();
+     bool isDefined = axisgroup_hdl->formula.hasInheritedValue();
+     CTimer::get("XIOS").suspend();
+     return isDefined;
+  }
+
+
+  void cxios_set_axisgroup_formula_bounds(axisgroup_Ptr axisgroup_hdl, const char * formula_bounds, int formula_bounds_size)
+  {
+    std::string formula_bounds_str;
+    if (!cstr2string(formula_bounds, formula_bounds_size, formula_bounds_str)) return;
+    CTimer::get("XIOS").resume();
+    axisgroup_hdl->formula_bounds.setValue(formula_bounds_str);
+    CTimer::get("XIOS").suspend();
+  }
+
+  void cxios_get_axisgroup_formula_bounds(axisgroup_Ptr axisgroup_hdl, char * formula_bounds, int formula_bounds_size)
+  {
+    CTimer::get("XIOS").resume();
+    if (!string_copy(axisgroup_hdl->formula_bounds.getInheritedValue(), formula_bounds, formula_bounds_size))
+      ERROR("void cxios_get_axisgroup_formula_bounds(axisgroup_Ptr axisgroup_hdl, char * formula_bounds, int formula_bounds_size)", << "Input string is too short");
+    CTimer::get("XIOS").suspend();
+  }
+
+  bool cxios_is_defined_axisgroup_formula_bounds(axisgroup_Ptr axisgroup_hdl)
+  {
+     CTimer::get("XIOS").resume();
+     bool isDefined = axisgroup_hdl->formula_bounds.hasInheritedValue();
+     CTimer::get("XIOS").suspend();
+     return isDefined;
+  }
+
+
+  void cxios_set_axisgroup_formula_term(axisgroup_Ptr axisgroup_hdl, const char * formula_term, int formula_term_size)
+  {
+    std::string formula_term_str;
+    if (!cstr2string(formula_term, formula_term_size, formula_term_str)) return;
+    CTimer::get("XIOS").resume();
+    axisgroup_hdl->formula_term.setValue(formula_term_str);
+    CTimer::get("XIOS").suspend();
+  }
+
+  void cxios_get_axisgroup_formula_term(axisgroup_Ptr axisgroup_hdl, char * formula_term, int formula_term_size)
+  {
+    CTimer::get("XIOS").resume();
+    if (!string_copy(axisgroup_hdl->formula_term.getInheritedValue(), formula_term, formula_term_size))
+      ERROR("void cxios_get_axisgroup_formula_term(axisgroup_Ptr axisgroup_hdl, char * formula_term, int formula_term_size)", << "Input string is too short");
+    CTimer::get("XIOS").suspend();
+  }
+
+  bool cxios_is_defined_axisgroup_formula_term(axisgroup_Ptr axisgroup_hdl)
+  {
+     CTimer::get("XIOS").resume();
+     bool isDefined = axisgroup_hdl->formula_term.hasInheritedValue();
+     CTimer::get("XIOS").suspend();
+     return isDefined;
+  }
+
+
+  void cxios_set_axisgroup_formula_term_bounds(axisgroup_Ptr axisgroup_hdl, const char * formula_term_bounds, int formula_term_bounds_size)
+  {
+    std::string formula_term_bounds_str;
+    if (!cstr2string(formula_term_bounds, formula_term_bounds_size, formula_term_bounds_str)) return;
+    CTimer::get("XIOS").resume();
+    axisgroup_hdl->formula_term_bounds.setValue(formula_term_bounds_str);
+    CTimer::get("XIOS").suspend();
+  }
+
+  void cxios_get_axisgroup_formula_term_bounds(axisgroup_Ptr axisgroup_hdl, char * formula_term_bounds, int formula_term_bounds_size)
+  {
+    CTimer::get("XIOS").resume();
+    if (!string_copy(axisgroup_hdl->formula_term_bounds.getInheritedValue(), formula_term_bounds, formula_term_bounds_size))
+      ERROR("void cxios_get_axisgroup_formula_term_bounds(axisgroup_Ptr axisgroup_hdl, char * formula_term_bounds, int formula_term_bounds_size)", << "Input string is too short");
+    CTimer::get("XIOS").suspend();
+  }
+
+  bool cxios_is_defined_axisgroup_formula_term_bounds(axisgroup_Ptr axisgroup_hdl)
+  {
+     CTimer::get("XIOS").resume();
+     bool isDefined = axisgroup_hdl->formula_term_bounds.hasInheritedValue();
+     CTimer::get("XIOS").suspend();
+     return isDefined;
+  }
+
+
+  void cxios_set_axisgroup_group_ref(axisgroup_Ptr axisgroup_hdl, const char * group_ref, int group_ref_size)
+  {
+    std::string group_ref_str;
+    if (!cstr2string(group_ref, group_ref_size, group_ref_str)) return;
+    CTimer::get("XIOS").resume();
+    axisgroup_hdl->group_ref.setValue(group_ref_str);
+    CTimer::get("XIOS").suspend();
+  }
+
+  void cxios_get_axisgroup_group_ref(axisgroup_Ptr axisgroup_hdl, char * group_ref, int group_ref_size)
+  {
+    CTimer::get("XIOS").resume();
+    if (!string_copy(axisgroup_hdl->group_ref.getInheritedValue(), group_ref, group_ref_size))
+      ERROR("void cxios_get_axisgroup_group_ref(axisgroup_Ptr axisgroup_hdl, char * group_ref, int group_ref_size)", << "Input string is too short");
+    CTimer::get("XIOS").suspend();
+  }
+
+  bool cxios_is_defined_axisgroup_group_ref(axisgroup_Ptr axisgroup_hdl)
+  {
+     CTimer::get("XIOS").resume();
+     bool isDefined = axisgroup_hdl->group_ref.hasInheritedValue();
+     CTimer::get("XIOS").suspend();
+     return isDefined;
+  }
+
+
+  void cxios_set_axisgroup_index(axisgroup_Ptr axisgroup_hdl, int* index, int* extent)
+  {
+    CTimer::get("XIOS").resume();
+    CArray<int,1> tmp(index, shape(extent[0]), neverDeleteData);
+    axisgroup_hdl->index.reference(tmp.copy());
+     CTimer::get("XIOS").suspend();
+  }
+
+  void cxios_get_axisgroup_index(axisgroup_Ptr axisgroup_hdl, int* index, int* extent)
+  {
+    CTimer::get("XIOS").resume();
+    CArray<int,1> tmp(index, shape(extent[0]), neverDeleteData);
+    tmp=axisgroup_hdl->index.getInheritedValue();
+     CTimer::get("XIOS").suspend();
+  }
+
+  bool cxios_is_defined_axisgroup_index(axisgroup_Ptr axisgroup_hdl)
+  {
+     CTimer::get("XIOS").resume();
+     bool isDefined = axisgroup_hdl->index.hasInheritedValue();
+     CTimer::get("XIOS").suspend();
+     return isDefined;
+  }
+
+
+  void cxios_set_axisgroup_label(axisgroup_Ptr axisgroup_hdl, char* label, int str_len, int* str_size, int* extent)
+  {
+    CTimer::get("XIOS").resume();
+    axisgroup_hdl->label.resize(shape(extent[0]));
+    Array<StdString,1>::iterator it, itb=axisgroup_hdl->label.begin(), ite=axisgroup_hdl->label.end() ;
+    int i, n ;
+    for(it=itb, i=0, n=0 ; it!=ite ; ++it,n+=str_len,++i) *it=StdString(&label[n],str_size[i]) ;
+    CTimer::get("XIOS").suspend();
+  }
+
+  void cxios_get_axisgroup_label(axisgroup_Ptr axisgroup_hdl, char* label, int str_size, int* extent)
+  {
+    CTimer::get("XIOS").resume();
+    Array<StdString,1>::const_iterator it, itb=axisgroup_hdl->label.getInheritedValue().begin(), ite=axisgroup_hdl->label.getInheritedValue().end() ;
+    int n ;
+    for(it=itb, n=0 ; it!=ite ; ++it, n+=str_size) it->copy(&label[n],it->size()) ; 
+    CTimer::get("XIOS").suspend();
+  }
+
+  bool cxios_is_defined_axisgroup_label(axisgroup_Ptr axisgroup_hdl)
+  {
+     CTimer::get("XIOS").resume();
+     bool isDefined = axisgroup_hdl->label.hasInheritedValue();
+     CTimer::get("XIOS").suspend();
+     return isDefined;
+  }
+
+
+  void cxios_set_axisgroup_long_name(axisgroup_Ptr axisgroup_hdl, const char * long_name, int long_name_size)
+  {
+    std::string long_name_str;
+    if (!cstr2string(long_name, long_name_size, long_name_str)) return;
+    CTimer::get("XIOS").resume();
+    axisgroup_hdl->long_name.setValue(long_name_str);
+    CTimer::get("XIOS").suspend();
+  }
+
+  void cxios_get_axisgroup_long_name(axisgroup_Ptr axisgroup_hdl, char * long_name, int long_name_size)
+  {
+    CTimer::get("XIOS").resume();
+    if (!string_copy(axisgroup_hdl->long_name.getInheritedValue(), long_name, long_name_size))
+      ERROR("void cxios_get_axisgroup_long_name(axisgroup_Ptr axisgroup_hdl, char * long_name, int long_name_size)", << "Input string is too short");
+    CTimer::get("XIOS").suspend();
+  }
+
+  bool cxios_is_defined_axisgroup_long_name(axisgroup_Ptr axisgroup_hdl)
+  {
+     CTimer::get("XIOS").resume();
+     bool isDefined = axisgroup_hdl->long_name.hasInheritedValue();
+     CTimer::get("XIOS").suspend();
+     return isDefined;
+  }
+
+
+  void cxios_set_axisgroup_mask(axisgroup_Ptr axisgroup_hdl, bool* mask, int* extent)
+  {
+    CTimer::get("XIOS").resume();
+    CArray<bool,1> tmp(mask, shape(extent[0]), neverDeleteData);
+    axisgroup_hdl->mask.reference(tmp.copy());
+     CTimer::get("XIOS").suspend();
+  }
+
+  void cxios_get_axisgroup_mask(axisgroup_Ptr axisgroup_hdl, bool* mask, int* extent)
+  {
+    CTimer::get("XIOS").resume();
+    CArray<bool,1> tmp(mask, shape(extent[0]), neverDeleteData);
+    tmp=axisgroup_hdl->mask.getInheritedValue();
+     CTimer::get("XIOS").suspend();
+  }
+
+  bool cxios_is_defined_axisgroup_mask(axisgroup_Ptr axisgroup_hdl)
+  {
+     CTimer::get("XIOS").resume();
+     bool isDefined = axisgroup_hdl->mask.hasInheritedValue();
+     CTimer::get("XIOS").suspend();
+     return isDefined;
+  }
+
+
+  void cxios_set_axisgroup_n(axisgroup_Ptr axisgroup_hdl, int n)
+  {
+    CTimer::get("XIOS").resume();
+    axisgroup_hdl->n.setValue(n);
+    CTimer::get("XIOS").suspend();
+  }
+
+  void cxios_get_axisgroup_n(axisgroup_Ptr axisgroup_hdl, int* n)
+  {
+    CTimer::get("XIOS").resume();
+    *n = axisgroup_hdl->n.getInheritedValue();
+    CTimer::get("XIOS").suspend();
+  }
+
+  bool cxios_is_defined_axisgroup_n(axisgroup_Ptr axisgroup_hdl)
+  {
+     CTimer::get("XIOS").resume();
+     bool isDefined = axisgroup_hdl->n.hasInheritedValue();
+     CTimer::get("XIOS").suspend();
+     return isDefined;
+  }
+
+
+  void cxios_set_axisgroup_n_distributed_partition(axisgroup_Ptr axisgroup_hdl, int n_distributed_partition)
+  {
+    CTimer::get("XIOS").resume();
+    axisgroup_hdl->n_distributed_partition.setValue(n_distributed_partition);
+    CTimer::get("XIOS").suspend();
+  }
+
+  void cxios_get_axisgroup_n_distributed_partition(axisgroup_Ptr axisgroup_hdl, int* n_distributed_partition)
+  {
+    CTimer::get("XIOS").resume();
+    *n_distributed_partition = axisgroup_hdl->n_distributed_partition.getInheritedValue();
+    CTimer::get("XIOS").suspend();
+  }
+
+  bool cxios_is_defined_axisgroup_n_distributed_partition(axisgroup_Ptr axisgroup_hdl)
+  {
+     CTimer::get("XIOS").resume();
+     bool isDefined = axisgroup_hdl->n_distributed_partition.hasInheritedValue();
+     CTimer::get("XIOS").suspend();
+     return isDefined;
+  }
+
+
+  void cxios_set_axisgroup_n_glo(axisgroup_Ptr axisgroup_hdl, int n_glo)
+  {
+    CTimer::get("XIOS").resume();
+    axisgroup_hdl->n_glo.setValue(n_glo);
+    CTimer::get("XIOS").suspend();
+  }
+
+  void cxios_get_axisgroup_n_glo(axisgroup_Ptr axisgroup_hdl, int* n_glo)
+  {
+    CTimer::get("XIOS").resume();
+    *n_glo = axisgroup_hdl->n_glo.getInheritedValue();
+    CTimer::get("XIOS").suspend();
+  }
+
+  bool cxios_is_defined_axisgroup_n_glo(axisgroup_Ptr axisgroup_hdl)
+  {
+     CTimer::get("XIOS").resume();
+     bool isDefined = axisgroup_hdl->n_glo.hasInheritedValue();
+     CTimer::get("XIOS").suspend();
+     return isDefined;
+  }
+
+
+  void cxios_set_axisgroup_name(axisgroup_Ptr axisgroup_hdl, const char * name, int name_size)
+  {
+    std::string name_str;
+    if (!cstr2string(name, name_size, name_str)) return;
+    CTimer::get("XIOS").resume();
+    axisgroup_hdl->name.setValue(name_str);
+    CTimer::get("XIOS").suspend();
+  }
+
+  void cxios_get_axisgroup_name(axisgroup_Ptr axisgroup_hdl, char * name, int name_size)
+  {
+    CTimer::get("XIOS").resume();
+    if (!string_copy(axisgroup_hdl->name.getInheritedValue(), name, name_size))
+      ERROR("void cxios_get_axisgroup_name(axisgroup_Ptr axisgroup_hdl, char * name, int name_size)", << "Input string is too short");
+    CTimer::get("XIOS").suspend();
+  }
+
+  bool cxios_is_defined_axisgroup_name(axisgroup_Ptr axisgroup_hdl)
+  {
+     CTimer::get("XIOS").resume();
+     bool isDefined = axisgroup_hdl->name.hasInheritedValue();
+     CTimer::get("XIOS").suspend();
+     return isDefined;
+  }
+
+
+  void cxios_set_axisgroup_positive(axisgroup_Ptr axisgroup_hdl, const char * positive, int positive_size)
+  {
+    std::string positive_str;
+    if (!cstr2string(positive, positive_size, positive_str)) return;
+    CTimer::get("XIOS").resume();
+    axisgroup_hdl->positive.fromString(positive_str);
+    CTimer::get("XIOS").suspend();
+  }
+
+  void cxios_get_axisgroup_positive(axisgroup_Ptr axisgroup_hdl, char * positive, int positive_size)
+  {
+    CTimer::get("XIOS").resume();
+    if (!string_copy(axisgroup_hdl->positive.getInheritedStringValue(), positive, positive_size))
+      ERROR("void cxios_get_axisgroup_positive(axisgroup_Ptr axisgroup_hdl, char * positive, int positive_size)", << "Input string is too short");
+    CTimer::get("XIOS").suspend();
+  }
+
+  bool cxios_is_defined_axisgroup_positive(axisgroup_Ptr axisgroup_hdl)
+  {
+     CTimer::get("XIOS").resume();
+     bool isDefined = axisgroup_hdl->positive.hasInheritedValue();
+     CTimer::get("XIOS").suspend();
+     return isDefined;
+  }
+
+
+  void cxios_set_axisgroup_prec(axisgroup_Ptr axisgroup_hdl, int prec)
+  {
+    CTimer::get("XIOS").resume();
+    axisgroup_hdl->prec.setValue(prec);
+    CTimer::get("XIOS").suspend();
+  }
+
+  void cxios_get_axisgroup_prec(axisgroup_Ptr axisgroup_hdl, int* prec)
+  {
+    CTimer::get("XIOS").resume();
+    *prec = axisgroup_hdl->prec.getInheritedValue();
+    CTimer::get("XIOS").suspend();
+  }
+
+  bool cxios_is_defined_axisgroup_prec(axisgroup_Ptr axisgroup_hdl)
+  {
+     CTimer::get("XIOS").resume();
+     bool isDefined = axisgroup_hdl->prec.hasInheritedValue();
+     CTimer::get("XIOS").suspend();
+     return isDefined;
+  }
+
+
+  void cxios_set_axisgroup_standard_name(axisgroup_Ptr axisgroup_hdl, const char * standard_name, int standard_name_size)
+  {
+    std::string standard_name_str;
+    if (!cstr2string(standard_name, standard_name_size, standard_name_str)) return;
+    CTimer::get("XIOS").resume();
+    axisgroup_hdl->standard_name.setValue(standard_name_str);
+    CTimer::get("XIOS").suspend();
+  }
+
+  void cxios_get_axisgroup_standard_name(axisgroup_Ptr axisgroup_hdl, char * standard_name, int standard_name_size)
+  {
+    CTimer::get("XIOS").resume();
+    if (!string_copy(axisgroup_hdl->standard_name.getInheritedValue(), standard_name, standard_name_size))
+      ERROR("void cxios_get_axisgroup_standard_name(axisgroup_Ptr axisgroup_hdl, char * standard_name, int standard_name_size)", << "Input string is too short");
+    CTimer::get("XIOS").suspend();
+  }
+
+  bool cxios_is_defined_axisgroup_standard_name(axisgroup_Ptr axisgroup_hdl)
+  {
+     CTimer::get("XIOS").resume();
+     bool isDefined = axisgroup_hdl->standard_name.hasInheritedValue();
+     CTimer::get("XIOS").suspend();
+     return isDefined;
+  }
+
+
+  void cxios_set_axisgroup_unit(axisgroup_Ptr axisgroup_hdl, const char * unit, int unit_size)
+  {
+    std::string unit_str;
+    if (!cstr2string(unit, unit_size, unit_str)) return;
+    CTimer::get("XIOS").resume();
+    axisgroup_hdl->unit.setValue(unit_str);
+    CTimer::get("XIOS").suspend();
+  }
+
+  void cxios_get_axisgroup_unit(axisgroup_Ptr axisgroup_hdl, char * unit, int unit_size)
+  {
+    CTimer::get("XIOS").resume();
+    if (!string_copy(axisgroup_hdl->unit.getInheritedValue(), unit, unit_size))
+      ERROR("void cxios_get_axisgroup_unit(axisgroup_Ptr axisgroup_hdl, char * unit, int unit_size)", << "Input string is too short");
+    CTimer::get("XIOS").suspend();
+  }
+
+  bool cxios_is_defined_axisgroup_unit(axisgroup_Ptr axisgroup_hdl)
+  {
+     CTimer::get("XIOS").resume();
+     bool isDefined = axisgroup_hdl->unit.hasInheritedValue();
+     CTimer::get("XIOS").suspend();
+     return isDefined;
+  }
+
+
+  void cxios_set_axisgroup_value(axisgroup_Ptr axisgroup_hdl, double* value, int* extent)
+  {
+    CTimer::get("XIOS").resume();
+    CArray<double,1> tmp(value, shape(extent[0]), neverDeleteData);
+    axisgroup_hdl->value.reference(tmp.copy());
+     CTimer::get("XIOS").suspend();
+  }
+
+  void cxios_get_axisgroup_value(axisgroup_Ptr axisgroup_hdl, double* value, int* extent)
+  {
+    CTimer::get("XIOS").resume();
+    CArray<double,1> tmp(value, shape(extent[0]), neverDeleteData);
+    tmp=axisgroup_hdl->value.getInheritedValue();
+     CTimer::get("XIOS").suspend();
+  }
+
+  bool cxios_is_defined_axisgroup_value(axisgroup_Ptr axisgroup_hdl)
+  {
+     CTimer::get("XIOS").resume();
+     bool isDefined = axisgroup_hdl->value.hasInheritedValue();
+     CTimer::get("XIOS").suspend();
+     return isDefined;
+  }
+}
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/c_attr/iccalendar_wrapper_attr.cpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/c_attr/iccalendar_wrapper_attr.cpp	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/c_attr/iccalendar_wrapper_attr.cpp	(revision 1749)
@@ -0,0 +1,299 @@
+/* ************************************************************************** *
+ *               Interface auto generated - do not modify                     *
+ * ************************************************************************** */
+
+#include <boost/multi_array.hpp>
+#include "xios.hpp"
+#include "attribute_template.hpp"
+#include "object_template.hpp"
+#include "group_template.hpp"
+#include "icutil.hpp"
+#include "icdate.hpp"
+#include "timer.hpp"
+#include "node_type.hpp"
+
+extern "C"
+{
+  typedef xios::CCalendarWrapper* calendar_wrapper_Ptr;
+
+  void cxios_set_calendar_wrapper_comment(calendar_wrapper_Ptr calendar_wrapper_hdl, const char * comment, int comment_size)
+  {
+    std::string comment_str;
+    if (!cstr2string(comment, comment_size, comment_str)) return;
+    CTimer::get("XIOS").resume();
+    calendar_wrapper_hdl->comment.setValue(comment_str);
+    CTimer::get("XIOS").suspend();
+  }
+
+  void cxios_get_calendar_wrapper_comment(calendar_wrapper_Ptr calendar_wrapper_hdl, char * comment, int comment_size)
+  {
+    CTimer::get("XIOS").resume();
+    if (!string_copy(calendar_wrapper_hdl->comment.getInheritedValue(), comment, comment_size))
+      ERROR("void cxios_get_calendar_wrapper_comment(calendar_wrapper_Ptr calendar_wrapper_hdl, char * comment, int comment_size)", << "Input string is too short");
+    CTimer::get("XIOS").suspend();
+  }
+
+  bool cxios_is_defined_calendar_wrapper_comment(calendar_wrapper_Ptr calendar_wrapper_hdl)
+  {
+     CTimer::get("XIOS").resume();
+     bool isDefined = calendar_wrapper_hdl->comment.hasInheritedValue();
+     CTimer::get("XIOS").suspend();
+     return isDefined;
+  }
+
+
+  void cxios_set_calendar_wrapper_day_length(calendar_wrapper_Ptr calendar_wrapper_hdl, int day_length)
+  {
+    CTimer::get("XIOS").resume();
+    calendar_wrapper_hdl->day_length.setValue(day_length);
+    CTimer::get("XIOS").suspend();
+  }
+
+  void cxios_get_calendar_wrapper_day_length(calendar_wrapper_Ptr calendar_wrapper_hdl, int* day_length)
+  {
+    CTimer::get("XIOS").resume();
+    *day_length = calendar_wrapper_hdl->day_length.getInheritedValue();
+    CTimer::get("XIOS").suspend();
+  }
+
+  bool cxios_is_defined_calendar_wrapper_day_length(calendar_wrapper_Ptr calendar_wrapper_hdl)
+  {
+     CTimer::get("XIOS").resume();
+     bool isDefined = calendar_wrapper_hdl->day_length.hasInheritedValue();
+     CTimer::get("XIOS").suspend();
+     return isDefined;
+  }
+
+
+  void cxios_set_calendar_wrapper_leap_year_drift(calendar_wrapper_Ptr calendar_wrapper_hdl, double leap_year_drift)
+  {
+    CTimer::get("XIOS").resume();
+    calendar_wrapper_hdl->leap_year_drift.setValue(leap_year_drift);
+    CTimer::get("XIOS").suspend();
+  }
+
+  void cxios_get_calendar_wrapper_leap_year_drift(calendar_wrapper_Ptr calendar_wrapper_hdl, double* leap_year_drift)
+  {
+    CTimer::get("XIOS").resume();
+    *leap_year_drift = calendar_wrapper_hdl->leap_year_drift.getInheritedValue();
+    CTimer::get("XIOS").suspend();
+  }
+
+  bool cxios_is_defined_calendar_wrapper_leap_year_drift(calendar_wrapper_Ptr calendar_wrapper_hdl)
+  {
+     CTimer::get("XIOS").resume();
+     bool isDefined = calendar_wrapper_hdl->leap_year_drift.hasInheritedValue();
+     CTimer::get("XIOS").suspend();
+     return isDefined;
+  }
+
+
+  void cxios_set_calendar_wrapper_leap_year_drift_offset(calendar_wrapper_Ptr calendar_wrapper_hdl, double leap_year_drift_offset)
+  {
+    CTimer::get("XIOS").resume();
+    calendar_wrapper_hdl->leap_year_drift_offset.setValue(leap_year_drift_offset);
+    CTimer::get("XIOS").suspend();
+  }
+
+  void cxios_get_calendar_wrapper_leap_year_drift_offset(calendar_wrapper_Ptr calendar_wrapper_hdl, double* leap_year_drift_offset)
+  {
+    CTimer::get("XIOS").resume();
+    *leap_year_drift_offset = calendar_wrapper_hdl->leap_year_drift_offset.getInheritedValue();
+    CTimer::get("XIOS").suspend();
+  }
+
+  bool cxios_is_defined_calendar_wrapper_leap_year_drift_offset(calendar_wrapper_Ptr calendar_wrapper_hdl)
+  {
+     CTimer::get("XIOS").resume();
+     bool isDefined = calendar_wrapper_hdl->leap_year_drift_offset.hasInheritedValue();
+     CTimer::get("XIOS").suspend();
+     return isDefined;
+  }
+
+
+  void cxios_set_calendar_wrapper_leap_year_month(calendar_wrapper_Ptr calendar_wrapper_hdl, int leap_year_month)
+  {
+    CTimer::get("XIOS").resume();
+    calendar_wrapper_hdl->leap_year_month.setValue(leap_year_month);
+    CTimer::get("XIOS").suspend();
+  }
+
+  void cxios_get_calendar_wrapper_leap_year_month(calendar_wrapper_Ptr calendar_wrapper_hdl, int* leap_year_month)
+  {
+    CTimer::get("XIOS").resume();
+    *leap_year_month = calendar_wrapper_hdl->leap_year_month.getInheritedValue();
+    CTimer::get("XIOS").suspend();
+  }
+
+  bool cxios_is_defined_calendar_wrapper_leap_year_month(calendar_wrapper_Ptr calendar_wrapper_hdl)
+  {
+     CTimer::get("XIOS").resume();
+     bool isDefined = calendar_wrapper_hdl->leap_year_month.hasInheritedValue();
+     CTimer::get("XIOS").suspend();
+     return isDefined;
+  }
+
+
+  void cxios_set_calendar_wrapper_month_lengths(calendar_wrapper_Ptr calendar_wrapper_hdl, int* month_lengths, int* extent)
+  {
+    CTimer::get("XIOS").resume();
+    CArray<int,1> tmp(month_lengths, shape(extent[0]), neverDeleteData);
+    calendar_wrapper_hdl->month_lengths.reference(tmp.copy());
+     CTimer::get("XIOS").suspend();
+  }
+
+  void cxios_get_calendar_wrapper_month_lengths(calendar_wrapper_Ptr calendar_wrapper_hdl, int* month_lengths, int* extent)
+  {
+    CTimer::get("XIOS").resume();
+    CArray<int,1> tmp(month_lengths, shape(extent[0]), neverDeleteData);
+    tmp=calendar_wrapper_hdl->month_lengths.getInheritedValue();
+     CTimer::get("XIOS").suspend();
+  }
+
+  bool cxios_is_defined_calendar_wrapper_month_lengths(calendar_wrapper_Ptr calendar_wrapper_hdl)
+  {
+     CTimer::get("XIOS").resume();
+     bool isDefined = calendar_wrapper_hdl->month_lengths.hasInheritedValue();
+     CTimer::get("XIOS").suspend();
+     return isDefined;
+  }
+
+
+  void cxios_set_calendar_wrapper_start_date(calendar_wrapper_Ptr calendar_wrapper_hdl, const char * start_date, int start_date_size)
+  {
+    std::string start_date_str;
+    if (!cstr2string(start_date, start_date_size, start_date_str)) return;
+    CTimer::get("XIOS").resume();
+    calendar_wrapper_hdl->start_date.setValue(start_date_str);
+    CTimer::get("XIOS").suspend();
+  }
+
+  void cxios_get_calendar_wrapper_start_date(calendar_wrapper_Ptr calendar_wrapper_hdl, char * start_date, int start_date_size)
+  {
+    CTimer::get("XIOS").resume();
+    if (!string_copy(calendar_wrapper_hdl->start_date.getInheritedValue(), start_date, start_date_size))
+      ERROR("void cxios_get_calendar_wrapper_start_date(calendar_wrapper_Ptr calendar_wrapper_hdl, char * start_date, int start_date_size)", << "Input string is too short");
+    CTimer::get("XIOS").suspend();
+  }
+
+  bool cxios_is_defined_calendar_wrapper_start_date(calendar_wrapper_Ptr calendar_wrapper_hdl)
+  {
+     CTimer::get("XIOS").resume();
+     bool isDefined = calendar_wrapper_hdl->start_date.hasInheritedValue();
+     CTimer::get("XIOS").suspend();
+     return isDefined;
+  }
+
+
+  void cxios_set_calendar_wrapper_time_origin(calendar_wrapper_Ptr calendar_wrapper_hdl, const char * time_origin, int time_origin_size)
+  {
+    std::string time_origin_str;
+    if (!cstr2string(time_origin, time_origin_size, time_origin_str)) return;
+    CTimer::get("XIOS").resume();
+    calendar_wrapper_hdl->time_origin.setValue(time_origin_str);
+    CTimer::get("XIOS").suspend();
+  }
+
+  void cxios_get_calendar_wrapper_time_origin(calendar_wrapper_Ptr calendar_wrapper_hdl, char * time_origin, int time_origin_size)
+  {
+    CTimer::get("XIOS").resume();
+    if (!string_copy(calendar_wrapper_hdl->time_origin.getInheritedValue(), time_origin, time_origin_size))
+      ERROR("void cxios_get_calendar_wrapper_time_origin(calendar_wrapper_Ptr calendar_wrapper_hdl, char * time_origin, int time_origin_size)", << "Input string is too short");
+    CTimer::get("XIOS").suspend();
+  }
+
+  bool cxios_is_defined_calendar_wrapper_time_origin(calendar_wrapper_Ptr calendar_wrapper_hdl)
+  {
+     CTimer::get("XIOS").resume();
+     bool isDefined = calendar_wrapper_hdl->time_origin.hasInheritedValue();
+     CTimer::get("XIOS").suspend();
+     return isDefined;
+  }
+
+
+  void cxios_set_calendar_wrapper_timestep(calendar_wrapper_Ptr calendar_wrapper_hdl, cxios_duration timestep_c)
+  {
+    CTimer::get("XIOS").resume();
+    calendar_wrapper_hdl->timestep.allocate();
+    CDuration& timestep = calendar_wrapper_hdl->timestep.get();
+    timestep.year = timestep_c.year;
+    timestep.month = timestep_c.month;
+    timestep.day = timestep_c.day;
+    timestep.hour = timestep_c.hour;
+    timestep.minute = timestep_c.minute;
+    timestep.second = timestep_c.second;
+    timestep.timestep = timestep_c.timestep;
+    CTimer::get("XIOS").suspend();
+  }
+
+  void cxios_get_calendar_wrapper_timestep(calendar_wrapper_Ptr calendar_wrapper_hdl, cxios_duration* timestep_c)
+  {
+    CTimer::get("XIOS").resume();
+    CDuration timestep = calendar_wrapper_hdl->timestep.getInheritedValue();
+    timestep_c->year = timestep.year;
+    timestep_c->month = timestep.month;
+    timestep_c->day = timestep.day;
+    timestep_c->hour = timestep.hour;
+    timestep_c->minute = timestep.minute;
+    timestep_c->second = timestep.second;
+    timestep_c->timestep = timestep.timestep;
+    CTimer::get("XIOS").suspend();
+  }
+
+  bool cxios_is_defined_calendar_wrapper_timestep(calendar_wrapper_Ptr calendar_wrapper_hdl)
+  {
+     CTimer::get("XIOS").resume();
+     bool isDefined = calendar_wrapper_hdl->timestep.hasInheritedValue();
+     CTimer::get("XIOS").suspend();
+     return isDefined;
+  }
+
+
+  void cxios_set_calendar_wrapper_type(calendar_wrapper_Ptr calendar_wrapper_hdl, const char * type, int type_size)
+  {
+    std::string type_str;
+    if (!cstr2string(type, type_size, type_str)) return;
+    CTimer::get("XIOS").resume();
+    calendar_wrapper_hdl->type.fromString(type_str);
+    CTimer::get("XIOS").suspend();
+  }
+
+  void cxios_get_calendar_wrapper_type(calendar_wrapper_Ptr calendar_wrapper_hdl, char * type, int type_size)
+  {
+    CTimer::get("XIOS").resume();
+    if (!string_copy(calendar_wrapper_hdl->type.getInheritedStringValue(), type, type_size))
+      ERROR("void cxios_get_calendar_wrapper_type(calendar_wrapper_Ptr calendar_wrapper_hdl, char * type, int type_size)", << "Input string is too short");
+    CTimer::get("XIOS").suspend();
+  }
+
+  bool cxios_is_defined_calendar_wrapper_type(calendar_wrapper_Ptr calendar_wrapper_hdl)
+  {
+     CTimer::get("XIOS").resume();
+     bool isDefined = calendar_wrapper_hdl->type.hasInheritedValue();
+     CTimer::get("XIOS").suspend();
+     return isDefined;
+  }
+
+
+  void cxios_set_calendar_wrapper_year_length(calendar_wrapper_Ptr calendar_wrapper_hdl, int year_length)
+  {
+    CTimer::get("XIOS").resume();
+    calendar_wrapper_hdl->year_length.setValue(year_length);
+    CTimer::get("XIOS").suspend();
+  }
+
+  void cxios_get_calendar_wrapper_year_length(calendar_wrapper_Ptr calendar_wrapper_hdl, int* year_length)
+  {
+    CTimer::get("XIOS").resume();
+    *year_length = calendar_wrapper_hdl->year_length.getInheritedValue();
+    CTimer::get("XIOS").suspend();
+  }
+
+  bool cxios_is_defined_calendar_wrapper_year_length(calendar_wrapper_Ptr calendar_wrapper_hdl)
+  {
+     CTimer::get("XIOS").resume();
+     bool isDefined = calendar_wrapper_hdl->year_length.hasInheritedValue();
+     CTimer::get("XIOS").suspend();
+     return isDefined;
+  }
+}
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/c_attr/iccompute_connectivity_domain_attr.cpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/c_attr/iccompute_connectivity_domain_attr.cpp	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/c_attr/iccompute_connectivity_domain_attr.cpp	(revision 1749)
@@ -0,0 +1,116 @@
+/* ************************************************************************** *
+ *               Interface auto generated - do not modify                     *
+ * ************************************************************************** */
+
+#include <boost/multi_array.hpp>
+#include "xios.hpp"
+#include "attribute_template.hpp"
+#include "object_template.hpp"
+#include "group_template.hpp"
+#include "icutil.hpp"
+#include "icdate.hpp"
+#include "timer.hpp"
+#include "node_type.hpp"
+
+extern "C"
+{
+  typedef xios::CComputeConnectivityDomain* compute_connectivity_domain_Ptr;
+
+  void cxios_set_compute_connectivity_domain_local_neighbor(compute_connectivity_domain_Ptr compute_connectivity_domain_hdl, int* local_neighbor, int* extent)
+  {
+    CTimer::get("XIOS").resume();
+    CArray<int,2> tmp(local_neighbor, shape(extent[0], extent[1]), neverDeleteData);
+    compute_connectivity_domain_hdl->local_neighbor.reference(tmp.copy());
+     CTimer::get("XIOS").suspend();
+  }
+
+  void cxios_get_compute_connectivity_domain_local_neighbor(compute_connectivity_domain_Ptr compute_connectivity_domain_hdl, int* local_neighbor, int* extent)
+  {
+    CTimer::get("XIOS").resume();
+    CArray<int,2> tmp(local_neighbor, shape(extent[0], extent[1]), neverDeleteData);
+    tmp=compute_connectivity_domain_hdl->local_neighbor.getInheritedValue();
+     CTimer::get("XIOS").suspend();
+  }
+
+  bool cxios_is_defined_compute_connectivity_domain_local_neighbor(compute_connectivity_domain_Ptr compute_connectivity_domain_hdl)
+  {
+     CTimer::get("XIOS").resume();
+     bool isDefined = compute_connectivity_domain_hdl->local_neighbor.hasInheritedValue();
+     CTimer::get("XIOS").suspend();
+     return isDefined;
+  }
+
+
+  void cxios_set_compute_connectivity_domain_n_neighbor(compute_connectivity_domain_Ptr compute_connectivity_domain_hdl, int* n_neighbor, int* extent)
+  {
+    CTimer::get("XIOS").resume();
+    CArray<int,1> tmp(n_neighbor, shape(extent[0]), neverDeleteData);
+    compute_connectivity_domain_hdl->n_neighbor.reference(tmp.copy());
+     CTimer::get("XIOS").suspend();
+  }
+
+  void cxios_get_compute_connectivity_domain_n_neighbor(compute_connectivity_domain_Ptr compute_connectivity_domain_hdl, int* n_neighbor, int* extent)
+  {
+    CTimer::get("XIOS").resume();
+    CArray<int,1> tmp(n_neighbor, shape(extent[0]), neverDeleteData);
+    tmp=compute_connectivity_domain_hdl->n_neighbor.getInheritedValue();
+     CTimer::get("XIOS").suspend();
+  }
+
+  bool cxios_is_defined_compute_connectivity_domain_n_neighbor(compute_connectivity_domain_Ptr compute_connectivity_domain_hdl)
+  {
+     CTimer::get("XIOS").resume();
+     bool isDefined = compute_connectivity_domain_hdl->n_neighbor.hasInheritedValue();
+     CTimer::get("XIOS").suspend();
+     return isDefined;
+  }
+
+
+  void cxios_set_compute_connectivity_domain_n_neighbor_max(compute_connectivity_domain_Ptr compute_connectivity_domain_hdl, int n_neighbor_max)
+  {
+    CTimer::get("XIOS").resume();
+    compute_connectivity_domain_hdl->n_neighbor_max.setValue(n_neighbor_max);
+    CTimer::get("XIOS").suspend();
+  }
+
+  void cxios_get_compute_connectivity_domain_n_neighbor_max(compute_connectivity_domain_Ptr compute_connectivity_domain_hdl, int* n_neighbor_max)
+  {
+    CTimer::get("XIOS").resume();
+    *n_neighbor_max = compute_connectivity_domain_hdl->n_neighbor_max.getInheritedValue();
+    CTimer::get("XIOS").suspend();
+  }
+
+  bool cxios_is_defined_compute_connectivity_domain_n_neighbor_max(compute_connectivity_domain_Ptr compute_connectivity_domain_hdl)
+  {
+     CTimer::get("XIOS").resume();
+     bool isDefined = compute_connectivity_domain_hdl->n_neighbor_max.hasInheritedValue();
+     CTimer::get("XIOS").suspend();
+     return isDefined;
+  }
+
+
+  void cxios_set_compute_connectivity_domain_type(compute_connectivity_domain_Ptr compute_connectivity_domain_hdl, const char * type, int type_size)
+  {
+    std::string type_str;
+    if (!cstr2string(type, type_size, type_str)) return;
+    CTimer::get("XIOS").resume();
+    compute_connectivity_domain_hdl->type.fromString(type_str);
+    CTimer::get("XIOS").suspend();
+  }
+
+  void cxios_get_compute_connectivity_domain_type(compute_connectivity_domain_Ptr compute_connectivity_domain_hdl, char * type, int type_size)
+  {
+    CTimer::get("XIOS").resume();
+    if (!string_copy(compute_connectivity_domain_hdl->type.getInheritedStringValue(), type, type_size))
+      ERROR("void cxios_get_compute_connectivity_domain_type(compute_connectivity_domain_Ptr compute_connectivity_domain_hdl, char * type, int type_size)", << "Input string is too short");
+    CTimer::get("XIOS").suspend();
+  }
+
+  bool cxios_is_defined_compute_connectivity_domain_type(compute_connectivity_domain_Ptr compute_connectivity_domain_hdl)
+  {
+     CTimer::get("XIOS").resume();
+     bool isDefined = compute_connectivity_domain_hdl->type.hasInheritedValue();
+     CTimer::get("XIOS").suspend();
+     return isDefined;
+  }
+}
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/c_attr/iccontext_attr.cpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/c_attr/iccontext_attr.cpp	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/c_attr/iccontext_attr.cpp	(revision 1749)
@@ -0,0 +1,43 @@
+/* ************************************************************************** *
+ *               Interface auto generated - do not modify                     *
+ * ************************************************************************** */
+
+#include <boost/multi_array.hpp>
+#include "xios.hpp"
+#include "attribute_template.hpp"
+#include "object_template.hpp"
+#include "group_template.hpp"
+#include "icutil.hpp"
+#include "icdate.hpp"
+#include "timer.hpp"
+#include "node_type.hpp"
+
+extern "C"
+{
+  typedef xios::CContext* context_Ptr;
+
+  void cxios_set_context_output_dir(context_Ptr context_hdl, const char * output_dir, int output_dir_size)
+  {
+    std::string output_dir_str;
+    if (!cstr2string(output_dir, output_dir_size, output_dir_str)) return;
+    CTimer::get("XIOS").resume();
+    context_hdl->output_dir.setValue(output_dir_str);
+    CTimer::get("XIOS").suspend();
+  }
+
+  void cxios_get_context_output_dir(context_Ptr context_hdl, char * output_dir, int output_dir_size)
+  {
+    CTimer::get("XIOS").resume();
+    if (!string_copy(context_hdl->output_dir.getInheritedValue(), output_dir, output_dir_size))
+      ERROR("void cxios_get_context_output_dir(context_Ptr context_hdl, char * output_dir, int output_dir_size)", << "Input string is too short");
+    CTimer::get("XIOS").suspend();
+  }
+
+  bool cxios_is_defined_context_output_dir(context_Ptr context_hdl)
+  {
+     CTimer::get("XIOS").resume();
+     bool isDefined = context_hdl->output_dir.hasInheritedValue();
+     CTimer::get("XIOS").suspend();
+     return isDefined;
+  }
+}
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/c_attr/icdomain_attr.cpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/c_attr/icdomain_attr.cpp	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/c_attr/icdomain_attr.cpp	(revision 1749)
@@ -0,0 +1,1026 @@
+/* ************************************************************************** *
+ *               Interface auto generated - do not modify                     *
+ * ************************************************************************** */
+
+#include <boost/multi_array.hpp>
+#include "xios.hpp"
+#include "attribute_template.hpp"
+#include "object_template.hpp"
+#include "group_template.hpp"
+#include "icutil.hpp"
+#include "icdate.hpp"
+#include "timer.hpp"
+#include "node_type.hpp"
+
+extern "C"
+{
+  typedef xios::CDomain* domain_Ptr;
+
+  void cxios_set_domain_area(domain_Ptr domain_hdl, double* area, int* extent)
+  {
+    CTimer::get("XIOS").resume();
+    CArray<double,2> tmp(area, shape(extent[0], extent[1]), neverDeleteData);
+    domain_hdl->area.reference(tmp.copy());
+     CTimer::get("XIOS").suspend();
+  }
+
+  void cxios_get_domain_area(domain_Ptr domain_hdl, double* area, int* extent)
+  {
+    CTimer::get("XIOS").resume();
+    CArray<double,2> tmp(area, shape(extent[0], extent[1]), neverDeleteData);
+    tmp=domain_hdl->area.getInheritedValue();
+     CTimer::get("XIOS").suspend();
+  }
+
+  bool cxios_is_defined_domain_area(domain_Ptr domain_hdl)
+  {
+     CTimer::get("XIOS").resume();
+     bool isDefined = domain_hdl->area.hasInheritedValue();
+     CTimer::get("XIOS").suspend();
+     return isDefined;
+  }
+
+
+  void cxios_set_domain_bounds_lat_1d(domain_Ptr domain_hdl, double* bounds_lat_1d, int* extent)
+  {
+    CTimer::get("XIOS").resume();
+    CArray<double,2> tmp(bounds_lat_1d, shape(extent[0], extent[1]), neverDeleteData);
+    domain_hdl->bounds_lat_1d.reference(tmp.copy());
+     CTimer::get("XIOS").suspend();
+  }
+
+  void cxios_get_domain_bounds_lat_1d(domain_Ptr domain_hdl, double* bounds_lat_1d, int* extent)
+  {
+    CTimer::get("XIOS").resume();
+    CArray<double,2> tmp(bounds_lat_1d, shape(extent[0], extent[1]), neverDeleteData);
+    tmp=domain_hdl->bounds_lat_1d.getInheritedValue();
+     CTimer::get("XIOS").suspend();
+  }
+
+  bool cxios_is_defined_domain_bounds_lat_1d(domain_Ptr domain_hdl)
+  {
+     CTimer::get("XIOS").resume();
+     bool isDefined = domain_hdl->bounds_lat_1d.hasInheritedValue();
+     CTimer::get("XIOS").suspend();
+     return isDefined;
+  }
+
+
+  void cxios_set_domain_bounds_lat_2d(domain_Ptr domain_hdl, double* bounds_lat_2d, int* extent)
+  {
+    CTimer::get("XIOS").resume();
+    CArray<double,3> tmp(bounds_lat_2d, shape(extent[0], extent[1], extent[2]), neverDeleteData);
+    domain_hdl->bounds_lat_2d.reference(tmp.copy());
+     CTimer::get("XIOS").suspend();
+  }
+
+  void cxios_get_domain_bounds_lat_2d(domain_Ptr domain_hdl, double* bounds_lat_2d, int* extent)
+  {
+    CTimer::get("XIOS").resume();
+    CArray<double,3> tmp(bounds_lat_2d, shape(extent[0], extent[1], extent[2]), neverDeleteData);
+    tmp=domain_hdl->bounds_lat_2d.getInheritedValue();
+     CTimer::get("XIOS").suspend();
+  }
+
+  bool cxios_is_defined_domain_bounds_lat_2d(domain_Ptr domain_hdl)
+  {
+     CTimer::get("XIOS").resume();
+     bool isDefined = domain_hdl->bounds_lat_2d.hasInheritedValue();
+     CTimer::get("XIOS").suspend();
+     return isDefined;
+  }
+
+
+  void cxios_set_domain_bounds_lat_name(domain_Ptr domain_hdl, const char * bounds_lat_name, int bounds_lat_name_size)
+  {
+    std::string bounds_lat_name_str;
+    if (!cstr2string(bounds_lat_name, bounds_lat_name_size, bounds_lat_name_str)) return;
+    CTimer::get("XIOS").resume();
+    domain_hdl->bounds_lat_name.setValue(bounds_lat_name_str);
+    CTimer::get("XIOS").suspend();
+  }
+
+  void cxios_get_domain_bounds_lat_name(domain_Ptr domain_hdl, char * bounds_lat_name, int bounds_lat_name_size)
+  {
+    CTimer::get("XIOS").resume();
+    if (!string_copy(domain_hdl->bounds_lat_name.getInheritedValue(), bounds_lat_name, bounds_lat_name_size))
+      ERROR("void cxios_get_domain_bounds_lat_name(domain_Ptr domain_hdl, char * bounds_lat_name, int bounds_lat_name_size)", << "Input string is too short");
+    CTimer::get("XIOS").suspend();
+  }
+
+  bool cxios_is_defined_domain_bounds_lat_name(domain_Ptr domain_hdl)
+  {
+     CTimer::get("XIOS").resume();
+     bool isDefined = domain_hdl->bounds_lat_name.hasInheritedValue();
+     CTimer::get("XIOS").suspend();
+     return isDefined;
+  }
+
+
+  void cxios_set_domain_bounds_lon_1d(domain_Ptr domain_hdl, double* bounds_lon_1d, int* extent)
+  {
+    CTimer::get("XIOS").resume();
+    CArray<double,2> tmp(bounds_lon_1d, shape(extent[0], extent[1]), neverDeleteData);
+    domain_hdl->bounds_lon_1d.reference(tmp.copy());
+     CTimer::get("XIOS").suspend();
+  }
+
+  void cxios_get_domain_bounds_lon_1d(domain_Ptr domain_hdl, double* bounds_lon_1d, int* extent)
+  {
+    CTimer::get("XIOS").resume();
+    CArray<double,2> tmp(bounds_lon_1d, shape(extent[0], extent[1]), neverDeleteData);
+    tmp=domain_hdl->bounds_lon_1d.getInheritedValue();
+     CTimer::get("XIOS").suspend();
+  }
+
+  bool cxios_is_defined_domain_bounds_lon_1d(domain_Ptr domain_hdl)
+  {
+     CTimer::get("XIOS").resume();
+     bool isDefined = domain_hdl->bounds_lon_1d.hasInheritedValue();
+     CTimer::get("XIOS").suspend();
+     return isDefined;
+  }
+
+
+  void cxios_set_domain_bounds_lon_2d(domain_Ptr domain_hdl, double* bounds_lon_2d, int* extent)
+  {
+    CTimer::get("XIOS").resume();
+    CArray<double,3> tmp(bounds_lon_2d, shape(extent[0], extent[1], extent[2]), neverDeleteData);
+    domain_hdl->bounds_lon_2d.reference(tmp.copy());
+     CTimer::get("XIOS").suspend();
+  }
+
+  void cxios_get_domain_bounds_lon_2d(domain_Ptr domain_hdl, double* bounds_lon_2d, int* extent)
+  {
+    CTimer::get("XIOS").resume();
+    CArray<double,3> tmp(bounds_lon_2d, shape(extent[0], extent[1], extent[2]), neverDeleteData);
+    tmp=domain_hdl->bounds_lon_2d.getInheritedValue();
+     CTimer::get("XIOS").suspend();
+  }
+
+  bool cxios_is_defined_domain_bounds_lon_2d(domain_Ptr domain_hdl)
+  {
+     CTimer::get("XIOS").resume();
+     bool isDefined = domain_hdl->bounds_lon_2d.hasInheritedValue();
+     CTimer::get("XIOS").suspend();
+     return isDefined;
+  }
+
+
+  void cxios_set_domain_bounds_lon_name(domain_Ptr domain_hdl, const char * bounds_lon_name, int bounds_lon_name_size)
+  {
+    std::string bounds_lon_name_str;
+    if (!cstr2string(bounds_lon_name, bounds_lon_name_size, bounds_lon_name_str)) return;
+    CTimer::get("XIOS").resume();
+    domain_hdl->bounds_lon_name.setValue(bounds_lon_name_str);
+    CTimer::get("XIOS").suspend();
+  }
+
+  void cxios_get_domain_bounds_lon_name(domain_Ptr domain_hdl, char * bounds_lon_name, int bounds_lon_name_size)
+  {
+    CTimer::get("XIOS").resume();
+    if (!string_copy(domain_hdl->bounds_lon_name.getInheritedValue(), bounds_lon_name, bounds_lon_name_size))
+      ERROR("void cxios_get_domain_bounds_lon_name(domain_Ptr domain_hdl, char * bounds_lon_name, int bounds_lon_name_size)", << "Input string is too short");
+    CTimer::get("XIOS").suspend();
+  }
+
+  bool cxios_is_defined_domain_bounds_lon_name(domain_Ptr domain_hdl)
+  {
+     CTimer::get("XIOS").resume();
+     bool isDefined = domain_hdl->bounds_lon_name.hasInheritedValue();
+     CTimer::get("XIOS").suspend();
+     return isDefined;
+  }
+
+
+  void cxios_set_domain_comment(domain_Ptr domain_hdl, const char * comment, int comment_size)
+  {
+    std::string comment_str;
+    if (!cstr2string(comment, comment_size, comment_str)) return;
+    CTimer::get("XIOS").resume();
+    domain_hdl->comment.setValue(comment_str);
+    CTimer::get("XIOS").suspend();
+  }
+
+  void cxios_get_domain_comment(domain_Ptr domain_hdl, char * comment, int comment_size)
+  {
+    CTimer::get("XIOS").resume();
+    if (!string_copy(domain_hdl->comment.getInheritedValue(), comment, comment_size))
+      ERROR("void cxios_get_domain_comment(domain_Ptr domain_hdl, char * comment, int comment_size)", << "Input string is too short");
+    CTimer::get("XIOS").suspend();
+  }
+
+  bool cxios_is_defined_domain_comment(domain_Ptr domain_hdl)
+  {
+     CTimer::get("XIOS").resume();
+     bool isDefined = domain_hdl->comment.hasInheritedValue();
+     CTimer::get("XIOS").suspend();
+     return isDefined;
+  }
+
+
+  void cxios_set_domain_data_dim(domain_Ptr domain_hdl, int data_dim)
+  {
+    CTimer::get("XIOS").resume();
+    domain_hdl->data_dim.setValue(data_dim);
+    CTimer::get("XIOS").suspend();
+  }
+
+  void cxios_get_domain_data_dim(domain_Ptr domain_hdl, int* data_dim)
+  {
+    CTimer::get("XIOS").resume();
+    *data_dim = domain_hdl->data_dim.getInheritedValue();
+    CTimer::get("XIOS").suspend();
+  }
+
+  bool cxios_is_defined_domain_data_dim(domain_Ptr domain_hdl)
+  {
+     CTimer::get("XIOS").resume();
+     bool isDefined = domain_hdl->data_dim.hasInheritedValue();
+     CTimer::get("XIOS").suspend();
+     return isDefined;
+  }
+
+
+  void cxios_set_domain_data_i_index(domain_Ptr domain_hdl, int* data_i_index, int* extent)
+  {
+    CTimer::get("XIOS").resume();
+    CArray<int,1> tmp(data_i_index, shape(extent[0]), neverDeleteData);
+    domain_hdl->data_i_index.reference(tmp.copy());
+     CTimer::get("XIOS").suspend();
+  }
+
+  void cxios_get_domain_data_i_index(domain_Ptr domain_hdl, int* data_i_index, int* extent)
+  {
+    CTimer::get("XIOS").resume();
+    CArray<int,1> tmp(data_i_index, shape(extent[0]), neverDeleteData);
+    tmp=domain_hdl->data_i_index.getInheritedValue();
+     CTimer::get("XIOS").suspend();
+  }
+
+  bool cxios_is_defined_domain_data_i_index(domain_Ptr domain_hdl)
+  {
+     CTimer::get("XIOS").resume();
+     bool isDefined = domain_hdl->data_i_index.hasInheritedValue();
+     CTimer::get("XIOS").suspend();
+     return isDefined;
+  }
+
+
+  void cxios_set_domain_data_ibegin(domain_Ptr domain_hdl, int data_ibegin)
+  {
+    CTimer::get("XIOS").resume();
+    domain_hdl->data_ibegin.setValue(data_ibegin);
+    CTimer::get("XIOS").suspend();
+  }
+
+  void cxios_get_domain_data_ibegin(domain_Ptr domain_hdl, int* data_ibegin)
+  {
+    CTimer::get("XIOS").resume();
+    *data_ibegin = domain_hdl->data_ibegin.getInheritedValue();
+    CTimer::get("XIOS").suspend();
+  }
+
+  bool cxios_is_defined_domain_data_ibegin(domain_Ptr domain_hdl)
+  {
+     CTimer::get("XIOS").resume();
+     bool isDefined = domain_hdl->data_ibegin.hasInheritedValue();
+     CTimer::get("XIOS").suspend();
+     return isDefined;
+  }
+
+
+  void cxios_set_domain_data_j_index(domain_Ptr domain_hdl, int* data_j_index, int* extent)
+  {
+    CTimer::get("XIOS").resume();
+    CArray<int,1> tmp(data_j_index, shape(extent[0]), neverDeleteData);
+    domain_hdl->data_j_index.reference(tmp.copy());
+     CTimer::get("XIOS").suspend();
+  }
+
+  void cxios_get_domain_data_j_index(domain_Ptr domain_hdl, int* data_j_index, int* extent)
+  {
+    CTimer::get("XIOS").resume();
+    CArray<int,1> tmp(data_j_index, shape(extent[0]), neverDeleteData);
+    tmp=domain_hdl->data_j_index.getInheritedValue();
+     CTimer::get("XIOS").suspend();
+  }
+
+  bool cxios_is_defined_domain_data_j_index(domain_Ptr domain_hdl)
+  {
+     CTimer::get("XIOS").resume();
+     bool isDefined = domain_hdl->data_j_index.hasInheritedValue();
+     CTimer::get("XIOS").suspend();
+     return isDefined;
+  }
+
+
+  void cxios_set_domain_data_jbegin(domain_Ptr domain_hdl, int data_jbegin)
+  {
+    CTimer::get("XIOS").resume();
+    domain_hdl->data_jbegin.setValue(data_jbegin);
+    CTimer::get("XIOS").suspend();
+  }
+
+  void cxios_get_domain_data_jbegin(domain_Ptr domain_hdl, int* data_jbegin)
+  {
+    CTimer::get("XIOS").resume();
+    *data_jbegin = domain_hdl->data_jbegin.getInheritedValue();
+    CTimer::get("XIOS").suspend();
+  }
+
+  bool cxios_is_defined_domain_data_jbegin(domain_Ptr domain_hdl)
+  {
+     CTimer::get("XIOS").resume();
+     bool isDefined = domain_hdl->data_jbegin.hasInheritedValue();
+     CTimer::get("XIOS").suspend();
+     return isDefined;
+  }
+
+
+  void cxios_set_domain_data_ni(domain_Ptr domain_hdl, int data_ni)
+  {
+    CTimer::get("XIOS").resume();
+    domain_hdl->data_ni.setValue(data_ni);
+    CTimer::get("XIOS").suspend();
+  }
+
+  void cxios_get_domain_data_ni(domain_Ptr domain_hdl, int* data_ni)
+  {
+    CTimer::get("XIOS").resume();
+    *data_ni = domain_hdl->data_ni.getInheritedValue();
+    CTimer::get("XIOS").suspend();
+  }
+
+  bool cxios_is_defined_domain_data_ni(domain_Ptr domain_hdl)
+  {
+     CTimer::get("XIOS").resume();
+     bool isDefined = domain_hdl->data_ni.hasInheritedValue();
+     CTimer::get("XIOS").suspend();
+     return isDefined;
+  }
+
+
+  void cxios_set_domain_data_nj(domain_Ptr domain_hdl, int data_nj)
+  {
+    CTimer::get("XIOS").resume();
+    domain_hdl->data_nj.setValue(data_nj);
+    CTimer::get("XIOS").suspend();
+  }
+
+  void cxios_get_domain_data_nj(domain_Ptr domain_hdl, int* data_nj)
+  {
+    CTimer::get("XIOS").resume();
+    *data_nj = domain_hdl->data_nj.getInheritedValue();
+    CTimer::get("XIOS").suspend();
+  }
+
+  bool cxios_is_defined_domain_data_nj(domain_Ptr domain_hdl)
+  {
+     CTimer::get("XIOS").resume();
+     bool isDefined = domain_hdl->data_nj.hasInheritedValue();
+     CTimer::get("XIOS").suspend();
+     return isDefined;
+  }
+
+
+  void cxios_set_domain_dim_i_name(domain_Ptr domain_hdl, const char * dim_i_name, int dim_i_name_size)
+  {
+    std::string dim_i_name_str;
+    if (!cstr2string(dim_i_name, dim_i_name_size, dim_i_name_str)) return;
+    CTimer::get("XIOS").resume();
+    domain_hdl->dim_i_name.setValue(dim_i_name_str);
+    CTimer::get("XIOS").suspend();
+  }
+
+  void cxios_get_domain_dim_i_name(domain_Ptr domain_hdl, char * dim_i_name, int dim_i_name_size)
+  {
+    CTimer::get("XIOS").resume();
+    if (!string_copy(domain_hdl->dim_i_name.getInheritedValue(), dim_i_name, dim_i_name_size))
+      ERROR("void cxios_get_domain_dim_i_name(domain_Ptr domain_hdl, char * dim_i_name, int dim_i_name_size)", << "Input string is too short");
+    CTimer::get("XIOS").suspend();
+  }
+
+  bool cxios_is_defined_domain_dim_i_name(domain_Ptr domain_hdl)
+  {
+     CTimer::get("XIOS").resume();
+     bool isDefined = domain_hdl->dim_i_name.hasInheritedValue();
+     CTimer::get("XIOS").suspend();
+     return isDefined;
+  }
+
+
+  void cxios_set_domain_dim_j_name(domain_Ptr domain_hdl, const char * dim_j_name, int dim_j_name_size)
+  {
+    std::string dim_j_name_str;
+    if (!cstr2string(dim_j_name, dim_j_name_size, dim_j_name_str)) return;
+    CTimer::get("XIOS").resume();
+    domain_hdl->dim_j_name.setValue(dim_j_name_str);
+    CTimer::get("XIOS").suspend();
+  }
+
+  void cxios_get_domain_dim_j_name(domain_Ptr domain_hdl, char * dim_j_name, int dim_j_name_size)
+  {
+    CTimer::get("XIOS").resume();
+    if (!string_copy(domain_hdl->dim_j_name.getInheritedValue(), dim_j_name, dim_j_name_size))
+      ERROR("void cxios_get_domain_dim_j_name(domain_Ptr domain_hdl, char * dim_j_name, int dim_j_name_size)", << "Input string is too short");
+    CTimer::get("XIOS").suspend();
+  }
+
+  bool cxios_is_defined_domain_dim_j_name(domain_Ptr domain_hdl)
+  {
+     CTimer::get("XIOS").resume();
+     bool isDefined = domain_hdl->dim_j_name.hasInheritedValue();
+     CTimer::get("XIOS").suspend();
+     return isDefined;
+  }
+
+
+  void cxios_set_domain_domain_ref(domain_Ptr domain_hdl, const char * domain_ref, int domain_ref_size)
+  {
+    std::string domain_ref_str;
+    if (!cstr2string(domain_ref, domain_ref_size, domain_ref_str)) return;
+    CTimer::get("XIOS").resume();
+    domain_hdl->domain_ref.setValue(domain_ref_str);
+    CTimer::get("XIOS").suspend();
+  }
+
+  void cxios_get_domain_domain_ref(domain_Ptr domain_hdl, char * domain_ref, int domain_ref_size)
+  {
+    CTimer::get("XIOS").resume();
+    if (!string_copy(domain_hdl->domain_ref.getInheritedValue(), domain_ref, domain_ref_size))
+      ERROR("void cxios_get_domain_domain_ref(domain_Ptr domain_hdl, char * domain_ref, int domain_ref_size)", << "Input string is too short");
+    CTimer::get("XIOS").suspend();
+  }
+
+  bool cxios_is_defined_domain_domain_ref(domain_Ptr domain_hdl)
+  {
+     CTimer::get("XIOS").resume();
+     bool isDefined = domain_hdl->domain_ref.hasInheritedValue();
+     CTimer::get("XIOS").suspend();
+     return isDefined;
+  }
+
+
+  void cxios_set_domain_i_index(domain_Ptr domain_hdl, int* i_index, int* extent)
+  {
+    CTimer::get("XIOS").resume();
+    CArray<int,1> tmp(i_index, shape(extent[0]), neverDeleteData);
+    domain_hdl->i_index.reference(tmp.copy());
+     CTimer::get("XIOS").suspend();
+  }
+
+  void cxios_get_domain_i_index(domain_Ptr domain_hdl, int* i_index, int* extent)
+  {
+    CTimer::get("XIOS").resume();
+    CArray<int,1> tmp(i_index, shape(extent[0]), neverDeleteData);
+    tmp=domain_hdl->i_index.getInheritedValue();
+     CTimer::get("XIOS").suspend();
+  }
+
+  bool cxios_is_defined_domain_i_index(domain_Ptr domain_hdl)
+  {
+     CTimer::get("XIOS").resume();
+     bool isDefined = domain_hdl->i_index.hasInheritedValue();
+     CTimer::get("XIOS").suspend();
+     return isDefined;
+  }
+
+
+  void cxios_set_domain_ibegin(domain_Ptr domain_hdl, int ibegin)
+  {
+    CTimer::get("XIOS").resume();
+    domain_hdl->ibegin.setValue(ibegin);
+    CTimer::get("XIOS").suspend();
+  }
+
+  void cxios_get_domain_ibegin(domain_Ptr domain_hdl, int* ibegin)
+  {
+    CTimer::get("XIOS").resume();
+    *ibegin = domain_hdl->ibegin.getInheritedValue();
+    CTimer::get("XIOS").suspend();
+  }
+
+  bool cxios_is_defined_domain_ibegin(domain_Ptr domain_hdl)
+  {
+     CTimer::get("XIOS").resume();
+     bool isDefined = domain_hdl->ibegin.hasInheritedValue();
+     CTimer::get("XIOS").suspend();
+     return isDefined;
+  }
+
+
+  void cxios_set_domain_j_index(domain_Ptr domain_hdl, int* j_index, int* extent)
+  {
+    CTimer::get("XIOS").resume();
+    CArray<int,1> tmp(j_index, shape(extent[0]), neverDeleteData);
+    domain_hdl->j_index.reference(tmp.copy());
+     CTimer::get("XIOS").suspend();
+  }
+
+  void cxios_get_domain_j_index(domain_Ptr domain_hdl, int* j_index, int* extent)
+  {
+    CTimer::get("XIOS").resume();
+    CArray<int,1> tmp(j_index, shape(extent[0]), neverDeleteData);
+    tmp=domain_hdl->j_index.getInheritedValue();
+     CTimer::get("XIOS").suspend();
+  }
+
+  bool cxios_is_defined_domain_j_index(domain_Ptr domain_hdl)
+  {
+     CTimer::get("XIOS").resume();
+     bool isDefined = domain_hdl->j_index.hasInheritedValue();
+     CTimer::get("XIOS").suspend();
+     return isDefined;
+  }
+
+
+  void cxios_set_domain_jbegin(domain_Ptr domain_hdl, int jbegin)
+  {
+    CTimer::get("XIOS").resume();
+    domain_hdl->jbegin.setValue(jbegin);
+    CTimer::get("XIOS").suspend();
+  }
+
+  void cxios_get_domain_jbegin(domain_Ptr domain_hdl, int* jbegin)
+  {
+    CTimer::get("XIOS").resume();
+    *jbegin = domain_hdl->jbegin.getInheritedValue();
+    CTimer::get("XIOS").suspend();
+  }
+
+  bool cxios_is_defined_domain_jbegin(domain_Ptr domain_hdl)
+  {
+     CTimer::get("XIOS").resume();
+     bool isDefined = domain_hdl->jbegin.hasInheritedValue();
+     CTimer::get("XIOS").suspend();
+     return isDefined;
+  }
+
+
+  void cxios_set_domain_lat_name(domain_Ptr domain_hdl, const char * lat_name, int lat_name_size)
+  {
+    std::string lat_name_str;
+    if (!cstr2string(lat_name, lat_name_size, lat_name_str)) return;
+    CTimer::get("XIOS").resume();
+    domain_hdl->lat_name.setValue(lat_name_str);
+    CTimer::get("XIOS").suspend();
+  }
+
+  void cxios_get_domain_lat_name(domain_Ptr domain_hdl, char * lat_name, int lat_name_size)
+  {
+    CTimer::get("XIOS").resume();
+    if (!string_copy(domain_hdl->lat_name.getInheritedValue(), lat_name, lat_name_size))
+      ERROR("void cxios_get_domain_lat_name(domain_Ptr domain_hdl, char * lat_name, int lat_name_size)", << "Input string is too short");
+    CTimer::get("XIOS").suspend();
+  }
+
+  bool cxios_is_defined_domain_lat_name(domain_Ptr domain_hdl)
+  {
+     CTimer::get("XIOS").resume();
+     bool isDefined = domain_hdl->lat_name.hasInheritedValue();
+     CTimer::get("XIOS").suspend();
+     return isDefined;
+  }
+
+
+  void cxios_set_domain_latvalue_1d(domain_Ptr domain_hdl, double* latvalue_1d, int* extent)
+  {
+    CTimer::get("XIOS").resume();
+    CArray<double,1> tmp(latvalue_1d, shape(extent[0]), neverDeleteData);
+    domain_hdl->latvalue_1d.reference(tmp.copy());
+     CTimer::get("XIOS").suspend();
+  }
+
+  void cxios_get_domain_latvalue_1d(domain_Ptr domain_hdl, double* latvalue_1d, int* extent)
+  {
+    CTimer::get("XIOS").resume();
+    CArray<double,1> tmp(latvalue_1d, shape(extent[0]), neverDeleteData);
+    tmp=domain_hdl->latvalue_1d.getInheritedValue();
+     CTimer::get("XIOS").suspend();
+  }
+
+  bool cxios_is_defined_domain_latvalue_1d(domain_Ptr domain_hdl)
+  {
+     CTimer::get("XIOS").resume();
+     bool isDefined = domain_hdl->latvalue_1d.hasInheritedValue();
+     CTimer::get("XIOS").suspend();
+     return isDefined;
+  }
+
+
+  void cxios_set_domain_latvalue_2d(domain_Ptr domain_hdl, double* latvalue_2d, int* extent)
+  {
+    CTimer::get("XIOS").resume();
+    CArray<double,2> tmp(latvalue_2d, shape(extent[0], extent[1]), neverDeleteData);
+    domain_hdl->latvalue_2d.reference(tmp.copy());
+     CTimer::get("XIOS").suspend();
+  }
+
+  void cxios_get_domain_latvalue_2d(domain_Ptr domain_hdl, double* latvalue_2d, int* extent)
+  {
+    CTimer::get("XIOS").resume();
+    CArray<double,2> tmp(latvalue_2d, shape(extent[0], extent[1]), neverDeleteData);
+    tmp=domain_hdl->latvalue_2d.getInheritedValue();
+     CTimer::get("XIOS").suspend();
+  }
+
+  bool cxios_is_defined_domain_latvalue_2d(domain_Ptr domain_hdl)
+  {
+     CTimer::get("XIOS").resume();
+     bool isDefined = domain_hdl->latvalue_2d.hasInheritedValue();
+     CTimer::get("XIOS").suspend();
+     return isDefined;
+  }
+
+
+  void cxios_set_domain_lon_name(domain_Ptr domain_hdl, const char * lon_name, int lon_name_size)
+  {
+    std::string lon_name_str;
+    if (!cstr2string(lon_name, lon_name_size, lon_name_str)) return;
+    CTimer::get("XIOS").resume();
+    domain_hdl->lon_name.setValue(lon_name_str);
+    CTimer::get("XIOS").suspend();
+  }
+
+  void cxios_get_domain_lon_name(domain_Ptr domain_hdl, char * lon_name, int lon_name_size)
+  {
+    CTimer::get("XIOS").resume();
+    if (!string_copy(domain_hdl->lon_name.getInheritedValue(), lon_name, lon_name_size))
+      ERROR("void cxios_get_domain_lon_name(domain_Ptr domain_hdl, char * lon_name, int lon_name_size)", << "Input string is too short");
+    CTimer::get("XIOS").suspend();
+  }
+
+  bool cxios_is_defined_domain_lon_name(domain_Ptr domain_hdl)
+  {
+     CTimer::get("XIOS").resume();
+     bool isDefined = domain_hdl->lon_name.hasInheritedValue();
+     CTimer::get("XIOS").suspend();
+     return isDefined;
+  }
+
+
+  void cxios_set_domain_long_name(domain_Ptr domain_hdl, const char * long_name, int long_name_size)
+  {
+    std::string long_name_str;
+    if (!cstr2string(long_name, long_name_size, long_name_str)) return;
+    CTimer::get("XIOS").resume();
+    domain_hdl->long_name.setValue(long_name_str);
+    CTimer::get("XIOS").suspend();
+  }
+
+  void cxios_get_domain_long_name(domain_Ptr domain_hdl, char * long_name, int long_name_size)
+  {
+    CTimer::get("XIOS").resume();
+    if (!string_copy(domain_hdl->long_name.getInheritedValue(), long_name, long_name_size))
+      ERROR("void cxios_get_domain_long_name(domain_Ptr domain_hdl, char * long_name, int long_name_size)", << "Input string is too short");
+    CTimer::get("XIOS").suspend();
+  }
+
+  bool cxios_is_defined_domain_long_name(domain_Ptr domain_hdl)
+  {
+     CTimer::get("XIOS").resume();
+     bool isDefined = domain_hdl->long_name.hasInheritedValue();
+     CTimer::get("XIOS").suspend();
+     return isDefined;
+  }
+
+
+  void cxios_set_domain_lonvalue_1d(domain_Ptr domain_hdl, double* lonvalue_1d, int* extent)
+  {
+    CTimer::get("XIOS").resume();
+    CArray<double,1> tmp(lonvalue_1d, shape(extent[0]), neverDeleteData);
+    domain_hdl->lonvalue_1d.reference(tmp.copy());
+     CTimer::get("XIOS").suspend();
+  }
+
+  void cxios_get_domain_lonvalue_1d(domain_Ptr domain_hdl, double* lonvalue_1d, int* extent)
+  {
+    CTimer::get("XIOS").resume();
+    CArray<double,1> tmp(lonvalue_1d, shape(extent[0]), neverDeleteData);
+    tmp=domain_hdl->lonvalue_1d.getInheritedValue();
+     CTimer::get("XIOS").suspend();
+  }
+
+  bool cxios_is_defined_domain_lonvalue_1d(domain_Ptr domain_hdl)
+  {
+     CTimer::get("XIOS").resume();
+     bool isDefined = domain_hdl->lonvalue_1d.hasInheritedValue();
+     CTimer::get("XIOS").suspend();
+     return isDefined;
+  }
+
+
+  void cxios_set_domain_lonvalue_2d(domain_Ptr domain_hdl, double* lonvalue_2d, int* extent)
+  {
+    CTimer::get("XIOS").resume();
+    CArray<double,2> tmp(lonvalue_2d, shape(extent[0], extent[1]), neverDeleteData);
+    domain_hdl->lonvalue_2d.reference(tmp.copy());
+     CTimer::get("XIOS").suspend();
+  }
+
+  void cxios_get_domain_lonvalue_2d(domain_Ptr domain_hdl, double* lonvalue_2d, int* extent)
+  {
+    CTimer::get("XIOS").resume();
+    CArray<double,2> tmp(lonvalue_2d, shape(extent[0], extent[1]), neverDeleteData);
+    tmp=domain_hdl->lonvalue_2d.getInheritedValue();
+     CTimer::get("XIOS").suspend();
+  }
+
+  bool cxios_is_defined_domain_lonvalue_2d(domain_Ptr domain_hdl)
+  {
+     CTimer::get("XIOS").resume();
+     bool isDefined = domain_hdl->lonvalue_2d.hasInheritedValue();
+     CTimer::get("XIOS").suspend();
+     return isDefined;
+  }
+
+
+  void cxios_set_domain_mask_1d(domain_Ptr domain_hdl, bool* mask_1d, int* extent)
+  {
+    CTimer::get("XIOS").resume();
+    CArray<bool,1> tmp(mask_1d, shape(extent[0]), neverDeleteData);
+    domain_hdl->mask_1d.reference(tmp.copy());
+     CTimer::get("XIOS").suspend();
+  }
+
+  void cxios_get_domain_mask_1d(domain_Ptr domain_hdl, bool* mask_1d, int* extent)
+  {
+    CTimer::get("XIOS").resume();
+    CArray<bool,1> tmp(mask_1d, shape(extent[0]), neverDeleteData);
+    tmp=domain_hdl->mask_1d.getInheritedValue();
+     CTimer::get("XIOS").suspend();
+  }
+
+  bool cxios_is_defined_domain_mask_1d(domain_Ptr domain_hdl)
+  {
+     CTimer::get("XIOS").resume();
+     bool isDefined = domain_hdl->mask_1d.hasInheritedValue();
+     CTimer::get("XIOS").suspend();
+     return isDefined;
+  }
+
+
+  void cxios_set_domain_mask_2d(domain_Ptr domain_hdl, bool* mask_2d, int* extent)
+  {
+    CTimer::get("XIOS").resume();
+    CArray<bool,2> tmp(mask_2d, shape(extent[0], extent[1]), neverDeleteData);
+    domain_hdl->mask_2d.reference(tmp.copy());
+     CTimer::get("XIOS").suspend();
+  }
+
+  void cxios_get_domain_mask_2d(domain_Ptr domain_hdl, bool* mask_2d, int* extent)
+  {
+    CTimer::get("XIOS").resume();
+    CArray<bool,2> tmp(mask_2d, shape(extent[0], extent[1]), neverDeleteData);
+    tmp=domain_hdl->mask_2d.getInheritedValue();
+     CTimer::get("XIOS").suspend();
+  }
+
+  bool cxios_is_defined_domain_mask_2d(domain_Ptr domain_hdl)
+  {
+     CTimer::get("XIOS").resume();
+     bool isDefined = domain_hdl->mask_2d.hasInheritedValue();
+     CTimer::get("XIOS").suspend();
+     return isDefined;
+  }
+
+
+  void cxios_set_domain_name(domain_Ptr domain_hdl, const char * name, int name_size)
+  {
+    std::string name_str;
+    if (!cstr2string(name, name_size, name_str)) return;
+    CTimer::get("XIOS").resume();
+    domain_hdl->name.setValue(name_str);
+    CTimer::get("XIOS").suspend();
+  }
+
+  void cxios_get_domain_name(domain_Ptr domain_hdl, char * name, int name_size)
+  {
+    CTimer::get("XIOS").resume();
+    if (!string_copy(domain_hdl->name.getInheritedValue(), name, name_size))
+      ERROR("void cxios_get_domain_name(domain_Ptr domain_hdl, char * name, int name_size)", << "Input string is too short");
+    CTimer::get("XIOS").suspend();
+  }
+
+  bool cxios_is_defined_domain_name(domain_Ptr domain_hdl)
+  {
+     CTimer::get("XIOS").resume();
+     bool isDefined = domain_hdl->name.hasInheritedValue();
+     CTimer::get("XIOS").suspend();
+     return isDefined;
+  }
+
+
+  void cxios_set_domain_ni(domain_Ptr domain_hdl, int ni)
+  {
+    CTimer::get("XIOS").resume();
+    domain_hdl->ni.setValue(ni);
+    CTimer::get("XIOS").suspend();
+  }
+
+  void cxios_get_domain_ni(domain_Ptr domain_hdl, int* ni)
+  {
+    CTimer::get("XIOS").resume();
+    *ni = domain_hdl->ni.getInheritedValue();
+    CTimer::get("XIOS").suspend();
+  }
+
+  bool cxios_is_defined_domain_ni(domain_Ptr domain_hdl)
+  {
+     CTimer::get("XIOS").resume();
+     bool isDefined = domain_hdl->ni.hasInheritedValue();
+     CTimer::get("XIOS").suspend();
+     return isDefined;
+  }
+
+
+  void cxios_set_domain_ni_glo(domain_Ptr domain_hdl, int ni_glo)
+  {
+    CTimer::get("XIOS").resume();
+    domain_hdl->ni_glo.setValue(ni_glo);
+    CTimer::get("XIOS").suspend();
+  }
+
+  void cxios_get_domain_ni_glo(domain_Ptr domain_hdl, int* ni_glo)
+  {
+    CTimer::get("XIOS").resume();
+    *ni_glo = domain_hdl->ni_glo.getInheritedValue();
+    CTimer::get("XIOS").suspend();
+  }
+
+  bool cxios_is_defined_domain_ni_glo(domain_Ptr domain_hdl)
+  {
+     CTimer::get("XIOS").resume();
+     bool isDefined = domain_hdl->ni_glo.hasInheritedValue();
+     CTimer::get("XIOS").suspend();
+     return isDefined;
+  }
+
+
+  void cxios_set_domain_nj(domain_Ptr domain_hdl, int nj)
+  {
+    CTimer::get("XIOS").resume();
+    domain_hdl->nj.setValue(nj);
+    CTimer::get("XIOS").suspend();
+  }
+
+  void cxios_get_domain_nj(domain_Ptr domain_hdl, int* nj)
+  {
+    CTimer::get("XIOS").resume();
+    *nj = domain_hdl->nj.getInheritedValue();
+    CTimer::get("XIOS").suspend();
+  }
+
+  bool cxios_is_defined_domain_nj(domain_Ptr domain_hdl)
+  {
+     CTimer::get("XIOS").resume();
+     bool isDefined = domain_hdl->nj.hasInheritedValue();
+     CTimer::get("XIOS").suspend();
+     return isDefined;
+  }
+
+
+  void cxios_set_domain_nj_glo(domain_Ptr domain_hdl, int nj_glo)
+  {
+    CTimer::get("XIOS").resume();
+    domain_hdl->nj_glo.setValue(nj_glo);
+    CTimer::get("XIOS").suspend();
+  }
+
+  void cxios_get_domain_nj_glo(domain_Ptr domain_hdl, int* nj_glo)
+  {
+    CTimer::get("XIOS").resume();
+    *nj_glo = domain_hdl->nj_glo.getInheritedValue();
+    CTimer::get("XIOS").suspend();
+  }
+
+  bool cxios_is_defined_domain_nj_glo(domain_Ptr domain_hdl)
+  {
+     CTimer::get("XIOS").resume();
+     bool isDefined = domain_hdl->nj_glo.hasInheritedValue();
+     CTimer::get("XIOS").suspend();
+     return isDefined;
+  }
+
+
+  void cxios_set_domain_nvertex(domain_Ptr domain_hdl, int nvertex)
+  {
+    CTimer::get("XIOS").resume();
+    domain_hdl->nvertex.setValue(nvertex);
+    CTimer::get("XIOS").suspend();
+  }
+
+  void cxios_get_domain_nvertex(domain_Ptr domain_hdl, int* nvertex)
+  {
+    CTimer::get("XIOS").resume();
+    *nvertex = domain_hdl->nvertex.getInheritedValue();
+    CTimer::get("XIOS").suspend();
+  }
+
+  bool cxios_is_defined_domain_nvertex(domain_Ptr domain_hdl)
+  {
+     CTimer::get("XIOS").resume();
+     bool isDefined = domain_hdl->nvertex.hasInheritedValue();
+     CTimer::get("XIOS").suspend();
+     return isDefined;
+  }
+
+
+  void cxios_set_domain_prec(domain_Ptr domain_hdl, int prec)
+  {
+    CTimer::get("XIOS").resume();
+    domain_hdl->prec.setValue(prec);
+    CTimer::get("XIOS").suspend();
+  }
+
+  void cxios_get_domain_prec(domain_Ptr domain_hdl, int* prec)
+  {
+    CTimer::get("XIOS").resume();
+    *prec = domain_hdl->prec.getInheritedValue();
+    CTimer::get("XIOS").suspend();
+  }
+
+  bool cxios_is_defined_domain_prec(domain_Ptr domain_hdl)
+  {
+     CTimer::get("XIOS").resume();
+     bool isDefined = domain_hdl->prec.hasInheritedValue();
+     CTimer::get("XIOS").suspend();
+     return isDefined;
+  }
+
+
+  void cxios_set_domain_radius(domain_Ptr domain_hdl, double radius)
+  {
+    CTimer::get("XIOS").resume();
+    domain_hdl->radius.setValue(radius);
+    CTimer::get("XIOS").suspend();
+  }
+
+  void cxios_get_domain_radius(domain_Ptr domain_hdl, double* radius)
+  {
+    CTimer::get("XIOS").resume();
+    *radius = domain_hdl->radius.getInheritedValue();
+    CTimer::get("XIOS").suspend();
+  }
+
+  bool cxios_is_defined_domain_radius(domain_Ptr domain_hdl)
+  {
+     CTimer::get("XIOS").resume();
+     bool isDefined = domain_hdl->radius.hasInheritedValue();
+     CTimer::get("XIOS").suspend();
+     return isDefined;
+  }
+
+
+  void cxios_set_domain_standard_name(domain_Ptr domain_hdl, const char * standard_name, int standard_name_size)
+  {
+    std::string standard_name_str;
+    if (!cstr2string(standard_name, standard_name_size, standard_name_str)) return;
+    CTimer::get("XIOS").resume();
+    domain_hdl->standard_name.setValue(standard_name_str);
+    CTimer::get("XIOS").suspend();
+  }
+
+  void cxios_get_domain_standard_name(domain_Ptr domain_hdl, char * standard_name, int standard_name_size)
+  {
+    CTimer::get("XIOS").resume();
+    if (!string_copy(domain_hdl->standard_name.getInheritedValue(), standard_name, standard_name_size))
+      ERROR("void cxios_get_domain_standard_name(domain_Ptr domain_hdl, char * standard_name, int standard_name_size)", << "Input string is too short");
+    CTimer::get("XIOS").suspend();
+  }
+
+  bool cxios_is_defined_domain_standard_name(domain_Ptr domain_hdl)
+  {
+     CTimer::get("XIOS").resume();
+     bool isDefined = domain_hdl->standard_name.hasInheritedValue();
+     CTimer::get("XIOS").suspend();
+     return isDefined;
+  }
+
+
+  void cxios_set_domain_type(domain_Ptr domain_hdl, const char * type, int type_size)
+  {
+    std::string type_str;
+    if (!cstr2string(type, type_size, type_str)) return;
+    CTimer::get("XIOS").resume();
+    domain_hdl->type.fromString(type_str);
+    CTimer::get("XIOS").suspend();
+  }
+
+  void cxios_get_domain_type(domain_Ptr domain_hdl, char * type, int type_size)
+  {
+    CTimer::get("XIOS").resume();
+    if (!string_copy(domain_hdl->type.getInheritedStringValue(), type, type_size))
+      ERROR("void cxios_get_domain_type(domain_Ptr domain_hdl, char * type, int type_size)", << "Input string is too short");
+    CTimer::get("XIOS").suspend();
+  }
+
+  bool cxios_is_defined_domain_type(domain_Ptr domain_hdl)
+  {
+     CTimer::get("XIOS").resume();
+     bool isDefined = domain_hdl->type.hasInheritedValue();
+     CTimer::get("XIOS").suspend();
+     return isDefined;
+  }
+}
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/c_attr/icdomaingroup_attr.cpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/c_attr/icdomaingroup_attr.cpp	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/c_attr/icdomaingroup_attr.cpp	(revision 1749)
@@ -0,0 +1,1052 @@
+/* ************************************************************************** *
+ *               Interface auto generated - do not modify                     *
+ * ************************************************************************** */
+
+#include <boost/multi_array.hpp>
+#include "xios.hpp"
+#include "attribute_template.hpp"
+#include "object_template.hpp"
+#include "group_template.hpp"
+#include "icutil.hpp"
+#include "icdate.hpp"
+#include "timer.hpp"
+#include "node_type.hpp"
+
+extern "C"
+{
+  typedef xios::CDomainGroup* domaingroup_Ptr;
+
+  void cxios_set_domaingroup_area(domaingroup_Ptr domaingroup_hdl, double* area, int* extent)
+  {
+    CTimer::get("XIOS").resume();
+    CArray<double,2> tmp(area, shape(extent[0], extent[1]), neverDeleteData);
+    domaingroup_hdl->area.reference(tmp.copy());
+     CTimer::get("XIOS").suspend();
+  }
+
+  void cxios_get_domaingroup_area(domaingroup_Ptr domaingroup_hdl, double* area, int* extent)
+  {
+    CTimer::get("XIOS").resume();
+    CArray<double,2> tmp(area, shape(extent[0], extent[1]), neverDeleteData);
+    tmp=domaingroup_hdl->area.getInheritedValue();
+     CTimer::get("XIOS").suspend();
+  }
+
+  bool cxios_is_defined_domaingroup_area(domaingroup_Ptr domaingroup_hdl)
+  {
+     CTimer::get("XIOS").resume();
+     bool isDefined = domaingroup_hdl->area.hasInheritedValue();
+     CTimer::get("XIOS").suspend();
+     return isDefined;
+  }
+
+
+  void cxios_set_domaingroup_bounds_lat_1d(domaingroup_Ptr domaingroup_hdl, double* bounds_lat_1d, int* extent)
+  {
+    CTimer::get("XIOS").resume();
+    CArray<double,2> tmp(bounds_lat_1d, shape(extent[0], extent[1]), neverDeleteData);
+    domaingroup_hdl->bounds_lat_1d.reference(tmp.copy());
+     CTimer::get("XIOS").suspend();
+  }
+
+  void cxios_get_domaingroup_bounds_lat_1d(domaingroup_Ptr domaingroup_hdl, double* bounds_lat_1d, int* extent)
+  {
+    CTimer::get("XIOS").resume();
+    CArray<double,2> tmp(bounds_lat_1d, shape(extent[0], extent[1]), neverDeleteData);
+    tmp=domaingroup_hdl->bounds_lat_1d.getInheritedValue();
+     CTimer::get("XIOS").suspend();
+  }
+
+  bool cxios_is_defined_domaingroup_bounds_lat_1d(domaingroup_Ptr domaingroup_hdl)
+  {
+     CTimer::get("XIOS").resume();
+     bool isDefined = domaingroup_hdl->bounds_lat_1d.hasInheritedValue();
+     CTimer::get("XIOS").suspend();
+     return isDefined;
+  }
+
+
+  void cxios_set_domaingroup_bounds_lat_2d(domaingroup_Ptr domaingroup_hdl, double* bounds_lat_2d, int* extent)
+  {
+    CTimer::get("XIOS").resume();
+    CArray<double,3> tmp(bounds_lat_2d, shape(extent[0], extent[1], extent[2]), neverDeleteData);
+    domaingroup_hdl->bounds_lat_2d.reference(tmp.copy());
+     CTimer::get("XIOS").suspend();
+  }
+
+  void cxios_get_domaingroup_bounds_lat_2d(domaingroup_Ptr domaingroup_hdl, double* bounds_lat_2d, int* extent)
+  {
+    CTimer::get("XIOS").resume();
+    CArray<double,3> tmp(bounds_lat_2d, shape(extent[0], extent[1], extent[2]), neverDeleteData);
+    tmp=domaingroup_hdl->bounds_lat_2d.getInheritedValue();
+     CTimer::get("XIOS").suspend();
+  }
+
+  bool cxios_is_defined_domaingroup_bounds_lat_2d(domaingroup_Ptr domaingroup_hdl)
+  {
+     CTimer::get("XIOS").resume();
+     bool isDefined = domaingroup_hdl->bounds_lat_2d.hasInheritedValue();
+     CTimer::get("XIOS").suspend();
+     return isDefined;
+  }
+
+
+  void cxios_set_domaingroup_bounds_lat_name(domaingroup_Ptr domaingroup_hdl, const char * bounds_lat_name, int bounds_lat_name_size)
+  {
+    std::string bounds_lat_name_str;
+    if (!cstr2string(bounds_lat_name, bounds_lat_name_size, bounds_lat_name_str)) return;
+    CTimer::get("XIOS").resume();
+    domaingroup_hdl->bounds_lat_name.setValue(bounds_lat_name_str);
+    CTimer::get("XIOS").suspend();
+  }
+
+  void cxios_get_domaingroup_bounds_lat_name(domaingroup_Ptr domaingroup_hdl, char * bounds_lat_name, int bounds_lat_name_size)
+  {
+    CTimer::get("XIOS").resume();
+    if (!string_copy(domaingroup_hdl->bounds_lat_name.getInheritedValue(), bounds_lat_name, bounds_lat_name_size))
+      ERROR("void cxios_get_domaingroup_bounds_lat_name(domaingroup_Ptr domaingroup_hdl, char * bounds_lat_name, int bounds_lat_name_size)", << "Input string is too short");
+    CTimer::get("XIOS").suspend();
+  }
+
+  bool cxios_is_defined_domaingroup_bounds_lat_name(domaingroup_Ptr domaingroup_hdl)
+  {
+     CTimer::get("XIOS").resume();
+     bool isDefined = domaingroup_hdl->bounds_lat_name.hasInheritedValue();
+     CTimer::get("XIOS").suspend();
+     return isDefined;
+  }
+
+
+  void cxios_set_domaingroup_bounds_lon_1d(domaingroup_Ptr domaingroup_hdl, double* bounds_lon_1d, int* extent)
+  {
+    CTimer::get("XIOS").resume();
+    CArray<double,2> tmp(bounds_lon_1d, shape(extent[0], extent[1]), neverDeleteData);
+    domaingroup_hdl->bounds_lon_1d.reference(tmp.copy());
+     CTimer::get("XIOS").suspend();
+  }
+
+  void cxios_get_domaingroup_bounds_lon_1d(domaingroup_Ptr domaingroup_hdl, double* bounds_lon_1d, int* extent)
+  {
+    CTimer::get("XIOS").resume();
+    CArray<double,2> tmp(bounds_lon_1d, shape(extent[0], extent[1]), neverDeleteData);
+    tmp=domaingroup_hdl->bounds_lon_1d.getInheritedValue();
+     CTimer::get("XIOS").suspend();
+  }
+
+  bool cxios_is_defined_domaingroup_bounds_lon_1d(domaingroup_Ptr domaingroup_hdl)
+  {
+     CTimer::get("XIOS").resume();
+     bool isDefined = domaingroup_hdl->bounds_lon_1d.hasInheritedValue();
+     CTimer::get("XIOS").suspend();
+     return isDefined;
+  }
+
+
+  void cxios_set_domaingroup_bounds_lon_2d(domaingroup_Ptr domaingroup_hdl, double* bounds_lon_2d, int* extent)
+  {
+    CTimer::get("XIOS").resume();
+    CArray<double,3> tmp(bounds_lon_2d, shape(extent[0], extent[1], extent[2]), neverDeleteData);
+    domaingroup_hdl->bounds_lon_2d.reference(tmp.copy());
+     CTimer::get("XIOS").suspend();
+  }
+
+  void cxios_get_domaingroup_bounds_lon_2d(domaingroup_Ptr domaingroup_hdl, double* bounds_lon_2d, int* extent)
+  {
+    CTimer::get("XIOS").resume();
+    CArray<double,3> tmp(bounds_lon_2d, shape(extent[0], extent[1], extent[2]), neverDeleteData);
+    tmp=domaingroup_hdl->bounds_lon_2d.getInheritedValue();
+     CTimer::get("XIOS").suspend();
+  }
+
+  bool cxios_is_defined_domaingroup_bounds_lon_2d(domaingroup_Ptr domaingroup_hdl)
+  {
+     CTimer::get("XIOS").resume();
+     bool isDefined = domaingroup_hdl->bounds_lon_2d.hasInheritedValue();
+     CTimer::get("XIOS").suspend();
+     return isDefined;
+  }
+
+
+  void cxios_set_domaingroup_bounds_lon_name(domaingroup_Ptr domaingroup_hdl, const char * bounds_lon_name, int bounds_lon_name_size)
+  {
+    std::string bounds_lon_name_str;
+    if (!cstr2string(bounds_lon_name, bounds_lon_name_size, bounds_lon_name_str)) return;
+    CTimer::get("XIOS").resume();
+    domaingroup_hdl->bounds_lon_name.setValue(bounds_lon_name_str);
+    CTimer::get("XIOS").suspend();
+  }
+
+  void cxios_get_domaingroup_bounds_lon_name(domaingroup_Ptr domaingroup_hdl, char * bounds_lon_name, int bounds_lon_name_size)
+  {
+    CTimer::get("XIOS").resume();
+    if (!string_copy(domaingroup_hdl->bounds_lon_name.getInheritedValue(), bounds_lon_name, bounds_lon_name_size))
+      ERROR("void cxios_get_domaingroup_bounds_lon_name(domaingroup_Ptr domaingroup_hdl, char * bounds_lon_name, int bounds_lon_name_size)", << "Input string is too short");
+    CTimer::get("XIOS").suspend();
+  }
+
+  bool cxios_is_defined_domaingroup_bounds_lon_name(domaingroup_Ptr domaingroup_hdl)
+  {
+     CTimer::get("XIOS").resume();
+     bool isDefined = domaingroup_hdl->bounds_lon_name.hasInheritedValue();
+     CTimer::get("XIOS").suspend();
+     return isDefined;
+  }
+
+
+  void cxios_set_domaingroup_comment(domaingroup_Ptr domaingroup_hdl, const char * comment, int comment_size)
+  {
+    std::string comment_str;
+    if (!cstr2string(comment, comment_size, comment_str)) return;
+    CTimer::get("XIOS").resume();
+    domaingroup_hdl->comment.setValue(comment_str);
+    CTimer::get("XIOS").suspend();
+  }
+
+  void cxios_get_domaingroup_comment(domaingroup_Ptr domaingroup_hdl, char * comment, int comment_size)
+  {
+    CTimer::get("XIOS").resume();
+    if (!string_copy(domaingroup_hdl->comment.getInheritedValue(), comment, comment_size))
+      ERROR("void cxios_get_domaingroup_comment(domaingroup_Ptr domaingroup_hdl, char * comment, int comment_size)", << "Input string is too short");
+    CTimer::get("XIOS").suspend();
+  }
+
+  bool cxios_is_defined_domaingroup_comment(domaingroup_Ptr domaingroup_hdl)
+  {
+     CTimer::get("XIOS").resume();
+     bool isDefined = domaingroup_hdl->comment.hasInheritedValue();
+     CTimer::get("XIOS").suspend();
+     return isDefined;
+  }
+
+
+  void cxios_set_domaingroup_data_dim(domaingroup_Ptr domaingroup_hdl, int data_dim)
+  {
+    CTimer::get("XIOS").resume();
+    domaingroup_hdl->data_dim.setValue(data_dim);
+    CTimer::get("XIOS").suspend();
+  }
+
+  void cxios_get_domaingroup_data_dim(domaingroup_Ptr domaingroup_hdl, int* data_dim)
+  {
+    CTimer::get("XIOS").resume();
+    *data_dim = domaingroup_hdl->data_dim.getInheritedValue();
+    CTimer::get("XIOS").suspend();
+  }
+
+  bool cxios_is_defined_domaingroup_data_dim(domaingroup_Ptr domaingroup_hdl)
+  {
+     CTimer::get("XIOS").resume();
+     bool isDefined = domaingroup_hdl->data_dim.hasInheritedValue();
+     CTimer::get("XIOS").suspend();
+     return isDefined;
+  }
+
+
+  void cxios_set_domaingroup_data_i_index(domaingroup_Ptr domaingroup_hdl, int* data_i_index, int* extent)
+  {
+    CTimer::get("XIOS").resume();
+    CArray<int,1> tmp(data_i_index, shape(extent[0]), neverDeleteData);
+    domaingroup_hdl->data_i_index.reference(tmp.copy());
+     CTimer::get("XIOS").suspend();
+  }
+
+  void cxios_get_domaingroup_data_i_index(domaingroup_Ptr domaingroup_hdl, int* data_i_index, int* extent)
+  {
+    CTimer::get("XIOS").resume();
+    CArray<int,1> tmp(data_i_index, shape(extent[0]), neverDeleteData);
+    tmp=domaingroup_hdl->data_i_index.getInheritedValue();
+     CTimer::get("XIOS").suspend();
+  }
+
+  bool cxios_is_defined_domaingroup_data_i_index(domaingroup_Ptr domaingroup_hdl)
+  {
+     CTimer::get("XIOS").resume();
+     bool isDefined = domaingroup_hdl->data_i_index.hasInheritedValue();
+     CTimer::get("XIOS").suspend();
+     return isDefined;
+  }
+
+
+  void cxios_set_domaingroup_data_ibegin(domaingroup_Ptr domaingroup_hdl, int data_ibegin)
+  {
+    CTimer::get("XIOS").resume();
+    domaingroup_hdl->data_ibegin.setValue(data_ibegin);
+    CTimer::get("XIOS").suspend();
+  }
+
+  void cxios_get_domaingroup_data_ibegin(domaingroup_Ptr domaingroup_hdl, int* data_ibegin)
+  {
+    CTimer::get("XIOS").resume();
+    *data_ibegin = domaingroup_hdl->data_ibegin.getInheritedValue();
+    CTimer::get("XIOS").suspend();
+  }
+
+  bool cxios_is_defined_domaingroup_data_ibegin(domaingroup_Ptr domaingroup_hdl)
+  {
+     CTimer::get("XIOS").resume();
+     bool isDefined = domaingroup_hdl->data_ibegin.hasInheritedValue();
+     CTimer::get("XIOS").suspend();
+     return isDefined;
+  }
+
+
+  void cxios_set_domaingroup_data_j_index(domaingroup_Ptr domaingroup_hdl, int* data_j_index, int* extent)
+  {
+    CTimer::get("XIOS").resume();
+    CArray<int,1> tmp(data_j_index, shape(extent[0]), neverDeleteData);
+    domaingroup_hdl->data_j_index.reference(tmp.copy());
+     CTimer::get("XIOS").suspend();
+  }
+
+  void cxios_get_domaingroup_data_j_index(domaingroup_Ptr domaingroup_hdl, int* data_j_index, int* extent)
+  {
+    CTimer::get("XIOS").resume();
+    CArray<int,1> tmp(data_j_index, shape(extent[0]), neverDeleteData);
+    tmp=domaingroup_hdl->data_j_index.getInheritedValue();
+     CTimer::get("XIOS").suspend();
+  }
+
+  bool cxios_is_defined_domaingroup_data_j_index(domaingroup_Ptr domaingroup_hdl)
+  {
+     CTimer::get("XIOS").resume();
+     bool isDefined = domaingroup_hdl->data_j_index.hasInheritedValue();
+     CTimer::get("XIOS").suspend();
+     return isDefined;
+  }
+
+
+  void cxios_set_domaingroup_data_jbegin(domaingroup_Ptr domaingroup_hdl, int data_jbegin)
+  {
+    CTimer::get("XIOS").resume();
+    domaingroup_hdl->data_jbegin.setValue(data_jbegin);
+    CTimer::get("XIOS").suspend();
+  }
+
+  void cxios_get_domaingroup_data_jbegin(domaingroup_Ptr domaingroup_hdl, int* data_jbegin)
+  {
+    CTimer::get("XIOS").resume();
+    *data_jbegin = domaingroup_hdl->data_jbegin.getInheritedValue();
+    CTimer::get("XIOS").suspend();
+  }
+
+  bool cxios_is_defined_domaingroup_data_jbegin(domaingroup_Ptr domaingroup_hdl)
+  {
+     CTimer::get("XIOS").resume();
+     bool isDefined = domaingroup_hdl->data_jbegin.hasInheritedValue();
+     CTimer::get("XIOS").suspend();
+     return isDefined;
+  }
+
+
+  void cxios_set_domaingroup_data_ni(domaingroup_Ptr domaingroup_hdl, int data_ni)
+  {
+    CTimer::get("XIOS").resume();
+    domaingroup_hdl->data_ni.setValue(data_ni);
+    CTimer::get("XIOS").suspend();
+  }
+
+  void cxios_get_domaingroup_data_ni(domaingroup_Ptr domaingroup_hdl, int* data_ni)
+  {
+    CTimer::get("XIOS").resume();
+    *data_ni = domaingroup_hdl->data_ni.getInheritedValue();
+    CTimer::get("XIOS").suspend();
+  }
+
+  bool cxios_is_defined_domaingroup_data_ni(domaingroup_Ptr domaingroup_hdl)
+  {
+     CTimer::get("XIOS").resume();
+     bool isDefined = domaingroup_hdl->data_ni.hasInheritedValue();
+     CTimer::get("XIOS").suspend();
+     return isDefined;
+  }
+
+
+  void cxios_set_domaingroup_data_nj(domaingroup_Ptr domaingroup_hdl, int data_nj)
+  {
+    CTimer::get("XIOS").resume();
+    domaingroup_hdl->data_nj.setValue(data_nj);
+    CTimer::get("XIOS").suspend();
+  }
+
+  void cxios_get_domaingroup_data_nj(domaingroup_Ptr domaingroup_hdl, int* data_nj)
+  {
+    CTimer::get("XIOS").resume();
+    *data_nj = domaingroup_hdl->data_nj.getInheritedValue();
+    CTimer::get("XIOS").suspend();
+  }
+
+  bool cxios_is_defined_domaingroup_data_nj(domaingroup_Ptr domaingroup_hdl)
+  {
+     CTimer::get("XIOS").resume();
+     bool isDefined = domaingroup_hdl->data_nj.hasInheritedValue();
+     CTimer::get("XIOS").suspend();
+     return isDefined;
+  }
+
+
+  void cxios_set_domaingroup_dim_i_name(domaingroup_Ptr domaingroup_hdl, const char * dim_i_name, int dim_i_name_size)
+  {
+    std::string dim_i_name_str;
+    if (!cstr2string(dim_i_name, dim_i_name_size, dim_i_name_str)) return;
+    CTimer::get("XIOS").resume();
+    domaingroup_hdl->dim_i_name.setValue(dim_i_name_str);
+    CTimer::get("XIOS").suspend();
+  }
+
+  void cxios_get_domaingroup_dim_i_name(domaingroup_Ptr domaingroup_hdl, char * dim_i_name, int dim_i_name_size)
+  {
+    CTimer::get("XIOS").resume();
+    if (!string_copy(domaingroup_hdl->dim_i_name.getInheritedValue(), dim_i_name, dim_i_name_size))
+      ERROR("void cxios_get_domaingroup_dim_i_name(domaingroup_Ptr domaingroup_hdl, char * dim_i_name, int dim_i_name_size)", << "Input string is too short");
+    CTimer::get("XIOS").suspend();
+  }
+
+  bool cxios_is_defined_domaingroup_dim_i_name(domaingroup_Ptr domaingroup_hdl)
+  {
+     CTimer::get("XIOS").resume();
+     bool isDefined = domaingroup_hdl->dim_i_name.hasInheritedValue();
+     CTimer::get("XIOS").suspend();
+     return isDefined;
+  }
+
+
+  void cxios_set_domaingroup_dim_j_name(domaingroup_Ptr domaingroup_hdl, const char * dim_j_name, int dim_j_name_size)
+  {
+    std::string dim_j_name_str;
+    if (!cstr2string(dim_j_name, dim_j_name_size, dim_j_name_str)) return;
+    CTimer::get("XIOS").resume();
+    domaingroup_hdl->dim_j_name.setValue(dim_j_name_str);
+    CTimer::get("XIOS").suspend();
+  }
+
+  void cxios_get_domaingroup_dim_j_name(domaingroup_Ptr domaingroup_hdl, char * dim_j_name, int dim_j_name_size)
+  {
+    CTimer::get("XIOS").resume();
+    if (!string_copy(domaingroup_hdl->dim_j_name.getInheritedValue(), dim_j_name, dim_j_name_size))
+      ERROR("void cxios_get_domaingroup_dim_j_name(domaingroup_Ptr domaingroup_hdl, char * dim_j_name, int dim_j_name_size)", << "Input string is too short");
+    CTimer::get("XIOS").suspend();
+  }
+
+  bool cxios_is_defined_domaingroup_dim_j_name(domaingroup_Ptr domaingroup_hdl)
+  {
+     CTimer::get("XIOS").resume();
+     bool isDefined = domaingroup_hdl->dim_j_name.hasInheritedValue();
+     CTimer::get("XIOS").suspend();
+     return isDefined;
+  }
+
+
+  void cxios_set_domaingroup_domain_ref(domaingroup_Ptr domaingroup_hdl, const char * domain_ref, int domain_ref_size)
+  {
+    std::string domain_ref_str;
+    if (!cstr2string(domain_ref, domain_ref_size, domain_ref_str)) return;
+    CTimer::get("XIOS").resume();
+    domaingroup_hdl->domain_ref.setValue(domain_ref_str);
+    CTimer::get("XIOS").suspend();
+  }
+
+  void cxios_get_domaingroup_domain_ref(domaingroup_Ptr domaingroup_hdl, char * domain_ref, int domain_ref_size)
+  {
+    CTimer::get("XIOS").resume();
+    if (!string_copy(domaingroup_hdl->domain_ref.getInheritedValue(), domain_ref, domain_ref_size))
+      ERROR("void cxios_get_domaingroup_domain_ref(domaingroup_Ptr domaingroup_hdl, char * domain_ref, int domain_ref_size)", << "Input string is too short");
+    CTimer::get("XIOS").suspend();
+  }
+
+  bool cxios_is_defined_domaingroup_domain_ref(domaingroup_Ptr domaingroup_hdl)
+  {
+     CTimer::get("XIOS").resume();
+     bool isDefined = domaingroup_hdl->domain_ref.hasInheritedValue();
+     CTimer::get("XIOS").suspend();
+     return isDefined;
+  }
+
+
+  void cxios_set_domaingroup_group_ref(domaingroup_Ptr domaingroup_hdl, const char * group_ref, int group_ref_size)
+  {
+    std::string group_ref_str;
+    if (!cstr2string(group_ref, group_ref_size, group_ref_str)) return;
+    CTimer::get("XIOS").resume();
+    domaingroup_hdl->group_ref.setValue(group_ref_str);
+    CTimer::get("XIOS").suspend();
+  }
+
+  void cxios_get_domaingroup_group_ref(domaingroup_Ptr domaingroup_hdl, char * group_ref, int group_ref_size)
+  {
+    CTimer::get("XIOS").resume();
+    if (!string_copy(domaingroup_hdl->group_ref.getInheritedValue(), group_ref, group_ref_size))
+      ERROR("void cxios_get_domaingroup_group_ref(domaingroup_Ptr domaingroup_hdl, char * group_ref, int group_ref_size)", << "Input string is too short");
+    CTimer::get("XIOS").suspend();
+  }
+
+  bool cxios_is_defined_domaingroup_group_ref(domaingroup_Ptr domaingroup_hdl)
+  {
+     CTimer::get("XIOS").resume();
+     bool isDefined = domaingroup_hdl->group_ref.hasInheritedValue();
+     CTimer::get("XIOS").suspend();
+     return isDefined;
+  }
+
+
+  void cxios_set_domaingroup_i_index(domaingroup_Ptr domaingroup_hdl, int* i_index, int* extent)
+  {
+    CTimer::get("XIOS").resume();
+    CArray<int,1> tmp(i_index, shape(extent[0]), neverDeleteData);
+    domaingroup_hdl->i_index.reference(tmp.copy());
+     CTimer::get("XIOS").suspend();
+  }
+
+  void cxios_get_domaingroup_i_index(domaingroup_Ptr domaingroup_hdl, int* i_index, int* extent)
+  {
+    CTimer::get("XIOS").resume();
+    CArray<int,1> tmp(i_index, shape(extent[0]), neverDeleteData);
+    tmp=domaingroup_hdl->i_index.getInheritedValue();
+     CTimer::get("XIOS").suspend();
+  }
+
+  bool cxios_is_defined_domaingroup_i_index(domaingroup_Ptr domaingroup_hdl)
+  {
+     CTimer::get("XIOS").resume();
+     bool isDefined = domaingroup_hdl->i_index.hasInheritedValue();
+     CTimer::get("XIOS").suspend();
+     return isDefined;
+  }
+
+
+  void cxios_set_domaingroup_ibegin(domaingroup_Ptr domaingroup_hdl, int ibegin)
+  {
+    CTimer::get("XIOS").resume();
+    domaingroup_hdl->ibegin.setValue(ibegin);
+    CTimer::get("XIOS").suspend();
+  }
+
+  void cxios_get_domaingroup_ibegin(domaingroup_Ptr domaingroup_hdl, int* ibegin)
+  {
+    CTimer::get("XIOS").resume();
+    *ibegin = domaingroup_hdl->ibegin.getInheritedValue();
+    CTimer::get("XIOS").suspend();
+  }
+
+  bool cxios_is_defined_domaingroup_ibegin(domaingroup_Ptr domaingroup_hdl)
+  {
+     CTimer::get("XIOS").resume();
+     bool isDefined = domaingroup_hdl->ibegin.hasInheritedValue();
+     CTimer::get("XIOS").suspend();
+     return isDefined;
+  }
+
+
+  void cxios_set_domaingroup_j_index(domaingroup_Ptr domaingroup_hdl, int* j_index, int* extent)
+  {
+    CTimer::get("XIOS").resume();
+    CArray<int,1> tmp(j_index, shape(extent[0]), neverDeleteData);
+    domaingroup_hdl->j_index.reference(tmp.copy());
+     CTimer::get("XIOS").suspend();
+  }
+
+  void cxios_get_domaingroup_j_index(domaingroup_Ptr domaingroup_hdl, int* j_index, int* extent)
+  {
+    CTimer::get("XIOS").resume();
+    CArray<int,1> tmp(j_index, shape(extent[0]), neverDeleteData);
+    tmp=domaingroup_hdl->j_index.getInheritedValue();
+     CTimer::get("XIOS").suspend();
+  }
+
+  bool cxios_is_defined_domaingroup_j_index(domaingroup_Ptr domaingroup_hdl)
+  {
+     CTimer::get("XIOS").resume();
+     bool isDefined = domaingroup_hdl->j_index.hasInheritedValue();
+     CTimer::get("XIOS").suspend();
+     return isDefined;
+  }
+
+
+  void cxios_set_domaingroup_jbegin(domaingroup_Ptr domaingroup_hdl, int jbegin)
+  {
+    CTimer::get("XIOS").resume();
+    domaingroup_hdl->jbegin.setValue(jbegin);
+    CTimer::get("XIOS").suspend();
+  }
+
+  void cxios_get_domaingroup_jbegin(domaingroup_Ptr domaingroup_hdl, int* jbegin)
+  {
+    CTimer::get("XIOS").resume();
+    *jbegin = domaingroup_hdl->jbegin.getInheritedValue();
+    CTimer::get("XIOS").suspend();
+  }
+
+  bool cxios_is_defined_domaingroup_jbegin(domaingroup_Ptr domaingroup_hdl)
+  {
+     CTimer::get("XIOS").resume();
+     bool isDefined = domaingroup_hdl->jbegin.hasInheritedValue();
+     CTimer::get("XIOS").suspend();
+     return isDefined;
+  }
+
+
+  void cxios_set_domaingroup_lat_name(domaingroup_Ptr domaingroup_hdl, const char * lat_name, int lat_name_size)
+  {
+    std::string lat_name_str;
+    if (!cstr2string(lat_name, lat_name_size, lat_name_str)) return;
+    CTimer::get("XIOS").resume();
+    domaingroup_hdl->lat_name.setValue(lat_name_str);
+    CTimer::get("XIOS").suspend();
+  }
+
+  void cxios_get_domaingroup_lat_name(domaingroup_Ptr domaingroup_hdl, char * lat_name, int lat_name_size)
+  {
+    CTimer::get("XIOS").resume();
+    if (!string_copy(domaingroup_hdl->lat_name.getInheritedValue(), lat_name, lat_name_size))
+      ERROR("void cxios_get_domaingroup_lat_name(domaingroup_Ptr domaingroup_hdl, char * lat_name, int lat_name_size)", << "Input string is too short");
+    CTimer::get("XIOS").suspend();
+  }
+
+  bool cxios_is_defined_domaingroup_lat_name(domaingroup_Ptr domaingroup_hdl)
+  {
+     CTimer::get("XIOS").resume();
+     bool isDefined = domaingroup_hdl->lat_name.hasInheritedValue();
+     CTimer::get("XIOS").suspend();
+     return isDefined;
+  }
+
+
+  void cxios_set_domaingroup_latvalue_1d(domaingroup_Ptr domaingroup_hdl, double* latvalue_1d, int* extent)
+  {
+    CTimer::get("XIOS").resume();
+    CArray<double,1> tmp(latvalue_1d, shape(extent[0]), neverDeleteData);
+    domaingroup_hdl->latvalue_1d.reference(tmp.copy());
+     CTimer::get("XIOS").suspend();
+  }
+
+  void cxios_get_domaingroup_latvalue_1d(domaingroup_Ptr domaingroup_hdl, double* latvalue_1d, int* extent)
+  {
+    CTimer::get("XIOS").resume();
+    CArray<double,1> tmp(latvalue_1d, shape(extent[0]), neverDeleteData);
+    tmp=domaingroup_hdl->latvalue_1d.getInheritedValue();
+     CTimer::get("XIOS").suspend();
+  }
+
+  bool cxios_is_defined_domaingroup_latvalue_1d(domaingroup_Ptr domaingroup_hdl)
+  {
+     CTimer::get("XIOS").resume();
+     bool isDefined = domaingroup_hdl->latvalue_1d.hasInheritedValue();
+     CTimer::get("XIOS").suspend();
+     return isDefined;
+  }
+
+
+  void cxios_set_domaingroup_latvalue_2d(domaingroup_Ptr domaingroup_hdl, double* latvalue_2d, int* extent)
+  {
+    CTimer::get("XIOS").resume();
+    CArray<double,2> tmp(latvalue_2d, shape(extent[0], extent[1]), neverDeleteData);
+    domaingroup_hdl->latvalue_2d.reference(tmp.copy());
+     CTimer::get("XIOS").suspend();
+  }
+
+  void cxios_get_domaingroup_latvalue_2d(domaingroup_Ptr domaingroup_hdl, double* latvalue_2d, int* extent)
+  {
+    CTimer::get("XIOS").resume();
+    CArray<double,2> tmp(latvalue_2d, shape(extent[0], extent[1]), neverDeleteData);
+    tmp=domaingroup_hdl->latvalue_2d.getInheritedValue();
+     CTimer::get("XIOS").suspend();
+  }
+
+  bool cxios_is_defined_domaingroup_latvalue_2d(domaingroup_Ptr domaingroup_hdl)
+  {
+     CTimer::get("XIOS").resume();
+     bool isDefined = domaingroup_hdl->latvalue_2d.hasInheritedValue();
+     CTimer::get("XIOS").suspend();
+     return isDefined;
+  }
+
+
+  void cxios_set_domaingroup_lon_name(domaingroup_Ptr domaingroup_hdl, const char * lon_name, int lon_name_size)
+  {
+    std::string lon_name_str;
+    if (!cstr2string(lon_name, lon_name_size, lon_name_str)) return;
+    CTimer::get("XIOS").resume();
+    domaingroup_hdl->lon_name.setValue(lon_name_str);
+    CTimer::get("XIOS").suspend();
+  }
+
+  void cxios_get_domaingroup_lon_name(domaingroup_Ptr domaingroup_hdl, char * lon_name, int lon_name_size)
+  {
+    CTimer::get("XIOS").resume();
+    if (!string_copy(domaingroup_hdl->lon_name.getInheritedValue(), lon_name, lon_name_size))
+      ERROR("void cxios_get_domaingroup_lon_name(domaingroup_Ptr domaingroup_hdl, char * lon_name, int lon_name_size)", << "Input string is too short");
+    CTimer::get("XIOS").suspend();
+  }
+
+  bool cxios_is_defined_domaingroup_lon_name(domaingroup_Ptr domaingroup_hdl)
+  {
+     CTimer::get("XIOS").resume();
+     bool isDefined = domaingroup_hdl->lon_name.hasInheritedValue();
+     CTimer::get("XIOS").suspend();
+     return isDefined;
+  }
+
+
+  void cxios_set_domaingroup_long_name(domaingroup_Ptr domaingroup_hdl, const char * long_name, int long_name_size)
+  {
+    std::string long_name_str;
+    if (!cstr2string(long_name, long_name_size, long_name_str)) return;
+    CTimer::get("XIOS").resume();
+    domaingroup_hdl->long_name.setValue(long_name_str);
+    CTimer::get("XIOS").suspend();
+  }
+
+  void cxios_get_domaingroup_long_name(domaingroup_Ptr domaingroup_hdl, char * long_name, int long_name_size)
+  {
+    CTimer::get("XIOS").resume();
+    if (!string_copy(domaingroup_hdl->long_name.getInheritedValue(), long_name, long_name_size))
+      ERROR("void cxios_get_domaingroup_long_name(domaingroup_Ptr domaingroup_hdl, char * long_name, int long_name_size)", << "Input string is too short");
+    CTimer::get("XIOS").suspend();
+  }
+
+  bool cxios_is_defined_domaingroup_long_name(domaingroup_Ptr domaingroup_hdl)
+  {
+     CTimer::get("XIOS").resume();
+     bool isDefined = domaingroup_hdl->long_name.hasInheritedValue();
+     CTimer::get("XIOS").suspend();
+     return isDefined;
+  }
+
+
+  void cxios_set_domaingroup_lonvalue_1d(domaingroup_Ptr domaingroup_hdl, double* lonvalue_1d, int* extent)
+  {
+    CTimer::get("XIOS").resume();
+    CArray<double,1> tmp(lonvalue_1d, shape(extent[0]), neverDeleteData);
+    domaingroup_hdl->lonvalue_1d.reference(tmp.copy());
+     CTimer::get("XIOS").suspend();
+  }
+
+  void cxios_get_domaingroup_lonvalue_1d(domaingroup_Ptr domaingroup_hdl, double* lonvalue_1d, int* extent)
+  {
+    CTimer::get("XIOS").resume();
+    CArray<double,1> tmp(lonvalue_1d, shape(extent[0]), neverDeleteData);
+    tmp=domaingroup_hdl->lonvalue_1d.getInheritedValue();
+     CTimer::get("XIOS").suspend();
+  }
+
+  bool cxios_is_defined_domaingroup_lonvalue_1d(domaingroup_Ptr domaingroup_hdl)
+  {
+     CTimer::get("XIOS").resume();
+     bool isDefined = domaingroup_hdl->lonvalue_1d.hasInheritedValue();
+     CTimer::get("XIOS").suspend();
+     return isDefined;
+  }
+
+
+  void cxios_set_domaingroup_lonvalue_2d(domaingroup_Ptr domaingroup_hdl, double* lonvalue_2d, int* extent)
+  {
+    CTimer::get("XIOS").resume();
+    CArray<double,2> tmp(lonvalue_2d, shape(extent[0], extent[1]), neverDeleteData);
+    domaingroup_hdl->lonvalue_2d.reference(tmp.copy());
+     CTimer::get("XIOS").suspend();
+  }
+
+  void cxios_get_domaingroup_lonvalue_2d(domaingroup_Ptr domaingroup_hdl, double* lonvalue_2d, int* extent)
+  {
+    CTimer::get("XIOS").resume();
+    CArray<double,2> tmp(lonvalue_2d, shape(extent[0], extent[1]), neverDeleteData);
+    tmp=domaingroup_hdl->lonvalue_2d.getInheritedValue();
+     CTimer::get("XIOS").suspend();
+  }
+
+  bool cxios_is_defined_domaingroup_lonvalue_2d(domaingroup_Ptr domaingroup_hdl)
+  {
+     CTimer::get("XIOS").resume();
+     bool isDefined = domaingroup_hdl->lonvalue_2d.hasInheritedValue();
+     CTimer::get("XIOS").suspend();
+     return isDefined;
+  }
+
+
+  void cxios_set_domaingroup_mask_1d(domaingroup_Ptr domaingroup_hdl, bool* mask_1d, int* extent)
+  {
+    CTimer::get("XIOS").resume();
+    CArray<bool,1> tmp(mask_1d, shape(extent[0]), neverDeleteData);
+    domaingroup_hdl->mask_1d.reference(tmp.copy());
+     CTimer::get("XIOS").suspend();
+  }
+
+  void cxios_get_domaingroup_mask_1d(domaingroup_Ptr domaingroup_hdl, bool* mask_1d, int* extent)
+  {
+    CTimer::get("XIOS").resume();
+    CArray<bool,1> tmp(mask_1d, shape(extent[0]), neverDeleteData);
+    tmp=domaingroup_hdl->mask_1d.getInheritedValue();
+     CTimer::get("XIOS").suspend();
+  }
+
+  bool cxios_is_defined_domaingroup_mask_1d(domaingroup_Ptr domaingroup_hdl)
+  {
+     CTimer::get("XIOS").resume();
+     bool isDefined = domaingroup_hdl->mask_1d.hasInheritedValue();
+     CTimer::get("XIOS").suspend();
+     return isDefined;
+  }
+
+
+  void cxios_set_domaingroup_mask_2d(domaingroup_Ptr domaingroup_hdl, bool* mask_2d, int* extent)
+  {
+    CTimer::get("XIOS").resume();
+    CArray<bool,2> tmp(mask_2d, shape(extent[0], extent[1]), neverDeleteData);
+    domaingroup_hdl->mask_2d.reference(tmp.copy());
+     CTimer::get("XIOS").suspend();
+  }
+
+  void cxios_get_domaingroup_mask_2d(domaingroup_Ptr domaingroup_hdl, bool* mask_2d, int* extent)
+  {
+    CTimer::get("XIOS").resume();
+    CArray<bool,2> tmp(mask_2d, shape(extent[0], extent[1]), neverDeleteData);
+    tmp=domaingroup_hdl->mask_2d.getInheritedValue();
+     CTimer::get("XIOS").suspend();
+  }
+
+  bool cxios_is_defined_domaingroup_mask_2d(domaingroup_Ptr domaingroup_hdl)
+  {
+     CTimer::get("XIOS").resume();
+     bool isDefined = domaingroup_hdl->mask_2d.hasInheritedValue();
+     CTimer::get("XIOS").suspend();
+     return isDefined;
+  }
+
+
+  void cxios_set_domaingroup_name(domaingroup_Ptr domaingroup_hdl, const char * name, int name_size)
+  {
+    std::string name_str;
+    if (!cstr2string(name, name_size, name_str)) return;
+    CTimer::get("XIOS").resume();
+    domaingroup_hdl->name.setValue(name_str);
+    CTimer::get("XIOS").suspend();
+  }
+
+  void cxios_get_domaingroup_name(domaingroup_Ptr domaingroup_hdl, char * name, int name_size)
+  {
+    CTimer::get("XIOS").resume();
+    if (!string_copy(domaingroup_hdl->name.getInheritedValue(), name, name_size))
+      ERROR("void cxios_get_domaingroup_name(domaingroup_Ptr domaingroup_hdl, char * name, int name_size)", << "Input string is too short");
+    CTimer::get("XIOS").suspend();
+  }
+
+  bool cxios_is_defined_domaingroup_name(domaingroup_Ptr domaingroup_hdl)
+  {
+     CTimer::get("XIOS").resume();
+     bool isDefined = domaingroup_hdl->name.hasInheritedValue();
+     CTimer::get("XIOS").suspend();
+     return isDefined;
+  }
+
+
+  void cxios_set_domaingroup_ni(domaingroup_Ptr domaingroup_hdl, int ni)
+  {
+    CTimer::get("XIOS").resume();
+    domaingroup_hdl->ni.setValue(ni);
+    CTimer::get("XIOS").suspend();
+  }
+
+  void cxios_get_domaingroup_ni(domaingroup_Ptr domaingroup_hdl, int* ni)
+  {
+    CTimer::get("XIOS").resume();
+    *ni = domaingroup_hdl->ni.getInheritedValue();
+    CTimer::get("XIOS").suspend();
+  }
+
+  bool cxios_is_defined_domaingroup_ni(domaingroup_Ptr domaingroup_hdl)
+  {
+     CTimer::get("XIOS").resume();
+     bool isDefined = domaingroup_hdl->ni.hasInheritedValue();
+     CTimer::get("XIOS").suspend();
+     return isDefined;
+  }
+
+
+  void cxios_set_domaingroup_ni_glo(domaingroup_Ptr domaingroup_hdl, int ni_glo)
+  {
+    CTimer::get("XIOS").resume();
+    domaingroup_hdl->ni_glo.setValue(ni_glo);
+    CTimer::get("XIOS").suspend();
+  }
+
+  void cxios_get_domaingroup_ni_glo(domaingroup_Ptr domaingroup_hdl, int* ni_glo)
+  {
+    CTimer::get("XIOS").resume();
+    *ni_glo = domaingroup_hdl->ni_glo.getInheritedValue();
+    CTimer::get("XIOS").suspend();
+  }
+
+  bool cxios_is_defined_domaingroup_ni_glo(domaingroup_Ptr domaingroup_hdl)
+  {
+     CTimer::get("XIOS").resume();
+     bool isDefined = domaingroup_hdl->ni_glo.hasInheritedValue();
+     CTimer::get("XIOS").suspend();
+     return isDefined;
+  }
+
+
+  void cxios_set_domaingroup_nj(domaingroup_Ptr domaingroup_hdl, int nj)
+  {
+    CTimer::get("XIOS").resume();
+    domaingroup_hdl->nj.setValue(nj);
+    CTimer::get("XIOS").suspend();
+  }
+
+  void cxios_get_domaingroup_nj(domaingroup_Ptr domaingroup_hdl, int* nj)
+  {
+    CTimer::get("XIOS").resume();
+    *nj = domaingroup_hdl->nj.getInheritedValue();
+    CTimer::get("XIOS").suspend();
+  }
+
+  bool cxios_is_defined_domaingroup_nj(domaingroup_Ptr domaingroup_hdl)
+  {
+     CTimer::get("XIOS").resume();
+     bool isDefined = domaingroup_hdl->nj.hasInheritedValue();
+     CTimer::get("XIOS").suspend();
+     return isDefined;
+  }
+
+
+  void cxios_set_domaingroup_nj_glo(domaingroup_Ptr domaingroup_hdl, int nj_glo)
+  {
+    CTimer::get("XIOS").resume();
+    domaingroup_hdl->nj_glo.setValue(nj_glo);
+    CTimer::get("XIOS").suspend();
+  }
+
+  void cxios_get_domaingroup_nj_glo(domaingroup_Ptr domaingroup_hdl, int* nj_glo)
+  {
+    CTimer::get("XIOS").resume();
+    *nj_glo = domaingroup_hdl->nj_glo.getInheritedValue();
+    CTimer::get("XIOS").suspend();
+  }
+
+  bool cxios_is_defined_domaingroup_nj_glo(domaingroup_Ptr domaingroup_hdl)
+  {
+     CTimer::get("XIOS").resume();
+     bool isDefined = domaingroup_hdl->nj_glo.hasInheritedValue();
+     CTimer::get("XIOS").suspend();
+     return isDefined;
+  }
+
+
+  void cxios_set_domaingroup_nvertex(domaingroup_Ptr domaingroup_hdl, int nvertex)
+  {
+    CTimer::get("XIOS").resume();
+    domaingroup_hdl->nvertex.setValue(nvertex);
+    CTimer::get("XIOS").suspend();
+  }
+
+  void cxios_get_domaingroup_nvertex(domaingroup_Ptr domaingroup_hdl, int* nvertex)
+  {
+    CTimer::get("XIOS").resume();
+    *nvertex = domaingroup_hdl->nvertex.getInheritedValue();
+    CTimer::get("XIOS").suspend();
+  }
+
+  bool cxios_is_defined_domaingroup_nvertex(domaingroup_Ptr domaingroup_hdl)
+  {
+     CTimer::get("XIOS").resume();
+     bool isDefined = domaingroup_hdl->nvertex.hasInheritedValue();
+     CTimer::get("XIOS").suspend();
+     return isDefined;
+  }
+
+
+  void cxios_set_domaingroup_prec(domaingroup_Ptr domaingroup_hdl, int prec)
+  {
+    CTimer::get("XIOS").resume();
+    domaingroup_hdl->prec.setValue(prec);
+    CTimer::get("XIOS").suspend();
+  }
+
+  void cxios_get_domaingroup_prec(domaingroup_Ptr domaingroup_hdl, int* prec)
+  {
+    CTimer::get("XIOS").resume();
+    *prec = domaingroup_hdl->prec.getInheritedValue();
+    CTimer::get("XIOS").suspend();
+  }
+
+  bool cxios_is_defined_domaingroup_prec(domaingroup_Ptr domaingroup_hdl)
+  {
+     CTimer::get("XIOS").resume();
+     bool isDefined = domaingroup_hdl->prec.hasInheritedValue();
+     CTimer::get("XIOS").suspend();
+     return isDefined;
+  }
+
+
+  void cxios_set_domaingroup_radius(domaingroup_Ptr domaingroup_hdl, double radius)
+  {
+    CTimer::get("XIOS").resume();
+    domaingroup_hdl->radius.setValue(radius);
+    CTimer::get("XIOS").suspend();
+  }
+
+  void cxios_get_domaingroup_radius(domaingroup_Ptr domaingroup_hdl, double* radius)
+  {
+    CTimer::get("XIOS").resume();
+    *radius = domaingroup_hdl->radius.getInheritedValue();
+    CTimer::get("XIOS").suspend();
+  }
+
+  bool cxios_is_defined_domaingroup_radius(domaingroup_Ptr domaingroup_hdl)
+  {
+     CTimer::get("XIOS").resume();
+     bool isDefined = domaingroup_hdl->radius.hasInheritedValue();
+     CTimer::get("XIOS").suspend();
+     return isDefined;
+  }
+
+
+  void cxios_set_domaingroup_standard_name(domaingroup_Ptr domaingroup_hdl, const char * standard_name, int standard_name_size)
+  {
+    std::string standard_name_str;
+    if (!cstr2string(standard_name, standard_name_size, standard_name_str)) return;
+    CTimer::get("XIOS").resume();
+    domaingroup_hdl->standard_name.setValue(standard_name_str);
+    CTimer::get("XIOS").suspend();
+  }
+
+  void cxios_get_domaingroup_standard_name(domaingroup_Ptr domaingroup_hdl, char * standard_name, int standard_name_size)
+  {
+    CTimer::get("XIOS").resume();
+    if (!string_copy(domaingroup_hdl->standard_name.getInheritedValue(), standard_name, standard_name_size))
+      ERROR("void cxios_get_domaingroup_standard_name(domaingroup_Ptr domaingroup_hdl, char * standard_name, int standard_name_size)", << "Input string is too short");
+    CTimer::get("XIOS").suspend();
+  }
+
+  bool cxios_is_defined_domaingroup_standard_name(domaingroup_Ptr domaingroup_hdl)
+  {
+     CTimer::get("XIOS").resume();
+     bool isDefined = domaingroup_hdl->standard_name.hasInheritedValue();
+     CTimer::get("XIOS").suspend();
+     return isDefined;
+  }
+
+
+  void cxios_set_domaingroup_type(domaingroup_Ptr domaingroup_hdl, const char * type, int type_size)
+  {
+    std::string type_str;
+    if (!cstr2string(type, type_size, type_str)) return;
+    CTimer::get("XIOS").resume();
+    domaingroup_hdl->type.fromString(type_str);
+    CTimer::get("XIOS").suspend();
+  }
+
+  void cxios_get_domaingroup_type(domaingroup_Ptr domaingroup_hdl, char * type, int type_size)
+  {
+    CTimer::get("XIOS").resume();
+    if (!string_copy(domaingroup_hdl->type.getInheritedStringValue(), type, type_size))
+      ERROR("void cxios_get_domaingroup_type(domaingroup_Ptr domaingroup_hdl, char * type, int type_size)", << "Input string is too short");
+    CTimer::get("XIOS").suspend();
+  }
+
+  bool cxios_is_defined_domaingroup_type(domaingroup_Ptr domaingroup_hdl)
+  {
+     CTimer::get("XIOS").resume();
+     bool isDefined = domaingroup_hdl->type.hasInheritedValue();
+     CTimer::get("XIOS").suspend();
+     return isDefined;
+  }
+}
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/c_attr/icduplicate_scalar_to_axis_attr.cpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/c_attr/icduplicate_scalar_to_axis_attr.cpp	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/c_attr/icduplicate_scalar_to_axis_attr.cpp	(revision 1749)
@@ -0,0 +1,17 @@
+/* ************************************************************************** *
+ *               Interface auto generated - do not modify                     *
+ * ************************************************************************** */
+
+#include <boost/multi_array.hpp>
+#include "xios.hpp"
+#include "attribute_template.hpp"
+#include "object_template.hpp"
+#include "group_template.hpp"
+#include "icutil.hpp"
+#include "icdate.hpp"
+#include "timer.hpp"
+#include "node_type.hpp"
+
+extern "C"
+{
+  typedef xios::CDuplicateScalarToAxis* duplicate_scalar_to_axis_Ptr;}
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/c_attr/icexpand_domain_attr.cpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/c_attr/icexpand_domain_attr.cpp	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/c_attr/icexpand_domain_attr.cpp	(revision 1749)
@@ -0,0 +1,112 @@
+/* ************************************************************************** *
+ *               Interface auto generated - do not modify                     *
+ * ************************************************************************** */
+
+#include <boost/multi_array.hpp>
+#include "xios.hpp"
+#include "attribute_template.hpp"
+#include "object_template.hpp"
+#include "group_template.hpp"
+#include "icutil.hpp"
+#include "icdate.hpp"
+#include "timer.hpp"
+#include "node_type.hpp"
+
+extern "C"
+{
+  typedef xios::CExpandDomain* expand_domain_Ptr;
+
+  void cxios_set_expand_domain_i_periodic(expand_domain_Ptr expand_domain_hdl, bool i_periodic)
+  {
+    CTimer::get("XIOS").resume();
+    expand_domain_hdl->i_periodic.setValue(i_periodic);
+    CTimer::get("XIOS").suspend();
+  }
+
+  void cxios_get_expand_domain_i_periodic(expand_domain_Ptr expand_domain_hdl, bool* i_periodic)
+  {
+    CTimer::get("XIOS").resume();
+    *i_periodic = expand_domain_hdl->i_periodic.getInheritedValue();
+    CTimer::get("XIOS").suspend();
+  }
+
+  bool cxios_is_defined_expand_domain_i_periodic(expand_domain_Ptr expand_domain_hdl)
+  {
+     CTimer::get("XIOS").resume();
+     bool isDefined = expand_domain_hdl->i_periodic.hasInheritedValue();
+     CTimer::get("XIOS").suspend();
+     return isDefined;
+  }
+
+
+  void cxios_set_expand_domain_j_periodic(expand_domain_Ptr expand_domain_hdl, bool j_periodic)
+  {
+    CTimer::get("XIOS").resume();
+    expand_domain_hdl->j_periodic.setValue(j_periodic);
+    CTimer::get("XIOS").suspend();
+  }
+
+  void cxios_get_expand_domain_j_periodic(expand_domain_Ptr expand_domain_hdl, bool* j_periodic)
+  {
+    CTimer::get("XIOS").resume();
+    *j_periodic = expand_domain_hdl->j_periodic.getInheritedValue();
+    CTimer::get("XIOS").suspend();
+  }
+
+  bool cxios_is_defined_expand_domain_j_periodic(expand_domain_Ptr expand_domain_hdl)
+  {
+     CTimer::get("XIOS").resume();
+     bool isDefined = expand_domain_hdl->j_periodic.hasInheritedValue();
+     CTimer::get("XIOS").suspend();
+     return isDefined;
+  }
+
+
+  void cxios_set_expand_domain_order(expand_domain_Ptr expand_domain_hdl, int order)
+  {
+    CTimer::get("XIOS").resume();
+    expand_domain_hdl->order.setValue(order);
+    CTimer::get("XIOS").suspend();
+  }
+
+  void cxios_get_expand_domain_order(expand_domain_Ptr expand_domain_hdl, int* order)
+  {
+    CTimer::get("XIOS").resume();
+    *order = expand_domain_hdl->order.getInheritedValue();
+    CTimer::get("XIOS").suspend();
+  }
+
+  bool cxios_is_defined_expand_domain_order(expand_domain_Ptr expand_domain_hdl)
+  {
+     CTimer::get("XIOS").resume();
+     bool isDefined = expand_domain_hdl->order.hasInheritedValue();
+     CTimer::get("XIOS").suspend();
+     return isDefined;
+  }
+
+
+  void cxios_set_expand_domain_type(expand_domain_Ptr expand_domain_hdl, const char * type, int type_size)
+  {
+    std::string type_str;
+    if (!cstr2string(type, type_size, type_str)) return;
+    CTimer::get("XIOS").resume();
+    expand_domain_hdl->type.fromString(type_str);
+    CTimer::get("XIOS").suspend();
+  }
+
+  void cxios_get_expand_domain_type(expand_domain_Ptr expand_domain_hdl, char * type, int type_size)
+  {
+    CTimer::get("XIOS").resume();
+    if (!string_copy(expand_domain_hdl->type.getInheritedStringValue(), type, type_size))
+      ERROR("void cxios_get_expand_domain_type(expand_domain_Ptr expand_domain_hdl, char * type, int type_size)", << "Input string is too short");
+    CTimer::get("XIOS").suspend();
+  }
+
+  bool cxios_is_defined_expand_domain_type(expand_domain_Ptr expand_domain_hdl)
+  {
+     CTimer::get("XIOS").resume();
+     bool isDefined = expand_domain_hdl->type.hasInheritedValue();
+     CTimer::get("XIOS").suspend();
+     return isDefined;
+  }
+}
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/c_attr/icextract_axis_to_scalar_attr.cpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/c_attr/icextract_axis_to_scalar_attr.cpp	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/c_attr/icextract_axis_to_scalar_attr.cpp	(revision 1749)
@@ -0,0 +1,40 @@
+/* ************************************************************************** *
+ *               Interface auto generated - do not modify                     *
+ * ************************************************************************** */
+
+#include <boost/multi_array.hpp>
+#include "xios.hpp"
+#include "attribute_template.hpp"
+#include "object_template.hpp"
+#include "group_template.hpp"
+#include "icutil.hpp"
+#include "icdate.hpp"
+#include "timer.hpp"
+#include "node_type.hpp"
+
+extern "C"
+{
+  typedef xios::CExtractAxisToScalar* extract_axis_to_scalar_Ptr;
+
+  void cxios_set_extract_axis_to_scalar_position(extract_axis_to_scalar_Ptr extract_axis_to_scalar_hdl, int position)
+  {
+    CTimer::get("XIOS").resume();
+    extract_axis_to_scalar_hdl->position.setValue(position);
+    CTimer::get("XIOS").suspend();
+  }
+
+  void cxios_get_extract_axis_to_scalar_position(extract_axis_to_scalar_Ptr extract_axis_to_scalar_hdl, int* position)
+  {
+    CTimer::get("XIOS").resume();
+    *position = extract_axis_to_scalar_hdl->position.getInheritedValue();
+    CTimer::get("XIOS").suspend();
+  }
+
+  bool cxios_is_defined_extract_axis_to_scalar_position(extract_axis_to_scalar_Ptr extract_axis_to_scalar_hdl)
+  {
+     CTimer::get("XIOS").resume();
+     bool isDefined = extract_axis_to_scalar_hdl->position.hasInheritedValue();
+     CTimer::get("XIOS").suspend();
+     return isDefined;
+  }
+}
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/c_attr/icextract_domain_to_axis_attr.cpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/c_attr/icextract_domain_to_axis_attr.cpp	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/c_attr/icextract_domain_to_axis_attr.cpp	(revision 1749)
@@ -0,0 +1,66 @@
+/* ************************************************************************** *
+ *               Interface auto generated - do not modify                     *
+ * ************************************************************************** */
+
+#include <boost/multi_array.hpp>
+#include "xios.hpp"
+#include "attribute_template.hpp"
+#include "object_template.hpp"
+#include "group_template.hpp"
+#include "icutil.hpp"
+#include "icdate.hpp"
+#include "timer.hpp"
+#include "node_type.hpp"
+
+extern "C"
+{
+  typedef xios::CExtractDomainToAxis* extract_domain_to_axis_Ptr;
+
+  void cxios_set_extract_domain_to_axis_direction(extract_domain_to_axis_Ptr extract_domain_to_axis_hdl, const char * direction, int direction_size)
+  {
+    std::string direction_str;
+    if (!cstr2string(direction, direction_size, direction_str)) return;
+    CTimer::get("XIOS").resume();
+    extract_domain_to_axis_hdl->direction.fromString(direction_str);
+    CTimer::get("XIOS").suspend();
+  }
+
+  void cxios_get_extract_domain_to_axis_direction(extract_domain_to_axis_Ptr extract_domain_to_axis_hdl, char * direction, int direction_size)
+  {
+    CTimer::get("XIOS").resume();
+    if (!string_copy(extract_domain_to_axis_hdl->direction.getInheritedStringValue(), direction, direction_size))
+      ERROR("void cxios_get_extract_domain_to_axis_direction(extract_domain_to_axis_Ptr extract_domain_to_axis_hdl, char * direction, int direction_size)", << "Input string is too short");
+    CTimer::get("XIOS").suspend();
+  }
+
+  bool cxios_is_defined_extract_domain_to_axis_direction(extract_domain_to_axis_Ptr extract_domain_to_axis_hdl)
+  {
+     CTimer::get("XIOS").resume();
+     bool isDefined = extract_domain_to_axis_hdl->direction.hasInheritedValue();
+     CTimer::get("XIOS").suspend();
+     return isDefined;
+  }
+
+
+  void cxios_set_extract_domain_to_axis_position(extract_domain_to_axis_Ptr extract_domain_to_axis_hdl, int position)
+  {
+    CTimer::get("XIOS").resume();
+    extract_domain_to_axis_hdl->position.setValue(position);
+    CTimer::get("XIOS").suspend();
+  }
+
+  void cxios_get_extract_domain_to_axis_position(extract_domain_to_axis_Ptr extract_domain_to_axis_hdl, int* position)
+  {
+    CTimer::get("XIOS").resume();
+    *position = extract_domain_to_axis_hdl->position.getInheritedValue();
+    CTimer::get("XIOS").suspend();
+  }
+
+  bool cxios_is_defined_extract_domain_to_axis_position(extract_domain_to_axis_Ptr extract_domain_to_axis_hdl)
+  {
+     CTimer::get("XIOS").resume();
+     bool isDefined = extract_domain_to_axis_hdl->position.hasInheritedValue();
+     CTimer::get("XIOS").suspend();
+     return isDefined;
+  }
+}
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/c_attr/icfield_attr.cpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/c_attr/icfield_attr.cpp	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/c_attr/icfield_attr.cpp	(revision 1749)
@@ -0,0 +1,843 @@
+/* ************************************************************************** *
+ *               Interface auto generated - do not modify                     *
+ * ************************************************************************** */
+
+#include <boost/multi_array.hpp>
+#include "xios.hpp"
+#include "attribute_template.hpp"
+#include "object_template.hpp"
+#include "group_template.hpp"
+#include "icutil.hpp"
+#include "icdate.hpp"
+#include "timer.hpp"
+#include "node_type.hpp"
+
+extern "C"
+{
+  typedef xios::CField* field_Ptr;
+
+  void cxios_set_field_add_offset(field_Ptr field_hdl, double add_offset)
+  {
+    CTimer::get("XIOS").resume();
+    field_hdl->add_offset.setValue(add_offset);
+    CTimer::get("XIOS").suspend();
+  }
+
+  void cxios_get_field_add_offset(field_Ptr field_hdl, double* add_offset)
+  {
+    CTimer::get("XIOS").resume();
+    *add_offset = field_hdl->add_offset.getInheritedValue();
+    CTimer::get("XIOS").suspend();
+  }
+
+  bool cxios_is_defined_field_add_offset(field_Ptr field_hdl)
+  {
+     CTimer::get("XIOS").resume();
+     bool isDefined = field_hdl->add_offset.hasInheritedValue();
+     CTimer::get("XIOS").suspend();
+     return isDefined;
+  }
+
+
+  void cxios_set_field_axis_ref(field_Ptr field_hdl, const char * axis_ref, int axis_ref_size)
+  {
+    std::string axis_ref_str;
+    if (!cstr2string(axis_ref, axis_ref_size, axis_ref_str)) return;
+    CTimer::get("XIOS").resume();
+    field_hdl->axis_ref.setValue(axis_ref_str);
+    CTimer::get("XIOS").suspend();
+  }
+
+  void cxios_get_field_axis_ref(field_Ptr field_hdl, char * axis_ref, int axis_ref_size)
+  {
+    CTimer::get("XIOS").resume();
+    if (!string_copy(field_hdl->axis_ref.getInheritedValue(), axis_ref, axis_ref_size))
+      ERROR("void cxios_get_field_axis_ref(field_Ptr field_hdl, char * axis_ref, int axis_ref_size)", << "Input string is too short");
+    CTimer::get("XIOS").suspend();
+  }
+
+  bool cxios_is_defined_field_axis_ref(field_Ptr field_hdl)
+  {
+     CTimer::get("XIOS").resume();
+     bool isDefined = field_hdl->axis_ref.hasInheritedValue();
+     CTimer::get("XIOS").suspend();
+     return isDefined;
+  }
+
+
+  void cxios_set_field_cell_methods(field_Ptr field_hdl, const char * cell_methods, int cell_methods_size)
+  {
+    std::string cell_methods_str;
+    if (!cstr2string(cell_methods, cell_methods_size, cell_methods_str)) return;
+    CTimer::get("XIOS").resume();
+    field_hdl->cell_methods.setValue(cell_methods_str);
+    CTimer::get("XIOS").suspend();
+  }
+
+  void cxios_get_field_cell_methods(field_Ptr field_hdl, char * cell_methods, int cell_methods_size)
+  {
+    CTimer::get("XIOS").resume();
+    if (!string_copy(field_hdl->cell_methods.getInheritedValue(), cell_methods, cell_methods_size))
+      ERROR("void cxios_get_field_cell_methods(field_Ptr field_hdl, char * cell_methods, int cell_methods_size)", << "Input string is too short");
+    CTimer::get("XIOS").suspend();
+  }
+
+  bool cxios_is_defined_field_cell_methods(field_Ptr field_hdl)
+  {
+     CTimer::get("XIOS").resume();
+     bool isDefined = field_hdl->cell_methods.hasInheritedValue();
+     CTimer::get("XIOS").suspend();
+     return isDefined;
+  }
+
+
+  void cxios_set_field_cell_methods_mode(field_Ptr field_hdl, const char * cell_methods_mode, int cell_methods_mode_size)
+  {
+    std::string cell_methods_mode_str;
+    if (!cstr2string(cell_methods_mode, cell_methods_mode_size, cell_methods_mode_str)) return;
+    CTimer::get("XIOS").resume();
+    field_hdl->cell_methods_mode.fromString(cell_methods_mode_str);
+    CTimer::get("XIOS").suspend();
+  }
+
+  void cxios_get_field_cell_methods_mode(field_Ptr field_hdl, char * cell_methods_mode, int cell_methods_mode_size)
+  {
+    CTimer::get("XIOS").resume();
+    if (!string_copy(field_hdl->cell_methods_mode.getInheritedStringValue(), cell_methods_mode, cell_methods_mode_size))
+      ERROR("void cxios_get_field_cell_methods_mode(field_Ptr field_hdl, char * cell_methods_mode, int cell_methods_mode_size)", << "Input string is too short");
+    CTimer::get("XIOS").suspend();
+  }
+
+  bool cxios_is_defined_field_cell_methods_mode(field_Ptr field_hdl)
+  {
+     CTimer::get("XIOS").resume();
+     bool isDefined = field_hdl->cell_methods_mode.hasInheritedValue();
+     CTimer::get("XIOS").suspend();
+     return isDefined;
+  }
+
+
+  void cxios_set_field_check_if_active(field_Ptr field_hdl, bool check_if_active)
+  {
+    CTimer::get("XIOS").resume();
+    field_hdl->check_if_active.setValue(check_if_active);
+    CTimer::get("XIOS").suspend();
+  }
+
+  void cxios_get_field_check_if_active(field_Ptr field_hdl, bool* check_if_active)
+  {
+    CTimer::get("XIOS").resume();
+    *check_if_active = field_hdl->check_if_active.getInheritedValue();
+    CTimer::get("XIOS").suspend();
+  }
+
+  bool cxios_is_defined_field_check_if_active(field_Ptr field_hdl)
+  {
+     CTimer::get("XIOS").resume();
+     bool isDefined = field_hdl->check_if_active.hasInheritedValue();
+     CTimer::get("XIOS").suspend();
+     return isDefined;
+  }
+
+
+  void cxios_set_field_comment(field_Ptr field_hdl, const char * comment, int comment_size)
+  {
+    std::string comment_str;
+    if (!cstr2string(comment, comment_size, comment_str)) return;
+    CTimer::get("XIOS").resume();
+    field_hdl->comment.setValue(comment_str);
+    CTimer::get("XIOS").suspend();
+  }
+
+  void cxios_get_field_comment(field_Ptr field_hdl, char * comment, int comment_size)
+  {
+    CTimer::get("XIOS").resume();
+    if (!string_copy(field_hdl->comment.getInheritedValue(), comment, comment_size))
+      ERROR("void cxios_get_field_comment(field_Ptr field_hdl, char * comment, int comment_size)", << "Input string is too short");
+    CTimer::get("XIOS").suspend();
+  }
+
+  bool cxios_is_defined_field_comment(field_Ptr field_hdl)
+  {
+     CTimer::get("XIOS").resume();
+     bool isDefined = field_hdl->comment.hasInheritedValue();
+     CTimer::get("XIOS").suspend();
+     return isDefined;
+  }
+
+
+  void cxios_set_field_compression_level(field_Ptr field_hdl, int compression_level)
+  {
+    CTimer::get("XIOS").resume();
+    field_hdl->compression_level.setValue(compression_level);
+    CTimer::get("XIOS").suspend();
+  }
+
+  void cxios_get_field_compression_level(field_Ptr field_hdl, int* compression_level)
+  {
+    CTimer::get("XIOS").resume();
+    *compression_level = field_hdl->compression_level.getInheritedValue();
+    CTimer::get("XIOS").suspend();
+  }
+
+  bool cxios_is_defined_field_compression_level(field_Ptr field_hdl)
+  {
+     CTimer::get("XIOS").resume();
+     bool isDefined = field_hdl->compression_level.hasInheritedValue();
+     CTimer::get("XIOS").suspend();
+     return isDefined;
+  }
+
+
+  void cxios_set_field_default_value(field_Ptr field_hdl, double default_value)
+  {
+    CTimer::get("XIOS").resume();
+    field_hdl->default_value.setValue(default_value);
+    CTimer::get("XIOS").suspend();
+  }
+
+  void cxios_get_field_default_value(field_Ptr field_hdl, double* default_value)
+  {
+    CTimer::get("XIOS").resume();
+    *default_value = field_hdl->default_value.getInheritedValue();
+    CTimer::get("XIOS").suspend();
+  }
+
+  bool cxios_is_defined_field_default_value(field_Ptr field_hdl)
+  {
+     CTimer::get("XIOS").resume();
+     bool isDefined = field_hdl->default_value.hasInheritedValue();
+     CTimer::get("XIOS").suspend();
+     return isDefined;
+  }
+
+
+  void cxios_set_field_detect_missing_value(field_Ptr field_hdl, bool detect_missing_value)
+  {
+    CTimer::get("XIOS").resume();
+    field_hdl->detect_missing_value.setValue(detect_missing_value);
+    CTimer::get("XIOS").suspend();
+  }
+
+  void cxios_get_field_detect_missing_value(field_Ptr field_hdl, bool* detect_missing_value)
+  {
+    CTimer::get("XIOS").resume();
+    *detect_missing_value = field_hdl->detect_missing_value.getInheritedValue();
+    CTimer::get("XIOS").suspend();
+  }
+
+  bool cxios_is_defined_field_detect_missing_value(field_Ptr field_hdl)
+  {
+     CTimer::get("XIOS").resume();
+     bool isDefined = field_hdl->detect_missing_value.hasInheritedValue();
+     CTimer::get("XIOS").suspend();
+     return isDefined;
+  }
+
+
+  void cxios_set_field_domain_ref(field_Ptr field_hdl, const char * domain_ref, int domain_ref_size)
+  {
+    std::string domain_ref_str;
+    if (!cstr2string(domain_ref, domain_ref_size, domain_ref_str)) return;
+    CTimer::get("XIOS").resume();
+    field_hdl->domain_ref.setValue(domain_ref_str);
+    CTimer::get("XIOS").suspend();
+  }
+
+  void cxios_get_field_domain_ref(field_Ptr field_hdl, char * domain_ref, int domain_ref_size)
+  {
+    CTimer::get("XIOS").resume();
+    if (!string_copy(field_hdl->domain_ref.getInheritedValue(), domain_ref, domain_ref_size))
+      ERROR("void cxios_get_field_domain_ref(field_Ptr field_hdl, char * domain_ref, int domain_ref_size)", << "Input string is too short");
+    CTimer::get("XIOS").suspend();
+  }
+
+  bool cxios_is_defined_field_domain_ref(field_Ptr field_hdl)
+  {
+     CTimer::get("XIOS").resume();
+     bool isDefined = field_hdl->domain_ref.hasInheritedValue();
+     CTimer::get("XIOS").suspend();
+     return isDefined;
+  }
+
+
+  void cxios_set_field_enabled(field_Ptr field_hdl, bool enabled)
+  {
+    CTimer::get("XIOS").resume();
+    field_hdl->enabled.setValue(enabled);
+    CTimer::get("XIOS").suspend();
+  }
+
+  void cxios_get_field_enabled(field_Ptr field_hdl, bool* enabled)
+  {
+    CTimer::get("XIOS").resume();
+    *enabled = field_hdl->enabled.getInheritedValue();
+    CTimer::get("XIOS").suspend();
+  }
+
+  bool cxios_is_defined_field_enabled(field_Ptr field_hdl)
+  {
+     CTimer::get("XIOS").resume();
+     bool isDefined = field_hdl->enabled.hasInheritedValue();
+     CTimer::get("XIOS").suspend();
+     return isDefined;
+  }
+
+
+  void cxios_set_field_expr(field_Ptr field_hdl, const char * expr, int expr_size)
+  {
+    std::string expr_str;
+    if (!cstr2string(expr, expr_size, expr_str)) return;
+    CTimer::get("XIOS").resume();
+    field_hdl->expr.setValue(expr_str);
+    CTimer::get("XIOS").suspend();
+  }
+
+  void cxios_get_field_expr(field_Ptr field_hdl, char * expr, int expr_size)
+  {
+    CTimer::get("XIOS").resume();
+    if (!string_copy(field_hdl->expr.getInheritedValue(), expr, expr_size))
+      ERROR("void cxios_get_field_expr(field_Ptr field_hdl, char * expr, int expr_size)", << "Input string is too short");
+    CTimer::get("XIOS").suspend();
+  }
+
+  bool cxios_is_defined_field_expr(field_Ptr field_hdl)
+  {
+     CTimer::get("XIOS").resume();
+     bool isDefined = field_hdl->expr.hasInheritedValue();
+     CTimer::get("XIOS").suspend();
+     return isDefined;
+  }
+
+
+  void cxios_set_field_field_ref(field_Ptr field_hdl, const char * field_ref, int field_ref_size)
+  {
+    std::string field_ref_str;
+    if (!cstr2string(field_ref, field_ref_size, field_ref_str)) return;
+    CTimer::get("XIOS").resume();
+    field_hdl->field_ref.setValue(field_ref_str);
+    CTimer::get("XIOS").suspend();
+  }
+
+  void cxios_get_field_field_ref(field_Ptr field_hdl, char * field_ref, int field_ref_size)
+  {
+    CTimer::get("XIOS").resume();
+    if (!string_copy(field_hdl->field_ref.getInheritedValue(), field_ref, field_ref_size))
+      ERROR("void cxios_get_field_field_ref(field_Ptr field_hdl, char * field_ref, int field_ref_size)", << "Input string is too short");
+    CTimer::get("XIOS").suspend();
+  }
+
+  bool cxios_is_defined_field_field_ref(field_Ptr field_hdl)
+  {
+     CTimer::get("XIOS").resume();
+     bool isDefined = field_hdl->field_ref.hasInheritedValue();
+     CTimer::get("XIOS").suspend();
+     return isDefined;
+  }
+
+
+  void cxios_set_field_freq_offset(field_Ptr field_hdl, cxios_duration freq_offset_c)
+  {
+    CTimer::get("XIOS").resume();
+    field_hdl->freq_offset.allocate();
+    CDuration& freq_offset = field_hdl->freq_offset.get();
+    freq_offset.year = freq_offset_c.year;
+    freq_offset.month = freq_offset_c.month;
+    freq_offset.day = freq_offset_c.day;
+    freq_offset.hour = freq_offset_c.hour;
+    freq_offset.minute = freq_offset_c.minute;
+    freq_offset.second = freq_offset_c.second;
+    freq_offset.timestep = freq_offset_c.timestep;
+    CTimer::get("XIOS").suspend();
+  }
+
+  void cxios_get_field_freq_offset(field_Ptr field_hdl, cxios_duration* freq_offset_c)
+  {
+    CTimer::get("XIOS").resume();
+    CDuration freq_offset = field_hdl->freq_offset.getInheritedValue();
+    freq_offset_c->year = freq_offset.year;
+    freq_offset_c->month = freq_offset.month;
+    freq_offset_c->day = freq_offset.day;
+    freq_offset_c->hour = freq_offset.hour;
+    freq_offset_c->minute = freq_offset.minute;
+    freq_offset_c->second = freq_offset.second;
+    freq_offset_c->timestep = freq_offset.timestep;
+    CTimer::get("XIOS").suspend();
+  }
+
+  bool cxios_is_defined_field_freq_offset(field_Ptr field_hdl)
+  {
+     CTimer::get("XIOS").resume();
+     bool isDefined = field_hdl->freq_offset.hasInheritedValue();
+     CTimer::get("XIOS").suspend();
+     return isDefined;
+  }
+
+
+  void cxios_set_field_freq_op(field_Ptr field_hdl, cxios_duration freq_op_c)
+  {
+    CTimer::get("XIOS").resume();
+    field_hdl->freq_op.allocate();
+    CDuration& freq_op = field_hdl->freq_op.get();
+    freq_op.year = freq_op_c.year;
+    freq_op.month = freq_op_c.month;
+    freq_op.day = freq_op_c.day;
+    freq_op.hour = freq_op_c.hour;
+    freq_op.minute = freq_op_c.minute;
+    freq_op.second = freq_op_c.second;
+    freq_op.timestep = freq_op_c.timestep;
+    CTimer::get("XIOS").suspend();
+  }
+
+  void cxios_get_field_freq_op(field_Ptr field_hdl, cxios_duration* freq_op_c)
+  {
+    CTimer::get("XIOS").resume();
+    CDuration freq_op = field_hdl->freq_op.getInheritedValue();
+    freq_op_c->year = freq_op.year;
+    freq_op_c->month = freq_op.month;
+    freq_op_c->day = freq_op.day;
+    freq_op_c->hour = freq_op.hour;
+    freq_op_c->minute = freq_op.minute;
+    freq_op_c->second = freq_op.second;
+    freq_op_c->timestep = freq_op.timestep;
+    CTimer::get("XIOS").suspend();
+  }
+
+  bool cxios_is_defined_field_freq_op(field_Ptr field_hdl)
+  {
+     CTimer::get("XIOS").resume();
+     bool isDefined = field_hdl->freq_op.hasInheritedValue();
+     CTimer::get("XIOS").suspend();
+     return isDefined;
+  }
+
+
+  void cxios_set_field_grid_path(field_Ptr field_hdl, const char * grid_path, int grid_path_size)
+  {
+    std::string grid_path_str;
+    if (!cstr2string(grid_path, grid_path_size, grid_path_str)) return;
+    CTimer::get("XIOS").resume();
+    field_hdl->grid_path.setValue(grid_path_str);
+    CTimer::get("XIOS").suspend();
+  }
+
+  void cxios_get_field_grid_path(field_Ptr field_hdl, char * grid_path, int grid_path_size)
+  {
+    CTimer::get("XIOS").resume();
+    if (!string_copy(field_hdl->grid_path.getInheritedValue(), grid_path, grid_path_size))
+      ERROR("void cxios_get_field_grid_path(field_Ptr field_hdl, char * grid_path, int grid_path_size)", << "Input string is too short");
+    CTimer::get("XIOS").suspend();
+  }
+
+  bool cxios_is_defined_field_grid_path(field_Ptr field_hdl)
+  {
+     CTimer::get("XIOS").resume();
+     bool isDefined = field_hdl->grid_path.hasInheritedValue();
+     CTimer::get("XIOS").suspend();
+     return isDefined;
+  }
+
+
+  void cxios_set_field_grid_ref(field_Ptr field_hdl, const char * grid_ref, int grid_ref_size)
+  {
+    std::string grid_ref_str;
+    if (!cstr2string(grid_ref, grid_ref_size, grid_ref_str)) return;
+    CTimer::get("XIOS").resume();
+    field_hdl->grid_ref.setValue(grid_ref_str);
+    CTimer::get("XIOS").suspend();
+  }
+
+  void cxios_get_field_grid_ref(field_Ptr field_hdl, char * grid_ref, int grid_ref_size)
+  {
+    CTimer::get("XIOS").resume();
+    if (!string_copy(field_hdl->grid_ref.getInheritedValue(), grid_ref, grid_ref_size))
+      ERROR("void cxios_get_field_grid_ref(field_Ptr field_hdl, char * grid_ref, int grid_ref_size)", << "Input string is too short");
+    CTimer::get("XIOS").suspend();
+  }
+
+  bool cxios_is_defined_field_grid_ref(field_Ptr field_hdl)
+  {
+     CTimer::get("XIOS").resume();
+     bool isDefined = field_hdl->grid_ref.hasInheritedValue();
+     CTimer::get("XIOS").suspend();
+     return isDefined;
+  }
+
+
+  void cxios_set_field_indexed_output(field_Ptr field_hdl, bool indexed_output)
+  {
+    CTimer::get("XIOS").resume();
+    field_hdl->indexed_output.setValue(indexed_output);
+    CTimer::get("XIOS").suspend();
+  }
+
+  void cxios_get_field_indexed_output(field_Ptr field_hdl, bool* indexed_output)
+  {
+    CTimer::get("XIOS").resume();
+    *indexed_output = field_hdl->indexed_output.getInheritedValue();
+    CTimer::get("XIOS").suspend();
+  }
+
+  bool cxios_is_defined_field_indexed_output(field_Ptr field_hdl)
+  {
+     CTimer::get("XIOS").resume();
+     bool isDefined = field_hdl->indexed_output.hasInheritedValue();
+     CTimer::get("XIOS").suspend();
+     return isDefined;
+  }
+
+
+  void cxios_set_field_level(field_Ptr field_hdl, int level)
+  {
+    CTimer::get("XIOS").resume();
+    field_hdl->level.setValue(level);
+    CTimer::get("XIOS").suspend();
+  }
+
+  void cxios_get_field_level(field_Ptr field_hdl, int* level)
+  {
+    CTimer::get("XIOS").resume();
+    *level = field_hdl->level.getInheritedValue();
+    CTimer::get("XIOS").suspend();
+  }
+
+  bool cxios_is_defined_field_level(field_Ptr field_hdl)
+  {
+     CTimer::get("XIOS").resume();
+     bool isDefined = field_hdl->level.hasInheritedValue();
+     CTimer::get("XIOS").suspend();
+     return isDefined;
+  }
+
+
+  void cxios_set_field_long_name(field_Ptr field_hdl, const char * long_name, int long_name_size)
+  {
+    std::string long_name_str;
+    if (!cstr2string(long_name, long_name_size, long_name_str)) return;
+    CTimer::get("XIOS").resume();
+    field_hdl->long_name.setValue(long_name_str);
+    CTimer::get("XIOS").suspend();
+  }
+
+  void cxios_get_field_long_name(field_Ptr field_hdl, char * long_name, int long_name_size)
+  {
+    CTimer::get("XIOS").resume();
+    if (!string_copy(field_hdl->long_name.getInheritedValue(), long_name, long_name_size))
+      ERROR("void cxios_get_field_long_name(field_Ptr field_hdl, char * long_name, int long_name_size)", << "Input string is too short");
+    CTimer::get("XIOS").suspend();
+  }
+
+  bool cxios_is_defined_field_long_name(field_Ptr field_hdl)
+  {
+     CTimer::get("XIOS").resume();
+     bool isDefined = field_hdl->long_name.hasInheritedValue();
+     CTimer::get("XIOS").suspend();
+     return isDefined;
+  }
+
+
+  void cxios_set_field_name(field_Ptr field_hdl, const char * name, int name_size)
+  {
+    std::string name_str;
+    if (!cstr2string(name, name_size, name_str)) return;
+    CTimer::get("XIOS").resume();
+    field_hdl->name.setValue(name_str);
+    CTimer::get("XIOS").suspend();
+  }
+
+  void cxios_get_field_name(field_Ptr field_hdl, char * name, int name_size)
+  {
+    CTimer::get("XIOS").resume();
+    if (!string_copy(field_hdl->name.getInheritedValue(), name, name_size))
+      ERROR("void cxios_get_field_name(field_Ptr field_hdl, char * name, int name_size)", << "Input string is too short");
+    CTimer::get("XIOS").suspend();
+  }
+
+  bool cxios_is_defined_field_name(field_Ptr field_hdl)
+  {
+     CTimer::get("XIOS").resume();
+     bool isDefined = field_hdl->name.hasInheritedValue();
+     CTimer::get("XIOS").suspend();
+     return isDefined;
+  }
+
+
+  void cxios_set_field_operation(field_Ptr field_hdl, const char * operation, int operation_size)
+  {
+    std::string operation_str;
+    if (!cstr2string(operation, operation_size, operation_str)) return;
+    CTimer::get("XIOS").resume();
+    field_hdl->operation.setValue(operation_str);
+    CTimer::get("XIOS").suspend();
+  }
+
+  void cxios_get_field_operation(field_Ptr field_hdl, char * operation, int operation_size)
+  {
+    CTimer::get("XIOS").resume();
+    if (!string_copy(field_hdl->operation.getInheritedValue(), operation, operation_size))
+      ERROR("void cxios_get_field_operation(field_Ptr field_hdl, char * operation, int operation_size)", << "Input string is too short");
+    CTimer::get("XIOS").suspend();
+  }
+
+  bool cxios_is_defined_field_operation(field_Ptr field_hdl)
+  {
+     CTimer::get("XIOS").resume();
+     bool isDefined = field_hdl->operation.hasInheritedValue();
+     CTimer::get("XIOS").suspend();
+     return isDefined;
+  }
+
+
+  void cxios_set_field_prec(field_Ptr field_hdl, int prec)
+  {
+    CTimer::get("XIOS").resume();
+    field_hdl->prec.setValue(prec);
+    CTimer::get("XIOS").suspend();
+  }
+
+  void cxios_get_field_prec(field_Ptr field_hdl, int* prec)
+  {
+    CTimer::get("XIOS").resume();
+    *prec = field_hdl->prec.getInheritedValue();
+    CTimer::get("XIOS").suspend();
+  }
+
+  bool cxios_is_defined_field_prec(field_Ptr field_hdl)
+  {
+     CTimer::get("XIOS").resume();
+     bool isDefined = field_hdl->prec.hasInheritedValue();
+     CTimer::get("XIOS").suspend();
+     return isDefined;
+  }
+
+
+  void cxios_set_field_read_access(field_Ptr field_hdl, bool read_access)
+  {
+    CTimer::get("XIOS").resume();
+    field_hdl->read_access.setValue(read_access);
+    CTimer::get("XIOS").suspend();
+  }
+
+  void cxios_get_field_read_access(field_Ptr field_hdl, bool* read_access)
+  {
+    CTimer::get("XIOS").resume();
+    *read_access = field_hdl->read_access.getInheritedValue();
+    CTimer::get("XIOS").suspend();
+  }
+
+  bool cxios_is_defined_field_read_access(field_Ptr field_hdl)
+  {
+     CTimer::get("XIOS").resume();
+     bool isDefined = field_hdl->read_access.hasInheritedValue();
+     CTimer::get("XIOS").suspend();
+     return isDefined;
+  }
+
+
+  void cxios_set_field_scalar_ref(field_Ptr field_hdl, const char * scalar_ref, int scalar_ref_size)
+  {
+    std::string scalar_ref_str;
+    if (!cstr2string(scalar_ref, scalar_ref_size, scalar_ref_str)) return;
+    CTimer::get("XIOS").resume();
+    field_hdl->scalar_ref.setValue(scalar_ref_str);
+    CTimer::get("XIOS").suspend();
+  }
+
+  void cxios_get_field_scalar_ref(field_Ptr field_hdl, char * scalar_ref, int scalar_ref_size)
+  {
+    CTimer::get("XIOS").resume();
+    if (!string_copy(field_hdl->scalar_ref.getInheritedValue(), scalar_ref, scalar_ref_size))
+      ERROR("void cxios_get_field_scalar_ref(field_Ptr field_hdl, char * scalar_ref, int scalar_ref_size)", << "Input string is too short");
+    CTimer::get("XIOS").suspend();
+  }
+
+  bool cxios_is_defined_field_scalar_ref(field_Ptr field_hdl)
+  {
+     CTimer::get("XIOS").resume();
+     bool isDefined = field_hdl->scalar_ref.hasInheritedValue();
+     CTimer::get("XIOS").suspend();
+     return isDefined;
+  }
+
+
+  void cxios_set_field_scale_factor(field_Ptr field_hdl, double scale_factor)
+  {
+    CTimer::get("XIOS").resume();
+    field_hdl->scale_factor.setValue(scale_factor);
+    CTimer::get("XIOS").suspend();
+  }
+
+  void cxios_get_field_scale_factor(field_Ptr field_hdl, double* scale_factor)
+  {
+    CTimer::get("XIOS").resume();
+    *scale_factor = field_hdl->scale_factor.getInheritedValue();
+    CTimer::get("XIOS").suspend();
+  }
+
+  bool cxios_is_defined_field_scale_factor(field_Ptr field_hdl)
+  {
+     CTimer::get("XIOS").resume();
+     bool isDefined = field_hdl->scale_factor.hasInheritedValue();
+     CTimer::get("XIOS").suspend();
+     return isDefined;
+  }
+
+
+  void cxios_set_field_standard_name(field_Ptr field_hdl, const char * standard_name, int standard_name_size)
+  {
+    std::string standard_name_str;
+    if (!cstr2string(standard_name, standard_name_size, standard_name_str)) return;
+    CTimer::get("XIOS").resume();
+    field_hdl->standard_name.setValue(standard_name_str);
+    CTimer::get("XIOS").suspend();
+  }
+
+  void cxios_get_field_standard_name(field_Ptr field_hdl, char * standard_name, int standard_name_size)
+  {
+    CTimer::get("XIOS").resume();
+    if (!string_copy(field_hdl->standard_name.getInheritedValue(), standard_name, standard_name_size))
+      ERROR("void cxios_get_field_standard_name(field_Ptr field_hdl, char * standard_name, int standard_name_size)", << "Input string is too short");
+    CTimer::get("XIOS").suspend();
+  }
+
+  bool cxios_is_defined_field_standard_name(field_Ptr field_hdl)
+  {
+     CTimer::get("XIOS").resume();
+     bool isDefined = field_hdl->standard_name.hasInheritedValue();
+     CTimer::get("XIOS").suspend();
+     return isDefined;
+  }
+
+
+  void cxios_set_field_ts_enabled(field_Ptr field_hdl, bool ts_enabled)
+  {
+    CTimer::get("XIOS").resume();
+    field_hdl->ts_enabled.setValue(ts_enabled);
+    CTimer::get("XIOS").suspend();
+  }
+
+  void cxios_get_field_ts_enabled(field_Ptr field_hdl, bool* ts_enabled)
+  {
+    CTimer::get("XIOS").resume();
+    *ts_enabled = field_hdl->ts_enabled.getInheritedValue();
+    CTimer::get("XIOS").suspend();
+  }
+
+  bool cxios_is_defined_field_ts_enabled(field_Ptr field_hdl)
+  {
+     CTimer::get("XIOS").resume();
+     bool isDefined = field_hdl->ts_enabled.hasInheritedValue();
+     CTimer::get("XIOS").suspend();
+     return isDefined;
+  }
+
+
+  void cxios_set_field_ts_split_freq(field_Ptr field_hdl, cxios_duration ts_split_freq_c)
+  {
+    CTimer::get("XIOS").resume();
+    field_hdl->ts_split_freq.allocate();
+    CDuration& ts_split_freq = field_hdl->ts_split_freq.get();
+    ts_split_freq.year = ts_split_freq_c.year;
+    ts_split_freq.month = ts_split_freq_c.month;
+    ts_split_freq.day = ts_split_freq_c.day;
+    ts_split_freq.hour = ts_split_freq_c.hour;
+    ts_split_freq.minute = ts_split_freq_c.minute;
+    ts_split_freq.second = ts_split_freq_c.second;
+    ts_split_freq.timestep = ts_split_freq_c.timestep;
+    CTimer::get("XIOS").suspend();
+  }
+
+  void cxios_get_field_ts_split_freq(field_Ptr field_hdl, cxios_duration* ts_split_freq_c)
+  {
+    CTimer::get("XIOS").resume();
+    CDuration ts_split_freq = field_hdl->ts_split_freq.getInheritedValue();
+    ts_split_freq_c->year = ts_split_freq.year;
+    ts_split_freq_c->month = ts_split_freq.month;
+    ts_split_freq_c->day = ts_split_freq.day;
+    ts_split_freq_c->hour = ts_split_freq.hour;
+    ts_split_freq_c->minute = ts_split_freq.minute;
+    ts_split_freq_c->second = ts_split_freq.second;
+    ts_split_freq_c->timestep = ts_split_freq.timestep;
+    CTimer::get("XIOS").suspend();
+  }
+
+  bool cxios_is_defined_field_ts_split_freq(field_Ptr field_hdl)
+  {
+     CTimer::get("XIOS").resume();
+     bool isDefined = field_hdl->ts_split_freq.hasInheritedValue();
+     CTimer::get("XIOS").suspend();
+     return isDefined;
+  }
+
+
+  void cxios_set_field_unit(field_Ptr field_hdl, const char * unit, int unit_size)
+  {
+    std::string unit_str;
+    if (!cstr2string(unit, unit_size, unit_str)) return;
+    CTimer::get("XIOS").resume();
+    field_hdl->unit.setValue(unit_str);
+    CTimer::get("XIOS").suspend();
+  }
+
+  void cxios_get_field_unit(field_Ptr field_hdl, char * unit, int unit_size)
+  {
+    CTimer::get("XIOS").resume();
+    if (!string_copy(field_hdl->unit.getInheritedValue(), unit, unit_size))
+      ERROR("void cxios_get_field_unit(field_Ptr field_hdl, char * unit, int unit_size)", << "Input string is too short");
+    CTimer::get("XIOS").suspend();
+  }
+
+  bool cxios_is_defined_field_unit(field_Ptr field_hdl)
+  {
+     CTimer::get("XIOS").resume();
+     bool isDefined = field_hdl->unit.hasInheritedValue();
+     CTimer::get("XIOS").suspend();
+     return isDefined;
+  }
+
+
+  void cxios_set_field_valid_max(field_Ptr field_hdl, double valid_max)
+  {
+    CTimer::get("XIOS").resume();
+    field_hdl->valid_max.setValue(valid_max);
+    CTimer::get("XIOS").suspend();
+  }
+
+  void cxios_get_field_valid_max(field_Ptr field_hdl, double* valid_max)
+  {
+    CTimer::get("XIOS").resume();
+    *valid_max = field_hdl->valid_max.getInheritedValue();
+    CTimer::get("XIOS").suspend();
+  }
+
+  bool cxios_is_defined_field_valid_max(field_Ptr field_hdl)
+  {
+     CTimer::get("XIOS").resume();
+     bool isDefined = field_hdl->valid_max.hasInheritedValue();
+     CTimer::get("XIOS").suspend();
+     return isDefined;
+  }
+
+
+  void cxios_set_field_valid_min(field_Ptr field_hdl, double valid_min)
+  {
+    CTimer::get("XIOS").resume();
+    field_hdl->valid_min.setValue(valid_min);
+    CTimer::get("XIOS").suspend();
+  }
+
+  void cxios_get_field_valid_min(field_Ptr field_hdl, double* valid_min)
+  {
+    CTimer::get("XIOS").resume();
+    *valid_min = field_hdl->valid_min.getInheritedValue();
+    CTimer::get("XIOS").suspend();
+  }
+
+  bool cxios_is_defined_field_valid_min(field_Ptr field_hdl)
+  {
+     CTimer::get("XIOS").resume();
+     bool isDefined = field_hdl->valid_min.hasInheritedValue();
+     CTimer::get("XIOS").suspend();
+     return isDefined;
+  }
+}
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/c_attr/icfieldgroup_attr.cpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/c_attr/icfieldgroup_attr.cpp	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/c_attr/icfieldgroup_attr.cpp	(revision 1749)
@@ -0,0 +1,869 @@
+/* ************************************************************************** *
+ *               Interface auto generated - do not modify                     *
+ * ************************************************************************** */
+
+#include <boost/multi_array.hpp>
+#include "xios.hpp"
+#include "attribute_template.hpp"
+#include "object_template.hpp"
+#include "group_template.hpp"
+#include "icutil.hpp"
+#include "icdate.hpp"
+#include "timer.hpp"
+#include "node_type.hpp"
+
+extern "C"
+{
+  typedef xios::CFieldGroup* fieldgroup_Ptr;
+
+  void cxios_set_fieldgroup_add_offset(fieldgroup_Ptr fieldgroup_hdl, double add_offset)
+  {
+    CTimer::get("XIOS").resume();
+    fieldgroup_hdl->add_offset.setValue(add_offset);
+    CTimer::get("XIOS").suspend();
+  }
+
+  void cxios_get_fieldgroup_add_offset(fieldgroup_Ptr fieldgroup_hdl, double* add_offset)
+  {
+    CTimer::get("XIOS").resume();
+    *add_offset = fieldgroup_hdl->add_offset.getInheritedValue();
+    CTimer::get("XIOS").suspend();
+  }
+
+  bool cxios_is_defined_fieldgroup_add_offset(fieldgroup_Ptr fieldgroup_hdl)
+  {
+     CTimer::get("XIOS").resume();
+     bool isDefined = fieldgroup_hdl->add_offset.hasInheritedValue();
+     CTimer::get("XIOS").suspend();
+     return isDefined;
+  }
+
+
+  void cxios_set_fieldgroup_axis_ref(fieldgroup_Ptr fieldgroup_hdl, const char * axis_ref, int axis_ref_size)
+  {
+    std::string axis_ref_str;
+    if (!cstr2string(axis_ref, axis_ref_size, axis_ref_str)) return;
+    CTimer::get("XIOS").resume();
+    fieldgroup_hdl->axis_ref.setValue(axis_ref_str);
+    CTimer::get("XIOS").suspend();
+  }
+
+  void cxios_get_fieldgroup_axis_ref(fieldgroup_Ptr fieldgroup_hdl, char * axis_ref, int axis_ref_size)
+  {
+    CTimer::get("XIOS").resume();
+    if (!string_copy(fieldgroup_hdl->axis_ref.getInheritedValue(), axis_ref, axis_ref_size))
+      ERROR("void cxios_get_fieldgroup_axis_ref(fieldgroup_Ptr fieldgroup_hdl, char * axis_ref, int axis_ref_size)", << "Input string is too short");
+    CTimer::get("XIOS").suspend();
+  }
+
+  bool cxios_is_defined_fieldgroup_axis_ref(fieldgroup_Ptr fieldgroup_hdl)
+  {
+     CTimer::get("XIOS").resume();
+     bool isDefined = fieldgroup_hdl->axis_ref.hasInheritedValue();
+     CTimer::get("XIOS").suspend();
+     return isDefined;
+  }
+
+
+  void cxios_set_fieldgroup_cell_methods(fieldgroup_Ptr fieldgroup_hdl, const char * cell_methods, int cell_methods_size)
+  {
+    std::string cell_methods_str;
+    if (!cstr2string(cell_methods, cell_methods_size, cell_methods_str)) return;
+    CTimer::get("XIOS").resume();
+    fieldgroup_hdl->cell_methods.setValue(cell_methods_str);
+    CTimer::get("XIOS").suspend();
+  }
+
+  void cxios_get_fieldgroup_cell_methods(fieldgroup_Ptr fieldgroup_hdl, char * cell_methods, int cell_methods_size)
+  {
+    CTimer::get("XIOS").resume();
+    if (!string_copy(fieldgroup_hdl->cell_methods.getInheritedValue(), cell_methods, cell_methods_size))
+      ERROR("void cxios_get_fieldgroup_cell_methods(fieldgroup_Ptr fieldgroup_hdl, char * cell_methods, int cell_methods_size)", << "Input string is too short");
+    CTimer::get("XIOS").suspend();
+  }
+
+  bool cxios_is_defined_fieldgroup_cell_methods(fieldgroup_Ptr fieldgroup_hdl)
+  {
+     CTimer::get("XIOS").resume();
+     bool isDefined = fieldgroup_hdl->cell_methods.hasInheritedValue();
+     CTimer::get("XIOS").suspend();
+     return isDefined;
+  }
+
+
+  void cxios_set_fieldgroup_cell_methods_mode(fieldgroup_Ptr fieldgroup_hdl, const char * cell_methods_mode, int cell_methods_mode_size)
+  {
+    std::string cell_methods_mode_str;
+    if (!cstr2string(cell_methods_mode, cell_methods_mode_size, cell_methods_mode_str)) return;
+    CTimer::get("XIOS").resume();
+    fieldgroup_hdl->cell_methods_mode.fromString(cell_methods_mode_str);
+    CTimer::get("XIOS").suspend();
+  }
+
+  void cxios_get_fieldgroup_cell_methods_mode(fieldgroup_Ptr fieldgroup_hdl, char * cell_methods_mode, int cell_methods_mode_size)
+  {
+    CTimer::get("XIOS").resume();
+    if (!string_copy(fieldgroup_hdl->cell_methods_mode.getInheritedStringValue(), cell_methods_mode, cell_methods_mode_size))
+      ERROR("void cxios_get_fieldgroup_cell_methods_mode(fieldgroup_Ptr fieldgroup_hdl, char * cell_methods_mode, int cell_methods_mode_size)", << "Input string is too short");
+    CTimer::get("XIOS").suspend();
+  }
+
+  bool cxios_is_defined_fieldgroup_cell_methods_mode(fieldgroup_Ptr fieldgroup_hdl)
+  {
+     CTimer::get("XIOS").resume();
+     bool isDefined = fieldgroup_hdl->cell_methods_mode.hasInheritedValue();
+     CTimer::get("XIOS").suspend();
+     return isDefined;
+  }
+
+
+  void cxios_set_fieldgroup_check_if_active(fieldgroup_Ptr fieldgroup_hdl, bool check_if_active)
+  {
+    CTimer::get("XIOS").resume();
+    fieldgroup_hdl->check_if_active.setValue(check_if_active);
+    CTimer::get("XIOS").suspend();
+  }
+
+  void cxios_get_fieldgroup_check_if_active(fieldgroup_Ptr fieldgroup_hdl, bool* check_if_active)
+  {
+    CTimer::get("XIOS").resume();
+    *check_if_active = fieldgroup_hdl->check_if_active.getInheritedValue();
+    CTimer::get("XIOS").suspend();
+  }
+
+  bool cxios_is_defined_fieldgroup_check_if_active(fieldgroup_Ptr fieldgroup_hdl)
+  {
+     CTimer::get("XIOS").resume();
+     bool isDefined = fieldgroup_hdl->check_if_active.hasInheritedValue();
+     CTimer::get("XIOS").suspend();
+     return isDefined;
+  }
+
+
+  void cxios_set_fieldgroup_comment(fieldgroup_Ptr fieldgroup_hdl, const char * comment, int comment_size)
+  {
+    std::string comment_str;
+    if (!cstr2string(comment, comment_size, comment_str)) return;
+    CTimer::get("XIOS").resume();
+    fieldgroup_hdl->comment.setValue(comment_str);
+    CTimer::get("XIOS").suspend();
+  }
+
+  void cxios_get_fieldgroup_comment(fieldgroup_Ptr fieldgroup_hdl, char * comment, int comment_size)
+  {
+    CTimer::get("XIOS").resume();
+    if (!string_copy(fieldgroup_hdl->comment.getInheritedValue(), comment, comment_size))
+      ERROR("void cxios_get_fieldgroup_comment(fieldgroup_Ptr fieldgroup_hdl, char * comment, int comment_size)", << "Input string is too short");
+    CTimer::get("XIOS").suspend();
+  }
+
+  bool cxios_is_defined_fieldgroup_comment(fieldgroup_Ptr fieldgroup_hdl)
+  {
+     CTimer::get("XIOS").resume();
+     bool isDefined = fieldgroup_hdl->comment.hasInheritedValue();
+     CTimer::get("XIOS").suspend();
+     return isDefined;
+  }
+
+
+  void cxios_set_fieldgroup_compression_level(fieldgroup_Ptr fieldgroup_hdl, int compression_level)
+  {
+    CTimer::get("XIOS").resume();
+    fieldgroup_hdl->compression_level.setValue(compression_level);
+    CTimer::get("XIOS").suspend();
+  }
+
+  void cxios_get_fieldgroup_compression_level(fieldgroup_Ptr fieldgroup_hdl, int* compression_level)
+  {
+    CTimer::get("XIOS").resume();
+    *compression_level = fieldgroup_hdl->compression_level.getInheritedValue();
+    CTimer::get("XIOS").suspend();
+  }
+
+  bool cxios_is_defined_fieldgroup_compression_level(fieldgroup_Ptr fieldgroup_hdl)
+  {
+     CTimer::get("XIOS").resume();
+     bool isDefined = fieldgroup_hdl->compression_level.hasInheritedValue();
+     CTimer::get("XIOS").suspend();
+     return isDefined;
+  }
+
+
+  void cxios_set_fieldgroup_default_value(fieldgroup_Ptr fieldgroup_hdl, double default_value)
+  {
+    CTimer::get("XIOS").resume();
+    fieldgroup_hdl->default_value.setValue(default_value);
+    CTimer::get("XIOS").suspend();
+  }
+
+  void cxios_get_fieldgroup_default_value(fieldgroup_Ptr fieldgroup_hdl, double* default_value)
+  {
+    CTimer::get("XIOS").resume();
+    *default_value = fieldgroup_hdl->default_value.getInheritedValue();
+    CTimer::get("XIOS").suspend();
+  }
+
+  bool cxios_is_defined_fieldgroup_default_value(fieldgroup_Ptr fieldgroup_hdl)
+  {
+     CTimer::get("XIOS").resume();
+     bool isDefined = fieldgroup_hdl->default_value.hasInheritedValue();
+     CTimer::get("XIOS").suspend();
+     return isDefined;
+  }
+
+
+  void cxios_set_fieldgroup_detect_missing_value(fieldgroup_Ptr fieldgroup_hdl, bool detect_missing_value)
+  {
+    CTimer::get("XIOS").resume();
+    fieldgroup_hdl->detect_missing_value.setValue(detect_missing_value);
+    CTimer::get("XIOS").suspend();
+  }
+
+  void cxios_get_fieldgroup_detect_missing_value(fieldgroup_Ptr fieldgroup_hdl, bool* detect_missing_value)
+  {
+    CTimer::get("XIOS").resume();
+    *detect_missing_value = fieldgroup_hdl->detect_missing_value.getInheritedValue();
+    CTimer::get("XIOS").suspend();
+  }
+
+  bool cxios_is_defined_fieldgroup_detect_missing_value(fieldgroup_Ptr fieldgroup_hdl)
+  {
+     CTimer::get("XIOS").resume();
+     bool isDefined = fieldgroup_hdl->detect_missing_value.hasInheritedValue();
+     CTimer::get("XIOS").suspend();
+     return isDefined;
+  }
+
+
+  void cxios_set_fieldgroup_domain_ref(fieldgroup_Ptr fieldgroup_hdl, const char * domain_ref, int domain_ref_size)
+  {
+    std::string domain_ref_str;
+    if (!cstr2string(domain_ref, domain_ref_size, domain_ref_str)) return;
+    CTimer::get("XIOS").resume();
+    fieldgroup_hdl->domain_ref.setValue(domain_ref_str);
+    CTimer::get("XIOS").suspend();
+  }
+
+  void cxios_get_fieldgroup_domain_ref(fieldgroup_Ptr fieldgroup_hdl, char * domain_ref, int domain_ref_size)
+  {
+    CTimer::get("XIOS").resume();
+    if (!string_copy(fieldgroup_hdl->domain_ref.getInheritedValue(), domain_ref, domain_ref_size))
+      ERROR("void cxios_get_fieldgroup_domain_ref(fieldgroup_Ptr fieldgroup_hdl, char * domain_ref, int domain_ref_size)", << "Input string is too short");
+    CTimer::get("XIOS").suspend();
+  }
+
+  bool cxios_is_defined_fieldgroup_domain_ref(fieldgroup_Ptr fieldgroup_hdl)
+  {
+     CTimer::get("XIOS").resume();
+     bool isDefined = fieldgroup_hdl->domain_ref.hasInheritedValue();
+     CTimer::get("XIOS").suspend();
+     return isDefined;
+  }
+
+
+  void cxios_set_fieldgroup_enabled(fieldgroup_Ptr fieldgroup_hdl, bool enabled)
+  {
+    CTimer::get("XIOS").resume();
+    fieldgroup_hdl->enabled.setValue(enabled);
+    CTimer::get("XIOS").suspend();
+  }
+
+  void cxios_get_fieldgroup_enabled(fieldgroup_Ptr fieldgroup_hdl, bool* enabled)
+  {
+    CTimer::get("XIOS").resume();
+    *enabled = fieldgroup_hdl->enabled.getInheritedValue();
+    CTimer::get("XIOS").suspend();
+  }
+
+  bool cxios_is_defined_fieldgroup_enabled(fieldgroup_Ptr fieldgroup_hdl)
+  {
+     CTimer::get("XIOS").resume();
+     bool isDefined = fieldgroup_hdl->enabled.hasInheritedValue();
+     CTimer::get("XIOS").suspend();
+     return isDefined;
+  }
+
+
+  void cxios_set_fieldgroup_expr(fieldgroup_Ptr fieldgroup_hdl, const char * expr, int expr_size)
+  {
+    std::string expr_str;
+    if (!cstr2string(expr, expr_size, expr_str)) return;
+    CTimer::get("XIOS").resume();
+    fieldgroup_hdl->expr.setValue(expr_str);
+    CTimer::get("XIOS").suspend();
+  }
+
+  void cxios_get_fieldgroup_expr(fieldgroup_Ptr fieldgroup_hdl, char * expr, int expr_size)
+  {
+    CTimer::get("XIOS").resume();
+    if (!string_copy(fieldgroup_hdl->expr.getInheritedValue(), expr, expr_size))
+      ERROR("void cxios_get_fieldgroup_expr(fieldgroup_Ptr fieldgroup_hdl, char * expr, int expr_size)", << "Input string is too short");
+    CTimer::get("XIOS").suspend();
+  }
+
+  bool cxios_is_defined_fieldgroup_expr(fieldgroup_Ptr fieldgroup_hdl)
+  {
+     CTimer::get("XIOS").resume();
+     bool isDefined = fieldgroup_hdl->expr.hasInheritedValue();
+     CTimer::get("XIOS").suspend();
+     return isDefined;
+  }
+
+
+  void cxios_set_fieldgroup_field_ref(fieldgroup_Ptr fieldgroup_hdl, const char * field_ref, int field_ref_size)
+  {
+    std::string field_ref_str;
+    if (!cstr2string(field_ref, field_ref_size, field_ref_str)) return;
+    CTimer::get("XIOS").resume();
+    fieldgroup_hdl->field_ref.setValue(field_ref_str);
+    CTimer::get("XIOS").suspend();
+  }
+
+  void cxios_get_fieldgroup_field_ref(fieldgroup_Ptr fieldgroup_hdl, char * field_ref, int field_ref_size)
+  {
+    CTimer::get("XIOS").resume();
+    if (!string_copy(fieldgroup_hdl->field_ref.getInheritedValue(), field_ref, field_ref_size))
+      ERROR("void cxios_get_fieldgroup_field_ref(fieldgroup_Ptr fieldgroup_hdl, char * field_ref, int field_ref_size)", << "Input string is too short");
+    CTimer::get("XIOS").suspend();
+  }
+
+  bool cxios_is_defined_fieldgroup_field_ref(fieldgroup_Ptr fieldgroup_hdl)
+  {
+     CTimer::get("XIOS").resume();
+     bool isDefined = fieldgroup_hdl->field_ref.hasInheritedValue();
+     CTimer::get("XIOS").suspend();
+     return isDefined;
+  }
+
+
+  void cxios_set_fieldgroup_freq_offset(fieldgroup_Ptr fieldgroup_hdl, cxios_duration freq_offset_c)
+  {
+    CTimer::get("XIOS").resume();
+    fieldgroup_hdl->freq_offset.allocate();
+    CDuration& freq_offset = fieldgroup_hdl->freq_offset.get();
+    freq_offset.year = freq_offset_c.year;
+    freq_offset.month = freq_offset_c.month;
+    freq_offset.day = freq_offset_c.day;
+    freq_offset.hour = freq_offset_c.hour;
+    freq_offset.minute = freq_offset_c.minute;
+    freq_offset.second = freq_offset_c.second;
+    freq_offset.timestep = freq_offset_c.timestep;
+    CTimer::get("XIOS").suspend();
+  }
+
+  void cxios_get_fieldgroup_freq_offset(fieldgroup_Ptr fieldgroup_hdl, cxios_duration* freq_offset_c)
+  {
+    CTimer::get("XIOS").resume();
+    CDuration freq_offset = fieldgroup_hdl->freq_offset.getInheritedValue();
+    freq_offset_c->year = freq_offset.year;
+    freq_offset_c->month = freq_offset.month;
+    freq_offset_c->day = freq_offset.day;
+    freq_offset_c->hour = freq_offset.hour;
+    freq_offset_c->minute = freq_offset.minute;
+    freq_offset_c->second = freq_offset.second;
+    freq_offset_c->timestep = freq_offset.timestep;
+    CTimer::get("XIOS").suspend();
+  }
+
+  bool cxios_is_defined_fieldgroup_freq_offset(fieldgroup_Ptr fieldgroup_hdl)
+  {
+     CTimer::get("XIOS").resume();
+     bool isDefined = fieldgroup_hdl->freq_offset.hasInheritedValue();
+     CTimer::get("XIOS").suspend();
+     return isDefined;
+  }
+
+
+  void cxios_set_fieldgroup_freq_op(fieldgroup_Ptr fieldgroup_hdl, cxios_duration freq_op_c)
+  {
+    CTimer::get("XIOS").resume();
+    fieldgroup_hdl->freq_op.allocate();
+    CDuration& freq_op = fieldgroup_hdl->freq_op.get();
+    freq_op.year = freq_op_c.year;
+    freq_op.month = freq_op_c.month;
+    freq_op.day = freq_op_c.day;
+    freq_op.hour = freq_op_c.hour;
+    freq_op.minute = freq_op_c.minute;
+    freq_op.second = freq_op_c.second;
+    freq_op.timestep = freq_op_c.timestep;
+    CTimer::get("XIOS").suspend();
+  }
+
+  void cxios_get_fieldgroup_freq_op(fieldgroup_Ptr fieldgroup_hdl, cxios_duration* freq_op_c)
+  {
+    CTimer::get("XIOS").resume();
+    CDuration freq_op = fieldgroup_hdl->freq_op.getInheritedValue();
+    freq_op_c->year = freq_op.year;
+    freq_op_c->month = freq_op.month;
+    freq_op_c->day = freq_op.day;
+    freq_op_c->hour = freq_op.hour;
+    freq_op_c->minute = freq_op.minute;
+    freq_op_c->second = freq_op.second;
+    freq_op_c->timestep = freq_op.timestep;
+    CTimer::get("XIOS").suspend();
+  }
+
+  bool cxios_is_defined_fieldgroup_freq_op(fieldgroup_Ptr fieldgroup_hdl)
+  {
+     CTimer::get("XIOS").resume();
+     bool isDefined = fieldgroup_hdl->freq_op.hasInheritedValue();
+     CTimer::get("XIOS").suspend();
+     return isDefined;
+  }
+
+
+  void cxios_set_fieldgroup_grid_path(fieldgroup_Ptr fieldgroup_hdl, const char * grid_path, int grid_path_size)
+  {
+    std::string grid_path_str;
+    if (!cstr2string(grid_path, grid_path_size, grid_path_str)) return;
+    CTimer::get("XIOS").resume();
+    fieldgroup_hdl->grid_path.setValue(grid_path_str);
+    CTimer::get("XIOS").suspend();
+  }
+
+  void cxios_get_fieldgroup_grid_path(fieldgroup_Ptr fieldgroup_hdl, char * grid_path, int grid_path_size)
+  {
+    CTimer::get("XIOS").resume();
+    if (!string_copy(fieldgroup_hdl->grid_path.getInheritedValue(), grid_path, grid_path_size))
+      ERROR("void cxios_get_fieldgroup_grid_path(fieldgroup_Ptr fieldgroup_hdl, char * grid_path, int grid_path_size)", << "Input string is too short");
+    CTimer::get("XIOS").suspend();
+  }
+
+  bool cxios_is_defined_fieldgroup_grid_path(fieldgroup_Ptr fieldgroup_hdl)
+  {
+     CTimer::get("XIOS").resume();
+     bool isDefined = fieldgroup_hdl->grid_path.hasInheritedValue();
+     CTimer::get("XIOS").suspend();
+     return isDefined;
+  }
+
+
+  void cxios_set_fieldgroup_grid_ref(fieldgroup_Ptr fieldgroup_hdl, const char * grid_ref, int grid_ref_size)
+  {
+    std::string grid_ref_str;
+    if (!cstr2string(grid_ref, grid_ref_size, grid_ref_str)) return;
+    CTimer::get("XIOS").resume();
+    fieldgroup_hdl->grid_ref.setValue(grid_ref_str);
+    CTimer::get("XIOS").suspend();
+  }
+
+  void cxios_get_fieldgroup_grid_ref(fieldgroup_Ptr fieldgroup_hdl, char * grid_ref, int grid_ref_size)
+  {
+    CTimer::get("XIOS").resume();
+    if (!string_copy(fieldgroup_hdl->grid_ref.getInheritedValue(), grid_ref, grid_ref_size))
+      ERROR("void cxios_get_fieldgroup_grid_ref(fieldgroup_Ptr fieldgroup_hdl, char * grid_ref, int grid_ref_size)", << "Input string is too short");
+    CTimer::get("XIOS").suspend();
+  }
+
+  bool cxios_is_defined_fieldgroup_grid_ref(fieldgroup_Ptr fieldgroup_hdl)
+  {
+     CTimer::get("XIOS").resume();
+     bool isDefined = fieldgroup_hdl->grid_ref.hasInheritedValue();
+     CTimer::get("XIOS").suspend();
+     return isDefined;
+  }
+
+
+  void cxios_set_fieldgroup_group_ref(fieldgroup_Ptr fieldgroup_hdl, const char * group_ref, int group_ref_size)
+  {
+    std::string group_ref_str;
+    if (!cstr2string(group_ref, group_ref_size, group_ref_str)) return;
+    CTimer::get("XIOS").resume();
+    fieldgroup_hdl->group_ref.setValue(group_ref_str);
+    CTimer::get("XIOS").suspend();
+  }
+
+  void cxios_get_fieldgroup_group_ref(fieldgroup_Ptr fieldgroup_hdl, char * group_ref, int group_ref_size)
+  {
+    CTimer::get("XIOS").resume();
+    if (!string_copy(fieldgroup_hdl->group_ref.getInheritedValue(), group_ref, group_ref_size))
+      ERROR("void cxios_get_fieldgroup_group_ref(fieldgroup_Ptr fieldgroup_hdl, char * group_ref, int group_ref_size)", << "Input string is too short");
+    CTimer::get("XIOS").suspend();
+  }
+
+  bool cxios_is_defined_fieldgroup_group_ref(fieldgroup_Ptr fieldgroup_hdl)
+  {
+     CTimer::get("XIOS").resume();
+     bool isDefined = fieldgroup_hdl->group_ref.hasInheritedValue();
+     CTimer::get("XIOS").suspend();
+     return isDefined;
+  }
+
+
+  void cxios_set_fieldgroup_indexed_output(fieldgroup_Ptr fieldgroup_hdl, bool indexed_output)
+  {
+    CTimer::get("XIOS").resume();
+    fieldgroup_hdl->indexed_output.setValue(indexed_output);
+    CTimer::get("XIOS").suspend();
+  }
+
+  void cxios_get_fieldgroup_indexed_output(fieldgroup_Ptr fieldgroup_hdl, bool* indexed_output)
+  {
+    CTimer::get("XIOS").resume();
+    *indexed_output = fieldgroup_hdl->indexed_output.getInheritedValue();
+    CTimer::get("XIOS").suspend();
+  }
+
+  bool cxios_is_defined_fieldgroup_indexed_output(fieldgroup_Ptr fieldgroup_hdl)
+  {
+     CTimer::get("XIOS").resume();
+     bool isDefined = fieldgroup_hdl->indexed_output.hasInheritedValue();
+     CTimer::get("XIOS").suspend();
+     return isDefined;
+  }
+
+
+  void cxios_set_fieldgroup_level(fieldgroup_Ptr fieldgroup_hdl, int level)
+  {
+    CTimer::get("XIOS").resume();
+    fieldgroup_hdl->level.setValue(level);
+    CTimer::get("XIOS").suspend();
+  }
+
+  void cxios_get_fieldgroup_level(fieldgroup_Ptr fieldgroup_hdl, int* level)
+  {
+    CTimer::get("XIOS").resume();
+    *level = fieldgroup_hdl->level.getInheritedValue();
+    CTimer::get("XIOS").suspend();
+  }
+
+  bool cxios_is_defined_fieldgroup_level(fieldgroup_Ptr fieldgroup_hdl)
+  {
+     CTimer::get("XIOS").resume();
+     bool isDefined = fieldgroup_hdl->level.hasInheritedValue();
+     CTimer::get("XIOS").suspend();
+     return isDefined;
+  }
+
+
+  void cxios_set_fieldgroup_long_name(fieldgroup_Ptr fieldgroup_hdl, const char * long_name, int long_name_size)
+  {
+    std::string long_name_str;
+    if (!cstr2string(long_name, long_name_size, long_name_str)) return;
+    CTimer::get("XIOS").resume();
+    fieldgroup_hdl->long_name.setValue(long_name_str);
+    CTimer::get("XIOS").suspend();
+  }
+
+  void cxios_get_fieldgroup_long_name(fieldgroup_Ptr fieldgroup_hdl, char * long_name, int long_name_size)
+  {
+    CTimer::get("XIOS").resume();
+    if (!string_copy(fieldgroup_hdl->long_name.getInheritedValue(), long_name, long_name_size))
+      ERROR("void cxios_get_fieldgroup_long_name(fieldgroup_Ptr fieldgroup_hdl, char * long_name, int long_name_size)", << "Input string is too short");
+    CTimer::get("XIOS").suspend();
+  }
+
+  bool cxios_is_defined_fieldgroup_long_name(fieldgroup_Ptr fieldgroup_hdl)
+  {
+     CTimer::get("XIOS").resume();
+     bool isDefined = fieldgroup_hdl->long_name.hasInheritedValue();
+     CTimer::get("XIOS").suspend();
+     return isDefined;
+  }
+
+
+  void cxios_set_fieldgroup_name(fieldgroup_Ptr fieldgroup_hdl, const char * name, int name_size)
+  {
+    std::string name_str;
+    if (!cstr2string(name, name_size, name_str)) return;
+    CTimer::get("XIOS").resume();
+    fieldgroup_hdl->name.setValue(name_str);
+    CTimer::get("XIOS").suspend();
+  }
+
+  void cxios_get_fieldgroup_name(fieldgroup_Ptr fieldgroup_hdl, char * name, int name_size)
+  {
+    CTimer::get("XIOS").resume();
+    if (!string_copy(fieldgroup_hdl->name.getInheritedValue(), name, name_size))
+      ERROR("void cxios_get_fieldgroup_name(fieldgroup_Ptr fieldgroup_hdl, char * name, int name_size)", << "Input string is too short");
+    CTimer::get("XIOS").suspend();
+  }
+
+  bool cxios_is_defined_fieldgroup_name(fieldgroup_Ptr fieldgroup_hdl)
+  {
+     CTimer::get("XIOS").resume();
+     bool isDefined = fieldgroup_hdl->name.hasInheritedValue();
+     CTimer::get("XIOS").suspend();
+     return isDefined;
+  }
+
+
+  void cxios_set_fieldgroup_operation(fieldgroup_Ptr fieldgroup_hdl, const char * operation, int operation_size)
+  {
+    std::string operation_str;
+    if (!cstr2string(operation, operation_size, operation_str)) return;
+    CTimer::get("XIOS").resume();
+    fieldgroup_hdl->operation.setValue(operation_str);
+    CTimer::get("XIOS").suspend();
+  }
+
+  void cxios_get_fieldgroup_operation(fieldgroup_Ptr fieldgroup_hdl, char * operation, int operation_size)
+  {
+    CTimer::get("XIOS").resume();
+    if (!string_copy(fieldgroup_hdl->operation.getInheritedValue(), operation, operation_size))
+      ERROR("void cxios_get_fieldgroup_operation(fieldgroup_Ptr fieldgroup_hdl, char * operation, int operation_size)", << "Input string is too short");
+    CTimer::get("XIOS").suspend();
+  }
+
+  bool cxios_is_defined_fieldgroup_operation(fieldgroup_Ptr fieldgroup_hdl)
+  {
+     CTimer::get("XIOS").resume();
+     bool isDefined = fieldgroup_hdl->operation.hasInheritedValue();
+     CTimer::get("XIOS").suspend();
+     return isDefined;
+  }
+
+
+  void cxios_set_fieldgroup_prec(fieldgroup_Ptr fieldgroup_hdl, int prec)
+  {
+    CTimer::get("XIOS").resume();
+    fieldgroup_hdl->prec.setValue(prec);
+    CTimer::get("XIOS").suspend();
+  }
+
+  void cxios_get_fieldgroup_prec(fieldgroup_Ptr fieldgroup_hdl, int* prec)
+  {
+    CTimer::get("XIOS").resume();
+    *prec = fieldgroup_hdl->prec.getInheritedValue();
+    CTimer::get("XIOS").suspend();
+  }
+
+  bool cxios_is_defined_fieldgroup_prec(fieldgroup_Ptr fieldgroup_hdl)
+  {
+     CTimer::get("XIOS").resume();
+     bool isDefined = fieldgroup_hdl->prec.hasInheritedValue();
+     CTimer::get("XIOS").suspend();
+     return isDefined;
+  }
+
+
+  void cxios_set_fieldgroup_read_access(fieldgroup_Ptr fieldgroup_hdl, bool read_access)
+  {
+    CTimer::get("XIOS").resume();
+    fieldgroup_hdl->read_access.setValue(read_access);
+    CTimer::get("XIOS").suspend();
+  }
+
+  void cxios_get_fieldgroup_read_access(fieldgroup_Ptr fieldgroup_hdl, bool* read_access)
+  {
+    CTimer::get("XIOS").resume();
+    *read_access = fieldgroup_hdl->read_access.getInheritedValue();
+    CTimer::get("XIOS").suspend();
+  }
+
+  bool cxios_is_defined_fieldgroup_read_access(fieldgroup_Ptr fieldgroup_hdl)
+  {
+     CTimer::get("XIOS").resume();
+     bool isDefined = fieldgroup_hdl->read_access.hasInheritedValue();
+     CTimer::get("XIOS").suspend();
+     return isDefined;
+  }
+
+
+  void cxios_set_fieldgroup_scalar_ref(fieldgroup_Ptr fieldgroup_hdl, const char * scalar_ref, int scalar_ref_size)
+  {
+    std::string scalar_ref_str;
+    if (!cstr2string(scalar_ref, scalar_ref_size, scalar_ref_str)) return;
+    CTimer::get("XIOS").resume();
+    fieldgroup_hdl->scalar_ref.setValue(scalar_ref_str);
+    CTimer::get("XIOS").suspend();
+  }
+
+  void cxios_get_fieldgroup_scalar_ref(fieldgroup_Ptr fieldgroup_hdl, char * scalar_ref, int scalar_ref_size)
+  {
+    CTimer::get("XIOS").resume();
+    if (!string_copy(fieldgroup_hdl->scalar_ref.getInheritedValue(), scalar_ref, scalar_ref_size))
+      ERROR("void cxios_get_fieldgroup_scalar_ref(fieldgroup_Ptr fieldgroup_hdl, char * scalar_ref, int scalar_ref_size)", << "Input string is too short");
+    CTimer::get("XIOS").suspend();
+  }
+
+  bool cxios_is_defined_fieldgroup_scalar_ref(fieldgroup_Ptr fieldgroup_hdl)
+  {
+     CTimer::get("XIOS").resume();
+     bool isDefined = fieldgroup_hdl->scalar_ref.hasInheritedValue();
+     CTimer::get("XIOS").suspend();
+     return isDefined;
+  }
+
+
+  void cxios_set_fieldgroup_scale_factor(fieldgroup_Ptr fieldgroup_hdl, double scale_factor)
+  {
+    CTimer::get("XIOS").resume();
+    fieldgroup_hdl->scale_factor.setValue(scale_factor);
+    CTimer::get("XIOS").suspend();
+  }
+
+  void cxios_get_fieldgroup_scale_factor(fieldgroup_Ptr fieldgroup_hdl, double* scale_factor)
+  {
+    CTimer::get("XIOS").resume();
+    *scale_factor = fieldgroup_hdl->scale_factor.getInheritedValue();
+    CTimer::get("XIOS").suspend();
+  }
+
+  bool cxios_is_defined_fieldgroup_scale_factor(fieldgroup_Ptr fieldgroup_hdl)
+  {
+     CTimer::get("XIOS").resume();
+     bool isDefined = fieldgroup_hdl->scale_factor.hasInheritedValue();
+     CTimer::get("XIOS").suspend();
+     return isDefined;
+  }
+
+
+  void cxios_set_fieldgroup_standard_name(fieldgroup_Ptr fieldgroup_hdl, const char * standard_name, int standard_name_size)
+  {
+    std::string standard_name_str;
+    if (!cstr2string(standard_name, standard_name_size, standard_name_str)) return;
+    CTimer::get("XIOS").resume();
+    fieldgroup_hdl->standard_name.setValue(standard_name_str);
+    CTimer::get("XIOS").suspend();
+  }
+
+  void cxios_get_fieldgroup_standard_name(fieldgroup_Ptr fieldgroup_hdl, char * standard_name, int standard_name_size)
+  {
+    CTimer::get("XIOS").resume();
+    if (!string_copy(fieldgroup_hdl->standard_name.getInheritedValue(), standard_name, standard_name_size))
+      ERROR("void cxios_get_fieldgroup_standard_name(fieldgroup_Ptr fieldgroup_hdl, char * standard_name, int standard_name_size)", << "Input string is too short");
+    CTimer::get("XIOS").suspend();
+  }
+
+  bool cxios_is_defined_fieldgroup_standard_name(fieldgroup_Ptr fieldgroup_hdl)
+  {
+     CTimer::get("XIOS").resume();
+     bool isDefined = fieldgroup_hdl->standard_name.hasInheritedValue();
+     CTimer::get("XIOS").suspend();
+     return isDefined;
+  }
+
+
+  void cxios_set_fieldgroup_ts_enabled(fieldgroup_Ptr fieldgroup_hdl, bool ts_enabled)
+  {
+    CTimer::get("XIOS").resume();
+    fieldgroup_hdl->ts_enabled.setValue(ts_enabled);
+    CTimer::get("XIOS").suspend();
+  }
+
+  void cxios_get_fieldgroup_ts_enabled(fieldgroup_Ptr fieldgroup_hdl, bool* ts_enabled)
+  {
+    CTimer::get("XIOS").resume();
+    *ts_enabled = fieldgroup_hdl->ts_enabled.getInheritedValue();
+    CTimer::get("XIOS").suspend();
+  }
+
+  bool cxios_is_defined_fieldgroup_ts_enabled(fieldgroup_Ptr fieldgroup_hdl)
+  {
+     CTimer::get("XIOS").resume();
+     bool isDefined = fieldgroup_hdl->ts_enabled.hasInheritedValue();
+     CTimer::get("XIOS").suspend();
+     return isDefined;
+  }
+
+
+  void cxios_set_fieldgroup_ts_split_freq(fieldgroup_Ptr fieldgroup_hdl, cxios_duration ts_split_freq_c)
+  {
+    CTimer::get("XIOS").resume();
+    fieldgroup_hdl->ts_split_freq.allocate();
+    CDuration& ts_split_freq = fieldgroup_hdl->ts_split_freq.get();
+    ts_split_freq.year = ts_split_freq_c.year;
+    ts_split_freq.month = ts_split_freq_c.month;
+    ts_split_freq.day = ts_split_freq_c.day;
+    ts_split_freq.hour = ts_split_freq_c.hour;
+    ts_split_freq.minute = ts_split_freq_c.minute;
+    ts_split_freq.second = ts_split_freq_c.second;
+    ts_split_freq.timestep = ts_split_freq_c.timestep;
+    CTimer::get("XIOS").suspend();
+  }
+
+  void cxios_get_fieldgroup_ts_split_freq(fieldgroup_Ptr fieldgroup_hdl, cxios_duration* ts_split_freq_c)
+  {
+    CTimer::get("XIOS").resume();
+    CDuration ts_split_freq = fieldgroup_hdl->ts_split_freq.getInheritedValue();
+    ts_split_freq_c->year = ts_split_freq.year;
+    ts_split_freq_c->month = ts_split_freq.month;
+    ts_split_freq_c->day = ts_split_freq.day;
+    ts_split_freq_c->hour = ts_split_freq.hour;
+    ts_split_freq_c->minute = ts_split_freq.minute;
+    ts_split_freq_c->second = ts_split_freq.second;
+    ts_split_freq_c->timestep = ts_split_freq.timestep;
+    CTimer::get("XIOS").suspend();
+  }
+
+  bool cxios_is_defined_fieldgroup_ts_split_freq(fieldgroup_Ptr fieldgroup_hdl)
+  {
+     CTimer::get("XIOS").resume();
+     bool isDefined = fieldgroup_hdl->ts_split_freq.hasInheritedValue();
+     CTimer::get("XIOS").suspend();
+     return isDefined;
+  }
+
+
+  void cxios_set_fieldgroup_unit(fieldgroup_Ptr fieldgroup_hdl, const char * unit, int unit_size)
+  {
+    std::string unit_str;
+    if (!cstr2string(unit, unit_size, unit_str)) return;
+    CTimer::get("XIOS").resume();
+    fieldgroup_hdl->unit.setValue(unit_str);
+    CTimer::get("XIOS").suspend();
+  }
+
+  void cxios_get_fieldgroup_unit(fieldgroup_Ptr fieldgroup_hdl, char * unit, int unit_size)
+  {
+    CTimer::get("XIOS").resume();
+    if (!string_copy(fieldgroup_hdl->unit.getInheritedValue(), unit, unit_size))
+      ERROR("void cxios_get_fieldgroup_unit(fieldgroup_Ptr fieldgroup_hdl, char * unit, int unit_size)", << "Input string is too short");
+    CTimer::get("XIOS").suspend();
+  }
+
+  bool cxios_is_defined_fieldgroup_unit(fieldgroup_Ptr fieldgroup_hdl)
+  {
+     CTimer::get("XIOS").resume();
+     bool isDefined = fieldgroup_hdl->unit.hasInheritedValue();
+     CTimer::get("XIOS").suspend();
+     return isDefined;
+  }
+
+
+  void cxios_set_fieldgroup_valid_max(fieldgroup_Ptr fieldgroup_hdl, double valid_max)
+  {
+    CTimer::get("XIOS").resume();
+    fieldgroup_hdl->valid_max.setValue(valid_max);
+    CTimer::get("XIOS").suspend();
+  }
+
+  void cxios_get_fieldgroup_valid_max(fieldgroup_Ptr fieldgroup_hdl, double* valid_max)
+  {
+    CTimer::get("XIOS").resume();
+    *valid_max = fieldgroup_hdl->valid_max.getInheritedValue();
+    CTimer::get("XIOS").suspend();
+  }
+
+  bool cxios_is_defined_fieldgroup_valid_max(fieldgroup_Ptr fieldgroup_hdl)
+  {
+     CTimer::get("XIOS").resume();
+     bool isDefined = fieldgroup_hdl->valid_max.hasInheritedValue();
+     CTimer::get("XIOS").suspend();
+     return isDefined;
+  }
+
+
+  void cxios_set_fieldgroup_valid_min(fieldgroup_Ptr fieldgroup_hdl, double valid_min)
+  {
+    CTimer::get("XIOS").resume();
+    fieldgroup_hdl->valid_min.setValue(valid_min);
+    CTimer::get("XIOS").suspend();
+  }
+
+  void cxios_get_fieldgroup_valid_min(fieldgroup_Ptr fieldgroup_hdl, double* valid_min)
+  {
+    CTimer::get("XIOS").resume();
+    *valid_min = fieldgroup_hdl->valid_min.getInheritedValue();
+    CTimer::get("XIOS").suspend();
+  }
+
+  bool cxios_is_defined_fieldgroup_valid_min(fieldgroup_Ptr fieldgroup_hdl)
+  {
+     CTimer::get("XIOS").resume();
+     bool isDefined = fieldgroup_hdl->valid_min.hasInheritedValue();
+     CTimer::get("XIOS").suspend();
+     return isDefined;
+  }
+}
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/c_attr/icfile_attr.cpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/c_attr/icfile_attr.cpp	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/c_attr/icfile_attr.cpp	(revision 1749)
@@ -0,0 +1,937 @@
+/* ************************************************************************** *
+ *               Interface auto generated - do not modify                     *
+ * ************************************************************************** */
+
+#include <boost/multi_array.hpp>
+#include "xios.hpp"
+#include "attribute_template.hpp"
+#include "object_template.hpp"
+#include "group_template.hpp"
+#include "icutil.hpp"
+#include "icdate.hpp"
+#include "timer.hpp"
+#include "node_type.hpp"
+
+extern "C"
+{
+  typedef xios::CFile* file_Ptr;
+
+  void cxios_set_file_append(file_Ptr file_hdl, bool append)
+  {
+    CTimer::get("XIOS").resume();
+    file_hdl->append.setValue(append);
+    CTimer::get("XIOS").suspend();
+  }
+
+  void cxios_get_file_append(file_Ptr file_hdl, bool* append)
+  {
+    CTimer::get("XIOS").resume();
+    *append = file_hdl->append.getInheritedValue();
+    CTimer::get("XIOS").suspend();
+  }
+
+  bool cxios_is_defined_file_append(file_Ptr file_hdl)
+  {
+     CTimer::get("XIOS").resume();
+     bool isDefined = file_hdl->append.hasInheritedValue();
+     CTimer::get("XIOS").suspend();
+     return isDefined;
+  }
+
+
+  void cxios_set_file_comment(file_Ptr file_hdl, const char * comment, int comment_size)
+  {
+    std::string comment_str;
+    if (!cstr2string(comment, comment_size, comment_str)) return;
+    CTimer::get("XIOS").resume();
+    file_hdl->comment.setValue(comment_str);
+    CTimer::get("XIOS").suspend();
+  }
+
+  void cxios_get_file_comment(file_Ptr file_hdl, char * comment, int comment_size)
+  {
+    CTimer::get("XIOS").resume();
+    if (!string_copy(file_hdl->comment.getInheritedValue(), comment, comment_size))
+      ERROR("void cxios_get_file_comment(file_Ptr file_hdl, char * comment, int comment_size)", << "Input string is too short");
+    CTimer::get("XIOS").suspend();
+  }
+
+  bool cxios_is_defined_file_comment(file_Ptr file_hdl)
+  {
+     CTimer::get("XIOS").resume();
+     bool isDefined = file_hdl->comment.hasInheritedValue();
+     CTimer::get("XIOS").suspend();
+     return isDefined;
+  }
+
+
+  void cxios_set_file_compression_level(file_Ptr file_hdl, int compression_level)
+  {
+    CTimer::get("XIOS").resume();
+    file_hdl->compression_level.setValue(compression_level);
+    CTimer::get("XIOS").suspend();
+  }
+
+  void cxios_get_file_compression_level(file_Ptr file_hdl, int* compression_level)
+  {
+    CTimer::get("XIOS").resume();
+    *compression_level = file_hdl->compression_level.getInheritedValue();
+    CTimer::get("XIOS").suspend();
+  }
+
+  bool cxios_is_defined_file_compression_level(file_Ptr file_hdl)
+  {
+     CTimer::get("XIOS").resume();
+     bool isDefined = file_hdl->compression_level.hasInheritedValue();
+     CTimer::get("XIOS").suspend();
+     return isDefined;
+  }
+
+
+  void cxios_set_file_convention(file_Ptr file_hdl, const char * convention, int convention_size)
+  {
+    std::string convention_str;
+    if (!cstr2string(convention, convention_size, convention_str)) return;
+    CTimer::get("XIOS").resume();
+    file_hdl->convention.fromString(convention_str);
+    CTimer::get("XIOS").suspend();
+  }
+
+  void cxios_get_file_convention(file_Ptr file_hdl, char * convention, int convention_size)
+  {
+    CTimer::get("XIOS").resume();
+    if (!string_copy(file_hdl->convention.getInheritedStringValue(), convention, convention_size))
+      ERROR("void cxios_get_file_convention(file_Ptr file_hdl, char * convention, int convention_size)", << "Input string is too short");
+    CTimer::get("XIOS").suspend();
+  }
+
+  bool cxios_is_defined_file_convention(file_Ptr file_hdl)
+  {
+     CTimer::get("XIOS").resume();
+     bool isDefined = file_hdl->convention.hasInheritedValue();
+     CTimer::get("XIOS").suspend();
+     return isDefined;
+  }
+
+
+  void cxios_set_file_convention_str(file_Ptr file_hdl, const char * convention_str, int convention_str_size)
+  {
+    std::string convention_str_str;
+    if (!cstr2string(convention_str, convention_str_size, convention_str_str)) return;
+    CTimer::get("XIOS").resume();
+    file_hdl->convention_str.setValue(convention_str_str);
+    CTimer::get("XIOS").suspend();
+  }
+
+  void cxios_get_file_convention_str(file_Ptr file_hdl, char * convention_str, int convention_str_size)
+  {
+    CTimer::get("XIOS").resume();
+    if (!string_copy(file_hdl->convention_str.getInheritedValue(), convention_str, convention_str_size))
+      ERROR("void cxios_get_file_convention_str(file_Ptr file_hdl, char * convention_str, int convention_str_size)", << "Input string is too short");
+    CTimer::get("XIOS").suspend();
+  }
+
+  bool cxios_is_defined_file_convention_str(file_Ptr file_hdl)
+  {
+     CTimer::get("XIOS").resume();
+     bool isDefined = file_hdl->convention_str.hasInheritedValue();
+     CTimer::get("XIOS").suspend();
+     return isDefined;
+  }
+
+
+  void cxios_set_file_cyclic(file_Ptr file_hdl, bool cyclic)
+  {
+    CTimer::get("XIOS").resume();
+    file_hdl->cyclic.setValue(cyclic);
+    CTimer::get("XIOS").suspend();
+  }
+
+  void cxios_get_file_cyclic(file_Ptr file_hdl, bool* cyclic)
+  {
+    CTimer::get("XIOS").resume();
+    *cyclic = file_hdl->cyclic.getInheritedValue();
+    CTimer::get("XIOS").suspend();
+  }
+
+  bool cxios_is_defined_file_cyclic(file_Ptr file_hdl)
+  {
+     CTimer::get("XIOS").resume();
+     bool isDefined = file_hdl->cyclic.hasInheritedValue();
+     CTimer::get("XIOS").suspend();
+     return isDefined;
+  }
+
+
+  void cxios_set_file_description(file_Ptr file_hdl, const char * description, int description_size)
+  {
+    std::string description_str;
+    if (!cstr2string(description, description_size, description_str)) return;
+    CTimer::get("XIOS").resume();
+    file_hdl->description.setValue(description_str);
+    CTimer::get("XIOS").suspend();
+  }
+
+  void cxios_get_file_description(file_Ptr file_hdl, char * description, int description_size)
+  {
+    CTimer::get("XIOS").resume();
+    if (!string_copy(file_hdl->description.getInheritedValue(), description, description_size))
+      ERROR("void cxios_get_file_description(file_Ptr file_hdl, char * description, int description_size)", << "Input string is too short");
+    CTimer::get("XIOS").suspend();
+  }
+
+  bool cxios_is_defined_file_description(file_Ptr file_hdl)
+  {
+     CTimer::get("XIOS").resume();
+     bool isDefined = file_hdl->description.hasInheritedValue();
+     CTimer::get("XIOS").suspend();
+     return isDefined;
+  }
+
+
+  void cxios_set_file_enabled(file_Ptr file_hdl, bool enabled)
+  {
+    CTimer::get("XIOS").resume();
+    file_hdl->enabled.setValue(enabled);
+    CTimer::get("XIOS").suspend();
+  }
+
+  void cxios_get_file_enabled(file_Ptr file_hdl, bool* enabled)
+  {
+    CTimer::get("XIOS").resume();
+    *enabled = file_hdl->enabled.getInheritedValue();
+    CTimer::get("XIOS").suspend();
+  }
+
+  bool cxios_is_defined_file_enabled(file_Ptr file_hdl)
+  {
+     CTimer::get("XIOS").resume();
+     bool isDefined = file_hdl->enabled.hasInheritedValue();
+     CTimer::get("XIOS").suspend();
+     return isDefined;
+  }
+
+
+  void cxios_set_file_format(file_Ptr file_hdl, const char * format, int format_size)
+  {
+    std::string format_str;
+    if (!cstr2string(format, format_size, format_str)) return;
+    CTimer::get("XIOS").resume();
+    file_hdl->format.fromString(format_str);
+    CTimer::get("XIOS").suspend();
+  }
+
+  void cxios_get_file_format(file_Ptr file_hdl, char * format, int format_size)
+  {
+    CTimer::get("XIOS").resume();
+    if (!string_copy(file_hdl->format.getInheritedStringValue(), format, format_size))
+      ERROR("void cxios_get_file_format(file_Ptr file_hdl, char * format, int format_size)", << "Input string is too short");
+    CTimer::get("XIOS").suspend();
+  }
+
+  bool cxios_is_defined_file_format(file_Ptr file_hdl)
+  {
+     CTimer::get("XIOS").resume();
+     bool isDefined = file_hdl->format.hasInheritedValue();
+     CTimer::get("XIOS").suspend();
+     return isDefined;
+  }
+
+
+  void cxios_set_file_min_digits(file_Ptr file_hdl, int min_digits)
+  {
+    CTimer::get("XIOS").resume();
+    file_hdl->min_digits.setValue(min_digits);
+    CTimer::get("XIOS").suspend();
+  }
+
+  void cxios_get_file_min_digits(file_Ptr file_hdl, int* min_digits)
+  {
+    CTimer::get("XIOS").resume();
+    *min_digits = file_hdl->min_digits.getInheritedValue();
+    CTimer::get("XIOS").suspend();
+  }
+
+  bool cxios_is_defined_file_min_digits(file_Ptr file_hdl)
+  {
+     CTimer::get("XIOS").resume();
+     bool isDefined = file_hdl->min_digits.hasInheritedValue();
+     CTimer::get("XIOS").suspend();
+     return isDefined;
+  }
+
+
+  void cxios_set_file_mode(file_Ptr file_hdl, const char * mode, int mode_size)
+  {
+    std::string mode_str;
+    if (!cstr2string(mode, mode_size, mode_str)) return;
+    CTimer::get("XIOS").resume();
+    file_hdl->mode.fromString(mode_str);
+    CTimer::get("XIOS").suspend();
+  }
+
+  void cxios_get_file_mode(file_Ptr file_hdl, char * mode, int mode_size)
+  {
+    CTimer::get("XIOS").resume();
+    if (!string_copy(file_hdl->mode.getInheritedStringValue(), mode, mode_size))
+      ERROR("void cxios_get_file_mode(file_Ptr file_hdl, char * mode, int mode_size)", << "Input string is too short");
+    CTimer::get("XIOS").suspend();
+  }
+
+  bool cxios_is_defined_file_mode(file_Ptr file_hdl)
+  {
+     CTimer::get("XIOS").resume();
+     bool isDefined = file_hdl->mode.hasInheritedValue();
+     CTimer::get("XIOS").suspend();
+     return isDefined;
+  }
+
+
+  void cxios_set_file_name(file_Ptr file_hdl, const char * name, int name_size)
+  {
+    std::string name_str;
+    if (!cstr2string(name, name_size, name_str)) return;
+    CTimer::get("XIOS").resume();
+    file_hdl->name.setValue(name_str);
+    CTimer::get("XIOS").suspend();
+  }
+
+  void cxios_get_file_name(file_Ptr file_hdl, char * name, int name_size)
+  {
+    CTimer::get("XIOS").resume();
+    if (!string_copy(file_hdl->name.getInheritedValue(), name, name_size))
+      ERROR("void cxios_get_file_name(file_Ptr file_hdl, char * name, int name_size)", << "Input string is too short");
+    CTimer::get("XIOS").suspend();
+  }
+
+  bool cxios_is_defined_file_name(file_Ptr file_hdl)
+  {
+     CTimer::get("XIOS").resume();
+     bool isDefined = file_hdl->name.hasInheritedValue();
+     CTimer::get("XIOS").suspend();
+     return isDefined;
+  }
+
+
+  void cxios_set_file_name_suffix(file_Ptr file_hdl, const char * name_suffix, int name_suffix_size)
+  {
+    std::string name_suffix_str;
+    if (!cstr2string(name_suffix, name_suffix_size, name_suffix_str)) return;
+    CTimer::get("XIOS").resume();
+    file_hdl->name_suffix.setValue(name_suffix_str);
+    CTimer::get("XIOS").suspend();
+  }
+
+  void cxios_get_file_name_suffix(file_Ptr file_hdl, char * name_suffix, int name_suffix_size)
+  {
+    CTimer::get("XIOS").resume();
+    if (!string_copy(file_hdl->name_suffix.getInheritedValue(), name_suffix, name_suffix_size))
+      ERROR("void cxios_get_file_name_suffix(file_Ptr file_hdl, char * name_suffix, int name_suffix_size)", << "Input string is too short");
+    CTimer::get("XIOS").suspend();
+  }
+
+  bool cxios_is_defined_file_name_suffix(file_Ptr file_hdl)
+  {
+     CTimer::get("XIOS").resume();
+     bool isDefined = file_hdl->name_suffix.hasInheritedValue();
+     CTimer::get("XIOS").suspend();
+     return isDefined;
+  }
+
+
+  void cxios_set_file_output_freq(file_Ptr file_hdl, cxios_duration output_freq_c)
+  {
+    CTimer::get("XIOS").resume();
+    file_hdl->output_freq.allocate();
+    CDuration& output_freq = file_hdl->output_freq.get();
+    output_freq.year = output_freq_c.year;
+    output_freq.month = output_freq_c.month;
+    output_freq.day = output_freq_c.day;
+    output_freq.hour = output_freq_c.hour;
+    output_freq.minute = output_freq_c.minute;
+    output_freq.second = output_freq_c.second;
+    output_freq.timestep = output_freq_c.timestep;
+    CTimer::get("XIOS").suspend();
+  }
+
+  void cxios_get_file_output_freq(file_Ptr file_hdl, cxios_duration* output_freq_c)
+  {
+    CTimer::get("XIOS").resume();
+    CDuration output_freq = file_hdl->output_freq.getInheritedValue();
+    output_freq_c->year = output_freq.year;
+    output_freq_c->month = output_freq.month;
+    output_freq_c->day = output_freq.day;
+    output_freq_c->hour = output_freq.hour;
+    output_freq_c->minute = output_freq.minute;
+    output_freq_c->second = output_freq.second;
+    output_freq_c->timestep = output_freq.timestep;
+    CTimer::get("XIOS").suspend();
+  }
+
+  bool cxios_is_defined_file_output_freq(file_Ptr file_hdl)
+  {
+     CTimer::get("XIOS").resume();
+     bool isDefined = file_hdl->output_freq.hasInheritedValue();
+     CTimer::get("XIOS").suspend();
+     return isDefined;
+  }
+
+
+  void cxios_set_file_output_level(file_Ptr file_hdl, int output_level)
+  {
+    CTimer::get("XIOS").resume();
+    file_hdl->output_level.setValue(output_level);
+    CTimer::get("XIOS").suspend();
+  }
+
+  void cxios_get_file_output_level(file_Ptr file_hdl, int* output_level)
+  {
+    CTimer::get("XIOS").resume();
+    *output_level = file_hdl->output_level.getInheritedValue();
+    CTimer::get("XIOS").suspend();
+  }
+
+  bool cxios_is_defined_file_output_level(file_Ptr file_hdl)
+  {
+     CTimer::get("XIOS").resume();
+     bool isDefined = file_hdl->output_level.hasInheritedValue();
+     CTimer::get("XIOS").suspend();
+     return isDefined;
+  }
+
+
+  void cxios_set_file_par_access(file_Ptr file_hdl, const char * par_access, int par_access_size)
+  {
+    std::string par_access_str;
+    if (!cstr2string(par_access, par_access_size, par_access_str)) return;
+    CTimer::get("XIOS").resume();
+    file_hdl->par_access.fromString(par_access_str);
+    CTimer::get("XIOS").suspend();
+  }
+
+  void cxios_get_file_par_access(file_Ptr file_hdl, char * par_access, int par_access_size)
+  {
+    CTimer::get("XIOS").resume();
+    if (!string_copy(file_hdl->par_access.getInheritedStringValue(), par_access, par_access_size))
+      ERROR("void cxios_get_file_par_access(file_Ptr file_hdl, char * par_access, int par_access_size)", << "Input string is too short");
+    CTimer::get("XIOS").suspend();
+  }
+
+  bool cxios_is_defined_file_par_access(file_Ptr file_hdl)
+  {
+     CTimer::get("XIOS").resume();
+     bool isDefined = file_hdl->par_access.hasInheritedValue();
+     CTimer::get("XIOS").suspend();
+     return isDefined;
+  }
+
+
+  void cxios_set_file_read_metadata_par(file_Ptr file_hdl, bool read_metadata_par)
+  {
+    CTimer::get("XIOS").resume();
+    file_hdl->read_metadata_par.setValue(read_metadata_par);
+    CTimer::get("XIOS").suspend();
+  }
+
+  void cxios_get_file_read_metadata_par(file_Ptr file_hdl, bool* read_metadata_par)
+  {
+    CTimer::get("XIOS").resume();
+    *read_metadata_par = file_hdl->read_metadata_par.getInheritedValue();
+    CTimer::get("XIOS").suspend();
+  }
+
+  bool cxios_is_defined_file_read_metadata_par(file_Ptr file_hdl)
+  {
+     CTimer::get("XIOS").resume();
+     bool isDefined = file_hdl->read_metadata_par.hasInheritedValue();
+     CTimer::get("XIOS").suspend();
+     return isDefined;
+  }
+
+
+  void cxios_set_file_record_offset(file_Ptr file_hdl, int record_offset)
+  {
+    CTimer::get("XIOS").resume();
+    file_hdl->record_offset.setValue(record_offset);
+    CTimer::get("XIOS").suspend();
+  }
+
+  void cxios_get_file_record_offset(file_Ptr file_hdl, int* record_offset)
+  {
+    CTimer::get("XIOS").resume();
+    *record_offset = file_hdl->record_offset.getInheritedValue();
+    CTimer::get("XIOS").suspend();
+  }
+
+  bool cxios_is_defined_file_record_offset(file_Ptr file_hdl)
+  {
+     CTimer::get("XIOS").resume();
+     bool isDefined = file_hdl->record_offset.hasInheritedValue();
+     CTimer::get("XIOS").suspend();
+     return isDefined;
+  }
+
+
+  void cxios_set_file_split_end_offset(file_Ptr file_hdl, cxios_duration split_end_offset_c)
+  {
+    CTimer::get("XIOS").resume();
+    file_hdl->split_end_offset.allocate();
+    CDuration& split_end_offset = file_hdl->split_end_offset.get();
+    split_end_offset.year = split_end_offset_c.year;
+    split_end_offset.month = split_end_offset_c.month;
+    split_end_offset.day = split_end_offset_c.day;
+    split_end_offset.hour = split_end_offset_c.hour;
+    split_end_offset.minute = split_end_offset_c.minute;
+    split_end_offset.second = split_end_offset_c.second;
+    split_end_offset.timestep = split_end_offset_c.timestep;
+    CTimer::get("XIOS").suspend();
+  }
+
+  void cxios_get_file_split_end_offset(file_Ptr file_hdl, cxios_duration* split_end_offset_c)
+  {
+    CTimer::get("XIOS").resume();
+    CDuration split_end_offset = file_hdl->split_end_offset.getInheritedValue();
+    split_end_offset_c->year = split_end_offset.year;
+    split_end_offset_c->month = split_end_offset.month;
+    split_end_offset_c->day = split_end_offset.day;
+    split_end_offset_c->hour = split_end_offset.hour;
+    split_end_offset_c->minute = split_end_offset.minute;
+    split_end_offset_c->second = split_end_offset.second;
+    split_end_offset_c->timestep = split_end_offset.timestep;
+    CTimer::get("XIOS").suspend();
+  }
+
+  bool cxios_is_defined_file_split_end_offset(file_Ptr file_hdl)
+  {
+     CTimer::get("XIOS").resume();
+     bool isDefined = file_hdl->split_end_offset.hasInheritedValue();
+     CTimer::get("XIOS").suspend();
+     return isDefined;
+  }
+
+
+  void cxios_set_file_split_freq(file_Ptr file_hdl, cxios_duration split_freq_c)
+  {
+    CTimer::get("XIOS").resume();
+    file_hdl->split_freq.allocate();
+    CDuration& split_freq = file_hdl->split_freq.get();
+    split_freq.year = split_freq_c.year;
+    split_freq.month = split_freq_c.month;
+    split_freq.day = split_freq_c.day;
+    split_freq.hour = split_freq_c.hour;
+    split_freq.minute = split_freq_c.minute;
+    split_freq.second = split_freq_c.second;
+    split_freq.timestep = split_freq_c.timestep;
+    CTimer::get("XIOS").suspend();
+  }
+
+  void cxios_get_file_split_freq(file_Ptr file_hdl, cxios_duration* split_freq_c)
+  {
+    CTimer::get("XIOS").resume();
+    CDuration split_freq = file_hdl->split_freq.getInheritedValue();
+    split_freq_c->year = split_freq.year;
+    split_freq_c->month = split_freq.month;
+    split_freq_c->day = split_freq.day;
+    split_freq_c->hour = split_freq.hour;
+    split_freq_c->minute = split_freq.minute;
+    split_freq_c->second = split_freq.second;
+    split_freq_c->timestep = split_freq.timestep;
+    CTimer::get("XIOS").suspend();
+  }
+
+  bool cxios_is_defined_file_split_freq(file_Ptr file_hdl)
+  {
+     CTimer::get("XIOS").resume();
+     bool isDefined = file_hdl->split_freq.hasInheritedValue();
+     CTimer::get("XIOS").suspend();
+     return isDefined;
+  }
+
+
+  void cxios_set_file_split_freq_format(file_Ptr file_hdl, const char * split_freq_format, int split_freq_format_size)
+  {
+    std::string split_freq_format_str;
+    if (!cstr2string(split_freq_format, split_freq_format_size, split_freq_format_str)) return;
+    CTimer::get("XIOS").resume();
+    file_hdl->split_freq_format.setValue(split_freq_format_str);
+    CTimer::get("XIOS").suspend();
+  }
+
+  void cxios_get_file_split_freq_format(file_Ptr file_hdl, char * split_freq_format, int split_freq_format_size)
+  {
+    CTimer::get("XIOS").resume();
+    if (!string_copy(file_hdl->split_freq_format.getInheritedValue(), split_freq_format, split_freq_format_size))
+      ERROR("void cxios_get_file_split_freq_format(file_Ptr file_hdl, char * split_freq_format, int split_freq_format_size)", << "Input string is too short");
+    CTimer::get("XIOS").suspend();
+  }
+
+  bool cxios_is_defined_file_split_freq_format(file_Ptr file_hdl)
+  {
+     CTimer::get("XIOS").resume();
+     bool isDefined = file_hdl->split_freq_format.hasInheritedValue();
+     CTimer::get("XIOS").suspend();
+     return isDefined;
+  }
+
+
+  void cxios_set_file_split_last_date(file_Ptr file_hdl, const char * split_last_date, int split_last_date_size)
+  {
+    std::string split_last_date_str;
+    if (!cstr2string(split_last_date, split_last_date_size, split_last_date_str)) return;
+    CTimer::get("XIOS").resume();
+    file_hdl->split_last_date.setValue(split_last_date_str);
+    CTimer::get("XIOS").suspend();
+  }
+
+  void cxios_get_file_split_last_date(file_Ptr file_hdl, char * split_last_date, int split_last_date_size)
+  {
+    CTimer::get("XIOS").resume();
+    if (!string_copy(file_hdl->split_last_date.getInheritedValue(), split_last_date, split_last_date_size))
+      ERROR("void cxios_get_file_split_last_date(file_Ptr file_hdl, char * split_last_date, int split_last_date_size)", << "Input string is too short");
+    CTimer::get("XIOS").suspend();
+  }
+
+  bool cxios_is_defined_file_split_last_date(file_Ptr file_hdl)
+  {
+     CTimer::get("XIOS").resume();
+     bool isDefined = file_hdl->split_last_date.hasInheritedValue();
+     CTimer::get("XIOS").suspend();
+     return isDefined;
+  }
+
+
+  void cxios_set_file_split_start_offset(file_Ptr file_hdl, cxios_duration split_start_offset_c)
+  {
+    CTimer::get("XIOS").resume();
+    file_hdl->split_start_offset.allocate();
+    CDuration& split_start_offset = file_hdl->split_start_offset.get();
+    split_start_offset.year = split_start_offset_c.year;
+    split_start_offset.month = split_start_offset_c.month;
+    split_start_offset.day = split_start_offset_c.day;
+    split_start_offset.hour = split_start_offset_c.hour;
+    split_start_offset.minute = split_start_offset_c.minute;
+    split_start_offset.second = split_start_offset_c.second;
+    split_start_offset.timestep = split_start_offset_c.timestep;
+    CTimer::get("XIOS").suspend();
+  }
+
+  void cxios_get_file_split_start_offset(file_Ptr file_hdl, cxios_duration* split_start_offset_c)
+  {
+    CTimer::get("XIOS").resume();
+    CDuration split_start_offset = file_hdl->split_start_offset.getInheritedValue();
+    split_start_offset_c->year = split_start_offset.year;
+    split_start_offset_c->month = split_start_offset.month;
+    split_start_offset_c->day = split_start_offset.day;
+    split_start_offset_c->hour = split_start_offset.hour;
+    split_start_offset_c->minute = split_start_offset.minute;
+    split_start_offset_c->second = split_start_offset.second;
+    split_start_offset_c->timestep = split_start_offset.timestep;
+    CTimer::get("XIOS").suspend();
+  }
+
+  bool cxios_is_defined_file_split_start_offset(file_Ptr file_hdl)
+  {
+     CTimer::get("XIOS").resume();
+     bool isDefined = file_hdl->split_start_offset.hasInheritedValue();
+     CTimer::get("XIOS").suspend();
+     return isDefined;
+  }
+
+
+  void cxios_set_file_sync_freq(file_Ptr file_hdl, cxios_duration sync_freq_c)
+  {
+    CTimer::get("XIOS").resume();
+    file_hdl->sync_freq.allocate();
+    CDuration& sync_freq = file_hdl->sync_freq.get();
+    sync_freq.year = sync_freq_c.year;
+    sync_freq.month = sync_freq_c.month;
+    sync_freq.day = sync_freq_c.day;
+    sync_freq.hour = sync_freq_c.hour;
+    sync_freq.minute = sync_freq_c.minute;
+    sync_freq.second = sync_freq_c.second;
+    sync_freq.timestep = sync_freq_c.timestep;
+    CTimer::get("XIOS").suspend();
+  }
+
+  void cxios_get_file_sync_freq(file_Ptr file_hdl, cxios_duration* sync_freq_c)
+  {
+    CTimer::get("XIOS").resume();
+    CDuration sync_freq = file_hdl->sync_freq.getInheritedValue();
+    sync_freq_c->year = sync_freq.year;
+    sync_freq_c->month = sync_freq.month;
+    sync_freq_c->day = sync_freq.day;
+    sync_freq_c->hour = sync_freq.hour;
+    sync_freq_c->minute = sync_freq.minute;
+    sync_freq_c->second = sync_freq.second;
+    sync_freq_c->timestep = sync_freq.timestep;
+    CTimer::get("XIOS").suspend();
+  }
+
+  bool cxios_is_defined_file_sync_freq(file_Ptr file_hdl)
+  {
+     CTimer::get("XIOS").resume();
+     bool isDefined = file_hdl->sync_freq.hasInheritedValue();
+     CTimer::get("XIOS").suspend();
+     return isDefined;
+  }
+
+
+  void cxios_set_file_time_counter(file_Ptr file_hdl, const char * time_counter, int time_counter_size)
+  {
+    std::string time_counter_str;
+    if (!cstr2string(time_counter, time_counter_size, time_counter_str)) return;
+    CTimer::get("XIOS").resume();
+    file_hdl->time_counter.fromString(time_counter_str);
+    CTimer::get("XIOS").suspend();
+  }
+
+  void cxios_get_file_time_counter(file_Ptr file_hdl, char * time_counter, int time_counter_size)
+  {
+    CTimer::get("XIOS").resume();
+    if (!string_copy(file_hdl->time_counter.getInheritedStringValue(), time_counter, time_counter_size))
+      ERROR("void cxios_get_file_time_counter(file_Ptr file_hdl, char * time_counter, int time_counter_size)", << "Input string is too short");
+    CTimer::get("XIOS").suspend();
+  }
+
+  bool cxios_is_defined_file_time_counter(file_Ptr file_hdl)
+  {
+     CTimer::get("XIOS").resume();
+     bool isDefined = file_hdl->time_counter.hasInheritedValue();
+     CTimer::get("XIOS").suspend();
+     return isDefined;
+  }
+
+
+  void cxios_set_file_time_counter_name(file_Ptr file_hdl, const char * time_counter_name, int time_counter_name_size)
+  {
+    std::string time_counter_name_str;
+    if (!cstr2string(time_counter_name, time_counter_name_size, time_counter_name_str)) return;
+    CTimer::get("XIOS").resume();
+    file_hdl->time_counter_name.setValue(time_counter_name_str);
+    CTimer::get("XIOS").suspend();
+  }
+
+  void cxios_get_file_time_counter_name(file_Ptr file_hdl, char * time_counter_name, int time_counter_name_size)
+  {
+    CTimer::get("XIOS").resume();
+    if (!string_copy(file_hdl->time_counter_name.getInheritedValue(), time_counter_name, time_counter_name_size))
+      ERROR("void cxios_get_file_time_counter_name(file_Ptr file_hdl, char * time_counter_name, int time_counter_name_size)", << "Input string is too short");
+    CTimer::get("XIOS").suspend();
+  }
+
+  bool cxios_is_defined_file_time_counter_name(file_Ptr file_hdl)
+  {
+     CTimer::get("XIOS").resume();
+     bool isDefined = file_hdl->time_counter_name.hasInheritedValue();
+     CTimer::get("XIOS").suspend();
+     return isDefined;
+  }
+
+
+  void cxios_set_file_time_stamp_format(file_Ptr file_hdl, const char * time_stamp_format, int time_stamp_format_size)
+  {
+    std::string time_stamp_format_str;
+    if (!cstr2string(time_stamp_format, time_stamp_format_size, time_stamp_format_str)) return;
+    CTimer::get("XIOS").resume();
+    file_hdl->time_stamp_format.setValue(time_stamp_format_str);
+    CTimer::get("XIOS").suspend();
+  }
+
+  void cxios_get_file_time_stamp_format(file_Ptr file_hdl, char * time_stamp_format, int time_stamp_format_size)
+  {
+    CTimer::get("XIOS").resume();
+    if (!string_copy(file_hdl->time_stamp_format.getInheritedValue(), time_stamp_format, time_stamp_format_size))
+      ERROR("void cxios_get_file_time_stamp_format(file_Ptr file_hdl, char * time_stamp_format, int time_stamp_format_size)", << "Input string is too short");
+    CTimer::get("XIOS").suspend();
+  }
+
+  bool cxios_is_defined_file_time_stamp_format(file_Ptr file_hdl)
+  {
+     CTimer::get("XIOS").resume();
+     bool isDefined = file_hdl->time_stamp_format.hasInheritedValue();
+     CTimer::get("XIOS").suspend();
+     return isDefined;
+  }
+
+
+  void cxios_set_file_time_stamp_name(file_Ptr file_hdl, const char * time_stamp_name, int time_stamp_name_size)
+  {
+    std::string time_stamp_name_str;
+    if (!cstr2string(time_stamp_name, time_stamp_name_size, time_stamp_name_str)) return;
+    CTimer::get("XIOS").resume();
+    file_hdl->time_stamp_name.setValue(time_stamp_name_str);
+    CTimer::get("XIOS").suspend();
+  }
+
+  void cxios_get_file_time_stamp_name(file_Ptr file_hdl, char * time_stamp_name, int time_stamp_name_size)
+  {
+    CTimer::get("XIOS").resume();
+    if (!string_copy(file_hdl->time_stamp_name.getInheritedValue(), time_stamp_name, time_stamp_name_size))
+      ERROR("void cxios_get_file_time_stamp_name(file_Ptr file_hdl, char * time_stamp_name, int time_stamp_name_size)", << "Input string is too short");
+    CTimer::get("XIOS").suspend();
+  }
+
+  bool cxios_is_defined_file_time_stamp_name(file_Ptr file_hdl)
+  {
+     CTimer::get("XIOS").resume();
+     bool isDefined = file_hdl->time_stamp_name.hasInheritedValue();
+     CTimer::get("XIOS").suspend();
+     return isDefined;
+  }
+
+
+  void cxios_set_file_time_units(file_Ptr file_hdl, const char * time_units, int time_units_size)
+  {
+    std::string time_units_str;
+    if (!cstr2string(time_units, time_units_size, time_units_str)) return;
+    CTimer::get("XIOS").resume();
+    file_hdl->time_units.fromString(time_units_str);
+    CTimer::get("XIOS").suspend();
+  }
+
+  void cxios_get_file_time_units(file_Ptr file_hdl, char * time_units, int time_units_size)
+  {
+    CTimer::get("XIOS").resume();
+    if (!string_copy(file_hdl->time_units.getInheritedStringValue(), time_units, time_units_size))
+      ERROR("void cxios_get_file_time_units(file_Ptr file_hdl, char * time_units, int time_units_size)", << "Input string is too short");
+    CTimer::get("XIOS").suspend();
+  }
+
+  bool cxios_is_defined_file_time_units(file_Ptr file_hdl)
+  {
+     CTimer::get("XIOS").resume();
+     bool isDefined = file_hdl->time_units.hasInheritedValue();
+     CTimer::get("XIOS").suspend();
+     return isDefined;
+  }
+
+
+  void cxios_set_file_timeseries(file_Ptr file_hdl, const char * timeseries, int timeseries_size)
+  {
+    std::string timeseries_str;
+    if (!cstr2string(timeseries, timeseries_size, timeseries_str)) return;
+    CTimer::get("XIOS").resume();
+    file_hdl->timeseries.fromString(timeseries_str);
+    CTimer::get("XIOS").suspend();
+  }
+
+  void cxios_get_file_timeseries(file_Ptr file_hdl, char * timeseries, int timeseries_size)
+  {
+    CTimer::get("XIOS").resume();
+    if (!string_copy(file_hdl->timeseries.getInheritedStringValue(), timeseries, timeseries_size))
+      ERROR("void cxios_get_file_timeseries(file_Ptr file_hdl, char * timeseries, int timeseries_size)", << "Input string is too short");
+    CTimer::get("XIOS").suspend();
+  }
+
+  bool cxios_is_defined_file_timeseries(file_Ptr file_hdl)
+  {
+     CTimer::get("XIOS").resume();
+     bool isDefined = file_hdl->timeseries.hasInheritedValue();
+     CTimer::get("XIOS").suspend();
+     return isDefined;
+  }
+
+
+  void cxios_set_file_ts_prefix(file_Ptr file_hdl, const char * ts_prefix, int ts_prefix_size)
+  {
+    std::string ts_prefix_str;
+    if (!cstr2string(ts_prefix, ts_prefix_size, ts_prefix_str)) return;
+    CTimer::get("XIOS").resume();
+    file_hdl->ts_prefix.setValue(ts_prefix_str);
+    CTimer::get("XIOS").suspend();
+  }
+
+  void cxios_get_file_ts_prefix(file_Ptr file_hdl, char * ts_prefix, int ts_prefix_size)
+  {
+    CTimer::get("XIOS").resume();
+    if (!string_copy(file_hdl->ts_prefix.getInheritedValue(), ts_prefix, ts_prefix_size))
+      ERROR("void cxios_get_file_ts_prefix(file_Ptr file_hdl, char * ts_prefix, int ts_prefix_size)", << "Input string is too short");
+    CTimer::get("XIOS").suspend();
+  }
+
+  bool cxios_is_defined_file_ts_prefix(file_Ptr file_hdl)
+  {
+     CTimer::get("XIOS").resume();
+     bool isDefined = file_hdl->ts_prefix.hasInheritedValue();
+     CTimer::get("XIOS").suspend();
+     return isDefined;
+  }
+
+
+  void cxios_set_file_type(file_Ptr file_hdl, const char * type, int type_size)
+  {
+    std::string type_str;
+    if (!cstr2string(type, type_size, type_str)) return;
+    CTimer::get("XIOS").resume();
+    file_hdl->type.fromString(type_str);
+    CTimer::get("XIOS").suspend();
+  }
+
+  void cxios_get_file_type(file_Ptr file_hdl, char * type, int type_size)
+  {
+    CTimer::get("XIOS").resume();
+    if (!string_copy(file_hdl->type.getInheritedStringValue(), type, type_size))
+      ERROR("void cxios_get_file_type(file_Ptr file_hdl, char * type, int type_size)", << "Input string is too short");
+    CTimer::get("XIOS").suspend();
+  }
+
+  bool cxios_is_defined_file_type(file_Ptr file_hdl)
+  {
+     CTimer::get("XIOS").resume();
+     bool isDefined = file_hdl->type.hasInheritedValue();
+     CTimer::get("XIOS").suspend();
+     return isDefined;
+  }
+
+
+  void cxios_set_file_uuid_format(file_Ptr file_hdl, const char * uuid_format, int uuid_format_size)
+  {
+    std::string uuid_format_str;
+    if (!cstr2string(uuid_format, uuid_format_size, uuid_format_str)) return;
+    CTimer::get("XIOS").resume();
+    file_hdl->uuid_format.setValue(uuid_format_str);
+    CTimer::get("XIOS").suspend();
+  }
+
+  void cxios_get_file_uuid_format(file_Ptr file_hdl, char * uuid_format, int uuid_format_size)
+  {
+    CTimer::get("XIOS").resume();
+    if (!string_copy(file_hdl->uuid_format.getInheritedValue(), uuid_format, uuid_format_size))
+      ERROR("void cxios_get_file_uuid_format(file_Ptr file_hdl, char * uuid_format, int uuid_format_size)", << "Input string is too short");
+    CTimer::get("XIOS").suspend();
+  }
+
+  bool cxios_is_defined_file_uuid_format(file_Ptr file_hdl)
+  {
+     CTimer::get("XIOS").resume();
+     bool isDefined = file_hdl->uuid_format.hasInheritedValue();
+     CTimer::get("XIOS").suspend();
+     return isDefined;
+  }
+
+
+  void cxios_set_file_uuid_name(file_Ptr file_hdl, const char * uuid_name, int uuid_name_size)
+  {
+    std::string uuid_name_str;
+    if (!cstr2string(uuid_name, uuid_name_size, uuid_name_str)) return;
+    CTimer::get("XIOS").resume();
+    file_hdl->uuid_name.setValue(uuid_name_str);
+    CTimer::get("XIOS").suspend();
+  }
+
+  void cxios_get_file_uuid_name(file_Ptr file_hdl, char * uuid_name, int uuid_name_size)
+  {
+    CTimer::get("XIOS").resume();
+    if (!string_copy(file_hdl->uuid_name.getInheritedValue(), uuid_name, uuid_name_size))
+      ERROR("void cxios_get_file_uuid_name(file_Ptr file_hdl, char * uuid_name, int uuid_name_size)", << "Input string is too short");
+    CTimer::get("XIOS").suspend();
+  }
+
+  bool cxios_is_defined_file_uuid_name(file_Ptr file_hdl)
+  {
+     CTimer::get("XIOS").resume();
+     bool isDefined = file_hdl->uuid_name.hasInheritedValue();
+     CTimer::get("XIOS").suspend();
+     return isDefined;
+  }
+}
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/c_attr/icfilegroup_attr.cpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/c_attr/icfilegroup_attr.cpp	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/c_attr/icfilegroup_attr.cpp	(revision 1749)
@@ -0,0 +1,963 @@
+/* ************************************************************************** *
+ *               Interface auto generated - do not modify                     *
+ * ************************************************************************** */
+
+#include <boost/multi_array.hpp>
+#include "xios.hpp"
+#include "attribute_template.hpp"
+#include "object_template.hpp"
+#include "group_template.hpp"
+#include "icutil.hpp"
+#include "icdate.hpp"
+#include "timer.hpp"
+#include "node_type.hpp"
+
+extern "C"
+{
+  typedef xios::CFileGroup* filegroup_Ptr;
+
+  void cxios_set_filegroup_append(filegroup_Ptr filegroup_hdl, bool append)
+  {
+    CTimer::get("XIOS").resume();
+    filegroup_hdl->append.setValue(append);
+    CTimer::get("XIOS").suspend();
+  }
+
+  void cxios_get_filegroup_append(filegroup_Ptr filegroup_hdl, bool* append)
+  {
+    CTimer::get("XIOS").resume();
+    *append = filegroup_hdl->append.getInheritedValue();
+    CTimer::get("XIOS").suspend();
+  }
+
+  bool cxios_is_defined_filegroup_append(filegroup_Ptr filegroup_hdl)
+  {
+     CTimer::get("XIOS").resume();
+     bool isDefined = filegroup_hdl->append.hasInheritedValue();
+     CTimer::get("XIOS").suspend();
+     return isDefined;
+  }
+
+
+  void cxios_set_filegroup_comment(filegroup_Ptr filegroup_hdl, const char * comment, int comment_size)
+  {
+    std::string comment_str;
+    if (!cstr2string(comment, comment_size, comment_str)) return;
+    CTimer::get("XIOS").resume();
+    filegroup_hdl->comment.setValue(comment_str);
+    CTimer::get("XIOS").suspend();
+  }
+
+  void cxios_get_filegroup_comment(filegroup_Ptr filegroup_hdl, char * comment, int comment_size)
+  {
+    CTimer::get("XIOS").resume();
+    if (!string_copy(filegroup_hdl->comment.getInheritedValue(), comment, comment_size))
+      ERROR("void cxios_get_filegroup_comment(filegroup_Ptr filegroup_hdl, char * comment, int comment_size)", << "Input string is too short");
+    CTimer::get("XIOS").suspend();
+  }
+
+  bool cxios_is_defined_filegroup_comment(filegroup_Ptr filegroup_hdl)
+  {
+     CTimer::get("XIOS").resume();
+     bool isDefined = filegroup_hdl->comment.hasInheritedValue();
+     CTimer::get("XIOS").suspend();
+     return isDefined;
+  }
+
+
+  void cxios_set_filegroup_compression_level(filegroup_Ptr filegroup_hdl, int compression_level)
+  {
+    CTimer::get("XIOS").resume();
+    filegroup_hdl->compression_level.setValue(compression_level);
+    CTimer::get("XIOS").suspend();
+  }
+
+  void cxios_get_filegroup_compression_level(filegroup_Ptr filegroup_hdl, int* compression_level)
+  {
+    CTimer::get("XIOS").resume();
+    *compression_level = filegroup_hdl->compression_level.getInheritedValue();
+    CTimer::get("XIOS").suspend();
+  }
+
+  bool cxios_is_defined_filegroup_compression_level(filegroup_Ptr filegroup_hdl)
+  {
+     CTimer::get("XIOS").resume();
+     bool isDefined = filegroup_hdl->compression_level.hasInheritedValue();
+     CTimer::get("XIOS").suspend();
+     return isDefined;
+  }
+
+
+  void cxios_set_filegroup_convention(filegroup_Ptr filegroup_hdl, const char * convention, int convention_size)
+  {
+    std::string convention_str;
+    if (!cstr2string(convention, convention_size, convention_str)) return;
+    CTimer::get("XIOS").resume();
+    filegroup_hdl->convention.fromString(convention_str);
+    CTimer::get("XIOS").suspend();
+  }
+
+  void cxios_get_filegroup_convention(filegroup_Ptr filegroup_hdl, char * convention, int convention_size)
+  {
+    CTimer::get("XIOS").resume();
+    if (!string_copy(filegroup_hdl->convention.getInheritedStringValue(), convention, convention_size))
+      ERROR("void cxios_get_filegroup_convention(filegroup_Ptr filegroup_hdl, char * convention, int convention_size)", << "Input string is too short");
+    CTimer::get("XIOS").suspend();
+  }
+
+  bool cxios_is_defined_filegroup_convention(filegroup_Ptr filegroup_hdl)
+  {
+     CTimer::get("XIOS").resume();
+     bool isDefined = filegroup_hdl->convention.hasInheritedValue();
+     CTimer::get("XIOS").suspend();
+     return isDefined;
+  }
+
+
+  void cxios_set_filegroup_convention_str(filegroup_Ptr filegroup_hdl, const char * convention_str, int convention_str_size)
+  {
+    std::string convention_str_str;
+    if (!cstr2string(convention_str, convention_str_size, convention_str_str)) return;
+    CTimer::get("XIOS").resume();
+    filegroup_hdl->convention_str.setValue(convention_str_str);
+    CTimer::get("XIOS").suspend();
+  }
+
+  void cxios_get_filegroup_convention_str(filegroup_Ptr filegroup_hdl, char * convention_str, int convention_str_size)
+  {
+    CTimer::get("XIOS").resume();
+    if (!string_copy(filegroup_hdl->convention_str.getInheritedValue(), convention_str, convention_str_size))
+      ERROR("void cxios_get_filegroup_convention_str(filegroup_Ptr filegroup_hdl, char * convention_str, int convention_str_size)", << "Input string is too short");
+    CTimer::get("XIOS").suspend();
+  }
+
+  bool cxios_is_defined_filegroup_convention_str(filegroup_Ptr filegroup_hdl)
+  {
+     CTimer::get("XIOS").resume();
+     bool isDefined = filegroup_hdl->convention_str.hasInheritedValue();
+     CTimer::get("XIOS").suspend();
+     return isDefined;
+  }
+
+
+  void cxios_set_filegroup_cyclic(filegroup_Ptr filegroup_hdl, bool cyclic)
+  {
+    CTimer::get("XIOS").resume();
+    filegroup_hdl->cyclic.setValue(cyclic);
+    CTimer::get("XIOS").suspend();
+  }
+
+  void cxios_get_filegroup_cyclic(filegroup_Ptr filegroup_hdl, bool* cyclic)
+  {
+    CTimer::get("XIOS").resume();
+    *cyclic = filegroup_hdl->cyclic.getInheritedValue();
+    CTimer::get("XIOS").suspend();
+  }
+
+  bool cxios_is_defined_filegroup_cyclic(filegroup_Ptr filegroup_hdl)
+  {
+     CTimer::get("XIOS").resume();
+     bool isDefined = filegroup_hdl->cyclic.hasInheritedValue();
+     CTimer::get("XIOS").suspend();
+     return isDefined;
+  }
+
+
+  void cxios_set_filegroup_description(filegroup_Ptr filegroup_hdl, const char * description, int description_size)
+  {
+    std::string description_str;
+    if (!cstr2string(description, description_size, description_str)) return;
+    CTimer::get("XIOS").resume();
+    filegroup_hdl->description.setValue(description_str);
+    CTimer::get("XIOS").suspend();
+  }
+
+  void cxios_get_filegroup_description(filegroup_Ptr filegroup_hdl, char * description, int description_size)
+  {
+    CTimer::get("XIOS").resume();
+    if (!string_copy(filegroup_hdl->description.getInheritedValue(), description, description_size))
+      ERROR("void cxios_get_filegroup_description(filegroup_Ptr filegroup_hdl, char * description, int description_size)", << "Input string is too short");
+    CTimer::get("XIOS").suspend();
+  }
+
+  bool cxios_is_defined_filegroup_description(filegroup_Ptr filegroup_hdl)
+  {
+     CTimer::get("XIOS").resume();
+     bool isDefined = filegroup_hdl->description.hasInheritedValue();
+     CTimer::get("XIOS").suspend();
+     return isDefined;
+  }
+
+
+  void cxios_set_filegroup_enabled(filegroup_Ptr filegroup_hdl, bool enabled)
+  {
+    CTimer::get("XIOS").resume();
+    filegroup_hdl->enabled.setValue(enabled);
+    CTimer::get("XIOS").suspend();
+  }
+
+  void cxios_get_filegroup_enabled(filegroup_Ptr filegroup_hdl, bool* enabled)
+  {
+    CTimer::get("XIOS").resume();
+    *enabled = filegroup_hdl->enabled.getInheritedValue();
+    CTimer::get("XIOS").suspend();
+  }
+
+  bool cxios_is_defined_filegroup_enabled(filegroup_Ptr filegroup_hdl)
+  {
+     CTimer::get("XIOS").resume();
+     bool isDefined = filegroup_hdl->enabled.hasInheritedValue();
+     CTimer::get("XIOS").suspend();
+     return isDefined;
+  }
+
+
+  void cxios_set_filegroup_format(filegroup_Ptr filegroup_hdl, const char * format, int format_size)
+  {
+    std::string format_str;
+    if (!cstr2string(format, format_size, format_str)) return;
+    CTimer::get("XIOS").resume();
+    filegroup_hdl->format.fromString(format_str);
+    CTimer::get("XIOS").suspend();
+  }
+
+  void cxios_get_filegroup_format(filegroup_Ptr filegroup_hdl, char * format, int format_size)
+  {
+    CTimer::get("XIOS").resume();
+    if (!string_copy(filegroup_hdl->format.getInheritedStringValue(), format, format_size))
+      ERROR("void cxios_get_filegroup_format(filegroup_Ptr filegroup_hdl, char * format, int format_size)", << "Input string is too short");
+    CTimer::get("XIOS").suspend();
+  }
+
+  bool cxios_is_defined_filegroup_format(filegroup_Ptr filegroup_hdl)
+  {
+     CTimer::get("XIOS").resume();
+     bool isDefined = filegroup_hdl->format.hasInheritedValue();
+     CTimer::get("XIOS").suspend();
+     return isDefined;
+  }
+
+
+  void cxios_set_filegroup_group_ref(filegroup_Ptr filegroup_hdl, const char * group_ref, int group_ref_size)
+  {
+    std::string group_ref_str;
+    if (!cstr2string(group_ref, group_ref_size, group_ref_str)) return;
+    CTimer::get("XIOS").resume();
+    filegroup_hdl->group_ref.setValue(group_ref_str);
+    CTimer::get("XIOS").suspend();
+  }
+
+  void cxios_get_filegroup_group_ref(filegroup_Ptr filegroup_hdl, char * group_ref, int group_ref_size)
+  {
+    CTimer::get("XIOS").resume();
+    if (!string_copy(filegroup_hdl->group_ref.getInheritedValue(), group_ref, group_ref_size))
+      ERROR("void cxios_get_filegroup_group_ref(filegroup_Ptr filegroup_hdl, char * group_ref, int group_ref_size)", << "Input string is too short");
+    CTimer::get("XIOS").suspend();
+  }
+
+  bool cxios_is_defined_filegroup_group_ref(filegroup_Ptr filegroup_hdl)
+  {
+     CTimer::get("XIOS").resume();
+     bool isDefined = filegroup_hdl->group_ref.hasInheritedValue();
+     CTimer::get("XIOS").suspend();
+     return isDefined;
+  }
+
+
+  void cxios_set_filegroup_min_digits(filegroup_Ptr filegroup_hdl, int min_digits)
+  {
+    CTimer::get("XIOS").resume();
+    filegroup_hdl->min_digits.setValue(min_digits);
+    CTimer::get("XIOS").suspend();
+  }
+
+  void cxios_get_filegroup_min_digits(filegroup_Ptr filegroup_hdl, int* min_digits)
+  {
+    CTimer::get("XIOS").resume();
+    *min_digits = filegroup_hdl->min_digits.getInheritedValue();
+    CTimer::get("XIOS").suspend();
+  }
+
+  bool cxios_is_defined_filegroup_min_digits(filegroup_Ptr filegroup_hdl)
+  {
+     CTimer::get("XIOS").resume();
+     bool isDefined = filegroup_hdl->min_digits.hasInheritedValue();
+     CTimer::get("XIOS").suspend();
+     return isDefined;
+  }
+
+
+  void cxios_set_filegroup_mode(filegroup_Ptr filegroup_hdl, const char * mode, int mode_size)
+  {
+    std::string mode_str;
+    if (!cstr2string(mode, mode_size, mode_str)) return;
+    CTimer::get("XIOS").resume();
+    filegroup_hdl->mode.fromString(mode_str);
+    CTimer::get("XIOS").suspend();
+  }
+
+  void cxios_get_filegroup_mode(filegroup_Ptr filegroup_hdl, char * mode, int mode_size)
+  {
+    CTimer::get("XIOS").resume();
+    if (!string_copy(filegroup_hdl->mode.getInheritedStringValue(), mode, mode_size))
+      ERROR("void cxios_get_filegroup_mode(filegroup_Ptr filegroup_hdl, char * mode, int mode_size)", << "Input string is too short");
+    CTimer::get("XIOS").suspend();
+  }
+
+  bool cxios_is_defined_filegroup_mode(filegroup_Ptr filegroup_hdl)
+  {
+     CTimer::get("XIOS").resume();
+     bool isDefined = filegroup_hdl->mode.hasInheritedValue();
+     CTimer::get("XIOS").suspend();
+     return isDefined;
+  }
+
+
+  void cxios_set_filegroup_name(filegroup_Ptr filegroup_hdl, const char * name, int name_size)
+  {
+    std::string name_str;
+    if (!cstr2string(name, name_size, name_str)) return;
+    CTimer::get("XIOS").resume();
+    filegroup_hdl->name.setValue(name_str);
+    CTimer::get("XIOS").suspend();
+  }
+
+  void cxios_get_filegroup_name(filegroup_Ptr filegroup_hdl, char * name, int name_size)
+  {
+    CTimer::get("XIOS").resume();
+    if (!string_copy(filegroup_hdl->name.getInheritedValue(), name, name_size))
+      ERROR("void cxios_get_filegroup_name(filegroup_Ptr filegroup_hdl, char * name, int name_size)", << "Input string is too short");
+    CTimer::get("XIOS").suspend();
+  }
+
+  bool cxios_is_defined_filegroup_name(filegroup_Ptr filegroup_hdl)
+  {
+     CTimer::get("XIOS").resume();
+     bool isDefined = filegroup_hdl->name.hasInheritedValue();
+     CTimer::get("XIOS").suspend();
+     return isDefined;
+  }
+
+
+  void cxios_set_filegroup_name_suffix(filegroup_Ptr filegroup_hdl, const char * name_suffix, int name_suffix_size)
+  {
+    std::string name_suffix_str;
+    if (!cstr2string(name_suffix, name_suffix_size, name_suffix_str)) return;
+    CTimer::get("XIOS").resume();
+    filegroup_hdl->name_suffix.setValue(name_suffix_str);
+    CTimer::get("XIOS").suspend();
+  }
+
+  void cxios_get_filegroup_name_suffix(filegroup_Ptr filegroup_hdl, char * name_suffix, int name_suffix_size)
+  {
+    CTimer::get("XIOS").resume();
+    if (!string_copy(filegroup_hdl->name_suffix.getInheritedValue(), name_suffix, name_suffix_size))
+      ERROR("void cxios_get_filegroup_name_suffix(filegroup_Ptr filegroup_hdl, char * name_suffix, int name_suffix_size)", << "Input string is too short");
+    CTimer::get("XIOS").suspend();
+  }
+
+  bool cxios_is_defined_filegroup_name_suffix(filegroup_Ptr filegroup_hdl)
+  {
+     CTimer::get("XIOS").resume();
+     bool isDefined = filegroup_hdl->name_suffix.hasInheritedValue();
+     CTimer::get("XIOS").suspend();
+     return isDefined;
+  }
+
+
+  void cxios_set_filegroup_output_freq(filegroup_Ptr filegroup_hdl, cxios_duration output_freq_c)
+  {
+    CTimer::get("XIOS").resume();
+    filegroup_hdl->output_freq.allocate();
+    CDuration& output_freq = filegroup_hdl->output_freq.get();
+    output_freq.year = output_freq_c.year;
+    output_freq.month = output_freq_c.month;
+    output_freq.day = output_freq_c.day;
+    output_freq.hour = output_freq_c.hour;
+    output_freq.minute = output_freq_c.minute;
+    output_freq.second = output_freq_c.second;
+    output_freq.timestep = output_freq_c.timestep;
+    CTimer::get("XIOS").suspend();
+  }
+
+  void cxios_get_filegroup_output_freq(filegroup_Ptr filegroup_hdl, cxios_duration* output_freq_c)
+  {
+    CTimer::get("XIOS").resume();
+    CDuration output_freq = filegroup_hdl->output_freq.getInheritedValue();
+    output_freq_c->year = output_freq.year;
+    output_freq_c->month = output_freq.month;
+    output_freq_c->day = output_freq.day;
+    output_freq_c->hour = output_freq.hour;
+    output_freq_c->minute = output_freq.minute;
+    output_freq_c->second = output_freq.second;
+    output_freq_c->timestep = output_freq.timestep;
+    CTimer::get("XIOS").suspend();
+  }
+
+  bool cxios_is_defined_filegroup_output_freq(filegroup_Ptr filegroup_hdl)
+  {
+     CTimer::get("XIOS").resume();
+     bool isDefined = filegroup_hdl->output_freq.hasInheritedValue();
+     CTimer::get("XIOS").suspend();
+     return isDefined;
+  }
+
+
+  void cxios_set_filegroup_output_level(filegroup_Ptr filegroup_hdl, int output_level)
+  {
+    CTimer::get("XIOS").resume();
+    filegroup_hdl->output_level.setValue(output_level);
+    CTimer::get("XIOS").suspend();
+  }
+
+  void cxios_get_filegroup_output_level(filegroup_Ptr filegroup_hdl, int* output_level)
+  {
+    CTimer::get("XIOS").resume();
+    *output_level = filegroup_hdl->output_level.getInheritedValue();
+    CTimer::get("XIOS").suspend();
+  }
+
+  bool cxios_is_defined_filegroup_output_level(filegroup_Ptr filegroup_hdl)
+  {
+     CTimer::get("XIOS").resume();
+     bool isDefined = filegroup_hdl->output_level.hasInheritedValue();
+     CTimer::get("XIOS").suspend();
+     return isDefined;
+  }
+
+
+  void cxios_set_filegroup_par_access(filegroup_Ptr filegroup_hdl, const char * par_access, int par_access_size)
+  {
+    std::string par_access_str;
+    if (!cstr2string(par_access, par_access_size, par_access_str)) return;
+    CTimer::get("XIOS").resume();
+    filegroup_hdl->par_access.fromString(par_access_str);
+    CTimer::get("XIOS").suspend();
+  }
+
+  void cxios_get_filegroup_par_access(filegroup_Ptr filegroup_hdl, char * par_access, int par_access_size)
+  {
+    CTimer::get("XIOS").resume();
+    if (!string_copy(filegroup_hdl->par_access.getInheritedStringValue(), par_access, par_access_size))
+      ERROR("void cxios_get_filegroup_par_access(filegroup_Ptr filegroup_hdl, char * par_access, int par_access_size)", << "Input string is too short");
+    CTimer::get("XIOS").suspend();
+  }
+
+  bool cxios_is_defined_filegroup_par_access(filegroup_Ptr filegroup_hdl)
+  {
+     CTimer::get("XIOS").resume();
+     bool isDefined = filegroup_hdl->par_access.hasInheritedValue();
+     CTimer::get("XIOS").suspend();
+     return isDefined;
+  }
+
+
+  void cxios_set_filegroup_read_metadata_par(filegroup_Ptr filegroup_hdl, bool read_metadata_par)
+  {
+    CTimer::get("XIOS").resume();
+    filegroup_hdl->read_metadata_par.setValue(read_metadata_par);
+    CTimer::get("XIOS").suspend();
+  }
+
+  void cxios_get_filegroup_read_metadata_par(filegroup_Ptr filegroup_hdl, bool* read_metadata_par)
+  {
+    CTimer::get("XIOS").resume();
+    *read_metadata_par = filegroup_hdl->read_metadata_par.getInheritedValue();
+    CTimer::get("XIOS").suspend();
+  }
+
+  bool cxios_is_defined_filegroup_read_metadata_par(filegroup_Ptr filegroup_hdl)
+  {
+     CTimer::get("XIOS").resume();
+     bool isDefined = filegroup_hdl->read_metadata_par.hasInheritedValue();
+     CTimer::get("XIOS").suspend();
+     return isDefined;
+  }
+
+
+  void cxios_set_filegroup_record_offset(filegroup_Ptr filegroup_hdl, int record_offset)
+  {
+    CTimer::get("XIOS").resume();
+    filegroup_hdl->record_offset.setValue(record_offset);
+    CTimer::get("XIOS").suspend();
+  }
+
+  void cxios_get_filegroup_record_offset(filegroup_Ptr filegroup_hdl, int* record_offset)
+  {
+    CTimer::get("XIOS").resume();
+    *record_offset = filegroup_hdl->record_offset.getInheritedValue();
+    CTimer::get("XIOS").suspend();
+  }
+
+  bool cxios_is_defined_filegroup_record_offset(filegroup_Ptr filegroup_hdl)
+  {
+     CTimer::get("XIOS").resume();
+     bool isDefined = filegroup_hdl->record_offset.hasInheritedValue();
+     CTimer::get("XIOS").suspend();
+     return isDefined;
+  }
+
+
+  void cxios_set_filegroup_split_end_offset(filegroup_Ptr filegroup_hdl, cxios_duration split_end_offset_c)
+  {
+    CTimer::get("XIOS").resume();
+    filegroup_hdl->split_end_offset.allocate();
+    CDuration& split_end_offset = filegroup_hdl->split_end_offset.get();
+    split_end_offset.year = split_end_offset_c.year;
+    split_end_offset.month = split_end_offset_c.month;
+    split_end_offset.day = split_end_offset_c.day;
+    split_end_offset.hour = split_end_offset_c.hour;
+    split_end_offset.minute = split_end_offset_c.minute;
+    split_end_offset.second = split_end_offset_c.second;
+    split_end_offset.timestep = split_end_offset_c.timestep;
+    CTimer::get("XIOS").suspend();
+  }
+
+  void cxios_get_filegroup_split_end_offset(filegroup_Ptr filegroup_hdl, cxios_duration* split_end_offset_c)
+  {
+    CTimer::get("XIOS").resume();
+    CDuration split_end_offset = filegroup_hdl->split_end_offset.getInheritedValue();
+    split_end_offset_c->year = split_end_offset.year;
+    split_end_offset_c->month = split_end_offset.month;
+    split_end_offset_c->day = split_end_offset.day;
+    split_end_offset_c->hour = split_end_offset.hour;
+    split_end_offset_c->minute = split_end_offset.minute;
+    split_end_offset_c->second = split_end_offset.second;
+    split_end_offset_c->timestep = split_end_offset.timestep;
+    CTimer::get("XIOS").suspend();
+  }
+
+  bool cxios_is_defined_filegroup_split_end_offset(filegroup_Ptr filegroup_hdl)
+  {
+     CTimer::get("XIOS").resume();
+     bool isDefined = filegroup_hdl->split_end_offset.hasInheritedValue();
+     CTimer::get("XIOS").suspend();
+     return isDefined;
+  }
+
+
+  void cxios_set_filegroup_split_freq(filegroup_Ptr filegroup_hdl, cxios_duration split_freq_c)
+  {
+    CTimer::get("XIOS").resume();
+    filegroup_hdl->split_freq.allocate();
+    CDuration& split_freq = filegroup_hdl->split_freq.get();
+    split_freq.year = split_freq_c.year;
+    split_freq.month = split_freq_c.month;
+    split_freq.day = split_freq_c.day;
+    split_freq.hour = split_freq_c.hour;
+    split_freq.minute = split_freq_c.minute;
+    split_freq.second = split_freq_c.second;
+    split_freq.timestep = split_freq_c.timestep;
+    CTimer::get("XIOS").suspend();
+  }
+
+  void cxios_get_filegroup_split_freq(filegroup_Ptr filegroup_hdl, cxios_duration* split_freq_c)
+  {
+    CTimer::get("XIOS").resume();
+    CDuration split_freq = filegroup_hdl->split_freq.getInheritedValue();
+    split_freq_c->year = split_freq.year;
+    split_freq_c->month = split_freq.month;
+    split_freq_c->day = split_freq.day;
+    split_freq_c->hour = split_freq.hour;
+    split_freq_c->minute = split_freq.minute;
+    split_freq_c->second = split_freq.second;
+    split_freq_c->timestep = split_freq.timestep;
+    CTimer::get("XIOS").suspend();
+  }
+
+  bool cxios_is_defined_filegroup_split_freq(filegroup_Ptr filegroup_hdl)
+  {
+     CTimer::get("XIOS").resume();
+     bool isDefined = filegroup_hdl->split_freq.hasInheritedValue();
+     CTimer::get("XIOS").suspend();
+     return isDefined;
+  }
+
+
+  void cxios_set_filegroup_split_freq_format(filegroup_Ptr filegroup_hdl, const char * split_freq_format, int split_freq_format_size)
+  {
+    std::string split_freq_format_str;
+    if (!cstr2string(split_freq_format, split_freq_format_size, split_freq_format_str)) return;
+    CTimer::get("XIOS").resume();
+    filegroup_hdl->split_freq_format.setValue(split_freq_format_str);
+    CTimer::get("XIOS").suspend();
+  }
+
+  void cxios_get_filegroup_split_freq_format(filegroup_Ptr filegroup_hdl, char * split_freq_format, int split_freq_format_size)
+  {
+    CTimer::get("XIOS").resume();
+    if (!string_copy(filegroup_hdl->split_freq_format.getInheritedValue(), split_freq_format, split_freq_format_size))
+      ERROR("void cxios_get_filegroup_split_freq_format(filegroup_Ptr filegroup_hdl, char * split_freq_format, int split_freq_format_size)", << "Input string is too short");
+    CTimer::get("XIOS").suspend();
+  }
+
+  bool cxios_is_defined_filegroup_split_freq_format(filegroup_Ptr filegroup_hdl)
+  {
+     CTimer::get("XIOS").resume();
+     bool isDefined = filegroup_hdl->split_freq_format.hasInheritedValue();
+     CTimer::get("XIOS").suspend();
+     return isDefined;
+  }
+
+
+  void cxios_set_filegroup_split_last_date(filegroup_Ptr filegroup_hdl, const char * split_last_date, int split_last_date_size)
+  {
+    std::string split_last_date_str;
+    if (!cstr2string(split_last_date, split_last_date_size, split_last_date_str)) return;
+    CTimer::get("XIOS").resume();
+    filegroup_hdl->split_last_date.setValue(split_last_date_str);
+    CTimer::get("XIOS").suspend();
+  }
+
+  void cxios_get_filegroup_split_last_date(filegroup_Ptr filegroup_hdl, char * split_last_date, int split_last_date_size)
+  {
+    CTimer::get("XIOS").resume();
+    if (!string_copy(filegroup_hdl->split_last_date.getInheritedValue(), split_last_date, split_last_date_size))
+      ERROR("void cxios_get_filegroup_split_last_date(filegroup_Ptr filegroup_hdl, char * split_last_date, int split_last_date_size)", << "Input string is too short");
+    CTimer::get("XIOS").suspend();
+  }
+
+  bool cxios_is_defined_filegroup_split_last_date(filegroup_Ptr filegroup_hdl)
+  {
+     CTimer::get("XIOS").resume();
+     bool isDefined = filegroup_hdl->split_last_date.hasInheritedValue();
+     CTimer::get("XIOS").suspend();
+     return isDefined;
+  }
+
+
+  void cxios_set_filegroup_split_start_offset(filegroup_Ptr filegroup_hdl, cxios_duration split_start_offset_c)
+  {
+    CTimer::get("XIOS").resume();
+    filegroup_hdl->split_start_offset.allocate();
+    CDuration& split_start_offset = filegroup_hdl->split_start_offset.get();
+    split_start_offset.year = split_start_offset_c.year;
+    split_start_offset.month = split_start_offset_c.month;
+    split_start_offset.day = split_start_offset_c.day;
+    split_start_offset.hour = split_start_offset_c.hour;
+    split_start_offset.minute = split_start_offset_c.minute;
+    split_start_offset.second = split_start_offset_c.second;
+    split_start_offset.timestep = split_start_offset_c.timestep;
+    CTimer::get("XIOS").suspend();
+  }
+
+  void cxios_get_filegroup_split_start_offset(filegroup_Ptr filegroup_hdl, cxios_duration* split_start_offset_c)
+  {
+    CTimer::get("XIOS").resume();
+    CDuration split_start_offset = filegroup_hdl->split_start_offset.getInheritedValue();
+    split_start_offset_c->year = split_start_offset.year;
+    split_start_offset_c->month = split_start_offset.month;
+    split_start_offset_c->day = split_start_offset.day;
+    split_start_offset_c->hour = split_start_offset.hour;
+    split_start_offset_c->minute = split_start_offset.minute;
+    split_start_offset_c->second = split_start_offset.second;
+    split_start_offset_c->timestep = split_start_offset.timestep;
+    CTimer::get("XIOS").suspend();
+  }
+
+  bool cxios_is_defined_filegroup_split_start_offset(filegroup_Ptr filegroup_hdl)
+  {
+     CTimer::get("XIOS").resume();
+     bool isDefined = filegroup_hdl->split_start_offset.hasInheritedValue();
+     CTimer::get("XIOS").suspend();
+     return isDefined;
+  }
+
+
+  void cxios_set_filegroup_sync_freq(filegroup_Ptr filegroup_hdl, cxios_duration sync_freq_c)
+  {
+    CTimer::get("XIOS").resume();
+    filegroup_hdl->sync_freq.allocate();
+    CDuration& sync_freq = filegroup_hdl->sync_freq.get();
+    sync_freq.year = sync_freq_c.year;
+    sync_freq.month = sync_freq_c.month;
+    sync_freq.day = sync_freq_c.day;
+    sync_freq.hour = sync_freq_c.hour;
+    sync_freq.minute = sync_freq_c.minute;
+    sync_freq.second = sync_freq_c.second;
+    sync_freq.timestep = sync_freq_c.timestep;
+    CTimer::get("XIOS").suspend();
+  }
+
+  void cxios_get_filegroup_sync_freq(filegroup_Ptr filegroup_hdl, cxios_duration* sync_freq_c)
+  {
+    CTimer::get("XIOS").resume();
+    CDuration sync_freq = filegroup_hdl->sync_freq.getInheritedValue();
+    sync_freq_c->year = sync_freq.year;
+    sync_freq_c->month = sync_freq.month;
+    sync_freq_c->day = sync_freq.day;
+    sync_freq_c->hour = sync_freq.hour;
+    sync_freq_c->minute = sync_freq.minute;
+    sync_freq_c->second = sync_freq.second;
+    sync_freq_c->timestep = sync_freq.timestep;
+    CTimer::get("XIOS").suspend();
+  }
+
+  bool cxios_is_defined_filegroup_sync_freq(filegroup_Ptr filegroup_hdl)
+  {
+     CTimer::get("XIOS").resume();
+     bool isDefined = filegroup_hdl->sync_freq.hasInheritedValue();
+     CTimer::get("XIOS").suspend();
+     return isDefined;
+  }
+
+
+  void cxios_set_filegroup_time_counter(filegroup_Ptr filegroup_hdl, const char * time_counter, int time_counter_size)
+  {
+    std::string time_counter_str;
+    if (!cstr2string(time_counter, time_counter_size, time_counter_str)) return;
+    CTimer::get("XIOS").resume();
+    filegroup_hdl->time_counter.fromString(time_counter_str);
+    CTimer::get("XIOS").suspend();
+  }
+
+  void cxios_get_filegroup_time_counter(filegroup_Ptr filegroup_hdl, char * time_counter, int time_counter_size)
+  {
+    CTimer::get("XIOS").resume();
+    if (!string_copy(filegroup_hdl->time_counter.getInheritedStringValue(), time_counter, time_counter_size))
+      ERROR("void cxios_get_filegroup_time_counter(filegroup_Ptr filegroup_hdl, char * time_counter, int time_counter_size)", << "Input string is too short");
+    CTimer::get("XIOS").suspend();
+  }
+
+  bool cxios_is_defined_filegroup_time_counter(filegroup_Ptr filegroup_hdl)
+  {
+     CTimer::get("XIOS").resume();
+     bool isDefined = filegroup_hdl->time_counter.hasInheritedValue();
+     CTimer::get("XIOS").suspend();
+     return isDefined;
+  }
+
+
+  void cxios_set_filegroup_time_counter_name(filegroup_Ptr filegroup_hdl, const char * time_counter_name, int time_counter_name_size)
+  {
+    std::string time_counter_name_str;
+    if (!cstr2string(time_counter_name, time_counter_name_size, time_counter_name_str)) return;
+    CTimer::get("XIOS").resume();
+    filegroup_hdl->time_counter_name.setValue(time_counter_name_str);
+    CTimer::get("XIOS").suspend();
+  }
+
+  void cxios_get_filegroup_time_counter_name(filegroup_Ptr filegroup_hdl, char * time_counter_name, int time_counter_name_size)
+  {
+    CTimer::get("XIOS").resume();
+    if (!string_copy(filegroup_hdl->time_counter_name.getInheritedValue(), time_counter_name, time_counter_name_size))
+      ERROR("void cxios_get_filegroup_time_counter_name(filegroup_Ptr filegroup_hdl, char * time_counter_name, int time_counter_name_size)", << "Input string is too short");
+    CTimer::get("XIOS").suspend();
+  }
+
+  bool cxios_is_defined_filegroup_time_counter_name(filegroup_Ptr filegroup_hdl)
+  {
+     CTimer::get("XIOS").resume();
+     bool isDefined = filegroup_hdl->time_counter_name.hasInheritedValue();
+     CTimer::get("XIOS").suspend();
+     return isDefined;
+  }
+
+
+  void cxios_set_filegroup_time_stamp_format(filegroup_Ptr filegroup_hdl, const char * time_stamp_format, int time_stamp_format_size)
+  {
+    std::string time_stamp_format_str;
+    if (!cstr2string(time_stamp_format, time_stamp_format_size, time_stamp_format_str)) return;
+    CTimer::get("XIOS").resume();
+    filegroup_hdl->time_stamp_format.setValue(time_stamp_format_str);
+    CTimer::get("XIOS").suspend();
+  }
+
+  void cxios_get_filegroup_time_stamp_format(filegroup_Ptr filegroup_hdl, char * time_stamp_format, int time_stamp_format_size)
+  {
+    CTimer::get("XIOS").resume();
+    if (!string_copy(filegroup_hdl->time_stamp_format.getInheritedValue(), time_stamp_format, time_stamp_format_size))
+      ERROR("void cxios_get_filegroup_time_stamp_format(filegroup_Ptr filegroup_hdl, char * time_stamp_format, int time_stamp_format_size)", << "Input string is too short");
+    CTimer::get("XIOS").suspend();
+  }
+
+  bool cxios_is_defined_filegroup_time_stamp_format(filegroup_Ptr filegroup_hdl)
+  {
+     CTimer::get("XIOS").resume();
+     bool isDefined = filegroup_hdl->time_stamp_format.hasInheritedValue();
+     CTimer::get("XIOS").suspend();
+     return isDefined;
+  }
+
+
+  void cxios_set_filegroup_time_stamp_name(filegroup_Ptr filegroup_hdl, const char * time_stamp_name, int time_stamp_name_size)
+  {
+    std::string time_stamp_name_str;
+    if (!cstr2string(time_stamp_name, time_stamp_name_size, time_stamp_name_str)) return;
+    CTimer::get("XIOS").resume();
+    filegroup_hdl->time_stamp_name.setValue(time_stamp_name_str);
+    CTimer::get("XIOS").suspend();
+  }
+
+  void cxios_get_filegroup_time_stamp_name(filegroup_Ptr filegroup_hdl, char * time_stamp_name, int time_stamp_name_size)
+  {
+    CTimer::get("XIOS").resume();
+    if (!string_copy(filegroup_hdl->time_stamp_name.getInheritedValue(), time_stamp_name, time_stamp_name_size))
+      ERROR("void cxios_get_filegroup_time_stamp_name(filegroup_Ptr filegroup_hdl, char * time_stamp_name, int time_stamp_name_size)", << "Input string is too short");
+    CTimer::get("XIOS").suspend();
+  }
+
+  bool cxios_is_defined_filegroup_time_stamp_name(filegroup_Ptr filegroup_hdl)
+  {
+     CTimer::get("XIOS").resume();
+     bool isDefined = filegroup_hdl->time_stamp_name.hasInheritedValue();
+     CTimer::get("XIOS").suspend();
+     return isDefined;
+  }
+
+
+  void cxios_set_filegroup_time_units(filegroup_Ptr filegroup_hdl, const char * time_units, int time_units_size)
+  {
+    std::string time_units_str;
+    if (!cstr2string(time_units, time_units_size, time_units_str)) return;
+    CTimer::get("XIOS").resume();
+    filegroup_hdl->time_units.fromString(time_units_str);
+    CTimer::get("XIOS").suspend();
+  }
+
+  void cxios_get_filegroup_time_units(filegroup_Ptr filegroup_hdl, char * time_units, int time_units_size)
+  {
+    CTimer::get("XIOS").resume();
+    if (!string_copy(filegroup_hdl->time_units.getInheritedStringValue(), time_units, time_units_size))
+      ERROR("void cxios_get_filegroup_time_units(filegroup_Ptr filegroup_hdl, char * time_units, int time_units_size)", << "Input string is too short");
+    CTimer::get("XIOS").suspend();
+  }
+
+  bool cxios_is_defined_filegroup_time_units(filegroup_Ptr filegroup_hdl)
+  {
+     CTimer::get("XIOS").resume();
+     bool isDefined = filegroup_hdl->time_units.hasInheritedValue();
+     CTimer::get("XIOS").suspend();
+     return isDefined;
+  }
+
+
+  void cxios_set_filegroup_timeseries(filegroup_Ptr filegroup_hdl, const char * timeseries, int timeseries_size)
+  {
+    std::string timeseries_str;
+    if (!cstr2string(timeseries, timeseries_size, timeseries_str)) return;
+    CTimer::get("XIOS").resume();
+    filegroup_hdl->timeseries.fromString(timeseries_str);
+    CTimer::get("XIOS").suspend();
+  }
+
+  void cxios_get_filegroup_timeseries(filegroup_Ptr filegroup_hdl, char * timeseries, int timeseries_size)
+  {
+    CTimer::get("XIOS").resume();
+    if (!string_copy(filegroup_hdl->timeseries.getInheritedStringValue(), timeseries, timeseries_size))
+      ERROR("void cxios_get_filegroup_timeseries(filegroup_Ptr filegroup_hdl, char * timeseries, int timeseries_size)", << "Input string is too short");
+    CTimer::get("XIOS").suspend();
+  }
+
+  bool cxios_is_defined_filegroup_timeseries(filegroup_Ptr filegroup_hdl)
+  {
+     CTimer::get("XIOS").resume();
+     bool isDefined = filegroup_hdl->timeseries.hasInheritedValue();
+     CTimer::get("XIOS").suspend();
+     return isDefined;
+  }
+
+
+  void cxios_set_filegroup_ts_prefix(filegroup_Ptr filegroup_hdl, const char * ts_prefix, int ts_prefix_size)
+  {
+    std::string ts_prefix_str;
+    if (!cstr2string(ts_prefix, ts_prefix_size, ts_prefix_str)) return;
+    CTimer::get("XIOS").resume();
+    filegroup_hdl->ts_prefix.setValue(ts_prefix_str);
+    CTimer::get("XIOS").suspend();
+  }
+
+  void cxios_get_filegroup_ts_prefix(filegroup_Ptr filegroup_hdl, char * ts_prefix, int ts_prefix_size)
+  {
+    CTimer::get("XIOS").resume();
+    if (!string_copy(filegroup_hdl->ts_prefix.getInheritedValue(), ts_prefix, ts_prefix_size))
+      ERROR("void cxios_get_filegroup_ts_prefix(filegroup_Ptr filegroup_hdl, char * ts_prefix, int ts_prefix_size)", << "Input string is too short");
+    CTimer::get("XIOS").suspend();
+  }
+
+  bool cxios_is_defined_filegroup_ts_prefix(filegroup_Ptr filegroup_hdl)
+  {
+     CTimer::get("XIOS").resume();
+     bool isDefined = filegroup_hdl->ts_prefix.hasInheritedValue();
+     CTimer::get("XIOS").suspend();
+     return isDefined;
+  }
+
+
+  void cxios_set_filegroup_type(filegroup_Ptr filegroup_hdl, const char * type, int type_size)
+  {
+    std::string type_str;
+    if (!cstr2string(type, type_size, type_str)) return;
+    CTimer::get("XIOS").resume();
+    filegroup_hdl->type.fromString(type_str);
+    CTimer::get("XIOS").suspend();
+  }
+
+  void cxios_get_filegroup_type(filegroup_Ptr filegroup_hdl, char * type, int type_size)
+  {
+    CTimer::get("XIOS").resume();
+    if (!string_copy(filegroup_hdl->type.getInheritedStringValue(), type, type_size))
+      ERROR("void cxios_get_filegroup_type(filegroup_Ptr filegroup_hdl, char * type, int type_size)", << "Input string is too short");
+    CTimer::get("XIOS").suspend();
+  }
+
+  bool cxios_is_defined_filegroup_type(filegroup_Ptr filegroup_hdl)
+  {
+     CTimer::get("XIOS").resume();
+     bool isDefined = filegroup_hdl->type.hasInheritedValue();
+     CTimer::get("XIOS").suspend();
+     return isDefined;
+  }
+
+
+  void cxios_set_filegroup_uuid_format(filegroup_Ptr filegroup_hdl, const char * uuid_format, int uuid_format_size)
+  {
+    std::string uuid_format_str;
+    if (!cstr2string(uuid_format, uuid_format_size, uuid_format_str)) return;
+    CTimer::get("XIOS").resume();
+    filegroup_hdl->uuid_format.setValue(uuid_format_str);
+    CTimer::get("XIOS").suspend();
+  }
+
+  void cxios_get_filegroup_uuid_format(filegroup_Ptr filegroup_hdl, char * uuid_format, int uuid_format_size)
+  {
+    CTimer::get("XIOS").resume();
+    if (!string_copy(filegroup_hdl->uuid_format.getInheritedValue(), uuid_format, uuid_format_size))
+      ERROR("void cxios_get_filegroup_uuid_format(filegroup_Ptr filegroup_hdl, char * uuid_format, int uuid_format_size)", << "Input string is too short");
+    CTimer::get("XIOS").suspend();
+  }
+
+  bool cxios_is_defined_filegroup_uuid_format(filegroup_Ptr filegroup_hdl)
+  {
+     CTimer::get("XIOS").resume();
+     bool isDefined = filegroup_hdl->uuid_format.hasInheritedValue();
+     CTimer::get("XIOS").suspend();
+     return isDefined;
+  }
+
+
+  void cxios_set_filegroup_uuid_name(filegroup_Ptr filegroup_hdl, const char * uuid_name, int uuid_name_size)
+  {
+    std::string uuid_name_str;
+    if (!cstr2string(uuid_name, uuid_name_size, uuid_name_str)) return;
+    CTimer::get("XIOS").resume();
+    filegroup_hdl->uuid_name.setValue(uuid_name_str);
+    CTimer::get("XIOS").suspend();
+  }
+
+  void cxios_get_filegroup_uuid_name(filegroup_Ptr filegroup_hdl, char * uuid_name, int uuid_name_size)
+  {
+    CTimer::get("XIOS").resume();
+    if (!string_copy(filegroup_hdl->uuid_name.getInheritedValue(), uuid_name, uuid_name_size))
+      ERROR("void cxios_get_filegroup_uuid_name(filegroup_Ptr filegroup_hdl, char * uuid_name, int uuid_name_size)", << "Input string is too short");
+    CTimer::get("XIOS").suspend();
+  }
+
+  bool cxios_is_defined_filegroup_uuid_name(filegroup_Ptr filegroup_hdl)
+  {
+     CTimer::get("XIOS").resume();
+     bool isDefined = filegroup_hdl->uuid_name.hasInheritedValue();
+     CTimer::get("XIOS").suspend();
+     return isDefined;
+  }
+}
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/c_attr/icgenerate_rectilinear_domain_attr.cpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/c_attr/icgenerate_rectilinear_domain_attr.cpp	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/c_attr/icgenerate_rectilinear_domain_attr.cpp	(revision 1749)
@@ -0,0 +1,201 @@
+/* ************************************************************************** *
+ *               Interface auto generated - do not modify                     *
+ * ************************************************************************** */
+
+#include <boost/multi_array.hpp>
+#include "xios.hpp"
+#include "attribute_template.hpp"
+#include "object_template.hpp"
+#include "group_template.hpp"
+#include "icutil.hpp"
+#include "icdate.hpp"
+#include "timer.hpp"
+#include "node_type.hpp"
+
+extern "C"
+{
+  typedef xios::CGenerateRectilinearDomain* generate_rectilinear_domain_Ptr;
+
+  void cxios_set_generate_rectilinear_domain_bounds_lat_end(generate_rectilinear_domain_Ptr generate_rectilinear_domain_hdl, double bounds_lat_end)
+  {
+    CTimer::get("XIOS").resume();
+    generate_rectilinear_domain_hdl->bounds_lat_end.setValue(bounds_lat_end);
+    CTimer::get("XIOS").suspend();
+  }
+
+  void cxios_get_generate_rectilinear_domain_bounds_lat_end(generate_rectilinear_domain_Ptr generate_rectilinear_domain_hdl, double* bounds_lat_end)
+  {
+    CTimer::get("XIOS").resume();
+    *bounds_lat_end = generate_rectilinear_domain_hdl->bounds_lat_end.getInheritedValue();
+    CTimer::get("XIOS").suspend();
+  }
+
+  bool cxios_is_defined_generate_rectilinear_domain_bounds_lat_end(generate_rectilinear_domain_Ptr generate_rectilinear_domain_hdl)
+  {
+     CTimer::get("XIOS").resume();
+     bool isDefined = generate_rectilinear_domain_hdl->bounds_lat_end.hasInheritedValue();
+     CTimer::get("XIOS").suspend();
+     return isDefined;
+  }
+
+
+  void cxios_set_generate_rectilinear_domain_bounds_lat_start(generate_rectilinear_domain_Ptr generate_rectilinear_domain_hdl, double bounds_lat_start)
+  {
+    CTimer::get("XIOS").resume();
+    generate_rectilinear_domain_hdl->bounds_lat_start.setValue(bounds_lat_start);
+    CTimer::get("XIOS").suspend();
+  }
+
+  void cxios_get_generate_rectilinear_domain_bounds_lat_start(generate_rectilinear_domain_Ptr generate_rectilinear_domain_hdl, double* bounds_lat_start)
+  {
+    CTimer::get("XIOS").resume();
+    *bounds_lat_start = generate_rectilinear_domain_hdl->bounds_lat_start.getInheritedValue();
+    CTimer::get("XIOS").suspend();
+  }
+
+  bool cxios_is_defined_generate_rectilinear_domain_bounds_lat_start(generate_rectilinear_domain_Ptr generate_rectilinear_domain_hdl)
+  {
+     CTimer::get("XIOS").resume();
+     bool isDefined = generate_rectilinear_domain_hdl->bounds_lat_start.hasInheritedValue();
+     CTimer::get("XIOS").suspend();
+     return isDefined;
+  }
+
+
+  void cxios_set_generate_rectilinear_domain_bounds_lon_end(generate_rectilinear_domain_Ptr generate_rectilinear_domain_hdl, double bounds_lon_end)
+  {
+    CTimer::get("XIOS").resume();
+    generate_rectilinear_domain_hdl->bounds_lon_end.setValue(bounds_lon_end);
+    CTimer::get("XIOS").suspend();
+  }
+
+  void cxios_get_generate_rectilinear_domain_bounds_lon_end(generate_rectilinear_domain_Ptr generate_rectilinear_domain_hdl, double* bounds_lon_end)
+  {
+    CTimer::get("XIOS").resume();
+    *bounds_lon_end = generate_rectilinear_domain_hdl->bounds_lon_end.getInheritedValue();
+    CTimer::get("XIOS").suspend();
+  }
+
+  bool cxios_is_defined_generate_rectilinear_domain_bounds_lon_end(generate_rectilinear_domain_Ptr generate_rectilinear_domain_hdl)
+  {
+     CTimer::get("XIOS").resume();
+     bool isDefined = generate_rectilinear_domain_hdl->bounds_lon_end.hasInheritedValue();
+     CTimer::get("XIOS").suspend();
+     return isDefined;
+  }
+
+
+  void cxios_set_generate_rectilinear_domain_bounds_lon_start(generate_rectilinear_domain_Ptr generate_rectilinear_domain_hdl, double bounds_lon_start)
+  {
+    CTimer::get("XIOS").resume();
+    generate_rectilinear_domain_hdl->bounds_lon_start.setValue(bounds_lon_start);
+    CTimer::get("XIOS").suspend();
+  }
+
+  void cxios_get_generate_rectilinear_domain_bounds_lon_start(generate_rectilinear_domain_Ptr generate_rectilinear_domain_hdl, double* bounds_lon_start)
+  {
+    CTimer::get("XIOS").resume();
+    *bounds_lon_start = generate_rectilinear_domain_hdl->bounds_lon_start.getInheritedValue();
+    CTimer::get("XIOS").suspend();
+  }
+
+  bool cxios_is_defined_generate_rectilinear_domain_bounds_lon_start(generate_rectilinear_domain_Ptr generate_rectilinear_domain_hdl)
+  {
+     CTimer::get("XIOS").resume();
+     bool isDefined = generate_rectilinear_domain_hdl->bounds_lon_start.hasInheritedValue();
+     CTimer::get("XIOS").suspend();
+     return isDefined;
+  }
+
+
+  void cxios_set_generate_rectilinear_domain_lat_end(generate_rectilinear_domain_Ptr generate_rectilinear_domain_hdl, double lat_end)
+  {
+    CTimer::get("XIOS").resume();
+    generate_rectilinear_domain_hdl->lat_end.setValue(lat_end);
+    CTimer::get("XIOS").suspend();
+  }
+
+  void cxios_get_generate_rectilinear_domain_lat_end(generate_rectilinear_domain_Ptr generate_rectilinear_domain_hdl, double* lat_end)
+  {
+    CTimer::get("XIOS").resume();
+    *lat_end = generate_rectilinear_domain_hdl->lat_end.getInheritedValue();
+    CTimer::get("XIOS").suspend();
+  }
+
+  bool cxios_is_defined_generate_rectilinear_domain_lat_end(generate_rectilinear_domain_Ptr generate_rectilinear_domain_hdl)
+  {
+     CTimer::get("XIOS").resume();
+     bool isDefined = generate_rectilinear_domain_hdl->lat_end.hasInheritedValue();
+     CTimer::get("XIOS").suspend();
+     return isDefined;
+  }
+
+
+  void cxios_set_generate_rectilinear_domain_lat_start(generate_rectilinear_domain_Ptr generate_rectilinear_domain_hdl, double lat_start)
+  {
+    CTimer::get("XIOS").resume();
+    generate_rectilinear_domain_hdl->lat_start.setValue(lat_start);
+    CTimer::get("XIOS").suspend();
+  }
+
+  void cxios_get_generate_rectilinear_domain_lat_start(generate_rectilinear_domain_Ptr generate_rectilinear_domain_hdl, double* lat_start)
+  {
+    CTimer::get("XIOS").resume();
+    *lat_start = generate_rectilinear_domain_hdl->lat_start.getInheritedValue();
+    CTimer::get("XIOS").suspend();
+  }
+
+  bool cxios_is_defined_generate_rectilinear_domain_lat_start(generate_rectilinear_domain_Ptr generate_rectilinear_domain_hdl)
+  {
+     CTimer::get("XIOS").resume();
+     bool isDefined = generate_rectilinear_domain_hdl->lat_start.hasInheritedValue();
+     CTimer::get("XIOS").suspend();
+     return isDefined;
+  }
+
+
+  void cxios_set_generate_rectilinear_domain_lon_end(generate_rectilinear_domain_Ptr generate_rectilinear_domain_hdl, double lon_end)
+  {
+    CTimer::get("XIOS").resume();
+    generate_rectilinear_domain_hdl->lon_end.setValue(lon_end);
+    CTimer::get("XIOS").suspend();
+  }
+
+  void cxios_get_generate_rectilinear_domain_lon_end(generate_rectilinear_domain_Ptr generate_rectilinear_domain_hdl, double* lon_end)
+  {
+    CTimer::get("XIOS").resume();
+    *lon_end = generate_rectilinear_domain_hdl->lon_end.getInheritedValue();
+    CTimer::get("XIOS").suspend();
+  }
+
+  bool cxios_is_defined_generate_rectilinear_domain_lon_end(generate_rectilinear_domain_Ptr generate_rectilinear_domain_hdl)
+  {
+     CTimer::get("XIOS").resume();
+     bool isDefined = generate_rectilinear_domain_hdl->lon_end.hasInheritedValue();
+     CTimer::get("XIOS").suspend();
+     return isDefined;
+  }
+
+
+  void cxios_set_generate_rectilinear_domain_lon_start(generate_rectilinear_domain_Ptr generate_rectilinear_domain_hdl, double lon_start)
+  {
+    CTimer::get("XIOS").resume();
+    generate_rectilinear_domain_hdl->lon_start.setValue(lon_start);
+    CTimer::get("XIOS").suspend();
+  }
+
+  void cxios_get_generate_rectilinear_domain_lon_start(generate_rectilinear_domain_Ptr generate_rectilinear_domain_hdl, double* lon_start)
+  {
+    CTimer::get("XIOS").resume();
+    *lon_start = generate_rectilinear_domain_hdl->lon_start.getInheritedValue();
+    CTimer::get("XIOS").suspend();
+  }
+
+  bool cxios_is_defined_generate_rectilinear_domain_lon_start(generate_rectilinear_domain_Ptr generate_rectilinear_domain_hdl)
+  {
+     CTimer::get("XIOS").resume();
+     bool isDefined = generate_rectilinear_domain_hdl->lon_start.hasInheritedValue();
+     CTimer::get("XIOS").suspend();
+     return isDefined;
+  }
+}
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/c_attr/icgrid_attr.cpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/c_attr/icgrid_attr.cpp	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/c_attr/icgrid_attr.cpp	(revision 1749)
@@ -0,0 +1,295 @@
+/* ************************************************************************** *
+ *               Interface auto generated - do not modify                     *
+ * ************************************************************************** */
+
+#include <boost/multi_array.hpp>
+#include "xios.hpp"
+#include "attribute_template.hpp"
+#include "object_template.hpp"
+#include "group_template.hpp"
+#include "icutil.hpp"
+#include "icdate.hpp"
+#include "timer.hpp"
+#include "node_type.hpp"
+
+extern "C"
+{
+  typedef xios::CGrid* grid_Ptr;
+
+  void cxios_set_grid_comment(grid_Ptr grid_hdl, const char * comment, int comment_size)
+  {
+    std::string comment_str;
+    if (!cstr2string(comment, comment_size, comment_str)) return;
+    CTimer::get("XIOS").resume();
+    grid_hdl->comment.setValue(comment_str);
+    CTimer::get("XIOS").suspend();
+  }
+
+  void cxios_get_grid_comment(grid_Ptr grid_hdl, char * comment, int comment_size)
+  {
+    CTimer::get("XIOS").resume();
+    if (!string_copy(grid_hdl->comment.getInheritedValue(), comment, comment_size))
+      ERROR("void cxios_get_grid_comment(grid_Ptr grid_hdl, char * comment, int comment_size)", << "Input string is too short");
+    CTimer::get("XIOS").suspend();
+  }
+
+  bool cxios_is_defined_grid_comment(grid_Ptr grid_hdl)
+  {
+     CTimer::get("XIOS").resume();
+     bool isDefined = grid_hdl->comment.hasInheritedValue();
+     CTimer::get("XIOS").suspend();
+     return isDefined;
+  }
+
+
+  void cxios_set_grid_description(grid_Ptr grid_hdl, const char * description, int description_size)
+  {
+    std::string description_str;
+    if (!cstr2string(description, description_size, description_str)) return;
+    CTimer::get("XIOS").resume();
+    grid_hdl->description.setValue(description_str);
+    CTimer::get("XIOS").suspend();
+  }
+
+  void cxios_get_grid_description(grid_Ptr grid_hdl, char * description, int description_size)
+  {
+    CTimer::get("XIOS").resume();
+    if (!string_copy(grid_hdl->description.getInheritedValue(), description, description_size))
+      ERROR("void cxios_get_grid_description(grid_Ptr grid_hdl, char * description, int description_size)", << "Input string is too short");
+    CTimer::get("XIOS").suspend();
+  }
+
+  bool cxios_is_defined_grid_description(grid_Ptr grid_hdl)
+  {
+     CTimer::get("XIOS").resume();
+     bool isDefined = grid_hdl->description.hasInheritedValue();
+     CTimer::get("XIOS").suspend();
+     return isDefined;
+  }
+
+
+  void cxios_set_grid_mask_0d(grid_Ptr grid_hdl, bool* mask_0d, int* extent)
+  {
+    CTimer::get("XIOS").resume();
+    CArray<bool,1> tmp(mask_0d, shape(extent[0]), neverDeleteData);
+    grid_hdl->mask_0d.reference(tmp.copy());
+     CTimer::get("XIOS").suspend();
+  }
+
+  void cxios_get_grid_mask_0d(grid_Ptr grid_hdl, bool* mask_0d, int* extent)
+  {
+    CTimer::get("XIOS").resume();
+    CArray<bool,1> tmp(mask_0d, shape(extent[0]), neverDeleteData);
+    tmp=grid_hdl->mask_0d.getInheritedValue();
+     CTimer::get("XIOS").suspend();
+  }
+
+  bool cxios_is_defined_grid_mask_0d(grid_Ptr grid_hdl)
+  {
+     CTimer::get("XIOS").resume();
+     bool isDefined = grid_hdl->mask_0d.hasInheritedValue();
+     CTimer::get("XIOS").suspend();
+     return isDefined;
+  }
+
+
+  void cxios_set_grid_mask_1d(grid_Ptr grid_hdl, bool* mask_1d, int* extent)
+  {
+    CTimer::get("XIOS").resume();
+    CArray<bool,1> tmp(mask_1d, shape(extent[0]), neverDeleteData);
+    grid_hdl->mask_1d.reference(tmp.copy());
+     CTimer::get("XIOS").suspend();
+  }
+
+  void cxios_get_grid_mask_1d(grid_Ptr grid_hdl, bool* mask_1d, int* extent)
+  {
+    CTimer::get("XIOS").resume();
+    CArray<bool,1> tmp(mask_1d, shape(extent[0]), neverDeleteData);
+    tmp=grid_hdl->mask_1d.getInheritedValue();
+     CTimer::get("XIOS").suspend();
+  }
+
+  bool cxios_is_defined_grid_mask_1d(grid_Ptr grid_hdl)
+  {
+     CTimer::get("XIOS").resume();
+     bool isDefined = grid_hdl->mask_1d.hasInheritedValue();
+     CTimer::get("XIOS").suspend();
+     return isDefined;
+  }
+
+
+  void cxios_set_grid_mask_2d(grid_Ptr grid_hdl, bool* mask_2d, int* extent)
+  {
+    CTimer::get("XIOS").resume();
+    CArray<bool,2> tmp(mask_2d, shape(extent[0], extent[1]), neverDeleteData);
+    grid_hdl->mask_2d.reference(tmp.copy());
+     CTimer::get("XIOS").suspend();
+  }
+
+  void cxios_get_grid_mask_2d(grid_Ptr grid_hdl, bool* mask_2d, int* extent)
+  {
+    CTimer::get("XIOS").resume();
+    CArray<bool,2> tmp(mask_2d, shape(extent[0], extent[1]), neverDeleteData);
+    tmp=grid_hdl->mask_2d.getInheritedValue();
+     CTimer::get("XIOS").suspend();
+  }
+
+  bool cxios_is_defined_grid_mask_2d(grid_Ptr grid_hdl)
+  {
+     CTimer::get("XIOS").resume();
+     bool isDefined = grid_hdl->mask_2d.hasInheritedValue();
+     CTimer::get("XIOS").suspend();
+     return isDefined;
+  }
+
+
+  void cxios_set_grid_mask_3d(grid_Ptr grid_hdl, bool* mask_3d, int* extent)
+  {
+    CTimer::get("XIOS").resume();
+    CArray<bool,3> tmp(mask_3d, shape(extent[0], extent[1], extent[2]), neverDeleteData);
+    grid_hdl->mask_3d.reference(tmp.copy());
+     CTimer::get("XIOS").suspend();
+  }
+
+  void cxios_get_grid_mask_3d(grid_Ptr grid_hdl, bool* mask_3d, int* extent)
+  {
+    CTimer::get("XIOS").resume();
+    CArray<bool,3> tmp(mask_3d, shape(extent[0], extent[1], extent[2]), neverDeleteData);
+    tmp=grid_hdl->mask_3d.getInheritedValue();
+     CTimer::get("XIOS").suspend();
+  }
+
+  bool cxios_is_defined_grid_mask_3d(grid_Ptr grid_hdl)
+  {
+     CTimer::get("XIOS").resume();
+     bool isDefined = grid_hdl->mask_3d.hasInheritedValue();
+     CTimer::get("XIOS").suspend();
+     return isDefined;
+  }
+
+
+  void cxios_set_grid_mask_4d(grid_Ptr grid_hdl, bool* mask_4d, int* extent)
+  {
+    CTimer::get("XIOS").resume();
+    CArray<bool,4> tmp(mask_4d, shape(extent[0], extent[1], extent[2], extent[3]), neverDeleteData);
+    grid_hdl->mask_4d.reference(tmp.copy());
+     CTimer::get("XIOS").suspend();
+  }
+
+  void cxios_get_grid_mask_4d(grid_Ptr grid_hdl, bool* mask_4d, int* extent)
+  {
+    CTimer::get("XIOS").resume();
+    CArray<bool,4> tmp(mask_4d, shape(extent[0], extent[1], extent[2], extent[3]), neverDeleteData);
+    tmp=grid_hdl->mask_4d.getInheritedValue();
+     CTimer::get("XIOS").suspend();
+  }
+
+  bool cxios_is_defined_grid_mask_4d(grid_Ptr grid_hdl)
+  {
+     CTimer::get("XIOS").resume();
+     bool isDefined = grid_hdl->mask_4d.hasInheritedValue();
+     CTimer::get("XIOS").suspend();
+     return isDefined;
+  }
+
+
+  void cxios_set_grid_mask_5d(grid_Ptr grid_hdl, bool* mask_5d, int* extent)
+  {
+    CTimer::get("XIOS").resume();
+    CArray<bool,5> tmp(mask_5d, shape(extent[0], extent[1], extent[2], extent[3], extent[4]), neverDeleteData);
+    grid_hdl->mask_5d.reference(tmp.copy());
+     CTimer::get("XIOS").suspend();
+  }
+
+  void cxios_get_grid_mask_5d(grid_Ptr grid_hdl, bool* mask_5d, int* extent)
+  {
+    CTimer::get("XIOS").resume();
+    CArray<bool,5> tmp(mask_5d, shape(extent[0], extent[1], extent[2], extent[3], extent[4]), neverDeleteData);
+    tmp=grid_hdl->mask_5d.getInheritedValue();
+     CTimer::get("XIOS").suspend();
+  }
+
+  bool cxios_is_defined_grid_mask_5d(grid_Ptr grid_hdl)
+  {
+     CTimer::get("XIOS").resume();
+     bool isDefined = grid_hdl->mask_5d.hasInheritedValue();
+     CTimer::get("XIOS").suspend();
+     return isDefined;
+  }
+
+
+  void cxios_set_grid_mask_6d(grid_Ptr grid_hdl, bool* mask_6d, int* extent)
+  {
+    CTimer::get("XIOS").resume();
+    CArray<bool,6> tmp(mask_6d, shape(extent[0], extent[1], extent[2], extent[3], extent[4], extent[5]), neverDeleteData);
+    grid_hdl->mask_6d.reference(tmp.copy());
+     CTimer::get("XIOS").suspend();
+  }
+
+  void cxios_get_grid_mask_6d(grid_Ptr grid_hdl, bool* mask_6d, int* extent)
+  {
+    CTimer::get("XIOS").resume();
+    CArray<bool,6> tmp(mask_6d, shape(extent[0], extent[1], extent[2], extent[3], extent[4], extent[5]), neverDeleteData);
+    tmp=grid_hdl->mask_6d.getInheritedValue();
+     CTimer::get("XIOS").suspend();
+  }
+
+  bool cxios_is_defined_grid_mask_6d(grid_Ptr grid_hdl)
+  {
+     CTimer::get("XIOS").resume();
+     bool isDefined = grid_hdl->mask_6d.hasInheritedValue();
+     CTimer::get("XIOS").suspend();
+     return isDefined;
+  }
+
+
+  void cxios_set_grid_mask_7d(grid_Ptr grid_hdl, bool* mask_7d, int* extent)
+  {
+    CTimer::get("XIOS").resume();
+    CArray<bool,7> tmp(mask_7d, shape(extent[0], extent[1], extent[2], extent[3], extent[4], extent[5], extent[6]), neverDeleteData);
+    grid_hdl->mask_7d.reference(tmp.copy());
+     CTimer::get("XIOS").suspend();
+  }
+
+  void cxios_get_grid_mask_7d(grid_Ptr grid_hdl, bool* mask_7d, int* extent)
+  {
+    CTimer::get("XIOS").resume();
+    CArray<bool,7> tmp(mask_7d, shape(extent[0], extent[1], extent[2], extent[3], extent[4], extent[5], extent[6]), neverDeleteData);
+    tmp=grid_hdl->mask_7d.getInheritedValue();
+     CTimer::get("XIOS").suspend();
+  }
+
+  bool cxios_is_defined_grid_mask_7d(grid_Ptr grid_hdl)
+  {
+     CTimer::get("XIOS").resume();
+     bool isDefined = grid_hdl->mask_7d.hasInheritedValue();
+     CTimer::get("XIOS").suspend();
+     return isDefined;
+  }
+
+
+  void cxios_set_grid_name(grid_Ptr grid_hdl, const char * name, int name_size)
+  {
+    std::string name_str;
+    if (!cstr2string(name, name_size, name_str)) return;
+    CTimer::get("XIOS").resume();
+    grid_hdl->name.setValue(name_str);
+    CTimer::get("XIOS").suspend();
+  }
+
+  void cxios_get_grid_name(grid_Ptr grid_hdl, char * name, int name_size)
+  {
+    CTimer::get("XIOS").resume();
+    if (!string_copy(grid_hdl->name.getInheritedValue(), name, name_size))
+      ERROR("void cxios_get_grid_name(grid_Ptr grid_hdl, char * name, int name_size)", << "Input string is too short");
+    CTimer::get("XIOS").suspend();
+  }
+
+  bool cxios_is_defined_grid_name(grid_Ptr grid_hdl)
+  {
+     CTimer::get("XIOS").resume();
+     bool isDefined = grid_hdl->name.hasInheritedValue();
+     CTimer::get("XIOS").suspend();
+     return isDefined;
+  }
+}
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/c_attr/icgridgroup_attr.cpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/c_attr/icgridgroup_attr.cpp	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/c_attr/icgridgroup_attr.cpp	(revision 1749)
@@ -0,0 +1,321 @@
+/* ************************************************************************** *
+ *               Interface auto generated - do not modify                     *
+ * ************************************************************************** */
+
+#include <boost/multi_array.hpp>
+#include "xios.hpp"
+#include "attribute_template.hpp"
+#include "object_template.hpp"
+#include "group_template.hpp"
+#include "icutil.hpp"
+#include "icdate.hpp"
+#include "timer.hpp"
+#include "node_type.hpp"
+
+extern "C"
+{
+  typedef xios::CGridGroup* gridgroup_Ptr;
+
+  void cxios_set_gridgroup_comment(gridgroup_Ptr gridgroup_hdl, const char * comment, int comment_size)
+  {
+    std::string comment_str;
+    if (!cstr2string(comment, comment_size, comment_str)) return;
+    CTimer::get("XIOS").resume();
+    gridgroup_hdl->comment.setValue(comment_str);
+    CTimer::get("XIOS").suspend();
+  }
+
+  void cxios_get_gridgroup_comment(gridgroup_Ptr gridgroup_hdl, char * comment, int comment_size)
+  {
+    CTimer::get("XIOS").resume();
+    if (!string_copy(gridgroup_hdl->comment.getInheritedValue(), comment, comment_size))
+      ERROR("void cxios_get_gridgroup_comment(gridgroup_Ptr gridgroup_hdl, char * comment, int comment_size)", << "Input string is too short");
+    CTimer::get("XIOS").suspend();
+  }
+
+  bool cxios_is_defined_gridgroup_comment(gridgroup_Ptr gridgroup_hdl)
+  {
+     CTimer::get("XIOS").resume();
+     bool isDefined = gridgroup_hdl->comment.hasInheritedValue();
+     CTimer::get("XIOS").suspend();
+     return isDefined;
+  }
+
+
+  void cxios_set_gridgroup_description(gridgroup_Ptr gridgroup_hdl, const char * description, int description_size)
+  {
+    std::string description_str;
+    if (!cstr2string(description, description_size, description_str)) return;
+    CTimer::get("XIOS").resume();
+    gridgroup_hdl->description.setValue(description_str);
+    CTimer::get("XIOS").suspend();
+  }
+
+  void cxios_get_gridgroup_description(gridgroup_Ptr gridgroup_hdl, char * description, int description_size)
+  {
+    CTimer::get("XIOS").resume();
+    if (!string_copy(gridgroup_hdl->description.getInheritedValue(), description, description_size))
+      ERROR("void cxios_get_gridgroup_description(gridgroup_Ptr gridgroup_hdl, char * description, int description_size)", << "Input string is too short");
+    CTimer::get("XIOS").suspend();
+  }
+
+  bool cxios_is_defined_gridgroup_description(gridgroup_Ptr gridgroup_hdl)
+  {
+     CTimer::get("XIOS").resume();
+     bool isDefined = gridgroup_hdl->description.hasInheritedValue();
+     CTimer::get("XIOS").suspend();
+     return isDefined;
+  }
+
+
+  void cxios_set_gridgroup_group_ref(gridgroup_Ptr gridgroup_hdl, const char * group_ref, int group_ref_size)
+  {
+    std::string group_ref_str;
+    if (!cstr2string(group_ref, group_ref_size, group_ref_str)) return;
+    CTimer::get("XIOS").resume();
+    gridgroup_hdl->group_ref.setValue(group_ref_str);
+    CTimer::get("XIOS").suspend();
+  }
+
+  void cxios_get_gridgroup_group_ref(gridgroup_Ptr gridgroup_hdl, char * group_ref, int group_ref_size)
+  {
+    CTimer::get("XIOS").resume();
+    if (!string_copy(gridgroup_hdl->group_ref.getInheritedValue(), group_ref, group_ref_size))
+      ERROR("void cxios_get_gridgroup_group_ref(gridgroup_Ptr gridgroup_hdl, char * group_ref, int group_ref_size)", << "Input string is too short");
+    CTimer::get("XIOS").suspend();
+  }
+
+  bool cxios_is_defined_gridgroup_group_ref(gridgroup_Ptr gridgroup_hdl)
+  {
+     CTimer::get("XIOS").resume();
+     bool isDefined = gridgroup_hdl->group_ref.hasInheritedValue();
+     CTimer::get("XIOS").suspend();
+     return isDefined;
+  }
+
+
+  void cxios_set_gridgroup_mask_0d(gridgroup_Ptr gridgroup_hdl, bool* mask_0d, int* extent)
+  {
+    CTimer::get("XIOS").resume();
+    CArray<bool,1> tmp(mask_0d, shape(extent[0]), neverDeleteData);
+    gridgroup_hdl->mask_0d.reference(tmp.copy());
+     CTimer::get("XIOS").suspend();
+  }
+
+  void cxios_get_gridgroup_mask_0d(gridgroup_Ptr gridgroup_hdl, bool* mask_0d, int* extent)
+  {
+    CTimer::get("XIOS").resume();
+    CArray<bool,1> tmp(mask_0d, shape(extent[0]), neverDeleteData);
+    tmp=gridgroup_hdl->mask_0d.getInheritedValue();
+     CTimer::get("XIOS").suspend();
+  }
+
+  bool cxios_is_defined_gridgroup_mask_0d(gridgroup_Ptr gridgroup_hdl)
+  {
+     CTimer::get("XIOS").resume();
+     bool isDefined = gridgroup_hdl->mask_0d.hasInheritedValue();
+     CTimer::get("XIOS").suspend();
+     return isDefined;
+  }
+
+
+  void cxios_set_gridgroup_mask_1d(gridgroup_Ptr gridgroup_hdl, bool* mask_1d, int* extent)
+  {
+    CTimer::get("XIOS").resume();
+    CArray<bool,1> tmp(mask_1d, shape(extent[0]), neverDeleteData);
+    gridgroup_hdl->mask_1d.reference(tmp.copy());
+     CTimer::get("XIOS").suspend();
+  }
+
+  void cxios_get_gridgroup_mask_1d(gridgroup_Ptr gridgroup_hdl, bool* mask_1d, int* extent)
+  {
+    CTimer::get("XIOS").resume();
+    CArray<bool,1> tmp(mask_1d, shape(extent[0]), neverDeleteData);
+    tmp=gridgroup_hdl->mask_1d.getInheritedValue();
+     CTimer::get("XIOS").suspend();
+  }
+
+  bool cxios_is_defined_gridgroup_mask_1d(gridgroup_Ptr gridgroup_hdl)
+  {
+     CTimer::get("XIOS").resume();
+     bool isDefined = gridgroup_hdl->mask_1d.hasInheritedValue();
+     CTimer::get("XIOS").suspend();
+     return isDefined;
+  }
+
+
+  void cxios_set_gridgroup_mask_2d(gridgroup_Ptr gridgroup_hdl, bool* mask_2d, int* extent)
+  {
+    CTimer::get("XIOS").resume();
+    CArray<bool,2> tmp(mask_2d, shape(extent[0], extent[1]), neverDeleteData);
+    gridgroup_hdl->mask_2d.reference(tmp.copy());
+     CTimer::get("XIOS").suspend();
+  }
+
+  void cxios_get_gridgroup_mask_2d(gridgroup_Ptr gridgroup_hdl, bool* mask_2d, int* extent)
+  {
+    CTimer::get("XIOS").resume();
+    CArray<bool,2> tmp(mask_2d, shape(extent[0], extent[1]), neverDeleteData);
+    tmp=gridgroup_hdl->mask_2d.getInheritedValue();
+     CTimer::get("XIOS").suspend();
+  }
+
+  bool cxios_is_defined_gridgroup_mask_2d(gridgroup_Ptr gridgroup_hdl)
+  {
+     CTimer::get("XIOS").resume();
+     bool isDefined = gridgroup_hdl->mask_2d.hasInheritedValue();
+     CTimer::get("XIOS").suspend();
+     return isDefined;
+  }
+
+
+  void cxios_set_gridgroup_mask_3d(gridgroup_Ptr gridgroup_hdl, bool* mask_3d, int* extent)
+  {
+    CTimer::get("XIOS").resume();
+    CArray<bool,3> tmp(mask_3d, shape(extent[0], extent[1], extent[2]), neverDeleteData);
+    gridgroup_hdl->mask_3d.reference(tmp.copy());
+     CTimer::get("XIOS").suspend();
+  }
+
+  void cxios_get_gridgroup_mask_3d(gridgroup_Ptr gridgroup_hdl, bool* mask_3d, int* extent)
+  {
+    CTimer::get("XIOS").resume();
+    CArray<bool,3> tmp(mask_3d, shape(extent[0], extent[1], extent[2]), neverDeleteData);
+    tmp=gridgroup_hdl->mask_3d.getInheritedValue();
+     CTimer::get("XIOS").suspend();
+  }
+
+  bool cxios_is_defined_gridgroup_mask_3d(gridgroup_Ptr gridgroup_hdl)
+  {
+     CTimer::get("XIOS").resume();
+     bool isDefined = gridgroup_hdl->mask_3d.hasInheritedValue();
+     CTimer::get("XIOS").suspend();
+     return isDefined;
+  }
+
+
+  void cxios_set_gridgroup_mask_4d(gridgroup_Ptr gridgroup_hdl, bool* mask_4d, int* extent)
+  {
+    CTimer::get("XIOS").resume();
+    CArray<bool,4> tmp(mask_4d, shape(extent[0], extent[1], extent[2], extent[3]), neverDeleteData);
+    gridgroup_hdl->mask_4d.reference(tmp.copy());
+     CTimer::get("XIOS").suspend();
+  }
+
+  void cxios_get_gridgroup_mask_4d(gridgroup_Ptr gridgroup_hdl, bool* mask_4d, int* extent)
+  {
+    CTimer::get("XIOS").resume();
+    CArray<bool,4> tmp(mask_4d, shape(extent[0], extent[1], extent[2], extent[3]), neverDeleteData);
+    tmp=gridgroup_hdl->mask_4d.getInheritedValue();
+     CTimer::get("XIOS").suspend();
+  }
+
+  bool cxios_is_defined_gridgroup_mask_4d(gridgroup_Ptr gridgroup_hdl)
+  {
+     CTimer::get("XIOS").resume();
+     bool isDefined = gridgroup_hdl->mask_4d.hasInheritedValue();
+     CTimer::get("XIOS").suspend();
+     return isDefined;
+  }
+
+
+  void cxios_set_gridgroup_mask_5d(gridgroup_Ptr gridgroup_hdl, bool* mask_5d, int* extent)
+  {
+    CTimer::get("XIOS").resume();
+    CArray<bool,5> tmp(mask_5d, shape(extent[0], extent[1], extent[2], extent[3], extent[4]), neverDeleteData);
+    gridgroup_hdl->mask_5d.reference(tmp.copy());
+     CTimer::get("XIOS").suspend();
+  }
+
+  void cxios_get_gridgroup_mask_5d(gridgroup_Ptr gridgroup_hdl, bool* mask_5d, int* extent)
+  {
+    CTimer::get("XIOS").resume();
+    CArray<bool,5> tmp(mask_5d, shape(extent[0], extent[1], extent[2], extent[3], extent[4]), neverDeleteData);
+    tmp=gridgroup_hdl->mask_5d.getInheritedValue();
+     CTimer::get("XIOS").suspend();
+  }
+
+  bool cxios_is_defined_gridgroup_mask_5d(gridgroup_Ptr gridgroup_hdl)
+  {
+     CTimer::get("XIOS").resume();
+     bool isDefined = gridgroup_hdl->mask_5d.hasInheritedValue();
+     CTimer::get("XIOS").suspend();
+     return isDefined;
+  }
+
+
+  void cxios_set_gridgroup_mask_6d(gridgroup_Ptr gridgroup_hdl, bool* mask_6d, int* extent)
+  {
+    CTimer::get("XIOS").resume();
+    CArray<bool,6> tmp(mask_6d, shape(extent[0], extent[1], extent[2], extent[3], extent[4], extent[5]), neverDeleteData);
+    gridgroup_hdl->mask_6d.reference(tmp.copy());
+     CTimer::get("XIOS").suspend();
+  }
+
+  void cxios_get_gridgroup_mask_6d(gridgroup_Ptr gridgroup_hdl, bool* mask_6d, int* extent)
+  {
+    CTimer::get("XIOS").resume();
+    CArray<bool,6> tmp(mask_6d, shape(extent[0], extent[1], extent[2], extent[3], extent[4], extent[5]), neverDeleteData);
+    tmp=gridgroup_hdl->mask_6d.getInheritedValue();
+     CTimer::get("XIOS").suspend();
+  }
+
+  bool cxios_is_defined_gridgroup_mask_6d(gridgroup_Ptr gridgroup_hdl)
+  {
+     CTimer::get("XIOS").resume();
+     bool isDefined = gridgroup_hdl->mask_6d.hasInheritedValue();
+     CTimer::get("XIOS").suspend();
+     return isDefined;
+  }
+
+
+  void cxios_set_gridgroup_mask_7d(gridgroup_Ptr gridgroup_hdl, bool* mask_7d, int* extent)
+  {
+    CTimer::get("XIOS").resume();
+    CArray<bool,7> tmp(mask_7d, shape(extent[0], extent[1], extent[2], extent[3], extent[4], extent[5], extent[6]), neverDeleteData);
+    gridgroup_hdl->mask_7d.reference(tmp.copy());
+     CTimer::get("XIOS").suspend();
+  }
+
+  void cxios_get_gridgroup_mask_7d(gridgroup_Ptr gridgroup_hdl, bool* mask_7d, int* extent)
+  {
+    CTimer::get("XIOS").resume();
+    CArray<bool,7> tmp(mask_7d, shape(extent[0], extent[1], extent[2], extent[3], extent[4], extent[5], extent[6]), neverDeleteData);
+    tmp=gridgroup_hdl->mask_7d.getInheritedValue();
+     CTimer::get("XIOS").suspend();
+  }
+
+  bool cxios_is_defined_gridgroup_mask_7d(gridgroup_Ptr gridgroup_hdl)
+  {
+     CTimer::get("XIOS").resume();
+     bool isDefined = gridgroup_hdl->mask_7d.hasInheritedValue();
+     CTimer::get("XIOS").suspend();
+     return isDefined;
+  }
+
+
+  void cxios_set_gridgroup_name(gridgroup_Ptr gridgroup_hdl, const char * name, int name_size)
+  {
+    std::string name_str;
+    if (!cstr2string(name, name_size, name_str)) return;
+    CTimer::get("XIOS").resume();
+    gridgroup_hdl->name.setValue(name_str);
+    CTimer::get("XIOS").suspend();
+  }
+
+  void cxios_get_gridgroup_name(gridgroup_Ptr gridgroup_hdl, char * name, int name_size)
+  {
+    CTimer::get("XIOS").resume();
+    if (!string_copy(gridgroup_hdl->name.getInheritedValue(), name, name_size))
+      ERROR("void cxios_get_gridgroup_name(gridgroup_Ptr gridgroup_hdl, char * name, int name_size)", << "Input string is too short");
+    CTimer::get("XIOS").suspend();
+  }
+
+  bool cxios_is_defined_gridgroup_name(gridgroup_Ptr gridgroup_hdl)
+  {
+     CTimer::get("XIOS").resume();
+     bool isDefined = gridgroup_hdl->name.hasInheritedValue();
+     CTimer::get("XIOS").suspend();
+     return isDefined;
+  }
+}
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/c_attr/icinterpolate_axis_attr.cpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/c_attr/icinterpolate_axis_attr.cpp	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/c_attr/icinterpolate_axis_attr.cpp	(revision 1749)
@@ -0,0 +1,92 @@
+/* ************************************************************************** *
+ *               Interface auto generated - do not modify                     *
+ * ************************************************************************** */
+
+#include <boost/multi_array.hpp>
+#include "xios.hpp"
+#include "attribute_template.hpp"
+#include "object_template.hpp"
+#include "group_template.hpp"
+#include "icutil.hpp"
+#include "icdate.hpp"
+#include "timer.hpp"
+#include "node_type.hpp"
+
+extern "C"
+{
+  typedef xios::CInterpolateAxis* interpolate_axis_Ptr;
+
+  void cxios_set_interpolate_axis_coordinate(interpolate_axis_Ptr interpolate_axis_hdl, const char * coordinate, int coordinate_size)
+  {
+    std::string coordinate_str;
+    if (!cstr2string(coordinate, coordinate_size, coordinate_str)) return;
+    CTimer::get("XIOS").resume();
+    interpolate_axis_hdl->coordinate.setValue(coordinate_str);
+    CTimer::get("XIOS").suspend();
+  }
+
+  void cxios_get_interpolate_axis_coordinate(interpolate_axis_Ptr interpolate_axis_hdl, char * coordinate, int coordinate_size)
+  {
+    CTimer::get("XIOS").resume();
+    if (!string_copy(interpolate_axis_hdl->coordinate.getInheritedValue(), coordinate, coordinate_size))
+      ERROR("void cxios_get_interpolate_axis_coordinate(interpolate_axis_Ptr interpolate_axis_hdl, char * coordinate, int coordinate_size)", << "Input string is too short");
+    CTimer::get("XIOS").suspend();
+  }
+
+  bool cxios_is_defined_interpolate_axis_coordinate(interpolate_axis_Ptr interpolate_axis_hdl)
+  {
+     CTimer::get("XIOS").resume();
+     bool isDefined = interpolate_axis_hdl->coordinate.hasInheritedValue();
+     CTimer::get("XIOS").suspend();
+     return isDefined;
+  }
+
+
+  void cxios_set_interpolate_axis_order(interpolate_axis_Ptr interpolate_axis_hdl, int order)
+  {
+    CTimer::get("XIOS").resume();
+    interpolate_axis_hdl->order.setValue(order);
+    CTimer::get("XIOS").suspend();
+  }
+
+  void cxios_get_interpolate_axis_order(interpolate_axis_Ptr interpolate_axis_hdl, int* order)
+  {
+    CTimer::get("XIOS").resume();
+    *order = interpolate_axis_hdl->order.getInheritedValue();
+    CTimer::get("XIOS").suspend();
+  }
+
+  bool cxios_is_defined_interpolate_axis_order(interpolate_axis_Ptr interpolate_axis_hdl)
+  {
+     CTimer::get("XIOS").resume();
+     bool isDefined = interpolate_axis_hdl->order.hasInheritedValue();
+     CTimer::get("XIOS").suspend();
+     return isDefined;
+  }
+
+
+  void cxios_set_interpolate_axis_type(interpolate_axis_Ptr interpolate_axis_hdl, const char * type, int type_size)
+  {
+    std::string type_str;
+    if (!cstr2string(type, type_size, type_str)) return;
+    CTimer::get("XIOS").resume();
+    interpolate_axis_hdl->type.setValue(type_str);
+    CTimer::get("XIOS").suspend();
+  }
+
+  void cxios_get_interpolate_axis_type(interpolate_axis_Ptr interpolate_axis_hdl, char * type, int type_size)
+  {
+    CTimer::get("XIOS").resume();
+    if (!string_copy(interpolate_axis_hdl->type.getInheritedValue(), type, type_size))
+      ERROR("void cxios_get_interpolate_axis_type(interpolate_axis_Ptr interpolate_axis_hdl, char * type, int type_size)", << "Input string is too short");
+    CTimer::get("XIOS").suspend();
+  }
+
+  bool cxios_is_defined_interpolate_axis_type(interpolate_axis_Ptr interpolate_axis_hdl)
+  {
+     CTimer::get("XIOS").resume();
+     bool isDefined = interpolate_axis_hdl->type.hasInheritedValue();
+     CTimer::get("XIOS").suspend();
+     return isDefined;
+  }
+}
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/c_attr/icinterpolate_domain_attr.cpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/c_attr/icinterpolate_domain_attr.cpp	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/c_attr/icinterpolate_domain_attr.cpp	(revision 1749)
@@ -0,0 +1,233 @@
+/* ************************************************************************** *
+ *               Interface auto generated - do not modify                     *
+ * ************************************************************************** */
+
+#include <boost/multi_array.hpp>
+#include "xios.hpp"
+#include "attribute_template.hpp"
+#include "object_template.hpp"
+#include "group_template.hpp"
+#include "icutil.hpp"
+#include "icdate.hpp"
+#include "timer.hpp"
+#include "node_type.hpp"
+
+extern "C"
+{
+  typedef xios::CInterpolateDomain* interpolate_domain_Ptr;
+
+  void cxios_set_interpolate_domain_detect_missing_value(interpolate_domain_Ptr interpolate_domain_hdl, bool detect_missing_value)
+  {
+    CTimer::get("XIOS").resume();
+    interpolate_domain_hdl->detect_missing_value.setValue(detect_missing_value);
+    CTimer::get("XIOS").suspend();
+  }
+
+  void cxios_get_interpolate_domain_detect_missing_value(interpolate_domain_Ptr interpolate_domain_hdl, bool* detect_missing_value)
+  {
+    CTimer::get("XIOS").resume();
+    *detect_missing_value = interpolate_domain_hdl->detect_missing_value.getInheritedValue();
+    CTimer::get("XIOS").suspend();
+  }
+
+  bool cxios_is_defined_interpolate_domain_detect_missing_value(interpolate_domain_Ptr interpolate_domain_hdl)
+  {
+     CTimer::get("XIOS").resume();
+     bool isDefined = interpolate_domain_hdl->detect_missing_value.hasInheritedValue();
+     CTimer::get("XIOS").suspend();
+     return isDefined;
+  }
+
+
+  void cxios_set_interpolate_domain_mode(interpolate_domain_Ptr interpolate_domain_hdl, const char * mode, int mode_size)
+  {
+    std::string mode_str;
+    if (!cstr2string(mode, mode_size, mode_str)) return;
+    CTimer::get("XIOS").resume();
+    interpolate_domain_hdl->mode.fromString(mode_str);
+    CTimer::get("XIOS").suspend();
+  }
+
+  void cxios_get_interpolate_domain_mode(interpolate_domain_Ptr interpolate_domain_hdl, char * mode, int mode_size)
+  {
+    CTimer::get("XIOS").resume();
+    if (!string_copy(interpolate_domain_hdl->mode.getInheritedStringValue(), mode, mode_size))
+      ERROR("void cxios_get_interpolate_domain_mode(interpolate_domain_Ptr interpolate_domain_hdl, char * mode, int mode_size)", << "Input string is too short");
+    CTimer::get("XIOS").suspend();
+  }
+
+  bool cxios_is_defined_interpolate_domain_mode(interpolate_domain_Ptr interpolate_domain_hdl)
+  {
+     CTimer::get("XIOS").resume();
+     bool isDefined = interpolate_domain_hdl->mode.hasInheritedValue();
+     CTimer::get("XIOS").suspend();
+     return isDefined;
+  }
+
+
+  void cxios_set_interpolate_domain_order(interpolate_domain_Ptr interpolate_domain_hdl, int order)
+  {
+    CTimer::get("XIOS").resume();
+    interpolate_domain_hdl->order.setValue(order);
+    CTimer::get("XIOS").suspend();
+  }
+
+  void cxios_get_interpolate_domain_order(interpolate_domain_Ptr interpolate_domain_hdl, int* order)
+  {
+    CTimer::get("XIOS").resume();
+    *order = interpolate_domain_hdl->order.getInheritedValue();
+    CTimer::get("XIOS").suspend();
+  }
+
+  bool cxios_is_defined_interpolate_domain_order(interpolate_domain_Ptr interpolate_domain_hdl)
+  {
+     CTimer::get("XIOS").resume();
+     bool isDefined = interpolate_domain_hdl->order.hasInheritedValue();
+     CTimer::get("XIOS").suspend();
+     return isDefined;
+  }
+
+
+  void cxios_set_interpolate_domain_quantity(interpolate_domain_Ptr interpolate_domain_hdl, bool quantity)
+  {
+    CTimer::get("XIOS").resume();
+    interpolate_domain_hdl->quantity.setValue(quantity);
+    CTimer::get("XIOS").suspend();
+  }
+
+  void cxios_get_interpolate_domain_quantity(interpolate_domain_Ptr interpolate_domain_hdl, bool* quantity)
+  {
+    CTimer::get("XIOS").resume();
+    *quantity = interpolate_domain_hdl->quantity.getInheritedValue();
+    CTimer::get("XIOS").suspend();
+  }
+
+  bool cxios_is_defined_interpolate_domain_quantity(interpolate_domain_Ptr interpolate_domain_hdl)
+  {
+     CTimer::get("XIOS").resume();
+     bool isDefined = interpolate_domain_hdl->quantity.hasInheritedValue();
+     CTimer::get("XIOS").suspend();
+     return isDefined;
+  }
+
+
+  void cxios_set_interpolate_domain_read_write_convention(interpolate_domain_Ptr interpolate_domain_hdl, const char * read_write_convention, int read_write_convention_size)
+  {
+    std::string read_write_convention_str;
+    if (!cstr2string(read_write_convention, read_write_convention_size, read_write_convention_str)) return;
+    CTimer::get("XIOS").resume();
+    interpolate_domain_hdl->read_write_convention.fromString(read_write_convention_str);
+    CTimer::get("XIOS").suspend();
+  }
+
+  void cxios_get_interpolate_domain_read_write_convention(interpolate_domain_Ptr interpolate_domain_hdl, char * read_write_convention, int read_write_convention_size)
+  {
+    CTimer::get("XIOS").resume();
+    if (!string_copy(interpolate_domain_hdl->read_write_convention.getInheritedStringValue(), read_write_convention, read_write_convention_size))
+      ERROR("void cxios_get_interpolate_domain_read_write_convention(interpolate_domain_Ptr interpolate_domain_hdl, char * read_write_convention, int read_write_convention_size)", << "Input string is too short");
+    CTimer::get("XIOS").suspend();
+  }
+
+  bool cxios_is_defined_interpolate_domain_read_write_convention(interpolate_domain_Ptr interpolate_domain_hdl)
+  {
+     CTimer::get("XIOS").resume();
+     bool isDefined = interpolate_domain_hdl->read_write_convention.hasInheritedValue();
+     CTimer::get("XIOS").suspend();
+     return isDefined;
+  }
+
+
+  void cxios_set_interpolate_domain_renormalize(interpolate_domain_Ptr interpolate_domain_hdl, bool renormalize)
+  {
+    CTimer::get("XIOS").resume();
+    interpolate_domain_hdl->renormalize.setValue(renormalize);
+    CTimer::get("XIOS").suspend();
+  }
+
+  void cxios_get_interpolate_domain_renormalize(interpolate_domain_Ptr interpolate_domain_hdl, bool* renormalize)
+  {
+    CTimer::get("XIOS").resume();
+    *renormalize = interpolate_domain_hdl->renormalize.getInheritedValue();
+    CTimer::get("XIOS").suspend();
+  }
+
+  bool cxios_is_defined_interpolate_domain_renormalize(interpolate_domain_Ptr interpolate_domain_hdl)
+  {
+     CTimer::get("XIOS").resume();
+     bool isDefined = interpolate_domain_hdl->renormalize.hasInheritedValue();
+     CTimer::get("XIOS").suspend();
+     return isDefined;
+  }
+
+
+  void cxios_set_interpolate_domain_use_area(interpolate_domain_Ptr interpolate_domain_hdl, bool use_area)
+  {
+    CTimer::get("XIOS").resume();
+    interpolate_domain_hdl->use_area.setValue(use_area);
+    CTimer::get("XIOS").suspend();
+  }
+
+  void cxios_get_interpolate_domain_use_area(interpolate_domain_Ptr interpolate_domain_hdl, bool* use_area)
+  {
+    CTimer::get("XIOS").resume();
+    *use_area = interpolate_domain_hdl->use_area.getInheritedValue();
+    CTimer::get("XIOS").suspend();
+  }
+
+  bool cxios_is_defined_interpolate_domain_use_area(interpolate_domain_Ptr interpolate_domain_hdl)
+  {
+     CTimer::get("XIOS").resume();
+     bool isDefined = interpolate_domain_hdl->use_area.hasInheritedValue();
+     CTimer::get("XIOS").suspend();
+     return isDefined;
+  }
+
+
+  void cxios_set_interpolate_domain_weight_filename(interpolate_domain_Ptr interpolate_domain_hdl, const char * weight_filename, int weight_filename_size)
+  {
+    std::string weight_filename_str;
+    if (!cstr2string(weight_filename, weight_filename_size, weight_filename_str)) return;
+    CTimer::get("XIOS").resume();
+    interpolate_domain_hdl->weight_filename.setValue(weight_filename_str);
+    CTimer::get("XIOS").suspend();
+  }
+
+  void cxios_get_interpolate_domain_weight_filename(interpolate_domain_Ptr interpolate_domain_hdl, char * weight_filename, int weight_filename_size)
+  {
+    CTimer::get("XIOS").resume();
+    if (!string_copy(interpolate_domain_hdl->weight_filename.getInheritedValue(), weight_filename, weight_filename_size))
+      ERROR("void cxios_get_interpolate_domain_weight_filename(interpolate_domain_Ptr interpolate_domain_hdl, char * weight_filename, int weight_filename_size)", << "Input string is too short");
+    CTimer::get("XIOS").suspend();
+  }
+
+  bool cxios_is_defined_interpolate_domain_weight_filename(interpolate_domain_Ptr interpolate_domain_hdl)
+  {
+     CTimer::get("XIOS").resume();
+     bool isDefined = interpolate_domain_hdl->weight_filename.hasInheritedValue();
+     CTimer::get("XIOS").suspend();
+     return isDefined;
+  }
+
+
+  void cxios_set_interpolate_domain_write_weight(interpolate_domain_Ptr interpolate_domain_hdl, bool write_weight)
+  {
+    CTimer::get("XIOS").resume();
+    interpolate_domain_hdl->write_weight.setValue(write_weight);
+    CTimer::get("XIOS").suspend();
+  }
+
+  void cxios_get_interpolate_domain_write_weight(interpolate_domain_Ptr interpolate_domain_hdl, bool* write_weight)
+  {
+    CTimer::get("XIOS").resume();
+    *write_weight = interpolate_domain_hdl->write_weight.getInheritedValue();
+    CTimer::get("XIOS").suspend();
+  }
+
+  bool cxios_is_defined_interpolate_domain_write_weight(interpolate_domain_Ptr interpolate_domain_hdl)
+  {
+     CTimer::get("XIOS").resume();
+     bool isDefined = interpolate_domain_hdl->write_weight.hasInheritedValue();
+     CTimer::get("XIOS").suspend();
+     return isDefined;
+  }
+}
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/c_attr/icinverse_axis_attr.cpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/c_attr/icinverse_axis_attr.cpp	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/c_attr/icinverse_axis_attr.cpp	(revision 1749)
@@ -0,0 +1,17 @@
+/* ************************************************************************** *
+ *               Interface auto generated - do not modify                     *
+ * ************************************************************************** */
+
+#include <boost/multi_array.hpp>
+#include "xios.hpp"
+#include "attribute_template.hpp"
+#include "object_template.hpp"
+#include "group_template.hpp"
+#include "icutil.hpp"
+#include "icdate.hpp"
+#include "timer.hpp"
+#include "node_type.hpp"
+
+extern "C"
+{
+  typedef xios::CInverseAxis* inverse_axis_Ptr;}
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/c_attr/icreduce_axis_to_axis_attr.cpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/c_attr/icreduce_axis_to_axis_attr.cpp	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/c_attr/icreduce_axis_to_axis_attr.cpp	(revision 1749)
@@ -0,0 +1,43 @@
+/* ************************************************************************** *
+ *               Interface auto generated - do not modify                     *
+ * ************************************************************************** */
+
+#include <boost/multi_array.hpp>
+#include "xios.hpp"
+#include "attribute_template.hpp"
+#include "object_template.hpp"
+#include "group_template.hpp"
+#include "icutil.hpp"
+#include "icdate.hpp"
+#include "timer.hpp"
+#include "node_type.hpp"
+
+extern "C"
+{
+  typedef xios::CReduceAxisToAxis* reduce_axis_to_axis_Ptr;
+
+  void cxios_set_reduce_axis_to_axis_operation(reduce_axis_to_axis_Ptr reduce_axis_to_axis_hdl, const char * operation, int operation_size)
+  {
+    std::string operation_str;
+    if (!cstr2string(operation, operation_size, operation_str)) return;
+    CTimer::get("XIOS").resume();
+    reduce_axis_to_axis_hdl->operation.fromString(operation_str);
+    CTimer::get("XIOS").suspend();
+  }
+
+  void cxios_get_reduce_axis_to_axis_operation(reduce_axis_to_axis_Ptr reduce_axis_to_axis_hdl, char * operation, int operation_size)
+  {
+    CTimer::get("XIOS").resume();
+    if (!string_copy(reduce_axis_to_axis_hdl->operation.getInheritedStringValue(), operation, operation_size))
+      ERROR("void cxios_get_reduce_axis_to_axis_operation(reduce_axis_to_axis_Ptr reduce_axis_to_axis_hdl, char * operation, int operation_size)", << "Input string is too short");
+    CTimer::get("XIOS").suspend();
+  }
+
+  bool cxios_is_defined_reduce_axis_to_axis_operation(reduce_axis_to_axis_Ptr reduce_axis_to_axis_hdl)
+  {
+     CTimer::get("XIOS").resume();
+     bool isDefined = reduce_axis_to_axis_hdl->operation.hasInheritedValue();
+     CTimer::get("XIOS").suspend();
+     return isDefined;
+  }
+}
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/c_attr/icreduce_axis_to_scalar_attr.cpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/c_attr/icreduce_axis_to_scalar_attr.cpp	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/c_attr/icreduce_axis_to_scalar_attr.cpp	(revision 1749)
@@ -0,0 +1,43 @@
+/* ************************************************************************** *
+ *               Interface auto generated - do not modify                     *
+ * ************************************************************************** */
+
+#include <boost/multi_array.hpp>
+#include "xios.hpp"
+#include "attribute_template.hpp"
+#include "object_template.hpp"
+#include "group_template.hpp"
+#include "icutil.hpp"
+#include "icdate.hpp"
+#include "timer.hpp"
+#include "node_type.hpp"
+
+extern "C"
+{
+  typedef xios::CReduceAxisToScalar* reduce_axis_to_scalar_Ptr;
+
+  void cxios_set_reduce_axis_to_scalar_operation(reduce_axis_to_scalar_Ptr reduce_axis_to_scalar_hdl, const char * operation, int operation_size)
+  {
+    std::string operation_str;
+    if (!cstr2string(operation, operation_size, operation_str)) return;
+    CTimer::get("XIOS").resume();
+    reduce_axis_to_scalar_hdl->operation.fromString(operation_str);
+    CTimer::get("XIOS").suspend();
+  }
+
+  void cxios_get_reduce_axis_to_scalar_operation(reduce_axis_to_scalar_Ptr reduce_axis_to_scalar_hdl, char * operation, int operation_size)
+  {
+    CTimer::get("XIOS").resume();
+    if (!string_copy(reduce_axis_to_scalar_hdl->operation.getInheritedStringValue(), operation, operation_size))
+      ERROR("void cxios_get_reduce_axis_to_scalar_operation(reduce_axis_to_scalar_Ptr reduce_axis_to_scalar_hdl, char * operation, int operation_size)", << "Input string is too short");
+    CTimer::get("XIOS").suspend();
+  }
+
+  bool cxios_is_defined_reduce_axis_to_scalar_operation(reduce_axis_to_scalar_Ptr reduce_axis_to_scalar_hdl)
+  {
+     CTimer::get("XIOS").resume();
+     bool isDefined = reduce_axis_to_scalar_hdl->operation.hasInheritedValue();
+     CTimer::get("XIOS").suspend();
+     return isDefined;
+  }
+}
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/c_attr/icreduce_domain_to_axis_attr.cpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/c_attr/icreduce_domain_to_axis_attr.cpp	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/c_attr/icreduce_domain_to_axis_attr.cpp	(revision 1749)
@@ -0,0 +1,92 @@
+/* ************************************************************************** *
+ *               Interface auto generated - do not modify                     *
+ * ************************************************************************** */
+
+#include <boost/multi_array.hpp>
+#include "xios.hpp"
+#include "attribute_template.hpp"
+#include "object_template.hpp"
+#include "group_template.hpp"
+#include "icutil.hpp"
+#include "icdate.hpp"
+#include "timer.hpp"
+#include "node_type.hpp"
+
+extern "C"
+{
+  typedef xios::CReduceDomainToAxis* reduce_domain_to_axis_Ptr;
+
+  void cxios_set_reduce_domain_to_axis_direction(reduce_domain_to_axis_Ptr reduce_domain_to_axis_hdl, const char * direction, int direction_size)
+  {
+    std::string direction_str;
+    if (!cstr2string(direction, direction_size, direction_str)) return;
+    CTimer::get("XIOS").resume();
+    reduce_domain_to_axis_hdl->direction.fromString(direction_str);
+    CTimer::get("XIOS").suspend();
+  }
+
+  void cxios_get_reduce_domain_to_axis_direction(reduce_domain_to_axis_Ptr reduce_domain_to_axis_hdl, char * direction, int direction_size)
+  {
+    CTimer::get("XIOS").resume();
+    if (!string_copy(reduce_domain_to_axis_hdl->direction.getInheritedStringValue(), direction, direction_size))
+      ERROR("void cxios_get_reduce_domain_to_axis_direction(reduce_domain_to_axis_Ptr reduce_domain_to_axis_hdl, char * direction, int direction_size)", << "Input string is too short");
+    CTimer::get("XIOS").suspend();
+  }
+
+  bool cxios_is_defined_reduce_domain_to_axis_direction(reduce_domain_to_axis_Ptr reduce_domain_to_axis_hdl)
+  {
+     CTimer::get("XIOS").resume();
+     bool isDefined = reduce_domain_to_axis_hdl->direction.hasInheritedValue();
+     CTimer::get("XIOS").suspend();
+     return isDefined;
+  }
+
+
+  void cxios_set_reduce_domain_to_axis_local(reduce_domain_to_axis_Ptr reduce_domain_to_axis_hdl, bool local)
+  {
+    CTimer::get("XIOS").resume();
+    reduce_domain_to_axis_hdl->local.setValue(local);
+    CTimer::get("XIOS").suspend();
+  }
+
+  void cxios_get_reduce_domain_to_axis_local(reduce_domain_to_axis_Ptr reduce_domain_to_axis_hdl, bool* local)
+  {
+    CTimer::get("XIOS").resume();
+    *local = reduce_domain_to_axis_hdl->local.getInheritedValue();
+    CTimer::get("XIOS").suspend();
+  }
+
+  bool cxios_is_defined_reduce_domain_to_axis_local(reduce_domain_to_axis_Ptr reduce_domain_to_axis_hdl)
+  {
+     CTimer::get("XIOS").resume();
+     bool isDefined = reduce_domain_to_axis_hdl->local.hasInheritedValue();
+     CTimer::get("XIOS").suspend();
+     return isDefined;
+  }
+
+
+  void cxios_set_reduce_domain_to_axis_operation(reduce_domain_to_axis_Ptr reduce_domain_to_axis_hdl, const char * operation, int operation_size)
+  {
+    std::string operation_str;
+    if (!cstr2string(operation, operation_size, operation_str)) return;
+    CTimer::get("XIOS").resume();
+    reduce_domain_to_axis_hdl->operation.fromString(operation_str);
+    CTimer::get("XIOS").suspend();
+  }
+
+  void cxios_get_reduce_domain_to_axis_operation(reduce_domain_to_axis_Ptr reduce_domain_to_axis_hdl, char * operation, int operation_size)
+  {
+    CTimer::get("XIOS").resume();
+    if (!string_copy(reduce_domain_to_axis_hdl->operation.getInheritedStringValue(), operation, operation_size))
+      ERROR("void cxios_get_reduce_domain_to_axis_operation(reduce_domain_to_axis_Ptr reduce_domain_to_axis_hdl, char * operation, int operation_size)", << "Input string is too short");
+    CTimer::get("XIOS").suspend();
+  }
+
+  bool cxios_is_defined_reduce_domain_to_axis_operation(reduce_domain_to_axis_Ptr reduce_domain_to_axis_hdl)
+  {
+     CTimer::get("XIOS").resume();
+     bool isDefined = reduce_domain_to_axis_hdl->operation.hasInheritedValue();
+     CTimer::get("XIOS").suspend();
+     return isDefined;
+  }
+}
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/c_attr/icreduce_domain_to_scalar_attr.cpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/c_attr/icreduce_domain_to_scalar_attr.cpp	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/c_attr/icreduce_domain_to_scalar_attr.cpp	(revision 1749)
@@ -0,0 +1,66 @@
+/* ************************************************************************** *
+ *               Interface auto generated - do not modify                     *
+ * ************************************************************************** */
+
+#include <boost/multi_array.hpp>
+#include "xios.hpp"
+#include "attribute_template.hpp"
+#include "object_template.hpp"
+#include "group_template.hpp"
+#include "icutil.hpp"
+#include "icdate.hpp"
+#include "timer.hpp"
+#include "node_type.hpp"
+
+extern "C"
+{
+  typedef xios::CReduceDomainToScalar* reduce_domain_to_scalar_Ptr;
+
+  void cxios_set_reduce_domain_to_scalar_local(reduce_domain_to_scalar_Ptr reduce_domain_to_scalar_hdl, bool local)
+  {
+    CTimer::get("XIOS").resume();
+    reduce_domain_to_scalar_hdl->local.setValue(local);
+    CTimer::get("XIOS").suspend();
+  }
+
+  void cxios_get_reduce_domain_to_scalar_local(reduce_domain_to_scalar_Ptr reduce_domain_to_scalar_hdl, bool* local)
+  {
+    CTimer::get("XIOS").resume();
+    *local = reduce_domain_to_scalar_hdl->local.getInheritedValue();
+    CTimer::get("XIOS").suspend();
+  }
+
+  bool cxios_is_defined_reduce_domain_to_scalar_local(reduce_domain_to_scalar_Ptr reduce_domain_to_scalar_hdl)
+  {
+     CTimer::get("XIOS").resume();
+     bool isDefined = reduce_domain_to_scalar_hdl->local.hasInheritedValue();
+     CTimer::get("XIOS").suspend();
+     return isDefined;
+  }
+
+
+  void cxios_set_reduce_domain_to_scalar_operation(reduce_domain_to_scalar_Ptr reduce_domain_to_scalar_hdl, const char * operation, int operation_size)
+  {
+    std::string operation_str;
+    if (!cstr2string(operation, operation_size, operation_str)) return;
+    CTimer::get("XIOS").resume();
+    reduce_domain_to_scalar_hdl->operation.fromString(operation_str);
+    CTimer::get("XIOS").suspend();
+  }
+
+  void cxios_get_reduce_domain_to_scalar_operation(reduce_domain_to_scalar_Ptr reduce_domain_to_scalar_hdl, char * operation, int operation_size)
+  {
+    CTimer::get("XIOS").resume();
+    if (!string_copy(reduce_domain_to_scalar_hdl->operation.getInheritedStringValue(), operation, operation_size))
+      ERROR("void cxios_get_reduce_domain_to_scalar_operation(reduce_domain_to_scalar_Ptr reduce_domain_to_scalar_hdl, char * operation, int operation_size)", << "Input string is too short");
+    CTimer::get("XIOS").suspend();
+  }
+
+  bool cxios_is_defined_reduce_domain_to_scalar_operation(reduce_domain_to_scalar_Ptr reduce_domain_to_scalar_hdl)
+  {
+     CTimer::get("XIOS").resume();
+     bool isDefined = reduce_domain_to_scalar_hdl->operation.hasInheritedValue();
+     CTimer::get("XIOS").suspend();
+     return isDefined;
+  }
+}
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/c_attr/icreduce_scalar_to_scalar_attr.cpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/c_attr/icreduce_scalar_to_scalar_attr.cpp	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/c_attr/icreduce_scalar_to_scalar_attr.cpp	(revision 1749)
@@ -0,0 +1,43 @@
+/* ************************************************************************** *
+ *               Interface auto generated - do not modify                     *
+ * ************************************************************************** */
+
+#include <boost/multi_array.hpp>
+#include "xios.hpp"
+#include "attribute_template.hpp"
+#include "object_template.hpp"
+#include "group_template.hpp"
+#include "icutil.hpp"
+#include "icdate.hpp"
+#include "timer.hpp"
+#include "node_type.hpp"
+
+extern "C"
+{
+  typedef xios::CReduceScalarToScalar* reduce_scalar_to_scalar_Ptr;
+
+  void cxios_set_reduce_scalar_to_scalar_operation(reduce_scalar_to_scalar_Ptr reduce_scalar_to_scalar_hdl, const char * operation, int operation_size)
+  {
+    std::string operation_str;
+    if (!cstr2string(operation, operation_size, operation_str)) return;
+    CTimer::get("XIOS").resume();
+    reduce_scalar_to_scalar_hdl->operation.fromString(operation_str);
+    CTimer::get("XIOS").suspend();
+  }
+
+  void cxios_get_reduce_scalar_to_scalar_operation(reduce_scalar_to_scalar_Ptr reduce_scalar_to_scalar_hdl, char * operation, int operation_size)
+  {
+    CTimer::get("XIOS").resume();
+    if (!string_copy(reduce_scalar_to_scalar_hdl->operation.getInheritedStringValue(), operation, operation_size))
+      ERROR("void cxios_get_reduce_scalar_to_scalar_operation(reduce_scalar_to_scalar_Ptr reduce_scalar_to_scalar_hdl, char * operation, int operation_size)", << "Input string is too short");
+    CTimer::get("XIOS").suspend();
+  }
+
+  bool cxios_is_defined_reduce_scalar_to_scalar_operation(reduce_scalar_to_scalar_Ptr reduce_scalar_to_scalar_hdl)
+  {
+     CTimer::get("XIOS").resume();
+     bool isDefined = reduce_scalar_to_scalar_hdl->operation.hasInheritedValue();
+     CTimer::get("XIOS").suspend();
+     return isDefined;
+  }
+}
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/c_attr/icreorder_domain_attr.cpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/c_attr/icreorder_domain_attr.cpp	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/c_attr/icreorder_domain_attr.cpp	(revision 1749)
@@ -0,0 +1,109 @@
+/* ************************************************************************** *
+ *               Interface auto generated - do not modify                     *
+ * ************************************************************************** */
+
+#include <boost/multi_array.hpp>
+#include "xios.hpp"
+#include "attribute_template.hpp"
+#include "object_template.hpp"
+#include "group_template.hpp"
+#include "icutil.hpp"
+#include "icdate.hpp"
+#include "timer.hpp"
+#include "node_type.hpp"
+
+extern "C"
+{
+  typedef xios::CReorderDomain* reorder_domain_Ptr;
+
+  void cxios_set_reorder_domain_invert_lat(reorder_domain_Ptr reorder_domain_hdl, bool invert_lat)
+  {
+    CTimer::get("XIOS").resume();
+    reorder_domain_hdl->invert_lat.setValue(invert_lat);
+    CTimer::get("XIOS").suspend();
+  }
+
+  void cxios_get_reorder_domain_invert_lat(reorder_domain_Ptr reorder_domain_hdl, bool* invert_lat)
+  {
+    CTimer::get("XIOS").resume();
+    *invert_lat = reorder_domain_hdl->invert_lat.getInheritedValue();
+    CTimer::get("XIOS").suspend();
+  }
+
+  bool cxios_is_defined_reorder_domain_invert_lat(reorder_domain_Ptr reorder_domain_hdl)
+  {
+     CTimer::get("XIOS").resume();
+     bool isDefined = reorder_domain_hdl->invert_lat.hasInheritedValue();
+     CTimer::get("XIOS").suspend();
+     return isDefined;
+  }
+
+
+  void cxios_set_reorder_domain_max_lon(reorder_domain_Ptr reorder_domain_hdl, double max_lon)
+  {
+    CTimer::get("XIOS").resume();
+    reorder_domain_hdl->max_lon.setValue(max_lon);
+    CTimer::get("XIOS").suspend();
+  }
+
+  void cxios_get_reorder_domain_max_lon(reorder_domain_Ptr reorder_domain_hdl, double* max_lon)
+  {
+    CTimer::get("XIOS").resume();
+    *max_lon = reorder_domain_hdl->max_lon.getInheritedValue();
+    CTimer::get("XIOS").suspend();
+  }
+
+  bool cxios_is_defined_reorder_domain_max_lon(reorder_domain_Ptr reorder_domain_hdl)
+  {
+     CTimer::get("XIOS").resume();
+     bool isDefined = reorder_domain_hdl->max_lon.hasInheritedValue();
+     CTimer::get("XIOS").suspend();
+     return isDefined;
+  }
+
+
+  void cxios_set_reorder_domain_min_lon(reorder_domain_Ptr reorder_domain_hdl, double min_lon)
+  {
+    CTimer::get("XIOS").resume();
+    reorder_domain_hdl->min_lon.setValue(min_lon);
+    CTimer::get("XIOS").suspend();
+  }
+
+  void cxios_get_reorder_domain_min_lon(reorder_domain_Ptr reorder_domain_hdl, double* min_lon)
+  {
+    CTimer::get("XIOS").resume();
+    *min_lon = reorder_domain_hdl->min_lon.getInheritedValue();
+    CTimer::get("XIOS").suspend();
+  }
+
+  bool cxios_is_defined_reorder_domain_min_lon(reorder_domain_Ptr reorder_domain_hdl)
+  {
+     CTimer::get("XIOS").resume();
+     bool isDefined = reorder_domain_hdl->min_lon.hasInheritedValue();
+     CTimer::get("XIOS").suspend();
+     return isDefined;
+  }
+
+
+  void cxios_set_reorder_domain_shift_lon_fraction(reorder_domain_Ptr reorder_domain_hdl, double shift_lon_fraction)
+  {
+    CTimer::get("XIOS").resume();
+    reorder_domain_hdl->shift_lon_fraction.setValue(shift_lon_fraction);
+    CTimer::get("XIOS").suspend();
+  }
+
+  void cxios_get_reorder_domain_shift_lon_fraction(reorder_domain_Ptr reorder_domain_hdl, double* shift_lon_fraction)
+  {
+    CTimer::get("XIOS").resume();
+    *shift_lon_fraction = reorder_domain_hdl->shift_lon_fraction.getInheritedValue();
+    CTimer::get("XIOS").suspend();
+  }
+
+  bool cxios_is_defined_reorder_domain_shift_lon_fraction(reorder_domain_Ptr reorder_domain_hdl)
+  {
+     CTimer::get("XIOS").resume();
+     bool isDefined = reorder_domain_hdl->shift_lon_fraction.hasInheritedValue();
+     CTimer::get("XIOS").suspend();
+     return isDefined;
+  }
+}
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/c_attr/icscalar_attr.cpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/c_attr/icscalar_attr.cpp	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/c_attr/icscalar_attr.cpp	(revision 1749)
@@ -0,0 +1,348 @@
+/* ************************************************************************** *
+ *               Interface auto generated - do not modify                     *
+ * ************************************************************************** */
+
+#include <boost/multi_array.hpp>
+#include "xios.hpp"
+#include "attribute_template.hpp"
+#include "object_template.hpp"
+#include "group_template.hpp"
+#include "icutil.hpp"
+#include "icdate.hpp"
+#include "timer.hpp"
+#include "node_type.hpp"
+
+extern "C"
+{
+  typedef xios::CScalar* scalar_Ptr;
+
+  void cxios_set_scalar_axis_type(scalar_Ptr scalar_hdl, const char * axis_type, int axis_type_size)
+  {
+    std::string axis_type_str;
+    if (!cstr2string(axis_type, axis_type_size, axis_type_str)) return;
+    CTimer::get("XIOS").resume();
+    scalar_hdl->axis_type.fromString(axis_type_str);
+    CTimer::get("XIOS").suspend();
+  }
+
+  void cxios_get_scalar_axis_type(scalar_Ptr scalar_hdl, char * axis_type, int axis_type_size)
+  {
+    CTimer::get("XIOS").resume();
+    if (!string_copy(scalar_hdl->axis_type.getInheritedStringValue(), axis_type, axis_type_size))
+      ERROR("void cxios_get_scalar_axis_type(scalar_Ptr scalar_hdl, char * axis_type, int axis_type_size)", << "Input string is too short");
+    CTimer::get("XIOS").suspend();
+  }
+
+  bool cxios_is_defined_scalar_axis_type(scalar_Ptr scalar_hdl)
+  {
+     CTimer::get("XIOS").resume();
+     bool isDefined = scalar_hdl->axis_type.hasInheritedValue();
+     CTimer::get("XIOS").suspend();
+     return isDefined;
+  }
+
+
+  void cxios_set_scalar_bounds(scalar_Ptr scalar_hdl, double* bounds, int* extent)
+  {
+    CTimer::get("XIOS").resume();
+    CArray<double,1> tmp(bounds, shape(extent[0]), neverDeleteData);
+    scalar_hdl->bounds.reference(tmp.copy());
+     CTimer::get("XIOS").suspend();
+  }
+
+  void cxios_get_scalar_bounds(scalar_Ptr scalar_hdl, double* bounds, int* extent)
+  {
+    CTimer::get("XIOS").resume();
+    CArray<double,1> tmp(bounds, shape(extent[0]), neverDeleteData);
+    tmp=scalar_hdl->bounds.getInheritedValue();
+     CTimer::get("XIOS").suspend();
+  }
+
+  bool cxios_is_defined_scalar_bounds(scalar_Ptr scalar_hdl)
+  {
+     CTimer::get("XIOS").resume();
+     bool isDefined = scalar_hdl->bounds.hasInheritedValue();
+     CTimer::get("XIOS").suspend();
+     return isDefined;
+  }
+
+
+  void cxios_set_scalar_bounds_name(scalar_Ptr scalar_hdl, const char * bounds_name, int bounds_name_size)
+  {
+    std::string bounds_name_str;
+    if (!cstr2string(bounds_name, bounds_name_size, bounds_name_str)) return;
+    CTimer::get("XIOS").resume();
+    scalar_hdl->bounds_name.setValue(bounds_name_str);
+    CTimer::get("XIOS").suspend();
+  }
+
+  void cxios_get_scalar_bounds_name(scalar_Ptr scalar_hdl, char * bounds_name, int bounds_name_size)
+  {
+    CTimer::get("XIOS").resume();
+    if (!string_copy(scalar_hdl->bounds_name.getInheritedValue(), bounds_name, bounds_name_size))
+      ERROR("void cxios_get_scalar_bounds_name(scalar_Ptr scalar_hdl, char * bounds_name, int bounds_name_size)", << "Input string is too short");
+    CTimer::get("XIOS").suspend();
+  }
+
+  bool cxios_is_defined_scalar_bounds_name(scalar_Ptr scalar_hdl)
+  {
+     CTimer::get("XIOS").resume();
+     bool isDefined = scalar_hdl->bounds_name.hasInheritedValue();
+     CTimer::get("XIOS").suspend();
+     return isDefined;
+  }
+
+
+  void cxios_set_scalar_comment(scalar_Ptr scalar_hdl, const char * comment, int comment_size)
+  {
+    std::string comment_str;
+    if (!cstr2string(comment, comment_size, comment_str)) return;
+    CTimer::get("XIOS").resume();
+    scalar_hdl->comment.setValue(comment_str);
+    CTimer::get("XIOS").suspend();
+  }
+
+  void cxios_get_scalar_comment(scalar_Ptr scalar_hdl, char * comment, int comment_size)
+  {
+    CTimer::get("XIOS").resume();
+    if (!string_copy(scalar_hdl->comment.getInheritedValue(), comment, comment_size))
+      ERROR("void cxios_get_scalar_comment(scalar_Ptr scalar_hdl, char * comment, int comment_size)", << "Input string is too short");
+    CTimer::get("XIOS").suspend();
+  }
+
+  bool cxios_is_defined_scalar_comment(scalar_Ptr scalar_hdl)
+  {
+     CTimer::get("XIOS").resume();
+     bool isDefined = scalar_hdl->comment.hasInheritedValue();
+     CTimer::get("XIOS").suspend();
+     return isDefined;
+  }
+
+
+  void cxios_set_scalar_label(scalar_Ptr scalar_hdl, const char * label, int label_size)
+  {
+    std::string label_str;
+    if (!cstr2string(label, label_size, label_str)) return;
+    CTimer::get("XIOS").resume();
+    scalar_hdl->label.setValue(label_str);
+    CTimer::get("XIOS").suspend();
+  }
+
+  void cxios_get_scalar_label(scalar_Ptr scalar_hdl, char * label, int label_size)
+  {
+    CTimer::get("XIOS").resume();
+    if (!string_copy(scalar_hdl->label.getInheritedValue(), label, label_size))
+      ERROR("void cxios_get_scalar_label(scalar_Ptr scalar_hdl, char * label, int label_size)", << "Input string is too short");
+    CTimer::get("XIOS").suspend();
+  }
+
+  bool cxios_is_defined_scalar_label(scalar_Ptr scalar_hdl)
+  {
+     CTimer::get("XIOS").resume();
+     bool isDefined = scalar_hdl->label.hasInheritedValue();
+     CTimer::get("XIOS").suspend();
+     return isDefined;
+  }
+
+
+  void cxios_set_scalar_long_name(scalar_Ptr scalar_hdl, const char * long_name, int long_name_size)
+  {
+    std::string long_name_str;
+    if (!cstr2string(long_name, long_name_size, long_name_str)) return;
+    CTimer::get("XIOS").resume();
+    scalar_hdl->long_name.setValue(long_name_str);
+    CTimer::get("XIOS").suspend();
+  }
+
+  void cxios_get_scalar_long_name(scalar_Ptr scalar_hdl, char * long_name, int long_name_size)
+  {
+    CTimer::get("XIOS").resume();
+    if (!string_copy(scalar_hdl->long_name.getInheritedValue(), long_name, long_name_size))
+      ERROR("void cxios_get_scalar_long_name(scalar_Ptr scalar_hdl, char * long_name, int long_name_size)", << "Input string is too short");
+    CTimer::get("XIOS").suspend();
+  }
+
+  bool cxios_is_defined_scalar_long_name(scalar_Ptr scalar_hdl)
+  {
+     CTimer::get("XIOS").resume();
+     bool isDefined = scalar_hdl->long_name.hasInheritedValue();
+     CTimer::get("XIOS").suspend();
+     return isDefined;
+  }
+
+
+  void cxios_set_scalar_name(scalar_Ptr scalar_hdl, const char * name, int name_size)
+  {
+    std::string name_str;
+    if (!cstr2string(name, name_size, name_str)) return;
+    CTimer::get("XIOS").resume();
+    scalar_hdl->name.setValue(name_str);
+    CTimer::get("XIOS").suspend();
+  }
+
+  void cxios_get_scalar_name(scalar_Ptr scalar_hdl, char * name, int name_size)
+  {
+    CTimer::get("XIOS").resume();
+    if (!string_copy(scalar_hdl->name.getInheritedValue(), name, name_size))
+      ERROR("void cxios_get_scalar_name(scalar_Ptr scalar_hdl, char * name, int name_size)", << "Input string is too short");
+    CTimer::get("XIOS").suspend();
+  }
+
+  bool cxios_is_defined_scalar_name(scalar_Ptr scalar_hdl)
+  {
+     CTimer::get("XIOS").resume();
+     bool isDefined = scalar_hdl->name.hasInheritedValue();
+     CTimer::get("XIOS").suspend();
+     return isDefined;
+  }
+
+
+  void cxios_set_scalar_positive(scalar_Ptr scalar_hdl, const char * positive, int positive_size)
+  {
+    std::string positive_str;
+    if (!cstr2string(positive, positive_size, positive_str)) return;
+    CTimer::get("XIOS").resume();
+    scalar_hdl->positive.fromString(positive_str);
+    CTimer::get("XIOS").suspend();
+  }
+
+  void cxios_get_scalar_positive(scalar_Ptr scalar_hdl, char * positive, int positive_size)
+  {
+    CTimer::get("XIOS").resume();
+    if (!string_copy(scalar_hdl->positive.getInheritedStringValue(), positive, positive_size))
+      ERROR("void cxios_get_scalar_positive(scalar_Ptr scalar_hdl, char * positive, int positive_size)", << "Input string is too short");
+    CTimer::get("XIOS").suspend();
+  }
+
+  bool cxios_is_defined_scalar_positive(scalar_Ptr scalar_hdl)
+  {
+     CTimer::get("XIOS").resume();
+     bool isDefined = scalar_hdl->positive.hasInheritedValue();
+     CTimer::get("XIOS").suspend();
+     return isDefined;
+  }
+
+
+  void cxios_set_scalar_prec(scalar_Ptr scalar_hdl, int prec)
+  {
+    CTimer::get("XIOS").resume();
+    scalar_hdl->prec.setValue(prec);
+    CTimer::get("XIOS").suspend();
+  }
+
+  void cxios_get_scalar_prec(scalar_Ptr scalar_hdl, int* prec)
+  {
+    CTimer::get("XIOS").resume();
+    *prec = scalar_hdl->prec.getInheritedValue();
+    CTimer::get("XIOS").suspend();
+  }
+
+  bool cxios_is_defined_scalar_prec(scalar_Ptr scalar_hdl)
+  {
+     CTimer::get("XIOS").resume();
+     bool isDefined = scalar_hdl->prec.hasInheritedValue();
+     CTimer::get("XIOS").suspend();
+     return isDefined;
+  }
+
+
+  void cxios_set_scalar_scalar_ref(scalar_Ptr scalar_hdl, const char * scalar_ref, int scalar_ref_size)
+  {
+    std::string scalar_ref_str;
+    if (!cstr2string(scalar_ref, scalar_ref_size, scalar_ref_str)) return;
+    CTimer::get("XIOS").resume();
+    scalar_hdl->scalar_ref.setValue(scalar_ref_str);
+    CTimer::get("XIOS").suspend();
+  }
+
+  void cxios_get_scalar_scalar_ref(scalar_Ptr scalar_hdl, char * scalar_ref, int scalar_ref_size)
+  {
+    CTimer::get("XIOS").resume();
+    if (!string_copy(scalar_hdl->scalar_ref.getInheritedValue(), scalar_ref, scalar_ref_size))
+      ERROR("void cxios_get_scalar_scalar_ref(scalar_Ptr scalar_hdl, char * scalar_ref, int scalar_ref_size)", << "Input string is too short");
+    CTimer::get("XIOS").suspend();
+  }
+
+  bool cxios_is_defined_scalar_scalar_ref(scalar_Ptr scalar_hdl)
+  {
+     CTimer::get("XIOS").resume();
+     bool isDefined = scalar_hdl->scalar_ref.hasInheritedValue();
+     CTimer::get("XIOS").suspend();
+     return isDefined;
+  }
+
+
+  void cxios_set_scalar_standard_name(scalar_Ptr scalar_hdl, const char * standard_name, int standard_name_size)
+  {
+    std::string standard_name_str;
+    if (!cstr2string(standard_name, standard_name_size, standard_name_str)) return;
+    CTimer::get("XIOS").resume();
+    scalar_hdl->standard_name.setValue(standard_name_str);
+    CTimer::get("XIOS").suspend();
+  }
+
+  void cxios_get_scalar_standard_name(scalar_Ptr scalar_hdl, char * standard_name, int standard_name_size)
+  {
+    CTimer::get("XIOS").resume();
+    if (!string_copy(scalar_hdl->standard_name.getInheritedValue(), standard_name, standard_name_size))
+      ERROR("void cxios_get_scalar_standard_name(scalar_Ptr scalar_hdl, char * standard_name, int standard_name_size)", << "Input string is too short");
+    CTimer::get("XIOS").suspend();
+  }
+
+  bool cxios_is_defined_scalar_standard_name(scalar_Ptr scalar_hdl)
+  {
+     CTimer::get("XIOS").resume();
+     bool isDefined = scalar_hdl->standard_name.hasInheritedValue();
+     CTimer::get("XIOS").suspend();
+     return isDefined;
+  }
+
+
+  void cxios_set_scalar_unit(scalar_Ptr scalar_hdl, const char * unit, int unit_size)
+  {
+    std::string unit_str;
+    if (!cstr2string(unit, unit_size, unit_str)) return;
+    CTimer::get("XIOS").resume();
+    scalar_hdl->unit.setValue(unit_str);
+    CTimer::get("XIOS").suspend();
+  }
+
+  void cxios_get_scalar_unit(scalar_Ptr scalar_hdl, char * unit, int unit_size)
+  {
+    CTimer::get("XIOS").resume();
+    if (!string_copy(scalar_hdl->unit.getInheritedValue(), unit, unit_size))
+      ERROR("void cxios_get_scalar_unit(scalar_Ptr scalar_hdl, char * unit, int unit_size)", << "Input string is too short");
+    CTimer::get("XIOS").suspend();
+  }
+
+  bool cxios_is_defined_scalar_unit(scalar_Ptr scalar_hdl)
+  {
+     CTimer::get("XIOS").resume();
+     bool isDefined = scalar_hdl->unit.hasInheritedValue();
+     CTimer::get("XIOS").suspend();
+     return isDefined;
+  }
+
+
+  void cxios_set_scalar_value(scalar_Ptr scalar_hdl, double value)
+  {
+    CTimer::get("XIOS").resume();
+    scalar_hdl->value.setValue(value);
+    CTimer::get("XIOS").suspend();
+  }
+
+  void cxios_get_scalar_value(scalar_Ptr scalar_hdl, double* value)
+  {
+    CTimer::get("XIOS").resume();
+    *value = scalar_hdl->value.getInheritedValue();
+    CTimer::get("XIOS").suspend();
+  }
+
+  bool cxios_is_defined_scalar_value(scalar_Ptr scalar_hdl)
+  {
+     CTimer::get("XIOS").resume();
+     bool isDefined = scalar_hdl->value.hasInheritedValue();
+     CTimer::get("XIOS").suspend();
+     return isDefined;
+  }
+}
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/c_attr/icscalargroup_attr.cpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/c_attr/icscalargroup_attr.cpp	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/c_attr/icscalargroup_attr.cpp	(revision 1749)
@@ -0,0 +1,374 @@
+/* ************************************************************************** *
+ *               Interface auto generated - do not modify                     *
+ * ************************************************************************** */
+
+#include <boost/multi_array.hpp>
+#include "xios.hpp"
+#include "attribute_template.hpp"
+#include "object_template.hpp"
+#include "group_template.hpp"
+#include "icutil.hpp"
+#include "icdate.hpp"
+#include "timer.hpp"
+#include "node_type.hpp"
+
+extern "C"
+{
+  typedef xios::CScalarGroup* scalargroup_Ptr;
+
+  void cxios_set_scalargroup_axis_type(scalargroup_Ptr scalargroup_hdl, const char * axis_type, int axis_type_size)
+  {
+    std::string axis_type_str;
+    if (!cstr2string(axis_type, axis_type_size, axis_type_str)) return;
+    CTimer::get("XIOS").resume();
+    scalargroup_hdl->axis_type.fromString(axis_type_str);
+    CTimer::get("XIOS").suspend();
+  }
+
+  void cxios_get_scalargroup_axis_type(scalargroup_Ptr scalargroup_hdl, char * axis_type, int axis_type_size)
+  {
+    CTimer::get("XIOS").resume();
+    if (!string_copy(scalargroup_hdl->axis_type.getInheritedStringValue(), axis_type, axis_type_size))
+      ERROR("void cxios_get_scalargroup_axis_type(scalargroup_Ptr scalargroup_hdl, char * axis_type, int axis_type_size)", << "Input string is too short");
+    CTimer::get("XIOS").suspend();
+  }
+
+  bool cxios_is_defined_scalargroup_axis_type(scalargroup_Ptr scalargroup_hdl)
+  {
+     CTimer::get("XIOS").resume();
+     bool isDefined = scalargroup_hdl->axis_type.hasInheritedValue();
+     CTimer::get("XIOS").suspend();
+     return isDefined;
+  }
+
+
+  void cxios_set_scalargroup_bounds(scalargroup_Ptr scalargroup_hdl, double* bounds, int* extent)
+  {
+    CTimer::get("XIOS").resume();
+    CArray<double,1> tmp(bounds, shape(extent[0]), neverDeleteData);
+    scalargroup_hdl->bounds.reference(tmp.copy());
+     CTimer::get("XIOS").suspend();
+  }
+
+  void cxios_get_scalargroup_bounds(scalargroup_Ptr scalargroup_hdl, double* bounds, int* extent)
+  {
+    CTimer::get("XIOS").resume();
+    CArray<double,1> tmp(bounds, shape(extent[0]), neverDeleteData);
+    tmp=scalargroup_hdl->bounds.getInheritedValue();
+     CTimer::get("XIOS").suspend();
+  }
+
+  bool cxios_is_defined_scalargroup_bounds(scalargroup_Ptr scalargroup_hdl)
+  {
+     CTimer::get("XIOS").resume();
+     bool isDefined = scalargroup_hdl->bounds.hasInheritedValue();
+     CTimer::get("XIOS").suspend();
+     return isDefined;
+  }
+
+
+  void cxios_set_scalargroup_bounds_name(scalargroup_Ptr scalargroup_hdl, const char * bounds_name, int bounds_name_size)
+  {
+    std::string bounds_name_str;
+    if (!cstr2string(bounds_name, bounds_name_size, bounds_name_str)) return;
+    CTimer::get("XIOS").resume();
+    scalargroup_hdl->bounds_name.setValue(bounds_name_str);
+    CTimer::get("XIOS").suspend();
+  }
+
+  void cxios_get_scalargroup_bounds_name(scalargroup_Ptr scalargroup_hdl, char * bounds_name, int bounds_name_size)
+  {
+    CTimer::get("XIOS").resume();
+    if (!string_copy(scalargroup_hdl->bounds_name.getInheritedValue(), bounds_name, bounds_name_size))
+      ERROR("void cxios_get_scalargroup_bounds_name(scalargroup_Ptr scalargroup_hdl, char * bounds_name, int bounds_name_size)", << "Input string is too short");
+    CTimer::get("XIOS").suspend();
+  }
+
+  bool cxios_is_defined_scalargroup_bounds_name(scalargroup_Ptr scalargroup_hdl)
+  {
+     CTimer::get("XIOS").resume();
+     bool isDefined = scalargroup_hdl->bounds_name.hasInheritedValue();
+     CTimer::get("XIOS").suspend();
+     return isDefined;
+  }
+
+
+  void cxios_set_scalargroup_comment(scalargroup_Ptr scalargroup_hdl, const char * comment, int comment_size)
+  {
+    std::string comment_str;
+    if (!cstr2string(comment, comment_size, comment_str)) return;
+    CTimer::get("XIOS").resume();
+    scalargroup_hdl->comment.setValue(comment_str);
+    CTimer::get("XIOS").suspend();
+  }
+
+  void cxios_get_scalargroup_comment(scalargroup_Ptr scalargroup_hdl, char * comment, int comment_size)
+  {
+    CTimer::get("XIOS").resume();
+    if (!string_copy(scalargroup_hdl->comment.getInheritedValue(), comment, comment_size))
+      ERROR("void cxios_get_scalargroup_comment(scalargroup_Ptr scalargroup_hdl, char * comment, int comment_size)", << "Input string is too short");
+    CTimer::get("XIOS").suspend();
+  }
+
+  bool cxios_is_defined_scalargroup_comment(scalargroup_Ptr scalargroup_hdl)
+  {
+     CTimer::get("XIOS").resume();
+     bool isDefined = scalargroup_hdl->comment.hasInheritedValue();
+     CTimer::get("XIOS").suspend();
+     return isDefined;
+  }
+
+
+  void cxios_set_scalargroup_group_ref(scalargroup_Ptr scalargroup_hdl, const char * group_ref, int group_ref_size)
+  {
+    std::string group_ref_str;
+    if (!cstr2string(group_ref, group_ref_size, group_ref_str)) return;
+    CTimer::get("XIOS").resume();
+    scalargroup_hdl->group_ref.setValue(group_ref_str);
+    CTimer::get("XIOS").suspend();
+  }
+
+  void cxios_get_scalargroup_group_ref(scalargroup_Ptr scalargroup_hdl, char * group_ref, int group_ref_size)
+  {
+    CTimer::get("XIOS").resume();
+    if (!string_copy(scalargroup_hdl->group_ref.getInheritedValue(), group_ref, group_ref_size))
+      ERROR("void cxios_get_scalargroup_group_ref(scalargroup_Ptr scalargroup_hdl, char * group_ref, int group_ref_size)", << "Input string is too short");
+    CTimer::get("XIOS").suspend();
+  }
+
+  bool cxios_is_defined_scalargroup_group_ref(scalargroup_Ptr scalargroup_hdl)
+  {
+     CTimer::get("XIOS").resume();
+     bool isDefined = scalargroup_hdl->group_ref.hasInheritedValue();
+     CTimer::get("XIOS").suspend();
+     return isDefined;
+  }
+
+
+  void cxios_set_scalargroup_label(scalargroup_Ptr scalargroup_hdl, const char * label, int label_size)
+  {
+    std::string label_str;
+    if (!cstr2string(label, label_size, label_str)) return;
+    CTimer::get("XIOS").resume();
+    scalargroup_hdl->label.setValue(label_str);
+    CTimer::get("XIOS").suspend();
+  }
+
+  void cxios_get_scalargroup_label(scalargroup_Ptr scalargroup_hdl, char * label, int label_size)
+  {
+    CTimer::get("XIOS").resume();
+    if (!string_copy(scalargroup_hdl->label.getInheritedValue(), label, label_size))
+      ERROR("void cxios_get_scalargroup_label(scalargroup_Ptr scalargroup_hdl, char * label, int label_size)", << "Input string is too short");
+    CTimer::get("XIOS").suspend();
+  }
+
+  bool cxios_is_defined_scalargroup_label(scalargroup_Ptr scalargroup_hdl)
+  {
+     CTimer::get("XIOS").resume();
+     bool isDefined = scalargroup_hdl->label.hasInheritedValue();
+     CTimer::get("XIOS").suspend();
+     return isDefined;
+  }
+
+
+  void cxios_set_scalargroup_long_name(scalargroup_Ptr scalargroup_hdl, const char * long_name, int long_name_size)
+  {
+    std::string long_name_str;
+    if (!cstr2string(long_name, long_name_size, long_name_str)) return;
+    CTimer::get("XIOS").resume();
+    scalargroup_hdl->long_name.setValue(long_name_str);
+    CTimer::get("XIOS").suspend();
+  }
+
+  void cxios_get_scalargroup_long_name(scalargroup_Ptr scalargroup_hdl, char * long_name, int long_name_size)
+  {
+    CTimer::get("XIOS").resume();
+    if (!string_copy(scalargroup_hdl->long_name.getInheritedValue(), long_name, long_name_size))
+      ERROR("void cxios_get_scalargroup_long_name(scalargroup_Ptr scalargroup_hdl, char * long_name, int long_name_size)", << "Input string is too short");
+    CTimer::get("XIOS").suspend();
+  }
+
+  bool cxios_is_defined_scalargroup_long_name(scalargroup_Ptr scalargroup_hdl)
+  {
+     CTimer::get("XIOS").resume();
+     bool isDefined = scalargroup_hdl->long_name.hasInheritedValue();
+     CTimer::get("XIOS").suspend();
+     return isDefined;
+  }
+
+
+  void cxios_set_scalargroup_name(scalargroup_Ptr scalargroup_hdl, const char * name, int name_size)
+  {
+    std::string name_str;
+    if (!cstr2string(name, name_size, name_str)) return;
+    CTimer::get("XIOS").resume();
+    scalargroup_hdl->name.setValue(name_str);
+    CTimer::get("XIOS").suspend();
+  }
+
+  void cxios_get_scalargroup_name(scalargroup_Ptr scalargroup_hdl, char * name, int name_size)
+  {
+    CTimer::get("XIOS").resume();
+    if (!string_copy(scalargroup_hdl->name.getInheritedValue(), name, name_size))
+      ERROR("void cxios_get_scalargroup_name(scalargroup_Ptr scalargroup_hdl, char * name, int name_size)", << "Input string is too short");
+    CTimer::get("XIOS").suspend();
+  }
+
+  bool cxios_is_defined_scalargroup_name(scalargroup_Ptr scalargroup_hdl)
+  {
+     CTimer::get("XIOS").resume();
+     bool isDefined = scalargroup_hdl->name.hasInheritedValue();
+     CTimer::get("XIOS").suspend();
+     return isDefined;
+  }
+
+
+  void cxios_set_scalargroup_positive(scalargroup_Ptr scalargroup_hdl, const char * positive, int positive_size)
+  {
+    std::string positive_str;
+    if (!cstr2string(positive, positive_size, positive_str)) return;
+    CTimer::get("XIOS").resume();
+    scalargroup_hdl->positive.fromString(positive_str);
+    CTimer::get("XIOS").suspend();
+  }
+
+  void cxios_get_scalargroup_positive(scalargroup_Ptr scalargroup_hdl, char * positive, int positive_size)
+  {
+    CTimer::get("XIOS").resume();
+    if (!string_copy(scalargroup_hdl->positive.getInheritedStringValue(), positive, positive_size))
+      ERROR("void cxios_get_scalargroup_positive(scalargroup_Ptr scalargroup_hdl, char * positive, int positive_size)", << "Input string is too short");
+    CTimer::get("XIOS").suspend();
+  }
+
+  bool cxios_is_defined_scalargroup_positive(scalargroup_Ptr scalargroup_hdl)
+  {
+     CTimer::get("XIOS").resume();
+     bool isDefined = scalargroup_hdl->positive.hasInheritedValue();
+     CTimer::get("XIOS").suspend();
+     return isDefined;
+  }
+
+
+  void cxios_set_scalargroup_prec(scalargroup_Ptr scalargroup_hdl, int prec)
+  {
+    CTimer::get("XIOS").resume();
+    scalargroup_hdl->prec.setValue(prec);
+    CTimer::get("XIOS").suspend();
+  }
+
+  void cxios_get_scalargroup_prec(scalargroup_Ptr scalargroup_hdl, int* prec)
+  {
+    CTimer::get("XIOS").resume();
+    *prec = scalargroup_hdl->prec.getInheritedValue();
+    CTimer::get("XIOS").suspend();
+  }
+
+  bool cxios_is_defined_scalargroup_prec(scalargroup_Ptr scalargroup_hdl)
+  {
+     CTimer::get("XIOS").resume();
+     bool isDefined = scalargroup_hdl->prec.hasInheritedValue();
+     CTimer::get("XIOS").suspend();
+     return isDefined;
+  }
+
+
+  void cxios_set_scalargroup_scalar_ref(scalargroup_Ptr scalargroup_hdl, const char * scalar_ref, int scalar_ref_size)
+  {
+    std::string scalar_ref_str;
+    if (!cstr2string(scalar_ref, scalar_ref_size, scalar_ref_str)) return;
+    CTimer::get("XIOS").resume();
+    scalargroup_hdl->scalar_ref.setValue(scalar_ref_str);
+    CTimer::get("XIOS").suspend();
+  }
+
+  void cxios_get_scalargroup_scalar_ref(scalargroup_Ptr scalargroup_hdl, char * scalar_ref, int scalar_ref_size)
+  {
+    CTimer::get("XIOS").resume();
+    if (!string_copy(scalargroup_hdl->scalar_ref.getInheritedValue(), scalar_ref, scalar_ref_size))
+      ERROR("void cxios_get_scalargroup_scalar_ref(scalargroup_Ptr scalargroup_hdl, char * scalar_ref, int scalar_ref_size)", << "Input string is too short");
+    CTimer::get("XIOS").suspend();
+  }
+
+  bool cxios_is_defined_scalargroup_scalar_ref(scalargroup_Ptr scalargroup_hdl)
+  {
+     CTimer::get("XIOS").resume();
+     bool isDefined = scalargroup_hdl->scalar_ref.hasInheritedValue();
+     CTimer::get("XIOS").suspend();
+     return isDefined;
+  }
+
+
+  void cxios_set_scalargroup_standard_name(scalargroup_Ptr scalargroup_hdl, const char * standard_name, int standard_name_size)
+  {
+    std::string standard_name_str;
+    if (!cstr2string(standard_name, standard_name_size, standard_name_str)) return;
+    CTimer::get("XIOS").resume();
+    scalargroup_hdl->standard_name.setValue(standard_name_str);
+    CTimer::get("XIOS").suspend();
+  }
+
+  void cxios_get_scalargroup_standard_name(scalargroup_Ptr scalargroup_hdl, char * standard_name, int standard_name_size)
+  {
+    CTimer::get("XIOS").resume();
+    if (!string_copy(scalargroup_hdl->standard_name.getInheritedValue(), standard_name, standard_name_size))
+      ERROR("void cxios_get_scalargroup_standard_name(scalargroup_Ptr scalargroup_hdl, char * standard_name, int standard_name_size)", << "Input string is too short");
+    CTimer::get("XIOS").suspend();
+  }
+
+  bool cxios_is_defined_scalargroup_standard_name(scalargroup_Ptr scalargroup_hdl)
+  {
+     CTimer::get("XIOS").resume();
+     bool isDefined = scalargroup_hdl->standard_name.hasInheritedValue();
+     CTimer::get("XIOS").suspend();
+     return isDefined;
+  }
+
+
+  void cxios_set_scalargroup_unit(scalargroup_Ptr scalargroup_hdl, const char * unit, int unit_size)
+  {
+    std::string unit_str;
+    if (!cstr2string(unit, unit_size, unit_str)) return;
+    CTimer::get("XIOS").resume();
+    scalargroup_hdl->unit.setValue(unit_str);
+    CTimer::get("XIOS").suspend();
+  }
+
+  void cxios_get_scalargroup_unit(scalargroup_Ptr scalargroup_hdl, char * unit, int unit_size)
+  {
+    CTimer::get("XIOS").resume();
+    if (!string_copy(scalargroup_hdl->unit.getInheritedValue(), unit, unit_size))
+      ERROR("void cxios_get_scalargroup_unit(scalargroup_Ptr scalargroup_hdl, char * unit, int unit_size)", << "Input string is too short");
+    CTimer::get("XIOS").suspend();
+  }
+
+  bool cxios_is_defined_scalargroup_unit(scalargroup_Ptr scalargroup_hdl)
+  {
+     CTimer::get("XIOS").resume();
+     bool isDefined = scalargroup_hdl->unit.hasInheritedValue();
+     CTimer::get("XIOS").suspend();
+     return isDefined;
+  }
+
+
+  void cxios_set_scalargroup_value(scalargroup_Ptr scalargroup_hdl, double value)
+  {
+    CTimer::get("XIOS").resume();
+    scalargroup_hdl->value.setValue(value);
+    CTimer::get("XIOS").suspend();
+  }
+
+  void cxios_get_scalargroup_value(scalargroup_Ptr scalargroup_hdl, double* value)
+  {
+    CTimer::get("XIOS").resume();
+    *value = scalargroup_hdl->value.getInheritedValue();
+    CTimer::get("XIOS").suspend();
+  }
+
+  bool cxios_is_defined_scalargroup_value(scalargroup_Ptr scalargroup_hdl)
+  {
+     CTimer::get("XIOS").resume();
+     bool isDefined = scalargroup_hdl->value.hasInheritedValue();
+     CTimer::get("XIOS").suspend();
+     return isDefined;
+  }
+}
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/c_attr/ictemporal_splitting_attr.cpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/c_attr/ictemporal_splitting_attr.cpp	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/c_attr/ictemporal_splitting_attr.cpp	(revision 1749)
@@ -0,0 +1,17 @@
+/* ************************************************************************** *
+ *               Interface auto generated - do not modify                     *
+ * ************************************************************************** */
+
+#include <boost/multi_array.hpp>
+#include "xios.hpp"
+#include "attribute_template.hpp"
+#include "object_template.hpp"
+#include "group_template.hpp"
+#include "icutil.hpp"
+#include "icdate.hpp"
+#include "timer.hpp"
+#include "node_type.hpp"
+
+extern "C"
+{
+  typedef xios::CTemporalSplitting* temporal_splitting_Ptr;}
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/c_attr/icvariable_attr.cpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/c_attr/icvariable_attr.cpp	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/c_attr/icvariable_attr.cpp	(revision 1749)
@@ -0,0 +1,95 @@
+/* ************************************************************************** *
+ *               Interface auto generated - do not modify                     *
+ * ************************************************************************** */
+
+#include <boost/multi_array.hpp>
+#include "xios.hpp"
+#include "attribute_template.hpp"
+#include "object_template.hpp"
+#include "group_template.hpp"
+#include "icutil.hpp"
+#include "icdate.hpp"
+#include "timer.hpp"
+#include "node_type.hpp"
+
+extern "C"
+{
+  typedef xios::CVariable* variable_Ptr;
+
+  void cxios_set_variable_name(variable_Ptr variable_hdl, const char * name, int name_size)
+  {
+    std::string name_str;
+    if (!cstr2string(name, name_size, name_str)) return;
+    CTimer::get("XIOS").resume();
+    variable_hdl->name.setValue(name_str);
+    CTimer::get("XIOS").suspend();
+  }
+
+  void cxios_get_variable_name(variable_Ptr variable_hdl, char * name, int name_size)
+  {
+    CTimer::get("XIOS").resume();
+    if (!string_copy(variable_hdl->name.getInheritedValue(), name, name_size))
+      ERROR("void cxios_get_variable_name(variable_Ptr variable_hdl, char * name, int name_size)", << "Input string is too short");
+    CTimer::get("XIOS").suspend();
+  }
+
+  bool cxios_is_defined_variable_name(variable_Ptr variable_hdl)
+  {
+     CTimer::get("XIOS").resume();
+     bool isDefined = variable_hdl->name.hasInheritedValue();
+     CTimer::get("XIOS").suspend();
+     return isDefined;
+  }
+
+
+  void cxios_set_variable_ts_target(variable_Ptr variable_hdl, const char * ts_target, int ts_target_size)
+  {
+    std::string ts_target_str;
+    if (!cstr2string(ts_target, ts_target_size, ts_target_str)) return;
+    CTimer::get("XIOS").resume();
+    variable_hdl->ts_target.fromString(ts_target_str);
+    CTimer::get("XIOS").suspend();
+  }
+
+  void cxios_get_variable_ts_target(variable_Ptr variable_hdl, char * ts_target, int ts_target_size)
+  {
+    CTimer::get("XIOS").resume();
+    if (!string_copy(variable_hdl->ts_target.getInheritedStringValue(), ts_target, ts_target_size))
+      ERROR("void cxios_get_variable_ts_target(variable_Ptr variable_hdl, char * ts_target, int ts_target_size)", << "Input string is too short");
+    CTimer::get("XIOS").suspend();
+  }
+
+  bool cxios_is_defined_variable_ts_target(variable_Ptr variable_hdl)
+  {
+     CTimer::get("XIOS").resume();
+     bool isDefined = variable_hdl->ts_target.hasInheritedValue();
+     CTimer::get("XIOS").suspend();
+     return isDefined;
+  }
+
+
+  void cxios_set_variable_type(variable_Ptr variable_hdl, const char * type, int type_size)
+  {
+    std::string type_str;
+    if (!cstr2string(type, type_size, type_str)) return;
+    CTimer::get("XIOS").resume();
+    variable_hdl->type.fromString(type_str);
+    CTimer::get("XIOS").suspend();
+  }
+
+  void cxios_get_variable_type(variable_Ptr variable_hdl, char * type, int type_size)
+  {
+    CTimer::get("XIOS").resume();
+    if (!string_copy(variable_hdl->type.getInheritedStringValue(), type, type_size))
+      ERROR("void cxios_get_variable_type(variable_Ptr variable_hdl, char * type, int type_size)", << "Input string is too short");
+    CTimer::get("XIOS").suspend();
+  }
+
+  bool cxios_is_defined_variable_type(variable_Ptr variable_hdl)
+  {
+     CTimer::get("XIOS").resume();
+     bool isDefined = variable_hdl->type.hasInheritedValue();
+     CTimer::get("XIOS").suspend();
+     return isDefined;
+  }
+}
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/c_attr/icvariablegroup_attr.cpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/c_attr/icvariablegroup_attr.cpp	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/c_attr/icvariablegroup_attr.cpp	(revision 1749)
@@ -0,0 +1,121 @@
+/* ************************************************************************** *
+ *               Interface auto generated - do not modify                     *
+ * ************************************************************************** */
+
+#include <boost/multi_array.hpp>
+#include "xios.hpp"
+#include "attribute_template.hpp"
+#include "object_template.hpp"
+#include "group_template.hpp"
+#include "icutil.hpp"
+#include "icdate.hpp"
+#include "timer.hpp"
+#include "node_type.hpp"
+
+extern "C"
+{
+  typedef xios::CVariableGroup* variablegroup_Ptr;
+
+  void cxios_set_variablegroup_group_ref(variablegroup_Ptr variablegroup_hdl, const char * group_ref, int group_ref_size)
+  {
+    std::string group_ref_str;
+    if (!cstr2string(group_ref, group_ref_size, group_ref_str)) return;
+    CTimer::get("XIOS").resume();
+    variablegroup_hdl->group_ref.setValue(group_ref_str);
+    CTimer::get("XIOS").suspend();
+  }
+
+  void cxios_get_variablegroup_group_ref(variablegroup_Ptr variablegroup_hdl, char * group_ref, int group_ref_size)
+  {
+    CTimer::get("XIOS").resume();
+    if (!string_copy(variablegroup_hdl->group_ref.getInheritedValue(), group_ref, group_ref_size))
+      ERROR("void cxios_get_variablegroup_group_ref(variablegroup_Ptr variablegroup_hdl, char * group_ref, int group_ref_size)", << "Input string is too short");
+    CTimer::get("XIOS").suspend();
+  }
+
+  bool cxios_is_defined_variablegroup_group_ref(variablegroup_Ptr variablegroup_hdl)
+  {
+     CTimer::get("XIOS").resume();
+     bool isDefined = variablegroup_hdl->group_ref.hasInheritedValue();
+     CTimer::get("XIOS").suspend();
+     return isDefined;
+  }
+
+
+  void cxios_set_variablegroup_name(variablegroup_Ptr variablegroup_hdl, const char * name, int name_size)
+  {
+    std::string name_str;
+    if (!cstr2string(name, name_size, name_str)) return;
+    CTimer::get("XIOS").resume();
+    variablegroup_hdl->name.setValue(name_str);
+    CTimer::get("XIOS").suspend();
+  }
+
+  void cxios_get_variablegroup_name(variablegroup_Ptr variablegroup_hdl, char * name, int name_size)
+  {
+    CTimer::get("XIOS").resume();
+    if (!string_copy(variablegroup_hdl->name.getInheritedValue(), name, name_size))
+      ERROR("void cxios_get_variablegroup_name(variablegroup_Ptr variablegroup_hdl, char * name, int name_size)", << "Input string is too short");
+    CTimer::get("XIOS").suspend();
+  }
+
+  bool cxios_is_defined_variablegroup_name(variablegroup_Ptr variablegroup_hdl)
+  {
+     CTimer::get("XIOS").resume();
+     bool isDefined = variablegroup_hdl->name.hasInheritedValue();
+     CTimer::get("XIOS").suspend();
+     return isDefined;
+  }
+
+
+  void cxios_set_variablegroup_ts_target(variablegroup_Ptr variablegroup_hdl, const char * ts_target, int ts_target_size)
+  {
+    std::string ts_target_str;
+    if (!cstr2string(ts_target, ts_target_size, ts_target_str)) return;
+    CTimer::get("XIOS").resume();
+    variablegroup_hdl->ts_target.fromString(ts_target_str);
+    CTimer::get("XIOS").suspend();
+  }
+
+  void cxios_get_variablegroup_ts_target(variablegroup_Ptr variablegroup_hdl, char * ts_target, int ts_target_size)
+  {
+    CTimer::get("XIOS").resume();
+    if (!string_copy(variablegroup_hdl->ts_target.getInheritedStringValue(), ts_target, ts_target_size))
+      ERROR("void cxios_get_variablegroup_ts_target(variablegroup_Ptr variablegroup_hdl, char * ts_target, int ts_target_size)", << "Input string is too short");
+    CTimer::get("XIOS").suspend();
+  }
+
+  bool cxios_is_defined_variablegroup_ts_target(variablegroup_Ptr variablegroup_hdl)
+  {
+     CTimer::get("XIOS").resume();
+     bool isDefined = variablegroup_hdl->ts_target.hasInheritedValue();
+     CTimer::get("XIOS").suspend();
+     return isDefined;
+  }
+
+
+  void cxios_set_variablegroup_type(variablegroup_Ptr variablegroup_hdl, const char * type, int type_size)
+  {
+    std::string type_str;
+    if (!cstr2string(type, type_size, type_str)) return;
+    CTimer::get("XIOS").resume();
+    variablegroup_hdl->type.fromString(type_str);
+    CTimer::get("XIOS").suspend();
+  }
+
+  void cxios_get_variablegroup_type(variablegroup_Ptr variablegroup_hdl, char * type, int type_size)
+  {
+    CTimer::get("XIOS").resume();
+    if (!string_copy(variablegroup_hdl->type.getInheritedStringValue(), type, type_size))
+      ERROR("void cxios_get_variablegroup_type(variablegroup_Ptr variablegroup_hdl, char * type, int type_size)", << "Input string is too short");
+    CTimer::get("XIOS").suspend();
+  }
+
+  bool cxios_is_defined_variablegroup_type(variablegroup_Ptr variablegroup_hdl)
+  {
+     CTimer::get("XIOS").resume();
+     bool isDefined = variablegroup_hdl->type.hasInheritedValue();
+     CTimer::get("XIOS").suspend();
+     return isDefined;
+  }
+}
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/c_attr/iczoom_axis_attr.cpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/c_attr/iczoom_axis_attr.cpp	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/c_attr/iczoom_axis_attr.cpp	(revision 1749)
@@ -0,0 +1,88 @@
+/* ************************************************************************** *
+ *               Interface auto generated - do not modify                     *
+ * ************************************************************************** */
+
+#include <boost/multi_array.hpp>
+#include "xios.hpp"
+#include "attribute_template.hpp"
+#include "object_template.hpp"
+#include "group_template.hpp"
+#include "icutil.hpp"
+#include "icdate.hpp"
+#include "timer.hpp"
+#include "node_type.hpp"
+
+extern "C"
+{
+  typedef xios::CZoomAxis* zoom_axis_Ptr;
+
+  void cxios_set_zoom_axis_begin(zoom_axis_Ptr zoom_axis_hdl, int begin)
+  {
+    CTimer::get("XIOS").resume();
+    zoom_axis_hdl->begin.setValue(begin);
+    CTimer::get("XIOS").suspend();
+  }
+
+  void cxios_get_zoom_axis_begin(zoom_axis_Ptr zoom_axis_hdl, int* begin)
+  {
+    CTimer::get("XIOS").resume();
+    *begin = zoom_axis_hdl->begin.getInheritedValue();
+    CTimer::get("XIOS").suspend();
+  }
+
+  bool cxios_is_defined_zoom_axis_begin(zoom_axis_Ptr zoom_axis_hdl)
+  {
+     CTimer::get("XIOS").resume();
+     bool isDefined = zoom_axis_hdl->begin.hasInheritedValue();
+     CTimer::get("XIOS").suspend();
+     return isDefined;
+  }
+
+
+  void cxios_set_zoom_axis_index(zoom_axis_Ptr zoom_axis_hdl, int* index, int* extent)
+  {
+    CTimer::get("XIOS").resume();
+    CArray<int,1> tmp(index, shape(extent[0]), neverDeleteData);
+    zoom_axis_hdl->index.reference(tmp.copy());
+     CTimer::get("XIOS").suspend();
+  }
+
+  void cxios_get_zoom_axis_index(zoom_axis_Ptr zoom_axis_hdl, int* index, int* extent)
+  {
+    CTimer::get("XIOS").resume();
+    CArray<int,1> tmp(index, shape(extent[0]), neverDeleteData);
+    tmp=zoom_axis_hdl->index.getInheritedValue();
+     CTimer::get("XIOS").suspend();
+  }
+
+  bool cxios_is_defined_zoom_axis_index(zoom_axis_Ptr zoom_axis_hdl)
+  {
+     CTimer::get("XIOS").resume();
+     bool isDefined = zoom_axis_hdl->index.hasInheritedValue();
+     CTimer::get("XIOS").suspend();
+     return isDefined;
+  }
+
+
+  void cxios_set_zoom_axis_n(zoom_axis_Ptr zoom_axis_hdl, int n)
+  {
+    CTimer::get("XIOS").resume();
+    zoom_axis_hdl->n.setValue(n);
+    CTimer::get("XIOS").suspend();
+  }
+
+  void cxios_get_zoom_axis_n(zoom_axis_Ptr zoom_axis_hdl, int* n)
+  {
+    CTimer::get("XIOS").resume();
+    *n = zoom_axis_hdl->n.getInheritedValue();
+    CTimer::get("XIOS").suspend();
+  }
+
+  bool cxios_is_defined_zoom_axis_n(zoom_axis_Ptr zoom_axis_hdl)
+  {
+     CTimer::get("XIOS").resume();
+     bool isDefined = zoom_axis_hdl->n.hasInheritedValue();
+     CTimer::get("XIOS").suspend();
+     return isDefined;
+  }
+}
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/c_attr/iczoom_domain_attr.cpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/c_attr/iczoom_domain_attr.cpp	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/c_attr/iczoom_domain_attr.cpp	(revision 1749)
@@ -0,0 +1,109 @@
+/* ************************************************************************** *
+ *               Interface auto generated - do not modify                     *
+ * ************************************************************************** */
+
+#include <boost/multi_array.hpp>
+#include "xios.hpp"
+#include "attribute_template.hpp"
+#include "object_template.hpp"
+#include "group_template.hpp"
+#include "icutil.hpp"
+#include "icdate.hpp"
+#include "timer.hpp"
+#include "node_type.hpp"
+
+extern "C"
+{
+  typedef xios::CZoomDomain* zoom_domain_Ptr;
+
+  void cxios_set_zoom_domain_ibegin(zoom_domain_Ptr zoom_domain_hdl, int ibegin)
+  {
+    CTimer::get("XIOS").resume();
+    zoom_domain_hdl->ibegin.setValue(ibegin);
+    CTimer::get("XIOS").suspend();
+  }
+
+  void cxios_get_zoom_domain_ibegin(zoom_domain_Ptr zoom_domain_hdl, int* ibegin)
+  {
+    CTimer::get("XIOS").resume();
+    *ibegin = zoom_domain_hdl->ibegin.getInheritedValue();
+    CTimer::get("XIOS").suspend();
+  }
+
+  bool cxios_is_defined_zoom_domain_ibegin(zoom_domain_Ptr zoom_domain_hdl)
+  {
+     CTimer::get("XIOS").resume();
+     bool isDefined = zoom_domain_hdl->ibegin.hasInheritedValue();
+     CTimer::get("XIOS").suspend();
+     return isDefined;
+  }
+
+
+  void cxios_set_zoom_domain_jbegin(zoom_domain_Ptr zoom_domain_hdl, int jbegin)
+  {
+    CTimer::get("XIOS").resume();
+    zoom_domain_hdl->jbegin.setValue(jbegin);
+    CTimer::get("XIOS").suspend();
+  }
+
+  void cxios_get_zoom_domain_jbegin(zoom_domain_Ptr zoom_domain_hdl, int* jbegin)
+  {
+    CTimer::get("XIOS").resume();
+    *jbegin = zoom_domain_hdl->jbegin.getInheritedValue();
+    CTimer::get("XIOS").suspend();
+  }
+
+  bool cxios_is_defined_zoom_domain_jbegin(zoom_domain_Ptr zoom_domain_hdl)
+  {
+     CTimer::get("XIOS").resume();
+     bool isDefined = zoom_domain_hdl->jbegin.hasInheritedValue();
+     CTimer::get("XIOS").suspend();
+     return isDefined;
+  }
+
+
+  void cxios_set_zoom_domain_ni(zoom_domain_Ptr zoom_domain_hdl, int ni)
+  {
+    CTimer::get("XIOS").resume();
+    zoom_domain_hdl->ni.setValue(ni);
+    CTimer::get("XIOS").suspend();
+  }
+
+  void cxios_get_zoom_domain_ni(zoom_domain_Ptr zoom_domain_hdl, int* ni)
+  {
+    CTimer::get("XIOS").resume();
+    *ni = zoom_domain_hdl->ni.getInheritedValue();
+    CTimer::get("XIOS").suspend();
+  }
+
+  bool cxios_is_defined_zoom_domain_ni(zoom_domain_Ptr zoom_domain_hdl)
+  {
+     CTimer::get("XIOS").resume();
+     bool isDefined = zoom_domain_hdl->ni.hasInheritedValue();
+     CTimer::get("XIOS").suspend();
+     return isDefined;
+  }
+
+
+  void cxios_set_zoom_domain_nj(zoom_domain_Ptr zoom_domain_hdl, int nj)
+  {
+    CTimer::get("XIOS").resume();
+    zoom_domain_hdl->nj.setValue(nj);
+    CTimer::get("XIOS").suspend();
+  }
+
+  void cxios_get_zoom_domain_nj(zoom_domain_Ptr zoom_domain_hdl, int* nj)
+  {
+    CTimer::get("XIOS").resume();
+    *nj = zoom_domain_hdl->nj.getInheritedValue();
+    CTimer::get("XIOS").suspend();
+  }
+
+  bool cxios_is_defined_zoom_domain_nj(zoom_domain_Ptr zoom_domain_hdl)
+  {
+     CTimer::get("XIOS").resume();
+     bool isDefined = zoom_domain_hdl->nj.hasInheritedValue();
+     CTimer::get("XIOS").suspend();
+     return isDefined;
+  }
+}
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/fortran/axis_interface.f90
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/fortran/axis_interface.f90	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/fortran/axis_interface.f90	(revision 1749)
@@ -0,0 +1,22 @@
+MODULE AXIS_INTERFACE
+   USE, INTRINSIC :: ISO_C_BINDING
+     
+   INTERFACE ! Ne pas appeler directement/Interface FORTRAN 2003 <-> C99
+     
+      SUBROUTINE cxios_axis_handle_create(ret, idt, idt_size) BIND(C)
+         USE ISO_C_BINDING
+         INTEGER  (kind = C_INTPTR_T)               :: ret
+         CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: idt
+         INTEGER  (kind = C_INT)     , VALUE        :: idt_size
+      END SUBROUTINE cxios_axis_handle_create
+
+      SUBROUTINE cxios_axis_valid_id(ret, idt, idt_size) BIND(C)
+         USE ISO_C_BINDING
+         LOGICAL  (kind = C_BOOL)                   :: ret
+         CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: idt
+         INTEGER  (kind = C_INT)     , VALUE        :: idt_size
+      END SUBROUTINE cxios_axis_valid_id
+
+   END INTERFACE
+     
+END MODULE AXIS_INTERFACE
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/fortran/axisgroup_interface.f90
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/fortran/axisgroup_interface.f90	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/fortran/axisgroup_interface.f90	(revision 1749)
@@ -0,0 +1,23 @@
+MODULE AXISGROUP_INTERFACE
+   USE, INTRINSIC :: ISO_C_BINDING
+     
+   INTERFACE ! Ne pas appeler directement/Interface FORTRAN 2003 <-> C99
+     
+  
+      SUBROUTINE cxios_axisgroup_handle_create(ret, idt, idt_size) BIND(C)
+         USE ISO_C_BINDING
+         INTEGER  (kind = C_INTPTR_T)               :: ret
+         CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: idt
+         INTEGER  (kind = C_INT)     , VALUE        :: idt_size
+      END SUBROUTINE cxios_axisgroup_handle_create
+
+      SUBROUTINE cxios_axisgroup_valid_id(ret, idt, idt_size) BIND(C)
+         USE ISO_C_BINDING
+         LOGICAL  (kind = C_BOOL)                   :: ret
+         CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: idt
+         INTEGER  (kind = C_INT)     , VALUE        :: idt_size
+      END SUBROUTINE cxios_axisgroup_valid_id
+
+   END INTERFACE
+     
+END MODULE AXISGROUP_INTERFACE
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/fortran/calendar_interface.F90
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/fortran/calendar_interface.F90	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/fortran/calendar_interface.F90	(revision 1749)
@@ -0,0 +1,29 @@
+#include "xios_fortran_prefix.hpp"
+
+MODULE CALENDAR_INTERFACE
+   USE, INTRINSIC :: ISO_C_BINDING
+
+   INTERFACE ! Ne pas appeler directement/Interface FORTRAN 2003 <-> C99
+
+      SUBROUTINE cxios_update_calendar(step) BIND(C)
+         IMPORT C_INT
+         INTEGER (kind = C_INT), VALUE :: step
+      END SUBROUTINE cxios_update_calendar
+
+      SUBROUTINE cxios_get_current_date(current_date) BIND(C)
+         USE IDATE
+         TYPE(txios(date))             :: current_date
+      END SUBROUTINE cxios_get_current_date
+
+      INTEGER(kind = C_INT) FUNCTION cxios_get_year_length_in_seconds(year) BIND(C)
+         USE ISO_C_BINDING
+         INTEGER(kind = C_INT), VALUE :: year
+      END FUNCTION cxios_get_year_length_in_seconds
+
+      INTEGER(kind = C_INT) FUNCTION cxios_get_day_length_in_seconds() BIND(C)
+         USE ISO_C_BINDING
+      END FUNCTION cxios_get_day_length_in_seconds
+
+   END INTERFACE
+
+END MODULE CALENDAR_INTERFACE
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/fortran/calendar_wrapper_interface.F90
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/fortran/calendar_wrapper_interface.F90	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/fortran/calendar_wrapper_interface.F90	(revision 1749)
@@ -0,0 +1,67 @@
+#include "../fortran/xios_fortran_prefix.hpp"
+
+MODULE CALENDAR_WRAPPER_INTERFACE
+   USE, INTRINSIC :: ISO_C_BINDING
+
+   INTERFACE ! Ne pas appeler directement/Interface FORTRAN 2003 <-> C99
+
+      SUBROUTINE cxios_calendar_wrapper_handle_create(ret, idt, idt_size) BIND(C)
+         USE ISO_C_BINDING
+         INTEGER  (kind = C_INTPTR_T)               :: ret
+         CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: idt
+         INTEGER  (kind = C_INT)     , VALUE        :: idt_size
+      END SUBROUTINE cxios_calendar_wrapper_handle_create
+
+      SUBROUTINE cxios_get_current_calendar_wrapper(ret) BIND(C)
+         USE ISO_C_BINDING
+         INTEGER  (kind = C_INTPTR_T)               :: ret
+      END SUBROUTINE cxios_get_current_calendar_wrapper
+
+      SUBROUTINE cxios_calendar_wrapper_valid_id(ret, idt, idt_size) BIND(C)
+         USE ISO_C_BINDING
+         LOGICAL  (kind = C_BOOL)                   :: ret
+         CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: idt
+         INTEGER  (kind = C_INT)     , VALUE        :: idt_size
+      END SUBROUTINE cxios_calendar_wrapper_valid_id
+
+      SUBROUTINE cxios_create_calendar(hdl) BIND(C)
+         USE ISO_C_BINDING
+         INTEGER  (kind = C_INTPTR_T), VALUE        :: hdl
+      END SUBROUTINE cxios_create_calendar
+
+      SUBROUTINE cxios_update_calendar_timestep(hdl) BIND(C)
+         USE ISO_C_BINDING
+         INTEGER  (kind = C_INTPTR_T), VALUE        :: hdl
+      END SUBROUTINE cxios_update_calendar_timestep
+
+      SUBROUTINE cxios_set_calendar_wrapper_date_start_date(hdl, start_date) BIND(C)
+         USE ISO_C_BINDING
+         USE IDATE
+         INTEGER (kind = C_INTPTR_T), VALUE :: hdl
+         TYPE(txios(date)), VALUE           :: start_date
+      END SUBROUTINE cxios_set_calendar_wrapper_date_start_date
+
+      SUBROUTINE cxios_get_calendar_wrapper_date_start_date(hdl, start_date) BIND(C)
+         USE ISO_C_BINDING
+         USE IDATE
+         INTEGER (kind = C_INTPTR_T), VALUE :: hdl
+         TYPE(txios(date))                  :: start_date
+      END SUBROUTINE cxios_get_calendar_wrapper_date_start_date
+
+      SUBROUTINE cxios_set_calendar_wrapper_date_time_origin(hdl, time_origin) BIND(C)
+         USE ISO_C_BINDING
+         USE IDATE
+         INTEGER (kind = C_INTPTR_T), VALUE :: hdl
+         TYPE(txios(date)), VALUE           :: time_origin
+      END SUBROUTINE cxios_set_calendar_wrapper_date_time_origin
+
+      SUBROUTINE cxios_get_calendar_wrapper_date_time_origin(hdl, time_origin) BIND(C)
+         USE ISO_C_BINDING
+         USE IDATE
+         INTEGER (kind = C_INTPTR_T), VALUE :: hdl
+         TYPE(txios(date))                  :: time_origin
+      END SUBROUTINE cxios_get_calendar_wrapper_date_time_origin
+
+   END INTERFACE
+
+END MODULE CALENDAR_WRAPPER_INTERFACE
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/fortran/compute_connectivity_domain_interface.f90
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/fortran/compute_connectivity_domain_interface.f90	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/fortran/compute_connectivity_domain_interface.f90	(revision 1749)
@@ -0,0 +1,22 @@
+MODULE COMPUTE_CONNECTIVITY_DOMAIN_INTERFACE
+   USE, INTRINSIC :: ISO_C_BINDING
+
+   INTERFACE ! Ne pas appeler directement/Interface FORTRAN 2003 <-> C99
+
+      SUBROUTINE cxios_compute_connectivity_domain_handle_create(ret, idt, idt_size) BIND(C)
+         USE ISO_C_BINDING
+         INTEGER  (kind = C_INTPTR_T)               :: ret
+         CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: idt
+         INTEGER  (kind = C_INT)     , VALUE        :: idt_size
+      END SUBROUTINE cxios_compute_connectivity_domain_handle_create
+
+      SUBROUTINE cxios_compute_connectivity_domain_valid_id(ret, idt, idt_size) BIND(C)
+         USE ISO_C_BINDING
+         LOGICAL  (kind = C_BOOL)                   :: ret
+         CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: idt
+         INTEGER  (kind = C_INT)     , VALUE        :: idt_size
+      END SUBROUTINE cxios_compute_connectivity_domain_valid_id
+
+   END INTERFACE
+
+END MODULE COMPUTE_CONNECTIVITY_DOMAIN_INTERFACE
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/fortran/context_interface.f90
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/fortran/context_interface.f90	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/fortran/context_interface.f90	(revision 1749)
@@ -0,0 +1,33 @@
+MODULE CONTEXT_INTERFACE
+   USE, INTRINSIC :: ISO_C_BINDING
+
+   INTERFACE ! Ne pas appeler directement/Interface FORTRAN 2003 <-> C99
+
+      SUBROUTINE cxios_context_handle_create(ret, idt, idt_size) BIND(C)
+         import C_CHAR, C_INTPTR_T, C_INT
+         INTEGER  (kind = C_INTPTR_T)               :: ret
+         CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: idt
+         INTEGER  (kind = C_INT)     , VALUE        :: idt_size
+      END SUBROUTINE cxios_context_handle_create
+
+      SUBROUTINE cxios_context_get_current(context) BIND(C)
+         import C_INTPTR_T
+         INTEGER (kind = C_INTPTR_T) :: context
+      END SUBROUTINE cxios_context_get_current
+
+      SUBROUTINE cxios_context_set_current(context, withswap) BIND(C)
+         import C_BOOL, C_INT, C_INTPTR_T
+         INTEGER (kind = C_INTPTR_T), VALUE :: context
+         LOGICAL (kind = C_BOOL)    , VALUE :: withswap
+      END SUBROUTINE cxios_context_set_current
+
+      SUBROUTINE cxios_context_valid_id(ret, idt, idt_size) BIND(C)
+         USE ISO_C_BINDING
+         LOGICAL  (kind = C_BOOL)                   :: ret
+         CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: idt
+         INTEGER  (kind = C_INT)     , VALUE        :: idt_size
+      END SUBROUTINE cxios_context_valid_id
+
+   END INTERFACE
+
+END MODULE CONTEXT_INTERFACE
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/fortran/date_interface.F90
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/fortran/date_interface.F90	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/fortran/date_interface.F90	(revision 1749)
@@ -0,0 +1,127 @@
+#include "../fortran/xios_fortran_prefix.hpp"
+
+MODULE DATE_INTERFACE
+   USE, INTRINSIC :: ISO_C_BINDING
+   USE IDURATION, only : txios(duration)
+
+   TYPE, BIND(C) :: txios(date)
+      INTEGER(kind = C_INT) :: year, month, day, hour, minute, second
+   END TYPE txios(date)
+
+   PRIVATE :: txios(duration)
+
+   INTERFACE ! Ne pas appeler directement/Interface FORTRAN 2003 <-> C99
+
+      INTEGER(kind = C_LONG_LONG) FUNCTION cxios_date_convert_to_seconds(date) BIND(C)
+         USE ISO_C_BINDING
+         IMPORT :: txios(date)
+         TYPE(txios(date)), VALUE :: date
+      END FUNCTION cxios_date_convert_to_seconds
+
+      SUBROUTINE cxios_date_convert_to_string(date, str, str_size) BIND(C)
+         USE ISO_C_BINDING
+         IMPORT :: txios(date)
+         TYPE(txios(date)), VALUE :: date
+         CHARACTER(kind = C_CHAR), DIMENSION(*) :: str
+         INTEGER(kind = C_INT), VALUE :: str_size
+      END SUBROUTINE cxios_date_convert_to_string
+
+      TYPE(txios(date)) FUNCTION cxios_date_convert_from_string(str, str_size) BIND(C)
+         USE ISO_C_BINDING
+         IMPORT :: txios(date)
+         CHARACTER(kind = C_CHAR), DIMENSION(*) :: str
+         INTEGER(kind = C_INT), VALUE :: str_size
+      END FUNCTION cxios_date_convert_from_string
+
+      TYPE(txios(date)) FUNCTION cxios_date_add_duration(date, dur) BIND(C)
+         USE ISO_C_BINDING
+         IMPORT :: txios(date)
+         IMPORT :: txios(duration)
+         TYPE(txios(date)), VALUE :: date
+         TYPE(txios(duration)), VALUE :: dur
+      END FUNCTION cxios_date_add_duration
+
+      TYPE(txios(date)) FUNCTION cxios_date_sub_duration(date, dur) BIND(C)
+         USE ISO_C_BINDING
+         IMPORT :: txios(date)
+         IMPORT :: txios(duration)
+         TYPE(txios(date)), VALUE :: date
+         TYPE(txios(duration)), VALUE :: dur
+      END FUNCTION cxios_date_sub_duration
+
+      TYPE(txios(duration)) FUNCTION cxios_date_sub(date1, date2) BIND(C)
+         USE ISO_C_BINDING
+         IMPORT :: txios(date)
+         IMPORT :: txios(duration)
+         TYPE(txios(date)), VALUE :: date1, date2
+      END FUNCTION cxios_date_sub
+
+      LOGICAL(kind = C_BOOL) FUNCTION cxios_date_eq(date1, date2) BIND(C)
+         USE ISO_C_BINDING
+         IMPORT :: txios(date)
+         TYPE(txios(date)), VALUE :: date1, date2
+      END FUNCTION cxios_date_eq
+
+      LOGICAL(kind = C_BOOL) FUNCTION cxios_date_neq(date1, date2) BIND(C)
+         USE ISO_C_BINDING
+         IMPORT :: txios(date)
+         TYPE(txios(date)), VALUE :: date1, date2
+      END FUNCTION cxios_date_neq
+
+      LOGICAL(kind = C_BOOL) FUNCTION cxios_date_lt(date1, date2) BIND(C)
+         USE ISO_C_BINDING
+         IMPORT :: txios(date)
+         TYPE(txios(date)), VALUE :: date1, date2
+      END FUNCTION cxios_date_lt
+
+      LOGICAL(kind = C_BOOL) FUNCTION cxios_date_le(date1, date2) BIND(C)
+         USE ISO_C_BINDING
+         IMPORT :: txios(date)
+         TYPE(txios(date)), VALUE :: date1, date2
+      END FUNCTION cxios_date_le
+
+      LOGICAL(kind = C_BOOL) FUNCTION cxios_date_gt(date1, date2) BIND(C)
+         USE ISO_C_BINDING
+         IMPORT :: txios(date)
+         TYPE(txios(date)), VALUE :: date1, date2
+      END FUNCTION cxios_date_gt
+
+      LOGICAL(kind = C_BOOL) FUNCTION cxios_date_ge(date1, date2) BIND(C)
+         USE ISO_C_BINDING
+         IMPORT :: txios(date)
+         TYPE(txios(date)), VALUE :: date1, date2
+      END FUNCTION cxios_date_ge
+
+      INTEGER(kind = C_INT) FUNCTION cxios_date_get_second_of_year(date) BIND(C)
+         USE ISO_C_BINDING
+         IMPORT :: txios(date)
+         TYPE(txios(date)), VALUE :: date
+      END FUNCTION cxios_date_get_second_of_year
+
+      REAL(kind = C_DOUBLE) FUNCTION cxios_date_get_day_of_year(date) BIND(C)
+         USE ISO_C_BINDING
+         IMPORT :: txios(date)
+         TYPE(txios(date)), VALUE :: date
+      END FUNCTION cxios_date_get_day_of_year
+
+      REAL(kind = C_DOUBLE) FUNCTION cxios_date_get_fraction_of_year(date) BIND(C)
+         USE ISO_C_BINDING
+         IMPORT :: txios(date)
+         TYPE(txios(date)), VALUE :: date
+      END FUNCTION cxios_date_get_fraction_of_year
+
+      INTEGER(kind = C_INT) FUNCTION cxios_date_get_second_of_day(date) BIND(C)
+         USE ISO_C_BINDING
+         IMPORT :: txios(date)
+         TYPE(txios(date)), VALUE :: date
+      END FUNCTION cxios_date_get_second_of_day
+
+      REAL(kind = C_DOUBLE) FUNCTION cxios_date_get_fraction_of_day(date) BIND(C)
+         USE ISO_C_BINDING
+         IMPORT :: txios(date)
+         TYPE(txios(date)), VALUE :: date
+      END FUNCTION cxios_date_get_fraction_of_day
+
+   END INTERFACE
+
+END MODULE DATE_INTERFACE
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/fortran/domain_interface.f90
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/fortran/domain_interface.f90	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/fortran/domain_interface.f90	(revision 1749)
@@ -0,0 +1,22 @@
+MODULE DOMAIN_INTERFACE
+   USE, INTRINSIC :: ISO_C_BINDING
+       
+   INTERFACE ! Ne pas appeler directement/Interface FORTRAN 2003 <-> C99
+       
+      SUBROUTINE cxios_domain_handle_create(ret, idt, idt_size) BIND(C)
+         USE ISO_C_BINDING
+         INTEGER  (kind = C_INTPTR_T)               :: ret
+         CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: idt
+         INTEGER  (kind = C_INT)     , VALUE        :: idt_size
+      END SUBROUTINE cxios_domain_handle_create
+
+      SUBROUTINE cxios_domain_valid_id(ret, idt, idt_size) BIND(C)
+         USE ISO_C_BINDING
+         LOGICAL  (kind = C_BOOL)                   :: ret
+         CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: idt
+         INTEGER  (kind = C_INT)     , VALUE        :: idt_size
+      END SUBROUTINE cxios_domain_valid_id
+
+   END INTERFACE
+       
+END MODULE DOMAIN_INTERFACE
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/fortran/domaingroup_interface.f90
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/fortran/domaingroup_interface.f90	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/fortran/domaingroup_interface.f90	(revision 1749)
@@ -0,0 +1,22 @@
+MODULE DOMAINGROUP_INTERFACE
+   USE, INTRINSIC :: ISO_C_BINDING
+       
+   INTERFACE ! Ne pas appeler directement/Interface FORTRAN 2003 <-> C99
+       
+      SUBROUTINE cxios_domaingroup_handle_create(ret, idt, idt_size) BIND(C)
+         USE ISO_C_BINDING
+         INTEGER  (kind = C_INTPTR_T)               :: ret
+         CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: idt
+         INTEGER  (kind = C_INT)     , VALUE        :: idt_size
+      END SUBROUTINE cxios_domaingroup_handle_create
+
+      SUBROUTINE cxios_domaingroup_valid_id(ret, idt, idt_size) BIND(C)
+         USE ISO_C_BINDING
+         LOGICAL  (kind = C_BOOL)                   :: ret
+         CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: idt
+         INTEGER  (kind = C_INT)     , VALUE        :: idt_size
+      END SUBROUTINE cxios_domaingroup_valid_id
+
+   END INTERFACE
+       
+END MODULE DOMAINGROUP_INTERFACE
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/fortran/duplicate_scalar_to_axis_interface.f90
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/fortran/duplicate_scalar_to_axis_interface.f90	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/fortran/duplicate_scalar_to_axis_interface.f90	(revision 1749)
@@ -0,0 +1,22 @@
+MODULE DUPLICATE_SCALAR_TO_AXIS_INTERFACE
+   USE, INTRINSIC :: ISO_C_BINDING
+
+   INTERFACE ! Ne pas appeler directement/Interface FORTRAN 2003 <-> C99
+
+      SUBROUTINE cxios_duplicate_scalar_to_axis_handle_create(ret, idt, idt_size) BIND(C)
+         USE ISO_C_BINDING
+         INTEGER  (kind = C_INTPTR_T)               :: ret
+         CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: idt
+         INTEGER  (kind = C_INT)     , VALUE        :: idt_size
+      END SUBROUTINE cxios_duplicate_scalar_to_axis_handle_create
+
+      SUBROUTINE cxios_duplicate_scalar_to_axis_valid_id(ret, idt, idt_size) BIND(C)
+         USE ISO_C_BINDING
+         LOGICAL  (kind = C_BOOL)                   :: ret
+         CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: idt
+         INTEGER  (kind = C_INT)     , VALUE        :: idt_size
+      END SUBROUTINE cxios_duplicate_scalar_to_axis_valid_id
+
+   END INTERFACE
+
+END MODULE DUPLICATE_SCALAR_TO_AXIS_INTERFACE
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/fortran/duration_interface.F90
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/fortran/duration_interface.F90	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/fortran/duration_interface.F90	(revision 1749)
@@ -0,0 +1,66 @@
+#include "../fortran/xios_fortran_prefix.hpp"
+
+MODULE DURATION_INTERFACE
+   USE, INTRINSIC :: ISO_C_BINDING
+
+   TYPE, BIND(C) :: txios(duration)
+      REAL(kind = C_DOUBLE) :: year=0, month=0, day=0, hour=0, minute=0, second=0, timestep=0
+   END TYPE txios(duration)
+     
+   INTERFACE ! Ne pas appeler directement/Interface FORTRAN 2003 <-> C99
+
+      SUBROUTINE cxios_duration_convert_to_string(dur, str, str_size) BIND(C)
+         USE ISO_C_BINDING
+         IMPORT :: txios(duration)
+         TYPE(txios(duration)), VALUE :: dur
+         CHARACTER(kind = C_CHAR), DIMENSION(*) :: str
+         INTEGER(kind = C_INT), VALUE :: str_size
+      END SUBROUTINE cxios_duration_convert_to_string
+
+      TYPE(txios(duration)) FUNCTION cxios_duration_convert_from_string(str, str_size) BIND(C)
+         USE ISO_C_BINDING
+         IMPORT :: txios(duration)
+         CHARACTER(kind = C_CHAR), DIMENSION(*) :: str
+         INTEGER(kind = C_INT), VALUE :: str_size
+      END FUNCTION cxios_duration_convert_from_string
+
+      TYPE(txios(duration)) FUNCTION cxios_duration_add(dur1, dur2) BIND(C)
+         USE ISO_C_BINDING
+         IMPORT :: txios(duration)
+         TYPE(txios(duration)), VALUE :: dur1, dur2
+      END FUNCTION cxios_duration_add
+
+      TYPE(txios(duration)) FUNCTION cxios_duration_sub(dur1, dur2) BIND(C)
+         USE ISO_C_BINDING
+         IMPORT :: txios(duration)
+         TYPE(txios(duration)), VALUE :: dur1, dur2
+      END FUNCTION cxios_duration_sub
+
+      TYPE(txios(duration)) FUNCTION cxios_duration_mult(val, dur) BIND(C)
+         USE ISO_C_BINDING
+         IMPORT :: txios(duration)
+         REAL(kind = C_DOUBLE), VALUE :: val
+         TYPE(txios(duration)), VALUE :: dur
+      END FUNCTION cxios_duration_mult
+
+      TYPE(txios(duration)) FUNCTION cxios_duration_neg(dur) BIND(C)
+         USE ISO_C_BINDING
+         IMPORT :: txios(duration)
+         TYPE(txios(duration)), VALUE :: dur
+      END FUNCTION cxios_duration_neg
+
+      LOGICAL(kind = C_BOOL) FUNCTION cxios_duration_eq(dur1, dur2) BIND(C)
+         USE ISO_C_BINDING
+         IMPORT :: txios(duration)
+         TYPE(txios(duration)), VALUE :: dur1, dur2
+      END FUNCTION cxios_duration_eq
+
+      LOGICAL(kind = C_BOOL) FUNCTION cxios_duration_neq(dur1, dur2) BIND(C)
+         USE ISO_C_BINDING
+         IMPORT :: txios(duration)
+         TYPE(txios(duration)), VALUE :: dur1, dur2
+      END FUNCTION cxios_duration_neq
+
+   END INTERFACE
+     
+END MODULE DURATION_INTERFACE
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/fortran/expand_domain_interface.f90
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/fortran/expand_domain_interface.f90	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/fortran/expand_domain_interface.f90	(revision 1749)
@@ -0,0 +1,22 @@
+MODULE EXPAND_DOMAIN_INTERFACE
+   USE, INTRINSIC :: ISO_C_BINDING
+
+   INTERFACE ! Ne pas appeler directement/Interface FORTRAN 2003 <-> C99
+
+      SUBROUTINE cxios_expand_domain_handle_create(ret, idt, idt_size) BIND(C)
+         USE ISO_C_BINDING
+         INTEGER  (kind = C_INTPTR_T)               :: ret
+         CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: idt
+         INTEGER  (kind = C_INT)     , VALUE        :: idt_size
+      END SUBROUTINE cxios_expand_domain_handle_create
+
+      SUBROUTINE cxios_expand_domain_valid_id(ret, idt, idt_size) BIND(C)
+         USE ISO_C_BINDING
+         LOGICAL  (kind = C_BOOL)                   :: ret
+         CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: idt
+         INTEGER  (kind = C_INT)     , VALUE        :: idt_size
+      END SUBROUTINE cxios_expand_domain_valid_id
+
+   END INTERFACE
+
+END MODULE EXPAND_DOMAIN_INTERFACE
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/fortran/extract_axis_to_scalar_interface.f90
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/fortran/extract_axis_to_scalar_interface.f90	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/fortran/extract_axis_to_scalar_interface.f90	(revision 1749)
@@ -0,0 +1,22 @@
+MODULE EXTRACT_AXIS_TO_SCALAR_INTERFACE
+   USE, INTRINSIC :: ISO_C_BINDING
+
+   INTERFACE ! Ne pas appeler directement/Interface FORTRAN 2003 <-> C99
+
+      SUBROUTINE cxios_extract_axis_to_scalar_handle_create(ret, idt, idt_size) BIND(C)
+         USE ISO_C_BINDING
+         INTEGER  (kind = C_INTPTR_T)               :: ret
+         CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: idt
+         INTEGER  (kind = C_INT)     , VALUE        :: idt_size
+      END SUBROUTINE cxios_extract_axis_to_scalar_handle_create
+
+      SUBROUTINE cxios_extract_axis_to_scalar_valid_id(ret, idt, idt_size) BIND(C)
+         USE ISO_C_BINDING
+         LOGICAL  (kind = C_BOOL)                   :: ret
+         CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: idt
+         INTEGER  (kind = C_INT)     , VALUE        :: idt_size
+      END SUBROUTINE cxios_extract_axis_to_scalar_valid_id
+
+   END INTERFACE
+
+END MODULE EXTRACT_AXIS_TO_SCALAR_INTERFACE
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/fortran/extract_domain_to_axis_interface.f90
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/fortran/extract_domain_to_axis_interface.f90	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/fortran/extract_domain_to_axis_interface.f90	(revision 1749)
@@ -0,0 +1,22 @@
+MODULE EXTRACT_DOMAIN_TO_AXIS_INTERFACE
+   USE, INTRINSIC :: ISO_C_BINDING
+
+   INTERFACE ! Ne pas appeler directement/Interface FORTRAN 2003 <-> C99
+
+      SUBROUTINE cxios_extract_domain_to_axis_handle_create(ret, idt, idt_size) BIND(C)
+         USE ISO_C_BINDING
+         INTEGER  (kind = C_INTPTR_T)               :: ret
+         CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: idt
+         INTEGER  (kind = C_INT)     , VALUE        :: idt_size
+      END SUBROUTINE cxios_extract_domain_to_axis_handle_create
+
+      SUBROUTINE cxios_extract_domain_to_axis_valid_id(ret, idt, idt_size) BIND(C)
+         USE ISO_C_BINDING
+         LOGICAL  (kind = C_BOOL)                   :: ret
+         CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: idt
+         INTEGER  (kind = C_INT)     , VALUE        :: idt_size
+      END SUBROUTINE cxios_extract_domain_to_axis_valid_id
+
+   END INTERFACE
+
+END MODULE EXTRACT_DOMAIN_TO_AXIS_INTERFACE
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/fortran/field_interface.f90
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/fortran/field_interface.f90	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/fortran/field_interface.f90	(revision 1749)
@@ -0,0 +1,50 @@
+MODULE FIELD_INTERFACE
+   USE, INTRINSIC :: ISO_C_BINDING
+   
+   INTERFACE ! Ne pas appeler directement/Interface FORTRAN 2003 <-> C99
+   
+      SUBROUTINE cxios_field_handle_create(ret, idt, idt_size) BIND(C)
+         USE ISO_C_BINDING
+         INTEGER  (kind = C_INTPTR_T)               :: ret
+         CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: idt
+         INTEGER  (kind = C_INT)     , VALUE        :: idt_size
+      END SUBROUTINE cxios_field_handle_create
+
+      SUBROUTINE cxios_field_valid_id(ret, idt, idt_size) BIND(C)
+         USE ISO_C_BINDING
+         LOGICAL  (kind = C_BOOL)                   :: ret
+         CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: idt
+         INTEGER  (kind = C_INT)     , VALUE        :: idt_size
+      END SUBROUTINE cxios_field_valid_id
+
+      SUBROUTINE cxios_field_is_active(field_hdl, at_current_timestep, ret) BIND(C)
+         USE ISO_C_BINDING
+         INTEGER  (kind = C_INTPTR_T), VALUE        :: field_hdl
+         LOGICAL  (kind = C_BOOL), VALUE            :: at_current_timestep
+         LOGICAL  (kind = C_BOOL)                   :: ret
+      END SUBROUTINE cxios_field_is_active
+
+      SUBROUTINE cxios_field_get_domain_handle(ret, field_hdl, idx) BIND(C)
+         USE ISO_C_BINDING
+         INTEGER  (kind = C_INTPTR_T)               :: ret
+         INTEGER  (kind = C_INTPTR_T), VALUE        :: field_hdl
+         INTEGER  (kind = C_INT)     , VALUE        :: idx
+      END SUBROUTINE cxios_field_get_domain_handle
+
+      SUBROUTINE cxios_field_get_axis_handle(ret, field_hdl, idx) BIND(C)
+         USE ISO_C_BINDING
+         INTEGER  (kind = C_INTPTR_T)               :: ret
+         INTEGER  (kind = C_INTPTR_T), VALUE        :: field_hdl
+         INTEGER  (kind = C_INT)     , VALUE        :: idx
+      END SUBROUTINE cxios_field_get_axis_handle
+
+      SUBROUTINE cxios_field_get_scalar_handle(ret, field_hdl, idx) BIND(C)
+         USE ISO_C_BINDING
+         INTEGER  (kind = C_INTPTR_T)               :: ret
+         INTEGER  (kind = C_INTPTR_T), VALUE        :: field_hdl
+         INTEGER  (kind = C_INT)     , VALUE        :: idx
+      END SUBROUTINE cxios_field_get_scalar_handle
+
+   END INTERFACE
+   
+END MODULE FIELD_INTERFACE
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/fortran/fieldgroup_interface.f90
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/fortran/fieldgroup_interface.f90	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/fortran/fieldgroup_interface.f90	(revision 1749)
@@ -0,0 +1,22 @@
+MODULE FIELDGROUP_INTERFACE
+   USE, INTRINSIC :: ISO_C_BINDING
+   
+   INTERFACE ! Ne pas appeler directement/Interface FORTRAN 2003 <-> C99
+   
+      SUBROUTINE cxios_fieldgroup_handle_create(ret, idt, idt_size) BIND(C)
+         USE ISO_C_BINDING
+         INTEGER  (kind = C_INTPTR_T)               :: ret
+         CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: idt
+         INTEGER  (kind = C_INT)     , VALUE        :: idt_size
+      END SUBROUTINE cxios_fieldgroup_handle_create
+
+      SUBROUTINE cxios_fieldgroup_valid_id(ret, idt, idt_size) BIND(C)
+         USE ISO_C_BINDING
+         LOGICAL  (kind = C_BOOL)                   :: ret
+         CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: idt
+         INTEGER  (kind = C_INT)     , VALUE        :: idt_size
+      END SUBROUTINE cxios_fieldgroup_valid_id
+   
+   END INTERFACE
+   
+END MODULE FIELDGROUP_INTERFACE
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/fortran/file_interface.f90
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/fortran/file_interface.f90	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/fortran/file_interface.f90	(revision 1749)
@@ -0,0 +1,22 @@
+MODULE FILE_INTERFACE
+   USE, INTRINSIC :: ISO_C_BINDING
+   
+   INTERFACE ! Ne pas appeler directement/Interface FORTRAN 2003 <-> C99
+   
+      SUBROUTINE cxios_file_handle_create(ret, idt, idt_size) BIND(C)
+         USE ISO_C_BINDING
+         INTEGER  (kind = C_INTPTR_T)               :: ret
+         CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: idt
+         INTEGER  (kind = C_INT)     , VALUE        :: idt_size
+      END SUBROUTINE cxios_file_handle_create
+
+      SUBROUTINE cxios_file_valid_id(ret, idt, idt_size) BIND(C)
+         USE ISO_C_BINDING
+         LOGICAL  (kind = C_BOOL)                   :: ret
+         CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: idt
+         INTEGER  (kind = C_INT)     , VALUE        :: idt_size
+      END SUBROUTINE cxios_file_valid_id
+
+   END INTERFACE
+   
+END MODULE FILE_INTERFACE
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/fortran/filegroup_interface.f90
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/fortran/filegroup_interface.f90	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/fortran/filegroup_interface.f90	(revision 1749)
@@ -0,0 +1,22 @@
+MODULE FILEGROUP_INTERFACE
+   USE, INTRINSIC :: ISO_C_BINDING
+   
+   INTERFACE ! Ne pas appeler directement/Interface FORTRAN 2003 <-> C99
+   
+      SUBROUTINE cxios_filegroup_handle_create(ret, idt, idt_size) BIND(C)
+         USE ISO_C_BINDING
+         INTEGER  (kind = C_INTPTR_T)               :: ret
+         CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: idt
+         INTEGER  (kind = C_INT)     , VALUE        :: idt_size
+      END SUBROUTINE cxios_filegroup_handle_create
+
+      SUBROUTINE cxios_filegroup_valid_id(ret, idt, idt_size) BIND(C)
+         USE ISO_C_BINDING
+         LOGICAL  (kind = C_BOOL)                   :: ret
+         CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: idt
+         INTEGER  (kind = C_INT)     , VALUE        :: idt_size
+      END SUBROUTINE cxios_filegroup_valid_id
+
+   END INTERFACE
+   
+END MODULE FILEGROUP_INTERFACE
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/fortran/generate_rectilinear_domain_interface.f90
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/fortran/generate_rectilinear_domain_interface.f90	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/fortran/generate_rectilinear_domain_interface.f90	(revision 1749)
@@ -0,0 +1,22 @@
+MODULE GENERATE_RECTILINEAR_DOMAIN_INTERFACE
+   USE, INTRINSIC :: ISO_C_BINDING
+
+   INTERFACE ! Ne pas appeler directement/Interface FORTRAN 2003 <-> C99
+
+      SUBROUTINE cxios_generate_rectilinear_domain_handle_create(ret, idt, idt_size) BIND(C)
+         USE ISO_C_BINDING
+         INTEGER  (kind = C_INTPTR_T)               :: ret
+         CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: idt
+         INTEGER  (kind = C_INT)     , VALUE        :: idt_size
+      END SUBROUTINE cxios_generate_rectilinear_domain_handle_create
+
+      SUBROUTINE cxios_generate_rectilinear_domain_valid_id(ret, idt, idt_size) BIND(C)
+         USE ISO_C_BINDING
+         LOGICAL  (kind = C_BOOL)                   :: ret
+         CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: idt
+         INTEGER  (kind = C_INT)     , VALUE        :: idt_size
+      END SUBROUTINE cxios_generate_rectilinear_domain_valid_id
+
+   END INTERFACE
+
+END MODULE GENERATE_RECTILINEAR_DOMAIN_INTERFACE
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/fortran/grid_interface.f90
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/fortran/grid_interface.f90	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/fortran/grid_interface.f90	(revision 1749)
@@ -0,0 +1,22 @@
+MODULE GRID_INTERFACE
+   USE, INTRINSIC :: ISO_C_BINDING
+     
+   INTERFACE ! Ne pas appeler directement/Interface FORTRAN 2003 <-> C99
+
+      SUBROUTINE cxios_grid_handle_create(ret, idt, idt_size) BIND(C)
+         USE ISO_C_BINDING
+         INTEGER  (kind = C_INTPTR_T)               :: ret
+         CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: idt
+         INTEGER  (kind = C_INT)     , VALUE        :: idt_size
+      END SUBROUTINE cxios_grid_handle_create
+
+      SUBROUTINE cxios_grid_valid_id(ret, idt, idt_size) BIND(C)
+         USE ISO_C_BINDING
+         LOGICAL  (kind = C_BOOL)                   :: ret
+         CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: idt
+         INTEGER  (kind = C_INT)     , VALUE        :: idt_size
+      END SUBROUTINE cxios_grid_valid_id
+
+   END INTERFACE
+     
+END MODULE GRID_INTERFACE
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/fortran/gridgroup_interface.f90
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/fortran/gridgroup_interface.f90	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/fortran/gridgroup_interface.f90	(revision 1749)
@@ -0,0 +1,22 @@
+MODULE GRIDGROUP_INTERFACE
+   USE, INTRINSIC :: ISO_C_BINDING
+     
+   INTERFACE ! Ne pas appeler directement/Interface FORTRAN 2003 <-> C99
+     
+      SUBROUTINE cxios_gridgroup_handle_create(ret, idt, idt_size) BIND(C)
+         USE ISO_C_BINDING
+         INTEGER  (kind = C_INTPTR_T)               :: ret
+         CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: idt
+         INTEGER  (kind = C_INT)     , VALUE        :: idt_size
+      END SUBROUTINE cxios_gridgroup_handle_create
+
+      SUBROUTINE cxios_gridgroup_valid_id(ret, idt, idt_size) BIND(C)
+         USE ISO_C_BINDING
+         LOGICAL  (kind = C_BOOL)                   :: ret
+         CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: idt
+         INTEGER  (kind = C_INT)     , VALUE        :: idt_size
+      END SUBROUTINE cxios_gridgroup_valid_id
+
+   END INTERFACE
+     
+END MODULE GRIDGROUP_INTERFACE
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/fortran/iaxis.F90
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/fortran/iaxis.F90	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/fortran/iaxis.F90	(revision 1749)
@@ -0,0 +1,56 @@
+#include "xios_fortran_prefix.hpp"
+
+MODULE IAXIS
+   USE, INTRINSIC :: ISO_C_BINDING
+   USE AXIS_INTERFACE
+   USE AXISGROUP_INTERFACE
+   
+   TYPE txios(axis)
+      INTEGER(kind = C_INTPTR_T) :: daddr
+   END TYPE txios(axis)
+   
+   TYPE txios(axisgroup)
+      INTEGER(kind = C_INTPTR_T) :: daddr
+   END TYPE txios(axisgroup)
+   
+
+         
+   CONTAINS ! Fonctions disponibles pour les utilisateurs.
+
+   SUBROUTINE xios(get_axis_handle)(idt,ret)
+      IMPLICIT NONE
+      CHARACTER(len = *), INTENT(IN) :: idt      
+      TYPE(txios(axis)) , INTENT(OUT):: ret
+      CALL cxios_axis_handle_create(ret%daddr, idt, len(idt))            
+   END SUBROUTINE xios(get_axis_handle)
+   
+   SUBROUTINE xios(get_axisgroup_handle)(idt,ret)
+      IMPLICIT NONE
+      CHARACTER(len = *)    , INTENT(IN) :: idt      
+      TYPE(txios(axisgroup)), INTENT(OUT):: ret
+
+      CALL cxios_axisgroup_handle_create(ret%daddr, idt, len(idt))            
+
+   END SUBROUTINE xios(get_axisgroup_handle)
+
+   LOGICAL FUNCTION xios(is_valid_axis)(idt)
+      IMPLICIT NONE
+      CHARACTER(len  = *)    , INTENT(IN) :: idt
+      LOGICAL  (kind = 1)                 :: val
+      
+      CALL cxios_axis_valid_id(val, idt, len(idt))
+      xios(is_valid_axis) = val
+
+   END FUNCTION  xios(is_valid_axis)
+
+   LOGICAL FUNCTION xios(is_valid_axisgroup)(idt)
+      IMPLICIT NONE
+      CHARACTER(len  = *)    , INTENT(IN) :: idt
+      LOGICAL  (kind = 1)                 :: val
+
+      CALL cxios_axisgroup_valid_id(val, idt, len(idt))
+      xios(is_valid_axisgroup) = val
+
+   END FUNCTION  xios(is_valid_axisgroup)
+
+END MODULE IAXIS
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/fortran/icalendar.F90
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/fortran/icalendar.F90	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/fortran/icalendar.F90	(revision 1749)
@@ -0,0 +1,229 @@
+#include "xios_fortran_prefix.hpp"
+MODULE ICALENDAR
+   USE, INTRINSIC :: ISO_C_BINDING
+   USE CALENDAR_INTERFACE
+   USE ICALENDAR_WRAPPER
+   USE IDATE
+   USE IDURATION
+
+   ! enum XCalendarType
+   INTEGER(kind = C_INT), PARAMETER :: D360 = 0 , ALLLEAP = 1 , NOLEAP = 2 , JULIAN = 3 , GREGORIAN = 4
+
+   INTERFACE xios(set_start_date)
+      MODULE PROCEDURE xios(set_start_date_date), xios(set_start_date_dur)
+   END INTERFACE xios(set_start_date)
+
+   INTERFACE xios(set_time_origin)
+      MODULE PROCEDURE xios(set_time_origin_date), xios(set_time_origin_dur)
+   END INTERFACE xios(set_time_origin)
+
+   CONTAINS ! Fonctions disponibles pour les utilisateurs.
+
+   SUBROUTINE xios(define_calendar)(type, timestep, start_date, time_origin, &
+                                    day_length, month_lengths, year_length, &
+                                    leap_year_month, leap_year_drift, leap_year_drift_offset)
+      USE ICALENDAR_WRAPPER, ONLY : txios(calendar_wrapper), xios(get_default_calendar_wrapper_handle)
+      USE icalendar_wrapper_attr, ONLY : xios(set_calendar_wrapper_attr_hdl)
+      USE IDURATION, ONLY : txios(duration)
+      USE IDATE, ONLY : txios(date)
+      IMPLICIT NONE
+      CHARACTER(len = *),              INTENT(IN) :: type
+      TYPE(txios(duration)), OPTIONAL, INTENT(IN) :: timestep
+      TYPE(txios(date)),     OPTIONAL, INTENT(IN) :: start_date
+      TYPE(txios(date)),     OPTIONAL, INTENT(IN) :: time_origin
+      INTEGER,               OPTIONAL, INTENT(IN) :: day_length
+      INTEGER,               OPTIONAL, INTENT(IN) :: month_lengths(:)
+      INTEGER,               OPTIONAL, INTENT(IN) :: year_length
+      REAL (KIND=8),         OPTIONAL, INTENT(IN) :: leap_year_drift
+      REAL (KIND=8),         OPTIONAL, INTENT(IN) :: leap_year_drift_offset
+      INTEGER,               OPTIONAL, INTENT(IN) :: leap_year_month
+      TYPE(txios(calendar_wrapper)) :: calendar_wrapper
+
+      CALL xios(get_default_calendar_wrapper_handle)(calendar_wrapper)
+
+      CALL xios(set_calendar_wrapper_attr_hdl)(calendar_wrapper, type=type)
+      IF (PRESENT(timestep)) THEN
+         CALL xios(set_calendar_wrapper_attr_hdl)(calendar_wrapper, timestep=timestep)
+      END IF
+      IF (PRESENT(day_length)) THEN
+         CALL xios(set_calendar_wrapper_attr_hdl)(calendar_wrapper, day_length=day_length)
+      END IF
+      IF (PRESENT(month_lengths)) THEN
+         CALL xios(set_calendar_wrapper_attr_hdl)(calendar_wrapper, month_lengths=month_lengths)
+      END IF
+      IF (PRESENT(year_length)) THEN
+         CALL xios(set_calendar_wrapper_attr_hdl)(calendar_wrapper, year_length=year_length)
+      END IF
+      IF (PRESENT(leap_year_month)) THEN
+         CALL xios(set_calendar_wrapper_attr_hdl)(calendar_wrapper, leap_year_month=leap_year_month)
+      END IF
+      IF (PRESENT(leap_year_drift)) THEN
+         CALL xios(set_calendar_wrapper_attr_hdl)(calendar_wrapper, leap_year_drift=leap_year_drift)
+      END IF
+      IF (PRESENT(leap_year_drift_offset)) THEN
+         CALL xios(set_calendar_wrapper_attr_hdl)(calendar_wrapper, leap_year_drift_offset=leap_year_drift_offset)
+      END IF
+
+      CALL xios(create_calendar)(calendar_wrapper)
+
+      IF (PRESENT(start_date)) THEN
+         CALL xios(set_start_date_hdl)(calendar_wrapper, start_date=start_date)
+      END IF
+      IF (PRESENT(time_origin)) THEN
+         CALL xios(set_time_origin_hdl)(calendar_wrapper, time_origin=time_origin)
+      END IF
+   END SUBROUTINE xios(define_calendar)
+
+   SUBROUTINE xios(get_calendar_type)(calendar_type)
+      USE ICALENDAR_WRAPPER, ONLY : txios(calendar_wrapper), xios(get_default_calendar_wrapper_handle)
+      USE icalendar_wrapper_attr, ONLY : xios(get_calendar_wrapper_attr_hdl)
+      IMPLICIT NONE
+      CHARACTER(len = *), INTENT(OUT) :: calendar_type
+      TYPE(txios(calendar_wrapper))   :: calendar_wrapper
+
+      CALL xios(get_default_calendar_wrapper_handle)(calendar_wrapper)
+
+      CALL xios(get_calendar_wrapper_attr_hdl)(calendar_wrapper, type=calendar_type)
+   END SUBROUTINE xios(get_calendar_type)
+
+   SUBROUTINE xios(set_timestep)(timestep)
+      USE ICALENDAR_WRAPPER, ONLY : txios(calendar_wrapper), xios(get_default_calendar_wrapper_handle)
+      USE icalendar_wrapper_attr, ONLY : xios(set_calendar_wrapper_attr_hdl)
+      USE IDURATION, ONLY : txios(duration)
+      IMPLICIT NONE
+      TYPE(txios(duration)), INTENT(IN) :: timestep
+      TYPE(txios(calendar_wrapper))     :: calendar_wrapper
+
+      CALL xios(get_default_calendar_wrapper_handle)(calendar_wrapper)
+
+      CALL xios(set_calendar_wrapper_attr_hdl)(calendar_wrapper, timestep=timestep)
+
+      CALL xios(update_calendar_timestep)(calendar_wrapper)
+   END SUBROUTINE xios(set_timestep)
+
+   SUBROUTINE xios(get_timestep)(timestep)
+      USE ICALENDAR_WRAPPER, ONLY : txios(calendar_wrapper), xios(get_default_calendar_wrapper_handle)
+      USE icalendar_wrapper_attr, ONLY : xios(get_calendar_wrapper_attr_hdl)
+      USE IDURATION, ONLY : txios(duration)
+      IMPLICIT NONE
+      TYPE(txios(duration)), INTENT(OUT) :: timestep
+      TYPE(txios(calendar_wrapper))      :: calendar_wrapper
+
+      CALL xios(get_default_calendar_wrapper_handle)(calendar_wrapper)
+
+      CALL xios(get_calendar_wrapper_attr_hdl)(calendar_wrapper, timestep=timestep)
+   END SUBROUTINE xios(get_timestep)
+
+   SUBROUTINE xios(set_start_date_date)(start_date)
+      USE ICALENDAR_WRAPPER, ONLY : txios(calendar_wrapper), xios(get_default_calendar_wrapper_handle)
+      USE IDATE, ONLY : txios(date)
+      IMPLICIT NONE
+      TYPE(txios(date)), INTENT(IN) :: start_date
+      TYPE(txios(calendar_wrapper)) :: calendar_wrapper
+
+      CALL xios(get_default_calendar_wrapper_handle)(calendar_wrapper)
+
+      CALL xios(set_start_date_hdl)(calendar_wrapper, start_date)
+   END SUBROUTINE xios(set_start_date_date)
+
+   SUBROUTINE xios(set_start_date_dur)(start_date)
+      USE ICALENDAR_WRAPPER, ONLY : txios(calendar_wrapper), xios(get_default_calendar_wrapper_handle)
+      USE IDURATION, ONLY : txios(duration)
+      USE IDATE, ONLY : txios(date)
+      IMPLICIT NONE
+      TYPE(txios(duration)), INTENT(IN) :: start_date
+      TYPE(txios(calendar_wrapper))     :: calendar_wrapper
+      TYPE(txios(date))                 :: start_date_date
+
+      CALL xios(get_default_calendar_wrapper_handle)(calendar_wrapper)
+
+      start_date_date = start_date
+      CALL xios(set_start_date_hdl)(calendar_wrapper, start_date_date)
+   END SUBROUTINE xios(set_start_date_dur)
+
+   SUBROUTINE xios(get_start_date)(start_date)
+      USE ICALENDAR_WRAPPER, ONLY : txios(calendar_wrapper), xios(get_default_calendar_wrapper_handle)
+      USE IDATE, ONLY : txios(date)
+      IMPLICIT NONE
+      TYPE(txios(date)), INTENT(OUT) :: start_date
+      TYPE(txios(calendar_wrapper))  :: calendar_wrapper
+
+      CALL xios(get_default_calendar_wrapper_handle)(calendar_wrapper)
+
+      CALL xios(get_start_date_hdl)(calendar_wrapper, start_date)
+   END SUBROUTINE xios(get_start_date)
+
+   SUBROUTINE xios(set_time_origin_date)(time_origin)
+      USE ICALENDAR_WRAPPER, ONLY : txios(calendar_wrapper), xios(get_default_calendar_wrapper_handle)
+      USE IDATE, ONLY : txios(date)
+      IMPLICIT NONE
+      TYPE(txios(date)), INTENT(IN) :: time_origin
+      TYPE(txios(calendar_wrapper)) :: calendar_wrapper
+
+      CALL xios(get_default_calendar_wrapper_handle)(calendar_wrapper)
+
+      CALL xios(set_time_origin_hdl)(calendar_wrapper, time_origin)
+   END SUBROUTINE xios(set_time_origin_date)
+
+   SUBROUTINE xios(set_time_origin_dur)(time_origin)
+      USE ICALENDAR_WRAPPER, ONLY : txios(calendar_wrapper), xios(get_default_calendar_wrapper_handle)
+      USE IDURATION, ONLY : txios(duration)
+      USE IDATE, ONLY : txios(date)
+      IMPLICIT NONE
+      TYPE(txios(duration)), INTENT(IN) :: time_origin
+      TYPE(txios(calendar_wrapper))     :: calendar_wrapper
+      TYPE(txios(date))                 :: time_origin_date
+
+      CALL xios(get_default_calendar_wrapper_handle)(calendar_wrapper)
+
+      time_origin_date = time_origin
+      CALL xios(set_time_origin_hdl)(calendar_wrapper, time_origin_date)
+   END SUBROUTINE xios(set_time_origin_dur)
+
+   SUBROUTINE xios(get_time_origin)(time_origin)
+      USE ICALENDAR_WRAPPER, ONLY : txios(calendar_wrapper), xios(get_default_calendar_wrapper_handle)
+      USE IDATE, ONLY : txios(date)
+      IMPLICIT NONE
+      TYPE(txios(date)), INTENT(OUT) :: time_origin
+      TYPE(txios(calendar_wrapper))  :: calendar_wrapper
+
+      CALL xios(get_default_calendar_wrapper_handle)(calendar_wrapper)
+
+      CALL xios(get_time_origin_hdl)(calendar_wrapper, time_origin)
+   END SUBROUTINE xios(get_time_origin)
+
+   SUBROUTINE xios(update_calendar)(step)
+      IMPLICIT NONE
+      INTEGER, INTENT(IN) :: step
+
+      IF (step < 0) THEN
+         PRINT *, "L'argument 'step' ne peut Ãªtre nÃ©gatif"
+         STOP
+      END IF
+      CALL cxios_update_calendar(step)
+   END SUBROUTINE xios(update_calendar)
+
+   SUBROUTINE xios(get_current_date)(current_date)
+      USE IDATE, ONLY : txios(date)
+      IMPLICIT NONE
+      TYPE(txios(date)), INTENT(OUT) :: current_date
+
+      CALL cxios_get_current_date(current_date)
+   END SUBROUTINE xios(get_current_date)
+
+   FUNCTION xios(get_year_length_in_seconds)(year) RESULT(res)
+      IMPLICIT NONE
+      INTEGER(kind = C_INT), INTENT(IN) :: year
+      INTEGER(kind = C_INT) :: res
+
+      res = cxios_get_year_length_in_seconds(year)
+   END FUNCTION xios(get_year_length_in_seconds)
+
+   FUNCTION xios(get_day_length_in_seconds)() RESULT(res)
+      IMPLICIT NONE
+      INTEGER(kind = C_INT) :: res
+
+      res = cxios_get_day_length_in_seconds()
+   END FUNCTION xios(get_day_length_in_seconds)
+
+END MODULE ICALENDAR
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/fortran/icalendar_wrapper.F90
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/fortran/icalendar_wrapper.F90	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/fortran/icalendar_wrapper.F90	(revision 1749)
@@ -0,0 +1,89 @@
+#include "xios_fortran_prefix.hpp"
+
+MODULE ICALENDAR_WRAPPER
+   USE, INTRINSIC :: ISO_C_BINDING
+   USE CALENDAR_WRAPPER_INTERFACE
+   USE IDATE
+   USE IDURATION
+
+   TYPE txios(calendar_wrapper)
+      INTEGER(kind = C_INTPTR_T) :: daddr
+   END TYPE txios(calendar_wrapper)
+
+   CONTAINS ! Fonctions disponibles pour les utilisateurs.
+
+   SUBROUTINE xios(get_calendar_wrapper_handle)(idt, ret)
+      IMPLICIT NONE
+      CHARACTER(len = *),            INTENT(IN)  :: idt
+      TYPE(txios(calendar_wrapper)), INTENT(OUT) :: ret
+
+      CALL cxios_calendar_wrapper_handle_create(ret%daddr, idt, len(idt))
+   END SUBROUTINE xios(get_calendar_wrapper_handle)
+
+   SUBROUTINE xios(get_default_calendar_wrapper_handle)(ret)
+      IMPLICIT NONE
+      TYPE(txios(calendar_wrapper)), INTENT(OUT) :: ret
+
+      CALL cxios_get_current_calendar_wrapper(ret%daddr)
+   END SUBROUTINE xios(get_default_calendar_wrapper_handle)
+
+   LOGICAL FUNCTION xios(is_valid_calendar_wrapper)(idt)
+      IMPLICIT NONE
+      CHARACTER(len  = *), INTENT(IN) :: idt
+      LOGICAL  (kind = 1)             :: val
+
+      CALL cxios_calendar_wrapper_valid_id(val, idt, len(idt));
+      xios(is_valid_calendar_wrapper) = val
+   END FUNCTION  xios(is_valid_calendar_wrapper)
+
+   SUBROUTINE xios(create_calendar)(hdl)
+      IMPLICIT NONE
+      TYPE(txios(calendar_wrapper)), INTENT(IN) :: hdl
+
+      CALL cxios_create_calendar(hdl%daddr)
+   END SUBROUTINE xios(create_calendar)
+
+   SUBROUTINE xios(update_calendar_timestep)(hdl)
+      IMPLICIT NONE
+      TYPE(txios(calendar_wrapper)), INTENT(IN) :: hdl
+
+      CALL cxios_update_calendar_timestep(hdl%daddr)
+   END SUBROUTINE xios(update_calendar_timestep)
+
+   SUBROUTINE xios(set_start_date_hdl)(hdl, start_date)
+      USE IDATE
+      IMPLICIT NONE
+      TYPE(txios(calendar_wrapper)), INTENT(IN) :: hdl
+      TYPE(txios(date)),             INTENT(IN) :: start_date
+
+      CALL cxios_set_calendar_wrapper_date_start_date(hdl%daddr, start_date)
+   END SUBROUTINE xios(set_start_date_hdl)
+
+   SUBROUTINE xios(get_start_date_hdl)(hdl, start_date)
+      USE IDATE
+      IMPLICIT NONE
+      TYPE(txios(calendar_wrapper)), INTENT(IN)  :: hdl
+      TYPE(txios(date)),             INTENT(OUT) :: start_date
+
+      CALL cxios_get_calendar_wrapper_date_start_date(hdl%daddr, start_date)
+   END SUBROUTINE xios(get_start_date_hdl)
+
+   SUBROUTINE xios(set_time_origin_hdl)(hdl, time_origin)
+      USE IDATE
+      IMPLICIT NONE
+      TYPE(txios(calendar_wrapper)), INTENT(IN) :: hdl
+      TYPE(txios(date)),             INTENT(IN) :: time_origin
+
+      CALL cxios_set_calendar_wrapper_date_time_origin(hdl%daddr, time_origin)
+   END SUBROUTINE xios(set_time_origin_hdl)
+
+   SUBROUTINE xios(get_time_origin_hdl)(hdl, time_origin)
+      USE IDATE
+      IMPLICIT NONE
+      TYPE(txios(calendar_wrapper)), INTENT(IN)  :: hdl
+      TYPE(txios(date)),             INTENT(OUT) :: time_origin
+
+      CALL cxios_get_calendar_wrapper_date_time_origin(hdl%daddr, time_origin)
+   END SUBROUTINE xios(get_time_origin_hdl)
+
+END MODULE ICALENDAR_WRAPPER
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/fortran/icompute_connectivity_domain.F90
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/fortran/icompute_connectivity_domain.F90	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/fortran/icompute_connectivity_domain.F90	(revision 1749)
@@ -0,0 +1,30 @@
+#include "xios_fortran_prefix.hpp"
+
+MODULE ICOMPUTE_CONNECTIVITY_DOMAIN
+   USE, INTRINSIC :: ISO_C_BINDING
+   USE COMPUTE_CONNECTIVITY_DOMAIN_INTERFACE
+
+   TYPE txios(compute_connectivity_domain)
+      INTEGER(kind = C_INTPTR_T) :: daddr
+   END TYPE txios(compute_connectivity_domain)
+
+   CONTAINS ! Fonctions disponibles pour les utilisateurs.
+
+   SUBROUTINE xios(get_compute_connectivity_domain_handle)(idt,ret)
+      IMPLICIT NONE
+      CHARACTER(len = *), INTENT(IN) :: idt
+      TYPE(txios(compute_connectivity_domain)) , INTENT(OUT):: ret
+      CALL cxios_compute_connectivity_domain_handle_create(ret%daddr, idt, len(idt))
+   END SUBROUTINE xios(get_compute_connectivity_domain_handle)
+
+   LOGICAL FUNCTION xios(is_valid_compute_connectivity_domain)(idt)
+      IMPLICIT NONE
+      CHARACTER(len  = *)    , INTENT(IN) :: idt
+      LOGICAL  (kind = 1)                 :: val
+
+      CALL cxios_compute_connectivity_domain_valid_id(val, idt, len(idt))
+      xios(is_valid_compute_connectivity_domain) = val
+
+   END FUNCTION  xios(is_valid_compute_connectivity_domain)
+
+END MODULE ICOMPUTE_CONNECTIVITY_DOMAIN
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/fortran/icontext.F90
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/fortran/icontext.F90	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/fortran/icontext.F90	(revision 1749)
@@ -0,0 +1,76 @@
+#include "xios_fortran_prefix.hpp"
+
+MODULE ICONTEXT
+   USE, INTRINSIC :: ISO_C_BINDING
+   USE CONTEXT_INTERFACE
+   USE IDATE
+   USE IDURATION
+!   USE icontext_attr
+
+
+   TYPE txios(context)
+      INTEGER(kind = C_INTPTR_T) :: daddr
+   END TYPE txios(context)
+
+   INTERFACE xios(set_current_context)
+      MODULE PROCEDURE xios(set_current_context_hdl), xios(set_current_context_id)
+   END INTERFACE xios(set_current_context)
+
+   CONTAINS ! Fonctions disponibles pour les utilisateurs.
+
+   SUBROUTINE xios(get_context_handle)(idt,ret)
+      IMPLICIT NONE
+      CHARACTER(len = *)  , INTENT(IN)  :: idt
+      TYPE(txios(context)), INTENT(OUT):: ret
+
+      CALL cxios_context_handle_create(ret%daddr, idt, len(idt))
+   END SUBROUTINE xios(get_context_handle)
+
+   SUBROUTINE xios(get_current_context)(context)
+      IMPLICIT NONE
+
+      TYPE(txios(context)), INTENT(IN) :: context
+
+      CALL cxios_context_get_current(context%daddr)
+
+   END SUBROUTINE xios(get_current_context)
+
+   SUBROUTINE xios(set_current_context_hdl)(context, withswap)
+      IMPLICIT NONE
+
+      TYPE(txios(context))          , INTENT(IN) :: context
+      LOGICAL             , OPTIONAL, INTENT(IN) :: withswap
+      LOGICAL (kind = 1)                         :: wswap
+
+      IF (PRESENT(withswap)) THEN
+         wswap = withswap
+      ELSE
+         wswap = .FALSE.
+      END IF
+      CALL cxios_context_set_current(context%daddr, wswap)
+
+   END SUBROUTINE xios(set_current_context_hdl)
+
+   SUBROUTINE xios(set_current_context_id)(idt)
+      IMPLICIT NONE
+
+      CHARACTER(len = *) , INTENT(IN) :: idt
+      LOGICAL           :: withswap
+      TYPE(xios_context):: ret
+
+      CALL xios(get_context_handle)(idt,ret)
+      CALL xios(set_current_context_hdl)(ret, withswap)
+    END SUBROUTINE xios(set_current_context_id)
+
+   LOGICAL FUNCTION xios(is_valid_context)(idt)
+      IMPLICIT NONE
+      CHARACTER(len  = *)    , INTENT(IN) :: idt
+      LOGICAL  (kind = 1)                 :: val
+
+      CALL cxios_context_valid_id(val, idt, len(idt));
+      xios(is_valid_context) = val
+
+   END FUNCTION  xios(is_valid_context)
+
+
+END MODULE ICONTEXT
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/fortran/idata.F90
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/fortran/idata.F90	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/fortran/idata.F90	(revision 1749)
@@ -0,0 +1,909 @@
+#include "xios_fortran_prefix.hpp"
+
+MODULE IDATA
+   USE, INTRINSIC :: ISO_C_BINDING
+   USE ICONTEXT
+
+   INTERFACE ! Ne pas appeler directement/Interface FORTRAN 2003 <-> C99
+
+      SUBROUTINE  cxios_init_server() BIND(C)
+      END SUBROUTINE cxios_init_server
+
+     SUBROUTINE cxios_init_client(client_id, len_client_id, f_local_comm, f_return_comm) BIND(C)
+         USE ISO_C_BINDING
+         CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: client_id
+         INTEGER  (kind = C_INT)     , VALUE        :: len_client_id
+         INTEGER  (kind = C_INT)                    :: f_local_comm
+         INTEGER  (kind = C_INT)                    :: f_return_comm
+      END SUBROUTINE cxios_init_client
+
+      SUBROUTINE  cxios_context_initialize(context_id,len_context_id,f_comm) BIND(C)
+         USE ISO_C_BINDING
+         CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: context_id
+         INTEGER  (kind = C_INT)     , VALUE        :: len_context_id
+         INTEGER  (kind = C_INT)                    :: f_comm
+      END SUBROUTINE cxios_context_initialize
+
+      SUBROUTINE cxios_context_is_initialized(context_id,len_context_id,initialized) BIND(C)
+         USE ISO_C_BINDING
+         CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: context_id
+         INTEGER  (kind = C_INT)     , VALUE        :: len_context_id
+         LOGICAL  (kind = C_BOOL)                   :: initialized
+      END SUBROUTINE cxios_context_is_initialized
+
+
+       SUBROUTINE  cxios_context_close_definition() BIND(C)
+         USE ISO_C_BINDING
+      END SUBROUTINE cxios_context_close_definition
+
+
+       SUBROUTINE  cxios_context_finalize() BIND(C)
+         USE ISO_C_BINDING
+      END SUBROUTINE cxios_context_finalize
+
+      SUBROUTINE  cxios_oasis_enddef() BIND(C)
+         USE ISO_C_BINDING
+      END SUBROUTINE cxios_oasis_enddef
+      
+      SUBROUTINE  cxios_finalize() BIND(C)
+      END SUBROUTINE cxios_finalize
+
+      SUBROUTINE  cxios_solve_inheritance() BIND(C)
+      END SUBROUTINE cxios_solve_inheritance
+
+      SUBROUTINE cxios_write_data_k80(fieldid, fieldid_size, data_k8, data_Xsize) BIND(C)
+         USE ISO_C_BINDING
+         CHARACTER(kind = C_CHAR)  , DIMENSION(*) :: fieldid
+         REAL     (kind = C_DOUBLE)               :: data_k8
+         INTEGER  (kind = C_INT)   , VALUE        :: fieldid_size
+         INTEGER  (kind = C_INT)   , VALUE        :: data_Xsize
+      END SUBROUTINE cxios_write_data_k80
+
+      SUBROUTINE cxios_write_data_k81(fieldid, fieldid_size, data_k8, data_Xsize) BIND(C)
+         USE ISO_C_BINDING
+         CHARACTER(kind = C_CHAR)  , DIMENSION(*) :: fieldid
+         REAL     (kind = C_DOUBLE), DIMENSION(*) :: data_k8
+         INTEGER  (kind = C_INT)   , VALUE        :: fieldid_size
+         INTEGER  (kind = C_INT)   , VALUE        :: data_Xsize
+      END SUBROUTINE cxios_write_data_k81
+
+      SUBROUTINE cxios_write_data_k82(fieldid, fieldid_size, data_k8, data_Xsize, data_Ysize) BIND(C)
+         USE ISO_C_BINDING
+         CHARACTER(kind = C_CHAR)  , DIMENSION(*) :: fieldid
+         REAL     (kind = C_DOUBLE), DIMENSION(*) :: data_k8
+         INTEGER  (kind = C_INT)   , VALUE        :: fieldid_size
+         INTEGER  (kind = C_INT)   , VALUE        :: data_Xsize, data_Ysize
+      END SUBROUTINE cxios_write_data_k82
+
+      SUBROUTINE cxios_write_data_k83(fieldid, fieldid_size, data_k8, data_Xsize, data_Ysize, data_Zsize) BIND(C)
+         USE ISO_C_BINDING
+         CHARACTER(kind = C_CHAR)  , DIMENSION(*) :: fieldid
+         REAL     (kind = C_DOUBLE), DIMENSION(*) :: data_k8
+         INTEGER  (kind = C_INT)   , VALUE        :: fieldid_size
+         INTEGER  (kind = C_INT)   , VALUE        :: data_Xsize, data_Ysize, data_Zsize
+      END SUBROUTINE cxios_write_data_k83
+
+      SUBROUTINE cxios_write_data_k84(fieldid, fieldid_size, data_k8, &
+                                      data_0size, data_1size, data_2size, &
+                                      data_3size) BIND(C)
+         USE ISO_C_BINDING
+         CHARACTER(kind = C_CHAR)  , DIMENSION(*) :: fieldid
+         REAL     (kind = C_DOUBLE), DIMENSION(*) :: data_k8
+         INTEGER  (kind = C_INT)   , VALUE        :: fieldid_size
+         INTEGER  (kind = C_INT)   , VALUE        :: data_0size, data_1size, data_2size
+         INTEGER  (kind = C_INT)   , VALUE        :: data_3size
+      END SUBROUTINE cxios_write_data_k84
+
+      SUBROUTINE cxios_write_data_k85(fieldid, fieldid_size, data_k8, &
+                                      data_0size, data_1size, data_2size, &
+                                      data_3size, data_4size) BIND(C)
+         USE ISO_C_BINDING
+         CHARACTER(kind = C_CHAR)  , DIMENSION(*) :: fieldid
+         REAL     (kind = C_DOUBLE), DIMENSION(*) :: data_k8
+         INTEGER  (kind = C_INT)   , VALUE        :: fieldid_size
+         INTEGER  (kind = C_INT)   , VALUE        :: data_0size, data_1size, data_2size
+         INTEGER  (kind = C_INT)   , VALUE        :: data_3size, data_4size
+      END SUBROUTINE cxios_write_data_k85
+
+      SUBROUTINE cxios_write_data_k86(fieldid, fieldid_size, data_k8, &
+                                      data_0size, data_1size, data_2size, &
+                                      data_3size, data_4size, data_5size) BIND(C)
+         USE ISO_C_BINDING
+         CHARACTER(kind = C_CHAR)  , DIMENSION(*) :: fieldid
+         REAL     (kind = C_DOUBLE), DIMENSION(*) :: data_k8
+         INTEGER  (kind = C_INT)   , VALUE        :: fieldid_size
+         INTEGER  (kind = C_INT)   , VALUE        :: data_0size, data_1size, data_2size
+         INTEGER  (kind = C_INT)   , VALUE        :: data_3size, data_4size, data_5size
+      END SUBROUTINE cxios_write_data_k86
+
+      SUBROUTINE cxios_write_data_k87(fieldid, fieldid_size, data_k8, &
+                                      data_0size, data_1size, data_2size, &
+                                      data_3size, data_4size, data_5size, &
+                                      data_6size) BIND(C)
+         USE ISO_C_BINDING
+         CHARACTER(kind = C_CHAR)  , DIMENSION(*) :: fieldid
+         REAL     (kind = C_DOUBLE), DIMENSION(*) :: data_k8
+         INTEGER  (kind = C_INT)   , VALUE        :: fieldid_size
+         INTEGER  (kind = C_INT)   , VALUE        :: data_0size, data_1size, data_2size
+         INTEGER  (kind = C_INT)   , VALUE        :: data_3size, data_4size, data_5size
+         INTEGER  (kind = C_INT)   , VALUE        :: data_6size
+      END SUBROUTINE cxios_write_data_k87
+
+      SUBROUTINE cxios_write_data_k40(fieldid, fieldid_size, data_k4, data_Xsize) BIND(C)
+         USE ISO_C_BINDING
+         CHARACTER(kind = C_CHAR)  , DIMENSION(*) :: fieldid
+         REAL     (kind = C_FLOAT)                :: data_k4
+         INTEGER  (kind = C_INT)   , VALUE        :: fieldid_size
+         INTEGER  (kind = C_INT)   , VALUE        :: data_Xsize
+      END SUBROUTINE cxios_write_data_k40
+
+      SUBROUTINE cxios_write_data_k41(fieldid, fieldid_size, data_k4, data_Xsize) BIND(C)
+         USE ISO_C_BINDING
+         CHARACTER(kind = C_CHAR)  , DIMENSION(*) :: fieldid
+         REAL     (kind = C_FLOAT) , DIMENSION(*) :: data_k4
+         INTEGER  (kind = C_INT)   , VALUE        :: fieldid_size
+         INTEGER  (kind = C_INT)   , VALUE        :: data_Xsize
+      END SUBROUTINE cxios_write_data_k41
+
+      SUBROUTINE cxios_write_data_k42(fieldid, fieldid_size, data_k4, data_Xsize, data_Ysize) BIND(C)
+         USE ISO_C_BINDING
+         CHARACTER(kind = C_CHAR)  , DIMENSION(*) :: fieldid
+         REAL     (kind = C_FLOAT) , DIMENSION(*) :: data_k4
+         INTEGER  (kind = C_INT)   , VALUE        :: fieldid_size
+         INTEGER  (kind = C_INT)   , VALUE        :: data_Xsize, data_Ysize
+      END SUBROUTINE cxios_write_data_k42
+
+      SUBROUTINE cxios_write_data_k43(fieldid, fieldid_size, data_k4, data_Xsize, data_Ysize, data_Zsize) BIND(C)
+         USE ISO_C_BINDING
+         CHARACTER(kind = C_CHAR)  , DIMENSION(*) :: fieldid
+         REAL     (kind = C_FLOAT) , DIMENSION(*) :: data_k4
+         INTEGER  (kind = C_INT)   , VALUE        :: fieldid_size
+         INTEGER  (kind = C_INT)   , VALUE        :: data_Xsize, data_Ysize, data_Zsize
+      END SUBROUTINE cxios_write_data_k43
+
+      SUBROUTINE cxios_write_data_k44(fieldid, fieldid_size, data_k4, &
+                                      data_0size, data_1size, data_2size, &
+                                      data_3size) BIND(C)
+         USE ISO_C_BINDING
+         CHARACTER(kind = C_CHAR)  , DIMENSION(*) :: fieldid
+         REAL     (kind = C_FLOAT) , DIMENSION(*) :: data_k4
+         INTEGER  (kind = C_INT)   , VALUE        :: fieldid_size
+         INTEGER  (kind = C_INT)   , VALUE        :: data_0size, data_1size, data_2size
+         INTEGER  (kind = C_INT)   , VALUE        :: data_3size
+      END SUBROUTINE cxios_write_data_k44
+
+      SUBROUTINE cxios_write_data_k45(fieldid, fieldid_size, data_k4, &
+                                      data_0size, data_1size, data_2size, &
+                                      data_3size, data_4size) BIND(C)
+         USE ISO_C_BINDING
+         CHARACTER(kind = C_CHAR)  , DIMENSION(*) :: fieldid
+         REAL     (kind = C_FLOAT) , DIMENSION(*) :: data_k4
+         INTEGER  (kind = C_INT)   , VALUE        :: fieldid_size
+         INTEGER  (kind = C_INT)   , VALUE        :: data_0size, data_1size, data_2size
+         INTEGER  (kind = C_INT)   , VALUE        :: data_3size, data_4size
+      END SUBROUTINE cxios_write_data_k45
+
+      SUBROUTINE cxios_write_data_k46(fieldid, fieldid_size, data_k4, &
+                                      data_0size, data_1size, data_2size, &
+                                      data_3size, data_4size, data_5size) BIND(C)
+         USE ISO_C_BINDING
+         CHARACTER(kind = C_CHAR)  , DIMENSION(*) :: fieldid
+         REAL     (kind = C_FLOAT) , DIMENSION(*) :: data_k4
+         INTEGER  (kind = C_INT)   , VALUE        :: fieldid_size
+         INTEGER  (kind = C_INT)   , VALUE        :: data_0size, data_1size, data_2size
+         INTEGER  (kind = C_INT)   , VALUE        :: data_3size, data_4size, data_5size
+      END SUBROUTINE cxios_write_data_k46
+
+      SUBROUTINE cxios_write_data_k47(fieldid, fieldid_size, data_k4, &
+                                      data_0size, data_1size, data_2size, &
+                                      data_3size, data_4size, data_5size, &
+                                      data_6size) BIND(C)
+         USE ISO_C_BINDING
+         CHARACTER(kind = C_CHAR)  , DIMENSION(*) :: fieldid
+         REAL     (kind = C_FLOAT) , DIMENSION(*) :: data_k4
+         INTEGER  (kind = C_INT)   , VALUE        :: fieldid_size
+         INTEGER  (kind = C_INT)   , VALUE        :: data_0size, data_1size, data_2size
+         INTEGER  (kind = C_INT)   , VALUE        :: data_3size, data_4size, data_5size
+         INTEGER  (kind = C_INT)   , VALUE        :: data_6size
+      END SUBROUTINE cxios_write_data_k47
+
+      ! Read data
+      SUBROUTINE cxios_read_data_k80(fieldid, fieldid_size, data_k8, data_Xsize) BIND(C)
+         USE ISO_C_BINDING
+         CHARACTER(kind = C_CHAR)  , DIMENSION(*) :: fieldid
+         REAL     (kind = C_DOUBLE)               :: data_k8
+         INTEGER  (kind = C_INT)   , VALUE        :: fieldid_size
+         INTEGER  (kind = C_INT)   , VALUE        :: data_Xsize
+      END SUBROUTINE cxios_read_data_k80
+
+      SUBROUTINE cxios_read_data_k81(fieldid, fieldid_size, data_k8, data_Xsize) BIND(C)
+         USE ISO_C_BINDING
+         CHARACTER(kind = C_CHAR)  , DIMENSION(*) :: fieldid
+         REAL     (kind = C_DOUBLE), DIMENSION(*) :: data_k8
+         INTEGER  (kind = C_INT)   , VALUE        :: fieldid_size
+         INTEGER  (kind = C_INT)   , VALUE        :: data_Xsize
+      END SUBROUTINE cxios_read_data_k81
+
+      SUBROUTINE cxios_read_data_k82(fieldid, fieldid_size, data_k8, data_Xsize, data_Ysize) BIND(C)
+         USE ISO_C_BINDING
+         CHARACTER(kind = C_CHAR)  , DIMENSION(*) :: fieldid
+         REAL     (kind = C_DOUBLE), DIMENSION(*) :: data_k8
+         INTEGER  (kind = C_INT)   , VALUE        :: fieldid_size
+         INTEGER  (kind = C_INT)   , VALUE        :: data_Xsize, data_Ysize
+      END SUBROUTINE cxios_read_data_k82
+
+      SUBROUTINE cxios_read_data_k83(fieldid, fieldid_size, data_k8, data_Xsize, data_Ysize, data_Zsize) BIND(C)
+         USE ISO_C_BINDING
+         CHARACTER(kind = C_CHAR)  , DIMENSION(*) :: fieldid
+         REAL     (kind = C_DOUBLE), DIMENSION(*) :: data_k8
+         INTEGER  (kind = C_INT)   , VALUE        :: fieldid_size
+         INTEGER  (kind = C_INT)   , VALUE        :: data_Xsize, data_Ysize, data_Zsize
+      END SUBROUTINE cxios_read_data_k83
+
+      SUBROUTINE cxios_read_data_k84(fieldid, fieldid_size, data_k8, &
+                                      data_0size, data_1size, data_2size, &
+                                      data_3size) BIND(C)
+         USE ISO_C_BINDING
+         CHARACTER(kind = C_CHAR)  , DIMENSION(*) :: fieldid
+         REAL     (kind = C_DOUBLE), DIMENSION(*) :: data_k8
+         INTEGER  (kind = C_INT)   , VALUE        :: fieldid_size
+         INTEGER  (kind = C_INT)   , VALUE        :: data_0size, data_1size, data_2size
+         INTEGER  (kind = C_INT)   , VALUE        :: data_3size
+      END SUBROUTINE cxios_read_data_k84
+
+      SUBROUTINE cxios_read_data_k85(fieldid, fieldid_size, data_k8, &
+                                      data_0size, data_1size, data_2size, &
+                                      data_3size, data_4size) BIND(C)
+         USE ISO_C_BINDING
+         CHARACTER(kind = C_CHAR)  , DIMENSION(*) :: fieldid
+         REAL     (kind = C_DOUBLE), DIMENSION(*) :: data_k8
+         INTEGER  (kind = C_INT)   , VALUE        :: fieldid_size
+         INTEGER  (kind = C_INT)   , VALUE        :: data_0size, data_1size, data_2size
+         INTEGER  (kind = C_INT)   , VALUE        :: data_3size, data_4size
+      END SUBROUTINE cxios_read_data_k85
+
+      SUBROUTINE cxios_read_data_k86(fieldid, fieldid_size, data_k8, &
+                                      data_0size, data_1size, data_2size, &
+                                      data_3size, data_4size, data_5size) BIND(C)
+         USE ISO_C_BINDING
+         CHARACTER(kind = C_CHAR)  , DIMENSION(*) :: fieldid
+         REAL     (kind = C_DOUBLE), DIMENSION(*) :: data_k8
+         INTEGER  (kind = C_INT)   , VALUE        :: fieldid_size
+         INTEGER  (kind = C_INT)   , VALUE        :: data_0size, data_1size, data_2size
+         INTEGER  (kind = C_INT)   , VALUE        :: data_3size, data_4size, data_5size
+      END SUBROUTINE cxios_read_data_k86
+
+      SUBROUTINE cxios_read_data_k87(fieldid, fieldid_size, data_k8, &
+                                      data_0size, data_1size, data_2size, &
+                                      data_3size, data_4size, data_5size, &
+                                      data_6size) BIND(C)
+         USE ISO_C_BINDING
+         CHARACTER(kind = C_CHAR)  , DIMENSION(*) :: fieldid
+         REAL     (kind = C_DOUBLE), DIMENSION(*) :: data_k8
+         INTEGER  (kind = C_INT)   , VALUE        :: fieldid_size
+         INTEGER  (kind = C_INT)   , VALUE        :: data_0size, data_1size, data_2size
+         INTEGER  (kind = C_INT)   , VALUE        :: data_3size, data_4size, data_5size
+         INTEGER  (kind = C_INT)   , VALUE        :: data_6size
+      END SUBROUTINE cxios_read_data_k87
+
+      SUBROUTINE cxios_read_data_k40(fieldid, fieldid_size, data_k4, data_Xsize) BIND(C)
+         USE ISO_C_BINDING
+         CHARACTER(kind = C_CHAR)  , DIMENSION(*) :: fieldid
+         REAL     (kind = C_FLOAT)                :: data_k4
+         INTEGER  (kind = C_INT)   , VALUE        :: fieldid_size
+         INTEGER  (kind = C_INT)   , VALUE        :: data_Xsize
+      END SUBROUTINE cxios_read_data_k40
+
+      SUBROUTINE cxios_read_data_k41(fieldid, fieldid_size, data_k4, data_Xsize) BIND(C)
+         USE ISO_C_BINDING
+         CHARACTER(kind = C_CHAR)  , DIMENSION(*) :: fieldid
+         REAL     (kind = C_FLOAT) , DIMENSION(*) :: data_k4
+         INTEGER  (kind = C_INT)   , VALUE        :: fieldid_size
+         INTEGER  (kind = C_INT)   , VALUE        :: data_Xsize
+      END SUBROUTINE cxios_read_data_k41
+
+      SUBROUTINE cxios_read_data_k42(fieldid, fieldid_size, data_k4, data_Xsize, data_Ysize) BIND(C)
+         USE ISO_C_BINDING
+         CHARACTER(kind = C_CHAR)  , DIMENSION(*) :: fieldid
+         REAL     (kind = C_FLOAT) , DIMENSION(*) :: data_k4
+         INTEGER  (kind = C_INT)   , VALUE        :: fieldid_size
+         INTEGER  (kind = C_INT)   , VALUE        :: data_Xsize, data_Ysize
+      END SUBROUTINE cxios_read_data_k42
+
+      SUBROUTINE cxios_read_data_k43(fieldid, fieldid_size, data_k4, data_Xsize, data_Ysize, data_Zsize) BIND(C)
+         USE ISO_C_BINDING
+         CHARACTER(kind = C_CHAR)  , DIMENSION(*) :: fieldid
+         REAL     (kind = C_FLOAT) , DIMENSION(*) :: data_k4
+         INTEGER  (kind = C_INT)   , VALUE        :: fieldid_size
+         INTEGER  (kind = C_INT)   , VALUE        :: data_Xsize, data_Ysize, data_Zsize
+      END SUBROUTINE cxios_read_data_k43
+
+      SUBROUTINE cxios_read_data_k44(fieldid, fieldid_size, data_k4, &
+                                      data_0size, data_1size, data_2size, &
+                                      data_3size) BIND(C)
+         USE ISO_C_BINDING
+         CHARACTER(kind = C_CHAR)  , DIMENSION(*) :: fieldid
+         REAL     (kind = C_FLOAT) , DIMENSION(*) :: data_k4
+         INTEGER  (kind = C_INT)   , VALUE        :: fieldid_size
+         INTEGER  (kind = C_INT)   , VALUE        :: data_0size, data_1size, data_2size
+         INTEGER  (kind = C_INT)   , VALUE        :: data_3size
+      END SUBROUTINE cxios_read_data_k44
+
+      SUBROUTINE cxios_read_data_k45(fieldid, fieldid_size, data_k4, &
+                                      data_0size, data_1size, data_2size, &
+                                      data_3size, data_4size) BIND(C)
+         USE ISO_C_BINDING
+         CHARACTER(kind = C_CHAR)  , DIMENSION(*) :: fieldid
+         REAL     (kind = C_FLOAT) , DIMENSION(*) :: data_k4
+         INTEGER  (kind = C_INT)   , VALUE        :: fieldid_size
+         INTEGER  (kind = C_INT)   , VALUE        :: data_0size, data_1size, data_2size
+         INTEGER  (kind = C_INT)   , VALUE        :: data_3size, data_4size
+      END SUBROUTINE cxios_read_data_k45
+
+      SUBROUTINE cxios_read_data_k46(fieldid, fieldid_size, data_k4, &
+                                      data_0size, data_1size, data_2size, &
+                                      data_3size, data_4size, data_5size) BIND(C)
+         USE ISO_C_BINDING
+         CHARACTER(kind = C_CHAR)  , DIMENSION(*) :: fieldid
+         REAL     (kind = C_FLOAT) , DIMENSION(*) :: data_k4
+         INTEGER  (kind = C_INT)   , VALUE        :: fieldid_size
+         INTEGER  (kind = C_INT)   , VALUE        :: data_0size, data_1size, data_2size
+         INTEGER  (kind = C_INT)   , VALUE        :: data_3size, data_4size, data_5size
+      END SUBROUTINE cxios_read_data_k46
+
+      SUBROUTINE cxios_read_data_k47(fieldid, fieldid_size, data_k4, &
+                                      data_0size, data_1size, data_2size, &
+                                      data_3size, data_4size, data_5size, &
+                                      data_6size) BIND(C)
+         USE ISO_C_BINDING
+         CHARACTER(kind = C_CHAR)  , DIMENSION(*) :: fieldid
+         REAL     (kind = C_FLOAT) , DIMENSION(*) :: data_k4
+         INTEGER  (kind = C_INT)   , VALUE        :: fieldid_size
+         INTEGER  (kind = C_INT)   , VALUE        :: data_0size, data_1size, data_2size
+         INTEGER  (kind = C_INT)   , VALUE        :: data_3size, data_4size, data_5size
+         INTEGER  (kind = C_INT)   , VALUE        :: data_6size
+      END SUBROUTINE cxios_read_data_k47
+
+      ! Binding C and Fortran interface of get_variable (icdata.cpp)
+      SUBROUTINE cxios_get_variable_data_k8(vardid, varid_size, data_k8, is_var_existed) BIND(C)
+         USE ISO_C_BINDING
+         CHARACTER(kind = C_CHAR)  , DIMENSION(*) :: vardid
+         INTEGER  (kind = C_INT)   , VALUE        :: varid_size
+         REAL     (kind = C_DOUBLE)               :: data_k8
+         LOGICAL  (kind = C_BOOL)                 :: is_var_existed
+      END SUBROUTINE cxios_get_variable_data_k8
+
+      SUBROUTINE cxios_get_variable_data_k4(vardid, varid_size, data_k4, is_var_existed) BIND(C)
+         USE ISO_C_BINDING
+         CHARACTER(kind = C_CHAR)  , DIMENSION(*) :: vardid
+         INTEGER  (kind = C_INT)   , VALUE        :: varid_size
+         REAL     (kind = C_FLOAT)                :: data_k4
+         LOGICAL  (kind = C_BOOL)                 :: is_var_existed
+      END SUBROUTINE cxios_get_variable_data_k4
+
+      SUBROUTINE cxios_get_variable_data_int(vardid, varid_size, data_int, is_var_existed) BIND(C)
+         USE ISO_C_BINDING
+         CHARACTER(kind = C_CHAR)  , DIMENSION(*) :: vardid
+         INTEGER  (kind = C_INT)   , VALUE        :: varid_size
+         INTEGER  (kind = C_INT)                  :: data_int
+         LOGICAL  (kind = C_BOOL)                 :: is_var_existed
+      END SUBROUTINE cxios_get_variable_data_int
+
+      SUBROUTINE cxios_get_variable_data_logic(vardid, varid_size, data_logic, is_var_existed) BIND(C)
+         USE ISO_C_BINDING
+         CHARACTER(kind = C_CHAR)  , DIMENSION(*) :: vardid
+         INTEGER  (kind = C_INT)   , VALUE        :: varid_size
+         LOGICAL  (kind = 4)                      :: data_logic
+         LOGICAL  (kind = C_BOOL)                 :: is_var_existed
+      END SUBROUTINE cxios_get_variable_data_logic
+
+      SUBROUTINE cxios_get_variable_data_char(vardid, varid_size, data_char, data_size_in, is_var_existed) BIND(C)
+         USE ISO_C_BINDING
+         CHARACTER(kind = C_CHAR)  , DIMENSION(*) :: vardid
+         INTEGER  (kind = C_INT)   , VALUE        :: varid_size
+         INTEGER  (kind = C_INT)   , VALUE        :: data_size_in
+         CHARACTER(kind = C_CHAR)  , DIMENSION(*) :: data_char
+         LOGICAL  (kind = C_BOOL)                 :: is_var_existed
+      END SUBROUTINE cxios_get_variable_data_char
+
+      ! Binding C and Fortran interface of set_variable (icdata.cpp)
+      SUBROUTINE cxios_set_variable_data_k8(vardid, varid_size, data_k8, is_var_existed) BIND(C)
+         USE ISO_C_BINDING
+         CHARACTER(kind = C_CHAR)  , DIMENSION(*) :: vardid
+         INTEGER  (kind = C_INT)   , VALUE        :: varid_size
+         REAL     (kind = C_DOUBLE), VALUE        :: data_k8
+         LOGICAL  (kind = C_BOOL)                 :: is_var_existed
+      END SUBROUTINE cxios_set_variable_data_k8
+
+      SUBROUTINE cxios_set_variable_data_k4(vardid, varid_size, data_k4, is_var_existed) BIND(C)
+         USE ISO_C_BINDING
+         CHARACTER(kind = C_CHAR)  , DIMENSION(*) :: vardid
+         INTEGER  (kind = C_INT)   , VALUE        :: varid_size
+         REAL     (kind = C_FLOAT) , VALUE        :: data_k4
+         LOGICAL  (kind = C_BOOL)                 :: is_var_existed
+      END SUBROUTINE cxios_set_variable_data_k4
+
+      SUBROUTINE cxios_set_variable_data_int(vardid, varid_size, data_int, is_var_existed) BIND(C)
+         USE ISO_C_BINDING
+         CHARACTER(kind = C_CHAR)  , DIMENSION(*) :: vardid
+         INTEGER  (kind = C_INT)   , VALUE        :: varid_size
+         INTEGER  (kind = C_INT)   , VALUE        :: data_int
+         LOGICAL  (kind = C_BOOL)                 :: is_var_existed
+      END SUBROUTINE cxios_set_variable_data_int
+
+      SUBROUTINE cxios_set_variable_data_logic(vardid, varid_size, data_logic, is_var_existed) BIND(C)
+         USE ISO_C_BINDING
+         CHARACTER(kind = C_CHAR)  , DIMENSION(*) :: vardid
+         INTEGER  (kind = C_INT)   , VALUE        :: varid_size
+         LOGICAL  (kind = 4)       , VALUE        :: data_logic
+         LOGICAL  (kind = C_BOOL)                 :: is_var_existed
+      END SUBROUTINE cxios_set_variable_data_logic
+
+      SUBROUTINE cxios_set_variable_data_char(vardid, varid_size, data_char, data_size_in, is_var_existed) BIND(C)
+         USE ISO_C_BINDING
+         CHARACTER(kind = C_CHAR)  , DIMENSION(*) :: vardid
+         INTEGER  (kind = C_INT)   , VALUE        :: varid_size
+         INTEGER  (kind = C_INT)   , VALUE        :: data_size_in
+         CHARACTER(kind = C_CHAR)  , DIMENSION(*) :: data_char
+         LOGICAL  (kind = C_BOOL)                 :: is_var_existed
+      END SUBROUTINE cxios_set_variable_data_char
+
+   END INTERFACE
+
+
+   CONTAINS ! Fonctions disponibles pour les utilisateurs.
+
+   SUBROUTINE  xios(init_server)()
+   IMPLICIT NONE
+     CALL cxios_init_server()
+   END SUBROUTINE xios(init_server)
+
+   SUBROUTINE  xios(initialize)(client_id, local_comm, return_comm)
+   IMPLICIT NONE
+   INCLUDE 'mpif.h'
+   CHARACTER(LEN=*),INTENT(IN) :: client_id
+   INTEGER,INTENT(IN),OPTIONAL         :: local_comm
+   INTEGER,INTENT(OUT),OPTIONAL        :: return_comm
+   INTEGER :: f_local_comm
+   INTEGER :: f_return_comm
+
+      IF (PRESENT(local_comm)) THEN
+        f_local_comm=local_comm
+      ELSE
+        f_local_comm = MPI_COMM_NULL
+      ENDIF
+
+      CALL cxios_init_client(client_id,LEN(client_id),f_local_comm,f_return_comm)
+
+      IF (PRESENT(return_comm)) return_comm=f_return_comm
+
+   END SUBROUTINE  xios(initialize)
+
+
+   SUBROUTINE  xios(context_initialize)(context_id,comm)
+   IMPLICIT NONE
+   CHARACTER(LEN=*),INTENT(IN)  :: context_id
+   INTEGER, INTENT(IN)          :: comm
+
+      CALL cxios_context_initialize(context_id,LEN(context_id),comm)
+
+    END SUBROUTINE  xios(context_initialize)
+
+
+   LOGICAL FUNCTION  xios(context_is_initialized)(context_id)
+   USE ISO_C_BINDING
+   IMPLICIT NONE
+   CHARACTER(LEN=*),INTENT(IN)  :: context_id
+   LOGICAL(KIND=C_BOOL) :: is_init
+
+      CALL cxios_context_is_initialized(context_id, LEN(context_id), is_init)
+      xios(context_is_initialized) = is_init
+
+    END FUNCTION xios(context_is_initialized)
+
+
+   SUBROUTINE  xios(finalize)
+   IMPLICIT NONE
+
+      CALL cxios_finalize
+
+    END SUBROUTINE  xios(finalize)
+
+   SUBROUTINE  xios(oasis_enddef)
+   IMPLICIT NONE
+
+      CALL cxios_oasis_enddef
+
+    END SUBROUTINE  xios(oasis_enddef)
+
+   SUBROUTINE xios(close_context_definition)()
+   IMPLICIT NONE
+      CALL cxios_context_close_definition()
+   END SUBROUTINE xios(close_context_definition)
+
+
+   SUBROUTINE xios(context_finalize)()
+   IMPLICIT NONE
+      CALL cxios_context_finalize()
+   END SUBROUTINE xios(context_finalize)
+
+   SUBROUTINE xios(solve_inheritance)()
+   IMPLICIT NONE
+      CALL cxios_solve_inheritance()
+   END SUBROUTINE xios(solve_inheritance)
+
+   ! Send field functions
+   SUBROUTINE xios(send_field_r8_0d)(fieldid, data_k8)
+   IMPLICIT NONE
+      CHARACTER(len = *) , INTENT(IN) :: fieldid
+      REAL     (kind = 8), INTENT(IN) :: data_k8
+      CALL cxios_write_data_k80(fieldid, len(fieldid), data_k8, 1)
+   END SUBROUTINE xios(send_field_r8_0d)
+
+   SUBROUTINE xios(send_field_r8_1d)(fieldid, data1d_k8)
+   IMPLICIT NONE
+      CHARACTER(len = *)               , INTENT(IN) :: fieldid
+      REAL     (kind = 8), DIMENSION(*), INTENT(IN) :: data1d_k8(:)
+      CALL cxios_write_data_k81(fieldid, len(fieldid), data1d_k8, size(data1d_k8, 1))
+   END SUBROUTINE xios(send_field_r8_1d)
+
+   SUBROUTINE  xios(send_field_r8_2d)(fieldid, data2d_k8)
+   IMPLICIT NONE
+      CHARACTER(len = *)               , INTENT(IN) :: fieldid
+      REAL     (kind = 8), DIMENSION(*), INTENT(IN) :: data2d_k8(:,:)
+      CALL cxios_write_data_k82(fieldid, len(fieldid), data2d_k8, size(data2d_k8, 1), size(data2d_k8, 2))
+   END SUBROUTINE  xios(send_field_r8_2d)
+
+   SUBROUTINE  xios(send_field_r8_3d)(fieldid, data3d_k8)
+   IMPLICIT NONE
+      CHARACTER(len = *)               , INTENT(IN) :: fieldid
+      REAL     (kind = 8), DIMENSION(*), INTENT(IN) :: data3d_k8(:,:,:)
+      CALL cxios_write_data_k83(fieldid, len(fieldid), data3d_k8, size(data3d_k8, 1), size(data3d_k8, 2), size(data3d_k8, 3))
+   END SUBROUTINE  xios(send_field_r8_3d)
+
+   SUBROUTINE  xios(send_field_r8_4d)(fieldid, data4d_k8)
+   IMPLICIT NONE
+      CHARACTER(len = *)               , INTENT(IN) :: fieldid
+      REAL     (kind = 8), DIMENSION(*), INTENT(IN) :: data4d_k8(:,:,:,:)
+      CALL cxios_write_data_k84(fieldid, len(fieldid), data4d_k8, &
+                                size(data4d_k8, 1), size(data4d_k8, 2), size(data4d_k8, 3), &
+                                size(data4d_k8, 4))
+   END SUBROUTINE  xios(send_field_r8_4d)
+
+   SUBROUTINE  xios(send_field_r8_5d)(fieldid, data5d_k8)
+   IMPLICIT NONE
+      CHARACTER(len = *)               , INTENT(IN) :: fieldid
+      REAL     (kind = 8), DIMENSION(*), INTENT(IN) :: data5d_k8(:,:,:,:,:)
+      CALL cxios_write_data_k85(fieldid, len(fieldid), data5d_k8, &
+                                size(data5d_k8, 1), size(data5d_k8, 2), size(data5d_k8, 3), &
+                                size(data5d_k8, 4), size(data5d_k8, 5))
+   END SUBROUTINE  xios(send_field_r8_5d)
+
+   SUBROUTINE  xios(send_field_r8_6d)(fieldid, data6d_k8)
+   IMPLICIT NONE
+      CHARACTER(len = *)               , INTENT(IN) :: fieldid
+      REAL     (kind = 8), DIMENSION(*), INTENT(IN) :: data6d_k8(:,:,:,:,:,:)
+      CALL cxios_write_data_k86(fieldid, len(fieldid), data6d_k8, &
+                                size(data6d_k8, 1), size(data6d_k8, 2), size(data6d_k8, 3), &
+                                size(data6d_k8, 4), size(data6d_k8, 5), size(data6d_k8, 6))
+   END SUBROUTINE  xios(send_field_r8_6d)
+
+   SUBROUTINE  xios(send_field_r8_7d)(fieldid, data7d_k8)
+   IMPLICIT NONE
+      CHARACTER(len = *)               , INTENT(IN) :: fieldid
+      REAL     (kind = 8), DIMENSION(*), INTENT(IN) :: data7d_k8(:,:,:,:,:,:,:)
+      CALL cxios_write_data_k87(fieldid, len(fieldid), data7d_k8, &
+                                size(data7d_k8, 1), size(data7d_k8, 2), size(data7d_k8, 3), &
+                                size(data7d_k8, 4), size(data7d_k8, 5), size(data7d_k8, 6), &
+                                size(data7d_k8, 7))
+   END SUBROUTINE  xios(send_field_r8_7d)
+
+   SUBROUTINE xios(send_field_r4_0d)(fieldid, data_k4)
+   IMPLICIT NONE
+      CHARACTER(len = *) , INTENT(IN) :: fieldid
+      REAL     (kind = 4), INTENT(IN) :: data_k4
+      CALL cxios_write_data_k40(fieldid, len(fieldid), data_k4, 1)
+   END SUBROUTINE xios(send_field_r4_0d)
+
+   SUBROUTINE xios(send_field_r4_1d)(fieldid, data1d_k4)
+   IMPLICIT NONE
+      CHARACTER(len = *)               , INTENT(IN) :: fieldid
+      REAL     (kind = 4), DIMENSION(*), INTENT(IN) :: data1d_k4(:)
+      CALL cxios_write_data_k41(fieldid, len(fieldid), data1d_k4, size(data1d_k4, 1))
+   END SUBROUTINE xios(send_field_r4_1d)
+
+   SUBROUTINE xios(send_field_r4_2d)(fieldid, data2d_k4)
+   IMPLICIT NONE
+      CHARACTER(len = *)               , INTENT(IN) :: fieldid
+      REAL     (kind = 4), DIMENSION(*), INTENT(IN) :: data2d_k4(:,:)
+      CALL cxios_write_data_k42(fieldid, len(fieldid), data2d_k4, size(data2d_k4, 1), size(data2d_k4, 2))
+   END SUBROUTINE xios(send_field_r4_2d)
+
+   SUBROUTINE xios(send_field_r4_3d)(fieldid, data3d_k4)
+   IMPLICIT NONE
+      CHARACTER(len = *)               , INTENT(IN) :: fieldid
+      REAL     (kind = 4), DIMENSION(*), INTENT(IN) :: data3d_k4(:,:,:)
+      CALL cxios_write_data_k43(fieldid, len(fieldid), data3d_k4, size(data3d_k4, 1), size(data3d_k4, 2), size(data3d_k4, 3))
+   END SUBROUTINE xios(send_field_r4_3d)
+
+   SUBROUTINE  xios(send_field_r4_4d)(fieldid, data4d_k4)
+   IMPLICIT NONE
+      CHARACTER(len = *)               , INTENT(IN) :: fieldid
+      REAL     (kind = 4), DIMENSION(*), INTENT(IN) :: data4d_k4(:,:,:,:)
+      CALL cxios_write_data_k44(fieldid, len(fieldid), data4d_k4, &
+                                size(data4d_k4, 1), size(data4d_k4, 2), size(data4d_k4, 3), &
+                                size(data4d_k4, 4))
+   END SUBROUTINE  xios(send_field_r4_4d)
+
+   SUBROUTINE  xios(send_field_r4_5d)(fieldid, data5d_k4)
+   IMPLICIT NONE
+      CHARACTER(len = *)               , INTENT(IN) :: fieldid
+      REAL     (kind = 4), DIMENSION(*), INTENT(IN) :: data5d_k4(:,:,:,:,:)
+      CALL cxios_write_data_k45(fieldid, len(fieldid), data5d_k4, &
+                                size(data5d_k4, 1), size(data5d_k4, 2), size(data5d_k4, 3), &
+                                size(data5d_k4, 4), size(data5d_k4, 5))
+   END SUBROUTINE  xios(send_field_r4_5d)
+
+   SUBROUTINE  xios(send_field_r4_6d)(fieldid, data6d_k4)
+   IMPLICIT NONE
+      CHARACTER(len = *)               , INTENT(IN) :: fieldid
+      REAL     (kind = 4), DIMENSION(*), INTENT(IN) :: data6d_k4(:,:,:,:,:,:)
+      CALL cxios_write_data_k46(fieldid, len(fieldid), data6d_k4, &
+                                size(data6d_k4, 1), size(data6d_k4, 2), size(data6d_k4, 3), &
+                                size(data6d_k4, 4), size(data6d_k4, 5), size(data6d_k4, 6))
+   END SUBROUTINE  xios(send_field_r4_6d)
+
+   SUBROUTINE  xios(send_field_r4_7d)(fieldid, data7d_k4)
+   IMPLICIT NONE
+      CHARACTER(len = *)               , INTENT(IN) :: fieldid
+      REAL     (kind = 4), DIMENSION(*), INTENT(IN) :: data7d_k4(:,:,:,:,:,:,:)
+      CALL cxios_write_data_k47(fieldid, len(fieldid), data7d_k4, &
+                                size(data7d_k4, 1), size(data7d_k4, 2), size(data7d_k4, 3), &
+                                size(data7d_k4, 4), size(data7d_k4, 5), size(data7d_k4, 6), &
+                                size(data7d_k4, 7))
+   END SUBROUTINE  xios(send_field_r4_7d)
+
+   ! Receive field functions
+   SUBROUTINE xios(recv_field_r8_0d)(fieldid, data0d_k8)
+   IMPLICIT NONE
+      CHARACTER(len = *)               , INTENT(IN) :: fieldid
+      REAL     (kind = 8)              , INTENT(OUT):: data0d_k8
+      CALL cxios_read_data_k80(fieldid, len(fieldid), data0d_k8, 1)
+   END SUBROUTINE xios(recv_field_r8_0d)
+
+   SUBROUTINE xios(recv_field_r8_1d)(fieldid, data1d_k8)
+   IMPLICIT NONE
+      CHARACTER(len = *)               , INTENT(IN) :: fieldid
+      REAL     (kind = 8), DIMENSION(*), INTENT(OUT) :: data1d_k8(:)
+      CALL cxios_read_data_k81(fieldid, len(fieldid), data1d_k8, size(data1d_k8, 1))
+   END SUBROUTINE xios(recv_field_r8_1d)
+
+   SUBROUTINE  xios(recv_field_r8_2d)(fieldid, data2d_k8)
+   IMPLICIT NONE
+      CHARACTER(len = *)               , INTENT(IN) :: fieldid
+      REAL     (kind = 8), DIMENSION(*), INTENT(OUT) :: data2d_k8(:,:)
+      CALL cxios_read_data_k82(fieldid, len(fieldid), data2d_k8, size(data2d_k8, 1), size(data2d_k8, 2))
+   END SUBROUTINE  xios(recv_field_r8_2d)
+
+   SUBROUTINE  xios(recv_field_r8_3d)(fieldid, data3d_k8)
+   IMPLICIT NONE
+      CHARACTER(len = *)               , INTENT(IN) :: fieldid
+      REAL     (kind = 8), DIMENSION(*), INTENT(OUT) :: data3d_k8(:,:,:)
+      CALL cxios_read_data_k83(fieldid, len(fieldid), data3d_k8, size(data3d_k8, 1), size(data3d_k8, 2), size(data3d_k8, 3))
+   END SUBROUTINE  xios(recv_field_r8_3d)
+
+   SUBROUTINE  xios(recv_field_r8_4d)(fieldid, data4d_k8)
+   IMPLICIT NONE
+      CHARACTER(len = *)               , INTENT(IN) :: fieldid
+      REAL     (kind = 8), DIMENSION(*), INTENT(OUT) :: data4d_k8(:,:,:,:)
+      CALL cxios_read_data_k84(fieldid, len(fieldid), data4d_k8, &
+                                size(data4d_k8, 1), size(data4d_k8, 2), size(data4d_k8, 3), &
+                                size(data4d_k8, 4))
+   END SUBROUTINE  xios(recv_field_r8_4d)
+
+   SUBROUTINE  xios(recv_field_r8_5d)(fieldid, data5d_k8)
+   IMPLICIT NONE
+      CHARACTER(len = *)               , INTENT(IN) :: fieldid
+      REAL     (kind = 8), DIMENSION(*), INTENT(OUT) :: data5d_k8(:,:,:,:,:)
+      CALL cxios_read_data_k85(fieldid, len(fieldid), data5d_k8, &
+                                size(data5d_k8, 1), size(data5d_k8, 2), size(data5d_k8, 3), &
+                                size(data5d_k8, 4), size(data5d_k8, 5))
+   END SUBROUTINE  xios(recv_field_r8_5d)
+
+   SUBROUTINE  xios(recv_field_r8_6d)(fieldid, data6d_k8)
+   IMPLICIT NONE
+      CHARACTER(len = *)               , INTENT(IN) :: fieldid
+      REAL     (kind = 8), DIMENSION(*), INTENT(OUT) :: data6d_k8(:,:,:,:,:,:)
+      CALL cxios_read_data_k86(fieldid, len(fieldid), data6d_k8, &
+                                size(data6d_k8, 1), size(data6d_k8, 2), size(data6d_k8, 3), &
+                                size(data6d_k8, 4), size(data6d_k8, 5), size(data6d_k8, 6))
+   END SUBROUTINE  xios(recv_field_r8_6d)
+
+   SUBROUTINE  xios(recv_field_r8_7d)(fieldid, data7d_k8)
+   IMPLICIT NONE
+      CHARACTER(len = *)               , INTENT(IN) :: fieldid
+      REAL     (kind = 8), DIMENSION(*), INTENT(OUT) :: data7d_k8(:,:,:,:,:,:,:)
+      CALL cxios_read_data_k87(fieldid, len(fieldid), data7d_k8, &
+                                size(data7d_k8, 1), size(data7d_k8, 2), size(data7d_k8, 3), &
+                                size(data7d_k8, 4), size(data7d_k8, 5), size(data7d_k8, 6), &
+                                size(data7d_k8, 7))
+   END SUBROUTINE  xios(recv_field_r8_7d)
+
+   SUBROUTINE xios(recv_field_r4_0d)(fieldid, data0d_k4)
+   IMPLICIT NONE
+      CHARACTER(len = *)               , INTENT(IN) :: fieldid
+      REAL     (kind = 4)              , INTENT(OUT):: data0d_k4
+      CALL cxios_read_data_k40(fieldid, len(fieldid), data0d_k4, 1)
+   END SUBROUTINE xios(recv_field_r4_0d)
+
+   SUBROUTINE xios(recv_field_r4_1d)(fieldid, data1d_k4)
+   IMPLICIT NONE
+      CHARACTER(len = *)               , INTENT(IN) :: fieldid
+      REAL     (kind = 4), DIMENSION(*), INTENT(OUT) :: data1d_k4(:)
+      CALL cxios_read_data_k41(fieldid, len(fieldid), data1d_k4, size(data1d_k4, 1))
+   END SUBROUTINE xios(recv_field_r4_1d)
+
+   SUBROUTINE xios(recv_field_r4_2d)(fieldid, data2d_k4)
+   IMPLICIT NONE
+      CHARACTER(len = *)               , INTENT(IN) :: fieldid
+      REAL     (kind = 4), DIMENSION(*), INTENT(OUT) :: data2d_k4(:,:)
+      CALL cxios_read_data_k42(fieldid, len(fieldid), data2d_k4, size(data2d_k4, 1), size(data2d_k4, 2))
+   END SUBROUTINE xios(recv_field_r4_2d)
+
+   SUBROUTINE xios(recv_field_r4_3d)(fieldid, data3d_k4)
+   IMPLICIT NONE
+      CHARACTER(len = *)               , INTENT(IN) :: fieldid
+      REAL     (kind = 4), DIMENSION(*), INTENT(OUT) :: data3d_k4(:,:,:)
+      CALL cxios_read_data_k43(fieldid, len(fieldid), data3d_k4, size(data3d_k4, 1), size(data3d_k4, 2), size(data3d_k4, 3))
+   END SUBROUTINE xios(recv_field_r4_3d)
+
+   SUBROUTINE  xios(recv_field_r4_4d)(fieldid, data4d_k4)
+   IMPLICIT NONE
+      CHARACTER(len = *)               , INTENT(IN) :: fieldid
+      REAL     (kind = 4), DIMENSION(*), INTENT(OUT) :: data4d_k4(:,:,:,:)
+      CALL cxios_read_data_k44(fieldid, len(fieldid), data4d_k4, &
+                                size(data4d_k4, 1), size(data4d_k4, 2), size(data4d_k4, 3), &
+                                size(data4d_k4, 4))
+   END SUBROUTINE  xios(recv_field_r4_4d)
+
+   SUBROUTINE  xios(recv_field_r4_5d)(fieldid, data5d_k4)
+   IMPLICIT NONE
+      CHARACTER(len = *)               , INTENT(IN) :: fieldid
+      REAL     (kind = 4), DIMENSION(*), INTENT(OUT) :: data5d_k4(:,:,:,:,:)
+      CALL cxios_read_data_k45(fieldid, len(fieldid), data5d_k4, &
+                                size(data5d_k4, 1), size(data5d_k4, 2), size(data5d_k4, 3), &
+                                size(data5d_k4, 4), size(data5d_k4, 5))
+   END SUBROUTINE  xios(recv_field_r4_5d)
+
+   SUBROUTINE  xios(recv_field_r4_6d)(fieldid, data6d_k4)
+   IMPLICIT NONE
+      CHARACTER(len = *)               , INTENT(IN) :: fieldid
+      REAL     (kind = 4), DIMENSION(*), INTENT(OUT) :: data6d_k4(:,:,:,:,:,:)
+      CALL cxios_read_data_k46(fieldid, len(fieldid), data6d_k4, &
+                                size(data6d_k4, 1), size(data6d_k4, 2), size(data6d_k4, 3), &
+                                size(data6d_k4, 4), size(data6d_k4, 5), size(data6d_k4, 6))
+   END SUBROUTINE  xios(recv_field_r4_6d)
+
+   SUBROUTINE  xios(recv_field_r4_7d)(fieldid, data7d_k4)
+   IMPLICIT NONE
+      CHARACTER(len = *)               , INTENT(IN) :: fieldid
+      REAL     (kind = 4), DIMENSION(*), INTENT(OUT) :: data7d_k4(:,:,:,:,:,:,:)
+      CALL cxios_read_data_k47(fieldid, len(fieldid), data7d_k4, &
+                                size(data7d_k4, 1), size(data7d_k4, 2), size(data7d_k4, 3), &
+                                size(data7d_k4, 4), size(data7d_k4, 5), size(data7d_k4, 6), &
+                                size(data7d_k4, 7))
+   END SUBROUTINE  xios(recv_field_r4_7d)
+
+   ! Get variable functions
+   LOGICAL FUNCTION xios(getVar_k8)(varId, data_k8)
+   IMPLICIT NONE
+      LOGICAL  (kind = 1)                           :: val
+      CHARACTER(len = *)               , INTENT(IN) :: varId
+      REAL     (kind = 8)              , INTENT(OUT):: data_k8
+
+      CALL cxios_get_variable_data_k8(varId, len(varId), data_k8, val)
+
+      xios(getVar_k8) = val
+   END FUNCTION xios(getVar_k8)
+
+   LOGICAL FUNCTION xios(getVar_k4)(varId, data_k4)
+   IMPLICIT NONE
+      LOGICAL  (kind = 1)                           :: val
+      CHARACTER(len = *)               , INTENT(IN) :: varId
+      REAL     (kind = 4)              , INTENT(OUT):: data_k4
+
+      CALL cxios_get_variable_data_k4(varId, len(varId), data_k4, val)
+
+      xios(getVar_k4) = val
+   END FUNCTION xios(getVar_k4)
+
+   LOGICAL FUNCTION xios(getVar_int)(varId, data_int)
+   IMPLICIT NONE
+      LOGICAL  (kind = 1)                           :: val
+      CHARACTER(len = *)               , INTENT(IN) :: varId
+      INTEGER                          , INTENT(OUT):: data_int
+
+      CALL cxios_get_variable_data_int(varId, len(varId), data_int, val)
+
+      xios(getVar_int) = val
+   END FUNCTION xios(getVar_int)
+
+   LOGICAL FUNCTION xios(getVar_logic)(varId, data_logic)
+   IMPLICIT NONE
+      LOGICAL  (kind = 1)                           :: val
+      CHARACTER(len  = *)              , INTENT(IN) :: varId
+      LOGICAL  (kind = 4)              , INTENT(OUT):: data_logic
+
+      CALL cxios_get_variable_data_logic(varId, len(varId), data_logic, val)
+
+      xios(getVar_logic) = val
+   END FUNCTION xios(getVar_logic)
+
+   LOGICAL FUNCTION xios(getVar_char)(varId, data_char)
+   IMPLICIT NONE
+      LOGICAL  (kind = 1)                           :: val
+      CHARACTER(len  = *)              , INTENT(IN) :: varId
+      CHARACTER(len  = *)              , INTENT(OUT):: data_char
+
+      CALL cxios_get_variable_data_char(varId, len(varId), data_char, len(data_char), val)
+
+      xios(getVar_char) = val
+   END FUNCTION xios(getVar_char)
+
+   ! Set variable functions
+   LOGICAL FUNCTION xios(setVar_k8)(varId, data_k8)
+   IMPLICIT NONE
+      LOGICAL  (kind = 1)                           :: val
+      CHARACTER(len = *)               , INTENT(IN) :: varId
+      REAL     (kind = 8)              , INTENT(IN) :: data_k8
+
+      CALL cxios_set_variable_data_k8(varId, len(varId), data_k8, val)
+
+      xios(setVar_k8) = val
+   END FUNCTION xios(setVar_k8)
+
+   LOGICAL FUNCTION xios(setVar_k4)(varId, data_k4)
+   IMPLICIT NONE
+      LOGICAL  (kind = 1)                           :: val
+      CHARACTER(len = *)               , INTENT(IN) :: varId
+      REAL     (kind = 4)              , INTENT(IN) :: data_k4
+
+      CALL cxios_set_variable_data_k4(varId, len(varId), data_k4, val)
+
+      xios(setVar_k4) = val
+   END FUNCTION xios(setVar_k4)
+
+   LOGICAL FUNCTION xios(setVar_int)(varId, data_int)
+   IMPLICIT NONE
+      LOGICAL  (kind = 1)                           :: val
+      CHARACTER(len = *)               , INTENT(IN) :: varId
+      INTEGER                          , INTENT(IN) :: data_int
+
+      CALL cxios_set_variable_data_int(varId, len(varId), data_int, val)
+
+      xios(setVar_int) = val
+   END FUNCTION xios(setVar_int)
+
+   LOGICAL FUNCTION xios(setVar_logic)(varId, data_logic)
+   IMPLICIT NONE
+      LOGICAL  (kind = 1)                           :: val
+      CHARACTER(len  = *)              , INTENT(IN) :: varId
+      LOGICAL  (kind = 4)              , INTENT(IN) :: data_logic
+
+      CALL cxios_set_variable_data_logic(varId, len(varId), data_logic, val)
+
+      xios(setVar_logic) = val
+   END FUNCTION xios(setVar_logic)
+
+   LOGICAL FUNCTION xios(setVar_char)(varId, data_char)
+   IMPLICIT NONE
+      LOGICAL  (kind = 1)                           :: val
+      CHARACTER(len  = *)              , INTENT(IN) :: varId
+      CHARACTER(len  = *)              , INTENT(IN) :: data_char
+
+      CALL cxios_set_variable_data_char(varId, len(varId), data_char, len(data_char), val)
+
+      xios(setVar_char) = val
+   END FUNCTION xios(setVar_char)
+
+END MODULE IDATA
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/fortran/idate.F90
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/fortran/idate.F90	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/fortran/idate.F90	(revision 1749)
@@ -0,0 +1,221 @@
+#include "xios_fortran_prefix.hpp"
+MODULE IDATE
+   USE, INTRINSIC :: ISO_C_BINDING
+   USE DATE_INTERFACE
+
+   INTERFACE OPERATOR(+)
+      MODULE PROCEDURE xios(date_add_duration)
+   END INTERFACE
+
+   INTERFACE OPERATOR(-)
+      MODULE PROCEDURE xios(date_sub_duration)
+      MODULE PROCEDURE xios(date_sub)
+   END INTERFACE
+
+   INTERFACE OPERATOR(==)
+      MODULE PROCEDURE xios(date_eq)
+   END INTERFACE
+
+   INTERFACE OPERATOR(/=)
+      MODULE PROCEDURE xios(date_neq)
+   END INTERFACE
+
+   INTERFACE OPERATOR(<)
+      MODULE PROCEDURE xios(date_lt)
+   END INTERFACE
+
+   INTERFACE OPERATOR(<=)
+      MODULE PROCEDURE xios(date_le)
+   END INTERFACE
+
+   INTERFACE OPERATOR(>)
+      MODULE PROCEDURE xios(date_gt)
+   END INTERFACE
+
+   INTERFACE OPERATOR(>=)
+      MODULE PROCEDURE xios(date_ge)
+   END INTERFACE
+
+   INTERFACE ASSIGNMENT(=)
+      MODULE PROCEDURE xios(date_assign_duration)
+   END INTERFACE
+
+   CONTAINS ! Fonctions disponibles pour les utilisateurs.
+
+   ! Conversion functions
+
+   FUNCTION xios(date_convert_to_seconds)(date) RESULT(res)
+      USE DATE_INTERFACE, only : txios(date)
+      IMPLICIT NONE
+      TYPE(txios(date)), INTENT(IN) :: date
+      INTEGER(kind = C_LONG_LONG) :: res
+
+      res = cxios_date_convert_to_seconds(date)
+   END FUNCTION xios(date_convert_to_seconds)
+
+   SUBROUTINE xios(date_convert_to_string)(date, str)
+      USE DATE_INTERFACE, only : txios(date)
+      IMPLICIT NONE
+      TYPE(txios(date)), INTENT(IN) :: date
+      CHARACTER(len = *), INTENT(OUT) :: str
+
+      CALL cxios_date_convert_to_string(date, str, len(str))
+   END SUBROUTINE xios(date_convert_to_string)
+
+   FUNCTION xios(date_convert_from_string)(str) RESULT(res)
+      USE DATE_INTERFACE, only : txios(date)
+      IMPLICIT NONE
+      CHARACTER(len = *), INTENT(IN) :: str
+      TYPE(txios(date)) :: res
+
+      res = cxios_date_convert_from_string(str, len(str))
+   END FUNCTION xios(date_convert_from_string)
+
+   ! Addition: date + duration = date
+
+   FUNCTION xios(date_add_duration)(date, dur) RESULT(res)
+      USE DATE_INTERFACE, only : txios(date)
+      USE IDURATION, only : txios(duration)
+      IMPLICIT NONE
+      TYPE(txios(date)), INTENT(IN) :: date
+      TYPE(txios(duration)), INTENT(IN) :: dur
+      TYPE(txios(date)) :: res
+
+      res = cxios_date_add_duration(date, dur)
+   END FUNCTION xios(date_add_duration)
+
+   ! Subtraction: date - duration = date
+
+   FUNCTION xios(date_sub_duration)(date, dur) RESULT(res)
+      USE DATE_INTERFACE, only : txios(date)
+      USE IDURATION, only : txios(duration)
+      IMPLICIT NONE
+      TYPE(txios(date)), INTENT(IN) :: date
+      TYPE(txios(duration)), INTENT(IN) :: dur
+      TYPE(txios(date)) :: res
+
+      res = cxios_date_sub_duration(date, dur)
+   END FUNCTION xios(date_sub_duration)
+
+   ! Subtraction: date - date = duration
+
+   FUNCTION xios(date_sub)(date1, date2) RESULT(res)
+      USE DATE_INTERFACE, only : txios(date)
+      USE IDURATION, only : txios(duration)
+      IMPLICIT NONE
+      TYPE(txios(date)), INTENT(IN) :: date1, date2
+      TYPE(txios(duration)) :: res
+
+      res = cxios_date_sub(date1, date2)
+   END FUNCTION xios(date_sub)
+
+   FUNCTION xios(date_eq)(date1, date2) RESULT(res)
+      USE DATE_INTERFACE, only : txios(date)
+      IMPLICIT NONE
+      TYPE(txios(date)), INTENT(IN) :: date1, date2
+      LOGICAL :: res
+
+      res = cxios_date_eq(date1, date2)
+   END FUNCTION xios(date_eq)
+
+   FUNCTION xios(date_neq)(date1, date2) RESULT(res)
+      USE DATE_INTERFACE, only : txios(date)
+      IMPLICIT NONE
+      TYPE(txios(date)), INTENT(IN) :: date1, date2
+      LOGICAL :: res
+
+      res = cxios_date_neq(date1, date2)
+   END FUNCTION xios(date_neq)
+
+   FUNCTION xios(date_lt)(date1, date2) RESULT(res)
+      USE DATE_INTERFACE, only : txios(date)
+      IMPLICIT NONE
+      TYPE(txios(date)), INTENT(IN) :: date1, date2
+      LOGICAL :: res
+
+      res = cxios_date_lt(date1, date2)
+   END FUNCTION xios(date_lt)
+
+   FUNCTION xios(date_le)(date1, date2) RESULT(res)
+      USE DATE_INTERFACE, only : txios(date)
+      IMPLICIT NONE
+      TYPE(txios(date)), INTENT(IN) :: date1, date2
+      LOGICAL :: res
+
+      res = cxios_date_le(date1, date2)
+   END FUNCTION xios(date_le)
+
+   FUNCTION xios(date_gt)(date1, date2) RESULT(res)
+      USE DATE_INTERFACE, only : txios(date)
+      IMPLICIT NONE
+      TYPE(txios(date)), INTENT(IN) :: date1, date2
+      LOGICAL :: res
+
+      res = cxios_date_gt(date1, date2)
+   END FUNCTION xios(date_gt)
+
+   FUNCTION xios(date_ge)(date1, date2) RESULT(res)
+      USE DATE_INTERFACE, only : txios(date)
+      IMPLICIT NONE
+      TYPE(txios(date)), INTENT(IN) :: date1, date2
+      LOGICAL :: res
+
+      res = cxios_date_ge(date1, date2)
+   END FUNCTION xios(date_ge)
+
+   SUBROUTINE xios(date_assign_duration)(date, dur)
+      USE DATE_INTERFACE, only : txios(date)
+      USE IDURATION, only : txios(duration)
+      IMPLICIT NONE
+      TYPE(txios(date)), INTENT(OUT) :: date
+      TYPE(txios(duration)), INTENT(IN) :: dur
+
+      date = txios(date)(0, 1, 1, 0, 0, 0) + dur
+   END SUBROUTINE xios(date_assign_duration)
+
+   FUNCTION xios(date_get_second_of_year)(date) RESULT(res)
+      USE DATE_INTERFACE, only : txios(date)
+      IMPLICIT NONE
+      TYPE(txios(date)), INTENT(IN) :: date
+      INTEGER(kind = C_INT) :: res
+
+      res = cxios_date_get_second_of_year(date)
+   END FUNCTION xios(date_get_second_of_year)
+
+   FUNCTION xios(date_get_day_of_year)(date) RESULT(res)
+      USE DATE_INTERFACE, only : txios(date)
+      IMPLICIT NONE
+      TYPE(txios(date)), INTENT(IN) :: date
+      REAL(kind = C_DOUBLE) :: res
+
+      res = cxios_date_get_day_of_year(date)
+   END FUNCTION xios(date_get_day_of_year)
+
+   FUNCTION xios(date_get_fraction_of_year)(date) RESULT(res)
+      USE DATE_INTERFACE, only : txios(date)
+      IMPLICIT NONE
+      TYPE(txios(date)), INTENT(IN) :: date
+      REAL(kind = C_DOUBLE) :: res
+
+      res = cxios_date_get_fraction_of_year(date)
+   END FUNCTION xios(date_get_fraction_of_year)
+
+   FUNCTION xios(date_get_second_of_day)(date) RESULT(res)
+      USE DATE_INTERFACE, only : txios(date)
+      IMPLICIT NONE
+      TYPE(txios(date)), INTENT(IN) :: date
+      INTEGER(kind = C_INT) :: res
+
+      res = cxios_date_get_second_of_day(date)
+   END FUNCTION xios(date_get_second_of_day)
+
+   FUNCTION xios(date_get_fraction_of_day)(date) RESULT(res)
+      USE DATE_INTERFACE, only : txios(date)
+      IMPLICIT NONE
+      TYPE(txios(date)), INTENT(IN) :: date
+      REAL(kind = C_DOUBLE) :: res
+
+      res = cxios_date_get_fraction_of_day(date)
+   END FUNCTION xios(date_get_fraction_of_day)
+
+END MODULE IDATE
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/fortran/idomain.F90
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/fortran/idomain.F90	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/fortran/idomain.F90	(revision 1749)
@@ -0,0 +1,55 @@
+#include "xios_fortran_prefix.hpp"
+
+MODULE IDOMAIN
+   USE, INTRINSIC :: ISO_C_BINDING
+   USE DOMAIN_INTERFACE
+   USE DOMAINGROUP_INTERFACE
+!   USE IDOMAIN_ATTR
+!   USE IDOMAINGROUP_ATTR
+      
+   TYPE txios(domain)
+      INTEGER(kind = C_INTPTR_T) :: daddr
+   END TYPE txios(domain)
+   
+   TYPE txios(domaingroup)
+      INTEGER(kind = C_INTPTR_T) :: daddr
+   END TYPE txios(domaingroup)
+   
+   
+   CONTAINS ! Fonctions disponibles pour les utilisateurs.
+
+   SUBROUTINE xios(get_domain_handle)(idt,ret)
+      IMPLICIT NONE
+      CHARACTER(len = *) , INTENT(IN) :: idt      
+      TYPE(txios(domain)), INTENT(OUT):: ret
+ 
+      CALL cxios_domain_handle_create(ret%daddr, idt, len(idt))            
+
+   END SUBROUTINE xios(get_domain_handle)
+   
+   SUBROUTINE xios(get_domaingroup_handle)(idt, ret)
+      IMPLICIT NONE
+      CHARACTER(len = *)      , INTENT(IN) :: idt      
+      TYPE(txios(domaingroup)), INTENT(OUT):: ret
+
+      CALL cxios_domaingroup_handle_create(ret%daddr, idt, len(idt))            
+
+   END SUBROUTINE xios(get_domaingroup_handle)
+
+   LOGICAL FUNCTION xios(is_valid_domain)(idt)
+      IMPLICIT NONE
+      CHARACTER(len  = *)    , INTENT(IN) :: idt
+      LOGICAL  (kind = 1)                 :: val
+      CALL cxios_domain_valid_id(val, idt, len(idt));
+      xios(is_valid_domain) = val
+   END FUNCTION  xios(is_valid_domain)
+
+   LOGICAL FUNCTION xios(is_valid_domaingroup)(idt)
+      IMPLICIT NONE
+      CHARACTER(len  = *)    , INTENT(IN) :: idt
+      LOGICAL  (kind = 1)                 :: val
+      CALL cxios_domaingroup_valid_id(val, idt, len(idt));
+      xios(is_valid_domaingroup) = val
+   END FUNCTION  xios(is_valid_domaingroup)
+   
+END MODULE IDOMAIN
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/fortran/iduplicate_scalar_to_axis_interface.F90
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/fortran/iduplicate_scalar_to_axis_interface.F90	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/fortran/iduplicate_scalar_to_axis_interface.F90	(revision 1749)
@@ -0,0 +1,30 @@
+#include "xios_fortran_prefix.hpp"
+
+MODULE IDUPLICATE_SCALAR_TO_AXIS
+   USE, INTRINSIC :: ISO_C_BINDING
+   USE DUPLICATE_SCALAR_TO_AXIS_INTERFACE
+
+   TYPE txios(duplicate_scalar_to_axis)
+      INTEGER(kind = C_INTPTR_T) :: daddr
+   END TYPE txios(duplicate_scalar_to_axis)
+
+   CONTAINS ! Fonctions disponibles pour les utilisateurs.
+
+   SUBROUTINE xios(get_duplicate_scalar_to_axis_handle)(idt,ret)
+      IMPLICIT NONE
+      CHARACTER(len = *), INTENT(IN) :: idt
+      TYPE(txios(duplicate_scalar_to_axis)) , INTENT(OUT):: ret
+      CALL cxios_duplicate_scalar_to_axis_handle_create(ret%daddr, idt, len(idt))
+   END SUBROUTINE xios(get_duplicate_scalar_to_axis_handle)
+
+   LOGICAL FUNCTION xios(is_valid_duplicate_scalar_to_axis)(idt)
+      IMPLICIT NONE
+      CHARACTER(len  = *)    , INTENT(IN) :: idt
+      LOGICAL  (kind = 1)                 :: val
+
+      CALL cxios_duplicate_scalar_to_axis_valid_id(val, idt, len(idt))
+      xios(is_valid_duplicate_scalar_to_axis) = val
+
+   END FUNCTION  xios(is_valid_duplicate_scalar_to_axis)
+
+END MODULE IDUPLICATE_SCALAR_TO_AXIS
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/fortran/iduration.F90
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/fortran/iduration.F90	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/fortran/iduration.F90	(revision 1749)
@@ -0,0 +1,191 @@
+#include "xios_fortran_prefix.hpp"
+
+MODULE IDURATION
+   USE, INTRINSIC :: ISO_C_BINDING
+   USE DURATION_INTERFACE
+
+   TYPE(txios(duration)), PARAMETER :: xios(year) = txios(duration)(1, 0, 0, 0, 0, 0, 0)
+   TYPE(txios(duration)), PARAMETER :: xios(month) = txios(duration)(0, 1, 0, 0, 0, 0, 0)
+   TYPE(txios(duration)), PARAMETER :: xios(day) = txios(duration)(0, 0, 1, 0, 0, 0, 0)
+   TYPE(txios(duration)), PARAMETER :: xios(hour) = txios(duration)(0, 0, 0, 1, 0, 0, 0)
+   TYPE(txios(duration)), PARAMETER :: xios(minute) = txios(duration)(0, 0, 0, 0, 1, 0, 0)
+   TYPE(txios(duration)), PARAMETER :: xios(second) = txios(duration)(0, 0, 0, 0, 0, 1, 0)
+   TYPE(txios(duration)), PARAMETER :: xios(timestep) = txios(duration)(0, 0, 0, 0, 0, 0, 1)
+
+   INTERFACE OPERATOR(+)
+      MODULE PROCEDURE xios(duration_add)
+   END INTERFACE
+
+   INTERFACE OPERATOR(-)
+      MODULE PROCEDURE xios(duration_sub)
+      MODULE PROCEDURE xios(duration_neg)
+   END INTERFACE
+
+   INTERFACE OPERATOR(*)
+      MODULE PROCEDURE xios(real4_duration_mult)
+      MODULE PROCEDURE xios(duration_real4_mult)
+      MODULE PROCEDURE xios(real8_duration_mult)
+      MODULE PROCEDURE xios(duration_real8_mult)
+      MODULE PROCEDURE xios(int_duration_mult)
+      MODULE PROCEDURE xios(duration_int_mult)
+   END INTERFACE
+
+   INTERFACE xios(duration_mult)
+      MODULE PROCEDURE xios(real4_duration_mult)
+      MODULE PROCEDURE xios(duration_real4_mult)
+      MODULE PROCEDURE xios(real8_duration_mult)
+      MODULE PROCEDURE xios(duration_real8_mult)
+      MODULE PROCEDURE xios(int_duration_mult)
+      MODULE PROCEDURE xios(duration_int_mult)
+   END INTERFACE
+
+   INTERFACE OPERATOR(==)
+      MODULE PROCEDURE xios(duration_eq)
+   END INTERFACE
+
+   INTERFACE OPERATOR(/=)
+      MODULE PROCEDURE xios(duration_neq)
+   END INTERFACE
+
+   CONTAINS
+
+   ! Conversion function
+
+   SUBROUTINE xios(duration_convert_to_string)(dur, str)
+      USE DURATION_INTERFACE, only : txios(duration)
+      IMPLICIT NONE
+      TYPE(txios(duration)), INTENT(IN) :: dur
+      CHARACTER(len = *), INTENT(OUT) :: str
+
+      CALL cxios_duration_convert_to_string(dur, str, len(str))
+   END SUBROUTINE xios(duration_convert_to_string)
+
+   FUNCTION xios(duration_convert_from_string)(str) RESULT(res)
+      USE DURATION_INTERFACE, only : txios(duration)
+      IMPLICIT NONE
+      CHARACTER(len = *), INTENT(IN) :: str
+      TYPE(txios(duration)) :: res
+
+      res = cxios_duration_convert_from_string(str, len(str))
+   END FUNCTION xios(duration_convert_from_string)
+
+   ! Addition
+
+   FUNCTION xios(duration_add)(dur1, dur2) RESULT(res)
+      USE DURATION_INTERFACE, only : txios(duration)
+      IMPLICIT NONE
+      TYPE(txios(duration)), INTENT(IN) :: dur1, dur2
+      TYPE(txios(duration)) :: res
+
+      res = cxios_duration_add(dur1, dur2)
+   END FUNCTION xios(duration_add)
+
+   ! Subtraction
+
+   FUNCTION xios(duration_sub)(dur1, dur2) RESULT(res)
+      USE DURATION_INTERFACE, only : txios(duration)
+      IMPLICIT NONE
+      TYPE(txios(duration)), INTENT(IN) :: dur1, dur2
+      TYPE(txios(duration)) :: res
+
+      res = cxios_duration_sub(dur1, dur2)
+   END FUNCTION xios(duration_sub)
+
+   ! Multiplication by a scalar
+   
+   FUNCTION xios(real4_duration_mult)(val, dur) RESULT(res)
+      USE ISO_C_BINDING
+      USE DURATION_INTERFACE, only : txios(duration)
+      IMPLICIT NONE
+      REAL(kind = C_FLOAT), INTENT(IN) :: val
+      TYPE(txios(duration)), INTENT(IN) :: dur
+      TYPE(txios(duration)) :: res
+
+      res = cxios_duration_mult(REAL(val, C_DOUBLE), dur)
+   END FUNCTION xios(real4_duration_mult)
+   
+   FUNCTION xios(duration_real4_mult)(dur, val2) RESULT(res)
+      USE ISO_C_BINDING
+      USE DURATION_INTERFACE, only : txios(duration)
+      IMPLICIT NONE
+      TYPE(txios(duration)), INTENT(IN) :: dur
+      REAL(kind = C_FLOAT), INTENT(IN) :: val2
+      TYPE(txios(duration)) :: res
+
+      res = cxios_duration_mult(REAL(val2, C_DOUBLE), dur)
+   END FUNCTION xios(duration_real4_mult)
+   
+   FUNCTION xios(real8_duration_mult)(val, dur) RESULT(res)
+      USE ISO_C_BINDING
+      USE DURATION_INTERFACE, only : txios(duration)
+      IMPLICIT NONE
+      REAL(kind = C_DOUBLE), INTENT(IN) :: val
+      TYPE(txios(duration)), INTENT(IN) :: dur
+      TYPE(txios(duration)) :: res
+
+      res = cxios_duration_mult(val, dur)
+   END FUNCTION xios(real8_duration_mult)
+   
+   FUNCTION xios(duration_real8_mult)(dur, val2) RESULT(res)
+      USE ISO_C_BINDING
+      USE DURATION_INTERFACE, only : txios(duration)
+      IMPLICIT NONE
+      TYPE(txios(duration)), INTENT(IN) :: dur
+      REAL(kind = C_DOUBLE), INTENT(IN) :: val2
+      TYPE(txios(duration)) :: res
+
+      res = cxios_duration_mult(val2, dur)
+   END FUNCTION xios(duration_real8_mult)
+   
+   FUNCTION xios(int_duration_mult)(val, dur) RESULT(res)
+      USE ISO_C_BINDING
+      USE DURATION_INTERFACE, only : txios(duration)
+      IMPLICIT NONE
+      INTEGER, INTENT(IN) :: val
+      TYPE(txios(duration)), INTENT(IN) :: dur
+      TYPE(txios(duration)) :: res
+
+      res = cxios_duration_mult(REAL(val, C_DOUBLE), dur)
+   END FUNCTION xios(int_duration_mult)
+   
+   FUNCTION xios(duration_int_mult)(dur, val2) RESULT(res)
+      USE ISO_C_BINDING
+      USE DURATION_INTERFACE, only : txios(duration)
+      IMPLICIT NONE
+      TYPE(txios(duration)), INTENT(IN) :: dur
+      INTEGER, INTENT(IN) :: val2
+      TYPE(txios(duration)) :: res
+
+      res = cxios_duration_mult(REAL(val2, C_DOUBLE), dur)
+   END FUNCTION xios(duration_int_mult)
+
+   ! Negation
+
+   FUNCTION xios(duration_neg)(dur) RESULT(res)
+      USE DURATION_INTERFACE, only : txios(duration)
+      IMPLICIT NONE
+      TYPE(txios(duration)), INTENT(IN) :: dur
+      TYPE(txios(duration)) :: res
+
+      res = cxios_duration_neg(dur)
+   END FUNCTION xios(duration_neg)
+
+   FUNCTION xios(duration_eq)(dur1, dur2) RESULT(res)
+      USE duration_INTERFACE, only : txios(duration)
+      IMPLICIT NONE
+      TYPE(txios(duration)), INTENT(IN) :: dur1, dur2
+      LOGICAL :: res
+
+      res = cxios_duration_eq(dur1, dur2)
+   END FUNCTION xios(duration_eq)
+
+   FUNCTION xios(duration_neq)(dur1, dur2) RESULT(res)
+      USE duration_INTERFACE, only : txios(duration)
+      IMPLICIT NONE
+      TYPE(txios(duration)), INTENT(IN) :: dur1, dur2
+      LOGICAL :: res
+
+      res = cxios_duration_neq(dur1, dur2)
+   END FUNCTION xios(duration_neq)
+
+END MODULE IDURATION
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/fortran/iexpand_domain.F90
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/fortran/iexpand_domain.F90	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/fortran/iexpand_domain.F90	(revision 1749)
@@ -0,0 +1,30 @@
+#include "xios_fortran_prefix.hpp"
+
+MODULE IEXPAND_DOMAIN
+   USE, INTRINSIC :: ISO_C_BINDING
+   USE EXPAND_DOMAIN_INTERFACE
+
+   TYPE txios(expand_domain)
+      INTEGER(kind = C_INTPTR_T) :: daddr
+   END TYPE txios(expand_domain)
+
+   CONTAINS ! Fonctions disponibles pour les utilisateurs.
+
+   SUBROUTINE xios(get_expand_domain_handle)(idt,ret)
+      IMPLICIT NONE
+      CHARACTER(len = *)         , INTENT(IN) :: idt
+      TYPE(txios(expand_domain)) , INTENT(OUT):: ret
+      CALL cxios_expand_domain_handle_create(ret%daddr, idt, len(idt))
+   END SUBROUTINE xios(get_expand_domain_handle)
+
+   LOGICAL FUNCTION xios(is_valid_expand_domain)(idt)
+      IMPLICIT NONE
+      CHARACTER(len  = *)    , INTENT(IN) :: idt
+      LOGICAL  (kind = 1)                 :: val
+
+      CALL cxios_expand_domain_valid_id(val, idt, len(idt))
+      xios(is_valid_expand_domain) = val
+
+   END FUNCTION  xios(is_valid_expand_domain)
+
+END MODULE IEXPAND_DOMAIN
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/fortran/iextract_axis_to_scalar.F90
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/fortran/iextract_axis_to_scalar.F90	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/fortran/iextract_axis_to_scalar.F90	(revision 1749)
@@ -0,0 +1,30 @@
+#include "xios_fortran_prefix.hpp"
+
+MODULE IEXTRACT_AXIS_TO_SCALAR
+   USE, INTRINSIC :: ISO_C_BINDING
+   USE EXTRACT_AXIS_TO_SCALAR_INTERFACE
+
+   TYPE txios(extract_axis_to_scalar)
+      INTEGER(kind = C_INTPTR_T) :: daddr
+   END TYPE txios(extract_axis_to_scalar)
+
+   CONTAINS ! Fonctions disponibles pour les utilisateurs.
+
+   SUBROUTINE xios(get_extract_axis_to_scalar_handle)(idt,ret)
+      IMPLICIT NONE
+      CHARACTER(len = *), INTENT(IN) :: idt
+      TYPE(txios(extract_axis_to_scalar)) , INTENT(OUT):: ret
+      CALL cxios_extract_axis_to_scalar_handle_create(ret%daddr, idt, len(idt))
+   END SUBROUTINE xios(get_extract_axis_to_scalar_handle)
+
+   LOGICAL FUNCTION xios(is_valid_extract_axis_to_scalar)(idt)
+      IMPLICIT NONE
+      CHARACTER(len  = *)    , INTENT(IN) :: idt
+      LOGICAL  (kind = 1)                 :: val
+
+      CALL cxios_extract_axis_to_scalar_valid_id(val, idt, len(idt))
+      xios(is_valid_extract_axis_to_scalar) = val
+
+   END FUNCTION  xios(is_valid_extract_axis_to_scalar)
+
+END MODULE IEXTRACT_AXIS_TO_SCALAR
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/fortran/iextract_domain_to_axis.F90
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/fortran/iextract_domain_to_axis.F90	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/fortran/iextract_domain_to_axis.F90	(revision 1749)
@@ -0,0 +1,30 @@
+#include "xios_fortran_prefix.hpp"
+
+MODULE IEXTRACT_DOMAIN_TO_AXIS
+   USE, INTRINSIC :: ISO_C_BINDING
+   USE EXTRACT_DOMAIN_TO_AXIS_INTERFACE
+
+   TYPE txios(extract_domain_to_axis)
+      INTEGER(kind = C_INTPTR_T) :: daddr
+   END TYPE txios(extract_domain_to_axis)
+
+   CONTAINS ! Fonctions disponibles pour les utilisateurs.
+
+   SUBROUTINE xios(get_extract_domain_to_axis_handle)(idt,ret)
+      IMPLICIT NONE
+      CHARACTER(len = *), INTENT(IN) :: idt
+      TYPE(txios(extract_domain_to_axis)) , INTENT(OUT):: ret
+      CALL cxios_extract_domain_to_axis_handle_create(ret%daddr, idt, len(idt))
+   END SUBROUTINE xios(get_extract_domain_to_axis_handle)
+
+   LOGICAL FUNCTION xios(is_valid_extract_domain_to_axis)(idt)
+      IMPLICIT NONE
+      CHARACTER(len  = *)    , INTENT(IN) :: idt
+      LOGICAL  (kind = 1)                 :: val
+
+      CALL cxios_extract_domain_to_axis_valid_id(val, idt, len(idt))
+      xios(is_valid_extract_domain_to_axis) = val
+
+   END FUNCTION  xios(is_valid_extract_domain_to_axis)
+
+END MODULE IEXTRACT_DOMAIN_TO_AXIS
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/fortran/ifield.F90
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/fortran/ifield.F90	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/fortran/ifield.F90	(revision 1749)
@@ -0,0 +1,173 @@
+#include "xios_fortran_prefix.hpp"
+
+MODULE IFIELD
+   USE, INTRINSIC :: ISO_C_BINDING
+   USE FIELD_INTERFACE
+   USE FIELDGROUP_INTERFACE
+!   USE IFIELD_ATTR
+!   USE IFIELDGROUP_ATTR
+   USE IDURATION
+   USE IDOMAIN
+   USE IAXIS
+   USE ISCALAR
+   
+   TYPE txios(field)
+      INTEGER(kind = C_INTPTR_T) :: daddr
+   END TYPE txios(field)
+   
+   TYPE txios(fieldgroup)
+      INTEGER(kind = C_INTPTR_T) :: daddr
+   END TYPE txios(fieldgroup)
+
+   CONTAINS ! Fonctions disponibles pour les utilisateurs.
+
+   SUBROUTINE xios(get_field_handle)(idt, ret)
+      IMPLICIT NONE
+      CHARACTER(len = *), INTENT(IN)   :: idt      
+      TYPE(txios(field)), INTENT(OUT) :: ret
+      CALL cxios_field_handle_create(ret%daddr, idt, len(idt))            
+   END SUBROUTINE xios(get_field_handle)
+   
+   SUBROUTINE xios(get_fieldgroup_handle)(idt,ret)
+      IMPLICIT NONE
+      CHARACTER(len = *)     , INTENT(IN) :: idt      
+      TYPE(txios(fieldgroup)), INTENT(OUT):: ret
+
+      CALL cxios_fieldgroup_handle_create(ret%daddr, idt, len(idt))            
+
+   END SUBROUTINE xios(get_fieldgroup_handle)
+   
+   SUBROUTINE xios(field_id_get_domain_handle)(field_id, ret, idx)
+      IMPLICIT NONE
+      CHARACTER(len  = *)     , INTENT(IN)  :: field_id
+      INTEGER, OPTIONAL       , INTENT(IN)  :: idx
+      TYPE(txios(domain)), INTENT(OUT) :: ret
+      TYPE(txios(field))      :: field_hdl
+      INTEGER                 :: index
+      index = 0
+      IF (PRESENT(idx)) THEN
+        index = idx
+      ENDIF
+
+      CALL xios(get_field_handle)(field_id,field_hdl)
+      CALL xios(field_get_domain_handle(field_hdl, ret, index))
+   END SUBROUTINE xios(field_id_get_domain_handle)
+
+   SUBROUTINE xios(field_get_domain_handle)(field_hdl, ret, idx)
+      IMPLICIT NONE
+      TYPE(txios(field))      , INTENT(IN)  :: field_hdl
+      INTEGER, OPTIONAL       , INTENT(IN)  :: idx
+      TYPE(txios(domain)), INTENT(OUT) :: ret
+      INTEGER :: index
+      index = 0
+      IF (PRESENT(idx)) THEN
+        index = idx
+      ENDIF
+      CALL cxios_field_get_domain_handle(ret%daddr, field_hdl%daddr, index)
+   END SUBROUTINE xios(field_get_domain_handle)
+
+   SUBROUTINE xios(field_id_get_axis_handle)(field_id, ret, idx)
+      IMPLICIT NONE
+      CHARACTER(len  = *)   , INTENT(IN)  :: field_id
+      INTEGER, OPTIONAL     , INTENT(IN)  :: idx
+      TYPE(txios(axis)), INTENT(OUT) :: ret
+      TYPE(txios(field))     :: field_hdl
+      INTEGER                :: index
+      index = 0
+      IF (PRESENT(idx)) THEN
+        index = idx
+      ENDIF
+      CALL xios(get_field_handle)(field_id,field_hdl)
+      CALL xios(field_get_axis_handle(field_hdl, ret, index))
+   END SUBROUTINE xios(field_id_get_axis_handle)
+
+   SUBROUTINE xios(field_get_axis_handle)(field_hdl, ret, idx)
+      IMPLICIT NONE
+      TYPE(txios(field))    , INTENT(IN)  :: field_hdl
+      INTEGER, OPTIONAL     , INTENT(IN)  :: idx
+      TYPE(txios(axis)), INTENT(OUT) :: ret
+      INTEGER :: index
+      index = 0
+      IF (PRESENT(idx)) THEN
+        index = idx
+      ENDIF
+      CALL cxios_field_get_axis_handle(ret%daddr, field_hdl%daddr, index)
+   END SUBROUTINE xios(field_get_axis_handle)
+
+   SUBROUTINE xios(field_id_get_scalar_handle)(field_id, ret, idx)
+      IMPLICIT NONE
+      CHARACTER(len  = *)     , INTENT(IN)  :: field_id
+      INTEGER, OPTIONAL       , INTENT(IN)  :: idx
+      TYPE(txios(scalar)), INTENT(OUT) :: ret
+      TYPE(txios(field))     :: field_hdl
+      INTEGER                :: index
+      index = 0
+      IF (PRESENT(idx)) THEN
+        index = idx
+      ENDIF
+      CALL xios(get_field_handle)(field_id,field_hdl)
+      CALL xios(field_get_scalar_handle(field_hdl, ret, index))
+   END SUBROUTINE xios(field_id_get_scalar_handle)
+
+   SUBROUTINE xios(field_get_scalar_handle)(field_hdl, ret, idx)
+      IMPLICIT NONE
+      TYPE(txios(field))      , INTENT(IN)  :: field_hdl
+      INTEGER, OPTIONAL       , INTENT(IN)  :: idx
+      TYPE(txios(scalar)), INTENT(OUT) :: ret
+      INTEGER :: index
+      index = 0
+      IF (PRESENT(idx)) THEN
+        index = idx
+      ENDIF
+      CALL cxios_field_get_axis_handle(ret%daddr, field_hdl%daddr, index)
+   END SUBROUTINE xios(field_get_scalar_handle)
+
+   LOGICAL FUNCTION xios(is_valid_field)(idt)
+      IMPLICIT NONE
+      CHARACTER(len  = *)    , INTENT(IN) :: idt
+      LOGICAL  (kind = 1)                 :: val
+      
+      CALL cxios_field_valid_id(val, idt, len(idt));
+      xios(is_valid_field) = val
+
+   END FUNCTION  xios(is_valid_field)
+
+   LOGICAL FUNCTION xios(is_valid_fieldgroup)(idt)
+      IMPLICIT NONE
+      CHARACTER(len  = *)    , INTENT(IN) :: idt
+      LOGICAL  (kind = 1)                 :: val
+      CALL cxios_fieldgroup_valid_id(val, idt, len(idt));
+      xios(is_valid_fieldgroup) = val
+
+   END FUNCTION  xios(is_valid_fieldgroup)
+   
+  LOGICAL FUNCTION xios(field_is_active_id)(field_id, at_current_timestep_arg)
+      IMPLICIT NONE
+      CHARACTER(len  = *) , INTENT(IN) :: field_id
+      LOGICAL, OPTIONAL   , INTENT(IN) :: at_current_timestep_arg
+      TYPE(txios(field))               :: field_hdl
+
+      CALL xios(get_field_handle)(field_id,field_hdl)
+      xios(field_is_active_id) = xios(field_is_active_hdl)(field_hdl, at_current_timestep_arg)
+
+   END FUNCTION xios(field_is_active_id)
+
+   LOGICAL FUNCTION xios(field_is_active_hdl)(field_hdl, at_current_timestep_arg)
+      IMPLICIT NONE
+      TYPE(txios(field)) , INTENT(IN) :: field_hdl
+      LOGICAL, OPTIONAL  , INTENT(IN) :: at_current_timestep_arg
+      LOGICAL(kind = C_BOOL)          :: at_current_timestep
+      LOGICAL(kind = C_BOOL)          :: ret
+
+      IF (PRESENT(at_current_timestep_arg)) THEN
+         at_current_timestep = at_current_timestep_arg
+      ELSE
+         at_current_timestep = .FALSE.
+      ENDIF
+
+      CALL cxios_field_is_active(field_hdl%daddr, at_current_timestep, ret);
+      xios(field_is_active_hdl) = ret
+      
+   END FUNCTION xios(field_is_active_hdl)
+ 
+END MODULE IFIELD
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/fortran/ifile.F90
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/fortran/ifile.F90	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/fortran/ifile.F90	(revision 1749)
@@ -0,0 +1,60 @@
+#include "xios_fortran_prefix.hpp"
+
+MODULE IFILE
+   USE, INTRINSIC :: ISO_C_BINDING
+   USE FILE_INTERFACE
+   USE FILEGROUP_INTERFACE
+!   USE IFILE_ATTR
+!   USE IFILEGROUP_ATTR
+   USE IDURATION
+   
+   TYPE txios(file)
+      INTEGER(kind = C_INTPTR_T) :: daddr
+   END TYPE txios(file)
+   
+   TYPE txios(filegroup)
+      INTEGER(kind = C_INTPTR_T) :: daddr
+   END TYPE txios(filegroup)
+   
+   CONTAINS ! Fonctions disponibles pour les utilisateurs.
+
+   SUBROUTINE xios(get_file_handle)( idt, ret)
+      IMPLICIT NONE
+      CHARACTER(len = *),   INTENT(IN) :: idt      
+      TYPE(txios(file)) , INTENT(OUT):: ret
+
+      CALL cxios_file_handle_create(ret%daddr, idt, len(idt))            
+
+   END SUBROUTINE xios(get_file_handle)
+   
+   SUBROUTINE xios(get_filegroup_handle)(idt,ret)
+      IMPLICIT NONE
+      CHARACTER(len = *)    ,   INTENT(IN) :: idt      
+      TYPE(txios(filegroup)), INTENT(OUT):: ret
+
+      CALL cxios_filegroup_handle_create(ret%daddr, idt, len(idt))            
+
+   END SUBROUTINE xios(get_filegroup_handle)
+
+   LOGICAL FUNCTION xios(is_valid_file)(idt)
+      IMPLICIT NONE
+      CHARACTER(len  = *)    , INTENT(IN) :: idt
+      LOGICAL  (kind = 1)                 :: val
+
+      CALL cxios_file_valid_id(val, idt, len(idt));
+      xios(is_valid_file) = val
+
+   END FUNCTION  xios(is_valid_file)
+
+   LOGICAL FUNCTION xios(is_valid_filegroup)(idt)
+      IMPLICIT NONE
+      CHARACTER(len  = *)    , INTENT(IN) :: idt
+      LOGICAL  (kind = 1)                 :: val
+
+      CALL cxios_filegroup_valid_id(val, idt, len(idt));
+      xios(is_valid_filegroup) = val
+
+   END FUNCTION  xios(is_valid_filegroup)
+
+   
+END MODULE IFILE
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/fortran/igenerate_rectilinear_domain.F90
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/fortran/igenerate_rectilinear_domain.F90	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/fortran/igenerate_rectilinear_domain.F90	(revision 1749)
@@ -0,0 +1,30 @@
+#include "xios_fortran_prefix.hpp"
+
+MODULE IGENERATE_RECTILINEAR_DOMAIN
+   USE, INTRINSIC :: ISO_C_BINDING
+   USE GENERATE_RECTILINEAR_DOMAIN_INTERFACE
+
+   TYPE txios(generate_rectilinear_domain)
+      INTEGER(kind = C_INTPTR_T) :: daddr
+   END TYPE txios(generate_rectilinear_domain)
+
+   CONTAINS ! Fonctions disponibles pour les utilisateurs.
+
+   SUBROUTINE xios(get_generate_rectilinear_domain_handle)(idt,ret)
+      IMPLICIT NONE
+      CHARACTER(len = *), INTENT(IN) :: idt
+      TYPE(txios(generate_rectilinear_domain)) , INTENT(OUT):: ret
+      CALL cxios_generate_rectilinear_domain_handle_create(ret%daddr, idt, len(idt))
+   END SUBROUTINE xios(get_generate_rectilinear_domain_handle)
+
+   LOGICAL FUNCTION xios(is_valid_generate_rectilinear_domain)(idt)
+      IMPLICIT NONE
+      CHARACTER(len  = *)    , INTENT(IN) :: idt
+      LOGICAL  (kind = 1)                 :: val
+
+      CALL cxios_generate_rectilinear_domain_valid_id(val, idt, len(idt))
+      xios(is_valid_generate_rectilinear_domain) = val
+
+   END FUNCTION  xios(is_valid_generate_rectilinear_domain)
+
+END MODULE IGENERATE_RECTILINEAR_DOMAIN
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/fortran/igrid.F90
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/fortran/igrid.F90	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/fortran/igrid.F90	(revision 1749)
@@ -0,0 +1,60 @@
+#include "xios_fortran_prefix.hpp"
+
+MODULE IGRID
+   USE, INTRINSIC :: ISO_C_BINDING
+   USE GRID_INTERFACE
+   USE GRIDGROUP_INTERFACE
+!   USE IGRID_ATTR
+!   USE IGRIDGROUP_ATTR
+   
+   TYPE txios(grid)
+      INTEGER(kind = C_INTPTR_T) :: daddr
+   END TYPE txios(grid)
+   
+   TYPE txios(gridgroup)
+      INTEGER(kind = C_INTPTR_T) :: daddr
+   END TYPE txios(gridgroup)
+   
+   
+   CONTAINS ! Fonctions disponibles pour les utilisateurs.
+
+   SUBROUTINE xios(get_grid_handle)(idt,ret)
+      IMPLICIT NONE
+      CHARACTER(len = *), INTENT(IN) :: idt      
+      TYPE(txios(grid)), INTENT(OUT):: ret
+
+      CALL cxios_grid_handle_create(ret%daddr, idt, len(idt))            
+
+   END SUBROUTINE xios(get_grid_handle)
+   
+   SUBROUTINE xios(get_gridgroup_handle)(idt,ret)
+      IMPLICIT NONE
+      CHARACTER(len = *)     , INTENT(IN) :: idt      
+      TYPE(txios(gridgroup))     , INTENT(OUT):: ret
+
+      CALL cxios_gridgroup_handle_create(ret%daddr, idt, len(idt))            
+
+   END SUBROUTINE xios(get_gridgroup_handle)
+
+   LOGICAL FUNCTION xios(is_valid_grid)(idt)
+      IMPLICIT NONE
+      CHARACTER(len  = *)    , INTENT(IN) :: idt
+      LOGICAL  (kind = 1)                 :: val
+
+      CALL cxios_grid_valid_id(val, idt, len(idt));
+      xios(is_valid_grid) = val
+
+   END FUNCTION  xios(is_valid_grid)
+
+   LOGICAL FUNCTION xios(is_valid_gridgroup)(idt)
+      IMPLICIT NONE
+      CHARACTER(len  = *)    , INTENT(IN) :: idt
+      LOGICAL  (kind = 1)                 :: val
+
+      CALL cxios_gridgroup_valid_id(val, idt, len(idt));
+      xios(is_valid_gridgroup) = val
+
+   END FUNCTION  xios(is_valid_gridgroup)
+
+   
+END MODULE IGRID
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/fortran/iinterpolate_axis.F90
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/fortran/iinterpolate_axis.F90	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/fortran/iinterpolate_axis.F90	(revision 1749)
@@ -0,0 +1,30 @@
+#include "xios_fortran_prefix.hpp"
+
+MODULE IINTERPOLATE_AXIS
+   USE, INTRINSIC :: ISO_C_BINDING
+   USE INTERPOLATE_AXIS_INTERFACE
+
+   TYPE txios(interpolate_axis)
+      INTEGER(kind = C_INTPTR_T) :: daddr
+   END TYPE txios(interpolate_axis)
+
+   CONTAINS ! Fonctions disponibles pour les utilisateurs.
+
+   SUBROUTINE xios(get_interpolate_axis_handle)(idt,ret)
+      IMPLICIT NONE
+      CHARACTER(len = *), INTENT(IN) :: idt
+      TYPE(txios(interpolate_axis)) , INTENT(OUT):: ret
+      CALL cxios_interpolate_axis_handle_create(ret%daddr, idt, len(idt))
+   END SUBROUTINE xios(get_interpolate_axis_handle)
+
+   LOGICAL FUNCTION xios(is_valid_interpolate_axis)(idt)
+      IMPLICIT NONE
+      CHARACTER(len  = *)    , INTENT(IN) :: idt
+      LOGICAL  (kind = 1)                 :: val
+
+      CALL cxios_interpolate_axis_valid_id(val, idt, len(idt))
+      xios(is_valid_interpolate_axis) = val
+
+   END FUNCTION  xios(is_valid_interpolate_axis)
+
+END MODULE IINTERPOLATE_AXIS
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/fortran/iinterpolate_domain.F90
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/fortran/iinterpolate_domain.F90	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/fortran/iinterpolate_domain.F90	(revision 1749)
@@ -0,0 +1,30 @@
+#include "xios_fortran_prefix.hpp"
+
+MODULE IINTERPOLATE_DOMAIN
+   USE, INTRINSIC :: ISO_C_BINDING
+   USE INTERPOLATE_DOMAIN_INTERFACE
+
+   TYPE txios(interpolate_domain)
+      INTEGER(kind = C_INTPTR_T) :: daddr
+   END TYPE txios(interpolate_domain)
+
+   CONTAINS ! Fonctions disponibles pour les utilisateurs.
+
+   SUBROUTINE xios(get_interpolate_domain_handle)(idt,ret)
+      IMPLICIT NONE
+      CHARACTER(len = *), INTENT(IN) :: idt
+      TYPE(txios(interpolate_domain)) , INTENT(OUT):: ret
+      CALL cxios_interpolate_domain_handle_create(ret%daddr, idt, len(idt))
+   END SUBROUTINE xios(get_interpolate_domain_handle)
+
+   LOGICAL FUNCTION xios(is_valid_interpolate_domain)(idt)
+      IMPLICIT NONE
+      CHARACTER(len  = *)    , INTENT(IN) :: idt
+      LOGICAL  (kind = 1)                 :: val
+
+      CALL cxios_interpolate_domain_valid_id(val, idt, len(idt))
+      xios(is_valid_interpolate_domain) = val
+
+   END FUNCTION  xios(is_valid_interpolate_domain)
+
+END MODULE IINTERPOLATE_DOMAIN
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/fortran/iinverse_axis.F90
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/fortran/iinverse_axis.F90	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/fortran/iinverse_axis.F90	(revision 1749)
@@ -0,0 +1,30 @@
+#include "xios_fortran_prefix.hpp"
+
+MODULE IINVERSE_AXIS
+   USE, INTRINSIC :: ISO_C_BINDING
+   USE INVERSE_AXIS_INTERFACE
+
+   TYPE txios(inverse_axis)
+      INTEGER(kind = C_INTPTR_T) :: daddr
+   END TYPE txios(inverse_axis)
+
+   CONTAINS ! Fonctions disponibles pour les utilisateurs.
+
+   SUBROUTINE xios(get_inverse_axis_handle)(idt,ret)
+      IMPLICIT NONE
+      CHARACTER(len = *), INTENT(IN) :: idt
+      TYPE(txios(inverse_axis)) , INTENT(OUT):: ret
+      CALL cxios_inverse_axis_handle_create(ret%daddr, idt, len(idt))
+   END SUBROUTINE xios(get_inverse_axis_handle)
+
+   LOGICAL FUNCTION xios(is_valid_inverse_axis)(idt)
+      IMPLICIT NONE
+      CHARACTER(len  = *)    , INTENT(IN) :: idt
+      LOGICAL  (kind = 1)                 :: val
+
+      CALL cxios_inverse_axis_valid_id(val, idt, len(idt))
+      xios(is_valid_inverse_axis) = val
+
+   END FUNCTION  xios(is_valid_inverse_axis)
+
+END MODULE IINVERSE_AXIS
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/fortran/interpolate_axis_interface.f90
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/fortran/interpolate_axis_interface.f90	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/fortran/interpolate_axis_interface.f90	(revision 1749)
@@ -0,0 +1,22 @@
+MODULE INTERPOLATE_AXIS_INTERFACE
+   USE, INTRINSIC :: ISO_C_BINDING
+
+   INTERFACE ! Ne pas appeler directement/Interface FORTRAN 2003 <-> C99
+
+      SUBROUTINE cxios_interpolate_axis_handle_create(ret, idt, idt_size) BIND(C)
+         USE ISO_C_BINDING
+         INTEGER  (kind = C_INTPTR_T)               :: ret
+         CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: idt
+         INTEGER  (kind = C_INT)     , VALUE        :: idt_size
+      END SUBROUTINE cxios_interpolate_axis_handle_create
+
+      SUBROUTINE cxios_interpolate_axis_valid_id(ret, idt, idt_size) BIND(C)
+         USE ISO_C_BINDING
+         LOGICAL  (kind = C_BOOL)                   :: ret
+         CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: idt
+         INTEGER  (kind = C_INT)     , VALUE        :: idt_size
+      END SUBROUTINE cxios_interpolate_axis_valid_id
+
+   END INTERFACE
+
+END MODULE INTERPOLATE_AXIS_INTERFACE
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/fortran/interpolate_domain_interface.f90
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/fortran/interpolate_domain_interface.f90	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/fortran/interpolate_domain_interface.f90	(revision 1749)
@@ -0,0 +1,22 @@
+MODULE INTERPOLATE_DOMAIN_INTERFACE
+   USE, INTRINSIC :: ISO_C_BINDING
+
+   INTERFACE ! Ne pas appeler directement/Interface FORTRAN 2003 <-> C99
+
+      SUBROUTINE cxios_interpolate_domain_handle_create(ret, idt, idt_size) BIND(C)
+         USE ISO_C_BINDING
+         INTEGER  (kind = C_INTPTR_T)               :: ret
+         CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: idt
+         INTEGER  (kind = C_INT)     , VALUE        :: idt_size
+      END SUBROUTINE cxios_interpolate_domain_handle_create
+
+      SUBROUTINE cxios_interpolate_domain_valid_id(ret, idt, idt_size) BIND(C)
+         USE ISO_C_BINDING
+         LOGICAL  (kind = C_BOOL)                   :: ret
+         CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: idt
+         INTEGER  (kind = C_INT)     , VALUE        :: idt_size
+      END SUBROUTINE cxios_interpolate_domain_valid_id
+
+   END INTERFACE
+
+END MODULE INTERPOLATE_DOMAIN_INTERFACE
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/fortran/inverse_axis_interface.f90
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/fortran/inverse_axis_interface.f90	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/fortran/inverse_axis_interface.f90	(revision 1749)
@@ -0,0 +1,22 @@
+MODULE INVERSE_AXIS_INTERFACE
+   USE, INTRINSIC :: ISO_C_BINDING
+
+   INTERFACE ! Ne pas appeler directement/Interface FORTRAN 2003 <-> C99
+
+      SUBROUTINE cxios_inverse_axis_handle_create(ret, idt, idt_size) BIND(C)
+         USE ISO_C_BINDING
+         INTEGER  (kind = C_INTPTR_T)               :: ret
+         CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: idt
+         INTEGER  (kind = C_INT)     , VALUE        :: idt_size
+      END SUBROUTINE cxios_inverse_axis_handle_create
+
+      SUBROUTINE cxios_inverse_axis_valid_id(ret, idt, idt_size) BIND(C)
+         USE ISO_C_BINDING
+         LOGICAL  (kind = C_BOOL)                   :: ret
+         CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: idt
+         INTEGER  (kind = C_INT)     , VALUE        :: idt_size
+      END SUBROUTINE cxios_inverse_axis_valid_id
+
+   END INTERFACE
+
+END MODULE INVERSE_AXIS_INTERFACE
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/fortran/ireduce_axis_to_axis.F90
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/fortran/ireduce_axis_to_axis.F90	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/fortran/ireduce_axis_to_axis.F90	(revision 1749)
@@ -0,0 +1,30 @@
+#include "xios_fortran_prefix.hpp"
+
+MODULE IREDUCE_AXIS_TO_AXIS
+   USE, INTRINSIC :: ISO_C_BINDING
+   USE REDUCE_AXIS_TO_AXIS_INTERFACE
+
+   TYPE txios(reduce_axis_to_axis)
+      INTEGER(kind = C_INTPTR_T) :: daddr
+   END TYPE txios(reduce_axis_to_axis)
+
+   CONTAINS ! Fonctions disponibles pour les utilisateurs.
+
+   SUBROUTINE xios(get_reduce_axis_to_axis_handle)(idt,ret)
+      IMPLICIT NONE
+      CHARACTER(len = *), INTENT(IN) :: idt
+      TYPE(txios(reduce_axis_to_axis)) , INTENT(OUT):: ret
+      CALL cxios_reduce_axis_to_axis_handle_create(ret%daddr, idt, len(idt))
+   END SUBROUTINE xios(get_reduce_axis_to_axis_handle)
+
+   LOGICAL FUNCTION xios(is_valid_reduce_axis_to_axis)(idt)
+      IMPLICIT NONE
+      CHARACTER(len  = *)    , INTENT(IN) :: idt
+      LOGICAL  (kind = 1)                 :: val
+
+      CALL cxios_reduce_axis_to_axis_valid_id(val, idt, len(idt))
+      xios(is_valid_reduce_axis_to_axis) = val
+
+   END FUNCTION  xios(is_valid_reduce_axis_to_axis)
+
+END MODULE IREDUCE_AXIS_TO_AXIS
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/fortran/ireduce_axis_to_scalar.F90
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/fortran/ireduce_axis_to_scalar.F90	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/fortran/ireduce_axis_to_scalar.F90	(revision 1749)
@@ -0,0 +1,30 @@
+#include "xios_fortran_prefix.hpp"
+
+MODULE IREDUCE_AXIS_TO_SCALAR
+   USE, INTRINSIC :: ISO_C_BINDING
+   USE REDUCE_AXIS_TO_SCALAR_INTERFACE
+
+   TYPE txios(reduce_axis_to_scalar)
+      INTEGER(kind = C_INTPTR_T) :: daddr
+   END TYPE txios(reduce_axis_to_scalar)
+
+   CONTAINS ! Fonctions disponibles pour les utilisateurs.
+
+   SUBROUTINE xios(get_reduce_axis_to_scalar_handle)(idt,ret)
+      IMPLICIT NONE
+      CHARACTER(len = *), INTENT(IN) :: idt
+      TYPE(txios(reduce_axis_to_scalar)) , INTENT(OUT):: ret
+      CALL cxios_reduce_axis_to_scalar_handle_create(ret%daddr, idt, len(idt))
+   END SUBROUTINE xios(get_reduce_axis_to_scalar_handle)
+
+   LOGICAL FUNCTION xios(is_valid_reduce_axis_to_scalar)(idt)
+      IMPLICIT NONE
+      CHARACTER(len  = *)    , INTENT(IN) :: idt
+      LOGICAL  (kind = 1)                 :: val
+
+      CALL cxios_reduce_axis_to_scalar_valid_id(val, idt, len(idt))
+      xios(is_valid_reduce_axis_to_scalar) = val
+
+   END FUNCTION  xios(is_valid_reduce_axis_to_scalar)
+
+END MODULE IREDUCE_AXIS_TO_SCALAR
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/fortran/ireduce_domain_to_axis.F90
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/fortran/ireduce_domain_to_axis.F90	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/fortran/ireduce_domain_to_axis.F90	(revision 1749)
@@ -0,0 +1,30 @@
+#include "xios_fortran_prefix.hpp"
+
+MODULE IREDUCE_DOMAIN_TO_AXIS
+   USE, INTRINSIC :: ISO_C_BINDING
+   USE REDUCE_DOMAIN_TO_AXIS_INTERFACE
+
+   TYPE txios(reduce_domain_to_axis)
+      INTEGER(kind = C_INTPTR_T) :: daddr
+   END TYPE txios(reduce_domain_to_axis)
+
+   CONTAINS ! Fonctions disponibles pour les utilisateurs.
+
+   SUBROUTINE xios(get_reduce_domain_to_axis_handle)(idt,ret)
+      IMPLICIT NONE
+      CHARACTER(len = *), INTENT(IN) :: idt
+      TYPE(txios(reduce_domain_to_axis)) , INTENT(OUT):: ret
+      CALL cxios_reduce_domain_to_axis_handle_create(ret%daddr, idt, len(idt))
+   END SUBROUTINE xios(get_reduce_domain_to_axis_handle)
+
+   LOGICAL FUNCTION xios(is_valid_reduce_domain_to_axis)(idt)
+      IMPLICIT NONE
+      CHARACTER(len  = *)    , INTENT(IN) :: idt
+      LOGICAL  (kind = 1)                 :: val
+
+      CALL cxios_reduce_domain_to_axis_valid_id(val, idt, len(idt))
+      xios(is_valid_reduce_domain_to_axis) = val
+
+   END FUNCTION  xios(is_valid_reduce_domain_to_axis)
+
+END MODULE IREDUCE_DOMAIN_TO_AXIS
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/fortran/ireduce_domain_to_scalar.F90
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/fortran/ireduce_domain_to_scalar.F90	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/fortran/ireduce_domain_to_scalar.F90	(revision 1749)
@@ -0,0 +1,30 @@
+#include "xios_fortran_prefix.hpp"
+
+MODULE IREDUCE_DOMAIN_TO_SCALAR
+   USE, INTRINSIC :: ISO_C_BINDING
+   USE REDUCE_DOMAIN_TO_SCALAR_INTERFACE
+
+   TYPE txios(reduce_domain_to_scalar)
+      INTEGER(kind = C_INTPTR_T) :: daddr
+   END TYPE txios(reduce_domain_to_scalar)
+
+   CONTAINS ! Fonctions disponibles pour les utilisateurs.
+
+   SUBROUTINE xios(get_reduce_domain_to_scalar_handle)(idt,ret)
+      IMPLICIT NONE
+      CHARACTER(len = *), INTENT(IN) :: idt
+      TYPE(txios(reduce_domain_to_scalar)) , INTENT(OUT):: ret
+      CALL cxios_reduce_domain_to_scalar_handle_create(ret%daddr, idt, len(idt))
+   END SUBROUTINE xios(get_reduce_domain_to_scalar_handle)
+
+   LOGICAL FUNCTION xios(is_valid_reduce_domain_to_scalar)(idt)
+      IMPLICIT NONE
+      CHARACTER(len  = *)    , INTENT(IN) :: idt
+      LOGICAL  (kind = 1)                 :: val
+
+      CALL cxios_reduce_domain_to_scalar_valid_id(val, idt, len(idt))
+      xios(is_valid_reduce_domain_to_scalar) = val
+
+   END FUNCTION  xios(is_valid_reduce_domain_to_scalar)
+
+END MODULE IREDUCE_DOMAIN_TO_SCALAR
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/fortran/ireduce_scalar_to_scalar.F90
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/fortran/ireduce_scalar_to_scalar.F90	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/fortran/ireduce_scalar_to_scalar.F90	(revision 1749)
@@ -0,0 +1,30 @@
+#include "xios_fortran_prefix.hpp"
+
+MODULE IREDUCE_SCALAR_TO_SCALAR
+   USE, INTRINSIC :: ISO_C_BINDING
+   USE REDUCE_SCALAR_TO_SCALAR_INTERFACE
+
+   TYPE txios(reduce_scalar_to_scalar)
+      INTEGER(kind = C_INTPTR_T) :: daddr
+   END TYPE txios(reduce_scalar_to_scalar)
+
+   CONTAINS ! Fonctions disponibles pour les utilisateurs.
+
+   SUBROUTINE xios(get_reduce_scalar_to_scalar_handle)(idt,ret)
+      IMPLICIT NONE
+      CHARACTER(len = *), INTENT(IN) :: idt
+      TYPE(txios(reduce_scalar_to_scalar)) , INTENT(OUT):: ret
+      CALL cxios_reduce_scalar_to_scalar_handle_create(ret%daddr, idt, len(idt))
+   END SUBROUTINE xios(get_reduce_scalar_to_scalar_handle)
+
+   LOGICAL FUNCTION xios(is_valid_reduce_scalar_to_scalar)(idt)
+      IMPLICIT NONE
+      CHARACTER(len  = *)    , INTENT(IN) :: idt
+      LOGICAL  (kind = 1)                 :: val
+
+      CALL cxios_reduce_scalar_to_scalar_valid_id(val, idt, len(idt))
+      xios(is_valid_reduce_scalar_to_scalar) = val
+
+   END FUNCTION  xios(is_valid_reduce_scalar_to_scalar)
+
+END MODULE IREDUCE_SCALAR_TO_SCALAR
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/fortran/ireorder_domain.F90
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/fortran/ireorder_domain.F90	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/fortran/ireorder_domain.F90	(revision 1749)
@@ -0,0 +1,30 @@
+#include "xios_fortran_prefix.hpp"
+
+MODULE IREORDER_DOMAIN
+   USE, INTRINSIC :: ISO_C_BINDING
+   USE REORDER_DOMAIN_INTERFACE
+
+   TYPE txios(reorder_domain)
+      INTEGER(kind = C_INTPTR_T) :: daddr
+   END TYPE txios(reorder_domain)
+
+   CONTAINS ! Fonctions disponibles pour les utilisateurs.
+
+   SUBROUTINE xios(get_reorder_domain_handle)(idt,ret)
+      IMPLICIT NONE
+      CHARACTER(len = *), INTENT(IN) :: idt
+      TYPE(txios(reorder_domain)) , INTENT(OUT):: ret
+      CALL cxios_reorder_domain_handle_create(ret%daddr, idt, len(idt))
+   END SUBROUTINE xios(get_reorder_domain_handle)
+
+   LOGICAL FUNCTION xios(is_valid_reorder_domain)(idt)
+      IMPLICIT NONE
+      CHARACTER(len  = *)    , INTENT(IN) :: idt
+      LOGICAL  (kind = 1)                 :: val
+
+      CALL cxios_reorder_domain_valid_id(val, idt, len(idt))
+      xios(is_valid_reorder_domain) = val
+
+   END FUNCTION  xios(is_valid_reorder_domain)
+
+END MODULE IREORDER_DOMAIN
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/fortran/iscalar.F90
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/fortran/iscalar.F90	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/fortran/iscalar.F90	(revision 1749)
@@ -0,0 +1,56 @@
+#include "xios_fortran_prefix.hpp"
+
+MODULE ISCALAR
+   USE, INTRINSIC :: ISO_C_BINDING
+   USE SCALAR_INTERFACE
+   USE SCALARGROUP_INTERFACE
+
+   TYPE txios(scalar)
+      INTEGER(kind = C_INTPTR_T) :: daddr
+   END TYPE txios(scalar)
+
+   TYPE txios(scalargroup)
+      INTEGER(kind = C_INTPTR_T) :: daddr
+   END TYPE txios(scalargroup)
+
+
+
+   CONTAINS ! Fonctions disponibles pour les utilisateurs.
+
+   SUBROUTINE xios(get_scalar_handle)(idt,ret)
+      IMPLICIT NONE
+      CHARACTER(len = *), INTENT(IN) :: idt
+      TYPE(txios(scalar)) , INTENT(OUT):: ret
+      CALL cxios_scalar_handle_create(ret%daddr, idt, len(idt))
+   END SUBROUTINE xios(get_scalar_handle)
+
+   SUBROUTINE xios(get_scalargroup_handle)(idt,ret)
+      IMPLICIT NONE
+      CHARACTER(len = *)    , INTENT(IN) :: idt
+      TYPE(txios(scalargroup)), INTENT(OUT):: ret
+
+      CALL cxios_scalargroup_handle_create(ret%daddr, idt, len(idt))
+
+   END SUBROUTINE xios(get_scalargroup_handle)
+
+   LOGICAL FUNCTION xios(is_valid_scalar)(idt)
+      IMPLICIT NONE
+      CHARACTER(len  = *)    , INTENT(IN) :: idt
+      LOGICAL  (kind = 1)                 :: val
+
+      CALL cxios_scalar_valid_id(val, idt, len(idt))
+      xios(is_valid_scalar) = val
+
+   END FUNCTION  xios(is_valid_scalar)
+
+   LOGICAL FUNCTION xios(is_valid_scalargroup)(idt)
+      IMPLICIT NONE
+      CHARACTER(len  = *)    , INTENT(IN) :: idt
+      LOGICAL  (kind = 1)                 :: val
+
+      CALL cxios_scalargroup_valid_id(val, idt, len(idt))
+      xios(is_valid_scalargroup) = val
+
+   END FUNCTION  xios(is_valid_scalargroup)
+
+END MODULE ISCALAR
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/fortran/itemporal_splitting.F90
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/fortran/itemporal_splitting.F90	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/fortran/itemporal_splitting.F90	(revision 1749)
@@ -0,0 +1,30 @@
+#include "xios_fortran_prefix.hpp"
+
+MODULE ITEMPORAL_SPLITTING
+   USE, INTRINSIC :: ISO_C_BINDING
+   USE TEMPORAL_SPLITTING_INTERFACE
+
+   TYPE txios(temporal_splitting)
+      INTEGER(kind = C_INTPTR_T) :: daddr
+   END TYPE txios(temporal_splitting)
+
+   CONTAINS ! Fonctions disponibles pour les utilisateurs.
+
+   SUBROUTINE xios(get_temporal_splitting_handle)(idt,ret)
+      IMPLICIT NONE
+      CHARACTER(len = *), INTENT(IN) :: idt
+      TYPE(txios(temporal_splitting)) , INTENT(OUT):: ret
+      CALL cxios_temporal_splitting_handle_create(ret%daddr, idt, len(idt))
+   END SUBROUTINE xios(get_temporal_splitting_handle)
+
+   LOGICAL FUNCTION xios(is_valid_temporal_splitting)(idt)
+      IMPLICIT NONE
+      CHARACTER(len  = *)    , INTENT(IN) :: idt
+      LOGICAL  (kind = 1)                 :: val
+
+      CALL cxios_temporal_splitting_valid_id(val, idt, len(idt))
+      xios(is_valid_temporal_splitting) = val
+
+   END FUNCTION  xios(is_valid_temporal_splitting)
+
+END MODULE ITEMPORAL_SPLITTING
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/fortran/ivariable.F90
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/fortran/ivariable.F90	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/fortran/ivariable.F90	(revision 1749)
@@ -0,0 +1,56 @@
+#include "xios_fortran_prefix.hpp"
+
+MODULE IVARIABLE
+   USE, INTRINSIC :: ISO_C_BINDING
+   USE VARIABLE_INTERFACE
+   USE VARIABLEGROUP_INTERFACE
+   
+   TYPE txios(variable)
+      INTEGER(kind = C_INTPTR_T) :: daddr
+   END TYPE txios(variable)
+   
+   TYPE txios(variablegroup)
+      INTEGER(kind = C_INTPTR_T) :: daddr
+   END TYPE txios(variablegroup)
+   
+
+         
+   CONTAINS ! Fonctions disponibles pour les utilisateurs.
+
+   SUBROUTINE xios(get_variable_handle)(idt,ret)
+      IMPLICIT NONE
+      CHARACTER(len = *), INTENT(IN) :: idt      
+      TYPE(txios(variable)) , INTENT(OUT):: ret
+      CALL cxios_variable_handle_create(ret%daddr, idt, len(idt))            
+   END SUBROUTINE xios(get_variable_handle)
+   
+   SUBROUTINE xios(get_variablegroup_handle)(idt,ret)
+      IMPLICIT NONE
+      CHARACTER(len = *)    , INTENT(IN) :: idt      
+      TYPE(txios(variablegroup)), INTENT(OUT):: ret
+
+      CALL cxios_variablegroup_handle_create(ret%daddr, idt, len(idt))            
+
+   END SUBROUTINE xios(get_variablegroup_handle)
+
+   LOGICAL FUNCTION xios(is_valid_variable)(idt)
+      IMPLICIT NONE
+      CHARACTER(len  = *)    , INTENT(IN) :: idt
+      LOGICAL  (kind = 1)                 :: val
+      
+      CALL cxios_variable_valid_id(val, idt, len(idt))
+      xios(is_valid_variable) = val
+
+   END FUNCTION  xios(is_valid_variable)
+
+   LOGICAL FUNCTION xios(is_valid_variablegroup)(idt)
+      IMPLICIT NONE
+      CHARACTER(len  = *)    , INTENT(IN) :: idt
+      LOGICAL  (kind = 1)                 :: val
+
+      CALL cxios_variablegroup_valid_id(val, idt, len(idt))
+      xios(is_valid_variablegroup) = val
+
+   END FUNCTION  xios(is_valid_variablegroup)
+
+END MODULE IVARIABLE
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/fortran/ixios.F90
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/fortran/ixios.F90	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/fortran/ixios.F90	(revision 1749)
@@ -0,0 +1,155 @@
+#include "xios_fortran_prefix.hpp"
+
+MODULE XIOS
+
+USE icalendar, ONLY : xios(define_calendar), xios(set_timestep), xios(set_start_date), xios(set_time_origin),   &
+                      xios(get_calendar_type), xios(get_timestep), xios(get_start_date), xios(get_time_origin), &
+                      xios(update_calendar), xios(get_current_date),                                            &
+                      xios(get_year_length_in_seconds), xios(get_day_length_in_seconds)
+
+USE icontext, ONLY : txios(context), xios(set_current_context), xios(is_valid_context)
+
+USE icontext_attr, ONLY : xios(set_context_attr), xios(get_context_attr), xios(is_defined_context_attr)
+
+USE idata, ONLY : xios(initialize), xios(init_server), xios(finalize), xios(context_initialize), xios(context_is_initialized), &
+                  xios(close_context_definition), xios(context_finalize), xios(solve_inheritance), xios(oasis_enddef)
+
+USE idomain, ONLY : txios(domain), txios(domaingroup), xios(is_valid_domain), xios(is_valid_domaingroup)
+
+USE idomain_attr, ONLY : xios(set_domain_attr), xios(get_domain_attr), xios(is_defined_domain_attr)
+
+USE idomaingroup_attr, ONLY : xios(set_domaingroup_attr), xios(get_domaingroup_attr), xios(is_defined_domaingroup_attr)
+
+USE iduration, ONLY: txios(duration),                                                                            &
+                     xios(year), xios(month), xios(day), xios(hour), xios(minute), xios(second), xios(timestep), &
+                     xios(duration_convert_to_string), xios(duration_convert_from_string),                       &
+                     xios(duration_add), xios(duration_sub), xios(duration_mult), xios(duration_neg),            &
+                     xios(duration_eq), xios(duration_neq),                                                      &
+                     OPERATOR(+), OPERATOR(-), OPERATOR(*)
+
+USE idate, ONLY : txios(date),                                                                                 &
+                  xios(date_convert_to_seconds), xios(date_convert_to_string), xios(date_convert_from_string), &
+                  xios(date_add_duration), xios(date_sub_duration), xios(date_sub),                            &
+                  xios(date_eq), xios(date_neq), xios(date_lt), xios(date_le), xios(date_gt), xios(date_ge),   &
+                  xios(date_get_second_of_year), xios(date_get_day_of_year), xios(date_get_fraction_of_year),  &
+                  xios(date_get_second_of_day), xios(date_get_fraction_of_day),                                &
+                  OPERATOR(+), OPERATOR(-),                                                                    &
+                  OPERATOR(==), OPERATOR(/=), OPERATOR(<), OPERATOR(<=), OPERATOR(>), OPERATOR(>=),            &
+                  ASSIGNMENT(=)
+
+USE ifield, ONLY : txios(field), txios(fieldgroup), xios(is_valid_field), xios(is_valid_fieldgroup)
+
+USE ifield_attr, ONLY : xios(set_field_attr), xios(get_field_attr), xios(is_defined_field_attr)
+
+USE ifieldgroup_attr, ONLY : xios(set_fieldgroup_attr), xios(get_fieldgroup_attr), xios(is_defined_fieldgroup_attr)
+
+USE ivariable, ONLY : txios(variable), txios(variablegroup), xios(is_valid_variable), xios(is_valid_variablegroup)
+
+USE ivariable_attr, ONLY : xios(set_variable_attr), xios(get_variable_attr), xios(is_defined_variable_attr)
+
+USE ivariablegroup_attr, ONLY : xios(set_variablegroup_attr), xios(get_variablegroup_attr), xios(is_defined_variablegroup_attr)
+
+USE ifile, ONLY : txios(file), txios(filegroup), xios(is_valid_file), xios(is_valid_filegroup)
+
+USE ifile_attr, ONLY : xios(set_file_attr), xios(get_file_attr), xios(is_defined_file_attr)
+
+USE ifilegroup_attr, ONLY : xios(set_filegroup_attr), xios(get_filegroup_attr), xios(is_defined_filegroup_attr)
+
+USE igrid, ONLY : txios(grid), txios(gridgroup), xios(is_valid_grid), xios(is_valid_gridgroup)
+
+USE igrid_attr, ONLY : xios(set_grid_attr), xios(get_grid_attr), xios(is_defined_grid_attr)
+
+USE igridgroup_attr, ONLY : xios(set_gridgroup_attr), xios(get_gridgroup_attr), xios(is_defined_gridgroup_attr)
+
+USE iaxis, ONLY : txios(axis), txios(axisgroup), xios(is_valid_axis), xios(is_valid_axisgroup)
+
+USE iaxis_attr, ONLY : xios(set_axis_attr), xios(get_axis_attr), xios(is_defined_axis_attr)
+
+USE iaxisgroup_attr, ONLY : xios(set_axisgroup_attr), xios(get_axisgroup_attr), xios(is_defined_axisgroup_attr)
+
+USE iscalar, ONLY : txios(scalar), txios(scalargroup), xios(is_valid_scalar), xios(is_valid_scalargroup)
+
+USE iscalar_attr, ONLY : xios(set_scalar_attr), xios(get_scalar_attr), xios(is_defined_scalar_attr)
+
+USE iscalargroup_attr, ONLY : xios(set_scalargroup_attr), xios(get_scalargroup_attr), xios(is_defined_scalargroup_attr)
+
+!-------------------------------------------------------------------------------
+!!! Transformation INTERFACES
+!-------------------------------------------------------------------------------
+!!! DOMAIN TRANSFORMATIONS
+USE izoom_domain, ONLY : txios(zoom_domain), xios(is_valid_zoom_domain)
+
+USE izoom_domain_attr, ONLY : xios(set_zoom_domain_attr), xios(get_zoom_domain_attr), xios(is_defined_zoom_domain_attr)
+
+USE iinterpolate_domain, ONLY : txios(interpolate_domain), xios(is_valid_interpolate_domain)
+
+USE iinterpolate_domain_attr, ONLY : xios(set_interpolate_domain_attr), xios(get_interpolate_domain_attr), &
+                                     xios(is_defined_interpolate_domain_attr)
+
+USE igenerate_rectilinear_domain, ONLY : txios(generate_rectilinear_domain), xios(is_valid_generate_rectilinear_domain)
+
+USE igenerate_rectilinear_domain_attr, ONLY : xios(set_generate_rectilinear_domain_attr), &
+                                              xios(get_generate_rectilinear_domain_attr), &
+                                              xios(is_defined_generate_rectilinear_domain_attr)
+
+USE icompute_connectivity_domain, ONLY : txios(compute_connectivity_domain), xios(is_valid_compute_connectivity_domain)
+
+USE icompute_connectivity_domain_attr, ONLY : xios(set_compute_connectivity_domain_attr), &
+                                              xios(get_compute_connectivity_domain_attr), &
+                                              xios(is_defined_compute_connectivity_domain_attr)
+
+USE iexpand_domain, ONLY : txios(expand_domain), xios(is_valid_expand_domain)
+
+USE iexpand_domain_attr, ONLY : xios(set_expand_domain_attr), &
+                                xios(get_expand_domain_attr), &
+                                xios(is_defined_expand_domain_attr)
+
+!!! AXIS TRANSFORMATIONS
+USE izoom_axis, ONLY : txios(zoom_axis), xios(is_valid_zoom_axis)
+
+USE izoom_axis_attr, ONLY : xios(set_zoom_axis_attr), xios(get_zoom_axis_attr), xios(is_defined_zoom_axis_attr)
+
+
+USE iinterpolate_axis, ONLY : txios(interpolate_axis), xios(is_valid_interpolate_axis)
+
+USE iinterpolate_axis_attr, ONLY : xios(set_interpolate_axis_attr), xios(get_interpolate_axis_attr), &
+                                   xios(is_defined_interpolate_axis_attr)
+
+USE iinverse_axis, ONLY : txios(inverse_axis), xios(is_valid_inverse_axis)
+
+USE iinverse_axis_attr, ONLY : xios(set_inverse_axis_attr), xios(get_inverse_axis_attr), xios(is_defined_inverse_axis_attr)
+
+USE ireduce_domain_to_axis, ONLY : txios(reduce_domain_to_axis), xios(is_valid_reduce_domain_to_axis)
+
+USE ireduce_domain_to_axis_attr, ONLY : xios(set_reduce_domain_to_axis_attr), &
+                                        xios(get_reduce_domain_to_axis_attr), &
+                                        xios(is_defined_reduce_domain_to_axis_attr)
+
+USE iextract_domain_to_axis, ONLY : txios(extract_domain_to_axis), xios(is_valid_extract_domain_to_axis)
+
+USE iextract_domain_to_axis_attr, ONLY : xios(set_extract_domain_to_axis_attr), &
+                                         xios(get_extract_domain_to_axis_attr), &
+                                         xios(is_defined_extract_domain_to_axis_attr)
+
+!!! SCALAR TRANSFORMATIONS
+USE ireduce_domain_to_scalar, ONLY : txios(reduce_domain_to_scalar), xios(is_valid_reduce_domain_to_scalar)
+
+USE ireduce_domain_to_scalar_attr, ONLY : xios(set_reduce_domain_to_scalar_attr), xios(get_reduce_domain_to_scalar_attr), &
+                                          xios(is_defined_reduce_domain_to_scalar_attr)
+
+USE ireduce_axis_to_scalar, ONLY : txios(reduce_axis_to_scalar), xios(is_valid_reduce_axis_to_scalar)
+
+USE ireduce_axis_to_scalar_attr, ONLY : xios(set_reduce_axis_to_scalar_attr), xios(get_reduce_axis_to_scalar_attr), &
+                                        xios(is_defined_reduce_axis_to_scalar_attr)
+
+USE iextract_axis_to_scalar, ONLY : txios(extract_axis_to_scalar), xios(is_valid_extract_axis_to_scalar)
+
+USE iextract_axis_to_scalar_attr, ONLY : xios(set_extract_axis_to_scalar_attr), &
+                                         xios(get_extract_axis_to_scalar_attr), &
+                                         xios(is_defined_extract_axis_to_scalar_attr)
+
+USE XIOS_INTERFACES, ONLY : xios(set_attr), xios(get_attr), xios(is_defined_attr), xios(get_handle), xios(add_child), &
+                            xios(send_field), xios(recv_field), xios(field_is_active), xios(getVar), xios(setVar), &
+                            xios(field_get_domain),xios(field_get_axis),xios(field_get_scalar)
+
+END MODULE XIOS
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/fortran/ixios_interfaces.F90
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/fortran/ixios_interfaces.F90	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/fortran/ixios_interfaces.F90	(revision 1749)
@@ -0,0 +1,279 @@
+#include "xios_fortran_prefix.hpp"
+
+MODULE XIOS_INTERFACES
+
+USE icontext, ONLY : xios(get_context_handle)
+
+USE icontext_attr, ONLY : xios(set_context_attr_hdl), xios(get_context_attr_hdl), xios(is_defined_context_attr_hdl)
+
+USE idata, ONLY : xios(send_field_r8_0d), xios(send_field_r8_1d), xios(send_field_r8_2d), xios(send_field_r8_3d), &
+                  xios(send_field_r8_4d), xios(send_field_r8_5d), xios(send_field_r8_6d), xios(send_field_r8_7d), &
+                  xios(send_field_r4_0d), xios(send_field_r4_1d), xios(send_field_r4_2d), xios(send_field_r4_3d), &
+                  xios(send_field_r4_4d), xios(send_field_r4_5d), xios(send_field_r4_6d), xios(send_field_r4_7d), &
+                  xios(recv_field_r8_0d), xios(recv_field_r8_1d), xios(recv_field_r8_2d), xios(recv_field_r8_3d), &
+                  xios(recv_field_r8_4d), xios(recv_field_r8_5d), xios(recv_field_r8_6d), xios(recv_field_r8_7d), &
+                  xios(recv_field_r4_0d), xios(recv_field_r4_1d), xios(recv_field_r4_2d), xios(recv_field_r4_3d), &
+                  xios(recv_field_r4_4d), xios(recv_field_r4_5d), xios(recv_field_r4_6d), xios(recv_field_r4_7d), &
+                  xios(getVar_k8), xios(getVar_k4), xios(getVar_int), xios(getVar_logic), xios(getVar_char),      &
+                  xios(setVar_k8), xios(setVar_k4), xios(setVar_int), xios(setVar_logic), xios(setVar_char)
+
+USE idomain, ONLY : xios(get_domain_handle), xios(get_domaingroup_handle)
+
+USE idomain_attr, ONLY : xios(set_domain_attr_hdl), xios(get_domain_attr_hdl), xios(is_defined_domain_attr_hdl)
+
+USE idomaingroup_attr, ONLY : xios(set_domaingroup_attr_hdl), xios(get_domaingroup_attr_hdl), xios(is_defined_domaingroup_attr_hdl)
+
+USE ifield, ONLY : xios(get_field_handle), xios(get_fieldgroup_handle), xios(field_is_active_id), xios(field_is_active_hdl), &
+                   xios(field_get_domain_handle), xios(field_get_axis_handle), xios(field_get_scalar_handle), &
+                   xios(field_id_get_domain_handle), xios(field_id_get_axis_handle), xios(field_id_get_scalar_handle)
+
+USE ifield_attr, ONLY : xios(set_field_attr_hdl), xios(get_field_attr_hdl), xios(is_defined_field_attr_hdl)
+
+USE ifieldgroup_attr, ONLY : xios(set_fieldgroup_attr_hdl), xios(get_fieldgroup_attr_hdl), xios(is_defined_fieldgroup_attr_hdl)
+
+USE ivariable, ONLY : xios(get_variable_handle), xios(get_variablegroup_handle)
+
+USE ivariable_attr, ONLY : xios(set_variable_attr_hdl), xios(get_variable_attr_hdl), xios(is_defined_variable_attr_hdl)
+
+USE ivariablegroup_attr, ONLY : xios(set_variablegroup_attr_hdl), xios(get_variablegroup_attr_hdl), &
+                                xios(is_defined_variablegroup_attr_hdl)
+
+USE ifile, ONLY : xios(get_file_handle), xios(get_filegroup_handle)
+
+USE ifile_attr, ONLY : xios(set_file_attr_hdl), xios(get_file_attr_hdl), xios(is_defined_file_attr_hdl)
+
+USE ifilegroup_attr, ONLY : xios(set_filegroup_attr_hdl), xios(get_filegroup_attr_hdl), xios(is_defined_filegroup_attr_hdl)
+
+USE igrid, ONLY : xios(get_grid_handle), xios(get_gridgroup_handle)
+
+USE igrid_attr, ONLY : xios(set_grid_attr_hdl), xios(get_grid_attr_hdl), xios(is_defined_grid_attr_hdl)
+
+USE igridgroup_attr, ONLY : xios(set_gridgroup_attr_hdl), xios(get_gridgroup_attr_hdl), xios(is_defined_gridgroup_attr_hdl)
+
+USE iaxis, ONLY : xios(get_axis_handle), xios(get_axisgroup_handle)
+
+USE iaxis_attr, ONLY : xios(set_axis_attr_hdl), xios(get_axis_attr_hdl), xios(is_defined_axis_attr_hdl)
+
+USE iaxisgroup_attr, ONLY : xios(set_axisgroup_attr_hdl), xios(get_axisgroup_attr_hdl), xios(is_defined_axisgroup_attr_hdl)
+
+USE iscalar, ONLY : xios(get_scalar_handle), xios(get_scalargroup_handle)
+
+USE iscalar_attr, ONLY : xios(set_scalar_attr_hdl), xios(get_scalar_attr_hdl), xios(is_defined_scalar_attr_hdl)
+
+USE iscalargroup_attr, ONLY : xios(set_scalargroup_attr_hdl), xios(get_scalargroup_attr_hdl), xios(is_defined_scalargroup_attr_hdl)
+
+!-------------------------------------------------------------------------------
+!!! Transformation INTERFACES
+!-------------------------------------------------------------------------------
+!!! DOMAIN TRANSFORMATIONS
+USE izoom_domain, ONLY : xios(get_zoom_domain_handle)
+
+USE izoom_domain_attr, ONLY : xios(set_zoom_domain_attr_hdl), xios(get_zoom_domain_attr_hdl), xios(is_defined_zoom_domain_attr_hdl)
+
+USE iinterpolate_domain, ONLY : xios(get_interpolate_domain_handle)
+
+USE iinterpolate_domain_attr, ONLY : xios(set_interpolate_domain_attr_hdl), xios(get_interpolate_domain_attr_hdl), &
+                                     xios(is_defined_interpolate_domain_attr_hdl)
+
+USE igenerate_rectilinear_domain, ONLY : xios(get_generate_rectilinear_domain_handle)
+
+USE igenerate_rectilinear_domain_attr, ONLY : xios(set_generate_rectilinear_domain_attr_hdl), &
+                                              xios(get_generate_rectilinear_domain_attr_hdl), &
+                                              xios(is_defined_generate_rectilinear_domain_attr_hdl)
+
+USE icompute_connectivity_domain, ONLY : xios(get_compute_connectivity_domain_handle)
+
+USE icompute_connectivity_domain_attr, ONLY : xios(set_compute_connectivity_domain_attr_hdl), &
+                                              xios(get_compute_connectivity_domain_attr_hdl), &
+                                              xios(is_defined_compute_connectivity_domain_attr_hdl)
+
+USE iexpand_domain, ONLY : xios(get_expand_domain_handle)
+
+USE iexpand_domain_attr, ONLY : xios(set_expand_domain_attr_hdl), &
+                                xios(get_expand_domain_attr_hdl), &
+                                xios(is_defined_expand_domain_attr_hdl)
+
+!!! AXIS TRANSFORMATIONS
+USE izoom_axis, ONLY : xios(get_zoom_axis_handle)
+
+USE izoom_axis_attr, ONLY : xios(set_zoom_axis_attr_hdl), xios(get_zoom_axis_attr_hdl), xios(is_defined_zoom_axis_attr_hdl)
+
+USE iinterpolate_axis, ONLY : xios(get_interpolate_axis_handle)
+
+USE iinterpolate_axis_attr, ONLY : xios(set_interpolate_axis_attr_hdl), &
+                                   xios(get_interpolate_axis_attr_hdl), &
+                                   xios(is_defined_interpolate_axis_attr_hdl)
+
+USE iinverse_axis, ONLY : xios(get_inverse_axis_handle)
+
+USE iinverse_axis_attr, ONLY : xios(set_inverse_axis_attr_hdl), &
+                               xios(get_inverse_axis_attr_hdl), &
+                               xios(is_defined_inverse_axis_attr_hdl)
+
+USE ireduce_domain_to_axis, ONLY : xios(get_reduce_domain_to_axis_handle)
+
+USE ireduce_domain_to_axis_attr, ONLY : xios(set_reduce_domain_to_axis_attr_hdl), &
+                                        xios(get_reduce_domain_to_axis_attr_hdl), &
+                                        xios(is_defined_reduce_domain_to_axis_attr_hdl)
+
+USE iextract_domain_to_axis, ONLY : xios(get_extract_domain_to_axis_handle)
+
+USE iextract_domain_to_axis_attr, ONLY : xios(set_extract_domain_to_axis_attr_hdl), &
+                                         xios(get_extract_domain_to_axis_attr_hdl), &
+                                         xios(is_defined_extract_domain_to_axis_attr_hdl)
+
+!!! SCALAR TRANSFORMATIONS
+
+
+USE ireduce_axis_to_scalar, ONLY : xios(get_reduce_axis_to_scalar_handle)
+
+USE ireduce_axis_to_scalar_attr, ONLY : xios(set_reduce_axis_to_scalar_attr_hdl), &
+                                        xios(get_reduce_axis_to_scalar_attr_hdl), &
+                                        xios(is_defined_reduce_axis_to_scalar_attr_hdl)
+
+USE ireduce_domain_to_scalar, ONLY : xios(get_reduce_domain_to_scalar_handle)
+
+USE ireduce_domain_to_scalar_attr, ONLY : xios(set_reduce_domain_to_scalar_attr_hdl), &
+                                          xios(get_reduce_domain_to_scalar_attr_hdl), &
+                                          xios(is_defined_reduce_domain_to_scalar_attr_hdl)
+
+USE iextract_axis_to_scalar, ONLY : xios(get_extract_axis_to_scalar_handle)
+
+USE iextract_axis_to_scalar_attr, ONLY : xios(set_extract_axis_to_scalar_attr_hdl), &
+                                         xios(get_extract_axis_to_scalar_attr_hdl), &
+                                         xios(is_defined_extract_axis_to_scalar_attr_hdl)
+
+USE ixml_tree, ONLY : xios(add_axis), xios(add_file), xios(add_grid), xios(add_field), xios(add_domain),   &
+                      xios(add_fieldtofile), xios(add_variabletofile), xios(add_variabletofield),          &
+                      xios(add_axisgroup), xios(add_filegroup), xios(add_gridgroup), xios(add_fieldgroup), &
+                      xios(add_domaingroup), xios(add_fieldgrouptofile), xios(add_variablegrouptofile),    &
+                      xios(add_variablegrouptofield), xios(add_axistogrid), xios(add_domaintogrid),        &
+                      xios(add_zoomdomaintodomain), xios(add_interpolatedomaintodomain),                   &
+                      xios(add_generatedomaintodomain), xios(add_zoomaxistoaxis),                          &
+                      xios(add_interpolateaxistoaxis), xios(add_inverseaxistoaxis), xios(add_scalar),      &
+                      xios(add_scalargroup), xios(add_scalartogrid), xios(add_reduceaxistoscalartoscalar), &
+                      xios(add_computeconnectivitydomaintodomain), xios(add_reducedomaintoaxistoaxis),     &
+                      xios(add_extractdomaintoaxistoaxis), xios(add_reducedomaintoscalartoscalar),         &
+                      xios(add_extractaxistoscalartoscalar), xios(add_expanddomaintodomain)
+
+PRIVATE
+
+INTERFACE xios(set_attr)
+  MODULE PROCEDURE xios(set_domaingroup_attr_hdl), xios(set_domain_attr_hdl), xios(set_fieldgroup_attr_hdl), &
+                   xios(set_field_attr_hdl),xios(set_variable_attr_hdl), xios(set_variablegroup_attr_hdl),   &
+                   xios(set_file_attr_hdl), xios(set_filegroup_attr_hdl),                                    &
+                   xios(set_grid_attr_hdl), xios(set_gridgroup_attr_hdl), xios(set_axis_attr_hdl) ,          &
+                   xios(set_axisgroup_attr_hdl), xios(set_context_attr_hdl), xios(set_zoom_axis_attr_hdl),   &
+                   xios(set_zoom_domain_attr_hdl), xios(set_interpolate_axis_attr_hdl),                      &
+                   xios(set_interpolate_domain_attr_hdl), xios(set_inverse_axis_attr_hdl),                   &
+                   xios(set_generate_rectilinear_domain_attr_hdl), xios(set_scalar_attr_hdl),                &
+                   xios(set_scalargroup_attr_hdl), xios(set_reduce_axis_to_scalar_attr_hdl),                 &
+                   xios(set_compute_connectivity_domain_attr_hdl), xios(set_reduce_domain_to_scalar_attr_hdl), &
+                   xios(set_reduce_domain_to_axis_attr_hdl), xios(set_extract_domain_to_axis_attr_hdl),        &
+                   xios(set_extract_axis_to_scalar_attr_hdl), xios(set_expand_domain_attr_hdl)
+END INTERFACE xios(set_attr)
+
+
+INTERFACE xios(get_attr)
+  MODULE PROCEDURE xios(get_domaingroup_attr_hdl), xios(get_domain_attr_hdl), xios(get_fieldgroup_attr_hdl), &
+                   xios(get_field_attr_hdl), xios(get_variable_attr_hdl), xios(get_variablegroup_attr_hdl),  &
+                   xios(get_file_attr_hdl), xios(get_filegroup_attr_hdl),                                    &
+                   xios(get_grid_attr_hdl), xios(get_gridgroup_attr_hdl), xios(get_axis_attr_hdl) ,          &
+                   xios(get_axisgroup_attr_hdl), xios(get_context_attr_hdl), xios(get_zoom_axis_attr_hdl),   &
+                   xios(get_zoom_domain_attr_hdl), xios(get_interpolate_axis_attr_hdl),                      &
+                   xios(get_interpolate_domain_attr_hdl), xios(get_inverse_axis_attr_hdl),                   &
+                   xios(get_generate_rectilinear_domain_attr_hdl), xios(get_scalar_attr_hdl),                &
+                   xios(get_scalargroup_attr_hdl), xios(get_reduce_axis_to_scalar_attr_hdl),                 &
+                   xios(get_compute_connectivity_domain_attr_hdl), xios(get_reduce_domain_to_scalar_attr_hdl), &
+                   xios(get_reduce_domain_to_axis_attr_hdl), xios(get_extract_domain_to_axis_attr_hdl),        &
+                   xios(get_extract_axis_to_scalar_attr_hdl), xios(get_expand_domain_attr_hdl)
+END INTERFACE xios(get_attr)
+
+INTERFACE xios(is_defined_attr)
+  MODULE PROCEDURE xios(is_defined_domaingroup_attr_hdl), xios(is_defined_domain_attr_hdl), xios(is_defined_fieldgroup_attr_hdl), &
+                   xios(is_defined_field_attr_hdl), xios(is_defined_variable_attr_hdl), xios(is_defined_variablegroup_attr_hdl),  &
+                   xios(is_defined_file_attr_hdl), xios(is_defined_filegroup_attr_hdl),                                           &
+                   xios(is_defined_grid_attr_hdl), xios(is_defined_gridgroup_attr_hdl), xios(is_defined_axis_attr_hdl) ,          &
+                   xios(is_defined_axisgroup_attr_hdl), xios(is_defined_context_attr_hdl),                                        &
+                   xios(is_defined_zoom_axis_attr_hdl), xios(is_defined_zoom_domain_attr_hdl),                                    &
+                   xios(is_defined_interpolate_axis_attr_hdl), xios(is_defined_interpolate_domain_attr_hdl),                      &
+                   xios(is_defined_inverse_axis_attr_hdl), xios(is_defined_generate_rectilinear_domain_attr_hdl),                 &
+                   xios(is_defined_scalar_attr_hdl), xios(is_defined_scalargroup_attr_hdl),                                       &
+                   xios(is_defined_reduce_axis_to_scalar_attr_hdl), xios(is_defined_compute_connectivity_domain_attr_hdl),        &
+                   xios(is_defined_reduce_domain_to_scalar_attr_hdl), xios(is_defined_reduce_domain_to_axis_attr_hdl),            &
+                   xios(is_defined_extract_domain_to_axis_attr_hdl), xios(is_defined_extract_axis_to_scalar_attr_hdl),            &
+                   xios(is_defined_expand_domain_attr_hdl)
+END INTERFACE xios(is_defined_attr)
+
+INTERFACE xios(get_handle)
+  MODULE PROCEDURE xios(get_context_handle), xios(get_domain_handle), xios(get_domaingroup_handle),                  &
+                   xios(get_file_handle), xios(get_filegroup_handle), xios(get_grid_handle),                         &
+                   xios(get_gridgroup_handle), xios(get_axis_handle), xios(get_axisgroup_handle),                    &
+                   xios(get_field_handle), xios(get_fieldgroup_handle),xios(get_variable_handle),                    &
+                   xios(get_variablegroup_handle), xios(get_zoom_axis_handle),                                       &
+                   xios(get_zoom_domain_handle), xios(get_interpolate_axis_handle),                                  &
+                   xios(get_interpolate_domain_handle), xios(get_inverse_axis_handle),                               &
+                   xios(get_generate_rectilinear_domain_handle), xios(get_scalar_handle),                            &
+                   xios(get_scalargroup_handle), xios(get_reduce_axis_to_scalar_handle),                             &
+                   xios(get_compute_connectivity_domain_handle), xios(get_reduce_domain_to_scalar_handle),           &
+                   xios(get_reduce_domain_to_axis_handle), xios(get_extract_domain_to_axis_handle),                  &
+                   xios(get_extract_axis_to_scalar_handle), xios(get_expand_domain_handle)
+END INTERFACE xios(get_handle)
+
+INTERFACE xios(add_child)
+  MODULE PROCEDURE xios(add_axis), xios(add_file), xios(add_grid), xios(add_field), xios(add_domain),                &
+                   xios(add_fieldtofile), xios(add_variabletofile), xios(add_variabletofield), xios(add_axisgroup),  &
+                   xios(add_filegroup), xios(add_gridgroup), xios(add_fieldgroup), xios(add_domaingroup),            &
+                   xios(add_fieldgrouptofile), xios(add_variablegrouptofile),xios(add_variablegrouptofield),         &
+                   xios(add_axistogrid), xios(add_domaintogrid), xios(add_zoomdomaintodomain),                       &
+                   xios(add_interpolatedomaintodomain), xios(add_generatedomaintodomain),                            &
+                   xios(add_zoomaxistoaxis), xios(add_interpolateaxistoaxis), xios(add_inverseaxistoaxis),           &
+                   xios(add_scalar), xios(add_scalartogrid), xios(add_reduceaxistoscalartoscalar),                   &
+                   xios(add_computeconnectivitydomaintodomain), xios(add_reducedomaintoscalartoscalar),              &
+                   xios(add_reducedomaintoaxistoaxis), xios(add_extractdomaintoaxistoaxis),                          &
+                   xios(add_extractaxistoscalartoscalar), xios(add_expanddomaintodomain)
+END INTERFACE xios(add_child)
+
+INTERFACE xios(send_field)
+  MODULE PROCEDURE xios(send_field_r8_0d), xios(send_field_r8_1d), xios(send_field_r8_2d), xios(send_field_r8_3d), &
+                   xios(send_field_r8_4d), xios(send_field_r8_5d), xios(send_field_r8_6d), xios(send_field_r8_7d), &
+                   xios(send_field_r4_0d), xios(send_field_r4_1d), xios(send_field_r4_2d), xios(send_field_r4_3d), &
+                   xios(send_field_r4_4d), xios(send_field_r4_5d), xios(send_field_r4_6d), xios(send_field_r4_7d)
+END INTERFACE xios(send_field)
+
+INTERFACE xios(recv_field)
+  MODULE PROCEDURE xios(recv_field_r8_0d), xios(recv_field_r8_1d), xios(recv_field_r8_2d), xios(recv_field_r8_3d), &
+                   xios(recv_field_r8_4d), xios(recv_field_r8_5d), xios(recv_field_r8_6d), xios(recv_field_r8_7d), &
+                   xios(recv_field_r4_0d), xios(recv_field_r4_1d), xios(recv_field_r4_2d), xios(recv_field_r4_3d), &
+                   xios(recv_field_r4_4d), xios(recv_field_r4_5d), xios(recv_field_r4_6d), xios(recv_field_r4_7d)
+END INTERFACE xios(recv_field)
+
+INTERFACE xios(field_is_active)
+  MODULE PROCEDURE xios(field_is_active_id),xios(field_is_active_hdl)
+END INTERFACE xios(field_is_active)
+
+INTERFACE xios(field_get_domain)
+  MODULE PROCEDURE xios(field_get_domain_handle), xios(field_id_get_domain_handle)
+END INTERFACE xios(field_get_domain)
+
+INTERFACE xios(field_get_axis)
+  MODULE PROCEDURE xios(field_get_axis_handle),xios(field_id_get_axis_handle)
+END INTERFACE xios(field_get_axis)
+
+INTERFACE xios(field_get_scalar)
+  MODULE PROCEDURE xios(field_get_scalar_handle),xios(field_id_get_scalar_handle)
+END INTERFACE xios(field_get_scalar)
+
+INTERFACE xios(getVar)
+  MODULE PROCEDURE xios(getVar_k8), xios(getVar_k4), xios(getVar_int), xios(getVar_logic), xios(getVar_char)
+END INTERFACE xios(getVar)
+
+INTERFACE xios(setVar)
+  MODULE PROCEDURE xios(setVar_k8), xios(setVar_k4), xios(setVar_int), xios(setVar_logic), xios(setVar_char)
+END INTERFACE xios(setVar)
+
+PUBLIC :: xios(set_attr), xios(get_attr), xios(is_defined_attr), xios(get_handle), xios(add_child), &
+          xios(send_field), xios(recv_field), xios(field_is_active), xios(getVar), xios(setVar), &
+          xios(field_get_domain),xios(field_get_axis),xios(field_get_scalar)
+
+END MODULE XIOS_INTERFACES
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/fortran/ixml_tree.F90
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/fortran/ixml_tree.F90	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/fortran/ixml_tree.F90	(revision 1749)
@@ -0,0 +1,783 @@
+#include "xios_fortran_prefix.hpp"
+
+MODULE IXML_TREE
+   USE, INTRINSIC :: ISO_C_BINDING
+   USE ISCALAR
+   USE IAXIS
+   USE IFILE
+   USE IFIELD
+   USE IGRID
+   USE IDOMAIN
+   USE IVARIABLE
+   
+   USE IZOOM_DOMAIN
+   USE IINTERPOLATE_DOMAIN
+   USE IGENERATE_RECTILINEAR_DOMAIN
+   USE ICOMPUTE_CONNECTIVITY_DOMAIN
+   USE IEXPAND_DOMAIN
+
+   USE IZOOM_AXIS
+   USE IINTERPOLATE_AXIS
+   USE IINVERSE_AXIS
+   USE IREDUCE_DOMAIN_TO_AXIS
+   USE IEXTRACT_DOMAIN_TO_AXIS
+
+   USE IREDUCE_AXIS_TO_SCALAR
+   USE IEXTRACT_AXIS_TO_SCALAR
+   USE IREDUCE_DOMAIN_TO_SCALAR
+
+   INTERFACE ! Ne pas appeler directement/Interface FORTRAN 2003 <-> C99
+
+      SUBROUTINE cxios_xml_tree_add_field(parent_, child_, child_id, child_id_size) BIND(C)
+         USE ISO_C_BINDING
+         INTEGER  (kind = C_INTPTR_T), VALUE        :: parent_
+         INTEGER  (kind = C_INTPTR_T)               :: child_
+         CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: child_id
+         INTEGER  (kind = C_INT)     , VALUE        :: child_id_size
+      END SUBROUTINE cxios_xml_tree_add_field
+
+      SUBROUTINE cxios_xml_tree_add_grid(parent_, child_, child_id, child_id_size) BIND(C)
+         USE ISO_C_BINDING
+         INTEGER  (kind = C_INTPTR_T), VALUE        :: parent_
+         INTEGER  (kind = C_INTPTR_T)               :: child_
+         CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: child_id
+         INTEGER  (kind = C_INT)     , VALUE        :: child_id_size
+      END SUBROUTINE cxios_xml_tree_add_grid
+
+      SUBROUTINE cxios_xml_tree_add_file(parent_, child_, child_id, child_id_size) BIND(C)
+         USE ISO_C_BINDING
+         INTEGER  (kind = C_INTPTR_T), VALUE        :: parent_
+         INTEGER  (kind = C_INTPTR_T)               :: child_
+         CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: child_id
+         INTEGER  (kind = C_INT)     , VALUE        :: child_id_size
+      END SUBROUTINE cxios_xml_tree_add_file
+
+      SUBROUTINE cxios_xml_tree_add_scalar(parent_, child_, child_id, child_id_size) BIND(C)
+         USE ISO_C_BINDING
+         INTEGER  (kind = C_INTPTR_T), VALUE        :: parent_
+         INTEGER  (kind = C_INTPTR_T)               :: child_
+         CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: child_id
+         INTEGER  (kind = C_INT)     , VALUE        :: child_id_size
+      END SUBROUTINE cxios_xml_tree_add_scalar
+
+      SUBROUTINE cxios_xml_tree_add_axis(parent_, child_, child_id, child_id_size) BIND(C)
+         USE ISO_C_BINDING
+         INTEGER  (kind = C_INTPTR_T), VALUE        :: parent_
+         INTEGER  (kind = C_INTPTR_T)               :: child_
+         CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: child_id
+         INTEGER  (kind = C_INT)     , VALUE        :: child_id_size
+      END SUBROUTINE cxios_xml_tree_add_axis
+
+      SUBROUTINE cxios_xml_tree_add_domain(parent_, child_, child_id, child_id_size) BIND(C)
+         USE ISO_C_BINDING
+         INTEGER  (kind = C_INTPTR_T), VALUE        :: parent_
+         INTEGER  (kind = C_INTPTR_T)               :: child_
+         CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: child_id
+         INTEGER  (kind = C_INT)     , VALUE        :: child_id_size
+      END SUBROUTINE cxios_xml_tree_add_domain
+
+      SUBROUTINE cxios_xml_tree_add_fieldtofile(parent_, child_, child_id, child_id_size) BIND(C)
+         USE ISO_C_BINDING
+         INTEGER  (kind = C_INTPTR_T), VALUE        :: parent_
+         INTEGER  (kind = C_INTPTR_T)               :: child_
+         CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: child_id
+         INTEGER  (kind = C_INT)     , VALUE        :: child_id_size
+      END SUBROUTINE cxios_xml_tree_add_fieldtofile
+
+      SUBROUTINE cxios_xml_tree_add_variabletofile(parent_, child_, child_id, child_id_size) BIND(C)
+         USE ISO_C_BINDING
+         INTEGER  (kind = C_INTPTR_T), VALUE        :: parent_
+         INTEGER  (kind = C_INTPTR_T)               :: child_
+         CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: child_id
+         INTEGER  (kind = C_INT)     , VALUE        :: child_id_size
+      END SUBROUTINE cxios_xml_tree_add_variabletofile
+
+
+      SUBROUTINE cxios_xml_tree_add_variabletofield(parent_, child_, child_id, child_id_size) BIND(C)
+         USE ISO_C_BINDING
+         INTEGER  (kind = C_INTPTR_T), VALUE        :: parent_
+         INTEGER  (kind = C_INTPTR_T)               :: child_
+         CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: child_id
+         INTEGER  (kind = C_INT)     , VALUE        :: child_id_size
+      END SUBROUTINE cxios_xml_tree_add_variabletofield
+
+
+      SUBROUTINE cxios_xml_tree_add_fieldgroup(parent_, child_, child_id, child_id_size) BIND(C)
+         USE ISO_C_BINDING
+         INTEGER  (kind = C_INTPTR_T), VALUE        :: parent_
+         INTEGER  (kind = C_INTPTR_T)               :: child_
+         CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: child_id
+         INTEGER  (kind = C_INT)     , VALUE        :: child_id_size
+      END SUBROUTINE cxios_xml_tree_add_fieldgroup
+
+      SUBROUTINE cxios_xml_tree_add_gridgroup(parent_, child_, child_id, child_id_size) BIND(C)
+         USE ISO_C_BINDING
+         INTEGER  (kind = C_INTPTR_T), VALUE        :: parent_
+         INTEGER  (kind = C_INTPTR_T)               :: child_
+         CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: child_id
+         INTEGER  (kind = C_INT)     , VALUE        :: child_id_size
+      END SUBROUTINE cxios_xml_tree_add_gridgroup
+
+      SUBROUTINE cxios_xml_tree_add_filegroup(parent_, child_, child_id, child_id_size) BIND(C)
+         USE ISO_C_BINDING
+         INTEGER  (kind = C_INTPTR_T), VALUE        :: parent_
+         INTEGER  (kind = C_INTPTR_T)               :: child_
+         CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: child_id
+         INTEGER  (kind = C_INT)     , VALUE        :: child_id_size
+      END SUBROUTINE cxios_xml_tree_add_filegroup
+
+      SUBROUTINE cxios_xml_tree_add_scalargroup(parent_, child_, child_id, child_id_size) BIND(C)
+         USE ISO_C_BINDING
+         INTEGER  (kind = C_INTPTR_T), VALUE        :: parent_
+         INTEGER  (kind = C_INTPTR_T)               :: child_
+         CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: child_id
+         INTEGER  (kind = C_INT)     , VALUE        :: child_id_size
+      END SUBROUTINE cxios_xml_tree_add_scalargroup
+
+      SUBROUTINE cxios_xml_tree_add_axisgroup(parent_, child_, child_id, child_id_size) BIND(C)
+         USE ISO_C_BINDING
+         INTEGER  (kind = C_INTPTR_T), VALUE        :: parent_
+         INTEGER  (kind = C_INTPTR_T)               :: child_
+         CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: child_id
+         INTEGER  (kind = C_INT)     , VALUE        :: child_id_size
+      END SUBROUTINE cxios_xml_tree_add_axisgroup
+
+      SUBROUTINE cxios_xml_tree_add_domaingroup(parent_, child_, child_id, child_id_size) BIND(C)
+         USE ISO_C_BINDING
+         INTEGER  (kind = C_INTPTR_T), VALUE        :: parent_
+         INTEGER  (kind = C_INTPTR_T)               :: child_
+         CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: child_id
+         INTEGER  (kind = C_INT)     , VALUE        :: child_id_size
+      END SUBROUTINE cxios_xml_tree_add_domaingroup
+
+      SUBROUTINE cxios_xml_tree_add_fieldgrouptofile(parent_, child_, child_id, child_id_size) BIND(C)
+         USE ISO_C_BINDING
+         INTEGER  (kind = C_INTPTR_T), VALUE        :: parent_
+         INTEGER  (kind = C_INTPTR_T)               :: child_
+         CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: child_id
+         INTEGER  (kind = C_INT)     , VALUE        :: child_id_size
+      END SUBROUTINE cxios_xml_tree_add_fieldgrouptofile
+
+      SUBROUTINE cxios_xml_tree_add_variablegrouptofile(parent_, child_, child_id, child_id_size) BIND(C)
+         USE ISO_C_BINDING
+         INTEGER  (kind = C_INTPTR_T), VALUE        :: parent_
+         INTEGER  (kind = C_INTPTR_T)               :: child_
+         CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: child_id
+         INTEGER  (kind = C_INT)     , VALUE        :: child_id_size
+      END SUBROUTINE cxios_xml_tree_add_variablegrouptofile
+
+      SUBROUTINE cxios_xml_tree_add_variablegrouptofield(parent_, child_, child_id, child_id_size) BIND(C)
+         USE ISO_C_BINDING
+         INTEGER  (kind = C_INTPTR_T), VALUE        :: parent_
+         INTEGER  (kind = C_INTPTR_T)               :: child_
+         CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: child_id
+         INTEGER  (kind = C_INT)     , VALUE        :: child_id_size
+      END SUBROUTINE cxios_xml_tree_add_variablegrouptofield
+
+      SUBROUTINE cxios_xml_tree_add_scalartogrid(parent_, child_, child_id, child_id_size) BIND(C)
+         USE ISO_C_BINDING
+         INTEGER  (kind = C_INTPTR_T), VALUE        :: parent_
+         INTEGER  (kind = C_INTPTR_T)               :: child_
+         CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: child_id
+         INTEGER  (kind = C_INT)     , VALUE        :: child_id_size
+      END SUBROUTINE cxios_xml_tree_add_scalartogrid
+
+      SUBROUTINE cxios_xml_tree_add_axistogrid(parent_, child_, child_id, child_id_size) BIND(C)
+         USE ISO_C_BINDING
+         INTEGER  (kind = C_INTPTR_T), VALUE        :: parent_
+         INTEGER  (kind = C_INTPTR_T)               :: child_
+         CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: child_id
+         INTEGER  (kind = C_INT)     , VALUE        :: child_id_size
+      END SUBROUTINE cxios_xml_tree_add_axistogrid
+
+      SUBROUTINE cxios_xml_tree_add_domaintogrid(parent_, child_, child_id, child_id_size) BIND(C)
+         USE ISO_C_BINDING
+         INTEGER  (kind = C_INTPTR_T), VALUE        :: parent_
+         INTEGER  (kind = C_INTPTR_T)               :: child_
+         CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: child_id
+         INTEGER  (kind = C_INT)     , VALUE        :: child_id_size
+      END SUBROUTINE cxios_xml_tree_add_domaintogrid
+
+      !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+      !!!   TRANSFORMATIONS 
+      !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+      !!! DOMAIN
+      SUBROUTINE cxios_xml_tree_add_zoomdomaintodomain(parent_, child_, child_id, child_id_size) BIND(C)
+         USE ISO_C_BINDING
+         INTEGER  (kind = C_INTPTR_T), VALUE        :: parent_
+         INTEGER  (kind = C_INTPTR_T)               :: child_
+         CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: child_id
+         INTEGER  (kind = C_INT)     , VALUE        :: child_id_size
+      END SUBROUTINE cxios_xml_tree_add_zoomdomaintodomain
+
+      SUBROUTINE cxios_xml_tree_add_interpolatedomaintodomain(parent_, child_, child_id, child_id_size) BIND(C)
+         USE ISO_C_BINDING
+         INTEGER  (kind = C_INTPTR_T), VALUE        :: parent_
+         INTEGER  (kind = C_INTPTR_T)               :: child_
+         CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: child_id
+         INTEGER  (kind = C_INT)     , VALUE        :: child_id_size
+      END SUBROUTINE cxios_xml_tree_add_interpolatedomaintodomain
+
+      SUBROUTINE cxios_xml_tree_add_generatedomaintodomain(parent_, child_, child_id, child_id_size) BIND(C)
+         USE ISO_C_BINDING
+         INTEGER  (kind = C_INTPTR_T), VALUE        :: parent_
+         INTEGER  (kind = C_INTPTR_T)               :: child_
+         CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: child_id
+         INTEGER  (kind = C_INT)     , VALUE        :: child_id_size
+      END SUBROUTINE cxios_xml_tree_add_generatedomaintodomain
+
+      SUBROUTINE cxios_xml_tree_add_computeconnectivitydomaintodomain(parent_, child_, child_id, child_id_size) BIND(C)
+         USE ISO_C_BINDING
+         INTEGER  (kind = C_INTPTR_T), VALUE        :: parent_
+         INTEGER  (kind = C_INTPTR_T)               :: child_
+         CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: child_id
+         INTEGER  (kind = C_INT)     , VALUE        :: child_id_size
+      END SUBROUTINE cxios_xml_tree_add_computeconnectivitydomaintodomain
+
+      SUBROUTINE cxios_xml_tree_add_expanddomaintodomain(parent_, child_, child_id, child_id_size) BIND(C)
+         USE ISO_C_BINDING
+         INTEGER  (kind = C_INTPTR_T), VALUE        :: parent_
+         INTEGER  (kind = C_INTPTR_T)               :: child_
+         CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: child_id
+         INTEGER  (kind = C_INT)     , VALUE        :: child_id_size
+      END SUBROUTINE cxios_xml_tree_add_expanddomaintodomain
+
+      !!!! AXIS
+      SUBROUTINE cxios_xml_tree_add_zoomaxistoaxis(parent_, child_, child_id, child_id_size) BIND(C)
+         USE ISO_C_BINDING
+         INTEGER  (kind = C_INTPTR_T), VALUE        :: parent_
+         INTEGER  (kind = C_INTPTR_T)               :: child_
+         CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: child_id
+         INTEGER  (kind = C_INT)     , VALUE        :: child_id_size
+      END SUBROUTINE cxios_xml_tree_add_zoomaxistoaxis
+
+      SUBROUTINE cxios_xml_tree_add_interpolateaxistoaxis(parent_, child_, child_id, child_id_size) BIND(C)
+         USE ISO_C_BINDING
+         INTEGER  (kind = C_INTPTR_T), VALUE        :: parent_
+         INTEGER  (kind = C_INTPTR_T)               :: child_
+         CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: child_id
+         INTEGER  (kind = C_INT)     , VALUE        :: child_id_size
+      END SUBROUTINE cxios_xml_tree_add_interpolateaxistoaxis
+
+      SUBROUTINE cxios_xml_tree_add_inverseaxistoaxis(parent_, child_, child_id, child_id_size) BIND(C)
+         USE ISO_C_BINDING
+         INTEGER  (kind = C_INTPTR_T), VALUE        :: parent_
+         INTEGER  (kind = C_INTPTR_T)               :: child_
+         CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: child_id
+         INTEGER  (kind = C_INT)     , VALUE        :: child_id_size
+      END SUBROUTINE cxios_xml_tree_add_inverseaxistoaxis
+
+      SUBROUTINE cxios_xml_tree_add_reducedomaintoaxistoaxis(parent_, child_, child_id, child_id_size) BIND(C)
+         USE ISO_C_BINDING
+         INTEGER  (kind = C_INTPTR_T), VALUE        :: parent_
+         INTEGER  (kind = C_INTPTR_T)               :: child_
+         CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: child_id
+         INTEGER  (kind = C_INT)     , VALUE        :: child_id_size
+      END SUBROUTINE cxios_xml_tree_add_reducedomaintoaxistoaxis
+
+      SUBROUTINE cxios_xml_tree_add_extractdomaintoaxistoaxis(parent_, child_, child_id, child_id_size) BIND(C)
+         USE ISO_C_BINDING
+         INTEGER  (kind = C_INTPTR_T), VALUE        :: parent_
+         INTEGER  (kind = C_INTPTR_T)               :: child_
+         CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: child_id
+         INTEGER  (kind = C_INT)     , VALUE        :: child_id_size
+      END SUBROUTINE cxios_xml_tree_add_extractdomaintoaxistoaxis
+
+      !!! SCALAR
+      SUBROUTINE cxios_xml_tree_add_reduceaxistoscalartoscalar(parent_, child_, child_id, child_id_size) BIND(C)
+         USE ISO_C_BINDING
+         INTEGER  (kind = C_INTPTR_T), VALUE        :: parent_
+         INTEGER  (kind = C_INTPTR_T)               :: child_
+         CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: child_id
+         INTEGER  (kind = C_INT)     , VALUE        :: child_id_size
+      END SUBROUTINE cxios_xml_tree_add_reduceaxistoscalartoscalar
+
+      SUBROUTINE cxios_xml_tree_add_extractaxistoscalartoscalar(parent_, child_, child_id, child_id_size) BIND(C)
+         USE ISO_C_BINDING
+         INTEGER  (kind = C_INTPTR_T), VALUE        :: parent_
+         INTEGER  (kind = C_INTPTR_T)               :: child_
+         CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: child_id
+         INTEGER  (kind = C_INT)     , VALUE        :: child_id_size
+      END SUBROUTINE cxios_xml_tree_add_extractaxistoscalartoscalar
+
+      SUBROUTINE cxios_xml_tree_add_reducedomaintoscalartoscalar(parent_, child_, child_id, child_id_size) BIND(C)
+         USE ISO_C_BINDING
+         INTEGER  (kind = C_INTPTR_T), VALUE        :: parent_
+         INTEGER  (kind = C_INTPTR_T)               :: child_
+         CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: child_id
+         INTEGER  (kind = C_INT)     , VALUE        :: child_id_size
+      END SUBROUTINE cxios_xml_tree_add_reducedomaintoscalartoscalar
+
+      SUBROUTINE cxios_xml_tree_show(filename, filename_size) BIND(C)
+         USE ISO_C_BINDING
+         CHARACTER(kind = C_CHAR), DIMENSION(*) :: filename
+         INTEGER  (kind = C_INT) , VALUE        :: filename_size
+      END SUBROUTINE cxios_xml_tree_show
+
+      SUBROUTINE cxios_xml_parse_file(filename, filename_size) BIND(C)
+         USE ISO_C_BINDING
+         CHARACTER(kind = C_CHAR), DIMENSION(*) :: filename
+         INTEGER  (kind = C_INT) , VALUE        :: filename_size
+      END SUBROUTINE cxios_xml_parse_file
+
+      SUBROUTINE cxios_xml_parse_string(xmlcontent, xmlcontent_size) BIND(C)
+         USE ISO_C_BINDING
+         CHARACTER(kind = C_CHAR), DIMENSION(*) :: xmlcontent
+         INTEGER  (kind = C_INT) , VALUE        :: xmlcontent_size
+      END SUBROUTINE cxios_xml_parse_string
+
+   END INTERFACE
+
+
+   CONTAINS ! Fonctions disponibles pour les utilisateurs.
+
+   SUBROUTINE xios(add_scalar)(parent_hdl, child_hdl, child_id)
+      TYPE(txios(scalargroup))     , INTENT(IN) :: parent_hdl
+      TYPE(txios(scalar))          , INTENT(OUT):: child_hdl
+      CHARACTER(len = *), OPTIONAL, INTENT(IN) :: child_id
+
+      IF (PRESENT(child_id)) THEN
+         CALL cxios_xml_tree_add_scalar(parent_hdl%daddr, child_hdl%daddr, child_id, len(child_id))
+      ELSE
+         CALL cxios_xml_tree_add_scalar(parent_hdl%daddr, child_hdl%daddr, "NONE", -1)
+      END IF
+
+   END SUBROUTINE xios(add_scalar)
+
+   SUBROUTINE xios(add_axis)(parent_hdl, child_hdl, child_id)
+      TYPE(txios(axisgroup))     , INTENT(IN) :: parent_hdl
+      TYPE(txios(axis))          , INTENT(OUT):: child_hdl
+      CHARACTER(len = *), OPTIONAL, INTENT(IN) :: child_id
+
+      IF (PRESENT(child_id)) THEN
+         CALL cxios_xml_tree_add_axis(parent_hdl%daddr, child_hdl%daddr, child_id, len(child_id))
+      ELSE
+         CALL cxios_xml_tree_add_axis(parent_hdl%daddr, child_hdl%daddr, "NONE", -1)
+      END IF
+
+   END SUBROUTINE xios(add_axis)
+
+   SUBROUTINE xios(add_file)(parent_hdl, child_hdl, child_id)
+      TYPE(txios(filegroup))      , INTENT(IN) :: parent_hdl
+      TYPE(txios(file))           , INTENT(OUT):: child_hdl
+      CHARACTER(len = *), OPTIONAL, INTENT(IN)  :: child_id
+
+      IF (PRESENT(child_id)) THEN
+         CALL cxios_xml_tree_add_file(parent_hdl%daddr, child_hdl%daddr, child_id, len(child_id))
+      ELSE
+         CALL cxios_xml_tree_add_file(parent_hdl%daddr, child_hdl%daddr, "NONE", -1)
+      END IF
+
+   END SUBROUTINE xios(add_file)
+
+   SUBROUTINE xios(add_grid)(parent_hdl, child_hdl, child_id)
+      TYPE(txios(gridgroup))     , INTENT(IN) :: parent_hdl
+      TYPE(txios(grid))          , INTENT(OUT):: child_hdl
+      CHARACTER(len = *), OPTIONAL, INTENT(IN) :: child_id
+      IF (PRESENT(child_id)) THEN
+         CALL cxios_xml_tree_add_grid(parent_hdl%daddr, child_hdl%daddr, child_id, len(child_id))
+      ELSE
+         CALL cxios_xml_tree_add_grid(parent_hdl%daddr, child_hdl%daddr, "NONE", -1)
+      END IF
+
+   END SUBROUTINE xios(add_grid)
+
+
+   SUBROUTINE xios(add_field)(parent_hdl, child_hdl, child_id)
+      TYPE(txios(fieldgroup))     , INTENT(IN) :: parent_hdl
+      TYPE(txios(field))          , INTENT(OUT):: child_hdl
+      CHARACTER(len = *), OPTIONAL, INTENT(IN) :: child_id
+
+      IF (PRESENT(child_id)) THEN
+         CALL cxios_xml_tree_add_field(parent_hdl%daddr, child_hdl%daddr, child_id, len(child_id))
+      ELSE
+         CALL cxios_xml_tree_add_field(parent_hdl%daddr, child_hdl%daddr, "NONE", -1)
+      END IF
+
+   END SUBROUTINE xios(add_field)
+
+
+   SUBROUTINE xios(add_domain)(parent_hdl, child_hdl, child_id)
+      TYPE(txios(domaingroup))     , INTENT(IN) :: parent_hdl
+      TYPE(txios(domain))     , INTENT(OUT):: child_hdl
+      CHARACTER(len = *), OPTIONAL , INTENT(IN) :: child_id
+
+      IF (PRESENT(child_id)) THEN
+         CALL cxios_xml_tree_add_domain(parent_hdl%daddr, child_hdl%daddr, child_id, len(child_id))
+      ELSE
+         CALL cxios_xml_tree_add_domain(parent_hdl%daddr, child_hdl%daddr, "NONE", -1)
+      END IF
+
+   END SUBROUTINE xios(add_domain)
+
+   SUBROUTINE xios(add_fieldtofile)(parent_hdl, child_hdl, child_id)
+      TYPE(txios(file))            , INTENT(IN) :: parent_hdl
+      TYPE(txios(field))           , INTENT(OUT):: child_hdl
+      CHARACTER(len = *), OPTIONAL , INTENT(IN) :: child_id
+
+      IF (PRESENT(child_id)) THEN
+         CALL cxios_xml_tree_add_fieldtofile(parent_hdl%daddr, child_hdl%daddr, child_id, len(child_id))
+      ELSE
+         CALL cxios_xml_tree_add_fieldtofile(parent_hdl%daddr, child_hdl%daddr, "NONE", -1)
+      END IF
+
+   END SUBROUTINE xios(add_fieldtofile)
+
+   SUBROUTINE xios(add_variabletofile)(parent_hdl, child_hdl, child_id)
+      TYPE(txios(file))            , INTENT(IN) :: parent_hdl
+      TYPE(txios(variable))        , INTENT(OUT):: child_hdl
+      CHARACTER(len = *), OPTIONAL , INTENT(IN) :: child_id
+
+      IF (PRESENT(child_id)) THEN
+         CALL cxios_xml_tree_add_variabletofile(parent_hdl%daddr, child_hdl%daddr, child_id, len(child_id))
+      ELSE
+         CALL cxios_xml_tree_add_variabletofile(parent_hdl%daddr, child_hdl%daddr, "NONE", -1)
+      END IF
+
+   END SUBROUTINE xios(add_variabletofile)
+
+   SUBROUTINE xios(add_variabletofield)(parent_hdl, child_hdl, child_id)
+      TYPE(txios(field))            , INTENT(IN) :: parent_hdl
+      TYPE(txios(variable))         , INTENT(OUT):: child_hdl
+      CHARACTER(len = *), OPTIONAL  , INTENT(IN) :: child_id
+
+      IF (PRESENT(child_id)) THEN
+         CALL cxios_xml_tree_add_variabletofield(parent_hdl%daddr, child_hdl%daddr, child_id, len(child_id))
+      ELSE
+         CALL cxios_xml_tree_add_variabletofield(parent_hdl%daddr, child_hdl%daddr, "NONE", -1)
+      END IF
+
+   END SUBROUTINE xios(add_variabletofield)
+
+   SUBROUTINE xios(add_scalargroup)(parent_hdl, child_hdl, child_id)
+      TYPE(txios(scalargroup))      , INTENT(IN) :: parent_hdl
+      TYPE(txios(scalargroup))      , INTENT(OUT):: child_hdl
+      CHARACTER(len = *), OPTIONAL, INTENT(IN) :: child_id
+
+      IF (PRESENT(child_id)) THEN
+         CALL cxios_xml_tree_add_scalargroup(parent_hdl%daddr, child_hdl%daddr, child_id, len(child_id))
+      ELSE
+         CALL cxios_xml_tree_add_scalargroup(parent_hdl%daddr, child_hdl%daddr, "NONE", -1)
+      END IF
+
+   END SUBROUTINE xios(add_scalargroup)
+
+   SUBROUTINE xios(add_axisgroup)(parent_hdl, child_hdl, child_id)
+      TYPE(txios(axisgroup))      , INTENT(IN) :: parent_hdl
+      TYPE(txios(axisgroup))      , INTENT(OUT):: child_hdl
+      CHARACTER(len = *), OPTIONAL, INTENT(IN) :: child_id
+
+      IF (PRESENT(child_id)) THEN
+         CALL cxios_xml_tree_add_axisgroup(parent_hdl%daddr, child_hdl%daddr, child_id, len(child_id))
+      ELSE
+         CALL cxios_xml_tree_add_axisgroup(parent_hdl%daddr, child_hdl%daddr, "NONE", -1)
+      END IF
+
+   END SUBROUTINE xios(add_axisgroup)
+
+
+   SUBROUTINE xios(add_filegroup)(parent_hdl, child_hdl, child_id)
+      TYPE(txios(filegroup))      , INTENT(IN) :: parent_hdl
+      TYPE(txios(filegroup))      , INTENT(OUT):: child_hdl
+      CHARACTER(len = *), OPTIONAL, INTENT(IN) :: child_id
+
+      IF (PRESENT(child_id)) THEN
+         CALL cxios_xml_tree_add_filegroup(parent_hdl%daddr, child_hdl%daddr, child_id, len(child_id))
+      ELSE
+         CALL cxios_xml_tree_add_filegroup(parent_hdl%daddr, child_hdl%daddr, "NONE", -1)
+      END IF
+
+   END SUBROUTINE xios(add_filegroup)
+
+   SUBROUTINE xios(add_gridgroup)(parent_hdl, child_hdl, child_id)
+      TYPE(txios(gridgroup))      , INTENT(IN) :: parent_hdl
+      TYPE(txios(gridgroup))      , INTENT(OUT):: child_hdl
+      CHARACTER(len = *), OPTIONAL, INTENT(IN) :: child_id
+
+      IF (PRESENT(child_id)) THEN
+         CALL cxios_xml_tree_add_gridgroup(parent_hdl%daddr, child_hdl%daddr, child_id, len(child_id))
+      ELSE
+         CALL cxios_xml_tree_add_gridgroup(parent_hdl%daddr, child_hdl%daddr, "NONE", -1)
+      END IF
+
+   END SUBROUTINE xios(add_gridgroup)
+
+
+   SUBROUTINE xios(add_fieldgroup)(parent_hdl, child_hdl, child_id)
+      TYPE(txios(fieldgroup))     , INTENT(IN) :: parent_hdl
+      TYPE(txios(fieldgroup))     , INTENT(OUT):: child_hdl
+      CHARACTER(len = *), OPTIONAL, INTENT(IN) :: child_id
+      IF (PRESENT(child_id)) THEN
+         CALL cxios_xml_tree_add_fieldgroup(parent_hdl%daddr, child_hdl%daddr, child_id, len(child_id))
+      ELSE
+         CALL cxios_xml_tree_add_fieldgroup(parent_hdl%daddr, child_hdl%daddr, "NONE", -1)
+      END IF
+   END SUBROUTINE xios(add_fieldgroup)
+
+   SUBROUTINE xios(add_domaingroup)(parent_hdl, child_hdl, child_id)
+      TYPE(txios(domaingroup))     , INTENT(IN) :: parent_hdl
+      TYPE(txios(domaingroup))     , INTENT(OUT):: child_hdl
+      CHARACTER(len = *), OPTIONAL , INTENT(IN) :: child_id
+
+      IF (PRESENT(child_id)) THEN
+         CALL cxios_xml_tree_add_domaingroup(parent_hdl%daddr, child_hdl%daddr, child_id, len(child_id))
+      ELSE
+         CALL cxios_xml_tree_add_domaingroup(parent_hdl%daddr, child_hdl%daddr, "NONE", -1)
+      END IF
+
+   END SUBROUTINE xios(add_domaingroup)
+
+   SUBROUTINE xios(add_fieldgrouptofile)(parent_hdl, child_hdl, child_id)
+      TYPE(txios(file))            , INTENT(IN) :: parent_hdl
+      TYPE(txios(fieldgroup))      , INTENT(OUT):: child_hdl
+      CHARACTER(len = *), OPTIONAL , INTENT(IN) :: child_id
+
+      IF (PRESENT(child_id)) THEN
+         CALL cxios_xml_tree_add_fieldgrouptofile(parent_hdl%daddr, child_hdl%daddr, child_id, len(child_id))
+      ELSE
+         CALL cxios_xml_tree_add_fieldgrouptofile(parent_hdl%daddr, child_hdl%daddr, "NONE", -1)
+      END IF
+
+   END SUBROUTINE xios(add_fieldgrouptofile)
+
+   SUBROUTINE xios(add_variablegrouptofile)(parent_hdl, child_hdl, child_id)
+      TYPE(txios(file))            , INTENT(IN) :: parent_hdl
+      TYPE(txios(variablegroup))   , INTENT(OUT):: child_hdl
+      CHARACTER(len = *), OPTIONAL , INTENT(IN) :: child_id
+
+      IF (PRESENT(child_id)) THEN
+         CALL cxios_xml_tree_add_variablegrouptofile(parent_hdl%daddr, child_hdl%daddr, child_id, len(child_id))
+      ELSE
+         CALL cxios_xml_tree_add_variablegrouptofile(parent_hdl%daddr, child_hdl%daddr, "NONE", -1)
+      END IF
+
+   END SUBROUTINE xios(add_variablegrouptofile)
+
+   SUBROUTINE xios(add_variablegrouptofield)(parent_hdl, child_hdl, child_id)
+      TYPE(txios(field))            , INTENT(IN) :: parent_hdl
+      TYPE(txios(variablegroup))    , INTENT(OUT):: child_hdl
+      CHARACTER(len = *), OPTIONAL  , INTENT(IN) :: child_id
+
+      IF (PRESENT(child_id)) THEN
+         CALL cxios_xml_tree_add_variablegrouptofield(parent_hdl%daddr, child_hdl%daddr, child_id, len(child_id))
+      ELSE
+         CALL cxios_xml_tree_add_variablegrouptofield(parent_hdl%daddr, child_hdl%daddr, "NONE", -1)
+      END IF
+
+   END SUBROUTINE xios(add_variablegrouptofield)
+
+   SUBROUTINE xios(add_scalartogrid)(parent_hdl, child_hdl, child_id)
+      TYPE(txios(grid))             , INTENT(IN) :: parent_hdl
+      TYPE(txios(scalar))           , INTENT(OUT):: child_hdl
+      CHARACTER(len = *), OPTIONAL  , INTENT(IN) :: child_id
+
+      IF (PRESENT(child_id)) THEN
+         CALL cxios_xml_tree_add_scalartogrid(parent_hdl%daddr, child_hdl%daddr, child_id, len(child_id))
+      ELSE
+         CALL cxios_xml_tree_add_scalartogrid(parent_hdl%daddr, child_hdl%daddr, "NONE", -1)
+      END IF
+
+   END SUBROUTINE xios(add_scalartogrid)
+
+   SUBROUTINE xios(add_axistogrid)(parent_hdl, child_hdl, child_id)
+      TYPE(txios(grid))             , INTENT(IN) :: parent_hdl
+      TYPE(txios(axis))             , INTENT(OUT):: child_hdl
+      CHARACTER(len = *), OPTIONAL  , INTENT(IN) :: child_id
+
+      IF (PRESENT(child_id)) THEN
+         CALL cxios_xml_tree_add_axistogrid(parent_hdl%daddr, child_hdl%daddr, child_id, len(child_id))
+      ELSE
+         CALL cxios_xml_tree_add_axistogrid(parent_hdl%daddr, child_hdl%daddr, "NONE", -1)
+      END IF
+
+   END SUBROUTINE xios(add_axistogrid)
+
+   SUBROUTINE xios(add_domaintogrid)(parent_hdl, child_hdl, child_id)
+      TYPE(txios(grid))             , INTENT(IN) :: parent_hdl
+      TYPE(txios(domain))           , INTENT(OUT):: child_hdl
+      CHARACTER(len = *), OPTIONAL  , INTENT(IN) :: child_id
+
+      IF (PRESENT(child_id)) THEN
+         CALL cxios_xml_tree_add_domaintogrid(parent_hdl%daddr, child_hdl%daddr, child_id, len(child_id))
+      ELSE
+         CALL cxios_xml_tree_add_domaintogrid(parent_hdl%daddr, child_hdl%daddr, "NONE", -1)
+      END IF
+
+   END SUBROUTINE xios(add_domaintogrid)
+
+   !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+   !!!         TRANSFORMATIONS
+   !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+   !!!         DOAMIN
+   SUBROUTINE xios(add_zoomdomaintodomain)(parent_hdl, child_hdl, child_id)
+      TYPE(txios(domain))           , INTENT(IN) :: parent_hdl
+      TYPE(txios(zoom_domain))      , INTENT(OUT):: child_hdl
+      CHARACTER(len = *), OPTIONAL  , INTENT(IN) :: child_id
+
+      IF (PRESENT(child_id)) THEN
+         CALL cxios_xml_tree_add_zoomdomaintodomain(parent_hdl%daddr, child_hdl%daddr, child_id, len(child_id))
+      ELSE
+         CALL cxios_xml_tree_add_zoomdomaintodomain(parent_hdl%daddr, child_hdl%daddr, "NONE", -1)
+      END IF
+
+   END SUBROUTINE xios(add_zoomdomaintodomain)
+
+   SUBROUTINE xios(add_interpolatedomaintodomain)(parent_hdl, child_hdl, child_id)
+      TYPE(txios(domain))             , INTENT(IN) :: parent_hdl
+      TYPE(txios(interpolate_domain)) , INTENT(OUT):: child_hdl
+      CHARACTER(len = *), OPTIONAL    , INTENT(IN) :: child_id
+
+      IF (PRESENT(child_id)) THEN
+         CALL cxios_xml_tree_add_interpolatedomaintodomain(parent_hdl%daddr, child_hdl%daddr, child_id, len(child_id))
+      ELSE
+         CALL cxios_xml_tree_add_interpolatedomaintodomain(parent_hdl%daddr, child_hdl%daddr, "NONE", -1)
+      END IF
+
+   END SUBROUTINE xios(add_interpolatedomaintodomain)
+
+   SUBROUTINE xios(add_generatedomaintodomain)(parent_hdl, child_hdl, child_id)
+      TYPE(txios(domain))                      , INTENT(IN) :: parent_hdl
+      TYPE(txios(generate_rectilinear_domain)) , INTENT(OUT):: child_hdl
+      CHARACTER(len = *), OPTIONAL             , INTENT(IN) :: child_id
+
+      IF (PRESENT(child_id)) THEN
+         CALL cxios_xml_tree_add_generatedomaintodomain(parent_hdl%daddr, child_hdl%daddr, child_id, len(child_id))
+      ELSE
+         CALL cxios_xml_tree_add_generatedomaintodomain(parent_hdl%daddr, child_hdl%daddr, "NONE", -1)
+      END IF
+
+   END SUBROUTINE xios(add_generatedomaintodomain)
+
+   SUBROUTINE xios(add_computeconnectivitydomaintodomain)(parent_hdl, child_hdl, child_id)
+      TYPE(txios(domain))                      , INTENT(IN) :: parent_hdl
+      TYPE(txios(compute_connectivity_domain)) , INTENT(OUT):: child_hdl
+      CHARACTER(len = *), OPTIONAL             , INTENT(IN) :: child_id
+
+      IF (PRESENT(child_id)) THEN
+         CALL cxios_xml_tree_add_computeconnectivitydomaintodomain(parent_hdl%daddr, child_hdl%daddr, child_id, len(child_id))
+      ELSE
+         CALL cxios_xml_tree_add_computeconnectivitydomaintodomain(parent_hdl%daddr, child_hdl%daddr, "NONE", -1)
+      END IF
+
+   END SUBROUTINE xios(add_computeconnectivitydomaintodomain)
+
+   SUBROUTINE xios(add_expanddomaintodomain)(parent_hdl, child_hdl, child_id)
+      TYPE(txios(domain))                      , INTENT(IN) :: parent_hdl
+      TYPE(txios(expand_domain))               , INTENT(OUT):: child_hdl
+      CHARACTER(len = *), OPTIONAL             , INTENT(IN) :: child_id
+
+      IF (PRESENT(child_id)) THEN
+         CALL cxios_xml_tree_add_expanddomaintodomain(parent_hdl%daddr, child_hdl%daddr, child_id, len(child_id))
+      ELSE
+         CALL cxios_xml_tree_add_expanddomaintodomain(parent_hdl%daddr, child_hdl%daddr, "NONE", -1)
+      END IF
+
+   END SUBROUTINE xios(add_expanddomaintodomain)
+
+   !!!  AXIS
+   SUBROUTINE xios(add_zoomaxistoaxis)(parent_hdl, child_hdl, child_id)
+      TYPE(txios(axis))                      , INTENT(IN) :: parent_hdl
+      TYPE(txios(zoom_axis))                 , INTENT(OUT):: child_hdl
+      CHARACTER(len = *), OPTIONAL           , INTENT(IN) :: child_id
+
+      IF (PRESENT(child_id)) THEN
+         CALL cxios_xml_tree_add_zoomaxistoaxis(parent_hdl%daddr, child_hdl%daddr, child_id, len(child_id))
+      ELSE
+         CALL cxios_xml_tree_add_zoomaxistoaxis(parent_hdl%daddr, child_hdl%daddr, "NONE", -1)
+      END IF
+
+   END SUBROUTINE xios(add_zoomaxistoaxis)
+
+   SUBROUTINE xios(add_interpolateaxistoaxis)(parent_hdl, child_hdl, child_id)
+      TYPE(txios(axis))                      , INTENT(IN) :: parent_hdl
+      TYPE(txios(interpolate_axis))          , INTENT(OUT):: child_hdl
+      CHARACTER(len = *), OPTIONAL           , INTENT(IN) :: child_id
+
+      IF (PRESENT(child_id)) THEN
+         CALL cxios_xml_tree_add_interpolateaxistoaxis(parent_hdl%daddr, child_hdl%daddr, child_id, len(child_id))
+      ELSE
+         CALL cxios_xml_tree_add_interpolateaxistoaxis(parent_hdl%daddr, child_hdl%daddr, "NONE", -1)
+      END IF
+
+   END SUBROUTINE xios(add_interpolateaxistoaxis)
+
+   SUBROUTINE xios(add_inverseaxistoaxis)(parent_hdl, child_hdl, child_id)
+      TYPE(txios(axis))                      , INTENT(IN) :: parent_hdl
+      TYPE(txios(inverse_axis))              , INTENT(OUT):: child_hdl
+      CHARACTER(len = *), OPTIONAL           , INTENT(IN) :: child_id
+
+      IF (PRESENT(child_id)) THEN
+         CALL cxios_xml_tree_add_inverseaxistoaxis(parent_hdl%daddr, child_hdl%daddr, child_id, len(child_id))
+      ELSE
+         CALL cxios_xml_tree_add_inverseaxistoaxis(parent_hdl%daddr, child_hdl%daddr, "NONE", -1)
+      END IF
+
+   END SUBROUTINE xios(add_inverseaxistoaxis)
+
+   SUBROUTINE xios(add_reducedomaintoaxistoaxis)(parent_hdl, child_hdl, child_id)
+      TYPE(txios(axis))                        , INTENT(IN) :: parent_hdl
+      TYPE(txios(reduce_domain_to_axis))       , INTENT(OUT):: child_hdl
+      CHARACTER(len = *), OPTIONAL             , INTENT(IN) :: child_id
+
+      IF (PRESENT(child_id)) THEN
+         CALL cxios_xml_tree_add_reducedomaintoaxistoaxis(parent_hdl%daddr, child_hdl%daddr, child_id, len(child_id))
+      ELSE
+         CALL cxios_xml_tree_add_reducedomaintoaxistoaxis(parent_hdl%daddr, child_hdl%daddr, "NONE", -1)
+      END IF
+
+   END SUBROUTINE xios(add_reducedomaintoaxistoaxis)
+
+   SUBROUTINE xios(add_extractdomaintoaxistoaxis)(parent_hdl, child_hdl, child_id)
+      TYPE(txios(axis))                        , INTENT(IN) :: parent_hdl
+      TYPE(txios(extract_domain_to_axis))      , INTENT(OUT):: child_hdl
+      CHARACTER(len = *), OPTIONAL             , INTENT(IN) :: child_id
+
+      IF (PRESENT(child_id)) THEN
+         CALL cxios_xml_tree_add_extractdomaintoaxistoaxis(parent_hdl%daddr, child_hdl%daddr, child_id, len(child_id))
+      ELSE
+         CALL cxios_xml_tree_add_extractdomaintoaxistoaxis(parent_hdl%daddr, child_hdl%daddr, "NONE", -1)
+      END IF
+
+   END SUBROUTINE xios(add_extractdomaintoaxistoaxis)
+
+   !!! SCALAR
+   SUBROUTINE xios(add_reduceaxistoscalartoscalar)(parent_hdl, child_hdl, child_id)
+      TYPE(txios(scalar))                    , INTENT(IN) :: parent_hdl
+      TYPE(txios(reduce_axis_to_scalar))     , INTENT(OUT):: child_hdl
+      CHARACTER(len = *), OPTIONAL           , INTENT(IN) :: child_id
+
+      IF (PRESENT(child_id)) THEN
+         CALL cxios_xml_tree_add_reduceaxistoscalartoscalar(parent_hdl%daddr, child_hdl%daddr, child_id, len(child_id))
+      ELSE
+         CALL cxios_xml_tree_add_reduceaxistoscalartoscalar(parent_hdl%daddr, child_hdl%daddr, "NONE", -1)
+      END IF
+
+   END SUBROUTINE xios(add_reduceaxistoscalartoscalar)
+
+   SUBROUTINE xios(add_extractaxistoscalartoscalar)(parent_hdl, child_hdl, child_id)
+      TYPE(txios(scalar))                    , INTENT(IN) :: parent_hdl
+      TYPE(txios(extract_axis_to_scalar))    , INTENT(OUT):: child_hdl
+      CHARACTER(len = *), OPTIONAL           , INTENT(IN) :: child_id
+
+      IF (PRESENT(child_id)) THEN
+         CALL cxios_xml_tree_add_extractaxistoscalartoscalar(parent_hdl%daddr, child_hdl%daddr, child_id, len(child_id))
+      ELSE
+         CALL cxios_xml_tree_add_extractaxistoscalartoscalar(parent_hdl%daddr, child_hdl%daddr, "NONE", -1)
+      END IF
+
+   END SUBROUTINE xios(add_extractaxistoscalartoscalar)
+
+   SUBROUTINE xios(add_reducedomaintoscalartoscalar)(parent_hdl, child_hdl, child_id)
+      TYPE(txios(scalar))                      , INTENT(IN) :: parent_hdl
+      TYPE(txios(reduce_domain_to_scalar))     , INTENT(OUT):: child_hdl
+      CHARACTER(len = *), OPTIONAL             , INTENT(IN) :: child_id
+
+      IF (PRESENT(child_id)) THEN
+         CALL cxios_xml_tree_add_reducedomaintoscalartoscalar(parent_hdl%daddr, child_hdl%daddr, child_id, len(child_id))
+      ELSE
+         CALL cxios_xml_tree_add_reducedomaintoscalartoscalar(parent_hdl%daddr, child_hdl%daddr, "NONE", -1)
+      END IF
+
+   END SUBROUTINE xios(add_reducedomaintoscalartoscalar)
+
+END MODULE IXML_TREE
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/fortran/izoom_axis.F90
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/fortran/izoom_axis.F90	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/fortran/izoom_axis.F90	(revision 1749)
@@ -0,0 +1,30 @@
+#include "xios_fortran_prefix.hpp"
+
+MODULE IZOOM_AXIS
+   USE, INTRINSIC :: ISO_C_BINDING
+   USE ZOOM_AXIS_INTERFACE
+
+   TYPE txios(zoom_axis)
+      INTEGER(kind = C_INTPTR_T) :: daddr
+   END TYPE txios(zoom_axis)
+
+   CONTAINS ! Fonctions disponibles pour les utilisateurs.
+
+   SUBROUTINE xios(get_zoom_axis_handle)(idt,ret)
+      IMPLICIT NONE
+      CHARACTER(len = *), INTENT(IN) :: idt
+      TYPE(txios(zoom_axis)) , INTENT(OUT):: ret
+      CALL cxios_zoom_axis_handle_create(ret%daddr, idt, len(idt))
+   END SUBROUTINE xios(get_zoom_axis_handle)
+
+   LOGICAL FUNCTION xios(is_valid_zoom_axis)(idt)
+      IMPLICIT NONE
+      CHARACTER(len  = *)    , INTENT(IN) :: idt
+      LOGICAL  (kind = 1)                 :: val
+
+      CALL cxios_zoom_axis_valid_id(val, idt, len(idt))
+      xios(is_valid_zoom_axis) = val
+
+   END FUNCTION  xios(is_valid_zoom_axis)
+
+END MODULE IZOOM_AXIS
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/fortran/izoom_domain.F90
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/fortran/izoom_domain.F90	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/fortran/izoom_domain.F90	(revision 1749)
@@ -0,0 +1,30 @@
+#include "xios_fortran_prefix.hpp"
+
+MODULE IZOOM_DOMAIN
+   USE, INTRINSIC :: ISO_C_BINDING
+   USE ZOOM_DOMAIN_INTERFACE
+
+   TYPE txios(zoom_domain)
+      INTEGER(kind = C_INTPTR_T) :: daddr
+   END TYPE txios(zoom_domain)
+
+   CONTAINS ! Fonctions disponibles pour les utilisateurs.
+
+   SUBROUTINE xios(get_zoom_domain_handle)(idt,ret)
+      IMPLICIT NONE
+      CHARACTER(len = *), INTENT(IN) :: idt
+      TYPE(txios(zoom_domain)) , INTENT(OUT):: ret
+      CALL cxios_zoom_domain_handle_create(ret%daddr, idt, len(idt))
+   END SUBROUTINE xios(get_zoom_domain_handle)
+
+   LOGICAL FUNCTION xios(is_valid_zoom_domain)(idt)
+      IMPLICIT NONE
+      CHARACTER(len  = *)    , INTENT(IN) :: idt
+      LOGICAL  (kind = 1)                 :: val
+
+      CALL cxios_zoom_domain_valid_id(val, idt, len(idt))
+      xios(is_valid_zoom_domain) = val
+
+   END FUNCTION  xios(is_valid_zoom_domain)
+
+END MODULE IZOOM_DOMAIN
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/fortran/oasis_interface.F90
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/fortran/oasis_interface.F90	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/fortran/oasis_interface.F90	(revision 1749)
@@ -0,0 +1,141 @@
+SUBROUTINE fxios_oasis_init(server_id,str_len) BIND(C,NAME="fxios_oasis_init")
+  USE, INTRINSIC :: ISO_C_BINDING
+#ifdef USE_OASIS
+  USE mod_prism_proto
+#endif
+#ifdef USE_OMCT
+  USE mod_prism
+#endif
+    CHARACTER(kind = C_CHAR),DIMENSION(*) :: server_id
+    INTEGER(kind = C_INT),VALUE   :: str_len
+    
+    INTEGER                :: comp_id
+    CHARACTER(len=str_len) :: oasis_server_id
+    INTEGER                :: ierr
+    INTEGER :: i
+    
+    DO i=1,str_len
+      oasis_server_id(i:i)=server_id(i)
+    ENDDO
+
+#if defined USE_OASIS || defined USE_OMCT
+     CALL prism_init_comp_proto (comp_id, oasis_server_id, ierr)
+#endif
+    PRINT *,"---> prism_init",oasis_server_id,ierr
+
+END SUBROUTINE fxios_oasis_init
+
+SUBROUTINE fxios_oasis_enddef() BIND(C,NAME="fxios_oasis_enddef")
+  USE, INTRINSIC :: ISO_C_BINDING
+#ifdef USE_OMCT
+  USE mod_prism
+#endif
+  IMPLICIT NONE
+  INTEGER :: ierr
+#ifdef USE_OMCT
+     CALL prism_enddef_proto(ierr)
+#endif
+
+END SUBROUTINE fxios_oasis_enddef
+
+SUBROUTINE fxios_oasis_finalize() BIND(C,NAME="fxios_oasis_finalize")
+  USE, INTRINSIC :: ISO_C_BINDING
+#ifdef USE_OASIS
+  USE mod_prism_proto
+#endif
+#ifdef USE_OMCT
+  USE mod_prism
+#endif
+  IMPLICIT NONE
+  INTEGER :: ierr
+  
+#if defined USE_OASIS || defined USE_OMCT
+    CALL prism_terminate_proto(ierr)
+#endif
+    
+END SUBROUTINE fxios_oasis_finalize
+
+
+SUBROUTINE fxios_oasis_get_localcomm(f_comm) BIND(C,NAME="fxios_oasis_get_localcomm")
+  USE, INTRINSIC :: ISO_C_BINDING
+#ifdef USE_OASIS
+  USE mod_prism_get_localcomm_proto 
+#endif
+#ifdef USE_OMCT
+  USE mod_prism
+#endif 
+  IMPLICIT NONE
+  INTEGER(kind=C_INT) :: f_comm
+  
+  INTEGER :: comm
+  INTEGER :: ierr
+    
+#if defined USE_OASIS || defined USE_OMCT
+    CALL prism_get_localcomm_proto(comm,ierr)
+#endif
+    f_comm=comm
+
+END SUBROUTINE fxios_oasis_get_localcomm
+
+
+
+
+SUBROUTINE fxios_oasis_get_intracomm(f_comm_client_server,client_id,str_len) BIND(C,NAME="fxios_oasis_get_intracomm")
+  USE, INTRINSIC :: ISO_C_BINDING
+#ifdef USE_OASIS
+  USE mod_prism_get_comm 
+#endif
+#ifdef USE_OMCT
+  USE mod_prism
+#endif
+  IMPLICIT NONE
+  INTEGER(kind=C_INT) :: f_comm_client_server
+  CHARACTER,DIMENSION(*) :: client_id
+  INTEGER,VALUE          :: str_len
+  
+  INTEGER :: comm_client_server
+  CHARACTER(len=str_len) :: oasis_client_id
+  INTEGER :: ierr
+  INTEGER :: i
+    
+    DO i=1,str_len
+      oasis_client_id(i:i)=client_id(i)
+    ENDDO
+    
+#if defined USE_OASIS || defined USE_OMCT
+    CALL prism_get_intracomm(comm_client_server,oasis_client_id,ierr)
+#endif
+
+    f_comm_client_server=comm_client_server
+
+END SUBROUTINE fxios_oasis_get_intracomm
+
+SUBROUTINE fxios_oasis_get_intercomm(f_comm_client_server,client_id,str_len) BIND(C,NAME="fxios_oasis_get_intercomm")
+  USE, INTRINSIC :: ISO_C_BINDING
+#ifdef USE_OASIS
+  USE mod_prism_get_comm 
+#endif
+#ifdef USE_OMCT
+  USE mod_prism
+#endif
+  IMPLICIT NONE
+  INTEGER(kind=C_INT) :: f_comm_client_server
+  CHARACTER,DIMENSION(*) :: client_id
+  INTEGER,VALUE          :: str_len
+  
+  INTEGER :: comm_client_server
+  CHARACTER(len=str_len) :: oasis_client_id
+  INTEGER :: ierr
+  INTEGER :: i
+    
+    DO i=1,str_len
+      oasis_client_id(i:i)=client_id(i)
+    ENDDO
+    
+#if defined USE_OASIS || defined USE_OMCT
+    CALL prism_get_intercomm(comm_client_server,oasis_client_id,ierr)
+#endif
+
+    f_comm_client_server=comm_client_server
+
+END SUBROUTINE fxios_oasis_get_intercomm
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/fortran/reduce_axis_to_axis_interface.f90
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/fortran/reduce_axis_to_axis_interface.f90	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/fortran/reduce_axis_to_axis_interface.f90	(revision 1749)
@@ -0,0 +1,22 @@
+MODULE REDUCE_AXIS_TO_AXIS_INTERFACE
+   USE, INTRINSIC :: ISO_C_BINDING
+
+   INTERFACE ! Ne pas appeler directement/Interface FORTRAN 2003 <-> C99
+
+      SUBROUTINE cxios_reduce_axis_to_axis_handle_create(ret, idt, idt_size) BIND(C)
+         USE ISO_C_BINDING
+         INTEGER  (kind = C_INTPTR_T)               :: ret
+         CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: idt
+         INTEGER  (kind = C_INT)     , VALUE        :: idt_size
+      END SUBROUTINE cxios_reduce_axis_to_axis_handle_create
+
+      SUBROUTINE cxios_reduce_axis_to_axis_valid_id(ret, idt, idt_size) BIND(C)
+         USE ISO_C_BINDING
+         LOGICAL  (kind = C_BOOL)                   :: ret
+         CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: idt
+         INTEGER  (kind = C_INT)     , VALUE        :: idt_size
+      END SUBROUTINE cxios_reduce_axis_to_axis_valid_id
+
+   END INTERFACE
+
+END MODULE REDUCE_AXIS_TO_AXIS_INTERFACE
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/fortran/reduce_axis_to_scalar_interface.f90
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/fortran/reduce_axis_to_scalar_interface.f90	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/fortran/reduce_axis_to_scalar_interface.f90	(revision 1749)
@@ -0,0 +1,22 @@
+MODULE REDUCE_AXIS_TO_SCALAR_INTERFACE
+   USE, INTRINSIC :: ISO_C_BINDING
+
+   INTERFACE ! Ne pas appeler directement/Interface FORTRAN 2003 <-> C99
+
+      SUBROUTINE cxios_reduce_axis_to_scalar_handle_create(ret, idt, idt_size) BIND(C)
+         USE ISO_C_BINDING
+         INTEGER  (kind = C_INTPTR_T)               :: ret
+         CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: idt
+         INTEGER  (kind = C_INT)     , VALUE        :: idt_size
+      END SUBROUTINE cxios_reduce_axis_to_scalar_handle_create
+
+      SUBROUTINE cxios_reduce_axis_to_scalar_valid_id(ret, idt, idt_size) BIND(C)
+         USE ISO_C_BINDING
+         LOGICAL  (kind = C_BOOL)                   :: ret
+         CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: idt
+         INTEGER  (kind = C_INT)     , VALUE        :: idt_size
+      END SUBROUTINE cxios_reduce_axis_to_scalar_valid_id
+
+   END INTERFACE
+
+END MODULE REDUCE_AXIS_TO_SCALAR_INTERFACE
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/fortran/reduce_domain_to_axis_interface.f90
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/fortran/reduce_domain_to_axis_interface.f90	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/fortran/reduce_domain_to_axis_interface.f90	(revision 1749)
@@ -0,0 +1,22 @@
+MODULE REDUCE_DOMAIN_TO_AXIS_INTERFACE
+   USE, INTRINSIC :: ISO_C_BINDING
+
+   INTERFACE ! Ne pas appeler directement/Interface FORTRAN 2003 <-> C99
+
+      SUBROUTINE cxios_reduce_domain_to_axis_handle_create(ret, idt, idt_size) BIND(C)
+         USE ISO_C_BINDING
+         INTEGER  (kind = C_INTPTR_T)               :: ret
+         CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: idt
+         INTEGER  (kind = C_INT)     , VALUE        :: idt_size
+      END SUBROUTINE cxios_reduce_domain_to_axis_handle_create
+
+      SUBROUTINE cxios_reduce_domain_to_axis_valid_id(ret, idt, idt_size) BIND(C)
+         USE ISO_C_BINDING
+         LOGICAL  (kind = C_BOOL)                   :: ret
+         CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: idt
+         INTEGER  (kind = C_INT)     , VALUE        :: idt_size
+      END SUBROUTINE cxios_reduce_domain_to_axis_valid_id
+
+   END INTERFACE
+
+END MODULE REDUCE_DOMAIN_TO_AXIS_INTERFACE
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/fortran/reduce_domain_to_scalar_interface.f90
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/fortran/reduce_domain_to_scalar_interface.f90	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/fortran/reduce_domain_to_scalar_interface.f90	(revision 1749)
@@ -0,0 +1,22 @@
+MODULE REDUCE_DOMAIN_TO_SCALAR_INTERFACE
+   USE, INTRINSIC :: ISO_C_BINDING
+
+   INTERFACE ! Ne pas appeler directement/Interface FORTRAN 2003 <-> C99
+
+      SUBROUTINE cxios_reduce_domain_to_scalar_handle_create(ret, idt, idt_size) BIND(C)
+         USE ISO_C_BINDING
+         INTEGER  (kind = C_INTPTR_T)               :: ret
+         CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: idt
+         INTEGER  (kind = C_INT)     , VALUE        :: idt_size
+      END SUBROUTINE cxios_reduce_domain_to_scalar_handle_create
+
+      SUBROUTINE cxios_reduce_domain_to_scalar_valid_id(ret, idt, idt_size) BIND(C)
+         USE ISO_C_BINDING
+         LOGICAL  (kind = C_BOOL)                   :: ret
+         CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: idt
+         INTEGER  (kind = C_INT)     , VALUE        :: idt_size
+      END SUBROUTINE cxios_reduce_domain_to_scalar_valid_id
+
+   END INTERFACE
+
+END MODULE REDUCE_DOMAIN_TO_SCALAR_INTERFACE
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/fortran/reduce_scalar_to_scalar_interface.f90
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/fortran/reduce_scalar_to_scalar_interface.f90	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/fortran/reduce_scalar_to_scalar_interface.f90	(revision 1749)
@@ -0,0 +1,22 @@
+MODULE REDUCE_SCALAR_TO_SCALAR_INTERFACE
+   USE, INTRINSIC :: ISO_C_BINDING
+
+   INTERFACE ! Ne pas appeler directement/Interface FORTRAN 2003 <-> C99
+
+      SUBROUTINE cxios_reduce_scalar_to_scalar_handle_create(ret, idt, idt_size) BIND(C)
+         USE ISO_C_BINDING
+         INTEGER  (kind = C_INTPTR_T)               :: ret
+         CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: idt
+         INTEGER  (kind = C_INT)     , VALUE        :: idt_size
+      END SUBROUTINE cxios_reduce_scalar_to_scalar_handle_create
+
+      SUBROUTINE cxios_reduce_scalar_to_scalar_valid_id(ret, idt, idt_size) BIND(C)
+         USE ISO_C_BINDING
+         LOGICAL  (kind = C_BOOL)                   :: ret
+         CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: idt
+         INTEGER  (kind = C_INT)     , VALUE        :: idt_size
+      END SUBROUTINE cxios_reduce_scalar_to_scalar_valid_id
+
+   END INTERFACE
+
+END MODULE REDUCE_SCALAR_TO_SCALAR_INTERFACE
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/fortran/reorder_domain_interface.f90
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/fortran/reorder_domain_interface.f90	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/fortran/reorder_domain_interface.f90	(revision 1749)
@@ -0,0 +1,22 @@
+MODULE REORDER_DOMAIN_INTERFACE
+   USE, INTRINSIC :: ISO_C_BINDING
+
+   INTERFACE ! Ne pas appeler directement/Interface FORTRAN 2003 <-> C99
+
+      SUBROUTINE cxios_reorder_domain_handle_create(ret, idt, idt_size) BIND(C)
+         USE ISO_C_BINDING
+         INTEGER  (kind = C_INTPTR_T)               :: ret
+         CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: idt
+         INTEGER  (kind = C_INT)     , VALUE        :: idt_size
+      END SUBROUTINE cxios_reorder_domain_handle_create
+
+      SUBROUTINE cxios_reorder_domain_valid_id(ret, idt, idt_size) BIND(C)
+         USE ISO_C_BINDING
+         LOGICAL  (kind = C_BOOL)                   :: ret
+         CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: idt
+         INTEGER  (kind = C_INT)     , VALUE        :: idt_size
+      END SUBROUTINE cxios_reorder_domain_valid_id
+
+   END INTERFACE
+
+END MODULE REORDER_DOMAIN_INTERFACE
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/fortran/scalar_interface.f90
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/fortran/scalar_interface.f90	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/fortran/scalar_interface.f90	(revision 1749)
@@ -0,0 +1,22 @@
+MODULE SCALAR_INTERFACE
+   USE, INTRINSIC :: ISO_C_BINDING
+
+   INTERFACE ! Ne pas appeler directement/Interface FORTRAN 2003 <-> C99
+
+      SUBROUTINE cxios_scalar_handle_create(ret, idt, idt_size) BIND(C)
+         USE ISO_C_BINDING
+         INTEGER  (kind = C_INTPTR_T)               :: ret
+         CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: idt
+         INTEGER  (kind = C_INT)     , VALUE        :: idt_size
+      END SUBROUTINE cxios_scalar_handle_create
+
+      SUBROUTINE cxios_scalar_valid_id(ret, idt, idt_size) BIND(C)
+         USE ISO_C_BINDING
+         LOGICAL  (kind = C_BOOL)                   :: ret
+         CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: idt
+         INTEGER  (kind = C_INT)     , VALUE        :: idt_size
+      END SUBROUTINE cxios_scalar_valid_id
+
+   END INTERFACE
+
+END MODULE SCALAR_INTERFACE
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/fortran/scalargroup_interface.f90
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/fortran/scalargroup_interface.f90	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/fortran/scalargroup_interface.f90	(revision 1749)
@@ -0,0 +1,23 @@
+MODULE SCALARGROUP_INTERFACE
+   USE, INTRINSIC :: ISO_C_BINDING
+
+   INTERFACE ! Ne pas appeler directement/Interface FORTRAN 2003 <-> C99
+
+
+      SUBROUTINE cxios_scalargroup_handle_create(ret, idt, idt_size) BIND(C)
+         USE ISO_C_BINDING
+         INTEGER  (kind = C_INTPTR_T)               :: ret
+         CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: idt
+         INTEGER  (kind = C_INT)     , VALUE        :: idt_size
+      END SUBROUTINE cxios_scalargroup_handle_create
+
+      SUBROUTINE cxios_scalargroup_valid_id(ret, idt, idt_size) BIND(C)
+         USE ISO_C_BINDING
+         LOGICAL  (kind = C_BOOL)                   :: ret
+         CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: idt
+         INTEGER  (kind = C_INT)     , VALUE        :: idt_size
+      END SUBROUTINE cxios_scalargroup_valid_id
+
+   END INTERFACE
+
+END MODULE SCALARGROUP_INTERFACE
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/fortran/temporal_splitting_interface.f90
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/fortran/temporal_splitting_interface.f90	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/fortran/temporal_splitting_interface.f90	(revision 1749)
@@ -0,0 +1,22 @@
+MODULE TEMPORAL_SPLITTING_INTERFACE
+   USE, INTRINSIC :: ISO_C_BINDING
+
+   INTERFACE ! Ne pas appeler directement/Interface FORTRAN 2003 <-> C99
+
+      SUBROUTINE cxios_temporal_splitting_handle_create(ret, idt, idt_size) BIND(C)
+         USE ISO_C_BINDING
+         INTEGER  (kind = C_INTPTR_T)               :: ret
+         CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: idt
+         INTEGER  (kind = C_INT)     , VALUE        :: idt_size
+      END SUBROUTINE cxios_temporal_splitting_handle_create
+
+      SUBROUTINE cxios_temporal_splitting_valid_id(ret, idt, idt_size) BIND(C)
+         USE ISO_C_BINDING
+         LOGICAL  (kind = C_BOOL)                   :: ret
+         CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: idt
+         INTEGER  (kind = C_INT)     , VALUE        :: idt_size
+      END SUBROUTINE cxios_temporal_splitting_valid_id
+
+   END INTERFACE
+
+END MODULE TEMPORAL_SPLITTING_INTERFACE
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/fortran/variable_interface.f90
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/fortran/variable_interface.f90	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/fortran/variable_interface.f90	(revision 1749)
@@ -0,0 +1,22 @@
+MODULE VARIABLE_INTERFACE
+   USE, INTRINSIC :: ISO_C_BINDING
+     
+   INTERFACE ! Ne pas appeler directement/Interface FORTRAN 2003 <-> C99
+     
+      SUBROUTINE cxios_variable_handle_create(ret, idt, idt_size) BIND(C)
+         USE ISO_C_BINDING
+         INTEGER  (kind = C_INTPTR_T)               :: ret
+         CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: idt
+         INTEGER  (kind = C_INT)     , VALUE        :: idt_size
+      END SUBROUTINE cxios_variable_handle_create
+
+      SUBROUTINE cxios_variable_valid_id(ret, idt, idt_size) BIND(C)
+         USE ISO_C_BINDING
+         LOGICAL  (kind = C_BOOL)                   :: ret
+         CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: idt
+         INTEGER  (kind = C_INT)     , VALUE        :: idt_size
+      END SUBROUTINE cxios_variable_valid_id
+
+   END INTERFACE
+     
+END MODULE VARIABLE_INTERFACE
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/fortran/variablegroup_interface.f90
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/fortran/variablegroup_interface.f90	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/fortran/variablegroup_interface.f90	(revision 1749)
@@ -0,0 +1,23 @@
+MODULE VARIABLEGROUP_INTERFACE
+   USE, INTRINSIC :: ISO_C_BINDING
+     
+   INTERFACE ! Ne pas appeler directement/Interface FORTRAN 2003 <-> C99
+     
+  
+      SUBROUTINE cxios_variablegroup_handle_create(ret, idt, idt_size) BIND(C)
+         USE ISO_C_BINDING
+         INTEGER  (kind = C_INTPTR_T)               :: ret
+         CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: idt
+         INTEGER  (kind = C_INT)     , VALUE        :: idt_size
+      END SUBROUTINE cxios_variablegroup_handle_create
+
+      SUBROUTINE cxios_variablegroup_valid_id(ret, idt, idt_size) BIND(C)
+         USE ISO_C_BINDING
+         LOGICAL  (kind = C_BOOL)                   :: ret
+         CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: idt
+         INTEGER  (kind = C_INT)     , VALUE        :: idt_size
+      END SUBROUTINE cxios_variablegroup_valid_id
+
+   END INTERFACE
+     
+END MODULE VARIABLEGROUP_INTERFACE
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/fortran/xios_fortran_prefix.hpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/fortran/xios_fortran_prefix.hpp	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/fortran/xios_fortran_prefix.hpp	(revision 1749)
@@ -0,0 +1,7 @@
+#ifndef __XIOS_SUFFIX__
+#define __XIOS_SUFFIX__
+
+#define xios(arg) xios_##arg
+#define txios(arg) xios_##arg
+
+#endif
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/fortran/zoom_axis_interface.f90
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/fortran/zoom_axis_interface.f90	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/fortran/zoom_axis_interface.f90	(revision 1749)
@@ -0,0 +1,22 @@
+MODULE ZOOM_AXIS_INTERFACE
+   USE, INTRINSIC :: ISO_C_BINDING
+
+   INTERFACE ! Ne pas appeler directement/Interface FORTRAN 2003 <-> C99
+
+      SUBROUTINE cxios_zoom_axis_handle_create(ret, idt, idt_size) BIND(C)
+         USE ISO_C_BINDING
+         INTEGER  (kind = C_INTPTR_T)               :: ret
+         CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: idt
+         INTEGER  (kind = C_INT)     , VALUE        :: idt_size
+      END SUBROUTINE cxios_zoom_axis_handle_create
+
+      SUBROUTINE cxios_zoom_axis_valid_id(ret, idt, idt_size) BIND(C)
+         USE ISO_C_BINDING
+         LOGICAL  (kind = C_BOOL)                   :: ret
+         CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: idt
+         INTEGER  (kind = C_INT)     , VALUE        :: idt_size
+      END SUBROUTINE cxios_zoom_axis_valid_id
+
+   END INTERFACE
+
+END MODULE ZOOM_AXIS_INTERFACE
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/fortran/zoom_domain_interface.f90
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/fortran/zoom_domain_interface.f90	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/fortran/zoom_domain_interface.f90	(revision 1749)
@@ -0,0 +1,22 @@
+MODULE ZOOM_DOMAIN_INTERFACE
+   USE, INTRINSIC :: ISO_C_BINDING
+
+   INTERFACE ! Ne pas appeler directement/Interface FORTRAN 2003 <-> C99
+
+      SUBROUTINE cxios_zoom_domain_handle_create(ret, idt, idt_size) BIND(C)
+         USE ISO_C_BINDING
+         INTEGER  (kind = C_INTPTR_T)               :: ret
+         CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: idt
+         INTEGER  (kind = C_INT)     , VALUE        :: idt_size
+      END SUBROUTINE cxios_zoom_domain_handle_create
+
+      SUBROUTINE cxios_zoom_domain_valid_id(ret, idt, idt_size) BIND(C)
+         USE ISO_C_BINDING
+         LOGICAL  (kind = C_BOOL)                   :: ret
+         CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: idt
+         INTEGER  (kind = C_INT)     , VALUE        :: idt_size
+      END SUBROUTINE cxios_zoom_domain_valid_id
+
+   END INTERFACE
+
+END MODULE ZOOM_DOMAIN_INTERFACE
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/fortran_attr/axis_interface_attr.F90
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/fortran_attr/axis_interface_attr.F90	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/fortran_attr/axis_interface_attr.F90	(revision 1749)
@@ -0,0 +1,569 @@
+! * ************************************************************************** *
+! *               Interface auto generated - do not modify                     *
+! * ************************************************************************** *
+#include "../fortran/xios_fortran_prefix.hpp"
+
+MODULE axis_interface_attr
+  USE, INTRINSIC :: ISO_C_BINDING
+
+  INTERFACE
+    ! Do not call directly / interface FORTRAN 2003 <-> C99
+
+    SUBROUTINE cxios_set_axis_axis_ref(axis_hdl, axis_ref, axis_ref_size) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: axis_hdl
+      CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: axis_ref
+      INTEGER  (kind = C_INT)     , VALUE        :: axis_ref_size
+    END SUBROUTINE cxios_set_axis_axis_ref
+
+    SUBROUTINE cxios_get_axis_axis_ref(axis_hdl, axis_ref, axis_ref_size) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: axis_hdl
+      CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: axis_ref
+      INTEGER  (kind = C_INT)     , VALUE        :: axis_ref_size
+    END SUBROUTINE cxios_get_axis_axis_ref
+
+    FUNCTION cxios_is_defined_axis_axis_ref(axis_hdl) BIND(C)
+      USE ISO_C_BINDING
+      LOGICAL(kind=C_BOOL) :: cxios_is_defined_axis_axis_ref
+      INTEGER (kind = C_INTPTR_T), VALUE :: axis_hdl
+    END FUNCTION cxios_is_defined_axis_axis_ref
+
+
+    SUBROUTINE cxios_set_axis_axis_type(axis_hdl, axis_type, axis_type_size) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: axis_hdl
+      CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: axis_type
+      INTEGER  (kind = C_INT)     , VALUE        :: axis_type_size
+    END SUBROUTINE cxios_set_axis_axis_type
+
+    SUBROUTINE cxios_get_axis_axis_type(axis_hdl, axis_type, axis_type_size) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: axis_hdl
+      CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: axis_type
+      INTEGER  (kind = C_INT)     , VALUE        :: axis_type_size
+    END SUBROUTINE cxios_get_axis_axis_type
+
+    FUNCTION cxios_is_defined_axis_axis_type(axis_hdl) BIND(C)
+      USE ISO_C_BINDING
+      LOGICAL(kind=C_BOOL) :: cxios_is_defined_axis_axis_type
+      INTEGER (kind = C_INTPTR_T), VALUE :: axis_hdl
+    END FUNCTION cxios_is_defined_axis_axis_type
+
+
+    SUBROUTINE cxios_set_axis_begin(axis_hdl, begin) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: axis_hdl
+      INTEGER (KIND=C_INT)      , VALUE :: begin
+    END SUBROUTINE cxios_set_axis_begin
+
+    SUBROUTINE cxios_get_axis_begin(axis_hdl, begin) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: axis_hdl
+      INTEGER (KIND=C_INT)             :: begin
+    END SUBROUTINE cxios_get_axis_begin
+
+    FUNCTION cxios_is_defined_axis_begin(axis_hdl) BIND(C)
+      USE ISO_C_BINDING
+      LOGICAL(kind=C_BOOL) :: cxios_is_defined_axis_begin
+      INTEGER (kind = C_INTPTR_T), VALUE :: axis_hdl
+    END FUNCTION cxios_is_defined_axis_begin
+
+
+    SUBROUTINE cxios_set_axis_bounds(axis_hdl, bounds, extent) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE       :: axis_hdl
+      REAL (KIND=C_DOUBLE)     , DIMENSION(*) :: bounds
+      INTEGER (kind = C_INT), DIMENSION(*)     :: extent
+    END SUBROUTINE cxios_set_axis_bounds
+
+    SUBROUTINE cxios_get_axis_bounds(axis_hdl, bounds, extent) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE       :: axis_hdl
+      REAL (KIND=C_DOUBLE)     , DIMENSION(*) :: bounds
+      INTEGER (kind = C_INT), DIMENSION(*)     :: extent
+    END SUBROUTINE cxios_get_axis_bounds
+
+    FUNCTION cxios_is_defined_axis_bounds(axis_hdl) BIND(C)
+      USE ISO_C_BINDING
+      LOGICAL(kind=C_BOOL) :: cxios_is_defined_axis_bounds
+      INTEGER (kind = C_INTPTR_T), VALUE :: axis_hdl
+    END FUNCTION cxios_is_defined_axis_bounds
+
+
+    SUBROUTINE cxios_set_axis_bounds_name(axis_hdl, bounds_name, bounds_name_size) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: axis_hdl
+      CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: bounds_name
+      INTEGER  (kind = C_INT)     , VALUE        :: bounds_name_size
+    END SUBROUTINE cxios_set_axis_bounds_name
+
+    SUBROUTINE cxios_get_axis_bounds_name(axis_hdl, bounds_name, bounds_name_size) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: axis_hdl
+      CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: bounds_name
+      INTEGER  (kind = C_INT)     , VALUE        :: bounds_name_size
+    END SUBROUTINE cxios_get_axis_bounds_name
+
+    FUNCTION cxios_is_defined_axis_bounds_name(axis_hdl) BIND(C)
+      USE ISO_C_BINDING
+      LOGICAL(kind=C_BOOL) :: cxios_is_defined_axis_bounds_name
+      INTEGER (kind = C_INTPTR_T), VALUE :: axis_hdl
+    END FUNCTION cxios_is_defined_axis_bounds_name
+
+
+    SUBROUTINE cxios_set_axis_comment(axis_hdl, comment, comment_size) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: axis_hdl
+      CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: comment
+      INTEGER  (kind = C_INT)     , VALUE        :: comment_size
+    END SUBROUTINE cxios_set_axis_comment
+
+    SUBROUTINE cxios_get_axis_comment(axis_hdl, comment, comment_size) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: axis_hdl
+      CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: comment
+      INTEGER  (kind = C_INT)     , VALUE        :: comment_size
+    END SUBROUTINE cxios_get_axis_comment
+
+    FUNCTION cxios_is_defined_axis_comment(axis_hdl) BIND(C)
+      USE ISO_C_BINDING
+      LOGICAL(kind=C_BOOL) :: cxios_is_defined_axis_comment
+      INTEGER (kind = C_INTPTR_T), VALUE :: axis_hdl
+    END FUNCTION cxios_is_defined_axis_comment
+
+
+    SUBROUTINE cxios_set_axis_data_begin(axis_hdl, data_begin) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: axis_hdl
+      INTEGER (KIND=C_INT)      , VALUE :: data_begin
+    END SUBROUTINE cxios_set_axis_data_begin
+
+    SUBROUTINE cxios_get_axis_data_begin(axis_hdl, data_begin) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: axis_hdl
+      INTEGER (KIND=C_INT)             :: data_begin
+    END SUBROUTINE cxios_get_axis_data_begin
+
+    FUNCTION cxios_is_defined_axis_data_begin(axis_hdl) BIND(C)
+      USE ISO_C_BINDING
+      LOGICAL(kind=C_BOOL) :: cxios_is_defined_axis_data_begin
+      INTEGER (kind = C_INTPTR_T), VALUE :: axis_hdl
+    END FUNCTION cxios_is_defined_axis_data_begin
+
+
+    SUBROUTINE cxios_set_axis_data_index(axis_hdl, data_index, extent) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE       :: axis_hdl
+      INTEGER (KIND=C_INT)     , DIMENSION(*) :: data_index
+      INTEGER (kind = C_INT), DIMENSION(*)     :: extent
+    END SUBROUTINE cxios_set_axis_data_index
+
+    SUBROUTINE cxios_get_axis_data_index(axis_hdl, data_index, extent) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE       :: axis_hdl
+      INTEGER (KIND=C_INT)     , DIMENSION(*) :: data_index
+      INTEGER (kind = C_INT), DIMENSION(*)     :: extent
+    END SUBROUTINE cxios_get_axis_data_index
+
+    FUNCTION cxios_is_defined_axis_data_index(axis_hdl) BIND(C)
+      USE ISO_C_BINDING
+      LOGICAL(kind=C_BOOL) :: cxios_is_defined_axis_data_index
+      INTEGER (kind = C_INTPTR_T), VALUE :: axis_hdl
+    END FUNCTION cxios_is_defined_axis_data_index
+
+
+    SUBROUTINE cxios_set_axis_data_n(axis_hdl, data_n) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: axis_hdl
+      INTEGER (KIND=C_INT)      , VALUE :: data_n
+    END SUBROUTINE cxios_set_axis_data_n
+
+    SUBROUTINE cxios_get_axis_data_n(axis_hdl, data_n) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: axis_hdl
+      INTEGER (KIND=C_INT)             :: data_n
+    END SUBROUTINE cxios_get_axis_data_n
+
+    FUNCTION cxios_is_defined_axis_data_n(axis_hdl) BIND(C)
+      USE ISO_C_BINDING
+      LOGICAL(kind=C_BOOL) :: cxios_is_defined_axis_data_n
+      INTEGER (kind = C_INTPTR_T), VALUE :: axis_hdl
+    END FUNCTION cxios_is_defined_axis_data_n
+
+
+    SUBROUTINE cxios_set_axis_dim_name(axis_hdl, dim_name, dim_name_size) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: axis_hdl
+      CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: dim_name
+      INTEGER  (kind = C_INT)     , VALUE        :: dim_name_size
+    END SUBROUTINE cxios_set_axis_dim_name
+
+    SUBROUTINE cxios_get_axis_dim_name(axis_hdl, dim_name, dim_name_size) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: axis_hdl
+      CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: dim_name
+      INTEGER  (kind = C_INT)     , VALUE        :: dim_name_size
+    END SUBROUTINE cxios_get_axis_dim_name
+
+    FUNCTION cxios_is_defined_axis_dim_name(axis_hdl) BIND(C)
+      USE ISO_C_BINDING
+      LOGICAL(kind=C_BOOL) :: cxios_is_defined_axis_dim_name
+      INTEGER (kind = C_INTPTR_T), VALUE :: axis_hdl
+    END FUNCTION cxios_is_defined_axis_dim_name
+
+
+    SUBROUTINE cxios_set_axis_formula(axis_hdl, formula, formula_size) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: axis_hdl
+      CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: formula
+      INTEGER  (kind = C_INT)     , VALUE        :: formula_size
+    END SUBROUTINE cxios_set_axis_formula
+
+    SUBROUTINE cxios_get_axis_formula(axis_hdl, formula, formula_size) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: axis_hdl
+      CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: formula
+      INTEGER  (kind = C_INT)     , VALUE        :: formula_size
+    END SUBROUTINE cxios_get_axis_formula
+
+    FUNCTION cxios_is_defined_axis_formula(axis_hdl) BIND(C)
+      USE ISO_C_BINDING
+      LOGICAL(kind=C_BOOL) :: cxios_is_defined_axis_formula
+      INTEGER (kind = C_INTPTR_T), VALUE :: axis_hdl
+    END FUNCTION cxios_is_defined_axis_formula
+
+
+    SUBROUTINE cxios_set_axis_formula_bounds(axis_hdl, formula_bounds, formula_bounds_size) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: axis_hdl
+      CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: formula_bounds
+      INTEGER  (kind = C_INT)     , VALUE        :: formula_bounds_size
+    END SUBROUTINE cxios_set_axis_formula_bounds
+
+    SUBROUTINE cxios_get_axis_formula_bounds(axis_hdl, formula_bounds, formula_bounds_size) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: axis_hdl
+      CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: formula_bounds
+      INTEGER  (kind = C_INT)     , VALUE        :: formula_bounds_size
+    END SUBROUTINE cxios_get_axis_formula_bounds
+
+    FUNCTION cxios_is_defined_axis_formula_bounds(axis_hdl) BIND(C)
+      USE ISO_C_BINDING
+      LOGICAL(kind=C_BOOL) :: cxios_is_defined_axis_formula_bounds
+      INTEGER (kind = C_INTPTR_T), VALUE :: axis_hdl
+    END FUNCTION cxios_is_defined_axis_formula_bounds
+
+
+    SUBROUTINE cxios_set_axis_formula_term(axis_hdl, formula_term, formula_term_size) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: axis_hdl
+      CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: formula_term
+      INTEGER  (kind = C_INT)     , VALUE        :: formula_term_size
+    END SUBROUTINE cxios_set_axis_formula_term
+
+    SUBROUTINE cxios_get_axis_formula_term(axis_hdl, formula_term, formula_term_size) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: axis_hdl
+      CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: formula_term
+      INTEGER  (kind = C_INT)     , VALUE        :: formula_term_size
+    END SUBROUTINE cxios_get_axis_formula_term
+
+    FUNCTION cxios_is_defined_axis_formula_term(axis_hdl) BIND(C)
+      USE ISO_C_BINDING
+      LOGICAL(kind=C_BOOL) :: cxios_is_defined_axis_formula_term
+      INTEGER (kind = C_INTPTR_T), VALUE :: axis_hdl
+    END FUNCTION cxios_is_defined_axis_formula_term
+
+
+    SUBROUTINE cxios_set_axis_formula_term_bounds(axis_hdl, formula_term_bounds, formula_term_bounds_size) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: axis_hdl
+      CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: formula_term_bounds
+      INTEGER  (kind = C_INT)     , VALUE        :: formula_term_bounds_size
+    END SUBROUTINE cxios_set_axis_formula_term_bounds
+
+    SUBROUTINE cxios_get_axis_formula_term_bounds(axis_hdl, formula_term_bounds, formula_term_bounds_size) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: axis_hdl
+      CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: formula_term_bounds
+      INTEGER  (kind = C_INT)     , VALUE        :: formula_term_bounds_size
+    END SUBROUTINE cxios_get_axis_formula_term_bounds
+
+    FUNCTION cxios_is_defined_axis_formula_term_bounds(axis_hdl) BIND(C)
+      USE ISO_C_BINDING
+      LOGICAL(kind=C_BOOL) :: cxios_is_defined_axis_formula_term_bounds
+      INTEGER (kind = C_INTPTR_T), VALUE :: axis_hdl
+    END FUNCTION cxios_is_defined_axis_formula_term_bounds
+
+
+    SUBROUTINE cxios_set_axis_index(axis_hdl, index, extent) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE       :: axis_hdl
+      INTEGER (KIND=C_INT)     , DIMENSION(*) :: index
+      INTEGER (kind = C_INT), DIMENSION(*)     :: extent
+    END SUBROUTINE cxios_set_axis_index
+
+    SUBROUTINE cxios_get_axis_index(axis_hdl, index, extent) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE       :: axis_hdl
+      INTEGER (KIND=C_INT)     , DIMENSION(*) :: index
+      INTEGER (kind = C_INT), DIMENSION(*)     :: extent
+    END SUBROUTINE cxios_get_axis_index
+
+    FUNCTION cxios_is_defined_axis_index(axis_hdl) BIND(C)
+      USE ISO_C_BINDING
+      LOGICAL(kind=C_BOOL) :: cxios_is_defined_axis_index
+      INTEGER (kind = C_INTPTR_T), VALUE :: axis_hdl
+    END FUNCTION cxios_is_defined_axis_index
+
+
+    SUBROUTINE cxios_set_axis_label(axis_hdl, label, str_len, str_size, extent) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE       :: axis_hdl
+      CHARACTER (KIND=C_CHAR), DIMENSION(*)    :: label
+      INTEGER (kind = C_INT), VALUE            :: str_len
+      INTEGER (kind = C_INT), DIMENSION(*)     :: str_size
+      INTEGER (kind = C_INT), DIMENSION(*)     :: extent
+    END SUBROUTINE cxios_set_axis_label
+
+    SUBROUTINE cxios_get_axis_label(axis_hdl, label, str_size, extent) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE       :: axis_hdl
+      CHARACTER (KIND=C_CHAR), DIMENSION(*)    :: label
+      INTEGER (kind = C_INT), VALUE            :: str_size
+      INTEGER (kind = C_INT), DIMENSION(*)     :: extent
+    END SUBROUTINE cxios_get_axis_label
+
+    FUNCTION cxios_is_defined_axis_label(axis_hdl) BIND(C)
+      USE ISO_C_BINDING
+      LOGICAL(kind=C_BOOL) :: cxios_is_defined_axis_label
+      INTEGER (kind = C_INTPTR_T), VALUE :: axis_hdl
+    END FUNCTION cxios_is_defined_axis_label
+
+
+    SUBROUTINE cxios_set_axis_long_name(axis_hdl, long_name, long_name_size) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: axis_hdl
+      CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: long_name
+      INTEGER  (kind = C_INT)     , VALUE        :: long_name_size
+    END SUBROUTINE cxios_set_axis_long_name
+
+    SUBROUTINE cxios_get_axis_long_name(axis_hdl, long_name, long_name_size) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: axis_hdl
+      CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: long_name
+      INTEGER  (kind = C_INT)     , VALUE        :: long_name_size
+    END SUBROUTINE cxios_get_axis_long_name
+
+    FUNCTION cxios_is_defined_axis_long_name(axis_hdl) BIND(C)
+      USE ISO_C_BINDING
+      LOGICAL(kind=C_BOOL) :: cxios_is_defined_axis_long_name
+      INTEGER (kind = C_INTPTR_T), VALUE :: axis_hdl
+    END FUNCTION cxios_is_defined_axis_long_name
+
+
+    SUBROUTINE cxios_set_axis_mask(axis_hdl, mask, extent) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE       :: axis_hdl
+      LOGICAL (KIND=C_BOOL)     , DIMENSION(*) :: mask
+      INTEGER (kind = C_INT), DIMENSION(*)     :: extent
+    END SUBROUTINE cxios_set_axis_mask
+
+    SUBROUTINE cxios_get_axis_mask(axis_hdl, mask, extent) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE       :: axis_hdl
+      LOGICAL (KIND=C_BOOL)     , DIMENSION(*) :: mask
+      INTEGER (kind = C_INT), DIMENSION(*)     :: extent
+    END SUBROUTINE cxios_get_axis_mask
+
+    FUNCTION cxios_is_defined_axis_mask(axis_hdl) BIND(C)
+      USE ISO_C_BINDING
+      LOGICAL(kind=C_BOOL) :: cxios_is_defined_axis_mask
+      INTEGER (kind = C_INTPTR_T), VALUE :: axis_hdl
+    END FUNCTION cxios_is_defined_axis_mask
+
+
+    SUBROUTINE cxios_set_axis_n(axis_hdl, n) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: axis_hdl
+      INTEGER (KIND=C_INT)      , VALUE :: n
+    END SUBROUTINE cxios_set_axis_n
+
+    SUBROUTINE cxios_get_axis_n(axis_hdl, n) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: axis_hdl
+      INTEGER (KIND=C_INT)             :: n
+    END SUBROUTINE cxios_get_axis_n
+
+    FUNCTION cxios_is_defined_axis_n(axis_hdl) BIND(C)
+      USE ISO_C_BINDING
+      LOGICAL(kind=C_BOOL) :: cxios_is_defined_axis_n
+      INTEGER (kind = C_INTPTR_T), VALUE :: axis_hdl
+    END FUNCTION cxios_is_defined_axis_n
+
+
+    SUBROUTINE cxios_set_axis_n_distributed_partition(axis_hdl, n_distributed_partition) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: axis_hdl
+      INTEGER (KIND=C_INT)      , VALUE :: n_distributed_partition
+    END SUBROUTINE cxios_set_axis_n_distributed_partition
+
+    SUBROUTINE cxios_get_axis_n_distributed_partition(axis_hdl, n_distributed_partition) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: axis_hdl
+      INTEGER (KIND=C_INT)             :: n_distributed_partition
+    END SUBROUTINE cxios_get_axis_n_distributed_partition
+
+    FUNCTION cxios_is_defined_axis_n_distributed_partition(axis_hdl) BIND(C)
+      USE ISO_C_BINDING
+      LOGICAL(kind=C_BOOL) :: cxios_is_defined_axis_n_distributed_partition
+      INTEGER (kind = C_INTPTR_T), VALUE :: axis_hdl
+    END FUNCTION cxios_is_defined_axis_n_distributed_partition
+
+
+    SUBROUTINE cxios_set_axis_n_glo(axis_hdl, n_glo) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: axis_hdl
+      INTEGER (KIND=C_INT)      , VALUE :: n_glo
+    END SUBROUTINE cxios_set_axis_n_glo
+
+    SUBROUTINE cxios_get_axis_n_glo(axis_hdl, n_glo) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: axis_hdl
+      INTEGER (KIND=C_INT)             :: n_glo
+    END SUBROUTINE cxios_get_axis_n_glo
+
+    FUNCTION cxios_is_defined_axis_n_glo(axis_hdl) BIND(C)
+      USE ISO_C_BINDING
+      LOGICAL(kind=C_BOOL) :: cxios_is_defined_axis_n_glo
+      INTEGER (kind = C_INTPTR_T), VALUE :: axis_hdl
+    END FUNCTION cxios_is_defined_axis_n_glo
+
+
+    SUBROUTINE cxios_set_axis_name(axis_hdl, name, name_size) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: axis_hdl
+      CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: name
+      INTEGER  (kind = C_INT)     , VALUE        :: name_size
+    END SUBROUTINE cxios_set_axis_name
+
+    SUBROUTINE cxios_get_axis_name(axis_hdl, name, name_size) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: axis_hdl
+      CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: name
+      INTEGER  (kind = C_INT)     , VALUE        :: name_size
+    END SUBROUTINE cxios_get_axis_name
+
+    FUNCTION cxios_is_defined_axis_name(axis_hdl) BIND(C)
+      USE ISO_C_BINDING
+      LOGICAL(kind=C_BOOL) :: cxios_is_defined_axis_name
+      INTEGER (kind = C_INTPTR_T), VALUE :: axis_hdl
+    END FUNCTION cxios_is_defined_axis_name
+
+
+    SUBROUTINE cxios_set_axis_positive(axis_hdl, positive, positive_size) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: axis_hdl
+      CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: positive
+      INTEGER  (kind = C_INT)     , VALUE        :: positive_size
+    END SUBROUTINE cxios_set_axis_positive
+
+    SUBROUTINE cxios_get_axis_positive(axis_hdl, positive, positive_size) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: axis_hdl
+      CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: positive
+      INTEGER  (kind = C_INT)     , VALUE        :: positive_size
+    END SUBROUTINE cxios_get_axis_positive
+
+    FUNCTION cxios_is_defined_axis_positive(axis_hdl) BIND(C)
+      USE ISO_C_BINDING
+      LOGICAL(kind=C_BOOL) :: cxios_is_defined_axis_positive
+      INTEGER (kind = C_INTPTR_T), VALUE :: axis_hdl
+    END FUNCTION cxios_is_defined_axis_positive
+
+
+    SUBROUTINE cxios_set_axis_prec(axis_hdl, prec) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: axis_hdl
+      INTEGER (KIND=C_INT)      , VALUE :: prec
+    END SUBROUTINE cxios_set_axis_prec
+
+    SUBROUTINE cxios_get_axis_prec(axis_hdl, prec) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: axis_hdl
+      INTEGER (KIND=C_INT)             :: prec
+    END SUBROUTINE cxios_get_axis_prec
+
+    FUNCTION cxios_is_defined_axis_prec(axis_hdl) BIND(C)
+      USE ISO_C_BINDING
+      LOGICAL(kind=C_BOOL) :: cxios_is_defined_axis_prec
+      INTEGER (kind = C_INTPTR_T), VALUE :: axis_hdl
+    END FUNCTION cxios_is_defined_axis_prec
+
+
+    SUBROUTINE cxios_set_axis_standard_name(axis_hdl, standard_name, standard_name_size) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: axis_hdl
+      CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: standard_name
+      INTEGER  (kind = C_INT)     , VALUE        :: standard_name_size
+    END SUBROUTINE cxios_set_axis_standard_name
+
+    SUBROUTINE cxios_get_axis_standard_name(axis_hdl, standard_name, standard_name_size) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: axis_hdl
+      CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: standard_name
+      INTEGER  (kind = C_INT)     , VALUE        :: standard_name_size
+    END SUBROUTINE cxios_get_axis_standard_name
+
+    FUNCTION cxios_is_defined_axis_standard_name(axis_hdl) BIND(C)
+      USE ISO_C_BINDING
+      LOGICAL(kind=C_BOOL) :: cxios_is_defined_axis_standard_name
+      INTEGER (kind = C_INTPTR_T), VALUE :: axis_hdl
+    END FUNCTION cxios_is_defined_axis_standard_name
+
+
+    SUBROUTINE cxios_set_axis_unit(axis_hdl, unit, unit_size) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: axis_hdl
+      CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: unit
+      INTEGER  (kind = C_INT)     , VALUE        :: unit_size
+    END SUBROUTINE cxios_set_axis_unit
+
+    SUBROUTINE cxios_get_axis_unit(axis_hdl, unit, unit_size) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: axis_hdl
+      CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: unit
+      INTEGER  (kind = C_INT)     , VALUE        :: unit_size
+    END SUBROUTINE cxios_get_axis_unit
+
+    FUNCTION cxios_is_defined_axis_unit(axis_hdl) BIND(C)
+      USE ISO_C_BINDING
+      LOGICAL(kind=C_BOOL) :: cxios_is_defined_axis_unit
+      INTEGER (kind = C_INTPTR_T), VALUE :: axis_hdl
+    END FUNCTION cxios_is_defined_axis_unit
+
+
+    SUBROUTINE cxios_set_axis_value(axis_hdl, value, extent) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE       :: axis_hdl
+      REAL (KIND=C_DOUBLE)     , DIMENSION(*) :: value
+      INTEGER (kind = C_INT), DIMENSION(*)     :: extent
+    END SUBROUTINE cxios_set_axis_value
+
+    SUBROUTINE cxios_get_axis_value(axis_hdl, value, extent) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE       :: axis_hdl
+      REAL (KIND=C_DOUBLE)     , DIMENSION(*) :: value
+      INTEGER (kind = C_INT), DIMENSION(*)     :: extent
+    END SUBROUTINE cxios_get_axis_value
+
+    FUNCTION cxios_is_defined_axis_value(axis_hdl) BIND(C)
+      USE ISO_C_BINDING
+      LOGICAL(kind=C_BOOL) :: cxios_is_defined_axis_value
+      INTEGER (kind = C_INTPTR_T), VALUE :: axis_hdl
+    END FUNCTION cxios_is_defined_axis_value
+
+  END INTERFACE
+
+END MODULE axis_interface_attr
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/fortran_attr/axisgroup_interface_attr.F90
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/fortran_attr/axisgroup_interface_attr.F90	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/fortran_attr/axisgroup_interface_attr.F90	(revision 1749)
@@ -0,0 +1,590 @@
+! * ************************************************************************** *
+! *               Interface auto generated - do not modify                     *
+! * ************************************************************************** *
+#include "../fortran/xios_fortran_prefix.hpp"
+
+MODULE axisgroup_interface_attr
+  USE, INTRINSIC :: ISO_C_BINDING
+
+  INTERFACE
+    ! Do not call directly / interface FORTRAN 2003 <-> C99
+
+    SUBROUTINE cxios_set_axisgroup_axis_ref(axisgroup_hdl, axis_ref, axis_ref_size) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: axisgroup_hdl
+      CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: axis_ref
+      INTEGER  (kind = C_INT)     , VALUE        :: axis_ref_size
+    END SUBROUTINE cxios_set_axisgroup_axis_ref
+
+    SUBROUTINE cxios_get_axisgroup_axis_ref(axisgroup_hdl, axis_ref, axis_ref_size) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: axisgroup_hdl
+      CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: axis_ref
+      INTEGER  (kind = C_INT)     , VALUE        :: axis_ref_size
+    END SUBROUTINE cxios_get_axisgroup_axis_ref
+
+    FUNCTION cxios_is_defined_axisgroup_axis_ref(axisgroup_hdl) BIND(C)
+      USE ISO_C_BINDING
+      LOGICAL(kind=C_BOOL) :: cxios_is_defined_axisgroup_axis_ref
+      INTEGER (kind = C_INTPTR_T), VALUE :: axisgroup_hdl
+    END FUNCTION cxios_is_defined_axisgroup_axis_ref
+
+
+    SUBROUTINE cxios_set_axisgroup_axis_type(axisgroup_hdl, axis_type, axis_type_size) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: axisgroup_hdl
+      CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: axis_type
+      INTEGER  (kind = C_INT)     , VALUE        :: axis_type_size
+    END SUBROUTINE cxios_set_axisgroup_axis_type
+
+    SUBROUTINE cxios_get_axisgroup_axis_type(axisgroup_hdl, axis_type, axis_type_size) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: axisgroup_hdl
+      CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: axis_type
+      INTEGER  (kind = C_INT)     , VALUE        :: axis_type_size
+    END SUBROUTINE cxios_get_axisgroup_axis_type
+
+    FUNCTION cxios_is_defined_axisgroup_axis_type(axisgroup_hdl) BIND(C)
+      USE ISO_C_BINDING
+      LOGICAL(kind=C_BOOL) :: cxios_is_defined_axisgroup_axis_type
+      INTEGER (kind = C_INTPTR_T), VALUE :: axisgroup_hdl
+    END FUNCTION cxios_is_defined_axisgroup_axis_type
+
+
+    SUBROUTINE cxios_set_axisgroup_begin(axisgroup_hdl, begin) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: axisgroup_hdl
+      INTEGER (KIND=C_INT)      , VALUE :: begin
+    END SUBROUTINE cxios_set_axisgroup_begin
+
+    SUBROUTINE cxios_get_axisgroup_begin(axisgroup_hdl, begin) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: axisgroup_hdl
+      INTEGER (KIND=C_INT)             :: begin
+    END SUBROUTINE cxios_get_axisgroup_begin
+
+    FUNCTION cxios_is_defined_axisgroup_begin(axisgroup_hdl) BIND(C)
+      USE ISO_C_BINDING
+      LOGICAL(kind=C_BOOL) :: cxios_is_defined_axisgroup_begin
+      INTEGER (kind = C_INTPTR_T), VALUE :: axisgroup_hdl
+    END FUNCTION cxios_is_defined_axisgroup_begin
+
+
+    SUBROUTINE cxios_set_axisgroup_bounds(axisgroup_hdl, bounds, extent) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE       :: axisgroup_hdl
+      REAL (KIND=C_DOUBLE)     , DIMENSION(*) :: bounds
+      INTEGER (kind = C_INT), DIMENSION(*)     :: extent
+    END SUBROUTINE cxios_set_axisgroup_bounds
+
+    SUBROUTINE cxios_get_axisgroup_bounds(axisgroup_hdl, bounds, extent) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE       :: axisgroup_hdl
+      REAL (KIND=C_DOUBLE)     , DIMENSION(*) :: bounds
+      INTEGER (kind = C_INT), DIMENSION(*)     :: extent
+    END SUBROUTINE cxios_get_axisgroup_bounds
+
+    FUNCTION cxios_is_defined_axisgroup_bounds(axisgroup_hdl) BIND(C)
+      USE ISO_C_BINDING
+      LOGICAL(kind=C_BOOL) :: cxios_is_defined_axisgroup_bounds
+      INTEGER (kind = C_INTPTR_T), VALUE :: axisgroup_hdl
+    END FUNCTION cxios_is_defined_axisgroup_bounds
+
+
+    SUBROUTINE cxios_set_axisgroup_bounds_name(axisgroup_hdl, bounds_name, bounds_name_size) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: axisgroup_hdl
+      CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: bounds_name
+      INTEGER  (kind = C_INT)     , VALUE        :: bounds_name_size
+    END SUBROUTINE cxios_set_axisgroup_bounds_name
+
+    SUBROUTINE cxios_get_axisgroup_bounds_name(axisgroup_hdl, bounds_name, bounds_name_size) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: axisgroup_hdl
+      CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: bounds_name
+      INTEGER  (kind = C_INT)     , VALUE        :: bounds_name_size
+    END SUBROUTINE cxios_get_axisgroup_bounds_name
+
+    FUNCTION cxios_is_defined_axisgroup_bounds_name(axisgroup_hdl) BIND(C)
+      USE ISO_C_BINDING
+      LOGICAL(kind=C_BOOL) :: cxios_is_defined_axisgroup_bounds_name
+      INTEGER (kind = C_INTPTR_T), VALUE :: axisgroup_hdl
+    END FUNCTION cxios_is_defined_axisgroup_bounds_name
+
+
+    SUBROUTINE cxios_set_axisgroup_comment(axisgroup_hdl, comment, comment_size) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: axisgroup_hdl
+      CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: comment
+      INTEGER  (kind = C_INT)     , VALUE        :: comment_size
+    END SUBROUTINE cxios_set_axisgroup_comment
+
+    SUBROUTINE cxios_get_axisgroup_comment(axisgroup_hdl, comment, comment_size) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: axisgroup_hdl
+      CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: comment
+      INTEGER  (kind = C_INT)     , VALUE        :: comment_size
+    END SUBROUTINE cxios_get_axisgroup_comment
+
+    FUNCTION cxios_is_defined_axisgroup_comment(axisgroup_hdl) BIND(C)
+      USE ISO_C_BINDING
+      LOGICAL(kind=C_BOOL) :: cxios_is_defined_axisgroup_comment
+      INTEGER (kind = C_INTPTR_T), VALUE :: axisgroup_hdl
+    END FUNCTION cxios_is_defined_axisgroup_comment
+
+
+    SUBROUTINE cxios_set_axisgroup_data_begin(axisgroup_hdl, data_begin) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: axisgroup_hdl
+      INTEGER (KIND=C_INT)      , VALUE :: data_begin
+    END SUBROUTINE cxios_set_axisgroup_data_begin
+
+    SUBROUTINE cxios_get_axisgroup_data_begin(axisgroup_hdl, data_begin) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: axisgroup_hdl
+      INTEGER (KIND=C_INT)             :: data_begin
+    END SUBROUTINE cxios_get_axisgroup_data_begin
+
+    FUNCTION cxios_is_defined_axisgroup_data_begin(axisgroup_hdl) BIND(C)
+      USE ISO_C_BINDING
+      LOGICAL(kind=C_BOOL) :: cxios_is_defined_axisgroup_data_begin
+      INTEGER (kind = C_INTPTR_T), VALUE :: axisgroup_hdl
+    END FUNCTION cxios_is_defined_axisgroup_data_begin
+
+
+    SUBROUTINE cxios_set_axisgroup_data_index(axisgroup_hdl, data_index, extent) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE       :: axisgroup_hdl
+      INTEGER (KIND=C_INT)     , DIMENSION(*) :: data_index
+      INTEGER (kind = C_INT), DIMENSION(*)     :: extent
+    END SUBROUTINE cxios_set_axisgroup_data_index
+
+    SUBROUTINE cxios_get_axisgroup_data_index(axisgroup_hdl, data_index, extent) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE       :: axisgroup_hdl
+      INTEGER (KIND=C_INT)     , DIMENSION(*) :: data_index
+      INTEGER (kind = C_INT), DIMENSION(*)     :: extent
+    END SUBROUTINE cxios_get_axisgroup_data_index
+
+    FUNCTION cxios_is_defined_axisgroup_data_index(axisgroup_hdl) BIND(C)
+      USE ISO_C_BINDING
+      LOGICAL(kind=C_BOOL) :: cxios_is_defined_axisgroup_data_index
+      INTEGER (kind = C_INTPTR_T), VALUE :: axisgroup_hdl
+    END FUNCTION cxios_is_defined_axisgroup_data_index
+
+
+    SUBROUTINE cxios_set_axisgroup_data_n(axisgroup_hdl, data_n) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: axisgroup_hdl
+      INTEGER (KIND=C_INT)      , VALUE :: data_n
+    END SUBROUTINE cxios_set_axisgroup_data_n
+
+    SUBROUTINE cxios_get_axisgroup_data_n(axisgroup_hdl, data_n) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: axisgroup_hdl
+      INTEGER (KIND=C_INT)             :: data_n
+    END SUBROUTINE cxios_get_axisgroup_data_n
+
+    FUNCTION cxios_is_defined_axisgroup_data_n(axisgroup_hdl) BIND(C)
+      USE ISO_C_BINDING
+      LOGICAL(kind=C_BOOL) :: cxios_is_defined_axisgroup_data_n
+      INTEGER (kind = C_INTPTR_T), VALUE :: axisgroup_hdl
+    END FUNCTION cxios_is_defined_axisgroup_data_n
+
+
+    SUBROUTINE cxios_set_axisgroup_dim_name(axisgroup_hdl, dim_name, dim_name_size) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: axisgroup_hdl
+      CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: dim_name
+      INTEGER  (kind = C_INT)     , VALUE        :: dim_name_size
+    END SUBROUTINE cxios_set_axisgroup_dim_name
+
+    SUBROUTINE cxios_get_axisgroup_dim_name(axisgroup_hdl, dim_name, dim_name_size) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: axisgroup_hdl
+      CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: dim_name
+      INTEGER  (kind = C_INT)     , VALUE        :: dim_name_size
+    END SUBROUTINE cxios_get_axisgroup_dim_name
+
+    FUNCTION cxios_is_defined_axisgroup_dim_name(axisgroup_hdl) BIND(C)
+      USE ISO_C_BINDING
+      LOGICAL(kind=C_BOOL) :: cxios_is_defined_axisgroup_dim_name
+      INTEGER (kind = C_INTPTR_T), VALUE :: axisgroup_hdl
+    END FUNCTION cxios_is_defined_axisgroup_dim_name
+
+
+    SUBROUTINE cxios_set_axisgroup_formula(axisgroup_hdl, formula, formula_size) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: axisgroup_hdl
+      CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: formula
+      INTEGER  (kind = C_INT)     , VALUE        :: formula_size
+    END SUBROUTINE cxios_set_axisgroup_formula
+
+    SUBROUTINE cxios_get_axisgroup_formula(axisgroup_hdl, formula, formula_size) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: axisgroup_hdl
+      CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: formula
+      INTEGER  (kind = C_INT)     , VALUE        :: formula_size
+    END SUBROUTINE cxios_get_axisgroup_formula
+
+    FUNCTION cxios_is_defined_axisgroup_formula(axisgroup_hdl) BIND(C)
+      USE ISO_C_BINDING
+      LOGICAL(kind=C_BOOL) :: cxios_is_defined_axisgroup_formula
+      INTEGER (kind = C_INTPTR_T), VALUE :: axisgroup_hdl
+    END FUNCTION cxios_is_defined_axisgroup_formula
+
+
+    SUBROUTINE cxios_set_axisgroup_formula_bounds(axisgroup_hdl, formula_bounds, formula_bounds_size) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: axisgroup_hdl
+      CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: formula_bounds
+      INTEGER  (kind = C_INT)     , VALUE        :: formula_bounds_size
+    END SUBROUTINE cxios_set_axisgroup_formula_bounds
+
+    SUBROUTINE cxios_get_axisgroup_formula_bounds(axisgroup_hdl, formula_bounds, formula_bounds_size) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: axisgroup_hdl
+      CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: formula_bounds
+      INTEGER  (kind = C_INT)     , VALUE        :: formula_bounds_size
+    END SUBROUTINE cxios_get_axisgroup_formula_bounds
+
+    FUNCTION cxios_is_defined_axisgroup_formula_bounds(axisgroup_hdl) BIND(C)
+      USE ISO_C_BINDING
+      LOGICAL(kind=C_BOOL) :: cxios_is_defined_axisgroup_formula_bounds
+      INTEGER (kind = C_INTPTR_T), VALUE :: axisgroup_hdl
+    END FUNCTION cxios_is_defined_axisgroup_formula_bounds
+
+
+    SUBROUTINE cxios_set_axisgroup_formula_term(axisgroup_hdl, formula_term, formula_term_size) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: axisgroup_hdl
+      CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: formula_term
+      INTEGER  (kind = C_INT)     , VALUE        :: formula_term_size
+    END SUBROUTINE cxios_set_axisgroup_formula_term
+
+    SUBROUTINE cxios_get_axisgroup_formula_term(axisgroup_hdl, formula_term, formula_term_size) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: axisgroup_hdl
+      CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: formula_term
+      INTEGER  (kind = C_INT)     , VALUE        :: formula_term_size
+    END SUBROUTINE cxios_get_axisgroup_formula_term
+
+    FUNCTION cxios_is_defined_axisgroup_formula_term(axisgroup_hdl) BIND(C)
+      USE ISO_C_BINDING
+      LOGICAL(kind=C_BOOL) :: cxios_is_defined_axisgroup_formula_term
+      INTEGER (kind = C_INTPTR_T), VALUE :: axisgroup_hdl
+    END FUNCTION cxios_is_defined_axisgroup_formula_term
+
+
+    SUBROUTINE cxios_set_axisgroup_formula_term_bounds(axisgroup_hdl, formula_term_bounds, formula_term_bounds_size) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: axisgroup_hdl
+      CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: formula_term_bounds
+      INTEGER  (kind = C_INT)     , VALUE        :: formula_term_bounds_size
+    END SUBROUTINE cxios_set_axisgroup_formula_term_bounds
+
+    SUBROUTINE cxios_get_axisgroup_formula_term_bounds(axisgroup_hdl, formula_term_bounds, formula_term_bounds_size) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: axisgroup_hdl
+      CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: formula_term_bounds
+      INTEGER  (kind = C_INT)     , VALUE        :: formula_term_bounds_size
+    END SUBROUTINE cxios_get_axisgroup_formula_term_bounds
+
+    FUNCTION cxios_is_defined_axisgroup_formula_term_bounds(axisgroup_hdl) BIND(C)
+      USE ISO_C_BINDING
+      LOGICAL(kind=C_BOOL) :: cxios_is_defined_axisgroup_formula_term_bounds
+      INTEGER (kind = C_INTPTR_T), VALUE :: axisgroup_hdl
+    END FUNCTION cxios_is_defined_axisgroup_formula_term_bounds
+
+
+    SUBROUTINE cxios_set_axisgroup_group_ref(axisgroup_hdl, group_ref, group_ref_size) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: axisgroup_hdl
+      CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: group_ref
+      INTEGER  (kind = C_INT)     , VALUE        :: group_ref_size
+    END SUBROUTINE cxios_set_axisgroup_group_ref
+
+    SUBROUTINE cxios_get_axisgroup_group_ref(axisgroup_hdl, group_ref, group_ref_size) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: axisgroup_hdl
+      CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: group_ref
+      INTEGER  (kind = C_INT)     , VALUE        :: group_ref_size
+    END SUBROUTINE cxios_get_axisgroup_group_ref
+
+    FUNCTION cxios_is_defined_axisgroup_group_ref(axisgroup_hdl) BIND(C)
+      USE ISO_C_BINDING
+      LOGICAL(kind=C_BOOL) :: cxios_is_defined_axisgroup_group_ref
+      INTEGER (kind = C_INTPTR_T), VALUE :: axisgroup_hdl
+    END FUNCTION cxios_is_defined_axisgroup_group_ref
+
+
+    SUBROUTINE cxios_set_axisgroup_index(axisgroup_hdl, index, extent) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE       :: axisgroup_hdl
+      INTEGER (KIND=C_INT)     , DIMENSION(*) :: index
+      INTEGER (kind = C_INT), DIMENSION(*)     :: extent
+    END SUBROUTINE cxios_set_axisgroup_index
+
+    SUBROUTINE cxios_get_axisgroup_index(axisgroup_hdl, index, extent) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE       :: axisgroup_hdl
+      INTEGER (KIND=C_INT)     , DIMENSION(*) :: index
+      INTEGER (kind = C_INT), DIMENSION(*)     :: extent
+    END SUBROUTINE cxios_get_axisgroup_index
+
+    FUNCTION cxios_is_defined_axisgroup_index(axisgroup_hdl) BIND(C)
+      USE ISO_C_BINDING
+      LOGICAL(kind=C_BOOL) :: cxios_is_defined_axisgroup_index
+      INTEGER (kind = C_INTPTR_T), VALUE :: axisgroup_hdl
+    END FUNCTION cxios_is_defined_axisgroup_index
+
+
+    SUBROUTINE cxios_set_axisgroup_label(axisgroup_hdl, label, str_len, str_size, extent) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE       :: axisgroup_hdl
+      CHARACTER (KIND=C_CHAR), DIMENSION(*)    :: label
+      INTEGER (kind = C_INT), VALUE            :: str_len
+      INTEGER (kind = C_INT), DIMENSION(*)     :: str_size
+      INTEGER (kind = C_INT), DIMENSION(*)     :: extent
+    END SUBROUTINE cxios_set_axisgroup_label
+
+    SUBROUTINE cxios_get_axisgroup_label(axisgroup_hdl, label, str_size, extent) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE       :: axisgroup_hdl
+      CHARACTER (KIND=C_CHAR), DIMENSION(*)    :: label
+      INTEGER (kind = C_INT), VALUE            :: str_size
+      INTEGER (kind = C_INT), DIMENSION(*)     :: extent
+    END SUBROUTINE cxios_get_axisgroup_label
+
+    FUNCTION cxios_is_defined_axisgroup_label(axisgroup_hdl) BIND(C)
+      USE ISO_C_BINDING
+      LOGICAL(kind=C_BOOL) :: cxios_is_defined_axisgroup_label
+      INTEGER (kind = C_INTPTR_T), VALUE :: axisgroup_hdl
+    END FUNCTION cxios_is_defined_axisgroup_label
+
+
+    SUBROUTINE cxios_set_axisgroup_long_name(axisgroup_hdl, long_name, long_name_size) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: axisgroup_hdl
+      CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: long_name
+      INTEGER  (kind = C_INT)     , VALUE        :: long_name_size
+    END SUBROUTINE cxios_set_axisgroup_long_name
+
+    SUBROUTINE cxios_get_axisgroup_long_name(axisgroup_hdl, long_name, long_name_size) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: axisgroup_hdl
+      CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: long_name
+      INTEGER  (kind = C_INT)     , VALUE        :: long_name_size
+    END SUBROUTINE cxios_get_axisgroup_long_name
+
+    FUNCTION cxios_is_defined_axisgroup_long_name(axisgroup_hdl) BIND(C)
+      USE ISO_C_BINDING
+      LOGICAL(kind=C_BOOL) :: cxios_is_defined_axisgroup_long_name
+      INTEGER (kind = C_INTPTR_T), VALUE :: axisgroup_hdl
+    END FUNCTION cxios_is_defined_axisgroup_long_name
+
+
+    SUBROUTINE cxios_set_axisgroup_mask(axisgroup_hdl, mask, extent) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE       :: axisgroup_hdl
+      LOGICAL (KIND=C_BOOL)     , DIMENSION(*) :: mask
+      INTEGER (kind = C_INT), DIMENSION(*)     :: extent
+    END SUBROUTINE cxios_set_axisgroup_mask
+
+    SUBROUTINE cxios_get_axisgroup_mask(axisgroup_hdl, mask, extent) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE       :: axisgroup_hdl
+      LOGICAL (KIND=C_BOOL)     , DIMENSION(*) :: mask
+      INTEGER (kind = C_INT), DIMENSION(*)     :: extent
+    END SUBROUTINE cxios_get_axisgroup_mask
+
+    FUNCTION cxios_is_defined_axisgroup_mask(axisgroup_hdl) BIND(C)
+      USE ISO_C_BINDING
+      LOGICAL(kind=C_BOOL) :: cxios_is_defined_axisgroup_mask
+      INTEGER (kind = C_INTPTR_T), VALUE :: axisgroup_hdl
+    END FUNCTION cxios_is_defined_axisgroup_mask
+
+
+    SUBROUTINE cxios_set_axisgroup_n(axisgroup_hdl, n) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: axisgroup_hdl
+      INTEGER (KIND=C_INT)      , VALUE :: n
+    END SUBROUTINE cxios_set_axisgroup_n
+
+    SUBROUTINE cxios_get_axisgroup_n(axisgroup_hdl, n) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: axisgroup_hdl
+      INTEGER (KIND=C_INT)             :: n
+    END SUBROUTINE cxios_get_axisgroup_n
+
+    FUNCTION cxios_is_defined_axisgroup_n(axisgroup_hdl) BIND(C)
+      USE ISO_C_BINDING
+      LOGICAL(kind=C_BOOL) :: cxios_is_defined_axisgroup_n
+      INTEGER (kind = C_INTPTR_T), VALUE :: axisgroup_hdl
+    END FUNCTION cxios_is_defined_axisgroup_n
+
+
+    SUBROUTINE cxios_set_axisgroup_n_distributed_partition(axisgroup_hdl, n_distributed_partition) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: axisgroup_hdl
+      INTEGER (KIND=C_INT)      , VALUE :: n_distributed_partition
+    END SUBROUTINE cxios_set_axisgroup_n_distributed_partition
+
+    SUBROUTINE cxios_get_axisgroup_n_distributed_partition(axisgroup_hdl, n_distributed_partition) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: axisgroup_hdl
+      INTEGER (KIND=C_INT)             :: n_distributed_partition
+    END SUBROUTINE cxios_get_axisgroup_n_distributed_partition
+
+    FUNCTION cxios_is_defined_axisgroup_n_distributed_partition(axisgroup_hdl) BIND(C)
+      USE ISO_C_BINDING
+      LOGICAL(kind=C_BOOL) :: cxios_is_defined_axisgroup_n_distributed_partition
+      INTEGER (kind = C_INTPTR_T), VALUE :: axisgroup_hdl
+    END FUNCTION cxios_is_defined_axisgroup_n_distributed_partition
+
+
+    SUBROUTINE cxios_set_axisgroup_n_glo(axisgroup_hdl, n_glo) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: axisgroup_hdl
+      INTEGER (KIND=C_INT)      , VALUE :: n_glo
+    END SUBROUTINE cxios_set_axisgroup_n_glo
+
+    SUBROUTINE cxios_get_axisgroup_n_glo(axisgroup_hdl, n_glo) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: axisgroup_hdl
+      INTEGER (KIND=C_INT)             :: n_glo
+    END SUBROUTINE cxios_get_axisgroup_n_glo
+
+    FUNCTION cxios_is_defined_axisgroup_n_glo(axisgroup_hdl) BIND(C)
+      USE ISO_C_BINDING
+      LOGICAL(kind=C_BOOL) :: cxios_is_defined_axisgroup_n_glo
+      INTEGER (kind = C_INTPTR_T), VALUE :: axisgroup_hdl
+    END FUNCTION cxios_is_defined_axisgroup_n_glo
+
+
+    SUBROUTINE cxios_set_axisgroup_name(axisgroup_hdl, name, name_size) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: axisgroup_hdl
+      CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: name
+      INTEGER  (kind = C_INT)     , VALUE        :: name_size
+    END SUBROUTINE cxios_set_axisgroup_name
+
+    SUBROUTINE cxios_get_axisgroup_name(axisgroup_hdl, name, name_size) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: axisgroup_hdl
+      CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: name
+      INTEGER  (kind = C_INT)     , VALUE        :: name_size
+    END SUBROUTINE cxios_get_axisgroup_name
+
+    FUNCTION cxios_is_defined_axisgroup_name(axisgroup_hdl) BIND(C)
+      USE ISO_C_BINDING
+      LOGICAL(kind=C_BOOL) :: cxios_is_defined_axisgroup_name
+      INTEGER (kind = C_INTPTR_T), VALUE :: axisgroup_hdl
+    END FUNCTION cxios_is_defined_axisgroup_name
+
+
+    SUBROUTINE cxios_set_axisgroup_positive(axisgroup_hdl, positive, positive_size) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: axisgroup_hdl
+      CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: positive
+      INTEGER  (kind = C_INT)     , VALUE        :: positive_size
+    END SUBROUTINE cxios_set_axisgroup_positive
+
+    SUBROUTINE cxios_get_axisgroup_positive(axisgroup_hdl, positive, positive_size) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: axisgroup_hdl
+      CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: positive
+      INTEGER  (kind = C_INT)     , VALUE        :: positive_size
+    END SUBROUTINE cxios_get_axisgroup_positive
+
+    FUNCTION cxios_is_defined_axisgroup_positive(axisgroup_hdl) BIND(C)
+      USE ISO_C_BINDING
+      LOGICAL(kind=C_BOOL) :: cxios_is_defined_axisgroup_positive
+      INTEGER (kind = C_INTPTR_T), VALUE :: axisgroup_hdl
+    END FUNCTION cxios_is_defined_axisgroup_positive
+
+
+    SUBROUTINE cxios_set_axisgroup_prec(axisgroup_hdl, prec) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: axisgroup_hdl
+      INTEGER (KIND=C_INT)      , VALUE :: prec
+    END SUBROUTINE cxios_set_axisgroup_prec
+
+    SUBROUTINE cxios_get_axisgroup_prec(axisgroup_hdl, prec) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: axisgroup_hdl
+      INTEGER (KIND=C_INT)             :: prec
+    END SUBROUTINE cxios_get_axisgroup_prec
+
+    FUNCTION cxios_is_defined_axisgroup_prec(axisgroup_hdl) BIND(C)
+      USE ISO_C_BINDING
+      LOGICAL(kind=C_BOOL) :: cxios_is_defined_axisgroup_prec
+      INTEGER (kind = C_INTPTR_T), VALUE :: axisgroup_hdl
+    END FUNCTION cxios_is_defined_axisgroup_prec
+
+
+    SUBROUTINE cxios_set_axisgroup_standard_name(axisgroup_hdl, standard_name, standard_name_size) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: axisgroup_hdl
+      CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: standard_name
+      INTEGER  (kind = C_INT)     , VALUE        :: standard_name_size
+    END SUBROUTINE cxios_set_axisgroup_standard_name
+
+    SUBROUTINE cxios_get_axisgroup_standard_name(axisgroup_hdl, standard_name, standard_name_size) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: axisgroup_hdl
+      CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: standard_name
+      INTEGER  (kind = C_INT)     , VALUE        :: standard_name_size
+    END SUBROUTINE cxios_get_axisgroup_standard_name
+
+    FUNCTION cxios_is_defined_axisgroup_standard_name(axisgroup_hdl) BIND(C)
+      USE ISO_C_BINDING
+      LOGICAL(kind=C_BOOL) :: cxios_is_defined_axisgroup_standard_name
+      INTEGER (kind = C_INTPTR_T), VALUE :: axisgroup_hdl
+    END FUNCTION cxios_is_defined_axisgroup_standard_name
+
+
+    SUBROUTINE cxios_set_axisgroup_unit(axisgroup_hdl, unit, unit_size) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: axisgroup_hdl
+      CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: unit
+      INTEGER  (kind = C_INT)     , VALUE        :: unit_size
+    END SUBROUTINE cxios_set_axisgroup_unit
+
+    SUBROUTINE cxios_get_axisgroup_unit(axisgroup_hdl, unit, unit_size) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: axisgroup_hdl
+      CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: unit
+      INTEGER  (kind = C_INT)     , VALUE        :: unit_size
+    END SUBROUTINE cxios_get_axisgroup_unit
+
+    FUNCTION cxios_is_defined_axisgroup_unit(axisgroup_hdl) BIND(C)
+      USE ISO_C_BINDING
+      LOGICAL(kind=C_BOOL) :: cxios_is_defined_axisgroup_unit
+      INTEGER (kind = C_INTPTR_T), VALUE :: axisgroup_hdl
+    END FUNCTION cxios_is_defined_axisgroup_unit
+
+
+    SUBROUTINE cxios_set_axisgroup_value(axisgroup_hdl, value, extent) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE       :: axisgroup_hdl
+      REAL (KIND=C_DOUBLE)     , DIMENSION(*) :: value
+      INTEGER (kind = C_INT), DIMENSION(*)     :: extent
+    END SUBROUTINE cxios_set_axisgroup_value
+
+    SUBROUTINE cxios_get_axisgroup_value(axisgroup_hdl, value, extent) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE       :: axisgroup_hdl
+      REAL (KIND=C_DOUBLE)     , DIMENSION(*) :: value
+      INTEGER (kind = C_INT), DIMENSION(*)     :: extent
+    END SUBROUTINE cxios_get_axisgroup_value
+
+    FUNCTION cxios_is_defined_axisgroup_value(axisgroup_hdl) BIND(C)
+      USE ISO_C_BINDING
+      LOGICAL(kind=C_BOOL) :: cxios_is_defined_axisgroup_value
+      INTEGER (kind = C_INTPTR_T), VALUE :: axisgroup_hdl
+    END FUNCTION cxios_is_defined_axisgroup_value
+
+  END INTERFACE
+
+END MODULE axisgroup_interface_attr
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/fortran_attr/calendar_wrapper_interface_attr.F90
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/fortran_attr/calendar_wrapper_interface_attr.F90	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/fortran_attr/calendar_wrapper_interface_attr.F90	(revision 1749)
@@ -0,0 +1,234 @@
+! * ************************************************************************** *
+! *               Interface auto generated - do not modify                     *
+! * ************************************************************************** *
+#include "../fortran/xios_fortran_prefix.hpp"
+
+MODULE calendar_wrapper_interface_attr
+  USE, INTRINSIC :: ISO_C_BINDING
+
+  INTERFACE
+    ! Do not call directly / interface FORTRAN 2003 <-> C99
+
+    SUBROUTINE cxios_set_calendar_wrapper_comment(calendar_wrapper_hdl, comment, comment_size) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: calendar_wrapper_hdl
+      CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: comment
+      INTEGER  (kind = C_INT)     , VALUE        :: comment_size
+    END SUBROUTINE cxios_set_calendar_wrapper_comment
+
+    SUBROUTINE cxios_get_calendar_wrapper_comment(calendar_wrapper_hdl, comment, comment_size) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: calendar_wrapper_hdl
+      CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: comment
+      INTEGER  (kind = C_INT)     , VALUE        :: comment_size
+    END SUBROUTINE cxios_get_calendar_wrapper_comment
+
+    FUNCTION cxios_is_defined_calendar_wrapper_comment(calendar_wrapper_hdl) BIND(C)
+      USE ISO_C_BINDING
+      LOGICAL(kind=C_BOOL) :: cxios_is_defined_calendar_wrapper_comment
+      INTEGER (kind = C_INTPTR_T), VALUE :: calendar_wrapper_hdl
+    END FUNCTION cxios_is_defined_calendar_wrapper_comment
+
+
+    SUBROUTINE cxios_set_calendar_wrapper_day_length(calendar_wrapper_hdl, day_length) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: calendar_wrapper_hdl
+      INTEGER (KIND=C_INT)      , VALUE :: day_length
+    END SUBROUTINE cxios_set_calendar_wrapper_day_length
+
+    SUBROUTINE cxios_get_calendar_wrapper_day_length(calendar_wrapper_hdl, day_length) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: calendar_wrapper_hdl
+      INTEGER (KIND=C_INT)             :: day_length
+    END SUBROUTINE cxios_get_calendar_wrapper_day_length
+
+    FUNCTION cxios_is_defined_calendar_wrapper_day_length(calendar_wrapper_hdl) BIND(C)
+      USE ISO_C_BINDING
+      LOGICAL(kind=C_BOOL) :: cxios_is_defined_calendar_wrapper_day_length
+      INTEGER (kind = C_INTPTR_T), VALUE :: calendar_wrapper_hdl
+    END FUNCTION cxios_is_defined_calendar_wrapper_day_length
+
+
+    SUBROUTINE cxios_set_calendar_wrapper_leap_year_drift(calendar_wrapper_hdl, leap_year_drift) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: calendar_wrapper_hdl
+      REAL (KIND=C_DOUBLE)      , VALUE :: leap_year_drift
+    END SUBROUTINE cxios_set_calendar_wrapper_leap_year_drift
+
+    SUBROUTINE cxios_get_calendar_wrapper_leap_year_drift(calendar_wrapper_hdl, leap_year_drift) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: calendar_wrapper_hdl
+      REAL (KIND=C_DOUBLE)             :: leap_year_drift
+    END SUBROUTINE cxios_get_calendar_wrapper_leap_year_drift
+
+    FUNCTION cxios_is_defined_calendar_wrapper_leap_year_drift(calendar_wrapper_hdl) BIND(C)
+      USE ISO_C_BINDING
+      LOGICAL(kind=C_BOOL) :: cxios_is_defined_calendar_wrapper_leap_year_drift
+      INTEGER (kind = C_INTPTR_T), VALUE :: calendar_wrapper_hdl
+    END FUNCTION cxios_is_defined_calendar_wrapper_leap_year_drift
+
+
+    SUBROUTINE cxios_set_calendar_wrapper_leap_year_drift_offset(calendar_wrapper_hdl, leap_year_drift_offset) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: calendar_wrapper_hdl
+      REAL (KIND=C_DOUBLE)      , VALUE :: leap_year_drift_offset
+    END SUBROUTINE cxios_set_calendar_wrapper_leap_year_drift_offset
+
+    SUBROUTINE cxios_get_calendar_wrapper_leap_year_drift_offset(calendar_wrapper_hdl, leap_year_drift_offset) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: calendar_wrapper_hdl
+      REAL (KIND=C_DOUBLE)             :: leap_year_drift_offset
+    END SUBROUTINE cxios_get_calendar_wrapper_leap_year_drift_offset
+
+    FUNCTION cxios_is_defined_calendar_wrapper_leap_year_drift_offset(calendar_wrapper_hdl) BIND(C)
+      USE ISO_C_BINDING
+      LOGICAL(kind=C_BOOL) :: cxios_is_defined_calendar_wrapper_leap_year_drift_offset
+      INTEGER (kind = C_INTPTR_T), VALUE :: calendar_wrapper_hdl
+    END FUNCTION cxios_is_defined_calendar_wrapper_leap_year_drift_offset
+
+
+    SUBROUTINE cxios_set_calendar_wrapper_leap_year_month(calendar_wrapper_hdl, leap_year_month) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: calendar_wrapper_hdl
+      INTEGER (KIND=C_INT)      , VALUE :: leap_year_month
+    END SUBROUTINE cxios_set_calendar_wrapper_leap_year_month
+
+    SUBROUTINE cxios_get_calendar_wrapper_leap_year_month(calendar_wrapper_hdl, leap_year_month) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: calendar_wrapper_hdl
+      INTEGER (KIND=C_INT)             :: leap_year_month
+    END SUBROUTINE cxios_get_calendar_wrapper_leap_year_month
+
+    FUNCTION cxios_is_defined_calendar_wrapper_leap_year_month(calendar_wrapper_hdl) BIND(C)
+      USE ISO_C_BINDING
+      LOGICAL(kind=C_BOOL) :: cxios_is_defined_calendar_wrapper_leap_year_month
+      INTEGER (kind = C_INTPTR_T), VALUE :: calendar_wrapper_hdl
+    END FUNCTION cxios_is_defined_calendar_wrapper_leap_year_month
+
+
+    SUBROUTINE cxios_set_calendar_wrapper_month_lengths(calendar_wrapper_hdl, month_lengths, extent) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE       :: calendar_wrapper_hdl
+      INTEGER (KIND=C_INT)     , DIMENSION(*) :: month_lengths
+      INTEGER (kind = C_INT), DIMENSION(*)     :: extent
+    END SUBROUTINE cxios_set_calendar_wrapper_month_lengths
+
+    SUBROUTINE cxios_get_calendar_wrapper_month_lengths(calendar_wrapper_hdl, month_lengths, extent) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE       :: calendar_wrapper_hdl
+      INTEGER (KIND=C_INT)     , DIMENSION(*) :: month_lengths
+      INTEGER (kind = C_INT), DIMENSION(*)     :: extent
+    END SUBROUTINE cxios_get_calendar_wrapper_month_lengths
+
+    FUNCTION cxios_is_defined_calendar_wrapper_month_lengths(calendar_wrapper_hdl) BIND(C)
+      USE ISO_C_BINDING
+      LOGICAL(kind=C_BOOL) :: cxios_is_defined_calendar_wrapper_month_lengths
+      INTEGER (kind = C_INTPTR_T), VALUE :: calendar_wrapper_hdl
+    END FUNCTION cxios_is_defined_calendar_wrapper_month_lengths
+
+
+    SUBROUTINE cxios_set_calendar_wrapper_start_date(calendar_wrapper_hdl, start_date, start_date_size) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: calendar_wrapper_hdl
+      CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: start_date
+      INTEGER  (kind = C_INT)     , VALUE        :: start_date_size
+    END SUBROUTINE cxios_set_calendar_wrapper_start_date
+
+    SUBROUTINE cxios_get_calendar_wrapper_start_date(calendar_wrapper_hdl, start_date, start_date_size) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: calendar_wrapper_hdl
+      CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: start_date
+      INTEGER  (kind = C_INT)     , VALUE        :: start_date_size
+    END SUBROUTINE cxios_get_calendar_wrapper_start_date
+
+    FUNCTION cxios_is_defined_calendar_wrapper_start_date(calendar_wrapper_hdl) BIND(C)
+      USE ISO_C_BINDING
+      LOGICAL(kind=C_BOOL) :: cxios_is_defined_calendar_wrapper_start_date
+      INTEGER (kind = C_INTPTR_T), VALUE :: calendar_wrapper_hdl
+    END FUNCTION cxios_is_defined_calendar_wrapper_start_date
+
+
+    SUBROUTINE cxios_set_calendar_wrapper_time_origin(calendar_wrapper_hdl, time_origin, time_origin_size) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: calendar_wrapper_hdl
+      CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: time_origin
+      INTEGER  (kind = C_INT)     , VALUE        :: time_origin_size
+    END SUBROUTINE cxios_set_calendar_wrapper_time_origin
+
+    SUBROUTINE cxios_get_calendar_wrapper_time_origin(calendar_wrapper_hdl, time_origin, time_origin_size) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: calendar_wrapper_hdl
+      CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: time_origin
+      INTEGER  (kind = C_INT)     , VALUE        :: time_origin_size
+    END SUBROUTINE cxios_get_calendar_wrapper_time_origin
+
+    FUNCTION cxios_is_defined_calendar_wrapper_time_origin(calendar_wrapper_hdl) BIND(C)
+      USE ISO_C_BINDING
+      LOGICAL(kind=C_BOOL) :: cxios_is_defined_calendar_wrapper_time_origin
+      INTEGER (kind = C_INTPTR_T), VALUE :: calendar_wrapper_hdl
+    END FUNCTION cxios_is_defined_calendar_wrapper_time_origin
+
+
+    SUBROUTINE cxios_set_calendar_wrapper_timestep(calendar_wrapper_hdl, timestep) BIND(C)
+      USE ISO_C_BINDING
+      USE IDURATION
+      INTEGER (kind = C_INTPTR_T), VALUE :: calendar_wrapper_hdl
+      TYPE(txios(duration)), VALUE :: timestep
+    END SUBROUTINE cxios_set_calendar_wrapper_timestep
+
+    SUBROUTINE cxios_get_calendar_wrapper_timestep(calendar_wrapper_hdl, timestep) BIND(C)
+      USE ISO_C_BINDING
+      USE IDURATION
+      INTEGER (kind = C_INTPTR_T), VALUE :: calendar_wrapper_hdl
+      TYPE(txios(duration)) :: timestep
+    END SUBROUTINE cxios_get_calendar_wrapper_timestep
+
+    FUNCTION cxios_is_defined_calendar_wrapper_timestep(calendar_wrapper_hdl) BIND(C)
+      USE ISO_C_BINDING
+      LOGICAL(kind=C_BOOL) :: cxios_is_defined_calendar_wrapper_timestep
+      INTEGER (kind = C_INTPTR_T), VALUE :: calendar_wrapper_hdl
+    END FUNCTION cxios_is_defined_calendar_wrapper_timestep
+
+
+    SUBROUTINE cxios_set_calendar_wrapper_type(calendar_wrapper_hdl, type, type_size) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: calendar_wrapper_hdl
+      CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: type
+      INTEGER  (kind = C_INT)     , VALUE        :: type_size
+    END SUBROUTINE cxios_set_calendar_wrapper_type
+
+    SUBROUTINE cxios_get_calendar_wrapper_type(calendar_wrapper_hdl, type, type_size) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: calendar_wrapper_hdl
+      CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: type
+      INTEGER  (kind = C_INT)     , VALUE        :: type_size
+    END SUBROUTINE cxios_get_calendar_wrapper_type
+
+    FUNCTION cxios_is_defined_calendar_wrapper_type(calendar_wrapper_hdl) BIND(C)
+      USE ISO_C_BINDING
+      LOGICAL(kind=C_BOOL) :: cxios_is_defined_calendar_wrapper_type
+      INTEGER (kind = C_INTPTR_T), VALUE :: calendar_wrapper_hdl
+    END FUNCTION cxios_is_defined_calendar_wrapper_type
+
+
+    SUBROUTINE cxios_set_calendar_wrapper_year_length(calendar_wrapper_hdl, year_length) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: calendar_wrapper_hdl
+      INTEGER (KIND=C_INT)      , VALUE :: year_length
+    END SUBROUTINE cxios_set_calendar_wrapper_year_length
+
+    SUBROUTINE cxios_get_calendar_wrapper_year_length(calendar_wrapper_hdl, year_length) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: calendar_wrapper_hdl
+      INTEGER (KIND=C_INT)             :: year_length
+    END SUBROUTINE cxios_get_calendar_wrapper_year_length
+
+    FUNCTION cxios_is_defined_calendar_wrapper_year_length(calendar_wrapper_hdl) BIND(C)
+      USE ISO_C_BINDING
+      LOGICAL(kind=C_BOOL) :: cxios_is_defined_calendar_wrapper_year_length
+      INTEGER (kind = C_INTPTR_T), VALUE :: calendar_wrapper_hdl
+    END FUNCTION cxios_is_defined_calendar_wrapper_year_length
+
+  END INTERFACE
+
+END MODULE calendar_wrapper_interface_attr
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/fortran_attr/compute_connectivity_domain_interface_attr.F90
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/fortran_attr/compute_connectivity_domain_interface_attr.F90	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/fortran_attr/compute_connectivity_domain_interface_attr.F90	(revision 1749)
@@ -0,0 +1,95 @@
+! * ************************************************************************** *
+! *               Interface auto generated - do not modify                     *
+! * ************************************************************************** *
+#include "../fortran/xios_fortran_prefix.hpp"
+
+MODULE compute_connectivity_domain_interface_attr
+  USE, INTRINSIC :: ISO_C_BINDING
+
+  INTERFACE
+    ! Do not call directly / interface FORTRAN 2003 <-> C99
+
+    SUBROUTINE cxios_set_compute_connectivity_domain_local_neighbor(compute_connectivity_domain_hdl, local_neighbor, extent) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE       :: compute_connectivity_domain_hdl
+      INTEGER (KIND=C_INT)     , DIMENSION(*) :: local_neighbor
+      INTEGER (kind = C_INT), DIMENSION(*)     :: extent
+    END SUBROUTINE cxios_set_compute_connectivity_domain_local_neighbor
+
+    SUBROUTINE cxios_get_compute_connectivity_domain_local_neighbor(compute_connectivity_domain_hdl, local_neighbor, extent) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE       :: compute_connectivity_domain_hdl
+      INTEGER (KIND=C_INT)     , DIMENSION(*) :: local_neighbor
+      INTEGER (kind = C_INT), DIMENSION(*)     :: extent
+    END SUBROUTINE cxios_get_compute_connectivity_domain_local_neighbor
+
+    FUNCTION cxios_is_defined_compute_connectivity_domain_local_neighbor(compute_connectivity_domain_hdl) BIND(C)
+      USE ISO_C_BINDING
+      LOGICAL(kind=C_BOOL) :: cxios_is_defined_compute_connectivity_domain_local_neighbor
+      INTEGER (kind = C_INTPTR_T), VALUE :: compute_connectivity_domain_hdl
+    END FUNCTION cxios_is_defined_compute_connectivity_domain_local_neighbor
+
+
+    SUBROUTINE cxios_set_compute_connectivity_domain_n_neighbor(compute_connectivity_domain_hdl, n_neighbor, extent) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE       :: compute_connectivity_domain_hdl
+      INTEGER (KIND=C_INT)     , DIMENSION(*) :: n_neighbor
+      INTEGER (kind = C_INT), DIMENSION(*)     :: extent
+    END SUBROUTINE cxios_set_compute_connectivity_domain_n_neighbor
+
+    SUBROUTINE cxios_get_compute_connectivity_domain_n_neighbor(compute_connectivity_domain_hdl, n_neighbor, extent) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE       :: compute_connectivity_domain_hdl
+      INTEGER (KIND=C_INT)     , DIMENSION(*) :: n_neighbor
+      INTEGER (kind = C_INT), DIMENSION(*)     :: extent
+    END SUBROUTINE cxios_get_compute_connectivity_domain_n_neighbor
+
+    FUNCTION cxios_is_defined_compute_connectivity_domain_n_neighbor(compute_connectivity_domain_hdl) BIND(C)
+      USE ISO_C_BINDING
+      LOGICAL(kind=C_BOOL) :: cxios_is_defined_compute_connectivity_domain_n_neighbor
+      INTEGER (kind = C_INTPTR_T), VALUE :: compute_connectivity_domain_hdl
+    END FUNCTION cxios_is_defined_compute_connectivity_domain_n_neighbor
+
+
+    SUBROUTINE cxios_set_compute_connectivity_domain_n_neighbor_max(compute_connectivity_domain_hdl, n_neighbor_max) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: compute_connectivity_domain_hdl
+      INTEGER (KIND=C_INT)      , VALUE :: n_neighbor_max
+    END SUBROUTINE cxios_set_compute_connectivity_domain_n_neighbor_max
+
+    SUBROUTINE cxios_get_compute_connectivity_domain_n_neighbor_max(compute_connectivity_domain_hdl, n_neighbor_max) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: compute_connectivity_domain_hdl
+      INTEGER (KIND=C_INT)             :: n_neighbor_max
+    END SUBROUTINE cxios_get_compute_connectivity_domain_n_neighbor_max
+
+    FUNCTION cxios_is_defined_compute_connectivity_domain_n_neighbor_max(compute_connectivity_domain_hdl) BIND(C)
+      USE ISO_C_BINDING
+      LOGICAL(kind=C_BOOL) :: cxios_is_defined_compute_connectivity_domain_n_neighbor_max
+      INTEGER (kind = C_INTPTR_T), VALUE :: compute_connectivity_domain_hdl
+    END FUNCTION cxios_is_defined_compute_connectivity_domain_n_neighbor_max
+
+
+    SUBROUTINE cxios_set_compute_connectivity_domain_type(compute_connectivity_domain_hdl, type, type_size) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: compute_connectivity_domain_hdl
+      CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: type
+      INTEGER  (kind = C_INT)     , VALUE        :: type_size
+    END SUBROUTINE cxios_set_compute_connectivity_domain_type
+
+    SUBROUTINE cxios_get_compute_connectivity_domain_type(compute_connectivity_domain_hdl, type, type_size) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: compute_connectivity_domain_hdl
+      CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: type
+      INTEGER  (kind = C_INT)     , VALUE        :: type_size
+    END SUBROUTINE cxios_get_compute_connectivity_domain_type
+
+    FUNCTION cxios_is_defined_compute_connectivity_domain_type(compute_connectivity_domain_hdl) BIND(C)
+      USE ISO_C_BINDING
+      LOGICAL(kind=C_BOOL) :: cxios_is_defined_compute_connectivity_domain_type
+      INTEGER (kind = C_INTPTR_T), VALUE :: compute_connectivity_domain_hdl
+    END FUNCTION cxios_is_defined_compute_connectivity_domain_type
+
+  END INTERFACE
+
+END MODULE compute_connectivity_domain_interface_attr
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/fortran_attr/context_interface_attr.F90
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/fortran_attr/context_interface_attr.F90	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/fortran_attr/context_interface_attr.F90	(revision 1749)
@@ -0,0 +1,34 @@
+! * ************************************************************************** *
+! *               Interface auto generated - do not modify                     *
+! * ************************************************************************** *
+#include "../fortran/xios_fortran_prefix.hpp"
+
+MODULE context_interface_attr
+  USE, INTRINSIC :: ISO_C_BINDING
+
+  INTERFACE
+    ! Do not call directly / interface FORTRAN 2003 <-> C99
+
+    SUBROUTINE cxios_set_context_output_dir(context_hdl, output_dir, output_dir_size) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: context_hdl
+      CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: output_dir
+      INTEGER  (kind = C_INT)     , VALUE        :: output_dir_size
+    END SUBROUTINE cxios_set_context_output_dir
+
+    SUBROUTINE cxios_get_context_output_dir(context_hdl, output_dir, output_dir_size) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: context_hdl
+      CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: output_dir
+      INTEGER  (kind = C_INT)     , VALUE        :: output_dir_size
+    END SUBROUTINE cxios_get_context_output_dir
+
+    FUNCTION cxios_is_defined_context_output_dir(context_hdl) BIND(C)
+      USE ISO_C_BINDING
+      LOGICAL(kind=C_BOOL) :: cxios_is_defined_context_output_dir
+      INTEGER (kind = C_INTPTR_T), VALUE :: context_hdl
+    END FUNCTION cxios_is_defined_context_output_dir
+
+  END INTERFACE
+
+END MODULE context_interface_attr
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/fortran_attr/domain_interface_attr.F90
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/fortran_attr/domain_interface_attr.F90	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/fortran_attr/domain_interface_attr.F90	(revision 1749)
@@ -0,0 +1,846 @@
+! * ************************************************************************** *
+! *               Interface auto generated - do not modify                     *
+! * ************************************************************************** *
+#include "../fortran/xios_fortran_prefix.hpp"
+
+MODULE domain_interface_attr
+  USE, INTRINSIC :: ISO_C_BINDING
+
+  INTERFACE
+    ! Do not call directly / interface FORTRAN 2003 <-> C99
+
+    SUBROUTINE cxios_set_domain_area(domain_hdl, area, extent) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE       :: domain_hdl
+      REAL (KIND=C_DOUBLE)     , DIMENSION(*) :: area
+      INTEGER (kind = C_INT), DIMENSION(*)     :: extent
+    END SUBROUTINE cxios_set_domain_area
+
+    SUBROUTINE cxios_get_domain_area(domain_hdl, area, extent) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE       :: domain_hdl
+      REAL (KIND=C_DOUBLE)     , DIMENSION(*) :: area
+      INTEGER (kind = C_INT), DIMENSION(*)     :: extent
+    END SUBROUTINE cxios_get_domain_area
+
+    FUNCTION cxios_is_defined_domain_area(domain_hdl) BIND(C)
+      USE ISO_C_BINDING
+      LOGICAL(kind=C_BOOL) :: cxios_is_defined_domain_area
+      INTEGER (kind = C_INTPTR_T), VALUE :: domain_hdl
+    END FUNCTION cxios_is_defined_domain_area
+
+
+    SUBROUTINE cxios_set_domain_bounds_lat_1d(domain_hdl, bounds_lat_1d, extent) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE       :: domain_hdl
+      REAL (KIND=C_DOUBLE)     , DIMENSION(*) :: bounds_lat_1d
+      INTEGER (kind = C_INT), DIMENSION(*)     :: extent
+    END SUBROUTINE cxios_set_domain_bounds_lat_1d
+
+    SUBROUTINE cxios_get_domain_bounds_lat_1d(domain_hdl, bounds_lat_1d, extent) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE       :: domain_hdl
+      REAL (KIND=C_DOUBLE)     , DIMENSION(*) :: bounds_lat_1d
+      INTEGER (kind = C_INT), DIMENSION(*)     :: extent
+    END SUBROUTINE cxios_get_domain_bounds_lat_1d
+
+    FUNCTION cxios_is_defined_domain_bounds_lat_1d(domain_hdl) BIND(C)
+      USE ISO_C_BINDING
+      LOGICAL(kind=C_BOOL) :: cxios_is_defined_domain_bounds_lat_1d
+      INTEGER (kind = C_INTPTR_T), VALUE :: domain_hdl
+    END FUNCTION cxios_is_defined_domain_bounds_lat_1d
+
+
+    SUBROUTINE cxios_set_domain_bounds_lat_2d(domain_hdl, bounds_lat_2d, extent) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE       :: domain_hdl
+      REAL (KIND=C_DOUBLE)     , DIMENSION(*) :: bounds_lat_2d
+      INTEGER (kind = C_INT), DIMENSION(*)     :: extent
+    END SUBROUTINE cxios_set_domain_bounds_lat_2d
+
+    SUBROUTINE cxios_get_domain_bounds_lat_2d(domain_hdl, bounds_lat_2d, extent) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE       :: domain_hdl
+      REAL (KIND=C_DOUBLE)     , DIMENSION(*) :: bounds_lat_2d
+      INTEGER (kind = C_INT), DIMENSION(*)     :: extent
+    END SUBROUTINE cxios_get_domain_bounds_lat_2d
+
+    FUNCTION cxios_is_defined_domain_bounds_lat_2d(domain_hdl) BIND(C)
+      USE ISO_C_BINDING
+      LOGICAL(kind=C_BOOL) :: cxios_is_defined_domain_bounds_lat_2d
+      INTEGER (kind = C_INTPTR_T), VALUE :: domain_hdl
+    END FUNCTION cxios_is_defined_domain_bounds_lat_2d
+
+
+    SUBROUTINE cxios_set_domain_bounds_lat_name(domain_hdl, bounds_lat_name, bounds_lat_name_size) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: domain_hdl
+      CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: bounds_lat_name
+      INTEGER  (kind = C_INT)     , VALUE        :: bounds_lat_name_size
+    END SUBROUTINE cxios_set_domain_bounds_lat_name
+
+    SUBROUTINE cxios_get_domain_bounds_lat_name(domain_hdl, bounds_lat_name, bounds_lat_name_size) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: domain_hdl
+      CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: bounds_lat_name
+      INTEGER  (kind = C_INT)     , VALUE        :: bounds_lat_name_size
+    END SUBROUTINE cxios_get_domain_bounds_lat_name
+
+    FUNCTION cxios_is_defined_domain_bounds_lat_name(domain_hdl) BIND(C)
+      USE ISO_C_BINDING
+      LOGICAL(kind=C_BOOL) :: cxios_is_defined_domain_bounds_lat_name
+      INTEGER (kind = C_INTPTR_T), VALUE :: domain_hdl
+    END FUNCTION cxios_is_defined_domain_bounds_lat_name
+
+
+    SUBROUTINE cxios_set_domain_bounds_lon_1d(domain_hdl, bounds_lon_1d, extent) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE       :: domain_hdl
+      REAL (KIND=C_DOUBLE)     , DIMENSION(*) :: bounds_lon_1d
+      INTEGER (kind = C_INT), DIMENSION(*)     :: extent
+    END SUBROUTINE cxios_set_domain_bounds_lon_1d
+
+    SUBROUTINE cxios_get_domain_bounds_lon_1d(domain_hdl, bounds_lon_1d, extent) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE       :: domain_hdl
+      REAL (KIND=C_DOUBLE)     , DIMENSION(*) :: bounds_lon_1d
+      INTEGER (kind = C_INT), DIMENSION(*)     :: extent
+    END SUBROUTINE cxios_get_domain_bounds_lon_1d
+
+    FUNCTION cxios_is_defined_domain_bounds_lon_1d(domain_hdl) BIND(C)
+      USE ISO_C_BINDING
+      LOGICAL(kind=C_BOOL) :: cxios_is_defined_domain_bounds_lon_1d
+      INTEGER (kind = C_INTPTR_T), VALUE :: domain_hdl
+    END FUNCTION cxios_is_defined_domain_bounds_lon_1d
+
+
+    SUBROUTINE cxios_set_domain_bounds_lon_2d(domain_hdl, bounds_lon_2d, extent) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE       :: domain_hdl
+      REAL (KIND=C_DOUBLE)     , DIMENSION(*) :: bounds_lon_2d
+      INTEGER (kind = C_INT), DIMENSION(*)     :: extent
+    END SUBROUTINE cxios_set_domain_bounds_lon_2d
+
+    SUBROUTINE cxios_get_domain_bounds_lon_2d(domain_hdl, bounds_lon_2d, extent) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE       :: domain_hdl
+      REAL (KIND=C_DOUBLE)     , DIMENSION(*) :: bounds_lon_2d
+      INTEGER (kind = C_INT), DIMENSION(*)     :: extent
+    END SUBROUTINE cxios_get_domain_bounds_lon_2d
+
+    FUNCTION cxios_is_defined_domain_bounds_lon_2d(domain_hdl) BIND(C)
+      USE ISO_C_BINDING
+      LOGICAL(kind=C_BOOL) :: cxios_is_defined_domain_bounds_lon_2d
+      INTEGER (kind = C_INTPTR_T), VALUE :: domain_hdl
+    END FUNCTION cxios_is_defined_domain_bounds_lon_2d
+
+
+    SUBROUTINE cxios_set_domain_bounds_lon_name(domain_hdl, bounds_lon_name, bounds_lon_name_size) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: domain_hdl
+      CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: bounds_lon_name
+      INTEGER  (kind = C_INT)     , VALUE        :: bounds_lon_name_size
+    END SUBROUTINE cxios_set_domain_bounds_lon_name
+
+    SUBROUTINE cxios_get_domain_bounds_lon_name(domain_hdl, bounds_lon_name, bounds_lon_name_size) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: domain_hdl
+      CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: bounds_lon_name
+      INTEGER  (kind = C_INT)     , VALUE        :: bounds_lon_name_size
+    END SUBROUTINE cxios_get_domain_bounds_lon_name
+
+    FUNCTION cxios_is_defined_domain_bounds_lon_name(domain_hdl) BIND(C)
+      USE ISO_C_BINDING
+      LOGICAL(kind=C_BOOL) :: cxios_is_defined_domain_bounds_lon_name
+      INTEGER (kind = C_INTPTR_T), VALUE :: domain_hdl
+    END FUNCTION cxios_is_defined_domain_bounds_lon_name
+
+
+    SUBROUTINE cxios_set_domain_comment(domain_hdl, comment, comment_size) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: domain_hdl
+      CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: comment
+      INTEGER  (kind = C_INT)     , VALUE        :: comment_size
+    END SUBROUTINE cxios_set_domain_comment
+
+    SUBROUTINE cxios_get_domain_comment(domain_hdl, comment, comment_size) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: domain_hdl
+      CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: comment
+      INTEGER  (kind = C_INT)     , VALUE        :: comment_size
+    END SUBROUTINE cxios_get_domain_comment
+
+    FUNCTION cxios_is_defined_domain_comment(domain_hdl) BIND(C)
+      USE ISO_C_BINDING
+      LOGICAL(kind=C_BOOL) :: cxios_is_defined_domain_comment
+      INTEGER (kind = C_INTPTR_T), VALUE :: domain_hdl
+    END FUNCTION cxios_is_defined_domain_comment
+
+
+    SUBROUTINE cxios_set_domain_data_dim(domain_hdl, data_dim) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: domain_hdl
+      INTEGER (KIND=C_INT)      , VALUE :: data_dim
+    END SUBROUTINE cxios_set_domain_data_dim
+
+    SUBROUTINE cxios_get_domain_data_dim(domain_hdl, data_dim) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: domain_hdl
+      INTEGER (KIND=C_INT)             :: data_dim
+    END SUBROUTINE cxios_get_domain_data_dim
+
+    FUNCTION cxios_is_defined_domain_data_dim(domain_hdl) BIND(C)
+      USE ISO_C_BINDING
+      LOGICAL(kind=C_BOOL) :: cxios_is_defined_domain_data_dim
+      INTEGER (kind = C_INTPTR_T), VALUE :: domain_hdl
+    END FUNCTION cxios_is_defined_domain_data_dim
+
+
+    SUBROUTINE cxios_set_domain_data_i_index(domain_hdl, data_i_index, extent) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE       :: domain_hdl
+      INTEGER (KIND=C_INT)     , DIMENSION(*) :: data_i_index
+      INTEGER (kind = C_INT), DIMENSION(*)     :: extent
+    END SUBROUTINE cxios_set_domain_data_i_index
+
+    SUBROUTINE cxios_get_domain_data_i_index(domain_hdl, data_i_index, extent) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE       :: domain_hdl
+      INTEGER (KIND=C_INT)     , DIMENSION(*) :: data_i_index
+      INTEGER (kind = C_INT), DIMENSION(*)     :: extent
+    END SUBROUTINE cxios_get_domain_data_i_index
+
+    FUNCTION cxios_is_defined_domain_data_i_index(domain_hdl) BIND(C)
+      USE ISO_C_BINDING
+      LOGICAL(kind=C_BOOL) :: cxios_is_defined_domain_data_i_index
+      INTEGER (kind = C_INTPTR_T), VALUE :: domain_hdl
+    END FUNCTION cxios_is_defined_domain_data_i_index
+
+
+    SUBROUTINE cxios_set_domain_data_ibegin(domain_hdl, data_ibegin) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: domain_hdl
+      INTEGER (KIND=C_INT)      , VALUE :: data_ibegin
+    END SUBROUTINE cxios_set_domain_data_ibegin
+
+    SUBROUTINE cxios_get_domain_data_ibegin(domain_hdl, data_ibegin) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: domain_hdl
+      INTEGER (KIND=C_INT)             :: data_ibegin
+    END SUBROUTINE cxios_get_domain_data_ibegin
+
+    FUNCTION cxios_is_defined_domain_data_ibegin(domain_hdl) BIND(C)
+      USE ISO_C_BINDING
+      LOGICAL(kind=C_BOOL) :: cxios_is_defined_domain_data_ibegin
+      INTEGER (kind = C_INTPTR_T), VALUE :: domain_hdl
+    END FUNCTION cxios_is_defined_domain_data_ibegin
+
+
+    SUBROUTINE cxios_set_domain_data_j_index(domain_hdl, data_j_index, extent) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE       :: domain_hdl
+      INTEGER (KIND=C_INT)     , DIMENSION(*) :: data_j_index
+      INTEGER (kind = C_INT), DIMENSION(*)     :: extent
+    END SUBROUTINE cxios_set_domain_data_j_index
+
+    SUBROUTINE cxios_get_domain_data_j_index(domain_hdl, data_j_index, extent) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE       :: domain_hdl
+      INTEGER (KIND=C_INT)     , DIMENSION(*) :: data_j_index
+      INTEGER (kind = C_INT), DIMENSION(*)     :: extent
+    END SUBROUTINE cxios_get_domain_data_j_index
+
+    FUNCTION cxios_is_defined_domain_data_j_index(domain_hdl) BIND(C)
+      USE ISO_C_BINDING
+      LOGICAL(kind=C_BOOL) :: cxios_is_defined_domain_data_j_index
+      INTEGER (kind = C_INTPTR_T), VALUE :: domain_hdl
+    END FUNCTION cxios_is_defined_domain_data_j_index
+
+
+    SUBROUTINE cxios_set_domain_data_jbegin(domain_hdl, data_jbegin) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: domain_hdl
+      INTEGER (KIND=C_INT)      , VALUE :: data_jbegin
+    END SUBROUTINE cxios_set_domain_data_jbegin
+
+    SUBROUTINE cxios_get_domain_data_jbegin(domain_hdl, data_jbegin) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: domain_hdl
+      INTEGER (KIND=C_INT)             :: data_jbegin
+    END SUBROUTINE cxios_get_domain_data_jbegin
+
+    FUNCTION cxios_is_defined_domain_data_jbegin(domain_hdl) BIND(C)
+      USE ISO_C_BINDING
+      LOGICAL(kind=C_BOOL) :: cxios_is_defined_domain_data_jbegin
+      INTEGER (kind = C_INTPTR_T), VALUE :: domain_hdl
+    END FUNCTION cxios_is_defined_domain_data_jbegin
+
+
+    SUBROUTINE cxios_set_domain_data_ni(domain_hdl, data_ni) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: domain_hdl
+      INTEGER (KIND=C_INT)      , VALUE :: data_ni
+    END SUBROUTINE cxios_set_domain_data_ni
+
+    SUBROUTINE cxios_get_domain_data_ni(domain_hdl, data_ni) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: domain_hdl
+      INTEGER (KIND=C_INT)             :: data_ni
+    END SUBROUTINE cxios_get_domain_data_ni
+
+    FUNCTION cxios_is_defined_domain_data_ni(domain_hdl) BIND(C)
+      USE ISO_C_BINDING
+      LOGICAL(kind=C_BOOL) :: cxios_is_defined_domain_data_ni
+      INTEGER (kind = C_INTPTR_T), VALUE :: domain_hdl
+    END FUNCTION cxios_is_defined_domain_data_ni
+
+
+    SUBROUTINE cxios_set_domain_data_nj(domain_hdl, data_nj) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: domain_hdl
+      INTEGER (KIND=C_INT)      , VALUE :: data_nj
+    END SUBROUTINE cxios_set_domain_data_nj
+
+    SUBROUTINE cxios_get_domain_data_nj(domain_hdl, data_nj) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: domain_hdl
+      INTEGER (KIND=C_INT)             :: data_nj
+    END SUBROUTINE cxios_get_domain_data_nj
+
+    FUNCTION cxios_is_defined_domain_data_nj(domain_hdl) BIND(C)
+      USE ISO_C_BINDING
+      LOGICAL(kind=C_BOOL) :: cxios_is_defined_domain_data_nj
+      INTEGER (kind = C_INTPTR_T), VALUE :: domain_hdl
+    END FUNCTION cxios_is_defined_domain_data_nj
+
+
+    SUBROUTINE cxios_set_domain_dim_i_name(domain_hdl, dim_i_name, dim_i_name_size) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: domain_hdl
+      CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: dim_i_name
+      INTEGER  (kind = C_INT)     , VALUE        :: dim_i_name_size
+    END SUBROUTINE cxios_set_domain_dim_i_name
+
+    SUBROUTINE cxios_get_domain_dim_i_name(domain_hdl, dim_i_name, dim_i_name_size) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: domain_hdl
+      CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: dim_i_name
+      INTEGER  (kind = C_INT)     , VALUE        :: dim_i_name_size
+    END SUBROUTINE cxios_get_domain_dim_i_name
+
+    FUNCTION cxios_is_defined_domain_dim_i_name(domain_hdl) BIND(C)
+      USE ISO_C_BINDING
+      LOGICAL(kind=C_BOOL) :: cxios_is_defined_domain_dim_i_name
+      INTEGER (kind = C_INTPTR_T), VALUE :: domain_hdl
+    END FUNCTION cxios_is_defined_domain_dim_i_name
+
+
+    SUBROUTINE cxios_set_domain_dim_j_name(domain_hdl, dim_j_name, dim_j_name_size) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: domain_hdl
+      CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: dim_j_name
+      INTEGER  (kind = C_INT)     , VALUE        :: dim_j_name_size
+    END SUBROUTINE cxios_set_domain_dim_j_name
+
+    SUBROUTINE cxios_get_domain_dim_j_name(domain_hdl, dim_j_name, dim_j_name_size) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: domain_hdl
+      CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: dim_j_name
+      INTEGER  (kind = C_INT)     , VALUE        :: dim_j_name_size
+    END SUBROUTINE cxios_get_domain_dim_j_name
+
+    FUNCTION cxios_is_defined_domain_dim_j_name(domain_hdl) BIND(C)
+      USE ISO_C_BINDING
+      LOGICAL(kind=C_BOOL) :: cxios_is_defined_domain_dim_j_name
+      INTEGER (kind = C_INTPTR_T), VALUE :: domain_hdl
+    END FUNCTION cxios_is_defined_domain_dim_j_name
+
+
+    SUBROUTINE cxios_set_domain_domain_ref(domain_hdl, domain_ref, domain_ref_size) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: domain_hdl
+      CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: domain_ref
+      INTEGER  (kind = C_INT)     , VALUE        :: domain_ref_size
+    END SUBROUTINE cxios_set_domain_domain_ref
+
+    SUBROUTINE cxios_get_domain_domain_ref(domain_hdl, domain_ref, domain_ref_size) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: domain_hdl
+      CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: domain_ref
+      INTEGER  (kind = C_INT)     , VALUE        :: domain_ref_size
+    END SUBROUTINE cxios_get_domain_domain_ref
+
+    FUNCTION cxios_is_defined_domain_domain_ref(domain_hdl) BIND(C)
+      USE ISO_C_BINDING
+      LOGICAL(kind=C_BOOL) :: cxios_is_defined_domain_domain_ref
+      INTEGER (kind = C_INTPTR_T), VALUE :: domain_hdl
+    END FUNCTION cxios_is_defined_domain_domain_ref
+
+
+    SUBROUTINE cxios_set_domain_i_index(domain_hdl, i_index, extent) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE       :: domain_hdl
+      INTEGER (KIND=C_INT)     , DIMENSION(*) :: i_index
+      INTEGER (kind = C_INT), DIMENSION(*)     :: extent
+    END SUBROUTINE cxios_set_domain_i_index
+
+    SUBROUTINE cxios_get_domain_i_index(domain_hdl, i_index, extent) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE       :: domain_hdl
+      INTEGER (KIND=C_INT)     , DIMENSION(*) :: i_index
+      INTEGER (kind = C_INT), DIMENSION(*)     :: extent
+    END SUBROUTINE cxios_get_domain_i_index
+
+    FUNCTION cxios_is_defined_domain_i_index(domain_hdl) BIND(C)
+      USE ISO_C_BINDING
+      LOGICAL(kind=C_BOOL) :: cxios_is_defined_domain_i_index
+      INTEGER (kind = C_INTPTR_T), VALUE :: domain_hdl
+    END FUNCTION cxios_is_defined_domain_i_index
+
+
+    SUBROUTINE cxios_set_domain_ibegin(domain_hdl, ibegin) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: domain_hdl
+      INTEGER (KIND=C_INT)      , VALUE :: ibegin
+    END SUBROUTINE cxios_set_domain_ibegin
+
+    SUBROUTINE cxios_get_domain_ibegin(domain_hdl, ibegin) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: domain_hdl
+      INTEGER (KIND=C_INT)             :: ibegin
+    END SUBROUTINE cxios_get_domain_ibegin
+
+    FUNCTION cxios_is_defined_domain_ibegin(domain_hdl) BIND(C)
+      USE ISO_C_BINDING
+      LOGICAL(kind=C_BOOL) :: cxios_is_defined_domain_ibegin
+      INTEGER (kind = C_INTPTR_T), VALUE :: domain_hdl
+    END FUNCTION cxios_is_defined_domain_ibegin
+
+
+    SUBROUTINE cxios_set_domain_j_index(domain_hdl, j_index, extent) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE       :: domain_hdl
+      INTEGER (KIND=C_INT)     , DIMENSION(*) :: j_index
+      INTEGER (kind = C_INT), DIMENSION(*)     :: extent
+    END SUBROUTINE cxios_set_domain_j_index
+
+    SUBROUTINE cxios_get_domain_j_index(domain_hdl, j_index, extent) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE       :: domain_hdl
+      INTEGER (KIND=C_INT)     , DIMENSION(*) :: j_index
+      INTEGER (kind = C_INT), DIMENSION(*)     :: extent
+    END SUBROUTINE cxios_get_domain_j_index
+
+    FUNCTION cxios_is_defined_domain_j_index(domain_hdl) BIND(C)
+      USE ISO_C_BINDING
+      LOGICAL(kind=C_BOOL) :: cxios_is_defined_domain_j_index
+      INTEGER (kind = C_INTPTR_T), VALUE :: domain_hdl
+    END FUNCTION cxios_is_defined_domain_j_index
+
+
+    SUBROUTINE cxios_set_domain_jbegin(domain_hdl, jbegin) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: domain_hdl
+      INTEGER (KIND=C_INT)      , VALUE :: jbegin
+    END SUBROUTINE cxios_set_domain_jbegin
+
+    SUBROUTINE cxios_get_domain_jbegin(domain_hdl, jbegin) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: domain_hdl
+      INTEGER (KIND=C_INT)             :: jbegin
+    END SUBROUTINE cxios_get_domain_jbegin
+
+    FUNCTION cxios_is_defined_domain_jbegin(domain_hdl) BIND(C)
+      USE ISO_C_BINDING
+      LOGICAL(kind=C_BOOL) :: cxios_is_defined_domain_jbegin
+      INTEGER (kind = C_INTPTR_T), VALUE :: domain_hdl
+    END FUNCTION cxios_is_defined_domain_jbegin
+
+
+    SUBROUTINE cxios_set_domain_lat_name(domain_hdl, lat_name, lat_name_size) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: domain_hdl
+      CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: lat_name
+      INTEGER  (kind = C_INT)     , VALUE        :: lat_name_size
+    END SUBROUTINE cxios_set_domain_lat_name
+
+    SUBROUTINE cxios_get_domain_lat_name(domain_hdl, lat_name, lat_name_size) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: domain_hdl
+      CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: lat_name
+      INTEGER  (kind = C_INT)     , VALUE        :: lat_name_size
+    END SUBROUTINE cxios_get_domain_lat_name
+
+    FUNCTION cxios_is_defined_domain_lat_name(domain_hdl) BIND(C)
+      USE ISO_C_BINDING
+      LOGICAL(kind=C_BOOL) :: cxios_is_defined_domain_lat_name
+      INTEGER (kind = C_INTPTR_T), VALUE :: domain_hdl
+    END FUNCTION cxios_is_defined_domain_lat_name
+
+
+    SUBROUTINE cxios_set_domain_latvalue_1d(domain_hdl, latvalue_1d, extent) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE       :: domain_hdl
+      REAL (KIND=C_DOUBLE)     , DIMENSION(*) :: latvalue_1d
+      INTEGER (kind = C_INT), DIMENSION(*)     :: extent
+    END SUBROUTINE cxios_set_domain_latvalue_1d
+
+    SUBROUTINE cxios_get_domain_latvalue_1d(domain_hdl, latvalue_1d, extent) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE       :: domain_hdl
+      REAL (KIND=C_DOUBLE)     , DIMENSION(*) :: latvalue_1d
+      INTEGER (kind = C_INT), DIMENSION(*)     :: extent
+    END SUBROUTINE cxios_get_domain_latvalue_1d
+
+    FUNCTION cxios_is_defined_domain_latvalue_1d(domain_hdl) BIND(C)
+      USE ISO_C_BINDING
+      LOGICAL(kind=C_BOOL) :: cxios_is_defined_domain_latvalue_1d
+      INTEGER (kind = C_INTPTR_T), VALUE :: domain_hdl
+    END FUNCTION cxios_is_defined_domain_latvalue_1d
+
+
+    SUBROUTINE cxios_set_domain_latvalue_2d(domain_hdl, latvalue_2d, extent) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE       :: domain_hdl
+      REAL (KIND=C_DOUBLE)     , DIMENSION(*) :: latvalue_2d
+      INTEGER (kind = C_INT), DIMENSION(*)     :: extent
+    END SUBROUTINE cxios_set_domain_latvalue_2d
+
+    SUBROUTINE cxios_get_domain_latvalue_2d(domain_hdl, latvalue_2d, extent) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE       :: domain_hdl
+      REAL (KIND=C_DOUBLE)     , DIMENSION(*) :: latvalue_2d
+      INTEGER (kind = C_INT), DIMENSION(*)     :: extent
+    END SUBROUTINE cxios_get_domain_latvalue_2d
+
+    FUNCTION cxios_is_defined_domain_latvalue_2d(domain_hdl) BIND(C)
+      USE ISO_C_BINDING
+      LOGICAL(kind=C_BOOL) :: cxios_is_defined_domain_latvalue_2d
+      INTEGER (kind = C_INTPTR_T), VALUE :: domain_hdl
+    END FUNCTION cxios_is_defined_domain_latvalue_2d
+
+
+    SUBROUTINE cxios_set_domain_lon_name(domain_hdl, lon_name, lon_name_size) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: domain_hdl
+      CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: lon_name
+      INTEGER  (kind = C_INT)     , VALUE        :: lon_name_size
+    END SUBROUTINE cxios_set_domain_lon_name
+
+    SUBROUTINE cxios_get_domain_lon_name(domain_hdl, lon_name, lon_name_size) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: domain_hdl
+      CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: lon_name
+      INTEGER  (kind = C_INT)     , VALUE        :: lon_name_size
+    END SUBROUTINE cxios_get_domain_lon_name
+
+    FUNCTION cxios_is_defined_domain_lon_name(domain_hdl) BIND(C)
+      USE ISO_C_BINDING
+      LOGICAL(kind=C_BOOL) :: cxios_is_defined_domain_lon_name
+      INTEGER (kind = C_INTPTR_T), VALUE :: domain_hdl
+    END FUNCTION cxios_is_defined_domain_lon_name
+
+
+    SUBROUTINE cxios_set_domain_long_name(domain_hdl, long_name, long_name_size) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: domain_hdl
+      CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: long_name
+      INTEGER  (kind = C_INT)     , VALUE        :: long_name_size
+    END SUBROUTINE cxios_set_domain_long_name
+
+    SUBROUTINE cxios_get_domain_long_name(domain_hdl, long_name, long_name_size) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: domain_hdl
+      CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: long_name
+      INTEGER  (kind = C_INT)     , VALUE        :: long_name_size
+    END SUBROUTINE cxios_get_domain_long_name
+
+    FUNCTION cxios_is_defined_domain_long_name(domain_hdl) BIND(C)
+      USE ISO_C_BINDING
+      LOGICAL(kind=C_BOOL) :: cxios_is_defined_domain_long_name
+      INTEGER (kind = C_INTPTR_T), VALUE :: domain_hdl
+    END FUNCTION cxios_is_defined_domain_long_name
+
+
+    SUBROUTINE cxios_set_domain_lonvalue_1d(domain_hdl, lonvalue_1d, extent) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE       :: domain_hdl
+      REAL (KIND=C_DOUBLE)     , DIMENSION(*) :: lonvalue_1d
+      INTEGER (kind = C_INT), DIMENSION(*)     :: extent
+    END SUBROUTINE cxios_set_domain_lonvalue_1d
+
+    SUBROUTINE cxios_get_domain_lonvalue_1d(domain_hdl, lonvalue_1d, extent) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE       :: domain_hdl
+      REAL (KIND=C_DOUBLE)     , DIMENSION(*) :: lonvalue_1d
+      INTEGER (kind = C_INT), DIMENSION(*)     :: extent
+    END SUBROUTINE cxios_get_domain_lonvalue_1d
+
+    FUNCTION cxios_is_defined_domain_lonvalue_1d(domain_hdl) BIND(C)
+      USE ISO_C_BINDING
+      LOGICAL(kind=C_BOOL) :: cxios_is_defined_domain_lonvalue_1d
+      INTEGER (kind = C_INTPTR_T), VALUE :: domain_hdl
+    END FUNCTION cxios_is_defined_domain_lonvalue_1d
+
+
+    SUBROUTINE cxios_set_domain_lonvalue_2d(domain_hdl, lonvalue_2d, extent) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE       :: domain_hdl
+      REAL (KIND=C_DOUBLE)     , DIMENSION(*) :: lonvalue_2d
+      INTEGER (kind = C_INT), DIMENSION(*)     :: extent
+    END SUBROUTINE cxios_set_domain_lonvalue_2d
+
+    SUBROUTINE cxios_get_domain_lonvalue_2d(domain_hdl, lonvalue_2d, extent) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE       :: domain_hdl
+      REAL (KIND=C_DOUBLE)     , DIMENSION(*) :: lonvalue_2d
+      INTEGER (kind = C_INT), DIMENSION(*)     :: extent
+    END SUBROUTINE cxios_get_domain_lonvalue_2d
+
+    FUNCTION cxios_is_defined_domain_lonvalue_2d(domain_hdl) BIND(C)
+      USE ISO_C_BINDING
+      LOGICAL(kind=C_BOOL) :: cxios_is_defined_domain_lonvalue_2d
+      INTEGER (kind = C_INTPTR_T), VALUE :: domain_hdl
+    END FUNCTION cxios_is_defined_domain_lonvalue_2d
+
+
+    SUBROUTINE cxios_set_domain_mask_1d(domain_hdl, mask_1d, extent) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE       :: domain_hdl
+      LOGICAL (KIND=C_BOOL)     , DIMENSION(*) :: mask_1d
+      INTEGER (kind = C_INT), DIMENSION(*)     :: extent
+    END SUBROUTINE cxios_set_domain_mask_1d
+
+    SUBROUTINE cxios_get_domain_mask_1d(domain_hdl, mask_1d, extent) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE       :: domain_hdl
+      LOGICAL (KIND=C_BOOL)     , DIMENSION(*) :: mask_1d
+      INTEGER (kind = C_INT), DIMENSION(*)     :: extent
+    END SUBROUTINE cxios_get_domain_mask_1d
+
+    FUNCTION cxios_is_defined_domain_mask_1d(domain_hdl) BIND(C)
+      USE ISO_C_BINDING
+      LOGICAL(kind=C_BOOL) :: cxios_is_defined_domain_mask_1d
+      INTEGER (kind = C_INTPTR_T), VALUE :: domain_hdl
+    END FUNCTION cxios_is_defined_domain_mask_1d
+
+
+    SUBROUTINE cxios_set_domain_mask_2d(domain_hdl, mask_2d, extent) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE       :: domain_hdl
+      LOGICAL (KIND=C_BOOL)     , DIMENSION(*) :: mask_2d
+      INTEGER (kind = C_INT), DIMENSION(*)     :: extent
+    END SUBROUTINE cxios_set_domain_mask_2d
+
+    SUBROUTINE cxios_get_domain_mask_2d(domain_hdl, mask_2d, extent) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE       :: domain_hdl
+      LOGICAL (KIND=C_BOOL)     , DIMENSION(*) :: mask_2d
+      INTEGER (kind = C_INT), DIMENSION(*)     :: extent
+    END SUBROUTINE cxios_get_domain_mask_2d
+
+    FUNCTION cxios_is_defined_domain_mask_2d(domain_hdl) BIND(C)
+      USE ISO_C_BINDING
+      LOGICAL(kind=C_BOOL) :: cxios_is_defined_domain_mask_2d
+      INTEGER (kind = C_INTPTR_T), VALUE :: domain_hdl
+    END FUNCTION cxios_is_defined_domain_mask_2d
+
+
+    SUBROUTINE cxios_set_domain_name(domain_hdl, name, name_size) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: domain_hdl
+      CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: name
+      INTEGER  (kind = C_INT)     , VALUE        :: name_size
+    END SUBROUTINE cxios_set_domain_name
+
+    SUBROUTINE cxios_get_domain_name(domain_hdl, name, name_size) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: domain_hdl
+      CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: name
+      INTEGER  (kind = C_INT)     , VALUE        :: name_size
+    END SUBROUTINE cxios_get_domain_name
+
+    FUNCTION cxios_is_defined_domain_name(domain_hdl) BIND(C)
+      USE ISO_C_BINDING
+      LOGICAL(kind=C_BOOL) :: cxios_is_defined_domain_name
+      INTEGER (kind = C_INTPTR_T), VALUE :: domain_hdl
+    END FUNCTION cxios_is_defined_domain_name
+
+
+    SUBROUTINE cxios_set_domain_ni(domain_hdl, ni) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: domain_hdl
+      INTEGER (KIND=C_INT)      , VALUE :: ni
+    END SUBROUTINE cxios_set_domain_ni
+
+    SUBROUTINE cxios_get_domain_ni(domain_hdl, ni) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: domain_hdl
+      INTEGER (KIND=C_INT)             :: ni
+    END SUBROUTINE cxios_get_domain_ni
+
+    FUNCTION cxios_is_defined_domain_ni(domain_hdl) BIND(C)
+      USE ISO_C_BINDING
+      LOGICAL(kind=C_BOOL) :: cxios_is_defined_domain_ni
+      INTEGER (kind = C_INTPTR_T), VALUE :: domain_hdl
+    END FUNCTION cxios_is_defined_domain_ni
+
+
+    SUBROUTINE cxios_set_domain_ni_glo(domain_hdl, ni_glo) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: domain_hdl
+      INTEGER (KIND=C_INT)      , VALUE :: ni_glo
+    END SUBROUTINE cxios_set_domain_ni_glo
+
+    SUBROUTINE cxios_get_domain_ni_glo(domain_hdl, ni_glo) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: domain_hdl
+      INTEGER (KIND=C_INT)             :: ni_glo
+    END SUBROUTINE cxios_get_domain_ni_glo
+
+    FUNCTION cxios_is_defined_domain_ni_glo(domain_hdl) BIND(C)
+      USE ISO_C_BINDING
+      LOGICAL(kind=C_BOOL) :: cxios_is_defined_domain_ni_glo
+      INTEGER (kind = C_INTPTR_T), VALUE :: domain_hdl
+    END FUNCTION cxios_is_defined_domain_ni_glo
+
+
+    SUBROUTINE cxios_set_domain_nj(domain_hdl, nj) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: domain_hdl
+      INTEGER (KIND=C_INT)      , VALUE :: nj
+    END SUBROUTINE cxios_set_domain_nj
+
+    SUBROUTINE cxios_get_domain_nj(domain_hdl, nj) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: domain_hdl
+      INTEGER (KIND=C_INT)             :: nj
+    END SUBROUTINE cxios_get_domain_nj
+
+    FUNCTION cxios_is_defined_domain_nj(domain_hdl) BIND(C)
+      USE ISO_C_BINDING
+      LOGICAL(kind=C_BOOL) :: cxios_is_defined_domain_nj
+      INTEGER (kind = C_INTPTR_T), VALUE :: domain_hdl
+    END FUNCTION cxios_is_defined_domain_nj
+
+
+    SUBROUTINE cxios_set_domain_nj_glo(domain_hdl, nj_glo) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: domain_hdl
+      INTEGER (KIND=C_INT)      , VALUE :: nj_glo
+    END SUBROUTINE cxios_set_domain_nj_glo
+
+    SUBROUTINE cxios_get_domain_nj_glo(domain_hdl, nj_glo) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: domain_hdl
+      INTEGER (KIND=C_INT)             :: nj_glo
+    END SUBROUTINE cxios_get_domain_nj_glo
+
+    FUNCTION cxios_is_defined_domain_nj_glo(domain_hdl) BIND(C)
+      USE ISO_C_BINDING
+      LOGICAL(kind=C_BOOL) :: cxios_is_defined_domain_nj_glo
+      INTEGER (kind = C_INTPTR_T), VALUE :: domain_hdl
+    END FUNCTION cxios_is_defined_domain_nj_glo
+
+
+    SUBROUTINE cxios_set_domain_nvertex(domain_hdl, nvertex) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: domain_hdl
+      INTEGER (KIND=C_INT)      , VALUE :: nvertex
+    END SUBROUTINE cxios_set_domain_nvertex
+
+    SUBROUTINE cxios_get_domain_nvertex(domain_hdl, nvertex) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: domain_hdl
+      INTEGER (KIND=C_INT)             :: nvertex
+    END SUBROUTINE cxios_get_domain_nvertex
+
+    FUNCTION cxios_is_defined_domain_nvertex(domain_hdl) BIND(C)
+      USE ISO_C_BINDING
+      LOGICAL(kind=C_BOOL) :: cxios_is_defined_domain_nvertex
+      INTEGER (kind = C_INTPTR_T), VALUE :: domain_hdl
+    END FUNCTION cxios_is_defined_domain_nvertex
+
+
+    SUBROUTINE cxios_set_domain_prec(domain_hdl, prec) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: domain_hdl
+      INTEGER (KIND=C_INT)      , VALUE :: prec
+    END SUBROUTINE cxios_set_domain_prec
+
+    SUBROUTINE cxios_get_domain_prec(domain_hdl, prec) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: domain_hdl
+      INTEGER (KIND=C_INT)             :: prec
+    END SUBROUTINE cxios_get_domain_prec
+
+    FUNCTION cxios_is_defined_domain_prec(domain_hdl) BIND(C)
+      USE ISO_C_BINDING
+      LOGICAL(kind=C_BOOL) :: cxios_is_defined_domain_prec
+      INTEGER (kind = C_INTPTR_T), VALUE :: domain_hdl
+    END FUNCTION cxios_is_defined_domain_prec
+
+
+    SUBROUTINE cxios_set_domain_radius(domain_hdl, radius) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: domain_hdl
+      REAL (KIND=C_DOUBLE)      , VALUE :: radius
+    END SUBROUTINE cxios_set_domain_radius
+
+    SUBROUTINE cxios_get_domain_radius(domain_hdl, radius) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: domain_hdl
+      REAL (KIND=C_DOUBLE)             :: radius
+    END SUBROUTINE cxios_get_domain_radius
+
+    FUNCTION cxios_is_defined_domain_radius(domain_hdl) BIND(C)
+      USE ISO_C_BINDING
+      LOGICAL(kind=C_BOOL) :: cxios_is_defined_domain_radius
+      INTEGER (kind = C_INTPTR_T), VALUE :: domain_hdl
+    END FUNCTION cxios_is_defined_domain_radius
+
+
+    SUBROUTINE cxios_set_domain_standard_name(domain_hdl, standard_name, standard_name_size) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: domain_hdl
+      CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: standard_name
+      INTEGER  (kind = C_INT)     , VALUE        :: standard_name_size
+    END SUBROUTINE cxios_set_domain_standard_name
+
+    SUBROUTINE cxios_get_domain_standard_name(domain_hdl, standard_name, standard_name_size) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: domain_hdl
+      CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: standard_name
+      INTEGER  (kind = C_INT)     , VALUE        :: standard_name_size
+    END SUBROUTINE cxios_get_domain_standard_name
+
+    FUNCTION cxios_is_defined_domain_standard_name(domain_hdl) BIND(C)
+      USE ISO_C_BINDING
+      LOGICAL(kind=C_BOOL) :: cxios_is_defined_domain_standard_name
+      INTEGER (kind = C_INTPTR_T), VALUE :: domain_hdl
+    END FUNCTION cxios_is_defined_domain_standard_name
+
+
+    SUBROUTINE cxios_set_domain_type(domain_hdl, type, type_size) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: domain_hdl
+      CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: type
+      INTEGER  (kind = C_INT)     , VALUE        :: type_size
+    END SUBROUTINE cxios_set_domain_type
+
+    SUBROUTINE cxios_get_domain_type(domain_hdl, type, type_size) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: domain_hdl
+      CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: type
+      INTEGER  (kind = C_INT)     , VALUE        :: type_size
+    END SUBROUTINE cxios_get_domain_type
+
+    FUNCTION cxios_is_defined_domain_type(domain_hdl) BIND(C)
+      USE ISO_C_BINDING
+      LOGICAL(kind=C_BOOL) :: cxios_is_defined_domain_type
+      INTEGER (kind = C_INTPTR_T), VALUE :: domain_hdl
+    END FUNCTION cxios_is_defined_domain_type
+
+  END INTERFACE
+
+END MODULE domain_interface_attr
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/fortran_attr/domaingroup_interface_attr.F90
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/fortran_attr/domaingroup_interface_attr.F90	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/fortran_attr/domaingroup_interface_attr.F90	(revision 1749)
@@ -0,0 +1,867 @@
+! * ************************************************************************** *
+! *               Interface auto generated - do not modify                     *
+! * ************************************************************************** *
+#include "../fortran/xios_fortran_prefix.hpp"
+
+MODULE domaingroup_interface_attr
+  USE, INTRINSIC :: ISO_C_BINDING
+
+  INTERFACE
+    ! Do not call directly / interface FORTRAN 2003 <-> C99
+
+    SUBROUTINE cxios_set_domaingroup_area(domaingroup_hdl, area, extent) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE       :: domaingroup_hdl
+      REAL (KIND=C_DOUBLE)     , DIMENSION(*) :: area
+      INTEGER (kind = C_INT), DIMENSION(*)     :: extent
+    END SUBROUTINE cxios_set_domaingroup_area
+
+    SUBROUTINE cxios_get_domaingroup_area(domaingroup_hdl, area, extent) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE       :: domaingroup_hdl
+      REAL (KIND=C_DOUBLE)     , DIMENSION(*) :: area
+      INTEGER (kind = C_INT), DIMENSION(*)     :: extent
+    END SUBROUTINE cxios_get_domaingroup_area
+
+    FUNCTION cxios_is_defined_domaingroup_area(domaingroup_hdl) BIND(C)
+      USE ISO_C_BINDING
+      LOGICAL(kind=C_BOOL) :: cxios_is_defined_domaingroup_area
+      INTEGER (kind = C_INTPTR_T), VALUE :: domaingroup_hdl
+    END FUNCTION cxios_is_defined_domaingroup_area
+
+
+    SUBROUTINE cxios_set_domaingroup_bounds_lat_1d(domaingroup_hdl, bounds_lat_1d, extent) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE       :: domaingroup_hdl
+      REAL (KIND=C_DOUBLE)     , DIMENSION(*) :: bounds_lat_1d
+      INTEGER (kind = C_INT), DIMENSION(*)     :: extent
+    END SUBROUTINE cxios_set_domaingroup_bounds_lat_1d
+
+    SUBROUTINE cxios_get_domaingroup_bounds_lat_1d(domaingroup_hdl, bounds_lat_1d, extent) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE       :: domaingroup_hdl
+      REAL (KIND=C_DOUBLE)     , DIMENSION(*) :: bounds_lat_1d
+      INTEGER (kind = C_INT), DIMENSION(*)     :: extent
+    END SUBROUTINE cxios_get_domaingroup_bounds_lat_1d
+
+    FUNCTION cxios_is_defined_domaingroup_bounds_lat_1d(domaingroup_hdl) BIND(C)
+      USE ISO_C_BINDING
+      LOGICAL(kind=C_BOOL) :: cxios_is_defined_domaingroup_bounds_lat_1d
+      INTEGER (kind = C_INTPTR_T), VALUE :: domaingroup_hdl
+    END FUNCTION cxios_is_defined_domaingroup_bounds_lat_1d
+
+
+    SUBROUTINE cxios_set_domaingroup_bounds_lat_2d(domaingroup_hdl, bounds_lat_2d, extent) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE       :: domaingroup_hdl
+      REAL (KIND=C_DOUBLE)     , DIMENSION(*) :: bounds_lat_2d
+      INTEGER (kind = C_INT), DIMENSION(*)     :: extent
+    END SUBROUTINE cxios_set_domaingroup_bounds_lat_2d
+
+    SUBROUTINE cxios_get_domaingroup_bounds_lat_2d(domaingroup_hdl, bounds_lat_2d, extent) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE       :: domaingroup_hdl
+      REAL (KIND=C_DOUBLE)     , DIMENSION(*) :: bounds_lat_2d
+      INTEGER (kind = C_INT), DIMENSION(*)     :: extent
+    END SUBROUTINE cxios_get_domaingroup_bounds_lat_2d
+
+    FUNCTION cxios_is_defined_domaingroup_bounds_lat_2d(domaingroup_hdl) BIND(C)
+      USE ISO_C_BINDING
+      LOGICAL(kind=C_BOOL) :: cxios_is_defined_domaingroup_bounds_lat_2d
+      INTEGER (kind = C_INTPTR_T), VALUE :: domaingroup_hdl
+    END FUNCTION cxios_is_defined_domaingroup_bounds_lat_2d
+
+
+    SUBROUTINE cxios_set_domaingroup_bounds_lat_name(domaingroup_hdl, bounds_lat_name, bounds_lat_name_size) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: domaingroup_hdl
+      CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: bounds_lat_name
+      INTEGER  (kind = C_INT)     , VALUE        :: bounds_lat_name_size
+    END SUBROUTINE cxios_set_domaingroup_bounds_lat_name
+
+    SUBROUTINE cxios_get_domaingroup_bounds_lat_name(domaingroup_hdl, bounds_lat_name, bounds_lat_name_size) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: domaingroup_hdl
+      CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: bounds_lat_name
+      INTEGER  (kind = C_INT)     , VALUE        :: bounds_lat_name_size
+    END SUBROUTINE cxios_get_domaingroup_bounds_lat_name
+
+    FUNCTION cxios_is_defined_domaingroup_bounds_lat_name(domaingroup_hdl) BIND(C)
+      USE ISO_C_BINDING
+      LOGICAL(kind=C_BOOL) :: cxios_is_defined_domaingroup_bounds_lat_name
+      INTEGER (kind = C_INTPTR_T), VALUE :: domaingroup_hdl
+    END FUNCTION cxios_is_defined_domaingroup_bounds_lat_name
+
+
+    SUBROUTINE cxios_set_domaingroup_bounds_lon_1d(domaingroup_hdl, bounds_lon_1d, extent) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE       :: domaingroup_hdl
+      REAL (KIND=C_DOUBLE)     , DIMENSION(*) :: bounds_lon_1d
+      INTEGER (kind = C_INT), DIMENSION(*)     :: extent
+    END SUBROUTINE cxios_set_domaingroup_bounds_lon_1d
+
+    SUBROUTINE cxios_get_domaingroup_bounds_lon_1d(domaingroup_hdl, bounds_lon_1d, extent) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE       :: domaingroup_hdl
+      REAL (KIND=C_DOUBLE)     , DIMENSION(*) :: bounds_lon_1d
+      INTEGER (kind = C_INT), DIMENSION(*)     :: extent
+    END SUBROUTINE cxios_get_domaingroup_bounds_lon_1d
+
+    FUNCTION cxios_is_defined_domaingroup_bounds_lon_1d(domaingroup_hdl) BIND(C)
+      USE ISO_C_BINDING
+      LOGICAL(kind=C_BOOL) :: cxios_is_defined_domaingroup_bounds_lon_1d
+      INTEGER (kind = C_INTPTR_T), VALUE :: domaingroup_hdl
+    END FUNCTION cxios_is_defined_domaingroup_bounds_lon_1d
+
+
+    SUBROUTINE cxios_set_domaingroup_bounds_lon_2d(domaingroup_hdl, bounds_lon_2d, extent) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE       :: domaingroup_hdl
+      REAL (KIND=C_DOUBLE)     , DIMENSION(*) :: bounds_lon_2d
+      INTEGER (kind = C_INT), DIMENSION(*)     :: extent
+    END SUBROUTINE cxios_set_domaingroup_bounds_lon_2d
+
+    SUBROUTINE cxios_get_domaingroup_bounds_lon_2d(domaingroup_hdl, bounds_lon_2d, extent) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE       :: domaingroup_hdl
+      REAL (KIND=C_DOUBLE)     , DIMENSION(*) :: bounds_lon_2d
+      INTEGER (kind = C_INT), DIMENSION(*)     :: extent
+    END SUBROUTINE cxios_get_domaingroup_bounds_lon_2d
+
+    FUNCTION cxios_is_defined_domaingroup_bounds_lon_2d(domaingroup_hdl) BIND(C)
+      USE ISO_C_BINDING
+      LOGICAL(kind=C_BOOL) :: cxios_is_defined_domaingroup_bounds_lon_2d
+      INTEGER (kind = C_INTPTR_T), VALUE :: domaingroup_hdl
+    END FUNCTION cxios_is_defined_domaingroup_bounds_lon_2d
+
+
+    SUBROUTINE cxios_set_domaingroup_bounds_lon_name(domaingroup_hdl, bounds_lon_name, bounds_lon_name_size) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: domaingroup_hdl
+      CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: bounds_lon_name
+      INTEGER  (kind = C_INT)     , VALUE        :: bounds_lon_name_size
+    END SUBROUTINE cxios_set_domaingroup_bounds_lon_name
+
+    SUBROUTINE cxios_get_domaingroup_bounds_lon_name(domaingroup_hdl, bounds_lon_name, bounds_lon_name_size) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: domaingroup_hdl
+      CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: bounds_lon_name
+      INTEGER  (kind = C_INT)     , VALUE        :: bounds_lon_name_size
+    END SUBROUTINE cxios_get_domaingroup_bounds_lon_name
+
+    FUNCTION cxios_is_defined_domaingroup_bounds_lon_name(domaingroup_hdl) BIND(C)
+      USE ISO_C_BINDING
+      LOGICAL(kind=C_BOOL) :: cxios_is_defined_domaingroup_bounds_lon_name
+      INTEGER (kind = C_INTPTR_T), VALUE :: domaingroup_hdl
+    END FUNCTION cxios_is_defined_domaingroup_bounds_lon_name
+
+
+    SUBROUTINE cxios_set_domaingroup_comment(domaingroup_hdl, comment, comment_size) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: domaingroup_hdl
+      CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: comment
+      INTEGER  (kind = C_INT)     , VALUE        :: comment_size
+    END SUBROUTINE cxios_set_domaingroup_comment
+
+    SUBROUTINE cxios_get_domaingroup_comment(domaingroup_hdl, comment, comment_size) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: domaingroup_hdl
+      CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: comment
+      INTEGER  (kind = C_INT)     , VALUE        :: comment_size
+    END SUBROUTINE cxios_get_domaingroup_comment
+
+    FUNCTION cxios_is_defined_domaingroup_comment(domaingroup_hdl) BIND(C)
+      USE ISO_C_BINDING
+      LOGICAL(kind=C_BOOL) :: cxios_is_defined_domaingroup_comment
+      INTEGER (kind = C_INTPTR_T), VALUE :: domaingroup_hdl
+    END FUNCTION cxios_is_defined_domaingroup_comment
+
+
+    SUBROUTINE cxios_set_domaingroup_data_dim(domaingroup_hdl, data_dim) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: domaingroup_hdl
+      INTEGER (KIND=C_INT)      , VALUE :: data_dim
+    END SUBROUTINE cxios_set_domaingroup_data_dim
+
+    SUBROUTINE cxios_get_domaingroup_data_dim(domaingroup_hdl, data_dim) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: domaingroup_hdl
+      INTEGER (KIND=C_INT)             :: data_dim
+    END SUBROUTINE cxios_get_domaingroup_data_dim
+
+    FUNCTION cxios_is_defined_domaingroup_data_dim(domaingroup_hdl) BIND(C)
+      USE ISO_C_BINDING
+      LOGICAL(kind=C_BOOL) :: cxios_is_defined_domaingroup_data_dim
+      INTEGER (kind = C_INTPTR_T), VALUE :: domaingroup_hdl
+    END FUNCTION cxios_is_defined_domaingroup_data_dim
+
+
+    SUBROUTINE cxios_set_domaingroup_data_i_index(domaingroup_hdl, data_i_index, extent) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE       :: domaingroup_hdl
+      INTEGER (KIND=C_INT)     , DIMENSION(*) :: data_i_index
+      INTEGER (kind = C_INT), DIMENSION(*)     :: extent
+    END SUBROUTINE cxios_set_domaingroup_data_i_index
+
+    SUBROUTINE cxios_get_domaingroup_data_i_index(domaingroup_hdl, data_i_index, extent) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE       :: domaingroup_hdl
+      INTEGER (KIND=C_INT)     , DIMENSION(*) :: data_i_index
+      INTEGER (kind = C_INT), DIMENSION(*)     :: extent
+    END SUBROUTINE cxios_get_domaingroup_data_i_index
+
+    FUNCTION cxios_is_defined_domaingroup_data_i_index(domaingroup_hdl) BIND(C)
+      USE ISO_C_BINDING
+      LOGICAL(kind=C_BOOL) :: cxios_is_defined_domaingroup_data_i_index
+      INTEGER (kind = C_INTPTR_T), VALUE :: domaingroup_hdl
+    END FUNCTION cxios_is_defined_domaingroup_data_i_index
+
+
+    SUBROUTINE cxios_set_domaingroup_data_ibegin(domaingroup_hdl, data_ibegin) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: domaingroup_hdl
+      INTEGER (KIND=C_INT)      , VALUE :: data_ibegin
+    END SUBROUTINE cxios_set_domaingroup_data_ibegin
+
+    SUBROUTINE cxios_get_domaingroup_data_ibegin(domaingroup_hdl, data_ibegin) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: domaingroup_hdl
+      INTEGER (KIND=C_INT)             :: data_ibegin
+    END SUBROUTINE cxios_get_domaingroup_data_ibegin
+
+    FUNCTION cxios_is_defined_domaingroup_data_ibegin(domaingroup_hdl) BIND(C)
+      USE ISO_C_BINDING
+      LOGICAL(kind=C_BOOL) :: cxios_is_defined_domaingroup_data_ibegin
+      INTEGER (kind = C_INTPTR_T), VALUE :: domaingroup_hdl
+    END FUNCTION cxios_is_defined_domaingroup_data_ibegin
+
+
+    SUBROUTINE cxios_set_domaingroup_data_j_index(domaingroup_hdl, data_j_index, extent) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE       :: domaingroup_hdl
+      INTEGER (KIND=C_INT)     , DIMENSION(*) :: data_j_index
+      INTEGER (kind = C_INT), DIMENSION(*)     :: extent
+    END SUBROUTINE cxios_set_domaingroup_data_j_index
+
+    SUBROUTINE cxios_get_domaingroup_data_j_index(domaingroup_hdl, data_j_index, extent) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE       :: domaingroup_hdl
+      INTEGER (KIND=C_INT)     , DIMENSION(*) :: data_j_index
+      INTEGER (kind = C_INT), DIMENSION(*)     :: extent
+    END SUBROUTINE cxios_get_domaingroup_data_j_index
+
+    FUNCTION cxios_is_defined_domaingroup_data_j_index(domaingroup_hdl) BIND(C)
+      USE ISO_C_BINDING
+      LOGICAL(kind=C_BOOL) :: cxios_is_defined_domaingroup_data_j_index
+      INTEGER (kind = C_INTPTR_T), VALUE :: domaingroup_hdl
+    END FUNCTION cxios_is_defined_domaingroup_data_j_index
+
+
+    SUBROUTINE cxios_set_domaingroup_data_jbegin(domaingroup_hdl, data_jbegin) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: domaingroup_hdl
+      INTEGER (KIND=C_INT)      , VALUE :: data_jbegin
+    END SUBROUTINE cxios_set_domaingroup_data_jbegin
+
+    SUBROUTINE cxios_get_domaingroup_data_jbegin(domaingroup_hdl, data_jbegin) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: domaingroup_hdl
+      INTEGER (KIND=C_INT)             :: data_jbegin
+    END SUBROUTINE cxios_get_domaingroup_data_jbegin
+
+    FUNCTION cxios_is_defined_domaingroup_data_jbegin(domaingroup_hdl) BIND(C)
+      USE ISO_C_BINDING
+      LOGICAL(kind=C_BOOL) :: cxios_is_defined_domaingroup_data_jbegin
+      INTEGER (kind = C_INTPTR_T), VALUE :: domaingroup_hdl
+    END FUNCTION cxios_is_defined_domaingroup_data_jbegin
+
+
+    SUBROUTINE cxios_set_domaingroup_data_ni(domaingroup_hdl, data_ni) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: domaingroup_hdl
+      INTEGER (KIND=C_INT)      , VALUE :: data_ni
+    END SUBROUTINE cxios_set_domaingroup_data_ni
+
+    SUBROUTINE cxios_get_domaingroup_data_ni(domaingroup_hdl, data_ni) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: domaingroup_hdl
+      INTEGER (KIND=C_INT)             :: data_ni
+    END SUBROUTINE cxios_get_domaingroup_data_ni
+
+    FUNCTION cxios_is_defined_domaingroup_data_ni(domaingroup_hdl) BIND(C)
+      USE ISO_C_BINDING
+      LOGICAL(kind=C_BOOL) :: cxios_is_defined_domaingroup_data_ni
+      INTEGER (kind = C_INTPTR_T), VALUE :: domaingroup_hdl
+    END FUNCTION cxios_is_defined_domaingroup_data_ni
+
+
+    SUBROUTINE cxios_set_domaingroup_data_nj(domaingroup_hdl, data_nj) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: domaingroup_hdl
+      INTEGER (KIND=C_INT)      , VALUE :: data_nj
+    END SUBROUTINE cxios_set_domaingroup_data_nj
+
+    SUBROUTINE cxios_get_domaingroup_data_nj(domaingroup_hdl, data_nj) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: domaingroup_hdl
+      INTEGER (KIND=C_INT)             :: data_nj
+    END SUBROUTINE cxios_get_domaingroup_data_nj
+
+    FUNCTION cxios_is_defined_domaingroup_data_nj(domaingroup_hdl) BIND(C)
+      USE ISO_C_BINDING
+      LOGICAL(kind=C_BOOL) :: cxios_is_defined_domaingroup_data_nj
+      INTEGER (kind = C_INTPTR_T), VALUE :: domaingroup_hdl
+    END FUNCTION cxios_is_defined_domaingroup_data_nj
+
+
+    SUBROUTINE cxios_set_domaingroup_dim_i_name(domaingroup_hdl, dim_i_name, dim_i_name_size) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: domaingroup_hdl
+      CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: dim_i_name
+      INTEGER  (kind = C_INT)     , VALUE        :: dim_i_name_size
+    END SUBROUTINE cxios_set_domaingroup_dim_i_name
+
+    SUBROUTINE cxios_get_domaingroup_dim_i_name(domaingroup_hdl, dim_i_name, dim_i_name_size) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: domaingroup_hdl
+      CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: dim_i_name
+      INTEGER  (kind = C_INT)     , VALUE        :: dim_i_name_size
+    END SUBROUTINE cxios_get_domaingroup_dim_i_name
+
+    FUNCTION cxios_is_defined_domaingroup_dim_i_name(domaingroup_hdl) BIND(C)
+      USE ISO_C_BINDING
+      LOGICAL(kind=C_BOOL) :: cxios_is_defined_domaingroup_dim_i_name
+      INTEGER (kind = C_INTPTR_T), VALUE :: domaingroup_hdl
+    END FUNCTION cxios_is_defined_domaingroup_dim_i_name
+
+
+    SUBROUTINE cxios_set_domaingroup_dim_j_name(domaingroup_hdl, dim_j_name, dim_j_name_size) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: domaingroup_hdl
+      CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: dim_j_name
+      INTEGER  (kind = C_INT)     , VALUE        :: dim_j_name_size
+    END SUBROUTINE cxios_set_domaingroup_dim_j_name
+
+    SUBROUTINE cxios_get_domaingroup_dim_j_name(domaingroup_hdl, dim_j_name, dim_j_name_size) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: domaingroup_hdl
+      CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: dim_j_name
+      INTEGER  (kind = C_INT)     , VALUE        :: dim_j_name_size
+    END SUBROUTINE cxios_get_domaingroup_dim_j_name
+
+    FUNCTION cxios_is_defined_domaingroup_dim_j_name(domaingroup_hdl) BIND(C)
+      USE ISO_C_BINDING
+      LOGICAL(kind=C_BOOL) :: cxios_is_defined_domaingroup_dim_j_name
+      INTEGER (kind = C_INTPTR_T), VALUE :: domaingroup_hdl
+    END FUNCTION cxios_is_defined_domaingroup_dim_j_name
+
+
+    SUBROUTINE cxios_set_domaingroup_domain_ref(domaingroup_hdl, domain_ref, domain_ref_size) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: domaingroup_hdl
+      CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: domain_ref
+      INTEGER  (kind = C_INT)     , VALUE        :: domain_ref_size
+    END SUBROUTINE cxios_set_domaingroup_domain_ref
+
+    SUBROUTINE cxios_get_domaingroup_domain_ref(domaingroup_hdl, domain_ref, domain_ref_size) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: domaingroup_hdl
+      CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: domain_ref
+      INTEGER  (kind = C_INT)     , VALUE        :: domain_ref_size
+    END SUBROUTINE cxios_get_domaingroup_domain_ref
+
+    FUNCTION cxios_is_defined_domaingroup_domain_ref(domaingroup_hdl) BIND(C)
+      USE ISO_C_BINDING
+      LOGICAL(kind=C_BOOL) :: cxios_is_defined_domaingroup_domain_ref
+      INTEGER (kind = C_INTPTR_T), VALUE :: domaingroup_hdl
+    END FUNCTION cxios_is_defined_domaingroup_domain_ref
+
+
+    SUBROUTINE cxios_set_domaingroup_group_ref(domaingroup_hdl, group_ref, group_ref_size) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: domaingroup_hdl
+      CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: group_ref
+      INTEGER  (kind = C_INT)     , VALUE        :: group_ref_size
+    END SUBROUTINE cxios_set_domaingroup_group_ref
+
+    SUBROUTINE cxios_get_domaingroup_group_ref(domaingroup_hdl, group_ref, group_ref_size) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: domaingroup_hdl
+      CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: group_ref
+      INTEGER  (kind = C_INT)     , VALUE        :: group_ref_size
+    END SUBROUTINE cxios_get_domaingroup_group_ref
+
+    FUNCTION cxios_is_defined_domaingroup_group_ref(domaingroup_hdl) BIND(C)
+      USE ISO_C_BINDING
+      LOGICAL(kind=C_BOOL) :: cxios_is_defined_domaingroup_group_ref
+      INTEGER (kind = C_INTPTR_T), VALUE :: domaingroup_hdl
+    END FUNCTION cxios_is_defined_domaingroup_group_ref
+
+
+    SUBROUTINE cxios_set_domaingroup_i_index(domaingroup_hdl, i_index, extent) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE       :: domaingroup_hdl
+      INTEGER (KIND=C_INT)     , DIMENSION(*) :: i_index
+      INTEGER (kind = C_INT), DIMENSION(*)     :: extent
+    END SUBROUTINE cxios_set_domaingroup_i_index
+
+    SUBROUTINE cxios_get_domaingroup_i_index(domaingroup_hdl, i_index, extent) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE       :: domaingroup_hdl
+      INTEGER (KIND=C_INT)     , DIMENSION(*) :: i_index
+      INTEGER (kind = C_INT), DIMENSION(*)     :: extent
+    END SUBROUTINE cxios_get_domaingroup_i_index
+
+    FUNCTION cxios_is_defined_domaingroup_i_index(domaingroup_hdl) BIND(C)
+      USE ISO_C_BINDING
+      LOGICAL(kind=C_BOOL) :: cxios_is_defined_domaingroup_i_index
+      INTEGER (kind = C_INTPTR_T), VALUE :: domaingroup_hdl
+    END FUNCTION cxios_is_defined_domaingroup_i_index
+
+
+    SUBROUTINE cxios_set_domaingroup_ibegin(domaingroup_hdl, ibegin) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: domaingroup_hdl
+      INTEGER (KIND=C_INT)      , VALUE :: ibegin
+    END SUBROUTINE cxios_set_domaingroup_ibegin
+
+    SUBROUTINE cxios_get_domaingroup_ibegin(domaingroup_hdl, ibegin) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: domaingroup_hdl
+      INTEGER (KIND=C_INT)             :: ibegin
+    END SUBROUTINE cxios_get_domaingroup_ibegin
+
+    FUNCTION cxios_is_defined_domaingroup_ibegin(domaingroup_hdl) BIND(C)
+      USE ISO_C_BINDING
+      LOGICAL(kind=C_BOOL) :: cxios_is_defined_domaingroup_ibegin
+      INTEGER (kind = C_INTPTR_T), VALUE :: domaingroup_hdl
+    END FUNCTION cxios_is_defined_domaingroup_ibegin
+
+
+    SUBROUTINE cxios_set_domaingroup_j_index(domaingroup_hdl, j_index, extent) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE       :: domaingroup_hdl
+      INTEGER (KIND=C_INT)     , DIMENSION(*) :: j_index
+      INTEGER (kind = C_INT), DIMENSION(*)     :: extent
+    END SUBROUTINE cxios_set_domaingroup_j_index
+
+    SUBROUTINE cxios_get_domaingroup_j_index(domaingroup_hdl, j_index, extent) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE       :: domaingroup_hdl
+      INTEGER (KIND=C_INT)     , DIMENSION(*) :: j_index
+      INTEGER (kind = C_INT), DIMENSION(*)     :: extent
+    END SUBROUTINE cxios_get_domaingroup_j_index
+
+    FUNCTION cxios_is_defined_domaingroup_j_index(domaingroup_hdl) BIND(C)
+      USE ISO_C_BINDING
+      LOGICAL(kind=C_BOOL) :: cxios_is_defined_domaingroup_j_index
+      INTEGER (kind = C_INTPTR_T), VALUE :: domaingroup_hdl
+    END FUNCTION cxios_is_defined_domaingroup_j_index
+
+
+    SUBROUTINE cxios_set_domaingroup_jbegin(domaingroup_hdl, jbegin) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: domaingroup_hdl
+      INTEGER (KIND=C_INT)      , VALUE :: jbegin
+    END SUBROUTINE cxios_set_domaingroup_jbegin
+
+    SUBROUTINE cxios_get_domaingroup_jbegin(domaingroup_hdl, jbegin) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: domaingroup_hdl
+      INTEGER (KIND=C_INT)             :: jbegin
+    END SUBROUTINE cxios_get_domaingroup_jbegin
+
+    FUNCTION cxios_is_defined_domaingroup_jbegin(domaingroup_hdl) BIND(C)
+      USE ISO_C_BINDING
+      LOGICAL(kind=C_BOOL) :: cxios_is_defined_domaingroup_jbegin
+      INTEGER (kind = C_INTPTR_T), VALUE :: domaingroup_hdl
+    END FUNCTION cxios_is_defined_domaingroup_jbegin
+
+
+    SUBROUTINE cxios_set_domaingroup_lat_name(domaingroup_hdl, lat_name, lat_name_size) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: domaingroup_hdl
+      CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: lat_name
+      INTEGER  (kind = C_INT)     , VALUE        :: lat_name_size
+    END SUBROUTINE cxios_set_domaingroup_lat_name
+
+    SUBROUTINE cxios_get_domaingroup_lat_name(domaingroup_hdl, lat_name, lat_name_size) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: domaingroup_hdl
+      CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: lat_name
+      INTEGER  (kind = C_INT)     , VALUE        :: lat_name_size
+    END SUBROUTINE cxios_get_domaingroup_lat_name
+
+    FUNCTION cxios_is_defined_domaingroup_lat_name(domaingroup_hdl) BIND(C)
+      USE ISO_C_BINDING
+      LOGICAL(kind=C_BOOL) :: cxios_is_defined_domaingroup_lat_name
+      INTEGER (kind = C_INTPTR_T), VALUE :: domaingroup_hdl
+    END FUNCTION cxios_is_defined_domaingroup_lat_name
+
+
+    SUBROUTINE cxios_set_domaingroup_latvalue_1d(domaingroup_hdl, latvalue_1d, extent) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE       :: domaingroup_hdl
+      REAL (KIND=C_DOUBLE)     , DIMENSION(*) :: latvalue_1d
+      INTEGER (kind = C_INT), DIMENSION(*)     :: extent
+    END SUBROUTINE cxios_set_domaingroup_latvalue_1d
+
+    SUBROUTINE cxios_get_domaingroup_latvalue_1d(domaingroup_hdl, latvalue_1d, extent) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE       :: domaingroup_hdl
+      REAL (KIND=C_DOUBLE)     , DIMENSION(*) :: latvalue_1d
+      INTEGER (kind = C_INT), DIMENSION(*)     :: extent
+    END SUBROUTINE cxios_get_domaingroup_latvalue_1d
+
+    FUNCTION cxios_is_defined_domaingroup_latvalue_1d(domaingroup_hdl) BIND(C)
+      USE ISO_C_BINDING
+      LOGICAL(kind=C_BOOL) :: cxios_is_defined_domaingroup_latvalue_1d
+      INTEGER (kind = C_INTPTR_T), VALUE :: domaingroup_hdl
+    END FUNCTION cxios_is_defined_domaingroup_latvalue_1d
+
+
+    SUBROUTINE cxios_set_domaingroup_latvalue_2d(domaingroup_hdl, latvalue_2d, extent) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE       :: domaingroup_hdl
+      REAL (KIND=C_DOUBLE)     , DIMENSION(*) :: latvalue_2d
+      INTEGER (kind = C_INT), DIMENSION(*)     :: extent
+    END SUBROUTINE cxios_set_domaingroup_latvalue_2d
+
+    SUBROUTINE cxios_get_domaingroup_latvalue_2d(domaingroup_hdl, latvalue_2d, extent) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE       :: domaingroup_hdl
+      REAL (KIND=C_DOUBLE)     , DIMENSION(*) :: latvalue_2d
+      INTEGER (kind = C_INT), DIMENSION(*)     :: extent
+    END SUBROUTINE cxios_get_domaingroup_latvalue_2d
+
+    FUNCTION cxios_is_defined_domaingroup_latvalue_2d(domaingroup_hdl) BIND(C)
+      USE ISO_C_BINDING
+      LOGICAL(kind=C_BOOL) :: cxios_is_defined_domaingroup_latvalue_2d
+      INTEGER (kind = C_INTPTR_T), VALUE :: domaingroup_hdl
+    END FUNCTION cxios_is_defined_domaingroup_latvalue_2d
+
+
+    SUBROUTINE cxios_set_domaingroup_lon_name(domaingroup_hdl, lon_name, lon_name_size) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: domaingroup_hdl
+      CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: lon_name
+      INTEGER  (kind = C_INT)     , VALUE        :: lon_name_size
+    END SUBROUTINE cxios_set_domaingroup_lon_name
+
+    SUBROUTINE cxios_get_domaingroup_lon_name(domaingroup_hdl, lon_name, lon_name_size) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: domaingroup_hdl
+      CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: lon_name
+      INTEGER  (kind = C_INT)     , VALUE        :: lon_name_size
+    END SUBROUTINE cxios_get_domaingroup_lon_name
+
+    FUNCTION cxios_is_defined_domaingroup_lon_name(domaingroup_hdl) BIND(C)
+      USE ISO_C_BINDING
+      LOGICAL(kind=C_BOOL) :: cxios_is_defined_domaingroup_lon_name
+      INTEGER (kind = C_INTPTR_T), VALUE :: domaingroup_hdl
+    END FUNCTION cxios_is_defined_domaingroup_lon_name
+
+
+    SUBROUTINE cxios_set_domaingroup_long_name(domaingroup_hdl, long_name, long_name_size) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: domaingroup_hdl
+      CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: long_name
+      INTEGER  (kind = C_INT)     , VALUE        :: long_name_size
+    END SUBROUTINE cxios_set_domaingroup_long_name
+
+    SUBROUTINE cxios_get_domaingroup_long_name(domaingroup_hdl, long_name, long_name_size) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: domaingroup_hdl
+      CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: long_name
+      INTEGER  (kind = C_INT)     , VALUE        :: long_name_size
+    END SUBROUTINE cxios_get_domaingroup_long_name
+
+    FUNCTION cxios_is_defined_domaingroup_long_name(domaingroup_hdl) BIND(C)
+      USE ISO_C_BINDING
+      LOGICAL(kind=C_BOOL) :: cxios_is_defined_domaingroup_long_name
+      INTEGER (kind = C_INTPTR_T), VALUE :: domaingroup_hdl
+    END FUNCTION cxios_is_defined_domaingroup_long_name
+
+
+    SUBROUTINE cxios_set_domaingroup_lonvalue_1d(domaingroup_hdl, lonvalue_1d, extent) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE       :: domaingroup_hdl
+      REAL (KIND=C_DOUBLE)     , DIMENSION(*) :: lonvalue_1d
+      INTEGER (kind = C_INT), DIMENSION(*)     :: extent
+    END SUBROUTINE cxios_set_domaingroup_lonvalue_1d
+
+    SUBROUTINE cxios_get_domaingroup_lonvalue_1d(domaingroup_hdl, lonvalue_1d, extent) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE       :: domaingroup_hdl
+      REAL (KIND=C_DOUBLE)     , DIMENSION(*) :: lonvalue_1d
+      INTEGER (kind = C_INT), DIMENSION(*)     :: extent
+    END SUBROUTINE cxios_get_domaingroup_lonvalue_1d
+
+    FUNCTION cxios_is_defined_domaingroup_lonvalue_1d(domaingroup_hdl) BIND(C)
+      USE ISO_C_BINDING
+      LOGICAL(kind=C_BOOL) :: cxios_is_defined_domaingroup_lonvalue_1d
+      INTEGER (kind = C_INTPTR_T), VALUE :: domaingroup_hdl
+    END FUNCTION cxios_is_defined_domaingroup_lonvalue_1d
+
+
+    SUBROUTINE cxios_set_domaingroup_lonvalue_2d(domaingroup_hdl, lonvalue_2d, extent) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE       :: domaingroup_hdl
+      REAL (KIND=C_DOUBLE)     , DIMENSION(*) :: lonvalue_2d
+      INTEGER (kind = C_INT), DIMENSION(*)     :: extent
+    END SUBROUTINE cxios_set_domaingroup_lonvalue_2d
+
+    SUBROUTINE cxios_get_domaingroup_lonvalue_2d(domaingroup_hdl, lonvalue_2d, extent) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE       :: domaingroup_hdl
+      REAL (KIND=C_DOUBLE)     , DIMENSION(*) :: lonvalue_2d
+      INTEGER (kind = C_INT), DIMENSION(*)     :: extent
+    END SUBROUTINE cxios_get_domaingroup_lonvalue_2d
+
+    FUNCTION cxios_is_defined_domaingroup_lonvalue_2d(domaingroup_hdl) BIND(C)
+      USE ISO_C_BINDING
+      LOGICAL(kind=C_BOOL) :: cxios_is_defined_domaingroup_lonvalue_2d
+      INTEGER (kind = C_INTPTR_T), VALUE :: domaingroup_hdl
+    END FUNCTION cxios_is_defined_domaingroup_lonvalue_2d
+
+
+    SUBROUTINE cxios_set_domaingroup_mask_1d(domaingroup_hdl, mask_1d, extent) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE       :: domaingroup_hdl
+      LOGICAL (KIND=C_BOOL)     , DIMENSION(*) :: mask_1d
+      INTEGER (kind = C_INT), DIMENSION(*)     :: extent
+    END SUBROUTINE cxios_set_domaingroup_mask_1d
+
+    SUBROUTINE cxios_get_domaingroup_mask_1d(domaingroup_hdl, mask_1d, extent) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE       :: domaingroup_hdl
+      LOGICAL (KIND=C_BOOL)     , DIMENSION(*) :: mask_1d
+      INTEGER (kind = C_INT), DIMENSION(*)     :: extent
+    END SUBROUTINE cxios_get_domaingroup_mask_1d
+
+    FUNCTION cxios_is_defined_domaingroup_mask_1d(domaingroup_hdl) BIND(C)
+      USE ISO_C_BINDING
+      LOGICAL(kind=C_BOOL) :: cxios_is_defined_domaingroup_mask_1d
+      INTEGER (kind = C_INTPTR_T), VALUE :: domaingroup_hdl
+    END FUNCTION cxios_is_defined_domaingroup_mask_1d
+
+
+    SUBROUTINE cxios_set_domaingroup_mask_2d(domaingroup_hdl, mask_2d, extent) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE       :: domaingroup_hdl
+      LOGICAL (KIND=C_BOOL)     , DIMENSION(*) :: mask_2d
+      INTEGER (kind = C_INT), DIMENSION(*)     :: extent
+    END SUBROUTINE cxios_set_domaingroup_mask_2d
+
+    SUBROUTINE cxios_get_domaingroup_mask_2d(domaingroup_hdl, mask_2d, extent) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE       :: domaingroup_hdl
+      LOGICAL (KIND=C_BOOL)     , DIMENSION(*) :: mask_2d
+      INTEGER (kind = C_INT), DIMENSION(*)     :: extent
+    END SUBROUTINE cxios_get_domaingroup_mask_2d
+
+    FUNCTION cxios_is_defined_domaingroup_mask_2d(domaingroup_hdl) BIND(C)
+      USE ISO_C_BINDING
+      LOGICAL(kind=C_BOOL) :: cxios_is_defined_domaingroup_mask_2d
+      INTEGER (kind = C_INTPTR_T), VALUE :: domaingroup_hdl
+    END FUNCTION cxios_is_defined_domaingroup_mask_2d
+
+
+    SUBROUTINE cxios_set_domaingroup_name(domaingroup_hdl, name, name_size) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: domaingroup_hdl
+      CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: name
+      INTEGER  (kind = C_INT)     , VALUE        :: name_size
+    END SUBROUTINE cxios_set_domaingroup_name
+
+    SUBROUTINE cxios_get_domaingroup_name(domaingroup_hdl, name, name_size) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: domaingroup_hdl
+      CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: name
+      INTEGER  (kind = C_INT)     , VALUE        :: name_size
+    END SUBROUTINE cxios_get_domaingroup_name
+
+    FUNCTION cxios_is_defined_domaingroup_name(domaingroup_hdl) BIND(C)
+      USE ISO_C_BINDING
+      LOGICAL(kind=C_BOOL) :: cxios_is_defined_domaingroup_name
+      INTEGER (kind = C_INTPTR_T), VALUE :: domaingroup_hdl
+    END FUNCTION cxios_is_defined_domaingroup_name
+
+
+    SUBROUTINE cxios_set_domaingroup_ni(domaingroup_hdl, ni) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: domaingroup_hdl
+      INTEGER (KIND=C_INT)      , VALUE :: ni
+    END SUBROUTINE cxios_set_domaingroup_ni
+
+    SUBROUTINE cxios_get_domaingroup_ni(domaingroup_hdl, ni) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: domaingroup_hdl
+      INTEGER (KIND=C_INT)             :: ni
+    END SUBROUTINE cxios_get_domaingroup_ni
+
+    FUNCTION cxios_is_defined_domaingroup_ni(domaingroup_hdl) BIND(C)
+      USE ISO_C_BINDING
+      LOGICAL(kind=C_BOOL) :: cxios_is_defined_domaingroup_ni
+      INTEGER (kind = C_INTPTR_T), VALUE :: domaingroup_hdl
+    END FUNCTION cxios_is_defined_domaingroup_ni
+
+
+    SUBROUTINE cxios_set_domaingroup_ni_glo(domaingroup_hdl, ni_glo) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: domaingroup_hdl
+      INTEGER (KIND=C_INT)      , VALUE :: ni_glo
+    END SUBROUTINE cxios_set_domaingroup_ni_glo
+
+    SUBROUTINE cxios_get_domaingroup_ni_glo(domaingroup_hdl, ni_glo) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: domaingroup_hdl
+      INTEGER (KIND=C_INT)             :: ni_glo
+    END SUBROUTINE cxios_get_domaingroup_ni_glo
+
+    FUNCTION cxios_is_defined_domaingroup_ni_glo(domaingroup_hdl) BIND(C)
+      USE ISO_C_BINDING
+      LOGICAL(kind=C_BOOL) :: cxios_is_defined_domaingroup_ni_glo
+      INTEGER (kind = C_INTPTR_T), VALUE :: domaingroup_hdl
+    END FUNCTION cxios_is_defined_domaingroup_ni_glo
+
+
+    SUBROUTINE cxios_set_domaingroup_nj(domaingroup_hdl, nj) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: domaingroup_hdl
+      INTEGER (KIND=C_INT)      , VALUE :: nj
+    END SUBROUTINE cxios_set_domaingroup_nj
+
+    SUBROUTINE cxios_get_domaingroup_nj(domaingroup_hdl, nj) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: domaingroup_hdl
+      INTEGER (KIND=C_INT)             :: nj
+    END SUBROUTINE cxios_get_domaingroup_nj
+
+    FUNCTION cxios_is_defined_domaingroup_nj(domaingroup_hdl) BIND(C)
+      USE ISO_C_BINDING
+      LOGICAL(kind=C_BOOL) :: cxios_is_defined_domaingroup_nj
+      INTEGER (kind = C_INTPTR_T), VALUE :: domaingroup_hdl
+    END FUNCTION cxios_is_defined_domaingroup_nj
+
+
+    SUBROUTINE cxios_set_domaingroup_nj_glo(domaingroup_hdl, nj_glo) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: domaingroup_hdl
+      INTEGER (KIND=C_INT)      , VALUE :: nj_glo
+    END SUBROUTINE cxios_set_domaingroup_nj_glo
+
+    SUBROUTINE cxios_get_domaingroup_nj_glo(domaingroup_hdl, nj_glo) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: domaingroup_hdl
+      INTEGER (KIND=C_INT)             :: nj_glo
+    END SUBROUTINE cxios_get_domaingroup_nj_glo
+
+    FUNCTION cxios_is_defined_domaingroup_nj_glo(domaingroup_hdl) BIND(C)
+      USE ISO_C_BINDING
+      LOGICAL(kind=C_BOOL) :: cxios_is_defined_domaingroup_nj_glo
+      INTEGER (kind = C_INTPTR_T), VALUE :: domaingroup_hdl
+    END FUNCTION cxios_is_defined_domaingroup_nj_glo
+
+
+    SUBROUTINE cxios_set_domaingroup_nvertex(domaingroup_hdl, nvertex) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: domaingroup_hdl
+      INTEGER (KIND=C_INT)      , VALUE :: nvertex
+    END SUBROUTINE cxios_set_domaingroup_nvertex
+
+    SUBROUTINE cxios_get_domaingroup_nvertex(domaingroup_hdl, nvertex) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: domaingroup_hdl
+      INTEGER (KIND=C_INT)             :: nvertex
+    END SUBROUTINE cxios_get_domaingroup_nvertex
+
+    FUNCTION cxios_is_defined_domaingroup_nvertex(domaingroup_hdl) BIND(C)
+      USE ISO_C_BINDING
+      LOGICAL(kind=C_BOOL) :: cxios_is_defined_domaingroup_nvertex
+      INTEGER (kind = C_INTPTR_T), VALUE :: domaingroup_hdl
+    END FUNCTION cxios_is_defined_domaingroup_nvertex
+
+
+    SUBROUTINE cxios_set_domaingroup_prec(domaingroup_hdl, prec) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: domaingroup_hdl
+      INTEGER (KIND=C_INT)      , VALUE :: prec
+    END SUBROUTINE cxios_set_domaingroup_prec
+
+    SUBROUTINE cxios_get_domaingroup_prec(domaingroup_hdl, prec) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: domaingroup_hdl
+      INTEGER (KIND=C_INT)             :: prec
+    END SUBROUTINE cxios_get_domaingroup_prec
+
+    FUNCTION cxios_is_defined_domaingroup_prec(domaingroup_hdl) BIND(C)
+      USE ISO_C_BINDING
+      LOGICAL(kind=C_BOOL) :: cxios_is_defined_domaingroup_prec
+      INTEGER (kind = C_INTPTR_T), VALUE :: domaingroup_hdl
+    END FUNCTION cxios_is_defined_domaingroup_prec
+
+
+    SUBROUTINE cxios_set_domaingroup_radius(domaingroup_hdl, radius) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: domaingroup_hdl
+      REAL (KIND=C_DOUBLE)      , VALUE :: radius
+    END SUBROUTINE cxios_set_domaingroup_radius
+
+    SUBROUTINE cxios_get_domaingroup_radius(domaingroup_hdl, radius) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: domaingroup_hdl
+      REAL (KIND=C_DOUBLE)             :: radius
+    END SUBROUTINE cxios_get_domaingroup_radius
+
+    FUNCTION cxios_is_defined_domaingroup_radius(domaingroup_hdl) BIND(C)
+      USE ISO_C_BINDING
+      LOGICAL(kind=C_BOOL) :: cxios_is_defined_domaingroup_radius
+      INTEGER (kind = C_INTPTR_T), VALUE :: domaingroup_hdl
+    END FUNCTION cxios_is_defined_domaingroup_radius
+
+
+    SUBROUTINE cxios_set_domaingroup_standard_name(domaingroup_hdl, standard_name, standard_name_size) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: domaingroup_hdl
+      CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: standard_name
+      INTEGER  (kind = C_INT)     , VALUE        :: standard_name_size
+    END SUBROUTINE cxios_set_domaingroup_standard_name
+
+    SUBROUTINE cxios_get_domaingroup_standard_name(domaingroup_hdl, standard_name, standard_name_size) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: domaingroup_hdl
+      CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: standard_name
+      INTEGER  (kind = C_INT)     , VALUE        :: standard_name_size
+    END SUBROUTINE cxios_get_domaingroup_standard_name
+
+    FUNCTION cxios_is_defined_domaingroup_standard_name(domaingroup_hdl) BIND(C)
+      USE ISO_C_BINDING
+      LOGICAL(kind=C_BOOL) :: cxios_is_defined_domaingroup_standard_name
+      INTEGER (kind = C_INTPTR_T), VALUE :: domaingroup_hdl
+    END FUNCTION cxios_is_defined_domaingroup_standard_name
+
+
+    SUBROUTINE cxios_set_domaingroup_type(domaingroup_hdl, type, type_size) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: domaingroup_hdl
+      CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: type
+      INTEGER  (kind = C_INT)     , VALUE        :: type_size
+    END SUBROUTINE cxios_set_domaingroup_type
+
+    SUBROUTINE cxios_get_domaingroup_type(domaingroup_hdl, type, type_size) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: domaingroup_hdl
+      CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: type
+      INTEGER  (kind = C_INT)     , VALUE        :: type_size
+    END SUBROUTINE cxios_get_domaingroup_type
+
+    FUNCTION cxios_is_defined_domaingroup_type(domaingroup_hdl) BIND(C)
+      USE ISO_C_BINDING
+      LOGICAL(kind=C_BOOL) :: cxios_is_defined_domaingroup_type
+      INTEGER (kind = C_INTPTR_T), VALUE :: domaingroup_hdl
+    END FUNCTION cxios_is_defined_domaingroup_type
+
+  END INTERFACE
+
+END MODULE domaingroup_interface_attr
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/fortran_attr/duplicate_scalar_to_axis_interface_attr.F90
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/fortran_attr/duplicate_scalar_to_axis_interface_attr.F90	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/fortran_attr/duplicate_scalar_to_axis_interface_attr.F90	(revision 1749)
@@ -0,0 +1,13 @@
+! * ************************************************************************** *
+! *               Interface auto generated - do not modify                     *
+! * ************************************************************************** *
+#include "../fortran/xios_fortran_prefix.hpp"
+
+MODULE duplicate_scalar_to_axis_interface_attr
+  USE, INTRINSIC :: ISO_C_BINDING
+
+  INTERFACE
+    ! Do not call directly / interface FORTRAN 2003 <-> C99
+  END INTERFACE
+
+END MODULE duplicate_scalar_to_axis_interface_attr
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/fortran_attr/expand_domain_interface_attr.F90
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/fortran_attr/expand_domain_interface_attr.F90	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/fortran_attr/expand_domain_interface_attr.F90	(revision 1749)
@@ -0,0 +1,91 @@
+! * ************************************************************************** *
+! *               Interface auto generated - do not modify                     *
+! * ************************************************************************** *
+#include "../fortran/xios_fortran_prefix.hpp"
+
+MODULE expand_domain_interface_attr
+  USE, INTRINSIC :: ISO_C_BINDING
+
+  INTERFACE
+    ! Do not call directly / interface FORTRAN 2003 <-> C99
+
+    SUBROUTINE cxios_set_expand_domain_i_periodic(expand_domain_hdl, i_periodic) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: expand_domain_hdl
+      LOGICAL (KIND=C_BOOL)      , VALUE :: i_periodic
+    END SUBROUTINE cxios_set_expand_domain_i_periodic
+
+    SUBROUTINE cxios_get_expand_domain_i_periodic(expand_domain_hdl, i_periodic) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: expand_domain_hdl
+      LOGICAL (KIND=C_BOOL)             :: i_periodic
+    END SUBROUTINE cxios_get_expand_domain_i_periodic
+
+    FUNCTION cxios_is_defined_expand_domain_i_periodic(expand_domain_hdl) BIND(C)
+      USE ISO_C_BINDING
+      LOGICAL(kind=C_BOOL) :: cxios_is_defined_expand_domain_i_periodic
+      INTEGER (kind = C_INTPTR_T), VALUE :: expand_domain_hdl
+    END FUNCTION cxios_is_defined_expand_domain_i_periodic
+
+
+    SUBROUTINE cxios_set_expand_domain_j_periodic(expand_domain_hdl, j_periodic) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: expand_domain_hdl
+      LOGICAL (KIND=C_BOOL)      , VALUE :: j_periodic
+    END SUBROUTINE cxios_set_expand_domain_j_periodic
+
+    SUBROUTINE cxios_get_expand_domain_j_periodic(expand_domain_hdl, j_periodic) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: expand_domain_hdl
+      LOGICAL (KIND=C_BOOL)             :: j_periodic
+    END SUBROUTINE cxios_get_expand_domain_j_periodic
+
+    FUNCTION cxios_is_defined_expand_domain_j_periodic(expand_domain_hdl) BIND(C)
+      USE ISO_C_BINDING
+      LOGICAL(kind=C_BOOL) :: cxios_is_defined_expand_domain_j_periodic
+      INTEGER (kind = C_INTPTR_T), VALUE :: expand_domain_hdl
+    END FUNCTION cxios_is_defined_expand_domain_j_periodic
+
+
+    SUBROUTINE cxios_set_expand_domain_order(expand_domain_hdl, order) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: expand_domain_hdl
+      INTEGER (KIND=C_INT)      , VALUE :: order
+    END SUBROUTINE cxios_set_expand_domain_order
+
+    SUBROUTINE cxios_get_expand_domain_order(expand_domain_hdl, order) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: expand_domain_hdl
+      INTEGER (KIND=C_INT)             :: order
+    END SUBROUTINE cxios_get_expand_domain_order
+
+    FUNCTION cxios_is_defined_expand_domain_order(expand_domain_hdl) BIND(C)
+      USE ISO_C_BINDING
+      LOGICAL(kind=C_BOOL) :: cxios_is_defined_expand_domain_order
+      INTEGER (kind = C_INTPTR_T), VALUE :: expand_domain_hdl
+    END FUNCTION cxios_is_defined_expand_domain_order
+
+
+    SUBROUTINE cxios_set_expand_domain_type(expand_domain_hdl, type, type_size) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: expand_domain_hdl
+      CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: type
+      INTEGER  (kind = C_INT)     , VALUE        :: type_size
+    END SUBROUTINE cxios_set_expand_domain_type
+
+    SUBROUTINE cxios_get_expand_domain_type(expand_domain_hdl, type, type_size) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: expand_domain_hdl
+      CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: type
+      INTEGER  (kind = C_INT)     , VALUE        :: type_size
+    END SUBROUTINE cxios_get_expand_domain_type
+
+    FUNCTION cxios_is_defined_expand_domain_type(expand_domain_hdl) BIND(C)
+      USE ISO_C_BINDING
+      LOGICAL(kind=C_BOOL) :: cxios_is_defined_expand_domain_type
+      INTEGER (kind = C_INTPTR_T), VALUE :: expand_domain_hdl
+    END FUNCTION cxios_is_defined_expand_domain_type
+
+  END INTERFACE
+
+END MODULE expand_domain_interface_attr
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/fortran_attr/extract_axis_to_scalar_interface_attr.F90
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/fortran_attr/extract_axis_to_scalar_interface_attr.F90	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/fortran_attr/extract_axis_to_scalar_interface_attr.F90	(revision 1749)
@@ -0,0 +1,32 @@
+! * ************************************************************************** *
+! *               Interface auto generated - do not modify                     *
+! * ************************************************************************** *
+#include "../fortran/xios_fortran_prefix.hpp"
+
+MODULE extract_axis_to_scalar_interface_attr
+  USE, INTRINSIC :: ISO_C_BINDING
+
+  INTERFACE
+    ! Do not call directly / interface FORTRAN 2003 <-> C99
+
+    SUBROUTINE cxios_set_extract_axis_to_scalar_position(extract_axis_to_scalar_hdl, position) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: extract_axis_to_scalar_hdl
+      INTEGER (KIND=C_INT)      , VALUE :: position
+    END SUBROUTINE cxios_set_extract_axis_to_scalar_position
+
+    SUBROUTINE cxios_get_extract_axis_to_scalar_position(extract_axis_to_scalar_hdl, position) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: extract_axis_to_scalar_hdl
+      INTEGER (KIND=C_INT)             :: position
+    END SUBROUTINE cxios_get_extract_axis_to_scalar_position
+
+    FUNCTION cxios_is_defined_extract_axis_to_scalar_position(extract_axis_to_scalar_hdl) BIND(C)
+      USE ISO_C_BINDING
+      LOGICAL(kind=C_BOOL) :: cxios_is_defined_extract_axis_to_scalar_position
+      INTEGER (kind = C_INTPTR_T), VALUE :: extract_axis_to_scalar_hdl
+    END FUNCTION cxios_is_defined_extract_axis_to_scalar_position
+
+  END INTERFACE
+
+END MODULE extract_axis_to_scalar_interface_attr
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/fortran_attr/extract_domain_to_axis_interface_attr.F90
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/fortran_attr/extract_domain_to_axis_interface_attr.F90	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/fortran_attr/extract_domain_to_axis_interface_attr.F90	(revision 1749)
@@ -0,0 +1,53 @@
+! * ************************************************************************** *
+! *               Interface auto generated - do not modify                     *
+! * ************************************************************************** *
+#include "../fortran/xios_fortran_prefix.hpp"
+
+MODULE extract_domain_to_axis_interface_attr
+  USE, INTRINSIC :: ISO_C_BINDING
+
+  INTERFACE
+    ! Do not call directly / interface FORTRAN 2003 <-> C99
+
+    SUBROUTINE cxios_set_extract_domain_to_axis_direction(extract_domain_to_axis_hdl, direction, direction_size) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: extract_domain_to_axis_hdl
+      CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: direction
+      INTEGER  (kind = C_INT)     , VALUE        :: direction_size
+    END SUBROUTINE cxios_set_extract_domain_to_axis_direction
+
+    SUBROUTINE cxios_get_extract_domain_to_axis_direction(extract_domain_to_axis_hdl, direction, direction_size) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: extract_domain_to_axis_hdl
+      CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: direction
+      INTEGER  (kind = C_INT)     , VALUE        :: direction_size
+    END SUBROUTINE cxios_get_extract_domain_to_axis_direction
+
+    FUNCTION cxios_is_defined_extract_domain_to_axis_direction(extract_domain_to_axis_hdl) BIND(C)
+      USE ISO_C_BINDING
+      LOGICAL(kind=C_BOOL) :: cxios_is_defined_extract_domain_to_axis_direction
+      INTEGER (kind = C_INTPTR_T), VALUE :: extract_domain_to_axis_hdl
+    END FUNCTION cxios_is_defined_extract_domain_to_axis_direction
+
+
+    SUBROUTINE cxios_set_extract_domain_to_axis_position(extract_domain_to_axis_hdl, position) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: extract_domain_to_axis_hdl
+      INTEGER (KIND=C_INT)      , VALUE :: position
+    END SUBROUTINE cxios_set_extract_domain_to_axis_position
+
+    SUBROUTINE cxios_get_extract_domain_to_axis_position(extract_domain_to_axis_hdl, position) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: extract_domain_to_axis_hdl
+      INTEGER (KIND=C_INT)             :: position
+    END SUBROUTINE cxios_get_extract_domain_to_axis_position
+
+    FUNCTION cxios_is_defined_extract_domain_to_axis_position(extract_domain_to_axis_hdl) BIND(C)
+      USE ISO_C_BINDING
+      LOGICAL(kind=C_BOOL) :: cxios_is_defined_extract_domain_to_axis_position
+      INTEGER (kind = C_INTPTR_T), VALUE :: extract_domain_to_axis_hdl
+    END FUNCTION cxios_is_defined_extract_domain_to_axis_position
+
+  END INTERFACE
+
+END MODULE extract_domain_to_axis_interface_attr
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/fortran_attr/field_interface_attr.F90
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/fortran_attr/field_interface_attr.F90	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/fortran_attr/field_interface_attr.F90	(revision 1749)
@@ -0,0 +1,657 @@
+! * ************************************************************************** *
+! *               Interface auto generated - do not modify                     *
+! * ************************************************************************** *
+#include "../fortran/xios_fortran_prefix.hpp"
+
+MODULE field_interface_attr
+  USE, INTRINSIC :: ISO_C_BINDING
+
+  INTERFACE
+    ! Do not call directly / interface FORTRAN 2003 <-> C99
+
+    SUBROUTINE cxios_set_field_add_offset(field_hdl, add_offset) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: field_hdl
+      REAL (KIND=C_DOUBLE)      , VALUE :: add_offset
+    END SUBROUTINE cxios_set_field_add_offset
+
+    SUBROUTINE cxios_get_field_add_offset(field_hdl, add_offset) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: field_hdl
+      REAL (KIND=C_DOUBLE)             :: add_offset
+    END SUBROUTINE cxios_get_field_add_offset
+
+    FUNCTION cxios_is_defined_field_add_offset(field_hdl) BIND(C)
+      USE ISO_C_BINDING
+      LOGICAL(kind=C_BOOL) :: cxios_is_defined_field_add_offset
+      INTEGER (kind = C_INTPTR_T), VALUE :: field_hdl
+    END FUNCTION cxios_is_defined_field_add_offset
+
+
+    SUBROUTINE cxios_set_field_axis_ref(field_hdl, axis_ref, axis_ref_size) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: field_hdl
+      CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: axis_ref
+      INTEGER  (kind = C_INT)     , VALUE        :: axis_ref_size
+    END SUBROUTINE cxios_set_field_axis_ref
+
+    SUBROUTINE cxios_get_field_axis_ref(field_hdl, axis_ref, axis_ref_size) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: field_hdl
+      CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: axis_ref
+      INTEGER  (kind = C_INT)     , VALUE        :: axis_ref_size
+    END SUBROUTINE cxios_get_field_axis_ref
+
+    FUNCTION cxios_is_defined_field_axis_ref(field_hdl) BIND(C)
+      USE ISO_C_BINDING
+      LOGICAL(kind=C_BOOL) :: cxios_is_defined_field_axis_ref
+      INTEGER (kind = C_INTPTR_T), VALUE :: field_hdl
+    END FUNCTION cxios_is_defined_field_axis_ref
+
+
+    SUBROUTINE cxios_set_field_cell_methods(field_hdl, cell_methods, cell_methods_size) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: field_hdl
+      CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: cell_methods
+      INTEGER  (kind = C_INT)     , VALUE        :: cell_methods_size
+    END SUBROUTINE cxios_set_field_cell_methods
+
+    SUBROUTINE cxios_get_field_cell_methods(field_hdl, cell_methods, cell_methods_size) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: field_hdl
+      CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: cell_methods
+      INTEGER  (kind = C_INT)     , VALUE        :: cell_methods_size
+    END SUBROUTINE cxios_get_field_cell_methods
+
+    FUNCTION cxios_is_defined_field_cell_methods(field_hdl) BIND(C)
+      USE ISO_C_BINDING
+      LOGICAL(kind=C_BOOL) :: cxios_is_defined_field_cell_methods
+      INTEGER (kind = C_INTPTR_T), VALUE :: field_hdl
+    END FUNCTION cxios_is_defined_field_cell_methods
+
+
+    SUBROUTINE cxios_set_field_cell_methods_mode(field_hdl, cell_methods_mode, cell_methods_mode_size) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: field_hdl
+      CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: cell_methods_mode
+      INTEGER  (kind = C_INT)     , VALUE        :: cell_methods_mode_size
+    END SUBROUTINE cxios_set_field_cell_methods_mode
+
+    SUBROUTINE cxios_get_field_cell_methods_mode(field_hdl, cell_methods_mode, cell_methods_mode_size) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: field_hdl
+      CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: cell_methods_mode
+      INTEGER  (kind = C_INT)     , VALUE        :: cell_methods_mode_size
+    END SUBROUTINE cxios_get_field_cell_methods_mode
+
+    FUNCTION cxios_is_defined_field_cell_methods_mode(field_hdl) BIND(C)
+      USE ISO_C_BINDING
+      LOGICAL(kind=C_BOOL) :: cxios_is_defined_field_cell_methods_mode
+      INTEGER (kind = C_INTPTR_T), VALUE :: field_hdl
+    END FUNCTION cxios_is_defined_field_cell_methods_mode
+
+
+    SUBROUTINE cxios_set_field_check_if_active(field_hdl, check_if_active) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: field_hdl
+      LOGICAL (KIND=C_BOOL)      , VALUE :: check_if_active
+    END SUBROUTINE cxios_set_field_check_if_active
+
+    SUBROUTINE cxios_get_field_check_if_active(field_hdl, check_if_active) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: field_hdl
+      LOGICAL (KIND=C_BOOL)             :: check_if_active
+    END SUBROUTINE cxios_get_field_check_if_active
+
+    FUNCTION cxios_is_defined_field_check_if_active(field_hdl) BIND(C)
+      USE ISO_C_BINDING
+      LOGICAL(kind=C_BOOL) :: cxios_is_defined_field_check_if_active
+      INTEGER (kind = C_INTPTR_T), VALUE :: field_hdl
+    END FUNCTION cxios_is_defined_field_check_if_active
+
+
+    SUBROUTINE cxios_set_field_comment(field_hdl, comment, comment_size) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: field_hdl
+      CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: comment
+      INTEGER  (kind = C_INT)     , VALUE        :: comment_size
+    END SUBROUTINE cxios_set_field_comment
+
+    SUBROUTINE cxios_get_field_comment(field_hdl, comment, comment_size) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: field_hdl
+      CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: comment
+      INTEGER  (kind = C_INT)     , VALUE        :: comment_size
+    END SUBROUTINE cxios_get_field_comment
+
+    FUNCTION cxios_is_defined_field_comment(field_hdl) BIND(C)
+      USE ISO_C_BINDING
+      LOGICAL(kind=C_BOOL) :: cxios_is_defined_field_comment
+      INTEGER (kind = C_INTPTR_T), VALUE :: field_hdl
+    END FUNCTION cxios_is_defined_field_comment
+
+
+    SUBROUTINE cxios_set_field_compression_level(field_hdl, compression_level) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: field_hdl
+      INTEGER (KIND=C_INT)      , VALUE :: compression_level
+    END SUBROUTINE cxios_set_field_compression_level
+
+    SUBROUTINE cxios_get_field_compression_level(field_hdl, compression_level) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: field_hdl
+      INTEGER (KIND=C_INT)             :: compression_level
+    END SUBROUTINE cxios_get_field_compression_level
+
+    FUNCTION cxios_is_defined_field_compression_level(field_hdl) BIND(C)
+      USE ISO_C_BINDING
+      LOGICAL(kind=C_BOOL) :: cxios_is_defined_field_compression_level
+      INTEGER (kind = C_INTPTR_T), VALUE :: field_hdl
+    END FUNCTION cxios_is_defined_field_compression_level
+
+
+    SUBROUTINE cxios_set_field_default_value(field_hdl, default_value) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: field_hdl
+      REAL (KIND=C_DOUBLE)      , VALUE :: default_value
+    END SUBROUTINE cxios_set_field_default_value
+
+    SUBROUTINE cxios_get_field_default_value(field_hdl, default_value) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: field_hdl
+      REAL (KIND=C_DOUBLE)             :: default_value
+    END SUBROUTINE cxios_get_field_default_value
+
+    FUNCTION cxios_is_defined_field_default_value(field_hdl) BIND(C)
+      USE ISO_C_BINDING
+      LOGICAL(kind=C_BOOL) :: cxios_is_defined_field_default_value
+      INTEGER (kind = C_INTPTR_T), VALUE :: field_hdl
+    END FUNCTION cxios_is_defined_field_default_value
+
+
+    SUBROUTINE cxios_set_field_detect_missing_value(field_hdl, detect_missing_value) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: field_hdl
+      LOGICAL (KIND=C_BOOL)      , VALUE :: detect_missing_value
+    END SUBROUTINE cxios_set_field_detect_missing_value
+
+    SUBROUTINE cxios_get_field_detect_missing_value(field_hdl, detect_missing_value) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: field_hdl
+      LOGICAL (KIND=C_BOOL)             :: detect_missing_value
+    END SUBROUTINE cxios_get_field_detect_missing_value
+
+    FUNCTION cxios_is_defined_field_detect_missing_value(field_hdl) BIND(C)
+      USE ISO_C_BINDING
+      LOGICAL(kind=C_BOOL) :: cxios_is_defined_field_detect_missing_value
+      INTEGER (kind = C_INTPTR_T), VALUE :: field_hdl
+    END FUNCTION cxios_is_defined_field_detect_missing_value
+
+
+    SUBROUTINE cxios_set_field_domain_ref(field_hdl, domain_ref, domain_ref_size) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: field_hdl
+      CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: domain_ref
+      INTEGER  (kind = C_INT)     , VALUE        :: domain_ref_size
+    END SUBROUTINE cxios_set_field_domain_ref
+
+    SUBROUTINE cxios_get_field_domain_ref(field_hdl, domain_ref, domain_ref_size) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: field_hdl
+      CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: domain_ref
+      INTEGER  (kind = C_INT)     , VALUE        :: domain_ref_size
+    END SUBROUTINE cxios_get_field_domain_ref
+
+    FUNCTION cxios_is_defined_field_domain_ref(field_hdl) BIND(C)
+      USE ISO_C_BINDING
+      LOGICAL(kind=C_BOOL) :: cxios_is_defined_field_domain_ref
+      INTEGER (kind = C_INTPTR_T), VALUE :: field_hdl
+    END FUNCTION cxios_is_defined_field_domain_ref
+
+
+    SUBROUTINE cxios_set_field_enabled(field_hdl, enabled) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: field_hdl
+      LOGICAL (KIND=C_BOOL)      , VALUE :: enabled
+    END SUBROUTINE cxios_set_field_enabled
+
+    SUBROUTINE cxios_get_field_enabled(field_hdl, enabled) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: field_hdl
+      LOGICAL (KIND=C_BOOL)             :: enabled
+    END SUBROUTINE cxios_get_field_enabled
+
+    FUNCTION cxios_is_defined_field_enabled(field_hdl) BIND(C)
+      USE ISO_C_BINDING
+      LOGICAL(kind=C_BOOL) :: cxios_is_defined_field_enabled
+      INTEGER (kind = C_INTPTR_T), VALUE :: field_hdl
+    END FUNCTION cxios_is_defined_field_enabled
+
+
+    SUBROUTINE cxios_set_field_expr(field_hdl, expr, expr_size) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: field_hdl
+      CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: expr
+      INTEGER  (kind = C_INT)     , VALUE        :: expr_size
+    END SUBROUTINE cxios_set_field_expr
+
+    SUBROUTINE cxios_get_field_expr(field_hdl, expr, expr_size) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: field_hdl
+      CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: expr
+      INTEGER  (kind = C_INT)     , VALUE        :: expr_size
+    END SUBROUTINE cxios_get_field_expr
+
+    FUNCTION cxios_is_defined_field_expr(field_hdl) BIND(C)
+      USE ISO_C_BINDING
+      LOGICAL(kind=C_BOOL) :: cxios_is_defined_field_expr
+      INTEGER (kind = C_INTPTR_T), VALUE :: field_hdl
+    END FUNCTION cxios_is_defined_field_expr
+
+
+    SUBROUTINE cxios_set_field_field_ref(field_hdl, field_ref, field_ref_size) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: field_hdl
+      CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: field_ref
+      INTEGER  (kind = C_INT)     , VALUE        :: field_ref_size
+    END SUBROUTINE cxios_set_field_field_ref
+
+    SUBROUTINE cxios_get_field_field_ref(field_hdl, field_ref, field_ref_size) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: field_hdl
+      CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: field_ref
+      INTEGER  (kind = C_INT)     , VALUE        :: field_ref_size
+    END SUBROUTINE cxios_get_field_field_ref
+
+    FUNCTION cxios_is_defined_field_field_ref(field_hdl) BIND(C)
+      USE ISO_C_BINDING
+      LOGICAL(kind=C_BOOL) :: cxios_is_defined_field_field_ref
+      INTEGER (kind = C_INTPTR_T), VALUE :: field_hdl
+    END FUNCTION cxios_is_defined_field_field_ref
+
+
+    SUBROUTINE cxios_set_field_freq_offset(field_hdl, freq_offset) BIND(C)
+      USE ISO_C_BINDING
+      USE IDURATION
+      INTEGER (kind = C_INTPTR_T), VALUE :: field_hdl
+      TYPE(txios(duration)), VALUE :: freq_offset
+    END SUBROUTINE cxios_set_field_freq_offset
+
+    SUBROUTINE cxios_get_field_freq_offset(field_hdl, freq_offset) BIND(C)
+      USE ISO_C_BINDING
+      USE IDURATION
+      INTEGER (kind = C_INTPTR_T), VALUE :: field_hdl
+      TYPE(txios(duration)) :: freq_offset
+    END SUBROUTINE cxios_get_field_freq_offset
+
+    FUNCTION cxios_is_defined_field_freq_offset(field_hdl) BIND(C)
+      USE ISO_C_BINDING
+      LOGICAL(kind=C_BOOL) :: cxios_is_defined_field_freq_offset
+      INTEGER (kind = C_INTPTR_T), VALUE :: field_hdl
+    END FUNCTION cxios_is_defined_field_freq_offset
+
+
+    SUBROUTINE cxios_set_field_freq_op(field_hdl, freq_op) BIND(C)
+      USE ISO_C_BINDING
+      USE IDURATION
+      INTEGER (kind = C_INTPTR_T), VALUE :: field_hdl
+      TYPE(txios(duration)), VALUE :: freq_op
+    END SUBROUTINE cxios_set_field_freq_op
+
+    SUBROUTINE cxios_get_field_freq_op(field_hdl, freq_op) BIND(C)
+      USE ISO_C_BINDING
+      USE IDURATION
+      INTEGER (kind = C_INTPTR_T), VALUE :: field_hdl
+      TYPE(txios(duration)) :: freq_op
+    END SUBROUTINE cxios_get_field_freq_op
+
+    FUNCTION cxios_is_defined_field_freq_op(field_hdl) BIND(C)
+      USE ISO_C_BINDING
+      LOGICAL(kind=C_BOOL) :: cxios_is_defined_field_freq_op
+      INTEGER (kind = C_INTPTR_T), VALUE :: field_hdl
+    END FUNCTION cxios_is_defined_field_freq_op
+
+
+    SUBROUTINE cxios_set_field_grid_path(field_hdl, grid_path, grid_path_size) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: field_hdl
+      CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: grid_path
+      INTEGER  (kind = C_INT)     , VALUE        :: grid_path_size
+    END SUBROUTINE cxios_set_field_grid_path
+
+    SUBROUTINE cxios_get_field_grid_path(field_hdl, grid_path, grid_path_size) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: field_hdl
+      CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: grid_path
+      INTEGER  (kind = C_INT)     , VALUE        :: grid_path_size
+    END SUBROUTINE cxios_get_field_grid_path
+
+    FUNCTION cxios_is_defined_field_grid_path(field_hdl) BIND(C)
+      USE ISO_C_BINDING
+      LOGICAL(kind=C_BOOL) :: cxios_is_defined_field_grid_path
+      INTEGER (kind = C_INTPTR_T), VALUE :: field_hdl
+    END FUNCTION cxios_is_defined_field_grid_path
+
+
+    SUBROUTINE cxios_set_field_grid_ref(field_hdl, grid_ref, grid_ref_size) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: field_hdl
+      CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: grid_ref
+      INTEGER  (kind = C_INT)     , VALUE        :: grid_ref_size
+    END SUBROUTINE cxios_set_field_grid_ref
+
+    SUBROUTINE cxios_get_field_grid_ref(field_hdl, grid_ref, grid_ref_size) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: field_hdl
+      CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: grid_ref
+      INTEGER  (kind = C_INT)     , VALUE        :: grid_ref_size
+    END SUBROUTINE cxios_get_field_grid_ref
+
+    FUNCTION cxios_is_defined_field_grid_ref(field_hdl) BIND(C)
+      USE ISO_C_BINDING
+      LOGICAL(kind=C_BOOL) :: cxios_is_defined_field_grid_ref
+      INTEGER (kind = C_INTPTR_T), VALUE :: field_hdl
+    END FUNCTION cxios_is_defined_field_grid_ref
+
+
+    SUBROUTINE cxios_set_field_indexed_output(field_hdl, indexed_output) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: field_hdl
+      LOGICAL (KIND=C_BOOL)      , VALUE :: indexed_output
+    END SUBROUTINE cxios_set_field_indexed_output
+
+    SUBROUTINE cxios_get_field_indexed_output(field_hdl, indexed_output) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: field_hdl
+      LOGICAL (KIND=C_BOOL)             :: indexed_output
+    END SUBROUTINE cxios_get_field_indexed_output
+
+    FUNCTION cxios_is_defined_field_indexed_output(field_hdl) BIND(C)
+      USE ISO_C_BINDING
+      LOGICAL(kind=C_BOOL) :: cxios_is_defined_field_indexed_output
+      INTEGER (kind = C_INTPTR_T), VALUE :: field_hdl
+    END FUNCTION cxios_is_defined_field_indexed_output
+
+
+    SUBROUTINE cxios_set_field_level(field_hdl, level) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: field_hdl
+      INTEGER (KIND=C_INT)      , VALUE :: level
+    END SUBROUTINE cxios_set_field_level
+
+    SUBROUTINE cxios_get_field_level(field_hdl, level) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: field_hdl
+      INTEGER (KIND=C_INT)             :: level
+    END SUBROUTINE cxios_get_field_level
+
+    FUNCTION cxios_is_defined_field_level(field_hdl) BIND(C)
+      USE ISO_C_BINDING
+      LOGICAL(kind=C_BOOL) :: cxios_is_defined_field_level
+      INTEGER (kind = C_INTPTR_T), VALUE :: field_hdl
+    END FUNCTION cxios_is_defined_field_level
+
+
+    SUBROUTINE cxios_set_field_long_name(field_hdl, long_name, long_name_size) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: field_hdl
+      CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: long_name
+      INTEGER  (kind = C_INT)     , VALUE        :: long_name_size
+    END SUBROUTINE cxios_set_field_long_name
+
+    SUBROUTINE cxios_get_field_long_name(field_hdl, long_name, long_name_size) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: field_hdl
+      CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: long_name
+      INTEGER  (kind = C_INT)     , VALUE        :: long_name_size
+    END SUBROUTINE cxios_get_field_long_name
+
+    FUNCTION cxios_is_defined_field_long_name(field_hdl) BIND(C)
+      USE ISO_C_BINDING
+      LOGICAL(kind=C_BOOL) :: cxios_is_defined_field_long_name
+      INTEGER (kind = C_INTPTR_T), VALUE :: field_hdl
+    END FUNCTION cxios_is_defined_field_long_name
+
+
+    SUBROUTINE cxios_set_field_name(field_hdl, name, name_size) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: field_hdl
+      CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: name
+      INTEGER  (kind = C_INT)     , VALUE        :: name_size
+    END SUBROUTINE cxios_set_field_name
+
+    SUBROUTINE cxios_get_field_name(field_hdl, name, name_size) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: field_hdl
+      CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: name
+      INTEGER  (kind = C_INT)     , VALUE        :: name_size
+    END SUBROUTINE cxios_get_field_name
+
+    FUNCTION cxios_is_defined_field_name(field_hdl) BIND(C)
+      USE ISO_C_BINDING
+      LOGICAL(kind=C_BOOL) :: cxios_is_defined_field_name
+      INTEGER (kind = C_INTPTR_T), VALUE :: field_hdl
+    END FUNCTION cxios_is_defined_field_name
+
+
+    SUBROUTINE cxios_set_field_operation(field_hdl, operation, operation_size) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: field_hdl
+      CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: operation
+      INTEGER  (kind = C_INT)     , VALUE        :: operation_size
+    END SUBROUTINE cxios_set_field_operation
+
+    SUBROUTINE cxios_get_field_operation(field_hdl, operation, operation_size) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: field_hdl
+      CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: operation
+      INTEGER  (kind = C_INT)     , VALUE        :: operation_size
+    END SUBROUTINE cxios_get_field_operation
+
+    FUNCTION cxios_is_defined_field_operation(field_hdl) BIND(C)
+      USE ISO_C_BINDING
+      LOGICAL(kind=C_BOOL) :: cxios_is_defined_field_operation
+      INTEGER (kind = C_INTPTR_T), VALUE :: field_hdl
+    END FUNCTION cxios_is_defined_field_operation
+
+
+    SUBROUTINE cxios_set_field_prec(field_hdl, prec) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: field_hdl
+      INTEGER (KIND=C_INT)      , VALUE :: prec
+    END SUBROUTINE cxios_set_field_prec
+
+    SUBROUTINE cxios_get_field_prec(field_hdl, prec) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: field_hdl
+      INTEGER (KIND=C_INT)             :: prec
+    END SUBROUTINE cxios_get_field_prec
+
+    FUNCTION cxios_is_defined_field_prec(field_hdl) BIND(C)
+      USE ISO_C_BINDING
+      LOGICAL(kind=C_BOOL) :: cxios_is_defined_field_prec
+      INTEGER (kind = C_INTPTR_T), VALUE :: field_hdl
+    END FUNCTION cxios_is_defined_field_prec
+
+
+    SUBROUTINE cxios_set_field_read_access(field_hdl, read_access) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: field_hdl
+      LOGICAL (KIND=C_BOOL)      , VALUE :: read_access
+    END SUBROUTINE cxios_set_field_read_access
+
+    SUBROUTINE cxios_get_field_read_access(field_hdl, read_access) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: field_hdl
+      LOGICAL (KIND=C_BOOL)             :: read_access
+    END SUBROUTINE cxios_get_field_read_access
+
+    FUNCTION cxios_is_defined_field_read_access(field_hdl) BIND(C)
+      USE ISO_C_BINDING
+      LOGICAL(kind=C_BOOL) :: cxios_is_defined_field_read_access
+      INTEGER (kind = C_INTPTR_T), VALUE :: field_hdl
+    END FUNCTION cxios_is_defined_field_read_access
+
+
+    SUBROUTINE cxios_set_field_scalar_ref(field_hdl, scalar_ref, scalar_ref_size) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: field_hdl
+      CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: scalar_ref
+      INTEGER  (kind = C_INT)     , VALUE        :: scalar_ref_size
+    END SUBROUTINE cxios_set_field_scalar_ref
+
+    SUBROUTINE cxios_get_field_scalar_ref(field_hdl, scalar_ref, scalar_ref_size) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: field_hdl
+      CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: scalar_ref
+      INTEGER  (kind = C_INT)     , VALUE        :: scalar_ref_size
+    END SUBROUTINE cxios_get_field_scalar_ref
+
+    FUNCTION cxios_is_defined_field_scalar_ref(field_hdl) BIND(C)
+      USE ISO_C_BINDING
+      LOGICAL(kind=C_BOOL) :: cxios_is_defined_field_scalar_ref
+      INTEGER (kind = C_INTPTR_T), VALUE :: field_hdl
+    END FUNCTION cxios_is_defined_field_scalar_ref
+
+
+    SUBROUTINE cxios_set_field_scale_factor(field_hdl, scale_factor) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: field_hdl
+      REAL (KIND=C_DOUBLE)      , VALUE :: scale_factor
+    END SUBROUTINE cxios_set_field_scale_factor
+
+    SUBROUTINE cxios_get_field_scale_factor(field_hdl, scale_factor) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: field_hdl
+      REAL (KIND=C_DOUBLE)             :: scale_factor
+    END SUBROUTINE cxios_get_field_scale_factor
+
+    FUNCTION cxios_is_defined_field_scale_factor(field_hdl) BIND(C)
+      USE ISO_C_BINDING
+      LOGICAL(kind=C_BOOL) :: cxios_is_defined_field_scale_factor
+      INTEGER (kind = C_INTPTR_T), VALUE :: field_hdl
+    END FUNCTION cxios_is_defined_field_scale_factor
+
+
+    SUBROUTINE cxios_set_field_standard_name(field_hdl, standard_name, standard_name_size) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: field_hdl
+      CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: standard_name
+      INTEGER  (kind = C_INT)     , VALUE        :: standard_name_size
+    END SUBROUTINE cxios_set_field_standard_name
+
+    SUBROUTINE cxios_get_field_standard_name(field_hdl, standard_name, standard_name_size) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: field_hdl
+      CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: standard_name
+      INTEGER  (kind = C_INT)     , VALUE        :: standard_name_size
+    END SUBROUTINE cxios_get_field_standard_name
+
+    FUNCTION cxios_is_defined_field_standard_name(field_hdl) BIND(C)
+      USE ISO_C_BINDING
+      LOGICAL(kind=C_BOOL) :: cxios_is_defined_field_standard_name
+      INTEGER (kind = C_INTPTR_T), VALUE :: field_hdl
+    END FUNCTION cxios_is_defined_field_standard_name
+
+
+    SUBROUTINE cxios_set_field_ts_enabled(field_hdl, ts_enabled) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: field_hdl
+      LOGICAL (KIND=C_BOOL)      , VALUE :: ts_enabled
+    END SUBROUTINE cxios_set_field_ts_enabled
+
+    SUBROUTINE cxios_get_field_ts_enabled(field_hdl, ts_enabled) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: field_hdl
+      LOGICAL (KIND=C_BOOL)             :: ts_enabled
+    END SUBROUTINE cxios_get_field_ts_enabled
+
+    FUNCTION cxios_is_defined_field_ts_enabled(field_hdl) BIND(C)
+      USE ISO_C_BINDING
+      LOGICAL(kind=C_BOOL) :: cxios_is_defined_field_ts_enabled
+      INTEGER (kind = C_INTPTR_T), VALUE :: field_hdl
+    END FUNCTION cxios_is_defined_field_ts_enabled
+
+
+    SUBROUTINE cxios_set_field_ts_split_freq(field_hdl, ts_split_freq) BIND(C)
+      USE ISO_C_BINDING
+      USE IDURATION
+      INTEGER (kind = C_INTPTR_T), VALUE :: field_hdl
+      TYPE(txios(duration)), VALUE :: ts_split_freq
+    END SUBROUTINE cxios_set_field_ts_split_freq
+
+    SUBROUTINE cxios_get_field_ts_split_freq(field_hdl, ts_split_freq) BIND(C)
+      USE ISO_C_BINDING
+      USE IDURATION
+      INTEGER (kind = C_INTPTR_T), VALUE :: field_hdl
+      TYPE(txios(duration)) :: ts_split_freq
+    END SUBROUTINE cxios_get_field_ts_split_freq
+
+    FUNCTION cxios_is_defined_field_ts_split_freq(field_hdl) BIND(C)
+      USE ISO_C_BINDING
+      LOGICAL(kind=C_BOOL) :: cxios_is_defined_field_ts_split_freq
+      INTEGER (kind = C_INTPTR_T), VALUE :: field_hdl
+    END FUNCTION cxios_is_defined_field_ts_split_freq
+
+
+    SUBROUTINE cxios_set_field_unit(field_hdl, unit, unit_size) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: field_hdl
+      CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: unit
+      INTEGER  (kind = C_INT)     , VALUE        :: unit_size
+    END SUBROUTINE cxios_set_field_unit
+
+    SUBROUTINE cxios_get_field_unit(field_hdl, unit, unit_size) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: field_hdl
+      CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: unit
+      INTEGER  (kind = C_INT)     , VALUE        :: unit_size
+    END SUBROUTINE cxios_get_field_unit
+
+    FUNCTION cxios_is_defined_field_unit(field_hdl) BIND(C)
+      USE ISO_C_BINDING
+      LOGICAL(kind=C_BOOL) :: cxios_is_defined_field_unit
+      INTEGER (kind = C_INTPTR_T), VALUE :: field_hdl
+    END FUNCTION cxios_is_defined_field_unit
+
+
+    SUBROUTINE cxios_set_field_valid_max(field_hdl, valid_max) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: field_hdl
+      REAL (KIND=C_DOUBLE)      , VALUE :: valid_max
+    END SUBROUTINE cxios_set_field_valid_max
+
+    SUBROUTINE cxios_get_field_valid_max(field_hdl, valid_max) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: field_hdl
+      REAL (KIND=C_DOUBLE)             :: valid_max
+    END SUBROUTINE cxios_get_field_valid_max
+
+    FUNCTION cxios_is_defined_field_valid_max(field_hdl) BIND(C)
+      USE ISO_C_BINDING
+      LOGICAL(kind=C_BOOL) :: cxios_is_defined_field_valid_max
+      INTEGER (kind = C_INTPTR_T), VALUE :: field_hdl
+    END FUNCTION cxios_is_defined_field_valid_max
+
+
+    SUBROUTINE cxios_set_field_valid_min(field_hdl, valid_min) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: field_hdl
+      REAL (KIND=C_DOUBLE)      , VALUE :: valid_min
+    END SUBROUTINE cxios_set_field_valid_min
+
+    SUBROUTINE cxios_get_field_valid_min(field_hdl, valid_min) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: field_hdl
+      REAL (KIND=C_DOUBLE)             :: valid_min
+    END SUBROUTINE cxios_get_field_valid_min
+
+    FUNCTION cxios_is_defined_field_valid_min(field_hdl) BIND(C)
+      USE ISO_C_BINDING
+      LOGICAL(kind=C_BOOL) :: cxios_is_defined_field_valid_min
+      INTEGER (kind = C_INTPTR_T), VALUE :: field_hdl
+    END FUNCTION cxios_is_defined_field_valid_min
+
+  END INTERFACE
+
+END MODULE field_interface_attr
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/fortran_attr/fieldgroup_interface_attr.F90
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/fortran_attr/fieldgroup_interface_attr.F90	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/fortran_attr/fieldgroup_interface_attr.F90	(revision 1749)
@@ -0,0 +1,678 @@
+! * ************************************************************************** *
+! *               Interface auto generated - do not modify                     *
+! * ************************************************************************** *
+#include "../fortran/xios_fortran_prefix.hpp"
+
+MODULE fieldgroup_interface_attr
+  USE, INTRINSIC :: ISO_C_BINDING
+
+  INTERFACE
+    ! Do not call directly / interface FORTRAN 2003 <-> C99
+
+    SUBROUTINE cxios_set_fieldgroup_add_offset(fieldgroup_hdl, add_offset) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: fieldgroup_hdl
+      REAL (KIND=C_DOUBLE)      , VALUE :: add_offset
+    END SUBROUTINE cxios_set_fieldgroup_add_offset
+
+    SUBROUTINE cxios_get_fieldgroup_add_offset(fieldgroup_hdl, add_offset) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: fieldgroup_hdl
+      REAL (KIND=C_DOUBLE)             :: add_offset
+    END SUBROUTINE cxios_get_fieldgroup_add_offset
+
+    FUNCTION cxios_is_defined_fieldgroup_add_offset(fieldgroup_hdl) BIND(C)
+      USE ISO_C_BINDING
+      LOGICAL(kind=C_BOOL) :: cxios_is_defined_fieldgroup_add_offset
+      INTEGER (kind = C_INTPTR_T), VALUE :: fieldgroup_hdl
+    END FUNCTION cxios_is_defined_fieldgroup_add_offset
+
+
+    SUBROUTINE cxios_set_fieldgroup_axis_ref(fieldgroup_hdl, axis_ref, axis_ref_size) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: fieldgroup_hdl
+      CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: axis_ref
+      INTEGER  (kind = C_INT)     , VALUE        :: axis_ref_size
+    END SUBROUTINE cxios_set_fieldgroup_axis_ref
+
+    SUBROUTINE cxios_get_fieldgroup_axis_ref(fieldgroup_hdl, axis_ref, axis_ref_size) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: fieldgroup_hdl
+      CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: axis_ref
+      INTEGER  (kind = C_INT)     , VALUE        :: axis_ref_size
+    END SUBROUTINE cxios_get_fieldgroup_axis_ref
+
+    FUNCTION cxios_is_defined_fieldgroup_axis_ref(fieldgroup_hdl) BIND(C)
+      USE ISO_C_BINDING
+      LOGICAL(kind=C_BOOL) :: cxios_is_defined_fieldgroup_axis_ref
+      INTEGER (kind = C_INTPTR_T), VALUE :: fieldgroup_hdl
+    END FUNCTION cxios_is_defined_fieldgroup_axis_ref
+
+
+    SUBROUTINE cxios_set_fieldgroup_cell_methods(fieldgroup_hdl, cell_methods, cell_methods_size) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: fieldgroup_hdl
+      CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: cell_methods
+      INTEGER  (kind = C_INT)     , VALUE        :: cell_methods_size
+    END SUBROUTINE cxios_set_fieldgroup_cell_methods
+
+    SUBROUTINE cxios_get_fieldgroup_cell_methods(fieldgroup_hdl, cell_methods, cell_methods_size) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: fieldgroup_hdl
+      CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: cell_methods
+      INTEGER  (kind = C_INT)     , VALUE        :: cell_methods_size
+    END SUBROUTINE cxios_get_fieldgroup_cell_methods
+
+    FUNCTION cxios_is_defined_fieldgroup_cell_methods(fieldgroup_hdl) BIND(C)
+      USE ISO_C_BINDING
+      LOGICAL(kind=C_BOOL) :: cxios_is_defined_fieldgroup_cell_methods
+      INTEGER (kind = C_INTPTR_T), VALUE :: fieldgroup_hdl
+    END FUNCTION cxios_is_defined_fieldgroup_cell_methods
+
+
+    SUBROUTINE cxios_set_fieldgroup_cell_methods_mode(fieldgroup_hdl, cell_methods_mode, cell_methods_mode_size) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: fieldgroup_hdl
+      CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: cell_methods_mode
+      INTEGER  (kind = C_INT)     , VALUE        :: cell_methods_mode_size
+    END SUBROUTINE cxios_set_fieldgroup_cell_methods_mode
+
+    SUBROUTINE cxios_get_fieldgroup_cell_methods_mode(fieldgroup_hdl, cell_methods_mode, cell_methods_mode_size) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: fieldgroup_hdl
+      CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: cell_methods_mode
+      INTEGER  (kind = C_INT)     , VALUE        :: cell_methods_mode_size
+    END SUBROUTINE cxios_get_fieldgroup_cell_methods_mode
+
+    FUNCTION cxios_is_defined_fieldgroup_cell_methods_mode(fieldgroup_hdl) BIND(C)
+      USE ISO_C_BINDING
+      LOGICAL(kind=C_BOOL) :: cxios_is_defined_fieldgroup_cell_methods_mode
+      INTEGER (kind = C_INTPTR_T), VALUE :: fieldgroup_hdl
+    END FUNCTION cxios_is_defined_fieldgroup_cell_methods_mode
+
+
+    SUBROUTINE cxios_set_fieldgroup_check_if_active(fieldgroup_hdl, check_if_active) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: fieldgroup_hdl
+      LOGICAL (KIND=C_BOOL)      , VALUE :: check_if_active
+    END SUBROUTINE cxios_set_fieldgroup_check_if_active
+
+    SUBROUTINE cxios_get_fieldgroup_check_if_active(fieldgroup_hdl, check_if_active) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: fieldgroup_hdl
+      LOGICAL (KIND=C_BOOL)             :: check_if_active
+    END SUBROUTINE cxios_get_fieldgroup_check_if_active
+
+    FUNCTION cxios_is_defined_fieldgroup_check_if_active(fieldgroup_hdl) BIND(C)
+      USE ISO_C_BINDING
+      LOGICAL(kind=C_BOOL) :: cxios_is_defined_fieldgroup_check_if_active
+      INTEGER (kind = C_INTPTR_T), VALUE :: fieldgroup_hdl
+    END FUNCTION cxios_is_defined_fieldgroup_check_if_active
+
+
+    SUBROUTINE cxios_set_fieldgroup_comment(fieldgroup_hdl, comment, comment_size) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: fieldgroup_hdl
+      CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: comment
+      INTEGER  (kind = C_INT)     , VALUE        :: comment_size
+    END SUBROUTINE cxios_set_fieldgroup_comment
+
+    SUBROUTINE cxios_get_fieldgroup_comment(fieldgroup_hdl, comment, comment_size) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: fieldgroup_hdl
+      CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: comment
+      INTEGER  (kind = C_INT)     , VALUE        :: comment_size
+    END SUBROUTINE cxios_get_fieldgroup_comment
+
+    FUNCTION cxios_is_defined_fieldgroup_comment(fieldgroup_hdl) BIND(C)
+      USE ISO_C_BINDING
+      LOGICAL(kind=C_BOOL) :: cxios_is_defined_fieldgroup_comment
+      INTEGER (kind = C_INTPTR_T), VALUE :: fieldgroup_hdl
+    END FUNCTION cxios_is_defined_fieldgroup_comment
+
+
+    SUBROUTINE cxios_set_fieldgroup_compression_level(fieldgroup_hdl, compression_level) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: fieldgroup_hdl
+      INTEGER (KIND=C_INT)      , VALUE :: compression_level
+    END SUBROUTINE cxios_set_fieldgroup_compression_level
+
+    SUBROUTINE cxios_get_fieldgroup_compression_level(fieldgroup_hdl, compression_level) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: fieldgroup_hdl
+      INTEGER (KIND=C_INT)             :: compression_level
+    END SUBROUTINE cxios_get_fieldgroup_compression_level
+
+    FUNCTION cxios_is_defined_fieldgroup_compression_level(fieldgroup_hdl) BIND(C)
+      USE ISO_C_BINDING
+      LOGICAL(kind=C_BOOL) :: cxios_is_defined_fieldgroup_compression_level
+      INTEGER (kind = C_INTPTR_T), VALUE :: fieldgroup_hdl
+    END FUNCTION cxios_is_defined_fieldgroup_compression_level
+
+
+    SUBROUTINE cxios_set_fieldgroup_default_value(fieldgroup_hdl, default_value) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: fieldgroup_hdl
+      REAL (KIND=C_DOUBLE)      , VALUE :: default_value
+    END SUBROUTINE cxios_set_fieldgroup_default_value
+
+    SUBROUTINE cxios_get_fieldgroup_default_value(fieldgroup_hdl, default_value) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: fieldgroup_hdl
+      REAL (KIND=C_DOUBLE)             :: default_value
+    END SUBROUTINE cxios_get_fieldgroup_default_value
+
+    FUNCTION cxios_is_defined_fieldgroup_default_value(fieldgroup_hdl) BIND(C)
+      USE ISO_C_BINDING
+      LOGICAL(kind=C_BOOL) :: cxios_is_defined_fieldgroup_default_value
+      INTEGER (kind = C_INTPTR_T), VALUE :: fieldgroup_hdl
+    END FUNCTION cxios_is_defined_fieldgroup_default_value
+
+
+    SUBROUTINE cxios_set_fieldgroup_detect_missing_value(fieldgroup_hdl, detect_missing_value) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: fieldgroup_hdl
+      LOGICAL (KIND=C_BOOL)      , VALUE :: detect_missing_value
+    END SUBROUTINE cxios_set_fieldgroup_detect_missing_value
+
+    SUBROUTINE cxios_get_fieldgroup_detect_missing_value(fieldgroup_hdl, detect_missing_value) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: fieldgroup_hdl
+      LOGICAL (KIND=C_BOOL)             :: detect_missing_value
+    END SUBROUTINE cxios_get_fieldgroup_detect_missing_value
+
+    FUNCTION cxios_is_defined_fieldgroup_detect_missing_value(fieldgroup_hdl) BIND(C)
+      USE ISO_C_BINDING
+      LOGICAL(kind=C_BOOL) :: cxios_is_defined_fieldgroup_detect_missing_value
+      INTEGER (kind = C_INTPTR_T), VALUE :: fieldgroup_hdl
+    END FUNCTION cxios_is_defined_fieldgroup_detect_missing_value
+
+
+    SUBROUTINE cxios_set_fieldgroup_domain_ref(fieldgroup_hdl, domain_ref, domain_ref_size) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: fieldgroup_hdl
+      CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: domain_ref
+      INTEGER  (kind = C_INT)     , VALUE        :: domain_ref_size
+    END SUBROUTINE cxios_set_fieldgroup_domain_ref
+
+    SUBROUTINE cxios_get_fieldgroup_domain_ref(fieldgroup_hdl, domain_ref, domain_ref_size) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: fieldgroup_hdl
+      CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: domain_ref
+      INTEGER  (kind = C_INT)     , VALUE        :: domain_ref_size
+    END SUBROUTINE cxios_get_fieldgroup_domain_ref
+
+    FUNCTION cxios_is_defined_fieldgroup_domain_ref(fieldgroup_hdl) BIND(C)
+      USE ISO_C_BINDING
+      LOGICAL(kind=C_BOOL) :: cxios_is_defined_fieldgroup_domain_ref
+      INTEGER (kind = C_INTPTR_T), VALUE :: fieldgroup_hdl
+    END FUNCTION cxios_is_defined_fieldgroup_domain_ref
+
+
+    SUBROUTINE cxios_set_fieldgroup_enabled(fieldgroup_hdl, enabled) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: fieldgroup_hdl
+      LOGICAL (KIND=C_BOOL)      , VALUE :: enabled
+    END SUBROUTINE cxios_set_fieldgroup_enabled
+
+    SUBROUTINE cxios_get_fieldgroup_enabled(fieldgroup_hdl, enabled) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: fieldgroup_hdl
+      LOGICAL (KIND=C_BOOL)             :: enabled
+    END SUBROUTINE cxios_get_fieldgroup_enabled
+
+    FUNCTION cxios_is_defined_fieldgroup_enabled(fieldgroup_hdl) BIND(C)
+      USE ISO_C_BINDING
+      LOGICAL(kind=C_BOOL) :: cxios_is_defined_fieldgroup_enabled
+      INTEGER (kind = C_INTPTR_T), VALUE :: fieldgroup_hdl
+    END FUNCTION cxios_is_defined_fieldgroup_enabled
+
+
+    SUBROUTINE cxios_set_fieldgroup_expr(fieldgroup_hdl, expr, expr_size) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: fieldgroup_hdl
+      CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: expr
+      INTEGER  (kind = C_INT)     , VALUE        :: expr_size
+    END SUBROUTINE cxios_set_fieldgroup_expr
+
+    SUBROUTINE cxios_get_fieldgroup_expr(fieldgroup_hdl, expr, expr_size) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: fieldgroup_hdl
+      CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: expr
+      INTEGER  (kind = C_INT)     , VALUE        :: expr_size
+    END SUBROUTINE cxios_get_fieldgroup_expr
+
+    FUNCTION cxios_is_defined_fieldgroup_expr(fieldgroup_hdl) BIND(C)
+      USE ISO_C_BINDING
+      LOGICAL(kind=C_BOOL) :: cxios_is_defined_fieldgroup_expr
+      INTEGER (kind = C_INTPTR_T), VALUE :: fieldgroup_hdl
+    END FUNCTION cxios_is_defined_fieldgroup_expr
+
+
+    SUBROUTINE cxios_set_fieldgroup_field_ref(fieldgroup_hdl, field_ref, field_ref_size) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: fieldgroup_hdl
+      CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: field_ref
+      INTEGER  (kind = C_INT)     , VALUE        :: field_ref_size
+    END SUBROUTINE cxios_set_fieldgroup_field_ref
+
+    SUBROUTINE cxios_get_fieldgroup_field_ref(fieldgroup_hdl, field_ref, field_ref_size) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: fieldgroup_hdl
+      CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: field_ref
+      INTEGER  (kind = C_INT)     , VALUE        :: field_ref_size
+    END SUBROUTINE cxios_get_fieldgroup_field_ref
+
+    FUNCTION cxios_is_defined_fieldgroup_field_ref(fieldgroup_hdl) BIND(C)
+      USE ISO_C_BINDING
+      LOGICAL(kind=C_BOOL) :: cxios_is_defined_fieldgroup_field_ref
+      INTEGER (kind = C_INTPTR_T), VALUE :: fieldgroup_hdl
+    END FUNCTION cxios_is_defined_fieldgroup_field_ref
+
+
+    SUBROUTINE cxios_set_fieldgroup_freq_offset(fieldgroup_hdl, freq_offset) BIND(C)
+      USE ISO_C_BINDING
+      USE IDURATION
+      INTEGER (kind = C_INTPTR_T), VALUE :: fieldgroup_hdl
+      TYPE(txios(duration)), VALUE :: freq_offset
+    END SUBROUTINE cxios_set_fieldgroup_freq_offset
+
+    SUBROUTINE cxios_get_fieldgroup_freq_offset(fieldgroup_hdl, freq_offset) BIND(C)
+      USE ISO_C_BINDING
+      USE IDURATION
+      INTEGER (kind = C_INTPTR_T), VALUE :: fieldgroup_hdl
+      TYPE(txios(duration)) :: freq_offset
+    END SUBROUTINE cxios_get_fieldgroup_freq_offset
+
+    FUNCTION cxios_is_defined_fieldgroup_freq_offset(fieldgroup_hdl) BIND(C)
+      USE ISO_C_BINDING
+      LOGICAL(kind=C_BOOL) :: cxios_is_defined_fieldgroup_freq_offset
+      INTEGER (kind = C_INTPTR_T), VALUE :: fieldgroup_hdl
+    END FUNCTION cxios_is_defined_fieldgroup_freq_offset
+
+
+    SUBROUTINE cxios_set_fieldgroup_freq_op(fieldgroup_hdl, freq_op) BIND(C)
+      USE ISO_C_BINDING
+      USE IDURATION
+      INTEGER (kind = C_INTPTR_T), VALUE :: fieldgroup_hdl
+      TYPE(txios(duration)), VALUE :: freq_op
+    END SUBROUTINE cxios_set_fieldgroup_freq_op
+
+    SUBROUTINE cxios_get_fieldgroup_freq_op(fieldgroup_hdl, freq_op) BIND(C)
+      USE ISO_C_BINDING
+      USE IDURATION
+      INTEGER (kind = C_INTPTR_T), VALUE :: fieldgroup_hdl
+      TYPE(txios(duration)) :: freq_op
+    END SUBROUTINE cxios_get_fieldgroup_freq_op
+
+    FUNCTION cxios_is_defined_fieldgroup_freq_op(fieldgroup_hdl) BIND(C)
+      USE ISO_C_BINDING
+      LOGICAL(kind=C_BOOL) :: cxios_is_defined_fieldgroup_freq_op
+      INTEGER (kind = C_INTPTR_T), VALUE :: fieldgroup_hdl
+    END FUNCTION cxios_is_defined_fieldgroup_freq_op
+
+
+    SUBROUTINE cxios_set_fieldgroup_grid_path(fieldgroup_hdl, grid_path, grid_path_size) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: fieldgroup_hdl
+      CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: grid_path
+      INTEGER  (kind = C_INT)     , VALUE        :: grid_path_size
+    END SUBROUTINE cxios_set_fieldgroup_grid_path
+
+    SUBROUTINE cxios_get_fieldgroup_grid_path(fieldgroup_hdl, grid_path, grid_path_size) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: fieldgroup_hdl
+      CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: grid_path
+      INTEGER  (kind = C_INT)     , VALUE        :: grid_path_size
+    END SUBROUTINE cxios_get_fieldgroup_grid_path
+
+    FUNCTION cxios_is_defined_fieldgroup_grid_path(fieldgroup_hdl) BIND(C)
+      USE ISO_C_BINDING
+      LOGICAL(kind=C_BOOL) :: cxios_is_defined_fieldgroup_grid_path
+      INTEGER (kind = C_INTPTR_T), VALUE :: fieldgroup_hdl
+    END FUNCTION cxios_is_defined_fieldgroup_grid_path
+
+
+    SUBROUTINE cxios_set_fieldgroup_grid_ref(fieldgroup_hdl, grid_ref, grid_ref_size) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: fieldgroup_hdl
+      CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: grid_ref
+      INTEGER  (kind = C_INT)     , VALUE        :: grid_ref_size
+    END SUBROUTINE cxios_set_fieldgroup_grid_ref
+
+    SUBROUTINE cxios_get_fieldgroup_grid_ref(fieldgroup_hdl, grid_ref, grid_ref_size) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: fieldgroup_hdl
+      CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: grid_ref
+      INTEGER  (kind = C_INT)     , VALUE        :: grid_ref_size
+    END SUBROUTINE cxios_get_fieldgroup_grid_ref
+
+    FUNCTION cxios_is_defined_fieldgroup_grid_ref(fieldgroup_hdl) BIND(C)
+      USE ISO_C_BINDING
+      LOGICAL(kind=C_BOOL) :: cxios_is_defined_fieldgroup_grid_ref
+      INTEGER (kind = C_INTPTR_T), VALUE :: fieldgroup_hdl
+    END FUNCTION cxios_is_defined_fieldgroup_grid_ref
+
+
+    SUBROUTINE cxios_set_fieldgroup_group_ref(fieldgroup_hdl, group_ref, group_ref_size) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: fieldgroup_hdl
+      CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: group_ref
+      INTEGER  (kind = C_INT)     , VALUE        :: group_ref_size
+    END SUBROUTINE cxios_set_fieldgroup_group_ref
+
+    SUBROUTINE cxios_get_fieldgroup_group_ref(fieldgroup_hdl, group_ref, group_ref_size) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: fieldgroup_hdl
+      CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: group_ref
+      INTEGER  (kind = C_INT)     , VALUE        :: group_ref_size
+    END SUBROUTINE cxios_get_fieldgroup_group_ref
+
+    FUNCTION cxios_is_defined_fieldgroup_group_ref(fieldgroup_hdl) BIND(C)
+      USE ISO_C_BINDING
+      LOGICAL(kind=C_BOOL) :: cxios_is_defined_fieldgroup_group_ref
+      INTEGER (kind = C_INTPTR_T), VALUE :: fieldgroup_hdl
+    END FUNCTION cxios_is_defined_fieldgroup_group_ref
+
+
+    SUBROUTINE cxios_set_fieldgroup_indexed_output(fieldgroup_hdl, indexed_output) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: fieldgroup_hdl
+      LOGICAL (KIND=C_BOOL)      , VALUE :: indexed_output
+    END SUBROUTINE cxios_set_fieldgroup_indexed_output
+
+    SUBROUTINE cxios_get_fieldgroup_indexed_output(fieldgroup_hdl, indexed_output) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: fieldgroup_hdl
+      LOGICAL (KIND=C_BOOL)             :: indexed_output
+    END SUBROUTINE cxios_get_fieldgroup_indexed_output
+
+    FUNCTION cxios_is_defined_fieldgroup_indexed_output(fieldgroup_hdl) BIND(C)
+      USE ISO_C_BINDING
+      LOGICAL(kind=C_BOOL) :: cxios_is_defined_fieldgroup_indexed_output
+      INTEGER (kind = C_INTPTR_T), VALUE :: fieldgroup_hdl
+    END FUNCTION cxios_is_defined_fieldgroup_indexed_output
+
+
+    SUBROUTINE cxios_set_fieldgroup_level(fieldgroup_hdl, level) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: fieldgroup_hdl
+      INTEGER (KIND=C_INT)      , VALUE :: level
+    END SUBROUTINE cxios_set_fieldgroup_level
+
+    SUBROUTINE cxios_get_fieldgroup_level(fieldgroup_hdl, level) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: fieldgroup_hdl
+      INTEGER (KIND=C_INT)             :: level
+    END SUBROUTINE cxios_get_fieldgroup_level
+
+    FUNCTION cxios_is_defined_fieldgroup_level(fieldgroup_hdl) BIND(C)
+      USE ISO_C_BINDING
+      LOGICAL(kind=C_BOOL) :: cxios_is_defined_fieldgroup_level
+      INTEGER (kind = C_INTPTR_T), VALUE :: fieldgroup_hdl
+    END FUNCTION cxios_is_defined_fieldgroup_level
+
+
+    SUBROUTINE cxios_set_fieldgroup_long_name(fieldgroup_hdl, long_name, long_name_size) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: fieldgroup_hdl
+      CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: long_name
+      INTEGER  (kind = C_INT)     , VALUE        :: long_name_size
+    END SUBROUTINE cxios_set_fieldgroup_long_name
+
+    SUBROUTINE cxios_get_fieldgroup_long_name(fieldgroup_hdl, long_name, long_name_size) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: fieldgroup_hdl
+      CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: long_name
+      INTEGER  (kind = C_INT)     , VALUE        :: long_name_size
+    END SUBROUTINE cxios_get_fieldgroup_long_name
+
+    FUNCTION cxios_is_defined_fieldgroup_long_name(fieldgroup_hdl) BIND(C)
+      USE ISO_C_BINDING
+      LOGICAL(kind=C_BOOL) :: cxios_is_defined_fieldgroup_long_name
+      INTEGER (kind = C_INTPTR_T), VALUE :: fieldgroup_hdl
+    END FUNCTION cxios_is_defined_fieldgroup_long_name
+
+
+    SUBROUTINE cxios_set_fieldgroup_name(fieldgroup_hdl, name, name_size) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: fieldgroup_hdl
+      CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: name
+      INTEGER  (kind = C_INT)     , VALUE        :: name_size
+    END SUBROUTINE cxios_set_fieldgroup_name
+
+    SUBROUTINE cxios_get_fieldgroup_name(fieldgroup_hdl, name, name_size) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: fieldgroup_hdl
+      CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: name
+      INTEGER  (kind = C_INT)     , VALUE        :: name_size
+    END SUBROUTINE cxios_get_fieldgroup_name
+
+    FUNCTION cxios_is_defined_fieldgroup_name(fieldgroup_hdl) BIND(C)
+      USE ISO_C_BINDING
+      LOGICAL(kind=C_BOOL) :: cxios_is_defined_fieldgroup_name
+      INTEGER (kind = C_INTPTR_T), VALUE :: fieldgroup_hdl
+    END FUNCTION cxios_is_defined_fieldgroup_name
+
+
+    SUBROUTINE cxios_set_fieldgroup_operation(fieldgroup_hdl, operation, operation_size) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: fieldgroup_hdl
+      CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: operation
+      INTEGER  (kind = C_INT)     , VALUE        :: operation_size
+    END SUBROUTINE cxios_set_fieldgroup_operation
+
+    SUBROUTINE cxios_get_fieldgroup_operation(fieldgroup_hdl, operation, operation_size) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: fieldgroup_hdl
+      CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: operation
+      INTEGER  (kind = C_INT)     , VALUE        :: operation_size
+    END SUBROUTINE cxios_get_fieldgroup_operation
+
+    FUNCTION cxios_is_defined_fieldgroup_operation(fieldgroup_hdl) BIND(C)
+      USE ISO_C_BINDING
+      LOGICAL(kind=C_BOOL) :: cxios_is_defined_fieldgroup_operation
+      INTEGER (kind = C_INTPTR_T), VALUE :: fieldgroup_hdl
+    END FUNCTION cxios_is_defined_fieldgroup_operation
+
+
+    SUBROUTINE cxios_set_fieldgroup_prec(fieldgroup_hdl, prec) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: fieldgroup_hdl
+      INTEGER (KIND=C_INT)      , VALUE :: prec
+    END SUBROUTINE cxios_set_fieldgroup_prec
+
+    SUBROUTINE cxios_get_fieldgroup_prec(fieldgroup_hdl, prec) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: fieldgroup_hdl
+      INTEGER (KIND=C_INT)             :: prec
+    END SUBROUTINE cxios_get_fieldgroup_prec
+
+    FUNCTION cxios_is_defined_fieldgroup_prec(fieldgroup_hdl) BIND(C)
+      USE ISO_C_BINDING
+      LOGICAL(kind=C_BOOL) :: cxios_is_defined_fieldgroup_prec
+      INTEGER (kind = C_INTPTR_T), VALUE :: fieldgroup_hdl
+    END FUNCTION cxios_is_defined_fieldgroup_prec
+
+
+    SUBROUTINE cxios_set_fieldgroup_read_access(fieldgroup_hdl, read_access) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: fieldgroup_hdl
+      LOGICAL (KIND=C_BOOL)      , VALUE :: read_access
+    END SUBROUTINE cxios_set_fieldgroup_read_access
+
+    SUBROUTINE cxios_get_fieldgroup_read_access(fieldgroup_hdl, read_access) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: fieldgroup_hdl
+      LOGICAL (KIND=C_BOOL)             :: read_access
+    END SUBROUTINE cxios_get_fieldgroup_read_access
+
+    FUNCTION cxios_is_defined_fieldgroup_read_access(fieldgroup_hdl) BIND(C)
+      USE ISO_C_BINDING
+      LOGICAL(kind=C_BOOL) :: cxios_is_defined_fieldgroup_read_access
+      INTEGER (kind = C_INTPTR_T), VALUE :: fieldgroup_hdl
+    END FUNCTION cxios_is_defined_fieldgroup_read_access
+
+
+    SUBROUTINE cxios_set_fieldgroup_scalar_ref(fieldgroup_hdl, scalar_ref, scalar_ref_size) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: fieldgroup_hdl
+      CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: scalar_ref
+      INTEGER  (kind = C_INT)     , VALUE        :: scalar_ref_size
+    END SUBROUTINE cxios_set_fieldgroup_scalar_ref
+
+    SUBROUTINE cxios_get_fieldgroup_scalar_ref(fieldgroup_hdl, scalar_ref, scalar_ref_size) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: fieldgroup_hdl
+      CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: scalar_ref
+      INTEGER  (kind = C_INT)     , VALUE        :: scalar_ref_size
+    END SUBROUTINE cxios_get_fieldgroup_scalar_ref
+
+    FUNCTION cxios_is_defined_fieldgroup_scalar_ref(fieldgroup_hdl) BIND(C)
+      USE ISO_C_BINDING
+      LOGICAL(kind=C_BOOL) :: cxios_is_defined_fieldgroup_scalar_ref
+      INTEGER (kind = C_INTPTR_T), VALUE :: fieldgroup_hdl
+    END FUNCTION cxios_is_defined_fieldgroup_scalar_ref
+
+
+    SUBROUTINE cxios_set_fieldgroup_scale_factor(fieldgroup_hdl, scale_factor) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: fieldgroup_hdl
+      REAL (KIND=C_DOUBLE)      , VALUE :: scale_factor
+    END SUBROUTINE cxios_set_fieldgroup_scale_factor
+
+    SUBROUTINE cxios_get_fieldgroup_scale_factor(fieldgroup_hdl, scale_factor) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: fieldgroup_hdl
+      REAL (KIND=C_DOUBLE)             :: scale_factor
+    END SUBROUTINE cxios_get_fieldgroup_scale_factor
+
+    FUNCTION cxios_is_defined_fieldgroup_scale_factor(fieldgroup_hdl) BIND(C)
+      USE ISO_C_BINDING
+      LOGICAL(kind=C_BOOL) :: cxios_is_defined_fieldgroup_scale_factor
+      INTEGER (kind = C_INTPTR_T), VALUE :: fieldgroup_hdl
+    END FUNCTION cxios_is_defined_fieldgroup_scale_factor
+
+
+    SUBROUTINE cxios_set_fieldgroup_standard_name(fieldgroup_hdl, standard_name, standard_name_size) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: fieldgroup_hdl
+      CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: standard_name
+      INTEGER  (kind = C_INT)     , VALUE        :: standard_name_size
+    END SUBROUTINE cxios_set_fieldgroup_standard_name
+
+    SUBROUTINE cxios_get_fieldgroup_standard_name(fieldgroup_hdl, standard_name, standard_name_size) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: fieldgroup_hdl
+      CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: standard_name
+      INTEGER  (kind = C_INT)     , VALUE        :: standard_name_size
+    END SUBROUTINE cxios_get_fieldgroup_standard_name
+
+    FUNCTION cxios_is_defined_fieldgroup_standard_name(fieldgroup_hdl) BIND(C)
+      USE ISO_C_BINDING
+      LOGICAL(kind=C_BOOL) :: cxios_is_defined_fieldgroup_standard_name
+      INTEGER (kind = C_INTPTR_T), VALUE :: fieldgroup_hdl
+    END FUNCTION cxios_is_defined_fieldgroup_standard_name
+
+
+    SUBROUTINE cxios_set_fieldgroup_ts_enabled(fieldgroup_hdl, ts_enabled) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: fieldgroup_hdl
+      LOGICAL (KIND=C_BOOL)      , VALUE :: ts_enabled
+    END SUBROUTINE cxios_set_fieldgroup_ts_enabled
+
+    SUBROUTINE cxios_get_fieldgroup_ts_enabled(fieldgroup_hdl, ts_enabled) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: fieldgroup_hdl
+      LOGICAL (KIND=C_BOOL)             :: ts_enabled
+    END SUBROUTINE cxios_get_fieldgroup_ts_enabled
+
+    FUNCTION cxios_is_defined_fieldgroup_ts_enabled(fieldgroup_hdl) BIND(C)
+      USE ISO_C_BINDING
+      LOGICAL(kind=C_BOOL) :: cxios_is_defined_fieldgroup_ts_enabled
+      INTEGER (kind = C_INTPTR_T), VALUE :: fieldgroup_hdl
+    END FUNCTION cxios_is_defined_fieldgroup_ts_enabled
+
+
+    SUBROUTINE cxios_set_fieldgroup_ts_split_freq(fieldgroup_hdl, ts_split_freq) BIND(C)
+      USE ISO_C_BINDING
+      USE IDURATION
+      INTEGER (kind = C_INTPTR_T), VALUE :: fieldgroup_hdl
+      TYPE(txios(duration)), VALUE :: ts_split_freq
+    END SUBROUTINE cxios_set_fieldgroup_ts_split_freq
+
+    SUBROUTINE cxios_get_fieldgroup_ts_split_freq(fieldgroup_hdl, ts_split_freq) BIND(C)
+      USE ISO_C_BINDING
+      USE IDURATION
+      INTEGER (kind = C_INTPTR_T), VALUE :: fieldgroup_hdl
+      TYPE(txios(duration)) :: ts_split_freq
+    END SUBROUTINE cxios_get_fieldgroup_ts_split_freq
+
+    FUNCTION cxios_is_defined_fieldgroup_ts_split_freq(fieldgroup_hdl) BIND(C)
+      USE ISO_C_BINDING
+      LOGICAL(kind=C_BOOL) :: cxios_is_defined_fieldgroup_ts_split_freq
+      INTEGER (kind = C_INTPTR_T), VALUE :: fieldgroup_hdl
+    END FUNCTION cxios_is_defined_fieldgroup_ts_split_freq
+
+
+    SUBROUTINE cxios_set_fieldgroup_unit(fieldgroup_hdl, unit, unit_size) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: fieldgroup_hdl
+      CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: unit
+      INTEGER  (kind = C_INT)     , VALUE        :: unit_size
+    END SUBROUTINE cxios_set_fieldgroup_unit
+
+    SUBROUTINE cxios_get_fieldgroup_unit(fieldgroup_hdl, unit, unit_size) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: fieldgroup_hdl
+      CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: unit
+      INTEGER  (kind = C_INT)     , VALUE        :: unit_size
+    END SUBROUTINE cxios_get_fieldgroup_unit
+
+    FUNCTION cxios_is_defined_fieldgroup_unit(fieldgroup_hdl) BIND(C)
+      USE ISO_C_BINDING
+      LOGICAL(kind=C_BOOL) :: cxios_is_defined_fieldgroup_unit
+      INTEGER (kind = C_INTPTR_T), VALUE :: fieldgroup_hdl
+    END FUNCTION cxios_is_defined_fieldgroup_unit
+
+
+    SUBROUTINE cxios_set_fieldgroup_valid_max(fieldgroup_hdl, valid_max) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: fieldgroup_hdl
+      REAL (KIND=C_DOUBLE)      , VALUE :: valid_max
+    END SUBROUTINE cxios_set_fieldgroup_valid_max
+
+    SUBROUTINE cxios_get_fieldgroup_valid_max(fieldgroup_hdl, valid_max) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: fieldgroup_hdl
+      REAL (KIND=C_DOUBLE)             :: valid_max
+    END SUBROUTINE cxios_get_fieldgroup_valid_max
+
+    FUNCTION cxios_is_defined_fieldgroup_valid_max(fieldgroup_hdl) BIND(C)
+      USE ISO_C_BINDING
+      LOGICAL(kind=C_BOOL) :: cxios_is_defined_fieldgroup_valid_max
+      INTEGER (kind = C_INTPTR_T), VALUE :: fieldgroup_hdl
+    END FUNCTION cxios_is_defined_fieldgroup_valid_max
+
+
+    SUBROUTINE cxios_set_fieldgroup_valid_min(fieldgroup_hdl, valid_min) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: fieldgroup_hdl
+      REAL (KIND=C_DOUBLE)      , VALUE :: valid_min
+    END SUBROUTINE cxios_set_fieldgroup_valid_min
+
+    SUBROUTINE cxios_get_fieldgroup_valid_min(fieldgroup_hdl, valid_min) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: fieldgroup_hdl
+      REAL (KIND=C_DOUBLE)             :: valid_min
+    END SUBROUTINE cxios_get_fieldgroup_valid_min
+
+    FUNCTION cxios_is_defined_fieldgroup_valid_min(fieldgroup_hdl) BIND(C)
+      USE ISO_C_BINDING
+      LOGICAL(kind=C_BOOL) :: cxios_is_defined_fieldgroup_valid_min
+      INTEGER (kind = C_INTPTR_T), VALUE :: fieldgroup_hdl
+    END FUNCTION cxios_is_defined_fieldgroup_valid_min
+
+  END INTERFACE
+
+END MODULE fieldgroup_interface_attr
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/fortran_attr/file_interface_attr.F90
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/fortran_attr/file_interface_attr.F90	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/fortran_attr/file_interface_attr.F90	(revision 1749)
@@ -0,0 +1,711 @@
+! * ************************************************************************** *
+! *               Interface auto generated - do not modify                     *
+! * ************************************************************************** *
+#include "../fortran/xios_fortran_prefix.hpp"
+
+MODULE file_interface_attr
+  USE, INTRINSIC :: ISO_C_BINDING
+
+  INTERFACE
+    ! Do not call directly / interface FORTRAN 2003 <-> C99
+
+    SUBROUTINE cxios_set_file_append(file_hdl, append) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: file_hdl
+      LOGICAL (KIND=C_BOOL)      , VALUE :: append
+    END SUBROUTINE cxios_set_file_append
+
+    SUBROUTINE cxios_get_file_append(file_hdl, append) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: file_hdl
+      LOGICAL (KIND=C_BOOL)             :: append
+    END SUBROUTINE cxios_get_file_append
+
+    FUNCTION cxios_is_defined_file_append(file_hdl) BIND(C)
+      USE ISO_C_BINDING
+      LOGICAL(kind=C_BOOL) :: cxios_is_defined_file_append
+      INTEGER (kind = C_INTPTR_T), VALUE :: file_hdl
+    END FUNCTION cxios_is_defined_file_append
+
+
+    SUBROUTINE cxios_set_file_comment(file_hdl, comment, comment_size) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: file_hdl
+      CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: comment
+      INTEGER  (kind = C_INT)     , VALUE        :: comment_size
+    END SUBROUTINE cxios_set_file_comment
+
+    SUBROUTINE cxios_get_file_comment(file_hdl, comment, comment_size) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: file_hdl
+      CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: comment
+      INTEGER  (kind = C_INT)     , VALUE        :: comment_size
+    END SUBROUTINE cxios_get_file_comment
+
+    FUNCTION cxios_is_defined_file_comment(file_hdl) BIND(C)
+      USE ISO_C_BINDING
+      LOGICAL(kind=C_BOOL) :: cxios_is_defined_file_comment
+      INTEGER (kind = C_INTPTR_T), VALUE :: file_hdl
+    END FUNCTION cxios_is_defined_file_comment
+
+
+    SUBROUTINE cxios_set_file_compression_level(file_hdl, compression_level) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: file_hdl
+      INTEGER (KIND=C_INT)      , VALUE :: compression_level
+    END SUBROUTINE cxios_set_file_compression_level
+
+    SUBROUTINE cxios_get_file_compression_level(file_hdl, compression_level) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: file_hdl
+      INTEGER (KIND=C_INT)             :: compression_level
+    END SUBROUTINE cxios_get_file_compression_level
+
+    FUNCTION cxios_is_defined_file_compression_level(file_hdl) BIND(C)
+      USE ISO_C_BINDING
+      LOGICAL(kind=C_BOOL) :: cxios_is_defined_file_compression_level
+      INTEGER (kind = C_INTPTR_T), VALUE :: file_hdl
+    END FUNCTION cxios_is_defined_file_compression_level
+
+
+    SUBROUTINE cxios_set_file_convention(file_hdl, convention, convention_size) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: file_hdl
+      CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: convention
+      INTEGER  (kind = C_INT)     , VALUE        :: convention_size
+    END SUBROUTINE cxios_set_file_convention
+
+    SUBROUTINE cxios_get_file_convention(file_hdl, convention, convention_size) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: file_hdl
+      CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: convention
+      INTEGER  (kind = C_INT)     , VALUE        :: convention_size
+    END SUBROUTINE cxios_get_file_convention
+
+    FUNCTION cxios_is_defined_file_convention(file_hdl) BIND(C)
+      USE ISO_C_BINDING
+      LOGICAL(kind=C_BOOL) :: cxios_is_defined_file_convention
+      INTEGER (kind = C_INTPTR_T), VALUE :: file_hdl
+    END FUNCTION cxios_is_defined_file_convention
+
+
+    SUBROUTINE cxios_set_file_convention_str(file_hdl, convention_str, convention_str_size) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: file_hdl
+      CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: convention_str
+      INTEGER  (kind = C_INT)     , VALUE        :: convention_str_size
+    END SUBROUTINE cxios_set_file_convention_str
+
+    SUBROUTINE cxios_get_file_convention_str(file_hdl, convention_str, convention_str_size) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: file_hdl
+      CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: convention_str
+      INTEGER  (kind = C_INT)     , VALUE        :: convention_str_size
+    END SUBROUTINE cxios_get_file_convention_str
+
+    FUNCTION cxios_is_defined_file_convention_str(file_hdl) BIND(C)
+      USE ISO_C_BINDING
+      LOGICAL(kind=C_BOOL) :: cxios_is_defined_file_convention_str
+      INTEGER (kind = C_INTPTR_T), VALUE :: file_hdl
+    END FUNCTION cxios_is_defined_file_convention_str
+
+
+    SUBROUTINE cxios_set_file_cyclic(file_hdl, cyclic) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: file_hdl
+      LOGICAL (KIND=C_BOOL)      , VALUE :: cyclic
+    END SUBROUTINE cxios_set_file_cyclic
+
+    SUBROUTINE cxios_get_file_cyclic(file_hdl, cyclic) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: file_hdl
+      LOGICAL (KIND=C_BOOL)             :: cyclic
+    END SUBROUTINE cxios_get_file_cyclic
+
+    FUNCTION cxios_is_defined_file_cyclic(file_hdl) BIND(C)
+      USE ISO_C_BINDING
+      LOGICAL(kind=C_BOOL) :: cxios_is_defined_file_cyclic
+      INTEGER (kind = C_INTPTR_T), VALUE :: file_hdl
+    END FUNCTION cxios_is_defined_file_cyclic
+
+
+    SUBROUTINE cxios_set_file_description(file_hdl, description, description_size) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: file_hdl
+      CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: description
+      INTEGER  (kind = C_INT)     , VALUE        :: description_size
+    END SUBROUTINE cxios_set_file_description
+
+    SUBROUTINE cxios_get_file_description(file_hdl, description, description_size) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: file_hdl
+      CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: description
+      INTEGER  (kind = C_INT)     , VALUE        :: description_size
+    END SUBROUTINE cxios_get_file_description
+
+    FUNCTION cxios_is_defined_file_description(file_hdl) BIND(C)
+      USE ISO_C_BINDING
+      LOGICAL(kind=C_BOOL) :: cxios_is_defined_file_description
+      INTEGER (kind = C_INTPTR_T), VALUE :: file_hdl
+    END FUNCTION cxios_is_defined_file_description
+
+
+    SUBROUTINE cxios_set_file_enabled(file_hdl, enabled) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: file_hdl
+      LOGICAL (KIND=C_BOOL)      , VALUE :: enabled
+    END SUBROUTINE cxios_set_file_enabled
+
+    SUBROUTINE cxios_get_file_enabled(file_hdl, enabled) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: file_hdl
+      LOGICAL (KIND=C_BOOL)             :: enabled
+    END SUBROUTINE cxios_get_file_enabled
+
+    FUNCTION cxios_is_defined_file_enabled(file_hdl) BIND(C)
+      USE ISO_C_BINDING
+      LOGICAL(kind=C_BOOL) :: cxios_is_defined_file_enabled
+      INTEGER (kind = C_INTPTR_T), VALUE :: file_hdl
+    END FUNCTION cxios_is_defined_file_enabled
+
+
+    SUBROUTINE cxios_set_file_format(file_hdl, format, format_size) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: file_hdl
+      CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: format
+      INTEGER  (kind = C_INT)     , VALUE        :: format_size
+    END SUBROUTINE cxios_set_file_format
+
+    SUBROUTINE cxios_get_file_format(file_hdl, format, format_size) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: file_hdl
+      CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: format
+      INTEGER  (kind = C_INT)     , VALUE        :: format_size
+    END SUBROUTINE cxios_get_file_format
+
+    FUNCTION cxios_is_defined_file_format(file_hdl) BIND(C)
+      USE ISO_C_BINDING
+      LOGICAL(kind=C_BOOL) :: cxios_is_defined_file_format
+      INTEGER (kind = C_INTPTR_T), VALUE :: file_hdl
+    END FUNCTION cxios_is_defined_file_format
+
+
+    SUBROUTINE cxios_set_file_min_digits(file_hdl, min_digits) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: file_hdl
+      INTEGER (KIND=C_INT)      , VALUE :: min_digits
+    END SUBROUTINE cxios_set_file_min_digits
+
+    SUBROUTINE cxios_get_file_min_digits(file_hdl, min_digits) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: file_hdl
+      INTEGER (KIND=C_INT)             :: min_digits
+    END SUBROUTINE cxios_get_file_min_digits
+
+    FUNCTION cxios_is_defined_file_min_digits(file_hdl) BIND(C)
+      USE ISO_C_BINDING
+      LOGICAL(kind=C_BOOL) :: cxios_is_defined_file_min_digits
+      INTEGER (kind = C_INTPTR_T), VALUE :: file_hdl
+    END FUNCTION cxios_is_defined_file_min_digits
+
+
+    SUBROUTINE cxios_set_file_mode(file_hdl, mode, mode_size) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: file_hdl
+      CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: mode
+      INTEGER  (kind = C_INT)     , VALUE        :: mode_size
+    END SUBROUTINE cxios_set_file_mode
+
+    SUBROUTINE cxios_get_file_mode(file_hdl, mode, mode_size) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: file_hdl
+      CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: mode
+      INTEGER  (kind = C_INT)     , VALUE        :: mode_size
+    END SUBROUTINE cxios_get_file_mode
+
+    FUNCTION cxios_is_defined_file_mode(file_hdl) BIND(C)
+      USE ISO_C_BINDING
+      LOGICAL(kind=C_BOOL) :: cxios_is_defined_file_mode
+      INTEGER (kind = C_INTPTR_T), VALUE :: file_hdl
+    END FUNCTION cxios_is_defined_file_mode
+
+
+    SUBROUTINE cxios_set_file_name(file_hdl, name, name_size) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: file_hdl
+      CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: name
+      INTEGER  (kind = C_INT)     , VALUE        :: name_size
+    END SUBROUTINE cxios_set_file_name
+
+    SUBROUTINE cxios_get_file_name(file_hdl, name, name_size) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: file_hdl
+      CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: name
+      INTEGER  (kind = C_INT)     , VALUE        :: name_size
+    END SUBROUTINE cxios_get_file_name
+
+    FUNCTION cxios_is_defined_file_name(file_hdl) BIND(C)
+      USE ISO_C_BINDING
+      LOGICAL(kind=C_BOOL) :: cxios_is_defined_file_name
+      INTEGER (kind = C_INTPTR_T), VALUE :: file_hdl
+    END FUNCTION cxios_is_defined_file_name
+
+
+    SUBROUTINE cxios_set_file_name_suffix(file_hdl, name_suffix, name_suffix_size) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: file_hdl
+      CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: name_suffix
+      INTEGER  (kind = C_INT)     , VALUE        :: name_suffix_size
+    END SUBROUTINE cxios_set_file_name_suffix
+
+    SUBROUTINE cxios_get_file_name_suffix(file_hdl, name_suffix, name_suffix_size) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: file_hdl
+      CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: name_suffix
+      INTEGER  (kind = C_INT)     , VALUE        :: name_suffix_size
+    END SUBROUTINE cxios_get_file_name_suffix
+
+    FUNCTION cxios_is_defined_file_name_suffix(file_hdl) BIND(C)
+      USE ISO_C_BINDING
+      LOGICAL(kind=C_BOOL) :: cxios_is_defined_file_name_suffix
+      INTEGER (kind = C_INTPTR_T), VALUE :: file_hdl
+    END FUNCTION cxios_is_defined_file_name_suffix
+
+
+    SUBROUTINE cxios_set_file_output_freq(file_hdl, output_freq) BIND(C)
+      USE ISO_C_BINDING
+      USE IDURATION
+      INTEGER (kind = C_INTPTR_T), VALUE :: file_hdl
+      TYPE(txios(duration)), VALUE :: output_freq
+    END SUBROUTINE cxios_set_file_output_freq
+
+    SUBROUTINE cxios_get_file_output_freq(file_hdl, output_freq) BIND(C)
+      USE ISO_C_BINDING
+      USE IDURATION
+      INTEGER (kind = C_INTPTR_T), VALUE :: file_hdl
+      TYPE(txios(duration)) :: output_freq
+    END SUBROUTINE cxios_get_file_output_freq
+
+    FUNCTION cxios_is_defined_file_output_freq(file_hdl) BIND(C)
+      USE ISO_C_BINDING
+      LOGICAL(kind=C_BOOL) :: cxios_is_defined_file_output_freq
+      INTEGER (kind = C_INTPTR_T), VALUE :: file_hdl
+    END FUNCTION cxios_is_defined_file_output_freq
+
+
+    SUBROUTINE cxios_set_file_output_level(file_hdl, output_level) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: file_hdl
+      INTEGER (KIND=C_INT)      , VALUE :: output_level
+    END SUBROUTINE cxios_set_file_output_level
+
+    SUBROUTINE cxios_get_file_output_level(file_hdl, output_level) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: file_hdl
+      INTEGER (KIND=C_INT)             :: output_level
+    END SUBROUTINE cxios_get_file_output_level
+
+    FUNCTION cxios_is_defined_file_output_level(file_hdl) BIND(C)
+      USE ISO_C_BINDING
+      LOGICAL(kind=C_BOOL) :: cxios_is_defined_file_output_level
+      INTEGER (kind = C_INTPTR_T), VALUE :: file_hdl
+    END FUNCTION cxios_is_defined_file_output_level
+
+
+    SUBROUTINE cxios_set_file_par_access(file_hdl, par_access, par_access_size) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: file_hdl
+      CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: par_access
+      INTEGER  (kind = C_INT)     , VALUE        :: par_access_size
+    END SUBROUTINE cxios_set_file_par_access
+
+    SUBROUTINE cxios_get_file_par_access(file_hdl, par_access, par_access_size) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: file_hdl
+      CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: par_access
+      INTEGER  (kind = C_INT)     , VALUE        :: par_access_size
+    END SUBROUTINE cxios_get_file_par_access
+
+    FUNCTION cxios_is_defined_file_par_access(file_hdl) BIND(C)
+      USE ISO_C_BINDING
+      LOGICAL(kind=C_BOOL) :: cxios_is_defined_file_par_access
+      INTEGER (kind = C_INTPTR_T), VALUE :: file_hdl
+    END FUNCTION cxios_is_defined_file_par_access
+
+
+    SUBROUTINE cxios_set_file_read_metadata_par(file_hdl, read_metadata_par) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: file_hdl
+      LOGICAL (KIND=C_BOOL)      , VALUE :: read_metadata_par
+    END SUBROUTINE cxios_set_file_read_metadata_par
+
+    SUBROUTINE cxios_get_file_read_metadata_par(file_hdl, read_metadata_par) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: file_hdl
+      LOGICAL (KIND=C_BOOL)             :: read_metadata_par
+    END SUBROUTINE cxios_get_file_read_metadata_par
+
+    FUNCTION cxios_is_defined_file_read_metadata_par(file_hdl) BIND(C)
+      USE ISO_C_BINDING
+      LOGICAL(kind=C_BOOL) :: cxios_is_defined_file_read_metadata_par
+      INTEGER (kind = C_INTPTR_T), VALUE :: file_hdl
+    END FUNCTION cxios_is_defined_file_read_metadata_par
+
+
+    SUBROUTINE cxios_set_file_record_offset(file_hdl, record_offset) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: file_hdl
+      INTEGER (KIND=C_INT)      , VALUE :: record_offset
+    END SUBROUTINE cxios_set_file_record_offset
+
+    SUBROUTINE cxios_get_file_record_offset(file_hdl, record_offset) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: file_hdl
+      INTEGER (KIND=C_INT)             :: record_offset
+    END SUBROUTINE cxios_get_file_record_offset
+
+    FUNCTION cxios_is_defined_file_record_offset(file_hdl) BIND(C)
+      USE ISO_C_BINDING
+      LOGICAL(kind=C_BOOL) :: cxios_is_defined_file_record_offset
+      INTEGER (kind = C_INTPTR_T), VALUE :: file_hdl
+    END FUNCTION cxios_is_defined_file_record_offset
+
+
+    SUBROUTINE cxios_set_file_split_end_offset(file_hdl, split_end_offset) BIND(C)
+      USE ISO_C_BINDING
+      USE IDURATION
+      INTEGER (kind = C_INTPTR_T), VALUE :: file_hdl
+      TYPE(txios(duration)), VALUE :: split_end_offset
+    END SUBROUTINE cxios_set_file_split_end_offset
+
+    SUBROUTINE cxios_get_file_split_end_offset(file_hdl, split_end_offset) BIND(C)
+      USE ISO_C_BINDING
+      USE IDURATION
+      INTEGER (kind = C_INTPTR_T), VALUE :: file_hdl
+      TYPE(txios(duration)) :: split_end_offset
+    END SUBROUTINE cxios_get_file_split_end_offset
+
+    FUNCTION cxios_is_defined_file_split_end_offset(file_hdl) BIND(C)
+      USE ISO_C_BINDING
+      LOGICAL(kind=C_BOOL) :: cxios_is_defined_file_split_end_offset
+      INTEGER (kind = C_INTPTR_T), VALUE :: file_hdl
+    END FUNCTION cxios_is_defined_file_split_end_offset
+
+
+    SUBROUTINE cxios_set_file_split_freq(file_hdl, split_freq) BIND(C)
+      USE ISO_C_BINDING
+      USE IDURATION
+      INTEGER (kind = C_INTPTR_T), VALUE :: file_hdl
+      TYPE(txios(duration)), VALUE :: split_freq
+    END SUBROUTINE cxios_set_file_split_freq
+
+    SUBROUTINE cxios_get_file_split_freq(file_hdl, split_freq) BIND(C)
+      USE ISO_C_BINDING
+      USE IDURATION
+      INTEGER (kind = C_INTPTR_T), VALUE :: file_hdl
+      TYPE(txios(duration)) :: split_freq
+    END SUBROUTINE cxios_get_file_split_freq
+
+    FUNCTION cxios_is_defined_file_split_freq(file_hdl) BIND(C)
+      USE ISO_C_BINDING
+      LOGICAL(kind=C_BOOL) :: cxios_is_defined_file_split_freq
+      INTEGER (kind = C_INTPTR_T), VALUE :: file_hdl
+    END FUNCTION cxios_is_defined_file_split_freq
+
+
+    SUBROUTINE cxios_set_file_split_freq_format(file_hdl, split_freq_format, split_freq_format_size) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: file_hdl
+      CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: split_freq_format
+      INTEGER  (kind = C_INT)     , VALUE        :: split_freq_format_size
+    END SUBROUTINE cxios_set_file_split_freq_format
+
+    SUBROUTINE cxios_get_file_split_freq_format(file_hdl, split_freq_format, split_freq_format_size) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: file_hdl
+      CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: split_freq_format
+      INTEGER  (kind = C_INT)     , VALUE        :: split_freq_format_size
+    END SUBROUTINE cxios_get_file_split_freq_format
+
+    FUNCTION cxios_is_defined_file_split_freq_format(file_hdl) BIND(C)
+      USE ISO_C_BINDING
+      LOGICAL(kind=C_BOOL) :: cxios_is_defined_file_split_freq_format
+      INTEGER (kind = C_INTPTR_T), VALUE :: file_hdl
+    END FUNCTION cxios_is_defined_file_split_freq_format
+
+
+    SUBROUTINE cxios_set_file_split_last_date(file_hdl, split_last_date, split_last_date_size) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: file_hdl
+      CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: split_last_date
+      INTEGER  (kind = C_INT)     , VALUE        :: split_last_date_size
+    END SUBROUTINE cxios_set_file_split_last_date
+
+    SUBROUTINE cxios_get_file_split_last_date(file_hdl, split_last_date, split_last_date_size) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: file_hdl
+      CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: split_last_date
+      INTEGER  (kind = C_INT)     , VALUE        :: split_last_date_size
+    END SUBROUTINE cxios_get_file_split_last_date
+
+    FUNCTION cxios_is_defined_file_split_last_date(file_hdl) BIND(C)
+      USE ISO_C_BINDING
+      LOGICAL(kind=C_BOOL) :: cxios_is_defined_file_split_last_date
+      INTEGER (kind = C_INTPTR_T), VALUE :: file_hdl
+    END FUNCTION cxios_is_defined_file_split_last_date
+
+
+    SUBROUTINE cxios_set_file_split_start_offset(file_hdl, split_start_offset) BIND(C)
+      USE ISO_C_BINDING
+      USE IDURATION
+      INTEGER (kind = C_INTPTR_T), VALUE :: file_hdl
+      TYPE(txios(duration)), VALUE :: split_start_offset
+    END SUBROUTINE cxios_set_file_split_start_offset
+
+    SUBROUTINE cxios_get_file_split_start_offset(file_hdl, split_start_offset) BIND(C)
+      USE ISO_C_BINDING
+      USE IDURATION
+      INTEGER (kind = C_INTPTR_T), VALUE :: file_hdl
+      TYPE(txios(duration)) :: split_start_offset
+    END SUBROUTINE cxios_get_file_split_start_offset
+
+    FUNCTION cxios_is_defined_file_split_start_offset(file_hdl) BIND(C)
+      USE ISO_C_BINDING
+      LOGICAL(kind=C_BOOL) :: cxios_is_defined_file_split_start_offset
+      INTEGER (kind = C_INTPTR_T), VALUE :: file_hdl
+    END FUNCTION cxios_is_defined_file_split_start_offset
+
+
+    SUBROUTINE cxios_set_file_sync_freq(file_hdl, sync_freq) BIND(C)
+      USE ISO_C_BINDING
+      USE IDURATION
+      INTEGER (kind = C_INTPTR_T), VALUE :: file_hdl
+      TYPE(txios(duration)), VALUE :: sync_freq
+    END SUBROUTINE cxios_set_file_sync_freq
+
+    SUBROUTINE cxios_get_file_sync_freq(file_hdl, sync_freq) BIND(C)
+      USE ISO_C_BINDING
+      USE IDURATION
+      INTEGER (kind = C_INTPTR_T), VALUE :: file_hdl
+      TYPE(txios(duration)) :: sync_freq
+    END SUBROUTINE cxios_get_file_sync_freq
+
+    FUNCTION cxios_is_defined_file_sync_freq(file_hdl) BIND(C)
+      USE ISO_C_BINDING
+      LOGICAL(kind=C_BOOL) :: cxios_is_defined_file_sync_freq
+      INTEGER (kind = C_INTPTR_T), VALUE :: file_hdl
+    END FUNCTION cxios_is_defined_file_sync_freq
+
+
+    SUBROUTINE cxios_set_file_time_counter(file_hdl, time_counter, time_counter_size) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: file_hdl
+      CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: time_counter
+      INTEGER  (kind = C_INT)     , VALUE        :: time_counter_size
+    END SUBROUTINE cxios_set_file_time_counter
+
+    SUBROUTINE cxios_get_file_time_counter(file_hdl, time_counter, time_counter_size) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: file_hdl
+      CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: time_counter
+      INTEGER  (kind = C_INT)     , VALUE        :: time_counter_size
+    END SUBROUTINE cxios_get_file_time_counter
+
+    FUNCTION cxios_is_defined_file_time_counter(file_hdl) BIND(C)
+      USE ISO_C_BINDING
+      LOGICAL(kind=C_BOOL) :: cxios_is_defined_file_time_counter
+      INTEGER (kind = C_INTPTR_T), VALUE :: file_hdl
+    END FUNCTION cxios_is_defined_file_time_counter
+
+
+    SUBROUTINE cxios_set_file_time_counter_name(file_hdl, time_counter_name, time_counter_name_size) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: file_hdl
+      CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: time_counter_name
+      INTEGER  (kind = C_INT)     , VALUE        :: time_counter_name_size
+    END SUBROUTINE cxios_set_file_time_counter_name
+
+    SUBROUTINE cxios_get_file_time_counter_name(file_hdl, time_counter_name, time_counter_name_size) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: file_hdl
+      CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: time_counter_name
+      INTEGER  (kind = C_INT)     , VALUE        :: time_counter_name_size
+    END SUBROUTINE cxios_get_file_time_counter_name
+
+    FUNCTION cxios_is_defined_file_time_counter_name(file_hdl) BIND(C)
+      USE ISO_C_BINDING
+      LOGICAL(kind=C_BOOL) :: cxios_is_defined_file_time_counter_name
+      INTEGER (kind = C_INTPTR_T), VALUE :: file_hdl
+    END FUNCTION cxios_is_defined_file_time_counter_name
+
+
+    SUBROUTINE cxios_set_file_time_stamp_format(file_hdl, time_stamp_format, time_stamp_format_size) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: file_hdl
+      CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: time_stamp_format
+      INTEGER  (kind = C_INT)     , VALUE        :: time_stamp_format_size
+    END SUBROUTINE cxios_set_file_time_stamp_format
+
+    SUBROUTINE cxios_get_file_time_stamp_format(file_hdl, time_stamp_format, time_stamp_format_size) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: file_hdl
+      CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: time_stamp_format
+      INTEGER  (kind = C_INT)     , VALUE        :: time_stamp_format_size
+    END SUBROUTINE cxios_get_file_time_stamp_format
+
+    FUNCTION cxios_is_defined_file_time_stamp_format(file_hdl) BIND(C)
+      USE ISO_C_BINDING
+      LOGICAL(kind=C_BOOL) :: cxios_is_defined_file_time_stamp_format
+      INTEGER (kind = C_INTPTR_T), VALUE :: file_hdl
+    END FUNCTION cxios_is_defined_file_time_stamp_format
+
+
+    SUBROUTINE cxios_set_file_time_stamp_name(file_hdl, time_stamp_name, time_stamp_name_size) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: file_hdl
+      CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: time_stamp_name
+      INTEGER  (kind = C_INT)     , VALUE        :: time_stamp_name_size
+    END SUBROUTINE cxios_set_file_time_stamp_name
+
+    SUBROUTINE cxios_get_file_time_stamp_name(file_hdl, time_stamp_name, time_stamp_name_size) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: file_hdl
+      CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: time_stamp_name
+      INTEGER  (kind = C_INT)     , VALUE        :: time_stamp_name_size
+    END SUBROUTINE cxios_get_file_time_stamp_name
+
+    FUNCTION cxios_is_defined_file_time_stamp_name(file_hdl) BIND(C)
+      USE ISO_C_BINDING
+      LOGICAL(kind=C_BOOL) :: cxios_is_defined_file_time_stamp_name
+      INTEGER (kind = C_INTPTR_T), VALUE :: file_hdl
+    END FUNCTION cxios_is_defined_file_time_stamp_name
+
+
+    SUBROUTINE cxios_set_file_time_units(file_hdl, time_units, time_units_size) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: file_hdl
+      CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: time_units
+      INTEGER  (kind = C_INT)     , VALUE        :: time_units_size
+    END SUBROUTINE cxios_set_file_time_units
+
+    SUBROUTINE cxios_get_file_time_units(file_hdl, time_units, time_units_size) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: file_hdl
+      CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: time_units
+      INTEGER  (kind = C_INT)     , VALUE        :: time_units_size
+    END SUBROUTINE cxios_get_file_time_units
+
+    FUNCTION cxios_is_defined_file_time_units(file_hdl) BIND(C)
+      USE ISO_C_BINDING
+      LOGICAL(kind=C_BOOL) :: cxios_is_defined_file_time_units
+      INTEGER (kind = C_INTPTR_T), VALUE :: file_hdl
+    END FUNCTION cxios_is_defined_file_time_units
+
+
+    SUBROUTINE cxios_set_file_timeseries(file_hdl, timeseries, timeseries_size) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: file_hdl
+      CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: timeseries
+      INTEGER  (kind = C_INT)     , VALUE        :: timeseries_size
+    END SUBROUTINE cxios_set_file_timeseries
+
+    SUBROUTINE cxios_get_file_timeseries(file_hdl, timeseries, timeseries_size) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: file_hdl
+      CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: timeseries
+      INTEGER  (kind = C_INT)     , VALUE        :: timeseries_size
+    END SUBROUTINE cxios_get_file_timeseries
+
+    FUNCTION cxios_is_defined_file_timeseries(file_hdl) BIND(C)
+      USE ISO_C_BINDING
+      LOGICAL(kind=C_BOOL) :: cxios_is_defined_file_timeseries
+      INTEGER (kind = C_INTPTR_T), VALUE :: file_hdl
+    END FUNCTION cxios_is_defined_file_timeseries
+
+
+    SUBROUTINE cxios_set_file_ts_prefix(file_hdl, ts_prefix, ts_prefix_size) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: file_hdl
+      CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: ts_prefix
+      INTEGER  (kind = C_INT)     , VALUE        :: ts_prefix_size
+    END SUBROUTINE cxios_set_file_ts_prefix
+
+    SUBROUTINE cxios_get_file_ts_prefix(file_hdl, ts_prefix, ts_prefix_size) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: file_hdl
+      CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: ts_prefix
+      INTEGER  (kind = C_INT)     , VALUE        :: ts_prefix_size
+    END SUBROUTINE cxios_get_file_ts_prefix
+
+    FUNCTION cxios_is_defined_file_ts_prefix(file_hdl) BIND(C)
+      USE ISO_C_BINDING
+      LOGICAL(kind=C_BOOL) :: cxios_is_defined_file_ts_prefix
+      INTEGER (kind = C_INTPTR_T), VALUE :: file_hdl
+    END FUNCTION cxios_is_defined_file_ts_prefix
+
+
+    SUBROUTINE cxios_set_file_type(file_hdl, type, type_size) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: file_hdl
+      CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: type
+      INTEGER  (kind = C_INT)     , VALUE        :: type_size
+    END SUBROUTINE cxios_set_file_type
+
+    SUBROUTINE cxios_get_file_type(file_hdl, type, type_size) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: file_hdl
+      CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: type
+      INTEGER  (kind = C_INT)     , VALUE        :: type_size
+    END SUBROUTINE cxios_get_file_type
+
+    FUNCTION cxios_is_defined_file_type(file_hdl) BIND(C)
+      USE ISO_C_BINDING
+      LOGICAL(kind=C_BOOL) :: cxios_is_defined_file_type
+      INTEGER (kind = C_INTPTR_T), VALUE :: file_hdl
+    END FUNCTION cxios_is_defined_file_type
+
+
+    SUBROUTINE cxios_set_file_uuid_format(file_hdl, uuid_format, uuid_format_size) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: file_hdl
+      CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: uuid_format
+      INTEGER  (kind = C_INT)     , VALUE        :: uuid_format_size
+    END SUBROUTINE cxios_set_file_uuid_format
+
+    SUBROUTINE cxios_get_file_uuid_format(file_hdl, uuid_format, uuid_format_size) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: file_hdl
+      CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: uuid_format
+      INTEGER  (kind = C_INT)     , VALUE        :: uuid_format_size
+    END SUBROUTINE cxios_get_file_uuid_format
+
+    FUNCTION cxios_is_defined_file_uuid_format(file_hdl) BIND(C)
+      USE ISO_C_BINDING
+      LOGICAL(kind=C_BOOL) :: cxios_is_defined_file_uuid_format
+      INTEGER (kind = C_INTPTR_T), VALUE :: file_hdl
+    END FUNCTION cxios_is_defined_file_uuid_format
+
+
+    SUBROUTINE cxios_set_file_uuid_name(file_hdl, uuid_name, uuid_name_size) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: file_hdl
+      CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: uuid_name
+      INTEGER  (kind = C_INT)     , VALUE        :: uuid_name_size
+    END SUBROUTINE cxios_set_file_uuid_name
+
+    SUBROUTINE cxios_get_file_uuid_name(file_hdl, uuid_name, uuid_name_size) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: file_hdl
+      CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: uuid_name
+      INTEGER  (kind = C_INT)     , VALUE        :: uuid_name_size
+    END SUBROUTINE cxios_get_file_uuid_name
+
+    FUNCTION cxios_is_defined_file_uuid_name(file_hdl) BIND(C)
+      USE ISO_C_BINDING
+      LOGICAL(kind=C_BOOL) :: cxios_is_defined_file_uuid_name
+      INTEGER (kind = C_INTPTR_T), VALUE :: file_hdl
+    END FUNCTION cxios_is_defined_file_uuid_name
+
+  END INTERFACE
+
+END MODULE file_interface_attr
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/fortran_attr/filegroup_interface_attr.F90
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/fortran_attr/filegroup_interface_attr.F90	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/fortran_attr/filegroup_interface_attr.F90	(revision 1749)
@@ -0,0 +1,732 @@
+! * ************************************************************************** *
+! *               Interface auto generated - do not modify                     *
+! * ************************************************************************** *
+#include "../fortran/xios_fortran_prefix.hpp"
+
+MODULE filegroup_interface_attr
+  USE, INTRINSIC :: ISO_C_BINDING
+
+  INTERFACE
+    ! Do not call directly / interface FORTRAN 2003 <-> C99
+
+    SUBROUTINE cxios_set_filegroup_append(filegroup_hdl, append) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: filegroup_hdl
+      LOGICAL (KIND=C_BOOL)      , VALUE :: append
+    END SUBROUTINE cxios_set_filegroup_append
+
+    SUBROUTINE cxios_get_filegroup_append(filegroup_hdl, append) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: filegroup_hdl
+      LOGICAL (KIND=C_BOOL)             :: append
+    END SUBROUTINE cxios_get_filegroup_append
+
+    FUNCTION cxios_is_defined_filegroup_append(filegroup_hdl) BIND(C)
+      USE ISO_C_BINDING
+      LOGICAL(kind=C_BOOL) :: cxios_is_defined_filegroup_append
+      INTEGER (kind = C_INTPTR_T), VALUE :: filegroup_hdl
+    END FUNCTION cxios_is_defined_filegroup_append
+
+
+    SUBROUTINE cxios_set_filegroup_comment(filegroup_hdl, comment, comment_size) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: filegroup_hdl
+      CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: comment
+      INTEGER  (kind = C_INT)     , VALUE        :: comment_size
+    END SUBROUTINE cxios_set_filegroup_comment
+
+    SUBROUTINE cxios_get_filegroup_comment(filegroup_hdl, comment, comment_size) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: filegroup_hdl
+      CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: comment
+      INTEGER  (kind = C_INT)     , VALUE        :: comment_size
+    END SUBROUTINE cxios_get_filegroup_comment
+
+    FUNCTION cxios_is_defined_filegroup_comment(filegroup_hdl) BIND(C)
+      USE ISO_C_BINDING
+      LOGICAL(kind=C_BOOL) :: cxios_is_defined_filegroup_comment
+      INTEGER (kind = C_INTPTR_T), VALUE :: filegroup_hdl
+    END FUNCTION cxios_is_defined_filegroup_comment
+
+
+    SUBROUTINE cxios_set_filegroup_compression_level(filegroup_hdl, compression_level) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: filegroup_hdl
+      INTEGER (KIND=C_INT)      , VALUE :: compression_level
+    END SUBROUTINE cxios_set_filegroup_compression_level
+
+    SUBROUTINE cxios_get_filegroup_compression_level(filegroup_hdl, compression_level) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: filegroup_hdl
+      INTEGER (KIND=C_INT)             :: compression_level
+    END SUBROUTINE cxios_get_filegroup_compression_level
+
+    FUNCTION cxios_is_defined_filegroup_compression_level(filegroup_hdl) BIND(C)
+      USE ISO_C_BINDING
+      LOGICAL(kind=C_BOOL) :: cxios_is_defined_filegroup_compression_level
+      INTEGER (kind = C_INTPTR_T), VALUE :: filegroup_hdl
+    END FUNCTION cxios_is_defined_filegroup_compression_level
+
+
+    SUBROUTINE cxios_set_filegroup_convention(filegroup_hdl, convention, convention_size) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: filegroup_hdl
+      CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: convention
+      INTEGER  (kind = C_INT)     , VALUE        :: convention_size
+    END SUBROUTINE cxios_set_filegroup_convention
+
+    SUBROUTINE cxios_get_filegroup_convention(filegroup_hdl, convention, convention_size) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: filegroup_hdl
+      CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: convention
+      INTEGER  (kind = C_INT)     , VALUE        :: convention_size
+    END SUBROUTINE cxios_get_filegroup_convention
+
+    FUNCTION cxios_is_defined_filegroup_convention(filegroup_hdl) BIND(C)
+      USE ISO_C_BINDING
+      LOGICAL(kind=C_BOOL) :: cxios_is_defined_filegroup_convention
+      INTEGER (kind = C_INTPTR_T), VALUE :: filegroup_hdl
+    END FUNCTION cxios_is_defined_filegroup_convention
+
+
+    SUBROUTINE cxios_set_filegroup_convention_str(filegroup_hdl, convention_str, convention_str_size) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: filegroup_hdl
+      CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: convention_str
+      INTEGER  (kind = C_INT)     , VALUE        :: convention_str_size
+    END SUBROUTINE cxios_set_filegroup_convention_str
+
+    SUBROUTINE cxios_get_filegroup_convention_str(filegroup_hdl, convention_str, convention_str_size) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: filegroup_hdl
+      CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: convention_str
+      INTEGER  (kind = C_INT)     , VALUE        :: convention_str_size
+    END SUBROUTINE cxios_get_filegroup_convention_str
+
+    FUNCTION cxios_is_defined_filegroup_convention_str(filegroup_hdl) BIND(C)
+      USE ISO_C_BINDING
+      LOGICAL(kind=C_BOOL) :: cxios_is_defined_filegroup_convention_str
+      INTEGER (kind = C_INTPTR_T), VALUE :: filegroup_hdl
+    END FUNCTION cxios_is_defined_filegroup_convention_str
+
+
+    SUBROUTINE cxios_set_filegroup_cyclic(filegroup_hdl, cyclic) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: filegroup_hdl
+      LOGICAL (KIND=C_BOOL)      , VALUE :: cyclic
+    END SUBROUTINE cxios_set_filegroup_cyclic
+
+    SUBROUTINE cxios_get_filegroup_cyclic(filegroup_hdl, cyclic) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: filegroup_hdl
+      LOGICAL (KIND=C_BOOL)             :: cyclic
+    END SUBROUTINE cxios_get_filegroup_cyclic
+
+    FUNCTION cxios_is_defined_filegroup_cyclic(filegroup_hdl) BIND(C)
+      USE ISO_C_BINDING
+      LOGICAL(kind=C_BOOL) :: cxios_is_defined_filegroup_cyclic
+      INTEGER (kind = C_INTPTR_T), VALUE :: filegroup_hdl
+    END FUNCTION cxios_is_defined_filegroup_cyclic
+
+
+    SUBROUTINE cxios_set_filegroup_description(filegroup_hdl, description, description_size) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: filegroup_hdl
+      CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: description
+      INTEGER  (kind = C_INT)     , VALUE        :: description_size
+    END SUBROUTINE cxios_set_filegroup_description
+
+    SUBROUTINE cxios_get_filegroup_description(filegroup_hdl, description, description_size) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: filegroup_hdl
+      CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: description
+      INTEGER  (kind = C_INT)     , VALUE        :: description_size
+    END SUBROUTINE cxios_get_filegroup_description
+
+    FUNCTION cxios_is_defined_filegroup_description(filegroup_hdl) BIND(C)
+      USE ISO_C_BINDING
+      LOGICAL(kind=C_BOOL) :: cxios_is_defined_filegroup_description
+      INTEGER (kind = C_INTPTR_T), VALUE :: filegroup_hdl
+    END FUNCTION cxios_is_defined_filegroup_description
+
+
+    SUBROUTINE cxios_set_filegroup_enabled(filegroup_hdl, enabled) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: filegroup_hdl
+      LOGICAL (KIND=C_BOOL)      , VALUE :: enabled
+    END SUBROUTINE cxios_set_filegroup_enabled
+
+    SUBROUTINE cxios_get_filegroup_enabled(filegroup_hdl, enabled) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: filegroup_hdl
+      LOGICAL (KIND=C_BOOL)             :: enabled
+    END SUBROUTINE cxios_get_filegroup_enabled
+
+    FUNCTION cxios_is_defined_filegroup_enabled(filegroup_hdl) BIND(C)
+      USE ISO_C_BINDING
+      LOGICAL(kind=C_BOOL) :: cxios_is_defined_filegroup_enabled
+      INTEGER (kind = C_INTPTR_T), VALUE :: filegroup_hdl
+    END FUNCTION cxios_is_defined_filegroup_enabled
+
+
+    SUBROUTINE cxios_set_filegroup_format(filegroup_hdl, format, format_size) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: filegroup_hdl
+      CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: format
+      INTEGER  (kind = C_INT)     , VALUE        :: format_size
+    END SUBROUTINE cxios_set_filegroup_format
+
+    SUBROUTINE cxios_get_filegroup_format(filegroup_hdl, format, format_size) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: filegroup_hdl
+      CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: format
+      INTEGER  (kind = C_INT)     , VALUE        :: format_size
+    END SUBROUTINE cxios_get_filegroup_format
+
+    FUNCTION cxios_is_defined_filegroup_format(filegroup_hdl) BIND(C)
+      USE ISO_C_BINDING
+      LOGICAL(kind=C_BOOL) :: cxios_is_defined_filegroup_format
+      INTEGER (kind = C_INTPTR_T), VALUE :: filegroup_hdl
+    END FUNCTION cxios_is_defined_filegroup_format
+
+
+    SUBROUTINE cxios_set_filegroup_group_ref(filegroup_hdl, group_ref, group_ref_size) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: filegroup_hdl
+      CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: group_ref
+      INTEGER  (kind = C_INT)     , VALUE        :: group_ref_size
+    END SUBROUTINE cxios_set_filegroup_group_ref
+
+    SUBROUTINE cxios_get_filegroup_group_ref(filegroup_hdl, group_ref, group_ref_size) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: filegroup_hdl
+      CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: group_ref
+      INTEGER  (kind = C_INT)     , VALUE        :: group_ref_size
+    END SUBROUTINE cxios_get_filegroup_group_ref
+
+    FUNCTION cxios_is_defined_filegroup_group_ref(filegroup_hdl) BIND(C)
+      USE ISO_C_BINDING
+      LOGICAL(kind=C_BOOL) :: cxios_is_defined_filegroup_group_ref
+      INTEGER (kind = C_INTPTR_T), VALUE :: filegroup_hdl
+    END FUNCTION cxios_is_defined_filegroup_group_ref
+
+
+    SUBROUTINE cxios_set_filegroup_min_digits(filegroup_hdl, min_digits) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: filegroup_hdl
+      INTEGER (KIND=C_INT)      , VALUE :: min_digits
+    END SUBROUTINE cxios_set_filegroup_min_digits
+
+    SUBROUTINE cxios_get_filegroup_min_digits(filegroup_hdl, min_digits) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: filegroup_hdl
+      INTEGER (KIND=C_INT)             :: min_digits
+    END SUBROUTINE cxios_get_filegroup_min_digits
+
+    FUNCTION cxios_is_defined_filegroup_min_digits(filegroup_hdl) BIND(C)
+      USE ISO_C_BINDING
+      LOGICAL(kind=C_BOOL) :: cxios_is_defined_filegroup_min_digits
+      INTEGER (kind = C_INTPTR_T), VALUE :: filegroup_hdl
+    END FUNCTION cxios_is_defined_filegroup_min_digits
+
+
+    SUBROUTINE cxios_set_filegroup_mode(filegroup_hdl, mode, mode_size) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: filegroup_hdl
+      CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: mode
+      INTEGER  (kind = C_INT)     , VALUE        :: mode_size
+    END SUBROUTINE cxios_set_filegroup_mode
+
+    SUBROUTINE cxios_get_filegroup_mode(filegroup_hdl, mode, mode_size) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: filegroup_hdl
+      CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: mode
+      INTEGER  (kind = C_INT)     , VALUE        :: mode_size
+    END SUBROUTINE cxios_get_filegroup_mode
+
+    FUNCTION cxios_is_defined_filegroup_mode(filegroup_hdl) BIND(C)
+      USE ISO_C_BINDING
+      LOGICAL(kind=C_BOOL) :: cxios_is_defined_filegroup_mode
+      INTEGER (kind = C_INTPTR_T), VALUE :: filegroup_hdl
+    END FUNCTION cxios_is_defined_filegroup_mode
+
+
+    SUBROUTINE cxios_set_filegroup_name(filegroup_hdl, name, name_size) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: filegroup_hdl
+      CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: name
+      INTEGER  (kind = C_INT)     , VALUE        :: name_size
+    END SUBROUTINE cxios_set_filegroup_name
+
+    SUBROUTINE cxios_get_filegroup_name(filegroup_hdl, name, name_size) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: filegroup_hdl
+      CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: name
+      INTEGER  (kind = C_INT)     , VALUE        :: name_size
+    END SUBROUTINE cxios_get_filegroup_name
+
+    FUNCTION cxios_is_defined_filegroup_name(filegroup_hdl) BIND(C)
+      USE ISO_C_BINDING
+      LOGICAL(kind=C_BOOL) :: cxios_is_defined_filegroup_name
+      INTEGER (kind = C_INTPTR_T), VALUE :: filegroup_hdl
+    END FUNCTION cxios_is_defined_filegroup_name
+
+
+    SUBROUTINE cxios_set_filegroup_name_suffix(filegroup_hdl, name_suffix, name_suffix_size) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: filegroup_hdl
+      CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: name_suffix
+      INTEGER  (kind = C_INT)     , VALUE        :: name_suffix_size
+    END SUBROUTINE cxios_set_filegroup_name_suffix
+
+    SUBROUTINE cxios_get_filegroup_name_suffix(filegroup_hdl, name_suffix, name_suffix_size) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: filegroup_hdl
+      CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: name_suffix
+      INTEGER  (kind = C_INT)     , VALUE        :: name_suffix_size
+    END SUBROUTINE cxios_get_filegroup_name_suffix
+
+    FUNCTION cxios_is_defined_filegroup_name_suffix(filegroup_hdl) BIND(C)
+      USE ISO_C_BINDING
+      LOGICAL(kind=C_BOOL) :: cxios_is_defined_filegroup_name_suffix
+      INTEGER (kind = C_INTPTR_T), VALUE :: filegroup_hdl
+    END FUNCTION cxios_is_defined_filegroup_name_suffix
+
+
+    SUBROUTINE cxios_set_filegroup_output_freq(filegroup_hdl, output_freq) BIND(C)
+      USE ISO_C_BINDING
+      USE IDURATION
+      INTEGER (kind = C_INTPTR_T), VALUE :: filegroup_hdl
+      TYPE(txios(duration)), VALUE :: output_freq
+    END SUBROUTINE cxios_set_filegroup_output_freq
+
+    SUBROUTINE cxios_get_filegroup_output_freq(filegroup_hdl, output_freq) BIND(C)
+      USE ISO_C_BINDING
+      USE IDURATION
+      INTEGER (kind = C_INTPTR_T), VALUE :: filegroup_hdl
+      TYPE(txios(duration)) :: output_freq
+    END SUBROUTINE cxios_get_filegroup_output_freq
+
+    FUNCTION cxios_is_defined_filegroup_output_freq(filegroup_hdl) BIND(C)
+      USE ISO_C_BINDING
+      LOGICAL(kind=C_BOOL) :: cxios_is_defined_filegroup_output_freq
+      INTEGER (kind = C_INTPTR_T), VALUE :: filegroup_hdl
+    END FUNCTION cxios_is_defined_filegroup_output_freq
+
+
+    SUBROUTINE cxios_set_filegroup_output_level(filegroup_hdl, output_level) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: filegroup_hdl
+      INTEGER (KIND=C_INT)      , VALUE :: output_level
+    END SUBROUTINE cxios_set_filegroup_output_level
+
+    SUBROUTINE cxios_get_filegroup_output_level(filegroup_hdl, output_level) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: filegroup_hdl
+      INTEGER (KIND=C_INT)             :: output_level
+    END SUBROUTINE cxios_get_filegroup_output_level
+
+    FUNCTION cxios_is_defined_filegroup_output_level(filegroup_hdl) BIND(C)
+      USE ISO_C_BINDING
+      LOGICAL(kind=C_BOOL) :: cxios_is_defined_filegroup_output_level
+      INTEGER (kind = C_INTPTR_T), VALUE :: filegroup_hdl
+    END FUNCTION cxios_is_defined_filegroup_output_level
+
+
+    SUBROUTINE cxios_set_filegroup_par_access(filegroup_hdl, par_access, par_access_size) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: filegroup_hdl
+      CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: par_access
+      INTEGER  (kind = C_INT)     , VALUE        :: par_access_size
+    END SUBROUTINE cxios_set_filegroup_par_access
+
+    SUBROUTINE cxios_get_filegroup_par_access(filegroup_hdl, par_access, par_access_size) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: filegroup_hdl
+      CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: par_access
+      INTEGER  (kind = C_INT)     , VALUE        :: par_access_size
+    END SUBROUTINE cxios_get_filegroup_par_access
+
+    FUNCTION cxios_is_defined_filegroup_par_access(filegroup_hdl) BIND(C)
+      USE ISO_C_BINDING
+      LOGICAL(kind=C_BOOL) :: cxios_is_defined_filegroup_par_access
+      INTEGER (kind = C_INTPTR_T), VALUE :: filegroup_hdl
+    END FUNCTION cxios_is_defined_filegroup_par_access
+
+
+    SUBROUTINE cxios_set_filegroup_read_metadata_par(filegroup_hdl, read_metadata_par) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: filegroup_hdl
+      LOGICAL (KIND=C_BOOL)      , VALUE :: read_metadata_par
+    END SUBROUTINE cxios_set_filegroup_read_metadata_par
+
+    SUBROUTINE cxios_get_filegroup_read_metadata_par(filegroup_hdl, read_metadata_par) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: filegroup_hdl
+      LOGICAL (KIND=C_BOOL)             :: read_metadata_par
+    END SUBROUTINE cxios_get_filegroup_read_metadata_par
+
+    FUNCTION cxios_is_defined_filegroup_read_metadata_par(filegroup_hdl) BIND(C)
+      USE ISO_C_BINDING
+      LOGICAL(kind=C_BOOL) :: cxios_is_defined_filegroup_read_metadata_par
+      INTEGER (kind = C_INTPTR_T), VALUE :: filegroup_hdl
+    END FUNCTION cxios_is_defined_filegroup_read_metadata_par
+
+
+    SUBROUTINE cxios_set_filegroup_record_offset(filegroup_hdl, record_offset) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: filegroup_hdl
+      INTEGER (KIND=C_INT)      , VALUE :: record_offset
+    END SUBROUTINE cxios_set_filegroup_record_offset
+
+    SUBROUTINE cxios_get_filegroup_record_offset(filegroup_hdl, record_offset) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: filegroup_hdl
+      INTEGER (KIND=C_INT)             :: record_offset
+    END SUBROUTINE cxios_get_filegroup_record_offset
+
+    FUNCTION cxios_is_defined_filegroup_record_offset(filegroup_hdl) BIND(C)
+      USE ISO_C_BINDING
+      LOGICAL(kind=C_BOOL) :: cxios_is_defined_filegroup_record_offset
+      INTEGER (kind = C_INTPTR_T), VALUE :: filegroup_hdl
+    END FUNCTION cxios_is_defined_filegroup_record_offset
+
+
+    SUBROUTINE cxios_set_filegroup_split_end_offset(filegroup_hdl, split_end_offset) BIND(C)
+      USE ISO_C_BINDING
+      USE IDURATION
+      INTEGER (kind = C_INTPTR_T), VALUE :: filegroup_hdl
+      TYPE(txios(duration)), VALUE :: split_end_offset
+    END SUBROUTINE cxios_set_filegroup_split_end_offset
+
+    SUBROUTINE cxios_get_filegroup_split_end_offset(filegroup_hdl, split_end_offset) BIND(C)
+      USE ISO_C_BINDING
+      USE IDURATION
+      INTEGER (kind = C_INTPTR_T), VALUE :: filegroup_hdl
+      TYPE(txios(duration)) :: split_end_offset
+    END SUBROUTINE cxios_get_filegroup_split_end_offset
+
+    FUNCTION cxios_is_defined_filegroup_split_end_offset(filegroup_hdl) BIND(C)
+      USE ISO_C_BINDING
+      LOGICAL(kind=C_BOOL) :: cxios_is_defined_filegroup_split_end_offset
+      INTEGER (kind = C_INTPTR_T), VALUE :: filegroup_hdl
+    END FUNCTION cxios_is_defined_filegroup_split_end_offset
+
+
+    SUBROUTINE cxios_set_filegroup_split_freq(filegroup_hdl, split_freq) BIND(C)
+      USE ISO_C_BINDING
+      USE IDURATION
+      INTEGER (kind = C_INTPTR_T), VALUE :: filegroup_hdl
+      TYPE(txios(duration)), VALUE :: split_freq
+    END SUBROUTINE cxios_set_filegroup_split_freq
+
+    SUBROUTINE cxios_get_filegroup_split_freq(filegroup_hdl, split_freq) BIND(C)
+      USE ISO_C_BINDING
+      USE IDURATION
+      INTEGER (kind = C_INTPTR_T), VALUE :: filegroup_hdl
+      TYPE(txios(duration)) :: split_freq
+    END SUBROUTINE cxios_get_filegroup_split_freq
+
+    FUNCTION cxios_is_defined_filegroup_split_freq(filegroup_hdl) BIND(C)
+      USE ISO_C_BINDING
+      LOGICAL(kind=C_BOOL) :: cxios_is_defined_filegroup_split_freq
+      INTEGER (kind = C_INTPTR_T), VALUE :: filegroup_hdl
+    END FUNCTION cxios_is_defined_filegroup_split_freq
+
+
+    SUBROUTINE cxios_set_filegroup_split_freq_format(filegroup_hdl, split_freq_format, split_freq_format_size) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: filegroup_hdl
+      CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: split_freq_format
+      INTEGER  (kind = C_INT)     , VALUE        :: split_freq_format_size
+    END SUBROUTINE cxios_set_filegroup_split_freq_format
+
+    SUBROUTINE cxios_get_filegroup_split_freq_format(filegroup_hdl, split_freq_format, split_freq_format_size) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: filegroup_hdl
+      CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: split_freq_format
+      INTEGER  (kind = C_INT)     , VALUE        :: split_freq_format_size
+    END SUBROUTINE cxios_get_filegroup_split_freq_format
+
+    FUNCTION cxios_is_defined_filegroup_split_freq_format(filegroup_hdl) BIND(C)
+      USE ISO_C_BINDING
+      LOGICAL(kind=C_BOOL) :: cxios_is_defined_filegroup_split_freq_format
+      INTEGER (kind = C_INTPTR_T), VALUE :: filegroup_hdl
+    END FUNCTION cxios_is_defined_filegroup_split_freq_format
+
+
+    SUBROUTINE cxios_set_filegroup_split_last_date(filegroup_hdl, split_last_date, split_last_date_size) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: filegroup_hdl
+      CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: split_last_date
+      INTEGER  (kind = C_INT)     , VALUE        :: split_last_date_size
+    END SUBROUTINE cxios_set_filegroup_split_last_date
+
+    SUBROUTINE cxios_get_filegroup_split_last_date(filegroup_hdl, split_last_date, split_last_date_size) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: filegroup_hdl
+      CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: split_last_date
+      INTEGER  (kind = C_INT)     , VALUE        :: split_last_date_size
+    END SUBROUTINE cxios_get_filegroup_split_last_date
+
+    FUNCTION cxios_is_defined_filegroup_split_last_date(filegroup_hdl) BIND(C)
+      USE ISO_C_BINDING
+      LOGICAL(kind=C_BOOL) :: cxios_is_defined_filegroup_split_last_date
+      INTEGER (kind = C_INTPTR_T), VALUE :: filegroup_hdl
+    END FUNCTION cxios_is_defined_filegroup_split_last_date
+
+
+    SUBROUTINE cxios_set_filegroup_split_start_offset(filegroup_hdl, split_start_offset) BIND(C)
+      USE ISO_C_BINDING
+      USE IDURATION
+      INTEGER (kind = C_INTPTR_T), VALUE :: filegroup_hdl
+      TYPE(txios(duration)), VALUE :: split_start_offset
+    END SUBROUTINE cxios_set_filegroup_split_start_offset
+
+    SUBROUTINE cxios_get_filegroup_split_start_offset(filegroup_hdl, split_start_offset) BIND(C)
+      USE ISO_C_BINDING
+      USE IDURATION
+      INTEGER (kind = C_INTPTR_T), VALUE :: filegroup_hdl
+      TYPE(txios(duration)) :: split_start_offset
+    END SUBROUTINE cxios_get_filegroup_split_start_offset
+
+    FUNCTION cxios_is_defined_filegroup_split_start_offset(filegroup_hdl) BIND(C)
+      USE ISO_C_BINDING
+      LOGICAL(kind=C_BOOL) :: cxios_is_defined_filegroup_split_start_offset
+      INTEGER (kind = C_INTPTR_T), VALUE :: filegroup_hdl
+    END FUNCTION cxios_is_defined_filegroup_split_start_offset
+
+
+    SUBROUTINE cxios_set_filegroup_sync_freq(filegroup_hdl, sync_freq) BIND(C)
+      USE ISO_C_BINDING
+      USE IDURATION
+      INTEGER (kind = C_INTPTR_T), VALUE :: filegroup_hdl
+      TYPE(txios(duration)), VALUE :: sync_freq
+    END SUBROUTINE cxios_set_filegroup_sync_freq
+
+    SUBROUTINE cxios_get_filegroup_sync_freq(filegroup_hdl, sync_freq) BIND(C)
+      USE ISO_C_BINDING
+      USE IDURATION
+      INTEGER (kind = C_INTPTR_T), VALUE :: filegroup_hdl
+      TYPE(txios(duration)) :: sync_freq
+    END SUBROUTINE cxios_get_filegroup_sync_freq
+
+    FUNCTION cxios_is_defined_filegroup_sync_freq(filegroup_hdl) BIND(C)
+      USE ISO_C_BINDING
+      LOGICAL(kind=C_BOOL) :: cxios_is_defined_filegroup_sync_freq
+      INTEGER (kind = C_INTPTR_T), VALUE :: filegroup_hdl
+    END FUNCTION cxios_is_defined_filegroup_sync_freq
+
+
+    SUBROUTINE cxios_set_filegroup_time_counter(filegroup_hdl, time_counter, time_counter_size) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: filegroup_hdl
+      CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: time_counter
+      INTEGER  (kind = C_INT)     , VALUE        :: time_counter_size
+    END SUBROUTINE cxios_set_filegroup_time_counter
+
+    SUBROUTINE cxios_get_filegroup_time_counter(filegroup_hdl, time_counter, time_counter_size) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: filegroup_hdl
+      CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: time_counter
+      INTEGER  (kind = C_INT)     , VALUE        :: time_counter_size
+    END SUBROUTINE cxios_get_filegroup_time_counter
+
+    FUNCTION cxios_is_defined_filegroup_time_counter(filegroup_hdl) BIND(C)
+      USE ISO_C_BINDING
+      LOGICAL(kind=C_BOOL) :: cxios_is_defined_filegroup_time_counter
+      INTEGER (kind = C_INTPTR_T), VALUE :: filegroup_hdl
+    END FUNCTION cxios_is_defined_filegroup_time_counter
+
+
+    SUBROUTINE cxios_set_filegroup_time_counter_name(filegroup_hdl, time_counter_name, time_counter_name_size) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: filegroup_hdl
+      CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: time_counter_name
+      INTEGER  (kind = C_INT)     , VALUE        :: time_counter_name_size
+    END SUBROUTINE cxios_set_filegroup_time_counter_name
+
+    SUBROUTINE cxios_get_filegroup_time_counter_name(filegroup_hdl, time_counter_name, time_counter_name_size) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: filegroup_hdl
+      CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: time_counter_name
+      INTEGER  (kind = C_INT)     , VALUE        :: time_counter_name_size
+    END SUBROUTINE cxios_get_filegroup_time_counter_name
+
+    FUNCTION cxios_is_defined_filegroup_time_counter_name(filegroup_hdl) BIND(C)
+      USE ISO_C_BINDING
+      LOGICAL(kind=C_BOOL) :: cxios_is_defined_filegroup_time_counter_name
+      INTEGER (kind = C_INTPTR_T), VALUE :: filegroup_hdl
+    END FUNCTION cxios_is_defined_filegroup_time_counter_name
+
+
+    SUBROUTINE cxios_set_filegroup_time_stamp_format(filegroup_hdl, time_stamp_format, time_stamp_format_size) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: filegroup_hdl
+      CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: time_stamp_format
+      INTEGER  (kind = C_INT)     , VALUE        :: time_stamp_format_size
+    END SUBROUTINE cxios_set_filegroup_time_stamp_format
+
+    SUBROUTINE cxios_get_filegroup_time_stamp_format(filegroup_hdl, time_stamp_format, time_stamp_format_size) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: filegroup_hdl
+      CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: time_stamp_format
+      INTEGER  (kind = C_INT)     , VALUE        :: time_stamp_format_size
+    END SUBROUTINE cxios_get_filegroup_time_stamp_format
+
+    FUNCTION cxios_is_defined_filegroup_time_stamp_format(filegroup_hdl) BIND(C)
+      USE ISO_C_BINDING
+      LOGICAL(kind=C_BOOL) :: cxios_is_defined_filegroup_time_stamp_format
+      INTEGER (kind = C_INTPTR_T), VALUE :: filegroup_hdl
+    END FUNCTION cxios_is_defined_filegroup_time_stamp_format
+
+
+    SUBROUTINE cxios_set_filegroup_time_stamp_name(filegroup_hdl, time_stamp_name, time_stamp_name_size) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: filegroup_hdl
+      CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: time_stamp_name
+      INTEGER  (kind = C_INT)     , VALUE        :: time_stamp_name_size
+    END SUBROUTINE cxios_set_filegroup_time_stamp_name
+
+    SUBROUTINE cxios_get_filegroup_time_stamp_name(filegroup_hdl, time_stamp_name, time_stamp_name_size) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: filegroup_hdl
+      CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: time_stamp_name
+      INTEGER  (kind = C_INT)     , VALUE        :: time_stamp_name_size
+    END SUBROUTINE cxios_get_filegroup_time_stamp_name
+
+    FUNCTION cxios_is_defined_filegroup_time_stamp_name(filegroup_hdl) BIND(C)
+      USE ISO_C_BINDING
+      LOGICAL(kind=C_BOOL) :: cxios_is_defined_filegroup_time_stamp_name
+      INTEGER (kind = C_INTPTR_T), VALUE :: filegroup_hdl
+    END FUNCTION cxios_is_defined_filegroup_time_stamp_name
+
+
+    SUBROUTINE cxios_set_filegroup_time_units(filegroup_hdl, time_units, time_units_size) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: filegroup_hdl
+      CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: time_units
+      INTEGER  (kind = C_INT)     , VALUE        :: time_units_size
+    END SUBROUTINE cxios_set_filegroup_time_units
+
+    SUBROUTINE cxios_get_filegroup_time_units(filegroup_hdl, time_units, time_units_size) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: filegroup_hdl
+      CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: time_units
+      INTEGER  (kind = C_INT)     , VALUE        :: time_units_size
+    END SUBROUTINE cxios_get_filegroup_time_units
+
+    FUNCTION cxios_is_defined_filegroup_time_units(filegroup_hdl) BIND(C)
+      USE ISO_C_BINDING
+      LOGICAL(kind=C_BOOL) :: cxios_is_defined_filegroup_time_units
+      INTEGER (kind = C_INTPTR_T), VALUE :: filegroup_hdl
+    END FUNCTION cxios_is_defined_filegroup_time_units
+
+
+    SUBROUTINE cxios_set_filegroup_timeseries(filegroup_hdl, timeseries, timeseries_size) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: filegroup_hdl
+      CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: timeseries
+      INTEGER  (kind = C_INT)     , VALUE        :: timeseries_size
+    END SUBROUTINE cxios_set_filegroup_timeseries
+
+    SUBROUTINE cxios_get_filegroup_timeseries(filegroup_hdl, timeseries, timeseries_size) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: filegroup_hdl
+      CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: timeseries
+      INTEGER  (kind = C_INT)     , VALUE        :: timeseries_size
+    END SUBROUTINE cxios_get_filegroup_timeseries
+
+    FUNCTION cxios_is_defined_filegroup_timeseries(filegroup_hdl) BIND(C)
+      USE ISO_C_BINDING
+      LOGICAL(kind=C_BOOL) :: cxios_is_defined_filegroup_timeseries
+      INTEGER (kind = C_INTPTR_T), VALUE :: filegroup_hdl
+    END FUNCTION cxios_is_defined_filegroup_timeseries
+
+
+    SUBROUTINE cxios_set_filegroup_ts_prefix(filegroup_hdl, ts_prefix, ts_prefix_size) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: filegroup_hdl
+      CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: ts_prefix
+      INTEGER  (kind = C_INT)     , VALUE        :: ts_prefix_size
+    END SUBROUTINE cxios_set_filegroup_ts_prefix
+
+    SUBROUTINE cxios_get_filegroup_ts_prefix(filegroup_hdl, ts_prefix, ts_prefix_size) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: filegroup_hdl
+      CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: ts_prefix
+      INTEGER  (kind = C_INT)     , VALUE        :: ts_prefix_size
+    END SUBROUTINE cxios_get_filegroup_ts_prefix
+
+    FUNCTION cxios_is_defined_filegroup_ts_prefix(filegroup_hdl) BIND(C)
+      USE ISO_C_BINDING
+      LOGICAL(kind=C_BOOL) :: cxios_is_defined_filegroup_ts_prefix
+      INTEGER (kind = C_INTPTR_T), VALUE :: filegroup_hdl
+    END FUNCTION cxios_is_defined_filegroup_ts_prefix
+
+
+    SUBROUTINE cxios_set_filegroup_type(filegroup_hdl, type, type_size) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: filegroup_hdl
+      CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: type
+      INTEGER  (kind = C_INT)     , VALUE        :: type_size
+    END SUBROUTINE cxios_set_filegroup_type
+
+    SUBROUTINE cxios_get_filegroup_type(filegroup_hdl, type, type_size) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: filegroup_hdl
+      CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: type
+      INTEGER  (kind = C_INT)     , VALUE        :: type_size
+    END SUBROUTINE cxios_get_filegroup_type
+
+    FUNCTION cxios_is_defined_filegroup_type(filegroup_hdl) BIND(C)
+      USE ISO_C_BINDING
+      LOGICAL(kind=C_BOOL) :: cxios_is_defined_filegroup_type
+      INTEGER (kind = C_INTPTR_T), VALUE :: filegroup_hdl
+    END FUNCTION cxios_is_defined_filegroup_type
+
+
+    SUBROUTINE cxios_set_filegroup_uuid_format(filegroup_hdl, uuid_format, uuid_format_size) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: filegroup_hdl
+      CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: uuid_format
+      INTEGER  (kind = C_INT)     , VALUE        :: uuid_format_size
+    END SUBROUTINE cxios_set_filegroup_uuid_format
+
+    SUBROUTINE cxios_get_filegroup_uuid_format(filegroup_hdl, uuid_format, uuid_format_size) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: filegroup_hdl
+      CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: uuid_format
+      INTEGER  (kind = C_INT)     , VALUE        :: uuid_format_size
+    END SUBROUTINE cxios_get_filegroup_uuid_format
+
+    FUNCTION cxios_is_defined_filegroup_uuid_format(filegroup_hdl) BIND(C)
+      USE ISO_C_BINDING
+      LOGICAL(kind=C_BOOL) :: cxios_is_defined_filegroup_uuid_format
+      INTEGER (kind = C_INTPTR_T), VALUE :: filegroup_hdl
+    END FUNCTION cxios_is_defined_filegroup_uuid_format
+
+
+    SUBROUTINE cxios_set_filegroup_uuid_name(filegroup_hdl, uuid_name, uuid_name_size) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: filegroup_hdl
+      CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: uuid_name
+      INTEGER  (kind = C_INT)     , VALUE        :: uuid_name_size
+    END SUBROUTINE cxios_set_filegroup_uuid_name
+
+    SUBROUTINE cxios_get_filegroup_uuid_name(filegroup_hdl, uuid_name, uuid_name_size) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: filegroup_hdl
+      CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: uuid_name
+      INTEGER  (kind = C_INT)     , VALUE        :: uuid_name_size
+    END SUBROUTINE cxios_get_filegroup_uuid_name
+
+    FUNCTION cxios_is_defined_filegroup_uuid_name(filegroup_hdl) BIND(C)
+      USE ISO_C_BINDING
+      LOGICAL(kind=C_BOOL) :: cxios_is_defined_filegroup_uuid_name
+      INTEGER (kind = C_INTPTR_T), VALUE :: filegroup_hdl
+    END FUNCTION cxios_is_defined_filegroup_uuid_name
+
+  END INTERFACE
+
+END MODULE filegroup_interface_attr
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/fortran_attr/generate_rectilinear_domain_interface_attr.F90
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/fortran_attr/generate_rectilinear_domain_interface_attr.F90	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/fortran_attr/generate_rectilinear_domain_interface_attr.F90	(revision 1749)
@@ -0,0 +1,165 @@
+! * ************************************************************************** *
+! *               Interface auto generated - do not modify                     *
+! * ************************************************************************** *
+#include "../fortran/xios_fortran_prefix.hpp"
+
+MODULE generate_rectilinear_domain_interface_attr
+  USE, INTRINSIC :: ISO_C_BINDING
+
+  INTERFACE
+    ! Do not call directly / interface FORTRAN 2003 <-> C99
+
+    SUBROUTINE cxios_set_generate_rectilinear_domain_bounds_lat_end(generate_rectilinear_domain_hdl, bounds_lat_end) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: generate_rectilinear_domain_hdl
+      REAL (KIND=C_DOUBLE)      , VALUE :: bounds_lat_end
+    END SUBROUTINE cxios_set_generate_rectilinear_domain_bounds_lat_end
+
+    SUBROUTINE cxios_get_generate_rectilinear_domain_bounds_lat_end(generate_rectilinear_domain_hdl, bounds_lat_end) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: generate_rectilinear_domain_hdl
+      REAL (KIND=C_DOUBLE)             :: bounds_lat_end
+    END SUBROUTINE cxios_get_generate_rectilinear_domain_bounds_lat_end
+
+    FUNCTION cxios_is_defined_generate_rectilinear_domain_bounds_lat_end(generate_rectilinear_domain_hdl) BIND(C)
+      USE ISO_C_BINDING
+      LOGICAL(kind=C_BOOL) :: cxios_is_defined_generate_rectilinear_domain_bounds_lat_end
+      INTEGER (kind = C_INTPTR_T), VALUE :: generate_rectilinear_domain_hdl
+    END FUNCTION cxios_is_defined_generate_rectilinear_domain_bounds_lat_end
+
+
+    SUBROUTINE cxios_set_generate_rectilinear_domain_bounds_lat_start(generate_rectilinear_domain_hdl, bounds_lat_start) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: generate_rectilinear_domain_hdl
+      REAL (KIND=C_DOUBLE)      , VALUE :: bounds_lat_start
+    END SUBROUTINE cxios_set_generate_rectilinear_domain_bounds_lat_start
+
+    SUBROUTINE cxios_get_generate_rectilinear_domain_bounds_lat_start(generate_rectilinear_domain_hdl, bounds_lat_start) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: generate_rectilinear_domain_hdl
+      REAL (KIND=C_DOUBLE)             :: bounds_lat_start
+    END SUBROUTINE cxios_get_generate_rectilinear_domain_bounds_lat_start
+
+    FUNCTION cxios_is_defined_generate_rectilinear_domain_bounds_lat_start(generate_rectilinear_domain_hdl) BIND(C)
+      USE ISO_C_BINDING
+      LOGICAL(kind=C_BOOL) :: cxios_is_defined_generate_rectilinear_domain_bounds_lat_start
+      INTEGER (kind = C_INTPTR_T), VALUE :: generate_rectilinear_domain_hdl
+    END FUNCTION cxios_is_defined_generate_rectilinear_domain_bounds_lat_start
+
+
+    SUBROUTINE cxios_set_generate_rectilinear_domain_bounds_lon_end(generate_rectilinear_domain_hdl, bounds_lon_end) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: generate_rectilinear_domain_hdl
+      REAL (KIND=C_DOUBLE)      , VALUE :: bounds_lon_end
+    END SUBROUTINE cxios_set_generate_rectilinear_domain_bounds_lon_end
+
+    SUBROUTINE cxios_get_generate_rectilinear_domain_bounds_lon_end(generate_rectilinear_domain_hdl, bounds_lon_end) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: generate_rectilinear_domain_hdl
+      REAL (KIND=C_DOUBLE)             :: bounds_lon_end
+    END SUBROUTINE cxios_get_generate_rectilinear_domain_bounds_lon_end
+
+    FUNCTION cxios_is_defined_generate_rectilinear_domain_bounds_lon_end(generate_rectilinear_domain_hdl) BIND(C)
+      USE ISO_C_BINDING
+      LOGICAL(kind=C_BOOL) :: cxios_is_defined_generate_rectilinear_domain_bounds_lon_end
+      INTEGER (kind = C_INTPTR_T), VALUE :: generate_rectilinear_domain_hdl
+    END FUNCTION cxios_is_defined_generate_rectilinear_domain_bounds_lon_end
+
+
+    SUBROUTINE cxios_set_generate_rectilinear_domain_bounds_lon_start(generate_rectilinear_domain_hdl, bounds_lon_start) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: generate_rectilinear_domain_hdl
+      REAL (KIND=C_DOUBLE)      , VALUE :: bounds_lon_start
+    END SUBROUTINE cxios_set_generate_rectilinear_domain_bounds_lon_start
+
+    SUBROUTINE cxios_get_generate_rectilinear_domain_bounds_lon_start(generate_rectilinear_domain_hdl, bounds_lon_start) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: generate_rectilinear_domain_hdl
+      REAL (KIND=C_DOUBLE)             :: bounds_lon_start
+    END SUBROUTINE cxios_get_generate_rectilinear_domain_bounds_lon_start
+
+    FUNCTION cxios_is_defined_generate_rectilinear_domain_bounds_lon_start(generate_rectilinear_domain_hdl) BIND(C)
+      USE ISO_C_BINDING
+      LOGICAL(kind=C_BOOL) :: cxios_is_defined_generate_rectilinear_domain_bounds_lon_start
+      INTEGER (kind = C_INTPTR_T), VALUE :: generate_rectilinear_domain_hdl
+    END FUNCTION cxios_is_defined_generate_rectilinear_domain_bounds_lon_start
+
+
+    SUBROUTINE cxios_set_generate_rectilinear_domain_lat_end(generate_rectilinear_domain_hdl, lat_end) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: generate_rectilinear_domain_hdl
+      REAL (KIND=C_DOUBLE)      , VALUE :: lat_end
+    END SUBROUTINE cxios_set_generate_rectilinear_domain_lat_end
+
+    SUBROUTINE cxios_get_generate_rectilinear_domain_lat_end(generate_rectilinear_domain_hdl, lat_end) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: generate_rectilinear_domain_hdl
+      REAL (KIND=C_DOUBLE)             :: lat_end
+    END SUBROUTINE cxios_get_generate_rectilinear_domain_lat_end
+
+    FUNCTION cxios_is_defined_generate_rectilinear_domain_lat_end(generate_rectilinear_domain_hdl) BIND(C)
+      USE ISO_C_BINDING
+      LOGICAL(kind=C_BOOL) :: cxios_is_defined_generate_rectilinear_domain_lat_end
+      INTEGER (kind = C_INTPTR_T), VALUE :: generate_rectilinear_domain_hdl
+    END FUNCTION cxios_is_defined_generate_rectilinear_domain_lat_end
+
+
+    SUBROUTINE cxios_set_generate_rectilinear_domain_lat_start(generate_rectilinear_domain_hdl, lat_start) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: generate_rectilinear_domain_hdl
+      REAL (KIND=C_DOUBLE)      , VALUE :: lat_start
+    END SUBROUTINE cxios_set_generate_rectilinear_domain_lat_start
+
+    SUBROUTINE cxios_get_generate_rectilinear_domain_lat_start(generate_rectilinear_domain_hdl, lat_start) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: generate_rectilinear_domain_hdl
+      REAL (KIND=C_DOUBLE)             :: lat_start
+    END SUBROUTINE cxios_get_generate_rectilinear_domain_lat_start
+
+    FUNCTION cxios_is_defined_generate_rectilinear_domain_lat_start(generate_rectilinear_domain_hdl) BIND(C)
+      USE ISO_C_BINDING
+      LOGICAL(kind=C_BOOL) :: cxios_is_defined_generate_rectilinear_domain_lat_start
+      INTEGER (kind = C_INTPTR_T), VALUE :: generate_rectilinear_domain_hdl
+    END FUNCTION cxios_is_defined_generate_rectilinear_domain_lat_start
+
+
+    SUBROUTINE cxios_set_generate_rectilinear_domain_lon_end(generate_rectilinear_domain_hdl, lon_end) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: generate_rectilinear_domain_hdl
+      REAL (KIND=C_DOUBLE)      , VALUE :: lon_end
+    END SUBROUTINE cxios_set_generate_rectilinear_domain_lon_end
+
+    SUBROUTINE cxios_get_generate_rectilinear_domain_lon_end(generate_rectilinear_domain_hdl, lon_end) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: generate_rectilinear_domain_hdl
+      REAL (KIND=C_DOUBLE)             :: lon_end
+    END SUBROUTINE cxios_get_generate_rectilinear_domain_lon_end
+
+    FUNCTION cxios_is_defined_generate_rectilinear_domain_lon_end(generate_rectilinear_domain_hdl) BIND(C)
+      USE ISO_C_BINDING
+      LOGICAL(kind=C_BOOL) :: cxios_is_defined_generate_rectilinear_domain_lon_end
+      INTEGER (kind = C_INTPTR_T), VALUE :: generate_rectilinear_domain_hdl
+    END FUNCTION cxios_is_defined_generate_rectilinear_domain_lon_end
+
+
+    SUBROUTINE cxios_set_generate_rectilinear_domain_lon_start(generate_rectilinear_domain_hdl, lon_start) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: generate_rectilinear_domain_hdl
+      REAL (KIND=C_DOUBLE)      , VALUE :: lon_start
+    END SUBROUTINE cxios_set_generate_rectilinear_domain_lon_start
+
+    SUBROUTINE cxios_get_generate_rectilinear_domain_lon_start(generate_rectilinear_domain_hdl, lon_start) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: generate_rectilinear_domain_hdl
+      REAL (KIND=C_DOUBLE)             :: lon_start
+    END SUBROUTINE cxios_get_generate_rectilinear_domain_lon_start
+
+    FUNCTION cxios_is_defined_generate_rectilinear_domain_lon_start(generate_rectilinear_domain_hdl) BIND(C)
+      USE ISO_C_BINDING
+      LOGICAL(kind=C_BOOL) :: cxios_is_defined_generate_rectilinear_domain_lon_start
+      INTEGER (kind = C_INTPTR_T), VALUE :: generate_rectilinear_domain_hdl
+    END FUNCTION cxios_is_defined_generate_rectilinear_domain_lon_start
+
+  END INTERFACE
+
+END MODULE generate_rectilinear_domain_interface_attr
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/fortran_attr/grid_interface_attr.F90
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/fortran_attr/grid_interface_attr.F90	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/fortran_attr/grid_interface_attr.F90	(revision 1749)
@@ -0,0 +1,244 @@
+! * ************************************************************************** *
+! *               Interface auto generated - do not modify                     *
+! * ************************************************************************** *
+#include "../fortran/xios_fortran_prefix.hpp"
+
+MODULE grid_interface_attr
+  USE, INTRINSIC :: ISO_C_BINDING
+
+  INTERFACE
+    ! Do not call directly / interface FORTRAN 2003 <-> C99
+
+    SUBROUTINE cxios_set_grid_comment(grid_hdl, comment, comment_size) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: grid_hdl
+      CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: comment
+      INTEGER  (kind = C_INT)     , VALUE        :: comment_size
+    END SUBROUTINE cxios_set_grid_comment
+
+    SUBROUTINE cxios_get_grid_comment(grid_hdl, comment, comment_size) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: grid_hdl
+      CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: comment
+      INTEGER  (kind = C_INT)     , VALUE        :: comment_size
+    END SUBROUTINE cxios_get_grid_comment
+
+    FUNCTION cxios_is_defined_grid_comment(grid_hdl) BIND(C)
+      USE ISO_C_BINDING
+      LOGICAL(kind=C_BOOL) :: cxios_is_defined_grid_comment
+      INTEGER (kind = C_INTPTR_T), VALUE :: grid_hdl
+    END FUNCTION cxios_is_defined_grid_comment
+
+
+    SUBROUTINE cxios_set_grid_description(grid_hdl, description, description_size) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: grid_hdl
+      CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: description
+      INTEGER  (kind = C_INT)     , VALUE        :: description_size
+    END SUBROUTINE cxios_set_grid_description
+
+    SUBROUTINE cxios_get_grid_description(grid_hdl, description, description_size) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: grid_hdl
+      CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: description
+      INTEGER  (kind = C_INT)     , VALUE        :: description_size
+    END SUBROUTINE cxios_get_grid_description
+
+    FUNCTION cxios_is_defined_grid_description(grid_hdl) BIND(C)
+      USE ISO_C_BINDING
+      LOGICAL(kind=C_BOOL) :: cxios_is_defined_grid_description
+      INTEGER (kind = C_INTPTR_T), VALUE :: grid_hdl
+    END FUNCTION cxios_is_defined_grid_description
+
+
+    SUBROUTINE cxios_set_grid_mask_0d(grid_hdl, mask_0d, extent) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE       :: grid_hdl
+      LOGICAL (KIND=C_BOOL)     , DIMENSION(*) :: mask_0d
+      INTEGER (kind = C_INT), DIMENSION(*)     :: extent
+    END SUBROUTINE cxios_set_grid_mask_0d
+
+    SUBROUTINE cxios_get_grid_mask_0d(grid_hdl, mask_0d, extent) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE       :: grid_hdl
+      LOGICAL (KIND=C_BOOL)     , DIMENSION(*) :: mask_0d
+      INTEGER (kind = C_INT), DIMENSION(*)     :: extent
+    END SUBROUTINE cxios_get_grid_mask_0d
+
+    FUNCTION cxios_is_defined_grid_mask_0d(grid_hdl) BIND(C)
+      USE ISO_C_BINDING
+      LOGICAL(kind=C_BOOL) :: cxios_is_defined_grid_mask_0d
+      INTEGER (kind = C_INTPTR_T), VALUE :: grid_hdl
+    END FUNCTION cxios_is_defined_grid_mask_0d
+
+
+    SUBROUTINE cxios_set_grid_mask_1d(grid_hdl, mask_1d, extent) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE       :: grid_hdl
+      LOGICAL (KIND=C_BOOL)     , DIMENSION(*) :: mask_1d
+      INTEGER (kind = C_INT), DIMENSION(*)     :: extent
+    END SUBROUTINE cxios_set_grid_mask_1d
+
+    SUBROUTINE cxios_get_grid_mask_1d(grid_hdl, mask_1d, extent) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE       :: grid_hdl
+      LOGICAL (KIND=C_BOOL)     , DIMENSION(*) :: mask_1d
+      INTEGER (kind = C_INT), DIMENSION(*)     :: extent
+    END SUBROUTINE cxios_get_grid_mask_1d
+
+    FUNCTION cxios_is_defined_grid_mask_1d(grid_hdl) BIND(C)
+      USE ISO_C_BINDING
+      LOGICAL(kind=C_BOOL) :: cxios_is_defined_grid_mask_1d
+      INTEGER (kind = C_INTPTR_T), VALUE :: grid_hdl
+    END FUNCTION cxios_is_defined_grid_mask_1d
+
+
+    SUBROUTINE cxios_set_grid_mask_2d(grid_hdl, mask_2d, extent) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE       :: grid_hdl
+      LOGICAL (KIND=C_BOOL)     , DIMENSION(*) :: mask_2d
+      INTEGER (kind = C_INT), DIMENSION(*)     :: extent
+    END SUBROUTINE cxios_set_grid_mask_2d
+
+    SUBROUTINE cxios_get_grid_mask_2d(grid_hdl, mask_2d, extent) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE       :: grid_hdl
+      LOGICAL (KIND=C_BOOL)     , DIMENSION(*) :: mask_2d
+      INTEGER (kind = C_INT), DIMENSION(*)     :: extent
+    END SUBROUTINE cxios_get_grid_mask_2d
+
+    FUNCTION cxios_is_defined_grid_mask_2d(grid_hdl) BIND(C)
+      USE ISO_C_BINDING
+      LOGICAL(kind=C_BOOL) :: cxios_is_defined_grid_mask_2d
+      INTEGER (kind = C_INTPTR_T), VALUE :: grid_hdl
+    END FUNCTION cxios_is_defined_grid_mask_2d
+
+
+    SUBROUTINE cxios_set_grid_mask_3d(grid_hdl, mask_3d, extent) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE       :: grid_hdl
+      LOGICAL (KIND=C_BOOL)     , DIMENSION(*) :: mask_3d
+      INTEGER (kind = C_INT), DIMENSION(*)     :: extent
+    END SUBROUTINE cxios_set_grid_mask_3d
+
+    SUBROUTINE cxios_get_grid_mask_3d(grid_hdl, mask_3d, extent) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE       :: grid_hdl
+      LOGICAL (KIND=C_BOOL)     , DIMENSION(*) :: mask_3d
+      INTEGER (kind = C_INT), DIMENSION(*)     :: extent
+    END SUBROUTINE cxios_get_grid_mask_3d
+
+    FUNCTION cxios_is_defined_grid_mask_3d(grid_hdl) BIND(C)
+      USE ISO_C_BINDING
+      LOGICAL(kind=C_BOOL) :: cxios_is_defined_grid_mask_3d
+      INTEGER (kind = C_INTPTR_T), VALUE :: grid_hdl
+    END FUNCTION cxios_is_defined_grid_mask_3d
+
+
+    SUBROUTINE cxios_set_grid_mask_4d(grid_hdl, mask_4d, extent) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE       :: grid_hdl
+      LOGICAL (KIND=C_BOOL)     , DIMENSION(*) :: mask_4d
+      INTEGER (kind = C_INT), DIMENSION(*)     :: extent
+    END SUBROUTINE cxios_set_grid_mask_4d
+
+    SUBROUTINE cxios_get_grid_mask_4d(grid_hdl, mask_4d, extent) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE       :: grid_hdl
+      LOGICAL (KIND=C_BOOL)     , DIMENSION(*) :: mask_4d
+      INTEGER (kind = C_INT), DIMENSION(*)     :: extent
+    END SUBROUTINE cxios_get_grid_mask_4d
+
+    FUNCTION cxios_is_defined_grid_mask_4d(grid_hdl) BIND(C)
+      USE ISO_C_BINDING
+      LOGICAL(kind=C_BOOL) :: cxios_is_defined_grid_mask_4d
+      INTEGER (kind = C_INTPTR_T), VALUE :: grid_hdl
+    END FUNCTION cxios_is_defined_grid_mask_4d
+
+
+    SUBROUTINE cxios_set_grid_mask_5d(grid_hdl, mask_5d, extent) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE       :: grid_hdl
+      LOGICAL (KIND=C_BOOL)     , DIMENSION(*) :: mask_5d
+      INTEGER (kind = C_INT), DIMENSION(*)     :: extent
+    END SUBROUTINE cxios_set_grid_mask_5d
+
+    SUBROUTINE cxios_get_grid_mask_5d(grid_hdl, mask_5d, extent) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE       :: grid_hdl
+      LOGICAL (KIND=C_BOOL)     , DIMENSION(*) :: mask_5d
+      INTEGER (kind = C_INT), DIMENSION(*)     :: extent
+    END SUBROUTINE cxios_get_grid_mask_5d
+
+    FUNCTION cxios_is_defined_grid_mask_5d(grid_hdl) BIND(C)
+      USE ISO_C_BINDING
+      LOGICAL(kind=C_BOOL) :: cxios_is_defined_grid_mask_5d
+      INTEGER (kind = C_INTPTR_T), VALUE :: grid_hdl
+    END FUNCTION cxios_is_defined_grid_mask_5d
+
+
+    SUBROUTINE cxios_set_grid_mask_6d(grid_hdl, mask_6d, extent) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE       :: grid_hdl
+      LOGICAL (KIND=C_BOOL)     , DIMENSION(*) :: mask_6d
+      INTEGER (kind = C_INT), DIMENSION(*)     :: extent
+    END SUBROUTINE cxios_set_grid_mask_6d
+
+    SUBROUTINE cxios_get_grid_mask_6d(grid_hdl, mask_6d, extent) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE       :: grid_hdl
+      LOGICAL (KIND=C_BOOL)     , DIMENSION(*) :: mask_6d
+      INTEGER (kind = C_INT), DIMENSION(*)     :: extent
+    END SUBROUTINE cxios_get_grid_mask_6d
+
+    FUNCTION cxios_is_defined_grid_mask_6d(grid_hdl) BIND(C)
+      USE ISO_C_BINDING
+      LOGICAL(kind=C_BOOL) :: cxios_is_defined_grid_mask_6d
+      INTEGER (kind = C_INTPTR_T), VALUE :: grid_hdl
+    END FUNCTION cxios_is_defined_grid_mask_6d
+
+
+    SUBROUTINE cxios_set_grid_mask_7d(grid_hdl, mask_7d, extent) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE       :: grid_hdl
+      LOGICAL (KIND=C_BOOL)     , DIMENSION(*) :: mask_7d
+      INTEGER (kind = C_INT), DIMENSION(*)     :: extent
+    END SUBROUTINE cxios_set_grid_mask_7d
+
+    SUBROUTINE cxios_get_grid_mask_7d(grid_hdl, mask_7d, extent) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE       :: grid_hdl
+      LOGICAL (KIND=C_BOOL)     , DIMENSION(*) :: mask_7d
+      INTEGER (kind = C_INT), DIMENSION(*)     :: extent
+    END SUBROUTINE cxios_get_grid_mask_7d
+
+    FUNCTION cxios_is_defined_grid_mask_7d(grid_hdl) BIND(C)
+      USE ISO_C_BINDING
+      LOGICAL(kind=C_BOOL) :: cxios_is_defined_grid_mask_7d
+      INTEGER (kind = C_INTPTR_T), VALUE :: grid_hdl
+    END FUNCTION cxios_is_defined_grid_mask_7d
+
+
+    SUBROUTINE cxios_set_grid_name(grid_hdl, name, name_size) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: grid_hdl
+      CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: name
+      INTEGER  (kind = C_INT)     , VALUE        :: name_size
+    END SUBROUTINE cxios_set_grid_name
+
+    SUBROUTINE cxios_get_grid_name(grid_hdl, name, name_size) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: grid_hdl
+      CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: name
+      INTEGER  (kind = C_INT)     , VALUE        :: name_size
+    END SUBROUTINE cxios_get_grid_name
+
+    FUNCTION cxios_is_defined_grid_name(grid_hdl) BIND(C)
+      USE ISO_C_BINDING
+      LOGICAL(kind=C_BOOL) :: cxios_is_defined_grid_name
+      INTEGER (kind = C_INTPTR_T), VALUE :: grid_hdl
+    END FUNCTION cxios_is_defined_grid_name
+
+  END INTERFACE
+
+END MODULE grid_interface_attr
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/fortran_attr/gridgroup_interface_attr.F90
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/fortran_attr/gridgroup_interface_attr.F90	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/fortran_attr/gridgroup_interface_attr.F90	(revision 1749)
@@ -0,0 +1,265 @@
+! * ************************************************************************** *
+! *               Interface auto generated - do not modify                     *
+! * ************************************************************************** *
+#include "../fortran/xios_fortran_prefix.hpp"
+
+MODULE gridgroup_interface_attr
+  USE, INTRINSIC :: ISO_C_BINDING
+
+  INTERFACE
+    ! Do not call directly / interface FORTRAN 2003 <-> C99
+
+    SUBROUTINE cxios_set_gridgroup_comment(gridgroup_hdl, comment, comment_size) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: gridgroup_hdl
+      CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: comment
+      INTEGER  (kind = C_INT)     , VALUE        :: comment_size
+    END SUBROUTINE cxios_set_gridgroup_comment
+
+    SUBROUTINE cxios_get_gridgroup_comment(gridgroup_hdl, comment, comment_size) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: gridgroup_hdl
+      CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: comment
+      INTEGER  (kind = C_INT)     , VALUE        :: comment_size
+    END SUBROUTINE cxios_get_gridgroup_comment
+
+    FUNCTION cxios_is_defined_gridgroup_comment(gridgroup_hdl) BIND(C)
+      USE ISO_C_BINDING
+      LOGICAL(kind=C_BOOL) :: cxios_is_defined_gridgroup_comment
+      INTEGER (kind = C_INTPTR_T), VALUE :: gridgroup_hdl
+    END FUNCTION cxios_is_defined_gridgroup_comment
+
+
+    SUBROUTINE cxios_set_gridgroup_description(gridgroup_hdl, description, description_size) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: gridgroup_hdl
+      CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: description
+      INTEGER  (kind = C_INT)     , VALUE        :: description_size
+    END SUBROUTINE cxios_set_gridgroup_description
+
+    SUBROUTINE cxios_get_gridgroup_description(gridgroup_hdl, description, description_size) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: gridgroup_hdl
+      CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: description
+      INTEGER  (kind = C_INT)     , VALUE        :: description_size
+    END SUBROUTINE cxios_get_gridgroup_description
+
+    FUNCTION cxios_is_defined_gridgroup_description(gridgroup_hdl) BIND(C)
+      USE ISO_C_BINDING
+      LOGICAL(kind=C_BOOL) :: cxios_is_defined_gridgroup_description
+      INTEGER (kind = C_INTPTR_T), VALUE :: gridgroup_hdl
+    END FUNCTION cxios_is_defined_gridgroup_description
+
+
+    SUBROUTINE cxios_set_gridgroup_group_ref(gridgroup_hdl, group_ref, group_ref_size) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: gridgroup_hdl
+      CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: group_ref
+      INTEGER  (kind = C_INT)     , VALUE        :: group_ref_size
+    END SUBROUTINE cxios_set_gridgroup_group_ref
+
+    SUBROUTINE cxios_get_gridgroup_group_ref(gridgroup_hdl, group_ref, group_ref_size) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: gridgroup_hdl
+      CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: group_ref
+      INTEGER  (kind = C_INT)     , VALUE        :: group_ref_size
+    END SUBROUTINE cxios_get_gridgroup_group_ref
+
+    FUNCTION cxios_is_defined_gridgroup_group_ref(gridgroup_hdl) BIND(C)
+      USE ISO_C_BINDING
+      LOGICAL(kind=C_BOOL) :: cxios_is_defined_gridgroup_group_ref
+      INTEGER (kind = C_INTPTR_T), VALUE :: gridgroup_hdl
+    END FUNCTION cxios_is_defined_gridgroup_group_ref
+
+
+    SUBROUTINE cxios_set_gridgroup_mask_0d(gridgroup_hdl, mask_0d, extent) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE       :: gridgroup_hdl
+      LOGICAL (KIND=C_BOOL)     , DIMENSION(*) :: mask_0d
+      INTEGER (kind = C_INT), DIMENSION(*)     :: extent
+    END SUBROUTINE cxios_set_gridgroup_mask_0d
+
+    SUBROUTINE cxios_get_gridgroup_mask_0d(gridgroup_hdl, mask_0d, extent) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE       :: gridgroup_hdl
+      LOGICAL (KIND=C_BOOL)     , DIMENSION(*) :: mask_0d
+      INTEGER (kind = C_INT), DIMENSION(*)     :: extent
+    END SUBROUTINE cxios_get_gridgroup_mask_0d
+
+    FUNCTION cxios_is_defined_gridgroup_mask_0d(gridgroup_hdl) BIND(C)
+      USE ISO_C_BINDING
+      LOGICAL(kind=C_BOOL) :: cxios_is_defined_gridgroup_mask_0d
+      INTEGER (kind = C_INTPTR_T), VALUE :: gridgroup_hdl
+    END FUNCTION cxios_is_defined_gridgroup_mask_0d
+
+
+    SUBROUTINE cxios_set_gridgroup_mask_1d(gridgroup_hdl, mask_1d, extent) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE       :: gridgroup_hdl
+      LOGICAL (KIND=C_BOOL)     , DIMENSION(*) :: mask_1d
+      INTEGER (kind = C_INT), DIMENSION(*)     :: extent
+    END SUBROUTINE cxios_set_gridgroup_mask_1d
+
+    SUBROUTINE cxios_get_gridgroup_mask_1d(gridgroup_hdl, mask_1d, extent) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE       :: gridgroup_hdl
+      LOGICAL (KIND=C_BOOL)     , DIMENSION(*) :: mask_1d
+      INTEGER (kind = C_INT), DIMENSION(*)     :: extent
+    END SUBROUTINE cxios_get_gridgroup_mask_1d
+
+    FUNCTION cxios_is_defined_gridgroup_mask_1d(gridgroup_hdl) BIND(C)
+      USE ISO_C_BINDING
+      LOGICAL(kind=C_BOOL) :: cxios_is_defined_gridgroup_mask_1d
+      INTEGER (kind = C_INTPTR_T), VALUE :: gridgroup_hdl
+    END FUNCTION cxios_is_defined_gridgroup_mask_1d
+
+
+    SUBROUTINE cxios_set_gridgroup_mask_2d(gridgroup_hdl, mask_2d, extent) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE       :: gridgroup_hdl
+      LOGICAL (KIND=C_BOOL)     , DIMENSION(*) :: mask_2d
+      INTEGER (kind = C_INT), DIMENSION(*)     :: extent
+    END SUBROUTINE cxios_set_gridgroup_mask_2d
+
+    SUBROUTINE cxios_get_gridgroup_mask_2d(gridgroup_hdl, mask_2d, extent) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE       :: gridgroup_hdl
+      LOGICAL (KIND=C_BOOL)     , DIMENSION(*) :: mask_2d
+      INTEGER (kind = C_INT), DIMENSION(*)     :: extent
+    END SUBROUTINE cxios_get_gridgroup_mask_2d
+
+    FUNCTION cxios_is_defined_gridgroup_mask_2d(gridgroup_hdl) BIND(C)
+      USE ISO_C_BINDING
+      LOGICAL(kind=C_BOOL) :: cxios_is_defined_gridgroup_mask_2d
+      INTEGER (kind = C_INTPTR_T), VALUE :: gridgroup_hdl
+    END FUNCTION cxios_is_defined_gridgroup_mask_2d
+
+
+    SUBROUTINE cxios_set_gridgroup_mask_3d(gridgroup_hdl, mask_3d, extent) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE       :: gridgroup_hdl
+      LOGICAL (KIND=C_BOOL)     , DIMENSION(*) :: mask_3d
+      INTEGER (kind = C_INT), DIMENSION(*)     :: extent
+    END SUBROUTINE cxios_set_gridgroup_mask_3d
+
+    SUBROUTINE cxios_get_gridgroup_mask_3d(gridgroup_hdl, mask_3d, extent) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE       :: gridgroup_hdl
+      LOGICAL (KIND=C_BOOL)     , DIMENSION(*) :: mask_3d
+      INTEGER (kind = C_INT), DIMENSION(*)     :: extent
+    END SUBROUTINE cxios_get_gridgroup_mask_3d
+
+    FUNCTION cxios_is_defined_gridgroup_mask_3d(gridgroup_hdl) BIND(C)
+      USE ISO_C_BINDING
+      LOGICAL(kind=C_BOOL) :: cxios_is_defined_gridgroup_mask_3d
+      INTEGER (kind = C_INTPTR_T), VALUE :: gridgroup_hdl
+    END FUNCTION cxios_is_defined_gridgroup_mask_3d
+
+
+    SUBROUTINE cxios_set_gridgroup_mask_4d(gridgroup_hdl, mask_4d, extent) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE       :: gridgroup_hdl
+      LOGICAL (KIND=C_BOOL)     , DIMENSION(*) :: mask_4d
+      INTEGER (kind = C_INT), DIMENSION(*)     :: extent
+    END SUBROUTINE cxios_set_gridgroup_mask_4d
+
+    SUBROUTINE cxios_get_gridgroup_mask_4d(gridgroup_hdl, mask_4d, extent) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE       :: gridgroup_hdl
+      LOGICAL (KIND=C_BOOL)     , DIMENSION(*) :: mask_4d
+      INTEGER (kind = C_INT), DIMENSION(*)     :: extent
+    END SUBROUTINE cxios_get_gridgroup_mask_4d
+
+    FUNCTION cxios_is_defined_gridgroup_mask_4d(gridgroup_hdl) BIND(C)
+      USE ISO_C_BINDING
+      LOGICAL(kind=C_BOOL) :: cxios_is_defined_gridgroup_mask_4d
+      INTEGER (kind = C_INTPTR_T), VALUE :: gridgroup_hdl
+    END FUNCTION cxios_is_defined_gridgroup_mask_4d
+
+
+    SUBROUTINE cxios_set_gridgroup_mask_5d(gridgroup_hdl, mask_5d, extent) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE       :: gridgroup_hdl
+      LOGICAL (KIND=C_BOOL)     , DIMENSION(*) :: mask_5d
+      INTEGER (kind = C_INT), DIMENSION(*)     :: extent
+    END SUBROUTINE cxios_set_gridgroup_mask_5d
+
+    SUBROUTINE cxios_get_gridgroup_mask_5d(gridgroup_hdl, mask_5d, extent) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE       :: gridgroup_hdl
+      LOGICAL (KIND=C_BOOL)     , DIMENSION(*) :: mask_5d
+      INTEGER (kind = C_INT), DIMENSION(*)     :: extent
+    END SUBROUTINE cxios_get_gridgroup_mask_5d
+
+    FUNCTION cxios_is_defined_gridgroup_mask_5d(gridgroup_hdl) BIND(C)
+      USE ISO_C_BINDING
+      LOGICAL(kind=C_BOOL) :: cxios_is_defined_gridgroup_mask_5d
+      INTEGER (kind = C_INTPTR_T), VALUE :: gridgroup_hdl
+    END FUNCTION cxios_is_defined_gridgroup_mask_5d
+
+
+    SUBROUTINE cxios_set_gridgroup_mask_6d(gridgroup_hdl, mask_6d, extent) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE       :: gridgroup_hdl
+      LOGICAL (KIND=C_BOOL)     , DIMENSION(*) :: mask_6d
+      INTEGER (kind = C_INT), DIMENSION(*)     :: extent
+    END SUBROUTINE cxios_set_gridgroup_mask_6d
+
+    SUBROUTINE cxios_get_gridgroup_mask_6d(gridgroup_hdl, mask_6d, extent) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE       :: gridgroup_hdl
+      LOGICAL (KIND=C_BOOL)     , DIMENSION(*) :: mask_6d
+      INTEGER (kind = C_INT), DIMENSION(*)     :: extent
+    END SUBROUTINE cxios_get_gridgroup_mask_6d
+
+    FUNCTION cxios_is_defined_gridgroup_mask_6d(gridgroup_hdl) BIND(C)
+      USE ISO_C_BINDING
+      LOGICAL(kind=C_BOOL) :: cxios_is_defined_gridgroup_mask_6d
+      INTEGER (kind = C_INTPTR_T), VALUE :: gridgroup_hdl
+    END FUNCTION cxios_is_defined_gridgroup_mask_6d
+
+
+    SUBROUTINE cxios_set_gridgroup_mask_7d(gridgroup_hdl, mask_7d, extent) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE       :: gridgroup_hdl
+      LOGICAL (KIND=C_BOOL)     , DIMENSION(*) :: mask_7d
+      INTEGER (kind = C_INT), DIMENSION(*)     :: extent
+    END SUBROUTINE cxios_set_gridgroup_mask_7d
+
+    SUBROUTINE cxios_get_gridgroup_mask_7d(gridgroup_hdl, mask_7d, extent) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE       :: gridgroup_hdl
+      LOGICAL (KIND=C_BOOL)     , DIMENSION(*) :: mask_7d
+      INTEGER (kind = C_INT), DIMENSION(*)     :: extent
+    END SUBROUTINE cxios_get_gridgroup_mask_7d
+
+    FUNCTION cxios_is_defined_gridgroup_mask_7d(gridgroup_hdl) BIND(C)
+      USE ISO_C_BINDING
+      LOGICAL(kind=C_BOOL) :: cxios_is_defined_gridgroup_mask_7d
+      INTEGER (kind = C_INTPTR_T), VALUE :: gridgroup_hdl
+    END FUNCTION cxios_is_defined_gridgroup_mask_7d
+
+
+    SUBROUTINE cxios_set_gridgroup_name(gridgroup_hdl, name, name_size) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: gridgroup_hdl
+      CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: name
+      INTEGER  (kind = C_INT)     , VALUE        :: name_size
+    END SUBROUTINE cxios_set_gridgroup_name
+
+    SUBROUTINE cxios_get_gridgroup_name(gridgroup_hdl, name, name_size) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: gridgroup_hdl
+      CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: name
+      INTEGER  (kind = C_INT)     , VALUE        :: name_size
+    END SUBROUTINE cxios_get_gridgroup_name
+
+    FUNCTION cxios_is_defined_gridgroup_name(gridgroup_hdl) BIND(C)
+      USE ISO_C_BINDING
+      LOGICAL(kind=C_BOOL) :: cxios_is_defined_gridgroup_name
+      INTEGER (kind = C_INTPTR_T), VALUE :: gridgroup_hdl
+    END FUNCTION cxios_is_defined_gridgroup_name
+
+  END INTERFACE
+
+END MODULE gridgroup_interface_attr
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/fortran_attr/iaxis_attr.F90
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/fortran_attr/iaxis_attr.F90	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/fortran_attr/iaxis_attr.F90	(revision 1749)
@@ -0,0 +1,923 @@
+! * ************************************************************************** *
+! *               Interface auto generated - do not modify                     *
+! * ************************************************************************** *
+#include "xios_fortran_prefix.hpp"
+
+MODULE iaxis_attr
+  USE, INTRINSIC :: ISO_C_BINDING
+  USE iaxis
+  USE axis_interface_attr
+
+CONTAINS
+
+  SUBROUTINE xios(set_axis_attr)  &
+    ( axis_id, axis_ref, axis_type, begin, bounds, bounds_name, comment, data_begin, data_index  &
+    , data_n, dim_name, formula, formula_bounds, formula_term, formula_term_bounds, index, label  &
+    , long_name, mask, n, n_distributed_partition, n_glo, name, positive, prec, standard_name, unit  &
+    , value )
+
+    IMPLICIT NONE
+      TYPE(txios(axis))  :: axis_hdl
+      CHARACTER(LEN=*), INTENT(IN) ::axis_id
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: axis_ref
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: axis_type
+      INTEGER  , OPTIONAL, INTENT(IN) :: begin
+      REAL (KIND=8) , OPTIONAL, INTENT(IN) :: bounds(:,:)
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: bounds_name
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: comment
+      INTEGER  , OPTIONAL, INTENT(IN) :: data_begin
+      INTEGER  , OPTIONAL, INTENT(IN) :: data_index(:)
+      INTEGER  , OPTIONAL, INTENT(IN) :: data_n
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: dim_name
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: formula
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: formula_bounds
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: formula_term
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: formula_term_bounds
+      INTEGER  , OPTIONAL, INTENT(IN) :: index(:)
+      CHARACTER(len=*) , OPTIONAL, INTENT(IN) :: label(:)
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: long_name
+      LOGICAL  , OPTIONAL, INTENT(IN) :: mask(:)
+      LOGICAL (KIND=C_BOOL) , ALLOCATABLE :: mask_tmp(:)
+      INTEGER  , OPTIONAL, INTENT(IN) :: n
+      INTEGER  , OPTIONAL, INTENT(IN) :: n_distributed_partition
+      INTEGER  , OPTIONAL, INTENT(IN) :: n_glo
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: name
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: positive
+      INTEGER  , OPTIONAL, INTENT(IN) :: prec
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: standard_name
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: unit
+      REAL (KIND=8) , OPTIONAL, INTENT(IN) :: value(:)
+
+      CALL xios(get_axis_handle) &
+      (axis_id,axis_hdl)
+      CALL xios(set_axis_attr_hdl_)   &
+      ( axis_hdl, axis_ref, axis_type, begin, bounds, bounds_name, comment, data_begin, data_index  &
+      , data_n, dim_name, formula, formula_bounds, formula_term, formula_term_bounds, index, label  &
+      , long_name, mask, n, n_distributed_partition, n_glo, name, positive, prec, standard_name, unit  &
+      , value )
+
+  END SUBROUTINE xios(set_axis_attr)
+
+  SUBROUTINE xios(set_axis_attr_hdl)  &
+    ( axis_hdl, axis_ref, axis_type, begin, bounds, bounds_name, comment, data_begin, data_index  &
+    , data_n, dim_name, formula, formula_bounds, formula_term, formula_term_bounds, index, label  &
+    , long_name, mask, n, n_distributed_partition, n_glo, name, positive, prec, standard_name, unit  &
+    , value )
+
+    IMPLICIT NONE
+      TYPE(txios(axis)) , INTENT(IN) :: axis_hdl
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: axis_ref
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: axis_type
+      INTEGER  , OPTIONAL, INTENT(IN) :: begin
+      REAL (KIND=8) , OPTIONAL, INTENT(IN) :: bounds(:,:)
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: bounds_name
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: comment
+      INTEGER  , OPTIONAL, INTENT(IN) :: data_begin
+      INTEGER  , OPTIONAL, INTENT(IN) :: data_index(:)
+      INTEGER  , OPTIONAL, INTENT(IN) :: data_n
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: dim_name
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: formula
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: formula_bounds
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: formula_term
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: formula_term_bounds
+      INTEGER  , OPTIONAL, INTENT(IN) :: index(:)
+      CHARACTER(len=*) , OPTIONAL, INTENT(IN) :: label(:)
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: long_name
+      LOGICAL  , OPTIONAL, INTENT(IN) :: mask(:)
+      LOGICAL (KIND=C_BOOL) , ALLOCATABLE :: mask_tmp(:)
+      INTEGER  , OPTIONAL, INTENT(IN) :: n
+      INTEGER  , OPTIONAL, INTENT(IN) :: n_distributed_partition
+      INTEGER  , OPTIONAL, INTENT(IN) :: n_glo
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: name
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: positive
+      INTEGER  , OPTIONAL, INTENT(IN) :: prec
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: standard_name
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: unit
+      REAL (KIND=8) , OPTIONAL, INTENT(IN) :: value(:)
+
+      CALL xios(set_axis_attr_hdl_)  &
+      ( axis_hdl, axis_ref, axis_type, begin, bounds, bounds_name, comment, data_begin, data_index  &
+      , data_n, dim_name, formula, formula_bounds, formula_term, formula_term_bounds, index, label  &
+      , long_name, mask, n, n_distributed_partition, n_glo, name, positive, prec, standard_name, unit  &
+      , value )
+
+  END SUBROUTINE xios(set_axis_attr_hdl)
+
+  SUBROUTINE xios(set_axis_attr_hdl_)   &
+    ( axis_hdl, axis_ref_, axis_type_, begin_, bounds_, bounds_name_, comment_, data_begin_, data_index_  &
+    , data_n_, dim_name_, formula_, formula_bounds_, formula_term_, formula_term_bounds_, index_  &
+    , label_, long_name_, mask_, n_, n_distributed_partition_, n_glo_, name_, positive_, prec_, standard_name_  &
+    , unit_, value_ )
+
+    IMPLICIT NONE
+      TYPE(txios(axis)) , INTENT(IN) :: axis_hdl
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: axis_ref_
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: axis_type_
+      INTEGER  , OPTIONAL, INTENT(IN) :: begin_
+      REAL (KIND=8) , OPTIONAL, INTENT(IN) :: bounds_(:,:)
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: bounds_name_
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: comment_
+      INTEGER  , OPTIONAL, INTENT(IN) :: data_begin_
+      INTEGER  , OPTIONAL, INTENT(IN) :: data_index_(:)
+      INTEGER  , OPTIONAL, INTENT(IN) :: data_n_
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: dim_name_
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: formula_
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: formula_bounds_
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: formula_term_
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: formula_term_bounds_
+      INTEGER  , OPTIONAL, INTENT(IN) :: index_(:)
+      CHARACTER(len=*) , OPTIONAL, INTENT(IN) :: label_(:)
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: long_name_
+      LOGICAL  , OPTIONAL, INTENT(IN) :: mask_(:)
+      LOGICAL (KIND=C_BOOL) , ALLOCATABLE :: mask__tmp(:)
+      INTEGER  , OPTIONAL, INTENT(IN) :: n_
+      INTEGER  , OPTIONAL, INTENT(IN) :: n_distributed_partition_
+      INTEGER  , OPTIONAL, INTENT(IN) :: n_glo_
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: name_
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: positive_
+      INTEGER  , OPTIONAL, INTENT(IN) :: prec_
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: standard_name_
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: unit_
+      REAL (KIND=8) , OPTIONAL, INTENT(IN) :: value_(:)
+
+      IF (PRESENT(axis_ref_)) THEN
+        CALL cxios_set_axis_axis_ref &
+      (axis_hdl%daddr, axis_ref_, len(axis_ref_))
+      ENDIF
+
+      IF (PRESENT(axis_type_)) THEN
+        CALL cxios_set_axis_axis_type &
+      (axis_hdl%daddr, axis_type_, len(axis_type_))
+      ENDIF
+
+      IF (PRESENT(begin_)) THEN
+        CALL cxios_set_axis_begin &
+      (axis_hdl%daddr, begin_)
+      ENDIF
+
+      IF (PRESENT(bounds_)) THEN
+        CALL cxios_set_axis_bounds &
+      (axis_hdl%daddr, bounds_, SHAPE(bounds_))
+      ENDIF
+
+      IF (PRESENT(bounds_name_)) THEN
+        CALL cxios_set_axis_bounds_name &
+      (axis_hdl%daddr, bounds_name_, len(bounds_name_))
+      ENDIF
+
+      IF (PRESENT(comment_)) THEN
+        CALL cxios_set_axis_comment &
+      (axis_hdl%daddr, comment_, len(comment_))
+      ENDIF
+
+      IF (PRESENT(data_begin_)) THEN
+        CALL cxios_set_axis_data_begin &
+      (axis_hdl%daddr, data_begin_)
+      ENDIF
+
+      IF (PRESENT(data_index_)) THEN
+        CALL cxios_set_axis_data_index &
+      (axis_hdl%daddr, data_index_, SHAPE(data_index_))
+      ENDIF
+
+      IF (PRESENT(data_n_)) THEN
+        CALL cxios_set_axis_data_n &
+      (axis_hdl%daddr, data_n_)
+      ENDIF
+
+      IF (PRESENT(dim_name_)) THEN
+        CALL cxios_set_axis_dim_name &
+      (axis_hdl%daddr, dim_name_, len(dim_name_))
+      ENDIF
+
+      IF (PRESENT(formula_)) THEN
+        CALL cxios_set_axis_formula &
+      (axis_hdl%daddr, formula_, len(formula_))
+      ENDIF
+
+      IF (PRESENT(formula_bounds_)) THEN
+        CALL cxios_set_axis_formula_bounds &
+      (axis_hdl%daddr, formula_bounds_, len(formula_bounds_))
+      ENDIF
+
+      IF (PRESENT(formula_term_)) THEN
+        CALL cxios_set_axis_formula_term &
+      (axis_hdl%daddr, formula_term_, len(formula_term_))
+      ENDIF
+
+      IF (PRESENT(formula_term_bounds_)) THEN
+        CALL cxios_set_axis_formula_term_bounds &
+      (axis_hdl%daddr, formula_term_bounds_, len(formula_term_bounds_))
+      ENDIF
+
+      IF (PRESENT(index_)) THEN
+        CALL cxios_set_axis_index &
+      (axis_hdl%daddr, index_, SHAPE(index_))
+      ENDIF
+
+      IF (PRESENT(label_)) THEN
+        CALL cxios_set_axis_label &
+      (axis_hdl%daddr, label_, LEN(label_), LEN_TRIM(label_), SHAPE(label_))
+      ENDIF
+
+      IF (PRESENT(long_name_)) THEN
+        CALL cxios_set_axis_long_name &
+      (axis_hdl%daddr, long_name_, len(long_name_))
+      ENDIF
+
+      IF (PRESENT(mask_)) THEN
+        ALLOCATE(mask__tmp(SIZE(mask_,1)))
+        mask__tmp = mask_
+        CALL cxios_set_axis_mask &
+      (axis_hdl%daddr, mask__tmp, SHAPE(mask_))
+      ENDIF
+
+      IF (PRESENT(n_)) THEN
+        CALL cxios_set_axis_n &
+      (axis_hdl%daddr, n_)
+      ENDIF
+
+      IF (PRESENT(n_distributed_partition_)) THEN
+        CALL cxios_set_axis_n_distributed_partition &
+      (axis_hdl%daddr, n_distributed_partition_)
+      ENDIF
+
+      IF (PRESENT(n_glo_)) THEN
+        CALL cxios_set_axis_n_glo &
+      (axis_hdl%daddr, n_glo_)
+      ENDIF
+
+      IF (PRESENT(name_)) THEN
+        CALL cxios_set_axis_name &
+      (axis_hdl%daddr, name_, len(name_))
+      ENDIF
+
+      IF (PRESENT(positive_)) THEN
+        CALL cxios_set_axis_positive &
+      (axis_hdl%daddr, positive_, len(positive_))
+      ENDIF
+
+      IF (PRESENT(prec_)) THEN
+        CALL cxios_set_axis_prec &
+      (axis_hdl%daddr, prec_)
+      ENDIF
+
+      IF (PRESENT(standard_name_)) THEN
+        CALL cxios_set_axis_standard_name &
+      (axis_hdl%daddr, standard_name_, len(standard_name_))
+      ENDIF
+
+      IF (PRESENT(unit_)) THEN
+        CALL cxios_set_axis_unit &
+      (axis_hdl%daddr, unit_, len(unit_))
+      ENDIF
+
+      IF (PRESENT(value_)) THEN
+        CALL cxios_set_axis_value &
+      (axis_hdl%daddr, value_, SHAPE(value_))
+      ENDIF
+
+  END SUBROUTINE xios(set_axis_attr_hdl_)
+
+  SUBROUTINE xios(get_axis_attr)  &
+    ( axis_id, axis_ref, axis_type, begin, bounds, bounds_name, comment, data_begin, data_index  &
+    , data_n, dim_name, formula, formula_bounds, formula_term, formula_term_bounds, index, label  &
+    , long_name, mask, n, n_distributed_partition, n_glo, name, positive, prec, standard_name, unit  &
+    , value )
+
+    IMPLICIT NONE
+      TYPE(txios(axis))  :: axis_hdl
+      CHARACTER(LEN=*), INTENT(IN) ::axis_id
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: axis_ref
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: axis_type
+      INTEGER  , OPTIONAL, INTENT(OUT) :: begin
+      REAL (KIND=8) , OPTIONAL, INTENT(OUT) :: bounds(:,:)
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: bounds_name
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: comment
+      INTEGER  , OPTIONAL, INTENT(OUT) :: data_begin
+      INTEGER  , OPTIONAL, INTENT(OUT) :: data_index(:)
+      INTEGER  , OPTIONAL, INTENT(OUT) :: data_n
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: dim_name
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: formula
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: formula_bounds
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: formula_term
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: formula_term_bounds
+      INTEGER  , OPTIONAL, INTENT(OUT) :: index(:)
+      CHARACTER(len=*) , OPTIONAL, INTENT(OUT) :: label(:)
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: long_name
+      LOGICAL  , OPTIONAL, INTENT(OUT) :: mask(:)
+      LOGICAL (KIND=C_BOOL) , ALLOCATABLE :: mask_tmp(:)
+      INTEGER  , OPTIONAL, INTENT(OUT) :: n
+      INTEGER  , OPTIONAL, INTENT(OUT) :: n_distributed_partition
+      INTEGER  , OPTIONAL, INTENT(OUT) :: n_glo
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: name
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: positive
+      INTEGER  , OPTIONAL, INTENT(OUT) :: prec
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: standard_name
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: unit
+      REAL (KIND=8) , OPTIONAL, INTENT(OUT) :: value(:)
+
+      CALL xios(get_axis_handle) &
+      (axis_id,axis_hdl)
+      CALL xios(get_axis_attr_hdl_)   &
+      ( axis_hdl, axis_ref, axis_type, begin, bounds, bounds_name, comment, data_begin, data_index  &
+      , data_n, dim_name, formula, formula_bounds, formula_term, formula_term_bounds, index, label  &
+      , long_name, mask, n, n_distributed_partition, n_glo, name, positive, prec, standard_name, unit  &
+      , value )
+
+  END SUBROUTINE xios(get_axis_attr)
+
+  SUBROUTINE xios(get_axis_attr_hdl)  &
+    ( axis_hdl, axis_ref, axis_type, begin, bounds, bounds_name, comment, data_begin, data_index  &
+    , data_n, dim_name, formula, formula_bounds, formula_term, formula_term_bounds, index, label  &
+    , long_name, mask, n, n_distributed_partition, n_glo, name, positive, prec, standard_name, unit  &
+    , value )
+
+    IMPLICIT NONE
+      TYPE(txios(axis)) , INTENT(IN) :: axis_hdl
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: axis_ref
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: axis_type
+      INTEGER  , OPTIONAL, INTENT(OUT) :: begin
+      REAL (KIND=8) , OPTIONAL, INTENT(OUT) :: bounds(:,:)
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: bounds_name
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: comment
+      INTEGER  , OPTIONAL, INTENT(OUT) :: data_begin
+      INTEGER  , OPTIONAL, INTENT(OUT) :: data_index(:)
+      INTEGER  , OPTIONAL, INTENT(OUT) :: data_n
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: dim_name
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: formula
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: formula_bounds
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: formula_term
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: formula_term_bounds
+      INTEGER  , OPTIONAL, INTENT(OUT) :: index(:)
+      CHARACTER(len=*) , OPTIONAL, INTENT(OUT) :: label(:)
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: long_name
+      LOGICAL  , OPTIONAL, INTENT(OUT) :: mask(:)
+      LOGICAL (KIND=C_BOOL) , ALLOCATABLE :: mask_tmp(:)
+      INTEGER  , OPTIONAL, INTENT(OUT) :: n
+      INTEGER  , OPTIONAL, INTENT(OUT) :: n_distributed_partition
+      INTEGER  , OPTIONAL, INTENT(OUT) :: n_glo
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: name
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: positive
+      INTEGER  , OPTIONAL, INTENT(OUT) :: prec
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: standard_name
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: unit
+      REAL (KIND=8) , OPTIONAL, INTENT(OUT) :: value(:)
+
+      CALL xios(get_axis_attr_hdl_)  &
+      ( axis_hdl, axis_ref, axis_type, begin, bounds, bounds_name, comment, data_begin, data_index  &
+      , data_n, dim_name, formula, formula_bounds, formula_term, formula_term_bounds, index, label  &
+      , long_name, mask, n, n_distributed_partition, n_glo, name, positive, prec, standard_name, unit  &
+      , value )
+
+  END SUBROUTINE xios(get_axis_attr_hdl)
+
+  SUBROUTINE xios(get_axis_attr_hdl_)   &
+    ( axis_hdl, axis_ref_, axis_type_, begin_, bounds_, bounds_name_, comment_, data_begin_, data_index_  &
+    , data_n_, dim_name_, formula_, formula_bounds_, formula_term_, formula_term_bounds_, index_  &
+    , label_, long_name_, mask_, n_, n_distributed_partition_, n_glo_, name_, positive_, prec_, standard_name_  &
+    , unit_, value_ )
+
+    IMPLICIT NONE
+      TYPE(txios(axis)) , INTENT(IN) :: axis_hdl
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: axis_ref_
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: axis_type_
+      INTEGER  , OPTIONAL, INTENT(OUT) :: begin_
+      REAL (KIND=8) , OPTIONAL, INTENT(OUT) :: bounds_(:,:)
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: bounds_name_
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: comment_
+      INTEGER  , OPTIONAL, INTENT(OUT) :: data_begin_
+      INTEGER  , OPTIONAL, INTENT(OUT) :: data_index_(:)
+      INTEGER  , OPTIONAL, INTENT(OUT) :: data_n_
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: dim_name_
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: formula_
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: formula_bounds_
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: formula_term_
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: formula_term_bounds_
+      INTEGER  , OPTIONAL, INTENT(OUT) :: index_(:)
+      CHARACTER(len=*) , OPTIONAL, INTENT(OUT) :: label_(:)
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: long_name_
+      LOGICAL  , OPTIONAL, INTENT(OUT) :: mask_(:)
+      LOGICAL (KIND=C_BOOL) , ALLOCATABLE :: mask__tmp(:)
+      INTEGER  , OPTIONAL, INTENT(OUT) :: n_
+      INTEGER  , OPTIONAL, INTENT(OUT) :: n_distributed_partition_
+      INTEGER  , OPTIONAL, INTENT(OUT) :: n_glo_
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: name_
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: positive_
+      INTEGER  , OPTIONAL, INTENT(OUT) :: prec_
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: standard_name_
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: unit_
+      REAL (KIND=8) , OPTIONAL, INTENT(OUT) :: value_(:)
+
+      IF (PRESENT(axis_ref_)) THEN
+        CALL cxios_get_axis_axis_ref &
+      (axis_hdl%daddr, axis_ref_, len(axis_ref_))
+      ENDIF
+
+      IF (PRESENT(axis_type_)) THEN
+        CALL cxios_get_axis_axis_type &
+      (axis_hdl%daddr, axis_type_, len(axis_type_))
+      ENDIF
+
+      IF (PRESENT(begin_)) THEN
+        CALL cxios_get_axis_begin &
+      (axis_hdl%daddr, begin_)
+      ENDIF
+
+      IF (PRESENT(bounds_)) THEN
+        CALL cxios_get_axis_bounds &
+      (axis_hdl%daddr, bounds_, SHAPE(bounds_))
+      ENDIF
+
+      IF (PRESENT(bounds_name_)) THEN
+        CALL cxios_get_axis_bounds_name &
+      (axis_hdl%daddr, bounds_name_, len(bounds_name_))
+      ENDIF
+
+      IF (PRESENT(comment_)) THEN
+        CALL cxios_get_axis_comment &
+      (axis_hdl%daddr, comment_, len(comment_))
+      ENDIF
+
+      IF (PRESENT(data_begin_)) THEN
+        CALL cxios_get_axis_data_begin &
+      (axis_hdl%daddr, data_begin_)
+      ENDIF
+
+      IF (PRESENT(data_index_)) THEN
+        CALL cxios_get_axis_data_index &
+      (axis_hdl%daddr, data_index_, SHAPE(data_index_))
+      ENDIF
+
+      IF (PRESENT(data_n_)) THEN
+        CALL cxios_get_axis_data_n &
+      (axis_hdl%daddr, data_n_)
+      ENDIF
+
+      IF (PRESENT(dim_name_)) THEN
+        CALL cxios_get_axis_dim_name &
+      (axis_hdl%daddr, dim_name_, len(dim_name_))
+      ENDIF
+
+      IF (PRESENT(formula_)) THEN
+        CALL cxios_get_axis_formula &
+      (axis_hdl%daddr, formula_, len(formula_))
+      ENDIF
+
+      IF (PRESENT(formula_bounds_)) THEN
+        CALL cxios_get_axis_formula_bounds &
+      (axis_hdl%daddr, formula_bounds_, len(formula_bounds_))
+      ENDIF
+
+      IF (PRESENT(formula_term_)) THEN
+        CALL cxios_get_axis_formula_term &
+      (axis_hdl%daddr, formula_term_, len(formula_term_))
+      ENDIF
+
+      IF (PRESENT(formula_term_bounds_)) THEN
+        CALL cxios_get_axis_formula_term_bounds &
+      (axis_hdl%daddr, formula_term_bounds_, len(formula_term_bounds_))
+      ENDIF
+
+      IF (PRESENT(index_)) THEN
+        CALL cxios_get_axis_index &
+      (axis_hdl%daddr, index_, SHAPE(index_))
+      ENDIF
+
+      IF (PRESENT(label_)) THEN
+        CALL cxios_get_axis_label &
+      (axis_hdl%daddr, label_, LEN(label_), SHAPE(label_))
+      ENDIF
+
+      IF (PRESENT(long_name_)) THEN
+        CALL cxios_get_axis_long_name &
+      (axis_hdl%daddr, long_name_, len(long_name_))
+      ENDIF
+
+      IF (PRESENT(mask_)) THEN
+        ALLOCATE(mask__tmp(SIZE(mask_,1)))
+        CALL cxios_get_axis_mask &
+      (axis_hdl%daddr, mask__tmp, SHAPE(mask_))
+        mask_ = mask__tmp
+      ENDIF
+
+      IF (PRESENT(n_)) THEN
+        CALL cxios_get_axis_n &
+      (axis_hdl%daddr, n_)
+      ENDIF
+
+      IF (PRESENT(n_distributed_partition_)) THEN
+        CALL cxios_get_axis_n_distributed_partition &
+      (axis_hdl%daddr, n_distributed_partition_)
+      ENDIF
+
+      IF (PRESENT(n_glo_)) THEN
+        CALL cxios_get_axis_n_glo &
+      (axis_hdl%daddr, n_glo_)
+      ENDIF
+
+      IF (PRESENT(name_)) THEN
+        CALL cxios_get_axis_name &
+      (axis_hdl%daddr, name_, len(name_))
+      ENDIF
+
+      IF (PRESENT(positive_)) THEN
+        CALL cxios_get_axis_positive &
+      (axis_hdl%daddr, positive_, len(positive_))
+      ENDIF
+
+      IF (PRESENT(prec_)) THEN
+        CALL cxios_get_axis_prec &
+      (axis_hdl%daddr, prec_)
+      ENDIF
+
+      IF (PRESENT(standard_name_)) THEN
+        CALL cxios_get_axis_standard_name &
+      (axis_hdl%daddr, standard_name_, len(standard_name_))
+      ENDIF
+
+      IF (PRESENT(unit_)) THEN
+        CALL cxios_get_axis_unit &
+      (axis_hdl%daddr, unit_, len(unit_))
+      ENDIF
+
+      IF (PRESENT(value_)) THEN
+        CALL cxios_get_axis_value &
+      (axis_hdl%daddr, value_, SHAPE(value_))
+      ENDIF
+
+  END SUBROUTINE xios(get_axis_attr_hdl_)
+
+  SUBROUTINE xios(is_defined_axis_attr)  &
+    ( axis_id, axis_ref, axis_type, begin, bounds, bounds_name, comment, data_begin, data_index  &
+    , data_n, dim_name, formula, formula_bounds, formula_term, formula_term_bounds, index, label  &
+    , long_name, mask, n, n_distributed_partition, n_glo, name, positive, prec, standard_name, unit  &
+    , value )
+
+    IMPLICIT NONE
+      TYPE(txios(axis))  :: axis_hdl
+      CHARACTER(LEN=*), INTENT(IN) ::axis_id
+      LOGICAL, OPTIONAL, INTENT(OUT) :: axis_ref
+      LOGICAL(KIND=C_BOOL) :: axis_ref_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: axis_type
+      LOGICAL(KIND=C_BOOL) :: axis_type_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: begin
+      LOGICAL(KIND=C_BOOL) :: begin_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: bounds
+      LOGICAL(KIND=C_BOOL) :: bounds_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: bounds_name
+      LOGICAL(KIND=C_BOOL) :: bounds_name_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: comment
+      LOGICAL(KIND=C_BOOL) :: comment_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: data_begin
+      LOGICAL(KIND=C_BOOL) :: data_begin_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: data_index
+      LOGICAL(KIND=C_BOOL) :: data_index_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: data_n
+      LOGICAL(KIND=C_BOOL) :: data_n_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: dim_name
+      LOGICAL(KIND=C_BOOL) :: dim_name_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: formula
+      LOGICAL(KIND=C_BOOL) :: formula_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: formula_bounds
+      LOGICAL(KIND=C_BOOL) :: formula_bounds_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: formula_term
+      LOGICAL(KIND=C_BOOL) :: formula_term_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: formula_term_bounds
+      LOGICAL(KIND=C_BOOL) :: formula_term_bounds_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: index
+      LOGICAL(KIND=C_BOOL) :: index_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: label
+      LOGICAL(KIND=C_BOOL) :: label_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: long_name
+      LOGICAL(KIND=C_BOOL) :: long_name_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: mask
+      LOGICAL(KIND=C_BOOL) :: mask_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: n
+      LOGICAL(KIND=C_BOOL) :: n_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: n_distributed_partition
+      LOGICAL(KIND=C_BOOL) :: n_distributed_partition_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: n_glo
+      LOGICAL(KIND=C_BOOL) :: n_glo_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: name
+      LOGICAL(KIND=C_BOOL) :: name_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: positive
+      LOGICAL(KIND=C_BOOL) :: positive_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: prec
+      LOGICAL(KIND=C_BOOL) :: prec_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: standard_name
+      LOGICAL(KIND=C_BOOL) :: standard_name_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: unit
+      LOGICAL(KIND=C_BOOL) :: unit_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: value
+      LOGICAL(KIND=C_BOOL) :: value_tmp
+
+      CALL xios(get_axis_handle) &
+      (axis_id,axis_hdl)
+      CALL xios(is_defined_axis_attr_hdl_)   &
+      ( axis_hdl, axis_ref, axis_type, begin, bounds, bounds_name, comment, data_begin, data_index  &
+      , data_n, dim_name, formula, formula_bounds, formula_term, formula_term_bounds, index, label  &
+      , long_name, mask, n, n_distributed_partition, n_glo, name, positive, prec, standard_name, unit  &
+      , value )
+
+  END SUBROUTINE xios(is_defined_axis_attr)
+
+  SUBROUTINE xios(is_defined_axis_attr_hdl)  &
+    ( axis_hdl, axis_ref, axis_type, begin, bounds, bounds_name, comment, data_begin, data_index  &
+    , data_n, dim_name, formula, formula_bounds, formula_term, formula_term_bounds, index, label  &
+    , long_name, mask, n, n_distributed_partition, n_glo, name, positive, prec, standard_name, unit  &
+    , value )
+
+    IMPLICIT NONE
+      TYPE(txios(axis)) , INTENT(IN) :: axis_hdl
+      LOGICAL, OPTIONAL, INTENT(OUT) :: axis_ref
+      LOGICAL(KIND=C_BOOL) :: axis_ref_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: axis_type
+      LOGICAL(KIND=C_BOOL) :: axis_type_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: begin
+      LOGICAL(KIND=C_BOOL) :: begin_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: bounds
+      LOGICAL(KIND=C_BOOL) :: bounds_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: bounds_name
+      LOGICAL(KIND=C_BOOL) :: bounds_name_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: comment
+      LOGICAL(KIND=C_BOOL) :: comment_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: data_begin
+      LOGICAL(KIND=C_BOOL) :: data_begin_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: data_index
+      LOGICAL(KIND=C_BOOL) :: data_index_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: data_n
+      LOGICAL(KIND=C_BOOL) :: data_n_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: dim_name
+      LOGICAL(KIND=C_BOOL) :: dim_name_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: formula
+      LOGICAL(KIND=C_BOOL) :: formula_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: formula_bounds
+      LOGICAL(KIND=C_BOOL) :: formula_bounds_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: formula_term
+      LOGICAL(KIND=C_BOOL) :: formula_term_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: formula_term_bounds
+      LOGICAL(KIND=C_BOOL) :: formula_term_bounds_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: index
+      LOGICAL(KIND=C_BOOL) :: index_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: label
+      LOGICAL(KIND=C_BOOL) :: label_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: long_name
+      LOGICAL(KIND=C_BOOL) :: long_name_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: mask
+      LOGICAL(KIND=C_BOOL) :: mask_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: n
+      LOGICAL(KIND=C_BOOL) :: n_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: n_distributed_partition
+      LOGICAL(KIND=C_BOOL) :: n_distributed_partition_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: n_glo
+      LOGICAL(KIND=C_BOOL) :: n_glo_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: name
+      LOGICAL(KIND=C_BOOL) :: name_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: positive
+      LOGICAL(KIND=C_BOOL) :: positive_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: prec
+      LOGICAL(KIND=C_BOOL) :: prec_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: standard_name
+      LOGICAL(KIND=C_BOOL) :: standard_name_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: unit
+      LOGICAL(KIND=C_BOOL) :: unit_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: value
+      LOGICAL(KIND=C_BOOL) :: value_tmp
+
+      CALL xios(is_defined_axis_attr_hdl_)  &
+      ( axis_hdl, axis_ref, axis_type, begin, bounds, bounds_name, comment, data_begin, data_index  &
+      , data_n, dim_name, formula, formula_bounds, formula_term, formula_term_bounds, index, label  &
+      , long_name, mask, n, n_distributed_partition, n_glo, name, positive, prec, standard_name, unit  &
+      , value )
+
+  END SUBROUTINE xios(is_defined_axis_attr_hdl)
+
+  SUBROUTINE xios(is_defined_axis_attr_hdl_)   &
+    ( axis_hdl, axis_ref_, axis_type_, begin_, bounds_, bounds_name_, comment_, data_begin_, data_index_  &
+    , data_n_, dim_name_, formula_, formula_bounds_, formula_term_, formula_term_bounds_, index_  &
+    , label_, long_name_, mask_, n_, n_distributed_partition_, n_glo_, name_, positive_, prec_, standard_name_  &
+    , unit_, value_ )
+
+    IMPLICIT NONE
+      TYPE(txios(axis)) , INTENT(IN) :: axis_hdl
+      LOGICAL, OPTIONAL, INTENT(OUT) :: axis_ref_
+      LOGICAL(KIND=C_BOOL) :: axis_ref__tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: axis_type_
+      LOGICAL(KIND=C_BOOL) :: axis_type__tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: begin_
+      LOGICAL(KIND=C_BOOL) :: begin__tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: bounds_
+      LOGICAL(KIND=C_BOOL) :: bounds__tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: bounds_name_
+      LOGICAL(KIND=C_BOOL) :: bounds_name__tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: comment_
+      LOGICAL(KIND=C_BOOL) :: comment__tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: data_begin_
+      LOGICAL(KIND=C_BOOL) :: data_begin__tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: data_index_
+      LOGICAL(KIND=C_BOOL) :: data_index__tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: data_n_
+      LOGICAL(KIND=C_BOOL) :: data_n__tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: dim_name_
+      LOGICAL(KIND=C_BOOL) :: dim_name__tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: formula_
+      LOGICAL(KIND=C_BOOL) :: formula__tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: formula_bounds_
+      LOGICAL(KIND=C_BOOL) :: formula_bounds__tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: formula_term_
+      LOGICAL(KIND=C_BOOL) :: formula_term__tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: formula_term_bounds_
+      LOGICAL(KIND=C_BOOL) :: formula_term_bounds__tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: index_
+      LOGICAL(KIND=C_BOOL) :: index__tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: label_
+      LOGICAL(KIND=C_BOOL) :: label__tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: long_name_
+      LOGICAL(KIND=C_BOOL) :: long_name__tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: mask_
+      LOGICAL(KIND=C_BOOL) :: mask__tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: n_
+      LOGICAL(KIND=C_BOOL) :: n__tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: n_distributed_partition_
+      LOGICAL(KIND=C_BOOL) :: n_distributed_partition__tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: n_glo_
+      LOGICAL(KIND=C_BOOL) :: n_glo__tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: name_
+      LOGICAL(KIND=C_BOOL) :: name__tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: positive_
+      LOGICAL(KIND=C_BOOL) :: positive__tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: prec_
+      LOGICAL(KIND=C_BOOL) :: prec__tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: standard_name_
+      LOGICAL(KIND=C_BOOL) :: standard_name__tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: unit_
+      LOGICAL(KIND=C_BOOL) :: unit__tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: value_
+      LOGICAL(KIND=C_BOOL) :: value__tmp
+
+      IF (PRESENT(axis_ref_)) THEN
+        axis_ref__tmp = cxios_is_defined_axis_axis_ref &
+      (axis_hdl%daddr)
+        axis_ref_ = axis_ref__tmp
+      ENDIF
+
+      IF (PRESENT(axis_type_)) THEN
+        axis_type__tmp = cxios_is_defined_axis_axis_type &
+      (axis_hdl%daddr)
+        axis_type_ = axis_type__tmp
+      ENDIF
+
+      IF (PRESENT(begin_)) THEN
+        begin__tmp = cxios_is_defined_axis_begin &
+      (axis_hdl%daddr)
+        begin_ = begin__tmp
+      ENDIF
+
+      IF (PRESENT(bounds_)) THEN
+        bounds__tmp = cxios_is_defined_axis_bounds &
+      (axis_hdl%daddr)
+        bounds_ = bounds__tmp
+      ENDIF
+
+      IF (PRESENT(bounds_name_)) THEN
+        bounds_name__tmp = cxios_is_defined_axis_bounds_name &
+      (axis_hdl%daddr)
+        bounds_name_ = bounds_name__tmp
+      ENDIF
+
+      IF (PRESENT(comment_)) THEN
+        comment__tmp = cxios_is_defined_axis_comment &
+      (axis_hdl%daddr)
+        comment_ = comment__tmp
+      ENDIF
+
+      IF (PRESENT(data_begin_)) THEN
+        data_begin__tmp = cxios_is_defined_axis_data_begin &
+      (axis_hdl%daddr)
+        data_begin_ = data_begin__tmp
+      ENDIF
+
+      IF (PRESENT(data_index_)) THEN
+        data_index__tmp = cxios_is_defined_axis_data_index &
+      (axis_hdl%daddr)
+        data_index_ = data_index__tmp
+      ENDIF
+
+      IF (PRESENT(data_n_)) THEN
+        data_n__tmp = cxios_is_defined_axis_data_n &
+      (axis_hdl%daddr)
+        data_n_ = data_n__tmp
+      ENDIF
+
+      IF (PRESENT(dim_name_)) THEN
+        dim_name__tmp = cxios_is_defined_axis_dim_name &
+      (axis_hdl%daddr)
+        dim_name_ = dim_name__tmp
+      ENDIF
+
+      IF (PRESENT(formula_)) THEN
+        formula__tmp = cxios_is_defined_axis_formula &
+      (axis_hdl%daddr)
+        formula_ = formula__tmp
+      ENDIF
+
+      IF (PRESENT(formula_bounds_)) THEN
+        formula_bounds__tmp = cxios_is_defined_axis_formula_bounds &
+      (axis_hdl%daddr)
+        formula_bounds_ = formula_bounds__tmp
+      ENDIF
+
+      IF (PRESENT(formula_term_)) THEN
+        formula_term__tmp = cxios_is_defined_axis_formula_term &
+      (axis_hdl%daddr)
+        formula_term_ = formula_term__tmp
+      ENDIF
+
+      IF (PRESENT(formula_term_bounds_)) THEN
+        formula_term_bounds__tmp = cxios_is_defined_axis_formula_term_bounds &
+      (axis_hdl%daddr)
+        formula_term_bounds_ = formula_term_bounds__tmp
+      ENDIF
+
+      IF (PRESENT(index_)) THEN
+        index__tmp = cxios_is_defined_axis_index &
+      (axis_hdl%daddr)
+        index_ = index__tmp
+      ENDIF
+
+      IF (PRESENT(label_)) THEN
+        label__tmp = cxios_is_defined_axis_label &
+      (axis_hdl%daddr)
+        label_ = label__tmp
+      ENDIF
+
+      IF (PRESENT(long_name_)) THEN
+        long_name__tmp = cxios_is_defined_axis_long_name &
+      (axis_hdl%daddr)
+        long_name_ = long_name__tmp
+      ENDIF
+
+      IF (PRESENT(mask_)) THEN
+        mask__tmp = cxios_is_defined_axis_mask &
+      (axis_hdl%daddr)
+        mask_ = mask__tmp
+      ENDIF
+
+      IF (PRESENT(n_)) THEN
+        n__tmp = cxios_is_defined_axis_n &
+      (axis_hdl%daddr)
+        n_ = n__tmp
+      ENDIF
+
+      IF (PRESENT(n_distributed_partition_)) THEN
+        n_distributed_partition__tmp = cxios_is_defined_axis_n_distributed_partition &
+      (axis_hdl%daddr)
+        n_distributed_partition_ = n_distributed_partition__tmp
+      ENDIF
+
+      IF (PRESENT(n_glo_)) THEN
+        n_glo__tmp = cxios_is_defined_axis_n_glo &
+      (axis_hdl%daddr)
+        n_glo_ = n_glo__tmp
+      ENDIF
+
+      IF (PRESENT(name_)) THEN
+        name__tmp = cxios_is_defined_axis_name &
+      (axis_hdl%daddr)
+        name_ = name__tmp
+      ENDIF
+
+      IF (PRESENT(positive_)) THEN
+        positive__tmp = cxios_is_defined_axis_positive &
+      (axis_hdl%daddr)
+        positive_ = positive__tmp
+      ENDIF
+
+      IF (PRESENT(prec_)) THEN
+        prec__tmp = cxios_is_defined_axis_prec &
+      (axis_hdl%daddr)
+        prec_ = prec__tmp
+      ENDIF
+
+      IF (PRESENT(standard_name_)) THEN
+        standard_name__tmp = cxios_is_defined_axis_standard_name &
+      (axis_hdl%daddr)
+        standard_name_ = standard_name__tmp
+      ENDIF
+
+      IF (PRESENT(unit_)) THEN
+        unit__tmp = cxios_is_defined_axis_unit &
+      (axis_hdl%daddr)
+        unit_ = unit__tmp
+      ENDIF
+
+      IF (PRESENT(value_)) THEN
+        value__tmp = cxios_is_defined_axis_value &
+      (axis_hdl%daddr)
+        value_ = value__tmp
+      ENDIF
+
+  END SUBROUTINE xios(is_defined_axis_attr_hdl_)
+
+END MODULE iaxis_attr
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/fortran_attr/iaxisgroup_attr.F90
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/fortran_attr/iaxisgroup_attr.F90	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/fortran_attr/iaxisgroup_attr.F90	(revision 1749)
@@ -0,0 +1,951 @@
+! * ************************************************************************** *
+! *               Interface auto generated - do not modify                     *
+! * ************************************************************************** *
+#include "xios_fortran_prefix.hpp"
+
+MODULE iaxisgroup_attr
+  USE, INTRINSIC :: ISO_C_BINDING
+  USE iaxis
+  USE axisgroup_interface_attr
+
+CONTAINS
+
+  SUBROUTINE xios(set_axisgroup_attr)  &
+    ( axisgroup_id, axis_ref, axis_type, begin, bounds, bounds_name, comment, data_begin, data_index  &
+    , data_n, dim_name, formula, formula_bounds, formula_term, formula_term_bounds, group_ref, index  &
+    , label, long_name, mask, n, n_distributed_partition, n_glo, name, positive, prec, standard_name  &
+    , unit, value )
+
+    IMPLICIT NONE
+      TYPE(txios(axisgroup))  :: axisgroup_hdl
+      CHARACTER(LEN=*), INTENT(IN) ::axisgroup_id
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: axis_ref
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: axis_type
+      INTEGER  , OPTIONAL, INTENT(IN) :: begin
+      REAL (KIND=8) , OPTIONAL, INTENT(IN) :: bounds(:,:)
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: bounds_name
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: comment
+      INTEGER  , OPTIONAL, INTENT(IN) :: data_begin
+      INTEGER  , OPTIONAL, INTENT(IN) :: data_index(:)
+      INTEGER  , OPTIONAL, INTENT(IN) :: data_n
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: dim_name
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: formula
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: formula_bounds
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: formula_term
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: formula_term_bounds
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: group_ref
+      INTEGER  , OPTIONAL, INTENT(IN) :: index(:)
+      CHARACTER(len=*) , OPTIONAL, INTENT(IN) :: label(:)
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: long_name
+      LOGICAL  , OPTIONAL, INTENT(IN) :: mask(:)
+      LOGICAL (KIND=C_BOOL) , ALLOCATABLE :: mask_tmp(:)
+      INTEGER  , OPTIONAL, INTENT(IN) :: n
+      INTEGER  , OPTIONAL, INTENT(IN) :: n_distributed_partition
+      INTEGER  , OPTIONAL, INTENT(IN) :: n_glo
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: name
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: positive
+      INTEGER  , OPTIONAL, INTENT(IN) :: prec
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: standard_name
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: unit
+      REAL (KIND=8) , OPTIONAL, INTENT(IN) :: value(:)
+
+      CALL xios(get_axisgroup_handle) &
+      (axisgroup_id,axisgroup_hdl)
+      CALL xios(set_axisgroup_attr_hdl_)   &
+      ( axisgroup_hdl, axis_ref, axis_type, begin, bounds, bounds_name, comment, data_begin, data_index  &
+      , data_n, dim_name, formula, formula_bounds, formula_term, formula_term_bounds, group_ref, index  &
+      , label, long_name, mask, n, n_distributed_partition, n_glo, name, positive, prec, standard_name  &
+      , unit, value )
+
+  END SUBROUTINE xios(set_axisgroup_attr)
+
+  SUBROUTINE xios(set_axisgroup_attr_hdl)  &
+    ( axisgroup_hdl, axis_ref, axis_type, begin, bounds, bounds_name, comment, data_begin, data_index  &
+    , data_n, dim_name, formula, formula_bounds, formula_term, formula_term_bounds, group_ref, index  &
+    , label, long_name, mask, n, n_distributed_partition, n_glo, name, positive, prec, standard_name  &
+    , unit, value )
+
+    IMPLICIT NONE
+      TYPE(txios(axisgroup)) , INTENT(IN) :: axisgroup_hdl
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: axis_ref
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: axis_type
+      INTEGER  , OPTIONAL, INTENT(IN) :: begin
+      REAL (KIND=8) , OPTIONAL, INTENT(IN) :: bounds(:,:)
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: bounds_name
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: comment
+      INTEGER  , OPTIONAL, INTENT(IN) :: data_begin
+      INTEGER  , OPTIONAL, INTENT(IN) :: data_index(:)
+      INTEGER  , OPTIONAL, INTENT(IN) :: data_n
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: dim_name
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: formula
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: formula_bounds
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: formula_term
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: formula_term_bounds
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: group_ref
+      INTEGER  , OPTIONAL, INTENT(IN) :: index(:)
+      CHARACTER(len=*) , OPTIONAL, INTENT(IN) :: label(:)
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: long_name
+      LOGICAL  , OPTIONAL, INTENT(IN) :: mask(:)
+      LOGICAL (KIND=C_BOOL) , ALLOCATABLE :: mask_tmp(:)
+      INTEGER  , OPTIONAL, INTENT(IN) :: n
+      INTEGER  , OPTIONAL, INTENT(IN) :: n_distributed_partition
+      INTEGER  , OPTIONAL, INTENT(IN) :: n_glo
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: name
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: positive
+      INTEGER  , OPTIONAL, INTENT(IN) :: prec
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: standard_name
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: unit
+      REAL (KIND=8) , OPTIONAL, INTENT(IN) :: value(:)
+
+      CALL xios(set_axisgroup_attr_hdl_)  &
+      ( axisgroup_hdl, axis_ref, axis_type, begin, bounds, bounds_name, comment, data_begin, data_index  &
+      , data_n, dim_name, formula, formula_bounds, formula_term, formula_term_bounds, group_ref, index  &
+      , label, long_name, mask, n, n_distributed_partition, n_glo, name, positive, prec, standard_name  &
+      , unit, value )
+
+  END SUBROUTINE xios(set_axisgroup_attr_hdl)
+
+  SUBROUTINE xios(set_axisgroup_attr_hdl_)   &
+    ( axisgroup_hdl, axis_ref_, axis_type_, begin_, bounds_, bounds_name_, comment_, data_begin_  &
+    , data_index_, data_n_, dim_name_, formula_, formula_bounds_, formula_term_, formula_term_bounds_  &
+    , group_ref_, index_, label_, long_name_, mask_, n_, n_distributed_partition_, n_glo_, name_  &
+    , positive_, prec_, standard_name_, unit_, value_ )
+
+    IMPLICIT NONE
+      TYPE(txios(axisgroup)) , INTENT(IN) :: axisgroup_hdl
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: axis_ref_
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: axis_type_
+      INTEGER  , OPTIONAL, INTENT(IN) :: begin_
+      REAL (KIND=8) , OPTIONAL, INTENT(IN) :: bounds_(:,:)
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: bounds_name_
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: comment_
+      INTEGER  , OPTIONAL, INTENT(IN) :: data_begin_
+      INTEGER  , OPTIONAL, INTENT(IN) :: data_index_(:)
+      INTEGER  , OPTIONAL, INTENT(IN) :: data_n_
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: dim_name_
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: formula_
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: formula_bounds_
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: formula_term_
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: formula_term_bounds_
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: group_ref_
+      INTEGER  , OPTIONAL, INTENT(IN) :: index_(:)
+      CHARACTER(len=*) , OPTIONAL, INTENT(IN) :: label_(:)
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: long_name_
+      LOGICAL  , OPTIONAL, INTENT(IN) :: mask_(:)
+      LOGICAL (KIND=C_BOOL) , ALLOCATABLE :: mask__tmp(:)
+      INTEGER  , OPTIONAL, INTENT(IN) :: n_
+      INTEGER  , OPTIONAL, INTENT(IN) :: n_distributed_partition_
+      INTEGER  , OPTIONAL, INTENT(IN) :: n_glo_
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: name_
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: positive_
+      INTEGER  , OPTIONAL, INTENT(IN) :: prec_
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: standard_name_
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: unit_
+      REAL (KIND=8) , OPTIONAL, INTENT(IN) :: value_(:)
+
+      IF (PRESENT(axis_ref_)) THEN
+        CALL cxios_set_axisgroup_axis_ref &
+      (axisgroup_hdl%daddr, axis_ref_, len(axis_ref_))
+      ENDIF
+
+      IF (PRESENT(axis_type_)) THEN
+        CALL cxios_set_axisgroup_axis_type &
+      (axisgroup_hdl%daddr, axis_type_, len(axis_type_))
+      ENDIF
+
+      IF (PRESENT(begin_)) THEN
+        CALL cxios_set_axisgroup_begin &
+      (axisgroup_hdl%daddr, begin_)
+      ENDIF
+
+      IF (PRESENT(bounds_)) THEN
+        CALL cxios_set_axisgroup_bounds &
+      (axisgroup_hdl%daddr, bounds_, SHAPE(bounds_))
+      ENDIF
+
+      IF (PRESENT(bounds_name_)) THEN
+        CALL cxios_set_axisgroup_bounds_name &
+      (axisgroup_hdl%daddr, bounds_name_, len(bounds_name_))
+      ENDIF
+
+      IF (PRESENT(comment_)) THEN
+        CALL cxios_set_axisgroup_comment &
+      (axisgroup_hdl%daddr, comment_, len(comment_))
+      ENDIF
+
+      IF (PRESENT(data_begin_)) THEN
+        CALL cxios_set_axisgroup_data_begin &
+      (axisgroup_hdl%daddr, data_begin_)
+      ENDIF
+
+      IF (PRESENT(data_index_)) THEN
+        CALL cxios_set_axisgroup_data_index &
+      (axisgroup_hdl%daddr, data_index_, SHAPE(data_index_))
+      ENDIF
+
+      IF (PRESENT(data_n_)) THEN
+        CALL cxios_set_axisgroup_data_n &
+      (axisgroup_hdl%daddr, data_n_)
+      ENDIF
+
+      IF (PRESENT(dim_name_)) THEN
+        CALL cxios_set_axisgroup_dim_name &
+      (axisgroup_hdl%daddr, dim_name_, len(dim_name_))
+      ENDIF
+
+      IF (PRESENT(formula_)) THEN
+        CALL cxios_set_axisgroup_formula &
+      (axisgroup_hdl%daddr, formula_, len(formula_))
+      ENDIF
+
+      IF (PRESENT(formula_bounds_)) THEN
+        CALL cxios_set_axisgroup_formula_bounds &
+      (axisgroup_hdl%daddr, formula_bounds_, len(formula_bounds_))
+      ENDIF
+
+      IF (PRESENT(formula_term_)) THEN
+        CALL cxios_set_axisgroup_formula_term &
+      (axisgroup_hdl%daddr, formula_term_, len(formula_term_))
+      ENDIF
+
+      IF (PRESENT(formula_term_bounds_)) THEN
+        CALL cxios_set_axisgroup_formula_term_bounds &
+      (axisgroup_hdl%daddr, formula_term_bounds_, len(formula_term_bounds_))
+      ENDIF
+
+      IF (PRESENT(group_ref_)) THEN
+        CALL cxios_set_axisgroup_group_ref &
+      (axisgroup_hdl%daddr, group_ref_, len(group_ref_))
+      ENDIF
+
+      IF (PRESENT(index_)) THEN
+        CALL cxios_set_axisgroup_index &
+      (axisgroup_hdl%daddr, index_, SHAPE(index_))
+      ENDIF
+
+      IF (PRESENT(label_)) THEN
+        CALL cxios_set_axisgroup_label &
+      (axisgroup_hdl%daddr, label_, LEN(label_), LEN_TRIM(label_), SHAPE(label_))
+      ENDIF
+
+      IF (PRESENT(long_name_)) THEN
+        CALL cxios_set_axisgroup_long_name &
+      (axisgroup_hdl%daddr, long_name_, len(long_name_))
+      ENDIF
+
+      IF (PRESENT(mask_)) THEN
+        ALLOCATE(mask__tmp(SIZE(mask_,1)))
+        mask__tmp = mask_
+        CALL cxios_set_axisgroup_mask &
+      (axisgroup_hdl%daddr, mask__tmp, SHAPE(mask_))
+      ENDIF
+
+      IF (PRESENT(n_)) THEN
+        CALL cxios_set_axisgroup_n &
+      (axisgroup_hdl%daddr, n_)
+      ENDIF
+
+      IF (PRESENT(n_distributed_partition_)) THEN
+        CALL cxios_set_axisgroup_n_distributed_partition &
+      (axisgroup_hdl%daddr, n_distributed_partition_)
+      ENDIF
+
+      IF (PRESENT(n_glo_)) THEN
+        CALL cxios_set_axisgroup_n_glo &
+      (axisgroup_hdl%daddr, n_glo_)
+      ENDIF
+
+      IF (PRESENT(name_)) THEN
+        CALL cxios_set_axisgroup_name &
+      (axisgroup_hdl%daddr, name_, len(name_))
+      ENDIF
+
+      IF (PRESENT(positive_)) THEN
+        CALL cxios_set_axisgroup_positive &
+      (axisgroup_hdl%daddr, positive_, len(positive_))
+      ENDIF
+
+      IF (PRESENT(prec_)) THEN
+        CALL cxios_set_axisgroup_prec &
+      (axisgroup_hdl%daddr, prec_)
+      ENDIF
+
+      IF (PRESENT(standard_name_)) THEN
+        CALL cxios_set_axisgroup_standard_name &
+      (axisgroup_hdl%daddr, standard_name_, len(standard_name_))
+      ENDIF
+
+      IF (PRESENT(unit_)) THEN
+        CALL cxios_set_axisgroup_unit &
+      (axisgroup_hdl%daddr, unit_, len(unit_))
+      ENDIF
+
+      IF (PRESENT(value_)) THEN
+        CALL cxios_set_axisgroup_value &
+      (axisgroup_hdl%daddr, value_, SHAPE(value_))
+      ENDIF
+
+  END SUBROUTINE xios(set_axisgroup_attr_hdl_)
+
+  SUBROUTINE xios(get_axisgroup_attr)  &
+    ( axisgroup_id, axis_ref, axis_type, begin, bounds, bounds_name, comment, data_begin, data_index  &
+    , data_n, dim_name, formula, formula_bounds, formula_term, formula_term_bounds, group_ref, index  &
+    , label, long_name, mask, n, n_distributed_partition, n_glo, name, positive, prec, standard_name  &
+    , unit, value )
+
+    IMPLICIT NONE
+      TYPE(txios(axisgroup))  :: axisgroup_hdl
+      CHARACTER(LEN=*), INTENT(IN) ::axisgroup_id
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: axis_ref
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: axis_type
+      INTEGER  , OPTIONAL, INTENT(OUT) :: begin
+      REAL (KIND=8) , OPTIONAL, INTENT(OUT) :: bounds(:,:)
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: bounds_name
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: comment
+      INTEGER  , OPTIONAL, INTENT(OUT) :: data_begin
+      INTEGER  , OPTIONAL, INTENT(OUT) :: data_index(:)
+      INTEGER  , OPTIONAL, INTENT(OUT) :: data_n
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: dim_name
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: formula
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: formula_bounds
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: formula_term
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: formula_term_bounds
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: group_ref
+      INTEGER  , OPTIONAL, INTENT(OUT) :: index(:)
+      CHARACTER(len=*) , OPTIONAL, INTENT(OUT) :: label(:)
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: long_name
+      LOGICAL  , OPTIONAL, INTENT(OUT) :: mask(:)
+      LOGICAL (KIND=C_BOOL) , ALLOCATABLE :: mask_tmp(:)
+      INTEGER  , OPTIONAL, INTENT(OUT) :: n
+      INTEGER  , OPTIONAL, INTENT(OUT) :: n_distributed_partition
+      INTEGER  , OPTIONAL, INTENT(OUT) :: n_glo
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: name
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: positive
+      INTEGER  , OPTIONAL, INTENT(OUT) :: prec
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: standard_name
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: unit
+      REAL (KIND=8) , OPTIONAL, INTENT(OUT) :: value(:)
+
+      CALL xios(get_axisgroup_handle) &
+      (axisgroup_id,axisgroup_hdl)
+      CALL xios(get_axisgroup_attr_hdl_)   &
+      ( axisgroup_hdl, axis_ref, axis_type, begin, bounds, bounds_name, comment, data_begin, data_index  &
+      , data_n, dim_name, formula, formula_bounds, formula_term, formula_term_bounds, group_ref, index  &
+      , label, long_name, mask, n, n_distributed_partition, n_glo, name, positive, prec, standard_name  &
+      , unit, value )
+
+  END SUBROUTINE xios(get_axisgroup_attr)
+
+  SUBROUTINE xios(get_axisgroup_attr_hdl)  &
+    ( axisgroup_hdl, axis_ref, axis_type, begin, bounds, bounds_name, comment, data_begin, data_index  &
+    , data_n, dim_name, formula, formula_bounds, formula_term, formula_term_bounds, group_ref, index  &
+    , label, long_name, mask, n, n_distributed_partition, n_glo, name, positive, prec, standard_name  &
+    , unit, value )
+
+    IMPLICIT NONE
+      TYPE(txios(axisgroup)) , INTENT(IN) :: axisgroup_hdl
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: axis_ref
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: axis_type
+      INTEGER  , OPTIONAL, INTENT(OUT) :: begin
+      REAL (KIND=8) , OPTIONAL, INTENT(OUT) :: bounds(:,:)
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: bounds_name
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: comment
+      INTEGER  , OPTIONAL, INTENT(OUT) :: data_begin
+      INTEGER  , OPTIONAL, INTENT(OUT) :: data_index(:)
+      INTEGER  , OPTIONAL, INTENT(OUT) :: data_n
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: dim_name
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: formula
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: formula_bounds
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: formula_term
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: formula_term_bounds
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: group_ref
+      INTEGER  , OPTIONAL, INTENT(OUT) :: index(:)
+      CHARACTER(len=*) , OPTIONAL, INTENT(OUT) :: label(:)
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: long_name
+      LOGICAL  , OPTIONAL, INTENT(OUT) :: mask(:)
+      LOGICAL (KIND=C_BOOL) , ALLOCATABLE :: mask_tmp(:)
+      INTEGER  , OPTIONAL, INTENT(OUT) :: n
+      INTEGER  , OPTIONAL, INTENT(OUT) :: n_distributed_partition
+      INTEGER  , OPTIONAL, INTENT(OUT) :: n_glo
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: name
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: positive
+      INTEGER  , OPTIONAL, INTENT(OUT) :: prec
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: standard_name
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: unit
+      REAL (KIND=8) , OPTIONAL, INTENT(OUT) :: value(:)
+
+      CALL xios(get_axisgroup_attr_hdl_)  &
+      ( axisgroup_hdl, axis_ref, axis_type, begin, bounds, bounds_name, comment, data_begin, data_index  &
+      , data_n, dim_name, formula, formula_bounds, formula_term, formula_term_bounds, group_ref, index  &
+      , label, long_name, mask, n, n_distributed_partition, n_glo, name, positive, prec, standard_name  &
+      , unit, value )
+
+  END SUBROUTINE xios(get_axisgroup_attr_hdl)
+
+  SUBROUTINE xios(get_axisgroup_attr_hdl_)   &
+    ( axisgroup_hdl, axis_ref_, axis_type_, begin_, bounds_, bounds_name_, comment_, data_begin_  &
+    , data_index_, data_n_, dim_name_, formula_, formula_bounds_, formula_term_, formula_term_bounds_  &
+    , group_ref_, index_, label_, long_name_, mask_, n_, n_distributed_partition_, n_glo_, name_  &
+    , positive_, prec_, standard_name_, unit_, value_ )
+
+    IMPLICIT NONE
+      TYPE(txios(axisgroup)) , INTENT(IN) :: axisgroup_hdl
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: axis_ref_
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: axis_type_
+      INTEGER  , OPTIONAL, INTENT(OUT) :: begin_
+      REAL (KIND=8) , OPTIONAL, INTENT(OUT) :: bounds_(:,:)
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: bounds_name_
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: comment_
+      INTEGER  , OPTIONAL, INTENT(OUT) :: data_begin_
+      INTEGER  , OPTIONAL, INTENT(OUT) :: data_index_(:)
+      INTEGER  , OPTIONAL, INTENT(OUT) :: data_n_
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: dim_name_
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: formula_
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: formula_bounds_
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: formula_term_
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: formula_term_bounds_
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: group_ref_
+      INTEGER  , OPTIONAL, INTENT(OUT) :: index_(:)
+      CHARACTER(len=*) , OPTIONAL, INTENT(OUT) :: label_(:)
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: long_name_
+      LOGICAL  , OPTIONAL, INTENT(OUT) :: mask_(:)
+      LOGICAL (KIND=C_BOOL) , ALLOCATABLE :: mask__tmp(:)
+      INTEGER  , OPTIONAL, INTENT(OUT) :: n_
+      INTEGER  , OPTIONAL, INTENT(OUT) :: n_distributed_partition_
+      INTEGER  , OPTIONAL, INTENT(OUT) :: n_glo_
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: name_
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: positive_
+      INTEGER  , OPTIONAL, INTENT(OUT) :: prec_
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: standard_name_
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: unit_
+      REAL (KIND=8) , OPTIONAL, INTENT(OUT) :: value_(:)
+
+      IF (PRESENT(axis_ref_)) THEN
+        CALL cxios_get_axisgroup_axis_ref &
+      (axisgroup_hdl%daddr, axis_ref_, len(axis_ref_))
+      ENDIF
+
+      IF (PRESENT(axis_type_)) THEN
+        CALL cxios_get_axisgroup_axis_type &
+      (axisgroup_hdl%daddr, axis_type_, len(axis_type_))
+      ENDIF
+
+      IF (PRESENT(begin_)) THEN
+        CALL cxios_get_axisgroup_begin &
+      (axisgroup_hdl%daddr, begin_)
+      ENDIF
+
+      IF (PRESENT(bounds_)) THEN
+        CALL cxios_get_axisgroup_bounds &
+      (axisgroup_hdl%daddr, bounds_, SHAPE(bounds_))
+      ENDIF
+
+      IF (PRESENT(bounds_name_)) THEN
+        CALL cxios_get_axisgroup_bounds_name &
+      (axisgroup_hdl%daddr, bounds_name_, len(bounds_name_))
+      ENDIF
+
+      IF (PRESENT(comment_)) THEN
+        CALL cxios_get_axisgroup_comment &
+      (axisgroup_hdl%daddr, comment_, len(comment_))
+      ENDIF
+
+      IF (PRESENT(data_begin_)) THEN
+        CALL cxios_get_axisgroup_data_begin &
+      (axisgroup_hdl%daddr, data_begin_)
+      ENDIF
+
+      IF (PRESENT(data_index_)) THEN
+        CALL cxios_get_axisgroup_data_index &
+      (axisgroup_hdl%daddr, data_index_, SHAPE(data_index_))
+      ENDIF
+
+      IF (PRESENT(data_n_)) THEN
+        CALL cxios_get_axisgroup_data_n &
+      (axisgroup_hdl%daddr, data_n_)
+      ENDIF
+
+      IF (PRESENT(dim_name_)) THEN
+        CALL cxios_get_axisgroup_dim_name &
+      (axisgroup_hdl%daddr, dim_name_, len(dim_name_))
+      ENDIF
+
+      IF (PRESENT(formula_)) THEN
+        CALL cxios_get_axisgroup_formula &
+      (axisgroup_hdl%daddr, formula_, len(formula_))
+      ENDIF
+
+      IF (PRESENT(formula_bounds_)) THEN
+        CALL cxios_get_axisgroup_formula_bounds &
+      (axisgroup_hdl%daddr, formula_bounds_, len(formula_bounds_))
+      ENDIF
+
+      IF (PRESENT(formula_term_)) THEN
+        CALL cxios_get_axisgroup_formula_term &
+      (axisgroup_hdl%daddr, formula_term_, len(formula_term_))
+      ENDIF
+
+      IF (PRESENT(formula_term_bounds_)) THEN
+        CALL cxios_get_axisgroup_formula_term_bounds &
+      (axisgroup_hdl%daddr, formula_term_bounds_, len(formula_term_bounds_))
+      ENDIF
+
+      IF (PRESENT(group_ref_)) THEN
+        CALL cxios_get_axisgroup_group_ref &
+      (axisgroup_hdl%daddr, group_ref_, len(group_ref_))
+      ENDIF
+
+      IF (PRESENT(index_)) THEN
+        CALL cxios_get_axisgroup_index &
+      (axisgroup_hdl%daddr, index_, SHAPE(index_))
+      ENDIF
+
+      IF (PRESENT(label_)) THEN
+        CALL cxios_get_axisgroup_label &
+      (axisgroup_hdl%daddr, label_, LEN(label_), SHAPE(label_))
+      ENDIF
+
+      IF (PRESENT(long_name_)) THEN
+        CALL cxios_get_axisgroup_long_name &
+      (axisgroup_hdl%daddr, long_name_, len(long_name_))
+      ENDIF
+
+      IF (PRESENT(mask_)) THEN
+        ALLOCATE(mask__tmp(SIZE(mask_,1)))
+        CALL cxios_get_axisgroup_mask &
+      (axisgroup_hdl%daddr, mask__tmp, SHAPE(mask_))
+        mask_ = mask__tmp
+      ENDIF
+
+      IF (PRESENT(n_)) THEN
+        CALL cxios_get_axisgroup_n &
+      (axisgroup_hdl%daddr, n_)
+      ENDIF
+
+      IF (PRESENT(n_distributed_partition_)) THEN
+        CALL cxios_get_axisgroup_n_distributed_partition &
+      (axisgroup_hdl%daddr, n_distributed_partition_)
+      ENDIF
+
+      IF (PRESENT(n_glo_)) THEN
+        CALL cxios_get_axisgroup_n_glo &
+      (axisgroup_hdl%daddr, n_glo_)
+      ENDIF
+
+      IF (PRESENT(name_)) THEN
+        CALL cxios_get_axisgroup_name &
+      (axisgroup_hdl%daddr, name_, len(name_))
+      ENDIF
+
+      IF (PRESENT(positive_)) THEN
+        CALL cxios_get_axisgroup_positive &
+      (axisgroup_hdl%daddr, positive_, len(positive_))
+      ENDIF
+
+      IF (PRESENT(prec_)) THEN
+        CALL cxios_get_axisgroup_prec &
+      (axisgroup_hdl%daddr, prec_)
+      ENDIF
+
+      IF (PRESENT(standard_name_)) THEN
+        CALL cxios_get_axisgroup_standard_name &
+      (axisgroup_hdl%daddr, standard_name_, len(standard_name_))
+      ENDIF
+
+      IF (PRESENT(unit_)) THEN
+        CALL cxios_get_axisgroup_unit &
+      (axisgroup_hdl%daddr, unit_, len(unit_))
+      ENDIF
+
+      IF (PRESENT(value_)) THEN
+        CALL cxios_get_axisgroup_value &
+      (axisgroup_hdl%daddr, value_, SHAPE(value_))
+      ENDIF
+
+  END SUBROUTINE xios(get_axisgroup_attr_hdl_)
+
+  SUBROUTINE xios(is_defined_axisgroup_attr)  &
+    ( axisgroup_id, axis_ref, axis_type, begin, bounds, bounds_name, comment, data_begin, data_index  &
+    , data_n, dim_name, formula, formula_bounds, formula_term, formula_term_bounds, group_ref, index  &
+    , label, long_name, mask, n, n_distributed_partition, n_glo, name, positive, prec, standard_name  &
+    , unit, value )
+
+    IMPLICIT NONE
+      TYPE(txios(axisgroup))  :: axisgroup_hdl
+      CHARACTER(LEN=*), INTENT(IN) ::axisgroup_id
+      LOGICAL, OPTIONAL, INTENT(OUT) :: axis_ref
+      LOGICAL(KIND=C_BOOL) :: axis_ref_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: axis_type
+      LOGICAL(KIND=C_BOOL) :: axis_type_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: begin
+      LOGICAL(KIND=C_BOOL) :: begin_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: bounds
+      LOGICAL(KIND=C_BOOL) :: bounds_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: bounds_name
+      LOGICAL(KIND=C_BOOL) :: bounds_name_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: comment
+      LOGICAL(KIND=C_BOOL) :: comment_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: data_begin
+      LOGICAL(KIND=C_BOOL) :: data_begin_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: data_index
+      LOGICAL(KIND=C_BOOL) :: data_index_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: data_n
+      LOGICAL(KIND=C_BOOL) :: data_n_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: dim_name
+      LOGICAL(KIND=C_BOOL) :: dim_name_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: formula
+      LOGICAL(KIND=C_BOOL) :: formula_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: formula_bounds
+      LOGICAL(KIND=C_BOOL) :: formula_bounds_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: formula_term
+      LOGICAL(KIND=C_BOOL) :: formula_term_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: formula_term_bounds
+      LOGICAL(KIND=C_BOOL) :: formula_term_bounds_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: group_ref
+      LOGICAL(KIND=C_BOOL) :: group_ref_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: index
+      LOGICAL(KIND=C_BOOL) :: index_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: label
+      LOGICAL(KIND=C_BOOL) :: label_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: long_name
+      LOGICAL(KIND=C_BOOL) :: long_name_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: mask
+      LOGICAL(KIND=C_BOOL) :: mask_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: n
+      LOGICAL(KIND=C_BOOL) :: n_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: n_distributed_partition
+      LOGICAL(KIND=C_BOOL) :: n_distributed_partition_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: n_glo
+      LOGICAL(KIND=C_BOOL) :: n_glo_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: name
+      LOGICAL(KIND=C_BOOL) :: name_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: positive
+      LOGICAL(KIND=C_BOOL) :: positive_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: prec
+      LOGICAL(KIND=C_BOOL) :: prec_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: standard_name
+      LOGICAL(KIND=C_BOOL) :: standard_name_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: unit
+      LOGICAL(KIND=C_BOOL) :: unit_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: value
+      LOGICAL(KIND=C_BOOL) :: value_tmp
+
+      CALL xios(get_axisgroup_handle) &
+      (axisgroup_id,axisgroup_hdl)
+      CALL xios(is_defined_axisgroup_attr_hdl_)   &
+      ( axisgroup_hdl, axis_ref, axis_type, begin, bounds, bounds_name, comment, data_begin, data_index  &
+      , data_n, dim_name, formula, formula_bounds, formula_term, formula_term_bounds, group_ref, index  &
+      , label, long_name, mask, n, n_distributed_partition, n_glo, name, positive, prec, standard_name  &
+      , unit, value )
+
+  END SUBROUTINE xios(is_defined_axisgroup_attr)
+
+  SUBROUTINE xios(is_defined_axisgroup_attr_hdl)  &
+    ( axisgroup_hdl, axis_ref, axis_type, begin, bounds, bounds_name, comment, data_begin, data_index  &
+    , data_n, dim_name, formula, formula_bounds, formula_term, formula_term_bounds, group_ref, index  &
+    , label, long_name, mask, n, n_distributed_partition, n_glo, name, positive, prec, standard_name  &
+    , unit, value )
+
+    IMPLICIT NONE
+      TYPE(txios(axisgroup)) , INTENT(IN) :: axisgroup_hdl
+      LOGICAL, OPTIONAL, INTENT(OUT) :: axis_ref
+      LOGICAL(KIND=C_BOOL) :: axis_ref_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: axis_type
+      LOGICAL(KIND=C_BOOL) :: axis_type_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: begin
+      LOGICAL(KIND=C_BOOL) :: begin_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: bounds
+      LOGICAL(KIND=C_BOOL) :: bounds_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: bounds_name
+      LOGICAL(KIND=C_BOOL) :: bounds_name_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: comment
+      LOGICAL(KIND=C_BOOL) :: comment_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: data_begin
+      LOGICAL(KIND=C_BOOL) :: data_begin_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: data_index
+      LOGICAL(KIND=C_BOOL) :: data_index_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: data_n
+      LOGICAL(KIND=C_BOOL) :: data_n_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: dim_name
+      LOGICAL(KIND=C_BOOL) :: dim_name_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: formula
+      LOGICAL(KIND=C_BOOL) :: formula_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: formula_bounds
+      LOGICAL(KIND=C_BOOL) :: formula_bounds_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: formula_term
+      LOGICAL(KIND=C_BOOL) :: formula_term_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: formula_term_bounds
+      LOGICAL(KIND=C_BOOL) :: formula_term_bounds_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: group_ref
+      LOGICAL(KIND=C_BOOL) :: group_ref_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: index
+      LOGICAL(KIND=C_BOOL) :: index_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: label
+      LOGICAL(KIND=C_BOOL) :: label_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: long_name
+      LOGICAL(KIND=C_BOOL) :: long_name_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: mask
+      LOGICAL(KIND=C_BOOL) :: mask_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: n
+      LOGICAL(KIND=C_BOOL) :: n_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: n_distributed_partition
+      LOGICAL(KIND=C_BOOL) :: n_distributed_partition_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: n_glo
+      LOGICAL(KIND=C_BOOL) :: n_glo_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: name
+      LOGICAL(KIND=C_BOOL) :: name_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: positive
+      LOGICAL(KIND=C_BOOL) :: positive_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: prec
+      LOGICAL(KIND=C_BOOL) :: prec_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: standard_name
+      LOGICAL(KIND=C_BOOL) :: standard_name_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: unit
+      LOGICAL(KIND=C_BOOL) :: unit_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: value
+      LOGICAL(KIND=C_BOOL) :: value_tmp
+
+      CALL xios(is_defined_axisgroup_attr_hdl_)  &
+      ( axisgroup_hdl, axis_ref, axis_type, begin, bounds, bounds_name, comment, data_begin, data_index  &
+      , data_n, dim_name, formula, formula_bounds, formula_term, formula_term_bounds, group_ref, index  &
+      , label, long_name, mask, n, n_distributed_partition, n_glo, name, positive, prec, standard_name  &
+      , unit, value )
+
+  END SUBROUTINE xios(is_defined_axisgroup_attr_hdl)
+
+  SUBROUTINE xios(is_defined_axisgroup_attr_hdl_)   &
+    ( axisgroup_hdl, axis_ref_, axis_type_, begin_, bounds_, bounds_name_, comment_, data_begin_  &
+    , data_index_, data_n_, dim_name_, formula_, formula_bounds_, formula_term_, formula_term_bounds_  &
+    , group_ref_, index_, label_, long_name_, mask_, n_, n_distributed_partition_, n_glo_, name_  &
+    , positive_, prec_, standard_name_, unit_, value_ )
+
+    IMPLICIT NONE
+      TYPE(txios(axisgroup)) , INTENT(IN) :: axisgroup_hdl
+      LOGICAL, OPTIONAL, INTENT(OUT) :: axis_ref_
+      LOGICAL(KIND=C_BOOL) :: axis_ref__tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: axis_type_
+      LOGICAL(KIND=C_BOOL) :: axis_type__tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: begin_
+      LOGICAL(KIND=C_BOOL) :: begin__tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: bounds_
+      LOGICAL(KIND=C_BOOL) :: bounds__tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: bounds_name_
+      LOGICAL(KIND=C_BOOL) :: bounds_name__tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: comment_
+      LOGICAL(KIND=C_BOOL) :: comment__tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: data_begin_
+      LOGICAL(KIND=C_BOOL) :: data_begin__tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: data_index_
+      LOGICAL(KIND=C_BOOL) :: data_index__tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: data_n_
+      LOGICAL(KIND=C_BOOL) :: data_n__tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: dim_name_
+      LOGICAL(KIND=C_BOOL) :: dim_name__tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: formula_
+      LOGICAL(KIND=C_BOOL) :: formula__tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: formula_bounds_
+      LOGICAL(KIND=C_BOOL) :: formula_bounds__tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: formula_term_
+      LOGICAL(KIND=C_BOOL) :: formula_term__tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: formula_term_bounds_
+      LOGICAL(KIND=C_BOOL) :: formula_term_bounds__tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: group_ref_
+      LOGICAL(KIND=C_BOOL) :: group_ref__tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: index_
+      LOGICAL(KIND=C_BOOL) :: index__tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: label_
+      LOGICAL(KIND=C_BOOL) :: label__tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: long_name_
+      LOGICAL(KIND=C_BOOL) :: long_name__tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: mask_
+      LOGICAL(KIND=C_BOOL) :: mask__tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: n_
+      LOGICAL(KIND=C_BOOL) :: n__tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: n_distributed_partition_
+      LOGICAL(KIND=C_BOOL) :: n_distributed_partition__tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: n_glo_
+      LOGICAL(KIND=C_BOOL) :: n_glo__tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: name_
+      LOGICAL(KIND=C_BOOL) :: name__tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: positive_
+      LOGICAL(KIND=C_BOOL) :: positive__tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: prec_
+      LOGICAL(KIND=C_BOOL) :: prec__tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: standard_name_
+      LOGICAL(KIND=C_BOOL) :: standard_name__tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: unit_
+      LOGICAL(KIND=C_BOOL) :: unit__tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: value_
+      LOGICAL(KIND=C_BOOL) :: value__tmp
+
+      IF (PRESENT(axis_ref_)) THEN
+        axis_ref__tmp = cxios_is_defined_axisgroup_axis_ref &
+      (axisgroup_hdl%daddr)
+        axis_ref_ = axis_ref__tmp
+      ENDIF
+
+      IF (PRESENT(axis_type_)) THEN
+        axis_type__tmp = cxios_is_defined_axisgroup_axis_type &
+      (axisgroup_hdl%daddr)
+        axis_type_ = axis_type__tmp
+      ENDIF
+
+      IF (PRESENT(begin_)) THEN
+        begin__tmp = cxios_is_defined_axisgroup_begin &
+      (axisgroup_hdl%daddr)
+        begin_ = begin__tmp
+      ENDIF
+
+      IF (PRESENT(bounds_)) THEN
+        bounds__tmp = cxios_is_defined_axisgroup_bounds &
+      (axisgroup_hdl%daddr)
+        bounds_ = bounds__tmp
+      ENDIF
+
+      IF (PRESENT(bounds_name_)) THEN
+        bounds_name__tmp = cxios_is_defined_axisgroup_bounds_name &
+      (axisgroup_hdl%daddr)
+        bounds_name_ = bounds_name__tmp
+      ENDIF
+
+      IF (PRESENT(comment_)) THEN
+        comment__tmp = cxios_is_defined_axisgroup_comment &
+      (axisgroup_hdl%daddr)
+        comment_ = comment__tmp
+      ENDIF
+
+      IF (PRESENT(data_begin_)) THEN
+        data_begin__tmp = cxios_is_defined_axisgroup_data_begin &
+      (axisgroup_hdl%daddr)
+        data_begin_ = data_begin__tmp
+      ENDIF
+
+      IF (PRESENT(data_index_)) THEN
+        data_index__tmp = cxios_is_defined_axisgroup_data_index &
+      (axisgroup_hdl%daddr)
+        data_index_ = data_index__tmp
+      ENDIF
+
+      IF (PRESENT(data_n_)) THEN
+        data_n__tmp = cxios_is_defined_axisgroup_data_n &
+      (axisgroup_hdl%daddr)
+        data_n_ = data_n__tmp
+      ENDIF
+
+      IF (PRESENT(dim_name_)) THEN
+        dim_name__tmp = cxios_is_defined_axisgroup_dim_name &
+      (axisgroup_hdl%daddr)
+        dim_name_ = dim_name__tmp
+      ENDIF
+
+      IF (PRESENT(formula_)) THEN
+        formula__tmp = cxios_is_defined_axisgroup_formula &
+      (axisgroup_hdl%daddr)
+        formula_ = formula__tmp
+      ENDIF
+
+      IF (PRESENT(formula_bounds_)) THEN
+        formula_bounds__tmp = cxios_is_defined_axisgroup_formula_bounds &
+      (axisgroup_hdl%daddr)
+        formula_bounds_ = formula_bounds__tmp
+      ENDIF
+
+      IF (PRESENT(formula_term_)) THEN
+        formula_term__tmp = cxios_is_defined_axisgroup_formula_term &
+      (axisgroup_hdl%daddr)
+        formula_term_ = formula_term__tmp
+      ENDIF
+
+      IF (PRESENT(formula_term_bounds_)) THEN
+        formula_term_bounds__tmp = cxios_is_defined_axisgroup_formula_term_bounds &
+      (axisgroup_hdl%daddr)
+        formula_term_bounds_ = formula_term_bounds__tmp
+      ENDIF
+
+      IF (PRESENT(group_ref_)) THEN
+        group_ref__tmp = cxios_is_defined_axisgroup_group_ref &
+      (axisgroup_hdl%daddr)
+        group_ref_ = group_ref__tmp
+      ENDIF
+
+      IF (PRESENT(index_)) THEN
+        index__tmp = cxios_is_defined_axisgroup_index &
+      (axisgroup_hdl%daddr)
+        index_ = index__tmp
+      ENDIF
+
+      IF (PRESENT(label_)) THEN
+        label__tmp = cxios_is_defined_axisgroup_label &
+      (axisgroup_hdl%daddr)
+        label_ = label__tmp
+      ENDIF
+
+      IF (PRESENT(long_name_)) THEN
+        long_name__tmp = cxios_is_defined_axisgroup_long_name &
+      (axisgroup_hdl%daddr)
+        long_name_ = long_name__tmp
+      ENDIF
+
+      IF (PRESENT(mask_)) THEN
+        mask__tmp = cxios_is_defined_axisgroup_mask &
+      (axisgroup_hdl%daddr)
+        mask_ = mask__tmp
+      ENDIF
+
+      IF (PRESENT(n_)) THEN
+        n__tmp = cxios_is_defined_axisgroup_n &
+      (axisgroup_hdl%daddr)
+        n_ = n__tmp
+      ENDIF
+
+      IF (PRESENT(n_distributed_partition_)) THEN
+        n_distributed_partition__tmp = cxios_is_defined_axisgroup_n_distributed_partition &
+      (axisgroup_hdl%daddr)
+        n_distributed_partition_ = n_distributed_partition__tmp
+      ENDIF
+
+      IF (PRESENT(n_glo_)) THEN
+        n_glo__tmp = cxios_is_defined_axisgroup_n_glo &
+      (axisgroup_hdl%daddr)
+        n_glo_ = n_glo__tmp
+      ENDIF
+
+      IF (PRESENT(name_)) THEN
+        name__tmp = cxios_is_defined_axisgroup_name &
+      (axisgroup_hdl%daddr)
+        name_ = name__tmp
+      ENDIF
+
+      IF (PRESENT(positive_)) THEN
+        positive__tmp = cxios_is_defined_axisgroup_positive &
+      (axisgroup_hdl%daddr)
+        positive_ = positive__tmp
+      ENDIF
+
+      IF (PRESENT(prec_)) THEN
+        prec__tmp = cxios_is_defined_axisgroup_prec &
+      (axisgroup_hdl%daddr)
+        prec_ = prec__tmp
+      ENDIF
+
+      IF (PRESENT(standard_name_)) THEN
+        standard_name__tmp = cxios_is_defined_axisgroup_standard_name &
+      (axisgroup_hdl%daddr)
+        standard_name_ = standard_name__tmp
+      ENDIF
+
+      IF (PRESENT(unit_)) THEN
+        unit__tmp = cxios_is_defined_axisgroup_unit &
+      (axisgroup_hdl%daddr)
+        unit_ = unit__tmp
+      ENDIF
+
+      IF (PRESENT(value_)) THEN
+        value__tmp = cxios_is_defined_axisgroup_value &
+      (axisgroup_hdl%daddr)
+        value_ = value__tmp
+      ENDIF
+
+  END SUBROUTINE xios(is_defined_axisgroup_attr_hdl_)
+
+END MODULE iaxisgroup_attr
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/fortran_attr/icalendar_wrapper_attr.F90
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/fortran_attr/icalendar_wrapper_attr.F90	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/fortran_attr/icalendar_wrapper_attr.F90	(revision 1749)
@@ -0,0 +1,435 @@
+! * ************************************************************************** *
+! *               Interface auto generated - do not modify                     *
+! * ************************************************************************** *
+#include "xios_fortran_prefix.hpp"
+
+MODULE icalendar_wrapper_attr
+  USE, INTRINSIC :: ISO_C_BINDING
+  USE icalendar_wrapper
+  USE calendar_wrapper_interface_attr
+
+CONTAINS
+
+  SUBROUTINE xios(set_calendar_wrapper_attr)  &
+    ( calendar_wrapper_id, comment, day_length, leap_year_drift, leap_year_drift_offset, leap_year_month  &
+    , month_lengths, start_date, time_origin, timestep, type, year_length )
+
+    IMPLICIT NONE
+      TYPE(txios(calendar_wrapper))  :: calendar_wrapper_hdl
+      CHARACTER(LEN=*), INTENT(IN) ::calendar_wrapper_id
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: comment
+      INTEGER  , OPTIONAL, INTENT(IN) :: day_length
+      REAL (KIND=8) , OPTIONAL, INTENT(IN) :: leap_year_drift
+      REAL (KIND=8) , OPTIONAL, INTENT(IN) :: leap_year_drift_offset
+      INTEGER  , OPTIONAL, INTENT(IN) :: leap_year_month
+      INTEGER  , OPTIONAL, INTENT(IN) :: month_lengths(:)
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: start_date
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: time_origin
+      TYPE(txios(duration))  , OPTIONAL, INTENT(IN) :: timestep
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: type
+      INTEGER  , OPTIONAL, INTENT(IN) :: year_length
+
+      CALL xios(get_calendar_wrapper_handle) &
+      (calendar_wrapper_id,calendar_wrapper_hdl)
+      CALL xios(set_calendar_wrapper_attr_hdl_)   &
+      ( calendar_wrapper_hdl, comment, day_length, leap_year_drift, leap_year_drift_offset, leap_year_month  &
+      , month_lengths, start_date, time_origin, timestep, type, year_length )
+
+  END SUBROUTINE xios(set_calendar_wrapper_attr)
+
+  SUBROUTINE xios(set_calendar_wrapper_attr_hdl)  &
+    ( calendar_wrapper_hdl, comment, day_length, leap_year_drift, leap_year_drift_offset, leap_year_month  &
+    , month_lengths, start_date, time_origin, timestep, type, year_length )
+
+    IMPLICIT NONE
+      TYPE(txios(calendar_wrapper)) , INTENT(IN) :: calendar_wrapper_hdl
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: comment
+      INTEGER  , OPTIONAL, INTENT(IN) :: day_length
+      REAL (KIND=8) , OPTIONAL, INTENT(IN) :: leap_year_drift
+      REAL (KIND=8) , OPTIONAL, INTENT(IN) :: leap_year_drift_offset
+      INTEGER  , OPTIONAL, INTENT(IN) :: leap_year_month
+      INTEGER  , OPTIONAL, INTENT(IN) :: month_lengths(:)
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: start_date
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: time_origin
+      TYPE(txios(duration))  , OPTIONAL, INTENT(IN) :: timestep
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: type
+      INTEGER  , OPTIONAL, INTENT(IN) :: year_length
+
+      CALL xios(set_calendar_wrapper_attr_hdl_)  &
+      ( calendar_wrapper_hdl, comment, day_length, leap_year_drift, leap_year_drift_offset, leap_year_month  &
+      , month_lengths, start_date, time_origin, timestep, type, year_length )
+
+  END SUBROUTINE xios(set_calendar_wrapper_attr_hdl)
+
+  SUBROUTINE xios(set_calendar_wrapper_attr_hdl_)   &
+    ( calendar_wrapper_hdl, comment_, day_length_, leap_year_drift_, leap_year_drift_offset_, leap_year_month_  &
+    , month_lengths_, start_date_, time_origin_, timestep_, type_, year_length_ )
+
+    IMPLICIT NONE
+      TYPE(txios(calendar_wrapper)) , INTENT(IN) :: calendar_wrapper_hdl
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: comment_
+      INTEGER  , OPTIONAL, INTENT(IN) :: day_length_
+      REAL (KIND=8) , OPTIONAL, INTENT(IN) :: leap_year_drift_
+      REAL (KIND=8) , OPTIONAL, INTENT(IN) :: leap_year_drift_offset_
+      INTEGER  , OPTIONAL, INTENT(IN) :: leap_year_month_
+      INTEGER  , OPTIONAL, INTENT(IN) :: month_lengths_(:)
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: start_date_
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: time_origin_
+      TYPE(txios(duration))  , OPTIONAL, INTENT(IN) :: timestep_
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: type_
+      INTEGER  , OPTIONAL, INTENT(IN) :: year_length_
+
+      IF (PRESENT(comment_)) THEN
+        CALL cxios_set_calendar_wrapper_comment &
+      (calendar_wrapper_hdl%daddr, comment_, len(comment_))
+      ENDIF
+
+      IF (PRESENT(day_length_)) THEN
+        CALL cxios_set_calendar_wrapper_day_length &
+      (calendar_wrapper_hdl%daddr, day_length_)
+      ENDIF
+
+      IF (PRESENT(leap_year_drift_)) THEN
+        CALL cxios_set_calendar_wrapper_leap_year_drift &
+      (calendar_wrapper_hdl%daddr, leap_year_drift_)
+      ENDIF
+
+      IF (PRESENT(leap_year_drift_offset_)) THEN
+        CALL cxios_set_calendar_wrapper_leap_year_drift_offset &
+      (calendar_wrapper_hdl%daddr, leap_year_drift_offset_)
+      ENDIF
+
+      IF (PRESENT(leap_year_month_)) THEN
+        CALL cxios_set_calendar_wrapper_leap_year_month &
+      (calendar_wrapper_hdl%daddr, leap_year_month_)
+      ENDIF
+
+      IF (PRESENT(month_lengths_)) THEN
+        CALL cxios_set_calendar_wrapper_month_lengths &
+      (calendar_wrapper_hdl%daddr, month_lengths_, SHAPE(month_lengths_))
+      ENDIF
+
+      IF (PRESENT(start_date_)) THEN
+        CALL cxios_set_calendar_wrapper_start_date &
+      (calendar_wrapper_hdl%daddr, start_date_, len(start_date_))
+      ENDIF
+
+      IF (PRESENT(time_origin_)) THEN
+        CALL cxios_set_calendar_wrapper_time_origin &
+      (calendar_wrapper_hdl%daddr, time_origin_, len(time_origin_))
+      ENDIF
+
+      IF (PRESENT(timestep_)) THEN
+        CALL cxios_set_calendar_wrapper_timestep &
+      (calendar_wrapper_hdl%daddr, timestep_)
+      ENDIF
+
+      IF (PRESENT(type_)) THEN
+        CALL cxios_set_calendar_wrapper_type &
+      (calendar_wrapper_hdl%daddr, type_, len(type_))
+      ENDIF
+
+      IF (PRESENT(year_length_)) THEN
+        CALL cxios_set_calendar_wrapper_year_length &
+      (calendar_wrapper_hdl%daddr, year_length_)
+      ENDIF
+
+  END SUBROUTINE xios(set_calendar_wrapper_attr_hdl_)
+
+  SUBROUTINE xios(get_calendar_wrapper_attr)  &
+    ( calendar_wrapper_id, comment, day_length, leap_year_drift, leap_year_drift_offset, leap_year_month  &
+    , month_lengths, start_date, time_origin, timestep, type, year_length )
+
+    IMPLICIT NONE
+      TYPE(txios(calendar_wrapper))  :: calendar_wrapper_hdl
+      CHARACTER(LEN=*), INTENT(IN) ::calendar_wrapper_id
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: comment
+      INTEGER  , OPTIONAL, INTENT(OUT) :: day_length
+      REAL (KIND=8) , OPTIONAL, INTENT(OUT) :: leap_year_drift
+      REAL (KIND=8) , OPTIONAL, INTENT(OUT) :: leap_year_drift_offset
+      INTEGER  , OPTIONAL, INTENT(OUT) :: leap_year_month
+      INTEGER  , OPTIONAL, INTENT(OUT) :: month_lengths(:)
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: start_date
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: time_origin
+      TYPE(txios(duration))  , OPTIONAL, INTENT(OUT) :: timestep
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: type
+      INTEGER  , OPTIONAL, INTENT(OUT) :: year_length
+
+      CALL xios(get_calendar_wrapper_handle) &
+      (calendar_wrapper_id,calendar_wrapper_hdl)
+      CALL xios(get_calendar_wrapper_attr_hdl_)   &
+      ( calendar_wrapper_hdl, comment, day_length, leap_year_drift, leap_year_drift_offset, leap_year_month  &
+      , month_lengths, start_date, time_origin, timestep, type, year_length )
+
+  END SUBROUTINE xios(get_calendar_wrapper_attr)
+
+  SUBROUTINE xios(get_calendar_wrapper_attr_hdl)  &
+    ( calendar_wrapper_hdl, comment, day_length, leap_year_drift, leap_year_drift_offset, leap_year_month  &
+    , month_lengths, start_date, time_origin, timestep, type, year_length )
+
+    IMPLICIT NONE
+      TYPE(txios(calendar_wrapper)) , INTENT(IN) :: calendar_wrapper_hdl
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: comment
+      INTEGER  , OPTIONAL, INTENT(OUT) :: day_length
+      REAL (KIND=8) , OPTIONAL, INTENT(OUT) :: leap_year_drift
+      REAL (KIND=8) , OPTIONAL, INTENT(OUT) :: leap_year_drift_offset
+      INTEGER  , OPTIONAL, INTENT(OUT) :: leap_year_month
+      INTEGER  , OPTIONAL, INTENT(OUT) :: month_lengths(:)
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: start_date
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: time_origin
+      TYPE(txios(duration))  , OPTIONAL, INTENT(OUT) :: timestep
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: type
+      INTEGER  , OPTIONAL, INTENT(OUT) :: year_length
+
+      CALL xios(get_calendar_wrapper_attr_hdl_)  &
+      ( calendar_wrapper_hdl, comment, day_length, leap_year_drift, leap_year_drift_offset, leap_year_month  &
+      , month_lengths, start_date, time_origin, timestep, type, year_length )
+
+  END SUBROUTINE xios(get_calendar_wrapper_attr_hdl)
+
+  SUBROUTINE xios(get_calendar_wrapper_attr_hdl_)   &
+    ( calendar_wrapper_hdl, comment_, day_length_, leap_year_drift_, leap_year_drift_offset_, leap_year_month_  &
+    , month_lengths_, start_date_, time_origin_, timestep_, type_, year_length_ )
+
+    IMPLICIT NONE
+      TYPE(txios(calendar_wrapper)) , INTENT(IN) :: calendar_wrapper_hdl
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: comment_
+      INTEGER  , OPTIONAL, INTENT(OUT) :: day_length_
+      REAL (KIND=8) , OPTIONAL, INTENT(OUT) :: leap_year_drift_
+      REAL (KIND=8) , OPTIONAL, INTENT(OUT) :: leap_year_drift_offset_
+      INTEGER  , OPTIONAL, INTENT(OUT) :: leap_year_month_
+      INTEGER  , OPTIONAL, INTENT(OUT) :: month_lengths_(:)
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: start_date_
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: time_origin_
+      TYPE(txios(duration))  , OPTIONAL, INTENT(OUT) :: timestep_
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: type_
+      INTEGER  , OPTIONAL, INTENT(OUT) :: year_length_
+
+      IF (PRESENT(comment_)) THEN
+        CALL cxios_get_calendar_wrapper_comment &
+      (calendar_wrapper_hdl%daddr, comment_, len(comment_))
+      ENDIF
+
+      IF (PRESENT(day_length_)) THEN
+        CALL cxios_get_calendar_wrapper_day_length &
+      (calendar_wrapper_hdl%daddr, day_length_)
+      ENDIF
+
+      IF (PRESENT(leap_year_drift_)) THEN
+        CALL cxios_get_calendar_wrapper_leap_year_drift &
+      (calendar_wrapper_hdl%daddr, leap_year_drift_)
+      ENDIF
+
+      IF (PRESENT(leap_year_drift_offset_)) THEN
+        CALL cxios_get_calendar_wrapper_leap_year_drift_offset &
+      (calendar_wrapper_hdl%daddr, leap_year_drift_offset_)
+      ENDIF
+
+      IF (PRESENT(leap_year_month_)) THEN
+        CALL cxios_get_calendar_wrapper_leap_year_month &
+      (calendar_wrapper_hdl%daddr, leap_year_month_)
+      ENDIF
+
+      IF (PRESENT(month_lengths_)) THEN
+        CALL cxios_get_calendar_wrapper_month_lengths &
+      (calendar_wrapper_hdl%daddr, month_lengths_, SHAPE(month_lengths_))
+      ENDIF
+
+      IF (PRESENT(start_date_)) THEN
+        CALL cxios_get_calendar_wrapper_start_date &
+      (calendar_wrapper_hdl%daddr, start_date_, len(start_date_))
+      ENDIF
+
+      IF (PRESENT(time_origin_)) THEN
+        CALL cxios_get_calendar_wrapper_time_origin &
+      (calendar_wrapper_hdl%daddr, time_origin_, len(time_origin_))
+      ENDIF
+
+      IF (PRESENT(timestep_)) THEN
+        CALL cxios_get_calendar_wrapper_timestep &
+      (calendar_wrapper_hdl%daddr, timestep_)
+      ENDIF
+
+      IF (PRESENT(type_)) THEN
+        CALL cxios_get_calendar_wrapper_type &
+      (calendar_wrapper_hdl%daddr, type_, len(type_))
+      ENDIF
+
+      IF (PRESENT(year_length_)) THEN
+        CALL cxios_get_calendar_wrapper_year_length &
+      (calendar_wrapper_hdl%daddr, year_length_)
+      ENDIF
+
+  END SUBROUTINE xios(get_calendar_wrapper_attr_hdl_)
+
+  SUBROUTINE xios(is_defined_calendar_wrapper_attr)  &
+    ( calendar_wrapper_id, comment, day_length, leap_year_drift, leap_year_drift_offset, leap_year_month  &
+    , month_lengths, start_date, time_origin, timestep, type, year_length )
+
+    IMPLICIT NONE
+      TYPE(txios(calendar_wrapper))  :: calendar_wrapper_hdl
+      CHARACTER(LEN=*), INTENT(IN) ::calendar_wrapper_id
+      LOGICAL, OPTIONAL, INTENT(OUT) :: comment
+      LOGICAL(KIND=C_BOOL) :: comment_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: day_length
+      LOGICAL(KIND=C_BOOL) :: day_length_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: leap_year_drift
+      LOGICAL(KIND=C_BOOL) :: leap_year_drift_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: leap_year_drift_offset
+      LOGICAL(KIND=C_BOOL) :: leap_year_drift_offset_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: leap_year_month
+      LOGICAL(KIND=C_BOOL) :: leap_year_month_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: month_lengths
+      LOGICAL(KIND=C_BOOL) :: month_lengths_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: start_date
+      LOGICAL(KIND=C_BOOL) :: start_date_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: time_origin
+      LOGICAL(KIND=C_BOOL) :: time_origin_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: timestep
+      LOGICAL(KIND=C_BOOL) :: timestep_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: type
+      LOGICAL(KIND=C_BOOL) :: type_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: year_length
+      LOGICAL(KIND=C_BOOL) :: year_length_tmp
+
+      CALL xios(get_calendar_wrapper_handle) &
+      (calendar_wrapper_id,calendar_wrapper_hdl)
+      CALL xios(is_defined_calendar_wrapper_attr_hdl_)   &
+      ( calendar_wrapper_hdl, comment, day_length, leap_year_drift, leap_year_drift_offset, leap_year_month  &
+      , month_lengths, start_date, time_origin, timestep, type, year_length )
+
+  END SUBROUTINE xios(is_defined_calendar_wrapper_attr)
+
+  SUBROUTINE xios(is_defined_calendar_wrapper_attr_hdl)  &
+    ( calendar_wrapper_hdl, comment, day_length, leap_year_drift, leap_year_drift_offset, leap_year_month  &
+    , month_lengths, start_date, time_origin, timestep, type, year_length )
+
+    IMPLICIT NONE
+      TYPE(txios(calendar_wrapper)) , INTENT(IN) :: calendar_wrapper_hdl
+      LOGICAL, OPTIONAL, INTENT(OUT) :: comment
+      LOGICAL(KIND=C_BOOL) :: comment_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: day_length
+      LOGICAL(KIND=C_BOOL) :: day_length_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: leap_year_drift
+      LOGICAL(KIND=C_BOOL) :: leap_year_drift_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: leap_year_drift_offset
+      LOGICAL(KIND=C_BOOL) :: leap_year_drift_offset_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: leap_year_month
+      LOGICAL(KIND=C_BOOL) :: leap_year_month_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: month_lengths
+      LOGICAL(KIND=C_BOOL) :: month_lengths_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: start_date
+      LOGICAL(KIND=C_BOOL) :: start_date_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: time_origin
+      LOGICAL(KIND=C_BOOL) :: time_origin_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: timestep
+      LOGICAL(KIND=C_BOOL) :: timestep_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: type
+      LOGICAL(KIND=C_BOOL) :: type_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: year_length
+      LOGICAL(KIND=C_BOOL) :: year_length_tmp
+
+      CALL xios(is_defined_calendar_wrapper_attr_hdl_)  &
+      ( calendar_wrapper_hdl, comment, day_length, leap_year_drift, leap_year_drift_offset, leap_year_month  &
+      , month_lengths, start_date, time_origin, timestep, type, year_length )
+
+  END SUBROUTINE xios(is_defined_calendar_wrapper_attr_hdl)
+
+  SUBROUTINE xios(is_defined_calendar_wrapper_attr_hdl_)   &
+    ( calendar_wrapper_hdl, comment_, day_length_, leap_year_drift_, leap_year_drift_offset_, leap_year_month_  &
+    , month_lengths_, start_date_, time_origin_, timestep_, type_, year_length_ )
+
+    IMPLICIT NONE
+      TYPE(txios(calendar_wrapper)) , INTENT(IN) :: calendar_wrapper_hdl
+      LOGICAL, OPTIONAL, INTENT(OUT) :: comment_
+      LOGICAL(KIND=C_BOOL) :: comment__tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: day_length_
+      LOGICAL(KIND=C_BOOL) :: day_length__tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: leap_year_drift_
+      LOGICAL(KIND=C_BOOL) :: leap_year_drift__tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: leap_year_drift_offset_
+      LOGICAL(KIND=C_BOOL) :: leap_year_drift_offset__tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: leap_year_month_
+      LOGICAL(KIND=C_BOOL) :: leap_year_month__tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: month_lengths_
+      LOGICAL(KIND=C_BOOL) :: month_lengths__tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: start_date_
+      LOGICAL(KIND=C_BOOL) :: start_date__tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: time_origin_
+      LOGICAL(KIND=C_BOOL) :: time_origin__tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: timestep_
+      LOGICAL(KIND=C_BOOL) :: timestep__tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: type_
+      LOGICAL(KIND=C_BOOL) :: type__tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: year_length_
+      LOGICAL(KIND=C_BOOL) :: year_length__tmp
+
+      IF (PRESENT(comment_)) THEN
+        comment__tmp = cxios_is_defined_calendar_wrapper_comment &
+      (calendar_wrapper_hdl%daddr)
+        comment_ = comment__tmp
+      ENDIF
+
+      IF (PRESENT(day_length_)) THEN
+        day_length__tmp = cxios_is_defined_calendar_wrapper_day_length &
+      (calendar_wrapper_hdl%daddr)
+        day_length_ = day_length__tmp
+      ENDIF
+
+      IF (PRESENT(leap_year_drift_)) THEN
+        leap_year_drift__tmp = cxios_is_defined_calendar_wrapper_leap_year_drift &
+      (calendar_wrapper_hdl%daddr)
+        leap_year_drift_ = leap_year_drift__tmp
+      ENDIF
+
+      IF (PRESENT(leap_year_drift_offset_)) THEN
+        leap_year_drift_offset__tmp = cxios_is_defined_calendar_wrapper_leap_year_drift_offset &
+      (calendar_wrapper_hdl%daddr)
+        leap_year_drift_offset_ = leap_year_drift_offset__tmp
+      ENDIF
+
+      IF (PRESENT(leap_year_month_)) THEN
+        leap_year_month__tmp = cxios_is_defined_calendar_wrapper_leap_year_month &
+      (calendar_wrapper_hdl%daddr)
+        leap_year_month_ = leap_year_month__tmp
+      ENDIF
+
+      IF (PRESENT(month_lengths_)) THEN
+        month_lengths__tmp = cxios_is_defined_calendar_wrapper_month_lengths &
+      (calendar_wrapper_hdl%daddr)
+        month_lengths_ = month_lengths__tmp
+      ENDIF
+
+      IF (PRESENT(start_date_)) THEN
+        start_date__tmp = cxios_is_defined_calendar_wrapper_start_date &
+      (calendar_wrapper_hdl%daddr)
+        start_date_ = start_date__tmp
+      ENDIF
+
+      IF (PRESENT(time_origin_)) THEN
+        time_origin__tmp = cxios_is_defined_calendar_wrapper_time_origin &
+      (calendar_wrapper_hdl%daddr)
+        time_origin_ = time_origin__tmp
+      ENDIF
+
+      IF (PRESENT(timestep_)) THEN
+        timestep__tmp = cxios_is_defined_calendar_wrapper_timestep &
+      (calendar_wrapper_hdl%daddr)
+        timestep_ = timestep__tmp
+      ENDIF
+
+      IF (PRESENT(type_)) THEN
+        type__tmp = cxios_is_defined_calendar_wrapper_type &
+      (calendar_wrapper_hdl%daddr)
+        type_ = type__tmp
+      ENDIF
+
+      IF (PRESENT(year_length_)) THEN
+        year_length__tmp = cxios_is_defined_calendar_wrapper_year_length &
+      (calendar_wrapper_hdl%daddr)
+        year_length_ = year_length__tmp
+      ENDIF
+
+  END SUBROUTINE xios(is_defined_calendar_wrapper_attr_hdl_)
+
+END MODULE icalendar_wrapper_attr
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/fortran_attr/icompute_connectivity_domain_attr.F90
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/fortran_attr/icompute_connectivity_domain_attr.F90	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/fortran_attr/icompute_connectivity_domain_attr.F90	(revision 1749)
@@ -0,0 +1,224 @@
+! * ************************************************************************** *
+! *               Interface auto generated - do not modify                     *
+! * ************************************************************************** *
+#include "xios_fortran_prefix.hpp"
+
+MODULE icompute_connectivity_domain_attr
+  USE, INTRINSIC :: ISO_C_BINDING
+  USE icompute_connectivity_domain
+  USE compute_connectivity_domain_interface_attr
+
+CONTAINS
+
+  SUBROUTINE xios(set_compute_connectivity_domain_attr)  &
+    ( compute_connectivity_domain_id, local_neighbor, n_neighbor, n_neighbor_max, type )
+
+    IMPLICIT NONE
+      TYPE(txios(compute_connectivity_domain))  :: compute_connectivity_domain_hdl
+      CHARACTER(LEN=*), INTENT(IN) ::compute_connectivity_domain_id
+      INTEGER  , OPTIONAL, INTENT(IN) :: local_neighbor(:,:)
+      INTEGER  , OPTIONAL, INTENT(IN) :: n_neighbor(:)
+      INTEGER  , OPTIONAL, INTENT(IN) :: n_neighbor_max
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: type
+
+      CALL xios(get_compute_connectivity_domain_handle) &
+      (compute_connectivity_domain_id,compute_connectivity_domain_hdl)
+      CALL xios(set_compute_connectivity_domain_attr_hdl_)   &
+      ( compute_connectivity_domain_hdl, local_neighbor, n_neighbor, n_neighbor_max, type )
+
+  END SUBROUTINE xios(set_compute_connectivity_domain_attr)
+
+  SUBROUTINE xios(set_compute_connectivity_domain_attr_hdl)  &
+    ( compute_connectivity_domain_hdl, local_neighbor, n_neighbor, n_neighbor_max, type )
+
+    IMPLICIT NONE
+      TYPE(txios(compute_connectivity_domain)) , INTENT(IN) :: compute_connectivity_domain_hdl
+      INTEGER  , OPTIONAL, INTENT(IN) :: local_neighbor(:,:)
+      INTEGER  , OPTIONAL, INTENT(IN) :: n_neighbor(:)
+      INTEGER  , OPTIONAL, INTENT(IN) :: n_neighbor_max
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: type
+
+      CALL xios(set_compute_connectivity_domain_attr_hdl_)  &
+      ( compute_connectivity_domain_hdl, local_neighbor, n_neighbor, n_neighbor_max, type )
+
+  END SUBROUTINE xios(set_compute_connectivity_domain_attr_hdl)
+
+  SUBROUTINE xios(set_compute_connectivity_domain_attr_hdl_)   &
+    ( compute_connectivity_domain_hdl, local_neighbor_, n_neighbor_, n_neighbor_max_, type_ )
+
+    IMPLICIT NONE
+      TYPE(txios(compute_connectivity_domain)) , INTENT(IN) :: compute_connectivity_domain_hdl
+      INTEGER  , OPTIONAL, INTENT(IN) :: local_neighbor_(:,:)
+      INTEGER  , OPTIONAL, INTENT(IN) :: n_neighbor_(:)
+      INTEGER  , OPTIONAL, INTENT(IN) :: n_neighbor_max_
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: type_
+
+      IF (PRESENT(local_neighbor_)) THEN
+        CALL cxios_set_compute_connectivity_domain_local_neighbor &
+      (compute_connectivity_domain_hdl%daddr, local_neighbor_, SHAPE(local_neighbor_))
+      ENDIF
+
+      IF (PRESENT(n_neighbor_)) THEN
+        CALL cxios_set_compute_connectivity_domain_n_neighbor &
+      (compute_connectivity_domain_hdl%daddr, n_neighbor_, SHAPE(n_neighbor_))
+      ENDIF
+
+      IF (PRESENT(n_neighbor_max_)) THEN
+        CALL cxios_set_compute_connectivity_domain_n_neighbor_max &
+      (compute_connectivity_domain_hdl%daddr, n_neighbor_max_)
+      ENDIF
+
+      IF (PRESENT(type_)) THEN
+        CALL cxios_set_compute_connectivity_domain_type &
+      (compute_connectivity_domain_hdl%daddr, type_, len(type_))
+      ENDIF
+
+  END SUBROUTINE xios(set_compute_connectivity_domain_attr_hdl_)
+
+  SUBROUTINE xios(get_compute_connectivity_domain_attr)  &
+    ( compute_connectivity_domain_id, local_neighbor, n_neighbor, n_neighbor_max, type )
+
+    IMPLICIT NONE
+      TYPE(txios(compute_connectivity_domain))  :: compute_connectivity_domain_hdl
+      CHARACTER(LEN=*), INTENT(IN) ::compute_connectivity_domain_id
+      INTEGER  , OPTIONAL, INTENT(OUT) :: local_neighbor(:,:)
+      INTEGER  , OPTIONAL, INTENT(OUT) :: n_neighbor(:)
+      INTEGER  , OPTIONAL, INTENT(OUT) :: n_neighbor_max
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: type
+
+      CALL xios(get_compute_connectivity_domain_handle) &
+      (compute_connectivity_domain_id,compute_connectivity_domain_hdl)
+      CALL xios(get_compute_connectivity_domain_attr_hdl_)   &
+      ( compute_connectivity_domain_hdl, local_neighbor, n_neighbor, n_neighbor_max, type )
+
+  END SUBROUTINE xios(get_compute_connectivity_domain_attr)
+
+  SUBROUTINE xios(get_compute_connectivity_domain_attr_hdl)  &
+    ( compute_connectivity_domain_hdl, local_neighbor, n_neighbor, n_neighbor_max, type )
+
+    IMPLICIT NONE
+      TYPE(txios(compute_connectivity_domain)) , INTENT(IN) :: compute_connectivity_domain_hdl
+      INTEGER  , OPTIONAL, INTENT(OUT) :: local_neighbor(:,:)
+      INTEGER  , OPTIONAL, INTENT(OUT) :: n_neighbor(:)
+      INTEGER  , OPTIONAL, INTENT(OUT) :: n_neighbor_max
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: type
+
+      CALL xios(get_compute_connectivity_domain_attr_hdl_)  &
+      ( compute_connectivity_domain_hdl, local_neighbor, n_neighbor, n_neighbor_max, type )
+
+  END SUBROUTINE xios(get_compute_connectivity_domain_attr_hdl)
+
+  SUBROUTINE xios(get_compute_connectivity_domain_attr_hdl_)   &
+    ( compute_connectivity_domain_hdl, local_neighbor_, n_neighbor_, n_neighbor_max_, type_ )
+
+    IMPLICIT NONE
+      TYPE(txios(compute_connectivity_domain)) , INTENT(IN) :: compute_connectivity_domain_hdl
+      INTEGER  , OPTIONAL, INTENT(OUT) :: local_neighbor_(:,:)
+      INTEGER  , OPTIONAL, INTENT(OUT) :: n_neighbor_(:)
+      INTEGER  , OPTIONAL, INTENT(OUT) :: n_neighbor_max_
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: type_
+
+      IF (PRESENT(local_neighbor_)) THEN
+        CALL cxios_get_compute_connectivity_domain_local_neighbor &
+      (compute_connectivity_domain_hdl%daddr, local_neighbor_, SHAPE(local_neighbor_))
+      ENDIF
+
+      IF (PRESENT(n_neighbor_)) THEN
+        CALL cxios_get_compute_connectivity_domain_n_neighbor &
+      (compute_connectivity_domain_hdl%daddr, n_neighbor_, SHAPE(n_neighbor_))
+      ENDIF
+
+      IF (PRESENT(n_neighbor_max_)) THEN
+        CALL cxios_get_compute_connectivity_domain_n_neighbor_max &
+      (compute_connectivity_domain_hdl%daddr, n_neighbor_max_)
+      ENDIF
+
+      IF (PRESENT(type_)) THEN
+        CALL cxios_get_compute_connectivity_domain_type &
+      (compute_connectivity_domain_hdl%daddr, type_, len(type_))
+      ENDIF
+
+  END SUBROUTINE xios(get_compute_connectivity_domain_attr_hdl_)
+
+  SUBROUTINE xios(is_defined_compute_connectivity_domain_attr)  &
+    ( compute_connectivity_domain_id, local_neighbor, n_neighbor, n_neighbor_max, type )
+
+    IMPLICIT NONE
+      TYPE(txios(compute_connectivity_domain))  :: compute_connectivity_domain_hdl
+      CHARACTER(LEN=*), INTENT(IN) ::compute_connectivity_domain_id
+      LOGICAL, OPTIONAL, INTENT(OUT) :: local_neighbor
+      LOGICAL(KIND=C_BOOL) :: local_neighbor_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: n_neighbor
+      LOGICAL(KIND=C_BOOL) :: n_neighbor_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: n_neighbor_max
+      LOGICAL(KIND=C_BOOL) :: n_neighbor_max_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: type
+      LOGICAL(KIND=C_BOOL) :: type_tmp
+
+      CALL xios(get_compute_connectivity_domain_handle) &
+      (compute_connectivity_domain_id,compute_connectivity_domain_hdl)
+      CALL xios(is_defined_compute_connectivity_domain_attr_hdl_)   &
+      ( compute_connectivity_domain_hdl, local_neighbor, n_neighbor, n_neighbor_max, type )
+
+  END SUBROUTINE xios(is_defined_compute_connectivity_domain_attr)
+
+  SUBROUTINE xios(is_defined_compute_connectivity_domain_attr_hdl)  &
+    ( compute_connectivity_domain_hdl, local_neighbor, n_neighbor, n_neighbor_max, type )
+
+    IMPLICIT NONE
+      TYPE(txios(compute_connectivity_domain)) , INTENT(IN) :: compute_connectivity_domain_hdl
+      LOGICAL, OPTIONAL, INTENT(OUT) :: local_neighbor
+      LOGICAL(KIND=C_BOOL) :: local_neighbor_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: n_neighbor
+      LOGICAL(KIND=C_BOOL) :: n_neighbor_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: n_neighbor_max
+      LOGICAL(KIND=C_BOOL) :: n_neighbor_max_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: type
+      LOGICAL(KIND=C_BOOL) :: type_tmp
+
+      CALL xios(is_defined_compute_connectivity_domain_attr_hdl_)  &
+      ( compute_connectivity_domain_hdl, local_neighbor, n_neighbor, n_neighbor_max, type )
+
+  END SUBROUTINE xios(is_defined_compute_connectivity_domain_attr_hdl)
+
+  SUBROUTINE xios(is_defined_compute_connectivity_domain_attr_hdl_)   &
+    ( compute_connectivity_domain_hdl, local_neighbor_, n_neighbor_, n_neighbor_max_, type_ )
+
+    IMPLICIT NONE
+      TYPE(txios(compute_connectivity_domain)) , INTENT(IN) :: compute_connectivity_domain_hdl
+      LOGICAL, OPTIONAL, INTENT(OUT) :: local_neighbor_
+      LOGICAL(KIND=C_BOOL) :: local_neighbor__tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: n_neighbor_
+      LOGICAL(KIND=C_BOOL) :: n_neighbor__tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: n_neighbor_max_
+      LOGICAL(KIND=C_BOOL) :: n_neighbor_max__tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: type_
+      LOGICAL(KIND=C_BOOL) :: type__tmp
+
+      IF (PRESENT(local_neighbor_)) THEN
+        local_neighbor__tmp = cxios_is_defined_compute_connectivity_domain_local_neighbor &
+      (compute_connectivity_domain_hdl%daddr)
+        local_neighbor_ = local_neighbor__tmp
+      ENDIF
+
+      IF (PRESENT(n_neighbor_)) THEN
+        n_neighbor__tmp = cxios_is_defined_compute_connectivity_domain_n_neighbor &
+      (compute_connectivity_domain_hdl%daddr)
+        n_neighbor_ = n_neighbor__tmp
+      ENDIF
+
+      IF (PRESENT(n_neighbor_max_)) THEN
+        n_neighbor_max__tmp = cxios_is_defined_compute_connectivity_domain_n_neighbor_max &
+      (compute_connectivity_domain_hdl%daddr)
+        n_neighbor_max_ = n_neighbor_max__tmp
+      ENDIF
+
+      IF (PRESENT(type_)) THEN
+        type__tmp = cxios_is_defined_compute_connectivity_domain_type &
+      (compute_connectivity_domain_hdl%daddr)
+        type_ = type__tmp
+      ENDIF
+
+  END SUBROUTINE xios(is_defined_compute_connectivity_domain_attr_hdl_)
+
+END MODULE icompute_connectivity_domain_attr
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/fortran_attr/icontext_attr.F90
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/fortran_attr/icontext_attr.F90	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/fortran_attr/icontext_attr.F90	(revision 1749)
@@ -0,0 +1,140 @@
+! * ************************************************************************** *
+! *               Interface auto generated - do not modify                     *
+! * ************************************************************************** *
+#include "xios_fortran_prefix.hpp"
+
+MODULE icontext_attr
+  USE, INTRINSIC :: ISO_C_BINDING
+  USE icontext
+  USE context_interface_attr
+
+CONTAINS
+
+  SUBROUTINE xios(set_context_attr)  &
+    ( context_id, output_dir )
+
+    IMPLICIT NONE
+      TYPE(txios(context))  :: context_hdl
+      CHARACTER(LEN=*), INTENT(IN) ::context_id
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: output_dir
+
+      CALL xios(get_context_handle) &
+      (context_id,context_hdl)
+      CALL xios(set_context_attr_hdl_)   &
+      ( context_hdl, output_dir )
+
+  END SUBROUTINE xios(set_context_attr)
+
+  SUBROUTINE xios(set_context_attr_hdl)  &
+    ( context_hdl, output_dir )
+
+    IMPLICIT NONE
+      TYPE(txios(context)) , INTENT(IN) :: context_hdl
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: output_dir
+
+      CALL xios(set_context_attr_hdl_)  &
+      ( context_hdl, output_dir )
+
+  END SUBROUTINE xios(set_context_attr_hdl)
+
+  SUBROUTINE xios(set_context_attr_hdl_)   &
+    ( context_hdl, output_dir_ )
+
+    IMPLICIT NONE
+      TYPE(txios(context)) , INTENT(IN) :: context_hdl
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: output_dir_
+
+      IF (PRESENT(output_dir_)) THEN
+        CALL cxios_set_context_output_dir &
+      (context_hdl%daddr, output_dir_, len(output_dir_))
+      ENDIF
+
+  END SUBROUTINE xios(set_context_attr_hdl_)
+
+  SUBROUTINE xios(get_context_attr)  &
+    ( context_id, output_dir )
+
+    IMPLICIT NONE
+      TYPE(txios(context))  :: context_hdl
+      CHARACTER(LEN=*), INTENT(IN) ::context_id
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: output_dir
+
+      CALL xios(get_context_handle) &
+      (context_id,context_hdl)
+      CALL xios(get_context_attr_hdl_)   &
+      ( context_hdl, output_dir )
+
+  END SUBROUTINE xios(get_context_attr)
+
+  SUBROUTINE xios(get_context_attr_hdl)  &
+    ( context_hdl, output_dir )
+
+    IMPLICIT NONE
+      TYPE(txios(context)) , INTENT(IN) :: context_hdl
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: output_dir
+
+      CALL xios(get_context_attr_hdl_)  &
+      ( context_hdl, output_dir )
+
+  END SUBROUTINE xios(get_context_attr_hdl)
+
+  SUBROUTINE xios(get_context_attr_hdl_)   &
+    ( context_hdl, output_dir_ )
+
+    IMPLICIT NONE
+      TYPE(txios(context)) , INTENT(IN) :: context_hdl
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: output_dir_
+
+      IF (PRESENT(output_dir_)) THEN
+        CALL cxios_get_context_output_dir &
+      (context_hdl%daddr, output_dir_, len(output_dir_))
+      ENDIF
+
+  END SUBROUTINE xios(get_context_attr_hdl_)
+
+  SUBROUTINE xios(is_defined_context_attr)  &
+    ( context_id, output_dir )
+
+    IMPLICIT NONE
+      TYPE(txios(context))  :: context_hdl
+      CHARACTER(LEN=*), INTENT(IN) ::context_id
+      LOGICAL, OPTIONAL, INTENT(OUT) :: output_dir
+      LOGICAL(KIND=C_BOOL) :: output_dir_tmp
+
+      CALL xios(get_context_handle) &
+      (context_id,context_hdl)
+      CALL xios(is_defined_context_attr_hdl_)   &
+      ( context_hdl, output_dir )
+
+  END SUBROUTINE xios(is_defined_context_attr)
+
+  SUBROUTINE xios(is_defined_context_attr_hdl)  &
+    ( context_hdl, output_dir )
+
+    IMPLICIT NONE
+      TYPE(txios(context)) , INTENT(IN) :: context_hdl
+      LOGICAL, OPTIONAL, INTENT(OUT) :: output_dir
+      LOGICAL(KIND=C_BOOL) :: output_dir_tmp
+
+      CALL xios(is_defined_context_attr_hdl_)  &
+      ( context_hdl, output_dir )
+
+  END SUBROUTINE xios(is_defined_context_attr_hdl)
+
+  SUBROUTINE xios(is_defined_context_attr_hdl_)   &
+    ( context_hdl, output_dir_ )
+
+    IMPLICIT NONE
+      TYPE(txios(context)) , INTENT(IN) :: context_hdl
+      LOGICAL, OPTIONAL, INTENT(OUT) :: output_dir_
+      LOGICAL(KIND=C_BOOL) :: output_dir__tmp
+
+      IF (PRESENT(output_dir_)) THEN
+        output_dir__tmp = cxios_is_defined_context_output_dir &
+      (context_hdl%daddr)
+        output_dir_ = output_dir__tmp
+      ENDIF
+
+  END SUBROUTINE xios(is_defined_context_attr_hdl_)
+
+END MODULE icontext_attr
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/fortran_attr/idomain_attr.F90
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/fortran_attr/idomain_attr.F90	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/fortran_attr/idomain_attr.F90	(revision 1749)
@@ -0,0 +1,1343 @@
+! * ************************************************************************** *
+! *               Interface auto generated - do not modify                     *
+! * ************************************************************************** *
+#include "xios_fortran_prefix.hpp"
+
+MODULE idomain_attr
+  USE, INTRINSIC :: ISO_C_BINDING
+  USE idomain
+  USE domain_interface_attr
+
+CONTAINS
+
+  SUBROUTINE xios(set_domain_attr)  &
+    ( domain_id, area, bounds_lat_1d, bounds_lat_2d, bounds_lat_name, bounds_lon_1d, bounds_lon_2d  &
+    , bounds_lon_name, comment, data_dim, data_i_index, data_ibegin, data_j_index, data_jbegin, data_ni  &
+    , data_nj, dim_i_name, dim_j_name, domain_ref, i_index, ibegin, j_index, jbegin, lat_name, latvalue_1d  &
+    , latvalue_2d, lon_name, long_name, lonvalue_1d, lonvalue_2d, mask_1d, mask_2d, name, ni, ni_glo  &
+    , nj, nj_glo, nvertex, prec, radius, standard_name, type )
+
+    IMPLICIT NONE
+      TYPE(txios(domain))  :: domain_hdl
+      CHARACTER(LEN=*), INTENT(IN) ::domain_id
+      REAL (KIND=8) , OPTIONAL, INTENT(IN) :: area(:,:)
+      REAL (KIND=8) , OPTIONAL, INTENT(IN) :: bounds_lat_1d(:,:)
+      REAL (KIND=8) , OPTIONAL, INTENT(IN) :: bounds_lat_2d(:,:,:)
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: bounds_lat_name
+      REAL (KIND=8) , OPTIONAL, INTENT(IN) :: bounds_lon_1d(:,:)
+      REAL (KIND=8) , OPTIONAL, INTENT(IN) :: bounds_lon_2d(:,:,:)
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: bounds_lon_name
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: comment
+      INTEGER  , OPTIONAL, INTENT(IN) :: data_dim
+      INTEGER  , OPTIONAL, INTENT(IN) :: data_i_index(:)
+      INTEGER  , OPTIONAL, INTENT(IN) :: data_ibegin
+      INTEGER  , OPTIONAL, INTENT(IN) :: data_j_index(:)
+      INTEGER  , OPTIONAL, INTENT(IN) :: data_jbegin
+      INTEGER  , OPTIONAL, INTENT(IN) :: data_ni
+      INTEGER  , OPTIONAL, INTENT(IN) :: data_nj
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: dim_i_name
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: dim_j_name
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: domain_ref
+      INTEGER  , OPTIONAL, INTENT(IN) :: i_index(:)
+      INTEGER  , OPTIONAL, INTENT(IN) :: ibegin
+      INTEGER  , OPTIONAL, INTENT(IN) :: j_index(:)
+      INTEGER  , OPTIONAL, INTENT(IN) :: jbegin
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: lat_name
+      REAL (KIND=8) , OPTIONAL, INTENT(IN) :: latvalue_1d(:)
+      REAL (KIND=8) , OPTIONAL, INTENT(IN) :: latvalue_2d(:,:)
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: lon_name
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: long_name
+      REAL (KIND=8) , OPTIONAL, INTENT(IN) :: lonvalue_1d(:)
+      REAL (KIND=8) , OPTIONAL, INTENT(IN) :: lonvalue_2d(:,:)
+      LOGICAL  , OPTIONAL, INTENT(IN) :: mask_1d(:)
+      LOGICAL (KIND=C_BOOL) , ALLOCATABLE :: mask_1d_tmp(:)
+      LOGICAL  , OPTIONAL, INTENT(IN) :: mask_2d(:,:)
+      LOGICAL (KIND=C_BOOL) , ALLOCATABLE :: mask_2d_tmp(:,:)
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: name
+      INTEGER  , OPTIONAL, INTENT(IN) :: ni
+      INTEGER  , OPTIONAL, INTENT(IN) :: ni_glo
+      INTEGER  , OPTIONAL, INTENT(IN) :: nj
+      INTEGER  , OPTIONAL, INTENT(IN) :: nj_glo
+      INTEGER  , OPTIONAL, INTENT(IN) :: nvertex
+      INTEGER  , OPTIONAL, INTENT(IN) :: prec
+      REAL (KIND=8) , OPTIONAL, INTENT(IN) :: radius
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: standard_name
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: type
+
+      CALL xios(get_domain_handle) &
+      (domain_id,domain_hdl)
+      CALL xios(set_domain_attr_hdl_)   &
+      ( domain_hdl, area, bounds_lat_1d, bounds_lat_2d, bounds_lat_name, bounds_lon_1d, bounds_lon_2d  &
+      , bounds_lon_name, comment, data_dim, data_i_index, data_ibegin, data_j_index, data_jbegin, data_ni  &
+      , data_nj, dim_i_name, dim_j_name, domain_ref, i_index, ibegin, j_index, jbegin, lat_name, latvalue_1d  &
+      , latvalue_2d, lon_name, long_name, lonvalue_1d, lonvalue_2d, mask_1d, mask_2d, name, ni, ni_glo  &
+      , nj, nj_glo, nvertex, prec, radius, standard_name, type )
+
+  END SUBROUTINE xios(set_domain_attr)
+
+  SUBROUTINE xios(set_domain_attr_hdl)  &
+    ( domain_hdl, area, bounds_lat_1d, bounds_lat_2d, bounds_lat_name, bounds_lon_1d, bounds_lon_2d  &
+    , bounds_lon_name, comment, data_dim, data_i_index, data_ibegin, data_j_index, data_jbegin, data_ni  &
+    , data_nj, dim_i_name, dim_j_name, domain_ref, i_index, ibegin, j_index, jbegin, lat_name, latvalue_1d  &
+    , latvalue_2d, lon_name, long_name, lonvalue_1d, lonvalue_2d, mask_1d, mask_2d, name, ni, ni_glo  &
+    , nj, nj_glo, nvertex, prec, radius, standard_name, type )
+
+    IMPLICIT NONE
+      TYPE(txios(domain)) , INTENT(IN) :: domain_hdl
+      REAL (KIND=8) , OPTIONAL, INTENT(IN) :: area(:,:)
+      REAL (KIND=8) , OPTIONAL, INTENT(IN) :: bounds_lat_1d(:,:)
+      REAL (KIND=8) , OPTIONAL, INTENT(IN) :: bounds_lat_2d(:,:,:)
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: bounds_lat_name
+      REAL (KIND=8) , OPTIONAL, INTENT(IN) :: bounds_lon_1d(:,:)
+      REAL (KIND=8) , OPTIONAL, INTENT(IN) :: bounds_lon_2d(:,:,:)
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: bounds_lon_name
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: comment
+      INTEGER  , OPTIONAL, INTENT(IN) :: data_dim
+      INTEGER  , OPTIONAL, INTENT(IN) :: data_i_index(:)
+      INTEGER  , OPTIONAL, INTENT(IN) :: data_ibegin
+      INTEGER  , OPTIONAL, INTENT(IN) :: data_j_index(:)
+      INTEGER  , OPTIONAL, INTENT(IN) :: data_jbegin
+      INTEGER  , OPTIONAL, INTENT(IN) :: data_ni
+      INTEGER  , OPTIONAL, INTENT(IN) :: data_nj
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: dim_i_name
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: dim_j_name
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: domain_ref
+      INTEGER  , OPTIONAL, INTENT(IN) :: i_index(:)
+      INTEGER  , OPTIONAL, INTENT(IN) :: ibegin
+      INTEGER  , OPTIONAL, INTENT(IN) :: j_index(:)
+      INTEGER  , OPTIONAL, INTENT(IN) :: jbegin
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: lat_name
+      REAL (KIND=8) , OPTIONAL, INTENT(IN) :: latvalue_1d(:)
+      REAL (KIND=8) , OPTIONAL, INTENT(IN) :: latvalue_2d(:,:)
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: lon_name
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: long_name
+      REAL (KIND=8) , OPTIONAL, INTENT(IN) :: lonvalue_1d(:)
+      REAL (KIND=8) , OPTIONAL, INTENT(IN) :: lonvalue_2d(:,:)
+      LOGICAL  , OPTIONAL, INTENT(IN) :: mask_1d(:)
+      LOGICAL (KIND=C_BOOL) , ALLOCATABLE :: mask_1d_tmp(:)
+      LOGICAL  , OPTIONAL, INTENT(IN) :: mask_2d(:,:)
+      LOGICAL (KIND=C_BOOL) , ALLOCATABLE :: mask_2d_tmp(:,:)
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: name
+      INTEGER  , OPTIONAL, INTENT(IN) :: ni
+      INTEGER  , OPTIONAL, INTENT(IN) :: ni_glo
+      INTEGER  , OPTIONAL, INTENT(IN) :: nj
+      INTEGER  , OPTIONAL, INTENT(IN) :: nj_glo
+      INTEGER  , OPTIONAL, INTENT(IN) :: nvertex
+      INTEGER  , OPTIONAL, INTENT(IN) :: prec
+      REAL (KIND=8) , OPTIONAL, INTENT(IN) :: radius
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: standard_name
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: type
+
+      CALL xios(set_domain_attr_hdl_)  &
+      ( domain_hdl, area, bounds_lat_1d, bounds_lat_2d, bounds_lat_name, bounds_lon_1d, bounds_lon_2d  &
+      , bounds_lon_name, comment, data_dim, data_i_index, data_ibegin, data_j_index, data_jbegin, data_ni  &
+      , data_nj, dim_i_name, dim_j_name, domain_ref, i_index, ibegin, j_index, jbegin, lat_name, latvalue_1d  &
+      , latvalue_2d, lon_name, long_name, lonvalue_1d, lonvalue_2d, mask_1d, mask_2d, name, ni, ni_glo  &
+      , nj, nj_glo, nvertex, prec, radius, standard_name, type )
+
+  END SUBROUTINE xios(set_domain_attr_hdl)
+
+  SUBROUTINE xios(set_domain_attr_hdl_)   &
+    ( domain_hdl, area_, bounds_lat_1d_, bounds_lat_2d_, bounds_lat_name_, bounds_lon_1d_, bounds_lon_2d_  &
+    , bounds_lon_name_, comment_, data_dim_, data_i_index_, data_ibegin_, data_j_index_, data_jbegin_  &
+    , data_ni_, data_nj_, dim_i_name_, dim_j_name_, domain_ref_, i_index_, ibegin_, j_index_, jbegin_  &
+    , lat_name_, latvalue_1d_, latvalue_2d_, lon_name_, long_name_, lonvalue_1d_, lonvalue_2d_, mask_1d_  &
+    , mask_2d_, name_, ni_, ni_glo_, nj_, nj_glo_, nvertex_, prec_, radius_, standard_name_, type_  &
+     )
+
+    IMPLICIT NONE
+      TYPE(txios(domain)) , INTENT(IN) :: domain_hdl
+      REAL (KIND=8) , OPTIONAL, INTENT(IN) :: area_(:,:)
+      REAL (KIND=8) , OPTIONAL, INTENT(IN) :: bounds_lat_1d_(:,:)
+      REAL (KIND=8) , OPTIONAL, INTENT(IN) :: bounds_lat_2d_(:,:,:)
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: bounds_lat_name_
+      REAL (KIND=8) , OPTIONAL, INTENT(IN) :: bounds_lon_1d_(:,:)
+      REAL (KIND=8) , OPTIONAL, INTENT(IN) :: bounds_lon_2d_(:,:,:)
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: bounds_lon_name_
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: comment_
+      INTEGER  , OPTIONAL, INTENT(IN) :: data_dim_
+      INTEGER  , OPTIONAL, INTENT(IN) :: data_i_index_(:)
+      INTEGER  , OPTIONAL, INTENT(IN) :: data_ibegin_
+      INTEGER  , OPTIONAL, INTENT(IN) :: data_j_index_(:)
+      INTEGER  , OPTIONAL, INTENT(IN) :: data_jbegin_
+      INTEGER  , OPTIONAL, INTENT(IN) :: data_ni_
+      INTEGER  , OPTIONAL, INTENT(IN) :: data_nj_
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: dim_i_name_
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: dim_j_name_
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: domain_ref_
+      INTEGER  , OPTIONAL, INTENT(IN) :: i_index_(:)
+      INTEGER  , OPTIONAL, INTENT(IN) :: ibegin_
+      INTEGER  , OPTIONAL, INTENT(IN) :: j_index_(:)
+      INTEGER  , OPTIONAL, INTENT(IN) :: jbegin_
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: lat_name_
+      REAL (KIND=8) , OPTIONAL, INTENT(IN) :: latvalue_1d_(:)
+      REAL (KIND=8) , OPTIONAL, INTENT(IN) :: latvalue_2d_(:,:)
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: lon_name_
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: long_name_
+      REAL (KIND=8) , OPTIONAL, INTENT(IN) :: lonvalue_1d_(:)
+      REAL (KIND=8) , OPTIONAL, INTENT(IN) :: lonvalue_2d_(:,:)
+      LOGICAL  , OPTIONAL, INTENT(IN) :: mask_1d_(:)
+      LOGICAL (KIND=C_BOOL) , ALLOCATABLE :: mask_1d__tmp(:)
+      LOGICAL  , OPTIONAL, INTENT(IN) :: mask_2d_(:,:)
+      LOGICAL (KIND=C_BOOL) , ALLOCATABLE :: mask_2d__tmp(:,:)
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: name_
+      INTEGER  , OPTIONAL, INTENT(IN) :: ni_
+      INTEGER  , OPTIONAL, INTENT(IN) :: ni_glo_
+      INTEGER  , OPTIONAL, INTENT(IN) :: nj_
+      INTEGER  , OPTIONAL, INTENT(IN) :: nj_glo_
+      INTEGER  , OPTIONAL, INTENT(IN) :: nvertex_
+      INTEGER  , OPTIONAL, INTENT(IN) :: prec_
+      REAL (KIND=8) , OPTIONAL, INTENT(IN) :: radius_
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: standard_name_
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: type_
+
+      IF (PRESENT(area_)) THEN
+        CALL cxios_set_domain_area &
+      (domain_hdl%daddr, area_, SHAPE(area_))
+      ENDIF
+
+      IF (PRESENT(bounds_lat_1d_)) THEN
+        CALL cxios_set_domain_bounds_lat_1d &
+      (domain_hdl%daddr, bounds_lat_1d_, SHAPE(bounds_lat_1d_))
+      ENDIF
+
+      IF (PRESENT(bounds_lat_2d_)) THEN
+        CALL cxios_set_domain_bounds_lat_2d &
+      (domain_hdl%daddr, bounds_lat_2d_, SHAPE(bounds_lat_2d_))
+      ENDIF
+
+      IF (PRESENT(bounds_lat_name_)) THEN
+        CALL cxios_set_domain_bounds_lat_name &
+      (domain_hdl%daddr, bounds_lat_name_, len(bounds_lat_name_))
+      ENDIF
+
+      IF (PRESENT(bounds_lon_1d_)) THEN
+        CALL cxios_set_domain_bounds_lon_1d &
+      (domain_hdl%daddr, bounds_lon_1d_, SHAPE(bounds_lon_1d_))
+      ENDIF
+
+      IF (PRESENT(bounds_lon_2d_)) THEN
+        CALL cxios_set_domain_bounds_lon_2d &
+      (domain_hdl%daddr, bounds_lon_2d_, SHAPE(bounds_lon_2d_))
+      ENDIF
+
+      IF (PRESENT(bounds_lon_name_)) THEN
+        CALL cxios_set_domain_bounds_lon_name &
+      (domain_hdl%daddr, bounds_lon_name_, len(bounds_lon_name_))
+      ENDIF
+
+      IF (PRESENT(comment_)) THEN
+        CALL cxios_set_domain_comment &
+      (domain_hdl%daddr, comment_, len(comment_))
+      ENDIF
+
+      IF (PRESENT(data_dim_)) THEN
+        CALL cxios_set_domain_data_dim &
+      (domain_hdl%daddr, data_dim_)
+      ENDIF
+
+      IF (PRESENT(data_i_index_)) THEN
+        CALL cxios_set_domain_data_i_index &
+      (domain_hdl%daddr, data_i_index_, SHAPE(data_i_index_))
+      ENDIF
+
+      IF (PRESENT(data_ibegin_)) THEN
+        CALL cxios_set_domain_data_ibegin &
+      (domain_hdl%daddr, data_ibegin_)
+      ENDIF
+
+      IF (PRESENT(data_j_index_)) THEN
+        CALL cxios_set_domain_data_j_index &
+      (domain_hdl%daddr, data_j_index_, SHAPE(data_j_index_))
+      ENDIF
+
+      IF (PRESENT(data_jbegin_)) THEN
+        CALL cxios_set_domain_data_jbegin &
+      (domain_hdl%daddr, data_jbegin_)
+      ENDIF
+
+      IF (PRESENT(data_ni_)) THEN
+        CALL cxios_set_domain_data_ni &
+      (domain_hdl%daddr, data_ni_)
+      ENDIF
+
+      IF (PRESENT(data_nj_)) THEN
+        CALL cxios_set_domain_data_nj &
+      (domain_hdl%daddr, data_nj_)
+      ENDIF
+
+      IF (PRESENT(dim_i_name_)) THEN
+        CALL cxios_set_domain_dim_i_name &
+      (domain_hdl%daddr, dim_i_name_, len(dim_i_name_))
+      ENDIF
+
+      IF (PRESENT(dim_j_name_)) THEN
+        CALL cxios_set_domain_dim_j_name &
+      (domain_hdl%daddr, dim_j_name_, len(dim_j_name_))
+      ENDIF
+
+      IF (PRESENT(domain_ref_)) THEN
+        CALL cxios_set_domain_domain_ref &
+      (domain_hdl%daddr, domain_ref_, len(domain_ref_))
+      ENDIF
+
+      IF (PRESENT(i_index_)) THEN
+        CALL cxios_set_domain_i_index &
+      (domain_hdl%daddr, i_index_, SHAPE(i_index_))
+      ENDIF
+
+      IF (PRESENT(ibegin_)) THEN
+        CALL cxios_set_domain_ibegin &
+      (domain_hdl%daddr, ibegin_)
+      ENDIF
+
+      IF (PRESENT(j_index_)) THEN
+        CALL cxios_set_domain_j_index &
+      (domain_hdl%daddr, j_index_, SHAPE(j_index_))
+      ENDIF
+
+      IF (PRESENT(jbegin_)) THEN
+        CALL cxios_set_domain_jbegin &
+      (domain_hdl%daddr, jbegin_)
+      ENDIF
+
+      IF (PRESENT(lat_name_)) THEN
+        CALL cxios_set_domain_lat_name &
+      (domain_hdl%daddr, lat_name_, len(lat_name_))
+      ENDIF
+
+      IF (PRESENT(latvalue_1d_)) THEN
+        CALL cxios_set_domain_latvalue_1d &
+      (domain_hdl%daddr, latvalue_1d_, SHAPE(latvalue_1d_))
+      ENDIF
+
+      IF (PRESENT(latvalue_2d_)) THEN
+        CALL cxios_set_domain_latvalue_2d &
+      (domain_hdl%daddr, latvalue_2d_, SHAPE(latvalue_2d_))
+      ENDIF
+
+      IF (PRESENT(lon_name_)) THEN
+        CALL cxios_set_domain_lon_name &
+      (domain_hdl%daddr, lon_name_, len(lon_name_))
+      ENDIF
+
+      IF (PRESENT(long_name_)) THEN
+        CALL cxios_set_domain_long_name &
+      (domain_hdl%daddr, long_name_, len(long_name_))
+      ENDIF
+
+      IF (PRESENT(lonvalue_1d_)) THEN
+        CALL cxios_set_domain_lonvalue_1d &
+      (domain_hdl%daddr, lonvalue_1d_, SHAPE(lonvalue_1d_))
+      ENDIF
+
+      IF (PRESENT(lonvalue_2d_)) THEN
+        CALL cxios_set_domain_lonvalue_2d &
+      (domain_hdl%daddr, lonvalue_2d_, SHAPE(lonvalue_2d_))
+      ENDIF
+
+      IF (PRESENT(mask_1d_)) THEN
+        ALLOCATE(mask_1d__tmp(SIZE(mask_1d_,1)))
+        mask_1d__tmp = mask_1d_
+        CALL cxios_set_domain_mask_1d &
+      (domain_hdl%daddr, mask_1d__tmp, SHAPE(mask_1d_))
+      ENDIF
+
+      IF (PRESENT(mask_2d_)) THEN
+        ALLOCATE(mask_2d__tmp(SIZE(mask_2d_,1), SIZE(mask_2d_,2)))
+        mask_2d__tmp = mask_2d_
+        CALL cxios_set_domain_mask_2d &
+      (domain_hdl%daddr, mask_2d__tmp, SHAPE(mask_2d_))
+      ENDIF
+
+      IF (PRESENT(name_)) THEN
+        CALL cxios_set_domain_name &
+      (domain_hdl%daddr, name_, len(name_))
+      ENDIF
+
+      IF (PRESENT(ni_)) THEN
+        CALL cxios_set_domain_ni &
+      (domain_hdl%daddr, ni_)
+      ENDIF
+
+      IF (PRESENT(ni_glo_)) THEN
+        CALL cxios_set_domain_ni_glo &
+      (domain_hdl%daddr, ni_glo_)
+      ENDIF
+
+      IF (PRESENT(nj_)) THEN
+        CALL cxios_set_domain_nj &
+      (domain_hdl%daddr, nj_)
+      ENDIF
+
+      IF (PRESENT(nj_glo_)) THEN
+        CALL cxios_set_domain_nj_glo &
+      (domain_hdl%daddr, nj_glo_)
+      ENDIF
+
+      IF (PRESENT(nvertex_)) THEN
+        CALL cxios_set_domain_nvertex &
+      (domain_hdl%daddr, nvertex_)
+      ENDIF
+
+      IF (PRESENT(prec_)) THEN
+        CALL cxios_set_domain_prec &
+      (domain_hdl%daddr, prec_)
+      ENDIF
+
+      IF (PRESENT(radius_)) THEN
+        CALL cxios_set_domain_radius &
+      (domain_hdl%daddr, radius_)
+      ENDIF
+
+      IF (PRESENT(standard_name_)) THEN
+        CALL cxios_set_domain_standard_name &
+      (domain_hdl%daddr, standard_name_, len(standard_name_))
+      ENDIF
+
+      IF (PRESENT(type_)) THEN
+        CALL cxios_set_domain_type &
+      (domain_hdl%daddr, type_, len(type_))
+      ENDIF
+
+  END SUBROUTINE xios(set_domain_attr_hdl_)
+
+  SUBROUTINE xios(get_domain_attr)  &
+    ( domain_id, area, bounds_lat_1d, bounds_lat_2d, bounds_lat_name, bounds_lon_1d, bounds_lon_2d  &
+    , bounds_lon_name, comment, data_dim, data_i_index, data_ibegin, data_j_index, data_jbegin, data_ni  &
+    , data_nj, dim_i_name, dim_j_name, domain_ref, i_index, ibegin, j_index, jbegin, lat_name, latvalue_1d  &
+    , latvalue_2d, lon_name, long_name, lonvalue_1d, lonvalue_2d, mask_1d, mask_2d, name, ni, ni_glo  &
+    , nj, nj_glo, nvertex, prec, radius, standard_name, type )
+
+    IMPLICIT NONE
+      TYPE(txios(domain))  :: domain_hdl
+      CHARACTER(LEN=*), INTENT(IN) ::domain_id
+      REAL (KIND=8) , OPTIONAL, INTENT(OUT) :: area(:,:)
+      REAL (KIND=8) , OPTIONAL, INTENT(OUT) :: bounds_lat_1d(:,:)
+      REAL (KIND=8) , OPTIONAL, INTENT(OUT) :: bounds_lat_2d(:,:,:)
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: bounds_lat_name
+      REAL (KIND=8) , OPTIONAL, INTENT(OUT) :: bounds_lon_1d(:,:)
+      REAL (KIND=8) , OPTIONAL, INTENT(OUT) :: bounds_lon_2d(:,:,:)
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: bounds_lon_name
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: comment
+      INTEGER  , OPTIONAL, INTENT(OUT) :: data_dim
+      INTEGER  , OPTIONAL, INTENT(OUT) :: data_i_index(:)
+      INTEGER  , OPTIONAL, INTENT(OUT) :: data_ibegin
+      INTEGER  , OPTIONAL, INTENT(OUT) :: data_j_index(:)
+      INTEGER  , OPTIONAL, INTENT(OUT) :: data_jbegin
+      INTEGER  , OPTIONAL, INTENT(OUT) :: data_ni
+      INTEGER  , OPTIONAL, INTENT(OUT) :: data_nj
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: dim_i_name
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: dim_j_name
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: domain_ref
+      INTEGER  , OPTIONAL, INTENT(OUT) :: i_index(:)
+      INTEGER  , OPTIONAL, INTENT(OUT) :: ibegin
+      INTEGER  , OPTIONAL, INTENT(OUT) :: j_index(:)
+      INTEGER  , OPTIONAL, INTENT(OUT) :: jbegin
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: lat_name
+      REAL (KIND=8) , OPTIONAL, INTENT(OUT) :: latvalue_1d(:)
+      REAL (KIND=8) , OPTIONAL, INTENT(OUT) :: latvalue_2d(:,:)
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: lon_name
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: long_name
+      REAL (KIND=8) , OPTIONAL, INTENT(OUT) :: lonvalue_1d(:)
+      REAL (KIND=8) , OPTIONAL, INTENT(OUT) :: lonvalue_2d(:,:)
+      LOGICAL  , OPTIONAL, INTENT(OUT) :: mask_1d(:)
+      LOGICAL (KIND=C_BOOL) , ALLOCATABLE :: mask_1d_tmp(:)
+      LOGICAL  , OPTIONAL, INTENT(OUT) :: mask_2d(:,:)
+      LOGICAL (KIND=C_BOOL) , ALLOCATABLE :: mask_2d_tmp(:,:)
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: name
+      INTEGER  , OPTIONAL, INTENT(OUT) :: ni
+      INTEGER  , OPTIONAL, INTENT(OUT) :: ni_glo
+      INTEGER  , OPTIONAL, INTENT(OUT) :: nj
+      INTEGER  , OPTIONAL, INTENT(OUT) :: nj_glo
+      INTEGER  , OPTIONAL, INTENT(OUT) :: nvertex
+      INTEGER  , OPTIONAL, INTENT(OUT) :: prec
+      REAL (KIND=8) , OPTIONAL, INTENT(OUT) :: radius
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: standard_name
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: type
+
+      CALL xios(get_domain_handle) &
+      (domain_id,domain_hdl)
+      CALL xios(get_domain_attr_hdl_)   &
+      ( domain_hdl, area, bounds_lat_1d, bounds_lat_2d, bounds_lat_name, bounds_lon_1d, bounds_lon_2d  &
+      , bounds_lon_name, comment, data_dim, data_i_index, data_ibegin, data_j_index, data_jbegin, data_ni  &
+      , data_nj, dim_i_name, dim_j_name, domain_ref, i_index, ibegin, j_index, jbegin, lat_name, latvalue_1d  &
+      , latvalue_2d, lon_name, long_name, lonvalue_1d, lonvalue_2d, mask_1d, mask_2d, name, ni, ni_glo  &
+      , nj, nj_glo, nvertex, prec, radius, standard_name, type )
+
+  END SUBROUTINE xios(get_domain_attr)
+
+  SUBROUTINE xios(get_domain_attr_hdl)  &
+    ( domain_hdl, area, bounds_lat_1d, bounds_lat_2d, bounds_lat_name, bounds_lon_1d, bounds_lon_2d  &
+    , bounds_lon_name, comment, data_dim, data_i_index, data_ibegin, data_j_index, data_jbegin, data_ni  &
+    , data_nj, dim_i_name, dim_j_name, domain_ref, i_index, ibegin, j_index, jbegin, lat_name, latvalue_1d  &
+    , latvalue_2d, lon_name, long_name, lonvalue_1d, lonvalue_2d, mask_1d, mask_2d, name, ni, ni_glo  &
+    , nj, nj_glo, nvertex, prec, radius, standard_name, type )
+
+    IMPLICIT NONE
+      TYPE(txios(domain)) , INTENT(IN) :: domain_hdl
+      REAL (KIND=8) , OPTIONAL, INTENT(OUT) :: area(:,:)
+      REAL (KIND=8) , OPTIONAL, INTENT(OUT) :: bounds_lat_1d(:,:)
+      REAL (KIND=8) , OPTIONAL, INTENT(OUT) :: bounds_lat_2d(:,:,:)
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: bounds_lat_name
+      REAL (KIND=8) , OPTIONAL, INTENT(OUT) :: bounds_lon_1d(:,:)
+      REAL (KIND=8) , OPTIONAL, INTENT(OUT) :: bounds_lon_2d(:,:,:)
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: bounds_lon_name
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: comment
+      INTEGER  , OPTIONAL, INTENT(OUT) :: data_dim
+      INTEGER  , OPTIONAL, INTENT(OUT) :: data_i_index(:)
+      INTEGER  , OPTIONAL, INTENT(OUT) :: data_ibegin
+      INTEGER  , OPTIONAL, INTENT(OUT) :: data_j_index(:)
+      INTEGER  , OPTIONAL, INTENT(OUT) :: data_jbegin
+      INTEGER  , OPTIONAL, INTENT(OUT) :: data_ni
+      INTEGER  , OPTIONAL, INTENT(OUT) :: data_nj
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: dim_i_name
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: dim_j_name
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: domain_ref
+      INTEGER  , OPTIONAL, INTENT(OUT) :: i_index(:)
+      INTEGER  , OPTIONAL, INTENT(OUT) :: ibegin
+      INTEGER  , OPTIONAL, INTENT(OUT) :: j_index(:)
+      INTEGER  , OPTIONAL, INTENT(OUT) :: jbegin
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: lat_name
+      REAL (KIND=8) , OPTIONAL, INTENT(OUT) :: latvalue_1d(:)
+      REAL (KIND=8) , OPTIONAL, INTENT(OUT) :: latvalue_2d(:,:)
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: lon_name
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: long_name
+      REAL (KIND=8) , OPTIONAL, INTENT(OUT) :: lonvalue_1d(:)
+      REAL (KIND=8) , OPTIONAL, INTENT(OUT) :: lonvalue_2d(:,:)
+      LOGICAL  , OPTIONAL, INTENT(OUT) :: mask_1d(:)
+      LOGICAL (KIND=C_BOOL) , ALLOCATABLE :: mask_1d_tmp(:)
+      LOGICAL  , OPTIONAL, INTENT(OUT) :: mask_2d(:,:)
+      LOGICAL (KIND=C_BOOL) , ALLOCATABLE :: mask_2d_tmp(:,:)
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: name
+      INTEGER  , OPTIONAL, INTENT(OUT) :: ni
+      INTEGER  , OPTIONAL, INTENT(OUT) :: ni_glo
+      INTEGER  , OPTIONAL, INTENT(OUT) :: nj
+      INTEGER  , OPTIONAL, INTENT(OUT) :: nj_glo
+      INTEGER  , OPTIONAL, INTENT(OUT) :: nvertex
+      INTEGER  , OPTIONAL, INTENT(OUT) :: prec
+      REAL (KIND=8) , OPTIONAL, INTENT(OUT) :: radius
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: standard_name
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: type
+
+      CALL xios(get_domain_attr_hdl_)  &
+      ( domain_hdl, area, bounds_lat_1d, bounds_lat_2d, bounds_lat_name, bounds_lon_1d, bounds_lon_2d  &
+      , bounds_lon_name, comment, data_dim, data_i_index, data_ibegin, data_j_index, data_jbegin, data_ni  &
+      , data_nj, dim_i_name, dim_j_name, domain_ref, i_index, ibegin, j_index, jbegin, lat_name, latvalue_1d  &
+      , latvalue_2d, lon_name, long_name, lonvalue_1d, lonvalue_2d, mask_1d, mask_2d, name, ni, ni_glo  &
+      , nj, nj_glo, nvertex, prec, radius, standard_name, type )
+
+  END SUBROUTINE xios(get_domain_attr_hdl)
+
+  SUBROUTINE xios(get_domain_attr_hdl_)   &
+    ( domain_hdl, area_, bounds_lat_1d_, bounds_lat_2d_, bounds_lat_name_, bounds_lon_1d_, bounds_lon_2d_  &
+    , bounds_lon_name_, comment_, data_dim_, data_i_index_, data_ibegin_, data_j_index_, data_jbegin_  &
+    , data_ni_, data_nj_, dim_i_name_, dim_j_name_, domain_ref_, i_index_, ibegin_, j_index_, jbegin_  &
+    , lat_name_, latvalue_1d_, latvalue_2d_, lon_name_, long_name_, lonvalue_1d_, lonvalue_2d_, mask_1d_  &
+    , mask_2d_, name_, ni_, ni_glo_, nj_, nj_glo_, nvertex_, prec_, radius_, standard_name_, type_  &
+     )
+
+    IMPLICIT NONE
+      TYPE(txios(domain)) , INTENT(IN) :: domain_hdl
+      REAL (KIND=8) , OPTIONAL, INTENT(OUT) :: area_(:,:)
+      REAL (KIND=8) , OPTIONAL, INTENT(OUT) :: bounds_lat_1d_(:,:)
+      REAL (KIND=8) , OPTIONAL, INTENT(OUT) :: bounds_lat_2d_(:,:,:)
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: bounds_lat_name_
+      REAL (KIND=8) , OPTIONAL, INTENT(OUT) :: bounds_lon_1d_(:,:)
+      REAL (KIND=8) , OPTIONAL, INTENT(OUT) :: bounds_lon_2d_(:,:,:)
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: bounds_lon_name_
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: comment_
+      INTEGER  , OPTIONAL, INTENT(OUT) :: data_dim_
+      INTEGER  , OPTIONAL, INTENT(OUT) :: data_i_index_(:)
+      INTEGER  , OPTIONAL, INTENT(OUT) :: data_ibegin_
+      INTEGER  , OPTIONAL, INTENT(OUT) :: data_j_index_(:)
+      INTEGER  , OPTIONAL, INTENT(OUT) :: data_jbegin_
+      INTEGER  , OPTIONAL, INTENT(OUT) :: data_ni_
+      INTEGER  , OPTIONAL, INTENT(OUT) :: data_nj_
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: dim_i_name_
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: dim_j_name_
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: domain_ref_
+      INTEGER  , OPTIONAL, INTENT(OUT) :: i_index_(:)
+      INTEGER  , OPTIONAL, INTENT(OUT) :: ibegin_
+      INTEGER  , OPTIONAL, INTENT(OUT) :: j_index_(:)
+      INTEGER  , OPTIONAL, INTENT(OUT) :: jbegin_
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: lat_name_
+      REAL (KIND=8) , OPTIONAL, INTENT(OUT) :: latvalue_1d_(:)
+      REAL (KIND=8) , OPTIONAL, INTENT(OUT) :: latvalue_2d_(:,:)
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: lon_name_
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: long_name_
+      REAL (KIND=8) , OPTIONAL, INTENT(OUT) :: lonvalue_1d_(:)
+      REAL (KIND=8) , OPTIONAL, INTENT(OUT) :: lonvalue_2d_(:,:)
+      LOGICAL  , OPTIONAL, INTENT(OUT) :: mask_1d_(:)
+      LOGICAL (KIND=C_BOOL) , ALLOCATABLE :: mask_1d__tmp(:)
+      LOGICAL  , OPTIONAL, INTENT(OUT) :: mask_2d_(:,:)
+      LOGICAL (KIND=C_BOOL) , ALLOCATABLE :: mask_2d__tmp(:,:)
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: name_
+      INTEGER  , OPTIONAL, INTENT(OUT) :: ni_
+      INTEGER  , OPTIONAL, INTENT(OUT) :: ni_glo_
+      INTEGER  , OPTIONAL, INTENT(OUT) :: nj_
+      INTEGER  , OPTIONAL, INTENT(OUT) :: nj_glo_
+      INTEGER  , OPTIONAL, INTENT(OUT) :: nvertex_
+      INTEGER  , OPTIONAL, INTENT(OUT) :: prec_
+      REAL (KIND=8) , OPTIONAL, INTENT(OUT) :: radius_
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: standard_name_
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: type_
+
+      IF (PRESENT(area_)) THEN
+        CALL cxios_get_domain_area &
+      (domain_hdl%daddr, area_, SHAPE(area_))
+      ENDIF
+
+      IF (PRESENT(bounds_lat_1d_)) THEN
+        CALL cxios_get_domain_bounds_lat_1d &
+      (domain_hdl%daddr, bounds_lat_1d_, SHAPE(bounds_lat_1d_))
+      ENDIF
+
+      IF (PRESENT(bounds_lat_2d_)) THEN
+        CALL cxios_get_domain_bounds_lat_2d &
+      (domain_hdl%daddr, bounds_lat_2d_, SHAPE(bounds_lat_2d_))
+      ENDIF
+
+      IF (PRESENT(bounds_lat_name_)) THEN
+        CALL cxios_get_domain_bounds_lat_name &
+      (domain_hdl%daddr, bounds_lat_name_, len(bounds_lat_name_))
+      ENDIF
+
+      IF (PRESENT(bounds_lon_1d_)) THEN
+        CALL cxios_get_domain_bounds_lon_1d &
+      (domain_hdl%daddr, bounds_lon_1d_, SHAPE(bounds_lon_1d_))
+      ENDIF
+
+      IF (PRESENT(bounds_lon_2d_)) THEN
+        CALL cxios_get_domain_bounds_lon_2d &
+      (domain_hdl%daddr, bounds_lon_2d_, SHAPE(bounds_lon_2d_))
+      ENDIF
+
+      IF (PRESENT(bounds_lon_name_)) THEN
+        CALL cxios_get_domain_bounds_lon_name &
+      (domain_hdl%daddr, bounds_lon_name_, len(bounds_lon_name_))
+      ENDIF
+
+      IF (PRESENT(comment_)) THEN
+        CALL cxios_get_domain_comment &
+      (domain_hdl%daddr, comment_, len(comment_))
+      ENDIF
+
+      IF (PRESENT(data_dim_)) THEN
+        CALL cxios_get_domain_data_dim &
+      (domain_hdl%daddr, data_dim_)
+      ENDIF
+
+      IF (PRESENT(data_i_index_)) THEN
+        CALL cxios_get_domain_data_i_index &
+      (domain_hdl%daddr, data_i_index_, SHAPE(data_i_index_))
+      ENDIF
+
+      IF (PRESENT(data_ibegin_)) THEN
+        CALL cxios_get_domain_data_ibegin &
+      (domain_hdl%daddr, data_ibegin_)
+      ENDIF
+
+      IF (PRESENT(data_j_index_)) THEN
+        CALL cxios_get_domain_data_j_index &
+      (domain_hdl%daddr, data_j_index_, SHAPE(data_j_index_))
+      ENDIF
+
+      IF (PRESENT(data_jbegin_)) THEN
+        CALL cxios_get_domain_data_jbegin &
+      (domain_hdl%daddr, data_jbegin_)
+      ENDIF
+
+      IF (PRESENT(data_ni_)) THEN
+        CALL cxios_get_domain_data_ni &
+      (domain_hdl%daddr, data_ni_)
+      ENDIF
+
+      IF (PRESENT(data_nj_)) THEN
+        CALL cxios_get_domain_data_nj &
+      (domain_hdl%daddr, data_nj_)
+      ENDIF
+
+      IF (PRESENT(dim_i_name_)) THEN
+        CALL cxios_get_domain_dim_i_name &
+      (domain_hdl%daddr, dim_i_name_, len(dim_i_name_))
+      ENDIF
+
+      IF (PRESENT(dim_j_name_)) THEN
+        CALL cxios_get_domain_dim_j_name &
+      (domain_hdl%daddr, dim_j_name_, len(dim_j_name_))
+      ENDIF
+
+      IF (PRESENT(domain_ref_)) THEN
+        CALL cxios_get_domain_domain_ref &
+      (domain_hdl%daddr, domain_ref_, len(domain_ref_))
+      ENDIF
+
+      IF (PRESENT(i_index_)) THEN
+        CALL cxios_get_domain_i_index &
+      (domain_hdl%daddr, i_index_, SHAPE(i_index_))
+      ENDIF
+
+      IF (PRESENT(ibegin_)) THEN
+        CALL cxios_get_domain_ibegin &
+      (domain_hdl%daddr, ibegin_)
+      ENDIF
+
+      IF (PRESENT(j_index_)) THEN
+        CALL cxios_get_domain_j_index &
+      (domain_hdl%daddr, j_index_, SHAPE(j_index_))
+      ENDIF
+
+      IF (PRESENT(jbegin_)) THEN
+        CALL cxios_get_domain_jbegin &
+      (domain_hdl%daddr, jbegin_)
+      ENDIF
+
+      IF (PRESENT(lat_name_)) THEN
+        CALL cxios_get_domain_lat_name &
+      (domain_hdl%daddr, lat_name_, len(lat_name_))
+      ENDIF
+
+      IF (PRESENT(latvalue_1d_)) THEN
+        CALL cxios_get_domain_latvalue_1d &
+      (domain_hdl%daddr, latvalue_1d_, SHAPE(latvalue_1d_))
+      ENDIF
+
+      IF (PRESENT(latvalue_2d_)) THEN
+        CALL cxios_get_domain_latvalue_2d &
+      (domain_hdl%daddr, latvalue_2d_, SHAPE(latvalue_2d_))
+      ENDIF
+
+      IF (PRESENT(lon_name_)) THEN
+        CALL cxios_get_domain_lon_name &
+      (domain_hdl%daddr, lon_name_, len(lon_name_))
+      ENDIF
+
+      IF (PRESENT(long_name_)) THEN
+        CALL cxios_get_domain_long_name &
+      (domain_hdl%daddr, long_name_, len(long_name_))
+      ENDIF
+
+      IF (PRESENT(lonvalue_1d_)) THEN
+        CALL cxios_get_domain_lonvalue_1d &
+      (domain_hdl%daddr, lonvalue_1d_, SHAPE(lonvalue_1d_))
+      ENDIF
+
+      IF (PRESENT(lonvalue_2d_)) THEN
+        CALL cxios_get_domain_lonvalue_2d &
+      (domain_hdl%daddr, lonvalue_2d_, SHAPE(lonvalue_2d_))
+      ENDIF
+
+      IF (PRESENT(mask_1d_)) THEN
+        ALLOCATE(mask_1d__tmp(SIZE(mask_1d_,1)))
+        CALL cxios_get_domain_mask_1d &
+      (domain_hdl%daddr, mask_1d__tmp, SHAPE(mask_1d_))
+        mask_1d_ = mask_1d__tmp
+      ENDIF
+
+      IF (PRESENT(mask_2d_)) THEN
+        ALLOCATE(mask_2d__tmp(SIZE(mask_2d_,1), SIZE(mask_2d_,2)))
+        CALL cxios_get_domain_mask_2d &
+      (domain_hdl%daddr, mask_2d__tmp, SHAPE(mask_2d_))
+        mask_2d_ = mask_2d__tmp
+      ENDIF
+
+      IF (PRESENT(name_)) THEN
+        CALL cxios_get_domain_name &
+      (domain_hdl%daddr, name_, len(name_))
+      ENDIF
+
+      IF (PRESENT(ni_)) THEN
+        CALL cxios_get_domain_ni &
+      (domain_hdl%daddr, ni_)
+      ENDIF
+
+      IF (PRESENT(ni_glo_)) THEN
+        CALL cxios_get_domain_ni_glo &
+      (domain_hdl%daddr, ni_glo_)
+      ENDIF
+
+      IF (PRESENT(nj_)) THEN
+        CALL cxios_get_domain_nj &
+      (domain_hdl%daddr, nj_)
+      ENDIF
+
+      IF (PRESENT(nj_glo_)) THEN
+        CALL cxios_get_domain_nj_glo &
+      (domain_hdl%daddr, nj_glo_)
+      ENDIF
+
+      IF (PRESENT(nvertex_)) THEN
+        CALL cxios_get_domain_nvertex &
+      (domain_hdl%daddr, nvertex_)
+      ENDIF
+
+      IF (PRESENT(prec_)) THEN
+        CALL cxios_get_domain_prec &
+      (domain_hdl%daddr, prec_)
+      ENDIF
+
+      IF (PRESENT(radius_)) THEN
+        CALL cxios_get_domain_radius &
+      (domain_hdl%daddr, radius_)
+      ENDIF
+
+      IF (PRESENT(standard_name_)) THEN
+        CALL cxios_get_domain_standard_name &
+      (domain_hdl%daddr, standard_name_, len(standard_name_))
+      ENDIF
+
+      IF (PRESENT(type_)) THEN
+        CALL cxios_get_domain_type &
+      (domain_hdl%daddr, type_, len(type_))
+      ENDIF
+
+  END SUBROUTINE xios(get_domain_attr_hdl_)
+
+  SUBROUTINE xios(is_defined_domain_attr)  &
+    ( domain_id, area, bounds_lat_1d, bounds_lat_2d, bounds_lat_name, bounds_lon_1d, bounds_lon_2d  &
+    , bounds_lon_name, comment, data_dim, data_i_index, data_ibegin, data_j_index, data_jbegin, data_ni  &
+    , data_nj, dim_i_name, dim_j_name, domain_ref, i_index, ibegin, j_index, jbegin, lat_name, latvalue_1d  &
+    , latvalue_2d, lon_name, long_name, lonvalue_1d, lonvalue_2d, mask_1d, mask_2d, name, ni, ni_glo  &
+    , nj, nj_glo, nvertex, prec, radius, standard_name, type )
+
+    IMPLICIT NONE
+      TYPE(txios(domain))  :: domain_hdl
+      CHARACTER(LEN=*), INTENT(IN) ::domain_id
+      LOGICAL, OPTIONAL, INTENT(OUT) :: area
+      LOGICAL(KIND=C_BOOL) :: area_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: bounds_lat_1d
+      LOGICAL(KIND=C_BOOL) :: bounds_lat_1d_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: bounds_lat_2d
+      LOGICAL(KIND=C_BOOL) :: bounds_lat_2d_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: bounds_lat_name
+      LOGICAL(KIND=C_BOOL) :: bounds_lat_name_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: bounds_lon_1d
+      LOGICAL(KIND=C_BOOL) :: bounds_lon_1d_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: bounds_lon_2d
+      LOGICAL(KIND=C_BOOL) :: bounds_lon_2d_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: bounds_lon_name
+      LOGICAL(KIND=C_BOOL) :: bounds_lon_name_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: comment
+      LOGICAL(KIND=C_BOOL) :: comment_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: data_dim
+      LOGICAL(KIND=C_BOOL) :: data_dim_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: data_i_index
+      LOGICAL(KIND=C_BOOL) :: data_i_index_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: data_ibegin
+      LOGICAL(KIND=C_BOOL) :: data_ibegin_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: data_j_index
+      LOGICAL(KIND=C_BOOL) :: data_j_index_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: data_jbegin
+      LOGICAL(KIND=C_BOOL) :: data_jbegin_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: data_ni
+      LOGICAL(KIND=C_BOOL) :: data_ni_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: data_nj
+      LOGICAL(KIND=C_BOOL) :: data_nj_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: dim_i_name
+      LOGICAL(KIND=C_BOOL) :: dim_i_name_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: dim_j_name
+      LOGICAL(KIND=C_BOOL) :: dim_j_name_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: domain_ref
+      LOGICAL(KIND=C_BOOL) :: domain_ref_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: i_index
+      LOGICAL(KIND=C_BOOL) :: i_index_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: ibegin
+      LOGICAL(KIND=C_BOOL) :: ibegin_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: j_index
+      LOGICAL(KIND=C_BOOL) :: j_index_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: jbegin
+      LOGICAL(KIND=C_BOOL) :: jbegin_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: lat_name
+      LOGICAL(KIND=C_BOOL) :: lat_name_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: latvalue_1d
+      LOGICAL(KIND=C_BOOL) :: latvalue_1d_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: latvalue_2d
+      LOGICAL(KIND=C_BOOL) :: latvalue_2d_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: lon_name
+      LOGICAL(KIND=C_BOOL) :: lon_name_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: long_name
+      LOGICAL(KIND=C_BOOL) :: long_name_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: lonvalue_1d
+      LOGICAL(KIND=C_BOOL) :: lonvalue_1d_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: lonvalue_2d
+      LOGICAL(KIND=C_BOOL) :: lonvalue_2d_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: mask_1d
+      LOGICAL(KIND=C_BOOL) :: mask_1d_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: mask_2d
+      LOGICAL(KIND=C_BOOL) :: mask_2d_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: name
+      LOGICAL(KIND=C_BOOL) :: name_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: ni
+      LOGICAL(KIND=C_BOOL) :: ni_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: ni_glo
+      LOGICAL(KIND=C_BOOL) :: ni_glo_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: nj
+      LOGICAL(KIND=C_BOOL) :: nj_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: nj_glo
+      LOGICAL(KIND=C_BOOL) :: nj_glo_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: nvertex
+      LOGICAL(KIND=C_BOOL) :: nvertex_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: prec
+      LOGICAL(KIND=C_BOOL) :: prec_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: radius
+      LOGICAL(KIND=C_BOOL) :: radius_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: standard_name
+      LOGICAL(KIND=C_BOOL) :: standard_name_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: type
+      LOGICAL(KIND=C_BOOL) :: type_tmp
+
+      CALL xios(get_domain_handle) &
+      (domain_id,domain_hdl)
+      CALL xios(is_defined_domain_attr_hdl_)   &
+      ( domain_hdl, area, bounds_lat_1d, bounds_lat_2d, bounds_lat_name, bounds_lon_1d, bounds_lon_2d  &
+      , bounds_lon_name, comment, data_dim, data_i_index, data_ibegin, data_j_index, data_jbegin, data_ni  &
+      , data_nj, dim_i_name, dim_j_name, domain_ref, i_index, ibegin, j_index, jbegin, lat_name, latvalue_1d  &
+      , latvalue_2d, lon_name, long_name, lonvalue_1d, lonvalue_2d, mask_1d, mask_2d, name, ni, ni_glo  &
+      , nj, nj_glo, nvertex, prec, radius, standard_name, type )
+
+  END SUBROUTINE xios(is_defined_domain_attr)
+
+  SUBROUTINE xios(is_defined_domain_attr_hdl)  &
+    ( domain_hdl, area, bounds_lat_1d, bounds_lat_2d, bounds_lat_name, bounds_lon_1d, bounds_lon_2d  &
+    , bounds_lon_name, comment, data_dim, data_i_index, data_ibegin, data_j_index, data_jbegin, data_ni  &
+    , data_nj, dim_i_name, dim_j_name, domain_ref, i_index, ibegin, j_index, jbegin, lat_name, latvalue_1d  &
+    , latvalue_2d, lon_name, long_name, lonvalue_1d, lonvalue_2d, mask_1d, mask_2d, name, ni, ni_glo  &
+    , nj, nj_glo, nvertex, prec, radius, standard_name, type )
+
+    IMPLICIT NONE
+      TYPE(txios(domain)) , INTENT(IN) :: domain_hdl
+      LOGICAL, OPTIONAL, INTENT(OUT) :: area
+      LOGICAL(KIND=C_BOOL) :: area_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: bounds_lat_1d
+      LOGICAL(KIND=C_BOOL) :: bounds_lat_1d_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: bounds_lat_2d
+      LOGICAL(KIND=C_BOOL) :: bounds_lat_2d_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: bounds_lat_name
+      LOGICAL(KIND=C_BOOL) :: bounds_lat_name_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: bounds_lon_1d
+      LOGICAL(KIND=C_BOOL) :: bounds_lon_1d_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: bounds_lon_2d
+      LOGICAL(KIND=C_BOOL) :: bounds_lon_2d_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: bounds_lon_name
+      LOGICAL(KIND=C_BOOL) :: bounds_lon_name_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: comment
+      LOGICAL(KIND=C_BOOL) :: comment_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: data_dim
+      LOGICAL(KIND=C_BOOL) :: data_dim_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: data_i_index
+      LOGICAL(KIND=C_BOOL) :: data_i_index_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: data_ibegin
+      LOGICAL(KIND=C_BOOL) :: data_ibegin_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: data_j_index
+      LOGICAL(KIND=C_BOOL) :: data_j_index_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: data_jbegin
+      LOGICAL(KIND=C_BOOL) :: data_jbegin_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: data_ni
+      LOGICAL(KIND=C_BOOL) :: data_ni_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: data_nj
+      LOGICAL(KIND=C_BOOL) :: data_nj_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: dim_i_name
+      LOGICAL(KIND=C_BOOL) :: dim_i_name_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: dim_j_name
+      LOGICAL(KIND=C_BOOL) :: dim_j_name_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: domain_ref
+      LOGICAL(KIND=C_BOOL) :: domain_ref_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: i_index
+      LOGICAL(KIND=C_BOOL) :: i_index_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: ibegin
+      LOGICAL(KIND=C_BOOL) :: ibegin_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: j_index
+      LOGICAL(KIND=C_BOOL) :: j_index_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: jbegin
+      LOGICAL(KIND=C_BOOL) :: jbegin_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: lat_name
+      LOGICAL(KIND=C_BOOL) :: lat_name_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: latvalue_1d
+      LOGICAL(KIND=C_BOOL) :: latvalue_1d_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: latvalue_2d
+      LOGICAL(KIND=C_BOOL) :: latvalue_2d_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: lon_name
+      LOGICAL(KIND=C_BOOL) :: lon_name_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: long_name
+      LOGICAL(KIND=C_BOOL) :: long_name_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: lonvalue_1d
+      LOGICAL(KIND=C_BOOL) :: lonvalue_1d_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: lonvalue_2d
+      LOGICAL(KIND=C_BOOL) :: lonvalue_2d_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: mask_1d
+      LOGICAL(KIND=C_BOOL) :: mask_1d_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: mask_2d
+      LOGICAL(KIND=C_BOOL) :: mask_2d_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: name
+      LOGICAL(KIND=C_BOOL) :: name_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: ni
+      LOGICAL(KIND=C_BOOL) :: ni_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: ni_glo
+      LOGICAL(KIND=C_BOOL) :: ni_glo_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: nj
+      LOGICAL(KIND=C_BOOL) :: nj_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: nj_glo
+      LOGICAL(KIND=C_BOOL) :: nj_glo_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: nvertex
+      LOGICAL(KIND=C_BOOL) :: nvertex_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: prec
+      LOGICAL(KIND=C_BOOL) :: prec_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: radius
+      LOGICAL(KIND=C_BOOL) :: radius_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: standard_name
+      LOGICAL(KIND=C_BOOL) :: standard_name_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: type
+      LOGICAL(KIND=C_BOOL) :: type_tmp
+
+      CALL xios(is_defined_domain_attr_hdl_)  &
+      ( domain_hdl, area, bounds_lat_1d, bounds_lat_2d, bounds_lat_name, bounds_lon_1d, bounds_lon_2d  &
+      , bounds_lon_name, comment, data_dim, data_i_index, data_ibegin, data_j_index, data_jbegin, data_ni  &
+      , data_nj, dim_i_name, dim_j_name, domain_ref, i_index, ibegin, j_index, jbegin, lat_name, latvalue_1d  &
+      , latvalue_2d, lon_name, long_name, lonvalue_1d, lonvalue_2d, mask_1d, mask_2d, name, ni, ni_glo  &
+      , nj, nj_glo, nvertex, prec, radius, standard_name, type )
+
+  END SUBROUTINE xios(is_defined_domain_attr_hdl)
+
+  SUBROUTINE xios(is_defined_domain_attr_hdl_)   &
+    ( domain_hdl, area_, bounds_lat_1d_, bounds_lat_2d_, bounds_lat_name_, bounds_lon_1d_, bounds_lon_2d_  &
+    , bounds_lon_name_, comment_, data_dim_, data_i_index_, data_ibegin_, data_j_index_, data_jbegin_  &
+    , data_ni_, data_nj_, dim_i_name_, dim_j_name_, domain_ref_, i_index_, ibegin_, j_index_, jbegin_  &
+    , lat_name_, latvalue_1d_, latvalue_2d_, lon_name_, long_name_, lonvalue_1d_, lonvalue_2d_, mask_1d_  &
+    , mask_2d_, name_, ni_, ni_glo_, nj_, nj_glo_, nvertex_, prec_, radius_, standard_name_, type_  &
+     )
+
+    IMPLICIT NONE
+      TYPE(txios(domain)) , INTENT(IN) :: domain_hdl
+      LOGICAL, OPTIONAL, INTENT(OUT) :: area_
+      LOGICAL(KIND=C_BOOL) :: area__tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: bounds_lat_1d_
+      LOGICAL(KIND=C_BOOL) :: bounds_lat_1d__tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: bounds_lat_2d_
+      LOGICAL(KIND=C_BOOL) :: bounds_lat_2d__tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: bounds_lat_name_
+      LOGICAL(KIND=C_BOOL) :: bounds_lat_name__tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: bounds_lon_1d_
+      LOGICAL(KIND=C_BOOL) :: bounds_lon_1d__tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: bounds_lon_2d_
+      LOGICAL(KIND=C_BOOL) :: bounds_lon_2d__tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: bounds_lon_name_
+      LOGICAL(KIND=C_BOOL) :: bounds_lon_name__tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: comment_
+      LOGICAL(KIND=C_BOOL) :: comment__tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: data_dim_
+      LOGICAL(KIND=C_BOOL) :: data_dim__tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: data_i_index_
+      LOGICAL(KIND=C_BOOL) :: data_i_index__tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: data_ibegin_
+      LOGICAL(KIND=C_BOOL) :: data_ibegin__tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: data_j_index_
+      LOGICAL(KIND=C_BOOL) :: data_j_index__tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: data_jbegin_
+      LOGICAL(KIND=C_BOOL) :: data_jbegin__tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: data_ni_
+      LOGICAL(KIND=C_BOOL) :: data_ni__tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: data_nj_
+      LOGICAL(KIND=C_BOOL) :: data_nj__tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: dim_i_name_
+      LOGICAL(KIND=C_BOOL) :: dim_i_name__tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: dim_j_name_
+      LOGICAL(KIND=C_BOOL) :: dim_j_name__tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: domain_ref_
+      LOGICAL(KIND=C_BOOL) :: domain_ref__tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: i_index_
+      LOGICAL(KIND=C_BOOL) :: i_index__tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: ibegin_
+      LOGICAL(KIND=C_BOOL) :: ibegin__tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: j_index_
+      LOGICAL(KIND=C_BOOL) :: j_index__tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: jbegin_
+      LOGICAL(KIND=C_BOOL) :: jbegin__tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: lat_name_
+      LOGICAL(KIND=C_BOOL) :: lat_name__tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: latvalue_1d_
+      LOGICAL(KIND=C_BOOL) :: latvalue_1d__tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: latvalue_2d_
+      LOGICAL(KIND=C_BOOL) :: latvalue_2d__tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: lon_name_
+      LOGICAL(KIND=C_BOOL) :: lon_name__tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: long_name_
+      LOGICAL(KIND=C_BOOL) :: long_name__tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: lonvalue_1d_
+      LOGICAL(KIND=C_BOOL) :: lonvalue_1d__tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: lonvalue_2d_
+      LOGICAL(KIND=C_BOOL) :: lonvalue_2d__tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: mask_1d_
+      LOGICAL(KIND=C_BOOL) :: mask_1d__tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: mask_2d_
+      LOGICAL(KIND=C_BOOL) :: mask_2d__tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: name_
+      LOGICAL(KIND=C_BOOL) :: name__tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: ni_
+      LOGICAL(KIND=C_BOOL) :: ni__tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: ni_glo_
+      LOGICAL(KIND=C_BOOL) :: ni_glo__tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: nj_
+      LOGICAL(KIND=C_BOOL) :: nj__tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: nj_glo_
+      LOGICAL(KIND=C_BOOL) :: nj_glo__tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: nvertex_
+      LOGICAL(KIND=C_BOOL) :: nvertex__tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: prec_
+      LOGICAL(KIND=C_BOOL) :: prec__tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: radius_
+      LOGICAL(KIND=C_BOOL) :: radius__tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: standard_name_
+      LOGICAL(KIND=C_BOOL) :: standard_name__tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: type_
+      LOGICAL(KIND=C_BOOL) :: type__tmp
+
+      IF (PRESENT(area_)) THEN
+        area__tmp = cxios_is_defined_domain_area &
+      (domain_hdl%daddr)
+        area_ = area__tmp
+      ENDIF
+
+      IF (PRESENT(bounds_lat_1d_)) THEN
+        bounds_lat_1d__tmp = cxios_is_defined_domain_bounds_lat_1d &
+      (domain_hdl%daddr)
+        bounds_lat_1d_ = bounds_lat_1d__tmp
+      ENDIF
+
+      IF (PRESENT(bounds_lat_2d_)) THEN
+        bounds_lat_2d__tmp = cxios_is_defined_domain_bounds_lat_2d &
+      (domain_hdl%daddr)
+        bounds_lat_2d_ = bounds_lat_2d__tmp
+      ENDIF
+
+      IF (PRESENT(bounds_lat_name_)) THEN
+        bounds_lat_name__tmp = cxios_is_defined_domain_bounds_lat_name &
+      (domain_hdl%daddr)
+        bounds_lat_name_ = bounds_lat_name__tmp
+      ENDIF
+
+      IF (PRESENT(bounds_lon_1d_)) THEN
+        bounds_lon_1d__tmp = cxios_is_defined_domain_bounds_lon_1d &
+      (domain_hdl%daddr)
+        bounds_lon_1d_ = bounds_lon_1d__tmp
+      ENDIF
+
+      IF (PRESENT(bounds_lon_2d_)) THEN
+        bounds_lon_2d__tmp = cxios_is_defined_domain_bounds_lon_2d &
+      (domain_hdl%daddr)
+        bounds_lon_2d_ = bounds_lon_2d__tmp
+      ENDIF
+
+      IF (PRESENT(bounds_lon_name_)) THEN
+        bounds_lon_name__tmp = cxios_is_defined_domain_bounds_lon_name &
+      (domain_hdl%daddr)
+        bounds_lon_name_ = bounds_lon_name__tmp
+      ENDIF
+
+      IF (PRESENT(comment_)) THEN
+        comment__tmp = cxios_is_defined_domain_comment &
+      (domain_hdl%daddr)
+        comment_ = comment__tmp
+      ENDIF
+
+      IF (PRESENT(data_dim_)) THEN
+        data_dim__tmp = cxios_is_defined_domain_data_dim &
+      (domain_hdl%daddr)
+        data_dim_ = data_dim__tmp
+      ENDIF
+
+      IF (PRESENT(data_i_index_)) THEN
+        data_i_index__tmp = cxios_is_defined_domain_data_i_index &
+      (domain_hdl%daddr)
+        data_i_index_ = data_i_index__tmp
+      ENDIF
+
+      IF (PRESENT(data_ibegin_)) THEN
+        data_ibegin__tmp = cxios_is_defined_domain_data_ibegin &
+      (domain_hdl%daddr)
+        data_ibegin_ = data_ibegin__tmp
+      ENDIF
+
+      IF (PRESENT(data_j_index_)) THEN
+        data_j_index__tmp = cxios_is_defined_domain_data_j_index &
+      (domain_hdl%daddr)
+        data_j_index_ = data_j_index__tmp
+      ENDIF
+
+      IF (PRESENT(data_jbegin_)) THEN
+        data_jbegin__tmp = cxios_is_defined_domain_data_jbegin &
+      (domain_hdl%daddr)
+        data_jbegin_ = data_jbegin__tmp
+      ENDIF
+
+      IF (PRESENT(data_ni_)) THEN
+        data_ni__tmp = cxios_is_defined_domain_data_ni &
+      (domain_hdl%daddr)
+        data_ni_ = data_ni__tmp
+      ENDIF
+
+      IF (PRESENT(data_nj_)) THEN
+        data_nj__tmp = cxios_is_defined_domain_data_nj &
+      (domain_hdl%daddr)
+        data_nj_ = data_nj__tmp
+      ENDIF
+
+      IF (PRESENT(dim_i_name_)) THEN
+        dim_i_name__tmp = cxios_is_defined_domain_dim_i_name &
+      (domain_hdl%daddr)
+        dim_i_name_ = dim_i_name__tmp
+      ENDIF
+
+      IF (PRESENT(dim_j_name_)) THEN
+        dim_j_name__tmp = cxios_is_defined_domain_dim_j_name &
+      (domain_hdl%daddr)
+        dim_j_name_ = dim_j_name__tmp
+      ENDIF
+
+      IF (PRESENT(domain_ref_)) THEN
+        domain_ref__tmp = cxios_is_defined_domain_domain_ref &
+      (domain_hdl%daddr)
+        domain_ref_ = domain_ref__tmp
+      ENDIF
+
+      IF (PRESENT(i_index_)) THEN
+        i_index__tmp = cxios_is_defined_domain_i_index &
+      (domain_hdl%daddr)
+        i_index_ = i_index__tmp
+      ENDIF
+
+      IF (PRESENT(ibegin_)) THEN
+        ibegin__tmp = cxios_is_defined_domain_ibegin &
+      (domain_hdl%daddr)
+        ibegin_ = ibegin__tmp
+      ENDIF
+
+      IF (PRESENT(j_index_)) THEN
+        j_index__tmp = cxios_is_defined_domain_j_index &
+      (domain_hdl%daddr)
+        j_index_ = j_index__tmp
+      ENDIF
+
+      IF (PRESENT(jbegin_)) THEN
+        jbegin__tmp = cxios_is_defined_domain_jbegin &
+      (domain_hdl%daddr)
+        jbegin_ = jbegin__tmp
+      ENDIF
+
+      IF (PRESENT(lat_name_)) THEN
+        lat_name__tmp = cxios_is_defined_domain_lat_name &
+      (domain_hdl%daddr)
+        lat_name_ = lat_name__tmp
+      ENDIF
+
+      IF (PRESENT(latvalue_1d_)) THEN
+        latvalue_1d__tmp = cxios_is_defined_domain_latvalue_1d &
+      (domain_hdl%daddr)
+        latvalue_1d_ = latvalue_1d__tmp
+      ENDIF
+
+      IF (PRESENT(latvalue_2d_)) THEN
+        latvalue_2d__tmp = cxios_is_defined_domain_latvalue_2d &
+      (domain_hdl%daddr)
+        latvalue_2d_ = latvalue_2d__tmp
+      ENDIF
+
+      IF (PRESENT(lon_name_)) THEN
+        lon_name__tmp = cxios_is_defined_domain_lon_name &
+      (domain_hdl%daddr)
+        lon_name_ = lon_name__tmp
+      ENDIF
+
+      IF (PRESENT(long_name_)) THEN
+        long_name__tmp = cxios_is_defined_domain_long_name &
+      (domain_hdl%daddr)
+        long_name_ = long_name__tmp
+      ENDIF
+
+      IF (PRESENT(lonvalue_1d_)) THEN
+        lonvalue_1d__tmp = cxios_is_defined_domain_lonvalue_1d &
+      (domain_hdl%daddr)
+        lonvalue_1d_ = lonvalue_1d__tmp
+      ENDIF
+
+      IF (PRESENT(lonvalue_2d_)) THEN
+        lonvalue_2d__tmp = cxios_is_defined_domain_lonvalue_2d &
+      (domain_hdl%daddr)
+        lonvalue_2d_ = lonvalue_2d__tmp
+      ENDIF
+
+      IF (PRESENT(mask_1d_)) THEN
+        mask_1d__tmp = cxios_is_defined_domain_mask_1d &
+      (domain_hdl%daddr)
+        mask_1d_ = mask_1d__tmp
+      ENDIF
+
+      IF (PRESENT(mask_2d_)) THEN
+        mask_2d__tmp = cxios_is_defined_domain_mask_2d &
+      (domain_hdl%daddr)
+        mask_2d_ = mask_2d__tmp
+      ENDIF
+
+      IF (PRESENT(name_)) THEN
+        name__tmp = cxios_is_defined_domain_name &
+      (domain_hdl%daddr)
+        name_ = name__tmp
+      ENDIF
+
+      IF (PRESENT(ni_)) THEN
+        ni__tmp = cxios_is_defined_domain_ni &
+      (domain_hdl%daddr)
+        ni_ = ni__tmp
+      ENDIF
+
+      IF (PRESENT(ni_glo_)) THEN
+        ni_glo__tmp = cxios_is_defined_domain_ni_glo &
+      (domain_hdl%daddr)
+        ni_glo_ = ni_glo__tmp
+      ENDIF
+
+      IF (PRESENT(nj_)) THEN
+        nj__tmp = cxios_is_defined_domain_nj &
+      (domain_hdl%daddr)
+        nj_ = nj__tmp
+      ENDIF
+
+      IF (PRESENT(nj_glo_)) THEN
+        nj_glo__tmp = cxios_is_defined_domain_nj_glo &
+      (domain_hdl%daddr)
+        nj_glo_ = nj_glo__tmp
+      ENDIF
+
+      IF (PRESENT(nvertex_)) THEN
+        nvertex__tmp = cxios_is_defined_domain_nvertex &
+      (domain_hdl%daddr)
+        nvertex_ = nvertex__tmp
+      ENDIF
+
+      IF (PRESENT(prec_)) THEN
+        prec__tmp = cxios_is_defined_domain_prec &
+      (domain_hdl%daddr)
+        prec_ = prec__tmp
+      ENDIF
+
+      IF (PRESENT(radius_)) THEN
+        radius__tmp = cxios_is_defined_domain_radius &
+      (domain_hdl%daddr)
+        radius_ = radius__tmp
+      ENDIF
+
+      IF (PRESENT(standard_name_)) THEN
+        standard_name__tmp = cxios_is_defined_domain_standard_name &
+      (domain_hdl%daddr)
+        standard_name_ = standard_name__tmp
+      ENDIF
+
+      IF (PRESENT(type_)) THEN
+        type__tmp = cxios_is_defined_domain_type &
+      (domain_hdl%daddr)
+        type_ = type__tmp
+      ENDIF
+
+  END SUBROUTINE xios(is_defined_domain_attr_hdl_)
+
+END MODULE idomain_attr
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/fortran_attr/idomaingroup_attr.F90
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/fortran_attr/idomaingroup_attr.F90	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/fortran_attr/idomaingroup_attr.F90	(revision 1749)
@@ -0,0 +1,1371 @@
+! * ************************************************************************** *
+! *               Interface auto generated - do not modify                     *
+! * ************************************************************************** *
+#include "xios_fortran_prefix.hpp"
+
+MODULE idomaingroup_attr
+  USE, INTRINSIC :: ISO_C_BINDING
+  USE idomain
+  USE domaingroup_interface_attr
+
+CONTAINS
+
+  SUBROUTINE xios(set_domaingroup_attr)  &
+    ( domaingroup_id, area, bounds_lat_1d, bounds_lat_2d, bounds_lat_name, bounds_lon_1d, bounds_lon_2d  &
+    , bounds_lon_name, comment, data_dim, data_i_index, data_ibegin, data_j_index, data_jbegin, data_ni  &
+    , data_nj, dim_i_name, dim_j_name, domain_ref, group_ref, i_index, ibegin, j_index, jbegin, lat_name  &
+    , latvalue_1d, latvalue_2d, lon_name, long_name, lonvalue_1d, lonvalue_2d, mask_1d, mask_2d  &
+    , name, ni, ni_glo, nj, nj_glo, nvertex, prec, radius, standard_name, type )
+
+    IMPLICIT NONE
+      TYPE(txios(domaingroup))  :: domaingroup_hdl
+      CHARACTER(LEN=*), INTENT(IN) ::domaingroup_id
+      REAL (KIND=8) , OPTIONAL, INTENT(IN) :: area(:,:)
+      REAL (KIND=8) , OPTIONAL, INTENT(IN) :: bounds_lat_1d(:,:)
+      REAL (KIND=8) , OPTIONAL, INTENT(IN) :: bounds_lat_2d(:,:,:)
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: bounds_lat_name
+      REAL (KIND=8) , OPTIONAL, INTENT(IN) :: bounds_lon_1d(:,:)
+      REAL (KIND=8) , OPTIONAL, INTENT(IN) :: bounds_lon_2d(:,:,:)
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: bounds_lon_name
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: comment
+      INTEGER  , OPTIONAL, INTENT(IN) :: data_dim
+      INTEGER  , OPTIONAL, INTENT(IN) :: data_i_index(:)
+      INTEGER  , OPTIONAL, INTENT(IN) :: data_ibegin
+      INTEGER  , OPTIONAL, INTENT(IN) :: data_j_index(:)
+      INTEGER  , OPTIONAL, INTENT(IN) :: data_jbegin
+      INTEGER  , OPTIONAL, INTENT(IN) :: data_ni
+      INTEGER  , OPTIONAL, INTENT(IN) :: data_nj
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: dim_i_name
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: dim_j_name
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: domain_ref
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: group_ref
+      INTEGER  , OPTIONAL, INTENT(IN) :: i_index(:)
+      INTEGER  , OPTIONAL, INTENT(IN) :: ibegin
+      INTEGER  , OPTIONAL, INTENT(IN) :: j_index(:)
+      INTEGER  , OPTIONAL, INTENT(IN) :: jbegin
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: lat_name
+      REAL (KIND=8) , OPTIONAL, INTENT(IN) :: latvalue_1d(:)
+      REAL (KIND=8) , OPTIONAL, INTENT(IN) :: latvalue_2d(:,:)
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: lon_name
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: long_name
+      REAL (KIND=8) , OPTIONAL, INTENT(IN) :: lonvalue_1d(:)
+      REAL (KIND=8) , OPTIONAL, INTENT(IN) :: lonvalue_2d(:,:)
+      LOGICAL  , OPTIONAL, INTENT(IN) :: mask_1d(:)
+      LOGICAL (KIND=C_BOOL) , ALLOCATABLE :: mask_1d_tmp(:)
+      LOGICAL  , OPTIONAL, INTENT(IN) :: mask_2d(:,:)
+      LOGICAL (KIND=C_BOOL) , ALLOCATABLE :: mask_2d_tmp(:,:)
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: name
+      INTEGER  , OPTIONAL, INTENT(IN) :: ni
+      INTEGER  , OPTIONAL, INTENT(IN) :: ni_glo
+      INTEGER  , OPTIONAL, INTENT(IN) :: nj
+      INTEGER  , OPTIONAL, INTENT(IN) :: nj_glo
+      INTEGER  , OPTIONAL, INTENT(IN) :: nvertex
+      INTEGER  , OPTIONAL, INTENT(IN) :: prec
+      REAL (KIND=8) , OPTIONAL, INTENT(IN) :: radius
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: standard_name
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: type
+
+      CALL xios(get_domaingroup_handle) &
+      (domaingroup_id,domaingroup_hdl)
+      CALL xios(set_domaingroup_attr_hdl_)   &
+      ( domaingroup_hdl, area, bounds_lat_1d, bounds_lat_2d, bounds_lat_name, bounds_lon_1d, bounds_lon_2d  &
+      , bounds_lon_name, comment, data_dim, data_i_index, data_ibegin, data_j_index, data_jbegin, data_ni  &
+      , data_nj, dim_i_name, dim_j_name, domain_ref, group_ref, i_index, ibegin, j_index, jbegin, lat_name  &
+      , latvalue_1d, latvalue_2d, lon_name, long_name, lonvalue_1d, lonvalue_2d, mask_1d, mask_2d  &
+      , name, ni, ni_glo, nj, nj_glo, nvertex, prec, radius, standard_name, type )
+
+  END SUBROUTINE xios(set_domaingroup_attr)
+
+  SUBROUTINE xios(set_domaingroup_attr_hdl)  &
+    ( domaingroup_hdl, area, bounds_lat_1d, bounds_lat_2d, bounds_lat_name, bounds_lon_1d, bounds_lon_2d  &
+    , bounds_lon_name, comment, data_dim, data_i_index, data_ibegin, data_j_index, data_jbegin, data_ni  &
+    , data_nj, dim_i_name, dim_j_name, domain_ref, group_ref, i_index, ibegin, j_index, jbegin, lat_name  &
+    , latvalue_1d, latvalue_2d, lon_name, long_name, lonvalue_1d, lonvalue_2d, mask_1d, mask_2d  &
+    , name, ni, ni_glo, nj, nj_glo, nvertex, prec, radius, standard_name, type )
+
+    IMPLICIT NONE
+      TYPE(txios(domaingroup)) , INTENT(IN) :: domaingroup_hdl
+      REAL (KIND=8) , OPTIONAL, INTENT(IN) :: area(:,:)
+      REAL (KIND=8) , OPTIONAL, INTENT(IN) :: bounds_lat_1d(:,:)
+      REAL (KIND=8) , OPTIONAL, INTENT(IN) :: bounds_lat_2d(:,:,:)
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: bounds_lat_name
+      REAL (KIND=8) , OPTIONAL, INTENT(IN) :: bounds_lon_1d(:,:)
+      REAL (KIND=8) , OPTIONAL, INTENT(IN) :: bounds_lon_2d(:,:,:)
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: bounds_lon_name
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: comment
+      INTEGER  , OPTIONAL, INTENT(IN) :: data_dim
+      INTEGER  , OPTIONAL, INTENT(IN) :: data_i_index(:)
+      INTEGER  , OPTIONAL, INTENT(IN) :: data_ibegin
+      INTEGER  , OPTIONAL, INTENT(IN) :: data_j_index(:)
+      INTEGER  , OPTIONAL, INTENT(IN) :: data_jbegin
+      INTEGER  , OPTIONAL, INTENT(IN) :: data_ni
+      INTEGER  , OPTIONAL, INTENT(IN) :: data_nj
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: dim_i_name
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: dim_j_name
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: domain_ref
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: group_ref
+      INTEGER  , OPTIONAL, INTENT(IN) :: i_index(:)
+      INTEGER  , OPTIONAL, INTENT(IN) :: ibegin
+      INTEGER  , OPTIONAL, INTENT(IN) :: j_index(:)
+      INTEGER  , OPTIONAL, INTENT(IN) :: jbegin
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: lat_name
+      REAL (KIND=8) , OPTIONAL, INTENT(IN) :: latvalue_1d(:)
+      REAL (KIND=8) , OPTIONAL, INTENT(IN) :: latvalue_2d(:,:)
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: lon_name
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: long_name
+      REAL (KIND=8) , OPTIONAL, INTENT(IN) :: lonvalue_1d(:)
+      REAL (KIND=8) , OPTIONAL, INTENT(IN) :: lonvalue_2d(:,:)
+      LOGICAL  , OPTIONAL, INTENT(IN) :: mask_1d(:)
+      LOGICAL (KIND=C_BOOL) , ALLOCATABLE :: mask_1d_tmp(:)
+      LOGICAL  , OPTIONAL, INTENT(IN) :: mask_2d(:,:)
+      LOGICAL (KIND=C_BOOL) , ALLOCATABLE :: mask_2d_tmp(:,:)
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: name
+      INTEGER  , OPTIONAL, INTENT(IN) :: ni
+      INTEGER  , OPTIONAL, INTENT(IN) :: ni_glo
+      INTEGER  , OPTIONAL, INTENT(IN) :: nj
+      INTEGER  , OPTIONAL, INTENT(IN) :: nj_glo
+      INTEGER  , OPTIONAL, INTENT(IN) :: nvertex
+      INTEGER  , OPTIONAL, INTENT(IN) :: prec
+      REAL (KIND=8) , OPTIONAL, INTENT(IN) :: radius
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: standard_name
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: type
+
+      CALL xios(set_domaingroup_attr_hdl_)  &
+      ( domaingroup_hdl, area, bounds_lat_1d, bounds_lat_2d, bounds_lat_name, bounds_lon_1d, bounds_lon_2d  &
+      , bounds_lon_name, comment, data_dim, data_i_index, data_ibegin, data_j_index, data_jbegin, data_ni  &
+      , data_nj, dim_i_name, dim_j_name, domain_ref, group_ref, i_index, ibegin, j_index, jbegin, lat_name  &
+      , latvalue_1d, latvalue_2d, lon_name, long_name, lonvalue_1d, lonvalue_2d, mask_1d, mask_2d  &
+      , name, ni, ni_glo, nj, nj_glo, nvertex, prec, radius, standard_name, type )
+
+  END SUBROUTINE xios(set_domaingroup_attr_hdl)
+
+  SUBROUTINE xios(set_domaingroup_attr_hdl_)   &
+    ( domaingroup_hdl, area_, bounds_lat_1d_, bounds_lat_2d_, bounds_lat_name_, bounds_lon_1d_, bounds_lon_2d_  &
+    , bounds_lon_name_, comment_, data_dim_, data_i_index_, data_ibegin_, data_j_index_, data_jbegin_  &
+    , data_ni_, data_nj_, dim_i_name_, dim_j_name_, domain_ref_, group_ref_, i_index_, ibegin_, j_index_  &
+    , jbegin_, lat_name_, latvalue_1d_, latvalue_2d_, lon_name_, long_name_, lonvalue_1d_, lonvalue_2d_  &
+    , mask_1d_, mask_2d_, name_, ni_, ni_glo_, nj_, nj_glo_, nvertex_, prec_, radius_, standard_name_  &
+    , type_ )
+
+    IMPLICIT NONE
+      TYPE(txios(domaingroup)) , INTENT(IN) :: domaingroup_hdl
+      REAL (KIND=8) , OPTIONAL, INTENT(IN) :: area_(:,:)
+      REAL (KIND=8) , OPTIONAL, INTENT(IN) :: bounds_lat_1d_(:,:)
+      REAL (KIND=8) , OPTIONAL, INTENT(IN) :: bounds_lat_2d_(:,:,:)
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: bounds_lat_name_
+      REAL (KIND=8) , OPTIONAL, INTENT(IN) :: bounds_lon_1d_(:,:)
+      REAL (KIND=8) , OPTIONAL, INTENT(IN) :: bounds_lon_2d_(:,:,:)
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: bounds_lon_name_
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: comment_
+      INTEGER  , OPTIONAL, INTENT(IN) :: data_dim_
+      INTEGER  , OPTIONAL, INTENT(IN) :: data_i_index_(:)
+      INTEGER  , OPTIONAL, INTENT(IN) :: data_ibegin_
+      INTEGER  , OPTIONAL, INTENT(IN) :: data_j_index_(:)
+      INTEGER  , OPTIONAL, INTENT(IN) :: data_jbegin_
+      INTEGER  , OPTIONAL, INTENT(IN) :: data_ni_
+      INTEGER  , OPTIONAL, INTENT(IN) :: data_nj_
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: dim_i_name_
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: dim_j_name_
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: domain_ref_
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: group_ref_
+      INTEGER  , OPTIONAL, INTENT(IN) :: i_index_(:)
+      INTEGER  , OPTIONAL, INTENT(IN) :: ibegin_
+      INTEGER  , OPTIONAL, INTENT(IN) :: j_index_(:)
+      INTEGER  , OPTIONAL, INTENT(IN) :: jbegin_
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: lat_name_
+      REAL (KIND=8) , OPTIONAL, INTENT(IN) :: latvalue_1d_(:)
+      REAL (KIND=8) , OPTIONAL, INTENT(IN) :: latvalue_2d_(:,:)
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: lon_name_
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: long_name_
+      REAL (KIND=8) , OPTIONAL, INTENT(IN) :: lonvalue_1d_(:)
+      REAL (KIND=8) , OPTIONAL, INTENT(IN) :: lonvalue_2d_(:,:)
+      LOGICAL  , OPTIONAL, INTENT(IN) :: mask_1d_(:)
+      LOGICAL (KIND=C_BOOL) , ALLOCATABLE :: mask_1d__tmp(:)
+      LOGICAL  , OPTIONAL, INTENT(IN) :: mask_2d_(:,:)
+      LOGICAL (KIND=C_BOOL) , ALLOCATABLE :: mask_2d__tmp(:,:)
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: name_
+      INTEGER  , OPTIONAL, INTENT(IN) :: ni_
+      INTEGER  , OPTIONAL, INTENT(IN) :: ni_glo_
+      INTEGER  , OPTIONAL, INTENT(IN) :: nj_
+      INTEGER  , OPTIONAL, INTENT(IN) :: nj_glo_
+      INTEGER  , OPTIONAL, INTENT(IN) :: nvertex_
+      INTEGER  , OPTIONAL, INTENT(IN) :: prec_
+      REAL (KIND=8) , OPTIONAL, INTENT(IN) :: radius_
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: standard_name_
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: type_
+
+      IF (PRESENT(area_)) THEN
+        CALL cxios_set_domaingroup_area &
+      (domaingroup_hdl%daddr, area_, SHAPE(area_))
+      ENDIF
+
+      IF (PRESENT(bounds_lat_1d_)) THEN
+        CALL cxios_set_domaingroup_bounds_lat_1d &
+      (domaingroup_hdl%daddr, bounds_lat_1d_, SHAPE(bounds_lat_1d_))
+      ENDIF
+
+      IF (PRESENT(bounds_lat_2d_)) THEN
+        CALL cxios_set_domaingroup_bounds_lat_2d &
+      (domaingroup_hdl%daddr, bounds_lat_2d_, SHAPE(bounds_lat_2d_))
+      ENDIF
+
+      IF (PRESENT(bounds_lat_name_)) THEN
+        CALL cxios_set_domaingroup_bounds_lat_name &
+      (domaingroup_hdl%daddr, bounds_lat_name_, len(bounds_lat_name_))
+      ENDIF
+
+      IF (PRESENT(bounds_lon_1d_)) THEN
+        CALL cxios_set_domaingroup_bounds_lon_1d &
+      (domaingroup_hdl%daddr, bounds_lon_1d_, SHAPE(bounds_lon_1d_))
+      ENDIF
+
+      IF (PRESENT(bounds_lon_2d_)) THEN
+        CALL cxios_set_domaingroup_bounds_lon_2d &
+      (domaingroup_hdl%daddr, bounds_lon_2d_, SHAPE(bounds_lon_2d_))
+      ENDIF
+
+      IF (PRESENT(bounds_lon_name_)) THEN
+        CALL cxios_set_domaingroup_bounds_lon_name &
+      (domaingroup_hdl%daddr, bounds_lon_name_, len(bounds_lon_name_))
+      ENDIF
+
+      IF (PRESENT(comment_)) THEN
+        CALL cxios_set_domaingroup_comment &
+      (domaingroup_hdl%daddr, comment_, len(comment_))
+      ENDIF
+
+      IF (PRESENT(data_dim_)) THEN
+        CALL cxios_set_domaingroup_data_dim &
+      (domaingroup_hdl%daddr, data_dim_)
+      ENDIF
+
+      IF (PRESENT(data_i_index_)) THEN
+        CALL cxios_set_domaingroup_data_i_index &
+      (domaingroup_hdl%daddr, data_i_index_, SHAPE(data_i_index_))
+      ENDIF
+
+      IF (PRESENT(data_ibegin_)) THEN
+        CALL cxios_set_domaingroup_data_ibegin &
+      (domaingroup_hdl%daddr, data_ibegin_)
+      ENDIF
+
+      IF (PRESENT(data_j_index_)) THEN
+        CALL cxios_set_domaingroup_data_j_index &
+      (domaingroup_hdl%daddr, data_j_index_, SHAPE(data_j_index_))
+      ENDIF
+
+      IF (PRESENT(data_jbegin_)) THEN
+        CALL cxios_set_domaingroup_data_jbegin &
+      (domaingroup_hdl%daddr, data_jbegin_)
+      ENDIF
+
+      IF (PRESENT(data_ni_)) THEN
+        CALL cxios_set_domaingroup_data_ni &
+      (domaingroup_hdl%daddr, data_ni_)
+      ENDIF
+
+      IF (PRESENT(data_nj_)) THEN
+        CALL cxios_set_domaingroup_data_nj &
+      (domaingroup_hdl%daddr, data_nj_)
+      ENDIF
+
+      IF (PRESENT(dim_i_name_)) THEN
+        CALL cxios_set_domaingroup_dim_i_name &
+      (domaingroup_hdl%daddr, dim_i_name_, len(dim_i_name_))
+      ENDIF
+
+      IF (PRESENT(dim_j_name_)) THEN
+        CALL cxios_set_domaingroup_dim_j_name &
+      (domaingroup_hdl%daddr, dim_j_name_, len(dim_j_name_))
+      ENDIF
+
+      IF (PRESENT(domain_ref_)) THEN
+        CALL cxios_set_domaingroup_domain_ref &
+      (domaingroup_hdl%daddr, domain_ref_, len(domain_ref_))
+      ENDIF
+
+      IF (PRESENT(group_ref_)) THEN
+        CALL cxios_set_domaingroup_group_ref &
+      (domaingroup_hdl%daddr, group_ref_, len(group_ref_))
+      ENDIF
+
+      IF (PRESENT(i_index_)) THEN
+        CALL cxios_set_domaingroup_i_index &
+      (domaingroup_hdl%daddr, i_index_, SHAPE(i_index_))
+      ENDIF
+
+      IF (PRESENT(ibegin_)) THEN
+        CALL cxios_set_domaingroup_ibegin &
+      (domaingroup_hdl%daddr, ibegin_)
+      ENDIF
+
+      IF (PRESENT(j_index_)) THEN
+        CALL cxios_set_domaingroup_j_index &
+      (domaingroup_hdl%daddr, j_index_, SHAPE(j_index_))
+      ENDIF
+
+      IF (PRESENT(jbegin_)) THEN
+        CALL cxios_set_domaingroup_jbegin &
+      (domaingroup_hdl%daddr, jbegin_)
+      ENDIF
+
+      IF (PRESENT(lat_name_)) THEN
+        CALL cxios_set_domaingroup_lat_name &
+      (domaingroup_hdl%daddr, lat_name_, len(lat_name_))
+      ENDIF
+
+      IF (PRESENT(latvalue_1d_)) THEN
+        CALL cxios_set_domaingroup_latvalue_1d &
+      (domaingroup_hdl%daddr, latvalue_1d_, SHAPE(latvalue_1d_))
+      ENDIF
+
+      IF (PRESENT(latvalue_2d_)) THEN
+        CALL cxios_set_domaingroup_latvalue_2d &
+      (domaingroup_hdl%daddr, latvalue_2d_, SHAPE(latvalue_2d_))
+      ENDIF
+
+      IF (PRESENT(lon_name_)) THEN
+        CALL cxios_set_domaingroup_lon_name &
+      (domaingroup_hdl%daddr, lon_name_, len(lon_name_))
+      ENDIF
+
+      IF (PRESENT(long_name_)) THEN
+        CALL cxios_set_domaingroup_long_name &
+      (domaingroup_hdl%daddr, long_name_, len(long_name_))
+      ENDIF
+
+      IF (PRESENT(lonvalue_1d_)) THEN
+        CALL cxios_set_domaingroup_lonvalue_1d &
+      (domaingroup_hdl%daddr, lonvalue_1d_, SHAPE(lonvalue_1d_))
+      ENDIF
+
+      IF (PRESENT(lonvalue_2d_)) THEN
+        CALL cxios_set_domaingroup_lonvalue_2d &
+      (domaingroup_hdl%daddr, lonvalue_2d_, SHAPE(lonvalue_2d_))
+      ENDIF
+
+      IF (PRESENT(mask_1d_)) THEN
+        ALLOCATE(mask_1d__tmp(SIZE(mask_1d_,1)))
+        mask_1d__tmp = mask_1d_
+        CALL cxios_set_domaingroup_mask_1d &
+      (domaingroup_hdl%daddr, mask_1d__tmp, SHAPE(mask_1d_))
+      ENDIF
+
+      IF (PRESENT(mask_2d_)) THEN
+        ALLOCATE(mask_2d__tmp(SIZE(mask_2d_,1), SIZE(mask_2d_,2)))
+        mask_2d__tmp = mask_2d_
+        CALL cxios_set_domaingroup_mask_2d &
+      (domaingroup_hdl%daddr, mask_2d__tmp, SHAPE(mask_2d_))
+      ENDIF
+
+      IF (PRESENT(name_)) THEN
+        CALL cxios_set_domaingroup_name &
+      (domaingroup_hdl%daddr, name_, len(name_))
+      ENDIF
+
+      IF (PRESENT(ni_)) THEN
+        CALL cxios_set_domaingroup_ni &
+      (domaingroup_hdl%daddr, ni_)
+      ENDIF
+
+      IF (PRESENT(ni_glo_)) THEN
+        CALL cxios_set_domaingroup_ni_glo &
+      (domaingroup_hdl%daddr, ni_glo_)
+      ENDIF
+
+      IF (PRESENT(nj_)) THEN
+        CALL cxios_set_domaingroup_nj &
+      (domaingroup_hdl%daddr, nj_)
+      ENDIF
+
+      IF (PRESENT(nj_glo_)) THEN
+        CALL cxios_set_domaingroup_nj_glo &
+      (domaingroup_hdl%daddr, nj_glo_)
+      ENDIF
+
+      IF (PRESENT(nvertex_)) THEN
+        CALL cxios_set_domaingroup_nvertex &
+      (domaingroup_hdl%daddr, nvertex_)
+      ENDIF
+
+      IF (PRESENT(prec_)) THEN
+        CALL cxios_set_domaingroup_prec &
+      (domaingroup_hdl%daddr, prec_)
+      ENDIF
+
+      IF (PRESENT(radius_)) THEN
+        CALL cxios_set_domaingroup_radius &
+      (domaingroup_hdl%daddr, radius_)
+      ENDIF
+
+      IF (PRESENT(standard_name_)) THEN
+        CALL cxios_set_domaingroup_standard_name &
+      (domaingroup_hdl%daddr, standard_name_, len(standard_name_))
+      ENDIF
+
+      IF (PRESENT(type_)) THEN
+        CALL cxios_set_domaingroup_type &
+      (domaingroup_hdl%daddr, type_, len(type_))
+      ENDIF
+
+  END SUBROUTINE xios(set_domaingroup_attr_hdl_)
+
+  SUBROUTINE xios(get_domaingroup_attr)  &
+    ( domaingroup_id, area, bounds_lat_1d, bounds_lat_2d, bounds_lat_name, bounds_lon_1d, bounds_lon_2d  &
+    , bounds_lon_name, comment, data_dim, data_i_index, data_ibegin, data_j_index, data_jbegin, data_ni  &
+    , data_nj, dim_i_name, dim_j_name, domain_ref, group_ref, i_index, ibegin, j_index, jbegin, lat_name  &
+    , latvalue_1d, latvalue_2d, lon_name, long_name, lonvalue_1d, lonvalue_2d, mask_1d, mask_2d  &
+    , name, ni, ni_glo, nj, nj_glo, nvertex, prec, radius, standard_name, type )
+
+    IMPLICIT NONE
+      TYPE(txios(domaingroup))  :: domaingroup_hdl
+      CHARACTER(LEN=*), INTENT(IN) ::domaingroup_id
+      REAL (KIND=8) , OPTIONAL, INTENT(OUT) :: area(:,:)
+      REAL (KIND=8) , OPTIONAL, INTENT(OUT) :: bounds_lat_1d(:,:)
+      REAL (KIND=8) , OPTIONAL, INTENT(OUT) :: bounds_lat_2d(:,:,:)
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: bounds_lat_name
+      REAL (KIND=8) , OPTIONAL, INTENT(OUT) :: bounds_lon_1d(:,:)
+      REAL (KIND=8) , OPTIONAL, INTENT(OUT) :: bounds_lon_2d(:,:,:)
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: bounds_lon_name
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: comment
+      INTEGER  , OPTIONAL, INTENT(OUT) :: data_dim
+      INTEGER  , OPTIONAL, INTENT(OUT) :: data_i_index(:)
+      INTEGER  , OPTIONAL, INTENT(OUT) :: data_ibegin
+      INTEGER  , OPTIONAL, INTENT(OUT) :: data_j_index(:)
+      INTEGER  , OPTIONAL, INTENT(OUT) :: data_jbegin
+      INTEGER  , OPTIONAL, INTENT(OUT) :: data_ni
+      INTEGER  , OPTIONAL, INTENT(OUT) :: data_nj
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: dim_i_name
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: dim_j_name
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: domain_ref
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: group_ref
+      INTEGER  , OPTIONAL, INTENT(OUT) :: i_index(:)
+      INTEGER  , OPTIONAL, INTENT(OUT) :: ibegin
+      INTEGER  , OPTIONAL, INTENT(OUT) :: j_index(:)
+      INTEGER  , OPTIONAL, INTENT(OUT) :: jbegin
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: lat_name
+      REAL (KIND=8) , OPTIONAL, INTENT(OUT) :: latvalue_1d(:)
+      REAL (KIND=8) , OPTIONAL, INTENT(OUT) :: latvalue_2d(:,:)
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: lon_name
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: long_name
+      REAL (KIND=8) , OPTIONAL, INTENT(OUT) :: lonvalue_1d(:)
+      REAL (KIND=8) , OPTIONAL, INTENT(OUT) :: lonvalue_2d(:,:)
+      LOGICAL  , OPTIONAL, INTENT(OUT) :: mask_1d(:)
+      LOGICAL (KIND=C_BOOL) , ALLOCATABLE :: mask_1d_tmp(:)
+      LOGICAL  , OPTIONAL, INTENT(OUT) :: mask_2d(:,:)
+      LOGICAL (KIND=C_BOOL) , ALLOCATABLE :: mask_2d_tmp(:,:)
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: name
+      INTEGER  , OPTIONAL, INTENT(OUT) :: ni
+      INTEGER  , OPTIONAL, INTENT(OUT) :: ni_glo
+      INTEGER  , OPTIONAL, INTENT(OUT) :: nj
+      INTEGER  , OPTIONAL, INTENT(OUT) :: nj_glo
+      INTEGER  , OPTIONAL, INTENT(OUT) :: nvertex
+      INTEGER  , OPTIONAL, INTENT(OUT) :: prec
+      REAL (KIND=8) , OPTIONAL, INTENT(OUT) :: radius
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: standard_name
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: type
+
+      CALL xios(get_domaingroup_handle) &
+      (domaingroup_id,domaingroup_hdl)
+      CALL xios(get_domaingroup_attr_hdl_)   &
+      ( domaingroup_hdl, area, bounds_lat_1d, bounds_lat_2d, bounds_lat_name, bounds_lon_1d, bounds_lon_2d  &
+      , bounds_lon_name, comment, data_dim, data_i_index, data_ibegin, data_j_index, data_jbegin, data_ni  &
+      , data_nj, dim_i_name, dim_j_name, domain_ref, group_ref, i_index, ibegin, j_index, jbegin, lat_name  &
+      , latvalue_1d, latvalue_2d, lon_name, long_name, lonvalue_1d, lonvalue_2d, mask_1d, mask_2d  &
+      , name, ni, ni_glo, nj, nj_glo, nvertex, prec, radius, standard_name, type )
+
+  END SUBROUTINE xios(get_domaingroup_attr)
+
+  SUBROUTINE xios(get_domaingroup_attr_hdl)  &
+    ( domaingroup_hdl, area, bounds_lat_1d, bounds_lat_2d, bounds_lat_name, bounds_lon_1d, bounds_lon_2d  &
+    , bounds_lon_name, comment, data_dim, data_i_index, data_ibegin, data_j_index, data_jbegin, data_ni  &
+    , data_nj, dim_i_name, dim_j_name, domain_ref, group_ref, i_index, ibegin, j_index, jbegin, lat_name  &
+    , latvalue_1d, latvalue_2d, lon_name, long_name, lonvalue_1d, lonvalue_2d, mask_1d, mask_2d  &
+    , name, ni, ni_glo, nj, nj_glo, nvertex, prec, radius, standard_name, type )
+
+    IMPLICIT NONE
+      TYPE(txios(domaingroup)) , INTENT(IN) :: domaingroup_hdl
+      REAL (KIND=8) , OPTIONAL, INTENT(OUT) :: area(:,:)
+      REAL (KIND=8) , OPTIONAL, INTENT(OUT) :: bounds_lat_1d(:,:)
+      REAL (KIND=8) , OPTIONAL, INTENT(OUT) :: bounds_lat_2d(:,:,:)
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: bounds_lat_name
+      REAL (KIND=8) , OPTIONAL, INTENT(OUT) :: bounds_lon_1d(:,:)
+      REAL (KIND=8) , OPTIONAL, INTENT(OUT) :: bounds_lon_2d(:,:,:)
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: bounds_lon_name
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: comment
+      INTEGER  , OPTIONAL, INTENT(OUT) :: data_dim
+      INTEGER  , OPTIONAL, INTENT(OUT) :: data_i_index(:)
+      INTEGER  , OPTIONAL, INTENT(OUT) :: data_ibegin
+      INTEGER  , OPTIONAL, INTENT(OUT) :: data_j_index(:)
+      INTEGER  , OPTIONAL, INTENT(OUT) :: data_jbegin
+      INTEGER  , OPTIONAL, INTENT(OUT) :: data_ni
+      INTEGER  , OPTIONAL, INTENT(OUT) :: data_nj
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: dim_i_name
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: dim_j_name
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: domain_ref
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: group_ref
+      INTEGER  , OPTIONAL, INTENT(OUT) :: i_index(:)
+      INTEGER  , OPTIONAL, INTENT(OUT) :: ibegin
+      INTEGER  , OPTIONAL, INTENT(OUT) :: j_index(:)
+      INTEGER  , OPTIONAL, INTENT(OUT) :: jbegin
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: lat_name
+      REAL (KIND=8) , OPTIONAL, INTENT(OUT) :: latvalue_1d(:)
+      REAL (KIND=8) , OPTIONAL, INTENT(OUT) :: latvalue_2d(:,:)
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: lon_name
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: long_name
+      REAL (KIND=8) , OPTIONAL, INTENT(OUT) :: lonvalue_1d(:)
+      REAL (KIND=8) , OPTIONAL, INTENT(OUT) :: lonvalue_2d(:,:)
+      LOGICAL  , OPTIONAL, INTENT(OUT) :: mask_1d(:)
+      LOGICAL (KIND=C_BOOL) , ALLOCATABLE :: mask_1d_tmp(:)
+      LOGICAL  , OPTIONAL, INTENT(OUT) :: mask_2d(:,:)
+      LOGICAL (KIND=C_BOOL) , ALLOCATABLE :: mask_2d_tmp(:,:)
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: name
+      INTEGER  , OPTIONAL, INTENT(OUT) :: ni
+      INTEGER  , OPTIONAL, INTENT(OUT) :: ni_glo
+      INTEGER  , OPTIONAL, INTENT(OUT) :: nj
+      INTEGER  , OPTIONAL, INTENT(OUT) :: nj_glo
+      INTEGER  , OPTIONAL, INTENT(OUT) :: nvertex
+      INTEGER  , OPTIONAL, INTENT(OUT) :: prec
+      REAL (KIND=8) , OPTIONAL, INTENT(OUT) :: radius
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: standard_name
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: type
+
+      CALL xios(get_domaingroup_attr_hdl_)  &
+      ( domaingroup_hdl, area, bounds_lat_1d, bounds_lat_2d, bounds_lat_name, bounds_lon_1d, bounds_lon_2d  &
+      , bounds_lon_name, comment, data_dim, data_i_index, data_ibegin, data_j_index, data_jbegin, data_ni  &
+      , data_nj, dim_i_name, dim_j_name, domain_ref, group_ref, i_index, ibegin, j_index, jbegin, lat_name  &
+      , latvalue_1d, latvalue_2d, lon_name, long_name, lonvalue_1d, lonvalue_2d, mask_1d, mask_2d  &
+      , name, ni, ni_glo, nj, nj_glo, nvertex, prec, radius, standard_name, type )
+
+  END SUBROUTINE xios(get_domaingroup_attr_hdl)
+
+  SUBROUTINE xios(get_domaingroup_attr_hdl_)   &
+    ( domaingroup_hdl, area_, bounds_lat_1d_, bounds_lat_2d_, bounds_lat_name_, bounds_lon_1d_, bounds_lon_2d_  &
+    , bounds_lon_name_, comment_, data_dim_, data_i_index_, data_ibegin_, data_j_index_, data_jbegin_  &
+    , data_ni_, data_nj_, dim_i_name_, dim_j_name_, domain_ref_, group_ref_, i_index_, ibegin_, j_index_  &
+    , jbegin_, lat_name_, latvalue_1d_, latvalue_2d_, lon_name_, long_name_, lonvalue_1d_, lonvalue_2d_  &
+    , mask_1d_, mask_2d_, name_, ni_, ni_glo_, nj_, nj_glo_, nvertex_, prec_, radius_, standard_name_  &
+    , type_ )
+
+    IMPLICIT NONE
+      TYPE(txios(domaingroup)) , INTENT(IN) :: domaingroup_hdl
+      REAL (KIND=8) , OPTIONAL, INTENT(OUT) :: area_(:,:)
+      REAL (KIND=8) , OPTIONAL, INTENT(OUT) :: bounds_lat_1d_(:,:)
+      REAL (KIND=8) , OPTIONAL, INTENT(OUT) :: bounds_lat_2d_(:,:,:)
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: bounds_lat_name_
+      REAL (KIND=8) , OPTIONAL, INTENT(OUT) :: bounds_lon_1d_(:,:)
+      REAL (KIND=8) , OPTIONAL, INTENT(OUT) :: bounds_lon_2d_(:,:,:)
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: bounds_lon_name_
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: comment_
+      INTEGER  , OPTIONAL, INTENT(OUT) :: data_dim_
+      INTEGER  , OPTIONAL, INTENT(OUT) :: data_i_index_(:)
+      INTEGER  , OPTIONAL, INTENT(OUT) :: data_ibegin_
+      INTEGER  , OPTIONAL, INTENT(OUT) :: data_j_index_(:)
+      INTEGER  , OPTIONAL, INTENT(OUT) :: data_jbegin_
+      INTEGER  , OPTIONAL, INTENT(OUT) :: data_ni_
+      INTEGER  , OPTIONAL, INTENT(OUT) :: data_nj_
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: dim_i_name_
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: dim_j_name_
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: domain_ref_
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: group_ref_
+      INTEGER  , OPTIONAL, INTENT(OUT) :: i_index_(:)
+      INTEGER  , OPTIONAL, INTENT(OUT) :: ibegin_
+      INTEGER  , OPTIONAL, INTENT(OUT) :: j_index_(:)
+      INTEGER  , OPTIONAL, INTENT(OUT) :: jbegin_
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: lat_name_
+      REAL (KIND=8) , OPTIONAL, INTENT(OUT) :: latvalue_1d_(:)
+      REAL (KIND=8) , OPTIONAL, INTENT(OUT) :: latvalue_2d_(:,:)
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: lon_name_
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: long_name_
+      REAL (KIND=8) , OPTIONAL, INTENT(OUT) :: lonvalue_1d_(:)
+      REAL (KIND=8) , OPTIONAL, INTENT(OUT) :: lonvalue_2d_(:,:)
+      LOGICAL  , OPTIONAL, INTENT(OUT) :: mask_1d_(:)
+      LOGICAL (KIND=C_BOOL) , ALLOCATABLE :: mask_1d__tmp(:)
+      LOGICAL  , OPTIONAL, INTENT(OUT) :: mask_2d_(:,:)
+      LOGICAL (KIND=C_BOOL) , ALLOCATABLE :: mask_2d__tmp(:,:)
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: name_
+      INTEGER  , OPTIONAL, INTENT(OUT) :: ni_
+      INTEGER  , OPTIONAL, INTENT(OUT) :: ni_glo_
+      INTEGER  , OPTIONAL, INTENT(OUT) :: nj_
+      INTEGER  , OPTIONAL, INTENT(OUT) :: nj_glo_
+      INTEGER  , OPTIONAL, INTENT(OUT) :: nvertex_
+      INTEGER  , OPTIONAL, INTENT(OUT) :: prec_
+      REAL (KIND=8) , OPTIONAL, INTENT(OUT) :: radius_
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: standard_name_
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: type_
+
+      IF (PRESENT(area_)) THEN
+        CALL cxios_get_domaingroup_area &
+      (domaingroup_hdl%daddr, area_, SHAPE(area_))
+      ENDIF
+
+      IF (PRESENT(bounds_lat_1d_)) THEN
+        CALL cxios_get_domaingroup_bounds_lat_1d &
+      (domaingroup_hdl%daddr, bounds_lat_1d_, SHAPE(bounds_lat_1d_))
+      ENDIF
+
+      IF (PRESENT(bounds_lat_2d_)) THEN
+        CALL cxios_get_domaingroup_bounds_lat_2d &
+      (domaingroup_hdl%daddr, bounds_lat_2d_, SHAPE(bounds_lat_2d_))
+      ENDIF
+
+      IF (PRESENT(bounds_lat_name_)) THEN
+        CALL cxios_get_domaingroup_bounds_lat_name &
+      (domaingroup_hdl%daddr, bounds_lat_name_, len(bounds_lat_name_))
+      ENDIF
+
+      IF (PRESENT(bounds_lon_1d_)) THEN
+        CALL cxios_get_domaingroup_bounds_lon_1d &
+      (domaingroup_hdl%daddr, bounds_lon_1d_, SHAPE(bounds_lon_1d_))
+      ENDIF
+
+      IF (PRESENT(bounds_lon_2d_)) THEN
+        CALL cxios_get_domaingroup_bounds_lon_2d &
+      (domaingroup_hdl%daddr, bounds_lon_2d_, SHAPE(bounds_lon_2d_))
+      ENDIF
+
+      IF (PRESENT(bounds_lon_name_)) THEN
+        CALL cxios_get_domaingroup_bounds_lon_name &
+      (domaingroup_hdl%daddr, bounds_lon_name_, len(bounds_lon_name_))
+      ENDIF
+
+      IF (PRESENT(comment_)) THEN
+        CALL cxios_get_domaingroup_comment &
+      (domaingroup_hdl%daddr, comment_, len(comment_))
+      ENDIF
+
+      IF (PRESENT(data_dim_)) THEN
+        CALL cxios_get_domaingroup_data_dim &
+      (domaingroup_hdl%daddr, data_dim_)
+      ENDIF
+
+      IF (PRESENT(data_i_index_)) THEN
+        CALL cxios_get_domaingroup_data_i_index &
+      (domaingroup_hdl%daddr, data_i_index_, SHAPE(data_i_index_))
+      ENDIF
+
+      IF (PRESENT(data_ibegin_)) THEN
+        CALL cxios_get_domaingroup_data_ibegin &
+      (domaingroup_hdl%daddr, data_ibegin_)
+      ENDIF
+
+      IF (PRESENT(data_j_index_)) THEN
+        CALL cxios_get_domaingroup_data_j_index &
+      (domaingroup_hdl%daddr, data_j_index_, SHAPE(data_j_index_))
+      ENDIF
+
+      IF (PRESENT(data_jbegin_)) THEN
+        CALL cxios_get_domaingroup_data_jbegin &
+      (domaingroup_hdl%daddr, data_jbegin_)
+      ENDIF
+
+      IF (PRESENT(data_ni_)) THEN
+        CALL cxios_get_domaingroup_data_ni &
+      (domaingroup_hdl%daddr, data_ni_)
+      ENDIF
+
+      IF (PRESENT(data_nj_)) THEN
+        CALL cxios_get_domaingroup_data_nj &
+      (domaingroup_hdl%daddr, data_nj_)
+      ENDIF
+
+      IF (PRESENT(dim_i_name_)) THEN
+        CALL cxios_get_domaingroup_dim_i_name &
+      (domaingroup_hdl%daddr, dim_i_name_, len(dim_i_name_))
+      ENDIF
+
+      IF (PRESENT(dim_j_name_)) THEN
+        CALL cxios_get_domaingroup_dim_j_name &
+      (domaingroup_hdl%daddr, dim_j_name_, len(dim_j_name_))
+      ENDIF
+
+      IF (PRESENT(domain_ref_)) THEN
+        CALL cxios_get_domaingroup_domain_ref &
+      (domaingroup_hdl%daddr, domain_ref_, len(domain_ref_))
+      ENDIF
+
+      IF (PRESENT(group_ref_)) THEN
+        CALL cxios_get_domaingroup_group_ref &
+      (domaingroup_hdl%daddr, group_ref_, len(group_ref_))
+      ENDIF
+
+      IF (PRESENT(i_index_)) THEN
+        CALL cxios_get_domaingroup_i_index &
+      (domaingroup_hdl%daddr, i_index_, SHAPE(i_index_))
+      ENDIF
+
+      IF (PRESENT(ibegin_)) THEN
+        CALL cxios_get_domaingroup_ibegin &
+      (domaingroup_hdl%daddr, ibegin_)
+      ENDIF
+
+      IF (PRESENT(j_index_)) THEN
+        CALL cxios_get_domaingroup_j_index &
+      (domaingroup_hdl%daddr, j_index_, SHAPE(j_index_))
+      ENDIF
+
+      IF (PRESENT(jbegin_)) THEN
+        CALL cxios_get_domaingroup_jbegin &
+      (domaingroup_hdl%daddr, jbegin_)
+      ENDIF
+
+      IF (PRESENT(lat_name_)) THEN
+        CALL cxios_get_domaingroup_lat_name &
+      (domaingroup_hdl%daddr, lat_name_, len(lat_name_))
+      ENDIF
+
+      IF (PRESENT(latvalue_1d_)) THEN
+        CALL cxios_get_domaingroup_latvalue_1d &
+      (domaingroup_hdl%daddr, latvalue_1d_, SHAPE(latvalue_1d_))
+      ENDIF
+
+      IF (PRESENT(latvalue_2d_)) THEN
+        CALL cxios_get_domaingroup_latvalue_2d &
+      (domaingroup_hdl%daddr, latvalue_2d_, SHAPE(latvalue_2d_))
+      ENDIF
+
+      IF (PRESENT(lon_name_)) THEN
+        CALL cxios_get_domaingroup_lon_name &
+      (domaingroup_hdl%daddr, lon_name_, len(lon_name_))
+      ENDIF
+
+      IF (PRESENT(long_name_)) THEN
+        CALL cxios_get_domaingroup_long_name &
+      (domaingroup_hdl%daddr, long_name_, len(long_name_))
+      ENDIF
+
+      IF (PRESENT(lonvalue_1d_)) THEN
+        CALL cxios_get_domaingroup_lonvalue_1d &
+      (domaingroup_hdl%daddr, lonvalue_1d_, SHAPE(lonvalue_1d_))
+      ENDIF
+
+      IF (PRESENT(lonvalue_2d_)) THEN
+        CALL cxios_get_domaingroup_lonvalue_2d &
+      (domaingroup_hdl%daddr, lonvalue_2d_, SHAPE(lonvalue_2d_))
+      ENDIF
+
+      IF (PRESENT(mask_1d_)) THEN
+        ALLOCATE(mask_1d__tmp(SIZE(mask_1d_,1)))
+        CALL cxios_get_domaingroup_mask_1d &
+      (domaingroup_hdl%daddr, mask_1d__tmp, SHAPE(mask_1d_))
+        mask_1d_ = mask_1d__tmp
+      ENDIF
+
+      IF (PRESENT(mask_2d_)) THEN
+        ALLOCATE(mask_2d__tmp(SIZE(mask_2d_,1), SIZE(mask_2d_,2)))
+        CALL cxios_get_domaingroup_mask_2d &
+      (domaingroup_hdl%daddr, mask_2d__tmp, SHAPE(mask_2d_))
+        mask_2d_ = mask_2d__tmp
+      ENDIF
+
+      IF (PRESENT(name_)) THEN
+        CALL cxios_get_domaingroup_name &
+      (domaingroup_hdl%daddr, name_, len(name_))
+      ENDIF
+
+      IF (PRESENT(ni_)) THEN
+        CALL cxios_get_domaingroup_ni &
+      (domaingroup_hdl%daddr, ni_)
+      ENDIF
+
+      IF (PRESENT(ni_glo_)) THEN
+        CALL cxios_get_domaingroup_ni_glo &
+      (domaingroup_hdl%daddr, ni_glo_)
+      ENDIF
+
+      IF (PRESENT(nj_)) THEN
+        CALL cxios_get_domaingroup_nj &
+      (domaingroup_hdl%daddr, nj_)
+      ENDIF
+
+      IF (PRESENT(nj_glo_)) THEN
+        CALL cxios_get_domaingroup_nj_glo &
+      (domaingroup_hdl%daddr, nj_glo_)
+      ENDIF
+
+      IF (PRESENT(nvertex_)) THEN
+        CALL cxios_get_domaingroup_nvertex &
+      (domaingroup_hdl%daddr, nvertex_)
+      ENDIF
+
+      IF (PRESENT(prec_)) THEN
+        CALL cxios_get_domaingroup_prec &
+      (domaingroup_hdl%daddr, prec_)
+      ENDIF
+
+      IF (PRESENT(radius_)) THEN
+        CALL cxios_get_domaingroup_radius &
+      (domaingroup_hdl%daddr, radius_)
+      ENDIF
+
+      IF (PRESENT(standard_name_)) THEN
+        CALL cxios_get_domaingroup_standard_name &
+      (domaingroup_hdl%daddr, standard_name_, len(standard_name_))
+      ENDIF
+
+      IF (PRESENT(type_)) THEN
+        CALL cxios_get_domaingroup_type &
+      (domaingroup_hdl%daddr, type_, len(type_))
+      ENDIF
+
+  END SUBROUTINE xios(get_domaingroup_attr_hdl_)
+
+  SUBROUTINE xios(is_defined_domaingroup_attr)  &
+    ( domaingroup_id, area, bounds_lat_1d, bounds_lat_2d, bounds_lat_name, bounds_lon_1d, bounds_lon_2d  &
+    , bounds_lon_name, comment, data_dim, data_i_index, data_ibegin, data_j_index, data_jbegin, data_ni  &
+    , data_nj, dim_i_name, dim_j_name, domain_ref, group_ref, i_index, ibegin, j_index, jbegin, lat_name  &
+    , latvalue_1d, latvalue_2d, lon_name, long_name, lonvalue_1d, lonvalue_2d, mask_1d, mask_2d  &
+    , name, ni, ni_glo, nj, nj_glo, nvertex, prec, radius, standard_name, type )
+
+    IMPLICIT NONE
+      TYPE(txios(domaingroup))  :: domaingroup_hdl
+      CHARACTER(LEN=*), INTENT(IN) ::domaingroup_id
+      LOGICAL, OPTIONAL, INTENT(OUT) :: area
+      LOGICAL(KIND=C_BOOL) :: area_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: bounds_lat_1d
+      LOGICAL(KIND=C_BOOL) :: bounds_lat_1d_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: bounds_lat_2d
+      LOGICAL(KIND=C_BOOL) :: bounds_lat_2d_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: bounds_lat_name
+      LOGICAL(KIND=C_BOOL) :: bounds_lat_name_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: bounds_lon_1d
+      LOGICAL(KIND=C_BOOL) :: bounds_lon_1d_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: bounds_lon_2d
+      LOGICAL(KIND=C_BOOL) :: bounds_lon_2d_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: bounds_lon_name
+      LOGICAL(KIND=C_BOOL) :: bounds_lon_name_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: comment
+      LOGICAL(KIND=C_BOOL) :: comment_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: data_dim
+      LOGICAL(KIND=C_BOOL) :: data_dim_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: data_i_index
+      LOGICAL(KIND=C_BOOL) :: data_i_index_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: data_ibegin
+      LOGICAL(KIND=C_BOOL) :: data_ibegin_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: data_j_index
+      LOGICAL(KIND=C_BOOL) :: data_j_index_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: data_jbegin
+      LOGICAL(KIND=C_BOOL) :: data_jbegin_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: data_ni
+      LOGICAL(KIND=C_BOOL) :: data_ni_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: data_nj
+      LOGICAL(KIND=C_BOOL) :: data_nj_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: dim_i_name
+      LOGICAL(KIND=C_BOOL) :: dim_i_name_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: dim_j_name
+      LOGICAL(KIND=C_BOOL) :: dim_j_name_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: domain_ref
+      LOGICAL(KIND=C_BOOL) :: domain_ref_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: group_ref
+      LOGICAL(KIND=C_BOOL) :: group_ref_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: i_index
+      LOGICAL(KIND=C_BOOL) :: i_index_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: ibegin
+      LOGICAL(KIND=C_BOOL) :: ibegin_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: j_index
+      LOGICAL(KIND=C_BOOL) :: j_index_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: jbegin
+      LOGICAL(KIND=C_BOOL) :: jbegin_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: lat_name
+      LOGICAL(KIND=C_BOOL) :: lat_name_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: latvalue_1d
+      LOGICAL(KIND=C_BOOL) :: latvalue_1d_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: latvalue_2d
+      LOGICAL(KIND=C_BOOL) :: latvalue_2d_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: lon_name
+      LOGICAL(KIND=C_BOOL) :: lon_name_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: long_name
+      LOGICAL(KIND=C_BOOL) :: long_name_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: lonvalue_1d
+      LOGICAL(KIND=C_BOOL) :: lonvalue_1d_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: lonvalue_2d
+      LOGICAL(KIND=C_BOOL) :: lonvalue_2d_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: mask_1d
+      LOGICAL(KIND=C_BOOL) :: mask_1d_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: mask_2d
+      LOGICAL(KIND=C_BOOL) :: mask_2d_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: name
+      LOGICAL(KIND=C_BOOL) :: name_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: ni
+      LOGICAL(KIND=C_BOOL) :: ni_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: ni_glo
+      LOGICAL(KIND=C_BOOL) :: ni_glo_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: nj
+      LOGICAL(KIND=C_BOOL) :: nj_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: nj_glo
+      LOGICAL(KIND=C_BOOL) :: nj_glo_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: nvertex
+      LOGICAL(KIND=C_BOOL) :: nvertex_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: prec
+      LOGICAL(KIND=C_BOOL) :: prec_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: radius
+      LOGICAL(KIND=C_BOOL) :: radius_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: standard_name
+      LOGICAL(KIND=C_BOOL) :: standard_name_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: type
+      LOGICAL(KIND=C_BOOL) :: type_tmp
+
+      CALL xios(get_domaingroup_handle) &
+      (domaingroup_id,domaingroup_hdl)
+      CALL xios(is_defined_domaingroup_attr_hdl_)   &
+      ( domaingroup_hdl, area, bounds_lat_1d, bounds_lat_2d, bounds_lat_name, bounds_lon_1d, bounds_lon_2d  &
+      , bounds_lon_name, comment, data_dim, data_i_index, data_ibegin, data_j_index, data_jbegin, data_ni  &
+      , data_nj, dim_i_name, dim_j_name, domain_ref, group_ref, i_index, ibegin, j_index, jbegin, lat_name  &
+      , latvalue_1d, latvalue_2d, lon_name, long_name, lonvalue_1d, lonvalue_2d, mask_1d, mask_2d  &
+      , name, ni, ni_glo, nj, nj_glo, nvertex, prec, radius, standard_name, type )
+
+  END SUBROUTINE xios(is_defined_domaingroup_attr)
+
+  SUBROUTINE xios(is_defined_domaingroup_attr_hdl)  &
+    ( domaingroup_hdl, area, bounds_lat_1d, bounds_lat_2d, bounds_lat_name, bounds_lon_1d, bounds_lon_2d  &
+    , bounds_lon_name, comment, data_dim, data_i_index, data_ibegin, data_j_index, data_jbegin, data_ni  &
+    , data_nj, dim_i_name, dim_j_name, domain_ref, group_ref, i_index, ibegin, j_index, jbegin, lat_name  &
+    , latvalue_1d, latvalue_2d, lon_name, long_name, lonvalue_1d, lonvalue_2d, mask_1d, mask_2d  &
+    , name, ni, ni_glo, nj, nj_glo, nvertex, prec, radius, standard_name, type )
+
+    IMPLICIT NONE
+      TYPE(txios(domaingroup)) , INTENT(IN) :: domaingroup_hdl
+      LOGICAL, OPTIONAL, INTENT(OUT) :: area
+      LOGICAL(KIND=C_BOOL) :: area_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: bounds_lat_1d
+      LOGICAL(KIND=C_BOOL) :: bounds_lat_1d_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: bounds_lat_2d
+      LOGICAL(KIND=C_BOOL) :: bounds_lat_2d_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: bounds_lat_name
+      LOGICAL(KIND=C_BOOL) :: bounds_lat_name_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: bounds_lon_1d
+      LOGICAL(KIND=C_BOOL) :: bounds_lon_1d_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: bounds_lon_2d
+      LOGICAL(KIND=C_BOOL) :: bounds_lon_2d_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: bounds_lon_name
+      LOGICAL(KIND=C_BOOL) :: bounds_lon_name_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: comment
+      LOGICAL(KIND=C_BOOL) :: comment_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: data_dim
+      LOGICAL(KIND=C_BOOL) :: data_dim_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: data_i_index
+      LOGICAL(KIND=C_BOOL) :: data_i_index_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: data_ibegin
+      LOGICAL(KIND=C_BOOL) :: data_ibegin_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: data_j_index
+      LOGICAL(KIND=C_BOOL) :: data_j_index_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: data_jbegin
+      LOGICAL(KIND=C_BOOL) :: data_jbegin_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: data_ni
+      LOGICAL(KIND=C_BOOL) :: data_ni_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: data_nj
+      LOGICAL(KIND=C_BOOL) :: data_nj_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: dim_i_name
+      LOGICAL(KIND=C_BOOL) :: dim_i_name_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: dim_j_name
+      LOGICAL(KIND=C_BOOL) :: dim_j_name_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: domain_ref
+      LOGICAL(KIND=C_BOOL) :: domain_ref_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: group_ref
+      LOGICAL(KIND=C_BOOL) :: group_ref_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: i_index
+      LOGICAL(KIND=C_BOOL) :: i_index_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: ibegin
+      LOGICAL(KIND=C_BOOL) :: ibegin_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: j_index
+      LOGICAL(KIND=C_BOOL) :: j_index_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: jbegin
+      LOGICAL(KIND=C_BOOL) :: jbegin_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: lat_name
+      LOGICAL(KIND=C_BOOL) :: lat_name_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: latvalue_1d
+      LOGICAL(KIND=C_BOOL) :: latvalue_1d_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: latvalue_2d
+      LOGICAL(KIND=C_BOOL) :: latvalue_2d_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: lon_name
+      LOGICAL(KIND=C_BOOL) :: lon_name_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: long_name
+      LOGICAL(KIND=C_BOOL) :: long_name_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: lonvalue_1d
+      LOGICAL(KIND=C_BOOL) :: lonvalue_1d_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: lonvalue_2d
+      LOGICAL(KIND=C_BOOL) :: lonvalue_2d_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: mask_1d
+      LOGICAL(KIND=C_BOOL) :: mask_1d_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: mask_2d
+      LOGICAL(KIND=C_BOOL) :: mask_2d_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: name
+      LOGICAL(KIND=C_BOOL) :: name_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: ni
+      LOGICAL(KIND=C_BOOL) :: ni_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: ni_glo
+      LOGICAL(KIND=C_BOOL) :: ni_glo_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: nj
+      LOGICAL(KIND=C_BOOL) :: nj_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: nj_glo
+      LOGICAL(KIND=C_BOOL) :: nj_glo_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: nvertex
+      LOGICAL(KIND=C_BOOL) :: nvertex_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: prec
+      LOGICAL(KIND=C_BOOL) :: prec_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: radius
+      LOGICAL(KIND=C_BOOL) :: radius_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: standard_name
+      LOGICAL(KIND=C_BOOL) :: standard_name_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: type
+      LOGICAL(KIND=C_BOOL) :: type_tmp
+
+      CALL xios(is_defined_domaingroup_attr_hdl_)  &
+      ( domaingroup_hdl, area, bounds_lat_1d, bounds_lat_2d, bounds_lat_name, bounds_lon_1d, bounds_lon_2d  &
+      , bounds_lon_name, comment, data_dim, data_i_index, data_ibegin, data_j_index, data_jbegin, data_ni  &
+      , data_nj, dim_i_name, dim_j_name, domain_ref, group_ref, i_index, ibegin, j_index, jbegin, lat_name  &
+      , latvalue_1d, latvalue_2d, lon_name, long_name, lonvalue_1d, lonvalue_2d, mask_1d, mask_2d  &
+      , name, ni, ni_glo, nj, nj_glo, nvertex, prec, radius, standard_name, type )
+
+  END SUBROUTINE xios(is_defined_domaingroup_attr_hdl)
+
+  SUBROUTINE xios(is_defined_domaingroup_attr_hdl_)   &
+    ( domaingroup_hdl, area_, bounds_lat_1d_, bounds_lat_2d_, bounds_lat_name_, bounds_lon_1d_, bounds_lon_2d_  &
+    , bounds_lon_name_, comment_, data_dim_, data_i_index_, data_ibegin_, data_j_index_, data_jbegin_  &
+    , data_ni_, data_nj_, dim_i_name_, dim_j_name_, domain_ref_, group_ref_, i_index_, ibegin_, j_index_  &
+    , jbegin_, lat_name_, latvalue_1d_, latvalue_2d_, lon_name_, long_name_, lonvalue_1d_, lonvalue_2d_  &
+    , mask_1d_, mask_2d_, name_, ni_, ni_glo_, nj_, nj_glo_, nvertex_, prec_, radius_, standard_name_  &
+    , type_ )
+
+    IMPLICIT NONE
+      TYPE(txios(domaingroup)) , INTENT(IN) :: domaingroup_hdl
+      LOGICAL, OPTIONAL, INTENT(OUT) :: area_
+      LOGICAL(KIND=C_BOOL) :: area__tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: bounds_lat_1d_
+      LOGICAL(KIND=C_BOOL) :: bounds_lat_1d__tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: bounds_lat_2d_
+      LOGICAL(KIND=C_BOOL) :: bounds_lat_2d__tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: bounds_lat_name_
+      LOGICAL(KIND=C_BOOL) :: bounds_lat_name__tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: bounds_lon_1d_
+      LOGICAL(KIND=C_BOOL) :: bounds_lon_1d__tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: bounds_lon_2d_
+      LOGICAL(KIND=C_BOOL) :: bounds_lon_2d__tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: bounds_lon_name_
+      LOGICAL(KIND=C_BOOL) :: bounds_lon_name__tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: comment_
+      LOGICAL(KIND=C_BOOL) :: comment__tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: data_dim_
+      LOGICAL(KIND=C_BOOL) :: data_dim__tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: data_i_index_
+      LOGICAL(KIND=C_BOOL) :: data_i_index__tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: data_ibegin_
+      LOGICAL(KIND=C_BOOL) :: data_ibegin__tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: data_j_index_
+      LOGICAL(KIND=C_BOOL) :: data_j_index__tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: data_jbegin_
+      LOGICAL(KIND=C_BOOL) :: data_jbegin__tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: data_ni_
+      LOGICAL(KIND=C_BOOL) :: data_ni__tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: data_nj_
+      LOGICAL(KIND=C_BOOL) :: data_nj__tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: dim_i_name_
+      LOGICAL(KIND=C_BOOL) :: dim_i_name__tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: dim_j_name_
+      LOGICAL(KIND=C_BOOL) :: dim_j_name__tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: domain_ref_
+      LOGICAL(KIND=C_BOOL) :: domain_ref__tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: group_ref_
+      LOGICAL(KIND=C_BOOL) :: group_ref__tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: i_index_
+      LOGICAL(KIND=C_BOOL) :: i_index__tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: ibegin_
+      LOGICAL(KIND=C_BOOL) :: ibegin__tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: j_index_
+      LOGICAL(KIND=C_BOOL) :: j_index__tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: jbegin_
+      LOGICAL(KIND=C_BOOL) :: jbegin__tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: lat_name_
+      LOGICAL(KIND=C_BOOL) :: lat_name__tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: latvalue_1d_
+      LOGICAL(KIND=C_BOOL) :: latvalue_1d__tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: latvalue_2d_
+      LOGICAL(KIND=C_BOOL) :: latvalue_2d__tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: lon_name_
+      LOGICAL(KIND=C_BOOL) :: lon_name__tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: long_name_
+      LOGICAL(KIND=C_BOOL) :: long_name__tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: lonvalue_1d_
+      LOGICAL(KIND=C_BOOL) :: lonvalue_1d__tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: lonvalue_2d_
+      LOGICAL(KIND=C_BOOL) :: lonvalue_2d__tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: mask_1d_
+      LOGICAL(KIND=C_BOOL) :: mask_1d__tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: mask_2d_
+      LOGICAL(KIND=C_BOOL) :: mask_2d__tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: name_
+      LOGICAL(KIND=C_BOOL) :: name__tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: ni_
+      LOGICAL(KIND=C_BOOL) :: ni__tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: ni_glo_
+      LOGICAL(KIND=C_BOOL) :: ni_glo__tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: nj_
+      LOGICAL(KIND=C_BOOL) :: nj__tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: nj_glo_
+      LOGICAL(KIND=C_BOOL) :: nj_glo__tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: nvertex_
+      LOGICAL(KIND=C_BOOL) :: nvertex__tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: prec_
+      LOGICAL(KIND=C_BOOL) :: prec__tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: radius_
+      LOGICAL(KIND=C_BOOL) :: radius__tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: standard_name_
+      LOGICAL(KIND=C_BOOL) :: standard_name__tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: type_
+      LOGICAL(KIND=C_BOOL) :: type__tmp
+
+      IF (PRESENT(area_)) THEN
+        area__tmp = cxios_is_defined_domaingroup_area &
+      (domaingroup_hdl%daddr)
+        area_ = area__tmp
+      ENDIF
+
+      IF (PRESENT(bounds_lat_1d_)) THEN
+        bounds_lat_1d__tmp = cxios_is_defined_domaingroup_bounds_lat_1d &
+      (domaingroup_hdl%daddr)
+        bounds_lat_1d_ = bounds_lat_1d__tmp
+      ENDIF
+
+      IF (PRESENT(bounds_lat_2d_)) THEN
+        bounds_lat_2d__tmp = cxios_is_defined_domaingroup_bounds_lat_2d &
+      (domaingroup_hdl%daddr)
+        bounds_lat_2d_ = bounds_lat_2d__tmp
+      ENDIF
+
+      IF (PRESENT(bounds_lat_name_)) THEN
+        bounds_lat_name__tmp = cxios_is_defined_domaingroup_bounds_lat_name &
+      (domaingroup_hdl%daddr)
+        bounds_lat_name_ = bounds_lat_name__tmp
+      ENDIF
+
+      IF (PRESENT(bounds_lon_1d_)) THEN
+        bounds_lon_1d__tmp = cxios_is_defined_domaingroup_bounds_lon_1d &
+      (domaingroup_hdl%daddr)
+        bounds_lon_1d_ = bounds_lon_1d__tmp
+      ENDIF
+
+      IF (PRESENT(bounds_lon_2d_)) THEN
+        bounds_lon_2d__tmp = cxios_is_defined_domaingroup_bounds_lon_2d &
+      (domaingroup_hdl%daddr)
+        bounds_lon_2d_ = bounds_lon_2d__tmp
+      ENDIF
+
+      IF (PRESENT(bounds_lon_name_)) THEN
+        bounds_lon_name__tmp = cxios_is_defined_domaingroup_bounds_lon_name &
+      (domaingroup_hdl%daddr)
+        bounds_lon_name_ = bounds_lon_name__tmp
+      ENDIF
+
+      IF (PRESENT(comment_)) THEN
+        comment__tmp = cxios_is_defined_domaingroup_comment &
+      (domaingroup_hdl%daddr)
+        comment_ = comment__tmp
+      ENDIF
+
+      IF (PRESENT(data_dim_)) THEN
+        data_dim__tmp = cxios_is_defined_domaingroup_data_dim &
+      (domaingroup_hdl%daddr)
+        data_dim_ = data_dim__tmp
+      ENDIF
+
+      IF (PRESENT(data_i_index_)) THEN
+        data_i_index__tmp = cxios_is_defined_domaingroup_data_i_index &
+      (domaingroup_hdl%daddr)
+        data_i_index_ = data_i_index__tmp
+      ENDIF
+
+      IF (PRESENT(data_ibegin_)) THEN
+        data_ibegin__tmp = cxios_is_defined_domaingroup_data_ibegin &
+      (domaingroup_hdl%daddr)
+        data_ibegin_ = data_ibegin__tmp
+      ENDIF
+
+      IF (PRESENT(data_j_index_)) THEN
+        data_j_index__tmp = cxios_is_defined_domaingroup_data_j_index &
+      (domaingroup_hdl%daddr)
+        data_j_index_ = data_j_index__tmp
+      ENDIF
+
+      IF (PRESENT(data_jbegin_)) THEN
+        data_jbegin__tmp = cxios_is_defined_domaingroup_data_jbegin &
+      (domaingroup_hdl%daddr)
+        data_jbegin_ = data_jbegin__tmp
+      ENDIF
+
+      IF (PRESENT(data_ni_)) THEN
+        data_ni__tmp = cxios_is_defined_domaingroup_data_ni &
+      (domaingroup_hdl%daddr)
+        data_ni_ = data_ni__tmp
+      ENDIF
+
+      IF (PRESENT(data_nj_)) THEN
+        data_nj__tmp = cxios_is_defined_domaingroup_data_nj &
+      (domaingroup_hdl%daddr)
+        data_nj_ = data_nj__tmp
+      ENDIF
+
+      IF (PRESENT(dim_i_name_)) THEN
+        dim_i_name__tmp = cxios_is_defined_domaingroup_dim_i_name &
+      (domaingroup_hdl%daddr)
+        dim_i_name_ = dim_i_name__tmp
+      ENDIF
+
+      IF (PRESENT(dim_j_name_)) THEN
+        dim_j_name__tmp = cxios_is_defined_domaingroup_dim_j_name &
+      (domaingroup_hdl%daddr)
+        dim_j_name_ = dim_j_name__tmp
+      ENDIF
+
+      IF (PRESENT(domain_ref_)) THEN
+        domain_ref__tmp = cxios_is_defined_domaingroup_domain_ref &
+      (domaingroup_hdl%daddr)
+        domain_ref_ = domain_ref__tmp
+      ENDIF
+
+      IF (PRESENT(group_ref_)) THEN
+        group_ref__tmp = cxios_is_defined_domaingroup_group_ref &
+      (domaingroup_hdl%daddr)
+        group_ref_ = group_ref__tmp
+      ENDIF
+
+      IF (PRESENT(i_index_)) THEN
+        i_index__tmp = cxios_is_defined_domaingroup_i_index &
+      (domaingroup_hdl%daddr)
+        i_index_ = i_index__tmp
+      ENDIF
+
+      IF (PRESENT(ibegin_)) THEN
+        ibegin__tmp = cxios_is_defined_domaingroup_ibegin &
+      (domaingroup_hdl%daddr)
+        ibegin_ = ibegin__tmp
+      ENDIF
+
+      IF (PRESENT(j_index_)) THEN
+        j_index__tmp = cxios_is_defined_domaingroup_j_index &
+      (domaingroup_hdl%daddr)
+        j_index_ = j_index__tmp
+      ENDIF
+
+      IF (PRESENT(jbegin_)) THEN
+        jbegin__tmp = cxios_is_defined_domaingroup_jbegin &
+      (domaingroup_hdl%daddr)
+        jbegin_ = jbegin__tmp
+      ENDIF
+
+      IF (PRESENT(lat_name_)) THEN
+        lat_name__tmp = cxios_is_defined_domaingroup_lat_name &
+      (domaingroup_hdl%daddr)
+        lat_name_ = lat_name__tmp
+      ENDIF
+
+      IF (PRESENT(latvalue_1d_)) THEN
+        latvalue_1d__tmp = cxios_is_defined_domaingroup_latvalue_1d &
+      (domaingroup_hdl%daddr)
+        latvalue_1d_ = latvalue_1d__tmp
+      ENDIF
+
+      IF (PRESENT(latvalue_2d_)) THEN
+        latvalue_2d__tmp = cxios_is_defined_domaingroup_latvalue_2d &
+      (domaingroup_hdl%daddr)
+        latvalue_2d_ = latvalue_2d__tmp
+      ENDIF
+
+      IF (PRESENT(lon_name_)) THEN
+        lon_name__tmp = cxios_is_defined_domaingroup_lon_name &
+      (domaingroup_hdl%daddr)
+        lon_name_ = lon_name__tmp
+      ENDIF
+
+      IF (PRESENT(long_name_)) THEN
+        long_name__tmp = cxios_is_defined_domaingroup_long_name &
+      (domaingroup_hdl%daddr)
+        long_name_ = long_name__tmp
+      ENDIF
+
+      IF (PRESENT(lonvalue_1d_)) THEN
+        lonvalue_1d__tmp = cxios_is_defined_domaingroup_lonvalue_1d &
+      (domaingroup_hdl%daddr)
+        lonvalue_1d_ = lonvalue_1d__tmp
+      ENDIF
+
+      IF (PRESENT(lonvalue_2d_)) THEN
+        lonvalue_2d__tmp = cxios_is_defined_domaingroup_lonvalue_2d &
+      (domaingroup_hdl%daddr)
+        lonvalue_2d_ = lonvalue_2d__tmp
+      ENDIF
+
+      IF (PRESENT(mask_1d_)) THEN
+        mask_1d__tmp = cxios_is_defined_domaingroup_mask_1d &
+      (domaingroup_hdl%daddr)
+        mask_1d_ = mask_1d__tmp
+      ENDIF
+
+      IF (PRESENT(mask_2d_)) THEN
+        mask_2d__tmp = cxios_is_defined_domaingroup_mask_2d &
+      (domaingroup_hdl%daddr)
+        mask_2d_ = mask_2d__tmp
+      ENDIF
+
+      IF (PRESENT(name_)) THEN
+        name__tmp = cxios_is_defined_domaingroup_name &
+      (domaingroup_hdl%daddr)
+        name_ = name__tmp
+      ENDIF
+
+      IF (PRESENT(ni_)) THEN
+        ni__tmp = cxios_is_defined_domaingroup_ni &
+      (domaingroup_hdl%daddr)
+        ni_ = ni__tmp
+      ENDIF
+
+      IF (PRESENT(ni_glo_)) THEN
+        ni_glo__tmp = cxios_is_defined_domaingroup_ni_glo &
+      (domaingroup_hdl%daddr)
+        ni_glo_ = ni_glo__tmp
+      ENDIF
+
+      IF (PRESENT(nj_)) THEN
+        nj__tmp = cxios_is_defined_domaingroup_nj &
+      (domaingroup_hdl%daddr)
+        nj_ = nj__tmp
+      ENDIF
+
+      IF (PRESENT(nj_glo_)) THEN
+        nj_glo__tmp = cxios_is_defined_domaingroup_nj_glo &
+      (domaingroup_hdl%daddr)
+        nj_glo_ = nj_glo__tmp
+      ENDIF
+
+      IF (PRESENT(nvertex_)) THEN
+        nvertex__tmp = cxios_is_defined_domaingroup_nvertex &
+      (domaingroup_hdl%daddr)
+        nvertex_ = nvertex__tmp
+      ENDIF
+
+      IF (PRESENT(prec_)) THEN
+        prec__tmp = cxios_is_defined_domaingroup_prec &
+      (domaingroup_hdl%daddr)
+        prec_ = prec__tmp
+      ENDIF
+
+      IF (PRESENT(radius_)) THEN
+        radius__tmp = cxios_is_defined_domaingroup_radius &
+      (domaingroup_hdl%daddr)
+        radius_ = radius__tmp
+      ENDIF
+
+      IF (PRESENT(standard_name_)) THEN
+        standard_name__tmp = cxios_is_defined_domaingroup_standard_name &
+      (domaingroup_hdl%daddr)
+        standard_name_ = standard_name__tmp
+      ENDIF
+
+      IF (PRESENT(type_)) THEN
+        type__tmp = cxios_is_defined_domaingroup_type &
+      (domaingroup_hdl%daddr)
+        type_ = type__tmp
+      ENDIF
+
+  END SUBROUTINE xios(is_defined_domaingroup_attr_hdl_)
+
+END MODULE idomaingroup_attr
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/fortran_attr/iduplicate_scalar_to_axis_attr.F90
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/fortran_attr/iduplicate_scalar_to_axis_attr.F90	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/fortran_attr/iduplicate_scalar_to_axis_attr.F90	(revision 1749)
@@ -0,0 +1,112 @@
+! * ************************************************************************** *
+! *               Interface auto generated - do not modify                     *
+! * ************************************************************************** *
+#include "xios_fortran_prefix.hpp"
+
+MODULE iduplicate_scalar_to_axis_attr
+  USE, INTRINSIC :: ISO_C_BINDING
+  USE iduplicate_scalar_to_axis
+  USE duplicate_scalar_to_axis_interface_attr
+
+CONTAINS
+
+  SUBROUTINE xios(set_duplicate_scalar_to_axis_attr)  &
+    ( duplicate_scalar_to_axis_id )
+
+    IMPLICIT NONE
+      TYPE(txios(duplicate_scalar_to_axis))  :: duplicate_scalar_to_axis_hdl
+      CHARACTER(LEN=*), INTENT(IN) ::duplicate_scalar_to_axis_id
+
+      CALL xios(get_duplicate_scalar_to_axis_handle) &
+      (duplicate_scalar_to_axis_id,duplicate_scalar_to_axis_hdl)
+      CALL xios(set_duplicate_scalar_to_axis_attr_hdl_)   &
+      ( duplicate_scalar_to_axis_hdl )
+
+  END SUBROUTINE xios(set_duplicate_scalar_to_axis_attr)
+
+  SUBROUTINE xios(set_duplicate_scalar_to_axis_attr_hdl)  &
+    ( duplicate_scalar_to_axis_hdl )
+
+    IMPLICIT NONE
+      TYPE(txios(duplicate_scalar_to_axis)) , INTENT(IN) :: duplicate_scalar_to_axis_hdl
+
+      CALL xios(set_duplicate_scalar_to_axis_attr_hdl_)  &
+      ( duplicate_scalar_to_axis_hdl )
+
+  END SUBROUTINE xios(set_duplicate_scalar_to_axis_attr_hdl)
+
+  SUBROUTINE xios(set_duplicate_scalar_to_axis_attr_hdl_)   &
+    ( duplicate_scalar_to_axis_hdl )
+
+    IMPLICIT NONE
+      TYPE(txios(duplicate_scalar_to_axis)) , INTENT(IN) :: duplicate_scalar_to_axis_hdl
+
+  END SUBROUTINE xios(set_duplicate_scalar_to_axis_attr_hdl_)
+
+  SUBROUTINE xios(get_duplicate_scalar_to_axis_attr)  &
+    ( duplicate_scalar_to_axis_id )
+
+    IMPLICIT NONE
+      TYPE(txios(duplicate_scalar_to_axis))  :: duplicate_scalar_to_axis_hdl
+      CHARACTER(LEN=*), INTENT(IN) ::duplicate_scalar_to_axis_id
+
+      CALL xios(get_duplicate_scalar_to_axis_handle) &
+      (duplicate_scalar_to_axis_id,duplicate_scalar_to_axis_hdl)
+      CALL xios(get_duplicate_scalar_to_axis_attr_hdl_)   &
+      ( duplicate_scalar_to_axis_hdl )
+
+  END SUBROUTINE xios(get_duplicate_scalar_to_axis_attr)
+
+  SUBROUTINE xios(get_duplicate_scalar_to_axis_attr_hdl)  &
+    ( duplicate_scalar_to_axis_hdl )
+
+    IMPLICIT NONE
+      TYPE(txios(duplicate_scalar_to_axis)) , INTENT(IN) :: duplicate_scalar_to_axis_hdl
+
+      CALL xios(get_duplicate_scalar_to_axis_attr_hdl_)  &
+      ( duplicate_scalar_to_axis_hdl )
+
+  END SUBROUTINE xios(get_duplicate_scalar_to_axis_attr_hdl)
+
+  SUBROUTINE xios(get_duplicate_scalar_to_axis_attr_hdl_)   &
+    ( duplicate_scalar_to_axis_hdl )
+
+    IMPLICIT NONE
+      TYPE(txios(duplicate_scalar_to_axis)) , INTENT(IN) :: duplicate_scalar_to_axis_hdl
+
+  END SUBROUTINE xios(get_duplicate_scalar_to_axis_attr_hdl_)
+
+  SUBROUTINE xios(is_defined_duplicate_scalar_to_axis_attr)  &
+    ( duplicate_scalar_to_axis_id )
+
+    IMPLICIT NONE
+      TYPE(txios(duplicate_scalar_to_axis))  :: duplicate_scalar_to_axis_hdl
+      CHARACTER(LEN=*), INTENT(IN) ::duplicate_scalar_to_axis_id
+
+      CALL xios(get_duplicate_scalar_to_axis_handle) &
+      (duplicate_scalar_to_axis_id,duplicate_scalar_to_axis_hdl)
+      CALL xios(is_defined_duplicate_scalar_to_axis_attr_hdl_)   &
+      ( duplicate_scalar_to_axis_hdl )
+
+  END SUBROUTINE xios(is_defined_duplicate_scalar_to_axis_attr)
+
+  SUBROUTINE xios(is_defined_duplicate_scalar_to_axis_attr_hdl)  &
+    ( duplicate_scalar_to_axis_hdl )
+
+    IMPLICIT NONE
+      TYPE(txios(duplicate_scalar_to_axis)) , INTENT(IN) :: duplicate_scalar_to_axis_hdl
+
+      CALL xios(is_defined_duplicate_scalar_to_axis_attr_hdl_)  &
+      ( duplicate_scalar_to_axis_hdl )
+
+  END SUBROUTINE xios(is_defined_duplicate_scalar_to_axis_attr_hdl)
+
+  SUBROUTINE xios(is_defined_duplicate_scalar_to_axis_attr_hdl_)   &
+    ( duplicate_scalar_to_axis_hdl )
+
+    IMPLICIT NONE
+      TYPE(txios(duplicate_scalar_to_axis)) , INTENT(IN) :: duplicate_scalar_to_axis_hdl
+
+  END SUBROUTINE xios(is_defined_duplicate_scalar_to_axis_attr_hdl_)
+
+END MODULE iduplicate_scalar_to_axis_attr
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/fortran_attr/iexpand_domain_attr.F90
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/fortran_attr/iexpand_domain_attr.F90	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/fortran_attr/iexpand_domain_attr.F90	(revision 1749)
@@ -0,0 +1,240 @@
+! * ************************************************************************** *
+! *               Interface auto generated - do not modify                     *
+! * ************************************************************************** *
+#include "xios_fortran_prefix.hpp"
+
+MODULE iexpand_domain_attr
+  USE, INTRINSIC :: ISO_C_BINDING
+  USE iexpand_domain
+  USE expand_domain_interface_attr
+
+CONTAINS
+
+  SUBROUTINE xios(set_expand_domain_attr)  &
+    ( expand_domain_id, i_periodic, j_periodic, order, type )
+
+    IMPLICIT NONE
+      TYPE(txios(expand_domain))  :: expand_domain_hdl
+      CHARACTER(LEN=*), INTENT(IN) ::expand_domain_id
+      LOGICAL  , OPTIONAL, INTENT(IN) :: i_periodic
+      LOGICAL (KIND=C_BOOL) :: i_periodic_tmp
+      LOGICAL  , OPTIONAL, INTENT(IN) :: j_periodic
+      LOGICAL (KIND=C_BOOL) :: j_periodic_tmp
+      INTEGER  , OPTIONAL, INTENT(IN) :: order
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: type
+
+      CALL xios(get_expand_domain_handle) &
+      (expand_domain_id,expand_domain_hdl)
+      CALL xios(set_expand_domain_attr_hdl_)   &
+      ( expand_domain_hdl, i_periodic, j_periodic, order, type )
+
+  END SUBROUTINE xios(set_expand_domain_attr)
+
+  SUBROUTINE xios(set_expand_domain_attr_hdl)  &
+    ( expand_domain_hdl, i_periodic, j_periodic, order, type )
+
+    IMPLICIT NONE
+      TYPE(txios(expand_domain)) , INTENT(IN) :: expand_domain_hdl
+      LOGICAL  , OPTIONAL, INTENT(IN) :: i_periodic
+      LOGICAL (KIND=C_BOOL) :: i_periodic_tmp
+      LOGICAL  , OPTIONAL, INTENT(IN) :: j_periodic
+      LOGICAL (KIND=C_BOOL) :: j_periodic_tmp
+      INTEGER  , OPTIONAL, INTENT(IN) :: order
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: type
+
+      CALL xios(set_expand_domain_attr_hdl_)  &
+      ( expand_domain_hdl, i_periodic, j_periodic, order, type )
+
+  END SUBROUTINE xios(set_expand_domain_attr_hdl)
+
+  SUBROUTINE xios(set_expand_domain_attr_hdl_)   &
+    ( expand_domain_hdl, i_periodic_, j_periodic_, order_, type_ )
+
+    IMPLICIT NONE
+      TYPE(txios(expand_domain)) , INTENT(IN) :: expand_domain_hdl
+      LOGICAL  , OPTIONAL, INTENT(IN) :: i_periodic_
+      LOGICAL (KIND=C_BOOL) :: i_periodic__tmp
+      LOGICAL  , OPTIONAL, INTENT(IN) :: j_periodic_
+      LOGICAL (KIND=C_BOOL) :: j_periodic__tmp
+      INTEGER  , OPTIONAL, INTENT(IN) :: order_
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: type_
+
+      IF (PRESENT(i_periodic_)) THEN
+        i_periodic__tmp = i_periodic_
+        CALL cxios_set_expand_domain_i_periodic &
+      (expand_domain_hdl%daddr, i_periodic__tmp)
+      ENDIF
+
+      IF (PRESENT(j_periodic_)) THEN
+        j_periodic__tmp = j_periodic_
+        CALL cxios_set_expand_domain_j_periodic &
+      (expand_domain_hdl%daddr, j_periodic__tmp)
+      ENDIF
+
+      IF (PRESENT(order_)) THEN
+        CALL cxios_set_expand_domain_order &
+      (expand_domain_hdl%daddr, order_)
+      ENDIF
+
+      IF (PRESENT(type_)) THEN
+        CALL cxios_set_expand_domain_type &
+      (expand_domain_hdl%daddr, type_, len(type_))
+      ENDIF
+
+  END SUBROUTINE xios(set_expand_domain_attr_hdl_)
+
+  SUBROUTINE xios(get_expand_domain_attr)  &
+    ( expand_domain_id, i_periodic, j_periodic, order, type )
+
+    IMPLICIT NONE
+      TYPE(txios(expand_domain))  :: expand_domain_hdl
+      CHARACTER(LEN=*), INTENT(IN) ::expand_domain_id
+      LOGICAL  , OPTIONAL, INTENT(OUT) :: i_periodic
+      LOGICAL (KIND=C_BOOL) :: i_periodic_tmp
+      LOGICAL  , OPTIONAL, INTENT(OUT) :: j_periodic
+      LOGICAL (KIND=C_BOOL) :: j_periodic_tmp
+      INTEGER  , OPTIONAL, INTENT(OUT) :: order
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: type
+
+      CALL xios(get_expand_domain_handle) &
+      (expand_domain_id,expand_domain_hdl)
+      CALL xios(get_expand_domain_attr_hdl_)   &
+      ( expand_domain_hdl, i_periodic, j_periodic, order, type )
+
+  END SUBROUTINE xios(get_expand_domain_attr)
+
+  SUBROUTINE xios(get_expand_domain_attr_hdl)  &
+    ( expand_domain_hdl, i_periodic, j_periodic, order, type )
+
+    IMPLICIT NONE
+      TYPE(txios(expand_domain)) , INTENT(IN) :: expand_domain_hdl
+      LOGICAL  , OPTIONAL, INTENT(OUT) :: i_periodic
+      LOGICAL (KIND=C_BOOL) :: i_periodic_tmp
+      LOGICAL  , OPTIONAL, INTENT(OUT) :: j_periodic
+      LOGICAL (KIND=C_BOOL) :: j_periodic_tmp
+      INTEGER  , OPTIONAL, INTENT(OUT) :: order
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: type
+
+      CALL xios(get_expand_domain_attr_hdl_)  &
+      ( expand_domain_hdl, i_periodic, j_periodic, order, type )
+
+  END SUBROUTINE xios(get_expand_domain_attr_hdl)
+
+  SUBROUTINE xios(get_expand_domain_attr_hdl_)   &
+    ( expand_domain_hdl, i_periodic_, j_periodic_, order_, type_ )
+
+    IMPLICIT NONE
+      TYPE(txios(expand_domain)) , INTENT(IN) :: expand_domain_hdl
+      LOGICAL  , OPTIONAL, INTENT(OUT) :: i_periodic_
+      LOGICAL (KIND=C_BOOL) :: i_periodic__tmp
+      LOGICAL  , OPTIONAL, INTENT(OUT) :: j_periodic_
+      LOGICAL (KIND=C_BOOL) :: j_periodic__tmp
+      INTEGER  , OPTIONAL, INTENT(OUT) :: order_
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: type_
+
+      IF (PRESENT(i_periodic_)) THEN
+        CALL cxios_get_expand_domain_i_periodic &
+      (expand_domain_hdl%daddr, i_periodic__tmp)
+        i_periodic_ = i_periodic__tmp
+      ENDIF
+
+      IF (PRESENT(j_periodic_)) THEN
+        CALL cxios_get_expand_domain_j_periodic &
+      (expand_domain_hdl%daddr, j_periodic__tmp)
+        j_periodic_ = j_periodic__tmp
+      ENDIF
+
+      IF (PRESENT(order_)) THEN
+        CALL cxios_get_expand_domain_order &
+      (expand_domain_hdl%daddr, order_)
+      ENDIF
+
+      IF (PRESENT(type_)) THEN
+        CALL cxios_get_expand_domain_type &
+      (expand_domain_hdl%daddr, type_, len(type_))
+      ENDIF
+
+  END SUBROUTINE xios(get_expand_domain_attr_hdl_)
+
+  SUBROUTINE xios(is_defined_expand_domain_attr)  &
+    ( expand_domain_id, i_periodic, j_periodic, order, type )
+
+    IMPLICIT NONE
+      TYPE(txios(expand_domain))  :: expand_domain_hdl
+      CHARACTER(LEN=*), INTENT(IN) ::expand_domain_id
+      LOGICAL, OPTIONAL, INTENT(OUT) :: i_periodic
+      LOGICAL(KIND=C_BOOL) :: i_periodic_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: j_periodic
+      LOGICAL(KIND=C_BOOL) :: j_periodic_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: order
+      LOGICAL(KIND=C_BOOL) :: order_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: type
+      LOGICAL(KIND=C_BOOL) :: type_tmp
+
+      CALL xios(get_expand_domain_handle) &
+      (expand_domain_id,expand_domain_hdl)
+      CALL xios(is_defined_expand_domain_attr_hdl_)   &
+      ( expand_domain_hdl, i_periodic, j_periodic, order, type )
+
+  END SUBROUTINE xios(is_defined_expand_domain_attr)
+
+  SUBROUTINE xios(is_defined_expand_domain_attr_hdl)  &
+    ( expand_domain_hdl, i_periodic, j_periodic, order, type )
+
+    IMPLICIT NONE
+      TYPE(txios(expand_domain)) , INTENT(IN) :: expand_domain_hdl
+      LOGICAL, OPTIONAL, INTENT(OUT) :: i_periodic
+      LOGICAL(KIND=C_BOOL) :: i_periodic_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: j_periodic
+      LOGICAL(KIND=C_BOOL) :: j_periodic_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: order
+      LOGICAL(KIND=C_BOOL) :: order_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: type
+      LOGICAL(KIND=C_BOOL) :: type_tmp
+
+      CALL xios(is_defined_expand_domain_attr_hdl_)  &
+      ( expand_domain_hdl, i_periodic, j_periodic, order, type )
+
+  END SUBROUTINE xios(is_defined_expand_domain_attr_hdl)
+
+  SUBROUTINE xios(is_defined_expand_domain_attr_hdl_)   &
+    ( expand_domain_hdl, i_periodic_, j_periodic_, order_, type_ )
+
+    IMPLICIT NONE
+      TYPE(txios(expand_domain)) , INTENT(IN) :: expand_domain_hdl
+      LOGICAL, OPTIONAL, INTENT(OUT) :: i_periodic_
+      LOGICAL(KIND=C_BOOL) :: i_periodic__tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: j_periodic_
+      LOGICAL(KIND=C_BOOL) :: j_periodic__tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: order_
+      LOGICAL(KIND=C_BOOL) :: order__tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: type_
+      LOGICAL(KIND=C_BOOL) :: type__tmp
+
+      IF (PRESENT(i_periodic_)) THEN
+        i_periodic__tmp = cxios_is_defined_expand_domain_i_periodic &
+      (expand_domain_hdl%daddr)
+        i_periodic_ = i_periodic__tmp
+      ENDIF
+
+      IF (PRESENT(j_periodic_)) THEN
+        j_periodic__tmp = cxios_is_defined_expand_domain_j_periodic &
+      (expand_domain_hdl%daddr)
+        j_periodic_ = j_periodic__tmp
+      ENDIF
+
+      IF (PRESENT(order_)) THEN
+        order__tmp = cxios_is_defined_expand_domain_order &
+      (expand_domain_hdl%daddr)
+        order_ = order__tmp
+      ENDIF
+
+      IF (PRESENT(type_)) THEN
+        type__tmp = cxios_is_defined_expand_domain_type &
+      (expand_domain_hdl%daddr)
+        type_ = type__tmp
+      ENDIF
+
+  END SUBROUTINE xios(is_defined_expand_domain_attr_hdl_)
+
+END MODULE iexpand_domain_attr
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/fortran_attr/iextract_axis_to_scalar_attr.F90
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/fortran_attr/iextract_axis_to_scalar_attr.F90	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/fortran_attr/iextract_axis_to_scalar_attr.F90	(revision 1749)
@@ -0,0 +1,140 @@
+! * ************************************************************************** *
+! *               Interface auto generated - do not modify                     *
+! * ************************************************************************** *
+#include "xios_fortran_prefix.hpp"
+
+MODULE iextract_axis_to_scalar_attr
+  USE, INTRINSIC :: ISO_C_BINDING
+  USE iextract_axis_to_scalar
+  USE extract_axis_to_scalar_interface_attr
+
+CONTAINS
+
+  SUBROUTINE xios(set_extract_axis_to_scalar_attr)  &
+    ( extract_axis_to_scalar_id, position )
+
+    IMPLICIT NONE
+      TYPE(txios(extract_axis_to_scalar))  :: extract_axis_to_scalar_hdl
+      CHARACTER(LEN=*), INTENT(IN) ::extract_axis_to_scalar_id
+      INTEGER  , OPTIONAL, INTENT(IN) :: position
+
+      CALL xios(get_extract_axis_to_scalar_handle) &
+      (extract_axis_to_scalar_id,extract_axis_to_scalar_hdl)
+      CALL xios(set_extract_axis_to_scalar_attr_hdl_)   &
+      ( extract_axis_to_scalar_hdl, position )
+
+  END SUBROUTINE xios(set_extract_axis_to_scalar_attr)
+
+  SUBROUTINE xios(set_extract_axis_to_scalar_attr_hdl)  &
+    ( extract_axis_to_scalar_hdl, position )
+
+    IMPLICIT NONE
+      TYPE(txios(extract_axis_to_scalar)) , INTENT(IN) :: extract_axis_to_scalar_hdl
+      INTEGER  , OPTIONAL, INTENT(IN) :: position
+
+      CALL xios(set_extract_axis_to_scalar_attr_hdl_)  &
+      ( extract_axis_to_scalar_hdl, position )
+
+  END SUBROUTINE xios(set_extract_axis_to_scalar_attr_hdl)
+
+  SUBROUTINE xios(set_extract_axis_to_scalar_attr_hdl_)   &
+    ( extract_axis_to_scalar_hdl, position_ )
+
+    IMPLICIT NONE
+      TYPE(txios(extract_axis_to_scalar)) , INTENT(IN) :: extract_axis_to_scalar_hdl
+      INTEGER  , OPTIONAL, INTENT(IN) :: position_
+
+      IF (PRESENT(position_)) THEN
+        CALL cxios_set_extract_axis_to_scalar_position &
+      (extract_axis_to_scalar_hdl%daddr, position_)
+      ENDIF
+
+  END SUBROUTINE xios(set_extract_axis_to_scalar_attr_hdl_)
+
+  SUBROUTINE xios(get_extract_axis_to_scalar_attr)  &
+    ( extract_axis_to_scalar_id, position )
+
+    IMPLICIT NONE
+      TYPE(txios(extract_axis_to_scalar))  :: extract_axis_to_scalar_hdl
+      CHARACTER(LEN=*), INTENT(IN) ::extract_axis_to_scalar_id
+      INTEGER  , OPTIONAL, INTENT(OUT) :: position
+
+      CALL xios(get_extract_axis_to_scalar_handle) &
+      (extract_axis_to_scalar_id,extract_axis_to_scalar_hdl)
+      CALL xios(get_extract_axis_to_scalar_attr_hdl_)   &
+      ( extract_axis_to_scalar_hdl, position )
+
+  END SUBROUTINE xios(get_extract_axis_to_scalar_attr)
+
+  SUBROUTINE xios(get_extract_axis_to_scalar_attr_hdl)  &
+    ( extract_axis_to_scalar_hdl, position )
+
+    IMPLICIT NONE
+      TYPE(txios(extract_axis_to_scalar)) , INTENT(IN) :: extract_axis_to_scalar_hdl
+      INTEGER  , OPTIONAL, INTENT(OUT) :: position
+
+      CALL xios(get_extract_axis_to_scalar_attr_hdl_)  &
+      ( extract_axis_to_scalar_hdl, position )
+
+  END SUBROUTINE xios(get_extract_axis_to_scalar_attr_hdl)
+
+  SUBROUTINE xios(get_extract_axis_to_scalar_attr_hdl_)   &
+    ( extract_axis_to_scalar_hdl, position_ )
+
+    IMPLICIT NONE
+      TYPE(txios(extract_axis_to_scalar)) , INTENT(IN) :: extract_axis_to_scalar_hdl
+      INTEGER  , OPTIONAL, INTENT(OUT) :: position_
+
+      IF (PRESENT(position_)) THEN
+        CALL cxios_get_extract_axis_to_scalar_position &
+      (extract_axis_to_scalar_hdl%daddr, position_)
+      ENDIF
+
+  END SUBROUTINE xios(get_extract_axis_to_scalar_attr_hdl_)
+
+  SUBROUTINE xios(is_defined_extract_axis_to_scalar_attr)  &
+    ( extract_axis_to_scalar_id, position )
+
+    IMPLICIT NONE
+      TYPE(txios(extract_axis_to_scalar))  :: extract_axis_to_scalar_hdl
+      CHARACTER(LEN=*), INTENT(IN) ::extract_axis_to_scalar_id
+      LOGICAL, OPTIONAL, INTENT(OUT) :: position
+      LOGICAL(KIND=C_BOOL) :: position_tmp
+
+      CALL xios(get_extract_axis_to_scalar_handle) &
+      (extract_axis_to_scalar_id,extract_axis_to_scalar_hdl)
+      CALL xios(is_defined_extract_axis_to_scalar_attr_hdl_)   &
+      ( extract_axis_to_scalar_hdl, position )
+
+  END SUBROUTINE xios(is_defined_extract_axis_to_scalar_attr)
+
+  SUBROUTINE xios(is_defined_extract_axis_to_scalar_attr_hdl)  &
+    ( extract_axis_to_scalar_hdl, position )
+
+    IMPLICIT NONE
+      TYPE(txios(extract_axis_to_scalar)) , INTENT(IN) :: extract_axis_to_scalar_hdl
+      LOGICAL, OPTIONAL, INTENT(OUT) :: position
+      LOGICAL(KIND=C_BOOL) :: position_tmp
+
+      CALL xios(is_defined_extract_axis_to_scalar_attr_hdl_)  &
+      ( extract_axis_to_scalar_hdl, position )
+
+  END SUBROUTINE xios(is_defined_extract_axis_to_scalar_attr_hdl)
+
+  SUBROUTINE xios(is_defined_extract_axis_to_scalar_attr_hdl_)   &
+    ( extract_axis_to_scalar_hdl, position_ )
+
+    IMPLICIT NONE
+      TYPE(txios(extract_axis_to_scalar)) , INTENT(IN) :: extract_axis_to_scalar_hdl
+      LOGICAL, OPTIONAL, INTENT(OUT) :: position_
+      LOGICAL(KIND=C_BOOL) :: position__tmp
+
+      IF (PRESENT(position_)) THEN
+        position__tmp = cxios_is_defined_extract_axis_to_scalar_position &
+      (extract_axis_to_scalar_hdl%daddr)
+        position_ = position__tmp
+      ENDIF
+
+  END SUBROUTINE xios(is_defined_extract_axis_to_scalar_attr_hdl_)
+
+END MODULE iextract_axis_to_scalar_attr
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/fortran_attr/iextract_domain_to_axis_attr.F90
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/fortran_attr/iextract_domain_to_axis_attr.F90	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/fortran_attr/iextract_domain_to_axis_attr.F90	(revision 1749)
@@ -0,0 +1,168 @@
+! * ************************************************************************** *
+! *               Interface auto generated - do not modify                     *
+! * ************************************************************************** *
+#include "xios_fortran_prefix.hpp"
+
+MODULE iextract_domain_to_axis_attr
+  USE, INTRINSIC :: ISO_C_BINDING
+  USE iextract_domain_to_axis
+  USE extract_domain_to_axis_interface_attr
+
+CONTAINS
+
+  SUBROUTINE xios(set_extract_domain_to_axis_attr)  &
+    ( extract_domain_to_axis_id, direction, position )
+
+    IMPLICIT NONE
+      TYPE(txios(extract_domain_to_axis))  :: extract_domain_to_axis_hdl
+      CHARACTER(LEN=*), INTENT(IN) ::extract_domain_to_axis_id
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: direction
+      INTEGER  , OPTIONAL, INTENT(IN) :: position
+
+      CALL xios(get_extract_domain_to_axis_handle) &
+      (extract_domain_to_axis_id,extract_domain_to_axis_hdl)
+      CALL xios(set_extract_domain_to_axis_attr_hdl_)   &
+      ( extract_domain_to_axis_hdl, direction, position )
+
+  END SUBROUTINE xios(set_extract_domain_to_axis_attr)
+
+  SUBROUTINE xios(set_extract_domain_to_axis_attr_hdl)  &
+    ( extract_domain_to_axis_hdl, direction, position )
+
+    IMPLICIT NONE
+      TYPE(txios(extract_domain_to_axis)) , INTENT(IN) :: extract_domain_to_axis_hdl
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: direction
+      INTEGER  , OPTIONAL, INTENT(IN) :: position
+
+      CALL xios(set_extract_domain_to_axis_attr_hdl_)  &
+      ( extract_domain_to_axis_hdl, direction, position )
+
+  END SUBROUTINE xios(set_extract_domain_to_axis_attr_hdl)
+
+  SUBROUTINE xios(set_extract_domain_to_axis_attr_hdl_)   &
+    ( extract_domain_to_axis_hdl, direction_, position_ )
+
+    IMPLICIT NONE
+      TYPE(txios(extract_domain_to_axis)) , INTENT(IN) :: extract_domain_to_axis_hdl
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: direction_
+      INTEGER  , OPTIONAL, INTENT(IN) :: position_
+
+      IF (PRESENT(direction_)) THEN
+        CALL cxios_set_extract_domain_to_axis_direction &
+      (extract_domain_to_axis_hdl%daddr, direction_, len(direction_))
+      ENDIF
+
+      IF (PRESENT(position_)) THEN
+        CALL cxios_set_extract_domain_to_axis_position &
+      (extract_domain_to_axis_hdl%daddr, position_)
+      ENDIF
+
+  END SUBROUTINE xios(set_extract_domain_to_axis_attr_hdl_)
+
+  SUBROUTINE xios(get_extract_domain_to_axis_attr)  &
+    ( extract_domain_to_axis_id, direction, position )
+
+    IMPLICIT NONE
+      TYPE(txios(extract_domain_to_axis))  :: extract_domain_to_axis_hdl
+      CHARACTER(LEN=*), INTENT(IN) ::extract_domain_to_axis_id
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: direction
+      INTEGER  , OPTIONAL, INTENT(OUT) :: position
+
+      CALL xios(get_extract_domain_to_axis_handle) &
+      (extract_domain_to_axis_id,extract_domain_to_axis_hdl)
+      CALL xios(get_extract_domain_to_axis_attr_hdl_)   &
+      ( extract_domain_to_axis_hdl, direction, position )
+
+  END SUBROUTINE xios(get_extract_domain_to_axis_attr)
+
+  SUBROUTINE xios(get_extract_domain_to_axis_attr_hdl)  &
+    ( extract_domain_to_axis_hdl, direction, position )
+
+    IMPLICIT NONE
+      TYPE(txios(extract_domain_to_axis)) , INTENT(IN) :: extract_domain_to_axis_hdl
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: direction
+      INTEGER  , OPTIONAL, INTENT(OUT) :: position
+
+      CALL xios(get_extract_domain_to_axis_attr_hdl_)  &
+      ( extract_domain_to_axis_hdl, direction, position )
+
+  END SUBROUTINE xios(get_extract_domain_to_axis_attr_hdl)
+
+  SUBROUTINE xios(get_extract_domain_to_axis_attr_hdl_)   &
+    ( extract_domain_to_axis_hdl, direction_, position_ )
+
+    IMPLICIT NONE
+      TYPE(txios(extract_domain_to_axis)) , INTENT(IN) :: extract_domain_to_axis_hdl
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: direction_
+      INTEGER  , OPTIONAL, INTENT(OUT) :: position_
+
+      IF (PRESENT(direction_)) THEN
+        CALL cxios_get_extract_domain_to_axis_direction &
+      (extract_domain_to_axis_hdl%daddr, direction_, len(direction_))
+      ENDIF
+
+      IF (PRESENT(position_)) THEN
+        CALL cxios_get_extract_domain_to_axis_position &
+      (extract_domain_to_axis_hdl%daddr, position_)
+      ENDIF
+
+  END SUBROUTINE xios(get_extract_domain_to_axis_attr_hdl_)
+
+  SUBROUTINE xios(is_defined_extract_domain_to_axis_attr)  &
+    ( extract_domain_to_axis_id, direction, position )
+
+    IMPLICIT NONE
+      TYPE(txios(extract_domain_to_axis))  :: extract_domain_to_axis_hdl
+      CHARACTER(LEN=*), INTENT(IN) ::extract_domain_to_axis_id
+      LOGICAL, OPTIONAL, INTENT(OUT) :: direction
+      LOGICAL(KIND=C_BOOL) :: direction_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: position
+      LOGICAL(KIND=C_BOOL) :: position_tmp
+
+      CALL xios(get_extract_domain_to_axis_handle) &
+      (extract_domain_to_axis_id,extract_domain_to_axis_hdl)
+      CALL xios(is_defined_extract_domain_to_axis_attr_hdl_)   &
+      ( extract_domain_to_axis_hdl, direction, position )
+
+  END SUBROUTINE xios(is_defined_extract_domain_to_axis_attr)
+
+  SUBROUTINE xios(is_defined_extract_domain_to_axis_attr_hdl)  &
+    ( extract_domain_to_axis_hdl, direction, position )
+
+    IMPLICIT NONE
+      TYPE(txios(extract_domain_to_axis)) , INTENT(IN) :: extract_domain_to_axis_hdl
+      LOGICAL, OPTIONAL, INTENT(OUT) :: direction
+      LOGICAL(KIND=C_BOOL) :: direction_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: position
+      LOGICAL(KIND=C_BOOL) :: position_tmp
+
+      CALL xios(is_defined_extract_domain_to_axis_attr_hdl_)  &
+      ( extract_domain_to_axis_hdl, direction, position )
+
+  END SUBROUTINE xios(is_defined_extract_domain_to_axis_attr_hdl)
+
+  SUBROUTINE xios(is_defined_extract_domain_to_axis_attr_hdl_)   &
+    ( extract_domain_to_axis_hdl, direction_, position_ )
+
+    IMPLICIT NONE
+      TYPE(txios(extract_domain_to_axis)) , INTENT(IN) :: extract_domain_to_axis_hdl
+      LOGICAL, OPTIONAL, INTENT(OUT) :: direction_
+      LOGICAL(KIND=C_BOOL) :: direction__tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: position_
+      LOGICAL(KIND=C_BOOL) :: position__tmp
+
+      IF (PRESENT(direction_)) THEN
+        direction__tmp = cxios_is_defined_extract_domain_to_axis_direction &
+      (extract_domain_to_axis_hdl%daddr)
+        direction_ = direction__tmp
+      ENDIF
+
+      IF (PRESENT(position_)) THEN
+        position__tmp = cxios_is_defined_extract_domain_to_axis_position &
+      (extract_domain_to_axis_hdl%daddr)
+        position_ = position__tmp
+      ENDIF
+
+  END SUBROUTINE xios(is_defined_extract_domain_to_axis_attr_hdl_)
+
+END MODULE iextract_domain_to_axis_attr
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/fortran_attr/ifield_attr.F90
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/fortran_attr/ifield_attr.F90	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/fortran_attr/ifield_attr.F90	(revision 1749)
@@ -0,0 +1,1116 @@
+! * ************************************************************************** *
+! *               Interface auto generated - do not modify                     *
+! * ************************************************************************** *
+#include "xios_fortran_prefix.hpp"
+
+MODULE ifield_attr
+  USE, INTRINSIC :: ISO_C_BINDING
+  USE ifield
+  USE field_interface_attr
+
+CONTAINS
+
+  SUBROUTINE xios(set_field_attr)  &
+    ( field_id, add_offset, axis_ref, cell_methods, cell_methods_mode, check_if_active, comment  &
+    , compression_level, default_value, detect_missing_value, domain_ref, enabled, expr, field_ref  &
+    , freq_offset, freq_op, grid_path, grid_ref, indexed_output, level, long_name, name, operation  &
+    , prec, read_access, scalar_ref, scale_factor, standard_name, ts_enabled, ts_split_freq, unit  &
+    , valid_max, valid_min )
+
+    IMPLICIT NONE
+      TYPE(txios(field))  :: field_hdl
+      CHARACTER(LEN=*), INTENT(IN) ::field_id
+      REAL (KIND=8) , OPTIONAL, INTENT(IN) :: add_offset
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: axis_ref
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: cell_methods
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: cell_methods_mode
+      LOGICAL  , OPTIONAL, INTENT(IN) :: check_if_active
+      LOGICAL (KIND=C_BOOL) :: check_if_active_tmp
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: comment
+      INTEGER  , OPTIONAL, INTENT(IN) :: compression_level
+      REAL (KIND=8) , OPTIONAL, INTENT(IN) :: default_value
+      LOGICAL  , OPTIONAL, INTENT(IN) :: detect_missing_value
+      LOGICAL (KIND=C_BOOL) :: detect_missing_value_tmp
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: domain_ref
+      LOGICAL  , OPTIONAL, INTENT(IN) :: enabled
+      LOGICAL (KIND=C_BOOL) :: enabled_tmp
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: expr
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: field_ref
+      TYPE(txios(duration))  , OPTIONAL, INTENT(IN) :: freq_offset
+      TYPE(txios(duration))  , OPTIONAL, INTENT(IN) :: freq_op
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: grid_path
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: grid_ref
+      LOGICAL  , OPTIONAL, INTENT(IN) :: indexed_output
+      LOGICAL (KIND=C_BOOL) :: indexed_output_tmp
+      INTEGER  , OPTIONAL, INTENT(IN) :: level
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: long_name
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: name
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: operation
+      INTEGER  , OPTIONAL, INTENT(IN) :: prec
+      LOGICAL  , OPTIONAL, INTENT(IN) :: read_access
+      LOGICAL (KIND=C_BOOL) :: read_access_tmp
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: scalar_ref
+      REAL (KIND=8) , OPTIONAL, INTENT(IN) :: scale_factor
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: standard_name
+      LOGICAL  , OPTIONAL, INTENT(IN) :: ts_enabled
+      LOGICAL (KIND=C_BOOL) :: ts_enabled_tmp
+      TYPE(txios(duration))  , OPTIONAL, INTENT(IN) :: ts_split_freq
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: unit
+      REAL (KIND=8) , OPTIONAL, INTENT(IN) :: valid_max
+      REAL (KIND=8) , OPTIONAL, INTENT(IN) :: valid_min
+
+      CALL xios(get_field_handle) &
+      (field_id,field_hdl)
+      CALL xios(set_field_attr_hdl_)   &
+      ( field_hdl, add_offset, axis_ref, cell_methods, cell_methods_mode, check_if_active, comment  &
+      , compression_level, default_value, detect_missing_value, domain_ref, enabled, expr, field_ref  &
+      , freq_offset, freq_op, grid_path, grid_ref, indexed_output, level, long_name, name, operation  &
+      , prec, read_access, scalar_ref, scale_factor, standard_name, ts_enabled, ts_split_freq, unit  &
+      , valid_max, valid_min )
+
+  END SUBROUTINE xios(set_field_attr)
+
+  SUBROUTINE xios(set_field_attr_hdl)  &
+    ( field_hdl, add_offset, axis_ref, cell_methods, cell_methods_mode, check_if_active, comment  &
+    , compression_level, default_value, detect_missing_value, domain_ref, enabled, expr, field_ref  &
+    , freq_offset, freq_op, grid_path, grid_ref, indexed_output, level, long_name, name, operation  &
+    , prec, read_access, scalar_ref, scale_factor, standard_name, ts_enabled, ts_split_freq, unit  &
+    , valid_max, valid_min )
+
+    IMPLICIT NONE
+      TYPE(txios(field)) , INTENT(IN) :: field_hdl
+      REAL (KIND=8) , OPTIONAL, INTENT(IN) :: add_offset
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: axis_ref
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: cell_methods
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: cell_methods_mode
+      LOGICAL  , OPTIONAL, INTENT(IN) :: check_if_active
+      LOGICAL (KIND=C_BOOL) :: check_if_active_tmp
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: comment
+      INTEGER  , OPTIONAL, INTENT(IN) :: compression_level
+      REAL (KIND=8) , OPTIONAL, INTENT(IN) :: default_value
+      LOGICAL  , OPTIONAL, INTENT(IN) :: detect_missing_value
+      LOGICAL (KIND=C_BOOL) :: detect_missing_value_tmp
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: domain_ref
+      LOGICAL  , OPTIONAL, INTENT(IN) :: enabled
+      LOGICAL (KIND=C_BOOL) :: enabled_tmp
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: expr
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: field_ref
+      TYPE(txios(duration))  , OPTIONAL, INTENT(IN) :: freq_offset
+      TYPE(txios(duration))  , OPTIONAL, INTENT(IN) :: freq_op
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: grid_path
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: grid_ref
+      LOGICAL  , OPTIONAL, INTENT(IN) :: indexed_output
+      LOGICAL (KIND=C_BOOL) :: indexed_output_tmp
+      INTEGER  , OPTIONAL, INTENT(IN) :: level
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: long_name
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: name
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: operation
+      INTEGER  , OPTIONAL, INTENT(IN) :: prec
+      LOGICAL  , OPTIONAL, INTENT(IN) :: read_access
+      LOGICAL (KIND=C_BOOL) :: read_access_tmp
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: scalar_ref
+      REAL (KIND=8) , OPTIONAL, INTENT(IN) :: scale_factor
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: standard_name
+      LOGICAL  , OPTIONAL, INTENT(IN) :: ts_enabled
+      LOGICAL (KIND=C_BOOL) :: ts_enabled_tmp
+      TYPE(txios(duration))  , OPTIONAL, INTENT(IN) :: ts_split_freq
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: unit
+      REAL (KIND=8) , OPTIONAL, INTENT(IN) :: valid_max
+      REAL (KIND=8) , OPTIONAL, INTENT(IN) :: valid_min
+
+      CALL xios(set_field_attr_hdl_)  &
+      ( field_hdl, add_offset, axis_ref, cell_methods, cell_methods_mode, check_if_active, comment  &
+      , compression_level, default_value, detect_missing_value, domain_ref, enabled, expr, field_ref  &
+      , freq_offset, freq_op, grid_path, grid_ref, indexed_output, level, long_name, name, operation  &
+      , prec, read_access, scalar_ref, scale_factor, standard_name, ts_enabled, ts_split_freq, unit  &
+      , valid_max, valid_min )
+
+  END SUBROUTINE xios(set_field_attr_hdl)
+
+  SUBROUTINE xios(set_field_attr_hdl_)   &
+    ( field_hdl, add_offset_, axis_ref_, cell_methods_, cell_methods_mode_, check_if_active_, comment_  &
+    , compression_level_, default_value_, detect_missing_value_, domain_ref_, enabled_, expr_, field_ref_  &
+    , freq_offset_, freq_op_, grid_path_, grid_ref_, indexed_output_, level_, long_name_, name_  &
+    , operation_, prec_, read_access_, scalar_ref_, scale_factor_, standard_name_, ts_enabled_, ts_split_freq_  &
+    , unit_, valid_max_, valid_min_ )
+
+    IMPLICIT NONE
+      TYPE(txios(field)) , INTENT(IN) :: field_hdl
+      REAL (KIND=8) , OPTIONAL, INTENT(IN) :: add_offset_
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: axis_ref_
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: cell_methods_
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: cell_methods_mode_
+      LOGICAL  , OPTIONAL, INTENT(IN) :: check_if_active_
+      LOGICAL (KIND=C_BOOL) :: check_if_active__tmp
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: comment_
+      INTEGER  , OPTIONAL, INTENT(IN) :: compression_level_
+      REAL (KIND=8) , OPTIONAL, INTENT(IN) :: default_value_
+      LOGICAL  , OPTIONAL, INTENT(IN) :: detect_missing_value_
+      LOGICAL (KIND=C_BOOL) :: detect_missing_value__tmp
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: domain_ref_
+      LOGICAL  , OPTIONAL, INTENT(IN) :: enabled_
+      LOGICAL (KIND=C_BOOL) :: enabled__tmp
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: expr_
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: field_ref_
+      TYPE(txios(duration))  , OPTIONAL, INTENT(IN) :: freq_offset_
+      TYPE(txios(duration))  , OPTIONAL, INTENT(IN) :: freq_op_
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: grid_path_
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: grid_ref_
+      LOGICAL  , OPTIONAL, INTENT(IN) :: indexed_output_
+      LOGICAL (KIND=C_BOOL) :: indexed_output__tmp
+      INTEGER  , OPTIONAL, INTENT(IN) :: level_
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: long_name_
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: name_
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: operation_
+      INTEGER  , OPTIONAL, INTENT(IN) :: prec_
+      LOGICAL  , OPTIONAL, INTENT(IN) :: read_access_
+      LOGICAL (KIND=C_BOOL) :: read_access__tmp
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: scalar_ref_
+      REAL (KIND=8) , OPTIONAL, INTENT(IN) :: scale_factor_
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: standard_name_
+      LOGICAL  , OPTIONAL, INTENT(IN) :: ts_enabled_
+      LOGICAL (KIND=C_BOOL) :: ts_enabled__tmp
+      TYPE(txios(duration))  , OPTIONAL, INTENT(IN) :: ts_split_freq_
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: unit_
+      REAL (KIND=8) , OPTIONAL, INTENT(IN) :: valid_max_
+      REAL (KIND=8) , OPTIONAL, INTENT(IN) :: valid_min_
+
+      IF (PRESENT(add_offset_)) THEN
+        CALL cxios_set_field_add_offset &
+      (field_hdl%daddr, add_offset_)
+      ENDIF
+
+      IF (PRESENT(axis_ref_)) THEN
+        CALL cxios_set_field_axis_ref &
+      (field_hdl%daddr, axis_ref_, len(axis_ref_))
+      ENDIF
+
+      IF (PRESENT(cell_methods_)) THEN
+        CALL cxios_set_field_cell_methods &
+      (field_hdl%daddr, cell_methods_, len(cell_methods_))
+      ENDIF
+
+      IF (PRESENT(cell_methods_mode_)) THEN
+        CALL cxios_set_field_cell_methods_mode &
+      (field_hdl%daddr, cell_methods_mode_, len(cell_methods_mode_))
+      ENDIF
+
+      IF (PRESENT(check_if_active_)) THEN
+        check_if_active__tmp = check_if_active_
+        CALL cxios_set_field_check_if_active &
+      (field_hdl%daddr, check_if_active__tmp)
+      ENDIF
+
+      IF (PRESENT(comment_)) THEN
+        CALL cxios_set_field_comment &
+      (field_hdl%daddr, comment_, len(comment_))
+      ENDIF
+
+      IF (PRESENT(compression_level_)) THEN
+        CALL cxios_set_field_compression_level &
+      (field_hdl%daddr, compression_level_)
+      ENDIF
+
+      IF (PRESENT(default_value_)) THEN
+        CALL cxios_set_field_default_value &
+      (field_hdl%daddr, default_value_)
+      ENDIF
+
+      IF (PRESENT(detect_missing_value_)) THEN
+        detect_missing_value__tmp = detect_missing_value_
+        CALL cxios_set_field_detect_missing_value &
+      (field_hdl%daddr, detect_missing_value__tmp)
+      ENDIF
+
+      IF (PRESENT(domain_ref_)) THEN
+        CALL cxios_set_field_domain_ref &
+      (field_hdl%daddr, domain_ref_, len(domain_ref_))
+      ENDIF
+
+      IF (PRESENT(enabled_)) THEN
+        enabled__tmp = enabled_
+        CALL cxios_set_field_enabled &
+      (field_hdl%daddr, enabled__tmp)
+      ENDIF
+
+      IF (PRESENT(expr_)) THEN
+        CALL cxios_set_field_expr &
+      (field_hdl%daddr, expr_, len(expr_))
+      ENDIF
+
+      IF (PRESENT(field_ref_)) THEN
+        CALL cxios_set_field_field_ref &
+      (field_hdl%daddr, field_ref_, len(field_ref_))
+      ENDIF
+
+      IF (PRESENT(freq_offset_)) THEN
+        CALL cxios_set_field_freq_offset &
+      (field_hdl%daddr, freq_offset_)
+      ENDIF
+
+      IF (PRESENT(freq_op_)) THEN
+        CALL cxios_set_field_freq_op &
+      (field_hdl%daddr, freq_op_)
+      ENDIF
+
+      IF (PRESENT(grid_path_)) THEN
+        CALL cxios_set_field_grid_path &
+      (field_hdl%daddr, grid_path_, len(grid_path_))
+      ENDIF
+
+      IF (PRESENT(grid_ref_)) THEN
+        CALL cxios_set_field_grid_ref &
+      (field_hdl%daddr, grid_ref_, len(grid_ref_))
+      ENDIF
+
+      IF (PRESENT(indexed_output_)) THEN
+        indexed_output__tmp = indexed_output_
+        CALL cxios_set_field_indexed_output &
+      (field_hdl%daddr, indexed_output__tmp)
+      ENDIF
+
+      IF (PRESENT(level_)) THEN
+        CALL cxios_set_field_level &
+      (field_hdl%daddr, level_)
+      ENDIF
+
+      IF (PRESENT(long_name_)) THEN
+        CALL cxios_set_field_long_name &
+      (field_hdl%daddr, long_name_, len(long_name_))
+      ENDIF
+
+      IF (PRESENT(name_)) THEN
+        CALL cxios_set_field_name &
+      (field_hdl%daddr, name_, len(name_))
+      ENDIF
+
+      IF (PRESENT(operation_)) THEN
+        CALL cxios_set_field_operation &
+      (field_hdl%daddr, operation_, len(operation_))
+      ENDIF
+
+      IF (PRESENT(prec_)) THEN
+        CALL cxios_set_field_prec &
+      (field_hdl%daddr, prec_)
+      ENDIF
+
+      IF (PRESENT(read_access_)) THEN
+        read_access__tmp = read_access_
+        CALL cxios_set_field_read_access &
+      (field_hdl%daddr, read_access__tmp)
+      ENDIF
+
+      IF (PRESENT(scalar_ref_)) THEN
+        CALL cxios_set_field_scalar_ref &
+      (field_hdl%daddr, scalar_ref_, len(scalar_ref_))
+      ENDIF
+
+      IF (PRESENT(scale_factor_)) THEN
+        CALL cxios_set_field_scale_factor &
+      (field_hdl%daddr, scale_factor_)
+      ENDIF
+
+      IF (PRESENT(standard_name_)) THEN
+        CALL cxios_set_field_standard_name &
+      (field_hdl%daddr, standard_name_, len(standard_name_))
+      ENDIF
+
+      IF (PRESENT(ts_enabled_)) THEN
+        ts_enabled__tmp = ts_enabled_
+        CALL cxios_set_field_ts_enabled &
+      (field_hdl%daddr, ts_enabled__tmp)
+      ENDIF
+
+      IF (PRESENT(ts_split_freq_)) THEN
+        CALL cxios_set_field_ts_split_freq &
+      (field_hdl%daddr, ts_split_freq_)
+      ENDIF
+
+      IF (PRESENT(unit_)) THEN
+        CALL cxios_set_field_unit &
+      (field_hdl%daddr, unit_, len(unit_))
+      ENDIF
+
+      IF (PRESENT(valid_max_)) THEN
+        CALL cxios_set_field_valid_max &
+      (field_hdl%daddr, valid_max_)
+      ENDIF
+
+      IF (PRESENT(valid_min_)) THEN
+        CALL cxios_set_field_valid_min &
+      (field_hdl%daddr, valid_min_)
+      ENDIF
+
+  END SUBROUTINE xios(set_field_attr_hdl_)
+
+  SUBROUTINE xios(get_field_attr)  &
+    ( field_id, add_offset, axis_ref, cell_methods, cell_methods_mode, check_if_active, comment  &
+    , compression_level, default_value, detect_missing_value, domain_ref, enabled, expr, field_ref  &
+    , freq_offset, freq_op, grid_path, grid_ref, indexed_output, level, long_name, name, operation  &
+    , prec, read_access, scalar_ref, scale_factor, standard_name, ts_enabled, ts_split_freq, unit  &
+    , valid_max, valid_min )
+
+    IMPLICIT NONE
+      TYPE(txios(field))  :: field_hdl
+      CHARACTER(LEN=*), INTENT(IN) ::field_id
+      REAL (KIND=8) , OPTIONAL, INTENT(OUT) :: add_offset
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: axis_ref
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: cell_methods
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: cell_methods_mode
+      LOGICAL  , OPTIONAL, INTENT(OUT) :: check_if_active
+      LOGICAL (KIND=C_BOOL) :: check_if_active_tmp
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: comment
+      INTEGER  , OPTIONAL, INTENT(OUT) :: compression_level
+      REAL (KIND=8) , OPTIONAL, INTENT(OUT) :: default_value
+      LOGICAL  , OPTIONAL, INTENT(OUT) :: detect_missing_value
+      LOGICAL (KIND=C_BOOL) :: detect_missing_value_tmp
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: domain_ref
+      LOGICAL  , OPTIONAL, INTENT(OUT) :: enabled
+      LOGICAL (KIND=C_BOOL) :: enabled_tmp
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: expr
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: field_ref
+      TYPE(txios(duration))  , OPTIONAL, INTENT(OUT) :: freq_offset
+      TYPE(txios(duration))  , OPTIONAL, INTENT(OUT) :: freq_op
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: grid_path
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: grid_ref
+      LOGICAL  , OPTIONAL, INTENT(OUT) :: indexed_output
+      LOGICAL (KIND=C_BOOL) :: indexed_output_tmp
+      INTEGER  , OPTIONAL, INTENT(OUT) :: level
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: long_name
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: name
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: operation
+      INTEGER  , OPTIONAL, INTENT(OUT) :: prec
+      LOGICAL  , OPTIONAL, INTENT(OUT) :: read_access
+      LOGICAL (KIND=C_BOOL) :: read_access_tmp
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: scalar_ref
+      REAL (KIND=8) , OPTIONAL, INTENT(OUT) :: scale_factor
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: standard_name
+      LOGICAL  , OPTIONAL, INTENT(OUT) :: ts_enabled
+      LOGICAL (KIND=C_BOOL) :: ts_enabled_tmp
+      TYPE(txios(duration))  , OPTIONAL, INTENT(OUT) :: ts_split_freq
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: unit
+      REAL (KIND=8) , OPTIONAL, INTENT(OUT) :: valid_max
+      REAL (KIND=8) , OPTIONAL, INTENT(OUT) :: valid_min
+
+      CALL xios(get_field_handle) &
+      (field_id,field_hdl)
+      CALL xios(get_field_attr_hdl_)   &
+      ( field_hdl, add_offset, axis_ref, cell_methods, cell_methods_mode, check_if_active, comment  &
+      , compression_level, default_value, detect_missing_value, domain_ref, enabled, expr, field_ref  &
+      , freq_offset, freq_op, grid_path, grid_ref, indexed_output, level, long_name, name, operation  &
+      , prec, read_access, scalar_ref, scale_factor, standard_name, ts_enabled, ts_split_freq, unit  &
+      , valid_max, valid_min )
+
+  END SUBROUTINE xios(get_field_attr)
+
+  SUBROUTINE xios(get_field_attr_hdl)  &
+    ( field_hdl, add_offset, axis_ref, cell_methods, cell_methods_mode, check_if_active, comment  &
+    , compression_level, default_value, detect_missing_value, domain_ref, enabled, expr, field_ref  &
+    , freq_offset, freq_op, grid_path, grid_ref, indexed_output, level, long_name, name, operation  &
+    , prec, read_access, scalar_ref, scale_factor, standard_name, ts_enabled, ts_split_freq, unit  &
+    , valid_max, valid_min )
+
+    IMPLICIT NONE
+      TYPE(txios(field)) , INTENT(IN) :: field_hdl
+      REAL (KIND=8) , OPTIONAL, INTENT(OUT) :: add_offset
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: axis_ref
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: cell_methods
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: cell_methods_mode
+      LOGICAL  , OPTIONAL, INTENT(OUT) :: check_if_active
+      LOGICAL (KIND=C_BOOL) :: check_if_active_tmp
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: comment
+      INTEGER  , OPTIONAL, INTENT(OUT) :: compression_level
+      REAL (KIND=8) , OPTIONAL, INTENT(OUT) :: default_value
+      LOGICAL  , OPTIONAL, INTENT(OUT) :: detect_missing_value
+      LOGICAL (KIND=C_BOOL) :: detect_missing_value_tmp
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: domain_ref
+      LOGICAL  , OPTIONAL, INTENT(OUT) :: enabled
+      LOGICAL (KIND=C_BOOL) :: enabled_tmp
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: expr
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: field_ref
+      TYPE(txios(duration))  , OPTIONAL, INTENT(OUT) :: freq_offset
+      TYPE(txios(duration))  , OPTIONAL, INTENT(OUT) :: freq_op
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: grid_path
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: grid_ref
+      LOGICAL  , OPTIONAL, INTENT(OUT) :: indexed_output
+      LOGICAL (KIND=C_BOOL) :: indexed_output_tmp
+      INTEGER  , OPTIONAL, INTENT(OUT) :: level
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: long_name
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: name
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: operation
+      INTEGER  , OPTIONAL, INTENT(OUT) :: prec
+      LOGICAL  , OPTIONAL, INTENT(OUT) :: read_access
+      LOGICAL (KIND=C_BOOL) :: read_access_tmp
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: scalar_ref
+      REAL (KIND=8) , OPTIONAL, INTENT(OUT) :: scale_factor
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: standard_name
+      LOGICAL  , OPTIONAL, INTENT(OUT) :: ts_enabled
+      LOGICAL (KIND=C_BOOL) :: ts_enabled_tmp
+      TYPE(txios(duration))  , OPTIONAL, INTENT(OUT) :: ts_split_freq
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: unit
+      REAL (KIND=8) , OPTIONAL, INTENT(OUT) :: valid_max
+      REAL (KIND=8) , OPTIONAL, INTENT(OUT) :: valid_min
+
+      CALL xios(get_field_attr_hdl_)  &
+      ( field_hdl, add_offset, axis_ref, cell_methods, cell_methods_mode, check_if_active, comment  &
+      , compression_level, default_value, detect_missing_value, domain_ref, enabled, expr, field_ref  &
+      , freq_offset, freq_op, grid_path, grid_ref, indexed_output, level, long_name, name, operation  &
+      , prec, read_access, scalar_ref, scale_factor, standard_name, ts_enabled, ts_split_freq, unit  &
+      , valid_max, valid_min )
+
+  END SUBROUTINE xios(get_field_attr_hdl)
+
+  SUBROUTINE xios(get_field_attr_hdl_)   &
+    ( field_hdl, add_offset_, axis_ref_, cell_methods_, cell_methods_mode_, check_if_active_, comment_  &
+    , compression_level_, default_value_, detect_missing_value_, domain_ref_, enabled_, expr_, field_ref_  &
+    , freq_offset_, freq_op_, grid_path_, grid_ref_, indexed_output_, level_, long_name_, name_  &
+    , operation_, prec_, read_access_, scalar_ref_, scale_factor_, standard_name_, ts_enabled_, ts_split_freq_  &
+    , unit_, valid_max_, valid_min_ )
+
+    IMPLICIT NONE
+      TYPE(txios(field)) , INTENT(IN) :: field_hdl
+      REAL (KIND=8) , OPTIONAL, INTENT(OUT) :: add_offset_
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: axis_ref_
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: cell_methods_
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: cell_methods_mode_
+      LOGICAL  , OPTIONAL, INTENT(OUT) :: check_if_active_
+      LOGICAL (KIND=C_BOOL) :: check_if_active__tmp
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: comment_
+      INTEGER  , OPTIONAL, INTENT(OUT) :: compression_level_
+      REAL (KIND=8) , OPTIONAL, INTENT(OUT) :: default_value_
+      LOGICAL  , OPTIONAL, INTENT(OUT) :: detect_missing_value_
+      LOGICAL (KIND=C_BOOL) :: detect_missing_value__tmp
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: domain_ref_
+      LOGICAL  , OPTIONAL, INTENT(OUT) :: enabled_
+      LOGICAL (KIND=C_BOOL) :: enabled__tmp
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: expr_
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: field_ref_
+      TYPE(txios(duration))  , OPTIONAL, INTENT(OUT) :: freq_offset_
+      TYPE(txios(duration))  , OPTIONAL, INTENT(OUT) :: freq_op_
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: grid_path_
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: grid_ref_
+      LOGICAL  , OPTIONAL, INTENT(OUT) :: indexed_output_
+      LOGICAL (KIND=C_BOOL) :: indexed_output__tmp
+      INTEGER  , OPTIONAL, INTENT(OUT) :: level_
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: long_name_
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: name_
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: operation_
+      INTEGER  , OPTIONAL, INTENT(OUT) :: prec_
+      LOGICAL  , OPTIONAL, INTENT(OUT) :: read_access_
+      LOGICAL (KIND=C_BOOL) :: read_access__tmp
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: scalar_ref_
+      REAL (KIND=8) , OPTIONAL, INTENT(OUT) :: scale_factor_
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: standard_name_
+      LOGICAL  , OPTIONAL, INTENT(OUT) :: ts_enabled_
+      LOGICAL (KIND=C_BOOL) :: ts_enabled__tmp
+      TYPE(txios(duration))  , OPTIONAL, INTENT(OUT) :: ts_split_freq_
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: unit_
+      REAL (KIND=8) , OPTIONAL, INTENT(OUT) :: valid_max_
+      REAL (KIND=8) , OPTIONAL, INTENT(OUT) :: valid_min_
+
+      IF (PRESENT(add_offset_)) THEN
+        CALL cxios_get_field_add_offset &
+      (field_hdl%daddr, add_offset_)
+      ENDIF
+
+      IF (PRESENT(axis_ref_)) THEN
+        CALL cxios_get_field_axis_ref &
+      (field_hdl%daddr, axis_ref_, len(axis_ref_))
+      ENDIF
+
+      IF (PRESENT(cell_methods_)) THEN
+        CALL cxios_get_field_cell_methods &
+      (field_hdl%daddr, cell_methods_, len(cell_methods_))
+      ENDIF
+
+      IF (PRESENT(cell_methods_mode_)) THEN
+        CALL cxios_get_field_cell_methods_mode &
+      (field_hdl%daddr, cell_methods_mode_, len(cell_methods_mode_))
+      ENDIF
+
+      IF (PRESENT(check_if_active_)) THEN
+        CALL cxios_get_field_check_if_active &
+      (field_hdl%daddr, check_if_active__tmp)
+        check_if_active_ = check_if_active__tmp
+      ENDIF
+
+      IF (PRESENT(comment_)) THEN
+        CALL cxios_get_field_comment &
+      (field_hdl%daddr, comment_, len(comment_))
+      ENDIF
+
+      IF (PRESENT(compression_level_)) THEN
+        CALL cxios_get_field_compression_level &
+      (field_hdl%daddr, compression_level_)
+      ENDIF
+
+      IF (PRESENT(default_value_)) THEN
+        CALL cxios_get_field_default_value &
+      (field_hdl%daddr, default_value_)
+      ENDIF
+
+      IF (PRESENT(detect_missing_value_)) THEN
+        CALL cxios_get_field_detect_missing_value &
+      (field_hdl%daddr, detect_missing_value__tmp)
+        detect_missing_value_ = detect_missing_value__tmp
+      ENDIF
+
+      IF (PRESENT(domain_ref_)) THEN
+        CALL cxios_get_field_domain_ref &
+      (field_hdl%daddr, domain_ref_, len(domain_ref_))
+      ENDIF
+
+      IF (PRESENT(enabled_)) THEN
+        CALL cxios_get_field_enabled &
+      (field_hdl%daddr, enabled__tmp)
+        enabled_ = enabled__tmp
+      ENDIF
+
+      IF (PRESENT(expr_)) THEN
+        CALL cxios_get_field_expr &
+      (field_hdl%daddr, expr_, len(expr_))
+      ENDIF
+
+      IF (PRESENT(field_ref_)) THEN
+        CALL cxios_get_field_field_ref &
+      (field_hdl%daddr, field_ref_, len(field_ref_))
+      ENDIF
+
+      IF (PRESENT(freq_offset_)) THEN
+        CALL cxios_get_field_freq_offset &
+      (field_hdl%daddr, freq_offset_)
+      ENDIF
+
+      IF (PRESENT(freq_op_)) THEN
+        CALL cxios_get_field_freq_op &
+      (field_hdl%daddr, freq_op_)
+      ENDIF
+
+      IF (PRESENT(grid_path_)) THEN
+        CALL cxios_get_field_grid_path &
+      (field_hdl%daddr, grid_path_, len(grid_path_))
+      ENDIF
+
+      IF (PRESENT(grid_ref_)) THEN
+        CALL cxios_get_field_grid_ref &
+      (field_hdl%daddr, grid_ref_, len(grid_ref_))
+      ENDIF
+
+      IF (PRESENT(indexed_output_)) THEN
+        CALL cxios_get_field_indexed_output &
+      (field_hdl%daddr, indexed_output__tmp)
+        indexed_output_ = indexed_output__tmp
+      ENDIF
+
+      IF (PRESENT(level_)) THEN
+        CALL cxios_get_field_level &
+      (field_hdl%daddr, level_)
+      ENDIF
+
+      IF (PRESENT(long_name_)) THEN
+        CALL cxios_get_field_long_name &
+      (field_hdl%daddr, long_name_, len(long_name_))
+      ENDIF
+
+      IF (PRESENT(name_)) THEN
+        CALL cxios_get_field_name &
+      (field_hdl%daddr, name_, len(name_))
+      ENDIF
+
+      IF (PRESENT(operation_)) THEN
+        CALL cxios_get_field_operation &
+      (field_hdl%daddr, operation_, len(operation_))
+      ENDIF
+
+      IF (PRESENT(prec_)) THEN
+        CALL cxios_get_field_prec &
+      (field_hdl%daddr, prec_)
+      ENDIF
+
+      IF (PRESENT(read_access_)) THEN
+        CALL cxios_get_field_read_access &
+      (field_hdl%daddr, read_access__tmp)
+        read_access_ = read_access__tmp
+      ENDIF
+
+      IF (PRESENT(scalar_ref_)) THEN
+        CALL cxios_get_field_scalar_ref &
+      (field_hdl%daddr, scalar_ref_, len(scalar_ref_))
+      ENDIF
+
+      IF (PRESENT(scale_factor_)) THEN
+        CALL cxios_get_field_scale_factor &
+      (field_hdl%daddr, scale_factor_)
+      ENDIF
+
+      IF (PRESENT(standard_name_)) THEN
+        CALL cxios_get_field_standard_name &
+      (field_hdl%daddr, standard_name_, len(standard_name_))
+      ENDIF
+
+      IF (PRESENT(ts_enabled_)) THEN
+        CALL cxios_get_field_ts_enabled &
+      (field_hdl%daddr, ts_enabled__tmp)
+        ts_enabled_ = ts_enabled__tmp
+      ENDIF
+
+      IF (PRESENT(ts_split_freq_)) THEN
+        CALL cxios_get_field_ts_split_freq &
+      (field_hdl%daddr, ts_split_freq_)
+      ENDIF
+
+      IF (PRESENT(unit_)) THEN
+        CALL cxios_get_field_unit &
+      (field_hdl%daddr, unit_, len(unit_))
+      ENDIF
+
+      IF (PRESENT(valid_max_)) THEN
+        CALL cxios_get_field_valid_max &
+      (field_hdl%daddr, valid_max_)
+      ENDIF
+
+      IF (PRESENT(valid_min_)) THEN
+        CALL cxios_get_field_valid_min &
+      (field_hdl%daddr, valid_min_)
+      ENDIF
+
+  END SUBROUTINE xios(get_field_attr_hdl_)
+
+  SUBROUTINE xios(is_defined_field_attr)  &
+    ( field_id, add_offset, axis_ref, cell_methods, cell_methods_mode, check_if_active, comment  &
+    , compression_level, default_value, detect_missing_value, domain_ref, enabled, expr, field_ref  &
+    , freq_offset, freq_op, grid_path, grid_ref, indexed_output, level, long_name, name, operation  &
+    , prec, read_access, scalar_ref, scale_factor, standard_name, ts_enabled, ts_split_freq, unit  &
+    , valid_max, valid_min )
+
+    IMPLICIT NONE
+      TYPE(txios(field))  :: field_hdl
+      CHARACTER(LEN=*), INTENT(IN) ::field_id
+      LOGICAL, OPTIONAL, INTENT(OUT) :: add_offset
+      LOGICAL(KIND=C_BOOL) :: add_offset_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: axis_ref
+      LOGICAL(KIND=C_BOOL) :: axis_ref_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: cell_methods
+      LOGICAL(KIND=C_BOOL) :: cell_methods_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: cell_methods_mode
+      LOGICAL(KIND=C_BOOL) :: cell_methods_mode_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: check_if_active
+      LOGICAL(KIND=C_BOOL) :: check_if_active_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: comment
+      LOGICAL(KIND=C_BOOL) :: comment_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: compression_level
+      LOGICAL(KIND=C_BOOL) :: compression_level_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: default_value
+      LOGICAL(KIND=C_BOOL) :: default_value_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: detect_missing_value
+      LOGICAL(KIND=C_BOOL) :: detect_missing_value_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: domain_ref
+      LOGICAL(KIND=C_BOOL) :: domain_ref_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: enabled
+      LOGICAL(KIND=C_BOOL) :: enabled_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: expr
+      LOGICAL(KIND=C_BOOL) :: expr_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: field_ref
+      LOGICAL(KIND=C_BOOL) :: field_ref_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: freq_offset
+      LOGICAL(KIND=C_BOOL) :: freq_offset_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: freq_op
+      LOGICAL(KIND=C_BOOL) :: freq_op_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: grid_path
+      LOGICAL(KIND=C_BOOL) :: grid_path_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: grid_ref
+      LOGICAL(KIND=C_BOOL) :: grid_ref_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: indexed_output
+      LOGICAL(KIND=C_BOOL) :: indexed_output_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: level
+      LOGICAL(KIND=C_BOOL) :: level_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: long_name
+      LOGICAL(KIND=C_BOOL) :: long_name_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: name
+      LOGICAL(KIND=C_BOOL) :: name_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: operation
+      LOGICAL(KIND=C_BOOL) :: operation_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: prec
+      LOGICAL(KIND=C_BOOL) :: prec_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: read_access
+      LOGICAL(KIND=C_BOOL) :: read_access_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: scalar_ref
+      LOGICAL(KIND=C_BOOL) :: scalar_ref_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: scale_factor
+      LOGICAL(KIND=C_BOOL) :: scale_factor_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: standard_name
+      LOGICAL(KIND=C_BOOL) :: standard_name_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: ts_enabled
+      LOGICAL(KIND=C_BOOL) :: ts_enabled_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: ts_split_freq
+      LOGICAL(KIND=C_BOOL) :: ts_split_freq_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: unit
+      LOGICAL(KIND=C_BOOL) :: unit_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: valid_max
+      LOGICAL(KIND=C_BOOL) :: valid_max_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: valid_min
+      LOGICAL(KIND=C_BOOL) :: valid_min_tmp
+
+      CALL xios(get_field_handle) &
+      (field_id,field_hdl)
+      CALL xios(is_defined_field_attr_hdl_)   &
+      ( field_hdl, add_offset, axis_ref, cell_methods, cell_methods_mode, check_if_active, comment  &
+      , compression_level, default_value, detect_missing_value, domain_ref, enabled, expr, field_ref  &
+      , freq_offset, freq_op, grid_path, grid_ref, indexed_output, level, long_name, name, operation  &
+      , prec, read_access, scalar_ref, scale_factor, standard_name, ts_enabled, ts_split_freq, unit  &
+      , valid_max, valid_min )
+
+  END SUBROUTINE xios(is_defined_field_attr)
+
+  SUBROUTINE xios(is_defined_field_attr_hdl)  &
+    ( field_hdl, add_offset, axis_ref, cell_methods, cell_methods_mode, check_if_active, comment  &
+    , compression_level, default_value, detect_missing_value, domain_ref, enabled, expr, field_ref  &
+    , freq_offset, freq_op, grid_path, grid_ref, indexed_output, level, long_name, name, operation  &
+    , prec, read_access, scalar_ref, scale_factor, standard_name, ts_enabled, ts_split_freq, unit  &
+    , valid_max, valid_min )
+
+    IMPLICIT NONE
+      TYPE(txios(field)) , INTENT(IN) :: field_hdl
+      LOGICAL, OPTIONAL, INTENT(OUT) :: add_offset
+      LOGICAL(KIND=C_BOOL) :: add_offset_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: axis_ref
+      LOGICAL(KIND=C_BOOL) :: axis_ref_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: cell_methods
+      LOGICAL(KIND=C_BOOL) :: cell_methods_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: cell_methods_mode
+      LOGICAL(KIND=C_BOOL) :: cell_methods_mode_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: check_if_active
+      LOGICAL(KIND=C_BOOL) :: check_if_active_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: comment
+      LOGICAL(KIND=C_BOOL) :: comment_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: compression_level
+      LOGICAL(KIND=C_BOOL) :: compression_level_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: default_value
+      LOGICAL(KIND=C_BOOL) :: default_value_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: detect_missing_value
+      LOGICAL(KIND=C_BOOL) :: detect_missing_value_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: domain_ref
+      LOGICAL(KIND=C_BOOL) :: domain_ref_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: enabled
+      LOGICAL(KIND=C_BOOL) :: enabled_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: expr
+      LOGICAL(KIND=C_BOOL) :: expr_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: field_ref
+      LOGICAL(KIND=C_BOOL) :: field_ref_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: freq_offset
+      LOGICAL(KIND=C_BOOL) :: freq_offset_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: freq_op
+      LOGICAL(KIND=C_BOOL) :: freq_op_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: grid_path
+      LOGICAL(KIND=C_BOOL) :: grid_path_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: grid_ref
+      LOGICAL(KIND=C_BOOL) :: grid_ref_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: indexed_output
+      LOGICAL(KIND=C_BOOL) :: indexed_output_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: level
+      LOGICAL(KIND=C_BOOL) :: level_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: long_name
+      LOGICAL(KIND=C_BOOL) :: long_name_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: name
+      LOGICAL(KIND=C_BOOL) :: name_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: operation
+      LOGICAL(KIND=C_BOOL) :: operation_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: prec
+      LOGICAL(KIND=C_BOOL) :: prec_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: read_access
+      LOGICAL(KIND=C_BOOL) :: read_access_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: scalar_ref
+      LOGICAL(KIND=C_BOOL) :: scalar_ref_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: scale_factor
+      LOGICAL(KIND=C_BOOL) :: scale_factor_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: standard_name
+      LOGICAL(KIND=C_BOOL) :: standard_name_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: ts_enabled
+      LOGICAL(KIND=C_BOOL) :: ts_enabled_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: ts_split_freq
+      LOGICAL(KIND=C_BOOL) :: ts_split_freq_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: unit
+      LOGICAL(KIND=C_BOOL) :: unit_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: valid_max
+      LOGICAL(KIND=C_BOOL) :: valid_max_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: valid_min
+      LOGICAL(KIND=C_BOOL) :: valid_min_tmp
+
+      CALL xios(is_defined_field_attr_hdl_)  &
+      ( field_hdl, add_offset, axis_ref, cell_methods, cell_methods_mode, check_if_active, comment  &
+      , compression_level, default_value, detect_missing_value, domain_ref, enabled, expr, field_ref  &
+      , freq_offset, freq_op, grid_path, grid_ref, indexed_output, level, long_name, name, operation  &
+      , prec, read_access, scalar_ref, scale_factor, standard_name, ts_enabled, ts_split_freq, unit  &
+      , valid_max, valid_min )
+
+  END SUBROUTINE xios(is_defined_field_attr_hdl)
+
+  SUBROUTINE xios(is_defined_field_attr_hdl_)   &
+    ( field_hdl, add_offset_, axis_ref_, cell_methods_, cell_methods_mode_, check_if_active_, comment_  &
+    , compression_level_, default_value_, detect_missing_value_, domain_ref_, enabled_, expr_, field_ref_  &
+    , freq_offset_, freq_op_, grid_path_, grid_ref_, indexed_output_, level_, long_name_, name_  &
+    , operation_, prec_, read_access_, scalar_ref_, scale_factor_, standard_name_, ts_enabled_, ts_split_freq_  &
+    , unit_, valid_max_, valid_min_ )
+
+    IMPLICIT NONE
+      TYPE(txios(field)) , INTENT(IN) :: field_hdl
+      LOGICAL, OPTIONAL, INTENT(OUT) :: add_offset_
+      LOGICAL(KIND=C_BOOL) :: add_offset__tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: axis_ref_
+      LOGICAL(KIND=C_BOOL) :: axis_ref__tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: cell_methods_
+      LOGICAL(KIND=C_BOOL) :: cell_methods__tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: cell_methods_mode_
+      LOGICAL(KIND=C_BOOL) :: cell_methods_mode__tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: check_if_active_
+      LOGICAL(KIND=C_BOOL) :: check_if_active__tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: comment_
+      LOGICAL(KIND=C_BOOL) :: comment__tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: compression_level_
+      LOGICAL(KIND=C_BOOL) :: compression_level__tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: default_value_
+      LOGICAL(KIND=C_BOOL) :: default_value__tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: detect_missing_value_
+      LOGICAL(KIND=C_BOOL) :: detect_missing_value__tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: domain_ref_
+      LOGICAL(KIND=C_BOOL) :: domain_ref__tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: enabled_
+      LOGICAL(KIND=C_BOOL) :: enabled__tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: expr_
+      LOGICAL(KIND=C_BOOL) :: expr__tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: field_ref_
+      LOGICAL(KIND=C_BOOL) :: field_ref__tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: freq_offset_
+      LOGICAL(KIND=C_BOOL) :: freq_offset__tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: freq_op_
+      LOGICAL(KIND=C_BOOL) :: freq_op__tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: grid_path_
+      LOGICAL(KIND=C_BOOL) :: grid_path__tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: grid_ref_
+      LOGICAL(KIND=C_BOOL) :: grid_ref__tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: indexed_output_
+      LOGICAL(KIND=C_BOOL) :: indexed_output__tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: level_
+      LOGICAL(KIND=C_BOOL) :: level__tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: long_name_
+      LOGICAL(KIND=C_BOOL) :: long_name__tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: name_
+      LOGICAL(KIND=C_BOOL) :: name__tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: operation_
+      LOGICAL(KIND=C_BOOL) :: operation__tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: prec_
+      LOGICAL(KIND=C_BOOL) :: prec__tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: read_access_
+      LOGICAL(KIND=C_BOOL) :: read_access__tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: scalar_ref_
+      LOGICAL(KIND=C_BOOL) :: scalar_ref__tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: scale_factor_
+      LOGICAL(KIND=C_BOOL) :: scale_factor__tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: standard_name_
+      LOGICAL(KIND=C_BOOL) :: standard_name__tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: ts_enabled_
+      LOGICAL(KIND=C_BOOL) :: ts_enabled__tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: ts_split_freq_
+      LOGICAL(KIND=C_BOOL) :: ts_split_freq__tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: unit_
+      LOGICAL(KIND=C_BOOL) :: unit__tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: valid_max_
+      LOGICAL(KIND=C_BOOL) :: valid_max__tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: valid_min_
+      LOGICAL(KIND=C_BOOL) :: valid_min__tmp
+
+      IF (PRESENT(add_offset_)) THEN
+        add_offset__tmp = cxios_is_defined_field_add_offset &
+      (field_hdl%daddr)
+        add_offset_ = add_offset__tmp
+      ENDIF
+
+      IF (PRESENT(axis_ref_)) THEN
+        axis_ref__tmp = cxios_is_defined_field_axis_ref &
+      (field_hdl%daddr)
+        axis_ref_ = axis_ref__tmp
+      ENDIF
+
+      IF (PRESENT(cell_methods_)) THEN
+        cell_methods__tmp = cxios_is_defined_field_cell_methods &
+      (field_hdl%daddr)
+        cell_methods_ = cell_methods__tmp
+      ENDIF
+
+      IF (PRESENT(cell_methods_mode_)) THEN
+        cell_methods_mode__tmp = cxios_is_defined_field_cell_methods_mode &
+      (field_hdl%daddr)
+        cell_methods_mode_ = cell_methods_mode__tmp
+      ENDIF
+
+      IF (PRESENT(check_if_active_)) THEN
+        check_if_active__tmp = cxios_is_defined_field_check_if_active &
+      (field_hdl%daddr)
+        check_if_active_ = check_if_active__tmp
+      ENDIF
+
+      IF (PRESENT(comment_)) THEN
+        comment__tmp = cxios_is_defined_field_comment &
+      (field_hdl%daddr)
+        comment_ = comment__tmp
+      ENDIF
+
+      IF (PRESENT(compression_level_)) THEN
+        compression_level__tmp = cxios_is_defined_field_compression_level &
+      (field_hdl%daddr)
+        compression_level_ = compression_level__tmp
+      ENDIF
+
+      IF (PRESENT(default_value_)) THEN
+        default_value__tmp = cxios_is_defined_field_default_value &
+      (field_hdl%daddr)
+        default_value_ = default_value__tmp
+      ENDIF
+
+      IF (PRESENT(detect_missing_value_)) THEN
+        detect_missing_value__tmp = cxios_is_defined_field_detect_missing_value &
+      (field_hdl%daddr)
+        detect_missing_value_ = detect_missing_value__tmp
+      ENDIF
+
+      IF (PRESENT(domain_ref_)) THEN
+        domain_ref__tmp = cxios_is_defined_field_domain_ref &
+      (field_hdl%daddr)
+        domain_ref_ = domain_ref__tmp
+      ENDIF
+
+      IF (PRESENT(enabled_)) THEN
+        enabled__tmp = cxios_is_defined_field_enabled &
+      (field_hdl%daddr)
+        enabled_ = enabled__tmp
+      ENDIF
+
+      IF (PRESENT(expr_)) THEN
+        expr__tmp = cxios_is_defined_field_expr &
+      (field_hdl%daddr)
+        expr_ = expr__tmp
+      ENDIF
+
+      IF (PRESENT(field_ref_)) THEN
+        field_ref__tmp = cxios_is_defined_field_field_ref &
+      (field_hdl%daddr)
+        field_ref_ = field_ref__tmp
+      ENDIF
+
+      IF (PRESENT(freq_offset_)) THEN
+        freq_offset__tmp = cxios_is_defined_field_freq_offset &
+      (field_hdl%daddr)
+        freq_offset_ = freq_offset__tmp
+      ENDIF
+
+      IF (PRESENT(freq_op_)) THEN
+        freq_op__tmp = cxios_is_defined_field_freq_op &
+      (field_hdl%daddr)
+        freq_op_ = freq_op__tmp
+      ENDIF
+
+      IF (PRESENT(grid_path_)) THEN
+        grid_path__tmp = cxios_is_defined_field_grid_path &
+      (field_hdl%daddr)
+        grid_path_ = grid_path__tmp
+      ENDIF
+
+      IF (PRESENT(grid_ref_)) THEN
+        grid_ref__tmp = cxios_is_defined_field_grid_ref &
+      (field_hdl%daddr)
+        grid_ref_ = grid_ref__tmp
+      ENDIF
+
+      IF (PRESENT(indexed_output_)) THEN
+        indexed_output__tmp = cxios_is_defined_field_indexed_output &
+      (field_hdl%daddr)
+        indexed_output_ = indexed_output__tmp
+      ENDIF
+
+      IF (PRESENT(level_)) THEN
+        level__tmp = cxios_is_defined_field_level &
+      (field_hdl%daddr)
+        level_ = level__tmp
+      ENDIF
+
+      IF (PRESENT(long_name_)) THEN
+        long_name__tmp = cxios_is_defined_field_long_name &
+      (field_hdl%daddr)
+        long_name_ = long_name__tmp
+      ENDIF
+
+      IF (PRESENT(name_)) THEN
+        name__tmp = cxios_is_defined_field_name &
+      (field_hdl%daddr)
+        name_ = name__tmp
+      ENDIF
+
+      IF (PRESENT(operation_)) THEN
+        operation__tmp = cxios_is_defined_field_operation &
+      (field_hdl%daddr)
+        operation_ = operation__tmp
+      ENDIF
+
+      IF (PRESENT(prec_)) THEN
+        prec__tmp = cxios_is_defined_field_prec &
+      (field_hdl%daddr)
+        prec_ = prec__tmp
+      ENDIF
+
+      IF (PRESENT(read_access_)) THEN
+        read_access__tmp = cxios_is_defined_field_read_access &
+      (field_hdl%daddr)
+        read_access_ = read_access__tmp
+      ENDIF
+
+      IF (PRESENT(scalar_ref_)) THEN
+        scalar_ref__tmp = cxios_is_defined_field_scalar_ref &
+      (field_hdl%daddr)
+        scalar_ref_ = scalar_ref__tmp
+      ENDIF
+
+      IF (PRESENT(scale_factor_)) THEN
+        scale_factor__tmp = cxios_is_defined_field_scale_factor &
+      (field_hdl%daddr)
+        scale_factor_ = scale_factor__tmp
+      ENDIF
+
+      IF (PRESENT(standard_name_)) THEN
+        standard_name__tmp = cxios_is_defined_field_standard_name &
+      (field_hdl%daddr)
+        standard_name_ = standard_name__tmp
+      ENDIF
+
+      IF (PRESENT(ts_enabled_)) THEN
+        ts_enabled__tmp = cxios_is_defined_field_ts_enabled &
+      (field_hdl%daddr)
+        ts_enabled_ = ts_enabled__tmp
+      ENDIF
+
+      IF (PRESENT(ts_split_freq_)) THEN
+        ts_split_freq__tmp = cxios_is_defined_field_ts_split_freq &
+      (field_hdl%daddr)
+        ts_split_freq_ = ts_split_freq__tmp
+      ENDIF
+
+      IF (PRESENT(unit_)) THEN
+        unit__tmp = cxios_is_defined_field_unit &
+      (field_hdl%daddr)
+        unit_ = unit__tmp
+      ENDIF
+
+      IF (PRESENT(valid_max_)) THEN
+        valid_max__tmp = cxios_is_defined_field_valid_max &
+      (field_hdl%daddr)
+        valid_max_ = valid_max__tmp
+      ENDIF
+
+      IF (PRESENT(valid_min_)) THEN
+        valid_min__tmp = cxios_is_defined_field_valid_min &
+      (field_hdl%daddr)
+        valid_min_ = valid_min__tmp
+      ENDIF
+
+  END SUBROUTINE xios(is_defined_field_attr_hdl_)
+
+END MODULE ifield_attr
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/fortran_attr/ifieldgroup_attr.F90
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/fortran_attr/ifieldgroup_attr.F90	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/fortran_attr/ifieldgroup_attr.F90	(revision 1749)
@@ -0,0 +1,1144 @@
+! * ************************************************************************** *
+! *               Interface auto generated - do not modify                     *
+! * ************************************************************************** *
+#include "xios_fortran_prefix.hpp"
+
+MODULE ifieldgroup_attr
+  USE, INTRINSIC :: ISO_C_BINDING
+  USE ifield
+  USE fieldgroup_interface_attr
+
+CONTAINS
+
+  SUBROUTINE xios(set_fieldgroup_attr)  &
+    ( fieldgroup_id, add_offset, axis_ref, cell_methods, cell_methods_mode, check_if_active, comment  &
+    , compression_level, default_value, detect_missing_value, domain_ref, enabled, expr, field_ref  &
+    , freq_offset, freq_op, grid_path, grid_ref, group_ref, indexed_output, level, long_name, name  &
+    , operation, prec, read_access, scalar_ref, scale_factor, standard_name, ts_enabled, ts_split_freq  &
+    , unit, valid_max, valid_min )
+
+    IMPLICIT NONE
+      TYPE(txios(fieldgroup))  :: fieldgroup_hdl
+      CHARACTER(LEN=*), INTENT(IN) ::fieldgroup_id
+      REAL (KIND=8) , OPTIONAL, INTENT(IN) :: add_offset
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: axis_ref
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: cell_methods
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: cell_methods_mode
+      LOGICAL  , OPTIONAL, INTENT(IN) :: check_if_active
+      LOGICAL (KIND=C_BOOL) :: check_if_active_tmp
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: comment
+      INTEGER  , OPTIONAL, INTENT(IN) :: compression_level
+      REAL (KIND=8) , OPTIONAL, INTENT(IN) :: default_value
+      LOGICAL  , OPTIONAL, INTENT(IN) :: detect_missing_value
+      LOGICAL (KIND=C_BOOL) :: detect_missing_value_tmp
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: domain_ref
+      LOGICAL  , OPTIONAL, INTENT(IN) :: enabled
+      LOGICAL (KIND=C_BOOL) :: enabled_tmp
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: expr
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: field_ref
+      TYPE(txios(duration))  , OPTIONAL, INTENT(IN) :: freq_offset
+      TYPE(txios(duration))  , OPTIONAL, INTENT(IN) :: freq_op
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: grid_path
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: grid_ref
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: group_ref
+      LOGICAL  , OPTIONAL, INTENT(IN) :: indexed_output
+      LOGICAL (KIND=C_BOOL) :: indexed_output_tmp
+      INTEGER  , OPTIONAL, INTENT(IN) :: level
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: long_name
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: name
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: operation
+      INTEGER  , OPTIONAL, INTENT(IN) :: prec
+      LOGICAL  , OPTIONAL, INTENT(IN) :: read_access
+      LOGICAL (KIND=C_BOOL) :: read_access_tmp
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: scalar_ref
+      REAL (KIND=8) , OPTIONAL, INTENT(IN) :: scale_factor
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: standard_name
+      LOGICAL  , OPTIONAL, INTENT(IN) :: ts_enabled
+      LOGICAL (KIND=C_BOOL) :: ts_enabled_tmp
+      TYPE(txios(duration))  , OPTIONAL, INTENT(IN) :: ts_split_freq
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: unit
+      REAL (KIND=8) , OPTIONAL, INTENT(IN) :: valid_max
+      REAL (KIND=8) , OPTIONAL, INTENT(IN) :: valid_min
+
+      CALL xios(get_fieldgroup_handle) &
+      (fieldgroup_id,fieldgroup_hdl)
+      CALL xios(set_fieldgroup_attr_hdl_)   &
+      ( fieldgroup_hdl, add_offset, axis_ref, cell_methods, cell_methods_mode, check_if_active, comment  &
+      , compression_level, default_value, detect_missing_value, domain_ref, enabled, expr, field_ref  &
+      , freq_offset, freq_op, grid_path, grid_ref, group_ref, indexed_output, level, long_name, name  &
+      , operation, prec, read_access, scalar_ref, scale_factor, standard_name, ts_enabled, ts_split_freq  &
+      , unit, valid_max, valid_min )
+
+  END SUBROUTINE xios(set_fieldgroup_attr)
+
+  SUBROUTINE xios(set_fieldgroup_attr_hdl)  &
+    ( fieldgroup_hdl, add_offset, axis_ref, cell_methods, cell_methods_mode, check_if_active, comment  &
+    , compression_level, default_value, detect_missing_value, domain_ref, enabled, expr, field_ref  &
+    , freq_offset, freq_op, grid_path, grid_ref, group_ref, indexed_output, level, long_name, name  &
+    , operation, prec, read_access, scalar_ref, scale_factor, standard_name, ts_enabled, ts_split_freq  &
+    , unit, valid_max, valid_min )
+
+    IMPLICIT NONE
+      TYPE(txios(fieldgroup)) , INTENT(IN) :: fieldgroup_hdl
+      REAL (KIND=8) , OPTIONAL, INTENT(IN) :: add_offset
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: axis_ref
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: cell_methods
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: cell_methods_mode
+      LOGICAL  , OPTIONAL, INTENT(IN) :: check_if_active
+      LOGICAL (KIND=C_BOOL) :: check_if_active_tmp
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: comment
+      INTEGER  , OPTIONAL, INTENT(IN) :: compression_level
+      REAL (KIND=8) , OPTIONAL, INTENT(IN) :: default_value
+      LOGICAL  , OPTIONAL, INTENT(IN) :: detect_missing_value
+      LOGICAL (KIND=C_BOOL) :: detect_missing_value_tmp
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: domain_ref
+      LOGICAL  , OPTIONAL, INTENT(IN) :: enabled
+      LOGICAL (KIND=C_BOOL) :: enabled_tmp
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: expr
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: field_ref
+      TYPE(txios(duration))  , OPTIONAL, INTENT(IN) :: freq_offset
+      TYPE(txios(duration))  , OPTIONAL, INTENT(IN) :: freq_op
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: grid_path
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: grid_ref
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: group_ref
+      LOGICAL  , OPTIONAL, INTENT(IN) :: indexed_output
+      LOGICAL (KIND=C_BOOL) :: indexed_output_tmp
+      INTEGER  , OPTIONAL, INTENT(IN) :: level
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: long_name
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: name
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: operation
+      INTEGER  , OPTIONAL, INTENT(IN) :: prec
+      LOGICAL  , OPTIONAL, INTENT(IN) :: read_access
+      LOGICAL (KIND=C_BOOL) :: read_access_tmp
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: scalar_ref
+      REAL (KIND=8) , OPTIONAL, INTENT(IN) :: scale_factor
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: standard_name
+      LOGICAL  , OPTIONAL, INTENT(IN) :: ts_enabled
+      LOGICAL (KIND=C_BOOL) :: ts_enabled_tmp
+      TYPE(txios(duration))  , OPTIONAL, INTENT(IN) :: ts_split_freq
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: unit
+      REAL (KIND=8) , OPTIONAL, INTENT(IN) :: valid_max
+      REAL (KIND=8) , OPTIONAL, INTENT(IN) :: valid_min
+
+      CALL xios(set_fieldgroup_attr_hdl_)  &
+      ( fieldgroup_hdl, add_offset, axis_ref, cell_methods, cell_methods_mode, check_if_active, comment  &
+      , compression_level, default_value, detect_missing_value, domain_ref, enabled, expr, field_ref  &
+      , freq_offset, freq_op, grid_path, grid_ref, group_ref, indexed_output, level, long_name, name  &
+      , operation, prec, read_access, scalar_ref, scale_factor, standard_name, ts_enabled, ts_split_freq  &
+      , unit, valid_max, valid_min )
+
+  END SUBROUTINE xios(set_fieldgroup_attr_hdl)
+
+  SUBROUTINE xios(set_fieldgroup_attr_hdl_)   &
+    ( fieldgroup_hdl, add_offset_, axis_ref_, cell_methods_, cell_methods_mode_, check_if_active_  &
+    , comment_, compression_level_, default_value_, detect_missing_value_, domain_ref_, enabled_  &
+    , expr_, field_ref_, freq_offset_, freq_op_, grid_path_, grid_ref_, group_ref_, indexed_output_  &
+    , level_, long_name_, name_, operation_, prec_, read_access_, scalar_ref_, scale_factor_, standard_name_  &
+    , ts_enabled_, ts_split_freq_, unit_, valid_max_, valid_min_ )
+
+    IMPLICIT NONE
+      TYPE(txios(fieldgroup)) , INTENT(IN) :: fieldgroup_hdl
+      REAL (KIND=8) , OPTIONAL, INTENT(IN) :: add_offset_
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: axis_ref_
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: cell_methods_
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: cell_methods_mode_
+      LOGICAL  , OPTIONAL, INTENT(IN) :: check_if_active_
+      LOGICAL (KIND=C_BOOL) :: check_if_active__tmp
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: comment_
+      INTEGER  , OPTIONAL, INTENT(IN) :: compression_level_
+      REAL (KIND=8) , OPTIONAL, INTENT(IN) :: default_value_
+      LOGICAL  , OPTIONAL, INTENT(IN) :: detect_missing_value_
+      LOGICAL (KIND=C_BOOL) :: detect_missing_value__tmp
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: domain_ref_
+      LOGICAL  , OPTIONAL, INTENT(IN) :: enabled_
+      LOGICAL (KIND=C_BOOL) :: enabled__tmp
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: expr_
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: field_ref_
+      TYPE(txios(duration))  , OPTIONAL, INTENT(IN) :: freq_offset_
+      TYPE(txios(duration))  , OPTIONAL, INTENT(IN) :: freq_op_
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: grid_path_
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: grid_ref_
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: group_ref_
+      LOGICAL  , OPTIONAL, INTENT(IN) :: indexed_output_
+      LOGICAL (KIND=C_BOOL) :: indexed_output__tmp
+      INTEGER  , OPTIONAL, INTENT(IN) :: level_
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: long_name_
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: name_
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: operation_
+      INTEGER  , OPTIONAL, INTENT(IN) :: prec_
+      LOGICAL  , OPTIONAL, INTENT(IN) :: read_access_
+      LOGICAL (KIND=C_BOOL) :: read_access__tmp
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: scalar_ref_
+      REAL (KIND=8) , OPTIONAL, INTENT(IN) :: scale_factor_
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: standard_name_
+      LOGICAL  , OPTIONAL, INTENT(IN) :: ts_enabled_
+      LOGICAL (KIND=C_BOOL) :: ts_enabled__tmp
+      TYPE(txios(duration))  , OPTIONAL, INTENT(IN) :: ts_split_freq_
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: unit_
+      REAL (KIND=8) , OPTIONAL, INTENT(IN) :: valid_max_
+      REAL (KIND=8) , OPTIONAL, INTENT(IN) :: valid_min_
+
+      IF (PRESENT(add_offset_)) THEN
+        CALL cxios_set_fieldgroup_add_offset &
+      (fieldgroup_hdl%daddr, add_offset_)
+      ENDIF
+
+      IF (PRESENT(axis_ref_)) THEN
+        CALL cxios_set_fieldgroup_axis_ref &
+      (fieldgroup_hdl%daddr, axis_ref_, len(axis_ref_))
+      ENDIF
+
+      IF (PRESENT(cell_methods_)) THEN
+        CALL cxios_set_fieldgroup_cell_methods &
+      (fieldgroup_hdl%daddr, cell_methods_, len(cell_methods_))
+      ENDIF
+
+      IF (PRESENT(cell_methods_mode_)) THEN
+        CALL cxios_set_fieldgroup_cell_methods_mode &
+      (fieldgroup_hdl%daddr, cell_methods_mode_, len(cell_methods_mode_))
+      ENDIF
+
+      IF (PRESENT(check_if_active_)) THEN
+        check_if_active__tmp = check_if_active_
+        CALL cxios_set_fieldgroup_check_if_active &
+      (fieldgroup_hdl%daddr, check_if_active__tmp)
+      ENDIF
+
+      IF (PRESENT(comment_)) THEN
+        CALL cxios_set_fieldgroup_comment &
+      (fieldgroup_hdl%daddr, comment_, len(comment_))
+      ENDIF
+
+      IF (PRESENT(compression_level_)) THEN
+        CALL cxios_set_fieldgroup_compression_level &
+      (fieldgroup_hdl%daddr, compression_level_)
+      ENDIF
+
+      IF (PRESENT(default_value_)) THEN
+        CALL cxios_set_fieldgroup_default_value &
+      (fieldgroup_hdl%daddr, default_value_)
+      ENDIF
+
+      IF (PRESENT(detect_missing_value_)) THEN
+        detect_missing_value__tmp = detect_missing_value_
+        CALL cxios_set_fieldgroup_detect_missing_value &
+      (fieldgroup_hdl%daddr, detect_missing_value__tmp)
+      ENDIF
+
+      IF (PRESENT(domain_ref_)) THEN
+        CALL cxios_set_fieldgroup_domain_ref &
+      (fieldgroup_hdl%daddr, domain_ref_, len(domain_ref_))
+      ENDIF
+
+      IF (PRESENT(enabled_)) THEN
+        enabled__tmp = enabled_
+        CALL cxios_set_fieldgroup_enabled &
+      (fieldgroup_hdl%daddr, enabled__tmp)
+      ENDIF
+
+      IF (PRESENT(expr_)) THEN
+        CALL cxios_set_fieldgroup_expr &
+      (fieldgroup_hdl%daddr, expr_, len(expr_))
+      ENDIF
+
+      IF (PRESENT(field_ref_)) THEN
+        CALL cxios_set_fieldgroup_field_ref &
+      (fieldgroup_hdl%daddr, field_ref_, len(field_ref_))
+      ENDIF
+
+      IF (PRESENT(freq_offset_)) THEN
+        CALL cxios_set_fieldgroup_freq_offset &
+      (fieldgroup_hdl%daddr, freq_offset_)
+      ENDIF
+
+      IF (PRESENT(freq_op_)) THEN
+        CALL cxios_set_fieldgroup_freq_op &
+      (fieldgroup_hdl%daddr, freq_op_)
+      ENDIF
+
+      IF (PRESENT(grid_path_)) THEN
+        CALL cxios_set_fieldgroup_grid_path &
+      (fieldgroup_hdl%daddr, grid_path_, len(grid_path_))
+      ENDIF
+
+      IF (PRESENT(grid_ref_)) THEN
+        CALL cxios_set_fieldgroup_grid_ref &
+      (fieldgroup_hdl%daddr, grid_ref_, len(grid_ref_))
+      ENDIF
+
+      IF (PRESENT(group_ref_)) THEN
+        CALL cxios_set_fieldgroup_group_ref &
+      (fieldgroup_hdl%daddr, group_ref_, len(group_ref_))
+      ENDIF
+
+      IF (PRESENT(indexed_output_)) THEN
+        indexed_output__tmp = indexed_output_
+        CALL cxios_set_fieldgroup_indexed_output &
+      (fieldgroup_hdl%daddr, indexed_output__tmp)
+      ENDIF
+
+      IF (PRESENT(level_)) THEN
+        CALL cxios_set_fieldgroup_level &
+      (fieldgroup_hdl%daddr, level_)
+      ENDIF
+
+      IF (PRESENT(long_name_)) THEN
+        CALL cxios_set_fieldgroup_long_name &
+      (fieldgroup_hdl%daddr, long_name_, len(long_name_))
+      ENDIF
+
+      IF (PRESENT(name_)) THEN
+        CALL cxios_set_fieldgroup_name &
+      (fieldgroup_hdl%daddr, name_, len(name_))
+      ENDIF
+
+      IF (PRESENT(operation_)) THEN
+        CALL cxios_set_fieldgroup_operation &
+      (fieldgroup_hdl%daddr, operation_, len(operation_))
+      ENDIF
+
+      IF (PRESENT(prec_)) THEN
+        CALL cxios_set_fieldgroup_prec &
+      (fieldgroup_hdl%daddr, prec_)
+      ENDIF
+
+      IF (PRESENT(read_access_)) THEN
+        read_access__tmp = read_access_
+        CALL cxios_set_fieldgroup_read_access &
+      (fieldgroup_hdl%daddr, read_access__tmp)
+      ENDIF
+
+      IF (PRESENT(scalar_ref_)) THEN
+        CALL cxios_set_fieldgroup_scalar_ref &
+      (fieldgroup_hdl%daddr, scalar_ref_, len(scalar_ref_))
+      ENDIF
+
+      IF (PRESENT(scale_factor_)) THEN
+        CALL cxios_set_fieldgroup_scale_factor &
+      (fieldgroup_hdl%daddr, scale_factor_)
+      ENDIF
+
+      IF (PRESENT(standard_name_)) THEN
+        CALL cxios_set_fieldgroup_standard_name &
+      (fieldgroup_hdl%daddr, standard_name_, len(standard_name_))
+      ENDIF
+
+      IF (PRESENT(ts_enabled_)) THEN
+        ts_enabled__tmp = ts_enabled_
+        CALL cxios_set_fieldgroup_ts_enabled &
+      (fieldgroup_hdl%daddr, ts_enabled__tmp)
+      ENDIF
+
+      IF (PRESENT(ts_split_freq_)) THEN
+        CALL cxios_set_fieldgroup_ts_split_freq &
+      (fieldgroup_hdl%daddr, ts_split_freq_)
+      ENDIF
+
+      IF (PRESENT(unit_)) THEN
+        CALL cxios_set_fieldgroup_unit &
+      (fieldgroup_hdl%daddr, unit_, len(unit_))
+      ENDIF
+
+      IF (PRESENT(valid_max_)) THEN
+        CALL cxios_set_fieldgroup_valid_max &
+      (fieldgroup_hdl%daddr, valid_max_)
+      ENDIF
+
+      IF (PRESENT(valid_min_)) THEN
+        CALL cxios_set_fieldgroup_valid_min &
+      (fieldgroup_hdl%daddr, valid_min_)
+      ENDIF
+
+  END SUBROUTINE xios(set_fieldgroup_attr_hdl_)
+
+  SUBROUTINE xios(get_fieldgroup_attr)  &
+    ( fieldgroup_id, add_offset, axis_ref, cell_methods, cell_methods_mode, check_if_active, comment  &
+    , compression_level, default_value, detect_missing_value, domain_ref, enabled, expr, field_ref  &
+    , freq_offset, freq_op, grid_path, grid_ref, group_ref, indexed_output, level, long_name, name  &
+    , operation, prec, read_access, scalar_ref, scale_factor, standard_name, ts_enabled, ts_split_freq  &
+    , unit, valid_max, valid_min )
+
+    IMPLICIT NONE
+      TYPE(txios(fieldgroup))  :: fieldgroup_hdl
+      CHARACTER(LEN=*), INTENT(IN) ::fieldgroup_id
+      REAL (KIND=8) , OPTIONAL, INTENT(OUT) :: add_offset
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: axis_ref
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: cell_methods
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: cell_methods_mode
+      LOGICAL  , OPTIONAL, INTENT(OUT) :: check_if_active
+      LOGICAL (KIND=C_BOOL) :: check_if_active_tmp
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: comment
+      INTEGER  , OPTIONAL, INTENT(OUT) :: compression_level
+      REAL (KIND=8) , OPTIONAL, INTENT(OUT) :: default_value
+      LOGICAL  , OPTIONAL, INTENT(OUT) :: detect_missing_value
+      LOGICAL (KIND=C_BOOL) :: detect_missing_value_tmp
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: domain_ref
+      LOGICAL  , OPTIONAL, INTENT(OUT) :: enabled
+      LOGICAL (KIND=C_BOOL) :: enabled_tmp
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: expr
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: field_ref
+      TYPE(txios(duration))  , OPTIONAL, INTENT(OUT) :: freq_offset
+      TYPE(txios(duration))  , OPTIONAL, INTENT(OUT) :: freq_op
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: grid_path
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: grid_ref
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: group_ref
+      LOGICAL  , OPTIONAL, INTENT(OUT) :: indexed_output
+      LOGICAL (KIND=C_BOOL) :: indexed_output_tmp
+      INTEGER  , OPTIONAL, INTENT(OUT) :: level
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: long_name
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: name
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: operation
+      INTEGER  , OPTIONAL, INTENT(OUT) :: prec
+      LOGICAL  , OPTIONAL, INTENT(OUT) :: read_access
+      LOGICAL (KIND=C_BOOL) :: read_access_tmp
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: scalar_ref
+      REAL (KIND=8) , OPTIONAL, INTENT(OUT) :: scale_factor
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: standard_name
+      LOGICAL  , OPTIONAL, INTENT(OUT) :: ts_enabled
+      LOGICAL (KIND=C_BOOL) :: ts_enabled_tmp
+      TYPE(txios(duration))  , OPTIONAL, INTENT(OUT) :: ts_split_freq
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: unit
+      REAL (KIND=8) , OPTIONAL, INTENT(OUT) :: valid_max
+      REAL (KIND=8) , OPTIONAL, INTENT(OUT) :: valid_min
+
+      CALL xios(get_fieldgroup_handle) &
+      (fieldgroup_id,fieldgroup_hdl)
+      CALL xios(get_fieldgroup_attr_hdl_)   &
+      ( fieldgroup_hdl, add_offset, axis_ref, cell_methods, cell_methods_mode, check_if_active, comment  &
+      , compression_level, default_value, detect_missing_value, domain_ref, enabled, expr, field_ref  &
+      , freq_offset, freq_op, grid_path, grid_ref, group_ref, indexed_output, level, long_name, name  &
+      , operation, prec, read_access, scalar_ref, scale_factor, standard_name, ts_enabled, ts_split_freq  &
+      , unit, valid_max, valid_min )
+
+  END SUBROUTINE xios(get_fieldgroup_attr)
+
+  SUBROUTINE xios(get_fieldgroup_attr_hdl)  &
+    ( fieldgroup_hdl, add_offset, axis_ref, cell_methods, cell_methods_mode, check_if_active, comment  &
+    , compression_level, default_value, detect_missing_value, domain_ref, enabled, expr, field_ref  &
+    , freq_offset, freq_op, grid_path, grid_ref, group_ref, indexed_output, level, long_name, name  &
+    , operation, prec, read_access, scalar_ref, scale_factor, standard_name, ts_enabled, ts_split_freq  &
+    , unit, valid_max, valid_min )
+
+    IMPLICIT NONE
+      TYPE(txios(fieldgroup)) , INTENT(IN) :: fieldgroup_hdl
+      REAL (KIND=8) , OPTIONAL, INTENT(OUT) :: add_offset
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: axis_ref
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: cell_methods
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: cell_methods_mode
+      LOGICAL  , OPTIONAL, INTENT(OUT) :: check_if_active
+      LOGICAL (KIND=C_BOOL) :: check_if_active_tmp
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: comment
+      INTEGER  , OPTIONAL, INTENT(OUT) :: compression_level
+      REAL (KIND=8) , OPTIONAL, INTENT(OUT) :: default_value
+      LOGICAL  , OPTIONAL, INTENT(OUT) :: detect_missing_value
+      LOGICAL (KIND=C_BOOL) :: detect_missing_value_tmp
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: domain_ref
+      LOGICAL  , OPTIONAL, INTENT(OUT) :: enabled
+      LOGICAL (KIND=C_BOOL) :: enabled_tmp
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: expr
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: field_ref
+      TYPE(txios(duration))  , OPTIONAL, INTENT(OUT) :: freq_offset
+      TYPE(txios(duration))  , OPTIONAL, INTENT(OUT) :: freq_op
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: grid_path
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: grid_ref
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: group_ref
+      LOGICAL  , OPTIONAL, INTENT(OUT) :: indexed_output
+      LOGICAL (KIND=C_BOOL) :: indexed_output_tmp
+      INTEGER  , OPTIONAL, INTENT(OUT) :: level
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: long_name
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: name
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: operation
+      INTEGER  , OPTIONAL, INTENT(OUT) :: prec
+      LOGICAL  , OPTIONAL, INTENT(OUT) :: read_access
+      LOGICAL (KIND=C_BOOL) :: read_access_tmp
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: scalar_ref
+      REAL (KIND=8) , OPTIONAL, INTENT(OUT) :: scale_factor
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: standard_name
+      LOGICAL  , OPTIONAL, INTENT(OUT) :: ts_enabled
+      LOGICAL (KIND=C_BOOL) :: ts_enabled_tmp
+      TYPE(txios(duration))  , OPTIONAL, INTENT(OUT) :: ts_split_freq
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: unit
+      REAL (KIND=8) , OPTIONAL, INTENT(OUT) :: valid_max
+      REAL (KIND=8) , OPTIONAL, INTENT(OUT) :: valid_min
+
+      CALL xios(get_fieldgroup_attr_hdl_)  &
+      ( fieldgroup_hdl, add_offset, axis_ref, cell_methods, cell_methods_mode, check_if_active, comment  &
+      , compression_level, default_value, detect_missing_value, domain_ref, enabled, expr, field_ref  &
+      , freq_offset, freq_op, grid_path, grid_ref, group_ref, indexed_output, level, long_name, name  &
+      , operation, prec, read_access, scalar_ref, scale_factor, standard_name, ts_enabled, ts_split_freq  &
+      , unit, valid_max, valid_min )
+
+  END SUBROUTINE xios(get_fieldgroup_attr_hdl)
+
+  SUBROUTINE xios(get_fieldgroup_attr_hdl_)   &
+    ( fieldgroup_hdl, add_offset_, axis_ref_, cell_methods_, cell_methods_mode_, check_if_active_  &
+    , comment_, compression_level_, default_value_, detect_missing_value_, domain_ref_, enabled_  &
+    , expr_, field_ref_, freq_offset_, freq_op_, grid_path_, grid_ref_, group_ref_, indexed_output_  &
+    , level_, long_name_, name_, operation_, prec_, read_access_, scalar_ref_, scale_factor_, standard_name_  &
+    , ts_enabled_, ts_split_freq_, unit_, valid_max_, valid_min_ )
+
+    IMPLICIT NONE
+      TYPE(txios(fieldgroup)) , INTENT(IN) :: fieldgroup_hdl
+      REAL (KIND=8) , OPTIONAL, INTENT(OUT) :: add_offset_
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: axis_ref_
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: cell_methods_
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: cell_methods_mode_
+      LOGICAL  , OPTIONAL, INTENT(OUT) :: check_if_active_
+      LOGICAL (KIND=C_BOOL) :: check_if_active__tmp
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: comment_
+      INTEGER  , OPTIONAL, INTENT(OUT) :: compression_level_
+      REAL (KIND=8) , OPTIONAL, INTENT(OUT) :: default_value_
+      LOGICAL  , OPTIONAL, INTENT(OUT) :: detect_missing_value_
+      LOGICAL (KIND=C_BOOL) :: detect_missing_value__tmp
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: domain_ref_
+      LOGICAL  , OPTIONAL, INTENT(OUT) :: enabled_
+      LOGICAL (KIND=C_BOOL) :: enabled__tmp
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: expr_
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: field_ref_
+      TYPE(txios(duration))  , OPTIONAL, INTENT(OUT) :: freq_offset_
+      TYPE(txios(duration))  , OPTIONAL, INTENT(OUT) :: freq_op_
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: grid_path_
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: grid_ref_
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: group_ref_
+      LOGICAL  , OPTIONAL, INTENT(OUT) :: indexed_output_
+      LOGICAL (KIND=C_BOOL) :: indexed_output__tmp
+      INTEGER  , OPTIONAL, INTENT(OUT) :: level_
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: long_name_
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: name_
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: operation_
+      INTEGER  , OPTIONAL, INTENT(OUT) :: prec_
+      LOGICAL  , OPTIONAL, INTENT(OUT) :: read_access_
+      LOGICAL (KIND=C_BOOL) :: read_access__tmp
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: scalar_ref_
+      REAL (KIND=8) , OPTIONAL, INTENT(OUT) :: scale_factor_
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: standard_name_
+      LOGICAL  , OPTIONAL, INTENT(OUT) :: ts_enabled_
+      LOGICAL (KIND=C_BOOL) :: ts_enabled__tmp
+      TYPE(txios(duration))  , OPTIONAL, INTENT(OUT) :: ts_split_freq_
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: unit_
+      REAL (KIND=8) , OPTIONAL, INTENT(OUT) :: valid_max_
+      REAL (KIND=8) , OPTIONAL, INTENT(OUT) :: valid_min_
+
+      IF (PRESENT(add_offset_)) THEN
+        CALL cxios_get_fieldgroup_add_offset &
+      (fieldgroup_hdl%daddr, add_offset_)
+      ENDIF
+
+      IF (PRESENT(axis_ref_)) THEN
+        CALL cxios_get_fieldgroup_axis_ref &
+      (fieldgroup_hdl%daddr, axis_ref_, len(axis_ref_))
+      ENDIF
+
+      IF (PRESENT(cell_methods_)) THEN
+        CALL cxios_get_fieldgroup_cell_methods &
+      (fieldgroup_hdl%daddr, cell_methods_, len(cell_methods_))
+      ENDIF
+
+      IF (PRESENT(cell_methods_mode_)) THEN
+        CALL cxios_get_fieldgroup_cell_methods_mode &
+      (fieldgroup_hdl%daddr, cell_methods_mode_, len(cell_methods_mode_))
+      ENDIF
+
+      IF (PRESENT(check_if_active_)) THEN
+        CALL cxios_get_fieldgroup_check_if_active &
+      (fieldgroup_hdl%daddr, check_if_active__tmp)
+        check_if_active_ = check_if_active__tmp
+      ENDIF
+
+      IF (PRESENT(comment_)) THEN
+        CALL cxios_get_fieldgroup_comment &
+      (fieldgroup_hdl%daddr, comment_, len(comment_))
+      ENDIF
+
+      IF (PRESENT(compression_level_)) THEN
+        CALL cxios_get_fieldgroup_compression_level &
+      (fieldgroup_hdl%daddr, compression_level_)
+      ENDIF
+
+      IF (PRESENT(default_value_)) THEN
+        CALL cxios_get_fieldgroup_default_value &
+      (fieldgroup_hdl%daddr, default_value_)
+      ENDIF
+
+      IF (PRESENT(detect_missing_value_)) THEN
+        CALL cxios_get_fieldgroup_detect_missing_value &
+      (fieldgroup_hdl%daddr, detect_missing_value__tmp)
+        detect_missing_value_ = detect_missing_value__tmp
+      ENDIF
+
+      IF (PRESENT(domain_ref_)) THEN
+        CALL cxios_get_fieldgroup_domain_ref &
+      (fieldgroup_hdl%daddr, domain_ref_, len(domain_ref_))
+      ENDIF
+
+      IF (PRESENT(enabled_)) THEN
+        CALL cxios_get_fieldgroup_enabled &
+      (fieldgroup_hdl%daddr, enabled__tmp)
+        enabled_ = enabled__tmp
+      ENDIF
+
+      IF (PRESENT(expr_)) THEN
+        CALL cxios_get_fieldgroup_expr &
+      (fieldgroup_hdl%daddr, expr_, len(expr_))
+      ENDIF
+
+      IF (PRESENT(field_ref_)) THEN
+        CALL cxios_get_fieldgroup_field_ref &
+      (fieldgroup_hdl%daddr, field_ref_, len(field_ref_))
+      ENDIF
+
+      IF (PRESENT(freq_offset_)) THEN
+        CALL cxios_get_fieldgroup_freq_offset &
+      (fieldgroup_hdl%daddr, freq_offset_)
+      ENDIF
+
+      IF (PRESENT(freq_op_)) THEN
+        CALL cxios_get_fieldgroup_freq_op &
+      (fieldgroup_hdl%daddr, freq_op_)
+      ENDIF
+
+      IF (PRESENT(grid_path_)) THEN
+        CALL cxios_get_fieldgroup_grid_path &
+      (fieldgroup_hdl%daddr, grid_path_, len(grid_path_))
+      ENDIF
+
+      IF (PRESENT(grid_ref_)) THEN
+        CALL cxios_get_fieldgroup_grid_ref &
+      (fieldgroup_hdl%daddr, grid_ref_, len(grid_ref_))
+      ENDIF
+
+      IF (PRESENT(group_ref_)) THEN
+        CALL cxios_get_fieldgroup_group_ref &
+      (fieldgroup_hdl%daddr, group_ref_, len(group_ref_))
+      ENDIF
+
+      IF (PRESENT(indexed_output_)) THEN
+        CALL cxios_get_fieldgroup_indexed_output &
+      (fieldgroup_hdl%daddr, indexed_output__tmp)
+        indexed_output_ = indexed_output__tmp
+      ENDIF
+
+      IF (PRESENT(level_)) THEN
+        CALL cxios_get_fieldgroup_level &
+      (fieldgroup_hdl%daddr, level_)
+      ENDIF
+
+      IF (PRESENT(long_name_)) THEN
+        CALL cxios_get_fieldgroup_long_name &
+      (fieldgroup_hdl%daddr, long_name_, len(long_name_))
+      ENDIF
+
+      IF (PRESENT(name_)) THEN
+        CALL cxios_get_fieldgroup_name &
+      (fieldgroup_hdl%daddr, name_, len(name_))
+      ENDIF
+
+      IF (PRESENT(operation_)) THEN
+        CALL cxios_get_fieldgroup_operation &
+      (fieldgroup_hdl%daddr, operation_, len(operation_))
+      ENDIF
+
+      IF (PRESENT(prec_)) THEN
+        CALL cxios_get_fieldgroup_prec &
+      (fieldgroup_hdl%daddr, prec_)
+      ENDIF
+
+      IF (PRESENT(read_access_)) THEN
+        CALL cxios_get_fieldgroup_read_access &
+      (fieldgroup_hdl%daddr, read_access__tmp)
+        read_access_ = read_access__tmp
+      ENDIF
+
+      IF (PRESENT(scalar_ref_)) THEN
+        CALL cxios_get_fieldgroup_scalar_ref &
+      (fieldgroup_hdl%daddr, scalar_ref_, len(scalar_ref_))
+      ENDIF
+
+      IF (PRESENT(scale_factor_)) THEN
+        CALL cxios_get_fieldgroup_scale_factor &
+      (fieldgroup_hdl%daddr, scale_factor_)
+      ENDIF
+
+      IF (PRESENT(standard_name_)) THEN
+        CALL cxios_get_fieldgroup_standard_name &
+      (fieldgroup_hdl%daddr, standard_name_, len(standard_name_))
+      ENDIF
+
+      IF (PRESENT(ts_enabled_)) THEN
+        CALL cxios_get_fieldgroup_ts_enabled &
+      (fieldgroup_hdl%daddr, ts_enabled__tmp)
+        ts_enabled_ = ts_enabled__tmp
+      ENDIF
+
+      IF (PRESENT(ts_split_freq_)) THEN
+        CALL cxios_get_fieldgroup_ts_split_freq &
+      (fieldgroup_hdl%daddr, ts_split_freq_)
+      ENDIF
+
+      IF (PRESENT(unit_)) THEN
+        CALL cxios_get_fieldgroup_unit &
+      (fieldgroup_hdl%daddr, unit_, len(unit_))
+      ENDIF
+
+      IF (PRESENT(valid_max_)) THEN
+        CALL cxios_get_fieldgroup_valid_max &
+      (fieldgroup_hdl%daddr, valid_max_)
+      ENDIF
+
+      IF (PRESENT(valid_min_)) THEN
+        CALL cxios_get_fieldgroup_valid_min &
+      (fieldgroup_hdl%daddr, valid_min_)
+      ENDIF
+
+  END SUBROUTINE xios(get_fieldgroup_attr_hdl_)
+
+  SUBROUTINE xios(is_defined_fieldgroup_attr)  &
+    ( fieldgroup_id, add_offset, axis_ref, cell_methods, cell_methods_mode, check_if_active, comment  &
+    , compression_level, default_value, detect_missing_value, domain_ref, enabled, expr, field_ref  &
+    , freq_offset, freq_op, grid_path, grid_ref, group_ref, indexed_output, level, long_name, name  &
+    , operation, prec, read_access, scalar_ref, scale_factor, standard_name, ts_enabled, ts_split_freq  &
+    , unit, valid_max, valid_min )
+
+    IMPLICIT NONE
+      TYPE(txios(fieldgroup))  :: fieldgroup_hdl
+      CHARACTER(LEN=*), INTENT(IN) ::fieldgroup_id
+      LOGICAL, OPTIONAL, INTENT(OUT) :: add_offset
+      LOGICAL(KIND=C_BOOL) :: add_offset_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: axis_ref
+      LOGICAL(KIND=C_BOOL) :: axis_ref_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: cell_methods
+      LOGICAL(KIND=C_BOOL) :: cell_methods_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: cell_methods_mode
+      LOGICAL(KIND=C_BOOL) :: cell_methods_mode_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: check_if_active
+      LOGICAL(KIND=C_BOOL) :: check_if_active_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: comment
+      LOGICAL(KIND=C_BOOL) :: comment_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: compression_level
+      LOGICAL(KIND=C_BOOL) :: compression_level_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: default_value
+      LOGICAL(KIND=C_BOOL) :: default_value_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: detect_missing_value
+      LOGICAL(KIND=C_BOOL) :: detect_missing_value_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: domain_ref
+      LOGICAL(KIND=C_BOOL) :: domain_ref_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: enabled
+      LOGICAL(KIND=C_BOOL) :: enabled_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: expr
+      LOGICAL(KIND=C_BOOL) :: expr_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: field_ref
+      LOGICAL(KIND=C_BOOL) :: field_ref_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: freq_offset
+      LOGICAL(KIND=C_BOOL) :: freq_offset_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: freq_op
+      LOGICAL(KIND=C_BOOL) :: freq_op_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: grid_path
+      LOGICAL(KIND=C_BOOL) :: grid_path_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: grid_ref
+      LOGICAL(KIND=C_BOOL) :: grid_ref_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: group_ref
+      LOGICAL(KIND=C_BOOL) :: group_ref_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: indexed_output
+      LOGICAL(KIND=C_BOOL) :: indexed_output_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: level
+      LOGICAL(KIND=C_BOOL) :: level_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: long_name
+      LOGICAL(KIND=C_BOOL) :: long_name_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: name
+      LOGICAL(KIND=C_BOOL) :: name_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: operation
+      LOGICAL(KIND=C_BOOL) :: operation_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: prec
+      LOGICAL(KIND=C_BOOL) :: prec_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: read_access
+      LOGICAL(KIND=C_BOOL) :: read_access_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: scalar_ref
+      LOGICAL(KIND=C_BOOL) :: scalar_ref_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: scale_factor
+      LOGICAL(KIND=C_BOOL) :: scale_factor_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: standard_name
+      LOGICAL(KIND=C_BOOL) :: standard_name_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: ts_enabled
+      LOGICAL(KIND=C_BOOL) :: ts_enabled_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: ts_split_freq
+      LOGICAL(KIND=C_BOOL) :: ts_split_freq_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: unit
+      LOGICAL(KIND=C_BOOL) :: unit_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: valid_max
+      LOGICAL(KIND=C_BOOL) :: valid_max_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: valid_min
+      LOGICAL(KIND=C_BOOL) :: valid_min_tmp
+
+      CALL xios(get_fieldgroup_handle) &
+      (fieldgroup_id,fieldgroup_hdl)
+      CALL xios(is_defined_fieldgroup_attr_hdl_)   &
+      ( fieldgroup_hdl, add_offset, axis_ref, cell_methods, cell_methods_mode, check_if_active, comment  &
+      , compression_level, default_value, detect_missing_value, domain_ref, enabled, expr, field_ref  &
+      , freq_offset, freq_op, grid_path, grid_ref, group_ref, indexed_output, level, long_name, name  &
+      , operation, prec, read_access, scalar_ref, scale_factor, standard_name, ts_enabled, ts_split_freq  &
+      , unit, valid_max, valid_min )
+
+  END SUBROUTINE xios(is_defined_fieldgroup_attr)
+
+  SUBROUTINE xios(is_defined_fieldgroup_attr_hdl)  &
+    ( fieldgroup_hdl, add_offset, axis_ref, cell_methods, cell_methods_mode, check_if_active, comment  &
+    , compression_level, default_value, detect_missing_value, domain_ref, enabled, expr, field_ref  &
+    , freq_offset, freq_op, grid_path, grid_ref, group_ref, indexed_output, level, long_name, name  &
+    , operation, prec, read_access, scalar_ref, scale_factor, standard_name, ts_enabled, ts_split_freq  &
+    , unit, valid_max, valid_min )
+
+    IMPLICIT NONE
+      TYPE(txios(fieldgroup)) , INTENT(IN) :: fieldgroup_hdl
+      LOGICAL, OPTIONAL, INTENT(OUT) :: add_offset
+      LOGICAL(KIND=C_BOOL) :: add_offset_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: axis_ref
+      LOGICAL(KIND=C_BOOL) :: axis_ref_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: cell_methods
+      LOGICAL(KIND=C_BOOL) :: cell_methods_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: cell_methods_mode
+      LOGICAL(KIND=C_BOOL) :: cell_methods_mode_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: check_if_active
+      LOGICAL(KIND=C_BOOL) :: check_if_active_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: comment
+      LOGICAL(KIND=C_BOOL) :: comment_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: compression_level
+      LOGICAL(KIND=C_BOOL) :: compression_level_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: default_value
+      LOGICAL(KIND=C_BOOL) :: default_value_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: detect_missing_value
+      LOGICAL(KIND=C_BOOL) :: detect_missing_value_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: domain_ref
+      LOGICAL(KIND=C_BOOL) :: domain_ref_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: enabled
+      LOGICAL(KIND=C_BOOL) :: enabled_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: expr
+      LOGICAL(KIND=C_BOOL) :: expr_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: field_ref
+      LOGICAL(KIND=C_BOOL) :: field_ref_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: freq_offset
+      LOGICAL(KIND=C_BOOL) :: freq_offset_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: freq_op
+      LOGICAL(KIND=C_BOOL) :: freq_op_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: grid_path
+      LOGICAL(KIND=C_BOOL) :: grid_path_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: grid_ref
+      LOGICAL(KIND=C_BOOL) :: grid_ref_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: group_ref
+      LOGICAL(KIND=C_BOOL) :: group_ref_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: indexed_output
+      LOGICAL(KIND=C_BOOL) :: indexed_output_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: level
+      LOGICAL(KIND=C_BOOL) :: level_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: long_name
+      LOGICAL(KIND=C_BOOL) :: long_name_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: name
+      LOGICAL(KIND=C_BOOL) :: name_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: operation
+      LOGICAL(KIND=C_BOOL) :: operation_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: prec
+      LOGICAL(KIND=C_BOOL) :: prec_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: read_access
+      LOGICAL(KIND=C_BOOL) :: read_access_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: scalar_ref
+      LOGICAL(KIND=C_BOOL) :: scalar_ref_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: scale_factor
+      LOGICAL(KIND=C_BOOL) :: scale_factor_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: standard_name
+      LOGICAL(KIND=C_BOOL) :: standard_name_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: ts_enabled
+      LOGICAL(KIND=C_BOOL) :: ts_enabled_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: ts_split_freq
+      LOGICAL(KIND=C_BOOL) :: ts_split_freq_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: unit
+      LOGICAL(KIND=C_BOOL) :: unit_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: valid_max
+      LOGICAL(KIND=C_BOOL) :: valid_max_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: valid_min
+      LOGICAL(KIND=C_BOOL) :: valid_min_tmp
+
+      CALL xios(is_defined_fieldgroup_attr_hdl_)  &
+      ( fieldgroup_hdl, add_offset, axis_ref, cell_methods, cell_methods_mode, check_if_active, comment  &
+      , compression_level, default_value, detect_missing_value, domain_ref, enabled, expr, field_ref  &
+      , freq_offset, freq_op, grid_path, grid_ref, group_ref, indexed_output, level, long_name, name  &
+      , operation, prec, read_access, scalar_ref, scale_factor, standard_name, ts_enabled, ts_split_freq  &
+      , unit, valid_max, valid_min )
+
+  END SUBROUTINE xios(is_defined_fieldgroup_attr_hdl)
+
+  SUBROUTINE xios(is_defined_fieldgroup_attr_hdl_)   &
+    ( fieldgroup_hdl, add_offset_, axis_ref_, cell_methods_, cell_methods_mode_, check_if_active_  &
+    , comment_, compression_level_, default_value_, detect_missing_value_, domain_ref_, enabled_  &
+    , expr_, field_ref_, freq_offset_, freq_op_, grid_path_, grid_ref_, group_ref_, indexed_output_  &
+    , level_, long_name_, name_, operation_, prec_, read_access_, scalar_ref_, scale_factor_, standard_name_  &
+    , ts_enabled_, ts_split_freq_, unit_, valid_max_, valid_min_ )
+
+    IMPLICIT NONE
+      TYPE(txios(fieldgroup)) , INTENT(IN) :: fieldgroup_hdl
+      LOGICAL, OPTIONAL, INTENT(OUT) :: add_offset_
+      LOGICAL(KIND=C_BOOL) :: add_offset__tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: axis_ref_
+      LOGICAL(KIND=C_BOOL) :: axis_ref__tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: cell_methods_
+      LOGICAL(KIND=C_BOOL) :: cell_methods__tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: cell_methods_mode_
+      LOGICAL(KIND=C_BOOL) :: cell_methods_mode__tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: check_if_active_
+      LOGICAL(KIND=C_BOOL) :: check_if_active__tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: comment_
+      LOGICAL(KIND=C_BOOL) :: comment__tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: compression_level_
+      LOGICAL(KIND=C_BOOL) :: compression_level__tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: default_value_
+      LOGICAL(KIND=C_BOOL) :: default_value__tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: detect_missing_value_
+      LOGICAL(KIND=C_BOOL) :: detect_missing_value__tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: domain_ref_
+      LOGICAL(KIND=C_BOOL) :: domain_ref__tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: enabled_
+      LOGICAL(KIND=C_BOOL) :: enabled__tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: expr_
+      LOGICAL(KIND=C_BOOL) :: expr__tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: field_ref_
+      LOGICAL(KIND=C_BOOL) :: field_ref__tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: freq_offset_
+      LOGICAL(KIND=C_BOOL) :: freq_offset__tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: freq_op_
+      LOGICAL(KIND=C_BOOL) :: freq_op__tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: grid_path_
+      LOGICAL(KIND=C_BOOL) :: grid_path__tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: grid_ref_
+      LOGICAL(KIND=C_BOOL) :: grid_ref__tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: group_ref_
+      LOGICAL(KIND=C_BOOL) :: group_ref__tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: indexed_output_
+      LOGICAL(KIND=C_BOOL) :: indexed_output__tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: level_
+      LOGICAL(KIND=C_BOOL) :: level__tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: long_name_
+      LOGICAL(KIND=C_BOOL) :: long_name__tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: name_
+      LOGICAL(KIND=C_BOOL) :: name__tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: operation_
+      LOGICAL(KIND=C_BOOL) :: operation__tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: prec_
+      LOGICAL(KIND=C_BOOL) :: prec__tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: read_access_
+      LOGICAL(KIND=C_BOOL) :: read_access__tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: scalar_ref_
+      LOGICAL(KIND=C_BOOL) :: scalar_ref__tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: scale_factor_
+      LOGICAL(KIND=C_BOOL) :: scale_factor__tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: standard_name_
+      LOGICAL(KIND=C_BOOL) :: standard_name__tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: ts_enabled_
+      LOGICAL(KIND=C_BOOL) :: ts_enabled__tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: ts_split_freq_
+      LOGICAL(KIND=C_BOOL) :: ts_split_freq__tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: unit_
+      LOGICAL(KIND=C_BOOL) :: unit__tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: valid_max_
+      LOGICAL(KIND=C_BOOL) :: valid_max__tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: valid_min_
+      LOGICAL(KIND=C_BOOL) :: valid_min__tmp
+
+      IF (PRESENT(add_offset_)) THEN
+        add_offset__tmp = cxios_is_defined_fieldgroup_add_offset &
+      (fieldgroup_hdl%daddr)
+        add_offset_ = add_offset__tmp
+      ENDIF
+
+      IF (PRESENT(axis_ref_)) THEN
+        axis_ref__tmp = cxios_is_defined_fieldgroup_axis_ref &
+      (fieldgroup_hdl%daddr)
+        axis_ref_ = axis_ref__tmp
+      ENDIF
+
+      IF (PRESENT(cell_methods_)) THEN
+        cell_methods__tmp = cxios_is_defined_fieldgroup_cell_methods &
+      (fieldgroup_hdl%daddr)
+        cell_methods_ = cell_methods__tmp
+      ENDIF
+
+      IF (PRESENT(cell_methods_mode_)) THEN
+        cell_methods_mode__tmp = cxios_is_defined_fieldgroup_cell_methods_mode &
+      (fieldgroup_hdl%daddr)
+        cell_methods_mode_ = cell_methods_mode__tmp
+      ENDIF
+
+      IF (PRESENT(check_if_active_)) THEN
+        check_if_active__tmp = cxios_is_defined_fieldgroup_check_if_active &
+      (fieldgroup_hdl%daddr)
+        check_if_active_ = check_if_active__tmp
+      ENDIF
+
+      IF (PRESENT(comment_)) THEN
+        comment__tmp = cxios_is_defined_fieldgroup_comment &
+      (fieldgroup_hdl%daddr)
+        comment_ = comment__tmp
+      ENDIF
+
+      IF (PRESENT(compression_level_)) THEN
+        compression_level__tmp = cxios_is_defined_fieldgroup_compression_level &
+      (fieldgroup_hdl%daddr)
+        compression_level_ = compression_level__tmp
+      ENDIF
+
+      IF (PRESENT(default_value_)) THEN
+        default_value__tmp = cxios_is_defined_fieldgroup_default_value &
+      (fieldgroup_hdl%daddr)
+        default_value_ = default_value__tmp
+      ENDIF
+
+      IF (PRESENT(detect_missing_value_)) THEN
+        detect_missing_value__tmp = cxios_is_defined_fieldgroup_detect_missing_value &
+      (fieldgroup_hdl%daddr)
+        detect_missing_value_ = detect_missing_value__tmp
+      ENDIF
+
+      IF (PRESENT(domain_ref_)) THEN
+        domain_ref__tmp = cxios_is_defined_fieldgroup_domain_ref &
+      (fieldgroup_hdl%daddr)
+        domain_ref_ = domain_ref__tmp
+      ENDIF
+
+      IF (PRESENT(enabled_)) THEN
+        enabled__tmp = cxios_is_defined_fieldgroup_enabled &
+      (fieldgroup_hdl%daddr)
+        enabled_ = enabled__tmp
+      ENDIF
+
+      IF (PRESENT(expr_)) THEN
+        expr__tmp = cxios_is_defined_fieldgroup_expr &
+      (fieldgroup_hdl%daddr)
+        expr_ = expr__tmp
+      ENDIF
+
+      IF (PRESENT(field_ref_)) THEN
+        field_ref__tmp = cxios_is_defined_fieldgroup_field_ref &
+      (fieldgroup_hdl%daddr)
+        field_ref_ = field_ref__tmp
+      ENDIF
+
+      IF (PRESENT(freq_offset_)) THEN
+        freq_offset__tmp = cxios_is_defined_fieldgroup_freq_offset &
+      (fieldgroup_hdl%daddr)
+        freq_offset_ = freq_offset__tmp
+      ENDIF
+
+      IF (PRESENT(freq_op_)) THEN
+        freq_op__tmp = cxios_is_defined_fieldgroup_freq_op &
+      (fieldgroup_hdl%daddr)
+        freq_op_ = freq_op__tmp
+      ENDIF
+
+      IF (PRESENT(grid_path_)) THEN
+        grid_path__tmp = cxios_is_defined_fieldgroup_grid_path &
+      (fieldgroup_hdl%daddr)
+        grid_path_ = grid_path__tmp
+      ENDIF
+
+      IF (PRESENT(grid_ref_)) THEN
+        grid_ref__tmp = cxios_is_defined_fieldgroup_grid_ref &
+      (fieldgroup_hdl%daddr)
+        grid_ref_ = grid_ref__tmp
+      ENDIF
+
+      IF (PRESENT(group_ref_)) THEN
+        group_ref__tmp = cxios_is_defined_fieldgroup_group_ref &
+      (fieldgroup_hdl%daddr)
+        group_ref_ = group_ref__tmp
+      ENDIF
+
+      IF (PRESENT(indexed_output_)) THEN
+        indexed_output__tmp = cxios_is_defined_fieldgroup_indexed_output &
+      (fieldgroup_hdl%daddr)
+        indexed_output_ = indexed_output__tmp
+      ENDIF
+
+      IF (PRESENT(level_)) THEN
+        level__tmp = cxios_is_defined_fieldgroup_level &
+      (fieldgroup_hdl%daddr)
+        level_ = level__tmp
+      ENDIF
+
+      IF (PRESENT(long_name_)) THEN
+        long_name__tmp = cxios_is_defined_fieldgroup_long_name &
+      (fieldgroup_hdl%daddr)
+        long_name_ = long_name__tmp
+      ENDIF
+
+      IF (PRESENT(name_)) THEN
+        name__tmp = cxios_is_defined_fieldgroup_name &
+      (fieldgroup_hdl%daddr)
+        name_ = name__tmp
+      ENDIF
+
+      IF (PRESENT(operation_)) THEN
+        operation__tmp = cxios_is_defined_fieldgroup_operation &
+      (fieldgroup_hdl%daddr)
+        operation_ = operation__tmp
+      ENDIF
+
+      IF (PRESENT(prec_)) THEN
+        prec__tmp = cxios_is_defined_fieldgroup_prec &
+      (fieldgroup_hdl%daddr)
+        prec_ = prec__tmp
+      ENDIF
+
+      IF (PRESENT(read_access_)) THEN
+        read_access__tmp = cxios_is_defined_fieldgroup_read_access &
+      (fieldgroup_hdl%daddr)
+        read_access_ = read_access__tmp
+      ENDIF
+
+      IF (PRESENT(scalar_ref_)) THEN
+        scalar_ref__tmp = cxios_is_defined_fieldgroup_scalar_ref &
+      (fieldgroup_hdl%daddr)
+        scalar_ref_ = scalar_ref__tmp
+      ENDIF
+
+      IF (PRESENT(scale_factor_)) THEN
+        scale_factor__tmp = cxios_is_defined_fieldgroup_scale_factor &
+      (fieldgroup_hdl%daddr)
+        scale_factor_ = scale_factor__tmp
+      ENDIF
+
+      IF (PRESENT(standard_name_)) THEN
+        standard_name__tmp = cxios_is_defined_fieldgroup_standard_name &
+      (fieldgroup_hdl%daddr)
+        standard_name_ = standard_name__tmp
+      ENDIF
+
+      IF (PRESENT(ts_enabled_)) THEN
+        ts_enabled__tmp = cxios_is_defined_fieldgroup_ts_enabled &
+      (fieldgroup_hdl%daddr)
+        ts_enabled_ = ts_enabled__tmp
+      ENDIF
+
+      IF (PRESENT(ts_split_freq_)) THEN
+        ts_split_freq__tmp = cxios_is_defined_fieldgroup_ts_split_freq &
+      (fieldgroup_hdl%daddr)
+        ts_split_freq_ = ts_split_freq__tmp
+      ENDIF
+
+      IF (PRESENT(unit_)) THEN
+        unit__tmp = cxios_is_defined_fieldgroup_unit &
+      (fieldgroup_hdl%daddr)
+        unit_ = unit__tmp
+      ENDIF
+
+      IF (PRESENT(valid_max_)) THEN
+        valid_max__tmp = cxios_is_defined_fieldgroup_valid_max &
+      (fieldgroup_hdl%daddr)
+        valid_max_ = valid_max__tmp
+      ENDIF
+
+      IF (PRESENT(valid_min_)) THEN
+        valid_min__tmp = cxios_is_defined_fieldgroup_valid_min &
+      (fieldgroup_hdl%daddr)
+        valid_min_ = valid_min__tmp
+      ENDIF
+
+  END SUBROUTINE xios(is_defined_fieldgroup_attr_hdl_)
+
+END MODULE ifieldgroup_attr
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/fortran_attr/ifile_attr.F90
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/fortran_attr/ifile_attr.F90	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/fortran_attr/ifile_attr.F90	(revision 1749)
@@ -0,0 +1,1156 @@
+! * ************************************************************************** *
+! *               Interface auto generated - do not modify                     *
+! * ************************************************************************** *
+#include "xios_fortran_prefix.hpp"
+
+MODULE ifile_attr
+  USE, INTRINSIC :: ISO_C_BINDING
+  USE ifile
+  USE file_interface_attr
+
+CONTAINS
+
+  SUBROUTINE xios(set_file_attr)  &
+    ( file_id, append, comment, compression_level, convention, convention_str, cyclic, description  &
+    , enabled, format, min_digits, mode, name, name_suffix, output_freq, output_level, par_access  &
+    , read_metadata_par, record_offset, split_end_offset, split_freq, split_freq_format, split_last_date  &
+    , split_start_offset, sync_freq, time_counter, time_counter_name, time_stamp_format, time_stamp_name  &
+    , time_units, timeseries, ts_prefix, type, uuid_format, uuid_name )
+
+    IMPLICIT NONE
+      TYPE(txios(file))  :: file_hdl
+      CHARACTER(LEN=*), INTENT(IN) ::file_id
+      LOGICAL  , OPTIONAL, INTENT(IN) :: append
+      LOGICAL (KIND=C_BOOL) :: append_tmp
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: comment
+      INTEGER  , OPTIONAL, INTENT(IN) :: compression_level
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: convention
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: convention_str
+      LOGICAL  , OPTIONAL, INTENT(IN) :: cyclic
+      LOGICAL (KIND=C_BOOL) :: cyclic_tmp
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: description
+      LOGICAL  , OPTIONAL, INTENT(IN) :: enabled
+      LOGICAL (KIND=C_BOOL) :: enabled_tmp
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: format
+      INTEGER  , OPTIONAL, INTENT(IN) :: min_digits
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: mode
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: name
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: name_suffix
+      TYPE(txios(duration))  , OPTIONAL, INTENT(IN) :: output_freq
+      INTEGER  , OPTIONAL, INTENT(IN) :: output_level
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: par_access
+      LOGICAL  , OPTIONAL, INTENT(IN) :: read_metadata_par
+      LOGICAL (KIND=C_BOOL) :: read_metadata_par_tmp
+      INTEGER  , OPTIONAL, INTENT(IN) :: record_offset
+      TYPE(txios(duration))  , OPTIONAL, INTENT(IN) :: split_end_offset
+      TYPE(txios(duration))  , OPTIONAL, INTENT(IN) :: split_freq
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: split_freq_format
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: split_last_date
+      TYPE(txios(duration))  , OPTIONAL, INTENT(IN) :: split_start_offset
+      TYPE(txios(duration))  , OPTIONAL, INTENT(IN) :: sync_freq
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: time_counter
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: time_counter_name
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: time_stamp_format
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: time_stamp_name
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: time_units
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: timeseries
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: ts_prefix
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: type
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: uuid_format
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: uuid_name
+
+      CALL xios(get_file_handle) &
+      (file_id,file_hdl)
+      CALL xios(set_file_attr_hdl_)   &
+      ( file_hdl, append, comment, compression_level, convention, convention_str, cyclic, description  &
+      , enabled, format, min_digits, mode, name, name_suffix, output_freq, output_level, par_access  &
+      , read_metadata_par, record_offset, split_end_offset, split_freq, split_freq_format, split_last_date  &
+      , split_start_offset, sync_freq, time_counter, time_counter_name, time_stamp_format, time_stamp_name  &
+      , time_units, timeseries, ts_prefix, type, uuid_format, uuid_name )
+
+  END SUBROUTINE xios(set_file_attr)
+
+  SUBROUTINE xios(set_file_attr_hdl)  &
+    ( file_hdl, append, comment, compression_level, convention, convention_str, cyclic, description  &
+    , enabled, format, min_digits, mode, name, name_suffix, output_freq, output_level, par_access  &
+    , read_metadata_par, record_offset, split_end_offset, split_freq, split_freq_format, split_last_date  &
+    , split_start_offset, sync_freq, time_counter, time_counter_name, time_stamp_format, time_stamp_name  &
+    , time_units, timeseries, ts_prefix, type, uuid_format, uuid_name )
+
+    IMPLICIT NONE
+      TYPE(txios(file)) , INTENT(IN) :: file_hdl
+      LOGICAL  , OPTIONAL, INTENT(IN) :: append
+      LOGICAL (KIND=C_BOOL) :: append_tmp
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: comment
+      INTEGER  , OPTIONAL, INTENT(IN) :: compression_level
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: convention
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: convention_str
+      LOGICAL  , OPTIONAL, INTENT(IN) :: cyclic
+      LOGICAL (KIND=C_BOOL) :: cyclic_tmp
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: description
+      LOGICAL  , OPTIONAL, INTENT(IN) :: enabled
+      LOGICAL (KIND=C_BOOL) :: enabled_tmp
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: format
+      INTEGER  , OPTIONAL, INTENT(IN) :: min_digits
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: mode
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: name
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: name_suffix
+      TYPE(txios(duration))  , OPTIONAL, INTENT(IN) :: output_freq
+      INTEGER  , OPTIONAL, INTENT(IN) :: output_level
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: par_access
+      LOGICAL  , OPTIONAL, INTENT(IN) :: read_metadata_par
+      LOGICAL (KIND=C_BOOL) :: read_metadata_par_tmp
+      INTEGER  , OPTIONAL, INTENT(IN) :: record_offset
+      TYPE(txios(duration))  , OPTIONAL, INTENT(IN) :: split_end_offset
+      TYPE(txios(duration))  , OPTIONAL, INTENT(IN) :: split_freq
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: split_freq_format
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: split_last_date
+      TYPE(txios(duration))  , OPTIONAL, INTENT(IN) :: split_start_offset
+      TYPE(txios(duration))  , OPTIONAL, INTENT(IN) :: sync_freq
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: time_counter
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: time_counter_name
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: time_stamp_format
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: time_stamp_name
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: time_units
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: timeseries
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: ts_prefix
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: type
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: uuid_format
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: uuid_name
+
+      CALL xios(set_file_attr_hdl_)  &
+      ( file_hdl, append, comment, compression_level, convention, convention_str, cyclic, description  &
+      , enabled, format, min_digits, mode, name, name_suffix, output_freq, output_level, par_access  &
+      , read_metadata_par, record_offset, split_end_offset, split_freq, split_freq_format, split_last_date  &
+      , split_start_offset, sync_freq, time_counter, time_counter_name, time_stamp_format, time_stamp_name  &
+      , time_units, timeseries, ts_prefix, type, uuid_format, uuid_name )
+
+  END SUBROUTINE xios(set_file_attr_hdl)
+
+  SUBROUTINE xios(set_file_attr_hdl_)   &
+    ( file_hdl, append_, comment_, compression_level_, convention_, convention_str_, cyclic_, description_  &
+    , enabled_, format_, min_digits_, mode_, name_, name_suffix_, output_freq_, output_level_, par_access_  &
+    , read_metadata_par_, record_offset_, split_end_offset_, split_freq_, split_freq_format_, split_last_date_  &
+    , split_start_offset_, sync_freq_, time_counter_, time_counter_name_, time_stamp_format_, time_stamp_name_  &
+    , time_units_, timeseries_, ts_prefix_, type_, uuid_format_, uuid_name_ )
+
+    IMPLICIT NONE
+      TYPE(txios(file)) , INTENT(IN) :: file_hdl
+      LOGICAL  , OPTIONAL, INTENT(IN) :: append_
+      LOGICAL (KIND=C_BOOL) :: append__tmp
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: comment_
+      INTEGER  , OPTIONAL, INTENT(IN) :: compression_level_
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: convention_
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: convention_str_
+      LOGICAL  , OPTIONAL, INTENT(IN) :: cyclic_
+      LOGICAL (KIND=C_BOOL) :: cyclic__tmp
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: description_
+      LOGICAL  , OPTIONAL, INTENT(IN) :: enabled_
+      LOGICAL (KIND=C_BOOL) :: enabled__tmp
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: format_
+      INTEGER  , OPTIONAL, INTENT(IN) :: min_digits_
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: mode_
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: name_
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: name_suffix_
+      TYPE(txios(duration))  , OPTIONAL, INTENT(IN) :: output_freq_
+      INTEGER  , OPTIONAL, INTENT(IN) :: output_level_
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: par_access_
+      LOGICAL  , OPTIONAL, INTENT(IN) :: read_metadata_par_
+      LOGICAL (KIND=C_BOOL) :: read_metadata_par__tmp
+      INTEGER  , OPTIONAL, INTENT(IN) :: record_offset_
+      TYPE(txios(duration))  , OPTIONAL, INTENT(IN) :: split_end_offset_
+      TYPE(txios(duration))  , OPTIONAL, INTENT(IN) :: split_freq_
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: split_freq_format_
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: split_last_date_
+      TYPE(txios(duration))  , OPTIONAL, INTENT(IN) :: split_start_offset_
+      TYPE(txios(duration))  , OPTIONAL, INTENT(IN) :: sync_freq_
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: time_counter_
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: time_counter_name_
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: time_stamp_format_
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: time_stamp_name_
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: time_units_
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: timeseries_
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: ts_prefix_
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: type_
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: uuid_format_
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: uuid_name_
+
+      IF (PRESENT(append_)) THEN
+        append__tmp = append_
+        CALL cxios_set_file_append &
+      (file_hdl%daddr, append__tmp)
+      ENDIF
+
+      IF (PRESENT(comment_)) THEN
+        CALL cxios_set_file_comment &
+      (file_hdl%daddr, comment_, len(comment_))
+      ENDIF
+
+      IF (PRESENT(compression_level_)) THEN
+        CALL cxios_set_file_compression_level &
+      (file_hdl%daddr, compression_level_)
+      ENDIF
+
+      IF (PRESENT(convention_)) THEN
+        CALL cxios_set_file_convention &
+      (file_hdl%daddr, convention_, len(convention_))
+      ENDIF
+
+      IF (PRESENT(convention_str_)) THEN
+        CALL cxios_set_file_convention_str &
+      (file_hdl%daddr, convention_str_, len(convention_str_))
+      ENDIF
+
+      IF (PRESENT(cyclic_)) THEN
+        cyclic__tmp = cyclic_
+        CALL cxios_set_file_cyclic &
+      (file_hdl%daddr, cyclic__tmp)
+      ENDIF
+
+      IF (PRESENT(description_)) THEN
+        CALL cxios_set_file_description &
+      (file_hdl%daddr, description_, len(description_))
+      ENDIF
+
+      IF (PRESENT(enabled_)) THEN
+        enabled__tmp = enabled_
+        CALL cxios_set_file_enabled &
+      (file_hdl%daddr, enabled__tmp)
+      ENDIF
+
+      IF (PRESENT(format_)) THEN
+        CALL cxios_set_file_format &
+      (file_hdl%daddr, format_, len(format_))
+      ENDIF
+
+      IF (PRESENT(min_digits_)) THEN
+        CALL cxios_set_file_min_digits &
+      (file_hdl%daddr, min_digits_)
+      ENDIF
+
+      IF (PRESENT(mode_)) THEN
+        CALL cxios_set_file_mode &
+      (file_hdl%daddr, mode_, len(mode_))
+      ENDIF
+
+      IF (PRESENT(name_)) THEN
+        CALL cxios_set_file_name &
+      (file_hdl%daddr, name_, len(name_))
+      ENDIF
+
+      IF (PRESENT(name_suffix_)) THEN
+        CALL cxios_set_file_name_suffix &
+      (file_hdl%daddr, name_suffix_, len(name_suffix_))
+      ENDIF
+
+      IF (PRESENT(output_freq_)) THEN
+        CALL cxios_set_file_output_freq &
+      (file_hdl%daddr, output_freq_)
+      ENDIF
+
+      IF (PRESENT(output_level_)) THEN
+        CALL cxios_set_file_output_level &
+      (file_hdl%daddr, output_level_)
+      ENDIF
+
+      IF (PRESENT(par_access_)) THEN
+        CALL cxios_set_file_par_access &
+      (file_hdl%daddr, par_access_, len(par_access_))
+      ENDIF
+
+      IF (PRESENT(read_metadata_par_)) THEN
+        read_metadata_par__tmp = read_metadata_par_
+        CALL cxios_set_file_read_metadata_par &
+      (file_hdl%daddr, read_metadata_par__tmp)
+      ENDIF
+
+      IF (PRESENT(record_offset_)) THEN
+        CALL cxios_set_file_record_offset &
+      (file_hdl%daddr, record_offset_)
+      ENDIF
+
+      IF (PRESENT(split_end_offset_)) THEN
+        CALL cxios_set_file_split_end_offset &
+      (file_hdl%daddr, split_end_offset_)
+      ENDIF
+
+      IF (PRESENT(split_freq_)) THEN
+        CALL cxios_set_file_split_freq &
+      (file_hdl%daddr, split_freq_)
+      ENDIF
+
+      IF (PRESENT(split_freq_format_)) THEN
+        CALL cxios_set_file_split_freq_format &
+      (file_hdl%daddr, split_freq_format_, len(split_freq_format_))
+      ENDIF
+
+      IF (PRESENT(split_last_date_)) THEN
+        CALL cxios_set_file_split_last_date &
+      (file_hdl%daddr, split_last_date_, len(split_last_date_))
+      ENDIF
+
+      IF (PRESENT(split_start_offset_)) THEN
+        CALL cxios_set_file_split_start_offset &
+      (file_hdl%daddr, split_start_offset_)
+      ENDIF
+
+      IF (PRESENT(sync_freq_)) THEN
+        CALL cxios_set_file_sync_freq &
+      (file_hdl%daddr, sync_freq_)
+      ENDIF
+
+      IF (PRESENT(time_counter_)) THEN
+        CALL cxios_set_file_time_counter &
+      (file_hdl%daddr, time_counter_, len(time_counter_))
+      ENDIF
+
+      IF (PRESENT(time_counter_name_)) THEN
+        CALL cxios_set_file_time_counter_name &
+      (file_hdl%daddr, time_counter_name_, len(time_counter_name_))
+      ENDIF
+
+      IF (PRESENT(time_stamp_format_)) THEN
+        CALL cxios_set_file_time_stamp_format &
+      (file_hdl%daddr, time_stamp_format_, len(time_stamp_format_))
+      ENDIF
+
+      IF (PRESENT(time_stamp_name_)) THEN
+        CALL cxios_set_file_time_stamp_name &
+      (file_hdl%daddr, time_stamp_name_, len(time_stamp_name_))
+      ENDIF
+
+      IF (PRESENT(time_units_)) THEN
+        CALL cxios_set_file_time_units &
+      (file_hdl%daddr, time_units_, len(time_units_))
+      ENDIF
+
+      IF (PRESENT(timeseries_)) THEN
+        CALL cxios_set_file_timeseries &
+      (file_hdl%daddr, timeseries_, len(timeseries_))
+      ENDIF
+
+      IF (PRESENT(ts_prefix_)) THEN
+        CALL cxios_set_file_ts_prefix &
+      (file_hdl%daddr, ts_prefix_, len(ts_prefix_))
+      ENDIF
+
+      IF (PRESENT(type_)) THEN
+        CALL cxios_set_file_type &
+      (file_hdl%daddr, type_, len(type_))
+      ENDIF
+
+      IF (PRESENT(uuid_format_)) THEN
+        CALL cxios_set_file_uuid_format &
+      (file_hdl%daddr, uuid_format_, len(uuid_format_))
+      ENDIF
+
+      IF (PRESENT(uuid_name_)) THEN
+        CALL cxios_set_file_uuid_name &
+      (file_hdl%daddr, uuid_name_, len(uuid_name_))
+      ENDIF
+
+  END SUBROUTINE xios(set_file_attr_hdl_)
+
+  SUBROUTINE xios(get_file_attr)  &
+    ( file_id, append, comment, compression_level, convention, convention_str, cyclic, description  &
+    , enabled, format, min_digits, mode, name, name_suffix, output_freq, output_level, par_access  &
+    , read_metadata_par, record_offset, split_end_offset, split_freq, split_freq_format, split_last_date  &
+    , split_start_offset, sync_freq, time_counter, time_counter_name, time_stamp_format, time_stamp_name  &
+    , time_units, timeseries, ts_prefix, type, uuid_format, uuid_name )
+
+    IMPLICIT NONE
+      TYPE(txios(file))  :: file_hdl
+      CHARACTER(LEN=*), INTENT(IN) ::file_id
+      LOGICAL  , OPTIONAL, INTENT(OUT) :: append
+      LOGICAL (KIND=C_BOOL) :: append_tmp
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: comment
+      INTEGER  , OPTIONAL, INTENT(OUT) :: compression_level
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: convention
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: convention_str
+      LOGICAL  , OPTIONAL, INTENT(OUT) :: cyclic
+      LOGICAL (KIND=C_BOOL) :: cyclic_tmp
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: description
+      LOGICAL  , OPTIONAL, INTENT(OUT) :: enabled
+      LOGICAL (KIND=C_BOOL) :: enabled_tmp
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: format
+      INTEGER  , OPTIONAL, INTENT(OUT) :: min_digits
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: mode
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: name
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: name_suffix
+      TYPE(txios(duration))  , OPTIONAL, INTENT(OUT) :: output_freq
+      INTEGER  , OPTIONAL, INTENT(OUT) :: output_level
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: par_access
+      LOGICAL  , OPTIONAL, INTENT(OUT) :: read_metadata_par
+      LOGICAL (KIND=C_BOOL) :: read_metadata_par_tmp
+      INTEGER  , OPTIONAL, INTENT(OUT) :: record_offset
+      TYPE(txios(duration))  , OPTIONAL, INTENT(OUT) :: split_end_offset
+      TYPE(txios(duration))  , OPTIONAL, INTENT(OUT) :: split_freq
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: split_freq_format
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: split_last_date
+      TYPE(txios(duration))  , OPTIONAL, INTENT(OUT) :: split_start_offset
+      TYPE(txios(duration))  , OPTIONAL, INTENT(OUT) :: sync_freq
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: time_counter
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: time_counter_name
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: time_stamp_format
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: time_stamp_name
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: time_units
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: timeseries
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: ts_prefix
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: type
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: uuid_format
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: uuid_name
+
+      CALL xios(get_file_handle) &
+      (file_id,file_hdl)
+      CALL xios(get_file_attr_hdl_)   &
+      ( file_hdl, append, comment, compression_level, convention, convention_str, cyclic, description  &
+      , enabled, format, min_digits, mode, name, name_suffix, output_freq, output_level, par_access  &
+      , read_metadata_par, record_offset, split_end_offset, split_freq, split_freq_format, split_last_date  &
+      , split_start_offset, sync_freq, time_counter, time_counter_name, time_stamp_format, time_stamp_name  &
+      , time_units, timeseries, ts_prefix, type, uuid_format, uuid_name )
+
+  END SUBROUTINE xios(get_file_attr)
+
+  SUBROUTINE xios(get_file_attr_hdl)  &
+    ( file_hdl, append, comment, compression_level, convention, convention_str, cyclic, description  &
+    , enabled, format, min_digits, mode, name, name_suffix, output_freq, output_level, par_access  &
+    , read_metadata_par, record_offset, split_end_offset, split_freq, split_freq_format, split_last_date  &
+    , split_start_offset, sync_freq, time_counter, time_counter_name, time_stamp_format, time_stamp_name  &
+    , time_units, timeseries, ts_prefix, type, uuid_format, uuid_name )
+
+    IMPLICIT NONE
+      TYPE(txios(file)) , INTENT(IN) :: file_hdl
+      LOGICAL  , OPTIONAL, INTENT(OUT) :: append
+      LOGICAL (KIND=C_BOOL) :: append_tmp
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: comment
+      INTEGER  , OPTIONAL, INTENT(OUT) :: compression_level
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: convention
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: convention_str
+      LOGICAL  , OPTIONAL, INTENT(OUT) :: cyclic
+      LOGICAL (KIND=C_BOOL) :: cyclic_tmp
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: description
+      LOGICAL  , OPTIONAL, INTENT(OUT) :: enabled
+      LOGICAL (KIND=C_BOOL) :: enabled_tmp
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: format
+      INTEGER  , OPTIONAL, INTENT(OUT) :: min_digits
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: mode
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: name
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: name_suffix
+      TYPE(txios(duration))  , OPTIONAL, INTENT(OUT) :: output_freq
+      INTEGER  , OPTIONAL, INTENT(OUT) :: output_level
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: par_access
+      LOGICAL  , OPTIONAL, INTENT(OUT) :: read_metadata_par
+      LOGICAL (KIND=C_BOOL) :: read_metadata_par_tmp
+      INTEGER  , OPTIONAL, INTENT(OUT) :: record_offset
+      TYPE(txios(duration))  , OPTIONAL, INTENT(OUT) :: split_end_offset
+      TYPE(txios(duration))  , OPTIONAL, INTENT(OUT) :: split_freq
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: split_freq_format
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: split_last_date
+      TYPE(txios(duration))  , OPTIONAL, INTENT(OUT) :: split_start_offset
+      TYPE(txios(duration))  , OPTIONAL, INTENT(OUT) :: sync_freq
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: time_counter
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: time_counter_name
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: time_stamp_format
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: time_stamp_name
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: time_units
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: timeseries
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: ts_prefix
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: type
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: uuid_format
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: uuid_name
+
+      CALL xios(get_file_attr_hdl_)  &
+      ( file_hdl, append, comment, compression_level, convention, convention_str, cyclic, description  &
+      , enabled, format, min_digits, mode, name, name_suffix, output_freq, output_level, par_access  &
+      , read_metadata_par, record_offset, split_end_offset, split_freq, split_freq_format, split_last_date  &
+      , split_start_offset, sync_freq, time_counter, time_counter_name, time_stamp_format, time_stamp_name  &
+      , time_units, timeseries, ts_prefix, type, uuid_format, uuid_name )
+
+  END SUBROUTINE xios(get_file_attr_hdl)
+
+  SUBROUTINE xios(get_file_attr_hdl_)   &
+    ( file_hdl, append_, comment_, compression_level_, convention_, convention_str_, cyclic_, description_  &
+    , enabled_, format_, min_digits_, mode_, name_, name_suffix_, output_freq_, output_level_, par_access_  &
+    , read_metadata_par_, record_offset_, split_end_offset_, split_freq_, split_freq_format_, split_last_date_  &
+    , split_start_offset_, sync_freq_, time_counter_, time_counter_name_, time_stamp_format_, time_stamp_name_  &
+    , time_units_, timeseries_, ts_prefix_, type_, uuid_format_, uuid_name_ )
+
+    IMPLICIT NONE
+      TYPE(txios(file)) , INTENT(IN) :: file_hdl
+      LOGICAL  , OPTIONAL, INTENT(OUT) :: append_
+      LOGICAL (KIND=C_BOOL) :: append__tmp
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: comment_
+      INTEGER  , OPTIONAL, INTENT(OUT) :: compression_level_
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: convention_
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: convention_str_
+      LOGICAL  , OPTIONAL, INTENT(OUT) :: cyclic_
+      LOGICAL (KIND=C_BOOL) :: cyclic__tmp
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: description_
+      LOGICAL  , OPTIONAL, INTENT(OUT) :: enabled_
+      LOGICAL (KIND=C_BOOL) :: enabled__tmp
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: format_
+      INTEGER  , OPTIONAL, INTENT(OUT) :: min_digits_
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: mode_
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: name_
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: name_suffix_
+      TYPE(txios(duration))  , OPTIONAL, INTENT(OUT) :: output_freq_
+      INTEGER  , OPTIONAL, INTENT(OUT) :: output_level_
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: par_access_
+      LOGICAL  , OPTIONAL, INTENT(OUT) :: read_metadata_par_
+      LOGICAL (KIND=C_BOOL) :: read_metadata_par__tmp
+      INTEGER  , OPTIONAL, INTENT(OUT) :: record_offset_
+      TYPE(txios(duration))  , OPTIONAL, INTENT(OUT) :: split_end_offset_
+      TYPE(txios(duration))  , OPTIONAL, INTENT(OUT) :: split_freq_
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: split_freq_format_
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: split_last_date_
+      TYPE(txios(duration))  , OPTIONAL, INTENT(OUT) :: split_start_offset_
+      TYPE(txios(duration))  , OPTIONAL, INTENT(OUT) :: sync_freq_
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: time_counter_
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: time_counter_name_
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: time_stamp_format_
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: time_stamp_name_
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: time_units_
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: timeseries_
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: ts_prefix_
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: type_
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: uuid_format_
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: uuid_name_
+
+      IF (PRESENT(append_)) THEN
+        CALL cxios_get_file_append &
+      (file_hdl%daddr, append__tmp)
+        append_ = append__tmp
+      ENDIF
+
+      IF (PRESENT(comment_)) THEN
+        CALL cxios_get_file_comment &
+      (file_hdl%daddr, comment_, len(comment_))
+      ENDIF
+
+      IF (PRESENT(compression_level_)) THEN
+        CALL cxios_get_file_compression_level &
+      (file_hdl%daddr, compression_level_)
+      ENDIF
+
+      IF (PRESENT(convention_)) THEN
+        CALL cxios_get_file_convention &
+      (file_hdl%daddr, convention_, len(convention_))
+      ENDIF
+
+      IF (PRESENT(convention_str_)) THEN
+        CALL cxios_get_file_convention_str &
+      (file_hdl%daddr, convention_str_, len(convention_str_))
+      ENDIF
+
+      IF (PRESENT(cyclic_)) THEN
+        CALL cxios_get_file_cyclic &
+      (file_hdl%daddr, cyclic__tmp)
+        cyclic_ = cyclic__tmp
+      ENDIF
+
+      IF (PRESENT(description_)) THEN
+        CALL cxios_get_file_description &
+      (file_hdl%daddr, description_, len(description_))
+      ENDIF
+
+      IF (PRESENT(enabled_)) THEN
+        CALL cxios_get_file_enabled &
+      (file_hdl%daddr, enabled__tmp)
+        enabled_ = enabled__tmp
+      ENDIF
+
+      IF (PRESENT(format_)) THEN
+        CALL cxios_get_file_format &
+      (file_hdl%daddr, format_, len(format_))
+      ENDIF
+
+      IF (PRESENT(min_digits_)) THEN
+        CALL cxios_get_file_min_digits &
+      (file_hdl%daddr, min_digits_)
+      ENDIF
+
+      IF (PRESENT(mode_)) THEN
+        CALL cxios_get_file_mode &
+      (file_hdl%daddr, mode_, len(mode_))
+      ENDIF
+
+      IF (PRESENT(name_)) THEN
+        CALL cxios_get_file_name &
+      (file_hdl%daddr, name_, len(name_))
+      ENDIF
+
+      IF (PRESENT(name_suffix_)) THEN
+        CALL cxios_get_file_name_suffix &
+      (file_hdl%daddr, name_suffix_, len(name_suffix_))
+      ENDIF
+
+      IF (PRESENT(output_freq_)) THEN
+        CALL cxios_get_file_output_freq &
+      (file_hdl%daddr, output_freq_)
+      ENDIF
+
+      IF (PRESENT(output_level_)) THEN
+        CALL cxios_get_file_output_level &
+      (file_hdl%daddr, output_level_)
+      ENDIF
+
+      IF (PRESENT(par_access_)) THEN
+        CALL cxios_get_file_par_access &
+      (file_hdl%daddr, par_access_, len(par_access_))
+      ENDIF
+
+      IF (PRESENT(read_metadata_par_)) THEN
+        CALL cxios_get_file_read_metadata_par &
+      (file_hdl%daddr, read_metadata_par__tmp)
+        read_metadata_par_ = read_metadata_par__tmp
+      ENDIF
+
+      IF (PRESENT(record_offset_)) THEN
+        CALL cxios_get_file_record_offset &
+      (file_hdl%daddr, record_offset_)
+      ENDIF
+
+      IF (PRESENT(split_end_offset_)) THEN
+        CALL cxios_get_file_split_end_offset &
+      (file_hdl%daddr, split_end_offset_)
+      ENDIF
+
+      IF (PRESENT(split_freq_)) THEN
+        CALL cxios_get_file_split_freq &
+      (file_hdl%daddr, split_freq_)
+      ENDIF
+
+      IF (PRESENT(split_freq_format_)) THEN
+        CALL cxios_get_file_split_freq_format &
+      (file_hdl%daddr, split_freq_format_, len(split_freq_format_))
+      ENDIF
+
+      IF (PRESENT(split_last_date_)) THEN
+        CALL cxios_get_file_split_last_date &
+      (file_hdl%daddr, split_last_date_, len(split_last_date_))
+      ENDIF
+
+      IF (PRESENT(split_start_offset_)) THEN
+        CALL cxios_get_file_split_start_offset &
+      (file_hdl%daddr, split_start_offset_)
+      ENDIF
+
+      IF (PRESENT(sync_freq_)) THEN
+        CALL cxios_get_file_sync_freq &
+      (file_hdl%daddr, sync_freq_)
+      ENDIF
+
+      IF (PRESENT(time_counter_)) THEN
+        CALL cxios_get_file_time_counter &
+      (file_hdl%daddr, time_counter_, len(time_counter_))
+      ENDIF
+
+      IF (PRESENT(time_counter_name_)) THEN
+        CALL cxios_get_file_time_counter_name &
+      (file_hdl%daddr, time_counter_name_, len(time_counter_name_))
+      ENDIF
+
+      IF (PRESENT(time_stamp_format_)) THEN
+        CALL cxios_get_file_time_stamp_format &
+      (file_hdl%daddr, time_stamp_format_, len(time_stamp_format_))
+      ENDIF
+
+      IF (PRESENT(time_stamp_name_)) THEN
+        CALL cxios_get_file_time_stamp_name &
+      (file_hdl%daddr, time_stamp_name_, len(time_stamp_name_))
+      ENDIF
+
+      IF (PRESENT(time_units_)) THEN
+        CALL cxios_get_file_time_units &
+      (file_hdl%daddr, time_units_, len(time_units_))
+      ENDIF
+
+      IF (PRESENT(timeseries_)) THEN
+        CALL cxios_get_file_timeseries &
+      (file_hdl%daddr, timeseries_, len(timeseries_))
+      ENDIF
+
+      IF (PRESENT(ts_prefix_)) THEN
+        CALL cxios_get_file_ts_prefix &
+      (file_hdl%daddr, ts_prefix_, len(ts_prefix_))
+      ENDIF
+
+      IF (PRESENT(type_)) THEN
+        CALL cxios_get_file_type &
+      (file_hdl%daddr, type_, len(type_))
+      ENDIF
+
+      IF (PRESENT(uuid_format_)) THEN
+        CALL cxios_get_file_uuid_format &
+      (file_hdl%daddr, uuid_format_, len(uuid_format_))
+      ENDIF
+
+      IF (PRESENT(uuid_name_)) THEN
+        CALL cxios_get_file_uuid_name &
+      (file_hdl%daddr, uuid_name_, len(uuid_name_))
+      ENDIF
+
+  END SUBROUTINE xios(get_file_attr_hdl_)
+
+  SUBROUTINE xios(is_defined_file_attr)  &
+    ( file_id, append, comment, compression_level, convention, convention_str, cyclic, description  &
+    , enabled, format, min_digits, mode, name, name_suffix, output_freq, output_level, par_access  &
+    , read_metadata_par, record_offset, split_end_offset, split_freq, split_freq_format, split_last_date  &
+    , split_start_offset, sync_freq, time_counter, time_counter_name, time_stamp_format, time_stamp_name  &
+    , time_units, timeseries, ts_prefix, type, uuid_format, uuid_name )
+
+    IMPLICIT NONE
+      TYPE(txios(file))  :: file_hdl
+      CHARACTER(LEN=*), INTENT(IN) ::file_id
+      LOGICAL, OPTIONAL, INTENT(OUT) :: append
+      LOGICAL(KIND=C_BOOL) :: append_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: comment
+      LOGICAL(KIND=C_BOOL) :: comment_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: compression_level
+      LOGICAL(KIND=C_BOOL) :: compression_level_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: convention
+      LOGICAL(KIND=C_BOOL) :: convention_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: convention_str
+      LOGICAL(KIND=C_BOOL) :: convention_str_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: cyclic
+      LOGICAL(KIND=C_BOOL) :: cyclic_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: description
+      LOGICAL(KIND=C_BOOL) :: description_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: enabled
+      LOGICAL(KIND=C_BOOL) :: enabled_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: format
+      LOGICAL(KIND=C_BOOL) :: format_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: min_digits
+      LOGICAL(KIND=C_BOOL) :: min_digits_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: mode
+      LOGICAL(KIND=C_BOOL) :: mode_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: name
+      LOGICAL(KIND=C_BOOL) :: name_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: name_suffix
+      LOGICAL(KIND=C_BOOL) :: name_suffix_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: output_freq
+      LOGICAL(KIND=C_BOOL) :: output_freq_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: output_level
+      LOGICAL(KIND=C_BOOL) :: output_level_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: par_access
+      LOGICAL(KIND=C_BOOL) :: par_access_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: read_metadata_par
+      LOGICAL(KIND=C_BOOL) :: read_metadata_par_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: record_offset
+      LOGICAL(KIND=C_BOOL) :: record_offset_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: split_end_offset
+      LOGICAL(KIND=C_BOOL) :: split_end_offset_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: split_freq
+      LOGICAL(KIND=C_BOOL) :: split_freq_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: split_freq_format
+      LOGICAL(KIND=C_BOOL) :: split_freq_format_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: split_last_date
+      LOGICAL(KIND=C_BOOL) :: split_last_date_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: split_start_offset
+      LOGICAL(KIND=C_BOOL) :: split_start_offset_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: sync_freq
+      LOGICAL(KIND=C_BOOL) :: sync_freq_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: time_counter
+      LOGICAL(KIND=C_BOOL) :: time_counter_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: time_counter_name
+      LOGICAL(KIND=C_BOOL) :: time_counter_name_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: time_stamp_format
+      LOGICAL(KIND=C_BOOL) :: time_stamp_format_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: time_stamp_name
+      LOGICAL(KIND=C_BOOL) :: time_stamp_name_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: time_units
+      LOGICAL(KIND=C_BOOL) :: time_units_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: timeseries
+      LOGICAL(KIND=C_BOOL) :: timeseries_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: ts_prefix
+      LOGICAL(KIND=C_BOOL) :: ts_prefix_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: type
+      LOGICAL(KIND=C_BOOL) :: type_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: uuid_format
+      LOGICAL(KIND=C_BOOL) :: uuid_format_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: uuid_name
+      LOGICAL(KIND=C_BOOL) :: uuid_name_tmp
+
+      CALL xios(get_file_handle) &
+      (file_id,file_hdl)
+      CALL xios(is_defined_file_attr_hdl_)   &
+      ( file_hdl, append, comment, compression_level, convention, convention_str, cyclic, description  &
+      , enabled, format, min_digits, mode, name, name_suffix, output_freq, output_level, par_access  &
+      , read_metadata_par, record_offset, split_end_offset, split_freq, split_freq_format, split_last_date  &
+      , split_start_offset, sync_freq, time_counter, time_counter_name, time_stamp_format, time_stamp_name  &
+      , time_units, timeseries, ts_prefix, type, uuid_format, uuid_name )
+
+  END SUBROUTINE xios(is_defined_file_attr)
+
+  SUBROUTINE xios(is_defined_file_attr_hdl)  &
+    ( file_hdl, append, comment, compression_level, convention, convention_str, cyclic, description  &
+    , enabled, format, min_digits, mode, name, name_suffix, output_freq, output_level, par_access  &
+    , read_metadata_par, record_offset, split_end_offset, split_freq, split_freq_format, split_last_date  &
+    , split_start_offset, sync_freq, time_counter, time_counter_name, time_stamp_format, time_stamp_name  &
+    , time_units, timeseries, ts_prefix, type, uuid_format, uuid_name )
+
+    IMPLICIT NONE
+      TYPE(txios(file)) , INTENT(IN) :: file_hdl
+      LOGICAL, OPTIONAL, INTENT(OUT) :: append
+      LOGICAL(KIND=C_BOOL) :: append_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: comment
+      LOGICAL(KIND=C_BOOL) :: comment_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: compression_level
+      LOGICAL(KIND=C_BOOL) :: compression_level_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: convention
+      LOGICAL(KIND=C_BOOL) :: convention_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: convention_str
+      LOGICAL(KIND=C_BOOL) :: convention_str_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: cyclic
+      LOGICAL(KIND=C_BOOL) :: cyclic_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: description
+      LOGICAL(KIND=C_BOOL) :: description_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: enabled
+      LOGICAL(KIND=C_BOOL) :: enabled_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: format
+      LOGICAL(KIND=C_BOOL) :: format_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: min_digits
+      LOGICAL(KIND=C_BOOL) :: min_digits_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: mode
+      LOGICAL(KIND=C_BOOL) :: mode_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: name
+      LOGICAL(KIND=C_BOOL) :: name_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: name_suffix
+      LOGICAL(KIND=C_BOOL) :: name_suffix_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: output_freq
+      LOGICAL(KIND=C_BOOL) :: output_freq_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: output_level
+      LOGICAL(KIND=C_BOOL) :: output_level_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: par_access
+      LOGICAL(KIND=C_BOOL) :: par_access_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: read_metadata_par
+      LOGICAL(KIND=C_BOOL) :: read_metadata_par_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: record_offset
+      LOGICAL(KIND=C_BOOL) :: record_offset_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: split_end_offset
+      LOGICAL(KIND=C_BOOL) :: split_end_offset_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: split_freq
+      LOGICAL(KIND=C_BOOL) :: split_freq_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: split_freq_format
+      LOGICAL(KIND=C_BOOL) :: split_freq_format_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: split_last_date
+      LOGICAL(KIND=C_BOOL) :: split_last_date_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: split_start_offset
+      LOGICAL(KIND=C_BOOL) :: split_start_offset_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: sync_freq
+      LOGICAL(KIND=C_BOOL) :: sync_freq_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: time_counter
+      LOGICAL(KIND=C_BOOL) :: time_counter_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: time_counter_name
+      LOGICAL(KIND=C_BOOL) :: time_counter_name_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: time_stamp_format
+      LOGICAL(KIND=C_BOOL) :: time_stamp_format_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: time_stamp_name
+      LOGICAL(KIND=C_BOOL) :: time_stamp_name_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: time_units
+      LOGICAL(KIND=C_BOOL) :: time_units_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: timeseries
+      LOGICAL(KIND=C_BOOL) :: timeseries_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: ts_prefix
+      LOGICAL(KIND=C_BOOL) :: ts_prefix_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: type
+      LOGICAL(KIND=C_BOOL) :: type_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: uuid_format
+      LOGICAL(KIND=C_BOOL) :: uuid_format_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: uuid_name
+      LOGICAL(KIND=C_BOOL) :: uuid_name_tmp
+
+      CALL xios(is_defined_file_attr_hdl_)  &
+      ( file_hdl, append, comment, compression_level, convention, convention_str, cyclic, description  &
+      , enabled, format, min_digits, mode, name, name_suffix, output_freq, output_level, par_access  &
+      , read_metadata_par, record_offset, split_end_offset, split_freq, split_freq_format, split_last_date  &
+      , split_start_offset, sync_freq, time_counter, time_counter_name, time_stamp_format, time_stamp_name  &
+      , time_units, timeseries, ts_prefix, type, uuid_format, uuid_name )
+
+  END SUBROUTINE xios(is_defined_file_attr_hdl)
+
+  SUBROUTINE xios(is_defined_file_attr_hdl_)   &
+    ( file_hdl, append_, comment_, compression_level_, convention_, convention_str_, cyclic_, description_  &
+    , enabled_, format_, min_digits_, mode_, name_, name_suffix_, output_freq_, output_level_, par_access_  &
+    , read_metadata_par_, record_offset_, split_end_offset_, split_freq_, split_freq_format_, split_last_date_  &
+    , split_start_offset_, sync_freq_, time_counter_, time_counter_name_, time_stamp_format_, time_stamp_name_  &
+    , time_units_, timeseries_, ts_prefix_, type_, uuid_format_, uuid_name_ )
+
+    IMPLICIT NONE
+      TYPE(txios(file)) , INTENT(IN) :: file_hdl
+      LOGICAL, OPTIONAL, INTENT(OUT) :: append_
+      LOGICAL(KIND=C_BOOL) :: append__tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: comment_
+      LOGICAL(KIND=C_BOOL) :: comment__tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: compression_level_
+      LOGICAL(KIND=C_BOOL) :: compression_level__tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: convention_
+      LOGICAL(KIND=C_BOOL) :: convention__tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: convention_str_
+      LOGICAL(KIND=C_BOOL) :: convention_str__tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: cyclic_
+      LOGICAL(KIND=C_BOOL) :: cyclic__tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: description_
+      LOGICAL(KIND=C_BOOL) :: description__tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: enabled_
+      LOGICAL(KIND=C_BOOL) :: enabled__tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: format_
+      LOGICAL(KIND=C_BOOL) :: format__tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: min_digits_
+      LOGICAL(KIND=C_BOOL) :: min_digits__tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: mode_
+      LOGICAL(KIND=C_BOOL) :: mode__tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: name_
+      LOGICAL(KIND=C_BOOL) :: name__tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: name_suffix_
+      LOGICAL(KIND=C_BOOL) :: name_suffix__tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: output_freq_
+      LOGICAL(KIND=C_BOOL) :: output_freq__tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: output_level_
+      LOGICAL(KIND=C_BOOL) :: output_level__tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: par_access_
+      LOGICAL(KIND=C_BOOL) :: par_access__tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: read_metadata_par_
+      LOGICAL(KIND=C_BOOL) :: read_metadata_par__tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: record_offset_
+      LOGICAL(KIND=C_BOOL) :: record_offset__tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: split_end_offset_
+      LOGICAL(KIND=C_BOOL) :: split_end_offset__tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: split_freq_
+      LOGICAL(KIND=C_BOOL) :: split_freq__tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: split_freq_format_
+      LOGICAL(KIND=C_BOOL) :: split_freq_format__tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: split_last_date_
+      LOGICAL(KIND=C_BOOL) :: split_last_date__tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: split_start_offset_
+      LOGICAL(KIND=C_BOOL) :: split_start_offset__tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: sync_freq_
+      LOGICAL(KIND=C_BOOL) :: sync_freq__tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: time_counter_
+      LOGICAL(KIND=C_BOOL) :: time_counter__tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: time_counter_name_
+      LOGICAL(KIND=C_BOOL) :: time_counter_name__tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: time_stamp_format_
+      LOGICAL(KIND=C_BOOL) :: time_stamp_format__tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: time_stamp_name_
+      LOGICAL(KIND=C_BOOL) :: time_stamp_name__tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: time_units_
+      LOGICAL(KIND=C_BOOL) :: time_units__tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: timeseries_
+      LOGICAL(KIND=C_BOOL) :: timeseries__tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: ts_prefix_
+      LOGICAL(KIND=C_BOOL) :: ts_prefix__tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: type_
+      LOGICAL(KIND=C_BOOL) :: type__tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: uuid_format_
+      LOGICAL(KIND=C_BOOL) :: uuid_format__tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: uuid_name_
+      LOGICAL(KIND=C_BOOL) :: uuid_name__tmp
+
+      IF (PRESENT(append_)) THEN
+        append__tmp = cxios_is_defined_file_append &
+      (file_hdl%daddr)
+        append_ = append__tmp
+      ENDIF
+
+      IF (PRESENT(comment_)) THEN
+        comment__tmp = cxios_is_defined_file_comment &
+      (file_hdl%daddr)
+        comment_ = comment__tmp
+      ENDIF
+
+      IF (PRESENT(compression_level_)) THEN
+        compression_level__tmp = cxios_is_defined_file_compression_level &
+      (file_hdl%daddr)
+        compression_level_ = compression_level__tmp
+      ENDIF
+
+      IF (PRESENT(convention_)) THEN
+        convention__tmp = cxios_is_defined_file_convention &
+      (file_hdl%daddr)
+        convention_ = convention__tmp
+      ENDIF
+
+      IF (PRESENT(convention_str_)) THEN
+        convention_str__tmp = cxios_is_defined_file_convention_str &
+      (file_hdl%daddr)
+        convention_str_ = convention_str__tmp
+      ENDIF
+
+      IF (PRESENT(cyclic_)) THEN
+        cyclic__tmp = cxios_is_defined_file_cyclic &
+      (file_hdl%daddr)
+        cyclic_ = cyclic__tmp
+      ENDIF
+
+      IF (PRESENT(description_)) THEN
+        description__tmp = cxios_is_defined_file_description &
+      (file_hdl%daddr)
+        description_ = description__tmp
+      ENDIF
+
+      IF (PRESENT(enabled_)) THEN
+        enabled__tmp = cxios_is_defined_file_enabled &
+      (file_hdl%daddr)
+        enabled_ = enabled__tmp
+      ENDIF
+
+      IF (PRESENT(format_)) THEN
+        format__tmp = cxios_is_defined_file_format &
+      (file_hdl%daddr)
+        format_ = format__tmp
+      ENDIF
+
+      IF (PRESENT(min_digits_)) THEN
+        min_digits__tmp = cxios_is_defined_file_min_digits &
+      (file_hdl%daddr)
+        min_digits_ = min_digits__tmp
+      ENDIF
+
+      IF (PRESENT(mode_)) THEN
+        mode__tmp = cxios_is_defined_file_mode &
+      (file_hdl%daddr)
+        mode_ = mode__tmp
+      ENDIF
+
+      IF (PRESENT(name_)) THEN
+        name__tmp = cxios_is_defined_file_name &
+      (file_hdl%daddr)
+        name_ = name__tmp
+      ENDIF
+
+      IF (PRESENT(name_suffix_)) THEN
+        name_suffix__tmp = cxios_is_defined_file_name_suffix &
+      (file_hdl%daddr)
+        name_suffix_ = name_suffix__tmp
+      ENDIF
+
+      IF (PRESENT(output_freq_)) THEN
+        output_freq__tmp = cxios_is_defined_file_output_freq &
+      (file_hdl%daddr)
+        output_freq_ = output_freq__tmp
+      ENDIF
+
+      IF (PRESENT(output_level_)) THEN
+        output_level__tmp = cxios_is_defined_file_output_level &
+      (file_hdl%daddr)
+        output_level_ = output_level__tmp
+      ENDIF
+
+      IF (PRESENT(par_access_)) THEN
+        par_access__tmp = cxios_is_defined_file_par_access &
+      (file_hdl%daddr)
+        par_access_ = par_access__tmp
+      ENDIF
+
+      IF (PRESENT(read_metadata_par_)) THEN
+        read_metadata_par__tmp = cxios_is_defined_file_read_metadata_par &
+      (file_hdl%daddr)
+        read_metadata_par_ = read_metadata_par__tmp
+      ENDIF
+
+      IF (PRESENT(record_offset_)) THEN
+        record_offset__tmp = cxios_is_defined_file_record_offset &
+      (file_hdl%daddr)
+        record_offset_ = record_offset__tmp
+      ENDIF
+
+      IF (PRESENT(split_end_offset_)) THEN
+        split_end_offset__tmp = cxios_is_defined_file_split_end_offset &
+      (file_hdl%daddr)
+        split_end_offset_ = split_end_offset__tmp
+      ENDIF
+
+      IF (PRESENT(split_freq_)) THEN
+        split_freq__tmp = cxios_is_defined_file_split_freq &
+      (file_hdl%daddr)
+        split_freq_ = split_freq__tmp
+      ENDIF
+
+      IF (PRESENT(split_freq_format_)) THEN
+        split_freq_format__tmp = cxios_is_defined_file_split_freq_format &
+      (file_hdl%daddr)
+        split_freq_format_ = split_freq_format__tmp
+      ENDIF
+
+      IF (PRESENT(split_last_date_)) THEN
+        split_last_date__tmp = cxios_is_defined_file_split_last_date &
+      (file_hdl%daddr)
+        split_last_date_ = split_last_date__tmp
+      ENDIF
+
+      IF (PRESENT(split_start_offset_)) THEN
+        split_start_offset__tmp = cxios_is_defined_file_split_start_offset &
+      (file_hdl%daddr)
+        split_start_offset_ = split_start_offset__tmp
+      ENDIF
+
+      IF (PRESENT(sync_freq_)) THEN
+        sync_freq__tmp = cxios_is_defined_file_sync_freq &
+      (file_hdl%daddr)
+        sync_freq_ = sync_freq__tmp
+      ENDIF
+
+      IF (PRESENT(time_counter_)) THEN
+        time_counter__tmp = cxios_is_defined_file_time_counter &
+      (file_hdl%daddr)
+        time_counter_ = time_counter__tmp
+      ENDIF
+
+      IF (PRESENT(time_counter_name_)) THEN
+        time_counter_name__tmp = cxios_is_defined_file_time_counter_name &
+      (file_hdl%daddr)
+        time_counter_name_ = time_counter_name__tmp
+      ENDIF
+
+      IF (PRESENT(time_stamp_format_)) THEN
+        time_stamp_format__tmp = cxios_is_defined_file_time_stamp_format &
+      (file_hdl%daddr)
+        time_stamp_format_ = time_stamp_format__tmp
+      ENDIF
+
+      IF (PRESENT(time_stamp_name_)) THEN
+        time_stamp_name__tmp = cxios_is_defined_file_time_stamp_name &
+      (file_hdl%daddr)
+        time_stamp_name_ = time_stamp_name__tmp
+      ENDIF
+
+      IF (PRESENT(time_units_)) THEN
+        time_units__tmp = cxios_is_defined_file_time_units &
+      (file_hdl%daddr)
+        time_units_ = time_units__tmp
+      ENDIF
+
+      IF (PRESENT(timeseries_)) THEN
+        timeseries__tmp = cxios_is_defined_file_timeseries &
+      (file_hdl%daddr)
+        timeseries_ = timeseries__tmp
+      ENDIF
+
+      IF (PRESENT(ts_prefix_)) THEN
+        ts_prefix__tmp = cxios_is_defined_file_ts_prefix &
+      (file_hdl%daddr)
+        ts_prefix_ = ts_prefix__tmp
+      ENDIF
+
+      IF (PRESENT(type_)) THEN
+        type__tmp = cxios_is_defined_file_type &
+      (file_hdl%daddr)
+        type_ = type__tmp
+      ENDIF
+
+      IF (PRESENT(uuid_format_)) THEN
+        uuid_format__tmp = cxios_is_defined_file_uuid_format &
+      (file_hdl%daddr)
+        uuid_format_ = uuid_format__tmp
+      ENDIF
+
+      IF (PRESENT(uuid_name_)) THEN
+        uuid_name__tmp = cxios_is_defined_file_uuid_name &
+      (file_hdl%daddr)
+        uuid_name_ = uuid_name__tmp
+      ENDIF
+
+  END SUBROUTINE xios(is_defined_file_attr_hdl_)
+
+END MODULE ifile_attr
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/fortran_attr/ifilegroup_attr.F90
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/fortran_attr/ifilegroup_attr.F90	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/fortran_attr/ifilegroup_attr.F90	(revision 1749)
@@ -0,0 +1,1187 @@
+! * ************************************************************************** *
+! *               Interface auto generated - do not modify                     *
+! * ************************************************************************** *
+#include "xios_fortran_prefix.hpp"
+
+MODULE ifilegroup_attr
+  USE, INTRINSIC :: ISO_C_BINDING
+  USE ifile
+  USE filegroup_interface_attr
+
+CONTAINS
+
+  SUBROUTINE xios(set_filegroup_attr)  &
+    ( filegroup_id, append, comment, compression_level, convention, convention_str, cyclic, description  &
+    , enabled, format, group_ref, min_digits, mode, name, name_suffix, output_freq, output_level  &
+    , par_access, read_metadata_par, record_offset, split_end_offset, split_freq, split_freq_format  &
+    , split_last_date, split_start_offset, sync_freq, time_counter, time_counter_name, time_stamp_format  &
+    , time_stamp_name, time_units, timeseries, ts_prefix, type, uuid_format, uuid_name )
+
+    IMPLICIT NONE
+      TYPE(txios(filegroup))  :: filegroup_hdl
+      CHARACTER(LEN=*), INTENT(IN) ::filegroup_id
+      LOGICAL  , OPTIONAL, INTENT(IN) :: append
+      LOGICAL (KIND=C_BOOL) :: append_tmp
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: comment
+      INTEGER  , OPTIONAL, INTENT(IN) :: compression_level
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: convention
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: convention_str
+      LOGICAL  , OPTIONAL, INTENT(IN) :: cyclic
+      LOGICAL (KIND=C_BOOL) :: cyclic_tmp
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: description
+      LOGICAL  , OPTIONAL, INTENT(IN) :: enabled
+      LOGICAL (KIND=C_BOOL) :: enabled_tmp
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: format
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: group_ref
+      INTEGER  , OPTIONAL, INTENT(IN) :: min_digits
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: mode
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: name
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: name_suffix
+      TYPE(txios(duration))  , OPTIONAL, INTENT(IN) :: output_freq
+      INTEGER  , OPTIONAL, INTENT(IN) :: output_level
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: par_access
+      LOGICAL  , OPTIONAL, INTENT(IN) :: read_metadata_par
+      LOGICAL (KIND=C_BOOL) :: read_metadata_par_tmp
+      INTEGER  , OPTIONAL, INTENT(IN) :: record_offset
+      TYPE(txios(duration))  , OPTIONAL, INTENT(IN) :: split_end_offset
+      TYPE(txios(duration))  , OPTIONAL, INTENT(IN) :: split_freq
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: split_freq_format
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: split_last_date
+      TYPE(txios(duration))  , OPTIONAL, INTENT(IN) :: split_start_offset
+      TYPE(txios(duration))  , OPTIONAL, INTENT(IN) :: sync_freq
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: time_counter
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: time_counter_name
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: time_stamp_format
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: time_stamp_name
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: time_units
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: timeseries
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: ts_prefix
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: type
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: uuid_format
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: uuid_name
+
+      CALL xios(get_filegroup_handle) &
+      (filegroup_id,filegroup_hdl)
+      CALL xios(set_filegroup_attr_hdl_)   &
+      ( filegroup_hdl, append, comment, compression_level, convention, convention_str, cyclic, description  &
+      , enabled, format, group_ref, min_digits, mode, name, name_suffix, output_freq, output_level  &
+      , par_access, read_metadata_par, record_offset, split_end_offset, split_freq, split_freq_format  &
+      , split_last_date, split_start_offset, sync_freq, time_counter, time_counter_name, time_stamp_format  &
+      , time_stamp_name, time_units, timeseries, ts_prefix, type, uuid_format, uuid_name )
+
+  END SUBROUTINE xios(set_filegroup_attr)
+
+  SUBROUTINE xios(set_filegroup_attr_hdl)  &
+    ( filegroup_hdl, append, comment, compression_level, convention, convention_str, cyclic, description  &
+    , enabled, format, group_ref, min_digits, mode, name, name_suffix, output_freq, output_level  &
+    , par_access, read_metadata_par, record_offset, split_end_offset, split_freq, split_freq_format  &
+    , split_last_date, split_start_offset, sync_freq, time_counter, time_counter_name, time_stamp_format  &
+    , time_stamp_name, time_units, timeseries, ts_prefix, type, uuid_format, uuid_name )
+
+    IMPLICIT NONE
+      TYPE(txios(filegroup)) , INTENT(IN) :: filegroup_hdl
+      LOGICAL  , OPTIONAL, INTENT(IN) :: append
+      LOGICAL (KIND=C_BOOL) :: append_tmp
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: comment
+      INTEGER  , OPTIONAL, INTENT(IN) :: compression_level
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: convention
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: convention_str
+      LOGICAL  , OPTIONAL, INTENT(IN) :: cyclic
+      LOGICAL (KIND=C_BOOL) :: cyclic_tmp
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: description
+      LOGICAL  , OPTIONAL, INTENT(IN) :: enabled
+      LOGICAL (KIND=C_BOOL) :: enabled_tmp
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: format
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: group_ref
+      INTEGER  , OPTIONAL, INTENT(IN) :: min_digits
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: mode
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: name
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: name_suffix
+      TYPE(txios(duration))  , OPTIONAL, INTENT(IN) :: output_freq
+      INTEGER  , OPTIONAL, INTENT(IN) :: output_level
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: par_access
+      LOGICAL  , OPTIONAL, INTENT(IN) :: read_metadata_par
+      LOGICAL (KIND=C_BOOL) :: read_metadata_par_tmp
+      INTEGER  , OPTIONAL, INTENT(IN) :: record_offset
+      TYPE(txios(duration))  , OPTIONAL, INTENT(IN) :: split_end_offset
+      TYPE(txios(duration))  , OPTIONAL, INTENT(IN) :: split_freq
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: split_freq_format
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: split_last_date
+      TYPE(txios(duration))  , OPTIONAL, INTENT(IN) :: split_start_offset
+      TYPE(txios(duration))  , OPTIONAL, INTENT(IN) :: sync_freq
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: time_counter
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: time_counter_name
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: time_stamp_format
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: time_stamp_name
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: time_units
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: timeseries
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: ts_prefix
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: type
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: uuid_format
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: uuid_name
+
+      CALL xios(set_filegroup_attr_hdl_)  &
+      ( filegroup_hdl, append, comment, compression_level, convention, convention_str, cyclic, description  &
+      , enabled, format, group_ref, min_digits, mode, name, name_suffix, output_freq, output_level  &
+      , par_access, read_metadata_par, record_offset, split_end_offset, split_freq, split_freq_format  &
+      , split_last_date, split_start_offset, sync_freq, time_counter, time_counter_name, time_stamp_format  &
+      , time_stamp_name, time_units, timeseries, ts_prefix, type, uuid_format, uuid_name )
+
+  END SUBROUTINE xios(set_filegroup_attr_hdl)
+
+  SUBROUTINE xios(set_filegroup_attr_hdl_)   &
+    ( filegroup_hdl, append_, comment_, compression_level_, convention_, convention_str_, cyclic_  &
+    , description_, enabled_, format_, group_ref_, min_digits_, mode_, name_, name_suffix_, output_freq_  &
+    , output_level_, par_access_, read_metadata_par_, record_offset_, split_end_offset_, split_freq_  &
+    , split_freq_format_, split_last_date_, split_start_offset_, sync_freq_, time_counter_, time_counter_name_  &
+    , time_stamp_format_, time_stamp_name_, time_units_, timeseries_, ts_prefix_, type_, uuid_format_  &
+    , uuid_name_ )
+
+    IMPLICIT NONE
+      TYPE(txios(filegroup)) , INTENT(IN) :: filegroup_hdl
+      LOGICAL  , OPTIONAL, INTENT(IN) :: append_
+      LOGICAL (KIND=C_BOOL) :: append__tmp
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: comment_
+      INTEGER  , OPTIONAL, INTENT(IN) :: compression_level_
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: convention_
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: convention_str_
+      LOGICAL  , OPTIONAL, INTENT(IN) :: cyclic_
+      LOGICAL (KIND=C_BOOL) :: cyclic__tmp
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: description_
+      LOGICAL  , OPTIONAL, INTENT(IN) :: enabled_
+      LOGICAL (KIND=C_BOOL) :: enabled__tmp
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: format_
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: group_ref_
+      INTEGER  , OPTIONAL, INTENT(IN) :: min_digits_
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: mode_
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: name_
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: name_suffix_
+      TYPE(txios(duration))  , OPTIONAL, INTENT(IN) :: output_freq_
+      INTEGER  , OPTIONAL, INTENT(IN) :: output_level_
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: par_access_
+      LOGICAL  , OPTIONAL, INTENT(IN) :: read_metadata_par_
+      LOGICAL (KIND=C_BOOL) :: read_metadata_par__tmp
+      INTEGER  , OPTIONAL, INTENT(IN) :: record_offset_
+      TYPE(txios(duration))  , OPTIONAL, INTENT(IN) :: split_end_offset_
+      TYPE(txios(duration))  , OPTIONAL, INTENT(IN) :: split_freq_
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: split_freq_format_
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: split_last_date_
+      TYPE(txios(duration))  , OPTIONAL, INTENT(IN) :: split_start_offset_
+      TYPE(txios(duration))  , OPTIONAL, INTENT(IN) :: sync_freq_
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: time_counter_
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: time_counter_name_
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: time_stamp_format_
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: time_stamp_name_
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: time_units_
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: timeseries_
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: ts_prefix_
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: type_
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: uuid_format_
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: uuid_name_
+
+      IF (PRESENT(append_)) THEN
+        append__tmp = append_
+        CALL cxios_set_filegroup_append &
+      (filegroup_hdl%daddr, append__tmp)
+      ENDIF
+
+      IF (PRESENT(comment_)) THEN
+        CALL cxios_set_filegroup_comment &
+      (filegroup_hdl%daddr, comment_, len(comment_))
+      ENDIF
+
+      IF (PRESENT(compression_level_)) THEN
+        CALL cxios_set_filegroup_compression_level &
+      (filegroup_hdl%daddr, compression_level_)
+      ENDIF
+
+      IF (PRESENT(convention_)) THEN
+        CALL cxios_set_filegroup_convention &
+      (filegroup_hdl%daddr, convention_, len(convention_))
+      ENDIF
+
+      IF (PRESENT(convention_str_)) THEN
+        CALL cxios_set_filegroup_convention_str &
+      (filegroup_hdl%daddr, convention_str_, len(convention_str_))
+      ENDIF
+
+      IF (PRESENT(cyclic_)) THEN
+        cyclic__tmp = cyclic_
+        CALL cxios_set_filegroup_cyclic &
+      (filegroup_hdl%daddr, cyclic__tmp)
+      ENDIF
+
+      IF (PRESENT(description_)) THEN
+        CALL cxios_set_filegroup_description &
+      (filegroup_hdl%daddr, description_, len(description_))
+      ENDIF
+
+      IF (PRESENT(enabled_)) THEN
+        enabled__tmp = enabled_
+        CALL cxios_set_filegroup_enabled &
+      (filegroup_hdl%daddr, enabled__tmp)
+      ENDIF
+
+      IF (PRESENT(format_)) THEN
+        CALL cxios_set_filegroup_format &
+      (filegroup_hdl%daddr, format_, len(format_))
+      ENDIF
+
+      IF (PRESENT(group_ref_)) THEN
+        CALL cxios_set_filegroup_group_ref &
+      (filegroup_hdl%daddr, group_ref_, len(group_ref_))
+      ENDIF
+
+      IF (PRESENT(min_digits_)) THEN
+        CALL cxios_set_filegroup_min_digits &
+      (filegroup_hdl%daddr, min_digits_)
+      ENDIF
+
+      IF (PRESENT(mode_)) THEN
+        CALL cxios_set_filegroup_mode &
+      (filegroup_hdl%daddr, mode_, len(mode_))
+      ENDIF
+
+      IF (PRESENT(name_)) THEN
+        CALL cxios_set_filegroup_name &
+      (filegroup_hdl%daddr, name_, len(name_))
+      ENDIF
+
+      IF (PRESENT(name_suffix_)) THEN
+        CALL cxios_set_filegroup_name_suffix &
+      (filegroup_hdl%daddr, name_suffix_, len(name_suffix_))
+      ENDIF
+
+      IF (PRESENT(output_freq_)) THEN
+        CALL cxios_set_filegroup_output_freq &
+      (filegroup_hdl%daddr, output_freq_)
+      ENDIF
+
+      IF (PRESENT(output_level_)) THEN
+        CALL cxios_set_filegroup_output_level &
+      (filegroup_hdl%daddr, output_level_)
+      ENDIF
+
+      IF (PRESENT(par_access_)) THEN
+        CALL cxios_set_filegroup_par_access &
+      (filegroup_hdl%daddr, par_access_, len(par_access_))
+      ENDIF
+
+      IF (PRESENT(read_metadata_par_)) THEN
+        read_metadata_par__tmp = read_metadata_par_
+        CALL cxios_set_filegroup_read_metadata_par &
+      (filegroup_hdl%daddr, read_metadata_par__tmp)
+      ENDIF
+
+      IF (PRESENT(record_offset_)) THEN
+        CALL cxios_set_filegroup_record_offset &
+      (filegroup_hdl%daddr, record_offset_)
+      ENDIF
+
+      IF (PRESENT(split_end_offset_)) THEN
+        CALL cxios_set_filegroup_split_end_offset &
+      (filegroup_hdl%daddr, split_end_offset_)
+      ENDIF
+
+      IF (PRESENT(split_freq_)) THEN
+        CALL cxios_set_filegroup_split_freq &
+      (filegroup_hdl%daddr, split_freq_)
+      ENDIF
+
+      IF (PRESENT(split_freq_format_)) THEN
+        CALL cxios_set_filegroup_split_freq_format &
+      (filegroup_hdl%daddr, split_freq_format_, len(split_freq_format_))
+      ENDIF
+
+      IF (PRESENT(split_last_date_)) THEN
+        CALL cxios_set_filegroup_split_last_date &
+      (filegroup_hdl%daddr, split_last_date_, len(split_last_date_))
+      ENDIF
+
+      IF (PRESENT(split_start_offset_)) THEN
+        CALL cxios_set_filegroup_split_start_offset &
+      (filegroup_hdl%daddr, split_start_offset_)
+      ENDIF
+
+      IF (PRESENT(sync_freq_)) THEN
+        CALL cxios_set_filegroup_sync_freq &
+      (filegroup_hdl%daddr, sync_freq_)
+      ENDIF
+
+      IF (PRESENT(time_counter_)) THEN
+        CALL cxios_set_filegroup_time_counter &
+      (filegroup_hdl%daddr, time_counter_, len(time_counter_))
+      ENDIF
+
+      IF (PRESENT(time_counter_name_)) THEN
+        CALL cxios_set_filegroup_time_counter_name &
+      (filegroup_hdl%daddr, time_counter_name_, len(time_counter_name_))
+      ENDIF
+
+      IF (PRESENT(time_stamp_format_)) THEN
+        CALL cxios_set_filegroup_time_stamp_format &
+      (filegroup_hdl%daddr, time_stamp_format_, len(time_stamp_format_))
+      ENDIF
+
+      IF (PRESENT(time_stamp_name_)) THEN
+        CALL cxios_set_filegroup_time_stamp_name &
+      (filegroup_hdl%daddr, time_stamp_name_, len(time_stamp_name_))
+      ENDIF
+
+      IF (PRESENT(time_units_)) THEN
+        CALL cxios_set_filegroup_time_units &
+      (filegroup_hdl%daddr, time_units_, len(time_units_))
+      ENDIF
+
+      IF (PRESENT(timeseries_)) THEN
+        CALL cxios_set_filegroup_timeseries &
+      (filegroup_hdl%daddr, timeseries_, len(timeseries_))
+      ENDIF
+
+      IF (PRESENT(ts_prefix_)) THEN
+        CALL cxios_set_filegroup_ts_prefix &
+      (filegroup_hdl%daddr, ts_prefix_, len(ts_prefix_))
+      ENDIF
+
+      IF (PRESENT(type_)) THEN
+        CALL cxios_set_filegroup_type &
+      (filegroup_hdl%daddr, type_, len(type_))
+      ENDIF
+
+      IF (PRESENT(uuid_format_)) THEN
+        CALL cxios_set_filegroup_uuid_format &
+      (filegroup_hdl%daddr, uuid_format_, len(uuid_format_))
+      ENDIF
+
+      IF (PRESENT(uuid_name_)) THEN
+        CALL cxios_set_filegroup_uuid_name &
+      (filegroup_hdl%daddr, uuid_name_, len(uuid_name_))
+      ENDIF
+
+  END SUBROUTINE xios(set_filegroup_attr_hdl_)
+
+  SUBROUTINE xios(get_filegroup_attr)  &
+    ( filegroup_id, append, comment, compression_level, convention, convention_str, cyclic, description  &
+    , enabled, format, group_ref, min_digits, mode, name, name_suffix, output_freq, output_level  &
+    , par_access, read_metadata_par, record_offset, split_end_offset, split_freq, split_freq_format  &
+    , split_last_date, split_start_offset, sync_freq, time_counter, time_counter_name, time_stamp_format  &
+    , time_stamp_name, time_units, timeseries, ts_prefix, type, uuid_format, uuid_name )
+
+    IMPLICIT NONE
+      TYPE(txios(filegroup))  :: filegroup_hdl
+      CHARACTER(LEN=*), INTENT(IN) ::filegroup_id
+      LOGICAL  , OPTIONAL, INTENT(OUT) :: append
+      LOGICAL (KIND=C_BOOL) :: append_tmp
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: comment
+      INTEGER  , OPTIONAL, INTENT(OUT) :: compression_level
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: convention
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: convention_str
+      LOGICAL  , OPTIONAL, INTENT(OUT) :: cyclic
+      LOGICAL (KIND=C_BOOL) :: cyclic_tmp
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: description
+      LOGICAL  , OPTIONAL, INTENT(OUT) :: enabled
+      LOGICAL (KIND=C_BOOL) :: enabled_tmp
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: format
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: group_ref
+      INTEGER  , OPTIONAL, INTENT(OUT) :: min_digits
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: mode
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: name
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: name_suffix
+      TYPE(txios(duration))  , OPTIONAL, INTENT(OUT) :: output_freq
+      INTEGER  , OPTIONAL, INTENT(OUT) :: output_level
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: par_access
+      LOGICAL  , OPTIONAL, INTENT(OUT) :: read_metadata_par
+      LOGICAL (KIND=C_BOOL) :: read_metadata_par_tmp
+      INTEGER  , OPTIONAL, INTENT(OUT) :: record_offset
+      TYPE(txios(duration))  , OPTIONAL, INTENT(OUT) :: split_end_offset
+      TYPE(txios(duration))  , OPTIONAL, INTENT(OUT) :: split_freq
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: split_freq_format
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: split_last_date
+      TYPE(txios(duration))  , OPTIONAL, INTENT(OUT) :: split_start_offset
+      TYPE(txios(duration))  , OPTIONAL, INTENT(OUT) :: sync_freq
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: time_counter
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: time_counter_name
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: time_stamp_format
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: time_stamp_name
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: time_units
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: timeseries
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: ts_prefix
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: type
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: uuid_format
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: uuid_name
+
+      CALL xios(get_filegroup_handle) &
+      (filegroup_id,filegroup_hdl)
+      CALL xios(get_filegroup_attr_hdl_)   &
+      ( filegroup_hdl, append, comment, compression_level, convention, convention_str, cyclic, description  &
+      , enabled, format, group_ref, min_digits, mode, name, name_suffix, output_freq, output_level  &
+      , par_access, read_metadata_par, record_offset, split_end_offset, split_freq, split_freq_format  &
+      , split_last_date, split_start_offset, sync_freq, time_counter, time_counter_name, time_stamp_format  &
+      , time_stamp_name, time_units, timeseries, ts_prefix, type, uuid_format, uuid_name )
+
+  END SUBROUTINE xios(get_filegroup_attr)
+
+  SUBROUTINE xios(get_filegroup_attr_hdl)  &
+    ( filegroup_hdl, append, comment, compression_level, convention, convention_str, cyclic, description  &
+    , enabled, format, group_ref, min_digits, mode, name, name_suffix, output_freq, output_level  &
+    , par_access, read_metadata_par, record_offset, split_end_offset, split_freq, split_freq_format  &
+    , split_last_date, split_start_offset, sync_freq, time_counter, time_counter_name, time_stamp_format  &
+    , time_stamp_name, time_units, timeseries, ts_prefix, type, uuid_format, uuid_name )
+
+    IMPLICIT NONE
+      TYPE(txios(filegroup)) , INTENT(IN) :: filegroup_hdl
+      LOGICAL  , OPTIONAL, INTENT(OUT) :: append
+      LOGICAL (KIND=C_BOOL) :: append_tmp
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: comment
+      INTEGER  , OPTIONAL, INTENT(OUT) :: compression_level
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: convention
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: convention_str
+      LOGICAL  , OPTIONAL, INTENT(OUT) :: cyclic
+      LOGICAL (KIND=C_BOOL) :: cyclic_tmp
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: description
+      LOGICAL  , OPTIONAL, INTENT(OUT) :: enabled
+      LOGICAL (KIND=C_BOOL) :: enabled_tmp
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: format
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: group_ref
+      INTEGER  , OPTIONAL, INTENT(OUT) :: min_digits
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: mode
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: name
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: name_suffix
+      TYPE(txios(duration))  , OPTIONAL, INTENT(OUT) :: output_freq
+      INTEGER  , OPTIONAL, INTENT(OUT) :: output_level
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: par_access
+      LOGICAL  , OPTIONAL, INTENT(OUT) :: read_metadata_par
+      LOGICAL (KIND=C_BOOL) :: read_metadata_par_tmp
+      INTEGER  , OPTIONAL, INTENT(OUT) :: record_offset
+      TYPE(txios(duration))  , OPTIONAL, INTENT(OUT) :: split_end_offset
+      TYPE(txios(duration))  , OPTIONAL, INTENT(OUT) :: split_freq
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: split_freq_format
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: split_last_date
+      TYPE(txios(duration))  , OPTIONAL, INTENT(OUT) :: split_start_offset
+      TYPE(txios(duration))  , OPTIONAL, INTENT(OUT) :: sync_freq
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: time_counter
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: time_counter_name
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: time_stamp_format
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: time_stamp_name
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: time_units
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: timeseries
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: ts_prefix
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: type
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: uuid_format
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: uuid_name
+
+      CALL xios(get_filegroup_attr_hdl_)  &
+      ( filegroup_hdl, append, comment, compression_level, convention, convention_str, cyclic, description  &
+      , enabled, format, group_ref, min_digits, mode, name, name_suffix, output_freq, output_level  &
+      , par_access, read_metadata_par, record_offset, split_end_offset, split_freq, split_freq_format  &
+      , split_last_date, split_start_offset, sync_freq, time_counter, time_counter_name, time_stamp_format  &
+      , time_stamp_name, time_units, timeseries, ts_prefix, type, uuid_format, uuid_name )
+
+  END SUBROUTINE xios(get_filegroup_attr_hdl)
+
+  SUBROUTINE xios(get_filegroup_attr_hdl_)   &
+    ( filegroup_hdl, append_, comment_, compression_level_, convention_, convention_str_, cyclic_  &
+    , description_, enabled_, format_, group_ref_, min_digits_, mode_, name_, name_suffix_, output_freq_  &
+    , output_level_, par_access_, read_metadata_par_, record_offset_, split_end_offset_, split_freq_  &
+    , split_freq_format_, split_last_date_, split_start_offset_, sync_freq_, time_counter_, time_counter_name_  &
+    , time_stamp_format_, time_stamp_name_, time_units_, timeseries_, ts_prefix_, type_, uuid_format_  &
+    , uuid_name_ )
+
+    IMPLICIT NONE
+      TYPE(txios(filegroup)) , INTENT(IN) :: filegroup_hdl
+      LOGICAL  , OPTIONAL, INTENT(OUT) :: append_
+      LOGICAL (KIND=C_BOOL) :: append__tmp
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: comment_
+      INTEGER  , OPTIONAL, INTENT(OUT) :: compression_level_
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: convention_
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: convention_str_
+      LOGICAL  , OPTIONAL, INTENT(OUT) :: cyclic_
+      LOGICAL (KIND=C_BOOL) :: cyclic__tmp
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: description_
+      LOGICAL  , OPTIONAL, INTENT(OUT) :: enabled_
+      LOGICAL (KIND=C_BOOL) :: enabled__tmp
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: format_
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: group_ref_
+      INTEGER  , OPTIONAL, INTENT(OUT) :: min_digits_
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: mode_
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: name_
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: name_suffix_
+      TYPE(txios(duration))  , OPTIONAL, INTENT(OUT) :: output_freq_
+      INTEGER  , OPTIONAL, INTENT(OUT) :: output_level_
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: par_access_
+      LOGICAL  , OPTIONAL, INTENT(OUT) :: read_metadata_par_
+      LOGICAL (KIND=C_BOOL) :: read_metadata_par__tmp
+      INTEGER  , OPTIONAL, INTENT(OUT) :: record_offset_
+      TYPE(txios(duration))  , OPTIONAL, INTENT(OUT) :: split_end_offset_
+      TYPE(txios(duration))  , OPTIONAL, INTENT(OUT) :: split_freq_
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: split_freq_format_
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: split_last_date_
+      TYPE(txios(duration))  , OPTIONAL, INTENT(OUT) :: split_start_offset_
+      TYPE(txios(duration))  , OPTIONAL, INTENT(OUT) :: sync_freq_
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: time_counter_
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: time_counter_name_
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: time_stamp_format_
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: time_stamp_name_
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: time_units_
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: timeseries_
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: ts_prefix_
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: type_
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: uuid_format_
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: uuid_name_
+
+      IF (PRESENT(append_)) THEN
+        CALL cxios_get_filegroup_append &
+      (filegroup_hdl%daddr, append__tmp)
+        append_ = append__tmp
+      ENDIF
+
+      IF (PRESENT(comment_)) THEN
+        CALL cxios_get_filegroup_comment &
+      (filegroup_hdl%daddr, comment_, len(comment_))
+      ENDIF
+
+      IF (PRESENT(compression_level_)) THEN
+        CALL cxios_get_filegroup_compression_level &
+      (filegroup_hdl%daddr, compression_level_)
+      ENDIF
+
+      IF (PRESENT(convention_)) THEN
+        CALL cxios_get_filegroup_convention &
+      (filegroup_hdl%daddr, convention_, len(convention_))
+      ENDIF
+
+      IF (PRESENT(convention_str_)) THEN
+        CALL cxios_get_filegroup_convention_str &
+      (filegroup_hdl%daddr, convention_str_, len(convention_str_))
+      ENDIF
+
+      IF (PRESENT(cyclic_)) THEN
+        CALL cxios_get_filegroup_cyclic &
+      (filegroup_hdl%daddr, cyclic__tmp)
+        cyclic_ = cyclic__tmp
+      ENDIF
+
+      IF (PRESENT(description_)) THEN
+        CALL cxios_get_filegroup_description &
+      (filegroup_hdl%daddr, description_, len(description_))
+      ENDIF
+
+      IF (PRESENT(enabled_)) THEN
+        CALL cxios_get_filegroup_enabled &
+      (filegroup_hdl%daddr, enabled__tmp)
+        enabled_ = enabled__tmp
+      ENDIF
+
+      IF (PRESENT(format_)) THEN
+        CALL cxios_get_filegroup_format &
+      (filegroup_hdl%daddr, format_, len(format_))
+      ENDIF
+
+      IF (PRESENT(group_ref_)) THEN
+        CALL cxios_get_filegroup_group_ref &
+      (filegroup_hdl%daddr, group_ref_, len(group_ref_))
+      ENDIF
+
+      IF (PRESENT(min_digits_)) THEN
+        CALL cxios_get_filegroup_min_digits &
+      (filegroup_hdl%daddr, min_digits_)
+      ENDIF
+
+      IF (PRESENT(mode_)) THEN
+        CALL cxios_get_filegroup_mode &
+      (filegroup_hdl%daddr, mode_, len(mode_))
+      ENDIF
+
+      IF (PRESENT(name_)) THEN
+        CALL cxios_get_filegroup_name &
+      (filegroup_hdl%daddr, name_, len(name_))
+      ENDIF
+
+      IF (PRESENT(name_suffix_)) THEN
+        CALL cxios_get_filegroup_name_suffix &
+      (filegroup_hdl%daddr, name_suffix_, len(name_suffix_))
+      ENDIF
+
+      IF (PRESENT(output_freq_)) THEN
+        CALL cxios_get_filegroup_output_freq &
+      (filegroup_hdl%daddr, output_freq_)
+      ENDIF
+
+      IF (PRESENT(output_level_)) THEN
+        CALL cxios_get_filegroup_output_level &
+      (filegroup_hdl%daddr, output_level_)
+      ENDIF
+
+      IF (PRESENT(par_access_)) THEN
+        CALL cxios_get_filegroup_par_access &
+      (filegroup_hdl%daddr, par_access_, len(par_access_))
+      ENDIF
+
+      IF (PRESENT(read_metadata_par_)) THEN
+        CALL cxios_get_filegroup_read_metadata_par &
+      (filegroup_hdl%daddr, read_metadata_par__tmp)
+        read_metadata_par_ = read_metadata_par__tmp
+      ENDIF
+
+      IF (PRESENT(record_offset_)) THEN
+        CALL cxios_get_filegroup_record_offset &
+      (filegroup_hdl%daddr, record_offset_)
+      ENDIF
+
+      IF (PRESENT(split_end_offset_)) THEN
+        CALL cxios_get_filegroup_split_end_offset &
+      (filegroup_hdl%daddr, split_end_offset_)
+      ENDIF
+
+      IF (PRESENT(split_freq_)) THEN
+        CALL cxios_get_filegroup_split_freq &
+      (filegroup_hdl%daddr, split_freq_)
+      ENDIF
+
+      IF (PRESENT(split_freq_format_)) THEN
+        CALL cxios_get_filegroup_split_freq_format &
+      (filegroup_hdl%daddr, split_freq_format_, len(split_freq_format_))
+      ENDIF
+
+      IF (PRESENT(split_last_date_)) THEN
+        CALL cxios_get_filegroup_split_last_date &
+      (filegroup_hdl%daddr, split_last_date_, len(split_last_date_))
+      ENDIF
+
+      IF (PRESENT(split_start_offset_)) THEN
+        CALL cxios_get_filegroup_split_start_offset &
+      (filegroup_hdl%daddr, split_start_offset_)
+      ENDIF
+
+      IF (PRESENT(sync_freq_)) THEN
+        CALL cxios_get_filegroup_sync_freq &
+      (filegroup_hdl%daddr, sync_freq_)
+      ENDIF
+
+      IF (PRESENT(time_counter_)) THEN
+        CALL cxios_get_filegroup_time_counter &
+      (filegroup_hdl%daddr, time_counter_, len(time_counter_))
+      ENDIF
+
+      IF (PRESENT(time_counter_name_)) THEN
+        CALL cxios_get_filegroup_time_counter_name &
+      (filegroup_hdl%daddr, time_counter_name_, len(time_counter_name_))
+      ENDIF
+
+      IF (PRESENT(time_stamp_format_)) THEN
+        CALL cxios_get_filegroup_time_stamp_format &
+      (filegroup_hdl%daddr, time_stamp_format_, len(time_stamp_format_))
+      ENDIF
+
+      IF (PRESENT(time_stamp_name_)) THEN
+        CALL cxios_get_filegroup_time_stamp_name &
+      (filegroup_hdl%daddr, time_stamp_name_, len(time_stamp_name_))
+      ENDIF
+
+      IF (PRESENT(time_units_)) THEN
+        CALL cxios_get_filegroup_time_units &
+      (filegroup_hdl%daddr, time_units_, len(time_units_))
+      ENDIF
+
+      IF (PRESENT(timeseries_)) THEN
+        CALL cxios_get_filegroup_timeseries &
+      (filegroup_hdl%daddr, timeseries_, len(timeseries_))
+      ENDIF
+
+      IF (PRESENT(ts_prefix_)) THEN
+        CALL cxios_get_filegroup_ts_prefix &
+      (filegroup_hdl%daddr, ts_prefix_, len(ts_prefix_))
+      ENDIF
+
+      IF (PRESENT(type_)) THEN
+        CALL cxios_get_filegroup_type &
+      (filegroup_hdl%daddr, type_, len(type_))
+      ENDIF
+
+      IF (PRESENT(uuid_format_)) THEN
+        CALL cxios_get_filegroup_uuid_format &
+      (filegroup_hdl%daddr, uuid_format_, len(uuid_format_))
+      ENDIF
+
+      IF (PRESENT(uuid_name_)) THEN
+        CALL cxios_get_filegroup_uuid_name &
+      (filegroup_hdl%daddr, uuid_name_, len(uuid_name_))
+      ENDIF
+
+  END SUBROUTINE xios(get_filegroup_attr_hdl_)
+
+  SUBROUTINE xios(is_defined_filegroup_attr)  &
+    ( filegroup_id, append, comment, compression_level, convention, convention_str, cyclic, description  &
+    , enabled, format, group_ref, min_digits, mode, name, name_suffix, output_freq, output_level  &
+    , par_access, read_metadata_par, record_offset, split_end_offset, split_freq, split_freq_format  &
+    , split_last_date, split_start_offset, sync_freq, time_counter, time_counter_name, time_stamp_format  &
+    , time_stamp_name, time_units, timeseries, ts_prefix, type, uuid_format, uuid_name )
+
+    IMPLICIT NONE
+      TYPE(txios(filegroup))  :: filegroup_hdl
+      CHARACTER(LEN=*), INTENT(IN) ::filegroup_id
+      LOGICAL, OPTIONAL, INTENT(OUT) :: append
+      LOGICAL(KIND=C_BOOL) :: append_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: comment
+      LOGICAL(KIND=C_BOOL) :: comment_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: compression_level
+      LOGICAL(KIND=C_BOOL) :: compression_level_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: convention
+      LOGICAL(KIND=C_BOOL) :: convention_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: convention_str
+      LOGICAL(KIND=C_BOOL) :: convention_str_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: cyclic
+      LOGICAL(KIND=C_BOOL) :: cyclic_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: description
+      LOGICAL(KIND=C_BOOL) :: description_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: enabled
+      LOGICAL(KIND=C_BOOL) :: enabled_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: format
+      LOGICAL(KIND=C_BOOL) :: format_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: group_ref
+      LOGICAL(KIND=C_BOOL) :: group_ref_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: min_digits
+      LOGICAL(KIND=C_BOOL) :: min_digits_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: mode
+      LOGICAL(KIND=C_BOOL) :: mode_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: name
+      LOGICAL(KIND=C_BOOL) :: name_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: name_suffix
+      LOGICAL(KIND=C_BOOL) :: name_suffix_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: output_freq
+      LOGICAL(KIND=C_BOOL) :: output_freq_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: output_level
+      LOGICAL(KIND=C_BOOL) :: output_level_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: par_access
+      LOGICAL(KIND=C_BOOL) :: par_access_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: read_metadata_par
+      LOGICAL(KIND=C_BOOL) :: read_metadata_par_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: record_offset
+      LOGICAL(KIND=C_BOOL) :: record_offset_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: split_end_offset
+      LOGICAL(KIND=C_BOOL) :: split_end_offset_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: split_freq
+      LOGICAL(KIND=C_BOOL) :: split_freq_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: split_freq_format
+      LOGICAL(KIND=C_BOOL) :: split_freq_format_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: split_last_date
+      LOGICAL(KIND=C_BOOL) :: split_last_date_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: split_start_offset
+      LOGICAL(KIND=C_BOOL) :: split_start_offset_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: sync_freq
+      LOGICAL(KIND=C_BOOL) :: sync_freq_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: time_counter
+      LOGICAL(KIND=C_BOOL) :: time_counter_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: time_counter_name
+      LOGICAL(KIND=C_BOOL) :: time_counter_name_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: time_stamp_format
+      LOGICAL(KIND=C_BOOL) :: time_stamp_format_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: time_stamp_name
+      LOGICAL(KIND=C_BOOL) :: time_stamp_name_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: time_units
+      LOGICAL(KIND=C_BOOL) :: time_units_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: timeseries
+      LOGICAL(KIND=C_BOOL) :: timeseries_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: ts_prefix
+      LOGICAL(KIND=C_BOOL) :: ts_prefix_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: type
+      LOGICAL(KIND=C_BOOL) :: type_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: uuid_format
+      LOGICAL(KIND=C_BOOL) :: uuid_format_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: uuid_name
+      LOGICAL(KIND=C_BOOL) :: uuid_name_tmp
+
+      CALL xios(get_filegroup_handle) &
+      (filegroup_id,filegroup_hdl)
+      CALL xios(is_defined_filegroup_attr_hdl_)   &
+      ( filegroup_hdl, append, comment, compression_level, convention, convention_str, cyclic, description  &
+      , enabled, format, group_ref, min_digits, mode, name, name_suffix, output_freq, output_level  &
+      , par_access, read_metadata_par, record_offset, split_end_offset, split_freq, split_freq_format  &
+      , split_last_date, split_start_offset, sync_freq, time_counter, time_counter_name, time_stamp_format  &
+      , time_stamp_name, time_units, timeseries, ts_prefix, type, uuid_format, uuid_name )
+
+  END SUBROUTINE xios(is_defined_filegroup_attr)
+
+  SUBROUTINE xios(is_defined_filegroup_attr_hdl)  &
+    ( filegroup_hdl, append, comment, compression_level, convention, convention_str, cyclic, description  &
+    , enabled, format, group_ref, min_digits, mode, name, name_suffix, output_freq, output_level  &
+    , par_access, read_metadata_par, record_offset, split_end_offset, split_freq, split_freq_format  &
+    , split_last_date, split_start_offset, sync_freq, time_counter, time_counter_name, time_stamp_format  &
+    , time_stamp_name, time_units, timeseries, ts_prefix, type, uuid_format, uuid_name )
+
+    IMPLICIT NONE
+      TYPE(txios(filegroup)) , INTENT(IN) :: filegroup_hdl
+      LOGICAL, OPTIONAL, INTENT(OUT) :: append
+      LOGICAL(KIND=C_BOOL) :: append_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: comment
+      LOGICAL(KIND=C_BOOL) :: comment_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: compression_level
+      LOGICAL(KIND=C_BOOL) :: compression_level_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: convention
+      LOGICAL(KIND=C_BOOL) :: convention_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: convention_str
+      LOGICAL(KIND=C_BOOL) :: convention_str_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: cyclic
+      LOGICAL(KIND=C_BOOL) :: cyclic_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: description
+      LOGICAL(KIND=C_BOOL) :: description_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: enabled
+      LOGICAL(KIND=C_BOOL) :: enabled_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: format
+      LOGICAL(KIND=C_BOOL) :: format_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: group_ref
+      LOGICAL(KIND=C_BOOL) :: group_ref_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: min_digits
+      LOGICAL(KIND=C_BOOL) :: min_digits_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: mode
+      LOGICAL(KIND=C_BOOL) :: mode_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: name
+      LOGICAL(KIND=C_BOOL) :: name_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: name_suffix
+      LOGICAL(KIND=C_BOOL) :: name_suffix_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: output_freq
+      LOGICAL(KIND=C_BOOL) :: output_freq_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: output_level
+      LOGICAL(KIND=C_BOOL) :: output_level_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: par_access
+      LOGICAL(KIND=C_BOOL) :: par_access_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: read_metadata_par
+      LOGICAL(KIND=C_BOOL) :: read_metadata_par_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: record_offset
+      LOGICAL(KIND=C_BOOL) :: record_offset_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: split_end_offset
+      LOGICAL(KIND=C_BOOL) :: split_end_offset_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: split_freq
+      LOGICAL(KIND=C_BOOL) :: split_freq_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: split_freq_format
+      LOGICAL(KIND=C_BOOL) :: split_freq_format_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: split_last_date
+      LOGICAL(KIND=C_BOOL) :: split_last_date_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: split_start_offset
+      LOGICAL(KIND=C_BOOL) :: split_start_offset_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: sync_freq
+      LOGICAL(KIND=C_BOOL) :: sync_freq_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: time_counter
+      LOGICAL(KIND=C_BOOL) :: time_counter_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: time_counter_name
+      LOGICAL(KIND=C_BOOL) :: time_counter_name_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: time_stamp_format
+      LOGICAL(KIND=C_BOOL) :: time_stamp_format_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: time_stamp_name
+      LOGICAL(KIND=C_BOOL) :: time_stamp_name_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: time_units
+      LOGICAL(KIND=C_BOOL) :: time_units_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: timeseries
+      LOGICAL(KIND=C_BOOL) :: timeseries_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: ts_prefix
+      LOGICAL(KIND=C_BOOL) :: ts_prefix_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: type
+      LOGICAL(KIND=C_BOOL) :: type_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: uuid_format
+      LOGICAL(KIND=C_BOOL) :: uuid_format_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: uuid_name
+      LOGICAL(KIND=C_BOOL) :: uuid_name_tmp
+
+      CALL xios(is_defined_filegroup_attr_hdl_)  &
+      ( filegroup_hdl, append, comment, compression_level, convention, convention_str, cyclic, description  &
+      , enabled, format, group_ref, min_digits, mode, name, name_suffix, output_freq, output_level  &
+      , par_access, read_metadata_par, record_offset, split_end_offset, split_freq, split_freq_format  &
+      , split_last_date, split_start_offset, sync_freq, time_counter, time_counter_name, time_stamp_format  &
+      , time_stamp_name, time_units, timeseries, ts_prefix, type, uuid_format, uuid_name )
+
+  END SUBROUTINE xios(is_defined_filegroup_attr_hdl)
+
+  SUBROUTINE xios(is_defined_filegroup_attr_hdl_)   &
+    ( filegroup_hdl, append_, comment_, compression_level_, convention_, convention_str_, cyclic_  &
+    , description_, enabled_, format_, group_ref_, min_digits_, mode_, name_, name_suffix_, output_freq_  &
+    , output_level_, par_access_, read_metadata_par_, record_offset_, split_end_offset_, split_freq_  &
+    , split_freq_format_, split_last_date_, split_start_offset_, sync_freq_, time_counter_, time_counter_name_  &
+    , time_stamp_format_, time_stamp_name_, time_units_, timeseries_, ts_prefix_, type_, uuid_format_  &
+    , uuid_name_ )
+
+    IMPLICIT NONE
+      TYPE(txios(filegroup)) , INTENT(IN) :: filegroup_hdl
+      LOGICAL, OPTIONAL, INTENT(OUT) :: append_
+      LOGICAL(KIND=C_BOOL) :: append__tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: comment_
+      LOGICAL(KIND=C_BOOL) :: comment__tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: compression_level_
+      LOGICAL(KIND=C_BOOL) :: compression_level__tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: convention_
+      LOGICAL(KIND=C_BOOL) :: convention__tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: convention_str_
+      LOGICAL(KIND=C_BOOL) :: convention_str__tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: cyclic_
+      LOGICAL(KIND=C_BOOL) :: cyclic__tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: description_
+      LOGICAL(KIND=C_BOOL) :: description__tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: enabled_
+      LOGICAL(KIND=C_BOOL) :: enabled__tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: format_
+      LOGICAL(KIND=C_BOOL) :: format__tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: group_ref_
+      LOGICAL(KIND=C_BOOL) :: group_ref__tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: min_digits_
+      LOGICAL(KIND=C_BOOL) :: min_digits__tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: mode_
+      LOGICAL(KIND=C_BOOL) :: mode__tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: name_
+      LOGICAL(KIND=C_BOOL) :: name__tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: name_suffix_
+      LOGICAL(KIND=C_BOOL) :: name_suffix__tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: output_freq_
+      LOGICAL(KIND=C_BOOL) :: output_freq__tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: output_level_
+      LOGICAL(KIND=C_BOOL) :: output_level__tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: par_access_
+      LOGICAL(KIND=C_BOOL) :: par_access__tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: read_metadata_par_
+      LOGICAL(KIND=C_BOOL) :: read_metadata_par__tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: record_offset_
+      LOGICAL(KIND=C_BOOL) :: record_offset__tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: split_end_offset_
+      LOGICAL(KIND=C_BOOL) :: split_end_offset__tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: split_freq_
+      LOGICAL(KIND=C_BOOL) :: split_freq__tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: split_freq_format_
+      LOGICAL(KIND=C_BOOL) :: split_freq_format__tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: split_last_date_
+      LOGICAL(KIND=C_BOOL) :: split_last_date__tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: split_start_offset_
+      LOGICAL(KIND=C_BOOL) :: split_start_offset__tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: sync_freq_
+      LOGICAL(KIND=C_BOOL) :: sync_freq__tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: time_counter_
+      LOGICAL(KIND=C_BOOL) :: time_counter__tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: time_counter_name_
+      LOGICAL(KIND=C_BOOL) :: time_counter_name__tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: time_stamp_format_
+      LOGICAL(KIND=C_BOOL) :: time_stamp_format__tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: time_stamp_name_
+      LOGICAL(KIND=C_BOOL) :: time_stamp_name__tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: time_units_
+      LOGICAL(KIND=C_BOOL) :: time_units__tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: timeseries_
+      LOGICAL(KIND=C_BOOL) :: timeseries__tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: ts_prefix_
+      LOGICAL(KIND=C_BOOL) :: ts_prefix__tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: type_
+      LOGICAL(KIND=C_BOOL) :: type__tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: uuid_format_
+      LOGICAL(KIND=C_BOOL) :: uuid_format__tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: uuid_name_
+      LOGICAL(KIND=C_BOOL) :: uuid_name__tmp
+
+      IF (PRESENT(append_)) THEN
+        append__tmp = cxios_is_defined_filegroup_append &
+      (filegroup_hdl%daddr)
+        append_ = append__tmp
+      ENDIF
+
+      IF (PRESENT(comment_)) THEN
+        comment__tmp = cxios_is_defined_filegroup_comment &
+      (filegroup_hdl%daddr)
+        comment_ = comment__tmp
+      ENDIF
+
+      IF (PRESENT(compression_level_)) THEN
+        compression_level__tmp = cxios_is_defined_filegroup_compression_level &
+      (filegroup_hdl%daddr)
+        compression_level_ = compression_level__tmp
+      ENDIF
+
+      IF (PRESENT(convention_)) THEN
+        convention__tmp = cxios_is_defined_filegroup_convention &
+      (filegroup_hdl%daddr)
+        convention_ = convention__tmp
+      ENDIF
+
+      IF (PRESENT(convention_str_)) THEN
+        convention_str__tmp = cxios_is_defined_filegroup_convention_str &
+      (filegroup_hdl%daddr)
+        convention_str_ = convention_str__tmp
+      ENDIF
+
+      IF (PRESENT(cyclic_)) THEN
+        cyclic__tmp = cxios_is_defined_filegroup_cyclic &
+      (filegroup_hdl%daddr)
+        cyclic_ = cyclic__tmp
+      ENDIF
+
+      IF (PRESENT(description_)) THEN
+        description__tmp = cxios_is_defined_filegroup_description &
+      (filegroup_hdl%daddr)
+        description_ = description__tmp
+      ENDIF
+
+      IF (PRESENT(enabled_)) THEN
+        enabled__tmp = cxios_is_defined_filegroup_enabled &
+      (filegroup_hdl%daddr)
+        enabled_ = enabled__tmp
+      ENDIF
+
+      IF (PRESENT(format_)) THEN
+        format__tmp = cxios_is_defined_filegroup_format &
+      (filegroup_hdl%daddr)
+        format_ = format__tmp
+      ENDIF
+
+      IF (PRESENT(group_ref_)) THEN
+        group_ref__tmp = cxios_is_defined_filegroup_group_ref &
+      (filegroup_hdl%daddr)
+        group_ref_ = group_ref__tmp
+      ENDIF
+
+      IF (PRESENT(min_digits_)) THEN
+        min_digits__tmp = cxios_is_defined_filegroup_min_digits &
+      (filegroup_hdl%daddr)
+        min_digits_ = min_digits__tmp
+      ENDIF
+
+      IF (PRESENT(mode_)) THEN
+        mode__tmp = cxios_is_defined_filegroup_mode &
+      (filegroup_hdl%daddr)
+        mode_ = mode__tmp
+      ENDIF
+
+      IF (PRESENT(name_)) THEN
+        name__tmp = cxios_is_defined_filegroup_name &
+      (filegroup_hdl%daddr)
+        name_ = name__tmp
+      ENDIF
+
+      IF (PRESENT(name_suffix_)) THEN
+        name_suffix__tmp = cxios_is_defined_filegroup_name_suffix &
+      (filegroup_hdl%daddr)
+        name_suffix_ = name_suffix__tmp
+      ENDIF
+
+      IF (PRESENT(output_freq_)) THEN
+        output_freq__tmp = cxios_is_defined_filegroup_output_freq &
+      (filegroup_hdl%daddr)
+        output_freq_ = output_freq__tmp
+      ENDIF
+
+      IF (PRESENT(output_level_)) THEN
+        output_level__tmp = cxios_is_defined_filegroup_output_level &
+      (filegroup_hdl%daddr)
+        output_level_ = output_level__tmp
+      ENDIF
+
+      IF (PRESENT(par_access_)) THEN
+        par_access__tmp = cxios_is_defined_filegroup_par_access &
+      (filegroup_hdl%daddr)
+        par_access_ = par_access__tmp
+      ENDIF
+
+      IF (PRESENT(read_metadata_par_)) THEN
+        read_metadata_par__tmp = cxios_is_defined_filegroup_read_metadata_par &
+      (filegroup_hdl%daddr)
+        read_metadata_par_ = read_metadata_par__tmp
+      ENDIF
+
+      IF (PRESENT(record_offset_)) THEN
+        record_offset__tmp = cxios_is_defined_filegroup_record_offset &
+      (filegroup_hdl%daddr)
+        record_offset_ = record_offset__tmp
+      ENDIF
+
+      IF (PRESENT(split_end_offset_)) THEN
+        split_end_offset__tmp = cxios_is_defined_filegroup_split_end_offset &
+      (filegroup_hdl%daddr)
+        split_end_offset_ = split_end_offset__tmp
+      ENDIF
+
+      IF (PRESENT(split_freq_)) THEN
+        split_freq__tmp = cxios_is_defined_filegroup_split_freq &
+      (filegroup_hdl%daddr)
+        split_freq_ = split_freq__tmp
+      ENDIF
+
+      IF (PRESENT(split_freq_format_)) THEN
+        split_freq_format__tmp = cxios_is_defined_filegroup_split_freq_format &
+      (filegroup_hdl%daddr)
+        split_freq_format_ = split_freq_format__tmp
+      ENDIF
+
+      IF (PRESENT(split_last_date_)) THEN
+        split_last_date__tmp = cxios_is_defined_filegroup_split_last_date &
+      (filegroup_hdl%daddr)
+        split_last_date_ = split_last_date__tmp
+      ENDIF
+
+      IF (PRESENT(split_start_offset_)) THEN
+        split_start_offset__tmp = cxios_is_defined_filegroup_split_start_offset &
+      (filegroup_hdl%daddr)
+        split_start_offset_ = split_start_offset__tmp
+      ENDIF
+
+      IF (PRESENT(sync_freq_)) THEN
+        sync_freq__tmp = cxios_is_defined_filegroup_sync_freq &
+      (filegroup_hdl%daddr)
+        sync_freq_ = sync_freq__tmp
+      ENDIF
+
+      IF (PRESENT(time_counter_)) THEN
+        time_counter__tmp = cxios_is_defined_filegroup_time_counter &
+      (filegroup_hdl%daddr)
+        time_counter_ = time_counter__tmp
+      ENDIF
+
+      IF (PRESENT(time_counter_name_)) THEN
+        time_counter_name__tmp = cxios_is_defined_filegroup_time_counter_name &
+      (filegroup_hdl%daddr)
+        time_counter_name_ = time_counter_name__tmp
+      ENDIF
+
+      IF (PRESENT(time_stamp_format_)) THEN
+        time_stamp_format__tmp = cxios_is_defined_filegroup_time_stamp_format &
+      (filegroup_hdl%daddr)
+        time_stamp_format_ = time_stamp_format__tmp
+      ENDIF
+
+      IF (PRESENT(time_stamp_name_)) THEN
+        time_stamp_name__tmp = cxios_is_defined_filegroup_time_stamp_name &
+      (filegroup_hdl%daddr)
+        time_stamp_name_ = time_stamp_name__tmp
+      ENDIF
+
+      IF (PRESENT(time_units_)) THEN
+        time_units__tmp = cxios_is_defined_filegroup_time_units &
+      (filegroup_hdl%daddr)
+        time_units_ = time_units__tmp
+      ENDIF
+
+      IF (PRESENT(timeseries_)) THEN
+        timeseries__tmp = cxios_is_defined_filegroup_timeseries &
+      (filegroup_hdl%daddr)
+        timeseries_ = timeseries__tmp
+      ENDIF
+
+      IF (PRESENT(ts_prefix_)) THEN
+        ts_prefix__tmp = cxios_is_defined_filegroup_ts_prefix &
+      (filegroup_hdl%daddr)
+        ts_prefix_ = ts_prefix__tmp
+      ENDIF
+
+      IF (PRESENT(type_)) THEN
+        type__tmp = cxios_is_defined_filegroup_type &
+      (filegroup_hdl%daddr)
+        type_ = type__tmp
+      ENDIF
+
+      IF (PRESENT(uuid_format_)) THEN
+        uuid_format__tmp = cxios_is_defined_filegroup_uuid_format &
+      (filegroup_hdl%daddr)
+        uuid_format_ = uuid_format__tmp
+      ENDIF
+
+      IF (PRESENT(uuid_name_)) THEN
+        uuid_name__tmp = cxios_is_defined_filegroup_uuid_name &
+      (filegroup_hdl%daddr)
+        uuid_name_ = uuid_name__tmp
+      ENDIF
+
+  END SUBROUTINE xios(is_defined_filegroup_attr_hdl_)
+
+END MODULE ifilegroup_attr
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/fortran_attr/igenerate_rectilinear_domain_attr.F90
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/fortran_attr/igenerate_rectilinear_domain_attr.F90	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/fortran_attr/igenerate_rectilinear_domain_attr.F90	(revision 1749)
@@ -0,0 +1,351 @@
+! * ************************************************************************** *
+! *               Interface auto generated - do not modify                     *
+! * ************************************************************************** *
+#include "xios_fortran_prefix.hpp"
+
+MODULE igenerate_rectilinear_domain_attr
+  USE, INTRINSIC :: ISO_C_BINDING
+  USE igenerate_rectilinear_domain
+  USE generate_rectilinear_domain_interface_attr
+
+CONTAINS
+
+  SUBROUTINE xios(set_generate_rectilinear_domain_attr)  &
+    ( generate_rectilinear_domain_id, bounds_lat_end, bounds_lat_start, bounds_lon_end, bounds_lon_start  &
+    , lat_end, lat_start, lon_end, lon_start )
+
+    IMPLICIT NONE
+      TYPE(txios(generate_rectilinear_domain))  :: generate_rectilinear_domain_hdl
+      CHARACTER(LEN=*), INTENT(IN) ::generate_rectilinear_domain_id
+      REAL (KIND=8) , OPTIONAL, INTENT(IN) :: bounds_lat_end
+      REAL (KIND=8) , OPTIONAL, INTENT(IN) :: bounds_lat_start
+      REAL (KIND=8) , OPTIONAL, INTENT(IN) :: bounds_lon_end
+      REAL (KIND=8) , OPTIONAL, INTENT(IN) :: bounds_lon_start
+      REAL (KIND=8) , OPTIONAL, INTENT(IN) :: lat_end
+      REAL (KIND=8) , OPTIONAL, INTENT(IN) :: lat_start
+      REAL (KIND=8) , OPTIONAL, INTENT(IN) :: lon_end
+      REAL (KIND=8) , OPTIONAL, INTENT(IN) :: lon_start
+
+      CALL xios(get_generate_rectilinear_domain_handle) &
+      (generate_rectilinear_domain_id,generate_rectilinear_domain_hdl)
+      CALL xios(set_generate_rectilinear_domain_attr_hdl_)   &
+      ( generate_rectilinear_domain_hdl, bounds_lat_end, bounds_lat_start, bounds_lon_end, bounds_lon_start  &
+      , lat_end, lat_start, lon_end, lon_start )
+
+  END SUBROUTINE xios(set_generate_rectilinear_domain_attr)
+
+  SUBROUTINE xios(set_generate_rectilinear_domain_attr_hdl)  &
+    ( generate_rectilinear_domain_hdl, bounds_lat_end, bounds_lat_start, bounds_lon_end, bounds_lon_start  &
+    , lat_end, lat_start, lon_end, lon_start )
+
+    IMPLICIT NONE
+      TYPE(txios(generate_rectilinear_domain)) , INTENT(IN) :: generate_rectilinear_domain_hdl
+      REAL (KIND=8) , OPTIONAL, INTENT(IN) :: bounds_lat_end
+      REAL (KIND=8) , OPTIONAL, INTENT(IN) :: bounds_lat_start
+      REAL (KIND=8) , OPTIONAL, INTENT(IN) :: bounds_lon_end
+      REAL (KIND=8) , OPTIONAL, INTENT(IN) :: bounds_lon_start
+      REAL (KIND=8) , OPTIONAL, INTENT(IN) :: lat_end
+      REAL (KIND=8) , OPTIONAL, INTENT(IN) :: lat_start
+      REAL (KIND=8) , OPTIONAL, INTENT(IN) :: lon_end
+      REAL (KIND=8) , OPTIONAL, INTENT(IN) :: lon_start
+
+      CALL xios(set_generate_rectilinear_domain_attr_hdl_)  &
+      ( generate_rectilinear_domain_hdl, bounds_lat_end, bounds_lat_start, bounds_lon_end, bounds_lon_start  &
+      , lat_end, lat_start, lon_end, lon_start )
+
+  END SUBROUTINE xios(set_generate_rectilinear_domain_attr_hdl)
+
+  SUBROUTINE xios(set_generate_rectilinear_domain_attr_hdl_)   &
+    ( generate_rectilinear_domain_hdl, bounds_lat_end_, bounds_lat_start_, bounds_lon_end_, bounds_lon_start_  &
+    , lat_end_, lat_start_, lon_end_, lon_start_ )
+
+    IMPLICIT NONE
+      TYPE(txios(generate_rectilinear_domain)) , INTENT(IN) :: generate_rectilinear_domain_hdl
+      REAL (KIND=8) , OPTIONAL, INTENT(IN) :: bounds_lat_end_
+      REAL (KIND=8) , OPTIONAL, INTENT(IN) :: bounds_lat_start_
+      REAL (KIND=8) , OPTIONAL, INTENT(IN) :: bounds_lon_end_
+      REAL (KIND=8) , OPTIONAL, INTENT(IN) :: bounds_lon_start_
+      REAL (KIND=8) , OPTIONAL, INTENT(IN) :: lat_end_
+      REAL (KIND=8) , OPTIONAL, INTENT(IN) :: lat_start_
+      REAL (KIND=8) , OPTIONAL, INTENT(IN) :: lon_end_
+      REAL (KIND=8) , OPTIONAL, INTENT(IN) :: lon_start_
+
+      IF (PRESENT(bounds_lat_end_)) THEN
+        CALL cxios_set_generate_rectilinear_domain_bounds_lat_end &
+      (generate_rectilinear_domain_hdl%daddr, bounds_lat_end_)
+      ENDIF
+
+      IF (PRESENT(bounds_lat_start_)) THEN
+        CALL cxios_set_generate_rectilinear_domain_bounds_lat_start &
+      (generate_rectilinear_domain_hdl%daddr, bounds_lat_start_)
+      ENDIF
+
+      IF (PRESENT(bounds_lon_end_)) THEN
+        CALL cxios_set_generate_rectilinear_domain_bounds_lon_end &
+      (generate_rectilinear_domain_hdl%daddr, bounds_lon_end_)
+      ENDIF
+
+      IF (PRESENT(bounds_lon_start_)) THEN
+        CALL cxios_set_generate_rectilinear_domain_bounds_lon_start &
+      (generate_rectilinear_domain_hdl%daddr, bounds_lon_start_)
+      ENDIF
+
+      IF (PRESENT(lat_end_)) THEN
+        CALL cxios_set_generate_rectilinear_domain_lat_end &
+      (generate_rectilinear_domain_hdl%daddr, lat_end_)
+      ENDIF
+
+      IF (PRESENT(lat_start_)) THEN
+        CALL cxios_set_generate_rectilinear_domain_lat_start &
+      (generate_rectilinear_domain_hdl%daddr, lat_start_)
+      ENDIF
+
+      IF (PRESENT(lon_end_)) THEN
+        CALL cxios_set_generate_rectilinear_domain_lon_end &
+      (generate_rectilinear_domain_hdl%daddr, lon_end_)
+      ENDIF
+
+      IF (PRESENT(lon_start_)) THEN
+        CALL cxios_set_generate_rectilinear_domain_lon_start &
+      (generate_rectilinear_domain_hdl%daddr, lon_start_)
+      ENDIF
+
+  END SUBROUTINE xios(set_generate_rectilinear_domain_attr_hdl_)
+
+  SUBROUTINE xios(get_generate_rectilinear_domain_attr)  &
+    ( generate_rectilinear_domain_id, bounds_lat_end, bounds_lat_start, bounds_lon_end, bounds_lon_start  &
+    , lat_end, lat_start, lon_end, lon_start )
+
+    IMPLICIT NONE
+      TYPE(txios(generate_rectilinear_domain))  :: generate_rectilinear_domain_hdl
+      CHARACTER(LEN=*), INTENT(IN) ::generate_rectilinear_domain_id
+      REAL (KIND=8) , OPTIONAL, INTENT(OUT) :: bounds_lat_end
+      REAL (KIND=8) , OPTIONAL, INTENT(OUT) :: bounds_lat_start
+      REAL (KIND=8) , OPTIONAL, INTENT(OUT) :: bounds_lon_end
+      REAL (KIND=8) , OPTIONAL, INTENT(OUT) :: bounds_lon_start
+      REAL (KIND=8) , OPTIONAL, INTENT(OUT) :: lat_end
+      REAL (KIND=8) , OPTIONAL, INTENT(OUT) :: lat_start
+      REAL (KIND=8) , OPTIONAL, INTENT(OUT) :: lon_end
+      REAL (KIND=8) , OPTIONAL, INTENT(OUT) :: lon_start
+
+      CALL xios(get_generate_rectilinear_domain_handle) &
+      (generate_rectilinear_domain_id,generate_rectilinear_domain_hdl)
+      CALL xios(get_generate_rectilinear_domain_attr_hdl_)   &
+      ( generate_rectilinear_domain_hdl, bounds_lat_end, bounds_lat_start, bounds_lon_end, bounds_lon_start  &
+      , lat_end, lat_start, lon_end, lon_start )
+
+  END SUBROUTINE xios(get_generate_rectilinear_domain_attr)
+
+  SUBROUTINE xios(get_generate_rectilinear_domain_attr_hdl)  &
+    ( generate_rectilinear_domain_hdl, bounds_lat_end, bounds_lat_start, bounds_lon_end, bounds_lon_start  &
+    , lat_end, lat_start, lon_end, lon_start )
+
+    IMPLICIT NONE
+      TYPE(txios(generate_rectilinear_domain)) , INTENT(IN) :: generate_rectilinear_domain_hdl
+      REAL (KIND=8) , OPTIONAL, INTENT(OUT) :: bounds_lat_end
+      REAL (KIND=8) , OPTIONAL, INTENT(OUT) :: bounds_lat_start
+      REAL (KIND=8) , OPTIONAL, INTENT(OUT) :: bounds_lon_end
+      REAL (KIND=8) , OPTIONAL, INTENT(OUT) :: bounds_lon_start
+      REAL (KIND=8) , OPTIONAL, INTENT(OUT) :: lat_end
+      REAL (KIND=8) , OPTIONAL, INTENT(OUT) :: lat_start
+      REAL (KIND=8) , OPTIONAL, INTENT(OUT) :: lon_end
+      REAL (KIND=8) , OPTIONAL, INTENT(OUT) :: lon_start
+
+      CALL xios(get_generate_rectilinear_domain_attr_hdl_)  &
+      ( generate_rectilinear_domain_hdl, bounds_lat_end, bounds_lat_start, bounds_lon_end, bounds_lon_start  &
+      , lat_end, lat_start, lon_end, lon_start )
+
+  END SUBROUTINE xios(get_generate_rectilinear_domain_attr_hdl)
+
+  SUBROUTINE xios(get_generate_rectilinear_domain_attr_hdl_)   &
+    ( generate_rectilinear_domain_hdl, bounds_lat_end_, bounds_lat_start_, bounds_lon_end_, bounds_lon_start_  &
+    , lat_end_, lat_start_, lon_end_, lon_start_ )
+
+    IMPLICIT NONE
+      TYPE(txios(generate_rectilinear_domain)) , INTENT(IN) :: generate_rectilinear_domain_hdl
+      REAL (KIND=8) , OPTIONAL, INTENT(OUT) :: bounds_lat_end_
+      REAL (KIND=8) , OPTIONAL, INTENT(OUT) :: bounds_lat_start_
+      REAL (KIND=8) , OPTIONAL, INTENT(OUT) :: bounds_lon_end_
+      REAL (KIND=8) , OPTIONAL, INTENT(OUT) :: bounds_lon_start_
+      REAL (KIND=8) , OPTIONAL, INTENT(OUT) :: lat_end_
+      REAL (KIND=8) , OPTIONAL, INTENT(OUT) :: lat_start_
+      REAL (KIND=8) , OPTIONAL, INTENT(OUT) :: lon_end_
+      REAL (KIND=8) , OPTIONAL, INTENT(OUT) :: lon_start_
+
+      IF (PRESENT(bounds_lat_end_)) THEN
+        CALL cxios_get_generate_rectilinear_domain_bounds_lat_end &
+      (generate_rectilinear_domain_hdl%daddr, bounds_lat_end_)
+      ENDIF
+
+      IF (PRESENT(bounds_lat_start_)) THEN
+        CALL cxios_get_generate_rectilinear_domain_bounds_lat_start &
+      (generate_rectilinear_domain_hdl%daddr, bounds_lat_start_)
+      ENDIF
+
+      IF (PRESENT(bounds_lon_end_)) THEN
+        CALL cxios_get_generate_rectilinear_domain_bounds_lon_end &
+      (generate_rectilinear_domain_hdl%daddr, bounds_lon_end_)
+      ENDIF
+
+      IF (PRESENT(bounds_lon_start_)) THEN
+        CALL cxios_get_generate_rectilinear_domain_bounds_lon_start &
+      (generate_rectilinear_domain_hdl%daddr, bounds_lon_start_)
+      ENDIF
+
+      IF (PRESENT(lat_end_)) THEN
+        CALL cxios_get_generate_rectilinear_domain_lat_end &
+      (generate_rectilinear_domain_hdl%daddr, lat_end_)
+      ENDIF
+
+      IF (PRESENT(lat_start_)) THEN
+        CALL cxios_get_generate_rectilinear_domain_lat_start &
+      (generate_rectilinear_domain_hdl%daddr, lat_start_)
+      ENDIF
+
+      IF (PRESENT(lon_end_)) THEN
+        CALL cxios_get_generate_rectilinear_domain_lon_end &
+      (generate_rectilinear_domain_hdl%daddr, lon_end_)
+      ENDIF
+
+      IF (PRESENT(lon_start_)) THEN
+        CALL cxios_get_generate_rectilinear_domain_lon_start &
+      (generate_rectilinear_domain_hdl%daddr, lon_start_)
+      ENDIF
+
+  END SUBROUTINE xios(get_generate_rectilinear_domain_attr_hdl_)
+
+  SUBROUTINE xios(is_defined_generate_rectilinear_domain_attr)  &
+    ( generate_rectilinear_domain_id, bounds_lat_end, bounds_lat_start, bounds_lon_end, bounds_lon_start  &
+    , lat_end, lat_start, lon_end, lon_start )
+
+    IMPLICIT NONE
+      TYPE(txios(generate_rectilinear_domain))  :: generate_rectilinear_domain_hdl
+      CHARACTER(LEN=*), INTENT(IN) ::generate_rectilinear_domain_id
+      LOGICAL, OPTIONAL, INTENT(OUT) :: bounds_lat_end
+      LOGICAL(KIND=C_BOOL) :: bounds_lat_end_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: bounds_lat_start
+      LOGICAL(KIND=C_BOOL) :: bounds_lat_start_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: bounds_lon_end
+      LOGICAL(KIND=C_BOOL) :: bounds_lon_end_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: bounds_lon_start
+      LOGICAL(KIND=C_BOOL) :: bounds_lon_start_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: lat_end
+      LOGICAL(KIND=C_BOOL) :: lat_end_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: lat_start
+      LOGICAL(KIND=C_BOOL) :: lat_start_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: lon_end
+      LOGICAL(KIND=C_BOOL) :: lon_end_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: lon_start
+      LOGICAL(KIND=C_BOOL) :: lon_start_tmp
+
+      CALL xios(get_generate_rectilinear_domain_handle) &
+      (generate_rectilinear_domain_id,generate_rectilinear_domain_hdl)
+      CALL xios(is_defined_generate_rectilinear_domain_attr_hdl_)   &
+      ( generate_rectilinear_domain_hdl, bounds_lat_end, bounds_lat_start, bounds_lon_end, bounds_lon_start  &
+      , lat_end, lat_start, lon_end, lon_start )
+
+  END SUBROUTINE xios(is_defined_generate_rectilinear_domain_attr)
+
+  SUBROUTINE xios(is_defined_generate_rectilinear_domain_attr_hdl)  &
+    ( generate_rectilinear_domain_hdl, bounds_lat_end, bounds_lat_start, bounds_lon_end, bounds_lon_start  &
+    , lat_end, lat_start, lon_end, lon_start )
+
+    IMPLICIT NONE
+      TYPE(txios(generate_rectilinear_domain)) , INTENT(IN) :: generate_rectilinear_domain_hdl
+      LOGICAL, OPTIONAL, INTENT(OUT) :: bounds_lat_end
+      LOGICAL(KIND=C_BOOL) :: bounds_lat_end_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: bounds_lat_start
+      LOGICAL(KIND=C_BOOL) :: bounds_lat_start_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: bounds_lon_end
+      LOGICAL(KIND=C_BOOL) :: bounds_lon_end_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: bounds_lon_start
+      LOGICAL(KIND=C_BOOL) :: bounds_lon_start_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: lat_end
+      LOGICAL(KIND=C_BOOL) :: lat_end_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: lat_start
+      LOGICAL(KIND=C_BOOL) :: lat_start_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: lon_end
+      LOGICAL(KIND=C_BOOL) :: lon_end_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: lon_start
+      LOGICAL(KIND=C_BOOL) :: lon_start_tmp
+
+      CALL xios(is_defined_generate_rectilinear_domain_attr_hdl_)  &
+      ( generate_rectilinear_domain_hdl, bounds_lat_end, bounds_lat_start, bounds_lon_end, bounds_lon_start  &
+      , lat_end, lat_start, lon_end, lon_start )
+
+  END SUBROUTINE xios(is_defined_generate_rectilinear_domain_attr_hdl)
+
+  SUBROUTINE xios(is_defined_generate_rectilinear_domain_attr_hdl_)   &
+    ( generate_rectilinear_domain_hdl, bounds_lat_end_, bounds_lat_start_, bounds_lon_end_, bounds_lon_start_  &
+    , lat_end_, lat_start_, lon_end_, lon_start_ )
+
+    IMPLICIT NONE
+      TYPE(txios(generate_rectilinear_domain)) , INTENT(IN) :: generate_rectilinear_domain_hdl
+      LOGICAL, OPTIONAL, INTENT(OUT) :: bounds_lat_end_
+      LOGICAL(KIND=C_BOOL) :: bounds_lat_end__tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: bounds_lat_start_
+      LOGICAL(KIND=C_BOOL) :: bounds_lat_start__tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: bounds_lon_end_
+      LOGICAL(KIND=C_BOOL) :: bounds_lon_end__tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: bounds_lon_start_
+      LOGICAL(KIND=C_BOOL) :: bounds_lon_start__tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: lat_end_
+      LOGICAL(KIND=C_BOOL) :: lat_end__tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: lat_start_
+      LOGICAL(KIND=C_BOOL) :: lat_start__tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: lon_end_
+      LOGICAL(KIND=C_BOOL) :: lon_end__tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: lon_start_
+      LOGICAL(KIND=C_BOOL) :: lon_start__tmp
+
+      IF (PRESENT(bounds_lat_end_)) THEN
+        bounds_lat_end__tmp = cxios_is_defined_generate_rectilinear_domain_bounds_lat_end &
+      (generate_rectilinear_domain_hdl%daddr)
+        bounds_lat_end_ = bounds_lat_end__tmp
+      ENDIF
+
+      IF (PRESENT(bounds_lat_start_)) THEN
+        bounds_lat_start__tmp = cxios_is_defined_generate_rectilinear_domain_bounds_lat_start &
+      (generate_rectilinear_domain_hdl%daddr)
+        bounds_lat_start_ = bounds_lat_start__tmp
+      ENDIF
+
+      IF (PRESENT(bounds_lon_end_)) THEN
+        bounds_lon_end__tmp = cxios_is_defined_generate_rectilinear_domain_bounds_lon_end &
+      (generate_rectilinear_domain_hdl%daddr)
+        bounds_lon_end_ = bounds_lon_end__tmp
+      ENDIF
+
+      IF (PRESENT(bounds_lon_start_)) THEN
+        bounds_lon_start__tmp = cxios_is_defined_generate_rectilinear_domain_bounds_lon_start &
+      (generate_rectilinear_domain_hdl%daddr)
+        bounds_lon_start_ = bounds_lon_start__tmp
+      ENDIF
+
+      IF (PRESENT(lat_end_)) THEN
+        lat_end__tmp = cxios_is_defined_generate_rectilinear_domain_lat_end &
+      (generate_rectilinear_domain_hdl%daddr)
+        lat_end_ = lat_end__tmp
+      ENDIF
+
+      IF (PRESENT(lat_start_)) THEN
+        lat_start__tmp = cxios_is_defined_generate_rectilinear_domain_lat_start &
+      (generate_rectilinear_domain_hdl%daddr)
+        lat_start_ = lat_start__tmp
+      ENDIF
+
+      IF (PRESENT(lon_end_)) THEN
+        lon_end__tmp = cxios_is_defined_generate_rectilinear_domain_lon_end &
+      (generate_rectilinear_domain_hdl%daddr)
+        lon_end_ = lon_end__tmp
+      ENDIF
+
+      IF (PRESENT(lon_start_)) THEN
+        lon_start__tmp = cxios_is_defined_generate_rectilinear_domain_lon_start &
+      (generate_rectilinear_domain_hdl%daddr)
+        lon_start_ = lon_start__tmp
+      ENDIF
+
+  END SUBROUTINE xios(is_defined_generate_rectilinear_domain_attr_hdl_)
+
+END MODULE igenerate_rectilinear_domain_attr
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/fortran_attr/igrid_attr.F90
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/fortran_attr/igrid_attr.F90	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/fortran_attr/igrid_attr.F90	(revision 1749)
@@ -0,0 +1,525 @@
+! * ************************************************************************** *
+! *               Interface auto generated - do not modify                     *
+! * ************************************************************************** *
+#include "xios_fortran_prefix.hpp"
+
+MODULE igrid_attr
+  USE, INTRINSIC :: ISO_C_BINDING
+  USE igrid
+  USE grid_interface_attr
+
+CONTAINS
+
+  SUBROUTINE xios(set_grid_attr)  &
+    ( grid_id, comment, description, mask_0d, mask_1d, mask_2d, mask_3d, mask_4d, mask_5d, mask_6d  &
+    , mask_7d, name )
+
+    IMPLICIT NONE
+      TYPE(txios(grid))  :: grid_hdl
+      CHARACTER(LEN=*), INTENT(IN) ::grid_id
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: comment
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: description
+      LOGICAL  , OPTIONAL, INTENT(IN) :: mask_0d(:)
+      LOGICAL (KIND=C_BOOL) , ALLOCATABLE :: mask_0d_tmp(:)
+      LOGICAL  , OPTIONAL, INTENT(IN) :: mask_1d(:)
+      LOGICAL (KIND=C_BOOL) , ALLOCATABLE :: mask_1d_tmp(:)
+      LOGICAL  , OPTIONAL, INTENT(IN) :: mask_2d(:,:)
+      LOGICAL (KIND=C_BOOL) , ALLOCATABLE :: mask_2d_tmp(:,:)
+      LOGICAL  , OPTIONAL, INTENT(IN) :: mask_3d(:,:,:)
+      LOGICAL (KIND=C_BOOL) , ALLOCATABLE :: mask_3d_tmp(:,:,:)
+      LOGICAL  , OPTIONAL, INTENT(IN) :: mask_4d(:,:,:,:)
+      LOGICAL (KIND=C_BOOL) , ALLOCATABLE :: mask_4d_tmp(:,:,:,:)
+      LOGICAL  , OPTIONAL, INTENT(IN) :: mask_5d(:,:,:,:,:)
+      LOGICAL (KIND=C_BOOL) , ALLOCATABLE :: mask_5d_tmp(:,:,:,:,:)
+      LOGICAL  , OPTIONAL, INTENT(IN) :: mask_6d(:,:,:,:,:,:)
+      LOGICAL (KIND=C_BOOL) , ALLOCATABLE :: mask_6d_tmp(:,:,:,:,:,:)
+      LOGICAL  , OPTIONAL, INTENT(IN) :: mask_7d(:,:,:,:,:,:,:)
+      LOGICAL (KIND=C_BOOL) , ALLOCATABLE :: mask_7d_tmp(:,:,:,:,:,:,:)
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: name
+
+      CALL xios(get_grid_handle) &
+      (grid_id,grid_hdl)
+      CALL xios(set_grid_attr_hdl_)   &
+      ( grid_hdl, comment, description, mask_0d, mask_1d, mask_2d, mask_3d, mask_4d, mask_5d, mask_6d  &
+      , mask_7d, name )
+
+  END SUBROUTINE xios(set_grid_attr)
+
+  SUBROUTINE xios(set_grid_attr_hdl)  &
+    ( grid_hdl, comment, description, mask_0d, mask_1d, mask_2d, mask_3d, mask_4d, mask_5d, mask_6d  &
+    , mask_7d, name )
+
+    IMPLICIT NONE
+      TYPE(txios(grid)) , INTENT(IN) :: grid_hdl
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: comment
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: description
+      LOGICAL  , OPTIONAL, INTENT(IN) :: mask_0d(:)
+      LOGICAL (KIND=C_BOOL) , ALLOCATABLE :: mask_0d_tmp(:)
+      LOGICAL  , OPTIONAL, INTENT(IN) :: mask_1d(:)
+      LOGICAL (KIND=C_BOOL) , ALLOCATABLE :: mask_1d_tmp(:)
+      LOGICAL  , OPTIONAL, INTENT(IN) :: mask_2d(:,:)
+      LOGICAL (KIND=C_BOOL) , ALLOCATABLE :: mask_2d_tmp(:,:)
+      LOGICAL  , OPTIONAL, INTENT(IN) :: mask_3d(:,:,:)
+      LOGICAL (KIND=C_BOOL) , ALLOCATABLE :: mask_3d_tmp(:,:,:)
+      LOGICAL  , OPTIONAL, INTENT(IN) :: mask_4d(:,:,:,:)
+      LOGICAL (KIND=C_BOOL) , ALLOCATABLE :: mask_4d_tmp(:,:,:,:)
+      LOGICAL  , OPTIONAL, INTENT(IN) :: mask_5d(:,:,:,:,:)
+      LOGICAL (KIND=C_BOOL) , ALLOCATABLE :: mask_5d_tmp(:,:,:,:,:)
+      LOGICAL  , OPTIONAL, INTENT(IN) :: mask_6d(:,:,:,:,:,:)
+      LOGICAL (KIND=C_BOOL) , ALLOCATABLE :: mask_6d_tmp(:,:,:,:,:,:)
+      LOGICAL  , OPTIONAL, INTENT(IN) :: mask_7d(:,:,:,:,:,:,:)
+      LOGICAL (KIND=C_BOOL) , ALLOCATABLE :: mask_7d_tmp(:,:,:,:,:,:,:)
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: name
+
+      CALL xios(set_grid_attr_hdl_)  &
+      ( grid_hdl, comment, description, mask_0d, mask_1d, mask_2d, mask_3d, mask_4d, mask_5d, mask_6d  &
+      , mask_7d, name )
+
+  END SUBROUTINE xios(set_grid_attr_hdl)
+
+  SUBROUTINE xios(set_grid_attr_hdl_)   &
+    ( grid_hdl, comment_, description_, mask_0d_, mask_1d_, mask_2d_, mask_3d_, mask_4d_, mask_5d_  &
+    , mask_6d_, mask_7d_, name_ )
+
+    IMPLICIT NONE
+      TYPE(txios(grid)) , INTENT(IN) :: grid_hdl
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: comment_
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: description_
+      LOGICAL  , OPTIONAL, INTENT(IN) :: mask_0d_(:)
+      LOGICAL (KIND=C_BOOL) , ALLOCATABLE :: mask_0d__tmp(:)
+      LOGICAL  , OPTIONAL, INTENT(IN) :: mask_1d_(:)
+      LOGICAL (KIND=C_BOOL) , ALLOCATABLE :: mask_1d__tmp(:)
+      LOGICAL  , OPTIONAL, INTENT(IN) :: mask_2d_(:,:)
+      LOGICAL (KIND=C_BOOL) , ALLOCATABLE :: mask_2d__tmp(:,:)
+      LOGICAL  , OPTIONAL, INTENT(IN) :: mask_3d_(:,:,:)
+      LOGICAL (KIND=C_BOOL) , ALLOCATABLE :: mask_3d__tmp(:,:,:)
+      LOGICAL  , OPTIONAL, INTENT(IN) :: mask_4d_(:,:,:,:)
+      LOGICAL (KIND=C_BOOL) , ALLOCATABLE :: mask_4d__tmp(:,:,:,:)
+      LOGICAL  , OPTIONAL, INTENT(IN) :: mask_5d_(:,:,:,:,:)
+      LOGICAL (KIND=C_BOOL) , ALLOCATABLE :: mask_5d__tmp(:,:,:,:,:)
+      LOGICAL  , OPTIONAL, INTENT(IN) :: mask_6d_(:,:,:,:,:,:)
+      LOGICAL (KIND=C_BOOL) , ALLOCATABLE :: mask_6d__tmp(:,:,:,:,:,:)
+      LOGICAL  , OPTIONAL, INTENT(IN) :: mask_7d_(:,:,:,:,:,:,:)
+      LOGICAL (KIND=C_BOOL) , ALLOCATABLE :: mask_7d__tmp(:,:,:,:,:,:,:)
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: name_
+
+      IF (PRESENT(comment_)) THEN
+        CALL cxios_set_grid_comment &
+      (grid_hdl%daddr, comment_, len(comment_))
+      ENDIF
+
+      IF (PRESENT(description_)) THEN
+        CALL cxios_set_grid_description &
+      (grid_hdl%daddr, description_, len(description_))
+      ENDIF
+
+      IF (PRESENT(mask_0d_)) THEN
+        ALLOCATE(mask_0d__tmp(SIZE(mask_0d_,1)))
+        mask_0d__tmp = mask_0d_
+        CALL cxios_set_grid_mask_0d &
+      (grid_hdl%daddr, mask_0d__tmp, SHAPE(mask_0d_))
+      ENDIF
+
+      IF (PRESENT(mask_1d_)) THEN
+        ALLOCATE(mask_1d__tmp(SIZE(mask_1d_,1)))
+        mask_1d__tmp = mask_1d_
+        CALL cxios_set_grid_mask_1d &
+      (grid_hdl%daddr, mask_1d__tmp, SHAPE(mask_1d_))
+      ENDIF
+
+      IF (PRESENT(mask_2d_)) THEN
+        ALLOCATE(mask_2d__tmp(SIZE(mask_2d_,1), SIZE(mask_2d_,2)))
+        mask_2d__tmp = mask_2d_
+        CALL cxios_set_grid_mask_2d &
+      (grid_hdl%daddr, mask_2d__tmp, SHAPE(mask_2d_))
+      ENDIF
+
+      IF (PRESENT(mask_3d_)) THEN
+        ALLOCATE(mask_3d__tmp(SIZE(mask_3d_,1), SIZE(mask_3d_,2), SIZE(mask_3d_,3)))
+        mask_3d__tmp = mask_3d_
+        CALL cxios_set_grid_mask_3d &
+      (grid_hdl%daddr, mask_3d__tmp, SHAPE(mask_3d_))
+      ENDIF
+
+      IF (PRESENT(mask_4d_)) THEN
+        ALLOCATE(mask_4d__tmp(SIZE(mask_4d_,1), SIZE(mask_4d_,2), SIZE(mask_4d_,3), &
+       SIZE(mask_4d_,4)))
+        mask_4d__tmp = mask_4d_
+        CALL cxios_set_grid_mask_4d &
+      (grid_hdl%daddr, mask_4d__tmp, SHAPE(mask_4d_))
+      ENDIF
+
+      IF (PRESENT(mask_5d_)) THEN
+        ALLOCATE(mask_5d__tmp(SIZE(mask_5d_,1), SIZE(mask_5d_,2), SIZE(mask_5d_,3), &
+       SIZE(mask_5d_,4), SIZE(mask_5d_,5)))
+        mask_5d__tmp = mask_5d_
+        CALL cxios_set_grid_mask_5d &
+      (grid_hdl%daddr, mask_5d__tmp, SHAPE(mask_5d_))
+      ENDIF
+
+      IF (PRESENT(mask_6d_)) THEN
+        ALLOCATE(mask_6d__tmp(SIZE(mask_6d_,1), SIZE(mask_6d_,2), SIZE(mask_6d_,3), &
+       SIZE(mask_6d_,4), SIZE(mask_6d_,5), SIZE(mask_6d_,6)))
+        mask_6d__tmp = mask_6d_
+        CALL cxios_set_grid_mask_6d &
+      (grid_hdl%daddr, mask_6d__tmp, SHAPE(mask_6d_))
+      ENDIF
+
+      IF (PRESENT(mask_7d_)) THEN
+        ALLOCATE(mask_7d__tmp(SIZE(mask_7d_,1), SIZE(mask_7d_,2), SIZE(mask_7d_,3), &
+       SIZE(mask_7d_,4), SIZE(mask_7d_,5), SIZE(mask_7d_,6), &
+       SIZE(mask_7d_,7)))
+        mask_7d__tmp = mask_7d_
+        CALL cxios_set_grid_mask_7d &
+      (grid_hdl%daddr, mask_7d__tmp, SHAPE(mask_7d_))
+      ENDIF
+
+      IF (PRESENT(name_)) THEN
+        CALL cxios_set_grid_name &
+      (grid_hdl%daddr, name_, len(name_))
+      ENDIF
+
+  END SUBROUTINE xios(set_grid_attr_hdl_)
+
+  SUBROUTINE xios(get_grid_attr)  &
+    ( grid_id, comment, description, mask_0d, mask_1d, mask_2d, mask_3d, mask_4d, mask_5d, mask_6d  &
+    , mask_7d, name )
+
+    IMPLICIT NONE
+      TYPE(txios(grid))  :: grid_hdl
+      CHARACTER(LEN=*), INTENT(IN) ::grid_id
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: comment
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: description
+      LOGICAL  , OPTIONAL, INTENT(OUT) :: mask_0d(:)
+      LOGICAL (KIND=C_BOOL) , ALLOCATABLE :: mask_0d_tmp(:)
+      LOGICAL  , OPTIONAL, INTENT(OUT) :: mask_1d(:)
+      LOGICAL (KIND=C_BOOL) , ALLOCATABLE :: mask_1d_tmp(:)
+      LOGICAL  , OPTIONAL, INTENT(OUT) :: mask_2d(:,:)
+      LOGICAL (KIND=C_BOOL) , ALLOCATABLE :: mask_2d_tmp(:,:)
+      LOGICAL  , OPTIONAL, INTENT(OUT) :: mask_3d(:,:,:)
+      LOGICAL (KIND=C_BOOL) , ALLOCATABLE :: mask_3d_tmp(:,:,:)
+      LOGICAL  , OPTIONAL, INTENT(OUT) :: mask_4d(:,:,:,:)
+      LOGICAL (KIND=C_BOOL) , ALLOCATABLE :: mask_4d_tmp(:,:,:,:)
+      LOGICAL  , OPTIONAL, INTENT(OUT) :: mask_5d(:,:,:,:,:)
+      LOGICAL (KIND=C_BOOL) , ALLOCATABLE :: mask_5d_tmp(:,:,:,:,:)
+      LOGICAL  , OPTIONAL, INTENT(OUT) :: mask_6d(:,:,:,:,:,:)
+      LOGICAL (KIND=C_BOOL) , ALLOCATABLE :: mask_6d_tmp(:,:,:,:,:,:)
+      LOGICAL  , OPTIONAL, INTENT(OUT) :: mask_7d(:,:,:,:,:,:,:)
+      LOGICAL (KIND=C_BOOL) , ALLOCATABLE :: mask_7d_tmp(:,:,:,:,:,:,:)
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: name
+
+      CALL xios(get_grid_handle) &
+      (grid_id,grid_hdl)
+      CALL xios(get_grid_attr_hdl_)   &
+      ( grid_hdl, comment, description, mask_0d, mask_1d, mask_2d, mask_3d, mask_4d, mask_5d, mask_6d  &
+      , mask_7d, name )
+
+  END SUBROUTINE xios(get_grid_attr)
+
+  SUBROUTINE xios(get_grid_attr_hdl)  &
+    ( grid_hdl, comment, description, mask_0d, mask_1d, mask_2d, mask_3d, mask_4d, mask_5d, mask_6d  &
+    , mask_7d, name )
+
+    IMPLICIT NONE
+      TYPE(txios(grid)) , INTENT(IN) :: grid_hdl
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: comment
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: description
+      LOGICAL  , OPTIONAL, INTENT(OUT) :: mask_0d(:)
+      LOGICAL (KIND=C_BOOL) , ALLOCATABLE :: mask_0d_tmp(:)
+      LOGICAL  , OPTIONAL, INTENT(OUT) :: mask_1d(:)
+      LOGICAL (KIND=C_BOOL) , ALLOCATABLE :: mask_1d_tmp(:)
+      LOGICAL  , OPTIONAL, INTENT(OUT) :: mask_2d(:,:)
+      LOGICAL (KIND=C_BOOL) , ALLOCATABLE :: mask_2d_tmp(:,:)
+      LOGICAL  , OPTIONAL, INTENT(OUT) :: mask_3d(:,:,:)
+      LOGICAL (KIND=C_BOOL) , ALLOCATABLE :: mask_3d_tmp(:,:,:)
+      LOGICAL  , OPTIONAL, INTENT(OUT) :: mask_4d(:,:,:,:)
+      LOGICAL (KIND=C_BOOL) , ALLOCATABLE :: mask_4d_tmp(:,:,:,:)
+      LOGICAL  , OPTIONAL, INTENT(OUT) :: mask_5d(:,:,:,:,:)
+      LOGICAL (KIND=C_BOOL) , ALLOCATABLE :: mask_5d_tmp(:,:,:,:,:)
+      LOGICAL  , OPTIONAL, INTENT(OUT) :: mask_6d(:,:,:,:,:,:)
+      LOGICAL (KIND=C_BOOL) , ALLOCATABLE :: mask_6d_tmp(:,:,:,:,:,:)
+      LOGICAL  , OPTIONAL, INTENT(OUT) :: mask_7d(:,:,:,:,:,:,:)
+      LOGICAL (KIND=C_BOOL) , ALLOCATABLE :: mask_7d_tmp(:,:,:,:,:,:,:)
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: name
+
+      CALL xios(get_grid_attr_hdl_)  &
+      ( grid_hdl, comment, description, mask_0d, mask_1d, mask_2d, mask_3d, mask_4d, mask_5d, mask_6d  &
+      , mask_7d, name )
+
+  END SUBROUTINE xios(get_grid_attr_hdl)
+
+  SUBROUTINE xios(get_grid_attr_hdl_)   &
+    ( grid_hdl, comment_, description_, mask_0d_, mask_1d_, mask_2d_, mask_3d_, mask_4d_, mask_5d_  &
+    , mask_6d_, mask_7d_, name_ )
+
+    IMPLICIT NONE
+      TYPE(txios(grid)) , INTENT(IN) :: grid_hdl
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: comment_
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: description_
+      LOGICAL  , OPTIONAL, INTENT(OUT) :: mask_0d_(:)
+      LOGICAL (KIND=C_BOOL) , ALLOCATABLE :: mask_0d__tmp(:)
+      LOGICAL  , OPTIONAL, INTENT(OUT) :: mask_1d_(:)
+      LOGICAL (KIND=C_BOOL) , ALLOCATABLE :: mask_1d__tmp(:)
+      LOGICAL  , OPTIONAL, INTENT(OUT) :: mask_2d_(:,:)
+      LOGICAL (KIND=C_BOOL) , ALLOCATABLE :: mask_2d__tmp(:,:)
+      LOGICAL  , OPTIONAL, INTENT(OUT) :: mask_3d_(:,:,:)
+      LOGICAL (KIND=C_BOOL) , ALLOCATABLE :: mask_3d__tmp(:,:,:)
+      LOGICAL  , OPTIONAL, INTENT(OUT) :: mask_4d_(:,:,:,:)
+      LOGICAL (KIND=C_BOOL) , ALLOCATABLE :: mask_4d__tmp(:,:,:,:)
+      LOGICAL  , OPTIONAL, INTENT(OUT) :: mask_5d_(:,:,:,:,:)
+      LOGICAL (KIND=C_BOOL) , ALLOCATABLE :: mask_5d__tmp(:,:,:,:,:)
+      LOGICAL  , OPTIONAL, INTENT(OUT) :: mask_6d_(:,:,:,:,:,:)
+      LOGICAL (KIND=C_BOOL) , ALLOCATABLE :: mask_6d__tmp(:,:,:,:,:,:)
+      LOGICAL  , OPTIONAL, INTENT(OUT) :: mask_7d_(:,:,:,:,:,:,:)
+      LOGICAL (KIND=C_BOOL) , ALLOCATABLE :: mask_7d__tmp(:,:,:,:,:,:,:)
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: name_
+
+      IF (PRESENT(comment_)) THEN
+        CALL cxios_get_grid_comment &
+      (grid_hdl%daddr, comment_, len(comment_))
+      ENDIF
+
+      IF (PRESENT(description_)) THEN
+        CALL cxios_get_grid_description &
+      (grid_hdl%daddr, description_, len(description_))
+      ENDIF
+
+      IF (PRESENT(mask_0d_)) THEN
+        ALLOCATE(mask_0d__tmp(SIZE(mask_0d_,1)))
+        CALL cxios_get_grid_mask_0d &
+      (grid_hdl%daddr, mask_0d__tmp, SHAPE(mask_0d_))
+        mask_0d_ = mask_0d__tmp
+      ENDIF
+
+      IF (PRESENT(mask_1d_)) THEN
+        ALLOCATE(mask_1d__tmp(SIZE(mask_1d_,1)))
+        CALL cxios_get_grid_mask_1d &
+      (grid_hdl%daddr, mask_1d__tmp, SHAPE(mask_1d_))
+        mask_1d_ = mask_1d__tmp
+      ENDIF
+
+      IF (PRESENT(mask_2d_)) THEN
+        ALLOCATE(mask_2d__tmp(SIZE(mask_2d_,1), SIZE(mask_2d_,2)))
+        CALL cxios_get_grid_mask_2d &
+      (grid_hdl%daddr, mask_2d__tmp, SHAPE(mask_2d_))
+        mask_2d_ = mask_2d__tmp
+      ENDIF
+
+      IF (PRESENT(mask_3d_)) THEN
+        ALLOCATE(mask_3d__tmp(SIZE(mask_3d_,1), SIZE(mask_3d_,2), SIZE(mask_3d_,3)))
+        CALL cxios_get_grid_mask_3d &
+      (grid_hdl%daddr, mask_3d__tmp, SHAPE(mask_3d_))
+        mask_3d_ = mask_3d__tmp
+      ENDIF
+
+      IF (PRESENT(mask_4d_)) THEN
+        ALLOCATE(mask_4d__tmp(SIZE(mask_4d_,1), SIZE(mask_4d_,2), SIZE(mask_4d_,3), &
+       SIZE(mask_4d_,4)))
+        CALL cxios_get_grid_mask_4d &
+      (grid_hdl%daddr, mask_4d__tmp, SHAPE(mask_4d_))
+        mask_4d_ = mask_4d__tmp
+      ENDIF
+
+      IF (PRESENT(mask_5d_)) THEN
+        ALLOCATE(mask_5d__tmp(SIZE(mask_5d_,1), SIZE(mask_5d_,2), SIZE(mask_5d_,3), &
+       SIZE(mask_5d_,4), SIZE(mask_5d_,5)))
+        CALL cxios_get_grid_mask_5d &
+      (grid_hdl%daddr, mask_5d__tmp, SHAPE(mask_5d_))
+        mask_5d_ = mask_5d__tmp
+      ENDIF
+
+      IF (PRESENT(mask_6d_)) THEN
+        ALLOCATE(mask_6d__tmp(SIZE(mask_6d_,1), SIZE(mask_6d_,2), SIZE(mask_6d_,3), &
+       SIZE(mask_6d_,4), SIZE(mask_6d_,5), SIZE(mask_6d_,6)))
+        CALL cxios_get_grid_mask_6d &
+      (grid_hdl%daddr, mask_6d__tmp, SHAPE(mask_6d_))
+        mask_6d_ = mask_6d__tmp
+      ENDIF
+
+      IF (PRESENT(mask_7d_)) THEN
+        ALLOCATE(mask_7d__tmp(SIZE(mask_7d_,1), SIZE(mask_7d_,2), SIZE(mask_7d_,3), &
+       SIZE(mask_7d_,4), SIZE(mask_7d_,5), SIZE(mask_7d_,6), &
+       SIZE(mask_7d_,7)))
+        CALL cxios_get_grid_mask_7d &
+      (grid_hdl%daddr, mask_7d__tmp, SHAPE(mask_7d_))
+        mask_7d_ = mask_7d__tmp
+      ENDIF
+
+      IF (PRESENT(name_)) THEN
+        CALL cxios_get_grid_name &
+      (grid_hdl%daddr, name_, len(name_))
+      ENDIF
+
+  END SUBROUTINE xios(get_grid_attr_hdl_)
+
+  SUBROUTINE xios(is_defined_grid_attr)  &
+    ( grid_id, comment, description, mask_0d, mask_1d, mask_2d, mask_3d, mask_4d, mask_5d, mask_6d  &
+    , mask_7d, name )
+
+    IMPLICIT NONE
+      TYPE(txios(grid))  :: grid_hdl
+      CHARACTER(LEN=*), INTENT(IN) ::grid_id
+      LOGICAL, OPTIONAL, INTENT(OUT) :: comment
+      LOGICAL(KIND=C_BOOL) :: comment_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: description
+      LOGICAL(KIND=C_BOOL) :: description_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: mask_0d
+      LOGICAL(KIND=C_BOOL) :: mask_0d_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: mask_1d
+      LOGICAL(KIND=C_BOOL) :: mask_1d_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: mask_2d
+      LOGICAL(KIND=C_BOOL) :: mask_2d_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: mask_3d
+      LOGICAL(KIND=C_BOOL) :: mask_3d_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: mask_4d
+      LOGICAL(KIND=C_BOOL) :: mask_4d_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: mask_5d
+      LOGICAL(KIND=C_BOOL) :: mask_5d_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: mask_6d
+      LOGICAL(KIND=C_BOOL) :: mask_6d_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: mask_7d
+      LOGICAL(KIND=C_BOOL) :: mask_7d_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: name
+      LOGICAL(KIND=C_BOOL) :: name_tmp
+
+      CALL xios(get_grid_handle) &
+      (grid_id,grid_hdl)
+      CALL xios(is_defined_grid_attr_hdl_)   &
+      ( grid_hdl, comment, description, mask_0d, mask_1d, mask_2d, mask_3d, mask_4d, mask_5d, mask_6d  &
+      , mask_7d, name )
+
+  END SUBROUTINE xios(is_defined_grid_attr)
+
+  SUBROUTINE xios(is_defined_grid_attr_hdl)  &
+    ( grid_hdl, comment, description, mask_0d, mask_1d, mask_2d, mask_3d, mask_4d, mask_5d, mask_6d  &
+    , mask_7d, name )
+
+    IMPLICIT NONE
+      TYPE(txios(grid)) , INTENT(IN) :: grid_hdl
+      LOGICAL, OPTIONAL, INTENT(OUT) :: comment
+      LOGICAL(KIND=C_BOOL) :: comment_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: description
+      LOGICAL(KIND=C_BOOL) :: description_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: mask_0d
+      LOGICAL(KIND=C_BOOL) :: mask_0d_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: mask_1d
+      LOGICAL(KIND=C_BOOL) :: mask_1d_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: mask_2d
+      LOGICAL(KIND=C_BOOL) :: mask_2d_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: mask_3d
+      LOGICAL(KIND=C_BOOL) :: mask_3d_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: mask_4d
+      LOGICAL(KIND=C_BOOL) :: mask_4d_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: mask_5d
+      LOGICAL(KIND=C_BOOL) :: mask_5d_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: mask_6d
+      LOGICAL(KIND=C_BOOL) :: mask_6d_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: mask_7d
+      LOGICAL(KIND=C_BOOL) :: mask_7d_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: name
+      LOGICAL(KIND=C_BOOL) :: name_tmp
+
+      CALL xios(is_defined_grid_attr_hdl_)  &
+      ( grid_hdl, comment, description, mask_0d, mask_1d, mask_2d, mask_3d, mask_4d, mask_5d, mask_6d  &
+      , mask_7d, name )
+
+  END SUBROUTINE xios(is_defined_grid_attr_hdl)
+
+  SUBROUTINE xios(is_defined_grid_attr_hdl_)   &
+    ( grid_hdl, comment_, description_, mask_0d_, mask_1d_, mask_2d_, mask_3d_, mask_4d_, mask_5d_  &
+    , mask_6d_, mask_7d_, name_ )
+
+    IMPLICIT NONE
+      TYPE(txios(grid)) , INTENT(IN) :: grid_hdl
+      LOGICAL, OPTIONAL, INTENT(OUT) :: comment_
+      LOGICAL(KIND=C_BOOL) :: comment__tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: description_
+      LOGICAL(KIND=C_BOOL) :: description__tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: mask_0d_
+      LOGICAL(KIND=C_BOOL) :: mask_0d__tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: mask_1d_
+      LOGICAL(KIND=C_BOOL) :: mask_1d__tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: mask_2d_
+      LOGICAL(KIND=C_BOOL) :: mask_2d__tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: mask_3d_
+      LOGICAL(KIND=C_BOOL) :: mask_3d__tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: mask_4d_
+      LOGICAL(KIND=C_BOOL) :: mask_4d__tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: mask_5d_
+      LOGICAL(KIND=C_BOOL) :: mask_5d__tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: mask_6d_
+      LOGICAL(KIND=C_BOOL) :: mask_6d__tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: mask_7d_
+      LOGICAL(KIND=C_BOOL) :: mask_7d__tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: name_
+      LOGICAL(KIND=C_BOOL) :: name__tmp
+
+      IF (PRESENT(comment_)) THEN
+        comment__tmp = cxios_is_defined_grid_comment &
+      (grid_hdl%daddr)
+        comment_ = comment__tmp
+      ENDIF
+
+      IF (PRESENT(description_)) THEN
+        description__tmp = cxios_is_defined_grid_description &
+      (grid_hdl%daddr)
+        description_ = description__tmp
+      ENDIF
+
+      IF (PRESENT(mask_0d_)) THEN
+        mask_0d__tmp = cxios_is_defined_grid_mask_0d &
+      (grid_hdl%daddr)
+        mask_0d_ = mask_0d__tmp
+      ENDIF
+
+      IF (PRESENT(mask_1d_)) THEN
+        mask_1d__tmp = cxios_is_defined_grid_mask_1d &
+      (grid_hdl%daddr)
+        mask_1d_ = mask_1d__tmp
+      ENDIF
+
+      IF (PRESENT(mask_2d_)) THEN
+        mask_2d__tmp = cxios_is_defined_grid_mask_2d &
+      (grid_hdl%daddr)
+        mask_2d_ = mask_2d__tmp
+      ENDIF
+
+      IF (PRESENT(mask_3d_)) THEN
+        mask_3d__tmp = cxios_is_defined_grid_mask_3d &
+      (grid_hdl%daddr)
+        mask_3d_ = mask_3d__tmp
+      ENDIF
+
+      IF (PRESENT(mask_4d_)) THEN
+        mask_4d__tmp = cxios_is_defined_grid_mask_4d &
+      (grid_hdl%daddr)
+        mask_4d_ = mask_4d__tmp
+      ENDIF
+
+      IF (PRESENT(mask_5d_)) THEN
+        mask_5d__tmp = cxios_is_defined_grid_mask_5d &
+      (grid_hdl%daddr)
+        mask_5d_ = mask_5d__tmp
+      ENDIF
+
+      IF (PRESENT(mask_6d_)) THEN
+        mask_6d__tmp = cxios_is_defined_grid_mask_6d &
+      (grid_hdl%daddr)
+        mask_6d_ = mask_6d__tmp
+      ENDIF
+
+      IF (PRESENT(mask_7d_)) THEN
+        mask_7d__tmp = cxios_is_defined_grid_mask_7d &
+      (grid_hdl%daddr)
+        mask_7d_ = mask_7d__tmp
+      ENDIF
+
+      IF (PRESENT(name_)) THEN
+        name__tmp = cxios_is_defined_grid_name &
+      (grid_hdl%daddr)
+        name_ = name__tmp
+      ENDIF
+
+  END SUBROUTINE xios(is_defined_grid_attr_hdl_)
+
+END MODULE igrid_attr
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/fortran_attr/igridgroup_attr.F90
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/fortran_attr/igridgroup_attr.F90	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/fortran_attr/igridgroup_attr.F90	(revision 1749)
@@ -0,0 +1,553 @@
+! * ************************************************************************** *
+! *               Interface auto generated - do not modify                     *
+! * ************************************************************************** *
+#include "xios_fortran_prefix.hpp"
+
+MODULE igridgroup_attr
+  USE, INTRINSIC :: ISO_C_BINDING
+  USE igrid
+  USE gridgroup_interface_attr
+
+CONTAINS
+
+  SUBROUTINE xios(set_gridgroup_attr)  &
+    ( gridgroup_id, comment, description, group_ref, mask_0d, mask_1d, mask_2d, mask_3d, mask_4d  &
+    , mask_5d, mask_6d, mask_7d, name )
+
+    IMPLICIT NONE
+      TYPE(txios(gridgroup))  :: gridgroup_hdl
+      CHARACTER(LEN=*), INTENT(IN) ::gridgroup_id
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: comment
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: description
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: group_ref
+      LOGICAL  , OPTIONAL, INTENT(IN) :: mask_0d(:)
+      LOGICAL (KIND=C_BOOL) , ALLOCATABLE :: mask_0d_tmp(:)
+      LOGICAL  , OPTIONAL, INTENT(IN) :: mask_1d(:)
+      LOGICAL (KIND=C_BOOL) , ALLOCATABLE :: mask_1d_tmp(:)
+      LOGICAL  , OPTIONAL, INTENT(IN) :: mask_2d(:,:)
+      LOGICAL (KIND=C_BOOL) , ALLOCATABLE :: mask_2d_tmp(:,:)
+      LOGICAL  , OPTIONAL, INTENT(IN) :: mask_3d(:,:,:)
+      LOGICAL (KIND=C_BOOL) , ALLOCATABLE :: mask_3d_tmp(:,:,:)
+      LOGICAL  , OPTIONAL, INTENT(IN) :: mask_4d(:,:,:,:)
+      LOGICAL (KIND=C_BOOL) , ALLOCATABLE :: mask_4d_tmp(:,:,:,:)
+      LOGICAL  , OPTIONAL, INTENT(IN) :: mask_5d(:,:,:,:,:)
+      LOGICAL (KIND=C_BOOL) , ALLOCATABLE :: mask_5d_tmp(:,:,:,:,:)
+      LOGICAL  , OPTIONAL, INTENT(IN) :: mask_6d(:,:,:,:,:,:)
+      LOGICAL (KIND=C_BOOL) , ALLOCATABLE :: mask_6d_tmp(:,:,:,:,:,:)
+      LOGICAL  , OPTIONAL, INTENT(IN) :: mask_7d(:,:,:,:,:,:,:)
+      LOGICAL (KIND=C_BOOL) , ALLOCATABLE :: mask_7d_tmp(:,:,:,:,:,:,:)
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: name
+
+      CALL xios(get_gridgroup_handle) &
+      (gridgroup_id,gridgroup_hdl)
+      CALL xios(set_gridgroup_attr_hdl_)   &
+      ( gridgroup_hdl, comment, description, group_ref, mask_0d, mask_1d, mask_2d, mask_3d, mask_4d  &
+      , mask_5d, mask_6d, mask_7d, name )
+
+  END SUBROUTINE xios(set_gridgroup_attr)
+
+  SUBROUTINE xios(set_gridgroup_attr_hdl)  &
+    ( gridgroup_hdl, comment, description, group_ref, mask_0d, mask_1d, mask_2d, mask_3d, mask_4d  &
+    , mask_5d, mask_6d, mask_7d, name )
+
+    IMPLICIT NONE
+      TYPE(txios(gridgroup)) , INTENT(IN) :: gridgroup_hdl
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: comment
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: description
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: group_ref
+      LOGICAL  , OPTIONAL, INTENT(IN) :: mask_0d(:)
+      LOGICAL (KIND=C_BOOL) , ALLOCATABLE :: mask_0d_tmp(:)
+      LOGICAL  , OPTIONAL, INTENT(IN) :: mask_1d(:)
+      LOGICAL (KIND=C_BOOL) , ALLOCATABLE :: mask_1d_tmp(:)
+      LOGICAL  , OPTIONAL, INTENT(IN) :: mask_2d(:,:)
+      LOGICAL (KIND=C_BOOL) , ALLOCATABLE :: mask_2d_tmp(:,:)
+      LOGICAL  , OPTIONAL, INTENT(IN) :: mask_3d(:,:,:)
+      LOGICAL (KIND=C_BOOL) , ALLOCATABLE :: mask_3d_tmp(:,:,:)
+      LOGICAL  , OPTIONAL, INTENT(IN) :: mask_4d(:,:,:,:)
+      LOGICAL (KIND=C_BOOL) , ALLOCATABLE :: mask_4d_tmp(:,:,:,:)
+      LOGICAL  , OPTIONAL, INTENT(IN) :: mask_5d(:,:,:,:,:)
+      LOGICAL (KIND=C_BOOL) , ALLOCATABLE :: mask_5d_tmp(:,:,:,:,:)
+      LOGICAL  , OPTIONAL, INTENT(IN) :: mask_6d(:,:,:,:,:,:)
+      LOGICAL (KIND=C_BOOL) , ALLOCATABLE :: mask_6d_tmp(:,:,:,:,:,:)
+      LOGICAL  , OPTIONAL, INTENT(IN) :: mask_7d(:,:,:,:,:,:,:)
+      LOGICAL (KIND=C_BOOL) , ALLOCATABLE :: mask_7d_tmp(:,:,:,:,:,:,:)
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: name
+
+      CALL xios(set_gridgroup_attr_hdl_)  &
+      ( gridgroup_hdl, comment, description, group_ref, mask_0d, mask_1d, mask_2d, mask_3d, mask_4d  &
+      , mask_5d, mask_6d, mask_7d, name )
+
+  END SUBROUTINE xios(set_gridgroup_attr_hdl)
+
+  SUBROUTINE xios(set_gridgroup_attr_hdl_)   &
+    ( gridgroup_hdl, comment_, description_, group_ref_, mask_0d_, mask_1d_, mask_2d_, mask_3d_  &
+    , mask_4d_, mask_5d_, mask_6d_, mask_7d_, name_ )
+
+    IMPLICIT NONE
+      TYPE(txios(gridgroup)) , INTENT(IN) :: gridgroup_hdl
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: comment_
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: description_
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: group_ref_
+      LOGICAL  , OPTIONAL, INTENT(IN) :: mask_0d_(:)
+      LOGICAL (KIND=C_BOOL) , ALLOCATABLE :: mask_0d__tmp(:)
+      LOGICAL  , OPTIONAL, INTENT(IN) :: mask_1d_(:)
+      LOGICAL (KIND=C_BOOL) , ALLOCATABLE :: mask_1d__tmp(:)
+      LOGICAL  , OPTIONAL, INTENT(IN) :: mask_2d_(:,:)
+      LOGICAL (KIND=C_BOOL) , ALLOCATABLE :: mask_2d__tmp(:,:)
+      LOGICAL  , OPTIONAL, INTENT(IN) :: mask_3d_(:,:,:)
+      LOGICAL (KIND=C_BOOL) , ALLOCATABLE :: mask_3d__tmp(:,:,:)
+      LOGICAL  , OPTIONAL, INTENT(IN) :: mask_4d_(:,:,:,:)
+      LOGICAL (KIND=C_BOOL) , ALLOCATABLE :: mask_4d__tmp(:,:,:,:)
+      LOGICAL  , OPTIONAL, INTENT(IN) :: mask_5d_(:,:,:,:,:)
+      LOGICAL (KIND=C_BOOL) , ALLOCATABLE :: mask_5d__tmp(:,:,:,:,:)
+      LOGICAL  , OPTIONAL, INTENT(IN) :: mask_6d_(:,:,:,:,:,:)
+      LOGICAL (KIND=C_BOOL) , ALLOCATABLE :: mask_6d__tmp(:,:,:,:,:,:)
+      LOGICAL  , OPTIONAL, INTENT(IN) :: mask_7d_(:,:,:,:,:,:,:)
+      LOGICAL (KIND=C_BOOL) , ALLOCATABLE :: mask_7d__tmp(:,:,:,:,:,:,:)
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: name_
+
+      IF (PRESENT(comment_)) THEN
+        CALL cxios_set_gridgroup_comment &
+      (gridgroup_hdl%daddr, comment_, len(comment_))
+      ENDIF
+
+      IF (PRESENT(description_)) THEN
+        CALL cxios_set_gridgroup_description &
+      (gridgroup_hdl%daddr, description_, len(description_))
+      ENDIF
+
+      IF (PRESENT(group_ref_)) THEN
+        CALL cxios_set_gridgroup_group_ref &
+      (gridgroup_hdl%daddr, group_ref_, len(group_ref_))
+      ENDIF
+
+      IF (PRESENT(mask_0d_)) THEN
+        ALLOCATE(mask_0d__tmp(SIZE(mask_0d_,1)))
+        mask_0d__tmp = mask_0d_
+        CALL cxios_set_gridgroup_mask_0d &
+      (gridgroup_hdl%daddr, mask_0d__tmp, SHAPE(mask_0d_))
+      ENDIF
+
+      IF (PRESENT(mask_1d_)) THEN
+        ALLOCATE(mask_1d__tmp(SIZE(mask_1d_,1)))
+        mask_1d__tmp = mask_1d_
+        CALL cxios_set_gridgroup_mask_1d &
+      (gridgroup_hdl%daddr, mask_1d__tmp, SHAPE(mask_1d_))
+      ENDIF
+
+      IF (PRESENT(mask_2d_)) THEN
+        ALLOCATE(mask_2d__tmp(SIZE(mask_2d_,1), SIZE(mask_2d_,2)))
+        mask_2d__tmp = mask_2d_
+        CALL cxios_set_gridgroup_mask_2d &
+      (gridgroup_hdl%daddr, mask_2d__tmp, SHAPE(mask_2d_))
+      ENDIF
+
+      IF (PRESENT(mask_3d_)) THEN
+        ALLOCATE(mask_3d__tmp(SIZE(mask_3d_,1), SIZE(mask_3d_,2), SIZE(mask_3d_,3)))
+        mask_3d__tmp = mask_3d_
+        CALL cxios_set_gridgroup_mask_3d &
+      (gridgroup_hdl%daddr, mask_3d__tmp, SHAPE(mask_3d_))
+      ENDIF
+
+      IF (PRESENT(mask_4d_)) THEN
+        ALLOCATE(mask_4d__tmp(SIZE(mask_4d_,1), SIZE(mask_4d_,2), SIZE(mask_4d_,3), &
+       SIZE(mask_4d_,4)))
+        mask_4d__tmp = mask_4d_
+        CALL cxios_set_gridgroup_mask_4d &
+      (gridgroup_hdl%daddr, mask_4d__tmp, SHAPE(mask_4d_))
+      ENDIF
+
+      IF (PRESENT(mask_5d_)) THEN
+        ALLOCATE(mask_5d__tmp(SIZE(mask_5d_,1), SIZE(mask_5d_,2), SIZE(mask_5d_,3), &
+       SIZE(mask_5d_,4), SIZE(mask_5d_,5)))
+        mask_5d__tmp = mask_5d_
+        CALL cxios_set_gridgroup_mask_5d &
+      (gridgroup_hdl%daddr, mask_5d__tmp, SHAPE(mask_5d_))
+      ENDIF
+
+      IF (PRESENT(mask_6d_)) THEN
+        ALLOCATE(mask_6d__tmp(SIZE(mask_6d_,1), SIZE(mask_6d_,2), SIZE(mask_6d_,3), &
+       SIZE(mask_6d_,4), SIZE(mask_6d_,5), SIZE(mask_6d_,6)))
+        mask_6d__tmp = mask_6d_
+        CALL cxios_set_gridgroup_mask_6d &
+      (gridgroup_hdl%daddr, mask_6d__tmp, SHAPE(mask_6d_))
+      ENDIF
+
+      IF (PRESENT(mask_7d_)) THEN
+        ALLOCATE(mask_7d__tmp(SIZE(mask_7d_,1), SIZE(mask_7d_,2), SIZE(mask_7d_,3), &
+       SIZE(mask_7d_,4), SIZE(mask_7d_,5), SIZE(mask_7d_,6), &
+       SIZE(mask_7d_,7)))
+        mask_7d__tmp = mask_7d_
+        CALL cxios_set_gridgroup_mask_7d &
+      (gridgroup_hdl%daddr, mask_7d__tmp, SHAPE(mask_7d_))
+      ENDIF
+
+      IF (PRESENT(name_)) THEN
+        CALL cxios_set_gridgroup_name &
+      (gridgroup_hdl%daddr, name_, len(name_))
+      ENDIF
+
+  END SUBROUTINE xios(set_gridgroup_attr_hdl_)
+
+  SUBROUTINE xios(get_gridgroup_attr)  &
+    ( gridgroup_id, comment, description, group_ref, mask_0d, mask_1d, mask_2d, mask_3d, mask_4d  &
+    , mask_5d, mask_6d, mask_7d, name )
+
+    IMPLICIT NONE
+      TYPE(txios(gridgroup))  :: gridgroup_hdl
+      CHARACTER(LEN=*), INTENT(IN) ::gridgroup_id
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: comment
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: description
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: group_ref
+      LOGICAL  , OPTIONAL, INTENT(OUT) :: mask_0d(:)
+      LOGICAL (KIND=C_BOOL) , ALLOCATABLE :: mask_0d_tmp(:)
+      LOGICAL  , OPTIONAL, INTENT(OUT) :: mask_1d(:)
+      LOGICAL (KIND=C_BOOL) , ALLOCATABLE :: mask_1d_tmp(:)
+      LOGICAL  , OPTIONAL, INTENT(OUT) :: mask_2d(:,:)
+      LOGICAL (KIND=C_BOOL) , ALLOCATABLE :: mask_2d_tmp(:,:)
+      LOGICAL  , OPTIONAL, INTENT(OUT) :: mask_3d(:,:,:)
+      LOGICAL (KIND=C_BOOL) , ALLOCATABLE :: mask_3d_tmp(:,:,:)
+      LOGICAL  , OPTIONAL, INTENT(OUT) :: mask_4d(:,:,:,:)
+      LOGICAL (KIND=C_BOOL) , ALLOCATABLE :: mask_4d_tmp(:,:,:,:)
+      LOGICAL  , OPTIONAL, INTENT(OUT) :: mask_5d(:,:,:,:,:)
+      LOGICAL (KIND=C_BOOL) , ALLOCATABLE :: mask_5d_tmp(:,:,:,:,:)
+      LOGICAL  , OPTIONAL, INTENT(OUT) :: mask_6d(:,:,:,:,:,:)
+      LOGICAL (KIND=C_BOOL) , ALLOCATABLE :: mask_6d_tmp(:,:,:,:,:,:)
+      LOGICAL  , OPTIONAL, INTENT(OUT) :: mask_7d(:,:,:,:,:,:,:)
+      LOGICAL (KIND=C_BOOL) , ALLOCATABLE :: mask_7d_tmp(:,:,:,:,:,:,:)
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: name
+
+      CALL xios(get_gridgroup_handle) &
+      (gridgroup_id,gridgroup_hdl)
+      CALL xios(get_gridgroup_attr_hdl_)   &
+      ( gridgroup_hdl, comment, description, group_ref, mask_0d, mask_1d, mask_2d, mask_3d, mask_4d  &
+      , mask_5d, mask_6d, mask_7d, name )
+
+  END SUBROUTINE xios(get_gridgroup_attr)
+
+  SUBROUTINE xios(get_gridgroup_attr_hdl)  &
+    ( gridgroup_hdl, comment, description, group_ref, mask_0d, mask_1d, mask_2d, mask_3d, mask_4d  &
+    , mask_5d, mask_6d, mask_7d, name )
+
+    IMPLICIT NONE
+      TYPE(txios(gridgroup)) , INTENT(IN) :: gridgroup_hdl
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: comment
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: description
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: group_ref
+      LOGICAL  , OPTIONAL, INTENT(OUT) :: mask_0d(:)
+      LOGICAL (KIND=C_BOOL) , ALLOCATABLE :: mask_0d_tmp(:)
+      LOGICAL  , OPTIONAL, INTENT(OUT) :: mask_1d(:)
+      LOGICAL (KIND=C_BOOL) , ALLOCATABLE :: mask_1d_tmp(:)
+      LOGICAL  , OPTIONAL, INTENT(OUT) :: mask_2d(:,:)
+      LOGICAL (KIND=C_BOOL) , ALLOCATABLE :: mask_2d_tmp(:,:)
+      LOGICAL  , OPTIONAL, INTENT(OUT) :: mask_3d(:,:,:)
+      LOGICAL (KIND=C_BOOL) , ALLOCATABLE :: mask_3d_tmp(:,:,:)
+      LOGICAL  , OPTIONAL, INTENT(OUT) :: mask_4d(:,:,:,:)
+      LOGICAL (KIND=C_BOOL) , ALLOCATABLE :: mask_4d_tmp(:,:,:,:)
+      LOGICAL  , OPTIONAL, INTENT(OUT) :: mask_5d(:,:,:,:,:)
+      LOGICAL (KIND=C_BOOL) , ALLOCATABLE :: mask_5d_tmp(:,:,:,:,:)
+      LOGICAL  , OPTIONAL, INTENT(OUT) :: mask_6d(:,:,:,:,:,:)
+      LOGICAL (KIND=C_BOOL) , ALLOCATABLE :: mask_6d_tmp(:,:,:,:,:,:)
+      LOGICAL  , OPTIONAL, INTENT(OUT) :: mask_7d(:,:,:,:,:,:,:)
+      LOGICAL (KIND=C_BOOL) , ALLOCATABLE :: mask_7d_tmp(:,:,:,:,:,:,:)
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: name
+
+      CALL xios(get_gridgroup_attr_hdl_)  &
+      ( gridgroup_hdl, comment, description, group_ref, mask_0d, mask_1d, mask_2d, mask_3d, mask_4d  &
+      , mask_5d, mask_6d, mask_7d, name )
+
+  END SUBROUTINE xios(get_gridgroup_attr_hdl)
+
+  SUBROUTINE xios(get_gridgroup_attr_hdl_)   &
+    ( gridgroup_hdl, comment_, description_, group_ref_, mask_0d_, mask_1d_, mask_2d_, mask_3d_  &
+    , mask_4d_, mask_5d_, mask_6d_, mask_7d_, name_ )
+
+    IMPLICIT NONE
+      TYPE(txios(gridgroup)) , INTENT(IN) :: gridgroup_hdl
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: comment_
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: description_
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: group_ref_
+      LOGICAL  , OPTIONAL, INTENT(OUT) :: mask_0d_(:)
+      LOGICAL (KIND=C_BOOL) , ALLOCATABLE :: mask_0d__tmp(:)
+      LOGICAL  , OPTIONAL, INTENT(OUT) :: mask_1d_(:)
+      LOGICAL (KIND=C_BOOL) , ALLOCATABLE :: mask_1d__tmp(:)
+      LOGICAL  , OPTIONAL, INTENT(OUT) :: mask_2d_(:,:)
+      LOGICAL (KIND=C_BOOL) , ALLOCATABLE :: mask_2d__tmp(:,:)
+      LOGICAL  , OPTIONAL, INTENT(OUT) :: mask_3d_(:,:,:)
+      LOGICAL (KIND=C_BOOL) , ALLOCATABLE :: mask_3d__tmp(:,:,:)
+      LOGICAL  , OPTIONAL, INTENT(OUT) :: mask_4d_(:,:,:,:)
+      LOGICAL (KIND=C_BOOL) , ALLOCATABLE :: mask_4d__tmp(:,:,:,:)
+      LOGICAL  , OPTIONAL, INTENT(OUT) :: mask_5d_(:,:,:,:,:)
+      LOGICAL (KIND=C_BOOL) , ALLOCATABLE :: mask_5d__tmp(:,:,:,:,:)
+      LOGICAL  , OPTIONAL, INTENT(OUT) :: mask_6d_(:,:,:,:,:,:)
+      LOGICAL (KIND=C_BOOL) , ALLOCATABLE :: mask_6d__tmp(:,:,:,:,:,:)
+      LOGICAL  , OPTIONAL, INTENT(OUT) :: mask_7d_(:,:,:,:,:,:,:)
+      LOGICAL (KIND=C_BOOL) , ALLOCATABLE :: mask_7d__tmp(:,:,:,:,:,:,:)
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: name_
+
+      IF (PRESENT(comment_)) THEN
+        CALL cxios_get_gridgroup_comment &
+      (gridgroup_hdl%daddr, comment_, len(comment_))
+      ENDIF
+
+      IF (PRESENT(description_)) THEN
+        CALL cxios_get_gridgroup_description &
+      (gridgroup_hdl%daddr, description_, len(description_))
+      ENDIF
+
+      IF (PRESENT(group_ref_)) THEN
+        CALL cxios_get_gridgroup_group_ref &
+      (gridgroup_hdl%daddr, group_ref_, len(group_ref_))
+      ENDIF
+
+      IF (PRESENT(mask_0d_)) THEN
+        ALLOCATE(mask_0d__tmp(SIZE(mask_0d_,1)))
+        CALL cxios_get_gridgroup_mask_0d &
+      (gridgroup_hdl%daddr, mask_0d__tmp, SHAPE(mask_0d_))
+        mask_0d_ = mask_0d__tmp
+      ENDIF
+
+      IF (PRESENT(mask_1d_)) THEN
+        ALLOCATE(mask_1d__tmp(SIZE(mask_1d_,1)))
+        CALL cxios_get_gridgroup_mask_1d &
+      (gridgroup_hdl%daddr, mask_1d__tmp, SHAPE(mask_1d_))
+        mask_1d_ = mask_1d__tmp
+      ENDIF
+
+      IF (PRESENT(mask_2d_)) THEN
+        ALLOCATE(mask_2d__tmp(SIZE(mask_2d_,1), SIZE(mask_2d_,2)))
+        CALL cxios_get_gridgroup_mask_2d &
+      (gridgroup_hdl%daddr, mask_2d__tmp, SHAPE(mask_2d_))
+        mask_2d_ = mask_2d__tmp
+      ENDIF
+
+      IF (PRESENT(mask_3d_)) THEN
+        ALLOCATE(mask_3d__tmp(SIZE(mask_3d_,1), SIZE(mask_3d_,2), SIZE(mask_3d_,3)))
+        CALL cxios_get_gridgroup_mask_3d &
+      (gridgroup_hdl%daddr, mask_3d__tmp, SHAPE(mask_3d_))
+        mask_3d_ = mask_3d__tmp
+      ENDIF
+
+      IF (PRESENT(mask_4d_)) THEN
+        ALLOCATE(mask_4d__tmp(SIZE(mask_4d_,1), SIZE(mask_4d_,2), SIZE(mask_4d_,3), &
+       SIZE(mask_4d_,4)))
+        CALL cxios_get_gridgroup_mask_4d &
+      (gridgroup_hdl%daddr, mask_4d__tmp, SHAPE(mask_4d_))
+        mask_4d_ = mask_4d__tmp
+      ENDIF
+
+      IF (PRESENT(mask_5d_)) THEN
+        ALLOCATE(mask_5d__tmp(SIZE(mask_5d_,1), SIZE(mask_5d_,2), SIZE(mask_5d_,3), &
+       SIZE(mask_5d_,4), SIZE(mask_5d_,5)))
+        CALL cxios_get_gridgroup_mask_5d &
+      (gridgroup_hdl%daddr, mask_5d__tmp, SHAPE(mask_5d_))
+        mask_5d_ = mask_5d__tmp
+      ENDIF
+
+      IF (PRESENT(mask_6d_)) THEN
+        ALLOCATE(mask_6d__tmp(SIZE(mask_6d_,1), SIZE(mask_6d_,2), SIZE(mask_6d_,3), &
+       SIZE(mask_6d_,4), SIZE(mask_6d_,5), SIZE(mask_6d_,6)))
+        CALL cxios_get_gridgroup_mask_6d &
+      (gridgroup_hdl%daddr, mask_6d__tmp, SHAPE(mask_6d_))
+        mask_6d_ = mask_6d__tmp
+      ENDIF
+
+      IF (PRESENT(mask_7d_)) THEN
+        ALLOCATE(mask_7d__tmp(SIZE(mask_7d_,1), SIZE(mask_7d_,2), SIZE(mask_7d_,3), &
+       SIZE(mask_7d_,4), SIZE(mask_7d_,5), SIZE(mask_7d_,6), &
+       SIZE(mask_7d_,7)))
+        CALL cxios_get_gridgroup_mask_7d &
+      (gridgroup_hdl%daddr, mask_7d__tmp, SHAPE(mask_7d_))
+        mask_7d_ = mask_7d__tmp
+      ENDIF
+
+      IF (PRESENT(name_)) THEN
+        CALL cxios_get_gridgroup_name &
+      (gridgroup_hdl%daddr, name_, len(name_))
+      ENDIF
+
+  END SUBROUTINE xios(get_gridgroup_attr_hdl_)
+
+  SUBROUTINE xios(is_defined_gridgroup_attr)  &
+    ( gridgroup_id, comment, description, group_ref, mask_0d, mask_1d, mask_2d, mask_3d, mask_4d  &
+    , mask_5d, mask_6d, mask_7d, name )
+
+    IMPLICIT NONE
+      TYPE(txios(gridgroup))  :: gridgroup_hdl
+      CHARACTER(LEN=*), INTENT(IN) ::gridgroup_id
+      LOGICAL, OPTIONAL, INTENT(OUT) :: comment
+      LOGICAL(KIND=C_BOOL) :: comment_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: description
+      LOGICAL(KIND=C_BOOL) :: description_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: group_ref
+      LOGICAL(KIND=C_BOOL) :: group_ref_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: mask_0d
+      LOGICAL(KIND=C_BOOL) :: mask_0d_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: mask_1d
+      LOGICAL(KIND=C_BOOL) :: mask_1d_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: mask_2d
+      LOGICAL(KIND=C_BOOL) :: mask_2d_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: mask_3d
+      LOGICAL(KIND=C_BOOL) :: mask_3d_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: mask_4d
+      LOGICAL(KIND=C_BOOL) :: mask_4d_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: mask_5d
+      LOGICAL(KIND=C_BOOL) :: mask_5d_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: mask_6d
+      LOGICAL(KIND=C_BOOL) :: mask_6d_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: mask_7d
+      LOGICAL(KIND=C_BOOL) :: mask_7d_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: name
+      LOGICAL(KIND=C_BOOL) :: name_tmp
+
+      CALL xios(get_gridgroup_handle) &
+      (gridgroup_id,gridgroup_hdl)
+      CALL xios(is_defined_gridgroup_attr_hdl_)   &
+      ( gridgroup_hdl, comment, description, group_ref, mask_0d, mask_1d, mask_2d, mask_3d, mask_4d  &
+      , mask_5d, mask_6d, mask_7d, name )
+
+  END SUBROUTINE xios(is_defined_gridgroup_attr)
+
+  SUBROUTINE xios(is_defined_gridgroup_attr_hdl)  &
+    ( gridgroup_hdl, comment, description, group_ref, mask_0d, mask_1d, mask_2d, mask_3d, mask_4d  &
+    , mask_5d, mask_6d, mask_7d, name )
+
+    IMPLICIT NONE
+      TYPE(txios(gridgroup)) , INTENT(IN) :: gridgroup_hdl
+      LOGICAL, OPTIONAL, INTENT(OUT) :: comment
+      LOGICAL(KIND=C_BOOL) :: comment_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: description
+      LOGICAL(KIND=C_BOOL) :: description_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: group_ref
+      LOGICAL(KIND=C_BOOL) :: group_ref_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: mask_0d
+      LOGICAL(KIND=C_BOOL) :: mask_0d_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: mask_1d
+      LOGICAL(KIND=C_BOOL) :: mask_1d_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: mask_2d
+      LOGICAL(KIND=C_BOOL) :: mask_2d_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: mask_3d
+      LOGICAL(KIND=C_BOOL) :: mask_3d_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: mask_4d
+      LOGICAL(KIND=C_BOOL) :: mask_4d_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: mask_5d
+      LOGICAL(KIND=C_BOOL) :: mask_5d_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: mask_6d
+      LOGICAL(KIND=C_BOOL) :: mask_6d_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: mask_7d
+      LOGICAL(KIND=C_BOOL) :: mask_7d_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: name
+      LOGICAL(KIND=C_BOOL) :: name_tmp
+
+      CALL xios(is_defined_gridgroup_attr_hdl_)  &
+      ( gridgroup_hdl, comment, description, group_ref, mask_0d, mask_1d, mask_2d, mask_3d, mask_4d  &
+      , mask_5d, mask_6d, mask_7d, name )
+
+  END SUBROUTINE xios(is_defined_gridgroup_attr_hdl)
+
+  SUBROUTINE xios(is_defined_gridgroup_attr_hdl_)   &
+    ( gridgroup_hdl, comment_, description_, group_ref_, mask_0d_, mask_1d_, mask_2d_, mask_3d_  &
+    , mask_4d_, mask_5d_, mask_6d_, mask_7d_, name_ )
+
+    IMPLICIT NONE
+      TYPE(txios(gridgroup)) , INTENT(IN) :: gridgroup_hdl
+      LOGICAL, OPTIONAL, INTENT(OUT) :: comment_
+      LOGICAL(KIND=C_BOOL) :: comment__tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: description_
+      LOGICAL(KIND=C_BOOL) :: description__tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: group_ref_
+      LOGICAL(KIND=C_BOOL) :: group_ref__tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: mask_0d_
+      LOGICAL(KIND=C_BOOL) :: mask_0d__tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: mask_1d_
+      LOGICAL(KIND=C_BOOL) :: mask_1d__tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: mask_2d_
+      LOGICAL(KIND=C_BOOL) :: mask_2d__tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: mask_3d_
+      LOGICAL(KIND=C_BOOL) :: mask_3d__tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: mask_4d_
+      LOGICAL(KIND=C_BOOL) :: mask_4d__tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: mask_5d_
+      LOGICAL(KIND=C_BOOL) :: mask_5d__tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: mask_6d_
+      LOGICAL(KIND=C_BOOL) :: mask_6d__tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: mask_7d_
+      LOGICAL(KIND=C_BOOL) :: mask_7d__tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: name_
+      LOGICAL(KIND=C_BOOL) :: name__tmp
+
+      IF (PRESENT(comment_)) THEN
+        comment__tmp = cxios_is_defined_gridgroup_comment &
+      (gridgroup_hdl%daddr)
+        comment_ = comment__tmp
+      ENDIF
+
+      IF (PRESENT(description_)) THEN
+        description__tmp = cxios_is_defined_gridgroup_description &
+      (gridgroup_hdl%daddr)
+        description_ = description__tmp
+      ENDIF
+
+      IF (PRESENT(group_ref_)) THEN
+        group_ref__tmp = cxios_is_defined_gridgroup_group_ref &
+      (gridgroup_hdl%daddr)
+        group_ref_ = group_ref__tmp
+      ENDIF
+
+      IF (PRESENT(mask_0d_)) THEN
+        mask_0d__tmp = cxios_is_defined_gridgroup_mask_0d &
+      (gridgroup_hdl%daddr)
+        mask_0d_ = mask_0d__tmp
+      ENDIF
+
+      IF (PRESENT(mask_1d_)) THEN
+        mask_1d__tmp = cxios_is_defined_gridgroup_mask_1d &
+      (gridgroup_hdl%daddr)
+        mask_1d_ = mask_1d__tmp
+      ENDIF
+
+      IF (PRESENT(mask_2d_)) THEN
+        mask_2d__tmp = cxios_is_defined_gridgroup_mask_2d &
+      (gridgroup_hdl%daddr)
+        mask_2d_ = mask_2d__tmp
+      ENDIF
+
+      IF (PRESENT(mask_3d_)) THEN
+        mask_3d__tmp = cxios_is_defined_gridgroup_mask_3d &
+      (gridgroup_hdl%daddr)
+        mask_3d_ = mask_3d__tmp
+      ENDIF
+
+      IF (PRESENT(mask_4d_)) THEN
+        mask_4d__tmp = cxios_is_defined_gridgroup_mask_4d &
+      (gridgroup_hdl%daddr)
+        mask_4d_ = mask_4d__tmp
+      ENDIF
+
+      IF (PRESENT(mask_5d_)) THEN
+        mask_5d__tmp = cxios_is_defined_gridgroup_mask_5d &
+      (gridgroup_hdl%daddr)
+        mask_5d_ = mask_5d__tmp
+      ENDIF
+
+      IF (PRESENT(mask_6d_)) THEN
+        mask_6d__tmp = cxios_is_defined_gridgroup_mask_6d &
+      (gridgroup_hdl%daddr)
+        mask_6d_ = mask_6d__tmp
+      ENDIF
+
+      IF (PRESENT(mask_7d_)) THEN
+        mask_7d__tmp = cxios_is_defined_gridgroup_mask_7d &
+      (gridgroup_hdl%daddr)
+        mask_7d_ = mask_7d__tmp
+      ENDIF
+
+      IF (PRESENT(name_)) THEN
+        name__tmp = cxios_is_defined_gridgroup_name &
+      (gridgroup_hdl%daddr)
+        name_ = name__tmp
+      ENDIF
+
+  END SUBROUTINE xios(is_defined_gridgroup_attr_hdl_)
+
+END MODULE igridgroup_attr
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/fortran_attr/iinterpolate_axis_attr.F90
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/fortran_attr/iinterpolate_axis_attr.F90	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/fortran_attr/iinterpolate_axis_attr.F90	(revision 1749)
@@ -0,0 +1,196 @@
+! * ************************************************************************** *
+! *               Interface auto generated - do not modify                     *
+! * ************************************************************************** *
+#include "xios_fortran_prefix.hpp"
+
+MODULE iinterpolate_axis_attr
+  USE, INTRINSIC :: ISO_C_BINDING
+  USE iinterpolate_axis
+  USE interpolate_axis_interface_attr
+
+CONTAINS
+
+  SUBROUTINE xios(set_interpolate_axis_attr)  &
+    ( interpolate_axis_id, coordinate, order, type )
+
+    IMPLICIT NONE
+      TYPE(txios(interpolate_axis))  :: interpolate_axis_hdl
+      CHARACTER(LEN=*), INTENT(IN) ::interpolate_axis_id
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: coordinate
+      INTEGER  , OPTIONAL, INTENT(IN) :: order
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: type
+
+      CALL xios(get_interpolate_axis_handle) &
+      (interpolate_axis_id,interpolate_axis_hdl)
+      CALL xios(set_interpolate_axis_attr_hdl_)   &
+      ( interpolate_axis_hdl, coordinate, order, type )
+
+  END SUBROUTINE xios(set_interpolate_axis_attr)
+
+  SUBROUTINE xios(set_interpolate_axis_attr_hdl)  &
+    ( interpolate_axis_hdl, coordinate, order, type )
+
+    IMPLICIT NONE
+      TYPE(txios(interpolate_axis)) , INTENT(IN) :: interpolate_axis_hdl
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: coordinate
+      INTEGER  , OPTIONAL, INTENT(IN) :: order
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: type
+
+      CALL xios(set_interpolate_axis_attr_hdl_)  &
+      ( interpolate_axis_hdl, coordinate, order, type )
+
+  END SUBROUTINE xios(set_interpolate_axis_attr_hdl)
+
+  SUBROUTINE xios(set_interpolate_axis_attr_hdl_)   &
+    ( interpolate_axis_hdl, coordinate_, order_, type_ )
+
+    IMPLICIT NONE
+      TYPE(txios(interpolate_axis)) , INTENT(IN) :: interpolate_axis_hdl
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: coordinate_
+      INTEGER  , OPTIONAL, INTENT(IN) :: order_
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: type_
+
+      IF (PRESENT(coordinate_)) THEN
+        CALL cxios_set_interpolate_axis_coordinate &
+      (interpolate_axis_hdl%daddr, coordinate_, len(coordinate_))
+      ENDIF
+
+      IF (PRESENT(order_)) THEN
+        CALL cxios_set_interpolate_axis_order &
+      (interpolate_axis_hdl%daddr, order_)
+      ENDIF
+
+      IF (PRESENT(type_)) THEN
+        CALL cxios_set_interpolate_axis_type &
+      (interpolate_axis_hdl%daddr, type_, len(type_))
+      ENDIF
+
+  END SUBROUTINE xios(set_interpolate_axis_attr_hdl_)
+
+  SUBROUTINE xios(get_interpolate_axis_attr)  &
+    ( interpolate_axis_id, coordinate, order, type )
+
+    IMPLICIT NONE
+      TYPE(txios(interpolate_axis))  :: interpolate_axis_hdl
+      CHARACTER(LEN=*), INTENT(IN) ::interpolate_axis_id
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: coordinate
+      INTEGER  , OPTIONAL, INTENT(OUT) :: order
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: type
+
+      CALL xios(get_interpolate_axis_handle) &
+      (interpolate_axis_id,interpolate_axis_hdl)
+      CALL xios(get_interpolate_axis_attr_hdl_)   &
+      ( interpolate_axis_hdl, coordinate, order, type )
+
+  END SUBROUTINE xios(get_interpolate_axis_attr)
+
+  SUBROUTINE xios(get_interpolate_axis_attr_hdl)  &
+    ( interpolate_axis_hdl, coordinate, order, type )
+
+    IMPLICIT NONE
+      TYPE(txios(interpolate_axis)) , INTENT(IN) :: interpolate_axis_hdl
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: coordinate
+      INTEGER  , OPTIONAL, INTENT(OUT) :: order
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: type
+
+      CALL xios(get_interpolate_axis_attr_hdl_)  &
+      ( interpolate_axis_hdl, coordinate, order, type )
+
+  END SUBROUTINE xios(get_interpolate_axis_attr_hdl)
+
+  SUBROUTINE xios(get_interpolate_axis_attr_hdl_)   &
+    ( interpolate_axis_hdl, coordinate_, order_, type_ )
+
+    IMPLICIT NONE
+      TYPE(txios(interpolate_axis)) , INTENT(IN) :: interpolate_axis_hdl
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: coordinate_
+      INTEGER  , OPTIONAL, INTENT(OUT) :: order_
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: type_
+
+      IF (PRESENT(coordinate_)) THEN
+        CALL cxios_get_interpolate_axis_coordinate &
+      (interpolate_axis_hdl%daddr, coordinate_, len(coordinate_))
+      ENDIF
+
+      IF (PRESENT(order_)) THEN
+        CALL cxios_get_interpolate_axis_order &
+      (interpolate_axis_hdl%daddr, order_)
+      ENDIF
+
+      IF (PRESENT(type_)) THEN
+        CALL cxios_get_interpolate_axis_type &
+      (interpolate_axis_hdl%daddr, type_, len(type_))
+      ENDIF
+
+  END SUBROUTINE xios(get_interpolate_axis_attr_hdl_)
+
+  SUBROUTINE xios(is_defined_interpolate_axis_attr)  &
+    ( interpolate_axis_id, coordinate, order, type )
+
+    IMPLICIT NONE
+      TYPE(txios(interpolate_axis))  :: interpolate_axis_hdl
+      CHARACTER(LEN=*), INTENT(IN) ::interpolate_axis_id
+      LOGICAL, OPTIONAL, INTENT(OUT) :: coordinate
+      LOGICAL(KIND=C_BOOL) :: coordinate_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: order
+      LOGICAL(KIND=C_BOOL) :: order_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: type
+      LOGICAL(KIND=C_BOOL) :: type_tmp
+
+      CALL xios(get_interpolate_axis_handle) &
+      (interpolate_axis_id,interpolate_axis_hdl)
+      CALL xios(is_defined_interpolate_axis_attr_hdl_)   &
+      ( interpolate_axis_hdl, coordinate, order, type )
+
+  END SUBROUTINE xios(is_defined_interpolate_axis_attr)
+
+  SUBROUTINE xios(is_defined_interpolate_axis_attr_hdl)  &
+    ( interpolate_axis_hdl, coordinate, order, type )
+
+    IMPLICIT NONE
+      TYPE(txios(interpolate_axis)) , INTENT(IN) :: interpolate_axis_hdl
+      LOGICAL, OPTIONAL, INTENT(OUT) :: coordinate
+      LOGICAL(KIND=C_BOOL) :: coordinate_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: order
+      LOGICAL(KIND=C_BOOL) :: order_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: type
+      LOGICAL(KIND=C_BOOL) :: type_tmp
+
+      CALL xios(is_defined_interpolate_axis_attr_hdl_)  &
+      ( interpolate_axis_hdl, coordinate, order, type )
+
+  END SUBROUTINE xios(is_defined_interpolate_axis_attr_hdl)
+
+  SUBROUTINE xios(is_defined_interpolate_axis_attr_hdl_)   &
+    ( interpolate_axis_hdl, coordinate_, order_, type_ )
+
+    IMPLICIT NONE
+      TYPE(txios(interpolate_axis)) , INTENT(IN) :: interpolate_axis_hdl
+      LOGICAL, OPTIONAL, INTENT(OUT) :: coordinate_
+      LOGICAL(KIND=C_BOOL) :: coordinate__tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: order_
+      LOGICAL(KIND=C_BOOL) :: order__tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: type_
+      LOGICAL(KIND=C_BOOL) :: type__tmp
+
+      IF (PRESENT(coordinate_)) THEN
+        coordinate__tmp = cxios_is_defined_interpolate_axis_coordinate &
+      (interpolate_axis_hdl%daddr)
+        coordinate_ = coordinate__tmp
+      ENDIF
+
+      IF (PRESENT(order_)) THEN
+        order__tmp = cxios_is_defined_interpolate_axis_order &
+      (interpolate_axis_hdl%daddr)
+        order_ = order__tmp
+      ENDIF
+
+      IF (PRESENT(type_)) THEN
+        type__tmp = cxios_is_defined_interpolate_axis_type &
+      (interpolate_axis_hdl%daddr)
+        type_ = type__tmp
+      ENDIF
+
+  END SUBROUTINE xios(is_defined_interpolate_axis_attr_hdl_)
+
+END MODULE iinterpolate_axis_attr
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/fortran_attr/iinterpolate_domain_attr.F90
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/fortran_attr/iinterpolate_domain_attr.F90	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/fortran_attr/iinterpolate_domain_attr.F90	(revision 1749)
@@ -0,0 +1,419 @@
+! * ************************************************************************** *
+! *               Interface auto generated - do not modify                     *
+! * ************************************************************************** *
+#include "xios_fortran_prefix.hpp"
+
+MODULE iinterpolate_domain_attr
+  USE, INTRINSIC :: ISO_C_BINDING
+  USE iinterpolate_domain
+  USE interpolate_domain_interface_attr
+
+CONTAINS
+
+  SUBROUTINE xios(set_interpolate_domain_attr)  &
+    ( interpolate_domain_id, detect_missing_value, mode, order, quantity, read_write_convention  &
+    , renormalize, use_area, weight_filename, write_weight )
+
+    IMPLICIT NONE
+      TYPE(txios(interpolate_domain))  :: interpolate_domain_hdl
+      CHARACTER(LEN=*), INTENT(IN) ::interpolate_domain_id
+      LOGICAL  , OPTIONAL, INTENT(IN) :: detect_missing_value
+      LOGICAL (KIND=C_BOOL) :: detect_missing_value_tmp
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: mode
+      INTEGER  , OPTIONAL, INTENT(IN) :: order
+      LOGICAL  , OPTIONAL, INTENT(IN) :: quantity
+      LOGICAL (KIND=C_BOOL) :: quantity_tmp
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: read_write_convention
+      LOGICAL  , OPTIONAL, INTENT(IN) :: renormalize
+      LOGICAL (KIND=C_BOOL) :: renormalize_tmp
+      LOGICAL  , OPTIONAL, INTENT(IN) :: use_area
+      LOGICAL (KIND=C_BOOL) :: use_area_tmp
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: weight_filename
+      LOGICAL  , OPTIONAL, INTENT(IN) :: write_weight
+      LOGICAL (KIND=C_BOOL) :: write_weight_tmp
+
+      CALL xios(get_interpolate_domain_handle) &
+      (interpolate_domain_id,interpolate_domain_hdl)
+      CALL xios(set_interpolate_domain_attr_hdl_)   &
+      ( interpolate_domain_hdl, detect_missing_value, mode, order, quantity, read_write_convention  &
+      , renormalize, use_area, weight_filename, write_weight )
+
+  END SUBROUTINE xios(set_interpolate_domain_attr)
+
+  SUBROUTINE xios(set_interpolate_domain_attr_hdl)  &
+    ( interpolate_domain_hdl, detect_missing_value, mode, order, quantity, read_write_convention  &
+    , renormalize, use_area, weight_filename, write_weight )
+
+    IMPLICIT NONE
+      TYPE(txios(interpolate_domain)) , INTENT(IN) :: interpolate_domain_hdl
+      LOGICAL  , OPTIONAL, INTENT(IN) :: detect_missing_value
+      LOGICAL (KIND=C_BOOL) :: detect_missing_value_tmp
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: mode
+      INTEGER  , OPTIONAL, INTENT(IN) :: order
+      LOGICAL  , OPTIONAL, INTENT(IN) :: quantity
+      LOGICAL (KIND=C_BOOL) :: quantity_tmp
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: read_write_convention
+      LOGICAL  , OPTIONAL, INTENT(IN) :: renormalize
+      LOGICAL (KIND=C_BOOL) :: renormalize_tmp
+      LOGICAL  , OPTIONAL, INTENT(IN) :: use_area
+      LOGICAL (KIND=C_BOOL) :: use_area_tmp
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: weight_filename
+      LOGICAL  , OPTIONAL, INTENT(IN) :: write_weight
+      LOGICAL (KIND=C_BOOL) :: write_weight_tmp
+
+      CALL xios(set_interpolate_domain_attr_hdl_)  &
+      ( interpolate_domain_hdl, detect_missing_value, mode, order, quantity, read_write_convention  &
+      , renormalize, use_area, weight_filename, write_weight )
+
+  END SUBROUTINE xios(set_interpolate_domain_attr_hdl)
+
+  SUBROUTINE xios(set_interpolate_domain_attr_hdl_)   &
+    ( interpolate_domain_hdl, detect_missing_value_, mode_, order_, quantity_, read_write_convention_  &
+    , renormalize_, use_area_, weight_filename_, write_weight_ )
+
+    IMPLICIT NONE
+      TYPE(txios(interpolate_domain)) , INTENT(IN) :: interpolate_domain_hdl
+      LOGICAL  , OPTIONAL, INTENT(IN) :: detect_missing_value_
+      LOGICAL (KIND=C_BOOL) :: detect_missing_value__tmp
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: mode_
+      INTEGER  , OPTIONAL, INTENT(IN) :: order_
+      LOGICAL  , OPTIONAL, INTENT(IN) :: quantity_
+      LOGICAL (KIND=C_BOOL) :: quantity__tmp
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: read_write_convention_
+      LOGICAL  , OPTIONAL, INTENT(IN) :: renormalize_
+      LOGICAL (KIND=C_BOOL) :: renormalize__tmp
+      LOGICAL  , OPTIONAL, INTENT(IN) :: use_area_
+      LOGICAL (KIND=C_BOOL) :: use_area__tmp
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: weight_filename_
+      LOGICAL  , OPTIONAL, INTENT(IN) :: write_weight_
+      LOGICAL (KIND=C_BOOL) :: write_weight__tmp
+
+      IF (PRESENT(detect_missing_value_)) THEN
+        detect_missing_value__tmp = detect_missing_value_
+        CALL cxios_set_interpolate_domain_detect_missing_value &
+      (interpolate_domain_hdl%daddr, detect_missing_value__tmp)
+      ENDIF
+
+      IF (PRESENT(mode_)) THEN
+        CALL cxios_set_interpolate_domain_mode &
+      (interpolate_domain_hdl%daddr, mode_, len(mode_))
+      ENDIF
+
+      IF (PRESENT(order_)) THEN
+        CALL cxios_set_interpolate_domain_order &
+      (interpolate_domain_hdl%daddr, order_)
+      ENDIF
+
+      IF (PRESENT(quantity_)) THEN
+        quantity__tmp = quantity_
+        CALL cxios_set_interpolate_domain_quantity &
+      (interpolate_domain_hdl%daddr, quantity__tmp)
+      ENDIF
+
+      IF (PRESENT(read_write_convention_)) THEN
+        CALL cxios_set_interpolate_domain_read_write_convention &
+      (interpolate_domain_hdl%daddr, read_write_convention_, len(read_write_convention_))
+      ENDIF
+
+      IF (PRESENT(renormalize_)) THEN
+        renormalize__tmp = renormalize_
+        CALL cxios_set_interpolate_domain_renormalize &
+      (interpolate_domain_hdl%daddr, renormalize__tmp)
+      ENDIF
+
+      IF (PRESENT(use_area_)) THEN
+        use_area__tmp = use_area_
+        CALL cxios_set_interpolate_domain_use_area &
+      (interpolate_domain_hdl%daddr, use_area__tmp)
+      ENDIF
+
+      IF (PRESENT(weight_filename_)) THEN
+        CALL cxios_set_interpolate_domain_weight_filename &
+      (interpolate_domain_hdl%daddr, weight_filename_, len(weight_filename_))
+      ENDIF
+
+      IF (PRESENT(write_weight_)) THEN
+        write_weight__tmp = write_weight_
+        CALL cxios_set_interpolate_domain_write_weight &
+      (interpolate_domain_hdl%daddr, write_weight__tmp)
+      ENDIF
+
+  END SUBROUTINE xios(set_interpolate_domain_attr_hdl_)
+
+  SUBROUTINE xios(get_interpolate_domain_attr)  &
+    ( interpolate_domain_id, detect_missing_value, mode, order, quantity, read_write_convention  &
+    , renormalize, use_area, weight_filename, write_weight )
+
+    IMPLICIT NONE
+      TYPE(txios(interpolate_domain))  :: interpolate_domain_hdl
+      CHARACTER(LEN=*), INTENT(IN) ::interpolate_domain_id
+      LOGICAL  , OPTIONAL, INTENT(OUT) :: detect_missing_value
+      LOGICAL (KIND=C_BOOL) :: detect_missing_value_tmp
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: mode
+      INTEGER  , OPTIONAL, INTENT(OUT) :: order
+      LOGICAL  , OPTIONAL, INTENT(OUT) :: quantity
+      LOGICAL (KIND=C_BOOL) :: quantity_tmp
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: read_write_convention
+      LOGICAL  , OPTIONAL, INTENT(OUT) :: renormalize
+      LOGICAL (KIND=C_BOOL) :: renormalize_tmp
+      LOGICAL  , OPTIONAL, INTENT(OUT) :: use_area
+      LOGICAL (KIND=C_BOOL) :: use_area_tmp
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: weight_filename
+      LOGICAL  , OPTIONAL, INTENT(OUT) :: write_weight
+      LOGICAL (KIND=C_BOOL) :: write_weight_tmp
+
+      CALL xios(get_interpolate_domain_handle) &
+      (interpolate_domain_id,interpolate_domain_hdl)
+      CALL xios(get_interpolate_domain_attr_hdl_)   &
+      ( interpolate_domain_hdl, detect_missing_value, mode, order, quantity, read_write_convention  &
+      , renormalize, use_area, weight_filename, write_weight )
+
+  END SUBROUTINE xios(get_interpolate_domain_attr)
+
+  SUBROUTINE xios(get_interpolate_domain_attr_hdl)  &
+    ( interpolate_domain_hdl, detect_missing_value, mode, order, quantity, read_write_convention  &
+    , renormalize, use_area, weight_filename, write_weight )
+
+    IMPLICIT NONE
+      TYPE(txios(interpolate_domain)) , INTENT(IN) :: interpolate_domain_hdl
+      LOGICAL  , OPTIONAL, INTENT(OUT) :: detect_missing_value
+      LOGICAL (KIND=C_BOOL) :: detect_missing_value_tmp
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: mode
+      INTEGER  , OPTIONAL, INTENT(OUT) :: order
+      LOGICAL  , OPTIONAL, INTENT(OUT) :: quantity
+      LOGICAL (KIND=C_BOOL) :: quantity_tmp
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: read_write_convention
+      LOGICAL  , OPTIONAL, INTENT(OUT) :: renormalize
+      LOGICAL (KIND=C_BOOL) :: renormalize_tmp
+      LOGICAL  , OPTIONAL, INTENT(OUT) :: use_area
+      LOGICAL (KIND=C_BOOL) :: use_area_tmp
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: weight_filename
+      LOGICAL  , OPTIONAL, INTENT(OUT) :: write_weight
+      LOGICAL (KIND=C_BOOL) :: write_weight_tmp
+
+      CALL xios(get_interpolate_domain_attr_hdl_)  &
+      ( interpolate_domain_hdl, detect_missing_value, mode, order, quantity, read_write_convention  &
+      , renormalize, use_area, weight_filename, write_weight )
+
+  END SUBROUTINE xios(get_interpolate_domain_attr_hdl)
+
+  SUBROUTINE xios(get_interpolate_domain_attr_hdl_)   &
+    ( interpolate_domain_hdl, detect_missing_value_, mode_, order_, quantity_, read_write_convention_  &
+    , renormalize_, use_area_, weight_filename_, write_weight_ )
+
+    IMPLICIT NONE
+      TYPE(txios(interpolate_domain)) , INTENT(IN) :: interpolate_domain_hdl
+      LOGICAL  , OPTIONAL, INTENT(OUT) :: detect_missing_value_
+      LOGICAL (KIND=C_BOOL) :: detect_missing_value__tmp
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: mode_
+      INTEGER  , OPTIONAL, INTENT(OUT) :: order_
+      LOGICAL  , OPTIONAL, INTENT(OUT) :: quantity_
+      LOGICAL (KIND=C_BOOL) :: quantity__tmp
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: read_write_convention_
+      LOGICAL  , OPTIONAL, INTENT(OUT) :: renormalize_
+      LOGICAL (KIND=C_BOOL) :: renormalize__tmp
+      LOGICAL  , OPTIONAL, INTENT(OUT) :: use_area_
+      LOGICAL (KIND=C_BOOL) :: use_area__tmp
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: weight_filename_
+      LOGICAL  , OPTIONAL, INTENT(OUT) :: write_weight_
+      LOGICAL (KIND=C_BOOL) :: write_weight__tmp
+
+      IF (PRESENT(detect_missing_value_)) THEN
+        CALL cxios_get_interpolate_domain_detect_missing_value &
+      (interpolate_domain_hdl%daddr, detect_missing_value__tmp)
+        detect_missing_value_ = detect_missing_value__tmp
+      ENDIF
+
+      IF (PRESENT(mode_)) THEN
+        CALL cxios_get_interpolate_domain_mode &
+      (interpolate_domain_hdl%daddr, mode_, len(mode_))
+      ENDIF
+
+      IF (PRESENT(order_)) THEN
+        CALL cxios_get_interpolate_domain_order &
+      (interpolate_domain_hdl%daddr, order_)
+      ENDIF
+
+      IF (PRESENT(quantity_)) THEN
+        CALL cxios_get_interpolate_domain_quantity &
+      (interpolate_domain_hdl%daddr, quantity__tmp)
+        quantity_ = quantity__tmp
+      ENDIF
+
+      IF (PRESENT(read_write_convention_)) THEN
+        CALL cxios_get_interpolate_domain_read_write_convention &
+      (interpolate_domain_hdl%daddr, read_write_convention_, len(read_write_convention_))
+      ENDIF
+
+      IF (PRESENT(renormalize_)) THEN
+        CALL cxios_get_interpolate_domain_renormalize &
+      (interpolate_domain_hdl%daddr, renormalize__tmp)
+        renormalize_ = renormalize__tmp
+      ENDIF
+
+      IF (PRESENT(use_area_)) THEN
+        CALL cxios_get_interpolate_domain_use_area &
+      (interpolate_domain_hdl%daddr, use_area__tmp)
+        use_area_ = use_area__tmp
+      ENDIF
+
+      IF (PRESENT(weight_filename_)) THEN
+        CALL cxios_get_interpolate_domain_weight_filename &
+      (interpolate_domain_hdl%daddr, weight_filename_, len(weight_filename_))
+      ENDIF
+
+      IF (PRESENT(write_weight_)) THEN
+        CALL cxios_get_interpolate_domain_write_weight &
+      (interpolate_domain_hdl%daddr, write_weight__tmp)
+        write_weight_ = write_weight__tmp
+      ENDIF
+
+  END SUBROUTINE xios(get_interpolate_domain_attr_hdl_)
+
+  SUBROUTINE xios(is_defined_interpolate_domain_attr)  &
+    ( interpolate_domain_id, detect_missing_value, mode, order, quantity, read_write_convention  &
+    , renormalize, use_area, weight_filename, write_weight )
+
+    IMPLICIT NONE
+      TYPE(txios(interpolate_domain))  :: interpolate_domain_hdl
+      CHARACTER(LEN=*), INTENT(IN) ::interpolate_domain_id
+      LOGICAL, OPTIONAL, INTENT(OUT) :: detect_missing_value
+      LOGICAL(KIND=C_BOOL) :: detect_missing_value_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: mode
+      LOGICAL(KIND=C_BOOL) :: mode_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: order
+      LOGICAL(KIND=C_BOOL) :: order_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: quantity
+      LOGICAL(KIND=C_BOOL) :: quantity_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: read_write_convention
+      LOGICAL(KIND=C_BOOL) :: read_write_convention_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: renormalize
+      LOGICAL(KIND=C_BOOL) :: renormalize_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: use_area
+      LOGICAL(KIND=C_BOOL) :: use_area_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: weight_filename
+      LOGICAL(KIND=C_BOOL) :: weight_filename_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: write_weight
+      LOGICAL(KIND=C_BOOL) :: write_weight_tmp
+
+      CALL xios(get_interpolate_domain_handle) &
+      (interpolate_domain_id,interpolate_domain_hdl)
+      CALL xios(is_defined_interpolate_domain_attr_hdl_)   &
+      ( interpolate_domain_hdl, detect_missing_value, mode, order, quantity, read_write_convention  &
+      , renormalize, use_area, weight_filename, write_weight )
+
+  END SUBROUTINE xios(is_defined_interpolate_domain_attr)
+
+  SUBROUTINE xios(is_defined_interpolate_domain_attr_hdl)  &
+    ( interpolate_domain_hdl, detect_missing_value, mode, order, quantity, read_write_convention  &
+    , renormalize, use_area, weight_filename, write_weight )
+
+    IMPLICIT NONE
+      TYPE(txios(interpolate_domain)) , INTENT(IN) :: interpolate_domain_hdl
+      LOGICAL, OPTIONAL, INTENT(OUT) :: detect_missing_value
+      LOGICAL(KIND=C_BOOL) :: detect_missing_value_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: mode
+      LOGICAL(KIND=C_BOOL) :: mode_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: order
+      LOGICAL(KIND=C_BOOL) :: order_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: quantity
+      LOGICAL(KIND=C_BOOL) :: quantity_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: read_write_convention
+      LOGICAL(KIND=C_BOOL) :: read_write_convention_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: renormalize
+      LOGICAL(KIND=C_BOOL) :: renormalize_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: use_area
+      LOGICAL(KIND=C_BOOL) :: use_area_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: weight_filename
+      LOGICAL(KIND=C_BOOL) :: weight_filename_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: write_weight
+      LOGICAL(KIND=C_BOOL) :: write_weight_tmp
+
+      CALL xios(is_defined_interpolate_domain_attr_hdl_)  &
+      ( interpolate_domain_hdl, detect_missing_value, mode, order, quantity, read_write_convention  &
+      , renormalize, use_area, weight_filename, write_weight )
+
+  END SUBROUTINE xios(is_defined_interpolate_domain_attr_hdl)
+
+  SUBROUTINE xios(is_defined_interpolate_domain_attr_hdl_)   &
+    ( interpolate_domain_hdl, detect_missing_value_, mode_, order_, quantity_, read_write_convention_  &
+    , renormalize_, use_area_, weight_filename_, write_weight_ )
+
+    IMPLICIT NONE
+      TYPE(txios(interpolate_domain)) , INTENT(IN) :: interpolate_domain_hdl
+      LOGICAL, OPTIONAL, INTENT(OUT) :: detect_missing_value_
+      LOGICAL(KIND=C_BOOL) :: detect_missing_value__tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: mode_
+      LOGICAL(KIND=C_BOOL) :: mode__tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: order_
+      LOGICAL(KIND=C_BOOL) :: order__tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: quantity_
+      LOGICAL(KIND=C_BOOL) :: quantity__tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: read_write_convention_
+      LOGICAL(KIND=C_BOOL) :: read_write_convention__tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: renormalize_
+      LOGICAL(KIND=C_BOOL) :: renormalize__tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: use_area_
+      LOGICAL(KIND=C_BOOL) :: use_area__tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: weight_filename_
+      LOGICAL(KIND=C_BOOL) :: weight_filename__tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: write_weight_
+      LOGICAL(KIND=C_BOOL) :: write_weight__tmp
+
+      IF (PRESENT(detect_missing_value_)) THEN
+        detect_missing_value__tmp = cxios_is_defined_interpolate_domain_detect_missing_value &
+      (interpolate_domain_hdl%daddr)
+        detect_missing_value_ = detect_missing_value__tmp
+      ENDIF
+
+      IF (PRESENT(mode_)) THEN
+        mode__tmp = cxios_is_defined_interpolate_domain_mode &
+      (interpolate_domain_hdl%daddr)
+        mode_ = mode__tmp
+      ENDIF
+
+      IF (PRESENT(order_)) THEN
+        order__tmp = cxios_is_defined_interpolate_domain_order &
+      (interpolate_domain_hdl%daddr)
+        order_ = order__tmp
+      ENDIF
+
+      IF (PRESENT(quantity_)) THEN
+        quantity__tmp = cxios_is_defined_interpolate_domain_quantity &
+      (interpolate_domain_hdl%daddr)
+        quantity_ = quantity__tmp
+      ENDIF
+
+      IF (PRESENT(read_write_convention_)) THEN
+        read_write_convention__tmp = cxios_is_defined_interpolate_domain_read_write_convention &
+      (interpolate_domain_hdl%daddr)
+        read_write_convention_ = read_write_convention__tmp
+      ENDIF
+
+      IF (PRESENT(renormalize_)) THEN
+        renormalize__tmp = cxios_is_defined_interpolate_domain_renormalize &
+      (interpolate_domain_hdl%daddr)
+        renormalize_ = renormalize__tmp
+      ENDIF
+
+      IF (PRESENT(use_area_)) THEN
+        use_area__tmp = cxios_is_defined_interpolate_domain_use_area &
+      (interpolate_domain_hdl%daddr)
+        use_area_ = use_area__tmp
+      ENDIF
+
+      IF (PRESENT(weight_filename_)) THEN
+        weight_filename__tmp = cxios_is_defined_interpolate_domain_weight_filename &
+      (interpolate_domain_hdl%daddr)
+        weight_filename_ = weight_filename__tmp
+      ENDIF
+
+      IF (PRESENT(write_weight_)) THEN
+        write_weight__tmp = cxios_is_defined_interpolate_domain_write_weight &
+      (interpolate_domain_hdl%daddr)
+        write_weight_ = write_weight__tmp
+      ENDIF
+
+  END SUBROUTINE xios(is_defined_interpolate_domain_attr_hdl_)
+
+END MODULE iinterpolate_domain_attr
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/fortran_attr/iinverse_axis_attr.F90
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/fortran_attr/iinverse_axis_attr.F90	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/fortran_attr/iinverse_axis_attr.F90	(revision 1749)
@@ -0,0 +1,112 @@
+! * ************************************************************************** *
+! *               Interface auto generated - do not modify                     *
+! * ************************************************************************** *
+#include "xios_fortran_prefix.hpp"
+
+MODULE iinverse_axis_attr
+  USE, INTRINSIC :: ISO_C_BINDING
+  USE iinverse_axis
+  USE inverse_axis_interface_attr
+
+CONTAINS
+
+  SUBROUTINE xios(set_inverse_axis_attr)  &
+    ( inverse_axis_id )
+
+    IMPLICIT NONE
+      TYPE(txios(inverse_axis))  :: inverse_axis_hdl
+      CHARACTER(LEN=*), INTENT(IN) ::inverse_axis_id
+
+      CALL xios(get_inverse_axis_handle) &
+      (inverse_axis_id,inverse_axis_hdl)
+      CALL xios(set_inverse_axis_attr_hdl_)   &
+      ( inverse_axis_hdl )
+
+  END SUBROUTINE xios(set_inverse_axis_attr)
+
+  SUBROUTINE xios(set_inverse_axis_attr_hdl)  &
+    ( inverse_axis_hdl )
+
+    IMPLICIT NONE
+      TYPE(txios(inverse_axis)) , INTENT(IN) :: inverse_axis_hdl
+
+      CALL xios(set_inverse_axis_attr_hdl_)  &
+      ( inverse_axis_hdl )
+
+  END SUBROUTINE xios(set_inverse_axis_attr_hdl)
+
+  SUBROUTINE xios(set_inverse_axis_attr_hdl_)   &
+    ( inverse_axis_hdl )
+
+    IMPLICIT NONE
+      TYPE(txios(inverse_axis)) , INTENT(IN) :: inverse_axis_hdl
+
+  END SUBROUTINE xios(set_inverse_axis_attr_hdl_)
+
+  SUBROUTINE xios(get_inverse_axis_attr)  &
+    ( inverse_axis_id )
+
+    IMPLICIT NONE
+      TYPE(txios(inverse_axis))  :: inverse_axis_hdl
+      CHARACTER(LEN=*), INTENT(IN) ::inverse_axis_id
+
+      CALL xios(get_inverse_axis_handle) &
+      (inverse_axis_id,inverse_axis_hdl)
+      CALL xios(get_inverse_axis_attr_hdl_)   &
+      ( inverse_axis_hdl )
+
+  END SUBROUTINE xios(get_inverse_axis_attr)
+
+  SUBROUTINE xios(get_inverse_axis_attr_hdl)  &
+    ( inverse_axis_hdl )
+
+    IMPLICIT NONE
+      TYPE(txios(inverse_axis)) , INTENT(IN) :: inverse_axis_hdl
+
+      CALL xios(get_inverse_axis_attr_hdl_)  &
+      ( inverse_axis_hdl )
+
+  END SUBROUTINE xios(get_inverse_axis_attr_hdl)
+
+  SUBROUTINE xios(get_inverse_axis_attr_hdl_)   &
+    ( inverse_axis_hdl )
+
+    IMPLICIT NONE
+      TYPE(txios(inverse_axis)) , INTENT(IN) :: inverse_axis_hdl
+
+  END SUBROUTINE xios(get_inverse_axis_attr_hdl_)
+
+  SUBROUTINE xios(is_defined_inverse_axis_attr)  &
+    ( inverse_axis_id )
+
+    IMPLICIT NONE
+      TYPE(txios(inverse_axis))  :: inverse_axis_hdl
+      CHARACTER(LEN=*), INTENT(IN) ::inverse_axis_id
+
+      CALL xios(get_inverse_axis_handle) &
+      (inverse_axis_id,inverse_axis_hdl)
+      CALL xios(is_defined_inverse_axis_attr_hdl_)   &
+      ( inverse_axis_hdl )
+
+  END SUBROUTINE xios(is_defined_inverse_axis_attr)
+
+  SUBROUTINE xios(is_defined_inverse_axis_attr_hdl)  &
+    ( inverse_axis_hdl )
+
+    IMPLICIT NONE
+      TYPE(txios(inverse_axis)) , INTENT(IN) :: inverse_axis_hdl
+
+      CALL xios(is_defined_inverse_axis_attr_hdl_)  &
+      ( inverse_axis_hdl )
+
+  END SUBROUTINE xios(is_defined_inverse_axis_attr_hdl)
+
+  SUBROUTINE xios(is_defined_inverse_axis_attr_hdl_)   &
+    ( inverse_axis_hdl )
+
+    IMPLICIT NONE
+      TYPE(txios(inverse_axis)) , INTENT(IN) :: inverse_axis_hdl
+
+  END SUBROUTINE xios(is_defined_inverse_axis_attr_hdl_)
+
+END MODULE iinverse_axis_attr
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/fortran_attr/interpolate_axis_interface_attr.F90
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/fortran_attr/interpolate_axis_interface_attr.F90	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/fortran_attr/interpolate_axis_interface_attr.F90	(revision 1749)
@@ -0,0 +1,74 @@
+! * ************************************************************************** *
+! *               Interface auto generated - do not modify                     *
+! * ************************************************************************** *
+#include "../fortran/xios_fortran_prefix.hpp"
+
+MODULE interpolate_axis_interface_attr
+  USE, INTRINSIC :: ISO_C_BINDING
+
+  INTERFACE
+    ! Do not call directly / interface FORTRAN 2003 <-> C99
+
+    SUBROUTINE cxios_set_interpolate_axis_coordinate(interpolate_axis_hdl, coordinate, coordinate_size) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: interpolate_axis_hdl
+      CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: coordinate
+      INTEGER  (kind = C_INT)     , VALUE        :: coordinate_size
+    END SUBROUTINE cxios_set_interpolate_axis_coordinate
+
+    SUBROUTINE cxios_get_interpolate_axis_coordinate(interpolate_axis_hdl, coordinate, coordinate_size) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: interpolate_axis_hdl
+      CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: coordinate
+      INTEGER  (kind = C_INT)     , VALUE        :: coordinate_size
+    END SUBROUTINE cxios_get_interpolate_axis_coordinate
+
+    FUNCTION cxios_is_defined_interpolate_axis_coordinate(interpolate_axis_hdl) BIND(C)
+      USE ISO_C_BINDING
+      LOGICAL(kind=C_BOOL) :: cxios_is_defined_interpolate_axis_coordinate
+      INTEGER (kind = C_INTPTR_T), VALUE :: interpolate_axis_hdl
+    END FUNCTION cxios_is_defined_interpolate_axis_coordinate
+
+
+    SUBROUTINE cxios_set_interpolate_axis_order(interpolate_axis_hdl, order) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: interpolate_axis_hdl
+      INTEGER (KIND=C_INT)      , VALUE :: order
+    END SUBROUTINE cxios_set_interpolate_axis_order
+
+    SUBROUTINE cxios_get_interpolate_axis_order(interpolate_axis_hdl, order) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: interpolate_axis_hdl
+      INTEGER (KIND=C_INT)             :: order
+    END SUBROUTINE cxios_get_interpolate_axis_order
+
+    FUNCTION cxios_is_defined_interpolate_axis_order(interpolate_axis_hdl) BIND(C)
+      USE ISO_C_BINDING
+      LOGICAL(kind=C_BOOL) :: cxios_is_defined_interpolate_axis_order
+      INTEGER (kind = C_INTPTR_T), VALUE :: interpolate_axis_hdl
+    END FUNCTION cxios_is_defined_interpolate_axis_order
+
+
+    SUBROUTINE cxios_set_interpolate_axis_type(interpolate_axis_hdl, type, type_size) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: interpolate_axis_hdl
+      CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: type
+      INTEGER  (kind = C_INT)     , VALUE        :: type_size
+    END SUBROUTINE cxios_set_interpolate_axis_type
+
+    SUBROUTINE cxios_get_interpolate_axis_type(interpolate_axis_hdl, type, type_size) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: interpolate_axis_hdl
+      CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: type
+      INTEGER  (kind = C_INT)     , VALUE        :: type_size
+    END SUBROUTINE cxios_get_interpolate_axis_type
+
+    FUNCTION cxios_is_defined_interpolate_axis_type(interpolate_axis_hdl) BIND(C)
+      USE ISO_C_BINDING
+      LOGICAL(kind=C_BOOL) :: cxios_is_defined_interpolate_axis_type
+      INTEGER (kind = C_INTPTR_T), VALUE :: interpolate_axis_hdl
+    END FUNCTION cxios_is_defined_interpolate_axis_type
+
+  END INTERFACE
+
+END MODULE interpolate_axis_interface_attr
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/fortran_attr/interpolate_domain_interface_attr.F90
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/fortran_attr/interpolate_domain_interface_attr.F90	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/fortran_attr/interpolate_domain_interface_attr.F90	(revision 1749)
@@ -0,0 +1,192 @@
+! * ************************************************************************** *
+! *               Interface auto generated - do not modify                     *
+! * ************************************************************************** *
+#include "../fortran/xios_fortran_prefix.hpp"
+
+MODULE interpolate_domain_interface_attr
+  USE, INTRINSIC :: ISO_C_BINDING
+
+  INTERFACE
+    ! Do not call directly / interface FORTRAN 2003 <-> C99
+
+    SUBROUTINE cxios_set_interpolate_domain_detect_missing_value(interpolate_domain_hdl, detect_missing_value) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: interpolate_domain_hdl
+      LOGICAL (KIND=C_BOOL)      , VALUE :: detect_missing_value
+    END SUBROUTINE cxios_set_interpolate_domain_detect_missing_value
+
+    SUBROUTINE cxios_get_interpolate_domain_detect_missing_value(interpolate_domain_hdl, detect_missing_value) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: interpolate_domain_hdl
+      LOGICAL (KIND=C_BOOL)             :: detect_missing_value
+    END SUBROUTINE cxios_get_interpolate_domain_detect_missing_value
+
+    FUNCTION cxios_is_defined_interpolate_domain_detect_missing_value(interpolate_domain_hdl) BIND(C)
+      USE ISO_C_BINDING
+      LOGICAL(kind=C_BOOL) :: cxios_is_defined_interpolate_domain_detect_missing_value
+      INTEGER (kind = C_INTPTR_T), VALUE :: interpolate_domain_hdl
+    END FUNCTION cxios_is_defined_interpolate_domain_detect_missing_value
+
+
+    SUBROUTINE cxios_set_interpolate_domain_mode(interpolate_domain_hdl, mode, mode_size) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: interpolate_domain_hdl
+      CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: mode
+      INTEGER  (kind = C_INT)     , VALUE        :: mode_size
+    END SUBROUTINE cxios_set_interpolate_domain_mode
+
+    SUBROUTINE cxios_get_interpolate_domain_mode(interpolate_domain_hdl, mode, mode_size) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: interpolate_domain_hdl
+      CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: mode
+      INTEGER  (kind = C_INT)     , VALUE        :: mode_size
+    END SUBROUTINE cxios_get_interpolate_domain_mode
+
+    FUNCTION cxios_is_defined_interpolate_domain_mode(interpolate_domain_hdl) BIND(C)
+      USE ISO_C_BINDING
+      LOGICAL(kind=C_BOOL) :: cxios_is_defined_interpolate_domain_mode
+      INTEGER (kind = C_INTPTR_T), VALUE :: interpolate_domain_hdl
+    END FUNCTION cxios_is_defined_interpolate_domain_mode
+
+
+    SUBROUTINE cxios_set_interpolate_domain_order(interpolate_domain_hdl, order) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: interpolate_domain_hdl
+      INTEGER (KIND=C_INT)      , VALUE :: order
+    END SUBROUTINE cxios_set_interpolate_domain_order
+
+    SUBROUTINE cxios_get_interpolate_domain_order(interpolate_domain_hdl, order) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: interpolate_domain_hdl
+      INTEGER (KIND=C_INT)             :: order
+    END SUBROUTINE cxios_get_interpolate_domain_order
+
+    FUNCTION cxios_is_defined_interpolate_domain_order(interpolate_domain_hdl) BIND(C)
+      USE ISO_C_BINDING
+      LOGICAL(kind=C_BOOL) :: cxios_is_defined_interpolate_domain_order
+      INTEGER (kind = C_INTPTR_T), VALUE :: interpolate_domain_hdl
+    END FUNCTION cxios_is_defined_interpolate_domain_order
+
+
+    SUBROUTINE cxios_set_interpolate_domain_quantity(interpolate_domain_hdl, quantity) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: interpolate_domain_hdl
+      LOGICAL (KIND=C_BOOL)      , VALUE :: quantity
+    END SUBROUTINE cxios_set_interpolate_domain_quantity
+
+    SUBROUTINE cxios_get_interpolate_domain_quantity(interpolate_domain_hdl, quantity) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: interpolate_domain_hdl
+      LOGICAL (KIND=C_BOOL)             :: quantity
+    END SUBROUTINE cxios_get_interpolate_domain_quantity
+
+    FUNCTION cxios_is_defined_interpolate_domain_quantity(interpolate_domain_hdl) BIND(C)
+      USE ISO_C_BINDING
+      LOGICAL(kind=C_BOOL) :: cxios_is_defined_interpolate_domain_quantity
+      INTEGER (kind = C_INTPTR_T), VALUE :: interpolate_domain_hdl
+    END FUNCTION cxios_is_defined_interpolate_domain_quantity
+
+
+    SUBROUTINE cxios_set_interpolate_domain_read_write_convention(interpolate_domain_hdl, read_write_convention, read_write_conven&
+&tion_size) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: interpolate_domain_hdl
+      CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: read_write_convention
+      INTEGER  (kind = C_INT)     , VALUE        :: read_write_convention_size
+    END SUBROUTINE cxios_set_interpolate_domain_read_write_convention
+
+    SUBROUTINE cxios_get_interpolate_domain_read_write_convention(interpolate_domain_hdl, read_write_convention, read_write_conven&
+&tion_size) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: interpolate_domain_hdl
+      CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: read_write_convention
+      INTEGER  (kind = C_INT)     , VALUE        :: read_write_convention_size
+    END SUBROUTINE cxios_get_interpolate_domain_read_write_convention
+
+    FUNCTION cxios_is_defined_interpolate_domain_read_write_convention(interpolate_domain_hdl) BIND(C)
+      USE ISO_C_BINDING
+      LOGICAL(kind=C_BOOL) :: cxios_is_defined_interpolate_domain_read_write_convention
+      INTEGER (kind = C_INTPTR_T), VALUE :: interpolate_domain_hdl
+    END FUNCTION cxios_is_defined_interpolate_domain_read_write_convention
+
+
+    SUBROUTINE cxios_set_interpolate_domain_renormalize(interpolate_domain_hdl, renormalize) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: interpolate_domain_hdl
+      LOGICAL (KIND=C_BOOL)      , VALUE :: renormalize
+    END SUBROUTINE cxios_set_interpolate_domain_renormalize
+
+    SUBROUTINE cxios_get_interpolate_domain_renormalize(interpolate_domain_hdl, renormalize) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: interpolate_domain_hdl
+      LOGICAL (KIND=C_BOOL)             :: renormalize
+    END SUBROUTINE cxios_get_interpolate_domain_renormalize
+
+    FUNCTION cxios_is_defined_interpolate_domain_renormalize(interpolate_domain_hdl) BIND(C)
+      USE ISO_C_BINDING
+      LOGICAL(kind=C_BOOL) :: cxios_is_defined_interpolate_domain_renormalize
+      INTEGER (kind = C_INTPTR_T), VALUE :: interpolate_domain_hdl
+    END FUNCTION cxios_is_defined_interpolate_domain_renormalize
+
+
+    SUBROUTINE cxios_set_interpolate_domain_use_area(interpolate_domain_hdl, use_area) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: interpolate_domain_hdl
+      LOGICAL (KIND=C_BOOL)      , VALUE :: use_area
+    END SUBROUTINE cxios_set_interpolate_domain_use_area
+
+    SUBROUTINE cxios_get_interpolate_domain_use_area(interpolate_domain_hdl, use_area) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: interpolate_domain_hdl
+      LOGICAL (KIND=C_BOOL)             :: use_area
+    END SUBROUTINE cxios_get_interpolate_domain_use_area
+
+    FUNCTION cxios_is_defined_interpolate_domain_use_area(interpolate_domain_hdl) BIND(C)
+      USE ISO_C_BINDING
+      LOGICAL(kind=C_BOOL) :: cxios_is_defined_interpolate_domain_use_area
+      INTEGER (kind = C_INTPTR_T), VALUE :: interpolate_domain_hdl
+    END FUNCTION cxios_is_defined_interpolate_domain_use_area
+
+
+    SUBROUTINE cxios_set_interpolate_domain_weight_filename(interpolate_domain_hdl, weight_filename, weight_filename_size) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: interpolate_domain_hdl
+      CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: weight_filename
+      INTEGER  (kind = C_INT)     , VALUE        :: weight_filename_size
+    END SUBROUTINE cxios_set_interpolate_domain_weight_filename
+
+    SUBROUTINE cxios_get_interpolate_domain_weight_filename(interpolate_domain_hdl, weight_filename, weight_filename_size) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: interpolate_domain_hdl
+      CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: weight_filename
+      INTEGER  (kind = C_INT)     , VALUE        :: weight_filename_size
+    END SUBROUTINE cxios_get_interpolate_domain_weight_filename
+
+    FUNCTION cxios_is_defined_interpolate_domain_weight_filename(interpolate_domain_hdl) BIND(C)
+      USE ISO_C_BINDING
+      LOGICAL(kind=C_BOOL) :: cxios_is_defined_interpolate_domain_weight_filename
+      INTEGER (kind = C_INTPTR_T), VALUE :: interpolate_domain_hdl
+    END FUNCTION cxios_is_defined_interpolate_domain_weight_filename
+
+
+    SUBROUTINE cxios_set_interpolate_domain_write_weight(interpolate_domain_hdl, write_weight) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: interpolate_domain_hdl
+      LOGICAL (KIND=C_BOOL)      , VALUE :: write_weight
+    END SUBROUTINE cxios_set_interpolate_domain_write_weight
+
+    SUBROUTINE cxios_get_interpolate_domain_write_weight(interpolate_domain_hdl, write_weight) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: interpolate_domain_hdl
+      LOGICAL (KIND=C_BOOL)             :: write_weight
+    END SUBROUTINE cxios_get_interpolate_domain_write_weight
+
+    FUNCTION cxios_is_defined_interpolate_domain_write_weight(interpolate_domain_hdl) BIND(C)
+      USE ISO_C_BINDING
+      LOGICAL(kind=C_BOOL) :: cxios_is_defined_interpolate_domain_write_weight
+      INTEGER (kind = C_INTPTR_T), VALUE :: interpolate_domain_hdl
+    END FUNCTION cxios_is_defined_interpolate_domain_write_weight
+
+  END INTERFACE
+
+END MODULE interpolate_domain_interface_attr
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/fortran_attr/inverse_axis_interface_attr.F90
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/fortran_attr/inverse_axis_interface_attr.F90	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/fortran_attr/inverse_axis_interface_attr.F90	(revision 1749)
@@ -0,0 +1,13 @@
+! * ************************************************************************** *
+! *               Interface auto generated - do not modify                     *
+! * ************************************************************************** *
+#include "../fortran/xios_fortran_prefix.hpp"
+
+MODULE inverse_axis_interface_attr
+  USE, INTRINSIC :: ISO_C_BINDING
+
+  INTERFACE
+    ! Do not call directly / interface FORTRAN 2003 <-> C99
+  END INTERFACE
+
+END MODULE inverse_axis_interface_attr
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/fortran_attr/ireduce_axis_to_axis_attr.F90
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/fortran_attr/ireduce_axis_to_axis_attr.F90	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/fortran_attr/ireduce_axis_to_axis_attr.F90	(revision 1749)
@@ -0,0 +1,140 @@
+! * ************************************************************************** *
+! *               Interface auto generated - do not modify                     *
+! * ************************************************************************** *
+#include "xios_fortran_prefix.hpp"
+
+MODULE ireduce_axis_to_axis_attr
+  USE, INTRINSIC :: ISO_C_BINDING
+  USE ireduce_axis_to_axis
+  USE reduce_axis_to_axis_interface_attr
+
+CONTAINS
+
+  SUBROUTINE xios(set_reduce_axis_to_axis_attr)  &
+    ( reduce_axis_to_axis_id, operation )
+
+    IMPLICIT NONE
+      TYPE(txios(reduce_axis_to_axis))  :: reduce_axis_to_axis_hdl
+      CHARACTER(LEN=*), INTENT(IN) ::reduce_axis_to_axis_id
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: operation
+
+      CALL xios(get_reduce_axis_to_axis_handle) &
+      (reduce_axis_to_axis_id,reduce_axis_to_axis_hdl)
+      CALL xios(set_reduce_axis_to_axis_attr_hdl_)   &
+      ( reduce_axis_to_axis_hdl, operation )
+
+  END SUBROUTINE xios(set_reduce_axis_to_axis_attr)
+
+  SUBROUTINE xios(set_reduce_axis_to_axis_attr_hdl)  &
+    ( reduce_axis_to_axis_hdl, operation )
+
+    IMPLICIT NONE
+      TYPE(txios(reduce_axis_to_axis)) , INTENT(IN) :: reduce_axis_to_axis_hdl
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: operation
+
+      CALL xios(set_reduce_axis_to_axis_attr_hdl_)  &
+      ( reduce_axis_to_axis_hdl, operation )
+
+  END SUBROUTINE xios(set_reduce_axis_to_axis_attr_hdl)
+
+  SUBROUTINE xios(set_reduce_axis_to_axis_attr_hdl_)   &
+    ( reduce_axis_to_axis_hdl, operation_ )
+
+    IMPLICIT NONE
+      TYPE(txios(reduce_axis_to_axis)) , INTENT(IN) :: reduce_axis_to_axis_hdl
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: operation_
+
+      IF (PRESENT(operation_)) THEN
+        CALL cxios_set_reduce_axis_to_axis_operation &
+      (reduce_axis_to_axis_hdl%daddr, operation_, len(operation_))
+      ENDIF
+
+  END SUBROUTINE xios(set_reduce_axis_to_axis_attr_hdl_)
+
+  SUBROUTINE xios(get_reduce_axis_to_axis_attr)  &
+    ( reduce_axis_to_axis_id, operation )
+
+    IMPLICIT NONE
+      TYPE(txios(reduce_axis_to_axis))  :: reduce_axis_to_axis_hdl
+      CHARACTER(LEN=*), INTENT(IN) ::reduce_axis_to_axis_id
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: operation
+
+      CALL xios(get_reduce_axis_to_axis_handle) &
+      (reduce_axis_to_axis_id,reduce_axis_to_axis_hdl)
+      CALL xios(get_reduce_axis_to_axis_attr_hdl_)   &
+      ( reduce_axis_to_axis_hdl, operation )
+
+  END SUBROUTINE xios(get_reduce_axis_to_axis_attr)
+
+  SUBROUTINE xios(get_reduce_axis_to_axis_attr_hdl)  &
+    ( reduce_axis_to_axis_hdl, operation )
+
+    IMPLICIT NONE
+      TYPE(txios(reduce_axis_to_axis)) , INTENT(IN) :: reduce_axis_to_axis_hdl
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: operation
+
+      CALL xios(get_reduce_axis_to_axis_attr_hdl_)  &
+      ( reduce_axis_to_axis_hdl, operation )
+
+  END SUBROUTINE xios(get_reduce_axis_to_axis_attr_hdl)
+
+  SUBROUTINE xios(get_reduce_axis_to_axis_attr_hdl_)   &
+    ( reduce_axis_to_axis_hdl, operation_ )
+
+    IMPLICIT NONE
+      TYPE(txios(reduce_axis_to_axis)) , INTENT(IN) :: reduce_axis_to_axis_hdl
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: operation_
+
+      IF (PRESENT(operation_)) THEN
+        CALL cxios_get_reduce_axis_to_axis_operation &
+      (reduce_axis_to_axis_hdl%daddr, operation_, len(operation_))
+      ENDIF
+
+  END SUBROUTINE xios(get_reduce_axis_to_axis_attr_hdl_)
+
+  SUBROUTINE xios(is_defined_reduce_axis_to_axis_attr)  &
+    ( reduce_axis_to_axis_id, operation )
+
+    IMPLICIT NONE
+      TYPE(txios(reduce_axis_to_axis))  :: reduce_axis_to_axis_hdl
+      CHARACTER(LEN=*), INTENT(IN) ::reduce_axis_to_axis_id
+      LOGICAL, OPTIONAL, INTENT(OUT) :: operation
+      LOGICAL(KIND=C_BOOL) :: operation_tmp
+
+      CALL xios(get_reduce_axis_to_axis_handle) &
+      (reduce_axis_to_axis_id,reduce_axis_to_axis_hdl)
+      CALL xios(is_defined_reduce_axis_to_axis_attr_hdl_)   &
+      ( reduce_axis_to_axis_hdl, operation )
+
+  END SUBROUTINE xios(is_defined_reduce_axis_to_axis_attr)
+
+  SUBROUTINE xios(is_defined_reduce_axis_to_axis_attr_hdl)  &
+    ( reduce_axis_to_axis_hdl, operation )
+
+    IMPLICIT NONE
+      TYPE(txios(reduce_axis_to_axis)) , INTENT(IN) :: reduce_axis_to_axis_hdl
+      LOGICAL, OPTIONAL, INTENT(OUT) :: operation
+      LOGICAL(KIND=C_BOOL) :: operation_tmp
+
+      CALL xios(is_defined_reduce_axis_to_axis_attr_hdl_)  &
+      ( reduce_axis_to_axis_hdl, operation )
+
+  END SUBROUTINE xios(is_defined_reduce_axis_to_axis_attr_hdl)
+
+  SUBROUTINE xios(is_defined_reduce_axis_to_axis_attr_hdl_)   &
+    ( reduce_axis_to_axis_hdl, operation_ )
+
+    IMPLICIT NONE
+      TYPE(txios(reduce_axis_to_axis)) , INTENT(IN) :: reduce_axis_to_axis_hdl
+      LOGICAL, OPTIONAL, INTENT(OUT) :: operation_
+      LOGICAL(KIND=C_BOOL) :: operation__tmp
+
+      IF (PRESENT(operation_)) THEN
+        operation__tmp = cxios_is_defined_reduce_axis_to_axis_operation &
+      (reduce_axis_to_axis_hdl%daddr)
+        operation_ = operation__tmp
+      ENDIF
+
+  END SUBROUTINE xios(is_defined_reduce_axis_to_axis_attr_hdl_)
+
+END MODULE ireduce_axis_to_axis_attr
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/fortran_attr/ireduce_axis_to_scalar_attr.F90
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/fortran_attr/ireduce_axis_to_scalar_attr.F90	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/fortran_attr/ireduce_axis_to_scalar_attr.F90	(revision 1749)
@@ -0,0 +1,140 @@
+! * ************************************************************************** *
+! *               Interface auto generated - do not modify                     *
+! * ************************************************************************** *
+#include "xios_fortran_prefix.hpp"
+
+MODULE ireduce_axis_to_scalar_attr
+  USE, INTRINSIC :: ISO_C_BINDING
+  USE ireduce_axis_to_scalar
+  USE reduce_axis_to_scalar_interface_attr
+
+CONTAINS
+
+  SUBROUTINE xios(set_reduce_axis_to_scalar_attr)  &
+    ( reduce_axis_to_scalar_id, operation )
+
+    IMPLICIT NONE
+      TYPE(txios(reduce_axis_to_scalar))  :: reduce_axis_to_scalar_hdl
+      CHARACTER(LEN=*), INTENT(IN) ::reduce_axis_to_scalar_id
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: operation
+
+      CALL xios(get_reduce_axis_to_scalar_handle) &
+      (reduce_axis_to_scalar_id,reduce_axis_to_scalar_hdl)
+      CALL xios(set_reduce_axis_to_scalar_attr_hdl_)   &
+      ( reduce_axis_to_scalar_hdl, operation )
+
+  END SUBROUTINE xios(set_reduce_axis_to_scalar_attr)
+
+  SUBROUTINE xios(set_reduce_axis_to_scalar_attr_hdl)  &
+    ( reduce_axis_to_scalar_hdl, operation )
+
+    IMPLICIT NONE
+      TYPE(txios(reduce_axis_to_scalar)) , INTENT(IN) :: reduce_axis_to_scalar_hdl
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: operation
+
+      CALL xios(set_reduce_axis_to_scalar_attr_hdl_)  &
+      ( reduce_axis_to_scalar_hdl, operation )
+
+  END SUBROUTINE xios(set_reduce_axis_to_scalar_attr_hdl)
+
+  SUBROUTINE xios(set_reduce_axis_to_scalar_attr_hdl_)   &
+    ( reduce_axis_to_scalar_hdl, operation_ )
+
+    IMPLICIT NONE
+      TYPE(txios(reduce_axis_to_scalar)) , INTENT(IN) :: reduce_axis_to_scalar_hdl
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: operation_
+
+      IF (PRESENT(operation_)) THEN
+        CALL cxios_set_reduce_axis_to_scalar_operation &
+      (reduce_axis_to_scalar_hdl%daddr, operation_, len(operation_))
+      ENDIF
+
+  END SUBROUTINE xios(set_reduce_axis_to_scalar_attr_hdl_)
+
+  SUBROUTINE xios(get_reduce_axis_to_scalar_attr)  &
+    ( reduce_axis_to_scalar_id, operation )
+
+    IMPLICIT NONE
+      TYPE(txios(reduce_axis_to_scalar))  :: reduce_axis_to_scalar_hdl
+      CHARACTER(LEN=*), INTENT(IN) ::reduce_axis_to_scalar_id
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: operation
+
+      CALL xios(get_reduce_axis_to_scalar_handle) &
+      (reduce_axis_to_scalar_id,reduce_axis_to_scalar_hdl)
+      CALL xios(get_reduce_axis_to_scalar_attr_hdl_)   &
+      ( reduce_axis_to_scalar_hdl, operation )
+
+  END SUBROUTINE xios(get_reduce_axis_to_scalar_attr)
+
+  SUBROUTINE xios(get_reduce_axis_to_scalar_attr_hdl)  &
+    ( reduce_axis_to_scalar_hdl, operation )
+
+    IMPLICIT NONE
+      TYPE(txios(reduce_axis_to_scalar)) , INTENT(IN) :: reduce_axis_to_scalar_hdl
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: operation
+
+      CALL xios(get_reduce_axis_to_scalar_attr_hdl_)  &
+      ( reduce_axis_to_scalar_hdl, operation )
+
+  END SUBROUTINE xios(get_reduce_axis_to_scalar_attr_hdl)
+
+  SUBROUTINE xios(get_reduce_axis_to_scalar_attr_hdl_)   &
+    ( reduce_axis_to_scalar_hdl, operation_ )
+
+    IMPLICIT NONE
+      TYPE(txios(reduce_axis_to_scalar)) , INTENT(IN) :: reduce_axis_to_scalar_hdl
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: operation_
+
+      IF (PRESENT(operation_)) THEN
+        CALL cxios_get_reduce_axis_to_scalar_operation &
+      (reduce_axis_to_scalar_hdl%daddr, operation_, len(operation_))
+      ENDIF
+
+  END SUBROUTINE xios(get_reduce_axis_to_scalar_attr_hdl_)
+
+  SUBROUTINE xios(is_defined_reduce_axis_to_scalar_attr)  &
+    ( reduce_axis_to_scalar_id, operation )
+
+    IMPLICIT NONE
+      TYPE(txios(reduce_axis_to_scalar))  :: reduce_axis_to_scalar_hdl
+      CHARACTER(LEN=*), INTENT(IN) ::reduce_axis_to_scalar_id
+      LOGICAL, OPTIONAL, INTENT(OUT) :: operation
+      LOGICAL(KIND=C_BOOL) :: operation_tmp
+
+      CALL xios(get_reduce_axis_to_scalar_handle) &
+      (reduce_axis_to_scalar_id,reduce_axis_to_scalar_hdl)
+      CALL xios(is_defined_reduce_axis_to_scalar_attr_hdl_)   &
+      ( reduce_axis_to_scalar_hdl, operation )
+
+  END SUBROUTINE xios(is_defined_reduce_axis_to_scalar_attr)
+
+  SUBROUTINE xios(is_defined_reduce_axis_to_scalar_attr_hdl)  &
+    ( reduce_axis_to_scalar_hdl, operation )
+
+    IMPLICIT NONE
+      TYPE(txios(reduce_axis_to_scalar)) , INTENT(IN) :: reduce_axis_to_scalar_hdl
+      LOGICAL, OPTIONAL, INTENT(OUT) :: operation
+      LOGICAL(KIND=C_BOOL) :: operation_tmp
+
+      CALL xios(is_defined_reduce_axis_to_scalar_attr_hdl_)  &
+      ( reduce_axis_to_scalar_hdl, operation )
+
+  END SUBROUTINE xios(is_defined_reduce_axis_to_scalar_attr_hdl)
+
+  SUBROUTINE xios(is_defined_reduce_axis_to_scalar_attr_hdl_)   &
+    ( reduce_axis_to_scalar_hdl, operation_ )
+
+    IMPLICIT NONE
+      TYPE(txios(reduce_axis_to_scalar)) , INTENT(IN) :: reduce_axis_to_scalar_hdl
+      LOGICAL, OPTIONAL, INTENT(OUT) :: operation_
+      LOGICAL(KIND=C_BOOL) :: operation__tmp
+
+      IF (PRESENT(operation_)) THEN
+        operation__tmp = cxios_is_defined_reduce_axis_to_scalar_operation &
+      (reduce_axis_to_scalar_hdl%daddr)
+        operation_ = operation__tmp
+      ENDIF
+
+  END SUBROUTINE xios(is_defined_reduce_axis_to_scalar_attr_hdl_)
+
+END MODULE ireduce_axis_to_scalar_attr
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/fortran_attr/ireduce_domain_to_axis_attr.F90
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/fortran_attr/ireduce_domain_to_axis_attr.F90	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/fortran_attr/ireduce_domain_to_axis_attr.F90	(revision 1749)
@@ -0,0 +1,204 @@
+! * ************************************************************************** *
+! *               Interface auto generated - do not modify                     *
+! * ************************************************************************** *
+#include "xios_fortran_prefix.hpp"
+
+MODULE ireduce_domain_to_axis_attr
+  USE, INTRINSIC :: ISO_C_BINDING
+  USE ireduce_domain_to_axis
+  USE reduce_domain_to_axis_interface_attr
+
+CONTAINS
+
+  SUBROUTINE xios(set_reduce_domain_to_axis_attr)  &
+    ( reduce_domain_to_axis_id, direction, local, operation )
+
+    IMPLICIT NONE
+      TYPE(txios(reduce_domain_to_axis))  :: reduce_domain_to_axis_hdl
+      CHARACTER(LEN=*), INTENT(IN) ::reduce_domain_to_axis_id
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: direction
+      LOGICAL  , OPTIONAL, INTENT(IN) :: local
+      LOGICAL (KIND=C_BOOL) :: local_tmp
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: operation
+
+      CALL xios(get_reduce_domain_to_axis_handle) &
+      (reduce_domain_to_axis_id,reduce_domain_to_axis_hdl)
+      CALL xios(set_reduce_domain_to_axis_attr_hdl_)   &
+      ( reduce_domain_to_axis_hdl, direction, local, operation )
+
+  END SUBROUTINE xios(set_reduce_domain_to_axis_attr)
+
+  SUBROUTINE xios(set_reduce_domain_to_axis_attr_hdl)  &
+    ( reduce_domain_to_axis_hdl, direction, local, operation )
+
+    IMPLICIT NONE
+      TYPE(txios(reduce_domain_to_axis)) , INTENT(IN) :: reduce_domain_to_axis_hdl
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: direction
+      LOGICAL  , OPTIONAL, INTENT(IN) :: local
+      LOGICAL (KIND=C_BOOL) :: local_tmp
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: operation
+
+      CALL xios(set_reduce_domain_to_axis_attr_hdl_)  &
+      ( reduce_domain_to_axis_hdl, direction, local, operation )
+
+  END SUBROUTINE xios(set_reduce_domain_to_axis_attr_hdl)
+
+  SUBROUTINE xios(set_reduce_domain_to_axis_attr_hdl_)   &
+    ( reduce_domain_to_axis_hdl, direction_, local_, operation_ )
+
+    IMPLICIT NONE
+      TYPE(txios(reduce_domain_to_axis)) , INTENT(IN) :: reduce_domain_to_axis_hdl
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: direction_
+      LOGICAL  , OPTIONAL, INTENT(IN) :: local_
+      LOGICAL (KIND=C_BOOL) :: local__tmp
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: operation_
+
+      IF (PRESENT(direction_)) THEN
+        CALL cxios_set_reduce_domain_to_axis_direction &
+      (reduce_domain_to_axis_hdl%daddr, direction_, len(direction_))
+      ENDIF
+
+      IF (PRESENT(local_)) THEN
+        local__tmp = local_
+        CALL cxios_set_reduce_domain_to_axis_local &
+      (reduce_domain_to_axis_hdl%daddr, local__tmp)
+      ENDIF
+
+      IF (PRESENT(operation_)) THEN
+        CALL cxios_set_reduce_domain_to_axis_operation &
+      (reduce_domain_to_axis_hdl%daddr, operation_, len(operation_))
+      ENDIF
+
+  END SUBROUTINE xios(set_reduce_domain_to_axis_attr_hdl_)
+
+  SUBROUTINE xios(get_reduce_domain_to_axis_attr)  &
+    ( reduce_domain_to_axis_id, direction, local, operation )
+
+    IMPLICIT NONE
+      TYPE(txios(reduce_domain_to_axis))  :: reduce_domain_to_axis_hdl
+      CHARACTER(LEN=*), INTENT(IN) ::reduce_domain_to_axis_id
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: direction
+      LOGICAL  , OPTIONAL, INTENT(OUT) :: local
+      LOGICAL (KIND=C_BOOL) :: local_tmp
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: operation
+
+      CALL xios(get_reduce_domain_to_axis_handle) &
+      (reduce_domain_to_axis_id,reduce_domain_to_axis_hdl)
+      CALL xios(get_reduce_domain_to_axis_attr_hdl_)   &
+      ( reduce_domain_to_axis_hdl, direction, local, operation )
+
+  END SUBROUTINE xios(get_reduce_domain_to_axis_attr)
+
+  SUBROUTINE xios(get_reduce_domain_to_axis_attr_hdl)  &
+    ( reduce_domain_to_axis_hdl, direction, local, operation )
+
+    IMPLICIT NONE
+      TYPE(txios(reduce_domain_to_axis)) , INTENT(IN) :: reduce_domain_to_axis_hdl
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: direction
+      LOGICAL  , OPTIONAL, INTENT(OUT) :: local
+      LOGICAL (KIND=C_BOOL) :: local_tmp
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: operation
+
+      CALL xios(get_reduce_domain_to_axis_attr_hdl_)  &
+      ( reduce_domain_to_axis_hdl, direction, local, operation )
+
+  END SUBROUTINE xios(get_reduce_domain_to_axis_attr_hdl)
+
+  SUBROUTINE xios(get_reduce_domain_to_axis_attr_hdl_)   &
+    ( reduce_domain_to_axis_hdl, direction_, local_, operation_ )
+
+    IMPLICIT NONE
+      TYPE(txios(reduce_domain_to_axis)) , INTENT(IN) :: reduce_domain_to_axis_hdl
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: direction_
+      LOGICAL  , OPTIONAL, INTENT(OUT) :: local_
+      LOGICAL (KIND=C_BOOL) :: local__tmp
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: operation_
+
+      IF (PRESENT(direction_)) THEN
+        CALL cxios_get_reduce_domain_to_axis_direction &
+      (reduce_domain_to_axis_hdl%daddr, direction_, len(direction_))
+      ENDIF
+
+      IF (PRESENT(local_)) THEN
+        CALL cxios_get_reduce_domain_to_axis_local &
+      (reduce_domain_to_axis_hdl%daddr, local__tmp)
+        local_ = local__tmp
+      ENDIF
+
+      IF (PRESENT(operation_)) THEN
+        CALL cxios_get_reduce_domain_to_axis_operation &
+      (reduce_domain_to_axis_hdl%daddr, operation_, len(operation_))
+      ENDIF
+
+  END SUBROUTINE xios(get_reduce_domain_to_axis_attr_hdl_)
+
+  SUBROUTINE xios(is_defined_reduce_domain_to_axis_attr)  &
+    ( reduce_domain_to_axis_id, direction, local, operation )
+
+    IMPLICIT NONE
+      TYPE(txios(reduce_domain_to_axis))  :: reduce_domain_to_axis_hdl
+      CHARACTER(LEN=*), INTENT(IN) ::reduce_domain_to_axis_id
+      LOGICAL, OPTIONAL, INTENT(OUT) :: direction
+      LOGICAL(KIND=C_BOOL) :: direction_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: local
+      LOGICAL(KIND=C_BOOL) :: local_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: operation
+      LOGICAL(KIND=C_BOOL) :: operation_tmp
+
+      CALL xios(get_reduce_domain_to_axis_handle) &
+      (reduce_domain_to_axis_id,reduce_domain_to_axis_hdl)
+      CALL xios(is_defined_reduce_domain_to_axis_attr_hdl_)   &
+      ( reduce_domain_to_axis_hdl, direction, local, operation )
+
+  END SUBROUTINE xios(is_defined_reduce_domain_to_axis_attr)
+
+  SUBROUTINE xios(is_defined_reduce_domain_to_axis_attr_hdl)  &
+    ( reduce_domain_to_axis_hdl, direction, local, operation )
+
+    IMPLICIT NONE
+      TYPE(txios(reduce_domain_to_axis)) , INTENT(IN) :: reduce_domain_to_axis_hdl
+      LOGICAL, OPTIONAL, INTENT(OUT) :: direction
+      LOGICAL(KIND=C_BOOL) :: direction_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: local
+      LOGICAL(KIND=C_BOOL) :: local_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: operation
+      LOGICAL(KIND=C_BOOL) :: operation_tmp
+
+      CALL xios(is_defined_reduce_domain_to_axis_attr_hdl_)  &
+      ( reduce_domain_to_axis_hdl, direction, local, operation )
+
+  END SUBROUTINE xios(is_defined_reduce_domain_to_axis_attr_hdl)
+
+  SUBROUTINE xios(is_defined_reduce_domain_to_axis_attr_hdl_)   &
+    ( reduce_domain_to_axis_hdl, direction_, local_, operation_ )
+
+    IMPLICIT NONE
+      TYPE(txios(reduce_domain_to_axis)) , INTENT(IN) :: reduce_domain_to_axis_hdl
+      LOGICAL, OPTIONAL, INTENT(OUT) :: direction_
+      LOGICAL(KIND=C_BOOL) :: direction__tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: local_
+      LOGICAL(KIND=C_BOOL) :: local__tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: operation_
+      LOGICAL(KIND=C_BOOL) :: operation__tmp
+
+      IF (PRESENT(direction_)) THEN
+        direction__tmp = cxios_is_defined_reduce_domain_to_axis_direction &
+      (reduce_domain_to_axis_hdl%daddr)
+        direction_ = direction__tmp
+      ENDIF
+
+      IF (PRESENT(local_)) THEN
+        local__tmp = cxios_is_defined_reduce_domain_to_axis_local &
+      (reduce_domain_to_axis_hdl%daddr)
+        local_ = local__tmp
+      ENDIF
+
+      IF (PRESENT(operation_)) THEN
+        operation__tmp = cxios_is_defined_reduce_domain_to_axis_operation &
+      (reduce_domain_to_axis_hdl%daddr)
+        operation_ = operation__tmp
+      ENDIF
+
+  END SUBROUTINE xios(is_defined_reduce_domain_to_axis_attr_hdl_)
+
+END MODULE ireduce_domain_to_axis_attr
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/fortran_attr/ireduce_domain_to_scalar_attr.F90
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/fortran_attr/ireduce_domain_to_scalar_attr.F90	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/fortran_attr/ireduce_domain_to_scalar_attr.F90	(revision 1749)
@@ -0,0 +1,176 @@
+! * ************************************************************************** *
+! *               Interface auto generated - do not modify                     *
+! * ************************************************************************** *
+#include "xios_fortran_prefix.hpp"
+
+MODULE ireduce_domain_to_scalar_attr
+  USE, INTRINSIC :: ISO_C_BINDING
+  USE ireduce_domain_to_scalar
+  USE reduce_domain_to_scalar_interface_attr
+
+CONTAINS
+
+  SUBROUTINE xios(set_reduce_domain_to_scalar_attr)  &
+    ( reduce_domain_to_scalar_id, local, operation )
+
+    IMPLICIT NONE
+      TYPE(txios(reduce_domain_to_scalar))  :: reduce_domain_to_scalar_hdl
+      CHARACTER(LEN=*), INTENT(IN) ::reduce_domain_to_scalar_id
+      LOGICAL  , OPTIONAL, INTENT(IN) :: local
+      LOGICAL (KIND=C_BOOL) :: local_tmp
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: operation
+
+      CALL xios(get_reduce_domain_to_scalar_handle) &
+      (reduce_domain_to_scalar_id,reduce_domain_to_scalar_hdl)
+      CALL xios(set_reduce_domain_to_scalar_attr_hdl_)   &
+      ( reduce_domain_to_scalar_hdl, local, operation )
+
+  END SUBROUTINE xios(set_reduce_domain_to_scalar_attr)
+
+  SUBROUTINE xios(set_reduce_domain_to_scalar_attr_hdl)  &
+    ( reduce_domain_to_scalar_hdl, local, operation )
+
+    IMPLICIT NONE
+      TYPE(txios(reduce_domain_to_scalar)) , INTENT(IN) :: reduce_domain_to_scalar_hdl
+      LOGICAL  , OPTIONAL, INTENT(IN) :: local
+      LOGICAL (KIND=C_BOOL) :: local_tmp
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: operation
+
+      CALL xios(set_reduce_domain_to_scalar_attr_hdl_)  &
+      ( reduce_domain_to_scalar_hdl, local, operation )
+
+  END SUBROUTINE xios(set_reduce_domain_to_scalar_attr_hdl)
+
+  SUBROUTINE xios(set_reduce_domain_to_scalar_attr_hdl_)   &
+    ( reduce_domain_to_scalar_hdl, local_, operation_ )
+
+    IMPLICIT NONE
+      TYPE(txios(reduce_domain_to_scalar)) , INTENT(IN) :: reduce_domain_to_scalar_hdl
+      LOGICAL  , OPTIONAL, INTENT(IN) :: local_
+      LOGICAL (KIND=C_BOOL) :: local__tmp
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: operation_
+
+      IF (PRESENT(local_)) THEN
+        local__tmp = local_
+        CALL cxios_set_reduce_domain_to_scalar_local &
+      (reduce_domain_to_scalar_hdl%daddr, local__tmp)
+      ENDIF
+
+      IF (PRESENT(operation_)) THEN
+        CALL cxios_set_reduce_domain_to_scalar_operation &
+      (reduce_domain_to_scalar_hdl%daddr, operation_, len(operation_))
+      ENDIF
+
+  END SUBROUTINE xios(set_reduce_domain_to_scalar_attr_hdl_)
+
+  SUBROUTINE xios(get_reduce_domain_to_scalar_attr)  &
+    ( reduce_domain_to_scalar_id, local, operation )
+
+    IMPLICIT NONE
+      TYPE(txios(reduce_domain_to_scalar))  :: reduce_domain_to_scalar_hdl
+      CHARACTER(LEN=*), INTENT(IN) ::reduce_domain_to_scalar_id
+      LOGICAL  , OPTIONAL, INTENT(OUT) :: local
+      LOGICAL (KIND=C_BOOL) :: local_tmp
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: operation
+
+      CALL xios(get_reduce_domain_to_scalar_handle) &
+      (reduce_domain_to_scalar_id,reduce_domain_to_scalar_hdl)
+      CALL xios(get_reduce_domain_to_scalar_attr_hdl_)   &
+      ( reduce_domain_to_scalar_hdl, local, operation )
+
+  END SUBROUTINE xios(get_reduce_domain_to_scalar_attr)
+
+  SUBROUTINE xios(get_reduce_domain_to_scalar_attr_hdl)  &
+    ( reduce_domain_to_scalar_hdl, local, operation )
+
+    IMPLICIT NONE
+      TYPE(txios(reduce_domain_to_scalar)) , INTENT(IN) :: reduce_domain_to_scalar_hdl
+      LOGICAL  , OPTIONAL, INTENT(OUT) :: local
+      LOGICAL (KIND=C_BOOL) :: local_tmp
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: operation
+
+      CALL xios(get_reduce_domain_to_scalar_attr_hdl_)  &
+      ( reduce_domain_to_scalar_hdl, local, operation )
+
+  END SUBROUTINE xios(get_reduce_domain_to_scalar_attr_hdl)
+
+  SUBROUTINE xios(get_reduce_domain_to_scalar_attr_hdl_)   &
+    ( reduce_domain_to_scalar_hdl, local_, operation_ )
+
+    IMPLICIT NONE
+      TYPE(txios(reduce_domain_to_scalar)) , INTENT(IN) :: reduce_domain_to_scalar_hdl
+      LOGICAL  , OPTIONAL, INTENT(OUT) :: local_
+      LOGICAL (KIND=C_BOOL) :: local__tmp
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: operation_
+
+      IF (PRESENT(local_)) THEN
+        CALL cxios_get_reduce_domain_to_scalar_local &
+      (reduce_domain_to_scalar_hdl%daddr, local__tmp)
+        local_ = local__tmp
+      ENDIF
+
+      IF (PRESENT(operation_)) THEN
+        CALL cxios_get_reduce_domain_to_scalar_operation &
+      (reduce_domain_to_scalar_hdl%daddr, operation_, len(operation_))
+      ENDIF
+
+  END SUBROUTINE xios(get_reduce_domain_to_scalar_attr_hdl_)
+
+  SUBROUTINE xios(is_defined_reduce_domain_to_scalar_attr)  &
+    ( reduce_domain_to_scalar_id, local, operation )
+
+    IMPLICIT NONE
+      TYPE(txios(reduce_domain_to_scalar))  :: reduce_domain_to_scalar_hdl
+      CHARACTER(LEN=*), INTENT(IN) ::reduce_domain_to_scalar_id
+      LOGICAL, OPTIONAL, INTENT(OUT) :: local
+      LOGICAL(KIND=C_BOOL) :: local_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: operation
+      LOGICAL(KIND=C_BOOL) :: operation_tmp
+
+      CALL xios(get_reduce_domain_to_scalar_handle) &
+      (reduce_domain_to_scalar_id,reduce_domain_to_scalar_hdl)
+      CALL xios(is_defined_reduce_domain_to_scalar_attr_hdl_)   &
+      ( reduce_domain_to_scalar_hdl, local, operation )
+
+  END SUBROUTINE xios(is_defined_reduce_domain_to_scalar_attr)
+
+  SUBROUTINE xios(is_defined_reduce_domain_to_scalar_attr_hdl)  &
+    ( reduce_domain_to_scalar_hdl, local, operation )
+
+    IMPLICIT NONE
+      TYPE(txios(reduce_domain_to_scalar)) , INTENT(IN) :: reduce_domain_to_scalar_hdl
+      LOGICAL, OPTIONAL, INTENT(OUT) :: local
+      LOGICAL(KIND=C_BOOL) :: local_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: operation
+      LOGICAL(KIND=C_BOOL) :: operation_tmp
+
+      CALL xios(is_defined_reduce_domain_to_scalar_attr_hdl_)  &
+      ( reduce_domain_to_scalar_hdl, local, operation )
+
+  END SUBROUTINE xios(is_defined_reduce_domain_to_scalar_attr_hdl)
+
+  SUBROUTINE xios(is_defined_reduce_domain_to_scalar_attr_hdl_)   &
+    ( reduce_domain_to_scalar_hdl, local_, operation_ )
+
+    IMPLICIT NONE
+      TYPE(txios(reduce_domain_to_scalar)) , INTENT(IN) :: reduce_domain_to_scalar_hdl
+      LOGICAL, OPTIONAL, INTENT(OUT) :: local_
+      LOGICAL(KIND=C_BOOL) :: local__tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: operation_
+      LOGICAL(KIND=C_BOOL) :: operation__tmp
+
+      IF (PRESENT(local_)) THEN
+        local__tmp = cxios_is_defined_reduce_domain_to_scalar_local &
+      (reduce_domain_to_scalar_hdl%daddr)
+        local_ = local__tmp
+      ENDIF
+
+      IF (PRESENT(operation_)) THEN
+        operation__tmp = cxios_is_defined_reduce_domain_to_scalar_operation &
+      (reduce_domain_to_scalar_hdl%daddr)
+        operation_ = operation__tmp
+      ENDIF
+
+  END SUBROUTINE xios(is_defined_reduce_domain_to_scalar_attr_hdl_)
+
+END MODULE ireduce_domain_to_scalar_attr
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/fortran_attr/ireduce_scalar_to_scalar_attr.F90
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/fortran_attr/ireduce_scalar_to_scalar_attr.F90	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/fortran_attr/ireduce_scalar_to_scalar_attr.F90	(revision 1749)
@@ -0,0 +1,140 @@
+! * ************************************************************************** *
+! *               Interface auto generated - do not modify                     *
+! * ************************************************************************** *
+#include "xios_fortran_prefix.hpp"
+
+MODULE ireduce_scalar_to_scalar_attr
+  USE, INTRINSIC :: ISO_C_BINDING
+  USE ireduce_scalar_to_scalar
+  USE reduce_scalar_to_scalar_interface_attr
+
+CONTAINS
+
+  SUBROUTINE xios(set_reduce_scalar_to_scalar_attr)  &
+    ( reduce_scalar_to_scalar_id, operation )
+
+    IMPLICIT NONE
+      TYPE(txios(reduce_scalar_to_scalar))  :: reduce_scalar_to_scalar_hdl
+      CHARACTER(LEN=*), INTENT(IN) ::reduce_scalar_to_scalar_id
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: operation
+
+      CALL xios(get_reduce_scalar_to_scalar_handle) &
+      (reduce_scalar_to_scalar_id,reduce_scalar_to_scalar_hdl)
+      CALL xios(set_reduce_scalar_to_scalar_attr_hdl_)   &
+      ( reduce_scalar_to_scalar_hdl, operation )
+
+  END SUBROUTINE xios(set_reduce_scalar_to_scalar_attr)
+
+  SUBROUTINE xios(set_reduce_scalar_to_scalar_attr_hdl)  &
+    ( reduce_scalar_to_scalar_hdl, operation )
+
+    IMPLICIT NONE
+      TYPE(txios(reduce_scalar_to_scalar)) , INTENT(IN) :: reduce_scalar_to_scalar_hdl
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: operation
+
+      CALL xios(set_reduce_scalar_to_scalar_attr_hdl_)  &
+      ( reduce_scalar_to_scalar_hdl, operation )
+
+  END SUBROUTINE xios(set_reduce_scalar_to_scalar_attr_hdl)
+
+  SUBROUTINE xios(set_reduce_scalar_to_scalar_attr_hdl_)   &
+    ( reduce_scalar_to_scalar_hdl, operation_ )
+
+    IMPLICIT NONE
+      TYPE(txios(reduce_scalar_to_scalar)) , INTENT(IN) :: reduce_scalar_to_scalar_hdl
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: operation_
+
+      IF (PRESENT(operation_)) THEN
+        CALL cxios_set_reduce_scalar_to_scalar_operation &
+      (reduce_scalar_to_scalar_hdl%daddr, operation_, len(operation_))
+      ENDIF
+
+  END SUBROUTINE xios(set_reduce_scalar_to_scalar_attr_hdl_)
+
+  SUBROUTINE xios(get_reduce_scalar_to_scalar_attr)  &
+    ( reduce_scalar_to_scalar_id, operation )
+
+    IMPLICIT NONE
+      TYPE(txios(reduce_scalar_to_scalar))  :: reduce_scalar_to_scalar_hdl
+      CHARACTER(LEN=*), INTENT(IN) ::reduce_scalar_to_scalar_id
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: operation
+
+      CALL xios(get_reduce_scalar_to_scalar_handle) &
+      (reduce_scalar_to_scalar_id,reduce_scalar_to_scalar_hdl)
+      CALL xios(get_reduce_scalar_to_scalar_attr_hdl_)   &
+      ( reduce_scalar_to_scalar_hdl, operation )
+
+  END SUBROUTINE xios(get_reduce_scalar_to_scalar_attr)
+
+  SUBROUTINE xios(get_reduce_scalar_to_scalar_attr_hdl)  &
+    ( reduce_scalar_to_scalar_hdl, operation )
+
+    IMPLICIT NONE
+      TYPE(txios(reduce_scalar_to_scalar)) , INTENT(IN) :: reduce_scalar_to_scalar_hdl
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: operation
+
+      CALL xios(get_reduce_scalar_to_scalar_attr_hdl_)  &
+      ( reduce_scalar_to_scalar_hdl, operation )
+
+  END SUBROUTINE xios(get_reduce_scalar_to_scalar_attr_hdl)
+
+  SUBROUTINE xios(get_reduce_scalar_to_scalar_attr_hdl_)   &
+    ( reduce_scalar_to_scalar_hdl, operation_ )
+
+    IMPLICIT NONE
+      TYPE(txios(reduce_scalar_to_scalar)) , INTENT(IN) :: reduce_scalar_to_scalar_hdl
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: operation_
+
+      IF (PRESENT(operation_)) THEN
+        CALL cxios_get_reduce_scalar_to_scalar_operation &
+      (reduce_scalar_to_scalar_hdl%daddr, operation_, len(operation_))
+      ENDIF
+
+  END SUBROUTINE xios(get_reduce_scalar_to_scalar_attr_hdl_)
+
+  SUBROUTINE xios(is_defined_reduce_scalar_to_scalar_attr)  &
+    ( reduce_scalar_to_scalar_id, operation )
+
+    IMPLICIT NONE
+      TYPE(txios(reduce_scalar_to_scalar))  :: reduce_scalar_to_scalar_hdl
+      CHARACTER(LEN=*), INTENT(IN) ::reduce_scalar_to_scalar_id
+      LOGICAL, OPTIONAL, INTENT(OUT) :: operation
+      LOGICAL(KIND=C_BOOL) :: operation_tmp
+
+      CALL xios(get_reduce_scalar_to_scalar_handle) &
+      (reduce_scalar_to_scalar_id,reduce_scalar_to_scalar_hdl)
+      CALL xios(is_defined_reduce_scalar_to_scalar_attr_hdl_)   &
+      ( reduce_scalar_to_scalar_hdl, operation )
+
+  END SUBROUTINE xios(is_defined_reduce_scalar_to_scalar_attr)
+
+  SUBROUTINE xios(is_defined_reduce_scalar_to_scalar_attr_hdl)  &
+    ( reduce_scalar_to_scalar_hdl, operation )
+
+    IMPLICIT NONE
+      TYPE(txios(reduce_scalar_to_scalar)) , INTENT(IN) :: reduce_scalar_to_scalar_hdl
+      LOGICAL, OPTIONAL, INTENT(OUT) :: operation
+      LOGICAL(KIND=C_BOOL) :: operation_tmp
+
+      CALL xios(is_defined_reduce_scalar_to_scalar_attr_hdl_)  &
+      ( reduce_scalar_to_scalar_hdl, operation )
+
+  END SUBROUTINE xios(is_defined_reduce_scalar_to_scalar_attr_hdl)
+
+  SUBROUTINE xios(is_defined_reduce_scalar_to_scalar_attr_hdl_)   &
+    ( reduce_scalar_to_scalar_hdl, operation_ )
+
+    IMPLICIT NONE
+      TYPE(txios(reduce_scalar_to_scalar)) , INTENT(IN) :: reduce_scalar_to_scalar_hdl
+      LOGICAL, OPTIONAL, INTENT(OUT) :: operation_
+      LOGICAL(KIND=C_BOOL) :: operation__tmp
+
+      IF (PRESENT(operation_)) THEN
+        operation__tmp = cxios_is_defined_reduce_scalar_to_scalar_operation &
+      (reduce_scalar_to_scalar_hdl%daddr)
+        operation_ = operation__tmp
+      ENDIF
+
+  END SUBROUTINE xios(is_defined_reduce_scalar_to_scalar_attr_hdl_)
+
+END MODULE ireduce_scalar_to_scalar_attr
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/fortran_attr/ireorder_domain_attr.F90
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/fortran_attr/ireorder_domain_attr.F90	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/fortran_attr/ireorder_domain_attr.F90	(revision 1749)
@@ -0,0 +1,232 @@
+! * ************************************************************************** *
+! *               Interface auto generated - do not modify                     *
+! * ************************************************************************** *
+#include "xios_fortran_prefix.hpp"
+
+MODULE ireorder_domain_attr
+  USE, INTRINSIC :: ISO_C_BINDING
+  USE ireorder_domain
+  USE reorder_domain_interface_attr
+
+CONTAINS
+
+  SUBROUTINE xios(set_reorder_domain_attr)  &
+    ( reorder_domain_id, invert_lat, max_lon, min_lon, shift_lon_fraction )
+
+    IMPLICIT NONE
+      TYPE(txios(reorder_domain))  :: reorder_domain_hdl
+      CHARACTER(LEN=*), INTENT(IN) ::reorder_domain_id
+      LOGICAL  , OPTIONAL, INTENT(IN) :: invert_lat
+      LOGICAL (KIND=C_BOOL) :: invert_lat_tmp
+      REAL (KIND=8) , OPTIONAL, INTENT(IN) :: max_lon
+      REAL (KIND=8) , OPTIONAL, INTENT(IN) :: min_lon
+      REAL (KIND=8) , OPTIONAL, INTENT(IN) :: shift_lon_fraction
+
+      CALL xios(get_reorder_domain_handle) &
+      (reorder_domain_id,reorder_domain_hdl)
+      CALL xios(set_reorder_domain_attr_hdl_)   &
+      ( reorder_domain_hdl, invert_lat, max_lon, min_lon, shift_lon_fraction )
+
+  END SUBROUTINE xios(set_reorder_domain_attr)
+
+  SUBROUTINE xios(set_reorder_domain_attr_hdl)  &
+    ( reorder_domain_hdl, invert_lat, max_lon, min_lon, shift_lon_fraction )
+
+    IMPLICIT NONE
+      TYPE(txios(reorder_domain)) , INTENT(IN) :: reorder_domain_hdl
+      LOGICAL  , OPTIONAL, INTENT(IN) :: invert_lat
+      LOGICAL (KIND=C_BOOL) :: invert_lat_tmp
+      REAL (KIND=8) , OPTIONAL, INTENT(IN) :: max_lon
+      REAL (KIND=8) , OPTIONAL, INTENT(IN) :: min_lon
+      REAL (KIND=8) , OPTIONAL, INTENT(IN) :: shift_lon_fraction
+
+      CALL xios(set_reorder_domain_attr_hdl_)  &
+      ( reorder_domain_hdl, invert_lat, max_lon, min_lon, shift_lon_fraction )
+
+  END SUBROUTINE xios(set_reorder_domain_attr_hdl)
+
+  SUBROUTINE xios(set_reorder_domain_attr_hdl_)   &
+    ( reorder_domain_hdl, invert_lat_, max_lon_, min_lon_, shift_lon_fraction_ )
+
+    IMPLICIT NONE
+      TYPE(txios(reorder_domain)) , INTENT(IN) :: reorder_domain_hdl
+      LOGICAL  , OPTIONAL, INTENT(IN) :: invert_lat_
+      LOGICAL (KIND=C_BOOL) :: invert_lat__tmp
+      REAL (KIND=8) , OPTIONAL, INTENT(IN) :: max_lon_
+      REAL (KIND=8) , OPTIONAL, INTENT(IN) :: min_lon_
+      REAL (KIND=8) , OPTIONAL, INTENT(IN) :: shift_lon_fraction_
+
+      IF (PRESENT(invert_lat_)) THEN
+        invert_lat__tmp = invert_lat_
+        CALL cxios_set_reorder_domain_invert_lat &
+      (reorder_domain_hdl%daddr, invert_lat__tmp)
+      ENDIF
+
+      IF (PRESENT(max_lon_)) THEN
+        CALL cxios_set_reorder_domain_max_lon &
+      (reorder_domain_hdl%daddr, max_lon_)
+      ENDIF
+
+      IF (PRESENT(min_lon_)) THEN
+        CALL cxios_set_reorder_domain_min_lon &
+      (reorder_domain_hdl%daddr, min_lon_)
+      ENDIF
+
+      IF (PRESENT(shift_lon_fraction_)) THEN
+        CALL cxios_set_reorder_domain_shift_lon_fraction &
+      (reorder_domain_hdl%daddr, shift_lon_fraction_)
+      ENDIF
+
+  END SUBROUTINE xios(set_reorder_domain_attr_hdl_)
+
+  SUBROUTINE xios(get_reorder_domain_attr)  &
+    ( reorder_domain_id, invert_lat, max_lon, min_lon, shift_lon_fraction )
+
+    IMPLICIT NONE
+      TYPE(txios(reorder_domain))  :: reorder_domain_hdl
+      CHARACTER(LEN=*), INTENT(IN) ::reorder_domain_id
+      LOGICAL  , OPTIONAL, INTENT(OUT) :: invert_lat
+      LOGICAL (KIND=C_BOOL) :: invert_lat_tmp
+      REAL (KIND=8) , OPTIONAL, INTENT(OUT) :: max_lon
+      REAL (KIND=8) , OPTIONAL, INTENT(OUT) :: min_lon
+      REAL (KIND=8) , OPTIONAL, INTENT(OUT) :: shift_lon_fraction
+
+      CALL xios(get_reorder_domain_handle) &
+      (reorder_domain_id,reorder_domain_hdl)
+      CALL xios(get_reorder_domain_attr_hdl_)   &
+      ( reorder_domain_hdl, invert_lat, max_lon, min_lon, shift_lon_fraction )
+
+  END SUBROUTINE xios(get_reorder_domain_attr)
+
+  SUBROUTINE xios(get_reorder_domain_attr_hdl)  &
+    ( reorder_domain_hdl, invert_lat, max_lon, min_lon, shift_lon_fraction )
+
+    IMPLICIT NONE
+      TYPE(txios(reorder_domain)) , INTENT(IN) :: reorder_domain_hdl
+      LOGICAL  , OPTIONAL, INTENT(OUT) :: invert_lat
+      LOGICAL (KIND=C_BOOL) :: invert_lat_tmp
+      REAL (KIND=8) , OPTIONAL, INTENT(OUT) :: max_lon
+      REAL (KIND=8) , OPTIONAL, INTENT(OUT) :: min_lon
+      REAL (KIND=8) , OPTIONAL, INTENT(OUT) :: shift_lon_fraction
+
+      CALL xios(get_reorder_domain_attr_hdl_)  &
+      ( reorder_domain_hdl, invert_lat, max_lon, min_lon, shift_lon_fraction )
+
+  END SUBROUTINE xios(get_reorder_domain_attr_hdl)
+
+  SUBROUTINE xios(get_reorder_domain_attr_hdl_)   &
+    ( reorder_domain_hdl, invert_lat_, max_lon_, min_lon_, shift_lon_fraction_ )
+
+    IMPLICIT NONE
+      TYPE(txios(reorder_domain)) , INTENT(IN) :: reorder_domain_hdl
+      LOGICAL  , OPTIONAL, INTENT(OUT) :: invert_lat_
+      LOGICAL (KIND=C_BOOL) :: invert_lat__tmp
+      REAL (KIND=8) , OPTIONAL, INTENT(OUT) :: max_lon_
+      REAL (KIND=8) , OPTIONAL, INTENT(OUT) :: min_lon_
+      REAL (KIND=8) , OPTIONAL, INTENT(OUT) :: shift_lon_fraction_
+
+      IF (PRESENT(invert_lat_)) THEN
+        CALL cxios_get_reorder_domain_invert_lat &
+      (reorder_domain_hdl%daddr, invert_lat__tmp)
+        invert_lat_ = invert_lat__tmp
+      ENDIF
+
+      IF (PRESENT(max_lon_)) THEN
+        CALL cxios_get_reorder_domain_max_lon &
+      (reorder_domain_hdl%daddr, max_lon_)
+      ENDIF
+
+      IF (PRESENT(min_lon_)) THEN
+        CALL cxios_get_reorder_domain_min_lon &
+      (reorder_domain_hdl%daddr, min_lon_)
+      ENDIF
+
+      IF (PRESENT(shift_lon_fraction_)) THEN
+        CALL cxios_get_reorder_domain_shift_lon_fraction &
+      (reorder_domain_hdl%daddr, shift_lon_fraction_)
+      ENDIF
+
+  END SUBROUTINE xios(get_reorder_domain_attr_hdl_)
+
+  SUBROUTINE xios(is_defined_reorder_domain_attr)  &
+    ( reorder_domain_id, invert_lat, max_lon, min_lon, shift_lon_fraction )
+
+    IMPLICIT NONE
+      TYPE(txios(reorder_domain))  :: reorder_domain_hdl
+      CHARACTER(LEN=*), INTENT(IN) ::reorder_domain_id
+      LOGICAL, OPTIONAL, INTENT(OUT) :: invert_lat
+      LOGICAL(KIND=C_BOOL) :: invert_lat_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: max_lon
+      LOGICAL(KIND=C_BOOL) :: max_lon_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: min_lon
+      LOGICAL(KIND=C_BOOL) :: min_lon_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: shift_lon_fraction
+      LOGICAL(KIND=C_BOOL) :: shift_lon_fraction_tmp
+
+      CALL xios(get_reorder_domain_handle) &
+      (reorder_domain_id,reorder_domain_hdl)
+      CALL xios(is_defined_reorder_domain_attr_hdl_)   &
+      ( reorder_domain_hdl, invert_lat, max_lon, min_lon, shift_lon_fraction )
+
+  END SUBROUTINE xios(is_defined_reorder_domain_attr)
+
+  SUBROUTINE xios(is_defined_reorder_domain_attr_hdl)  &
+    ( reorder_domain_hdl, invert_lat, max_lon, min_lon, shift_lon_fraction )
+
+    IMPLICIT NONE
+      TYPE(txios(reorder_domain)) , INTENT(IN) :: reorder_domain_hdl
+      LOGICAL, OPTIONAL, INTENT(OUT) :: invert_lat
+      LOGICAL(KIND=C_BOOL) :: invert_lat_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: max_lon
+      LOGICAL(KIND=C_BOOL) :: max_lon_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: min_lon
+      LOGICAL(KIND=C_BOOL) :: min_lon_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: shift_lon_fraction
+      LOGICAL(KIND=C_BOOL) :: shift_lon_fraction_tmp
+
+      CALL xios(is_defined_reorder_domain_attr_hdl_)  &
+      ( reorder_domain_hdl, invert_lat, max_lon, min_lon, shift_lon_fraction )
+
+  END SUBROUTINE xios(is_defined_reorder_domain_attr_hdl)
+
+  SUBROUTINE xios(is_defined_reorder_domain_attr_hdl_)   &
+    ( reorder_domain_hdl, invert_lat_, max_lon_, min_lon_, shift_lon_fraction_ )
+
+    IMPLICIT NONE
+      TYPE(txios(reorder_domain)) , INTENT(IN) :: reorder_domain_hdl
+      LOGICAL, OPTIONAL, INTENT(OUT) :: invert_lat_
+      LOGICAL(KIND=C_BOOL) :: invert_lat__tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: max_lon_
+      LOGICAL(KIND=C_BOOL) :: max_lon__tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: min_lon_
+      LOGICAL(KIND=C_BOOL) :: min_lon__tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: shift_lon_fraction_
+      LOGICAL(KIND=C_BOOL) :: shift_lon_fraction__tmp
+
+      IF (PRESENT(invert_lat_)) THEN
+        invert_lat__tmp = cxios_is_defined_reorder_domain_invert_lat &
+      (reorder_domain_hdl%daddr)
+        invert_lat_ = invert_lat__tmp
+      ENDIF
+
+      IF (PRESENT(max_lon_)) THEN
+        max_lon__tmp = cxios_is_defined_reorder_domain_max_lon &
+      (reorder_domain_hdl%daddr)
+        max_lon_ = max_lon__tmp
+      ENDIF
+
+      IF (PRESENT(min_lon_)) THEN
+        min_lon__tmp = cxios_is_defined_reorder_domain_min_lon &
+      (reorder_domain_hdl%daddr)
+        min_lon_ = min_lon__tmp
+      ENDIF
+
+      IF (PRESENT(shift_lon_fraction_)) THEN
+        shift_lon_fraction__tmp = cxios_is_defined_reorder_domain_shift_lon_fraction &
+      (reorder_domain_hdl%daddr)
+        shift_lon_fraction_ = shift_lon_fraction__tmp
+      ENDIF
+
+  END SUBROUTINE xios(is_defined_reorder_domain_attr_hdl_)
+
+END MODULE ireorder_domain_attr
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/fortran_attr/iscalar_attr.F90
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/fortran_attr/iscalar_attr.F90	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/fortran_attr/iscalar_attr.F90	(revision 1749)
@@ -0,0 +1,491 @@
+! * ************************************************************************** *
+! *               Interface auto generated - do not modify                     *
+! * ************************************************************************** *
+#include "xios_fortran_prefix.hpp"
+
+MODULE iscalar_attr
+  USE, INTRINSIC :: ISO_C_BINDING
+  USE iscalar
+  USE scalar_interface_attr
+
+CONTAINS
+
+  SUBROUTINE xios(set_scalar_attr)  &
+    ( scalar_id, axis_type, bounds, bounds_name, comment, label, long_name, name, positive, prec  &
+    , scalar_ref, standard_name, unit, value )
+
+    IMPLICIT NONE
+      TYPE(txios(scalar))  :: scalar_hdl
+      CHARACTER(LEN=*), INTENT(IN) ::scalar_id
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: axis_type
+      REAL (KIND=8) , OPTIONAL, INTENT(IN) :: bounds(:)
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: bounds_name
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: comment
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: label
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: long_name
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: name
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: positive
+      INTEGER  , OPTIONAL, INTENT(IN) :: prec
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: scalar_ref
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: standard_name
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: unit
+      REAL (KIND=8) , OPTIONAL, INTENT(IN) :: value
+
+      CALL xios(get_scalar_handle) &
+      (scalar_id,scalar_hdl)
+      CALL xios(set_scalar_attr_hdl_)   &
+      ( scalar_hdl, axis_type, bounds, bounds_name, comment, label, long_name, name, positive, prec  &
+      , scalar_ref, standard_name, unit, value )
+
+  END SUBROUTINE xios(set_scalar_attr)
+
+  SUBROUTINE xios(set_scalar_attr_hdl)  &
+    ( scalar_hdl, axis_type, bounds, bounds_name, comment, label, long_name, name, positive, prec  &
+    , scalar_ref, standard_name, unit, value )
+
+    IMPLICIT NONE
+      TYPE(txios(scalar)) , INTENT(IN) :: scalar_hdl
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: axis_type
+      REAL (KIND=8) , OPTIONAL, INTENT(IN) :: bounds(:)
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: bounds_name
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: comment
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: label
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: long_name
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: name
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: positive
+      INTEGER  , OPTIONAL, INTENT(IN) :: prec
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: scalar_ref
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: standard_name
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: unit
+      REAL (KIND=8) , OPTIONAL, INTENT(IN) :: value
+
+      CALL xios(set_scalar_attr_hdl_)  &
+      ( scalar_hdl, axis_type, bounds, bounds_name, comment, label, long_name, name, positive, prec  &
+      , scalar_ref, standard_name, unit, value )
+
+  END SUBROUTINE xios(set_scalar_attr_hdl)
+
+  SUBROUTINE xios(set_scalar_attr_hdl_)   &
+    ( scalar_hdl, axis_type_, bounds_, bounds_name_, comment_, label_, long_name_, name_, positive_  &
+    , prec_, scalar_ref_, standard_name_, unit_, value_ )
+
+    IMPLICIT NONE
+      TYPE(txios(scalar)) , INTENT(IN) :: scalar_hdl
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: axis_type_
+      REAL (KIND=8) , OPTIONAL, INTENT(IN) :: bounds_(:)
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: bounds_name_
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: comment_
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: label_
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: long_name_
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: name_
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: positive_
+      INTEGER  , OPTIONAL, INTENT(IN) :: prec_
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: scalar_ref_
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: standard_name_
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: unit_
+      REAL (KIND=8) , OPTIONAL, INTENT(IN) :: value_
+
+      IF (PRESENT(axis_type_)) THEN
+        CALL cxios_set_scalar_axis_type &
+      (scalar_hdl%daddr, axis_type_, len(axis_type_))
+      ENDIF
+
+      IF (PRESENT(bounds_)) THEN
+        CALL cxios_set_scalar_bounds &
+      (scalar_hdl%daddr, bounds_, SHAPE(bounds_))
+      ENDIF
+
+      IF (PRESENT(bounds_name_)) THEN
+        CALL cxios_set_scalar_bounds_name &
+      (scalar_hdl%daddr, bounds_name_, len(bounds_name_))
+      ENDIF
+
+      IF (PRESENT(comment_)) THEN
+        CALL cxios_set_scalar_comment &
+      (scalar_hdl%daddr, comment_, len(comment_))
+      ENDIF
+
+      IF (PRESENT(label_)) THEN
+        CALL cxios_set_scalar_label &
+      (scalar_hdl%daddr, label_, len(label_))
+      ENDIF
+
+      IF (PRESENT(long_name_)) THEN
+        CALL cxios_set_scalar_long_name &
+      (scalar_hdl%daddr, long_name_, len(long_name_))
+      ENDIF
+
+      IF (PRESENT(name_)) THEN
+        CALL cxios_set_scalar_name &
+      (scalar_hdl%daddr, name_, len(name_))
+      ENDIF
+
+      IF (PRESENT(positive_)) THEN
+        CALL cxios_set_scalar_positive &
+      (scalar_hdl%daddr, positive_, len(positive_))
+      ENDIF
+
+      IF (PRESENT(prec_)) THEN
+        CALL cxios_set_scalar_prec &
+      (scalar_hdl%daddr, prec_)
+      ENDIF
+
+      IF (PRESENT(scalar_ref_)) THEN
+        CALL cxios_set_scalar_scalar_ref &
+      (scalar_hdl%daddr, scalar_ref_, len(scalar_ref_))
+      ENDIF
+
+      IF (PRESENT(standard_name_)) THEN
+        CALL cxios_set_scalar_standard_name &
+      (scalar_hdl%daddr, standard_name_, len(standard_name_))
+      ENDIF
+
+      IF (PRESENT(unit_)) THEN
+        CALL cxios_set_scalar_unit &
+      (scalar_hdl%daddr, unit_, len(unit_))
+      ENDIF
+
+      IF (PRESENT(value_)) THEN
+        CALL cxios_set_scalar_value &
+      (scalar_hdl%daddr, value_)
+      ENDIF
+
+  END SUBROUTINE xios(set_scalar_attr_hdl_)
+
+  SUBROUTINE xios(get_scalar_attr)  &
+    ( scalar_id, axis_type, bounds, bounds_name, comment, label, long_name, name, positive, prec  &
+    , scalar_ref, standard_name, unit, value )
+
+    IMPLICIT NONE
+      TYPE(txios(scalar))  :: scalar_hdl
+      CHARACTER(LEN=*), INTENT(IN) ::scalar_id
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: axis_type
+      REAL (KIND=8) , OPTIONAL, INTENT(OUT) :: bounds(:)
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: bounds_name
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: comment
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: label
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: long_name
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: name
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: positive
+      INTEGER  , OPTIONAL, INTENT(OUT) :: prec
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: scalar_ref
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: standard_name
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: unit
+      REAL (KIND=8) , OPTIONAL, INTENT(OUT) :: value
+
+      CALL xios(get_scalar_handle) &
+      (scalar_id,scalar_hdl)
+      CALL xios(get_scalar_attr_hdl_)   &
+      ( scalar_hdl, axis_type, bounds, bounds_name, comment, label, long_name, name, positive, prec  &
+      , scalar_ref, standard_name, unit, value )
+
+  END SUBROUTINE xios(get_scalar_attr)
+
+  SUBROUTINE xios(get_scalar_attr_hdl)  &
+    ( scalar_hdl, axis_type, bounds, bounds_name, comment, label, long_name, name, positive, prec  &
+    , scalar_ref, standard_name, unit, value )
+
+    IMPLICIT NONE
+      TYPE(txios(scalar)) , INTENT(IN) :: scalar_hdl
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: axis_type
+      REAL (KIND=8) , OPTIONAL, INTENT(OUT) :: bounds(:)
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: bounds_name
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: comment
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: label
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: long_name
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: name
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: positive
+      INTEGER  , OPTIONAL, INTENT(OUT) :: prec
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: scalar_ref
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: standard_name
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: unit
+      REAL (KIND=8) , OPTIONAL, INTENT(OUT) :: value
+
+      CALL xios(get_scalar_attr_hdl_)  &
+      ( scalar_hdl, axis_type, bounds, bounds_name, comment, label, long_name, name, positive, prec  &
+      , scalar_ref, standard_name, unit, value )
+
+  END SUBROUTINE xios(get_scalar_attr_hdl)
+
+  SUBROUTINE xios(get_scalar_attr_hdl_)   &
+    ( scalar_hdl, axis_type_, bounds_, bounds_name_, comment_, label_, long_name_, name_, positive_  &
+    , prec_, scalar_ref_, standard_name_, unit_, value_ )
+
+    IMPLICIT NONE
+      TYPE(txios(scalar)) , INTENT(IN) :: scalar_hdl
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: axis_type_
+      REAL (KIND=8) , OPTIONAL, INTENT(OUT) :: bounds_(:)
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: bounds_name_
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: comment_
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: label_
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: long_name_
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: name_
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: positive_
+      INTEGER  , OPTIONAL, INTENT(OUT) :: prec_
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: scalar_ref_
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: standard_name_
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: unit_
+      REAL (KIND=8) , OPTIONAL, INTENT(OUT) :: value_
+
+      IF (PRESENT(axis_type_)) THEN
+        CALL cxios_get_scalar_axis_type &
+      (scalar_hdl%daddr, axis_type_, len(axis_type_))
+      ENDIF
+
+      IF (PRESENT(bounds_)) THEN
+        CALL cxios_get_scalar_bounds &
+      (scalar_hdl%daddr, bounds_, SHAPE(bounds_))
+      ENDIF
+
+      IF (PRESENT(bounds_name_)) THEN
+        CALL cxios_get_scalar_bounds_name &
+      (scalar_hdl%daddr, bounds_name_, len(bounds_name_))
+      ENDIF
+
+      IF (PRESENT(comment_)) THEN
+        CALL cxios_get_scalar_comment &
+      (scalar_hdl%daddr, comment_, len(comment_))
+      ENDIF
+
+      IF (PRESENT(label_)) THEN
+        CALL cxios_get_scalar_label &
+      (scalar_hdl%daddr, label_, len(label_))
+      ENDIF
+
+      IF (PRESENT(long_name_)) THEN
+        CALL cxios_get_scalar_long_name &
+      (scalar_hdl%daddr, long_name_, len(long_name_))
+      ENDIF
+
+      IF (PRESENT(name_)) THEN
+        CALL cxios_get_scalar_name &
+      (scalar_hdl%daddr, name_, len(name_))
+      ENDIF
+
+      IF (PRESENT(positive_)) THEN
+        CALL cxios_get_scalar_positive &
+      (scalar_hdl%daddr, positive_, len(positive_))
+      ENDIF
+
+      IF (PRESENT(prec_)) THEN
+        CALL cxios_get_scalar_prec &
+      (scalar_hdl%daddr, prec_)
+      ENDIF
+
+      IF (PRESENT(scalar_ref_)) THEN
+        CALL cxios_get_scalar_scalar_ref &
+      (scalar_hdl%daddr, scalar_ref_, len(scalar_ref_))
+      ENDIF
+
+      IF (PRESENT(standard_name_)) THEN
+        CALL cxios_get_scalar_standard_name &
+      (scalar_hdl%daddr, standard_name_, len(standard_name_))
+      ENDIF
+
+      IF (PRESENT(unit_)) THEN
+        CALL cxios_get_scalar_unit &
+      (scalar_hdl%daddr, unit_, len(unit_))
+      ENDIF
+
+      IF (PRESENT(value_)) THEN
+        CALL cxios_get_scalar_value &
+      (scalar_hdl%daddr, value_)
+      ENDIF
+
+  END SUBROUTINE xios(get_scalar_attr_hdl_)
+
+  SUBROUTINE xios(is_defined_scalar_attr)  &
+    ( scalar_id, axis_type, bounds, bounds_name, comment, label, long_name, name, positive, prec  &
+    , scalar_ref, standard_name, unit, value )
+
+    IMPLICIT NONE
+      TYPE(txios(scalar))  :: scalar_hdl
+      CHARACTER(LEN=*), INTENT(IN) ::scalar_id
+      LOGICAL, OPTIONAL, INTENT(OUT) :: axis_type
+      LOGICAL(KIND=C_BOOL) :: axis_type_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: bounds
+      LOGICAL(KIND=C_BOOL) :: bounds_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: bounds_name
+      LOGICAL(KIND=C_BOOL) :: bounds_name_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: comment
+      LOGICAL(KIND=C_BOOL) :: comment_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: label
+      LOGICAL(KIND=C_BOOL) :: label_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: long_name
+      LOGICAL(KIND=C_BOOL) :: long_name_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: name
+      LOGICAL(KIND=C_BOOL) :: name_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: positive
+      LOGICAL(KIND=C_BOOL) :: positive_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: prec
+      LOGICAL(KIND=C_BOOL) :: prec_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: scalar_ref
+      LOGICAL(KIND=C_BOOL) :: scalar_ref_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: standard_name
+      LOGICAL(KIND=C_BOOL) :: standard_name_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: unit
+      LOGICAL(KIND=C_BOOL) :: unit_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: value
+      LOGICAL(KIND=C_BOOL) :: value_tmp
+
+      CALL xios(get_scalar_handle) &
+      (scalar_id,scalar_hdl)
+      CALL xios(is_defined_scalar_attr_hdl_)   &
+      ( scalar_hdl, axis_type, bounds, bounds_name, comment, label, long_name, name, positive, prec  &
+      , scalar_ref, standard_name, unit, value )
+
+  END SUBROUTINE xios(is_defined_scalar_attr)
+
+  SUBROUTINE xios(is_defined_scalar_attr_hdl)  &
+    ( scalar_hdl, axis_type, bounds, bounds_name, comment, label, long_name, name, positive, prec  &
+    , scalar_ref, standard_name, unit, value )
+
+    IMPLICIT NONE
+      TYPE(txios(scalar)) , INTENT(IN) :: scalar_hdl
+      LOGICAL, OPTIONAL, INTENT(OUT) :: axis_type
+      LOGICAL(KIND=C_BOOL) :: axis_type_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: bounds
+      LOGICAL(KIND=C_BOOL) :: bounds_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: bounds_name
+      LOGICAL(KIND=C_BOOL) :: bounds_name_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: comment
+      LOGICAL(KIND=C_BOOL) :: comment_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: label
+      LOGICAL(KIND=C_BOOL) :: label_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: long_name
+      LOGICAL(KIND=C_BOOL) :: long_name_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: name
+      LOGICAL(KIND=C_BOOL) :: name_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: positive
+      LOGICAL(KIND=C_BOOL) :: positive_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: prec
+      LOGICAL(KIND=C_BOOL) :: prec_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: scalar_ref
+      LOGICAL(KIND=C_BOOL) :: scalar_ref_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: standard_name
+      LOGICAL(KIND=C_BOOL) :: standard_name_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: unit
+      LOGICAL(KIND=C_BOOL) :: unit_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: value
+      LOGICAL(KIND=C_BOOL) :: value_tmp
+
+      CALL xios(is_defined_scalar_attr_hdl_)  &
+      ( scalar_hdl, axis_type, bounds, bounds_name, comment, label, long_name, name, positive, prec  &
+      , scalar_ref, standard_name, unit, value )
+
+  END SUBROUTINE xios(is_defined_scalar_attr_hdl)
+
+  SUBROUTINE xios(is_defined_scalar_attr_hdl_)   &
+    ( scalar_hdl, axis_type_, bounds_, bounds_name_, comment_, label_, long_name_, name_, positive_  &
+    , prec_, scalar_ref_, standard_name_, unit_, value_ )
+
+    IMPLICIT NONE
+      TYPE(txios(scalar)) , INTENT(IN) :: scalar_hdl
+      LOGICAL, OPTIONAL, INTENT(OUT) :: axis_type_
+      LOGICAL(KIND=C_BOOL) :: axis_type__tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: bounds_
+      LOGICAL(KIND=C_BOOL) :: bounds__tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: bounds_name_
+      LOGICAL(KIND=C_BOOL) :: bounds_name__tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: comment_
+      LOGICAL(KIND=C_BOOL) :: comment__tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: label_
+      LOGICAL(KIND=C_BOOL) :: label__tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: long_name_
+      LOGICAL(KIND=C_BOOL) :: long_name__tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: name_
+      LOGICAL(KIND=C_BOOL) :: name__tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: positive_
+      LOGICAL(KIND=C_BOOL) :: positive__tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: prec_
+      LOGICAL(KIND=C_BOOL) :: prec__tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: scalar_ref_
+      LOGICAL(KIND=C_BOOL) :: scalar_ref__tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: standard_name_
+      LOGICAL(KIND=C_BOOL) :: standard_name__tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: unit_
+      LOGICAL(KIND=C_BOOL) :: unit__tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: value_
+      LOGICAL(KIND=C_BOOL) :: value__tmp
+
+      IF (PRESENT(axis_type_)) THEN
+        axis_type__tmp = cxios_is_defined_scalar_axis_type &
+      (scalar_hdl%daddr)
+        axis_type_ = axis_type__tmp
+      ENDIF
+
+      IF (PRESENT(bounds_)) THEN
+        bounds__tmp = cxios_is_defined_scalar_bounds &
+      (scalar_hdl%daddr)
+        bounds_ = bounds__tmp
+      ENDIF
+
+      IF (PRESENT(bounds_name_)) THEN
+        bounds_name__tmp = cxios_is_defined_scalar_bounds_name &
+      (scalar_hdl%daddr)
+        bounds_name_ = bounds_name__tmp
+      ENDIF
+
+      IF (PRESENT(comment_)) THEN
+        comment__tmp = cxios_is_defined_scalar_comment &
+      (scalar_hdl%daddr)
+        comment_ = comment__tmp
+      ENDIF
+
+      IF (PRESENT(label_)) THEN
+        label__tmp = cxios_is_defined_scalar_label &
+      (scalar_hdl%daddr)
+        label_ = label__tmp
+      ENDIF
+
+      IF (PRESENT(long_name_)) THEN
+        long_name__tmp = cxios_is_defined_scalar_long_name &
+      (scalar_hdl%daddr)
+        long_name_ = long_name__tmp
+      ENDIF
+
+      IF (PRESENT(name_)) THEN
+        name__tmp = cxios_is_defined_scalar_name &
+      (scalar_hdl%daddr)
+        name_ = name__tmp
+      ENDIF
+
+      IF (PRESENT(positive_)) THEN
+        positive__tmp = cxios_is_defined_scalar_positive &
+      (scalar_hdl%daddr)
+        positive_ = positive__tmp
+      ENDIF
+
+      IF (PRESENT(prec_)) THEN
+        prec__tmp = cxios_is_defined_scalar_prec &
+      (scalar_hdl%daddr)
+        prec_ = prec__tmp
+      ENDIF
+
+      IF (PRESENT(scalar_ref_)) THEN
+        scalar_ref__tmp = cxios_is_defined_scalar_scalar_ref &
+      (scalar_hdl%daddr)
+        scalar_ref_ = scalar_ref__tmp
+      ENDIF
+
+      IF (PRESENT(standard_name_)) THEN
+        standard_name__tmp = cxios_is_defined_scalar_standard_name &
+      (scalar_hdl%daddr)
+        standard_name_ = standard_name__tmp
+      ENDIF
+
+      IF (PRESENT(unit_)) THEN
+        unit__tmp = cxios_is_defined_scalar_unit &
+      (scalar_hdl%daddr)
+        unit_ = unit__tmp
+      ENDIF
+
+      IF (PRESENT(value_)) THEN
+        value__tmp = cxios_is_defined_scalar_value &
+      (scalar_hdl%daddr)
+        value_ = value__tmp
+      ENDIF
+
+  END SUBROUTINE xios(is_defined_scalar_attr_hdl_)
+
+END MODULE iscalar_attr
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/fortran_attr/iscalargroup_attr.F90
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/fortran_attr/iscalargroup_attr.F90	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/fortran_attr/iscalargroup_attr.F90	(revision 1749)
@@ -0,0 +1,519 @@
+! * ************************************************************************** *
+! *               Interface auto generated - do not modify                     *
+! * ************************************************************************** *
+#include "xios_fortran_prefix.hpp"
+
+MODULE iscalargroup_attr
+  USE, INTRINSIC :: ISO_C_BINDING
+  USE iscalar
+  USE scalargroup_interface_attr
+
+CONTAINS
+
+  SUBROUTINE xios(set_scalargroup_attr)  &
+    ( scalargroup_id, axis_type, bounds, bounds_name, comment, group_ref, label, long_name, name  &
+    , positive, prec, scalar_ref, standard_name, unit, value )
+
+    IMPLICIT NONE
+      TYPE(txios(scalargroup))  :: scalargroup_hdl
+      CHARACTER(LEN=*), INTENT(IN) ::scalargroup_id
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: axis_type
+      REAL (KIND=8) , OPTIONAL, INTENT(IN) :: bounds(:)
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: bounds_name
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: comment
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: group_ref
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: label
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: long_name
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: name
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: positive
+      INTEGER  , OPTIONAL, INTENT(IN) :: prec
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: scalar_ref
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: standard_name
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: unit
+      REAL (KIND=8) , OPTIONAL, INTENT(IN) :: value
+
+      CALL xios(get_scalargroup_handle) &
+      (scalargroup_id,scalargroup_hdl)
+      CALL xios(set_scalargroup_attr_hdl_)   &
+      ( scalargroup_hdl, axis_type, bounds, bounds_name, comment, group_ref, label, long_name, name  &
+      , positive, prec, scalar_ref, standard_name, unit, value )
+
+  END SUBROUTINE xios(set_scalargroup_attr)
+
+  SUBROUTINE xios(set_scalargroup_attr_hdl)  &
+    ( scalargroup_hdl, axis_type, bounds, bounds_name, comment, group_ref, label, long_name, name  &
+    , positive, prec, scalar_ref, standard_name, unit, value )
+
+    IMPLICIT NONE
+      TYPE(txios(scalargroup)) , INTENT(IN) :: scalargroup_hdl
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: axis_type
+      REAL (KIND=8) , OPTIONAL, INTENT(IN) :: bounds(:)
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: bounds_name
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: comment
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: group_ref
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: label
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: long_name
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: name
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: positive
+      INTEGER  , OPTIONAL, INTENT(IN) :: prec
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: scalar_ref
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: standard_name
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: unit
+      REAL (KIND=8) , OPTIONAL, INTENT(IN) :: value
+
+      CALL xios(set_scalargroup_attr_hdl_)  &
+      ( scalargroup_hdl, axis_type, bounds, bounds_name, comment, group_ref, label, long_name, name  &
+      , positive, prec, scalar_ref, standard_name, unit, value )
+
+  END SUBROUTINE xios(set_scalargroup_attr_hdl)
+
+  SUBROUTINE xios(set_scalargroup_attr_hdl_)   &
+    ( scalargroup_hdl, axis_type_, bounds_, bounds_name_, comment_, group_ref_, label_, long_name_  &
+    , name_, positive_, prec_, scalar_ref_, standard_name_, unit_, value_ )
+
+    IMPLICIT NONE
+      TYPE(txios(scalargroup)) , INTENT(IN) :: scalargroup_hdl
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: axis_type_
+      REAL (KIND=8) , OPTIONAL, INTENT(IN) :: bounds_(:)
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: bounds_name_
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: comment_
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: group_ref_
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: label_
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: long_name_
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: name_
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: positive_
+      INTEGER  , OPTIONAL, INTENT(IN) :: prec_
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: scalar_ref_
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: standard_name_
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: unit_
+      REAL (KIND=8) , OPTIONAL, INTENT(IN) :: value_
+
+      IF (PRESENT(axis_type_)) THEN
+        CALL cxios_set_scalargroup_axis_type &
+      (scalargroup_hdl%daddr, axis_type_, len(axis_type_))
+      ENDIF
+
+      IF (PRESENT(bounds_)) THEN
+        CALL cxios_set_scalargroup_bounds &
+      (scalargroup_hdl%daddr, bounds_, SHAPE(bounds_))
+      ENDIF
+
+      IF (PRESENT(bounds_name_)) THEN
+        CALL cxios_set_scalargroup_bounds_name &
+      (scalargroup_hdl%daddr, bounds_name_, len(bounds_name_))
+      ENDIF
+
+      IF (PRESENT(comment_)) THEN
+        CALL cxios_set_scalargroup_comment &
+      (scalargroup_hdl%daddr, comment_, len(comment_))
+      ENDIF
+
+      IF (PRESENT(group_ref_)) THEN
+        CALL cxios_set_scalargroup_group_ref &
+      (scalargroup_hdl%daddr, group_ref_, len(group_ref_))
+      ENDIF
+
+      IF (PRESENT(label_)) THEN
+        CALL cxios_set_scalargroup_label &
+      (scalargroup_hdl%daddr, label_, len(label_))
+      ENDIF
+
+      IF (PRESENT(long_name_)) THEN
+        CALL cxios_set_scalargroup_long_name &
+      (scalargroup_hdl%daddr, long_name_, len(long_name_))
+      ENDIF
+
+      IF (PRESENT(name_)) THEN
+        CALL cxios_set_scalargroup_name &
+      (scalargroup_hdl%daddr, name_, len(name_))
+      ENDIF
+
+      IF (PRESENT(positive_)) THEN
+        CALL cxios_set_scalargroup_positive &
+      (scalargroup_hdl%daddr, positive_, len(positive_))
+      ENDIF
+
+      IF (PRESENT(prec_)) THEN
+        CALL cxios_set_scalargroup_prec &
+      (scalargroup_hdl%daddr, prec_)
+      ENDIF
+
+      IF (PRESENT(scalar_ref_)) THEN
+        CALL cxios_set_scalargroup_scalar_ref &
+      (scalargroup_hdl%daddr, scalar_ref_, len(scalar_ref_))
+      ENDIF
+
+      IF (PRESENT(standard_name_)) THEN
+        CALL cxios_set_scalargroup_standard_name &
+      (scalargroup_hdl%daddr, standard_name_, len(standard_name_))
+      ENDIF
+
+      IF (PRESENT(unit_)) THEN
+        CALL cxios_set_scalargroup_unit &
+      (scalargroup_hdl%daddr, unit_, len(unit_))
+      ENDIF
+
+      IF (PRESENT(value_)) THEN
+        CALL cxios_set_scalargroup_value &
+      (scalargroup_hdl%daddr, value_)
+      ENDIF
+
+  END SUBROUTINE xios(set_scalargroup_attr_hdl_)
+
+  SUBROUTINE xios(get_scalargroup_attr)  &
+    ( scalargroup_id, axis_type, bounds, bounds_name, comment, group_ref, label, long_name, name  &
+    , positive, prec, scalar_ref, standard_name, unit, value )
+
+    IMPLICIT NONE
+      TYPE(txios(scalargroup))  :: scalargroup_hdl
+      CHARACTER(LEN=*), INTENT(IN) ::scalargroup_id
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: axis_type
+      REAL (KIND=8) , OPTIONAL, INTENT(OUT) :: bounds(:)
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: bounds_name
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: comment
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: group_ref
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: label
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: long_name
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: name
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: positive
+      INTEGER  , OPTIONAL, INTENT(OUT) :: prec
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: scalar_ref
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: standard_name
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: unit
+      REAL (KIND=8) , OPTIONAL, INTENT(OUT) :: value
+
+      CALL xios(get_scalargroup_handle) &
+      (scalargroup_id,scalargroup_hdl)
+      CALL xios(get_scalargroup_attr_hdl_)   &
+      ( scalargroup_hdl, axis_type, bounds, bounds_name, comment, group_ref, label, long_name, name  &
+      , positive, prec, scalar_ref, standard_name, unit, value )
+
+  END SUBROUTINE xios(get_scalargroup_attr)
+
+  SUBROUTINE xios(get_scalargroup_attr_hdl)  &
+    ( scalargroup_hdl, axis_type, bounds, bounds_name, comment, group_ref, label, long_name, name  &
+    , positive, prec, scalar_ref, standard_name, unit, value )
+
+    IMPLICIT NONE
+      TYPE(txios(scalargroup)) , INTENT(IN) :: scalargroup_hdl
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: axis_type
+      REAL (KIND=8) , OPTIONAL, INTENT(OUT) :: bounds(:)
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: bounds_name
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: comment
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: group_ref
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: label
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: long_name
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: name
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: positive
+      INTEGER  , OPTIONAL, INTENT(OUT) :: prec
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: scalar_ref
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: standard_name
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: unit
+      REAL (KIND=8) , OPTIONAL, INTENT(OUT) :: value
+
+      CALL xios(get_scalargroup_attr_hdl_)  &
+      ( scalargroup_hdl, axis_type, bounds, bounds_name, comment, group_ref, label, long_name, name  &
+      , positive, prec, scalar_ref, standard_name, unit, value )
+
+  END SUBROUTINE xios(get_scalargroup_attr_hdl)
+
+  SUBROUTINE xios(get_scalargroup_attr_hdl_)   &
+    ( scalargroup_hdl, axis_type_, bounds_, bounds_name_, comment_, group_ref_, label_, long_name_  &
+    , name_, positive_, prec_, scalar_ref_, standard_name_, unit_, value_ )
+
+    IMPLICIT NONE
+      TYPE(txios(scalargroup)) , INTENT(IN) :: scalargroup_hdl
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: axis_type_
+      REAL (KIND=8) , OPTIONAL, INTENT(OUT) :: bounds_(:)
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: bounds_name_
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: comment_
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: group_ref_
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: label_
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: long_name_
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: name_
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: positive_
+      INTEGER  , OPTIONAL, INTENT(OUT) :: prec_
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: scalar_ref_
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: standard_name_
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: unit_
+      REAL (KIND=8) , OPTIONAL, INTENT(OUT) :: value_
+
+      IF (PRESENT(axis_type_)) THEN
+        CALL cxios_get_scalargroup_axis_type &
+      (scalargroup_hdl%daddr, axis_type_, len(axis_type_))
+      ENDIF
+
+      IF (PRESENT(bounds_)) THEN
+        CALL cxios_get_scalargroup_bounds &
+      (scalargroup_hdl%daddr, bounds_, SHAPE(bounds_))
+      ENDIF
+
+      IF (PRESENT(bounds_name_)) THEN
+        CALL cxios_get_scalargroup_bounds_name &
+      (scalargroup_hdl%daddr, bounds_name_, len(bounds_name_))
+      ENDIF
+
+      IF (PRESENT(comment_)) THEN
+        CALL cxios_get_scalargroup_comment &
+      (scalargroup_hdl%daddr, comment_, len(comment_))
+      ENDIF
+
+      IF (PRESENT(group_ref_)) THEN
+        CALL cxios_get_scalargroup_group_ref &
+      (scalargroup_hdl%daddr, group_ref_, len(group_ref_))
+      ENDIF
+
+      IF (PRESENT(label_)) THEN
+        CALL cxios_get_scalargroup_label &
+      (scalargroup_hdl%daddr, label_, len(label_))
+      ENDIF
+
+      IF (PRESENT(long_name_)) THEN
+        CALL cxios_get_scalargroup_long_name &
+      (scalargroup_hdl%daddr, long_name_, len(long_name_))
+      ENDIF
+
+      IF (PRESENT(name_)) THEN
+        CALL cxios_get_scalargroup_name &
+      (scalargroup_hdl%daddr, name_, len(name_))
+      ENDIF
+
+      IF (PRESENT(positive_)) THEN
+        CALL cxios_get_scalargroup_positive &
+      (scalargroup_hdl%daddr, positive_, len(positive_))
+      ENDIF
+
+      IF (PRESENT(prec_)) THEN
+        CALL cxios_get_scalargroup_prec &
+      (scalargroup_hdl%daddr, prec_)
+      ENDIF
+
+      IF (PRESENT(scalar_ref_)) THEN
+        CALL cxios_get_scalargroup_scalar_ref &
+      (scalargroup_hdl%daddr, scalar_ref_, len(scalar_ref_))
+      ENDIF
+
+      IF (PRESENT(standard_name_)) THEN
+        CALL cxios_get_scalargroup_standard_name &
+      (scalargroup_hdl%daddr, standard_name_, len(standard_name_))
+      ENDIF
+
+      IF (PRESENT(unit_)) THEN
+        CALL cxios_get_scalargroup_unit &
+      (scalargroup_hdl%daddr, unit_, len(unit_))
+      ENDIF
+
+      IF (PRESENT(value_)) THEN
+        CALL cxios_get_scalargroup_value &
+      (scalargroup_hdl%daddr, value_)
+      ENDIF
+
+  END SUBROUTINE xios(get_scalargroup_attr_hdl_)
+
+  SUBROUTINE xios(is_defined_scalargroup_attr)  &
+    ( scalargroup_id, axis_type, bounds, bounds_name, comment, group_ref, label, long_name, name  &
+    , positive, prec, scalar_ref, standard_name, unit, value )
+
+    IMPLICIT NONE
+      TYPE(txios(scalargroup))  :: scalargroup_hdl
+      CHARACTER(LEN=*), INTENT(IN) ::scalargroup_id
+      LOGICAL, OPTIONAL, INTENT(OUT) :: axis_type
+      LOGICAL(KIND=C_BOOL) :: axis_type_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: bounds
+      LOGICAL(KIND=C_BOOL) :: bounds_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: bounds_name
+      LOGICAL(KIND=C_BOOL) :: bounds_name_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: comment
+      LOGICAL(KIND=C_BOOL) :: comment_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: group_ref
+      LOGICAL(KIND=C_BOOL) :: group_ref_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: label
+      LOGICAL(KIND=C_BOOL) :: label_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: long_name
+      LOGICAL(KIND=C_BOOL) :: long_name_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: name
+      LOGICAL(KIND=C_BOOL) :: name_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: positive
+      LOGICAL(KIND=C_BOOL) :: positive_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: prec
+      LOGICAL(KIND=C_BOOL) :: prec_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: scalar_ref
+      LOGICAL(KIND=C_BOOL) :: scalar_ref_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: standard_name
+      LOGICAL(KIND=C_BOOL) :: standard_name_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: unit
+      LOGICAL(KIND=C_BOOL) :: unit_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: value
+      LOGICAL(KIND=C_BOOL) :: value_tmp
+
+      CALL xios(get_scalargroup_handle) &
+      (scalargroup_id,scalargroup_hdl)
+      CALL xios(is_defined_scalargroup_attr_hdl_)   &
+      ( scalargroup_hdl, axis_type, bounds, bounds_name, comment, group_ref, label, long_name, name  &
+      , positive, prec, scalar_ref, standard_name, unit, value )
+
+  END SUBROUTINE xios(is_defined_scalargroup_attr)
+
+  SUBROUTINE xios(is_defined_scalargroup_attr_hdl)  &
+    ( scalargroup_hdl, axis_type, bounds, bounds_name, comment, group_ref, label, long_name, name  &
+    , positive, prec, scalar_ref, standard_name, unit, value )
+
+    IMPLICIT NONE
+      TYPE(txios(scalargroup)) , INTENT(IN) :: scalargroup_hdl
+      LOGICAL, OPTIONAL, INTENT(OUT) :: axis_type
+      LOGICAL(KIND=C_BOOL) :: axis_type_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: bounds
+      LOGICAL(KIND=C_BOOL) :: bounds_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: bounds_name
+      LOGICAL(KIND=C_BOOL) :: bounds_name_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: comment
+      LOGICAL(KIND=C_BOOL) :: comment_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: group_ref
+      LOGICAL(KIND=C_BOOL) :: group_ref_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: label
+      LOGICAL(KIND=C_BOOL) :: label_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: long_name
+      LOGICAL(KIND=C_BOOL) :: long_name_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: name
+      LOGICAL(KIND=C_BOOL) :: name_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: positive
+      LOGICAL(KIND=C_BOOL) :: positive_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: prec
+      LOGICAL(KIND=C_BOOL) :: prec_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: scalar_ref
+      LOGICAL(KIND=C_BOOL) :: scalar_ref_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: standard_name
+      LOGICAL(KIND=C_BOOL) :: standard_name_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: unit
+      LOGICAL(KIND=C_BOOL) :: unit_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: value
+      LOGICAL(KIND=C_BOOL) :: value_tmp
+
+      CALL xios(is_defined_scalargroup_attr_hdl_)  &
+      ( scalargroup_hdl, axis_type, bounds, bounds_name, comment, group_ref, label, long_name, name  &
+      , positive, prec, scalar_ref, standard_name, unit, value )
+
+  END SUBROUTINE xios(is_defined_scalargroup_attr_hdl)
+
+  SUBROUTINE xios(is_defined_scalargroup_attr_hdl_)   &
+    ( scalargroup_hdl, axis_type_, bounds_, bounds_name_, comment_, group_ref_, label_, long_name_  &
+    , name_, positive_, prec_, scalar_ref_, standard_name_, unit_, value_ )
+
+    IMPLICIT NONE
+      TYPE(txios(scalargroup)) , INTENT(IN) :: scalargroup_hdl
+      LOGICAL, OPTIONAL, INTENT(OUT) :: axis_type_
+      LOGICAL(KIND=C_BOOL) :: axis_type__tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: bounds_
+      LOGICAL(KIND=C_BOOL) :: bounds__tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: bounds_name_
+      LOGICAL(KIND=C_BOOL) :: bounds_name__tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: comment_
+      LOGICAL(KIND=C_BOOL) :: comment__tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: group_ref_
+      LOGICAL(KIND=C_BOOL) :: group_ref__tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: label_
+      LOGICAL(KIND=C_BOOL) :: label__tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: long_name_
+      LOGICAL(KIND=C_BOOL) :: long_name__tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: name_
+      LOGICAL(KIND=C_BOOL) :: name__tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: positive_
+      LOGICAL(KIND=C_BOOL) :: positive__tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: prec_
+      LOGICAL(KIND=C_BOOL) :: prec__tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: scalar_ref_
+      LOGICAL(KIND=C_BOOL) :: scalar_ref__tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: standard_name_
+      LOGICAL(KIND=C_BOOL) :: standard_name__tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: unit_
+      LOGICAL(KIND=C_BOOL) :: unit__tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: value_
+      LOGICAL(KIND=C_BOOL) :: value__tmp
+
+      IF (PRESENT(axis_type_)) THEN
+        axis_type__tmp = cxios_is_defined_scalargroup_axis_type &
+      (scalargroup_hdl%daddr)
+        axis_type_ = axis_type__tmp
+      ENDIF
+
+      IF (PRESENT(bounds_)) THEN
+        bounds__tmp = cxios_is_defined_scalargroup_bounds &
+      (scalargroup_hdl%daddr)
+        bounds_ = bounds__tmp
+      ENDIF
+
+      IF (PRESENT(bounds_name_)) THEN
+        bounds_name__tmp = cxios_is_defined_scalargroup_bounds_name &
+      (scalargroup_hdl%daddr)
+        bounds_name_ = bounds_name__tmp
+      ENDIF
+
+      IF (PRESENT(comment_)) THEN
+        comment__tmp = cxios_is_defined_scalargroup_comment &
+      (scalargroup_hdl%daddr)
+        comment_ = comment__tmp
+      ENDIF
+
+      IF (PRESENT(group_ref_)) THEN
+        group_ref__tmp = cxios_is_defined_scalargroup_group_ref &
+      (scalargroup_hdl%daddr)
+        group_ref_ = group_ref__tmp
+      ENDIF
+
+      IF (PRESENT(label_)) THEN
+        label__tmp = cxios_is_defined_scalargroup_label &
+      (scalargroup_hdl%daddr)
+        label_ = label__tmp
+      ENDIF
+
+      IF (PRESENT(long_name_)) THEN
+        long_name__tmp = cxios_is_defined_scalargroup_long_name &
+      (scalargroup_hdl%daddr)
+        long_name_ = long_name__tmp
+      ENDIF
+
+      IF (PRESENT(name_)) THEN
+        name__tmp = cxios_is_defined_scalargroup_name &
+      (scalargroup_hdl%daddr)
+        name_ = name__tmp
+      ENDIF
+
+      IF (PRESENT(positive_)) THEN
+        positive__tmp = cxios_is_defined_scalargroup_positive &
+      (scalargroup_hdl%daddr)
+        positive_ = positive__tmp
+      ENDIF
+
+      IF (PRESENT(prec_)) THEN
+        prec__tmp = cxios_is_defined_scalargroup_prec &
+      (scalargroup_hdl%daddr)
+        prec_ = prec__tmp
+      ENDIF
+
+      IF (PRESENT(scalar_ref_)) THEN
+        scalar_ref__tmp = cxios_is_defined_scalargroup_scalar_ref &
+      (scalargroup_hdl%daddr)
+        scalar_ref_ = scalar_ref__tmp
+      ENDIF
+
+      IF (PRESENT(standard_name_)) THEN
+        standard_name__tmp = cxios_is_defined_scalargroup_standard_name &
+      (scalargroup_hdl%daddr)
+        standard_name_ = standard_name__tmp
+      ENDIF
+
+      IF (PRESENT(unit_)) THEN
+        unit__tmp = cxios_is_defined_scalargroup_unit &
+      (scalargroup_hdl%daddr)
+        unit_ = unit__tmp
+      ENDIF
+
+      IF (PRESENT(value_)) THEN
+        value__tmp = cxios_is_defined_scalargroup_value &
+      (scalargroup_hdl%daddr)
+        value_ = value__tmp
+      ENDIF
+
+  END SUBROUTINE xios(is_defined_scalargroup_attr_hdl_)
+
+END MODULE iscalargroup_attr
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/fortran_attr/itemporal_splitting_attr.F90
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/fortran_attr/itemporal_splitting_attr.F90	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/fortran_attr/itemporal_splitting_attr.F90	(revision 1749)
@@ -0,0 +1,112 @@
+! * ************************************************************************** *
+! *               Interface auto generated - do not modify                     *
+! * ************************************************************************** *
+#include "xios_fortran_prefix.hpp"
+
+MODULE itemporal_splitting_attr
+  USE, INTRINSIC :: ISO_C_BINDING
+  USE itemporal_splitting
+  USE temporal_splitting_interface_attr
+
+CONTAINS
+
+  SUBROUTINE xios(set_temporal_splitting_attr)  &
+    ( temporal_splitting_id )
+
+    IMPLICIT NONE
+      TYPE(txios(temporal_splitting))  :: temporal_splitting_hdl
+      CHARACTER(LEN=*), INTENT(IN) ::temporal_splitting_id
+
+      CALL xios(get_temporal_splitting_handle) &
+      (temporal_splitting_id,temporal_splitting_hdl)
+      CALL xios(set_temporal_splitting_attr_hdl_)   &
+      ( temporal_splitting_hdl )
+
+  END SUBROUTINE xios(set_temporal_splitting_attr)
+
+  SUBROUTINE xios(set_temporal_splitting_attr_hdl)  &
+    ( temporal_splitting_hdl )
+
+    IMPLICIT NONE
+      TYPE(txios(temporal_splitting)) , INTENT(IN) :: temporal_splitting_hdl
+
+      CALL xios(set_temporal_splitting_attr_hdl_)  &
+      ( temporal_splitting_hdl )
+
+  END SUBROUTINE xios(set_temporal_splitting_attr_hdl)
+
+  SUBROUTINE xios(set_temporal_splitting_attr_hdl_)   &
+    ( temporal_splitting_hdl )
+
+    IMPLICIT NONE
+      TYPE(txios(temporal_splitting)) , INTENT(IN) :: temporal_splitting_hdl
+
+  END SUBROUTINE xios(set_temporal_splitting_attr_hdl_)
+
+  SUBROUTINE xios(get_temporal_splitting_attr)  &
+    ( temporal_splitting_id )
+
+    IMPLICIT NONE
+      TYPE(txios(temporal_splitting))  :: temporal_splitting_hdl
+      CHARACTER(LEN=*), INTENT(IN) ::temporal_splitting_id
+
+      CALL xios(get_temporal_splitting_handle) &
+      (temporal_splitting_id,temporal_splitting_hdl)
+      CALL xios(get_temporal_splitting_attr_hdl_)   &
+      ( temporal_splitting_hdl )
+
+  END SUBROUTINE xios(get_temporal_splitting_attr)
+
+  SUBROUTINE xios(get_temporal_splitting_attr_hdl)  &
+    ( temporal_splitting_hdl )
+
+    IMPLICIT NONE
+      TYPE(txios(temporal_splitting)) , INTENT(IN) :: temporal_splitting_hdl
+
+      CALL xios(get_temporal_splitting_attr_hdl_)  &
+      ( temporal_splitting_hdl )
+
+  END SUBROUTINE xios(get_temporal_splitting_attr_hdl)
+
+  SUBROUTINE xios(get_temporal_splitting_attr_hdl_)   &
+    ( temporal_splitting_hdl )
+
+    IMPLICIT NONE
+      TYPE(txios(temporal_splitting)) , INTENT(IN) :: temporal_splitting_hdl
+
+  END SUBROUTINE xios(get_temporal_splitting_attr_hdl_)
+
+  SUBROUTINE xios(is_defined_temporal_splitting_attr)  &
+    ( temporal_splitting_id )
+
+    IMPLICIT NONE
+      TYPE(txios(temporal_splitting))  :: temporal_splitting_hdl
+      CHARACTER(LEN=*), INTENT(IN) ::temporal_splitting_id
+
+      CALL xios(get_temporal_splitting_handle) &
+      (temporal_splitting_id,temporal_splitting_hdl)
+      CALL xios(is_defined_temporal_splitting_attr_hdl_)   &
+      ( temporal_splitting_hdl )
+
+  END SUBROUTINE xios(is_defined_temporal_splitting_attr)
+
+  SUBROUTINE xios(is_defined_temporal_splitting_attr_hdl)  &
+    ( temporal_splitting_hdl )
+
+    IMPLICIT NONE
+      TYPE(txios(temporal_splitting)) , INTENT(IN) :: temporal_splitting_hdl
+
+      CALL xios(is_defined_temporal_splitting_attr_hdl_)  &
+      ( temporal_splitting_hdl )
+
+  END SUBROUTINE xios(is_defined_temporal_splitting_attr_hdl)
+
+  SUBROUTINE xios(is_defined_temporal_splitting_attr_hdl_)   &
+    ( temporal_splitting_hdl )
+
+    IMPLICIT NONE
+      TYPE(txios(temporal_splitting)) , INTENT(IN) :: temporal_splitting_hdl
+
+  END SUBROUTINE xios(is_defined_temporal_splitting_attr_hdl_)
+
+END MODULE itemporal_splitting_attr
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/fortran_attr/ivariable_attr.F90
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/fortran_attr/ivariable_attr.F90	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/fortran_attr/ivariable_attr.F90	(revision 1749)
@@ -0,0 +1,196 @@
+! * ************************************************************************** *
+! *               Interface auto generated - do not modify                     *
+! * ************************************************************************** *
+#include "xios_fortran_prefix.hpp"
+
+MODULE ivariable_attr
+  USE, INTRINSIC :: ISO_C_BINDING
+  USE ivariable
+  USE variable_interface_attr
+
+CONTAINS
+
+  SUBROUTINE xios(set_variable_attr)  &
+    ( variable_id, name, ts_target, type )
+
+    IMPLICIT NONE
+      TYPE(txios(variable))  :: variable_hdl
+      CHARACTER(LEN=*), INTENT(IN) ::variable_id
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: name
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: ts_target
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: type
+
+      CALL xios(get_variable_handle) &
+      (variable_id,variable_hdl)
+      CALL xios(set_variable_attr_hdl_)   &
+      ( variable_hdl, name, ts_target, type )
+
+  END SUBROUTINE xios(set_variable_attr)
+
+  SUBROUTINE xios(set_variable_attr_hdl)  &
+    ( variable_hdl, name, ts_target, type )
+
+    IMPLICIT NONE
+      TYPE(txios(variable)) , INTENT(IN) :: variable_hdl
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: name
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: ts_target
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: type
+
+      CALL xios(set_variable_attr_hdl_)  &
+      ( variable_hdl, name, ts_target, type )
+
+  END SUBROUTINE xios(set_variable_attr_hdl)
+
+  SUBROUTINE xios(set_variable_attr_hdl_)   &
+    ( variable_hdl, name_, ts_target_, type_ )
+
+    IMPLICIT NONE
+      TYPE(txios(variable)) , INTENT(IN) :: variable_hdl
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: name_
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: ts_target_
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: type_
+
+      IF (PRESENT(name_)) THEN
+        CALL cxios_set_variable_name &
+      (variable_hdl%daddr, name_, len(name_))
+      ENDIF
+
+      IF (PRESENT(ts_target_)) THEN
+        CALL cxios_set_variable_ts_target &
+      (variable_hdl%daddr, ts_target_, len(ts_target_))
+      ENDIF
+
+      IF (PRESENT(type_)) THEN
+        CALL cxios_set_variable_type &
+      (variable_hdl%daddr, type_, len(type_))
+      ENDIF
+
+  END SUBROUTINE xios(set_variable_attr_hdl_)
+
+  SUBROUTINE xios(get_variable_attr)  &
+    ( variable_id, name, ts_target, type )
+
+    IMPLICIT NONE
+      TYPE(txios(variable))  :: variable_hdl
+      CHARACTER(LEN=*), INTENT(IN) ::variable_id
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: name
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: ts_target
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: type
+
+      CALL xios(get_variable_handle) &
+      (variable_id,variable_hdl)
+      CALL xios(get_variable_attr_hdl_)   &
+      ( variable_hdl, name, ts_target, type )
+
+  END SUBROUTINE xios(get_variable_attr)
+
+  SUBROUTINE xios(get_variable_attr_hdl)  &
+    ( variable_hdl, name, ts_target, type )
+
+    IMPLICIT NONE
+      TYPE(txios(variable)) , INTENT(IN) :: variable_hdl
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: name
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: ts_target
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: type
+
+      CALL xios(get_variable_attr_hdl_)  &
+      ( variable_hdl, name, ts_target, type )
+
+  END SUBROUTINE xios(get_variable_attr_hdl)
+
+  SUBROUTINE xios(get_variable_attr_hdl_)   &
+    ( variable_hdl, name_, ts_target_, type_ )
+
+    IMPLICIT NONE
+      TYPE(txios(variable)) , INTENT(IN) :: variable_hdl
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: name_
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: ts_target_
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: type_
+
+      IF (PRESENT(name_)) THEN
+        CALL cxios_get_variable_name &
+      (variable_hdl%daddr, name_, len(name_))
+      ENDIF
+
+      IF (PRESENT(ts_target_)) THEN
+        CALL cxios_get_variable_ts_target &
+      (variable_hdl%daddr, ts_target_, len(ts_target_))
+      ENDIF
+
+      IF (PRESENT(type_)) THEN
+        CALL cxios_get_variable_type &
+      (variable_hdl%daddr, type_, len(type_))
+      ENDIF
+
+  END SUBROUTINE xios(get_variable_attr_hdl_)
+
+  SUBROUTINE xios(is_defined_variable_attr)  &
+    ( variable_id, name, ts_target, type )
+
+    IMPLICIT NONE
+      TYPE(txios(variable))  :: variable_hdl
+      CHARACTER(LEN=*), INTENT(IN) ::variable_id
+      LOGICAL, OPTIONAL, INTENT(OUT) :: name
+      LOGICAL(KIND=C_BOOL) :: name_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: ts_target
+      LOGICAL(KIND=C_BOOL) :: ts_target_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: type
+      LOGICAL(KIND=C_BOOL) :: type_tmp
+
+      CALL xios(get_variable_handle) &
+      (variable_id,variable_hdl)
+      CALL xios(is_defined_variable_attr_hdl_)   &
+      ( variable_hdl, name, ts_target, type )
+
+  END SUBROUTINE xios(is_defined_variable_attr)
+
+  SUBROUTINE xios(is_defined_variable_attr_hdl)  &
+    ( variable_hdl, name, ts_target, type )
+
+    IMPLICIT NONE
+      TYPE(txios(variable)) , INTENT(IN) :: variable_hdl
+      LOGICAL, OPTIONAL, INTENT(OUT) :: name
+      LOGICAL(KIND=C_BOOL) :: name_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: ts_target
+      LOGICAL(KIND=C_BOOL) :: ts_target_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: type
+      LOGICAL(KIND=C_BOOL) :: type_tmp
+
+      CALL xios(is_defined_variable_attr_hdl_)  &
+      ( variable_hdl, name, ts_target, type )
+
+  END SUBROUTINE xios(is_defined_variable_attr_hdl)
+
+  SUBROUTINE xios(is_defined_variable_attr_hdl_)   &
+    ( variable_hdl, name_, ts_target_, type_ )
+
+    IMPLICIT NONE
+      TYPE(txios(variable)) , INTENT(IN) :: variable_hdl
+      LOGICAL, OPTIONAL, INTENT(OUT) :: name_
+      LOGICAL(KIND=C_BOOL) :: name__tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: ts_target_
+      LOGICAL(KIND=C_BOOL) :: ts_target__tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: type_
+      LOGICAL(KIND=C_BOOL) :: type__tmp
+
+      IF (PRESENT(name_)) THEN
+        name__tmp = cxios_is_defined_variable_name &
+      (variable_hdl%daddr)
+        name_ = name__tmp
+      ENDIF
+
+      IF (PRESENT(ts_target_)) THEN
+        ts_target__tmp = cxios_is_defined_variable_ts_target &
+      (variable_hdl%daddr)
+        ts_target_ = ts_target__tmp
+      ENDIF
+
+      IF (PRESENT(type_)) THEN
+        type__tmp = cxios_is_defined_variable_type &
+      (variable_hdl%daddr)
+        type_ = type__tmp
+      ENDIF
+
+  END SUBROUTINE xios(is_defined_variable_attr_hdl_)
+
+END MODULE ivariable_attr
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/fortran_attr/ivariablegroup_attr.F90
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/fortran_attr/ivariablegroup_attr.F90	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/fortran_attr/ivariablegroup_attr.F90	(revision 1749)
@@ -0,0 +1,224 @@
+! * ************************************************************************** *
+! *               Interface auto generated - do not modify                     *
+! * ************************************************************************** *
+#include "xios_fortran_prefix.hpp"
+
+MODULE ivariablegroup_attr
+  USE, INTRINSIC :: ISO_C_BINDING
+  USE ivariable
+  USE variablegroup_interface_attr
+
+CONTAINS
+
+  SUBROUTINE xios(set_variablegroup_attr)  &
+    ( variablegroup_id, group_ref, name, ts_target, type )
+
+    IMPLICIT NONE
+      TYPE(txios(variablegroup))  :: variablegroup_hdl
+      CHARACTER(LEN=*), INTENT(IN) ::variablegroup_id
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: group_ref
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: name
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: ts_target
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: type
+
+      CALL xios(get_variablegroup_handle) &
+      (variablegroup_id,variablegroup_hdl)
+      CALL xios(set_variablegroup_attr_hdl_)   &
+      ( variablegroup_hdl, group_ref, name, ts_target, type )
+
+  END SUBROUTINE xios(set_variablegroup_attr)
+
+  SUBROUTINE xios(set_variablegroup_attr_hdl)  &
+    ( variablegroup_hdl, group_ref, name, ts_target, type )
+
+    IMPLICIT NONE
+      TYPE(txios(variablegroup)) , INTENT(IN) :: variablegroup_hdl
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: group_ref
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: name
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: ts_target
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: type
+
+      CALL xios(set_variablegroup_attr_hdl_)  &
+      ( variablegroup_hdl, group_ref, name, ts_target, type )
+
+  END SUBROUTINE xios(set_variablegroup_attr_hdl)
+
+  SUBROUTINE xios(set_variablegroup_attr_hdl_)   &
+    ( variablegroup_hdl, group_ref_, name_, ts_target_, type_ )
+
+    IMPLICIT NONE
+      TYPE(txios(variablegroup)) , INTENT(IN) :: variablegroup_hdl
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: group_ref_
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: name_
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: ts_target_
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: type_
+
+      IF (PRESENT(group_ref_)) THEN
+        CALL cxios_set_variablegroup_group_ref &
+      (variablegroup_hdl%daddr, group_ref_, len(group_ref_))
+      ENDIF
+
+      IF (PRESENT(name_)) THEN
+        CALL cxios_set_variablegroup_name &
+      (variablegroup_hdl%daddr, name_, len(name_))
+      ENDIF
+
+      IF (PRESENT(ts_target_)) THEN
+        CALL cxios_set_variablegroup_ts_target &
+      (variablegroup_hdl%daddr, ts_target_, len(ts_target_))
+      ENDIF
+
+      IF (PRESENT(type_)) THEN
+        CALL cxios_set_variablegroup_type &
+      (variablegroup_hdl%daddr, type_, len(type_))
+      ENDIF
+
+  END SUBROUTINE xios(set_variablegroup_attr_hdl_)
+
+  SUBROUTINE xios(get_variablegroup_attr)  &
+    ( variablegroup_id, group_ref, name, ts_target, type )
+
+    IMPLICIT NONE
+      TYPE(txios(variablegroup))  :: variablegroup_hdl
+      CHARACTER(LEN=*), INTENT(IN) ::variablegroup_id
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: group_ref
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: name
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: ts_target
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: type
+
+      CALL xios(get_variablegroup_handle) &
+      (variablegroup_id,variablegroup_hdl)
+      CALL xios(get_variablegroup_attr_hdl_)   &
+      ( variablegroup_hdl, group_ref, name, ts_target, type )
+
+  END SUBROUTINE xios(get_variablegroup_attr)
+
+  SUBROUTINE xios(get_variablegroup_attr_hdl)  &
+    ( variablegroup_hdl, group_ref, name, ts_target, type )
+
+    IMPLICIT NONE
+      TYPE(txios(variablegroup)) , INTENT(IN) :: variablegroup_hdl
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: group_ref
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: name
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: ts_target
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: type
+
+      CALL xios(get_variablegroup_attr_hdl_)  &
+      ( variablegroup_hdl, group_ref, name, ts_target, type )
+
+  END SUBROUTINE xios(get_variablegroup_attr_hdl)
+
+  SUBROUTINE xios(get_variablegroup_attr_hdl_)   &
+    ( variablegroup_hdl, group_ref_, name_, ts_target_, type_ )
+
+    IMPLICIT NONE
+      TYPE(txios(variablegroup)) , INTENT(IN) :: variablegroup_hdl
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: group_ref_
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: name_
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: ts_target_
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: type_
+
+      IF (PRESENT(group_ref_)) THEN
+        CALL cxios_get_variablegroup_group_ref &
+      (variablegroup_hdl%daddr, group_ref_, len(group_ref_))
+      ENDIF
+
+      IF (PRESENT(name_)) THEN
+        CALL cxios_get_variablegroup_name &
+      (variablegroup_hdl%daddr, name_, len(name_))
+      ENDIF
+
+      IF (PRESENT(ts_target_)) THEN
+        CALL cxios_get_variablegroup_ts_target &
+      (variablegroup_hdl%daddr, ts_target_, len(ts_target_))
+      ENDIF
+
+      IF (PRESENT(type_)) THEN
+        CALL cxios_get_variablegroup_type &
+      (variablegroup_hdl%daddr, type_, len(type_))
+      ENDIF
+
+  END SUBROUTINE xios(get_variablegroup_attr_hdl_)
+
+  SUBROUTINE xios(is_defined_variablegroup_attr)  &
+    ( variablegroup_id, group_ref, name, ts_target, type )
+
+    IMPLICIT NONE
+      TYPE(txios(variablegroup))  :: variablegroup_hdl
+      CHARACTER(LEN=*), INTENT(IN) ::variablegroup_id
+      LOGICAL, OPTIONAL, INTENT(OUT) :: group_ref
+      LOGICAL(KIND=C_BOOL) :: group_ref_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: name
+      LOGICAL(KIND=C_BOOL) :: name_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: ts_target
+      LOGICAL(KIND=C_BOOL) :: ts_target_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: type
+      LOGICAL(KIND=C_BOOL) :: type_tmp
+
+      CALL xios(get_variablegroup_handle) &
+      (variablegroup_id,variablegroup_hdl)
+      CALL xios(is_defined_variablegroup_attr_hdl_)   &
+      ( variablegroup_hdl, group_ref, name, ts_target, type )
+
+  END SUBROUTINE xios(is_defined_variablegroup_attr)
+
+  SUBROUTINE xios(is_defined_variablegroup_attr_hdl)  &
+    ( variablegroup_hdl, group_ref, name, ts_target, type )
+
+    IMPLICIT NONE
+      TYPE(txios(variablegroup)) , INTENT(IN) :: variablegroup_hdl
+      LOGICAL, OPTIONAL, INTENT(OUT) :: group_ref
+      LOGICAL(KIND=C_BOOL) :: group_ref_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: name
+      LOGICAL(KIND=C_BOOL) :: name_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: ts_target
+      LOGICAL(KIND=C_BOOL) :: ts_target_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: type
+      LOGICAL(KIND=C_BOOL) :: type_tmp
+
+      CALL xios(is_defined_variablegroup_attr_hdl_)  &
+      ( variablegroup_hdl, group_ref, name, ts_target, type )
+
+  END SUBROUTINE xios(is_defined_variablegroup_attr_hdl)
+
+  SUBROUTINE xios(is_defined_variablegroup_attr_hdl_)   &
+    ( variablegroup_hdl, group_ref_, name_, ts_target_, type_ )
+
+    IMPLICIT NONE
+      TYPE(txios(variablegroup)) , INTENT(IN) :: variablegroup_hdl
+      LOGICAL, OPTIONAL, INTENT(OUT) :: group_ref_
+      LOGICAL(KIND=C_BOOL) :: group_ref__tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: name_
+      LOGICAL(KIND=C_BOOL) :: name__tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: ts_target_
+      LOGICAL(KIND=C_BOOL) :: ts_target__tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: type_
+      LOGICAL(KIND=C_BOOL) :: type__tmp
+
+      IF (PRESENT(group_ref_)) THEN
+        group_ref__tmp = cxios_is_defined_variablegroup_group_ref &
+      (variablegroup_hdl%daddr)
+        group_ref_ = group_ref__tmp
+      ENDIF
+
+      IF (PRESENT(name_)) THEN
+        name__tmp = cxios_is_defined_variablegroup_name &
+      (variablegroup_hdl%daddr)
+        name_ = name__tmp
+      ENDIF
+
+      IF (PRESENT(ts_target_)) THEN
+        ts_target__tmp = cxios_is_defined_variablegroup_ts_target &
+      (variablegroup_hdl%daddr)
+        ts_target_ = ts_target__tmp
+      ENDIF
+
+      IF (PRESENT(type_)) THEN
+        type__tmp = cxios_is_defined_variablegroup_type &
+      (variablegroup_hdl%daddr)
+        type_ = type__tmp
+      ENDIF
+
+  END SUBROUTINE xios(is_defined_variablegroup_attr_hdl_)
+
+END MODULE ivariablegroup_attr
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/fortran_attr/izoom_axis_attr.F90
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/fortran_attr/izoom_axis_attr.F90	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/fortran_attr/izoom_axis_attr.F90	(revision 1749)
@@ -0,0 +1,196 @@
+! * ************************************************************************** *
+! *               Interface auto generated - do not modify                     *
+! * ************************************************************************** *
+#include "xios_fortran_prefix.hpp"
+
+MODULE izoom_axis_attr
+  USE, INTRINSIC :: ISO_C_BINDING
+  USE izoom_axis
+  USE zoom_axis_interface_attr
+
+CONTAINS
+
+  SUBROUTINE xios(set_zoom_axis_attr)  &
+    ( zoom_axis_id, begin, index, n )
+
+    IMPLICIT NONE
+      TYPE(txios(zoom_axis))  :: zoom_axis_hdl
+      CHARACTER(LEN=*), INTENT(IN) ::zoom_axis_id
+      INTEGER  , OPTIONAL, INTENT(IN) :: begin
+      INTEGER  , OPTIONAL, INTENT(IN) :: index(:)
+      INTEGER  , OPTIONAL, INTENT(IN) :: n
+
+      CALL xios(get_zoom_axis_handle) &
+      (zoom_axis_id,zoom_axis_hdl)
+      CALL xios(set_zoom_axis_attr_hdl_)   &
+      ( zoom_axis_hdl, begin, index, n )
+
+  END SUBROUTINE xios(set_zoom_axis_attr)
+
+  SUBROUTINE xios(set_zoom_axis_attr_hdl)  &
+    ( zoom_axis_hdl, begin, index, n )
+
+    IMPLICIT NONE
+      TYPE(txios(zoom_axis)) , INTENT(IN) :: zoom_axis_hdl
+      INTEGER  , OPTIONAL, INTENT(IN) :: begin
+      INTEGER  , OPTIONAL, INTENT(IN) :: index(:)
+      INTEGER  , OPTIONAL, INTENT(IN) :: n
+
+      CALL xios(set_zoom_axis_attr_hdl_)  &
+      ( zoom_axis_hdl, begin, index, n )
+
+  END SUBROUTINE xios(set_zoom_axis_attr_hdl)
+
+  SUBROUTINE xios(set_zoom_axis_attr_hdl_)   &
+    ( zoom_axis_hdl, begin_, index_, n_ )
+
+    IMPLICIT NONE
+      TYPE(txios(zoom_axis)) , INTENT(IN) :: zoom_axis_hdl
+      INTEGER  , OPTIONAL, INTENT(IN) :: begin_
+      INTEGER  , OPTIONAL, INTENT(IN) :: index_(:)
+      INTEGER  , OPTIONAL, INTENT(IN) :: n_
+
+      IF (PRESENT(begin_)) THEN
+        CALL cxios_set_zoom_axis_begin &
+      (zoom_axis_hdl%daddr, begin_)
+      ENDIF
+
+      IF (PRESENT(index_)) THEN
+        CALL cxios_set_zoom_axis_index &
+      (zoom_axis_hdl%daddr, index_, SHAPE(index_))
+      ENDIF
+
+      IF (PRESENT(n_)) THEN
+        CALL cxios_set_zoom_axis_n &
+      (zoom_axis_hdl%daddr, n_)
+      ENDIF
+
+  END SUBROUTINE xios(set_zoom_axis_attr_hdl_)
+
+  SUBROUTINE xios(get_zoom_axis_attr)  &
+    ( zoom_axis_id, begin, index, n )
+
+    IMPLICIT NONE
+      TYPE(txios(zoom_axis))  :: zoom_axis_hdl
+      CHARACTER(LEN=*), INTENT(IN) ::zoom_axis_id
+      INTEGER  , OPTIONAL, INTENT(OUT) :: begin
+      INTEGER  , OPTIONAL, INTENT(OUT) :: index(:)
+      INTEGER  , OPTIONAL, INTENT(OUT) :: n
+
+      CALL xios(get_zoom_axis_handle) &
+      (zoom_axis_id,zoom_axis_hdl)
+      CALL xios(get_zoom_axis_attr_hdl_)   &
+      ( zoom_axis_hdl, begin, index, n )
+
+  END SUBROUTINE xios(get_zoom_axis_attr)
+
+  SUBROUTINE xios(get_zoom_axis_attr_hdl)  &
+    ( zoom_axis_hdl, begin, index, n )
+
+    IMPLICIT NONE
+      TYPE(txios(zoom_axis)) , INTENT(IN) :: zoom_axis_hdl
+      INTEGER  , OPTIONAL, INTENT(OUT) :: begin
+      INTEGER  , OPTIONAL, INTENT(OUT) :: index(:)
+      INTEGER  , OPTIONAL, INTENT(OUT) :: n
+
+      CALL xios(get_zoom_axis_attr_hdl_)  &
+      ( zoom_axis_hdl, begin, index, n )
+
+  END SUBROUTINE xios(get_zoom_axis_attr_hdl)
+
+  SUBROUTINE xios(get_zoom_axis_attr_hdl_)   &
+    ( zoom_axis_hdl, begin_, index_, n_ )
+
+    IMPLICIT NONE
+      TYPE(txios(zoom_axis)) , INTENT(IN) :: zoom_axis_hdl
+      INTEGER  , OPTIONAL, INTENT(OUT) :: begin_
+      INTEGER  , OPTIONAL, INTENT(OUT) :: index_(:)
+      INTEGER  , OPTIONAL, INTENT(OUT) :: n_
+
+      IF (PRESENT(begin_)) THEN
+        CALL cxios_get_zoom_axis_begin &
+      (zoom_axis_hdl%daddr, begin_)
+      ENDIF
+
+      IF (PRESENT(index_)) THEN
+        CALL cxios_get_zoom_axis_index &
+      (zoom_axis_hdl%daddr, index_, SHAPE(index_))
+      ENDIF
+
+      IF (PRESENT(n_)) THEN
+        CALL cxios_get_zoom_axis_n &
+      (zoom_axis_hdl%daddr, n_)
+      ENDIF
+
+  END SUBROUTINE xios(get_zoom_axis_attr_hdl_)
+
+  SUBROUTINE xios(is_defined_zoom_axis_attr)  &
+    ( zoom_axis_id, begin, index, n )
+
+    IMPLICIT NONE
+      TYPE(txios(zoom_axis))  :: zoom_axis_hdl
+      CHARACTER(LEN=*), INTENT(IN) ::zoom_axis_id
+      LOGICAL, OPTIONAL, INTENT(OUT) :: begin
+      LOGICAL(KIND=C_BOOL) :: begin_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: index
+      LOGICAL(KIND=C_BOOL) :: index_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: n
+      LOGICAL(KIND=C_BOOL) :: n_tmp
+
+      CALL xios(get_zoom_axis_handle) &
+      (zoom_axis_id,zoom_axis_hdl)
+      CALL xios(is_defined_zoom_axis_attr_hdl_)   &
+      ( zoom_axis_hdl, begin, index, n )
+
+  END SUBROUTINE xios(is_defined_zoom_axis_attr)
+
+  SUBROUTINE xios(is_defined_zoom_axis_attr_hdl)  &
+    ( zoom_axis_hdl, begin, index, n )
+
+    IMPLICIT NONE
+      TYPE(txios(zoom_axis)) , INTENT(IN) :: zoom_axis_hdl
+      LOGICAL, OPTIONAL, INTENT(OUT) :: begin
+      LOGICAL(KIND=C_BOOL) :: begin_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: index
+      LOGICAL(KIND=C_BOOL) :: index_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: n
+      LOGICAL(KIND=C_BOOL) :: n_tmp
+
+      CALL xios(is_defined_zoom_axis_attr_hdl_)  &
+      ( zoom_axis_hdl, begin, index, n )
+
+  END SUBROUTINE xios(is_defined_zoom_axis_attr_hdl)
+
+  SUBROUTINE xios(is_defined_zoom_axis_attr_hdl_)   &
+    ( zoom_axis_hdl, begin_, index_, n_ )
+
+    IMPLICIT NONE
+      TYPE(txios(zoom_axis)) , INTENT(IN) :: zoom_axis_hdl
+      LOGICAL, OPTIONAL, INTENT(OUT) :: begin_
+      LOGICAL(KIND=C_BOOL) :: begin__tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: index_
+      LOGICAL(KIND=C_BOOL) :: index__tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: n_
+      LOGICAL(KIND=C_BOOL) :: n__tmp
+
+      IF (PRESENT(begin_)) THEN
+        begin__tmp = cxios_is_defined_zoom_axis_begin &
+      (zoom_axis_hdl%daddr)
+        begin_ = begin__tmp
+      ENDIF
+
+      IF (PRESENT(index_)) THEN
+        index__tmp = cxios_is_defined_zoom_axis_index &
+      (zoom_axis_hdl%daddr)
+        index_ = index__tmp
+      ENDIF
+
+      IF (PRESENT(n_)) THEN
+        n__tmp = cxios_is_defined_zoom_axis_n &
+      (zoom_axis_hdl%daddr)
+        n_ = n__tmp
+      ENDIF
+
+  END SUBROUTINE xios(is_defined_zoom_axis_attr_hdl_)
+
+END MODULE izoom_axis_attr
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/fortran_attr/izoom_domain_attr.F90
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/fortran_attr/izoom_domain_attr.F90	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/fortran_attr/izoom_domain_attr.F90	(revision 1749)
@@ -0,0 +1,224 @@
+! * ************************************************************************** *
+! *               Interface auto generated - do not modify                     *
+! * ************************************************************************** *
+#include "xios_fortran_prefix.hpp"
+
+MODULE izoom_domain_attr
+  USE, INTRINSIC :: ISO_C_BINDING
+  USE izoom_domain
+  USE zoom_domain_interface_attr
+
+CONTAINS
+
+  SUBROUTINE xios(set_zoom_domain_attr)  &
+    ( zoom_domain_id, ibegin, jbegin, ni, nj )
+
+    IMPLICIT NONE
+      TYPE(txios(zoom_domain))  :: zoom_domain_hdl
+      CHARACTER(LEN=*), INTENT(IN) ::zoom_domain_id
+      INTEGER  , OPTIONAL, INTENT(IN) :: ibegin
+      INTEGER  , OPTIONAL, INTENT(IN) :: jbegin
+      INTEGER  , OPTIONAL, INTENT(IN) :: ni
+      INTEGER  , OPTIONAL, INTENT(IN) :: nj
+
+      CALL xios(get_zoom_domain_handle) &
+      (zoom_domain_id,zoom_domain_hdl)
+      CALL xios(set_zoom_domain_attr_hdl_)   &
+      ( zoom_domain_hdl, ibegin, jbegin, ni, nj )
+
+  END SUBROUTINE xios(set_zoom_domain_attr)
+
+  SUBROUTINE xios(set_zoom_domain_attr_hdl)  &
+    ( zoom_domain_hdl, ibegin, jbegin, ni, nj )
+
+    IMPLICIT NONE
+      TYPE(txios(zoom_domain)) , INTENT(IN) :: zoom_domain_hdl
+      INTEGER  , OPTIONAL, INTENT(IN) :: ibegin
+      INTEGER  , OPTIONAL, INTENT(IN) :: jbegin
+      INTEGER  , OPTIONAL, INTENT(IN) :: ni
+      INTEGER  , OPTIONAL, INTENT(IN) :: nj
+
+      CALL xios(set_zoom_domain_attr_hdl_)  &
+      ( zoom_domain_hdl, ibegin, jbegin, ni, nj )
+
+  END SUBROUTINE xios(set_zoom_domain_attr_hdl)
+
+  SUBROUTINE xios(set_zoom_domain_attr_hdl_)   &
+    ( zoom_domain_hdl, ibegin_, jbegin_, ni_, nj_ )
+
+    IMPLICIT NONE
+      TYPE(txios(zoom_domain)) , INTENT(IN) :: zoom_domain_hdl
+      INTEGER  , OPTIONAL, INTENT(IN) :: ibegin_
+      INTEGER  , OPTIONAL, INTENT(IN) :: jbegin_
+      INTEGER  , OPTIONAL, INTENT(IN) :: ni_
+      INTEGER  , OPTIONAL, INTENT(IN) :: nj_
+
+      IF (PRESENT(ibegin_)) THEN
+        CALL cxios_set_zoom_domain_ibegin &
+      (zoom_domain_hdl%daddr, ibegin_)
+      ENDIF
+
+      IF (PRESENT(jbegin_)) THEN
+        CALL cxios_set_zoom_domain_jbegin &
+      (zoom_domain_hdl%daddr, jbegin_)
+      ENDIF
+
+      IF (PRESENT(ni_)) THEN
+        CALL cxios_set_zoom_domain_ni &
+      (zoom_domain_hdl%daddr, ni_)
+      ENDIF
+
+      IF (PRESENT(nj_)) THEN
+        CALL cxios_set_zoom_domain_nj &
+      (zoom_domain_hdl%daddr, nj_)
+      ENDIF
+
+  END SUBROUTINE xios(set_zoom_domain_attr_hdl_)
+
+  SUBROUTINE xios(get_zoom_domain_attr)  &
+    ( zoom_domain_id, ibegin, jbegin, ni, nj )
+
+    IMPLICIT NONE
+      TYPE(txios(zoom_domain))  :: zoom_domain_hdl
+      CHARACTER(LEN=*), INTENT(IN) ::zoom_domain_id
+      INTEGER  , OPTIONAL, INTENT(OUT) :: ibegin
+      INTEGER  , OPTIONAL, INTENT(OUT) :: jbegin
+      INTEGER  , OPTIONAL, INTENT(OUT) :: ni
+      INTEGER  , OPTIONAL, INTENT(OUT) :: nj
+
+      CALL xios(get_zoom_domain_handle) &
+      (zoom_domain_id,zoom_domain_hdl)
+      CALL xios(get_zoom_domain_attr_hdl_)   &
+      ( zoom_domain_hdl, ibegin, jbegin, ni, nj )
+
+  END SUBROUTINE xios(get_zoom_domain_attr)
+
+  SUBROUTINE xios(get_zoom_domain_attr_hdl)  &
+    ( zoom_domain_hdl, ibegin, jbegin, ni, nj )
+
+    IMPLICIT NONE
+      TYPE(txios(zoom_domain)) , INTENT(IN) :: zoom_domain_hdl
+      INTEGER  , OPTIONAL, INTENT(OUT) :: ibegin
+      INTEGER  , OPTIONAL, INTENT(OUT) :: jbegin
+      INTEGER  , OPTIONAL, INTENT(OUT) :: ni
+      INTEGER  , OPTIONAL, INTENT(OUT) :: nj
+
+      CALL xios(get_zoom_domain_attr_hdl_)  &
+      ( zoom_domain_hdl, ibegin, jbegin, ni, nj )
+
+  END SUBROUTINE xios(get_zoom_domain_attr_hdl)
+
+  SUBROUTINE xios(get_zoom_domain_attr_hdl_)   &
+    ( zoom_domain_hdl, ibegin_, jbegin_, ni_, nj_ )
+
+    IMPLICIT NONE
+      TYPE(txios(zoom_domain)) , INTENT(IN) :: zoom_domain_hdl
+      INTEGER  , OPTIONAL, INTENT(OUT) :: ibegin_
+      INTEGER  , OPTIONAL, INTENT(OUT) :: jbegin_
+      INTEGER  , OPTIONAL, INTENT(OUT) :: ni_
+      INTEGER  , OPTIONAL, INTENT(OUT) :: nj_
+
+      IF (PRESENT(ibegin_)) THEN
+        CALL cxios_get_zoom_domain_ibegin &
+      (zoom_domain_hdl%daddr, ibegin_)
+      ENDIF
+
+      IF (PRESENT(jbegin_)) THEN
+        CALL cxios_get_zoom_domain_jbegin &
+      (zoom_domain_hdl%daddr, jbegin_)
+      ENDIF
+
+      IF (PRESENT(ni_)) THEN
+        CALL cxios_get_zoom_domain_ni &
+      (zoom_domain_hdl%daddr, ni_)
+      ENDIF
+
+      IF (PRESENT(nj_)) THEN
+        CALL cxios_get_zoom_domain_nj &
+      (zoom_domain_hdl%daddr, nj_)
+      ENDIF
+
+  END SUBROUTINE xios(get_zoom_domain_attr_hdl_)
+
+  SUBROUTINE xios(is_defined_zoom_domain_attr)  &
+    ( zoom_domain_id, ibegin, jbegin, ni, nj )
+
+    IMPLICIT NONE
+      TYPE(txios(zoom_domain))  :: zoom_domain_hdl
+      CHARACTER(LEN=*), INTENT(IN) ::zoom_domain_id
+      LOGICAL, OPTIONAL, INTENT(OUT) :: ibegin
+      LOGICAL(KIND=C_BOOL) :: ibegin_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: jbegin
+      LOGICAL(KIND=C_BOOL) :: jbegin_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: ni
+      LOGICAL(KIND=C_BOOL) :: ni_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: nj
+      LOGICAL(KIND=C_BOOL) :: nj_tmp
+
+      CALL xios(get_zoom_domain_handle) &
+      (zoom_domain_id,zoom_domain_hdl)
+      CALL xios(is_defined_zoom_domain_attr_hdl_)   &
+      ( zoom_domain_hdl, ibegin, jbegin, ni, nj )
+
+  END SUBROUTINE xios(is_defined_zoom_domain_attr)
+
+  SUBROUTINE xios(is_defined_zoom_domain_attr_hdl)  &
+    ( zoom_domain_hdl, ibegin, jbegin, ni, nj )
+
+    IMPLICIT NONE
+      TYPE(txios(zoom_domain)) , INTENT(IN) :: zoom_domain_hdl
+      LOGICAL, OPTIONAL, INTENT(OUT) :: ibegin
+      LOGICAL(KIND=C_BOOL) :: ibegin_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: jbegin
+      LOGICAL(KIND=C_BOOL) :: jbegin_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: ni
+      LOGICAL(KIND=C_BOOL) :: ni_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: nj
+      LOGICAL(KIND=C_BOOL) :: nj_tmp
+
+      CALL xios(is_defined_zoom_domain_attr_hdl_)  &
+      ( zoom_domain_hdl, ibegin, jbegin, ni, nj )
+
+  END SUBROUTINE xios(is_defined_zoom_domain_attr_hdl)
+
+  SUBROUTINE xios(is_defined_zoom_domain_attr_hdl_)   &
+    ( zoom_domain_hdl, ibegin_, jbegin_, ni_, nj_ )
+
+    IMPLICIT NONE
+      TYPE(txios(zoom_domain)) , INTENT(IN) :: zoom_domain_hdl
+      LOGICAL, OPTIONAL, INTENT(OUT) :: ibegin_
+      LOGICAL(KIND=C_BOOL) :: ibegin__tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: jbegin_
+      LOGICAL(KIND=C_BOOL) :: jbegin__tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: ni_
+      LOGICAL(KIND=C_BOOL) :: ni__tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: nj_
+      LOGICAL(KIND=C_BOOL) :: nj__tmp
+
+      IF (PRESENT(ibegin_)) THEN
+        ibegin__tmp = cxios_is_defined_zoom_domain_ibegin &
+      (zoom_domain_hdl%daddr)
+        ibegin_ = ibegin__tmp
+      ENDIF
+
+      IF (PRESENT(jbegin_)) THEN
+        jbegin__tmp = cxios_is_defined_zoom_domain_jbegin &
+      (zoom_domain_hdl%daddr)
+        jbegin_ = jbegin__tmp
+      ENDIF
+
+      IF (PRESENT(ni_)) THEN
+        ni__tmp = cxios_is_defined_zoom_domain_ni &
+      (zoom_domain_hdl%daddr)
+        ni_ = ni__tmp
+      ENDIF
+
+      IF (PRESENT(nj_)) THEN
+        nj__tmp = cxios_is_defined_zoom_domain_nj &
+      (zoom_domain_hdl%daddr)
+        nj_ = nj__tmp
+      ENDIF
+
+  END SUBROUTINE xios(is_defined_zoom_domain_attr_hdl_)
+
+END MODULE izoom_domain_attr
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/fortran_attr/reduce_axis_to_axis_interface_attr.F90
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/fortran_attr/reduce_axis_to_axis_interface_attr.F90	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/fortran_attr/reduce_axis_to_axis_interface_attr.F90	(revision 1749)
@@ -0,0 +1,34 @@
+! * ************************************************************************** *
+! *               Interface auto generated - do not modify                     *
+! * ************************************************************************** *
+#include "../fortran/xios_fortran_prefix.hpp"
+
+MODULE reduce_axis_to_axis_interface_attr
+  USE, INTRINSIC :: ISO_C_BINDING
+
+  INTERFACE
+    ! Do not call directly / interface FORTRAN 2003 <-> C99
+
+    SUBROUTINE cxios_set_reduce_axis_to_axis_operation(reduce_axis_to_axis_hdl, operation, operation_size) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: reduce_axis_to_axis_hdl
+      CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: operation
+      INTEGER  (kind = C_INT)     , VALUE        :: operation_size
+    END SUBROUTINE cxios_set_reduce_axis_to_axis_operation
+
+    SUBROUTINE cxios_get_reduce_axis_to_axis_operation(reduce_axis_to_axis_hdl, operation, operation_size) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: reduce_axis_to_axis_hdl
+      CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: operation
+      INTEGER  (kind = C_INT)     , VALUE        :: operation_size
+    END SUBROUTINE cxios_get_reduce_axis_to_axis_operation
+
+    FUNCTION cxios_is_defined_reduce_axis_to_axis_operation(reduce_axis_to_axis_hdl) BIND(C)
+      USE ISO_C_BINDING
+      LOGICAL(kind=C_BOOL) :: cxios_is_defined_reduce_axis_to_axis_operation
+      INTEGER (kind = C_INTPTR_T), VALUE :: reduce_axis_to_axis_hdl
+    END FUNCTION cxios_is_defined_reduce_axis_to_axis_operation
+
+  END INTERFACE
+
+END MODULE reduce_axis_to_axis_interface_attr
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/fortran_attr/reduce_axis_to_scalar_interface_attr.F90
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/fortran_attr/reduce_axis_to_scalar_interface_attr.F90	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/fortran_attr/reduce_axis_to_scalar_interface_attr.F90	(revision 1749)
@@ -0,0 +1,34 @@
+! * ************************************************************************** *
+! *               Interface auto generated - do not modify                     *
+! * ************************************************************************** *
+#include "../fortran/xios_fortran_prefix.hpp"
+
+MODULE reduce_axis_to_scalar_interface_attr
+  USE, INTRINSIC :: ISO_C_BINDING
+
+  INTERFACE
+    ! Do not call directly / interface FORTRAN 2003 <-> C99
+
+    SUBROUTINE cxios_set_reduce_axis_to_scalar_operation(reduce_axis_to_scalar_hdl, operation, operation_size) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: reduce_axis_to_scalar_hdl
+      CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: operation
+      INTEGER  (kind = C_INT)     , VALUE        :: operation_size
+    END SUBROUTINE cxios_set_reduce_axis_to_scalar_operation
+
+    SUBROUTINE cxios_get_reduce_axis_to_scalar_operation(reduce_axis_to_scalar_hdl, operation, operation_size) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: reduce_axis_to_scalar_hdl
+      CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: operation
+      INTEGER  (kind = C_INT)     , VALUE        :: operation_size
+    END SUBROUTINE cxios_get_reduce_axis_to_scalar_operation
+
+    FUNCTION cxios_is_defined_reduce_axis_to_scalar_operation(reduce_axis_to_scalar_hdl) BIND(C)
+      USE ISO_C_BINDING
+      LOGICAL(kind=C_BOOL) :: cxios_is_defined_reduce_axis_to_scalar_operation
+      INTEGER (kind = C_INTPTR_T), VALUE :: reduce_axis_to_scalar_hdl
+    END FUNCTION cxios_is_defined_reduce_axis_to_scalar_operation
+
+  END INTERFACE
+
+END MODULE reduce_axis_to_scalar_interface_attr
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/fortran_attr/reduce_domain_to_axis_interface_attr.F90
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/fortran_attr/reduce_domain_to_axis_interface_attr.F90	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/fortran_attr/reduce_domain_to_axis_interface_attr.F90	(revision 1749)
@@ -0,0 +1,74 @@
+! * ************************************************************************** *
+! *               Interface auto generated - do not modify                     *
+! * ************************************************************************** *
+#include "../fortran/xios_fortran_prefix.hpp"
+
+MODULE reduce_domain_to_axis_interface_attr
+  USE, INTRINSIC :: ISO_C_BINDING
+
+  INTERFACE
+    ! Do not call directly / interface FORTRAN 2003 <-> C99
+
+    SUBROUTINE cxios_set_reduce_domain_to_axis_direction(reduce_domain_to_axis_hdl, direction, direction_size) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: reduce_domain_to_axis_hdl
+      CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: direction
+      INTEGER  (kind = C_INT)     , VALUE        :: direction_size
+    END SUBROUTINE cxios_set_reduce_domain_to_axis_direction
+
+    SUBROUTINE cxios_get_reduce_domain_to_axis_direction(reduce_domain_to_axis_hdl, direction, direction_size) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: reduce_domain_to_axis_hdl
+      CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: direction
+      INTEGER  (kind = C_INT)     , VALUE        :: direction_size
+    END SUBROUTINE cxios_get_reduce_domain_to_axis_direction
+
+    FUNCTION cxios_is_defined_reduce_domain_to_axis_direction(reduce_domain_to_axis_hdl) BIND(C)
+      USE ISO_C_BINDING
+      LOGICAL(kind=C_BOOL) :: cxios_is_defined_reduce_domain_to_axis_direction
+      INTEGER (kind = C_INTPTR_T), VALUE :: reduce_domain_to_axis_hdl
+    END FUNCTION cxios_is_defined_reduce_domain_to_axis_direction
+
+
+    SUBROUTINE cxios_set_reduce_domain_to_axis_local(reduce_domain_to_axis_hdl, local) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: reduce_domain_to_axis_hdl
+      LOGICAL (KIND=C_BOOL)      , VALUE :: local
+    END SUBROUTINE cxios_set_reduce_domain_to_axis_local
+
+    SUBROUTINE cxios_get_reduce_domain_to_axis_local(reduce_domain_to_axis_hdl, local) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: reduce_domain_to_axis_hdl
+      LOGICAL (KIND=C_BOOL)             :: local
+    END SUBROUTINE cxios_get_reduce_domain_to_axis_local
+
+    FUNCTION cxios_is_defined_reduce_domain_to_axis_local(reduce_domain_to_axis_hdl) BIND(C)
+      USE ISO_C_BINDING
+      LOGICAL(kind=C_BOOL) :: cxios_is_defined_reduce_domain_to_axis_local
+      INTEGER (kind = C_INTPTR_T), VALUE :: reduce_domain_to_axis_hdl
+    END FUNCTION cxios_is_defined_reduce_domain_to_axis_local
+
+
+    SUBROUTINE cxios_set_reduce_domain_to_axis_operation(reduce_domain_to_axis_hdl, operation, operation_size) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: reduce_domain_to_axis_hdl
+      CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: operation
+      INTEGER  (kind = C_INT)     , VALUE        :: operation_size
+    END SUBROUTINE cxios_set_reduce_domain_to_axis_operation
+
+    SUBROUTINE cxios_get_reduce_domain_to_axis_operation(reduce_domain_to_axis_hdl, operation, operation_size) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: reduce_domain_to_axis_hdl
+      CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: operation
+      INTEGER  (kind = C_INT)     , VALUE        :: operation_size
+    END SUBROUTINE cxios_get_reduce_domain_to_axis_operation
+
+    FUNCTION cxios_is_defined_reduce_domain_to_axis_operation(reduce_domain_to_axis_hdl) BIND(C)
+      USE ISO_C_BINDING
+      LOGICAL(kind=C_BOOL) :: cxios_is_defined_reduce_domain_to_axis_operation
+      INTEGER (kind = C_INTPTR_T), VALUE :: reduce_domain_to_axis_hdl
+    END FUNCTION cxios_is_defined_reduce_domain_to_axis_operation
+
+  END INTERFACE
+
+END MODULE reduce_domain_to_axis_interface_attr
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/fortran_attr/reduce_domain_to_scalar_interface_attr.F90
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/fortran_attr/reduce_domain_to_scalar_interface_attr.F90	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/fortran_attr/reduce_domain_to_scalar_interface_attr.F90	(revision 1749)
@@ -0,0 +1,53 @@
+! * ************************************************************************** *
+! *               Interface auto generated - do not modify                     *
+! * ************************************************************************** *
+#include "../fortran/xios_fortran_prefix.hpp"
+
+MODULE reduce_domain_to_scalar_interface_attr
+  USE, INTRINSIC :: ISO_C_BINDING
+
+  INTERFACE
+    ! Do not call directly / interface FORTRAN 2003 <-> C99
+
+    SUBROUTINE cxios_set_reduce_domain_to_scalar_local(reduce_domain_to_scalar_hdl, local) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: reduce_domain_to_scalar_hdl
+      LOGICAL (KIND=C_BOOL)      , VALUE :: local
+    END SUBROUTINE cxios_set_reduce_domain_to_scalar_local
+
+    SUBROUTINE cxios_get_reduce_domain_to_scalar_local(reduce_domain_to_scalar_hdl, local) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: reduce_domain_to_scalar_hdl
+      LOGICAL (KIND=C_BOOL)             :: local
+    END SUBROUTINE cxios_get_reduce_domain_to_scalar_local
+
+    FUNCTION cxios_is_defined_reduce_domain_to_scalar_local(reduce_domain_to_scalar_hdl) BIND(C)
+      USE ISO_C_BINDING
+      LOGICAL(kind=C_BOOL) :: cxios_is_defined_reduce_domain_to_scalar_local
+      INTEGER (kind = C_INTPTR_T), VALUE :: reduce_domain_to_scalar_hdl
+    END FUNCTION cxios_is_defined_reduce_domain_to_scalar_local
+
+
+    SUBROUTINE cxios_set_reduce_domain_to_scalar_operation(reduce_domain_to_scalar_hdl, operation, operation_size) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: reduce_domain_to_scalar_hdl
+      CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: operation
+      INTEGER  (kind = C_INT)     , VALUE        :: operation_size
+    END SUBROUTINE cxios_set_reduce_domain_to_scalar_operation
+
+    SUBROUTINE cxios_get_reduce_domain_to_scalar_operation(reduce_domain_to_scalar_hdl, operation, operation_size) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: reduce_domain_to_scalar_hdl
+      CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: operation
+      INTEGER  (kind = C_INT)     , VALUE        :: operation_size
+    END SUBROUTINE cxios_get_reduce_domain_to_scalar_operation
+
+    FUNCTION cxios_is_defined_reduce_domain_to_scalar_operation(reduce_domain_to_scalar_hdl) BIND(C)
+      USE ISO_C_BINDING
+      LOGICAL(kind=C_BOOL) :: cxios_is_defined_reduce_domain_to_scalar_operation
+      INTEGER (kind = C_INTPTR_T), VALUE :: reduce_domain_to_scalar_hdl
+    END FUNCTION cxios_is_defined_reduce_domain_to_scalar_operation
+
+  END INTERFACE
+
+END MODULE reduce_domain_to_scalar_interface_attr
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/fortran_attr/reduce_scalar_to_scalar_interface_attr.F90
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/fortran_attr/reduce_scalar_to_scalar_interface_attr.F90	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/fortran_attr/reduce_scalar_to_scalar_interface_attr.F90	(revision 1749)
@@ -0,0 +1,34 @@
+! * ************************************************************************** *
+! *               Interface auto generated - do not modify                     *
+! * ************************************************************************** *
+#include "../fortran/xios_fortran_prefix.hpp"
+
+MODULE reduce_scalar_to_scalar_interface_attr
+  USE, INTRINSIC :: ISO_C_BINDING
+
+  INTERFACE
+    ! Do not call directly / interface FORTRAN 2003 <-> C99
+
+    SUBROUTINE cxios_set_reduce_scalar_to_scalar_operation(reduce_scalar_to_scalar_hdl, operation, operation_size) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: reduce_scalar_to_scalar_hdl
+      CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: operation
+      INTEGER  (kind = C_INT)     , VALUE        :: operation_size
+    END SUBROUTINE cxios_set_reduce_scalar_to_scalar_operation
+
+    SUBROUTINE cxios_get_reduce_scalar_to_scalar_operation(reduce_scalar_to_scalar_hdl, operation, operation_size) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: reduce_scalar_to_scalar_hdl
+      CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: operation
+      INTEGER  (kind = C_INT)     , VALUE        :: operation_size
+    END SUBROUTINE cxios_get_reduce_scalar_to_scalar_operation
+
+    FUNCTION cxios_is_defined_reduce_scalar_to_scalar_operation(reduce_scalar_to_scalar_hdl) BIND(C)
+      USE ISO_C_BINDING
+      LOGICAL(kind=C_BOOL) :: cxios_is_defined_reduce_scalar_to_scalar_operation
+      INTEGER (kind = C_INTPTR_T), VALUE :: reduce_scalar_to_scalar_hdl
+    END FUNCTION cxios_is_defined_reduce_scalar_to_scalar_operation
+
+  END INTERFACE
+
+END MODULE reduce_scalar_to_scalar_interface_attr
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/fortran_attr/reorder_domain_interface_attr.F90
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/fortran_attr/reorder_domain_interface_attr.F90	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/fortran_attr/reorder_domain_interface_attr.F90	(revision 1749)
@@ -0,0 +1,89 @@
+! * ************************************************************************** *
+! *               Interface auto generated - do not modify                     *
+! * ************************************************************************** *
+#include "../fortran/xios_fortran_prefix.hpp"
+
+MODULE reorder_domain_interface_attr
+  USE, INTRINSIC :: ISO_C_BINDING
+
+  INTERFACE
+    ! Do not call directly / interface FORTRAN 2003 <-> C99
+
+    SUBROUTINE cxios_set_reorder_domain_invert_lat(reorder_domain_hdl, invert_lat) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: reorder_domain_hdl
+      LOGICAL (KIND=C_BOOL)      , VALUE :: invert_lat
+    END SUBROUTINE cxios_set_reorder_domain_invert_lat
+
+    SUBROUTINE cxios_get_reorder_domain_invert_lat(reorder_domain_hdl, invert_lat) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: reorder_domain_hdl
+      LOGICAL (KIND=C_BOOL)             :: invert_lat
+    END SUBROUTINE cxios_get_reorder_domain_invert_lat
+
+    FUNCTION cxios_is_defined_reorder_domain_invert_lat(reorder_domain_hdl) BIND(C)
+      USE ISO_C_BINDING
+      LOGICAL(kind=C_BOOL) :: cxios_is_defined_reorder_domain_invert_lat
+      INTEGER (kind = C_INTPTR_T), VALUE :: reorder_domain_hdl
+    END FUNCTION cxios_is_defined_reorder_domain_invert_lat
+
+
+    SUBROUTINE cxios_set_reorder_domain_max_lon(reorder_domain_hdl, max_lon) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: reorder_domain_hdl
+      REAL (KIND=C_DOUBLE)      , VALUE :: max_lon
+    END SUBROUTINE cxios_set_reorder_domain_max_lon
+
+    SUBROUTINE cxios_get_reorder_domain_max_lon(reorder_domain_hdl, max_lon) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: reorder_domain_hdl
+      REAL (KIND=C_DOUBLE)             :: max_lon
+    END SUBROUTINE cxios_get_reorder_domain_max_lon
+
+    FUNCTION cxios_is_defined_reorder_domain_max_lon(reorder_domain_hdl) BIND(C)
+      USE ISO_C_BINDING
+      LOGICAL(kind=C_BOOL) :: cxios_is_defined_reorder_domain_max_lon
+      INTEGER (kind = C_INTPTR_T), VALUE :: reorder_domain_hdl
+    END FUNCTION cxios_is_defined_reorder_domain_max_lon
+
+
+    SUBROUTINE cxios_set_reorder_domain_min_lon(reorder_domain_hdl, min_lon) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: reorder_domain_hdl
+      REAL (KIND=C_DOUBLE)      , VALUE :: min_lon
+    END SUBROUTINE cxios_set_reorder_domain_min_lon
+
+    SUBROUTINE cxios_get_reorder_domain_min_lon(reorder_domain_hdl, min_lon) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: reorder_domain_hdl
+      REAL (KIND=C_DOUBLE)             :: min_lon
+    END SUBROUTINE cxios_get_reorder_domain_min_lon
+
+    FUNCTION cxios_is_defined_reorder_domain_min_lon(reorder_domain_hdl) BIND(C)
+      USE ISO_C_BINDING
+      LOGICAL(kind=C_BOOL) :: cxios_is_defined_reorder_domain_min_lon
+      INTEGER (kind = C_INTPTR_T), VALUE :: reorder_domain_hdl
+    END FUNCTION cxios_is_defined_reorder_domain_min_lon
+
+
+    SUBROUTINE cxios_set_reorder_domain_shift_lon_fraction(reorder_domain_hdl, shift_lon_fraction) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: reorder_domain_hdl
+      REAL (KIND=C_DOUBLE)      , VALUE :: shift_lon_fraction
+    END SUBROUTINE cxios_set_reorder_domain_shift_lon_fraction
+
+    SUBROUTINE cxios_get_reorder_domain_shift_lon_fraction(reorder_domain_hdl, shift_lon_fraction) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: reorder_domain_hdl
+      REAL (KIND=C_DOUBLE)             :: shift_lon_fraction
+    END SUBROUTINE cxios_get_reorder_domain_shift_lon_fraction
+
+    FUNCTION cxios_is_defined_reorder_domain_shift_lon_fraction(reorder_domain_hdl) BIND(C)
+      USE ISO_C_BINDING
+      LOGICAL(kind=C_BOOL) :: cxios_is_defined_reorder_domain_shift_lon_fraction
+      INTEGER (kind = C_INTPTR_T), VALUE :: reorder_domain_hdl
+    END FUNCTION cxios_is_defined_reorder_domain_shift_lon_fraction
+
+  END INTERFACE
+
+END MODULE reorder_domain_interface_attr
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/fortran_attr/scalar_interface_attr.F90
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/fortran_attr/scalar_interface_attr.F90	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/fortran_attr/scalar_interface_attr.F90	(revision 1749)
@@ -0,0 +1,282 @@
+! * ************************************************************************** *
+! *               Interface auto generated - do not modify                     *
+! * ************************************************************************** *
+#include "../fortran/xios_fortran_prefix.hpp"
+
+MODULE scalar_interface_attr
+  USE, INTRINSIC :: ISO_C_BINDING
+
+  INTERFACE
+    ! Do not call directly / interface FORTRAN 2003 <-> C99
+
+    SUBROUTINE cxios_set_scalar_axis_type(scalar_hdl, axis_type, axis_type_size) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: scalar_hdl
+      CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: axis_type
+      INTEGER  (kind = C_INT)     , VALUE        :: axis_type_size
+    END SUBROUTINE cxios_set_scalar_axis_type
+
+    SUBROUTINE cxios_get_scalar_axis_type(scalar_hdl, axis_type, axis_type_size) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: scalar_hdl
+      CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: axis_type
+      INTEGER  (kind = C_INT)     , VALUE        :: axis_type_size
+    END SUBROUTINE cxios_get_scalar_axis_type
+
+    FUNCTION cxios_is_defined_scalar_axis_type(scalar_hdl) BIND(C)
+      USE ISO_C_BINDING
+      LOGICAL(kind=C_BOOL) :: cxios_is_defined_scalar_axis_type
+      INTEGER (kind = C_INTPTR_T), VALUE :: scalar_hdl
+    END FUNCTION cxios_is_defined_scalar_axis_type
+
+
+    SUBROUTINE cxios_set_scalar_bounds(scalar_hdl, bounds, extent) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE       :: scalar_hdl
+      REAL (KIND=C_DOUBLE)     , DIMENSION(*) :: bounds
+      INTEGER (kind = C_INT), DIMENSION(*)     :: extent
+    END SUBROUTINE cxios_set_scalar_bounds
+
+    SUBROUTINE cxios_get_scalar_bounds(scalar_hdl, bounds, extent) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE       :: scalar_hdl
+      REAL (KIND=C_DOUBLE)     , DIMENSION(*) :: bounds
+      INTEGER (kind = C_INT), DIMENSION(*)     :: extent
+    END SUBROUTINE cxios_get_scalar_bounds
+
+    FUNCTION cxios_is_defined_scalar_bounds(scalar_hdl) BIND(C)
+      USE ISO_C_BINDING
+      LOGICAL(kind=C_BOOL) :: cxios_is_defined_scalar_bounds
+      INTEGER (kind = C_INTPTR_T), VALUE :: scalar_hdl
+    END FUNCTION cxios_is_defined_scalar_bounds
+
+
+    SUBROUTINE cxios_set_scalar_bounds_name(scalar_hdl, bounds_name, bounds_name_size) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: scalar_hdl
+      CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: bounds_name
+      INTEGER  (kind = C_INT)     , VALUE        :: bounds_name_size
+    END SUBROUTINE cxios_set_scalar_bounds_name
+
+    SUBROUTINE cxios_get_scalar_bounds_name(scalar_hdl, bounds_name, bounds_name_size) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: scalar_hdl
+      CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: bounds_name
+      INTEGER  (kind = C_INT)     , VALUE        :: bounds_name_size
+    END SUBROUTINE cxios_get_scalar_bounds_name
+
+    FUNCTION cxios_is_defined_scalar_bounds_name(scalar_hdl) BIND(C)
+      USE ISO_C_BINDING
+      LOGICAL(kind=C_BOOL) :: cxios_is_defined_scalar_bounds_name
+      INTEGER (kind = C_INTPTR_T), VALUE :: scalar_hdl
+    END FUNCTION cxios_is_defined_scalar_bounds_name
+
+
+    SUBROUTINE cxios_set_scalar_comment(scalar_hdl, comment, comment_size) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: scalar_hdl
+      CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: comment
+      INTEGER  (kind = C_INT)     , VALUE        :: comment_size
+    END SUBROUTINE cxios_set_scalar_comment
+
+    SUBROUTINE cxios_get_scalar_comment(scalar_hdl, comment, comment_size) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: scalar_hdl
+      CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: comment
+      INTEGER  (kind = C_INT)     , VALUE        :: comment_size
+    END SUBROUTINE cxios_get_scalar_comment
+
+    FUNCTION cxios_is_defined_scalar_comment(scalar_hdl) BIND(C)
+      USE ISO_C_BINDING
+      LOGICAL(kind=C_BOOL) :: cxios_is_defined_scalar_comment
+      INTEGER (kind = C_INTPTR_T), VALUE :: scalar_hdl
+    END FUNCTION cxios_is_defined_scalar_comment
+
+
+    SUBROUTINE cxios_set_scalar_label(scalar_hdl, label, label_size) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: scalar_hdl
+      CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: label
+      INTEGER  (kind = C_INT)     , VALUE        :: label_size
+    END SUBROUTINE cxios_set_scalar_label
+
+    SUBROUTINE cxios_get_scalar_label(scalar_hdl, label, label_size) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: scalar_hdl
+      CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: label
+      INTEGER  (kind = C_INT)     , VALUE        :: label_size
+    END SUBROUTINE cxios_get_scalar_label
+
+    FUNCTION cxios_is_defined_scalar_label(scalar_hdl) BIND(C)
+      USE ISO_C_BINDING
+      LOGICAL(kind=C_BOOL) :: cxios_is_defined_scalar_label
+      INTEGER (kind = C_INTPTR_T), VALUE :: scalar_hdl
+    END FUNCTION cxios_is_defined_scalar_label
+
+
+    SUBROUTINE cxios_set_scalar_long_name(scalar_hdl, long_name, long_name_size) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: scalar_hdl
+      CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: long_name
+      INTEGER  (kind = C_INT)     , VALUE        :: long_name_size
+    END SUBROUTINE cxios_set_scalar_long_name
+
+    SUBROUTINE cxios_get_scalar_long_name(scalar_hdl, long_name, long_name_size) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: scalar_hdl
+      CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: long_name
+      INTEGER  (kind = C_INT)     , VALUE        :: long_name_size
+    END SUBROUTINE cxios_get_scalar_long_name
+
+    FUNCTION cxios_is_defined_scalar_long_name(scalar_hdl) BIND(C)
+      USE ISO_C_BINDING
+      LOGICAL(kind=C_BOOL) :: cxios_is_defined_scalar_long_name
+      INTEGER (kind = C_INTPTR_T), VALUE :: scalar_hdl
+    END FUNCTION cxios_is_defined_scalar_long_name
+
+
+    SUBROUTINE cxios_set_scalar_name(scalar_hdl, name, name_size) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: scalar_hdl
+      CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: name
+      INTEGER  (kind = C_INT)     , VALUE        :: name_size
+    END SUBROUTINE cxios_set_scalar_name
+
+    SUBROUTINE cxios_get_scalar_name(scalar_hdl, name, name_size) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: scalar_hdl
+      CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: name
+      INTEGER  (kind = C_INT)     , VALUE        :: name_size
+    END SUBROUTINE cxios_get_scalar_name
+
+    FUNCTION cxios_is_defined_scalar_name(scalar_hdl) BIND(C)
+      USE ISO_C_BINDING
+      LOGICAL(kind=C_BOOL) :: cxios_is_defined_scalar_name
+      INTEGER (kind = C_INTPTR_T), VALUE :: scalar_hdl
+    END FUNCTION cxios_is_defined_scalar_name
+
+
+    SUBROUTINE cxios_set_scalar_positive(scalar_hdl, positive, positive_size) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: scalar_hdl
+      CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: positive
+      INTEGER  (kind = C_INT)     , VALUE        :: positive_size
+    END SUBROUTINE cxios_set_scalar_positive
+
+    SUBROUTINE cxios_get_scalar_positive(scalar_hdl, positive, positive_size) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: scalar_hdl
+      CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: positive
+      INTEGER  (kind = C_INT)     , VALUE        :: positive_size
+    END SUBROUTINE cxios_get_scalar_positive
+
+    FUNCTION cxios_is_defined_scalar_positive(scalar_hdl) BIND(C)
+      USE ISO_C_BINDING
+      LOGICAL(kind=C_BOOL) :: cxios_is_defined_scalar_positive
+      INTEGER (kind = C_INTPTR_T), VALUE :: scalar_hdl
+    END FUNCTION cxios_is_defined_scalar_positive
+
+
+    SUBROUTINE cxios_set_scalar_prec(scalar_hdl, prec) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: scalar_hdl
+      INTEGER (KIND=C_INT)      , VALUE :: prec
+    END SUBROUTINE cxios_set_scalar_prec
+
+    SUBROUTINE cxios_get_scalar_prec(scalar_hdl, prec) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: scalar_hdl
+      INTEGER (KIND=C_INT)             :: prec
+    END SUBROUTINE cxios_get_scalar_prec
+
+    FUNCTION cxios_is_defined_scalar_prec(scalar_hdl) BIND(C)
+      USE ISO_C_BINDING
+      LOGICAL(kind=C_BOOL) :: cxios_is_defined_scalar_prec
+      INTEGER (kind = C_INTPTR_T), VALUE :: scalar_hdl
+    END FUNCTION cxios_is_defined_scalar_prec
+
+
+    SUBROUTINE cxios_set_scalar_scalar_ref(scalar_hdl, scalar_ref, scalar_ref_size) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: scalar_hdl
+      CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: scalar_ref
+      INTEGER  (kind = C_INT)     , VALUE        :: scalar_ref_size
+    END SUBROUTINE cxios_set_scalar_scalar_ref
+
+    SUBROUTINE cxios_get_scalar_scalar_ref(scalar_hdl, scalar_ref, scalar_ref_size) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: scalar_hdl
+      CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: scalar_ref
+      INTEGER  (kind = C_INT)     , VALUE        :: scalar_ref_size
+    END SUBROUTINE cxios_get_scalar_scalar_ref
+
+    FUNCTION cxios_is_defined_scalar_scalar_ref(scalar_hdl) BIND(C)
+      USE ISO_C_BINDING
+      LOGICAL(kind=C_BOOL) :: cxios_is_defined_scalar_scalar_ref
+      INTEGER (kind = C_INTPTR_T), VALUE :: scalar_hdl
+    END FUNCTION cxios_is_defined_scalar_scalar_ref
+
+
+    SUBROUTINE cxios_set_scalar_standard_name(scalar_hdl, standard_name, standard_name_size) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: scalar_hdl
+      CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: standard_name
+      INTEGER  (kind = C_INT)     , VALUE        :: standard_name_size
+    END SUBROUTINE cxios_set_scalar_standard_name
+
+    SUBROUTINE cxios_get_scalar_standard_name(scalar_hdl, standard_name, standard_name_size) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: scalar_hdl
+      CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: standard_name
+      INTEGER  (kind = C_INT)     , VALUE        :: standard_name_size
+    END SUBROUTINE cxios_get_scalar_standard_name
+
+    FUNCTION cxios_is_defined_scalar_standard_name(scalar_hdl) BIND(C)
+      USE ISO_C_BINDING
+      LOGICAL(kind=C_BOOL) :: cxios_is_defined_scalar_standard_name
+      INTEGER (kind = C_INTPTR_T), VALUE :: scalar_hdl
+    END FUNCTION cxios_is_defined_scalar_standard_name
+
+
+    SUBROUTINE cxios_set_scalar_unit(scalar_hdl, unit, unit_size) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: scalar_hdl
+      CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: unit
+      INTEGER  (kind = C_INT)     , VALUE        :: unit_size
+    END SUBROUTINE cxios_set_scalar_unit
+
+    SUBROUTINE cxios_get_scalar_unit(scalar_hdl, unit, unit_size) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: scalar_hdl
+      CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: unit
+      INTEGER  (kind = C_INT)     , VALUE        :: unit_size
+    END SUBROUTINE cxios_get_scalar_unit
+
+    FUNCTION cxios_is_defined_scalar_unit(scalar_hdl) BIND(C)
+      USE ISO_C_BINDING
+      LOGICAL(kind=C_BOOL) :: cxios_is_defined_scalar_unit
+      INTEGER (kind = C_INTPTR_T), VALUE :: scalar_hdl
+    END FUNCTION cxios_is_defined_scalar_unit
+
+
+    SUBROUTINE cxios_set_scalar_value(scalar_hdl, value) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: scalar_hdl
+      REAL (KIND=C_DOUBLE)      , VALUE :: value
+    END SUBROUTINE cxios_set_scalar_value
+
+    SUBROUTINE cxios_get_scalar_value(scalar_hdl, value) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: scalar_hdl
+      REAL (KIND=C_DOUBLE)             :: value
+    END SUBROUTINE cxios_get_scalar_value
+
+    FUNCTION cxios_is_defined_scalar_value(scalar_hdl) BIND(C)
+      USE ISO_C_BINDING
+      LOGICAL(kind=C_BOOL) :: cxios_is_defined_scalar_value
+      INTEGER (kind = C_INTPTR_T), VALUE :: scalar_hdl
+    END FUNCTION cxios_is_defined_scalar_value
+
+  END INTERFACE
+
+END MODULE scalar_interface_attr
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/fortran_attr/scalargroup_interface_attr.F90
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/fortran_attr/scalargroup_interface_attr.F90	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/fortran_attr/scalargroup_interface_attr.F90	(revision 1749)
@@ -0,0 +1,303 @@
+! * ************************************************************************** *
+! *               Interface auto generated - do not modify                     *
+! * ************************************************************************** *
+#include "../fortran/xios_fortran_prefix.hpp"
+
+MODULE scalargroup_interface_attr
+  USE, INTRINSIC :: ISO_C_BINDING
+
+  INTERFACE
+    ! Do not call directly / interface FORTRAN 2003 <-> C99
+
+    SUBROUTINE cxios_set_scalargroup_axis_type(scalargroup_hdl, axis_type, axis_type_size) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: scalargroup_hdl
+      CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: axis_type
+      INTEGER  (kind = C_INT)     , VALUE        :: axis_type_size
+    END SUBROUTINE cxios_set_scalargroup_axis_type
+
+    SUBROUTINE cxios_get_scalargroup_axis_type(scalargroup_hdl, axis_type, axis_type_size) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: scalargroup_hdl
+      CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: axis_type
+      INTEGER  (kind = C_INT)     , VALUE        :: axis_type_size
+    END SUBROUTINE cxios_get_scalargroup_axis_type
+
+    FUNCTION cxios_is_defined_scalargroup_axis_type(scalargroup_hdl) BIND(C)
+      USE ISO_C_BINDING
+      LOGICAL(kind=C_BOOL) :: cxios_is_defined_scalargroup_axis_type
+      INTEGER (kind = C_INTPTR_T), VALUE :: scalargroup_hdl
+    END FUNCTION cxios_is_defined_scalargroup_axis_type
+
+
+    SUBROUTINE cxios_set_scalargroup_bounds(scalargroup_hdl, bounds, extent) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE       :: scalargroup_hdl
+      REAL (KIND=C_DOUBLE)     , DIMENSION(*) :: bounds
+      INTEGER (kind = C_INT), DIMENSION(*)     :: extent
+    END SUBROUTINE cxios_set_scalargroup_bounds
+
+    SUBROUTINE cxios_get_scalargroup_bounds(scalargroup_hdl, bounds, extent) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE       :: scalargroup_hdl
+      REAL (KIND=C_DOUBLE)     , DIMENSION(*) :: bounds
+      INTEGER (kind = C_INT), DIMENSION(*)     :: extent
+    END SUBROUTINE cxios_get_scalargroup_bounds
+
+    FUNCTION cxios_is_defined_scalargroup_bounds(scalargroup_hdl) BIND(C)
+      USE ISO_C_BINDING
+      LOGICAL(kind=C_BOOL) :: cxios_is_defined_scalargroup_bounds
+      INTEGER (kind = C_INTPTR_T), VALUE :: scalargroup_hdl
+    END FUNCTION cxios_is_defined_scalargroup_bounds
+
+
+    SUBROUTINE cxios_set_scalargroup_bounds_name(scalargroup_hdl, bounds_name, bounds_name_size) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: scalargroup_hdl
+      CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: bounds_name
+      INTEGER  (kind = C_INT)     , VALUE        :: bounds_name_size
+    END SUBROUTINE cxios_set_scalargroup_bounds_name
+
+    SUBROUTINE cxios_get_scalargroup_bounds_name(scalargroup_hdl, bounds_name, bounds_name_size) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: scalargroup_hdl
+      CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: bounds_name
+      INTEGER  (kind = C_INT)     , VALUE        :: bounds_name_size
+    END SUBROUTINE cxios_get_scalargroup_bounds_name
+
+    FUNCTION cxios_is_defined_scalargroup_bounds_name(scalargroup_hdl) BIND(C)
+      USE ISO_C_BINDING
+      LOGICAL(kind=C_BOOL) :: cxios_is_defined_scalargroup_bounds_name
+      INTEGER (kind = C_INTPTR_T), VALUE :: scalargroup_hdl
+    END FUNCTION cxios_is_defined_scalargroup_bounds_name
+
+
+    SUBROUTINE cxios_set_scalargroup_comment(scalargroup_hdl, comment, comment_size) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: scalargroup_hdl
+      CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: comment
+      INTEGER  (kind = C_INT)     , VALUE        :: comment_size
+    END SUBROUTINE cxios_set_scalargroup_comment
+
+    SUBROUTINE cxios_get_scalargroup_comment(scalargroup_hdl, comment, comment_size) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: scalargroup_hdl
+      CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: comment
+      INTEGER  (kind = C_INT)     , VALUE        :: comment_size
+    END SUBROUTINE cxios_get_scalargroup_comment
+
+    FUNCTION cxios_is_defined_scalargroup_comment(scalargroup_hdl) BIND(C)
+      USE ISO_C_BINDING
+      LOGICAL(kind=C_BOOL) :: cxios_is_defined_scalargroup_comment
+      INTEGER (kind = C_INTPTR_T), VALUE :: scalargroup_hdl
+    END FUNCTION cxios_is_defined_scalargroup_comment
+
+
+    SUBROUTINE cxios_set_scalargroup_group_ref(scalargroup_hdl, group_ref, group_ref_size) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: scalargroup_hdl
+      CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: group_ref
+      INTEGER  (kind = C_INT)     , VALUE        :: group_ref_size
+    END SUBROUTINE cxios_set_scalargroup_group_ref
+
+    SUBROUTINE cxios_get_scalargroup_group_ref(scalargroup_hdl, group_ref, group_ref_size) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: scalargroup_hdl
+      CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: group_ref
+      INTEGER  (kind = C_INT)     , VALUE        :: group_ref_size
+    END SUBROUTINE cxios_get_scalargroup_group_ref
+
+    FUNCTION cxios_is_defined_scalargroup_group_ref(scalargroup_hdl) BIND(C)
+      USE ISO_C_BINDING
+      LOGICAL(kind=C_BOOL) :: cxios_is_defined_scalargroup_group_ref
+      INTEGER (kind = C_INTPTR_T), VALUE :: scalargroup_hdl
+    END FUNCTION cxios_is_defined_scalargroup_group_ref
+
+
+    SUBROUTINE cxios_set_scalargroup_label(scalargroup_hdl, label, label_size) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: scalargroup_hdl
+      CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: label
+      INTEGER  (kind = C_INT)     , VALUE        :: label_size
+    END SUBROUTINE cxios_set_scalargroup_label
+
+    SUBROUTINE cxios_get_scalargroup_label(scalargroup_hdl, label, label_size) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: scalargroup_hdl
+      CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: label
+      INTEGER  (kind = C_INT)     , VALUE        :: label_size
+    END SUBROUTINE cxios_get_scalargroup_label
+
+    FUNCTION cxios_is_defined_scalargroup_label(scalargroup_hdl) BIND(C)
+      USE ISO_C_BINDING
+      LOGICAL(kind=C_BOOL) :: cxios_is_defined_scalargroup_label
+      INTEGER (kind = C_INTPTR_T), VALUE :: scalargroup_hdl
+    END FUNCTION cxios_is_defined_scalargroup_label
+
+
+    SUBROUTINE cxios_set_scalargroup_long_name(scalargroup_hdl, long_name, long_name_size) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: scalargroup_hdl
+      CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: long_name
+      INTEGER  (kind = C_INT)     , VALUE        :: long_name_size
+    END SUBROUTINE cxios_set_scalargroup_long_name
+
+    SUBROUTINE cxios_get_scalargroup_long_name(scalargroup_hdl, long_name, long_name_size) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: scalargroup_hdl
+      CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: long_name
+      INTEGER  (kind = C_INT)     , VALUE        :: long_name_size
+    END SUBROUTINE cxios_get_scalargroup_long_name
+
+    FUNCTION cxios_is_defined_scalargroup_long_name(scalargroup_hdl) BIND(C)
+      USE ISO_C_BINDING
+      LOGICAL(kind=C_BOOL) :: cxios_is_defined_scalargroup_long_name
+      INTEGER (kind = C_INTPTR_T), VALUE :: scalargroup_hdl
+    END FUNCTION cxios_is_defined_scalargroup_long_name
+
+
+    SUBROUTINE cxios_set_scalargroup_name(scalargroup_hdl, name, name_size) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: scalargroup_hdl
+      CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: name
+      INTEGER  (kind = C_INT)     , VALUE        :: name_size
+    END SUBROUTINE cxios_set_scalargroup_name
+
+    SUBROUTINE cxios_get_scalargroup_name(scalargroup_hdl, name, name_size) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: scalargroup_hdl
+      CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: name
+      INTEGER  (kind = C_INT)     , VALUE        :: name_size
+    END SUBROUTINE cxios_get_scalargroup_name
+
+    FUNCTION cxios_is_defined_scalargroup_name(scalargroup_hdl) BIND(C)
+      USE ISO_C_BINDING
+      LOGICAL(kind=C_BOOL) :: cxios_is_defined_scalargroup_name
+      INTEGER (kind = C_INTPTR_T), VALUE :: scalargroup_hdl
+    END FUNCTION cxios_is_defined_scalargroup_name
+
+
+    SUBROUTINE cxios_set_scalargroup_positive(scalargroup_hdl, positive, positive_size) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: scalargroup_hdl
+      CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: positive
+      INTEGER  (kind = C_INT)     , VALUE        :: positive_size
+    END SUBROUTINE cxios_set_scalargroup_positive
+
+    SUBROUTINE cxios_get_scalargroup_positive(scalargroup_hdl, positive, positive_size) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: scalargroup_hdl
+      CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: positive
+      INTEGER  (kind = C_INT)     , VALUE        :: positive_size
+    END SUBROUTINE cxios_get_scalargroup_positive
+
+    FUNCTION cxios_is_defined_scalargroup_positive(scalargroup_hdl) BIND(C)
+      USE ISO_C_BINDING
+      LOGICAL(kind=C_BOOL) :: cxios_is_defined_scalargroup_positive
+      INTEGER (kind = C_INTPTR_T), VALUE :: scalargroup_hdl
+    END FUNCTION cxios_is_defined_scalargroup_positive
+
+
+    SUBROUTINE cxios_set_scalargroup_prec(scalargroup_hdl, prec) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: scalargroup_hdl
+      INTEGER (KIND=C_INT)      , VALUE :: prec
+    END SUBROUTINE cxios_set_scalargroup_prec
+
+    SUBROUTINE cxios_get_scalargroup_prec(scalargroup_hdl, prec) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: scalargroup_hdl
+      INTEGER (KIND=C_INT)             :: prec
+    END SUBROUTINE cxios_get_scalargroup_prec
+
+    FUNCTION cxios_is_defined_scalargroup_prec(scalargroup_hdl) BIND(C)
+      USE ISO_C_BINDING
+      LOGICAL(kind=C_BOOL) :: cxios_is_defined_scalargroup_prec
+      INTEGER (kind = C_INTPTR_T), VALUE :: scalargroup_hdl
+    END FUNCTION cxios_is_defined_scalargroup_prec
+
+
+    SUBROUTINE cxios_set_scalargroup_scalar_ref(scalargroup_hdl, scalar_ref, scalar_ref_size) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: scalargroup_hdl
+      CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: scalar_ref
+      INTEGER  (kind = C_INT)     , VALUE        :: scalar_ref_size
+    END SUBROUTINE cxios_set_scalargroup_scalar_ref
+
+    SUBROUTINE cxios_get_scalargroup_scalar_ref(scalargroup_hdl, scalar_ref, scalar_ref_size) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: scalargroup_hdl
+      CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: scalar_ref
+      INTEGER  (kind = C_INT)     , VALUE        :: scalar_ref_size
+    END SUBROUTINE cxios_get_scalargroup_scalar_ref
+
+    FUNCTION cxios_is_defined_scalargroup_scalar_ref(scalargroup_hdl) BIND(C)
+      USE ISO_C_BINDING
+      LOGICAL(kind=C_BOOL) :: cxios_is_defined_scalargroup_scalar_ref
+      INTEGER (kind = C_INTPTR_T), VALUE :: scalargroup_hdl
+    END FUNCTION cxios_is_defined_scalargroup_scalar_ref
+
+
+    SUBROUTINE cxios_set_scalargroup_standard_name(scalargroup_hdl, standard_name, standard_name_size) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: scalargroup_hdl
+      CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: standard_name
+      INTEGER  (kind = C_INT)     , VALUE        :: standard_name_size
+    END SUBROUTINE cxios_set_scalargroup_standard_name
+
+    SUBROUTINE cxios_get_scalargroup_standard_name(scalargroup_hdl, standard_name, standard_name_size) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: scalargroup_hdl
+      CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: standard_name
+      INTEGER  (kind = C_INT)     , VALUE        :: standard_name_size
+    END SUBROUTINE cxios_get_scalargroup_standard_name
+
+    FUNCTION cxios_is_defined_scalargroup_standard_name(scalargroup_hdl) BIND(C)
+      USE ISO_C_BINDING
+      LOGICAL(kind=C_BOOL) :: cxios_is_defined_scalargroup_standard_name
+      INTEGER (kind = C_INTPTR_T), VALUE :: scalargroup_hdl
+    END FUNCTION cxios_is_defined_scalargroup_standard_name
+
+
+    SUBROUTINE cxios_set_scalargroup_unit(scalargroup_hdl, unit, unit_size) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: scalargroup_hdl
+      CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: unit
+      INTEGER  (kind = C_INT)     , VALUE        :: unit_size
+    END SUBROUTINE cxios_set_scalargroup_unit
+
+    SUBROUTINE cxios_get_scalargroup_unit(scalargroup_hdl, unit, unit_size) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: scalargroup_hdl
+      CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: unit
+      INTEGER  (kind = C_INT)     , VALUE        :: unit_size
+    END SUBROUTINE cxios_get_scalargroup_unit
+
+    FUNCTION cxios_is_defined_scalargroup_unit(scalargroup_hdl) BIND(C)
+      USE ISO_C_BINDING
+      LOGICAL(kind=C_BOOL) :: cxios_is_defined_scalargroup_unit
+      INTEGER (kind = C_INTPTR_T), VALUE :: scalargroup_hdl
+    END FUNCTION cxios_is_defined_scalargroup_unit
+
+
+    SUBROUTINE cxios_set_scalargroup_value(scalargroup_hdl, value) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: scalargroup_hdl
+      REAL (KIND=C_DOUBLE)      , VALUE :: value
+    END SUBROUTINE cxios_set_scalargroup_value
+
+    SUBROUTINE cxios_get_scalargroup_value(scalargroup_hdl, value) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: scalargroup_hdl
+      REAL (KIND=C_DOUBLE)             :: value
+    END SUBROUTINE cxios_get_scalargroup_value
+
+    FUNCTION cxios_is_defined_scalargroup_value(scalargroup_hdl) BIND(C)
+      USE ISO_C_BINDING
+      LOGICAL(kind=C_BOOL) :: cxios_is_defined_scalargroup_value
+      INTEGER (kind = C_INTPTR_T), VALUE :: scalargroup_hdl
+    END FUNCTION cxios_is_defined_scalargroup_value
+
+  END INTERFACE
+
+END MODULE scalargroup_interface_attr
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/fortran_attr/temporal_splitting_interface_attr.F90
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/fortran_attr/temporal_splitting_interface_attr.F90	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/fortran_attr/temporal_splitting_interface_attr.F90	(revision 1749)
@@ -0,0 +1,13 @@
+! * ************************************************************************** *
+! *               Interface auto generated - do not modify                     *
+! * ************************************************************************** *
+#include "../fortran/xios_fortran_prefix.hpp"
+
+MODULE temporal_splitting_interface_attr
+  USE, INTRINSIC :: ISO_C_BINDING
+
+  INTERFACE
+    ! Do not call directly / interface FORTRAN 2003 <-> C99
+  END INTERFACE
+
+END MODULE temporal_splitting_interface_attr
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/fortran_attr/variable_interface_attr.F90
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/fortran_attr/variable_interface_attr.F90	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/fortran_attr/variable_interface_attr.F90	(revision 1749)
@@ -0,0 +1,76 @@
+! * ************************************************************************** *
+! *               Interface auto generated - do not modify                     *
+! * ************************************************************************** *
+#include "../fortran/xios_fortran_prefix.hpp"
+
+MODULE variable_interface_attr
+  USE, INTRINSIC :: ISO_C_BINDING
+
+  INTERFACE
+    ! Do not call directly / interface FORTRAN 2003 <-> C99
+
+    SUBROUTINE cxios_set_variable_name(variable_hdl, name, name_size) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: variable_hdl
+      CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: name
+      INTEGER  (kind = C_INT)     , VALUE        :: name_size
+    END SUBROUTINE cxios_set_variable_name
+
+    SUBROUTINE cxios_get_variable_name(variable_hdl, name, name_size) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: variable_hdl
+      CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: name
+      INTEGER  (kind = C_INT)     , VALUE        :: name_size
+    END SUBROUTINE cxios_get_variable_name
+
+    FUNCTION cxios_is_defined_variable_name(variable_hdl) BIND(C)
+      USE ISO_C_BINDING
+      LOGICAL(kind=C_BOOL) :: cxios_is_defined_variable_name
+      INTEGER (kind = C_INTPTR_T), VALUE :: variable_hdl
+    END FUNCTION cxios_is_defined_variable_name
+
+
+    SUBROUTINE cxios_set_variable_ts_target(variable_hdl, ts_target, ts_target_size) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: variable_hdl
+      CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: ts_target
+      INTEGER  (kind = C_INT)     , VALUE        :: ts_target_size
+    END SUBROUTINE cxios_set_variable_ts_target
+
+    SUBROUTINE cxios_get_variable_ts_target(variable_hdl, ts_target, ts_target_size) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: variable_hdl
+      CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: ts_target
+      INTEGER  (kind = C_INT)     , VALUE        :: ts_target_size
+    END SUBROUTINE cxios_get_variable_ts_target
+
+    FUNCTION cxios_is_defined_variable_ts_target(variable_hdl) BIND(C)
+      USE ISO_C_BINDING
+      LOGICAL(kind=C_BOOL) :: cxios_is_defined_variable_ts_target
+      INTEGER (kind = C_INTPTR_T), VALUE :: variable_hdl
+    END FUNCTION cxios_is_defined_variable_ts_target
+
+
+    SUBROUTINE cxios_set_variable_type(variable_hdl, type, type_size) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: variable_hdl
+      CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: type
+      INTEGER  (kind = C_INT)     , VALUE        :: type_size
+    END SUBROUTINE cxios_set_variable_type
+
+    SUBROUTINE cxios_get_variable_type(variable_hdl, type, type_size) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: variable_hdl
+      CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: type
+      INTEGER  (kind = C_INT)     , VALUE        :: type_size
+    END SUBROUTINE cxios_get_variable_type
+
+    FUNCTION cxios_is_defined_variable_type(variable_hdl) BIND(C)
+      USE ISO_C_BINDING
+      LOGICAL(kind=C_BOOL) :: cxios_is_defined_variable_type
+      INTEGER (kind = C_INTPTR_T), VALUE :: variable_hdl
+    END FUNCTION cxios_is_defined_variable_type
+
+  END INTERFACE
+
+END MODULE variable_interface_attr
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/fortran_attr/variablegroup_interface_attr.F90
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/fortran_attr/variablegroup_interface_attr.F90	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/fortran_attr/variablegroup_interface_attr.F90	(revision 1749)
@@ -0,0 +1,97 @@
+! * ************************************************************************** *
+! *               Interface auto generated - do not modify                     *
+! * ************************************************************************** *
+#include "../fortran/xios_fortran_prefix.hpp"
+
+MODULE variablegroup_interface_attr
+  USE, INTRINSIC :: ISO_C_BINDING
+
+  INTERFACE
+    ! Do not call directly / interface FORTRAN 2003 <-> C99
+
+    SUBROUTINE cxios_set_variablegroup_group_ref(variablegroup_hdl, group_ref, group_ref_size) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: variablegroup_hdl
+      CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: group_ref
+      INTEGER  (kind = C_INT)     , VALUE        :: group_ref_size
+    END SUBROUTINE cxios_set_variablegroup_group_ref
+
+    SUBROUTINE cxios_get_variablegroup_group_ref(variablegroup_hdl, group_ref, group_ref_size) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: variablegroup_hdl
+      CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: group_ref
+      INTEGER  (kind = C_INT)     , VALUE        :: group_ref_size
+    END SUBROUTINE cxios_get_variablegroup_group_ref
+
+    FUNCTION cxios_is_defined_variablegroup_group_ref(variablegroup_hdl) BIND(C)
+      USE ISO_C_BINDING
+      LOGICAL(kind=C_BOOL) :: cxios_is_defined_variablegroup_group_ref
+      INTEGER (kind = C_INTPTR_T), VALUE :: variablegroup_hdl
+    END FUNCTION cxios_is_defined_variablegroup_group_ref
+
+
+    SUBROUTINE cxios_set_variablegroup_name(variablegroup_hdl, name, name_size) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: variablegroup_hdl
+      CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: name
+      INTEGER  (kind = C_INT)     , VALUE        :: name_size
+    END SUBROUTINE cxios_set_variablegroup_name
+
+    SUBROUTINE cxios_get_variablegroup_name(variablegroup_hdl, name, name_size) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: variablegroup_hdl
+      CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: name
+      INTEGER  (kind = C_INT)     , VALUE        :: name_size
+    END SUBROUTINE cxios_get_variablegroup_name
+
+    FUNCTION cxios_is_defined_variablegroup_name(variablegroup_hdl) BIND(C)
+      USE ISO_C_BINDING
+      LOGICAL(kind=C_BOOL) :: cxios_is_defined_variablegroup_name
+      INTEGER (kind = C_INTPTR_T), VALUE :: variablegroup_hdl
+    END FUNCTION cxios_is_defined_variablegroup_name
+
+
+    SUBROUTINE cxios_set_variablegroup_ts_target(variablegroup_hdl, ts_target, ts_target_size) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: variablegroup_hdl
+      CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: ts_target
+      INTEGER  (kind = C_INT)     , VALUE        :: ts_target_size
+    END SUBROUTINE cxios_set_variablegroup_ts_target
+
+    SUBROUTINE cxios_get_variablegroup_ts_target(variablegroup_hdl, ts_target, ts_target_size) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: variablegroup_hdl
+      CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: ts_target
+      INTEGER  (kind = C_INT)     , VALUE        :: ts_target_size
+    END SUBROUTINE cxios_get_variablegroup_ts_target
+
+    FUNCTION cxios_is_defined_variablegroup_ts_target(variablegroup_hdl) BIND(C)
+      USE ISO_C_BINDING
+      LOGICAL(kind=C_BOOL) :: cxios_is_defined_variablegroup_ts_target
+      INTEGER (kind = C_INTPTR_T), VALUE :: variablegroup_hdl
+    END FUNCTION cxios_is_defined_variablegroup_ts_target
+
+
+    SUBROUTINE cxios_set_variablegroup_type(variablegroup_hdl, type, type_size) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: variablegroup_hdl
+      CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: type
+      INTEGER  (kind = C_INT)     , VALUE        :: type_size
+    END SUBROUTINE cxios_set_variablegroup_type
+
+    SUBROUTINE cxios_get_variablegroup_type(variablegroup_hdl, type, type_size) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: variablegroup_hdl
+      CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: type
+      INTEGER  (kind = C_INT)     , VALUE        :: type_size
+    END SUBROUTINE cxios_get_variablegroup_type
+
+    FUNCTION cxios_is_defined_variablegroup_type(variablegroup_hdl) BIND(C)
+      USE ISO_C_BINDING
+      LOGICAL(kind=C_BOOL) :: cxios_is_defined_variablegroup_type
+      INTEGER (kind = C_INTPTR_T), VALUE :: variablegroup_hdl
+    END FUNCTION cxios_is_defined_variablegroup_type
+
+  END INTERFACE
+
+END MODULE variablegroup_interface_attr
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/fortran_attr/zoom_axis_interface_attr.F90
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/fortran_attr/zoom_axis_interface_attr.F90	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/fortran_attr/zoom_axis_interface_attr.F90	(revision 1749)
@@ -0,0 +1,72 @@
+! * ************************************************************************** *
+! *               Interface auto generated - do not modify                     *
+! * ************************************************************************** *
+#include "../fortran/xios_fortran_prefix.hpp"
+
+MODULE zoom_axis_interface_attr
+  USE, INTRINSIC :: ISO_C_BINDING
+
+  INTERFACE
+    ! Do not call directly / interface FORTRAN 2003 <-> C99
+
+    SUBROUTINE cxios_set_zoom_axis_begin(zoom_axis_hdl, begin) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: zoom_axis_hdl
+      INTEGER (KIND=C_INT)      , VALUE :: begin
+    END SUBROUTINE cxios_set_zoom_axis_begin
+
+    SUBROUTINE cxios_get_zoom_axis_begin(zoom_axis_hdl, begin) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: zoom_axis_hdl
+      INTEGER (KIND=C_INT)             :: begin
+    END SUBROUTINE cxios_get_zoom_axis_begin
+
+    FUNCTION cxios_is_defined_zoom_axis_begin(zoom_axis_hdl) BIND(C)
+      USE ISO_C_BINDING
+      LOGICAL(kind=C_BOOL) :: cxios_is_defined_zoom_axis_begin
+      INTEGER (kind = C_INTPTR_T), VALUE :: zoom_axis_hdl
+    END FUNCTION cxios_is_defined_zoom_axis_begin
+
+
+    SUBROUTINE cxios_set_zoom_axis_index(zoom_axis_hdl, index, extent) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE       :: zoom_axis_hdl
+      INTEGER (KIND=C_INT)     , DIMENSION(*) :: index
+      INTEGER (kind = C_INT), DIMENSION(*)     :: extent
+    END SUBROUTINE cxios_set_zoom_axis_index
+
+    SUBROUTINE cxios_get_zoom_axis_index(zoom_axis_hdl, index, extent) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE       :: zoom_axis_hdl
+      INTEGER (KIND=C_INT)     , DIMENSION(*) :: index
+      INTEGER (kind = C_INT), DIMENSION(*)     :: extent
+    END SUBROUTINE cxios_get_zoom_axis_index
+
+    FUNCTION cxios_is_defined_zoom_axis_index(zoom_axis_hdl) BIND(C)
+      USE ISO_C_BINDING
+      LOGICAL(kind=C_BOOL) :: cxios_is_defined_zoom_axis_index
+      INTEGER (kind = C_INTPTR_T), VALUE :: zoom_axis_hdl
+    END FUNCTION cxios_is_defined_zoom_axis_index
+
+
+    SUBROUTINE cxios_set_zoom_axis_n(zoom_axis_hdl, n) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: zoom_axis_hdl
+      INTEGER (KIND=C_INT)      , VALUE :: n
+    END SUBROUTINE cxios_set_zoom_axis_n
+
+    SUBROUTINE cxios_get_zoom_axis_n(zoom_axis_hdl, n) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: zoom_axis_hdl
+      INTEGER (KIND=C_INT)             :: n
+    END SUBROUTINE cxios_get_zoom_axis_n
+
+    FUNCTION cxios_is_defined_zoom_axis_n(zoom_axis_hdl) BIND(C)
+      USE ISO_C_BINDING
+      LOGICAL(kind=C_BOOL) :: cxios_is_defined_zoom_axis_n
+      INTEGER (kind = C_INTPTR_T), VALUE :: zoom_axis_hdl
+    END FUNCTION cxios_is_defined_zoom_axis_n
+
+  END INTERFACE
+
+END MODULE zoom_axis_interface_attr
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/fortran_attr/zoom_domain_interface_attr.F90
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/fortran_attr/zoom_domain_interface_attr.F90	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/interface/fortran_attr/zoom_domain_interface_attr.F90	(revision 1749)
@@ -0,0 +1,89 @@
+! * ************************************************************************** *
+! *               Interface auto generated - do not modify                     *
+! * ************************************************************************** *
+#include "../fortran/xios_fortran_prefix.hpp"
+
+MODULE zoom_domain_interface_attr
+  USE, INTRINSIC :: ISO_C_BINDING
+
+  INTERFACE
+    ! Do not call directly / interface FORTRAN 2003 <-> C99
+
+    SUBROUTINE cxios_set_zoom_domain_ibegin(zoom_domain_hdl, ibegin) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: zoom_domain_hdl
+      INTEGER (KIND=C_INT)      , VALUE :: ibegin
+    END SUBROUTINE cxios_set_zoom_domain_ibegin
+
+    SUBROUTINE cxios_get_zoom_domain_ibegin(zoom_domain_hdl, ibegin) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: zoom_domain_hdl
+      INTEGER (KIND=C_INT)             :: ibegin
+    END SUBROUTINE cxios_get_zoom_domain_ibegin
+
+    FUNCTION cxios_is_defined_zoom_domain_ibegin(zoom_domain_hdl) BIND(C)
+      USE ISO_C_BINDING
+      LOGICAL(kind=C_BOOL) :: cxios_is_defined_zoom_domain_ibegin
+      INTEGER (kind = C_INTPTR_T), VALUE :: zoom_domain_hdl
+    END FUNCTION cxios_is_defined_zoom_domain_ibegin
+
+
+    SUBROUTINE cxios_set_zoom_domain_jbegin(zoom_domain_hdl, jbegin) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: zoom_domain_hdl
+      INTEGER (KIND=C_INT)      , VALUE :: jbegin
+    END SUBROUTINE cxios_set_zoom_domain_jbegin
+
+    SUBROUTINE cxios_get_zoom_domain_jbegin(zoom_domain_hdl, jbegin) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: zoom_domain_hdl
+      INTEGER (KIND=C_INT)             :: jbegin
+    END SUBROUTINE cxios_get_zoom_domain_jbegin
+
+    FUNCTION cxios_is_defined_zoom_domain_jbegin(zoom_domain_hdl) BIND(C)
+      USE ISO_C_BINDING
+      LOGICAL(kind=C_BOOL) :: cxios_is_defined_zoom_domain_jbegin
+      INTEGER (kind = C_INTPTR_T), VALUE :: zoom_domain_hdl
+    END FUNCTION cxios_is_defined_zoom_domain_jbegin
+
+
+    SUBROUTINE cxios_set_zoom_domain_ni(zoom_domain_hdl, ni) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: zoom_domain_hdl
+      INTEGER (KIND=C_INT)      , VALUE :: ni
+    END SUBROUTINE cxios_set_zoom_domain_ni
+
+    SUBROUTINE cxios_get_zoom_domain_ni(zoom_domain_hdl, ni) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: zoom_domain_hdl
+      INTEGER (KIND=C_INT)             :: ni
+    END SUBROUTINE cxios_get_zoom_domain_ni
+
+    FUNCTION cxios_is_defined_zoom_domain_ni(zoom_domain_hdl) BIND(C)
+      USE ISO_C_BINDING
+      LOGICAL(kind=C_BOOL) :: cxios_is_defined_zoom_domain_ni
+      INTEGER (kind = C_INTPTR_T), VALUE :: zoom_domain_hdl
+    END FUNCTION cxios_is_defined_zoom_domain_ni
+
+
+    SUBROUTINE cxios_set_zoom_domain_nj(zoom_domain_hdl, nj) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: zoom_domain_hdl
+      INTEGER (KIND=C_INT)      , VALUE :: nj
+    END SUBROUTINE cxios_set_zoom_domain_nj
+
+    SUBROUTINE cxios_get_zoom_domain_nj(zoom_domain_hdl, nj) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: zoom_domain_hdl
+      INTEGER (KIND=C_INT)             :: nj
+    END SUBROUTINE cxios_get_zoom_domain_nj
+
+    FUNCTION cxios_is_defined_zoom_domain_nj(zoom_domain_hdl) BIND(C)
+      USE ISO_C_BINDING
+      LOGICAL(kind=C_BOOL) :: cxios_is_defined_zoom_domain_nj
+      INTEGER (kind = C_INTPTR_T), VALUE :: zoom_domain_hdl
+    END FUNCTION cxios_is_defined_zoom_domain_nj
+
+  END INTERFACE
+
+END MODULE zoom_domain_interface_attr
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/io/inetcdf4.cpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/io/inetcdf4.cpp	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/io/inetcdf4.cpp	(revision 1749)
@@ -0,0 +1,819 @@
+#include "inetcdf4.hpp"
+#include "netCdfInterface.hpp"
+#include "netCdf_cf_constant.hpp"
+
+#include <boost/algorithm/string.hpp>
+
+namespace xios
+{
+  CINetCDF4::CINetCDF4(const StdString& filename, const MPI_Comm* comm /*= NULL*/, bool multifile /*= true*/,
+                       bool readMetaDataPar /*= false*/, const StdString& timeCounterName /*= "time_counter"*/)
+  {
+    // Don't use parallel mode if there is only one process
+    if (comm)
+    {
+      int commSize = 0;
+      MPI_Comm_size(*comm, &commSize);
+      if (commSize <= 1)
+        comm = NULL;
+    }
+    mpi = comm && !multifile && readMetaDataPar;
+
+    // The file format will be detected automatically by NetCDF, it is safe to always set NC_MPIIO
+    // even if Parallel NetCDF ends up being used.
+    if (mpi)
+      CNetCdfInterface::openPar(filename, NC_NOWRITE | NC_MPIIO, *comm, MPI_INFO_NULL, this->ncidp);
+    else
+      CNetCdfInterface::open(filename, NC_NOWRITE, this->ncidp);
+
+    this->timeCounterName = timeCounterName;
+    if (!CNetCdfInterface::isDimExisted(this->ncidp, this->timeCounterName)) this->timeCounterName=this->getUnlimitedDimensionName() ;
+
+  }
+
+  CINetCDF4::~CINetCDF4(void)
+  { /* Nothing to do */ }
+
+  //---------------------------------------------------------------
+
+  void CINetCDF4::close(void)
+  {
+    CNetCdfInterface::close(this->ncidp);
+  }
+
+  //---------------------------------------------------------------
+
+  int CINetCDF4::getGroup(const CVarPath* const path)
+  {
+    int retvalue = this->ncidp;
+    if (path == NULL) return retvalue;
+    CVarPath::const_iterator it = path->begin(), end = path->end();
+
+    for (; it != end; it++)
+    {
+      const StdString& groupid = *it;
+      CNetCdfInterface::inqNcId(retvalue, groupid, retvalue);
+    }
+
+    return retvalue;
+  }
+
+  int CINetCDF4::getVariable(const StdString& varname,
+                             const CVarPath* const path)
+  {
+    int varid = 0;
+    int grpid = this->getGroup(path);
+    if (this->hasVariable(varname, path))
+      CNetCdfInterface::inqVarId(grpid, varname, varid);
+    return varid;
+  }
+
+  int CINetCDF4::getDimension(const StdString& dimname,
+                              const CVarPath* const path)
+  {
+    int dimid = 0;
+    int grpid = this->getGroup(path);
+    CNetCdfInterface::inqDimId(grpid, dimname, dimid);
+    return dimid;
+  }
+
+  std::pair<nc_type, StdSize> CINetCDF4::getAttribute(const StdString& attname,
+                                                      const StdString* const var,
+                                                      const CVarPath* const path)
+  {
+    std::pair<nc_type, StdSize> retvalue;
+    int grpid = this->getGroup(path);
+    int varid = (var != NULL && this->hasVariable(*var, path)) ? this->getVariable(*var, path) : NC_GLOBAL;
+    CNetCdfInterface::inqAtt(grpid, varid, attname, retvalue.first, retvalue.second);
+    return retvalue;
+  }
+
+  int CINetCDF4::getUnlimitedDimension(const CVarPath* const path)
+  {
+    int dimid = 0;
+    int grpid = this->getGroup(path);
+    CNetCdfInterface::inqUnLimDim(grpid, dimid);
+    return dimid;
+  }
+
+  StdString CINetCDF4::getUnlimitedDimensionName(const CVarPath* const path)
+  {
+    int grpid = this->getGroup(path);
+    int dimid = this->getUnlimitedDimension(path);
+
+    StdString dimname;
+    if (dimid != -1)
+      CNetCdfInterface::inqDimName(grpid, dimid, dimname);
+    return dimname;
+  }
+
+  //---------------------------------------------------------------
+
+  StdSize CINetCDF4::getNbVertex(const StdString& name,
+                                 const CVarPath* const path)
+  {
+
+    if (this->isRectilinear(name, path) ||
+       this->isCurvilinear(name, path))
+    {
+      if (this->is3Dim(name, path)) return 8;
+      else return 4;
+    }
+    if (this->isUnstructured(name, path))
+    {
+      StdString bound = this->getBoundsId
+            (this->getCoordinatesIdList(name, path).back(), path);
+      StdString dim = this->getDimensionsList(&bound, path).back();
+      return this->getDimensions(&bound, path)[dim];
+    }
+    return size_t(-1);
+  }
+
+  //---------------------------------------------------------------
+
+  std::list<StdString> CINetCDF4::getGroups(const CVarPath* const path)
+  {
+    int nbgroup = 0, *groupid = NULL;
+    int grpid = this->getGroup(path);
+    std::list<StdString> retvalue;
+
+    CNetCdfInterface::inqGrpIds(grpid, nbgroup, NULL);
+    groupid = new int[nbgroup]();
+    CNetCdfInterface::inqGrpIds(grpid, nbgroup, groupid);
+
+    for (int i = 0; i < nbgroup; i++)
+    {
+      StdString fullGrpName;
+      CNetCdfInterface::inqGrpFullName(groupid[i], fullGrpName);
+      retvalue.push_back(fullGrpName);
+    }
+
+    delete [] groupid;
+    return retvalue;
+  }
+
+  std::list<StdString> CINetCDF4::getVariables(const CVarPath* const path)
+  {
+    int nbvar = 0, *varid = NULL;
+    int grpid = this->getGroup(path);
+    std::list<StdString> retvalue;
+
+    CNetCdfInterface::inqVarIds(grpid, nbvar, NULL);
+    varid = new int[nbvar]();
+    CNetCdfInterface::inqVarIds(grpid, nbvar, varid);
+
+    for (int i = 0; i < nbvar; i++)
+    {
+      StdString varName;
+      CNetCdfInterface::inqVarName(grpid, varid[i], varName);
+      retvalue.push_back(varName);
+    }
+
+    delete [] varid;
+    return retvalue;
+  }
+
+  StdSize CINetCDF4::getNbOfTimestep(const CVarPath* const path)
+  {
+    return this->getDimensions(NULL, path)[this->getUnlimitedDimensionName(path)];
+  }
+
+  std::set<StdString> CINetCDF4::getBoundVariables(const CVarPath* const path)
+  {
+    std::set<StdString> retvalue;
+    std::list<StdString> variables = this->getVariables(path);
+    std::list<StdString>::const_iterator it = variables.begin(), end = variables.end();
+    for (; it != end; it++)
+    {
+      const StdString& var = *it;
+      if (this->hasBounds(var, path))
+        retvalue.insert(retvalue.end(), this->getBoundsId(var, path));
+    }
+    return retvalue;
+  }
+
+  std::set<StdString> CINetCDF4::getCoordVariables(const CVarPath* const path)
+  {
+    std::set<StdString> retvalue;
+    std::list<StdString> variables = this->getVariables(path);
+    std::list<StdString>::const_iterator it = variables.begin(), end = variables.end();
+    for (; it != end; it++)
+    {
+      const StdString& var = *it;
+      std::list<StdString> coords = this->getCoordinatesIdList(var, path);
+      std::list<StdString>::const_iterator it = coords.begin(), end = coords.end();
+      for (; it != end; it++)
+      {
+        const StdString& coord = *it;
+        if (this->hasVariable(coord, path))
+          retvalue.insert(retvalue.end(), coord);
+      }
+    }
+    return retvalue;
+  }
+
+  std::list<StdString> CINetCDF4::getDimensionsList(const StdString* const var, const CVarPath* const path)
+  {
+    int nbdim = 0, *dimid = NULL;
+    int grpid = this->getGroup(path);
+    int varid = (var != NULL && this->hasVariable(*var, path)) ? this->getVariable(*var, path) : NC_GLOBAL;
+    std::list<StdString> retvalue;
+
+    if (var != NULL && this->hasVariable(*var, path))
+    {
+      CNetCdfInterface::inqVarNDims(grpid, varid, nbdim);
+      dimid = new int[nbdim]();
+      CNetCdfInterface::inqVarDimId(grpid, varid, dimid);
+    }
+    else
+    {
+      CNetCdfInterface::inqDimIds(grpid, nbdim, NULL, 1);
+      dimid = new int[nbdim]();
+      CNetCdfInterface::inqDimIds(grpid, nbdim, dimid, 1);
+    }
+
+    for (int i = 0; i < nbdim; i++)
+    {
+      std::string dimname;
+      CNetCdfInterface::inqDimName(grpid, dimid[i], dimname);
+      retvalue.push_back(dimname);
+    }
+    delete [] dimid;
+
+    return retvalue;
+  }
+
+  std::map<StdString, StdSize> CINetCDF4::getDimensions(const StdString* const var, const CVarPath* const path)
+  {
+    int nbdim = 0, *dimid = NULL;
+    int grpid = this->getGroup(path);
+    int varid = (var != NULL && this->hasVariable(*var, path)) ? this->getVariable(*var, path) : NC_GLOBAL;
+    std::map<StdString, StdSize> retvalue;
+
+    if (var != NULL && this->hasVariable(*var, path))
+    {
+      CNetCdfInterface::inqVarNDims(grpid, varid, nbdim);
+      dimid = new int[nbdim]();
+      CNetCdfInterface::inqVarDimId(grpid, varid, dimid);
+    }
+    else
+    {
+      CNetCdfInterface::inqDimIds(grpid, nbdim, NULL, 1);
+      dimid = new int[nbdim]();
+      CNetCdfInterface::inqDimIds(grpid, nbdim, dimid, 1);
+    }
+
+    for (int i = 0; i < nbdim; i++)
+    {
+      std::string dimname;
+      CNetCdfInterface::inqDimName(grpid, dimid[i], dimname);
+      StdSize size = 0;
+      CNetCdfInterface::inqDimLen(grpid, dimid[i], size);
+
+      retvalue.insert(retvalue.end(), std::make_pair(dimname, size));
+    }
+    delete [] dimid;
+
+    return retvalue;
+  }
+
+  std::list<StdString> CINetCDF4::getAttributes(const StdString* const var, const CVarPath* const path)
+  {
+    int nbatt = 0;
+    std::list<StdString> retvalue;
+    int grpid = this->getGroup(path);
+    int varid = (var != NULL && this->hasVariable(*var, path)) ? this->getVariable(*var, path) : NC_GLOBAL;
+
+    if (var != NULL && this->hasVariable(*var, path))
+      CNetCdfInterface::inqVarNAtts(grpid, varid, nbatt);
+    else
+      CNetCdfInterface::inqNAtts(grpid, nbatt);
+
+    for (int i = 0; i < nbatt; i++)
+    {
+      StdString attname;
+      CNetCdfInterface::inqAttName(grpid, varid, i, attname);
+      retvalue.push_back(attname);
+    }
+    return retvalue;
+  }
+
+  int CINetCDF4::getAttributeId(const StdString& name,
+                                const StdString* const var,
+                                const CVarPath* const path)
+  {
+    int retvalue = 0;
+    std::list<StdString> atts = this->getAttributes(var, path);
+    std::list<StdString>::const_iterator it = atts.begin(), end = atts.end();
+    for (; it != end; it++)
+    {
+      const StdString& attname = *it;
+      if (attname.compare(0, name.size(), name) == 0)
+        return retvalue;
+      retvalue++;
+    }
+    return -1;
+  }
+
+  //---------------------------------------------------------------
+
+  bool CINetCDF4::hasMissingValue(const StdString& name,
+                                  const CVarPath* const path)
+  {
+    return (this->hasAttribute("missing_value", &name, path) || this->hasAttribute("_FillValue", &name, path));
+  }
+
+  bool CINetCDF4::hasAttribute(const StdString& name,
+                               const StdString* const var ,
+                               const CVarPath* const path)
+  {
+    std::list<StdString> atts = this->getAttributes(var, path);
+    std::list<StdString>::const_iterator it = atts.begin(), end = atts.end();
+    for (; it != end; it++)
+    {
+      const StdString& attname = *it;
+      if (attname.compare(0, name.size(), name) == 0) return true;
+    }
+    return false;
+  }
+
+  bool CINetCDF4::hasVariable(const StdString& name,
+                              const CVarPath* const path)
+  {
+    std::list<StdString> variables = this->getVariables(path);
+    std::list<StdString>::const_iterator it = variables.begin(), end = variables.end();
+    for (; it != end; it++)
+    {
+      const StdString& varname = *it;
+      if ((varname.compare(0, name.size(), name) == 0) && (0 != name.size()))  return true;
+    }
+    return false;
+  }
+
+  bool CINetCDF4::hasCoordinates(const StdString& name,
+                                 const CVarPath* const path)
+  {
+    return this->hasAttribute(CCFKeywords::XIOS_CF_coordinates, &name, path);
+  }
+
+  bool CINetCDF4::hasBounds(const StdString& name,
+                            const CVarPath* const path)
+  {
+    return this->hasAttribute(CCFKeywords::XIOS_CF_bounds, &name, path);
+  }
+
+  bool CINetCDF4::hasTemporalDim(const CVarPath* const path)
+  {
+    std::list<StdString> dims = this->getDimensionsList(NULL, path);
+    return (std::find(dims.begin(), dims.end(), timeCounterName) != dims.end());
+  }
+
+  //---------------------------------------------------------------
+
+  template <class T>
+  std::vector<T> CINetCDF4::getAttributeValue(const StdString& name,
+                                              const StdString* const var,
+                                              const CVarPath* const path)
+  {
+    int grpid = this->getGroup(path);
+    int varid = (var != NULL && this->hasVariable(*var, path)) ? this->getVariable(*var, path) : NC_GLOBAL;
+    std::pair<nc_type , StdSize> attinfos = this->getAttribute(name, var, path);
+    std::vector<T> retvalue(attinfos.second);
+    nc_type type = CNetCdfInterface::getNcType<T>();
+    if (attinfos.first != type)
+      ERROR("CINetCDF4::getAttributeValue<T>(name, var, path)",
+            << "[ name : " << name
+            << ", type requested :" << attinfos.first
+            << ", type stored : " << type << "]"
+            << " Invalid type !");
+    CNetCdfInterface::getAttType(grpid, varid, name.c_str(), &retvalue[0]);
+    return retvalue;
+  }
+
+  template std::vector<double> CINetCDF4::getAttributeValue(const StdString& name,
+                                                            const StdString* const var,
+                                                            const CVarPath* const path);
+  template std::vector<float> CINetCDF4::getAttributeValue(const StdString& name,
+                                                           const StdString* const var,
+                                                           const CVarPath* const path);
+  template std::vector<int> CINetCDF4::getAttributeValue(const StdString& name,
+                                                         const StdString* const var,
+                                                         const CVarPath* const path);
+  template std::vector<char> CINetCDF4::getAttributeValue(const StdString& name,
+                                                          const StdString* const var,
+                                                          const CVarPath* const path);
+
+  StdString CINetCDF4::getAttributeValue(const StdString& name,
+                                         const StdString* const var,
+                                         const CVarPath* const path)
+  {
+    std::vector<char> data = this->getAttributeValue<char>(name, var, path);
+
+    return StdString(data.begin(), data.end());
+  }
+
+  template <class T>
+  T CINetCDF4::getMissingValue(const StdString& name, const CVarPath* const path)
+  {
+    if (this->hasAttribute("missing_value", &name, path))
+      return this->getAttributeValue<T>("missing_value", &name, path)[0];
+    if (this->hasAttribute("_FillValue", &name, path))
+      return this->getAttributeValue<T>("_FillValue", &name, path)[0];
+    return 0;
+  }
+
+  template double CINetCDF4::getMissingValue(const StdString& name, const CVarPath* const path);
+  template float CINetCDF4::getMissingValue(const StdString& name, const CVarPath* const path);
+  template int CINetCDF4::getMissingValue(const StdString& name, const CVarPath* const path);
+  template char CINetCDF4::getMissingValue(const StdString& name, const CVarPath* const path);
+
+  //---------------------------------------------------------------
+
+  std::list<StdString> CINetCDF4::getCoordinatesIdList(const StdString& name, const CVarPath* const path)
+  {
+    std::list<StdString> retvalue;
+    StdString value = this->getCoordinatesId(name, path);
+
+    boost::split(retvalue, value, boost::is_any_of(" "));
+
+    std::list<StdString>::iterator it = retvalue.begin(), end = retvalue.end();
+    for (; it != end; it++)
+    {
+      StdString& coord = *it;
+      coord.assign(coord.data());
+    }
+    return retvalue;
+  }
+
+  StdString CINetCDF4::getCoordinatesId(const StdString& name, const CVarPath* const path)
+  {
+    StdString retvalue;
+    if (this->hasAttribute(CCFKeywords::XIOS_CF_coordinates, &name, path))
+    {
+      return this->getAttributeValue(CCFKeywords::XIOS_CF_coordinates, &name, path);
+    }
+    else
+    {
+      std::list<StdString> dims = this->getDimensionsList(&name, path);
+      std::list<StdString>::const_iterator it = dims.begin(), end = dims.end();
+      for (; it != end; it++)
+      {
+        const StdString& value = *it;
+        retvalue.append(value).push_back(' ');
+      }
+      retvalue.erase(retvalue.end() - 1) ;
+    }
+
+    return retvalue;
+  }
+
+  StdString CINetCDF4::getBoundsId(const StdString& name,
+                                   const CVarPath* const path)
+  {
+    StdString retvalue;
+    if (this->hasAttribute(CCFKeywords::XIOS_CF_bounds, &name, path))
+      retvalue = this->getAttributeValue(CCFKeywords::XIOS_CF_bounds, &name, path);
+    return retvalue;
+  }
+
+  //---------------------------------------------------------------
+
+  bool CINetCDF4::isBound(const StdString& name,
+                          const CVarPath* const path)
+  {
+    std::set<StdString> bounds = this->getBoundVariables(path);
+    return (bounds.find(name) != bounds.end());
+  }
+
+  bool CINetCDF4::isCoordinate(const StdString& name,
+                               const CVarPath* const path)
+  {
+    std::set<StdString> coords = this->getCoordVariables(path);
+    return (coords.find(name) != coords.end());
+  }
+
+  bool CINetCDF4::isRectilinear(const StdString& name, const CVarPath* const path)
+  {
+    std::list<StdString> varCoords = this->getCoordinatesIdList(name, path);
+    std::list<StdString> varDims = this->getDimensionsList(&name, path);
+    std::list<StdString>::const_iterator it = varCoords.begin(), end = varCoords.end();
+    std::set<StdString> varDims1D;
+
+    // Firstly, loop over coordinate list
+    for (; it != end; it++)
+    {
+      const StdString& coord = *it;
+      if (this->hasVariable(coord, path) && !this->isTemporal(coord, path) )
+      {
+        std::map<StdString, StdSize> coordDims = this->getDimensions(&coord, path);
+        for (std::map<StdString, StdSize>::const_iterator itTmp = coordDims.begin(); itTmp != coordDims.end(); itTmp++)
+        {
+          varDims.remove(itTmp->first);
+        }
+        if (this->isLonOrLat(coord, path) && coordDims.size() == 1)
+        {
+          varDims1D.insert(coordDims.begin()->first);
+          continue;
+        }
+      }
+    }
+    // Secondly, loop over remaining dimensions
+    for (it= varDims.begin(); it != varDims.end(); it++)
+    {
+      const StdString& coord = *it;
+      std::map<StdString, StdSize> coordDims = this->getDimensions(&coord, path);
+      if (this->hasVariable(coord, path) && !this->isTemporal(coord, path) )
+      {
+        if (this->isLonOrLat(coord, path) && coordDims.size() == 1)
+        {
+          varDims1D.insert(coordDims.begin()->first);
+          continue;
+        }
+      }
+    }
+
+    return (varDims1D.size() == 2);
+  }
+
+  bool CINetCDF4::isCurvilinear(const StdString& name, const CVarPath* const path)
+  {
+    if (this->isRectilinear(name, path) || !this->hasCoordinates(name, path))
+      return false;
+
+    bool isCurVi = true;
+    unsigned int nbLonLat = 0;
+    std::list<StdString> coords = this->getCoordinatesIdList(name, path);
+    std::list<StdString>::const_iterator it = coords.begin(), end = coords.end();
+    for (; it != end; it++)
+    {
+      const StdString& coord = *it;
+      if (this->hasVariable(coord, path) && !this->isTemporal(coord, path) && this->isLonOrLat(coord, path))
+      {
+        std::map<StdString, StdSize> dimvar = this->getDimensions(&coord, path);
+        if (2 == dimvar.size()) ++nbLonLat;
+      }
+    }
+    if (2 != nbLonLat) isCurVi = false;
+
+    return isCurVi;
+  }
+
+  bool CINetCDF4::isUnstructured(const StdString& name, const CVarPath* const path)
+  {
+    if (this->isRectilinear(name, path) ||
+        this->isCurvilinear(name, path) ||
+        !this->hasCoordinates(name, path))
+       return false;
+    else return true ;
+    
+// check this part above    
+    StdString dimname = this->getDimensionsList(&name, path).back();
+
+    std::list<StdString> coords = this->getCoordinatesIdList(name, path);
+    std::list<StdString>::const_iterator it = coords.begin(), end = coords.end();
+    for (; it != end; it++)
+    {
+      const StdString& coord = *it;
+      if (this->hasVariable(coord, path) && !this->isTemporal(coord, path) && this->isLonOrLat(coord, path))
+      {
+        std::map<StdString, StdSize> dimvar = this->getDimensions(&coord, path);
+        if ((dimvar.size() == 1) &&
+            (dimvar.find(dimname) != dimvar.end()))
+          continue;
+        else
+          return false;
+      }
+    }
+
+    return true;
+  }
+
+  bool CINetCDF4::isUnknown(const StdString& name, const CVarPath* const path)
+  {
+    return !(this->isRectilinear(name, path) || this->isCurvilinear(name, path) || this->isUnstructured(name, path));
+  }
+
+  bool CINetCDF4::isTemporal(const StdString& name, const CVarPath* const path)
+  {
+    std::list<StdString> dims = this->getDimensionsList(&name, path);
+    return (std::find(dims.begin(), dims.end(), timeCounterName) != dims.end());
+  }
+
+  bool CINetCDF4::is3Dim(const StdString& name, const CVarPath* const path)
+  {
+    int i = 0;
+    std::list<StdString> coords = this->getCoordinatesIdList(name, path);
+    std::list<StdString>::const_iterator it = coords.begin(), end = coords.end();
+    for (; it != end; it++)
+    {
+      const StdString& coord = *it;
+      if (this->hasVariable(coord, path))
+      {
+        if (this->isTemporal(coord, path))
+          continue;
+        i++;
+      }
+      else
+      {
+        StdString unlimitedDimName = this->getUnlimitedDimensionName();
+        if (coord.compare(0, unlimitedDimName.size(), unlimitedDimName) == 0)
+          continue;
+        i++;
+      }
+    }
+    return (i == 3);
+  }
+
+  bool CINetCDF4::isCellGrid(const StdString& name, const CVarPath* const path)
+  {
+    if (this->isCoordinate(name, path))
+    {
+      return this->hasBounds(name, path);
+    }
+    else
+    {
+      std::list<StdString> coords = this->getCoordinatesIdList(name, path);
+      std::list<StdString>::const_iterator it = coords.begin(), end = coords.end();
+      for (; it != end; it++)
+      {
+        const StdString& coord = *it;
+        if (this->hasVariable(coord, path))
+        {
+          if (this->isTemporal(coord, path))
+            continue;
+          if (this->isCellGrid(coord, path))
+            continue;
+          return false;
+        }
+        else
+        {
+          StdString unlimitedDimName = this->getUnlimitedDimensionName();
+          if (coord.compare(0, unlimitedDimName.size(), unlimitedDimName) == 0)
+            continue;
+          return false;
+        }
+      }
+    }
+
+    return true;
+  }
+
+  //---------------------------------------------------------------
+
+  std::list<StdString> CINetCDF4::getDataVariables(bool _is3D,       bool _isRecti,
+                                                   bool _isCurvi,    bool _isUnstr,
+                                                   bool _isCellData, bool _isTemporal,
+                                                   const CVarPath* const path)
+  {
+    std::list<StdString> retvalue;
+    std::list<StdString> allvars  = this->getVariables(path);
+    std::set<StdString> allcoords = this->getCoordVariables(path);
+
+    std::list<StdString>::const_iterator it = allvars.begin(), end = allvars.end();
+    for (; it != end; it++)
+    {
+      const StdString& var = *it;
+      if (this->isCoordinate(var, path)) continue;
+
+      if (!_isRecti && this->isRectilinear(var, path))  continue;
+      if (!_isCurvi && this->isCurvilinear(var, path))  continue;
+      if (!_isUnstr && this->isUnstructured(var, path)) continue;
+
+      if (!_isTemporal && this->isTemporal(var, path)) continue;
+      if (!_is3D       && this->is3Dim(var, path))     continue;
+      if (!_isCellData && this->isCellGrid(var, path)) continue;
+
+      if (this->isUnknown(var, path)) continue;
+
+      retvalue.push_back(var);
+    }
+    return retvalue;
+  }
+
+  //---------------------------------------------------------------
+
+  void CINetCDF4::getDataInfo(const StdString& var, const CVarPath* const path, StdSize record,
+                              std::vector<StdSize>& sstart, std::vector<StdSize>& scount, StdSize& array_size,
+                              const std::vector<StdSize>* start /*= NULL*/, const std::vector<StdSize>* count /*= NULL*/)
+  {
+    std::list<StdString> dimlist = this->getDimensionsList(&var, path);
+    std::map<StdString, StdSize> dimmap = this->getDimensions(&var, path);
+    std::list<StdString>::iterator it = dimlist.begin();
+    if (this->isTemporal(var, path))
+    {
+      if (record != UNLIMITED_DIM)
+        sstart.push_back(record);
+      else
+        sstart.push_back(0);
+      scount.push_back(1);
+      it++;
+    }
+    for (int i = 0; it != dimlist.end(); it++, i++)
+    {
+      if (start && count)
+      {
+        sstart.push_back((*start)[i]);
+        scount.push_back((*count)[i]);
+        array_size *= (*count)[i];
+      }
+      else
+      {
+        sstart.push_back(0);
+        scount.push_back(dimmap[*it]);
+        array_size *= dimmap[*it];
+      }
+    }
+  }
+
+  template <class T>
+  void CINetCDF4::getData(CArray<T, 1>& data, const StdString& var,
+                          const CVarPath* const path, StdSize record)
+  {
+    std::vector<StdSize> start, count;
+    int grpid = this->getGroup(path);
+    int varid = this->getVariable(var, path);
+    StdSize array_size = 1;
+    this->getDataInfo(var, path, record, start, count, array_size);
+    data.resize(array_size);
+    CNetCdfInterface::getVaraType(grpid, varid, &start[0], &count[0], data.dataFirst());
+  }
+
+  template <>
+  void CINetCDF4::getData(CArray<int, 1>& data, const StdString& var,
+                          const CVarPath* const path, StdSize record);
+  template <>
+  void CINetCDF4::getData(CArray<double, 1>& data, const StdString& var,
+                          const CVarPath* const path, StdSize record);
+  template <>
+  void CINetCDF4::getData(CArray<float, 1>& data, const StdString& var,
+                          const CVarPath* const path, StdSize record);
+
+  //---------------------------------------------------------------
+
+  StdString CINetCDF4::getLonCoordName(const StdString& varname,
+                                       const CVarPath* const path)
+  {
+    StdString lonName;
+    std::list<StdString>::const_iterator itbList, itList, iteList;
+    std::list<StdString> clist = this->getCoordinatesIdList(varname, path);
+    itbList = clist.begin(); iteList = clist.end();
+    for (itList = itbList; itList != iteList; ++itList)
+    {
+      if (this->hasAttribute(CCFKeywords::XIOS_CF_units, &(*itList), path))
+      {
+        StdString unit = this->getAttributeValue(CCFKeywords::XIOS_CF_units, &(*itList), path);
+        if (CCFConvention::XIOS_CF_Longitude_units.end() != CCFConvention::XIOS_CF_Longitude_units.find(unit))
+        {
+          lonName = *itList;
+          return lonName;
+        }
+      }
+    }
+    return lonName;
+  }
+
+  StdString CINetCDF4::getLatCoordName(const StdString& varname,
+                                       const CVarPath* const path)
+  {
+    StdString latName;
+    std::list<StdString>::const_iterator itbList, itList, iteList;
+    std::list<StdString> clist = this->getCoordinatesIdList(varname, path);
+    itbList = clist.begin(); iteList = clist.end();
+    for (itList = itbList; itList != iteList; ++itList)
+    {
+      if (this->hasAttribute(CCFKeywords::XIOS_CF_units, &(*itList), path))
+      {
+        StdString unit = this->getAttributeValue(CCFKeywords::XIOS_CF_units, &(*itList), path);
+        if (CCFConvention::XIOS_CF_Latitude_units.end() != CCFConvention::XIOS_CF_Latitude_units.find(unit))
+        {
+          latName = *itList;
+          return latName;
+        }
+      }
+    }
+    return latName;
+  }
+
+  StdString CINetCDF4::getVertCoordName(const StdString& varname,
+                                        const CVarPath* const path)
+  {
+    if (!this->is3Dim(varname, path)) return "";
+    std::list<StdString> clist = this->getCoordinatesIdList(varname, path);
+    if (this->hasCoordinates(varname, path))
+      return *(++(++clist.begin()));
+    else
+      return *(++(++clist.rbegin()));
+  }
+
+  bool CINetCDF4::isLonOrLat(const StdString& varname, const CVarPath* const path)
+  {
+    if (this->hasAttribute(CCFKeywords::XIOS_CF_units, &varname, path))
+    {
+      StdString unit = this->getAttributeValue(CCFKeywords::XIOS_CF_units, &varname, path);
+      return      (CCFConvention::XIOS_CF_Latitude_units.end() != CCFConvention::XIOS_CF_Latitude_units.find(unit)
+                || CCFConvention::XIOS_CF_Longitude_units.end() != CCFConvention::XIOS_CF_Longitude_units.find(unit));
+    }
+    else return false ;
+  }
+
+} // namespace xios
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/io/inetcdf4.hpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/io/inetcdf4.hpp	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/io/inetcdf4.hpp	(revision 1749)
@@ -0,0 +1,167 @@
+#ifndef __XIOS_INETCDF4__
+#define __XIOS_INETCDF4__
+
+/// XIOS headers ///
+#include "xios_spl.hpp"
+#include "exception.hpp"
+#include "array_new.hpp"
+
+#include "mpi.hpp"
+#include "netcdf.hpp"
+
+#ifndef UNLIMITED_DIM
+#define UNLIMITED_DIM (size_t)(-1)
+#endif  // UNLIMITED_DIM
+
+namespace xios
+{
+  typedef std::vector<StdString> CVarPath;
+
+  class CINetCDF4
+  {
+    public:
+      /// Constructors ///
+      CINetCDF4(const StdString& filename, const MPI_Comm* comm = NULL, bool multifile = true,
+                bool readMetaDataPar = false, const StdString& timeCounterName = "time_counter");
+
+      CINetCDF4(const CINetCDF4& inetcdf4);       // Not implemented.
+      CINetCDF4(const CINetCDF4* const inetcdf4); // Not implemented.
+
+      //-------------------------------------------------------------
+
+      /// Destructor ///
+      virtual ~CINetCDF4(void);
+
+      //-------------------------------------------------------------
+
+      void close(void);
+
+      //-------------------------------------------------------------
+
+      /// Getters ///
+      StdSize getNbOfTimestep(const CVarPath* const path = NULL);
+
+      StdString getUnlimitedDimensionName(const CVarPath* const path = NULL);
+
+      const StdString& getTimeCounterName(void) const { return timeCounterName; };
+
+      StdString getCoordinatesId(const StdString& name, const CVarPath* const path = NULL);
+
+      StdString getBoundsId(const StdString& name, const CVarPath* const path = NULL);
+
+      StdString getLonCoordName(const StdString& varname, const CVarPath* const path = NULL);
+      StdString getLatCoordName(const StdString& varname, const CVarPath* const path = NULL);
+      StdString getVertCoordName(const StdString& varname, const CVarPath* const path = NULL);
+
+      std::set<StdString> getCoordVariables(const CVarPath* const path = NULL);
+      std::set<StdString> getBoundVariables(const CVarPath* const path = NULL);
+
+      std::list<StdString> getGroups   (const CVarPath* const path = NULL);
+      std::list<StdString> getVariables(const CVarPath* const path = NULL);
+
+      std::list<StdString> getDataVariables(bool _is3D       = true,
+                                            bool _isRecti    = true,
+                                            bool _isCurvi    = true,
+                                            bool _isUnstr    = true,
+                                            bool _isCellData = true,
+                                            bool _isTemporal = true,
+                                            const CVarPath* const path = NULL);
+
+      std::list<StdString> getAttributes(const StdString* const var  = NULL,
+                                         const CVarPath* const path = NULL);
+
+      std::list<StdString> getDimensionsList(const StdString* const var  = NULL,
+                                             const CVarPath* const path = NULL);
+
+      std::list<StdString> getCoordinatesIdList(const StdString& name,
+                                                const CVarPath* const path = NULL);
+
+      std::map<StdString, StdSize> getDimensions(const StdString* const var  = NULL,
+                                                 const CVarPath* const path = NULL);
+
+      StdSize getNbVertex(const StdString& name, const CVarPath* const path = NULL);
+
+      //-------------------------------------------------------------
+
+      template <class T>
+      T getMissingValue(const StdString& name, const CVarPath* const path = NULL);
+
+      template <class T>
+      std::vector<T> getAttributeValue(const StdString& name,
+                                       const StdString* const var  = NULL,
+                                       const CVarPath* const path = NULL);
+
+      StdString getAttributeValue(const StdString& name,
+                                  const StdString* const var,
+                                  const CVarPath* const path);
+
+      template <class T>
+      void getData(CArray<T, 1>& data,
+                   const StdString& var,
+                   const CVarPath* const path = NULL,
+                   StdSize record = UNLIMITED_DIM);
+
+      template <class T, int Ndim>
+      void getData(CArray<T, Ndim>& data, const StdString& var,
+                   bool collective, StdSize record,
+                   const std::vector<StdSize>* start = NULL,
+                   const std::vector<StdSize>* count = NULL);
+
+      //-------------------------------------------------------------
+
+      /// Tests ///
+      bool hasMissingValue(const StdString& name, const CVarPath* const path = NULL);
+
+      bool hasAttribute(const StdString& name, const StdString* const var  = NULL, const CVarPath* const path = NULL);
+
+      bool hasVariable(const StdString& name, const CVarPath* const path = NULL);
+
+      bool hasCoordinates(const StdString& name, const CVarPath* const path = NULL);
+
+      bool hasTemporalDim(const CVarPath* const path = NULL);
+
+      bool hasBounds(const StdString& name, const CVarPath* const path = NULL);
+
+      //-------------------------------------------------------------
+
+      bool isBound(const StdString& name, const CVarPath* const path = NULL);
+      bool isCoordinate(const StdString& name, const CVarPath* const path = NULL);
+      bool isRectilinear(const StdString& name, const CVarPath* const path = NULL);
+      bool isCurvilinear(const StdString& name, const CVarPath* const path = NULL);
+      bool isUnknown(const StdString& name, const CVarPath* const path = NULL);
+      bool isUnstructured(const StdString& name, const CVarPath* const path = NULL);
+
+      bool isTemporal(const StdString& name, const CVarPath* const path = NULL);
+      bool is3Dim(const StdString& name, const CVarPath* const path = NULL);
+      bool isCellGrid(const StdString& name, const CVarPath* const path = NULL);
+
+      bool isLonOrLat(const StdString& varname, const CVarPath* const path = NULL);
+
+    protected:
+      /// Getters ///
+      int getGroup   (const CVarPath* const path = NULL);
+      int getVariable(const StdString& varname, const CVarPath* const path = NULL);
+      int getDimension(const StdString& dimname, const CVarPath* const path = NULL);
+      int getUnlimitedDimension(const CVarPath* const path = NULL);
+      int getAttributeId(const StdString& name,
+                         const StdString* const var = NULL,
+                         const CVarPath* const path = NULL);
+
+      std::pair<nc_type , StdSize> getAttribute(const StdString& attname,
+                                                const StdString* const var  = NULL,
+                                                const CVarPath* const path = NULL);
+
+      //-------------------------------------------------------------
+
+      void getDataInfo(const StdString& var, const CVarPath* const path, StdSize record,
+                       std::vector<StdSize>& sstart, std::vector<StdSize>& scount, StdSize& array_size,
+                       const std::vector<StdSize>* start = NULL, const std::vector<StdSize>* count = NULL);
+
+    private:
+      int ncidp; //< Id of the NetCDF file
+      bool mpi;  //< Whether parallel file access is used
+      StdString timeCounterName;
+  }; // class CINetCDF4
+} // namespace xios
+
+#endif //__XIOS_INETCDF4__
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/io/inetcdf4_decl.cpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/io/inetcdf4_decl.cpp	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/io/inetcdf4_decl.cpp	(revision 1749)
@@ -0,0 +1,15 @@
+#include "inetcdf4_impl.hpp"
+
+namespace xios
+{
+# define  macro(type,size) \
+  template void CINetCDF4::getData(CArray<type, size>& data, const StdString& var, \
+                                   bool collective, StdSize record,                \
+                                   const std::vector<StdSize>* start,              \
+                                   const std::vector<StdSize>* count);             \
+
+  macro(double, 1)
+  macro(double, 2)
+  macro(double, 3)
+} // namespace xios
+
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/io/inetcdf4_impl.hpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/io/inetcdf4_impl.hpp	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/io/inetcdf4_impl.hpp	(revision 1749)
@@ -0,0 +1,39 @@
+#ifndef __XIOS_INETCDF4_IMPL__
+#define __XIOS_INETCDF4_IMPL__
+
+#include "inetcdf4.hpp"
+#include "netCdfInterface.hpp"
+
+namespace xios
+{
+template <class T, int Ndim>
+void CINetCDF4::getData(CArray<T, Ndim>& data, const StdString& var,
+                       bool collective, StdSize record,
+                       const std::vector<StdSize>* start,
+                       const std::vector<StdSize>* count)
+{
+  int varid = this->getVariable(var);
+
+  if (this->mpi && collective)
+    CNetCdfInterface::varParAccess(ncidp, varid, NC_COLLECTIVE);
+  else if (this->mpi && !collective)
+    CNetCdfInterface::varParAccess(ncidp, varid, NC_INDEPENDENT);
+
+  std::vector<StdSize> sstart, scount;
+  StdSize array_size = 1;
+  this->getDataInfo(var, NULL, record, sstart, scount, array_size, start, count);
+
+  if (data.numElements() != array_size)
+  {
+    ERROR("CINetCDF4::getData(...)",
+          << "[ Array size = " << data.numElements()
+          << ", Data size = "  << array_size
+          << " ] Invalid array size");
+  }
+
+  CNetCdfInterface::getVaraType(ncidp, varid, &sstart[0], &scount[0], data.dataFirst());
+}
+
+} // namespace xios
+
+#endif //__XIOS_INETCDF4_IMPL__
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/io/nc4_data_input.cpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/io/nc4_data_input.cpp	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/io/nc4_data_input.cpp	(revision 1749)
@@ -0,0 +1,619 @@
+#include "nc4_data_input.hpp"
+
+#include "context.hpp"
+#include "context_server.hpp"
+#include "context_client.hpp"
+#include "domain.hpp"
+#include "axis.hpp"
+#include "scalar.hpp"
+
+namespace xios
+{
+  CNc4DataInput::CNc4DataInput(const StdString& filename, MPI_Comm comm_file, bool multifile, bool isCollective /*= true*/,
+                               bool readMetaDataPar /*= false*/, bool ugridConvention /*= false*/, const StdString& timeCounterName /*= "time_counter"*/)
+    : SuperClass()
+    , SuperClassWriter(filename, &comm_file, multifile, readMetaDataPar, timeCounterName)
+    , comm_file(comm_file)
+    , filename(filename)
+    , isCollective(isCollective)
+    , ugridConvention(ugridConvention)
+    , readMetaDataDomains_(), readValueDomains_()
+    , readMetaDataAxis_(), readValueAxis_()
+    , readMetaDataScalar_(), readValueScalar_()
+  {
+    SuperClass::type = multifile ? MULTI_FILE : ONE_FILE;
+  }
+
+  CNc4DataInput::~CNc4DataInput(void)
+  { /* Nothing more to do */ }
+
+  StdSize CNc4DataInput::getFieldNbRecords_(CField* field)
+  TRY
+  {
+    StdString fieldId = field->getFieldOutputName();
+
+    if (SuperClassWriter::isTemporal(fieldId))
+    {
+//      return SuperClassWriter::getDimensions(&fieldId)[SuperClassWriter::getUnlimitedDimensionName()];
+      return SuperClassWriter::getDimensions(&fieldId)[SuperClassWriter::getTimeCounterName()];
+    }
+
+    return 1;
+  }
+  CATCH
+
+  void CNc4DataInput::readFieldData_(CField* field)
+  TRY
+  {
+    CContext* context = CContext::getCurrent();
+    CContextServer* server = context->server;
+
+    CGrid* grid = field->grid;
+
+    if (!grid->doGridHaveDataToWrite())
+      if (SuperClass::type==MULTI_FILE || !isCollective) return;
+
+    StdString fieldId = field->getFieldOutputName();
+
+    CArray<double,1> fieldData(grid->getWrittenDataSize());
+    if (!field->default_value.isEmpty()) fieldData = field->default_value;
+
+    switch (SuperClass::type)
+    {
+      case MULTI_FILE:
+        SuperClassWriter::getData(fieldData, fieldId, isCollective, (field->getNStep() - 1)%field->nstepMax );
+        break;
+      case ONE_FILE:
+      {
+        std::vector<StdSize> start, count;
+
+        CArray<int,1> axisDomainOrder = grid->axis_domain_order;
+        std::vector<StdString> domainList = grid->getDomainList();
+        std::vector<StdString> axisList   = grid->getAxisList();
+        int numElement = axisDomainOrder.numElements();
+        int idxDomain = domainList.size() - 1, idxAxis = axisList.size() - 1;
+        int idx = domainList.size() * 2 + axisList.size() - 1;
+
+        start.reserve(idx+1);
+        count.reserve(idx+1);
+
+        for (int i = numElement - 1; i >= 0; --i)
+        {
+          if (2 == axisDomainOrder(i))
+          {
+            CDomain* domain = CDomain::get(domainList[idxDomain]);
+            if ((domain->type) != CDomain::type_attr::unstructured)
+            {
+              start.push_back(domain->jbegin);
+              count.push_back(domain->nj);
+            }
+            start.push_back(domain->ibegin);
+            count.push_back(domain->ni);
+            --idxDomain;
+          }
+          else if (1 == axisDomainOrder(i))
+          {
+            CAxis* axis = CAxis::get(axisList[idxAxis]);
+            start.push_back(axis->begin);
+            count.push_back(axis->n);
+            --idxAxis ;
+          }
+          else
+          {
+            if (1 == axisDomainOrder.numElements())
+            {
+              start.push_back(0);
+              count.push_back(1);
+            }
+          }
+        }
+
+        SuperClassWriter::getData(fieldData, fieldId, isCollective, (field->getNStep() - 1)%field->nstepMax, &start, &count);
+        break;
+      }
+    }
+
+    field->inputField(fieldData);
+
+    if (!field->scale_factor.isEmpty() || !field->add_offset.isEmpty())
+    {
+      double scaleFactor = 1.0, addOffset = 0.0;
+      if (!field->scale_factor.isEmpty()) scaleFactor = field->scale_factor;
+      if (!field->add_offset.isEmpty()) addOffset = field->add_offset;
+      field->invertScaleFactorAddOffset(scaleFactor, addOffset);
+    }
+  }
+  CATCH
+
+  void CNc4DataInput::readFieldAttributes_(CField* field, bool readAttributeValues)
+  TRY
+  {
+    StdString fieldId = field->getFieldOutputName();
+
+    CGrid* grid = field->grid;
+
+    std::vector<CDomain*> domainP = grid->getDomains();
+    std::vector<CAxis*> axisP = grid->getAxis();
+    std::vector<CScalar*> scalarP = grid->getScalars();
+    int gridDim = domainP.size() * 2 + axisP.size();
+
+    // Nothing to do with scalar without timestep
+    if ((0 == gridDim) && (!SuperClassWriter::isTemporal(fieldId))) 
+      return;
+
+    // Verify the compatibility of dimension of declared grid and real grid in file
+    int realGridDim = 1;
+    bool isUnstructuredGrid = ((gridDim < 2) ? false :  SuperClassWriter::isUnstructured(fieldId));
+    std::map<StdString, StdSize> dimSizeMap = SuperClassWriter::getDimensions(&fieldId);
+    std::list<StdString> dimList = SuperClassWriter::getDimensionsList(&fieldId);
+
+    realGridDim = SuperClassWriter::isTemporal(fieldId) ? dimSizeMap.size() - 1 : dimSizeMap.size();
+    if (isUnstructuredGrid) ++realGridDim;
+
+    if (gridDim != realGridDim)
+       ERROR("CNc4DataInput::readFieldAttributes_(CField* field, bool readAttributeValues)",
+        << "Field '" << fieldId << "' has incorrect dimension " << std::endl
+        << "Verify dimension of grid defined by 'grid_ref' or 'domain_ref'/'axis_ref' and dimension of grid in read file.");
+
+    // Remove unlimited dimension from the map, we dont need it anymore
+    if (SuperClassWriter::isTemporal(fieldId))
+    {
+      dimSizeMap.erase(SuperClassWriter::getUnlimitedDimensionName());
+      dimList.pop_front() ;  // assume time dimension is first
+    }
+
+    std::list<std::pair<StdString, StdSize> > listDimSize;
+/*
+    for (std::map<StdString, StdSize>::const_iterator itMap = dimSizeMap.begin(); itMap != dimSizeMap.end(); ++itMap)
+      listDimSize.push_front(*itMap);
+*/
+
+//    if (!SuperClassWriter::isRectilinear(fieldId))
+    if (true)
+    {
+      for (std::list<StdString>::const_iterator it = dimList.begin(); it != dimList.end(); ++it)
+        listDimSize.push_front(*dimSizeMap.find(*it));
+    }
+    else
+    {
+       std::list<StdString> coords = SuperClassWriter::getCoordinatesIdList(fieldId);
+       std::list<StdString>::const_iterator itCoord = coords.begin();
+       for (; itCoord != coords.end(); itCoord++)
+       {
+         const StdString& coord = *itCoord;
+         if (SuperClassWriter::hasVariable(coord) && !SuperClassWriter::isTemporal(coord))
+         {
+           std::map<StdString, StdSize> dimsTmp = SuperClassWriter::getDimensions(&coord);
+           StdString dimNameTmp = dimsTmp.begin()->first;
+           StdSize dimSizeTmp = dimsTmp.begin()->second;
+           listDimSize.push_front(make_pair(coord, dimSizeTmp));
+           dimSizeMap.erase(dimNameTmp);
+           dimList.remove(dimNameTmp);
+         }
+       }
+       for (std::list<StdString>::const_iterator it = dimList.begin(); it != dimList.end(); ++it)
+        listDimSize.push_front(*dimSizeMap.find(*it));
+    }
+
+    // Now process domain and axis
+    CArray<int,1> axisDomainOrder = grid->axis_domain_order;
+    int numElement = domainP.size() + axisP.size() + scalarP.size();
+    int elementPosition = 0;
+    int idxDomain = 0, idxAxis = 0, idxScalar = 0;
+
+    std::pair<std::set<StdString>::iterator,bool> it;
+    for (int i = 0; i < numElement; ++i)
+    {
+      if(2 == axisDomainOrder(i))
+      {
+        if (readAttributeValues)
+        {
+           it = readValueDomains_.insert(domainP[idxDomain]->getId());
+           if (it.second) readDomainAttributeValueFromFile(domainP[idxDomain], listDimSize, elementPosition, fieldId);
+        }
+        else
+        {
+          it = readMetaDataDomains_.insert(domainP[idxDomain]->getId());
+          if (it.second) readDomainAttributesFromFile(domainP[idxDomain], listDimSize, elementPosition, fieldId);
+        }
+        ++idxDomain;
+        if (isUnstructuredGrid) ++elementPosition;
+        else elementPosition += 2;
+      }
+      else if (1 == axisDomainOrder(i))
+      {
+        if (readAttributeValues)
+        {
+          it = readValueAxis_.insert(axisP[idxAxis]->getId());
+          if (it.second) readAxisAttributeValueFromFile(axisP[idxAxis], listDimSize, elementPosition, fieldId);
+        }
+        else
+        {
+          it = readMetaDataAxis_.insert(axisP[idxAxis]->getId());
+          if (it.second) readAxisAttributesFromFile(axisP[idxAxis], listDimSize, elementPosition, fieldId);
+        }
+        ++idxAxis;
+        ++elementPosition;
+      }
+      else
+      {
+        if (readAttributeValues)
+        {
+          it = readValueScalar_.insert(scalarP[idxScalar]->getId());
+          if (it.second) readScalarAttributeValueFromFile(scalarP[idxScalar], listDimSize, elementPosition, fieldId);
+        }
+        else
+        {
+          it = readMetaDataScalar_.insert(scalarP[idxScalar]->getId());
+          if (it.second) readScalarAttributesFromFile(scalarP[idxScalar], listDimSize, elementPosition, fieldId);
+        }
+        ++idxScalar;
+        ++elementPosition;
+      }
+    }
+  }
+  CATCH
+
+  /*!
+    Read attributes of a domain from a file
+    \param [in] domain domain whose attributes are read from the file
+    \param [in] dimSizeMap Dimensions and and their corresponding names and size read from file
+    \param [in] emelentPosition position of domain in grid
+    \param [in] fieldId id (or name) associated with the grid
+  */
+  void CNc4DataInput::readDomainAttributeValueFromFile(CDomain* domain, std::list<std::pair<StdString, StdSize> >& dimSizeMap,
+                                                       int elementPosition, const StdString& fieldId)
+  TRY
+  {
+    // There are some optional attributes of a domain to retrieve from file    // + lon lat?
+    std::list<std::pair<StdString, StdSize> >::const_iterator itMapNi = dimSizeMap.begin(), itMapNj,
+                                                              iteMap  = dimSizeMap.end();
+
+    for (int i = 0; i < elementPosition; ++i, ++itMapNi) {}
+    itMapNj = itMapNi; ++itMapNj;
+
+    if ((CDomain::type_attr::rectilinear == domain->type))
+    {
+      // Ok, try to read some attributes such as longitude and latitude
+      bool hasLat = SuperClassWriter::hasVariable(itMapNj->first);
+      if (hasLat)
+      {
+        domain->latvalue_rectilinear_read_from_file.resize(itMapNj->second);
+        std::vector<StdSize> nBeginLat(1, 0), nSizeLat(1, itMapNj->second);
+        readFieldVariableValue(domain->latvalue_rectilinear_read_from_file, itMapNj->first, nBeginLat, nSizeLat, true);
+      }
+
+      bool hasLon = SuperClassWriter::hasVariable(itMapNi->first);
+      if (hasLon)
+      {
+        domain->lonvalue_rectilinear_read_from_file.resize(itMapNi->second);
+        std::vector<StdSize> nBeginLon(1, 0), nSizeLon(1, itMapNi->second);
+        readFieldVariableValue(domain->lonvalue_rectilinear_read_from_file, itMapNi->first, nBeginLon, nSizeLon, true);
+      }      
+    }
+    else if ((CDomain::type_attr::curvilinear == domain->type))
+    {
+      // Make sure that if there is no local domain defined on a process, the process still reads just one value.
+      int ni, nj, ibegin, jbegin;
+      if (domain->ni == 0)
+      {
+        ni = 1;
+        ibegin = 0;
+      }
+      else
+      {
+        ni = domain->ni;
+        ibegin = domain->ibegin;
+      }
+      if (domain->nj == 0)
+      {
+        nj = 1;
+        jbegin = 0;
+      }
+      else
+      {
+        nj = domain->nj;
+        jbegin = domain->jbegin;
+      }
+
+      std::vector<StdSize> nBeginLatLon(2), nSizeLatLon(2);
+      nBeginLatLon[0] = jbegin; nBeginLatLon[1] = ibegin;
+      nSizeLatLon[0]  = nj; nSizeLatLon[1] = ni;
+
+      StdString latName = this->getLatCoordName(fieldId);
+      if (SuperClassWriter::hasVariable(latName))
+      {
+        domain->latvalue_curvilinear_read_from_file.resize(ni, nj);
+        readFieldVariableValue(domain->latvalue_curvilinear_read_from_file, latName, nBeginLatLon, nSizeLatLon);
+      }
+      StdString lonName = this->getLonCoordName(fieldId);
+      if (SuperClassWriter::hasVariable(lonName))
+      {
+        domain->lonvalue_curvilinear_read_from_file.resize(ni, nj);
+        readFieldVariableValue(domain->lonvalue_curvilinear_read_from_file, lonName, nBeginLatLon, nSizeLatLon);
+      }
+
+      StdString boundsLatName = this->getBoundsId(latName);
+      StdString boundsLonName = this->getBoundsId(lonName);
+
+      int nbVertex = 4; //this->getNbVertex(fieldId);
+      if (!domain->nvertex.isEmpty() && (domain->nvertex != nbVertex))
+      {
+        ERROR("void CNc4DataInput::readDomainAttributeValueFromFile(...)",
+          << "The domain " << domain->getDomainOutputName()
+          << " has nvertex read from file " << this->filename << " and nvertex provided from model"
+          << " are not coherent. They should be the same." << std::endl 
+          << " nvertex read from file: "<< nbVertex
+          << " nvertex from model: "<< domain->nvertex << std::endl);
+      } 
+
+      if (SuperClassWriter::hasVariable(boundsLatName) || SuperClassWriter::hasVariable(boundsLonName)) 
+        domain->nvertex.setValue(nbVertex);
+
+      std::vector<StdSize> nBeginBndsLatLon(3), nSizeBndsLatLon(3);
+      nBeginBndsLatLon[0] = jbegin; nSizeBndsLatLon[0] = nj;
+      nBeginBndsLatLon[1] = ibegin; nSizeBndsLatLon[1] = ni;
+      nBeginBndsLatLon[2] = 0; nSizeBndsLatLon[2] = nbVertex;
+
+      if (SuperClassWriter::hasVariable(boundsLatName))
+      {
+        domain->bounds_latvalue_curvilinear_read_from_file.resize(nbVertex, ni, nj);
+        readFieldVariableValue(domain->bounds_latvalue_curvilinear_read_from_file, boundsLatName, nBeginBndsLatLon, nSizeBndsLatLon);
+
+      }
+      if (SuperClassWriter::hasVariable(boundsLonName)) 
+      {
+        domain->bounds_lonvalue_curvilinear_read_from_file.resize(nbVertex, ni, nj);
+        readFieldVariableValue(domain->bounds_lonvalue_curvilinear_read_from_file, boundsLonName, nBeginBndsLatLon, nSizeBndsLatLon);
+      }      
+    }
+    else if ((CDomain::type_attr::unstructured == domain->type))// || (this->isUnstructured(fieldId)))
+    {
+      // Make sure that if there is no local domain defined on a process, the process still reads just one value.
+      int ni, ibegin;
+      if (domain->ni == 0)
+      {
+        ni = 1;
+        ibegin = 0;
+      }
+      else
+      {
+        ni = domain->ni;
+        ibegin = domain->ibegin;
+      }
+
+      std::vector<StdSize> nBeginLatLon(1,0), nSizeLatLon(1,0);
+      nBeginLatLon[0] = ibegin;
+      nSizeLatLon[0]  = ni;
+
+      StdString latName = this->getLatCoordName(fieldId);
+      if (SuperClassWriter::hasVariable(latName))
+      {
+        domain->latvalue_unstructured_read_from_file.resize(ni);
+        readFieldVariableValue(domain->latvalue_unstructured_read_from_file, latName, nBeginLatLon, nSizeLatLon);  
+      }
+
+      StdString lonName = this->getLonCoordName(fieldId);
+      if (SuperClassWriter::hasVariable(lonName)) //(0 != lonName.compare(""))
+      {
+        domain->lonvalue_unstructured_read_from_file.resize(ni);
+        readFieldVariableValue(domain->lonvalue_unstructured_read_from_file, lonName, nBeginLatLon, nSizeLatLon);
+      }
+
+      StdString boundsLatName = this->getBoundsId(latName);
+      StdString boundsLonName = this->getBoundsId(lonName);
+
+      if (ugridConvention && domain->nvertex.isEmpty())
+      {
+        ERROR("void CNc4DataInput::readDomainAttributeValueFromFile(...)",
+          << " Attribute nvertex must be specified for domain " << domain->getDomainOutputName()
+          << " read from UGRID file " << this->filename << " ."<< std::endl);
+      }
+//      int nbVertex = this->getNbVertex(fieldId);
+      int nbVertex = (ugridConvention) ? domain->nvertex : this->getNbVertex(fieldId);
+      if (!domain->nvertex.isEmpty() && (domain->nvertex != nbVertex))
+      {
+        ERROR("void CNc4DataInput::readDomainAttributeValueFromFile(...)",
+          << "The domain " << domain->getDomainOutputName()
+          << " has nvertex read from file " << this->filename << " and nvertex provided from model"
+          << " are not coherent. They should be the same." << std::endl 
+          << " nvertex read from file: "<< nbVertex
+          << " nvertex from model: "<< domain->nvertex << std::endl);
+      } 
+      
+      if (SuperClassWriter::hasVariable(boundsLatName) || SuperClassWriter::hasVariable(boundsLonName)) 
+        domain->nvertex.setValue(nbVertex);
+
+      std::vector<StdSize> nBeginBndsLatLon(2), nSizeBndsLatLon(2);
+      nBeginBndsLatLon[0] = ibegin; nSizeBndsLatLon[0] = ni;
+      nBeginBndsLatLon[1] = 0; nSizeBndsLatLon[1] = nbVertex;
+
+      if (SuperClassWriter::hasVariable(boundsLatName)) 
+      {
+        domain->bounds_latvalue_unstructured_read_from_file.resize(nSizeBndsLatLon[1], nSizeBndsLatLon[0]);
+        readFieldVariableValue(domain->bounds_latvalue_unstructured_read_from_file, boundsLatName, nBeginBndsLatLon, nSizeBndsLatLon);
+      }
+
+      if (SuperClassWriter::hasVariable(boundsLonName)) 
+      {
+        domain->bounds_lonvalue_unstructured_read_from_file.resize(nSizeBndsLatLon[1], nSizeBndsLatLon[0]);
+        readFieldVariableValue(domain->bounds_lonvalue_unstructured_read_from_file, boundsLonName, nBeginBndsLatLon, nSizeBndsLatLon);
+      }      
+    }
+    domain->fillInLonLat();
+  }
+  CATCH
+
+  /*!
+    Read attribute value of a domain from a file
+    \param [in] domain domain whose attributes are read from the file
+    \param [in] dimSizeMap Dimensions and and their corresponding names and size read from file
+    \param [in] emelentPosition position of domain in grid
+    \param [in] fieldId id (or name) associated with the grid
+  */
+  void CNc4DataInput::readDomainAttributesFromFile(CDomain* domain, std::list<std::pair<StdString, StdSize> >& dimSizeMap,
+                                                   int elementPosition, const StdString& fieldId)
+  TRY
+  {
+    // There are some mandatory attributes of a domain to retrieve from file
+    // + ni_glo, nj_glo
+    std::list<std::pair<StdString, StdSize> >::const_iterator itMapNi = dimSizeMap.begin(), itMapNj,
+                                                              iteMap  = dimSizeMap.end();
+    for (int i = 0; i < elementPosition; ++i, ++itMapNi) {}
+    itMapNj = itMapNi; ++itMapNj;
+
+    if (CDomain::type_attr::rectilinear == domain->type || CDomain::type_attr::curvilinear == domain->type ||
+        this->isRectilinear(fieldId) || this->isCurvilinear(fieldId))
+    {
+      if (!domain->nj_glo.isEmpty() && (domain->nj_glo != itMapNj->second))
+      {
+        ERROR("void CNc4DataInput::readDomainAttributesFromFile(...)",
+          << "The domain " << domain->getDomainOutputName()
+          << " has nj_glo read from file " << this->filename << " and nj_glo provided from model"
+          << " are not coherent. They should be the same." << std::endl 
+          << " nj_glo read from file: "<< itMapNj->second
+          << " nj_glo from model: "<< domain->nj_glo << std::endl);
+      } 
+      domain->nj_glo.setValue(itMapNj->second);
+
+      if (!domain->ni_glo.isEmpty() && (domain->ni_glo != itMapNi->second))
+      {
+        ERROR("void CNc4DataInput::readDomainAttributesFromFile(...)",
+          << "The domain " << domain->getDomainOutputName()
+          << " has ni_glo read from file " << this->filename << " and ni_glo provided from model"
+          << " are not coherent. They should be the same." << std::endl 
+          << " ni_glo read from file: "<< itMapNi->second
+          << " ni_glo from model: "<< domain->ni_glo << std::endl);
+      } 
+      domain->ni_glo.setValue(itMapNi->second);
+    }
+    else if (CDomain::type_attr::unstructured == domain->type|| this->isUnstructured(fieldId))
+    {
+      domain->nj_glo.setValue(1);
+
+      if (!domain->ni_glo.isEmpty() && (domain->ni_glo != itMapNi->second))
+      {
+        ERROR("void CNc4DataInput::readDomainAttributesFromFile(...)",
+          << "The domain " << domain->getDomainOutputName()
+          << " has ni_glo read from file " << this->filename << " and ni_glo provided from model"
+          << " are not coherent. They should be the same." << std::endl 
+          << " ni_glo read from file: "<< itMapNi->second
+          << " ni_glo from model: "<< domain->ni_glo << std::endl);
+      }       
+      domain->ni_glo.setValue(itMapNi->second);
+    }
+
+// determine if coordinates values are present in file
+    if ((CDomain::type_attr::rectilinear == domain->type))
+    {
+      // Ok, try to read some attributes such as longitude and latitude
+      domain->hasLatInReadFile_ = SuperClassWriter::hasVariable(itMapNj->first);
+      domain->hasLonInReadFile_  = SuperClassWriter::hasVariable(itMapNi->first);
+    }
+    else if ((CDomain::type_attr::curvilinear == domain->type) || (CDomain::type_attr::unstructured == domain->type) )
+    {
+      StdString latName = this->getLatCoordName(fieldId);
+      domain->hasLatInReadFile_ = SuperClassWriter::hasVariable(latName) ;
+      StdString lonName = this->getLonCoordName(fieldId);        
+      domain->hasLonInReadFile_ = SuperClassWriter::hasVariable(lonName) ; 
+      StdString boundsLatName = this->getBoundsId(latName);
+      domain->hasBoundsLatInReadFile_ = SuperClassWriter::hasVariable(boundsLatName) ; 
+      StdString boundsLonName = this->getBoundsId(lonName);
+      domain->hasBoundsLonInReadFile_ = SuperClassWriter::hasVariable(boundsLonName) ;
+    }
+  }
+  CATCH
+
+  /*!
+    Read attributes of an axis from a file
+    \param [in] axis axis whose attributes are read from the file
+    \param [in] dimSizeMap Dimensions and and their corresponding names and size read from file
+    \param [in] emelentPosition position of axis in grid
+    \param [in] fieldId id (or name) associated with the grid
+  */
+  void CNc4DataInput::readAxisAttributesFromFile(CAxis* axis, std::list<std::pair<StdString, StdSize> >& dimSizeMap,
+                                                 int elementPosition, const StdString& fieldId)
+  TRY
+  {
+    std::list<std::pair<StdString, StdSize> >::const_iterator itMapN = dimSizeMap.begin(),
+                                                              iteMap = dimSizeMap.end();
+    for (int i = 0; i < elementPosition; ++i, ++itMapN) {}
+
+    if (!axis->n_glo.isEmpty() && (axis->n_glo != itMapN->second))
+    {
+      ERROR("void CNc4DataInput::readAxisAttributesFromFile(...)",
+        << "The axis " << axis->getAxisOutputName()
+        << " has n_glo read from file " << this->filename << " and n_glo provided from model"
+        << " are not coherent. They should be the same." << std::endl 
+        << " n_glo read from file: "<< itMapN->second
+        << " n_glo from model: "<< axis->n_glo << std::endl);
+    }    
+    axis->n_glo.setValue(itMapN->second);
+  }
+  CATCH
+
+  /*!
+    Read attribute value of an axis from a file
+    \param [in] axis axis whose attributes are read from the file
+    \param [in] dimSizeMap Dimensions and and their corresponding names and size read from file
+    \param [in] emelentPosition position of axis in grid
+    \param [in] fieldId id (or name) associated with the grid
+  */
+  void CNc4DataInput::readAxisAttributeValueFromFile(CAxis* axis, std::list<std::pair<StdString, StdSize> >& dimSizeMap,
+                                                    int elementPosition, const StdString& fieldId)
+  TRY
+  {
+    std::list<std::pair<StdString, StdSize> >::const_iterator itMapN = dimSizeMap.begin(),
+                                                              iteMap = dimSizeMap.end();
+    for (int i = 0; i < elementPosition; ++i, ++itMapN) {}
+
+    { // Read axis value
+      bool hasValue = SuperClassWriter::hasVariable(itMapN->first);
+      if (hasValue)
+      {
+        std::vector<StdSize> nBegin(1, 0), nSize(1, itMapN->second);
+        CArray<double,1> readAxisValue(itMapN->second);
+        readFieldVariableValue(readAxisValue, itMapN->first, nBegin, nSize, true);
+        int begin = 0, n = itMapN->second;
+        if (!axis->begin.isEmpty()) begin = axis->begin.getValue();
+        if (!axis->n.isEmpty()) n = axis->n.getValue();
+        axis->value.resize(n);
+        for (int i = 0; i < n; ++i) axis->value(i) = readAxisValue(begin + i);
+      }
+    }
+  }
+  CATCH
+
+  /*!
+    Read attributes of a scalar from a file
+    \param [in] scalar scalar whose attributes are read from the file
+    \param [in] dimSizeMap Dimensions and and their corresponding names and size read from file
+    \param [in] emelentPosition position of scalar in grid
+    \param [in] fieldId id (or name) associated with the grid
+  */
+  void CNc4DataInput::readScalarAttributesFromFile(CScalar* scalar, std::list<std::pair<StdString, StdSize> >& dimSizeMap,
+                                                  int elementPosition, const StdString& fieldId)
+  {
+    /*Nothing to do */
+  }
+
+  /*!
+    Read attribute value of an axis from a file
+    \param [in] axis axis whose attributes are read from the file
+    \param [in] dimSizeMap Dimensions and and their corresponding names and size read from file
+    \param [in] emelentPosition position of axis in grid
+    \param [in] fieldId id (or name) associated with the grid
+  */
+  void CNc4DataInput::readScalarAttributeValueFromFile(CScalar* scalar, std::list<std::pair<StdString, StdSize> >& dimSizeMap,
+                                                      int elementPosition, const StdString& fieldId)
+  {
+    /*Nothing to do */
+  }
+
+  void CNc4DataInput::closeFile_(void)
+  TRY
+  {
+    SuperClassWriter::close();
+  }
+  CATCH
+} // namespace xios
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/io/nc4_data_input.hpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/io/nc4_data_input.hpp	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/io/nc4_data_input.hpp	(revision 1749)
@@ -0,0 +1,103 @@
+#ifndef __XIOS_NC4_DATA_INPUT__
+#define __XIOS_NC4_DATA_INPUT__
+
+/// XIOS headers ///
+#include "xios_spl.hpp"
+#include "data_input.hpp"
+#include "inetcdf4.hpp"
+
+namespace xios
+{
+  class CDomain;
+  class CAxis;
+  class CScalar;
+
+  class CNc4DataInput
+    : protected CINetCDF4
+    , public virtual CDataInput
+  {
+  public:
+    /// Type definitions ///
+    typedef CINetCDF4  SuperClassWriter;
+    typedef CDataInput SuperClass;
+
+    /// Constructors ///
+    CNc4DataInput(const StdString& filename, MPI_Comm comm_file, bool multifile, bool isCollective = true,
+                  bool readMetaDataPar = false, bool ugridConvention = false, const StdString& timeCounterName = "time_counter");
+    CNc4DataInput(const CNc4DataInput& dataInput);       // Not implemented.
+    CNc4DataInput(const CNc4DataInput* const dataInput); // Not implemented.
+
+    /// Destructor ///
+    virtual ~CNc4DataInput(void);
+
+    /// Getters ///
+    const StdString& getFileName(void) const;
+
+  protected:
+    // Read methods
+    virtual StdSize getFieldNbRecords_(CField* field);
+    virtual void readFieldData_(CField* field);
+    virtual void readFieldAttributes_(CField* field, bool readAttributeValues);
+    virtual void closeFile_(void);
+
+  private:
+    void readDomainAttributesFromFile(CDomain* domain, std::list<std::pair<StdString, StdSize> >& dimSizeMap,
+                                      int elementPosition, const StdString& fieldId);
+    void readDomainAttributeValueFromFile(CDomain* domain, std::list<std::pair<StdString, StdSize> >& dimSizeMap,
+                                          int elementPosition, const StdString& fieldId);
+
+    void readAxisAttributesFromFile(CAxis* axis, std::list<std::pair<StdString, StdSize> >& dimSizeMap,
+                                    int elementPosition, const StdString& fieldId);
+    void readAxisAttributeValueFromFile(CAxis* axis, std::list<std::pair<StdString, StdSize> >& dimSizeMap,
+                                        int elementPosition, const StdString& fieldId);
+
+    void readScalarAttributesFromFile(CScalar* scalar, std::list<std::pair<StdString, StdSize> >& dimSizeMap,
+                                      int elementPosition, const StdString& fieldId);
+    void readScalarAttributeValueFromFile(CScalar* scalar, std::list<std::pair<StdString, StdSize> >& dimSizeMap,
+                                          int elementPosition, const StdString& fieldId);
+
+    template <typename T, int Ndim>
+    void readFieldVariableValue(CArray<T, Ndim>& var, const StdString& varId,
+                                const std::vector<StdSize>& nBegin,
+                                const std::vector<StdSize>& nSize,
+                                bool forceIndependent = false);
+
+  private:
+    std::set<StdString> readMetaDataDomains_, readValueDomains_;
+    std::set<StdString> readMetaDataAxis_, readValueAxis_;
+    std::set<StdString> readMetaDataScalar_, readValueScalar_;
+
+  private:
+    /// Private attributes ///
+    MPI_Comm comm_file;
+    const StdString filename;
+    bool isCollective;
+    bool ugridConvention;
+  }; // class CNc4DataInput
+
+template <typename T, int Ndim>
+void CNc4DataInput::readFieldVariableValue(CArray<T,Ndim>& var, const StdString& varId,
+                                           const std::vector<StdSize>& nBegin,
+                                           const std::vector<StdSize>& nSize,
+                                           bool forceIndependent)
+{
+  if (SuperClass::type==MULTI_FILE || !isCollective) return;
+
+  bool openCollective = isCollective;
+  if (forceIndependent) openCollective = !isCollective;
+  switch (SuperClass::type)
+  {
+    case MULTI_FILE:
+      ERROR("CINetCDF4::readFieldVariableValue(...)",
+            << "Only support attributes reading with one_file mode");
+      break;
+    case ONE_FILE:
+    {
+      SuperClassWriter::getData(var, varId, openCollective, 0, &nBegin, &nSize);
+      break;
+    }
+  }
+}
+} // namespace xios
+
+#endif //__XIOS_NC4_DATA_INPUT__
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/io/nc4_data_output.cpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/io/nc4_data_output.cpp	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/io/nc4_data_output.cpp	(revision 1749)
@@ -0,0 +1,3200 @@
+#include "nc4_data_output.hpp"
+
+#include "attribute_template.hpp"
+#include "group_template.hpp"
+
+#include "file.hpp"
+#include "calendar.hpp"
+#include "context.hpp"
+#include "context_server.hpp"
+#include "netCdfException.hpp"
+#include "exception.hpp"
+#include "timer.hpp"
+#include "uuid.hpp"
+namespace xios
+{
+      /// ////////////////////// Dfinitions ////////////////////// ///
+      CNc4DataOutput::CNc4DataOutput
+         (CFile* file, const StdString & filename, bool exist)
+            : SuperClass()
+            , SuperClassWriter(filename, exist)
+            , filename(filename)
+            , file(file),hasTimeInstant(false),hasTimeCentered(false), timeCounterType(none)
+      {
+        SuperClass::type = MULTI_FILE;
+        compressionLevel= file->compression_level.isEmpty() ? 0 :file->compression_level ;
+      }
+
+      CNc4DataOutput::CNc4DataOutput
+         (CFile* file, const StdString & filename, bool exist, bool useClassicFormat, bool useCFConvention,
+          MPI_Comm comm_file, bool multifile, bool isCollective, const StdString& timeCounterName)
+            : SuperClass()
+            , SuperClassWriter(filename, exist, useClassicFormat, useCFConvention, &comm_file, multifile, timeCounterName)
+            , comm_file(comm_file)
+            , filename(filename)
+            , isCollective(isCollective)
+            , file(file),hasTimeInstant(false),hasTimeCentered(false), timeCounterType(none)
+      {
+        SuperClass::type = (multifile) ? MULTI_FILE : ONE_FILE;
+        if (file==NULL) compressionLevel = 0 ;
+        else compressionLevel= file->compression_level.isEmpty() ? 0 :file->compression_level ;
+      }
+
+      CNc4DataOutput::~CNc4DataOutput(void)
+    { /* Ne rien faire de plus */ }
+
+      ///--------------------------------------------------------------
+
+      const StdString & CNc4DataOutput::getFileName(void) const
+      {
+         return (this->filename);
+      }
+
+      //---------------------------------------------------------------
+
+      void CNc4DataOutput::writeDomain_(CDomain* domain)
+      TRY
+      {
+        StdString lonName,latName ;
+         
+        domain->computeWrittenIndex();
+        domain->computeWrittenCompressedIndex(comm_file);
+
+        if (domain->type == CDomain::type_attr::unstructured)
+        {
+          if (SuperClassWriter::useCFConvention)
+            writeUnstructuredDomain(domain) ;
+          else
+            writeUnstructuredDomainUgrid(domain) ;
+          return ;
+        }
+
+         CContext* context = CContext::getCurrent() ;
+         CContextServer* server=context->server ;
+
+         if (domain->IsWritten(this->filename)) return;
+         domain->checkAttributes();
+
+         if (domain->isEmpty())
+           if (SuperClass::type==MULTI_FILE) return;
+
+         std::vector<StdString> dim0, dim1;
+         StdString domid = domain->getDomainOutputName();
+         StdString appendDomid  = (singleDomain) ? "" : "_"+domid ;
+         if (isWrittenDomain(domid)) return ;
+         else setWrittenDomain(domid);
+        
+         int nvertex = (domain->nvertex.isEmpty()) ? 0 : domain->nvertex;
+
+
+        StdString dimXid, dimYid ;
+
+        nc_type typePrec ;
+        if (domain->prec.isEmpty()) typePrec =  NC_FLOAT ;
+        else if (domain->prec==4)  typePrec =  NC_FLOAT ;
+        else if (domain->prec==8)   typePrec =  NC_DOUBLE ;
+         
+         bool isRegularDomain = (domain->type == CDomain::type_attr::rectilinear);
+         switch (domain->type)
+         {
+           case CDomain::type_attr::curvilinear :
+
+             if (domain->lon_name.isEmpty()) lonName = "nav_lon";
+             else lonName = domain->lon_name;
+
+             if (domain->lat_name.isEmpty()) latName = "nav_lat";
+             else latName = domain->lat_name;
+
+             if (domain->dim_i_name.isEmpty()) dimXid=StdString("x").append(appendDomid);
+             else dimXid=domain->dim_i_name.getValue() + appendDomid;
+
+             if (domain->dim_j_name.isEmpty()) dimYid=StdString("y").append(appendDomid);
+             else dimYid=domain->dim_j_name.getValue() + appendDomid;
+
+             break ;
+
+           case CDomain::type_attr::rectilinear :
+
+             if (domain->lon_name.isEmpty())
+             {
+               if (domain->dim_i_name.isEmpty())
+                   lonName = "lon";
+               else
+                 lonName = domain->dim_i_name.getValue();
+             }
+             else lonName = domain->lon_name;
+
+             if (domain->lat_name.isEmpty())
+             {
+               if (domain->dim_j_name.isEmpty())
+                 latName = "lat";
+               else
+                 latName = domain->dim_j_name.getValue();
+             }
+             else latName = domain->lat_name;
+             
+             if (domain->dim_i_name.isEmpty()) dimXid = lonName+appendDomid;
+             else dimXid = domain->dim_i_name.getValue()+appendDomid;
+
+             if (domain->dim_j_name.isEmpty()) dimYid = latName+appendDomid;
+             else dimYid = domain->dim_j_name.getValue()+appendDomid;
+             break;
+         }
+
+         StdString dimVertId = StdString("nvertex").append(appendDomid);
+
+         string lonid,latid,bounds_lonid,bounds_latid ;
+         string areaId = "area" + appendDomid;
+/*
+         StdString lonid_loc = (server->intraCommSize > 1)
+                             ? StdString("lon").append(appendDomid).append("_local")
+                             : lonid;
+         StdString latid_loc = (server->intraCommSize > 1)
+                             ? StdString("lat").append(appendDomid).append("_local")
+                             : latid;
+*/
+
+         CArray<int, 1>& indexToWrite = domain->localIndexToWriteOnServer;
+         int nbWritten = indexToWrite.numElements();
+         CArray<double,1> writtenLat, writtenLon;
+         CArray<double,2> writtenBndsLat, writtenBndsLon;
+         CArray<double,1> writtenArea;
+
+         if (domain->hasLonLat)
+         {
+           writtenLat.resize(nbWritten);
+           writtenLon.resize(nbWritten);
+           for (int idx = 0; idx < nbWritten; ++idx)
+           {
+             if (indexToWrite(idx) < 0)
+             {
+               writtenLat(idx) = -1.;   // hole
+               writtenLon(idx) = -1.;
+             }
+             else
+             {
+               writtenLat(idx) = domain->latvalue(indexToWrite(idx));
+               writtenLon(idx) = domain->lonvalue(indexToWrite(idx));
+             }
+           }
+
+           if (domain->hasBounds)
+           {         
+             int nvertex = domain->nvertex, idx;
+             writtenBndsLat.resize(nvertex, nbWritten);
+             writtenBndsLon.resize(nvertex, nbWritten);
+             CArray<double,2>& boundslat = domain->bounds_latvalue;
+             CArray<double,2>& boundslon = domain->bounds_lonvalue;   
+             for (idx = 0; idx < nbWritten; ++idx)
+               for (int nv = 0; nv < nvertex; ++nv)
+               {
+                 if (indexToWrite(idx) < 0)
+                 {
+                   writtenBndsLat(nv, idx) = -1.;  // hole
+                   writtenBndsLon(nv, idx) = -1.;
+                 }
+                 else
+                 {
+                   writtenBndsLat(nv, idx) = boundslat(nv, int(indexToWrite(idx)));
+                   writtenBndsLon(nv, idx) = boundslon(nv, int(indexToWrite(idx)));
+                 }
+               }
+           }
+         }
+
+         if (domain->hasArea)
+         {
+           writtenArea.resize(nbWritten);           
+           for (int idx = 0; idx < nbWritten; ++idx)
+           {
+        	  if (indexToWrite(idx) < 0)
+              writtenArea(idx) = -1.;
+        	  else
+              writtenArea(idx) = domain->areavalue(indexToWrite(idx));
+           }
+         }
+
+         try
+         {
+           switch (SuperClass::type)
+           {
+              case (MULTI_FILE) :
+              {
+                 switch (domain->type)
+                 {
+                   case CDomain::type_attr::curvilinear :
+                     dim0.push_back(dimYid); dim0.push_back(dimXid);
+                     lonid = lonName+appendDomid;
+                     latid = latName+appendDomid;
+                     break ;
+                   case CDomain::type_attr::rectilinear :
+                     lonid = lonName+appendDomid;
+                     latid = latName+appendDomid;
+                     dim0.push_back(dimYid);
+                     dim1.push_back(dimXid);
+                     break;
+                 }
+                 if (!domain->bounds_lon_name.isEmpty()) bounds_lonid = domain->bounds_lon_name;
+                 else bounds_lonid = "bounds_"+lonName+appendDomid;
+                 if (!domain->bounds_lat_name.isEmpty()) bounds_latid = domain->bounds_lat_name;
+                 else bounds_latid = "bounds_"+latName+appendDomid;
+
+                 SuperClassWriter::addDimension(dimXid, domain->ni);
+                 SuperClassWriter::addDimension(dimYid, domain->nj);
+
+                 if (domain->hasBounds)
+                   SuperClassWriter::addDimension(dimVertId, domain->nvertex);
+
+                 if (server->intraCommSize > 1)
+                 {
+                   this->writeLocalAttributes(domain->ibegin,
+                                              domain->ni,
+                                              domain->jbegin,
+                                              domain->nj,
+                                              appendDomid);
+
+                   if (singleDomain)
+                    this->writeLocalAttributes_IOIPSL(dimXid, dimYid,
+                                                      domain->ibegin,
+                                                      domain->ni,
+                                                      domain->jbegin,
+                                                      domain->nj,
+                                                      domain->ni_glo,domain->nj_glo,
+                                                      server->intraCommRank,server->intraCommSize);
+                 }
+
+                 if (domain->hasLonLat)
+                 {
+                   switch (domain->type)
+                   {
+                     case CDomain::type_attr::curvilinear :
+                       SuperClassWriter::addVariable(latid, typePrec, dim0, compressionLevel);
+                       SuperClassWriter::addVariable(lonid, typePrec, dim0, compressionLevel);
+                       break ;
+                      case CDomain::type_attr::rectilinear :
+                        SuperClassWriter::addVariable(latid, typePrec, dim0, compressionLevel);
+                        SuperClassWriter::addVariable(lonid, typePrec, dim1, compressionLevel);
+                        break ;
+                   }
+
+                   this->writeAxisAttributes(lonid, isRegularDomain ? "X" : "", "longitude", "Longitude", "degrees_east", domid);
+                   this->writeAxisAttributes(latid, isRegularDomain ? "Y" : "", "latitude", "Latitude", "degrees_north", domid);
+
+                   if (domain->hasBounds)
+                   {
+                     SuperClassWriter::addAttribute("bounds", bounds_lonid, &lonid);
+                     SuperClassWriter::addAttribute("bounds", bounds_latid, &latid);
+
+                     dim0.clear();
+                     dim0.push_back(dimYid);
+                     dim0.push_back(dimXid);
+                     dim0.push_back(dimVertId);
+                     SuperClassWriter::addVariable(bounds_lonid, typePrec, dim0, compressionLevel);
+                     SuperClassWriter::addVariable(bounds_latid, typePrec, dim0, compressionLevel);
+                   }
+                 }
+
+                 dim0.clear();
+                 dim0.push_back(dimYid);
+                 dim0.push_back(dimXid);
+
+
+  // supress mask               if (server->intraCommSize > 1)
+  // supress mask               {
+  // supress mask                  SuperClassWriter::addVariable(maskid, NC_INT, dim0);
+  // supress mask
+  // supress mask                  this->writeMaskAttributes(maskid,
+  // supress mask                     domain->data_dim.getValue()/*,
+  // supress mask                     domain->data_ni.getValue(),
+  // supress mask                     domain->data_nj.getValue(),
+  // supress mask                     domain->data_ibegin.getValue(),
+  // supress mask                     domain->data_jbegin.getValue()*/);
+  // supress mask               }
+
+                 //SuperClassWriter::setDefaultValue(maskid, &dvm);
+
+                 if (domain->hasArea)
+                 {
+                   SuperClassWriter::addVariable(areaId, typePrec, dim0, compressionLevel);
+                   SuperClassWriter::addAttribute("standard_name", StdString("cell_area"), &areaId);
+                   SuperClassWriter::addAttribute("units", StdString("m2"), &areaId);
+                 }
+
+                 SuperClassWriter::definition_end();
+
+                 if (domain->hasLonLat)
+                 {
+                   switch (domain->type)
+                   {
+                     case CDomain::type_attr::curvilinear :                       
+                       SuperClassWriter::writeData(writtenLat, latid, isCollective, 0);
+                       SuperClassWriter::writeData(writtenLon, lonid, isCollective, 0);
+                       break;
+                     case CDomain::type_attr::rectilinear :
+                       CArray<double,1> lat = writtenLat(Range(fromStart,toEnd,domain->ni)) ;
+                       SuperClassWriter::writeData(CArray<double,1>(lat.copy()), latid, isCollective, 0);
+                       CArray<double,1> lon = writtenLon(Range(0,domain->ni-1)) ;
+                       SuperClassWriter::writeData(CArray<double,1>(lon.copy()), lonid, isCollective, 0);
+                       break;
+                   }
+
+                   if (domain->hasBounds)
+                   {
+                     SuperClassWriter::writeData(writtenBndsLon, bounds_lonid, isCollective, 0);
+                     SuperClassWriter::writeData(writtenBndsLat, bounds_latid, isCollective, 0);
+                   }
+                 }
+
+                 if (domain->hasArea)
+                 {
+                   SuperClassWriter::writeData(writtenArea, areaId, isCollective, 0);                   
+                 }
+
+                 SuperClassWriter::definition_start();
+
+                 break;
+              }
+              case (ONE_FILE) :
+              {
+                SuperClassWriter::addDimension(dimXid, domain->ni_glo);
+                SuperClassWriter::addDimension(dimYid, domain->nj_glo);
+
+                 if (domain->hasBounds)
+                   SuperClassWriter::addDimension(dimVertId, domain->nvertex);
+
+                 if (domain->hasLonLat)
+                 {
+                   switch (domain->type)
+                   {
+                     case CDomain::type_attr::curvilinear :
+                       dim0.push_back(dimYid); dim0.push_back(dimXid);
+                       lonid = lonName+appendDomid;
+                       latid = latName+appendDomid;
+                       SuperClassWriter::addVariable(latid, typePrec, dim0, compressionLevel);
+                       SuperClassWriter::addVariable(lonid, typePrec, dim0, compressionLevel);
+                       break;
+
+                     case CDomain::type_attr::rectilinear :
+                       dim0.push_back(dimYid);
+                       dim1.push_back(dimXid);
+                       lonid = lonName+appendDomid;
+                       latid = latName+appendDomid;
+                       SuperClassWriter::addVariable(latid, typePrec, dim0, compressionLevel);
+                       SuperClassWriter::addVariable(lonid, typePrec, dim1, compressionLevel);
+                       break;
+                   }
+                   if (!domain->bounds_lon_name.isEmpty()) bounds_lonid = domain->bounds_lon_name;
+                   else bounds_lonid = "bounds_"+lonName+appendDomid;
+                   if (!domain->bounds_lat_name.isEmpty()) bounds_latid = domain->bounds_lat_name;
+                   else bounds_latid = "bounds_"+latName+appendDomid;
+
+                   this->writeAxisAttributes
+                      (lonid, isRegularDomain ? "X" : "", "longitude", "Longitude", "degrees_east", domid);
+                   this->writeAxisAttributes
+                      (latid, isRegularDomain ? "Y" : "", "latitude", "Latitude", "degrees_north", domid);
+
+                   if (domain->hasBounds)
+                   {
+                     SuperClassWriter::addAttribute("bounds", bounds_lonid, &lonid);
+                     SuperClassWriter::addAttribute("bounds", bounds_latid, &latid);
+
+                     dim0.clear();
+                     dim0.push_back(dimYid);
+                     dim0.push_back(dimXid);
+                     dim0.push_back(dimVertId);
+                     SuperClassWriter::addVariable(bounds_lonid, typePrec, dim0, compressionLevel);
+                     SuperClassWriter::addVariable(bounds_latid, typePrec, dim0, compressionLevel);
+                   }
+                 }
+
+                 if (domain->hasArea)
+                 {
+                   dim0.clear();
+                   dim0.push_back(dimYid); dim0.push_back(dimXid);
+                   SuperClassWriter::addVariable(areaId, typePrec, dim0, compressionLevel);
+                   SuperClassWriter::addAttribute("standard_name", StdString("cell_area"), &areaId);
+                   SuperClassWriter::addAttribute("units", StdString("m2"), &areaId);
+                   dim0.clear();
+                 }
+
+                 SuperClassWriter::definition_end();
+
+                 switch (domain->type)
+                 {
+                   case CDomain::type_attr::curvilinear :
+                   {
+                     std::vector<StdSize> start(2) ;
+                     std::vector<StdSize> count(2) ;
+// Comment out: it is not working for a hole
+//                     if (domain->isEmpty())
+//                     {
+//                       start[0]=0 ; start[1]=0 ;
+//                       count[0]=0 ; count[1]=0 ;
+//                     }
+//                     else
+                     {
+                       start[1]=domain->ibegin;
+                       start[0]=domain->jbegin;
+                       count[1]=domain->ni ; count[0]=domain->nj ;
+                     }
+
+                     if (domain->hasLonLat)
+                     {
+                       SuperClassWriter::writeData(writtenLat, latid, isCollective, 0,&start,&count);
+                       SuperClassWriter::writeData(writtenLon, lonid, isCollective, 0,&start,&count);
+                     }
+                     break;
+                   }
+                   case CDomain::type_attr::rectilinear :
+                   {
+                     if (domain->hasLonLat)
+                     {
+                       std::vector<StdSize> start(1) ;
+                       std::vector<StdSize> count(1) ;
+                       if (domain->isEmpty())
+                       {
+                         start[0]=0 ;
+                         count[0]=0 ;
+                         SuperClassWriter::writeData(writtenLat, latid, isCollective, 0,&start,&count);
+                         SuperClassWriter::writeData(writtenLon, lonid, isCollective, 0,&start,&count);
+                       }
+                       else
+                       { 
+                         start[0]=domain->jbegin;
+                         count[0]=domain->nj;
+                         CArray<double,1> lat = writtenLat(Range(fromStart,toEnd,domain->ni));
+                         SuperClassWriter::writeData(CArray<double,1>(lat.copy()), latid, isCollective, 0,&start,&count);
+
+                         start[0]=domain->ibegin;
+                         count[0]=domain->ni;
+                         CArray<double,1> lon = writtenLon(Range(0,domain->ni-1));
+                         SuperClassWriter::writeData(CArray<double,1>(lon.copy()), lonid, isCollective, 0,&start,&count);
+                       }
+                     }
+                     break;
+                   }
+                 }
+
+                 if (domain->hasBounds)
+                 {
+                   std::vector<StdSize> start(3);
+                   std::vector<StdSize> count(3);
+                   if (domain->isEmpty())
+                   {
+                     start[2] = start[1] = start[0] = 0;
+                     count[2] = count[1] = count[0] = 0;
+                   }
+                   else
+                   {
+                     start[2] = 0;
+                     start[1] = domain->ibegin;
+                     start[0] = domain->jbegin;
+                     count[2] = domain->nvertex;
+                     count[1] = domain->ni;
+                     count[0] = domain->nj;
+                   }
+                 
+                   SuperClassWriter::writeData(writtenBndsLon, bounds_lonid, isCollective, 0, &start, &count);
+                   SuperClassWriter::writeData(writtenBndsLat, bounds_latid, isCollective, 0, &start, &count);
+                 }
+
+                 if (domain->hasArea)
+                 {
+                   std::vector<StdSize> start(2);
+                   std::vector<StdSize> count(2);
+
+                   if (domain->isEmpty())
+                   {
+                     start[0] = 0; start[1] = 0;
+                     count[0] = 0; count[1] = 0;
+                   }
+                   else
+                   {
+                     start[1] = domain->ibegin;
+                     start[0] = domain->jbegin;
+                     count[1] = domain->ni;
+                     count[0] = domain->nj;
+                   }
+                   
+                   SuperClassWriter::writeData(writtenArea, areaId, isCollective, 0, &start, &count);
+                 }
+
+                 SuperClassWriter::definition_start();
+                 break;
+              }
+              default :
+                 ERROR("CNc4DataOutput::writeDomain(domain)",
+                       << "[ type = " << SuperClass::type << "]"
+                       << " not implemented yet !");
+           }
+         }
+         catch (CNetCdfException& e)
+         {
+           StdString msg("On writing the domain : ");
+           msg.append(domid); msg.append("\n");
+           msg.append("In the context : ");
+           msg.append(context->getId()); msg.append("\n");
+           msg.append(e.what());
+           ERROR("CNc4DataOutput::writeDomain_(CDomain* domain)", << msg);
+         }
+
+         domain->addRelFile(this->filename);
+      }
+      CATCH
+
+    //--------------------------------------------------------------
+
+    void CNc4DataOutput::writeUnstructuredDomainUgrid(CDomain* domain)
+    {
+      CContext* context = CContext::getCurrent() ;
+      CContextServer* server=context->server ;
+
+      if (domain->IsWritten(this->filename)) return;
+
+      StdString domid = domain->getDomainOutputName();
+
+      // The first domain for the same mesh that will be written is that with the highest value of nvertex.
+      // Thus the entire mesh connectivity will be generated at once.
+      if (isWrittenDomain(domid)) return ;
+      else setWrittenDomain(domid);
+
+      domain->checkAttributes();
+      if (domain->isEmpty())
+        if (SuperClass::type==MULTI_FILE) return ;
+
+     nc_type typePrec ;
+     if (domain->prec.isEmpty()) typePrec =  NC_FLOAT ;
+     else if (domain->prec==4)  typePrec =  NC_FLOAT ;
+     else if (domain->prec==8)   typePrec =  NC_DOUBLE ;
+
+      std::vector<StdString> dim0;
+      StdString domainName = domain->name;
+      domain->assignMesh(domainName, domain->nvertex);
+      domain->mesh->createMeshEpsilon(server->intraComm, domain->lonvalue, domain->latvalue, domain->bounds_lonvalue, domain->bounds_latvalue);
+
+      StdString node_x = domainName + "_node_x";
+      StdString node_y = domainName + "_node_y";
+
+      StdString edge_x = domainName + "_edge_x";
+      StdString edge_y = domainName + "_edge_y";
+      StdString edge_nodes = domainName + "_edge_nodes";
+
+      StdString face_x = domainName + "_face_x";
+      StdString face_y = domainName + "_face_y";
+      StdString face_nodes = domainName + "_face_nodes";
+      StdString face_edges = domainName + "_face_edges";
+      StdString edge_faces = domainName + "_edge_face_links";
+      StdString face_faces = domainName + "_face_links";
+
+      StdString dimNode = "n" + domainName + "_node";
+      StdString dimEdge = "n" + domainName + "_edge";
+      StdString dimFace = "n" + domainName + "_face";
+      StdString dimVertex = "n" + domainName + "_vertex";
+      StdString dimTwo = "Two";
+
+      if (!SuperClassWriter::dimExist(dimTwo)) SuperClassWriter::addDimension(dimTwo, 2);
+      dim0.clear();
+      SuperClassWriter::addVariable(domainName, NC_INT, dim0, compressionLevel);
+      SuperClassWriter::addAttribute("cf_role", StdString("mesh_topology"), &domainName);
+      SuperClassWriter::addAttribute("long_name", StdString("Topology data of 2D unstructured mesh"), &domainName);
+      SuperClassWriter::addAttribute("topology_dimension", 2, &domainName);
+      SuperClassWriter::addAttribute("node_coordinates", node_x + " " + node_y, &domainName);
+
+      try
+      {
+        switch (SuperClass::type)
+        {
+          case (ONE_FILE) :
+          {
+            // Adding nodes
+            if (domain->nvertex == 1)
+            {
+              if (!SuperClassWriter::varExist(node_x) || !SuperClassWriter::varExist(node_y))
+              {
+                SuperClassWriter::addDimension(dimNode, domain->ni_glo);
+                dim0.clear();
+                dim0.push_back(dimNode);
+                SuperClassWriter::addVariable(node_x, typePrec, dim0, compressionLevel);
+                SuperClassWriter::addAttribute("standard_name", StdString("longitude"), &node_x);
+                SuperClassWriter::addAttribute("long_name", StdString("Longitude of mesh nodes."), &node_x);
+                SuperClassWriter::addAttribute("units", StdString("degrees_east"), &node_x);
+                SuperClassWriter::addVariable(node_y, typePrec, dim0, compressionLevel);
+                SuperClassWriter::addAttribute("standard_name", StdString("latitude"), &node_y);
+                SuperClassWriter::addAttribute("long_name", StdString("Latitude of mesh nodes."), &node_y);
+                SuperClassWriter::addAttribute("units", StdString("degrees_north"), &node_y);
+              }
+            } // domain->nvertex == 1
+
+            // Adding edges and nodes, if nodes have not been defined previously
+            if (domain->nvertex == 2)
+            {
+              if (!SuperClassWriter::varExist(node_x) || !SuperClassWriter::varExist(node_y))
+              {
+                SuperClassWriter::addDimension(dimNode, domain->mesh->nbNodesGlo);
+                dim0.clear();
+                dim0.push_back(dimNode);
+                SuperClassWriter::addVariable(node_x, typePrec, dim0, compressionLevel);
+                SuperClassWriter::addAttribute("standard_name", StdString("longitude"), &node_x);
+                SuperClassWriter::addAttribute("long_name", StdString("Longitude of mesh nodes."), &node_x);
+                SuperClassWriter::addAttribute("units", StdString("degrees_east"), &node_x);
+                SuperClassWriter::addVariable(node_y, typePrec, dim0, compressionLevel);
+                SuperClassWriter::addAttribute("standard_name", StdString("latitude"), &node_y);
+                SuperClassWriter::addAttribute("long_name", StdString("Latitude of mesh nodes."), &node_y);
+                SuperClassWriter::addAttribute("units", StdString("degrees_north"), &node_y);
+              }
+              SuperClassWriter::addAttribute("edge_node_connectivity", edge_nodes, &domainName);
+              SuperClassWriter::addAttribute("edge_coordinates", edge_x + " " + edge_y, &domainName);
+              SuperClassWriter::addDimension(dimEdge, domain->ni_glo);
+              dim0.clear();
+              dim0.push_back(dimEdge);
+              SuperClassWriter::addVariable(edge_x, typePrec, dim0, compressionLevel);
+              SuperClassWriter::addAttribute("standard_name", StdString("longitude"), &edge_x);
+              SuperClassWriter::addAttribute("long_name", StdString("Characteristic longitude of mesh edges."), &edge_x);
+              SuperClassWriter::addAttribute("units", StdString("degrees_east"), &edge_x);
+              SuperClassWriter::addVariable(edge_y, typePrec, dim0, compressionLevel);
+              SuperClassWriter::addAttribute("standard_name", StdString("latitude"), &edge_y);
+              SuperClassWriter::addAttribute("long_name", StdString("Characteristic latitude of mesh edges."), &edge_y);
+              SuperClassWriter::addAttribute("units", StdString("degrees_north"), &edge_y);
+              dim0.clear();
+              dim0.push_back(dimEdge);
+              dim0.push_back(dimTwo);
+              SuperClassWriter::addVariable(edge_nodes, NC_INT, dim0, compressionLevel);
+              SuperClassWriter::addAttribute("cf_role", StdString("edge_node_connectivity"), &edge_nodes);
+              SuperClassWriter::addAttribute("long_name", StdString("Maps every edge/link to two nodes that it connects."), &edge_nodes);
+              SuperClassWriter::addAttribute("start_index", 0, &edge_nodes);
+            } // domain->nvertex == 2
+
+            // Adding faces, edges, and nodes, if edges and nodes have not been defined previously
+            if (domain->nvertex > 2)
+            {
+              // Nodes
+              if (!SuperClassWriter::varExist(node_x) || !SuperClassWriter::varExist(node_y))
+              {
+                SuperClassWriter::addDimension(dimNode, domain->mesh->nbNodesGlo);
+                dim0.clear();
+                dim0.push_back(dimNode);
+                SuperClassWriter::addVariable(node_x, typePrec, dim0, compressionLevel);
+                SuperClassWriter::addAttribute("standard_name", StdString("longitude"), &node_x);
+                SuperClassWriter::addAttribute("long_name", StdString("Longitude of mesh nodes."), &node_x);
+                SuperClassWriter::addAttribute("units", StdString("degrees_east"), &node_x);
+                SuperClassWriter::addVariable(node_y, typePrec, dim0, compressionLevel);
+                SuperClassWriter::addAttribute("standard_name", StdString("latitude"), &node_y);
+                SuperClassWriter::addAttribute("long_name", StdString("Latitude of mesh nodes."), &node_y);
+                SuperClassWriter::addAttribute("units", StdString("degrees_north"), &node_y);
+              }
+              if (!SuperClassWriter::varExist(edge_x) || !SuperClassWriter::varExist(edge_y))
+              {
+                SuperClassWriter::addAttribute("edge_coordinates", edge_x + " " + edge_y, &domainName);
+                SuperClassWriter::addAttribute("edge_node_connectivity", edge_nodes, &domainName);
+                SuperClassWriter::addDimension(dimEdge, domain->mesh->nbEdgesGlo);
+                dim0.clear();
+                dim0.push_back(dimEdge);
+                SuperClassWriter::addVariable(edge_x, typePrec, dim0, compressionLevel);
+                SuperClassWriter::addAttribute("standard_name", StdString("longitude"), &edge_x);
+                SuperClassWriter::addAttribute("long_name", StdString("Characteristic longitude of mesh edges."), &edge_x);
+                SuperClassWriter::addAttribute("units", StdString("degrees_east"), &edge_x);
+                SuperClassWriter::addVariable(edge_y, typePrec, dim0, compressionLevel);
+                SuperClassWriter::addAttribute("standard_name", StdString("latitude"), &edge_y);
+                SuperClassWriter::addAttribute("long_name", StdString("Characteristic latitude of mesh edges."), &edge_y);
+                SuperClassWriter::addAttribute("units", StdString("degrees_north"), &edge_y);
+                dim0.clear();
+                dim0.push_back(dimEdge);
+                dim0.push_back(dimTwo);
+                SuperClassWriter::addVariable(edge_nodes, NC_INT, dim0, compressionLevel);
+                SuperClassWriter::addAttribute("cf_role", StdString("edge_node_connectivity"), &edge_nodes);
+                SuperClassWriter::addAttribute("long_name", StdString("Maps every edge/link to two nodes that it connects."), &edge_nodes);
+                SuperClassWriter::addAttribute("start_index", 0, &edge_nodes);
+              }
+              SuperClassWriter::addAttribute("face_coordinates", face_x + " " + face_y, &domainName);
+              SuperClassWriter::addAttribute("face_node_connectivity", face_nodes, &domainName);
+              SuperClassWriter::addDimension(dimFace, domain->ni_glo);
+              SuperClassWriter::addDimension(dimVertex, domain->nvertex);
+              dim0.clear();
+              dim0.push_back(dimFace);
+              SuperClassWriter::addVariable(face_x, typePrec, dim0, compressionLevel);
+              SuperClassWriter::addAttribute("standard_name", StdString("longitude"), &face_x);
+              SuperClassWriter::addAttribute("long_name", StdString("Characteristic longitude of mesh faces."), &face_x);
+              SuperClassWriter::addAttribute("units", StdString("degrees_east"), &face_x);
+              SuperClassWriter::addVariable(face_y, typePrec, dim0, compressionLevel);
+              SuperClassWriter::addAttribute("standard_name", StdString("latitude"), &face_y);
+              SuperClassWriter::addAttribute("long_name", StdString("Characteristic latitude of mesh faces."), &face_y);
+              SuperClassWriter::addAttribute("units", StdString("degrees_north"), &face_y);
+              dim0.clear();
+              dim0.push_back(dimFace);
+              dim0.push_back(dimVertex);
+              SuperClassWriter::addVariable(face_nodes, NC_INT, dim0, compressionLevel);
+              SuperClassWriter::addAttribute("cf_role", StdString("face_node_connectivity"), &face_nodes);
+              SuperClassWriter::addAttribute("long_name", StdString("Maps every face to its corner nodes."), &face_nodes);
+              SuperClassWriter::addAttribute("start_index", 0, &face_nodes);
+              dim0.clear();
+              dim0.push_back(dimFace);
+              dim0.push_back(dimVertex);
+              SuperClassWriter::addVariable(face_edges, NC_INT, dim0, compressionLevel);
+              SuperClassWriter::addAttribute("cf_role", StdString("face_edge_connectivity"), &face_edges);
+              SuperClassWriter::addAttribute("long_name", StdString("Maps every face to its edges."), &face_edges);
+              SuperClassWriter::addAttribute("start_index", 0, &face_edges);
+              SuperClassWriter::addAttribute("_FillValue", 999999, &face_edges);
+              dim0.clear();
+              dim0.push_back(dimEdge);
+              dim0.push_back(dimTwo);
+              SuperClassWriter::addVariable(edge_faces, NC_INT, dim0, compressionLevel);
+              SuperClassWriter::addAttribute("cf_role", StdString("edge_face connectivity"), &edge_faces);
+              SuperClassWriter::addAttribute("long_name", StdString("neighbor faces for edges"), &edge_faces);
+              SuperClassWriter::addAttribute("start_index", 0, &edge_faces);
+              SuperClassWriter::addAttribute("_FillValue", -999, &edge_faces);
+              SuperClassWriter::addAttribute("comment", StdString("missing neighbor faces are indicated using _FillValue"), &edge_faces);
+              dim0.clear();
+              dim0.push_back(dimFace);
+              dim0.push_back(dimVertex);
+              SuperClassWriter::addVariable(face_faces, NC_INT, dim0, compressionLevel);
+              SuperClassWriter::addAttribute("cf_role", StdString("face_face connectivity"), &face_faces);
+              SuperClassWriter::addAttribute("long_name", StdString("Indicates which other faces neighbor each face"), &face_faces);
+              SuperClassWriter::addAttribute("start_index", 0, &face_faces);
+              SuperClassWriter::addAttribute("_FillValue", 999999, &face_faces);
+              SuperClassWriter::addAttribute("flag_values", -1, &face_faces);
+              SuperClassWriter::addAttribute("flag_meanings", StdString("out_of_mesh"), &face_faces);
+            } // domain->nvertex > 2
+
+            SuperClassWriter::definition_end();
+
+            std::vector<StdSize> startEdges(1) ;
+            std::vector<StdSize> countEdges(1) ;
+            std::vector<StdSize> startNodes(1) ;
+            std::vector<StdSize> countNodes(1) ;
+            std::vector<StdSize> startFaces(1) ;
+            std::vector<StdSize> countFaces(1) ;
+            std::vector<StdSize> startEdgeNodes(2) ;
+            std::vector<StdSize> countEdgeNodes(2) ;
+            std::vector<StdSize> startEdgeFaces(2) ;
+            std::vector<StdSize> countEdgeFaces(2) ;
+            std::vector<StdSize> startFaceConctv(2) ;
+            std::vector<StdSize> countFaceConctv(2) ;
+
+            if (domain->nvertex == 1)
+            {
+              if (domain->isEmpty())
+               {
+                 startNodes[0]=0 ;
+                 countNodes[0]=0 ;
+               }
+               else
+               {
+                 startNodes[0] = domain->ibegin;
+                 countNodes[0] = domain->ni ;
+               }
+
+              SuperClassWriter::writeData(domain->mesh->node_lat, node_y, isCollective, 0, &startNodes, &countNodes);
+              SuperClassWriter::writeData(domain->mesh->node_lon, node_x, isCollective, 0, &startNodes, &countNodes);
+            }
+            else if (domain->nvertex == 2)
+            {
+              if (domain->isEmpty())
+               {
+                startEdges[0]=0 ;
+                countEdges[0]=0 ;
+                startNodes[0]=0 ;
+                countNodes[0]=0 ;
+                startEdgeNodes[0]=0;
+                startEdgeNodes[1]=0;
+                countEdgeNodes[0]=0;
+                countEdgeNodes[1]=0;
+
+               }
+               else
+               {
+                 startEdges[0] = domain->ibegin;
+                 countEdges[0] = domain->ni;
+                 startNodes[0] = domain->mesh->node_start;
+                 countNodes[0] = domain->mesh->node_count;
+                 startEdgeNodes[0] = domain->ibegin;
+                 startEdgeNodes[1] = 0;
+                 countEdgeNodes[0] = domain->ni;
+                 countEdgeNodes[1] = 2;
+               }
+              SuperClassWriter::writeData(domain->mesh->node_lat, node_y, isCollective, 0, &startNodes, &countNodes);
+              SuperClassWriter::writeData(domain->mesh->node_lon, node_x, isCollective, 0, &startNodes, &countNodes);
+              SuperClassWriter::writeData(domain->mesh->edge_lat, edge_y, isCollective, 0, &startEdges, &countEdges);
+              SuperClassWriter::writeData(domain->mesh->edge_lon, edge_x, isCollective, 0, &startEdges, &countEdges);
+              SuperClassWriter::writeData(domain->mesh->edge_nodes, edge_nodes, isCollective, 0, &startEdgeNodes, &countEdgeNodes);
+            }
+            else
+            {
+              if (domain->isEmpty())
+               {
+                 startFaces[0] = 0 ;
+                 countFaces[0] = 0 ;
+                 startNodes[0] = 0;
+                 countNodes[0] = 0;
+                 startEdges[0] = 0;
+                 countEdges[0] = 0;
+                 startEdgeFaces[0] = 0;
+                 startEdgeFaces[1] = 0;
+                 countEdgeFaces[0] = 0;
+                 countEdgeFaces[1] = 0;
+                 startFaceConctv[0] = 0;
+                 startFaceConctv[1] = 0;
+                 countFaceConctv[0] = 0;
+                 countFaceConctv[1] = 0;
+               }
+               else
+               {
+                 startFaces[0] = domain->ibegin;
+                 countFaces[0] = domain->ni ;
+                 startNodes[0] = domain->mesh->node_start;
+                 countNodes[0] = domain->mesh->node_count;
+                 startEdges[0] = domain->mesh->edge_start;
+                 countEdges[0] = domain->mesh->edge_count;
+                 startEdgeNodes[0] = domain->mesh->edge_start;
+                 startEdgeNodes[1] = 0;
+                 countEdgeNodes[0] = domain->mesh->edge_count;
+                 countEdgeNodes[1]= 2;
+                 startEdgeFaces[0] = domain->mesh->edge_start;
+                 startEdgeFaces[1]= 0;
+                 countEdgeFaces[0] = domain->mesh->edge_count;
+                 countEdgeFaces[1]= 2;
+                 startFaceConctv[0] = domain->ibegin;
+                 startFaceConctv[1] = 0;
+                 countFaceConctv[0] = domain->ni;
+                 countFaceConctv[1] = domain->nvertex;
+               }
+              SuperClassWriter::writeData(domain->mesh->node_lat, node_y, isCollective, 0, &startNodes, &countNodes);
+              SuperClassWriter::writeData(domain->mesh->node_lon, node_x, isCollective, 0, &startNodes, &countNodes);
+              SuperClassWriter::writeData(domain->mesh->edge_lat, edge_y, isCollective, 0, &startEdges, &countEdges);
+              SuperClassWriter::writeData(domain->mesh->edge_lon, edge_x, isCollective, 0, &startEdges, &countEdges);
+              SuperClassWriter::writeData(domain->mesh->edge_nodes, edge_nodes, isCollective, 0, &startEdgeNodes, &countEdgeNodes);
+              SuperClassWriter::writeData(domain->mesh->face_lat, face_y, isCollective, 0, &startFaces, &countFaces);
+              SuperClassWriter::writeData(domain->mesh->face_lon, face_x, isCollective, 0, &startFaces, &countFaces);
+              SuperClassWriter::writeData(domain->mesh->face_nodes, face_nodes, isCollective, 0, &startFaceConctv, &countFaceConctv);
+              SuperClassWriter::writeData(domain->mesh->face_edges, face_edges, isCollective, 0, &startFaceConctv, &countFaceConctv);
+              SuperClassWriter::writeData(domain->mesh->edge_faces, edge_faces, isCollective, 0, &startEdgeFaces, &countEdgeFaces);
+              SuperClassWriter::writeData(domain->mesh->face_faces, face_faces, isCollective, 0, &startFaceConctv, &countFaceConctv);
+            }
+            SuperClassWriter::definition_start();
+
+            break;
+          } // ONE_FILE
+
+          case (MULTI_FILE) :
+          {
+            ERROR("CNc4DataOutput::writeDomain(domain)",
+            << "[ type = multiple_file ]"
+            << " is not yet implemented for UGRID files !");
+            break;
+          }
+
+          default :
+          ERROR("CNc4DataOutput::writeDomain(domain)",
+          << "[ type = " << SuperClass::type << "]"
+          << " not implemented yet !");
+          } // switch
+        } // try
+
+        catch (CNetCdfException& e)
+        {
+          StdString msg("On writing the domain : ");
+          msg.append(domid); msg.append("\n");
+          msg.append("In the context : ");
+          msg.append(context->getId()); msg.append("\n");
+          msg.append(e.what());
+          ERROR("CNc4DataOutput::writeUnstructuredDomainUgrid(CDomain* domain)", << msg);
+        }
+
+  domain->addRelFile(this->filename);
+  }
+
+    //--------------------------------------------------------------
+
+    void CNc4DataOutput::writeUnstructuredDomain(CDomain* domain)
+      {
+         CContext* context = CContext::getCurrent() ;
+         CContextServer* server=context->server ;
+
+         if (domain->IsWritten(this->filename)) return;
+         domain->checkAttributes();
+
+         if (domain->isEmpty())
+           if (SuperClass::type==MULTI_FILE) return ;
+
+         std::vector<StdString> dim0, dim1;
+         StdString domid = domain->getDomainOutputName();
+         if (isWrittenDomain(domid)) return ;
+         else setWrittenDomain(domid);
+
+         StdString appendDomid  = (singleDomain) ? "" : "_"+domid ;
+
+         StdString lonName,latName, cellName ;
+         if (domain->lon_name.isEmpty()) lonName = "lon";
+         else lonName = domain->lon_name;
+
+         if (domain->lat_name.isEmpty()) latName = "lat";
+         else latName = domain->lat_name;
+
+         if (!domain->dim_i_name.isEmpty()) cellName=domain->dim_i_name;
+         else cellName="cell";
+         StdString dimXid = cellName+appendDomid;
+         StdString dimVertId = StdString("nvertex").append(appendDomid);
+
+         string lonid,latid,bounds_lonid,bounds_latid ;
+         string areaId = "area" + appendDomid;
+
+         nc_type typePrec ;
+         if (domain->prec.isEmpty()) typePrec =  NC_FLOAT ;
+         else if (domain->prec==4)  typePrec =  NC_FLOAT ;
+         else if (domain->prec==8)   typePrec =  NC_DOUBLE ;
+
+         int nvertex = (domain->nvertex.isEmpty()) ? 0 : domain->nvertex;
+
+         CArray<int, 1>& indexToWrite = domain->localIndexToWriteOnServer;
+         int nbWritten = indexToWrite.numElements();
+         CArray<double,1> writtenLat, writtenLon;
+         CArray<double,2> writtenBndsLat, writtenBndsLon;
+         CArray<double,1> writtenArea;
+
+         if (domain->hasLonLat)
+         {
+           writtenLat.resize(nbWritten);
+           writtenLon.resize(nbWritten);
+           for (int idx = 0; idx < nbWritten; ++idx)
+           {
+       	     if (indexToWrite(idx) < 0)
+       	     {
+               writtenLat(idx) = -1.;
+               writtenLon(idx) = -1.;
+       	     }
+       	     else
+       	     {
+       	       writtenLat(idx) = domain->latvalue(indexToWrite(idx));
+       	       writtenLon(idx) = domain->lonvalue(indexToWrite(idx));
+       	     }
+           }
+         }
+         
+         if (domain->hasBounds)
+         {
+           int nvertex = domain->nvertex, idx;
+           writtenBndsLat.resize(nvertex, nbWritten);
+           writtenBndsLon.resize(nvertex, nbWritten);
+           CArray<double,2>& boundslat = domain->bounds_latvalue;
+           CArray<double,2>& boundslon = domain->bounds_lonvalue;
+           for (idx = 0; idx < nbWritten; ++idx)
+           {
+             for (int nv = 0; nv < nvertex; ++nv)
+             {
+               if (indexToWrite(idx) < 0)
+               {
+                 writtenBndsLat(nv, idx) = -1.;
+                 writtenBndsLon(nv, idx) = -1.;
+               }
+               else
+               {
+                 writtenBndsLat(nv, idx) = boundslat(nv, int(indexToWrite(idx)));
+                 writtenBndsLon(nv, idx) = boundslon(nv, int(indexToWrite(idx)));
+                }
+             }
+           }
+         }
+
+         if (domain->hasArea)
+         {
+           writtenArea.resize(nbWritten);           
+           for (int idx = 0; idx < nbWritten; ++idx)
+           {
+             if (indexToWrite(idx) < 0)
+               writtenArea(idx) = -1.;
+             else
+               writtenArea(idx) = domain->areavalue(indexToWrite(idx));
+           }
+         }
+
+         try
+         {
+           switch (SuperClass::type)
+           {
+              case (MULTI_FILE) :
+              {
+                 dim0.push_back(dimXid);
+                 SuperClassWriter::addDimension(dimXid, domain->ni);
+
+                 lonid = lonName+appendDomid;
+                 latid = latName+appendDomid;
+                 if (!domain->bounds_lon_name.isEmpty()) bounds_lonid = domain->bounds_lon_name;
+                 else bounds_lonid = "bounds_"+lonName+appendDomid;
+                 if (!domain->bounds_lat_name.isEmpty()) bounds_latid = domain->bounds_lat_name;
+                 else bounds_latid = "bounds_"+latName+appendDomid;
+
+                 if (domain->hasLonLat)
+                 {
+                   SuperClassWriter::addVariable(latid, typePrec, dim0, compressionLevel);
+                   SuperClassWriter::addVariable(lonid, typePrec, dim0, compressionLevel);
+                   this->writeAxisAttributes(lonid, "", "longitude", "Longitude", "degrees_east", domid);
+                   if (domain->hasBounds) SuperClassWriter::addAttribute("bounds",bounds_lonid, &lonid);
+                   this->writeAxisAttributes(latid, "", "latitude", "Latitude", "degrees_north", domid);
+                   if (domain->hasBounds) SuperClassWriter::addAttribute("bounds",bounds_latid, &latid);
+                   if (domain->hasBounds) SuperClassWriter::addDimension(dimVertId, domain->nvertex);
+                 }
+                 dim0.clear();
+                 if (domain->hasBounds)
+                 {
+                   dim0.push_back(dimXid);
+                   dim0.push_back(dimVertId);
+                   SuperClassWriter::addVariable(bounds_lonid, typePrec, dim0, compressionLevel);
+                   SuperClassWriter::addVariable(bounds_latid, typePrec, dim0, compressionLevel);
+                 }
+
+                 dim0.clear();
+                 dim0.push_back(dimXid);
+                 if (domain->hasArea)
+                 {
+                   SuperClassWriter::addVariable(areaId, typePrec, dim0, compressionLevel);
+                   SuperClassWriter::addAttribute("standard_name", StdString("cell_area"), &areaId);
+                   SuperClassWriter::addAttribute("units", StdString("m2"), &areaId);
+                 }
+
+                 SuperClassWriter::definition_end();
+
+                 if (domain->hasLonLat)
+                 {
+                   SuperClassWriter::writeData(writtenLat, latid, isCollective, 0);
+                   SuperClassWriter::writeData(writtenLon, lonid, isCollective, 0);
+                   if (domain->hasBounds)
+                   {
+                     SuperClassWriter::writeData(writtenBndsLon, bounds_lonid, isCollective, 0);
+                     SuperClassWriter::writeData(writtenBndsLat, bounds_latid, isCollective, 0);
+                   }
+                 }
+
+                 if (domain->hasArea)
+                   SuperClassWriter::writeData(writtenArea, areaId, isCollective, 0);
+
+                 SuperClassWriter::definition_start();
+                 break ;
+              }
+
+              case (ONE_FILE) :
+              {
+                 lonid = lonName+appendDomid;
+                 latid = latName+appendDomid;
+                 if (!domain->bounds_lon_name.isEmpty()) bounds_lonid = domain->bounds_lon_name;
+                 else bounds_lonid = "bounds_"+lonName+appendDomid;
+                 if (!domain->bounds_lat_name.isEmpty()) bounds_latid = domain->bounds_lat_name;
+                 else bounds_latid = "bounds_"+latName+appendDomid;
+
+                 dim0.push_back(dimXid);
+                 SuperClassWriter::addDimension(dimXid, domain->ni_glo);
+                 if (domain->hasLonLat)
+                 {
+                   SuperClassWriter::addVariable(latid, typePrec, dim0, compressionLevel);
+                   SuperClassWriter::addVariable(lonid, typePrec, dim0, compressionLevel);
+
+                   this->writeAxisAttributes(lonid, "", "longitude", "Longitude", "degrees_east", domid);
+                   if (domain->hasBounds) SuperClassWriter::addAttribute("bounds",bounds_lonid, &lonid);
+                   this->writeAxisAttributes(latid, "", "latitude", "Latitude", "degrees_north", domid);
+                   if (domain->hasBounds) SuperClassWriter::addAttribute("bounds",bounds_latid, &latid);
+                   if (domain->hasBounds) SuperClassWriter::addDimension(dimVertId, nvertex);
+                 }
+                 dim0.clear();
+
+                 if (domain->hasBounds)
+                 {
+                   dim0.push_back(dimXid);
+                   dim0.push_back(dimVertId);
+                   SuperClassWriter::addVariable(bounds_lonid, typePrec, dim0, compressionLevel);
+                   SuperClassWriter::addVariable(bounds_latid, typePrec, dim0, compressionLevel);
+                 }
+
+                 if (domain->hasArea)
+                 {
+                   dim0.clear();
+                   dim0.push_back(dimXid);
+                   SuperClassWriter::addVariable(areaId, typePrec, dim0, compressionLevel);
+                   SuperClassWriter::addAttribute("standard_name", StdString("cell_area"), &areaId);
+                   SuperClassWriter::addAttribute("units", StdString("m2"), &areaId);
+                 }
+
+                 SuperClassWriter::definition_end();
+
+                 std::vector<StdSize> start(1), startBounds(2) ;
+                 std::vector<StdSize> count(1), countBounds(2) ;
+                 if (domain->isEmpty())
+                 {
+                   start[0]=0 ;
+                   count[0]=0 ;
+                   startBounds[1]=0 ;
+                   countBounds[1]=nvertex ;
+                   startBounds[0]=0 ;
+                   countBounds[0]=0 ;
+                 }
+                 else
+                 {
+                   start[0]=domain->ibegin;
+                   count[0]=domain->ni;
+                   startBounds[0]=domain->ibegin;
+                   startBounds[1]=0 ;
+                   countBounds[0]=domain->ni;
+                   countBounds[1]=nvertex ;
+                 }
+
+                 if (domain->hasLonLat)
+                 {
+                   SuperClassWriter::writeData(writtenLat, latid, isCollective, 0,&start,&count);
+                   SuperClassWriter::writeData(writtenLon, lonid, isCollective, 0,&start,&count);
+                   if (domain->hasBounds)
+                   {
+                     SuperClassWriter::writeData(writtenBndsLon, bounds_lonid, isCollective, 0,&startBounds,&countBounds);
+                     SuperClassWriter::writeData(writtenBndsLat, bounds_latid, isCollective, 0,&startBounds,&countBounds);
+                   }
+                 }
+
+                 if (domain->hasArea)
+                   SuperClassWriter::writeData(writtenArea, areaId, isCollective, 0, &start, &count);
+
+                 SuperClassWriter::definition_start();
+
+                 break;
+              }
+              default :
+                 ERROR("CNc4DataOutput::writeDomain(domain)",
+                       << "[ type = " << SuperClass::type << "]"
+                       << " not implemented yet !");
+           }
+         }
+         catch (CNetCdfException& e)
+         {
+           StdString msg("On writing the domain : ");
+           msg.append(domid); msg.append("\n");
+           msg.append("In the context : ");
+           msg.append(context->getId()); msg.append("\n");
+           msg.append(e.what());
+           ERROR("CNc4DataOutput::writeUnstructuredDomain(CDomain* domain)", << msg);
+         }
+         domain->addRelFile(this->filename);
+      }
+      //--------------------------------------------------------------
+
+      void CNc4DataOutput::writeAxis_(CAxis* axis)
+      {
+        if (axis->IsWritten(this->filename)) return;
+        axis->checkAttributes();
+
+        axis->computeWrittenIndex();
+        axis->computeWrittenCompressedIndex(comm_file);
+       
+        int size  = (MULTI_FILE == SuperClass::type) ? axis->n.getValue()
+                                                          : axis->n_glo.getValue();
+
+        if ((0 == axis->n) && (MULTI_FILE == SuperClass::type)) return;
+
+        std::vector<StdString> dims;
+        StdString axisid = axis->getAxisOutputName();
+        StdString axisDim, axisBoundsId;
+        if (isWrittenAxis(axisid)) return ;
+        else setWrittenAxis(axisid);
+
+        nc_type typePrec ;
+        if (axis->prec.isEmpty()) typePrec =  NC_FLOAT ;
+        else if (axis->prec==4)   typePrec =  NC_FLOAT ;
+        else if (axis->prec==8)   typePrec =  NC_DOUBLE ;
+         
+        if (!axis->label.isEmpty()) typePrec = NC_CHAR ;
+        string strId="str_len" ;
+        try
+        {
+          if (axis->dim_name.isEmpty()) axisDim = axisid;
+          else axisDim=axis->dim_name.getValue();
+          SuperClassWriter::addDimension(axisDim, size);
+          dims.push_back(axisDim);
+
+          if (!axis->label.isEmpty() && !SuperClassWriter::dimExist(strId)) SuperClassWriter::addDimension(strId, stringArrayLen);
+
+          if (axis->hasValue || !axis->label.isEmpty())
+          {
+            if (!axis->label.isEmpty()) dims.push_back(strId);
+
+            SuperClassWriter::addVariable(axisid, typePrec, dims, compressionLevel);
+
+            if (!axis->name.isEmpty())
+              SuperClassWriter::addAttribute("name", axis->name.getValue(), &axisid);
+
+            if (!axis->standard_name.isEmpty())
+              SuperClassWriter::addAttribute("standard_name", axis->standard_name.getValue(), &axisid);
+
+            if (!axis->long_name.isEmpty())
+              SuperClassWriter::addAttribute("long_name", axis->long_name.getValue(), &axisid);
+
+            if (!axis->unit.isEmpty())
+              SuperClassWriter::addAttribute("units", axis->unit.getValue(), &axisid);
+
+            if (!axis->axis_type.isEmpty())
+            {
+              switch(axis->axis_type)
+              {
+              case CAxis::axis_type_attr::X :
+                SuperClassWriter::addAttribute("axis", string("X"), &axisid);
+                break;
+              case CAxis::axis_type_attr::Y :
+                SuperClassWriter::addAttribute("axis", string("Y"), &axisid);
+                break;
+              case CAxis::axis_type_attr::Z :
+                SuperClassWriter::addAttribute("axis", string("Z"), &axisid);
+                break;
+              case CAxis::axis_type_attr::T :
+                SuperClassWriter::addAttribute("axis", string("T"), &axisid);
+                break;
+              }
+            }
+
+            if (!axis->positive.isEmpty())
+            {
+              SuperClassWriter::addAttribute("positive",
+                                             (axis->positive == CAxis::positive_attr::up) ? string("up") : string("down"),
+                                             &axisid);
+            }
+
+            if (!axis->formula.isEmpty())
+              SuperClassWriter::addAttribute("formula", axis->formula.getValue(), &axisid);
+
+            if (!axis->formula_term.isEmpty())
+              SuperClassWriter::addAttribute("formula_term", axis->formula_term.getValue(), &axisid);
+              
+            axisBoundsId = (axis->bounds_name.isEmpty()) ? axisid + "_bounds" : axis->bounds_name;
+            if (!axis->bounds.isEmpty() && axis->label.isEmpty())
+            {
+              dims.push_back("axis_nbounds");
+              SuperClassWriter::addVariable(axisBoundsId, typePrec, dims, compressionLevel);
+              SuperClassWriter::addAttribute("bounds", axisBoundsId, &axisid);
+
+              if (!axis->standard_name.isEmpty())
+                SuperClassWriter::addAttribute("standard_name", axis->standard_name.getValue(), &axisBoundsId);
+
+              if (!axis->unit.isEmpty())
+                SuperClassWriter::addAttribute("units", axis->unit.getValue(), &axisBoundsId);
+
+              if (!axis->formula_bounds.isEmpty())
+                SuperClassWriter::addAttribute("formula", axis->formula_bounds.getValue(), &axisBoundsId);
+
+              if (!axis->formula_term_bounds.isEmpty())
+                SuperClassWriter::addAttribute("formula_term", axis->formula_term_bounds.getValue(), &axisBoundsId);
+            }
+          }
+
+          SuperClassWriter::definition_end();
+
+          CArray<int, 1>& indexToWrite = axis->localIndexToWriteOnServer;
+          int nbWritten = indexToWrite.numElements();
+          CArray<double,1> axis_value(indexToWrite.numElements());
+          if (!axis->value.isEmpty())
+          {
+            for (int i = 0; i < nbWritten; i++)
+            {
+              if (indexToWrite(i) < 0)
+                axis_value(i) = -1;   // Some value in case of a hole
+              else
+                axis_value(i) = axis->value(indexToWrite(i));
+            }
+          }
+          CArray<double,2> axis_bounds;
+          CArray<string,1> axis_label;
+          if (!axis->label.isEmpty())
+          {
+            axis_label.resize(indexToWrite.numElements());
+            for (int i = 0; i < nbWritten; i++)
+            {
+              if (indexToWrite(i) < 0)
+                axis_label(i) = boost::lexical_cast<string>(-1);  // Some value in case of a hole
+              else
+                axis_label(i) = axis->label(indexToWrite(i));
+            }
+          }
+
+          switch (SuperClass::type)
+          {
+            case MULTI_FILE:
+            {
+              if (axis->label.isEmpty())
+              {
+                if (!axis->value.isEmpty())
+                  SuperClassWriter::writeData(axis_value, axisid, isCollective, 0);
+
+                if (!axis->bounds.isEmpty())
+                {
+                  axis_bounds.resize(2, indexToWrite.numElements());
+                  for (int i = 0; i < nbWritten; ++i)
+                  {
+                    if (indexToWrite(i) < 0)
+                    {
+                      axis_bounds(0, i) = -1.; // Some value in case of a hole
+                      axis_bounds(1, i) = -1.;
+                    }
+                    else
+                    {
+                      axis_bounds(0, i) = axis->bounds(0, int(indexToWrite(i)));
+                      axis_bounds(1, i) = axis->bounds(1, int(indexToWrite(i)));
+                    }
+                  }
+                  SuperClassWriter::writeData(axis_bounds, axisBoundsId, isCollective, 0);
+                }
+              }
+              else
+                SuperClassWriter::writeData(axis_label, axisid, isCollective, 0);
+
+              SuperClassWriter::definition_start();
+              break;
+            }
+            case ONE_FILE:
+            {
+              std::vector<StdSize> start(1), startBounds(2) ;
+              std::vector<StdSize> count(1), countBounds(2) ;
+              start[0] = startBounds[0] = axis->begin;
+              count[0] = countBounds[0] = axis->n;
+              startBounds[1] = 0;
+              countBounds[1] = 2;
+
+              if (axis->label.isEmpty())
+              {
+                if (!axis->value.isEmpty())
+                  SuperClassWriter::writeData(axis_value, axisid, isCollective, 0, &start, &count);
+
+                if (!axis->bounds.isEmpty())
+                {
+                  axis_bounds.resize(2, indexToWrite.numElements());
+                  for (int i = 0; i < nbWritten; ++i)
+                  {
+                    if (indexToWrite(i) < 0)
+                    {
+                      axis_bounds(0, i) = -1.;
+                      axis_bounds(1, i) = -1.;
+                    }
+                    else
+                    {
+                      axis_bounds(0, i) = axis->bounds(0, int(indexToWrite(i)));
+                      axis_bounds(1, i) = axis->bounds(1, int(indexToWrite(i)));
+                    }
+                  }
+                  SuperClassWriter::writeData(axis_bounds, axisBoundsId, isCollective, 0, &startBounds, &countBounds);
+                }
+              }
+              else
+              {
+                std::vector<StdSize> startLabel(2), countLabel(2);
+                startLabel[0] = start[0]; startLabel[1] = 0;
+                countLabel[0] = count[0]; countLabel[1] = stringArrayLen;
+                SuperClassWriter::writeData(axis_label, axisid, isCollective, 0, &startLabel, &countLabel);
+              }
+
+              SuperClassWriter::definition_start();
+
+              break;
+            }
+            default :
+              ERROR("CNc4DataOutput::writeAxis_(CAxis* axis)",
+                    << "[ type = " << SuperClass::type << "]"
+                    << " not implemented yet !");
+          }
+        }
+        catch (CNetCdfException& e)
+        {
+          StdString msg("On writing the axis : ");
+          msg.append(axisid); msg.append("\n");
+          msg.append("In the context : ");
+          CContext* context = CContext::getCurrent() ;
+          msg.append(context->getId()); msg.append("\n");
+          msg.append(e.what());
+          ERROR("CNc4DataOutput::writeAxis_(CAxis* axis)", << msg);
+        }
+        axis->addRelFile(this->filename);
+     }
+
+      void CNc4DataOutput::writeScalar_(CScalar* scalar)
+      {
+        if (scalar->IsWritten(this->filename)) return;
+        scalar->checkAttributes();
+        int scalarSize = 1;
+
+        StdString scalaId = scalar->getScalarOutputName();
+        StdString boundsId;
+        if (isWrittenAxis(scalaId)) return ;
+        else setWrittenAxis(scalaId);
+
+        nc_type typePrec ;
+        if (scalar->prec.isEmpty()) typePrec =  NC_FLOAT ;
+        else if (scalar->prec==4)  typePrec =  NC_FLOAT ;
+        else if (scalar->prec==8)   typePrec =  NC_DOUBLE ;
+
+        if (!scalar->label.isEmpty()) typePrec = NC_CHAR ;
+        string strId="str_len" ;
+
+        try
+        {
+          if (!scalar->label.isEmpty() && !SuperClassWriter::dimExist(strId)) SuperClassWriter::addDimension(strId, stringArrayLen);
+
+          if (!scalar->value.isEmpty() || !scalar->label.isEmpty())
+          {
+            std::vector<StdString> dims;
+            StdString scalarDim = scalaId;
+
+            if (!scalar->label.isEmpty()) dims.push_back(strId);
+
+            SuperClassWriter::addVariable(scalaId, typePrec, dims);
+
+            if (!scalar->name.isEmpty())
+              SuperClassWriter::addAttribute("name", scalar->name.getValue(), &scalaId);
+
+            if (!scalar->standard_name.isEmpty())
+              SuperClassWriter::addAttribute("standard_name", scalar->standard_name.getValue(), &scalaId);
+
+            if (!scalar->long_name.isEmpty())
+              SuperClassWriter::addAttribute("long_name", scalar->long_name.getValue(), &scalaId);
+
+            if (!scalar->unit.isEmpty())
+              SuperClassWriter::addAttribute("units", scalar->unit.getValue(), &scalaId);
+
+            if (!scalar->axis_type.isEmpty())
+            {
+              switch(scalar->axis_type)
+              {
+              case CScalar::axis_type_attr::X :
+                SuperClassWriter::addAttribute("axis", string("X"), &scalaId);
+                break;
+              case CScalar::axis_type_attr::Y :
+                SuperClassWriter::addAttribute("axis", string("Y"), &scalaId);
+                break;
+              case CScalar::axis_type_attr::Z :
+                SuperClassWriter::addAttribute("axis", string("Z"), &scalaId);
+                break;
+              case CScalar::axis_type_attr::T :
+                SuperClassWriter::addAttribute("axis", string("T"), &scalaId);
+                break;
+              }
+            }
+
+            if (!scalar->positive.isEmpty())
+            {
+              SuperClassWriter::addAttribute("positive",
+                                             (scalar->positive == CScalar::positive_attr::up) ? string("up") : string("down"),
+                                             &scalaId);
+            }
+
+            if (!scalar->bounds.isEmpty() && scalar->label.isEmpty())
+            {
+              dims.clear();
+              dims.push_back("axis_nbounds");
+              boundsId = (scalar->bounds_name.isEmpty()) ? (scalaId + "_bounds") : scalar->bounds_name.getValue();
+              SuperClassWriter::addVariable(boundsId, typePrec, dims);
+              SuperClassWriter::addAttribute("bounds", boundsId, &scalaId);
+            }
+
+            SuperClassWriter::definition_end();
+
+            switch (SuperClass::type)
+            {
+              case MULTI_FILE:
+              {
+                CArray<double,1> scalarValue(scalarSize);
+                CArray<string,1> scalarLabel(scalarSize);
+                CArray<double,1> scalarBounds(scalarSize*2);
+
+                if (!scalar->value.isEmpty() && scalar->label.isEmpty())
+                {
+                  scalarValue(0) = scalar->value;
+                  SuperClassWriter::writeData(scalarValue, scalaId, isCollective, 0);
+                }
+
+                if (!scalar->bounds.isEmpty() && scalar->label.isEmpty())
+                {
+                  scalarBounds(0) = scalar->bounds(0);
+                  scalarBounds(1) = scalar->bounds(1);
+                  SuperClassWriter::writeData(scalarBounds, boundsId, isCollective, 0);
+                }
+
+                if (!scalar->label.isEmpty())
+                {
+                  scalarLabel(0) = scalar->label;
+                  SuperClassWriter::writeData(scalarLabel, scalaId, isCollective, 0);
+                }
+
+                SuperClassWriter::definition_start();
+
+                break;
+              }
+              case ONE_FILE:
+              {
+                CArray<double,1> scalarValue(scalarSize);
+                CArray<string,1> scalarLabel(scalarSize);
+                CArray<double,1> scalarBounds(scalarSize*2);
+
+                std::vector<StdSize> start(1);
+                std::vector<StdSize> count(1);
+                start[0] = 0;
+                count[0] = 1;
+                if (!scalar->value.isEmpty() && scalar->label.isEmpty())
+                {
+                  scalarValue(0) = scalar->value;
+                  SuperClassWriter::writeData(scalarValue, scalaId, isCollective, 0, &start, &count);
+                }
+                if (!scalar->bounds.isEmpty() && scalar->label.isEmpty())
+                {
+                  scalarBounds(0) = scalar->bounds(0);
+                  scalarBounds(1) = scalar->bounds(1);
+                  count[0] = 2;
+                  SuperClassWriter::writeData(scalarBounds, boundsId, isCollective, 0, &start, &count);
+                }
+                if (!scalar->label.isEmpty())
+                {
+                  scalarLabel(0) = scalar->label;
+                  count[0] = stringArrayLen;
+                  SuperClassWriter::writeData(scalarLabel, scalaId, isCollective, 0, &start, &count);
+                }
+
+                SuperClassWriter::definition_start();
+
+                break;
+              }
+              default :
+                ERROR("CNc4DataOutput::writeAxis_(CAxis* scalar)",
+                      << "[ type = " << SuperClass::type << "]"
+                      << " not implemented yet !");
+            }
+          }
+        }
+        catch (CNetCdfException& e)
+        {
+          StdString msg("On writing the scalar : ");
+          msg.append(scalaId); msg.append("\n");
+          msg.append("In the context : ");
+          CContext* context = CContext::getCurrent() ;
+          msg.append(context->getId()); msg.append("\n");
+          msg.append(e.what());
+          ERROR("CNc4DataOutput::writeScalar_(CScalar* scalar)", << msg);
+        }
+        scalar->addRelFile(this->filename);
+     }
+
+     //--------------------------------------------------------------
+
+     void CNc4DataOutput::writeGridCompressed_(CGrid* grid)
+     {
+       if (grid->isScalarGrid() || grid->isWrittenCompressed(this->filename)) return;
+
+       try
+       {
+         CArray<int,1> axisDomainOrder = grid->axis_domain_order;
+         std::vector<StdString> domainList = grid->getDomainList();
+         std::vector<StdString> axisList   = grid->getAxisList();
+         std::vector<StdString> scalarList = grid->getScalarList();
+         int numElement = axisDomainOrder.numElements(), idxDomain = 0, idxAxis = 0, idxScalar = 0;
+
+         std::vector<StdString> dims;
+
+         if (grid->isCompressible())
+         {
+           StdString varId = grid->getId() + "_points";
+
+           int nbIndexes = (SuperClass::type == MULTI_FILE) ? grid->getNumberWrittenIndexes() : grid->getTotalNumberWrittenIndexes();
+           SuperClassWriter::addDimension(varId, nbIndexes);
+
+           dims.push_back(varId);
+           SuperClassWriter::addVariable(varId, NC_INT, dims);
+
+           StdOStringStream compress;
+           for (int i = numElement - 1; i >= 0; --i)
+           {
+             if (2 == axisDomainOrder(i))
+             {
+               CDomain* domain = CDomain::get(domainList[domainList.size() - idxDomain - 1]);
+               StdString domId = domain->getDomainOutputName();
+               StdString appendDomId  = singleDomain ? "" : "_" + domId;
+
+               switch (domain->type)
+               {
+                 case CDomain::type_attr::curvilinear:
+                   compress << "y" << appendDomId << " x" << appendDomId;
+                   break;
+                 case CDomain::type_attr::rectilinear:
+                   compress << "lat" << appendDomId << " lon" << appendDomId;
+                   break;
+                 case CDomain::type_attr::unstructured:
+                   StdString cellName = (!domain->dim_i_name.isEmpty()) ? cellName=domain->dim_i_name : "cell";
+                   compress << cellName << appendDomId;
+//                   compress << "cell" << appendDomId;
+                   break;
+               }
+               ++idxDomain;
+             }
+             else if (1 == axisDomainOrder(i))
+             {
+               CAxis* axis = CAxis::get(axisList[axisList.size() - idxAxis - 1]);
+               compress << axis->getAxisOutputName();
+               ++idxAxis;
+             }
+             else
+             {
+               CScalar* scalar = CScalar::get(scalarList[scalarList.size() - idxScalar - 1]);
+               compress << scalar->getScalarOutputName();
+               ++idxScalar;
+             }
+
+             if (i != 0) compress << ' ';
+           }
+           SuperClassWriter::addAttribute("compress", compress.str(), &varId);         
+
+           CArray<int, 1> indexes(grid->getNumberWrittenIndexes());
+           indexes = grid->localIndexToWriteOnServer;
+
+           switch (SuperClass::type)
+           {
+             case (MULTI_FILE):
+             {
+               SuperClassWriter::writeData(indexes, varId, isCollective, 0);
+               break;
+             }
+             case (ONE_FILE):
+             {
+               if (grid->doGridHaveDataDistributed())
+                 grid->getDistributionServer()->computeGlobalIndex(indexes);
+
+               std::vector<StdSize> start, count;
+               start.push_back(grid->getOffsetWrittenIndexes());
+               count.push_back(grid->getNumberWrittenIndexes());
+
+               SuperClassWriter::writeData(indexes, varId, isCollective, 0, &start, &count);
+               break;
+             }
+           }
+         }
+         else
+         {
+           for (int i = 0; i < numElement; ++i)
+           {
+             StdString varId, compress;
+             CArray<int, 1> indexes;
+             bool isDistributed;
+             StdSize nbIndexes, totalNbIndexes, offset;
+             int firstGlobalIndex;
+
+             if (2 == axisDomainOrder(i))
+             {
+               CDomain* domain = CDomain::get(domainList[idxDomain]);
+               StdString domId = domain->getDomainOutputName();
+
+               if (!domain->isCompressible()
+                    || domain->type == CDomain::type_attr::unstructured
+                    || domain->isWrittenCompressed(this->filename)
+                    || isWrittenCompressedDomain(domId))
+                 continue;
+
+               StdString appendDomId  = singleDomain ? "" : "_" + domId;
+
+               varId = domId + "_points";
+               switch (domain->type)
+               {
+                 case CDomain::type_attr::curvilinear:
+                   compress = "y" + appendDomId + " x" + appendDomId;
+                   break;
+                 case CDomain::type_attr::rectilinear:
+                   compress = "lat" + appendDomId + " lon" + appendDomId;
+                   break;
+               }
+
+               // indexes.resize(domain->compressedIndexToWriteOnServer[comm_file].numElements());
+               // indexes = domain->compressedIndexToWriteOnServer[com_file];
+               indexes.resize(domain->getCompressedIndexToWriteOnServer(comm_file).numElements());
+               indexes = domain->getCompressedIndexToWriteOnServer(comm_file);
+
+               isDistributed = domain->isDistributed();
+               nbIndexes = domain->getNumberWrittenIndexes(comm_file);
+               totalNbIndexes = domain->getTotalNumberWrittenIndexes(comm_file);
+               offset = domain->getOffsetWrittenIndexes(comm_file);
+               firstGlobalIndex = domain->ibegin + domain->jbegin * domain->ni_glo;
+
+               domain->addRelFileCompressed(this->filename);
+               setWrittenCompressedDomain(domId);
+               ++idxDomain;
+             }
+             else if (1 == axisDomainOrder(i))
+             {
+               CAxis* axis = CAxis::get(axisList[idxAxis]);
+               StdString axisId = axis->getAxisOutputName();
+
+               if (!axis->isCompressible()
+                    || axis->isWrittenCompressed(this->filename)
+                    || isWrittenCompressedAxis(axisId))
+                 continue;
+
+               varId = axisId + "_points";
+               compress = axisId;
+
+               // indexes.resize(axis->compressedIndexToWriteOnServer.numElements());
+               // indexes = axis->compressedIndexToWriteOnServer;
+
+               indexes.resize(axis->getCompressedIndexToWriteOnServer(comm_file).numElements());
+               indexes = axis->getCompressedIndexToWriteOnServer(comm_file);
+
+               isDistributed = axis->isDistributed();
+               nbIndexes = axis->getNumberWrittenIndexes(comm_file);
+               totalNbIndexes = axis->getTotalNumberWrittenIndexes(comm_file);
+               offset = axis->getOffsetWrittenIndexes(comm_file);
+               firstGlobalIndex = axis->begin;
+
+               axis->addRelFileCompressed(this->filename);
+               setWrittenCompressedAxis(axisId);
+               ++idxAxis;
+             }
+             else
+             {
+             }
+
+             if (!varId.empty())
+             {
+               SuperClassWriter::addDimension(varId, (SuperClass::type == MULTI_FILE) ? nbIndexes : totalNbIndexes);
+
+               dims.clear();
+               dims.push_back(varId);
+               SuperClassWriter::addVariable(varId, NC_INT, dims);
+
+               SuperClassWriter::addAttribute("compress", compress, &varId);
+
+               switch (SuperClass::type)
+               {
+                 case (MULTI_FILE):
+                 {
+                   indexes -= firstGlobalIndex;
+                   SuperClassWriter::writeData(indexes, varId, isCollective, 0);
+                   break;
+                 }
+                 case (ONE_FILE):
+                 {
+                   std::vector<StdSize> start, count;
+                   start.push_back(offset);
+                   count.push_back(nbIndexes);
+
+                   SuperClassWriter::writeData(indexes, varId, isCollective, 0, &start, &count);
+                   break;
+                 }
+               }
+             }
+            }
+         }
+
+         grid->addRelFileCompressed(this->filename);
+       }
+       catch (CNetCdfException& e)
+       {
+         StdString msg("On writing compressed grid : ");
+         msg.append(grid->getId()); msg.append("\n");
+         msg.append("In the context : ");
+         CContext* context = CContext::getCurrent();
+         msg.append(context->getId()); msg.append("\n");
+         msg.append(e.what());
+         ERROR("CNc4DataOutput::writeGridCompressed_(CGrid* grid)", << msg);
+       }
+     }
+
+     //--------------------------------------------------------------
+
+     void CNc4DataOutput::writeTimeDimension_(void)
+     {
+       try
+       {
+        SuperClassWriter::addDimension(getTimeCounterName());
+       }
+       catch (CNetCdfException& e)
+       {
+         StdString msg("On writing time dimension : time_couter\n");
+         msg.append("In the context : ");
+         CContext* context = CContext::getCurrent() ;
+         msg.append(context->getId()); msg.append("\n");
+         msg.append(e.what());
+         ERROR("CNc4DataOutput::writeTimeDimension_(void)", << msg);
+       }
+     }
+
+      //--------------------------------------------------------------
+
+      void CNc4DataOutput::writeField_(CField* field)
+      {
+        CContext* context = CContext::getCurrent() ;
+        CContextServer* server=context->server ;
+
+        std::vector<StdString> dims, coodinates;
+        CGrid* grid = field->grid;
+        if (!grid->doGridHaveDataToWrite())
+          if (SuperClass::type==MULTI_FILE) return ;
+
+        CArray<int,1> axisDomainOrder = grid->axis_domain_order;
+        int numElement = axisDomainOrder.numElements(), idxDomain = 0, idxAxis = 0, idxScalar = 0;
+        std::vector<StdString> domainList = grid->getDomainList();
+        std::vector<StdString> axisList   = grid->getAxisList();
+        std::vector<StdString> scalarList = grid->getScalarList();        
+
+        StdString timeid  = getTimeCounterName();
+        StdString dimXid,dimYid;
+        std::deque<StdString> dimIdList, dimCoordList;
+        bool hasArea = false;
+        StdString cellMeasures = "area:";
+        bool compressedOutput = !field->indexed_output.isEmpty() && field->indexed_output;
+
+        for (int i = 0; i < numElement; ++i)
+        {
+          if (2 == axisDomainOrder(i))
+          {
+            CDomain* domain = CDomain::get(domainList[idxDomain]);
+            StdString domId = domain->getDomainOutputName();
+            StdString appendDomId  = singleDomain ? "" : "_" + domId ;
+            StdString lonName,latName ;
+            StdString dimIname,dimJname ;
+
+            if (domain->lon_name.isEmpty())
+            { 
+              if (domain->type==CDomain::type_attr::curvilinear) lonName = "nav_lon";
+              else lonName = "lon";
+            }
+            else lonName = domain->lon_name;
+
+            if (domain->lat_name.isEmpty())
+            {
+              if (domain->type==CDomain::type_attr::curvilinear) latName = "nav_lat";
+              else latName = "lat";
+            }
+            else latName = domain->lat_name;
+
+            if (domain->dim_i_name.isEmpty())
+            {
+              if (domain->type==CDomain::type_attr::curvilinear) dimIname = "x";
+              else if (domain->type==CDomain::type_attr::unstructured) dimIname = "cell";
+              else dimIname = lonName;
+            }
+            else dimIname = domain->dim_i_name;
+
+            if (domain->dim_j_name.isEmpty())
+            {
+              if (domain->type==CDomain::type_attr::curvilinear) dimJname = "y";
+              else dimJname = latName;
+            }
+            else dimJname = domain->dim_j_name;
+        
+            if (compressedOutput && domain->isCompressible() && domain->type != CDomain::type_attr::unstructured)
+            {
+              dimIdList.push_back(domId + "_points");
+              field->setUseCompressedOutput();
+            }
+
+            switch (domain->type)
+            {
+              case CDomain::type_attr::curvilinear:
+                if (!compressedOutput || !domain->isCompressible())
+                {
+                  dimXid=dimIname+appendDomId;
+                  dimYid=dimJname+appendDomId;
+                  dimIdList.push_back(dimXid);
+                  dimIdList.push_back(dimYid);
+                }
+                dimCoordList.push_back(lonName+appendDomId);
+                dimCoordList.push_back(latName+appendDomId);
+              break ;
+              case CDomain::type_attr::rectilinear:
+                if (!compressedOutput || !domain->isCompressible())
+                {
+                  dimXid     = dimIname+appendDomId;
+                  dimYid     = dimJname+appendDomId;
+                  dimIdList.push_back(dimXid);
+                  dimIdList.push_back(dimYid);
+                }
+                if (lonName != dimIname)  dimCoordList.push_back(lonName+appendDomId);
+                if (latName != dimJname)  dimCoordList.push_back(latName+appendDomId);
+
+              break ;
+              case CDomain::type_attr::unstructured:
+              {
+                if (SuperClassWriter::useCFConvention)
+                {
+                  dimXid     = dimIname + appendDomId;
+                  dimIdList.push_back(dimXid);
+                  dimCoordList.push_back(lonName+appendDomId);
+                  dimCoordList.push_back(latName+appendDomId);
+                }
+                else
+                {
+                  StdString domainName = domain->name;
+                  if (domain->nvertex == 1)
+                  {
+                    dimXid     = "n" + domainName + "_node";
+                    dimIdList.push_back(dimXid);
+                    dimCoordList.push_back(StdString(domainName + "_node_x"));
+                    dimCoordList.push_back(StdString(domainName + "_node_y"));
+                  }
+                  else if (domain->nvertex == 2)
+                  {
+                    dimXid     = "n" + domainName + "_edge";
+                    dimIdList.push_back(dimXid);
+                    dimCoordList.push_back(StdString(domainName + "_edge_x"));
+                    dimCoordList.push_back(StdString(domainName + "_edge_y"));
+                  }
+                  else
+                  {
+                    dimXid     = "n" + domainName + "_face";
+                    dimIdList.push_back(dimXid);
+                    dimCoordList.push_back(StdString(domainName + "_face_x"));
+                    dimCoordList.push_back(StdString(domainName + "_face_y"));
+                  }
+                }  // ugrid convention
+              }  // case unstructured domain
+            }
+
+            if (domain->hasArea)
+            {
+              hasArea = true;
+              cellMeasures += " area" + appendDomId;
+            }
+            ++idxDomain;
+          }
+          else if (1 == axisDomainOrder(i))
+          {
+            CAxis* axis = CAxis::get(axisList[idxAxis]);
+            StdString axisId = axis->getAxisOutputName();
+            StdString axisDim;
+
+            if (axis->dim_name.isEmpty()) axisDim = axisId;
+            else axisDim=axis->dim_name.getValue();
+
+            if (compressedOutput && axis->isCompressible())
+            {
+              dimIdList.push_back(axisDim + "_points");
+              field->setUseCompressedOutput();
+            }
+            else
+              dimIdList.push_back(axisDim);
+
+            if (axisDim != axisId) dimCoordList.push_back(axisId);
+            ++idxAxis;
+          }
+          else
+          {
+            CScalar* scalar = CScalar::get(scalarList[idxScalar]);
+            StdString scalarId = scalar->getScalarOutputName();
+            if (!scalar->value.isEmpty() || !scalar->label.isEmpty())
+              dimCoordList.push_back(scalarId);
+            ++idxScalar;
+          }
+        }
+
+        StdString fieldid = field->getFieldOutputName();
+
+        nc_type type ;
+        if (field->prec.isEmpty()) type =  NC_FLOAT ;
+        else
+        {
+          if (field->prec==2) type = NC_SHORT ;
+          else if (field->prec==4)  type =  NC_FLOAT ;
+          else if (field->prec==8)   type =  NC_DOUBLE ;
+        }
+
+        bool wtime   = !(!field->operation.isEmpty() && field->getOperationTimeType() == func::CFunctor::once);
+
+        if (wtime)
+        {
+          if (field->hasTimeInstant && hasTimeInstant) coodinates.push_back(string("time_instant"));
+          else if (field->hasTimeCentered && hasTimeCentered)  coodinates.push_back(string("time_centered"));
+          dims.push_back(timeid);
+        }
+
+        if (compressedOutput && grid->isCompressible())
+        {
+          dims.push_back(grid->getId() + "_points");
+          field->setUseCompressedOutput();
+        }
+        else
+        {
+          while (!dimIdList.empty())
+          {
+            dims.push_back(dimIdList.back());
+            dimIdList.pop_back();
+          }
+        }
+
+        while (!dimCoordList.empty())
+        {
+          coodinates.push_back(dimCoordList.back());
+          dimCoordList.pop_back();
+        }
+
+        try
+        {
+           SuperClassWriter::addVariable(fieldid, type, dims);
+
+           if (!field->standard_name.isEmpty())
+              SuperClassWriter::addAttribute
+                 ("standard_name",  field->standard_name.getValue(), &fieldid);
+
+           if (!field->long_name.isEmpty())
+              SuperClassWriter::addAttribute
+                 ("long_name", field->long_name.getValue(), &fieldid);
+
+           if (!field->unit.isEmpty())
+              SuperClassWriter::addAttribute
+                 ("units", field->unit.getValue(), &fieldid);
+
+           // Ugrid field attributes "mesh" and "location"
+           if (!SuperClassWriter::useCFConvention)
+           {
+            if (!domainList.empty())
+            {
+              CDomain* domain = CDomain::get(domainList[0]); // Suppose that we have only domain
+              StdString mesh = domain->name;
+              SuperClassWriter::addAttribute("mesh", mesh, &fieldid);
+              StdString location;
+              if (domain->nvertex == 1)
+                location = "node";
+              else if (domain->nvertex == 2)
+                location = "edge";
+              else if (domain->nvertex > 2)
+                location = "face";
+              SuperClassWriter::addAttribute("location", location, &fieldid);
+            }
+
+           }
+
+           if (!field->valid_min.isEmpty())
+              SuperClassWriter::addAttribute
+                 ("valid_min", field->valid_min.getValue(), &fieldid);
+
+           if (!field->valid_max.isEmpty())
+              SuperClassWriter::addAttribute
+                 ("valid_max", field->valid_max.getValue(), &fieldid);
+
+            if (!field->scale_factor.isEmpty())
+              SuperClassWriter::addAttribute
+                 ("scale_factor", field->scale_factor.getValue(), &fieldid);
+
+             if (!field->add_offset.isEmpty())
+              SuperClassWriter::addAttribute
+                 ("add_offset", field->add_offset.getValue(), &fieldid);
+
+           SuperClassWriter::addAttribute
+                 ("online_operation", field->operation.getValue(), &fieldid);
+
+          // write child variables as attributes
+
+
+           bool alreadyAddCellMethod = false;
+           StdString cellMethodsPrefix(""), cellMethodsSuffix("");
+           if (!field->cell_methods.isEmpty())
+           {
+              StdString cellMethodString = field->cell_methods;
+              if (field->cell_methods_mode.isEmpty() ||
+                 (CField::cell_methods_mode_attr::overwrite == field->cell_methods_mode))
+              {
+                SuperClassWriter::addAttribute("cell_methods", cellMethodString, &fieldid);
+                alreadyAddCellMethod = true;
+              }
+              else
+              {
+                switch (field->cell_methods_mode)
+                {
+                  case (CField::cell_methods_mode_attr::prefix):
+                    cellMethodsPrefix = cellMethodString;
+                    cellMethodsPrefix += " ";
+                    break;
+                  case (CField::cell_methods_mode_attr::suffix):
+                    cellMethodsSuffix = " ";
+                    cellMethodsSuffix += cellMethodString;
+                    break;
+                  case (CField::cell_methods_mode_attr::none):
+                    break;
+                  default:
+                    break;
+                }
+              }
+           }
+
+
+           if (wtime)
+           {
+              CDuration freqOp = field->freq_op.getValue();
+              freqOp.solveTimeStep(*context->calendar);
+              StdString freqOpStr = freqOp.toStringUDUnits();
+              SuperClassWriter::addAttribute("interval_operation", freqOpStr, &fieldid);
+
+              CDuration freqOut = field->getRelFile()->output_freq.getValue();
+              freqOut.solveTimeStep(*context->calendar);
+              SuperClassWriter::addAttribute("interval_write", freqOut.toStringUDUnits(), &fieldid);
+
+              StdString cellMethods(cellMethodsPrefix + "time: ");
+              if (field->operation.getValue() == "instant") cellMethods += "point";
+              else if (field->operation.getValue() == "average") cellMethods += "mean";
+              else if (field->operation.getValue() == "accumulate") cellMethods += "sum";
+              else cellMethods += field->operation;
+              if (freqOp.resolve(*context->calendar) != freqOut.resolve(*context->calendar))
+                cellMethods += " (interval: " + freqOpStr + ")";
+              cellMethods += cellMethodsSuffix;
+              if (!alreadyAddCellMethod)
+                SuperClassWriter::addAttribute("cell_methods", cellMethods, &fieldid);
+           }
+
+           if (hasArea)
+             SuperClassWriter::addAttribute("cell_measures", cellMeasures, &fieldid);
+
+           if (!field->default_value.isEmpty())
+           {
+             double default_value = field->default_value.getValue();
+             if (type == NC_DOUBLE)
+             {
+               SuperClassWriter::setDefaultValue(fieldid, &default_value);
+             }
+             else if (type == NC_SHORT)
+             {
+               short sdefault_value = (short)default_value;
+               SuperClassWriter::setDefaultValue(fieldid, &sdefault_value);
+             }
+             else
+             {
+               float fdefault_value = (float)default_value;
+               SuperClassWriter::setDefaultValue(fieldid, &fdefault_value);
+             }
+           }
+           else
+              SuperClassWriter::setDefaultValue(fieldid, (double*)NULL);
+
+            if (field->compression_level.isEmpty())
+              field->compression_level = field->file->compression_level.isEmpty() ? 0 : field->file->compression_level;
+            SuperClassWriter::setCompressionLevel(fieldid, field->compression_level);
+
+           {  // Ecriture des coordonnes
+
+              StdString coordstr; //boost::algorithm::join(coodinates, " ")
+              std::vector<StdString>::iterator
+                 itc = coodinates.begin(), endc = coodinates.end();
+
+              for (; itc!= endc; itc++)
+              {
+                 StdString & coord = *itc;
+                 if (itc+1 != endc)
+                       coordstr.append(coord).append(" ");
+                 else  coordstr.append(coord);
+              }
+
+              SuperClassWriter::addAttribute("coordinates", coordstr, &fieldid);
+
+           }
+
+           vector<CVariable*> listVars = field->getAllVariables() ;
+           for (vector<CVariable*>::iterator it = listVars.begin() ;it != listVars.end(); it++) writeAttribute_(*it, fieldid) ;
+
+         }
+         catch (CNetCdfException& e)
+         {
+           StdString msg("On writing field : ");
+           msg.append(fieldid); msg.append("\n");
+           msg.append("In the context : ");
+           msg.append(context->getId()); msg.append("\n");
+           msg.append(e.what());
+           ERROR("CNc4DataOutput::writeField_(CField* field)", << msg);
+         }
+      } // writeField_()
+
+      //--------------------------------------------------------------
+
+      void CNc4DataOutput::writeFile_ (CFile* file)
+      {
+         StdString filename = file->getFileOutputName();
+         StdString description = (!file->description.isEmpty())
+                               ? file->description.getValue()
+                               : StdString("Created by xios");
+
+         singleDomain = (file->nbDomains == 1);
+
+         StdString conv_str ;
+         if (file->convention_str.isEmpty())
+         {
+            if (SuperClassWriter::useCFConvention) conv_str="CF-1.6" ;
+            else conv_str="UGRID" ;
+         }
+         else conv_str=file->convention_str ;
+           
+         try
+         {
+           if (!appendMode) this->writeFileAttributes(filename, description,
+                                                      conv_str,
+                                                      StdString("An IPSL model"),
+                                                      this->getTimeStamp());
+
+           if (!appendMode)
+             SuperClassWriter::addDimension("axis_nbounds", 2);
+         }
+         catch (CNetCdfException& e)
+         {
+           StdString msg("On writing file : ");
+           msg.append(filename); msg.append("\n");
+           msg.append("In the context : ");
+           CContext* context = CContext::getCurrent() ;
+           msg.append(context->getId()); msg.append("\n");
+           msg.append(e.what());
+           ERROR("CNc4DataOutput::writeFile_ (CFile* file)", << msg);
+         }
+      }
+
+      void CNc4DataOutput::writeAttribute_ (CVariable* var, const string& fieldId)
+      {
+        StdString name = var->getVariableOutputName();
+
+        try
+        {
+          if (var->type.getValue() == CVariable::type_attr::t_int || var->type.getValue() == CVariable::type_attr::t_int32)
+            addAttribute(name, var->getData<int>(), &fieldId);
+          else if (var->type.getValue() == CVariable::type_attr::t_int16)
+            addAttribute(name, var->getData<short int>(), &fieldId);
+          else if (var->type.getValue() == CVariable::type_attr::t_float)
+            addAttribute(name, var->getData<float>(), &fieldId);
+          else if (var->type.getValue() == CVariable::type_attr::t_double)
+            addAttribute(name, var->getData<double>(), &fieldId);
+          else if (var->type.getValue() == CVariable::type_attr::t_string)
+            addAttribute(name, var->getData<string>(), &fieldId);
+          else
+            ERROR("CNc4DataOutput::writeAttribute_ (CVariable* var, const string& fieldId)",
+                  << "Unsupported variable of type " << var->type.getStringValue());
+        }
+       catch (CNetCdfException& e)
+       {
+         StdString msg("On writing attributes of variable with name : ");
+         msg.append(name); msg.append("in the field "); msg.append(fieldId); msg.append("\n");
+         msg.append("In the context : ");
+         CContext* context = CContext::getCurrent() ;
+         msg.append(context->getId()); msg.append("\n");
+         msg.append(e.what());
+         ERROR("CNc4DataOutput::writeAttribute_ (CVariable* var, const string& fieldId)", << msg);
+       }
+     }
+
+     void CNc4DataOutput::writeAttribute_ (CVariable* var)
+     {
+        StdString name = var->getVariableOutputName();
+
+        try
+        {
+          if (var->type.getValue() == CVariable::type_attr::t_int || var->type.getValue() == CVariable::type_attr::t_int32)
+            addAttribute(name, var->getData<int>());
+          else if (var->type.getValue() == CVariable::type_attr::t_int16)
+            addAttribute(name, var->getData<short int>());
+          else if (var->type.getValue() == CVariable::type_attr::t_float)
+            addAttribute(name, var->getData<float>());
+          else if (var->type.getValue() == CVariable::type_attr::t_double)
+            addAttribute(name, var->getData<double>());
+          else if (var->type.getValue() == CVariable::type_attr::t_string)
+            addAttribute(name, var->getData<string>());
+          else
+            ERROR("CNc4DataOutput::writeAttribute_ (CVariable* var)",
+                  << "Unsupported variable of type " << var->type.getStringValue());
+        }
+       catch (CNetCdfException& e)
+       {
+         StdString msg("On writing attributes of variable with name : ");
+         msg.append(name); msg.append("\n");
+         msg.append("In the context : ");
+         CContext* context = CContext::getCurrent() ;
+         msg.append(context->getId()); msg.append("\n");
+         msg.append(e.what());
+         ERROR("CNc4DataOutput::writeAttribute_ (CVariable* var)", << msg);
+       }
+     }
+
+      void CNc4DataOutput::syncFile_ (void)
+      {
+        try
+        {
+          SuperClassWriter::sync() ;
+        }
+        catch (CNetCdfException& e)
+        {
+         StdString msg("On synchronizing the write among processes");
+         msg.append("In the context : ");
+         CContext* context = CContext::getCurrent() ;
+         msg.append(context->getId()); msg.append("\n");
+         msg.append(e.what());
+         ERROR("CNc4DataOutput::syncFile_ (void)", << msg);
+        }
+      }
+
+      void CNc4DataOutput::closeFile_ (void)
+      {
+        try
+        {
+          SuperClassWriter::close() ;
+        }
+        catch (CNetCdfException& e)
+        {
+         StdString msg("On closing file");
+         msg.append("In the context : ");
+         CContext* context = CContext::getCurrent() ;
+         msg.append(context->getId()); msg.append("\n");
+         msg.append(e.what());
+         ERROR("CNc4DataOutput::syncFile_ (void)", << msg);
+        }
+
+      }
+
+      //---------------------------------------------------------------
+
+      StdString CNc4DataOutput::getTimeStamp(void) const
+      {
+         const int buffer_size = 100;
+         time_t rawtime;
+         struct tm * timeinfo = NULL;
+         char buffer [buffer_size];
+         StdString formatStr;
+         if (file->time_stamp_format.isEmpty()) formatStr="%Y-%b-%d %H:%M:%S %Z" ;
+         else formatStr=file->time_stamp_format;
+
+//         time ( &rawtime );
+//         timeinfo = localtime ( &rawtime );
+         time ( &rawtime );
+         timeinfo = gmtime ( &rawtime );
+         strftime (buffer, buffer_size, formatStr.c_str(), timeinfo);
+
+         return (StdString(buffer));
+      }
+
+      //---------------------------------------------------------------
+
+      void CNc4DataOutput::writeFieldData_ (CField*  field)
+      {
+        CContext* context = CContext::getCurrent();
+        CContextServer* server = context->server;
+        CGrid* grid = field->grid;
+
+        if (field->getNStep()<1) 
+        {
+          return;
+        }
+        
+        if (!grid->doGridHaveDataToWrite())
+          if (SuperClass::type == MULTI_FILE || !isCollective)
+          {
+            return;
+          }
+
+        StdString fieldid = field->getFieldOutputName();
+
+        StdOStringStream oss;
+        string timeAxisId;
+        if (field->hasTimeInstant) timeAxisId = "time_instant";
+        else if (field->hasTimeCentered) timeAxisId = "time_centered";
+
+        StdString timeBoundId = getTimeCounterName() + "_bounds";
+
+        StdString timeAxisBoundId;
+        if (field->hasTimeInstant) timeAxisBoundId = "time_instant_bounds";
+        else if (field->hasTimeCentered) timeAxisBoundId = "time_centered_bounds";
+
+        if (!field->wasWritten())
+        {
+          if (appendMode && field->file->record_offset.isEmpty() && 
+              field->getOperationTimeType() != func::CFunctor::once)
+          {
+            double factorUnit;
+            if (!field->file->time_units.isEmpty() && field->file->time_units==CFile::time_units_attr::days)
+            factorUnit=context->getCalendar()->getDayLengthInSeconds() ;
+            else factorUnit=1 ;
+            field->resetNStep(getRecordFromTime(field->last_Write_srv,factorUnit) + 1);
+          }
+
+          field->setWritten();
+        }
+
+
+        CArray<double,1> time_data(1);
+        CArray<double,1> time_data_bound(2);
+        CArray<double,1> time_counter(1);
+        CArray<double,1> time_counter_bound(2);
+
+        bool wtime = (field->getOperationTimeType() != func::CFunctor::once);
+        bool wtimeCounter =false ;
+        bool wtimeData =false ;
+        
+
+        if (wtime)
+        {
+          Time lastWrite = field->last_Write_srv;
+          Time lastLastWrite = field->lastlast_Write_srv;
+
+          
+          if (field->hasTimeInstant)
+          {
+            time_data(0) = time_data_bound(1) = lastWrite;
+            time_data_bound(0) = time_data_bound(1) = lastWrite;
+            if (timeCounterType==instant)
+            {
+              time_counter(0) = time_data(0);
+              time_counter_bound(0) = time_data_bound(0);
+              time_counter_bound(1) = time_data_bound(1);
+              wtimeCounter=true ;
+            }
+            if (hasTimeInstant) wtimeData=true ;
+          }
+          else if (field->hasTimeCentered)
+          {
+            time_data(0) = (lastWrite + lastLastWrite) / 2;
+            time_data_bound(0) = lastLastWrite;
+            time_data_bound(1) = lastWrite;
+            if (timeCounterType==centered)
+            {
+              time_counter(0) = time_data(0) ;
+              time_counter_bound(0) = time_data_bound(0) ;
+              time_counter_bound(1) = time_data_bound(1) ;
+              wtimeCounter=true ;
+            }
+            if (hasTimeCentered) wtimeData=true ;
+          }
+
+          if (timeCounterType==record)
+          {
+            time_counter(0) = field->getNStep() - 1;
+            time_counter_bound(0) = time_counter_bound(1) = field->getNStep() - 1;
+            wtimeCounter=true ;
+          }
+
+          if (!field->file->time_units.isEmpty() && field->file->time_units==CFile::time_units_attr::days)
+          {
+            double secByDay=context->getCalendar()->getDayLengthInSeconds() ;
+            time_data/=secByDay;
+            time_data_bound/=secByDay;
+            time_counter/=secByDay;
+            time_counter_bound/=secByDay;
+          }
+        }
+
+         bool isRoot = (server->intraCommRank == 0);
+
+         if (!field->scale_factor.isEmpty() || !field->add_offset.isEmpty())
+         {
+           double scaleFactor = 1.0;
+           double addOffset = 0.0;
+           if (!field->scale_factor.isEmpty()) scaleFactor = field->scale_factor;
+           if (!field->add_offset.isEmpty()) addOffset = field->add_offset;
+           field->scaleFactorAddOffset(scaleFactor, addOffset);
+         }
+
+         try
+         {
+           size_t writtenSize;
+           if (field->getUseCompressedOutput())
+             writtenSize = grid->getNumberWrittenIndexes();
+           else
+             writtenSize = grid->getWrittenDataSize();
+
+           CArray<double,1> fieldData(writtenSize);
+           if (!field->default_value.isEmpty()) fieldData = field->default_value;
+
+           if (field->getUseCompressedOutput())
+             field->outputCompressedField(fieldData);
+           else
+             field->outputField(fieldData);
+
+           if (!field->prec.isEmpty() && field->prec == 2) fieldData = round(fieldData);
+
+           switch (SuperClass::type)
+           {
+              case (MULTI_FILE) :
+              {
+                 CTimer::get("Files : writing data").resume();
+                 SuperClassWriter::writeData(fieldData, fieldid, isCollective, field->getNStep() - 1);
+                 CTimer::get("Files : writing data").suspend();
+                 if (wtime)
+                 {
+                   CTimer::get("Files : writing time axis").resume();
+                   if ( wtimeData)
+                   {
+                       SuperClassWriter::writeTimeAxisData(time_data, timeAxisId, isCollective, field->getNStep() - 1, isRoot);
+                       SuperClassWriter::writeTimeAxisDataBounds(time_data_bound, timeAxisBoundId, isCollective, field->getNStep() - 1, isRoot);
+                  }
+                   if (wtimeCounter)
+                   {
+                     SuperClassWriter::writeTimeAxisData(time_counter, getTimeCounterName(), isCollective, field->getNStep() - 1,isRoot);
+                     if (timeCounterType!=record) SuperClassWriter::writeTimeAxisDataBounds(time_counter_bound, timeBoundId, isCollective, field->getNStep() - 1, isRoot);
+                   }
+                   CTimer::get("Files : writing time axis").suspend();
+                 }
+                 break;
+              }
+              case (ONE_FILE) :
+              {
+
+                std::vector<StdSize> start, count;
+
+                if (field->getUseCompressedOutput())
+                {
+                  if (grid->isCompressible())
+                  {
+                    start.push_back(grid->getOffsetWrittenIndexes());
+                    count.push_back(grid->getNumberWrittenIndexes());
+                  }
+                  else
+                  {
+                    CArray<int,1> axisDomainOrder = grid->axis_domain_order;
+                    std::vector<StdString> domainList = grid->getDomainList();
+                    std::vector<StdString> axisList   = grid->getAxisList();
+                    int numElement = axisDomainOrder.numElements();
+                    int idxDomain = domainList.size() - 1, idxAxis = axisList.size() - 1;
+                    int idx = domainList.size() * 2 + axisList.size() - 1;
+
+                    start.reserve(idx+1);
+                    count.reserve(idx+1);
+
+                    for (int i = numElement - 1; i >= 0; --i)
+                    {
+                      if (2 == axisDomainOrder(i))
+                      {
+                        CDomain* domain = CDomain::get(domainList[idxDomain]);
+
+                        if (domain->isCompressible())
+                        {
+                          start.push_back(domain->getOffsetWrittenIndexes(comm_file));
+                          count.push_back(domain->getNumberWrittenIndexes(comm_file));
+                          idx -= 2;
+                        }
+                        else
+                        {
+                          if ((domain->type) != CDomain::type_attr::unstructured)
+                          {
+                            start.push_back(domain->jbegin);
+                            count.push_back(domain->nj);
+                          }
+                          --idx;
+                          start.push_back(domain->ibegin);
+                          count.push_back(domain->ni);
+                          --idx;
+                        }
+                        --idxDomain;
+                      }
+                      else if (1 == axisDomainOrder(i))
+                      {
+                        CAxis* axis = CAxis::get(axisList[idxAxis]);
+
+                        if (axis->isCompressible())
+                        {
+                          start.push_back(axis->getOffsetWrittenIndexes(comm_file));
+                          count.push_back(axis->getNumberWrittenIndexes(comm_file));
+                        }
+                        else
+                        {
+                          start.push_back(axis->begin);
+                          count.push_back(axis->n);
+                        }
+                        --idxAxis;
+                        --idx;
+                      }
+                    }
+                  }
+                }
+                else
+                {
+                  CArray<int,1> axisDomainOrder = grid->axis_domain_order;
+                  std::vector<StdString> domainList = grid->getDomainList();
+                  std::vector<StdString> axisList   = grid->getAxisList();
+                  int numElement = axisDomainOrder.numElements();
+                  int idxDomain = domainList.size() - 1, idxAxis = axisList.size() - 1;
+                  int idx = domainList.size() * 2 + axisList.size() - 1;
+
+                  start.reserve(idx+1);
+                  count.reserve(idx+1);
+
+                  for (int i = numElement - 1; i >= 0; --i)
+                  {
+                    if (2 == axisDomainOrder(i))
+                    {
+                      CDomain* domain = CDomain::get(domainList[idxDomain]);
+                      if ((domain->type) != CDomain::type_attr::unstructured)
+                      {
+                        start.push_back(domain->jbegin);
+                        count.push_back(domain->nj);
+                      }
+                      --idx ;
+
+                        start.push_back(domain->ibegin);
+                        count.push_back(domain->ni);
+                      --idx ;
+                      --idxDomain;
+                    }
+                    else if (1 == axisDomainOrder(i))
+                    {
+                        CAxis* axis = CAxis::get(axisList[idxAxis]);
+                        start.push_back(axis->begin);
+                        count.push_back(axis->n);
+                      --idx;
+                      --idxAxis;
+                    }
+                    else
+                    {
+                      if (1 == axisDomainOrder.numElements())
+                      {
+                        start.push_back(0);
+                        count.push_back(1);
+                      }
+                      --idx;
+                    }
+                  }
+                }
+
+
+                CTimer::get("Files : writing data").resume();
+                SuperClassWriter::writeData(fieldData, fieldid, isCollective, field->getNStep() - 1, &start, &count);
+                CTimer::get("Files : writing data").suspend();
+
+                 if (wtime)
+                 {
+                   CTimer::get("Files : writing time axis").resume();
+                   if ( wtimeData)
+                   {
+                     SuperClassWriter::writeTimeAxisData(time_data, timeAxisId, isCollective, field->getNStep() - 1, isRoot);
+                     SuperClassWriter::writeTimeAxisDataBounds(time_data_bound, timeAxisBoundId, isCollective, field->getNStep() - 1, isRoot);
+                   }
+                   if (wtimeCounter)
+                   {
+                     SuperClassWriter::writeTimeAxisData(time_counter, getTimeCounterName(), isCollective, field->getNStep() - 1,isRoot);
+                     if (timeCounterType!=record) SuperClassWriter::writeTimeAxisDataBounds(time_counter_bound, timeBoundId, isCollective, field->getNStep() - 1, isRoot);
+
+                   }
+                   CTimer::get("Files : writing time axis").suspend();  
+                 }
+
+                break;
+              }
+            }
+         }
+         catch (CNetCdfException& e)
+         {
+           StdString msg("On writing field data: ");
+           msg.append(fieldid); msg.append("\n");
+           msg.append("In the context : ");
+           msg.append(context->getId()); msg.append("\n");
+           msg.append(e.what());
+           ERROR("CNc4DataOutput::writeFieldData_ (CField*  field)", << msg);
+         }
+      }
+
+      //---------------------------------------------------------------
+
+      void CNc4DataOutput::writeTimeAxis_
+                  (CField*    field,
+                   const std::shared_ptr<CCalendar> cal)
+      {
+         StdOStringStream oss;
+         bool createInstantAxis=false ;
+         bool createCenteredAxis=false ;
+         bool createTimeCounterAxis=false ;
+         
+         if (field->getOperationTimeType() == func::CFunctor::once) return ;
+
+
+         StdString axisId ;
+         StdString axisBoundId;
+         StdString timeid(getTimeCounterName());
+         StdString timeBoundId("axis_nbounds");
+
+         StdString strTimeUnits ;
+         if (!field->file->time_units.isEmpty() && field->file->time_units==CFile::time_units_attr::days) strTimeUnits="days since " ;
+         else  strTimeUnits="seconds since " ;
+ 
+         if (field->getOperationTimeType() == func::CFunctor::instant) field->hasTimeInstant = true;
+         if (field->getOperationTimeType() == func::CFunctor::centered) field->hasTimeCentered = true;
+
+
+         if (field->file->time_counter.isEmpty())
+         {
+           if (timeCounterType==none) createTimeCounterAxis=true ;
+           if (field->hasTimeCentered)
+           {
+             timeCounterType=centered ;
+             if (!hasTimeCentered) createCenteredAxis=true ;
+           }
+           if (field->hasTimeInstant)
+           {
+             if (timeCounterType==none) timeCounterType=instant ;
+             if (!hasTimeInstant) createInstantAxis=true ;
+           }
+         }
+         else if (field->file->time_counter==CFile::time_counter_attr::instant)
+         {
+           if (field->hasTimeCentered)
+           {
+             if (!hasTimeCentered) createCenteredAxis=true ;
+           }
+           if (field->hasTimeInstant)
+           {
+             if (timeCounterType==none) createTimeCounterAxis=true ;
+             timeCounterType=instant ;
+             if (!hasTimeInstant) createInstantAxis=true ;
+           }
+         }
+         else if (field->file->time_counter==CFile::time_counter_attr::centered)
+         {
+           if (field->hasTimeCentered)
+           {
+             if (timeCounterType==none) createTimeCounterAxis=true ;
+             timeCounterType=centered ;
+             if (!hasTimeCentered) createCenteredAxis=true ;
+           }
+           if (field->hasTimeInstant)
+           {
+             if (!hasTimeInstant) createInstantAxis=true ;
+           }
+         }
+         else if (field->file->time_counter==CFile::time_counter_attr::instant_exclusive)
+         {
+           if (field->hasTimeCentered)
+           {
+             if (!hasTimeCentered) createCenteredAxis=true ;
+           }
+           if (field->hasTimeInstant)
+           {
+             if (timeCounterType==none) createTimeCounterAxis=true ;
+             timeCounterType=instant ;
+           }
+         }
+         else if (field->file->time_counter==CFile::time_counter_attr::centered_exclusive)
+         {
+           if (field->hasTimeCentered)
+           {
+             if (timeCounterType==none) createTimeCounterAxis=true ;
+             timeCounterType=centered ;
+           }
+           if (field->hasTimeInstant)
+           {
+             if (!hasTimeInstant) createInstantAxis=true ;
+           }
+         }
+         else if (field->file->time_counter==CFile::time_counter_attr::exclusive)
+         {
+           if (field->hasTimeCentered)
+           {
+             if (timeCounterType==none) createTimeCounterAxis=true ;
+             if (timeCounterType==instant) createInstantAxis=true ;
+             timeCounterType=centered ;
+           }
+           if (field->hasTimeInstant)
+           {
+             if (timeCounterType==none)
+             {
+               createTimeCounterAxis=true ;
+               timeCounterType=instant ;
+             }
+             if (timeCounterType==centered)
+             {
+               if (!hasTimeInstant) createInstantAxis=true ;
+             }
+           }
+         }
+         else if (field->file->time_counter==CFile::time_counter_attr::none)
+         {
+           if (field->hasTimeCentered)
+           {
+             if (!hasTimeCentered) createCenteredAxis=true ;
+           }
+           if (field->hasTimeInstant)
+           {
+             if (!hasTimeInstant) createInstantAxis=true ;
+           }
+         }
+         else if (field->file->time_counter==CFile::time_counter_attr::record)
+         {
+           if (timeCounterType==none) createTimeCounterAxis=true ;
+           timeCounterType=record ;
+           if (field->hasTimeCentered)
+           {
+             if (!hasTimeCentered) createCenteredAxis=true ;
+           }
+           if (field->hasTimeInstant)
+           {
+             if (!hasTimeInstant) createInstantAxis=true ;
+           }
+         }
+         
+         if (createInstantAxis)
+         {
+           axisId="time_instant" ;
+           axisBoundId="time_instant_bounds";
+           hasTimeInstant=true ;
+         }
+
+         if (createCenteredAxis)
+         {
+           axisId="time_centered" ;
+           axisBoundId="time_centered_bounds";
+           hasTimeCentered=true ;
+         }
+
+         
+         try
+         {
+            std::vector<StdString> dims;
+            
+            if (createInstantAxis || createCenteredAxis)
+            {
+              // Adding time_instant or time_centered
+              dims.push_back(timeid);
+              if (!SuperClassWriter::varExist(axisId))
+              {
+                SuperClassWriter::addVariable(axisId, NC_DOUBLE, dims);
+
+                CDate timeOrigin=cal->getTimeOrigin() ;
+                StdOStringStream oss2;
+                StdString strInitdate=oss2.str() ;
+                StdString strTimeOrigin=timeOrigin.toString() ;
+                this->writeTimeAxisAttributes(axisId, cal->getType(),strTimeUnits+strTimeOrigin,
+                                              strTimeOrigin, axisBoundId);
+             }
+
+             // Adding time_instant_bounds or time_centered_bounds variables
+             if (!SuperClassWriter::varExist(axisBoundId))
+             {
+                dims.clear() ;
+                dims.push_back(timeid);
+                dims.push_back(timeBoundId);
+                SuperClassWriter::addVariable(axisBoundId, NC_DOUBLE, dims);
+             }
+           }
+
+           if (createTimeCounterAxis)
+           {
+             // Adding time_counter
+             axisId = getTimeCounterName();
+             axisBoundId = getTimeCounterName() + "_bounds";
+             dims.clear();
+             dims.push_back(timeid);
+             if (!SuperClassWriter::varExist(axisId))
+             {
+                SuperClassWriter::addVariable(axisId, NC_DOUBLE, dims);
+                SuperClassWriter::addAttribute("axis", string("T"), &axisId);
+
+                if (field->file->time_counter.isEmpty() || 
+                   (field->file->time_counter != CFile::time_counter_attr::record))
+                {
+                  CDate timeOrigin = cal->getTimeOrigin();
+                  StdString strTimeOrigin = timeOrigin.toString();
+
+                  this->writeTimeAxisAttributes(axisId, cal->getType(),
+                                                strTimeUnits+strTimeOrigin,
+                                                strTimeOrigin, axisBoundId);
+                }
+             }
+
+             // Adding time_counter_bound dimension
+             if (field->file->time_counter.isEmpty() || (field->file->time_counter != CFile::time_counter_attr::record))
+             {
+                if (!SuperClassWriter::varExist(axisBoundId))
+                {
+                  dims.clear();
+                  dims.push_back(timeid);
+                  dims.push_back(timeBoundId);
+                  SuperClassWriter::addVariable(axisBoundId, NC_DOUBLE, dims);
+                }
+             }
+           }
+         }
+         catch (CNetCdfException& e)
+         {
+           StdString msg("On writing time axis data: ");
+           msg.append("In the context : ");
+           CContext* context = CContext::getCurrent() ;
+           msg.append(context->getId()); msg.append("\n");
+           msg.append(e.what());
+           ERROR("CNc4DataOutput::writeTimeAxis_ (CField*    field, \
+                  const std::shared_ptr<CCalendar> cal)", << msg);
+         }
+      }
+
+      //---------------------------------------------------------------
+
+      void CNc4DataOutput::writeTimeAxisAttributes(const StdString & axis_name,
+                                                   const StdString & calendar,
+                                                   const StdString & units,
+                                                   const StdString & time_origin,
+                                                   const StdString & time_bounds,
+                                                   const StdString & standard_name,
+                                                   const StdString & long_name)
+      {
+         try
+         {
+           SuperClassWriter::addAttribute("standard_name", standard_name, &axis_name);
+           SuperClassWriter::addAttribute("long_name",     long_name    , &axis_name);
+           SuperClassWriter::addAttribute("calendar",      calendar     , &axis_name);
+           SuperClassWriter::addAttribute("units",         units        , &axis_name);
+           SuperClassWriter::addAttribute("time_origin",   time_origin  , &axis_name);
+           SuperClassWriter::addAttribute("bounds",        time_bounds  , &axis_name);
+         }
+         catch (CNetCdfException& e)
+         {
+           StdString msg("On writing time axis Attribute: ");
+           msg.append("In the context : ");
+           CContext* context = CContext::getCurrent() ;
+           msg.append(context->getId()); msg.append("\n");
+           msg.append(e.what());
+           ERROR("CNc4DataOutput::writeTimeAxisAttributes(const StdString & axis_name, \
+                                                          const StdString & calendar,\
+                                                          const StdString & units, \
+                                                          const StdString & time_origin, \
+                                                          const StdString & time_bounds, \
+                                                          const StdString & standard_name, \
+                                                          const StdString & long_name)", << msg);
+         }
+      }
+
+      //---------------------------------------------------------------
+
+      void CNc4DataOutput::writeAxisAttributes(const StdString & axis_name,
+                                               const StdString & axis,
+                                               const StdString & standard_name,
+                                               const StdString & long_name,
+                                               const StdString & units,
+                                               const StdString & nav_model)
+      {
+         try
+         {
+          if (!axis.empty())
+            SuperClassWriter::addAttribute("axis"       , axis         , &axis_name);
+
+          SuperClassWriter::addAttribute("standard_name", standard_name, &axis_name);
+          SuperClassWriter::addAttribute("long_name"    , long_name    , &axis_name);
+          SuperClassWriter::addAttribute("units"        , units        , &axis_name);
+//          SuperClassWriter::addAttribute("nav_model"    , nav_model    , &axis_name);
+         }
+         catch (CNetCdfException& e)
+         {
+           StdString msg("On writing Axis Attribute: ");
+           msg.append("In the context : ");
+           CContext* context = CContext::getCurrent() ;
+           msg.append(context->getId()); msg.append("\n");
+           msg.append(e.what());
+           ERROR("CNc4DataOutput::writeAxisAttributes(const StdString & axis_name, \
+                                                      const StdString & axis, \
+                                                      const StdString & standard_name, \
+                                                      const StdString & long_name, \
+                                                      const StdString & units, \
+                                                      const StdString & nav_model)", << msg);
+         }
+      }
+
+      //---------------------------------------------------------------
+
+      void CNc4DataOutput::writeLocalAttributes
+         (int ibegin, int ni, int jbegin, int nj, StdString domid)
+      {
+        try
+        {
+         SuperClassWriter::addAttribute(StdString("ibegin").append(domid), ibegin);
+         SuperClassWriter::addAttribute(StdString("ni"    ).append(domid), ni);
+         SuperClassWriter::addAttribute(StdString("jbegin").append(domid), jbegin);
+         SuperClassWriter::addAttribute(StdString("nj"    ).append(domid), nj);
+        }
+        catch (CNetCdfException& e)
+        {
+           StdString msg("On writing Local Attributes: ");
+           msg.append("In the context : ");
+           CContext* context = CContext::getCurrent() ;
+           msg.append(context->getId()); msg.append("\n");
+           msg.append(e.what());
+           ERROR("CNc4DataOutput::writeLocalAttributes \
+                  (int ibegin, int ni, int jbegin, int nj, StdString domid)", << msg);
+        }
+
+      }
+
+      void CNc4DataOutput::writeLocalAttributes_IOIPSL(const StdString& dimXid, const StdString& dimYid,
+                                                       int ibegin, int ni, int jbegin, int nj, int ni_glo, int nj_glo, int rank, int size)
+      {
+         CArray<int,1> array(2) ;
+
+         try
+         {
+           SuperClassWriter::addAttribute("DOMAIN_number_total",size ) ;
+           SuperClassWriter::addAttribute("DOMAIN_number", rank) ;
+           array = SuperClassWriter::getDimension(dimXid) + 1, SuperClassWriter::getDimension(dimYid) + 1;
+           SuperClassWriter::addAttribute("DOMAIN_dimensions_ids",array) ;
+           array=ni_glo,nj_glo ;
+           SuperClassWriter::addAttribute("DOMAIN_size_global", array) ;
+           array=ni,nj ;
+           SuperClassWriter::addAttribute("DOMAIN_size_local", array) ;
+           array=ibegin+1,jbegin+1 ;
+           SuperClassWriter::addAttribute("DOMAIN_position_first", array) ;
+           array=ibegin+ni-1+1,jbegin+nj-1+1 ;
+           SuperClassWriter::addAttribute("DOMAIN_position_last",array) ;
+           array=0,0 ;
+           SuperClassWriter::addAttribute("DOMAIN_halo_size_start", array) ;
+           SuperClassWriter::addAttribute("DOMAIN_halo_size_end", array);
+           SuperClassWriter::addAttribute("DOMAIN_type",string("box")) ;
+  /*
+           SuperClassWriter::addAttribute("DOMAIN_DIM_N001",string("x")) ;
+           SuperClassWriter::addAttribute("DOMAIN_DIM_N002",string("y")) ;
+           SuperClassWriter::addAttribute("DOMAIN_DIM_N003",string("axis_A")) ;
+           SuperClassWriter::addAttribute("DOMAIN_DIM_N004",string("time_counter")) ;
+  */
+         }
+         catch (CNetCdfException& e)
+         {
+           StdString msg("On writing Local Attributes IOIPSL \n");
+           msg.append("In the context : ");
+           CContext* context = CContext::getCurrent() ;
+           msg.append(context->getId()); msg.append("\n");
+           msg.append(e.what());
+           ERROR("CNc4DataOutput::writeLocalAttributes_IOIPSL \
+                  (int ibegin, int ni, int jbegin, int nj, int ni_glo, int nj_glo, int rank, int size)", << msg);
+         }
+      }
+      //---------------------------------------------------------------
+
+      void CNc4DataOutput:: writeFileAttributes(const StdString & name,
+                                                const StdString & description,
+                                                const StdString & conventions,
+                                                const StdString & production,
+                                                const StdString & timeStamp)
+      {
+         try
+         {
+           SuperClassWriter::addAttribute("name"       , name);
+           SuperClassWriter::addAttribute("description", description);
+           SuperClassWriter::addAttribute("title"      , description);
+           SuperClassWriter::addAttribute("Conventions", conventions);
+           // SuperClassWriter::addAttribute("production" , production);
+
+           StdString timeStampStr ;
+           if (file->time_stamp_name.isEmpty()) timeStampStr="timeStamp" ;
+           else timeStampStr=file->time_stamp_name ;
+           SuperClassWriter::addAttribute(timeStampStr, timeStamp);
+
+           StdString uuidName ;
+           if (file->uuid_name.isEmpty()) uuidName="uuid" ;
+           else uuidName=file->uuid_name ;
+
+           if (file->uuid_format.isEmpty()) SuperClassWriter::addAttribute(uuidName, getUuidStr());
+           else SuperClassWriter::addAttribute(uuidName, getUuidStr(file->uuid_format));
+          
+         }
+         catch (CNetCdfException& e)
+         {
+           StdString msg("On writing File Attributes \n ");
+           msg.append("In the context : ");
+           CContext* context = CContext::getCurrent() ;
+           msg.append(context->getId()); msg.append("\n");
+           msg.append(e.what());
+           ERROR("CNc4DataOutput:: writeFileAttributes(const StdString & name, \
+                                                const StdString & description, \
+                                                const StdString & conventions, \
+                                                const StdString & production, \
+                                                const StdString & timeStamp)", << msg);
+         }
+      }
+
+      //---------------------------------------------------------------
+
+      void CNc4DataOutput::writeMaskAttributes(const StdString & mask_name,
+                                               int data_dim,
+                                               int data_ni,
+                                               int data_nj,
+                                               int data_ibegin,
+                                               int data_jbegin)
+      {
+         try
+         {
+           SuperClassWriter::addAttribute("data_dim"   , data_dim   , &mask_name);
+           SuperClassWriter::addAttribute("data_ni"    , data_ni    , &mask_name);
+           SuperClassWriter::addAttribute("data_nj"    , data_nj    , &mask_name);
+           SuperClassWriter::addAttribute("data_ibegin", data_ibegin, &mask_name);
+           SuperClassWriter::addAttribute("data_jbegin", data_jbegin, &mask_name);
+         }
+         catch (CNetCdfException& e)
+         {
+           StdString msg("On writing Mask Attributes \n ");
+           msg.append("In the context : ");
+           CContext* context = CContext::getCurrent() ;
+           msg.append(context->getId()); msg.append("\n");
+           msg.append(e.what());
+           ERROR("CNc4DataOutput::writeMaskAttributes(const StdString & mask_name, \
+                                               int data_dim, \
+                                               int data_ni, \
+                                               int data_nj, \
+                                               int data_ibegin, \
+                                               int data_jbegin)", << msg);
+         }
+      }
+
+      ///--------------------------------------------------------------
+
+      StdSize CNc4DataOutput::getRecordFromTime(Time time, double factorUnit)
+      {
+        std::map<Time, StdSize>::const_iterator it = timeToRecordCache.find(time);
+        if (it == timeToRecordCache.end())
+        {
+          StdString timeAxisBoundsId(getTimeCounterName() + "_bounds");
+          if (!SuperClassWriter::varExist(timeAxisBoundsId)) timeAxisBoundsId = "time_centered_bounds";
+          if (!SuperClassWriter::varExist(timeAxisBoundsId)) timeAxisBoundsId = "time_instant_bounds";
+
+          CArray<double,2> timeAxisBounds;
+          std::vector<StdSize> dimSize(SuperClassWriter::getDimensions(timeAxisBoundsId)) ;
+          
+          StdSize record = 0;
+          double dtime(time);
+          for (int n = dimSize[0] - 1; n >= 0; n--)
+          {
+            SuperClassWriter::getTimeAxisBounds(timeAxisBounds, timeAxisBoundsId, isCollective, n);
+            timeAxisBounds*=factorUnit ;
+            if (timeAxisBounds(1, 0) < dtime)
+            {
+              record = n + 1;
+              break;
+            }
+          }
+          it = timeToRecordCache.insert(std::make_pair(time, record)).first;
+        }
+        return it->second;
+      }
+
+      ///--------------------------------------------------------------
+
+      bool CNc4DataOutput::isWrittenDomain(const std::string& domainName) const
+      {
+        return (this->writtenDomains.find(domainName) != this->writtenDomains.end());
+      }
+
+      bool CNc4DataOutput::isWrittenCompressedDomain(const std::string& domainName) const
+      {
+        return (this->writtenCompressedDomains.find(domainName) != this->writtenCompressedDomains.end());
+      }
+
+      bool CNc4DataOutput::isWrittenAxis(const std::string& axisName) const
+      {
+        return (this->writtenAxis.find(axisName) != this->writtenAxis.end());
+      }
+
+      bool CNc4DataOutput::isWrittenCompressedAxis(const std::string& axisName) const
+      {
+        return (this->writtenCompressedAxis.find(axisName) != this->writtenCompressedAxis.end());
+      }
+
+      bool CNc4DataOutput::isWrittenScalar(const std::string& scalarName) const
+      {
+        return (this->writtenScalar.find(scalarName) != this->writtenScalar.end());
+      }
+
+      void CNc4DataOutput::setWrittenDomain(const std::string& domainName)
+      {
+        this->writtenDomains.insert(domainName);
+      }
+
+      void CNc4DataOutput::setWrittenCompressedDomain(const std::string& domainName)
+      {
+        this->writtenCompressedDomains.insert(domainName);
+      }
+
+      void CNc4DataOutput::setWrittenAxis(const std::string& axisName)
+      {
+        this->writtenAxis.insert(axisName);
+      }
+
+      void CNc4DataOutput::setWrittenCompressedAxis(const std::string& axisName)
+      {
+        this->writtenCompressedAxis.insert(axisName);
+      }
+
+      void CNc4DataOutput::setWrittenScalar(const std::string& scalarName)
+      {
+        this->writtenScalar.insert(scalarName);
+      }
+} // namespace xios
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/io/nc4_data_output.hpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/io/nc4_data_output.hpp	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/io/nc4_data_output.hpp	(revision 1749)
@@ -0,0 +1,134 @@
+#ifndef __XIOS_NC4_DATA_OUTPUT__
+#define __XIOS_NC4_DATA_OUTPUT__
+
+/// XIOS headers ///
+#include "xios_spl.hpp"
+#include "onetcdf4.hpp"
+#include "data_output.hpp"
+
+namespace xios
+{
+      /// ////////////////////// DÃ©clarations ////////////////////// ///
+
+      class CNc4DataOutput
+         : protected CONetCDF4
+         , public virtual CDataOutput
+      {
+         public :
+
+            /// DÃ©finition de type ///
+            typedef CONetCDF4   SuperClassWriter;
+            typedef CDataOutput SuperClass;
+
+            /// Constructeurs ///
+            CNc4DataOutput
+               (CFile* file, const StdString & filename, bool exist);
+            CNc4DataOutput
+               (CFile* file, const StdString & filename, bool exist, bool useClassicFormat,
+                bool useCFConvention,
+                MPI_Comm comm_file, bool multifile, bool isCollective = true,
+                const StdString& timeCounterName = "time_counter");
+
+            CNc4DataOutput(const CNc4DataOutput & dataoutput);       // Not implemented.
+            CNc4DataOutput(const CNc4DataOutput * const dataoutput); // Not implemented.
+            
+            /// Accesseur ///
+            const StdString & getFileName(void) const;
+
+            /// Destructeur ///
+            virtual ~CNc4DataOutput(void);
+            
+            bool singleDomain ;
+            bool isCollective ;
+            int compressionLevel ;
+                      
+            CFile* file;
+                      
+         protected :
+
+            /// Ecriture ///
+            virtual void writeDomain_   (CDomain* domain);
+            virtual void writeAxis_     (CAxis* axis);
+            virtual void writeScalar_   (CScalar* scalar);
+            virtual void writeGridCompressed_(CGrid* grid);
+            virtual void writeTimeDimension_(void);
+            virtual void writeField_    (CField* field);
+            virtual void writeAttribute_(CVariable* var);
+            virtual void writeAttribute_(CVariable* var, const string& fieldId);
+            virtual void writeFieldData_(CField* field);
+            virtual void writeFile_     (CFile* file);
+            virtual void closeFile_     (void);
+            virtual void syncFile_      (void);
+            virtual void writeTimeAxis_ (CField* field,
+                                         const std::shared_ptr<CCalendar> cal);
+
+         protected :
+            void writeUnstructuredDomain (CDomain* domain);
+            void writeUnstructuredDomainUgrid (CDomain* domain);
+            void writeLocalAttributes(int ibegin, int ni, int jbegin, int nj, StdString domid);
+            void writeLocalAttributes_IOIPSL(const StdString& dimXid, const StdString& dimYid,
+                                             int ibegin, int ni, int jbegin, int nj, int ni_glo, int nj_glo, int rank, int size);
+            void writeTimeAxisAttributes(const StdString & axis_name,
+                                         const StdString & calendar,
+                                         const StdString & units,
+                                         const StdString & time_origin,
+                                         const StdString & time_bounds   = StdString("bounds"),
+                                         const StdString & standard_name = StdString("time"),
+                                         const StdString & long_name     = StdString("Time axis"));
+
+            void writeFileAttributes(const StdString & name,
+                                     const StdString & description,
+                                     const StdString & conventions,
+                                     const StdString & production,
+                                     const StdString & timeStamp);
+
+            void writeMaskAttributes(const StdString & mask_name,
+                                     int data_dim,
+                                     int data_ni     = 0,
+                                     int data_nj     = 0,
+                                     int data_ibegin = 0,
+                                     int data_jbegin = 0);
+
+            void writeAxisAttributes(const StdString & axis_name,
+                                     const StdString & axis,
+                                     const StdString & standard_name,
+                                     const StdString & long_name,
+                                     const StdString & units,
+                                     const StdString & nav_model);
+
+            StdSize getRecordFromTime(Time time, double factorUnit);
+
+         private :
+
+            /// Traitement ///
+            StdString getTimeStamp(void) const;
+
+            bool isWrittenDomain(const std::string& domainName) const;
+            bool isWrittenCompressedDomain(const std::string& domainName) const;
+            bool isWrittenAxis(const std::string& axisName) const;
+            bool isWrittenCompressedAxis(const std::string& axisName) const;
+            bool isWrittenScalar(const std::string& scalarName) const;
+
+            void setWrittenDomain(const std::string& domainName);
+            void setWrittenCompressedDomain(const std::string& domainName);
+            void setWrittenAxis(const std::string& axisName);
+            void setWrittenCompressedAxis(const std::string& axisName);
+            void setWrittenScalar(const std::string& scalarName);
+
+            /// PropriÃ©tÃ©s privÃ©es ///
+            MPI_Comm comm_file;
+            const StdString filename;
+            std::map<Time, StdSize> timeToRecordCache;
+
+            std::set<std::string> writtenDomains, writtenCompressedDomains;
+            std::set<std::string> writtenAxis, writtenCompressedAxis;
+            std::set<std::string> writtenScalar;
+
+            enum { none, centered, instant, record} timeCounterType ;
+            bool hasTimeInstant ;
+            bool hasTimeCentered ;
+      }; // class CNc4DataOutput
+
+} // namespace xios
+
+#endif //__XIOS_NC4_DATA_OUTPUT__
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/io/netCdfException.hpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/io/netCdfException.hpp	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/io/netCdfException.hpp	(revision 1749)
@@ -0,0 +1,34 @@
+/*!
+   \file netCdfException.hpp
+   \author Ha NGUYEN
+   \date 08 Oct 2014
+   \since 07 Oct 2014
+
+   \brief Exception management.
+ */
+#ifndef __NETCDF_EXCEPTION_HPP__
+#define __NETCDF_EXCEPTION_HPP__
+
+#include <iostream>
+#include <exception>
+
+namespace xios
+{
+/*!
+\class CNetCdfException
+ This class manages exceptions risen by CNetCdfInterface
+*/
+class CNetCdfException : public virtual std::exception
+{
+public:
+  CNetCdfException(const std::string& ss) : exStr_(ss) {}
+  CNetCdfException(const CNetCdfException& netEx) : exStr_(netEx.exStr_) {}
+  ~CNetCdfException() throw() {}
+  const char* what() const throw() { return exStr_.c_str();}
+protected:
+  std::string exStr_;
+};
+
+}
+
+#endif // __NETCDF_EXCEPTION_HPP__
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/io/netCdfInterface.cpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/io/netCdfInterface.cpp	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/io/netCdfInterface.cpp	(revision 1749)
@@ -0,0 +1,1067 @@
+/*!
+   \file netCdfInterface.cpp
+   \author Ha NGUYEN
+   \date 08 Oct 2014
+   \since 03 Oct 2014
+
+   \brief Wrapper of netcdf functions.
+ */
+
+#include "netCdfInterface.hpp"
+#include "netCdfException.hpp"
+
+namespace xios
+{
+/*!
+This function creates a new netcdf file and return its id
+\param [in] fileName Name of the file
+\param [in] cMode create mode
+\param [in/out] ncId id of the created file
+\return Status code
+*/
+int CNetCdfInterface::create(const StdString& fileName, int cMode, int& ncId)
+{
+  int status = nc_create(fileName.c_str(), cMode, &ncId);
+  if (NC_NOERR != status)
+  {
+    StdString errormsg(nc_strerror(status));
+    StdStringStream sstr;
+    sstr << "Error when calling function: nc_create(fileName.c_str(), cMode, &ncId) " << std::endl
+         << errormsg << std::endl
+         << "Unable to create file, given its name: " << fileName
+         << " and its creation mode " << creationMode2String(cMode) << std::endl;
+    StdString e = sstr.str();
+    throw CNetCdfException(e);
+  }
+
+  return status;
+}
+
+/*!
+This function creates a new netcdf file on parallel file system
+\param [in] fileName Name of the file
+\param [in] cMode create mode
+\param [in] comm MPI communicator
+\param [in] info MPI information
+\param [in/out] ncId id of the created file
+\return Status code
+*/
+int CNetCdfInterface::createPar(const StdString& fileName, int cMode, MPI_Comm comm, MPI_Info info, int& ncId)
+{
+  int status = xios::nc_create_par(fileName.c_str(), cMode, comm, info, &ncId);
+  if (NC_NOERR != status)
+  {
+    StdString errormsg(nc_strerror(status));
+    StdStringStream sstr;
+    sstr << "Error when calling function: nc_create_par(fileName.c_str(), cMode, comm, info, &ncId) " << std::endl
+         << errormsg << std::endl
+         << "Unable to create file on parallel file system, given its name: " << std::endl
+         << "and its creation mode " << creationMode2String(cMode) << std::endl;
+    StdString e = sstr.str();
+    throw CNetCdfException(e);
+  }
+
+  return status;
+}
+
+/*!
+This function opens a netcdf file, given its name and open mode, return its id
+\param [in] fileName Name of the file
+\param [in] oMode open mode
+\param [in/out] ncId id of the opening file
+\return Status code
+*/
+int CNetCdfInterface::open(const StdString& fileName, int oMode, int& ncId)
+{
+  int status = nc_open(fileName.c_str(), oMode, &ncId);
+  if (NC_NOERR != status)
+  {
+    StdString errormsg(nc_strerror(status));
+    StdStringStream sstr;
+    sstr << "Error when calling function: nc_open(fileName.c_str(), oMode, &ncId) "<< std::endl
+         << errormsg << std::endl
+         << "Unable to open file, given its name: " << fileName
+         << "and its open mode " << openMode2String(oMode) << std::endl;
+    StdString e = sstr.str();
+    throw CNetCdfException(e);
+  }
+
+  return status;
+}
+
+
+/*!
+This function opens a new netcdf file on parallel file system
+\param [in] fileName Name of the file
+\param [in] oMode open mode
+\param [in] comm MPI communicator
+\param [in] info MPI information
+\param [in/out] ncId id of the opened file
+\return Status code
+*/
+int CNetCdfInterface::openPar(const StdString& fileName, int oMode, MPI_Comm comm, MPI_Info info, int& ncId)
+{
+  int status = xios::nc_open_par(fileName.c_str(), oMode, comm, info, &ncId);
+  if (NC_NOERR != status)
+  {
+    StdString errormsg(nc_strerror(status));
+    StdStringStream sstr;
+    sstr << "Error when calling function nc_open_par(fileName.c_str(), oMode, comm, info, &ncId) " << std::endl
+         << errormsg << std::endl
+         << "Unable to open file on parallel file system, given its name: " << fileName
+         << "and its open mode " << openMode2String(oMode) << std::endl;
+    StdString e = sstr.str();
+    throw CNetCdfException(e);
+  }
+
+  return status;
+}
+
+/*!
+This function closes a netcdf file, given its id
+\param [in] ncId id of the opening netcdf file
+\return Status code
+*/
+int CNetCdfInterface::close(int ncId)
+{
+  int status = nc_close(ncId);
+  if (NC_NOERR != status)
+  {
+    StdString errormsg(nc_strerror(status));
+    StdStringStream sstr;
+    sstr << "Error when calling function nc_close(ncId)" << std::endl
+         << errormsg << std::endl
+         << "Unable to close file, given its id: " << ncId << std::endl;
+    StdString e = sstr.str();
+    throw CNetCdfException(e);
+  }
+
+  return status;
+}
+
+/*!
+This function put a netcdf file into define mode, given its id
+\param [in] ncId id of the opening netcdf file to be put into define mode
+\return Status code
+*/
+int CNetCdfInterface::reDef(int ncId)
+{
+  int status = nc_redef(ncId);
+  if (NC_NOERR != status)
+  {
+    StdString errormsg(nc_strerror(status));
+    StdStringStream sstr;
+    sstr << "Error when calling function nc_redef(ncId)" << std::endl
+      << errormsg << std::endl
+      << "Unable to put this file into define mode given its id: " << ncId << std::endl;
+    StdString e = sstr.str();
+    throw CNetCdfException(e);
+  }
+
+  return status;
+}
+
+/*!
+This function ends a netcdf file define mode, given its id
+\param [in] ncId id of the opening netcdf file to be put into define mode
+\return Status code
+*/
+int CNetCdfInterface::endDef(int ncId)
+{
+  int status = nc_enddef(ncId);
+  if (NC_NOERR != status)
+  {
+    StdString errormsg(nc_strerror(status));
+    StdStringStream sstr;
+
+    sstr << "Error when calling function nc_enddef(ncId)" << std::endl
+         << errormsg << std::endl
+         << "Unable to end define mode of this file, given its id: " << ncId << std::endl;
+    StdString e = sstr.str();
+    throw CNetCdfException(e);
+  }
+
+  return status;
+}
+
+/*!
+This function makes a request to netcdf with ncid and group name then return ncid of the named group
+\param [in] ncid Groupd id (or File Id)
+\param [in] grpName Name of the desired group (or file)
+\param [in/out] grpId Group id if the group is found
+\return Status code
+*/
+int CNetCdfInterface::inqNcId(int ncid, const StdString& grpName, int& grpId)
+{
+  int status = nc_inq_ncid(ncid, grpName.c_str(), &grpId);
+  if (NC_NOERR != status)
+  {
+    StdString errormsg(nc_strerror(status));
+    StdStringStream sstr;
+
+    sstr << "Error when calling function nc_inq_ncid(ncid, grpName.c_str(), &grpId)" << std::endl
+         << errormsg << std::endl
+         << "Unable to get id of a group (File), given its name: " << grpName << std::endl;
+    StdString e = sstr.str();
+    throw CNetCdfException(e);
+  }
+
+  return status;
+}
+
+
+/*!
+This function makes a request to netcdf with ncid and variable name then return ncid of the named variable
+\param [in] ncid Groupd id (or File Id)
+\param [in] varName Name of the desired variable
+\param [in/out] varId Variable id if this variable is found
+\return Status code
+*/
+int CNetCdfInterface::inqVarId(int ncid, const StdString& varName, int& varId)
+{
+  int status = nc_inq_varid(ncid, varName.c_str(), &varId);
+  if (NC_NOERR != status)
+  {
+    StdString errormsg(nc_strerror(status));
+    StdStringStream sstr;
+
+    sstr << "Error when calling function: nc_inq_varid(ncid, varName.c_str(), &varId)" << std::endl
+         << (errormsg) << std::endl
+         << "Unable to get id of variable with name: " << varName << std::endl;
+    StdString e = sstr.str();
+    throw CNetCdfException(e);
+  }
+
+  return status;
+}
+
+/*!
+This function makes a request to netcdf with a netCdf dimension name then return ncid of the named dimension
+\param [in] ncid Groupd id (or File Id)
+\param [in] dimName Name of the desired dimension
+\param [in/out] dimId Dimension id if this dimension is found
+\return Status code
+*/
+int CNetCdfInterface::inqDimId(int ncid, const StdString& dimName, int& dimId)
+{
+  int status = nc_inq_dimid(ncid, dimName.c_str(), &dimId);
+  if (NC_NOERR != status)
+  {
+    StdString errormsg(nc_strerror(status));
+    StdStringStream sstr;
+
+    sstr << "Error when calling function nc_inq_dimid(ncid, dimName.c_str(), &dimId)" << std::endl
+         << errormsg << std::endl
+         << "Unable to get id of dimension, given its name: " << dimName << std::endl;
+    StdString e = sstr.str();
+    throw CNetCdfException(e);
+  }
+
+  return status;
+}
+
+/*!
+This function queries the name of a variable given its id.
+\param [in] ncid Groupd id (or File Id)
+\param [in] varId Id of desired variable
+\param [out] varName name of desired variable
+\return Status code
+*/
+int CNetCdfInterface::inqVarName(int ncid, int varId, StdString& varName)
+{
+  char varNameBuff[NC_MAX_NAME + 1];
+  int status = nc_inq_varname(ncid, varId, varNameBuff);
+  if (NC_NOERR != status)
+  {
+    StdString errormsg(nc_strerror(status));
+    StdStringStream sstr;
+
+    sstr << "Error when calling function nc_inq_varname(ncid, varId, varNameBuff)" << std::endl
+         << errormsg << std::endl
+         << "Unable to get variable name: "<< varName << " given its id: " << varId << std::endl;
+    StdString e = sstr.str();
+    throw CNetCdfException(e);
+  }
+  varName = varNameBuff;
+  return status;
+}
+
+/*!
+This function makes a request to netcdf with a netCdf dimension name then return ncid of the named dimension
+\param [in] ncid Groupd id (or File Id)
+\param [in/out] dimId Dimension id if this dimension is found
+\return Status code
+*/
+int CNetCdfInterface::inqUnLimDim(int ncid, int& dimId)
+{
+  int status = nc_inq_unlimdim(ncid, &dimId);
+  if (NC_NOERR != status)
+  {
+    StdString errormsg(nc_strerror(status));
+    StdStringStream sstr;
+
+    sstr << "Error when calling function nc_inq_dimid" << std::endl
+      << errormsg << std::endl
+      << "Unable to get id of unlimited dimension " << std::endl;
+    StdString e = sstr.str();
+    throw CNetCdfException(e);
+ }
+
+  return status;
+}
+
+/*!
+This function makes a request to netcdf, returns name of a dimension, given its id
+\param [in] ncid Groupd id (or File Id)
+\param [in] dimId Id of desired dimension
+\param [out] dimName Name of desired dimension
+\return Status code
+*/
+int CNetCdfInterface::inqDimName(int ncid, int dimId, StdString& dimName)
+{
+  char fullNameIn[NC_MAX_NAME + 1];
+  int status = nc_inq_dimname(ncid, dimId, fullNameIn);
+  if (NC_NOERR != status)
+  {
+    StdString errormsg(nc_strerror(status));
+    StdStringStream sstr;
+
+    sstr << "Error when calling function nc_inq_dimname(ncid, dimId, fullNameIn)" << std::endl
+         << errormsg << std::endl
+         << "Unable to get dimension name: " << dimName << " given its id: " << dimId << std::endl;
+    StdString e = sstr.str();
+    throw CNetCdfException(e);
+  }
+  dimName = StdString(fullNameIn);
+  return status;
+}
+
+/*!
+This function makes a request to netcdf, returns length of a dimension, given its id
+\param [in] ncid Groupd id (or File Id)
+\param [in] dimId Id of desired dimension
+\param [in/out] dimLen Length of desired dimension
+\return Status code
+*/
+int CNetCdfInterface::inqDimLen(int ncid, int dimId, StdSize& dimLen)
+{
+  int status = nc_inq_dimlen(ncid, dimId, &dimLen);
+  if (NC_NOERR != status)
+  {
+    StdString errormsg(nc_strerror(status));
+    StdStringStream sstr;
+
+    sstr << "Error when calling function nc_inq_dimlen(ncid, dimId, &dimLen)" << std::endl
+         << errormsg << std::endl
+         << "Unable to get dimension length given its id: " << dimId << std::endl;
+    StdString e = sstr.str();
+    throw CNetCdfException(e);
+  }
+
+  return status;
+}
+
+/*!
+This function makes a request to netcdf, returns number of dimensions of a variable, given its id
+\param [in] ncid Groupd id (or File Id)
+\param [in] varId Id of variable
+\param [in/out] ndims number of dimension of the variable
+\return Status code
+*/
+int CNetCdfInterface::inqVarNDims(int ncid, int varId, int& nDims)
+{
+  int status = nc_inq_varndims(ncid, varId, &nDims);
+  if (NC_NOERR != status)
+  {
+    StdString errormsg(nc_strerror(status));
+    StdStringStream sstr;
+
+    sstr << "Error when calling function nc_inq_varndims(ncid, varId, &nDims)" << std::endl
+         << errormsg << std::endl
+         << "Unable to get the number of dimension of variable with Id: " << varId << std::endl;
+    StdString e = sstr.str();
+    throw CNetCdfException(e);
+  }
+
+  return status;
+}
+
+/*!
+This function makes a request to netcdf, returns a list of dimension ID describing the shape of the variable, given its id
+\param [in] ncid Groupd id (or File Id)
+\param [in] varId Id of variable
+\param [in/out] dimIds list of dimension of the variable
+\return Status code
+*/
+int CNetCdfInterface::inqVarDimId(int ncid, int varId, int* dimIds)
+{
+  int status = nc_inq_vardimid(ncid, varId, dimIds);
+  if (NC_NOERR != status)
+  {
+    StdString errormsg(nc_strerror(status));
+    StdStringStream sstr;
+
+    sstr << "Error when calling function nc_inq_vardimid(ncid, varId, dimIds)" << std::endl
+         << errormsg << std::endl
+         << "Unable to get list of dimension id of the variable with id " << varId << std::endl;
+    StdString e = sstr.str();
+    throw CNetCdfException(e);
+  }
+
+  return status;
+}
+
+/*!
+This function makes a request to netcdf, to find all dimension in a group
+\param [in] ncid Groupd id (or File Id)
+\param [in/out] nDims number of list of dimension
+\param [in/out] dimIds list of dimension in a group or any of its parent
+\param [in] includeParents number of parents
+\return Status code
+*/
+int CNetCdfInterface::inqDimIds(int ncid, int& nDims, int* dimIds, int includeParents)
+{
+  int status = nc_inq_dimids(ncid, &nDims, dimIds, includeParents);
+  if (NC_NOERR != status)
+  {
+    StdString errormsg(nc_strerror(status));
+    StdStringStream sstr;
+
+    sstr << "Error when calling function nc_inq_dimids(ncid, &nDims, dimIds, includeParents)" << std::endl;
+    sstr << errormsg << std::endl;
+    sstr << "Unable to retrieve number of dimension in the group with id: " << ncid << std::endl;
+    sstr << "With number of Parents " << includeParents << std::endl;
+    StdString e = sstr.str();
+    throw CNetCdfException(e);
+  }
+
+  return status;
+}
+
+/*!
+This function queries the full name of a group given its id.
+\param [in] ncid Groupd id (or File Id)
+\param [in/out] grpFullName the full name of the group
+\return Status code
+*/
+int CNetCdfInterface::inqGrpFullName(int ncid, StdString& grpFullName)
+{
+  StdSize strlen = 0;
+  std::vector<char> buff;
+  int status = nc_inq_grpname_full(ncid, &strlen, NULL);
+  if (NC_NOERR == status)
+  {
+    buff.resize(strlen + 1);
+    status = nc_inq_grpname_full(ncid, NULL, &buff[0]);
+  }
+
+  if (NC_NOERR != status)
+  {
+    StdString errormsg(nc_strerror(status));
+    StdStringStream sstr;
+
+    sstr << "Error when calling function nc_inq_grpname_full(ncid, &strlen, &buff[0])" << std::endl
+         << errormsg << std::endl
+         << "Unable to get the full group name given its id: " << ncid << std::endl;
+    StdString e = sstr.str();
+    throw CNetCdfException(e);
+  }
+
+  grpFullName.assign(buff.begin(), buff.end());
+
+  return status;
+}
+
+/*!
+This function queries the list of group ids given a location id.
+\param [in] ncid Groupd id (or File Id)
+\param [in/out] numgrps number of groups
+\param [in/out] ncids list of group ids
+\return Status code
+*/
+int CNetCdfInterface::inqGrpIds(int ncid, int& numgrps, int* ncids)
+{
+  int status = nc_inq_grps(ncid, &numgrps, ncids);
+  if (NC_NOERR != status)
+  {
+    StdString errormsg(nc_strerror(status));
+    StdStringStream sstr;
+
+    sstr << "Error when calling function nc_inq_grps(ncid, &numgrps, ncids)" << std::endl;
+    sstr << errormsg << std::endl;
+    sstr << "Unable to retrieve the list of groups for location id: " << ncid << std::endl;
+    StdString e = sstr.str();
+    throw CNetCdfException(e);
+  }
+
+  return status;
+}
+
+/*!
+This function queries the list of variable ids given a location id.
+\param [in] ncid Groupd id (or File Id)
+\param [in/out] nvars number of variables
+\param [in/out] varids list of variable ids
+\return Status code
+*/
+int CNetCdfInterface::inqVarIds(int ncid, int& nvars, int* varids)
+{
+  int status = nc_inq_varids(ncid, &nvars, varids);
+  if (NC_NOERR != status)
+  {
+    StdString errormsg(nc_strerror(status));
+    StdStringStream sstr;
+
+    sstr << "Error when calling function nc_inq_varids(ncid, &nvars, varids)" << std::endl;
+    sstr << errormsg << std::endl;
+    sstr << "Unable to retrieve the list of variables for location id: " << ncid << std::endl;
+    StdString e = sstr.str();
+    throw CNetCdfException(e);
+  }
+
+  return status;
+}
+
+/*!
+This function queries the type and the size of an attribute given its name and the id of the variable to which it is attached.
+\param [in] ncid Groupd id (or File Id)
+\param [in] varid the id of the variable to which the attribute is attached
+\param [in] name the name of the attribute
+\param [out] type the type of the attribute
+\param [out] len the size of the attribute
+\return Status code
+*/
+int CNetCdfInterface::inqAtt(int ncid, int varid, const StdString& name, nc_type& type, size_t& len)
+{
+  int status = nc_inq_att(ncid, varid, name.c_str(), &type, &len);
+  if (NC_NOERR != status)
+  {
+    StdString errormsg(nc_strerror(status));
+    StdStringStream sstr;
+
+    sstr << "Error when calling function nc_inq_att(ncid, varid, name.c_str(), &type, &len)" << std::endl;
+    sstr << errormsg << std::endl;
+    sstr << "Unable to query the attribute information given its name: " << name << " and its variable id:" << varid << std::endl;
+    StdString e = sstr.str();
+    throw CNetCdfException(e);
+  }
+
+  return status;
+}
+
+/*!
+This function queries the number of global attributes given a location id.
+\param [in] ncid Groupd id (or File Id)
+\param [out] ngatts the number of global attributes
+\return Status code
+*/
+int CNetCdfInterface::inqNAtts(int ncid, int& ngatts)
+{
+  int status = nc_inq_natts(ncid, &ngatts);
+  if (NC_NOERR != status)
+  {
+    StdString errormsg(nc_strerror(status));
+    StdStringStream sstr;
+
+    sstr << "Error when calling function nc_inq_natts(ncid, &ngatts)" << std::endl;
+    sstr << errormsg << std::endl;
+    sstr << "Unable to query the number of global attributes given the location id:" << ncid << std::endl;
+    StdString e = sstr.str();
+    throw CNetCdfException(e);
+  }
+
+  return status;
+}
+
+/*!
+This function queries the number of global attributes given a location id and a variable id.
+\param [in] ncid Groupd id (or File Id)
+\param [in] varid the id of the variable
+\param [out] natts the number of global attributes
+\return Status code
+*/
+int CNetCdfInterface::inqVarNAtts(int ncid, int varid, int& natts)
+{
+  int status = nc_inq_varnatts(ncid, varid, &natts);
+  if (NC_NOERR != status)
+  {
+    StdString errormsg(nc_strerror(status));
+    StdStringStream sstr;
+
+    sstr << "Error when calling function nc_inq_varnatts(ncid, varid, &natts)" << std::endl;
+    sstr << errormsg << std::endl;
+    sstr << "Unable to query the number of attributes given the location id:" << ncid << " and the variable id:" << varid << std::endl;
+    StdString e = sstr.str();
+    throw CNetCdfException(e);
+  }
+
+  return status;
+}
+
+
+//! Query the name of an attribute given a location id, a variable id and the attribute number
+int CNetCdfInterface::inqAttName(int ncid, int varid, int attnum, StdString& name)
+{
+  std::vector<char> attName(NC_MAX_NAME + 1,' ');
+  int status = nc_inq_attname(ncid, varid, attnum, &attName[0]);
+  if (NC_NOERR != status)
+  {
+    StdString errormsg(nc_strerror(status));
+    StdStringStream sstr;
+
+    sstr << "Error when calling function nc_inq_attname(ncid, varid, attnum, attName)" << std::endl;
+    sstr << errormsg << std::endl;
+    sstr << "Unable to query the name: " << name << " of attribute " << attnum << " given the location id:" << ncid << " and the variable id:" << varid << std::endl;
+    StdString e = sstr.str();
+    throw CNetCdfException(e);
+  }
+
+  int nameSize = 0;
+  while ((nameSize < NC_MAX_NAME) && (' ' != attName[nameSize] )) ++nameSize;
+  name.resize(nameSize);
+//  for (int idx = 0; idx < nameSize; ++idx) name.at(idx) = attName[idx];
+  std::copy(&attName[0], &attName[nameSize-1], name.begin());
+
+  return status;
+}
+
+/*!
+This function makes a request to netcdf with a id of a prent groupd and then return id of the created group, given its name
+\param [in] parentNcid Id of parent groupd(or File Id)
+\param [in] grpName Name of the desired group
+\param [in/out] grpId Group id if this group is created sucessfully
+\return Status code
+*/
+int CNetCdfInterface::defGrp(int parentNcid, const StdString& grpName, int& grpId)
+{
+  int status = nc_def_grp(parentNcid, grpName.c_str(), &grpId);
+  if (NC_NOERR != status)
+  {
+    StdString errormsg(nc_strerror(status));
+    StdStringStream sstr;
+
+    sstr << "Error when calling function nc_def_grp(parentNcid, grpName.c_str(), &grpId)" << std::endl;
+    sstr << errormsg << std::endl;
+    sstr << "Unable to create group Id, given its name: " << grpName << std::endl;
+    StdString e = sstr.str();
+    throw CNetCdfException(e);
+  }
+
+  return status;
+}
+
+/*!
+This function makes a request to netcdf, add a new dimension to an open netcdf in define mode
+\param [in] ncid Id of groupd(or File Id)
+\param [in] dimName Name of the desired dimension
+\param [in/out] grpId Group id if this group is created sucessfully
+\return Status code
+*/
+int CNetCdfInterface::defDim(int ncid, const StdString& dimName, StdSize dimLen, int& dimId)
+{
+  int status = nc_def_dim(ncid, dimName.c_str(), dimLen, &dimId);
+  if (NC_NOERR != status)
+  {
+    StdString errormsg(nc_strerror(status));
+    StdStringStream sstr;
+
+    sstr << "Error when calling function nc_def_dim(ncid, dimName.c_str(), dimLen, &dimId)" << std::endl;
+    sstr << errormsg << std::endl;
+    sstr << "Unable to create dimension with name: " << dimName
+         << " and with length " << dimLen << std::endl;
+    StdString e = sstr.str();
+    throw CNetCdfException(e);
+  }
+
+  return status;
+}
+
+/*!
+This function makes a request to netcdf with its id, to add a new variable to an open netCdf in define mode,
+return a variable id, given its name, type, the number of dimensions and list of dimension id
+\param [in] ncid Id of groupd(or File Id)
+\param [in] varName Name of the desired dimension
+\param [in] xtypes One of the set of predefined netCDF data types
+\param [in] nDims Number of dimension for the variable
+\param [in] dimIds List of ndims dimension ids corresponding to the variable dimensions
+\param [in/out] varId Variable id if it is added sucessfully
+\return Status code
+*/
+int CNetCdfInterface::defVar(int ncid, const StdString& varName, nc_type xtype,
+                             int nDims, const int dimIds[], int& varId)
+{
+  int status = nc_def_var(ncid, varName.c_str(), xtype, nDims, dimIds, &varId);
+  if (NC_NOERR != status)
+  {
+    StdString errormsg(nc_strerror(status));
+    StdStringStream sstr;
+
+    sstr << "Error when calling function  nc_def_var(ncid, varName.c_str(), xtype, nDims, dimIds, &varId)" << std::endl;
+    sstr << errormsg << std::endl;
+    sstr << "Unable to add a new variable with name: " << varName
+         << " with type " << xtype
+         << " and number of dimension " << nDims << std::endl;
+    StdString e = sstr.str();
+    throw CNetCdfException(e);
+  }
+
+  return status;
+}
+
+/*!
+This function makes a request to netcdf with a ncid, to set the chunking size of a variable,
+given variable id and type of storage
+\param [in] ncid Id groupd(or File Id)
+\param [in] varId Id of the variable
+\param [in] storage Type of storage (It can be: NC_CONTIGUOUS, NC_CHUNKED)
+\param [in/out] chunkSize array list of chunk sizes
+\return Status code
+*/
+int CNetCdfInterface::defVarChunking(int ncid, int varId, int storage, StdSize chunkSize[])
+{
+  int status = nc_def_var_chunking(ncid, varId, storage, chunkSize);
+  if (NC_NOERR != status)
+  {
+    StdString errormsg(nc_strerror(status));
+    StdStringStream sstr;
+
+    sstr << "Error when calling function nc_def_var_chunking(ncid, varId, storage, chunkSize)" << std::endl;
+    sstr << errormsg << std::endl;
+    sstr << "Unable to set chunk size of the variable with id: " << varId
+      << " and storage type " << storage << std::endl;
+    StdString e = sstr.str();
+    throw CNetCdfException(e);
+  }
+
+  return status;
+}
+
+/*!
+This function sets the compression level to the specified variable
+\param [in] ncid Groud id (or file id)
+\param [in] varId Id of the variable
+\param [in] compressionLevel The compression level from 0 to 9 (0 disables the compression, 9 is the higher compression)
+\return Status code
+*/
+int CNetCdfInterface::defVarDeflate(int ncid, int varId, int compressionLevel)
+{
+  
+  if (compressionLevel == 0) return NC_NOERR ;
+  int status = nc_def_var_deflate(ncid, varId, (compressionLevel > 0), (compressionLevel > 0), compressionLevel);
+  if (NC_NOERR != status)
+  {
+    StdString errormsg(nc_strerror(status));
+    StdStringStream sstr;
+
+    sstr << "Error when calling function nc_def_var_deflate(ncid, varId, false, (compressionLevel > 0), compressionLevel)" << std::endl;
+    sstr << errormsg << std::endl;
+    sstr << "Unable to set the compression level of the variable with id: " << varId
+         << " and compression level: " << compressionLevel << std::endl;
+    StdString e = sstr.str();
+    throw CNetCdfException(e);
+  }
+
+  return status;
+}
+
+/*!
+Set or unset the fill mode for a NetCDF file specified by its file id.
+\param [in] ncid File id
+\param [in] fill Define whether the fill mode should be enabled or not
+\return Status code
+*/
+int CNetCdfInterface::setFill(int ncid, bool fill)
+{
+  int old_fill_mode;
+  int status = nc_set_fill(ncid, fill ? NC_FILL: NC_NOFILL, &old_fill_mode);
+  if (NC_NOERR != status)
+  {
+    StdString errormsg(nc_strerror(status));
+    StdStringStream sstr;
+
+    sstr << "Error when calling function nc_set_fill(ncid, fill ? NC_FILL: NC_NOFILL, &old_fill_mode)" << std::endl;
+    sstr << errormsg << std::endl;
+    sstr << "Unable to set the fill mode to: " << (fill ? "NC_FILL": "NC_NOFILL") << std::endl;
+    StdString e = sstr.str();
+    throw CNetCdfException(e);
+  }
+
+  return status;
+}
+
+/*!
+This function makes a request to netcdf with a ncid, to set the fill parameters for a variable,
+given variable id and type of fill
+\param [in] ncid Id groupd(or File Id)
+\param [in] varId Id of the variable
+\param [in] noFill turn on/off nofill mode on a variable
+\param [in/out] fillValue
+\return Status code
+*/
+int CNetCdfInterface::defVarFill(int ncid, int varId, int noFill, void* fillValue)
+{
+  int status = nc_def_var_fill(ncid, varId, noFill, fillValue);
+  if (NC_NOERR != status)
+  {
+    StdString errormsg(nc_strerror(status));
+    StdStringStream sstr;
+
+    sstr << "Error when calling function nc_def_var_fill(ncid, varId, noFill, fillValue)" << std::endl;
+    sstr << errormsg << std::endl;
+    sstr << "Unable to set fill parameters of the variable with id: " << varId
+      << " and fill option " << noFill << std::endl;
+    StdString e = sstr.str();
+    throw CNetCdfException(e);
+  }
+
+  return status;
+}
+
+/*!
+This function makes a request to netcdf with a ncid, to change the way read/write operations are performed
+collectively or independently on the variable.
+\param [in] ncid Id groupd(or File Id)
+\param [in] varId Id of the variable
+\param [in] noFill turn on/off nofill mode on a variable
+\param [in/out] fillValue
+\return Status code
+*/
+int CNetCdfInterface::varParAccess(int ncid, int varId, int access)
+{
+  int status = nc_var_par_access(ncid, varId, access);
+  if (NC_NOERR != status)
+  {
+    StdString errormsg(nc_strerror(status));
+    StdStringStream sstr;
+
+    sstr << "Error when calling function nc_var_par_access(ncid, varId, access)" << std::endl;
+    sstr << errormsg << std::endl;
+    sstr << "Unable to change read/write option of the variable with id: " << varId << std::endl;
+    StdString e = sstr.str();
+    throw CNetCdfException(e);
+  }
+
+  return status;
+}
+
+/*!
+This function makes a synchronisation of the disk copy of a netCDF dataset.
+\param [in] ncid Id groupd(or File Id)
+\return Status code
+*/
+int CNetCdfInterface::sync(int ncid)
+{
+  int status = nc_sync(ncid);
+  if (NC_NOERR != status)
+  {
+    StdString errormsg(nc_strerror(status));
+    StdStringStream sstr;
+
+    sstr << "Error when calling function nc_sync(ncid)" << std::endl;
+    sstr << errormsg << std::endl;
+    sstr << "Unable to make a synchronization of a netCDF file with id: " << ncid << std::endl;
+    StdString e = sstr.str();
+    throw CNetCdfException(e);
+  }
+
+  return status;
+}
+
+// Some specializations of getAttributeType
+template<>
+int CNetCdfInterface::ncGetAttType(int ncid, int varid, const char* attrName, double* data)
+{
+  return nc_get_att_double(ncid, varid, attrName, data);
+}
+
+template<>
+int CNetCdfInterface::ncGetAttType(int ncid, int varid, const char* attrName, float* data)
+{
+  return nc_get_att_float(ncid, varid, attrName, data);
+}
+
+template<>
+int CNetCdfInterface::ncGetAttType(int ncid, int varid, const char* attrName, int* data)
+{
+  return nc_get_att_int(ncid, varid, attrName, data);
+}
+
+template<>
+int CNetCdfInterface::ncGetAttType(int ncid, int varid, const char* attrName, long* data)
+{
+  return nc_get_att_long(ncid, varid, attrName, data);
+}
+
+template<>
+int CNetCdfInterface::ncGetAttType(int ncid, int varid, const char* attrName, short* data)
+{
+  return nc_get_att_short(ncid, varid, attrName, data);
+}
+
+template<>
+int CNetCdfInterface::ncGetAttType(int ncid, int varid, const char* attrName, char* data)
+{
+  return nc_get_att_text(ncid, varid, attrName, data);
+}
+
+// Some specializations of putAttributeType
+template<>
+int CNetCdfInterface::ncPutAttType(int ncid, int varid, const char* attrName,
+                                   StdSize numVal, const double* data)
+{
+  return nc_put_att_double(ncid, varid, attrName, NC_DOUBLE, numVal, data);
+}
+
+template<>
+int CNetCdfInterface::ncPutAttType(int ncid, int varid, const char* attrName,
+                                   StdSize numVal, const float* data)
+{
+  return nc_put_att_float(ncid, varid, attrName, NC_FLOAT, numVal, data);
+}
+
+template<>
+int CNetCdfInterface::ncPutAttType(int ncid, int varid, const char* attrName,
+                                   StdSize numVal, const int* data)
+{
+  return nc_put_att_int(ncid, varid, attrName, NC_INT, numVal, data);
+}
+
+template<>
+int CNetCdfInterface::ncPutAttType(int ncid, int varid, const char* attrName,
+                                   StdSize numVal, const long* data)
+{
+  return nc_put_att_long(ncid, varid, attrName, NC_LONG, numVal, data);
+}
+
+template<>
+int CNetCdfInterface::ncPutAttType(int ncid, int varid, const char* attrName,
+                                   StdSize numVal, const short* data)
+{
+  return nc_put_att_short(ncid, varid, attrName, NC_SHORT, numVal, data);
+}
+
+template<>
+int CNetCdfInterface::ncPutAttType(int ncid, int varid, const char* attrName,
+                                   StdSize numVal, const char* data)
+{
+  return nc_put_att_text(ncid, varid, attrName, numVal, data);
+}
+
+// Some specializations of getVariableType
+template<>
+int CNetCdfInterface::ncGetVaraType(int ncid, int varid, const StdSize* start, const StdSize* count, double* data)
+{
+  return nc_get_vara_double(ncid, varid, start, count, data);
+}
+
+template<>
+int CNetCdfInterface::ncGetVaraType(int ncid, int varid, const StdSize* start, const StdSize* count, float* data)
+{
+  return nc_get_vara_float(ncid, varid, start, count, data);
+}
+
+template<>
+int CNetCdfInterface::ncGetVaraType(int ncid, int varid, const StdSize* start, const StdSize* count, int* data)
+{
+  return nc_get_vara_int(ncid, varid, start, count, data);
+}
+
+template<>
+int CNetCdfInterface::ncGetVaraType(int ncid, int varid, const StdSize* start, const StdSize* count, char* data)
+{
+  return nc_get_vara_text(ncid, varid, start, count, data);
+}
+
+// Some specializations of putVariableType
+template<>
+int CNetCdfInterface::ncPutVaraType(int ncid, int varid, const StdSize* start, const StdSize* count, const double* data)
+{
+  return nc_put_vara_double(ncid, varid, start, count, data);
+}
+
+template<>
+int CNetCdfInterface::ncPutVaraType(int ncid, int varid, const StdSize* start, const StdSize* count, const float* data)
+{
+  return nc_put_vara_float(ncid, varid, start, count, data);
+}
+
+template<>
+int CNetCdfInterface::ncPutVaraType(int ncid, int varid, const StdSize* start, const StdSize* count, const int* data)
+{
+  return nc_put_vara_int(ncid, varid, start, count, data);
+}
+
+template<>
+int CNetCdfInterface::ncPutVaraType(int ncid, int varid, const StdSize* start, const StdSize* count, const char* data)
+{
+  return nc_put_vara_text(ncid, varid, start, count, data);
+}
+
+ /*!
+ This function verifies an existence of a variable by using its name.
+ Be careful, althoug false means variable doens't exist, it could show that netCDF file doesn't either
+ \param [in] ncid Id of groupd(or File Id)
+ \param [in] attrName Name of the variable
+ \return Existence of variable
+ */
+bool CNetCdfInterface::isVarExisted(int ncId, const StdString& varName)
+{
+   int varId = 0;
+   return (NC_NOERR == (nc_inq_varid(ncId, varName.c_str(), &varId)));
+}
+
+bool CNetCdfInterface::isDimExisted(int ncId, const StdString& dimName)
+{
+   int dimId = 0;
+   return (NC_NOERR == (nc_inq_dimid(ncId, dimName.c_str(), &dimId)));
+}
+
+StdString CNetCdfInterface::openMode2String(int oMode)
+{
+  StdString modeMes;
+  switch (oMode)
+  {
+  case NC_NOWRITE:
+    modeMes = StdString("NC_NOWRITE: Opening netCDF file with read-only access with buffering and caching access");
+    break;
+  case NC_SHARE:
+    modeMes = StdString("NC_SHARE: Several processes can read the file concurrently");
+    break;
+  case NC_WRITE:
+    modeMes = StdString("NC_WRITE: NetCDF file is readable and writable");
+    break;
+  default:
+    modeMes = StdString("In the composed opening mode");
+    break;
+  }
+  return modeMes;
+}
+
+StdString CNetCdfInterface::creationMode2String(int cMode)
+{
+  StdString modeMes;
+  switch (cMode)
+  {
+  case NC_NOCLOBBER:
+    modeMes = StdString("NC_NOCLOBBER: Not overwrite an exisiting netCDF file ");
+    break;
+  case NC_SHARE:
+    modeMes = StdString("NC_SHARE: Several processes can read from and write into the file concurrently");
+    break;
+  case NC_64BIT_OFFSET:
+    modeMes = StdString("NC_64BIT_OFFSET: NetCDF file is 64-bit offset");
+    break;
+  case NC_NETCDF4:
+    modeMes = StdString("NC_NETCDF4: NetCDF file is HDF5/NetCDF-4");
+    break;
+  case NC_CLASSIC_MODEL:
+    modeMes = StdString("NC_CLASSIC_MODEL: NetCDF file is classical model");
+    break;
+  default:
+    modeMes = StdString("In the composed creation mode");
+    break;
+  }
+  return modeMes;
+}
+
+}
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/io/netCdfInterface.hpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/io/netCdfInterface.hpp	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/io/netCdfInterface.hpp	(revision 1749)
@@ -0,0 +1,179 @@
+/*!
+   \file netCdfInterface.hpp
+   \author Ha NGUYEN
+   \date 08 Oct 2014
+   \since 03 Oct 2014
+
+   \brief Wrapper of netcdf functions.
+ */
+#ifndef __NETCDF_INTERFACE_HPP_
+#define __NETCDF_INTERFACE_HPP_
+
+#include "xios_spl.hpp"
+
+#if !defined(USING_NETCDF_PAR)
+#include "exception.hpp"
+#endif
+
+#include "mpi.hpp"
+#include "netcdf.hpp"
+
+namespace xios
+{
+  /*!
+  \class CNetCdfInterface
+   This class is  wrapper of some common used functions of netCdf in Xios
+  */
+  class CNetCdfInterface
+  {
+  public:
+    //! Create a netcdf file
+    static int create(const StdString& path, int cmode, int& ncId);
+
+    //! Create a netcdf file on a parallel file system
+    static int createPar(const StdString& path, int cmode, MPI_Comm comm, MPI_Info info, int& ncId);
+
+    //! Open a netcdf file
+    static int open(const StdString& path, int oMode, int& ncId);
+
+    //! Open a netcdf file
+    static int openPar(const StdString& path, int cmode, MPI_Comm comm, MPI_Info info, int& ncId);
+
+    //! Close a netcdf file
+    static int close(int ncId);
+
+    //! Put netcdf file into define mode
+    static int reDef(int ncId);
+
+    //! End define mode of a netcdf file
+    static int endDef(int ncId);
+
+    //! Query identity of a named group
+    static int inqNcId(int ncid, const StdString& grpName, int& grpId);
+
+    //! Query identity of a named variable
+    static int inqVarId(int ncid, const StdString& varName, int& varId);
+
+    //! Query the name of a variable given its id
+    static int inqVarName(int ncid, int varId, StdString& varName);
+
+    //! Query identity of a named dimension
+    static int inqDimId(int ncid, const StdString& dimName, int& dimId);
+
+    //! Query identity of unlimited dimension
+    static int inqUnLimDim(int ncid, int& dimId);
+
+    //! Query name of a dimension with its id
+    static int inqDimName(int ncid, int dimId, StdString& dimName);
+
+    //! Query length of dimension with its id
+    static int inqDimLen(int ncid, int dimId, StdSize& dimLen);
+
+    //! Query number of dimension of a variable with its id
+    static int inqVarNDims(int ncid, int varId, int& nDims);
+
+    //! Query list of dimension of a variable with its id
+    static int inqVarDimId(int, int, int*);
+
+    //! Query dimensions of a group
+    static int inqDimIds(int ncid, int& nDims, int* dimIds, int includeParents);
+
+    //! Query the full name of a group given its id
+    static int inqGrpFullName(int ncid, StdString& grpFullName);
+
+    //! Query the list of group ids given a location id
+    static int inqGrpIds(int ncid, int& numgrps, int* ncids);
+
+    //! Query the list of variable ids given a location id
+    static int inqVarIds(int ncid, int& nvars, int* varids);
+
+    //! Query the type and the size of an attribute given its name and the id of the variable to which it is attached.
+    static int inqAtt(int ncid, int varid, const StdString& name, nc_type& type, size_t& len);
+
+    //! Query the number of global attributes given a location id
+    static int inqNAtts(int ncid, int& ngatts);
+
+    //! Query the number of attributes given a location id and a variable id
+    static int inqVarNAtts(int ncid, int varid, int& natts);
+
+    //! Query the name of an attribute given a location id, a variable id and the attribute number
+    static int inqAttName(int ncid, int varid, int attnum, StdString& name);
+
+    //! Define a group
+    static int defGrp(int parentNcid, const StdString& grpName, int& grpId);
+
+    //! Define a dimension
+    static int defDim(int ncid, const StdString& dimName, StdSize dimLen, int& dimId);
+
+    //! Define a variable
+    static int defVar(int ncid, const StdString& varName, nc_type xtype,
+                      int nDims, const int dimIds[], int& varId);
+
+    //! Define variable chunking size
+    static int defVarChunking(int ncid, int varId, int storage, StdSize chunkSize[]);
+
+    //! Define variable compression level
+    static int defVarDeflate(int ncid, int varId, int compressionLevel);
+
+    //! Set or unset the fill mode
+    static int setFill(int ncid, bool fill);
+
+    //! Define variable fill parameters
+    static int defVarFill(int ncid, int varId, int noFill, void* fillValue);
+
+
+    //! Change access type of a variable
+    static int varParAccess(int ncid, int varid, int access);
+
+    //! Sync the file
+    static int sync(int ncId);
+
+    //! Read an attribute
+    template<typename T>
+    static int getAttType(int ncid, int varid, const StdString& attrName, T* data);
+
+    //! Set an attribute
+    template<typename T>
+    static int putAttType(int ncid, int varid, const StdString& attrName, StdSize numVal, const T* data);
+
+    //! Get data for a variable
+    template<typename T>
+    static int getVaraType(int ncid, int varid, const StdSize* start, const StdSize* count, T* data);
+
+    //! Set data for a variable
+    template<typename T>
+    static int putVaraType(int ncid, int varid, const StdSize* start, const StdSize* count, const T* data);
+
+    //! Get the NetCDF type corresponding to a specific C type
+    template<typename T>
+    static nc_type getNcType();
+
+  private:
+    template<typename T>
+    static int ncGetAttType(int ncid, int varid, const char* attrName, T* data);
+
+    template<typename T>
+    static int ncPutAttType(int ncid, int varid, const char* attrName, StdSize numVal, const T* data);
+
+    template<typename T>
+    static int ncGetVaraType(int ncid, int varid, const StdSize* start, const StdSize* count, T* data);
+
+    template<typename T>
+    static int ncPutVaraType(int ncid, int varid, const StdSize* start, const StdSize* count, const T* data);
+
+  private:
+    static StdString openMode2String(int oMode);
+
+    static StdString creationMode2String(int cMode);
+
+
+  public:
+    // Some functions dedude from several special cases
+    //! Query the existence of a variable
+    static bool isVarExisted(int ncId, const StdString& varName);
+    static bool isDimExisted(int ncId, const StdString& dimName);
+  };
+}
+
+
+#endif // NETCDFINTERFACE_HPP_
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/io/netCdfInterface_decl.cpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/io/netCdfInterface_decl.cpp	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/io/netCdfInterface_decl.cpp	(revision 1749)
@@ -0,0 +1,46 @@
+/*!
+   \file netCdfInterface_impl.hpp
+   \author Ha NGUYEN
+   \date 06 Oct 2014
+   \since 06 Oct 2014
+
+   \brief Implemention of some templated functions in netCdfInterface
+ */
+
+#include "netCdfInterface_impl.hpp"
+
+namespace xios
+{
+#define macroAtt(type) \
+  template int CNetCdfInterface::getAttType(int ncid, int varid, const StdString& attrName, type* data); \
+  template int CNetCdfInterface::putAttType(int ncid, int varid, const StdString& attrName,              \
+                                            StdSize numVal, const type* data);
+
+  macroAtt(double)
+  macroAtt(float)
+  macroAtt(int)
+  macroAtt(long)
+  macroAtt(short)
+  macroAtt(char)
+
+#define macroPutVar(type) \
+ template int CNetCdfInterface::getVaraType(int ncid, int varId, const StdSize* start, \
+                                            const StdSize* count, type* data);         \
+ template int CNetCdfInterface::putVaraType(int ncid, int varId, const StdSize* start, \
+                                            const StdSize* count, const type* data);
+
+  macroPutVar(double)
+  macroPutVar(float)
+  macroPutVar(int)
+  macroPutVar(char)
+  
+#define macroType(type, ncType) \
+  template<> nc_type CNetCdfInterface::getNcType<type>() { return ncType; }
+
+  macroType(double, NC_DOUBLE)
+  macroType(float, NC_FLOAT)
+  macroType(int, NC_INT)
+  macroType(long, NC_LONG)
+  macroType(short, NC_SHORT)
+  macroType(char, NC_CHAR)
+}
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/io/netCdfInterface_impl.hpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/io/netCdfInterface_impl.hpp	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/io/netCdfInterface_impl.hpp	(revision 1749)
@@ -0,0 +1,130 @@
+/*!
+   \file netCdfInterface_impl.hpp
+   \author Ha NGUYEN
+   \date 08 Oct 2014
+   \since 06 Oct 2014
+
+   \brief Implementation of some templated functions in netCdfInterface
+ */
+
+#ifndef __NETCDF_INTERFACE_IMPL_HPP__
+#define __NETCDF_INTERFACE_IMPL_HPP__
+
+#include "netCdfInterface.hpp"
+#include "netCdfException.hpp"
+
+namespace xios
+{
+  /*!
+  This function reads a variable attribute or a global attribute
+  given a location id, a variable id and the attribute name
+  \param [in] ncid Id of group (or file id)
+  \param [in] varId Id of the variable
+  \param [in] attrName Name of the attribute
+  \param [out] data Array of values
+  \return Status code
+  */
+  template<typename T>
+  int CNetCdfInterface::getAttType(int ncid, int varId, const StdString& attrName, T* data)
+  {
+    int status = ncGetAttType(ncid, varId, attrName.c_str(), data);
+    if (NC_NOERR != status)
+    {
+      StdStringStream sstr;
+      StdString varName;
+      sstr << "Error when calling function ncGetAttType(ncid, varId, attrName.c_str(), data)" << std::endl;
+      sstr << nc_strerror(status) << std::endl;
+      inqVarName(ncid, varId, varName);
+      sstr << "Unable to read attribute " << attrName << " given the location id: " << ncid << " and the variable whose id: " << varId << " and name: " << varName << std::endl;
+      throw CNetCdfException(sstr.str());
+    }
+
+    return status;
+  }
+
+  /*!
+  This function adds or modifies a variable attribute or a global attribute
+  given a location id, a variable id and the attribute name
+  \param [in] ncid Id of group (or file id)
+  \param [in] varId Id of the variable
+  \param [in] attrName Name of the attribute
+  \param [in] numVal Number of values to set
+  \param [in] data Array of values
+  \return Status code
+  */
+  template<typename T>
+  int CNetCdfInterface::putAttType(int ncid, int varId, const StdString& attrName,
+                                   StdSize numVal, const T* data)
+  {
+    int status = ncPutAttType(ncid, varId, attrName.c_str(), numVal, data);
+    if (NC_NOERR != status)
+    {
+      StdStringStream sstr;
+      StdString varName;
+      sstr << "Error when calling function ncPutAttType(ncid, varId, attrName.c_str(), numVal, data)" << std::endl;
+      sstr << nc_strerror(status) << std::endl;
+      inqVarName(ncid, varId, varName);
+      sstr << "Unable to set attribute " << attrName << " given the location id: " << ncid << " and the variable whose id: " << varId << " and name: " << varName << std::endl
+           << " with " << numVal << " elements." << std::endl;
+      throw CNetCdfException(sstr.str());
+    }
+
+    return status;
+  }
+
+  /*!
+  This function reads data for the specified variable.
+  \param [in] ncid Id of group (or file id)
+  \param [in] varId Id of the variable
+  \param [in] start Array specifying the index in the variable where the first data value will be written
+  \param [in] count Array specifying the edge lengths along each dimension of the data block
+  \param [out] data Array of values
+  \return Status code
+  */
+  template<typename T>
+  int CNetCdfInterface::getVaraType(int ncid, int varId, const StdSize* start, const StdSize* count, T* data)
+  {
+    int status = ncGetVaraType(ncid, varId, start, count, data);
+    if (NC_NOERR != status)
+    {
+      StdStringStream sstr;
+      StdString varName;
+      sstr << "Error when calling function ncGetVaraType(ncid, varId, start, count, data)" << std::endl;
+      sstr << nc_strerror(status) << std::endl;
+      inqVarName(ncid, varId, varName);
+      sstr << "Unable to read data given the location id: " << ncid << " and the variable whose id: " << varId << " and name: " << varName << std::endl;
+      throw CNetCdfException(sstr.str());
+    }
+
+    return status;
+  }
+
+  /*!
+  This function writes the given data for the specified variable.
+  \param [in] ncid Id of group (or file id)
+  \param [in] varId Id of the variable
+  \param [in] start Array specifying the index in the variable where the first data value will be written
+  \param [in] count Array specifying the edge lengths along each dimension of the data block
+  \param [in] data Array of values
+  \return Status code
+  */
+  template<typename T>
+  int CNetCdfInterface::putVaraType(int ncid, int varId, const StdSize* start, const StdSize* count, const T* data)
+  {
+    int status = ncPutVaraType(ncid, varId, start, count, data);
+    if (NC_NOERR != status)
+    {
+      StdStringStream sstr;
+      StdString varName;
+      sstr << "Error when calling function ncPutVaraType(ncid, varId, start, count, data)" << std::endl;
+      sstr << nc_strerror(status) << std::endl;
+      inqVarName(ncid, varId, varName);
+      sstr << "Unable to write data given the location id: " << ncid << " and the variable whose id: " << varId << " and name: " << varName << std::endl;
+      throw CNetCdfException(sstr.str());
+    }
+
+    return status;
+  }
+}
+
+#endif // __NETCDF_INTERFACE_IMPL_HPP__
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/io/netCdf_cf_constant.hpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/io/netCdf_cf_constant.hpp	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/io/netCdf_cf_constant.hpp	(revision 1749)
@@ -0,0 +1,38 @@
+#ifndef __XIOS_INETCDF4_IMPL__
+#define __XIOS_INETCDF4_IMPL__
+
+#include "inetcdf4.hpp"
+#include "netCdfInterface.hpp"
+
+namespace xios
+{
+const StdString CFLatUnits[] = {"degrees_north", "degree_north", "degree_N", "degrees_N", "degreeN", "degreesN"};
+const StdString CFLonUnits[] = {"degrees_east", "degree_east", "degree_E", "degrees_E", "degreeE", "degreesE"};
+
+struct CCFKeywords
+{
+  static const StdString XIOS_CF_units;
+  static const StdString XIOS_CF_standard_name;
+  static const StdString XIOS_CF_coordinates;
+  static const StdString XIOS_CF_bounds;
+};
+const StdString CCFKeywords::XIOS_CF_units("units");
+const StdString CCFKeywords::XIOS_CF_standard_name("standard_name");
+const StdString CCFKeywords::XIOS_CF_coordinates("coordinates");
+const StdString CCFKeywords::XIOS_CF_bounds("bounds");
+
+struct CCFConvention
+{
+  static const std::set<StdString> XIOS_CF_Latitude_units;
+  static const std::set<StdString> XIOS_CF_Longitude_units;
+
+private:
+  CCFConvention();
+};
+
+const std::set<StdString> CCFConvention::XIOS_CF_Latitude_units(CFLatUnits, CFLatUnits+sizeof(CFLatUnits)/sizeof(CFLatUnits[0]));
+const std::set<StdString> CCFConvention::XIOS_CF_Longitude_units(CFLonUnits, CFLonUnits+sizeof(CFLonUnits)/sizeof(CFLonUnits[0]));
+
+} // namespace xios
+
+#endif //__XIOS_INETCDF4_IMPL__
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/io/netcdf.hpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/io/netcdf.hpp	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/io/netcdf.hpp	(revision 1749)
@@ -0,0 +1,67 @@
+#ifndef __XIOS_NETCDF_HPP__
+#define __XIOS_NETCDF_HPP__
+#include "mpi.hpp"
+#define MPI_INCLUDED
+#include <netcdf.h>
+
+#if defined(USING_NETCDF_INTERNAL)
+  const bool using_netcdf_internal=true ;
+#else
+  const bool using_netcdf_internal=false ;
+#endif
+
+#include "netcdf_version.hpp"
+
+#if NETCDF_VERSION >= 4110
+
+#  if defined(USING_NETCDF_PAR)
+extern "C"
+{
+#  include <netcdf_par.h>
+}
+#  endif
+#endif
+
+#if !defined(USING_NETCDF_PAR)
+#define NC_INDEPENDENT 0
+#define NC_COLLECTIVE  1
+#endif
+
+namespace xios
+{
+  inline int nc_create_par(const char *path, int cmode, MPI_Comm comm, MPI_Info info,int *ncidp)
+  {
+#if defined(USING_NETCDF_PAR)
+    return ::nc_create_par(path, cmode, comm, info, ncidp) ;
+#else
+    ERROR("int nc_create_par(const char *path, int cmode, MPI_Comm comm, MPI_Info info,int *ncidp)",
+           << "must not be use with netcdf sequential version") ;
+    return -1 ;
+#endif
+  }
+
+  inline int nc_open_par(const char *path, int mode, MPI_Comm comm, MPI_Info info,int *ncidp)
+  {
+#if defined(USING_NETCDF_PAR)
+    return ::nc_open_par(path, mode, comm, info, ncidp) ;
+#else
+    ERROR("int nc_open_par(const char *path, int mode, MPI_Comm comm, MPI_Info info,int *ncidp)",
+           << "must not be use with netcdf sequential version") ;
+    return -1 ;
+#endif
+  }
+
+  inline int nc_var_par_access(int ncid, int varid, int par_access)
+  {
+#if defined(USING_NETCDF_PAR)
+    return ::nc_var_par_access(ncid, varid, par_access) ;
+#else
+    ERROR("int nc_var_par_access(int ncid, int varid, int par_access)",
+           << "must not be use with netcdf sequential version") ;
+    return -1 ;
+#endif
+  }
+}
+
+
+#endif
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/io/netcdf_version.hpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/io/netcdf_version.hpp	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/io/netcdf_version.hpp	(revision 1749)
@@ -0,0 +1,34 @@
+#ifndef __XIOS_NETCDF_VERSION_HPP__
+#define __XIOS_NETCDF_VERSION_HPP__
+
+#if defined(NC_DISKLESS) && defined (NC_MMAP)
+
+#  define NETCDF_VERSION 4211
+
+#elif defined(NC_ETRANSLATION)
+
+# define NETCDF_VERSION 4130
+
+#elif defined(NC_EURL) && defined(NC_ECONSTRAINT)
+
+#  define NETCDF_VERSION 4120
+
+#elif defined (NC_PNETCDF)
+
+#  define NETCDF_VERSION 4110
+
+#elif defined(NC_CHUNKED) && defined(NC_CONTIGUOUS)
+
+# define NETCDF_VERSION 4010
+
+#elif defined(NC_NETCDF4)
+
+# define NETCDF_VERSION 4000
+
+#else
+
+#  error "netcdf version prior 4.0 incompatible with XIOS"
+ 
+#endif
+
+#endif
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/io/onetcdf4.cpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/io/onetcdf4.cpp	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/io/onetcdf4.cpp	(revision 1749)
@@ -0,0 +1,644 @@
+#include <fstream>
+
+#include "onetcdf4.hpp"
+#include "group_template.hpp"
+#include "mpi.hpp"
+#include "netcdf.hpp"
+#include "netCdfInterface.hpp"
+#include "netCdfException.hpp"
+#include "timer.hpp"
+
+namespace xios
+{
+      /// ////////////////////// DÃ©finitions ////////////////////// ///
+
+      CONetCDF4::CONetCDF4(const StdString& filename, bool append, bool useClassicFormat,
+							bool useCFConvention,
+                           const MPI_Comm* comm, bool multifile, const StdString& timeCounterName)
+        : path()
+        , wmpi(false)
+        , useClassicFormat(useClassicFormat)
+        , useCFConvention(useCFConvention)
+      {
+         this->initialize(filename, append, useClassicFormat, useCFConvention, comm, multifile, timeCounterName);
+      }
+
+      //---------------------------------------------------------------
+
+      CONetCDF4::~CONetCDF4(void)
+      {
+      }
+
+      ///--------------------------------------------------------------
+
+      void CONetCDF4::initialize(const StdString& filename, bool append, bool useClassicFormat, bool useCFConvention, 
+                                 const MPI_Comm* comm, bool multifile, const StdString& timeCounterName)
+      {
+         this->useClassicFormat = useClassicFormat;
+         this->useCFConvention = useCFConvention;
+
+         int mode = useClassicFormat ? 0 : NC_NETCDF4;
+
+         // Don't use parallel mode if there is only one process
+         if (comm)
+         {
+            int commSize = 0;
+            MPI_Comm_size(*comm, &commSize);
+            if (commSize <= 1)
+               comm = NULL;
+         }
+         wmpi = comm && !multifile;
+
+         if (wmpi)
+            mode |= useClassicFormat ? NC_PNETCDF : NC_MPIIO;
+
+         // If the file does not exist, we always create it
+         if (!append || !std::ifstream(filename.c_str()))
+         {
+            CTimer::get("Files : create").resume();
+            if (wmpi)
+               CNetCdfInterface::createPar(filename, mode, *comm, MPI_INFO_NULL, this->ncidp);
+            else
+               CNetCdfInterface::create(filename, mode, this->ncidp);
+            CTimer::get("Files : create").suspend();
+ 
+            this->appendMode = false;
+         }
+         else
+         {
+            mode |= NC_WRITE;
+            CTimer::get("Files : open").resume();
+            if (wmpi)
+               CNetCdfInterface::openPar(filename, mode, *comm, MPI_INFO_NULL, this->ncidp);
+            else
+               CNetCdfInterface::open(filename, mode, this->ncidp);
+            CTimer::get("Files : open").suspend();
+            this->appendMode = true;
+         }
+
+         // If the classic NetCDF format is used, we enable the "no-fill mode" globally.
+         // This is done per variable for the NetCDF4 format.
+         if (useClassicFormat)
+            CNetCdfInterface::setFill(this->ncidp, false);
+
+         this->timeCounterName = timeCounterName;
+      }
+
+      void CONetCDF4::close()
+      {
+        CTimer::get("Files : close").resume();
+        CNetCdfInterface::close(this->ncidp);
+        CTimer::get("Files : close").suspend();
+      }
+
+      //---------------------------------------------------------------
+
+      void CONetCDF4::definition_start(void)
+      {
+         CNetCdfInterface::reDef(this->ncidp);
+      }
+
+      //---------------------------------------------------------------
+
+      void CONetCDF4::definition_end(void)
+      {
+         CNetCdfInterface::endDef(this->ncidp);
+      }
+
+      //---------------------------------------------------------------
+
+      int CONetCDF4::getCurrentGroup(void)
+      {
+         return this->getGroup(this->getCurrentPath());
+      }
+
+      //---------------------------------------------------------------
+
+      int CONetCDF4::getGroup(const CONetCDF4Path& path)
+      {
+         int retvalue = this->ncidp;
+
+         CONetCDF4Path::const_iterator it = path.begin(), end = path.end();
+
+         for (; it != end; it++)
+         {
+            const StdString& groupid = *it;
+            CNetCdfInterface::inqNcId(retvalue, groupid, retvalue);
+         }
+         return retvalue;
+      }
+
+      //---------------------------------------------------------------
+
+      int CONetCDF4::getVariable(const StdString& varname)
+      {
+         int varid = 0;
+         int grpid = this->getCurrentGroup();
+         CNetCdfInterface::inqVarId(grpid, varname, varid);
+         return varid;
+      }
+
+      //---------------------------------------------------------------
+
+      int CONetCDF4::getDimension(const StdString& dimname)
+      {
+         int dimid = 0;
+         int grpid = this->getCurrentGroup();
+         CNetCdfInterface::inqDimId(grpid, dimname, dimid);
+         return dimid;
+      }
+
+      //---------------------------------------------------------------
+
+      int CONetCDF4::getUnlimitedDimension(void)
+      {
+         int dimid = 0;
+         int grpid = this->getCurrentGroup();
+         CNetCdfInterface::inqUnLimDim(grpid, dimid);
+         return dimid;
+      }
+
+      StdString CONetCDF4::getUnlimitedDimensionName(void)
+      {
+         int grpid = this->getGroup(path);
+         int dimid = this->getUnlimitedDimension();
+
+         StdString dimname;
+         if (dimid != -1)
+           CNetCdfInterface::inqDimName(grpid, dimid, dimname);
+         return dimname;
+      }
+
+      //---------------------------------------------------------------
+
+      std::vector<StdSize> CONetCDF4::getDimensions(const StdString& varname)
+      {
+         StdSize size = 0;
+         std::vector<StdSize> retvalue;
+         int grpid = this->getCurrentGroup();
+         int varid = this->getVariable(varname);
+         int nbdim = 0, *dimid = NULL;
+
+         CNetCdfInterface::inqVarNDims(grpid, varid, nbdim);
+         dimid = new int[nbdim]();
+         CNetCdfInterface::inqVarDimId(grpid, varid, dimid);
+
+         for (int i = 0; i < nbdim; i++)
+         {
+            CNetCdfInterface::inqDimLen(grpid, dimid[i], size);
+            if (size == NC_UNLIMITED)
+                size = UNLIMITED_DIM;
+            retvalue.push_back(size);
+         }
+         delete [] dimid;
+         return retvalue;
+      }
+
+      std::vector<std::string> CONetCDF4::getDimensionsIdList(const std::string* _varname)
+      {
+         int nDimNull = 0;
+         int nbdim = 0, *dimid = NULL;
+         int grpid = this->getCurrentGroup();
+         int varid = (_varname != NULL) ? this->getVariable(*_varname) : NC_GLOBAL;
+         std::vector<std::string> retvalue;
+
+         if (_varname != NULL)
+         {
+            CNetCdfInterface::inqVarNDims(grpid, varid, nbdim);
+            dimid = new int[nbdim]();
+            CNetCdfInterface::inqVarDimId(grpid, varid, dimid);
+         }
+         else
+         {
+            CNetCdfInterface::inqDimIds(grpid, nbdim, NULL, 1);
+            dimid = new int[nbdim]();
+            CNetCdfInterface::inqDimIds(grpid, nDimNull, dimid, 1);
+         }
+
+         for (int i = 0; i < nbdim; i++)
+         {
+            std::string dimname;
+            CNetCdfInterface::inqDimName(grpid, dimid[i], dimname);
+            retvalue.push_back(dimname);
+         }
+         delete [] dimid;
+
+         return retvalue;
+      }
+
+      //---------------------------------------------------------------
+
+      void CONetCDF4::getTimeAxisBounds(CArray<double,2>& timeAxisBounds, const StdString& name, bool collective)
+      {
+        int grpid = this->getCurrentGroup();
+        int varid = this->getVariable(name);
+
+        std::vector<StdSize> start(2), count(2);
+        start[0] = 0;
+        // Find out how many temporal records have been written already to the file we are opening
+        int ncUnlimitedDimId;
+        CNetCdfInterface::inqUnLimDim(this->ncidp, ncUnlimitedDimId);
+        CNetCdfInterface::inqDimLen(this->ncidp, ncUnlimitedDimId, count[0]);
+        start[1] = 0;
+        count[1] = 2;
+
+        timeAxisBounds.resize(count[1], count[0]);
+
+        if (this->wmpi && collective)
+          CNetCdfInterface::varParAccess(grpid, varid, NC_COLLECTIVE);
+        if (this->wmpi && !collective)
+          CNetCdfInterface::varParAccess(grpid, varid, NC_INDEPENDENT);
+
+        CNetCdfInterface::getVaraType(grpid, varid, &start[0], &count[0], timeAxisBounds.dataFirst());
+      }
+
+      void CONetCDF4::getTimeAxisBounds(CArray<double,2>& timeAxisBounds, const StdString& name, bool collective, size_t record)
+      {
+        int grpid = this->getCurrentGroup();
+        int varid = this->getVariable(name);
+
+        std::vector<StdSize> start(2), count(2);
+        start[0] = record;
+        count[0] = 1 ;
+        start[1] = 0;
+        count[1] = 2;
+
+        timeAxisBounds.resize(2, 1);
+
+        if (this->wmpi && collective)
+          CNetCdfInterface::varParAccess(grpid, varid, NC_COLLECTIVE);
+        if (this->wmpi && !collective)
+          CNetCdfInterface::varParAccess(grpid, varid, NC_INDEPENDENT);
+
+        CNetCdfInterface::getVaraType(grpid, varid, &start[0], &count[0], timeAxisBounds.dataFirst());
+      }
+
+
+
+      const CONetCDF4::CONetCDF4Path& CONetCDF4::getCurrentPath(void) const
+      { return this->path; }
+
+      void CONetCDF4::setCurrentPath(const CONetCDF4Path& path)
+      { this->path = path; }
+
+      //---------------------------------------------------------------
+
+      int CONetCDF4::addGroup(const StdString& name)
+      {
+         int retvalue = 0;
+         int grpid = this->getCurrentGroup();
+         CNetCdfInterface::defGrp(grpid, name, retvalue);
+         return retvalue;
+      }
+
+      //---------------------------------------------------------------
+
+      int CONetCDF4::addDimension(const StdString& name, const StdSize size)
+      {
+         int retvalue = 0;
+         int grpid = this->getCurrentGroup();
+         if (size != UNLIMITED_DIM)
+            CNetCdfInterface::defDim(grpid, name, size, retvalue);
+         else
+            CNetCdfInterface::defDim(grpid, name, NC_UNLIMITED, retvalue);
+         return retvalue;
+      }
+
+      //---------------------------------------------------------------
+
+      int CONetCDF4::addVariable(const StdString& name, nc_type type,
+                                 const std::vector<StdString>& dim, int compressionLevel)
+      {
+         int varid = 0;
+         std::vector<int> dimids;
+         std::vector<StdSize> dimsizes;
+         int dimSize = dim.size();
+         
+         StdSize size;
+         StdSize totalSize;
+         StdSize maxSize = 1024 * 1024 * 256; // == 2GB/8 if output double
+
+         int grpid = this->getCurrentGroup();
+
+         std::vector<StdString>::const_iterator it = dim.begin(), end = dim.end();
+
+         for (int idx = 0; it != end; it++, ++idx)
+         {
+            const StdString& dimid = *it;
+            dimids.push_back(this->getDimension(dimid));
+            CNetCdfInterface::inqDimLen(grpid, this->getDimension(dimid), size);
+            if (size == NC_UNLIMITED) size = 1;
+            dimsizes.push_back(size);
+         }
+
+         CNetCdfInterface::defVar(grpid, name, type, dimids.size(), &dimids[0], varid);
+
+         // The classic NetCDF format does not support chunking nor fill parameters
+         if (!useClassicFormat)
+         {
+            // set chunksize : size of one record
+            // but must not be > 2GB (netcdf or HDF5 problem)
+            totalSize = 1;
+            for (vector<StdSize>::reverse_iterator it = dimsizes.rbegin(); it != dimsizes.rend(); ++it)
+            {
+              totalSize *= *it;
+              if (totalSize >= maxSize) *it = 1;
+            }
+            int storageType = (0 == dimSize) ? NC_CONTIGUOUS : NC_CHUNKED;
+            CNetCdfInterface::defVarChunking(grpid, varid, storageType, &dimsizes[0]);
+            CNetCdfInterface::defVarFill(grpid, varid, true, NULL);
+         }
+
+         setCompressionLevel(name, compressionLevel) ;
+         
+         return varid;
+      }
+
+      //---------------------------------------------------------------
+
+      void CONetCDF4::setCompressionLevel(const StdString& varname, int compressionLevel)
+      {
+         if (compressionLevel < 0 || compressionLevel > 9)
+           ERROR("void CONetCDF4::setCompressionLevel(const StdString& varname, int compressionLevel)",
+                 "Invalid compression level for variable \"" << varname << "\", the value should range between 0 and 9.");
+         if (compressionLevel && wmpi)
+           ERROR("void CONetCDF4::setCompressionLevel(const StdString& varname, int compressionLevel)",
+                 "Impossible to use compression for variable \"" << varname << "\" when using parallel mode.");
+
+         int grpid = this->getCurrentGroup();
+         int varid = this->getVariable(varname);
+         CNetCdfInterface::defVarDeflate(grpid, varid, compressionLevel);
+      }
+
+      //---------------------------------------------------------------
+
+      template <>
+      void CONetCDF4::addAttribute(const StdString& name, const StdString& value, const StdString* varname)
+      {
+         int grpid = this->getCurrentGroup();
+         int varid = (varname == NULL) ? NC_GLOBAL : this->getVariable(*varname);
+         CNetCdfInterface::putAttType(grpid, varid, name, value.size(), value.c_str());
+      }
+
+      //---------------------------------------------------------------
+
+      template <>
+      void CONetCDF4::addAttribute(const StdString& name, const double& value, const StdString* varname)
+      {
+         int grpid = this->getCurrentGroup();
+         int varid = (varname == NULL) ? NC_GLOBAL : this->getVariable(*varname);
+         CNetCdfInterface::putAttType(grpid, varid, name, 1, &value);
+      }
+
+      template <>
+      void CONetCDF4::addAttribute(const StdString& name, const CArray<double,1>& value, const StdString* varname)
+      {
+         int grpid = this->getCurrentGroup();
+         int varid = (varname == NULL) ? NC_GLOBAL : this->getVariable(*varname);
+         CNetCdfInterface::putAttType(grpid, varid, name, value.numElements(), value.dataFirst());
+      }
+      //---------------------------------------------------------------
+
+      template <>
+      void CONetCDF4::addAttribute(const StdString& name, const float& value, const StdString* varname)
+      {
+         int grpid = this->getCurrentGroup();
+         int varid = (varname == NULL) ? NC_GLOBAL : this->getVariable(*varname);
+         CNetCdfInterface::putAttType(grpid, varid, name, 1, &value);
+      }
+
+      template <>
+      void CONetCDF4::addAttribute(const StdString& name, const CArray<float,1>& value, const StdString* varname)
+      {
+         int grpid = this->getCurrentGroup();
+         int varid = (varname == NULL) ? NC_GLOBAL : this->getVariable(*varname);
+         CNetCdfInterface::putAttType(grpid, varid, name, value.numElements(), value.dataFirst());
+      }
+
+      //---------------------------------------------------------------
+
+      template <>
+      void CONetCDF4::addAttribute(const StdString& name, const int& value, const StdString* varname)
+      {
+         int grpid = this->getCurrentGroup();
+         int varid = (varname == NULL) ? NC_GLOBAL : this->getVariable(*varname);
+         CNetCdfInterface::putAttType(grpid, varid, name, 1, &value);
+      }
+
+      template <>
+      void CONetCDF4::addAttribute(const StdString& name, const CArray<int,1>& value, const StdString* varname)
+      {
+         int grpid = this->getCurrentGroup();
+         int varid = (varname == NULL) ? NC_GLOBAL : this->getVariable(*varname);
+         CNetCdfInterface::putAttType(grpid, varid, name, value.numElements(), value.dataFirst());
+      }
+
+      template <>
+      void CONetCDF4::addAttribute(const StdString& name, const short int& value, const StdString* varname)
+      {
+         int grpid = this->getCurrentGroup();
+         int varid = (varname == NULL) ? NC_GLOBAL : this->getVariable(*varname);
+         CNetCdfInterface::putAttType(grpid, varid, name, 1, &value);
+      }
+
+      template <>
+      void CONetCDF4::addAttribute(const StdString& name, const CArray<short int,1>& value, const StdString* varname)
+      {
+         int grpid = this->getCurrentGroup();
+         int varid = (varname == NULL) ? NC_GLOBAL : this->getVariable(*varname);
+         CNetCdfInterface::putAttType(grpid, varid, name, value.numElements(), value.dataFirst());
+      }
+
+      template <>
+      void CONetCDF4::addAttribute(const StdString& name, const long int& value, const StdString* varname)
+      {
+         int grpid = this->getCurrentGroup();
+         int varid = (varname == NULL) ? NC_GLOBAL : this->getVariable(*varname);
+         CNetCdfInterface::putAttType(grpid, varid, name, 1, &value);
+      }
+
+      template <>
+      void CONetCDF4::addAttribute(const StdString& name, const CArray<long int,1>& value, const StdString* varname)
+      {
+         int grpid = this->getCurrentGroup();
+         int varid = (varname == NULL) ? NC_GLOBAL : this->getVariable(*varname);
+         CNetCdfInterface::putAttType(grpid, varid, name, value.numElements(), value.dataFirst());
+      }
+
+      //---------------------------------------------------------------
+
+      void CONetCDF4::getWriteDataInfos(const StdString& name, StdSize record, StdSize& array_size,
+                                        std::vector<StdSize>& sstart,
+                                        std::vector<StdSize>& scount,
+                                        const std::vector<StdSize>* start,
+                                        const std::vector<StdSize>* count)
+      {
+         std::vector<std::size_t> sizes  = this->getDimensions(name);
+         if (sizes.size()==0) 
+         {
+            array_size=1 ;
+            sstart.push_back(0);
+            scount.push_back(1);
+         }
+         else
+         {
+           std::vector<std::string> iddims = this->getDimensionsIdList (&name);
+           std::vector<std::size_t>::const_iterator
+           it  = sizes.begin(), end = sizes.end();
+           int i = 0;
+
+           if (iddims.begin()->compare(timeCounterName) == 0)
+           {
+             sstart.push_back(record);
+             scount.push_back(1);
+              if ((start == NULL) &&
+                  (count == NULL)) i++;
+              it++;
+           }
+
+           for (;it != end; it++)
+           {
+              if ((start != NULL) && (count != NULL))
+              {
+                 sstart.push_back((*start)[i]);
+                 scount.push_back((*count)[i]);
+                 array_size *= (*count)[i];
+                 i++;
+              }
+              else
+              {
+                 sstart.push_back(0);
+                 scount.push_back(sizes[i]);
+                 array_size *= sizes[i];
+                 i++;
+              }
+           }
+
+         }
+      }
+
+
+      template <>
+      void CONetCDF4::writeData_(int grpid, int varid,
+                                 const std::vector<StdSize>& sstart,
+                                 const std::vector<StdSize>& scount, const double* data)
+      {
+         CNetCdfInterface::putVaraType(grpid, varid, &sstart[0], &scount[0], data);
+      }
+
+      //---------------------------------------------------------------
+
+      template <>
+      void CONetCDF4::writeData_(int grpid, int varid,
+                                 const std::vector<StdSize>& sstart,
+                                 const std::vector<StdSize>& scount, char* data)
+      {
+          CNetCdfInterface::putVaraType(grpid, varid, &sstart[0], &scount[0], data);
+      }
+      
+      template <>
+
+      void CONetCDF4::writeData_(int grpid, int varid,
+                                 const std::vector<StdSize>& sstart,
+                                 const std::vector<StdSize>& scount, const int* data)
+      {
+          CNetCdfInterface::putVaraType(grpid, varid, &sstart[0], &scount[0], data);
+      }
+      //---------------------------------------------------------------
+
+      template <>
+      void CONetCDF4::writeData_(int grpid, int varid,
+                                 const std::vector<StdSize>& sstart,
+                                 const std::vector<StdSize>& scount, const float* data)
+      {
+          CNetCdfInterface::putVaraType(grpid, varid, &sstart[0], &scount[0], data);
+      }
+
+      //---------------------------------------------------------------
+
+      void CONetCDF4::writeData(const CArray<int, 2>& data, const StdString& name)
+      {
+         int grpid = this->getCurrentGroup();
+         int varid = this->getVariable(name);
+         StdSize array_size = 1;
+         std::vector<StdSize> sstart, scount;
+
+         this->getWriteDataInfos(name, 0, array_size,  sstart, scount, NULL, NULL);
+
+         this->writeData_(grpid, varid, sstart, scount, data.dataFirst());
+
+      }
+
+      void CONetCDF4::writeTimeAxisData(const CArray<double, 1>& data, const StdString& name,
+                                        bool collective, StdSize record, bool isRoot)
+      {
+         int grpid = this->getCurrentGroup();
+         int varid = this->getVariable(name);
+
+         map<int,size_t>::iterator it=timeAxis.find(varid);
+         if (it == timeAxis.end()) timeAxis[varid] = record;
+         else
+         {
+           if (it->second >= record) return;
+           else it->second =record;
+         }
+
+         StdSize array_size = 1;
+         std::vector<StdSize> sstart, scount;
+
+         if (this->wmpi && collective)
+            CNetCdfInterface::varParAccess(grpid, varid, NC_COLLECTIVE);
+         if (this->wmpi && !collective)
+            CNetCdfInterface::varParAccess(grpid, varid, NC_INDEPENDENT);
+
+         this->getWriteDataInfos(name, record, array_size,  sstart, scount, NULL, NULL);
+         this->writeData_(grpid, varid, sstart, scount, data.dataFirst());
+       }
+
+      void CONetCDF4::writeTimeAxisDataBounds(const CArray<double, 1>& data, const StdString& name,
+                                        bool collective, StdSize record, bool isRoot)
+      {
+         int grpid = this->getCurrentGroup();
+         int varid = this->getVariable(name);
+
+         map<int,size_t>::iterator it=timeAxis.find(varid);
+         if (it == timeAxis.end()) timeAxis[varid] = record;
+         else
+         {
+           if (it->second >= record) return;
+           else it->second =record;
+         }
+
+         StdSize array_size = 1;
+         std::vector<StdSize> sstart, scount;
+
+         if (this->wmpi && collective)
+            CNetCdfInterface::varParAccess(grpid, varid, NC_COLLECTIVE);
+         if (this->wmpi && !collective)
+            CNetCdfInterface::varParAccess(grpid, varid, NC_INDEPENDENT);
+
+         this->getWriteDataInfos(name, record, array_size,  sstart, scount, NULL, NULL);
+         this->writeData_(grpid, varid, sstart, scount, data.dataFirst());
+       }
+
+
+      //---------------------------------------------------------------
+
+      bool CONetCDF4::varExist(const StdString& varname)
+      {
+         int grpid = this->getCurrentGroup();
+         return CNetCdfInterface::isVarExisted(grpid, varname);
+      }
+
+      bool CONetCDF4::dimExist(const StdString& dimname)
+      {
+         int grpid = this->getCurrentGroup();
+         return CNetCdfInterface::isDimExisted(grpid, dimname);
+      }
+
+      void CONetCDF4::sync(void)
+      {
+         CNetCdfInterface::sync(this->ncidp);
+      }
+      ///--------------------------------------------------------------
+ } // namespace xios
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/io/onetcdf4.hpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/io/onetcdf4.hpp	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/io/onetcdf4.hpp	(revision 1749)
@@ -0,0 +1,138 @@
+#ifndef __XIOS_ONETCDF4__
+#define __XIOS_ONETCDF4__
+
+/// XIOS headers ///
+#include "xios_spl.hpp"
+#include "exception.hpp"
+#include "data_output.hpp"
+#include "array_new.hpp"
+#include "mpi.hpp"
+#include "netcdf.hpp"
+
+#ifndef UNLIMITED_DIM
+   #define UNLIMITED_DIM (size_t)(-1)
+#endif  //UNLIMITED_DIM
+
+namespace xios
+{
+      /// ////////////////////// DÃ©clarations ////////////////////// ///
+      class CONetCDF4
+         : public virtual CDataOutput
+      {
+         public :
+
+            /// DÃ©finition de type ///
+            typedef std::vector<StdString> CONetCDF4Path;
+
+            /// Constructeurs ///
+            CONetCDF4(const StdString& filename, bool append, bool useClassicFormat = false,
+            		  bool useCFConvention = true,
+                      const MPI_Comm* comm = NULL, bool multifile = true,
+                      const StdString& timeCounterName = "time_counter");
+
+            CONetCDF4(const CONetCDF4& onetcdf4);       // Not implemented.
+            CONetCDF4(const CONetCDF4* const onetcdf4); // Not implemented.
+
+
+            /// Initialisation ///
+            void initialize(const StdString& filename, bool append, bool useClassicFormat, bool useCFConvention,
+                            const MPI_Comm* comm, bool multifile, const StdString& timeCounterName);
+            void close(void);
+            void sync(void);
+            void definition_start(void);
+            void definition_end(void);
+
+            /// Mutateurs ///
+            void setCurrentPath(const CONetCDF4Path& path);
+
+            int addGroup(const StdString& name);
+            int addDimension(const StdString& name, const StdSize size = UNLIMITED_DIM);
+            int addVariable(const StdString& name, nc_type type,
+                            const std::vector<StdString>& dim, int compressionLevel=0);
+
+      //----------------------------------------------------------------
+         public :
+
+            template <class T>
+               void setDefaultValue(const StdString& varname, const T* value = NULL);
+
+            void setCompressionLevel(const StdString& varname, int compressionLevel);
+
+            template <class T>  void addAttribute (const StdString& name, const T& value, const StdString* varname = NULL);
+
+            /// Ecriture des donnÃ©es ///
+            template <class T, int ndim>
+               void writeData(const CArray<T,ndim>& data, const StdString& name,
+                              bool collective, StdSize record,
+                              const std::vector<StdSize>* start = NULL,
+                              const std::vector<StdSize>* count = NULL);
+
+            void writeData(const CArray<int, 2>& data, const StdString& name);
+            void writeTimeAxisData(const CArray<double,1>& data, const StdString& name,
+                                   bool collective, StdSize record, bool Isroot);
+            void writeTimeAxisDataBounds(const CArray<double,1>& data, const StdString& name,
+                                   bool collective, StdSize record, bool Isroot);
+            /// Accesseur ///
+            const CONetCDF4Path& getCurrentPath(void) const;
+
+            /// Destructeur ///
+            virtual ~CONetCDF4(void);
+
+      //----------------------------------------------------------------
+
+         protected :
+
+            /// Ecriture ///
+            virtual void writeField_ (CField*  field)  = 0;
+            virtual void writeDomain_(CDomain* domain) = 0;
+            virtual void writeAxis_  (CAxis*   axis)   = 0;
+
+            /// Accesseurs ///
+            int getCurrentGroup(void);
+            int getGroup(const CONetCDF4Path& path);
+            int getVariable(const StdString& varname);
+            int getDimension(const StdString& dimname);
+            std::vector<StdSize>   getDimensions       (const StdString& varname);
+            std::vector<StdString> getDimensionsIdList (const StdString* varname);
+            int       getUnlimitedDimension(void);
+            StdString getUnlimitedDimensionName(void);
+            const StdString& getTimeCounterName(void) const { return timeCounterName; };
+
+            void getTimeAxisBounds(CArray<double,2>& timeAxisBounds, const StdString& name, bool collective );
+            void getTimeAxisBounds(CArray<double,2>& timeAxisBounds, const StdString& name, bool collective, size_t record);
+
+            bool varExist(const StdString& varname);
+            bool dimExist(const StdString& dimname);
+
+            bool useClassicFormat; //!< If true, NetCDF4 will use the classic NetCDF3 format
+            bool useCFConvention;  //!< If true data is written in the CF convention otherwise in UGRID
+
+      //----------------------------------------------------------------
+
+         private :
+            template <class T>
+            void writeData_(int grpid, int varid,
+                            const std::vector<StdSize>& sstart,
+                            const std::vector<StdSize>& scount, T* data);
+
+            void getWriteDataInfos(const StdString& name, StdSize record, StdSize& array_size,
+                                   std::vector<StdSize>& sstart,
+                                   std::vector<StdSize>& scount,
+                                   const std::vector<StdSize>* start,
+                                   const std::vector<StdSize>* count);
+
+            /// PropriÃ©tÃ©s privÃ©es ///
+            CONetCDF4Path path;
+            int ncidp;
+            bool wmpi;
+            map<int,size_t> timeAxis;
+            StdString timeCounterName;
+      }; // class CONetCDF4
+
+      ///---------------------------------------------------------------
+
+
+
+} // namespace xios
+
+#endif //__XIOS_ONETCDF4__
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/io/onetcdf4_decl.cpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/io/onetcdf4_decl.cpp	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/io/onetcdf4_decl.cpp	(revision 1749)
@@ -0,0 +1,21 @@
+#include "onetcdf4_impl.hpp"
+
+namespace xios
+{
+# define  macro(type,size) \
+  template void CONetCDF4::writeData<type,size>(const CArray<type, size>& data, const StdString & name, \
+                                               bool collective, StdSize record, \
+                                               const std::vector<StdSize> * start, \
+                                               const std::vector<StdSize> * count) ;
+ 
+  macro(int, 1)
+  macro(int, 2)
+  macro(double, 1)
+  macro(double, 2)
+  macro(double, 3)
+  macro(StdString, 1)
+ 
+  template void CONetCDF4::setDefaultValue<double>(const StdString & varname, const double* value) ;
+  template void CONetCDF4::setDefaultValue<short>(const StdString & varname, const short* value) ;
+  template void CONetCDF4::setDefaultValue<float>(const StdString & varname, const float* value) ;
+}
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/io/onetcdf4_impl.hpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/io/onetcdf4_impl.hpp	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/io/onetcdf4_impl.hpp	(revision 1749)
@@ -0,0 +1,123 @@
+#ifndef __ONETCDF4_IMPL_HPP__
+#define __ONETCDF4_IMPL_HPP__
+
+#include "onetcdf4.hpp"
+#include "netCdfInterface.hpp"
+#include "timer.hpp"
+
+namespace xios
+{
+  template <class T, int ndim>
+  void CONetCDF4::writeData(const CArray<T, ndim>& data, const StdString & name,
+                            bool collective, StdSize record,
+                            const std::vector<StdSize> * start,
+                            const std::vector<StdSize> * count)
+  {
+    int grpid = this->getCurrentGroup();
+    int varid = this->getVariable(name);
+    StdSize array_size = 1;
+    std::vector<StdSize> sstart, scount;
+
+    if (this->wmpi && collective)
+    CNetCdfInterface::varParAccess(grpid, varid, NC_COLLECTIVE);
+    if (this->wmpi && !collective)
+    CNetCdfInterface::varParAccess(grpid, varid, NC_INDEPENDENT);
+
+    CTimer::get("Files : get data infos").resume();
+    this->getWriteDataInfos
+    (name, record, array_size,  sstart, scount, start, count);
+    CTimer::get("Files : get data infos").suspend();
+
+    if (data.numElements() != array_size)
+    {
+      ERROR("CONetCDF4::writeData(...)",
+      << "[ input array size = "  << data.numElements()
+      << ", intern array size = " << array_size
+      << " ] Invalid input data !" );
+    }
+
+    this->writeData_(grpid, varid, sstart, scount, data.dataFirst());
+  }
+
+  template <>
+  void CONetCDF4::writeData(const CArray<StdString, 1>& data, const StdString & name,
+                            bool collective, StdSize record,
+                            const std::vector<StdSize> * start,
+                            const std::vector<StdSize> * count)
+  {
+    int grpid = this->getCurrentGroup();
+    int varid = this->getVariable(name);
+    StdSize array_size = 1;
+    std::vector<StdSize> sstart, scount;
+
+    if (this->wmpi && collective)
+    CNetCdfInterface::varParAccess(grpid, varid, NC_COLLECTIVE);
+    if (this->wmpi && !collective)
+    CNetCdfInterface::varParAccess(grpid, varid, NC_INDEPENDENT);
+
+    CTimer::get("CONetCDF4::writeData getWriteDataInfos").resume();
+    this->getWriteDataInfos(name, record, array_size,  sstart, scount, start, count);
+    CTimer::get("CONetCDF4::writeData getWriteDataInfos").suspend();
+ 
+    int dimArrayLen;
+    for (int i=0; i<scount.size(); i++)
+      if (scount[i] == stringArrayLen)
+        dimArrayLen = i;
+
+    if (data.numElements()*stringArrayLen != array_size)
+    {
+      ERROR("CONetCDF4::writeData(...)",
+      << "[ input array size = "  << data.numElements()*stringArrayLen
+      << ", intern array size = " << array_size
+      << " ] Invalid input data !" );
+    }
+    char *PtrArrayStr ;
+    PtrArrayStr=new char[stringArrayLen*data.numElements()] ;
+    memset (PtrArrayStr,' ',stringArrayLen*data.numElements());
+    size_t offset=0 ;
+    Array<StdString,1>::const_iterator it, itb=data.begin(), ite=data.end() ;
+    for(it=itb;it!=ite;++it, offset+=stringArrayLen)
+    {
+      it->copy(PtrArrayStr+offset,it->size()) ;
+      PtrArrayStr[offset+it->size()]='\0' ;
+    }
+
+     CTimer::get("CONetCDF4::writeData writeData_").resume();
+     this->writeData_(grpid, varid, sstart, scount, PtrArrayStr);
+     CTimer::get("CONetCDF4::writeData writeData_").suspend();
+
+    delete []  PtrArrayStr;
+  }
+
+//----------------------------------------------------------------
+
+  template <class T>
+  void CONetCDF4::setDefaultValue(const StdString & varname, const T * value)
+  {
+    int grpid = this->getCurrentGroup();
+    int varid = this->getVariable(varname);
+
+    if (value != NULL)
+    {
+      // nc_def_var_fill will automatically set the _FillValue attribute when
+      // using the NetCDF 4 format but we need to do it manually otherwise
+      if (useClassicFormat)
+        this->addAttribute(StdString("_FillValue"), *value, &varname);
+      else
+        CNetCdfInterface::defVarFill(grpid, varid, 0, (void*)value);
+      this->addAttribute(StdString("missing_value"), *value, &varname);
+    }
+    else if (!useClassicFormat)
+    {
+      // The "no-fill mode" is set globally for the classic NetCDF format
+      CNetCdfInterface::defVarFill(grpid, varid, 1, NULL);
+    }
+  }
+
+  ///---------------------------------------------------------------
+
+}
+
+
+
+#endif
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/log.cpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/log.cpp	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/log.cpp	(revision 1749)
@@ -0,0 +1,8 @@
+#include "log.hpp"
+
+namespace xios
+{
+  CLog info("info") ;
+  CLog report("report") ;
+  CLog error("error", cerr.rdbuf()) ;
+}
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/log.hpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/log.hpp	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/log.hpp	(revision 1749)
@@ -0,0 +1,59 @@
+#ifndef __XIOS_LOG_HPP__
+#define __XIOS_LOG_HPP__
+
+#include <string>
+#include <iostream>
+#include <string>
+
+namespace xios
+{
+  using namespace std ;
+
+  class CLog : public ostream
+  {
+    public :
+    CLog(const string& name_, std::streambuf* sBuff = cout.rdbuf())
+      : ostream(sBuff), level(0), name(name_), strBuf_(sBuff) {}
+    CLog& operator()(int l)
+    {
+      if (l<=level)
+      {
+        rdbuf(strBuf_);
+        *this<<"-> "<<name<<" : " ;
+      }
+      else rdbuf(NULL) ;
+      return *this;
+    }
+    void setLevel(int l) {level=l; }
+    int getLevel() {return level ;}
+    bool isActive(void) { if (rdbuf()==NULL) return true ; else return false ;}
+    bool isActive(int l) {if (l<=level) return true ; else return false ; }
+
+  public:
+    //! Write log into a file with its streambuf
+    void write2File(std::streambuf* sBuff) { changeStreamBuff(sBuff); }
+
+    //! Write log into standard output
+    void write2StdOut() { changeStreamBuff(cout.rdbuf()); }
+
+    //! Write log into standard error output
+    void write2StdErr() { changeStreamBuff(cerr.rdbuf()); }
+
+  private:
+    /*!
+     * \brief Change current streambuf (by default std::cout) to new one
+     * This function associates a new streambuf to the current log object
+     * \param [in] pointer to new streambuf
+    */
+    void changeStreamBuff(std::streambuf* sBuff) { strBuf_ = sBuff; rdbuf(sBuff); }
+
+    int level ;
+    string name ;
+    std::streambuf* strBuf_;
+  };
+
+  extern CLog info;
+  extern CLog report;
+  extern CLog error;
+}
+#endif
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/memory.cpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/memory.cpp	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/memory.cpp	(revision 1749)
@@ -0,0 +1,11 @@
+#include "memory.hpp"
+#include "exception.hpp"
+
+namespace xios
+{
+ 
+  void noMemory(void)
+  {
+    ERROR("void noMemory(void)",<<"Out of memory") ;
+  }
+}
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/memory.hpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/memory.hpp	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/memory.hpp	(revision 1749)
@@ -0,0 +1,11 @@
+#ifndef __XIOS_MEMORY_HPP__
+#define __XIOS_MEMORY_HPP__
+
+namespace xios
+{
+  void noMemory(void) ;
+
+
+}
+
+#endif
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/memtrack.cpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/memtrack.cpp	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/memtrack.cpp	(revision 1749)
@@ -0,0 +1,645 @@
+#ifdef XIOS_MEMTRACK
+/*
+Copyright (c) 2002, 2008 Curtis Bartley
+All rights reserved.
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+
+- Redistributions of source code must retain the above copyright
+notice, this list of conditions and the following disclaimer.
+
+- Redistributions in binary form must reproduce the above copyright
+notice, this list of conditions and the following disclaimer in the
+documentation and/or other materials provided with the
+distribution.
+
+- Neither the name of Curtis Bartley nor the names of any other
+contributors may be used to endorse or promote products derived
+from this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
+OF THE POSSIBILITY OF SUCH DAMAGE.
+*/
+
+/* ---------------------------------------- includes */
+
+#include <assert.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <algorithm>
+#include <cstring>
+#include <new>
+#include <iostream>
+#include <sstream>
+#include <string>
+#include <execinfo.h>
+
+#include "memtrack.hpp"
+#undef new    // IMPORTANT!
+
+extern "C"
+{
+  void addr2line(const char *file_name, char** addr, int naddr) ;
+#ifdef XIOS_MEMTRACK_LIGHT
+  void addr2line(const char *file_name, char** addr, int naddr) {} 
+#endif
+}
+/* ------------------------------------------------------------ */
+/* -------------------- namespace MemTrack -------------------- */
+/* ------------------------------------------------------------ */
+
+namespace MemTrack
+{
+    size_t currentMemorySize=0 ;
+    size_t maxMemorySize=0 ; 
+
+    size_t getCurrentMemorySize(void) {return currentMemorySize; }
+    size_t getMaxMemorySize(void) {return maxMemorySize ; }
+
+    /* ------------------------------------------------------------ */
+    /* --------------------- class BlockHeader -------------------- */
+    /* ------------------------------------------------------------ */
+
+    class BlockHeader
+    {
+        private:    // static member variables
+            static BlockHeader *ourFirstNode;
+    
+        private:    // member variables
+            BlockHeader *myPrevNode;
+            BlockHeader *myNextNode;
+            size_t myRequestedSize;
+            char const *myFilename;
+            int myLineNum;
+            char const *myTypeName;
+            
+            size_t stackSize ;
+            void* stackArray[20] ;
+
+        public:     // members
+            BlockHeader(size_t requestedSize);
+            ~BlockHeader();
+        
+            size_t GetRequestedSize() const { return myRequestedSize; }
+            char const *GetFilename() const { return myFilename; }
+            int GetLineNum() const { return myLineNum; }
+            char const *GetTypeName() const { return myTypeName; }
+        
+            void Stamp(char const *filename, int lineNum, char const *typeName);
+            void backTrace(void) ;
+        
+            static void AddNode(BlockHeader *node);
+            static void RemoveNode(BlockHeader *node);
+            static size_t CountBlocks();
+            static void GetBlocks(BlockHeader **blockHeaderPP);
+            static bool TypeGreaterThan(BlockHeader *header1, BlockHeader *header2);
+    };
+
+    /* ---------------------------------------- BlockHeader static member variables */
+
+    BlockHeader *BlockHeader::ourFirstNode = NULL;
+
+    /* ---------------------------------------- BlockHeader constructor */
+
+    BlockHeader::BlockHeader(size_t requestedSize)
+    {
+        myPrevNode = NULL;
+        myNextNode = NULL;
+        myRequestedSize = requestedSize;
+        myFilename = "[unknown]";
+        myLineNum = 0;
+        myTypeName = "[unknown]";
+        stackSize=backtrace(stackArray,20) ;
+    }
+
+    /* ---------------------------------------- BlockHeader destructor */
+
+    BlockHeader::~BlockHeader()
+    {
+    }
+        
+    /* ---------------------------------------- BlockHeader Stamp */
+
+    void BlockHeader::Stamp(char const *filename, int lineNum, char const *typeName)
+    {
+        myFilename = filename;
+        myLineNum = lineNum;
+        myTypeName = typeName;
+    }
+
+    void BlockHeader::backTrace(void)
+    {   
+        
+//        oss<<"addr2line -C -f -i -s -e ../bin/test_client.exe " ;
+        char *addr ;
+        char buffer[20] ;
+        addr=buffer ;
+        for(int i=0;i<stackSize;i++) 
+        {
+          std::ostringstream oss ;
+          oss<<stackArray[i] ;
+          strcpy(addr,oss.str().c_str()) ;
+          addr2line("/proc/self/exe",&addr,1) ;
+        }
+    }
+    /* ---------------------------------------- BlockHeader AddNode */
+
+    void BlockHeader::AddNode(BlockHeader *node)
+    {
+        assert(node != NULL);
+        assert(node->myPrevNode == NULL);
+        assert(node->myNextNode == NULL);
+
+        // If we have at least one node in the list ...        
+        if (ourFirstNode != NULL)
+        {
+            // ... make the new node the first node's predecessor.
+            assert(ourFirstNode->myPrevNode == NULL);
+            ourFirstNode->myPrevNode = node;
+        }
+
+        // Make the first node the new node's succesor.
+        node->myNextNode = ourFirstNode;
+
+        // Make the new node the first node.
+        ourFirstNode = node;
+    }
+
+    /* ---------------------------------------- BlockHeader RemoveNode */
+
+    void BlockHeader::RemoveNode(BlockHeader *node)
+    {
+        assert(node != NULL);
+        assert(ourFirstNode != NULL);
+
+        // If target node is the first node in the list...
+        if (ourFirstNode == node)
+        {
+            // ... make the target node's successor the first node.
+            assert(ourFirstNode->myPrevNode == NULL);
+            ourFirstNode = node->myNextNode;
+        }
+        
+        // Link target node's predecessor, if any, to its successor.
+        if (node->myPrevNode != NULL)
+        {
+            node->myPrevNode->myNextNode = node->myNextNode;
+        }
+        
+        // Link target node's successor, if any, to its predecessor.
+        if (node->myNextNode != NULL)
+        {
+            node->myNextNode->myPrevNode = node->myPrevNode;
+        }
+
+        // Clear target node's previous and next pointers.
+        node->myPrevNode = NULL;
+        node->myNextNode = NULL;
+    }
+
+    /* ---------------------------------------- BlockHeader CountBlocks */
+
+    size_t BlockHeader::CountBlocks()
+    {
+        size_t count = 0;
+        BlockHeader *currNode = ourFirstNode;
+        while (currNode != NULL)
+        {
+            count++;
+            currNode = currNode->myNextNode;
+        }
+        return count;
+    }
+
+    /* ---------------------------------------- BlockHeader GetBlocks */
+
+    void BlockHeader::GetBlocks(BlockHeader **blockHeaderPP)
+    {
+        BlockHeader *currNode = ourFirstNode;
+        while (currNode != NULL)
+        {
+            *blockHeaderPP = currNode;
+            blockHeaderPP++;
+            currNode = currNode->myNextNode;
+        }
+    }
+
+    /* ---------------------------------------- BlockHeader TypeGreaterThan */
+
+    bool BlockHeader::TypeGreaterThan(BlockHeader *header1, BlockHeader *header2)
+    {
+        return (strcmp(header1->myTypeName, header2->myTypeName) > 0);
+    }
+
+    /* ------------------------------------------------------------ */
+    /* ---------------------- class Signature --------------------- */
+    /* ------------------------------------------------------------ */
+
+    class Signature
+    {
+        private:    // constants
+            static const unsigned int SIGNATURE1 = 0xCAFEBABE;
+            static const unsigned int SIGNATURE2 = 0xFACEFACE;
+        
+        private:    // member variables
+            unsigned int mySignature1;
+            unsigned int mySignature2;
+            
+        public:        // construction/destruction
+            Signature() : mySignature1(SIGNATURE1), mySignature2(SIGNATURE2) {};
+            ~Signature() { mySignature1 = 0; mySignature2 = 0; }
+            
+        public:        // static member functions
+            static bool IsValidSignature(const Signature *pProspectiveSignature)
+            {
+                try
+                {
+                    if (pProspectiveSignature->mySignature1 != SIGNATURE1) return false;
+                    if (pProspectiveSignature->mySignature2 != SIGNATURE2) return false;
+                    return true;
+                }
+                catch (...)
+                {
+                    return false;
+                }
+            }
+    };
+
+    /* ------------------------------------------------------------ */
+    /* -------------------- address conversion -------------------- */
+    /* ------------------------------------------------------------ */
+
+    /* We divide the memory blocks we allocate into two "chunks", the
+     * "prolog chunk" where we store information about the allocation,
+     * and the "user chunk" which we return to the caller to use.
+     */
+
+    /* ---------------------------------------- alignment */
+
+    const size_t ALIGNMENT = 4;
+
+    /* If "value" (a memory size or offset) falls on an alignment boundary,
+     * then just return it.  Otherwise return the smallest number larger
+     * than "value" that falls on an alignment boundary.
+     */    
+
+    #define PAD_TO_ALIGNMENT_BOUNDARY(value) \
+        ((value) + ((ALIGNMENT - ((value) % ALIGNMENT)) % ALIGNMENT))
+
+    /* ---------------------------------------- chunk structs */
+    
+    /* We declare incomplete structures for each chunk, just to 
+     * provide type safety.
+     */
+
+    struct PrologChunk;
+    struct UserChunk;
+
+    /* ---------------------------------------- chunk sizes and offsets */
+
+    const size_t SIZE_BlockHeader = PAD_TO_ALIGNMENT_BOUNDARY(sizeof(BlockHeader));
+    const size_t SIZE_Signature = PAD_TO_ALIGNMENT_BOUNDARY(sizeof(Signature));
+
+    const size_t OFFSET_BlockHeader = 0;
+    const size_t OFFSET_Signature = OFFSET_BlockHeader + SIZE_BlockHeader;
+    const size_t OFFSET_UserChunk = OFFSET_Signature + SIZE_Signature;
+    
+    const size_t SIZE_PrologChunk = OFFSET_UserChunk;
+
+    /* ---------------------------------------- GetUserAddress */
+
+    static UserChunk *GetUserAddress(PrologChunk *pProlog)
+    {
+        char *pchProlog = reinterpret_cast<char *>(pProlog);
+        char *pchUser = pchProlog + OFFSET_UserChunk;
+        UserChunk *pUser = reinterpret_cast<UserChunk *>(pchUser);
+        return pUser;
+    }
+
+    /* ---------------------------------------- GetPrologAddress */
+
+    static PrologChunk *GetPrologAddress(UserChunk *pUser)
+    {
+        char *pchUser = reinterpret_cast<char *>(pUser);
+        char *pchProlog = pchUser - OFFSET_UserChunk;
+        PrologChunk *pProlog = reinterpret_cast<PrologChunk *>(pchProlog);
+        return pProlog;
+    }
+
+    /* ---------------------------------------- GetHeaderAddress */
+
+    static BlockHeader *GetHeaderAddress(PrologChunk *pProlog)
+    {
+        char *pchProlog = reinterpret_cast<char *>(pProlog);
+        char *pchHeader = pchProlog + OFFSET_BlockHeader;
+        BlockHeader *pHeader = reinterpret_cast<BlockHeader *>(pchHeader);
+        return pHeader;
+    }
+
+    /* ---------------------------------------- GetSignatureAddress */
+
+    static Signature *GetSignatureAddress(PrologChunk *pProlog)
+    {
+        char *pchProlog = reinterpret_cast<char *>(pProlog);
+        char *pchSignature = pchProlog + OFFSET_Signature;
+        Signature *pSignature = reinterpret_cast<Signature *>(pchSignature);
+        return pSignature;
+    }
+
+    /* ------------------------------------------------------------ */
+    /* -------------- memory allocation and stamping -------------- */
+    /* ------------------------------------------------------------ */
+
+    /* ---------------------------------------- TrackMalloc */
+    
+    void *TrackMalloc(size_t size)
+    {
+        // Allocate the memory, including space for the prolog.
+        PrologChunk *pProlog = (PrologChunk *)malloc(SIZE_PrologChunk + size);
+        
+        // If the allocation failed, then return NULL.
+        if (pProlog == NULL) return NULL;
+        
+        // Use placement new to construct the block header in place.
+        BlockHeader *pBlockHeader = new (pProlog) BlockHeader(size);
+        
+        // Link the block header into the list of extant block headers.
+        BlockHeader::AddNode(pBlockHeader);
+        
+        // Use placement new to construct the signature in place.
+        Signature *pSignature = new (GetSignatureAddress(pProlog)) Signature;
+        
+        // Get the offset to the user chunk and return it.
+        UserChunk *pUser = GetUserAddress(pProlog);
+
+        currentMemorySize += size ;
+        if (currentMemorySize>maxMemorySize) maxMemorySize=currentMemorySize ;
+        
+        return pUser;
+    }
+
+    /* ---------------------------------------- TrackFree */
+    
+    void TrackFree(void *p)
+    {
+        // It's perfectly valid for "p" to be null; return if it is.
+        if (p == NULL) return;
+    
+        // Get the prolog address for this memory block.
+        UserChunk *pUser = reinterpret_cast<UserChunk *>(p);    
+        PrologChunk *pProlog = GetPrologAddress(pUser);
+       
+        // Check the signature, and if it's invalid, return immediately.
+        Signature *pSignature = GetSignatureAddress(pProlog);
+        if (!Signature::IsValidSignature(pSignature)) return;
+        
+        // Destroy the signature.
+        pSignature->~Signature();
+        pSignature = NULL;
+
+        // Unlink the block header from the list and destroy it.
+        BlockHeader *pBlockHeader = GetHeaderAddress(pProlog);
+        currentMemorySize-=pBlockHeader->GetRequestedSize();
+        BlockHeader::RemoveNode(pBlockHeader);
+        pBlockHeader->~BlockHeader();
+        pBlockHeader = NULL;
+
+        // Free the memory block.    
+        free(pProlog);
+    }
+
+    /* ---------------------------------------- TrackStamp */
+
+    void TrackStamp(void *p, const MemStamp &stamp, char const *typeName)
+    {
+        // Get the header and signature address for this pointer.
+        UserChunk *pUser = reinterpret_cast<UserChunk *>(p);
+        PrologChunk *pProlog = GetPrologAddress(pUser);
+        BlockHeader *pHeader = GetHeaderAddress(pProlog);
+        Signature *pSignature = GetSignatureAddress(pProlog);
+
+        // If the signature is not valid, then return immediately.
+        if (!Signature::IsValidSignature(pSignature)) return;
+
+        // "Stamp" the information onto the header.
+        pHeader->Stamp(stamp.filename, stamp.lineNum, typeName);
+    }
+
+    /* ---------------------------------------- TrackDumpBlocks */
+
+    void TrackDumpBlocks()
+    {
+        // Get an array of pointers to all extant blocks.
+        size_t numBlocks = BlockHeader::CountBlocks();
+        BlockHeader **ppBlockHeader =
+            (BlockHeader **)calloc(numBlocks, sizeof(*ppBlockHeader));
+        BlockHeader::GetBlocks(ppBlockHeader);
+
+        // Dump information about the memory blocks.
+        printf("\n");
+        printf("=====================\n");
+        printf("Current Memory Blocks\n");
+        printf("=====================\n");
+        printf("\n");
+        for (size_t i = 0; i < numBlocks; i++)
+        {
+            BlockHeader *pBlockHeader = ppBlockHeader[i];
+            char const *typeName = pBlockHeader->GetTypeName();
+            size_t size = pBlockHeader->GetRequestedSize();
+            char const *fileName = pBlockHeader->GetFilename();
+            int lineNum = pBlockHeader->GetLineNum();
+            printf("*** #%-6d %5d bytes %-50s\n", i, size, typeName);
+            printf("... %s:%d\n", fileName, lineNum);
+            pBlockHeader->backTrace();
+        }
+
+        // Clean up.
+        free(ppBlockHeader);
+    }
+
+    /* ---------------------------------------- struct MemDigest */
+
+    struct MemDigest
+    {
+        char const *typeName;
+        int blockCount;
+        size_t totalSize;
+
+        static bool TotalSizeGreaterThan(const MemDigest &md1, const MemDigest &md2)
+            { return md1.totalSize > md2.totalSize; }
+    };
+
+
+    /* ---------------------------------------- SummarizeMemoryUsageForType */
+
+    static void SummarizeMemoryUsageForType(
+        MemDigest *pMemDigest,
+        BlockHeader **ppBlockHeader,
+        size_t startPost,
+        size_t endPost
+    )
+    {
+        pMemDigest->typeName = ppBlockHeader[startPost]->GetTypeName();
+        pMemDigest->blockCount = 0;
+        pMemDigest->totalSize = 0;
+        for (size_t i = startPost; i < endPost; i++)
+        {
+            pMemDigest->blockCount++;
+            pMemDigest->totalSize += ppBlockHeader[i]->GetRequestedSize();
+            assert(strcmp(ppBlockHeader[i]->GetTypeName(), pMemDigest->typeName) == 0);
+        }
+    }
+
+    /* ---------------------------------------- TrackListMemoryUsage */
+
+    void TrackListMemoryUsage()
+    {
+        // If there are no allocated blocks, then return now.
+        size_t numBlocks = BlockHeader::CountBlocks();
+        if (numBlocks == 0) return;
+
+        // Get an array of pointers to all extant blocks.
+        BlockHeader **ppBlockHeader =
+            (BlockHeader **)calloc(numBlocks, sizeof(*ppBlockHeader));
+        BlockHeader::GetBlocks(ppBlockHeader);
+
+        // Sort the blocks by type name.
+        std::sort(
+            ppBlockHeader,
+            ppBlockHeader + numBlocks,
+            BlockHeader::TypeGreaterThan
+        );
+
+        // Find out how many unique types we have.
+        size_t numUniqueTypes = 1;
+        for (size_t i = 1; i < numBlocks; i++)
+        {
+            char const *prevTypeName = ppBlockHeader[i - 1]->GetTypeName();
+            char const *currTypeName = ppBlockHeader[i]->GetTypeName();
+            if (strcmp(prevTypeName, currTypeName) != 0) numUniqueTypes++;
+        }
+
+        // Create an array of "digests" summarizing memory usage by type.
+        size_t startPost = 0;
+        size_t uniqueTypeIndex = 0;
+        MemDigest *pMemDigestArray =
+            (MemDigest *)calloc(numUniqueTypes, sizeof(*pMemDigestArray));
+        for (size_t i = 1; i <= numBlocks; i++)    // yes, less than or *equal* to
+        {
+            char const *prevTypeName = ppBlockHeader[i - 1]->GetTypeName();
+            char const *currTypeName = (i < numBlocks) ? ppBlockHeader[i]->GetTypeName() : "";
+            if (strcmp(prevTypeName, currTypeName) != 0)
+            {
+                size_t endPost = i;
+                SummarizeMemoryUsageForType(
+                    pMemDigestArray + uniqueTypeIndex,
+                    ppBlockHeader,
+                    startPost,
+                    endPost
+                );
+                startPost = endPost;
+                uniqueTypeIndex++;
+            }
+        }
+        assert(uniqueTypeIndex = numUniqueTypes);
+
+        // Sort the digests by total memory usage.
+        std::sort(
+            pMemDigestArray,
+            pMemDigestArray + numUniqueTypes,
+            MemDigest::TotalSizeGreaterThan
+        );
+
+        // Compute the grand total memory usage.
+        size_t grandTotalNumBlocks = 0;
+        size_t grandTotalSize = 0;
+        for (size_t i = 0; i < numUniqueTypes; i++)
+        {
+            grandTotalNumBlocks += pMemDigestArray[i].blockCount;
+            grandTotalSize += pMemDigestArray[i].totalSize;
+        }
+
+        // Dump the memory usage statistics.
+        printf("\n");
+        printf("-----------------------\n");
+        printf("Memory Usage Statistics\n");
+        printf("-----------------------\n");
+        printf("\n");
+        printf("%-50s%5s  %5s %7s %s \n", "allocated type", "blocks", "", "bytes", "");
+        printf("%-50s%5s  %5s %7s %s \n", "--------------", "------", "", "-----", "");
+
+        for (size_t i = 0; i < numUniqueTypes; i++)
+        {
+            MemDigest *pMD = pMemDigestArray + i;
+            size_t blockCount = pMD->blockCount;
+            double blockCountPct = 100.0 * blockCount / grandTotalNumBlocks;
+            size_t totalSize = pMD->totalSize;
+            double totalSizePct = 100.0 * totalSize / grandTotalSize;
+
+            printf(
+                "%-50s %5d %5.1f%% %7d %5.1f%%\n",
+                pMD->typeName,
+                blockCount,
+                blockCountPct,
+                totalSize,
+                totalSizePct
+            );
+        }
+        printf("%-50s %5s %5s  %7s %s \n", "--------", "-----", "", "-------", "");
+        printf("%-50s %5d %5s  %7d %s \n", "[totals]", grandTotalNumBlocks, "", grandTotalSize, "");
+
+        // Clean up.
+        free(ppBlockHeader);
+        free(pMemDigestArray);
+    }
+
+}    // namespace MemTrack
+
+/* ------------------------------------------------------------ */
+/* ---------------------- new and delete ---------------------- */
+/* ------------------------------------------------------------ */
+
+/* ---------------------------------------- operator new */
+
+void *operator new(size_t size)
+{
+    void *p = MemTrack::TrackMalloc(size);
+    if (p == NULL) throw std::bad_alloc();
+    return p;
+}
+
+/* ---------------------------------------- operator delete */
+
+void operator delete(void *p)
+{
+    MemTrack::TrackFree(p);
+}
+
+/* ---------------------------------------- operator new[] */
+
+void *operator new[](size_t size)
+{
+    void *p = MemTrack::TrackMalloc(size);
+    if (p == NULL) throw std::bad_alloc();
+    return p;
+}
+
+/* ---------------------------------------- operator delete[] */
+
+void operator delete[](void *p)
+{
+    MemTrack::TrackFree(p);
+}
+
+#endif
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/memtrack.hpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/memtrack.hpp	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/memtrack.hpp	(revision 1749)
@@ -0,0 +1,82 @@
+#ifdef XIOS_MEMTRACK
+/*
+Copyright (c) 2002, 2008 Curtis Bartley
+All rights reserved.
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+
+- Redistributions of source code must retain the above copyright
+notice, this list of conditions and the following disclaimer.
+
+- Redistributions in binary form must reproduce the above copyright
+notice, this list of conditions and the following disclaimer in the
+documentation and/or other materials provided with the
+distribution.
+
+- Neither the name of Curtis Bartley nor the names of any other
+contributors may be used to endorse or promote products derived
+from this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
+OF THE POSSIBILITY OF SUCH DAMAGE.
+*/
+
+#ifndef MemTrack_H_
+#define MemTrack_H_
+
+#include <typeinfo>
+#include <cstring>
+
+namespace MemTrack
+{
+    /* ---------------------------------------- class MemStamp */
+
+    class MemStamp
+    {
+        public:        // member variables
+            char const * const filename;
+            int const lineNum;
+        public:        // construction/destruction
+            MemStamp(char const *filename, int lineNum)
+                : filename(filename), lineNum(lineNum) { }
+            ~MemStamp() { }
+    };
+
+    /* ---------------------------------------- memory allocation and stamping prototypes */
+
+    void *TrackMalloc(size_t size);
+    void TrackFree(void *p);
+    void TrackStamp(void *p, const MemStamp &stamp, char const *typeName);
+    void TrackDumpBlocks();
+    void TrackListMemoryUsage();
+    size_t getCurrentMemorySize(void) ;
+    size_t getMaxMemorySize(void) ;
+    /* ---------------------------------------- operator * (MemStamp, ptr) */
+
+    template <class T> inline T *operator*(const MemStamp &stamp, T *p)
+    {
+        TrackStamp(p, stamp, typeid(T).name());
+        return p;
+    }
+
+}    // namespace MemTrack
+
+/* ---------------------------------------- new macro */
+
+#define MEMTRACK_NEW MemTrack::MemStamp(__FILE__, __LINE__) * new
+#define new MEMTRACK_NEW
+
+#endif    // MemTrack_H_
+
+#endif
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/mpi.hpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/mpi.hpp	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/mpi.hpp	(revision 1749)
@@ -0,0 +1,15 @@
+#ifndef __XIOS_MPI_HPP__
+#define __XIOS_MPI_HPP__
+
+/* skip C++ Binding for mpich , intel MPI */
+#define MPICH_SKIP_MPICXX
+
+/* skip C++ Binding for SGI MPI library */
+#define MPI_NO_CPPBIND
+
+/* skip C++ Binding for OpenMPI */
+#define OMPI_SKIP_MPICXX
+
+#include <mpi.h>
+
+#endif
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/mpi_tag.hpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/mpi_tag.hpp	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/mpi_tag.hpp	(revision 1749)
@@ -0,0 +1,48 @@
+#ifndef __XIOS_MPI_TAG_HPP__
+#define __XIOS_MPI_TAG_HPP__
+
+/* Tag for mpi communication to send and receive index in distributed hashed table version 2*/
+#define MPI_DHT_INDEX 15
+
+/* Tag for mpi communication to send and receive info in distributed hashed table version 2*/
+#define MPI_DHT_INFO 12
+
+/* Tag for mpi communication to send and receive index in distributed hashed table version 1*/
+#define MPI_DHT_INDEX_0 25
+
+/* Tag for mpi communication to send and receive info in distributed hashed table version 1*/
+#define MPI_DHT_INFO_0 22
+
+/* Tag for mpi communication to send and receive index in distributed hashed table version 1*/
+#define MPI_DHT_INDEX_1 27
+
+/* Tag for mpi communication to send and receive info in distributed hashed table version 1*/
+#define MPI_DHT_INFO_1 24
+
+/* Tag for mpi communication to send and receive info of current grid source in grid transformation*/
+#define MPI_GRID_TRANSFORMATION_CURRENT_GRID_INDEX 31
+
+/* Tag for mpi communication to send and receive info of current grid source in grid transformation*/
+#define MPI_GRID_TRANSFORMATION_ORIGINAL_GRID_GLOBAL_INDEX 32
+
+/* Tag for mpi communication to send and receive info of current grid source in grid transformation*/
+#define MPI_GRID_TRANSFORMATION_ORIGINAL_GRID_LOCAL_INDEX 33
+
+/* Tag for mpi communication to send and receive info of current grid source in grid transformation*/
+#define MPI_GRID_TRANSFORMATION_ORIGINAL_GRID_WEIGHT 34
+
+/* Tag for mpi communication to send and receive info grid source and grid destination in transformation mapping*/
+#define MPI_TRANSFORMATION_MAPPING_INDEX 35
+
+/* Tag for mpi communication to send and receive info of DOMAIN in domain interpolation*/
+#define MPI_DOMAIN_INTERPOLATION_DEST_INDEX 7
+
+/* Tag for mpi communication to send and receive info of DOMAIN in domain interpolation*/
+#define MPI_DOMAIN_INTERPOLATION_SRC_INDEX 8
+
+/* Tag for mpi communication to send and receive info of DOMAIN in domain interpolation*/
+#define MPI_DOMAIN_INTERPOLATION_WEIGHT 9
+
+
+
+#endif
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/node/axis.cpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/node/axis.cpp	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/node/axis.cpp	(revision 1749)
@@ -0,0 +1,1500 @@
+#include "axis.hpp"
+
+#include "attribute_template.hpp"
+#include "object_template.hpp"
+#include "group_template.hpp"
+#include "message.hpp"
+#include "type.hpp"
+#include "context.hpp"
+#include "context_client.hpp"
+#include "context_server.hpp"
+#include "xios_spl.hpp"
+#include "server_distribution_description.hpp"
+#include "client_server_mapping_distributed.hpp"
+#include "distribution_client.hpp"
+
+namespace xios {
+
+   /// ////////////////////// Definitions ////////////////////// ///
+
+   CAxis::CAxis(void)
+      : CObjectTemplate<CAxis>()
+      , CAxisAttributes(), isChecked(false), relFiles(), areClientAttributesChecked_(false)
+      , isClientAfterTransformationChecked(false)
+      , hasBounds(false), isCompressible_(false)
+      , numberWrittenIndexes_(), totalNumberWrittenIndexes_(), offsetWrittenIndexes_()
+      , transformationMap_(), hasValue(false), hasLabel(false)
+      , computedWrittenIndex_(false)
+	  , clients()
+   {
+   }
+
+   CAxis::CAxis(const StdString & id)
+      : CObjectTemplate<CAxis>(id)
+      , CAxisAttributes(), isChecked(false), relFiles(), areClientAttributesChecked_(false)
+      , isClientAfterTransformationChecked(false)
+      , hasBounds(false), isCompressible_(false)
+      , numberWrittenIndexes_(), totalNumberWrittenIndexes_(), offsetWrittenIndexes_()
+      , transformationMap_(), hasValue(false), hasLabel(false)
+      , computedWrittenIndex_(false)
+	  , clients()
+   {
+   }
+
+   CAxis::~CAxis(void)
+   { /* Ne rien faire de plus */ }
+
+   std::map<StdString, ETranformationType> CAxis::transformationMapList_ = std::map<StdString, ETranformationType>();
+   bool CAxis::dummyTransformationMapList_ = CAxis::initializeTransformationMap(CAxis::transformationMapList_);
+   bool CAxis::initializeTransformationMap(std::map<StdString, ETranformationType>& m)
+   TRY
+   {
+     m["zoom_axis"] = TRANS_ZOOM_AXIS;
+     m["interpolate_axis"] = TRANS_INTERPOLATE_AXIS;
+     m["extract_axis"] = TRANS_EXTRACT_AXIS;
+     m["inverse_axis"] = TRANS_INVERSE_AXIS;
+     m["reduce_domain"] = TRANS_REDUCE_DOMAIN_TO_AXIS;
+     m["reduce_axis"] = TRANS_REDUCE_AXIS_TO_AXIS;
+     m["extract_domain"] = TRANS_EXTRACT_DOMAIN_TO_AXIS;
+     m["temporal_splitting"] = TRANS_TEMPORAL_SPLITTING;
+     m["duplicate_scalar"] = TRANS_DUPLICATE_SCALAR_TO_AXIS;
+
+   }
+   CATCH
+
+   ///---------------------------------------------------------------
+
+   const std::set<StdString> & CAxis::getRelFiles(void) const
+   TRY
+   {
+      return (this->relFiles);
+   }
+   CATCH
+
+   bool CAxis::IsWritten(const StdString & filename) const
+   TRY
+   {
+      return (this->relFiles.find(filename) != this->relFiles.end());
+   }
+   CATCH
+
+   bool CAxis::isWrittenCompressed(const StdString& filename) const
+   TRY
+   {
+      return (this->relFilesCompressed.find(filename) != this->relFilesCompressed.end());
+   }
+   CATCH
+
+   bool CAxis::isDistributed(void) const
+   TRY
+   {
+      bool distributed = (!this->begin.isEmpty() && !this->n.isEmpty() && (this->begin + this->n < this->n_glo)) ||
+             (!this->n.isEmpty() && (this->n != this->n_glo));
+      // A condition to make sure that if there is only one client, axis
+      // should be considered to be distributed. This should be a temporary solution     
+      distributed |= (1 == CContext::getCurrent()->client->clientSize);
+      return distributed;
+   }
+   CATCH
+
+   /*!
+    * Test whether the data defined on the axis can be outputted in a compressed way.
+    *
+    * \return true if and only if a mask was defined for this axis
+    */
+   bool CAxis::isCompressible(void) const
+   TRY
+   {
+      return isCompressible_;
+   }
+   CATCH
+
+   void CAxis::addRelFile(const StdString & filename)
+   TRY
+   {
+      this->relFiles.insert(filename);
+   }
+   CATCH_DUMP_ATTR
+
+   void CAxis::addRelFileCompressed(const StdString& filename)
+   TRY
+   {
+      this->relFilesCompressed.insert(filename);
+   }
+   CATCH_DUMP_ATTR
+
+   //----------------------------------------------------------------
+
+   /*!
+     Returns the number of indexes written by each server.
+     \return the number of indexes written by each server
+   */
+   int CAxis::getNumberWrittenIndexes(MPI_Comm writtenCom)
+   TRY
+   {
+     int writtenSize;
+     MPI_Comm_size(writtenCom, &writtenSize);
+     return numberWrittenIndexes_[writtenSize];
+   }
+   CATCH_DUMP_ATTR
+
+   /*!
+     Returns the total number of indexes written by the servers.
+     \return the total number of indexes written by the servers
+   */
+   int CAxis::getTotalNumberWrittenIndexes(MPI_Comm writtenCom)
+   TRY
+   {
+     int writtenSize;
+     MPI_Comm_size(writtenCom, &writtenSize);
+     return totalNumberWrittenIndexes_[writtenSize];
+   }
+   CATCH_DUMP_ATTR
+
+   /*!
+     Returns the offset of indexes written by each server.
+     \return the offset of indexes written by each server
+   */
+   int CAxis::getOffsetWrittenIndexes(MPI_Comm writtenCom)
+   TRY
+   {
+     int writtenSize;
+     MPI_Comm_size(writtenCom, &writtenSize);
+     return offsetWrittenIndexes_[writtenSize];
+   }
+   CATCH_DUMP_ATTR
+
+   CArray<int, 1>& CAxis::getCompressedIndexToWriteOnServer(MPI_Comm writtenCom)
+   TRY
+   {
+     int writtenSize;
+     MPI_Comm_size(writtenCom, &writtenSize);
+     return compressedIndexToWriteOnServer[writtenSize];
+   }
+   CATCH_DUMP_ATTR
+
+   //----------------------------------------------------------------
+
+   /*!
+    * Compute the minimum buffer size required to send the attributes to the server(s).
+    *
+    * \return A map associating the server rank with its minimum buffer size.
+    */
+   std::map<int, StdSize> CAxis::getAttributesBufferSize(CContextClient* client, const std::vector<int>& globalDim, int orderPositionInGrid,
+                                                         CServerDistributionDescription::ServerDistributionType distType)
+   TRY
+   {
+
+     std::map<int, StdSize> attributesSizes = getMinimumBufferSizeForAttributes(client);
+
+//     bool isNonDistributed = (n_glo == n);
+     bool isDistributed = (orderPositionInGrid == CServerDistributionDescription::defaultDistributedDimension(globalDim.size(), distType))
+    		                 || (index.numElements() != n_glo);
+
+     if (client->isServerLeader())
+     {
+       // size estimation for sendServerAttribut
+       size_t size = 6 * sizeof(size_t);
+       // size estimation for sendNonDistributedValue
+       if (!isDistributed)
+       {
+//         size = std::max(size, CArray<double,1>::size(n_glo) + (isCompressible_ ? CArray<int,1>::size(n_glo) : 0));
+         size += CArray<int,1>::size(n_glo);
+         size += CArray<int,1>::size(n_glo);
+         size += CArray<bool,1>::size(n_glo);
+         size += CArray<double,1>::size(n_glo);
+         if (hasBounds)
+           size += CArray<double,2>::size(2*n_glo);
+         if (hasLabel)
+          size += CArray<StdString,1>::size(n_glo);
+       }
+       size += CEventClient::headerSize + getId().size() + sizeof(size_t);
+
+       const std::list<int>& ranks = client->getRanksServerLeader();
+       for (std::list<int>::const_iterator itRank = ranks.begin(), itRankEnd = ranks.end(); itRank != itRankEnd; ++itRank)
+       {
+         if (size > attributesSizes[*itRank])
+           attributesSizes[*itRank] = size;
+       }
+       const std::list<int>& ranksNonLeaders = client->getRanksServerNotLeader();
+       for (std::list<int>::const_iterator itRank = ranksNonLeaders.begin(), itRankEnd = ranksNonLeaders.end(); itRank != itRankEnd; ++itRank)
+       {
+         if (size > attributesSizes[*itRank])
+           attributesSizes[*itRank] = size;
+       }
+
+     }
+
+     if (isDistributed)
+     {
+       // size estimation for sendDistributedValue
+       std::unordered_map<int, vector<size_t> >::const_iterator it, ite = indSrv_[client->serverSize].end();
+       for (it = indSrv_[client->serverSize].begin(); it != ite; ++it)
+       {
+         size_t size = 6 * sizeof(size_t);
+         size += CArray<int,1>::size(it->second.size());
+         size += CArray<int,1>::size(it->second.size());
+         size += CArray<bool,1>::size(it->second.size());
+         size += CArray<double,1>::size(it->second.size());
+         if (hasBounds)
+           size += CArray<double,2>::size(2 * it->second.size());
+         if (hasLabel)
+           size += CArray<StdString,1>::size(it->second.size());
+
+         size += CEventClient::headerSize + getId().size() + sizeof(size_t);
+         if (size > attributesSizes[it->first])
+           attributesSizes[it->first] = size;
+       }
+     }
+     return attributesSizes;
+   }
+   CATCH_DUMP_ATTR
+
+   //----------------------------------------------------------------
+
+   StdString CAxis::GetName(void)   { return (StdString("axis")); }
+   StdString CAxis::GetDefName(void){ return (CAxis::GetName()); }
+   ENodeType CAxis::GetType(void)   { return (eAxis); }
+
+   //----------------------------------------------------------------
+
+   CAxis* CAxis::createAxis()
+   TRY
+   {
+     CAxis* axis = CAxisGroup::get("axis_definition")->createChild();
+     return axis;
+   }
+   CATCH
+
+   /*!
+     Check common attributes of an axis.
+     This check should be done in the very beginning of work flow
+   */
+   void CAxis::checkAttributes(void)
+   TRY
+   {
+     CContext* context=CContext::getCurrent();
+
+     if (this->n_glo.isEmpty())
+        ERROR("CAxis::checkAttributes(void)",
+              << "[ id = '" << getId() << "' , context = '" << CObjectFactory::GetCurrentContextId() << "' ] "
+              << "The axis is wrongly defined, attribute 'n_glo' must be specified");
+      StdSize size = this->n_glo.getValue();
+
+      if (!this->index.isEmpty())
+      {
+        if (n.isEmpty()) n = index.numElements();
+
+        // It's not so correct but if begin is not the first value of index 
+        // then data on the local axis has user-defined distribution. In this case, begin has no meaning.
+        if (begin.isEmpty()) begin = index(0);         
+      }
+      else 
+      {
+        if (!this->begin.isEmpty())
+        {
+          if (begin < 0 || begin > size - 1)
+            ERROR("CAxis::checkAttributes(void)",
+                  << "[ id = '" << getId() << "' , context = '" << CObjectFactory::GetCurrentContextId() << "' ] "
+                  << "The axis is wrongly defined, attribute 'begin' (" << begin.getValue() << ") must be non-negative and smaller than size-1 (" << size - 1 << ").");
+        }
+        else this->begin.setValue(0);
+
+        if (!this->n.isEmpty())
+        {
+          if (n < 0 || n > size)
+            ERROR("CAxis::checkAttributes(void)",
+                  << "[ id = '" << getId() << "' , context = '" << CObjectFactory::GetCurrentContextId() << "' ] "
+                  << "The axis is wrongly defined, attribute 'n' (" << n.getValue() << ") must be non-negative and smaller than size (" << size << ").");
+        }
+        else this->n.setValue(size);
+
+        {
+          index.resize(n);
+          for (int i = 0; i < n; ++i) index(i) = i+begin;
+        }
+      }
+
+      if (!this->value.isEmpty())
+      {
+        // Avoid this check at writing because it fails in case of a hole
+        if (context->hasClient)
+        {
+          StdSize true_size = value.numElements();
+          if (this->n.getValue() != true_size)
+            ERROR("CAxis::checkAttributes(void)",
+                << "[ id = '" << getId() << "' , context = '" << CObjectFactory::GetCurrentContextId() << "' ] "
+                << "The axis is wrongly defined, attribute 'value' has a different size (" << true_size
+                << ") than the one defined by the \'size\' attribute (" << n.getValue() << ").");
+        }
+        this->hasValue = true;
+      }
+
+      this->checkBounds();
+
+      if (context->hasClient)
+      {
+        this->checkMask();
+        this->checkData();
+        this->checkLabel();
+      }
+   }
+   CATCH_DUMP_ATTR
+
+   /*!
+      Check the validity of data, fill in values if any, and apply mask.
+   */
+   void CAxis::checkData()
+   TRY
+   {
+      if (data_begin.isEmpty()) data_begin.setValue(0);
+
+      if (data_n.isEmpty())
+      {
+        data_n.setValue(n);
+      }
+      else if (data_n.getValue() < 0)
+      {
+        ERROR("CAxis::checkData(void)",
+              << "[ id = " << this->getId() << " , context = '" << CObjectFactory::GetCurrentContextId() << " ] "
+              << "The data size should be strictly positive ('data_n' = " << data_n.getValue() << ").");
+      }
+
+      if (data_index.isEmpty())
+      {
+        data_index.resize(data_n);
+        for (int i = 0; i < data_n; ++i)
+        {
+          if ((i+data_begin) >= 0 && (i+data_begin<n))
+          {
+            if (mask(i+data_begin))
+              data_index(i) = i+data_begin;
+            else
+              data_index(i) = -1;
+          }
+          else
+            data_index(i) = -1;
+        }
+      }
+      else
+      {
+        if (data_index.numElements() != data_n)
+        {
+          ERROR("CAxis::checkData(void)",
+                << "[ id = " << this->getId() << " , context = '" << CObjectFactory::GetCurrentContextId() << " ] "
+                << "The size of data_index = "<< data_index.numElements() << "is not equal to the data size data_n = " << data_n.getValue() << ").");
+        }
+        for (int i = 0; i < data_n; ++i)
+        {
+          if ((i+data_begin) >= 0 && (i+data_begin<n) && !mask(i+data_begin))
+            data_index(i) = -1;
+        }
+      }
+
+   }
+   CATCH_DUMP_ATTR
+
+    size_t CAxis::getGlobalWrittenSize(void)
+    {
+      return n_glo ;
+    }
+
+   /*!
+     Check validity of mask info and fill in values if any.
+   */
+   void CAxis::checkMask()
+   TRY
+   {
+      if (!mask.isEmpty())
+      {
+        if (mask.extent(0) != n)
+        {
+          ERROR("CAxis::checkMask(void)",
+              << "[ id = " << this->getId() << " , context = '" << CObjectFactory::GetCurrentContextId() << " ] "
+              << "The mask does not have the same size as the local domain." << std::endl
+              << "Local size is " << n.getValue() << "." << std::endl
+              << "Mask size is " << mask.extent(0) << ".");
+        }
+      }
+      else
+      {
+        mask.resize(n);
+        mask = true;
+      }
+   }
+   CATCH_DUMP_ATTR
+
+   /*!
+     Check validity of bounds info and fill in values if any.
+   */
+   void CAxis::checkBounds()
+   TRY
+   {
+     if (!bounds.isEmpty())
+     {
+       if (bounds.extent(0) != 2 || bounds.extent(1) != n)
+         ERROR("CAxis::checkAttributes(void)",
+               << "The bounds array of the axis [ id = '" << getId() << "' , context = '" << CObjectFactory::GetCurrentContextId() << "' ] must be of dimension 2 x axis size." << std::endl
+               << "Axis size is " << n.getValue() << "." << std::endl
+               << "Bounds size is "<< bounds.extent(0) << " x " << bounds.extent(1) << ".");
+       hasBounds = true;
+     }
+     else hasBounds = false;
+   }
+   CATCH_DUMP_ATTR
+
+  void CAxis::checkLabel()
+  TRY
+  {
+    if (!label.isEmpty())
+    {
+      if (label.extent(0) != n)
+        ERROR("CAxis::checkLabel(void)",
+              << "The label array of the axis [ id = '" << getId() << "' , context = '" << CObjectFactory::GetCurrentContextId() << "' ] must be of dimension of axis size." << std::endl
+              << "Axis size is " << n.getValue() << "." << std::endl
+              << "label size is "<< label.extent(0)<<  " .");
+      hasLabel = true;
+    }
+    else hasLabel = false;
+  }
+  CATCH_DUMP_ATTR
+
+  /*!
+    Check whether we can do compressed output
+  */
+  void CAxis::checkEligibilityForCompressedOutput()
+  TRY
+  {
+    // We don't check if the mask is valid here, just if a mask has been defined at this point.
+    isCompressible_ = !mask.isEmpty();
+  }
+  CATCH_DUMP_ATTR
+
+  /*!
+    Dispatch event from the lower communication layer then process event according to its type
+  */
+  bool CAxis::dispatchEvent(CEventServer& event)
+  TRY
+  {
+     if (SuperClass::dispatchEvent(event)) return true;
+     else
+     {
+       switch(event.type)
+       {
+          case EVENT_ID_DISTRIBUTION_ATTRIBUTE :
+            recvDistributionAttribute(event);
+            return true;
+            break;
+         case EVENT_ID_NON_DISTRIBUTED_ATTRIBUTES:
+           recvNonDistributedAttributes(event);
+           return true;
+           break;
+         case EVENT_ID_DISTRIBUTED_ATTRIBUTES:
+           recvDistributedAttributes(event);
+           return true;
+           break;
+          default :
+            ERROR("bool CAxis::dispatchEvent(CEventServer& event)",
+                   << "Unknown Event");
+          return false;
+        }
+     }
+  }
+  CATCH
+
+   /*!
+     Check attributes on client side (This name is still adequate???)
+   */
+   void CAxis::checkAttributesOnClient()
+   TRY
+   {
+     if (this->areClientAttributesChecked_) return;
+
+     CContext* context=CContext::getCurrent();
+     if (context->hasClient && !context->hasServer) this->checkAttributes();
+
+     this->areClientAttributesChecked_ = true;
+   }
+   CATCH_DUMP_ATTR
+
+   /*
+     The (spatial) transformation sometimes can change attributes of an axis (e.g zoom can change mask or generate can change whole attributes)
+     Therefore, we should recheck them.
+   */
+   void CAxis::checkAttributesOnClientAfterTransformation(const std::vector<int>& globalDim, int orderPositionInGrid,
+                                                          CServerDistributionDescription::ServerDistributionType distType)
+   TRY
+   {
+     CContext* context=CContext::getCurrent() ;
+
+     if (this->isClientAfterTransformationChecked) return;
+     if (context->hasClient)
+     {        
+       if (orderPositionInGrid == CServerDistributionDescription::defaultDistributedDimension(globalDim.size(), distType))
+         computeConnectedClients(globalDim, orderPositionInGrid, distType);
+       else if (index.numElements() != n_glo) computeConnectedClients(globalDim, orderPositionInGrid,  CServerDistributionDescription::ROOT_DISTRIBUTION);
+     }
+
+     this->isClientAfterTransformationChecked = true;
+   }
+   CATCH_DUMP_ATTR
+
+   /*
+     Send all checked attributes to server? (We dont have notion of server any more so client==server)
+     \param [in] globalDim global dimension of grid containing this axis
+     \param [in] orderPositionInGrid the relative order of this axis in the grid (e.g grid composed of domain+axis -> orderPositionInGrid is 2)
+     \param [in] distType distribution type of the server. For now, we only have band distribution.
+
+   */
+   void CAxis::sendCheckedAttributes(const std::vector<int>& globalDim, int orderPositionInGrid,
+                                     CServerDistributionDescription::ServerDistributionType distType)
+   TRY
+   {
+     if (!this->areClientAttributesChecked_) checkAttributesOnClient();
+     if (!this->isClientAfterTransformationChecked) checkAttributesOnClientAfterTransformation(globalDim, orderPositionInGrid, distType);
+     CContext* context = CContext::getCurrent();
+
+     if (this->isChecked) return;
+     if (context->hasClient) sendAttributes(globalDim, orderPositionInGrid, distType);    
+
+     this->isChecked = true;
+   }
+   CATCH_DUMP_ATTR
+
+  /*!
+    Send attributes from one client to other clients
+    \param[in] globalDim global dimension of grid which contains this axis
+    \param[in] order
+  */
+  void CAxis::sendAttributes(const std::vector<int>& globalDim, int orderPositionInGrid,
+                             CServerDistributionDescription::ServerDistributionType distType)
+  TRY
+  {
+     sendDistributionAttribute(globalDim, orderPositionInGrid, distType);
+
+     // if (index.numElements() == n_glo.getValue())
+     if ((orderPositionInGrid == CServerDistributionDescription::defaultDistributedDimension(globalDim.size(), distType))
+         || (index.numElements() != n_glo))
+     {
+       sendDistributedAttributes();       
+     }
+     else
+     {
+       sendNonDistributedAttributes();    
+     }     
+  }
+  CATCH_DUMP_ATTR
+
+  /*
+    Compute the connection between group of clients (or clients/servers).
+    (E.g: Suppose we have 2 group of clients in two model: A (client role) connect to B (server role),
+    this function calculate number of clients B connect to one client of A)
+     \param [in] globalDim global dimension of grid containing this axis
+     \param [in] orderPositionInGrid the relative order of this axis in the grid (e.g grid composed of domain+axis -> orderPositionInGrid is 2)
+     \param [in] distType distribution type of the server. For now, we only have band distribution.
+  */
+  void CAxis::computeConnectedClients(const std::vector<int>& globalDim, int orderPositionInGrid,
+                                     CServerDistributionDescription::ServerDistributionType distType)
+  TRY
+  {
+    CContext* context = CContext::getCurrent();
+
+    int nbSrvPools = (context->hasServer) ? (context->hasClient ? context->clientPrimServer.size() : 1) : 1;
+
+    connectedServerRank_.clear();
+    nbSenders.clear();
+
+    for (int p = 0; p < nbSrvPools; ++p)
+    {
+      CContextClient* client = (0 != context->clientPrimServer.size()) ? context->clientPrimServer[p] : context->client;
+      int nbServer = client->serverSize;
+      int range, clientSize = client->clientSize;
+      int rank = client->clientRank;
+
+      if (connectedServerRank_.find(nbServer) == connectedServerRank_.end())
+      {
+        size_t ni = this->n.getValue();
+        size_t ibegin = this->begin.getValue();
+        size_t nbIndex = index.numElements();
+
+        // First of all, we should compute the mapping of the global index and local index of the current client
+        if (globalLocalIndexMap_.empty())
+        {
+          for (size_t idx = 0; idx < nbIndex; ++idx)
+          {
+            globalLocalIndexMap_[index(idx)] = idx;
+          }
+        }
+
+        // Calculate the compressed index if any
+//        std::set<int> writtenInd;
+//        if (isCompressible_)
+//        {
+//          for (int idx = 0; idx < data_index.numElements(); ++idx)
+//          {
+//            int ind = CDistributionClient::getAxisIndex(data_index(idx), data_begin, ni);
+//
+//            if (ind >= 0 && ind < ni && mask(ind))
+//            {
+//              ind += ibegin;
+//              writtenInd.insert(ind);
+//            }
+//          }
+//        }
+
+        // Compute the global index of the current client (process) hold
+        std::vector<int> nGlobAxis(1);
+        nGlobAxis[0] = n_glo.getValue();
+
+        size_t globalSizeIndex = 1, indexBegin, indexEnd;
+        for (int i = 0; i < nGlobAxis.size(); ++i) globalSizeIndex *= nGlobAxis[i];
+        indexBegin = 0;
+        if (globalSizeIndex <= clientSize)
+        {
+          indexBegin = rank%globalSizeIndex;
+          indexEnd = indexBegin;
+        }
+        else
+        {
+          for (int i = 0; i < clientSize; ++i)
+          {
+            range = globalSizeIndex / clientSize;
+            if (i < (globalSizeIndex%clientSize)) ++range;
+            if (i == client->clientRank) break;
+            indexBegin += range;
+          }
+          indexEnd = indexBegin + range - 1;
+        }
+
+        CArray<size_t,1> globalIndex(index.numElements());
+        for (size_t idx = 0; idx < globalIndex.numElements(); ++idx)
+          globalIndex(idx) = index(idx);
+
+        // Describe the distribution of server side
+
+        CServerDistributionDescription serverDescription(nGlobAxis, nbServer, distType);
+      
+        std::vector<int> serverZeroIndex;
+        serverZeroIndex = serverDescription.computeServerGlobalIndexInRange(std::make_pair<size_t&,size_t&>(indexBegin, indexEnd), 0);
+
+        std::list<int> serverZeroIndexLeader;
+        std::list<int> serverZeroIndexNotLeader; 
+        CContextClient::computeLeader(client->clientRank, client->clientSize, serverZeroIndex.size(), serverZeroIndexLeader, serverZeroIndexNotLeader);
+        for (std::list<int>::iterator it = serverZeroIndexLeader.begin(); it != serverZeroIndexLeader.end(); ++it)
+          *it = serverZeroIndex[*it];
+
+        // Find out the connection between client and server side
+        CClientServerMapping* clientServerMap = new CClientServerMappingDistributed(serverDescription.getGlobalIndexRange(), client->intraComm);
+        clientServerMap->computeServerIndexMapping(globalIndex, nbServer);
+        CClientServerMapping::GlobalIndexMap& globalIndexAxisOnServer = clientServerMap->getGlobalIndexOnServer();      
+
+        indSrv_[nbServer].swap(globalIndexAxisOnServer);
+
+        if (distType==CServerDistributionDescription::ROOT_DISTRIBUTION)
+        {
+          for(int i=1; i<nbServer; ++i) indSrv_[nbServer].insert(pair<int, vector<size_t> >(i,indSrv_[nbServer][0]) ) ;
+          serverZeroIndexLeader.clear() ;
+        }
+         
+        CClientServerMapping::GlobalIndexMap::const_iterator it  = indSrv_[nbServer].begin(),
+                                                             ite = indSrv_[nbServer].end();
+
+        for (it = indSrv_[nbServer].begin(); it != ite; ++it) connectedServerRank_[nbServer].push_back(it->first);
+
+        for (std::list<int>::const_iterator it = serverZeroIndexLeader.begin(); it != serverZeroIndexLeader.end(); ++it)
+          connectedServerRank_[nbServer].push_back(*it);
+
+         // Even if a client has no index, it must connect to at least one server and 
+         // send an "empty" data to this server
+         if (connectedServerRank_[nbServer].empty())
+          connectedServerRank_[nbServer].push_back(client->clientRank % client->serverSize);
+
+        nbSenders[nbServer] = CClientServerMapping::computeConnectedClients(client->serverSize, client->clientSize, client->intraComm, connectedServerRank_[nbServer]);
+
+        delete clientServerMap;
+      }
+    }
+  }
+  CATCH_DUMP_ATTR
+
+  /*
+    Compute the index of data to write into file
+    (Different from the previous version, this version of XIOS allows data be written into file (classical role),
+    or transfered to another clients)
+  */
+  void CAxis::computeWrittenIndex()
+  TRY
+  {  
+    if (computedWrittenIndex_) return;
+    computedWrittenIndex_ = true;
+
+    CContext* context=CContext::getCurrent();      
+    CContextServer* server = context->server; 
+
+    // We describe the distribution of client (server) on which data are written
+    std::vector<int> nBegin(1), nSize(1), nBeginGlobal(1), nGlob(1);
+    nBegin[0]       = begin;
+    nSize[0]        = n;
+    nBeginGlobal[0] = 0; 
+    nGlob[0]        = n_glo;
+    CDistributionServer srvDist(server->intraCommSize, nBegin, nSize, nBeginGlobal, nGlob); 
+    const CArray<size_t,1>& writtenGlobalIndex  = srvDist.getGlobalIndex();
+
+    // Because all written data are local on a client, 
+    // we need to compute the local index on the server from its corresponding global index
+    size_t nbWritten = 0, indGlo;      
+    std::unordered_map<size_t,size_t>::const_iterator itb = globalLocalIndexMap_.begin(),
+                                                        ite = globalLocalIndexMap_.end(), it;          
+    CArray<size_t,1>::const_iterator itSrvb = writtenGlobalIndex.begin(),
+                                     itSrve = writtenGlobalIndex.end(), itSrv;  
+
+    localIndexToWriteOnServer.resize(writtenGlobalIndex.numElements());
+    nbWritten = 0;
+    for (itSrv = itSrvb; itSrv != itSrve; ++itSrv)
+    {
+      indGlo = *itSrv;
+      if (ite != globalLocalIndexMap_.find(indGlo))
+      {
+        localIndexToWriteOnServer(nbWritten) = globalLocalIndexMap_[indGlo];
+      }
+      else
+      {
+        localIndexToWriteOnServer(nbWritten) = -1;
+      }
+      ++nbWritten;
+    }
+
+  }
+  CATCH_DUMP_ATTR
+
+  void CAxis::computeWrittenCompressedIndex(MPI_Comm writtenComm)
+  TRY
+  {
+    int writtenCommSize;
+    MPI_Comm_size(writtenComm, &writtenCommSize);
+    if (compressedIndexToWriteOnServer.find(writtenCommSize) != compressedIndexToWriteOnServer.end())
+      return;
+
+    if (isCompressible())
+    {
+      size_t nbWritten = 0, indGlo;
+      CContext* context=CContext::getCurrent();      
+      CContextServer* server = context->server; 
+
+      // We describe the distribution of client (server) on which data are written
+      std::vector<int> nBegin(1), nSize(1), nBeginGlobal(1), nGlob(1);
+      nBegin[0]       = 0;
+      nSize[0]        = n;
+      nBeginGlobal[0] = 0; 
+      nGlob[0]        = n_glo;
+      CDistributionServer srvDist(server->intraCommSize, nBegin, nSize, nBeginGlobal, nGlob); 
+      const CArray<size_t,1>& writtenGlobalIndex  = srvDist.getGlobalIndex();
+      std::unordered_map<size_t,size_t>::const_iterator itb = globalLocalIndexMap_.begin(),
+                                                          ite = globalLocalIndexMap_.end(), it;   
+
+      CArray<size_t,1>::const_iterator itSrvb = writtenGlobalIndex.begin(),
+                                       itSrve = writtenGlobalIndex.end(), itSrv;
+      std::unordered_map<size_t,size_t> localGlobalIndexMap;
+      for (itSrv = itSrvb; itSrv != itSrve; ++itSrv)
+      {
+        indGlo = *itSrv;
+        if (ite != globalLocalIndexMap_.find(indGlo))
+        {
+          localGlobalIndexMap[localIndexToWriteOnServer(nbWritten)] = indGlo;
+          ++nbWritten;
+        }                 
+      }
+//
+//      nbWritten = 0;
+//      for (int idx = 0; idx < data_index.numElements(); ++idx)
+//      {
+//        if (localGlobalIndexMap.end() != localGlobalIndexMap.find(data_index(idx)))
+//        {
+//          ++nbWritten;
+//        }
+//      }
+//
+//      compressedIndexToWriteOnServer[writtenCommSize].resize(nbWritten);
+//      nbWritten = 0;
+//      for (int idx = 0; idx < data_index.numElements(); ++idx)
+//      {
+//        if (localGlobalIndexMap.end() != localGlobalIndexMap.find(data_index(idx)))
+//        {
+//          compressedIndexToWriteOnServer[writtenCommSize](nbWritten) = localGlobalIndexMap[data_index(idx)];
+//          ++nbWritten;
+//        }
+//      }
+
+      nbWritten = 0;
+      for (int idx = 0; idx < data_index.numElements(); ++idx)
+      {
+        if (localGlobalIndexMap.end() != localGlobalIndexMap.find(data_index(idx)))
+        {
+          ++nbWritten;
+        }
+      }
+
+      compressedIndexToWriteOnServer[writtenCommSize].resize(nbWritten);
+      nbWritten = 0;
+      for (int idx = 0; idx < data_index.numElements(); ++idx)
+      {
+        if (localGlobalIndexMap.end() != localGlobalIndexMap.find(data_index(idx)))
+        {
+          compressedIndexToWriteOnServer[writtenCommSize](nbWritten) = localGlobalIndexMap[data_index(idx)];
+          ++nbWritten;
+        }
+      }
+
+      numberWrittenIndexes_[writtenCommSize] = nbWritten;
+      if (isDistributed())
+      {
+             
+        MPI_Allreduce(&numberWrittenIndexes_[writtenCommSize], &totalNumberWrittenIndexes_[writtenCommSize], 1, MPI_INT, MPI_SUM, writtenComm);
+        MPI_Scan(&numberWrittenIndexes_[writtenCommSize], &offsetWrittenIndexes_[writtenCommSize], 1, MPI_INT, MPI_SUM, writtenComm);
+        offsetWrittenIndexes_[writtenCommSize] -= numberWrittenIndexes_[writtenCommSize];
+      }
+      else
+        totalNumberWrittenIndexes_[writtenCommSize] = numberWrittenIndexes_[writtenCommSize];
+    }
+  }
+  CATCH_DUMP_ATTR
+
+  /*!
+    Send distribution information from a group of client (client role) to another group of client (server role)
+    The distribution of a group of client (server role) is imposed by the group of client (client role)
+    \param [in] globalDim global dimension of grid containing this axis
+    \param [in] orderPositionInGrid the relative order of this axis in the grid (e.g grid composed of domain+axis -> orderPositionInGrid is 2)
+    \param [in] distType distribution type of the server. For now, we only have band distribution.
+  */
+  void CAxis::sendDistributionAttribute(const std::vector<int>& globalDim, int orderPositionInGrid,
+                                        CServerDistributionDescription::ServerDistributionType distType)
+  TRY
+  {
+    std::list<CContextClient*>::iterator it;
+    for (it=clients.begin(); it!=clients.end(); ++it)
+    {
+      CContextClient* client = *it;
+      int nbServer = client->serverSize;
+
+      CServerDistributionDescription serverDescription(globalDim, nbServer);
+      serverDescription.computeServerDistribution();
+
+      std::vector<std::vector<int> > serverIndexBegin = serverDescription.getServerIndexBegin();
+      std::vector<std::vector<int> > serverDimensionSizes = serverDescription.getServerDimensionSizes();
+
+      CEventClient event(getType(),EVENT_ID_DISTRIBUTION_ATTRIBUTE);
+      if (client->isServerLeader())
+      {
+        std::list<CMessage> msgs;
+
+        const std::list<int>& ranks = client->getRanksServerLeader();
+        for (std::list<int>::const_iterator itRank = ranks.begin(), itRankEnd = ranks.end(); itRank != itRankEnd; ++itRank)
+        {
+          // Use const int to ensure CMessage holds a copy of the value instead of just a reference
+          const int begin = serverIndexBegin[*itRank][orderPositionInGrid];
+          const int ni    = serverDimensionSizes[*itRank][orderPositionInGrid];
+
+          msgs.push_back(CMessage());
+          CMessage& msg = msgs.back();
+          msg << this->getId();
+          msg << ni << begin;
+          msg << isCompressible_;                    
+
+          event.push(*itRank,1,msg);
+        }
+        client->sendEvent(event);
+      }
+      else client->sendEvent(event);
+    }
+  }
+  CATCH_DUMP_ATTR
+
+  /*
+    Receive distribution attribute from another client
+    \param [in] event event containing data of these attributes
+  */
+  void CAxis::recvDistributionAttribute(CEventServer& event)
+  TRY
+  {
+    CBufferIn* buffer = event.subEvents.begin()->buffer;
+    string axisId;
+    *buffer >> axisId;
+    get(axisId)->recvDistributionAttribute(*buffer);
+  }
+  CATCH
+
+  /*
+    Receive distribution attribute from another client
+    \param [in] buffer buffer containing data of these attributes
+  */
+  void CAxis::recvDistributionAttribute(CBufferIn& buffer)
+  TRY
+  {
+    int ni_srv, begin_srv;
+    buffer >> ni_srv >> begin_srv;
+    buffer >> isCompressible_;            
+
+    // Set up new local size of axis on the receiving clients
+    n.setValue(ni_srv);
+    begin.setValue(begin_srv);
+  }
+  CATCH_DUMP_ATTR
+
+  /*
+    Send attributes of axis from a group of client to other group of clients/servers 
+    on supposing that these attributes are not distributed among the sending group
+    In the future, if new attributes are added, they should also be processed in this function
+  */
+  void CAxis::sendNonDistributedAttributes()
+  TRY
+  {
+    std::list<CContextClient*>::iterator it;
+    for (it=clients.begin(); it!=clients.end(); ++it)
+	{
+	  CContextClient* client = *it;
+
+      CEventClient event(getType(), EVENT_ID_NON_DISTRIBUTED_ATTRIBUTES);
+      size_t nbIndex = index.numElements();
+      size_t nbDataIndex = 0;
+
+      for (int idx = 0; idx < data_index.numElements(); ++idx)
+      {
+        int ind = data_index(idx);
+        if (ind >= 0 && ind < nbIndex) ++nbDataIndex;
+      }
+
+      CArray<int,1> dataIndex(nbDataIndex);
+      nbDataIndex = 0;
+      for (int idx = 0; idx < data_index.numElements(); ++idx)
+      {
+        int ind = data_index(idx);
+        if (ind >= 0 && ind < nbIndex)
+        {
+          dataIndex(nbDataIndex) = ind;
+          ++nbDataIndex;
+        }
+      }
+
+      if (client->isServerLeader())
+      {
+        std::list<CMessage> msgs;
+
+        const std::list<int>& ranks = client->getRanksServerLeader();
+        for (std::list<int>::const_iterator itRank = ranks.begin(), itRankEnd = ranks.end(); itRank != itRankEnd; ++itRank)
+        {
+          msgs.push_back(CMessage());
+          CMessage& msg = msgs.back();
+          msg << this->getId();
+          msg << index.getValue() << dataIndex << mask.getValue();
+          msg << hasValue;
+          if (hasValue) msg << value.getValue();
+          msg << hasBounds;
+          if (hasBounds) msg << bounds.getValue();
+          msg << hasLabel;
+          if (hasLabel) msg << label.getValue();
+
+          event.push(*itRank, 1, msg);
+        }
+        client->sendEvent(event);
+      }
+      else client->sendEvent(event);
+    }
+  }
+  CATCH_DUMP_ATTR
+
+  /*
+    Receive the non-distributed attributes from another group of clients
+    \param [in] event event containing data of these attributes
+  */
+  void CAxis::recvNonDistributedAttributes(CEventServer& event)
+  TRY
+  {
+    list<CEventServer::SSubEvent>::iterator it;
+    for (it = event.subEvents.begin(); it != event.subEvents.end(); ++it)
+    {
+      CBufferIn* buffer = it->buffer;
+      string axisId;
+      *buffer >> axisId;
+      get(axisId)->recvNonDistributedAttributes(it->rank, *buffer);
+    }
+  }
+  CATCH
+
+  /*
+    Receive the non-distributed attributes from another group of clients
+    \param [in] rank rank of the sender
+    \param [in] buffer buffer containing data sent from the sender
+  */
+  void CAxis::recvNonDistributedAttributes(int rank, CBufferIn& buffer)
+  TRY
+  { 
+    CArray<int,1> tmp_index, tmp_data_index;
+    CArray<bool,1> tmp_mask;
+    CArray<double,1> tmp_val;
+    CArray<double,2> tmp_bnds;
+    CArray<string,1> tmp_label;
+
+    buffer >> tmp_index;
+    index.reference(tmp_index);
+    buffer >> tmp_data_index;
+    data_index.reference(tmp_data_index);
+    buffer >> tmp_mask;
+    mask.reference(tmp_mask);
+
+    buffer >> hasValue;
+    if (hasValue)
+    {
+      buffer >> tmp_val;
+      value.reference(tmp_val);
+    }
+
+    buffer >> hasBounds;
+    if (hasBounds)
+    {
+      buffer >> tmp_bnds;
+      bounds.reference(tmp_bnds);
+    }
+
+    buffer >> hasLabel;
+    if (hasLabel)
+    {
+      buffer >> tmp_label;
+      label.reference(tmp_label);
+    }
+
+    // Some value should be reset here
+    data_begin.setValue(0);
+    globalLocalIndexMap_.rehash(std::ceil(index.numElements()/globalLocalIndexMap_.max_load_factor()));
+//    for (int idx = 0; idx < index.numElements(); ++idx) globalLocalIndexMap_[idx] = index(idx);
+    for (int idx = 0; idx < index.numElements(); ++idx) globalLocalIndexMap_[index(idx)] = idx;
+  }
+  CATCH_DUMP_ATTR
+
+  /*
+    Send axis attributes from a group of clients to another group of clients/servers
+    supposing that these attributes are distributed among the clients of the sending group
+    In future, if new attributes are added, they should also be processed in this function
+  */
+  void CAxis::sendDistributedAttributes(void)
+  TRY
+  {
+    int ind, idx;
+    std::list<CContextClient*>::iterator it;
+
+    for (it=clients.begin(); it!=clients.end(); ++it)
+    {
+      CContextClient* client = *it;
+      int nbServer = client->serverSize;
+
+      CEventClient eventData(getType(), EVENT_ID_DISTRIBUTED_ATTRIBUTES);
+
+      list<CMessage> listData;
+      list<CArray<int,1> > list_indi, list_dataInd;
+      list<CArray<double,1> > list_val;
+      list<CArray<double,2> > list_bounds;
+      list<CArray<string,1> > list_label;
+
+      // Cut off the ghost points
+      int nbIndex = index.numElements();
+      CArray<int,1> dataIndex(nbIndex);
+      dataIndex = -1;
+      for (idx = 0; idx < data_index.numElements(); ++idx)
+      {
+        if (0 <= data_index(idx) && data_index(idx) < nbIndex)
+          dataIndex(data_index(idx)) = 1;
+      }
+
+      std::unordered_map<int, std::vector<size_t> >::const_iterator it, iteMap;
+      iteMap = indSrv_[nbServer].end();
+      for (int k = 0; k < connectedServerRank_[nbServer].size(); ++k)
+      {
+        int nbData = 0, nbDataCount = 0;
+        int rank = connectedServerRank_[nbServer][k];
+        it = indSrv_[nbServer].find(rank);
+        if (iteMap != it)
+          nbData = it->second.size();
+
+        list_indi.push_back(CArray<int,1>(nbData));
+        list_dataInd.push_back(CArray<int,1>(nbData));
+
+        if (hasValue)
+          list_val.push_back(CArray<double,1>(nbData));
+
+        if (hasBounds)        
+          list_bounds.push_back(CArray<double,2>(2,nbData));
+
+        if (hasLabel)
+          list_label.push_back(CArray<string,1>(nbData));
+
+        CArray<int,1>& indi = list_indi.back();
+        CArray<int,1>& dataIndi = list_dataInd.back();
+        dataIndi = -1;
+
+        for (int n = 0; n < nbData; ++n)
+        {
+          idx = static_cast<int>(it->second[n]);
+          indi(n) = idx;
+
+          ind = globalLocalIndexMap_[idx];
+          dataIndi(n) = dataIndex(ind);
+
+          if (hasValue)
+          {
+            CArray<double,1>& val = list_val.back();
+            val(n) = value(ind);
+          }
+
+          if (hasBounds)
+          {
+            CArray<double,2>& boundsVal = list_bounds.back();
+            boundsVal(0, n) = bounds(0,ind);
+            boundsVal(1, n) = bounds(1,ind);
+          }
+
+          if (hasLabel)
+          {
+            CArray<string,1>& labelVal = list_label.back();
+            labelVal(n) = label(ind); 
+          }
+        }
+
+        listData.push_back(CMessage());
+        listData.back() << this->getId()
+                        << list_indi.back() << list_dataInd.back();
+
+        listData.back() << hasValue;
+        if (hasValue)
+          listData.back() << list_val.back();
+
+        listData.back() << hasBounds;
+        if (hasBounds)
+          listData.back() << list_bounds.back();
+
+        listData.back() << hasLabel;
+        if (hasLabel)
+          listData.back() << list_label.back();
+
+        eventData.push(rank, nbSenders[nbServer][rank], listData.back());
+      }
+
+      client->sendEvent(eventData);
+    }
+  }
+  CATCH_DUMP_ATTR
+
+  /*
+    Receive the distributed attributes from another group of clients
+    \param [in] event event containing data of these attributes
+  */
+  void CAxis::recvDistributedAttributes(CEventServer& event)
+  TRY
+  {
+    string axisId;
+    vector<int> ranks;
+    vector<CBufferIn*> buffers;
+
+    list<CEventServer::SSubEvent>::iterator it;
+    for (it = event.subEvents.begin(); it != event.subEvents.end(); ++it)
+    {
+      ranks.push_back(it->rank);
+      CBufferIn* buffer = it->buffer;
+      *buffer >> axisId;
+      buffers.push_back(buffer);
+    }
+    get(axisId)->recvDistributedAttributes(ranks, buffers);
+  }
+  CATCH
+
+  /*
+    Receive the non-distributed attributes from another group of clients
+    \param [in] ranks rank of the sender
+    \param [in] buffers buffer containing data sent from the sender
+  */
+  void CAxis::recvDistributedAttributes(vector<int>& ranks, vector<CBufferIn*> buffers)
+  TRY
+  {
+    int nbReceived = ranks.size(), idx, ind, gloInd, locInd;
+    vector<CArray<int,1> > vec_indi(nbReceived), vec_dataInd(nbReceived);
+    vector<CArray<double,1> > vec_val(nbReceived);
+    vector<CArray<double,2> > vec_bounds(nbReceived);
+    vector<CArray<string,1> > vec_label(nbReceived);
+    
+    for (idx = 0; idx < nbReceived; ++idx)
+    {      
+      CBufferIn& buffer = *buffers[idx];
+      buffer >> vec_indi[idx];
+      buffer >> vec_dataInd[idx];      
+
+      buffer >> hasValue;
+      if (hasValue)
+        buffer >> vec_val[idx];
+
+      buffer >> hasBounds;
+      if (hasBounds)
+        buffer >> vec_bounds[idx];
+
+      buffer >> hasLabel;
+      if (hasLabel)
+        buffer >> vec_label[idx]; 
+    }
+
+    // Estimate size of index array
+    int nbIndexGlob = 0;
+    for (idx = 0; idx < nbReceived; ++idx)
+    {
+      nbIndexGlob += vec_indi[idx].numElements();
+    }
+
+    // Recompute global index
+    // Take account of the overlapped index 
+    index.resize(nbIndexGlob);
+    globalLocalIndexMap_.rehash(std::ceil(index.numElements()/globalLocalIndexMap_.max_load_factor()));
+    nbIndexGlob = 0;
+    int nbIndLoc = 0;
+    for (idx = 0; idx < nbReceived; ++idx)
+    {
+      CArray<int,1>& tmp = vec_indi[idx];
+      for (ind = 0; ind < tmp.numElements(); ++ind)
+      {
+         gloInd = tmp(ind);
+         nbIndLoc = (gloInd % n_glo)-begin;
+         if (0 == globalLocalIndexMap_.count(gloInd))
+         {
+           index(nbIndexGlob) = gloInd % n_glo;
+           globalLocalIndexMap_[gloInd] = nbIndexGlob;
+           ++nbIndexGlob;
+         } 
+      } 
+    }
+
+    // Resize index to its real size
+    if (nbIndexGlob==0) index.resize(nbIndexGlob) ;
+    else index.resizeAndPreserve(nbIndexGlob);
+
+    int nbData = nbIndexGlob;
+    CArray<int,1> nonCompressedData(nbData);
+    nonCompressedData = -1;   
+    // Mask is incorporated into data_index and is not sent/received anymore
+    mask.resize(0);
+    if (hasValue)
+      value.resize(nbData);
+    if (hasBounds)
+      bounds.resize(2,nbData);
+    if (hasLabel)
+      label.resize(nbData);
+
+    nbData = 0;
+    for (idx = 0; idx < nbReceived; ++idx)
+    {
+      CArray<int,1>& indi = vec_indi[idx];
+      CArray<int,1>& dataIndi = vec_dataInd[idx];
+      int nb = indi.numElements();
+      for (int n = 0; n < nb; ++n)
+      { 
+        locInd = globalLocalIndexMap_[size_t(indi(n))];
+
+        nonCompressedData(locInd) = (-1 == nonCompressedData(locInd)) ? dataIndi(n) : nonCompressedData(locInd);
+
+        if (hasValue)
+          value(locInd) = vec_val[idx](n);
+
+        if (hasBounds)
+        {
+          bounds(0,locInd) = vec_bounds[idx](0,n);
+          bounds(1,locInd) = vec_bounds[idx](1,n);
+        }
+
+        if (hasLabel)
+          label(locInd) = vec_label[idx](n);
+      }
+    }
+    
+    int nbCompressedData = 0;
+    for (idx = 0; idx < nonCompressedData.numElements(); ++idx)
+    {
+      if (0 <= nonCompressedData(idx))
+        ++nbCompressedData;
+    }
+
+    data_index.resize(nbCompressedData);
+    nbCompressedData = 0;
+    for (idx = 0; idx < nonCompressedData.numElements(); ++idx)
+    {
+      if (0 <= nonCompressedData(idx))
+      {
+        data_index(nbCompressedData) = idx % n;
+        ++nbCompressedData;
+      }
+    }
+
+    data_begin.setValue(0);
+    data_n.setValue(data_index.numElements());
+  }
+  CATCH_DUMP_ATTR
+
+  /*!
+    Compare two axis objects. 
+    They are equal if only if they have identical attributes as well as their values.
+    Moreover, they must have the same transformations.
+  \param [in] axis Compared axis
+  \return result of the comparison
+  */
+  bool CAxis::isEqual(CAxis* obj)
+  TRY
+  {
+    vector<StdString> excludedAttr;
+    excludedAttr.push_back("axis_ref");
+
+    bool objEqual = SuperClass::isEqual(obj, excludedAttr);    
+    if (!objEqual) return objEqual;
+
+    TransMapTypes thisTrans = this->getAllTransformations();
+    TransMapTypes objTrans  = obj->getAllTransformations();
+
+    TransMapTypes::const_iterator it, itb, ite;
+    std::vector<ETranformationType> thisTransType, objTransType;
+    for (it = thisTrans.begin(); it != thisTrans.end(); ++it)
+      thisTransType.push_back(it->first);
+    for (it = objTrans.begin(); it != objTrans.end(); ++it)
+      objTransType.push_back(it->first);
+
+    if (thisTransType.size() != objTransType.size()) return false;
+    for (int idx = 0; idx < thisTransType.size(); ++idx)
+      objEqual &= (thisTransType[idx] == objTransType[idx]);
+
+    return objEqual;
+  }
+  CATCH_DUMP_ATTR
+
+  /*
+    Add transformation into axis. This function only servers for Fortran interface
+    \param [in] transType transformation type
+    \param [in] id identifier of the transformation object
+  */
+  CTransformation<CAxis>* CAxis::addTransformation(ETranformationType transType, const StdString& id)
+  TRY
+  {
+    transformationMap_.push_back(std::make_pair(transType, CTransformation<CAxis>::createTransformation(transType,id)));
+    return transformationMap_.back().second;
+  }
+  CATCH_DUMP_ATTR
+
+  /*
+    Check whether an axis has (spatial) transformation
+  */
+  bool CAxis::hasTransformation()
+  TRY
+  {
+    return (!transformationMap_.empty());
+  }
+  CATCH_DUMP_ATTR
+
+  /*
+    Set transformation
+    \param [in] axisTrans transformation to set
+  */
+  void CAxis::setTransformations(const TransMapTypes& axisTrans)
+  TRY
+  {
+    transformationMap_ = axisTrans;
+  }
+  CATCH_DUMP_ATTR
+
+  /*
+    Return all transformation held by the axis
+    \return transformation the axis has
+  */
+  CAxis::TransMapTypes CAxis::getAllTransformations(void)
+  TRY
+  {
+    return transformationMap_;
+  }
+  CATCH_DUMP_ATTR
+
+  /*
+    Duplicate transformation of another axis
+    \param [in] src axis whose transformations are copied
+  */
+  void CAxis::duplicateTransformation(CAxis* src)
+  TRY
+  {
+    if (src->hasTransformation())
+    {
+      this->setTransformations(src->getAllTransformations());
+    }
+  }
+  CATCH_DUMP_ATTR
+
+  /*!
+   * Go through the hierarchy to find the axis from which the transformations must be inherited
+   */
+  void CAxis::solveInheritanceTransformation()
+  TRY
+  {
+    if (hasTransformation() || !hasDirectAxisReference())
+      return;
+
+    CAxis* axis = this;
+    std::vector<CAxis*> refAxis;
+    while (!axis->hasTransformation() && axis->hasDirectAxisReference())
+    {
+      refAxis.push_back(axis);
+      axis = axis->getDirectAxisReference();
+    }
+
+    if (axis->hasTransformation())
+      for (size_t i = 0; i < refAxis.size(); ++i)
+        refAxis[i]->setTransformations(axis->getAllTransformations());
+  }
+  CATCH_DUMP_ATTR
+
+  void CAxis::setContextClient(CContextClient* contextClient)
+  TRY
+  {
+    if (clientsSet.find(contextClient)==clientsSet.end())
+    {
+      clients.push_back(contextClient) ;
+      clientsSet.insert(contextClient);
+    }
+  }
+  CATCH_DUMP_ATTR
+
+  void CAxis::parse(xml::CXMLNode & node)
+  TRY
+  {
+    SuperClass::parse(node);
+
+    if (node.goToChildElement())
+    {
+      StdString nodeElementName;
+      do
+      {
+        StdString nodeId("");
+        if (node.getAttributes().end() != node.getAttributes().find("id"))
+        { nodeId = node.getAttributes()["id"]; }
+
+        nodeElementName = node.getElementName();
+        std::map<StdString, ETranformationType>::const_iterator ite = transformationMapList_.end(), it;
+        it = transformationMapList_.find(nodeElementName);
+        if (ite != it)
+        {
+          transformationMap_.push_back(std::make_pair(it->second, CTransformation<CAxis>::createTransformation(it->second,
+                                                                                                               nodeId,
+                                                                                                               &node)));
+        }
+        else
+        {
+          ERROR("void CAxis::parse(xml::CXMLNode & node)",
+                << "The transformation " << nodeElementName << " has not been supported yet.");
+        }
+      } while (node.goToNextElement()) ;
+      node.goToParentElement();
+    }
+  }
+  CATCH_DUMP_ATTR
+
+  DEFINE_REF_FUNC(Axis,axis)
+
+   ///---------------------------------------------------------------
+
+} // namespace xios
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/node/axis.hpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/node/axis.hpp	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/node/axis.hpp	(revision 1749)
@@ -0,0 +1,191 @@
+#ifndef __XIOS_CAxis__
+#define __XIOS_CAxis__
+
+/// XIOS headers ///
+#include "xios_spl.hpp"
+#include "group_factory.hpp"
+#include "virtual_node.hpp"
+
+#include "declare_group.hpp"
+#include "declare_ref_func.hpp"
+#include "declare_virtual_node.hpp"
+#include "attribute_array.hpp"
+#include "attribute_enum.hpp"
+#include "attribute_enum_impl.hpp"
+#include "server_distribution_description.hpp"
+#include "transformation.hpp"
+#include "transformation_enum.hpp"
+
+namespace xios {
+   /// ////////////////////// DÃ©clarations ////////////////////// ///
+
+   class CAxisGroup;
+   class CAxisAttributes;
+   class CAxis;
+
+   ///--------------------------------------------------------------
+
+   // Declare/Define CAxisAttribute
+   BEGIN_DECLARE_ATTRIBUTE_MAP(CAxis)
+#  include "axis_attribute.conf"
+   END_DECLARE_ATTRIBUTE_MAP(CAxis)
+
+   ///--------------------------------------------------------------
+
+   class CAxis
+      : public CObjectTemplate<CAxis>
+      , public CAxisAttributes
+   {
+               /// typedef ///
+         typedef CObjectTemplate<CAxis>   SuperClass;
+         typedef CAxisAttributes SuperClassAttribute;
+         
+      public:
+         enum EEventId
+         {
+           EVENT_ID_DISTRIBUTION_ATTRIBUTE,           
+           EVENT_ID_DISTRIBUTED_VALUE,
+           EVENT_ID_NON_DISTRIBUTED_VALUE,
+           EVENT_ID_NON_DISTRIBUTED_ATTRIBUTES,
+           EVENT_ID_DISTRIBUTED_ATTRIBUTES
+         } ;
+
+      public:
+         typedef CAxisAttributes RelAttributes;
+         typedef CAxisGroup      RelGroup;
+         typedef CTransformation<CAxis>::TransformationMapTypes TransMapTypes;
+
+      public:
+         /// Constructeurs ///
+         CAxis(void);
+         explicit CAxis(const StdString & id);
+         CAxis(const CAxis & axis);       // Not implemented yet.
+         CAxis(const CAxis * const axis); // Not implemented yet.
+
+         static CAxis* createAxis();
+
+         /// Accesseurs ///
+         const std::set<StdString> & getRelFiles(void) const;
+
+         int getNumberWrittenIndexes(MPI_Comm writtenCom);
+         int getTotalNumberWrittenIndexes(MPI_Comm writtenCom);
+         int getOffsetWrittenIndexes(MPI_Comm writtenCom);
+         CArray<int, 1>& getCompressedIndexToWriteOnServer(MPI_Comm writtenCom);
+
+         std::map<int, StdSize> getAttributesBufferSize(CContextClient* client, const std::vector<int>& globalDim, int orderPositionInGrid,
+                                                        CServerDistributionDescription::ServerDistributionType disType = CServerDistributionDescription::BAND_DISTRIBUTION);
+
+         /// Test ///
+         bool IsWritten(const StdString & filename) const;
+         bool isWrittenCompressed(const StdString& filename) const;
+         bool isDistributed(void) const;
+         bool isCompressible(void) const;
+
+         /// Mutateur ///
+         void addRelFile(const StdString & filename);
+         void addRelFileCompressed(const StdString& filename);
+
+         /// VÃ©rifications ///
+         void checkAttributes(void);
+
+         /// Destructeur ///
+         virtual ~CAxis(void);
+
+         virtual void parse(xml::CXMLNode & node);
+
+         void setContextClient(CContextClient* contextClient);
+
+         /// Accesseurs statiques ///
+         static StdString GetName(void);
+         static StdString GetDefName(void);
+         static ENodeType GetType(void);
+
+         static bool dispatchEvent(CEventServer& event);         
+         
+         void checkAttributesOnClient();
+         void checkAttributesOnClientAfterTransformation(const std::vector<int>& globalDim, int orderPositionInGrid,
+                                                         CServerDistributionDescription::ServerDistributionType distType = CServerDistributionDescription::BAND_DISTRIBUTION);
+         void sendCheckedAttributes(const std::vector<int>& globalDim, int orderPositionInGrid,
+                                    CServerDistributionDescription::ServerDistributionType disType = CServerDistributionDescription::BAND_DISTRIBUTION);
+
+         void checkEligibilityForCompressedOutput();
+         size_t getGlobalWrittenSize(void) ;
+
+         void computeWrittenIndex();
+         void computeWrittenCompressedIndex(MPI_Comm);
+         bool hasTransformation();
+         void solveInheritanceTransformation();
+         TransMapTypes getAllTransformations();         
+         void duplicateTransformation(CAxis*);
+         CTransformation<CAxis>* addTransformation(ETranformationType transType, const StdString& id="");
+         bool isEqual(CAxis* axis);
+
+      public: 
+        bool hasValue;        
+        bool hasBounds;
+        bool hasLabel;
+
+        CArray<int,1> localIndexToWriteOnServer;
+
+      private:
+         void checkData();
+         void checkMask();
+         void checkBounds();
+         void checkLabel();
+         void sendAttributes(const std::vector<int>& globalDim, int orderPositionInGrid,
+                             CServerDistributionDescription::ServerDistributionType distType);
+         void sendDistributionAttribute(const std::vector<int>& globalDim, int orderPositionInGrid,
+                                        CServerDistributionDescription::ServerDistributionType distType);
+         void computeConnectedClients(const std::vector<int>& globalDim, int orderPositionInGrid,
+                                     CServerDistributionDescription::ServerDistributionType distType);
+
+         void sendNonDistributedAttributes(void);
+         void sendDistributedAttributes(void);
+
+         static void recvNonDistributedAttributes(CEventServer& event);
+         static void recvDistributedAttributes(CEventServer& event);
+         static void recvDistributionAttribute(CEventServer& event);
+         void recvNonDistributedAttributes(int rank, CBufferIn& buffer);
+         void recvDistributedAttributes(vector<int>& rank, vector<CBufferIn*> buffers);
+         void recvDistributionAttribute(CBufferIn& buffer);
+
+         void setTransformations(const TransMapTypes&);
+
+      private:
+
+/** Clients that have to send a domain. There can be multiple clients in case of secondary server, otherwise only one client. */
+         std::list<CContextClient*> clients;
+         std::set<CContextClient*> clientsSet;
+
+         bool isChecked;
+         bool areClientAttributesChecked_;
+         bool isClientAfterTransformationChecked;
+         std::set<StdString> relFiles, relFilesCompressed;
+         TransMapTypes transformationMap_;         
+         //! True if and only if the data defined on the axis can be outputted in a compressed way
+         bool isCompressible_;
+         std::map<int, map<int,int> > nbSenders; // Mapping of number of communicating client to a server
+         std::map<int, std::unordered_map<int, vector<size_t> > > indSrv_; // Global index of each client sent to server
+         // std::map<int, vector<int> > indWrittenSrv_; // Global written index of each client sent to server
+         std::unordered_map<size_t,size_t> globalLocalIndexMap_;
+         std::vector<int> indexesToWrite;
+         std::map<int,int> numberWrittenIndexes_, totalNumberWrittenIndexes_, offsetWrittenIndexes_;
+         std::map<int, CArray<int, 1> > compressedIndexToWriteOnServer;
+         std::map<int, std::vector<int> > connectedServerRank_;
+         bool computedWrittenIndex_;                  
+
+       private:
+         static bool initializeTransformationMap(std::map<StdString, ETranformationType>& m);
+         static std::map<StdString, ETranformationType> transformationMapList_;
+         static bool dummyTransformationMapList_;
+
+         DECLARE_REF_FUNC(Axis,axis)
+   }; // class CAxis
+
+   ///--------------------------------------------------------------
+
+   // Declare/Define CAxisGroup and CAxisDefinition
+   DECLARE_GROUP(CAxis);
+} // namespace xios
+
+#endif // __XIOS_CAxis__
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/node/calendar_wrapper.cpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/node/calendar_wrapper.cpp	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/node/calendar_wrapper.cpp	(revision 1749)
@@ -0,0 +1,184 @@
+#include "calendar_wrapper.hpp"
+#include "type.hpp"
+#include "calendar_type.hpp"
+#include "duration.hpp"
+#include "context.hpp"
+
+namespace xios {
+
+  /// ////////////////////// DÃ©finitions ////////////////////// ///
+
+  CCalendarWrapper::CCalendarWrapper(void)
+    : CObjectTemplate<CCalendarWrapper>(), CCalendarWrapperAttributes()
+  { /* Ne rien faire de plus */ }
+
+  CCalendarWrapper::CCalendarWrapper(const StdString & id)
+    : CObjectTemplate<CCalendarWrapper>(id), CCalendarWrapperAttributes()
+  { /* Ne rien faire de plus */ }
+
+  CCalendarWrapper::~CCalendarWrapper(void)
+  {}
+
+  //----------------------------------------------------------------
+
+  StdString CCalendarWrapper::GetName(void)    { return StdString("calendar_wrapper"); }
+  StdString CCalendarWrapper::GetDefName(void) { return StdString("calendar"); }
+  ENodeType CCalendarWrapper::GetType(void)    { return eCalendarWrapper; }
+
+  //----------------------------------------------------------------
+
+  /*!
+  \brief Extract the calendar from its wrapper
+  \return the calendar
+  */
+  std::shared_ptr<CCalendar> CCalendarWrapper::getCalendar(bool checkValid /*= false*/) const
+  {
+    if (checkValid && !this->calendar)
+      ERROR("CCalendarWrapper::getCalendar(bool checkValid = true)", << "The calendar was accessed before being created!");
+    return this->calendar;
+  }
+
+  const CDate& CCalendarWrapper::getInitDate() const
+  {
+    return getCalendar(true)->getInitDate();
+  }
+
+  const CDate& CCalendarWrapper::getTimeOrigin() const
+  {
+    return getCalendar(true)->getTimeOrigin();
+  }
+
+  //----------------------------------------------------------------
+
+  void CCalendarWrapper::setInitDate(const CDate& initDate)
+  {
+    getCalendar(true)->setInitDate(initDate);
+    start_date = initDate.toString();
+  }
+
+  void CCalendarWrapper::setTimeOrigin(const CDate& timeOrigin)
+  {
+    getCalendar(true)->setTimeOrigin(timeOrigin);
+    time_origin = timeOrigin.toString();
+  }
+
+  //----------------------------------------------------------------
+
+  /*!
+  \brief Parse the calendar node
+  \param [in] node xmld node corresponding to the calendar definition
+  */
+  void CCalendarWrapper::parse(xml::CXMLNode& node)
+  {
+    SuperClass::parse(node);
+
+    // Try to create the calendar
+    createCalendar();
+  }
+
+  /*!
+  \brief Try to create the calendar from the parsed attributes
+  */
+  void CCalendarWrapper::createCalendar(void)
+  {
+    // Create the calendar if possible
+    if (calendar)
+    {
+      ERROR("CCalendarWrapper::createCalendar(void)",
+            << "Error: the calendar can only be defined once!");
+    }
+    else if (!type.isEmpty())
+    {
+#define DECLARE_CALENDAR(MType, eType)                                     \
+      if (type.getValue() == type_attr::eType)                             \
+        calendar = std::shared_ptr<CCalendar>(new C##MType##Calendar());
+#include "calendar_type.conf"
+#undef DECLARE_CALENDAR
+      // Special case for the user defined calendar
+      if (type.getValue() == type_attr::user_defined)
+      {
+        if (day_length.isEmpty())
+          ERROR("CCalendarWrapper::createCalendar(void)",
+                << "The day length must be configured when using an user defined calendar.");
+        if (month_lengths.isEmpty() == year_length.isEmpty())
+          ERROR("CCalendarWrapper::createCalendar(void)",
+                << "Either the month lengths or the year length must be configured when using an user defined calendar.");
+        if (leap_year_drift.isEmpty() != leap_year_month.isEmpty())
+          ERROR("CCalendarWrapper::createCalendar(void)",
+                << "Both leap_year_drift and leap_year_month attributes must be set if you wish to configure leap years.");
+        if (leap_year_drift.isEmpty() && !leap_year_drift_offset.isEmpty())
+          ERROR("CCalendarWrapper::createCalendar(void)",
+                << "Both leap_year_drift and leap_year_month attributes are mandatory if you wish to use leap_year_drift_offset attribute.");
+
+        std::shared_ptr<CUserDefinedCalendar> userDefinedCalendar;
+        if (year_length.isEmpty())
+          userDefinedCalendar.reset(new CUserDefinedCalendar(day_length.getValue(), month_lengths.getValue()));
+        else
+          userDefinedCalendar.reset(new CUserDefinedCalendar(day_length.getValue(), year_length.getValue()));
+
+        if (!leap_year_month.isEmpty())
+          userDefinedCalendar->configureLeapYear(leap_year_month.getValue(),
+                                                 leap_year_drift.getValue(),
+                                                 leap_year_drift_offset.isEmpty() ? 0.0 : leap_year_drift_offset.getValue());
+
+        calendar = userDefinedCalendar;
+      }
+      else
+      {
+#define CHECK_EMPTY(attr)                                                                       \
+        if (!attr.isEmpty())                                                                    \
+          ERROR("CCalendarWrapper::createCalendar(void)",                                       \
+                << "The attribute \"" #attr "\" can only be used with user defined calendar.");
+        CHECK_EMPTY(day_length)
+        CHECK_EMPTY(month_lengths)
+        CHECK_EMPTY(year_length)
+        CHECK_EMPTY(leap_year_month)
+        CHECK_EMPTY(leap_year_drift)
+        CHECK_EMPTY(leap_year_drift_offset)
+#undef CHECK_EMPTY
+      }
+
+      if (!calendar)
+        ERROR("CCalendarWrapper::createCalendar(void)",
+              << "[ type = " << type.getStringValue() << " ] "
+              << "The calendar is not properly handled!");
+
+      // Set the timestep is available
+      if (!timestep.isEmpty())
+        calendar->setTimeStep(timestep.getValue());
+
+      // Parse and set the start date if available
+      if (!start_date.isEmpty())
+        calendar->setInitDate(CDate::FromString(start_date.getValue(), *calendar));
+
+      // Parse and set the time origin if available
+      if (!time_origin.isEmpty())
+        calendar->setTimeOrigin(CDate::FromString(time_origin.getValue(), *calendar));
+
+      // Notify the context about the calendar
+      CContext* context = CContext::getCurrent();
+      if (!context)
+        ERROR("CCalendarWrapper::createCalendar(void)", << "Impossible to set the calendar: no current context available.");
+      context->setCalendar(calendar);
+    }
+    else if (!start_date.isEmpty() || !time_origin.isEmpty())
+    {
+      ERROR("CCalendarWrapper::createCalendar(void)",
+            << "The calendar type must be set before defining the start date or the time origin!");
+    }
+  }
+
+  /*!
+  \brief Try to update the timestep of the calendar with the corresponding attribute
+  */
+  void CCalendarWrapper::updateTimestep(void)
+  {
+    if (timestep.isEmpty())
+    {
+      ERROR("CCalendarWrapper::updateTimestep(void)",
+            << "Error: the timestep needs to be defined!");
+    }
+    else if (calendar)
+      calendar->setTimeStep(timestep.getValue());
+  }
+}
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/node/calendar_wrapper.hpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/node/calendar_wrapper.hpp	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/node/calendar_wrapper.hpp	(revision 1749)
@@ -0,0 +1,87 @@
+#ifndef __XIOS_CCalendarWrapper__
+#define __XIOS_CCalendarWrapper__
+
+/// XIOS headers ///
+#include "xios_spl.hpp"
+#include "attribute_enum.hpp"
+#include "attribute_enum_impl.hpp"
+#include "attribute_array.hpp"
+#include "declare_attribute.hpp"
+#include "object_template.hpp"
+
+#include "calendar.hpp"
+
+namespace xios {
+
+  /// ////////////////////// DÃ©clarations ////////////////////// ///
+  class CCalendarWrapperAttributes;
+  class CCalendarWrapper;
+  ///--------------------------------------------------------------
+
+  // Declare/Define CFileAttribute
+  BEGIN_DECLARE_ATTRIBUTE_MAP(CCalendarWrapper)
+#include "calendar_wrapper_attribute.conf"
+  END_DECLARE_ATTRIBUTE_MAP(CCalendarWrapper)
+
+  ///--------------------------------------------------------------
+  /*!
+    \class CCalendarWrapper
+    This class a simple wrapper for the calendar
+  */
+  class CCalendarWrapper
+    : public CObjectTemplate<CCalendarWrapper>
+    , public CCalendarWrapperAttributes
+  {
+    public :
+
+      /// typedef ///
+      typedef CObjectTemplate<CCalendarWrapper> SuperClass;
+      typedef CCalendarWrapperAttributes SuperClassAttribute;
+
+      //---------------------------------------------------------
+
+    public :
+
+      /// Constructeurs ///
+      CCalendarWrapper(void);
+      explicit CCalendarWrapper(const StdString& id);
+
+      /// Destructeur ///
+      virtual ~CCalendarWrapper(void);
+
+      /// Accesseurs statiques ///
+      static StdString GetName(void);
+      static StdString GetDefName(void);
+      static ENodeType GetType(void);
+
+      //---------------------------------------------------------
+
+    public :
+      // Parse xml calendar node
+      virtual void parse(xml::CXMLNode& node);
+      // Try to create the calendar from the current attributes
+      void createCalendar(void);
+      // Try to update the timestep of the calendar with the corresponding attribute
+      void updateTimestep(void);
+
+    public :
+      /// Accesseurs ///
+      std::shared_ptr<CCalendar> getCalendar(bool checkValid = false) const;
+
+      const CDate& getInitDate() const;
+      const CDate& getTimeOrigin() const;
+
+      /// Mutateurs ///
+      void setInitDate(const CDate& initDate);
+      void setTimeOrigin(const CDate& timeOrigin);
+
+    private:
+      // Calendar of context
+      std::shared_ptr<CCalendar> calendar;
+
+  }; // class CCalendarWrapper
+
+  typedef CCalendarWrapper CCalendarWrapperDefinition;
+} // namespace xios
+
+#endif // __XIOS_CCalendarWrapper__
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/node/compute_connectivity_domain.cpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/node/compute_connectivity_domain.cpp	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/node/compute_connectivity_domain.cpp	(revision 1749)
@@ -0,0 +1,53 @@
+#include "compute_connectivity_domain.hpp"
+#include "type.hpp"
+
+namespace xios {
+
+  /// ////////////////////// DÃ©finitions ////////////////////// ///
+
+  CComputeConnectivityDomain::CComputeConnectivityDomain(void)
+    : CObjectTemplate<CComputeConnectivityDomain>(), CComputeConnectivityDomainAttributes(), CTransformation<CDomain>()
+  { /* Ne rien faire de plus */ }
+
+  CComputeConnectivityDomain::CComputeConnectivityDomain(const StdString & id)
+    : CObjectTemplate<CComputeConnectivityDomain>(id), CComputeConnectivityDomainAttributes(), CTransformation<CDomain>()
+  { /* Ne rien faire de plus */ }
+
+  CComputeConnectivityDomain::~CComputeConnectivityDomain(void)
+  {}
+
+  CTransformation<CDomain>* CComputeConnectivityDomain::create(const StdString& id, xml::CXMLNode* node)
+  {
+    CComputeConnectivityDomain* compute_connectivityDomain = CComputeConnectivityDomainGroup::get("compute_connectivity_domain_definition")->createChild(id);
+    if (node) compute_connectivityDomain->parse(*node);
+    return static_cast<CTransformation<CDomain>*>(compute_connectivityDomain);
+  }
+
+  bool CComputeConnectivityDomain::_dummyRegistered = CComputeConnectivityDomain::registerTrans();
+  bool CComputeConnectivityDomain::registerTrans()
+  {
+    registerTransformation(TRANS_COMPUTE_CONNECTIVITY_DOMAIN, CComputeConnectivityDomain::create);
+  }
+
+  //----------------------------------------------------------------
+
+  StdString CComputeConnectivityDomain::GetName(void)    { return StdString("compute_connectivity_domain"); }
+  StdString CComputeConnectivityDomain::GetDefName(void) { return StdString("compute_connectivity_domain"); }
+  ENodeType CComputeConnectivityDomain::GetType(void)    { return eComputeConnectivityDomain; }
+
+  void CComputeConnectivityDomain::checkValid(CDomain* domainDst)
+  {
+    if (CDomain::type_attr::unstructured != domainDst->type)
+    {
+      ERROR("CComputeConnectivityDomain::checkValid(CDomain* domainDst)",
+            << "Domain connectivity computation is only supported for unstructured" << std::endl
+            << "Check type of domain destination, id = " << domainDst->getId());
+    }
+
+    if (type.isEmpty()) type.setValue(CComputeConnectivityDomain::type_attr::edge);
+    if (n_neighbor_max.isEmpty()) n_neighbor_max.setValue(0);
+    if (n_neighbor.isEmpty()) n_neighbor.resize(domainDst->i_index.numElements());
+    if (local_neighbor.isEmpty()) local_neighbor.resize(1,1);
+  }
+
+}
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/node/compute_connectivity_domain.hpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/node/compute_connectivity_domain.hpp	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/node/compute_connectivity_domain.hpp	(revision 1749)
@@ -0,0 +1,67 @@
+#ifndef __XIOS_CComputeConnectivityDomain__
+#define __XIOS_CComputeConnectivityDomain__
+
+/// xios headers ///
+#include "xios_spl.hpp"
+#include "attribute_enum.hpp"
+#include "attribute_enum_impl.hpp"
+#include "attribute_array.hpp"
+#include "declare_attribute.hpp"
+#include "object_template.hpp"
+#include "group_factory.hpp"
+#include "declare_group.hpp"
+#include "transformation.hpp"
+#include "domain.hpp"
+
+namespace xios {
+  /// ////////////////////// DÃ©clarations ////////////////////// ///
+  class CComputeConnectivityDomainGroup;
+  class CComputeConnectivityDomainAttributes;
+  class CComputeConnectivityDomain;
+  class CDomain;
+
+  ///--------------------------------------------------------------
+
+  // Declare/Define CFileAttribute
+  BEGIN_DECLARE_ATTRIBUTE_MAP(CComputeConnectivityDomain)
+#include "compute_connectivity_domain_attribute.conf"
+  END_DECLARE_ATTRIBUTE_MAP(CComputeConnectivityDomain)
+
+  ///--------------------------------------------------------------
+  /*!
+    \class CComputeConnectivityDomain
+    This class describes zoom_domain in xml file.
+  */
+  class CComputeConnectivityDomain
+    : public CObjectTemplate<CComputeConnectivityDomain>
+    , public CComputeConnectivityDomainAttributes
+    , public CTransformation<CDomain>
+  {
+    public :
+      typedef CObjectTemplate<CComputeConnectivityDomain> SuperClass;
+      typedef CComputeConnectivityDomainAttributes SuperClassAttribute;
+
+    public :
+      /// Constructeurs ///
+      CComputeConnectivityDomain(void);
+      explicit CComputeConnectivityDomain(const StdString& id);
+
+      /// Destructeur ///
+      virtual ~CComputeConnectivityDomain(void);
+
+      virtual void checkValid(CDomain* domain);
+
+      /// Accesseurs statiques ///
+      static StdString GetName(void);
+      static StdString GetDefName(void);
+      static ENodeType GetType(void);
+    private:
+      static bool registerTrans();
+      static CTransformation<CDomain>* create(const StdString& id, xml::CXMLNode* node);
+      static bool _dummyRegistered;
+  }; // class CComputeConnectivityDomain
+
+  DECLARE_GROUP(CComputeConnectivityDomain);
+} // namespace xios
+
+#endif // __XIOS_CComputeConnectivityDomain__
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/node/context.cpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/node/context.cpp	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/node/context.cpp	(revision 1749)
@@ -0,0 +1,2138 @@
+#include "context.hpp"
+#include "attribute_template.hpp"
+#include "object_template.hpp"
+#include "group_template.hpp"
+
+#include "calendar_type.hpp"
+#include "duration.hpp"
+
+#include "context_client.hpp"
+#include "context_server.hpp"
+#include "nc4_data_output.hpp"
+#include "node_type.hpp"
+#include "message.hpp"
+#include "type.hpp"
+#include "xios_spl.hpp"
+#include "timer.hpp"
+#include "memtrack.hpp"
+#include <limits>
+#include <fstream>
+#include "server.hpp"
+#include "distribute_file_server2.hpp"
+
+namespace xios {
+
+  std::shared_ptr<CContextGroup> CContext::root;
+
+   /// ////////////////////// DÃ©finitions ////////////////////// ///
+
+   CContext::CContext(void)
+      : CObjectTemplate<CContext>(), CContextAttributes()
+      , calendar(), hasClient(false), hasServer(false)
+      , isPostProcessed(false), finalized(false)
+      , idServer_(), client(0), server(0)
+      , allProcessed(false), countChildCtx_(0)
+
+   { /* Ne rien faire de plus */ }
+
+   CContext::CContext(const StdString & id)
+      : CObjectTemplate<CContext>(id), CContextAttributes()
+      , calendar(), hasClient(false), hasServer(false)
+      , isPostProcessed(false), finalized(false)
+      , idServer_(), client(0), server(0)
+      , allProcessed(false), countChildCtx_(0)
+   { /* Ne rien faire de plus */ }
+
+   CContext::~CContext(void)
+   {
+     delete client;
+     delete server;
+     for (std::vector<CContextClient*>::iterator it = clientPrimServer.begin(); it != clientPrimServer.end(); it++)  delete *it;
+     for (std::vector<CContextServer*>::iterator it = serverPrimServer.begin(); it != serverPrimServer.end(); it++)  delete *it;
+
+   }
+
+   //----------------------------------------------------------------
+   //! Get name of context
+   StdString CContext::GetName(void)   { return (StdString("context")); }
+   StdString CContext::GetDefName(void){ return (CContext::GetName()); }
+   ENodeType CContext::GetType(void)   { return (eContext); }
+
+   //----------------------------------------------------------------
+
+   /*!
+   \brief Get context group (context root)
+   \return Context root
+   */
+   CContextGroup* CContext::getRoot(void)
+   TRY
+   {
+      if (root.get()==NULL) root=std::shared_ptr<CContextGroup>(new CContextGroup(xml::CXMLNode::GetRootName()));
+      return root.get();
+   }
+   CATCH
+
+   //----------------------------------------------------------------
+
+   /*!
+   \brief Get calendar of a context
+   \return Calendar
+   */
+   std::shared_ptr<CCalendar> CContext::getCalendar(void) const
+   TRY
+   {
+      return (this->calendar);
+   }
+   CATCH
+
+   //----------------------------------------------------------------
+
+   /*!
+   \brief Set a context with a calendar
+   \param[in] newCalendar new calendar
+   */
+   void CContext::setCalendar(std::shared_ptr<CCalendar> newCalendar)
+   TRY
+   {
+      this->calendar = newCalendar;
+   }
+   CATCH_DUMP_ATTR
+
+   //----------------------------------------------------------------
+   /*!
+   \brief Parse xml file and write information into context object
+   \param [in] node xmld node corresponding in xml file
+   */
+   void CContext::parse(xml::CXMLNode & node)
+   TRY
+   {
+      CContext::SuperClass::parse(node);
+
+      // PARSING POUR GESTION DES ENFANTS
+      xml::THashAttributes attributes = node.getAttributes();
+
+      if (attributes.end() != attributes.find("src"))
+      {
+         StdIFStream ifs ( attributes["src"].c_str() , StdIFStream::in );
+         if ( (ifs.rdstate() & std::ifstream::failbit ) != 0 )
+            ERROR("void CContext::parse(xml::CXMLNode & node)",
+                  <<endl<< "Can not open <"<<attributes["src"].c_str()<<"> file" );
+         if (!ifs.good())
+            ERROR("CContext::parse(xml::CXMLNode & node)",
+                  << "[ filename = " << attributes["src"] << " ] Bad xml stream !");
+         xml::CXMLParser::ParseInclude(ifs, attributes["src"], *this);
+      }
+
+      if (node.getElementName().compare(CContext::GetName()))
+         DEBUG("Le noeud is wrong defined but will be considered as a context !");
+
+      if (!(node.goToChildElement()))
+      {
+         DEBUG("Le context ne contient pas d'enfant !");
+      }
+      else
+      {
+         do { // Parcours des contextes pour traitement.
+
+            StdString name = node.getElementName();
+            attributes.clear();
+            attributes = node.getAttributes();
+
+            if (attributes.end() != attributes.find("id"))
+            {
+              DEBUG(<< "Definition node has an id,"
+                    << "it will not be taking account !");
+            }
+
+#define DECLARE_NODE(Name_, name_)    \
+   if (name.compare(C##Name_##Definition::GetDefName()) == 0) \
+   { C##Name_##Definition::create(C##Name_##Definition::GetDefName()) -> parse(node); continue; }
+#define DECLARE_NODE_PAR(Name_, name_)
+#include "node_type.conf"
+
+            DEBUG(<< "The element \'"     << name
+                  << "\' in the context \'" << CContext::getCurrent()->getId()
+                  << "\' is not a definition !");
+
+         } while (node.goToNextElement());
+
+         node.goToParentElement(); // Retour au parent
+      }
+   }
+   CATCH_DUMP_ATTR
+
+   //----------------------------------------------------------------
+   //! Show tree structure of context
+   void CContext::ShowTree(StdOStream & out)
+   TRY
+   {
+      StdString currentContextId = CContext::getCurrent() -> getId();
+      std::vector<CContext*> def_vector =
+         CContext::getRoot()->getChildList();
+      std::vector<CContext*>::iterator
+         it = def_vector.begin(), end = def_vector.end();
+
+      out << "<? xml version=\"1.0\" ?>" << std::endl;
+      out << "<"  << xml::CXMLNode::GetRootName() << " >" << std::endl;
+
+      for (; it != end; it++)
+      {
+         CContext* context = *it;
+         CContext::setCurrent(context->getId());
+         out << *context << std::endl;
+      }
+
+      out << "</" << xml::CXMLNode::GetRootName() << " >" << std::endl;
+      CContext::setCurrent(currentContextId);
+   }
+   CATCH
+
+   //----------------------------------------------------------------
+
+   //! Convert context object into string (to print)
+   StdString CContext::toString(void) const
+   TRY
+   {
+      StdOStringStream oss;
+      oss << "<" << CContext::GetName()
+          << " id=\"" << this->getId() << "\" "
+          << SuperClassAttribute::toString() << ">" << std::endl;
+      if (!this->hasChild())
+      {
+         //oss << "<!-- No definition -->" << std::endl; // fait planter l'incrÃ©mentation
+      }
+      else
+      {
+
+#define DECLARE_NODE(Name_, name_)    \
+   if (C##Name_##Definition::has(C##Name_##Definition::GetDefName())) \
+   oss << * C##Name_##Definition::get(C##Name_##Definition::GetDefName()) << std::endl;
+#define DECLARE_NODE_PAR(Name_, name_)
+#include "node_type.conf"
+
+      }
+      oss << "</" << CContext::GetName() << " >";
+      return (oss.str());
+   }
+   CATCH
+
+   //----------------------------------------------------------------
+
+   /*!
+   \brief Find all inheritace among objects in a context.
+   \param [in] apply (true) write attributes of parent into ones of child if they are empty
+                     (false) write attributes of parent into a new container of child
+   \param [in] parent unused
+   */
+   void CContext::solveDescInheritance(bool apply, const CAttributeMap * const UNUSED(parent))
+   TRY
+   {
+#define DECLARE_NODE(Name_, name_)    \
+   if (C##Name_##Definition::has(C##Name_##Definition::GetDefName())) \
+     C##Name_##Definition::get(C##Name_##Definition::GetDefName())->solveDescInheritance(apply);
+#define DECLARE_NODE_PAR(Name_, name_)
+#include "node_type.conf"
+   }
+   CATCH_DUMP_ATTR
+
+   //----------------------------------------------------------------
+
+   //! Verify if all root definition in the context have child.
+   bool CContext::hasChild(void) const
+   TRY
+   {
+      return (
+#define DECLARE_NODE(Name_, name_)    \
+   C##Name_##Definition::has(C##Name_##Definition::GetDefName())   ||
+#define DECLARE_NODE_PAR(Name_, name_)
+#include "node_type.conf"
+      false);
+}
+   CATCH
+
+   //----------------------------------------------------------------
+
+   void CContext::CleanTree(void)
+   TRY
+   {
+#define DECLARE_NODE(Name_, name_) C##Name_##Definition::ClearAllAttributes();
+#define DECLARE_NODE_PAR(Name_, name_)
+#include "node_type.conf"
+   }
+   CATCH
+
+   ///---------------------------------------------------------------
+
+   //! Initialize client side
+   void CContext::initClient(MPI_Comm intraComm, MPI_Comm interComm, CContext* cxtServer /*= 0*/)
+   TRY
+   {
+
+     hasClient = true;
+     MPI_Comm intraCommServer, interCommServer;
+     
+
+     if (CServer::serverLevel != 1)
+      // initClient is called by client
+     {
+       client = new CContextClient(this, intraComm, interComm, cxtServer);
+       if (cxtServer) // Attached mode
+       {
+         intraCommServer = intraComm;
+         interCommServer = interComm;
+       }
+       else
+       {
+         MPI_Comm_dup(intraComm, &intraCommServer);
+         comms.push_back(intraCommServer);
+         MPI_Comm_dup(interComm, &interCommServer);
+         comms.push_back(interCommServer);
+       }
+/* for registry take the id of client context */
+/* for servers, supress the _server_ from id  */
+       string contextRegistryId=getId() ;
+       size_t pos=contextRegistryId.find("_server_") ;
+       if (pos!=std::string::npos)  contextRegistryId=contextRegistryId.substr(0,pos) ;
+
+       registryIn=new CRegistry(intraComm);
+       registryIn->setPath(contextRegistryId) ;
+       if (client->clientRank==0) registryIn->fromFile("xios_registry.bin") ;
+       registryIn->bcastRegistry() ;
+       registryOut=new CRegistry(intraComm) ;
+       
+       registryOut->setPath(contextRegistryId) ;
+
+       server = new CContextServer(this, intraCommServer, interCommServer);
+     }
+     else
+     // initClient is called by primary server
+     {
+       clientPrimServer.push_back(new CContextClient(this, intraComm, interComm));
+       MPI_Comm_dup(intraComm, &intraCommServer);
+       comms.push_back(intraCommServer);
+       MPI_Comm_dup(interComm, &interCommServer);
+       comms.push_back(interCommServer);
+       serverPrimServer.push_back(new CContextServer(this, intraCommServer, interCommServer));
+     }
+   }
+   CATCH_DUMP_ATTR
+
+   /*!
+    Sets client buffers.
+    \param [in] contextClient
+    \param [in] bufferForWriting True if buffers are used for sending data for writing
+    This flag is only true for client and server-1 for communication with server-2
+  */
+   void CContext::setClientServerBuffer(CContextClient* contextClient, bool bufferForWriting)
+   TRY
+   {
+      // Estimated minimum event size for small events (10 is an arbitrary constant just for safety)
+     const size_t minEventSize = CEventClient::headerSize + getIdServer().size() + 10 * sizeof(int);
+
+      // Ensure there is at least some room for 20 of such events in the buffers
+      size_t minBufferSize = std::max(CXios::minBufferSize, 20 * minEventSize);
+
+#define DECLARE_NODE(Name_, name_)    \
+     if (minBufferSize < sizeof(C##Name_##Definition)) minBufferSize = sizeof(C##Name_##Definition);
+#define DECLARE_NODE_PAR(Name_, name_)
+#include "node_type.conf"
+#undef DECLARE_NODE
+#undef DECLARE_NODE_PAR
+
+     // Compute the buffer sizes needed to send the attributes and data corresponding to fields
+     std::map<int, StdSize> maxEventSize;
+     std::map<int, StdSize> bufferSize = getAttributesBufferSize(maxEventSize, contextClient, bufferForWriting);
+     std::map<int, StdSize> dataBufferSize = getDataBufferSize(maxEventSize, contextClient, bufferForWriting);
+
+     std::map<int, StdSize>::iterator it, ite = dataBufferSize.end();
+     for (it = dataBufferSize.begin(); it != ite; ++it)
+       if (it->second > bufferSize[it->first]) bufferSize[it->first] = it->second;
+
+     // Apply the buffer size factor, check that we are above the minimum buffer size and below the maximum size
+     ite = bufferSize.end();
+     for (it = bufferSize.begin(); it != ite; ++it)
+     {
+       it->second *= CXios::bufferSizeFactor;
+       if (it->second < minBufferSize) it->second = minBufferSize;
+       if (it->second > CXios::maxBufferSize) it->second = CXios::maxBufferSize;
+     }
+
+     // Leaders will have to send some control events so ensure there is some room for those in the buffers
+     if (contextClient->isServerLeader())
+     {
+       const std::list<int>& ranks = contextClient->getRanksServerLeader();
+       for (std::list<int>::const_iterator itRank = ranks.begin(), itRankEnd = ranks.end(); itRank != itRankEnd; ++itRank)
+       {
+         if (!bufferSize.count(*itRank))
+         {
+           bufferSize[*itRank] = minBufferSize;
+           maxEventSize[*itRank] = minEventSize;
+         }
+       }
+     }
+     contextClient->setBufferSize(bufferSize, maxEventSize);
+   }
+   CATCH_DUMP_ATTR
+
+   //! Verify whether a context is initialized
+   bool CContext::isInitialized(void)
+   TRY
+   {
+     return hasClient;
+   }
+   CATCH_DUMP_ATTR
+
+   void CContext::initServer(MPI_Comm intraComm, MPI_Comm interComm, CContext* cxtClient /*= 0*/)
+   TRY
+   {
+     hasServer=true;
+     server = new CContextServer(this,intraComm,interComm);
+
+/* for registry take the id of client context */
+/* for servers, supress the _server_ from id  */
+     string contextRegistryId=getId() ;
+     size_t pos=contextRegistryId.find("_server_") ;
+     if (pos!=std::string::npos)  contextRegistryId=contextRegistryId.substr(0,pos) ;
+       
+     registryIn=new CRegistry(intraComm);
+     registryIn->setPath(contextRegistryId) ;
+     if (server->intraCommRank==0) registryIn->fromFile("xios_registry.bin") ;
+     registryIn->bcastRegistry() ;
+     registryOut=new CRegistry(intraComm) ;
+     registryOut->setPath(contextRegistryId) ;
+
+     MPI_Comm intraCommClient, interCommClient;
+     if (cxtClient) // Attached mode
+     {
+       intraCommClient = intraComm;
+       interCommClient = interComm;
+     }
+     else
+     {
+       MPI_Comm_dup(intraComm, &intraCommClient);
+       comms.push_back(intraCommClient);
+       MPI_Comm_dup(interComm, &interCommClient);
+       comms.push_back(interCommClient);
+     }
+     client = new CContextClient(this,intraCommClient,interCommClient, cxtClient);
+   }
+   CATCH_DUMP_ATTR
+
+   //! Try to send the buffers and receive possible answers
+  bool CContext::checkBuffersAndListen(bool enableEventsProcessing /*= true*/)
+  TRY
+  {
+    bool clientReady, serverFinished;
+
+    // Only classical servers are non-blocking
+    if (CServer::serverLevel == 0)
+    {
+      client->checkBuffers();
+      bool hasTmpBufferedEvent = client->hasTemporarilyBufferedEvent();
+      if (hasTmpBufferedEvent)
+        hasTmpBufferedEvent = !client->sendTemporarilyBufferedEvent();
+      // Don't process events if there is a temporarily buffered event
+      return server->eventLoop(!hasTmpBufferedEvent || !enableEventsProcessing);
+    }
+    else if (CServer::serverLevel == 1)
+    {
+      if (!finalized)
+        client->checkBuffers();
+      bool serverFinished = true;
+      if (!finalized)
+        serverFinished = server->eventLoop(enableEventsProcessing);
+      bool serverPrimFinished = true;
+      for (int i = 0; i < clientPrimServer.size(); ++i)
+      {
+        if (!finalized)
+          clientPrimServer[i]->checkBuffers();
+        if (!finalized)
+          serverPrimFinished *= serverPrimServer[i]->eventLoop(enableEventsProcessing);
+      }
+      return ( serverFinished && serverPrimFinished);
+    }
+
+    else if (CServer::serverLevel == 2)
+    {
+      client->checkBuffers();
+      return server->eventLoop(enableEventsProcessing);
+    }
+  }
+   CATCH_DUMP_ATTR
+
+   //! Terminate a context
+   void CContext::finalize(void)
+   TRY
+   {
+      if (hasClient && !hasServer) // For now we only use server level 1 to read data
+      {
+        doPreTimestepOperationsForEnabledReadModeFiles();
+      }
+     // Send registry upon calling the function the first time
+     if (countChildCtx_ == 0)
+       if (hasClient) sendRegistry() ;
+
+     // Client:
+     // (1) blocking send context finalize to its server
+     // (2) blocking receive context finalize from its server
+     // (3) some memory deallocations
+     if (CXios::isClient)
+     {
+       // Make sure that client (model) enters the loop only once
+       if (countChildCtx_ < 1)
+       {
+         ++countChildCtx_;
+
+         client->finalize();
+         while (client->havePendingRequests())
+            client->checkBuffers();
+
+         while (!server->hasFinished())
+           server->eventLoop();
+
+         if (hasServer) // Mode attache
+         {
+           closeAllFile();
+           registryOut->hierarchicalGatherRegistry() ;
+           if (server->intraCommRank==0) CXios::globalRegistry->mergeRegistry(*registryOut) ;
+         }
+
+         //! Deallocate client buffers
+         client->releaseBuffers();
+
+         //! Free internally allocated communicators
+         for (std::list<MPI_Comm>::iterator it = comms.begin(); it != comms.end(); ++it)
+           MPI_Comm_free(&(*it));
+         comms.clear();
+
+         info(20)<<"CContext: Context <"<<getId()<<"> is finalized."<<endl;
+       }
+     }
+     else if (CXios::isServer)
+     {
+       // First context finalize message received from a model
+       // Send context finalize to its child contexts (if any)
+       if (countChildCtx_ == 0)
+         for (int i = 0; i < clientPrimServer.size(); ++i)
+           clientPrimServer[i]->finalize();
+
+       // (Last) context finalized message received
+       if (countChildCtx_ == clientPrimServer.size())
+       {
+         // Blocking send of context finalize message to its client (e.g. primary server or model)
+         info(100)<<"DEBUG: context "<<getId()<<" Send client finalize<<"<<endl ;
+         client->finalize();
+         bool bufferReleased;
+         do
+         {
+           client->checkBuffers();
+           bufferReleased = !client->havePendingRequests();
+         } while (!bufferReleased);
+         finalized = true;
+
+         closeAllFile(); // Just move to here to make sure that server-level 1 can close files
+         if (hasServer && !hasClient)
+         {           
+           registryOut->hierarchicalGatherRegistry() ;
+           if (server->intraCommRank==0) CXios::globalRegistry->mergeRegistry(*registryOut) ;
+         }
+
+         //! Deallocate client buffers
+         client->releaseBuffers();
+         for (int i = 0; i < clientPrimServer.size(); ++i)
+           clientPrimServer[i]->releaseBuffers();
+
+         //! Free internally allocated communicators
+         for (std::list<MPI_Comm>::iterator it = comms.begin(); it != comms.end(); ++it)
+           MPI_Comm_free(&(*it));
+         comms.clear();
+
+         info(20)<<"CContext: Context <"<<getId()<<"> is finalized."<<endl;
+       }
+
+       ++countChildCtx_;
+     }
+   }
+   CATCH_DUMP_ATTR
+
+   //! Free internally allocated communicators
+   void CContext::freeComms(void)
+   TRY
+   {
+     for (std::list<MPI_Comm>::iterator it = comms.begin(); it != comms.end(); ++it)
+       MPI_Comm_free(&(*it));
+     comms.clear();
+   }
+   CATCH_DUMP_ATTR
+
+   //! Deallocate buffers allocated by clientContexts
+   void CContext::releaseClientBuffers(void)
+   TRY
+   {
+     client->releaseBuffers();
+     for (int i = 0; i < clientPrimServer.size(); ++i)
+       clientPrimServer[i]->releaseBuffers();
+   }
+   CATCH_DUMP_ATTR
+
+   void CContext::postProcessingGlobalAttributes()
+   TRY
+   {
+     if (allProcessed) return;  
+     
+     // After xml is parsed, there are some more works with post processing
+     postProcessing();
+
+     // Check grid and calculate its distribution
+     checkGridEnabledFields();
+ 
+     // Distribute files between secondary servers according to the data size
+     distributeFiles();
+
+     setClientServerBuffer(client, (hasClient && !hasServer));
+     for (int i = 0; i < clientPrimServer.size(); ++i)
+         setClientServerBuffer(clientPrimServer[i], true);
+
+     if (hasClient)
+     {
+      // Send all attributes of current context to server
+      this->sendAllAttributesToServer();
+
+      // Send all attributes of current calendar
+      CCalendarWrapper::get(CCalendarWrapper::GetDefName())->sendAllAttributesToServer();
+
+      // We have enough information to send to server
+      // First of all, send all enabled files
+      sendEnabledFiles(this->enabledWriteModeFiles);
+      // We only use server-level 1 (for now) to read data
+      if (!hasServer)
+        sendEnabledFiles(this->enabledReadModeFiles);
+
+      // Then, send all enabled fields      
+      sendEnabledFieldsInFiles(this->enabledWriteModeFiles);
+      if (!hasServer)
+        sendEnabledFieldsInFiles(this->enabledReadModeFiles);
+
+      // Then, check whether we have domain_ref, axis_ref or scalar_ref attached to the enabled fields
+      // If any, so send them to server
+       sendRefDomainsAxisScalars(this->enabledWriteModeFiles);
+      if (!hasServer)
+        sendRefDomainsAxisScalars(this->enabledReadModeFiles);        
+
+       // Check whether enabled fields have grid_ref, if any, send this info to server
+      sendRefGrid(this->enabledFiles);
+      // This code may be useful in the future when we want to seperate completely read and write
+      // sendRefGrid(this->enabledWriteModeFiles);
+      // if (!hasServer)
+      //   sendRefGrid(this->enabledReadModeFiles);
+      
+      // A grid of enabled fields composed of several components which must be checked then their
+      // checked attributes should be sent to server
+      sendGridComponentEnabledFieldsInFiles(this->enabledFiles); // This code can be seperated in two (one for reading, another for writing)
+
+       // We have a xml tree on the server side and now, it should be also processed
+      sendPostProcessing();
+       
+      // Finally, we send information of grid itself to server 
+      sendGridEnabledFieldsInFiles(this->enabledWriteModeFiles);       
+      if (!hasServer)
+        sendGridEnabledFieldsInFiles(this->enabledReadModeFiles);       
+     }
+     allProcessed = true;
+   }
+   CATCH_DUMP_ATTR
+
+   void CContext::sendPostProcessingGlobalAttributes()
+   TRY
+   {
+      // Use correct context client to send message
+     // int nbSrvPools = (hasServer) ? clientPrimServer.size() : 1;
+    int nbSrvPools = (this->hasServer) ? (this->hasClient ? this->clientPrimServer.size() : 0) : 1;
+     for (int i = 0; i < nbSrvPools; ++i)
+     {
+       CContextClient* contextClientTmp = (0 != clientPrimServer.size()) ? clientPrimServer[i] : client;
+       CEventClient event(getType(),EVENT_ID_POST_PROCESS_GLOBAL_ATTRIBUTES);
+
+       if (contextClientTmp->isServerLeader())
+       {
+         CMessage msg;
+         if (hasServer)
+           msg<<this->getIdServer(i);
+         else
+           msg<<this->getIdServer();
+         const std::list<int>& ranks = contextClientTmp->getRanksServerLeader();
+         for (std::list<int>::const_iterator itRank = ranks.begin(), itRankEnd = ranks.end(); itRank != itRankEnd; ++itRank)
+           event.push(*itRank,1,msg);
+         contextClientTmp->sendEvent(event);
+       }
+       else contextClientTmp->sendEvent(event);
+     }
+   }
+   CATCH_DUMP_ATTR
+
+   void CContext::recvPostProcessingGlobalAttributes(CEventServer& event)
+   TRY
+   {
+      CBufferIn* buffer=event.subEvents.begin()->buffer;
+      string id;
+      *buffer>>id;
+      get(id)->recvPostProcessingGlobalAttributes(*buffer);
+   }
+   CATCH
+
+   void CContext::recvPostProcessingGlobalAttributes(CBufferIn& buffer)
+   TRY
+   {      
+      postProcessingGlobalAttributes();
+   }
+   CATCH_DUMP_ATTR
+
+   /*!
+   \brief Close all the context defintion and do processing data
+      After everything is well defined on client side, they will be processed and sent to server
+   From the version 2.0, sever and client work no more on the same database. Moreover, client(s) will send
+   all necessary information to server, from which each server can build its own database.
+   Because the role of server is to write out field data on a specific netcdf file,
+   the only information that it needs is the enabled files
+   and the active fields (fields will be written onto active files)
+   */
+
+   void CContext::closeDefinition(void)
+   TRY
+   {
+    CTimer::get("Context : close definition").resume() ;
+    postProcessingGlobalAttributes();
+
+    if (hasClient) sendPostProcessingGlobalAttributes();
+
+    // There are some processings that should be done after all of above. For example: check mask or index
+    this->buildFilterGraphOfEnabledFields();
+    
+     if (hasClient && !hasServer)
+    {
+      buildFilterGraphOfFieldsWithReadAccess();
+      postProcessFilterGraph();
+    }
+    
+    checkGridEnabledFields();   
+
+    if (hasClient) this->sendProcessingGridOfEnabledFields();
+    if (hasClient) this->sendCloseDefinition();
+
+    // Nettoyage de l'arborescence
+    if (hasClient) CleanTree(); // Only on client side??
+
+    if (hasClient)
+    {
+      sendCreateFileHeader();
+      if (!hasServer) startPrefetchingOfEnabledReadModeFiles();
+    }
+    CTimer::get("Context : close definition").suspend() ;
+   }
+   CATCH_DUMP_ATTR
+
+   void CContext::findAllEnabledFieldsInFiles(const std::vector<CFile*>& activeFiles)
+   TRY
+   {
+     for (unsigned int i = 0; i < activeFiles.size(); i++)
+     (void)activeFiles[i]->getEnabledFields();
+   }
+   CATCH_DUMP_ATTR
+
+   void CContext::readAttributesOfEnabledFieldsInReadModeFiles()
+   TRY
+   {
+      for (unsigned int i = 0; i < this->enabledReadModeFiles.size(); ++i)
+        (void)this->enabledReadModeFiles[i]->readAttributesOfEnabledFieldsInReadMode();
+   }
+   CATCH_DUMP_ATTR
+
+   void CContext::sendGridComponentEnabledFieldsInFiles(const std::vector<CFile*>& activeFiles)
+   TRY
+   {
+     int size = activeFiles.size();
+     for (int i = 0; i < size; ++i)
+     {       
+       activeFiles[i]->sendGridComponentOfEnabledFields();
+     }
+   }
+   CATCH_DUMP_ATTR
+
+   /*!
+      Send active (enabled) fields in file from a client to others
+      \param [in] activeFiles files contains enabled fields to send
+   */
+   void CContext::sendGridEnabledFieldsInFiles(const std::vector<CFile*>& activeFiles)
+   TRY
+   {
+     int size = activeFiles.size();
+     for (int i = 0; i < size; ++i)
+     {       
+       activeFiles[i]->sendGridOfEnabledFields();
+     }
+   }
+   CATCH_DUMP_ATTR
+
+   void CContext::checkGridEnabledFields()
+   TRY
+   {
+     int size = enabledFiles.size();
+     for (int i = 0; i < size; ++i)
+     {
+       enabledFiles[i]->checkGridOfEnabledFields();       
+     }
+   }
+   CATCH_DUMP_ATTR
+
+   /*!
+      Check grid of active (enabled) fields in file 
+      \param [in] activeFiles files contains enabled fields whose grid needs checking
+   */
+   void CContext::checkGridEnabledFieldsInFiles(const std::vector<CFile*>& activeFiles)
+   TRY
+   {
+     int size = activeFiles.size();
+     for (int i = 0; i < size; ++i)
+     {
+       activeFiles[i]->checkGridOfEnabledFields();       
+     }
+   }
+   CATCH_DUMP_ATTR
+
+    /*!
+      Go up the hierachical tree via field_ref and do check of attributes of fields
+      This can be done in a client then all computed information will be sent from this client to others
+      \param [in] sendToServer Flag to indicate whether calculated information will be sent
+   */
+   void CContext::solveOnlyRefOfEnabledFields(bool sendToServer)
+   TRY
+   {
+     int size = this->enabledFiles.size();
+     for (int i = 0; i < size; ++i)
+     {
+       this->enabledFiles[i]->solveOnlyRefOfEnabledFields(sendToServer);
+     }
+
+     for (int i = 0; i < size; ++i)
+     {
+       this->enabledFiles[i]->generateNewTransformationGridDest();
+     }
+   }
+   CATCH_DUMP_ATTR
+
+    /*!
+      Go up the hierachical tree via field_ref and do check of attributes of fields.
+      The transformation can be done in this step.
+      All computed information will be sent from this client to others.
+      \param [in] sendToServer Flag to indicate whether calculated information will be sent
+   */
+   void CContext::solveAllRefOfEnabledFieldsAndTransform(bool sendToServer)
+   TRY
+   {
+     int size = this->enabledFiles.size();
+     for (int i = 0; i < size; ++i)
+     {
+       this->enabledFiles[i]->solveAllRefOfEnabledFieldsAndTransform(sendToServer);
+     }
+   }
+   CATCH_DUMP_ATTR
+
+   void CContext::buildFilterGraphOfEnabledFields()
+   TRY
+   {
+     int size = this->enabledFiles.size();
+     for (int i = 0; i < size; ++i)
+     {
+       this->enabledFiles[i]->buildFilterGraphOfEnabledFields(garbageCollector);
+     }
+   }
+   CATCH_DUMP_ATTR
+
+   void CContext::postProcessFilterGraph()
+   TRY
+   {
+     int size = enabledFiles.size();
+     for (int i = 0; i < size; ++i)
+     {
+        enabledFiles[i]->postProcessFilterGraph();
+     }
+   }
+   CATCH_DUMP_ATTR
+
+   void CContext::startPrefetchingOfEnabledReadModeFiles()
+   TRY
+   {
+     int size = enabledReadModeFiles.size();
+     for (int i = 0; i < size; ++i)
+     {
+        enabledReadModeFiles[i]->prefetchEnabledReadModeFields();
+     }
+   }
+   CATCH_DUMP_ATTR
+
+   void CContext::doPreTimestepOperationsForEnabledReadModeFiles()
+   TRY
+   {
+     int size = enabledReadModeFiles.size();
+     for (int i = 0; i < size; ++i)
+     {
+        enabledReadModeFiles[i]->doPreTimestepOperationsForEnabledReadModeFields();
+     }
+   }
+   CATCH_DUMP_ATTR
+
+   void CContext::doPostTimestepOperationsForEnabledReadModeFiles()
+   TRY
+   {
+     int size = enabledReadModeFiles.size();
+     for (int i = 0; i < size; ++i)
+     {
+        enabledReadModeFiles[i]->doPostTimestepOperationsForEnabledReadModeFields();
+     }
+   }
+   CATCH_DUMP_ATTR
+
+  void CContext::findFieldsWithReadAccess(void)
+  TRY
+  {
+    fieldsWithReadAccess.clear();
+    const vector<CField*> allFields = CField::getAll();
+    for (size_t i = 0; i < allFields.size(); ++i)
+    {
+      CField* field = allFields[i];
+
+      if (field->file && !field->file->mode.isEmpty() && field->file->mode == CFile::mode_attr::read)
+        field->read_access = true;
+      else if (!field->read_access.isEmpty() && field->read_access && (field->enabled.isEmpty() || field->enabled))
+        fieldsWithReadAccess.push_back(field);
+    }
+  }
+  CATCH_DUMP_ATTR
+
+  void CContext::solveAllRefOfFieldsWithReadAccess()
+  TRY
+  {
+    for (size_t i = 0; i < fieldsWithReadAccess.size(); ++i)
+      fieldsWithReadAccess[i]->solveAllReferenceEnabledField(false);
+  }
+  CATCH_DUMP_ATTR
+
+  void CContext::buildFilterGraphOfFieldsWithReadAccess()
+  TRY
+  {
+    for (size_t i = 0; i < fieldsWithReadAccess.size(); ++i)
+      fieldsWithReadAccess[i]->buildFilterGraph(garbageCollector, true);
+  }
+  CATCH_DUMP_ATTR
+
+   void CContext::solveAllInheritance(bool apply)
+   TRY
+   {
+     // RÃ©solution des hÃ©ritages descendants (cÃ d des hÃ©ritages de groupes)
+     // pour chacun des contextes.
+      solveDescInheritance(apply);
+
+     // RÃ©solution des hÃ©ritages par rÃ©fÃ©rence au niveau des fichiers.
+      const vector<CFile*> allFiles=CFile::getAll();
+      const vector<CGrid*> allGrids= CGrid::getAll();
+
+      if (hasClient && !hasServer)
+      //if (hasClient)
+      {
+        for (unsigned int i = 0; i < allFiles.size(); i++)
+          allFiles[i]->solveFieldRefInheritance(apply);
+      }
+
+      unsigned int vecSize = allGrids.size();
+      unsigned int i = 0;
+      for (i = 0; i < vecSize; ++i)
+        allGrids[i]->solveDomainAxisRefInheritance(apply);
+
+   }
+  CATCH_DUMP_ATTR
+
+   void CContext::findEnabledFiles(void)
+   TRY
+   {
+      const std::vector<CFile*> allFiles = CFile::getAll();
+      const CDate& initDate = calendar->getInitDate();
+
+      for (unsigned int i = 0; i < allFiles.size(); i++)
+         if (!allFiles[i]->enabled.isEmpty()) // Si l'attribut 'enabled' est dÃ©fini.
+         {
+            if (allFiles[i]->enabled.getValue()) // Si l'attribut 'enabled' est fixÃ© Ã  vrai.
+            {
+              if (allFiles[i]->output_freq.isEmpty())
+              {
+                 ERROR("CContext::findEnabledFiles()",
+                     << "Mandatory attribute output_freq must be defined for file \""<<allFiles[i]->getFileOutputName()
+                     <<" \".")
+              }
+              if ((initDate + allFiles[i]->output_freq.getValue()) < (initDate + this->getCalendar()->getTimeStep()))
+              {
+                error(0)<<"WARNING: void CContext::findEnabledFiles()"<<endl
+                    << "Output frequency in file \""<<allFiles[i]->getFileOutputName()
+                    <<"\" is less than the time step. File will not be written."<<endl;
+              }
+              else
+               enabledFiles.push_back(allFiles[i]);
+            }
+         }
+         else
+         {
+           if (allFiles[i]->output_freq.isEmpty())
+           {
+              ERROR("CContext::findEnabledFiles()",
+                  << "Mandatory attribute output_freq must be defined for file \""<<allFiles[i]->getFileOutputName()
+                  <<" \".")
+           }
+           if ( (initDate + allFiles[i]->output_freq.getValue()) < (initDate + this->getCalendar()->getTimeStep()))
+           {
+             error(0)<<"WARNING: void CContext::findEnabledFiles()"<<endl
+                 << "Output frequency in file \""<<allFiles[i]->getFileOutputName()
+                 <<"\" is less than the time step. File will not be written."<<endl;
+           }
+           else
+             enabledFiles.push_back(allFiles[i]); // otherwise true by default
+         }
+
+      if (enabledFiles.size() == 0)
+         DEBUG(<<"Aucun fichier ne va Ãªtre sorti dans le contexte nommÃ© \""
+               << getId() << "\" !");
+
+   }
+   CATCH_DUMP_ATTR
+
+   void CContext::distributeFiles(void)
+   TRY
+   {
+     bool distFileMemory=false ;
+     distFileMemory=CXios::getin<bool>("server2_dist_file_memory", distFileMemory);
+
+     if (distFileMemory) distributeFileOverMemoryBandwith() ;
+     else distributeFileOverBandwith() ;
+   }
+   CATCH_DUMP_ATTR
+
+   void CContext::distributeFileOverBandwith(void)
+   TRY
+   {
+     double eps=std::numeric_limits<double>::epsilon()*10 ;
+     
+     // If primary server
+     if (hasServer && hasClient)
+     {
+       std::ofstream ofs(("distribute_file_"+getId()+".dat").c_str(), std::ofstream::out);
+       int nbPools = clientPrimServer.size();
+
+       // (1) Find all enabled files in write mode
+       // for (int i = 0; i < this->enabledFiles.size(); ++i)
+       // {
+       //   if (enabledFiles[i]->mode.isEmpty() || (!enabledFiles[i]->mode.isEmpty() && enabledFiles[i]->mode.getValue() == CFile::mode_attr::write ))
+       //    enabledWriteModeFiles.push_back(enabledFiles[i]);
+       // }
+
+       // (2) Estimate the data volume for each file
+       int size = this->enabledWriteModeFiles.size();
+       std::vector<std::pair<double, CFile*> > dataSizeMap;
+       double dataPerPool = 0;
+       int nfield=0 ;
+       ofs<<size<<endl ;
+       for (size_t i = 0; i < size; ++i)
+       {
+         CFile* file = this->enabledWriteModeFiles[i];
+         ofs<<file->getId()<<endl ;
+         StdSize dataSize=0;
+         std::vector<CField*> enabledFields = file->getEnabledFields();
+         size_t numEnabledFields = enabledFields.size();
+         ofs<<numEnabledFields<<endl ;
+         for (size_t j = 0; j < numEnabledFields; ++j)
+         {
+           dataSize += enabledFields[j]->getGlobalWrittenSize() ;
+           ofs<<enabledFields[j]->grid->getId()<<endl ;
+           ofs<<enabledFields[j]->getGlobalWrittenSize()<<endl ;
+         }
+         double outFreqSec = (Time)(calendar->getCurrentDate()+file->output_freq)-(Time)(calendar->getCurrentDate()) ;
+         double dataSizeSec= dataSize/ outFreqSec;
+         ofs<<dataSizeSec<<endl ;
+         nfield++ ;
+// add epsilon*nField to dataSizeSec in order to  preserve reproductive ordering when sorting
+         dataSizeMap.push_back(make_pair(dataSizeSec + dataSizeSec * eps * nfield , file));
+         dataPerPool += dataSizeSec;
+       }
+       dataPerPool /= nbPools;
+       std::sort(dataSizeMap.begin(), dataSizeMap.end());
+
+       // (3) Assign contextClient to each enabled file
+
+       std::multimap<double,int> poolDataSize ;
+// multimap is not garanty to preserve stable sorting in c++98 but it seems it does for c++11
+
+       int j;
+       double dataSize ;
+       for (j = 0 ; j < nbPools ; ++j) poolDataSize.insert(std::pair<double,int>(0.,j)) ;  
+              
+       for (int i = dataSizeMap.size()-1; i >= 0; --i)
+       {
+         dataSize=(*poolDataSize.begin()).first ;
+         j=(*poolDataSize.begin()).second ;
+         dataSizeMap[i].second->setContextClient(clientPrimServer[j]);
+         dataSize+=dataSizeMap[i].first;
+         poolDataSize.erase(poolDataSize.begin()) ;
+         poolDataSize.insert(std::pair<double,int>(dataSize,j)) ; 
+       }
+
+       for (std::multimap<double,int>:: iterator it=poolDataSize.begin() ; it!=poolDataSize.end(); ++it) info(30)<<"Load Balancing for servers (perfect=1) : "<<it->second<<" :  ratio "<<it->first*1./dataPerPool<<endl ;
+ 
+       for (int i = 0; i < this->enabledReadModeFiles.size(); ++i)
+       {
+         enabledReadModeFiles[i]->setContextClient(client);          
+       }
+     }
+     else
+     {
+       for (int i = 0; i < this->enabledFiles.size(); ++i)
+         enabledFiles[i]->setContextClient(client);
+     }
+   }
+   CATCH_DUMP_ATTR
+
+   void CContext::distributeFileOverMemoryBandwith(void)
+   TRY
+   {
+     // If primary server
+     if (hasServer && hasClient)
+     {
+       int nbPools = clientPrimServer.size();
+       double ratio=0.5 ;
+       ratio=CXios::getin<double>("server2_dist_file_memory_ratio", ratio);
+
+       int nFiles = this->enabledWriteModeFiles.size();
+       vector<SDistFile> files(nFiles);
+       vector<SDistGrid> grids;
+       map<string,int> gridMap ;
+       string gridId; 
+       int gridIndex=0 ;
+
+       for (size_t i = 0; i < nFiles; ++i)
+       {
+         StdSize dataSize=0;
+         CFile* file = this->enabledWriteModeFiles[i];
+         std::vector<CField*> enabledFields = file->getEnabledFields();
+         size_t numEnabledFields = enabledFields.size();
+
+         files[i].id_=file->getId() ;
+         files[i].nbGrids_=numEnabledFields;
+         files[i].assignedGrid_ = new int[files[i].nbGrids_] ;
+         
+         for (size_t j = 0; j < numEnabledFields; ++j)
+         {
+           gridId=enabledFields[j]->grid->getId() ;
+           if (gridMap.find(gridId)==gridMap.end())
+           {
+              gridMap[gridId]=gridIndex  ;
+              SDistGrid newGrid; 
+              grids.push_back(newGrid) ;
+              gridIndex++ ;
+           }
+           files[i].assignedGrid_[j]=gridMap[gridId] ;
+           grids[files[i].assignedGrid_[j]].size_=enabledFields[j]->getGlobalWrittenSize() ;
+           dataSize += enabledFields[j]->getGlobalWrittenSize() ; // usefull
+         }
+         double outFreqSec = (Time)(calendar->getCurrentDate()+file->output_freq)-(Time)(calendar->getCurrentDate()) ;
+         files[i].bandwith_= dataSize/ outFreqSec ;
+       }
+
+       double bandwith=0 ;
+       double memory=0 ;
+   
+       for(int i=0; i<nFiles; i++)  bandwith+=files[i].bandwith_ ;
+       for(int i=0; i<nFiles; i++)  files[i].bandwith_ = files[i].bandwith_/bandwith * ratio ;
+
+       for(int i=0; i<grids.size(); i++)  memory+=grids[i].size_ ;
+       for(int i=0; i<grids.size(); i++)  grids[i].size_ = grids[i].size_ / memory * (1.0-ratio) ;
+       
+       distributeFileOverServer2(nbPools, grids.size(), &grids[0], nFiles, &files[0]) ;
+
+       vector<double> memorySize(nbPools,0.) ;
+       vector< set<int> > serverGrids(nbPools) ;
+       vector<double> bandwithSize(nbPools,0.) ;
+       
+       for (size_t i = 0; i < nFiles; ++i)
+       {
+         bandwithSize[files[i].assignedServer_] += files[i].bandwith_* bandwith /ratio ;
+         for(int j=0 ; j<files[i].nbGrids_;j++)
+         {
+           if (serverGrids[files[i].assignedServer_].find(files[i].assignedGrid_[j]) == serverGrids[files[i].assignedServer_].end())
+           {
+             memorySize[files[i].assignedServer_]+= grids[files[i].assignedGrid_[j]].size_ * memory / (1.0-ratio);
+             serverGrids[files[i].assignedServer_].insert(files[i].assignedGrid_[j]) ;
+           }
+         }
+         enabledWriteModeFiles[i]->setContextClient(clientPrimServer[files[i].assignedServer_]) ;
+         delete [] files[i].assignedGrid_ ;
+       }
+
+       for (int i = 0; i < nbPools; ++i) info(100)<<"Pool server level2 "<<i<<"   assigned file bandwith "<<bandwithSize[i]*86400.*4./1024/1024.<<" Mb / days"<<endl ;
+       for (int i = 0; i < nbPools; ++i) info(100)<<"Pool server level2 "<<i<<"   assigned grid memory "<<memorySize[i]*100/1024./1024.<<" Mb"<<endl ;
+
+
+       for (int i = 0; i < this->enabledReadModeFiles.size(); ++i)
+       {
+         enabledReadModeFiles[i]->setContextClient(client);          
+       }
+
+   }
+   else
+   {
+     for (int i = 0; i < this->enabledFiles.size(); ++i)
+        enabledFiles[i]->setContextClient(client);
+   }
+}
+   CATCH_DUMP_ATTR
+
+   /*!
+      Find all files in write mode
+   */
+   void CContext::findEnabledWriteModeFiles(void)
+   TRY
+   {
+     int size = this->enabledFiles.size();
+     for (int i = 0; i < size; ++i)
+     {
+       if (enabledFiles[i]->mode.isEmpty() || 
+          (!enabledFiles[i]->mode.isEmpty() && enabledFiles[i]->mode.getValue() == CFile::mode_attr::write ))
+        enabledWriteModeFiles.push_back(enabledFiles[i]);
+     }
+   }
+   CATCH_DUMP_ATTR
+
+   /*!
+      Find all files in read mode
+   */
+   void CContext::findEnabledReadModeFiles(void)
+   TRY
+   {
+     int size = this->enabledFiles.size();
+     for (int i = 0; i < size; ++i)
+     {
+       if (!enabledFiles[i]->mode.isEmpty() && enabledFiles[i]->mode.getValue() == CFile::mode_attr::read)
+        enabledReadModeFiles.push_back(enabledFiles[i]);
+     }
+   }
+   CATCH_DUMP_ATTR
+
+   void CContext::closeAllFile(void)
+   TRY
+   {
+     std::vector<CFile*>::const_iterator
+            it = this->enabledFiles.begin(), end = this->enabledFiles.end();
+
+     for (; it != end; it++)
+     {
+       info(30)<<"Closing File : "<<(*it)->getId()<<endl;
+       (*it)->close();
+     }
+   }
+   CATCH_DUMP_ATTR
+
+   /*!
+   \brief Dispatch event received from client
+      Whenever a message is received in buffer of server, it will be processed depending on
+   its event type. A new event type should be added in the switch list to make sure
+   it processed on server side.
+   \param [in] event: Received message
+   */
+   bool CContext::dispatchEvent(CEventServer& event)
+   TRY
+   {
+
+      if (SuperClass::dispatchEvent(event)) return true;
+      else
+      {
+        switch(event.type)
+        {
+           case EVENT_ID_CLOSE_DEFINITION :
+             recvCloseDefinition(event);
+             return true;
+             break;
+           case EVENT_ID_UPDATE_CALENDAR:
+             recvUpdateCalendar(event);
+             return true;
+             break;
+           case EVENT_ID_CREATE_FILE_HEADER :
+             recvCreateFileHeader(event);
+             return true;
+             break;
+           case EVENT_ID_POST_PROCESS:
+             recvPostProcessing(event);
+             return true;
+            case EVENT_ID_SEND_REGISTRY:
+             recvRegistry(event);
+             return true;
+             break;
+            case EVENT_ID_POST_PROCESS_GLOBAL_ATTRIBUTES:
+             recvPostProcessingGlobalAttributes(event);
+             return true;
+             break;
+            case EVENT_ID_PROCESS_GRID_ENABLED_FIELDS:
+             recvProcessingGridOfEnabledFields(event);
+             return true;
+             break;
+           default :
+             ERROR("bool CContext::dispatchEvent(CEventServer& event)",
+                    <<"Unknown Event");
+           return false;
+         }
+      }
+   }
+   CATCH
+
+   //! Client side: Send a message to server to make it close
+   void CContext::sendCloseDefinition(void)
+   TRY
+   {
+     // Use correct context client to send message
+     int nbSrvPools = (this->hasServer) ? (this->hasClient ? this->clientPrimServer.size() : 0) : 1;
+     for (int i = 0; i < nbSrvPools; ++i)
+     {
+       CContextClient* contextClientTmp = (hasServer) ? clientPrimServer[i] : client;
+       CEventClient event(getType(),EVENT_ID_CLOSE_DEFINITION);
+       if (contextClientTmp->isServerLeader())
+       {
+         CMessage msg;
+         if (hasServer)
+           msg<<this->getIdServer(i);
+         else
+           msg<<this->getIdServer();
+         const std::list<int>& ranks = contextClientTmp->getRanksServerLeader();
+         for (std::list<int>::const_iterator itRank = ranks.begin(), itRankEnd = ranks.end(); itRank != itRankEnd; ++itRank)
+           event.push(*itRank,1,msg);
+         contextClientTmp->sendEvent(event);
+       }
+       else contextClientTmp->sendEvent(event);
+     }
+   }
+   CATCH_DUMP_ATTR
+
+   //! Server side: Receive a message of client announcing a context close
+   void CContext::recvCloseDefinition(CEventServer& event)
+   TRY
+   {
+      CBufferIn* buffer=event.subEvents.begin()->buffer;
+      string id;
+      *buffer>>id;
+      get(id)->closeDefinition();
+   }
+   CATCH
+
+   //! Client side: Send a message to update calendar in each time step
+   void CContext::sendUpdateCalendar(int step)
+   TRY
+   {
+     // Use correct context client to send message
+    int nbSrvPools = (this->hasServer) ? (this->hasClient ? this->clientPrimServer.size() : 0) : 1;
+     for (int i = 0; i < nbSrvPools; ++i)
+     {
+       CContextClient* contextClientTmp = (hasServer) ? clientPrimServer[i] : client;
+       CEventClient event(getType(),EVENT_ID_UPDATE_CALENDAR);
+
+         if (contextClientTmp->isServerLeader())
+         {
+           CMessage msg;
+           if (hasServer)
+             msg<<this->getIdServer(i)<<step;
+           else
+             msg<<this->getIdServer()<<step;
+           const std::list<int>& ranks = contextClientTmp->getRanksServerLeader();
+           for (std::list<int>::const_iterator itRank = ranks.begin(), itRankEnd = ranks.end(); itRank != itRankEnd; ++itRank)
+             event.push(*itRank,1,msg);
+           contextClientTmp->sendEvent(event);
+         }
+         else contextClientTmp->sendEvent(event);
+     }
+   }
+   CATCH_DUMP_ATTR
+
+   //! Server side: Receive a message of client annoucing calendar update
+   void CContext::recvUpdateCalendar(CEventServer& event)
+   TRY
+   {
+      CBufferIn* buffer=event.subEvents.begin()->buffer;
+      string id;
+      *buffer>>id;
+      get(id)->recvUpdateCalendar(*buffer);
+   }
+   CATCH
+
+   //! Server side: Receive a message of client annoucing calendar update
+   void CContext::recvUpdateCalendar(CBufferIn& buffer)
+   TRY
+   {
+      int step;
+      buffer>>step;
+      updateCalendar(step);
+      if (hasClient && hasServer)
+      {        
+        sendUpdateCalendar(step);
+      }
+   }
+   CATCH_DUMP_ATTR
+
+   //! Client side: Send a message to create header part of netcdf file
+   void CContext::sendCreateFileHeader(void)
+   TRY
+   {
+     // Use correct context client to send message
+     // int nbSrvPools = (hasServer) ? clientPrimServer.size() : 1;
+     int nbSrvPools = (this->hasServer) ? (this->hasClient ? this->clientPrimServer.size() : 0) : 1;
+     for (int i = 0; i < nbSrvPools; ++i)
+     {
+       CContextClient* contextClientTmp = (hasServer) ? clientPrimServer[i] : client;
+       CEventClient event(getType(),EVENT_ID_CREATE_FILE_HEADER);
+
+       if (contextClientTmp->isServerLeader())
+       {
+         CMessage msg;
+         if (hasServer)
+           msg<<this->getIdServer(i);
+         else
+           msg<<this->getIdServer();
+         const std::list<int>& ranks = contextClientTmp->getRanksServerLeader();
+         for (std::list<int>::const_iterator itRank = ranks.begin(), itRankEnd = ranks.end(); itRank != itRankEnd; ++itRank)
+           event.push(*itRank,1,msg) ;
+         contextClientTmp->sendEvent(event);
+       }
+       else contextClientTmp->sendEvent(event);
+     }
+   }
+   CATCH_DUMP_ATTR
+
+   //! Server side: Receive a message of client annoucing the creation of header part of netcdf file
+   void CContext::recvCreateFileHeader(CEventServer& event)
+   TRY
+   {
+      CBufferIn* buffer=event.subEvents.begin()->buffer;
+      string id;
+      *buffer>>id;
+      get(id)->recvCreateFileHeader(*buffer);
+   }
+   CATCH
+
+   //! Server side: Receive a message of client annoucing the creation of header part of netcdf file
+   void CContext::recvCreateFileHeader(CBufferIn& buffer)
+   TRY
+   {
+      if (!hasClient && hasServer) 
+        createFileHeader();
+   }
+   CATCH_DUMP_ATTR
+
+   //! Client side: Send a message to do some post processing on server
+   void CContext::sendProcessingGridOfEnabledFields()
+   TRY
+   {
+      // Use correct context client to send message
+     int nbSrvPools = (this->hasServer) ? (this->hasClient ? this->clientPrimServer.size() : 0) : 1;
+     for (int i = 0; i < nbSrvPools; ++i)
+     {
+       CContextClient* contextClientTmp = (0 != clientPrimServer.size()) ? clientPrimServer[i] : client;
+       CEventClient event(getType(),EVENT_ID_PROCESS_GRID_ENABLED_FIELDS);
+
+       if (contextClientTmp->isServerLeader())
+       {
+         CMessage msg;
+         if (hasServer)
+           msg<<this->getIdServer(i);
+         else
+           msg<<this->getIdServer();
+         const std::list<int>& ranks = contextClientTmp->getRanksServerLeader();
+         for (std::list<int>::const_iterator itRank = ranks.begin(), itRankEnd = ranks.end(); itRank != itRankEnd; ++itRank)
+           event.push(*itRank,1,msg);
+         contextClientTmp->sendEvent(event);
+       }
+       else contextClientTmp->sendEvent(event);
+     }
+   }
+   CATCH_DUMP_ATTR
+
+   //! Server side: Receive a message to do some post processing
+   void CContext::recvProcessingGridOfEnabledFields(CEventServer& event)
+   TRY
+   {
+      CBufferIn* buffer=event.subEvents.begin()->buffer;
+      string id;
+      *buffer>>id;      
+   }
+   CATCH
+
+   //! Client side: Send a message to do some post processing on server
+   void CContext::sendPostProcessing()
+   TRY
+   {
+      // Use correct context client to send message
+     // int nbSrvPools = (hasServer) ? clientPrimServer.size() : 1;
+     int nbSrvPools = (this->hasServer) ? (this->hasClient ? this->clientPrimServer.size() : 0) : 1;
+     for (int i = 0; i < nbSrvPools; ++i)
+     {
+       CContextClient* contextClientTmp = (hasServer) ? clientPrimServer[i] : client;
+       CEventClient event(getType(),EVENT_ID_POST_PROCESS);
+       if (contextClientTmp->isServerLeader())
+       {
+         CMessage msg;
+         if (hasServer)
+           msg<<this->getIdServer(i);
+         else
+           msg<<this->getIdServer();
+         const std::list<int>& ranks = contextClientTmp->getRanksServerLeader();
+         for (std::list<int>::const_iterator itRank = ranks.begin(), itRankEnd = ranks.end(); itRank != itRankEnd; ++itRank)
+         event.push(*itRank,1,msg);
+         contextClientTmp->sendEvent(event);
+       }
+       else contextClientTmp->sendEvent(event);
+     }
+   }
+   CATCH_DUMP_ATTR
+
+   //! Server side: Receive a message to do some post processing
+   void CContext::recvPostProcessing(CEventServer& event)
+   TRY
+   {
+      CBufferIn* buffer=event.subEvents.begin()->buffer;
+      string id;
+      *buffer>>id;
+      get(id)->recvPostProcessing(*buffer);
+   }
+   CATCH
+
+   //! Server side: Receive a message to do some post processing
+   void CContext::recvPostProcessing(CBufferIn& buffer)
+   TRY
+   {
+      CCalendarWrapper::get(CCalendarWrapper::GetDefName())->createCalendar();
+      postProcessing();
+   }
+   CATCH_DUMP_ATTR
+
+   const StdString& CContext::getIdServer()
+   TRY
+   {
+      if (hasClient)
+      {
+        idServer_ = this->getId();
+        idServer_ += "_server";
+        return idServer_;
+      }
+      if (hasServer) return (this->getId());
+   }
+   CATCH_DUMP_ATTR
+
+   const StdString& CContext::getIdServer(const int i)
+   TRY
+   {
+     idServer_ = this->getId();
+     idServer_ += "_server_";
+     idServer_ += std::to_string(static_cast<unsigned long long>(i));
+     return idServer_;
+   }
+   CATCH_DUMP_ATTR
+
+   /*!
+   \brief Do some simple post processings after parsing xml file
+      After the xml file (iodef.xml) is parsed, it is necessary to build all relations among
+   created object, e.g: inhertance among fields, domain, axis. After that, all fiels as well as their parents (reference fields),
+   which will be written out into netcdf files, are processed
+   */
+   void CContext::postProcessing()
+   TRY
+   {
+     if (isPostProcessed) return;
+
+      // Make sure the calendar was correctly created
+      if (!calendar)
+        ERROR("CContext::postProcessing()", << "A calendar must be defined for the context \"" << getId() << "!\"")
+      else if (calendar->getTimeStep() == NoneDu)
+        ERROR("CContext::postProcessing()", << "A timestep must be defined for the context \"" << getId() << "!\"")
+      // Calendar first update to set the current date equals to the start date
+      calendar->update(0);
+
+      // Find all inheritance in xml structure
+      this->solveAllInheritance();
+
+//      ShowTree(info(10));
+
+      // Check if some axis, domains or grids are eligible to for compressed indexed output.
+      // Warning: This must be done after solving the inheritance and before the rest of post-processing
+      checkAxisDomainsGridsEligibilityForCompressedOutput();      
+
+      // Check if some automatic time series should be generated
+      // Warning: This must be done after solving the inheritance and before the rest of post-processing      
+
+      // The timeseries should only be prepared in client
+      if (hasClient && !hasServer) prepareTimeseries();
+
+      //Initialisation du vecteur 'enabledFiles' contenant la liste des fichiers Ã  sortir.
+      findEnabledFiles();
+      findEnabledWriteModeFiles();
+      findEnabledReadModeFiles();
+
+      // For now, only read files with client and only one level server
+      // if (hasClient && !hasServer) findEnabledReadModeFiles();      
+
+      // Find all enabled fields of each file      
+      findAllEnabledFieldsInFiles(this->enabledWriteModeFiles);
+      findAllEnabledFieldsInFiles(this->enabledReadModeFiles);
+
+      // For now, only read files with client and only one level server
+      // if (hasClient && !hasServer) 
+      //   findAllEnabledFieldsInFiles(this->enabledReadModeFiles);      
+
+      if (hasClient && !hasServer)
+      {
+        initReadFiles();
+        // Try to read attributes of fields in file then fill in corresponding grid (or domain, axis)
+        this->readAttributesOfEnabledFieldsInReadModeFiles();
+      }
+
+      // Only search and rebuild all reference objects of enable fields, don't transform
+      this->solveOnlyRefOfEnabledFields(false);
+
+      // Search and rebuild all reference object of enabled fields, and transform
+      this->solveAllRefOfEnabledFieldsAndTransform(false);
+
+      // Find all fields with read access from the public API
+      if (hasClient && !hasServer) findFieldsWithReadAccess();
+      // and solve the all reference for them
+      if (hasClient && !hasServer) solveAllRefOfFieldsWithReadAccess();
+
+      isPostProcessed = true;
+   }
+   CATCH_DUMP_ATTR
+
+   /*!
+    * Compute the required buffer size to send the attributes (mostly those grid related).
+    * \param maxEventSize [in/out] the size of the bigger event for each connected server
+    * \param [in] contextClient
+    * \param [in] bufferForWriting True if buffers are used for sending data for writing
+      This flag is only true for client and server-1 for communication with server-2
+    */
+   std::map<int, StdSize> CContext::getAttributesBufferSize(std::map<int, StdSize>& maxEventSize,
+                                                           CContextClient* contextClient, bool bufferForWriting /*= "false"*/)
+   TRY
+   {
+	 // As calendar attributes are sent even if there are no active files or fields, maps are initialized according the size of calendar attributes
+     std::map<int, StdSize> attributesSize = CCalendarWrapper::get(CCalendarWrapper::GetDefName())->getMinimumBufferSizeForAttributes(contextClient);
+     maxEventSize = CCalendarWrapper::get(CCalendarWrapper::GetDefName())->getMinimumBufferSizeForAttributes(contextClient);
+
+     std::vector<CFile*>& fileList = this->enabledFiles;
+     size_t numEnabledFiles = fileList.size();
+     for (size_t i = 0; i < numEnabledFiles; ++i)
+     {
+//         CFile* file = this->enabledWriteModeFiles[i];
+        CFile* file = fileList[i];
+        std::vector<CField*> enabledFields = file->getEnabledFields();
+        size_t numEnabledFields = enabledFields.size();
+        for (size_t j = 0; j < numEnabledFields; ++j)
+        {
+          const std::map<int, StdSize> mapSize = enabledFields[j]->getGridAttributesBufferSize(contextClient, bufferForWriting);
+          std::map<int, StdSize>::const_iterator it = mapSize.begin(), itE = mapSize.end();
+          for (; it != itE; ++it)
+          {
+		     // If attributesSize[it->first] does not exist, it will be zero-initialized
+		     // so we can use it safely without checking for its existence
+             if (attributesSize[it->first] < it->second)
+			   attributesSize[it->first] = it->second;
+
+		     if (maxEventSize[it->first] < it->second)
+			   maxEventSize[it->first] = it->second;
+          }
+        }
+     }
+     return attributesSize;
+   }
+   CATCH_DUMP_ATTR
+
+   /*!
+    * Compute the required buffer size to send the fields data.
+    * \param maxEventSize [in/out] the size of the bigger event for each connected server
+    * \param [in] contextClient
+    * \param [in] bufferForWriting True if buffers are used for sending data for writing
+      This flag is only true for client and server-1 for communication with server-2
+    */
+   std::map<int, StdSize> CContext::getDataBufferSize(std::map<int, StdSize>& maxEventSize,
+                                                      CContextClient* contextClient, bool bufferForWriting /*= "false"*/)
+   TRY
+   {
+     std::map<int, StdSize> dataSize;
+
+     // Find all reference domain and axis of all active fields
+     std::vector<CFile*>& fileList = bufferForWriting ? this->enabledWriteModeFiles : this->enabledReadModeFiles;
+     size_t numEnabledFiles = fileList.size();
+     for (size_t i = 0; i < numEnabledFiles; ++i)
+     {
+       CFile* file = fileList[i];
+       if (file->getContextClient() == contextClient)
+       {
+         std::vector<CField*> enabledFields = file->getEnabledFields();
+         size_t numEnabledFields = enabledFields.size();
+         for (size_t j = 0; j < numEnabledFields; ++j)
+         {
+           // const std::vector<std::map<int, StdSize> > mapSize = enabledFields[j]->getGridDataBufferSize(contextClient);
+           const std::map<int, StdSize> mapSize = enabledFields[j]->getGridDataBufferSize(contextClient,bufferForWriting);
+           std::map<int, StdSize>::const_iterator it = mapSize.begin(), itE = mapSize.end();
+           for (; it != itE; ++it)
+           {
+             // If dataSize[it->first] does not exist, it will be zero-initialized
+             // so we can use it safely without checking for its existance
+        	 if (CXios::isOptPerformance)
+               dataSize[it->first] += it->second;
+             else if (dataSize[it->first] < it->second)
+               dataSize[it->first] = it->second;
+
+        	 if (maxEventSize[it->first] < it->second)
+               maxEventSize[it->first] = it->second;
+           }
+         }
+       }
+     }
+     return dataSize;
+   }
+   CATCH_DUMP_ATTR
+
+   //! Client side: Send infomation of active files (files are enabled to write out)
+   void CContext::sendEnabledFiles(const std::vector<CFile*>& activeFiles)
+   TRY
+   {
+     int size = activeFiles.size();
+
+     // In a context, each type has a root definition, e.g: axis, domain, field.
+     // Every object must be a child of one of these root definition. In this case
+     // all new file objects created on server must be children of the root "file_definition"
+     StdString fileDefRoot("file_definition");
+     CFileGroup* cfgrpPtr = CFileGroup::get(fileDefRoot);
+
+     for (int i = 0; i < size; ++i)
+     {
+       CFile* f = activeFiles[i];
+       cfgrpPtr->sendCreateChild(f->getId(),f->getContextClient());
+       f->sendAllAttributesToServer(f->getContextClient());
+       f->sendAddAllVariables(f->getContextClient());
+     }
+   }
+   CATCH_DUMP_ATTR
+
+   //! Client side: Send information of active fields (ones are written onto files)
+   void CContext::sendEnabledFieldsInFiles(const std::vector<CFile*>& activeFiles)
+   TRY
+   {
+     int size = activeFiles.size();
+     for (int i = 0; i < size; ++i)
+     {
+       activeFiles[i]->sendEnabledFields(activeFiles[i]->getContextClient());
+     }
+   }
+   CATCH_DUMP_ATTR
+
+   //! Client side: Check if the defined axis, domains and grids are eligible for compressed indexed output
+   void CContext::checkAxisDomainsGridsEligibilityForCompressedOutput()
+   TRY
+   {
+     if (!hasClient) return;
+
+     const vector<CAxis*> allAxis = CAxis::getAll();
+     for (vector<CAxis*>::const_iterator it = allAxis.begin(); it != allAxis.end(); it++)
+       (*it)->checkEligibilityForCompressedOutput();
+
+     const vector<CDomain*> allDomains = CDomain::getAll();
+     for (vector<CDomain*>::const_iterator it = allDomains.begin(); it != allDomains.end(); it++)
+       (*it)->checkEligibilityForCompressedOutput();
+
+     const vector<CGrid*> allGrids = CGrid::getAll();
+     for (vector<CGrid*>::const_iterator it = allGrids.begin(); it != allGrids.end(); it++)
+       (*it)->checkEligibilityForCompressedOutput();
+   }
+   CATCH_DUMP_ATTR
+
+   //! Client side: Prepare the timeseries by adding the necessary files
+   void CContext::prepareTimeseries()
+   TRY
+   {
+     if (!hasClient) return;
+
+     const std::vector<CFile*> allFiles = CFile::getAll();
+     for (size_t i = 0; i < allFiles.size(); i++)
+     {
+       CFile* file = allFiles[i];
+
+       std::vector<CVariable*> fileVars, fieldVars, vars = file->getAllVariables();
+       for (size_t k = 0; k < vars.size(); k++)
+       {
+         CVariable* var = vars[k];
+
+         if (var->ts_target.isEmpty()
+              || var->ts_target == CVariable::ts_target_attr::file || var->ts_target == CVariable::ts_target_attr::both)
+           fileVars.push_back(var);
+
+         if (!var->ts_target.isEmpty()
+              && (var->ts_target == CVariable::ts_target_attr::field || var->ts_target == CVariable::ts_target_attr::both))
+           fieldVars.push_back(var);
+       }
+
+       if (!file->timeseries.isEmpty() && file->timeseries != CFile::timeseries_attr::none)
+       {
+         StdString fileNameStr("%file_name%") ;
+         StdString tsPrefix = !file->ts_prefix.isEmpty() ? file->ts_prefix : fileNameStr ;
+         
+         StdString fileName=file->getFileOutputName();
+         size_t pos=tsPrefix.find(fileNameStr) ;
+         while (pos!=std::string::npos)
+         {
+           tsPrefix=tsPrefix.replace(pos,fileNameStr.size(),fileName) ;
+           pos=tsPrefix.find(fileNameStr) ;
+         }
+        
+         const std::vector<CField*> allFields = file->getAllFields();
+         for (size_t j = 0; j < allFields.size(); j++)
+         {
+           CField* field = allFields[j];
+
+           if (!field->ts_enabled.isEmpty() && field->ts_enabled)
+           {
+             CFile* tsFile = CFile::create();
+             tsFile->duplicateAttributes(file);
+
+             // Add variables originating from file and targeted to timeserie file
+             for (size_t k = 0; k < fileVars.size(); k++)
+               tsFile->getVirtualVariableGroup()->addChild(fileVars[k]);
+
+            
+             tsFile->name = tsPrefix + "_";
+             if (!field->name.isEmpty())
+               tsFile->name.get() += field->name;
+             else if (field->hasDirectFieldReference()) // We cannot use getBaseFieldReference() just yet
+               tsFile->name.get() += field->field_ref;
+             else
+               tsFile->name.get() += field->getId();
+
+             if (!field->ts_split_freq.isEmpty())
+               tsFile->split_freq = field->ts_split_freq;
+
+             CField* tsField = tsFile->addField();
+             tsField->field_ref = field->getId();
+
+             // Add variables originating from file and targeted to timeserie field
+             for (size_t k = 0; k < fieldVars.size(); k++)
+               tsField->getVirtualVariableGroup()->addChild(fieldVars[k]);
+
+             vars = field->getAllVariables();
+             for (size_t k = 0; k < vars.size(); k++)
+             {
+               CVariable* var = vars[k];
+
+               // Add variables originating from field and targeted to timeserie field
+               if (var->ts_target.isEmpty()
+                    || var->ts_target == CVariable::ts_target_attr::field || var->ts_target == CVariable::ts_target_attr::both)
+                 tsField->getVirtualVariableGroup()->addChild(var);
+
+               // Add variables originating from field and targeted to timeserie file
+               if (!var->ts_target.isEmpty()
+                    && (var->ts_target == CVariable::ts_target_attr::file || var->ts_target == CVariable::ts_target_attr::both))
+                 tsFile->getVirtualVariableGroup()->addChild(var);
+             }
+
+             tsFile->solveFieldRefInheritance(true);
+
+             if (file->timeseries == CFile::timeseries_attr::exclusive)
+               field->enabled = false;
+           }
+         }
+
+         // Finally disable the original file is need be
+         if (file->timeseries == CFile::timeseries_attr::only)
+          file->enabled = false;
+       }
+     }
+   }
+   CATCH_DUMP_ATTR
+
+   //! Client side: Send information of reference grid of active fields
+   void CContext::sendRefGrid(const std::vector<CFile*>& activeFiles)
+   TRY
+   {
+     std::set<StdString> gridIds;
+     int sizeFile = activeFiles.size();
+     CFile* filePtr(NULL);
+
+     // Firstly, find all reference grids of all active fields
+     for (int i = 0; i < sizeFile; ++i)
+     {
+       filePtr = activeFiles[i];
+       std::vector<CField*> enabledFields = filePtr->getEnabledFields();
+       int sizeField = enabledFields.size();
+       for (int numField = 0; numField < sizeField; ++numField)
+       {
+         if (0 != enabledFields[numField]->getRelGrid())
+           gridIds.insert(CGrid::get(enabledFields[numField]->getRelGrid())->getId());
+       }
+     }
+
+     // Create all reference grids on server side
+     StdString gridDefRoot("grid_definition");
+     CGridGroup* gridPtr = CGridGroup::get(gridDefRoot);
+     std::set<StdString>::const_iterator it, itE = gridIds.end();
+     for (it = gridIds.begin(); it != itE; ++it)
+     {
+       gridPtr->sendCreateChild(*it);
+       CGrid::get(*it)->sendAllAttributesToServer();
+       CGrid::get(*it)->sendAllDomains();
+       CGrid::get(*it)->sendAllAxis();
+       CGrid::get(*it)->sendAllScalars();
+     }
+   }
+   CATCH_DUMP_ATTR
+
+   //! Client side: Send information of reference domain, axis and scalar of active fields
+   void CContext::sendRefDomainsAxisScalars(const std::vector<CFile*>& activeFiles)
+   TRY
+   {
+     std::set<StdString> domainIds, axisIds, scalarIds;
+
+     // Find all reference domain and axis of all active fields
+     int numEnabledFiles = activeFiles.size();
+     for (int i = 0; i < numEnabledFiles; ++i)
+     {
+       std::vector<CField*> enabledFields = activeFiles[i]->getEnabledFields();
+       int numEnabledFields = enabledFields.size();
+       for (int j = 0; j < numEnabledFields; ++j)
+       {
+         const std::vector<StdString>& prDomAxisScalarId = enabledFields[j]->getRefDomainAxisIds();
+         if ("" != prDomAxisScalarId[0]) domainIds.insert(prDomAxisScalarId[0]);
+         if ("" != prDomAxisScalarId[1]) axisIds.insert(prDomAxisScalarId[1]);
+         if ("" != prDomAxisScalarId[2]) scalarIds.insert(prDomAxisScalarId[2]);
+       }
+     }
+
+     // Create all reference axis on server side
+     std::set<StdString>::iterator itDom, itAxis, itScalar;
+     std::set<StdString>::const_iterator itE;
+
+     StdString scalarDefRoot("scalar_definition");
+     CScalarGroup* scalarPtr = CScalarGroup::get(scalarDefRoot);
+     itE = scalarIds.end();
+     for (itScalar = scalarIds.begin(); itScalar != itE; ++itScalar)
+     {
+       if (!itScalar->empty())
+       {
+         scalarPtr->sendCreateChild(*itScalar);
+         CScalar::get(*itScalar)->sendAllAttributesToServer();
+       }
+     }
+
+     StdString axiDefRoot("axis_definition");
+     CAxisGroup* axisPtr = CAxisGroup::get(axiDefRoot);
+     itE = axisIds.end();
+     for (itAxis = axisIds.begin(); itAxis != itE; ++itAxis)
+     {
+       if (!itAxis->empty())
+       {
+         axisPtr->sendCreateChild(*itAxis);
+         CAxis::get(*itAxis)->sendAllAttributesToServer();
+       }
+     }
+
+     // Create all reference domains on server side
+     StdString domDefRoot("domain_definition");
+     CDomainGroup* domPtr = CDomainGroup::get(domDefRoot);
+     itE = domainIds.end();
+     for (itDom = domainIds.begin(); itDom != itE; ++itDom)
+     {
+       if (!itDom->empty()) {
+          domPtr->sendCreateChild(*itDom);
+          CDomain::get(*itDom)->sendAllAttributesToServer();
+       }
+     }
+   }
+   CATCH_DUMP_ATTR
+
+   //! Update calendar in each time step
+   void CContext::updateCalendar(int step)
+   TRY
+   {
+      int prevStep = calendar->getStep();
+
+      if (prevStep < step)
+      {
+        if (hasClient && !hasServer) // For now we only use server level 1 to read data
+        {
+          doPreTimestepOperationsForEnabledReadModeFiles();
+        }
+
+        info(50) << "updateCalendar : before : " << calendar->getCurrentDate() << endl;
+        calendar->update(step);
+        info(50) << "updateCalendar : after : " << calendar->getCurrentDate() << endl;
+  #ifdef XIOS_MEMTRACK_LIGHT
+        info(50) << " Current memory used by XIOS : "<<  MemTrack::getCurrentMemorySize()*1.0/(1024*1024)<<" Mbyte, at timestep "<<step<<" of context "<<this->getId()<<endl ;
+  #endif
+
+        if (hasClient && !hasServer) // For now we only use server level 1 to read data
+        {
+          doPostTimestepOperationsForEnabledReadModeFiles();
+          garbageCollector.invalidate(calendar->getCurrentDate());
+        }
+      }
+      else if (prevStep == step)
+        info(50) << "updateCalendar: already at step " << step << ", no operation done." << endl;
+      else // if (prevStep > step)
+        ERROR("void CContext::updateCalendar(int step)",
+              << "Illegal calendar update: previous step was " << prevStep << ", new step " << step << "is in the past!")
+   }
+   CATCH_DUMP_ATTR
+
+   void CContext::initReadFiles(void)
+   TRY
+   {
+      vector<CFile*>::const_iterator it;
+
+      for (it=enabledReadModeFiles.begin(); it != enabledReadModeFiles.end(); it++)
+      {
+         (*it)->initRead();
+      }
+   }
+   CATCH_DUMP_ATTR
+
+   //! Server side: Create header of netcdf file
+   void CContext::createFileHeader(void)
+   TRY
+   {
+      vector<CFile*>::const_iterator it;
+
+      for (it=enabledFiles.begin(); it != enabledFiles.end(); it++)
+      // for (it=enabledWriteModeFiles.begin(); it != enabledWriteModeFiles.end(); it++)
+      {
+         (*it)->initWrite();
+      }
+   }
+   CATCH_DUMP_ATTR
+
+   //! Get current context
+   CContext* CContext::getCurrent(void)
+   TRY
+   {
+     return CObjectFactory::GetObject<CContext>(CObjectFactory::GetCurrentContextId()).get();
+   }
+   CATCH
+
+   /*!
+   \brief Set context with an id be the current context
+   \param [in] id identity of context to be set to current
+   */
+   void CContext::setCurrent(const string& id)
+   TRY
+   {
+     CObjectFactory::SetCurrentContextId(id);
+     CGroupFactory::SetCurrentContextId(id);
+   }
+   CATCH
+
+  /*!
+  \brief Create a context with specific id
+  \param [in] id identity of new context
+  \return pointer to the new context or already-existed one with identity id
+  */
+  CContext* CContext::create(const StdString& id)
+  TRY
+  {
+    CContext::setCurrent(id);
+
+    bool hasctxt = CContext::has(id);
+    CContext* context = CObjectFactory::CreateObject<CContext>(id).get();
+    getRoot();
+    if (!hasctxt) CGroupFactory::AddChild(root, context->getShared());
+
+#define DECLARE_NODE(Name_, name_) \
+    C##Name_##Definition::create(C##Name_##Definition::GetDefName());
+#define DECLARE_NODE_PAR(Name_, name_)
+#include "node_type.conf"
+
+    return (context);
+  }
+  CATCH
+
+     //! Server side: Receive a message to do some post processing
+  void CContext::recvRegistry(CEventServer& event)
+  TRY
+  {
+    CBufferIn* buffer=event.subEvents.begin()->buffer;
+    string id;
+    *buffer>>id;
+    get(id)->recvRegistry(*buffer);
+  }
+  CATCH
+
+  void CContext::recvRegistry(CBufferIn& buffer)
+  TRY
+  {
+    if (server->intraCommRank==0)
+    {
+      CRegistry registry(server->intraComm) ;
+      registry.fromBuffer(buffer) ;
+      registryOut->mergeRegistry(registry) ;
+    }
+  }
+  CATCH_DUMP_ATTR
+
+  void CContext::sendRegistry(void)
+  TRY
+  {
+    registryOut->hierarchicalGatherRegistry() ;
+
+    // Use correct context client to send message
+    int nbSrvPools = (this->hasServer) ? (this->hasClient ? this->clientPrimServer.size() : 0) : 1;
+    for (int i = 0; i < nbSrvPools; ++i)
+    {
+      CContextClient* contextClientTmp = (hasServer) ? clientPrimServer[i] : client;
+      CEventClient event(CContext::GetType(), CContext::EVENT_ID_SEND_REGISTRY);
+        if (contextClientTmp->isServerLeader())
+        {
+           CMessage msg ;
+           if (hasServer)
+             msg<<this->getIdServer(i);
+           else
+             msg<<this->getIdServer();
+           if (contextClientTmp->clientRank==0) msg<<*registryOut ;
+           const std::list<int>& ranks = contextClientTmp->getRanksServerLeader();
+           for (std::list<int>::const_iterator itRank = ranks.begin(), itRankEnd = ranks.end(); itRank != itRankEnd; ++itRank)
+             event.push(*itRank,1,msg);
+           contextClientTmp->sendEvent(event);
+         }
+         else contextClientTmp->sendEvent(event);
+    }
+  }
+  CATCH_DUMP_ATTR
+
+  /*!
+  * \fn bool CContext::isFinalized(void)
+  * Context is finalized if it received context post finalize event.
+  */
+  bool CContext::isFinalized(void)
+  TRY
+  {
+    return finalized;
+  }
+  CATCH_DUMP_ATTR
+  ///--------------------------------------------------------------
+  StdString CContext::dumpClassAttributes(void)
+  {
+    StdString str;
+    str.append("enabled files=\"");
+    int size = this->enabledFiles.size();
+    for (int i = 0; i < size; ++i)
+    {
+      str.append(enabledFiles[i]->getId());
+      str.append(" ");
+    }
+    str.append("\"");
+    return str;
+  }
+
+} // namespace xios
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/node/context.hpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/node/context.hpp	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/node/context.hpp	(revision 1749)
@@ -0,0 +1,281 @@
+#ifndef __XIOS_CContext__
+#define __XIOS_CContext__
+
+/// XIOS headers ///
+#include "xios_spl.hpp"
+//#include "node_type.hpp"
+#include "calendar_wrapper.hpp"
+
+#include "declare_group.hpp"
+#include "data_output.hpp"
+#include "garbage_collector.hpp"
+#include "registry.hpp"
+#include "mpi.hpp"
+
+
+namespace xios {
+   class CContextClient;
+   class CContextServer;
+
+
+   /// ////////////////////// DÃ©clarations ////////////////////// ///
+   class CContextGroup;
+   class CContextAttributes;
+   class CContext;
+   class CFile;
+   ///--------------------------------------------------------------
+
+   // Declare/Define CFileAttribute
+   BEGIN_DECLARE_ATTRIBUTE_MAP(CContext)
+#  include "context_attribute.conf"
+   END_DECLARE_ATTRIBUTE_MAP(CContext)
+
+   ///--------------------------------------------------------------
+  /*!
+  \class CContext
+   This class corresponds to the concrete presentation of context in xml file and in play an essential role in XIOS
+   Each object of this class contains all root definition of elements: files, fiels, domains, axis, etc, ... from which
+   we can have access to each element.
+   In fact, every thing must a be inside a particuliar context. After the xml file (iodef.xml) is parsed,
+   object of the class is created and its contains all information of other elements in the xml file.
+  */
+   class CContext
+      : public CObjectTemplate<CContext>
+      , public CContextAttributes
+   {
+         public :
+         enum EEventId
+         {
+           EVENT_ID_CLOSE_DEFINITION,EVENT_ID_UPDATE_CALENDAR,
+           EVENT_ID_CREATE_FILE_HEADER,EVENT_ID_CONTEXT_FINALIZE,
+           EVENT_ID_POST_PROCESS, EVENT_ID_SEND_REGISTRY,
+           EVENT_ID_POST_PROCESS_GLOBAL_ATTRIBUTES,
+           EVENT_ID_PROCESS_GRID_ENABLED_FIELDS
+         };
+
+         /// typedef ///
+         typedef CObjectTemplate<CContext>   SuperClass;
+         typedef CContextAttributes SuperClassAttribute;
+
+      public :
+
+         typedef CContextAttributes RelAttributes;
+         typedef CContext           RelGroup;
+
+         //---------------------------------------------------------
+
+      public :
+
+         /// Constructeurs ///
+         CContext(void);
+         explicit CContext(const StdString & id);
+         CContext(const CContext & context);       // Not implemented yet.
+         CContext(const CContext * const context); // Not implemented yet.
+
+         /// Destructeur ///
+         virtual ~CContext(void);
+
+         //---------------------------------------------------------
+
+      public :
+
+         /// Mutateurs ///
+         void setCalendar(std::shared_ptr<CCalendar> newCalendar);
+
+         /// Accesseurs ///
+         std::shared_ptr<CCalendar>      getCalendar(void) const;
+
+      public :
+         // Initialize server or client
+         void initClient(MPI_Comm intraComm, MPI_Comm interComm, CContext* cxtServer = 0);
+         void initServer(MPI_Comm intraComm, MPI_Comm interComm, CContext* cxtClient = 0);
+         bool isInitialized(void);
+
+         StdString dumpClassAttributes(void);
+
+         // Put sever or client into loop state
+         bool checkBuffersAndListen(bool enableEventsProcessing=true);
+
+         // Finalize a context
+         void finalize(void);
+         bool isFinalized(void);
+
+         void closeDefinition(void);
+
+         // Some functions to process context
+         void findAllEnabledFieldsInFiles(const std::vector<CFile*>& activeFiles);
+         // void findAllEnabledFields(void);
+         // void findAllEnabledFieldsInReadModeFiles(void);
+         void readAttributesOfEnabledFieldsInReadModeFiles();
+         void solveAllInheritance(bool apply=true);
+         void findEnabledFiles(void);
+         void findEnabledWriteModeFiles(void);
+         void findEnabledReadModeFiles(void);
+         void closeAllFile(void);
+         void updateCalendar(int step);
+         void createFileHeader(void);
+         void initReadFiles(void);
+         void checkAxisDomainsGridsEligibilityForCompressedOutput();
+         void prepareTimeseries(void);
+         void solveOnlyRefOfEnabledFields(bool sendToServer);         
+         void buildFilterGraphOfEnabledFields();
+         void postProcessFilterGraph();
+         void startPrefetchingOfEnabledReadModeFiles();
+         void doPreTimestepOperationsForEnabledReadModeFiles();
+         void doPostTimestepOperationsForEnabledReadModeFiles();
+         void findFieldsWithReadAccess(void);
+         void solveAllRefOfFieldsWithReadAccess();
+         void buildFilterGraphOfFieldsWithReadAccess();
+         void postProcessing();
+         void postProcessingGlobalAttributes();         
+
+         void solveAllRefOfEnabledFieldsAndTransform(bool sendToServer);
+         void checkGridEnabledFields();
+         void checkGridEnabledFieldsInFiles(const std::vector<CFile*>& activeFiles);
+         void sendGridEnabledFieldsInFiles(const std::vector<CFile*>& activeFiles);  
+         void sendGridComponentEnabledFieldsInFiles(const std::vector<CFile*>& activeFiles)       ;
+
+         std::map<int, StdSize> getAttributesBufferSize(std::map<int, StdSize>& maxEventSize, CContextClient* contextClient, bool bufferForWriting = false);
+         std::map<int, StdSize> getDataBufferSize(std::map<int, StdSize>& maxEventSize, CContextClient* contextClient, bool bufferForWriting = false);
+         void setClientServerBuffer(CContextClient* contextClient, bool bufferForWriting = false);
+
+         // Distribute files (in write mode) among secondary-server pools according to the estimated data flux
+         void distributeFiles(void);
+         void distributeFileOverBandwith() ;
+         void distributeFileOverMemoryBandwith() ;
+         
+         // Send context close definition
+         void sendCloseDefinition(void);
+         // There are something to send on closing context defintion
+         void sendUpdateCalendar(int step);
+         void sendCreateFileHeader(void);
+         void sendEnabledFiles(const std::vector<CFile*>& activeFiles);
+         void sendEnabledFieldsInFiles(const std::vector<CFile*>& activeFiles);
+         void sendRefDomainsAxisScalars(const std::vector<CFile*>& activeFiles);
+         void sendRefGrid(const std::vector<CFile*>& activeFiles);
+         void sendPostProcessing();
+         void sendPostProcessingGlobalAttributes();
+         void sendProcessingGridOfEnabledFields();
+         //!< after be gathered to the root process of the context, merged registry is sent to the root process of the servers
+         void sendRegistry(void) ;
+
+         const StdString& getIdServer();
+         const StdString& getIdServer(const int srvPoolNb);
+
+         // Client side: Receive and process messages
+         static void recvUpdateCalendar(CEventServer& event);
+         void recvUpdateCalendar(CBufferIn& buffer);
+         static void recvCloseDefinition(CEventServer& event);
+         static void recvCreateFileHeader(CEventServer& event);
+         void recvCreateFileHeader(CBufferIn& buffer);
+         static void recvSolveInheritanceContext(CEventServer& event);
+         void recvSolveInheritanceContext(CBufferIn& buffer);
+         static void recvPostProcessing(CEventServer& event);
+         void recvPostProcessing(CBufferIn& buffer);
+         static void recvProcessingGridOfEnabledFields(CEventServer& event);
+         static void recvPostProcessingGlobalAttributes(CEventServer& event);
+         void recvPostProcessingGlobalAttributes(CBufferIn& buffer);
+         static void recvRegistry(CEventServer& event) ;
+         void recvRegistry(CBufferIn& buffer) ; //!< registry is received by the servers
+
+         void freeComms(void);                  //!< Free internally allcoated communicators
+         void releaseClientBuffers(void);       //! Deallocate buffers allocated by clientContexts
+
+         // dispatch event
+         static bool dispatchEvent(CEventServer& event);
+
+      public:
+        // Get current context
+        static CContext* getCurrent(void);
+
+        // Get context root
+        static CContextGroup* getRoot(void);
+
+        // Set current context
+        static void setCurrent(const string& id);
+
+        // Create new context
+        static CContext* create(const string& id = "");
+
+        /// Accesseurs statiques ///
+        static StdString GetName(void);
+        static StdString GetDefName(void);
+        static ENodeType GetType(void);
+
+        static CContextGroup* GetContextGroup(void);
+
+        // Some functions to visualize structure of current context
+        static void ShowTree(StdOStream & out = std::clog);
+        static void CleanTree(void);
+
+      public :
+         // Parse xml node and write all info into context
+         virtual void parse(xml::CXMLNode & node);
+
+         // Visualize a context
+         virtual StdString toString(void) const;
+
+
+         // Solve all inheritance relation in current context
+         virtual void solveDescInheritance(bool apply, const CAttributeMap * const parent = 0);
+
+         // Verify if all root definition in a context have children
+         virtual bool hasChild(void) const;
+
+
+      public :
+         // Calendar of context
+         std::shared_ptr<CCalendar>   calendar;
+
+         // List of all enabled files (files on which fields are written or read)
+         std::vector<CFile*> enabledFiles;
+         // List of all enabled files in read mode (files on which fields are read)
+         std::vector<CFile*> enabledReadModeFiles;
+         // List of all enabled files in write mode
+         std::vector<CFile*> enabledWriteModeFiles;
+
+         // List of all enabled fields whose instant data is accessible from the public API
+         // but which are not part of a file
+         std::vector<CField*> fieldsWithReadAccess;
+
+         // Context root
+         static std::shared_ptr<CContextGroup> root;
+
+         // Determine context on client or not
+         bool hasClient;
+
+         // Determine context on server or not
+         bool hasServer;
+
+         CContextServer* server;    //!< Concrete context server
+         CContextClient* client;    //!< Concrete contex client
+         std::vector<CContextServer*> serverPrimServer;
+         std::vector<CContextClient*> clientPrimServer;
+
+         CRegistry* registryIn ;    //!< input registry which is read from file
+         CRegistry* registryOut ;   //!< output registry which will be written into file at the finalize
+
+      private:
+         bool isPostProcessed;
+         bool allProcessed;
+         bool finalized;
+         int countChildCtx_;        //!< Counter of child contexts (for now it is the number of secondary server pools)
+         StdString idServer_;
+         CGarbageCollector garbageCollector;
+         std::list<MPI_Comm> comms; //!< Communicators allocated internally
+
+      public: // Some function maybe removed in the near future
+        // virtual void toBinary  (StdOStream & os) const;
+        // virtual void fromBinary(StdIStream & is);
+   }; // class CContext
+
+   ///--------------------------------------------------------------
+
+   // Declare/Define CContextGroup and CContextDefinition
+   DECLARE_GROUP(CContext);
+
+   ///--------------------------------------------------------------
+
+} // namespace xios
+
+#endif // __XIOS_CContext__
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/node/domain.cpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/node/domain.cpp	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/node/domain.cpp	(revision 1749)
@@ -0,0 +1,3100 @@
+#include "domain.hpp"
+
+#include "attribute_template.hpp"
+#include "object_template.hpp"
+#include "group_template.hpp"
+
+#include "xios_spl.hpp"
+#include "event_client.hpp"
+#include "event_server.hpp"
+#include "buffer_in.hpp"
+#include "message.hpp"
+#include "type.hpp"
+#include "context.hpp"
+#include "context_client.hpp"
+#include "context_server.hpp"
+#include "array_new.hpp"
+#include "distribution_client.hpp"
+#include "server_distribution_description.hpp"
+#include "client_server_mapping_distributed.hpp"
+
+#include <algorithm>
+
+namespace xios {
+
+   /// ////////////////////// DÃ©finitions ////////////////////// ///
+
+   CDomain::CDomain(void)
+      : CObjectTemplate<CDomain>(), CDomainAttributes()
+      , isChecked(false), relFiles(), isClientChecked(false), nbSenders(), indSrv_(), connectedServerRank_()
+      , hasBounds(false), hasArea(false), isCompressible_(false), isUnstructed_(false)
+      , isClientAfterTransformationChecked(false), hasLonLat(false)
+      , isRedistributed_(false), hasPole(false)
+      , lonvalue(), latvalue(), bounds_lonvalue(), bounds_latvalue()
+      , globalLocalIndexMap_(), computedWrittenIndex_(false)
+      , clients(), hasLatInReadFile_(false), hasBoundsLatInReadFile_(false)
+      , hasLonInReadFile_(false), hasBoundsLonInReadFile_(false)
+   {
+   }
+
+   CDomain::CDomain(const StdString & id)
+      : CObjectTemplate<CDomain>(id), CDomainAttributes()
+      , isChecked(false), relFiles(), isClientChecked(false), nbSenders(), indSrv_(), connectedServerRank_() 
+      , hasBounds(false), hasArea(false), isCompressible_(false), isUnstructed_(false)
+      , isClientAfterTransformationChecked(false), hasLonLat(false)
+      , isRedistributed_(false), hasPole(false)
+      , lonvalue(), latvalue(), bounds_lonvalue(), bounds_latvalue()
+      , globalLocalIndexMap_(), computedWrittenIndex_(false)
+      , clients(), hasLatInReadFile_(false), hasBoundsLatInReadFile_(false)
+      , hasLonInReadFile_(false), hasBoundsLonInReadFile_(false)
+   {
+    }
+
+   CDomain::~CDomain(void)
+   {
+   }
+
+   ///---------------------------------------------------------------
+
+   void CDomain::assignMesh(const StdString meshName, const int nvertex)
+   TRY
+   {
+     mesh = CMesh::getMesh(meshName, nvertex);
+   }
+   CATCH_DUMP_ATTR
+
+   CDomain* CDomain::createDomain()
+   TRY
+   {
+     CDomain* domain = CDomainGroup::get("domain_definition")->createChild();
+     return domain;
+   }
+   CATCH
+
+   std::map<StdString, ETranformationType> CDomain::transformationMapList_ = std::map<StdString, ETranformationType>();
+   bool CDomain::_dummyTransformationMapList = CDomain::initializeTransformationMap(CDomain::transformationMapList_);
+
+   bool CDomain::initializeTransformationMap(std::map<StdString, ETranformationType>& m)
+   TRY
+   {
+     m["zoom_domain"] = TRANS_ZOOM_DOMAIN;
+     m["interpolate_domain"] = TRANS_INTERPOLATE_DOMAIN;
+     m["generate_rectilinear_domain"] = TRANS_GENERATE_RECTILINEAR_DOMAIN;
+     m["compute_connectivity_domain"] = TRANS_COMPUTE_CONNECTIVITY_DOMAIN;
+     m["expand_domain"] = TRANS_EXPAND_DOMAIN;
+     m["reorder_domain"] = TRANS_REORDER_DOMAIN;
+     m["extract_domain"] = TRANS_EXTRACT_DOMAIN;
+   }
+   CATCH
+
+   const std::set<StdString> & CDomain::getRelFiles(void) const
+   TRY
+   {
+      return (this->relFiles);
+   }
+   CATCH
+
+   /*!
+     Returns the number of indexes written by each server.
+     \return the number of indexes written by each server
+   */
+   int CDomain::getNumberWrittenIndexes(MPI_Comm writtenCom)
+   TRY
+   {
+     int writtenSize;
+     MPI_Comm_size(writtenCom, &writtenSize);
+     return numberWrittenIndexes_[writtenSize];
+   }
+   CATCH_DUMP_ATTR
+
+   /*!
+     Returns the total number of indexes written by the servers.
+     \return the total number of indexes written by the servers
+   */
+   int CDomain::getTotalNumberWrittenIndexes(MPI_Comm writtenCom)
+   TRY
+   {
+     int writtenSize;
+     MPI_Comm_size(writtenCom, &writtenSize);
+     return totalNumberWrittenIndexes_[writtenSize];
+   }
+   CATCH_DUMP_ATTR
+
+   /*!
+     Returns the offset of indexes written by each server.
+     \return the offset of indexes written by each server
+   */
+   int CDomain::getOffsetWrittenIndexes(MPI_Comm writtenCom)
+   TRY
+   {
+     int writtenSize;
+     MPI_Comm_size(writtenCom, &writtenSize);
+     return offsetWrittenIndexes_[writtenSize];
+   }
+   CATCH_DUMP_ATTR
+
+   CArray<int, 1>& CDomain::getCompressedIndexToWriteOnServer(MPI_Comm writtenCom)
+   TRY
+   {
+     int writtenSize;
+     MPI_Comm_size(writtenCom, &writtenSize);
+     return compressedIndexToWriteOnServer[writtenSize];
+   }
+   CATCH_DUMP_ATTR
+
+   //----------------------------------------------------------------
+
+   /*!
+    * Compute the minimum buffer size required to send the attributes to the server(s).
+    *
+    * \return A map associating the server rank with its minimum buffer size.
+    */
+   std::map<int, StdSize> CDomain::getAttributesBufferSize(CContextClient* client, bool bufferForWriting /*= false*/)
+   TRY
+   {
+
+     std::map<int, StdSize> attributesSizes = getMinimumBufferSizeForAttributes(client);
+
+     if (client->isServerLeader())
+     {
+       // size estimation for sendDistributionAttribut
+       size_t size = 11 * sizeof(size_t);
+
+       const std::list<int>& ranks = client->getRanksServerLeader();
+       for (std::list<int>::const_iterator itRank = ranks.begin(), itRankEnd = ranks.end(); itRank != itRankEnd; ++itRank)
+       {
+         if (size > attributesSizes[*itRank])
+           attributesSizes[*itRank] = size;
+       }
+     }
+
+     std::unordered_map<int, vector<size_t> >::const_iterator itIndexEnd = indSrv_[client->serverSize].end();
+     // std::map<int, std::vector<int> >::const_iterator itWrittenIndexEnd = indWrittenSrv_.end();
+     for (size_t k = 0; k < connectedServerRank_[client->serverSize].size(); ++k)
+     {
+       int rank = connectedServerRank_[client->serverSize][k];
+       std::unordered_map<int, std::vector<size_t> >::const_iterator it = indSrv_[client->serverSize].find(rank);
+       size_t idxCount = (it != itIndexEnd) ? it->second.size() : 0;
+
+       // size estimation for sendIndex (and sendArea which is always smaller or equal)
+       size_t sizeIndexEvent = 2 * sizeof(size_t) + 2 * CArray<int,1>::size(idxCount);
+
+       // size estimation for sendLonLat
+       size_t sizeLonLatEvent = CArray<double,1>::size(idxCount);
+       if (hasBounds)
+         sizeLonLatEvent += CArray<double,2>::size(nvertex * idxCount);
+
+       size_t size = CEventClient::headerSize + getId().size() + sizeof(size_t) + std::max(sizeIndexEvent, sizeLonLatEvent);
+       if (size > attributesSizes[rank])
+         attributesSizes[rank] = size;
+     }
+
+     return attributesSizes;
+   }
+   CATCH_DUMP_ATTR
+
+   //----------------------------------------------------------------
+
+   bool CDomain::isEmpty(void) const
+   TRY
+   {
+     return ((this->i_index.isEmpty()) || (0 == this->i_index.numElements()));
+   }
+   CATCH
+
+   //----------------------------------------------------------------
+
+   bool CDomain::IsWritten(const StdString & filename) const
+   TRY
+   {
+      return (this->relFiles.find(filename) != this->relFiles.end());
+   }
+   CATCH
+
+   bool CDomain::isWrittenCompressed(const StdString& filename) const
+   TRY
+   {
+      return (this->relFilesCompressed.find(filename) != this->relFilesCompressed.end());
+   }
+   CATCH
+
+   //----------------------------------------------------------------
+
+   bool CDomain::isDistributed(void) const
+   TRY
+   {
+      bool distributed =  !((!ni.isEmpty() && (ni == ni_glo) && !nj.isEmpty() && (nj == nj_glo)) ||
+              (!i_index.isEmpty() && i_index.numElements() == ni_glo*nj_glo));
+      distributed |= (1 == CContext::getCurrent()->client->clientSize);
+
+      return distributed;
+   }
+   CATCH
+
+   //----------------------------------------------------------------
+
+   /*!
+    * Test whether the data defined on the domain can be outputted in a compressed way.
+    *
+    * \return true if and only if a mask was defined for this domain
+    */
+   bool CDomain::isCompressible(void) const
+   TRY
+   {
+      return isCompressible_;
+   }
+   CATCH
+
+   void CDomain::addRelFile(const StdString & filename)
+   TRY
+   {
+      this->relFiles.insert(filename);
+   }
+   CATCH_DUMP_ATTR
+
+   void CDomain::addRelFileCompressed(const StdString& filename)
+   TRY
+   {
+      this->relFilesCompressed.insert(filename);
+   }
+   CATCH_DUMP_ATTR
+
+   StdString CDomain::GetName(void)   { return (StdString("domain")); }
+   StdString CDomain::GetDefName(void){ return (CDomain::GetName()); }
+   ENodeType CDomain::GetType(void)   { return (eDomain); }
+
+   //----------------------------------------------------------------
+
+   /*!
+      Verify if all distribution information of a domain are available
+      This checking verifies the definition of distribution attributes (ni, nj, ibegin, jbegin)
+   */
+   bool CDomain::distributionAttributesHaveValue() const
+   TRY
+   {
+      bool hasValues = true;
+
+      if (ni.isEmpty() && ibegin.isEmpty() && i_index.isEmpty())
+      {
+        hasValues = false;
+        return hasValues;
+      }
+
+      return hasValues;
+   }
+   CATCH
+
+   /*!
+     Redistribute RECTILINEAR or CURVILINEAR domain with a number of local domains.
+   All attributes ni,nj,ibegin,jbegin (if defined) will be rewritten
+   The optional attributes lonvalue, latvalue will be added. Because this function only serves (for now)
+   for interpolation from unstructured domain to rectilinear one, range of latvalue is 0-360 and lonvalue is -90 - +90
+    \param [in] nbLocalDomain number of local domain on the domain destination
+   */
+   void CDomain::redistribute(int nbLocalDomain)
+   TRY
+   {
+     if (this->isRedistributed_) return;
+
+     this->isRedistributed_ = true;
+     CContext* context = CContext::getCurrent();
+     // For now the assumption is that secondary server pools consist of the same number of procs.
+     // CHANGE the line below if the assumption changes.
+     CContextClient* client = (0 != context->clientPrimServer.size()) ? context->clientPrimServer[0] : context->client;
+     int rankClient = client->clientRank;
+     int rankOnDomain = rankClient%nbLocalDomain;
+
+     if (ni_glo.isEmpty() || ni_glo <= 0 )
+     {
+        ERROR("CDomain::redistribute(int nbLocalDomain)",
+           << "[ Id = " << this->getId() << " ] "
+           << "The global domain is badly defined,"
+           << " check the \'ni_glo\'  value !")
+     }
+
+     if (nj_glo.isEmpty() || nj_glo <= 0 )
+     {
+        ERROR("CDomain::redistribute(int nbLocalDomain)",
+           << "[ Id = " << this->getId() << " ] "
+           << "The global domain is badly defined,"
+           << " check the \'nj_glo\'  value !")
+     }
+
+     if ((type_attr::rectilinear == type)  || (type_attr::curvilinear == type))
+     {
+        int globalDomainSize = ni_glo * nj_glo;
+        if (globalDomainSize <= nbLocalDomain)
+        {
+          for (int idx = 0; idx < nbLocalDomain; ++idx)
+          {
+            if (rankOnDomain < globalDomainSize)
+            {
+              int iIdx = rankOnDomain % ni_glo;
+              int jIdx = rankOnDomain / ni_glo;
+              ibegin.setValue(iIdx); jbegin.setValue(jIdx);
+              ni.setValue(1); nj.setValue(1);
+            }
+            else
+            {
+              ibegin.setValue(0); jbegin.setValue(0);
+              ni.setValue(0); nj.setValue(0);
+            }
+          }
+        }
+        else
+        {
+          float njGlo = nj_glo.getValue();
+          float niGlo = ni_glo.getValue();
+          int nbProcOnX, nbProcOnY, range;
+
+          // Compute (approximately) number of segment on x and y axis
+          float yOverXRatio = njGlo/niGlo;
+
+          nbProcOnX = std::ceil(std::sqrt(nbLocalDomain/yOverXRatio));
+          nbProcOnY = std::ceil(((float)nbLocalDomain)/nbProcOnX);
+
+          // Simple distribution: Sweep from top to bottom, left to right
+          // Calculate local begin on x
+          std::vector<int> ibeginVec(nbProcOnX,0), jbeginVec(nbProcOnY,0);
+          std::vector<int> niVec(nbProcOnX), njVec(nbProcOnY);
+          for (int i = 1; i < nbProcOnX; ++i)
+          {
+            range = ni_glo / nbProcOnX;
+            if (i < (ni_glo%nbProcOnX)) ++range;
+            niVec[i-1] = range;
+            ibeginVec[i] = ibeginVec[i-1] + niVec[i-1];
+          }
+          niVec[nbProcOnX-1] = ni_glo - ibeginVec[nbProcOnX-1];
+
+          // Calculate local begin on y
+          for (int j = 1; j < nbProcOnY; ++j)
+          {
+            range = nj_glo / nbProcOnY;
+            if (j < (nj_glo%nbProcOnY)) ++range;
+            njVec[j-1] = range;
+            jbeginVec[j] = jbeginVec[j-1] + njVec[j-1];
+          }
+          njVec[nbProcOnY-1] = nj_glo - jbeginVec[nbProcOnY-1];
+
+          // Now assign value to ni, ibegin, nj, jbegin
+          int iIdx = rankOnDomain % nbProcOnX;
+          int jIdx = rankOnDomain / nbProcOnX;
+
+          if (rankOnDomain != (nbLocalDomain-1))
+          {
+            ibegin.setValue(ibeginVec[iIdx]);
+            jbegin.setValue(jbeginVec[jIdx]);
+            nj.setValue(njVec[jIdx]);
+            ni.setValue(niVec[iIdx]);
+          }
+          else // just merge all the remaining rectangle into the last one
+          {
+            ibegin.setValue(ibeginVec[iIdx]);
+            jbegin.setValue(jbeginVec[jIdx]);
+            nj.setValue(njVec[jIdx]);
+            ni.setValue(ni_glo - ibeginVec[iIdx]);
+          }
+        } 
+     }
+     else  // unstructured domain
+     {
+       if (this->i_index.isEmpty())
+       {
+          int globalDomainSize = ni_glo * nj_glo;
+          if (globalDomainSize <= nbLocalDomain)
+          {
+            for (int idx = 0; idx < nbLocalDomain; ++idx)
+            {
+              if (rankOnDomain < globalDomainSize)
+              {
+                int iIdx = rankOnDomain % ni_glo;
+                int jIdx = rankOnDomain / ni_glo;
+                ibegin.setValue(iIdx); jbegin.setValue(jIdx);
+                ni.setValue(1); nj.setValue(1);
+              }
+              else
+              {
+                ibegin.setValue(0); jbegin.setValue(0);
+                ni.setValue(0); nj.setValue(0);
+              }
+            }
+          }
+          else
+          {
+            float njGlo = nj_glo.getValue();
+            float niGlo = ni_glo.getValue();
+            std::vector<int> ibeginVec(nbLocalDomain,0);
+            std::vector<int> niVec(nbLocalDomain);
+            for (int i = 1; i < nbLocalDomain; ++i)
+            {
+              int range = ni_glo / nbLocalDomain;
+              if (i < (ni_glo%nbLocalDomain)) ++range;
+              niVec[i-1] = range;
+              ibeginVec[i] = ibeginVec[i-1] + niVec[i-1];
+            }
+            niVec[nbLocalDomain-1] = ni_glo - ibeginVec[nbLocalDomain-1];
+
+            int iIdx = rankOnDomain % nbLocalDomain;
+            ibegin.setValue(ibeginVec[iIdx]);
+            jbegin.setValue(0);
+            ni.setValue(niVec[iIdx]);
+            nj.setValue(1);
+          }
+
+          i_index.resize(ni);          
+          for(int idx = 0; idx < ni; ++idx) i_index(idx)=ibegin+idx;
+        }
+        else
+        {
+          ibegin.setValue(this->i_index(0));
+          jbegin.setValue(0);
+          ni.setValue(this->i_index.numElements());
+          nj.setValue(1);
+        }
+     }
+
+     checkDomain();
+   }
+   CATCH_DUMP_ATTR
+
+   /*!
+     Fill in longitude and latitude whose values are read from file
+   */
+   void CDomain::fillInLonLat()
+   TRY
+   {
+     switch (type)
+     {
+      case type_attr::rectilinear:
+        fillInRectilinearLonLat();
+        break;
+      case type_attr::curvilinear:
+        fillInCurvilinearLonLat();
+        break;
+      case type_attr::unstructured:
+        fillInUnstructuredLonLat();
+        break;
+
+      default:
+      break;
+     }
+     completeLonLatClient() ;
+   }
+   CATCH_DUMP_ATTR
+
+   /*!
+     Fill in the values for lonvalue_1d and latvalue_1d of rectilinear domain
+     Range of longitude value from 0 - 360
+     Range of latitude value from -90 - +90
+   */
+   void CDomain::fillInRectilinearLonLat()
+   TRY
+   {
+     if (!lonvalue_rectilinear_read_from_file.isEmpty() && lonvalue_2d.isEmpty() && lonvalue_1d.isEmpty())
+     {
+       lonvalue_1d.resize(ni);
+       for (int idx = 0; idx < ni; ++idx)
+         lonvalue_1d(idx) = lonvalue_rectilinear_read_from_file(idx+ibegin);
+       lon_start.setValue(lonvalue_rectilinear_read_from_file(0));
+       lon_end.setValue(lonvalue_rectilinear_read_from_file(ni_glo-1));
+     }
+     else if (!hasLonInReadFile_)
+     {
+       if (!lonvalue_2d.isEmpty()) lonvalue_2d.free();
+       lonvalue_1d.resize(ni);
+       double lonRange = lon_end - lon_start;
+       double lonStep = (1 == ni_glo.getValue()) ? lonRange : lonRange/double(ni_glo.getValue()-1);
+
+        // Assign lon value
+       for (int i = 0; i < ni; ++i)
+       {
+         if (0 == (ibegin + i))
+         {
+           lonvalue_1d(i) = lon_start;
+         }
+         else if (ni_glo == (ibegin + i + 1))
+         {
+           lonvalue_1d(i) = lon_end;
+         }
+         else
+         {
+           lonvalue_1d(i) = (ibegin + i) * lonStep  + lon_start;
+         }
+       }
+     }
+
+
+     if (!latvalue_rectilinear_read_from_file.isEmpty() && latvalue_2d.isEmpty() && latvalue_1d.isEmpty())
+     {
+       latvalue_1d.resize(nj);
+       for (int idx = 0; idx < nj; ++idx)
+         latvalue_1d(idx) = latvalue_rectilinear_read_from_file(idx+jbegin);
+       lat_start.setValue(latvalue_rectilinear_read_from_file(0));
+       lat_end.setValue(latvalue_rectilinear_read_from_file(nj_glo-1));
+     }
+     else if (!hasLatInReadFile_)
+     {
+       if (!latvalue_2d.isEmpty()) latvalue_1d.free();
+       latvalue_1d.resize(nj);
+
+       double latRange = lat_end - lat_start;
+       double latStep = (1 == nj_glo.getValue()) ? latRange : latRange/double(nj_glo.getValue()-1);
+
+       for (int j = 0; j < nj; ++j)
+       {
+         if (0 == (jbegin + j))
+         {
+            latvalue_1d(j) = lat_start;
+         }
+         else if (nj_glo == (jbegin + j + 1))
+         {
+            latvalue_1d(j) = lat_end;
+         }
+         else
+         {
+           latvalue_1d(j) =  (jbegin + j) * latStep + lat_start;
+         }
+       }
+     }
+   }
+   CATCH_DUMP_ATTR
+
+    /*
+      Fill in 2D longitude and latitude of curvilinear domain read from a file.
+      If there are already longitude and latitude defined by model. We just ignore read value.
+    */
+   void CDomain::fillInCurvilinearLonLat()
+   TRY
+   {
+     if (!lonvalue_curvilinear_read_from_file.isEmpty() && lonvalue_2d.isEmpty() && lonvalue_1d.isEmpty())
+     {
+       lonvalue_2d.resize(ni,nj);
+       for (int jdx = 0; jdx < nj; ++jdx)
+        for (int idx = 0; idx < ni; ++idx)
+         lonvalue_2d(idx,jdx) = lonvalue_curvilinear_read_from_file(idx, jdx);
+
+       lonvalue_curvilinear_read_from_file.free();
+     }
+
+     if (!latvalue_curvilinear_read_from_file.isEmpty() && latvalue_2d.isEmpty() && latvalue_1d.isEmpty())
+     {
+       latvalue_2d.resize(ni,nj);
+       for (int jdx = 0; jdx < nj; ++jdx)
+        for (int idx = 0; idx < ni; ++idx)
+           latvalue_2d(idx,jdx) = latvalue_curvilinear_read_from_file(idx, jdx);
+
+       latvalue_curvilinear_read_from_file.free();
+     }
+
+     if (!bounds_lonvalue_curvilinear_read_from_file.isEmpty() && bounds_lon_2d.isEmpty() && bounds_lon_1d.isEmpty())
+     {
+       bounds_lon_2d.resize(nvertex,ni,nj);
+       for (int jdx = 0; jdx < nj; ++jdx)
+        for (int idx = 0; idx < ni; ++idx)
+          for (int ndx = 0; ndx < nvertex; ++ndx)
+            bounds_lon_2d(ndx,idx,jdx) = bounds_lonvalue_curvilinear_read_from_file(ndx,idx, jdx);
+
+       bounds_lonvalue_curvilinear_read_from_file.free();
+     }
+
+     if (!bounds_latvalue_curvilinear_read_from_file.isEmpty() && bounds_lat_2d.isEmpty() && bounds_lat_1d.isEmpty())
+     {
+       bounds_lat_2d.resize(nvertex,ni,nj);
+       for (int jdx = 0; jdx < nj; ++jdx)
+        for (int idx = 0; idx < ni; ++idx)
+          for (int ndx = 0; ndx < nvertex; ++ndx)
+            bounds_lat_2d(ndx,idx,jdx) = bounds_latvalue_curvilinear_read_from_file(ndx,idx, jdx);
+
+       bounds_latvalue_curvilinear_read_from_file.free();
+     }
+   }
+   CATCH_DUMP_ATTR
+
+    /*
+      Fill in longitude and latitude of unstructured domain read from a file
+      If there are already longitude and latitude defined by model. We just igonore reading value.
+    */
+   void CDomain::fillInUnstructuredLonLat()
+   TRY
+   {
+     if (i_index.isEmpty())
+     {
+       i_index.resize(ni);
+       for(int idx = 0; idx < ni; ++idx) i_index(idx)=ibegin+idx;
+     }
+
+     if (!lonvalue_unstructured_read_from_file.isEmpty() && lonvalue_1d.isEmpty())
+     {
+        lonvalue_1d.resize(ni);
+        for (int idx = 0; idx < ni; ++idx)
+          lonvalue_1d(idx) = lonvalue_unstructured_read_from_file(idx);
+
+        // We dont need these values anymore, so just delete them
+        lonvalue_unstructured_read_from_file.free();
+     } 
+
+     if (!latvalue_unstructured_read_from_file.isEmpty() && latvalue_1d.isEmpty())
+     {
+        latvalue_1d.resize(ni);
+        for (int idx = 0; idx < ni; ++idx)
+          latvalue_1d(idx) =  latvalue_unstructured_read_from_file(idx);
+
+        // We dont need these values anymore, so just delete them
+        latvalue_unstructured_read_from_file.free();
+     }
+
+     if (!bounds_lonvalue_unstructured_read_from_file.isEmpty() && bounds_lon_1d.isEmpty())
+     {
+        int nbVertex = nvertex;
+        bounds_lon_1d.resize(nbVertex,ni);
+        for (int idx = 0; idx < ni; ++idx)
+          for (int jdx = 0; jdx < nbVertex; ++jdx)
+            bounds_lon_1d(jdx,idx) = bounds_lonvalue_unstructured_read_from_file(jdx, idx);
+
+        // We dont need these values anymore, so just delete them
+        bounds_lonvalue_unstructured_read_from_file.free();
+     }
+
+     if (!bounds_latvalue_unstructured_read_from_file.isEmpty() && bounds_lat_1d.isEmpty())
+     {
+        int nbVertex = nvertex;
+        bounds_lat_1d.resize(nbVertex,ni);
+        for (int idx = 0; idx < ni; ++idx)
+          for (int jdx = 0; jdx < nbVertex; ++jdx)
+            bounds_lat_1d(jdx,idx) = bounds_latvalue_unstructured_read_from_file(jdx, idx);
+
+        // We dont need these values anymore, so just delete them
+        bounds_latvalue_unstructured_read_from_file.free();
+     }
+   }
+   CATCH_DUMP_ATTR
+
+  /*
+    Get global longitude and latitude of rectilinear domain.
+  */
+   void CDomain::AllgatherRectilinearLonLat(CArray<double,1>& lon, CArray<double,1>& lat, CArray<double,1>& lon_g, CArray<double,1>& lat_g)
+   TRY
+   {
+     CContext* context = CContext::getCurrent();
+    // For now the assumption is that secondary server pools consist of the same number of procs.
+    // CHANGE the line below if the assumption changes.
+    CContextClient* client = (0 != context->clientPrimServer.size()) ? context->clientPrimServer[0] : context->client;
+     lon_g.resize(ni_glo) ;
+     lat_g.resize(nj_glo) ;
+
+
+     int* ibegin_g = new int[client->clientSize] ;
+     int* jbegin_g = new int[client->clientSize] ;
+     int* ni_g = new int[client->clientSize] ;
+     int* nj_g = new int[client->clientSize] ;
+     int v ;
+     v=ibegin ;
+     MPI_Allgather(&v,1,MPI_INT,ibegin_g,1,MPI_INT,client->intraComm) ;
+     v=jbegin ;
+     MPI_Allgather(&v,1,MPI_INT,jbegin_g,1,MPI_INT,client->intraComm) ;
+     v=ni ;
+     MPI_Allgather(&v,1,MPI_INT,ni_g,1,MPI_INT,client->intraComm) ;
+     v=nj ;
+     MPI_Allgather(&v,1,MPI_INT,nj_g,1,MPI_INT,client->intraComm) ;
+
+     MPI_Allgatherv(lon.dataFirst(),ni,MPI_DOUBLE,lon_g.dataFirst(),ni_g, ibegin_g,MPI_DOUBLE,client->intraComm) ;
+     MPI_Allgatherv(lat.dataFirst(),nj,MPI_DOUBLE,lat_g.dataFirst(),nj_g, jbegin_g,MPI_DOUBLE,client->intraComm) ;
+
+      delete[] ibegin_g ;
+      delete[] jbegin_g ;
+      delete[] ni_g ;
+      delete[] nj_g ;
+   }
+   CATCH_DUMP_ATTR
+
+   void CDomain::fillInRectilinearBoundLonLat(CArray<double,1>& lon, CArray<double,1>& lat,
+                                              CArray<double,2>& boundsLon, CArray<double,2>& boundsLat)
+   TRY
+  {
+     int i,j,k;
+
+     const int nvertexValue = 4;
+     boundsLon.resize(nvertexValue,ni*nj);
+
+     if (ni_glo>1)
+     {
+       double lonStepStart = lon(1)-lon(0);
+       bounds_lon_start=lon(0) - lonStepStart/2;
+       double lonStepEnd = lon(ni_glo-1)-lon(ni_glo-2);
+       bounds_lon_end=lon(ni_glo-1) + lonStepEnd/2;
+       double errorBoundsLon = std::abs(360-std::abs(bounds_lon_end-bounds_lon_start));
+
+       // if errorBoundsLon is reasonably small (0.1 x cell size) consider it as closed in longitude
+       if (errorBoundsLon < std::abs(lonStepStart)*1e-1 || errorBoundsLon < std::abs(lonStepEnd)*1e-1 )
+       {
+         bounds_lon_start= (lon(0) + lon(ni_glo-1)-360)/2 ;
+         bounds_lon_end= (lon(0) +360 + lon(ni_glo-1))/2 ;
+       }
+     }
+     else
+     {
+       if (bounds_lon_start.isEmpty()) bounds_lon_start=-180. ;
+       if (bounds_lon_end.isEmpty()) bounds_lon_end=180.-1e-8 ;
+     }
+
+     for(j=0;j<nj;++j)
+       for(i=0;i<ni;++i)
+       {
+         k=j*ni+i;
+         boundsLon(0,k) = boundsLon(1,k) = (0 == (ibegin + i)) ? bounds_lon_start
+                                                               : (lon(ibegin + i)+lon(ibegin + i-1))/2;
+         boundsLon(2,k) = boundsLon(3,k) = ((ibegin + i + 1) == ni_glo) ? bounds_lon_end
+                                                                        : (lon(ibegin + i + 1)+lon(ibegin + i))/2;
+       }
+
+
+    boundsLat.resize(nvertexValue,nj*ni);
+    bool isNorthPole=false ;
+    bool isSouthPole=false ;
+    if (std::abs(90 - std::abs(lat(0))) < NumTraits<double>::epsilon()) isNorthPole = true;
+    if (std::abs(90 - std::abs(lat(nj_glo-1))) < NumTraits<double>::epsilon()) isSouthPole = true;
+
+    // lat boundaries beyond pole the assimilate it to pole
+    // lat boundarie is relativelly close to pole (0.1 x cell size) assimilate it to pole
+    if (nj_glo>1)
+    {
+      double latStepStart = lat(1)-lat(0);
+      if (isNorthPole) bounds_lat_start=lat(0);
+      else
+      {
+        bounds_lat_start=lat(0)-latStepStart/2;
+        if (bounds_lat_start >= 90 ) bounds_lat_start=90 ;
+        else if (bounds_lat_start <= -90 ) bounds_lat_start=-90 ;
+        else if (bounds_lat_start <= 90 && bounds_lat_start >= lat(0))
+        {
+          if ( std::abs(90-bounds_lat_start) <= 0.1*std::abs(latStepStart)) bounds_lat_start=90 ;
+        }
+        else if (bounds_lat_start >= -90 && bounds_lat_start <= lat(0))
+        {
+          if ( std::abs(-90 - bounds_lat_start) <= 0.1*std::abs(latStepStart)) bounds_lat_start=-90 ;
+        }
+      }
+
+      double latStepEnd = lat(nj_glo-1)-lat(nj_glo-2);
+      if (isSouthPole) bounds_lat_end=lat(nj_glo-1);
+      else
+      {
+        bounds_lat_end=lat(nj_glo-1)+latStepEnd/2;
+
+        if (bounds_lat_end >= 90 ) bounds_lat_end=90 ;
+        else if (bounds_lat_end <= -90 ) bounds_lat_end=-90 ;
+        else if (bounds_lat_end <= 90 && bounds_lat_end >= lat(nj_glo-1))
+        {
+          if ( std::abs(90-bounds_lat_end) <= 0.1*std::abs(latStepEnd)) bounds_lat_end=90 ;
+        }
+        else if (bounds_lat_end >= -90 && bounds_lat_end <= lat(nj_glo-1))
+        {
+          if ( std::abs(-90 - bounds_lat_end) <= 0.1*std::abs(latStepEnd)) bounds_lat_end=-90 ;
+        }
+      }
+    }
+    else
+    {
+      if (bounds_lat_start.isEmpty()) bounds_lat_start=-90. ;
+      if (bounds_lat_end.isEmpty()) bounds_lat_end=90 ;
+    }
+
+    for(j=0;j<nj;++j)
+      for(i=0;i<ni;++i)
+      {
+        k=j*ni+i;
+        boundsLat(1,k) = boundsLat(2,k) = (0 == (jbegin + j)) ? bounds_lat_start
+                                                              : (lat(jbegin + j)+lat(jbegin + j-1))/2;
+        boundsLat(0,k) = boundsLat(3,k) = ((jbegin + j +1) == nj_glo) ? bounds_lat_end
+                                                                      : (lat(jbegin + j + 1)+lat(jbegin + j))/2;
+      }
+   }
+   CATCH_DUMP_ATTR
+
+   /*
+     General check of the domain to verify its mandatory attributes
+   */
+   void CDomain::checkDomain(void)
+   TRY
+   {
+     if (type.isEmpty())
+     {
+       ERROR("CDomain::checkDomain(void)",
+             << "[ id = " << this->getId() << " , context = '" << CObjectFactory::GetCurrentContextId() << " ] "
+             << "The domain type is mandatory, "
+             << "please define the 'type' attribute.")
+     }
+
+     if (type == type_attr::gaussian) 
+     {
+        hasPole=true ;
+        type.setValue(type_attr::unstructured) ;
+      }
+      else if (type == type_attr::rectilinear) hasPole=true ;
+
+     if (type == type_attr::unstructured)
+     {
+        if (ni_glo.isEmpty())
+        {
+          ERROR("CDomain::checkDomain(void)",
+                << "[ id = " << this->getId() << " , context = '" << CObjectFactory::GetCurrentContextId() << " ] "
+                << "The global domain is badly defined, "
+                << "the mandatory 'ni_glo' attribute is missing.")
+        }
+        else if (ni_glo <= 0)
+        {
+          ERROR("CDomain::checkDomain(void)",
+                << "[ id = " << this->getId() << " , context = '" << CObjectFactory::GetCurrentContextId() << " ] "
+                << "The global domain is badly defined, "
+                << "'ni_glo' attribute should be strictly positive so 'ni_glo = " << ni_glo.getValue() << "' is invalid.")
+        }
+        isUnstructed_ = true;
+        nj_glo = 1;
+        nj = 1;
+        jbegin = 0;
+        if (!i_index.isEmpty()) ni = i_index.numElements();
+        j_index.resize(ni);
+        for(int i=0;i<ni;++i) j_index(i)=0;
+
+        if (!area.isEmpty())
+          area.transposeSelf(1, 0);
+     }
+
+     if (ni_glo.isEmpty())
+     {
+       ERROR("CDomain::checkDomain(void)",
+             << "[ id = " << this->getId() << " , context = '" << CObjectFactory::GetCurrentContextId() << " ] "
+             << "The global domain is badly defined, "
+             << "the mandatory 'ni_glo' attribute is missing.")
+     }
+     else if (ni_glo <= 0)
+     {
+       ERROR("CDomain::checkDomain(void)",
+             << "[ id = " << this->getId() << " , context = '" << CObjectFactory::GetCurrentContextId() << " ] "
+             << "The global domain is badly defined, "
+             << "'ni_glo' attribute should be strictly positive so 'ni_glo = " << ni_glo.getValue() << "' is invalid.")
+     }
+
+     if (nj_glo.isEmpty())
+     {
+       ERROR("CDomain::checkDomain(void)",
+             << "[ id = " << this->getId() << " , context = '" << CObjectFactory::GetCurrentContextId() << " ] "
+             << "The global domain is badly defined, "
+             << "the mandatory 'nj_glo' attribute is missing.")
+     }
+     else if (nj_glo <= 0)
+     {
+       ERROR("CDomain::checkDomain(void)",
+             << "[ id = " << this->getId() << " , context = '" << CObjectFactory::GetCurrentContextId() << " ] "
+             << "The global domain is badly defined, "
+             << "'nj_glo' attribute should be strictly positive so 'nj_glo = " << nj_glo.getValue() << "' is invalid.")
+     }
+
+     checkLocalIDomain();
+     checkLocalJDomain();
+
+     if (i_index.isEmpty())
+     {
+       i_index.resize(ni*nj);
+       for (int j = 0; j < nj; ++j)
+         for (int i = 0; i < ni; ++i) i_index(i+j*ni) = i+ibegin;
+     }
+
+     if (j_index.isEmpty())
+     {
+       j_index.resize(ni*nj);
+       for (int j = 0; j < nj; ++j)
+         for (int i = 0; i < ni; ++i) j_index(i+j*ni) = j+jbegin;
+     }
+   }
+   CATCH_DUMP_ATTR
+
+   size_t CDomain::getGlobalWrittenSize(void)
+   {
+     return ni_glo*nj_glo ;
+   }
+   //----------------------------------------------------------------
+
+   // Check validity of local domain on using the combination of 3 parameters: ibegin, ni and i_index
+   void CDomain::checkLocalIDomain(void)
+   TRY
+   {
+      // If ibegin and ni are provided then we use them to check the validity of local domain
+      if (i_index.isEmpty() && !ibegin.isEmpty() && !ni.isEmpty())
+      {
+        if ((ni.getValue() < 0 || ibegin.getValue() < 0) || ((ibegin.getValue() + ni.getValue()) > ni_glo.getValue()))
+        {
+          ERROR("CDomain::checkLocalIDomain(void)",
+                << "[ id = " << this->getId() << " , context = '" << CObjectFactory::GetCurrentContextId() << " ] "
+                << "The local domain is wrongly defined,"
+                << " check the attributes 'ni_glo' (" << ni_glo.getValue() << "), 'ni' (" << ni.getValue() << ") and 'ibegin' (" << ibegin.getValue() << ")");
+        }
+      }
+
+      // i_index has higher priority than ibegin and ni
+      if (!i_index.isEmpty())
+      {
+        int minIIndex = (0 < i_index.numElements()) ? i_index(0) : 0;
+        if (ni.isEmpty()) 
+        {          
+         // No information about ni
+          int minIndex = ni_glo - 1;
+          int maxIndex = 0;
+          for (int idx = 0; idx < i_index.numElements(); ++idx)
+          {
+            if (i_index(idx) < minIndex) minIndex = i_index(idx);
+            if (i_index(idx) > maxIndex) maxIndex = i_index(idx);
+          }
+          ni = maxIndex - minIndex + 1; 
+          minIIndex = minIIndex;          
+        }
+
+        // It's not so correct but if ibegin is not the first value of i_index 
+        // then data on local domain has user-defined distribution. In this case, ibegin, ni have no meaning.
+        if (ibegin.isEmpty()) ibegin = minIIndex;
+      }
+      else if (ibegin.isEmpty() && ni.isEmpty())
+      {
+        ibegin = 0;
+        ni = ni_glo;
+      }
+      else if ((!ibegin.isEmpty() && ni.isEmpty()) || (ibegin.isEmpty() && !ni.isEmpty()))
+      {
+        ERROR("CDomain::checkLocalIDomain(void)",
+              << "[ id = " << this->getId() << " , context = '" << CObjectFactory::GetCurrentContextId() << " ] "
+              << "The local domain is wrongly defined," << endl
+              << "i_index is empty and either 'ni' or 'ibegin' is not defined. " 
+              << "If 'ni' and 'ibegin' are used to define a domain, both of them must not be empty.");
+      }
+       
+
+      if ((ni.getValue() < 0 || ibegin.getValue() < 0))
+      {
+        ERROR("CDomain::checkLocalIDomain(void)",
+              << "[ id = " << this->getId() << " , context = '" << CObjectFactory::GetCurrentContextId() << " ] "
+              << "The local domain is wrongly defined,"
+              << " check the attributes 'ni_glo' (" << ni_glo.getValue() << "), 'ni' (" << ni.getValue() << ") and 'ibegin' (" << ibegin.getValue() << ")");
+      }
+   }
+   CATCH_DUMP_ATTR
+
+   // Check validity of local domain on using the combination of 3 parameters: jbegin, nj and j_index
+   void CDomain::checkLocalJDomain(void)
+   TRY
+   {
+    // If jbegin and nj are provided then we use them to check the validity of local domain
+     if (j_index.isEmpty() && !jbegin.isEmpty() && !nj.isEmpty())
+     {
+       if ((nj.getValue() < 0 || jbegin.getValue() < 0) || (jbegin.getValue() + nj.getValue()) > nj_glo.getValue())
+       {
+         ERROR("CDomain::checkLocalJDomain(void)",
+                << "[ id = " << this->getId() << " , context = '" << CObjectFactory::GetCurrentContextId() << " ] "
+                << "The local domain is wrongly defined,"
+                << " check the attributes 'nj_glo' (" << nj_glo.getValue() << "), 'nj' (" << nj.getValue() << ") and 'jbegin' (" << jbegin.getValue() << ")");
+       }
+     }
+
+     if (!j_index.isEmpty())
+     {
+        int minJIndex = (0 < j_index.numElements()) ? j_index(0) : 0;
+        if (nj.isEmpty()) 
+        {
+          // No information about nj
+          int minIndex = nj_glo - 1;
+          int maxIndex = 0;
+          for (int idx = 0; idx < j_index.numElements(); ++idx)
+          {
+            if (j_index(idx) < minIndex) minIndex = j_index(idx);
+            if (j_index(idx) > maxIndex) maxIndex = j_index(idx);
+          }
+          nj = maxIndex - minIndex + 1;
+          minJIndex = minIndex; 
+        }  
+        // It's the same as checkLocalIDomain. It's not so correct but if jbegin is not the first value of j_index 
+        // then data on local domain has user-defined distribution. In this case, jbegin has no meaning.
+       if (jbegin.isEmpty()) jbegin = minJIndex;       
+     }
+     else if (jbegin.isEmpty() && nj.isEmpty())
+     {
+       jbegin = 0;
+       nj = nj_glo;
+     }      
+
+
+     if ((nj.getValue() < 0 || jbegin.getValue() < 0))
+     {
+       ERROR("CDomain::checkLocalJDomain(void)",
+              << "[ id = " << this->getId() << " , context = '" << CObjectFactory::GetCurrentContextId() << " ] "
+              << "The local domain is wrongly defined,"
+              << " check the attributes 'nj_glo' (" << nj_glo.getValue() << "), 'nj' (" << nj.getValue() << ") and 'jbegin' (" << jbegin.getValue() << ")");
+     }
+   }
+   CATCH_DUMP_ATTR
+
+   //----------------------------------------------------------------
+
+   void CDomain::checkMask(void)
+   TRY
+   {
+      if (!mask_1d.isEmpty() && !mask_2d.isEmpty())
+        ERROR("CDomain::checkMask(void)",
+              << "[ id = " << this->getId() << " , context = '" << CObjectFactory::GetCurrentContextId() << " ] "
+              << "Both mask_1d and mask_2d are defined but only one can be used at the same time." << std::endl
+              << "Please define only one mask: 'mask_1d' or 'mask_2d'.");
+
+      if (!mask_1d.isEmpty() && mask_2d.isEmpty())
+      {
+        if (mask_1d.numElements() != i_index.numElements())
+          ERROR("CDomain::checkMask(void)",
+                << "[ id = " << this->getId() << " , context = '" << CObjectFactory::GetCurrentContextId() << " ] "
+                << "'mask_1d' does not have the same size as the local domain." << std::endl
+                << "Local size is " << i_index.numElements() << "." << std::endl
+                << "Mask size is " << mask_1d.numElements() << ".");
+      }
+
+      if (mask_1d.isEmpty() && !mask_2d.isEmpty())
+      {
+        if (mask_2d.extent(0) != ni || mask_2d.extent(1) != nj)
+          ERROR("CDomain::checkMask(void)",
+                << "[ id = " << this->getId() << " , context = '" << CObjectFactory::GetCurrentContextId() << " ] "
+                << "The mask does not have the same size as the local domain." << std::endl
+                << "Local size is " << ni.getValue() << " x " << nj.getValue() << "." << std::endl
+                << "Mask size is " << mask_2d.extent(0) << " x " << mask_2d.extent(1) << ".");
+      }
+
+      if (!mask_2d.isEmpty())
+      {
+        domainMask.resize(mask_2d.extent(0) * mask_2d.extent(1));
+        for (int j = 0; j < nj; ++j)
+          for (int i = 0; i < ni; ++i) domainMask(i+j*ni) = mask_2d(i,j);
+//        mask_2d.reset();
+      }
+      else if (mask_1d.isEmpty())
+      {
+        domainMask.resize(i_index.numElements());
+        for (int i = 0; i < i_index.numElements(); ++i) domainMask(i) = true;
+      }
+      else
+      {
+      domainMask.resize(mask_1d.numElements());
+      domainMask=mask_1d ;
+     }
+   }
+   CATCH_DUMP_ATTR
+
+   //----------------------------------------------------------------
+
+   void CDomain::checkDomainData(void)
+   TRY
+   {
+      if (data_dim.isEmpty())
+      {
+        data_dim.setValue(1);
+      }
+      else if (!(data_dim.getValue() == 1 || data_dim.getValue() == 2))
+      {
+        ERROR("CDomain::checkDomainData(void)",
+              << "[ id = " << this->getId() << " , context = '" << CObjectFactory::GetCurrentContextId() << " ] "
+              << "The data dimension is invalid, 'data_dim' must be 1 or 2 not << " << data_dim.getValue() << ".");
+      }
+
+      if (data_ibegin.isEmpty())
+         data_ibegin.setValue(0);
+      if (data_jbegin.isEmpty())
+         data_jbegin.setValue(0);
+
+      if (data_ni.isEmpty())
+      {
+        data_ni.setValue((data_dim == 1) ? (ni.getValue() * nj.getValue()) : ni.getValue());
+      }
+      else if (data_ni.getValue() < 0)
+      {
+        ERROR("CDomain::checkDomainData(void)",
+              << "[ id = " << this->getId() << " , context = '" << CObjectFactory::GetCurrentContextId() << " ] "
+              << "The data size cannot be negative ('data_ni' = " << data_ni.getValue() << ").");
+      }
+
+      if (data_nj.isEmpty())
+      {
+        data_nj.setValue((data_dim.getValue() == 1) ? (ni.getValue() * nj.getValue()) : nj.getValue());
+      }
+      else if (data_nj.getValue() < 0)
+      {
+        ERROR("CDomain::checkDomainData(void)",
+              << "[ id = " << this->getId() << " , context = '" << CObjectFactory::GetCurrentContextId() << " ] "
+              << "The data size cannot be negative ('data_nj' = " << data_nj.getValue() << ").");
+      }
+   }
+   CATCH_DUMP_ATTR
+
+   //----------------------------------------------------------------
+
+   void CDomain::checkCompression(void)
+   TRY
+   {
+     int i,j,ind;
+      if (!data_i_index.isEmpty())
+      {
+        if (!data_j_index.isEmpty() &&
+            data_j_index.numElements() != data_i_index.numElements())
+        {
+           ERROR("CDomain::checkCompression(void)",
+                 << "[ id = " << this->getId() << " , context = '" << CObjectFactory::GetCurrentContextId() << " ] "
+                 << "'data_i_index' and 'data_j_index' arrays must have the same size." << std::endl
+                 << "'data_i_index' size = " << data_i_index.numElements() << std::endl
+                 << "'data_j_index' size = " << data_j_index.numElements());
+        }
+
+        if (2 == data_dim)
+        {
+          if (data_j_index.isEmpty())
+          {
+             ERROR("CDomain::checkCompression(void)",
+                   << "[ id = " << this->getId() << " , context = '" << CObjectFactory::GetCurrentContextId() << " ] "
+                   << "'data_j_index' must be defined when 'data_i_index' is set and 'data_dim' is 2.");
+          }
+          for (int k=0; k<data_i_index.numElements(); ++k)
+          {
+            i = data_i_index(k)+data_ibegin ;
+            j = data_j_index(k)+data_jbegin ;
+            if (i>=0 && i<ni && j>=0 && j<nj)
+            {
+              ind=j*ni+i ;
+              if (!domainMask(ind))
+              {
+                data_i_index(k) = -1;
+                data_j_index(k) = -1;
+              }
+            }
+            else
+            {
+              data_i_index(k) = -1;
+              data_j_index(k) = -1;
+            }
+          }
+        }
+        else // (1 == data_dim)
+        {
+          if (data_j_index.isEmpty())
+          {
+            data_j_index.resize(data_ni);
+            data_j_index = 0;
+          }
+          for (int k=0; k<data_i_index.numElements(); ++k)
+          {
+            i=data_i_index(k)+data_ibegin ;
+            if (i>=0 && i < domainMask.size())
+            {
+              if (!domainMask(i)) data_i_index(k) = -1;
+            }
+            else
+              data_i_index(k) = -1;
+
+            if (!domainMask(i)) data_i_index(k) = -1;
+          }
+        }
+      }
+      else
+      {
+        if (data_dim == 2 && !data_j_index.isEmpty())
+          ERROR("CDomain::checkCompression(void)",
+                << "[ id = " << this->getId() << " , context = '" << CObjectFactory::GetCurrentContextId() << " ] "
+                << "'data_i_index' must be defined when 'data_j_index' is set and 'data_dim' is 2.");
+
+        if (1 == data_dim)
+        {
+          data_i_index.resize(data_ni);
+          data_j_index.resize(data_ni);
+          data_j_index = 0;
+
+          for (int k = 0; k < data_ni; ++k)
+          {
+            i=k+data_ibegin ;
+            if (i>=0 && i < domainMask.size())
+            {
+              if (domainMask(i))
+                data_i_index(k) = k;
+              else
+                data_i_index(k) = -1;
+            }
+            else
+              data_i_index(k) = -1;
+          }
+        }
+        else // (data_dim == 2)
+        {
+          const int dsize = data_ni * data_nj;
+          data_i_index.resize(dsize);
+          data_j_index.resize(dsize);
+
+          for(int count = 0, kj = 0; kj < data_nj; ++kj)
+          {
+            for(int ki = 0; ki < data_ni; ++ki, ++count)
+            {
+              i = ki + data_ibegin;
+              j = kj + data_jbegin;
+              ind=j*ni+i ;
+              if (i>=0 && i<ni && j>=0 && j<nj)
+              {
+                if (domainMask(ind))
+                {
+                  data_i_index(count) = ki;
+                  data_j_index(count) = kj;
+                }
+                else
+                {
+                  data_i_index(count) = -1;
+                  data_j_index(count) = -1;
+                }
+              }
+              else
+              {
+                data_i_index(count) = -1;
+                data_j_index(count) = -1;
+              }
+            }
+          }
+        }
+      }
+   }
+   CATCH_DUMP_ATTR
+
+   //----------------------------------------------------------------
+   void CDomain::computeLocalMask(void)
+   TRY
+   {
+     localMask.resize(i_index.numElements()) ;
+     localMask=false ;
+
+     size_t dn=data_i_index.numElements() ;
+     int i,j ;
+     size_t k,ind ;
+
+     for(k=0;k<dn;k++)
+     {
+       if (data_dim==2)
+       {
+          i=data_i_index(k)+data_ibegin ;
+          j=data_j_index(k)+data_jbegin ;
+          if (i>=0 && i<ni && j>=0 && j<nj)
+          {
+            ind=j*ni+i ;
+            localMask(ind)=domainMask(ind) ;
+          }
+       }
+       else
+       {
+          i=data_i_index(k)+data_ibegin ;
+          if (i>=0 && i<i_index.numElements())
+          {
+            ind=i ;
+            localMask(ind)=domainMask(ind) ;
+          }
+       }
+     }
+   }
+   CATCH_DUMP_ATTR
+
+   void CDomain::checkEligibilityForCompressedOutput(void)
+   TRY
+   {
+     // We don't check if the mask or the indexes are valid here, just if they have been defined at this point.
+     isCompressible_ = !mask_1d.isEmpty() || !mask_2d.isEmpty() || !data_i_index.isEmpty();
+   }
+   CATCH_DUMP_ATTR
+
+   //----------------------------------------------------------------
+
+   /*
+     Fill in longitude, latitude, bounds, and area into internal values (lonvalue, latvalue, bounds_lonvalue, bounds_latvalue, areavalue)
+     which will be used by XIOS.
+   */
+   void CDomain::completeLonLatClient(void)
+   TRY
+   {
+     bool lonlatValueExisted = (0 != lonvalue.numElements()) || (0 != latvalue.numElements());
+     checkBounds() ;
+     checkArea() ;
+
+     if (!lonvalue_2d.isEmpty() && !lonlatValueExisted)
+     {
+       lonvalue.resize(ni * nj);
+       latvalue.resize(ni * nj);
+       if (hasBounds)
+       {
+         bounds_lonvalue.resize(nvertex, ni * nj);
+         bounds_latvalue.resize(nvertex, ni * nj);
+       }
+
+       for (int j = 0; j < nj; ++j)
+       {
+         for (int i = 0; i < ni; ++i)
+         {
+           int k = j * ni + i;
+
+           lonvalue(k) = lonvalue_2d(i,j);
+           latvalue(k) = latvalue_2d(i,j);
+
+           if (hasBounds)
+           {
+             for (int n = 0; n < nvertex; ++n)
+             {
+               bounds_lonvalue(n,k) = bounds_lon_2d(n,i,j);
+               bounds_latvalue(n,k) = bounds_lat_2d(n,i,j);
+             }
+           }
+         }
+       }
+     }
+     else if (!lonvalue_1d.isEmpty()  && !lonlatValueExisted)
+     {
+       if (type_attr::rectilinear == type)
+       {
+         if (ni == lonvalue_1d.numElements() && nj == latvalue_1d.numElements())
+         {
+           lonvalue.resize(ni * nj);
+           latvalue.resize(ni * nj);
+           if (hasBounds)
+           {
+             bounds_lonvalue.resize(nvertex, ni * nj);
+             bounds_latvalue.resize(nvertex, ni * nj);
+           }
+
+           for (int j = 0; j < nj; ++j)
+           {
+             for (int i = 0; i < ni; ++i)
+             {
+               int k = j * ni + i;
+
+               lonvalue(k) = lonvalue_1d(i);
+               latvalue(k) = latvalue_1d(j);
+
+               if (hasBounds)
+               {
+                 for (int n = 0; n < nvertex; ++n)
+                 {
+                   bounds_lonvalue(n,k) = bounds_lon_1d(n,i);
+                   bounds_latvalue(n,k) = bounds_lat_1d(n,j);
+                 }
+               }
+             }
+           }
+         }
+         else if (i_index.numElements() == lonvalue_1d.numElements() && j_index.numElements() == latvalue_1d.numElements()  && !lonlatValueExisted)
+         {
+           lonvalue.reference(lonvalue_1d);
+           latvalue.reference(latvalue_1d);
+            if (hasBounds)
+           {
+             bounds_lonvalue.reference(bounds_lon_1d);
+             bounds_latvalue.reference(bounds_lat_1d);
+           }
+         }
+         else
+           ERROR("CDomain::completeLonClient(void)",
+                 << "[ id = " << this->getId() << " , context = '" << CObjectFactory::GetCurrentContextId() << " ] "
+                 << "'lonvalue_1d' and 'latvalue_1d' does not have the same size as the local domain." << std::endl
+                 << "'lonvalue_1d' size is " << lonvalue_1d.numElements() 
+                 << " and 'latvalue_1d' size is " << latvalue_1d.numElements() << std::endl 
+                 << " They should be correspondingly " << ni.getValue() << " and "  << nj.getValue() << " or " << std::endl
+                 << i_index.numElements() << " and "  << j_index.numElements() << ".");
+       }
+       else if (type == type_attr::curvilinear || type == type_attr::unstructured  && !lonlatValueExisted)
+       {
+         lonvalue.reference(lonvalue_1d);
+         latvalue.reference(latvalue_1d);
+         if (hasBounds)
+         {
+           bounds_lonvalue.reference(bounds_lon_1d);
+           bounds_latvalue.reference(bounds_lat_1d);
+         }
+       }
+     }
+
+     if (!area.isEmpty() && areavalue.isEmpty())
+     {
+        areavalue.resize(ni*nj);
+       for (int j = 0; j < nj; ++j)
+       {
+         for (int i = 0; i < ni; ++i)
+         {
+           int k = j * ni + i;
+           areavalue(k) = area(i,j);
+         }
+       }
+     }
+   }
+   CATCH_DUMP_ATTR
+
+   /*
+     Convert internal longitude latitude value used by XIOS to "lonvalue_*" which can be retrieved with Fortran interface
+   */
+   void CDomain::convertLonLatValue(void)
+   TRY
+   {
+     bool lonlatValueExisted = (0 != lonvalue.numElements()) || (0 != latvalue.numElements());
+     if (!lonvalue_2d.isEmpty() && lonlatValueExisted)
+     {
+       lonvalue_2d.resize(ni,nj);
+       latvalue_2d.resize(ni,nj);
+       if (hasBounds)
+       {
+         bounds_lon_2d.resize(nvertex, ni, nj);
+         bounds_lat_2d.resize(nvertex, ni, nj);
+       }
+
+       for (int j = 0; j < nj; ++j)
+       {
+         for (int i = 0; i < ni; ++i)
+         {
+           int k = j * ni + i;
+
+           lonvalue_2d(i,j) = lonvalue(k);
+           latvalue_2d(i,j) = latvalue(k);
+
+           if (hasBounds)
+           {
+             for (int n = 0; n < nvertex; ++n)
+             {
+               bounds_lon_2d(n,i,j) = bounds_lonvalue(n,k);
+               bounds_lat_2d(n,i,j) = bounds_latvalue(n,k);
+             }
+           }
+         }
+       }
+     }
+     else if (!lonvalue_1d.isEmpty()  && lonlatValueExisted)
+     {
+       if (type_attr::rectilinear == type)
+       {
+         if (ni == lonvalue_1d.numElements() && nj == latvalue_1d.numElements())
+         {
+           lonvalue.resize(ni * nj);
+           latvalue.resize(ni * nj);
+           if (hasBounds)
+           {
+             bounds_lonvalue.resize(nvertex, ni * nj);
+             bounds_latvalue.resize(nvertex, ni * nj);
+           }
+
+           for (int j = 0; j < nj; ++j)
+           {
+             for (int i = 0; i < ni; ++i)
+             {
+               int k = j * ni + i;
+
+               lonvalue(k) = lonvalue_1d(i);
+               latvalue(k) = latvalue_1d(j);
+
+               if (hasBounds)
+               {
+                 for (int n = 0; n < nvertex; ++n)
+                 {
+                   bounds_lonvalue(n,k) = bounds_lon_1d(n,i);
+                   bounds_latvalue(n,k) = bounds_lat_1d(n,j);
+                 }
+               }
+             }
+           }
+         }
+         else if (i_index.numElements() == lonvalue_1d.numElements() && j_index.numElements() == latvalue_1d.numElements()  && !lonlatValueExisted)
+         {
+           lonvalue.reference(lonvalue_1d);
+           latvalue.reference(latvalue_1d);
+            if (hasBounds)
+           {
+             bounds_lonvalue.reference(bounds_lon_1d);
+             bounds_latvalue.reference(bounds_lat_1d);
+           }
+         }
+         else
+           ERROR("CDomain::completeLonClient(void)",
+                 << "[ id = " << this->getId() << " , context = '" << CObjectFactory::GetCurrentContextId() << " ] "
+                 << "'lonvalue_1d' and 'latvalue_1d' does not have the same size as the local domain." << std::endl
+                 << "'lonvalue_1d' size is " << lonvalue_1d.numElements() 
+                 << " and 'latvalue_1d' size is " << latvalue_1d.numElements() << std::endl 
+                 << " They should be correspondingly " << ni.getValue() << " and "  << nj.getValue() << " or " << std::endl
+                 << i_index.numElements() << " and "  << j_index.numElements() << ".");
+       }
+       else if (type == type_attr::curvilinear || type == type_attr::unstructured  && !lonlatValueExisted)
+       {
+         lonvalue.reference(lonvalue_1d);
+         latvalue.reference(latvalue_1d);
+         if (hasBounds)
+         {
+           bounds_lonvalue.reference(bounds_lon_1d);
+           bounds_latvalue.reference(bounds_lat_1d);
+         }
+       }
+     }
+   }
+   CATCH_DUMP_ATTR
+
+   void CDomain::checkBounds(void)
+   TRY
+   {
+     bool hasBoundValues = (0 != bounds_lonvalue.numElements()) || (0 != bounds_latvalue.numElements());
+     if (!nvertex.isEmpty() && nvertex > 0 && !hasBoundValues)
+     {
+       if (!bounds_lon_1d.isEmpty() && !bounds_lon_2d.isEmpty())
+         ERROR("CDomain::checkBounds(void)",
+               << "[ id = " << this->getId() << " , context = '" << CObjectFactory::GetCurrentContextId() << " ] "
+               << "Only one longitude boundary attribute can be used but both 'bounds_lon_1d' and 'bounds_lon_2d' are defined." << std::endl
+               << "Define only one longitude boundary attribute: 'bounds_lon_1d' or 'bounds_lon_2d'.");
+
+       if (!bounds_lat_1d.isEmpty() && !bounds_lat_2d.isEmpty())
+         ERROR("CDomain::checkBounds(void)",
+               << "[ id = " << this->getId() << " , context = '" << CObjectFactory::GetCurrentContextId() << " ] "
+               << "Only one latitude boundary attribute can be used but both 'bounds_lat_1d' and 'bounds_lat_2d' are defined." << std::endl
+               << "Define only one latitude boundary attribute: 'bounds_lat_1d' or 'bounds_lat_2d'.");
+
+       if ((!bounds_lon_1d.isEmpty() && bounds_lat_1d.isEmpty()) || (bounds_lon_1d.isEmpty() && !bounds_lat_1d.isEmpty()))
+       {
+         ERROR("CDomain::checkBounds(void)",
+               << "[ id = " << this->getId() << " , context = '" << CObjectFactory::GetCurrentContextId() << " ] "
+               << "Only 'bounds_lon_1d' or 'bounds_lat_1d' is defined." << std::endl
+               << "Please define either both attributes or none.");
+       }
+
+       if ((!bounds_lon_2d.isEmpty() && bounds_lat_2d.isEmpty()) || (bounds_lon_2d.isEmpty() && !bounds_lat_2d.isEmpty()))
+       {
+         ERROR("CDomain::checkBounds(void)",
+               << "[ id = " << this->getId() << " , context = '" << CObjectFactory::GetCurrentContextId() << " ] "
+               << "Only 'bounds_lon_2d' or 'bounds_lat_2d' is defined." << std::endl
+               << "Please define either both attributes or none.");
+       }
+
+       if (!bounds_lon_1d.isEmpty() && nvertex.getValue() != bounds_lon_1d.extent(0))
+         ERROR("CDomain::checkBounds(void)",
+               << "[ id = " << this->getId() << " , context = '" << CObjectFactory::GetCurrentContextId() << " ] "
+               << "'bounds_lon_1d' dimension is not compatible with 'nvertex'." << std::endl
+               << "'bounds_lon_1d' dimension is " << bounds_lon_1d.extent(0)
+               << " but nvertex is " << nvertex.getValue() << ".");
+
+       if (!bounds_lon_2d.isEmpty() && nvertex.getValue() != bounds_lon_2d.extent(0))
+         ERROR("CDomain::checkBounds(void)",
+               << "[ id = " << this->getId() << " , context = '" << CObjectFactory::GetCurrentContextId() << " ] "
+               << "'bounds_lon_2d' dimension is not compatible with 'nvertex'." << std::endl
+               << "'bounds_lon_2d' dimension is " << bounds_lon_2d.extent(0)
+               << " but nvertex is " << nvertex.getValue() << ".");
+
+       if (!bounds_lon_1d.isEmpty() && lonvalue_1d.isEmpty())
+         ERROR("CDomain::checkBounds(void)",
+               << "[ id = " << this->getId() << " , context = '" << CObjectFactory::GetCurrentContextId() << " ] "
+               << "Since 'bounds_lon_1d' is defined, 'lonvalue_1d' must be defined too." << std::endl);
+
+       if (!bounds_lon_2d.isEmpty() && lonvalue_2d.isEmpty())
+         ERROR("CDomain::checkBounds(void)",
+               << "[ id = " << this->getId() << " , context = '" << CObjectFactory::GetCurrentContextId() << " ] "
+               << "Since 'bounds_lon_2d' is defined, 'lonvalue_2d' must be defined too." << std::endl);
+
+       if (!bounds_lat_1d.isEmpty() && nvertex.getValue() != bounds_lat_1d.extent(0))
+         ERROR("CDomain::checkBounds(void)",
+               << "[ id = " << this->getId() << " , context = '" << CObjectFactory::GetCurrentContextId() << " ] "
+               << "'bounds_lat_1d' dimension is not compatible with 'nvertex'." << std::endl
+               << "'bounds_lat_1d' dimension is " << bounds_lat_1d.extent(0)
+               << " but nvertex is " << nvertex.getValue() << ".");
+
+       if (!bounds_lat_2d.isEmpty() && nvertex.getValue() != bounds_lat_2d.extent(0))
+         ERROR("CDomain::checkBounds(void)",
+               << "[ id = " << this->getId() << " , context = '" << CObjectFactory::GetCurrentContextId() << " ] "
+               << "'bounds_lat_2d' dimension is not compatible with 'nvertex'." << std::endl
+               << "'bounds_lat_2d' dimension is " << bounds_lat_2d.extent(0)
+               << " but nvertex is " << nvertex.getValue() << ".");
+
+       if (!bounds_lat_1d.isEmpty() && latvalue_1d.isEmpty())
+         ERROR("CDomain::checkBounds(void)",
+               << "[ id = " << this->getId() << " , context = '" << CObjectFactory::GetCurrentContextId() << " ] "
+               << "Since 'bounds_lat_1d' is defined, 'latvalue_1d' must be defined too." << std::endl);
+
+       if (!bounds_lat_2d.isEmpty() && latvalue_2d.isEmpty())
+         ERROR("CDomain::checkBounds(void)",
+               << "Since 'bounds_lat_2d' is defined, 'latvalue_2d' must be defined too." << std::endl);
+
+       // In case of reading UGRID bounds values are not required
+       hasBounds = (!bounds_lat_1d.isEmpty() || !bounds_lat_2d.isEmpty() );
+     }
+     else if (hasBoundValues)
+     {
+       hasBounds = true;       
+     }
+     else
+     {
+       hasBounds = false;
+     }
+   }
+   CATCH_DUMP_ATTR
+
+   void CDomain::checkArea(void)
+   TRY
+   {
+     bool hasAreaValue = (!areavalue.isEmpty() && 0 != areavalue.numElements());
+     hasArea = !area.isEmpty();
+     if (hasArea && !hasAreaValue)
+     {
+       if (area.extent(0) != ni || area.extent(1) != nj)
+       {
+         ERROR("CDomain::checkArea(void)",
+               << "[ id = " << this->getId() << " , context = '" << CObjectFactory::GetCurrentContextId() << " ] "
+               << "The area does not have the same size as the local domain." << std::endl
+               << "Local size is " << ni.getValue() << " x " << nj.getValue() << "." << std::endl
+               << "Area size is " << area.extent(0) << " x " << area.extent(1) << ".");
+       }
+//       if (areavalue.isEmpty())
+//       {
+//          areavalue.resize(ni*nj);
+//         for (int j = 0; j < nj; ++j)
+//         {
+//           for (int i = 0; i < ni; ++i)
+//           {
+//             int k = j * ni + i;
+//             areavalue(k) = area(i,j);
+//           }
+//         }
+//       }
+     }
+   }
+   CATCH_DUMP_ATTR
+
+   void CDomain::checkLonLat()
+   TRY
+   {
+     if (!hasLonLat) hasLonLat = (!latvalue_1d.isEmpty() && !lonvalue_1d.isEmpty()) ||
+                                 (!latvalue_2d.isEmpty() && !lonvalue_2d.isEmpty());
+     bool hasLonLatValue = (0 != lonvalue.numElements()) || (0 != latvalue.numElements());
+     if (hasLonLat && !hasLonLatValue)
+     {
+       if (!lonvalue_1d.isEmpty() && !lonvalue_2d.isEmpty())
+         ERROR("CDomain::checkLonLat()",
+               << "[ id = " << this->getId() << " , context = '" << CObjectFactory::GetCurrentContextId() << " ] "
+               << "Only one longitude attribute can be used but both 'lonvalue_1d' and 'lonvalue_2d' are defined." << std::endl
+               << "Define only one longitude attribute: 'lonvalue_1d' or 'lonvalue_2d'.");
+
+       if (!lonvalue_1d.isEmpty() && lonvalue_2d.isEmpty())
+       {
+         if ((type_attr::rectilinear != type) && (lonvalue_1d.numElements() != i_index.numElements()))
+           ERROR("CDomain::checkLonLat()",
+                 << "[ id = " << this->getId() << " , context = '" << CObjectFactory::GetCurrentContextId() << " ] "
+                 << "'lonvalue_1d' does not have the same size as the local domain." << std::endl
+                 << "Local size is " << i_index.numElements() << "." << std::endl
+                 << "'lonvalue_1d' size is " << lonvalue_1d.numElements() << ".");
+       }
+
+       if (lonvalue_1d.isEmpty() && !lonvalue_2d.isEmpty())
+       {
+         if (lonvalue_2d.extent(0) != ni || lonvalue_2d.extent(1) != nj)
+           ERROR("CDomain::checkLonLat()",
+                 << "[ id = " << this->getId() << " , context = '" << CObjectFactory::GetCurrentContextId() << " ] "
+                 << "'lonvalue_2d' does not have the same size as the local domain." << std::endl
+                 << "Local size is " << ni.getValue() << " x " << nj.getValue() << "." << std::endl
+                 << "'lonvalue_2d' size is " << lonvalue_2d.extent(0) << " x " << lonvalue_2d.extent(1) << ".");
+       }
+
+       if (!latvalue_1d.isEmpty() && !latvalue_2d.isEmpty())
+         ERROR("CDomain::checkLonLat()",
+               << "[ id = " << this->getId() << " , context = '" << CObjectFactory::GetCurrentContextId() << " ] "
+               << "Only one latitude attribute can be used but both 'latvalue_1d' and 'latvalue_2d' are defined." << std::endl
+               << "Define only one latitude attribute: 'latvalue_1d' or 'latvalue_2d'.");
+
+       if (!latvalue_1d.isEmpty() && latvalue_2d.isEmpty())
+       {
+         if ((type_attr::rectilinear != type) && (latvalue_1d.numElements() != i_index.numElements()))
+           ERROR("CDomain::checkLonLat()",
+                 << "[ id = " << this->getId() << " , context = '" << CObjectFactory::GetCurrentContextId() << " ] "
+                 << "'latvalue_1d' does not have the same size as the local domain." << std::endl
+                 << "Local size is " << i_index.numElements() << "." << std::endl
+                 << "'latvalue_1d' size is " << latvalue_1d.numElements() << ".");
+       }
+
+       if (latvalue_1d.isEmpty() && !latvalue_2d.isEmpty())
+       {
+         if (latvalue_2d.extent(0) != ni || latvalue_2d.extent(1) != nj)
+           ERROR("CDomain::checkLonLat()",
+                 << "[ id = " << this->getId() << " , context = '" << CObjectFactory::GetCurrentContextId() << " ] "
+                 << "'latvalue_2d' does not have the same size as the local domain." << std::endl
+                 << "Local size is " << ni.getValue() << " x " << nj.getValue() << "." << std::endl
+                 << "'latvalue_2d' size is " << latvalue_2d.extent(0) << " x " << latvalue_2d.extent(1) << ".");
+       }
+     }
+   }
+   CATCH_DUMP_ATTR
+
+   void CDomain::checkAttributesOnClientAfterTransformation()
+   TRY
+   {
+     CContext* context=CContext::getCurrent() ;
+
+     if (this->isClientAfterTransformationChecked) return;
+     if (context->hasClient)
+     {
+      this->computeConnectedClients();
+       if (hasLonLat)
+         if (!context->hasServer)
+           this->completeLonLatClient();
+     }
+
+     this->isClientAfterTransformationChecked = true;
+   }
+   CATCH_DUMP_ATTR
+
+   //----------------------------------------------------------------
+   // Divide function checkAttributes into 2 seperate ones
+   // This function only checks all attributes of current domain
+   void CDomain::checkAttributesOnClient()
+   TRY
+   {
+     if (this->isClientChecked) return;
+     CContext* context=CContext::getCurrent();
+
+      if (context->hasClient && !context->hasServer)
+      {
+        this->checkDomain();
+        this->checkBounds();
+        this->checkArea();
+        this->checkLonLat();
+      }
+
+      if (context->hasClient && !context->hasServer)
+      { // Ct client uniquement
+         this->checkMask();
+         this->checkDomainData();
+         this->checkCompression();
+         this->computeLocalMask() ;
+      }
+      else
+      { // Ct serveur uniquement
+      }
+
+      this->isClientChecked = true;
+   }
+   CATCH_DUMP_ATTR
+
+   // Send all checked attributes to server
+   void CDomain::sendCheckedAttributes()
+   TRY
+   {
+     if (!this->isClientChecked) checkAttributesOnClient();
+     if (!this->isClientAfterTransformationChecked) checkAttributesOnClientAfterTransformation();
+     CContext* context=CContext::getCurrent() ;
+
+     if (this->isChecked) return;
+     if (context->hasClient)
+     {
+       sendAttributes();
+     }
+     this->isChecked = true;
+   }
+   CATCH_DUMP_ATTR
+
+   void CDomain::checkAttributes(void)
+   TRY
+   {
+      if (this->isChecked) return;
+      CContext* context=CContext::getCurrent() ;
+
+      this->checkDomain();
+      this->checkLonLat();
+      this->checkBounds();
+      this->checkArea();
+
+      if (context->hasClient)
+      { // Ct client uniquement
+         this->checkMask();
+         this->checkDomainData();
+         this->checkCompression();
+         this->computeLocalMask() ;
+
+      }
+      else
+      { // Ct serveur uniquement
+      }
+
+      if (context->hasClient)
+      {
+        this->computeConnectedClients();
+        this->completeLonLatClient();
+      }
+
+      this->isChecked = true;
+   }
+   CATCH_DUMP_ATTR
+
+  /*!
+     Compute the connection of a client to other clients to determine which clients to send attributes to.
+     The sending clients are supposed to already know the distribution of receiving clients (In simple cases, it's band)
+     The connection among clients is calculated by using global index. 
+     A client connects to other clients which holds the same global index as it.     
+  */
+  void CDomain::computeConnectedClients()
+  TRY
+  {
+    CContext* context=CContext::getCurrent() ;
+    
+    // This line should be changed soon.
+    int nbSrvPools = (context->hasServer) ? (context->hasClient ? context->clientPrimServer.size() : 0) : 1;
+
+    nbSenders.clear();
+    connectedServerRank_.clear();
+
+    for (int p = 0; p < nbSrvPools; ++p)
+    {
+      CContextClient* client = (0 != context->clientPrimServer.size()) ? context->clientPrimServer[p] : context->client;
+      int nbServer = client->serverSize;
+      int nbClient = client->clientSize;
+      int rank     = client->clientRank;
+      bool doComputeGlobalIndexServer = true;
+
+      if (connectedServerRank_.find(nbServer) == connectedServerRank_.end())
+      {
+
+        if (indSrv_.find(nbServer) == indSrv_.end())
+        {
+          int i,j,i_ind,j_ind, nbIndex=i_index.numElements();
+          int globalIndexCount = i_index.numElements();
+          // Fill in index
+          CArray<size_t,1> globalIndexDomain(nbIndex);
+          size_t globalIndex;
+
+          for (i = 0; i < nbIndex; ++i)
+          {
+            i_ind=i_index(i);
+            j_ind=j_index(i);
+            globalIndex = i_ind + j_ind * ni_glo;
+            globalIndexDomain(i) = globalIndex;
+          }
+
+          if (globalLocalIndexMap_.empty())
+          {
+            for (i = 0; i < nbIndex; ++i)
+              globalLocalIndexMap_[globalIndexDomain(i)] = i;
+          }
+
+          size_t globalSizeIndex = 1, indexBegin, indexEnd;
+          int range, clientSize = client->clientSize;
+          std::vector<int> nGlobDomain(2);
+          nGlobDomain[0] = this->ni_glo;
+          nGlobDomain[1] = this->nj_glo;
+          for (int i = 0; i < nGlobDomain.size(); ++i) globalSizeIndex *= nGlobDomain[i];
+          indexBegin = 0;
+          if (globalSizeIndex <= clientSize)
+          {
+            indexBegin = rank%globalSizeIndex;
+            indexEnd = indexBegin;
+          }
+          else
+          {
+            for (int i = 0; i < clientSize; ++i)
+            {
+              range = globalSizeIndex / clientSize;
+              if (i < (globalSizeIndex%clientSize)) ++range;
+              if (i == client->clientRank) break;
+              indexBegin += range;
+            }
+            indexEnd = indexBegin + range - 1;
+          }
+
+          // Even if servers have no index, they must received something from client
+          // We only use several client to send "empty" message to these servers
+          CServerDistributionDescription serverDescription(nGlobDomain, nbServer);
+          std::vector<int> serverZeroIndex;
+          if (isUnstructed_) serverZeroIndex = serverDescription.computeServerGlobalIndexInRange(std::make_pair<size_t&,size_t&>(indexBegin, indexEnd), 0);
+          else serverZeroIndex = serverDescription.computeServerGlobalIndexInRange(std::make_pair<size_t&,size_t&>(indexBegin, indexEnd), 1);
+
+          std::list<int> serverZeroIndexLeader;
+          std::list<int> serverZeroIndexNotLeader;
+          CContextClient::computeLeader(client->clientRank, client->clientSize, serverZeroIndex.size(), serverZeroIndexLeader, serverZeroIndexNotLeader);
+          for (std::list<int>::iterator it = serverZeroIndexLeader.begin(); it != serverZeroIndexLeader.end(); ++it)
+            *it = serverZeroIndex[*it];
+
+          CClientServerMapping* clientServerMap = new CClientServerMappingDistributed(serverDescription.getGlobalIndexRange(), client->intraComm);
+          clientServerMap->computeServerIndexMapping(globalIndexDomain, nbServer);
+          CClientServerMapping::GlobalIndexMap& globalIndexDomainOnServer = clientServerMap->getGlobalIndexOnServer();
+
+          CClientServerMapping::GlobalIndexMap::const_iterator it  = globalIndexDomainOnServer.begin(),
+                 ite = globalIndexDomainOnServer.end();
+          indSrv_[nbServer].swap(globalIndexDomainOnServer);
+          connectedServerRank_[nbServer].clear();
+          for (it = indSrv_[nbServer].begin(); it != ite; ++it)
+            connectedServerRank_[nbServer].push_back(it->first);
+
+          for (std::list<int>::const_iterator it = serverZeroIndexLeader.begin(); it != serverZeroIndexLeader.end(); ++it)
+            connectedServerRank_[nbServer].push_back(*it);
+
+          // Even if a client has no index, it must connect to at least one server and
+          // send an "empty" data to this server
+          if (connectedServerRank_[nbServer].empty())
+            connectedServerRank_[nbServer].push_back(client->clientRank % client->serverSize);
+
+          // Now check if all servers have data to receive. If not, master client will send empty data.
+          // This ensures that all servers will participate in collective calls upon receiving even if they have no date to receive.
+          std::vector<int> counts (clientSize);
+          std::vector<int> displs (clientSize);
+          displs[0] = 0;
+          int localCount = connectedServerRank_[nbServer].size() ;
+          MPI_Gather(&localCount, 1, MPI_INT, &counts[0], 1, MPI_INT, 0, client->intraComm) ;
+          for (int i = 0; i < clientSize-1; ++i)
+          {
+            displs[i+1] = displs[i] + counts[i];
+          }
+          std::vector<int> allConnectedServers(displs[clientSize-1]+counts[clientSize-1]);
+          MPI_Gatherv(&(connectedServerRank_[nbServer])[0], localCount, MPI_INT, &allConnectedServers[0], &counts[0], &displs[0], MPI_INT, 0, client->intraComm);
+
+          if ((allConnectedServers.size() != nbServer) && (rank == 0))
+          {
+            std::vector<bool> isSrvConnected (nbServer, false);
+            for (int i = 0; i < allConnectedServers.size(); ++i) isSrvConnected[allConnectedServers[i]] = true;
+            for (int i = 0; i < nbServer; ++i)
+            {
+              if (!isSrvConnected[i]) connectedServerRank_[nbServer].push_back(i);
+            }
+          }
+          nbSenders[nbServer] = clientServerMap->computeConnectedClients(client->serverSize, client->clientSize, client->intraComm, connectedServerRank_[nbServer]);
+          delete clientServerMap;
+        }
+      }
+    }
+  }
+  CATCH_DUMP_ATTR
+
+   /*!
+     Compute index to write data. We only write data on the zoomed region, therefore, there should
+     be a map between the complete grid and the reduced grid where we write data.
+     By using global index we can easily create this kind of mapping.
+   */
+   void CDomain::computeWrittenIndex()
+   TRY
+   {  
+      if (computedWrittenIndex_) return;
+      computedWrittenIndex_ = true;
+
+      CContext* context=CContext::getCurrent();      
+      CContextServer* server = context->server;  
+
+      std::vector<int> nBegin(2), nSize(2), nBeginGlobal(2), nGlob(2);
+      nBegin[0]       = ibegin;  nBegin[1] = jbegin;
+      nSize[0]        = ni;      nSize[1]  = nj;
+      nBeginGlobal[0] = 0; nBeginGlobal[1] = 0;
+      nGlob[0]        = ni_glo;   nGlob[1] = nj_glo;
+      CDistributionServer srvDist(server->intraCommSize, nBegin, nSize, nBeginGlobal, nGlob); 
+      const CArray<size_t,1>& writtenGlobalIndex  = srvDist.getGlobalIndex();
+
+      size_t nbWritten = 0, indGlo;      
+      std::unordered_map<size_t,size_t>::const_iterator itb = globalLocalIndexMap_.begin(),
+                                                          ite = globalLocalIndexMap_.end(), it;          
+      CArray<size_t,1>::const_iterator itSrvb = writtenGlobalIndex.begin(),
+                                       itSrve = writtenGlobalIndex.end(), itSrv;
+
+      localIndexToWriteOnServer.resize(writtenGlobalIndex.numElements());
+      nbWritten = 0;
+      for (itSrv = itSrvb; itSrv != itSrve; ++itSrv)
+      {
+        indGlo = *itSrv;
+        if (ite != globalLocalIndexMap_.find(indGlo))
+        {
+          localIndexToWriteOnServer(nbWritten) = globalLocalIndexMap_[indGlo];
+        }
+        else
+        {
+          localIndexToWriteOnServer(nbWritten) = -1;
+        }
+        ++nbWritten;
+      }
+   }
+   CATCH_DUMP_ATTR
+
+  void CDomain::computeWrittenCompressedIndex(MPI_Comm writtenComm)
+  TRY
+  {
+    int writtenCommSize;
+    MPI_Comm_size(writtenComm, &writtenCommSize);
+    if (compressedIndexToWriteOnServer.find(writtenCommSize) != compressedIndexToWriteOnServer.end())
+      return;
+
+    if (isCompressible())
+    {
+      size_t nbWritten = 0, indGlo;
+      CContext* context=CContext::getCurrent();      
+      CContextServer* server = context->server;  
+
+      std::vector<int> nBegin(2), nSize(2), nBeginGlobal(2), nGlob(2);
+      nBegin[0]       = ibegin;  nBegin[1] = jbegin;
+      nSize[0]        = ni;      nSize[1]  = nj;
+      nBeginGlobal[0] = 0; nBeginGlobal[1] = 0;
+      nGlob[0]        = ni_glo;   nGlob[1] = nj_glo;
+      CDistributionServer srvDist(server->intraCommSize, nBegin, nSize, nBeginGlobal, nGlob); 
+      const CArray<size_t,1>& writtenGlobalIndex  = srvDist.getGlobalIndex();
+
+      std::unordered_map<size_t,size_t>::const_iterator itb = globalLocalIndexMap_.begin(),
+                                                          ite = globalLocalIndexMap_.end(), it;   
+      CArray<size_t,1>::const_iterator itSrvb = writtenGlobalIndex.begin(),
+                                       itSrve = writtenGlobalIndex.end(), itSrv;
+      std::unordered_map<size_t,size_t> localGlobalIndexMap;
+      for (itSrv = itSrvb; itSrv != itSrve; ++itSrv)
+      {
+        indGlo = *itSrv;
+        if (ite != globalLocalIndexMap_.find(indGlo))
+        {
+          localGlobalIndexMap[localIndexToWriteOnServer(nbWritten)] = indGlo;
+          ++nbWritten;
+        }                 
+      }
+
+      nbWritten = 0;
+      for (int idx = 0; idx < data_i_index.numElements(); ++idx)
+      {
+        if (localGlobalIndexMap.end() != localGlobalIndexMap.find(data_i_index(idx)))
+        {
+          ++nbWritten;
+        }
+      }
+
+      compressedIndexToWriteOnServer[writtenCommSize].resize(nbWritten);
+      nbWritten = 0;
+      for (int idx = 0; idx < data_i_index.numElements(); ++idx)
+      {
+        if (localGlobalIndexMap.end() != localGlobalIndexMap.find(data_i_index(idx)))
+        {
+          compressedIndexToWriteOnServer[writtenCommSize](nbWritten) = localGlobalIndexMap[data_i_index(idx)];
+          ++nbWritten;
+        }
+      }
+
+      numberWrittenIndexes_[writtenCommSize] = nbWritten;
+      if (isDistributed())
+      {
+             
+        MPI_Allreduce(&numberWrittenIndexes_[writtenCommSize], &totalNumberWrittenIndexes_[writtenCommSize], 1, MPI_INT, MPI_SUM, writtenComm);
+        MPI_Scan(&numberWrittenIndexes_[writtenCommSize], &offsetWrittenIndexes_[writtenCommSize], 1, MPI_INT, MPI_SUM, writtenComm);
+        offsetWrittenIndexes_[writtenCommSize] -= numberWrittenIndexes_[writtenCommSize];
+      }
+      else
+        totalNumberWrittenIndexes_[writtenCommSize] = numberWrittenIndexes_[writtenCommSize];
+      }
+  }
+  CATCH_DUMP_ATTR
+
+  /*!
+    Send all attributes from client to connected clients
+    The attributes will be rebuilt on receiving side
+  */
+  void CDomain::sendAttributes()
+  TRY
+  {
+    sendDistributionAttributes();
+    sendIndex();       
+    sendLonLat();
+    sendArea();    
+    sendDataIndex();
+  }
+  CATCH
+  /*!
+    Send global index from client to connected client(s)
+  */
+  void CDomain::sendIndex()
+  TRY
+  {
+    int ns, n, i, j, ind, nv, idx;
+    std::list<CContextClient*>::iterator it;
+    for (it=clients.begin(); it!=clients.end(); ++it)
+    {
+      CContextClient* client = *it;
+
+      int serverSize = client->serverSize;
+      CEventClient eventIndex(getType(), EVENT_ID_INDEX);
+
+      list<CMessage> list_msgsIndex;
+      list<CArray<int,1> > list_indGlob;
+
+      std::unordered_map<int, vector<size_t> >::const_iterator itIndex, iteIndex;
+      iteIndex = indSrv_[serverSize].end();
+      for (int k = 0; k < connectedServerRank_[serverSize].size(); ++k)
+      {
+        int nbIndGlob = 0;
+        int rank = connectedServerRank_[serverSize][k];
+        itIndex = indSrv_[serverSize].find(rank);
+        if (iteIndex != itIndex)
+          nbIndGlob = itIndex->second.size();
+
+        list_indGlob.push_back(CArray<int,1>(nbIndGlob));        
+
+        CArray<int,1>& indGlob = list_indGlob.back();
+        for (n = 0; n < nbIndGlob; ++n)
+        {
+          indGlob(n) = static_cast<int>(itIndex->second[n]);
+        }
+
+        list_msgsIndex.push_back(CMessage());
+        list_msgsIndex.back() << this->getId() << (int)type; // enum ne fonctionne pour les message => ToFix
+        list_msgsIndex.back() << isCurvilinear;
+        list_msgsIndex.back() << list_indGlob.back(); //list_indi.back() << list_indj.back();
+       
+        eventIndex.push(rank, nbSenders[serverSize][rank], list_msgsIndex.back());
+      }
+
+      client->sendEvent(eventIndex);
+    }
+  }
+  CATCH_DUMP_ATTR
+
+  /*!
+    Send distribution from client to other clients
+    Because a client in a level knows correctly the grid distribution of client on the next level
+    it calculates this distribution then sends it to the corresponding clients on the next level
+  */
+  void CDomain::sendDistributionAttributes(void)
+  TRY
+  {
+    std::list<CContextClient*>::iterator it;
+    for (it=clients.begin(); it!=clients.end(); ++it)
+    {
+      CContextClient* client = *it;
+      int nbServer = client->serverSize;
+      std::vector<int> nGlobDomain(2);
+      nGlobDomain[0] = this->ni_glo;
+      nGlobDomain[1] = this->nj_glo;
+
+      CServerDistributionDescription serverDescription(nGlobDomain, nbServer);
+      if (isUnstructed_) serverDescription.computeServerDistribution(false, 0);
+      else serverDescription.computeServerDistribution(false, 1);
+
+      std::vector<std::vector<int> > serverIndexBegin = serverDescription.getServerIndexBegin();
+      std::vector<std::vector<int> > serverDimensionSizes = serverDescription.getServerDimensionSizes();
+
+      CEventClient event(getType(),EVENT_ID_SERVER_ATTRIBUT);
+      if (client->isServerLeader())
+      {
+        std::list<CMessage> msgs;
+
+        const std::list<int>& ranks = client->getRanksServerLeader();
+        for (std::list<int>::const_iterator itRank = ranks.begin(), itRankEnd = ranks.end(); itRank != itRankEnd; ++itRank)
+        {
+          // Use const int to ensure CMessage holds a copy of the value instead of just a reference
+          const int ibegin_srv = serverIndexBegin[*itRank][0];
+          const int jbegin_srv = serverIndexBegin[*itRank][1];
+          const int ni_srv = serverDimensionSizes[*itRank][0];
+          const int nj_srv = serverDimensionSizes[*itRank][1];
+
+          msgs.push_back(CMessage());
+          CMessage& msg = msgs.back();
+          msg << this->getId() ;
+          msg << isUnstructed_;
+          msg << ni_srv << ibegin_srv << nj_srv << jbegin_srv;
+          msg << ni_glo.getValue() << nj_glo.getValue();
+          msg << isCompressible_;
+
+          event.push(*itRank,1,msg);
+        }
+        client->sendEvent(event);
+      }
+      else client->sendEvent(event);
+    }
+  }
+  CATCH_DUMP_ATTR
+
+  /*!
+    Send area from client to connected client(s)
+  */
+  void CDomain::sendArea()
+  TRY
+  {
+    if (!hasArea) return;
+
+    int ns, n, i, j, ind, nv, idx;
+    std::list<CContextClient*>::iterator it;
+
+    for (it=clients.begin(); it!=clients.end(); ++it)
+    {
+      CContextClient* client = *it;
+      int serverSize = client->serverSize;
+
+      // send area for each connected server
+      CEventClient eventArea(getType(), EVENT_ID_AREA);
+
+      list<CMessage> list_msgsArea;
+      list<CArray<double,1> > list_area;
+
+      std::unordered_map<int, vector<size_t> >::const_iterator it, iteMap;
+      iteMap = indSrv_[serverSize].end();
+      for (int k = 0; k < connectedServerRank_[serverSize].size(); ++k)
+      {
+        int nbData = 0;
+        int rank = connectedServerRank_[serverSize][k];
+        it = indSrv_[serverSize].find(rank);
+        if (iteMap != it)
+          nbData = it->second.size();
+        list_area.push_back(CArray<double,1>(nbData));
+
+        const std::vector<size_t>& temp = it->second;
+        for (n = 0; n < nbData; ++n)
+        {
+          idx = static_cast<int>(it->second[n]);
+          list_area.back()(n) = areavalue(globalLocalIndexMap_[idx]);
+        }
+
+        list_msgsArea.push_back(CMessage());
+        list_msgsArea.back() << this->getId() << hasArea;
+        list_msgsArea.back() << list_area.back();
+        eventArea.push(rank, nbSenders[serverSize][rank], list_msgsArea.back());
+      }
+      client->sendEvent(eventArea);
+    }
+  }
+  CATCH_DUMP_ATTR
+
+  /*!
+    Send longitude and latitude from client to servers
+    Each client send long and lat information to corresponding connected clients(s).
+    Because longitude and latitude are optional, this function only called if latitude and longitude exist
+  */
+  void CDomain::sendLonLat()
+  TRY
+  {
+    if (!hasLonLat) return;
+
+    int ns, n, i, j, ind, nv, idx;
+    std::list<CContextClient*>::iterator it;
+    for (it=clients.begin(); it!=clients.end(); ++it)
+    {
+      CContextClient* client = *it;
+      int serverSize = client->serverSize;
+
+      // send lon lat for each connected server
+      CEventClient eventLon(getType(), EVENT_ID_LON);
+      CEventClient eventLat(getType(), EVENT_ID_LAT);
+
+      list<CMessage> list_msgsLon, list_msgsLat;
+      list<CArray<double,1> > list_lon, list_lat;
+      list<CArray<double,2> > list_boundslon, list_boundslat;
+
+      std::unordered_map<int, vector<size_t> >::const_iterator it, iteMap;
+      iteMap = indSrv_[serverSize].end();
+      for (int k = 0; k < connectedServerRank_[serverSize].size(); ++k)
+      {
+        int nbData = 0;
+        int rank = connectedServerRank_[serverSize][k];
+        it = indSrv_[serverSize].find(rank);
+        if (iteMap != it)
+          nbData = it->second.size();
+
+        list_lon.push_back(CArray<double,1>(nbData));
+        list_lat.push_back(CArray<double,1>(nbData));
+
+        if (hasBounds)
+        {
+          list_boundslon.push_back(CArray<double,2>(nvertex, nbData));
+          list_boundslat.push_back(CArray<double,2>(nvertex, nbData));
+        }
+
+        CArray<double,1>& lon = list_lon.back();
+        CArray<double,1>& lat = list_lat.back();
+        const std::vector<size_t>& temp = it->second;
+        for (n = 0; n < nbData; ++n)
+        {
+          idx = static_cast<int>(it->second[n]);
+          int localInd = globalLocalIndexMap_[idx];
+          lon(n) = lonvalue(localInd);
+          lat(n) = latvalue(localInd);
+
+          if (hasBounds)
+          {
+            CArray<double,2>& boundslon = list_boundslon.back();
+            CArray<double,2>& boundslat = list_boundslat.back();
+
+            for (nv = 0; nv < nvertex; ++nv)
+            {
+              boundslon(nv, n) = bounds_lonvalue(nv, localInd);
+              boundslat(nv, n) = bounds_latvalue(nv, localInd);
+            }
+          }
+        }
+
+        list_msgsLon.push_back(CMessage());
+        list_msgsLat.push_back(CMessage());
+
+        list_msgsLon.back() << this->getId() << hasLonLat;
+        if (hasLonLat) 
+          list_msgsLon.back() << list_lon.back();
+        list_msgsLon.back()  << hasBounds;
+        if (hasBounds)
+        {
+          list_msgsLon.back() << list_boundslon.back();
+        }
+
+        list_msgsLat.back() << this->getId() << hasLonLat;
+        if (hasLonLat)
+          list_msgsLat.back() << list_lat.back();
+        list_msgsLat.back() << hasBounds;
+        if (hasBounds)
+        {          
+          list_msgsLat.back() << list_boundslat.back();
+        }
+
+        eventLon.push(rank, nbSenders[serverSize][rank], list_msgsLon.back());
+        eventLat.push(rank, nbSenders[serverSize][rank], list_msgsLat.back());
+      }
+      client->sendEvent(eventLon);
+      client->sendEvent(eventLat);
+    }
+  }
+  CATCH_DUMP_ATTR
+
+  /*!
+    Send data index to corresponding connected clients.
+    Data index can be compressed however, we always send decompressed data index
+    and they will be compressed on receiving.
+    The compressed index are represented with 1 and others are represented with -1
+  */
+  void CDomain::sendDataIndex()
+  TRY
+  {
+    int ns, n, i, j, ind, nv, idx;
+    std::list<CContextClient*>::iterator it;
+    for (it=clients.begin(); it!=clients.end(); ++it)
+    {
+      CContextClient* client = *it;
+
+      int serverSize = client->serverSize;
+
+      // send area for each connected server
+      CEventClient eventDataIndex(getType(), EVENT_ID_DATA_INDEX);
+
+      list<CMessage> list_msgsDataIndex;
+      list<CArray<int,1> > list_data_i_index, list_data_j_index;
+
+      int nbIndex = i_index.numElements();
+      int niByIndex = max(i_index) - min(i_index) + 1;
+      int njByIndex = max(j_index) - min(j_index) + 1; 
+      int dataIindexBound = (1 == data_dim) ? (niByIndex * njByIndex) : niByIndex;
+      int dataJindexBound = (1 == data_dim) ? (niByIndex * njByIndex) : njByIndex;
+
+      
+      CArray<int,1> dataIIndex(nbIndex), dataJIndex(nbIndex);
+      dataIIndex = -1; 
+      dataJIndex = -1;
+      ind = 0;
+
+      for (idx = 0; idx < data_i_index.numElements(); ++idx)
+      {
+        int dataIidx = data_i_index(idx) + data_ibegin;
+        int dataJidx = data_j_index(idx) + data_jbegin;
+        if ((0 <= dataIidx) && (dataIidx < dataIindexBound) &&
+            (0 <= dataJidx) && (dataJidx < dataJindexBound))
+        {
+          dataIIndex((1 == data_dim) ? dataIidx : dataJidx * ni + dataIidx) = 1; //i_index(dataIidx);//dataIidx;
+          dataJIndex((1 == data_dim) ? dataIidx : dataJidx * ni + dataIidx) = 1; //j_index(dataJidx);//          
+        }
+      }
+
+      std::unordered_map<int, vector<size_t> >::const_iterator it, iteMap;
+      iteMap = indSrv_[serverSize].end();
+      for (int k = 0; k < connectedServerRank_[serverSize].size(); ++k)
+      {
+        int nbData = 0;
+        int rank = connectedServerRank_[serverSize][k];
+        it = indSrv_[serverSize].find(rank);
+        if (iteMap != it)
+          nbData = it->second.size();
+        list_data_i_index.push_back(CArray<int,1>(nbData));
+        list_data_j_index.push_back(CArray<int,1>(nbData));
+
+        const std::vector<size_t>& temp = it->second;
+        for (n = 0; n < nbData; ++n)
+        {
+          idx = static_cast<int>(it->second[n]);
+          i = globalLocalIndexMap_[idx];
+          list_data_i_index.back()(n) = dataIIndex(i);
+          list_data_j_index.back()(n) = dataJIndex(i);
+        }
+
+        list_msgsDataIndex.push_back(CMessage());
+        list_msgsDataIndex.back() << this->getId();
+        list_msgsDataIndex.back() << list_data_i_index.back() << list_data_j_index.back();
+        eventDataIndex.push(rank, nbSenders[serverSize][rank], list_msgsDataIndex.back());
+      }
+      client->sendEvent(eventDataIndex);
+    }
+  }
+  CATCH
+  
+  bool CDomain::dispatchEvent(CEventServer& event)
+  TRY
+  {
+    if (SuperClass::dispatchEvent(event)) return true;
+    else
+    {
+      switch(event.type)
+      {
+        case EVENT_ID_SERVER_ATTRIBUT:
+          recvDistributionAttributes(event);
+          return true;
+          break;
+        case EVENT_ID_INDEX:
+          recvIndex(event);
+          return true;
+          break;
+        case EVENT_ID_LON:
+          recvLon(event);
+          return true;
+          break;
+        case EVENT_ID_LAT:
+          recvLat(event);
+          return true;
+          break;
+        case EVENT_ID_AREA:
+          recvArea(event);
+          return true;
+          break;  
+        case EVENT_ID_DATA_INDEX:
+          recvDataIndex(event);
+          return true;
+          break;
+        default:
+          ERROR("bool CDomain::dispatchEvent(CEventServer& event)",
+                << "Unknown Event");
+          return false;
+       }
+    }
+  }
+  CATCH
+
+  /*!
+    Receive index event from clients(s)
+    \param[in] event event contain info about rank and associated index
+  */
+  void CDomain::recvIndex(CEventServer& event)
+  TRY
+  {
+    string domainId;
+    std::map<int, CBufferIn*> rankBuffers;
+
+    list<CEventServer::SSubEvent>::iterator it;
+    for (it = event.subEvents.begin(); it != event.subEvents.end(); ++it)
+    {      
+      CBufferIn* buffer = it->buffer;
+      *buffer >> domainId;
+      rankBuffers[it->rank] = buffer;        
+    }
+    get(domainId)->recvIndex(rankBuffers);
+  }
+  CATCH
+
+  /*!
+    Receive index information from client(s). We use the global index for mapping index between
+    sending clients and receiving clients.
+    \param[in] rankBuffers rank of sending client and the corresponding receive buffer  
+  */
+  void CDomain::recvIndex(std::map<int, CBufferIn*>& rankBuffers)
+  TRY
+  {
+    int nbReceived = rankBuffers.size(), i, ind, index, type_int, iIndex, jIndex;
+    recvClientRanks_.resize(nbReceived);        
+
+    std::map<int, CBufferIn*>::iterator it = rankBuffers.begin(), ite = rankBuffers.end();
+    ind = 0;
+    for (ind = 0; it != ite; ++it, ++ind)
+    {       
+       recvClientRanks_[ind] = it->first;
+       CBufferIn& buffer = *(it->second);
+       buffer >> type_int >> isCurvilinear >> indGlob_[it->first]; 
+       type.setValue((type_attr::t_enum)type_int); // probleme des type enum avec les buffers : ToFix
+    }
+    int nbIndGlob = 0;
+    for (i = 0; i < nbReceived; ++i)
+    {
+      nbIndGlob += indGlob_[recvClientRanks_[i]].numElements();
+    }
+    
+    globalLocalIndexMap_.rehash(std::ceil(nbIndGlob/globalLocalIndexMap_.max_load_factor()));
+    i_index.resize(nbIndGlob);
+    j_index.resize(nbIndGlob);   
+    int nbIndexGlobMax = nbIndGlob, nbIndLoc;
+
+    nbIndGlob = 0;
+    for (i = 0; i < nbReceived; ++i)
+    {
+      CArray<int,1>& tmp = indGlob_[recvClientRanks_[i]];
+      for (ind = 0; ind < tmp.numElements(); ++ind)
+      {
+         index = tmp(ind);
+         if (0 == globalLocalIndexMap_.count(index))
+         {
+           iIndex = (index%ni_glo)-ibegin;
+           iIndex = (iIndex < 0) ? 0 : iIndex;
+           jIndex = (index/ni_glo)-jbegin;
+           jIndex = (jIndex < 0) ? 0 : jIndex;
+           nbIndLoc = iIndex + ni * jIndex;
+           i_index(nbIndGlob) = index % ni_glo;
+           j_index(nbIndGlob) = index / ni_glo;
+           globalLocalIndexMap_[index] = nbIndGlob;
+           ++nbIndGlob;
+         } 
+      } 
+    } 
+
+    if (nbIndGlob==0)
+    {
+      i_index.resize(nbIndGlob);
+      j_index.resize(nbIndGlob);
+    }
+    else
+    {
+      i_index.resizeAndPreserve(nbIndGlob);
+      j_index.resizeAndPreserve(nbIndGlob);
+    }
+
+    domainMask.resize(0); // Mask is not defined anymore on servers
+  }
+  CATCH
+
+  /*!
+    Receive attributes event from clients(s)
+    \param[in] event event contain info about rank and associated attributes
+  */
+  void CDomain::recvDistributionAttributes(CEventServer& event)
+  TRY
+  {
+    CBufferIn* buffer=event.subEvents.begin()->buffer;
+    string domainId ;
+    *buffer>>domainId ;
+    get(domainId)->recvDistributionAttributes(*buffer);
+  }
+  CATCH
+
+  /*!
+    Receive attributes from client(s)
+    \param[in] rank rank of client source
+    \param[in] buffer message containing attributes info
+  */
+  void CDomain::recvDistributionAttributes(CBufferIn& buffer)
+  TRY
+  {
+    int ni_tmp, ibegin_tmp, nj_tmp, jbegin_tmp;
+    int ni_glo_tmp, nj_glo_tmp;
+    buffer >> isUnstructed_ >> ni_tmp >> ibegin_tmp >> nj_tmp >> jbegin_tmp
+           >> ni_glo_tmp >> nj_glo_tmp
+           >> isCompressible_;
+
+    ni.setValue(ni_tmp);
+    ibegin.setValue(ibegin_tmp);
+    nj.setValue(nj_tmp);
+    jbegin.setValue(jbegin_tmp);
+    ni_glo.setValue(ni_glo_tmp);
+    nj_glo.setValue(nj_glo_tmp);
+
+  }
+ CATCH_DUMP_ATTR
+  /*!
+    Receive longitude event from clients(s)
+    \param[in] event event contain info about rank and associated longitude
+  */
+  void CDomain::recvLon(CEventServer& event)
+  TRY
+  {
+    string domainId;
+    std::map<int, CBufferIn*> rankBuffers;
+
+    list<CEventServer::SSubEvent>::iterator it;
+    for (it = event.subEvents.begin(); it != event.subEvents.end(); ++it)
+    {      
+      CBufferIn* buffer = it->buffer;
+      *buffer >> domainId;
+      rankBuffers[it->rank] = buffer;        
+    }
+    get(domainId)->recvLon(rankBuffers);
+  }
+  CATCH
+
+  /*!
+    Receive longitude information from client(s)
+    \param[in] rankBuffers rank of sending client and the corresponding receive buffer  
+  */
+  void CDomain::recvLon(std::map<int, CBufferIn*>& rankBuffers)
+  TRY
+  {
+    int nbReceived = rankBuffers.size(), i, ind, index, iindex, jindex, lInd;
+    if (nbReceived != recvClientRanks_.size())
+      ERROR("void CDomain::recvLon(std::map<int, CBufferIn*>& rankBuffers)",
+           << "The number of sending clients is not correct."
+           << "Expected number: " << recvClientRanks_.size() << " but received " << nbReceived);
+
+    vector<CArray<double,1> > recvLonValue(nbReceived);
+    vector<CArray<double,2> > recvBoundsLonValue(nbReceived);    
+    for (i = 0; i < recvClientRanks_.size(); ++i)
+    {
+      int rank = recvClientRanks_[i];
+      CBufferIn& buffer = *(rankBuffers[rank]);
+      buffer >> hasLonLat;
+      if (hasLonLat)
+        buffer >> recvLonValue[i];
+      buffer >> hasBounds;
+      if (hasBounds)
+        buffer >> recvBoundsLonValue[i];
+    }
+
+    if (hasLonLat)
+    {
+      int nbLonInd = 0;
+      for (i = 0; i < nbReceived; ++i)
+      {
+        nbLonInd += recvLonValue[i].numElements();
+      }
+    
+      if (nbLonInd != globalLocalIndexMap_.size())
+        info (0) << "If domain " << this->getDomainOutputName() <<" does not have overlapped regions between processes "
+                 << "something must be wrong with longitude index "<< std::endl;
+
+      nbLonInd = globalLocalIndexMap_.size();
+      lonvalue.resize(nbLonInd);
+      if (hasBounds)
+      {
+        bounds_lonvalue.resize(nvertex,nbLonInd);
+        bounds_lonvalue = 0.;
+      }
+
+      nbLonInd = 0;
+      for (i = 0; i < nbReceived; ++i)
+      {
+        CArray<int,1>& tmpInd = indGlob_[recvClientRanks_[i]];
+        CArray<double,1>& tmp = recvLonValue[i];
+        for (ind = 0; ind < tmp.numElements(); ++ind)
+        {
+          lInd = globalLocalIndexMap_[size_t(tmpInd(ind))];
+          lonvalue(lInd) = tmp(ind); 
+           if (hasBounds)
+           {          
+            for (int nv = 0; nv < nvertex; ++nv)
+              bounds_lonvalue(nv, lInd) = recvBoundsLonValue[i](nv, ind);
+           }                  
+        }
+      }       
+    }
+  }
+  CATCH_DUMP_ATTR
+
+  /*!
+    Receive latitude event from clients(s)
+    \param[in] event event contain info about rank and associated latitude
+  */
+  void CDomain::recvLat(CEventServer& event)
+  TRY
+  {
+    string domainId;
+    std::map<int, CBufferIn*> rankBuffers;
+
+    list<CEventServer::SSubEvent>::iterator it;
+    for (it = event.subEvents.begin(); it != event.subEvents.end(); ++it)
+    {      
+      CBufferIn* buffer = it->buffer;
+      *buffer >> domainId;
+      rankBuffers[it->rank] = buffer;    
+    }
+    get(domainId)->recvLat(rankBuffers);
+  }
+  CATCH
+
+  /*!
+    Receive latitude information from client(s)
+    \param[in] rankBuffers rank of sending client and the corresponding receive buffer  
+  */
+  void CDomain::recvLat(std::map<int, CBufferIn*>& rankBuffers)
+  TRY
+  {
+    int nbReceived = rankBuffers.size(), i, ind, index, iindex, jindex, lInd;
+    if (nbReceived != recvClientRanks_.size())
+      ERROR("void CDomain::recvLat(std::map<int, CBufferIn*>& rankBuffers)",
+           << "The number of sending clients is not correct."
+           << "Expected number: " << recvClientRanks_.size() << " but received " << nbReceived);
+
+    vector<CArray<double,1> > recvLatValue(nbReceived);
+    vector<CArray<double,2> > recvBoundsLatValue(nbReceived);    
+    for (i = 0; i < recvClientRanks_.size(); ++i)
+    {
+      int rank = recvClientRanks_[i];
+      CBufferIn& buffer = *(rankBuffers[rank]);
+      buffer >> hasLonLat;
+      if (hasLonLat)
+        buffer >> recvLatValue[i];
+      buffer >> hasBounds;
+      if (hasBounds)
+        buffer >> recvBoundsLatValue[i];
+    }
+
+    if (hasLonLat)
+    {
+      int nbLatInd = 0;
+      for (i = 0; i < nbReceived; ++i)
+      {
+        nbLatInd += recvLatValue[i].numElements();
+      }
+    
+      if (nbLatInd != globalLocalIndexMap_.size())
+        info (0) << "If domain " << this->getDomainOutputName() <<" does not have overlapped regions between processes "
+                << "something must be wrong with latitude index "<< std::endl;
+
+      nbLatInd = globalLocalIndexMap_.size();
+      latvalue.resize(nbLatInd);
+      if (hasBounds)
+      {
+        bounds_latvalue.resize(nvertex,nbLatInd);
+        bounds_latvalue = 0. ;
+      }
+
+      nbLatInd = 0;
+      for (i = 0; i < nbReceived; ++i)
+      {
+        CArray<int,1>& tmpInd = indGlob_[recvClientRanks_[i]];
+        CArray<double,1>& tmp = recvLatValue[i];
+        for (ind = 0; ind < tmp.numElements(); ++ind)
+        {
+          lInd = globalLocalIndexMap_[size_t(tmpInd(ind))];
+          latvalue(lInd) = tmp(ind);    
+           if (hasBounds)
+           {
+            CArray<double,2>& boundslat = recvBoundsLatValue[i];
+            for (int nv = 0; nv < nvertex; ++nv)
+              bounds_latvalue(nv, lInd) = boundslat(nv, ind);
+           }   
+          ++nbLatInd;
+        }
+      }       
+    }
+  }
+  CATCH_DUMP_ATTR
+
+  /*!
+    Receive area event from clients(s)
+    \param[in] event event contain info about rank and associated area
+  */
+  void CDomain::recvArea(CEventServer& event)
+  TRY
+  {
+    string domainId;
+    std::map<int, CBufferIn*> rankBuffers;
+
+    list<CEventServer::SSubEvent>::iterator it;
+    for (it = event.subEvents.begin(); it != event.subEvents.end(); ++it)
+    {      
+      CBufferIn* buffer = it->buffer;
+      *buffer >> domainId;
+      rankBuffers[it->rank] = buffer;     
+    }
+    get(domainId)->recvArea(rankBuffers);
+  }
+  CATCH
+
+  /*!
+    Receive area information from client(s)
+    \param[in] rankBuffers rank of sending client and the corresponding receive buffer     
+  */
+  void CDomain::recvArea(std::map<int, CBufferIn*>& rankBuffers)
+  TRY
+  {
+    int nbReceived = rankBuffers.size(), i, ind, index, lInd;
+    if (nbReceived != recvClientRanks_.size())
+      ERROR("void CDomain::recvArea(std::map<int, CBufferIn*>& rankBuffers)",
+           << "The number of sending clients is not correct."
+           << "Expected number: " << recvClientRanks_.size() << " but received " << nbReceived);
+
+    vector<CArray<double,1> > recvAreaValue(nbReceived);      
+    for (i = 0; i < recvClientRanks_.size(); ++i)
+    {
+      int rank = recvClientRanks_[i];
+      CBufferIn& buffer = *(rankBuffers[rank]);      
+      buffer >> hasArea;
+      if (hasArea)
+        buffer >> recvAreaValue[i];
+    }
+
+    if (hasArea)
+    {
+      int nbAreaInd = 0;
+      for (i = 0; i < nbReceived; ++i)
+      {      
+        nbAreaInd += recvAreaValue[i].numElements();
+      }
+
+      if (nbAreaInd != globalLocalIndexMap_.size())
+        info (0) << "If domain " << this->getDomainOutputName() <<" does not have overlapped regions between processes "
+                 << "something must be wrong with area index "<< std::endl;
+
+      nbAreaInd = globalLocalIndexMap_.size();
+      areavalue.resize(nbAreaInd);
+      nbAreaInd = 0;      
+      for (i = 0; i < nbReceived; ++i)
+      {
+        CArray<int,1>& tmpInd = indGlob_[recvClientRanks_[i]];
+        CArray<double,1>& tmp = recvAreaValue[i];
+        for (ind = 0; ind < tmp.numElements(); ++ind)
+        {
+          lInd = globalLocalIndexMap_[size_t(tmpInd(ind))];
+          areavalue(lInd) = tmp(ind);          
+        }
+      }
+      
+    }
+  }
+  CATCH_DUMP_ATTR
+
+  /*!
+    Compare two domain objects. 
+    They are equal if only if they have identical attributes as well as their values.
+    Moreover, they must have the same transformations.
+  \param [in] domain Compared domain
+  \return result of the comparison
+  */
+  bool CDomain::isEqual(CDomain* obj)
+  TRY
+  {
+    vector<StdString> excludedAttr;
+    excludedAttr.push_back("domain_ref");
+    bool objEqual = SuperClass::isEqual(obj, excludedAttr);
+    if (!objEqual) return objEqual;
+
+    TransMapTypes thisTrans = this->getAllTransformations();
+    TransMapTypes objTrans  = obj->getAllTransformations();
+
+    TransMapTypes::const_iterator it, itb, ite;
+    std::vector<ETranformationType> thisTransType, objTransType;
+    for (it = thisTrans.begin(); it != thisTrans.end(); ++it)
+      thisTransType.push_back(it->first);
+    for (it = objTrans.begin(); it != objTrans.end(); ++it)
+      objTransType.push_back(it->first);
+
+    if (thisTransType.size() != objTransType.size()) return false;
+    for (int idx = 0; idx < thisTransType.size(); ++idx)
+      objEqual &= (thisTransType[idx] == objTransType[idx]);
+
+    return objEqual;
+  }
+  CATCH_DUMP_ATTR
+
+  /*!
+    Receive data index event from clients(s)
+    \param[in] event event contain info about rank and associated index
+  */
+  void CDomain::recvDataIndex(CEventServer& event)
+  TRY
+  {
+    string domainId;
+    std::map<int, CBufferIn*> rankBuffers;
+
+    list<CEventServer::SSubEvent>::iterator it;
+    for (it = event.subEvents.begin(); it != event.subEvents.end(); ++it)
+    {      
+      CBufferIn* buffer = it->buffer;
+      *buffer >> domainId;
+      rankBuffers[it->rank] = buffer;        
+    }
+    get(domainId)->recvDataIndex(rankBuffers);
+  }
+  CATCH
+
+  /*!
+    Receive data index information from client(s)
+    A client receives data index from different clients to rebuild its own data index.
+    Because we use global index + mask info to calculate the sending data to client(s), 
+    this data index must be updated with mask info (maybe it will change in the future)
+    Because the data index is local, to rebuild data index of received client, we should use global index along with. 
+
+    \param[in] rankBuffers rank of sending client and the corresponding receive buffer     
+  */
+  void CDomain::recvDataIndex(std::map<int, CBufferIn*>& rankBuffers)
+  TRY
+  {
+    int nbReceived = rankBuffers.size(), i, ind, index, indexI, indexJ, type_int, lInd;    
+    if (nbReceived != recvClientRanks_.size())
+      ERROR("void CDomain::recvDataIndex(std::map<int, CBufferIn*>& rankBuffers)",
+           << "The number of sending clients is not correct."
+           << "Expected number: " << recvClientRanks_.size() << " but received " << nbReceived);
+
+    vector<CArray<int,1> > recvDataIIndex(nbReceived),recvDataJIndex(nbReceived);     
+    for (i = 0; i < recvClientRanks_.size(); ++i)
+    {
+      int rank = recvClientRanks_[i];
+      CBufferIn& buffer = *(rankBuffers[rank]);
+      buffer >> recvDataIIndex[i];
+      buffer >> recvDataJIndex[i];
+    }
+   
+    int nbIndex = i_index.numElements();
+    CArray<int,1> dataIIndex(nbIndex), dataJIndex(nbIndex);
+    dataIIndex = -1; dataJIndex = -1;
+     
+    nbIndex = 0;
+    for (i = 0; i < nbReceived; ++i)
+    {      
+      CArray<int,1>& tmpInd = indGlob_[recvClientRanks_[i]];
+      CArray<int,1>& tmpI = recvDataIIndex[i];    
+      CArray<int,1>& tmpJ = recvDataJIndex[i];     
+      if ((tmpI.numElements() != tmpInd.numElements()) || (tmpJ.numElements() != tmpInd.numElements()))
+          ERROR("void CDomain::recvDataIndex(std::map<int, CBufferIn*>& rankBuffers)",
+             << "The number of global received index is not coherent with the number of received data index."
+             << "Expected number of global index: " << tmpI.numElements() << " but received " << tmpInd.numElements());
+
+      for (ind = 0; ind < tmpI.numElements(); ++ind)
+      {
+         lInd = globalLocalIndexMap_[size_t(tmpInd(ind))];
+         dataIIndex(lInd) = (-1 == dataIIndex(lInd)) ? tmpI(ind) : dataIIndex(lInd); // Only fill in dataIndex if there is no data
+         dataJIndex(lInd) = (-1 == dataJIndex(lInd)) ? tmpJ(ind) : dataJIndex(lInd);  
+      } 
+    }
+
+    int nbCompressedData = 0;  
+    for (ind = 0; ind < dataIIndex.numElements(); ++ind)
+    {
+       indexI = dataIIndex(ind); indexJ = dataJIndex(ind);
+       if ((0 <= indexI) && (0 <= indexJ))
+         ++nbCompressedData;
+    }        
+  
+    data_i_index.resize(nbCompressedData);
+    data_j_index.resize(nbCompressedData);
+
+    nbCompressedData = 0;  
+    for (ind = 0; ind < dataIIndex.numElements(); ++ind)
+    {
+       indexI = dataIIndex(ind); indexJ = dataJIndex(ind);
+       if ((0 <= indexI) && (0 <= indexJ))
+       {
+          data_i_index(nbCompressedData) = (1 == data_dim) ? ind : ind % ni;
+          data_j_index(nbCompressedData) = (1 == data_dim) ? 0   : ind / ni;
+         ++nbCompressedData;
+       }
+    }
+
+    // Reset data_ibegin, data_jbegin
+    data_ibegin.setValue(0);
+    data_jbegin.setValue(0);
+  }
+  CATCH_DUMP_ATTR
+
+  CTransformation<CDomain>* CDomain::addTransformation(ETranformationType transType, const StdString& id)
+  TRY
+  {
+    transformationMap_.push_back(std::make_pair(transType, CTransformation<CDomain>::createTransformation(transType,id)));
+    return transformationMap_.back().second;
+  }
+  CATCH_DUMP_ATTR
+
+  /*!
+    Check whether a domain has transformation
+    \return true if domain has transformation
+  */
+  bool CDomain::hasTransformation()
+  TRY
+  {
+    return (!transformationMap_.empty());
+  }
+  CATCH_DUMP_ATTR
+
+  /*!
+    Set transformation for current domain. It's the method to move transformation in hierarchy
+    \param [in] domTrans transformation on domain
+  */
+  void CDomain::setTransformations(const TransMapTypes& domTrans)
+  TRY
+  {
+    transformationMap_ = domTrans;
+  }
+  CATCH_DUMP_ATTR
+
+  /*!
+    Get all transformation current domain has
+    \return all transformation
+  */
+  CDomain::TransMapTypes CDomain::getAllTransformations(void)
+  TRY
+  {
+    return transformationMap_;
+  }
+  CATCH_DUMP_ATTR
+
+  void CDomain::duplicateTransformation(CDomain* src)
+  TRY
+  {
+    if (src->hasTransformation())
+    {
+      this->setTransformations(src->getAllTransformations());
+    }
+  }
+  CATCH_DUMP_ATTR
+
+  /*!
+   * Go through the hierarchy to find the domain from which the transformations must be inherited
+   */
+  void CDomain::solveInheritanceTransformation()
+  TRY
+  {
+    if (hasTransformation() || !hasDirectDomainReference())
+      return;
+
+    CDomain* domain = this;
+    std::vector<CDomain*> refDomains;
+    while (!domain->hasTransformation() && domain->hasDirectDomainReference())
+    {
+      refDomains.push_back(domain);
+      domain = domain->getDirectDomainReference();
+    }
+
+    if (domain->hasTransformation())
+      for (size_t i = 0; i < refDomains.size(); ++i)
+        refDomains[i]->setTransformations(domain->getAllTransformations());
+  }
+  CATCH_DUMP_ATTR
+
+  void CDomain::setContextClient(CContextClient* contextClient)
+  TRY
+  {
+    if (clientsSet.find(contextClient)==clientsSet.end())
+    {
+      clients.push_back(contextClient) ;
+      clientsSet.insert(contextClient);
+    }
+  }
+  CATCH_DUMP_ATTR
+
+  /*!
+    Parse children nodes of a domain in xml file.
+    Whenver there is a new transformation, its type and name should be added into this function
+    \param node child node to process
+  */
+  void CDomain::parse(xml::CXMLNode & node)
+  TRY
+  {
+    SuperClass::parse(node);
+
+    if (node.goToChildElement())
+    {
+      StdString nodeElementName;
+      do
+      {
+        StdString nodeId("");
+        if (node.getAttributes().end() != node.getAttributes().find("id"))
+        { nodeId = node.getAttributes()["id"]; }
+
+        nodeElementName = node.getElementName();
+        std::map<StdString, ETranformationType>::const_iterator ite = transformationMapList_.end(), it;
+        it = transformationMapList_.find(nodeElementName);
+        if (ite != it)
+        {
+          transformationMap_.push_back(std::make_pair(it->second, CTransformation<CDomain>::createTransformation(it->second,
+                                                                                                                nodeId,
+                                                                                                                &node)));
+        }
+        else
+        {
+          ERROR("void CDomain::parse(xml::CXMLNode & node)",
+                << "The transformation " << nodeElementName << " has not been supported yet.");
+        }
+      } while (node.goToNextElement()) ;
+      node.goToParentElement();
+    }
+  }
+  CATCH_DUMP_ATTR
+   //----------------------------------------------------------------
+
+   DEFINE_REF_FUNC(Domain,domain)
+
+   ///---------------------------------------------------------------
+
+} // namespace xios
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/node/domain.hpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/node/domain.hpp	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/node/domain.hpp	(revision 1749)
@@ -0,0 +1,249 @@
+#ifndef __XIOS_CDomain__
+#define __XIOS_CDomain__
+
+/// XIOS headers ///
+#include "xios_spl.hpp"
+#include "group_factory.hpp"
+
+#include "declare_group.hpp"
+#include "declare_ref_func.hpp"
+#include "event_client.hpp"
+#include "event_server.hpp"
+#include "buffer_in.hpp"
+#include "array_new.hpp"
+#include "attribute_array.hpp"
+#include "attribute_enum.hpp"
+#include "transformation.hpp"
+#include "transformation_enum.hpp"
+#include "server_distribution_description.hpp"
+#include "mesh.hpp"
+
+namespace xios {
+
+   /// ////////////////////// DÃ©clarations ////////////////////// ///
+
+   class CDomainGroup;
+   class CDomainAttributes;
+   class CDomain;
+   class CFile;
+
+   ///--------------------------------------------------------------
+
+   // Declare/Define CDomainAttribute
+   BEGIN_DECLARE_ATTRIBUTE_MAP(CDomain)
+#  include "domain_attribute.conf"
+#  include "domain_attribute_private.conf"
+   END_DECLARE_ATTRIBUTE_MAP(CDomain)
+
+   ///--------------------------------------------------------------
+
+   class CDomain
+      : public CObjectTemplate<CDomain>
+      , public CDomainAttributes
+   {
+     /// typedef ///
+     typedef CObjectTemplate<CDomain>   SuperClass;
+     typedef CDomainAttributes SuperClassAttribute;
+     public:
+         enum EEventId
+         {
+           EVENT_ID_INDEX, EVENT_ID_LON, EVENT_ID_LAT, 
+           EVENT_ID_AREA,
+           EVENT_ID_DATA_INDEX, EVENT_ID_SERVER_ATTRIBUT
+         } ;
+
+      public:
+
+         typedef CDomainAttributes RelAttributes;
+         typedef CDomainGroup      RelGroup;
+         typedef CTransformation<CDomain>::TransformationMapTypes TransMapTypes;
+
+         /// Constructeurs ///
+         CDomain(void);
+         explicit CDomain(const StdString & id);
+         CDomain(const CDomain & domain);       // Not implemented yet.
+         CDomain(const CDomain * const domain); // Not implemented yet.
+
+         static CDomain* createDomain();
+         
+         CMesh* mesh;
+         void assignMesh(const StdString, const int);
+        
+         virtual void parse(xml::CXMLNode & node);
+
+         void setContextClient(CContextClient* contextClient);
+
+         /// VÃ©rifications ///
+         void checkAttributes(void);
+         void checkAttributesOnClient();
+         void checkAttributesOnClientAfterTransformation();
+         void checkEligibilityForCompressedOutput(void);
+
+         void sendCheckedAttributes();
+
+         bool hasTransformation();
+         void solveInheritanceTransformation();
+         TransMapTypes getAllTransformations();
+         void redistribute(int nbLocalDomain);
+         void duplicateTransformation(CDomain*);
+         CTransformation<CDomain>* addTransformation(ETranformationType transType, const StdString& id="");
+
+      public:
+         const std::set<StdString> & getRelFiles(void) const;
+         bool IsWritten(const StdString & filename) const;
+         bool isWrittenCompressed(const StdString& filename) const;
+         
+         int getNumberWrittenIndexes(MPI_Comm writtenCom);
+         int getTotalNumberWrittenIndexes(MPI_Comm writtenCom);
+         int getOffsetWrittenIndexes(MPI_Comm writtenCom);
+         CArray<int,1>& getCompressedIndexToWriteOnServer(MPI_Comm writtenCom);
+
+         std::map<int, StdSize> getAttributesBufferSize(CContextClient* client, bool bufferForWriting = false);
+
+         bool isEmpty(void) const;
+         bool isDistributed(void) const;
+         bool isCompressible(void) const; 
+ 
+         std::vector<int> getNbGlob();
+         bool isEqual(CDomain* domain);
+
+         static bool dispatchEvent(CEventServer& event);
+
+      public:
+         /// Mutateur ///
+         void addRelFile(const StdString & filename);
+         void addRelFileCompressed(const StdString& filename);            
+         
+         void computeWrittenIndex();
+         void computeWrittenCompressedIndex(MPI_Comm);
+
+         void AllgatherRectilinearLonLat(CArray<double,1>& lon, CArray<double,1>& lat,
+                                         CArray<double,1>& lon_g, CArray<double,1>& lat_g);
+
+         void fillInRectilinearBoundLonLat(CArray<double,1>& lon, CArray<double,1>& lat,
+                                           CArray<double,2>& boundsLon, CArray<double,2>& boundsLat);
+         
+         void fillInLonLat();
+         bool distributionAttributesHaveValue() const;
+
+         size_t getGlobalWrittenSize() ;
+         /// Destructeur ///
+         virtual ~CDomain(void);
+
+         /// Accesseurs statiques ///
+         static StdString GetName(void);
+         static StdString GetDefName(void);
+
+         static ENodeType GetType(void);        
+
+      public:
+         CArray<double, 1> lonvalue, latvalue;
+         CArray<double, 2> bounds_lonvalue, bounds_latvalue;
+         CArray<double, 1> areavalue;
+
+         CArray<int,1> localIndexToWriteOnServer;
+
+         CArray<bool, 1> domainMask; // mask_1d, mask_2d -> domainMask
+         CArray<bool, 1> localMask; // domainMask + indexing
+         bool isCurvilinear ;
+         bool hasBounds ;
+         bool hasArea;
+         bool hasLonLat;
+         bool hasPole ;
+         bool hasLatInReadFile_ ; // specify if latitude is defined on read file, so it can be read later when grid distribution will be defined
+         bool hasBoundsLatInReadFile_ ; // specify if latitude boundarues are defined on read file, so it can be read later when grid distribution will be defined
+         bool hasLonInReadFile_ ; // specify if longitude is defined on read file, so it can be read later when grid distribution will be defined
+         bool hasBoundsLonInReadFile_ ; // specify if longitude boundaries are defined on read file, so it can be read later when grid distribution will be defined
+
+         void computeLocalMask(void) ;
+      private:
+         void checkDomain(void);
+         void checkLocalIDomain(void);
+         void checkLocalJDomain(void);
+
+         void checkMask(void);
+         void checkDomainData(void);
+         void checkCompression(void);
+
+         void checkBounds(void);
+         void checkArea(void);
+         void checkLonLat();
+
+         void setTransformations(const TransMapTypes&);         
+         void computeNGlobDomain();
+         void sendAttributes();
+         void sendIndex();
+         void sendDistributionAttributes();
+         void sendArea();
+         void sendLonLat();         
+         void sendDataIndex();
+         void convertLonLatValue();
+         void fillInRectilinearLonLat();
+         void fillInCurvilinearLonLat();
+         void fillInUnstructuredLonLat();
+         
+         static void recvDistributionAttributes(CEventServer& event);
+         static void recvIndex(CEventServer& event);
+         static void recvLon(CEventServer& event);
+         static void recvLat(CEventServer& event);
+         static void recvArea(CEventServer& event);
+         static void recvDataIndex(CEventServer& event);
+         void recvDistributionAttributes(CBufferIn& buffer);                  
+         void recvIndex(std::map<int, CBufferIn*>& rankBuffers);         
+         void recvLon(std::map<int, CBufferIn*>& rankBuffers);
+         void recvLat(std::map<int, CBufferIn*>& rankBuffers);
+         void recvArea(std::map<int, CBufferIn*>& rankBuffers);         
+         void recvDataIndex(std::map<int, CBufferIn*>& rankBuffers);
+
+         void completeLonLatClient(void);  
+         void computeConnectedClients();    
+
+       private:         
+
+/** Clients that have to send a domain. There can be multiple clients in case of secondary server, otherwise only one client. */
+         std::list<CContextClient*> clients;
+         std::set<CContextClient*> clientsSet;
+
+         bool isChecked, computedWrittenIndex_;
+         std::set<StdString> relFiles, relFilesCompressed;
+         bool isClientChecked; // Verify whether all attributes of domain on the client side are good
+         bool isClientAfterTransformationChecked;
+         std::map<int, CArray<int,1> > indGlob_;
+         std::map<int, map<int,int> > nbSenders; // Mapping of number of communicating client to a server
+
+/** Global index of each client sent to server: map<serverSize, map<serverRank, indexes>> */
+         std::map<int, std::unordered_map<int, vector<size_t> > > indSrv_;
+         // std::map<CContextClient*, std::map<int, vector<int> > > indWrittenSrv_; // Global written index of each client sent to server
+         std::vector<int> indexesToWrite;
+         std::vector<int> recvClientRanks_;
+         std::map<int,int> numberWrittenIndexes_, totalNumberWrittenIndexes_, offsetWrittenIndexes_;
+         std::map<int, CArray<int, 1> > compressedIndexToWriteOnServer;     
+         std::map<int, std::map<int,size_t> > connectedDataSize_;
+         std::map<int, std::vector<int> > connectedServerRank_;
+
+         //! True if and only if the data defined on the domain can be outputted in a compressed way
+         bool isCompressible_;
+         bool isRedistributed_;
+         TransMapTypes transformationMap_;         
+         bool isUnstructed_;
+         std::unordered_map<size_t,size_t> globalLocalIndexMap_;
+       
+       private:
+         static bool initializeTransformationMap(std::map<StdString, ETranformationType>& m);
+         static std::map<StdString, ETranformationType> transformationMapList_;
+         static bool _dummyTransformationMapList;
+
+         DECLARE_REF_FUNC(Domain,domain)
+
+   }; // class CDomain
+
+   ///--------------------------------------------------------------
+
+   // Declare/Define CDomainGroup and CDomainDefinition
+   DECLARE_GROUP(CDomain);
+
+   ///--------------------------------------------------------------
+
+} // namespace xios
+
+#endif //__XIOS_CDomain__
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/node/duplicate_scalar_to_axis.cpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/node/duplicate_scalar_to_axis.cpp	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/node/duplicate_scalar_to_axis.cpp	(revision 1749)
@@ -0,0 +1,46 @@
+#include "duplicate_scalar_to_axis.hpp"
+#include "type.hpp"
+#include "axis.hpp"
+#include "scalar.hpp"
+
+namespace xios {
+
+  /// ////////////////////// DÃ©finitions ////////////////////// ///
+
+  CDuplicateScalarToAxis::CDuplicateScalarToAxis(void)
+    : CObjectTemplate<CDuplicateScalarToAxis>(), CDuplicateScalarToAxisAttributes(), CTransformation<CAxis>()
+  { /* Ne rien faire de plus */ }
+
+  CDuplicateScalarToAxis::CDuplicateScalarToAxis(const StdString & id)
+    : CObjectTemplate<CDuplicateScalarToAxis>(id), CDuplicateScalarToAxisAttributes(), CTransformation<CAxis>()
+  { /* Ne rien faire de plus */ }
+
+  CDuplicateScalarToAxis::~CDuplicateScalarToAxis(void)
+  {}
+
+  CTransformation<CAxis>* CDuplicateScalarToAxis::create(const StdString& id, xml::CXMLNode* node)
+  {
+    CDuplicateScalarToAxis* duplicateScalar = CDuplicateScalarToAxisGroup::get("duplicate_scalar_to_axis_definition")->createChild(id);
+    if (node) duplicateScalar->parse(*node);
+    return static_cast<CTransformation<CAxis>*>(duplicateScalar);
+  }
+
+  bool CDuplicateScalarToAxis::registerTrans()
+  {
+    return registerTransformation(TRANS_DUPLICATE_SCALAR_TO_AXIS, CDuplicateScalarToAxis::create);
+  }
+
+  bool CDuplicateScalarToAxis::_dummyRegistered = CDuplicateScalarToAxis::registerTrans();
+
+  //----------------------------------------------------------------
+
+  StdString CDuplicateScalarToAxis::GetName(void)    { return StdString("duplicate_scalar_to_axis"); }
+  StdString CDuplicateScalarToAxis::GetDefName(void) { return StdString("duplicate_scalar_to_axis"); }
+  ENodeType CDuplicateScalarToAxis::GetType(void)    { return eDuplicateScalarToAxis; }
+
+  void CDuplicateScalarToAxis::checkValid(CAxis* axisDst, CScalar* scalarSrc)
+  {
+   
+  }
+
+}
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/node/duplicate_scalar_to_axis.hpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/node/duplicate_scalar_to_axis.hpp	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/node/duplicate_scalar_to_axis.hpp	(revision 1749)
@@ -0,0 +1,67 @@
+#ifndef __XIOS_CDuplicateScalarToAxis__
+#define __XIOS_CDuplicateScalarToAxis__
+
+/// xios headers ///
+#include "xios_spl.hpp"
+#include "attribute_enum.hpp"
+#include "attribute_enum_impl.hpp"
+#include "attribute_array.hpp"
+#include "declare_attribute.hpp"
+#include "object_template.hpp"
+#include "group_factory.hpp"
+#include "declare_group.hpp"
+#include "transformation.hpp"
+
+namespace xios {
+  /// ////////////////////// DÃ©clarations ////////////////////// ///
+  class CDuplicateScalarToAxisGroup;
+  class CDuplicateScalarToAxisAttributes;
+  class CDuplicateScalarToAxis;
+  class CAxis;
+  class CScalar;
+
+  ///--------------------------------------------------------------
+
+  // Declare/Define CFileAttribute
+  BEGIN_DECLARE_ATTRIBUTE_MAP(CDuplicateScalarToAxis)
+#include "duplicate_scalar_to_axis_attribute.conf"
+  END_DECLARE_ATTRIBUTE_MAP(CDuplicateScalarToAxis)
+
+  ///--------------------------------------------------------------
+  /*!
+    \class CDuplicateScalarToAxis
+    This class describes duplicate_scalar in xml file.
+  */
+  class CDuplicateScalarToAxis
+    : public CObjectTemplate<CDuplicateScalarToAxis>
+    , public CDuplicateScalarToAxisAttributes
+    , public CTransformation<CAxis>
+  {
+    public :
+      typedef CObjectTemplate<CDuplicateScalarToAxis> SuperClass;
+      typedef CDuplicateScalarToAxisAttributes SuperClassAttribute;
+
+    public :
+      /// Constructeurs ///
+      CDuplicateScalarToAxis(void);
+      explicit CDuplicateScalarToAxis(const StdString& id);
+
+      /// Destructeur ///
+      virtual ~CDuplicateScalarToAxis(void);
+
+      virtual void checkValid(CAxis* axisDst, CScalar* scalarSrc);
+
+      /// Accesseurs statiques ///
+      static StdString GetName(void);
+      static StdString GetDefName(void);
+      static ENodeType GetType(void);
+    private:
+      static bool registerTrans();
+      static CTransformation<CAxis>* create(const StdString& id, xml::CXMLNode* node);
+      static bool _dummyRegistered;
+  }; // class CReduceAxisToAxis
+
+  DECLARE_GROUP(CDuplicateScalarToAxis);
+} // namespace xios
+
+#endif // ___XIOS_CDuplicateScalarToAxis__
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/node/expand_domain.cpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/node/expand_domain.cpp	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/node/expand_domain.cpp	(revision 1749)
@@ -0,0 +1,50 @@
+#include "expand_domain.hpp"
+#include "type.hpp"
+
+namespace xios {
+
+  /// ////////////////////// DÃ©finitions ////////////////////// ///
+
+  CExpandDomain::CExpandDomain(void)
+    : CObjectTemplate<CExpandDomain>(), CExpandDomainAttributes(), CTransformation<CDomain>()
+  { /* Ne rien faire de plus */ }
+
+  CExpandDomain::CExpandDomain(const StdString & id)
+    : CObjectTemplate<CExpandDomain>(id), CExpandDomainAttributes(), CTransformation<CDomain>()
+  { /* Ne rien faire de plus */ }
+
+  CExpandDomain::~CExpandDomain(void)
+  {}
+
+  CTransformation<CDomain>* CExpandDomain::create(const StdString& id, xml::CXMLNode* node)
+  {
+    CExpandDomain* expandDomain = CExpandDomainGroup::get("expand_domain_definition")->createChild(id);
+    if (node) expandDomain->parse(*node);
+    return static_cast<CTransformation<CDomain>*>(expandDomain);
+  }
+
+  bool CExpandDomain::_dummyRegistered = CExpandDomain::registerTrans();
+  bool CExpandDomain::registerTrans()
+  {
+    registerTransformation(TRANS_EXPAND_DOMAIN, CExpandDomain::create);
+  }
+
+  //----------------------------------------------------------------
+
+  StdString CExpandDomain::GetName(void)    { return StdString("expand_domain"); }
+  StdString CExpandDomain::GetDefName(void) { return StdString("expand_domain"); }
+  ENodeType CExpandDomain::GetType(void)    { return eExpandDomain; }
+
+  void CExpandDomain::checkValid(CDomain* domainDst)
+  {
+    // if (CDomain::type_attr::unstructured != domainDst->type)
+    // {
+    //   ERROR("CExpandDomain::checkValid(CDomain* domainDst)",
+    //         << "Domain extension is only supported for unstructured" << std::endl
+    //         << "Check type of domain destination, id = " << domainDst->getId());
+    // }
+
+    if (this->type.isEmpty()) this->type.setValue(CExpandDomain::type_attr::edge);
+  }
+
+}
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/node/expand_domain.hpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/node/expand_domain.hpp	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/node/expand_domain.hpp	(revision 1749)
@@ -0,0 +1,67 @@
+#ifndef __XIOS_CExpandDomain__
+#define __XIOS_CExpandDomain__
+
+/// xios headers ///
+#include "xios_spl.hpp"
+#include "attribute_enum.hpp"
+#include "attribute_enum_impl.hpp"
+#include "attribute_array.hpp"
+#include "declare_attribute.hpp"
+#include "object_template.hpp"
+#include "group_factory.hpp"
+#include "declare_group.hpp"
+#include "transformation.hpp"
+#include "domain.hpp"
+
+namespace xios {
+  /// ////////////////////// DÃ©clarations ////////////////////// ///
+  class CExpandDomainGroup;
+  class CExpandDomainAttributes;
+  class CExpandDomain;
+  class CDomain;
+
+  ///--------------------------------------------------------------
+
+  // Declare/Define CFileAttribute
+  BEGIN_DECLARE_ATTRIBUTE_MAP(CExpandDomain)
+#include "expand_domain_attribute.conf"
+  END_DECLARE_ATTRIBUTE_MAP(CExpandDomain)
+
+  ///--------------------------------------------------------------
+  /*!
+    \class CExpandDomain
+    This class describes expand_domain in xml file.
+  */
+  class CExpandDomain
+    : public CObjectTemplate<CExpandDomain>
+    , public CExpandDomainAttributes
+    , public CTransformation<CDomain>
+  {
+    public :
+      typedef CObjectTemplate<CExpandDomain> SuperClass;
+      typedef CExpandDomainAttributes SuperClassAttribute;
+
+    public :
+      /// Constructeurs ///
+      CExpandDomain(void);
+      explicit CExpandDomain(const StdString& id);
+
+      /// Destructeur ///
+      virtual ~CExpandDomain(void);
+
+      virtual void checkValid(CDomain* domain);
+
+      /// Accesseurs statiques ///
+      static StdString GetName(void);
+      static StdString GetDefName(void);
+      static ENodeType GetType(void);
+    private:
+      static bool registerTrans();
+      static CTransformation<CDomain>* create(const StdString& id, xml::CXMLNode* node);
+      static bool _dummyRegistered;
+  }; // class CExpandDomain
+
+  DECLARE_GROUP(CExpandDomain);
+} // namespace xios
+
+#endif // __XIOS_CExpandDomain__
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/node/extract_axis.cpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/node/extract_axis.cpp	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/node/extract_axis.cpp	(revision 1749)
@@ -0,0 +1,79 @@
+#include "extract_axis.hpp"
+#include "type.hpp"
+
+namespace xios {
+
+  /// ////////////////////// DÃ©finitions ////////////////////// ///
+
+  CExtractAxis::CExtractAxis(void)
+    : CObjectTemplate<CExtractAxis>(), CExtractAxisAttributes(), CTransformation<CAxis>()
+  { /* Ne rien faire de plus */ }
+
+  CExtractAxis::CExtractAxis(const StdString & id)
+    : CObjectTemplate<CExtractAxis>(id), CExtractAxisAttributes(), CTransformation<CAxis>()
+  { /* Ne rien faire de plus */ }
+
+  CExtractAxis::~CExtractAxis(void)
+  {}
+
+  CTransformation<CAxis>* CExtractAxis::create(const StdString& id, xml::CXMLNode* node)
+  {
+    CExtractAxis* extractAxis = CExtractAxisGroup::get("extract_axis_definition")->createChild(id);
+    if (node) extractAxis->parse(*node);
+    return static_cast<CTransformation<CAxis>*>(extractAxis);
+  }
+
+  bool CExtractAxis::registerTrans()
+  {
+    return registerTransformation(TRANS_EXTRACT_AXIS, CExtractAxis::create);
+  }
+
+  bool CExtractAxis::_dummyRegistered = CExtractAxis::registerTrans();
+
+  //----------------------------------------------------------------
+
+  StdString CExtractAxis::GetName(void)    { return StdString("extract_axis"); }
+  StdString CExtractAxis::GetDefName(void) { return StdString("extract_axis"); }
+  ENodeType CExtractAxis::GetType(void)    { return eExtractAxis; }
+
+  void CExtractAxis::checkValid(CAxis* axisDest)
+  {
+    int axisIBegin, axisNi, axisGlobalSize;
+    int begin, end, n;
+
+    axisIBegin = axisDest->begin.getValue();
+    axisNi     = axisDest->n.getValue();
+    axisGlobalSize   = axisDest->n_glo.getValue();
+
+    bool extractByIndex = !this->index.isEmpty() && (0 != this->index.numElements());
+
+    if (extractByIndex)
+    {
+      begin = min(this->index);
+      end   = max(this->index);
+      n     = end - begin + 1;
+    }
+    else
+    {
+      begin = (this->begin.isEmpty()) ?  0 : this->begin.getValue();
+      n     = (this->n.isEmpty()) ?  axisGlobalSize : this->n.getValue();
+      end   = begin+n-1;
+    }
+
+    if (begin < 0 || begin > axisGlobalSize - 1 || end < 0 || end > axisGlobalSize - 1
+        || n < 1 || n > axisGlobalSize || begin > end)
+      ERROR("CExtractAxis::checkValid(CAxis* axisDest)",
+            << "One or more attributes among 'begin' (" << begin << "), 'end' (" << end << "), 'n' (" << n << ") "
+            << "of axis transformation [ id = '" << axisDest->getId() << "' , context = '" << CObjectFactory::GetCurrentContextId() << "' ] are not well specified");
+    
+    if (extractByIndex && (!this->begin.isEmpty() || !this->n.isEmpty()))
+      ERROR("CExtractAxis::checkValid(CAxis* axisDest)",
+            << "Only one type of extract is accepted. Define extract by index with global_extract_index or define extract with begin and n. "
+            << "Axis transformation [ id = '" << axisDest->getId() << "' , context = '" << CObjectFactory::GetCurrentContextId() << "' ] are not well specified");
+
+    this->begin.setValue(begin);
+    this->n.setValue(n);
+
+  }
+
+}
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/node/extract_axis.hpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/node/extract_axis.hpp	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/node/extract_axis.hpp	(revision 1749)
@@ -0,0 +1,67 @@
+#ifndef __XIOS_CExtractAxis__
+#define __XIOS_CExtractAxis__
+
+/// xios headers ///
+#include "xios_spl.hpp"
+#include "attribute_enum.hpp"
+#include "attribute_enum_impl.hpp"
+#include "attribute_array.hpp"
+#include "declare_attribute.hpp"
+#include "object_template.hpp"
+#include "group_factory.hpp"
+#include "declare_group.hpp"
+#include "transformation.hpp"
+#include "axis.hpp"
+
+namespace xios {
+  /// ////////////////////// DÃ©clarations ////////////////////// ///
+  class CExtractAxisGroup;
+  class CExtractAxisAttributes;
+  class CExtractAxis;
+  class CAxis;
+
+  ///--------------------------------------------------------------
+
+  // Declare/Define CFileAttribute
+  BEGIN_DECLARE_ATTRIBUTE_MAP(CExtractAxis)
+#include "extract_axis_attribute.conf"
+  END_DECLARE_ATTRIBUTE_MAP(CExtractAxis)
+
+  ///--------------------------------------------------------------
+  /*!
+    \class CExtractAxis
+    This class describes extract_axis in xml file.
+  */
+  class CExtractAxis
+    : public CObjectTemplate<CExtractAxis>
+    , public CExtractAxisAttributes
+    , public CTransformation<CAxis>
+  {
+    public :
+      typedef CObjectTemplate<CExtractAxis> SuperClass;
+      typedef CExtractAxisAttributes SuperClassAttribute;
+
+    public :
+      /// Constructeurs ///
+      CExtractAxis(void);
+      explicit CExtractAxis(const StdString& id);
+
+      /// Destructeur ///
+      virtual ~CExtractAxis(void);
+
+      virtual void checkValid(CAxis* axisDest);
+
+      /// Accesseurs statiques ///
+      static StdString GetName(void);
+      static StdString GetDefName(void);
+      static ENodeType GetType(void);
+    private:
+      static bool registerTrans();
+      static CTransformation<CAxis>* create(const StdString& id, xml::CXMLNode* node);
+      static bool _dummyRegistered;
+  }; // class CExtractAxis
+
+  DECLARE_GROUP(CExtractAxis);
+} // namespace xios
+
+#endif // __XIOS_CExtractAxis__
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/node/extract_axis_to_scalar.cpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/node/extract_axis_to_scalar.cpp	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/node/extract_axis_to_scalar.cpp	(revision 1749)
@@ -0,0 +1,59 @@
+#include "extract_axis_to_scalar.hpp"
+#include "type.hpp"
+#include "axis.hpp"
+#include "scalar.hpp"
+
+namespace xios {
+
+  /// ////////////////////// DÃ©finitions ////////////////////// ///
+
+  CExtractAxisToScalar::CExtractAxisToScalar(void)
+    : CObjectTemplate<CExtractAxisToScalar>(), CExtractAxisToScalarAttributes(), CTransformation<CScalar>()
+  { /* Ne rien faire de plus */ }
+
+  CExtractAxisToScalar::CExtractAxisToScalar(const StdString & id)
+    : CObjectTemplate<CExtractAxisToScalar>(id), CExtractAxisToScalarAttributes(), CTransformation<CScalar>()
+  { /* Ne rien faire de plus */ }
+
+  CExtractAxisToScalar::~CExtractAxisToScalar(void)
+  {}
+
+  CTransformation<CScalar>* CExtractAxisToScalar::create(const StdString& id, xml::CXMLNode* node)
+  {
+    CExtractAxisToScalar* extractAxis = CExtractAxisToScalarGroup::get("extract_axis_to_scalar_definition")->createChild(id);
+    if (node) extractAxis->parse(*node);
+    return static_cast<CTransformation<CScalar>*>(extractAxis);
+  }
+
+  bool CExtractAxisToScalar::registerTrans()
+  {
+    return registerTransformation(TRANS_EXTRACT_AXIS_TO_SCALAR, CExtractAxisToScalar::create);
+  }
+
+  bool CExtractAxisToScalar::_dummyRegistered = CExtractAxisToScalar::registerTrans();
+
+  //----------------------------------------------------------------
+
+  StdString CExtractAxisToScalar::GetName(void)    { return StdString("extract_axis_to_scalar"); }
+  StdString CExtractAxisToScalar::GetDefName(void) { return StdString("extract_axis_to_scalar"); }
+  ENodeType CExtractAxisToScalar::GetType(void)    { return eExtractAxisToScalar; }
+
+  void CExtractAxisToScalar::checkValid(CScalar* scalarDst, CAxis* axisSrc)
+  {
+    int axis_n_glo = axisSrc->n_glo;
+    if (position.isEmpty())
+      ERROR("CExtractAxisToScalar::checkValid(CScalar* scalarDst, CAxis* axisSrc)",
+        << "Position should be specified"
+        << "Axis source " << axisSrc->getId() << std::endl
+        << "CScalar destination " << scalarDst->getId() << std::endl);
+
+    int position = this->position;
+
+    if ((position < 0) || (position > (axis_n_glo-1)))
+        ERROR("CExtractAxisToScalar::checkValid(CScalar* scalarDst, CAxis* axisSrc)",
+          << "Extract axis, position should be inside 0 and ni_glo of axis source"
+          << "Axis source " << axisSrc->getId() << std::endl
+          << "CScalar destination " << scalarDst->getId() << std::endl);
+  }
+
+}
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/node/extract_axis_to_scalar.hpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/node/extract_axis_to_scalar.hpp	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/node/extract_axis_to_scalar.hpp	(revision 1749)
@@ -0,0 +1,67 @@
+#ifndef __XIOS_CExtractAxisToScalar__
+#define __XIOS_CExtractAxisToScalar__
+
+/// xios headers ///
+#include "xios_spl.hpp"
+#include "attribute_enum.hpp"
+#include "attribute_enum_impl.hpp"
+#include "attribute_array.hpp"
+#include "declare_attribute.hpp"
+#include "object_template.hpp"
+#include "group_factory.hpp"
+#include "declare_group.hpp"
+#include "transformation.hpp"
+
+namespace xios {
+  /// ////////////////////// DÃ©clarations ////////////////////// ///
+  class CExtractAxisToScalarGroup;
+  class CExtractAxisToScalarAttributes;
+  class CExtractAxisToScalar;
+  class CAxis;
+  class CScalar;
+
+  ///--------------------------------------------------------------
+
+  // Declare/Define CFileAttribute
+  BEGIN_DECLARE_ATTRIBUTE_MAP(CExtractAxisToScalar)
+#include "extract_axis_to_scalar_attribute.conf"
+  END_DECLARE_ATTRIBUTE_MAP(CExtractAxisToScalar)
+
+  ///--------------------------------------------------------------
+  /*!
+    \class CExtractAxisToScalar
+    This class describes reduce_domain in xml file.
+  */
+  class CExtractAxisToScalar
+    : public CObjectTemplate<CExtractAxisToScalar>
+    , public CExtractAxisToScalarAttributes
+    , public CTransformation<CScalar>
+  {
+    public :
+      typedef CObjectTemplate<CExtractAxisToScalar> SuperClass;
+      typedef CExtractAxisToScalarAttributes SuperClassAttribute;
+
+    public :
+      /// Constructeurs ///
+      CExtractAxisToScalar(void);
+      explicit CExtractAxisToScalar(const StdString& id);
+
+      /// Destructeur ///
+      virtual ~CExtractAxisToScalar(void);
+
+      virtual void checkValid(CScalar* scalarDst, CAxis* axisSrc);
+
+      /// Accesseurs statiques ///
+      static StdString GetName(void);
+      static StdString GetDefName(void);
+      static ENodeType GetType(void);
+    private:
+      static bool registerTrans();
+      static CTransformation<CScalar>* create(const StdString& id, xml::CXMLNode* node);
+      static bool _dummyRegistered;
+  }; // class CExtractAxisToScalar
+
+  DECLARE_GROUP(CExtractAxisToScalar);
+} // namespace xios
+
+#endif // __XIOS_CExtractAxisToScalar__
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/node/extract_domain.cpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/node/extract_domain.cpp	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/node/extract_domain.cpp	(revision 1749)
@@ -0,0 +1,74 @@
+#include "extract_domain.hpp"
+#include "type.hpp"
+
+namespace xios {
+
+  /// ////////////////////// DÃ©finitions ////////////////////// ///
+
+  CExtractDomain::CExtractDomain(void)
+    : CObjectTemplate<CExtractDomain>(), CExtractDomainAttributes(), CTransformation<CDomain>()
+  { /* Ne rien faire de plus */ }
+
+  CExtractDomain::CExtractDomain(const StdString & id)
+    : CObjectTemplate<CExtractDomain>(id), CExtractDomainAttributes(), CTransformation<CDomain>()
+  { /* Ne rien faire de plus */ }
+
+  CExtractDomain::~CExtractDomain(void)
+  {}
+
+  CTransformation<CDomain>* CExtractDomain::create(const StdString& id, xml::CXMLNode* node)
+  {
+    CExtractDomain* extractDomain = CExtractDomainGroup::get("extract_domain_definition")->createChild(id);
+    if (node) extractDomain->parse(*node);
+    return static_cast<CTransformation<CDomain>*>(extractDomain);
+  }
+
+  bool CExtractDomain::_dummyRegistered = CExtractDomain::registerTrans();
+  bool CExtractDomain::registerTrans()
+  {
+    registerTransformation(TRANS_EXTRACT_DOMAIN, CExtractDomain::create);
+  }
+
+  //----------------------------------------------------------------
+
+  StdString CExtractDomain::GetName(void)    { return StdString("extract_domain"); }
+  StdString CExtractDomain::GetDefName(void) { return StdString("extract_domain"); }
+  ENodeType CExtractDomain::GetType(void)    { return eExtractDomain; }
+
+  void CExtractDomain::checkValid(CDomain* domainSrc)
+  {
+    int ni_glo = domainSrc->ni_glo.getValue();
+    int nj_glo = domainSrc->nj_glo.getValue();
+
+    // RÃ©solution et vÃ©rification des donnÃ©es globales de extract.
+    if (!this->ni.isEmpty() || !this->nj.isEmpty() ||
+        !this->ibegin.isEmpty() || !this->jbegin.isEmpty())
+    {
+       if (this->ni.isEmpty()     || this->nj.isEmpty() ||
+           this->ibegin.isEmpty() || this->jbegin.isEmpty())
+       {
+         ERROR("CExtractDomain::checkValid(CDomain* domainSrc)",
+               << "If one of extract attributes is defined then all extract attributes must be defined.") ;
+       }
+       else
+       {
+          int iend = ibegin + ni - 1;
+          int jend = jbegin + nj - 1;
+
+          if (ibegin < 0  || jbegin < 0 || iend > ni_glo - 1 || jend > nj_glo - 1)
+            ERROR("CExtractDomain::checkValid(CDomain* domainSrc)",
+                  << "Extract is wrongly defined, "
+                  << "please check the values : 'ni' (" << ni.getValue() << "), 'nj' (" << nj.getValue() << "), "
+                  << "'ibegin' (" << ibegin.getValue() << "), 'jbegin' (" << jbegin.getValue() << ")");
+       }
+    }
+    else
+    {
+       ni = ni_glo;
+       nj = nj_glo;
+       ibegin = 0;
+       jbegin = 0;
+    }
+  }
+
+}
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/node/extract_domain.hpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/node/extract_domain.hpp	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/node/extract_domain.hpp	(revision 1749)
@@ -0,0 +1,67 @@
+#ifndef __XIOS_CExtractDomain__
+#define __XIOS_CExtractDomain__
+
+/// xios headers ///
+#include "xios_spl.hpp"
+#include "attribute_enum.hpp"
+#include "attribute_enum_impl.hpp"
+#include "attribute_array.hpp"
+#include "declare_attribute.hpp"
+#include "object_template.hpp"
+#include "group_factory.hpp"
+#include "declare_group.hpp"
+#include "transformation.hpp"
+#include "domain.hpp"
+
+namespace xios {
+  /// ////////////////////// DÃ©clarations ////////////////////// ///
+  class CExtractDomainGroup;
+  class CExtractDomainAttributes;
+  class CExtractDomain;
+  class CDomain;
+
+  ///--------------------------------------------------------------
+
+  // Declare/Define CFileAttribute
+  BEGIN_DECLARE_ATTRIBUTE_MAP(CExtractDomain)
+#include "extract_domain_attribute.conf"
+  END_DECLARE_ATTRIBUTE_MAP(CExtractDomain)
+
+  ///--------------------------------------------------------------
+  /*!
+    \class CExtractDomain
+    This class describes extract_domain in xml file.
+  */
+  class CExtractDomain
+    : public CObjectTemplate<CExtractDomain>
+    , public CExtractDomainAttributes
+    , public CTransformation<CDomain>
+  {
+    public :
+      typedef CObjectTemplate<CExtractDomain> SuperClass;
+      typedef CExtractDomainAttributes SuperClassAttribute;
+
+    public :
+      /// Constructeurs ///
+      CExtractDomain(void);
+      explicit CExtractDomain(const StdString& id);
+
+      /// Destructeur ///
+      virtual ~CExtractDomain(void);
+
+      virtual void checkValid(CDomain* axisDest);
+
+      /// Accesseurs statiques ///
+      static StdString GetName(void);
+      static StdString GetDefName(void);
+      static ENodeType GetType(void);
+    private:
+      static bool registerTrans();
+      static CTransformation<CDomain>* create(const StdString& id, xml::CXMLNode* node);
+      static bool _dummyRegistered;
+  }; // class CExtractDomain
+
+  DECLARE_GROUP(CExtractDomain);
+} // namespace xios
+
+#endif // __XIOS_CExtractDomain__
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/node/extract_domain_to_axis.cpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/node/extract_domain_to_axis.cpp	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/node/extract_domain_to_axis.cpp	(revision 1749)
@@ -0,0 +1,100 @@
+#include "extract_domain_to_axis.hpp"
+#include "type.hpp"
+#include "axis.hpp"
+#include "domain.hpp"
+
+namespace xios {
+
+  /// ////////////////////// DÃ©finitions ////////////////////// ///
+
+  CExtractDomainToAxis::CExtractDomainToAxis(void)
+    : CObjectTemplate<CExtractDomainToAxis>(), CExtractDomainToAxisAttributes(), CTransformation<CAxis>()
+  { /* Ne rien faire de plus */ }
+
+  CExtractDomainToAxis::CExtractDomainToAxis(const StdString & id)
+    : CObjectTemplate<CExtractDomainToAxis>(id), CExtractDomainToAxisAttributes(), CTransformation<CAxis>()
+  { /* Ne rien faire de plus */ }
+
+  CExtractDomainToAxis::~CExtractDomainToAxis(void)
+  {}
+
+  CTransformation<CAxis>* CExtractDomainToAxis::create(const StdString& id, xml::CXMLNode* node)
+  {
+    CExtractDomainToAxis* extractDomain = CExtractDomainToAxisGroup::get("extract_domain_to_axis_definition")->createChild(id);
+    if (node) extractDomain->parse(*node);
+    return static_cast<CTransformation<CAxis>*>(extractDomain);
+  }
+
+  bool CExtractDomainToAxis::registerTrans()
+  {
+    return registerTransformation(TRANS_EXTRACT_DOMAIN_TO_AXIS, CExtractDomainToAxis::create);
+  }
+
+  bool CExtractDomainToAxis::_dummyRegistered = CExtractDomainToAxis::registerTrans();
+
+  //----------------------------------------------------------------
+
+  StdString CExtractDomainToAxis::GetName(void)    { return StdString("extract_domain_to_axis"); }
+  StdString CExtractDomainToAxis::GetDefName(void) { return StdString("extract_domain_to_axis"); }
+  ENodeType CExtractDomainToAxis::GetType(void)    { return eExtractDomainToAxis; }
+
+  void CExtractDomainToAxis::checkValid(CAxis* axisDst, CDomain* domainSrc)
+  {
+    if (CDomain::type_attr::unstructured == domainSrc->type)
+      ERROR("CExtractDomainToAxis::checkValid(CAxis* axisDst, CDomain* domainSrc)",
+       << "Domain reduction is only supported for rectilinear or curvillinear grid."
+       << "Domain source " <<domainSrc->getId() << std::endl
+       << "Axis destination " << axisDst->getId());
+
+    int axis_n_glo = axisDst->n_glo;
+    int domain_ni_glo = domainSrc->ni_glo;
+    int domain_nj_glo = domainSrc->nj_glo;
+
+    if (this->direction.isEmpty())
+      ERROR("CExtractDomainToAxis::checkValid(CAxis* axisDst, CDomain* domainSrc)",
+             << "A direction to apply the operation must be defined. It should be: 'iDir' or 'jDir'"
+             << "Domain source " <<domainSrc->getId() << std::endl
+             << "Axis destination " << axisDst->getId());
+ 
+    if (this->position.isEmpty())
+      ERROR("CExtractDomainToAxis::checkValid(CAxis* axisDst, CDomain* domainSrc)",
+             << "Position to extract axis must be defined. " << std::endl
+             << "Domain source " <<domainSrc->getId() << std::endl
+             << "Axis destination " << axisDst->getId());
+    
+    switch (direction)
+    {
+      case direction_attr::jDir:
+        if (axis_n_glo != domain_ni_glo)
+          ERROR("CExtractDomainToAxis::checkValid(CAxis* axisDst, CDomain* domainSrc)",
+            << "Extract domain along j, axis destination should have n_glo equal to ni_glo of domain source"
+            << "Domain source " <<domainSrc->getId() << " has nj_glo " << domain_ni_glo << std::endl
+            << "Axis destination " << axisDst->getId() << " has n_glo " << axis_n_glo);
+        if ((position < 0) || (position > domain_ni_glo))
+        ERROR("CExtractDomainToAxis::checkValid(CAxis* axisDst, CDomain* domainSrc)",
+          << "Extract domain along j, position should be inside 0 and ni_glo of domain source"
+          << "Domain source " <<domainSrc->getId() << " has nj_glo " << domain_ni_glo << std::endl
+          << "Axis destination " << axisDst->getId() << std::endl
+          << "Position " << position);
+         break;
+
+      case direction_attr::iDir:
+        if (axis_n_glo != domain_nj_glo)
+          ERROR("CExtractDomainToAxis::checkValid(CAxis* axisDst, CDomain* domainSrc)",
+            << "Extract domain along i, axis destination should have n_glo equal to nj_glo of domain source"
+            << "Domain source " <<domainSrc->getId() << " has nj_glo " << domain_nj_glo << std::endl
+            << "Axis destination " << axisDst->getId() << " has n_glo " << axis_n_glo);
+        if ((position < 0) || (position > domain_nj_glo))
+        ERROR("CExtractDomainToAxis::checkValid(CAxis* axisDst, CDomain* domainSrc)",
+          << "Extract domain along i, position should be inside 0 and nj_glo of domain source"
+          << "Domain source " <<domainSrc->getId() << " has nj_glo " << domain_ni_glo << std::endl
+          << "Axis destination " << axisDst->getId() << std::endl
+          << "Position " << position);
+        break;
+
+      default:
+        break;
+    }
+  }
+
+}
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/node/extract_domain_to_axis.hpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/node/extract_domain_to_axis.hpp	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/node/extract_domain_to_axis.hpp	(revision 1749)
@@ -0,0 +1,67 @@
+#ifndef __XIOS_CExtractDomainToAxis__
+#define __XIOS_CExtractDomainToAxis__
+
+/// xios headers ///
+#include "xios_spl.hpp"
+#include "attribute_enum.hpp"
+#include "attribute_enum_impl.hpp"
+#include "attribute_array.hpp"
+#include "declare_attribute.hpp"
+#include "object_template.hpp"
+#include "group_factory.hpp"
+#include "declare_group.hpp"
+#include "transformation.hpp"
+
+namespace xios {
+  /// ////////////////////// DÃ©clarations ////////////////////// ///
+  class CExtractDomainToAxisGroup;
+  class CExtractDomainToAxisAttributes;
+  class CExtractDomainToAxis;
+  class CAxis;
+  class CDomain;
+
+  ///--------------------------------------------------------------
+
+  // Declare/Define CFileAttribute
+  BEGIN_DECLARE_ATTRIBUTE_MAP(CExtractDomainToAxis)
+#include "extract_domain_to_axis_attribute.conf"
+  END_DECLARE_ATTRIBUTE_MAP(CExtractDomainToAxis)
+
+  ///--------------------------------------------------------------
+  /*!
+    \class CExtractDomainToAxis
+    This class describes reduce_domain in xml file.
+  */
+  class CExtractDomainToAxis
+    : public CObjectTemplate<CExtractDomainToAxis>
+    , public CExtractDomainToAxisAttributes
+    , public CTransformation<CAxis>
+  {
+    public :
+      typedef CObjectTemplate<CExtractDomainToAxis> SuperClass;
+      typedef CExtractDomainToAxisAttributes SuperClassAttribute;
+
+    public :
+      /// Constructeurs ///
+      CExtractDomainToAxis(void);
+      explicit CExtractDomainToAxis(const StdString& id);
+
+      /// Destructeur ///
+      virtual ~CExtractDomainToAxis(void);
+
+      virtual void checkValid(CAxis* axisDst, CDomain* domainSrc);
+
+      /// Accesseurs statiques ///
+      static StdString GetName(void);
+      static StdString GetDefName(void);
+      static ENodeType GetType(void);
+    private:
+      static bool registerTrans();
+      static CTransformation<CAxis>* create(const StdString& id, xml::CXMLNode* node);
+      static bool _dummyRegistered;
+  }; // class CExtractDomainToAxis
+
+  DECLARE_GROUP(CExtractDomainToAxis);
+} // namespace xios
+
+#endif // __XIOS_CExtractDomainToAxis__
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/node/field.cpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/node/field.cpp	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/node/field.cpp	(revision 1749)
@@ -0,0 +1,1897 @@
+#include "field.hpp"
+
+#include "attribute_template.hpp"
+#include "object_template.hpp"
+#include "group_template.hpp"
+
+#include "node_type.hpp"
+#include "calendar_util.hpp"
+#include "message.hpp"
+#include "xios_spl.hpp"
+#include "type.hpp"
+#include "timer.hpp"
+#include "context_client.hpp"
+#include "context_server.hpp"
+#include <set>
+#include "garbage_collector.hpp"
+#include "source_filter.hpp"
+#include "store_filter.hpp"
+#include "file_writer_filter.hpp"
+#include "pass_through_filter.hpp"
+#include "filter_expr_node.hpp"
+#include "lex_parser.hpp"
+#include "temporal_filter.hpp"
+#include "spatial_transform_filter.hpp"
+#include "file_server_writer_filter.hpp"
+
+namespace xios{
+
+   /// ////////////////////// DÃ©finitions ////////////////////// ///
+
+   CField::CField(void)
+      : CObjectTemplate<CField>(), CFieldAttributes()
+      , grid(), file()
+      , written(false)
+      , nstep(0), nstepMax(0)
+      , hasOutputFile(false)
+      , domAxisScalarIds_(vector<StdString>(3,""))
+      , areAllReferenceSolved(false), isReferenceSolved(false), isReferenceSolvedAndTransformed(false)
+      , isGridChecked(false)
+      , useCompressedOutput(false)
+      , hasTimeInstant(false)
+      , hasTimeCentered(false)
+      , wasDataRequestedFromServer(false)
+      , wasDataAlreadyReceivedFromServer(false)
+      , mustAutoTrigger(false)
+      , isEOF(false), nstepMaxRead(false)
+   { setVirtualVariableGroup(CVariableGroup::create(getId() + "_virtual_variable_group")); }
+
+   CField::CField(const StdString& id)
+      : CObjectTemplate<CField>(id), CFieldAttributes()
+      , grid(), file()
+      , written(false)
+      , nstep(0), nstepMax(0)
+      , hasOutputFile(false)
+      , domAxisScalarIds_(vector<StdString>(3,""))
+      , areAllReferenceSolved(false), isReferenceSolved(false), isReferenceSolvedAndTransformed(false)
+      , isGridChecked(false)
+      , useCompressedOutput(false)
+      , hasTimeInstant(false)
+      , hasTimeCentered(false)
+      , wasDataRequestedFromServer(false)
+      , wasDataAlreadyReceivedFromServer(false)
+      , mustAutoTrigger(false)
+      , isEOF(false), nstepMaxRead(false)
+   { setVirtualVariableGroup(CVariableGroup::create(getId() + "_virtual_variable_group")); }
+
+   CField::~CField(void)
+   {}
+
+  //----------------------------------------------------------------
+
+   void CField::setVirtualVariableGroup(CVariableGroup* newVVariableGroup)
+   TRY
+   {
+      this->vVariableGroup = newVVariableGroup;
+   }
+   CATCH
+
+   CVariableGroup* CField::getVirtualVariableGroup(void) const
+   TRY
+   {
+      return this->vVariableGroup;
+   }
+   CATCH
+
+   std::vector<CVariable*> CField::getAllVariables(void) const
+   TRY
+   {
+      return this->vVariableGroup->getAllChildren();
+   }
+   CATCH
+
+   void CField::solveDescInheritance(bool apply, const CAttributeMap* const parent)
+   TRY
+   {
+      SuperClassAttribute::setAttributes(parent, apply);
+      this->getVirtualVariableGroup()->solveDescInheritance(apply, NULL);
+   }
+   CATCH_DUMP_ATTR
+
+  //----------------------------------------------------------------
+
+  bool CField::dispatchEvent(CEventServer& event)
+  TRY
+  {
+    if (SuperClass::dispatchEvent(event)) return true;
+    else
+    {
+      switch(event.type)
+      {
+        case EVENT_ID_UPDATE_DATA :
+          recvUpdateData(event);
+          return true;
+          break;
+
+        case EVENT_ID_READ_DATA :
+          recvReadDataRequest(event);
+          return true;
+          break;
+
+        case EVENT_ID_READ_DATA_READY :
+          recvReadDataReady(event);
+          return true;
+          break;
+
+        case EVENT_ID_ADD_VARIABLE :
+          recvAddVariable(event);
+          return true;
+          break;
+
+        case EVENT_ID_ADD_VARIABLE_GROUP :
+          recvAddVariableGroup(event);
+          return true;
+          break;
+
+        default :
+          ERROR("bool CField::dispatchEvent(CEventServer& event)", << "Unknown Event");
+          return false;
+      }
+    }
+  }
+  CATCH
+
+  void CField::sendUpdateData(const CArray<double,1>& data)
+  TRY
+  {
+    CTimer::get("Field : send data").resume();
+
+    CContext* context = CContext::getCurrent();
+    CContextClient* client = (!context->hasServer) ? context->client : this->file->getContextClient();
+    int receiverSize = client->serverSize;
+
+    CEventClient event(getType(), EVENT_ID_UPDATE_DATA);
+
+    map<int, CArray<int,1> >::iterator it;
+    list<CMessage> list_msg;
+    list<CArray<double,1> > list_data;
+
+    if (!grid->doGridHaveDataDistributed(client))
+    {
+       if (client->isServerLeader())
+       {
+          for (it = grid->storeIndex_toSrv[client].begin(); it != grid->storeIndex_toSrv[client].end(); it++)
+          {
+            int rank = it->first;
+            CArray<int,1>& index = it->second;
+
+            list_msg.push_back(CMessage());
+            list_data.push_back(CArray<double,1>(index.numElements()));
+
+            CArray<double,1>& data_tmp = list_data.back();
+            for (int n = 0; n < data_tmp.numElements(); n++) data_tmp(n) = data(index(n));
+
+            list_msg.back() << getId() << data_tmp;
+            event.push(rank, 1, list_msg.back());
+          }
+          client->sendEvent(event);
+        }
+      else client->sendEvent(event);
+    }
+    else
+    {
+      for (it = grid->storeIndex_toSrv[client].begin(); it != grid->storeIndex_toSrv[client].end(); it++)
+      {
+        int rank = it->first;
+        CArray<int,1>& index = it->second;
+
+        list_msg.push_back(CMessage());
+        list_data.push_back(CArray<double,1>(index.numElements()));
+
+        CArray<double,1>& data_tmp = list_data.back();
+        for (int n = 0; n < data_tmp.numElements(); n++) data_tmp(n) = data(index(n));
+
+        list_msg.back() << getId() << data_tmp;
+        event.push(rank, grid->nbSenders[receiverSize][rank], list_msg.back());
+      }
+      client->sendEvent(event);
+    }
+
+    CTimer::get("Field : send data").suspend();
+  }
+  CATCH_DUMP_ATTR
+
+  void CField::recvUpdateData(CEventServer& event)
+  TRY
+  {
+    std::map<int,CBufferIn*> rankBuffers;
+
+    list<CEventServer::SSubEvent>::iterator it;
+    string fieldId;
+    CTimer::get("Field : recv data").resume();
+    for (it = event.subEvents.begin(); it != event.subEvents.end(); ++it)
+    {
+      int rank = it->rank;
+      CBufferIn* buffer = it->buffer;
+      *buffer >> fieldId;
+      rankBuffers[rank] = buffer;
+    }
+    get(fieldId)->recvUpdateData(rankBuffers);
+    CTimer::get("Field : recv data").suspend();
+  }
+  CATCH
+
+  void  CField::recvUpdateData(std::map<int,CBufferIn*>& rankBuffers)
+  TRY
+  {
+    CContext* context = CContext::getCurrent();
+
+    size_t sizeData = 0;
+    if (0 == recvDataSrv.numElements())
+    {            
+      CArray<int,1>& storeClient = grid->storeIndex_client;
+
+      // Gather all data from different clients      
+      recvDataSrv.resize(storeClient.numElements());
+      recvFoperationSrv = std::shared_ptr<func::CFunctor>(new func::CInstant(recvDataSrv));
+    }
+
+    CArray<double,1> recv_data_tmp(recvDataSrv.numElements());    
+    const CDate& currDate = context->getCalendar()->getCurrentDate();
+    CDuration offsetAllButMonth (freq_offset.getValue().year, 0 , freq_offset.getValue().day,
+                                   freq_offset.getValue().hour, freq_offset.getValue().minute,
+                                   freq_offset.getValue().second, freq_offset.getValue().timestep);
+    const CDate opeDate   = (last_operation_srv - offsetAllButMonth + context->getCalendar()->getTimeStep())
+                              + freq_op + freq_operation_srv - freq_op - context->getCalendar()->getTimeStep() + offsetAllButMonth;
+
+    if (opeDate <= currDate)
+    {
+      for (map<int, CArray<size_t, 1> >::iterator it = grid->outLocalIndexStoreOnClient.begin(); it != grid->outLocalIndexStoreOnClient.end(); ++it)
+      {
+        CArray<double,1> tmp;
+        CArray<size_t,1>& indexTmp = it->second;
+        *(rankBuffers[it->first]) >> tmp;
+        for (int idx = 0; idx < indexTmp.numElements(); ++idx)
+        {
+          recv_data_tmp(indexTmp(idx)) = tmp(idx);
+        }      
+      }
+    }
+
+    this->setData(recv_data_tmp);
+    // delete incomming flux for server only
+    recvFoperationSrv.reset() ;
+    recvDataSrv.reset() ;
+  }
+  CATCH_DUMP_ATTR
+
+  void CField::writeUpdateData(const CArray<double,1>& data)
+  TRY
+  {
+    CContext* context = CContext::getCurrent();
+
+    const CDate& currDate = context->getCalendar()->getCurrentDate();
+    CDuration offsetAllButMonth (freq_offset.getValue().year, 0 , freq_offset.getValue().day,
+                                   freq_offset.getValue().hour, freq_offset.getValue().minute,
+                                   freq_offset.getValue().second, freq_offset.getValue().timestep);
+    const CDate opeDate   = (last_operation_srv - offsetAllButMonth + context->getCalendar()->getTimeStep())
+                              + freq_op + freq_operation_srv - freq_op - context->getCalendar()->getTimeStep() + offsetAllButMonth;
+    const CDate writeDate = last_Write_srv + freq_write_srv;
+
+    if (opeDate <= currDate)
+    {
+      (*recvFoperationSrv)(data);
+      last_operation_srv = currDate;
+    }
+
+    if (writeDate < (currDate + freq_operation_srv))
+    {
+      recvFoperationSrv->final();
+      last_Write_srv = writeDate;
+      grid->computeWrittenIndex();
+      writeField();
+      lastlast_Write_srv = last_Write_srv;
+    }
+  }
+  CATCH_DUMP_ATTR
+
+  void CField::writeField(void)
+  TRY
+  {
+    if (!getRelFile()->isEmptyZone())
+    {
+      if (grid->doGridHaveDataToWrite() || getRelFile()->type == CFile::type_attr::one_file)
+      {
+        getRelFile()->checkWriteFile();
+        this->incrementNStep();
+        getRelFile()->getDataOutput()->writeFieldData(CField::get(this));
+      }
+    }
+  }
+  CATCH_DUMP_ATTR
+
+  /*
+    Send a request for reading data.
+    Client sends a request to server for demanding server to read data and send back to it.
+    For now, this function is called only by client
+    In the future, it can be called by level-1 servers
+    \param [in] tsDataRequested timestamp when the call is made
+  */
+  bool CField::sendReadDataRequest(const CDate& tsDataRequested)
+  TRY
+  {
+    CContext* context = CContext::getCurrent();
+    // CContextClient* client = context->client;
+
+    // This code is for future: If we want to read file with level-2 servers
+    CContextClient* client = (!context->hasServer) ? context->client : this->file->getContextClient();
+
+    lastDataRequestedFromServer = tsDataRequested;
+
+    // No need to send the request if we are sure that we are already at EOF
+    if (!isEOF || context->getCalendar()->getCurrentDate() <= dateEOF)
+    {
+      CEventClient event(getType(), EVENT_ID_READ_DATA);
+      if (client->isServerLeader())
+      {
+        CMessage msg;
+        msg << getId();
+        const std::list<int>& ranks = client->getRanksServerLeader();
+        for (std::list<int>::const_iterator itRank = ranks.begin(), itRankEnd = ranks.end(); itRank != itRankEnd; ++itRank)
+          event.push(*itRank, 1, msg);
+        client->sendEvent(event);
+      }
+      else client->sendEvent(event);
+    }
+    else
+      serverSourceFilter->signalEndOfStream(tsDataRequested);
+
+    wasDataRequestedFromServer = true;
+
+    return !isEOF;
+  }
+  CATCH_DUMP_ATTR
+
+  /*!
+  Send request new data read from file if need be, that is the current data is out-of-date.
+  \return true if and only if some data was requested
+  */
+  bool CField::sendReadDataRequestIfNeeded(void)
+  TRY
+  {
+    const CDate& currentDate = CContext::getCurrent()->getCalendar()->getCurrentDate();
+
+    bool dataRequested = false;
+
+    while (currentDate >= lastDataRequestedFromServer)
+    {
+      info(20) << "currentDate : " << currentDate << endl ;
+      info(20) << "lastDataRequestedFromServer : " << lastDataRequestedFromServer << endl ;
+      info(20) << "file->output_freq.getValue() : " << file->output_freq.getValue() << endl ;
+      info(20) << "lastDataRequestedFromServer + file->output_freq.getValue() : " << lastDataRequestedFromServer + file->output_freq << endl ;
+
+      dataRequested |= sendReadDataRequest(lastDataRequestedFromServer + file->output_freq);
+    }
+
+    return dataRequested;
+  }
+  CATCH_DUMP_ATTR
+
+  void CField::recvReadDataRequest(CEventServer& event)
+  TRY
+  {
+    CBufferIn* buffer = event.subEvents.begin()->buffer;
+    StdString fieldId;
+    *buffer >> fieldId;
+    get(fieldId)->recvReadDataRequest();
+  }
+  CATCH
+
+  /*!
+    Receive data request sent from client and process it
+    Every time server receives this request, it will try to read data and sent read data back to client
+    At the moment, this function is called by server level 1
+    In the future, this should (only) be done by the last level servers.
+  */
+  void CField::recvReadDataRequest(void)
+  TRY
+  {
+    CContext* context = CContext::getCurrent();
+    CContextClient* client = context->client;
+
+    CEventClient event(getType(), EVENT_ID_READ_DATA_READY);
+    std::list<CMessage> msgs;
+
+    EReadField hasData = readField();
+
+    map<int, CArray<double,1> >::iterator it;
+    if (!grid->doGridHaveDataDistributed(client))
+    {
+       if (client->isServerLeader())
+       {
+          if (0 != recvDataSrv.numElements())
+          {            
+            const std::list<int>& ranks = client->getRanksServerLeader();
+            for (std::list<int>::const_iterator itRank = ranks.begin(), itRankEnd = ranks.end(); itRank != itRankEnd; ++itRank)
+            {
+              msgs.push_back(CMessage());
+              CMessage& msg = msgs.back();
+              msg << getId();
+              switch (hasData)
+              {
+                case RF_DATA:
+                  msg << getNStep() - 1 << recvDataSrv;
+                  break;
+                case RF_NODATA:
+                  msg << int(-2) << recvDataSrv;
+                  break;
+                case RF_EOF:                  
+                default:
+                  msg << int(-1);
+                  break;
+              }
+
+              event.push(*itRank, 1, msg);
+            }
+          }
+          client->sendEvent(event);
+       }
+       else
+       {
+          client->sendEvent(event);
+       }
+    }
+    else
+    {
+      for (map<int, CArray<size_t, 1> >::iterator it = grid->outLocalIndexStoreOnClient.begin(); 
+                                                  it != grid->outLocalIndexStoreOnClient.end(); ++it)
+      {
+        CArray<size_t,1>& indexTmp = it->second;
+        CArray<double,1> tmp(indexTmp.numElements());
+        for (int idx = 0; idx < indexTmp.numElements(); ++idx)
+        {
+          tmp(idx) = recvDataSrv(indexTmp(idx));
+        } 
+
+        msgs.push_back(CMessage());
+        CMessage& msg = msgs.back();
+        msg << getId();
+        switch (hasData)
+        {
+          case RF_DATA:
+            msg << getNStep() - 1 << tmp;
+            break;
+          case RF_NODATA:
+            msg << int(-2) << tmp;
+            break;
+          case RF_EOF:                  
+          default:
+            msg << int(-1);
+            break;
+        }
+
+        event.push(it->first, grid->nbReadSenders[client][it->first], msg);
+      }
+      client->sendEvent(event);
+    }
+  }
+  CATCH_DUMP_ATTR
+
+  /*!
+    Read field from a file.
+    A field is read with the distribution of data on the server side
+    \return State of field can be read from a file
+  */
+  CField::EReadField CField::readField(void)
+  TRY
+  {
+    CContext* context = CContext::getCurrent();
+    grid->computeWrittenIndex();
+    getRelFile()->initRead();
+    EReadField readState = RF_DATA;
+
+    if (!getRelFile()->isEmptyZone())
+    {      
+      if (grid->doGridHaveDataToWrite() || getRelFile()->type == CFile::type_attr::one_file)      
+      {
+        if (0 == recvDataSrv.numElements())
+        {            
+          CArray<int,1>& storeClient = grid->storeIndex_client;          
+          recvDataSrv.resize(storeClient.numElements());          
+        }
+        
+        getRelFile()->checkReadFile();
+
+        if (!nstepMax)
+        {
+          nstepMax = getRelFile()->getDataInput()->getFieldNbRecords(CField::get(this));
+        }
+
+        this->incrementNStep();
+
+        if (getNStep() > nstepMax && (getRelFile()->cyclic.isEmpty() || !getRelFile()->cyclic) )
+          readState = RF_EOF;
+
+        if (RF_EOF != readState)
+          getRelFile()->getDataInput()->readFieldData(CField::get(this));
+      }
+    }
+    else
+    {
+      this->incrementNStep();
+      if (getNStep() > nstepMax && (getRelFile()->cyclic.isEmpty() || !getRelFile()->cyclic) )
+        readState = RF_EOF;
+      else
+        readState = RF_NODATA;
+
+      if (!nstepMaxRead) // This can be a bug if we try to read field from zero time record
+        readState = RF_NODATA;
+    }
+
+    if (!nstepMaxRead)
+    {
+       MPI_Allreduce(MPI_IN_PLACE, &nstepMax, 1, MPI_INT, MPI_MAX, context->server->intraComm);
+       nstepMaxRead = true;
+    }
+
+    return readState;
+  }
+  CATCH_DUMP_ATTR
+
+  /*
+    Receive read data from server.
+    At the moment, this function is called in the client side.
+    In the future, this function can be called hiearachically (server n-1, server n -2, ..., client)
+    \param event event containing read data
+  */
+  void CField::recvReadDataReady(CEventServer& event)
+  TRY
+  {
+    string fieldId;
+    vector<int> ranks;
+    vector<CBufferIn*> buffers;
+
+    list<CEventServer::SSubEvent>::iterator it;
+    for (it = event.subEvents.begin(); it != event.subEvents.end(); ++it)
+    {
+      ranks.push_back(it->rank);
+      CBufferIn* buffer = it->buffer;
+      *buffer >> fieldId;
+      buffers.push_back(buffer);
+    }
+    get(fieldId)->recvReadDataReady(ranks, buffers);
+  }
+  CATCH
+
+  /*!
+    Receive read data from server
+    \param [in] ranks Ranks of sending processes
+    \param [in] buffers buffers containing read data
+  */
+  void CField::recvReadDataReady(vector<int> ranks, vector<CBufferIn*> buffers)
+  TRY
+  {
+    CContext* context = CContext::getCurrent();
+    std::map<int, CArray<double,1> > data;
+    const bool wasEOF = isEOF;
+
+    for (int i = 0; i < ranks.size(); i++)
+    {
+      int rank = ranks[i];
+      int record;
+      *buffers[i] >> record;
+      isEOF = (record == int(-1));
+
+      if (!isEOF)
+        *buffers[i] >> data[rank];
+      else
+        break;
+    }
+
+    if (wasDataAlreadyReceivedFromServer)
+      lastDataReceivedFromServer = lastDataReceivedFromServer + file->output_freq;
+    else
+    {
+      lastDataReceivedFromServer = context->getCalendar()->getInitDate();
+      wasDataAlreadyReceivedFromServer = true;
+    }
+
+    if (isEOF)
+    {
+      if (!wasEOF)
+        dateEOF = lastDataReceivedFromServer;
+
+      serverSourceFilter->signalEndOfStream(lastDataReceivedFromServer);
+    }
+    else
+      serverSourceFilter->streamDataFromServer(lastDataReceivedFromServer, data);
+  }
+  CATCH_DUMP_ATTR
+
+  void CField::checkForLateDataFromServer(void)
+  TRY
+  {
+    CContext* context = CContext::getCurrent();
+    const CDate& currentDate = context->getCalendar()->getCurrentDate();
+
+    // Check if data previously requested has been received as expected
+    if (wasDataRequestedFromServer && !isEOF)
+    {
+      CTimer timer("CField::checkForLateDataFromServer");
+
+      bool isDataLate;
+      do
+      {
+        const CDate nextDataDue = wasDataAlreadyReceivedFromServer ? (lastDataReceivedFromServer + file->output_freq) : context->getCalendar()->getInitDate();
+        isDataLate = (nextDataDue <= currentDate);
+
+        if (isDataLate)
+        {
+          timer.resume();
+
+          context->checkBuffersAndListen();
+
+          timer.suspend();
+        }
+      }
+      while (isDataLate && timer.getCumulatedTime() < CXios::recvFieldTimeout);
+
+      if (isDataLate)
+        ERROR("void CField::checkForLateDataFromServer(void)",
+              << "Late data at timestep = " << currentDate);
+    }
+  }
+  CATCH_DUMP_ATTR
+
+  void CField::checkIfMustAutoTrigger(void)
+  TRY
+  {
+    mustAutoTrigger = serverSourceFilter ? serverSourceFilter->mustAutoTrigger() : false;
+  }
+  CATCH_DUMP_ATTR
+
+  void CField::autoTriggerIfNeeded(void)
+  TRY
+  {
+    if (mustAutoTrigger)
+      serverSourceFilter->trigger(CContext::getCurrent()->getCalendar()->getCurrentDate());
+  }
+  CATCH_DUMP_ATTR
+
+   //----------------------------------------------------------------
+
+   void CField::setRelFile(CFile* _file)
+   TRY
+   {
+      this->file = _file;
+      hasOutputFile = true;
+   }
+   CATCH_DUMP_ATTR
+
+   //----------------------------------------------------------------
+
+   StdString CField::GetName(void)    { return StdString("field"); }
+   StdString CField::GetDefName(void) { return CField::GetName(); }
+   ENodeType CField::GetType(void)    { return eField; }
+
+   //----------------------------------------------------------------
+
+   CGrid* CField::getRelGrid(void) const
+   TRY
+   {
+      return this->grid;
+   }
+   CATCH
+
+   //----------------------------------------------------------------
+
+   CFile* CField::getRelFile(void) const
+   TRY
+   {
+      return this->file;
+   }
+   CATCH
+
+   int CField::getNStep(void) const
+   TRY
+   {
+      return this->nstep;
+   }
+   CATCH
+
+   func::CFunctor::ETimeType CField::getOperationTimeType() const
+   TRY
+   {
+     return operationTimeType;
+   }
+   CATCH
+
+   //----------------------------------------------------------------
+
+   void CField::incrementNStep(void)
+   TRY
+   {
+      this->nstep++;
+   }
+   CATCH_DUMP_ATTR
+
+   void CField::resetNStep(int nstep /*= 0*/)
+   TRY
+   {
+      this->nstep = nstep;
+   }
+   CATCH_DUMP_ATTR
+
+   void CField::resetNStepMax(void)
+   TRY
+   {
+      this->nstepMax = 0;
+      nstepMaxRead = false;
+   }
+   CATCH_DUMP_ATTR
+
+   //----------------------------------------------------------------
+
+   bool CField::isActive(bool atCurrentTimestep /*= false*/) const
+   TRY
+   {
+      if (clientSourceFilter)
+        return atCurrentTimestep ? clientSourceFilter->isDataExpected(CContext::getCurrent()->getCalendar()->getCurrentDate()) : true;
+      else if (storeFilter)
+        return true;
+      else if (instantDataFilter)
+        ERROR("bool CField::isActive(bool atCurrentTimestep)",
+              << "Impossible to check if field [ id = " << getId() << " ] is active as it cannot be used to receive nor send data.");
+
+      return false;
+   }
+   CATCH
+
+   //----------------------------------------------------------------
+
+   bool CField::wasWritten() const
+   TRY
+   {
+     return written;
+   }
+   CATCH
+
+   void CField::setWritten()
+   TRY
+   {
+     written = true;
+   }
+   CATCH_DUMP_ATTR
+
+   //----------------------------------------------------------------
+
+   bool CField::getUseCompressedOutput() const
+   TRY
+   {
+     return useCompressedOutput;
+   }
+   CATCH
+
+   void CField::setUseCompressedOutput()
+   TRY
+   {
+     useCompressedOutput = true;
+   }
+   CATCH_DUMP_ATTR
+
+   //----------------------------------------------------------------
+
+   std::shared_ptr<COutputPin> CField::getInstantDataFilter()
+   TRY
+   {
+     return instantDataFilter;
+   }
+   CATCH_DUMP_ATTR
+
+   //----------------------------------------------------------------
+
+   /*!
+     Build up graph of grids which plays role of destination and source in grid transformation
+     This function should be called before \func solveGridReference()
+   */
+   void CField::buildGridTransformationGraph()
+   TRY
+   {
+     CContext* context = CContext::getCurrent();
+     if (context->hasClient && !context->hasServer)
+     {
+       if (grid && !grid->isTransformed() && hasDirectFieldReference() && grid != getDirectFieldReference()->grid)
+       {
+         grid->addTransGridSource(getDirectFieldReference()->grid);
+       }
+     }
+   }
+   CATCH_DUMP_ATTR
+
+   /*!
+     Generate a new grid destination if there are more than one grid source pointing to a same grid destination
+   */
+   void CField::generateNewTransformationGridDest()
+   TRY
+   {
+     CContext* context = CContext::getCurrent();
+     if (context->hasClient && !context->hasServer)
+     {
+       std::map<CGrid*,std::pair<bool,StdString> >& gridSrcMap = grid->getTransGridSource();
+       if (1 < gridSrcMap.size())
+       {
+         // Search for grid source
+         CGrid* gridSrc = grid;
+         CField* currField = this;
+         std::vector<CField*> hieraField;
+
+         while (currField->hasDirectFieldReference() && (gridSrc == grid))
+         {
+           hieraField.push_back(currField);
+           CField* tmp = currField->getDirectFieldReference();
+           currField = tmp;
+           gridSrc = currField->grid;
+         }
+
+         if (gridSrcMap.end() != gridSrcMap.find(gridSrc))
+         {
+           CGrid* gridTmp;
+           std::pair<bool,StdString> newGridDest = gridSrcMap[gridSrc];
+           if (newGridDest.first)
+           {
+             StdString newIdGridDest = newGridDest.second;
+             if (!CGrid::has(newIdGridDest))
+             {
+                ERROR("CGrid* CGrid::generateNewTransformationGridDest()",
+                  << " Something wrong happened! Grid whose id " << newIdGridDest
+                  << "should exist ");
+             }
+             gridTmp = CGrid::get(newIdGridDest);
+           }
+           else
+           {
+             StdString newIdGridDest = CGrid::generateId(gridSrc, grid);
+             gridTmp = CGrid::cloneGrid(newIdGridDest, grid);
+
+             (gridSrcMap[gridSrc]).first = true;
+             (gridSrcMap[gridSrc]).second = newIdGridDest;
+           }
+
+           // Update all descendants
+           for (std::vector<CField*>::iterator it = hieraField.begin(); it != hieraField.end(); ++it)
+           {
+             (*it)->grid = gridTmp;
+             (*it)->updateRef((*it)->grid);
+           }
+         }
+       }
+     }
+   }
+   CATCH_DUMP_ATTR
+
+   void CField::updateRef(CGrid* grid)
+   TRY
+   {
+     if (!grid_ref.isEmpty()) grid_ref.setValue(grid->getId());
+     else
+     {
+       std::vector<CAxis*> axisTmp = grid->getAxis();
+       std::vector<CDomain*> domainTmp = grid->getDomains();
+       if ((1<axisTmp.size()) || (1<domainTmp.size()))
+         ERROR("void CField::updateRef(CGrid* grid)",
+           << "More than one domain or axis is available for domain_ref/axis_ref of field " << this->getId());
+
+       if ((!domain_ref.isEmpty()) && (domainTmp.empty()))
+         ERROR("void CField::updateRef(CGrid* grid)",
+           << "Incoherent between available domain and domain_ref of field " << this->getId());
+       if ((!axis_ref.isEmpty()) && (axisTmp.empty()))
+         ERROR("void CField::updateRef(CGrid* grid)",
+           << "Incoherent between available axis and axis_ref of field " << this->getId());
+
+       if (!domain_ref.isEmpty()) domain_ref.setValue(domainTmp[0]->getId());
+       if (!axis_ref.isEmpty()) axis_ref.setValue(axisTmp[0]->getId());
+     }
+   }
+   CATCH_DUMP_ATTR
+   
+   /*!
+     Solve reference of all enabled fields even the source fields .
+     In this step, we do transformations.
+   */
+   void CField::solveAllEnabledFieldsAndTransform()
+   TRY
+   {
+     CContext* context = CContext::getCurrent();
+     bool hasClient = context->hasClient;
+     bool hasServer = context->hasServer;
+
+     if (!isReferenceSolvedAndTransformed)
+     {
+        isReferenceSolvedAndTransformed = true;
+
+        if (hasClient && !hasServer)
+        {
+          solveRefInheritance(true);
+          if (hasDirectFieldReference()) getDirectFieldReference()->solveAllEnabledFieldsAndTransform();
+        }
+
+        if (hasServer)
+          solveServerOperation();
+
+        solveGridReference();
+
+        if (hasClient && !hasServer)
+       {
+         solveGenerateGrid();
+         buildGridTransformationGraph();
+       }
+
+       solveGridDomainAxisRef(false);
+
+       if (hasClient && !hasServer)
+       {
+         solveTransformedGrid();
+       }
+
+       solveGridDomainAxisRef(false);
+     }
+   }
+   CATCH_DUMP_ATTR
+
+   void CField::checkGridOfEnabledFields()
+   TRY
+   {
+     if (!isGridChecked)
+     {
+       isGridChecked = true;
+       solveCheckMaskIndex(false);
+     }
+   }
+   CATCH_DUMP_ATTR
+
+   void CField::sendGridComponentOfEnabledFields()
+   TRY
+   {
+      solveGridDomainAxisRef(true);
+      // solveCheckMaskIndex(true);
+   }
+   CATCH_DUMP_ATTR
+
+   void CField::sendGridOfEnabledFields()
+   TRY
+   {
+      // solveGridDomainAxisRef(true);
+      solveCheckMaskIndex(true);
+   }   
+   CATCH_DUMP_ATTR
+
+   void CField::solveOnlyReferenceEnabledField(bool doSending2Server)
+   TRY
+   {
+     CContext* context = CContext::getCurrent();
+     if (!isReferenceSolved)
+     {
+        isReferenceSolved = true;
+
+        if (context->hasClient && !context->hasServer)
+        {
+          solveRefInheritance(true);
+          if (hasDirectFieldReference()) getDirectFieldReference()->solveOnlyReferenceEnabledField(false);
+        }
+
+        if (context->hasServer)
+          solveServerOperation();
+
+        solveGridReference();
+        grid->solveDomainAxisRefInheritance(true); // make it again to solve grid reading from file
+
+        if (context->hasClient && !context->hasServer)
+       {
+         solveGenerateGrid();
+         buildGridTransformationGraph();
+       }
+     }
+   }
+   CATCH_DUMP_ATTR
+
+   void CField::solveAllReferenceEnabledField(bool doSending2Server)
+   TRY
+   {
+     CContext* context = CContext::getCurrent();
+     solveOnlyReferenceEnabledField(doSending2Server);
+
+     if (!areAllReferenceSolved)
+     {
+        areAllReferenceSolved = true;
+       
+        if (context->hasClient && !context->hasServer)
+        {
+          solveRefInheritance(true);
+          if (hasDirectFieldReference()) getDirectFieldReference()->solveAllReferenceEnabledField(false);
+        }
+        else if (context->hasServer)
+          solveServerOperation();
+
+        solveGridReference();
+     }
+
+     solveGridDomainAxisRef(doSending2Server);
+
+     if (context->hasClient && !context->hasServer)
+     {
+       solveTransformedGrid();
+     }
+
+     solveCheckMaskIndex(doSending2Server);
+   }
+   CATCH_DUMP_ATTR
+
+   std::map<int, StdSize> CField::getGridAttributesBufferSize(CContextClient* client, bool bufferForWriting /*= "false"*/)
+   TRY
+   {
+     return grid->getAttributesBufferSize(client, bufferForWriting);
+   }
+   CATCH_DUMP_ATTR
+
+   std::map<int, StdSize> CField::getGridDataBufferSize(CContextClient* client, bool bufferForWriting /*= "false"*/)
+   TRY
+   {
+     return grid->getDataBufferSize(client, getId(), bufferForWriting);
+   }
+   CATCH_DUMP_ATTR
+
+   size_t CField::getGlobalWrittenSize()
+   TRY
+   {
+     return grid->getGlobalWrittenSize();
+   }
+   CATCH_DUMP_ATTR
+
+   //----------------------------------------------------------------
+
+   void CField::solveServerOperation(void)
+   TRY
+   {
+      CContext* context = CContext::getCurrent();
+
+      if (!context->hasServer || !hasOutputFile) return;
+
+      if (freq_op.isEmpty())
+        freq_op.setValue(TimeStep);
+
+      if (freq_offset.isEmpty())
+        freq_offset.setValue(NoneDu);
+
+      freq_operation_srv = file->output_freq.getValue();
+      freq_write_srv     = file->output_freq.getValue();
+
+      lastlast_Write_srv = context->getCalendar()->getInitDate();
+      last_Write_srv     = context->getCalendar()->getInitDate();
+      last_operation_srv = context->getCalendar()->getInitDate();
+
+      const CDuration toffset = freq_operation_srv - freq_offset.getValue() - context->getCalendar()->getTimeStep();
+      last_operation_srv     = last_operation_srv - toffset;
+
+      if (operation.isEmpty())
+        ERROR("void CField::solveServerOperation(void)",
+              << "An operation must be defined for field \"" << getId() << "\".");
+
+      std::shared_ptr<func::CFunctor> functor;
+      CArray<double, 1> dummyData;
+
+#define DECLARE_FUNCTOR(MType, mtype) \
+      if (operation.getValue().compare(#mtype) == 0) \
+      { \
+        functor.reset(new func::C##MType(dummyData)); \
+      }
+
+#include "functor_type.conf"
+
+      if (!functor)
+        ERROR("void CField::solveServerOperation(void)",
+              << "\"" << operation << "\" is not a valid operation.");
+
+      operationTimeType = functor->timeType();
+   }
+   CATCH_DUMP_ATTR
+
+   //----------------------------------------------------------------
+
+   /*!
+    * Constructs the graph filter for the field, enabling or not the data output.
+    * This method should not be called more than once with enableOutput equal to true.
+    *
+    * \param gc the garbage collector to use when building the filter graph
+    * \param enableOutput must be true when the field data is to be
+    *                     read by the client or/and written to a file
+    */
+   void CField::buildFilterGraph(CGarbageCollector& gc, bool enableOutput)
+   TRY
+   {     
+    if (!isReferenceSolvedAndTransformed) solveAllEnabledFieldsAndTransform();
+    if (!isGridChecked) checkGridOfEnabledFields();
+
+     const bool detectMissingValues = (!detect_missing_value.isEmpty() && !default_value.isEmpty() && detect_missing_value == true);
+     const double defaultValue  = detectMissingValues ? default_value : (!default_value.isEmpty() ? default_value : 0.0);
+
+     CContext* context = CContext::getCurrent();
+     bool hasWriterServer = context->hasServer && !context->hasClient;
+     bool hasIntermediateServer = context->hasServer && context->hasClient;
+
+     if (hasWriterServer)
+     {
+        if (!instantDataFilter)
+          instantDataFilter = clientSourceFilter = std::shared_ptr<CSourceFilter>(new CSourceFilter(gc, grid, true, false));
+
+
+       // If the field data is to be read by the client or/and written to a file
+       if (enableOutput && !storeFilter && !fileWriterFilter)
+       {
+         if (file && (file->mode.isEmpty() || file->mode == CFile::mode_attr::write))
+         {
+           fileServerWriterFilter = std::shared_ptr<CFileServerWriterFilter>(new CFileServerWriterFilter(gc, this));
+           instantDataFilter->connectOutput(fileServerWriterFilter, 0);
+         }
+       }
+     }
+     else if (hasIntermediateServer)
+     {
+       if (!instantDataFilter)
+         instantDataFilter = clientSourceFilter = std::shared_ptr<CSourceFilter>(new CSourceFilter(gc, grid, false, false));
+
+             // If the field data is to be read by the client or/and written to a file
+       if (enableOutput && !storeFilter && !fileWriterFilter)
+       {
+         if (file && (file->mode.isEmpty() || file->mode == CFile::mode_attr::write))
+         {
+           fileWriterFilter = std::shared_ptr<CFileWriterFilter>(new CFileWriterFilter(gc, this));
+           instantDataFilter->connectOutput(fileWriterFilter, 0);
+         }
+       }
+     }
+     else
+     {
+       // Start by building a filter which can provide the field's instant data
+       if (!instantDataFilter)
+       {
+         // Check if we have an expression to parse
+         if (hasExpression())
+         {
+           boost::scoped_ptr<IFilterExprNode> expr(parseExpr(getExpression() + '\0'));
+           std::shared_ptr<COutputPin> filter = expr->reduce(gc, *this);
+
+           // Check if a spatial transformation is needed
+           if (!field_ref.isEmpty())
+           {
+             CGrid* gridRef = CField::get(field_ref)->grid;
+
+             if (grid && grid != gridRef && grid->hasTransform())
+             {
+                 std::pair<std::shared_ptr<CFilter>, std::shared_ptr<CFilter> > filters = CSpatialTransformFilter::buildFilterGraph(gc, gridRef, grid, detectMissingValues, defaultValue); 
+
+               filter->connectOutput(filters.first, 0);
+               filter = filters.second;
+             }
+           }
+
+           instantDataFilter = filter;
+         }
+         // Check if we have a reference on another field
+         else if (!field_ref.isEmpty())
+           instantDataFilter = getFieldReference(gc);
+         // Check if the data is to be read from a file
+         else if (file && !file->mode.isEmpty() && file->mode == CFile::mode_attr::read)
+         {
+           checkTimeAttributes();
+           instantDataFilter = serverSourceFilter = std::shared_ptr<CSourceFilter>(new CSourceFilter(gc, grid, true, false, freq_offset, true,
+                                                                                                       detectMissingValues, defaultValue));
+         }
+         else // The data might be passed from the model
+         {
+            if (check_if_active.isEmpty()) check_if_active = false; 
+            instantDataFilter = clientSourceFilter = std::shared_ptr<CSourceFilter>(new CSourceFilter(gc, grid, false, true, NoneDu, false,
+                                                                                                        detectMissingValues, defaultValue));
+         }
+       }
+
+       // If the field data is to be read by the client or/and written to a file
+       if (enableOutput && !storeFilter && !fileWriterFilter)
+       {
+         if (!read_access.isEmpty() && read_access)
+         {
+           storeFilter = std::shared_ptr<CStoreFilter>(new CStoreFilter(gc, CContext::getCurrent(), grid,
+                                                                          detectMissingValues, defaultValue));
+           instantDataFilter->connectOutput(storeFilter, 0);
+         }
+
+         if (file && (file->mode.isEmpty() || file->mode == CFile::mode_attr::write))
+         {
+           fileWriterFilter = std::shared_ptr<CFileWriterFilter>(new CFileWriterFilter(gc, this));
+           getTemporalDataFilter(gc, file->output_freq)->connectOutput(fileWriterFilter, 0);
+         }
+       }
+     }
+   }
+   CATCH_DUMP_ATTR
+
+   /*!
+    * Returns the filter needed to handle the field reference.
+    * This method should only be called when building the filter graph corresponding to the field.
+    *
+    * \param gc the garbage collector to use
+    * \return the output pin corresponding to the field reference
+    */
+   std::shared_ptr<COutputPin> CField::getFieldReference(CGarbageCollector& gc)
+   TRY
+   {
+     if (instantDataFilter || field_ref.isEmpty())
+       ERROR("COutputPin* CField::getFieldReference(CGarbageCollector& gc)",
+             "Impossible to get the field reference for a field which has already been parsed or which does not have a field_ref.");
+
+     CField* fieldRef = CField::get(field_ref);
+     fieldRef->buildFilterGraph(gc, false);
+
+     std::pair<std::shared_ptr<CFilter>, std::shared_ptr<CFilter> > filters;
+     // Check if a spatial transformation is needed
+     if (grid && grid != fieldRef->grid && grid->hasTransform())
+     {       
+       bool hasMissingValue = (!detect_missing_value.isEmpty() && !default_value.isEmpty() && detect_missing_value == true);
+       double defaultValue  = hasMissingValue ? default_value : (!default_value.isEmpty() ? default_value : 0.0);                                
+       filters = CSpatialTransformFilter::buildFilterGraph(gc, fieldRef->grid, grid, hasMissingValue, defaultValue);
+     }
+     else
+       filters.first = filters.second = std::shared_ptr<CFilter>(new CPassThroughFilter(gc));
+
+     fieldRef->getInstantDataFilter()->connectOutput(filters.first, 0);
+
+     return filters.second;
+   }
+   CATCH_DUMP_ATTR
+
+   /*!
+    * Returns the filter needed to handle a self reference in the field's expression.
+    * If the needed filter does not exist, it is created, otherwise it is reused.
+    * This method should only be called when building the filter graph corresponding
+    * to the field's expression.
+    *
+    * \param gc the garbage collector to use
+    * \return the output pin corresponding to a self reference
+    */
+   std::shared_ptr<COutputPin> CField::getSelfReference(CGarbageCollector& gc)
+   TRY
+   {
+     if (instantDataFilter || !hasExpression())
+       ERROR("COutputPin* CField::getSelfReference(CGarbageCollector& gc)",
+             "Impossible to add a self reference to a field which has already been parsed or which does not have an expression.");
+
+     if (!selfReferenceFilter)
+     {
+       const bool detectMissingValues = (!detect_missing_value.isEmpty() && !default_value.isEmpty() && detect_missing_value == true);
+       const double defaultValue  = detectMissingValues ? default_value : (!default_value.isEmpty() ? default_value : 0.0);
+
+       if (file && !file->mode.isEmpty() && file->mode == CFile::mode_attr::read)
+       {
+         if (!serverSourceFilter)
+         {
+           checkTimeAttributes();
+           serverSourceFilter = std::shared_ptr<CSourceFilter>(new CSourceFilter(gc, grid, true, false, freq_offset, true,
+                                                                                   detectMissingValues, defaultValue));
+         }
+
+         selfReferenceFilter = serverSourceFilter;
+       }
+       else if (!field_ref.isEmpty())
+       {
+         CField* fieldRef = CField::get(field_ref);
+         fieldRef->buildFilterGraph(gc, false);
+         selfReferenceFilter = fieldRef->getInstantDataFilter();
+       }
+       else
+       {
+         if (!clientSourceFilter)
+         {
+           if (check_if_active.isEmpty()) check_if_active = false;
+           clientSourceFilter = std::shared_ptr<CSourceFilter>(new CSourceFilter(gc, grid, true, true, NoneDu, false,
+                                                                                   detectMissingValues, defaultValue));
+         }
+
+         selfReferenceFilter = clientSourceFilter;
+       }
+     }
+
+     return selfReferenceFilter;
+   }
+   CATCH_DUMP_ATTR
+
+   /*!
+    * Returns the temporal filter corresponding to the field's temporal operation
+    * for the specified operation frequency. The filter is created if it does not
+    * exist, otherwise it is reused.
+    *
+    * \param gc the garbage collector to use
+    * \param outFreq the operation frequency, i.e. the frequency at which the output data will be computed
+    * \return the output pin corresponding to the requested temporal filter
+    */
+   std::shared_ptr<COutputPin> CField::getTemporalDataFilter(CGarbageCollector& gc, CDuration outFreq)
+   TRY
+   {
+     std::map<CDuration, std::shared_ptr<COutputPin> >::iterator it = temporalDataFilters.find(outFreq);
+
+     if (it == temporalDataFilters.end())
+     {
+       if (operation.isEmpty())
+         ERROR("void CField::getTemporalDataFilter(CGarbageCollector& gc, CDuration outFreq)",
+               << "An operation must be defined for field \"" << getId() << "\".");
+
+       checkTimeAttributes(&outFreq);
+
+       const bool detectMissingValues = (!detect_missing_value.isEmpty()  && detect_missing_value == true);
+       std::shared_ptr<CTemporalFilter> temporalFilter(new CTemporalFilter(gc, operation,
+                                                                             CContext::getCurrent()->getCalendar()->getInitDate(),
+                                                                             freq_op, freq_offset, outFreq, detectMissingValues));
+
+       instantDataFilter->connectOutput(temporalFilter, 0);
+
+       it = temporalDataFilters.insert(std::make_pair(outFreq, temporalFilter)).first;
+     }
+
+     return it->second;
+   }
+   CATCH_DUMP_ATTR
+
+  /*!
+    * Returns the temporal filter corresponding to the field's temporal operation
+    * for the specified operation frequency.
+    *
+    * \param gc the garbage collector to use
+    * \param outFreq the operation frequency, i.e. the frequency at which the output data will be computed
+    * \return the output pin corresponding to the requested temporal filter
+    */
+   
+   std::shared_ptr<COutputPin> CField::getSelfTemporalDataFilter(CGarbageCollector& gc, CDuration outFreq)
+   TRY
+   {
+     if (instantDataFilter || !hasExpression())
+       ERROR("COutputPin* CField::getSelfTemporalDataFilter(CGarbageCollector& gc)",
+             "Impossible to add a self reference to a field which has already been parsed or which does not have an expression.");
+
+     if (!selfReferenceFilter) getSelfReference(gc) ;
+
+     if (serverSourceFilter || clientSourceFilter)
+     {
+       if (operation.isEmpty())
+         ERROR("void CField::getSelfTemporalDataFilter(CGarbageCollector& gc, CDuration outFreq)",
+               << "An operation must be defined for field \"" << getId() << "\".");
+
+       checkTimeAttributes(&outFreq);
+
+       const bool detectMissingValues = (!detect_missing_value.isEmpty() && detect_missing_value == true);
+       std::shared_ptr<CTemporalFilter> temporalFilter(new CTemporalFilter(gc, operation,
+                                                                             CContext::getCurrent()->getCalendar()->getInitDate(),
+                                                                             freq_op, freq_offset, outFreq, detectMissingValues));
+
+       selfReferenceFilter->connectOutput(temporalFilter, 0);
+       return temporalFilter ;
+     }
+     else if (!field_ref.isEmpty())
+     {
+       CField* fieldRef = CField::get(field_ref);
+       fieldRef->buildFilterGraph(gc, false); 
+       return fieldRef->getTemporalDataFilter(gc, outFreq) ;
+     }
+  }
+   CATCH_DUMP_ATTR
+
+   //----------------------------------------------------------------
+/*
+   void CField::fromBinary(StdIStream& is)
+   {
+      SuperClass::fromBinary(is);
+#define CLEAR_ATT(name_)\
+      SuperClassAttribute::operator[](#name_)->reset()
+
+         CLEAR_ATT(domain_ref);
+         CLEAR_ATT(axis_ref);
+#undef CLEAR_ATT
+
+   }
+*/
+   //----------------------------------------------------------------
+
+   void CField::solveGridReference(void)
+   TRY
+   {
+      if (grid_ref.isEmpty() && domain_ref.isEmpty() && axis_ref.isEmpty() && scalar_ref.isEmpty())
+      {
+        ERROR("CField::solveGridReference(void)",
+              << "A grid must be defined for field '" << getFieldOutputName() << "' .");
+      }
+      else if (!grid_ref.isEmpty() && (!domain_ref.isEmpty() || !axis_ref.isEmpty() || !scalar_ref.isEmpty()))
+      {
+        ERROR("CField::solveGridReference(void)",
+              << "Field '" << getFieldOutputName() << "' has both a grid and a domain/axis/scalar." << std::endl
+              << "Please define either 'grid_ref' or 'domain_ref'/'axis_ref'/'scalar_ref'.");
+      }
+
+      if (grid_ref.isEmpty())
+      {
+        std::vector<CDomain*> vecDom;
+        std::vector<CAxis*> vecAxis;
+        std::vector<CScalar*> vecScalar;
+        std::vector<int> axisDomainOrderTmp;
+
+        std::vector<CDomain*> vecDomRef;
+        std::vector<CAxis*> vecAxisRef;
+        std::vector<CScalar*> vecScalarRef;
+
+        
+        if (!domain_ref.isEmpty())
+        {
+          StdString tmp = domain_ref.getValue();
+          if (CDomain::has(domain_ref))
+          {
+            vecDom.push_back(CDomain::get(domain_ref));
+            vecDomRef.push_back(CDomain::createDomain());
+            vecDomRef.back()->domain_ref=domain_ref;
+            axisDomainOrderTmp.push_back(2);
+          }
+          else  ERROR("CField::solveGridReference(void)",
+                      << "Invalid reference to domain '" << domain_ref.getValue() << "'.");
+        }
+
+        if (!axis_ref.isEmpty())
+        {
+          if (CAxis::has(axis_ref))
+          {
+            vecAxis.push_back(CAxis::get(axis_ref));
+            vecAxisRef.push_back(CAxis::createAxis());
+            vecAxisRef.back()->axis_ref=axis_ref;
+            axisDomainOrderTmp.push_back(1);
+          }
+          else  ERROR("CField::solveGridReference(void)",
+                      << "Invalid reference to axis '" << axis_ref.getValue() << "'.");
+        }
+
+        if (!scalar_ref.isEmpty())
+        {
+          if (CScalar::has(scalar_ref))
+          {
+            vecScalar.push_back(CScalar::get(scalar_ref));
+            vecScalarRef.push_back(CScalar::createScalar());
+            vecScalarRef.back()->scalar_ref=scalar_ref;
+            axisDomainOrderTmp.push_back(0);
+          }
+          else ERROR("CField::solveGridReference(void)",
+                     << "Invalid reference to scalar '" << scalar_ref.getValue() << "'.");
+        }
+        
+        CArray<int,1> axisDomainOrder(axisDomainOrderTmp.size());
+        for (int idx = 0; idx < axisDomainOrderTmp.size(); ++idx)
+        {
+          axisDomainOrder(idx) = axisDomainOrderTmp[idx];
+        }
+
+        // Warning: the gridId shouldn't be set as the grid_ref since it could be inherited
+        StdString gridId = CGrid::generateId(vecDom, vecAxis, vecScalar,axisDomainOrder);
+        if (CGrid::has(gridId)) this->grid = CGrid::get(gridId);
+        else  this->grid = CGrid::createGrid(gridId, vecDomRef, vecAxisRef, vecScalarRef,axisDomainOrder);
+      }
+      else
+      {
+        if (CGrid::has(grid_ref)) this->grid = CGrid::get(grid_ref);
+        else  ERROR("CField::solveGridReference(void)",
+                     << "Invalid reference to grid '" << grid_ref.getValue() << "'.");
+      }
+   }
+   CATCH_DUMP_ATTR
+
+   void CField::solveGridDomainAxisRef(bool checkAtt)
+   TRY
+   {
+     grid->solveDomainAxisRef(checkAtt);
+   }
+   CATCH_DUMP_ATTR
+
+   void CField::solveCheckMaskIndex(bool doSendingIndex)
+   TRY
+   {
+     grid->checkMaskIndex(doSendingIndex);
+   }
+   CATCH_DUMP_ATTR
+
+   void CField::solveTransformedGrid()
+   TRY
+   {
+     if (grid && !grid->isTransformed() && hasDirectFieldReference() && grid != getDirectFieldReference()->grid)
+     {
+       std::vector<CGrid*> grids;
+       // Source grid
+       grids.push_back(getDirectFieldReference()->grid);
+       // Intermediate grids
+       if (!grid_path.isEmpty())
+       {
+         std::string gridId;
+         size_t start = 0, end;
+
+         do
+         {
+           end = grid_path.getValue().find(',', start);
+           if (end != std::string::npos)
+           {
+             gridId = grid_path.getValue().substr(start, end - start);
+             start = end + 1;
+           }
+           else
+             gridId = grid_path.getValue().substr(start);
+
+           if (!CGrid::has(gridId))
+             ERROR("void CField::solveTransformedGrid()",
+                   << "Invalid grid_path, the grid '" << gridId << "' does not exist.");
+
+           grids.push_back(CGrid::get(gridId));
+         }
+         while (end != std::string::npos);
+       }
+       // Destination grid
+       grids.push_back(grid);
+
+       for (size_t i = 0, count = grids.size() - 1; i < count; ++i)
+       {
+         CGrid *gridSrc  = grids[i];
+         CGrid *gridDest = grids[i + 1];
+         if (!gridDest->isTransformed())
+           gridDest->transformGrid(gridSrc);
+       }
+     }
+     else if (grid && grid->hasTransform() && !grid->isTransformed())
+     {
+       // Temporarily deactivate the self-transformation of grid
+       // grid->transformGrid(grid);
+     }
+   }
+   CATCH_DUMP_ATTR
+
+   void CField::solveGenerateGrid()
+   TRY
+   {
+     if (grid && !grid->isTransformed() && hasDirectFieldReference() && grid != getDirectFieldReference()->grid)
+       grid->completeGrid(getDirectFieldReference()->grid);
+     else
+       grid->completeGrid();
+   }
+   CATCH_DUMP_ATTR
+
+   void CField::solveGridDomainAxisBaseRef()
+   TRY
+   {
+     grid->solveDomainAxisRef(false);
+     grid->solveDomainAxisBaseRef();
+   }
+   CATCH_DUMP_ATTR
+
+   ///-------------------------------------------------------------------
+
+   template <>
+   void CGroupTemplate<CField, CFieldGroup, CFieldAttributes>::solveRefInheritance(void)
+   TRY
+   {
+      if (this->group_ref.isEmpty()) return;
+      StdString gref = this->group_ref.getValue();
+
+      if (!CFieldGroup::has(gref))
+         ERROR("CGroupTemplate<CField, CFieldGroup, CFieldAttributes>::solveRefInheritance(void)",
+               << "[ gref = " << gref << "]"
+               << " invalid group name !");
+
+      CFieldGroup* group = CFieldGroup::get(gref);
+      CFieldGroup* owner = CFieldGroup::get(boost::polymorphic_downcast<CFieldGroup*>(this));
+      owner->setAttributes(group); // inherite of attributes of group reference
+      
+      std::vector<CField*> allChildren  = group->getAllChildren();
+      std::vector<CField*>::iterator it = allChildren.begin(), end = allChildren.end();
+
+      for (; it != end; it++)
+      {
+         CField* child = *it;
+         if (child->hasId()) owner->createChild()->field_ref.setValue(child->getId());
+
+      }
+   }
+   CATCH_DUMP_ATTR
+
+   void CField::scaleFactorAddOffset(double scaleFactor, double addOffset)
+   TRY
+   {
+     recvDataSrv = (recvDataSrv - addOffset) / scaleFactor;
+   }
+   CATCH_DUMP_ATTR
+
+   void CField::invertScaleFactorAddOffset(double scaleFactor, double addOffset)
+   TRY
+   {
+     recvDataSrv = recvDataSrv * scaleFactor + addOffset;
+   }
+   CATCH_DUMP_ATTR
+
+   void CField::outputField(CArray<double,1>& fieldOut)
+   TRY
+   { 
+      CArray<size_t,1>& outIndexClient = grid->localIndexToWriteOnClient;
+      CArray<size_t,1>& outIndexServer = grid->localIndexToWriteOnServer;
+      for (size_t idx = 0; idx < outIndexServer.numElements(); ++idx)
+      {
+        fieldOut(outIndexServer(idx)) = recvDataSrv(outIndexClient(idx));
+      }
+   }
+   CATCH_DUMP_ATTR
+
+   void CField::inputField(CArray<double,1>& fieldIn)
+   TRY
+   {
+      CArray<size_t,1>& outIndexClient = grid->localIndexToWriteOnClient;
+      CArray<size_t,1>& outIndexServer = grid->localIndexToWriteOnServer;
+      for (size_t idx = 0; idx < outIndexServer.numElements(); ++idx)
+      {
+        recvDataSrv(outIndexClient(idx)) = fieldIn(outIndexServer(idx));
+      }
+   }
+   CATCH_DUMP_ATTR
+
+   void CField::outputCompressedField(CArray<double,1>& fieldOut)
+   TRY
+   {
+      CArray<size_t,1>& outIndexClient = grid->localIndexToWriteOnClient;
+      CArray<size_t,1>& outIndexServer = grid->localIndexToWriteOnServer;
+      for (size_t idx = 0; idx < outIndexServer.numElements(); ++idx)
+      {
+        fieldOut((idx)) = recvDataSrv(outIndexClient(idx));
+      }
+   }
+   CATCH_DUMP_ATTR
+
+   ///-------------------------------------------------------------------
+
+   void CField::parse(xml::CXMLNode& node)
+   TRY
+   {
+      string newContent ;
+      SuperClass::parse(node);
+      if (node.goToChildElement())
+      {
+        do
+        {
+          if (node.getElementName() == "variable" || node.getElementName() == "variable_group") this->getVirtualVariableGroup()->parseChild(node);
+          else if (node.getElementName() == "expr") if (node.getContent(newContent)) content+=newContent ;
+        } while (node.goToNextElement());
+        node.goToParentElement();
+      }
+      if (node.getContent(newContent)) content=newContent ;
+    }
+   CATCH_DUMP_ATTR
+
+   /*!
+     This function retrieves Id of corresponding domain_ref and axis_ref (if any)
+   of a field. In some cases, only domain exists but axis doesn't
+   \return pair of Domain and Axis id
+   */
+   const std::vector<StdString>& CField::getRefDomainAxisIds()
+   TRY
+   {
+     CGrid* cgPtr = getRelGrid();
+     if (NULL != cgPtr)
+     {
+       std::vector<StdString>::iterator it;
+       if (!domain_ref.isEmpty())
+       {
+         std::vector<StdString> domainList = cgPtr->getDomainList();
+         it = std::find(domainList.begin(), domainList.end(), domain_ref.getValue());
+         if (domainList.end() != it) domAxisScalarIds_[0] = *it;
+       }
+
+       if (!axis_ref.isEmpty())
+       {
+         std::vector<StdString> axisList = cgPtr->getAxisList();
+         it = std::find(axisList.begin(), axisList.end(), axis_ref.getValue());
+         if (axisList.end() != it) domAxisScalarIds_[1] = *it;
+       }
+
+       if (!scalar_ref.isEmpty())
+       {
+         std::vector<StdString> scalarList = cgPtr->getScalarList();
+         it = std::find(scalarList.begin(), scalarList.end(), scalar_ref.getValue());
+         if (scalarList.end() != it) domAxisScalarIds_[2] = *it;
+       }
+     }
+     return (domAxisScalarIds_);
+   }
+   CATCH_DUMP_ATTR
+
+   CVariable* CField::addVariable(const string& id)
+   TRY
+   {
+     return vVariableGroup->createChild(id);
+   }
+   CATCH
+
+   CVariableGroup* CField::addVariableGroup(const string& id)
+   TRY
+   {
+     return vVariableGroup->createChildGroup(id);
+   }
+   CATCH
+
+   void CField::setContextClient(CContextClient* contextClient)
+   TRY
+   {
+     CContext* context = CContext::getCurrent();
+     client = contextClient;
+     if (context->hasClient)
+     {
+       // A grid is sent by a client (both for read or write) or by primary server (write only)
+       if (context->hasServer)
+       {
+         if (file->mode.isEmpty() || (!file->mode.isEmpty() && file->mode == CFile::mode_attr::write))
+           grid->setContextClient(contextClient);
+       }
+       else
+           grid->setContextClient(contextClient);
+     }
+   }
+   CATCH_DUMP_ATTR
+
+   CContextClient* CField::getContextClient()
+   TRY
+   {
+     return client;
+   }
+   CATCH
+
+   void CField::sendAddAllVariables(CContextClient* client)
+   TRY
+   {
+     std::vector<CVariable*> allVar = getAllVariables();
+     std::vector<CVariable*>::const_iterator it = allVar.begin();
+     std::vector<CVariable*>::const_iterator itE = allVar.end();
+
+     for (; it != itE; ++it)
+     {
+       this->sendAddVariable((*it)->getId(), client);
+       (*it)->sendAllAttributesToServer(client);
+       (*it)->sendValue(client);
+     }
+   }
+   CATCH_DUMP_ATTR
+
+   /*!
+    * Send all Attributes to server. This method is overloaded, since only grid_ref attribute
+    * must be sent to server and not domain_ref/axis_ref/scalar_ref. 
+    */
+    
+   void CField::sendAllAttributesToServer(CContextClient* client)
+   TRY
+   {
+     if (grid_ref.isEmpty())
+     {
+       grid_ref=grid->getId() ;
+       SuperClass::sendAllAttributesToServer(client) ;
+       grid_ref.reset();
+     }
+     else SuperClass::sendAllAttributesToServer(client) ;
+   }
+   CATCH_DUMP_ATTR
+    
+   void CField::sendAddVariable(const string& id, CContextClient* client)
+   TRY
+   {
+      sendAddItem(id, (int)EVENT_ID_ADD_VARIABLE, client);
+   }
+   CATCH_DUMP_ATTR
+
+   void CField::sendAddVariableGroup(const string& id, CContextClient* client)
+   TRY
+   {
+      sendAddItem(id, (int)EVENT_ID_ADD_VARIABLE_GROUP, client);
+   }
+   CATCH_DUMP_ATTR
+
+   void CField::recvAddVariable(CEventServer& event)
+   TRY
+   {
+
+      CBufferIn* buffer = event.subEvents.begin()->buffer;
+      string id;
+      *buffer >> id;
+      get(id)->recvAddVariable(*buffer);
+   }
+   CATCH
+
+   void CField::recvAddVariable(CBufferIn& buffer)
+   TRY
+   {
+      string id;
+      buffer >> id;
+      addVariable(id);
+   }
+   CATCH_DUMP_ATTR
+
+   void CField::recvAddVariableGroup(CEventServer& event)
+   TRY
+   {
+
+      CBufferIn* buffer = event.subEvents.begin()->buffer;
+      string id;
+      *buffer >> id;
+      get(id)->recvAddVariableGroup(*buffer);
+   }
+   CATCH
+
+   void CField::recvAddVariableGroup(CBufferIn& buffer)
+   TRY
+   {
+      string id;
+      buffer >> id;
+      addVariableGroup(id);
+   }
+   CATCH_DUMP_ATTR
+
+   /*!
+    * Check on freq_off and freq_op attributes.
+    */
+   void CField::checkTimeAttributes(CDuration* freqOp)
+   TRY
+   {
+     bool isFieldRead  = file && !file->mode.isEmpty() && file->mode == CFile::mode_attr::read;
+     bool isFieldWrite = file && ( file->mode.isEmpty() ||  file->mode == CFile::mode_attr::write);
+     if (isFieldRead && !(operation.getValue() == "instant" || operation.getValue() == "once") )     
+       ERROR("void CField::checkTimeAttributes(void)",
+             << "Unsupported operation for field '" << getFieldOutputName() << "'." << std::endl
+             << "Currently only \"instant\" is supported for fields read from file.")
+
+     if (freq_op.isEmpty())
+     {
+       if (operation.getValue() == "instant")
+       {
+         if (isFieldRead || isFieldWrite) freq_op.setValue(file->output_freq.getValue());
+         else freq_op=*freqOp ;
+       }
+       else
+         freq_op.setValue(TimeStep);
+     }
+     if (freq_offset.isEmpty())
+       freq_offset.setValue(isFieldRead ? NoneDu : (freq_op.getValue() - TimeStep));
+   }
+   CATCH_DUMP_ATTR
+
+   /*!
+    * Returns string arithmetic expression associated to the field.
+    * \return if content is defined return content string, otherwise, if "expr" attribute is defined, return expr string.
+    */
+   const string& CField::getExpression(void)
+   TRY
+   {
+     if (!expr.isEmpty() && content.empty())
+     {
+       content = expr;
+       expr.reset();
+     }
+
+     return content;
+   }
+   CATCH_DUMP_ATTR
+
+   bool CField::hasExpression(void) const
+   TRY
+   {
+     return (!expr.isEmpty() || !content.empty());
+   }
+   CATCH
+
+   bool CField::hasGridMask(void) const
+   TRY
+   {
+     return (this->grid->hasMask());
+   }
+   CATCH
+
+   DEFINE_REF_FUNC(Field,field)
+} // namespace xios
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/node/field.hpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/node/field.hpp	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/node/field.hpp	(revision 1749)
@@ -0,0 +1,293 @@
+#ifndef __XIOS_CField__
+#define __XIOS_CField__
+
+/// XIOS headers ///
+#include "xios_spl.hpp"
+#include "group_factory.hpp"
+#include "functor.hpp"
+#include "functor_type.hpp"
+#include "duration.hpp"
+#include "date.hpp"
+#include "declare_group.hpp"
+#include "calendar_util.hpp"
+#include "array_new.hpp"
+#include "attribute_array.hpp"
+#include "declare_ref_func.hpp"
+#include "transformation_enum.hpp"
+#include "variable.hpp"
+#include "context_client.hpp"
+
+
+namespace xios {
+
+   /// ////////////////////// DÃ©clarations ////////////////////// ///
+
+   class CFieldGroup;
+   class CFieldAttributes;
+   class CField;
+
+   class CFile;
+   class CGrid;
+   class CContext;
+   class CGenericFilter;
+
+   class CGarbageCollector;
+   class COutputPin;
+   class CSourceFilter;
+   class CStoreFilter;
+   class CFileWriterFilter;
+   class CFileServerWriterFilter;
+
+   ///--------------------------------------------------------------
+
+   // Declare/Define CFieldAttribute
+   BEGIN_DECLARE_ATTRIBUTE_MAP(CField)
+#  include "field_attribute.conf"
+   END_DECLARE_ATTRIBUTE_MAP(CField)
+
+   ///--------------------------------------------------------------
+   class CField
+      : public CObjectTemplate<CField>
+      , public CFieldAttributes
+   {
+         /// friend ///
+         friend class CFile;
+
+         /// typedef ///
+         typedef CObjectTemplate<CField>   SuperClass;
+         typedef CFieldAttributes SuperClassAttribute;
+
+         enum EReadField
+         {
+           RF_NODATA, RF_EOF, RF_DATA
+         };
+         
+      public:
+
+         typedef CFieldAttributes RelAttributes;
+         typedef CFieldGroup      RelGroup;
+
+         enum EEventId
+         {
+           EVENT_ID_UPDATE_DATA, EVENT_ID_READ_DATA, EVENT_ID_READ_DATA_READY,
+           EVENT_ID_ADD_VARIABLE, EVENT_ID_ADD_VARIABLE_GROUP
+         };
+
+         /// Constructeurs ///
+         CField(void);
+         explicit CField(const StdString& id);
+         CField(const CField& field);       // Not implemented yet.
+         CField(const CField* const field); // Not implemented yet.
+
+         /// Accesseurs ///
+
+         CGrid* getRelGrid(void) const;
+         CFile* getRelFile(void) const;
+
+         func::CFunctor::ETimeType getOperationTimeType() const;
+
+      public:
+         int getNStep(void) const;
+
+         template <int N> void getData(CArray<double, N>& _data) const;
+
+         std::shared_ptr<COutputPin> getInstantDataFilter();
+
+         /// Mutateur ///
+         void setRelFile(CFile* _file);
+         void incrementNStep(void);
+         void resetNStep(int nstep = 0);
+         void resetNStepMax();
+
+         std::map<int, StdSize> getGridAttributesBufferSize(CContextClient* client, bool bufferForWriting = false);
+         // Grid data buffer size for each connection of contextclient
+         std::map<int, StdSize> getGridDataBufferSize(CContextClient* client, bool bufferForWriting = false);
+
+         void setContextClient(CContextClient* newContextClient);
+         CContextClient* getContextClient();
+
+       public:
+         bool isActive(bool atCurrentTimestep = false) const;
+         bool hasOutputFile;
+
+         bool wasWritten() const;
+         void setWritten();
+
+         bool getUseCompressedOutput() const;
+         void setUseCompressedOutput();
+
+         /// Traitements ///
+         void solveGridReference(void);
+         void solveServerOperation(void);
+         void solveCheckMaskIndex(bool doSendingIndex);
+         void solveAllReferenceEnabledField(bool doSending2Server);
+         void solveOnlyReferenceEnabledField(bool doSending2Server);
+         void generateNewTransformationGridDest();
+         void updateRef(CGrid* grid);
+         void buildGridTransformationGraph();
+         void solveGridDomainAxisRef(bool checkAtt);
+         void solveTransformedGrid();
+         void solveGenerateGrid();
+         void solveGridDomainAxisBaseRef();
+
+         void solveAllEnabledFieldsAndTransform();
+         void checkGridOfEnabledFields();
+         void sendGridOfEnabledFields();
+         void sendGridComponentOfEnabledFields();
+
+         /// VÃ©rifications ///
+         void checkTimeAttributes(CDuration* freqOp=NULL);
+
+         void buildFilterGraph(CGarbageCollector& gc, bool enableOutput);
+         size_t getGlobalWrittenSize(void) ;
+         
+         
+         std::shared_ptr<COutputPin> getFieldReference(CGarbageCollector& gc);
+         std::shared_ptr<COutputPin> getSelfReference(CGarbageCollector& gc);
+         std::shared_ptr<COutputPin> getTemporalDataFilter(CGarbageCollector& gc, CDuration outFreq);
+         std::shared_ptr<COutputPin> getSelfTemporalDataFilter(CGarbageCollector& gc, CDuration outFreq);
+
+//         virtual void fromBinary(StdIStream& is);
+
+         /// Destructeur ///
+         virtual ~CField(void);
+
+         /// Accesseurs statiques ///
+         static StdString GetName(void);
+         static StdString GetDefName(void);
+
+         static ENodeType GetType(void);
+
+        template <int N> void setData(const CArray<double, N>& _data);
+        static bool dispatchEvent(CEventServer& event);
+        void sendAllAttributesToServer(CContextClient* client) ; 
+        void sendUpdateData(const CArray<double,1>& data);
+        void sendUpdateData(const CArray<double,1>& data, CContextClient* client);
+        static void recvUpdateData(CEventServer& event);
+        void recvUpdateData(std::map<int,CBufferIn*>& rankBuffers);
+        void writeField(void);
+        bool sendReadDataRequest(const CDate& tsDataRequested);
+        bool sendReadDataRequestIfNeeded(void);
+        static void recvReadDataRequest(CEventServer& event);
+        void recvReadDataRequest(void);
+        EReadField readField(void);
+        static void recvReadDataReady(CEventServer& event);
+        void recvReadDataReady(vector<int> ranks, vector<CBufferIn*> buffers);
+        void checkForLateDataFromServer(void);
+        void checkIfMustAutoTrigger(void);
+        void autoTriggerIfNeeded(void);
+        void outputField(CArray<double,3>& fieldOut);
+        void outputField(CArray<double,2>& fieldOut);
+        void outputField(CArray<double,1>& fieldOut);
+        void inputField(CArray<double,3>& fieldOut);
+        void inputField(CArray<double,2>& fieldOut);
+        void inputField(CArray<double,1>& fieldOut);
+        void outputCompressedField(CArray<double, 1>& fieldOut);
+        void scaleFactorAddOffset(double scaleFactor, double addOffset);
+        void invertScaleFactorAddOffset(double scaleFactor, double addOffset);
+        void parse(xml::CXMLNode& node);
+
+        void setVirtualVariableGroup(CVariableGroup* newVVariableGroup);
+        CVariableGroup* getVirtualVariableGroup(void) const;
+        vector<CVariable*> getAllVariables(void) const;
+        virtual void solveDescInheritance(bool apply, const CAttributeMap* const parent = 0);
+
+        CVariable* addVariable(const string& id = "");
+        CVariableGroup* addVariableGroup(const string& id = "");        
+        void sendAddVariable(const string& id, CContextClient* client);
+        void sendAddVariableGroup(const string& id, CContextClient* client);
+        static void recvAddVariable(CEventServer& event);
+        void recvAddVariable(CBufferIn& buffer);
+        static void recvAddVariableGroup(CEventServer& event);
+        void recvAddVariableGroup(CBufferIn& buffer);        
+        void sendAddAllVariables(CContextClient* client);
+        void writeUpdateData(const CArray<double,1>& data);
+
+        const std::vector<StdString>& getRefDomainAxisIds();
+
+        const string& getExpression(void);
+        bool hasExpression(void) const;
+
+        bool hasGridMask(void) const;
+
+      public:
+         /// PropriÃ©tÃ©s privÃ©es ///
+         CVariableGroup* vVariableGroup;
+
+         CGrid*  grid;
+         CFile*  file;
+
+         CDuration freq_operation_srv, freq_write_srv;
+
+         bool written; //<! Was the field written at least once
+         int nstep, nstepMax;
+         bool isEOF;
+         CDate lastlast_Write_srv, last_Write_srv, last_operation_srv;
+         CDate lastDataRequestedFromServer, lastDataReceivedFromServer, dateEOF;
+         bool wasDataRequestedFromServer, wasDataAlreadyReceivedFromServer;
+         bool mustAutoTrigger;
+
+         map<int,std::shared_ptr<func::CFunctor> > foperation_srv;
+
+         // map<int, CArray<double,1> > data_srv;
+         CArray<double,1> recvDataSrv;
+         
+         std::shared_ptr<func::CFunctor> recvFoperationSrv;
+         string content;
+
+         std::vector<StdString> domAxisScalarIds_;
+         bool useCompressedOutput;
+
+         // Two variables to identify the time_counter meta data written in file, which has no time_counter
+         bool hasTimeInstant;
+         bool hasTimeCentered;
+
+
+         DECLARE_REF_FUNC(Field,field)
+
+      private:
+         CContextClient* client;
+
+         bool areAllReferenceSolved;
+         bool isReferenceSolved;
+         bool isReferenceSolvedAndTransformed;
+         bool isGridChecked;
+         bool nstepMaxRead;
+
+      private:
+         //! The type of operation attached to the field
+         func::CFunctor::ETimeType operationTimeType;
+
+         //! The output pin of the filter providing the instant data for the field
+         std::shared_ptr<COutputPin> instantDataFilter;
+         //! The output pin of the filters providing the result of the field's temporal operation
+         std::map<CDuration, std::shared_ptr<COutputPin>, DurationFakeLessComparator> temporalDataFilters;
+         //! The output pin of the filter providing the instant data for self references
+         std::shared_ptr<COutputPin> selfReferenceFilter;
+         //! The source filter for data provided by the client
+         std::shared_ptr<CSourceFilter> clientSourceFilter;
+         //! The source filter for data provided by the server
+         std::shared_ptr<CSourceFilter> serverSourceFilter;
+         //! The terminal filter which stores the instant data
+         std::shared_ptr<CStoreFilter> storeFilter;
+         //! The terminal filter which writes the data to file
+         std::shared_ptr<CFileWriterFilter> fileWriterFilter;
+         //! The terminal filter which writes data to file
+         std::shared_ptr<CFileServerWriterFilter> fileServerWriterFilter;
+   }; // class CField
+
+   ///--------------------------------------------------------------
+
+   // Declare/Define CFieldGroup and CFieldDefinition
+   DECLARE_GROUP(CField);
+
+   ///-----------------------------------------------------------------
+
+   template <>
+      void CGroupTemplate<CField, CFieldGroup, CFieldAttributes>::solveRefInheritance(void);
+
+   ///-----------------------------------------------------------------
+} // namespace xios
+
+
+#endif // __XIOS_CField__
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/node/field_decl.cpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/node/field_decl.cpp	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/node/field_decl.cpp	(revision 1749)
@@ -0,0 +1,20 @@
+#include "field_impl.hpp"
+
+namespace xios
+{
+  template void CField::setData<1>(const CArray<double, 1>& _data);
+  template void CField::setData<2>(const CArray<double, 2>& _data);
+  template void CField::setData<3>(const CArray<double, 3>& _data);
+  template void CField::setData<4>(const CArray<double, 4>& _data);
+  template void CField::setData<5>(const CArray<double, 5>& _data);
+  template void CField::setData<6>(const CArray<double, 6>& _data);
+  template void CField::setData<7>(const CArray<double, 7>& _data);
+
+  template void CField::getData<1>(CArray<double, 1>& _data) const;
+  template void CField::getData<2>(CArray<double, 2>& _data) const;
+  template void CField::getData<3>(CArray<double, 3>& _data) const;
+  template void CField::getData<4>(CArray<double, 4>& _data) const;
+  template void CField::getData<5>(CArray<double, 5>& _data) const;
+  template void CField::getData<6>(CArray<double, 6>& _data) const;
+  template void CField::getData<7>(CArray<double, 7>& _data) const;
+}
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/node/field_impl.hpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/node/field_impl.hpp	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/node/field_impl.hpp	(revision 1749)
@@ -0,0 +1,53 @@
+
+#ifndef __FIELD_IMPL_HPP__
+#define __FIELD_IMPL_HPP__
+
+#include "xios_spl.hpp"
+#include "field.hpp"
+#include "context.hpp"
+#include "grid.hpp"
+#include "timer.hpp"
+#include "array_new.hpp"
+#include "source_filter.hpp"
+#include "store_filter.hpp"
+
+
+namespace xios {
+
+  template <int N>
+  void CField::setData(const CArray<double, N>& _data)
+  TRY
+  {
+    if (clientSourceFilter)
+    {
+      if (check_if_active.isEmpty() || (!check_if_active.isEmpty() && (!check_if_active) || isActive(true)))
+        clientSourceFilter->streamData(CContext::getCurrent()->getCalendar()->getCurrentDate(), _data);
+    }
+    else if (instantDataFilter)
+      ERROR("void CField::setData(const CArray<double, N>& _data)",
+            << "Impossible to receive data from the model for a field [ id = " << getId() << " ] with a reference or an arithmetic operation.");
+  }
+  CATCH_DUMP_ATTR
+
+  template <int N>
+  void CField::getData(CArray<double, N>& _data) const
+  TRY
+  {
+    if (storeFilter)
+    {
+      CDataPacket::StatusCode status = storeFilter->getData(CContext::getCurrent()->getCalendar()->getCurrentDate(), _data);
+
+      if (status == CDataPacket::END_OF_STREAM)
+        ERROR("void CField::getData(CArray<double, N>& _data) const",
+              << "Impossible to access field data, all the records of the field [ id = " << getId() << " ] have been already read.");
+    }
+    else
+    {
+      ERROR("void CField::getData(CArray<double, N>& _data) const",
+            << "Impossible to access field data, the field [ id = " << getId() << " ] does not have read access.");
+    }
+  }
+  CATCH
+} // namespace xios
+
+#endif
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/node/file.cpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/node/file.cpp	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/node/file.cpp	(revision 1749)
@@ -0,0 +1,1417 @@
+#include "file.hpp"
+
+#include "attribute_template.hpp"
+#include "object_template.hpp"
+#include "group_template.hpp"
+#include "object_factory.hpp"
+#include "context.hpp"
+#include "context_server.hpp"
+#include "nc4_data_output.hpp"
+#include "nc4_data_input.hpp"
+#include "calendar_util.hpp"
+#include "date.hpp"
+#include "message.hpp"
+#include "type.hpp"
+#include "xios_spl.hpp"
+#include "context_client.hpp"
+#include "mpi.hpp"
+#include "timer.hpp"
+#include "server.hpp"
+
+namespace xios {
+
+   /// ////////////////////// Dfinitions ////////////////////// ///
+
+   CFile::CFile(void)
+      : CObjectTemplate<CFile>(), CFileAttributes()
+      , vFieldGroup(), data_out(), enabledFields(), fileComm(MPI_COMM_NULL)
+      , isOpen(false), read_client(0), checkRead(false), allZoneEmpty(false)
+   {
+     setVirtualFieldGroup(CFieldGroup::create(getId() + "_virtual_field_group"));
+     setVirtualVariableGroup(CVariableGroup::create(getId() + "_virtual_variable_group"));
+   }
+
+   CFile::CFile(const StdString & id)
+      : CObjectTemplate<CFile>(id), CFileAttributes()
+      , vFieldGroup(), data_out(), enabledFields(), fileComm(MPI_COMM_NULL)
+      , isOpen(false), read_client(0), checkRead(false), allZoneEmpty(false)
+    {
+      setVirtualFieldGroup(CFieldGroup::create(getId() + "_virtual_field_group"));
+      setVirtualVariableGroup(CVariableGroup::create(getId() + "_virtual_variable_group"));
+    }
+
+   CFile::~CFile(void)
+   { /* Ne rien faire de plus */ }
+
+   ///---------------------------------------------------------------
+  //! Get name of file
+   StdString CFile::GetName(void)   { return (StdString("file")); }
+   StdString CFile::GetDefName(void){ return (CFile::GetName()); }
+   ENodeType CFile::GetType(void)   { return (eFile); }
+
+   //----------------------------------------------------------------
+
+   const StdString CFile::getFileOutputName(void) const
+   TRY
+   {
+     return (name.isEmpty() ? getId() : name) + (name_suffix.isEmpty() ? StdString("") :  name_suffix.getValue());
+   }
+   CATCH
+
+   //----------------------------------------------------------------
+   /*!
+   \brief Get data writer object.
+   Each enabled file in xml represents a physical netcdf file.
+   This function allows to access the data writer object.
+   \return data writer object.
+   */
+   std::shared_ptr<CDataOutput> CFile::getDataOutput(void) const
+   TRY
+   {
+      return data_out;
+   }
+   CATCH
+
+   /*!
+   \brief Get data reader object.
+   Each enabled file in xml represents a physical netcdf file.
+   This function allows to access the data reader object.
+   \return data reader object.
+   */
+   std::shared_ptr<CDataInput> CFile::getDataInput(void) const
+   TRY
+   {
+      return data_in;
+   }
+   CATCH
+
+   /*!
+   \brief Get virtual field group
+      In each file, there always exists a field group which is the ancestor of all
+   fields in the file. This is considered be virtual because it is created automatically during
+   file initialization and it normally doesn't appear on xml file
+   \return Pointer to field group
+   */
+   CFieldGroup* CFile::getVirtualFieldGroup(void) const
+   TRY
+   {
+      return (this->vFieldGroup);
+   }
+   CATCH
+
+   /*!
+   \brief Get virtual variable group
+      In each file, there always exists a variable group which is the ancestor of all
+   variable in the file. This is considered be virtual because it is created automatically during
+   file initialization and it normally doesn't appear on xml file
+   \return Pointer to variable group
+   */
+   CVariableGroup* CFile::getVirtualVariableGroup(void) const
+   TRY
+   {
+      return (this->vVariableGroup);
+   }
+   CATCH
+
+   //! Get all fields of a file
+   std::vector<CField*> CFile::getAllFields(void) const
+   TRY
+   {
+      return (this->vFieldGroup->getAllChildren());
+   }
+   CATCH
+
+   //! Get all variables of a file
+   std::vector<CVariable*> CFile::getAllVariables(void) const
+   TRY
+   {
+      return (this->vVariableGroup->getAllChildren());
+   }
+   CATCH
+
+   //----------------------------------------------------------------
+   /*!
+   \brief Get all enabled fields of file
+      A field is considered to be enabled if it fullfil these conditions: it is enabled, inside a enabled file
+   and its own level is not larger than file output level.
+   \param [in] default_outputlevel default value output level of file
+   \param [in] default_level default value level of field
+   \param [in] default_enabled flag determine by default if field is enabled
+   \return Vector of pointers of enabled fields
+   */
+   std::vector<CField*> CFile::getEnabledFields(int default_outputlevel,
+                                                int default_level,
+                                                bool default_enabled)
+   TRY
+   {
+      if (!this->enabledFields.empty())
+         return (this->enabledFields);
+
+      const int _outputlevel =
+         (!output_level.isEmpty()) ? output_level.getValue() : default_outputlevel;
+      std::vector<CField*>::iterator it;
+      this->enabledFields = this->getAllFields();
+
+      std::vector<CField*> newEnabledFields;
+
+      for ( it = this->enabledFields.begin(); it != this->enabledFields.end(); it++ )
+      {
+         if (!(*it)->enabled.isEmpty()) // Si l'attribut 'enabled' est dfini ...
+         {
+            if (! (*it)->enabled.getValue()) continue;
+         }
+         else // Si l'attribut 'enabled' n'est pas dfini ...
+         {
+            if (!default_enabled) continue;
+         }
+
+         if (!(*it)->level.isEmpty()) // Si l'attribut 'level' est dfini ...
+         {
+            if ((*it)->level.getValue() > _outputlevel) continue;
+         }
+         else // Si l'attribut 'level' n'est pas dfini ...
+         {
+            if (default_level > _outputlevel) continue;
+         }
+
+         newEnabledFields.push_back(*it);
+         // Le champ est finalement actif, on y ajoute la rfrence au champ de base.
+         (*it)->setRelFile(CFile::get(this));
+      }
+      enabledFields = newEnabledFields;
+
+      return (this->enabledFields);
+   }
+   CATCH_DUMP_ATTR
+
+   //----------------------------------------------------------------
+   //! Change virtual field group to a new one
+   void CFile::setVirtualFieldGroup(CFieldGroup* newVFieldGroup)
+   TRY
+   {
+      this->vFieldGroup = newVFieldGroup;
+   }
+   CATCH_DUMP_ATTR
+
+   //! Change virtual variable group to new one
+   void CFile::setVirtualVariableGroup(CVariableGroup* newVVariableGroup)
+   TRY
+   {
+      this->vVariableGroup = newVVariableGroup;
+   }
+   CATCH_DUMP_ATTR
+
+   //----------------------------------------------------------------
+   bool CFile::isSyncTime(void)
+   TRY
+   {
+     CContext* context = CContext::getCurrent();
+     const CDate& currentDate = context->calendar->getCurrentDate();
+     if (!sync_freq.isEmpty())
+     {
+       if (lastSync + sync_freq.getValue() < currentDate)
+       {
+         lastSync = currentDate;
+         return true;
+        }
+      }
+      return false;
+    }
+    CATCH_DUMP_ATTR
+
+   //! Initialize a file in order to write into it
+   void CFile::initWrite(void)
+   TRY
+   {
+      CContext* context = CContext::getCurrent();
+      const CDate& currentDate = context->calendar->getCurrentDate();
+      CContextServer* server = context->server;
+
+      lastSync  = currentDate;
+      lastSplit = currentDate;
+      if (!split_freq.isEmpty())
+      {
+        StdString keySuffix("CFile::"+getFileOutputName()+"::") ; 
+        if (context->registryIn->foundKey(keySuffix+"splitStart") && context->registryIn->foundKey(keySuffix+"splitEnd"))
+        {
+          CDate savedSplitStart(*context->getCalendar()), savedSplitEnd(*context->getCalendar());
+          context->registryIn->getKey(keySuffix+"splitStart", savedSplitStart);
+          context->registryIn->getKey(keySuffix+"splitEnd",   savedSplitEnd);
+
+          if (savedSplitStart <= lastSplit && lastSplit <= savedSplitEnd)
+            lastSplit = savedSplitStart;
+        }
+      }
+      isOpen = false;      
+
+//      if (!record_offset.isEmpty() && record_offset < 0)
+//        ERROR("void CFile::initFile(void)",
+//              "Invalid 'record_offset', this attribute cannot be negative.");
+      const int recordOffset = record_offset.isEmpty() ? 0 : record_offset;
+
+      set<StdString> setAxis;
+      set<StdString> setDomains;
+
+      std::vector<CField*>::iterator it, end = this->enabledFields.end();
+      for (it = this->enabledFields.begin(); it != end; it++)
+      {
+         CField* field = *it;         
+         std::vector<CAxis*> vecAxis = field->grid->getAxis();
+         for (size_t i = 0; i < vecAxis.size(); ++i)
+           setAxis.insert(vecAxis[i]->getAxisOutputName());
+         std::vector<CDomain*> vecDomains = field->grid->getDomains();
+         for (size_t i = 0; i < vecDomains.size(); ++i)
+           setDomains.insert(vecDomains[i]->getDomainOutputName());
+
+         field->resetNStep(recordOffset);
+      }
+      nbAxis = setAxis.size();
+      nbDomains = setDomains.size();
+
+      // create sub communicator for file
+      createSubComFile();
+
+      // if (time_counter.isEmpty()) time_counter.setValue(time_counter_attr::centered);
+      if (time_counter_name.isEmpty()) time_counter_name = "time_counter";
+    }
+    CATCH_DUMP_ATTR
+
+    //! Initialize a file in order to write into it
+    void CFile::initRead(void)
+    TRY
+    {
+      if (checkRead) return;
+      createSubComFile();
+      checkRead = true;
+    }
+    CATCH_DUMP_ATTR
+
+    /*!
+      Create a sub communicator in which processes participate in reading/opening file
+    */
+    void CFile::createSubComFile()
+    TRY
+    {
+      CContext* context = CContext::getCurrent();
+      CContextServer* server = context->server;
+
+      // create sub communicator for file
+      allZoneEmpty = true;      
+      std::vector<CField*>::iterator it, end = this->enabledFields.end();
+      for (it = this->enabledFields.begin(); it != end; it++)
+      {
+         CField* field = *it;
+         bool nullGrid = (0 == field->grid);
+         allZoneEmpty &= nullGrid ? false : !field->grid->doGridHaveDataToWrite();
+      }
+
+      int color = allZoneEmpty ? 0 : 1;
+      MPI_Comm_split(server->intraComm, color, server->intraCommRank, &fileComm);
+      if (allZoneEmpty) MPI_Comm_free(&fileComm);
+    }
+    CATCH_DUMP_ATTR
+
+    /*
+       Check condition to write into a file
+       For now, we only use the level-2 server to write files (if this mode is activated)
+       or classical server to do this job.
+    */
+    void CFile::checkWriteFile(void)
+    TRY
+    {
+      CContext* context = CContext::getCurrent();
+      // Done by classical server or secondary server
+      // This condition should be changed soon
+      if (CServer::serverLevel == 0 || CServer::serverLevel == 2)
+      {
+        if (mode.isEmpty() || mode.getValue() == mode_attr::write)
+        {
+          CTimer::get("Files : create headers").resume();
+          if (!isOpen) createHeader();
+          CTimer::get("Files : create headers").suspend();
+          checkSync();
+        }        
+        checkSplit(); // REally need this?
+      }
+    }
+    CATCH_DUMP_ATTR
+
+    /*
+       Check condition to read from a file
+       For now, we only use the level-1 server to write files (if this mode is activated)
+       or classical server to do this job.
+       This function can be used by client for reading metadata
+    */
+    void CFile::checkReadFile(void)
+    TRY
+    {
+      CContext* context = CContext::getCurrent();
+      // Done by classical server or secondary server
+      // TODO: This condition should be changed soon. It only works with maximum number of level as 2
+      if (CServer::serverLevel == 0 || CServer::serverLevel == 1)
+      {
+        if (!mode.isEmpty() && mode.getValue() == mode_attr::read)
+        {
+          CTimer::get("Files : open headers").resume();
+          
+          if (!isOpen) openInReadMode();
+
+          CTimer::get("Files : open headers").suspend();
+        }
+        //checkSplit(); // Really need for reading?
+      }
+    }
+    CATCH_DUMP_ATTR
+
+    /*!
+      Verify if a process participates in an opening-file communicator 
+      \return true if the process doesn't participate in opening file
+    */
+    bool CFile::isEmptyZone()
+    TRY
+    {
+      return allZoneEmpty;
+    }
+    CATCH_DUMP_ATTR
+
+    /*!
+    \brief Verify if synchronisation should be done
+        If syn option is enabled, syn frequence and current time will be used to
+    calculate the moment to syn file(s)
+    \return True if it is the moment to synchronize file, otherwise false
+    */
+   bool CFile::checkSync(void)
+   TRY
+   {
+     CContext* context = CContext::getCurrent();
+     const CDate& currentDate = context->calendar->getCurrentDate();
+     if (!sync_freq.isEmpty())
+     {
+       if (lastSync + sync_freq.getValue() <= currentDate)
+       {
+         lastSync = currentDate;
+         data_out->syncFile();
+         return true;
+        }
+      }
+      return false;
+    }
+   CATCH_DUMP_ATTR
+
+    /*!
+    \brief Verify if splitting should be done
+        If split option is enabled, split frequence and current time will be used to
+    calculate the moment to split file
+    \return True if it is the moment to split file, otherwise false
+    */
+    bool CFile::checkSplit(void)
+    TRY
+    {
+      CContext* context = CContext::getCurrent();
+      const CDate& currentDate = context->calendar->getCurrentDate();
+      if (!split_freq.isEmpty())
+      {
+        if (currentDate > lastSplit + split_freq.getValue())
+        {
+          lastSplit = lastSplit + split_freq.getValue();
+          std::vector<CField*>::iterator it, end = this->enabledFields.end();
+          for (it = this->enabledFields.begin(); it != end; it++)
+          {
+            (*it)->resetNStep();
+            (*it)->resetNStepMax();
+          }
+          if (mode.isEmpty() || mode.getValue() == mode_attr::write)
+            createHeader();
+          else
+            openInReadMode();
+          return true;
+        }
+      }
+      return false;
+    }
+    CATCH_DUMP_ATTR
+
+   /*!
+   \brief Create header of netcdf file
+   There are some information to fill in header of each netcdf.
+   */
+   void CFile::createHeader(void)
+   TRY
+   {
+      CContext* context = CContext::getCurrent();
+      CContextServer* server = context->server;
+
+      if (!allZoneEmpty)
+      {
+         StdString filename = getFileOutputName();
+
+// determine splitting format in the file name  : firstPart%start_date%middlePart%end_date%lastPart
+
+         std::string strStartDate="%start_date%" ;
+         std::string strEndDate="%end_date%" ;
+
+         std::string firstPart ;
+         std::string middlePart ;
+         std::string lastPart ;
+         size_t pos1, pos2 ;
+         bool hasStartDate=false ;
+         bool hasEndDate=false ;
+         bool hasSplit = (!split_freq.isEmpty());
+                  
+         pos1=filename.find(strStartDate) ;
+         if (pos1!=std::string::npos)
+         {
+           firstPart=filename.substr(0,pos1) ;
+           pos1+=strStartDate.size() ;
+           hasStartDate=true ;
+         }
+         else pos1=0 ;
+
+         pos2=filename.find(strEndDate,pos1) ;
+         if (pos2!=std::string::npos)
+         {
+           middlePart=filename.substr(pos1,pos2-pos1) ;
+           pos2+=strEndDate.size() ;
+           lastPart=filename.substr(pos2,filename.size()-pos2) ;
+           hasEndDate=true ;
+         }
+         else middlePart=filename.substr(pos1,filename.size()) ;
+
+         if (!hasStartDate && !hasEndDate)
+         {
+           hasStartDate=true ;
+           hasEndDate=true;
+           firstPart=middlePart ;
+           if (hasSplit) firstPart +="_";
+           middlePart="-" ;
+         }
+   
+         StdOStringStream oss;
+
+         if (!split_freq.isEmpty())
+         {
+           CDate split_start ;
+           CDate splitEnd ;
+           if (!split_start_offset.isEmpty()) split_start=lastSplit + split_start_offset ;
+           else split_start=lastSplit ;
+
+           splitEnd = lastSplit + split_freq ;
+           if (!split_last_date.isEmpty())
+           {
+             CDate splitLastDate=CDate::FromString(split_last_date,*CContext::getCurrent()->getCalendar()) ;
+             if( splitLastDate < splitEnd)  splitEnd=splitLastDate ;
+           }
+            
+           if (!split_end_offset.isEmpty()) splitEnd = splitEnd + split_end_offset;
+           else splitEnd = splitEnd - 1 * Second;
+
+           string splitFormat;
+           if (split_freq_format.isEmpty())
+           {
+             CDuration splitFreq = split_freq.getValue();
+             splitFreq.solveTimeStep(*CContext::getCurrent()->getCalendar());
+             if (splitFreq.second != 0) splitFormat = "%y%mo%d%h%mi%s";
+             else if (splitFreq.minute != 0) splitFormat = "%y%mo%d%h%mi";
+             else if (splitFreq.hour != 0) splitFormat = "%y%mo%d%h";
+             else if (splitFreq.day != 0) splitFormat = "%y%mo%d";
+             else if (splitFreq.month != 0) splitFormat = "%y%mo";
+             else splitFormat = "%y";
+           }
+           else splitFormat = split_freq_format;
+
+           oss << firstPart ;
+           if (hasStartDate) oss << split_start.getStr(splitFormat) ;
+           oss << middlePart ;
+           if (hasEndDate) oss << splitEnd.getStr(splitFormat);
+           oss << lastPart ;
+
+           StdString keySuffix("CFile::"+getFileOutputName()+"::") ; 
+           context->registryOut->setKey(keySuffix+"splitStart", lastSplit);
+           context->registryOut->setKey(keySuffix+"splitEnd",   splitEnd);
+         }
+         else oss<<firstPart<<lastPart ;
+
+        bool append = !this->append.isEmpty() && this->append.getValue();
+
+         bool useClassicFormat = !format.isEmpty() && format == format_attr::netcdf4_classic;
+         bool useCFConvention = convention.isEmpty() || convention == convention_attr::CF;
+
+         bool multifile = true;
+         if (!type.isEmpty())
+         {
+           if (type == type_attr::one_file) multifile = false;
+           else if (type == type_attr::multiple_file) multifile = true;
+
+         }
+#ifndef USING_NETCDF_PAR
+         if (!multifile)
+         {
+            info(0) << "!!! Warning -> Using non parallel version of netcdf, switching in multiple_file mode for file : " << filename << " ..." << endl;
+            multifile = true;
+          }
+#endif
+         if (multifile)
+         {
+            int commSize, commRank;
+            MPI_Comm_size(fileComm, &commSize);
+            MPI_Comm_rank(fileComm, &commRank);
+
+            if (server->intraCommSize > 1)
+            {
+              oss << "_" ;
+              int width=0; int n = commSize-1;
+              while (n != 0) { n = n / 10; width++;}
+              if (!min_digits.isEmpty())
+                if (width < min_digits) width = min_digits;
+              oss.width(width);
+              oss.fill('0');
+              oss << right << commRank;
+            }
+         }
+         oss << ".nc";
+
+         bool isCollective = par_access.isEmpty() ||  par_access == par_access_attr::collective;
+
+         if (isOpen) data_out->closeFile();
+
+        data_out = std::shared_ptr<CDataOutput>(new CNc4DataOutput(this, oss.str(), append, useClassicFormat, useCFConvention,
+                                                              fileComm, multifile, isCollective, time_counter_name));
+        isOpen = true;
+
+        data_out->writeFile(CFile::get(this));
+
+        if (!useCFConvention) sortEnabledFieldsForUgrid();
+
+        // Do not recreate the file structure if opening an existing file
+        if (!data_out->IsInAppendMode())
+        {
+          std::vector<CField*>::iterator it, end = this->enabledFields.end();
+          for (it = this->enabledFields.begin(); it != end; it++)
+          {
+            CField* field = *it;
+            this->data_out->writeFieldGrid(field);
+          }
+          this->data_out->writeTimeDimension();
+
+          for (it = this->enabledFields.begin(); it != end; it++)
+          {
+            CField* field = *it;
+            this->data_out->writeFieldTimeAxis(field);
+          }
+          
+          for (it = this->enabledFields.begin(); it != end; it++)
+          {
+            CField* field = *it;
+            this->data_out->writeField(field);
+          }
+
+          vector<CVariable*> listVars = getAllVariables();
+          for (vector<CVariable*>::iterator it = listVars.begin(); it != listVars.end(); it++)
+            this->data_out->writeAttribute(*it);
+
+          this->data_out->definition_end();
+        }
+        else
+        {
+          // check time axis even in append mode
+          std::vector<CField*>::iterator it, end = this->enabledFields.end();
+          for (it = this->enabledFields.begin(); it != end; it++)
+          {
+            CField* field = *it;
+            this->data_out->writeFieldTimeAxis(field);
+          }
+        }
+      }
+   }
+   CATCH_DUMP_ATTR
+
+  /*!
+  \brief Open an existing NetCDF file in read-only mode
+  */
+  void CFile::openInReadMode()
+  TRY
+  {
+    CContext* context = CContext::getCurrent();
+    CContextServer* server = context->server;
+    MPI_Comm readComm = this->fileComm;
+
+    if (!allZoneEmpty)
+    {
+      StdString filename = getFileOutputName();
+      StdOStringStream oss;
+      oss << filename;
+
+      if (!split_freq.isEmpty())
+      {
+        string splitFormat;
+        if (split_freq_format.isEmpty())
+        {
+          CDuration splitFreq = split_freq.getValue();
+          splitFreq.solveTimeStep(*CContext::getCurrent()->getCalendar());
+          if (splitFreq.second != 0) splitFormat = "%y%mo%d%h%mi%s";
+          else if (splitFreq.minute != 0) splitFormat = "%y%mo%d%h%mi";
+          else if (splitFreq.hour != 0) splitFormat = "%y%mo%d%h";
+          else if (splitFreq.day != 0) splitFormat = "%y%mo%d";
+          else if (splitFreq.month != 0) splitFormat = "%y%mo";
+          else splitFormat = "%y";
+        }
+        else splitFormat = split_freq_format;
+        oss << "_" << lastSplit.getStr(splitFormat)
+        << "-" << (lastSplit + split_freq.getValue() - 1 * Second).getStr(splitFormat);
+      }
+
+      bool multifile = true;
+      if (!type.isEmpty())
+      {
+        if (type == type_attr::one_file) multifile = false;
+        else if (type == type_attr::multiple_file) multifile = true;
+      }
+  #ifndef USING_NETCDF_PAR
+      if (!multifile)
+      {
+        info(0) << "!!! Warning -> Using non parallel version of netcdf, switching in multiple_file mode for file : " << filename << " ..." << endl;
+        multifile = true;
+      }
+  #endif
+      if (multifile)
+      {
+        int commSize, commRank;
+        MPI_Comm_size(readComm, &commSize);
+        MPI_Comm_rank(readComm, &commRank);
+
+        if (server->intraCommSize > 1)
+        {
+          oss << "_";
+          int width = 0, n = commSize - 1;
+          while (n != 0) { n = n / 10; width++; }
+          if (!min_digits.isEmpty() && width < min_digits)
+            width = min_digits;
+          oss.width(width);
+          oss.fill('0');
+          oss << right << commRank;
+        }
+      }
+      oss << ".nc";
+
+      bool isCollective = par_access.isEmpty() || par_access == par_access_attr::collective;
+      bool readMetaDataPar = true;
+      if (!context->hasServer) readMetaDataPar = (read_metadata_par.isEmpty()) ? false : read_metadata_par;
+
+      if (isOpen) data_out->closeFile();
+      bool ugridConvention = !convention.isEmpty() ? (convention == convention_attr::UGRID) : false;
+      if (time_counter_name.isEmpty())
+        data_in = std::shared_ptr<CDataInput>(new CNc4DataInput(oss.str(), readComm, multifile, isCollective, readMetaDataPar, ugridConvention));
+      else
+        data_in = std::shared_ptr<CDataInput>(new CNc4DataInput(oss.str(), readComm, multifile, isCollective, readMetaDataPar, ugridConvention, time_counter_name));
+      isOpen = true;
+    }
+  }
+  CATCH_DUMP_ATTR
+
+   //! Close file
+   void CFile::close(void)
+   TRY
+   {
+     if (!allZoneEmpty)
+       if (isOpen)
+       {
+         if (mode.isEmpty() || mode.getValue() == mode_attr::write)
+          this->data_out->closeFile();
+         else
+          this->data_in->closeFile();
+        isOpen = false;
+       }
+      if (fileComm != MPI_COMM_NULL) MPI_Comm_free(&fileComm);
+   }
+   CATCH_DUMP_ATTR
+
+   //----------------------------------------------------------------
+
+   void CFile::readAttributesOfEnabledFieldsInReadMode()
+   TRY
+   {
+     if (enabledFields.empty()) return;
+
+     // Just check file and try to open it
+     if (time_counter_name.isEmpty()) time_counter_name = "time_counter";
+
+     checkReadFile();
+
+     for (int idx = 0; idx < enabledFields.size(); ++idx)
+     {
+        // First of all, find out which domain and axis associated with this field
+        enabledFields[idx]->solveGridReference();
+
+        // Read attributes of domain and axis from this file
+        this->data_in->readFieldAttributesMetaData(enabledFields[idx]);
+
+        // Now complete domain and axis associated with this field
+        enabledFields[idx]->solveGenerateGrid();
+
+        // Read necessary value from file
+        this->data_in->readFieldAttributesValues(enabledFields[idx]);
+
+        // Fill attributes for base reference
+        enabledFields[idx]->solveGridDomainAxisBaseRef();
+     }
+
+     // Now everything is ok, close it
+     close();
+   }
+   CATCH_DUMP_ATTR
+
+   /*!
+   \brief Parse xml file and write information into file object
+   \param [in] node xmld node corresponding in xml file
+   */
+   void CFile::parse(xml::CXMLNode & node)
+   TRY
+   {
+      SuperClass::parse(node);
+
+      if (node.goToChildElement())
+      {
+        do
+        {
+           if (node.getElementName()=="field" || node.getElementName()=="field_group") this->getVirtualFieldGroup()->parseChild(node);
+           else if (node.getElementName()=="variable" || node.getElementName()=="variable_group") this->getVirtualVariableGroup()->parseChild(node);
+        } while (node.goToNextElement());
+        node.goToParentElement();
+      }
+   }
+   CATCH_DUMP_ATTR
+
+   //----------------------------------------------------------------
+
+   /*!
+   \brief Represent a file in form of string with all its info
+   \return String
+   */
+   StdString CFile::toString(void) const
+   TRY
+   {
+      StdOStringStream oss;
+
+      oss << "<" << CFile::GetName() << " ";
+      if (this->hasId())
+         oss << " id=\"" << this->getId() << "\" ";
+      oss << SuperClassAttribute::toString() << ">" << std::endl;
+      if (this->getVirtualFieldGroup() != NULL)
+         oss << *this->getVirtualFieldGroup() << std::endl;
+      oss << "</" << CFile::GetName() << " >";
+      return (oss.str());
+   }
+   CATCH
+
+   //----------------------------------------------------------------
+
+   /*!
+   \brief Find all inheritace among objects in a file.
+   \param [in] apply (true) write attributes of parent into ones of child if they are empty
+                     (false) write attributes of parent into a new container of child
+   \param [in] parent
+   */
+   void CFile::solveDescInheritance(bool apply, const CAttributeMap * const parent)
+   TRY
+   {
+      SuperClassAttribute::setAttributes(parent,apply);
+      this->getVirtualFieldGroup()->solveDescInheritance(apply, NULL);
+      this->getVirtualVariableGroup()->solveDescInheritance(apply, NULL);
+   }
+   CATCH_DUMP_ATTR
+
+   //----------------------------------------------------------------
+
+   /*!
+   \brief Resolve all reference of active fields.
+      In order to know exactly which data each active field has, a search for all its
+   reference to find its parents or/and its base reference object must be done. Moreover
+   during this search, there are some information that can only be sent to server AFTER
+   all information of active fields are created on server side, e.g: checking mask or index
+   \param [in] sendToServer: Send all info to server (true) or only a part of it (false)
+   */
+   void CFile::solveOnlyRefOfEnabledFields(bool sendToServer)
+   TRY
+   {
+     int size = this->enabledFields.size();
+     for (int i = 0; i < size; ++i)
+     {
+       this->enabledFields[i]->solveOnlyReferenceEnabledField(sendToServer);
+     }
+   }
+   CATCH_DUMP_ATTR
+
+   void CFile::checkGridOfEnabledFields()
+   TRY
+   { 
+     int size = this->enabledFields.size();
+     for (int i = 0; i < size; ++i)
+     {
+       this->enabledFields[i]->checkGridOfEnabledFields();
+     }
+   }
+   CATCH_DUMP_ATTR
+
+   void CFile::sendGridComponentOfEnabledFields()
+   TRY
+   { 
+     int size = this->enabledFields.size();
+     for (int i = 0; i < size; ++i)
+     {
+       this->enabledFields[i]->sendGridComponentOfEnabledFields();
+     }
+   }
+   CATCH_DUMP_ATTR
+
+   /*!
+   \brief Sorting domains with the same name (= describing the same mesh) in the decreasing order of nvertex for UGRID files.
+   This insures that the domain with the highest nvertex is written first and thus all known mesh connectivity is generated at once by this domain.
+   */
+   void CFile::sortEnabledFieldsForUgrid()
+   TRY
+   {
+     int size = this->enabledFields.size();
+     std::vector<int> domainNvertices;
+     std::vector<StdString> domainNames;
+
+     for (int i = 0; i < size; ++i)
+     {
+       std::vector<CDomain*> domain = this->enabledFields[i]->getRelGrid()->getDomains();
+       if (domain.size() != 1)
+       {
+         ERROR("void CFile::sortEnabledFieldsForUgrid()",
+               "A domain, and only one, should be defined for grid "<< this->enabledFields[i]->getRelGrid()->getId() << ".");
+       }
+       StdString domainName = domain[0]->getDomainOutputName();
+       int nvertex;
+       if (domain[0]->nvertex.isEmpty())
+       {
+         ERROR("void CFile::sortEnabledFieldsForUgrid()",
+               "Attributes nvertex must be defined for domain "<< domain[0]->getDomainOutputName() << ".");
+       }
+       else
+         nvertex = domain[0]->nvertex;
+
+       for (int j = 0; j < i; ++j)
+       {
+         if (domainName == domainNames[j] && nvertex > domainNvertices[j])
+         {
+           CField* tmpSwap = this->enabledFields[j];
+           this->enabledFields[j] = this->enabledFields[i];
+           this->enabledFields[i] = tmpSwap;
+           domainNames.push_back(domainNames[j]);
+           domainNames[j] = domainName;
+           domainNvertices.push_back(domainNvertices[j]);
+           domainNvertices[j] = nvertex;
+         }
+         else
+         {
+           domainNames.push_back(domainName);
+           domainNvertices.push_back(nvertex);
+         }
+       }
+       if (i==0)
+       {
+         domainNames.push_back(domainName);
+         domainNvertices.push_back(nvertex);
+       }
+     }
+   }
+   CATCH_DUMP_ATTR
+
+   void CFile::sendGridOfEnabledFields()
+   TRY
+   { 
+     int size = this->enabledFields.size();
+     for (int i = 0; i < size; ++i)
+     {
+       this->enabledFields[i]->sendGridOfEnabledFields();
+     }
+   }
+   CATCH_DUMP_ATTR
+
+   void CFile::generateNewTransformationGridDest()
+   TRY
+   {
+     int size = this->enabledFields.size();
+     for (int i = 0; i < size; ++i)
+     {
+       this->enabledFields[i]->generateNewTransformationGridDest();
+     }
+   }
+   CATCH_DUMP_ATTR
+
+   /*!
+   \brief Resolve all reference of active fields.
+      In order to know exactly which data each active field has, a search for all its
+   reference to find its parents or/and its base reference object must be done. Moreover
+   during this search, there are some information that can only be sent to server AFTER
+   all information of active fields are created on server side, e.g: checking mask or index
+   \param [in] sendToServer: Send all info to server (true) or only a part of it (false)
+   */
+   void CFile::solveAllRefOfEnabledFieldsAndTransform(bool sendToServer)
+   TRY
+   {
+     int size = this->enabledFields.size();
+     for (int i = 0; i < size; ++i)
+     {       
+      this->enabledFields[i]->solveAllEnabledFieldsAndTransform();
+     }
+   }
+   CATCH_DUMP_ATTR
+
+   /*!
+    * Constructs the filter graph for each active field.
+    *
+    * \param gc the garbage collector to use when building the filter graph
+    */
+   void CFile::buildFilterGraphOfEnabledFields(CGarbageCollector& gc)
+   TRY
+   {
+     int size = this->enabledFields.size();
+     for (int i = 0; i < size; ++i)
+     {
+       this->enabledFields[i]->buildFilterGraph(gc, true);
+     }
+   }
+   CATCH_DUMP_ATTR
+
+   /*!
+    * Post-process the filter graph for each active field.
+    */
+   void CFile::postProcessFilterGraph()
+   TRY
+   {
+     int size = this->enabledFields.size();
+     for (int i = 0; i < size; ++i)
+     {
+       this->enabledFields[i]->checkIfMustAutoTrigger();
+     }
+   }
+   CATCH_DUMP_ATTR
+
+   /*!
+     Prefetching the data for enabled fields read from file.
+   */
+   void CFile::prefetchEnabledReadModeFields(void)
+   TRY
+   {
+     if (mode.isEmpty() || mode.getValue() != mode_attr::read)
+       return;
+
+     int size = this->enabledFields.size();
+     for (int i = 0; i < size; ++i)
+       this->enabledFields[i]->sendReadDataRequest(CContext::getCurrent()->getCalendar()->getCurrentDate());
+   }
+   CATCH_DUMP_ATTR
+
+   /*!
+     Do all pre timestep operations for enabled fields in read mode:
+      - Check that the data excepted from server has been received
+      - Check if some filters must auto-trigger
+   */
+   void CFile::doPreTimestepOperationsForEnabledReadModeFields(void)
+   TRY
+   {
+     if (mode.isEmpty() || mode.getValue() != mode_attr::read)
+       return;
+
+     int size = this->enabledFields.size();
+     for (int i = 0; i < size; ++i)
+     {
+       this->enabledFields[i]->checkForLateDataFromServer();
+       this->enabledFields[i]->autoTriggerIfNeeded();
+     }
+   }
+   CATCH_DUMP_ATTR
+
+   /*!
+     Do all post timestep operations for enabled fields in read mode:
+      - Prefetch the data read from file when needed
+   */
+   void CFile::doPostTimestepOperationsForEnabledReadModeFields(void)
+   TRY
+   {
+     if (mode.isEmpty() || mode.getValue() != mode_attr::read)
+       return;
+
+     int size = this->enabledFields.size();
+     for (int i = 0; i < size; ++i)
+     {
+       this->enabledFields[i]->sendReadDataRequestIfNeeded();
+     }
+   }
+   CATCH_DUMP_ATTR
+
+   void CFile::solveFieldRefInheritance(bool apply)
+   TRY
+   {
+      // Rsolution des hritages par rfrence de chacun des champs contenus dans le fichier.
+      std::vector<CField*> allF = this->getAllFields();
+      for (unsigned int i = 0; i < allF.size(); i++)
+         allF[i]->solveRefInheritance(apply);
+   }
+   CATCH_DUMP_ATTR
+
+   //----------------------------------------------------------------
+
+   /*!
+   \brief Add a field into file.
+      A field is added into file and it will be written out if the file is enabled and
+   level of this field is smaller than level_output. A new field won't be created if one
+   with id has already existed
+   \param [in] id String identity of new field
+   \return Pointer to added (or already existed) field
+   */
+   CField* CFile::addField(const string& id)
+   TRY
+   {
+     return vFieldGroup->createChild(id);
+   }
+   CATCH_DUMP_ATTR
+
+   /*!
+   \brief Add a field group into file.
+      A field group is added into file and it will play a role as parents for fields.
+   A new field group won't be created if one with id has already existed
+   \param [in] id String identity of new field group
+   \return Pointer to added (or already existed) field group
+   */
+   CFieldGroup* CFile::addFieldGroup(const string& id)
+   TRY
+   {
+     return vFieldGroup->createChildGroup(id);
+   }
+   CATCH_DUMP_ATTR
+
+   /*!
+   \brief Add a variable into file.
+      A variable is added into file and if one with id has already existed, pointer to
+   it will be returned.
+      Variable as long as attributes are information container of file.
+   However, whereas attributes are "fixed" information, variables provides a more flexible way to user
+   to fill in (extra) information for a file.
+   \param [in] id String identity of new variable
+   \return Pointer to added (or already existed) variable
+   */
+   CVariable* CFile::addVariable(const string& id)
+   TRY
+   {
+     return vVariableGroup->createChild(id);
+   }
+   CATCH_DUMP_ATTR
+
+   /*!
+   \brief Add a variable group into file.
+      A variable group is added into file and it will play a role as parents for variables.
+   A new variable group won't be created if one with id has already existed
+   \param [in] id String identity of new variable group
+   \return Pointer to added (or already existed) variable group
+   */
+   CVariableGroup* CFile::addVariableGroup(const string& id)
+   TRY
+   {
+     return vVariableGroup->createChildGroup(id);
+   }
+   CATCH_DUMP_ATTR
+
+   void CFile::setContextClient(CContextClient* newContextClient)
+   TRY
+   {
+     client = newContextClient;
+     size_t size = this->enabledFields.size();
+     for (size_t i = 0; i < size; ++i)
+     {
+       this->enabledFields[i]->setContextClient(newContextClient);
+     }
+   }
+   CATCH_DUMP_ATTR
+
+   CContextClient* CFile::getContextClient()
+   TRY
+   {
+     return client;
+   }
+   CATCH_DUMP_ATTR
+
+   void CFile::setReadContextClient(CContextClient* readContextclient)
+   TRY
+   {
+     read_client = readContextclient;
+   }
+   CATCH_DUMP_ATTR
+
+   CContextClient* CFile::getReadContextClient()
+   TRY
+   {
+     return read_client;
+   }
+   CATCH_DUMP_ATTR
+
+   /*!
+   \brief Send a message to create a field on server side
+   \param[in] id String identity of field that will be created on server
+   */
+   void CFile::sendAddField(const string& id, CContextClient* client)
+   TRY
+   {
+      sendAddItem(id, EVENT_ID_ADD_FIELD, client);
+   }
+   CATCH_DUMP_ATTR
+
+   /*!
+   \brief Send a message to create a field group on server side
+   \param[in] id String identity of field group that will be created on server
+   */
+   void CFile::sendAddFieldGroup(const string& id, CContextClient* client)
+   TRY
+   {
+      sendAddItem(id, (int)EVENT_ID_ADD_FIELD_GROUP, client);
+   }
+   CATCH_DUMP_ATTR
+
+   /*!
+   \brief Receive a message annoucing the creation of a field on server side
+   \param[in] event Received event
+   */
+   void CFile::recvAddField(CEventServer& event)
+   TRY
+   {
+
+      CBufferIn* buffer = event.subEvents.begin()->buffer;
+      string id;
+      *buffer>>id;
+      get(id)->recvAddField(*buffer);
+   }
+   CATCH
+
+   /*!
+   \brief Receive a message annoucing the creation of a field on server side
+   \param[in] buffer Buffer containing message
+   */
+   void CFile::recvAddField(CBufferIn& buffer)
+   TRY
+   {
+      string id;
+      buffer>>id;
+      addField(id);
+   }
+   CATCH_DUMP_ATTR
+
+   /*!
+   \brief Receive a message annoucing the creation of a field group on server side
+   \param[in] event Received event
+   */
+   void CFile::recvAddFieldGroup(CEventServer& event)
+   TRY
+   {
+
+      CBufferIn* buffer = event.subEvents.begin()->buffer;
+      string id;
+      *buffer>>id;
+      get(id)->recvAddFieldGroup(*buffer);
+   }
+   CATCH
+
+   /*!
+   \brief Receive a message annoucing the creation of a field group on server side
+   \param[in] buffer Buffer containing message
+   */
+   void CFile::recvAddFieldGroup(CBufferIn& buffer)
+   TRY
+   {
+      string id;
+      buffer>>id;
+      addFieldGroup(id);
+   }
+   CATCH_DUMP_ATTR
+
+   /*!
+   \brief Send messages to duplicate all variables on server side
+      Because each variable has also its attributes. So first thing to do is replicate
+   all these attributes on server side. Because variable can have a value, the second thing
+   is to duplicate this value on server, too.
+   */
+   void CFile::sendAddAllVariables(CContextClient* client)
+   TRY
+   {
+     std::vector<CVariable*> allVar = getAllVariables();
+     std::vector<CVariable*>::const_iterator it = allVar.begin();
+     std::vector<CVariable*>::const_iterator itE = allVar.end();
+
+     for (; it != itE; ++it)
+     {
+       this->sendAddVariable((*it)->getId(), client);
+       (*it)->sendAllAttributesToServer(client);
+       (*it)->sendValue(client);
+     }
+   }
+   CATCH_DUMP_ATTR
+
+   /*!
+   \brief Send a message to create a variable group on server side
+   \param[in] id String identity of variable group that will be created on server
+   \param [in] client client to which we will send this adding action
+   */
+   void CFile::sendAddVariableGroup(const string& id, CContextClient* client)
+   TRY
+   {
+      sendAddItem(id, (int)EVENT_ID_ADD_VARIABLE_GROUP, client);
+   }
+   CATCH_DUMP_ATTR
+
+   /*
+     Send message to add a variable into a file within a certain client
+     \param [in] id String identity of a variable
+     \param [in] client client to which we will send this adding action
+   */
+   void CFile::sendAddVariable(const string& id, CContextClient* client)
+   TRY
+   {
+      sendAddItem(id, (int)EVENT_ID_ADD_VARIABLE, client);
+   }
+   CATCH_DUMP_ATTR
+
+   /*!
+   \brief Receive a message annoucing the creation of a variable on server side
+   \param[in] event Received event
+   */
+   void CFile::recvAddVariable(CEventServer& event)
+   TRY
+   {
+      CBufferIn* buffer = event.subEvents.begin()->buffer;
+      string id;
+      *buffer>>id;
+      get(id)->recvAddVariable(*buffer);
+   }
+   CATCH
+
+   /*!
+   \brief Receive a message annoucing the creation of a variable on server side
+   \param[in] buffer Buffer containing message
+   */
+   void CFile::recvAddVariable(CBufferIn& buffer)
+   TRY
+   {
+      string id;
+      buffer>>id;
+      addVariable(id);
+   }
+   CATCH_DUMP_ATTR
+
+   /*!
+   \brief Receive a message annoucing the creation of a variable group on server side
+   \param[in] event Received event
+   */
+   void CFile::recvAddVariableGroup(CEventServer& event)
+   TRY
+   {
+
+      CBufferIn* buffer = event.subEvents.begin()->buffer;
+      string id;
+      *buffer>>id;
+      get(id)->recvAddVariableGroup(*buffer);
+   }
+   CATCH
+
+   /*!
+   \brief Receive a message annoucing the creation of a variable group on server side
+   \param[in] buffer Buffer containing message
+   */
+   void CFile::recvAddVariableGroup(CBufferIn& buffer)
+   TRY
+   {
+      string id;
+      buffer>>id;
+      addVariableGroup(id);
+   }
+   CATCH_DUMP_ATTR
+
+   /*!
+     \brief Sending all active (enabled) fields from client to server.
+   Each field is identified uniquely by its string identity. Not only should we
+   send the id to server but also we need to send ids of reference domain and reference axis.
+   With these two id, it's easier to make reference to grid where all data should be written.
+   Remark: This function must be called AFTER all active (enabled) files have been created on the server side
+   */
+   void CFile::sendEnabledFields(CContextClient* client)
+   TRY
+   {
+     size_t size = this->enabledFields.size();
+     for (size_t i = 0; i < size; ++i)
+     {
+       CField* field = this->enabledFields[i];
+       this->sendAddField(field->getId(), client);
+       field->checkTimeAttributes();
+       field->sendAllAttributesToServer(client);
+       field->sendAddAllVariables(client);
+     }
+   }
+   CATCH_DUMP_ATTR
+
+   /*!
+   \brief Dispatch event received from client
+      Whenever a message is received in buffer of server, it will be processed depending on
+   its event type. A new event type should be added in the switch list to make sure
+   it processed on server side.
+   \param [in] event: Received message
+   */
+   bool CFile::dispatchEvent(CEventServer& event)
+   TRY
+   {
+      if (SuperClass::dispatchEvent(event)) return true;
+      else
+      {
+        switch(event.type)
+        {
+           case EVENT_ID_ADD_FIELD :
+             recvAddField(event);
+             return true;
+             break;
+
+           case EVENT_ID_ADD_FIELD_GROUP :
+             recvAddFieldGroup(event);
+             return true;
+             break;
+
+            case EVENT_ID_ADD_VARIABLE :
+             recvAddVariable(event);
+             return true;
+             break;
+
+           case EVENT_ID_ADD_VARIABLE_GROUP :
+             recvAddVariableGroup(event);
+             return true;
+             break;
+           default :
+              ERROR("bool CFile::dispatchEvent(CEventServer& event)", << "Unknown Event");
+           return false;
+        }
+      }
+   }
+   CATCH
+
+   ///--------------------------------------------------------------
+   /*!
+   */
+   StdString CFile::dumpClassAttributes(void)
+   {
+     StdString str;
+     CContext* context = CContext::getCurrent();
+     str.append("context=\"");
+     str.append(context->getId());
+     str.append("\"");
+     str.append(" enabled fields=\"");
+     int size = this->enabledFields.size();
+     for (int i = 0; i < size; ++i)
+     {
+       str.append(this->enabledFields[i]->getId());
+       str.append(" ");
+     }
+     str.append("\"");
+     return str;
+   }
+
+   ///---------------------------------------------------------------
+
+} // namespace xios
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/node/file.hpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/node/file.hpp	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/node/file.hpp	(revision 1749)
@@ -0,0 +1,210 @@
+#ifndef __XIOS_CFile__
+#define __XIOS_CFile__
+
+/// XIOS headers ///
+#include "xios_spl.hpp"
+#include "field.hpp"
+#include "data_output.hpp"
+#include "data_input.hpp"
+#include "declare_group.hpp"
+#include "date.hpp"
+#include "attribute_enum.hpp"
+#include "attribute_enum_impl.hpp"
+#include "context_client.hpp"
+#include "mpi.hpp"
+
+namespace xios {
+
+   /// ////////////////////// DÃ©clarations ////////////////////// ///
+
+   class CFileGroup;
+   class CFileAttributes;
+   class CFile;
+
+   class CGarbageCollector;
+
+   ///--------------------------------------------------------------
+
+   // Declare/Define CFileAttribute
+   BEGIN_DECLARE_ATTRIBUTE_MAP(CFile)
+#  include "file_attribute.conf"
+   END_DECLARE_ATTRIBUTE_MAP(CFile)
+
+   ///--------------------------------------------------------------
+
+   /*!
+   \class CFile
+   This class corresponds to file component of the xml.
+   The class contains all the nessceary information to write data into a netcdf file: The most important thing
+   is the field(s) which will be written into file. Besides, there are some options to write
+   data into file, e.g: writting into only one file or multiple file; splitting a running into several files.
+   Moreover, there are some other attributes of netcdf file which are also stored in this class
+   */
+   class CFile
+      : public CObjectTemplate<CFile>
+      , public CFileAttributes
+   {
+         /// typedef ///
+         typedef CObjectTemplate<CFile>   SuperClass;
+         typedef CFileAttributes SuperClassAttribute;
+
+      public :
+         enum EEventId
+         {
+           EVENT_ID_ADD_FIELD, EVENT_ID_ADD_FIELD_GROUP, EVENT_ID_ADD_VARIABLE,
+           EVENT_ID_ADD_VARIABLE_GROUP, EVENT_ID_CREATE_ENABLED_FIELDS
+         };
+
+         typedef CFileAttributes RelAttributes;
+         typedef CFileGroup      RelGroup;
+
+         /// Constructeurs ///
+         CFile(void);
+         explicit CFile(const StdString& id);
+         CFile(const CFile& file);       // Not implemented yet.
+         CFile(const CFile* const file); // Not implemented yet.
+
+         /// Destructeur ///
+         virtual ~CFile(void);
+
+      public:
+         /// Accesseurs ///
+         const StdString getFileOutputName(void) const;
+         std::shared_ptr<CDataOutput> getDataOutput(void) const;
+         std::shared_ptr<CDataInput> getDataInput(void) const;
+         CFieldGroup* getVirtualFieldGroup(void) const;
+         CVariableGroup* getVirtualVariableGroup(void) const;
+         std::vector<CField*> getAllFields(void) const;
+         std::vector<CVariable*> getAllVariables(void) const;
+
+         std::vector<CField* > getEnabledFields(int default_outputlevel = 5,
+                                                int default_level = 1,
+                                                bool default_enabled = true);
+
+         StdString dumpClassAttributes(void);
+
+      public :
+         // Some functions to verify state of file
+         bool isSyncTime(void);
+         bool checkSplit(void);
+         bool checkSync(void);
+         void checkWriteFile(void);
+         void checkReadFile(void);
+         void initWrite(void);
+         void initRead(void);
+         bool isEmptyZone();
+
+         /// Mutateurs ///
+         // Set some root definitions in a file
+         void setVirtualFieldGroup(CFieldGroup* newVFieldGroup);
+         void setVirtualVariableGroup(CVariableGroup* newVVariableGroup);
+
+         void createHeader(void);
+         void openInReadMode(void);
+         void close(void);
+         void readAttributesOfEnabledFieldsInReadMode();
+
+         // Some processing on file
+         void solveFieldRefInheritance(bool apply);
+         void processEnabledFile(void);
+         void solveOnlyRefOfEnabledFields(bool sendToServer);
+         void generateNewTransformationGridDest();
+         
+         void buildFilterGraphOfEnabledFields(CGarbageCollector& gc);
+         void postProcessFilterGraph();
+         void prefetchEnabledReadModeFields();
+         void doPreTimestepOperationsForEnabledReadModeFields();
+         void doPostTimestepOperationsForEnabledReadModeFields();
+
+         void solveAllRefOfEnabledFieldsAndTransform(bool sendToServer);
+         void checkGridOfEnabledFields();
+         void sendGridOfEnabledFields();
+         void sendGridComponentOfEnabledFields();
+
+         void sortEnabledFieldsForUgrid();
+
+         // Add component into file
+         CField* addField(const string& id = "");
+         CFieldGroup* addFieldGroup(const string& id = "");
+         CVariable* addVariable(const string& id = "");
+         CVariableGroup* addVariableGroup(const string& id = "");
+         void setContextClient(CContextClient* newContextClient);
+         CContextClient* getContextClient();
+
+         void setReadContextClient(CContextClient* newContextClient);
+         CContextClient* getReadContextClient();
+
+         // Send info to server         
+         void sendEnabledFields(CContextClient* client);         
+         void sendAddField(const string& id, CContextClient* client);         
+         void sendAddFieldGroup(const string& id, CContextClient* client);                           
+         void sendAddVariable(const string& id, CContextClient* client);
+         void sendAddVariableGroup(const string& id, CContextClient* client);
+         void sendAddAllVariables(CContextClient* client);
+         
+         // Receive info from client
+         static void recvAddField(CEventServer& event);
+         void recvAddField(CBufferIn& buffer);
+         static void recvAddFieldGroup(CEventServer& event);
+         void recvAddFieldGroup(CBufferIn& buffer);
+         static void recvAddVariable(CEventServer& event);
+         void recvAddVariable(CBufferIn& buffer);
+         static void recvAddVariableGroup(CEventServer& event);
+         void recvAddVariableGroup(CBufferIn& buffer);
+
+         // Dispatch event
+         static bool dispatchEvent(CEventServer& event);
+
+      public:
+         /// Accesseurs statiques ///
+         static StdString GetName(void);
+         static StdString GetDefName(void);
+
+         static ENodeType GetType(void);
+      public:
+         /// Traitements ///
+         virtual void solveDescInheritance(bool apply, const CAttributeMap* const parent = 0);
+
+          /// Autres ///
+         virtual void parse(xml::CXMLNode& node);
+         virtual StdString toString(void) const;
+      public:
+
+         CDate lastSync;
+         CDate lastSplit;
+         int nbAxis, nbDomains;
+         bool isOpen;         
+         MPI_Comm fileComm;
+
+      private:
+         void createSubComFile();
+         bool checkRead;
+         bool allZoneEmpty;
+         
+      private :
+         /// PropriÃ©tÃ©s privÃ©es ///
+         CContextClient* client;
+         CContextClient* read_client; // Context client for reading (channel between server 1 and client)
+         CFieldGroup* vFieldGroup;
+         CVariableGroup* vVariableGroup;
+         std::shared_ptr<CDataOutput> data_out;
+         std::shared_ptr<CDataInput> data_in;
+         std::vector<CField*> enabledFields;
+
+
+      public:
+        //         virtual void toBinary  (StdOStream& os) const;
+        //         virtual void fromBinary(StdIStream& is);
+
+   }; // class CFile
+
+   ///--------------------------------------------------------------
+
+   // Declare/Define CFileGroup and CFileDefinition
+   DECLARE_GROUP(CFile);
+
+   ///--------------------------------------------------------------
+
+} // namespace xios
+
+#endif // __XIOS_CFile__
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/node/generate_rectilinear_domain.cpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/node/generate_rectilinear_domain.cpp	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/node/generate_rectilinear_domain.cpp	(revision 1749)
@@ -0,0 +1,140 @@
+#include "generate_rectilinear_domain.hpp"
+#include "type.hpp"
+
+namespace xios {
+
+  /// ////////////////////// DÃ©finitions ////////////////////// ///
+
+  CGenerateRectilinearDomain::CGenerateRectilinearDomain(void)
+    : CObjectTemplate<CGenerateRectilinearDomain>(), CGenerateRectilinearDomainAttributes(), CTransformation<CDomain>()
+  { /* Ne rien faire de plus */ }
+
+  CGenerateRectilinearDomain::CGenerateRectilinearDomain(const StdString & id)
+    : CObjectTemplate<CGenerateRectilinearDomain>(id), CGenerateRectilinearDomainAttributes(), CTransformation<CDomain>()
+  { /* Ne rien faire de plus */ }
+
+  CGenerateRectilinearDomain::~CGenerateRectilinearDomain(void)
+  {}
+
+  CTransformation<CDomain>* CGenerateRectilinearDomain::create(const StdString& id, xml::CXMLNode* node)
+  {
+    CGenerateRectilinearDomain* genDomain = CGenerateRectilinearDomainGroup::get("generate_rectilinear_domain_definition")->createChild(id);
+    if (node) genDomain->parse(*node);
+    return static_cast<CTransformation<CDomain>*>(genDomain);
+  }
+
+  bool CGenerateRectilinearDomain::_dummyRegistered = CGenerateRectilinearDomain::registerTrans();
+  bool CGenerateRectilinearDomain::registerTrans()
+  {
+    registerTransformation(TRANS_GENERATE_RECTILINEAR_DOMAIN, create);
+  }
+
+  //----------------------------------------------------------------
+
+  StdString CGenerateRectilinearDomain::GetName(void)    { return StdString("generate_rectilinear_domain"); }
+  StdString CGenerateRectilinearDomain::GetDefName(void) { return StdString("generate_rectilinear_domain"); }
+  ENodeType CGenerateRectilinearDomain::GetType(void)    { return eGenerateRectilinearDomain; }
+
+  void CGenerateRectilinearDomain::checkValid(CDomain* domainDst)
+  {
+    const double defaultBndsLonStart = 0;
+    const double defaultBndsLonEnd = 360;
+
+    const double defaultBndsLatStart = -90;
+    const double defaultBndsLatEnd = 90;
+
+
+    int niGlo = domainDst->ni_glo;
+    int njGlo = domainDst->nj_glo;
+
+
+    double deltaLon=(defaultBndsLonEnd-defaultBndsLonStart)/niGlo ; 
+    if (!lon_start.isEmpty() && !lon_end.isEmpty() ) deltaLon=(lon_end-lon_start)/(niGlo-1) ;
+    if (!bounds_lon_start.isEmpty() && !bounds_lon_end.isEmpty()) deltaLon=(bounds_lon_end-bounds_lon_start)/niGlo ;
+    if (!lon_start.isEmpty() && !bounds_lon_end.isEmpty()) deltaLon=(bounds_lon_end-bounds_lon_start)/(niGlo-0.5) ;
+    if (!bounds_lon_start.isEmpty() && !lon_end.isEmpty()) deltaLon=(bounds_lon_end-bounds_lon_start)/(niGlo-0.5) ;
+
+    if (lon_start.isEmpty())
+    {
+      if (!bounds_lon_start.isEmpty())      domainDst->lon_start=bounds_lon_start+0.5*deltaLon ;
+      else if (!lon_end.isEmpty())          domainDst->lon_start= lon_end-(niGlo-1.)*deltaLon ;
+      else if (!bounds_lon_end.isEmpty())   domainDst->lon_start=bounds_lon_end-(niGlo-0.5)*deltaLon ;
+      else                                  domainDst->lon_start=defaultBndsLonStart+0.5*deltaLon ;
+    }
+    else domainDst->lon_start=lon_start ;
+
+    if (bounds_lon_start.isEmpty())
+    {
+      if (!lon_start.isEmpty())           domainDst->bounds_lon_start=lon_start-0.5*deltaLon ;
+      else if (!lon_end.isEmpty())        domainDst->bounds_lon_start= lon_end-(niGlo-0.5)*deltaLon ;
+      else if (!bounds_lon_end.isEmpty()) domainDst->bounds_lon_start=bounds_lon_end-niGlo*deltaLon ;
+      else                                domainDst->bounds_lon_start=defaultBndsLonStart ;
+    } 
+    else domainDst->bounds_lon_start=bounds_lon_start ;
+
+    if (lon_end.isEmpty())
+    {
+      if (!bounds_lon_end.isEmpty())        domainDst->lon_end=bounds_lon_end-0.5*deltaLon ;
+      else if (!bounds_lon_start.isEmpty()) domainDst->lon_end=bounds_lon_start+(niGlo-0.5)*deltaLon ;
+      else if (!lon_start.isEmpty())        domainDst->lon_end=lon_start+(niGlo-1.)*deltaLon ;
+      else                                  domainDst->lon_end=defaultBndsLonEnd-0.5*deltaLon ;
+    }
+    else domainDst->lon_end=lon_end ;    
+
+    if (bounds_lon_end.isEmpty())
+    {
+      if (!lon_end.isEmpty())               domainDst->bounds_lon_end=lon_end+0.5*deltaLon ;
+      else if (!bounds_lon_start.isEmpty()) domainDst->bounds_lon_end=bounds_lon_start+niGlo*deltaLon ;
+      else if (!lon_start.isEmpty())        domainDst->bounds_lon_end=lon_start+(niGlo-0.5)*deltaLon ;
+      else                                  domainDst->bounds_lon_end=defaultBndsLonEnd ;
+    }
+    else domainDst->bounds_lon_end=bounds_lon_end;
+
+
+
+
+    double deltaLat=(defaultBndsLatEnd-defaultBndsLatStart)/njGlo ; 
+    if (!lat_start.isEmpty() && !lat_end.isEmpty() ) deltaLat=(lat_end-lat_start)/(njGlo-1) ;
+    if (!bounds_lat_start.isEmpty() && !bounds_lat_end.isEmpty()) deltaLat=(bounds_lat_end-bounds_lat_start)/njGlo ;
+    if (!lat_start.isEmpty() && !bounds_lat_end.isEmpty()) deltaLat=(bounds_lat_end-bounds_lat_start)/(njGlo-0.5) ;
+    if (!bounds_lat_start.isEmpty() && !lat_end.isEmpty()) deltaLat=(bounds_lat_end-bounds_lat_start)/(njGlo-0.5) ;
+
+    if (lat_start.isEmpty())
+    {
+      if (!bounds_lat_start.isEmpty())      domainDst->lat_start=bounds_lat_start+0.5*deltaLat ;
+      else if (!lat_end.isEmpty())          domainDst->lat_start= lat_end-(njGlo-1.)*deltaLat ;
+      else if (!bounds_lat_end.isEmpty())   domainDst->lat_start=bounds_lat_end-(njGlo-0.5)*deltaLat ;
+      else                                  domainDst->lat_start=defaultBndsLatStart+0.5*deltaLat ;
+    }
+    else domainDst->lat_start=lat_start;
+
+    if (bounds_lat_start.isEmpty())
+    {
+      if (!lat_start.isEmpty())           domainDst->bounds_lat_start=lat_start-0.5*deltaLat ;
+      else if (!lat_end.isEmpty())        domainDst->bounds_lat_start= lat_end-(njGlo-0.5)*deltaLat ;
+      else if (!bounds_lat_end.isEmpty()) domainDst->bounds_lat_start=bounds_lat_end-njGlo*deltaLat ;
+      else                                domainDst->bounds_lat_start=defaultBndsLatStart ;
+    } 
+    else domainDst->bounds_lat_start=bounds_lat_start;
+    
+    if (lat_end.isEmpty())
+    {
+      if (!bounds_lat_end.isEmpty())        domainDst->lat_end=bounds_lat_end-0.5*deltaLat ;
+      else if (!bounds_lat_start.isEmpty()) domainDst->lat_end=bounds_lat_start+(njGlo-0.5)*deltaLat ;
+      else if (!lat_start.isEmpty())        domainDst->lat_end=lat_start+(njGlo-1.)*deltaLat ;
+      else                                  domainDst->lat_end=defaultBndsLatEnd-0.5*deltaLat ;
+    }    
+    else domainDst->lat_end=lat_end;
+    
+    if (bounds_lat_end.isEmpty())
+    {
+      if (!lat_end.isEmpty())               domainDst->bounds_lat_end=lat_end+0.5*deltaLat ;
+      else if (!bounds_lat_start.isEmpty()) domainDst->bounds_lat_end=bounds_lat_start+njGlo*deltaLat ;
+      else if (!lat_start.isEmpty())        domainDst->bounds_lat_end=lat_start+(njGlo-0.5)*deltaLat ;
+      else                                  domainDst->bounds_lat_end=defaultBndsLatEnd ;
+    }
+    else domainDst->bounds_lat_end=bounds_lat_end;
+
+  }
+
+}
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/node/generate_rectilinear_domain.hpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/node/generate_rectilinear_domain.hpp	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/node/generate_rectilinear_domain.hpp	(revision 1749)
@@ -0,0 +1,67 @@
+#ifndef __XIOS_CGenerateRectilinearDomain__
+#define __XIOS_CGenerateRectilinearDomain__
+
+/// xios headers ///
+#include "xios_spl.hpp"
+#include "attribute_enum.hpp"
+#include "attribute_enum_impl.hpp"
+#include "attribute_array.hpp"
+#include "declare_attribute.hpp"
+#include "object_template.hpp"
+#include "group_factory.hpp"
+#include "declare_group.hpp"
+#include "transformation.hpp"
+#include "domain.hpp"
+
+namespace xios {
+  /// ////////////////////// DÃ©clarations ////////////////////// ///
+  class CGenerateRectilinearDomainGroup;
+  class CGenerateRectilinearDomainAttributes;
+  class CGenerateRectilinearDomain;
+  class CDomain;
+
+  ///--------------------------------------------------------------
+
+  // Declare/Define CFileAttribute
+  BEGIN_DECLARE_ATTRIBUTE_MAP(CGenerateRectilinearDomain)
+#include "generate_rectilinear_domain_attribute.conf"
+  END_DECLARE_ATTRIBUTE_MAP(CGenerateRectilinearDomain)
+
+  ///--------------------------------------------------------------
+  /*!
+    \class CGenerateRectilinearDomain
+    This class describes zoom_domain in xml file.
+  */
+  class CGenerateRectilinearDomain
+    : public CObjectTemplate<CGenerateRectilinearDomain>
+    , public CGenerateRectilinearDomainAttributes
+    , public CTransformation<CDomain>
+  {
+    public :
+      typedef CObjectTemplate<CGenerateRectilinearDomain> SuperClass;
+      typedef CGenerateRectilinearDomainAttributes SuperClassAttribute;
+
+    public :
+      /// Constructeurs ///
+      CGenerateRectilinearDomain(void);
+      explicit CGenerateRectilinearDomain(const StdString& id);
+
+      /// Destructeur ///
+      virtual ~CGenerateRectilinearDomain(void);
+
+      virtual void checkValid(CDomain* axisDest);
+
+      /// Accesseurs statiques ///
+      static StdString GetName(void);
+      static StdString GetDefName(void);
+      static ENodeType GetType(void);
+    private:
+      static bool registerTrans();
+      static CTransformation<CDomain>* create(const StdString& id, xml::CXMLNode* node);
+      static bool _dummyRegistered;
+  }; // class CGenerateRectilinearDomain
+
+  DECLARE_GROUP(CGenerateRectilinearDomain);
+} // namespace xios
+
+#endif // __XIOS_CGenerateRectilinearDomain__
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/node/grid.cpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/node/grid.cpp	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/node/grid.cpp	(revision 1749)
@@ -0,0 +1,2762 @@
+
+#include "grid.hpp"
+
+#include "attribute_template.hpp"
+#include "object_template.hpp"
+#include "group_template.hpp"
+#include "message.hpp"
+#include <iostream>
+#include "xios_spl.hpp"
+#include "type.hpp"
+#include "context.hpp"
+#include "context_client.hpp"
+#include "context_server.hpp"
+#include "array_new.hpp"
+#include "server_distribution_description.hpp"
+#include "client_server_mapping_distributed.hpp"
+#include "distribution_client.hpp"
+#include "grid_transformation.hpp"
+#include "grid_generate.hpp"
+#include "server.hpp"
+
+namespace xios {
+
+   /// ////////////////////// Dfinitions ////////////////////// ///
+
+   CGrid::CGrid(void)
+      : CObjectTemplate<CGrid>(), CGridAttributes()
+      , isChecked(false), isDomainAxisChecked(false)
+      , vDomainGroup_(), domList_(), isDomListSet(false)
+      , vAxisGroup_(), axisList_(), isAxisListSet(false)
+      , vScalarGroup_(), scalarList_(), isScalarListSet(false)
+      , clientDistribution_(0), isIndexSent(false) , serverDistribution_(0), clientServerMap_(0)
+      , writtenDataSize_(0), numberWrittenIndexes_(0), totalNumberWrittenIndexes_(0), offsetWrittenIndexes_(0)
+      , connectedDataSize_(), connectedServerRank_(), connectedServerRankRead_(), connectedDataSizeRead_()
+	  , isDataDistributed_(true), isCompressible_(false)
+      , transformations_(0), isTransformed_(false)
+      , axisPositionInGrid_(), hasDomainAxisBaseRef_(false)
+      , gridSrc_(), hasTransform_(false), isGenerated_(false), order_(), globalIndexOnServer_()
+      , computedWrittenIndex_(false)
+      , clients()
+   {
+     setVirtualDomainGroup(CDomainGroup::create(getId() + "_virtual_domain_group"));
+     setVirtualAxisGroup(CAxisGroup::create(getId() + "_virtual_axis_group"));
+     setVirtualScalarGroup(CScalarGroup::create(getId() + "_virtual_scalar_group"));
+   }
+
+   CGrid::CGrid(const StdString& id)
+      : CObjectTemplate<CGrid>(id), CGridAttributes()
+      , isChecked(false), isDomainAxisChecked(false)
+      , vDomainGroup_(), domList_(), isDomListSet(false)
+      , vAxisGroup_(), axisList_(), isAxisListSet(false)
+      , vScalarGroup_(), scalarList_(), isScalarListSet(false)
+      , clientDistribution_(0), isIndexSent(false) , serverDistribution_(0), clientServerMap_(0)
+      , writtenDataSize_(0), numberWrittenIndexes_(0), totalNumberWrittenIndexes_(0), offsetWrittenIndexes_(0)
+      , connectedDataSize_(), connectedServerRank_(), connectedServerRankRead_(), connectedDataSizeRead_()
+	  , isDataDistributed_(true), isCompressible_(false)
+      , transformations_(0), isTransformed_(false)
+      , axisPositionInGrid_(), hasDomainAxisBaseRef_(false)
+      , gridSrc_(), hasTransform_(false), isGenerated_(false), order_(), globalIndexOnServer_()
+      , computedWrittenIndex_(false)
+      , clients()
+   {
+     setVirtualDomainGroup(CDomainGroup::create(getId() + "_virtual_domain_group"));
+     setVirtualAxisGroup(CAxisGroup::create(getId() + "_virtual_axis_group"));
+     setVirtualScalarGroup(CScalarGroup::create(getId() + "_virtual_scalar_group"));
+   }
+
+   CGrid::~CGrid(void)
+   {
+    if (0 != clientDistribution_) delete clientDistribution_;
+    if (0 != serverDistribution_) delete serverDistribution_;
+    if (0 != clientServerMap_) delete clientServerMap_;
+    if (0 != transformations_) delete transformations_;
+   }
+
+   ///---------------------------------------------------------------
+
+   StdString CGrid::GetName(void)    { return StdString("grid"); }
+   StdString CGrid::GetDefName(void) { return CGrid::GetName(); }
+   ENodeType CGrid::GetType(void)    { return eGrid; }
+
+
+   StdSize CGrid::getDimension(void)
+   TRY
+   {
+      return getGlobalDimension().size();
+   }
+   CATCH_DUMP_ATTR
+
+   //---------------------------------------------------------------
+
+   StdSize CGrid::getDataSize(void) const
+   TRY
+   {
+     StdSize retvalue = 1;
+     if (!isScalarGrid())
+     {
+       std::vector<int> dataNindex = clientDistribution_->getDataNIndex();
+       for (int i = 0; i < dataNindex.size(); ++i) retvalue *= dataNindex[i];       
+     }
+     return retvalue;
+   }
+   CATCH
+
+   /*!
+    * Compute the minimum buffer size required to send the attributes to the server(s).
+    *
+    * \return A map associating the server rank with its minimum buffer size.
+    * TODO: Refactor code
+    */
+   std::map<int, StdSize> CGrid::getAttributesBufferSize(CContextClient* client, bool bufferForWriting)
+   TRY
+   {
+     std::map<int, StdSize> attributesSizes = getMinimumBufferSizeForAttributes(client);
+
+     // The grid indexes require a similar size as the actual data
+     std::map<int, StdSize> dataSizes = getDataBufferSize(client, "", bufferForWriting);
+     std::map<int, StdSize>::iterator it, itE = dataSizes.end();
+     for (it = dataSizes.begin(); it != itE; ++it)
+     {
+       it->second += 2 * sizeof(bool);
+       if (it->second > attributesSizes[it->first])
+         attributesSizes[it->first] = it->second;
+     }
+     
+     // Account for the axis attributes
+     std::vector<CAxis*> axisList = getAxis();
+     for (size_t i = 0; i < axisList.size(); ++i)
+     {
+       std::map<int, StdSize> axisAttBuffSize = axisList[i]->getAttributesBufferSize(client, getGlobalDimension(),axisPositionInGrid_[i]);
+       for (it = axisAttBuffSize.begin(), itE = axisAttBuffSize.end(); it != itE; ++it)
+       {
+         it->second += 2 * sizeof(bool);
+         if (it->second > attributesSizes[it->first])
+           attributesSizes[it->first] = it->second;
+       }
+     }
+
+     // Account for the domain attributes
+     std::vector<CDomain*> domList = getDomains();
+     for (size_t i = 0; i < domList.size(); ++i)
+     {
+       std::map<int, StdSize> domAttBuffSize = domList[i]->getAttributesBufferSize(client);
+       for (it = domAttBuffSize.begin(), itE = domAttBuffSize.end(); it != itE; ++it)
+       {
+         it->second += 2 * sizeof(bool);
+         if (it->second > attributesSizes[it->first])
+           attributesSizes[it->first] = it->second;
+       }
+     }
+
+     return attributesSizes;
+  }
+   CATCH_DUMP_ATTR
+
+   /*!
+    * Compute the minimum buffer size required to send the data.
+    * \param client contextClient used to determine the size of connected receivers
+    * \param id the id used to tag the data
+    * \param bufferForWriting flag indicating if a buffer is used to send data for writing
+    * \return A map associating the sender rank with its minimum buffer size.
+    */
+   std::map<int, StdSize> CGrid::getDataBufferSize(CContextClient* client, const std::string& id /*= ""*/, bool bufferForWriting /*= "false"*/)
+   TRY
+   {     
+     // The record index is sometimes sent along with the data but we always
+     // include it in the size calculation for the sake of simplicity
+     const size_t extraSize = CEventClient::headerSize + (id.empty() ? getId() : id).size() 
+                                                       + 2 * sizeof(size_t) 
+                                                       + sizeof(size_t);
+
+     std::map<int, StdSize> dataSizes;
+     int receiverSize = client->serverSize;
+     std::map<int,size_t>& dataSizeMap = bufferForWriting ? connectedDataSize_[receiverSize]: connectedDataSizeRead_;
+     std::vector<int>& connectedServerRanks = bufferForWriting ? connectedServerRank_[receiverSize] : connectedServerRankRead_;
+
+     std::map<int, size_t>::const_iterator itEnd = dataSizeMap.end();
+     for (size_t k = 0; k < connectedServerRanks.size(); ++k)
+     {
+       int rank = connectedServerRanks[k];
+       std::map<int, size_t>::const_iterator it = dataSizeMap.find(rank);
+       size_t count = (it != itEnd) ? it->second : 0;
+
+       dataSizes.insert(std::make_pair(rank, extraSize + CArray<double,1>::size(count)));
+     }
+
+     return dataSizes;
+   }
+   CATCH_DUMP_ATTR
+
+   size_t CGrid::getGlobalWrittenSize(void)
+   TRY
+   {
+	 std::vector<CDomain*> domainP = this->getDomains();
+     std::vector<CAxis*> axisP = this->getAxis();
+     
+     size_t globalGridSize=1 ;
+     for (std::vector<CDomain*>::iterator it=domainP.begin(); it!=domainP.end();++it) globalGridSize*=(*it)->getGlobalWrittenSize() ;
+     for (std::vector<CAxis*>::iterator it=axisP.begin(); it!=axisP.end();++it) globalGridSize*=(*it)->getGlobalWrittenSize() ;
+     return globalGridSize ;
+   }
+   CATCH_DUMP_ATTR
+   
+   void CGrid::checkAttributesAfterTransformation()
+   TRY
+   {
+      setAxisList();
+      std::vector<CAxis*> axisListP = this->getAxis();
+      if (!axisListP.empty())
+      {
+        int idx = 0;
+        axisPositionInGrid_.resize(0);
+        for (int i = 0; i < axis_domain_order.numElements(); ++i)
+        {
+          int elementDimension = axis_domain_order(i);
+          if (1 == elementDimension)
+          {
+            axisPositionInGrid_.push_back(idx);
+            ++idx;
+          }
+          else if (2 == elementDimension) idx += 2;
+        }
+
+        for (int i = 0; i < axisListP.size(); ++i)
+        {
+          axisListP[i]->checkAttributesOnClientAfterTransformation(getGlobalDimension(),axisPositionInGrid_[i]);
+        }
+      }
+
+      setDomainList();
+      std::vector<CDomain*> domListP = this->getDomains();
+      if (!domListP.empty())
+      {
+        for (int i = 0; i < domListP.size(); ++i)
+        {
+          domListP[i]->checkAttributesOnClientAfterTransformation();
+        }
+      }
+   }
+   CATCH_DUMP_ATTR
+
+   //---------------------------------------------------------------
+
+   /*!
+    * Test whether the data defined on the grid can be outputted in a compressed way.
+    *
+    * \return true if and only if a mask was defined for this grid
+    */
+   bool CGrid::isCompressible(void) const
+   TRY
+   {
+      return isCompressible_;
+   }
+   CATCH
+
+   //---------------------------------------------------------------
+
+   void CGrid::addRelFileCompressed(const StdString& filename)
+   TRY
+   {
+      this->relFilesCompressed.insert(filename);
+   }
+   CATCH_DUMP_ATTR
+
+   bool CGrid::isWrittenCompressed(const StdString& filename) const
+   TRY
+   {
+      return (this->relFilesCompressed.find(filename) != this->relFilesCompressed.end());
+   }
+   CATCH
+
+   //---------------------------------------------------------------
+   /*
+     Find all reference of grid's components and inherite attributes if necessary
+   */
+   void CGrid::solveDomainAxisRef(bool areAttributesChecked)
+   TRY
+   {
+     if (this->isDomainAxisChecked) return;
+
+     this->solveScalarRef(areAttributesChecked);
+     this->solveAxisRef(areAttributesChecked);
+     this->solveDomainRef(areAttributesChecked);     
+     this->isDomainAxisChecked = areAttributesChecked;
+   }
+   CATCH_DUMP_ATTR
+
+   /*
+     Go up hierachy reference and fill in the base reference with attributes of the children
+     This function should be only used after reading component's attributes from file
+   */
+   void CGrid::solveDomainAxisBaseRef()
+   TRY
+   {
+     if (this->hasDomainAxisBaseRef_) return;
+     // Account for the scalar attributes
+     std::vector<CScalar*> scalarList = getScalars();
+     for (size_t i = 0; i < scalarList.size(); ++i)
+     {
+       scalarList[i]->setAttributesReference();
+     }
+
+     // Account for the axis attributes
+     std::vector<CAxis*> axisList = getAxis();
+     for (size_t i = 0; i < axisList.size(); ++i)
+     {
+       axisList[i]->setAttributesReference();
+     }
+
+     // Account for the domain attributes
+     std::vector<CDomain*> domList = getDomains();
+     for (size_t i = 0; i < domList.size(); ++i)
+     {
+       domList[i]->setAttributesReference();
+     }
+
+     this->hasDomainAxisBaseRef_ = true;
+   }
+   CATCH_DUMP_ATTR
+
+   void CGrid::checkEligibilityForCompressedOutput()
+   TRY
+   {
+     // We don't check if the mask is valid here, just if a mask has been defined at this point.
+     isCompressible_ = !mask_1d.isEmpty() || !mask_2d.isEmpty() || !mask_3d.isEmpty();
+   }
+   CATCH_DUMP_ATTR
+
+   void CGrid::checkMaskIndex(bool doSendingIndex)
+   TRY
+   {
+     CContext* context = CContext::getCurrent();
+     int nbSrvPools = (context->hasServer) ? (context->hasClient ? context->clientPrimServer.size() : 0) : 1;   
+     nbSrvPools = 1;  
+     for (int p = 0; p < nbSrvPools; ++p)
+     {    
+       if (context->hasClient && this->isChecked && doSendingIndex && !isIndexSent) 
+       { 
+         if (isScalarGrid())
+           sendIndexScalarGrid();
+         else
+           sendIndex();
+         this->isIndexSent = true; 
+       }
+
+       // Not sure about this
+       //if (!(this->hasTransform() && !this->isTransformed()))
+       // this->isChecked = true;
+       //return;
+     }
+    
+     if (this->isChecked) return;
+     this->checkAttributesAfterTransformation();
+
+     // TODO: Transfer grid attributes
+     //if (!context->hasClient && context->hasServer) this->createMask();
+     this->computeIndex();
+
+     if (!(this->hasTransform() && !this->isTransformed()))
+      this->isChecked = true;
+
+     if (!(this->hasTransform() && (!this->isGenerated())))
+      this->isChecked = true;
+   }
+   CATCH_DUMP_ATTR
+   bool CGrid::hasMask() const
+   TRY
+   {
+     return (!mask_1d.isEmpty() || !mask_2d.isEmpty() || !mask_3d.isEmpty() ||
+             !mask_4d.isEmpty() || !mask_5d.isEmpty() || !mask_6d.isEmpty() || !mask_7d.isEmpty());
+   }
+   CATCH
+
+   /*
+     Create mask of grid from mask of its components
+   */
+   void CGrid::createMask(void)
+   TRY
+   {
+      using namespace std;
+      std::vector<CDomain*> domainP = this->getDomains();
+      std::vector<CAxis*> axisP = this->getAxis();
+      int dim = domainP.size() * 2 + axisP.size();
+
+      std::vector<CArray<bool,1>* > domainMasks(domainP.size());
+      for (int i = 0; i < domainMasks.size(); ++i) domainMasks[i] = &(domainP[i]->domainMask);
+      std::vector<CArray<bool,1>* > axisMasks(axisP.size());
+      for (int i = 0; i < axisMasks.size(); ++i) axisMasks[i] = &(axisP[i]->mask);
+
+      switch (dim) {
+        case 1:
+          checkGridMask(mask_1d, domainMasks, axisMasks, axis_domain_order, true);
+          break;
+        case 2:
+          checkGridMask(mask_2d, domainMasks, axisMasks, axis_domain_order, true);
+          break;
+        case 3:
+          checkGridMask(mask_3d, domainMasks, axisMasks, axis_domain_order, true);
+          break;
+        case 4:
+          checkGridMask(mask_4d, domainMasks, axisMasks, axis_domain_order, true);
+          break;
+        case 5:
+          checkGridMask(mask_5d, domainMasks, axisMasks, axis_domain_order, true);
+          break;
+        case 6:
+          checkGridMask(mask_6d, domainMasks, axisMasks, axis_domain_order, true);
+          break;
+        case 7:
+          checkGridMask(mask_7d, domainMasks, axisMasks, axis_domain_order, true);
+          break;
+        default:
+          break;
+      }
+   }
+   CATCH_DUMP_ATTR
+
+   /*
+     Check validity of grid's mask by using the masks of its components
+   */
+   void CGrid::checkMask(void)
+   TRY
+   {
+      using namespace std;
+      std::vector<CDomain*> domainP = this->getDomains();
+      std::vector<CAxis*> axisP = this->getAxis();
+      int dim = domainP.size() * 2 + axisP.size();
+
+      std::vector<CArray<bool,1>* > domainMasks(domainP.size());
+      for (int i = 0; i < domainMasks.size(); ++i) domainMasks[i] = &(domainP[i]->domainMask);
+      std::vector<CArray<bool,1>* > axisMasks(axisP.size());
+      for (int i = 0; i < axisMasks.size(); ++i) axisMasks[i] = &(axisP[i]->mask);
+
+      switch (dim) {
+        case 1:
+          checkGridMask(mask_1d, domainMasks, axisMasks, axis_domain_order);
+          break;
+        case 2:
+          checkGridMask(mask_2d, domainMasks, axisMasks, axis_domain_order);
+          break;
+        case 3:
+          checkGridMask(mask_3d, domainMasks, axisMasks, axis_domain_order);
+          break;
+        case 4:
+          checkGridMask(mask_4d, domainMasks, axisMasks, axis_domain_order);
+          break;
+        case 5:
+          checkGridMask(mask_5d, domainMasks, axisMasks, axis_domain_order);
+          break;
+        case 6:
+          checkGridMask(mask_6d, domainMasks, axisMasks, axis_domain_order);
+          break;
+        case 7:
+          checkGridMask(mask_7d, domainMasks, axisMasks, axis_domain_order);
+          break;
+        default:
+          break;
+      }
+   }
+   CATCH_DUMP_ATTR
+
+   /*
+     Modify value of mask in a certain index
+     This function can be used to correct the mask of grid after being constructed with createMask
+     \param [in] indexToModify
+     \param [in] modifyValue
+   */
+   void CGrid::modifyMask(const CArray<int,1>& indexToModify, bool modifyValue)
+   TRY
+   {
+      using namespace std;
+      std::vector<CDomain*> domainP = this->getDomains();
+      std::vector<CAxis*> axisP = this->getAxis();
+      int dim = domainP.size() * 2 + axisP.size();
+
+      switch (dim) {
+        case 0:
+          modifyGridMask(mask_0d, indexToModify, modifyValue);
+          break;
+        case 1:
+          modifyGridMask(mask_1d, indexToModify, modifyValue);
+          break;
+        case 2:
+          modifyGridMask(mask_2d, indexToModify, modifyValue);
+          break;
+        case 3:
+          modifyGridMask(mask_3d, indexToModify, modifyValue);
+          break;
+        case 4:
+          modifyGridMask(mask_4d, indexToModify, modifyValue);
+          break;
+        case 5:
+          modifyGridMask(mask_5d, indexToModify, modifyValue);
+          break;
+        case 6:
+          modifyGridMask(mask_6d, indexToModify, modifyValue);
+          break;
+        case 7:
+          modifyGridMask(mask_7d, indexToModify, modifyValue);
+          break;
+        default:
+          break;
+      }
+   }
+   CATCH_DUMP_ATTR
+
+   /*
+     Change the mask size. This function is used on reconstructing mask in server side
+     \param [in] newDimensionSize
+     \param [in] newValue 
+   */
+   void CGrid::modifyMaskSize(const std::vector<int>& newDimensionSize, bool newValue)
+   TRY
+   {      
+      std::vector<CDomain*> domainP = this->getDomains();
+      std::vector<CAxis*> axisP = this->getAxis();            
+      int dim = domainP.size() * 2 + axisP.size();
+
+      switch (dim) {
+        case 0:
+          modifyGridMaskSize(mask_0d, newDimensionSize, newValue);
+          break;
+        case 1:
+          modifyGridMaskSize(mask_1d, newDimensionSize, newValue);
+          break;
+        case 2:
+          modifyGridMaskSize(mask_2d, newDimensionSize, newValue);
+          break;
+        case 3:
+          modifyGridMaskSize(mask_3d, newDimensionSize, newValue);
+          break;
+        case 4:
+          modifyGridMaskSize(mask_4d, newDimensionSize, newValue);
+          break;
+        case 5:
+          modifyGridMaskSize(mask_5d, newDimensionSize, newValue);
+          break;
+        case 6:
+          modifyGridMaskSize(mask_6d, newDimensionSize, newValue);
+          break;
+        case 7:
+          modifyGridMaskSize(mask_7d, newDimensionSize, newValue);
+          break;
+        default:
+          break;
+      }
+   }
+   CATCH_DUMP_ATTR
+
+   //---------------------------------------------------------------
+
+   void CGrid::solveDomainRef(bool sendAtt)
+   TRY
+   {
+      setDomainList();
+      std::vector<CDomain*> domListP = this->getDomains();
+      if (!domListP.empty())
+      {
+        for (int i = 0; i < domListP.size(); ++i)
+        {
+          if (sendAtt) domListP[i]->sendCheckedAttributes();
+          else domListP[i]->checkAttributesOnClient();
+        }
+      }
+   }
+   CATCH_DUMP_ATTR
+
+   //---------------------------------------------------------------
+
+   void CGrid::solveAxisRef(bool sendAtt)
+   TRY
+   {
+      setAxisList();
+      std::vector<CAxis*> axisListP = this->getAxis();
+      if (!axisListP.empty())
+      {
+        int idx = 0;
+        axisPositionInGrid_.resize(0);
+        for (int i = 0; i < axis_domain_order.numElements(); ++i)
+        {
+          int elementDimension = axis_domain_order(i);
+          if (1 == elementDimension)
+          {
+            axisPositionInGrid_.push_back(idx);
+            ++idx;
+          }
+          else if (2 == elementDimension) idx += 2;
+        }
+
+        for (int i = 0; i < axisListP.size(); ++i)
+        {
+          if (sendAtt)
+            axisListP[i]->sendCheckedAttributes(getGlobalDimension(),axisPositionInGrid_[i]);
+          else
+            axisListP[i]->checkAttributesOnClient();
+        }
+      }
+   }
+   CATCH_DUMP_ATTR
+
+   //---------------------------------------------------------------
+
+   void CGrid::solveScalarRef(bool sendAtt)
+   TRY
+   {
+      setScalarList();
+      std::vector<CScalar*> scalarListP = this->getScalars();
+      if (!scalarListP.empty())
+      {
+        for (int i = 0; i < scalarListP.size(); ++i)
+        {
+          /*Nothing to do for now */
+//          if (sendAtt) scalarListP[i]->sendCheckedAttributes();
+//          else scalarListP[i]->checkAttributesOnClient();
+        }
+      }
+   }
+   CATCH_DUMP_ATTR
+
+   /*!
+      Compute the index to for write data into a file
+   */
+   void CGrid::computeWrittenIndex()
+   TRY
+   {      
+      if (computedWrittenIndex_) return;
+      computedWrittenIndex_ = true;
+
+      if (isScalarGrid())
+      {
+        size_t nbWritten = 1;
+        int writtenIndex = 0;
+
+        localIndexToWriteOnClient.resize(nbWritten);  
+        localIndexToWriteOnServer.resize(nbWritten);
+        localIndexToWriteOnServer(0) = writtenIndex;
+        localIndexToWriteOnClient(0) = writtenIndex;
+        
+        return;
+      }
+
+      size_t nbWritten = 0, indGlo;
+      CDistributionClient::GlobalLocalDataMap& globalDataIndex = clientDistribution_->getGlobalDataIndexOnClient();
+      CDistributionClient::GlobalLocalDataMap::const_iterator itb = globalDataIndex.begin(),
+                                                              ite = globalDataIndex.end(), it;    
+      const CDistributionServer::GlobalLocalMap& globalLocalIndex = serverDistribution_->getGlobalLocalIndex();                                                              
+      CDistributionServer::GlobalLocalMap::const_iterator itSrvb = globalLocalIndex.begin(),
+                                                          itSrve = globalLocalIndex.end(), itSrv;
+      for (it = itb; it != ite; ++it)
+      {
+        indGlo = it->first;
+        if (globalLocalIndex.end() != globalLocalIndex.find(indGlo)) ++nbWritten;                
+      }
+
+      localIndexToWriteOnClient.resize(nbWritten);  
+      localIndexToWriteOnServer.resize(nbWritten);
+      
+      {
+        numberWrittenIndexes_ = nbWritten;
+        if (isDataDistributed_)
+        {
+          CContextServer* server = CContext::getCurrent()->server;      
+          MPI_Allreduce(&numberWrittenIndexes_, &totalNumberWrittenIndexes_, 1, MPI_INT, MPI_SUM, server->intraComm);
+          MPI_Scan(&numberWrittenIndexes_, &offsetWrittenIndexes_, 1, MPI_INT, MPI_SUM, server->intraComm);
+          offsetWrittenIndexes_ -= numberWrittenIndexes_;
+        }
+        else
+          totalNumberWrittenIndexes_ = numberWrittenIndexes_;
+      }
+
+      nbWritten = 0; 
+      for (it = itb; it != ite; ++it)
+      {
+        indGlo = it->first;
+        itSrv = globalLocalIndex.find(indGlo);
+        if (itSrve != itSrv)
+        {
+          localIndexToWriteOnServer(nbWritten) = itSrv->second;
+          localIndexToWriteOnClient(nbWritten) = it->second;
+          ++nbWritten;                
+        } 
+      }
+   }
+   CATCH_DUMP_ATTR
+
+   //---------------------------------------------------------------
+
+   /*
+     Compute the global index and its local index taking account mask and data index.
+     These global indexes will be used to compute the connection of this client (sender) to its servers (receivers)
+     (via function computeConnectedClient)
+     These global indexes also correspond to data sent to servers (if any)
+   */
+   void CGrid::computeClientIndex()
+   TRY
+   {
+     CContext* context = CContext::getCurrent();
+
+     CContextClient* client = context->client;
+     int rank = client->clientRank;
+
+     clientDistribution_ = new CDistributionClient(rank, this);
+     // Get local data index on client
+     int nbStoreIndex = clientDistribution_->getLocalDataIndexOnClient().size();
+     int nbStoreGridMask = clientDistribution_->getLocalMaskIndexOnClient().size();
+     // nbStoreGridMask = nbStoreIndex if grid mask is defined, and 0 otherwise
+     storeIndex_client.resize(nbStoreIndex);
+     storeMask_client.resize(nbStoreGridMask);
+     for (int idx = 0; idx < nbStoreIndex; ++idx) storeIndex_client(idx) = (clientDistribution_->getLocalDataIndexOnClient())[idx];
+     for (int idx = 0; idx < nbStoreGridMask; ++idx) storeMask_client(idx) = (clientDistribution_->getLocalMaskIndexOnClient())[idx];
+
+     if (0 == serverDistribution_) isDataDistributed_= clientDistribution_->isDataDistributed();
+     else
+     {
+        // Mapping global index received from clients to the storeIndex_client
+        CDistributionClient::GlobalLocalDataMap& globalDataIndex = clientDistribution_->getGlobalDataIndexOnClient();
+        CDistributionClient::GlobalLocalDataMap::const_iterator itGloe = globalDataIndex.end();
+        map<int, CArray<size_t, 1> >::iterator itb = outGlobalIndexFromClient.begin(),
+                                               ite = outGlobalIndexFromClient.end(), it;
+
+        for (it = itb; it != ite; ++it)
+        {
+          int rank = it->first;
+          CArray<size_t,1>& globalIndex = outGlobalIndexFromClient[rank];
+          outLocalIndexStoreOnClient.insert(make_pair(rank, CArray<size_t,1>(globalIndex.numElements())));
+          CArray<size_t,1>& localIndex = outLocalIndexStoreOnClient[rank];
+          size_t nbIndex = 0;
+
+          // Keep this code for this moment but it should be removed (or moved to DEBUG) to improve performance
+          for (size_t idx = 0; idx < globalIndex.numElements(); ++idx)
+          {
+            if (itGloe != globalDataIndex.find(globalIndex(idx)))
+            {
+              ++nbIndex;
+            }
+          }
+
+          if (doGridHaveDataDistributed(client) && (nbIndex != localIndex.numElements()))
+               ERROR("void CGrid::computeClientIndex()",
+                  << "Number of local index on client is different from number of received global index"
+                  << "Rank of sent client " << rank <<"."
+                  << "Number of local index " << nbIndex << ". "
+                  << "Number of received global index " << localIndex.numElements() << ".");
+
+          nbIndex = 0;
+          for (size_t idx = 0; idx < globalIndex.numElements(); ++idx)
+          {
+            if (itGloe != globalDataIndex.find(globalIndex(idx)))
+            {
+              localIndex(idx) = globalDataIndex[globalIndex(idx)];
+            }
+          }
+        }
+      }
+   }
+   CATCH_DUMP_ATTR
+
+   /*!
+     Compute connected receivers and indexes to be sent to these receivers.
+   */
+   void CGrid::computeConnectedClients()
+   TRY
+   {
+     CContext* context = CContext::getCurrent();
+     int nbSrvPools = (context->clientPrimServer.size() == 0) ? 1 : context->clientPrimServer.size();
+     connectedServerRank_.clear();
+     connectedDataSize_.clear();
+     globalIndexOnServer_.clear();
+     nbSenders.clear();
+
+     for (int p = 0; p < nbSrvPools; ++p)
+     {
+       CContextClient* client = (context->clientPrimServer.size() == 0) ? context->client : context->clientPrimServer[p];
+       int receiverSize = client->serverSize;
+//       connectedServerRank_[client].clear();
+
+       if (connectedServerRank_.find(receiverSize) == connectedServerRank_.end())
+       {
+        if (!doGridHaveDataDistributed(client))
+         {
+            if (client->isServerLeader())
+            {
+              size_t ssize = clientDistribution_->getLocalDataIndexOnClient().size();
+              const std::list<int>& ranks = client->getRanksServerLeader();
+              for (std::list<int>::const_iterator itRank = ranks.begin(), itRankEnd = ranks.end(); itRank != itRankEnd; ++itRank)
+              {
+                connectedServerRank_[receiverSize].push_back(*itRank);
+                connectedDataSize_[receiverSize][*itRank] = ssize;
+              }
+            }
+            return;
+         }
+
+         // Compute mapping between client and server
+         std::vector<std::unordered_map<size_t,std::vector<int> > > indexServerOnElement;
+         CServerDistributionDescription serverDistributionDescription(getGlobalDimension(), client->serverSize);
+         std::vector<int> serverZeroIndex = serverDistributionDescription.computeServerGlobalByElement(indexServerOnElement,
+                                                                                                    client->clientRank,
+                                                                                                    client->clientSize,
+                                                                                                    axis_domain_order,
+                                                                                                    getDistributedDimension());
+
+         // Even if servers have no index, they must received something from client
+         // We only use several client to send "empty" message to these servers
+         std::list<int> serverZeroIndexLeader;
+         std::list<int> serverZeroIndexNotLeader;
+         CContextClient::computeLeader(client->clientRank, client->clientSize, serverZeroIndex.size(), serverZeroIndexLeader, serverZeroIndexNotLeader);
+         for (std::list<int>::iterator it = serverZeroIndexLeader.begin(); it != serverZeroIndexLeader.end(); ++it)
+           *it = serverZeroIndex[*it];
+
+         if (globalIndexOnServer_.find(receiverSize) == globalIndexOnServer_.end())
+           computeIndexByElement(indexServerOnElement, client, globalIndexOnServer_[receiverSize]);
+
+         const CDistributionClient::GlobalLocalDataMap& globalLocalIndexSendToServer = clientDistribution_->getGlobalLocalDataSendToServer();
+         CDistributionClient::GlobalLocalDataMap::const_iterator iteGlobalLocalIndexMap = globalLocalIndexSendToServer.end(), itGlobalLocalIndexMap;
+         CClientServerMapping::GlobalIndexMap::const_iterator iteGlobalMap, itbGlobalMap, itGlobalMap;
+         itbGlobalMap = globalIndexOnServer_[receiverSize].begin();
+         iteGlobalMap = globalIndexOnServer_[receiverSize].end();
+
+         for (itGlobalMap  = itbGlobalMap; itGlobalMap != iteGlobalMap; ++itGlobalMap)
+         {
+           int serverRank = itGlobalMap->first;
+           int indexSize = itGlobalMap->second.size();
+           const std::vector<size_t>& indexVec = itGlobalMap->second;
+           for (int idx = 0; idx < indexSize; ++idx)
+           {
+              itGlobalLocalIndexMap = globalLocalIndexSendToServer.find(indexVec[idx]);
+              if (iteGlobalLocalIndexMap != itGlobalLocalIndexMap)
+              {
+                if (connectedDataSize_[receiverSize].end() == connectedDataSize_[receiverSize].find(serverRank))
+                  connectedDataSize_[receiverSize][serverRank] = 1;
+                else
+                  ++connectedDataSize_[receiverSize][serverRank];
+              }
+           }
+         }
+
+         // Connected servers which really have index
+         for (itGlobalMap = itbGlobalMap; itGlobalMap != iteGlobalMap; ++itGlobalMap) {
+           connectedServerRank_[receiverSize].push_back(itGlobalMap->first);
+         }
+
+         // Connected servers which have no index at all
+         for (std::list<int>::iterator it = serverZeroIndexLeader.begin(); it != serverZeroIndexLeader.end(); ++it)
+           connectedServerRank_[receiverSize].push_back(*it);
+
+         // Even if a client has no index, it must connect to at least one server and
+         // send an "empty" data to this server
+         if (connectedServerRank_[receiverSize].empty())
+          connectedServerRank_[receiverSize].push_back(client->clientRank % client->serverSize);
+
+         // Now check if all servers have data to receive. If not, master client will send empty data.
+         // This ensures that all servers will participate in collective calls upon receiving even if they have no date to receive.
+         std::vector<int> counts (client->clientSize);
+         std::vector<int> displs (client->clientSize);
+         displs[0] = 0;
+         int localCount = connectedServerRank_[receiverSize].size() ;
+         MPI_Gather(&localCount, 1, MPI_INT, &counts[0], 1, MPI_INT, 0, client->intraComm) ;
+         for (int i = 0; i < client->clientSize-1; ++i)
+         {
+           displs[i+1] = displs[i] + counts[i];
+         }
+         std::vector<int> allConnectedServers(displs[client->clientSize-1]+counts[client->clientSize-1]);
+         MPI_Gatherv(&(connectedServerRank_[receiverSize])[0], localCount, MPI_INT, &allConnectedServers[0], &counts[0], &displs[0], MPI_INT, 0, client->intraComm);
+
+         if ((allConnectedServers.size() != receiverSize) && (client->clientRank == 0))
+         {
+           std::vector<bool> isSrvConnected (receiverSize, false);
+           for (int i = 0; i < allConnectedServers.size(); ++i) isSrvConnected[allConnectedServers[i]] = true;
+           for (int i = 0; i < receiverSize; ++i)
+           {
+             if (!isSrvConnected[i]) connectedServerRank_[receiverSize].push_back(i);
+           }
+         }
+
+         nbSenders[receiverSize] = clientServerMap_->computeConnectedClients(receiverSize, client->clientSize, client->intraComm, connectedServerRank_[receiverSize]);
+       }
+     }
+   }
+   CATCH_DUMP_ATTR
+
+   /*!
+     Compute the global index of grid to send to server as well as the connected server of the current client.
+     First of all, from the local data on each element of grid, we can calculate their local index which also allows us to know
+     their global index. We can have a map of global index of grid and local index that each client holds
+     Then, each client holds a piece of information about the distribution of servers, which permits to compute the connected server(s)
+     of the current client.
+   */
+   void CGrid::computeIndex(void)
+   TRY
+   {
+     CContext* context = CContext::getCurrent();
+     if (isScalarGrid())
+     {
+       computeClientIndexScalarGrid();
+       if (context->hasClient)
+       {
+         computeConnectedClientsScalarGrid();
+       }
+     }
+     else
+     {
+       computeClientIndex();
+       if (context->hasClient)
+       {
+         computeConnectedClients();
+       }
+     }
+     if (CServer::serverLevel==2)
+     {
+       computeWrittenIndex() ;
+       if (serverDistribution_!=0) serverDistribution_->partialClear() ;
+       if (clientDistribution_!=0) clientDistribution_->partialClear() ;
+       outGlobalIndexFromClient.clear() ;
+     }
+   }
+   CATCH_DUMP_ATTR
+
+   /*!
+      Compute the global of (client) grid to send to server with the global index of each element of grid
+      Each element of grid has its own global index associated to a groups of server. We only search for the global index of each element whose
+      server is the same, then calculate the global index of grid. This way can reduce so much the time for executing DHT, which only needs to run
+      on each element whose size is much smaller than one of whole grid.
+      \param [in] indexServerOnElement global index of each element and the rank of server associated with these index
+      \param [in] client contextClient
+      \param [out] globalIndexOnServer global index of grid and its corresponding rank of server.
+   */
+   void CGrid::computeIndexByElement(const std::vector<std::unordered_map<size_t,std::vector<int> > >& indexServerOnElement,
+                                     const CContextClient* client,
+                                     CClientServerMapping::GlobalIndexMap& globalIndexOnServer)
+   TRY
+   {
+     int serverSize = client->serverSize;
+
+     std::vector<CDomain*> domList = getDomains();
+     std::vector<CAxis*> axisList = getAxis();
+
+     // Some pre-calculations of global index on each element of current grid.
+     int nbElement = axis_domain_order.numElements();
+     std::vector<CArray<size_t,1> > globalIndexElement(nbElement);
+     int domainIdx = 0, axisIdx = 0, scalarIdx = 0;
+     std::vector<size_t> elementNGlobal(nbElement);
+     elementNGlobal[0] = 1;
+     size_t globalSize = 1;
+     for (int idx = 0; idx < nbElement; ++idx)
+     {
+       elementNGlobal[idx] = globalSize;
+       size_t elementSize;
+       size_t elementGlobalSize = 1;
+       if (2 == axis_domain_order(idx)) // This is domain
+       {
+         elementSize = domList[domainIdx]->i_index.numElements();
+         globalIndexElement[idx].resize(elementSize);
+         for (int jdx = 0; jdx < elementSize; ++jdx)
+         {
+           globalIndexElement[idx](jdx) = (domList[domainIdx]->i_index)(jdx) + domList[domainIdx]->ni_glo * (domList[domainIdx]->j_index)(jdx);
+         }
+         elementGlobalSize = domList[domainIdx]->ni_glo.getValue() * domList[domainIdx]->nj_glo.getValue();
+         ++domainIdx;
+       }
+       else if (1 == axis_domain_order(idx))  // This is axis
+       {
+         elementSize = axisList[axisIdx]->index.numElements();
+         globalIndexElement[idx].resize(elementSize);
+         for (int jdx = 0; jdx < elementSize; ++jdx)
+         {
+           globalIndexElement[idx](jdx) = (axisList[axisIdx]->index)(jdx);
+         }
+         elementGlobalSize = axisList[axisIdx]->n_glo.getValue();
+         ++axisIdx;
+       }
+       else  // Of course, this is scalar
+       {
+         globalIndexElement[idx].resize(1);
+         globalIndexElement[idx](0) = 0;
+         elementGlobalSize = 1;
+       }
+       globalSize *= elementGlobalSize;
+     }
+
+     std::vector<std::vector<bool> > elementOnServer(nbElement, std::vector<bool>(serverSize, false));
+     std::vector<std::unordered_map<int,std::vector<size_t> > > globalElementIndexOnServer(nbElement);
+     CArray<int,1> nbIndexOnServer(serverSize); // Number of distributed global index held by each client for each server
+     // Number of temporary distributed global index held by each client for each server
+     // We have this variable for the case of non-distributed element (often axis) to check the duplicate server rank
+     CArray<int,1> nbIndexOnServerTmp(serverSize);
+     for (int idx = 0; idx < nbElement; ++idx)
+     {
+       nbIndexOnServer = 0;
+       const std::unordered_map<size_t,std::vector<int> >& indexServerElement = indexServerOnElement[idx];
+       const CArray<size_t,1>& globalIndexElementOnClient = globalIndexElement[idx];
+       CClientClientDHTInt clientClientDHT(indexServerElement, client->intraComm);
+       clientClientDHT.computeIndexInfoMapping(globalIndexElementOnClient);
+       const CClientClientDHTInt::Index2VectorInfoTypeMap& globalIndexElementOnServerMap = clientClientDHT.getInfoIndexMap();
+       CClientClientDHTInt::Index2VectorInfoTypeMap::const_iterator itb = globalIndexElementOnServerMap.begin(),
+                                                                    ite = globalIndexElementOnServerMap.end(), it;
+       for (it = itb; it != ite; ++it)
+       {
+         const std::vector<int>& tmp = it->second;
+         nbIndexOnServerTmp = 0;
+         for (int i = 0; i < tmp.size(); ++i)
+         {
+           if (0 == nbIndexOnServerTmp(tmp[i])) ++nbIndexOnServerTmp(tmp[i]);
+         }
+         nbIndexOnServer += nbIndexOnServerTmp;
+       }
+
+       for (int i = 0; i < serverSize; ++i)
+       {
+         if (0 != nbIndexOnServer(i))
+         {
+           globalElementIndexOnServer[idx][i].resize(nbIndexOnServer(i));
+           elementOnServer[idx][i] = true;
+         }
+       }
+
+     nbIndexOnServer = 0;
+     for (size_t j = 0; j < globalIndexElementOnServerMap.size(); ++j)
+     {
+       it = globalIndexElementOnServerMap.find(globalIndexElementOnClient(j));
+       if (it != ite)
+       {
+         const std::vector<int>& tmp = it->second;
+         nbIndexOnServerTmp = 0;
+         for (int i = 0; i < tmp.size(); ++i)
+         {
+           if (0 == nbIndexOnServerTmp(tmp[i]))
+           {
+             globalElementIndexOnServer[idx][tmp[i]][nbIndexOnServer(tmp[i])] = it->first;
+             ++nbIndexOnServerTmp(tmp[i]);
+           }
+         }
+         nbIndexOnServer += nbIndexOnServerTmp;
+       }
+     }
+   }
+
+    // Determine server which contain global source index
+    std::vector<bool> intersectedProc(serverSize, true);
+    for (int idx = 0; idx < nbElement; ++idx)
+    {
+      std::transform(elementOnServer[idx].begin(), elementOnServer[idx].end(),
+                     intersectedProc.begin(), intersectedProc.begin(),
+                     std::logical_and<bool>());
+    }
+
+    std::vector<int> srcRank;
+    for (int idx = 0; idx < serverSize; ++idx)
+    {
+      if (intersectedProc[idx]) srcRank.push_back(idx);
+    }
+
+    // Compute the global index of grid from global index of each element.
+    for (int i = 0; i < srcRank.size(); ++i)
+    {
+      size_t ssize = 1;
+      int rankSrc = srcRank[i];
+      std::vector<std::vector<size_t>* > globalIndexOfElementTmp(nbElement);
+      std::vector<size_t> currentIndex(nbElement,0);
+      for (int idx = 0; idx < nbElement; ++idx)
+      {
+        ssize *= (globalElementIndexOnServer[idx][rankSrc]).size();
+        globalIndexOfElementTmp[idx] = &(globalElementIndexOnServer[idx][rankSrc]);
+      }
+      globalIndexOnServer[rankSrc].resize(ssize);
+
+      std::vector<int> idxLoop(nbElement,0);
+      int innnerLoopSize = (globalIndexOfElementTmp[0])->size();
+      size_t idx = 0;
+      while (idx < ssize)
+      {
+        for (int ind = 0; ind < nbElement; ++ind)
+        {
+          if (idxLoop[ind] == (globalIndexOfElementTmp[ind])->size())
+          {
+            idxLoop[ind] = 0;
+            ++idxLoop[ind+1];
+          }
+
+          currentIndex[ind] = (*(globalIndexOfElementTmp[ind]))[idxLoop[ind]];
+        }
+
+        for (int ind = 0; ind < innnerLoopSize; ++ind)
+        {
+          currentIndex[0] = (*globalIndexOfElementTmp[0])[ind];
+          size_t globalSrcIndex = 0;
+          for (int idxElement = 0; idxElement < nbElement; ++idxElement)
+          {
+            globalSrcIndex += currentIndex[idxElement] * elementNGlobal[idxElement];
+          }
+          globalIndexOnServer[rankSrc][idx] = globalSrcIndex;
+          ++idx;
+          ++idxLoop[0];
+        }
+      }
+    }
+   }
+   CATCH_DUMP_ATTR
+//----------------------------------------------------------------
+
+   CGrid* CGrid::createGrid(CDomain* domain)
+   TRY
+   {
+      std::vector<CDomain*> vecDom(1, domain);
+      std::vector<CAxis*> vecAxis;
+
+      return createGrid(vecDom, vecAxis);
+   }
+   CATCH
+
+   CGrid* CGrid::createGrid(CDomain* domain, CAxis* axis)
+   TRY
+  {
+      std::vector<CDomain*> vecDom(1, domain);
+      std::vector<CAxis*> vecAxis(1, axis);
+
+      return createGrid(vecDom, vecAxis);
+   }
+   CATCH
+
+   CGrid* CGrid::createGrid(const std::vector<CDomain*>& domains, const std::vector<CAxis*>& axis,
+                            const CArray<int,1>& axisDomainOrder)
+   TRY
+   {
+     std::vector<CScalar*> vecScalar;
+     return createGrid(generateId(domains, axis, vecScalar, axisDomainOrder), domains, axis, vecScalar, axisDomainOrder);
+   }
+   CATCH
+
+   CGrid* CGrid::createGrid(const std::vector<CDomain*>& domains, const std::vector<CAxis*>& axis,
+                            const std::vector<CScalar*>& scalars, const CArray<int,1>& axisDomainOrder)
+   TRY
+   {
+     return createGrid(generateId(domains, axis, scalars, axisDomainOrder), domains, axis, scalars, axisDomainOrder);
+   }
+   CATCH
+
+   CGrid* CGrid::createGrid(StdString id, const std::vector<CDomain*>& domains, const std::vector<CAxis*>& axis,
+                            const std::vector<CScalar*>& scalars, const CArray<int,1>& axisDomainOrder)
+   TRY
+   {
+      if (axisDomainOrder.numElements() > 0 && axisDomainOrder.numElements() != (domains.size() + axis.size() + scalars.size()))
+        ERROR("CGrid* CGrid::createGrid(...)",
+              << "The size of axisDomainOrder (" << axisDomainOrder.numElements()
+              << ") is not coherent with the number of elements (" << domains.size() + axis.size() <<").");
+
+      CGrid* grid = CGridGroup::get("grid_definition")->createChild(id);
+      grid->setDomainList(domains);
+      grid->setAxisList(axis);
+      grid->setScalarList(scalars);
+
+      // By default, domains are always the first elements of a grid
+      if (0 == axisDomainOrder.numElements())
+      {
+        int size = domains.size() + axis.size() + scalars.size();
+        int nb = 0;
+        grid->axis_domain_order.resize(size);
+        for (int i = 0; i < size; ++i)
+        {
+          if (i < domains.size()) {
+            grid->axis_domain_order(i) = 2;
+
+          }
+          else if ((scalars.size() < (size-nb)) < size) {
+            grid->axis_domain_order(i) = 1;
+          }
+          else
+            grid->axis_domain_order(i) = 0;
+          ++nb;
+        }
+      }
+      else
+      {
+        grid->axis_domain_order.resize(axisDomainOrder.numElements());
+        grid->axis_domain_order = axisDomainOrder;
+      }
+
+      grid->solveDomainAxisRefInheritance(true);
+
+      return grid;
+   }
+   CATCH
+
+   CGrid* CGrid::cloneGrid(const StdString& idNewGrid, CGrid* gridSrc)
+   TRY
+   {
+     std::vector<CDomain*> domainSrcTmp = gridSrc->getDomains(), domainSrc;
+     std::vector<CAxis*> axisSrcTmp = gridSrc->getAxis(), axisSrc;
+     std::vector<CScalar*> scalarSrcTmp = gridSrc->getScalars(), scalarSrc;
+
+     for (int idx = 0; idx < domainSrcTmp.size(); ++idx)
+     {
+       CDomain* domain = CDomain::createDomain();
+       domain->duplicateAttributes(domainSrcTmp[idx]);
+       domain->duplicateTransformation(domainSrcTmp[idx]);
+       domain->solveRefInheritance(true);
+       domain->solveInheritanceTransformation();
+       domainSrc.push_back(domain);
+     }
+
+     for (int idx = 0; idx < axisSrcTmp.size(); ++idx)
+     {
+       CAxis* axis = CAxis::createAxis();
+       axis->duplicateAttributes(axisSrcTmp[idx]);
+       axis->duplicateTransformation(axisSrcTmp[idx]);
+       axis->solveRefInheritance(true);
+       axis->solveInheritanceTransformation();
+       axisSrc.push_back(axis);
+     }
+
+     for (int idx = 0; idx < scalarSrcTmp.size(); ++idx)
+     {
+       CScalar* scalar = CScalar::createScalar();
+       scalar->duplicateAttributes(scalarSrcTmp[idx]);
+       scalar->duplicateTransformation(scalarSrcTmp[idx]);
+       scalar->solveRefInheritance(true);
+       scalar->solveInheritanceTransformation();
+       scalarSrc.push_back(scalar);
+     }
+
+      CGrid* grid = CGrid::createGrid(idNewGrid, domainSrc, axisSrc, scalarSrc, gridSrc->axis_domain_order);
+
+      return grid;
+   }
+   CATCH
+
+   StdString CGrid::generateId(const std::vector<CDomain*>& domains, const std::vector<CAxis*>& axis,
+                               const std::vector<CScalar*>& scalars, const CArray<int,1>& axisDomainOrder)
+   TRY
+   {
+      if (axisDomainOrder.numElements() > 0 && axisDomainOrder.numElements() != (domains.size() + axis.size() + scalars.size()))
+        ERROR("CGrid* CGrid::generateId(...)",
+              << "The size of axisDomainOrder (" << axisDomainOrder.numElements()
+              << ") is not coherent with the number of elements (" << domains.size() + axis.size() <<").");
+
+      std::ostringstream id;
+
+      if (domains.empty() && axis.empty() && !scalars.empty())
+        id << "__scalar_";
+
+      if (0 != (domains.size() + axis.size() + scalars.size()))
+      {
+        id << "__grid";
+
+        if (0 == axisDomainOrder.numElements())
+        {
+          for (size_t i = 0; i < domains.size(); ++i) id << "_" << domains[i]->getId();
+          for (size_t i = 0; i < axis.size(); ++i) id << "_" << axis[i]->getId();
+          for (size_t i = 0; i < scalars.size(); ++i) id << "_" << scalars[i]->getId();
+        }
+        else
+        {
+          size_t iDomain = 0, iAxis = 0, iScalar = 0;
+          for (size_t i = 0; i < axisDomainOrder.numElements(); ++i)
+          {
+            if (2 == axisDomainOrder(i))
+              id << "_" << domains[iDomain++]->getId();
+            else if (1 == axisDomainOrder(i))
+              id << "_" << axis[iAxis++]->getId();
+            else
+              id << "_" << scalars[iScalar++]->getId();
+          }
+        }
+
+        id << "__";
+      }
+
+      return id.str();
+   }
+   CATCH
+
+   StdString CGrid::generateId(const CGrid* gridSrc, const CGrid* gridDest)
+   TRY
+   {
+     StdString idSrc  = gridSrc->getId();
+     StdString idDest = gridDest->getId();
+
+     std::ostringstream id;
+     id << idSrc << "__" << idDest;
+
+     return id.str();
+   }
+   CATCH
+
+   //----------------------------------------------------------------
+
+   CDomainGroup* CGrid::getVirtualDomainGroup() const
+   TRY
+   {
+     return this->vDomainGroup_;
+   }
+   CATCH
+
+   CAxisGroup* CGrid::getVirtualAxisGroup() const
+   TRY
+   {
+     return this->vAxisGroup_;
+   }
+   CATCH
+
+   CScalarGroup* CGrid::getVirtualScalarGroup() const
+   TRY
+   {
+     return this->vScalarGroup_;
+   }
+   CATCH
+
+/*
+   void CGrid::outputField(int rank, const CArray<double, 1>& stored, double* field)
+   {
+     const CArray<size_t,1>& out_i = outIndexFromClient[rank];
+     StdSize numElements = stored.numElements();
+     for (StdSize n = 0; n < numElements; ++n)
+     {
+       field[out_i(n)] = stored(n);
+     }
+   }
+
+   void CGrid::inputField(int rank, const double* const field, CArray<double,1>& stored)
+   {
+     const CArray<size_t,1>& out_i = outIndexFromClient[rank];
+     StdSize numElements = stored.numElements();
+     for (StdSize n = 0; n < numElements; ++n)
+     {
+       stored(n) = field[out_i(n)];
+     }
+   }
+
+   void CGrid::outputCompressedField(int rank, const CArray<double,1>& stored, double* field)
+   {
+     const CArray<size_t,1>& out_i = compressedOutIndexFromClient[rank];
+     StdSize numElements = stored.numElements();
+     for (StdSize n = 0; n < numElements; ++n)
+     {
+       field[out_i(n)] = stored(n);
+     }
+   }
+*/
+   //----------------------------------------------------------------
+
+   void CGrid::storeField_arr(const double* const data, CArray<double, 1>& stored) const
+   TRY
+   {
+      const StdSize size = storeIndex_client.numElements();
+
+      stored.resize(size);
+      for(StdSize i = 0; i < size; i++) stored(i) = data[storeIndex_client(i)];
+   }
+   CATCH
+
+   void CGrid::restoreField_arr(const CArray<double, 1>& stored, double* const data) const
+   TRY
+   {
+      const StdSize size = storeIndex_client.numElements();
+
+      for(StdSize i = 0; i < size; i++) data[storeIndex_client(i)] = stored(i);
+   }
+   CATCH
+
+   void CGrid::maskField_arr(const double* const data, CArray<double, 1>& stored) const
+   {
+      const StdSize size = storeIndex_client.numElements();
+      stored.resize(size);
+      const double nanValue = std::numeric_limits<double>::quiet_NaN();
+
+      if (storeMask_client.numElements() != 0)
+        for(StdSize i = 0; i < size; i++) stored(i) = (storeMask_client(i)) ? data[storeIndex_client(i)] : nanValue;
+      else
+        for(StdSize i = 0; i < size; i++) stored(i) = data[storeIndex_client(i)];
+   }
+
+   void CGrid::uncompressField_arr(const double* const data, CArray<double, 1>& out) const
+   TRY
+   {
+      const std::vector<int>& localMaskedDataIndex = clientDistribution_->getLocalMaskedDataIndexOnClient();
+      const int size = localMaskedDataIndex.size();
+      for(int i = 0; i < size; ++i) out(localMaskedDataIndex[i]) = data[i];
+   }
+   CATCH
+
+  void CGrid::computeClientIndexScalarGrid()
+  TRY
+  {
+    CContext* context = CContext::getCurrent();    
+    {
+      CContextClient* client = context->client;
+
+      int rank = client->clientRank;
+
+      clientDistribution_ = new CDistributionClient(rank, this);
+
+      storeIndex_client.resize(1);
+      storeIndex_client(0) = 0;      
+
+      if (0 != serverDistribution_)
+      {
+        map<int, CArray<size_t, 1> >::iterator itb = outGlobalIndexFromClient.begin(),
+                                               ite = outGlobalIndexFromClient.end(), it;
+        for (it = itb; it != ite; ++it)
+        {
+          int rank = it->first;
+          CArray<size_t,1>& globalIndex = outGlobalIndexFromClient[rank];
+          outLocalIndexStoreOnClient.insert(make_pair(rank, CArray<size_t,1>(globalIndex.numElements())));
+          CArray<size_t,1>& localIndex = outLocalIndexStoreOnClient[rank];
+          if (1 != globalIndex.numElements())
+            ERROR("void CGrid::computeClientIndexScalarGrid()",
+              << "Something wrong happened. "
+              << "Number of received global index on scalar grid should equal to 1" 
+              << "Number of received global index " << globalIndex.numElements() << ".");
+
+          localIndex(0) = globalIndex(0);
+        }
+      }
+    }
+  }
+  CATCH_DUMP_ATTR
+
+  void CGrid::computeConnectedClientsScalarGrid()
+  TRY
+  {
+    CContext* context = CContext::getCurrent();    
+    int nbSrvPools = (context->clientPrimServer.size()==0) ? 1 : context->clientPrimServer.size();
+    connectedServerRank_.clear();
+    connectedDataSize_.clear();
+    nbSenders.clear();
+
+    for (int p = 0; p < nbSrvPools; ++p)
+    {
+      CContextClient* client = (context->clientPrimServer.size()==0) ? context->client : context->clientPrimServer[p];
+      int receiverSize = client->serverSize;
+
+//      connectedServerRank_[client].clear();
+
+      if (connectedServerRank_.find(receiverSize)==connectedServerRank_.end())
+      {
+        if (client->isServerLeader())
+        {
+          const std::list<int>& ranks = client->getRanksServerLeader();
+          for (std::list<int>::const_iterator itRank = ranks.begin(), itRankEnd = ranks.end(); itRank != itRankEnd; ++itRank)
+          {
+            int rank = *itRank;
+            int nb = 1;
+            connectedServerRank_[receiverSize].push_back(rank);
+            connectedDataSize_[receiverSize][rank] = nb;
+            nbSenders[receiverSize][rank] = nb;
+          }
+        }
+        else
+        {
+          const std::list<int>& ranks = client->getRanksServerNotLeader();
+          for (std::list<int>::const_iterator itRank = ranks.begin(), itRankEnd = ranks.end(); itRank != itRankEnd; ++itRank)
+          {
+            int rank = *itRank;
+            int nb = 1;
+            connectedServerRank_[receiverSize].push_back(rank);
+            connectedDataSize_[receiverSize][rank] = nb;
+            nbSenders[receiverSize][rank] = nb;
+          }
+        }
+      }
+      isDataDistributed_ = false;
+    }
+  }
+  CATCH_DUMP_ATTR
+
+  void CGrid::sendIndexScalarGrid()
+  TRY
+  {
+    CContext* context = CContext::getCurrent();
+    storeIndex_toSrv.clear();
+    std::list<CContextClient*>::iterator it;
+
+    for (it=clients.begin(); it!=clients.end(); ++it)
+    {
+      CContextClient* client = *it;
+      int receiverSize = client->serverSize;
+
+      CEventClient event(getType(), EVENT_ID_INDEX);
+      list<CMessage> listMsg;
+      list<CArray<size_t,1> > listOutIndex;
+
+      if (client->isServerLeader())
+      {
+        const std::list<int>& ranks = client->getRanksServerLeader();
+        for (std::list<int>::const_iterator itRank = ranks.begin(), itRankEnd = ranks.end(); itRank != itRankEnd; ++itRank)
+        {
+          int rank = *itRank;
+          int nb = 1;
+          storeIndex_toSrv[client].insert(std::make_pair(rank, CArray<int,1>(nb)));
+          listOutIndex.push_back(CArray<size_t,1>(nb));
+
+          CArray<int, 1>& outLocalIndexToServer = storeIndex_toSrv[client][rank];
+          CArray<size_t, 1>& outGlobalIndexOnServer = listOutIndex.back();
+
+          for (int k = 0; k < nb; ++k)
+          {
+            outGlobalIndexOnServer(k) = 0;
+            outLocalIndexToServer(k)  = 0;
+          }
+
+          if (context->hasClient && !context->hasServer)
+            storeIndex_fromSrv.insert(std::make_pair(rank, CArray<int,1>(outLocalIndexToServer)));
+
+          listMsg.push_back(CMessage());
+          listMsg.back() << getId( )<< isDataDistributed_ << isCompressible_ << listOutIndex.back();
+
+          event.push(rank, 1, listMsg.back());
+        }
+        client->sendEvent(event);
+      }
+      else
+      {
+        const std::list<int>& ranks = client->getRanksServerNotLeader();
+        for (std::list<int>::const_iterator itRank = ranks.begin(), itRankEnd = ranks.end(); itRank != itRankEnd; ++itRank)
+        {
+          int rank = *itRank;
+          int nb = 1;          
+          CArray<int, 1> outLocalIndexToServer(nb);
+          for (int k = 0; k < nb; ++k)
+          {
+            outLocalIndexToServer(k)  = 0;
+          }
+
+          if (context->hasClient && !context->hasServer)
+            storeIndex_fromSrv.insert(std::make_pair(rank, CArray<int,1>(outLocalIndexToServer)));
+        }
+        client->sendEvent(event);
+      }
+    }
+  }
+  CATCH_DUMP_ATTR
+
+  void CGrid::sendIndex(void)
+  TRY
+  {
+    CContext* context = CContext::getCurrent();
+    storeIndex_toSrv.clear();
+    std::list<CContextClient*>::iterator it;
+
+    for (it=clients.begin(); it!=clients.end(); ++it)
+    {
+      CContextClient* client = *it;
+      int receiverSize = client->serverSize;
+
+      CEventClient event(getType(), EVENT_ID_INDEX);
+      int rank;
+      list<CMessage> listMsg;
+      list<CArray<size_t,1> > listOutIndex;
+      const CDistributionClient::GlobalLocalDataMap& globalLocalIndexSendToServer = clientDistribution_->getGlobalLocalDataSendToServer();
+      CDistributionClient::GlobalLocalDataMap::const_iterator itbIndex = globalLocalIndexSendToServer.begin(), itIndex,
+                                                              iteIndex = globalLocalIndexSendToServer.end();
+      itIndex = itbIndex;                                                              
+
+      if (!doGridHaveDataDistributed(client))
+      {
+        if (client->isServerLeader())
+        {
+          int indexSize = globalLocalIndexSendToServer.size();
+          CArray<size_t,1> outGlobalIndexOnServer(indexSize);
+          CArray<int,1> outLocalIndexToServer(indexSize);
+          for (int idx = 0; itIndex != iteIndex; ++itIndex, ++idx)
+          {
+            outGlobalIndexOnServer(idx) = itIndex->first;
+            outLocalIndexToServer(idx) = itIndex->second;
+          }
+
+          const std::list<int>& ranks = client->getRanksServerLeader();
+          for (std::list<int>::const_iterator itRank = ranks.begin(), itRankEnd = ranks.end(); itRank != itRankEnd; ++itRank)
+          {
+            storeIndex_toSrv[client].insert(std::make_pair(*itRank, CArray<int,1>(outLocalIndexToServer)));
+            if (context->hasClient && !context->hasServer)
+              storeIndex_fromSrv.insert(std::make_pair(*itRank, CArray<int,1>(outLocalIndexToServer)));
+            
+            listOutIndex.push_back(CArray<size_t,1>(outGlobalIndexOnServer));
+
+            listMsg.push_back(CMessage());
+            listMsg.back() << getId() << isDataDistributed_ << isCompressible_ << listOutIndex.back();
+
+            event.push(*itRank, 1, listMsg.back());
+          }
+          client->sendEvent(event);
+        }
+        else
+        {
+           int indexSize = globalLocalIndexSendToServer.size();
+           CArray<int,1> outLocalIndexToServer(indexSize);
+           for (int idx = 0; itIndex != iteIndex; ++itIndex, ++idx)
+           {
+             outLocalIndexToServer(idx) = itIndex->second;
+           }
+
+           const std::list<int>& ranks = client->getRanksServerNotLeader();
+           for (std::list<int>::const_iterator itRank = ranks.begin(), itRankEnd = ranks.end(); itRank != itRankEnd; ++itRank)
+           {
+             storeIndex_fromSrv.insert(std::make_pair(*itRank, CArray<int,1>(outLocalIndexToServer)));
+           }
+           client->sendEvent(event);
+         }
+      }
+      else
+      {
+        CClientServerMapping::GlobalIndexMap::const_iterator iteGlobalMap, itGlobalMap;
+        itGlobalMap = globalIndexOnServer_[receiverSize].begin();
+        iteGlobalMap = globalIndexOnServer_[receiverSize].end();
+
+        std::map<int,std::vector<int> >localIndexTmp;
+        std::map<int,std::vector<size_t> > globalIndexTmp;
+        for (; itGlobalMap != iteGlobalMap; ++itGlobalMap)
+        {
+          int serverRank = itGlobalMap->first;
+          int indexSize = itGlobalMap->second.size();
+          const std::vector<size_t>& indexVec = itGlobalMap->second;
+          for (int idx = 0; idx < indexSize; ++idx)
+          {
+            itIndex = globalLocalIndexSendToServer.find(indexVec[idx]);
+            if (iteIndex != itIndex)
+            {
+              globalIndexTmp[serverRank].push_back(itIndex->first);
+              localIndexTmp[serverRank].push_back(itIndex->second);
+            }
+          }
+        }
+
+        for (int ns = 0; ns < connectedServerRank_[receiverSize].size(); ++ns)
+        {
+          rank = connectedServerRank_[receiverSize][ns];
+          int nb = 0;
+          if (globalIndexTmp.end() != globalIndexTmp.find(rank))
+            nb = globalIndexTmp[rank].size();
+
+          storeIndex_toSrv[client].insert(make_pair(rank, CArray<int,1>(nb)));
+          listOutIndex.push_back(CArray<size_t,1>(nb));
+
+          CArray<int, 1>& outLocalIndexToServer = storeIndex_toSrv[client][rank];
+          CArray<size_t, 1>& outGlobalIndexOnServer = listOutIndex.back();
+
+          for (int k = 0; k < nb; ++k)
+          {
+            outGlobalIndexOnServer(k) = globalIndexTmp[rank].at(k);
+            outLocalIndexToServer(k)  = localIndexTmp[rank].at(k);
+          }
+
+          storeIndex_fromSrv.insert(make_pair(rank, CArray<int,1>(outLocalIndexToServer)));
+          listMsg.push_back(CMessage());
+          listMsg.back() << getId() << isDataDistributed_ << isCompressible_ << listOutIndex.back();
+
+          event.push(rank, nbSenders[receiverSize][rank], listMsg.back());
+        }
+
+        client->sendEvent(event);
+      }
+    }
+  }
+  CATCH_DUMP_ATTR
+
+  void CGrid::recvIndex(CEventServer& event)
+  TRY
+  {
+    string gridId;
+    vector<int> ranks;
+    vector<CBufferIn*> buffers;
+
+    list<CEventServer::SSubEvent>::iterator it;
+    for (it = event.subEvents.begin(); it != event.subEvents.end(); ++it)
+    {
+      ranks.push_back(it->rank);
+      CBufferIn* buffer = it->buffer;
+      *buffer >> gridId;
+      buffers.push_back(buffer);
+    }
+    get(gridId)->recvIndex(ranks, buffers);
+  }
+  CATCH
+
+  void CGrid::recvIndex(vector<int> ranks, vector<CBufferIn*> buffers)
+  TRY
+  {
+    CContext* context = CContext::getCurrent();
+    connectedServerRankRead_ = ranks;
+
+    int nbSrvPools = (context->hasServer) ? (context->hasClient ? context->clientPrimServer.size() : 1) : 1;
+    nbSrvPools = 1;    
+    nbReadSenders.clear();
+    for (int p = 0; p < nbSrvPools; ++p)
+    {
+      CContextServer* server = (!context->hasClient) ? context->server : context->serverPrimServer[p];
+      CContextClient* client = context->client;   //(!context->hasClient) ? context->client : context->clientPrimServer[p];
+      
+      int idx = 0, numElement = axis_domain_order.numElements();
+      int ssize = numElement;
+      std::vector<int> indexMap(numElement);
+      for (int i = 0; i < numElement; ++i)
+      {
+        indexMap[i] = idx;
+        if (2 == axis_domain_order(i))
+        {
+          ++ssize;
+          idx += 2;
+        }
+        else
+          ++idx;
+      }
+
+      for (int n = 0; n < ranks.size(); n++)
+      {
+        int rank = ranks[n];
+        CBufferIn& buffer = *buffers[n];
+
+        buffer >> isDataDistributed_ >> isCompressible_;
+        size_t dataSize = 0;
+
+        if (0 == serverDistribution_)
+        {
+          int axisId = 0, domainId = 0, scalarId = 0, globalSize = 1;
+          std::vector<CDomain*> domainList = getDomains();
+          std::vector<CAxis*> axisList = getAxis();
+          std::vector<int> nBegin(ssize), nSize(ssize), nGlob(ssize), nBeginGlobal(ssize), nGlobElement(numElement);
+          std::vector<CArray<int,1> > globalIndex(numElement);
+          for (int i = 0; i < numElement; ++i)
+          {
+            nGlobElement[i] = globalSize;
+            if (2 == axis_domain_order(i)) //domain
+            {
+              nBegin[indexMap[i]] = domainList[domainId]->ibegin;
+              nSize[indexMap[i]]  = domainList[domainId]->ni;
+              nBeginGlobal[indexMap[i]] = 0;
+              nGlob[indexMap[i]] = domainList[domainId]->ni_glo;
+
+              nBegin[indexMap[i] + 1] = domainList[domainId]->jbegin;
+              nSize[indexMap[i] + 1] = domainList[domainId]->nj;
+              nBeginGlobal[indexMap[i] + 1] = 0;
+              nGlob[indexMap[i] + 1] = domainList[domainId]->nj_glo;
+
+              {
+                int count = 0;
+                globalIndex[i].resize(nSize[indexMap[i]]*nSize[indexMap[i]+1]);
+                for (int jdx = 0; jdx < nSize[indexMap[i]+1]; ++jdx)
+                  for (int idx = 0; idx < nSize[indexMap[i]]; ++idx)
+                  {
+                    globalIndex[i](count) = (nBegin[indexMap[i]] + idx) + (nBegin[indexMap[i]+1] + jdx) * nGlob[indexMap[i]];
+                    ++count;
+                  }
+              }
+
+              ++domainId;
+            }
+            else if (1 == axis_domain_order(i)) // axis
+            {
+              nBegin[indexMap[i]] = axisList[axisId]->begin;
+              nSize[indexMap[i]]  = axisList[axisId]->n;
+              nBeginGlobal[indexMap[i]] = 0;
+              nGlob[indexMap[i]] = axisList[axisId]->n_glo;     
+              globalIndex[i].resize(nSize[indexMap[i]]);
+              for (int idx = 0; idx < nSize[indexMap[i]]; ++idx)
+                globalIndex[i](idx) = nBegin[indexMap[i]] + idx;
+
+              ++axisId;
+            }
+            else // scalar
+            { 
+              nBegin[indexMap[i]] = 0;
+              nSize[indexMap[i]]  = 1;
+              nBeginGlobal[indexMap[i]] = 0;
+              nGlob[indexMap[i]] = 1;
+              globalIndex[i].resize(1);
+              globalIndex[i](0) = 0;
+              ++scalarId;
+            }
+          }
+          dataSize = 1;
+
+          for (int i = 0; i < nSize.size(); ++i)
+            dataSize *= nSize[i];
+          serverDistribution_ = new CDistributionServer(server->intraCommRank, 
+                                                        globalIndex, axis_domain_order,
+                                                        nBegin, nSize, nBeginGlobal, nGlob);
+        }
+
+        CArray<size_t,1> outIndex;
+        buffer >> outIndex;
+        outGlobalIndexFromClient.insert(std::make_pair(rank, outIndex));
+        connectedDataSizeRead_[rank] = outIndex.numElements();
+
+        if (doGridHaveDataDistributed(client))
+        {}
+        else
+        {
+          // THE PROBLEM HERE IS THAT DATA CAN BE NONDISTRIBUTED ON CLIENT AND DISTRIBUTED ON SERVER
+          // BELOW IS THE TEMPORARY FIX only for a single type of element (domain, asix, scalar)
+          dataSize = serverDistribution_->getGridSize();
+        }
+        writtenDataSize_ += dataSize;
+      }
+
+
+      // Compute mask of the current grid
+      {
+        int axisId = 0, domainId = 0, scalarId = 0, globalSize = 1;
+        std::vector<CDomain*> domainList = getDomains();
+        std::vector<CAxis*> axisList = getAxis();
+        int dimSize = 2 * domainList.size() + axisList.size();
+        std::vector<int> nBegin(dimSize), nSize(dimSize), nGlob(dimSize), nBeginGlobal(dimSize);        
+        for (int i = 0; i < numElement; ++i)
+        {          
+          if (2 == axis_domain_order(i)) //domain
+          {
+            nBegin[indexMap[i]] = domainList[domainId]->ibegin;
+            nSize[indexMap[i]]  = domainList[domainId]->ni;
+            nBeginGlobal[indexMap[i]] = 0;              
+            nGlob[indexMap[i]] = domainList[domainId]->ni_glo;
+
+            nBegin[indexMap[i] + 1] = domainList[domainId]->jbegin;
+            nSize[indexMap[i] + 1] = domainList[domainId]->nj;
+            nBeginGlobal[indexMap[i] + 1] = 0;              
+            nGlob[indexMap[i] + 1] = domainList[domainId]->nj_glo;
+
+            ++domainId;
+          }
+          else if (1 == axis_domain_order(i)) // axis
+          {
+            nBegin[indexMap[i]] = axisList[axisId]->begin;
+            nSize[indexMap[i]]  = axisList[axisId]->n;
+            nBeginGlobal[indexMap[i]] = 0;              
+            nGlob[indexMap[i]] = axisList[axisId]->n_glo;              
+            ++axisId;
+          }
+          else // scalar
+          {  
+          }
+        }
+        
+        if (nSize.empty()) // Scalar grid
+        {
+          nBegin.push_back(0);
+          nSize.push_back(1);
+          nBeginGlobal.push_back(0);              
+          nGlob.push_back(1);  
+        }
+      }
+
+      if (isScalarGrid()) return;
+
+      nbReadSenders[client] = CClientServerMappingDistributed::computeConnectedClients(context->client->serverSize, context->client->clientSize, context->client->intraComm, ranks);
+    }
+  }
+  CATCH_DUMP_ATTR
+
+  /*
+     Compute on the fly the global dimension of a grid with its elements
+     \param[in/out] globalDim global dimension of grid
+     \param[in] domains list of its domains
+     \param[in] axiss list of its axis
+     \param[in] scalars list of its scalars
+     \param[in] axisDomainOrder the order of element in a grid (e.g: scalar then axis)
+     \return The dimension of which we do distribution (often for server)
+  */
+  int CGrid::computeGridGlobalDimension(std::vector<int>& globalDim,
+                                        const std::vector<CDomain*> domains,
+                                        const std::vector<CAxis*> axis,
+                                        const std::vector<CScalar*> scalars,
+                                        const CArray<int,1>& axisDomainOrder)
+  TRY
+ {
+ //   globalDim.resize(domains.size()*2+axis.size()+scalars.size());
+    globalDim.resize(domains.size()*2+axis.size());
+    int positionDimensionDistributed = 1;
+    int idx = 0, idxDomain = 0, idxAxis = 0, idxScalar = 0;
+    for (int i = 0; i < axisDomainOrder.numElements(); ++i)
+    {
+      if (2 == axisDomainOrder(i))
+      {
+        if (!(domains[idxDomain]->type.isEmpty()) && (domains[idxDomain]->type==CDomain::type_attr::unstructured))
+        {
+          positionDimensionDistributed = idx;
+        }
+        else
+        {
+          positionDimensionDistributed = idx +1;
+        }
+
+        globalDim[idx]   = domains[idxDomain]->ni_glo.getValue();
+        globalDim[idx+1] = domains[idxDomain]->nj_glo.getValue();
+
+        ++idxDomain;
+        idx += 2;
+      }
+      else if (1 == axisDomainOrder(i))
+      {
+        globalDim[idx] = axis[idxAxis]->n_glo.getValue();
+        ++idxAxis;
+        ++idx;
+      }
+      else
+      {
+//        globalDim[idx] = 1;
+        ++idxScalar;
+//        ++idx;
+      }
+    }
+
+    return positionDimensionDistributed;
+  }
+  CATCH_DUMP_ATTR
+
+  // Retrieve the global dimension of grid
+  std::vector<int> CGrid::getGlobalDimension()
+  TRY
+  {
+    std::vector<int> globalDim;
+    computeGridGlobalDimension(globalDim, getDomains(), getAxis(), getScalars(), axis_domain_order);
+
+    return globalDim;
+  }
+  CATCH_DUMP_ATTR
+
+  // Retrieve dimension on which we do distribution (Very often, it should be 2nd dimension)
+  int CGrid::getDistributedDimension()
+  TRY
+  {
+    std::vector<int> globalDim;
+    return computeGridGlobalDimension(globalDim, getDomains(), getAxis(), getScalars(), axis_domain_order);    
+  }
+  CATCH_DUMP_ATTR
+
+  bool CGrid::isScalarGrid() const
+  TRY
+  {
+    return (axisList_.empty() && domList_.empty());
+  }
+  CATCH
+
+  /*!
+    Verify whether one server need to write data
+    There are some cases on which one server has nodata to write. For example, when we
+    just only want to zoom on a domain.
+  */
+  bool CGrid::doGridHaveDataToWrite()
+  TRY
+  {
+     return (0 != writtenDataSize_);
+  }
+  CATCH_DUMP_ATTR
+
+  /*!
+    Return size of data which is written on each server
+    Whatever dimension of a grid, data which are written on server must be presented as
+    an one dimension array.
+    \return size of data written on server
+  */
+  size_t CGrid::getWrittenDataSize() const
+  TRY
+  {
+    return writtenDataSize_;
+  }
+  CATCH
+
+  /*!
+    Returns the number of indexes written by each server.
+    \return the number of indexes written by each server
+  */
+  int CGrid::getNumberWrittenIndexes() const
+  TRY
+  {
+    return numberWrittenIndexes_;
+  }
+  CATCH
+
+  /*!
+    Returns the total number of indexes written by the servers.
+    \return the total number of indexes written by the servers
+  */
+  int CGrid::getTotalNumberWrittenIndexes() const
+  TRY
+  {
+    return totalNumberWrittenIndexes_;
+  }
+  CATCH
+
+  /*!
+    Returns the offset of indexes written by each server.
+    \return the offset of indexes written by each server
+  */
+  int CGrid::getOffsetWrittenIndexes() const
+  TRY
+  {
+    return offsetWrittenIndexes_;
+  }
+  CATCH
+
+  CDistributionServer* CGrid::getDistributionServer()
+  TRY
+  {
+    return serverDistribution_;
+  }
+  CATCH_DUMP_ATTR
+
+  CDistributionClient* CGrid::getDistributionClient()
+  TRY
+  {
+    return clientDistribution_;
+  }
+  CATCH_DUMP_ATTR
+
+  bool CGrid::doGridHaveDataDistributed(CContextClient* client)
+  TRY
+  {
+    if (isScalarGrid()) return false;
+    else if (0 != client)
+    {
+      return  (isDataDistributed_ ||  (1 != client->clientSize) || (1 != client->serverSize));
+    }
+    else
+      return isDataDistributed_;    
+  }
+  CATCH_DUMP_ATTR
+
+   /*!
+   \brief Dispatch event received from client
+      Whenever a message is received in buffer of server, it will be processed depending on
+   its event type. A new event type should be added in the switch list to make sure
+   it processed on server side.
+   \param [in] event: Received message
+   */
+  bool CGrid::dispatchEvent(CEventServer& event)
+  TRY
+  {
+
+    if (SuperClass::dispatchEvent(event)) return true;
+    else
+    {
+      switch(event.type)
+      {
+        case EVENT_ID_INDEX :
+          recvIndex(event);
+          return true;
+          break;
+
+         case EVENT_ID_ADD_DOMAIN :
+           recvAddDomain(event);
+           return true;
+           break;
+
+         case EVENT_ID_ADD_AXIS :
+           recvAddAxis(event);
+           return true;
+           break;
+
+         case EVENT_ID_ADD_SCALAR :
+           recvAddScalar(event);
+           return true;
+           break;
+        default :
+          ERROR("bool CDomain::dispatchEvent(CEventServer& event)",
+                << "Unknown Event");
+          return false;
+      }
+    }
+  }
+  CATCH
+
+   ///---------------------------------------------------------------
+
+   CDomain* CGrid::addDomain(const std::string& id)
+   TRY
+   {
+     order_.push_back(2);
+     axis_domain_order.resize(order_.size());
+     for (int idx = 0; idx < order_.size(); ++idx) axis_domain_order(idx)=order_[idx];
+     return vDomainGroup_->createChild(id);
+   }
+   CATCH_DUMP_ATTR
+
+   CAxis* CGrid::addAxis(const std::string& id)
+   TRY
+   {
+     order_.push_back(1);
+     axis_domain_order.resize(order_.size());
+     for (int idx = 0; idx < order_.size(); ++idx) axis_domain_order(idx)=order_[idx];
+     return vAxisGroup_->createChild(id);
+   }
+   CATCH_DUMP_ATTR
+
+   CScalar* CGrid::addScalar(const std::string& id)
+   TRY
+   {
+     order_.push_back(0);
+     axis_domain_order.resize(order_.size());
+     for (int idx = 0; idx < order_.size(); ++idx) axis_domain_order(idx)=order_[idx];
+     return vScalarGroup_->createChild(id);
+   }
+   CATCH_DUMP_ATTR
+
+   //! Change virtual field group to a new one
+   void CGrid::setVirtualDomainGroup(CDomainGroup* newVDomainGroup)
+   TRY
+   {
+      this->vDomainGroup_ = newVDomainGroup;
+   }
+   CATCH_DUMP_ATTR
+
+   //! Change virtual variable group to new one
+   void CGrid::setVirtualAxisGroup(CAxisGroup* newVAxisGroup)
+   TRY
+   {
+      this->vAxisGroup_ = newVAxisGroup;
+   }
+   CATCH_DUMP_ATTR
+
+   //! Change virtual variable group to new one
+   void CGrid::setVirtualScalarGroup(CScalarGroup* newVScalarGroup)
+   TRY
+   {
+      this->vScalarGroup_ = newVScalarGroup;
+   }
+   CATCH_DUMP_ATTR
+
+   /*!
+   \brief Send a message to create a domain on server side
+   \param[in] id String identity of domain that will be created on server
+   */
+   void CGrid::sendAddDomain(const string& id)
+   TRY
+  {
+      sendAddItem(id, (int)EVENT_ID_ADD_DOMAIN);
+   }
+   CATCH_DUMP_ATTR
+
+   /*!
+   \brief Send a message to create an axis on server side
+   \param[in] id String identity of axis that will be created on server
+   */
+   void CGrid::sendAddAxis(const string& id)
+   TRY
+   {
+      sendAddItem(id, (int)EVENT_ID_ADD_AXIS);
+   }
+   CATCH_DUMP_ATTR
+
+   /*!
+   \brief Send a message to create a scalar on server side
+   \param[in] id String identity of scalar that will be created on server
+   */
+   void CGrid::sendAddScalar(const string& id)
+   TRY
+   {
+      sendAddItem(id, (int)EVENT_ID_ADD_SCALAR);
+   }
+   CATCH_DUMP_ATTR
+
+   /*!
+   \brief Receive a message annoucing the creation of a domain on server side
+   \param[in] event Received event
+   */
+   void CGrid::recvAddDomain(CEventServer& event)
+   TRY
+   {
+
+      CBufferIn* buffer = event.subEvents.begin()->buffer;
+      string id;
+      *buffer >> id;
+      get(id)->recvAddDomain(*buffer);
+   }
+   CATCH
+
+   /*!
+   \brief Receive a message annoucing the creation of a domain on server side
+   \param[in] buffer Buffer containing message
+   */
+   void CGrid::recvAddDomain(CBufferIn& buffer)
+   TRY
+   {
+      string id;
+      buffer >> id;
+      addDomain(id);
+   }
+   CATCH_DUMP_ATTR
+
+   /*!
+   \brief Receive a message annoucing the creation of an axis on server side
+   \param[in] event Received event
+   */
+   void CGrid::recvAddAxis(CEventServer& event)
+   TRY
+   {
+
+      CBufferIn* buffer = event.subEvents.begin()->buffer;
+      string id;
+      *buffer >> id;
+      get(id)->recvAddAxis(*buffer);
+   }
+   CATCH
+
+   /*!
+   \brief Receive a message annoucing the creation of an axis on server side
+   \param[in] buffer Buffer containing message
+   */
+   void CGrid::recvAddAxis(CBufferIn& buffer)
+   TRY
+   {
+      string id;
+      buffer >> id;
+      addAxis(id);
+   }
+   CATCH_DUMP_ATTR
+
+   /*!
+   \brief Receive a message annoucing the creation of an scalar on server side
+   \param[in] event Received event
+   */
+   void CGrid::recvAddScalar(CEventServer& event)
+   TRY
+   {
+
+      CBufferIn* buffer = event.subEvents.begin()->buffer;
+      string id;
+      *buffer >> id;
+      get(id)->recvAddScalar(*buffer);
+   }
+   CATCH
+
+   /*!
+   \brief Receive a message annoucing the creation of an scalar on server side
+   \param[in] buffer Buffer containing message
+   */
+   void CGrid::recvAddScalar(CBufferIn& buffer)
+   TRY
+   {
+      string id;
+      buffer >> id;
+      addScalar(id);
+   }
+   CATCH_DUMP_ATTR
+
+  /*!
+  \brief Solve domain and axis references
+  As field, domain and axis can refer to other domains or axis. In order to inherit correctly
+  all attributes from their parents, they should be processed with this function
+  \param[in] apply inherit all attributes of parents (true)
+  */
+  void CGrid::solveDomainAxisRefInheritance(bool apply)
+  TRY
+  {
+    CContext* context = CContext::getCurrent();
+    unsigned int vecSize, i;
+    std::vector<StdString>::iterator it, itE;
+    setDomainList();
+    it = domList_.begin(); itE = domList_.end();
+    for (; it != itE; ++it)
+    {
+      CDomain* pDom = CDomain::get(*it);
+      if (context->hasClient && !context->hasServer)      
+      {
+        pDom->solveRefInheritance(apply);
+        pDom->solveInheritanceTransformation();
+      }
+    }
+
+    setAxisList();
+    it = axisList_.begin(); itE = axisList_.end();
+    for (; it != itE; ++it)
+    {
+      CAxis* pAxis = CAxis::get(*it);
+      if (context->hasClient && !context->hasServer)
+      {
+        pAxis->solveRefInheritance(apply);
+        pAxis->solveInheritanceTransformation();
+      }
+    }
+
+    setScalarList();
+    it = scalarList_.begin(); itE = scalarList_.end();
+    for (; it != itE; ++it)
+    {
+      CScalar* pScalar = CScalar::get(*it);
+      if (context->hasClient && !context->hasServer)
+      {
+        pScalar->solveRefInheritance(apply);
+        pScalar->solveInheritanceTransformation();
+      }
+    }
+  }
+  CATCH_DUMP_ATTR
+
+  bool CGrid::isTransformed()
+  TRY
+  {
+    return isTransformed_;
+  }
+  CATCH_DUMP_ATTR
+
+  void CGrid::setTransformed()
+  TRY
+  {
+    isTransformed_ = true;
+  }
+  CATCH_DUMP_ATTR
+
+  CGridTransformation* CGrid::getTransformations()
+  TRY
+  {
+    return transformations_;
+  }
+  CATCH_DUMP_ATTR
+
+  void CGrid::addTransGridSource(CGrid* gridSrc)
+  TRY
+  {
+    if (gridSrc_.end() == gridSrc_.find(gridSrc))
+      gridSrc_.insert(make_pair(gridSrc,make_pair(false,"")));
+  }
+  CATCH_DUMP_ATTR
+
+  std::map<CGrid*,std::pair<bool,StdString> >& CGrid::getTransGridSource()
+  TRY
+  {
+    return gridSrc_;
+  }
+  CATCH_DUMP_ATTR
+
+  /*!
+     Complete all the necessary (and lacking) attributes of a grid
+     This function is similar to gridTransformation but works only (till now) on generate_rectilinear_domain transformation
+  */
+  void CGrid::completeGrid(CGrid* transformGridSrc)
+  TRY
+  {
+    if (0 != transformGridSrc)
+    {
+      if (axis_domain_order.numElements() != transformGridSrc->axis_domain_order.numElements())
+      {
+        ERROR("CGrid::completeGrid(CGrid* transformGridSrc)",
+             << "Two grids have different number of elements. " << std::endl
+             << "Number of element of grid destination " << this->getId() << " is " << axis_domain_order.numElements() << std::endl
+             << "Number of element of grid source " << transformGridSrc->getId() << " is " << transformGridSrc->axis_domain_order.numElements());
+      }
+    }
+
+    if (isGenerated()) return;
+    setGenerated();
+
+    CGridGenerate gridGenerate(this, transformGridSrc);
+    gridGenerate.completeGrid();
+  }
+  CATCH_DUMP_ATTR
+
+  bool CGrid::isGenerated()
+  TRY
+  {
+    return isGenerated_;
+  }
+  CATCH
+
+  void CGrid::setGenerated()
+  TRY
+  {
+    isGenerated_ = true;
+  }
+  CATCH_DUMP_ATTR
+
+  void CGrid::transformGrid(CGrid* transformGridSrc)
+  TRY
+  {
+    if (!transformGridSrc)
+      ERROR("CGrid::transformGrid(CGrid* transformGridSrc)",
+            << "Impossible to transform grid '" << getId() << "', the source grid is null.");
+
+    if (isTransformed()) return;
+    setTransformed();
+    if (axis_domain_order.numElements() != transformGridSrc->axis_domain_order.numElements())
+    {
+      ERROR("CGrid::transformGrid(CGrid* transformGridSrc)",
+           << "Two grids have different number of elements. " << std::endl
+           << "Number of element of grid destination " << this->getId() << " is " << axis_domain_order.numElements() << std::endl
+           << "Number of element of grid source " << transformGridSrc->getId() << " is " << transformGridSrc->axis_domain_order.numElements());
+    }
+    else
+    {
+    }
+
+    transformations_ = new CGridTransformation(this, transformGridSrc);
+    transformations_->computeAll();
+    if (0 < transformations_->getNbAlgo()) hasTransform_ = true;
+
+    // Ok, now need to compute index of grid source
+    transformGridSrc->checkMaskIndex(false);
+  }
+  CATCH_DUMP_ATTR
+
+  bool CGrid::hasTransform()
+  TRY
+  {
+    if (hasTransform_) return hasTransform_;
+
+    std::vector<CDomain*> domList = getDomains();
+    std::vector<CAxis*> axisList = getAxis();
+    std::vector<CScalar*> scalarList = getScalars();
+
+    for (int idx = 0; idx < domList.size(); ++idx) hasTransform_ |= domList[idx]->hasTransformation();
+    for (int idx = 0; idx < axisList.size(); ++idx) hasTransform_ |= axisList[idx]->hasTransformation();
+    for (int idx = 0; idx < scalarList.size(); ++idx) hasTransform_ |= scalarList[idx]->hasTransformation();
+
+    return hasTransform_;
+  }
+  CATCH_DUMP_ATTR
+
+  /*!
+  \brief Get the list of domain pointers
+  \return list of domain pointers
+  */
+  std::vector<CDomain*> CGrid::getDomains()
+  TRY
+  {
+    std::vector<CDomain*> domList;
+    if (!domList_.empty())
+    {
+      for (int i = 0; i < domList_.size(); ++i) domList.push_back(CDomain::get(domList_[i]));
+    }
+    return domList;
+  }
+  CATCH_DUMP_ATTR
+
+  /*!
+  \brief Get the list of  axis pointers
+  \return list of axis pointers
+  */
+  std::vector<CAxis*> CGrid::getAxis()
+  TRY
+  {
+    std::vector<CAxis*> aList;
+    if (!axisList_.empty())
+      for (int i =0; i < axisList_.size(); ++i) aList.push_back(CAxis::get(axisList_[i]));
+
+    return aList;
+  }
+  CATCH_DUMP_ATTR
+
+  /*!
+  \brief Get the list of  axis pointers
+  \return list of axis pointers
+  */
+  std::vector<CScalar*> CGrid::getScalars()
+  TRY
+  {
+    std::vector<CScalar*> sList;
+    if (!scalarList_.empty())
+      for (int i =0; i < scalarList_.size(); ++i) sList.push_back(CScalar::get(scalarList_[i]));
+
+    return sList;
+  }
+  CATCH_DUMP_ATTR
+
+  /*!
+  \brief Get domain pointer with index
+  \return domain pointer
+  */
+  CDomain* CGrid::getDomain(int domainIndex)
+  TRY
+  {
+    std::vector<CDomain*> domainListP = this->getDomains();
+    if (domainListP.empty())
+    {
+      ERROR("CGrid::getDomain(int domainIndex)",
+            << "No domain associated to this grid. " << std::endl
+            << "Grid id = " << this->getId());
+    }
+
+    if (domainIndex >= domainListP.size() || (domainIndex < 0))
+      ERROR("CGrid::getDomain(int domainIndex)",
+            << "Domain with the index doesn't exist " << std::endl
+            << "Grid id = " << this->getId() << std::endl
+            << "Grid has only " << domainListP.size() << " domain but domain index required is " << domainIndex << std::endl);
+
+    return domainListP[domainIndex];
+  }
+  CATCH_DUMP_ATTR
+
+  /*!
+  \brief Get the axis pointer with index
+  \return axis pointer
+  */
+  CAxis* CGrid::getAxis(int axisIndex)
+  TRY
+  {
+    std::vector<CAxis*> axisListP = this->getAxis();
+    if (axisListP.empty())
+    {
+      ERROR("CGrid::getDomain(int axisIndex)",
+            << "No axis associated to this grid. " << std::endl
+            << "Grid id = " << this->getId());
+    }
+
+    if (axisIndex >= axisListP.size() || (axisIndex < 0))
+      ERROR("CGrid::getDomain(int axisIndex)",
+            << "Domain with the index doesn't exist " << std::endl
+            << "Grid id = " << this->getId() << std::endl
+            << "Grid has only " << axisListP.size() << " axis but axis index required is " << axisIndex << std::endl);
+
+    return axisListP[axisIndex];
+  }
+  CATCH_DUMP_ATTR
+
+  /*!
+  \brief Get the a scalar pointer
+  \return scalar pointer
+  */
+  CScalar* CGrid::getScalar(int scalarIndex)
+  TRY
+  {
+    std::vector<CScalar*> scalarListP = this->getScalars();
+    if (scalarListP.empty())
+    {
+      ERROR("CGrid::getScalar(int scalarIndex)",
+            << "No scalar associated to this grid. " << std::endl
+            << "Grid id = " << this->getId());
+    }
+
+    if (scalarIndex >= scalarListP.size() || (scalarIndex < 0))
+      ERROR("CGrid::getScalar(int scalarIndex)",
+            << "Scalar with the index doesn't exist " << std::endl
+            << "Grid id = " << this->getId() << std::endl
+            << "Grid has only " << scalarListP.size() << " scalar but scalar index required is " << scalarIndex << std::endl);
+
+    return scalarListP[scalarIndex];
+  }
+  CATCH_DUMP_ATTR
+
+  /*!
+  \brief Set domain(s) of a grid from a list
+  \param[in] domains list of domains
+  */
+  void CGrid::setDomainList(const std::vector<CDomain*> domains)
+  TRY
+  {
+    if (isDomListSet) return;
+    std::vector<CDomain*> domList = this->getVirtualDomainGroup()->getAllChildren();
+    if (!domains.empty() && domList.empty())
+    {
+      for (int i = 0; i < domains.size(); ++i)
+        this->getVirtualDomainGroup()->addChild(domains[i]);
+      domList = this->getVirtualDomainGroup()->getAllChildren();
+    }
+
+    if (!domList.empty())
+    {
+      int sizeDom = domList.size();
+      domList_.resize(sizeDom);
+      for (int i = 0; i < sizeDom; ++i)
+      {
+        domList_[i] = domList[i]->getId();
+      }
+      isDomListSet = true;
+    }
+  }
+  CATCH_DUMP_ATTR
+
+  /*!
+  \brief Set axis(s) of a grid from a list
+  \param[in] axis list of axis
+  */
+  void CGrid::setAxisList(const std::vector<CAxis*> axis)
+  TRY
+  {
+    if (isAxisListSet) return;
+    std::vector<CAxis*> aList = this->getVirtualAxisGroup()->getAllChildren();
+    if (!axis.empty() && aList.empty())
+    {
+      for (int i = 0; i < axis.size(); ++i)
+        this->getVirtualAxisGroup()->addChild(axis[i]);
+      aList = this->getVirtualAxisGroup()->getAllChildren();
+    }
+
+    if (!aList.empty())
+    {
+      int sizeAxis = aList.size();
+      axisList_.resize(sizeAxis);
+      for (int i = 0; i < sizeAxis; ++i)
+      {
+        axisList_[i] = aList[i]->getId();
+      }
+      isAxisListSet = true;
+    }
+  }
+  CATCH_DUMP_ATTR
+
+  /*!
+  \brief Set scalar(s) of a grid from a list
+  \param[in] scalars list of scalars
+  */
+  void CGrid::setScalarList(const std::vector<CScalar*> scalars)
+  TRY
+  {
+    if (isScalarListSet) return;
+    std::vector<CScalar*> sList = this->getVirtualScalarGroup()->getAllChildren();
+    if (!scalars.empty() && sList.empty())
+    {
+      for (int i = 0; i < scalars.size(); ++i)
+        this->getVirtualScalarGroup()->addChild(scalars[i]);
+      sList = this->getVirtualScalarGroup()->getAllChildren();
+    }
+
+    if (!sList.empty())
+    {
+      int sizeScalar = sList.size();
+      scalarList_.resize(sizeScalar);
+      for (int i = 0; i < sizeScalar; ++i)
+      {
+        scalarList_[i] = sList[i]->getId();
+      }
+      isScalarListSet = true;
+    }
+  }
+  CATCH_DUMP_ATTR
+
+  /*!
+  \brief Get list of id of domains
+  \return id list of domains
+  */
+  std::vector<StdString> CGrid::getDomainList()
+  TRY
+  {
+    setDomainList();
+    return domList_;
+  }
+  CATCH
+
+  /*!
+  \brief Get list of id of axis
+  \return id list of axis
+  */
+  std::vector<StdString> CGrid::getAxisList()
+  TRY
+  {
+    setAxisList();
+    return axisList_;
+  }
+  CATCH
+
+  /*!
+  \brief Get list of id of scalar
+  \return id list of scalar
+  */
+  std::vector<StdString> CGrid::getScalarList()
+  TRY
+  {
+    setScalarList();
+    return scalarList_;
+  }
+  CATCH
+
+  /*!
+    Send all attributes of domains from client to server
+  */
+  void CGrid::sendAllDomains()
+  TRY
+  {
+    std::vector<CDomain*> domList = this->getVirtualDomainGroup()->getAllChildren();
+    int dSize = domList.size();
+    for (int i = 0; i < dSize; ++i)
+    {
+      sendAddDomain(domList[i]->getId());
+      domList[i]->sendAllAttributesToServer();
+    }
+  }
+  CATCH_DUMP_ATTR
+
+  /*!
+    Send all attributes of axis from client to server
+  */
+  void CGrid::sendAllAxis()
+  TRY
+  {
+    std::vector<CAxis*> aList = this->getVirtualAxisGroup()->getAllChildren();
+    int aSize = aList.size();
+
+    for (int i = 0; i < aSize; ++i)
+    {
+      sendAddAxis(aList[i]->getId());
+      aList[i]->sendAllAttributesToServer();
+    }
+  }
+  CATCH_DUMP_ATTR
+
+  /*!
+    Send all attributes of scalars from client to server
+  */
+  void CGrid::sendAllScalars()
+  TRY
+  {
+    std::vector<CScalar*> sList = this->getVirtualScalarGroup()->getAllChildren();
+    int sSize = sList.size();
+
+    for (int i = 0; i < sSize; ++i)
+    {
+      sendAddScalar(sList[i]->getId());
+      sList[i]->sendAllAttributesToServer();
+    }
+  }
+  CATCH_DUMP_ATTR
+
+  void CGrid::setContextClient(CContextClient* contextClient)
+  TRY
+  {
+    if (clientsSet.find(contextClient)==clientsSet.end())
+    {
+      clients.push_back(contextClient) ;
+      clientsSet.insert(contextClient);
+    }
+    for (int i=0; i<this->getDomains().size(); i++)
+    	this->getDomains()[i]->setContextClient(contextClient);
+    for (int i=0; i<this->getAxis().size(); i++)
+    	this->getAxis()[i]->setContextClient(contextClient);
+  }
+  CATCH_DUMP_ATTR
+
+  /*!
+    Parse a grid, for now, it contains only domain, axis and scalar
+  */
+  void CGrid::parse(xml::CXMLNode& node)
+  TRY
+  {
+    SuperClass::parse(node);
+
+    if (node.goToChildElement())
+    {
+      StdString domainName("domain");
+      StdString axisName("axis");
+      StdString scalarName("scalar");
+      do
+      {
+        if (node.getElementName() == domainName) {
+          order_.push_back(2);
+          this->getVirtualDomainGroup()->parseChild(node);
+        }
+        if (node.getElementName() == axisName) {
+          order_.push_back(1);
+          this->getVirtualAxisGroup()->parseChild(node);
+        }
+        if (node.getElementName() == scalarName) {
+          order_.push_back(0);
+          this->getVirtualScalarGroup()->parseChild(node);
+        }
+      } while (node.goToNextElement());
+      node.goToParentElement();
+    }
+
+    if (!order_.empty())
+    {
+      int sizeOrd = order_.size();
+      axis_domain_order.resize(sizeOrd);
+      for (int i = 0; i < sizeOrd; ++i)
+      {
+        axis_domain_order(i) = order_[i];
+      }
+    }
+
+    setDomainList();
+    setAxisList();
+    setScalarList();
+   }
+  CATCH_DUMP_ATTR
+
+} // namespace xios
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/node/grid.hpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/node/grid.hpp	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/node/grid.hpp	(revision 1749)
@@ -0,0 +1,588 @@
+#ifndef __XIOS_CGrid__
+#define __XIOS_CGrid__
+
+/// XIOS headers ///
+#include "xios_spl.hpp"
+#include "group_factory.hpp"
+
+#include "declare_group.hpp"
+#include "domain.hpp"
+#include "axis.hpp"
+#include "scalar.hpp"
+#include "array_new.hpp"
+#include "attribute_array.hpp"
+#include "distribution_server.hpp"
+#include "client_server_mapping.hpp"
+#include "utils.hpp"
+#include "transformation_enum.hpp"
+
+namespace xios {
+
+   /// ////////////////////// Declarations ////////////////////// ///
+
+   class CGridGroup;
+   class CGridAttributes;
+   class CDomainGroup;
+   class CAxisGroup;
+   class CScalarGroup;
+   class CGrid;
+   class CDistributionClient;
+   class CDistributionServer;
+   class CServerDistributionDescription;
+   class CClientServerMapping;
+   class CGridTransformation;
+
+   ///--------------------------------------------------------------
+
+   // Declare/Define CGridAttribute
+   BEGIN_DECLARE_ATTRIBUTE_MAP(CGrid)
+#  include "grid_attribute.conf"
+   END_DECLARE_ATTRIBUTE_MAP(CGrid)
+
+   ///--------------------------------------------------------------
+
+   class CGrid
+      : public CObjectTemplate<CGrid>
+      , public CGridAttributes
+   {
+         /// typedef ///
+         typedef CObjectTemplate<CGrid>   SuperClass;
+         typedef CGridAttributes SuperClassAttribute;
+
+      public:
+
+         typedef CGridAttributes RelAttributes;
+         typedef CGridGroup      RelGroup;
+
+         enum EEventId
+         {
+           EVENT_ID_INDEX, EVENT_ID_ADD_DOMAIN, EVENT_ID_ADD_AXIS, EVENT_ID_ADD_SCALAR
+         };
+
+         /// Constructeurs ///
+         CGrid(void);
+         explicit CGrid(const StdString& id);
+         CGrid(const CGrid& grid);       // Not implemented yet.
+         CGrid(const CGrid* const grid); // Not implemented yet.
+
+         /// Traitements ///
+//         void solveReference(void);
+
+         void checkEligibilityForCompressedOutput();
+
+         void solveDomainAxisRef(bool areAttributesChecked);
+
+         void checkMaskIndex(bool doCalculateIndex);
+
+ //        virtual void toBinary  (StdOStream& os) const;
+//         virtual void fromBinary(StdIStream& is);
+
+         void addRelFileCompressed(const StdString& filename);
+
+         /// Tests ///
+         bool isCompressible(void) const;
+         bool isWrittenCompressed(const StdString& filename) const;
+
+      public:
+
+         /// Accesseurs ///
+         StdSize getDimension(void);
+
+         StdSize  getDataSize(void) const;
+
+         /// Entrees-sorties de champs
+         template <int n>
+         void inputField(const CArray<double,n>& field, CArray<double,1>& stored) const;
+         template <int n>
+         void maskField(const CArray<double,n>& field, CArray<double,1>& stored) const;
+         template <int n>
+         void outputField(const CArray<double,1>& stored, CArray<double,n>& field) const;  
+         template <int n>
+         void uncompressField(const CArray<double,n>& data, CArray<double,1>& outData) const; 
+
+         virtual void parse(xml::CXMLNode& node);
+
+         /// Destructeur ///
+         virtual ~CGrid(void);
+
+      public:
+
+         /// Accesseurs statiques ///
+         static StdString GetName(void);
+         static StdString GetDefName(void);
+
+         static ENodeType GetType(void);
+
+         /// Instanciateurs Statiques ///
+         static CGrid* createGrid(CDomain* domain);
+         static CGrid* createGrid(CDomain* domain, CAxis* axis);
+         static CGrid* createGrid(const std::vector<CDomain*>& domains, const std::vector<CAxis*>& axis,
+                                  const CArray<int,1>& axisDomainOrder = CArray<int,1>());
+         static CGrid* createGrid(StdString id, const std::vector<CDomain*>& domains, const std::vector<CAxis*>& axis,
+                                  const std::vector<CScalar*>& scalars, const CArray<int,1>& axisDomainOrder = CArray<int,1>());
+         static CGrid* createGrid(const std::vector<CDomain*>& domains, const std::vector<CAxis*>& axis,
+                                  const std::vector<CScalar*>& scalars, const CArray<int,1>& axisDomainOrder);
+         static StdString generateId(const std::vector<CDomain*>& domains, const std::vector<CAxis*>& axis,
+                                     const std::vector<CScalar*>& scalars, const CArray<int,1>& axisDomainOrder = CArray<int,1>());
+         static StdString generateId(const CGrid* gridSrc, const CGrid* gridDest);
+         static CGrid* cloneGrid(const StdString& idNewGrid, CGrid* gridSrc);
+
+      public:            
+         void computeIndexServer(void);
+         void computeIndex(void);
+         void computeIndexScalarGrid();
+         void computeWrittenIndex();
+
+         void solveDomainRef(bool checkAtt);
+         void solveAxisRef(bool checkAtt);
+         void solveScalarRef(bool checkAtt);
+         void solveDomainAxisRefInheritance(bool apply = true);
+         void solveTransformations();
+         void solveDomainAxisBaseRef();
+
+         CDomain* addDomain(const std::string& id=StdString());
+         CAxis* addAxis(const std::string& id=StdString());
+         CScalar* addScalar(const std::string& id=StdString());
+         void sendAddDomain(const std::string& id="");
+         void sendAddAxis(const std::string& id="");
+         void sendAddScalar(const std::string& id="");
+         void sendAllDomains();
+         void sendAllAxis();
+         void sendAllScalars();
+
+         static void recvAddDomain(CEventServer& event);
+         void recvAddDomain(CBufferIn& buffer);
+         static void recvAddAxis(CEventServer& event);
+         void recvAddAxis(CBufferIn& buffer);
+         static void recvAddScalar(CEventServer& event);
+         void recvAddScalar(CBufferIn& buffer);
+
+         static bool dispatchEvent(CEventServer& event);
+         static void recvIndex(CEventServer& event);
+         void recvIndex(vector<int> ranks, vector<CBufferIn*> buffers);
+         void sendIndex(void);
+         void sendIndexScalarGrid();
+
+         void setContextClient(CContextClient* contextClient);
+
+         void computeDomConServer();
+         std::map<int, int> getDomConServerSide();
+         std::map<int, StdSize> getAttributesBufferSize(CContextClient* client, bool bufferForWriting = false);
+         std::map<int, StdSize> getDataBufferSize(CContextClient* client, const std::string& id = "", bool bufferForWriting = false);
+         std::vector<StdString> getDomainList();
+         std::vector<StdString> getAxisList();
+         std::vector<StdString> getScalarList();
+         std::vector<CDomain*> getDomains();
+         std::vector<CAxis*> getAxis();
+         std::vector<CScalar*> getScalars();
+         CDomain* getDomain(int domainIndex);
+         CAxis* getAxis(int axisIndex);
+         CScalar* getScalar(int scalarIndex);
+         std::vector<int> getAxisOrder();
+         std::vector<int> getGlobalDimension();
+         bool isScalarGrid() const;         
+
+         bool doGridHaveDataToWrite();
+         bool doGridHaveDataDistributed(CContextClient* client = 0);
+         size_t getWrittenDataSize() const;
+         int getNumberWrittenIndexes() const;
+         int getTotalNumberWrittenIndexes() const;
+         int getOffsetWrittenIndexes() const;
+
+         CDistributionServer* getDistributionServer();
+         CDistributionClient* getDistributionClient();
+         CGridTransformation* getTransformations();
+
+         void transformGrid(CGrid* transformGridSrc);
+         void completeGrid(CGrid* transformGridSrc = 0);
+         void doAutoDistribution(CGrid* transformGridSrc);
+         bool isTransformed();
+         void setTransformed();
+         bool isGenerated();
+         void setGenerated();
+         void addTransGridSource(CGrid* gridSrc);
+         std::map<CGrid*, std::pair<bool,StdString> >& getTransGridSource();
+         bool hasTransform();
+         size_t getGlobalWrittenSize(void) ;
+      public:
+         CArray<int, 1> storeIndex_client;
+         CArray<bool, 1> storeMask_client;
+
+/** Map containing indexes that will be sent in sendIndex(). */
+         std::map<CContextClient*, map<int, CArray<int, 1> > > storeIndex_toSrv;
+
+/** Map storing the number of senders. Key = size of receiver's intracomm */
+         std::map<int, std::map<int,int> > nbSenders;
+
+         std::map<CContextClient*, std::map<int,int> > nbReadSenders;
+
+         map<int, CArray<int, 1> > storeIndex_fromSrv; // Support, for now, reading with level-1 server
+
+         map<int, CArray<size_t, 1> > outIndexFromClient;  // Deprecated
+
+         map<int, CArray<size_t, 1> > compressedOutIndexFromClient;
+
+/** Map storing received indexes. Key = sender rank, value = index array. */
+         map<int, CArray<size_t, 1> > outGlobalIndexFromClient;
+
+// Manh Ha's comment: " A client receives global index from other clients (via recvIndex)
+// then does mapping these index into local index of STORE_CLIENTINDEX
+// In this way, store_clientIndex can be used as an input of a source filter
+// Maybe we need a flag to determine whether a client wants to write. TODO "
+
+/** Map storing received data. Key = sender rank, value = data array.
+ *  The map is created in CGrid::computeClientIndex and filled upon receiving data in CField::recvUpdateData() */
+         map<int, CArray<size_t, 1> > outLocalIndexStoreOnClient; 
+
+/** Indexes calculated based on server-like distribution.
+ *  They are used for writing/reading data and only calculated for server level that does the writing/reading.
+ *  Along with localIndexToWriteOnClient, these indexes are used to correctly place incoming data. */
+         CArray<size_t,1> localIndexToWriteOnServer;
+
+/** Indexes calculated based on client-like distribution.
+ *  They are used for writing/reading data and only calculated for server level that does the writing/reading.
+ *  Along with localIndexToWriteOnServer, these indexes are used to correctly place incoming data. */
+         CArray<size_t,1> localIndexToWriteOnClient;
+
+         CArray<size_t,1> indexFromClients;
+
+         bool hasMask(void) const;
+         void checkMask(void);
+         void createMask(void);
+         void modifyMask(const CArray<int,1>& indexToModify, bool valueToModify = false);
+         void modifyMaskSize(const std::vector<int>& newDimensionSize, bool newValue = false);
+
+         void computeGridGlobalDimension(const std::vector<CDomain*>& domains,
+                                         const std::vector<CAxis*>& axis,
+                                         const std::vector<CScalar*>& scalars,
+                                         const CArray<int,1>& axisDomainOrder);
+
+      private:
+       template<int N>
+       void checkGridMask(CArray<bool,N>& gridMask,
+                          const std::vector<CArray<bool,1>* >& domainMasks,
+                          const std::vector<CArray<bool,1>* >& axisMasks,
+                          const CArray<int,1>& axisDomainOrder,
+                          bool createMask = false);
+        template<int N>
+        void modifyGridMask(CArray<bool,N>& gridMask, const CArray<int,1>& indexToModify, bool valueToModify);
+
+        template<int N>
+        void modifyGridMaskSize(CArray<bool,N>& gridMask, const std::vector<int>& eachDimSize, bool newValue);
+
+        void storeField_arr(const double* const data, CArray<double, 1>& stored) const;
+        void restoreField_arr(const CArray<double, 1>& stored, double* const data) const;
+        void uncompressField_arr(const double* const data, CArray<double, 1>& outData) const;
+        void maskField_arr(const double* const data, CArray<double, 1>& stored) const;
+
+        void setVirtualDomainGroup(CDomainGroup* newVDomainGroup);
+        void setVirtualAxisGroup(CAxisGroup* newVAxisGroup);
+        void setVirtualScalarGroup(CScalarGroup* newVScalarGroup);
+
+        void setDomainList(const std::vector<CDomain*> domains = std::vector<CDomain*>());
+        void setAxisList(const std::vector<CAxis*> axis = std::vector<CAxis*>());
+        void setScalarList(const std::vector<CScalar*> scalars = std::vector<CScalar*>());
+
+        CDomainGroup* getVirtualDomainGroup() const;
+        CAxisGroup* getVirtualAxisGroup() const;
+        CScalarGroup* getVirtualScalarGroup() const;
+
+        void checkAttributesAfterTransformation();
+        void setTransformationAlgorithms();
+        void computeIndexByElement(const std::vector<std::unordered_map<size_t,std::vector<int> > >& indexServerOnElement,
+                                   const CContextClient* client,
+                                   CClientServerMapping::GlobalIndexMap& globalIndexOnServer);
+        int computeGridGlobalDimension(std::vector<int>& globalDim,
+                                       const std::vector<CDomain*> domains,
+                                       const std::vector<CAxis*> axis,
+                                       const std::vector<CScalar*> scalars,
+                                       const CArray<int,1>& axisDomainOrder);
+        int getDistributedDimension();
+
+        void computeClientIndex();
+        void computeConnectedClients();
+        void computeClientIndexScalarGrid(); 
+        void computeConnectedClientsScalarGrid(); 
+
+      private:
+
+/** Clients that have to send a grid. There can be multiple clients in case of secondary server, otherwise only one client. */
+        std::list<CContextClient*> clients;
+        std::set<CContextClient*> clientsSet;
+
+        bool isChecked;
+        bool isDomainAxisChecked;
+        bool isIndexSent;
+
+        CDomainGroup* vDomainGroup_;
+        CAxisGroup* vAxisGroup_;
+        CScalarGroup* vScalarGroup_;
+        std::vector<std::string> axisList_, domList_, scalarList_;
+        bool isAxisListSet, isDomListSet, isScalarListSet;
+
+/** Client-like distribution calculated based on the knowledge of the entire grid */
+        CDistributionClient* clientDistribution_;
+
+/** Server-like distribution calculated upon receiving indexes */
+        CDistributionServer* serverDistribution_;
+
+        CClientServerMapping* clientServerMap_;
+        size_t writtenDataSize_;
+        int numberWrittenIndexes_, totalNumberWrittenIndexes_, offsetWrittenIndexes_;
+
+/** Map storing local ranks of connected receivers. Key = size of receiver's intracomm.
+  * It is calculated in computeConnectedClients(). */
+        std::map<int, std::vector<int> > connectedServerRank_;
+
+/** Map storing the size of data to be send. Key = size of receiver's intracomm
+  * It is calculated in computeConnectedClients(). */
+        std::map<int, std::map<int,size_t> > connectedDataSize_;
+
+/** Ranks of connected receivers in case of reading. It is calculated in recvIndex(). */
+        std::vector<int> connectedServerRankRead_;
+
+/** Size of data to be send in case of reading. It is calculated in recvIndex(). */
+        std::map<int,size_t> connectedDataSizeRead_;
+
+        bool isDataDistributed_;        
+         //! True if and only if the data defined on the grid can be outputted in a compressed way
+        bool isCompressible_;
+        std::set<std::string> relFilesCompressed;
+
+        bool isTransformed_, isGenerated_;
+        bool computedWrittenIndex_;
+        std::vector<int> axisPositionInGrid_;
+        CGridTransformation* transformations_;
+        bool hasDomainAxisBaseRef_;        
+        std::map<CGrid*, std::pair<bool,StdString> > gridSrc_;
+        bool hasTransform_;
+
+/** Map storing global indexes of server-like (band-wise) distribution for sending to receivers.
+  * Key = size of receiver's intracomm.
+  */
+//        std::map<CContextClient*, CClientServerMapping::GlobalIndexMap> globalIndexOnServer_;
+        std::map<int, CClientServerMapping::GlobalIndexMap> globalIndexOnServer_;
+
+
+/** List order of axis and domain in a grid, if there is a domain, it will take value 1 (true), axis 0 (false) */
+        std::vector<int> order_;
+
+   }; // class CGrid
+
+   ///--------------------------------------------------------------
+
+   template <int n>
+   void CGrid::inputField(const CArray<double,n>& field, CArray<double,1>& stored) const
+   TRY
+   {
+//#ifdef __XIOS_DEBUG
+      if (this->getDataSize() != field.numElements())
+         ERROR("void CGrid::inputField(const  CArray<double,n>& field, CArray<double,1>& stored) const",
+                << "[ Awaiting data of size = " << this->getDataSize() << ", "
+                << "Received data size = "      << field.numElements() << " ] "
+                << "The data array does not have the right size! "
+                << "Grid = " << this->getId())
+//#endif
+      this->storeField_arr(field.dataFirst(), stored);
+   }
+   CATCH
+
+   template <int n>
+   void CGrid::maskField(const CArray<double,n>& field, CArray<double,1>& stored) const
+   {
+//#ifdef __XIOS_DEBUG
+      if (this->getDataSize() != field.numElements())
+         ERROR("void CGrid::inputField(const  CArray<double,n>& field, CArray<double,1>& stored) const",
+                << "[ Awaiting data of size = " << this->getDataSize() << ", "
+                << "Received data size = "      << field.numElements() << " ] "
+                << "The data array does not have the right size! "
+                << "Grid = " << this->getId())
+//#endif
+      this->maskField_arr(field.dataFirst(), stored);
+   }
+
+   template <int n>
+   void CGrid::outputField(const CArray<double,1>& stored, CArray<double,n>& field) const
+   TRY
+   {
+//#ifdef __XIOS_DEBUG
+      if (this->getDataSize() != field.numElements())
+         ERROR("void CGrid::outputField(const CArray<double,1>& stored, CArray<double,n>& field) const",
+                << "[ Size of the data = " << this->getDataSize() << ", "
+                << "Output data size = "   << field.numElements() << " ] "
+                << "The ouput array does not have the right size! "
+                << "Grid = " << this->getId())
+//#endif
+      this->restoreField_arr(stored, field.dataFirst());
+   }
+   CATCH
+
+   /*!
+     This function removes the effect of mask on received data on the server.
+     This function only serve for the checking purpose. TODO: Something must be done to seperate mask and data_index from each other in received data
+     \data data received data with masking effect on the server
+     \outData data without masking effect
+   */
+   template <int N>
+   void CGrid::uncompressField(const CArray<double,N>& data, CArray<double,1>& outData) const
+   TRY
+   {      
+     uncompressField_arr(data.dataFirst(), outData);
+   }
+   CATCH
+
+   template<int N>
+   void CGrid::checkGridMask(CArray<bool,N>& gridMask,
+                             const std::vector<CArray<bool,1>* >& domainMasks,
+                             const std::vector<CArray<bool,1>* >& axisMasks,
+                             const CArray<int,1>& axisDomainOrder,
+                             bool createMask)
+   TRY
+   {
+     int idx = 0;
+     int numElement = axisDomainOrder.numElements();
+     int dim = domainMasks.size() * 2 + axisMasks.size();
+     std::vector<CDomain*> domainP = this->getDomains();
+     std::vector<CAxis*> axisP = this->getAxis();
+
+     std::vector<int> idxLoop(dim,0), indexMap(numElement), eachDimSize(dim);
+     std::vector<int> currentIndex(dim);
+     int idxDomain = 0, idxAxis = 0;
+    for (int i = 0; i < numElement; ++i)
+    {
+      indexMap[i] = idx;
+      if (2 == axisDomainOrder(i)) {
+          eachDimSize[indexMap[i]]   = domainP[idxDomain]->ni;
+          eachDimSize[indexMap[i]+1] = domainP[idxDomain]->nj;
+          idx += 2; ++idxDomain;
+      }
+      else if (1 == axisDomainOrder(i)) {
+//        eachDimSize[indexMap[i]] = axisMasks[idxAxis]->numElements();
+        eachDimSize[indexMap[i]] = axisP[idxAxis]->n;
+        ++idx; ++idxAxis;
+      }
+      else {};
+    }
+
+    if (!gridMask.isEmpty() && !createMask)
+    {
+      for (int i = 0; i < dim; ++i)
+      {
+        if (gridMask.extent(i) != eachDimSize[i])
+          ERROR("CGrid::checkMask(void)",
+                << "The mask has one dimension whose size is different from the one of the local grid." << std::endl
+                << "Local size of dimension " << i << " is " << eachDimSize[i] << "." << std::endl
+                << "Mask size for dimension " << i << " is " << gridMask.extent(i) << "." << std::endl
+                << "Grid = " << this->getId())
+      }
+    }
+    else {
+        CArrayBoolTraits<CArray<bool,N> >::resizeArray(gridMask,eachDimSize);
+        gridMask = true;
+    }
+
+    int ssize = gridMask.numElements();
+    idx = 0;
+    while (idx < ssize)
+    {
+      for (int i = 0; i < dim-1; ++i)
+      {
+        if (idxLoop[i] == eachDimSize[i])
+        {
+          idxLoop[i] = 0;
+          ++idxLoop[i+1];
+        }
+      }
+
+      // Find out outer index
+      idxDomain = idxAxis = 0;
+      bool maskValue = true;
+      for (int i = 0; i < numElement; ++i)
+      {
+        if (2 == axisDomainOrder(i))
+        {
+          int idxTmp = idxLoop[indexMap[i]] + idxLoop[indexMap[i]+1] * eachDimSize[indexMap[i]];
+          if (idxTmp < (*domainMasks[idxDomain]).numElements())
+            maskValue = maskValue && (*domainMasks[idxDomain])(idxTmp);
+          else
+            maskValue = false;
+          ++idxDomain;
+        }
+        else if (1 == axisDomainOrder(i))
+        {
+          int idxTmp = idxLoop[indexMap[i]];
+          if (idxTmp < (*axisMasks[idxAxis]).numElements())
+            maskValue = maskValue && (*axisMasks[idxAxis])(idxTmp);
+          else
+            maskValue = false;
+
+          ++idxAxis;
+        }
+      }
+
+      int maskIndex = idxLoop[0];
+      int mulDim = 1;
+      for (int k = 1; k < dim; ++k)
+      {
+        mulDim *= eachDimSize[k-1];
+        maskIndex += idxLoop[k]*mulDim;
+      }
+      *(gridMask.dataFirst()+maskIndex) &= maskValue;
+
+      ++idxLoop[0];
+      ++idx;
+    }
+   }
+   CATCH_DUMP_ATTR
+
+   template<int N>
+   void CGrid::modifyGridMaskSize(CArray<bool,N>& gridMask,
+                                  const std::vector<int>& eachDimSize,
+                                  bool newValue)
+   TRY
+   {
+      if (N != eachDimSize.size())
+      {
+        // ERROR("CGrid::modifyGridMaskSize(CArray<bool,N>& gridMask,
+        //                                  const std::vector<int>& eachDimSize,
+        //                                  bool newValue)",
+        //       << "Dimension size of the mask is different from input dimension size." << std::endl
+        //       << "Mask dimension is " << N << "." << std::endl
+        //       << "Input dimension is " << eachDimSize.size() << "." << std::endl
+        //       << "Grid = " << this->getId())
+      }
+      CArrayBoolTraits<CArray<bool,N> >::resizeArray(gridMask,eachDimSize);
+      gridMask = newValue;
+   }
+   CATCH_DUMP_ATTR
+                                 
+
+   /*!
+     Modify the current mask of grid, the local index to be modified will take value false
+     \param [in/out] gridMask current mask of grid
+     \param [in] indexToModify local index to modify
+   */
+   template<int N>
+   void CGrid::modifyGridMask(CArray<bool,N>& gridMask, const CArray<int,1>& indexToModify, bool valueToModify)
+   TRY
+   {     
+     int num = indexToModify.numElements();
+     for (int idx = 0; idx < num; ++idx)
+     {
+       *(gridMask.dataFirst()+indexToModify(idx)) = valueToModify;
+     }
+   }
+   CATCH_DUMP_ATTR
+
+   ///--------------------------------------------------------------
+
+
+
+   // Declare/Define CGridGroup and CGridDefinition
+   DECLARE_GROUP(CGrid);
+
+   ///--------------------------------------------------------------
+
+} // namespace xios
+
+#endif // __XIOS_CGrid__
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/node/interpolate_axis.cpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/node/interpolate_axis.cpp	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/node/interpolate_axis.cpp	(revision 1749)
@@ -0,0 +1,86 @@
+#include "interpolate_axis.hpp"
+#include "type.hpp"
+#include "field.hpp"
+
+namespace xios {
+
+  /// ////////////////////// DÃ©finitions ////////////////////// ///
+
+  CInterpolateAxis::CInterpolateAxis(void)
+    : CObjectTemplate<CInterpolateAxis>(), CInterpolateAxisAttributes(), CTransformation<CAxis>()
+  { /* Ne rien faire de plus */ }
+
+  CInterpolateAxis::CInterpolateAxis(const StdString & id)
+    : CObjectTemplate<CInterpolateAxis>(id), CInterpolateAxisAttributes(), CTransformation<CAxis>()
+  { /* Ne rien faire de plus */ }
+
+  CInterpolateAxis::~CInterpolateAxis(void)
+  {}
+
+  CTransformation<CAxis>* CInterpolateAxis::create(const StdString& id, xml::CXMLNode* node)
+  {
+    CInterpolateAxis* interpAxis = CInterpolateAxisGroup::get("interpolate_axis_definition")->createChild(id);
+    if (node) interpAxis->parse(*node);
+    return static_cast<CTransformation<CAxis>*>(interpAxis);
+  }
+
+  bool CInterpolateAxis::registerTrans()
+  {
+    return registerTransformation(TRANS_INTERPOLATE_AXIS, CInterpolateAxis::create);
+  }
+
+  bool CInterpolateAxis::_dummyRegistered = CInterpolateAxis::registerTrans();
+
+  //----------------------------------------------------------------
+
+  StdString CInterpolateAxis::GetName(void)    { return StdString("interpolate_axis"); }
+  StdString CInterpolateAxis::GetDefName(void) { return StdString("interpolate_axis"); }
+  ENodeType CInterpolateAxis::GetType(void)    { return eInterpolateAxis; }
+
+  void CInterpolateAxis::checkValid(CAxis* axisSrc)
+  {
+    if (this->order.isEmpty()) this->order.setValue(1);
+    int order = this->order.getValue();
+    if (order >= axisSrc->n_glo.getValue())
+    {
+      ERROR("CInterpolateAxis::checkValid(CAxis* axisSrc)",
+             << "Order of interpolation is greater than global size of axis source"
+             << "Size of axis source " <<axisSrc->getId() << " is " << axisSrc->n_glo.getValue()  << std::endl
+             << "Order of interpolation is " << order );
+    }
+
+    if (order < 1)
+    {
+      ERROR("CInterpolateAxis::checkValid(CAxis* axisSrc)",
+             << "Order of interpolation is smaller than 1"
+             << "Size of axis source " <<axisSrc->getId() << " is " << axisSrc->n_glo.getValue()  << std::endl
+             << "Order of interpolation is " << order );
+    }
+
+
+    if (!this->coordinate.isEmpty())
+    {
+      StdString coordinate = this->coordinate.getValue();
+      if (!CField::has(coordinate))
+        ERROR("CInterpolateAxis::checkValid(CAxis* axisSrc)",
+               << "Coordinate field whose id " << coordinate << "does not exist "
+               << "Please define one");
+    }
+  }
+
+  std::vector<StdString> CInterpolateAxis::checkAuxInputs_()
+  {
+    std::vector<StdString> auxInputs;
+    if (!this->coordinate.isEmpty())
+    {
+      StdString coordinate = this->coordinate.getValue();
+      if (!CField::has(coordinate))
+        ERROR("CInterpolateAxis::checkValid(CAxis* axisSrc)",
+               << "Coordinate field whose id " << coordinate << "does not exist "
+               << "Please define one");
+      auxInputs.push_back(coordinate);
+    }
+
+    return auxInputs;
+  }
+}
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/node/interpolate_axis.hpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/node/interpolate_axis.hpp	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/node/interpolate_axis.hpp	(revision 1749)
@@ -0,0 +1,69 @@
+#ifndef __XIOS_CInterpolateAxis__
+#define __XIOS_CInterpolateAxis__
+
+/// xios headers ///
+#include "xios_spl.hpp"
+#include "attribute_enum.hpp"
+#include "attribute_enum_impl.hpp"
+#include "attribute_array.hpp"
+#include "declare_attribute.hpp"
+#include "object_template.hpp"
+#include "group_factory.hpp"
+#include "declare_group.hpp"
+#include "transformation.hpp"
+#include "axis.hpp"
+
+namespace xios {
+  /// ////////////////////// DÃ©clarations ////////////////////// ///
+  class CInterpolateAxisGroup;
+  class CInterpolateAxisAttributes;
+  class CInterpolateAxis;
+  class CAxis;
+
+  ///--------------------------------------------------------------
+
+  // Declare/Define CFileAttribute
+  BEGIN_DECLARE_ATTRIBUTE_MAP(CInterpolateAxis)
+#include "interpolate_axis_attribute.conf"
+  END_DECLARE_ATTRIBUTE_MAP(CInterpolateAxis)
+
+  ///--------------------------------------------------------------
+  /*!
+    \class CInterpolateAxis
+    This class describes interpolate_axis in xml file.
+  */
+  class CInterpolateAxis
+    : public CObjectTemplate<CInterpolateAxis>
+    , public CInterpolateAxisAttributes
+    , public CTransformation<CAxis>
+  {
+    public :
+      typedef CObjectTemplate<CInterpolateAxis> SuperClass;
+      typedef CInterpolateAxisAttributes SuperClassAttribute;
+
+    public :
+      /// Constructeurs ///
+      CInterpolateAxis(void);
+      explicit CInterpolateAxis(const StdString& id);
+
+      /// Destructeur ///
+      virtual ~CInterpolateAxis(void);
+
+      virtual void checkValid(CAxis* axisDest);
+
+      std::vector<StdString> checkAuxInputs_();
+
+      /// Accesseurs statiques ///
+      static StdString GetName(void);
+      static StdString GetDefName(void);
+      static ENodeType GetType(void);
+    private:
+      static bool registerTrans();
+      static CTransformation<CAxis>* create(const StdString& id, xml::CXMLNode* node);
+      static bool _dummyRegistered;
+  }; // class CInterpolateAxis
+
+  DECLARE_GROUP(CInterpolateAxis);
+} // namespace xios
+
+#endif // __XIOS_CInterpolateAxis__
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/node/interpolate_domain.cpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/node/interpolate_domain.cpp	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/node/interpolate_domain.cpp	(revision 1749)
@@ -0,0 +1,70 @@
+#include "interpolate_domain.hpp"
+#include "type.hpp"
+
+namespace xios {
+
+  /// ////////////////////// DÃ©finitions ////////////////////// ///
+
+  CInterpolateDomain::CInterpolateDomain(void)
+    : CObjectTemplate<CInterpolateDomain>(), CInterpolateDomainAttributes(), CTransformation<CDomain>()
+  { /* Ne rien faire de plus */ }
+
+  CInterpolateDomain::CInterpolateDomain(const StdString & id)
+    : CObjectTemplate<CInterpolateDomain>(id), CInterpolateDomainAttributes(), CTransformation<CDomain>()
+  { /* Ne rien faire de plus */ }
+
+  CInterpolateDomain::~CInterpolateDomain(void)
+  {}
+
+  CTransformation<CDomain>* CInterpolateDomain::create(const StdString& id, xml::CXMLNode* node)
+  {
+    CInterpolateDomain* interpDomain = CInterpolateDomainGroup::get("interpolate_domain_definition")->createChild(id);
+    if (node) interpDomain->parse(*node);
+    return static_cast<CTransformation<CDomain>*>(interpDomain);
+  }
+
+  bool CInterpolateDomain::_dummyRegistered = CInterpolateDomain::registerTrans();
+  bool CInterpolateDomain::registerTrans()
+  {
+    registerTransformation(TRANS_INTERPOLATE_DOMAIN, create);
+  }
+
+  //----------------------------------------------------------------
+
+  StdString CInterpolateDomain::GetName(void)    { return StdString("interpolate_domain"); }
+  StdString CInterpolateDomain::GetDefName(void) { return StdString("interpolate_domain"); }
+  ENodeType CInterpolateDomain::GetType(void)    { return eInterpolateDomain; }
+
+  void CInterpolateDomain::checkValid(CDomain* domainSrc)
+  {
+    int order = 2;
+    if (!this->order.isEmpty()) order = this->order.getValue();
+    else this->order.setValue(order);
+    if (order < 1)
+    {
+       ERROR("void CInterpolateDomain::checkValid(CDomain* domainSrc)",
+             << "Interpolation order is less than 1, it should be greater than 0."
+             << "Please define a correct one") ;
+    }
+
+    bool detect_missing_value=false ;
+    if (!this->detect_missing_value.isEmpty()) detect_missing_value = this->detect_missing_value.getValue();
+    else this->detect_missing_value.setValue(detect_missing_value);
+
+    bool renormalize=false ;
+    if (!this->renormalize.isEmpty()) renormalize = this->renormalize.getValue();
+    else this->renormalize.setValue(renormalize);
+
+    bool quantity=false ;
+    if (!this->quantity.isEmpty()) quantity = this->quantity.getValue();
+    else this->quantity.setValue(quantity);
+
+    if (this->mode.isEmpty()) this->mode.setValue(mode_attr::compute);
+    if (this->write_weight.isEmpty()) this->write_weight.setValue(false);
+
+    if (this->read_write_convention.isEmpty()) this->read_write_convention.setValue(read_write_convention_attr::fortran);
+
+
+  }
+
+}
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/node/interpolate_domain.hpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/node/interpolate_domain.hpp	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/node/interpolate_domain.hpp	(revision 1749)
@@ -0,0 +1,67 @@
+#ifndef __XIOS_CInterpolateDomain__
+#define __XIOS_CInterpolateDomain__
+
+/// xios headers ///
+#include "xios_spl.hpp"
+#include "attribute_enum.hpp"
+#include "attribute_enum_impl.hpp"
+#include "attribute_array.hpp"
+#include "declare_attribute.hpp"
+#include "object_template.hpp"
+#include "group_factory.hpp"
+#include "declare_group.hpp"
+#include "transformation.hpp"
+#include "domain.hpp"
+
+namespace xios {
+  /// ////////////////////// DÃ©clarations ////////////////////// ///
+  class CInterpolateDomainGroup;
+  class CInterpolateDomainAttributes;
+  class CInterpolateDomain;
+  class CDomain;
+
+  ///--------------------------------------------------------------
+
+  // Declare/Define CFileAttribute
+  BEGIN_DECLARE_ATTRIBUTE_MAP(CInterpolateDomain)
+#include "interpolate_domain_attribute.conf"
+  END_DECLARE_ATTRIBUTE_MAP(CInterpolateDomain)
+
+  ///--------------------------------------------------------------
+  /*!
+    \class CInterpolateDomain
+    This class describes interpolate_from_file_domain in xml file.
+  */
+  class CInterpolateDomain
+    : public CObjectTemplate<CInterpolateDomain>
+    , public CInterpolateDomainAttributes
+    , public CTransformation<CDomain>
+  {
+    public :
+      typedef CObjectTemplate<CInterpolateDomain> SuperClass;
+      typedef CInterpolateDomainAttributes SuperClassAttribute;
+
+    public :
+      /// Constructeurs ///
+      CInterpolateDomain(void);
+      explicit CInterpolateDomain(const StdString& id);
+
+      /// Destructeur ///
+      virtual ~CInterpolateDomain(void);
+
+      virtual void checkValid(CDomain* domainSource);
+
+      /// Accesseurs statiques ///
+      static StdString GetName(void);
+      static StdString GetDefName(void);
+      static ENodeType GetType(void);
+    private:
+      static bool registerTrans();
+      static CTransformation<CDomain>* create(const StdString& id, xml::CXMLNode* node);
+      static bool _dummyRegistered;
+  }; // class CInterpolateDomain
+
+  DECLARE_GROUP(CInterpolateDomain);
+} // namespace xios
+
+#endif // __XIOS_CInterpolateDomain__
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/node/inverse_axis.cpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/node/inverse_axis.cpp	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/node/inverse_axis.cpp	(revision 1749)
@@ -0,0 +1,41 @@
+#include "inverse_axis.hpp"
+#include "type.hpp"
+
+namespace xios {
+
+  /// ////////////////////// DÃ©finitions ////////////////////// ///
+
+  CInverseAxis::CInverseAxis(void)
+    : CObjectTemplate<CInverseAxis>(), CInverseAxisAttributes(), CTransformation<CAxis>()
+  { /* Ne rien faire de plus */ }
+
+  CInverseAxis::CInverseAxis(const StdString & id)
+    : CObjectTemplate<CInverseAxis>(id), CInverseAxisAttributes(), CTransformation<CAxis>()
+  { /* Ne rien faire de plus */ }
+
+  CInverseAxis::~CInverseAxis(void)
+  {}
+
+  CTransformation<CAxis>* CInverseAxis::create(const StdString& id, xml::CXMLNode* node)
+  {
+    CInverseAxis* invAxis = CInverseAxisGroup::get("inverse_axis_definition")->createChild(id);
+    if (node) invAxis->parse(*node);
+    return static_cast<CTransformation<CAxis>*>(invAxis);
+  }
+
+  bool CInverseAxis::registerTrans()
+  {
+    return registerTransformation(TRANS_INVERSE_AXIS, CInverseAxis::create);
+  }
+
+  bool CInverseAxis::_dummyRegistered = CInverseAxis::registerTrans();
+
+  //----------------------------------------------------------------
+  StdString CInverseAxis::GetName(void)    { return StdString("inverse_axis"); }
+  StdString CInverseAxis::GetDefName(void) { return StdString("inverse_axis"); }
+  ENodeType CInverseAxis::GetType(void)    { return eInverseAxis; }
+
+  void CInverseAxis::checkValid(CAxis* axisSrc)
+  {}
+
+}
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/node/inverse_axis.hpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/node/inverse_axis.hpp	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/node/inverse_axis.hpp	(revision 1749)
@@ -0,0 +1,67 @@
+#ifndef __XIOS_CInverseAxis__
+#define __XIOS_CInverseAxis__
+
+/// xios headers ///
+#include "xios_spl.hpp"
+#include "attribute_enum.hpp"
+#include "attribute_enum_impl.hpp"
+#include "attribute_array.hpp"
+#include "declare_attribute.hpp"
+#include "object_template.hpp"
+#include "group_factory.hpp"
+#include "declare_group.hpp"
+#include "transformation.hpp"
+
+namespace xios {
+  /// ////////////////////// DÃ©clarations ////////////////////// ///
+  class CInverseAxisGroup;
+  class CInverseAxisAttributes;
+  class CInverseAxis;
+  class CAxis;
+  ///--------------------------------------------------------------
+
+  // Declare/Define CFileAttribute
+  BEGIN_DECLARE_ATTRIBUTE_MAP(CInverseAxis)
+#include "inverse_axis_attribute.conf"
+  END_DECLARE_ATTRIBUTE_MAP(CInverseAxis)
+
+  ///--------------------------------------------------------------
+  /*!
+    \class CInverseAxis
+    This class describes inverse_axis in xml file.
+  */
+  class CInverseAxis
+    : public CObjectTemplate<CInverseAxis>
+    , public CInverseAxisAttributes
+    , public CTransformation<CAxis>
+  {
+    public :
+      typedef CObjectTemplate<CInverseAxis> SuperClass;
+      typedef CInverseAxisAttributes SuperClassAttribute;
+
+    public :
+      /// Constructeurs ///
+      CInverseAxis(void);
+      explicit CInverseAxis(const StdString& id);
+
+      /// Destructeur ///
+      virtual ~CInverseAxis(void);
+
+      virtual void checkValid(CAxis* axisDest);
+
+      /// Accesseurs statiques ///
+      static StdString GetName(void);
+      static StdString GetDefName(void);
+      static ENodeType GetType(void);
+
+    private:
+      static bool registerTrans();
+      static CTransformation<CAxis>* create(const StdString& id, xml::CXMLNode* node);
+      static bool _dummyRegistered;
+
+  }; // class CInverseAxis
+
+  DECLARE_GROUP(CInverseAxis);
+} // namespace xios
+
+#endif // __XIOS_CInverseAxis__
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/node/mesh.cpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/node/mesh.cpp	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/node/mesh.cpp	(revision 1749)
@@ -0,0 +1,2127 @@
+/*!
+  \file mesh.cpp
+  \author Olga Abramkina
+  \brief Definition of class CMesh.
+*/
+
+#include "mesh.hpp"
+#include <boost/functional/hash.hpp>
+//#include <unordered_map>
+
+namespace xios {
+
+/// ////////////////////// DÃ©finitions ////////////////////// ///
+
+  CMesh::CMesh(void) :  nbNodesGlo(0), nbEdgesGlo(0)
+            ,  node_start(0), node_count(0)
+            ,  edge_start(0), edge_count(0)
+            ,  nbFaces_(0), nbNodes_(0), nbEdges_(0)
+            ,  nodesAreWritten(false), edgesAreWritten(false), facesAreWritten(false)
+            ,  node_lon(), node_lat()
+            ,  edge_lon(), edge_lat(), edge_nodes()
+            ,  face_lon(), face_lat()
+            ,  face_nodes()
+            ,  pNodeGlobalIndex(NULL), pEdgeGlobalIndex(NULL)
+  {
+  }
+
+
+  CMesh::~CMesh(void)
+  {
+    if (pNodeGlobalIndex != NULL) delete pNodeGlobalIndex;
+    if (pEdgeGlobalIndex != NULL) delete pEdgeGlobalIndex;
+  }
+
+  std::map <StdString, CMesh> CMesh::meshList = std::map <StdString, CMesh>();
+  std::map <StdString, vector<int> > CMesh::domainList = std::map <StdString, vector<int> >();
+
+///---------------------------------------------------------------
+/*!
+ * \fn bool CMesh::getMesh (StdString meshName)
+ * Returns a pointer to a mesh. If a mesh has not been created, creates it and adds its name to the list of meshes meshList.
+ * \param [in] meshName  The name of a mesh ("name" attribute of a domain).
+ * \param [in] nvertex Number of verteces (1 for nodes, 2 for edges, 3 and up for faces).
+ */
+  CMesh* CMesh::getMesh (StdString meshName, int nvertex)
+  {
+    CMesh::domainList[meshName].push_back(nvertex);
+
+    if ( CMesh::meshList.begin() != CMesh::meshList.end() )
+    {
+      for (std::map<StdString, CMesh>::iterator it=CMesh::meshList.begin(); it!=CMesh::meshList.end(); ++it)
+      {
+        if (it->first == meshName)
+          return &meshList[meshName];
+        else
+        {
+          CMesh newMesh;
+          CMesh::meshList.insert( make_pair(meshName, newMesh) );
+          return &meshList[meshName];
+        }
+      }
+    }
+    else
+    {
+      CMesh newMesh;
+      CMesh::meshList.insert( make_pair(meshName, newMesh) );
+      return &meshList[meshName];
+    }
+  }
+
+///----------------------------------------------------------------
+  size_t hashPair(size_t first, size_t second)
+  {
+    HashXIOS<size_t> sizetHash;
+    size_t seed = sizetHash(first) + 0x9e3779b9 ;
+    seed ^= sizetHash(second) + 0x9e3779b9 + (seed << 6) + (seed >> 2);
+    return seed ;
+  }
+
+///----------------------------------------------------------------
+  size_t hashPairOrdered(size_t first, size_t second)
+  {
+    size_t seed;
+    HashXIOS<size_t> sizetHash;
+    if (first < second)
+    {
+      seed = sizetHash(first) + 0x9e3779b9 ;
+      seed ^= sizetHash(second) + 0x9e3779b9 + (seed << 6) + (seed >> 2);
+    }
+    else
+    {
+      seed = sizetHash(second) + 0x9e3779b9 ;
+      seed ^= sizetHash(first) + 0x9e3779b9 + (seed << 6) + (seed >> 2);
+    }
+    return seed ;
+  }
+
+///----------------------------------------------------------------
+/*!
+ * \fn size_t generateNodeIndex(vector<size_t>& valList, int rank)
+ * Generates a node index.
+ * If the same node is generated by two processes, each process will have its own node index.
+ * \param [in] valList Vector storing four node hashes.
+ * \param [in] rank MPI process rank.
+ */
+  size_t generateNodeIndex(vector<size_t>& valList, int rank)
+  {
+    // Sort is needed to avoid problems for nodes with lon = 0 generated by faces in east and west semisphere
+    vector<size_t> vec = valList;
+    sort (vec.begin(), vec.end());
+    size_t seed = rank ;
+    int it = 0;
+    for(; it != vec.size(); ++it)
+    {
+       seed = hashPair(seed, vec[it]);
+    }
+    return seed ;
+  }
+
+  ///----------------------------------------------------------------
+  /*!
+   * \fn size_t generateNodeIndex(vector<size_t>& valList)
+   * Generates a node index unique for all processes.
+   * \param [in] valList Vector storing four node hashes.
+   */
+    size_t generateNodeIndex(vector<size_t>& valList)
+    {
+      // Sort is needed to avoid problems for nodes with lon = 0 generated by faces in east and west semisphere
+      vector<size_t> vec = valList;
+      sort (vec.begin(), vec.end());
+      size_t seed = vec[0] ;
+      int it = 1;
+      for(; it != vec.size(); ++it)
+      {
+         seed = hashPair(seed, vec[it]);
+      }
+      return seed ;
+    }
+
+///----------------------------------------------------------------
+/*!
+ * \fn CArray<size_t,1>& CMesh::createHashes (const double longitude, const double latitude)
+ * Creates two hash values for each dimension, longitude and latitude.
+ * \param [in] longitude Node longitude in degrees.
+ * \param [in] latitude Node latitude in degrees ranged from 0 to 360.
+ */
+
+  vector<size_t> CMesh::createHashes (const double longitude, const double latitude)
+  {
+    double minBoundLon = 0. ;
+    double maxBoundLon = 360. ;
+    double minBoundLat = -90. ;
+    double maxBoundLat = 90. ;
+    double prec=1e-11 ;
+    double precLon=prec ;
+    double precLat=prec ;
+    double lon = longitude;
+    double lat = latitude;
+
+    if (lon > (360.- prec)) lon = 0.;
+
+    size_t maxsize_t=numeric_limits<size_t>::max() ;
+    if ( (maxBoundLon-minBoundLon)/maxsize_t > precLon) precLon=(maxBoundLon-minBoundLon)/maxsize_t ;
+    if ( (maxBoundLat-minBoundLat)/maxsize_t > precLat) precLat=(maxBoundLat-minBoundLat)/maxsize_t ;
+
+    size_t iMinLon=0 ;
+    size_t iMaxLon=(maxBoundLon-minBoundLon)/precLon ;
+    size_t iMinLat=0 ;
+    size_t iMaxLat=(maxBoundLat-minBoundLat)/precLat ;
+
+    vector<size_t> hash(4);
+    size_t lon0,lon1,lat0,lat1 ;
+
+    lon0=(lon-minBoundLon)/precLon ;
+    if ( ((lon0+1)*precLon + lon0*precLon)/2 > lon-minBoundLon)
+    {
+      if (lon0==iMinLon) lon1=iMaxLon ;
+      else lon1=lon0-1 ;
+    }
+    else
+    {
+      if (lon0==iMaxLon) lon1=iMinLon ;
+      else lon1=lon0+1 ;
+    }
+
+    lat0=(lat-minBoundLat)/precLat ;
+    if ( ((lat0+1)*precLat + lat0*precLat)/2 > lat-minBoundLat)
+    {
+      if (lat0==iMinLat) lat1=lat0 ;
+      else lat1=lat0-1 ;
+    }
+    else
+    {
+      if (lat0==iMaxLat) lat1=lat0 ;
+      else lat1=lat0+1 ;
+    }
+
+    hash[0] = hashPair(lon0,lat0) ;
+    hash[1] = hashPair(lon0,lat1) ;
+    hash[2] = hashPair(lon1,lat0) ;
+    hash[3] = hashPair(lon1,lat1) ;
+
+    return hash;
+
+  } // createHashes
+
+///----------------------------------------------------------------
+  std::pair<int,int> make_ordered_pair(int a, int b)
+  {
+    if ( a < b )
+      return std::pair<int,int>(a,b);
+    else
+      return std::pair<int,int>(b,a);
+  }
+
+///----------------------------------------------------------------
+/*!
+ * \fn void CMesh::createMesh(const CArray<double, 1>& lonvalue, const CArray<double, 1>& latvalue,
+            const CArray<double, 2>& bounds_lon, const CArray<double, 2>& bounds_lat)
+ * Creates or updates a mesh for the three types of mesh elements: nodes, edges, and faces.
+ * \param [in] lonvalue  Array of longitudes.
+ * \param [in] latvalue  Array of latitudes.
+ * \param [in] bounds_lon Array of boundary longitudes. Its size depends on the element type.
+ * \param [in] bounds_lat Array of boundary latitudes. Its size depends on the element type.
+ */
+//  void CMesh::createMesh(const CArray<double, 1>& lonvalue, const CArray<double, 1>& latvalue,
+//            const CArray<double, 2>& bounds_lon, const CArray<double, 2>& bounds_lat)
+//  {
+//    int nvertex = (bounds_lon.numElements() == 0) ? 1 : bounds_lon.rows();
+//
+//    if (nvertex == 1)
+//    {
+//      nbNodes_ = lonvalue.numElements();
+//      node_lon.resizeAndPreserve(nbNodes_);
+//      node_lat.resizeAndPreserve(nbNodes_);
+//      for (int nn = 0; nn < nbNodes_; ++nn)
+//      {
+//        if (map_nodes.find(make_pair (lonvalue(nn), latvalue(nn))) == map_nodes.end())
+//        {
+//          map_nodes[make_pair (lonvalue(nn), latvalue(nn))] = nn ;
+//          node_lon(nn) = lonvalue(nn);
+//          node_lat(nn) = latvalue(nn);
+//        }
+//      }
+//    }
+//    else if (nvertex == 2)
+//    {
+//      nbEdges_ = bounds_lon.shape()[1];
+//
+//      // Create nodes and edge_node connectivity
+//      node_lon.resizeAndPreserve(nbEdges_*nvertex); // Max possible number of nodes
+//      node_lat.resizeAndPreserve(nbEdges_*nvertex);
+//      edge_nodes.resizeAndPreserve(nvertex, nbEdges_);
+//
+//      for (int ne = 0; ne < nbEdges_; ++ne)
+//      {
+//        for (int nv = 0; nv < nvertex; ++nv)
+//        {
+//          if (map_nodes.find(make_pair (bounds_lon(nv, ne), bounds_lat(nv ,ne))) == map_nodes.end())
+//          {
+//            map_nodes[make_pair (bounds_lon(nv, ne), bounds_lat(nv, ne))] = nbNodes_ ;
+//            edge_nodes(nv,ne) = nbNodes_ ;
+//            node_lon(nbNodes_) = bounds_lon(nv, ne);
+//            node_lat(nbNodes_) = bounds_lat(nv, ne);
+//            ++nbNodes_ ;
+//          }
+//          else
+//            edge_nodes(nv,ne) = map_nodes[make_pair (bounds_lon(nv, ne), bounds_lat(nv ,ne))];
+//        }
+//      }
+//      node_lon.resizeAndPreserve(nbNodes_);
+//      node_lat.resizeAndPreserve(nbNodes_);
+//
+//      // Create edges
+//      edge_lon.resizeAndPreserve(nbEdges_);
+//      edge_lat.resizeAndPreserve(nbEdges_);
+//
+//      for (int ne = 0; ne < nbEdges_; ++ne)
+//      {
+//        if (map_edges.find(make_ordered_pair (edge_nodes(0,ne), edge_nodes(1,ne))) == map_edges.end())
+//        {
+//          map_edges[make_ordered_pair ( edge_nodes(0,ne), edge_nodes(1,ne) )] = ne ;
+//          edge_lon(ne) = lonvalue(ne);
+//          edge_lat(ne) = latvalue(ne);
+//        }
+//
+//      }
+//      edgesAreWritten = true;
+//    }
+//    else
+//    {
+//      nbFaces_ = bounds_lon.shape()[1];
+//
+//      // Create nodes and face_node connectivity
+//      node_lon.resizeAndPreserve(nbFaces_*nvertex);  // Max possible number of nodes
+//      node_lat.resizeAndPreserve(nbFaces_*nvertex);
+//      face_nodes.resize(nvertex, nbFaces_);
+//
+//      for (int nf = 0; nf < nbFaces_; ++nf)
+//      {
+//        for (int nv = 0; nv < nvertex; ++nv)
+//        {
+//          if (map_nodes.find(make_pair (bounds_lon(nv, nf), bounds_lat(nv ,nf))) == map_nodes.end())
+//          {
+//            map_nodes[make_pair (bounds_lon(nv, nf), bounds_lat(nv, nf))] = nbNodes_ ;
+//            face_nodes(nv,nf) = nbNodes_ ;
+//            node_lon(nbNodes_) = bounds_lon(nv, nf);
+//            node_lat(nbNodes_) = bounds_lat(nv ,nf);
+//            ++nbNodes_ ;
+//          }
+//          else
+//          {
+//            face_nodes(nv,nf) = map_nodes[make_pair (bounds_lon(nv, nf), bounds_lat(nv ,nf))];
+//          }
+//        }
+//      }
+//      node_lon.resizeAndPreserve(nbNodes_);
+//      node_lat.resizeAndPreserve(nbNodes_);
+//
+//      // Create edges and edge_nodes connectivity
+//      edge_lon.resizeAndPreserve(nbFaces_*nvertex); // Max possible number of edges
+//      edge_lat.resizeAndPreserve(nbFaces_*nvertex);
+//      edge_nodes.resizeAndPreserve(2, nbFaces_*nvertex);
+//      edge_faces.resize(2, nbFaces_*nvertex);
+//      face_edges.resize(nvertex, nbFaces_);
+//      face_faces.resize(nvertex, nbFaces_);
+//
+//      vector<int> countEdges(nbFaces_*nvertex);   // needed in case if edges have been already generated
+//      vector<int> countFaces(nbFaces_);
+//      countEdges.assign(nbFaces_*nvertex, 0);
+//      countFaces.assign(nbFaces_, 0);
+//      int edge;
+//      for (int nf = 0; nf < nbFaces_; ++nf)
+//      {
+//        for (int nv1 = 0; nv1 < nvertex; ++nv1)
+//        {
+//          int nv = 0;
+//          int nv2 = (nv1 < nvertex -1 ) ? (nv1 + 1) : (nv1 + 1 - nvertex); // cyclic rotation
+//          if (map_edges.find(make_ordered_pair (face_nodes(nv1,nf), face_nodes(nv2,nf))) == map_edges.end())
+//          {
+//            map_edges[make_ordered_pair (face_nodes(nv1,nf), face_nodes(nv2,nf))] = nbEdges_ ;
+//            face_edges(nv1,nf) = map_edges[make_ordered_pair (face_nodes(nv1,nf), face_nodes(nv2,nf))];
+//            edge_faces(0,nbEdges_) = nf;
+//            edge_faces(1,nbEdges_) = -999;
+//            face_faces(nv1,nf) = 999999;
+//            edge_nodes(Range::all(),nbEdges_) = face_nodes(nv1,nf), face_nodes(nv2,nf);
+//            edge_lon(nbEdges_) = ( abs( node_lon(face_nodes(nv1,nf)) - node_lon(face_nodes(nv2,nf))) < 180.) ?
+//                        (( node_lon(face_nodes(nv1,nf)) + node_lon(face_nodes(nv2,nf))) * 0.5) :
+//                        (( node_lon(face_nodes(nv1,nf)) + node_lon(face_nodes(nv2,nf))) * 0.5 -180.);
+//            edge_lat(nbEdges_) = ( node_lat(face_nodes(nv1,nf)) + node_lat(face_nodes(nv2,nf)) ) * 0.5;
+//            ++nbEdges_;
+//          }
+//          else
+//          {
+//            edge = map_edges[make_ordered_pair (face_nodes(nv1,nf), face_nodes(nv2,nf))];
+//            face_edges(nv1,nf) = edge;
+//            if (edgesAreWritten)
+//            {
+//              edge_faces(countEdges[edge], edge) = nf;
+//              if (countEdges[edge]==0)
+//              {
+//                face_faces(nv1,nf) = 999999;
+//              }
+//              else
+//              {
+//                int face1 = nf; // = edge_faces(1,edge)
+//                int face2 = edge_faces(0,edge);
+//                face_faces(countFaces[face1], face1) =  face2;
+//                face_faces(countFaces[face2], face2) =  face1;
+//                ++(countFaces[face1]);
+//                ++(countFaces[face2]);
+//              }
+//            }
+//            else
+//            {
+//              edge_faces(1,edge) = nf;
+//              int face1 = nf; // = edge_faces(1,edge)
+//              int face2 = edge_faces(0,edge);
+//              face_faces(countFaces[face1], face1) =  face2;
+//              face_faces(countFaces[face2], face2) =  face1;
+//              ++(countFaces[face1]);
+//              ++(countFaces[face2]);
+//            }
+//            ++(countEdges[edge]);
+//          }
+//        }
+//      }
+//      edge_nodes.resizeAndPreserve(2, nbEdges_);
+//      edge_faces.resizeAndPreserve(2, nbEdges_);
+//      edge_lon.resizeAndPreserve(nbEdges_);
+//      edge_lat.resizeAndPreserve(nbEdges_);
+//
+//      // Create faces
+//      face_lon.resize(nbFaces_);
+//      face_lat.resize(nbFaces_);
+//      face_lon = lonvalue;
+//      face_lat = latvalue;
+//      facesAreWritten = true;
+//
+//    } // nvertex > 2
+//
+//  } // createMesh()
+
+///----------------------------------------------------------------
+/*!
+ * \fn void CMesh::createMeshEpsilon(const CArray<double, 1>& lonvalue, const CArray<double, 1>& latvalue,
+            const CArray<double, 2>& bounds_lon, const CArray<double, 2>& bounds_lat)
+ * Creates or updates a mesh for the three types of mesh elements: nodes, edges, and faces.
+ * Precision check is implemented with two hash values for each dimension, longitude and latitude.
+ * \param [in] comm
+ * \param [in] lonvalue  Array of longitudes.
+ * \param [in] latvalue  Array of latitudes.
+ * \param [in] bounds_lon Array of boundary longitudes. Its size depends on the element type.
+ * \param [in] bounds_lat Array of boundary latitudes. Its size depends on the element type.
+ */
+  void CMesh::createMeshEpsilon(const MPI_Comm& comm,
+                                const CArray<double, 1>& lonvalue, const CArray<double, 1>& latvalue,
+                                const CArray<double, 2>& bounds_lon, const CArray<double, 2>& bounds_lat)
+  {
+
+    int nvertex = (bounds_lon.numElements() == 0) ? 1 : bounds_lon.rows();
+    int mpiRank, mpiSize;
+    MPI_Comm_rank(comm, &mpiRank);
+    MPI_Comm_size(comm, &mpiSize);
+    double prec = 1e-11;  // used in calculations of edge_lon/lat
+
+    if (nvertex == 1)
+    {
+      nbNodes_ = lonvalue.numElements();
+      node_lon.resize(nbNodes_);
+      node_lat.resize(nbNodes_);
+      node_lon = lonvalue;
+      node_lat = latvalue;
+
+      // Global node indexes
+      vector<size_t> hashValues(4);
+      CClientClientDHTSizet::Index2VectorInfoTypeMap nodeHash2IdxGlo;
+      for (size_t nn = 0; nn < nbNodes_; ++nn)
+      {
+        hashValues = CMesh::createHashes(lonvalue(nn), latvalue(nn));
+        for (size_t nh = 0; nh < 4; ++nh)
+        {
+          nodeHash2IdxGlo[hashValues[nh]].push_back(mpiRank*nbNodes_ + nn);
+        }
+      }
+      pNodeGlobalIndex = new CClientClientDHTSizet (nodeHash2IdxGlo, comm);
+      nodesAreWritten = true;
+    }
+
+    else if (nvertex == 2)
+    {
+      nbEdges_ = bounds_lon.shape()[1];
+      edge_lon.resize(nbEdges_);
+      edge_lat.resize(nbEdges_);
+      edge_lon = lonvalue;
+      edge_lat = latvalue;
+      edge_nodes.resize(nvertex, nbEdges_);
+
+      // For determining the global edge index
+      unsigned long nbEdgesOnProc = nbEdges_;
+      unsigned long nbEdgesAccum;
+      MPI_Scan(&nbEdgesOnProc, &nbEdgesAccum, 1, MPI_UNSIGNED_LONG, MPI_SUM, comm);
+      nbEdgesAccum -= nbEdges_;
+
+      CClientClientDHTSizet::Index2VectorInfoTypeMap edgeHash2IdxGlo;
+      CClientClientDHTSizet::Index2VectorInfoTypeMap edgeHash2Idx;
+
+      // Case (1): node indexes have been generated by domain "nodes"
+      if (nodesAreWritten)
+      {
+        vector<size_t> hashValues(4);
+        CArray<size_t,1> nodeHashList(nbEdges_*nvertex*4);
+        for (int ne = 0; ne < nbEdges_; ++ne)      // size_t doesn't work with CArray<double, 2>
+        {
+          for (int nv = 0; nv < nvertex; ++nv)
+          {
+            hashValues = CMesh::createHashes(bounds_lon(nv, ne), bounds_lat(nv, ne));
+            for (int nh = 0; nh < 4; ++nh)
+            {
+              nodeHashList((ne*nvertex + nv)*4 + nh) = hashValues[nh];
+            }
+          }
+        }
+
+        // Recuperating the node global indexing and writing edge_nodes
+        // Creating map edgeHash2IdxGlo <hash, idxGlo>
+        pNodeGlobalIndex->computeIndexInfoMapping(nodeHashList);
+        CClientClientDHTSizet::Index2VectorInfoTypeMap& nodeHash2IdxGlo = pNodeGlobalIndex->getInfoIndexMap();
+        CClientClientDHTSizet::Index2VectorInfoTypeMap::iterator it;
+        size_t nodeIdxGlo1, nodeIdxGlo2;
+        for (int ne = 0; ne < nbEdges_; ++ne)
+        {
+          for (int nv = 0; nv < nvertex; ++nv)
+          {
+            int nh = 0;
+            it = nodeHash2IdxGlo.find(nodeHashList((ne*nvertex + nv)*4 + nh));
+            // The loop below is needed in case if a hash generated by domain "edges" differs
+            // from that generated by domain "nodes" because of possible precision issues
+            while (it == nodeHash2IdxGlo.end())
+            {
+              ++nh;
+              it = nodeHash2IdxGlo.find(nodeHashList((ne*nvertex + nv)*4 + nh));
+            }
+            edge_nodes(nv,ne) = it->second[0];
+            if (nv ==0)
+              nodeIdxGlo1 = it->second[0];
+            else
+              nodeIdxGlo2 = it->second[0];
+          }
+          size_t edgeIdxGlo = nbEdgesAccum + ne;
+          edgeHash2IdxGlo[ hashPairOrdered(nodeIdxGlo1, nodeIdxGlo2) ].push_back(edgeIdxGlo);
+        }
+      } // nodesAreWritten
+
+
+      // Case (2): node indexes have not been generated previously
+      else
+      {
+        // (2.1) Creating a list of hashes for each node and a map nodeHash2Idx <hash, <idx,rank> >
+        vector<size_t> hashValues(4);
+        CClientClientDHTSizet::Index2VectorInfoTypeMap nodeHash2Idx;
+        CArray<size_t,1> nodeHashList(nbEdges_*nvertex*4);
+        int nbHash = 0;
+        for (int ne = 0; ne < nbEdges_; ++ne)
+        {
+          for (int nv = 0; nv < nvertex; ++nv)
+          {
+            hashValues = CMesh::createHashes(bounds_lon(nv, ne), bounds_lat(nv, ne));
+            for (int nh = 0; nh < 4; ++nh)
+            {
+              if (nodeHash2Idx[hashValues[nh]].size() == 0)
+              {
+                nodeHash2Idx[hashValues[nh]].push_back(generateNodeIndex(hashValues));
+                nodeHash2Idx[hashValues[nh]].push_back(mpiRank);
+                nodeHashList(nbHash) = hashValues[nh];
+                ++nbHash;
+              }
+            }
+          }
+        }
+        nodeHashList.resizeAndPreserve(nbHash);
+
+        // (2.2) Generating global node indexes
+        // The ownership criterion: priority of the process of smaller index
+        // Maps generated in this step are:
+        // Maps generated in this step are:
+         // nodeHash2Info = <hash, [[idx, rankMin], [idx, rank1], [idx, rank3]..]>
+         // nodeIdx2Idx = <idx, <rankOwner, idx>>
+
+         CClientClientDHTSizet dhtNodeHash(nodeHash2Idx, comm);
+         dhtNodeHash.computeIndexInfoMapping(nodeHashList);
+         CClientClientDHTSizet::Index2VectorInfoTypeMap& nodeHash2Info = dhtNodeHash.getInfoIndexMap();
+
+
+         CClientClientDHTSizet::Index2VectorInfoTypeMap nodeIdx2Idx;
+         CArray<size_t,1> nodeIdxList(nbEdges_*nvertex*4);
+         size_t nIdx = 0;
+
+         for (CClientClientDHTSizet::Index2VectorInfoTypeMap::iterator it = nodeHash2Info.begin(); it != nodeHash2Info.end(); ++it)
+         {
+           size_t rankMin = (it->second)[1];
+           size_t idx = (it->second)[0];
+           for (int i = 2; i < (it->second).size();)
+           {
+             if ( (it->second)[i+1] < rankMin)
+             {
+               idx = (it->second)[i];
+               rankMin = (it->second)[i+1];
+               (it->second)[i+1] = (it->second)[i-1];
+             }
+             i += 2;
+           }
+           if (nodeIdx2Idx.count(idx) == 0)
+           {
+             if (mpiRank == rankMin)
+             {
+               nodeIdx2Idx[idx].push_back(rankMin);
+               nodeIdx2Idx[idx].push_back(idx);
+             }
+             nodeIdxList(nIdx) = idx;
+             ++nIdx;
+           }
+         }
+         nodeIdxList.resizeAndPreserve(nIdx);
+
+         // CDHTAutoIndexing will not give consistent node numbering for varying number of procs. =>
+         // Solution: global node indexing by hand.
+         // Maps modified in this step:
+         // nodeIdx2Idx = <idx, idxGlo>
+         unsigned long nodeCount = nodeIdx2Idx.size();
+         unsigned long nodeStart, nbNodes;
+         MPI_Scan(&nodeCount, &nodeStart, 1, MPI_UNSIGNED_LONG, MPI_SUM, comm);
+         int nNodes = nodeStart;
+         MPI_Bcast(&nNodes, 1, MPI_UNSIGNED_LONG, mpiSize-1, comm);
+         nbNodesGlo = nNodes;
+
+         nodeStart -= nodeCount;
+         node_start = nodeStart;
+         node_count = nodeCount;
+         CClientClientDHTSizet::Index2VectorInfoTypeMap dummyMap; // just a dummy map used to ensure that each node is numbered only once
+         size_t count = 0;
+
+         for (int ne = 0; ne < nbEdges_; ++ne)
+         {
+           for (int nv = 0; nv < nvertex; ++nv)
+           {
+             vector<size_t> hashValues = CMesh::createHashes(bounds_lon(nv, ne), bounds_lat(nv, ne));
+             size_t nodeIdx = generateNodeIndex(hashValues);
+             CClientClientDHTSizet::Index2VectorInfoTypeMap::iterator it = nodeIdx2Idx.find(nodeIdx);
+             if (it != nodeIdx2Idx.end())
+             {
+               if (dummyMap.count(nodeIdx) == 0)
+               {
+                 dummyMap[nodeIdx].push_back(nodeIdx);
+                 (it->second)[1] = node_start + count;
+                 ++count;
+               }
+             }
+           }
+         }
+
+         CClientClientDHTSizet dhtNodeIdx(nodeIdx2Idx, comm);
+         dhtNodeIdx.computeIndexInfoMapping(nodeIdxList);
+         CClientClientDHTSizet::Index2VectorInfoTypeMap& nodeIdx2IdxGlo = dhtNodeIdx.getInfoIndexMap();
+
+        // (2.3) Saving variables: node_lon, node_lat, edge_nodes
+        // Creating map nodeHash2IdxGlo <hash, idxGlo>
+        // Creating map edgeHash2IdxGlo <hash, idxGlo>
+//        nbNodesGlo = dhtNodeIdxGlo.getNbIndexesGlobal();
+//        node_count = dhtNodeIdxGlo.getIndexCount();
+//        node_start = dhtNodeIdxGlo.getIndexStart();
+        CClientClientDHTSizet::Index2VectorInfoTypeMap nodeHash2IdxGlo;
+        node_lon.resize(node_count);
+        node_lat.resize(node_count);
+        vector <size_t> edgeNodes;
+        size_t idxGlo = 0;
+
+        for (int ne = 0; ne < nbEdges_; ++ne)
+        {
+          for (int nv = 0; nv < nvertex; ++nv)
+          {
+            hashValues = CMesh::createHashes(bounds_lon(nv, ne), bounds_lat(nv, ne));
+            size_t myIdx = generateNodeIndex(hashValues);
+            CClientClientDHTSizet::Index2VectorInfoTypeMap::iterator itIdx = nodeIdx2IdxGlo.find(myIdx);
+            idxGlo = (itIdx->second)[1];
+
+            if (mpiRank == (itIdx->second)[0])
+            {
+//              node_lon(idxGlo - node_start) = (bounds_lon(nv, ne) == 360.) ? (0.) : (bounds_lon(nv, ne));
+              node_lon(idxGlo - node_start) = bounds_lon(nv, ne);
+              node_lat(idxGlo - node_start) = bounds_lat(nv, ne);
+            }
+            edge_nodes(nv,ne) = idxGlo;
+            for (int nh = 0; nh < 4; ++nh)
+              nodeHash2IdxGlo[hashValues[nh]].push_back(idxGlo);
+            edgeNodes.push_back(idxGlo);
+          }
+          if (edgeNodes[0] != edgeNodes[1])
+          {
+            size_t edgeIdxGlo = nbEdgesAccum + ne;
+            edgeHash2IdxGlo[ hashPairOrdered(edgeNodes[0], edgeNodes[1]) ].push_back(edgeIdxGlo);
+          }
+          edgeNodes.clear();
+        }
+        pNodeGlobalIndex = new CClientClientDHTSizet (nodeHash2IdxGlo, comm);
+      } // !nodesAreWritten
+
+      pEdgeGlobalIndex = new CClientClientDHTSizet (edgeHash2IdxGlo, comm);
+      edgesAreWritten = true;
+    } //nvertex = 2
+
+    else
+    {
+      nbFaces_ = bounds_lon.shape()[1];
+      face_lon.resize(nbFaces_);
+      face_lat.resize(nbFaces_);
+      face_lon = lonvalue;
+      face_lat = latvalue;
+      face_nodes.resize(nvertex, nbFaces_);
+      face_edges.resize(nvertex, nbFaces_);
+
+      // For determining the global face index
+      unsigned long nbFacesOnProc = nbFaces_;
+      unsigned long nbFacesAccum;
+      MPI_Scan(&nbFacesOnProc, &nbFacesAccum, 1, MPI_UNSIGNED_LONG, MPI_SUM, comm);
+      nbFacesAccum -= nbFaces_;
+
+      // Case (1): edges have been previously generated
+      if (edgesAreWritten)
+      {
+        // (1.1) Recuperating node global indexing and saving face_nodes
+        vector<size_t> hashValues(4);
+        CArray<size_t,1> nodeHashList(nbFaces_*nvertex*4);
+        for (int nf = 0; nf < nbFaces_; ++nf)
+        {
+          for (int nv = 0; nv < nvertex; ++nv)
+            {
+              hashValues = CMesh::createHashes(bounds_lon(nv, nf), bounds_lat(nv, nf));
+              for (int nh = 0; nh < 4; ++nh)
+                nodeHashList((nf*nvertex + nv)*4 + nh) = hashValues[nh];
+            }
+        }
+        pNodeGlobalIndex->computeIndexInfoMapping(nodeHashList);
+        CClientClientDHTSizet::Index2VectorInfoTypeMap& nodeHash2IdxGlo = pNodeGlobalIndex->getInfoIndexMap();
+        CClientClientDHTSizet::Index2VectorInfoTypeMap::iterator it1, it2;
+        CArray<size_t,1> edgeHashList(nbFaces_*nvertex);
+        size_t nEdge = 0;
+        for (int nf = 0; nf < nbFaces_; ++nf)
+        {
+          for (int nv1 = 0; nv1 < nvertex; ++nv1)
+          {
+            int nh1 = 0;
+            int nv2 = (nv1 < nvertex -1 ) ? (nv1 + 1) : (nv1 + 1 - nvertex); // cyclic rotation
+            it1 = nodeHash2IdxGlo.find(nodeHashList((nf*nvertex + nv1)*4 + nh1));
+            while (it1 == nodeHash2IdxGlo.end())
+            {
+              ++nh1;
+              it1 = nodeHash2IdxGlo.find(nodeHashList((nf*nvertex + nv1)*4 + nh1));
+            }
+            int nh2 = 0;
+            it2 = nodeHash2IdxGlo.find(nodeHashList((nf*nvertex + nv2)*4 + nh2));
+            while (it2 == nodeHash2IdxGlo.end())
+            {
+              ++nh2;
+              it2 = nodeHash2IdxGlo.find(nodeHashList((nf*nvertex + nv1)*4 + nh2));
+            }
+            face_nodes(nv1,nf) = it1->second[0];
+            if (it1->second[0] != it2->second[0])
+            {
+              edgeHashList(nEdge) = hashPairOrdered(it1->second[0], it2->second[0]);
+              ++nEdge;
+            }
+          }
+        }
+        edgeHashList.resizeAndPreserve(nEdge);
+
+        // (1.2) Recuperating edge global indexing and saving face_edges
+        pEdgeGlobalIndex->computeIndexInfoMapping(edgeHashList);
+        CClientClientDHTSizet::Index2VectorInfoTypeMap& edgeHash2IdxGlo = pEdgeGlobalIndex->getInfoIndexMap();
+        CClientClientDHTSizet::Index2VectorInfoTypeMap::iterator itEdgeHash;
+        CClientClientDHTSizet::Index2VectorInfoTypeMap edgeHash2Rank;
+        CClientClientDHTSizet::Index2VectorInfoTypeMap edgeIdxGlo2Face;
+        CArray<size_t,1> edgeIdxList(nbFaces_*nvertex);
+        size_t iIdx = 0;
+
+        for (int nf = 0; nf < nbFaces_; ++nf)
+        {
+          for (int nv1 = 0; nv1 < nvertex; ++nv1)
+          {
+            int nh1 = 0;
+            int nv2 = (nv1 < nvertex -1 ) ? (nv1 + 1) : (nv1 + 1 - nvertex); // cyclic rotation
+            it1 = nodeHash2IdxGlo.find(nodeHashList((nf*nvertex + nv1)*4 + nh1));
+            while (it1 == nodeHash2IdxGlo.end())
+            {
+              ++nh1;
+              it1 = nodeHash2IdxGlo.find(nodeHashList((nf*nvertex + nv1)*4 + nh1));
+            }
+            int nh2 = 0;
+            it2 = nodeHash2IdxGlo.find(nodeHashList((nf*nvertex + nv2)*4 + nh2));
+            while (it2 == nodeHash2IdxGlo.end())
+            {
+              ++nh2;
+              it2 = nodeHash2IdxGlo.find(nodeHashList((nf*nvertex + nv1)*4 + nh2));
+            }
+            if (it1->second[0] != it2->second[0])
+            {
+              size_t faceIdxGlo = nbFacesAccum + nf;
+              size_t edgeHash = hashPairOrdered(it1->second[0], it2->second[0]);
+              itEdgeHash = edgeHash2IdxGlo.find(edgeHash);
+              size_t edgeIdxGlo = itEdgeHash->second[0];
+              face_edges(nv1,nf) = edgeIdxGlo;
+              if (edgeIdxGlo2Face.count(edgeIdxGlo) == 0)
+              {
+                edgeIdxList(iIdx) = edgeIdxGlo;
+                ++iIdx;
+              }
+              edgeIdxGlo2Face[edgeIdxGlo].push_back(faceIdxGlo);
+              edgeHash2Rank[edgeHash].push_back(mpiRank);
+              edgeHash2Rank[edgeHash].push_back(itEdgeHash->second[0]);
+            }
+            else
+            {
+              face_edges(nv1,nf) = 999999;
+            }
+          }
+        }
+        edgeIdxList.resizeAndPreserve(iIdx);
+
+        // (1.3) Saving remaining variables edge_faces and face_faces
+
+        // Establishing edge ownership
+        // The ownership criterion: priority of the process with smaller rank
+        CClientClientDHTSizet dhtEdgeHash (edgeHash2Rank, comm);
+        dhtEdgeHash.computeIndexInfoMapping(edgeHashList);
+        CClientClientDHTSizet::Index2VectorInfoTypeMap& edgeHash2Info = dhtEdgeHash.getInfoIndexMap();
+
+        // edgeHash2Info = <edgeHash, < rank1, idxGlo, rank2, idxGlo>>
+        int edgeCount = 0;
+        for (CClientClientDHTSizet::Index2VectorInfoTypeMap::iterator it = edgeHash2Info.begin(); it != edgeHash2Info.end(); ++it)
+        {
+          vector <size_t> edgeInfo = it->second;
+          if (edgeInfo[0] == mpiRank)
+          {
+            ++edgeCount;
+          }
+        }
+
+        unsigned long edgeStart, nbEdges;
+        MPI_Scan(&edgeCount, &edgeStart, 1, MPI_UNSIGNED_LONG, MPI_SUM, comm);
+        int nEdges = edgeStart;
+        MPI_Bcast(&nEdges, 1, MPI_UNSIGNED_LONG, mpiSize-1, comm);
+        nbEdgesGlo = nEdges;
+
+        // edges to be splitted equally between procs
+        if ( (nbEdgesGlo % mpiSize) == 0)
+        {
+          edge_count = nbEdgesGlo/mpiSize;
+          edge_start = mpiRank*edge_count;
+        }
+        else
+        {
+          if (mpiRank == (mpiSize - 1) )
+          {
+            edge_count = nbEdgesGlo/mpiSize;
+            edge_start = mpiRank*(nbEdgesGlo/mpiSize + 1);
+          }
+          else
+          {
+            edge_count = nbEdgesGlo/mpiSize + 1;
+            edge_start = mpiRank*edge_count;
+          }
+        }
+        CArray<size_t,1> edgeIdxGloList(edge_count);
+        for (int i = 0; i < edge_count; ++i)
+        {
+          edgeIdxGloList(i) = i + edge_start;
+        }
+
+        CClientClientDHTSizet dhtEdgeIdxGlo2Face (edgeIdxGlo2Face, comm);
+        CClientClientDHTSizet dhtEdge2Face (edgeIdxGlo2Face, comm);
+        dhtEdgeIdxGlo2Face.computeIndexInfoMapping(edgeIdxGloList);
+        CClientClientDHTSizet::Index2VectorInfoTypeMap& edgeIdxGlo2FaceIdx = dhtEdgeIdxGlo2Face.getInfoIndexMap();
+        dhtEdge2Face.computeIndexInfoMapping(edgeIdxList);
+        CClientClientDHTSizet::Index2VectorInfoTypeMap& edgeIdx2FaceIdx = dhtEdge2Face.getInfoIndexMap();
+
+
+        edge_faces.resize(2, edge_count);
+        for (int i = 0; i < edge_count; ++i)
+        {
+          CClientClientDHTSizet::Index2VectorInfoTypeMap::iterator it = edgeIdxGlo2FaceIdx.find(i + edge_start);
+          int indexGlo = it->first;
+          vector<size_t> faces = it->second;
+          int face1 = faces[0];
+          edge_faces(0, indexGlo - edge_start) = face1;
+          if (faces.size() == 2)
+          {
+            int face2 = faces[1];
+            edge_faces(1, indexGlo - edge_start) = face2;
+          }
+          else
+          {
+            edge_faces(1, indexGlo - edge_start) = -999;
+          }
+        }
+
+        size_t tmp;
+        vector<size_t> tmpVec;
+        for (CClientClientDHTSizet::Index2VectorInfoTypeMap::iterator it = edgeIdx2FaceIdx.begin(); it != edgeIdx2FaceIdx.end(); it++)
+        {
+          tmp = it->first;
+          tmpVec = it->second;
+          tmp++;
+        }
+
+        CClientClientDHTSizet::Index2VectorInfoTypeMap::iterator itFace1, itFace2, itIndex;
+        face_faces.resize(nvertex, nbFaces_);
+        for (int nf = 0; nf < nbFaces_; ++nf)
+        {
+          for (int nv1 = 0; nv1 < nvertex; ++nv1)
+          {
+            int nh1 = 0;
+            int nv2 = (nv1 < nvertex -1 ) ? (nv1 + 1) : (nv1 + 1 - nvertex); // cyclic rotation
+            it1 = nodeHash2IdxGlo.find(nodeHashList((nf*nvertex + nv1)*4 + nh1));
+            while (it1 == nodeHash2IdxGlo.end())
+            {
+              ++nh1;
+              it1 = nodeHash2IdxGlo.find(nodeHashList((nf*nvertex + nv1)*4 + nh1));
+            }
+            int nh2 = 0;
+            it2 = nodeHash2IdxGlo.find(nodeHashList((nf*nvertex + nv2)*4 + nh2));
+            while (it2 == nodeHash2IdxGlo.end())
+            {
+              ++nh2;
+              it2 = nodeHash2IdxGlo.find(nodeHashList((nf*nvertex + nv1)*4 + nh2));
+            }
+
+            if (it1->second[0] != it2->second[0])
+            {
+              size_t faceIdxGlo = nbFacesAccum + nf;
+              size_t edgeHash = hashPairOrdered(it1->second[0], it2->second[0]);
+              itEdgeHash = edgeHash2Info.find(edgeHash);
+              int edgeIdxGlo = (itEdgeHash->second)[1];
+
+              if ( (itEdgeHash->second)[0] == mpiRank)
+              {
+                itFace1 = edgeIdx2FaceIdx.find(edgeIdxGlo);
+                int face1 = itFace1->second[0];
+                if (itFace1->second.size() == 1)
+                {
+                  face_faces(nv1, nf) = 999999;
+                }
+                else
+                {
+                  int face2 = itFace1->second[1];
+                  face_faces(nv1, nf) = (faceIdxGlo == face1 ? face2 : face1);
+                }
+              } // edge owner
+              else
+              {
+                itFace1 = edgeIdx2FaceIdx.find(edgeIdxGlo);
+                int face1 = itFace1->second[0];
+                int face2 = itFace1->second[1];
+                face_faces(nv1, nf) = (faceIdxGlo == face1 ? face2 : face1);
+              } // not an edge owner
+            } // node1 != node2
+            else
+            {
+              face_faces(nv1, nf) = 999999;
+            }
+          }
+        }
+      } // edgesAreWritten
+
+      // Case (2): nodes have been previously generated
+      else if (nodesAreWritten)
+      {
+        // (2.1) Generating nodeHashList
+        vector<size_t> hashValues(4);
+        CArray<size_t,1> nodeHashList(nbFaces_*nvertex*4);
+        for (int nf = 0; nf < nbFaces_; ++nf)
+        {
+          for (int nv = 0; nv < nvertex; ++nv)
+            {
+              hashValues = CMesh::createHashes(bounds_lon(nv, nf), bounds_lat(nv, nf));
+              for (int nh = 0; nh < 4; ++nh)
+                nodeHashList((nf*nvertex + nv)*4 + nh) = hashValues[nh];
+            }
+        }
+
+        // (2.2) Recuperating node global indexing and saving face_nodes
+        // Generating edgeHash2Info = <hash, <idx, rank>> and edgeHashList
+        pNodeGlobalIndex->computeIndexInfoMapping(nodeHashList);
+        CClientClientDHTSizet::Index2VectorInfoTypeMap& nodeHash2IdxGlo = pNodeGlobalIndex->getInfoIndexMap();
+        CClientClientDHTSizet::Index2VectorInfoTypeMap edgeHash2Idx;
+        CClientClientDHTSizet::Index2VectorInfoTypeMap::iterator it1, it2;
+        CArray<size_t,1> edgeHashList(nbFaces_*nvertex);
+        int nEdgeHash = 0;
+        for (int nf = 0; nf < nbFaces_; ++nf)
+        {
+          for (int nv1 = 0; nv1 < nvertex; ++nv1)
+          {
+            int nh1 = 0;
+            int nv2 = (nv1 < nvertex -1 ) ? (nv1 + 1) : (nv1 + 1 - nvertex); // cyclic rotation
+            it1 = nodeHash2IdxGlo.find(nodeHashList((nf*nvertex + nv1)*4 + nh1));
+            while (it1 == nodeHash2IdxGlo.end())
+            {
+              ++nh1;
+              it1 = nodeHash2IdxGlo.find(nodeHashList((nf*nvertex + nv1)*4 + nh1));
+            }
+            int nh2 = 0;
+            it2 = nodeHash2IdxGlo.find(nodeHashList((nf*nvertex + nv2)*4 + nh2));
+            while (it2 == nodeHash2IdxGlo.end())
+            {
+              ++nh2;
+              it2 = nodeHash2IdxGlo.find(nodeHashList((nf*nvertex + nv1)*4 + nh2));
+            }
+            face_nodes(nv1,nf) = it1->second[0];
+            size_t edgeHash = hashPairOrdered(it1->second[0], it2->second[0]);
+            if (edgeHash2Idx.count(edgeHash) == 0)
+            {
+              edgeHash2Idx[edgeHash].push_back(edgeHash);
+              edgeHash2Idx[edgeHash].push_back(mpiRank);
+              edgeHashList(nEdgeHash) = edgeHash;
+              ++nEdgeHash;
+            }
+          }
+        }
+        edgeHashList.resizeAndPreserve(nEdgeHash);
+
+        // (2.3) Generating global edge indexes
+        // The ownership criterion: priority of the process with smaller rank
+        // Maps generated in this step are:
+        // edgeIdx2Idx = = <idx, <rankOwner, idx>>
+        // edgeIdx2IdxGlo = <idxMin, <rankOwner, idxGlo>>
+
+        CClientClientDHTSizet dhtEdgeHash(edgeHash2Idx, comm);
+        dhtEdgeHash.computeIndexInfoMapping(edgeHashList);
+        CClientClientDHTSizet::Index2VectorInfoTypeMap& edgeHash2Info = dhtEdgeHash.getInfoIndexMap();
+        // edgeHash2Info = <hash, [[idx1, rank1], [idx2, rank2], [idx3, rank3]..]>
+
+        CClientClientDHTSizet::Index2VectorInfoTypeMap edgeIdx2Idx;
+
+        for (CClientClientDHTSizet::Index2VectorInfoTypeMap::iterator it = edgeHash2Info.begin(); it != edgeHash2Info.end(); ++it)
+        {
+          size_t rankMin = (it->second)[1];
+          size_t idx = (it->second)[0];
+
+          for (int i = 2; i < (it->second).size();)
+          {
+            if ((it->second)[i+1] < rankMin)
+            {
+              rankMin = (it->second)[i+1];
+              idx = (it->second)[i];
+              (it->second)[i+1] = (it->second)[i-1];
+            }
+            i += 2;
+          }
+          if (edgeIdx2Idx.count(idx) == 0)
+          {
+            if (mpiRank == rankMin)
+            {
+              edgeIdx2Idx[idx].push_back(rankMin);
+              edgeIdx2Idx[idx].push_back(idx);
+            }
+          }
+        }
+
+        unsigned long edgeCount = edgeIdx2Idx.size();
+        unsigned long edgeStart, nbEdges;
+        MPI_Scan(&edgeCount, &edgeStart, 1, MPI_UNSIGNED_LONG, MPI_SUM, comm);
+        int nEdges = edgeStart;
+        MPI_Bcast(&nEdges, 1, MPI_UNSIGNED_LONG, mpiSize-1, comm);
+        nbEdgesGlo = nEdges;
+
+        edgeStart -= edgeCount;
+        edge_start = edgeStart;
+        edge_count = edgeCount;
+        CClientClientDHTSizet::Index2VectorInfoTypeMap dummyEdgeMap;
+        int count = 0;
+
+        for (int nf = 0; nf < nbFaces_; ++nf)
+        {
+          for (int nv1 = 0; nv1 < nvertex; ++nv1)
+          {
+            // Getting global indexes of edge's nodes
+            int nh1 = 0;
+            int nv2 = (nv1 < nvertex -1 ) ? (nv1 + 1) : (nv1 + 1 - nvertex); // cyclic rotation
+            it1 = nodeHash2IdxGlo.find(nodeHashList((nf*nvertex + nv1)*4 + nh1));
+            while (it1 == nodeHash2IdxGlo.end())
+            {
+              ++nh1;
+              it1 = nodeHash2IdxGlo.find(nodeHashList((nf*nvertex + nv1)*4 + nh1));
+            }
+            int nh2 = 0;
+            it2 = nodeHash2IdxGlo.find(nodeHashList((nf*nvertex + nv2)*4 + nh2));
+            while (it2 == nodeHash2IdxGlo.end())
+            {
+              ++nh2;
+              it2 = nodeHash2IdxGlo.find(nodeHashList((nf*nvertex + nv1)*4 + nh2));
+            }
+            size_t nodeIdxGlo1 = it1->second[0];
+            size_t nodeIdxGlo2 = it2->second[0];
+
+            if (nodeIdxGlo1 != nodeIdxGlo2)
+            {
+              size_t edgeIdx = hashPairOrdered(nodeIdxGlo1, nodeIdxGlo2);
+              CClientClientDHTSizet::Index2VectorInfoTypeMap::iterator it = edgeIdx2Idx.find(edgeIdx);
+              if (it != edgeIdx2Idx.end())
+              {
+                if (dummyEdgeMap.count(edgeIdx) == 0)
+                {
+                  dummyEdgeMap[edgeIdx].push_back(edgeIdx);
+                  (it->second)[1] = edge_start + count;
+                  ++count;
+                }
+              }
+            }
+          }
+        }
+
+        CClientClientDHTSizet dhtEdgeIdx(edgeIdx2Idx, comm);
+        dhtEdgeIdx.computeIndexInfoMapping(edgeHashList);
+        CClientClientDHTSizet::Index2VectorInfoTypeMap& edgeIdx2IdxGlo = dhtEdgeIdx.getInfoIndexMap();
+
+        // (2.4) Saving variables: edge_lon, edge_lat, face_edges
+        edge_lon.resize(edge_count);
+        edge_lat.resize(edge_count);
+        edge_nodes.resize(2, edge_count);
+        face_edges.resize(nvertex, nbFaces_);
+
+        CClientClientDHTSizet::Index2VectorInfoTypeMap edgeIdxGlo2Face;
+        CArray<size_t,1> edgeIdxGloList(nbFaces_*nvertex);
+        size_t iIdx = 0;
+
+        for (int nf = 0; nf < nbFaces_; ++nf)
+        {
+          for (int nv1 = 0; nv1 < nvertex; ++nv1)
+          {
+            // Getting global indexes of edge's nodes
+            int nh1 = 0;
+            int nv2 = (nv1 < nvertex -1 ) ? (nv1 + 1) : (nv1 + 1 - nvertex); // cyclic rotation
+            it1 = nodeHash2IdxGlo.find(nodeHashList((nf*nvertex + nv1)*4 + nh1));
+            while (it1 == nodeHash2IdxGlo.end())
+            {
+              ++nh1;
+              it1 = nodeHash2IdxGlo.find(nodeHashList((nf*nvertex + nv1)*4 + nh1));
+            }
+            int nh2 = 0;
+            it2 = nodeHash2IdxGlo.find(nodeHashList((nf*nvertex + nv2)*4 + nh2));
+            while (it2 == nodeHash2IdxGlo.end())
+            {
+              ++nh2;
+              it2 = nodeHash2IdxGlo.find(nodeHashList((nf*nvertex + nv1)*4 + nh2));
+            }
+            // Getting edge global index
+            size_t nodeIdxGlo1 = it1->second[0];
+            size_t nodeIdxGlo2 = it2->second[0];
+            size_t myIdx = hashPairOrdered(nodeIdxGlo1, nodeIdxGlo2);
+            if (nodeIdxGlo1 != nodeIdxGlo2)
+            {
+              CClientClientDHTSizet::Index2VectorInfoTypeMap::iterator itIdx = edgeIdx2IdxGlo.find(myIdx);
+              int edgeIdxGlo = (itIdx->second)[1];
+              size_t faceIdxGlo = nbFacesAccum + nf;
+
+              if (mpiRank == (itIdx->second)[0])
+              {
+                double edgeLon;
+                double diffLon = abs(bounds_lon(nv1, nf) - bounds_lon(nv2, nf));
+                if (diffLon < (180.- prec))
+                  edgeLon = ( bounds_lon(nv1, nf) + bounds_lon(nv2, nf)) * 0.5;
+                else if (diffLon > (180.+ prec))
+                  edgeLon = (bounds_lon(nv1, nf) + bounds_lon(nv2, nf)) * 0.5 -180.;
+                else
+                  edgeLon = 0.;
+                edge_lon(edgeIdxGlo - edge_start) = edgeLon;
+                edge_lat(edgeIdxGlo - edge_start) = ( bounds_lat(nv1, nf) + bounds_lat(nv2, nf) ) * 0.5;
+                edge_nodes(0, edgeIdxGlo - edge_start) = nodeIdxGlo1;
+                edge_nodes(1, edgeIdxGlo - edge_start) = nodeIdxGlo2;
+              }
+              face_edges(nv1,nf) = edgeIdxGlo;
+              if (edgeIdxGlo2Face.count(edgeIdxGlo) == 0)
+              {
+                edgeIdxGloList(iIdx) = edgeIdxGlo;
+                ++iIdx;
+              }
+              edgeIdxGlo2Face[edgeIdxGlo].push_back(faceIdxGlo);
+            } // nodeIdxGlo1 != nodeIdxGlo2
+            else
+            {
+              face_edges(nv1,nf) = 999999;
+            }
+          }
+        }
+        edgeIdxGloList.resizeAndPreserve(iIdx);
+
+        // (2.5) Saving remaining variables edge_faces and face_faces
+        edge_faces.resize(2, edge_count);
+        face_faces.resize(nvertex, nbFaces_);
+
+        CClientClientDHTSizet dhtEdge2Face (edgeIdxGlo2Face, comm);
+        dhtEdge2Face.computeIndexInfoMapping(edgeIdxGloList);
+        CClientClientDHTSizet::Index2VectorInfoTypeMap& edgeIdxGlo2FaceIdx = dhtEdge2Face.getInfoIndexMap();
+        CClientClientDHTSizet::Index2VectorInfoTypeMap::iterator itNodeIdxGlo1, itNodeIdxGlo2;
+        CClientClientDHTSizet::Index2VectorInfoTypeMap::iterator itIdx;
+
+        for (int nf = 0; nf < nbFaces_; ++nf)
+        {
+          for (int nv1 = 0; nv1 < nvertex; ++nv1)
+          {
+            // Getting global indexes of edge's nodes
+            int nh1 = 0;
+            int nv2 = (nv1 < nvertex -1 ) ? (nv1 + 1) : (nv1 + 1 - nvertex); // cyclic rotation
+            it1 = nodeHash2IdxGlo.find(nodeHashList((nf*nvertex + nv1)*4 + nh1));
+            while (it1 == nodeHash2IdxGlo.end())
+            {
+              ++nh1;
+              it1 = nodeHash2IdxGlo.find(nodeHashList((nf*nvertex + nv1)*4 + nh1));
+            }
+            int nh2 = 0;
+            it2 = nodeHash2IdxGlo.find(nodeHashList((nf*nvertex + nv2)*4 + nh2));
+            while (it2 == nodeHash2IdxGlo.end())
+            {
+              ++nh2;
+              it2 = nodeHash2IdxGlo.find(nodeHashList((nf*nvertex + nv1)*4 + nh2));
+            }
+            size_t nodeIdxGlo1 = it1->second[0];
+            size_t nodeIdxGlo2 = it2->second[0];
+
+            size_t myIdx = hashPairOrdered(nodeIdxGlo1, nodeIdxGlo2);
+            itIdx = edgeIdx2IdxGlo.find(myIdx);
+            size_t faceIdxGlo = nbFacesAccum + nf;
+            int edgeIdxGlo = (itIdx->second)[1];
+
+            if (mpiRank == (itIdx->second)[0])
+            {
+              it1 = edgeIdxGlo2FaceIdx.find(edgeIdxGlo);
+              int face1 = it1->second[0];
+              if (it1->second.size() == 1)
+              {
+                edge_faces(0, edgeIdxGlo - edge_start) = face1;
+                edge_faces(1, edgeIdxGlo - edge_start) = -999;
+                face_faces(nv1, nf) = 999999;
+              }
+              else
+              {
+                int face2 = it1->second[1];
+                edge_faces(0, edgeIdxGlo - edge_start) = face1;
+                edge_faces(1, edgeIdxGlo - edge_start) = face2;
+                face_faces(nv1, nf) = (faceIdxGlo == face1 ? face2 : face1);
+              }
+            }
+            else
+            {
+              it1 = edgeIdxGlo2FaceIdx.find(edgeIdxGlo);
+              int face1 = it1->second[0];
+              int face2 = it1->second[1];
+              face_faces(nv1, nf) = (faceIdxGlo == face1 ? face2 : face1);
+            }
+          }
+        }
+      } // nodesAreWritten
+
+      // Case (3): Neither nodes nor edges have been previously generated
+      else
+      {
+        // (3.1) Creating a list of hashes for each node and a map nodeHash2Idx <hash, <idx,rank> >
+        vector<size_t> hashValues(4);
+        CClientClientDHTSizet::Index2VectorInfoTypeMap nodeHash2Idx;
+        CArray<size_t,1> nodeHashList(nbFaces_*nvertex*4);
+        size_t iHash = 0;
+        for (int nf = 0; nf < nbFaces_; ++nf)
+        {
+          for (int nv = 0; nv < nvertex; ++nv)
+          {
+            hashValues = CMesh::createHashes(bounds_lon(nv, nf), bounds_lat(nv, nf));
+//            size_t nodeIndex = generateNodeIndex(hashValues, mpiRank);
+            size_t nodeIndex = generateNodeIndex(hashValues);
+            for (int nh = 0; nh < 4; ++nh)
+            {
+              if (nodeHash2Idx.count(hashValues[nh])==0)
+              {
+                nodeHash2Idx[hashValues[nh]].push_back(nodeIndex);
+                nodeHash2Idx[hashValues[nh]].push_back(mpiRank);
+                nodeHashList(iHash) = hashValues[nh];
+                ++iHash;
+              }
+            }
+          }
+        }
+        nodeHashList.resizeAndPreserve(iHash);
+
+        // (3.2) Generating global node indexes
+        // The ownership criterion: priority of the process with smaller rank.
+        // With any other criterion it is not possible to have consistent node indexing for different number of procs.
+        // Maps generated in this step are:
+        // nodeHash2Info = <hash, [[idx, rankMin], [idx, rank1], [idx, rank3]..]>
+        // nodeIdx2Idx = <idx, <rankOwner, idx>>
+
+        CClientClientDHTSizet dhtNodeHash(nodeHash2Idx, comm);
+        dhtNodeHash.computeIndexInfoMapping(nodeHashList);
+        CClientClientDHTSizet::Index2VectorInfoTypeMap& nodeHash2Info = dhtNodeHash.getInfoIndexMap();
+
+        CClientClientDHTSizet::Index2VectorInfoTypeMap nodeIdx2Idx;
+        CArray<size_t,1> nodeIdxList(nbFaces_*nvertex*4);
+        size_t nIdx = 0;
+
+        for (CClientClientDHTSizet::Index2VectorInfoTypeMap::iterator it = nodeHash2Info.begin(); it != nodeHash2Info.end(); ++it)
+        {
+          size_t rankMin = (it->second)[1];
+          size_t idx = (it->second)[0];
+          for (int i = 2; i < (it->second).size();)
+          {
+            if ( (it->second)[i+1] < rankMin)
+            {
+              idx = (it->second)[i];
+              rankMin = (it->second)[i+1];
+              (it->second)[i+1] = (it->second)[i-1];
+            }
+            i += 2;
+          }
+          if (nodeIdx2Idx.count(idx) == 0)
+          {
+            if (mpiRank == rankMin)
+            {
+              nodeIdx2Idx[idx].push_back(rankMin);
+              nodeIdx2Idx[idx].push_back(idx);
+            }
+            nodeIdxList(nIdx) = idx;
+            ++nIdx;
+          }
+        }
+
+//        CDHTAutoIndexing dhtNodeIdxGlo = CDHTAutoIndexing(nodeIdx2Idx, comm);
+        // CDHTAutoIndexing will not give consistent node numbering for varying number of procs. =>
+        // Solution: global node indexing by hand.
+        // Maps modified in this step:
+        // nodeIdx2Idx = <idx, idxGlo>
+        unsigned long nodeCount = nodeIdx2Idx.size();
+        unsigned long nodeStart, nbNodes;
+        MPI_Scan(&nodeCount, &nodeStart, 1, MPI_UNSIGNED_LONG, MPI_SUM, comm);
+        int nNodes = nodeStart;
+        MPI_Bcast(&nNodes, 1, MPI_UNSIGNED_LONG, mpiSize-1, comm);
+        nbNodesGlo = nNodes;
+
+        nodeStart -= nodeCount;
+        node_start = nodeStart;
+        node_count = nodeCount;
+        CClientClientDHTSizet::Index2VectorInfoTypeMap dummyMap; // just a dummy map used to ensure that each node is numbered only once
+        size_t count = 0;
+
+        for (int nf = 0; nf < nbFaces_; ++nf)
+        {
+          for (int nv = 0; nv < nvertex; ++nv)
+          {
+            vector<size_t> hashValues = CMesh::createHashes(bounds_lon(nv, nf), bounds_lat(nv, nf));
+            size_t nodeIdx = generateNodeIndex(hashValues);
+            CClientClientDHTSizet::Index2VectorInfoTypeMap::iterator it = nodeIdx2Idx.find(nodeIdx);
+            if (it != nodeIdx2Idx.end())
+            {
+              if (dummyMap.count(nodeIdx) == 0)
+              {
+                dummyMap[nodeIdx].push_back(nodeIdx);
+                (it->second)[1] = node_start + count;
+                ++count;
+              }
+            }
+          }
+        }
+        nodeIdxList.resizeAndPreserve(nIdx);
+        CClientClientDHTSizet dhtNodeIdx(nodeIdx2Idx, comm);
+        dhtNodeIdx.computeIndexInfoMapping(nodeIdxList);
+        CClientClientDHTSizet::Index2VectorInfoTypeMap& nodeIdx2IdxGlo = dhtNodeIdx.getInfoIndexMap();
+
+        // (3.3) Saving node data: node_lon, node_lat, and face_nodes
+        // Generating edgeHash2Info = <hash, <idx, rank>> and edgeHashList
+//        nbNodesGlo = dhtNodeIdxGlo.getNbIndexesGlobal();
+//        node_count = dhtNodeIdxGlo.getIndexCount();
+//        node_start = dhtNodeIdxGlo.getIndexStart();
+        node_lon.resize(node_count);
+        node_lat.resize(node_count);
+        size_t nodeIdxGlo1 = 0;
+        size_t nodeIdxGlo2 = 0;
+        CClientClientDHTSizet::Index2VectorInfoTypeMap edgeHash2Idx;
+        CClientClientDHTSizet::Index2VectorInfoTypeMap::iterator itNodeIdxGlo1, itNodeIdxGlo2;
+        CArray<size_t,1> edgeHashList(nbFaces_*nvertex);
+        size_t nEdgeHash = 0;
+
+        for (int nf = 0; nf < nbFaces_; ++nf)
+        {
+          for (int nv1 = 0; nv1 < nvertex; ++nv1)
+          {
+            int nv2 = (nv1 < nvertex -1 ) ? (nv1 + 1) : (nv1 + 1 - nvertex); // cyclic rotation
+            vector<size_t> hashValues1 = CMesh::createHashes(bounds_lon(nv1, nf), bounds_lat(nv1, nf));
+            vector<size_t> hashValues2 = CMesh::createHashes(bounds_lon(nv2, nf), bounds_lat(nv2, nf));
+            size_t nodeIdx1 = generateNodeIndex(hashValues1);
+            size_t nodeIdx2 = generateNodeIndex(hashValues2);
+            CClientClientDHTSizet::Index2VectorInfoTypeMap::iterator itNodeIdx1 = nodeIdx2IdxGlo.find(nodeIdx1);
+            CClientClientDHTSizet::Index2VectorInfoTypeMap::iterator itNodeIdx2 = nodeIdx2IdxGlo.find(nodeIdx2);
+            size_t ownerRank = (itNodeIdx1->second)[0];
+            nodeIdxGlo1 = (itNodeIdx1->second)[1];
+            nodeIdxGlo2 = (itNodeIdx2->second)[1];
+
+            if (mpiRank == ownerRank)
+            {
+              node_lon(nodeIdxGlo1 - node_start) = bounds_lon(nv1, nf);
+              node_lat(nodeIdxGlo1 - node_start) = bounds_lat(nv1, nf);
+            }
+            if (nodeIdxGlo1 != nodeIdxGlo2)
+            {
+              size_t edgeHash = hashPairOrdered(nodeIdxGlo1, nodeIdxGlo2);
+              edgeHash2Idx[edgeHash].push_back(edgeHash);
+              edgeHash2Idx[edgeHash].push_back(mpiRank);
+              edgeHashList(nEdgeHash) = edgeHash;
+              ++nEdgeHash;
+            }
+            face_nodes(nv1,nf) = nodeIdxGlo1;
+          }
+        }
+        edgeHashList.resizeAndPreserve(nEdgeHash);
+
+        // (3.4) Generating global edge indexes
+        // Maps generated in this step are:
+        // edgeIdx2Idx = = <idx, <rankOwner, idx>>
+        // edgeIdx2IdxGlo = <idxMin, <rankOwner, idxGlo>>
+
+        CClientClientDHTSizet dhtEdgeHash(edgeHash2Idx, comm);
+        dhtEdgeHash.computeIndexInfoMapping(edgeHashList);
+        CClientClientDHTSizet::Index2VectorInfoTypeMap& edgeHash2Info = dhtEdgeHash.getInfoIndexMap();
+        // edgeHash2Info = <hash, [[idx1, rank1], [idx2, rank2], [idx3, rank3]..]>
+
+        CClientClientDHTSizet::Index2VectorInfoTypeMap edgeIdx2Idx;
+
+        for (CClientClientDHTSizet::Index2VectorInfoTypeMap::iterator it = edgeHash2Info.begin(); it != edgeHash2Info.end(); ++it)
+        {
+          size_t rankMin = (it->second)[1];
+          size_t idx = (it->second)[0];
+
+          for (int i = 2; i < (it->second).size();)
+          {
+            if ((it->second)[i+1] < rankMin)
+            {
+              rankMin = (it->second)[i+1];
+              idx = (it->second)[i];
+              (it->second)[i+1] = (it->second)[i-1];
+            }
+            i += 2;
+          }
+          if (edgeIdx2Idx.count(idx) == 0)
+          {
+            if (mpiRank == rankMin)
+            {
+              edgeIdx2Idx[idx].push_back(rankMin);
+              edgeIdx2Idx[idx].push_back(idx);
+            }
+          }
+        }
+
+        unsigned long edgeCount = edgeIdx2Idx.size();
+        unsigned long edgeStart, nbEdges;
+        MPI_Scan(&edgeCount, &edgeStart, 1, MPI_UNSIGNED_LONG, MPI_SUM, comm);
+        int nEdges = edgeStart;
+        MPI_Bcast(&nEdges, 1, MPI_UNSIGNED_LONG, mpiSize-1, comm);
+        nbEdgesGlo = nEdges;
+
+        edgeStart -= edgeCount;
+        edge_start = edgeStart;
+        edge_count = edgeCount;
+        CClientClientDHTSizet::Index2VectorInfoTypeMap dummyEdgeMap;
+        count = 0;
+
+        for (int nf = 0; nf < nbFaces_; ++nf)
+        {
+          for (int nv1 = 0; nv1 < nvertex; ++nv1)
+          {
+            int nv2 = (nv1 < nvertex -1 ) ? (nv1 + 1) : (nv1 + 1 - nvertex); // cyclic rotation
+            vector<size_t> hashValues1 = CMesh::createHashes(bounds_lon(nv1, nf), bounds_lat(nv1, nf));
+            vector<size_t> hashValues2 = CMesh::createHashes(bounds_lon(nv2, nf), bounds_lat(nv2, nf));
+            size_t nodeIdx1 = generateNodeIndex(hashValues1);
+            size_t nodeIdx2 = generateNodeIndex(hashValues2);
+            CClientClientDHTSizet::Index2VectorInfoTypeMap::iterator itNodeIdx1 = nodeIdx2IdxGlo.find(nodeIdx1);
+            CClientClientDHTSizet::Index2VectorInfoTypeMap::iterator itNodeIdx2 = nodeIdx2IdxGlo.find(nodeIdx2);
+            nodeIdxGlo1 = (itNodeIdx1->second)[1];
+            nodeIdxGlo2 = (itNodeIdx2->second)[1];
+
+            if (nodeIdxGlo1 != nodeIdxGlo2)
+            {
+              size_t edgeIdx = hashPairOrdered(nodeIdxGlo1, nodeIdxGlo2);
+              CClientClientDHTSizet::Index2VectorInfoTypeMap::iterator it = edgeIdx2Idx.find(edgeIdx);
+              if (it != edgeIdx2Idx.end())
+              {
+                if (dummyEdgeMap.count(edgeIdx) == 0)
+                {
+                  dummyEdgeMap[edgeIdx].push_back(edgeIdx);
+                  (it->second)[1] = edge_start + count;
+                  ++count;
+                }
+              }
+            }
+          }
+        }
+        CClientClientDHTSizet dhtEdgeIdx(edgeIdx2Idx, comm);
+        dhtEdgeIdx.computeIndexInfoMapping(edgeHashList);
+        CClientClientDHTSizet::Index2VectorInfoTypeMap& edgeIdx2IdxGlo = dhtEdgeIdx.getInfoIndexMap();
+
+        // (3.5) Saving variables: edge_lon, edge_lat, face_edges
+        // Creating map edgeIdxGlo2Face <idxGlo, face>
+//        nbEdgesGlo = dhtEdgeIdxGlo.getNbIndexesGlobal();
+//        edge_count = dhtEdgeIdxGlo.getIndexCount();
+//        edge_start = dhtEdgeIdxGlo.getIndexStart();
+
+        edge_lon.resize(edge_count);
+        edge_lat.resize(edge_count);
+        edge_nodes.resize(2, edge_count);
+        face_edges.resize(nvertex, nbFaces_);
+
+        CClientClientDHTSizet::Index2VectorInfoTypeMap::iterator it1, it2;
+        CClientClientDHTSizet::Index2VectorInfoTypeMap edgeIdxGlo2Face;
+        CArray<size_t,1> edgeIdxGloList(nbFaces_*nvertex);
+        size_t nEdge = 0;
+
+        for (int nf = 0; nf < nbFaces_; ++nf)
+        {
+          for (int nv1 = 0; nv1 < nvertex; ++nv1)
+          {
+            // Getting global indexes of edge's nodes
+            int nv2 = (nv1 < nvertex -1 ) ? (nv1 + 1) : (nv1 + 1 - nvertex); // cyclic rotation
+            vector<size_t> hashValues1 = CMesh::createHashes(bounds_lon(nv1, nf), bounds_lat(nv1, nf));
+            vector<size_t> hashValues2 = CMesh::createHashes(bounds_lon(nv2, nf), bounds_lat(nv2, nf));
+
+            size_t nodeIdx1 = generateNodeIndex(hashValues1);
+            size_t nodeIdx2 = generateNodeIndex(hashValues2);
+            it1 = nodeIdx2IdxGlo.find(nodeIdx1);
+            it2 = nodeIdx2IdxGlo.find(nodeIdx2);
+            size_t nodeIdxGlo1 = (it1->second)[1];
+            size_t nodeIdxGlo2 = (it2->second)[1];
+
+            if (nodeIdxGlo1 != nodeIdxGlo2)
+            {
+              size_t myIdx = hashPairOrdered(nodeIdxGlo1, nodeIdxGlo2);
+              CClientClientDHTSizet::Index2VectorInfoTypeMap::iterator itIdx = edgeIdx2IdxGlo.find(myIdx);
+              int edgeIdxGlo = (itIdx->second)[1];
+              size_t faceIdxGlo = nbFacesAccum + nf;
+
+              if (mpiRank == (itIdx->second)[0])
+              {
+                double edgeLon;
+                double diffLon = abs(bounds_lon(nv1, nf) - bounds_lon(nv2, nf));
+                if (diffLon < (180.- prec))
+                  edgeLon = ( bounds_lon(nv1, nf) + bounds_lon(nv2, nf)) * 0.5;
+                else if (diffLon > (180.+ prec))
+                  edgeLon = (bounds_lon(nv1, nf) + bounds_lon(nv2, nf)) * 0.5 -180.;
+                else
+                  edgeLon = 0.;
+                edge_lon(edgeIdxGlo - edge_start) = edgeLon;
+                edge_lat(edgeIdxGlo-edge_start) = ( bounds_lat(nv1, nf) + bounds_lat(nv2, nf) ) * 0.5;
+                edge_nodes(0, edgeIdxGlo - edge_start) = nodeIdxGlo1;
+                edge_nodes(1, edgeIdxGlo - edge_start) = nodeIdxGlo2;
+              }
+              face_edges(nv1,nf) = edgeIdxGlo;
+              if (edgeIdxGlo2Face.count(edgeIdxGlo) == 0)
+              {
+                edgeIdxGloList(nEdge) = edgeIdxGlo;
+                ++nEdge;
+              }
+              edgeIdxGlo2Face[edgeIdxGlo].push_back(faceIdxGlo);
+            } // nodeIdxGlo1 != nodeIdxGlo2
+            else
+            {
+              face_edges(nv1,nf) = 999999;
+            }
+          }
+        }
+        edgeIdxGloList.resizeAndPreserve(nEdge);
+
+        // (3.6) Saving remaining variables edge_faces and face_faces
+        edge_faces.resize(2, edge_count);
+        face_faces.resize(nvertex, nbFaces_);
+
+        CClientClientDHTSizet dhtEdge2Face (edgeIdxGlo2Face, comm);
+        dhtEdge2Face.computeIndexInfoMapping(edgeIdxGloList);
+        CClientClientDHTSizet::Index2VectorInfoTypeMap& edgeIdxGlo2FaceIdx = dhtEdge2Face.getInfoIndexMap();
+
+        for (int nf = 0; nf < nbFaces_; ++nf)
+        {
+          for (int nv1 = 0; nv1 < nvertex; ++nv1)
+          {
+            // Getting global indexes of edge's nodes
+            int nv2 = (nv1 < nvertex -1 ) ? (nv1 + 1) : (nv1 + 1 - nvertex); // cyclic rotation
+            vector<size_t> hashValues1 = CMesh::createHashes(bounds_lon(nv1, nf), bounds_lat(nv1, nf));
+            vector<size_t> hashValues2 = CMesh::createHashes(bounds_lon(nv2, nf), bounds_lat(nv2, nf));
+
+            size_t myNodeIdx1 = generateNodeIndex(hashValues1);
+            size_t myNodeIdx2 = generateNodeIndex(hashValues2);
+            if (myNodeIdx1 != myNodeIdx2)
+            {
+              it1 = nodeIdx2IdxGlo.find(myNodeIdx1);
+              it2 = nodeIdx2IdxGlo.find(myNodeIdx2);
+              size_t nodeIdxGlo1 = (it1->second)[1];
+              size_t nodeIdxGlo2 = (it2->second)[1];
+              size_t myIdx = hashPairOrdered(nodeIdxGlo1, nodeIdxGlo2);
+              CClientClientDHTSizet::Index2VectorInfoTypeMap::iterator itIdx = edgeIdx2IdxGlo.find(myIdx);
+              int edgeIdxGlo = (itIdx->second)[1];
+
+              size_t faceIdxGlo = nbFacesAccum + nf;
+
+              if (mpiRank == (itIdx->second)[0])
+              {
+                it1 = edgeIdxGlo2FaceIdx.find(edgeIdxGlo);
+                int face1 = it1->second[0];
+                if (it1->second.size() == 1)
+                {
+                  edge_faces(0, edgeIdxGlo - edge_start) = face1;
+                  edge_faces(1, edgeIdxGlo - edge_start) = -999;
+                  face_faces(nv1, nf) = 999999;
+                }
+                else
+                {
+                  size_t face2 = it1->second[1];
+                  edge_faces(0, edgeIdxGlo - edge_start) = face1;
+                  edge_faces(1, edgeIdxGlo - edge_start) = face2;
+                  face_faces(nv1, nf) = (faceIdxGlo == face1 ? face2 : face1);
+                }
+              }
+              else
+              {
+                it1 = edgeIdxGlo2FaceIdx.find(edgeIdxGlo);
+                int face1 = it1->second[0];
+                int face2 = it1->second[1];
+                face_faces(nv1, nf) = (faceIdxGlo == face1 ? face2 : face1);
+              }
+            } // myNodeIdx1 != myNodeIdx2
+            else
+              face_faces(nv1, nf) = 999999;
+          }
+        }
+
+      }
+      facesAreWritten = true;
+    } // nvertex >= 3
+
+  } // createMeshEpsilon
+
+  ///----------------------------------------------------------------
+  /*!
+   * \fn  void CMesh::getGloNghbFacesNodeType(const MPI_Comm& comm, const CArray<int, 1>& face_idx,
+                                              const CArray<double, 2>& bounds_lon, const CArray<double, 2>& bounds_lat,
+                                              CArray<int, 2>& nghbFaces)
+   * Finds neighboring cells of a local domain for node-type of neighbors.
+   * \param [in] comm
+   * \param [in] face_idx Array with global indexes.
+   * \param [in] bounds_lon Array of boundary longitudes.
+   * \param [in] bounds_lat Array of boundary latitudes.
+   * \param [out] nghbFaces 2D array of storing global indexes of neighboring cells and their owner procs.
+   */
+
+  void CMesh::getGloNghbFacesNodeType(const MPI_Comm& comm, const CArray<int, 1>& face_idx,
+                               const CArray<double, 2>& bounds_lon, const CArray<double, 2>& bounds_lat,
+                               CArray<int, 2>& nghbFaces)
+  {
+    int nvertex = bounds_lon.rows();
+    int nbFaces = bounds_lon.shape()[1];
+    nghbFaces.resize(2, nbFaces*10);    // some estimate on max number of neighbouring cells
+
+    int mpiRank, mpiSize;
+    MPI_Comm_rank(comm, &mpiRank);
+    MPI_Comm_size(comm, &mpiSize);
+
+    // (1) Generating unique node indexes
+    // (1.1) Creating a list of hashes for each node and a map nodeHash2Idx <hash, <idx,rank> >
+    vector<size_t> hashValues(4);
+    CClientClientDHTSizet::Index2VectorInfoTypeMap nodeHash2Idx;
+    CArray<size_t,1> nodeHashList(nbFaces*nvertex*4);
+    size_t iIdx = 0;
+    for (int nf = 0; nf < nbFaces; ++nf)
+    {
+      for (int nv = 0; nv < nvertex; ++nv)
+      {
+        hashValues = CMesh::createHashes(bounds_lon(nv, nf), bounds_lat(nv, nf));
+        size_t nodeIndex = generateNodeIndex(hashValues, mpiRank);
+        for (int nh = 0; nh < 4; ++nh)
+        {
+          if (nodeHash2Idx.count(hashValues[nh])==0)
+         {
+            nodeHash2Idx[hashValues[nh]].push_back(nodeIndex);
+            nodeHash2Idx[hashValues[nh]].push_back(mpiRank);
+           nodeHashList(iIdx) = hashValues[nh];
+           ++iIdx;
+         }
+        }
+      }
+    }
+    nodeHashList.resizeAndPreserve(iIdx);
+
+    // (1.2) Generating node indexes
+    // The ownership criterion: priority of the process holding the smaller index
+    // Maps generated in this step are:
+    // nodeHash2Info = <hash, idx1, idx2, idx3....>
+    // nodeIdx2IdxMin = <idx, idxMin>
+    // idxMin is a unique node identifier
+
+    CClientClientDHTSizet dhtNodeHash(nodeHash2Idx, comm);
+    dhtNodeHash.computeIndexInfoMapping(nodeHashList);
+    CClientClientDHTSizet::Index2VectorInfoTypeMap& nodeHash2Info = dhtNodeHash.getInfoIndexMap();
+
+    CClientClientDHTSizet::Index2VectorInfoTypeMap nodeIdx2IdxMin;
+
+    for (CClientClientDHTSizet::Index2VectorInfoTypeMap::iterator it = nodeHash2Info.begin(); it != nodeHash2Info.end(); ++it)
+    {
+      size_t idxMin = (it->second)[0];
+      size_t idx = (it->second)[0];
+      for (int i = 2; i < (it->second).size();)
+      {
+        if (mpiRank == (it->second)[i+1])
+        {
+          idx = (it->second)[i];
+        }
+        if ((it->second)[i] < idxMin)
+        {
+          idxMin = (it->second)[i];
+          (it->second)[i] = (it->second)[i-2];
+          (it->second)[i+1] = (it->second)[i-1];
+        }
+        i += 2;
+      }
+      (it->second)[0] = idxMin;
+      if (nodeIdx2IdxMin.count(idx) == 0)
+      {
+        nodeIdx2IdxMin[idx].push_back(idxMin);
+      }
+    }
+
+    // (2) Creating maps nodeIdxMin2Face = <nodeIdxMin, [face1, face2, ...]>
+    CClientClientDHTSizet::Index2VectorInfoTypeMap::iterator it;
+    CClientClientDHTSizet::Index2VectorInfoTypeMap nodeIdxMin2Face;
+    CArray<size_t,1> nodeIdxMinList(nbFaces*nvertex*4);
+
+    size_t nNode = 0;
+
+    for (int nf = 0; nf < nbFaces; ++nf)
+    {
+      for (int nv = 0; nv < nvertex; ++nv)
+      {
+        vector<size_t> hashValues = CMesh::createHashes(bounds_lon(nv, nf), bounds_lat(nv, nf));
+        size_t myNodeIdx = generateNodeIndex(hashValues, mpiRank);
+        it = nodeIdx2IdxMin.find(myNodeIdx);
+        size_t nodeIdxMin = (it->second)[0];
+        size_t faceIdx = face_idx(nf);
+        if (nodeIdxMin2Face.count(nodeIdxMin) == 0)
+        {
+          nodeIdxMinList(nNode) = nodeIdxMin;
+          ++nNode;
+        }
+        nodeIdxMin2Face[nodeIdxMin].push_back(faceIdx);
+        nodeIdxMin2Face[nodeIdxMin].push_back(mpiRank);
+      }
+    }
+    nodeIdxMinList.resizeAndPreserve(nNode);
+
+    // (3) Face_face connectivity
+
+    // nodeIdxMin2Info = <nodeIdxMin, [face1, face2,...]>
+    CClientClientDHTSizet dhtNode2Face (nodeIdxMin2Face, comm);
+    dhtNode2Face.computeIndexInfoMapping(nodeIdxMinList);
+    CClientClientDHTSizet::Index2VectorInfoTypeMap& nodeIdxMin2Info = dhtNode2Face.getInfoIndexMap();
+    CClientClientDHTSizet::Index2VectorInfoTypeMap mapFaces;  // auxiliar map
+
+    int nbNghb = 0;
+    CClientClientDHTSizet::Index2VectorInfoTypeMap::iterator itNode;
+
+    for (int nf = 0; nf < nbFaces; ++nf)
+    {
+      for (int nv = 0; nv < nvertex; ++nv)
+      {
+        vector<size_t> hashValues = CMesh::createHashes(bounds_lon(nv, nf), bounds_lat(nv, nf));
+        size_t myNodeIdx = generateNodeIndex(hashValues, mpiRank);
+        itNode = nodeIdx2IdxMin.find(myNodeIdx);
+        size_t nodeIdxMin = (itNode->second)[0];
+
+        itNode = nodeIdxMin2Info.find(nodeIdxMin);
+        for (int i = 0; i < itNode->second.size();)
+        {
+          size_t face = itNode->second[i];
+          size_t rank = itNode->second[i+1];
+          if (rank != mpiRank)
+            if (mapFaces.count(face) == 0)
+            {
+              nghbFaces(0, nbNghb) = face;
+              nghbFaces(1, nbNghb) = rank;
+              ++nbNghb;
+              mapFaces[face].push_back(face);
+            }
+          i += 2;
+        }
+      }
+    }
+    nghbFaces.resizeAndPreserve(2, nbNghb);
+  } // getGloNghbFacesNodeType
+
+  ///----------------------------------------------------------------
+  /*!
+   * \fn  void CMesh::getGloNghbFacesEdgeType(const MPI_Comm& comm, const CArray<int, 1>& face_idx,
+                               const CArray<double, 2>& bounds_lon, const CArray<double, 2>& bounds_lat,
+                               CArray<int, 2>& nghbFaces)
+   * Finds neighboring cells of a local domain for edge-type of neighbors.
+   * \param [in] comm
+   * \param [in] face_idx Array with global indexes.
+   * \param [in] bounds_lon Array of boundary longitudes.
+   * \param [in] bounds_lat Array of boundary latitudes.
+   * \param [out] nghbFaces 2D array of storing global indexes of neighboring cells and their owner procs.
+   */
+
+  void CMesh::getGloNghbFacesEdgeType(const MPI_Comm& comm, const CArray<int, 1>& face_idx,
+                               const CArray<double, 2>& bounds_lon, const CArray<double, 2>& bounds_lat,
+                               CArray<int, 2>& nghbFaces)
+  {
+    int nvertex = bounds_lon.rows();
+    int nbFaces = bounds_lon.shape()[1];
+    nghbFaces.resize(2, nbFaces*10);    // estimate of max number of neighbouring cells
+
+    int mpiRank, mpiSize;
+    MPI_Comm_rank(comm, &mpiRank);
+    MPI_Comm_size(comm, &mpiSize);
+
+    // (1) Generating unique node indexes
+    // (1.1) Creating a list of hashes for each node and a map nodeHash2Idx <hash, <idx,rank> >
+    vector<size_t> hashValues(4);
+    CClientClientDHTSizet::Index2VectorInfoTypeMap nodeHash2Idx;
+    CArray<size_t,1> nodeHashList(nbFaces*nvertex*4);
+    size_t iIdx = 0;
+    for (int nf = 0; nf < nbFaces; ++nf)
+    {
+      for (int nv = 0; nv < nvertex; ++nv)
+      {
+        hashValues = CMesh::createHashes(bounds_lon(nv, nf), bounds_lat(nv, nf));
+        size_t nodeIndex = generateNodeIndex(hashValues, mpiRank);
+        for (int nh = 0; nh < 4; ++nh)
+        {
+          if (nodeHash2Idx.count(hashValues[nh])==0)
+          {
+            nodeHash2Idx[hashValues[nh]].push_back(nodeIndex);
+            nodeHash2Idx[hashValues[nh]].push_back(mpiRank);
+            nodeHashList(iIdx) = hashValues[nh];
+            ++iIdx;
+          }
+        }
+      }
+    }
+    nodeHashList.resizeAndPreserve(iIdx);
+
+    // (1.2) Generating node indexes
+    // The ownership criterion: priority of the process holding the smaller index
+    // Maps generated in this step are:
+    // nodeHash2Info = <hash, idx1, idx2, idx3....>
+    // nodeIdx2IdxMin = <idx, idxMin>
+    // idxMin is a unique node identifier
+
+    CClientClientDHTSizet dhtNodeHash(nodeHash2Idx, comm);
+    dhtNodeHash.computeIndexInfoMapping(nodeHashList);
+    CClientClientDHTSizet::Index2VectorInfoTypeMap& nodeHash2Info = dhtNodeHash.getInfoIndexMap();
+
+    CClientClientDHTSizet::Index2VectorInfoTypeMap nodeIdx2IdxMin;
+
+    for (CClientClientDHTSizet::Index2VectorInfoTypeMap::iterator it = nodeHash2Info.begin(); it != nodeHash2Info.end(); ++it)
+    {
+      size_t idxMin = (it->second)[0];
+      size_t idx = (it->second)[0];
+      for (int i = 2; i < (it->second).size();)
+      {
+        if (mpiRank == (it->second)[i+1])
+        {
+          idx = (it->second)[i];
+        }
+        if ((it->second)[i] < idxMin)
+        {
+          idxMin = (it->second)[i];
+          (it->second)[i] = (it->second)[i-2];
+          (it->second)[i+1] = (it->second)[i-1];
+        }
+        i += 2;
+      }
+      (it->second)[0] = idxMin;
+      if (nodeIdx2IdxMin.count(idx) == 0)
+      {
+        nodeIdx2IdxMin[idx].push_back(idxMin);
+      }
+    }
+
+    // (2) Creating map edgeHash2Face = <edgeHash, [[face1, rank1], [face2, rank2]]>, where rank1 = rank2 = ...
+
+    CClientClientDHTSizet::Index2VectorInfoTypeMap::iterator it1, it2, it;
+    CClientClientDHTSizet::Index2VectorInfoTypeMap edgeHash2Face;
+    CArray<size_t,1> edgeHashList(nbFaces*nvertex);
+
+    size_t nEdge = 0;
+
+    for (int nf = 0; nf < nbFaces; ++nf)
+    {
+      for (int nv1 = 0; nv1 < nvertex; ++nv1)
+      {
+        // Getting indexes of edge's nodes
+        int nv2 = (nv1 < nvertex -1 ) ? (nv1 + 1) : (nv1 + 1 - nvertex); // cyclic rotation
+        vector<size_t> hashValues1 = CMesh::createHashes(bounds_lon(nv1, nf), bounds_lat(nv1, nf));
+        vector<size_t> hashValues2 = CMesh::createHashes(bounds_lon(nv2, nf), bounds_lat(nv2, nf));
+        size_t myNodeIdx1 = generateNodeIndex(hashValues1, mpiRank);
+        size_t myNodeIdx2 = generateNodeIndex(hashValues2, mpiRank);
+        it1 = nodeIdx2IdxMin.find(myNodeIdx1);
+        it2 = nodeIdx2IdxMin.find(myNodeIdx2);
+        size_t nodeIdxMin1 = (it1->second)[0];
+        size_t nodeIdxMin2 = (it2->second)[0];
+        size_t faceIdx = face_idx(nf);
+
+        if (nodeIdxMin1 != nodeIdxMin2)
+        {
+          size_t edgeHash = hashPairOrdered(nodeIdxMin1, nodeIdxMin2);
+          if (edgeHash2Face.count(edgeHash) == 0)
+          {
+            edgeHashList(nEdge) = edgeHash;
+            ++nEdge;
+          }
+          edgeHash2Face[edgeHash].push_back(faceIdx);
+          edgeHash2Face[edgeHash].push_back(mpiRank);
+        } // nodeIdxMin1 != nodeIdxMin2
+      }
+    }
+    edgeHashList.resizeAndPreserve(nEdge);
+
+    // (3) Face_face connectivity
+
+    int nbNghb = 0;
+    CClientClientDHTSizet::Index2VectorInfoTypeMap::iterator itNode1, itNode2;
+
+    // edgeHash2Info = <edgeHash, [[face1, rank1], [face2, rank2]]>
+    CClientClientDHTSizet dhtEdge2Face (edgeHash2Face, comm);
+    dhtEdge2Face.computeIndexInfoMapping(edgeHashList);
+    CClientClientDHTSizet::Index2VectorInfoTypeMap& edgeHash2Info = dhtEdge2Face.getInfoIndexMap();
+    CClientClientDHTSizet::Index2VectorInfoTypeMap mapFaces;  // auxiliar map
+
+    for (int nf = 0; nf < nbFaces; ++nf)
+    {
+      for (int nv1 = 0; nv1 < nvertex; ++nv1)
+      {
+        // Getting indexes of edge's nodes
+        int nv2 = (nv1 < nvertex -1 ) ? (nv1 + 1) : (nv1 + 1 - nvertex); // cyclic rotation
+        vector<size_t> hashValues1 = CMesh::createHashes(bounds_lon(nv1, nf), bounds_lat(nv1, nf));
+        vector<size_t> hashValues2 = CMesh::createHashes(bounds_lon(nv2, nf), bounds_lat(nv2, nf));
+
+        size_t myNodeIdx1 = generateNodeIndex(hashValues1, mpiRank);
+        size_t myNodeIdx2 = generateNodeIndex(hashValues2, mpiRank);
+        itNode1 = nodeIdx2IdxMin.find(myNodeIdx1);
+        itNode2 = nodeIdx2IdxMin.find(myNodeIdx2);
+        size_t nodeIdxMin1 = (itNode1->second)[0];
+        size_t nodeIdxMin2 = (itNode2->second)[0];
+
+        if (nodeIdxMin1 != nodeIdxMin2)
+        {
+          size_t edgeHash = hashPairOrdered(nodeIdxMin1, nodeIdxMin2);
+          it1 = edgeHash2Info.find(edgeHash);
+
+          for (int i = 0; i < it1->second.size();)
+          {
+            size_t face = it1->second[i];
+            size_t rank = it1->second[i+1];
+            if (rank != mpiRank)
+              if (mapFaces.count(face) == 0)
+              {
+                nghbFaces(0, nbNghb) = face;
+                nghbFaces(1, nbNghb) = rank;
+                ++nbNghb;
+                mapFaces[face].push_back(face);
+              }
+            i += 2;
+          }
+        } // nodeIdxMin1 != nodeIdxMin2
+      }
+    }
+    nghbFaces.resizeAndPreserve(2, nbNghb);
+  } // getGloNghbFacesEdgeType
+
+  ///----------------------------------------------------------------
+  /*!
+   * \fn void getGlobalNghbFaces (const int nghbType, const MPI_Comm& comm, const CArray<int, 1>& face_idx,
+                                  const CArray<double, 2>& bounds_lon, const CArray<double, 2>& bounds_lat,
+                                  CArray<size_t, 1>& nghbFaces)
+   * Finds neighboring faces owned by other procs.
+   * \param [in] nghbType 0 for faces sharing nodes, otherwise for faces sharing edges.
+   * \param [in] comm
+   * \param [in] face_idx Array with global indexes.
+   * \param [in] bounds_lon Array of boundary longitudes.
+   * \param [in] bounds_lat Array of boundary latitudes.
+   * \param [out] nghbFaces 2D array containing neighboring faces and owner ranks.
+   */
+
+  void CMesh::getGlobalNghbFaces(const int nghbType, const MPI_Comm& comm,
+                                 const CArray<int, 1>& face_idx,
+                                 const CArray<double, 2>& bounds_lon, const CArray<double, 2>& bounds_lat,
+                                 CArray<int, 2>& nghbFaces)
+  {
+    if (nghbType == 0)
+      getGloNghbFacesNodeType(comm, face_idx, bounds_lon, bounds_lat, nghbFaces);
+    else
+      getGloNghbFacesEdgeType(comm, face_idx, bounds_lon, bounds_lat, nghbFaces);
+  } // getGlobalNghbFaces
+
+  ///----------------------------------------------------------------
+  /*!
+   * \fn void getLocalNghbFaces (const int nghbType,
+                                  const CArray<double, 2>& bounds_lon, const CArray<double, 2>& bounds_lat,
+                                  CArray<size_t, 1>& nghbFaces)
+   * \param [in] nghbType 0 for faces sharing nodes, otherwise for faces sharing edges.
+   * \param [in] bounds_lon Array of boundary longitudes.
+   * \param [in] bounds_lat Array of boundary latitudes.
+   * \param [out] nghbFaces 1D array containing neighboring faces.
+   */
+
+  void CMesh::getLocalNghbFaces(const int nghbType, const CArray<int, 1>& face_idx,
+                                const CArray<double, 2>& bounds_lon, const CArray<double, 2>& bounds_lat,
+                                CArray<int, 2>& nghbFaces, CArray<int, 1>& nbNghbFaces)
+  {
+    if (nghbType == 0)
+      getLocNghbFacesNodeType(face_idx, bounds_lon, bounds_lat, nghbFaces, nbNghbFaces);
+    else
+      getLocNghbFacesEdgeType(face_idx, bounds_lon, bounds_lat, nghbFaces, nbNghbFaces);
+  } // getLocalNghbFaces
+
+  ///----------------------------------------------------------------
+  /*!
+   * \fn void getLocNghbFacesNodeType (const CArray<double, 2>& bounds_lon, const CArray<double, 2>& bounds_lat,
+                                       CArray<int, 2>& nghbFaces)
+   * \param [in] face_idx Array with local face indexing.
+   * \param [in] bounds_lon Array of boundary longitudes.
+   * \param [in] bounds_lat Array of boundary latitudes.
+   * \param [out] nghbFaces 2D array containing neighboring faces.
+   * \param [out] nbNghbFaces Array containing number of neighboring faces.
+   */
+
+  void CMesh::getLocNghbFacesNodeType (const CArray<int, 1>& face_idx,
+                                       const CArray<double, 2>& bounds_lon, const CArray<double, 2>& bounds_lat,
+                                       CArray<int, 2>& faceToFaces, CArray<int, 1>& nbNghbFaces)
+  {
+    int nvertex = bounds_lon.rows();
+    int nbFaces = bounds_lon.shape()[1];
+    int nbNodes = 0;
+    nbNghbFaces.resize(nbFaces);
+    nbNghbFaces = 0;
+
+    // nodeToFaces connectivity
+    CClientClientDHTSizet::Index2VectorInfoTypeMap nodeToFaces;
+    for (int nf = 0; nf < nbFaces; ++nf)
+      for (int nv = 0; nv < nvertex; ++nv)
+      {
+        size_t nodeHash = (CMesh::createHashes(bounds_lon(nv, nf), bounds_lat(nv ,nf)))[0];
+        nodeToFaces[nodeHash].push_back(face_idx(nf));
+      }
+
+    // faceToFaces connectivity
+    std::unordered_map <int, int> mapFaces;  // mapFaces = < hash(face1, face2), hash> (the mapped value is irrelevant)
+    int maxNb = 20;                            // some assumption on the max possible number of neighboring cells
+    faceToFaces.resize(maxNb, nbFaces);
+    CClientClientDHTSizet::Index2VectorInfoTypeMap::iterator it;
+    for (it = nodeToFaces.begin(); it != nodeToFaces.end(); ++it)
+    {
+      int size = it->second.size();
+      for (int i = 0; i < (size-1); ++i)
+      {
+        int face1 = it->second[i];
+        for (int j = i+1; j < size; ++j)
+        {
+          int face2 = it->second[j];
+          if (face2 != face1)
+          {
+            int hashFace = hashPairOrdered(face1, face2);
+            if (mapFaces.count(hashFace) == 0)
+            {
+              faceToFaces(nbNghbFaces(face1), face1) = face2;
+              faceToFaces(nbNghbFaces(face2), face2) = face1;
+              ++nbNghbFaces(face1);
+              ++nbNghbFaces(face2);
+              mapFaces[hashFace] = hashFace;
+            }
+          }
+        }
+      }
+    }
+  } //getLocNghbFacesNodeType
+
+
+  ///----------------------------------------------------------------
+  /*!
+   * \fn void getLocNghbFacesEdgeType (const CArray<int, 1>& face_idx,
+   *                                   const CArray<double, 2>& bounds_lon, const CArray<double, 2>& bounds_lat,
+   *                                   CArray<int, 2>& nghbFaces, CArray<int, 1>& nbNghbFaces)
+   * \param [in] face_idx Array with local face indexing.
+   * \param [in] bounds_lon Array of boundary longitudes.
+   * \param [in] bounds_lat Array of boundary latitudes.
+   * \param [out] nghbFaces 2D array containing neighboring faces.
+   * \param [out] nbNghbFaces Array containing number of neighboring faces.
+   */
+
+  void CMesh::getLocNghbFacesEdgeType (const CArray<int, 1>& face_idx,
+                                       const CArray<double, 2>& bounds_lon, const CArray<double, 2>& bounds_lat,
+                                       CArray<int, 2>& faceToFaces, CArray<int, 1>& nbNghbFaces)
+  {
+    int nvertex = bounds_lon.rows();
+    int nbFaces = bounds_lon.shape()[1];
+    int nbNodes = 0;
+    int nbEdges = 0;
+    nbNghbFaces.resize(nbFaces);
+    nbNghbFaces = 0;
+
+    // faceToNodes connectivity
+    CArray<double, 2> faceToNodes (nvertex, nbFaces);
+
+    std::unordered_map <pairDouble, int, boost::hash<pairDouble> > mapNodes;
+
+    for (int nf = 0; nf < nbFaces; ++nf)
+      for (int nv = 0; nv < nvertex; ++nv)
+      {
+        if (mapNodes.find(make_pair (bounds_lon(nv, nf), bounds_lat(nv ,nf))) == mapNodes.end())
+        {
+          mapNodes[make_pair (bounds_lon(nv, nf), bounds_lat(nv, nf))] = nbNodes;
+          faceToNodes(nv,nf) = nbNodes ;
+          ++nbNodes ;
+        }
+        else
+          faceToNodes(nv,nf) = mapNodes[make_pair (bounds_lon(nv, nf), bounds_lat(nv ,nf))];
+      }
+
+    // faceToFaces connectivity
+    std::unordered_map <pairInt, int, boost::hash<pairInt> > mapEdges;
+    faceToFaces.resize(nvertex, nbFaces);
+    CArray<int, 2> edgeToFaces(2, nbFaces*nvertex); // max possible
+
+    for (int nf = 0; nf < nbFaces; ++nf)
+    {
+      for (int nv1 = 0; nv1 < nvertex; ++nv1)
+      {
+        int nv2 = (nv1 < nvertex -1 ) ? (nv1 + 1) : (nv1 + 1 - nvertex); // cyclic rotation
+        int face = face_idx(nf);
+        int node1 = faceToNodes(nv1,face);
+        int node2 = faceToNodes(nv2,face);
+        if (node1 != node2)
+        {
+          if (mapEdges.find(make_ordered_pair (node1, node2)) == mapEdges.end())
+          {
+            mapEdges[make_ordered_pair (node1, node2)] = nbEdges;
+            edgeToFaces(0,nbEdges) = face;
+            ++nbEdges;
+          }
+          else
+          {
+            int edge = mapEdges[make_ordered_pair (node1, node2)];
+            edgeToFaces(1, edge) = face;
+            int face1 = face;
+            int face2 = edgeToFaces(0,edge);
+            faceToFaces(nbNghbFaces(face1), face1) =  face2;
+            faceToFaces(nbNghbFaces(face2), face2) =  face1;
+            ++nbNghbFaces(face1);
+            ++nbNghbFaces(face2);
+          }
+        } // node1 != node2
+      } // nv
+    } // nf
+
+  } //getLocNghbFacesEdgeType
+
+
+} // namespace xios
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/node/mesh.hpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/node/mesh.hpp	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/node/mesh.hpp	(revision 1749)
@@ -0,0 +1,100 @@
+/*!
+  \file mesh.hpp
+  \author Olga Abramkina
+  \brief Declaration of class CMesh.
+*/
+
+#ifndef __XIOS_CMesh__
+#define __XIOS_CMesh__
+ 
+#include "array_new.hpp"
+#include "dht_auto_indexing.hpp"
+
+namespace xios {
+  
+   /// ////////////////////// DÃ©clarations ////////////////////// ///
+
+   class CMesh;
+
+   ///--------------------------------------------------------------
+
+/*!
+  \class CMesh
+  \brief CMesh class.
+*/ 
+  class CMesh
+  {
+  
+    public:
+
+      CMesh(void);
+      ~CMesh(void);
+    
+      int nbNodesGlo;
+      int nbEdgesGlo;
+
+      int node_start;
+      int node_count;
+      int edge_start;
+      int edge_count;
+
+      bool nodesAreWritten;
+      bool edgesAreWritten;
+      bool facesAreWritten;
+      
+      CArray<double, 1> node_lon;
+      CArray<double, 1> node_lat;
+      
+      CArray<double, 1> edge_lon;
+      CArray<double, 1> edge_lat;
+      CArray<int, 2> edge_nodes;
+
+      CArray<double, 1> face_lon;
+      CArray<double, 1> face_lat;
+      CArray<int, 2> face_nodes;
+      CArray<int, 2> face_edges;
+      CArray<int, 2> edge_faces;
+      CArray<int, 2> face_faces;
+
+      void createMesh(const CArray<double, 1>&, const CArray<double, 1>&,
+                      const CArray<double, 2>&, const CArray<double, 2>& );
+                        
+      void createMeshEpsilon(const MPI_Comm&,
+                             const CArray<double, 1>&, const CArray<double, 1>&,
+                             const CArray<double, 2>&, const CArray<double, 2>& );
+
+      void getGlobalNghbFaces(const int, const MPI_Comm&, const CArray<int, 1>&,
+                              const CArray<double, 2>&, const CArray<double, 2>&,
+                              CArray<int, 2>&);
+
+      void getLocalNghbFaces(const int, const CArray<int, 1>&,
+                             const CArray<double, 2>&, const CArray<double, 2>&,
+                             CArray<int, 2>&, CArray<int, 1>&);
+            
+      static CMesh* getMesh(StdString, int);
+
+    private:
+
+      typedef std::pair<double, double> pairDouble;
+      typedef std::pair<int, int> pairInt;
+
+      int nbNodes_;
+      int nbEdges_;
+      int nbFaces_;
+
+      static std::map <StdString, CMesh> meshList;
+      static std::map <StdString, vector<int> > domainList;
+      CClientClientDHTSizet* pNodeGlobalIndex;                    // pointer to a map <nodeHash, nodeIdxGlo>
+      CClientClientDHTSizet* pEdgeGlobalIndex;                    // pointer to a map <edgeHash, edgeIdxGlo>
+      void getGloNghbFacesNodeType(const MPI_Comm&, const CArray<int, 1>&, const CArray<double, 2>&, const CArray<double, 2>&, CArray<int, 2>&);
+      void getGloNghbFacesEdgeType(const MPI_Comm&, const CArray<int, 1>&, const CArray<double, 2>&, const CArray<double, 2>&, CArray<int, 2>&);
+      void getLocNghbFacesNodeType(const CArray<int, 1>&, const CArray<double, 2>&, const CArray<double, 2>&, CArray<int, 2>&, CArray<int, 1>&);
+      void getLocNghbFacesEdgeType(const CArray<int, 1>&, const CArray<double, 2>&, const CArray<double, 2>&, CArray<int, 2>&, CArray<int, 1>&);
+
+      vector<size_t> createHashes (const double, const double);
+
+  }; 
+
+} // namespace xios
+
+#endif //__XIOS_CMesh__
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/node/node_enum.hpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/node/node_enum.hpp	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/node/node_enum.hpp	(revision 1749)
@@ -0,0 +1,47 @@
+#ifndef __XIOS_NODE_ENUM__
+#define __XIOS_NODE_ENUM__
+
+//#define DECLARE_NODE(Name_, name_)     ,e##Name_, g##Name_
+//#define DECLARE_NODE_PAR(Name_, name_) ,e##Name_, g##Name_
+
+namespace xios
+{
+      /// ////////////////////// DÃ©finitions ////////////////////// ///
+      typedef enum _node_type
+      {
+         Unknown = 0,
+         eAxis,gAxis,
+         eDomain,gDomain,
+         eField,gField,
+         eFile,gFile,
+         eGrid,gGrid,
+         eVariable,gVariable,
+         eContext,gContext,
+         eCalendarWrapper,
+         eTransformation,
+         eInverseAxis,
+         eZoomAxis,
+         eInterpolateAxis,
+         eExtractAxis,
+         eZoomDomain,
+         eInterpolateDomain,
+         eGenerateRectilinearDomain,
+         eScalar,
+         eReduceAxisToScalar,
+         eReduceDomainToAxis,
+         eReduceAxisToAxis,
+         eExtractDomainToAxis,
+         eComputeConnectivityDomain,
+         eExpandDomain,
+         eExtractAxisToScalar,
+         eReduceDomainToScalar,
+         eTemporalSplitting,
+         eDuplicateScalarToAxis,
+         eReduceScalarToScalar,
+         eReorderDomain,
+         eExtractDomain
+       } ENodeType;
+
+} // namespace xios
+
+#endif // __XIOS_NODE_ENUM__
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/node/node_type.hpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/node/node_type.hpp	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/node/node_type.hpp	(revision 1749)
@@ -0,0 +1,35 @@
+#ifndef __XIOS_NODE_TYPE__
+#define __XIOS_NODE_TYPE__
+
+#include "axis.hpp"
+#include "domain.hpp"
+#include "field.hpp"
+#include "file.hpp"
+#include "grid.hpp"
+#include "variable.hpp"
+#include "context.hpp"
+#include "transformation.hpp"
+#include "inverse_axis.hpp"
+#include "zoom_axis.hpp"
+#include "interpolate_axis.hpp"
+#include "extract_axis.hpp"
+#include "zoom_domain.hpp"
+#include "interpolate_domain.hpp"
+#include "generate_rectilinear_domain.hpp"
+#include "scalar.hpp"
+#include "reduce_axis_to_scalar.hpp"
+#include "reduce_domain_to_axis.hpp"
+#include "reduce_axis_to_axis.hpp"
+#include "extract_domain_to_axis.hpp"
+#include "compute_connectivity_domain.hpp"
+#include "expand_domain.hpp"
+#include "extract_axis_to_scalar.hpp"
+#include "reduce_domain_to_scalar.hpp"
+#include "temporal_splitting.hpp"
+#include "duplicate_scalar_to_axis.hpp"
+#include "reduce_scalar_to_scalar.hpp"
+#include "reorder_domain.hpp"
+#include "extract_domain.hpp"
+
+
+#endif // __XIOS_NODE_TYPE__
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/node/reduce_axis_to_axis.cpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/node/reduce_axis_to_axis.cpp	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/node/reduce_axis_to_axis.cpp	(revision 1749)
@@ -0,0 +1,58 @@
+#include "reduce_axis_to_axis.hpp"
+#include "type.hpp"
+#include "axis.hpp"
+
+namespace xios {
+
+  /// ////////////////////// DÃ©finitions ////////////////////// ///
+
+  CReduceAxisToAxis::CReduceAxisToAxis(void)
+    : CObjectTemplate<CReduceAxisToAxis>(), CReduceAxisToAxisAttributes(), CTransformation<CAxis>()
+  { /* Ne rien faire de plus */ }
+
+  CReduceAxisToAxis::CReduceAxisToAxis(const StdString & id)
+    : CObjectTemplate<CReduceAxisToAxis>(id), CReduceAxisToAxisAttributes(), CTransformation<CAxis>()
+  { /* Ne rien faire de plus */ }
+
+  CReduceAxisToAxis::~CReduceAxisToAxis(void)
+  {}
+
+  CTransformation<CAxis>* CReduceAxisToAxis::create(const StdString& id, xml::CXMLNode* node)
+  {
+    CReduceAxisToAxis* reduceAxis = CReduceAxisToAxisGroup::get("reduce_axis_to_axis_definition")->createChild(id);
+    if (node) reduceAxis->parse(*node);
+    return static_cast<CTransformation<CAxis>*>(reduceAxis);
+  }
+
+  bool CReduceAxisToAxis::registerTrans()
+  {
+    return registerTransformation(TRANS_REDUCE_AXIS_TO_AXIS, CReduceAxisToAxis::create);
+  }
+
+  bool CReduceAxisToAxis::_dummyRegistered = CReduceAxisToAxis::registerTrans();
+
+  //----------------------------------------------------------------
+
+  StdString CReduceAxisToAxis::GetName(void)    { return StdString("reduce_axis_to_axis"); }
+  StdString CReduceAxisToAxis::GetDefName(void) { return StdString("reduce_axis_to_axis"); }
+  ENodeType CReduceAxisToAxis::GetType(void)    { return eReduceAxisToAxis; }
+
+  void CReduceAxisToAxis::checkValid(CAxis* axisDst, CAxis* axisSrc)
+  {
+  
+    if (this->operation.isEmpty())
+      ERROR("CReduceAxisToAxis::checkValid(CAxis* axisDst, CAxis* axisSrc)",
+             << "An operation must be defined."
+             << "Axis source " <<axisSrc->getId() << std::endl
+             << "Axis destination " << axisDst->getId());
+
+
+    if (axisDst->n_glo != axisSrc->n_glo)
+       ERROR("CReduceAxisToAxis::checkValid(CAxis* axisDst, CAxis* axisSrc)",
+            << "both axis should have same n_glo"
+            << "Axis source " <<axisSrc->getId() << " has n_glo " << axisSrc->n_glo << std::endl
+            << "Axis destination " << axisDst->getId() << " has n_glo " << axisDst->n_glo);
+    
+  }
+
+}
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/node/reduce_axis_to_axis.hpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/node/reduce_axis_to_axis.hpp	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/node/reduce_axis_to_axis.hpp	(revision 1749)
@@ -0,0 +1,66 @@
+#ifndef __XIOS_CReduceAxisToAxis__
+#define __XIOS_CReduceAxisToAxis__
+
+/// xios headers ///
+#include "xios_spl.hpp"
+#include "attribute_enum.hpp"
+#include "attribute_enum_impl.hpp"
+#include "attribute_array.hpp"
+#include "declare_attribute.hpp"
+#include "object_template.hpp"
+#include "group_factory.hpp"
+#include "declare_group.hpp"
+#include "transformation.hpp"
+
+namespace xios {
+  /// ////////////////////// DÃ©clarations ////////////////////// ///
+  class CReduceAxisToAxisGroup;
+  class CReduceAxisToAxisAttributes;
+  class CReduceAxisToAxis;
+  class CAxis;
+
+  ///--------------------------------------------------------------
+
+  // Declare/Define CFileAttribute
+  BEGIN_DECLARE_ATTRIBUTE_MAP(CReduceAxisToAxis)
+#include "reduce_axis_to_axis_attribute.conf"
+  END_DECLARE_ATTRIBUTE_MAP(CReduceAxisToAxis)
+
+  ///--------------------------------------------------------------
+  /*!
+    \class CReduceAxisToAxis
+    This class describes reduce_domain in xml file.
+  */
+  class CReduceAxisToAxis
+    : public CObjectTemplate<CReduceAxisToAxis>
+    , public CReduceAxisToAxisAttributes
+    , public CTransformation<CAxis>
+  {
+    public :
+      typedef CObjectTemplate<CReduceAxisToAxis> SuperClass;
+      typedef CReduceAxisToAxisAttributes SuperClassAttribute;
+
+    public :
+      /// Constructeurs ///
+      CReduceAxisToAxis(void);
+      explicit CReduceAxisToAxis(const StdString& id);
+
+      /// Destructeur ///
+      virtual ~CReduceAxisToAxis(void);
+
+      virtual void checkValid(CAxis* axisDst, CAxis* axisSrc);
+
+      /// Accesseurs statiques ///
+      static StdString GetName(void);
+      static StdString GetDefName(void);
+      static ENodeType GetType(void);
+    private:
+      static bool registerTrans();
+      static CTransformation<CAxis>* create(const StdString& id, xml::CXMLNode* node);
+      static bool _dummyRegistered;
+  }; // class CReduceAxisToAxis
+
+  DECLARE_GROUP(CReduceAxisToAxis);
+} // namespace xios
+
+#endif // __XIOS_CReduceAxisToAxis__
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/node/reduce_axis_to_scalar.cpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/node/reduce_axis_to_scalar.cpp	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/node/reduce_axis_to_scalar.cpp	(revision 1749)
@@ -0,0 +1,43 @@
+#include "reduce_axis_to_scalar.hpp"
+#include "type.hpp"
+
+namespace xios {
+
+  /// ////////////////////// DÃ©finitions ////////////////////// ///
+
+  CReduceAxisToScalar::CReduceAxisToScalar(void)
+    : CObjectTemplate<CReduceAxisToScalar>(), CReduceAxisToScalarAttributes(), CTransformation<CScalar>()
+  { /* Ne rien faire de plus */ }
+
+  CReduceAxisToScalar::CReduceAxisToScalar(const StdString & id)
+    : CObjectTemplate<CReduceAxisToScalar>(id), CReduceAxisToScalarAttributes(), CTransformation<CScalar>()
+  { /* Ne rien faire de plus */ }
+
+  CReduceAxisToScalar::~CReduceAxisToScalar(void)
+  {}
+
+  CTransformation<CScalar>* CReduceAxisToScalar::create(const StdString& id, xml::CXMLNode* node)
+  {
+    CReduceAxisToScalar* reduceAxis = CReduceAxisToScalarGroup::get("reduce_axis_to_scalar_definition")->createChild(id);
+    if (node) reduceAxis->parse(*node);
+    return static_cast<CTransformation<CScalar>*>(reduceAxis);
+  }
+
+  bool CReduceAxisToScalar::registerTrans()
+  {
+    return registerTransformation(TRANS_REDUCE_AXIS_TO_SCALAR, CReduceAxisToScalar::create);
+  }
+
+  bool CReduceAxisToScalar::_dummyRegistered = CReduceAxisToScalar::registerTrans();
+
+  //----------------------------------------------------------------
+
+  StdString CReduceAxisToScalar::GetName(void)    { return StdString("reduce_axis_to_scalar"); }
+  StdString CReduceAxisToScalar::GetDefName(void) { return StdString("reduce_axis_to_scalar"); }
+  ENodeType CReduceAxisToScalar::GetType(void)    { return eReduceAxisToScalar; }
+
+  void CReduceAxisToScalar::checkValid(CScalar* scalarDst)
+  {
+  }
+
+}
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/node/reduce_axis_to_scalar.hpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/node/reduce_axis_to_scalar.hpp	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/node/reduce_axis_to_scalar.hpp	(revision 1749)
@@ -0,0 +1,66 @@
+#ifndef __XIOS_CReduceAxisToScalar__
+#define __XIOS_CReduceAxisToScalar__
+
+/// xios headers ///
+#include "xios_spl.hpp"
+#include "attribute_enum.hpp"
+#include "attribute_enum_impl.hpp"
+#include "attribute_array.hpp"
+#include "declare_attribute.hpp"
+#include "object_template.hpp"
+#include "group_factory.hpp"
+#include "declare_group.hpp"
+#include "transformation.hpp"
+
+namespace xios {
+  /// ////////////////////// DÃ©clarations ////////////////////// ///
+  class CReduceAxisToScalarGroup;
+  class CReduceAxisToScalarAttributes;
+  class CReduceAxisToScalar;
+  class CScalar;
+
+  ///--------------------------------------------------------------
+
+  // Declare/Define CFileAttribute
+  BEGIN_DECLARE_ATTRIBUTE_MAP(CReduceAxisToScalar)
+#include "reduce_axis_to_scalar_attribute.conf"
+  END_DECLARE_ATTRIBUTE_MAP(CReduceAxisToScalar)
+
+  ///--------------------------------------------------------------
+  /*!
+    \class CReduceAxisToScalar
+    This class describes reduce_axis in xml file.
+  */
+  class CReduceAxisToScalar
+    : public CObjectTemplate<CReduceAxisToScalar>
+    , public CReduceAxisToScalarAttributes
+    , public CTransformation<CScalar>
+  {
+    public :
+      typedef CObjectTemplate<CReduceAxisToScalar> SuperClass;
+      typedef CReduceAxisToScalarAttributes SuperClassAttribute;
+
+    public :
+      /// Constructeurs ///
+      CReduceAxisToScalar(void);
+      explicit CReduceAxisToScalar(const StdString& id);
+
+      /// Destructeur ///
+      virtual ~CReduceAxisToScalar(void);
+
+      virtual void checkValid(CScalar* scalarDst);
+
+      /// Accesseurs statiques ///
+      static StdString GetName(void);
+      static StdString GetDefName(void);
+      static ENodeType GetType(void);
+    private:
+      static bool registerTrans();
+      static CTransformation<CScalar>* create(const StdString& id, xml::CXMLNode* node);
+      static bool _dummyRegistered;
+  }; // class CReduceAxisToScalar
+
+  DECLARE_GROUP(CReduceAxisToScalar);
+} // namespace xios
+
+#endif // __XIOS_CReduceAxisToScalar__
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/node/reduce_domain_to_axis.cpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/node/reduce_domain_to_axis.cpp	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/node/reduce_domain_to_axis.cpp	(revision 1749)
@@ -0,0 +1,89 @@
+#include "reduce_domain_to_axis.hpp"
+#include "type.hpp"
+#include "axis.hpp"
+#include "domain.hpp"
+
+namespace xios {
+
+  /// ////////////////////// DÃ©finitions ////////////////////// ///
+
+  CReduceDomainToAxis::CReduceDomainToAxis(void)
+    : CObjectTemplate<CReduceDomainToAxis>(), CReduceDomainToAxisAttributes(), CTransformation<CAxis>()
+  { /* Ne rien faire de plus */ }
+
+  CReduceDomainToAxis::CReduceDomainToAxis(const StdString & id)
+    : CObjectTemplate<CReduceDomainToAxis>(id), CReduceDomainToAxisAttributes(), CTransformation<CAxis>()
+  { /* Ne rien faire de plus */ }
+
+  CReduceDomainToAxis::~CReduceDomainToAxis(void)
+  {}
+
+  CTransformation<CAxis>* CReduceDomainToAxis::create(const StdString& id, xml::CXMLNode* node)
+  {
+    CReduceDomainToAxis* reduceDomain = CReduceDomainToAxisGroup::get("reduce_domain_to_axis_definition")->createChild(id);
+    if (node) reduceDomain->parse(*node);
+    return static_cast<CTransformation<CAxis>*>(reduceDomain);
+  }
+
+  bool CReduceDomainToAxis::registerTrans()
+  {
+    return registerTransformation(TRANS_REDUCE_DOMAIN_TO_AXIS, CReduceDomainToAxis::create);
+  }
+
+  bool CReduceDomainToAxis::_dummyRegistered = CReduceDomainToAxis::registerTrans();
+
+  //----------------------------------------------------------------
+
+  StdString CReduceDomainToAxis::GetName(void)    { return StdString("reduce_domain_to_axis"); }
+  StdString CReduceDomainToAxis::GetDefName(void) { return StdString("reduce_domain_to_axis"); }
+  ENodeType CReduceDomainToAxis::GetType(void)    { return eReduceDomainToAxis; }
+
+  void CReduceDomainToAxis::checkValid(CAxis* axisDst, CDomain* domainSrc)
+  {
+    if (CDomain::type_attr::unstructured == domainSrc->type)
+      ERROR("CReduceDomainToAxis::checkValid(CAxis* axisDst, CDomain* domainSrc)",
+       << "Domain reduction is only supported for rectilinear or curvillinear grid."
+       << "Domain source " <<domainSrc->getId() << std::endl
+       << "Axis destination " << axisDst->getId());
+
+    int axis_n_glo = axisDst->n_glo;
+    int domain_ni_glo = domainSrc->ni_glo;
+    int domain_nj_glo = domainSrc->nj_glo;
+
+    if (this->operation.isEmpty())
+      ERROR("CReduceDomainToAxis::checkValid(CAxis* axisDst, CDomain* domainSrc)",
+             << "An operation must be defined."
+             << "Domain source " <<domainSrc->getId() << std::endl
+             << "Axis destination " << axisDst->getId());
+
+    if (this->direction.isEmpty())
+      ERROR("CReduceDomainToAxis::checkValid(CAxis* axisDst, CDomain* domainSrc)",
+             << "A direction to apply the operation must be defined. It should be: 'iDir' or 'jDir'"
+             << "Domain source " <<domainSrc->getId() << std::endl
+             << "Axis destination " << axisDst->getId());
+    if (this->local.isEmpty()) local=false ;
+
+    switch (direction)
+    {
+      case direction_attr::jDir:
+        if (axis_n_glo != domain_ni_glo)
+          ERROR("CReduceDomainToAxis::checkValid(CAxis* axisDst, CDomain* domainSrc)",
+            << "Extract domain along j, axis destination should have n_glo equal to ni_glo of domain source"
+            << "Domain source " <<domainSrc->getId() << " has nj_glo " << domain_ni_glo << std::endl
+            << "Axis destination " << axisDst->getId() << " has n_glo " << axis_n_glo);
+         break;
+
+      case direction_attr::iDir:
+        if (axis_n_glo != domain_nj_glo)
+          ERROR("CReduceDomainToAxis::checkValid(CAxis* axisDst, CDomain* domainSrc)",
+            << "Extract domain along i, axis destination should have n_glo equal to nj_glo of domain source"
+            << "Domain source " <<domainSrc->getId() << " has nj_glo " << domain_nj_glo << std::endl
+            << "Axis destination " << axisDst->getId() << " has n_glo " << axis_n_glo);
+        break;
+
+      default:
+        break;
+    }
+  }
+
+}
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/node/reduce_domain_to_axis.hpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/node/reduce_domain_to_axis.hpp	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/node/reduce_domain_to_axis.hpp	(revision 1749)
@@ -0,0 +1,67 @@
+#ifndef __XIOS_CReduceDomainToAxis__
+#define __XIOS_CReduceDomainToAxis__
+
+/// xios headers ///
+#include "xios_spl.hpp"
+#include "attribute_enum.hpp"
+#include "attribute_enum_impl.hpp"
+#include "attribute_array.hpp"
+#include "declare_attribute.hpp"
+#include "object_template.hpp"
+#include "group_factory.hpp"
+#include "declare_group.hpp"
+#include "transformation.hpp"
+
+namespace xios {
+  /// ////////////////////// DÃ©clarations ////////////////////// ///
+  class CReduceDomainToAxisGroup;
+  class CReduceDomainToAxisAttributes;
+  class CReduceDomainToAxis;
+  class CAxis;
+  class CDomain;
+
+  ///--------------------------------------------------------------
+
+  // Declare/Define CFileAttribute
+  BEGIN_DECLARE_ATTRIBUTE_MAP(CReduceDomainToAxis)
+#include "reduce_domain_to_axis_attribute.conf"
+  END_DECLARE_ATTRIBUTE_MAP(CReduceDomainToAxis)
+
+  ///--------------------------------------------------------------
+  /*!
+    \class CReduceDomainToAxis
+    This class describes reduce_domain in xml file.
+  */
+  class CReduceDomainToAxis
+    : public CObjectTemplate<CReduceDomainToAxis>
+    , public CReduceDomainToAxisAttributes
+    , public CTransformation<CAxis>
+  {
+    public :
+      typedef CObjectTemplate<CReduceDomainToAxis> SuperClass;
+      typedef CReduceDomainToAxisAttributes SuperClassAttribute;
+
+    public :
+      /// Constructeurs ///
+      CReduceDomainToAxis(void);
+      explicit CReduceDomainToAxis(const StdString& id);
+
+      /// Destructeur ///
+      virtual ~CReduceDomainToAxis(void);
+
+      virtual void checkValid(CAxis* axisDst, CDomain* domainSrc);
+
+      /// Accesseurs statiques ///
+      static StdString GetName(void);
+      static StdString GetDefName(void);
+      static ENodeType GetType(void);
+    private:
+      static bool registerTrans();
+      static CTransformation<CAxis>* create(const StdString& id, xml::CXMLNode* node);
+      static bool _dummyRegistered;
+  }; // class CReduceDomainToAxis
+
+  DECLARE_GROUP(CReduceDomainToAxis);
+} // namespace xios
+
+#endif // __XIOS_CReduceDomainToAxis__
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/node/reduce_domain_to_scalar.cpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/node/reduce_domain_to_scalar.cpp	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/node/reduce_domain_to_scalar.cpp	(revision 1749)
@@ -0,0 +1,44 @@
+#include "reduce_domain_to_scalar.hpp"
+#include "type.hpp"
+
+namespace xios {
+
+  /// ////////////////////// DÃ©finitions ////////////////////// ///
+
+  CReduceDomainToScalar::CReduceDomainToScalar(void)
+    : CObjectTemplate<CReduceDomainToScalar>(), CReduceDomainToScalarAttributes(), CTransformation<CScalar>()
+  { /* Ne rien faire de plus */ }
+
+  CReduceDomainToScalar::CReduceDomainToScalar(const StdString & id)
+    : CObjectTemplate<CReduceDomainToScalar>(id), CReduceDomainToScalarAttributes(), CTransformation<CScalar>()
+  { /* Ne rien faire de plus */ }
+
+  CReduceDomainToScalar::~CReduceDomainToScalar(void)
+  {}
+
+  CTransformation<CScalar>* CReduceDomainToScalar::create(const StdString& id, xml::CXMLNode* node)
+  {
+    CReduceDomainToScalar* reduceDomain = CReduceDomainToScalarGroup::get("reduce_domain_to_scalar_definition")->createChild(id);
+    if (node) reduceDomain->parse(*node);
+    return static_cast<CTransformation<CScalar>*>(reduceDomain);
+  }
+
+  bool CReduceDomainToScalar::registerTrans()
+  {
+    return registerTransformation(TRANS_REDUCE_DOMAIN_TO_SCALAR, CReduceDomainToScalar::create);
+  }
+
+  bool CReduceDomainToScalar::_dummyRegistered = CReduceDomainToScalar::registerTrans();
+
+  //----------------------------------------------------------------
+
+  StdString CReduceDomainToScalar::GetName(void)    { return StdString("reduce_domain_to_scalar"); }
+  StdString CReduceDomainToScalar::GetDefName(void) { return StdString("reduce_domain_to_scalar"); }
+  ENodeType CReduceDomainToScalar::GetType(void)    { return eReduceDomainToScalar; }
+
+  void CReduceDomainToScalar::checkValid(CScalar* scalarDst, CDomain* domainSrc)
+  {
+    if (this->local.isEmpty()) local=false ;
+  }
+
+}
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/node/reduce_domain_to_scalar.hpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/node/reduce_domain_to_scalar.hpp	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/node/reduce_domain_to_scalar.hpp	(revision 1749)
@@ -0,0 +1,67 @@
+#ifndef __XIOS_CReduceDomainToScalar__
+#define __XIOS_CReduceDomainToScalar__
+
+/// xios headers ///
+#include "xios_spl.hpp"
+#include "attribute_enum.hpp"
+#include "attribute_enum_impl.hpp"
+#include "attribute_array.hpp"
+#include "declare_attribute.hpp"
+#include "object_template.hpp"
+#include "group_factory.hpp"
+#include "declare_group.hpp"
+#include "transformation.hpp"
+
+namespace xios {
+  /// ////////////////////// DÃ©clarations ////////////////////// ///
+  class CReduceDomainToScalarGroup;
+  class CReduceDomainToScalarAttributes;
+  class CReduceDomainToScalar;
+  class CDomain;
+  class CScalar;
+
+  ///--------------------------------------------------------------
+
+  // Declare/Define CFileAttribute
+  BEGIN_DECLARE_ATTRIBUTE_MAP(CReduceDomainToScalar)
+#include "reduce_domain_to_scalar_attribute.conf"
+  END_DECLARE_ATTRIBUTE_MAP(CReduceDomainToScalar)
+
+  ///--------------------------------------------------------------
+  /*!
+    \class CReduceDomainToScalar
+    This class describes reduce_domain in xml file.
+  */
+  class CReduceDomainToScalar
+    : public CObjectTemplate<CReduceDomainToScalar>
+    , public CReduceDomainToScalarAttributes
+    , public CTransformation<CScalar>
+  {
+    public :
+      typedef CObjectTemplate<CReduceDomainToScalar> SuperClass;
+      typedef CReduceDomainToScalarAttributes SuperClassAttribute;
+
+    public :
+      /// Constructeurs ///
+      CReduceDomainToScalar(void);
+      explicit CReduceDomainToScalar(const StdString& id);
+
+      /// Destructeur ///
+      virtual ~CReduceDomainToScalar(void);
+
+      virtual void checkValid(CScalar* scalarDst, CDomain* domainSrc);
+
+      /// Accesseurs statiques ///
+      static StdString GetName(void);
+      static StdString GetDefName(void);
+      static ENodeType GetType(void);
+    private:
+      static bool registerTrans();
+      static CTransformation<CScalar>* create(const StdString& id, xml::CXMLNode* node);
+      static bool _dummyRegistered;
+  }; // class CReduceDomainToScalar
+
+  DECLARE_GROUP(CReduceDomainToScalar);
+} // namespace xios
+
+#endif // __XIOS_CReduceDomainToScalar__
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/node/reduce_scalar_to_scalar.cpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/node/reduce_scalar_to_scalar.cpp	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/node/reduce_scalar_to_scalar.cpp	(revision 1749)
@@ -0,0 +1,43 @@
+#include "reduce_scalar_to_scalar.hpp"
+#include "type.hpp"
+
+namespace xios {
+
+  /// ////////////////////// DÃ©finitions ////////////////////// ///
+
+  CReduceScalarToScalar::CReduceScalarToScalar(void)
+    : CObjectTemplate<CReduceScalarToScalar>(), CReduceScalarToScalarAttributes(), CTransformation<CScalar>()
+  { /* Ne rien faire de plus */ }
+
+  CReduceScalarToScalar::CReduceScalarToScalar(const StdString & id)
+    : CObjectTemplate<CReduceScalarToScalar>(id), CReduceScalarToScalarAttributes(), CTransformation<CScalar>()
+  { /* Ne rien faire de plus */ }
+
+  CReduceScalarToScalar::~CReduceScalarToScalar(void)
+  {}
+
+  CTransformation<CScalar>* CReduceScalarToScalar::create(const StdString& id, xml::CXMLNode* node)
+  {
+    CReduceScalarToScalar* reduceScalar = CReduceScalarToScalarGroup::get("reduce_scalar_to_scalar_definition")->createChild(id);
+    if (node) reduceScalar->parse(*node);
+    return static_cast<CTransformation<CScalar>*>(reduceScalar);
+  }
+
+  bool CReduceScalarToScalar::registerTrans()
+  {
+    return registerTransformation(TRANS_REDUCE_SCALAR_TO_SCALAR, CReduceScalarToScalar::create);
+  }
+
+  bool CReduceScalarToScalar::_dummyRegistered = CReduceScalarToScalar::registerTrans();
+
+  //----------------------------------------------------------------
+
+  StdString CReduceScalarToScalar::GetName(void)    { return StdString("reduce_scalar_to_scalar"); }
+  StdString CReduceScalarToScalar::GetDefName(void) { return StdString("reduce_scalar_to_scalar"); }
+  ENodeType CReduceScalarToScalar::GetType(void)    { return eReduceScalarToScalar; }
+
+  void CReduceScalarToScalar::checkValid(CScalar* scalarDst)
+  {
+  }
+
+}
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/node/reduce_scalar_to_scalar.hpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/node/reduce_scalar_to_scalar.hpp	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/node/reduce_scalar_to_scalar.hpp	(revision 1749)
@@ -0,0 +1,66 @@
+#ifndef __XIOS_CReduceScalarToScalar__
+#define __XIOS_CReduceScalarToScalar__
+
+/// xios headers ///
+#include "xios_spl.hpp"
+#include "attribute_enum.hpp"
+#include "attribute_enum_impl.hpp"
+#include "attribute_array.hpp"
+#include "declare_attribute.hpp"
+#include "object_template.hpp"
+#include "group_factory.hpp"
+#include "declare_group.hpp"
+#include "transformation.hpp"
+
+namespace xios {
+  /// ////////////////////// DÃ©clarations ////////////////////// ///
+  class CReduceScalarToScalarGroup;
+  class CReduceScalarToScalarAttributes;
+  class CReduceScalarToScalar;
+  class CScalar;
+
+  ///--------------------------------------------------------------
+
+  // Declare/Define CFileAttribute
+  BEGIN_DECLARE_ATTRIBUTE_MAP(CReduceScalarToScalar)
+#include "reduce_scalar_to_scalar_attribute.conf"
+  END_DECLARE_ATTRIBUTE_MAP(CReduceScalarToScalar)
+
+  ///--------------------------------------------------------------
+  /*!
+    \class CReduceScalarToScalar
+    This class describes reduce_scalar in xml file.
+  */
+  class CReduceScalarToScalar
+    : public CObjectTemplate<CReduceScalarToScalar>
+    , public CReduceScalarToScalarAttributes
+    , public CTransformation<CScalar>
+  {
+    public :
+      typedef CObjectTemplate<CReduceScalarToScalar> SuperClass;
+      typedef CReduceScalarToScalarAttributes SuperClassAttribute;
+
+    public :
+      /// Constructeurs ///
+      CReduceScalarToScalar(void);
+      explicit CReduceScalarToScalar(const StdString& id);
+
+      /// Destructeur ///
+      virtual ~CReduceScalarToScalar(void);
+
+      virtual void checkValid(CScalar* scalarDst);
+
+      /// Accesseurs statiques ///
+      static StdString GetName(void);
+      static StdString GetDefName(void);
+      static ENodeType GetType(void);
+    private:
+      static bool registerTrans();
+      static CTransformation<CScalar>* create(const StdString& id, xml::CXMLNode* node);
+      static bool _dummyRegistered;
+  }; // class CReduceScalarToScalar
+
+  DECLARE_GROUP(CReduceScalarToScalar);
+} // namespace xios
+
+#endif // __XIOS_CReduceScalarToScalar__
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/node/reorder_domain.cpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/node/reorder_domain.cpp	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/node/reorder_domain.cpp	(revision 1749)
@@ -0,0 +1,43 @@
+#include "reorder_domain.hpp"
+#include "type.hpp"
+
+namespace xios {
+
+  /// ////////////////////// DÃ©finitions ////////////////////// ///
+
+  CReorderDomain::CReorderDomain(void)
+    : CObjectTemplate<CReorderDomain>(), CReorderDomainAttributes(), CTransformation<CDomain>()
+  { /* Ne rien faire de plus */ }
+
+  CReorderDomain::CReorderDomain(const StdString & id)
+    : CObjectTemplate<CReorderDomain>(id), CReorderDomainAttributes(), CTransformation<CDomain>()
+  { /* Ne rien faire de plus */ }
+
+  CReorderDomain::~CReorderDomain(void)
+  {}
+
+  CTransformation<CDomain>* CReorderDomain::create(const StdString& id, xml::CXMLNode* node)
+  {
+    CReorderDomain* reorderDomain = CReorderDomainGroup::get("reorder_domain_definition")->createChild(id);
+    if (node) reorderDomain->parse(*node);
+    return static_cast<CTransformation<CDomain>*>(reorderDomain);
+  }
+
+  bool CReorderDomain::_dummyRegistered = CReorderDomain::registerTrans();
+  bool CReorderDomain::registerTrans()
+  {
+    registerTransformation(TRANS_REORDER_DOMAIN, CReorderDomain::create);
+  }
+
+  //----------------------------------------------------------------
+
+  StdString CReorderDomain::GetName(void)    { return StdString("reorder_domain"); }
+  StdString CReorderDomain::GetDefName(void) { return StdString("reorder_domain"); }
+  ENodeType CReorderDomain::GetType(void)    { return eReorderDomain; }
+
+  void CReorderDomain::checkValid(CDomain* domainSrc)
+  {
+    
+  }
+
+}
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/node/reorder_domain.hpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/node/reorder_domain.hpp	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/node/reorder_domain.hpp	(revision 1749)
@@ -0,0 +1,67 @@
+#ifndef __XIOS_CReorderDomain__
+#define __XIOS_CReorderDomain__
+
+/// xios headers ///
+#include "xios_spl.hpp"
+#include "attribute_enum.hpp"
+#include "attribute_enum_impl.hpp"
+#include "attribute_array.hpp"
+#include "declare_attribute.hpp"
+#include "object_template.hpp"
+#include "group_factory.hpp"
+#include "declare_group.hpp"
+#include "transformation.hpp"
+#include "domain.hpp"
+
+namespace xios {
+  /// ////////////////////// DÃ©clarations ////////////////////// ///
+  class CReorderDomainGroup;
+  class CReorderDomainAttributes;
+  class CReorderDomain;
+  class CDomain;
+
+  ///--------------------------------------------------------------
+
+  // Declare/Define CReorderDomainAttribute
+  BEGIN_DECLARE_ATTRIBUTE_MAP(CReorderDomain)
+#include "reorder_domain_attribute.conf"
+  END_DECLARE_ATTRIBUTE_MAP(CReorderDomain)
+
+  ///--------------------------------------------------------------
+  /*!
+    \class CReorderDomain
+    This class describes reorder_domain in xml file.
+  */
+  class CReorderDomain
+    : public CObjectTemplate<CReorderDomain>
+    , public CReorderDomainAttributes
+    , public CTransformation<CDomain>
+  {
+    public :
+      typedef CObjectTemplate<CReorderDomain> SuperClass;
+      typedef CReorderDomainAttributes SuperClassAttribute;
+
+    public :
+      /// Constructeurs ///
+      CReorderDomain(void);
+      explicit CReorderDomain(const StdString& id);
+
+      /// Destructeur ///
+      virtual ~CReorderDomain(void);
+
+      virtual void checkValid(CDomain* domainSrc);
+
+      /// Accesseurs statiques ///
+      static StdString GetName(void);
+      static StdString GetDefName(void);
+      static ENodeType GetType(void);
+    private:
+      static bool registerTrans();
+      static CTransformation<CDomain>* create(const StdString& id, xml::CXMLNode* node);
+      static bool _dummyRegistered;
+  }; // class CReorderDomain
+
+  DECLARE_GROUP(CReorderDomain);
+} // namespace xios
+
+#endif // __XIOS_CReorderDomain__
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/node/scalar.cpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/node/scalar.cpp	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/node/scalar.cpp	(revision 1749)
@@ -0,0 +1,188 @@
+#include "scalar.hpp"
+
+#include "attribute_template.hpp"
+#include "object_template.hpp"
+#include "group_template.hpp"
+#include "object_factory.hpp"
+#include "xios_spl.hpp"
+#include "type.hpp"
+
+namespace xios {
+
+   /// ////////////////////// DÃ©finitions ////////////////////// ///
+
+   CScalar::CScalar(void)
+      : CObjectTemplate<CScalar>()
+      , CScalarAttributes()
+      , relFiles()
+   { /* Ne rien faire de plus */ }
+
+   CScalar::CScalar(const StdString & id)
+      : CObjectTemplate<CScalar>(id)
+      , CScalarAttributes()
+      , relFiles()
+   { /* Ne rien faire de plus */ }
+
+   CScalar::~CScalar(void)
+   { /* Ne rien faire de plus */ }
+
+   std::map<StdString, ETranformationType> CScalar::transformationMapList_ = std::map<StdString, ETranformationType>();
+   bool CScalar::dummyTransformationMapList_ = CScalar::initializeTransformationMap(CScalar::transformationMapList_);
+   bool CScalar::initializeTransformationMap(std::map<StdString, ETranformationType>& m)
+   {
+     m["reduce_axis"]   = TRANS_REDUCE_AXIS_TO_SCALAR;
+     m["extract_axis"]  = TRANS_EXTRACT_AXIS_TO_SCALAR;
+     m["reduce_domain"] = TRANS_REDUCE_DOMAIN_TO_SCALAR;
+     m["reduce_scalar"] = TRANS_REDUCE_SCALAR_TO_SCALAR;
+   }
+
+   StdString CScalar::GetName(void)   { return (StdString("scalar")); }
+   StdString CScalar::GetDefName(void){ return (CScalar::GetName()); }
+   ENodeType CScalar::GetType(void)   { return (eScalar); }
+
+   CScalar* CScalar::createScalar()
+   {
+     CScalar* scalar = CScalarGroup::get("scalar_definition")->createChild();
+     return scalar;
+   }
+
+   bool CScalar::IsWritten(const StdString & filename) const
+   {
+      return (this->relFiles.find(filename) != this->relFiles.end());
+   }
+
+   void CScalar::addRelFile(const StdString& filename)
+   {
+      this->relFiles.insert(filename);
+   }
+
+   void CScalar::checkAttributes(void)
+   {
+   }
+
+  void CScalar::checkAttributesOnClient()
+  {
+
+  }
+
+  /*!
+    Compare two scalar objects. 
+    They are equal if only if they have identical attributes as well as their values.
+    Moreover, they must have the same transformations.
+  \param [in] scalar Compared scalar
+  \return result of the comparison
+  */
+  bool CScalar::isEqual(CScalar* obj)
+  {
+    vector<StdString> excludedAttr;
+    excludedAttr.push_back("scalar_ref");
+    bool objEqual = SuperClass::isEqual(obj, excludedAttr);
+    if (!objEqual) return objEqual;
+
+    TransMapTypes thisTrans = this->getAllTransformations();
+    TransMapTypes objTrans  = obj->getAllTransformations();
+
+    TransMapTypes::const_iterator it, itb, ite;
+    std::vector<ETranformationType> thisTransType, objTransType;
+    for (it = thisTrans.begin(); it != thisTrans.end(); ++it)
+      thisTransType.push_back(it->first);
+    for (it = objTrans.begin(); it != objTrans.end(); ++it)
+      objTransType.push_back(it->first);
+
+    if (thisTransType.size() != objTransType.size()) return false;
+    for (int idx = 0; idx < thisTransType.size(); ++idx)
+      objEqual &= (thisTransType[idx] == objTransType[idx]);
+
+    return objEqual;
+  }
+
+  CTransformation<CScalar>* CScalar::addTransformation(ETranformationType transType, const StdString& id)
+  {
+    transformationMap_.push_back(std::make_pair(transType, CTransformation<CScalar>::createTransformation(transType,id)));
+    return transformationMap_.back().second;
+  }
+
+  bool CScalar::hasTransformation()
+  {
+    return (!transformationMap_.empty());
+  }
+
+  void CScalar::setTransformations(const TransMapTypes& scalarTrans)
+  {
+    transformationMap_ = scalarTrans;
+  }
+
+  CScalar::TransMapTypes CScalar::getAllTransformations(void)
+  {
+    return transformationMap_;
+  }
+
+  void CScalar::duplicateTransformation(CScalar* src)
+  {
+    if (src->hasTransformation())
+    {
+      this->setTransformations(src->getAllTransformations());
+    }
+  }
+
+  /*!
+   * Go through the hierarchy to find the scalar from which the transformations must be inherited
+   */
+  void CScalar::solveInheritanceTransformation()
+  {
+    if (hasTransformation() || !hasDirectScalarReference())
+      return;
+
+    CScalar* scalar = this;
+    std::vector<CScalar*> refScalar;
+    while (!scalar->hasTransformation() && scalar->hasDirectScalarReference())
+    {
+      refScalar.push_back(scalar);
+      scalar = scalar->getDirectScalarReference();
+    }
+
+    if (scalar->hasTransformation())
+      for (size_t i = 0; i < refScalar.size(); ++i)
+        refScalar[i]->setTransformations(scalar->getAllTransformations());
+  }
+
+  /*!
+    Parse children nodes of a scalar in xml file.
+    \param node child node to process
+  */
+  void CScalar::parse(xml::CXMLNode & node)
+  {
+    SuperClass::parse(node);
+
+    if (node.goToChildElement())
+    {
+      StdString nodeElementName;
+      do
+      {
+        StdString nodeId("");
+        if (node.getAttributes().end() != node.getAttributes().find("id"))
+        { nodeId = node.getAttributes()["id"]; }
+
+        nodeElementName = node.getElementName();
+        std::map<StdString, ETranformationType>::const_iterator ite = transformationMapList_.end(), it;
+        it = transformationMapList_.find(nodeElementName);
+        if (ite != it)
+        {
+          transformationMap_.push_back(std::make_pair(it->second, CTransformation<CScalar>::createTransformation(it->second,
+                                                                                                                 nodeId,
+                                                                                                                 &node)));
+        }
+        else
+        {
+          ERROR("void CScalar::parse(xml::CXMLNode & node)",
+                << "The transformation " << nodeElementName << " has not been supported yet.");
+        }
+      } while (node.goToNextElement()) ;
+      node.goToParentElement();
+    }
+  }
+
+  // Definition of some macros
+  DEFINE_REF_FUNC(Scalar,scalar)
+
+} // namespace xios
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/node/scalar.hpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/node/scalar.hpp	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/node/scalar.hpp	(revision 1749)
@@ -0,0 +1,102 @@
+#ifndef __XIOS_CScalar__
+#define __XIOS_CScalar__
+
+/// XIOS headers ///
+#include "xios_spl.hpp"
+#include "declare_group.hpp"
+#include "declare_ref_func.hpp"
+#include "group_template.hpp"
+#include "array_new.hpp"
+#include "attribute_enum.hpp"
+#include "attribute_enum_impl.hpp"
+#include "attribute_array.hpp"
+#include "transformation.hpp"
+#include "transformation_enum.hpp"
+
+namespace xios
+{
+      /// ////////////////////// DÃ©clarations ////////////////////// ///
+
+      class CScalarGroup;
+      class CScalarAttributes;
+      class CScalar;
+      ///--------------------------------------------------------------
+
+      // Declare/Define CVarAttribute
+      BEGIN_DECLARE_ATTRIBUTE_MAP(CScalar)
+#include "scalar_attribute.conf"
+      END_DECLARE_ATTRIBUTE_MAP(CScalar)
+
+      ///--------------------------------------------------------------
+
+      class CScalar
+         : public CObjectTemplate<CScalar>
+         , public CScalarAttributes
+      {
+            /// typedef ///
+            typedef CObjectTemplate<CScalar>   SuperClass;
+            typedef CScalarAttributes SuperClassAttribute;
+
+            friend class CScalarGroup;
+
+         public :
+
+            typedef CScalarAttributes RelAttributes;
+            typedef CScalarGroup      RelGroup;
+            typedef CTransformation<CScalar>::TransformationMapTypes TransMapTypes;
+
+            /// Constructeurs ///
+            CScalar(void);
+            explicit CScalar(const StdString & id);
+            CScalar(const CScalar & var);       // Not implemented yet.
+            CScalar(const CScalar * const var); // Not implemented yet.
+
+            /// Destructeur ///
+            virtual ~CScalar(void);
+
+         public :
+            /// Accesseurs statiques ///
+            static StdString GetName(void);
+            static StdString GetDefName(void);
+            static ENodeType GetType(void);
+
+         public:
+            static CScalar* createScalar();
+
+         public:
+            void checkAttributes(void);
+            void addRelFile(const StdString& filename);
+            bool IsWritten(const StdString& filename) const;
+            void checkAttributesOnClient();
+            virtual void parse(xml::CXMLNode & node);
+
+         public:
+           bool hasTransformation();
+           void solveInheritanceTransformation();
+           TransMapTypes getAllTransformations();
+           void duplicateTransformation(CScalar*);
+           CTransformation<CScalar>* addTransformation(ETranformationType transType, const StdString& id="");
+           bool isEqual(CScalar* scalar);
+
+         private:
+           std::set<StdString> relFiles;
+           TransMapTypes transformationMap_;
+
+            void setTransformations(const TransMapTypes&);
+
+       private:
+           static bool initializeTransformationMap(std::map<StdString, ETranformationType>& m);
+           static std::map<StdString, ETranformationType> transformationMapList_;
+           static bool dummyTransformationMapList_;
+
+
+            DECLARE_REF_FUNC(Scalar,scalar)
+
+      }; // class CVar
+      ///--------------------------------------------------------------
+
+      // Declare/Define CScalarGroup and CScalarDefinition
+      DECLARE_GROUP(CScalar);
+} // namespace xios
+
+#endif // __XIOS_CScalar__
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/node/temporal_splitting.cpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/node/temporal_splitting.cpp	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/node/temporal_splitting.cpp	(revision 1749)
@@ -0,0 +1,47 @@
+#include "temporal_splitting.hpp"
+#include "type.hpp"
+#include "axis.hpp"
+#include "domain.hpp"
+#include "scalar.hpp"
+
+namespace xios {
+
+  /// ////////////////////// DÃ©finitions ////////////////////// ///
+
+  CTemporalSplitting::CTemporalSplitting(void)
+    : CObjectTemplate<CTemporalSplitting>(), CTemporalSplittingAttributes(), CTransformation<CAxis>()
+  { /* Ne rien faire de plus */ }
+
+  CTemporalSplitting::CTemporalSplitting(const StdString & id)
+    : CObjectTemplate<CTemporalSplitting>(id), CTemporalSplittingAttributes(), CTransformation<CAxis>()
+  { /* Ne rien faire de plus */ }
+
+  CTemporalSplitting::~CTemporalSplitting(void)
+  {}
+
+  CTransformation<CAxis>* CTemporalSplitting::create(const StdString& id, xml::CXMLNode* node)
+  {
+    CTemporalSplitting* temporalSplitting = CTemporalSplittingGroup::get("temporal_splitting_definition")->createChild(id);
+    if (node) temporalSplitting->parse(*node);
+    return static_cast<CTransformation<CAxis>*>(temporalSplitting);
+  }
+
+  bool CTemporalSplitting::registerTrans()
+  {
+    return registerTransformation(TRANS_TEMPORAL_SPLITTING, CTemporalSplitting::create);
+  }
+
+  bool CTemporalSplitting::_dummyRegistered = CTemporalSplitting::registerTrans();
+
+  //----------------------------------------------------------------
+
+  StdString CTemporalSplitting::GetName(void)    { return StdString("temporal_splitting"); }
+  StdString CTemporalSplitting::GetDefName(void) { return StdString("temporal_splitting"); }
+  ENodeType CTemporalSplitting::GetType(void)    { return eTemporalSplitting; }
+
+  void CTemporalSplitting::checkValid(CAxis* axisDst, CScalar* scalarSrc)
+  {
+
+  }
+
+}
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/node/temporal_splitting.hpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/node/temporal_splitting.hpp	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/node/temporal_splitting.hpp	(revision 1749)
@@ -0,0 +1,66 @@
+#ifndef __XIOS_CTemporalSplitting__
+#define __XIOS_CTemporalSplitting__
+
+/// xios headers ///
+#include "xios_spl.hpp"
+#include "attribute_enum.hpp"
+#include "attribute_enum_impl.hpp"
+#include "attribute_array.hpp"
+#include "declare_attribute.hpp"
+#include "object_template.hpp"
+#include "group_factory.hpp"
+#include "declare_group.hpp"
+#include "transformation.hpp"
+
+namespace xios {
+  /// ////////////////////// DÃ©clarations ////////////////////// ///
+  class CTemporalSplittingGroup;
+  class CTemporalSplittingAttributes;
+  class CTemporalSplitting;
+  class CAxis;
+  class CScalar;
+  ///--------------------------------------------------------------
+
+  // Declare/Define CFileAttribute
+  BEGIN_DECLARE_ATTRIBUTE_MAP(CTemporalSplitting)
+#include "temporal_splitting.conf"
+  END_DECLARE_ATTRIBUTE_MAP(CTemporalSplitting)
+
+  ///--------------------------------------------------------------
+  /*!
+    \class CExtractDomainToAxis
+    This class describes reduce_domain in xml file.
+  */
+  class CTemporalSplitting
+    : public CObjectTemplate<CTemporalSplitting>
+    , public CTemporalSplittingAttributes
+    , public CTransformation<CAxis>
+  {
+    public :
+      typedef CObjectTemplate<CTemporalSplitting> SuperClass;
+      typedef CTemporalSplittingAttributes SuperClassAttribute;
+
+    public :
+      /// Constructeurs ///
+      CTemporalSplitting(void);
+      explicit CTemporalSplitting(const StdString& id);
+
+      /// Destructeur ///
+      virtual ~CTemporalSplitting(void);
+
+      virtual void checkValid(CAxis* axisDst, CScalar* scalarSrc);
+
+      /// Accesseurs statiques ///
+      static StdString GetName(void);
+      static StdString GetDefName(void);
+      static ENodeType GetType(void);
+    private:
+      static bool registerTrans();
+      static CTransformation<CAxis>* create(const StdString& id, xml::CXMLNode* node);
+      static bool _dummyRegistered;
+  }; // class CTemporalSplitting
+
+  DECLARE_GROUP(CTemporalSplitting);
+} // namespace xios
+
+#endif // __XIOS_CTemporalSplitting__
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/node/transformation.hpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/node/transformation.hpp	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/node/transformation.hpp	(revision 1749)
@@ -0,0 +1,80 @@
+#ifndef __XIOS_CTransformation__
+#define __XIOS_CTransformation__
+
+#include "xios_spl.hpp"
+#include "xml_node.hpp"
+#include "transformation_enum.hpp"
+
+namespace xios {
+
+  ///--------------------------------------------------------------
+  /*!
+    \class CTransformation
+    This class describes inverse_axis in xml file.
+  */
+  template<typename T>
+  class CTransformation
+  {
+  public:
+    typedef typename std::list<std::pair<ETranformationType, CTransformation<T>* > > TransformationMapTypes;
+    typedef TransformationMapTypes TransMapTypes;
+
+    public :
+      /// Constructeurs ///
+      CTransformation(void) {}
+      virtual void checkValid(T* dest) {}
+
+      std::vector<StdString> checkAuxInputs() { return checkAuxInputs_(); }
+      static CTransformation<T>* createTransformation(ETranformationType transType, const StdString& id, xml::CXMLNode* node=0);
+
+      /// Destructeur ///
+      virtual ~CTransformation(void) {}
+
+    protected:
+      typedef CTransformation<T>* (*CreateTransformationCallBack)(const StdString&, xml::CXMLNode*);
+      typedef std::map<ETranformationType, CreateTransformationCallBack> CallBackMap;
+      static CallBackMap* transformationCreationCallBacks_;
+
+      static bool registerTransformation(ETranformationType transType, CreateTransformationCallBack createFn);
+      static bool unregisterTransformation(ETranformationType transType);
+
+    protected:
+      virtual std::vector<StdString> checkAuxInputs_() { return std::vector<StdString>(); }
+  }; // class CTransformation
+
+  template<typename T>
+  typename CTransformation<T>::CallBackMap* CTransformation<T>::transformationCreationCallBacks_ = 0; //CTransformation<T>::CallBackMap();
+
+  template<typename T>
+  CTransformation<T>* CTransformation<T>::createTransformation(ETranformationType transType, const StdString& id, xml::CXMLNode* node)
+  {
+    int transTypeInt = transType;
+    typename CallBackMap::const_iterator it = (*transformationCreationCallBacks_).find(transType);
+    if ((*transformationCreationCallBacks_).end() == it)
+    {
+       ERROR("CTransformation<T>::createTransformation(ETranformationType transType)",
+             << "Transformation type " << transType
+             << "doesn't exist. Please define.");
+    }
+    return (it->second)(id,node);
+  }
+
+  template<typename T>
+  bool CTransformation<T>::registerTransformation(ETranformationType transType, CreateTransformationCallBack createFn)
+  {
+    if (0 == transformationCreationCallBacks_)
+      transformationCreationCallBacks_ = new CallBackMap();
+
+    return (*transformationCreationCallBacks_).insert(make_pair(transType, createFn)).second;
+  }
+
+  template<typename T>
+  bool CTransformation<T>::unregisterTransformation(ETranformationType transType)
+  {
+    int transTypeInt = transType;
+    return (1 == (*transformationCreationCallBacks_).erase(transType));
+  }
+
+} // namespace xios
+
+#endif // __XIOS_CTransformation__
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/node/transformation_enum.hpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/node/transformation_enum.hpp	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/node/transformation_enum.hpp	(revision 1749)
@@ -0,0 +1,33 @@
+#ifndef __XIOS_TRANSFORMATION_ENUM__
+#define __XIOS_TRANSFORMATION_ENUM__
+
+namespace xios
+{
+      /// ////////////////////// DÃ©finitions ////////////////////// ///
+      typedef enum transformation_type
+      {
+        TRANS_ZOOM_AXIS = 0,
+        TRANS_INVERSE_AXIS = 1,
+        TRANS_INTERPOLATE_AXIS = 2,
+        TRANS_ZOOM_DOMAIN = 3,
+        TRANS_INTERPOLATE_DOMAIN = 4,
+        TRANS_GENERATE_RECTILINEAR_DOMAIN = 5,
+        TRANS_REDUCE_AXIS_TO_SCALAR = 6,
+        TRANS_REDUCE_DOMAIN_TO_AXIS = 7,
+        TRANS_EXTRACT_DOMAIN_TO_AXIS = 8,
+        TRANS_COMPUTE_CONNECTIVITY_DOMAIN = 9,
+        TRANS_EXPAND_DOMAIN = 10,
+        TRANS_EXTRACT_AXIS_TO_SCALAR = 11,
+        TRANS_REDUCE_DOMAIN_TO_SCALAR = 12,
+        TRANS_TEMPORAL_SPLITTING = 13,
+        TRANS_REDUCE_AXIS_TO_AXIS = 14,
+        TRANS_DUPLICATE_SCALAR_TO_AXIS = 15,
+        TRANS_REDUCE_SCALAR_TO_SCALAR = 16,
+        TRANS_REORDER_DOMAIN = 17,
+        TRANS_EXTRACT_DOMAIN = 18,
+        TRANS_EXTRACT_AXIS = 19
+      } ETranformationType;
+
+} // namespace xios
+
+#endif // __XIOS_TRANSFORMATION_ENUM__
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/node/variable.cpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/node/variable.cpp	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/node/variable.cpp	(revision 1749)
@@ -0,0 +1,237 @@
+#include "variable.hpp"
+
+#include "attribute_template.hpp"
+#include "object_template.hpp"
+#include "group_template.hpp"
+#include "object_factory.hpp"
+#include "xios_spl.hpp"
+#include "type.hpp"
+#include "context.hpp"
+#include "context_client.hpp"
+#include <boost/algorithm/string.hpp>
+
+namespace xios {
+
+   /// ////////////////////// DÃ©finitions ////////////////////// ///
+
+   CVariable::CVariable(void)
+      : CObjectTemplate<CVariable>()
+      , CVariableAttributes()
+      , content()
+   { /* Ne rien faire de plus */ }
+
+   CVariable::CVariable(const StdString & id)
+      : CObjectTemplate<CVariable>(id)
+      , CVariableAttributes()
+      , content()
+   { /* Ne rien faire de plus */ }
+
+   CVariable::~CVariable(void)
+   { /* Ne rien faire de plus */ }
+
+   StdString CVariable::GetName(void)   { return (StdString("variable")); }
+   StdString CVariable::GetDefName(void){ return (CVariable::GetName()); }
+   ENodeType CVariable::GetType(void)   { return (eVariable); }
+
+   void CVariable::parse(xml::CXMLNode & node)
+   {
+      SuperClass::parse(node);
+      StdString id = (this->hasId()) ? this->getId() : StdString("undefined");
+      if (!node.getContent(this->content))
+      {
+        xml::THashAttributes attributes = node.getAttributes();
+        StdString variableName = attributes["name"];
+
+        node.goToParentElement();
+        StdString parentName = node.getElementName();
+        attributes = node.getAttributes();
+        error << "The variable id = " << id << " and name = " << variableName << " does not have any content. Please define it!" << std::endl
+              << "This variable is inside another element whose attributes are :" << std::endl;
+
+        for (xml::THashAttributes::iterator it = attributes.begin(); it != attributes.end(); ++it)
+        {
+           error << it->first << "=\"" << it->second.c_str() << "\" ";
+        }
+        error << std::endl; 
+
+         ERROR("CVariable::parse(xml::CXMLNode & node)",
+               << "[ variable id = " << id
+               << " ] variable is not defined !. It does not have any content. See error log for more details.");
+      }
+      content = boost::trim_copy(content) ;
+   }
+
+   const StdString& CVariable::getVariableOutputName(void) const
+   {
+     return name.isEmpty() ? getId() : name;
+   }
+
+   const StdString & CVariable::getContent (void) const
+   {
+      return (this->content);
+   }
+
+   void CVariable::setContent(const StdString& contentStr)
+   {
+     this->content = contentStr;
+   }
+
+   StdString CVariable::toString(void) const
+   {
+      StdOStringStream oss;
+
+      oss << "<" << CVariable::GetName() << " ";
+      if (this->hasId())
+         oss << " id=\"" << this->getId() << "\" ";
+      oss << SuperClassAttribute::toString() << ">" << std::endl
+          << this->content /*<< std::endl*/;
+      oss << "</" << CVariable::GetName() << " >";
+      return (oss.str());
+   }
+
+   /*
+   *\brief Sending value of a variable with its id from client to server
+   *
+   */
+   void CVariable::sendValue()
+   {
+     CContext* context=CContext::getCurrent() ;
+
+     if (context->hasClient)
+     {
+       // Use correct context client to send message
+       // int nbSrvPools = (context->hasServer) ? context->clientPrimServer.size() : 1;
+      int nbSrvPools = (context->hasServer) ? (context->hasClient ? context->clientPrimServer.size() : 0) : 1;
+       for (int i = 0; i < nbSrvPools; ++i)
+       {
+//       CContextClient* contextClientTmp = (0 != context->clientPrimServer) ? context->clientPrimServer
+         CContextClient* contextClientTmp = (context->hasServer) ? context->clientPrimServer[i]
+                                                                             : context->client;
+
+         CEventClient event(this->getType(),EVENT_ID_VARIABLE_VALUE) ;
+         if (contextClientTmp->isServerLeader())
+         {
+           CMessage msg ;
+           msg<<this->getId() ;
+           msg<<content ;
+           const std::list<int>& ranks = contextClientTmp->getRanksServerLeader();
+           for (std::list<int>::const_iterator itRank = ranks.begin(), itRankEnd = ranks.end(); itRank != itRankEnd; ++itRank)
+             event.push(*itRank,1,msg);
+           contextClientTmp->sendEvent(event) ;
+         }
+         else contextClientTmp->sendEvent(event) ;
+      }
+     }
+   }
+
+   void CVariable::sendValue(CContextClient* client, bool clientPrim /*= false*/)
+   {
+     CEventClient event(this->getType(),EVENT_ID_VARIABLE_VALUE) ;
+     if (client->isServerLeader())
+     {
+       CMessage msg ;
+       msg<<this->getId() ;
+       msg<<content ;
+       const std::list<int>& ranks = client->getRanksServerLeader();
+       for (std::list<int>::const_iterator itRank = ranks.begin(), itRankEnd = ranks.end(); itRank != itRankEnd; ++itRank)
+         event.push(*itRank,1,msg);
+       client->sendEvent(event) ;
+     }
+     else client->sendEvent(event) ;
+   }
+
+   /*
+   *\brief Receive value of a variable with its id from client to server
+   *
+   */
+   void CVariable::recvValue(CEventServer& event)
+   {
+      CBufferIn* buffer=event.subEvents.begin()->buffer;
+      string id;
+      *buffer>>id ;
+      get(id)->recvValue(*buffer);
+   }
+
+   /*
+   *\brief Receive value of a variable with its id from client to server
+   *
+   */
+   void CVariable::recvValue(CBufferIn& buffer)
+   {
+      string str ;
+      buffer>>str;
+      setContent(str);
+   }
+
+   bool CVariable::dispatchEvent(CEventServer& event)
+   {
+    if (SuperClass::dispatchEvent(event)) return true ;
+    else
+    {
+      switch(event.type)
+      {
+        case EVENT_ID_VARIABLE_VALUE :
+          recvValue(event) ;
+          return true ;
+          break ;
+
+        default :
+          ERROR("bool CVariable::dispatchEvent(CEventServer& event)",<<"Unknown Event") ;
+          return false ;
+      }
+    }
+   }
+
+/*
+   void CVariable::toBinary(StdOStream & os) const
+   {
+     const StdString & content = this->content;
+     const StdSize size        =  content.size();
+     SuperClass::toBinary(os);
+
+     os.write (reinterpret_cast<const char*>(&size), sizeof(StdSize));
+     os.write (content.data(), size * sizeof(char));
+   }
+
+   void CVariable::fromBinary(StdIStream & is)
+   {
+      SuperClass::fromBinary(is);
+      StdSize size  = 0;
+      is.read (reinterpret_cast<char*>(&size), sizeof(StdSize));
+      this->content.assign(size, ' ');
+      is.read (const_cast<char *>(this->content.data()), size * sizeof(char));
+   }
+*/
+   void CVariableGroup::parse(xml::CXMLNode & node, bool withAttr)
+   {
+      CVariableGroup* group_ptr = (this->hasId())
+         ? CVariableGroup::get(this->getId()) : CVariableGroup::get(this);
+
+      StdString content;
+      if (this->getId().compare(CVariableGroup::GetDefName()) != 0 && node.getContent(content))
+      {
+        StdSize beginid = 0, endid = 0, begindata = 0, enddata = 0;
+        StdString subdata, subid;
+
+        while ((beginid = content.find_first_not_of ( " \r\n\t;", enddata)) != StdString::npos)
+        {
+           endid   = content.find_first_of ( " \r\n\t=", beginid );
+           subid   = content.substr ( beginid, endid-beginid);
+           subid   = boost::to_lower_copy(boost::trim_copy(subid)) ;
+
+           begindata = content.find_first_of ( "=", endid ) + 1;
+           enddata   = content.find_first_of ( ";", begindata );
+           subdata   = content.substr ( begindata, enddata-begindata);
+           subdata   = boost::trim_copy(subdata) ;
+           group_ptr->createChild(subid)->content = subdata ;
+        }
+      }
+      else
+      {
+         SuperClass::parse(node, withAttr);
+      }
+      //SuperClass::parse(node, withAttr);
+
+   }
+
+} // namespace xios
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/node/variable.hpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/node/variable.hpp	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/node/variable.hpp	(revision 1749)
@@ -0,0 +1,147 @@
+#ifndef __XIOS_CVariable__
+#define __XIOS_CVariable__
+
+/// XIOS headers ///
+#include "xios_spl.hpp"
+#include "declare_group.hpp"
+#include "group_template.hpp"
+#include "array_new.hpp"
+#include "attribute_enum.hpp"
+#include "attribute_enum_impl.hpp"
+#include "declare_attribute.hpp"
+
+namespace xios
+{
+      /// ////////////////////// DÃ©clarations ////////////////////// ///
+
+      class CVariableGroup;
+      class CVariableAttributes;
+      class CVariable;
+      class CContext;
+      ///--------------------------------------------------------------
+
+      // Declare/Define CVarAttribute
+      BEGIN_DECLARE_ATTRIBUTE_MAP(CVariable)
+#include "var_attribute.conf"
+      END_DECLARE_ATTRIBUTE_MAP(CVariable)
+
+      ///--------------------------------------------------------------
+
+      class CVariable
+         : public CObjectTemplate<CVariable>
+         , public CVariableAttributes
+      {
+                     /// typedef ///
+            typedef CObjectTemplate<CVariable>   SuperClass;
+            typedef CVariableAttributes SuperClassAttribute;
+            
+         public :
+            enum EEventId
+            {
+             EVENT_ID_VARIABLE_VALUE
+            };
+
+            friend class CVariableGroup;
+
+         public :
+
+            typedef CVariableAttributes RelAttributes;
+            typedef CVariableGroup      RelGroup;
+
+            /// Constructeurs ///
+            CVariable(void);
+            explicit CVariable(const StdString & id);
+            CVariable(const CVariable & var);       // Not implemented yet.
+            CVariable(const CVariable * const var); // Not implemented yet.
+
+            /// Destructeur ///
+            virtual ~CVariable(void);
+
+         public :
+            /// Autres ///
+            virtual void parse(xml::CXMLNode & node);
+            virtual StdString toString(void) const;
+
+            /// Accesseur ///
+            const StdString& getVariableOutputName(void) const;
+            const StdString & getContent (void) const;
+
+            void setContent(const StdString& content);
+
+
+            template <typename T> inline T getData(void) const;
+            template <typename T> inline void setData(T data);
+
+            template <typename T, StdSize N>
+            inline void getData(CArray<T, N>& _data_array) const;
+
+            static bool dispatchEvent(CEventServer& event) ;
+
+            //! Sending a request to set up variable data
+            void sendValue();
+            void sendValue(CContextClient* client, bool clientPrim = false);
+
+            static void recvValue(CEventServer& event) ;
+            void recvValue(CBufferIn& buffer) ;
+
+         public :
+
+            /// Accesseurs statiques ///
+            static StdString GetName(void);
+            static StdString GetDefName(void);
+            static ENodeType GetType(void);
+
+         private :
+
+            StdString content;
+
+      }; // class CVar
+
+      template <typename T>
+      inline T CVariable::getData(void) const
+      {
+         T retval ;
+         std::stringstream sstr(std::stringstream::in | std::stringstream::out);
+         sstr<<content ;
+         sstr>>retval ;
+         if (sstr.fail()) ERROR("CVariable::getdata()",
+               << "Cannot convert string <" << content << "> into type required" );
+         return retval ;
+      }
+
+      template<>
+      inline bool CVariable::getData(void) const
+      {
+         if (content.compare("true")==0 || content.compare(".true.")==0 || content.compare(".TRUE.")==0) return true ;
+         else if (content.compare("false")==0 || content.compare(".false.")==0 || content.compare(".FALSE.")==0) return false ;
+         else ERROR("CVariable::getdata()",
+               << "Cannot convert string <" << content << "> into type required" );
+         return false ;
+      }
+
+      template<>
+      inline std::string CVariable::getData(void) const
+      { return content; }
+
+      template<>
+      inline void CVariable::setData(bool data)
+      {
+        if (true == data) content.assign("true");
+        else content.assign("false");
+      }
+
+      template <typename T>
+      inline void CVariable::setData(T data)
+      {
+        std::stringstream sstr;
+        sstr<<data;
+        content = sstr.str();
+      }
+
+      ///--------------------------------------------------------------
+
+      // Declare/Define CVarGroup and CVarDefinition
+      DECLARE_GROUP_PARSE_REDEF(CVariable);
+} // namespace xios
+
+#endif // __XIOS_CVariable__
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/node/zoom_axis.cpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/node/zoom_axis.cpp	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/node/zoom_axis.cpp	(revision 1749)
@@ -0,0 +1,79 @@
+#include "zoom_axis.hpp"
+#include "type.hpp"
+
+namespace xios {
+
+  /// ////////////////////// DÃ©finitions ////////////////////// ///
+
+  CZoomAxis::CZoomAxis(void)
+    : CObjectTemplate<CZoomAxis>(), CZoomAxisAttributes(), CTransformation<CAxis>()
+  { /* Ne rien faire de plus */ }
+
+  CZoomAxis::CZoomAxis(const StdString & id)
+    : CObjectTemplate<CZoomAxis>(id), CZoomAxisAttributes(), CTransformation<CAxis>()
+  { /* Ne rien faire de plus */ }
+
+  CZoomAxis::~CZoomAxis(void)
+  {}
+
+  CTransformation<CAxis>* CZoomAxis::create(const StdString& id, xml::CXMLNode* node)
+  {
+    CZoomAxis* zoomAxis = CZoomAxisGroup::get("zoom_axis_definition")->createChild(id);
+    if (node) zoomAxis->parse(*node);
+    return static_cast<CTransformation<CAxis>*>(zoomAxis);
+  }
+
+  bool CZoomAxis::registerTrans()
+  {
+    return registerTransformation(TRANS_ZOOM_AXIS, CZoomAxis::create);
+  }
+
+  bool CZoomAxis::_dummyRegistered = CZoomAxis::registerTrans();
+
+  //----------------------------------------------------------------
+
+  StdString CZoomAxis::GetName(void)    { return StdString("zoom_axis"); }
+  StdString CZoomAxis::GetDefName(void) { return StdString("zoom_axis"); }
+  ENodeType CZoomAxis::GetType(void)    { return eZoomAxis; }
+
+  void CZoomAxis::checkValid(CAxis* axisDest)
+  {
+    int axisIBegin, axisNi, axisGlobalSize;
+    int begin, end, n;
+
+    axisIBegin = axisDest->begin.getValue();
+    axisNi     = axisDest->n.getValue();
+    axisGlobalSize   = axisDest->n_glo.getValue();
+
+    bool zoomByIndex = !this->index.isEmpty() && (0 != this->index.numElements());
+
+    if (zoomByIndex)
+    {
+      begin = min(this->index);
+      end   = max(this->index);
+      n     = end - begin + 1;
+    }
+    else
+    {
+      begin = (this->begin.isEmpty()) ?  0 : this->begin.getValue();
+      n     = (this->n.isEmpty()) ?  axisGlobalSize : this->n.getValue();
+      end   = begin+n-1;
+    }
+
+    if (begin < 0 || begin > axisGlobalSize - 1 || end < 0 || end > axisGlobalSize - 1
+        || n < 1 || n > axisGlobalSize || begin > end)
+      ERROR("CZoomAxis::checkValid(CAxis* axisDest)",
+            << "One or more attributes among 'begin' (" << begin << "), 'end' (" << end << "), 'n' (" << n << ") "
+            << "of axis transformation [ id = '" << axisDest->getId() << "' , context = '" << CObjectFactory::GetCurrentContextId() << "' ] are not well specified");
+    
+    if (zoomByIndex && (!this->begin.isEmpty() || !this->n.isEmpty()))
+      ERROR("CZoomAxis::checkValid(CAxis* axisDest)",
+            << "Only one type of zoom is accepted. Define zoom by index with global_zoom_index or define zoom with begin and n. "
+            << "Axis transformation [ id = '" << axisDest->getId() << "' , context = '" << CObjectFactory::GetCurrentContextId() << "' ] are not well specified");
+
+    this->begin.setValue(begin);
+    this->n.setValue(n);
+
+  }
+
+}
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/node/zoom_axis.hpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/node/zoom_axis.hpp	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/node/zoom_axis.hpp	(revision 1749)
@@ -0,0 +1,67 @@
+#ifndef __XIOS_CZoomAxis__
+#define __XIOS_CZoomAxis__
+
+/// xios headers ///
+#include "xios_spl.hpp"
+#include "attribute_enum.hpp"
+#include "attribute_enum_impl.hpp"
+#include "attribute_array.hpp"
+#include "declare_attribute.hpp"
+#include "object_template.hpp"
+#include "group_factory.hpp"
+#include "declare_group.hpp"
+#include "transformation.hpp"
+#include "axis.hpp"
+
+namespace xios {
+  /// ////////////////////// DÃ©clarations ////////////////////// ///
+  class CZoomAxisGroup;
+  class CZoomAxisAttributes;
+  class CZoomAxis;
+  class CAxis;
+
+  ///--------------------------------------------------------------
+
+  // Declare/Define CFileAttribute
+  BEGIN_DECLARE_ATTRIBUTE_MAP(CZoomAxis)
+#include "zoom_axis_attribute.conf"
+  END_DECLARE_ATTRIBUTE_MAP(CZoomAxis)
+
+  ///--------------------------------------------------------------
+  /*!
+    \class CZoomAxis
+    This class describes zoom_axis in xml file.
+  */
+  class CZoomAxis
+    : public CObjectTemplate<CZoomAxis>
+    , public CZoomAxisAttributes
+    , public CTransformation<CAxis>
+  {
+    public :
+      typedef CObjectTemplate<CZoomAxis> SuperClass;
+      typedef CZoomAxisAttributes SuperClassAttribute;
+
+    public :
+      /// Constructeurs ///
+      CZoomAxis(void);
+      explicit CZoomAxis(const StdString& id);
+
+      /// Destructeur ///
+      virtual ~CZoomAxis(void);
+
+      virtual void checkValid(CAxis* axisDest);
+
+      /// Accesseurs statiques ///
+      static StdString GetName(void);
+      static StdString GetDefName(void);
+      static ENodeType GetType(void);
+    private:
+      static bool registerTrans();
+      static CTransformation<CAxis>* create(const StdString& id, xml::CXMLNode* node);
+      static bool _dummyRegistered;
+  }; // class CZoomAxis
+
+  DECLARE_GROUP(CZoomAxis);
+} // namespace xios
+
+#endif // __XIOS_CZoomAxis__
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/node/zoom_domain.cpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/node/zoom_domain.cpp	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/node/zoom_domain.cpp	(revision 1749)
@@ -0,0 +1,74 @@
+#include "zoom_domain.hpp"
+#include "type.hpp"
+
+namespace xios {
+
+  /// ////////////////////// DÃ©finitions ////////////////////// ///
+
+  CZoomDomain::CZoomDomain(void)
+    : CObjectTemplate<CZoomDomain>(), CZoomDomainAttributes(), CTransformation<CDomain>()
+  { /* Ne rien faire de plus */ }
+
+  CZoomDomain::CZoomDomain(const StdString & id)
+    : CObjectTemplate<CZoomDomain>(id), CZoomDomainAttributes(), CTransformation<CDomain>()
+  { /* Ne rien faire de plus */ }
+
+  CZoomDomain::~CZoomDomain(void)
+  {}
+
+  CTransformation<CDomain>* CZoomDomain::create(const StdString& id, xml::CXMLNode* node)
+  {
+    CZoomDomain* zoomDomain = CZoomDomainGroup::get("zoom_domain_definition")->createChild(id);
+    if (node) zoomDomain->parse(*node);
+    return static_cast<CTransformation<CDomain>*>(zoomDomain);
+  }
+
+  bool CZoomDomain::_dummyRegistered = CZoomDomain::registerTrans();
+  bool CZoomDomain::registerTrans()
+  {
+    registerTransformation(TRANS_ZOOM_DOMAIN, CZoomDomain::create);
+  }
+
+  //----------------------------------------------------------------
+
+  StdString CZoomDomain::GetName(void)    { return StdString("zoom_domain"); }
+  StdString CZoomDomain::GetDefName(void) { return StdString("zoom_domain"); }
+  ENodeType CZoomDomain::GetType(void)    { return eZoomDomain; }
+
+  void CZoomDomain::checkValid(CDomain* domainSrc)
+  {
+    int ni_glo = domainSrc->ni_glo.getValue();
+    int nj_glo = domainSrc->nj_glo.getValue();
+
+    // RÃ©solution et vÃ©rification des donnÃ©es globales de zoom.
+    if (!this->ni.isEmpty() || !this->nj.isEmpty() ||
+        !this->ibegin.isEmpty() || !this->jbegin.isEmpty())
+    {
+       if (this->ni.isEmpty()     || this->nj.isEmpty() ||
+           this->ibegin.isEmpty() || this->jbegin.isEmpty())
+       {
+         ERROR("CZoomDomain::checkValid(CDomain* domainSrc)",
+               << "If one of zoom attributes is defined then all zoom attributes must be defined.") ;
+       }
+       else
+       {
+          int iend = ibegin + ni - 1;
+          int jend = jbegin + nj - 1;
+
+          if (ibegin < 0  || jbegin < 0 || iend > ni_glo - 1 || jend > nj_glo - 1)
+            ERROR("CZoomDomain::checkValid(CDomain* domainSrc)",
+                  << "Zoom is wrongly defined, "
+                  << "please check the values : 'ni' (" << ni.getValue() << "), 'nj' (" << nj.getValue() << "), "
+                  << "'ibegin' (" << ibegin.getValue() << "), 'jbegin' (" << jbegin.getValue() << ")");
+       }
+    }
+    else
+    {
+       ni = ni_glo;
+       nj = nj_glo;
+       ibegin = 0;
+       jbegin = 0;
+    }
+  }
+
+}
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/node/zoom_domain.hpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/node/zoom_domain.hpp	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/node/zoom_domain.hpp	(revision 1749)
@@ -0,0 +1,67 @@
+#ifndef __XIOS_CZoomDomain__
+#define __XIOS_CZoomDomain__
+
+/// xios headers ///
+#include "xios_spl.hpp"
+#include "attribute_enum.hpp"
+#include "attribute_enum_impl.hpp"
+#include "attribute_array.hpp"
+#include "declare_attribute.hpp"
+#include "object_template.hpp"
+#include "group_factory.hpp"
+#include "declare_group.hpp"
+#include "transformation.hpp"
+#include "domain.hpp"
+
+namespace xios {
+  /// ////////////////////// DÃ©clarations ////////////////////// ///
+  class CZoomDomainGroup;
+  class CZoomDomainAttributes;
+  class CZoomDomain;
+  class CDomain;
+
+  ///--------------------------------------------------------------
+
+  // Declare/Define CFileAttribute
+  BEGIN_DECLARE_ATTRIBUTE_MAP(CZoomDomain)
+#include "zoom_domain_attribute.conf"
+  END_DECLARE_ATTRIBUTE_MAP(CZoomDomain)
+
+  ///--------------------------------------------------------------
+  /*!
+    \class CZoomDomain
+    This class describes zoom_domain in xml file.
+  */
+  class CZoomDomain
+    : public CObjectTemplate<CZoomDomain>
+    , public CZoomDomainAttributes
+    , public CTransformation<CDomain>
+  {
+    public :
+      typedef CObjectTemplate<CZoomDomain> SuperClass;
+      typedef CZoomDomainAttributes SuperClassAttribute;
+
+    public :
+      /// Constructeurs ///
+      CZoomDomain(void);
+      explicit CZoomDomain(const StdString& id);
+
+      /// Destructeur ///
+      virtual ~CZoomDomain(void);
+
+      virtual void checkValid(CDomain* axisDest);
+
+      /// Accesseurs statiques ///
+      static StdString GetName(void);
+      static StdString GetDefName(void);
+      static ENodeType GetType(void);
+    private:
+      static bool registerTrans();
+      static CTransformation<CDomain>* create(const StdString& id, xml::CXMLNode* node);
+      static bool _dummyRegistered;
+  }; // class CZoomDomain
+
+  DECLARE_GROUP(CZoomDomain);
+} // namespace xios
+
+#endif // __XIOS_CZoomDomain__
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/object.cpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/object.cpp	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/object.cpp	(revision 1749)
@@ -0,0 +1,82 @@
+#include "object.hpp"
+
+namespace xios
+{
+  /// ////////////////////// DÃ©finitions ////////////////////// ///
+
+  CObject::CObject(void)
+    : id(), idDefined(false), idAutoGenerated(false)
+  { /* Ne rien faire de plus */ }
+
+  CObject::CObject(const StdString& id, bool idAutoGenerated /*= false*/)
+    : id(id)
+    , idDefined(true)
+    , idAutoGenerated(idAutoGenerated)
+  { /* Ne rien faire de plus */ }
+
+  CObject::CObject(const CObject& object)
+    : id(object.id)
+    , idDefined(object.idDefined)
+    , idAutoGenerated(object.idAutoGenerated)
+  { /* Ne rien faire de plus */ }
+
+  CObject::~CObject(void)
+  { /* Ne rien faire de plus */ }
+
+  const StdString& CObject::getId(void) const
+  {
+    return this->id;
+  }
+
+  const StdString& CObject::getIdServer() const
+  {
+    return this->id;
+  }
+
+  StdString CObject::dumpClassAttributes(void)
+  {
+    return "";
+  }
+
+  bool CObject::hasId(void) const
+  {
+    return this->idDefined;
+  }
+
+  bool CObject::hasAutoGeneratedId(void) const
+  {
+    return this->idAutoGenerated;
+  }
+
+  void CObject::resetId(void)
+  {
+    this->idDefined = false;
+  }
+
+  void CObject::setId(const StdString& id, bool idAutoGenerated /*= false*/)
+  {
+    this->id = id;
+    this->idDefined = true;
+    this->idAutoGenerated = idAutoGenerated;
+  }
+
+  /*
+  bool CObject::operator==(const CObject& other) const
+  {
+    if(!this->hasId() || !other.hasId())
+    return false;
+    return this->id.compare(other.id) == 0;
+  }
+
+  bool CObject::operator!=(const CObject& other) const
+  {
+    return !(*this == other);
+  }
+  */
+
+  StdOStream& operator<<(StdOStream& os, const CObject& object)
+  {
+    os << object.toString();
+    return os;
+  }
+} // namespace xios
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/object.hpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/object.hpp	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/object.hpp	(revision 1749)
@@ -0,0 +1,57 @@
+#ifndef __XIOS_CObject__
+#define __XIOS_CObject__
+
+/// XIOS headers ///
+#include "xios_spl.hpp"
+
+namespace xios
+{
+  /// ////////////////////// DÃ©clarations ////////////////////// ///
+
+  class CObject
+  {
+    public:
+      /// Destructeur ///
+      virtual ~CObject(void);
+
+      /// Accesseurs ///
+      const StdString& getId(void) const;
+      virtual const StdString& getIdServer() const;
+
+      virtual StdString dumpClassAttributes(void);
+
+      /// Mutateurs ///
+      void resetId(void);
+      void setId(const StdString& id, bool idAutoGenerated = false);
+
+      /// Tests ///
+      bool hasId(void) const;
+      bool hasAutoGeneratedId(void) const;
+
+      /// OpÃ©rateurs ///
+      // bool operator==(const CObject& other) const;
+      // bool operator!=(const CObject& other) const;
+
+      /// Flux ///
+      friend StdOStream& operator<<(StdOStream& os, const CObject& object);
+
+      /// Autres ///
+      virtual StdString toString(void) const = 0;
+      virtual void fromString(const StdString& str) = 0;
+
+    protected:
+      /// Constructeurs ///
+      CObject(void);
+      explicit CObject(const StdString& id, bool idAutoGenerated = false);
+      CObject(const CObject& object);
+      CObject(const CObject* const object); // Not implemented.
+
+    private:
+      /// PropriÃ©tÃ©s ///
+      StdString id;   // identifiant de l'Object
+      bool idDefined; // true si l'object est identifiÃ©, false sinon.
+      bool idAutoGenerated; //!< true if and only the id was automatically generated
+  }; // class CObject
+} // namespace xios
+
+#endif // __XIOS_CObject__
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/object_factory.cpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/object_factory.cpp	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/object_factory.cpp	(revision 1749)
@@ -0,0 +1,15 @@
+#include "object_factory.hpp"
+
+namespace xios
+{
+   /// ////////////////////// DÃ©finitions ////////////////////// ///
+
+   StdString CObjectFactory::CurrContext("");
+
+   void CObjectFactory::SetCurrentContextId(const StdString & context)
+   { CObjectFactory::CurrContext = context; }
+
+   StdString & CObjectFactory::GetCurrentContextId(void)
+   { return (CObjectFactory::CurrContext); }
+
+} // namespace xios
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/object_factory.hpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/object_factory.hpp	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/object_factory.hpp	(revision 1749)
@@ -0,0 +1,67 @@
+#ifndef __XIOS_CObjectFactory__
+#define __XIOS_CObjectFactory__
+
+#include <memory>
+
+/// XIOS headers ///
+#include "xios_spl.hpp"
+#include "exception.hpp"
+#include "object_template.hpp"
+
+namespace xios
+{
+   /// ////////////////////// DÃ©clarations ////////////////////// ///
+   class CObjectFactory
+   {
+      public :
+
+         /// Mutateurs ///
+         static void SetCurrentContextId(const StdString & context);
+
+         /// Accesseurs ///
+         static StdString & GetCurrentContextId(void);
+
+         template <typename U>
+            static  std::shared_ptr<U> GetObject(const StdString & id);
+
+         template <typename U>
+            static  std::shared_ptr<U> GetObject(const StdString& context,const StdString & id);
+
+         template <typename U>
+            static  std::shared_ptr<U> GetObject(const U * const object);
+
+         template <typename U>
+            static  int GetObjectNum(void);
+         template <typename U>
+            static  int GetObjectIdNum(void);
+
+         template <typename U>
+            static  const std::vector<std::shared_ptr<U> > &
+               GetObjectVector(const StdString & context = CObjectFactory::GetCurrentContextId());
+
+         /// Tests ///
+         template <typename U>
+            static  bool HasObject(const StdString & id);
+
+         template <typename U>
+            static  bool HasObject(const StdString& context,const StdString & id);
+
+         /// Instanciateur ///
+         template <typename U>
+            static  std::shared_ptr<U> CreateObject(const StdString & id = StdString(""));
+
+         template <typename U> static const StdString& GetUIdBase(void);
+         template <typename U> static StdString GenUId(void);
+         template <typename U> static bool IsGenUId(const StdString& id);
+
+      private :
+
+         /// PropriÃ©tÃ©s statiques ///
+         static StdString CurrContext;
+
+   }; // class CObjectFactory
+} // namespace xios
+
+//#include "object_factory_impl.hpp"
+
+#endif // __XIOS_CObjectFactory__
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/object_factory_decl1.cpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/object_factory_decl1.cpp	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/object_factory_decl1.cpp	(revision 1749)
@@ -0,0 +1,18 @@
+#include "object_factory_decl_macro.hpp"
+
+namespace xios
+{
+  macro(CField)
+  macro(CFile)
+  macro(CGrid)
+  macro(CAxis)
+  macro(CDomain)
+  macro(CContext)
+  macro(CCalendarWrapper)
+  macro(CVariable)
+  macro(CInverseAxis)
+  macro(CZoomAxis)
+  macro(CInterpolateAxis)
+}
+
+
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/object_factory_decl2.cpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/object_factory_decl2.cpp	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/object_factory_decl2.cpp	(revision 1749)
@@ -0,0 +1,24 @@
+#include "object_factory_decl_macro.hpp"
+
+namespace xios
+{
+  macro(CExtractAxis)
+  macro(CZoomDomain)
+  macro(CInterpolateDomain)
+  macro(CGenerateRectilinearDomain)
+  macro(CScalar)
+  macro(CReduceAxisToScalar)
+  macro(CReduceDomainToAxis)
+  macro(CReduceAxisToAxis)
+  macro(CExtractDomainToAxis)
+  macro(CComputeConnectivityDomain)
+  macro(CExpandDomain)
+  macro(CExtractAxisToScalar)
+  macro(CReduceDomainToScalar)
+  macro(CTemporalSplitting)
+  macro(CDuplicateScalarToAxis)
+  macro(CReduceScalarToScalar)
+  macro(CReorderDomain)
+  macro(CExtractDomain)
+}
+
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/object_factory_decl3.cpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/object_factory_decl3.cpp	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/object_factory_decl3.cpp	(revision 1749)
@@ -0,0 +1,19 @@
+#include "object_factory_decl_macro.hpp"
+
+
+namespace xios
+{
+  macro(CFieldGroup)
+  macro(CFileGroup)
+  macro(CGridGroup)
+  macro(CAxisGroup)
+  macro(CDomainGroup)
+  macro(CContextGroup)
+  macro(CVariableGroup)
+  macro(CInverseAxisGroup)
+  macro(CZoomAxisGroup)
+  macro(CInterpolateAxisGroup)
+  macro(CExtractAxisGroup)
+  macro(CZoomDomainGroup)
+}
+
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/object_factory_decl4.cpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/object_factory_decl4.cpp	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/object_factory_decl4.cpp	(revision 1749)
@@ -0,0 +1,22 @@
+#include "object_factory_decl_macro.hpp"
+
+namespace xios
+{
+  macro(CInterpolateDomainGroup)
+  macro(CGenerateRectilinearDomainGroup)
+  macro(CScalarGroup)
+  macro(CReduceAxisToScalarGroup)
+  macro(CReduceDomainToAxisGroup)
+  macro(CReduceAxisToAxisGroup)
+  macro(CExtractDomainToAxisGroup)
+  macro(CComputeConnectivityDomainGroup)
+  macro(CExpandDomainGroup)
+  macro(CExtractAxisToScalarGroup)
+  macro(CReduceDomainToScalarGroup)
+  macro(CTemporalSplittingGroup)
+  macro(CDuplicateScalarToAxisGroup)
+  macro(CReduceScalarToScalarGroup)
+  macro(CReorderDomainGroup)
+  macro(CExtractDomainGroup)
+}
+
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/object_factory_decl_macro.hpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/object_factory_decl_macro.hpp	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/object_factory_decl_macro.hpp	(revision 1749)
@@ -0,0 +1,19 @@
+#include "object_factory_impl.hpp"
+#include "node_type.hpp"
+
+
+#define macro(U) \
+  template std::shared_ptr<U> CObjectFactory::GetObject<U>(const StdString& id);  \
+  template std::shared_ptr<U> CObjectFactory::GetObject<U>(const StdString& context,const StdString& id); \
+  template std::shared_ptr<U> CObjectFactory::GetObject<U>(const U* const object); \
+  template int CObjectFactory::GetObjectNum<U>(void); \
+  template int CObjectFactory::GetObjectIdNum<U>(void); \
+  template const std::vector<std::shared_ptr<U> >& CObjectFactory::GetObjectVector<U>(const StdString& context ); \
+  template bool CObjectFactory::HasObject<U>(const StdString& id); \
+  template bool CObjectFactory::HasObject<U>(const StdString& context,const StdString& id); \
+  template std::shared_ptr<U> CObjectFactory::CreateObject<U>(const StdString& id ); \
+  template const StdString& CObjectFactory::GetUIdBase<U>(void); \
+  template StdString CObjectFactory::GenUId<U>(void); \
+  template bool CObjectFactory::IsGenUId<U>(const StdString& id);
+
+
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/object_factory_impl.hpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/object_factory_impl.hpp	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/object_factory_impl.hpp	(revision 1749)
@@ -0,0 +1,145 @@
+#ifndef __XIOS_CObjectFactory_impl__
+#define __XIOS_CObjectFactory_impl__
+
+#include "object_factory.hpp"
+
+namespace xios
+{
+   /// ////////////////////// DÃ©finitions ////////////////////// ///
+   template <typename U>
+       int CObjectFactory::GetObjectNum(void)
+   {
+      if (CurrContext.size() == 0)
+         ERROR("CObjectFactory::GetObjectNum(void)",
+               << "please define current context id !");
+      return (U::AllVectObj[CObjectFactory::CurrContext].size());
+   }
+
+   template <typename U>
+      int CObjectFactory::GetObjectIdNum(void)
+   {
+      if (CurrContext.size() == 0)
+         ERROR("CObjectFactory::GetObjectIdNum(void)",
+               << "please define current context id !");
+      return (U::AllMapObj[CObjectFactory::CurrContext].size());
+   }
+
+   template <typename U>
+      bool CObjectFactory::HasObject(const StdString & id)
+   {
+      if (CurrContext.size() == 0)
+         ERROR("CObjectFactory::HasObject(const StdString & id)",
+               << "[ id = " << id << " ] please define current context id !");
+      return (U::AllMapObj[CObjectFactory::CurrContext].find(id) !=
+              U::AllMapObj[CObjectFactory::CurrContext].end());
+   }
+
+   template <typename U>
+      bool CObjectFactory::HasObject(const StdString & context, const StdString & id)
+   {
+      if (U::AllMapObj.find(context) == U::AllMapObj.end()) return false ;
+      else return (U::AllMapObj[context].find(id) !=  U::AllMapObj[context].end());
+   }
+
+   template <typename U>
+      std::shared_ptr<U> CObjectFactory::GetObject(const U * const object)
+   {
+      if (CurrContext.size() == 0)
+         ERROR("CObjectFactory::GetObject(const U * const object)",
+               << "please define current context id !");
+      std::vector<std::shared_ptr<U> > & vect =
+                     U::AllVectObj[CObjectFactory::CurrContext];
+
+      typename std::vector<std::shared_ptr<U> >::const_iterator
+         it = vect.begin(), end = vect.end();
+
+      for (; it != end; it++)
+      {
+         std::shared_ptr<U> ptr = *it;
+         if (ptr.get() == object)
+            return (ptr);
+      }
+
+      ERROR("CObjectFactory::GetObject(const U * const object)",
+               << "[type = " << U::GetName() << ", adress = " << object << "] "
+               << "object was not found.");
+      return (std::shared_ptr<U>()); // jamais atteint
+   }
+
+   template <typename U>
+      std::shared_ptr<U> CObjectFactory::GetObject(const StdString & id)
+   {
+      if (CurrContext.size() == 0)
+         ERROR("CObjectFactory::GetObject(const StdString & id)",
+               << "[ id = " << id << " ] please define current context id !");
+      if (!CObjectFactory::HasObject<U>(id))
+         ERROR("CObjectFactory::GetObject(const StdString & id)",
+               << "[ id = " << id << ", U = " << U::GetName() << " ] "
+               << "object was not found.");
+      return (U::AllMapObj[CObjectFactory::CurrContext][id]);
+   }
+
+   template <typename U>
+      std::shared_ptr<U> CObjectFactory::GetObject(const StdString & context, const StdString & id)
+   {
+      if (!CObjectFactory::HasObject<U>(context,id))
+         ERROR("CObjectFactory::GetObject(const StdString & id)",
+               << "[ id = " << id << ", U = " << U::GetName() <<", context = "<<context<< " ] "
+               << "object was not found.");
+      return (U::AllMapObj[context][id]);
+   }
+
+   template <typename U>
+   std::shared_ptr<U> CObjectFactory::CreateObject(const StdString& id)
+   {
+      if (CurrContext.empty())
+         ERROR("CObjectFactory::CreateObject(const StdString& id)",
+               << "[ id = " << id << " ] please define current context id !");
+
+      if (CObjectFactory::HasObject<U>(id))
+      {
+         return CObjectFactory::GetObject<U>(id);
+      }
+      else
+      {
+         std::shared_ptr<U> value(new U(id.empty() ? CObjectFactory::GenUId<U>() : id));
+
+         U::AllVectObj[CObjectFactory::CurrContext].insert(U::AllVectObj[CObjectFactory::CurrContext].end(), value);
+         U::AllMapObj[CObjectFactory::CurrContext].insert(std::make_pair(value->getId(), value));
+
+         return value;
+      }
+   }
+
+   template <typename U>
+      const std::vector<std::shared_ptr<U> > &
+         CObjectFactory::GetObjectVector(const StdString & context)
+   {
+      return (U::AllVectObj[context]);
+   }
+
+   template <typename U>
+   const StdString& CObjectFactory::GetUIdBase(void)
+   {
+      static const StdString base = "__" + U::GetName() + "_undef_id_";
+      return base;
+   }
+
+   template <typename U>
+   StdString CObjectFactory::GenUId(void)
+   {
+      StdOStringStream oss;
+      oss << GetUIdBase<U>() << U::GenId[CObjectFactory::CurrContext]++;
+      return oss.str();
+   }
+
+   template <typename U>
+   bool CObjectFactory::IsGenUId(const StdString& id)
+   {
+      const StdString& base = GetUIdBase<U>();
+      return (id.size() > base.size() && id.compare(0, base.size(), base) == 0);
+   }
+
+} // namespace xios
+
+#endif // __XIOS_CObjectFactory_impl__
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/object_template.hpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/object_template.hpp	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/object_template.hpp	(revision 1749)
@@ -0,0 +1,121 @@
+#ifndef __XIOS_CObjectTemplate__
+#define __XIOS_CObjectTemplate__
+
+/// XIOS headers ///
+#include "xios_spl.hpp"
+#include "attribute_map.hpp"
+#include "node_enum.hpp"
+#include "buffer_in.hpp"
+#include "event_server.hpp"
+#include "attribute.hpp"
+#include "context_client.hpp"
+
+namespace xios
+{
+   /// ////////////////////// DÃ©clarations ////////////////////// ///
+   template <class T>
+      class CObjectTemplate
+         : public CObject
+         , public virtual CAttributeMap
+   {
+
+         /// Friend ///
+         friend class CObjectFactory;
+
+         /// Typedef ///
+         typedef CAttributeMap SuperClassMap;
+         typedef CObject SuperClass;
+         typedef T DerivedType;
+
+         enum EEventId
+         {
+           EVENT_ID_SEND_ATTRIBUTE=100
+         } ;
+
+      public :
+
+         /// Autres ///
+         virtual StdString toString(void) const;
+         virtual void fromString(const StdString & str);
+
+//         virtual void toBinary  (StdOStream & os) const;
+//         virtual void fromBinary(StdIStream & is);
+         virtual string getName(void) const ;
+         virtual void parse(xml::CXMLNode & node);
+
+         /// Accesseurs ///
+         ENodeType getType(void) const;
+
+         /// Test ///
+         virtual bool hasChild(void) const;
+
+         /// Traitements ///
+         virtual void solveDescInheritance(bool apply, const CAttributeMap * const parent = 0);
+
+         /// Traitement statique ///
+         static void ClearAllAttributes(void);
+         std::map<int, size_t> getMinimumBufferSizeForAttributes(CContextClient* client);
+         void sendAttributToServer(const string& id);
+         void sendAttributToServer(const string& id, CContextClient* client);
+         void sendAttributToServer(CAttribute& attr) ;
+         void sendAttributToServer(CAttribute& attr, CContextClient* client) ;
+         void sendAllAttributesToServer();
+         void sendAllAttributesToServer(CContextClient* client);
+         void sendAddItem(const string& id, int itemType);
+         void sendAddItem(const string& id, int itemType, CContextClient* client);
+         static void recvAttributFromClient(CEventServer& event) ;
+         static bool dispatchEvent(CEventServer& event) ;
+
+         bool isEqual(const string& id, const vector<StdString>& excludedAttrs);
+         bool isEqual(T* obj, const vector<StdString>& excludedAttrs);
+
+         /// Accesseur statique ///
+         static std::vector<std::shared_ptr<DerivedType> > &
+            GetAllVectobject(const StdString & contextId);
+
+         /// Destructeur ///
+         virtual ~CObjectTemplate(void);
+
+         static bool has(const string& id) ;
+         static bool has(const string& contextId, const string& id) ;
+         static T* get(const string& id) ;
+         static T* get(const T* ptr) ;
+         static T* get(const string& contextId, const string& id) ;
+         T* get(void) ;
+         std::shared_ptr<T> getShared(void) ;
+         static std::shared_ptr<T> getShared(const T* ptr) ;
+
+         static T* create(const string& id=string("")) ;
+         static const vector<T*> getAll() ;
+         static const vector<T*> getAll(const string& contextId) ;
+
+         void generateCInterface(ostream& oss) ;
+         void generateFortran2003Interface(ostream& oss) ;
+         void generateFortranInterface(ostream& oss) ;
+
+      protected :
+
+         /// Constructeurs ///
+         CObjectTemplate(void);
+         explicit CObjectTemplate(const StdString & id);
+         CObjectTemplate(const CObjectTemplate<T> & object,
+                         bool withAttrList = true, bool withId = true);
+         CObjectTemplate(const CObjectTemplate<T> * const object); // Not implemented.
+
+      private :
+
+         /// PropriÃ©tÃ©s statiques ///
+         static xios_map<StdString,
+                xios_map<StdString,
+                std::shared_ptr<DerivedType> > > AllMapObj;
+         static xios_map<StdString,
+                std::vector<std::shared_ptr<DerivedType> > > AllVectObj;
+
+         static xios_map< StdString, long int > GenId ;
+
+   }; // class CObjectTemplate
+} // namespace xios
+
+//#include "object_template_impl.hpp"
+
+#endif // __XIOS_CObjectTemplate__
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/object_template_decl.cpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/object_template_decl.cpp	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/object_template_decl.cpp	(revision 1749)
@@ -0,0 +1,65 @@
+#include "object_template_impl.hpp"
+#include "xios_spl.hpp"
+#include "node_type.hpp"
+
+namespace xios
+{
+  template class CObjectTemplate<CContext>;
+  template class CObjectTemplate<CCalendarWrapper>;
+  template class CObjectTemplate<CField>;
+  template class CObjectTemplate<CFile>;
+  template class CObjectTemplate<CDomain>;
+  template class CObjectTemplate<CGrid>;
+  template class CObjectTemplate<CAxis>;
+  template class CObjectTemplate<CVariable>;
+  template class CObjectTemplate<CInverseAxis>;
+  template class CObjectTemplate<CZoomAxis>;
+  template class CObjectTemplate<CInterpolateAxis>;
+  template class CObjectTemplate<CExtractAxis>;
+  template class CObjectTemplate<CZoomDomain>;
+  template class CObjectTemplate<CInterpolateDomain>;
+  template class CObjectTemplate<CGenerateRectilinearDomain>;
+  template class CObjectTemplate<CScalar>;
+  template class CObjectTemplate<CReduceAxisToScalar>;
+  template class CObjectTemplate<CReduceDomainToAxis>;
+  template class CObjectTemplate<CReduceAxisToAxis>;
+  template class CObjectTemplate<CExtractDomainToAxis>;
+  template class CObjectTemplate<CComputeConnectivityDomain>;
+  template class CObjectTemplate<CExpandDomain>;
+  template class CObjectTemplate<CExtractAxisToScalar>;
+  template class CObjectTemplate<CReduceDomainToScalar>;
+  template class CObjectTemplate<CTemporalSplitting>;
+  template class CObjectTemplate<CDuplicateScalarToAxis>;
+  template class CObjectTemplate<CReduceScalarToScalar>;
+  template class CObjectTemplate<CReorderDomain>;
+  template class CObjectTemplate<CExtractDomain>;
+  
+  template class CObjectTemplate<CContextGroup>;
+  template class CObjectTemplate<CFieldGroup>;
+  template class CObjectTemplate<CFileGroup>;
+  template class CObjectTemplate<CDomainGroup>;
+  template class CObjectTemplate<CGridGroup>;
+  template class CObjectTemplate<CAxisGroup>;
+  template class CObjectTemplate<CVariableGroup>;
+  template class CObjectTemplate<CInverseAxisGroup>;
+  template class CObjectTemplate<CZoomAxisGroup>;
+  template class CObjectTemplate<CInterpolateAxisGroup>;
+  template class CObjectTemplate<CExtractAxisGroup>;
+  template class CObjectTemplate<CZoomDomainGroup>;
+  template class CObjectTemplate<CInterpolateDomainGroup>;
+  template class CObjectTemplate<CGenerateRectilinearDomainGroup>;
+  template class CObjectTemplate<CScalarGroup>;
+  template class CObjectTemplate<CReduceAxisToScalarGroup>;
+  template class CObjectTemplate<CReduceDomainToAxisGroup>;
+  template class CObjectTemplate<CReduceAxisToAxisGroup>;
+  template class CObjectTemplate<CExtractDomainToAxisGroup>;
+  template class CObjectTemplate<CComputeConnectivityDomainGroup>;
+  template class CObjectTemplate<CExpandDomainGroup>;
+  template class CObjectTemplate<CExtractAxisToScalarGroup>;
+  template class CObjectTemplate<CReduceDomainToScalarGroup>;
+  template class CObjectTemplate<CTemporalSplittingGroup>;
+  template class CObjectTemplate<CDuplicateScalarToAxisGroup>;
+  template class CObjectTemplate<CReduceScalarToScalarGroup>;
+  template class CObjectTemplate<CReorderDomainGroup>;
+  template class CObjectTemplate<CExtractDomainGroup>;
+}
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/object_template_impl.hpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/object_template_impl.hpp	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/object_template_impl.hpp	(revision 1749)
@@ -0,0 +1,566 @@
+#ifndef __XIOS_CObjectTemplate_impl__
+#define __XIOS_CObjectTemplate_impl__
+
+#include "xios_spl.hpp"
+#include "context_client.hpp"
+#include "object_factory.hpp"
+#include "context.hpp"
+#include "buffer_in.hpp"
+#include "attribute.hpp"
+#include "event_client.hpp"
+#include "object_template.hpp"
+#include "context_client.hpp"
+#include "indent.hpp"
+#include "type_util.hpp"
+#include "message.hpp"
+#include "type.hpp"
+#include "type_util.hpp"
+#include "group_template.hpp"
+
+namespace xios
+{
+   /// ////////////////////// DÃ©finitions ////////////////////// ///
+   template <class T>
+      xios_map<StdString,
+      xios_map<StdString,
+      std::shared_ptr<T> > > CObjectTemplate<T>::AllMapObj;
+
+   template <class T>
+      xios_map<StdString,
+      std::vector<std::shared_ptr<T> > > CObjectTemplate<T>::AllVectObj;
+
+   template <class T>
+      xios_map<StdString,long int> CObjectTemplate<T>::GenId;
+
+   template <class T>
+      CObjectTemplate<T>::CObjectTemplate(void)
+         : CAttributeMap()
+         , CObject()
+   { /* Ne rien faire de plus */ }
+
+   template <class T>
+      CObjectTemplate<T>::CObjectTemplate(const StdString & id)
+         : CAttributeMap()
+         , CObject(id, CObjectFactory::IsGenUId<T>(id))
+   { /* Ne rien faire de plus */ }
+
+   template <class T>
+      CObjectTemplate<T>::CObjectTemplate
+         (const CObjectTemplate<T> & object, bool withAttrList, bool withId)
+         : CAttributeMap()
+         , CObject()
+   {
+      if (object.hasId() && withId)
+         this->setId(object.getId(), object.hasAutoGeneratedId());
+      ERROR("CObjectTemplate<T> construtor 3", << "Not completly implemented yet !");
+   }
+
+   template <class T>
+      CObjectTemplate<T>::~CObjectTemplate(void)
+   { /* Ne rien faire de plus */ }
+
+   ///--------------------------------------------------------------
+
+   template <class T>
+      std::vector<std::shared_ptr<T> > &
+         CObjectTemplate<T>::GetAllVectobject(const StdString & contextId)
+   {
+      return (CObjectTemplate<T>::AllVectObj[contextId]);
+   }
+
+   //---------------------------------------------------------------
+
+   template <class T>
+      StdString CObjectTemplate<T>::toString(void) const
+   {
+      StdOStringStream oss;
+      oss << "<" << T::GetName();
+      if (this->hasId())
+         oss << " id=\"" << this->getId() << "\"";
+      oss << " " << SuperClassMap::toString() << "/>";
+      return (oss.str());
+   }
+
+   template <class T>
+      void CObjectTemplate<T>::fromString(const StdString & str)
+   {
+      ERROR("CObjectTemplate<T>::fromString(str)",
+            << "[ str = " << str << "] Not implemented yet !");
+   }
+
+   //---------------------------------------------------------------
+
+/*
+   template <class T>
+      void CObjectTemplate<T>::toBinary(StdOStream & os) const
+   {
+      SuperClassMap::toBinary(os);
+   }
+
+   template <class T>
+      void CObjectTemplate<T>::fromBinary(StdIStream & is)
+   {
+      SuperClassMap::fromBinary(is);
+   }
+*/
+
+   //---------------------------------------------------------------
+
+   template <class T>
+      void CObjectTemplate<T>::parse(xml::CXMLNode & node)
+   TRY
+   {
+      xml::THashAttributes attributes = node.getAttributes();
+      CAttributeMap::setAttributes(attributes);
+   }
+   CATCH
+
+   //---------------------------------------------------------------
+
+   template <class T>
+      ENodeType CObjectTemplate<T>::getType(void) const
+   {
+      return (T::GetType());
+   }
+
+   template <class T>
+   string CObjectTemplate<T>::getName(void) const
+   {
+      return (T::GetName());
+   }
+
+   //---------------------------------------------------------------
+
+   template <class T>
+      bool CObjectTemplate<T>::hasChild(void) const
+   {
+      return (false);
+   }
+
+   /*!
+     Compare two object of same type
+   */
+   template <class T>
+   bool CObjectTemplate<T>::isEqual(const string& id, const vector<StdString>& excludedAttrs)
+   {
+      T* obj = CObjectTemplate<T>::get(id);
+      return this->isEqual(obj, excludedAttrs);
+   }
+
+   template <class T>
+   bool CObjectTemplate<T>::isEqual(T* obj, const vector<StdString>& excludedAttrs)
+   {
+
+      CAttributeMap& attrMapThis = *this;
+      CAttributeMap& attrMapObj  = *obj;
+      return (attrMapThis.isEqual(attrMapObj, excludedAttrs));
+   }
+
+   //---------------------------------------------------------------
+
+   template <class T>
+      void CObjectTemplate<T>::solveDescInheritance(bool apply, const CAttributeMap * const parent)
+   {
+      if (parent != NULL)
+         SuperClassMap::setAttributes(parent, apply);
+   }
+
+   //---------------------------------------------------------------
+
+   template <class T>
+      void CObjectTemplate<T>::ClearAllAttributes(void)
+   {
+      vector<T*> avect = CObjectTemplate<T>::getAll();
+      typename vector<T*>::iterator
+            it = avect.begin(), end = avect.end();
+
+      for (;it != end; it++)
+      {
+         CAttributeMap & amap = **it;
+         amap.clearAllAttributes();
+      }
+   }
+
+   template<typename T>
+   std::map<int, size_t> CObjectTemplate<T>::getMinimumBufferSizeForAttributes(CContextClient* client)
+   {
+     std::map<int, size_t> minimumSizes;
+
+     if (client->isServerLeader())
+     {
+       size_t minimumSize = 0;
+       CAttributeMap& attrMap = *this;
+       CAttributeMap::const_iterator it = attrMap.begin(), itE = attrMap.end();
+       for (; it != itE; ++it)
+       {
+         if (!it->second->isEmpty())
+         {
+           size_t size = it->second->getName().size() + sizeof(size_t) + it->second->size();
+           if (size > minimumSize)
+             minimumSize = size;
+         }
+       }
+
+       if (minimumSize)
+       {
+         // Account for extra header info
+         minimumSize += CEventClient::headerSize + getIdServer().size() + sizeof(size_t);
+
+         const std::list<int>& ranks = client->getRanksServerLeader();
+         for (std::list<int>::const_iterator itRank = ranks.begin(), itRankEnd = ranks.end(); itRank != itRankEnd; ++itRank)
+           minimumSizes.insert(std::make_pair(*itRank, minimumSize));
+       }
+     }
+     return minimumSizes;
+   }
+
+
+   template<typename T>
+   void CObjectTemplate<T>::sendAllAttributesToServer()
+   {
+     CAttributeMap& attrMap = *this;
+     CAttributeMap::const_iterator it = attrMap.begin(), itE = attrMap.end();
+     for (; it != itE; ++it)
+     {
+       if (it->second->doSend() && !(it->second)->isEmpty()) sendAttributToServer(*(it->second));
+     }
+   }
+
+   template<typename T>
+   void CObjectTemplate<T>::sendAllAttributesToServer(CContextClient* client)
+   {
+     CAttributeMap& attrMap = *this;
+     CAttributeMap::const_iterator it = attrMap.begin(), itE = attrMap.end();
+     for (; it != itE; ++it)
+     {
+       if (it->second->doSend() && !(it->second)->isEmpty()) sendAttributToServer(*(it->second), client);
+     }
+   }
+
+   template <class T>
+   void CObjectTemplate<T>::sendAttributToServer(const string& id)
+   {
+      CAttributeMap & attrMap = *this;
+      CAttribute* attr=attrMap[id];
+      sendAttributToServer(*attr);
+   }
+
+   template <class T>
+   void CObjectTemplate<T>::sendAttributToServer(const string& id, CContextClient* client)
+   {
+      CAttributeMap & attrMap = *this;
+      CAttribute* attr=attrMap[id];
+      sendAttributToServer(*attr, client);
+   }
+
+  template <class T>
+  void CObjectTemplate<T>::sendAttributToServer(CAttribute& attr)
+  {
+     // Use correct context client to send message
+    CContext* context=CContext::getCurrent();
+    if (context->hasClient)
+    {
+      // int nbSrvPools = (context->hasServer) ? context->clientPrimServer.size() : 1;
+      int nbSrvPools = (context->hasServer) ? (context->hasClient ? context->clientPrimServer.size() : 0) : 1;
+      for (int i = 0; i < nbSrvPools; ++i)
+      {
+        CContextClient* contextClientTmp = (context->hasServer) ? context->clientPrimServer[i] : context->client;
+        CEventClient event(getType(),EVENT_ID_SEND_ATTRIBUTE);
+        if (contextClientTmp->isServerLeader())
+        {
+          CMessage msg;
+          msg<<this->getIdServer();
+          msg << attr.getName();
+          msg << attr;
+          const std::list<int>& ranks = contextClientTmp->getRanksServerLeader();
+          for (std::list<int>::const_iterator itRank = ranks.begin(), itRankEnd = ranks.end(); itRank != itRankEnd; ++itRank)
+            event.push(*itRank,1,msg);
+          contextClientTmp->sendEvent(event);
+        }
+        else contextClientTmp->sendEvent(event);
+      }
+    }
+  }
+
+  template <class T>
+  void CObjectTemplate<T>::sendAttributToServer(CAttribute& attr, CContextClient* client)
+  {
+    CEventClient event(getType(),EVENT_ID_SEND_ATTRIBUTE);
+    if (client->isServerLeader())
+    {
+      CMessage msg;
+      msg<<this->getIdServer();
+      msg << attr.getName();
+      msg << attr;
+      const std::list<int>& ranks = client->getRanksServerLeader();
+      for (std::list<int>::const_iterator itRank = ranks.begin(), itRankEnd = ranks.end(); itRank != itRankEnd; ++itRank)
+        event.push(*itRank,1,msg);
+      client->sendEvent(event);
+    }
+    else client->sendEvent(event);
+  }
+
+  /*!
+    This generic funtion only provides instance for sending, for receving, each 
+    child class must define itself.
+    \param [in] id Id of added item
+    \param [in] itemType type of added item
+  */
+  template<class T>
+  void CObjectTemplate<T>::sendAddItem(const StdString& id, int itemType)
+  {
+    CContext* context = CContext::getCurrent();
+    typedef typename T::EEventId ItemType;
+    if (context->hasClient)
+    {
+      // Use correct context client to send message
+      // int nbSrvPools = (context->hasServer) ? context->clientPrimServer.size() : 1;
+      int nbSrvPools = (context->hasServer) ? (context->hasClient ? context->clientPrimServer.size() : 0) : 1;
+      for (int i = 0; i < nbSrvPools; ++i)
+      {
+         CContextClient* contextClientTmp = (context->hasServer) ? context->clientPrimServer[i] : context->client;
+         CEventClient event(this->getType(),ItemType(itemType));
+         if (contextClientTmp->isServerLeader())
+         {
+           CMessage msg;
+           msg << this->getId();
+           msg << id;
+           const std::list<int>& ranks = contextClientTmp->getRanksServerLeader();
+           for (std::list<int>::const_iterator itRank = ranks.begin(), itRankEnd = ranks.end(); itRank != itRankEnd; ++itRank)
+             event.push(*itRank,1,msg);
+           contextClientTmp->sendEvent(event);
+         }
+         else contextClientTmp->sendEvent(event);
+      }
+    }
+  }
+
+  template<class T>
+  void CObjectTemplate<T>::sendAddItem(const StdString& id, int itemType, CContextClient* client)
+  {
+    typedef typename T::EEventId ItemType;
+     CEventClient event(this->getType(),ItemType(itemType));
+     if (client->isServerLeader())
+     {
+       CMessage msg;
+       msg << this->getId();
+       msg << id;
+       const std::list<int>& ranks = client->getRanksServerLeader();
+       for (std::list<int>::const_iterator itRank = ranks.begin(), itRankEnd = ranks.end(); itRank != itRankEnd; ++itRank)
+         event.push(*itRank,1,msg);
+       client->sendEvent(event);
+     }
+     else client->sendEvent(event);
+  }
+
+  template <class T>
+  void CObjectTemplate<T>::recvAttributFromClient(CEventServer& event)
+  {
+
+    CBufferIn* buffer=event.subEvents.begin()->buffer;
+    string id,attrId;
+    *buffer>>id;
+    CAttributeMap & attrMap = *get(id);
+    *buffer>>attrId;
+    CAttribute* attr=attrMap[attrId];
+    info(50) << "attribut recu " << attrId << "  ";
+    if (attr->isEmpty()) info(50) << "--> empty" << endl;
+    else info(50) /*<attr->getValue()*/ << endl;
+    *buffer>>*attr;
+     info(50) << "attribut recu " << attrId << "  ";
+    if (attr->isEmpty()) info(50) << "--> empty" << endl;
+    else info(50) /*attr->getValue()*/ << endl;
+  }
+
+   template <class T>
+   bool CObjectTemplate<T>::dispatchEvent(CEventServer& event)
+   {
+      switch(event.type)
+      {
+         case EVENT_ID_SEND_ATTRIBUTE :
+           recvAttributFromClient(event);
+           return true;
+           break;
+
+         default :
+         return false;
+//           ERROR("void CObjectTemplate<T>::recvEvent(CEventServer& event)", << "Unknown Event");
+      }
+   }
+
+   template <typename T>
+   bool CObjectTemplate<T>::has(const string & id)
+   {
+     return CObjectFactory::HasObject<T>(id);
+   }
+
+   template <typename T>
+   bool CObjectTemplate<T>::has(const string& contextId, const string & id)
+   {
+     return CObjectFactory::HasObject<T>(contextId,id);
+   }
+
+   template <typename T>
+   T* CObjectTemplate<T>::get(const string & id)
+   {
+     return CObjectFactory::GetObject<T>(id).get();
+   }
+
+   template <typename T>
+   T* CObjectTemplate<T>::get(const T* ptr)
+   {
+     return CObjectFactory::GetObject<T>(ptr).get();
+   }
+
+   template <typename T>
+   std::shared_ptr<T> CObjectTemplate<T>::getShared(const T* ptr)
+   {
+     return CObjectFactory::GetObject<T>(ptr);
+   }
+
+   template <typename T>
+   std::shared_ptr<T> CObjectTemplate<T>::getShared(void)
+   {
+     return CObjectFactory::GetObject<T>((T*)this);
+   }
+
+   template <typename T>
+   const vector<T*> CObjectTemplate<T>::getAll()
+   {
+     const vector< std::shared_ptr<T> >& shared_vect= CObjectFactory::GetObjectVector<T>();
+     vector<T*> vect;
+
+     typename vector<std::shared_ptr<T> >::const_iterator it;
+     for(it=shared_vect.begin();it!=shared_vect.end();++it) vect.push_back(it->get());
+     return vect;
+   }
+
+   template <typename T>
+   const vector<T*> CObjectTemplate<T>::getAll(const string & id)
+   {
+     const vector< std::shared_ptr<T> >& shared_vect= CObjectFactory::GetObjectVector<T>(id);
+     vector<T*> vect;
+
+     typename vector<std::shared_ptr<T> >::const_iterator it;
+     for(it=shared_vect.begin();it!=shared_vect.end();++it) vect.push_back(it->get());
+     return vect;
+   }
+
+   template <typename T>
+   T* CObjectTemplate<T>::get(const string& contextId, const string & id)
+   {
+     return CObjectFactory::GetObject<T>(contextId,id).get();
+   }
+
+   template <typename T>
+   T* CObjectTemplate<T>::create(const string & id)
+   {
+     return CObjectFactory::CreateObject<T>(id).get();
+   }   ///--------------------------------------------------------------
+
+  template <typename T>
+  T* CObjectTemplate<T>::get(void)
+  {
+    return CObjectFactory::GetObject<T>((T*)this).get();
+  }
+
+   template <typename T>
+   void CObjectTemplate<T>::generateCInterface(ostream& oss)
+   {
+     string className=getName();
+     int found=className.rfind("_group");
+     if (found!=string::npos) className.replace(found,1,0,'x');
+
+     oss << "/* ************************************************************************** *" << iendl;
+     oss << " *               Interface auto generated - do not modify                     *" << iendl;
+     oss << " * ************************************************************************** */" << iendl;
+     oss << iendl;
+     oss << "#include <boost/multi_array.hpp>" << iendl;
+     oss << "#include \"xios.hpp\"" << iendl;
+     oss << "#include \"attribute_template.hpp\"" << iendl;
+     oss << "#include \"object_template.hpp\"" << iendl;
+     oss << "#include \"group_template.hpp\"" << iendl;
+     oss << "#include \"icutil.hpp\"" << iendl;
+     oss << "#include \"icdate.hpp\"" << iendl;
+     oss << "#include \"timer.hpp\"" << iendl;
+     oss << "#include \"node_type.hpp\"" << iendl;
+     oss << iendl;
+     oss << "extern \"C\"" << iendl;
+     oss << "{" << iendl++;
+     oss << "typedef xios::" << getStrType<T>() << "* " << className << "_Ptr;";
+     SuperClassMap::generateCInterface(oss,className);
+     oss << "}" << iendl--;
+   }
+
+   template <typename T>
+   void CObjectTemplate<T>::generateFortran2003Interface(ostream& oss)
+   {
+     string className=getName();
+     int found=className.rfind("_group");
+     if (found!=string::npos) className.replace(found,1,0,'x');
+
+     oss << "! * ************************************************************************** *" << iendl;
+     oss << "! *               Interface auto generated - do not modify                     *" << iendl;
+     oss << "! * ************************************************************************** *" << iendl;
+     oss << "#include \"../fortran/xios_fortran_prefix.hpp\"" << iendl;
+     oss << iendl;
+     oss << "MODULE " << className << "_interface_attr" << iendl++;
+     oss << "USE, INTRINSIC :: ISO_C_BINDING" << std::endl;
+     oss << iendl;
+     oss << "INTERFACE" << iendl++;
+     oss << "! Do not call directly / interface FORTRAN 2003 <-> C99";
+     SuperClassMap::generateFortran2003Interface(oss, className);
+     oss << iendl--;
+     oss << "END INTERFACE" << iendl--;
+     oss << iendl;
+     oss << "END MODULE " << className << "_interface_attr" << iendl;
+   }
+
+   template <typename T>
+   void CObjectTemplate<T>::generateFortranInterface(ostream& oss)
+   {
+     string className=getName();
+     int found=className.rfind("_group");
+     if (found!=string::npos) className.erase(found,1);
+     string superClassName=getName();
+     found=superClassName.find("_group");
+     if (found!=string::npos) superClassName.erase(found,6);
+
+     oss << "! * ************************************************************************** *" << iendl;
+     oss << "! *               Interface auto generated - do not modify                     *" << iendl;
+     oss << "! * ************************************************************************** *" << iendl;
+     oss << "#include \"xios_fortran_prefix.hpp\"" << iendl;
+     oss << iendl;
+     oss << "MODULE i" << className << "_attr" << iendl++;
+     oss << "USE, INTRINSIC :: ISO_C_BINDING" << iendl;
+     oss << "USE i" << superClassName << iendl;
+     oss << "USE " << className << "_interface_attr" << iendl--;
+//   oss << "TYPE txios(" << className << ")" << iendl;
+//   oss << "  INTEGER(kind = C_INTPTR_T) :: daddr" << iendl;
+//   oss << "END TYPE txios(" << className << ")" << iendl;
+     oss << iendl;
+     oss << "CONTAINS" << iendl;
+     oss << iendl++;
+     SuperClassMap::generateFortranInterface_id(oss,className);
+     oss << iendl;
+     SuperClassMap::generateFortranInterface_hdl(oss,className);
+     oss << iendl;
+     SuperClassMap::generateFortranInterface_hdl_(oss,className);
+     oss << iendl;
+     SuperClassMap::generateFortranInterfaceGet_id(oss,className);
+     oss << iendl;
+     SuperClassMap::generateFortranInterfaceGet_hdl(oss,className);
+     oss << iendl;
+     SuperClassMap::generateFortranInterfaceGet_hdl_(oss,className);
+     oss << iendl;
+     SuperClassMap::generateFortranInterfaceIsDefined_id(oss,className);
+     oss << iendl;
+     SuperClassMap::generateFortranInterfaceIsDefined_hdl(oss,className);
+     oss << iendl;
+     SuperClassMap::generateFortranInterfaceIsDefined_hdl_(oss,className);
+     oss << iendl--;
+     oss << "END MODULE i" << className << "_attr" << iendl;
+   }
+} // namespace xios
+
+#endif // __XIOS_CObjectTemplate_impl__
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/parse_expr/filter_expr_node.cpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/parse_expr/filter_expr_node.cpp	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/parse_expr/filter_expr_node.cpp	(revision 1749)
@@ -0,0 +1,308 @@
+#include "filter_expr_node.hpp"
+#include "unary_arithmetic_filter.hpp"
+#include "binary_arithmetic_filter.hpp"
+#include "ternary_arithmetic_filter.hpp"
+#include "field.hpp"
+
+namespace xios
+{
+  CFilterFieldExprNode::CFilterFieldExprNode(const std::string& fieldId)
+    : fieldId(fieldId)
+  { /* Nothing to do */ }
+
+  
+  std::shared_ptr<COutputPin> CFilterFieldExprNode::reduce(CGarbageCollector& gc, CField& thisField) const
+  {
+    std::shared_ptr<COutputPin> outputPin;
+
+    if (fieldId == "this") outputPin = thisField.getSelfReference(gc);
+    else
+    {
+      string id ;
+
+      if (fieldId == "this_ref")
+      {
+        if (thisField.field_ref.isEmpty())
+        {
+          ERROR("shared_ptr<COutputPin> CFilterFieldExprNode::reduce(CGarbageCollector& gc, CField& thisField) const",
+                << "field_ref attribute is empty.");
+        }
+        else id = thisField.field_ref ;
+      }
+      else id= fieldId ;
+       
+      if (CField::has(id))
+      {
+        CField* field = CField::get(id);
+        if (field == &thisField)
+          ERROR("shared_ptr<COutputPin> CFilterFieldExprNode::reduce(CGarbageCollector& gc, CField& thisField) const",
+                << "The field " << id << " has an invalid reference to itself. "
+                << "Use the keyword \"this\" if you want to reference the input data sent to this field.");
+
+        field->buildFilterGraph(gc, false);
+        outputPin = field->getInstantDataFilter();
+      }
+      else ERROR("boost::shared_ptr<COutputPin> CFilterFieldExprNode::reduce(CGarbageCollector& gc, CField& thisField) const",
+                  << "The field " << id << " does not exist.");
+    }
+    return outputPin;
+  }
+
+
+  CFilterTemporalFieldExprNode::CFilterTemporalFieldExprNode(const std::string& fieldId)
+    : fieldId(fieldId)
+  { /* Nothing to do */ }
+
+
+  std::shared_ptr<COutputPin> CFilterTemporalFieldExprNode::reduce(CGarbageCollector& gc, CField& thisField) const
+  {
+    std::shared_ptr<COutputPin> outputPin;
+
+    if (fieldId == "this")
+      outputPin = thisField.getSelfTemporalDataFilter(gc, thisField.freq_op.isEmpty() ? TimeStep : thisField.freq_op);
+    else
+    {
+      string id ;
+
+      if (fieldId == "this_ref")
+      {
+        if (thisField.field_ref.isEmpty())
+        {
+          ERROR("shared_ptr<COutputPin> CFilterFieldExprNode::reduce(CGarbageCollector& gc, CField& thisField) const",
+                << "field_ref attribute is empty.");
+        }
+        else id = thisField.field_ref ;
+      }
+      else id = fieldId ;
+
+      if (CField::has(id))
+      {
+        CField* field = CField::get(id);
+        if (field == &thisField)
+          ERROR("shared_ptr<COutputPin> CFilterTemporalFieldExprNode::reduce(CGarbageCollector& gc, CField& thisField) const",
+                << "The field " << fieldId << " has an invalid reference to itself. "
+                << "Use the keyword \"this\" if you want to reference the input data sent to this field.");
+
+        field->buildFilterGraph(gc, false);
+        outputPin = field->getTemporalDataFilter(gc, thisField.freq_op.isEmpty() ? TimeStep : thisField.freq_op);
+      }
+      else
+        ERROR("shared_ptr<COutputPin> CFilterTemporalFieldExprNode::reduce(CGarbageCollector& gc, CField& thisField) const",
+              << "The field " << fieldId << " does not exist.");
+    }
+    return outputPin;
+  }
+
+
+  CFilterUnaryOpExprNode::CFilterUnaryOpExprNode(const std::string& opId, IFilterExprNode* child)
+    : opId(opId)
+    , child(child)
+  {
+    if (!child)
+      ERROR("CFilterUnaryOpExprNode::CFilterUnaryOpExprNode(const std::string& opId, IFilterExprNode* child)",
+            "Impossible to create the new expression node, an invalid child node was provided.");
+  }
+
+  std::shared_ptr<COutputPin> CFilterUnaryOpExprNode::reduce(CGarbageCollector& gc, CField& thisField) const
+  {
+    std::shared_ptr<CUnaryArithmeticFilter> filter(new CUnaryArithmeticFilter(gc, opId));
+    child->reduce(gc, thisField)->connectOutput(filter, 0);
+    return filter;
+  }
+
+  CFilterScalarFieldOpExprNode::CFilterScalarFieldOpExprNode(IScalarExprNode* child1, const std::string& opId, IFilterExprNode* child2)
+    : child1(child1)
+    , opId(opId)
+    , child2(child2)
+  {
+    if (!child1 || !child2)
+      ERROR("CFilterScalarFieldOpExprNode::CFilterScalarFieldOpExprNode(IScalarExprNode* child1, const std::string& opId, IFilterExprNode* child2)",
+            "Impossible to create the new expression node, an invalid child node was provided.");
+  }
+
+  std::shared_ptr<COutputPin> CFilterScalarFieldOpExprNode::reduce(CGarbageCollector& gc, CField& thisField) const
+  {
+    std::shared_ptr<CScalarFieldArithmeticFilter> filter(new CScalarFieldArithmeticFilter(gc, opId, child1->reduce()));
+    child2->reduce(gc, thisField)->connectOutput(filter, 0);
+    return filter;
+  }
+
+  CFilterFieldScalarOpExprNode::CFilterFieldScalarOpExprNode(IFilterExprNode* child1, const std::string& opId, IScalarExprNode* child2)
+    : child1(child1)
+    , opId(opId)
+    , child2(child2)
+  {
+    if (!child1 || !child2)
+      ERROR("CFilterFieldScalarOpExprNode::CFilterFieldScalarOpExprNode(IFilterExprNode* child1, const std::string& opId, IScalarExprNode* child2)",
+            "Impossible to create the new expression node, an invalid child node was provided.");
+  }
+
+  std::shared_ptr<COutputPin> CFilterFieldScalarOpExprNode::reduce(CGarbageCollector& gc, CField& thisField) const
+  {
+    std::shared_ptr<CFieldScalarArithmeticFilter> filter(new CFieldScalarArithmeticFilter(gc, opId, child2->reduce()));
+    child1->reduce(gc, thisField)->connectOutput(filter, 0);
+    return filter;
+  }
+
+  CFilterFieldFieldOpExprNode::CFilterFieldFieldOpExprNode(IFilterExprNode* child1, const std::string& opId, IFilterExprNode* child2)
+    : child1(child1)
+    , opId(opId)
+    , child2(child2)
+  {
+    if (!child1 || !child2)
+      ERROR("CFilterFieldFieldOpExprNode::CFilterFieldFieldOpExprNode(IFilterExprNode* child1, const std::string& opId, IFilterExprNode* child2)",
+            "Impossible to create the new expression node, an invalid child node was provided.");
+  }
+
+  std::shared_ptr<COutputPin> CFilterFieldFieldOpExprNode::reduce(CGarbageCollector& gc, CField& thisField) const
+  {
+    std::shared_ptr<CFieldFieldArithmeticFilter> filter(new CFieldFieldArithmeticFilter(gc, opId));
+    child1->reduce(gc, thisField)->connectOutput(filter, 0);
+    child2->reduce(gc, thisField)->connectOutput(filter, 1);
+    return filter;
+  }
+
+
+
+
+  CFilterScalarScalarFieldOpExprNode::CFilterScalarScalarFieldOpExprNode(IScalarExprNode* child1, const std::string& opId, IScalarExprNode* child2, IFilterExprNode* child3)
+    : child1(child1)
+    , opId(opId)
+    , child2(child2)
+    , child3(child3)
+  {
+    if (!child1 || !child2 || !child3)
+      ERROR("  CFilterScalarScalarFieldOpExprNode::CFilterScalarScalarFieldOpExprNode(IScalarExprNode* child1, const std::string& opId, IScalarExprNode* child2, IFilterExprNode* child3)",
+            "Impossible to create the new expression node, an invalid child node was provided.");
+  }
+
+  std::shared_ptr<COutputPin> CFilterScalarScalarFieldOpExprNode::reduce(CGarbageCollector& gc, CField& thisField) const
+  {
+    std::shared_ptr<CScalarScalarFieldArithmeticFilter> filter(new CScalarScalarFieldArithmeticFilter(gc, opId, child1->reduce(),child2->reduce()));
+    child3->reduce(gc, thisField)->connectOutput(filter, 0);
+    return filter;
+  }
+
+
+  CFilterScalarFieldScalarOpExprNode::CFilterScalarFieldScalarOpExprNode(IScalarExprNode* child1, const std::string& opId, IFilterExprNode* child2, IScalarExprNode* child3)
+    : child1(child1)
+    , opId(opId)
+    , child2(child2)
+    , child3(child3)
+  {
+    if (!child1 || !child2 || !child3)
+      ERROR("  CFilterScalarFieldScalarOpExprNode::CFilterScalarFieldScalarOpExprNode(IScalarExprNode* child1, const std::string& opId, IFilterExprNode* child2, IScalarExprNode* child3)",
+            "Impossible to create the new expression node, an invalid child node was provided.");
+  }
+
+  std::shared_ptr<COutputPin> CFilterScalarFieldScalarOpExprNode::reduce(CGarbageCollector& gc, CField& thisField) const
+  {
+    std::shared_ptr<CScalarFieldScalarArithmeticFilter> filter(new CScalarFieldScalarArithmeticFilter(gc, opId, child1->reduce(),child3->reduce()));
+    child2->reduce(gc, thisField)->connectOutput(filter, 0);
+    return filter;
+  }
+
+
+  CFilterScalarFieldFieldOpExprNode::CFilterScalarFieldFieldOpExprNode(IScalarExprNode* child1, const std::string& opId, IFilterExprNode* child2, IFilterExprNode* child3)
+    : child1(child1)
+    , opId(opId)
+    , child2(child2)
+    , child3(child3)
+  {
+    if (!child1 || !child2 || !child3)
+      ERROR("  CFilterScalarFieldFieldOpExprNode::CFilterScalarFieldFieldOpExprNode(IScalarExprNode* child1, const std::string& opId, IFilterExprNode* child2, IFilterExprNode* child3)",
+            "Impossible to create the new expression node, an invalid child node was provided.");
+  }
+
+  std::shared_ptr<COutputPin> CFilterScalarFieldFieldOpExprNode::reduce(CGarbageCollector& gc, CField& thisField) const
+  {
+    std::shared_ptr<CScalarFieldFieldArithmeticFilter> filter(new CScalarFieldFieldArithmeticFilter(gc, opId, child1->reduce()));
+    child2->reduce(gc, thisField)->connectOutput(filter, 0);
+    child3->reduce(gc, thisField)->connectOutput(filter, 1);
+    return filter;
+  }
+
+
+
+  CFilterFieldScalarScalarOpExprNode::CFilterFieldScalarScalarOpExprNode(IFilterExprNode* child1, const std::string& opId, IScalarExprNode* child2, IScalarExprNode* child3)
+    : child1(child1)
+    , opId(opId)
+    , child2(child2)
+    , child3(child3)
+  {
+    if (!child1 || !child2 || !child3)
+      ERROR("  CFilterFieldScalarScalarOpExprNode::CFilterFieldScalarScalarOpExprNode(IFilterExprNode* child1, const std::string& opId, IScalarExprNode* child2, IScalarExprNode* child3)",
+            "Impossible to create the new expression node, an invalid child node was provided.");
+  }
+
+  std::shared_ptr<COutputPin> CFilterFieldScalarScalarOpExprNode::reduce(CGarbageCollector& gc, CField& thisField) const
+  {
+    std::shared_ptr<CFieldScalarScalarArithmeticFilter> filter(new CFieldScalarScalarArithmeticFilter(gc, opId, child2->reduce(),child3->reduce()));
+    child1->reduce(gc, thisField)->connectOutput(filter, 0);
+    return filter;
+  }
+
+
+
+  CFilterFieldScalarFieldOpExprNode::CFilterFieldScalarFieldOpExprNode(IFilterExprNode* child1, const std::string& opId, IScalarExprNode* child2, IFilterExprNode* child3)
+    : child1(child1)
+    , opId(opId)
+    , child2(child2)
+    , child3(child3)
+  {
+    if (!child1 || !child2 || !child3)
+      ERROR("  CFilterFieldScalarFieldOpExprNode::CFilterFieldScalarFieldOpExprNode(IFilterExprNode* child1, const std::string& opId, IScalarExprNode* child2, IFilterExprNode* child3)",
+            "Impossible to create the new expression node, an invalid child node was provided.");
+  }
+
+  std::shared_ptr<COutputPin> CFilterFieldScalarFieldOpExprNode::reduce(CGarbageCollector& gc, CField& thisField) const
+  {
+    std::shared_ptr<CFieldScalarFieldArithmeticFilter> filter(new CFieldScalarFieldArithmeticFilter(gc, opId, child2->reduce()));
+    child1->reduce(gc, thisField)->connectOutput(filter, 0);
+    child3->reduce(gc, thisField)->connectOutput(filter, 1);
+    return filter;
+  }
+
+
+
+  CFilterFieldFieldScalarOpExprNode::CFilterFieldFieldScalarOpExprNode(IFilterExprNode* child1, const std::string& opId, IFilterExprNode* child2, IScalarExprNode* child3)
+    : child1(child1)
+    , opId(opId)
+    , child2(child2)
+    , child3(child3)
+  {
+    if (!child1 || !child2 || !child3)
+      ERROR("  CFilterFieldFieldScalarOpExprNode::CFilterFieldFieldScalarOpExprNode(IFilterExprNode* child1, const std::string& opId, IFilterExprNode* child2, IScalarExprNode* child3)",
+            "Impossible to create the new expression node, an invalid child node was provided.");
+  }
+
+  std::shared_ptr<COutputPin> CFilterFieldFieldScalarOpExprNode::reduce(CGarbageCollector& gc, CField& thisField) const
+  {
+    std::shared_ptr<CFieldFieldScalarArithmeticFilter> filter(new CFieldFieldScalarArithmeticFilter(gc, opId, child3->reduce()));
+    child1->reduce(gc, thisField)->connectOutput(filter, 0);
+    child2->reduce(gc, thisField)->connectOutput(filter, 1);
+    return filter;
+  }
+
+
+  CFilterFieldFieldFieldOpExprNode::CFilterFieldFieldFieldOpExprNode(IFilterExprNode* child1, const std::string& opId, IFilterExprNode* child2, IFilterExprNode* child3)
+    : child1(child1)
+    , opId(opId)
+    , child2(child2)
+    , child3(child3)
+  {
+    if (!child1 || !child2 || !child3)
+      ERROR("  CFilterFieldFieldFieldOpExprNode::CFilterFieldFieldFieldOpExprNode(IFilterExprNode* child1, const std::string& opId, IFilterExprNode* child2, IFilterExprNode* child3)",
+            "Impossible to create the new expression node, an invalid child node was provided.");
+  }
+
+  std::shared_ptr<COutputPin> CFilterFieldFieldFieldOpExprNode::reduce(CGarbageCollector& gc, CField& thisField) const
+  {
+    std::shared_ptr<CFieldFieldFieldArithmeticFilter> filter(new CFieldFieldFieldArithmeticFilter(gc, opId));
+    child1->reduce(gc, thisField)->connectOutput(filter, 0);
+    child2->reduce(gc, thisField)->connectOutput(filter, 1);
+    child3->reduce(gc, thisField)->connectOutput(filter, 2);
+    return filter;
+  }
+  
+}
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/parse_expr/filter_expr_node.hpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/parse_expr/filter_expr_node.hpp	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/parse_expr/filter_expr_node.hpp	(revision 1749)
@@ -0,0 +1,379 @@
+#ifndef __XIOS_FILTER_EXPR_NODE_HPP__
+#define __XIOS_FILTER_EXPR_NODE_HPP__
+
+#include <string>
+#include <boost/smart_ptr/scoped_ptr.hpp>
+#include "scalar_expr_node.hpp"
+
+namespace xios
+{
+  class COutputPin;
+  class CGarbageCollector;
+  class CField;
+
+  /*!
+   * Interface implemented by all the nodes of a tree representing an expression
+   * which can be transformed into a filter graph representation.
+   */
+  struct IFilterExprNode 
+  {
+    /*!
+     * Builds a filter graph corresponding to the expression tree.
+     *
+     * \param gc the garbage collector to associated with the filter graph
+     * \param thisField the field to which the expression is attached
+     * \return the output pin of the filter producing the result of the expression 
+     */
+    virtual std::shared_ptr<COutputPin> reduce(CGarbageCollector& gc, CField& thisField) const = 0;
+  };
+
+  /*!
+   * Expression node corresponding to a field.
+   */
+  class CFilterFieldExprNode : public IFilterExprNode
+  {
+    public:
+      /*!
+       * Constructs an expression node corresponding
+       * to the field whose id is provided.
+       *
+       * \param fieldId the identifier of the field
+       */
+      CFilterFieldExprNode(const std::string& fieldId);
+
+      virtual std::shared_ptr<COutputPin> reduce(CGarbageCollector& gc, CField& thisField) const;
+
+    private:
+      std::string fieldId; //!< The identifier of the field
+  };
+
+  /*!
+   * Expression node corresponding to a field for which the result of
+   * the temporal operation is requested instead of the instant value.
+   */
+  class CFilterTemporalFieldExprNode : public IFilterExprNode
+  {
+    public:
+      /*!
+       * Constructs an expression node corresponding
+       * to the field whose id is provided.
+       *
+       * \param fieldId the identifier of the field
+       */
+      CFilterTemporalFieldExprNode(const std::string& fieldId);
+
+      virtual std::shared_ptr<COutputPin> reduce(CGarbageCollector& gc, CField& thisField) const;
+
+    private:
+      std::string fieldId; //!< The identifier of the field
+  };
+
+  /*!
+   * Expression node corresponding to a unary operation on a field.
+   */
+  class CFilterUnaryOpExprNode : public IFilterExprNode
+  {
+    public:
+      /*!
+       * Constructs an expression node corresponding to the specified unary operation
+       * applied to the provided child node.
+       * Note that the child node will be destroyed automatically when the parent node
+       * is destroyed.
+       *
+       * \param opId the identifier of the operator
+       * \param child the child node to which the operator is applied
+       */
+      CFilterUnaryOpExprNode(const std::string& opId, IFilterExprNode* child);
+
+      virtual std::shared_ptr<COutputPin> reduce(CGarbageCollector& gc, CField& thisField) const;
+
+    private:
+      std::string opId; //!< The identifier of the field
+      boost::scoped_ptr<IFilterExprNode> child; //!< The child node to which the operator is applied
+  };
+
+  /*!
+   * Expression node corresponding to a binary operation on a scalar and a field.
+   */
+  class CFilterScalarFieldOpExprNode : public IFilterExprNode
+  {
+    public:
+      /*!
+       * Constructs an expression node corresponding to the specified binary operation
+       * applied to the provided scalar and field child nodes.
+       * Note that the child nodes will be destroyed automatically when the parent node
+       * is destroyed.
+       *
+       * \param child1 the scalar child node to which the operator is applied
+       * \param opId the identifier of the operator
+       * \param child2 the field child node to which the operator is applied
+       */
+      CFilterScalarFieldOpExprNode(IScalarExprNode* child1, const std::string& opId, IFilterExprNode* child2);
+
+      virtual std::shared_ptr<COutputPin> reduce(CGarbageCollector& gc, CField& thisField) const;
+
+    private:
+      std::string opId; //!< The identifier of the field
+      boost::scoped_ptr<IScalarExprNode> child1; //!< The scalar child node to which the operator is applied
+      boost::scoped_ptr<IFilterExprNode> child2; //!< The field child node to which the operator is applied
+  };
+
+  /*!
+   * Expression node corresponding to a binary operation on a field and a scalar.
+   */
+  class CFilterFieldScalarOpExprNode : public IFilterExprNode
+  {
+    public:
+      /*!
+       * Constructs an expression node corresponding to the specified binary operation
+       * applied to the provided field and scalar child nodes.
+       * Note that the child nodes will be destroyed automatically when the parent node
+       * is destroyed.
+       *
+       * \param child1 the field child node to which the operator is applied
+       * \param opId the identifier of the operator
+       * \param child2 the scalar child node to which the operator is applied
+       */
+      CFilterFieldScalarOpExprNode(IFilterExprNode* child1, const std::string& opId, IScalarExprNode* child2);
+
+      virtual std::shared_ptr<COutputPin> reduce(CGarbageCollector& gc, CField& thisField) const;
+
+    private:
+      std::string opId; //!< The identifier of the field
+      boost::scoped_ptr<IFilterExprNode> child1; //!< The field child node to which the operator is applied
+      boost::scoped_ptr<IScalarExprNode> child2; //!< The scalar child node to which the operator is applied
+  };
+
+  /*!
+   * Expression node corresponding to a binary operation on two fields.
+   */
+  class CFilterFieldFieldOpExprNode : public IFilterExprNode
+  {
+    public:
+      /*!
+       * Constructs an expression node corresponding to the specified binary operation
+       * applied to the provided field child nodes.
+       * Note that the child nodes will be destroyed automatically when the parent node
+       * is destroyed.
+       *
+       * \param opId the identifier of the operator
+       * \param child1, child2 the field child nodes to which the operator is applied
+       */
+      CFilterFieldFieldOpExprNode(IFilterExprNode* child1, const std::string& opId, IFilterExprNode* child2);
+
+      virtual std::shared_ptr<COutputPin> reduce(CGarbageCollector& gc, CField& thisField) const;
+
+    private:
+      std::string opId; //!< The identifier of the field
+      boost::scoped_ptr<IFilterExprNode> child1, child2; //!< The field child nodes to which the operator is applied
+  };
+
+
+
+ /*!
+   * Expression node corresponding to a ternary operation on a scalar-scalar-field.
+   */
+  class CFilterScalarScalarFieldOpExprNode : public IFilterExprNode
+  {
+    public:
+      /*!
+       * Constructs an expression node corresponding to the specified ternary operation
+       * applied to the provided fields and scalars child nodes.
+       * Note that the child nodes will be destroyed automatically when the parent node
+       * is destroyed.
+       *
+       * \param child1 the scalar child node to which the operator is applied
+       * \param opId the identifier of the operator
+       * \param child2 the scalar child node to which the operator is applied
+       * \param child3 the field child node to which the operator is applied
+      */
+      CFilterScalarScalarFieldOpExprNode(IScalarExprNode* child1, const std::string& opId, IScalarExprNode* child2, IFilterExprNode* child3);
+
+      virtual std::shared_ptr<COutputPin> reduce(CGarbageCollector& gc, CField& thisField) const;
+
+    private:
+      std::string opId; //!< The identifier of the field
+      boost::scoped_ptr<IScalarExprNode> child1; //!< The scalar child node to which the operator is applied
+      boost::scoped_ptr<IScalarExprNode> child2; //!< The scalar child node to which the operator is applied
+      boost::scoped_ptr<IFilterExprNode> child3; //!< The field child node to which the operator is applied
+  };
+
+
+  /*!
+   * Expression node corresponding to a ternary operation on a scalar-field-scalar.
+   */
+  class CFilterScalarFieldScalarOpExprNode : public IFilterExprNode
+  {
+    public:
+      /*!
+       * Constructs an expression node corresponding to the specified ternary operation
+       * applied to the provided fields and scalars child nodes.
+       * Note that the child nodes will be destroyed automatically when the parent node
+       * is destroyed.
+       *
+       * \param child1 the scalar child node to which the operator is applied
+       * \param opId the identifier of the operator
+       * \param child2 the field child node to which the operator is applied
+       * \param child3 the scalar child node to which the operator is applied
+      */
+      CFilterScalarFieldScalarOpExprNode(IScalarExprNode* child1, const std::string& opId, IFilterExprNode* child2, IScalarExprNode* child3);
+
+      virtual std::shared_ptr<COutputPin> reduce(CGarbageCollector& gc, CField& thisField) const;
+
+    private:
+      std::string opId; //!< The identifier of the field
+      boost::scoped_ptr<IScalarExprNode> child1; //!< The scalar child node to which the operator is applied
+      boost::scoped_ptr<IFilterExprNode> child2; //!< The field child node to which the operator is applied
+      boost::scoped_ptr<IScalarExprNode> child3; //!< The scalar child node to which the operator is applied
+  };
+
+
+  /*!
+   * Expression node corresponding to a ternary operation on a scalar-field-field.
+   */
+  class CFilterScalarFieldFieldOpExprNode : public IFilterExprNode
+  {
+    public:
+      /*!
+       * Constructs an expression node corresponding to the specified ternary operation
+       * applied to the provided fields and scalars child nodes.
+       * Note that the child nodes will be destroyed automatically when the parent node
+       * is destroyed.
+       *
+       * \param child1 the scalar child node to which the operator is applied
+       * \param opId the identifier of the operator
+       * \param child2 the field child node to which the operator is applied
+       * \param child3 the field child node to which the operator is applied
+      */
+      CFilterScalarFieldFieldOpExprNode(IScalarExprNode* child1, const std::string& opId, IFilterExprNode* child2, IFilterExprNode* child3);
+
+      virtual std::shared_ptr<COutputPin> reduce(CGarbageCollector& gc, CField& thisField) const;
+
+    private:
+      std::string opId; //!< The identifier of the field
+      boost::scoped_ptr<IScalarExprNode> child1; //!< The scalar child node to which the operator is applied
+      boost::scoped_ptr<IFilterExprNode> child2; //!< The field child node to which the operator is applied
+      boost::scoped_ptr<IFilterExprNode> child3; //!< The field child node to which the operator is applied
+  };
+
+
+
+/*!
+   * Expression node corresponding to a ternary operation on a field-scalar-scalar.
+   */
+  class CFilterFieldScalarScalarOpExprNode : public IFilterExprNode
+  {
+    public:
+      /*!
+       * Constructs an expression node corresponding to the specified ternary operation
+       * applied to the provided fields and scalars child nodes.
+       * Note that the child nodes will be destroyed automatically when the parent node
+       * is destroyed.
+       *
+       * \param child1 the field child node to which the operator is applied
+       * \param opId the identifier of the operator
+       * \param child2 the scalar child node to which the operator is applied
+       * \param child3 the scalar child node to which the operator is applied
+      */
+      CFilterFieldScalarScalarOpExprNode(IFilterExprNode* child1, const std::string& opId, IScalarExprNode* child2, IScalarExprNode* child3);
+
+      virtual std::shared_ptr<COutputPin> reduce(CGarbageCollector& gc, CField& thisField) const;
+
+    private:
+      std::string opId; //!< The identifier of the field
+      boost::scoped_ptr<IFilterExprNode> child1; //!< The field child node to which the operator is applied
+      boost::scoped_ptr<IScalarExprNode> child2; //!< The scalar child node to which the operator is applied
+      boost::scoped_ptr<IScalarExprNode> child3; //!< The scalar child node to which the operator is applied
+  };
+
+
+/*!
+   * Expression node corresponding to a ternary operation on a field-scalar-field.
+   */
+  class CFilterFieldScalarFieldOpExprNode : public IFilterExprNode
+  {
+    public:
+      /*!
+       * Constructs an expression node corresponding to the specified ternary operation
+       * applied to the provided fields and scalars child nodes.
+       * Note that the child nodes will be destroyed automatically when the parent node
+       * is destroyed.
+       *
+       * \param child1 the field child node to which the operator is applied
+       * \param opId the identifier of the operator
+       * \param child2 the scalar child node to which the operator is applied
+       * \param child3 the field child node to which the operator is applied
+      */
+      CFilterFieldScalarFieldOpExprNode(IFilterExprNode* child1, const std::string& opId, IScalarExprNode* child2, IFilterExprNode* child3);
+
+      virtual std::shared_ptr<COutputPin> reduce(CGarbageCollector& gc, CField& thisField) const;
+
+    private:
+      std::string opId; //!< The identifier of the field
+      boost::scoped_ptr<IFilterExprNode> child1; //!< The field child node to which the operator is applied
+      boost::scoped_ptr<IScalarExprNode> child2; //!< The scalar child node to which the operator is applied
+      boost::scoped_ptr<IFilterExprNode> child3; //!< The field child node to which the operator is applied
+  };
+
+  /*!
+   * Expression node corresponding to a ternary operation on a field-field-scalar.
+   */
+  class CFilterFieldFieldScalarOpExprNode : public IFilterExprNode
+  {
+    public:
+      /*!
+       * Constructs an expression node corresponding to the specified ternary operation
+       * applied to the provided fields and scalars child nodes.
+       * Note that the child nodes will be destroyed automatically when the parent node
+       * is destroyed.
+       *
+       * \param child1 the field child node to which the operator is applied
+       * \param opId the identifier of the operator
+       * \param child2 the field child node to which the operator is applied
+       * \param child3 the scalar child node to which the operator is applied
+      */
+      CFilterFieldFieldScalarOpExprNode(IFilterExprNode* child1, const std::string& opId, IFilterExprNode* child2, IScalarExprNode* child3);
+
+      virtual std::shared_ptr<COutputPin> reduce(CGarbageCollector& gc, CField& thisField) const;
+
+    private:
+      std::string opId; //!< The identifier of the field
+      boost::scoped_ptr<IFilterExprNode> child1; //!< The field child node to which the operator is applied
+      boost::scoped_ptr<IFilterExprNode> child2; //!< The field child node to which the operator is applied
+      boost::scoped_ptr<IScalarExprNode> child3; //!< The scalar child node to which the operator is applied
+  };
+
+
+  /*!
+   * Expression node corresponding to a ternary operation on a field-field-field.
+   */
+  class CFilterFieldFieldFieldOpExprNode : public IFilterExprNode
+  {
+    public:
+      /*!
+       * Constructs an expression node corresponding to the specified ternary operation
+       * applied to the provided fields and scalars child nodes.
+       * Note that the child nodes will be destroyed automatically when the parent node
+       * is destroyed.
+       *
+       * \param child1 the field child node to which the operator is applied
+       * \param opId the identifier of the operator
+       * \param child2 the field child node to which the operator is applied
+       * \param child3 the field child node to which the operator is applied
+      */
+      CFilterFieldFieldFieldOpExprNode(IFilterExprNode* child1, const std::string& opId, IFilterExprNode* child2, IFilterExprNode* child3);
+
+      virtual std::shared_ptr<COutputPin> reduce(CGarbageCollector& gc, CField& thisField) const;
+
+    private:
+      std::string opId; //!< The identifier of the field
+      boost::scoped_ptr<IFilterExprNode> child1; //!< The field child node to which the operator is applied
+      boost::scoped_ptr<IFilterExprNode> child2; //!< The field child node to which the operator is applied
+      boost::scoped_ptr<IFilterExprNode> child3; //!< The field child node to which the operator is applied
+  };
+
+
+
+}
+
+#endif // __XIOS_FILTER_EXPR_NODE_HPP__
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/parse_expr/generate_lex_yacc.sh
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/parse_expr/generate_lex_yacc.sh	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/parse_expr/generate_lex_yacc.sh	(revision 1749)
@@ -0,0 +1,2 @@
+bison --verbose -d yacc_parser.yacc -o yacc_parser.cpp
+flex -o lex_parser.cpp -f lex_parser.lex 
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/parse_expr/lex_parser.cpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/parse_expr/lex_parser.cpp	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/parse_expr/lex_parser.cpp	(revision 1749)
@@ -0,0 +1,2448 @@
+#line 2 "lex_parser.cpp"
+
+#line 4 "lex_parser.cpp"
+
+#define  YY_INT_ALIGNED short int
+
+/* A lexical scanner generated by flex */
+
+#define FLEX_SCANNER
+#define YY_FLEX_MAJOR_VERSION 2
+#define YY_FLEX_MINOR_VERSION 5
+#define YY_FLEX_SUBMINOR_VERSION 37
+#if YY_FLEX_SUBMINOR_VERSION > 0
+#define FLEX_BETA
+#endif
+
+/* First, we deal with  platform-specific or compiler-specific issues. */
+
+/* begin standard C headers. */
+#include <stdio.h>
+#include <string.h>
+#include <errno.h>
+#include <stdlib.h>
+
+/* end standard C headers. */
+
+/* flex integer type definitions */
+
+#ifndef FLEXINT_H
+#define FLEXINT_H
+
+/* C99 systems have <inttypes.h>. Non-C99 systems may or may not. */
+
+#if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
+
+/* C99 says to define __STDC_LIMIT_MACROS before including stdint.h,
+ * if you want the limit (max/min) macros for int types. 
+ */
+#ifndef __STDC_LIMIT_MACROS
+#define __STDC_LIMIT_MACROS 1
+#endif
+
+#include <inttypes.h>
+typedef int8_t flex_int8_t;
+typedef uint8_t flex_uint8_t;
+typedef int16_t flex_int16_t;
+typedef uint16_t flex_uint16_t;
+typedef int32_t flex_int32_t;
+typedef uint32_t flex_uint32_t;
+#else
+typedef signed char flex_int8_t;
+typedef short int flex_int16_t;
+typedef int flex_int32_t;
+typedef unsigned char flex_uint8_t; 
+typedef unsigned short int flex_uint16_t;
+typedef unsigned int flex_uint32_t;
+
+/* Limits of integral types. */
+#ifndef INT8_MIN
+#define INT8_MIN               (-128)
+#endif
+#ifndef INT16_MIN
+#define INT16_MIN              (-32767-1)
+#endif
+#ifndef INT32_MIN
+#define INT32_MIN              (-2147483647-1)
+#endif
+#ifndef INT8_MAX
+#define INT8_MAX               (127)
+#endif
+#ifndef INT16_MAX
+#define INT16_MAX              (32767)
+#endif
+#ifndef INT32_MAX
+#define INT32_MAX              (2147483647)
+#endif
+#ifndef UINT8_MAX
+#define UINT8_MAX              (255U)
+#endif
+#ifndef UINT16_MAX
+#define UINT16_MAX             (65535U)
+#endif
+#ifndef UINT32_MAX
+#define UINT32_MAX             (4294967295U)
+#endif
+
+#endif /* ! C99 */
+
+#endif /* ! FLEXINT_H */
+
+#ifdef __cplusplus
+
+/* The "const" storage-class-modifier is valid. */
+#define YY_USE_CONST
+
+#else	/* ! __cplusplus */
+
+/* C99 requires __STDC__ to be defined as 1. */
+#if defined (__STDC__)
+
+#define YY_USE_CONST
+
+#endif	/* defined (__STDC__) */
+#endif	/* ! __cplusplus */
+
+#ifdef YY_USE_CONST
+#define yyconst const
+#else
+#define yyconst
+#endif
+
+/* Returned upon end-of-file. */
+#define YY_NULL 0
+
+/* Promotes a possibly negative, possibly signed char to an unsigned
+ * integer for use as an array index.  If the signed char is negative,
+ * we want to instead treat it as an 8-bit unsigned char, hence the
+ * double cast.
+ */
+#define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c)
+
+/* Enter a start condition.  This macro really ought to take a parameter,
+ * but we do it the disgusting crufty way forced on us by the ()-less
+ * definition of BEGIN.
+ */
+#define BEGIN (yy_start) = 1 + 2 *
+
+/* Translate the current start state into a value that can be later handed
+ * to BEGIN to return to the state.  The YYSTATE alias is for lex
+ * compatibility.
+ */
+#define YY_START (((yy_start) - 1) / 2)
+#define YYSTATE YY_START
+
+/* Action number for EOF rule of a given start state. */
+#define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1)
+
+/* Special action meaning "start processing a new file". */
+#define YY_NEW_FILE yyrestart(yyin  )
+
+#define YY_END_OF_BUFFER_CHAR 0
+
+/* Size of default input buffer. */
+#ifndef YY_BUF_SIZE
+#define YY_BUF_SIZE 16384
+#endif
+
+/* The state buf must be large enough to hold one state per character in the main buffer.
+ */
+#define YY_STATE_BUF_SIZE   ((YY_BUF_SIZE + 2) * sizeof(yy_state_type))
+
+#ifndef YY_TYPEDEF_YY_BUFFER_STATE
+#define YY_TYPEDEF_YY_BUFFER_STATE
+typedef struct yy_buffer_state *YY_BUFFER_STATE;
+#endif
+
+#ifndef YY_TYPEDEF_YY_SIZE_T
+#define YY_TYPEDEF_YY_SIZE_T
+typedef size_t yy_size_t;
+#endif
+
+extern yy_size_t yyleng;
+
+extern FILE *yyin, *yyout;
+
+#define EOB_ACT_CONTINUE_SCAN 0
+#define EOB_ACT_END_OF_FILE 1
+#define EOB_ACT_LAST_MATCH 2
+
+    #define YY_LESS_LINENO(n)
+    
+/* Return all but the first "n" matched characters back to the input stream. */
+#define yyless(n) \
+	do \
+		{ \
+		/* Undo effects of setting up yytext. */ \
+        int yyless_macro_arg = (n); \
+        YY_LESS_LINENO(yyless_macro_arg);\
+		*yy_cp = (yy_hold_char); \
+		YY_RESTORE_YY_MORE_OFFSET \
+		(yy_c_buf_p) = yy_cp = yy_bp + yyless_macro_arg - YY_MORE_ADJ; \
+		YY_DO_BEFORE_ACTION; /* set up yytext again */ \
+		} \
+	while ( 0 )
+
+#define unput(c) yyunput( c, (yytext_ptr)  )
+
+#ifndef YY_STRUCT_YY_BUFFER_STATE
+#define YY_STRUCT_YY_BUFFER_STATE
+struct yy_buffer_state
+	{
+	FILE *yy_input_file;
+
+	char *yy_ch_buf;		/* input buffer */
+	char *yy_buf_pos;		/* current position in input buffer */
+
+	/* Size of input buffer in bytes, not including room for EOB
+	 * characters.
+	 */
+	yy_size_t yy_buf_size;
+
+	/* Number of characters read into yy_ch_buf, not including EOB
+	 * characters.
+	 */
+	yy_size_t yy_n_chars;
+
+	/* Whether we "own" the buffer - i.e., we know we created it,
+	 * and can realloc() it to grow it, and should free() it to
+	 * delete it.
+	 */
+	int yy_is_our_buffer;
+
+	/* Whether this is an "interactive" input source; if so, and
+	 * if we're using stdio for input, then we want to use getc()
+	 * instead of fread(), to make sure we stop fetching input after
+	 * each newline.
+	 */
+	int yy_is_interactive;
+
+	/* Whether we're considered to be at the beginning of a line.
+	 * If so, '^' rules will be active on the next match, otherwise
+	 * not.
+	 */
+	int yy_at_bol;
+
+    int yy_bs_lineno; /**< The line count. */
+    int yy_bs_column; /**< The column count. */
+    
+	/* Whether to try to fill the input buffer when we reach the
+	 * end of it.
+	 */
+	int yy_fill_buffer;
+
+	int yy_buffer_status;
+
+#define YY_BUFFER_NEW 0
+#define YY_BUFFER_NORMAL 1
+	/* When an EOF's been seen but there's still some text to process
+	 * then we mark the buffer as YY_EOF_PENDING, to indicate that we
+	 * shouldn't try reading from the input source any more.  We might
+	 * still have a bunch of tokens to match, though, because of
+	 * possible backing-up.
+	 *
+	 * When we actually see the EOF, we change the status to "new"
+	 * (via yyrestart()), so that the user can continue scanning by
+	 * just pointing yyin at a new input file.
+	 */
+#define YY_BUFFER_EOF_PENDING 2
+
+	};
+#endif /* !YY_STRUCT_YY_BUFFER_STATE */
+
+/* Stack of input buffers. */
+static size_t yy_buffer_stack_top = 0; /**< index of top of stack. */
+static size_t yy_buffer_stack_max = 0; /**< capacity of stack. */
+static YY_BUFFER_STATE * yy_buffer_stack = 0; /**< Stack as an array. */
+
+/* We provide macros for accessing buffer states in case in the
+ * future we want to put the buffer states in a more general
+ * "scanner state".
+ *
+ * Returns the top of the stack, or NULL.
+ */
+#define YY_CURRENT_BUFFER ( (yy_buffer_stack) \
+                          ? (yy_buffer_stack)[(yy_buffer_stack_top)] \
+                          : NULL)
+
+/* Same as previous macro, but useful when we know that the buffer stack is not
+ * NULL or when we need an lvalue. For internal use only.
+ */
+#define YY_CURRENT_BUFFER_LVALUE (yy_buffer_stack)[(yy_buffer_stack_top)]
+
+/* yy_hold_char holds the character lost when yytext is formed. */
+static char yy_hold_char;
+static yy_size_t yy_n_chars;		/* number of characters read into yy_ch_buf */
+yy_size_t yyleng;
+
+/* Points to current character in buffer. */
+static char *yy_c_buf_p = (char *) 0;
+static int yy_init = 0;		/* whether we need to initialize */
+static int yy_start = 0;	/* start state number */
+
+/* Flag which is used to allow yywrap()'s to do buffer switches
+ * instead of setting up a fresh yyin.  A bit of a hack ...
+ */
+static int yy_did_buffer_switch_on_eof;
+
+void yyrestart (FILE *input_file  );
+void yy_switch_to_buffer (YY_BUFFER_STATE new_buffer  );
+YY_BUFFER_STATE yy_create_buffer (FILE *file,int size  );
+void yy_delete_buffer (YY_BUFFER_STATE b  );
+void yy_flush_buffer (YY_BUFFER_STATE b  );
+void yypush_buffer_state (YY_BUFFER_STATE new_buffer  );
+void yypop_buffer_state (void );
+
+static void yyensure_buffer_stack (void );
+static void yy_load_buffer_state (void );
+static void yy_init_buffer (YY_BUFFER_STATE b,FILE *file  );
+
+#define YY_FLUSH_BUFFER yy_flush_buffer(YY_CURRENT_BUFFER )
+
+YY_BUFFER_STATE yy_scan_buffer (char *base,yy_size_t size  );
+YY_BUFFER_STATE yy_scan_string (yyconst char *yy_str  );
+YY_BUFFER_STATE yy_scan_bytes (yyconst char *bytes,yy_size_t len  );
+
+void *yyalloc (yy_size_t  );
+void *yyrealloc (void *,yy_size_t  );
+void yyfree (void *  );
+
+#define yy_new_buffer yy_create_buffer
+
+#define yy_set_interactive(is_interactive) \
+	{ \
+	if ( ! YY_CURRENT_BUFFER ){ \
+        yyensure_buffer_stack (); \
+		YY_CURRENT_BUFFER_LVALUE =    \
+            yy_create_buffer(yyin,YY_BUF_SIZE ); \
+	} \
+	YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \
+	}
+
+#define yy_set_bol(at_bol) \
+	{ \
+	if ( ! YY_CURRENT_BUFFER ){\
+        yyensure_buffer_stack (); \
+		YY_CURRENT_BUFFER_LVALUE =    \
+            yy_create_buffer(yyin,YY_BUF_SIZE ); \
+	} \
+	YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \
+	}
+
+#define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol)
+
+#define yywrap() 1
+#define YY_SKIP_YYWRAP
+
+typedef char YY_CHAR;
+
+FILE *yyin = (FILE *) 0, *yyout = (FILE *) 0;
+
+typedef int yy_state_type;
+
+extern int yylineno;
+
+int yylineno = 1;
+
+extern char *yytext;
+#define yytext_ptr yytext
+static yyconst flex_int16_t yy_nxt[][128] =
+    {
+    {
+        0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
+        0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
+        0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
+        0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
+        0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
+        0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
+        0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
+        0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
+        0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
+        0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
+
+        0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
+        0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
+        0,    0,    0,    0,    0,    0,    0,    0
+    },
+
+    {
+        3,    4,    4,    4,    4,    4,    4,    4,    4,    5,
+        4,    4,    4,    4,    4,    4,    4,    4,    4,    4,
+        4,    4,    4,    4,    4,    4,    4,    4,    4,    4,
+        4,    4,    5,    4,    4,    4,    6,    4,    4,    4,
+        7,    8,    9,   10,    4,   11,    4,   12,   13,   13,
+       13,   13,   13,   13,   13,   13,   13,   13,   14,    4,
+       15,   16,   17,   18,   19,   20,   20,   20,   20,   20,
+
+       20,   20,   20,   20,   20,   20,   20,   20,   20,   20,
+       20,   20,   20,   20,   20,   20,   20,   20,   20,   20,
+       20,    4,    4,    4,   21,    4,    4,   20,   20,   20,
+       20,   20,   20,   20,   20,   20,   20,   20,   20,   20,
+       20,   20,   20,   20,   20,   20,   20,   20,   20,   20,
+       20,   20,   20,    4,    4,    4,    4,    4
+    },
+
+    {
+        3,    4,    4,    4,    4,    4,    4,    4,    4,    5,
+        4,    4,    4,    4,    4,    4,    4,    4,    4,    4,
+        4,    4,    4,    4,    4,    4,    4,    4,    4,    4,
+        4,    4,    5,    4,    4,    4,    6,    4,    4,    4,
+
+        7,    8,    9,   10,    4,   11,    4,   12,   13,   13,
+       13,   13,   13,   13,   13,   13,   13,   13,   14,    4,
+       15,   16,   17,   18,   19,   20,   20,   20,   20,   20,
+       20,   20,   20,   20,   20,   20,   20,   20,   20,   20,
+       20,   20,   20,   20,   20,   20,   20,   20,   20,   20,
+       20,    4,    4,    4,   21,    4,    4,   20,   20,   20,
+       20,   20,   20,   20,   20,   20,   20,   20,   20,   20,
+       20,   20,   20,   20,   20,   20,   20,   20,   20,   20,
+       20,   20,   20,    4,    4,    4,    4,    4
+    },
+
+    {
+       -3,   -3,   -3,   -3,   -3,   -3,   -3,   -3,   -3,   -3,
+
+       -3,   -3,   -3,   -3,   -3,   -3,   -3,   -3,   -3,   -3,
+       -3,   -3,   -3,   -3,   -3,   -3,   -3,   -3,   -3,   -3,
+       -3,   -3,   -3,   -3,   -3,   -3,   -3,   -3,   -3,   -3,
+       -3,   -3,   -3,   -3,   -3,   -3,   -3,   -3,   -3,   -3,
+       -3,   -3,   -3,   -3,   -3,   -3,   -3,   -3,   -3,   -3,
+       -3,   -3,   -3,   -3,   -3,   -3,   -3,   -3,   -3,   -3,
+       -3,   -3,   -3,   -3,   -3,   -3,   -3,   -3,   -3,   -3,
+       -3,   -3,   -3,   -3,   -3,   -3,   -3,   -3,   -3,   -3,
+       -3,   -3,   -3,   -3,   -3,   -3,   -3,   -3,   -3,   -3,
+       -3,   -3,   -3,   -3,   -3,   -3,   -3,   -3,   -3,   -3,
+
+       -3,   -3,   -3,   -3,   -3,   -3,   -3,   -3,   -3,   -3,
+       -3,   -3,   -3,   -3,   -3,   -3,   -3,   -3
+    },
+
+    {
+        3,   -4,   -4,   -4,   -4,   -4,   -4,   -4,   -4,   -4,
+       -4,   -4,   -4,   -4,   -4,   -4,   -4,   -4,   -4,   -4,
+       -4,   -4,   -4,   -4,   -4,   -4,   -4,   -4,   -4,   -4,
+       -4,   -4,   -4,   -4,   -4,   -4,   -4,   -4,   -4,   -4,
+       -4,   -4,   -4,   -4,   -4,   -4,   -4,   -4,   -4,   -4,
+       -4,   -4,   -4,   -4,   -4,   -4,   -4,   -4,   -4,   -4,
+       -4,   -4,   -4,   -4,   -4,   -4,   -4,   -4,   -4,   -4,
+       -4,   -4,   -4,   -4,   -4,   -4,   -4,   -4,   -4,   -4,
+
+       -4,   -4,   -4,   -4,   -4,   -4,   -4,   -4,   -4,   -4,
+       -4,   -4,   -4,   -4,   -4,   -4,   -4,   -4,   -4,   -4,
+       -4,   -4,   -4,   -4,   -4,   -4,   -4,   -4,   -4,   -4,
+       -4,   -4,   -4,   -4,   -4,   -4,   -4,   -4,   -4,   -4,
+       -4,   -4,   -4,   -4,   -4,   -4,   -4,   -4
+    },
+
+    {
+        3,   -5,   -5,   -5,   -5,   -5,   -5,   -5,   -5,   23,
+       -5,   -5,   -5,   -5,   -5,   -5,   -5,   -5,   -5,   -5,
+       -5,   -5,   -5,   -5,   -5,   -5,   -5,   -5,   -5,   -5,
+       -5,   -5,   23,   -5,   -5,   -5,   -5,   -5,   -5,   -5,
+       -5,   -5,   -5,   -5,   -5,   -5,   -5,   -5,   -5,   -5,
+
+       -5,   -5,   -5,   -5,   -5,   -5,   -5,   -5,   -5,   -5,
+       -5,   -5,   -5,   -5,   -5,   -5,   -5,   -5,   -5,   -5,
+       -5,   -5,   -5,   -5,   -5,   -5,   -5,   -5,   -5,   -5,
+       -5,   -5,   -5,   -5,   -5,   -5,   -5,   -5,   -5,   -5,
+       -5,   -5,   -5,   -5,   -5,   -5,   -5,   -5,   -5,   -5,
+       -5,   -5,   -5,   -5,   -5,   -5,   -5,   -5,   -5,   -5,
+       -5,   -5,   -5,   -5,   -5,   -5,   -5,   -5,   -5,   -5,
+       -5,   -5,   -5,   -5,   -5,   -5,   -5,   -5
+    },
+
+    {
+        3,   -6,   -6,   -6,   -6,   -6,   -6,   -6,   -6,   -6,
+       -6,   -6,   -6,   -6,   -6,   -6,   -6,   -6,   -6,   -6,
+
+       -6,   -6,   -6,   -6,   -6,   -6,   -6,   -6,   -6,   -6,
+       -6,   -6,   -6,   -6,   -6,   -6,   -6,   -6,   -6,   -6,
+       -6,   -6,   -6,   -6,   -6,   -6,   -6,   -6,   -6,   -6,
+       -6,   -6,   -6,   -6,   -6,   -6,   -6,   -6,   -6,   -6,
+       -6,   -6,   -6,   -6,   -6,   24,   24,   24,   24,   24,
+       24,   24,   24,   24,   24,   24,   24,   24,   24,   24,
+       24,   24,   24,   24,   24,   24,   24,   24,   24,   24,
+       24,   -6,   -6,   -6,   -6,   -6,   -6,   24,   24,   24,
+       24,   24,   24,   24,   24,   24,   24,   24,   24,   24,
+       24,   24,   24,   24,   24,   24,   24,   24,   24,   24,
+
+       24,   24,   24,   -6,   -6,   -6,   -6,   -6
+    },
+
+    {
+        3,   -7,   -7,   -7,   -7,   -7,   -7,   -7,   -7,   -7,
+       -7,   -7,   -7,   -7,   -7,   -7,   -7,   -7,   -7,   -7,
+       -7,   -7,   -7,   -7,   -7,   -7,   -7,   -7,   -7,   -7,
+       -7,   -7,   -7,   -7,   -7,   -7,   -7,   -7,   -7,   -7,
+       -7,   -7,   -7,   -7,   -7,   -7,   -7,   -7,   -7,   -7,
+       -7,   -7,   -7,   -7,   -7,   -7,   -7,   -7,   -7,   -7,
+       -7,   -7,   -7,   -7,   -7,   -7,   -7,   -7,   -7,   -7,
+       -7,   -7,   -7,   -7,   -7,   -7,   -7,   -7,   -7,   -7,
+       -7,   -7,   -7,   -7,   -7,   -7,   -7,   -7,   -7,   -7,
+
+       -7,   -7,   -7,   -7,   -7,   -7,   -7,   -7,   -7,   -7,
+       -7,   -7,   -7,   -7,   -7,   -7,   -7,   -7,   -7,   -7,
+       -7,   -7,   -7,   -7,   -7,   -7,   -7,   -7,   -7,   -7,
+       -7,   -7,   -7,   -7,   -7,   -7,   -7,   -7
+    },
+
+    {
+        3,   -8,   -8,   -8,   -8,   -8,   -8,   -8,   -8,   -8,
+       -8,   -8,   -8,   -8,   -8,   -8,   -8,   -8,   -8,   -8,
+       -8,   -8,   -8,   -8,   -8,   -8,   -8,   -8,   -8,   -8,
+       -8,   -8,   -8,   -8,   -8,   -8,   -8,   -8,   -8,   -8,
+       -8,   -8,   -8,   -8,   -8,   -8,   -8,   -8,   -8,   -8,
+       -8,   -8,   -8,   -8,   -8,   -8,   -8,   -8,   -8,   -8,
+
+       -8,   -8,   -8,   -8,   -8,   -8,   -8,   -8,   -8,   -8,
+       -8,   -8,   -8,   -8,   -8,   -8,   -8,   -8,   -8,   -8,
+       -8,   -8,   -8,   -8,   -8,   -8,   -8,   -8,   -8,   -8,
+       -8,   -8,   -8,   -8,   -8,   -8,   -8,   -8,   -8,   -8,
+       -8,   -8,   -8,   -8,   -8,   -8,   -8,   -8,   -8,   -8,
+       -8,   -8,   -8,   -8,   -8,   -8,   -8,   -8,   -8,   -8,
+       -8,   -8,   -8,   -8,   -8,   -8,   -8,   -8
+    },
+
+    {
+        3,   -9,   -9,   -9,   -9,   -9,   -9,   -9,   -9,   -9,
+       -9,   -9,   -9,   -9,   -9,   -9,   -9,   -9,   -9,   -9,
+       -9,   -9,   -9,   -9,   -9,   -9,   -9,   -9,   -9,   -9,
+
+       -9,   -9,   -9,   -9,   -9,   -9,   -9,   -9,   -9,   -9,
+       -9,   -9,   -9,   -9,   -9,   -9,   -9,   -9,   -9,   -9,
+       -9,   -9,   -9,   -9,   -9,   -9,   -9,   -9,   -9,   -9,
+       -9,   -9,   -9,   -9,   -9,   -9,   -9,   -9,   -9,   -9,
+       -9,   -9,   -9,   -9,   -9,   -9,   -9,   -9,   -9,   -9,
+       -9,   -9,   -9,   -9,   -9,   -9,   -9,   -9,   -9,   -9,
+       -9,   -9,   -9,   -9,   -9,   -9,   -9,   -9,   -9,   -9,
+       -9,   -9,   -9,   -9,   -9,   -9,   -9,   -9,   -9,   -9,
+       -9,   -9,   -9,   -9,   -9,   -9,   -9,   -9,   -9,   -9,
+       -9,   -9,   -9,   -9,   -9,   -9,   -9,   -9
+
+    },
+
+    {
+        3,  -10,  -10,  -10,  -10,  -10,  -10,  -10,  -10,  -10,
+      -10,  -10,  -10,  -10,  -10,  -10,  -10,  -10,  -10,  -10,
+      -10,  -10,  -10,  -10,  -10,  -10,  -10,  -10,  -10,  -10,
+      -10,  -10,  -10,  -10,  -10,  -10,  -10,  -10,  -10,  -10,
+      -10,  -10,  -10,  -10,  -10,  -10,  -10,  -10,  -10,  -10,
+      -10,  -10,  -10,  -10,  -10,  -10,  -10,  -10,  -10,  -10,
+      -10,  -10,  -10,  -10,  -10,  -10,  -10,  -10,  -10,  -10,
+      -10,  -10,  -10,  -10,  -10,  -10,  -10,  -10,  -10,  -10,
+      -10,  -10,  -10,  -10,  -10,  -10,  -10,  -10,  -10,  -10,
+      -10,  -10,  -10,  -10,  -10,  -10,  -10,  -10,  -10,  -10,
+
+      -10,  -10,  -10,  -10,  -10,  -10,  -10,  -10,  -10,  -10,
+      -10,  -10,  -10,  -10,  -10,  -10,  -10,  -10,  -10,  -10,
+      -10,  -10,  -10,  -10,  -10,  -10,  -10,  -10
+    },
+
+    {
+        3,  -11,  -11,  -11,  -11,  -11,  -11,  -11,  -11,  -11,
+      -11,  -11,  -11,  -11,  -11,  -11,  -11,  -11,  -11,  -11,
+      -11,  -11,  -11,  -11,  -11,  -11,  -11,  -11,  -11,  -11,
+      -11,  -11,  -11,  -11,  -11,  -11,  -11,  -11,  -11,  -11,
+      -11,  -11,  -11,  -11,  -11,  -11,  -11,  -11,  -11,  -11,
+      -11,  -11,  -11,  -11,  -11,  -11,  -11,  -11,  -11,  -11,
+      -11,  -11,  -11,  -11,  -11,  -11,  -11,  -11,  -11,  -11,
+
+      -11,  -11,  -11,  -11,  -11,  -11,  -11,  -11,  -11,  -11,
+      -11,  -11,  -11,  -11,  -11,  -11,  -11,  -11,  -11,  -11,
+      -11,  -11,  -11,  -11,  -11,  -11,  -11,  -11,  -11,  -11,
+      -11,  -11,  -11,  -11,  -11,  -11,  -11,  -11,  -11,  -11,
+      -11,  -11,  -11,  -11,  -11,  -11,  -11,  -11,  -11,  -11,
+      -11,  -11,  -11,  -11,  -11,  -11,  -11,  -11
+    },
+
+    {
+        3,  -12,  -12,  -12,  -12,  -12,  -12,  -12,  -12,  -12,
+      -12,  -12,  -12,  -12,  -12,  -12,  -12,  -12,  -12,  -12,
+      -12,  -12,  -12,  -12,  -12,  -12,  -12,  -12,  -12,  -12,
+      -12,  -12,  -12,  -12,  -12,  -12,  -12,  -12,  -12,  -12,
+
+      -12,  -12,  -12,  -12,  -12,  -12,  -12,  -12,  -12,  -12,
+      -12,  -12,  -12,  -12,  -12,  -12,  -12,  -12,  -12,  -12,
+      -12,   25,  -12,  -12,  -12,  -12,  -12,  -12,  -12,  -12,
+      -12,  -12,  -12,  -12,  -12,  -12,  -12,  -12,  -12,  -12,
+      -12,  -12,  -12,  -12,  -12,  -12,  -12,  -12,  -12,  -12,
+      -12,  -12,  -12,  -12,  -12,  -12,  -12,  -12,  -12,  -12,
+      -12,  -12,  -12,  -12,  -12,  -12,  -12,  -12,  -12,  -12,
+      -12,  -12,  -12,  -12,  -12,  -12,  -12,  -12,  -12,  -12,
+      -12,  -12,  -12,  -12,  -12,  -12,  -12,  -12
+    },
+
+    {
+        3,  -13,  -13,  -13,  -13,  -13,  -13,  -13,  -13,  -13,
+
+      -13,  -13,  -13,  -13,  -13,  -13,  -13,  -13,  -13,  -13,
+      -13,  -13,  -13,  -13,  -13,  -13,  -13,  -13,  -13,  -13,
+      -13,  -13,  -13,  -13,  -13,  -13,  -13,  -13,  -13,  -13,
+      -13,  -13,  -13,  -13,  -13,  -13,   26,  -13,   27,   27,
+       27,   27,   27,   27,   27,   27,   27,   27,  -13,  -13,
+      -13,  -13,  -13,  -13,  -13,  -13,  -13,  -13,  -13,   28,
+      -13,  -13,  -13,  -13,  -13,  -13,  -13,  -13,  -13,  -13,
+      -13,  -13,  -13,  -13,  -13,  -13,  -13,  -13,  -13,  -13,
+      -13,  -13,  -13,  -13,  -13,  -13,  -13,  -13,  -13,  -13,
+      -13,   28,  -13,  -13,  -13,  -13,  -13,  -13,  -13,  -13,
+
+      -13,  -13,  -13,  -13,  -13,  -13,  -13,  -13,  -13,  -13,
+      -13,  -13,  -13,  -13,  -13,  -13,  -13,  -13
+    },
+
+    {
+        3,  -14,  -14,  -14,  -14,  -14,  -14,  -14,  -14,  -14,
+      -14,  -14,  -14,  -14,  -14,  -14,  -14,  -14,  -14,  -14,
+      -14,  -14,  -14,  -14,  -14,  -14,  -14,  -14,  -14,  -14,
+      -14,  -14,  -14,  -14,  -14,  -14,  -14,  -14,  -14,  -14,
+      -14,  -14,  -14,  -14,  -14,  -14,  -14,  -14,  -14,  -14,
+      -14,  -14,  -14,  -14,  -14,  -14,  -14,  -14,  -14,  -14,
+      -14,  -14,  -14,  -14,  -14,  -14,  -14,  -14,  -14,  -14,
+      -14,  -14,  -14,  -14,  -14,  -14,  -14,  -14,  -14,  -14,
+
+      -14,  -14,  -14,  -14,  -14,  -14,  -14,  -14,  -14,  -14,
+      -14,  -14,  -14,  -14,  -14,  -14,  -14,  -14,  -14,  -14,
+      -14,  -14,  -14,  -14,  -14,  -14,  -14,  -14,  -14,  -14,
+      -14,  -14,  -14,  -14,  -14,  -14,  -14,  -14,  -14,  -14,
+      -14,  -14,  -14,  -14,  -14,  -14,  -14,  -14
+    },
+
+    {
+        3,  -15,  -15,  -15,  -15,  -15,  -15,  -15,  -15,  -15,
+      -15,  -15,  -15,  -15,  -15,  -15,  -15,  -15,  -15,  -15,
+      -15,  -15,  -15,  -15,  -15,  -15,  -15,  -15,  -15,  -15,
+      -15,  -15,  -15,  -15,  -15,  -15,  -15,  -15,  -15,  -15,
+      -15,  -15,  -15,  -15,  -15,  -15,  -15,  -15,  -15,  -15,
+
+      -15,  -15,  -15,  -15,  -15,  -15,  -15,  -15,  -15,  -15,
+      -15,   29,  -15,  -15,  -15,  -15,  -15,  -15,  -15,  -15,
+      -15,  -15,  -15,  -15,  -15,  -15,  -15,  -15,  -15,  -15,
+      -15,  -15,  -15,  -15,  -15,  -15,  -15,  -15,  -15,  -15,
+      -15,  -15,  -15,  -15,  -15,  -15,  -15,  -15,  -15,  -15,
+      -15,  -15,  -15,  -15,  -15,  -15,  -15,  -15,  -15,  -15,
+      -15,  -15,  -15,  -15,  -15,  -15,  -15,  -15,  -15,  -15,
+      -15,  -15,  -15,  -15,  -15,  -15,  -15,  -15
+    },
+
+    {
+        3,  -16,  -16,  -16,  -16,  -16,  -16,  -16,  -16,  -16,
+      -16,  -16,  -16,  -16,  -16,  -16,  -16,  -16,  -16,  -16,
+
+      -16,  -16,  -16,  -16,  -16,  -16,  -16,  -16,  -16,  -16,
+      -16,  -16,  -16,  -16,  -16,  -16,  -16,  -16,  -16,  -16,
+      -16,  -16,  -16,  -16,  -16,  -16,  -16,  -16,  -16,  -16,
+      -16,  -16,  -16,  -16,  -16,  -16,  -16,  -16,  -16,  -16,
+      -16,   30,  -16,  -16,  -16,  -16,  -16,  -16,  -16,  -16,
+      -16,  -16,  -16,  -16,  -16,  -16,  -16,  -16,  -16,  -16,
+      -16,  -16,  -16,  -16,  -16,  -16,  -16,  -16,  -16,  -16,
+      -16,  -16,  -16,  -16,  -16,  -16,  -16,  -16,  -16,  -16,
+      -16,  -16,  -16,  -16,  -16,  -16,  -16,  -16,  -16,  -16,
+      -16,  -16,  -16,  -16,  -16,  -16,  -16,  -16,  -16,  -16,
+
+      -16,  -16,  -16,  -16,  -16,  -16,  -16,  -16
+    },
+
+    {
+        3,  -17,  -17,  -17,  -17,  -17,  -17,  -17,  -17,  -17,
+      -17,  -17,  -17,  -17,  -17,  -17,  -17,  -17,  -17,  -17,
+      -17,  -17,  -17,  -17,  -17,  -17,  -17,  -17,  -17,  -17,
+      -17,  -17,  -17,  -17,  -17,  -17,  -17,  -17,  -17,  -17,
+      -17,  -17,  -17,  -17,  -17,  -17,  -17,  -17,  -17,  -17,
+      -17,  -17,  -17,  -17,  -17,  -17,  -17,  -17,  -17,  -17,
+      -17,   31,  -17,  -17,  -17,  -17,  -17,  -17,  -17,  -17,
+      -17,  -17,  -17,  -17,  -17,  -17,  -17,  -17,  -17,  -17,
+      -17,  -17,  -17,  -17,  -17,  -17,  -17,  -17,  -17,  -17,
+
+      -17,  -17,  -17,  -17,  -17,  -17,  -17,  -17,  -17,  -17,
+      -17,  -17,  -17,  -17,  -17,  -17,  -17,  -17,  -17,  -17,
+      -17,  -17,  -17,  -17,  -17,  -17,  -17,  -17,  -17,  -17,
+      -17,  -17,  -17,  -17,  -17,  -17,  -17,  -17
+    },
+
+    {
+        3,  -18,  -18,  -18,  -18,  -18,  -18,  -18,  -18,  -18,
+      -18,  -18,  -18,  -18,  -18,  -18,  -18,  -18,  -18,  -18,
+      -18,  -18,  -18,  -18,  -18,  -18,  -18,  -18,  -18,  -18,
+      -18,  -18,  -18,  -18,  -18,  -18,  -18,  -18,  -18,  -18,
+      -18,  -18,  -18,  -18,  -18,  -18,  -18,  -18,  -18,  -18,
+      -18,  -18,  -18,  -18,  -18,  -18,  -18,  -18,  -18,  -18,
+
+      -18,  -18,  -18,  -18,  -18,  -18,  -18,  -18,  -18,  -18,
+      -18,  -18,  -18,  -18,  -18,  -18,  -18,  -18,  -18,  -18,
+      -18,  -18,  -18,  -18,  -18,  -18,  -18,  -18,  -18,  -18,
+      -18,  -18,  -18,  -18,  -18,  -18,  -18,  -18,  -18,  -18,
+      -18,  -18,  -18,  -18,  -18,  -18,  -18,  -18,  -18,  -18,
+      -18,  -18,  -18,  -18,  -18,  -18,  -18,  -18,  -18,  -18,
+      -18,  -18,  -18,  -18,  -18,  -18,  -18,  -18
+    },
+
+    {
+        3,  -19,  -19,  -19,  -19,  -19,  -19,  -19,  -19,  -19,
+      -19,  -19,  -19,  -19,  -19,  -19,  -19,  -19,  -19,  -19,
+      -19,  -19,  -19,  -19,  -19,  -19,  -19,  -19,  -19,  -19,
+
+      -19,  -19,  -19,  -19,  -19,  -19,  -19,  -19,  -19,  -19,
+      -19,  -19,  -19,  -19,  -19,  -19,  -19,  -19,  -19,  -19,
+      -19,  -19,  -19,  -19,  -19,  -19,  -19,  -19,  -19,  -19,
+      -19,  -19,  -19,  -19,  -19,   32,   32,   32,   32,   32,
+       32,   32,   32,   32,   32,   32,   32,   32,   32,   32,
+       32,   32,   32,   32,   32,   32,   32,   32,   32,   32,
+       32,  -19,  -19,  -19,  -19,  -19,  -19,   32,   32,   32,
+       32,   32,   32,   32,   32,   32,   32,   32,   32,   32,
+       32,   32,   32,   32,   32,   32,   32,   32,   32,   32,
+       32,   32,   32,  -19,  -19,  -19,  -19,  -19
+
+    },
+
+    {
+        3,  -20,  -20,  -20,  -20,  -20,  -20,  -20,  -20,  -20,
+      -20,  -20,  -20,  -20,  -20,  -20,  -20,  -20,  -20,  -20,
+      -20,  -20,  -20,  -20,  -20,  -20,  -20,  -20,  -20,  -20,
+      -20,  -20,  -20,  -20,  -20,  -20,  -20,  -20,  -20,  -20,
+      -20,  -20,  -20,  -20,  -20,  -20,  -20,  -20,   33,   33,
+       33,   33,   33,   33,   33,   33,   33,   33,  -20,  -20,
+      -20,  -20,  -20,  -20,  -20,   33,   33,   33,   33,   33,
+       33,   33,   33,   33,   33,   33,   33,   33,   33,   33,
+       33,   33,   33,   33,   33,   33,   33,   33,   33,   33,
+       33,  -20,  -20,  -20,  -20,   33,  -20,   33,   33,   33,
+
+       33,   33,   33,   33,   33,   33,   33,   33,   33,   33,
+       33,   33,   33,   33,   33,   33,   33,   33,   33,   33,
+       33,   33,   33,  -20,  -20,  -20,  -20,  -20
+    },
+
+    {
+        3,  -21,  -21,  -21,  -21,  -21,  -21,  -21,  -21,  -21,
+      -21,  -21,  -21,  -21,  -21,  -21,  -21,  -21,  -21,  -21,
+      -21,  -21,  -21,  -21,  -21,  -21,  -21,  -21,  -21,  -21,
+      -21,  -21,  -21,  -21,  -21,  -21,  -21,  -21,  -21,  -21,
+      -21,  -21,  -21,  -21,  -21,  -21,  -21,  -21,  -21,  -21,
+      -21,  -21,  -21,  -21,  -21,  -21,  -21,  -21,  -21,  -21,
+      -21,  -21,  -21,  -21,  -21,  -21,  -21,  -21,  -21,  -21,
+
+      -21,  -21,  -21,  -21,  -21,  -21,  -21,  -21,  -21,  -21,
+      -21,  -21,  -21,  -21,  -21,  -21,  -21,  -21,  -21,  -21,
+      -21,  -21,  -21,  -21,  -21,  -21,  -21,  -21,  -21,  -21,
+      -21,  -21,  -21,  -21,  -21,  -21,  -21,  -21,  -21,  -21,
+      -21,  -21,  -21,  -21,  -21,  -21,  -21,  -21,  -21,  -21,
+      -21,  -21,  -21,  -21,  -21,  -21,  -21,  -21
+    },
+
+    {
+        3,  -22,  -22,  -22,  -22,  -22,  -22,  -22,  -22,  -22,
+      -22,  -22,  -22,  -22,  -22,  -22,  -22,  -22,  -22,  -22,
+      -22,  -22,  -22,  -22,  -22,  -22,  -22,  -22,  -22,  -22,
+      -22,  -22,  -22,  -22,  -22,  -22,  -22,  -22,  -22,  -22,
+
+      -22,  -22,  -22,  -22,  -22,  -22,  -22,  -22,  -22,  -22,
+      -22,  -22,  -22,  -22,  -22,  -22,  -22,  -22,  -22,  -22,
+      -22,  -22,  -22,  -22,  -22,  -22,  -22,  -22,  -22,  -22,
+      -22,  -22,  -22,  -22,  -22,  -22,  -22,  -22,  -22,  -22,
+      -22,  -22,  -22,  -22,  -22,  -22,  -22,  -22,  -22,  -22,
+      -22,  -22,  -22,  -22,  -22,  -22,  -22,  -22,  -22,  -22,
+      -22,  -22,  -22,  -22,  -22,  -22,  -22,  -22,  -22,  -22,
+      -22,  -22,  -22,  -22,  -22,  -22,  -22,  -22,  -22,  -22,
+      -22,  -22,  -22,  -22,  -22,  -22,  -22,  -22
+    },
+
+    {
+        3,  -23,  -23,  -23,  -23,  -23,  -23,  -23,  -23,   23,
+
+      -23,  -23,  -23,  -23,  -23,  -23,  -23,  -23,  -23,  -23,
+      -23,  -23,  -23,  -23,  -23,  -23,  -23,  -23,  -23,  -23,
+      -23,  -23,   23,  -23,  -23,  -23,  -23,  -23,  -23,  -23,
+      -23,  -23,  -23,  -23,  -23,  -23,  -23,  -23,  -23,  -23,
+      -23,  -23,  -23,  -23,  -23,  -23,  -23,  -23,  -23,  -23,
+      -23,  -23,  -23,  -23,  -23,  -23,  -23,  -23,  -23,  -23,
+      -23,  -23,  -23,  -23,  -23,  -23,  -23,  -23,  -23,  -23,
+      -23,  -23,  -23,  -23,  -23,  -23,  -23,  -23,  -23,  -23,
+      -23,  -23,  -23,  -23,  -23,  -23,  -23,  -23,  -23,  -23,
+      -23,  -23,  -23,  -23,  -23,  -23,  -23,  -23,  -23,  -23,
+
+      -23,  -23,  -23,  -23,  -23,  -23,  -23,  -23,  -23,  -23,
+      -23,  -23,  -23,  -23,  -23,  -23,  -23,  -23
+    },
+
+    {
+        3,  -24,  -24,  -24,  -24,  -24,  -24,  -24,  -24,  -24,
+      -24,  -24,  -24,  -24,  -24,  -24,  -24,  -24,  -24,  -24,
+      -24,  -24,  -24,  -24,  -24,  -24,  -24,  -24,  -24,  -24,
+      -24,  -24,  -24,  -24,  -24,  -24,  -24,  -24,  -24,  -24,
+      -24,  -24,  -24,  -24,  -24,  -24,  -24,  -24,   34,   34,
+       34,   34,   34,   34,   34,   34,   34,   34,  -24,  -24,
+      -24,  -24,  -24,  -24,  -24,   34,   34,   34,   34,   34,
+       34,   34,   34,   34,   34,   34,   34,   34,   34,   34,
+
+       34,   34,   34,   34,   34,   34,   34,   34,   34,   34,
+       34,  -24,  -24,  -24,  -24,   34,  -24,   34,   34,   34,
+       34,   34,   34,   34,   34,   34,   34,   34,   34,   34,
+       34,   34,   34,   34,   34,   34,   34,   34,   34,   34,
+       34,   34,   34,  -24,  -24,  -24,  -24,  -24
+    },
+
+    {
+        3,  -25,  -25,  -25,  -25,  -25,  -25,  -25,  -25,  -25,
+      -25,  -25,  -25,  -25,  -25,  -25,  -25,  -25,  -25,  -25,
+      -25,  -25,  -25,  -25,  -25,  -25,  -25,  -25,  -25,  -25,
+      -25,  -25,  -25,  -25,  -25,  -25,  -25,  -25,  -25,  -25,
+      -25,  -25,  -25,  -25,  -25,  -25,  -25,  -25,  -25,  -25,
+
+      -25,  -25,  -25,  -25,  -25,  -25,  -25,  -25,  -25,  -25,
+      -25,  -25,  -25,  -25,  -25,  -25,  -25,  -25,  -25,  -25,
+      -25,  -25,  -25,  -25,  -25,  -25,  -25,  -25,  -25,  -25,
+      -25,  -25,  -25,  -25,  -25,  -25,  -25,  -25,  -25,  -25,
+      -25,  -25,  -25,  -25,  -25,  -25,  -25,  -25,  -25,  -25,
+      -25,  -25,  -25,  -25,  -25,  -25,  -25,  -25,  -25,  -25,
+      -25,  -25,  -25,  -25,  -25,  -25,  -25,  -25,  -25,  -25,
+      -25,  -25,  -25,  -25,  -25,  -25,  -25,  -25
+    },
+
+    {
+        3,  -26,  -26,  -26,  -26,  -26,  -26,  -26,  -26,  -26,
+      -26,  -26,  -26,  -26,  -26,  -26,  -26,  -26,  -26,  -26,
+
+      -26,  -26,  -26,  -26,  -26,  -26,  -26,  -26,  -26,  -26,
+      -26,  -26,  -26,  -26,  -26,  -26,  -26,  -26,  -26,  -26,
+      -26,  -26,  -26,  -26,  -26,  -26,  -26,  -26,   35,   35,
+       35,   35,   35,   35,   35,   35,   35,   35,  -26,  -26,
+      -26,  -26,  -26,  -26,  -26,  -26,  -26,  -26,  -26,  -26,
+      -26,  -26,  -26,  -26,  -26,  -26,  -26,  -26,  -26,  -26,
+      -26,  -26,  -26,  -26,  -26,  -26,  -26,  -26,  -26,  -26,
+      -26,  -26,  -26,  -26,  -26,  -26,  -26,  -26,  -26,  -26,
+      -26,  -26,  -26,  -26,  -26,  -26,  -26,  -26,  -26,  -26,
+      -26,  -26,  -26,  -26,  -26,  -26,  -26,  -26,  -26,  -26,
+
+      -26,  -26,  -26,  -26,  -26,  -26,  -26,  -26
+    },
+
+    {
+        3,  -27,  -27,  -27,  -27,  -27,  -27,  -27,  -27,  -27,
+      -27,  -27,  -27,  -27,  -27,  -27,  -27,  -27,  -27,  -27,
+      -27,  -27,  -27,  -27,  -27,  -27,  -27,  -27,  -27,  -27,
+      -27,  -27,  -27,  -27,  -27,  -27,  -27,  -27,  -27,  -27,
+      -27,  -27,  -27,  -27,  -27,  -27,   26,  -27,   27,   27,
+       27,   27,   27,   27,   27,   27,   27,   27,  -27,  -27,
+      -27,  -27,  -27,  -27,  -27,  -27,  -27,  -27,  -27,   28,
+      -27,  -27,  -27,  -27,  -27,  -27,  -27,  -27,  -27,  -27,
+      -27,  -27,  -27,  -27,  -27,  -27,  -27,  -27,  -27,  -27,
+
+      -27,  -27,  -27,  -27,  -27,  -27,  -27,  -27,  -27,  -27,
+      -27,   28,  -27,  -27,  -27,  -27,  -27,  -27,  -27,  -27,
+      -27,  -27,  -27,  -27,  -27,  -27,  -27,  -27,  -27,  -27,
+      -27,  -27,  -27,  -27,  -27,  -27,  -27,  -27
+    },
+
+    {
+        3,  -28,  -28,  -28,  -28,  -28,  -28,  -28,  -28,  -28,
+      -28,  -28,  -28,  -28,  -28,  -28,  -28,  -28,  -28,  -28,
+      -28,  -28,  -28,  -28,  -28,  -28,  -28,  -28,  -28,  -28,
+      -28,  -28,  -28,  -28,  -28,  -28,  -28,  -28,  -28,  -28,
+      -28,  -28,  -28,   36,  -28,   36,  -28,  -28,   37,   37,
+       37,   37,   37,   37,   37,   37,   37,   37,  -28,  -28,
+
+      -28,  -28,  -28,  -28,  -28,  -28,  -28,  -28,  -28,  -28,
+      -28,  -28,  -28,  -28,  -28,  -28,  -28,  -28,  -28,  -28,
+      -28,  -28,  -28,  -28,  -28,  -28,  -28,  -28,  -28,  -28,
+      -28,  -28,  -28,  -28,  -28,  -28,  -28,  -28,  -28,  -28,
+      -28,  -28,  -28,  -28,  -28,  -28,  -28,  -28,  -28,  -28,
+      -28,  -28,  -28,  -28,  -28,  -28,  -28,  -28,  -28,  -28,
+      -28,  -28,  -28,  -28,  -28,  -28,  -28,  -28
+    },
+
+    {
+        3,  -29,  -29,  -29,  -29,  -29,  -29,  -29,  -29,  -29,
+      -29,  -29,  -29,  -29,  -29,  -29,  -29,  -29,  -29,  -29,
+      -29,  -29,  -29,  -29,  -29,  -29,  -29,  -29,  -29,  -29,
+
+      -29,  -29,  -29,  -29,  -29,  -29,  -29,  -29,  -29,  -29,
+      -29,  -29,  -29,  -29,  -29,  -29,  -29,  -29,  -29,  -29,
+      -29,  -29,  -29,  -29,  -29,  -29,  -29,  -29,  -29,  -29,
+      -29,  -29,  -29,  -29,  -29,  -29,  -29,  -29,  -29,  -29,
+      -29,  -29,  -29,  -29,  -29,  -29,  -29,  -29,  -29,  -29,
+      -29,  -29,  -29,  -29,  -29,  -29,  -29,  -29,  -29,  -29,
+      -29,  -29,  -29,  -29,  -29,  -29,  -29,  -29,  -29,  -29,
+      -29,  -29,  -29,  -29,  -29,  -29,  -29,  -29,  -29,  -29,
+      -29,  -29,  -29,  -29,  -29,  -29,  -29,  -29,  -29,  -29,
+      -29,  -29,  -29,  -29,  -29,  -29,  -29,  -29
+
+    },
+
+    {
+        3,  -30,  -30,  -30,  -30,  -30,  -30,  -30,  -30,  -30,
+      -30,  -30,  -30,  -30,  -30,  -30,  -30,  -30,  -30,  -30,
+      -30,  -30,  -30,  -30,  -30,  -30,  -30,  -30,  -30,  -30,
+      -30,  -30,  -30,  -30,  -30,  -30,  -30,  -30,  -30,  -30,
+      -30,  -30,  -30,  -30,  -30,  -30,  -30,  -30,  -30,  -30,
+      -30,  -30,  -30,  -30,  -30,  -30,  -30,  -30,  -30,  -30,
+      -30,  -30,  -30,  -30,  -30,  -30,  -30,  -30,  -30,  -30,
+      -30,  -30,  -30,  -30,  -30,  -30,  -30,  -30,  -30,  -30,
+      -30,  -30,  -30,  -30,  -30,  -30,  -30,  -30,  -30,  -30,
+      -30,  -30,  -30,  -30,  -30,  -30,  -30,  -30,  -30,  -30,
+
+      -30,  -30,  -30,  -30,  -30,  -30,  -30,  -30,  -30,  -30,
+      -30,  -30,  -30,  -30,  -30,  -30,  -30,  -30,  -30,  -30,
+      -30,  -30,  -30,  -30,  -30,  -30,  -30,  -30
+    },
+
+    {
+        3,  -31,  -31,  -31,  -31,  -31,  -31,  -31,  -31,  -31,
+      -31,  -31,  -31,  -31,  -31,  -31,  -31,  -31,  -31,  -31,
+      -31,  -31,  -31,  -31,  -31,  -31,  -31,  -31,  -31,  -31,
+      -31,  -31,  -31,  -31,  -31,  -31,  -31,  -31,  -31,  -31,
+      -31,  -31,  -31,  -31,  -31,  -31,  -31,  -31,  -31,  -31,
+      -31,  -31,  -31,  -31,  -31,  -31,  -31,  -31,  -31,  -31,
+      -31,  -31,  -31,  -31,  -31,  -31,  -31,  -31,  -31,  -31,
+
+      -31,  -31,  -31,  -31,  -31,  -31,  -31,  -31,  -31,  -31,
+      -31,  -31,  -31,  -31,  -31,  -31,  -31,  -31,  -31,  -31,
+      -31,  -31,  -31,  -31,  -31,  -31,  -31,  -31,  -31,  -31,
+      -31,  -31,  -31,  -31,  -31,  -31,  -31,  -31,  -31,  -31,
+      -31,  -31,  -31,  -31,  -31,  -31,  -31,  -31,  -31,  -31,
+      -31,  -31,  -31,  -31,  -31,  -31,  -31,  -31
+    },
+
+    {
+        3,  -32,  -32,  -32,  -32,  -32,  -32,  -32,  -32,  -32,
+      -32,  -32,  -32,  -32,  -32,  -32,  -32,  -32,  -32,  -32,
+      -32,  -32,  -32,  -32,  -32,  -32,  -32,  -32,  -32,  -32,
+      -32,  -32,  -32,  -32,  -32,  -32,  -32,  -32,  -32,  -32,
+
+      -32,  -32,  -32,  -32,  -32,  -32,  -32,  -32,   38,   38,
+       38,   38,   38,   38,   38,   38,   38,   38,  -32,  -32,
+      -32,  -32,  -32,  -32,  -32,   38,   38,   38,   38,   38,
+       38,   38,   38,   38,   38,   38,   38,   38,   38,   38,
+       38,   38,   38,   38,   38,   38,   38,   38,   38,   38,
+       38,  -32,  -32,  -32,  -32,   38,  -32,   38,   38,   38,
+       38,   38,   38,   38,   38,   38,   38,   38,   38,   38,
+       38,   38,   38,   38,   38,   38,   38,   38,   38,   38,
+       38,   38,   38,  -32,  -32,  -32,  -32,  -32
+    },
+
+    {
+        3,  -33,  -33,  -33,  -33,  -33,  -33,  -33,  -33,  -33,
+
+      -33,  -33,  -33,  -33,  -33,  -33,  -33,  -33,  -33,  -33,
+      -33,  -33,  -33,  -33,  -33,  -33,  -33,  -33,  -33,  -33,
+      -33,  -33,  -33,  -33,  -33,  -33,  -33,  -33,  -33,  -33,
+      -33,  -33,  -33,  -33,  -33,  -33,  -33,  -33,   33,   33,
+       33,   33,   33,   33,   33,   33,   33,   33,  -33,  -33,
+      -33,  -33,  -33,  -33,  -33,   33,   33,   33,   33,   33,
+       33,   33,   33,   33,   33,   33,   33,   33,   33,   33,
+       33,   33,   33,   33,   33,   33,   33,   33,   33,   33,
+       33,  -33,  -33,  -33,  -33,   33,  -33,   33,   33,   33,
+       33,   33,   33,   33,   33,   33,   33,   33,   33,   33,
+
+       33,   33,   33,   33,   33,   33,   33,   33,   33,   33,
+       33,   33,   33,  -33,  -33,  -33,  -33,  -33
+    },
+
+    {
+        3,  -34,  -34,  -34,  -34,  -34,  -34,  -34,  -34,  -34,
+      -34,  -34,  -34,  -34,  -34,  -34,  -34,  -34,  -34,  -34,
+      -34,  -34,  -34,  -34,  -34,  -34,  -34,  -34,  -34,  -34,
+      -34,  -34,  -34,  -34,  -34,  -34,  -34,  -34,  -34,  -34,
+      -34,  -34,  -34,  -34,  -34,  -34,  -34,  -34,   34,   34,
+       34,   34,   34,   34,   34,   34,   34,   34,  -34,  -34,
+      -34,  -34,  -34,  -34,  -34,   34,   34,   34,   34,   34,
+       34,   34,   34,   34,   34,   34,   34,   34,   34,   34,
+
+       34,   34,   34,   34,   34,   34,   34,   34,   34,   34,
+       34,  -34,  -34,  -34,  -34,   34,  -34,   34,   34,   34,
+       34,   34,   34,   34,   34,   34,   34,   34,   34,   34,
+       34,   34,   34,   34,   34,   34,   34,   34,   34,   34,
+       34,   34,   34,  -34,  -34,  -34,  -34,  -34
+    },
+
+    {
+        3,  -35,  -35,  -35,  -35,  -35,  -35,  -35,  -35,  -35,
+      -35,  -35,  -35,  -35,  -35,  -35,  -35,  -35,  -35,  -35,
+      -35,  -35,  -35,  -35,  -35,  -35,  -35,  -35,  -35,  -35,
+      -35,  -35,  -35,  -35,  -35,  -35,  -35,  -35,  -35,  -35,
+      -35,  -35,  -35,  -35,  -35,  -35,  -35,  -35,   35,   35,
+
+       35,   35,   35,   35,   35,   35,   35,   35,  -35,  -35,
+      -35,  -35,  -35,  -35,  -35,  -35,  -35,  -35,  -35,   28,
+      -35,  -35,  -35,  -35,  -35,  -35,  -35,  -35,  -35,  -35,
+      -35,  -35,  -35,  -35,  -35,  -35,  -35,  -35,  -35,  -35,
+      -35,  -35,  -35,  -35,  -35,  -35,  -35,  -35,  -35,  -35,
+      -35,   28,  -35,  -35,  -35,  -35,  -35,  -35,  -35,  -35,
+      -35,  -35,  -35,  -35,  -35,  -35,  -35,  -35,  -35,  -35,
+      -35,  -35,  -35,  -35,  -35,  -35,  -35,  -35
+    },
+
+    {
+        3,  -36,  -36,  -36,  -36,  -36,  -36,  -36,  -36,  -36,
+      -36,  -36,  -36,  -36,  -36,  -36,  -36,  -36,  -36,  -36,
+
+      -36,  -36,  -36,  -36,  -36,  -36,  -36,  -36,  -36,  -36,
+      -36,  -36,  -36,  -36,  -36,  -36,  -36,  -36,  -36,  -36,
+      -36,  -36,  -36,  -36,  -36,  -36,  -36,  -36,   37,   37,
+       37,   37,   37,   37,   37,   37,   37,   37,  -36,  -36,
+      -36,  -36,  -36,  -36,  -36,  -36,  -36,  -36,  -36,  -36,
+      -36,  -36,  -36,  -36,  -36,  -36,  -36,  -36,  -36,  -36,
+      -36,  -36,  -36,  -36,  -36,  -36,  -36,  -36,  -36,  -36,
+      -36,  -36,  -36,  -36,  -36,  -36,  -36,  -36,  -36,  -36,
+      -36,  -36,  -36,  -36,  -36,  -36,  -36,  -36,  -36,  -36,
+      -36,  -36,  -36,  -36,  -36,  -36,  -36,  -36,  -36,  -36,
+
+      -36,  -36,  -36,  -36,  -36,  -36,  -36,  -36
+    },
+
+    {
+        3,  -37,  -37,  -37,  -37,  -37,  -37,  -37,  -37,  -37,
+      -37,  -37,  -37,  -37,  -37,  -37,  -37,  -37,  -37,  -37,
+      -37,  -37,  -37,  -37,  -37,  -37,  -37,  -37,  -37,  -37,
+      -37,  -37,  -37,  -37,  -37,  -37,  -37,  -37,  -37,  -37,
+      -37,  -37,  -37,  -37,  -37,  -37,  -37,  -37,   37,   37,
+       37,   37,   37,   37,   37,   37,   37,   37,  -37,  -37,
+      -37,  -37,  -37,  -37,  -37,  -37,  -37,  -37,  -37,  -37,
+      -37,  -37,  -37,  -37,  -37,  -37,  -37,  -37,  -37,  -37,
+      -37,  -37,  -37,  -37,  -37,  -37,  -37,  -37,  -37,  -37,
+
+      -37,  -37,  -37,  -37,  -37,  -37,  -37,  -37,  -37,  -37,
+      -37,  -37,  -37,  -37,  -37,  -37,  -37,  -37,  -37,  -37,
+      -37,  -37,  -37,  -37,  -37,  -37,  -37,  -37,  -37,  -37,
+      -37,  -37,  -37,  -37,  -37,  -37,  -37,  -37
+    },
+
+    {
+        3,  -38,  -38,  -38,  -38,  -38,  -38,  -38,  -38,  -38,
+      -38,  -38,  -38,  -38,  -38,  -38,  -38,  -38,  -38,  -38,
+      -38,  -38,  -38,  -38,  -38,  -38,  -38,  -38,  -38,  -38,
+      -38,  -38,  -38,  -38,  -38,  -38,  -38,  -38,  -38,  -38,
+      -38,  -38,  -38,  -38,  -38,  -38,  -38,  -38,   38,   38,
+       38,   38,   38,   38,   38,   38,   38,   38,  -38,  -38,
+
+      -38,  -38,  -38,  -38,  -38,   38,   38,   38,   38,   38,
+       38,   38,   38,   38,   38,   38,   38,   38,   38,   38,
+       38,   38,   38,   38,   38,   38,   38,   38,   38,   38,
+       38,  -38,  -38,  -38,  -38,   38,  -38,   38,   38,   38,
+       38,   38,   38,   38,   38,   38,   38,   38,   38,   38,
+       38,   38,   38,   38,   38,   38,   38,   38,   38,   38,
+       38,   38,   38,  -38,  -38,  -38,  -38,  -38
+    },
+
+    } ;
+
+static yy_state_type yy_get_previous_state (void );
+static yy_state_type yy_try_NUL_trans (yy_state_type current_state  );
+static int yy_get_next_buffer (void );
+static void yy_fatal_error (yyconst char msg[]  );
+
+/* Done after the current pattern has been matched and before the
+ * corresponding action - sets up yytext.
+ */
+#define YY_DO_BEFORE_ACTION \
+	(yytext_ptr) = yy_bp; \
+	yyleng = (size_t) (yy_cp - yy_bp); \
+	(yy_hold_char) = *yy_cp; \
+	*yy_cp = '\0'; \
+	(yy_c_buf_p) = yy_cp;
+
+#define YY_NUM_RULES 22
+#define YY_END_OF_BUFFER 23
+/* This struct is not used in this scanner,
+   but its presence is necessary. */
+struct yy_trans_info
+	{
+	flex_int32_t yy_verify;
+	flex_int32_t yy_nxt;
+	};
+static yyconst flex_int16_t yy_accept[39] =
+    {   0,
+        0,    0,   23,   22,    1,   22,   19,   20,    8,    6,
+        7,    9,    2,   18,   12,   22,   13,   17,   22,    5,
+       10,   21,    1,    4,   16,    0,    2,    0,   14,   11,
+       15,    3,    5,    4,    2,    0,    2,    3
+    } ;
+
+static yy_state_type yy_last_accepting_state;
+static char *yy_last_accepting_cpos;
+
+static yyconst yy_state_type yy_NUL_trans[39] =
+    {   0,
+       22,   22,    0,    0,    0,    0,    0,    0,    0,    0,
+        0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
+        0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
+        0,    0,    0,    0,    0,    0,    0,    0
+    } ;
+
+extern int yy_flex_debug;
+int yy_flex_debug = 0;
+
+/* The intent behind this definition is that it'll catch
+ * any uses of REJECT which flex missed.
+ */
+#define REJECT reject_used_but_not_detected
+#define yymore() yymore_used_but_not_detected
+#define YY_MORE_ADJ 0
+#define YY_RESTORE_YY_MORE_OFFSET
+char *yytext;
+#line 1 "lex_parser.lex"
+#line 3 "lex_parser.lex"
+
+extern "C"
+{
+  int yylex(void);
+}
+#undef  YY_INPUT
+#define YY_INPUT(b, r, s) readInputForLexer(b, &r, s)
+#include <string>
+
+int readInputForLexer(char* buffer, size_t* numBytesRead, size_t maxBytesToRead);
+
+#include "filter_expr_node.hpp"
+#include "yacc_parser.hpp"
+
+#line 1098 "lex_parser.cpp"
+
+#define INITIAL 0
+
+#ifndef YY_NO_UNISTD_H
+/* Special case for "unistd.h", since it is non-ANSI. We include it way
+ * down here because we want the user's section 1 to have been scanned first.
+ * The user has a chance to override it with an option.
+ */
+#include <unistd.h>
+#endif
+
+#ifndef YY_EXTRA_TYPE
+#define YY_EXTRA_TYPE void *
+#endif
+
+static int yy_init_globals (void );
+
+/* Accessor methods to globals.
+   These are made visible to non-reentrant scanners for convenience. */
+
+int yylex_destroy (void );
+
+int yyget_debug (void );
+
+void yyset_debug (int debug_flag  );
+
+YY_EXTRA_TYPE yyget_extra (void );
+
+void yyset_extra (YY_EXTRA_TYPE user_defined  );
+
+FILE *yyget_in (void );
+
+void yyset_in  (FILE * in_str  );
+
+FILE *yyget_out (void );
+
+void yyset_out  (FILE * out_str  );
+
+yy_size_t yyget_leng (void );
+
+char *yyget_text (void );
+
+int yyget_lineno (void );
+
+void yyset_lineno (int line_number  );
+
+/* Macros after this point can all be overridden by user definitions in
+ * section 1.
+ */
+
+#ifndef YY_SKIP_YYWRAP
+#ifdef __cplusplus
+extern "C" int yywrap (void );
+#else
+extern int yywrap (void );
+#endif
+#endif
+
+    static void yyunput (int c,char *buf_ptr  );
+    
+#ifndef yytext_ptr
+static void yy_flex_strncpy (char *,yyconst char *,int );
+#endif
+
+#ifdef YY_NEED_STRLEN
+static int yy_flex_strlen (yyconst char * );
+#endif
+
+#ifndef YY_NO_INPUT
+
+#ifdef __cplusplus
+static int yyinput (void );
+#else
+static int input (void );
+#endif
+
+#endif
+
+/* Amount of stuff to slurp up with each read. */
+#ifndef YY_READ_BUF_SIZE
+#define YY_READ_BUF_SIZE 8192
+#endif
+
+/* Copy whatever the last rule matched to the standard output. */
+#ifndef ECHO
+/* This used to be an fputs(), but since the string might contain NUL's,
+ * we now use fwrite().
+ */
+#define ECHO do { if (fwrite( yytext, yyleng, 1, yyout )) {} } while (0)
+#endif
+
+/* Gets input and stuffs it into "buf".  number of characters read, or YY_NULL,
+ * is returned in "result".
+ */
+#ifndef YY_INPUT
+#define YY_INPUT(buf,result,max_size) \
+	errno=0; \
+	while ( (result = read( fileno(yyin), (char *) buf, max_size )) < 0 ) \
+	{ \
+		if( errno != EINTR) \
+		{ \
+			YY_FATAL_ERROR( "input in flex scanner failed" ); \
+			break; \
+		} \
+		errno=0; \
+		clearerr(yyin); \
+	}\
+\
+
+#endif
+
+/* No semi-colon after return; correct usage is to write "yyterminate();" -
+ * we don't want an extra ';' after the "return" because that will cause
+ * some compilers to complain about unreachable statements.
+ */
+#ifndef yyterminate
+#define yyterminate() return YY_NULL
+#endif
+
+/* Number of entries by which start-condition stack grows. */
+#ifndef YY_START_STACK_INCR
+#define YY_START_STACK_INCR 25
+#endif
+
+/* Report a fatal error. */
+#ifndef YY_FATAL_ERROR
+#define YY_FATAL_ERROR(msg) yy_fatal_error( msg )
+#endif
+
+/* end tables serialization structures and prototypes */
+
+/* Default declaration of generated scanner - a define so the user can
+ * easily add parameters.
+ */
+#ifndef YY_DECL
+#define YY_DECL_IS_OURS 1
+
+extern int yylex (void);
+
+#define YY_DECL int yylex (void)
+#endif /* !YY_DECL */
+
+/* Code executed at the beginning of each rule, after yytext and yyleng
+ * have been set up.
+ */
+#ifndef YY_USER_ACTION
+#define YY_USER_ACTION
+#endif
+
+/* Code executed at the end of each rule. */
+#ifndef YY_BREAK
+#define YY_BREAK break;
+#endif
+
+#define YY_RULE_SETUP \
+	YY_USER_ACTION
+
+/** The main scanner function which does all the work.
+ */
+YY_DECL
+{
+	register yy_state_type yy_current_state;
+	register char *yy_cp, *yy_bp;
+	register int yy_act;
+    
+#line 29 "lex_parser.lex"
+
+
+#line 1267 "lex_parser.cpp"
+
+	if ( !(yy_init) )
+		{
+		(yy_init) = 1;
+
+#ifdef YY_USER_INIT
+		YY_USER_INIT;
+#endif
+
+		if ( ! (yy_start) )
+			(yy_start) = 1;	/* first start state */
+
+		if ( ! yyin )
+			yyin = stdin;
+
+		if ( ! yyout )
+			yyout = stdout;
+
+		if ( ! YY_CURRENT_BUFFER ) {
+			yyensure_buffer_stack ();
+			YY_CURRENT_BUFFER_LVALUE =
+				yy_create_buffer(yyin,YY_BUF_SIZE );
+		}
+
+		yy_load_buffer_state( );
+		}
+
+	while ( 1 )		/* loops until end-of-file is reached */
+		{
+		yy_cp = (yy_c_buf_p);
+
+		/* Support of yytext. */
+		*yy_cp = (yy_hold_char);
+
+		/* yy_bp points to the position in yy_ch_buf of the start of
+		 * the current run.
+		 */
+		yy_bp = yy_cp;
+
+		yy_current_state = (yy_start);
+yy_match:
+		while ( (yy_current_state = yy_nxt[yy_current_state][ YY_SC_TO_UI(*yy_cp) ]) > 0 )
+			{
+			if ( yy_accept[yy_current_state] )
+				{
+				(yy_last_accepting_state) = yy_current_state;
+				(yy_last_accepting_cpos) = yy_cp;
+				}
+
+			++yy_cp;
+			}
+
+		yy_current_state = -yy_current_state;
+
+yy_find_action:
+		yy_act = yy_accept[yy_current_state];
+
+		YY_DO_BEFORE_ACTION;
+
+do_action:	/* This label is used only to access EOF actions. */
+
+		switch ( yy_act )
+	{ /* beginning of action switch */
+			case 0: /* must back up */
+			/* undo the effects of YY_DO_BEFORE_ACTION */
+			*yy_cp = (yy_hold_char);
+			yy_cp = (yy_last_accepting_cpos) + 1;
+			yy_current_state = (yy_last_accepting_state);
+			goto yy_find_action;
+
+case 1:
+YY_RULE_SETUP
+#line 31 "lex_parser.lex"
+{ /* We ignore white characters */ }
+	YY_BREAK
+case 2:
+YY_RULE_SETUP
+#line 33 "lex_parser.lex"
+{
+            yylval.str = new std::string(yytext);
+            return NUMBER;
+          }
+	YY_BREAK
+case 3:
+YY_RULE_SETUP
+#line 38 "lex_parser.lex"
+{
+            yylval.str = new std::string(yytext + 1);
+            return AVERAGE;
+          }
+	YY_BREAK
+case 4:
+YY_RULE_SETUP
+#line 43 "lex_parser.lex"
+{
+            yylval.str = new std::string(yytext + 1);
+            return VAR;
+          }
+	YY_BREAK
+case 5:
+YY_RULE_SETUP
+#line 48 "lex_parser.lex"
+{
+            yylval.str = new std::string(yytext);
+            return ID;
+          }                   
+	YY_BREAK
+case 6:
+YY_RULE_SETUP
+#line 54 "lex_parser.lex"
+return PLUS;
+	YY_BREAK
+case 7:
+YY_RULE_SETUP
+#line 55 "lex_parser.lex"
+return MINUS;
+	YY_BREAK
+case 8:
+YY_RULE_SETUP
+#line 57 "lex_parser.lex"
+return TIMES;
+	YY_BREAK
+case 9:
+YY_RULE_SETUP
+#line 58 "lex_parser.lex"
+return DIVIDE;
+	YY_BREAK
+case 10:
+YY_RULE_SETUP
+#line 60 "lex_parser.lex"
+return POWER;
+	YY_BREAK
+case 11:
+YY_RULE_SETUP
+#line 62 "lex_parser.lex"
+return EQ;
+	YY_BREAK
+case 12:
+YY_RULE_SETUP
+#line 63 "lex_parser.lex"
+return LT;
+	YY_BREAK
+case 13:
+YY_RULE_SETUP
+#line 64 "lex_parser.lex"
+return GT;
+	YY_BREAK
+case 14:
+YY_RULE_SETUP
+#line 65 "lex_parser.lex"
+return LE;
+	YY_BREAK
+case 15:
+YY_RULE_SETUP
+#line 66 "lex_parser.lex"
+return GE;
+	YY_BREAK
+case 16:
+YY_RULE_SETUP
+#line 67 "lex_parser.lex"
+return NE;
+	YY_BREAK
+case 17:
+YY_RULE_SETUP
+#line 68 "lex_parser.lex"
+return QUESTION_MARK;
+	YY_BREAK
+case 18:
+YY_RULE_SETUP
+#line 69 "lex_parser.lex"
+return COLON;
+	YY_BREAK
+case 19:
+YY_RULE_SETUP
+#line 70 "lex_parser.lex"
+return LEFT_PARENTHESIS;
+	YY_BREAK
+case 20:
+YY_RULE_SETUP
+#line 71 "lex_parser.lex"
+return RIGHT_PARENTHESIS;
+	YY_BREAK
+case 21:
+YY_RULE_SETUP
+#line 73 "lex_parser.lex"
+return END;
+	YY_BREAK
+case 22:
+YY_RULE_SETUP
+#line 74 "lex_parser.lex"
+ECHO;
+	YY_BREAK
+#line 1460 "lex_parser.cpp"
+case YY_STATE_EOF(INITIAL):
+	yyterminate();
+
+	case YY_END_OF_BUFFER:
+		{
+		/* Amount of text matched not including the EOB char. */
+		int yy_amount_of_matched_text = (int) (yy_cp - (yytext_ptr)) - 1;
+
+		/* Undo the effects of YY_DO_BEFORE_ACTION. */
+		*yy_cp = (yy_hold_char);
+		YY_RESTORE_YY_MORE_OFFSET
+
+		if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_NEW )
+			{
+			/* We're scanning a new file or input source.  It's
+			 * possible that this happened because the user
+			 * just pointed yyin at a new source and called
+			 * yylex().  If so, then we have to assure
+			 * consistency between YY_CURRENT_BUFFER and our
+			 * globals.  Here is the right place to do so, because
+			 * this is the first action (other than possibly a
+			 * back-up) that will match for the new input source.
+			 */
+			(yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
+			YY_CURRENT_BUFFER_LVALUE->yy_input_file = yyin;
+			YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL;
+			}
+
+		/* Note that here we test for yy_c_buf_p "<=" to the position
+		 * of the first EOB in the buffer, since yy_c_buf_p will
+		 * already have been incremented past the NUL character
+		 * (since all states make transitions on EOB to the
+		 * end-of-buffer state).  Contrast this with the test
+		 * in input().
+		 */
+		if ( (yy_c_buf_p) <= &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] )
+			{ /* This was really a NUL. */
+			yy_state_type yy_next_state;
+
+			(yy_c_buf_p) = (yytext_ptr) + yy_amount_of_matched_text;
+
+			yy_current_state = yy_get_previous_state(  );
+
+			/* Okay, we're now positioned to make the NUL
+			 * transition.  We couldn't have
+			 * yy_get_previous_state() go ahead and do it
+			 * for us because it doesn't know how to deal
+			 * with the possibility of jamming (and we don't
+			 * want to build jamming into it because then it
+			 * will run more slowly).
+			 */
+
+			yy_next_state = yy_try_NUL_trans( yy_current_state );
+
+			yy_bp = (yytext_ptr) + YY_MORE_ADJ;
+
+			if ( yy_next_state )
+				{
+				/* Consume the NUL. */
+				yy_cp = ++(yy_c_buf_p);
+				yy_current_state = yy_next_state;
+				goto yy_match;
+				}
+
+			else
+				{
+				yy_cp = (yy_c_buf_p);
+				goto yy_find_action;
+				}
+			}
+
+		else switch ( yy_get_next_buffer(  ) )
+			{
+			case EOB_ACT_END_OF_FILE:
+				{
+				(yy_did_buffer_switch_on_eof) = 0;
+
+				if ( yywrap( ) )
+					{
+					/* Note: because we've taken care in
+					 * yy_get_next_buffer() to have set up
+					 * yytext, we can now set up
+					 * yy_c_buf_p so that if some total
+					 * hoser (like flex itself) wants to
+					 * call the scanner after we return the
+					 * YY_NULL, it'll still work - another
+					 * YY_NULL will get returned.
+					 */
+					(yy_c_buf_p) = (yytext_ptr) + YY_MORE_ADJ;
+
+					yy_act = YY_STATE_EOF(YY_START);
+					goto do_action;
+					}
+
+				else
+					{
+					if ( ! (yy_did_buffer_switch_on_eof) )
+						YY_NEW_FILE;
+					}
+				break;
+				}
+
+			case EOB_ACT_CONTINUE_SCAN:
+				(yy_c_buf_p) =
+					(yytext_ptr) + yy_amount_of_matched_text;
+
+				yy_current_state = yy_get_previous_state(  );
+
+				yy_cp = (yy_c_buf_p);
+				yy_bp = (yytext_ptr) + YY_MORE_ADJ;
+				goto yy_match;
+
+			case EOB_ACT_LAST_MATCH:
+				(yy_c_buf_p) =
+				&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)];
+
+				yy_current_state = yy_get_previous_state(  );
+
+				yy_cp = (yy_c_buf_p);
+				yy_bp = (yytext_ptr) + YY_MORE_ADJ;
+				goto yy_find_action;
+			}
+		break;
+		}
+
+	default:
+		YY_FATAL_ERROR(
+			"fatal flex scanner internal error--no action found" );
+	} /* end of action switch */
+		} /* end of scanning one token */
+} /* end of yylex */
+
+/* yy_get_next_buffer - try to read in a new buffer
+ *
+ * Returns a code representing an action:
+ *	EOB_ACT_LAST_MATCH -
+ *	EOB_ACT_CONTINUE_SCAN - continue scanning from current position
+ *	EOB_ACT_END_OF_FILE - end of file
+ */
+static int yy_get_next_buffer (void)
+{
+    	register char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf;
+	register char *source = (yytext_ptr);
+	register int number_to_move, i;
+	int ret_val;
+
+	if ( (yy_c_buf_p) > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] )
+		YY_FATAL_ERROR(
+		"fatal flex scanner internal error--end of buffer missed" );
+
+	if ( YY_CURRENT_BUFFER_LVALUE->yy_fill_buffer == 0 )
+		{ /* Don't try to fill the buffer, so this is an EOF. */
+		if ( (yy_c_buf_p) - (yytext_ptr) - YY_MORE_ADJ == 1 )
+			{
+			/* We matched a single character, the EOB, so
+			 * treat this as a final EOF.
+			 */
+			return EOB_ACT_END_OF_FILE;
+			}
+
+		else
+			{
+			/* We matched some text prior to the EOB, first
+			 * process it.
+			 */
+			return EOB_ACT_LAST_MATCH;
+			}
+		}
+
+	/* Try to read more data. */
+
+	/* First move last chars to start of buffer. */
+	number_to_move = (int) ((yy_c_buf_p) - (yytext_ptr)) - 1;
+
+	for ( i = 0; i < number_to_move; ++i )
+		*(dest++) = *(source++);
+
+	if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_EOF_PENDING )
+		/* don't do the read, it's not guaranteed to return an EOF,
+		 * just force an EOF
+		 */
+		YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars) = 0;
+
+	else
+		{
+			yy_size_t num_to_read =
+			YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1;
+
+		while ( num_to_read <= 0 )
+			{ /* Not enough room in the buffer - grow it. */
+
+			/* just a shorter name for the current buffer */
+			YY_BUFFER_STATE b = YY_CURRENT_BUFFER_LVALUE;
+
+			int yy_c_buf_p_offset =
+				(int) ((yy_c_buf_p) - b->yy_ch_buf);
+
+			if ( b->yy_is_our_buffer )
+				{
+				yy_size_t new_size = b->yy_buf_size * 2;
+
+				if ( new_size <= 0 )
+					b->yy_buf_size += b->yy_buf_size / 8;
+				else
+					b->yy_buf_size *= 2;
+
+				b->yy_ch_buf = (char *)
+					/* Include room in for 2 EOB chars. */
+					yyrealloc((void *) b->yy_ch_buf,b->yy_buf_size + 2  );
+				}
+			else
+				/* Can't grow it, we don't own it. */
+				b->yy_ch_buf = 0;
+
+			if ( ! b->yy_ch_buf )
+				YY_FATAL_ERROR(
+				"fatal error - scanner input buffer overflow" );
+
+			(yy_c_buf_p) = &b->yy_ch_buf[yy_c_buf_p_offset];
+
+			num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size -
+						number_to_move - 1;
+
+			}
+
+		if ( num_to_read > YY_READ_BUF_SIZE )
+			num_to_read = YY_READ_BUF_SIZE;
+
+		/* Read in more data. */
+		YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]),
+			(yy_n_chars), num_to_read );
+
+		YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
+		}
+
+	if ( (yy_n_chars) == 0 )
+		{
+		if ( number_to_move == YY_MORE_ADJ )
+			{
+			ret_val = EOB_ACT_END_OF_FILE;
+			yyrestart(yyin  );
+			}
+
+		else
+			{
+			ret_val = EOB_ACT_LAST_MATCH;
+			YY_CURRENT_BUFFER_LVALUE->yy_buffer_status =
+				YY_BUFFER_EOF_PENDING;
+			}
+		}
+
+	else
+		ret_val = EOB_ACT_CONTINUE_SCAN;
+
+	if ((yy_size_t) ((yy_n_chars) + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) {
+		/* Extend the array by 50%, plus the number we really need. */
+		yy_size_t new_size = (yy_n_chars) + number_to_move + ((yy_n_chars) >> 1);
+		YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) yyrealloc((void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf,new_size  );
+		if ( ! YY_CURRENT_BUFFER_LVALUE->yy_ch_buf )
+			YY_FATAL_ERROR( "out of dynamic memory in yy_get_next_buffer()" );
+	}
+
+	(yy_n_chars) += number_to_move;
+	YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] = YY_END_OF_BUFFER_CHAR;
+	YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] = YY_END_OF_BUFFER_CHAR;
+
+	(yytext_ptr) = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[0];
+
+	return ret_val;
+}
+
+/* yy_get_previous_state - get the state just before the EOB char was reached */
+
+    static yy_state_type yy_get_previous_state (void)
+{
+	register yy_state_type yy_current_state;
+	register char *yy_cp;
+    
+	yy_current_state = (yy_start);
+
+	for ( yy_cp = (yytext_ptr) + YY_MORE_ADJ; yy_cp < (yy_c_buf_p); ++yy_cp )
+		{
+		if ( *yy_cp )
+			{
+			yy_current_state = yy_nxt[yy_current_state][YY_SC_TO_UI(*yy_cp)];
+			}
+		else
+			yy_current_state = yy_NUL_trans[yy_current_state];
+		if ( yy_accept[yy_current_state] )
+			{
+			(yy_last_accepting_state) = yy_current_state;
+			(yy_last_accepting_cpos) = yy_cp;
+			}
+		}
+
+	return yy_current_state;
+}
+
+/* yy_try_NUL_trans - try to make a transition on the NUL character
+ *
+ * synopsis
+ *	next_state = yy_try_NUL_trans( current_state );
+ */
+    static yy_state_type yy_try_NUL_trans  (yy_state_type yy_current_state )
+{
+	register int yy_is_jam;
+    	register char *yy_cp = (yy_c_buf_p);
+
+	yy_current_state = yy_NUL_trans[yy_current_state];
+	yy_is_jam = (yy_current_state == 0);
+
+	if ( ! yy_is_jam )
+		{
+		if ( yy_accept[yy_current_state] )
+			{
+			(yy_last_accepting_state) = yy_current_state;
+			(yy_last_accepting_cpos) = yy_cp;
+			}
+		}
+
+		return yy_is_jam ? 0 : yy_current_state;
+}
+
+    static void yyunput (int c, register char * yy_bp )
+{
+	register char *yy_cp;
+    
+    yy_cp = (yy_c_buf_p);
+
+	/* undo effects of setting up yytext */
+	*yy_cp = (yy_hold_char);
+
+	if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 )
+		{ /* need to shift things up to make room */
+		/* +2 for EOB chars. */
+		register yy_size_t number_to_move = (yy_n_chars) + 2;
+		register char *dest = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[
+					YY_CURRENT_BUFFER_LVALUE->yy_buf_size + 2];
+		register char *source =
+				&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move];
+
+		while ( source > YY_CURRENT_BUFFER_LVALUE->yy_ch_buf )
+			*--dest = *--source;
+
+		yy_cp += (int) (dest - source);
+		yy_bp += (int) (dest - source);
+		YY_CURRENT_BUFFER_LVALUE->yy_n_chars =
+			(yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_buf_size;
+
+		if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 )
+			YY_FATAL_ERROR( "flex scanner push-back overflow" );
+		}
+
+	*--yy_cp = (char) c;
+
+	(yytext_ptr) = yy_bp;
+	(yy_hold_char) = *yy_cp;
+	(yy_c_buf_p) = yy_cp;
+}
+
+#ifndef YY_NO_INPUT
+#ifdef __cplusplus
+    static int yyinput (void)
+#else
+    static int input  (void)
+#endif
+
+{
+	int c;
+    
+	*(yy_c_buf_p) = (yy_hold_char);
+
+	if ( *(yy_c_buf_p) == YY_END_OF_BUFFER_CHAR )
+		{
+		/* yy_c_buf_p now points to the character we want to return.
+		 * If this occurs *before* the EOB characters, then it's a
+		 * valid NUL; if not, then we've hit the end of the buffer.
+		 */
+		if ( (yy_c_buf_p) < &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] )
+			/* This was really a NUL. */
+			*(yy_c_buf_p) = '\0';
+
+		else
+			{ /* need more input */
+			yy_size_t offset = (yy_c_buf_p) - (yytext_ptr);
+			++(yy_c_buf_p);
+
+			switch ( yy_get_next_buffer(  ) )
+				{
+				case EOB_ACT_LAST_MATCH:
+					/* This happens because yy_g_n_b()
+					 * sees that we've accumulated a
+					 * token and flags that we need to
+					 * try matching the token before
+					 * proceeding.  But for input(),
+					 * there's no matching to consider.
+					 * So convert the EOB_ACT_LAST_MATCH
+					 * to EOB_ACT_END_OF_FILE.
+					 */
+
+					/* Reset buffer status. */
+					yyrestart(yyin );
+
+					/*FALLTHROUGH*/
+
+				case EOB_ACT_END_OF_FILE:
+					{
+					if ( yywrap( ) )
+						return EOF;
+
+					if ( ! (yy_did_buffer_switch_on_eof) )
+						YY_NEW_FILE;
+#ifdef __cplusplus
+					return yyinput();
+#else
+					return input();
+#endif
+					}
+
+				case EOB_ACT_CONTINUE_SCAN:
+					(yy_c_buf_p) = (yytext_ptr) + offset;
+					break;
+				}
+			}
+		}
+
+	c = *(unsigned char *) (yy_c_buf_p);	/* cast for 8-bit char's */
+	*(yy_c_buf_p) = '\0';	/* preserve yytext */
+	(yy_hold_char) = *++(yy_c_buf_p);
+
+	return c;
+}
+#endif	/* ifndef YY_NO_INPUT */
+
+/** Immediately switch to a different input stream.
+ * @param input_file A readable stream.
+ * 
+ * @note This function does not reset the start condition to @c INITIAL .
+ */
+    void yyrestart  (FILE * input_file )
+{
+    
+	if ( ! YY_CURRENT_BUFFER ){
+        yyensure_buffer_stack ();
+		YY_CURRENT_BUFFER_LVALUE =
+            yy_create_buffer(yyin,YY_BUF_SIZE );
+	}
+
+	yy_init_buffer(YY_CURRENT_BUFFER,input_file );
+	yy_load_buffer_state( );
+}
+
+/** Switch to a different input buffer.
+ * @param new_buffer The new input buffer.
+ * 
+ */
+    void yy_switch_to_buffer  (YY_BUFFER_STATE  new_buffer )
+{
+    
+	/* TODO. We should be able to replace this entire function body
+	 * with
+	 *		yypop_buffer_state();
+	 *		yypush_buffer_state(new_buffer);
+     */
+	yyensure_buffer_stack ();
+	if ( YY_CURRENT_BUFFER == new_buffer )
+		return;
+
+	if ( YY_CURRENT_BUFFER )
+		{
+		/* Flush out information for old buffer. */
+		*(yy_c_buf_p) = (yy_hold_char);
+		YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p);
+		YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
+		}
+
+	YY_CURRENT_BUFFER_LVALUE = new_buffer;
+	yy_load_buffer_state( );
+
+	/* We don't actually know whether we did this switch during
+	 * EOF (yywrap()) processing, but the only time this flag
+	 * is looked at is after yywrap() is called, so it's safe
+	 * to go ahead and always set it.
+	 */
+	(yy_did_buffer_switch_on_eof) = 1;
+}
+
+static void yy_load_buffer_state  (void)
+{
+    	(yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
+	(yytext_ptr) = (yy_c_buf_p) = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos;
+	yyin = YY_CURRENT_BUFFER_LVALUE->yy_input_file;
+	(yy_hold_char) = *(yy_c_buf_p);
+}
+
+/** Allocate and initialize an input buffer state.
+ * @param file A readable stream.
+ * @param size The character buffer size in bytes. When in doubt, use @c YY_BUF_SIZE.
+ * 
+ * @return the allocated buffer state.
+ */
+    YY_BUFFER_STATE yy_create_buffer  (FILE * file, int  size )
+{
+	YY_BUFFER_STATE b;
+    
+	b = (YY_BUFFER_STATE) yyalloc(sizeof( struct yy_buffer_state )  );
+	if ( ! b )
+		YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
+
+	b->yy_buf_size = size;
+
+	/* yy_ch_buf has to be 2 characters longer than the size given because
+	 * we need to put in 2 end-of-buffer characters.
+	 */
+	b->yy_ch_buf = (char *) yyalloc(b->yy_buf_size + 2  );
+	if ( ! b->yy_ch_buf )
+		YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
+
+	b->yy_is_our_buffer = 1;
+
+	yy_init_buffer(b,file );
+
+	return b;
+}
+
+/** Destroy the buffer.
+ * @param b a buffer created with yy_create_buffer()
+ * 
+ */
+    void yy_delete_buffer (YY_BUFFER_STATE  b )
+{
+    
+	if ( ! b )
+		return;
+
+	if ( b == YY_CURRENT_BUFFER ) /* Not sure if we should pop here. */
+		YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE) 0;
+
+	if ( b->yy_is_our_buffer )
+		yyfree((void *) b->yy_ch_buf  );
+
+	yyfree((void *) b  );
+}
+
+/* Initializes or reinitializes a buffer.
+ * This function is sometimes called more than once on the same buffer,
+ * such as during a yyrestart() or at EOF.
+ */
+    static void yy_init_buffer  (YY_BUFFER_STATE  b, FILE * file )
+
+{
+	int oerrno = errno;
+    
+	yy_flush_buffer(b );
+
+	b->yy_input_file = file;
+	b->yy_fill_buffer = 1;
+
+    /* If b is the current buffer, then yy_init_buffer was _probably_
+     * called from yyrestart() or through yy_get_next_buffer.
+     * In that case, we don't want to reset the lineno or column.
+     */
+    if (b != YY_CURRENT_BUFFER){
+        b->yy_bs_lineno = 1;
+        b->yy_bs_column = 0;
+    }
+
+        b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0;
+    
+	errno = oerrno;
+}
+
+/** Discard all buffered characters. On the next scan, YY_INPUT will be called.
+ * @param b the buffer state to be flushed, usually @c YY_CURRENT_BUFFER.
+ * 
+ */
+    void yy_flush_buffer (YY_BUFFER_STATE  b )
+{
+    	if ( ! b )
+		return;
+
+	b->yy_n_chars = 0;
+
+	/* We always need two end-of-buffer characters.  The first causes
+	 * a transition to the end-of-buffer state.  The second causes
+	 * a jam in that state.
+	 */
+	b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR;
+	b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR;
+
+	b->yy_buf_pos = &b->yy_ch_buf[0];
+
+	b->yy_at_bol = 1;
+	b->yy_buffer_status = YY_BUFFER_NEW;
+
+	if ( b == YY_CURRENT_BUFFER )
+		yy_load_buffer_state( );
+}
+
+/** Pushes the new state onto the stack. The new state becomes
+ *  the current state. This function will allocate the stack
+ *  if necessary.
+ *  @param new_buffer The new state.
+ *  
+ */
+void yypush_buffer_state (YY_BUFFER_STATE new_buffer )
+{
+    	if (new_buffer == NULL)
+		return;
+
+	yyensure_buffer_stack();
+
+	/* This block is copied from yy_switch_to_buffer. */
+	if ( YY_CURRENT_BUFFER )
+		{
+		/* Flush out information for old buffer. */
+		*(yy_c_buf_p) = (yy_hold_char);
+		YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p);
+		YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
+		}
+
+	/* Only push if top exists. Otherwise, replace top. */
+	if (YY_CURRENT_BUFFER)
+		(yy_buffer_stack_top)++;
+	YY_CURRENT_BUFFER_LVALUE = new_buffer;
+
+	/* copied from yy_switch_to_buffer. */
+	yy_load_buffer_state( );
+	(yy_did_buffer_switch_on_eof) = 1;
+}
+
+/** Removes and deletes the top of the stack, if present.
+ *  The next element becomes the new top.
+ *  
+ */
+void yypop_buffer_state (void)
+{
+    	if (!YY_CURRENT_BUFFER)
+		return;
+
+	yy_delete_buffer(YY_CURRENT_BUFFER );
+	YY_CURRENT_BUFFER_LVALUE = NULL;
+	if ((yy_buffer_stack_top) > 0)
+		--(yy_buffer_stack_top);
+
+	if (YY_CURRENT_BUFFER) {
+		yy_load_buffer_state( );
+		(yy_did_buffer_switch_on_eof) = 1;
+	}
+}
+
+/* Allocates the stack if it does not exist.
+ *  Guarantees space for at least one push.
+ */
+static void yyensure_buffer_stack (void)
+{
+	yy_size_t num_to_alloc;
+    
+	if (!(yy_buffer_stack)) {
+
+		/* First allocation is just for 2 elements, since we don't know if this
+		 * scanner will even need a stack. We use 2 instead of 1 to avoid an
+		 * immediate realloc on the next call.
+         */
+		num_to_alloc = 1;
+		(yy_buffer_stack) = (struct yy_buffer_state**)yyalloc
+								(num_to_alloc * sizeof(struct yy_buffer_state*)
+								);
+		if ( ! (yy_buffer_stack) )
+			YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" );
+								  
+		memset((yy_buffer_stack), 0, num_to_alloc * sizeof(struct yy_buffer_state*));
+				
+		(yy_buffer_stack_max) = num_to_alloc;
+		(yy_buffer_stack_top) = 0;
+		return;
+	}
+
+	if ((yy_buffer_stack_top) >= ((yy_buffer_stack_max)) - 1){
+
+		/* Increase the buffer to prepare for a possible push. */
+		int grow_size = 8 /* arbitrary grow size */;
+
+		num_to_alloc = (yy_buffer_stack_max) + grow_size;
+		(yy_buffer_stack) = (struct yy_buffer_state**)yyrealloc
+								((yy_buffer_stack),
+								num_to_alloc * sizeof(struct yy_buffer_state*)
+								);
+		if ( ! (yy_buffer_stack) )
+			YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" );
+
+		/* zero only the new slots.*/
+		memset((yy_buffer_stack) + (yy_buffer_stack_max), 0, grow_size * sizeof(struct yy_buffer_state*));
+		(yy_buffer_stack_max) = num_to_alloc;
+	}
+}
+
+/** Setup the input buffer state to scan directly from a user-specified character buffer.
+ * @param base the character buffer
+ * @param size the size in bytes of the character buffer
+ * 
+ * @return the newly allocated buffer state object. 
+ */
+YY_BUFFER_STATE yy_scan_buffer  (char * base, yy_size_t  size )
+{
+	YY_BUFFER_STATE b;
+    
+	if ( size < 2 ||
+	     base[size-2] != YY_END_OF_BUFFER_CHAR ||
+	     base[size-1] != YY_END_OF_BUFFER_CHAR )
+		/* They forgot to leave room for the EOB's. */
+		return 0;
+
+	b = (YY_BUFFER_STATE) yyalloc(sizeof( struct yy_buffer_state )  );
+	if ( ! b )
+		YY_FATAL_ERROR( "out of dynamic memory in yy_scan_buffer()" );
+
+	b->yy_buf_size = size - 2;	/* "- 2" to take care of EOB's */
+	b->yy_buf_pos = b->yy_ch_buf = base;
+	b->yy_is_our_buffer = 0;
+	b->yy_input_file = 0;
+	b->yy_n_chars = b->yy_buf_size;
+	b->yy_is_interactive = 0;
+	b->yy_at_bol = 1;
+	b->yy_fill_buffer = 0;
+	b->yy_buffer_status = YY_BUFFER_NEW;
+
+	yy_switch_to_buffer(b  );
+
+	return b;
+}
+
+/** Setup the input buffer state to scan a string. The next call to yylex() will
+ * scan from a @e copy of @a str.
+ * @param yystr a NUL-terminated string to scan
+ * 
+ * @return the newly allocated buffer state object.
+ * @note If you want to scan bytes that may contain NUL values, then use
+ *       yy_scan_bytes() instead.
+ */
+YY_BUFFER_STATE yy_scan_string (yyconst char * yystr )
+{
+    
+	return yy_scan_bytes(yystr,strlen(yystr) );
+}
+
+/** Setup the input buffer state to scan the given bytes. The next call to yylex() will
+ * scan from a @e copy of @a bytes.
+ * @param yybytes the byte buffer to scan
+ * @param _yybytes_len the number of bytes in the buffer pointed to by @a bytes.
+ * 
+ * @return the newly allocated buffer state object.
+ */
+YY_BUFFER_STATE yy_scan_bytes  (yyconst char * yybytes, yy_size_t  _yybytes_len )
+{
+	YY_BUFFER_STATE b;
+	char *buf;
+	yy_size_t n;
+	int i;
+    
+	/* Get memory for full buffer, including space for trailing EOB's. */
+	n = _yybytes_len + 2;
+	buf = (char *) yyalloc(n  );
+	if ( ! buf )
+		YY_FATAL_ERROR( "out of dynamic memory in yy_scan_bytes()" );
+
+	for ( i = 0; i < _yybytes_len; ++i )
+		buf[i] = yybytes[i];
+
+	buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR;
+
+	b = yy_scan_buffer(buf,n );
+	if ( ! b )
+		YY_FATAL_ERROR( "bad buffer in yy_scan_bytes()" );
+
+	/* It's okay to grow etc. this buffer, and we should throw it
+	 * away when we're done.
+	 */
+	b->yy_is_our_buffer = 1;
+
+	return b;
+}
+
+#ifndef YY_EXIT_FAILURE
+#define YY_EXIT_FAILURE 2
+#endif
+
+static void yy_fatal_error (yyconst char* msg )
+{
+    	(void) fprintf( stderr, "%s\n", msg );
+	exit( YY_EXIT_FAILURE );
+}
+
+/* Redefine yyless() so it works in section 3 code. */
+
+#undef yyless
+#define yyless(n) \
+	do \
+		{ \
+		/* Undo effects of setting up yytext. */ \
+        int yyless_macro_arg = (n); \
+        YY_LESS_LINENO(yyless_macro_arg);\
+		yytext[yyleng] = (yy_hold_char); \
+		(yy_c_buf_p) = yytext + yyless_macro_arg; \
+		(yy_hold_char) = *(yy_c_buf_p); \
+		*(yy_c_buf_p) = '\0'; \
+		yyleng = yyless_macro_arg; \
+		} \
+	while ( 0 )
+
+/* Accessor  methods (get/set functions) to struct members. */
+
+/** Get the current line number.
+ * 
+ */
+int yyget_lineno  (void)
+{
+        
+    return yylineno;
+}
+
+/** Get the input stream.
+ * 
+ */
+FILE *yyget_in  (void)
+{
+        return yyin;
+}
+
+/** Get the output stream.
+ * 
+ */
+FILE *yyget_out  (void)
+{
+        return yyout;
+}
+
+/** Get the length of the current token.
+ * 
+ */
+yy_size_t yyget_leng  (void)
+{
+        return yyleng;
+}
+
+/** Get the current token.
+ * 
+ */
+
+char *yyget_text  (void)
+{
+        return yytext;
+}
+
+/** Set the current line number.
+ * @param line_number
+ * 
+ */
+void yyset_lineno (int  line_number )
+{
+    
+    yylineno = line_number;
+}
+
+/** Set the input stream. This does not discard the current
+ * input buffer.
+ * @param in_str A readable stream.
+ * 
+ * @see yy_switch_to_buffer
+ */
+void yyset_in (FILE *  in_str )
+{
+        yyin = in_str ;
+}
+
+void yyset_out (FILE *  out_str )
+{
+        yyout = out_str ;
+}
+
+int yyget_debug  (void)
+{
+        return yy_flex_debug;
+}
+
+void yyset_debug (int  bdebug )
+{
+        yy_flex_debug = bdebug ;
+}
+
+static int yy_init_globals (void)
+{
+        /* Initialization is the same as for the non-reentrant scanner.
+     * This function is called from yylex_destroy(), so don't allocate here.
+     */
+
+    (yy_buffer_stack) = 0;
+    (yy_buffer_stack_top) = 0;
+    (yy_buffer_stack_max) = 0;
+    (yy_c_buf_p) = (char *) 0;
+    (yy_init) = 0;
+    (yy_start) = 0;
+
+/* Defined in main.c */
+#ifdef YY_STDINIT
+    yyin = stdin;
+    yyout = stdout;
+#else
+    yyin = (FILE *) 0;
+    yyout = (FILE *) 0;
+#endif
+
+    /* For future reference: Set errno on error, since we are called by
+     * yylex_init()
+     */
+    return 0;
+}
+
+/* yylex_destroy is for both reentrant and non-reentrant scanners. */
+int yylex_destroy  (void)
+{
+    
+    /* Pop the buffer stack, destroying each element. */
+	while(YY_CURRENT_BUFFER){
+		yy_delete_buffer(YY_CURRENT_BUFFER  );
+		YY_CURRENT_BUFFER_LVALUE = NULL;
+		yypop_buffer_state();
+	}
+
+	/* Destroy the stack itself. */
+	yyfree((yy_buffer_stack) );
+	(yy_buffer_stack) = NULL;
+
+    /* Reset the globals. This is important in a non-reentrant scanner so the next time
+     * yylex() is called, initialization will occur. */
+    yy_init_globals( );
+
+    return 0;
+}
+
+/*
+ * Internal utility routines.
+ */
+
+#ifndef yytext_ptr
+static void yy_flex_strncpy (char* s1, yyconst char * s2, int n )
+{
+	register int i;
+	for ( i = 0; i < n; ++i )
+		s1[i] = s2[i];
+}
+#endif
+
+#ifdef YY_NEED_STRLEN
+static int yy_flex_strlen (yyconst char * s )
+{
+	register int n;
+	for ( n = 0; s[n]; ++n )
+		;
+
+	return n;
+}
+#endif
+
+void *yyalloc (yy_size_t  size )
+{
+	return (void *) malloc( size );
+}
+
+void *yyrealloc  (void * ptr, yy_size_t  size )
+{
+	/* The cast to (char *) in the following accommodates both
+	 * implementations that use char* generic pointers, and those
+	 * that use void* generic pointers.  It works with the latter
+	 * because both ANSI C and C++ allow castless assignment from
+	 * any pointer type to void*, and deal with argument conversions
+	 * as though doing an assignment.
+	 */
+	return (void *) realloc( (char *) ptr, size );
+}
+
+void yyfree (void * ptr )
+{
+	free( (char *) ptr );	/* see yyrealloc() for (char *) cast */
+}
+
+#define YYTABLES_NAME "yytables"
+
+#line 74 "lex_parser.lex"
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/parse_expr/lex_parser.hpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/parse_expr/lex_parser.hpp	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/parse_expr/lex_parser.hpp	(revision 1749)
@@ -0,0 +1,10 @@
+#ifndef __XIOS_LEX_PARSER_HPP__
+#define __XIOS_LEX_PARSER_HPP__
+
+#include <string>
+namespace xios
+{
+  IFilterExprNode* parseExpr(const std::string& strExpr);
+}
+
+#endif
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/parse_expr/lex_parser.lex
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/parse_expr/lex_parser.lex	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/parse_expr/lex_parser.lex	(revision 1749)
@@ -0,0 +1,73 @@
+%option noyywrap
+%{
+
+extern "C"
+{
+  int yylex(void);
+}
+#undef  YY_INPUT
+#define YY_INPUT(b, r, s) readInputForLexer(b, &r, s)
+#include <string>
+
+int readInputForLexer(char* buffer, size_t* numBytesRead, size_t maxBytesToRead);
+
+#include "filter_expr_node.hpp"
+#include "yacc_parser.hpp"
+
+%}
+
+white    [ \t]+
+
+digit    [0-9]
+integer  {digit}+
+exponant [eE][+-]?{integer}
+real     {integer}("."{integer})?{exponant}?
+id       [a-zA-Z][a-zA-Z0-9_]*
+average  @{id}
+var      \${id}
+
+%%
+
+{white}   { /* We ignore white characters */ }
+
+{real}    {
+            yylval.str = new std::string(yytext);
+            return NUMBER;
+          }
+
+{average} {
+            yylval.str = new std::string(yytext + 1);
+            return AVERAGE;
+          }
+
+{var}     {
+            yylval.str = new std::string(yytext + 1);
+            return VAR;
+          }
+
+{id}      {
+            yylval.str = new std::string(yytext);
+            return ID;
+          }                   
+                 
+
+"+"  return PLUS;
+"-"  return MINUS;
+
+"*"  return TIMES;
+"/"  return DIVIDE;
+
+"^"  return POWER;
+
+"==" return EQ;
+"<"  return LT;
+">"  return GT;
+"<=" return LE;
+">=" return GE;
+"/=" return NE;
+"?" return QUESTION_MARK;
+":" return COLON;
+"("  return LEFT_PARENTHESIS;
+")"  return RIGHT_PARENTHESIS;
+
+"\0" return END;
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/parse_expr/operator_expr.cpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/parse_expr/operator_expr.cpp	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/parse_expr/operator_expr.cpp	(revision 1749)
@@ -0,0 +1,6 @@
+#include "operator_expr.hpp"
+
+namespace xios
+{
+  COperatorExpr operatorExpr ;
+}
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/parse_expr/operator_expr.hpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/parse_expr/operator_expr.hpp	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/parse_expr/operator_expr.hpp	(revision 1749)
@@ -0,0 +1,443 @@
+#ifndef __XIOS_OPERATOR_EXPR_HPP__
+#define __XIOS_OPERATOR_EXPR_HPP__
+
+#include <map>
+#include <string>
+#include <cmath>
+#include "exception.hpp"
+#include "array_new.hpp"
+#include "utils.hpp"
+
+using namespace std;
+
+namespace xios
+{
+  class COperatorExpr
+  {
+    public:
+    typedef double (*functionScalar)(double);
+    typedef double (*functionScalarScalar)(double, double);
+    typedef double (*functionScalarScalarScalar)(double, double,double);
+    typedef CArray<double,1> (*functionField)(const CArray<double,1>&);
+    typedef CArray<double,1> (*functionFieldField)(const CArray<double,1>&, const CArray<double,1>&);
+    typedef CArray<double,1> (*functionFieldScalar)(const CArray<double,1>&, double);
+    typedef CArray<double,1> (*functionScalarField)(double, const CArray<double,1>&);
+    typedef CArray<double,1> (*functionScalarScalarField)(double, double, const CArray<double,1>&);
+    typedef CArray<double,1> (*functionScalarFieldScalar)(double, const CArray<double,1>&, double);
+    typedef CArray<double,1> (*functionScalarFieldField)(double, const CArray<double,1>&, const CArray<double,1>&);
+    typedef CArray<double,1> (*functionFieldScalarScalar)(const CArray<double,1>&, double, double);
+    typedef CArray<double,1> (*functionFieldScalarField)(const CArray<double,1>&, double, const CArray<double,1>&);
+    typedef CArray<double,1> (*functionFieldFieldScalar)(const CArray<double,1>&,  const CArray<double,1>&, double);
+    typedef CArray<double,1> (*functionFieldFieldField)(const CArray<double,1>&,  const CArray<double,1>&, const CArray<double,1>&);
+    
+    COperatorExpr(void)
+    {
+      opScalar[string("neg")] = neg_s;
+      opScalar[string("cos")] = cos_s;
+      opScalar[string("sin")] = sin_s;
+      opScalar[string("tan")] = tan_s;
+      opScalar[string("exp")] = exp_s;
+      opScalar[string("log")] = log_s;
+      opScalar[string("log10")] = log10_s;
+      opScalar[string("sqrt")] = sqrt_s;
+
+      opScalarScalar[string("add")] = add_ss;
+      opScalarScalar[string("minus")] = minus_ss;
+      opScalarScalar[string("mult")] = mult_ss;
+      opScalarScalar[string("div")] = div_ss;
+      opScalarScalar[string("pow")] = pow_ss;
+      opScalarScalar[string("eq")] = eq_ss;
+      opScalarScalar[string("lt")] = lt_ss;
+      opScalarScalar[string("gt")] = gt_ss;
+      opScalarScalar[string("le")] = le_ss;
+      opScalarScalar[string("ge")] = ge_ss;
+      opScalarScalar[string("ne")] = ne_ss;
+      opScalarScalarScalar[string("cond")] = cond_sss;
+      
+      opField[string("neg")] = neg_f;
+      opField[string("cos")] = cos_f;
+      opField[string("sin")] = sin_f;
+      opField[string("tan")] = tan_f;
+      opField[string("exp")] = exp_f;
+      opField[string("log")] = log_f;
+      opField[string("log10")] = log10_f;
+      opField[string("sqrt")] = sqrt_f;
+
+      opFieldField[string("add")] = add_ff;
+      opFieldField[string("minus")] = minus_ff;
+      opFieldField[string("mult")] = mult_ff;
+      opFieldField[string("div")] = div_ff;
+      opFieldField[string("pow")] = pow_ff;
+      opFieldField[string("eq")] = eq_ff;
+      opFieldField[string("lt")] = lt_ff;
+      opFieldField[string("gt")] = gt_ff;
+      opFieldField[string("le")] = le_ff;
+      opFieldField[string("ge")] = ge_ff;
+      opFieldField[string("ne")] = ne_ff;
+
+      opFieldScalar[string("add")] = add_fs;
+      opFieldScalar[string("minus")] = minus_fs;
+      opFieldScalar[string("mult")] = mult_fs;
+      opFieldScalar[string("div")] = div_fs;
+      opFieldScalar[string("pow")] = pow_fs;
+      opFieldScalar[string("eq")] = eq_fs;
+      opFieldScalar[string("lt")] = lt_fs;
+      opFieldScalar[string("gt")] = gt_fs;
+      opFieldScalar[string("le")] = le_fs;
+      opFieldScalar[string("ge")] = ge_fs;
+      opFieldScalar[string("ne")] = ne_fs;
+
+      opScalarField[string("add")] = add_sf;
+      opScalarField[string("minus")] = minus_sf;
+      opScalarField[string("mult")] = mult_sf;
+      opScalarField[string("div")] = div_sf;
+      opScalarField[string("eq")] = eq_sf;
+      opScalarField[string("lt")] = lt_sf;
+      opScalarField[string("gt")] = gt_sf;
+      opScalarField[string("le")] = le_sf;
+      opScalarField[string("ge")] = ge_sf;
+      opScalarField[string("ne")] = ne_sf;
+
+      opScalarScalarField[string("cond")] = cond_ssf;
+      opScalarFieldScalar[string("cond")] = cond_sfs;
+      opScalarFieldField[string("cond")] = cond_sff;
+      opFieldScalarScalar[string("cond")] = cond_fss;
+      opFieldScalarField[string("cond")] = cond_fsf;
+      opFieldFieldScalar[string("cond")] = cond_ffs;
+      opFieldFieldField[string("cond")] = cond_fff;
+
+
+    }
+
+    functionScalar getOpScalar(const string& id)
+    {
+      map<string,double (*)(double)>::iterator it;
+      it = opScalar.find(id);
+      if (it == opScalar.end()) ERROR("functionScalar COperatorExpr::getOpScalar(const string& id)", << "unknown operator : " << id)
+      return it->second;
+    }
+
+    functionScalarScalar getOpScalarScalar(const string& id)
+    {
+      map<string,double (*)(double,double)>::iterator it;
+      it = opScalarScalar.find(id);
+      if (it == opScalarScalar.end()) ERROR("functionScalarScalar COperatorExpr::getOpScalarScalar(const string& id)", << "unknown operator : " << id)
+      return it->second;
+    }
+
+    functionScalarScalarScalar getOpScalarScalarScalar(const string& id)
+    {
+      map<string,double (*)(double,double,double)>::iterator it;
+      it = opScalarScalarScalar.find(id);
+      if (it == opScalarScalarScalar.end()) ERROR("functionScalarScalarScalar getOpScalarScalarScalar(const string& id)", << "unknown operator : " << id)
+      return it->second;
+    }
+
+    functionField getOpField(const string& id)
+    {
+      map<string,functionField>::iterator it;
+      it = opField.find(id);
+      if (it == opField.end()) ERROR("functionField COperatorExpr::getOpField(const string& id)", << "unknown operator : " << id)
+      return it->second;
+    }
+
+    functionFieldField getOpFieldField(const string& id)
+    {
+      map<string,functionFieldField>::iterator it;
+      it = opFieldField.find(id);
+      if (it == opFieldField.end()) ERROR("dfunctionFieldField COperatorExpr::getOpFieldField(const string& id)", << "unknown operator : " << id)
+      return it->second;
+    }
+
+    functionFieldScalar getOpFieldScalar(const string& id)
+    {
+      map<string,functionFieldScalar>::iterator it;
+      it = opFieldScalar.find(id);
+      if (it == opFieldScalar.end()) ERROR("functionFieldScalar COperatorExpr::getOpFieldScalar(const string& id)", << "unknown operator : " << id)
+      return it->second;
+    }
+
+    functionScalarField getOpScalarField(const string& id)
+    {
+      map<string,functionScalarField>::iterator it;
+      it = opScalarField.find(id);
+      if (it == opScalarField.end()) ERROR("functionScalarField COperatorExpr::getOpFieldField(const string& id)", << "unknown operator : " << id)
+      return it->second;
+    }
+
+    functionScalarScalarField getOpScalarScalarField(const string& id)
+    {
+      map<string,functionScalarScalarField>::iterator it;
+      it = opScalarScalarField.find(id);
+      if (it == opScalarScalarField.end()) ERROR("functionScalarScalarField getOpScalarScalarField(const string& id)", << "unknown operator : " << id)
+      return it->second;
+    }
+
+    functionScalarFieldScalar getOpScalarFieldScalar(const string& id)
+    {
+      map<string,functionScalarFieldScalar>::iterator it;
+      it = opScalarFieldScalar.find(id);
+      if (it == opScalarFieldScalar.end()) ERROR("functionScalarFieldScalar getOpScalarScalarField(const string& id)", << "unknown operator : " << id)
+      return it->second;
+    }
+
+    functionScalarFieldField getOpScalarFieldField(const string& id)
+    {
+      map<string,functionScalarFieldField>::iterator it;
+      it = opScalarFieldField.find(id);
+      if (it == opScalarFieldField.end()) ERROR("functionScalarFieldField getOpScalarFieldField(const string& id)", << "unknown operator : " << id)
+      return it->second;
+    }
+
+    functionFieldScalarScalar getOpFieldScalarScalar(const string& id)
+    {
+      map<string,functionFieldScalarScalar>::iterator it;
+      it = opFieldScalarScalar.find(id);
+      if (it == opFieldScalarScalar.end()) ERROR("functionFieldScalarScalar getOpFieldScalarScalar(const string& id)", << "unknown operator : " << id)
+      return it->second;
+    }
+
+    functionFieldScalarField getOpFieldScalarField(const string& id)
+    {
+      map<string,functionFieldScalarField>::iterator it;
+      it = opFieldScalarField.find(id);
+      if (it == opFieldScalarField.end()) ERROR("functionFieldScalarField getOpFieldScalarField(const string& id)", << "unknown operator : " << id)
+      return it->second;
+    }
+
+    functionFieldFieldScalar getOpFieldFieldScalar(const string& id)
+    {
+      map<string,functionFieldFieldScalar>::iterator it;
+      it = opFieldFieldScalar.find(id);
+      if (it == opFieldFieldScalar.end()) ERROR("functionFieldFieldScalar getOpFieldFieldScalar(const string& id)", << "unknown operator : " << id)
+      return it->second;
+    }
+
+    functionFieldFieldField getOpFieldFieldField(const string& id)
+    {
+      map<string,functionFieldFieldField>::iterator it;
+      it = opFieldFieldField.find(id);
+      if (it == opFieldFieldField.end()) ERROR("functionFieldFieldField getOpFieldFieldField(const string& id)", << "unknown operator : " << id)
+      return it->second;
+    }
+    
+    
+    map<string,functionScalar> opScalar;
+    map<string,functionScalarScalar> opScalarScalar;
+    map<string,functionScalarScalarScalar> opScalarScalarScalar;
+    map<string,functionField> opField;
+    map<string,functionFieldField> opFieldField;
+    map<string,functionFieldScalar> opFieldScalar;
+    map<string,functionScalarField> opScalarField;
+    map<string,functionScalarScalarField> opScalarScalarField;
+    map<string,functionScalarFieldScalar> opScalarFieldScalar;
+    map<string,functionScalarFieldField> opScalarFieldField;
+    map<string,functionFieldScalarScalar> opFieldScalarScalar;
+    map<string,functionFieldScalarField> opFieldScalarField;
+    map<string,functionFieldFieldScalar> opFieldFieldScalar;
+    map<string,functionFieldFieldField> opFieldFieldField;
+
+
+
+    static inline double neg_s(double x)   { return -x; }
+    static inline double cos_s(double x)   { return std::cos(x); }
+    static inline double sin_s(double x)   { return std::sin(x); }
+    static inline double tan_s(double x)   { return std::tan(x); }
+    static inline double exp_s(double x)   { return std::exp(x); }
+    static inline double log_s(double x)   { return std::log(x); }
+    static inline double log10_s(double x) { return std::log10(x); }
+    static inline double sqrt_s(double x)  { return std::sqrt(x); }
+
+    static inline double add_ss(double x, double y)   { return x + y; }
+    static inline double minus_ss(double x, double y) { return x - y; }
+    static inline double mult_ss(double x, double y)  { return x * y; }
+    static inline double div_ss(double x, double y)   { return x / y; }
+    static inline double pow_ss(double x, double y)   { return std::pow(x,y); }
+
+    static inline double eq_ss(double x, double y) // specific check for NaN
+    {
+       bool xNan=NumTraits<double>::isNan(x) ;
+       bool yNan=NumTraits<double>::isNan(y) ;
+       if (xNan && yNan) return true ;
+       else if (xNan) return false ;
+       else if (yNan) return false ;
+       else return x == y;
+    }
+    
+    static inline double lt_ss(double x, double y)    { return x < y; }
+    static inline double gt_ss(double x, double y)    { return x > y; }
+    static inline double le_ss(double x, double y)    { return x <= y; }
+    static inline double ge_ss(double x, double y)    { return x >= y; }
+
+    static inline double ne_ss(double x, double y) // specific check for NaN
+    {
+       bool xNan=NumTraits<double>::isNan(x) ;
+       bool yNan=NumTraits<double>::isNan(y) ;
+       if (xNan && yNan) return false ;
+       else if (xNan) return true ;
+       else if (yNan) return true ;      
+       else return x != y;
+    }
+    
+    static inline CArray<double,1> neg_f(const CArray<double,1>& x)   { return Array<double,1>(-x); }
+    static inline CArray<double,1> cos_f(const CArray<double,1>& x)   { return Array<double,1>(cos(x)); }
+    static inline CArray<double,1> sin_f(const CArray<double,1>& x)   { return Array<double,1>(sin(x)); }
+    static inline CArray<double,1> tan_f(const CArray<double,1>& x)   { return Array<double,1>(tan(x)); }
+    static inline CArray<double,1> exp_f(const CArray<double,1>& x)   { return Array<double,1>(exp(x)); }
+    static inline CArray<double,1> log_f(const CArray<double,1>& x)   { return Array<double,1>(log(x)); }
+    static inline CArray<double,1> log10_f(const CArray<double,1>& x) { return Array<double,1>(log10(x)); }
+    static inline CArray<double,1> sqrt_f(const CArray<double,1>& x)  { return Array<double,1>(sqrt(x)); }
+
+    static inline CArray<double,1> add_ff(const CArray<double,1>& x, const CArray<double,1>& y)   { return Array<double,1>(x + y); }
+    static inline CArray<double,1> minus_ff(const CArray<double,1>& x, const CArray<double,1>& y) { return Array<double,1>(x - y); }
+    static inline CArray<double,1> mult_ff(const CArray<double,1>& x, const CArray<double,1>& y)  { return Array<double,1>(x * y); }
+    static inline CArray<double,1> div_ff(const CArray<double,1>& x, const CArray<double,1>& y)   { return Array<double,1>(x / y); }
+    static inline CArray<double,1> pow_ff(const CArray<double,1>& x, const CArray<double,1>& y)   { return Array<double,1>(pow(x,y)); }
+    static inline CArray<double,1> eq_ff(const CArray<double,1>& x, const CArray<double,1>& y)    { return Array<double,1>(x == y); }
+    static inline CArray<double,1> lt_ff(const CArray<double,1>& x, const CArray<double,1>& y)    { return Array<double,1>(x < y); }
+    static inline CArray<double,1> gt_ff(const CArray<double,1>& x, const CArray<double,1>& y)    { return Array<double,1>(x > y); }
+    static inline CArray<double,1> le_ff(const CArray<double,1>& x, const CArray<double,1>& y)    { return Array<double,1>(x <= y); }
+    static inline CArray<double,1> ge_ff(const CArray<double,1>& x, const CArray<double,1>& y)    { return Array<double,1>(x >= y); }
+    static inline CArray<double,1> ne_ff(const CArray<double,1>& x, const CArray<double,1>& y)    { return Array<double,1>(x != y); }
+
+    static inline CArray<double,1> add_fs(const CArray<double,1>& x, double y)   { return Array<double,1>(x + y); }
+    static inline CArray<double,1> minus_fs(const CArray<double,1>& x, double y) { return Array<double,1>(x - y); }
+    static inline CArray<double,1> mult_fs(const CArray<double,1>& x, double y)  { return Array<double,1>(x * y); }
+    static inline CArray<double,1> div_fs(const CArray<double,1>& x, double y)   { return Array<double,1>(x / y); }
+    static inline CArray<double,1> pow_fs(const CArray<double,1>& x, double y)   { return Array<double,1>(pow(x,y)); }
+
+    static inline CArray<double,1> eq_fs(const CArray<double,1>& x, double y) // specific check for NaN
+    {
+      if (NumTraits<double>::isNan(y))
+      {
+        CArray<double,1> ret(x.numElements()) ;
+        Array<double,1>::const_iterator itx=x.begin(),itxe=x.end();
+        Array<double,1>::iterator itret=ret.begin() ;
+        for(;itx!=itxe;++itx,++itret) *itret=NumTraits<double>::isNan(*itx) ;
+        return ret ;
+      }
+      else return Array<double,1>(x == y); 
+    }
+    
+    static inline CArray<double,1> lt_fs(const CArray<double,1>& x, double y)    { return Array<double,1>(x < y); }
+    static inline CArray<double,1> gt_fs(const CArray<double,1>& x, double y)    { return Array<double,1>(x > y); }
+    static inline CArray<double,1> le_fs(const CArray<double,1>& x, double y)    { return Array<double,1>(x <= y); }
+    static inline CArray<double,1> ge_fs(const CArray<double,1>& x, double y)    { return Array<double,1>(x >= y); }
+
+    static  inline CArray<double,1> ne_fs(const CArray<double,1>& x, double y) // specific check for NaN
+    {
+      if (NumTraits<double>::isNan(y))
+      {
+        CArray<double,1> ret(x.numElements()) ;
+        Array<double,1>::const_iterator itx=x.begin(),itxe=x.end();
+        Array<double,1>::iterator itret=ret.begin() ;
+        for(;itx!=itxe;++itx,++itret) *itret = !NumTraits<double>::isNan(*itx) ;
+        return ret ;
+      }
+      else return Array<double,1>(x != y); 
+    }
+
+    static inline CArray<double,1> add_sf(double x, const CArray<double,1>& y)   { return Array<double,1>(x + y); }
+    static inline CArray<double,1> minus_sf(double x, const CArray<double,1>& y) { return Array<double,1>(x - y); }
+    static inline CArray<double,1> mult_sf(double x, const CArray<double,1>& y)  { return Array<double,1>(x * y); }
+    static inline CArray<double,1> div_sf(double x, const CArray<double,1>& y)   { return Array<double,1>(x / y); }
+
+    static inline CArray<double,1> eq_sf(double x, const CArray<double,1>& y) // specific check for NaN
+    {
+      if (NumTraits<double>::isNan(x))
+      {
+        CArray<double,1> ret(y.numElements()) ;
+        Array<double,1>::const_iterator ity=y.begin(),itye=y.end();
+        Array<double,1>::iterator itret=ret.begin() ;
+        for(;ity!=itye;++ity,++itret) *itret=NumTraits<double>::isNan(*ity) ;
+        return ret ;
+      }
+      else return Array<double,1>(x == y); 
+    }
+    static inline CArray<double,1> lt_sf(double x, const CArray<double,1>& y)    { return Array<double,1>(x < y); }
+    static inline CArray<double,1> gt_sf(double x, const CArray<double,1>& y)    { return Array<double,1>(x > y); }
+    static inline CArray<double,1> le_sf(double x, const CArray<double,1>& y)    { return Array<double,1>(x <= y); }
+    static inline CArray<double,1> ge_sf(double x, const CArray<double,1>& y)    { return Array<double,1>(x >= y); }
+
+    static inline CArray<double,1> ne_sf(double x, const CArray<double,1>& y) // specific check for NaN
+    {
+      if (NumTraits<double>::isNan(x))
+      {
+        CArray<double,1> ret(y.numElements()) ;
+        Array<double,1>::const_iterator ity=y.begin(),itye=y.end();
+        Array<double,1>::iterator itret=ret.begin() ;
+        for(;ity!=itye;++ity,++itret) *itret=!NumTraits<double>::isNan(*ity) ;
+        return ret ;
+      }
+      else return Array<double,1>(x != y);
+    }
+    static inline double cond_sss(double x, double y, double z)   { return (x==0) ? z : y ; }
+
+    static inline CArray<double,1> cond_ssf(double x, double y, const CArray<double,1>& z)
+    {
+      CArray<double,1> ret(z.numElements()) ;
+      if (x==0) ret=z ;
+      else ret=y ;
+      return ret ;
+    }
+
+    static inline CArray<double,1> cond_sfs(double x, const CArray<double,1>& y, double z)
+    {
+      CArray<double,1> ret(y.numElements()) ;
+     if (x==0) ret=z ;
+      else ret=y ;
+      return ret ;
+    }
+
+    static inline CArray<double,1> cond_sff(double x, const CArray<double,1>& y, const CArray<double,1>& z)
+    {
+      CArray<double,1> ret(y.numElements()) ;
+      if (x==0) ret=z ;
+      else ret=y ;
+      return ret ;
+    }
+    
+    static inline CArray<double,1> cond_fss(const CArray<double,1>& x, double y, double z)
+    {
+      CArray<double,1> ret(x.numElements()) ;
+      Array<double,1>::const_iterator itx=x.begin(),itxe=x.end();
+      Array<double,1>::iterator itret=ret.begin() ;
+      
+      for(;itx!=itxe;++itx,++itret) *itret=( (*itx==0)?z:y) ;
+      return ret ;
+    }
+
+    static inline CArray<double,1> cond_fsf(const CArray<double,1>& x, double y, const CArray<double,1>& z)
+    {
+      CArray<double,1> ret(x.numElements()) ;
+      Array<double,1>::const_iterator itx=x.begin(), itxe=x.end(), itz=z.begin();
+      Array<double,1>::iterator itret=ret.begin() ;
+      for(;itx!=itxe;++itx,++itz,++itret) *itret=( (*itx==0)?*itz:y) ;
+      return ret ;
+    }
+
+    static inline CArray<double,1> cond_ffs(const CArray<double,1>& x, const CArray<double,1>& y, double z)
+    {
+      CArray<double,1> ret(x.numElements()) ;
+      Array<double,1>::const_iterator itx=x.begin(), itxe=x.end(), ity=y.begin() ;
+      Array<double,1>::iterator itret=ret.begin() ;
+      for(;itx!=itxe;++itx,++ity,++itret) *itret=( (*itx==0)?z:*ity) ;
+      return ret ;
+    }
+
+    static inline CArray<double,1> cond_fff(const CArray<double,1>& x, const CArray<double,1>& y, const CArray<double,1>&  z)
+    {
+      CArray<double,1> ret(x.numElements()) ;
+      Array<double,1>::const_iterator itx=x.begin(), itxe=x.end(), ity=y.begin(), itz=z.begin() ;
+      Array<double,1>::iterator itret=ret.begin() ;
+      for(;itx!=itxe;++itx,++ity,++itz,++itret) *itret=( (*itx==0)?*itz:*ity) ;
+      return ret ;
+    }
+
+  };
+
+  extern COperatorExpr operatorExpr;
+}
+
+#endif
+
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/parse_expr/scalar_expr_node.cpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/parse_expr/scalar_expr_node.cpp	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/parse_expr/scalar_expr_node.cpp	(revision 1749)
@@ -0,0 +1,87 @@
+#include "scalar_expr_node.hpp"
+#include "type.hpp"
+#include "variable.hpp"
+#include "operator_expr.hpp"
+
+namespace xios
+{
+  CScalarValExprNode::CScalarValExprNode(const std::string& strVal)
+    : strVal(strVal)
+  { /* Nothing to do */ }
+
+  double CScalarValExprNode::reduce() const
+  {
+    CType<double> val;
+    val.fromString(strVal);
+    return val;
+  }
+
+  CScalarVarExprNode::CScalarVarExprNode(const std::string& varId)
+    : varId(varId)
+  { /* Nothing to do */ }
+
+  double CScalarVarExprNode::reduce() const
+  {
+    // $missing_value will be replaced with NaN
+    if (varId == "missing_value")
+    {
+      return std::numeric_limits<double>::quiet_NaN();
+    }
+    else
+    {
+      if (!CVariable::has(varId)) 
+        ERROR("double CScalarVarExprNode::reduce() const", << "The variable " << varId << " does not exist.");
+
+      return CVariable::get(varId)->getData<double>();
+    }
+  }
+
+  CScalarUnaryOpExprNode::CScalarUnaryOpExprNode(const std::string& opId, IScalarExprNode* child)
+    : opId(opId)
+    , child(child)
+  {
+    if (!child)
+      ERROR("CScalarUnaryOpExprNode::CScalarUnaryOpExprNode(const std::string& opId, IScalarExprNode* child)",
+            "Impossible to create the new expression node, an invalid child node was provided.");
+  }
+
+  double CScalarUnaryOpExprNode::reduce() const
+  {
+    COperatorExpr::functionScalar op = operatorExpr.getOpScalar(opId);
+    return op(child->reduce());
+  }
+
+  CScalarBinaryOpExprNode::CScalarBinaryOpExprNode(IScalarExprNode* child1, const std::string& opId, IScalarExprNode* child2)
+    : child1(child1)
+    , opId(opId)
+    , child2(child2)
+  {
+    if (!child1 || !child2)
+      ERROR("CScalarBinaryOpExprNode::CScalarBinaryOpExprNode(IScalarExprNode* child1, const std::string& opId, IScalarExprNode* child2)",
+            "Impossible to create the new expression node, an invalid child node was provided.");
+  }
+
+  double CScalarBinaryOpExprNode::reduce() const
+  {
+    COperatorExpr::functionScalarScalar op = operatorExpr.getOpScalarScalar(opId);
+    return op(child1->reduce(), child2->reduce());
+  }
+
+
+  CScalarTernaryOpExprNode::CScalarTernaryOpExprNode(IScalarExprNode* child1, const std::string& opId, IScalarExprNode* child2, IScalarExprNode* child3)
+    : child1(child1)
+    , opId(opId)
+    , child2(child2)
+    , child3(child3)
+  {
+    if (!child1 || !child2 || !child3)
+      ERROR("CScalarTernaryOpExprNode::CScalarTernaryOpExprNode(IScalarExprNode* child1, const std::string& opId, IScalarExprNode* child2, IScalarExprNode* child3)",
+            "Impossible to create the new expression node, an invalid child node was provided.");
+  }
+
+  double CScalarTernaryOpExprNode::reduce() const
+  {
+    COperatorExpr::functionScalarScalarScalar op = operatorExpr.getOpScalarScalarScalar(opId);
+    return op(child1->reduce(), child2->reduce(), child3->reduce());
+  }
+}
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/parse_expr/scalar_expr_node.hpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/parse_expr/scalar_expr_node.hpp	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/parse_expr/scalar_expr_node.hpp	(revision 1749)
@@ -0,0 +1,132 @@
+#ifndef __XIOS_SCALAR_EXPR_NODE_HPP__
+#define __XIOS_SCALAR_EXPR_NODE_HPP__
+
+#include <string>
+#include <boost/smart_ptr/scoped_ptr.hpp>
+
+namespace xios
+{
+  /*!
+   * Interface implemented by all the nodes of a tree representing an expression
+   * which can be reduced to a scalar value.
+   */
+  struct IScalarExprNode 
+  {
+    /*!
+     * Builds a filter graph corresponding to the expression tree.
+     *
+     * \return the output pin of the filter producing the result of the expression 
+     */
+    virtual double reduce() const = 0;
+  };
+
+  /*!
+   * Expression node corresponding to a scalar value.
+   */
+  class CScalarValExprNode : public IScalarExprNode
+  {
+    public:
+      /*!
+       * Constructs an expression node corresponding to the specified scalar value.
+       *
+       * \param strVal the string representation of the scalar value
+       */
+      CScalarValExprNode(const std::string& strVal);
+
+      double reduce() const;
+
+    private:
+      std::string strVal; //!< The string representation of the scalar value
+  };
+
+  /*!
+   * Expression node corresponding to a scalar variable.
+   */
+  class CScalarVarExprNode : public IScalarExprNode
+  {
+    public:
+      /*!
+       * Constructs an expression node corresponding
+       * to the scalar variable whose id is provided.
+       *
+       * \param varId the identifier of the scalar variable
+       */
+      CScalarVarExprNode(const std::string& varId);
+
+      double reduce() const;
+
+    private:
+      std::string varId; //!< The identifier of the field
+  };
+
+  /*!
+   * Expression node corresponding to a unary operation on a scalar.
+   */
+  class CScalarUnaryOpExprNode : public IScalarExprNode
+  {
+    public:
+      /*!
+       * Constructs an expression node corresponding to the specified unary operation
+       * applied to the provided scalar node.
+       * Note that the child node will be destroyed automatically when the parent node
+       * is destroyed.
+       *
+       * \param opId the identifier of the operator
+       * \param child the scalar child node to which the operator is applied
+       */
+      CScalarUnaryOpExprNode(const std::string& opId, IScalarExprNode* child);
+
+      double reduce() const;
+
+    private:
+      std::string opId; //!< The identifier of the field
+      boost::scoped_ptr<IScalarExprNode> child; //!< The scalar child node to which the operator is applied
+  };
+
+  /*!
+   * Expression node corresponding to a binary operation on two scalars.
+   */
+  class CScalarBinaryOpExprNode : public IScalarExprNode
+  {
+    public:
+      /*!
+       * Constructs an expression node corresponding to the specified binary operation
+       * applied to the provided scalar child nodes.
+       * Note that the child nodes will be destroyed automatically when the parent node
+       * is destroyed.
+       *
+       * \param opId the identifier of the operator
+       * \param child1, child2 the scalar child nodes to which the operator is applied
+       */
+      CScalarBinaryOpExprNode(IScalarExprNode* child1, const std::string& opId, IScalarExprNode* child2);
+
+      double reduce() const;
+
+    private:
+      std::string opId; //!< The identifier of the field
+      boost::scoped_ptr<IScalarExprNode> child1, child2; //!< The scalar child nodes to which the operator is applied
+  };
+
+    class CScalarTernaryOpExprNode : public IScalarExprNode
+  {
+    public:
+      /*!
+       * Constructs an expression node corresponding to the specified ternary operation
+       * applied to the provided scalar child nodes.
+       * Note that the child nodes will be destroyed automatically when the parent node
+       * is destroyed.
+       *
+       * \param opId the identifier of the operator
+       * \param child1, child2 , child3 the scalar child nodes to which the operator is applied
+       */
+      CScalarTernaryOpExprNode(IScalarExprNode* child1, const std::string& opId, IScalarExprNode* child2, IScalarExprNode* child3);
+
+      double reduce() const;
+
+    private:
+      std::string opId; //!< The identifier of the field
+      boost::scoped_ptr<IScalarExprNode> child1, child2, child3; //!< The scalar child nodes to which the operator is applied
+  };
+}
+
+#endif // __XIOS_SCALAR_EXPR_NODE_HPP__
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/parse_expr/yacc_parser.cpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/parse_expr/yacc_parser.cpp	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/parse_expr/yacc_parser.cpp	(revision 1749)
@@ -0,0 +1,2011 @@
+/* A Bison parser, made by GNU Bison 3.0.2.  */
+
+/* Bison implementation for Yacc-like parsers in C
+
+   Copyright (C) 1984, 1989-1990, 2000-2013 Free Software Foundation, Inc.
+
+   This program is free software: you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation, either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
+
+/* As a special exception, you may create a larger work that contains
+   part or all of the Bison parser skeleton and distribute that work
+   under terms of your choice, so long as that work isn't itself a
+   parser generator using the skeleton or a modified version thereof
+   as a parser skeleton.  Alternatively, if you modify or redistribute
+   the parser skeleton itself, you may (at your option) remove this
+   special exception, which will cause the skeleton and the resulting
+   Bison output files to be licensed under the GNU General Public
+   License without this special exception.
+
+   This special exception was added by the Free Software Foundation in
+   version 2.2 of Bison.  */
+
+/* C LALR(1) parser skeleton written by Richard Stallman, by
+   simplifying the original so-called "semantic" parser.  */
+
+/* All symbols defined below should begin with yy or YY, to avoid
+   infringing on user name space.  This should be done even for local
+   variables, as they might otherwise be expanded by user macros.
+   There are some unavoidable exceptions within include files to
+   define necessary library symbols; they are noted "INFRINGES ON
+   USER NAME SPACE" below.  */
+
+/* Identify Bison output.  */
+#define YYBISON 1
+
+/* Bison version.  */
+#define YYBISON_VERSION "3.0.2"
+
+/* Skeleton name.  */
+#define YYSKELETON_NAME "yacc.c"
+
+/* Pure parsers.  */
+#define YYPURE 0
+
+/* Push parsers.  */
+#define YYPUSH 0
+
+/* Pull parsers.  */
+#define YYPULL 1
+
+
+
+
+/* Copy the first part of user declarations.  */
+#line 1 "yacc_parser.yacc" /* yacc.c:339  */
+
+#include "filter_expr_node.hpp"
+#include <string>
+#include <iostream>
+#include "exception.hpp"
+
+using namespace std;
+using namespace xios;
+
+extern "C"
+{
+  int yyparse(void);
+  int yylex(void);
+  int yyerror(const char *s);
+}
+
+  IFilterExprNode* parsed;
+  std::string globalInputText;
+  size_t globalReadOffset = 0;
+
+  int readInputForLexer(char* buffer, size_t* numBytesRead, size_t maxBytesToRead)
+  {
+    size_t numBytesToRead = maxBytesToRead;
+    size_t bytesRemaining = globalInputText.length()-globalReadOffset;
+    size_t i;
+    if (numBytesToRead > bytesRemaining) numBytesToRead = bytesRemaining;
+    for (i = 0; i < numBytesToRead; i++) buffer[i] = globalInputText.c_str()[globalReadOffset + i];
+    *numBytesRead = numBytesToRead;
+    globalReadOffset += numBytesToRead;
+    return 0;
+  }
+
+#line 99 "yacc_parser.cpp" /* yacc.c:339  */
+
+# ifndef YY_NULLPTR
+#  if defined __cplusplus && 201103L <= __cplusplus
+#   define YY_NULLPTR nullptr
+#  else
+#   define YY_NULLPTR 0
+#  endif
+# endif
+
+/* Enabling verbose error messages.  */
+#ifdef YYERROR_VERBOSE
+# undef YYERROR_VERBOSE
+# define YYERROR_VERBOSE 1
+#else
+# define YYERROR_VERBOSE 0
+#endif
+
+/* In a future release of Bison, this section will be replaced
+   by #include "yacc_parser.hpp".  */
+#ifndef YY_YY_YACC_PARSER_HPP_INCLUDED
+# define YY_YY_YACC_PARSER_HPP_INCLUDED
+/* Debug traces.  */
+#ifndef YYDEBUG
+# define YYDEBUG 0
+#endif
+#if YYDEBUG
+extern int yydebug;
+#endif
+
+/* Token type.  */
+#ifndef YYTOKENTYPE
+# define YYTOKENTYPE
+  enum yytokentype
+  {
+    NUMBER = 258,
+    VAR = 259,
+    ID = 260,
+    AVERAGE = 261,
+    PLUS = 262,
+    MINUS = 263,
+    TIMES = 264,
+    DIVIDE = 265,
+    POWER = 266,
+    EQ = 267,
+    LT = 268,
+    GT = 269,
+    LE = 270,
+    GE = 271,
+    NE = 272,
+    LEFT_PARENTHESIS = 273,
+    RIGHT_PARENTHESIS = 274,
+    QUESTION_MARK = 275,
+    COLON = 276,
+    END = 277,
+    NEG = 278
+  };
+#endif
+
+/* Value type.  */
+#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
+typedef union YYSTYPE YYSTYPE;
+union YYSTYPE
+{
+#line 35 "yacc_parser.yacc" /* yacc.c:355  */
+
+  std::string* str;                /* symbol table index */
+  xios::IScalarExprNode* scalarNode;
+  xios::IFilterExprNode* filterNode;
+
+#line 169 "yacc_parser.cpp" /* yacc.c:355  */
+};
+# define YYSTYPE_IS_TRIVIAL 1
+# define YYSTYPE_IS_DECLARED 1
+#endif
+
+
+extern YYSTYPE yylval;
+
+int yyparse (void);
+
+#endif /* !YY_YY_YACC_PARSER_HPP_INCLUDED  */
+
+/* Copy the second part of user declarations.  */
+
+#line 184 "yacc_parser.cpp" /* yacc.c:358  */
+
+#ifdef short
+# undef short
+#endif
+
+#ifdef YYTYPE_UINT8
+typedef YYTYPE_UINT8 yytype_uint8;
+#else
+typedef unsigned char yytype_uint8;
+#endif
+
+#ifdef YYTYPE_INT8
+typedef YYTYPE_INT8 yytype_int8;
+#else
+typedef signed char yytype_int8;
+#endif
+
+#ifdef YYTYPE_UINT16
+typedef YYTYPE_UINT16 yytype_uint16;
+#else
+typedef unsigned short int yytype_uint16;
+#endif
+
+#ifdef YYTYPE_INT16
+typedef YYTYPE_INT16 yytype_int16;
+#else
+typedef short int yytype_int16;
+#endif
+
+#ifndef YYSIZE_T
+# ifdef __SIZE_TYPE__
+#  define YYSIZE_T __SIZE_TYPE__
+# elif defined size_t
+#  define YYSIZE_T size_t
+# elif ! defined YYSIZE_T
+#  include <stddef.h> /* INFRINGES ON USER NAME SPACE */
+#  define YYSIZE_T size_t
+# else
+#  define YYSIZE_T unsigned int
+# endif
+#endif
+
+#define YYSIZE_MAXIMUM ((YYSIZE_T) -1)
+
+#ifndef YY_
+# if defined YYENABLE_NLS && YYENABLE_NLS
+#  if ENABLE_NLS
+#   include <libintl.h> /* INFRINGES ON USER NAME SPACE */
+#   define YY_(Msgid) dgettext ("bison-runtime", Msgid)
+#  endif
+# endif
+# ifndef YY_
+#  define YY_(Msgid) Msgid
+# endif
+#endif
+
+#ifndef YY_ATTRIBUTE
+# if (defined __GNUC__                                               \
+      && (2 < __GNUC__ || (__GNUC__ == 2 && 96 <= __GNUC_MINOR__)))  \
+     || defined __SUNPRO_C && 0x5110 <= __SUNPRO_C
+#  define YY_ATTRIBUTE(Spec) __attribute__(Spec)
+# else
+#  define YY_ATTRIBUTE(Spec) /* empty */
+# endif
+#endif
+
+#ifndef YY_ATTRIBUTE_PURE
+# define YY_ATTRIBUTE_PURE   YY_ATTRIBUTE ((__pure__))
+#endif
+
+#ifndef YY_ATTRIBUTE_UNUSED
+# define YY_ATTRIBUTE_UNUSED YY_ATTRIBUTE ((__unused__))
+#endif
+
+#if !defined _Noreturn \
+     && (!defined __STDC_VERSION__ || __STDC_VERSION__ < 201112)
+# if defined _MSC_VER && 1200 <= _MSC_VER
+#  define _Noreturn __declspec (noreturn)
+# else
+#  define _Noreturn YY_ATTRIBUTE ((__noreturn__))
+# endif
+#endif
+
+/* Suppress unused-variable warnings by "using" E.  */
+#if ! defined lint || defined __GNUC__
+# define YYUSE(E) ((void) (E))
+#else
+# define YYUSE(E) /* empty */
+#endif
+
+#if defined __GNUC__ && 407 <= __GNUC__ * 100 + __GNUC_MINOR__
+/* Suppress an incorrect diagnostic about yylval being uninitialized.  */
+# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \
+    _Pragma ("GCC diagnostic push") \
+    _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"")\
+    _Pragma ("GCC diagnostic ignored \"-Wmaybe-uninitialized\"")
+# define YY_IGNORE_MAYBE_UNINITIALIZED_END \
+    _Pragma ("GCC diagnostic pop")
+#else
+# define YY_INITIAL_VALUE(Value) Value
+#endif
+#ifndef YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
+# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
+# define YY_IGNORE_MAYBE_UNINITIALIZED_END
+#endif
+#ifndef YY_INITIAL_VALUE
+# define YY_INITIAL_VALUE(Value) /* Nothing. */
+#endif
+
+
+#if ! defined yyoverflow || YYERROR_VERBOSE
+
+/* The parser invokes alloca or malloc; define the necessary symbols.  */
+
+# ifdef YYSTACK_USE_ALLOCA
+#  if YYSTACK_USE_ALLOCA
+#   ifdef __GNUC__
+#    define YYSTACK_ALLOC __builtin_alloca
+#   elif defined __BUILTIN_VA_ARG_INCR
+#    include <alloca.h> /* INFRINGES ON USER NAME SPACE */
+#   elif defined _AIX
+#    define YYSTACK_ALLOC __alloca
+#   elif defined _MSC_VER
+#    include <malloc.h> /* INFRINGES ON USER NAME SPACE */
+#    define alloca _alloca
+#   else
+#    define YYSTACK_ALLOC alloca
+#    if ! defined _ALLOCA_H && ! defined EXIT_SUCCESS
+#     include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
+      /* Use EXIT_SUCCESS as a witness for stdlib.h.  */
+#     ifndef EXIT_SUCCESS
+#      define EXIT_SUCCESS 0
+#     endif
+#    endif
+#   endif
+#  endif
+# endif
+
+# ifdef YYSTACK_ALLOC
+   /* Pacify GCC's 'empty if-body' warning.  */
+#  define YYSTACK_FREE(Ptr) do { /* empty */; } while (0)
+#  ifndef YYSTACK_ALLOC_MAXIMUM
+    /* The OS might guarantee only one guard page at the bottom of the stack,
+       and a page size can be as small as 4096 bytes.  So we cannot safely
+       invoke alloca (N) if N exceeds 4096.  Use a slightly smaller number
+       to allow for a few compiler-allocated temporary stack slots.  */
+#   define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */
+#  endif
+# else
+#  define YYSTACK_ALLOC YYMALLOC
+#  define YYSTACK_FREE YYFREE
+#  ifndef YYSTACK_ALLOC_MAXIMUM
+#   define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM
+#  endif
+#  if (defined __cplusplus && ! defined EXIT_SUCCESS \
+       && ! ((defined YYMALLOC || defined malloc) \
+             && (defined YYFREE || defined free)))
+#   include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
+#   ifndef EXIT_SUCCESS
+#    define EXIT_SUCCESS 0
+#   endif
+#  endif
+#  ifndef YYMALLOC
+#   define YYMALLOC malloc
+#   if ! defined malloc && ! defined EXIT_SUCCESS
+void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */
+#   endif
+#  endif
+#  ifndef YYFREE
+#   define YYFREE free
+#   if ! defined free && ! defined EXIT_SUCCESS
+void free (void *); /* INFRINGES ON USER NAME SPACE */
+#   endif
+#  endif
+# endif
+#endif /* ! defined yyoverflow || YYERROR_VERBOSE */
+
+
+#if (! defined yyoverflow \
+     && (! defined __cplusplus \
+         || (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL)))
+
+/* A type that is properly aligned for any stack member.  */
+union yyalloc
+{
+  yytype_int16 yyss_alloc;
+  YYSTYPE yyvs_alloc;
+};
+
+/* The size of the maximum gap between one aligned stack and the next.  */
+# define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1)
+
+/* The size of an array large to enough to hold all stacks, each with
+   N elements.  */
+# define YYSTACK_BYTES(N) \
+     ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE)) \
+      + YYSTACK_GAP_MAXIMUM)
+
+# define YYCOPY_NEEDED 1
+
+/* Relocate STACK from its old location to the new one.  The
+   local variables YYSIZE and YYSTACKSIZE give the old and new number of
+   elements in the stack, and YYPTR gives the new location of the
+   stack.  Advance YYPTR to a properly aligned location for the next
+   stack.  */
+# define YYSTACK_RELOCATE(Stack_alloc, Stack)                           \
+    do                                                                  \
+      {                                                                 \
+        YYSIZE_T yynewbytes;                                            \
+        YYCOPY (&yyptr->Stack_alloc, Stack, yysize);                    \
+        Stack = &yyptr->Stack_alloc;                                    \
+        yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \
+        yyptr += yynewbytes / sizeof (*yyptr);                          \
+      }                                                                 \
+    while (0)
+
+#endif
+
+#if defined YYCOPY_NEEDED && YYCOPY_NEEDED
+/* Copy COUNT objects from SRC to DST.  The source and destination do
+   not overlap.  */
+# ifndef YYCOPY
+#  if defined __GNUC__ && 1 < __GNUC__
+#   define YYCOPY(Dst, Src, Count) \
+      __builtin_memcpy (Dst, Src, (Count) * sizeof (*(Src)))
+#  else
+#   define YYCOPY(Dst, Src, Count)              \
+      do                                        \
+        {                                       \
+          YYSIZE_T yyi;                         \
+          for (yyi = 0; yyi < (Count); yyi++)   \
+            (Dst)[yyi] = (Src)[yyi];            \
+        }                                       \
+      while (0)
+#  endif
+# endif
+#endif /* !YYCOPY_NEEDED */
+
+/* YYFINAL -- State number of the termination state.  */
+#define YYFINAL  16
+/* YYLAST -- Last index in YYTABLE.  */
+#define YYLAST   371
+
+/* YYNTOKENS -- Number of terminals.  */
+#define YYNTOKENS  24
+/* YYNNTS -- Number of nonterminals.  */
+#define YYNNTS  4
+/* YYNRULES -- Number of rules.  */
+#define YYNRULES  64
+/* YYNSTATES -- Number of states.  */
+#define YYNSTATES  138
+
+/* YYTRANSLATE[YYX] -- Symbol number corresponding to YYX as returned
+   by yylex, with out-of-bounds checking.  */
+#define YYUNDEFTOK  2
+#define YYMAXUTOK   278
+
+#define YYTRANSLATE(YYX)                                                \
+  ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
+
+/* YYTRANSLATE[TOKEN-NUM] -- Symbol number corresponding to TOKEN-NUM
+   as returned by yylex, without out-of-bounds checking.  */
+static const yytype_uint8 yytranslate[] =
+{
+       0,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+       2,     2,     2,     2,     2,     2,     1,     2,     3,     4,
+       5,     6,     7,     8,     9,    10,    11,    12,    13,    14,
+      15,    16,    17,    18,    19,    20,    21,    22,    23
+};
+
+#if YYDEBUG
+  /* YYRLINE[YYN] -- Source line where rule number YYN was defined.  */
+static const yytype_uint8 yyrline[] =
+{
+       0,    63,    63,    64,    68,    69,    70,    71,    72,    73,
+      74,    75,    76,    77,    78,    79,    80,    81,    82,    83,
+      84,    88,    89,    90,    91,    92,    93,    94,    95,    96,
+      97,    98,    99,   100,   101,   102,   103,   104,   105,   106,
+     107,   108,   109,   110,   111,   112,   113,   114,   115,   116,
+     117,   118,   119,   120,   121,   122,   123,   124,   125,   126,
+     127,   128,   129,   130,   131
+};
+#endif
+
+#if YYDEBUG || YYERROR_VERBOSE || 0
+/* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
+   First, the terminals, then, starting at YYNTOKENS, nonterminals.  */
+static const char *const yytname[] =
+{
+  "$end", "error", "$undefined", "NUMBER", "VAR", "ID", "AVERAGE", "PLUS",
+  "MINUS", "TIMES", "DIVIDE", "POWER", "EQ", "LT", "GT", "LE", "GE", "NE",
+  "LEFT_PARENTHESIS", "RIGHT_PARENTHESIS", "QUESTION_MARK", "COLON", "END",
+  "NEG", "$accept", "Line", "Expression", "Field_expr", YY_NULLPTR
+};
+#endif
+
+# ifdef YYPRINT
+/* YYTOKNUM[NUM] -- (External) token number corresponding to the
+   (internal) symbol number NUM (which must be that of a token).  */
+static const yytype_uint16 yytoknum[] =
+{
+       0,   256,   257,   258,   259,   260,   261,   262,   263,   264,
+     265,   266,   267,   268,   269,   270,   271,   272,   273,   274,
+     275,   276,   277,   278
+};
+# endif
+
+#define YYPACT_NINF -14
+
+#define yypact_value_is_default(Yystate) \
+  (!!((Yystate) == (-14)))
+
+#define YYTABLE_NINF -1
+
+#define yytable_value_is_error(Yytable_value) \
+  (!!((Yytable_value) == (-1)))
+
+  /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
+     STATE-NUM.  */
+static const yytype_int16 yypact[] =
+{
+      73,   -14,   -14,   -13,   -14,   124,   124,   -14,    39,   304,
+     104,   124,    34,    36,   220,   234,   -14,   124,   124,   124,
+     124,   133,   124,   124,   124,   124,   124,   124,   124,   124,
+     124,   124,   124,   124,   124,   124,   124,   124,   124,   124,
+     124,   -14,   248,   262,   -14,   -14,    -7,    27,    -7,    27,
+      34,    36,    34,    36,    30,   133,   133,    34,     0,    75,
+       0,    75,     0,    75,     0,    75,     0,    75,     0,    75,
+     145,   160,    -7,    27,    -7,    27,    34,    36,    34,    36,
+      34,    36,     0,    75,     0,    75,     0,    75,     0,    75,
+       0,    75,     0,    75,   175,   190,   -14,   -14,   133,    34,
+     276,   133,   133,   133,   133,   133,   133,   133,   133,   133,
+     133,   133,   124,   124,   124,   124,   290,    33,    33,    34,
+      34,   360,   360,   360,   360,   360,   360,   205,   318,   332,
+     318,   332,   318,   332,   318,   332,   133,   346
+};
+
+  /* YYDEFACT[STATE-NUM] -- Default reduction number in state STATE-NUM.
+     Performed when YYTABLE does not specify something else to do.  Zero
+     means the default is an error.  */
+static const yytype_uint8 yydefact[] =
+{
+       0,     4,     5,    21,    22,     0,     0,     2,     0,     0,
+       0,     0,    10,    27,     0,     0,     1,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     3,     0,     0,    19,    35,     6,    44,     7,    46,
+       8,    48,     9,    50,     0,     0,     0,    11,    12,    53,
+      13,    55,    14,    57,    15,    59,    16,    61,    17,    63,
+       0,     0,    43,    23,    45,    24,    47,    25,    49,    26,
+      51,    28,    52,    29,    54,    30,    56,    31,    58,    32,
+      60,    33,    62,    34,     0,     0,    20,    64,     0,    10,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     6,     7,     8,
+       9,    12,    13,    14,    15,    16,    17,     0,    18,    36,
+      37,    38,    39,    40,    41,    42,     0,    18
+};
+
+  /* YYPGOTO[NTERM-NUM].  */
+static const yytype_int8 yypgoto[] =
+{
+     -14,   -14,    -5,    35
+};
+
+  /* YYDEFGOTO[NTERM-NUM].  */
+static const yytype_int8 yydefgoto[] =
+{
+      -1,     8,     9,    10
+};
+
+  /* YYTABLE[YYPACT[STATE-NUM]] -- What to do in state STATE-NUM.  If
+     positive, shift that token.  If negative, reduce the rule whose
+     number is the opposite.  If YYTABLE_NINF, syntax error.  */
+static const yytype_int16 yytable[] =
+{
+      12,    14,    19,    20,    21,    11,    42,    17,    18,    19,
+      20,    21,    46,    48,    50,    52,    57,    58,    60,    62,
+      64,    66,    68,    70,    72,    74,    76,    78,    80,    82,
+      84,    86,    88,    90,    92,    94,    31,    32,    33,    16,
+      13,    15,   103,   104,    21,    21,    43,    33,    98,     0,
+      99,   100,    47,    49,    51,    53,     0,    59,    61,    63,
+      65,    67,    69,    71,    73,    75,    77,    79,    81,    83,
+      85,    87,    89,    91,    93,    95,     1,     2,     3,     4,
+       0,     5,    29,    30,    31,    32,    33,     0,     0,     0,
+       0,     6,     0,   116,     0,     7,   117,   118,   119,   120,
+     121,   122,   123,   124,   125,   126,   127,   128,   130,   132,
+     134,    29,    30,    31,    32,    33,    34,    35,    36,    37,
+      38,    39,     0,     0,    40,     0,    41,     1,     2,     3,
+       4,   137,     5,     0,     0,     0,     1,     2,    54,     0,
+       0,    55,     6,     0,     0,     0,     0,   129,   131,   133,
+     135,    56,    17,    18,    19,    20,    21,    22,    23,    24,
+      25,    26,    27,     0,     0,    28,   112,    29,    30,    31,
+      32,    33,    34,    35,    36,    37,    38,    39,     0,     0,
+      40,   113,    17,    18,    19,    20,    21,    22,    23,    24,
+      25,    26,    27,     0,     0,    28,   114,    29,    30,    31,
+      32,    33,    34,    35,    36,    37,    38,    39,     0,     0,
+      40,   115,   101,   102,   103,   104,    21,   105,   106,   107,
+     108,   109,   110,     0,     0,   111,   136,    17,    18,    19,
+      20,    21,    22,    23,    24,    25,    26,    27,     0,    44,
+      28,    29,    30,    31,    32,    33,    34,    35,    36,    37,
+      38,    39,     0,    45,    40,    17,    18,    19,    20,    21,
+      22,    23,    24,    25,    26,    27,     0,    96,    28,    29,
+      30,    31,    32,    33,    34,    35,    36,    37,    38,    39,
+       0,    97,    40,   101,   102,   103,   104,    21,   105,   106,
+     107,   108,   109,   110,     0,    44,   111,   101,   102,   103,
+     104,    21,   105,   106,   107,   108,   109,   110,     0,    96,
+     111,    17,    18,    19,    20,    21,    22,    23,    24,    25,
+      26,    27,     0,     0,    28,    17,    18,    19,    20,    21,
+      22,    23,    24,    25,    26,    27,     0,     0,    -1,    29,
+      30,    31,    32,    33,    34,    35,    36,    37,    38,    39,
+       0,     0,    -1,   101,   102,   103,   104,    21,   105,   106,
+     107,   108,   109,   110,     0,     0,    -1,   101,   102,   103,
+     104,    21
+};
+
+static const yytype_int16 yycheck[] =
+{
+       5,     6,     9,    10,    11,    18,    11,     7,     8,     9,
+      10,    11,    17,    18,    19,    20,    21,    22,    23,    24,
+      25,    26,    27,    28,    29,    30,    31,    32,    33,    34,
+      35,    36,    37,    38,    39,    40,     9,    10,    11,     0,
+       5,     6,     9,    10,    11,    11,    11,    11,    18,    -1,
+      55,    56,    17,    18,    19,    20,    -1,    22,    23,    24,
+      25,    26,    27,    28,    29,    30,    31,    32,    33,    34,
+      35,    36,    37,    38,    39,    40,     3,     4,     5,     6,
+      -1,     8,     7,     8,     9,    10,    11,    -1,    -1,    -1,
+      -1,    18,    -1,    98,    -1,    22,   101,   102,   103,   104,
+     105,   106,   107,   108,   109,   110,   111,   112,   113,   114,
+     115,     7,     8,     9,    10,    11,    12,    13,    14,    15,
+      16,    17,    -1,    -1,    20,    -1,    22,     3,     4,     5,
+       6,   136,     8,    -1,    -1,    -1,     3,     4,     5,    -1,
+      -1,     8,    18,    -1,    -1,    -1,    -1,   112,   113,   114,
+     115,    18,     7,     8,     9,    10,    11,    12,    13,    14,
+      15,    16,    17,    -1,    -1,    20,    21,     7,     8,     9,
+      10,    11,    12,    13,    14,    15,    16,    17,    -1,    -1,
+      20,    21,     7,     8,     9,    10,    11,    12,    13,    14,
+      15,    16,    17,    -1,    -1,    20,    21,     7,     8,     9,
+      10,    11,    12,    13,    14,    15,    16,    17,    -1,    -1,
+      20,    21,     7,     8,     9,    10,    11,    12,    13,    14,
+      15,    16,    17,    -1,    -1,    20,    21,     7,     8,     9,
+      10,    11,    12,    13,    14,    15,    16,    17,    -1,    19,
+      20,     7,     8,     9,    10,    11,    12,    13,    14,    15,
+      16,    17,    -1,    19,    20,     7,     8,     9,    10,    11,
+      12,    13,    14,    15,    16,    17,    -1,    19,    20,     7,
+       8,     9,    10,    11,    12,    13,    14,    15,    16,    17,
+      -1,    19,    20,     7,     8,     9,    10,    11,    12,    13,
+      14,    15,    16,    17,    -1,    19,    20,     7,     8,     9,
+      10,    11,    12,    13,    14,    15,    16,    17,    -1,    19,
+      20,     7,     8,     9,    10,    11,    12,    13,    14,    15,
+      16,    17,    -1,    -1,    20,     7,     8,     9,    10,    11,
+      12,    13,    14,    15,    16,    17,    -1,    -1,    20,     7,
+       8,     9,    10,    11,    12,    13,    14,    15,    16,    17,
+      -1,    -1,    20,     7,     8,     9,    10,    11,    12,    13,
+      14,    15,    16,    17,    -1,    -1,    20,     7,     8,     9,
+      10,    11
+};
+
+  /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
+     symbol of state STATE-NUM.  */
+static const yytype_uint8 yystos[] =
+{
+       0,     3,     4,     5,     6,     8,    18,    22,    25,    26,
+      27,    18,    26,    27,    26,    27,     0,     7,     8,     9,
+      10,    11,    12,    13,    14,    15,    16,    17,    20,     7,
+       8,     9,    10,    11,    12,    13,    14,    15,    16,    17,
+      20,    22,    26,    27,    19,    19,    26,    27,    26,    27,
+      26,    27,    26,    27,     5,     8,    18,    26,    26,    27,
+      26,    27,    26,    27,    26,    27,    26,    27,    26,    27,
+      26,    27,    26,    27,    26,    27,    26,    27,    26,    27,
+      26,    27,    26,    27,    26,    27,    26,    27,    26,    27,
+      26,    27,    26,    27,    26,    27,    19,    19,    18,    26,
+      26,     7,     8,     9,    10,    12,    13,    14,    15,    16,
+      17,    20,    21,    21,    21,    21,    26,    26,    26,    26,
+      26,    26,    26,    26,    26,    26,    26,    26,    26,    27,
+      26,    27,    26,    27,    26,    27,    21,    26
+};
+
+  /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives.  */
+static const yytype_uint8 yyr1[] =
+{
+       0,    24,    25,    25,    26,    26,    26,    26,    26,    26,
+      26,    26,    26,    26,    26,    26,    26,    26,    26,    26,
+      26,    27,    27,    27,    27,    27,    27,    27,    27,    27,
+      27,    27,    27,    27,    27,    27,    27,    27,    27,    27,
+      27,    27,    27,    27,    27,    27,    27,    27,    27,    27,
+      27,    27,    27,    27,    27,    27,    27,    27,    27,    27,
+      27,    27,    27,    27,    27
+};
+
+  /* YYR2[YYN] -- Number of symbols on the right hand side of rule YYN.  */
+static const yytype_uint8 yyr2[] =
+{
+       0,     2,     1,     2,     1,     1,     3,     3,     3,     3,
+       2,     3,     3,     3,     3,     3,     3,     3,     5,     3,
+       4,     1,     1,     3,     3,     3,     3,     2,     3,     3,
+       3,     3,     3,     3,     3,     3,     5,     5,     5,     5,
+       5,     5,     5,     3,     3,     3,     3,     3,     3,     3,
+       3,     3,     3,     3,     3,     3,     3,     3,     3,     3,
+       3,     3,     3,     3,     4
+};
+
+
+#define yyerrok         (yyerrstatus = 0)
+#define yyclearin       (yychar = YYEMPTY)
+#define YYEMPTY         (-2)
+#define YYEOF           0
+
+#define YYACCEPT        goto yyacceptlab
+#define YYABORT         goto yyabortlab
+#define YYERROR         goto yyerrorlab
+
+
+#define YYRECOVERING()  (!!yyerrstatus)
+
+#define YYBACKUP(Token, Value)                                  \
+do                                                              \
+  if (yychar == YYEMPTY)                                        \
+    {                                                           \
+      yychar = (Token);                                         \
+      yylval = (Value);                                         \
+      YYPOPSTACK (yylen);                                       \
+      yystate = *yyssp;                                         \
+      goto yybackup;                                            \
+    }                                                           \
+  else                                                          \
+    {                                                           \
+      yyerror (YY_("syntax error: cannot back up")); \
+      YYERROR;                                                  \
+    }                                                           \
+while (0)
+
+/* Error token number */
+#define YYTERROR        1
+#define YYERRCODE       256
+
+
+
+/* Enable debugging if requested.  */
+#if YYDEBUG
+
+# ifndef YYFPRINTF
+#  include <stdio.h> /* INFRINGES ON USER NAME SPACE */
+#  define YYFPRINTF fprintf
+# endif
+
+# define YYDPRINTF(Args)                        \
+do {                                            \
+  if (yydebug)                                  \
+    YYFPRINTF Args;                             \
+} while (0)
+
+/* This macro is provided for backward compatibility. */
+#ifndef YY_LOCATION_PRINT
+# define YY_LOCATION_PRINT(File, Loc) ((void) 0)
+#endif
+
+
+# define YY_SYMBOL_PRINT(Title, Type, Value, Location)                    \
+do {                                                                      \
+  if (yydebug)                                                            \
+    {                                                                     \
+      YYFPRINTF (stderr, "%s ", Title);                                   \
+      yy_symbol_print (stderr,                                            \
+                  Type, Value); \
+      YYFPRINTF (stderr, "\n");                                           \
+    }                                                                     \
+} while (0)
+
+
+/*----------------------------------------.
+| Print this symbol's value on YYOUTPUT.  |
+`----------------------------------------*/
+
+static void
+yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep)
+{
+  FILE *yyo = yyoutput;
+  YYUSE (yyo);
+  if (!yyvaluep)
+    return;
+# ifdef YYPRINT
+  if (yytype < YYNTOKENS)
+    YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep);
+# endif
+  YYUSE (yytype);
+}
+
+
+/*--------------------------------.
+| Print this symbol on YYOUTPUT.  |
+`--------------------------------*/
+
+static void
+yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep)
+{
+  YYFPRINTF (yyoutput, "%s %s (",
+             yytype < YYNTOKENS ? "token" : "nterm", yytname[yytype]);
+
+  yy_symbol_value_print (yyoutput, yytype, yyvaluep);
+  YYFPRINTF (yyoutput, ")");
+}
+
+/*------------------------------------------------------------------.
+| yy_stack_print -- Print the state stack from its BOTTOM up to its |
+| TOP (included).                                                   |
+`------------------------------------------------------------------*/
+
+static void
+yy_stack_print (yytype_int16 *yybottom, yytype_int16 *yytop)
+{
+  YYFPRINTF (stderr, "Stack now");
+  for (; yybottom <= yytop; yybottom++)
+    {
+      int yybot = *yybottom;
+      YYFPRINTF (stderr, " %d", yybot);
+    }
+  YYFPRINTF (stderr, "\n");
+}
+
+# define YY_STACK_PRINT(Bottom, Top)                            \
+do {                                                            \
+  if (yydebug)                                                  \
+    yy_stack_print ((Bottom), (Top));                           \
+} while (0)
+
+
+/*------------------------------------------------.
+| Report that the YYRULE is going to be reduced.  |
+`------------------------------------------------*/
+
+static void
+yy_reduce_print (yytype_int16 *yyssp, YYSTYPE *yyvsp, int yyrule)
+{
+  unsigned long int yylno = yyrline[yyrule];
+  int yynrhs = yyr2[yyrule];
+  int yyi;
+  YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n",
+             yyrule - 1, yylno);
+  /* The symbols being reduced.  */
+  for (yyi = 0; yyi < yynrhs; yyi++)
+    {
+      YYFPRINTF (stderr, "   $%d = ", yyi + 1);
+      yy_symbol_print (stderr,
+                       yystos[yyssp[yyi + 1 - yynrhs]],
+                       &(yyvsp[(yyi + 1) - (yynrhs)])
+                                              );
+      YYFPRINTF (stderr, "\n");
+    }
+}
+
+# define YY_REDUCE_PRINT(Rule)          \
+do {                                    \
+  if (yydebug)                          \
+    yy_reduce_print (yyssp, yyvsp, Rule); \
+} while (0)
+
+/* Nonzero means print parse trace.  It is left uninitialized so that
+   multiple parsers can coexist.  */
+int yydebug;
+#else /* !YYDEBUG */
+# define YYDPRINTF(Args)
+# define YY_SYMBOL_PRINT(Title, Type, Value, Location)
+# define YY_STACK_PRINT(Bottom, Top)
+# define YY_REDUCE_PRINT(Rule)
+#endif /* !YYDEBUG */
+
+
+/* YYINITDEPTH -- initial size of the parser's stacks.  */
+#ifndef YYINITDEPTH
+# define YYINITDEPTH 200
+#endif
+
+/* YYMAXDEPTH -- maximum size the stacks can grow to (effective only
+   if the built-in stack extension method is used).
+
+   Do not make this value too large; the results are undefined if
+   YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH)
+   evaluated with infinite-precision integer arithmetic.  */
+
+#ifndef YYMAXDEPTH
+# define YYMAXDEPTH 10000
+#endif
+
+
+#if YYERROR_VERBOSE
+
+# ifndef yystrlen
+#  if defined __GLIBC__ && defined _STRING_H
+#   define yystrlen strlen
+#  else
+/* Return the length of YYSTR.  */
+static YYSIZE_T
+yystrlen (const char *yystr)
+{
+  YYSIZE_T yylen;
+  for (yylen = 0; yystr[yylen]; yylen++)
+    continue;
+  return yylen;
+}
+#  endif
+# endif
+
+# ifndef yystpcpy
+#  if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE
+#   define yystpcpy stpcpy
+#  else
+/* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in
+   YYDEST.  */
+static char *
+yystpcpy (char *yydest, const char *yysrc)
+{
+  char *yyd = yydest;
+  const char *yys = yysrc;
+
+  while ((*yyd++ = *yys++) != '\0')
+    continue;
+
+  return yyd - 1;
+}
+#  endif
+# endif
+
+# ifndef yytnamerr
+/* Copy to YYRES the contents of YYSTR after stripping away unnecessary
+   quotes and backslashes, so that it's suitable for yyerror.  The
+   heuristic is that double-quoting is unnecessary unless the string
+   contains an apostrophe, a comma, or backslash (other than
+   backslash-backslash).  YYSTR is taken from yytname.  If YYRES is
+   null, do not copy; instead, return the length of what the result
+   would have been.  */
+static YYSIZE_T
+yytnamerr (char *yyres, const char *yystr)
+{
+  if (*yystr == '"')
+    {
+      YYSIZE_T yyn = 0;
+      char const *yyp = yystr;
+
+      for (;;)
+        switch (*++yyp)
+          {
+          case '\'':
+          case ',':
+            goto do_not_strip_quotes;
+
+          case '\\':
+            if (*++yyp != '\\')
+              goto do_not_strip_quotes;
+            /* Fall through.  */
+          default:
+            if (yyres)
+              yyres[yyn] = *yyp;
+            yyn++;
+            break;
+
+          case '"':
+            if (yyres)
+              yyres[yyn] = '\0';
+            return yyn;
+          }
+    do_not_strip_quotes: ;
+    }
+
+  if (! yyres)
+    return yystrlen (yystr);
+
+  return yystpcpy (yyres, yystr) - yyres;
+}
+# endif
+
+/* Copy into *YYMSG, which is of size *YYMSG_ALLOC, an error message
+   about the unexpected token YYTOKEN for the state stack whose top is
+   YYSSP.
+
+   Return 0 if *YYMSG was successfully written.  Return 1 if *YYMSG is
+   not large enough to hold the message.  In that case, also set
+   *YYMSG_ALLOC to the required number of bytes.  Return 2 if the
+   required number of bytes is too large to store.  */
+static int
+yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg,
+                yytype_int16 *yyssp, int yytoken)
+{
+  YYSIZE_T yysize0 = yytnamerr (YY_NULLPTR, yytname[yytoken]);
+  YYSIZE_T yysize = yysize0;
+  enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 };
+  /* Internationalized format string. */
+  const char *yyformat = YY_NULLPTR;
+  /* Arguments of yyformat. */
+  char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM];
+  /* Number of reported tokens (one for the "unexpected", one per
+     "expected"). */
+  int yycount = 0;
+
+  /* There are many possibilities here to consider:
+     - If this state is a consistent state with a default action, then
+       the only way this function was invoked is if the default action
+       is an error action.  In that case, don't check for expected
+       tokens because there are none.
+     - The only way there can be no lookahead present (in yychar) is if
+       this state is a consistent state with a default action.  Thus,
+       detecting the absence of a lookahead is sufficient to determine
+       that there is no unexpected or expected token to report.  In that
+       case, just report a simple "syntax error".
+     - Don't assume there isn't a lookahead just because this state is a
+       consistent state with a default action.  There might have been a
+       previous inconsistent state, consistent state with a non-default
+       action, or user semantic action that manipulated yychar.
+     - Of course, the expected token list depends on states to have
+       correct lookahead information, and it depends on the parser not
+       to perform extra reductions after fetching a lookahead from the
+       scanner and before detecting a syntax error.  Thus, state merging
+       (from LALR or IELR) and default reductions corrupt the expected
+       token list.  However, the list is correct for canonical LR with
+       one exception: it will still contain any token that will not be
+       accepted due to an error action in a later state.
+  */
+  if (yytoken != YYEMPTY)
+    {
+      int yyn = yypact[*yyssp];
+      yyarg[yycount++] = yytname[yytoken];
+      if (!yypact_value_is_default (yyn))
+        {
+          /* Start YYX at -YYN if negative to avoid negative indexes in
+             YYCHECK.  In other words, skip the first -YYN actions for
+             this state because they are default actions.  */
+          int yyxbegin = yyn < 0 ? -yyn : 0;
+          /* Stay within bounds of both yycheck and yytname.  */
+          int yychecklim = YYLAST - yyn + 1;
+          int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS;
+          int yyx;
+
+          for (yyx = yyxbegin; yyx < yyxend; ++yyx)
+            if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR
+                && !yytable_value_is_error (yytable[yyx + yyn]))
+              {
+                if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM)
+                  {
+                    yycount = 1;
+                    yysize = yysize0;
+                    break;
+                  }
+                yyarg[yycount++] = yytname[yyx];
+                {
+                  YYSIZE_T yysize1 = yysize + yytnamerr (YY_NULLPTR, yytname[yyx]);
+                  if (! (yysize <= yysize1
+                         && yysize1 <= YYSTACK_ALLOC_MAXIMUM))
+                    return 2;
+                  yysize = yysize1;
+                }
+              }
+        }
+    }
+
+  switch (yycount)
+    {
+# define YYCASE_(N, S)                      \
+      case N:                               \
+        yyformat = S;                       \
+      break
+      YYCASE_(0, YY_("syntax error"));
+      YYCASE_(1, YY_("syntax error, unexpected %s"));
+      YYCASE_(2, YY_("syntax error, unexpected %s, expecting %s"));
+      YYCASE_(3, YY_("syntax error, unexpected %s, expecting %s or %s"));
+      YYCASE_(4, YY_("syntax error, unexpected %s, expecting %s or %s or %s"));
+      YYCASE_(5, YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s"));
+# undef YYCASE_
+    }
+
+  {
+    YYSIZE_T yysize1 = yysize + yystrlen (yyformat);
+    if (! (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM))
+      return 2;
+    yysize = yysize1;
+  }
+
+  if (*yymsg_alloc < yysize)
+    {
+      *yymsg_alloc = 2 * yysize;
+      if (! (yysize <= *yymsg_alloc
+             && *yymsg_alloc <= YYSTACK_ALLOC_MAXIMUM))
+        *yymsg_alloc = YYSTACK_ALLOC_MAXIMUM;
+      return 1;
+    }
+
+  /* Avoid sprintf, as that infringes on the user's name space.
+     Don't have undefined behavior even if the translation
+     produced a string with the wrong number of "%s"s.  */
+  {
+    char *yyp = *yymsg;
+    int yyi = 0;
+    while ((*yyp = *yyformat) != '\0')
+      if (*yyp == '%' && yyformat[1] == 's' && yyi < yycount)
+        {
+          yyp += yytnamerr (yyp, yyarg[yyi++]);
+          yyformat += 2;
+        }
+      else
+        {
+          yyp++;
+          yyformat++;
+        }
+  }
+  return 0;
+}
+#endif /* YYERROR_VERBOSE */
+
+/*-----------------------------------------------.
+| Release the memory associated to this symbol.  |
+`-----------------------------------------------*/
+
+static void
+yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep)
+{
+  YYUSE (yyvaluep);
+  if (!yymsg)
+    yymsg = "Deleting";
+  YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp);
+
+  YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
+  YYUSE (yytype);
+  YY_IGNORE_MAYBE_UNINITIALIZED_END
+}
+
+
+
+
+/* The lookahead symbol.  */
+int yychar;
+
+/* The semantic value of the lookahead symbol.  */
+YYSTYPE yylval;
+/* Number of syntax errors so far.  */
+int yynerrs;
+
+
+/*----------.
+| yyparse.  |
+`----------*/
+
+int
+yyparse (void)
+{
+    int yystate;
+    /* Number of tokens to shift before error messages enabled.  */
+    int yyerrstatus;
+
+    /* The stacks and their tools:
+       'yyss': related to states.
+       'yyvs': related to semantic values.
+
+       Refer to the stacks through separate pointers, to allow yyoverflow
+       to reallocate them elsewhere.  */
+
+    /* The state stack.  */
+    yytype_int16 yyssa[YYINITDEPTH];
+    yytype_int16 *yyss;
+    yytype_int16 *yyssp;
+
+    /* The semantic value stack.  */
+    YYSTYPE yyvsa[YYINITDEPTH];
+    YYSTYPE *yyvs;
+    YYSTYPE *yyvsp;
+
+    YYSIZE_T yystacksize;
+
+  int yyn;
+  int yyresult;
+  /* Lookahead token as an internal (translated) token number.  */
+  int yytoken = 0;
+  /* The variables used to return semantic value and location from the
+     action routines.  */
+  YYSTYPE yyval;
+
+#if YYERROR_VERBOSE
+  /* Buffer for error messages, and its allocated size.  */
+  char yymsgbuf[128];
+  char *yymsg = yymsgbuf;
+  YYSIZE_T yymsg_alloc = sizeof yymsgbuf;
+#endif
+
+#define YYPOPSTACK(N)   (yyvsp -= (N), yyssp -= (N))
+
+  /* The number of symbols on the RHS of the reduced rule.
+     Keep to zero when no symbol should be popped.  */
+  int yylen = 0;
+
+  yyssp = yyss = yyssa;
+  yyvsp = yyvs = yyvsa;
+  yystacksize = YYINITDEPTH;
+
+  YYDPRINTF ((stderr, "Starting parse\n"));
+
+  yystate = 0;
+  yyerrstatus = 0;
+  yynerrs = 0;
+  yychar = YYEMPTY; /* Cause a token to be read.  */
+  goto yysetstate;
+
+/*------------------------------------------------------------.
+| yynewstate -- Push a new state, which is found in yystate.  |
+`------------------------------------------------------------*/
+ yynewstate:
+  /* In all cases, when you get here, the value and location stacks
+     have just been pushed.  So pushing a state here evens the stacks.  */
+  yyssp++;
+
+ yysetstate:
+  *yyssp = yystate;
+
+  if (yyss + yystacksize - 1 <= yyssp)
+    {
+      /* Get the current used size of the three stacks, in elements.  */
+      YYSIZE_T yysize = yyssp - yyss + 1;
+
+#ifdef yyoverflow
+      {
+        /* Give user a chance to reallocate the stack.  Use copies of
+           these so that the &'s don't force the real ones into
+           memory.  */
+        YYSTYPE *yyvs1 = yyvs;
+        yytype_int16 *yyss1 = yyss;
+
+        /* Each stack pointer address is followed by the size of the
+           data in use in that stack, in bytes.  This used to be a
+           conditional around just the two extra args, but that might
+           be undefined if yyoverflow is a macro.  */
+        yyoverflow (YY_("memory exhausted"),
+                    &yyss1, yysize * sizeof (*yyssp),
+                    &yyvs1, yysize * sizeof (*yyvsp),
+                    &yystacksize);
+
+        yyss = yyss1;
+        yyvs = yyvs1;
+      }
+#else /* no yyoverflow */
+# ifndef YYSTACK_RELOCATE
+      goto yyexhaustedlab;
+# else
+      /* Extend the stack our own way.  */
+      if (YYMAXDEPTH <= yystacksize)
+        goto yyexhaustedlab;
+      yystacksize *= 2;
+      if (YYMAXDEPTH < yystacksize)
+        yystacksize = YYMAXDEPTH;
+
+      {
+        yytype_int16 *yyss1 = yyss;
+        union yyalloc *yyptr =
+          (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
+        if (! yyptr)
+          goto yyexhaustedlab;
+        YYSTACK_RELOCATE (yyss_alloc, yyss);
+        YYSTACK_RELOCATE (yyvs_alloc, yyvs);
+#  undef YYSTACK_RELOCATE
+        if (yyss1 != yyssa)
+          YYSTACK_FREE (yyss1);
+      }
+# endif
+#endif /* no yyoverflow */
+
+      yyssp = yyss + yysize - 1;
+      yyvsp = yyvs + yysize - 1;
+
+      YYDPRINTF ((stderr, "Stack size increased to %lu\n",
+                  (unsigned long int) yystacksize));
+
+      if (yyss + yystacksize - 1 <= yyssp)
+        YYABORT;
+    }
+
+  YYDPRINTF ((stderr, "Entering state %d\n", yystate));
+
+  if (yystate == YYFINAL)
+    YYACCEPT;
+
+  goto yybackup;
+
+/*-----------.
+| yybackup.  |
+`-----------*/
+yybackup:
+
+  /* Do appropriate processing given the current state.  Read a
+     lookahead token if we need one and don't already have one.  */
+
+  /* First try to decide what to do without reference to lookahead token.  */
+  yyn = yypact[yystate];
+  if (yypact_value_is_default (yyn))
+    goto yydefault;
+
+  /* Not known => get a lookahead token if don't already have one.  */
+
+  /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol.  */
+  if (yychar == YYEMPTY)
+    {
+      YYDPRINTF ((stderr, "Reading a token: "));
+      yychar = yylex ();
+    }
+
+  if (yychar <= YYEOF)
+    {
+      yychar = yytoken = YYEOF;
+      YYDPRINTF ((stderr, "Now at end of input.\n"));
+    }
+  else
+    {
+      yytoken = YYTRANSLATE (yychar);
+      YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc);
+    }
+
+  /* If the proper action on seeing token YYTOKEN is to reduce or to
+     detect an error, take that action.  */
+  yyn += yytoken;
+  if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken)
+    goto yydefault;
+  yyn = yytable[yyn];
+  if (yyn <= 0)
+    {
+      if (yytable_value_is_error (yyn))
+        goto yyerrlab;
+      yyn = -yyn;
+      goto yyreduce;
+    }
+
+  /* Count tokens shifted since error; after three, turn off error
+     status.  */
+  if (yyerrstatus)
+    yyerrstatus--;
+
+  /* Shift the lookahead token.  */
+  YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc);
+
+  /* Discard the shifted token.  */
+  yychar = YYEMPTY;
+
+  yystate = yyn;
+  YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
+  *++yyvsp = yylval;
+  YY_IGNORE_MAYBE_UNINITIALIZED_END
+
+  goto yynewstate;
+
+
+/*-----------------------------------------------------------.
+| yydefault -- do the default action for the current state.  |
+`-----------------------------------------------------------*/
+yydefault:
+  yyn = yydefact[yystate];
+  if (yyn == 0)
+    goto yyerrlab;
+  goto yyreduce;
+
+
+/*-----------------------------.
+| yyreduce -- Do a reduction.  |
+`-----------------------------*/
+yyreduce:
+  /* yyn is the number of a rule to reduce with.  */
+  yylen = yyr2[yyn];
+
+  /* If YYLEN is nonzero, implement the default value of the action:
+     '$$ = $1'.
+
+     Otherwise, the following line sets YYVAL to garbage.
+     This behavior is undocumented and Bison
+     users should not rely upon it.  Assigning to YYVAL
+     unconditionally makes the parser a bit smaller, and it avoids a
+     GCC warning that YYVAL may be used uninitialized.  */
+  yyval = yyvsp[1-yylen];
+
+
+  YY_REDUCE_PRINT (yyn);
+  switch (yyn)
+    {
+        case 2:
+#line 63 "yacc_parser.yacc" /* yacc.c:1646  */
+    { /* Nothing to do */ }
+#line 1386 "yacc_parser.cpp" /* yacc.c:1646  */
+    break;
+
+  case 3:
+#line 64 "yacc_parser.yacc" /* yacc.c:1646  */
+    { parsed = (yyvsp[-1].filterNode); }
+#line 1392 "yacc_parser.cpp" /* yacc.c:1646  */
+    break;
+
+  case 4:
+#line 68 "yacc_parser.yacc" /* yacc.c:1646  */
+    { (yyval.scalarNode) = new CScalarValExprNode(*(yyvsp[0].str)); delete (yyvsp[0].str); }
+#line 1398 "yacc_parser.cpp" /* yacc.c:1646  */
+    break;
+
+  case 5:
+#line 69 "yacc_parser.yacc" /* yacc.c:1646  */
+    { (yyval.scalarNode) = new CScalarVarExprNode(*(yyvsp[0].str)); delete (yyvsp[0].str); }
+#line 1404 "yacc_parser.cpp" /* yacc.c:1646  */
+    break;
+
+  case 6:
+#line 70 "yacc_parser.yacc" /* yacc.c:1646  */
+    { (yyval.scalarNode) = new CScalarBinaryOpExprNode((yyvsp[-2].scalarNode), "add", (yyvsp[0].scalarNode)); }
+#line 1410 "yacc_parser.cpp" /* yacc.c:1646  */
+    break;
+
+  case 7:
+#line 71 "yacc_parser.yacc" /* yacc.c:1646  */
+    { (yyval.scalarNode) = new CScalarBinaryOpExprNode((yyvsp[-2].scalarNode), "minus", (yyvsp[0].scalarNode)); }
+#line 1416 "yacc_parser.cpp" /* yacc.c:1646  */
+    break;
+
+  case 8:
+#line 72 "yacc_parser.yacc" /* yacc.c:1646  */
+    { (yyval.scalarNode) = new CScalarBinaryOpExprNode((yyvsp[-2].scalarNode), "mult", (yyvsp[0].scalarNode)); }
+#line 1422 "yacc_parser.cpp" /* yacc.c:1646  */
+    break;
+
+  case 9:
+#line 73 "yacc_parser.yacc" /* yacc.c:1646  */
+    { (yyval.scalarNode) = new CScalarBinaryOpExprNode((yyvsp[-2].scalarNode), "div", (yyvsp[0].scalarNode)); }
+#line 1428 "yacc_parser.cpp" /* yacc.c:1646  */
+    break;
+
+  case 10:
+#line 74 "yacc_parser.yacc" /* yacc.c:1646  */
+    { (yyval.scalarNode) = new CScalarUnaryOpExprNode("neg", (yyvsp[0].scalarNode)); }
+#line 1434 "yacc_parser.cpp" /* yacc.c:1646  */
+    break;
+
+  case 11:
+#line 75 "yacc_parser.yacc" /* yacc.c:1646  */
+    { (yyval.scalarNode) = new CScalarBinaryOpExprNode((yyvsp[-2].scalarNode), "pow", (yyvsp[0].scalarNode)); }
+#line 1440 "yacc_parser.cpp" /* yacc.c:1646  */
+    break;
+
+  case 12:
+#line 76 "yacc_parser.yacc" /* yacc.c:1646  */
+    { (yyval.scalarNode) = new CScalarBinaryOpExprNode((yyvsp[-2].scalarNode), "eq", (yyvsp[0].scalarNode)); }
+#line 1446 "yacc_parser.cpp" /* yacc.c:1646  */
+    break;
+
+  case 13:
+#line 77 "yacc_parser.yacc" /* yacc.c:1646  */
+    { (yyval.scalarNode) = new CScalarBinaryOpExprNode((yyvsp[-2].scalarNode), "lt", (yyvsp[0].scalarNode)); }
+#line 1452 "yacc_parser.cpp" /* yacc.c:1646  */
+    break;
+
+  case 14:
+#line 78 "yacc_parser.yacc" /* yacc.c:1646  */
+    { (yyval.scalarNode) = new CScalarBinaryOpExprNode((yyvsp[-2].scalarNode), "gt", (yyvsp[0].scalarNode)); }
+#line 1458 "yacc_parser.cpp" /* yacc.c:1646  */
+    break;
+
+  case 15:
+#line 79 "yacc_parser.yacc" /* yacc.c:1646  */
+    { (yyval.scalarNode) = new CScalarBinaryOpExprNode((yyvsp[-2].scalarNode), "le", (yyvsp[0].scalarNode)); }
+#line 1464 "yacc_parser.cpp" /* yacc.c:1646  */
+    break;
+
+  case 16:
+#line 80 "yacc_parser.yacc" /* yacc.c:1646  */
+    { (yyval.scalarNode) = new CScalarBinaryOpExprNode((yyvsp[-2].scalarNode), "ge", (yyvsp[0].scalarNode)); }
+#line 1470 "yacc_parser.cpp" /* yacc.c:1646  */
+    break;
+
+  case 17:
+#line 81 "yacc_parser.yacc" /* yacc.c:1646  */
+    { (yyval.scalarNode) = new CScalarBinaryOpExprNode((yyvsp[-2].scalarNode), "ne", (yyvsp[0].scalarNode)); }
+#line 1476 "yacc_parser.cpp" /* yacc.c:1646  */
+    break;
+
+  case 18:
+#line 82 "yacc_parser.yacc" /* yacc.c:1646  */
+    {(yyval.scalarNode) = new CScalarTernaryOpExprNode((yyvsp[-4].scalarNode), "cond", (yyvsp[-2].scalarNode), (yyvsp[0].scalarNode));}
+#line 1482 "yacc_parser.cpp" /* yacc.c:1646  */
+    break;
+
+  case 19:
+#line 83 "yacc_parser.yacc" /* yacc.c:1646  */
+    { (yyval.scalarNode) = (yyvsp[-1].scalarNode); }
+#line 1488 "yacc_parser.cpp" /* yacc.c:1646  */
+    break;
+
+  case 20:
+#line 84 "yacc_parser.yacc" /* yacc.c:1646  */
+    { (yyval.scalarNode) = new CScalarUnaryOpExprNode(*(yyvsp[-3].str), (yyvsp[-1].scalarNode)); delete (yyvsp[-3].str); }
+#line 1494 "yacc_parser.cpp" /* yacc.c:1646  */
+    break;
+
+  case 21:
+#line 88 "yacc_parser.yacc" /* yacc.c:1646  */
+    { (yyval.filterNode) = new CFilterFieldExprNode(*(yyvsp[0].str)); delete (yyvsp[0].str); }
+#line 1500 "yacc_parser.cpp" /* yacc.c:1646  */
+    break;
+
+  case 22:
+#line 89 "yacc_parser.yacc" /* yacc.c:1646  */
+    { (yyval.filterNode) = new CFilterTemporalFieldExprNode(*(yyvsp[0].str)); delete (yyvsp[0].str); }
+#line 1506 "yacc_parser.cpp" /* yacc.c:1646  */
+    break;
+
+  case 23:
+#line 90 "yacc_parser.yacc" /* yacc.c:1646  */
+    { (yyval.filterNode) = new CFilterFieldFieldOpExprNode((yyvsp[-2].filterNode), "add", (yyvsp[0].filterNode)); }
+#line 1512 "yacc_parser.cpp" /* yacc.c:1646  */
+    break;
+
+  case 24:
+#line 91 "yacc_parser.yacc" /* yacc.c:1646  */
+    { (yyval.filterNode) = new CFilterFieldFieldOpExprNode((yyvsp[-2].filterNode), "minus", (yyvsp[0].filterNode)); }
+#line 1518 "yacc_parser.cpp" /* yacc.c:1646  */
+    break;
+
+  case 25:
+#line 92 "yacc_parser.yacc" /* yacc.c:1646  */
+    { (yyval.filterNode) = new CFilterFieldFieldOpExprNode((yyvsp[-2].filterNode), "mult", (yyvsp[0].filterNode)); }
+#line 1524 "yacc_parser.cpp" /* yacc.c:1646  */
+    break;
+
+  case 26:
+#line 93 "yacc_parser.yacc" /* yacc.c:1646  */
+    { (yyval.filterNode) = new CFilterFieldFieldOpExprNode((yyvsp[-2].filterNode), "div", (yyvsp[0].filterNode)); }
+#line 1530 "yacc_parser.cpp" /* yacc.c:1646  */
+    break;
+
+  case 27:
+#line 94 "yacc_parser.yacc" /* yacc.c:1646  */
+    { (yyval.filterNode) = new CFilterUnaryOpExprNode("neg", (yyvsp[0].filterNode)); }
+#line 1536 "yacc_parser.cpp" /* yacc.c:1646  */
+    break;
+
+  case 28:
+#line 95 "yacc_parser.yacc" /* yacc.c:1646  */
+    { (yyval.filterNode) = new CFilterFieldFieldOpExprNode((yyvsp[-2].filterNode), "pow", (yyvsp[0].filterNode)); }
+#line 1542 "yacc_parser.cpp" /* yacc.c:1646  */
+    break;
+
+  case 29:
+#line 96 "yacc_parser.yacc" /* yacc.c:1646  */
+    { (yyval.filterNode) = new CFilterFieldFieldOpExprNode((yyvsp[-2].filterNode), "eq", (yyvsp[0].filterNode)); }
+#line 1548 "yacc_parser.cpp" /* yacc.c:1646  */
+    break;
+
+  case 30:
+#line 97 "yacc_parser.yacc" /* yacc.c:1646  */
+    { (yyval.filterNode) = new CFilterFieldFieldOpExprNode((yyvsp[-2].filterNode), "lt", (yyvsp[0].filterNode)); }
+#line 1554 "yacc_parser.cpp" /* yacc.c:1646  */
+    break;
+
+  case 31:
+#line 98 "yacc_parser.yacc" /* yacc.c:1646  */
+    { (yyval.filterNode) = new CFilterFieldFieldOpExprNode((yyvsp[-2].filterNode), "gt", (yyvsp[0].filterNode)); }
+#line 1560 "yacc_parser.cpp" /* yacc.c:1646  */
+    break;
+
+  case 32:
+#line 99 "yacc_parser.yacc" /* yacc.c:1646  */
+    { (yyval.filterNode) = new CFilterFieldFieldOpExprNode((yyvsp[-2].filterNode), "le", (yyvsp[0].filterNode)); }
+#line 1566 "yacc_parser.cpp" /* yacc.c:1646  */
+    break;
+
+  case 33:
+#line 100 "yacc_parser.yacc" /* yacc.c:1646  */
+    { (yyval.filterNode) = new CFilterFieldFieldOpExprNode((yyvsp[-2].filterNode), "ge", (yyvsp[0].filterNode)); }
+#line 1572 "yacc_parser.cpp" /* yacc.c:1646  */
+    break;
+
+  case 34:
+#line 101 "yacc_parser.yacc" /* yacc.c:1646  */
+    { (yyval.filterNode) = new CFilterFieldFieldOpExprNode((yyvsp[-2].filterNode), "ne", (yyvsp[0].filterNode)); }
+#line 1578 "yacc_parser.cpp" /* yacc.c:1646  */
+    break;
+
+  case 35:
+#line 102 "yacc_parser.yacc" /* yacc.c:1646  */
+    { (yyval.filterNode) = (yyvsp[-1].filterNode); }
+#line 1584 "yacc_parser.cpp" /* yacc.c:1646  */
+    break;
+
+  case 36:
+#line 103 "yacc_parser.yacc" /* yacc.c:1646  */
+    {(yyval.filterNode) = new CFilterScalarScalarFieldOpExprNode((yyvsp[-4].scalarNode), "cond",(yyvsp[-2].scalarNode), (yyvsp[0].filterNode));}
+#line 1590 "yacc_parser.cpp" /* yacc.c:1646  */
+    break;
+
+  case 37:
+#line 104 "yacc_parser.yacc" /* yacc.c:1646  */
+    {(yyval.filterNode) = new CFilterScalarFieldScalarOpExprNode((yyvsp[-4].scalarNode), "cond",(yyvsp[-2].filterNode), (yyvsp[0].scalarNode));}
+#line 1596 "yacc_parser.cpp" /* yacc.c:1646  */
+    break;
+
+  case 38:
+#line 105 "yacc_parser.yacc" /* yacc.c:1646  */
+    {(yyval.filterNode) = new CFilterScalarFieldFieldOpExprNode((yyvsp[-4].scalarNode), "cond",(yyvsp[-2].filterNode), (yyvsp[0].filterNode));}
+#line 1602 "yacc_parser.cpp" /* yacc.c:1646  */
+    break;
+
+  case 39:
+#line 106 "yacc_parser.yacc" /* yacc.c:1646  */
+    {(yyval.filterNode) = new CFilterFieldScalarScalarOpExprNode((yyvsp[-4].filterNode), "cond",(yyvsp[-2].scalarNode), (yyvsp[0].scalarNode));}
+#line 1608 "yacc_parser.cpp" /* yacc.c:1646  */
+    break;
+
+  case 40:
+#line 107 "yacc_parser.yacc" /* yacc.c:1646  */
+    {(yyval.filterNode) = new CFilterFieldScalarFieldOpExprNode((yyvsp[-4].filterNode), "cond",(yyvsp[-2].scalarNode), (yyvsp[0].filterNode));}
+#line 1614 "yacc_parser.cpp" /* yacc.c:1646  */
+    break;
+
+  case 41:
+#line 108 "yacc_parser.yacc" /* yacc.c:1646  */
+    {(yyval.filterNode) = new CFilterFieldFieldScalarOpExprNode((yyvsp[-4].filterNode), "cond",(yyvsp[-2].filterNode), (yyvsp[0].scalarNode));}
+#line 1620 "yacc_parser.cpp" /* yacc.c:1646  */
+    break;
+
+  case 42:
+#line 109 "yacc_parser.yacc" /* yacc.c:1646  */
+    {(yyval.filterNode) = new CFilterFieldFieldFieldOpExprNode((yyvsp[-4].filterNode), "cond",(yyvsp[-2].filterNode), (yyvsp[0].filterNode));}
+#line 1626 "yacc_parser.cpp" /* yacc.c:1646  */
+    break;
+
+  case 43:
+#line 110 "yacc_parser.yacc" /* yacc.c:1646  */
+    { (yyval.filterNode) = new CFilterFieldScalarOpExprNode((yyvsp[-2].filterNode), "add", (yyvsp[0].scalarNode)); }
+#line 1632 "yacc_parser.cpp" /* yacc.c:1646  */
+    break;
+
+  case 44:
+#line 111 "yacc_parser.yacc" /* yacc.c:1646  */
+    { (yyval.filterNode) = new CFilterScalarFieldOpExprNode((yyvsp[-2].scalarNode), "add", (yyvsp[0].filterNode)); }
+#line 1638 "yacc_parser.cpp" /* yacc.c:1646  */
+    break;
+
+  case 45:
+#line 112 "yacc_parser.yacc" /* yacc.c:1646  */
+    { (yyval.filterNode) = new CFilterFieldScalarOpExprNode((yyvsp[-2].filterNode), "minus", (yyvsp[0].scalarNode)); }
+#line 1644 "yacc_parser.cpp" /* yacc.c:1646  */
+    break;
+
+  case 46:
+#line 113 "yacc_parser.yacc" /* yacc.c:1646  */
+    { (yyval.filterNode) = new CFilterScalarFieldOpExprNode((yyvsp[-2].scalarNode), "minus", (yyvsp[0].filterNode)); }
+#line 1650 "yacc_parser.cpp" /* yacc.c:1646  */
+    break;
+
+  case 47:
+#line 114 "yacc_parser.yacc" /* yacc.c:1646  */
+    { (yyval.filterNode) = new CFilterFieldScalarOpExprNode((yyvsp[-2].filterNode), "mult", (yyvsp[0].scalarNode)); }
+#line 1656 "yacc_parser.cpp" /* yacc.c:1646  */
+    break;
+
+  case 48:
+#line 115 "yacc_parser.yacc" /* yacc.c:1646  */
+    { (yyval.filterNode) = new CFilterScalarFieldOpExprNode((yyvsp[-2].scalarNode), "mult", (yyvsp[0].filterNode)); }
+#line 1662 "yacc_parser.cpp" /* yacc.c:1646  */
+    break;
+
+  case 49:
+#line 116 "yacc_parser.yacc" /* yacc.c:1646  */
+    { (yyval.filterNode) = new CFilterFieldScalarOpExprNode((yyvsp[-2].filterNode), "div", (yyvsp[0].scalarNode)); }
+#line 1668 "yacc_parser.cpp" /* yacc.c:1646  */
+    break;
+
+  case 50:
+#line 117 "yacc_parser.yacc" /* yacc.c:1646  */
+    { (yyval.filterNode) = new CFilterScalarFieldOpExprNode((yyvsp[-2].scalarNode), "div", (yyvsp[0].filterNode)); }
+#line 1674 "yacc_parser.cpp" /* yacc.c:1646  */
+    break;
+
+  case 51:
+#line 118 "yacc_parser.yacc" /* yacc.c:1646  */
+    { (yyval.filterNode) = new CFilterFieldScalarOpExprNode((yyvsp[-2].filterNode), "pow", (yyvsp[0].scalarNode)); }
+#line 1680 "yacc_parser.cpp" /* yacc.c:1646  */
+    break;
+
+  case 52:
+#line 119 "yacc_parser.yacc" /* yacc.c:1646  */
+    { (yyval.filterNode) = new CFilterFieldScalarOpExprNode((yyvsp[-2].filterNode), "eq", (yyvsp[0].scalarNode)); }
+#line 1686 "yacc_parser.cpp" /* yacc.c:1646  */
+    break;
+
+  case 53:
+#line 120 "yacc_parser.yacc" /* yacc.c:1646  */
+    { (yyval.filterNode) = new CFilterScalarFieldOpExprNode((yyvsp[-2].scalarNode), "eq", (yyvsp[0].filterNode)); }
+#line 1692 "yacc_parser.cpp" /* yacc.c:1646  */
+    break;
+
+  case 54:
+#line 121 "yacc_parser.yacc" /* yacc.c:1646  */
+    { (yyval.filterNode) = new CFilterFieldScalarOpExprNode((yyvsp[-2].filterNode), "lt", (yyvsp[0].scalarNode)); }
+#line 1698 "yacc_parser.cpp" /* yacc.c:1646  */
+    break;
+
+  case 55:
+#line 122 "yacc_parser.yacc" /* yacc.c:1646  */
+    { (yyval.filterNode) = new CFilterScalarFieldOpExprNode((yyvsp[-2].scalarNode), "lt", (yyvsp[0].filterNode)); }
+#line 1704 "yacc_parser.cpp" /* yacc.c:1646  */
+    break;
+
+  case 56:
+#line 123 "yacc_parser.yacc" /* yacc.c:1646  */
+    { (yyval.filterNode) = new CFilterFieldScalarOpExprNode((yyvsp[-2].filterNode), "gt", (yyvsp[0].scalarNode)); }
+#line 1710 "yacc_parser.cpp" /* yacc.c:1646  */
+    break;
+
+  case 57:
+#line 124 "yacc_parser.yacc" /* yacc.c:1646  */
+    { (yyval.filterNode) = new CFilterScalarFieldOpExprNode((yyvsp[-2].scalarNode), "gt", (yyvsp[0].filterNode)); }
+#line 1716 "yacc_parser.cpp" /* yacc.c:1646  */
+    break;
+
+  case 58:
+#line 125 "yacc_parser.yacc" /* yacc.c:1646  */
+    { (yyval.filterNode) = new CFilterFieldScalarOpExprNode((yyvsp[-2].filterNode), "le", (yyvsp[0].scalarNode)); }
+#line 1722 "yacc_parser.cpp" /* yacc.c:1646  */
+    break;
+
+  case 59:
+#line 126 "yacc_parser.yacc" /* yacc.c:1646  */
+    { (yyval.filterNode) = new CFilterScalarFieldOpExprNode((yyvsp[-2].scalarNode), "le", (yyvsp[0].filterNode)); }
+#line 1728 "yacc_parser.cpp" /* yacc.c:1646  */
+    break;
+
+  case 60:
+#line 127 "yacc_parser.yacc" /* yacc.c:1646  */
+    { (yyval.filterNode) = new CFilterFieldScalarOpExprNode((yyvsp[-2].filterNode), "ge", (yyvsp[0].scalarNode)); }
+#line 1734 "yacc_parser.cpp" /* yacc.c:1646  */
+    break;
+
+  case 61:
+#line 128 "yacc_parser.yacc" /* yacc.c:1646  */
+    { (yyval.filterNode) = new CFilterScalarFieldOpExprNode((yyvsp[-2].scalarNode), "ge", (yyvsp[0].filterNode)); }
+#line 1740 "yacc_parser.cpp" /* yacc.c:1646  */
+    break;
+
+  case 62:
+#line 129 "yacc_parser.yacc" /* yacc.c:1646  */
+    { (yyval.filterNode) = new CFilterFieldScalarOpExprNode((yyvsp[-2].filterNode), "ne", (yyvsp[0].scalarNode)); }
+#line 1746 "yacc_parser.cpp" /* yacc.c:1646  */
+    break;
+
+  case 63:
+#line 130 "yacc_parser.yacc" /* yacc.c:1646  */
+    { (yyval.filterNode) = new CFilterScalarFieldOpExprNode((yyvsp[-2].scalarNode), "ne", (yyvsp[0].filterNode)); }
+#line 1752 "yacc_parser.cpp" /* yacc.c:1646  */
+    break;
+
+  case 64:
+#line 131 "yacc_parser.yacc" /* yacc.c:1646  */
+    { (yyval.filterNode) = new CFilterUnaryOpExprNode(*(yyvsp[-3].str), (yyvsp[-1].filterNode)); delete (yyvsp[-3].str); }
+#line 1758 "yacc_parser.cpp" /* yacc.c:1646  */
+    break;
+
+
+#line 1762 "yacc_parser.cpp" /* yacc.c:1646  */
+      default: break;
+    }
+  /* User semantic actions sometimes alter yychar, and that requires
+     that yytoken be updated with the new translation.  We take the
+     approach of translating immediately before every use of yytoken.
+     One alternative is translating here after every semantic action,
+     but that translation would be missed if the semantic action invokes
+     YYABORT, YYACCEPT, or YYERROR immediately after altering yychar or
+     if it invokes YYBACKUP.  In the case of YYABORT or YYACCEPT, an
+     incorrect destructor might then be invoked immediately.  In the
+     case of YYERROR or YYBACKUP, subsequent parser actions might lead
+     to an incorrect destructor call or verbose syntax error message
+     before the lookahead is translated.  */
+  YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc);
+
+  YYPOPSTACK (yylen);
+  yylen = 0;
+  YY_STACK_PRINT (yyss, yyssp);
+
+  *++yyvsp = yyval;
+
+  /* Now 'shift' the result of the reduction.  Determine what state
+     that goes to, based on the state we popped back to and the rule
+     number reduced by.  */
+
+  yyn = yyr1[yyn];
+
+  yystate = yypgoto[yyn - YYNTOKENS] + *yyssp;
+  if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp)
+    yystate = yytable[yystate];
+  else
+    yystate = yydefgoto[yyn - YYNTOKENS];
+
+  goto yynewstate;
+
+
+/*--------------------------------------.
+| yyerrlab -- here on detecting error.  |
+`--------------------------------------*/
+yyerrlab:
+  /* Make sure we have latest lookahead translation.  See comments at
+     user semantic actions for why this is necessary.  */
+  yytoken = yychar == YYEMPTY ? YYEMPTY : YYTRANSLATE (yychar);
+
+  /* If not already recovering from an error, report this error.  */
+  if (!yyerrstatus)
+    {
+      ++yynerrs;
+#if ! YYERROR_VERBOSE
+      yyerror (YY_("syntax error"));
+#else
+# define YYSYNTAX_ERROR yysyntax_error (&yymsg_alloc, &yymsg, \
+                                        yyssp, yytoken)
+      {
+        char const *yymsgp = YY_("syntax error");
+        int yysyntax_error_status;
+        yysyntax_error_status = YYSYNTAX_ERROR;
+        if (yysyntax_error_status == 0)
+          yymsgp = yymsg;
+        else if (yysyntax_error_status == 1)
+          {
+            if (yymsg != yymsgbuf)
+              YYSTACK_FREE (yymsg);
+            yymsg = (char *) YYSTACK_ALLOC (yymsg_alloc);
+            if (!yymsg)
+              {
+                yymsg = yymsgbuf;
+                yymsg_alloc = sizeof yymsgbuf;
+                yysyntax_error_status = 2;
+              }
+            else
+              {
+                yysyntax_error_status = YYSYNTAX_ERROR;
+                yymsgp = yymsg;
+              }
+          }
+        yyerror (yymsgp);
+        if (yysyntax_error_status == 2)
+          goto yyexhaustedlab;
+      }
+# undef YYSYNTAX_ERROR
+#endif
+    }
+
+
+
+  if (yyerrstatus == 3)
+    {
+      /* If just tried and failed to reuse lookahead token after an
+         error, discard it.  */
+
+      if (yychar <= YYEOF)
+        {
+          /* Return failure if at end of input.  */
+          if (yychar == YYEOF)
+            YYABORT;
+        }
+      else
+        {
+          yydestruct ("Error: discarding",
+                      yytoken, &yylval);
+          yychar = YYEMPTY;
+        }
+    }
+
+  /* Else will try to reuse lookahead token after shifting the error
+     token.  */
+  goto yyerrlab1;
+
+
+/*---------------------------------------------------.
+| yyerrorlab -- error raised explicitly by YYERROR.  |
+`---------------------------------------------------*/
+yyerrorlab:
+
+  /* Pacify compilers like GCC when the user code never invokes
+     YYERROR and the label yyerrorlab therefore never appears in user
+     code.  */
+  if (/*CONSTCOND*/ 0)
+     goto yyerrorlab;
+
+  /* Do not reclaim the symbols of the rule whose action triggered
+     this YYERROR.  */
+  YYPOPSTACK (yylen);
+  yylen = 0;
+  YY_STACK_PRINT (yyss, yyssp);
+  yystate = *yyssp;
+  goto yyerrlab1;
+
+
+/*-------------------------------------------------------------.
+| yyerrlab1 -- common code for both syntax error and YYERROR.  |
+`-------------------------------------------------------------*/
+yyerrlab1:
+  yyerrstatus = 3;      /* Each real token shifted decrements this.  */
+
+  for (;;)
+    {
+      yyn = yypact[yystate];
+      if (!yypact_value_is_default (yyn))
+        {
+          yyn += YYTERROR;
+          if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR)
+            {
+              yyn = yytable[yyn];
+              if (0 < yyn)
+                break;
+            }
+        }
+
+      /* Pop the current state because it cannot handle the error token.  */
+      if (yyssp == yyss)
+        YYABORT;
+
+
+      yydestruct ("Error: popping",
+                  yystos[yystate], yyvsp);
+      YYPOPSTACK (1);
+      yystate = *yyssp;
+      YY_STACK_PRINT (yyss, yyssp);
+    }
+
+  YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
+  *++yyvsp = yylval;
+  YY_IGNORE_MAYBE_UNINITIALIZED_END
+
+
+  /* Shift the error token.  */
+  YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp);
+
+  yystate = yyn;
+  goto yynewstate;
+
+
+/*-------------------------------------.
+| yyacceptlab -- YYACCEPT comes here.  |
+`-------------------------------------*/
+yyacceptlab:
+  yyresult = 0;
+  goto yyreturn;
+
+/*-----------------------------------.
+| yyabortlab -- YYABORT comes here.  |
+`-----------------------------------*/
+yyabortlab:
+  yyresult = 1;
+  goto yyreturn;
+
+#if !defined yyoverflow || YYERROR_VERBOSE
+/*-------------------------------------------------.
+| yyexhaustedlab -- memory exhaustion comes here.  |
+`-------------------------------------------------*/
+yyexhaustedlab:
+  yyerror (YY_("memory exhausted"));
+  yyresult = 2;
+  /* Fall through.  */
+#endif
+
+yyreturn:
+  if (yychar != YYEMPTY)
+    {
+      /* Make sure we have latest lookahead translation.  See comments at
+         user semantic actions for why this is necessary.  */
+      yytoken = YYTRANSLATE (yychar);
+      yydestruct ("Cleanup: discarding lookahead",
+                  yytoken, &yylval);
+    }
+  /* Do not reclaim the symbols of the rule whose action triggered
+     this YYABORT or YYACCEPT.  */
+  YYPOPSTACK (yylen);
+  YY_STACK_PRINT (yyss, yyssp);
+  while (yyssp != yyss)
+    {
+      yydestruct ("Cleanup: popping",
+                  yystos[*yyssp], yyvsp);
+      YYPOPSTACK (1);
+    }
+#ifndef yyoverflow
+  if (yyss != yyssa)
+    YYSTACK_FREE (yyss);
+#endif
+#if YYERROR_VERBOSE
+  if (yymsg != yymsgbuf)
+    YYSTACK_FREE (yymsg);
+#endif
+  return yyresult;
+}
+#line 133 "yacc_parser.yacc" /* yacc.c:1906  */
+
+
+extern "C"
+{
+  int yyerror(const char *s)
+  {
+    ERROR("int yyerror(const char *s)", << "Parsing error: " << s << endl);
+  }
+}
+
+namespace xios
+{
+  IFilterExprNode* parseExpr(const string& strExpr)
+  {
+    globalInputText = strExpr;
+    globalReadOffset = 0;
+    yyparse();
+    return parsed;
+  }
+}
+
+
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/parse_expr/yacc_parser.hpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/parse_expr/yacc_parser.hpp	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/parse_expr/yacc_parser.hpp	(revision 1749)
@@ -0,0 +1,94 @@
+/* A Bison parser, made by GNU Bison 3.0.2.  */
+
+/* Bison interface for Yacc-like parsers in C
+
+   Copyright (C) 1984, 1989-1990, 2000-2013 Free Software Foundation, Inc.
+
+   This program is free software: you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation, either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
+
+/* As a special exception, you may create a larger work that contains
+   part or all of the Bison parser skeleton and distribute that work
+   under terms of your choice, so long as that work isn't itself a
+   parser generator using the skeleton or a modified version thereof
+   as a parser skeleton.  Alternatively, if you modify or redistribute
+   the parser skeleton itself, you may (at your option) remove this
+   special exception, which will cause the skeleton and the resulting
+   Bison output files to be licensed under the GNU General Public
+   License without this special exception.
+
+   This special exception was added by the Free Software Foundation in
+   version 2.2 of Bison.  */
+
+#ifndef YY_YY_YACC_PARSER_HPP_INCLUDED
+# define YY_YY_YACC_PARSER_HPP_INCLUDED
+/* Debug traces.  */
+#ifndef YYDEBUG
+# define YYDEBUG 0
+#endif
+#if YYDEBUG
+extern int yydebug;
+#endif
+
+/* Token type.  */
+#ifndef YYTOKENTYPE
+# define YYTOKENTYPE
+  enum yytokentype
+  {
+    NUMBER = 258,
+    VAR = 259,
+    ID = 260,
+    AVERAGE = 261,
+    PLUS = 262,
+    MINUS = 263,
+    TIMES = 264,
+    DIVIDE = 265,
+    POWER = 266,
+    EQ = 267,
+    LT = 268,
+    GT = 269,
+    LE = 270,
+    GE = 271,
+    NE = 272,
+    LEFT_PARENTHESIS = 273,
+    RIGHT_PARENTHESIS = 274,
+    QUESTION_MARK = 275,
+    COLON = 276,
+    END = 277,
+    NEG = 278
+  };
+#endif
+
+/* Value type.  */
+#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
+typedef union YYSTYPE YYSTYPE;
+union YYSTYPE
+{
+#line 35 "yacc_parser.yacc" /* yacc.c:1909  */
+
+  std::string* str;                /* symbol table index */
+  xios::IScalarExprNode* scalarNode;
+  xios::IFilterExprNode* filterNode;
+
+#line 84 "yacc_parser.hpp" /* yacc.c:1909  */
+};
+# define YYSTYPE_IS_TRIVIAL 1
+# define YYSTYPE_IS_DECLARED 1
+#endif
+
+
+extern YYSTYPE yylval;
+
+int yyparse (void);
+
+#endif /* !YY_YY_YACC_PARSER_HPP_INCLUDED  */
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/parse_expr/yacc_parser.yacc
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/parse_expr/yacc_parser.yacc	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/parse_expr/yacc_parser.yacc	(revision 1749)
@@ -0,0 +1,154 @@
+%{
+#include "filter_expr_node.hpp"
+#include <string>
+#include <iostream>
+#include "exception.hpp"
+
+using namespace std;
+using namespace xios;
+
+extern "C"
+{
+  int yyparse(void);
+  int yylex(void);
+  int yyerror(const char *s);
+}
+
+  IFilterExprNode* parsed;
+  std::string globalInputText;
+  size_t globalReadOffset = 0;
+
+  int readInputForLexer(char* buffer, size_t* numBytesRead, size_t maxBytesToRead)
+  {
+    size_t numBytesToRead = maxBytesToRead;
+    size_t bytesRemaining = globalInputText.length()-globalReadOffset;
+    size_t i;
+    if (numBytesToRead > bytesRemaining) numBytesToRead = bytesRemaining;
+    for (i = 0; i < numBytesToRead; i++) buffer[i] = globalInputText.c_str()[globalReadOffset + i];
+    *numBytesRead = numBytesToRead;
+    globalReadOffset += numBytesToRead;
+    return 0;
+  }
+%}
+
+%union
+{
+  std::string* str;                /* symbol table index */
+  xios::IScalarExprNode* scalarNode;
+  xios::IFilterExprNode* filterNode;
+};
+
+%token <str> NUMBER
+%token <str> VAR ID AVERAGE
+%token PLUS MINUS TIMES DIVIDE POWER
+%token EQ LT GT LE GE NE
+%token LEFT_PARENTHESIS RIGHT_PARENTHESIS
+%token QUESTION_MARK COLON
+%token <str> END
+
+%nonassoc QUESTION_MARK COLON
+%left EQ LT GT LE GE NE
+%left PLUS MINUS
+%left TIMES DIVIDE
+%nonassoc NEG
+%right POWER
+
+%type <scalarNode> Expression
+%type <filterNode> Line Field_expr
+%start Line
+%%
+
+
+Line:
+     END            { /* Nothing to do */ }
+   | Field_expr END { parsed = $1; }
+  ;
+
+Expression:
+            NUMBER { $$ = new CScalarValExprNode(*$1); delete $1; }
+          | VAR    { $$ = new CScalarVarExprNode(*$1); delete $1; }
+          | Expression PLUS Expression   { $$ = new CScalarBinaryOpExprNode($1, "add", $3); }
+          | Expression MINUS Expression  { $$ = new CScalarBinaryOpExprNode($1, "minus", $3); }
+          | Expression TIMES Expression  { $$ = new CScalarBinaryOpExprNode($1, "mult", $3); }
+          | Expression DIVIDE Expression { $$ = new CScalarBinaryOpExprNode($1, "div", $3); }
+          | MINUS Expression %prec NEG   { $$ = new CScalarUnaryOpExprNode("neg", $2); }
+          | Expression POWER Expression  { $$ = new CScalarBinaryOpExprNode($1, "pow", $3); }
+          | Expression EQ Expression  { $$ = new CScalarBinaryOpExprNode($1, "eq", $3); }
+          | Expression LT Expression  { $$ = new CScalarBinaryOpExprNode($1, "lt", $3); }
+          | Expression GT Expression  { $$ = new CScalarBinaryOpExprNode($1, "gt", $3); }
+          | Expression LE Expression  { $$ = new CScalarBinaryOpExprNode($1, "le", $3); }
+          | Expression GE Expression  { $$ = new CScalarBinaryOpExprNode($1, "ge", $3); }
+          | Expression NE Expression  { $$ = new CScalarBinaryOpExprNode($1, "ne", $3); }
+          | Expression QUESTION_MARK Expression COLON Expression {$$ = new CScalarTernaryOpExprNode($1, "cond", $3, $5);} 
+          | LEFT_PARENTHESIS Expression RIGHT_PARENTHESIS    { $$ = $2; }
+          | ID LEFT_PARENTHESIS Expression RIGHT_PARENTHESIS { $$ = new CScalarUnaryOpExprNode(*$1, $3); delete $1; }
+          ;
+
+Field_expr:
+            ID      { $$ = new CFilterFieldExprNode(*$1); delete $1; }
+          | AVERAGE { $$ = new CFilterTemporalFieldExprNode(*$1); delete $1; }
+          | Field_expr PLUS Field_expr   { $$ = new CFilterFieldFieldOpExprNode($1, "add", $3); }
+          | Field_expr MINUS Field_expr  { $$ = new CFilterFieldFieldOpExprNode($1, "minus", $3); }
+          | Field_expr TIMES Field_expr  { $$ = new CFilterFieldFieldOpExprNode($1, "mult", $3); }
+          | Field_expr DIVIDE Field_expr { $$ = new CFilterFieldFieldOpExprNode($1, "div", $3); }
+          | MINUS Field_expr %prec NEG   { $$ = new CFilterUnaryOpExprNode("neg", $2); }
+          | Field_expr POWER Field_expr  { $$ = new CFilterFieldFieldOpExprNode($1, "pow", $3); }
+          | Field_expr EQ Field_expr { $$ = new CFilterFieldFieldOpExprNode($1, "eq", $3); }
+          | Field_expr LT Field_expr { $$ = new CFilterFieldFieldOpExprNode($1, "lt", $3); }
+          | Field_expr GT Field_expr { $$ = new CFilterFieldFieldOpExprNode($1, "gt", $3); }
+          | Field_expr LE Field_expr { $$ = new CFilterFieldFieldOpExprNode($1, "le", $3); }
+          | Field_expr GE Field_expr { $$ = new CFilterFieldFieldOpExprNode($1, "ge", $3); }
+          | Field_expr NE Field_expr { $$ = new CFilterFieldFieldOpExprNode($1, "ne", $3); }
+          | LEFT_PARENTHESIS Field_expr RIGHT_PARENTHESIS	{ $$ = $2; }
+          | Expression QUESTION_MARK Expression COLON Field_expr {$$ = new CFilterScalarScalarFieldOpExprNode($1, "cond",$3, $5);}
+          | Expression QUESTION_MARK Field_expr COLON Expression {$$ = new CFilterScalarFieldScalarOpExprNode($1, "cond",$3, $5);}
+          | Expression QUESTION_MARK Field_expr COLON Field_expr {$$ = new CFilterScalarFieldFieldOpExprNode($1, "cond",$3, $5);}
+          | Field_expr QUESTION_MARK Expression COLON Expression {$$ = new CFilterFieldScalarScalarOpExprNode($1, "cond",$3, $5);}
+          | Field_expr QUESTION_MARK Expression COLON Field_expr {$$ = new CFilterFieldScalarFieldOpExprNode($1, "cond",$3, $5);}
+          | Field_expr QUESTION_MARK Field_expr COLON Expression {$$ = new CFilterFieldFieldScalarOpExprNode($1, "cond",$3, $5);}
+          | Field_expr QUESTION_MARK Field_expr COLON Field_expr {$$ = new CFilterFieldFieldFieldOpExprNode($1, "cond",$3, $5);}
+          | Field_expr PLUS Expression   { $$ = new CFilterFieldScalarOpExprNode($1, "add", $3); }
+          | Expression PLUS Field_expr   { $$ = new CFilterScalarFieldOpExprNode($1, "add", $3); }
+          | Field_expr MINUS Expression  { $$ = new CFilterFieldScalarOpExprNode($1, "minus", $3); }
+          | Expression MINUS Field_expr  { $$ = new CFilterScalarFieldOpExprNode($1, "minus", $3); }
+          | Field_expr TIMES Expression  { $$ = new CFilterFieldScalarOpExprNode($1, "mult", $3); }
+          | Expression TIMES Field_expr  { $$ = new CFilterScalarFieldOpExprNode($1, "mult", $3); }
+          | Field_expr DIVIDE Expression { $$ = new CFilterFieldScalarOpExprNode($1, "div", $3); }
+          | Expression DIVIDE Field_expr { $$ = new CFilterScalarFieldOpExprNode($1, "div", $3); }
+          | Field_expr POWER Expression  { $$ = new CFilterFieldScalarOpExprNode($1, "pow", $3); }
+          | Field_expr EQ Expression { $$ = new CFilterFieldScalarOpExprNode($1, "eq", $3); }
+          | Expression EQ Field_expr { $$ = new CFilterScalarFieldOpExprNode($1, "eq", $3); }
+          | Field_expr LT Expression { $$ = new CFilterFieldScalarOpExprNode($1, "lt", $3); }
+          | Expression LT Field_expr { $$ = new CFilterScalarFieldOpExprNode($1, "lt", $3); }
+          | Field_expr GT Expression { $$ = new CFilterFieldScalarOpExprNode($1, "gt", $3); }
+          | Expression GT Field_expr { $$ = new CFilterScalarFieldOpExprNode($1, "gt", $3); }
+          | Field_expr LE Expression { $$ = new CFilterFieldScalarOpExprNode($1, "le", $3); }
+          | Expression LE Field_expr { $$ = new CFilterScalarFieldOpExprNode($1, "le", $3); }
+          | Field_expr GE Expression { $$ = new CFilterFieldScalarOpExprNode($1, "ge", $3); }
+          | Expression GE Field_expr { $$ = new CFilterScalarFieldOpExprNode($1, "ge", $3); }
+          | Field_expr NE Expression { $$ = new CFilterFieldScalarOpExprNode($1, "ne", $3); }
+          | Expression NE Field_expr { $$ = new CFilterScalarFieldOpExprNode($1, "ne", $3); }
+          | ID LEFT_PARENTHESIS Field_expr RIGHT_PARENTHESIS { $$ = new CFilterUnaryOpExprNode(*$1, $3); delete $1; }
+          ;
+%%
+
+extern "C"
+{
+  int yyerror(const char *s)
+  {
+    ERROR("int yyerror(const char *s)", << "Parsing error: " << s << endl);
+  }
+}
+
+namespace xios
+{
+  IFilterExprNode* parseExpr(const string& strExpr)
+  {
+    globalInputText = strExpr;
+    globalReadOffset = 0;
+    yyparse();
+    return parsed;
+  }
+}
+
+
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/policy.cpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/policy.cpp	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/policy.cpp	(revision 1749)
@@ -0,0 +1,169 @@
+/*!
+   \file policy.cpp
+   \author Ha NGUYEN
+   \since 06 Oct 2015
+   \date 06 Oct 2015
+
+   \brief Some useful policies for templated classes
+ */
+
+#include "policy.hpp"
+#include <cmath>
+
+namespace xios
+{
+///*!
+//  Calculate MPI communicator for each level of hierarchy.
+//  \param[in] mpiCommRoot MPI communicator of the level 0 (usually communicator of all clients)
+//  \param[in] levels number of level in hierarchy
+//*/
+//void DivideCommByTwo::computeMPICommLevel(const MPI_Comm& mpiCommRoot, int levels)
+//{
+//  int nbProc;
+//  MPI_Comm_size(mpiCommRoot,&nbProc);
+//  if (levels > nbProc) levels = std::log10(nbProc) * 3.3219; // log2(x) = log2(10) * log10(x); stupid C++98
+//  else if (1 > levels) levels = 1;
+//
+//  commLevel_.push_back(mpiCommRoot);
+//  divideMPICommLevel(mpiCommRoot, levels);
+//}
+//
+///*!
+//  Divide each MPI communicator into sub-communicator. Recursive function
+//  \param [in] mpiCommLevel MPI communicator of current level
+//  \param [in] level current level
+//*/
+//void DivideCommByTwo::divideMPICommLevel(const MPI_Comm& mpiCommLevel, int level)
+//{
+//  int clientRank;
+//  MPI_Comm_rank(mpiCommLevel,&clientRank);
+//
+//   --level;
+//  if (0 < level)
+//  {
+//   int color = clientRank % 2;
+//   commLevel_.push_back(MPI_Comm());
+//   MPI_Comm_split(mpiCommLevel, color, 0, &(commLevel_.back()));
+//   divideMPICommLevel(commLevel_.back(), level);
+//  }
+//}
+
+DivideAdaptiveComm::DivideAdaptiveComm(const MPI_Comm& mpiComm)
+  : internalComm_(mpiComm), level_(0), groupBegin_(), nbInGroup_(), computed_(false)
+{
+
+}
+
+void DivideAdaptiveComm::computeMPICommLevel()
+{
+  if (computed_) return;
+  computed_ = true;
+
+  int mpiSize, mpiRank;
+  MPI_Comm_size(internalComm_,&mpiSize);
+  MPI_Comm_rank(internalComm_,&mpiRank);
+
+  int maxChild=1;
+  int m;
+  do
+  {
+    m=1;
+    ++maxChild;
+    for(int i=0;i<maxChild;++i) m *= maxChild;
+   } while(m<mpiSize);
+
+  int maxLevel=0;
+  for(int size=1; size<=mpiSize; size*=maxChild) ++maxLevel;
+
+  int pos, n, idx;
+  level_=0;
+  int begin=0;
+  int end=mpiSize-1;
+  int nb=end-begin+1;
+
+  nbInGroup_ = groupBegin_= std::vector<int>(maxLevel);
+  nbInGroupParents_ = groupParentsBegin_= std::vector<std::vector<int> >(maxLevel,std::vector<int>(maxChild));
+
+  groupBegin_[level_] = begin;
+  nbInGroup_[level_] = nb;
+  ++level_;
+  while (nb>2 && (level_<maxLevel))
+  {
+    n = 0; idx = 0;
+    pos = begin;
+    for(int i=0;i<maxChild && i<nb;i++)
+    {
+      if (i<nb%maxChild) n = nb/maxChild + 1;
+      else n = nb/maxChild;
+
+      if (mpiRank>=pos && mpiRank<pos+n)
+      {
+        begin=pos;
+        end=pos+n-1;
+      }
+      groupParentsBegin_[level_-1][idx] = pos;
+      nbInGroupParents_[level_-1][idx] = n;
+      ++idx;
+      pos=pos+n;
+    }
+    groupBegin_[level_] = begin;
+    nbInGroup_[level_] = nb = end-begin+1;
+
+    ++level_;
+  }
+
+  for (int i = 0; i < nbInGroup_[level_-1];++i)
+  {
+    groupParentsBegin_[level_-1][i] = groupBegin_[level_-1]+i;
+    nbInGroupParents_[level_-1][i] = 1;
+  }
+
+
+
+//  parent=vector<int>(maxLevel+1);
+//  child=vector<vector<int> >(maxLevel+1,vector<int>(maxChild));
+//  nbChild=vector<int> (maxLevel+1);
+
+//  do
+//  {
+//    n=0;
+//    pos=begin;
+//    nbChild[level_]=0;
+//    parent[level_+1]=begin;
+//    for(int i=0;i<maxChild && i<nb;i++)
+//    {
+//      if (i<nb%maxChild) n = nb/maxChild + 1;
+//      else n = nb/maxChild;
+//
+//      if (mpiRank>=pos && mpiRank<pos+n)
+//      {
+//        begin=pos;
+//        end=pos+n-1;
+//      }
+//      child[level_][i]=pos;
+//      pos=pos+n;
+//      nbChild[level_]++;
+//    }
+//    nb=end-begin+1;
+//    level_=level_+1;
+//  } while (nb>1);
+}
+
+//void DivideAdaptiveComm::divideMPICommLevel(const MPI_Comm& mpiCommLevel, int color, int level)
+//{
+////  int clientRank;
+////  MPI_Comm_rank(mpiCommLevel,&clientRank);
+//
+//   --level;
+//  if (0 < level)
+//  {
+//   int color = clientRank % 2;
+//   commLevel_.push_back(MPI_Comm());
+//   MPI_Comm_split(mpiCommLevel, color, 0, &(commLevel_.back()));
+//   divideMPICommLevel(commLevel_.back(), level);
+//  }
+//}
+
+
+}
+
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/policy.hpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/policy.hpp	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/policy.hpp	(revision 1749)
@@ -0,0 +1,57 @@
+/*!
+   \file policy.hpp
+   \author Ha NGUYEN
+   \since 06 Oct 2015
+   \date 06 Oct 2015
+
+   \brief Some useful policies for templated classes
+ */
+
+#ifndef __XIOS_POLICY_HPP__
+#define __XIOS_POLICY_HPP__
+
+#include <vector>
+#include "mpi.hpp"
+
+namespace xios
+{
+//class DivideCommByTwo
+//{
+//protected:
+//  void computeMPICommLevel(const MPI_Comm& mpiCommRoot, int levels);
+//
+//protected:
+//  std::vector<MPI_Comm> commLevel_;
+//private:
+//  // Divide MPI communicator on each level recursively
+//  void divideMPICommLevel(const MPI_Comm& mpiCommLevel, int level);
+//};
+
+class DivideAdaptiveComm
+{
+protected:
+  DivideAdaptiveComm(const MPI_Comm& mpiComm);
+
+  void computeMPICommLevel();
+  const std::vector<int>& getGroupBegin() { return groupBegin_; }
+  const std::vector<int>& getNbInGroup() { return nbInGroup_; }
+  const std::vector<std::vector<int> >& getGroupParentsBegin() { return groupParentsBegin_; }
+  const std::vector<std::vector<int> >& getNbInGroupParents() { return nbInGroupParents_; }
+  int getNbLevel() { return level_; }
+
+protected:
+  const MPI_Comm& internalComm_;
+  std::vector<std::vector<int> > groupParentsBegin_;
+  std::vector<std::vector<int> > nbInGroupParents_;
+
+  int level_;
+  std::vector<int> groupBegin_;  //! Rank beginning of a group
+  std::vector<int> nbInGroup_; //! Number of process in each group
+  bool computed_;
+//  std::vector<std::vector<int> > child_; /*!< List of child rank for each level */
+//  std::vector<int> nbChild_;         /*!< Number of child for each level */
+};
+
+}
+
+#endif // __XIOS_POLICY_HPP__
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/registry.cpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/registry.cpp	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/registry.cpp	(revision 1749)
@@ -0,0 +1,293 @@
+#include "registry.hpp"
+#include "type.hpp"
+#include <mpi.hpp>
+#include <fstream>
+#include <sstream>
+
+namespace xios
+{
+  using namespace std;
+
+  CRegistry::CRegistry(const CRegistry& reg) : communicator(reg.communicator)
+  {
+    for(map<string,pair<size_t,char*> >::const_iterator it=reg.registry.begin() ; it!=reg.registry.end() ; ++it)
+    {
+      char* buffer=new char[it->second.first] ;
+      memcpy(buffer,it->second.second,it->second.first) ;
+      registry.insert(pair<string, pair<size_t,char*> >(it->first, pair<size_t,char*>(it->second.first,buffer))) ; 
+    }
+  }
+
+        
+  void CRegistry::reset()
+  {
+    for(map<string,pair<size_t,char*> >::const_iterator it=registry.begin() ; it!=registry.end() ; ++it)
+    {
+      if (it->second.first>0) delete[] it->second.second ;
+    }
+    registry.clear() ;
+  }
+
+  void CRegistry::setKey_(const string& key_, const CBaseType& value)
+  {
+    const string key=path+key_ ;
+    if (!value.isEmpty())
+    {
+      size_t size=value.size();
+      
+      map<string,pair<size_t,char*> >::iterator it=registry.find(key) ;
+
+      if (it!=registry.end())
+      {
+        delete[] it->second.second ;
+        registry.erase(it) ;
+      }
+
+      char* buffer=new char[size] ;
+      CBufferOut tmpBuff(buffer,size) ;
+      value.toBuffer(tmpBuff) ;
+      registry.insert(pair<string, pair<size_t,char*> >(key, pair<size_t,char*>(size,buffer))) ;
+    }
+  }
+
+  void CRegistry::getKey_(const string& key_, CBaseType& value)
+  {
+    const string key=path+key_ ;
+    size_t size=value.size();
+      
+    map<string,pair<size_t,char*> >::iterator it=registry.find(key) ;
+
+    if (it!=registry.end())
+    {
+      CBufferIn tmpBuff(it->second.second,it->second.first) ;
+      value.fromBuffer(tmpBuff) ;
+    }
+    else value.reset() ;
+  }
+
+  bool CRegistry::foundKey(const string& key_) const
+  {
+    const string key=path+key_ ;
+    map<string,pair<size_t,char*> >::const_iterator it=registry.find(key) ;
+    if (it!=registry.end()) return true ;
+    else return false ;
+  }
+  
+  bool CRegistry::toBuffer(CBufferOut& buffer) const
+  {
+    buffer<<registry.size() ;
+    for(map<string,pair<size_t,char*> >::const_iterator it=registry.begin() ; it!=registry.end() ; ++it)
+    {
+      buffer<<it->first<<it->second.first ;
+      if (!buffer.put(it->second.second,it->second.first)) ERROR("bool CRegistry::toBuffer(CBufferOut& buffer) const)",
+                                                           << "Not enough free space in buffer to queue the data."); 
+    }
+    return true ;
+  }
+
+  size_t CRegistry::size() const
+  {
+    size_t s=0;
+    size_t size_t_size=CType<size_t>(0).size() ;
+    s+=size_t_size ;
+    for(map<string,pair<size_t,char*> >::const_iterator it=registry.begin() ; it!=registry.end() ; ++it)
+      s+=(CType<string>(it->first)).size() + size_t_size + it->second.first ;
+    return s ;
+  }
+
+  void CRegistry::fromString(const string& str)
+  {
+     ERROR("void CRegistry::fromString(const string& str)",<< "This method has not been implemented"); 
+  }
+
+  string CRegistry::toString() const
+  {
+    ostringstream oss;
+    
+    for(map<string,pair<size_t,char*> >::const_iterator it=registry.begin() ; it!=registry.end() ; ++it)
+    {
+      oss<<"Key = "<< it->first  <<" , size : "<<it->second.first<<"  ASCII value : "<<string((char*) it->second.second,it->second.first)<<endl ;
+    }
+    return oss.str() ;
+  }
+
+  
+
+  bool CRegistry::fromBuffer(CBufferIn& buffer)
+  {
+    string key ;
+    size_t size ;
+    char* value ;
+    size_t nKeys ;
+    buffer >> nKeys ;
+    for(size_t i=0;i<nKeys;++i)
+    {
+      buffer>>key>>size ;
+      if (size > 0)
+      {
+        value = new char[size] ;
+        buffer.get(value,size) ;
+      }
+      
+      map<string,pair<size_t,char*> >::iterator it=registry.find(key) ;
+      if (it!=registry.end())
+      {
+        delete[] it->second.second ;
+        registry.erase(it) ;
+      }
+      registry.insert(pair<string, pair<size_t,char*> >(key, pair<size_t,char*>(size,value))) ;        
+    }
+    return true ;
+  }  
+
+  void CRegistry::toFile(const string& filename)
+  {
+    if (registry.size()==0) return ;
+    
+    CBufferOut buffer(this->size()) ;
+    this->toBuffer(buffer) ;
+    ofstream file(filename.c_str(), ofstream::out ) ;
+    size_t size=buffer.count() ;
+    file.write((const char*) &size,sizeof(size)) ;
+    file.write((const char*) buffer.start(),size) ;
+    file.close() ;
+  }
+
+  void CRegistry::fromFile(const string& filename)
+  {
+    ifstream file(filename.c_str(), ifstream::in | ifstream::binary) ;
+    if (!file) return ;
+    size_t size;
+    file.read((char*) &size,sizeof(size)) ;
+    
+    CBufferIn buffer(size) ;
+    file.read((char*) buffer.ptr(),size) ;
+    this->fromBuffer(buffer) ;
+
+    file.close() ;
+  }
+    
+  void CRegistry::mergeRegistry(const CRegistry& inRegistry)
+  {
+    size_t size ;
+    char* value;
+    
+    for(map<string,pair<size_t,char*> >::const_iterator it=inRegistry.registry.begin() ; it!=inRegistry.registry.end() ; ++it)
+    {
+      const string& key=it->first ;
+      map<string,pair<size_t,char*> >::iterator it2=registry.find(key) ;
+      if (it2==registry.end())
+      {
+        size=it->second.first ;
+        value=new char[size] ;
+        memcpy(value,it->second.second,size) ;
+        registry.insert(pair<string, pair<size_t,char*> >(key, pair<size_t,char*>(size,value))) ;      
+      }
+    }
+  }
+
+  
+  void CRegistry::bcastRegistry(void)
+  {
+    int rank ;
+    MPI_Comm_rank(communicator,&rank);
+    if (rank==0)
+    {
+      CBufferOut buffer(this->size()) ;
+      this->toBuffer(buffer) ;
+      int size=buffer.count() ;
+      MPI_Bcast(&size,1,MPI_INT,0,communicator) ;
+      MPI_Bcast(buffer.start(),size,MPI_CHAR,0,communicator) ;
+    }
+    else
+    {
+      int size ;
+      MPI_Bcast(&size,1,MPI_INT,0,communicator) ;
+      CBufferIn buffer(size) ;
+      MPI_Bcast(buffer.start(),size,MPI_CHAR,0,communicator) ;
+      this->fromBuffer(buffer) ;
+    }
+  }
+  void CRegistry::gatherRegistry(void)
+  {
+    gatherRegistry(communicator) ;
+  }
+
+  void CRegistry::gatherRegistry(const MPI_Comm& comm)
+  {
+    int rank,mpiSize ;
+    MPI_Comm_rank(comm,&rank);
+    MPI_Comm_size(comm,&mpiSize);
+
+    int* sizes=new int[mpiSize] ;
+    CBufferOut localBuffer(this->size()) ;
+    this->toBuffer(localBuffer) ;
+    int localSize=localBuffer.count() ;
+    MPI_Gather(&localSize,1,MPI_INT,sizes,1,MPI_INT,0,comm) ;
+
+    char* globalBuffer ;
+    int*   displs ;
+    
+    if (rank==0)
+    {
+      size_t globalBufferSize=0 ;
+      displs=new int[mpiSize] ;
+      for (int i=0;i<mpiSize;++i)
+      {
+        displs[i]=globalBufferSize ;
+        globalBufferSize+=sizes[i] ;
+      }
+
+      globalBuffer=new char[globalBufferSize] ;
+      MPI_Gatherv(localBuffer.start(),localSize,MPI_CHAR,globalBuffer,sizes,displs,MPI_CHAR,0,comm) ;
+      for(int i=1;i<mpiSize;++i)
+      {
+        CBufferIn buffer(globalBuffer+displs[i],sizes[i]) ;
+        CRegistry reg ;
+        reg.fromBuffer(buffer) ;
+        mergeRegistry(reg) ;
+      }
+      delete[] displs ;
+      delete[] globalBuffer ;
+    }
+    else  MPI_Gatherv(localBuffer.start(),localSize,MPI_CHAR,globalBuffer,sizes,displs,MPI_CHAR,0,comm) ;   
+    delete[] sizes ;
+    
+  }
+
+  void CRegistry::hierarchicalGatherRegistry(void)
+  {
+    hierarchicalGatherRegistry(communicator) ;
+  }
+
+  void CRegistry::hierarchicalGatherRegistry(const MPI_Comm& comm)
+  {
+    int mpiRank,mpiSize ;
+    MPI_Comm_rank(comm,&mpiRank);
+    MPI_Comm_size(comm,&mpiSize);    
+
+    if (mpiSize>2)
+    {
+      int color ;
+      if (mpiRank<mpiSize/2+mpiSize%2) color=0 ;
+      else color=1 ;
+      MPI_Comm commUp ;
+      MPI_Comm_split(comm,color,mpiRank,&commUp) ,
+      hierarchicalGatherRegistry(commUp) ;
+      MPI_Comm_free(&commUp) ;
+    }
+
+    if (mpiSize>1)
+    {
+      MPI_Comm commDown ;
+      int color ;
+      
+      if (mpiRank==0 || mpiRank==mpiSize/2+mpiSize%2) color=0 ;
+      else color=1 ;
+      MPI_Comm_split(comm,color,mpiRank,&commDown) ;
+      if (color==0) gatherRegistry(commDown) ;
+      MPI_Comm_free(&commDown) ;    
+    }
+  }
+
+}
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/registry.hpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/registry.hpp	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/registry.hpp	(revision 1749)
@@ -0,0 +1,139 @@
+#ifndef __XIOS_REGISTRY_HPP__
+#define __XIOS_REGISTRY_HPP__
+
+#include "base_type.hpp"
+#include "type.hpp"
+#include "mpi.hpp"
+#include "message.hpp"
+
+// Those two headers can be replaced by the C++11 equivalent in the future
+#include <boost/utility/enable_if.hpp>
+#include <boost/type_traits.hpp>
+
+namespace xios
+{
+/*!
+  \class CRegistry
+ This class is a registry database which store key with an associated value. Internally the value is stored as a memory bloc
+ and the key is a string. The registry can be gathered and merge between MPI process, broadcast and read or wrote from a file
+*/
+  class CRegistry : virtual public CBaseType
+  {
+    public:
+
+/** Constructor, the communicator is used for bcast or gather operation between MPI processes */
+      CRegistry(const MPI_Comm& comm=MPI_COMM_WORLD) : communicator(comm) {}
+
+/** Copy constructor */
+      CRegistry(const CRegistry& reg) ;
+
+
+/** insert a value associated to a key*/
+      void setKey(const std::string& key, const CBaseType& value) { this->setKey_(key,value); }
+
+/** insert a value associated to a key*/
+      template<typename T> typename boost::enable_if_c<!boost::is_convertible<T&, CBaseType&>::value>::type
+      setKey(const std::string& key, const T& value) { this->setKey_(key,CType<T>(value)); }
+
+
+/** retrieve a value from a key */
+      void getKey(const std::string& key, CBaseType& value) { this->getKey_(key,value); }
+
+/** retrieve a value from a key */
+      template<typename T> typename boost::enable_if_c<!boost::is_convertible<T&, CBaseType&>::value>::type
+      getKey(const std::string& key, T& value) { CType_ref<T> valRef(value); this->getKey_(key,valRef); }
+
+
+/** query for an already inserted key */
+      bool foundKey(const std::string& key) const ;
+
+/** The registry is wrote into a memory buffer */
+      bool toBuffer(CBufferOut& buffer) const ;
+
+/** The registry is read from a memory buffer */
+      bool fromBuffer(CBufferIn& buffer) ;
+
+/** The registry is wrote to the file given by "filename". If the registry is empty no file is wrote */
+      void toFile(const string& filename) ;
+
+/** The registry is read from the file given by "filename". If no file exist, the registry remain empty */
+      void fromFile(const string& filename) ;
+
+/** Merge the registry with an other. Existing keys in the current registry are not overwritten */
+      void mergeRegistry(const CRegistry& inRegistry) ;
+
+/** Broadcast registry from the root process (rank 0) to the other processes of the communicator */
+      void bcastRegistry(void) ;
+
+/** Gather registry to the root process (rank 0) from the other processes of the communicator */
+      void gatherRegistry(void) ;
+
+/** Gather registry with a hierarchical algorithm which avoid root process to get registries from whole processes of the communicator.
+   Registry are merged two by two hierarchically. */
+      void hierarchicalGatherRegistry(void) ;
+
+/** Destructor */
+       ~CRegistry() { reset() ; }
+
+/** Unimplemented, do not use (need for CBaseType pure virtual class) */
+      void fromString(const string& str) ;
+
+/** Dump registry to a string (need for CBaseType pure virtual class)*/
+      string toString(void) const ;
+
+/** Clone the registry (need for CBaseType pure virtual class)*/
+      CRegistry* clone(void) const { return new CRegistry(*this); }
+
+/** return the size needed to bufferize the registry (need for CBaseType pure virtual class)*/
+      size_t size(void) const ;
+
+/** return true if the registry is empty (need for CBaseType pure virtual class)*/
+      bool isEmpty(void) const { return registry.empty(); }
+
+/** Clean the registry and delete associated memory (need for CBaseType pure virtual class)*/
+      void reset(void) ;
+
+/** Set the prefix added systematically to the keys, with "::" as separator*/
+      void setPath(const string& str) { path=str+"::" ; }
+
+    private:
+
+/** insert a value associated to a key (internal use)*/
+      void setKey_(const std::string& key, const CBaseType& value) ;
+
+/** retrieve a value from a key (internal use)*/
+      void getKey_(const std::string& key, CBaseType& value) ;
+
+/** use internally for recursivity */
+      void gatherRegistry(const MPI_Comm& comm) ;
+
+/** use internally for recursivity */
+      void hierarchicalGatherRegistry(const MPI_Comm& comm) ;
+
+
+/** Prefix added systematically to the keys, with "::" as separator*/
+      std::string path ;
+
+/** Map containing registry, the key is a string type and the value is stored in a pair with the size
+ *  of the memory bloc and the associated pointer*/
+      std::map<std::string,std::pair<size_t,char*> > registry ;
+
+/** MPI communicator used for broadcast and gather operation */
+      MPI_Comm communicator ;
+  } ;
+
+  inline CMessage& operator<<(CMessage& msg, CRegistry& registry)
+  {
+      msg.push(registry) ;
+      return msg ;
+  }
+
+  inline CMessage& operator<<(CMessage& msg, const CRegistry& registry)
+  {
+      msg.push(registry) ;
+      return msg ;
+  }
+
+}
+
+#endif
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/server.cpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/server.cpp	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/server.cpp	(revision 1749)
@@ -0,0 +1,955 @@
+#include "globalScopeData.hpp"
+#include "xios_spl.hpp"
+#include "cxios.hpp"
+#include "server.hpp"
+#include "client.hpp"
+#include "type.hpp"
+#include "context.hpp"
+#include "object_template.hpp"
+#include "oasis_cinterface.hpp"
+#include <boost/functional/hash.hpp>
+#include <boost/algorithm/string.hpp>
+#include "mpi.hpp"
+#include "tracer.hpp"
+#include "timer.hpp"
+#include "event_scheduler.hpp"
+#include "string_tools.hpp"
+
+namespace xios
+{
+    MPI_Comm CServer::intraComm ;
+    std::list<MPI_Comm> CServer::interCommLeft ;
+    std::list<MPI_Comm> CServer::interCommRight ;
+    std::list<MPI_Comm> CServer::contextInterComms;
+    std::list<MPI_Comm> CServer::contextIntraComms;
+    int CServer::serverLevel = 0 ;
+    int CServer::nbContexts = 0;
+    bool CServer::isRoot = false ;
+    int CServer::rank_ = INVALID_RANK;
+    StdOFStream CServer::m_infoStream;
+    StdOFStream CServer::m_errorStream;
+    map<string,CContext*> CServer::contextList ;
+    vector<int> CServer::sndServerGlobalRanks;
+    bool CServer::finished=false ;
+    bool CServer::is_MPI_Initialized ;
+    CEventScheduler* CServer::eventScheduler = 0;
+
+//---------------------------------------------------------------
+/*!
+ * \fn void CServer::initialize(void)
+ * Creates intraComm for each possible type of servers (classical, primary or secondary).
+ * Creates interComm and stores them into the following lists:
+ *   classical server -- interCommLeft
+ *   primary server -- interCommLeft and interCommRight
+ *   secondary server -- interCommLeft for each pool.
+ *   IMPORTANT: CXios::usingServer2 should NOT be used beyond this function. Use CServer::serverLevel instead.
+ */
+    void CServer::initialize(void)
+    {
+      int initialized ;
+      MPI_Initialized(&initialized) ;
+      if (initialized) is_MPI_Initialized=true ;
+      else is_MPI_Initialized=false ;
+      int rank ;
+
+      // Not using OASIS
+      if (!CXios::usingOasis)
+      {
+
+        if (!is_MPI_Initialized)
+        {
+          MPI_Init(NULL, NULL);
+        }
+        CTimer::get("XIOS").resume() ;
+
+        boost::hash<string> hashString ;
+        unsigned long hashServer = hashString(CXios::xiosCodeId);
+
+        unsigned long* hashAll ;
+        unsigned long* srvLevelAll ;
+
+        int size ;
+        int myColor ;
+        int i,c ;
+        MPI_Comm newComm;
+
+        MPI_Comm_size(CXios::globalComm, &size) ;
+        MPI_Comm_rank(CXios::globalComm, &rank_);
+
+        hashAll=new unsigned long[size] ;
+        MPI_Allgather(&hashServer, 1, MPI_LONG, hashAll, 1, MPI_LONG, CXios::globalComm) ;
+
+        map<unsigned long, int> colors ;
+        map<unsigned long, int> leaders ;
+        map<unsigned long, int>::iterator it ;
+
+        // (1) Establish client leaders, distribute processes between two server levels
+        std::vector<int> srvRanks;
+        for(i=0,c=0;i<size;i++)
+        {
+          if (colors.find(hashAll[i])==colors.end())
+          {
+            colors[hashAll[i]]=c ;
+            leaders[hashAll[i]]=i ;
+            c++ ;
+          }
+          if (CXios::usingServer2)
+            if (hashAll[i] == hashServer)
+              srvRanks.push_back(i);
+        }
+
+        if (CXios::usingServer2)
+        {
+          int reqNbProc = srvRanks.size()*CXios::ratioServer2/100.;
+          if (reqNbProc<1 || reqNbProc==srvRanks.size())
+          {
+            error(0)<<"WARNING: void CServer::initialize(void)"<<endl
+                << "It is impossible to dedicate the requested number of processes = "<<reqNbProc
+                <<" to secondary server. XIOS will run in the classical server mode."<<endl;
+          }
+          else
+          {
+            if (CXios::nbPoolsServer2 == 0) CXios::nbPoolsServer2 = reqNbProc;
+            int firstSndSrvRank = srvRanks.size()*(100.-CXios::ratioServer2)/100. ;
+            int poolLeader = firstSndSrvRank;
+//*********** (1) Comment out the line below to set one process per pool
+            sndServerGlobalRanks.push_back(srvRanks[poolLeader]);
+            int nbPools = CXios::nbPoolsServer2;
+            if ( nbPools > reqNbProc || nbPools < 1)
+            {
+              error(0)<<"WARNING: void CServer::initialize(void)"<<endl
+                  << "It is impossible to allocate the requested number of pools = "<<nbPools
+                  <<" on the secondary server. It will be set so that there is one process per pool."<<endl;
+              nbPools = reqNbProc;
+            }
+            int remainder = ((int) (srvRanks.size()*CXios::ratioServer2/100.)) % nbPools;
+            int procsPerPool = ((int) (srvRanks.size()*CXios::ratioServer2/100.)) / nbPools;
+            for (i=0; i<srvRanks.size(); i++)
+            {
+              if (i >= firstSndSrvRank)
+              {
+                if (rank_ == srvRanks[i])
+                {
+                  serverLevel=2;
+                }
+                poolLeader += procsPerPool;
+                if (remainder != 0)
+                {
+                  ++poolLeader;
+                  --remainder;
+                }
+//*********** (2) Comment out the two lines below to set one process per pool
+                if (poolLeader < srvRanks.size())
+                  sndServerGlobalRanks.push_back(srvRanks[poolLeader]);
+//*********** (3) Uncomment the line below to set one process per pool
+//                sndServerGlobalRanks.push_back(srvRanks[i]);
+              }
+              else
+              {
+                if (rank_ == srvRanks[i]) serverLevel=1;
+              }
+            }
+            if (serverLevel==2)
+            {
+              info(50)<<"The number of secondary server pools is "<< sndServerGlobalRanks.size() <<endl ;
+              for (i=0; i<sndServerGlobalRanks.size(); i++)
+              {
+                if (rank_>= sndServerGlobalRanks[i])
+                {
+                  if ( i == sndServerGlobalRanks.size()-1)
+                  {
+                    myColor = colors.size() + sndServerGlobalRanks[i];
+                  }
+                  else if (rank_< sndServerGlobalRanks[i+1])
+                  {
+                    myColor = colors.size() + sndServerGlobalRanks[i];
+                    break;
+                  }
+                }
+              }
+            }
+          }
+        }
+
+        // (2) Create intraComm
+        if (serverLevel != 2) myColor=colors[hashServer];
+        MPI_Comm_split(CXios::globalComm, myColor, rank_, &intraComm) ;
+
+        // (3) Create interComm
+        if (serverLevel == 0)
+        {
+          int clientLeader;
+          for(it=leaders.begin();it!=leaders.end();it++)
+          {
+            if (it->first!=hashServer)
+            {
+              clientLeader=it->second ;
+              int intraCommSize, intraCommRank ;
+              MPI_Comm_size(intraComm,&intraCommSize) ;
+              MPI_Comm_rank(intraComm,&intraCommRank) ;
+              info(50)<<"intercommCreate::server (classical mode) "<<rank_<<" intraCommSize : "<<intraCommSize
+                       <<" intraCommRank :"<<intraCommRank<<"  clientLeader "<< clientLeader<<endl ;
+
+              MPI_Intercomm_create(intraComm, 0, CXios::globalComm, clientLeader, 0, &newComm) ;
+              interCommLeft.push_back(newComm) ;
+            }
+          }
+        }
+        else if (serverLevel == 1)
+        {
+          int clientLeader, srvSndLeader;
+          int srvPrmLeader ;
+
+          for (it=leaders.begin();it!=leaders.end();it++)
+          {
+            if (it->first != hashServer)
+            {
+              clientLeader=it->second ;
+              int intraCommSize, intraCommRank ;
+              MPI_Comm_size(intraComm, &intraCommSize) ;
+              MPI_Comm_rank(intraComm, &intraCommRank) ;
+              info(50)<<"intercommCreate::server (server level 1) "<<rank_<<" intraCommSize : "<<intraCommSize
+                       <<" intraCommRank :"<<intraCommRank<<"  clientLeader "<< clientLeader<<endl ;
+              MPI_Intercomm_create(intraComm, 0, CXios::globalComm, clientLeader, 0, &newComm) ;
+              interCommLeft.push_back(newComm) ;
+            }
+          }
+
+          for (int i = 0; i < sndServerGlobalRanks.size(); ++i)
+          {
+            int intraCommSize, intraCommRank ;
+            MPI_Comm_size(intraComm, &intraCommSize) ;
+            MPI_Comm_rank(intraComm, &intraCommRank) ;
+            info(50)<<"intercommCreate::client (server level 1) "<<rank_<<" intraCommSize : "<<intraCommSize
+                <<" intraCommRank :"<<intraCommRank<<"  clientLeader "<< sndServerGlobalRanks[i]<<endl ;
+            MPI_Intercomm_create(intraComm, 0, CXios::globalComm, sndServerGlobalRanks[i], 1, &newComm) ;
+            interCommRight.push_back(newComm) ;
+          }
+        }
+        else
+        {
+          int clientLeader;
+          clientLeader = leaders[hashString(CXios::xiosCodeId)];
+          int intraCommSize, intraCommRank ;
+          MPI_Comm_size(intraComm, &intraCommSize) ;
+          MPI_Comm_rank(intraComm, &intraCommRank) ;
+          info(50)<<"intercommCreate::server (server level 2) "<<rank_<<" intraCommSize : "<<intraCommSize
+                   <<" intraCommRank :"<<intraCommRank<<"  clientLeader "<< clientLeader<<endl ;
+
+          MPI_Intercomm_create(intraComm, 0, CXios::globalComm, clientLeader, 1, &newComm) ;
+          interCommLeft.push_back(newComm) ;
+        }
+
+        delete [] hashAll ;
+
+      }
+      // using OASIS
+      else
+      {
+        int size;
+        int myColor;
+        int* srvGlobalRanks;
+        if (!is_MPI_Initialized) oasis_init(CXios::xiosCodeId);
+
+        CTimer::get("XIOS").resume() ;
+        MPI_Comm localComm;
+        oasis_get_localcomm(localComm);
+        MPI_Comm_rank(localComm,&rank_) ;
+
+//      (1) Create server intraComm
+        if (!CXios::usingServer2)
+        {
+          MPI_Comm_dup(localComm, &intraComm);
+        }
+        else
+        {
+          int globalRank;
+          MPI_Comm_size(localComm,&size) ;
+          MPI_Comm_rank(CXios::globalComm,&globalRank) ;
+          srvGlobalRanks = new int[size] ;
+          MPI_Allgather(&globalRank, 1, MPI_INT, srvGlobalRanks, 1, MPI_INT, localComm) ;
+
+          int reqNbProc = size*CXios::ratioServer2/100.;
+          if (reqNbProc < 1 || reqNbProc == size)
+          {
+            error(0)<<"WARNING: void CServer::initialize(void)"<<endl
+                << "It is impossible to dedicate the requested number of processes = "<<reqNbProc
+                <<" to secondary server. XIOS will run in the classical server mode."<<endl;
+            MPI_Comm_dup(localComm, &intraComm);
+          }
+          else
+          {
+            int firstSndSrvRank = size*(100.-CXios::ratioServer2)/100. ;
+            int poolLeader = firstSndSrvRank;
+//*********** (1) Comment out the line below to set one process per pool
+//            sndServerGlobalRanks.push_back(srvGlobalRanks[poolLeader]);
+            int nbPools = CXios::nbPoolsServer2;
+            if ( nbPools > reqNbProc || nbPools < 1)
+            {
+              error(0)<<"WARNING: void CServer::initialize(void)"<<endl
+                  << "It is impossible to allocate the requested number of pools = "<<nbPools
+                  <<" on the secondary server. It will be set so that there is one process per pool."<<endl;
+              nbPools = reqNbProc;
+            }
+            int remainder = ((int) (size*CXios::ratioServer2/100.)) % nbPools;
+            int procsPerPool = ((int) (size*CXios::ratioServer2/100.)) / nbPools;
+            for (int i=0; i<size; i++)
+            {
+              if (i >= firstSndSrvRank)
+              {
+                if (globalRank == srvGlobalRanks[i])
+                {
+                  serverLevel=2;
+                }
+                poolLeader += procsPerPool;
+                if (remainder != 0)
+                {
+                  ++poolLeader;
+                  --remainder;
+                }
+//*********** (2) Comment out the two lines below to set one process per pool
+//                if (poolLeader < size)
+//                  sndServerGlobalRanks.push_back(srvGlobalRanks[poolLeader]);
+//*********** (3) Uncomment the line below to set one process per pool
+                sndServerGlobalRanks.push_back(srvGlobalRanks[i]);
+              }
+              else
+              {
+                if (globalRank == srvGlobalRanks[i]) serverLevel=1;
+              }
+            }
+            if (serverLevel==2)
+            {
+              info(50)<<"The number of secondary server pools is "<< sndServerGlobalRanks.size() <<endl ;
+              for (int i=0; i<sndServerGlobalRanks.size(); i++)
+              {
+                if (globalRank>= sndServerGlobalRanks[i])
+                {
+                  if (i == sndServerGlobalRanks.size()-1)
+                  {
+                    myColor = sndServerGlobalRanks[i];
+                  }
+                  else if (globalRank< sndServerGlobalRanks[i+1])
+                  {
+                    myColor = sndServerGlobalRanks[i];
+                    break;
+                  }
+                }
+              }
+            }
+            if (serverLevel != 2) myColor=0;
+            MPI_Comm_split(localComm, myColor, rank_, &intraComm) ;
+          }
+        }
+
+        string codesId=CXios::getin<string>("oasis_codes_id") ;
+        vector<string> oasisCodeId=splitRegex(codesId,"\\s*,\\s*") ;
+ 
+        vector<string>::iterator it ;
+
+        MPI_Comm newComm ;
+        int globalRank ;
+        MPI_Comm_rank(CXios::globalComm,&globalRank);
+
+//      (2) Create interComms with models
+        for(it=oasisCodeId.begin();it!=oasisCodeId.end();it++)
+        {
+          oasis_get_intercomm(newComm,*it) ;
+          if ( serverLevel == 0 || serverLevel == 1)
+          {
+            interCommLeft.push_back(newComm) ;
+            if (rank_==0) MPI_Send(&globalRank,1,MPI_INT,0,0,newComm) ;
+          }
+        }
+
+//      (3) Create interComms between primary and secondary servers
+        int intraCommSize, intraCommRank ;
+        MPI_Comm_size(intraComm,&intraCommSize) ;
+        MPI_Comm_rank(intraComm, &intraCommRank) ;
+
+        if (serverLevel == 1)
+        {
+          for (int i = 0; i < sndServerGlobalRanks.size(); ++i)
+          {
+            int srvSndLeader = sndServerGlobalRanks[i];
+            info(50)<<"intercommCreate::client (server level 1) "<<globalRank<<" intraCommSize : "<<intraCommSize
+                <<" intraCommRank :"<<intraCommRank<<"  clientLeader "<< srvSndLeader<<endl ;
+            MPI_Intercomm_create(intraComm, 0, CXios::globalComm, srvSndLeader, 0, &newComm) ;
+            interCommRight.push_back(newComm) ;
+          }
+        }
+        else if (serverLevel == 2)
+        {
+          info(50)<<"intercommCreate::server (server level 2)"<<globalRank<<" intraCommSize : "<<intraCommSize
+                   <<" intraCommRank :"<<intraCommRank<<"  clientLeader "<< srvGlobalRanks[0] <<endl ;
+          MPI_Intercomm_create(intraComm, 0, CXios::globalComm, srvGlobalRanks[0], 0, &newComm) ;
+          interCommLeft.push_back(newComm) ;
+        }
+        if (CXios::usingServer2) delete [] srvGlobalRanks ;
+
+        bool oasisEnddef=CXios::getin<bool>("call_oasis_enddef",true) ;
+        if (!oasisEnddef) oasis_enddef() ;
+      }
+
+
+      MPI_Comm_rank(intraComm, &rank) ;
+      if (rank==0) isRoot=true;
+      else isRoot=false;
+      
+      eventScheduler = new CEventScheduler(intraComm) ;
+    }
+
+    void CServer::finalize(void)
+    {
+      CTimer::get("XIOS").suspend() ;
+     
+      delete eventScheduler ;
+
+      for (std::list<MPI_Comm>::iterator it = contextInterComms.begin(); it != contextInterComms.end(); it++)
+        MPI_Comm_free(&(*it));
+
+      for (std::list<MPI_Comm>::iterator it = contextIntraComms.begin(); it != contextIntraComms.end(); it++)
+        MPI_Comm_free(&(*it));
+
+//      for (std::list<MPI_Comm>::iterator it = interComm.begin(); it != interComm.end(); it++)
+//        MPI_Comm_free(&(*it));
+
+//        for (std::list<MPI_Comm>::iterator it = interCommLeft.begin(); it != interCommLeft.end(); it++)
+//          MPI_Comm_free(&(*it));
+
+        for (std::list<MPI_Comm>::iterator it = interCommRight.begin(); it != interCommRight.end(); it++)
+          MPI_Comm_free(&(*it));
+
+      MPI_Comm_free(&intraComm);
+
+      if (!is_MPI_Initialized)
+      {
+        if (CXios::usingOasis) oasis_finalize();
+        else MPI_Finalize() ;
+      }
+      report(0)<<"Performance report : Time spent for XIOS : "<<CTimer::get("XIOS server").getCumulatedTime()<<endl  ;
+      report(0)<<"Performance report : Time spent in processing events : "<<CTimer::get("Process events").getCumulatedTime()<<endl  ;
+      report(0)<<"Performance report : Ratio : "<<CTimer::get("Process events").getCumulatedTime()/CTimer::get("XIOS server").getCumulatedTime()*100.<<"%"<<endl  ;
+      report(100)<<CTimer::getAllCumulatedTime()<<endl ;
+    }
+
+     void CServer::eventLoop(void)
+     {
+       bool stop=false ;
+
+       CTimer::get("XIOS server").resume() ;
+       while(!stop)
+       {
+         if (isRoot)
+         {
+           listenContext();
+           listenRootContext();
+           listenOasisEnddef() ;
+           listenRootOasisEnddef() ;
+           if (!finished) listenFinalize() ;
+         }
+         else
+         {
+           listenRootContext();
+           listenRootOasisEnddef() ;
+           if (!finished) listenRootFinalize() ;
+         }
+
+         contextEventLoop() ;
+         if (finished && contextList.empty()) stop=true ;
+         eventScheduler->checkEvent() ;
+       }
+       CTimer::get("XIOS server").suspend() ;
+     }
+
+     void CServer::listenFinalize(void)
+     {
+        list<MPI_Comm>::iterator it, itr;
+        int msg ;
+        int flag ;
+
+        for(it=interCommLeft.begin();it!=interCommLeft.end();it++)
+        {
+           MPI_Status status ;
+           traceOff() ;
+           MPI_Iprobe(0,0,*it,&flag,&status) ;
+           traceOn() ;
+           if (flag==true)
+           {
+              MPI_Recv(&msg,1,MPI_INT,0,0,*it,&status) ;
+              info(20)<<" CServer : Receive client finalize"<<endl ;
+              // Sending server finalize message to secondary servers (if any)
+              for(itr=interCommRight.begin();itr!=interCommRight.end();itr++)
+              {
+                MPI_Send(&msg,1,MPI_INT,0,0,*itr) ;
+              }
+              MPI_Comm_free(&(*it));
+              interCommLeft.erase(it) ;
+              break ;
+            }
+         }
+
+         if (interCommLeft.empty())
+         {
+           int i,size ;
+           MPI_Comm_size(intraComm,&size) ;
+           MPI_Request* requests= new MPI_Request[size-1] ;
+           MPI_Status* status= new MPI_Status[size-1] ;
+
+           for(int i=1;i<size;i++) MPI_Isend(&msg,1,MPI_INT,i,4,intraComm,&requests[i-1]) ;
+           MPI_Waitall(size-1,requests,status) ;
+
+           finished=true ;
+           delete [] requests ;
+           delete [] status ;
+         }
+     }
+
+
+     void CServer::listenRootFinalize()
+     {
+        int flag ;
+        MPI_Status status ;
+        int msg ;
+
+        traceOff() ;
+        MPI_Iprobe(0,4,intraComm, &flag, &status) ;
+        traceOn() ;
+        if (flag==true)
+        {
+           MPI_Recv(&msg,1,MPI_INT,0,4,intraComm,&status) ;
+           finished=true ;
+        }
+      }
+
+
+   /*!
+    * Root process is listening for an order sent by client to call "oasis_enddef".
+    * The root client of a compound send the order (tag 5). It is probed and received.
+    * When the order has been received from each coumpound, the server root process ping the order to the root processes of the secondary levels of servers (if any).
+    * After, it also inform (asynchronous call) other processes of the communicator that the oasis_enddef call must be done
+    */
+    
+     void CServer::listenOasisEnddef(void)
+     {
+        int flag ;
+        MPI_Status status ;
+        list<MPI_Comm>::iterator it;
+        int msg ;
+        static int nbCompound=0 ;
+        int size ;
+        static bool sent=false ;
+        static MPI_Request* allRequests ;
+        static MPI_Status* allStatus ;
+
+
+        if (sent)
+        {
+          MPI_Comm_size(intraComm,&size) ;
+          MPI_Testall(size,allRequests, &flag, allStatus) ;
+          if (flag==true)
+          {
+            delete [] allRequests ;
+            delete [] allStatus ;
+            sent=false ;
+          }
+        }
+        
+
+        for(it=interCommLeft.begin();it!=interCommLeft.end();it++)
+        {
+           MPI_Status status ;
+           traceOff() ;
+           MPI_Iprobe(0,5,*it,&flag,&status) ;  // tags oasis_endded = 5
+           traceOn() ;
+           if (flag==true)
+           {
+              MPI_Recv(&msg,1,MPI_INT,0,5,*it,&status) ; // tags oasis_endded = 5
+              nbCompound++ ;
+              if (nbCompound==interCommLeft.size())
+              {
+                for (std::list<MPI_Comm>::iterator it = interCommRight.begin(); it != interCommRight.end(); it++)
+                {
+                   MPI_Send(&msg,1,MPI_INT,0,5,*it) ; // tags oasis_endded = 5
+                }
+                MPI_Comm_size(intraComm,&size) ;
+                allRequests= new MPI_Request[size] ;
+                allStatus= new MPI_Status[size] ;
+                for(int i=0;i<size;i++) MPI_Isend(&msg,1,MPI_INT,i,5,intraComm,&allRequests[i]) ; // tags oasis_endded = 5
+                sent=true ;
+              }
+           }
+        }
+     }
+     
+   /*!
+    * Processes probes message from root process if oasis_enddef call must be done.
+    * When the order is received it is scheduled to be treated in a synchronized way by all server processes of the communicator
+    */
+     void CServer::listenRootOasisEnddef(void)
+     {
+       int flag ;
+       MPI_Status status ;
+       const int root=0 ;
+       int msg ;
+       static bool eventSent=false ;
+
+       if (eventSent)
+       {
+         boost::hash<string> hashString;
+         size_t hashId = hashString("oasis_enddef");
+         if (eventScheduler->queryEvent(0,hashId))
+         {
+           oasis_enddef() ;
+           eventSent=false ;
+         }
+       }
+         
+       traceOff() ;
+       MPI_Iprobe(root,5,intraComm, &flag, &status) ;
+       traceOn() ;
+       if (flag==true)
+       {
+         MPI_Recv(&msg,1,MPI_INT,root,5,intraComm,&status) ; // tags oasis_endded = 5
+         boost::hash<string> hashString;
+         size_t hashId = hashString("oasis_enddef");
+         eventScheduler->registerEvent(0,hashId);
+         eventSent=true ;
+       }
+     }
+
+
+
+     
+
+     void CServer::listenContext(void)
+     {
+
+       MPI_Status status ;
+       int flag ;
+       static char* buffer ;
+       static MPI_Request request ;
+       static bool recept=false ;
+       int rank ;
+       int count ;
+
+       if (recept==false)
+       {
+         traceOff() ;
+         MPI_Iprobe(MPI_ANY_SOURCE,1,CXios::globalComm, &flag, &status) ;
+         traceOn() ;
+         if (flag==true)
+         {
+           rank=status.MPI_SOURCE ;
+           MPI_Get_count(&status,MPI_CHAR,&count) ;
+           buffer=new char[count] ;
+           MPI_Irecv((void*)buffer,count,MPI_CHAR,rank,1,CXios::globalComm,&request) ;
+           recept=true ;
+         }
+       }
+       else
+       {
+         traceOff() ;
+         MPI_Test(&request,&flag,&status) ;
+         traceOn() ;
+         if (flag==true)
+         {
+           rank=status.MPI_SOURCE ;
+           MPI_Get_count(&status,MPI_CHAR,&count) ;
+           recvContextMessage((void*)buffer,count) ;
+           delete [] buffer ;
+           recept=false ;
+         }
+       }
+     }
+
+     void CServer::recvContextMessage(void* buff,int count)
+     {
+       static map<string,contextMessage> recvContextId;
+       map<string,contextMessage>::iterator it ;
+       CBufferIn buffer(buff,count) ;
+       string id ;
+       int clientLeader ;
+       int nbMessage ;
+
+       buffer>>id>>nbMessage>>clientLeader ;
+
+       it=recvContextId.find(id) ;
+       if (it==recvContextId.end())
+       {
+         contextMessage msg={0,0} ;
+         pair<map<string,contextMessage>::iterator,bool> ret ;
+         ret=recvContextId.insert(pair<string,contextMessage>(id,msg)) ;
+         it=ret.first ;
+       }
+       it->second.nbRecv+=1 ;
+       it->second.leaderRank+=clientLeader ;
+
+       if (it->second.nbRecv==nbMessage)
+       {
+         int size ;
+         MPI_Comm_size(intraComm,&size) ;
+//         MPI_Request* requests= new MPI_Request[size-1] ;
+//         MPI_Status* status= new MPI_Status[size-1] ;
+         MPI_Request* requests= new MPI_Request[size] ;
+         MPI_Status* status= new MPI_Status[size] ;
+
+         CMessage msg ;
+         msg<<id<<it->second.leaderRank;
+         int messageSize=msg.size() ;
+         void * sendBuff = new char[messageSize] ;
+         CBufferOut sendBuffer(sendBuff,messageSize) ;
+         sendBuffer<<msg ;
+
+         // Include root itself in order not to have a divergence
+         for(int i=0; i<size; i++)
+         {
+           MPI_Isend(sendBuff,sendBuffer.count(),MPI_CHAR,i,2,intraComm,&requests[i]) ;
+         }
+
+         recvContextId.erase(it) ;
+         delete [] requests ;
+         delete [] status ;
+
+       }
+     }
+
+     void CServer::listenRootContext(void)
+     {
+       MPI_Status status ;
+       int flag ;
+       static std::vector<void*> buffers;
+       static std::vector<MPI_Request> requests ;
+       static std::vector<int> counts ;
+       static std::vector<bool> isEventRegistered ;
+       static std::vector<bool> isEventQueued ;
+       MPI_Request request;
+
+       int rank ;
+       const int root=0 ;
+       boost::hash<string> hashString;
+       size_t hashId = hashString("RegisterContext");
+
+       // (1) Receive context id from the root, save it into a buffer
+       traceOff() ;
+       MPI_Iprobe(root,2,intraComm, &flag, &status) ;
+       traceOn() ;
+       if (flag==true)
+       {
+         counts.push_back(0);
+         MPI_Get_count(&status,MPI_CHAR,&(counts.back())) ;
+         buffers.push_back(new char[counts.back()]) ;
+         requests.push_back(request);
+         MPI_Irecv((void*)(buffers.back()),counts.back(),MPI_CHAR,root,2,intraComm,&(requests.back())) ;
+         isEventRegistered.push_back(false);
+         isEventQueued.push_back(false);
+         nbContexts++;
+       }
+
+       for (int ctxNb = 0; ctxNb < nbContexts; ctxNb++ )
+       {
+         // (2) If context id is received, register an event
+         MPI_Test(&requests[ctxNb],&flag,&status) ;
+         if (flag==true && !isEventRegistered[ctxNb])
+         {
+           eventScheduler->registerEvent(ctxNb,hashId);
+           isEventRegistered[ctxNb] = true;
+         }
+         // (3) If event has been scheduled, call register context
+         if (eventScheduler->queryEvent(ctxNb,hashId) && !isEventQueued[ctxNb])
+         {
+           registerContext(buffers[ctxNb],counts[ctxNb]) ;
+           isEventQueued[ctxNb] = true;
+           delete [] buffers[ctxNb] ;
+         }
+       }
+
+     }
+
+     void CServer::registerContext(void* buff, int count, int leaderRank)
+     {
+       string contextId;
+       CBufferIn buffer(buff, count);
+//       buffer >> contextId;
+       buffer >> contextId>>leaderRank;
+       CContext* context;
+
+       info(20) << "CServer : Register new Context : " << contextId << endl;
+
+       if (contextList.find(contextId) != contextList.end())
+         ERROR("void CServer::registerContext(void* buff, int count, int leaderRank)",
+               << "Context '" << contextId << "' has already been registred");
+
+       context=CContext::create(contextId);
+       contextList[contextId]=context;
+
+       // Primary or classical server: create communication channel with a client
+       // (1) create interComm (with a client)
+       // (2) initialize client and server (contextClient and contextServer)
+       MPI_Comm inter;
+       if (serverLevel < 2)
+       {
+         MPI_Comm contextInterComm;
+         MPI_Intercomm_create(intraComm, 0, CXios::globalComm, leaderRank, 10+leaderRank, &contextInterComm);
+         MPI_Intercomm_merge(contextInterComm,1,&inter);
+         MPI_Barrier(inter);
+         MPI_Comm_free(&inter);
+         context->initServer(intraComm,contextInterComm);
+         contextInterComms.push_back(contextInterComm);
+
+       }
+       // Secondary server: create communication channel with a primary server
+       // (1) duplicate interComm with a primary server
+       // (2) initialize client and server (contextClient and contextServer)
+       // Remark: in the case of the secondary server there is no need to create an interComm calling MPI_Intercomm_create,
+       //         because interComm of CContext is defined on the same processes as the interComm of CServer.
+       //         So just duplicate it.
+       else if (serverLevel == 2)
+       {
+         MPI_Comm_dup(interCommLeft.front(), &inter);
+         contextInterComms.push_back(inter);
+         context->initServer(intraComm, contextInterComms.back());
+       }
+
+       // Primary server:
+       // (1) send create context message to secondary servers
+       // (2) initialize communication channels with secondary servers (create contextClient and contextServer)
+       if (serverLevel == 1)
+       {
+         int i = 0, size;
+         MPI_Comm_size(intraComm, &size) ;
+         for (std::list<MPI_Comm>::iterator it = interCommRight.begin(); it != interCommRight.end(); it++, ++i)
+         {
+           StdString str = contextId +"_server_" + boost::lexical_cast<string>(i);
+           CMessage msg;
+           int messageSize;
+           msg<<str<<size<<rank_ ;
+           messageSize = msg.size() ;
+           buff = new char[messageSize] ;
+           CBufferOut buffer(buff,messageSize) ;
+           buffer<<msg ;
+           MPI_Send(buff, buffer.count(), MPI_CHAR, sndServerGlobalRanks[i], 1, CXios::globalComm) ;
+           MPI_Comm_dup(*it, &inter);
+           contextInterComms.push_back(inter);
+           MPI_Comm_dup(intraComm, &inter);
+           contextIntraComms.push_back(inter);
+           context->initClient(contextIntraComms.back(), contextInterComms.back()) ;
+           delete [] buff ;
+         }
+       }
+     }
+
+     void CServer::contextEventLoop(bool enableEventsProcessing /*= true*/)
+     {
+       bool isFinalized ;
+       map<string,CContext*>::iterator it ;
+
+       for(it=contextList.begin();it!=contextList.end();it++)
+       {
+         isFinalized=it->second->isFinalized();
+         if (isFinalized)
+         {
+           contextList.erase(it) ;
+           break ;
+         }
+         else
+           it->second->checkBuffersAndListen(enableEventsProcessing);
+       }
+     }
+
+     //! Get rank of the current process in the intraComm
+     int CServer::getRank()
+     {
+       int rank;
+       MPI_Comm_rank(intraComm,&rank);
+       return rank;
+     }
+
+     vector<int>& CServer::getSecondaryServerGlobalRanks()
+     {
+       return sndServerGlobalRanks;
+     }
+
+    /*!
+    * Open a file specified by a suffix and an extension and use it for the given file buffer.
+    * The file name will be suffix+rank+extension.
+    * 
+    * \param fileName[in] protype file name
+    * \param ext [in] extension of the file
+    * \param fb [in/out] the file buffer
+    */
+    void CServer::openStream(const StdString& fileName, const StdString& ext, std::filebuf* fb)
+    {
+      StdStringStream fileNameClient;
+      int numDigit = 0;
+      int size = 0;
+      int id;
+      MPI_Comm_size(CXios::globalComm, &size);
+      while (size)
+      {
+        size /= 10;
+        ++numDigit;
+      }
+      id = rank_; //getRank();
+
+      fileNameClient << fileName << "_" << std::setfill('0') << std::setw(numDigit) << id << ext;
+      fb->open(fileNameClient.str().c_str(), std::ios::out);
+      if (!fb->is_open())
+        ERROR("void CServer::openStream(const StdString& fileName, const StdString& ext, std::filebuf* fb)",
+              << std::endl << "Can not open <" << fileNameClient.str() << "> file to write the server log(s).");
+    }
+
+    /*!
+    * \brief Open a file stream to write the info logs
+    * Open a file stream with a specific file name suffix+rank
+    * to write the info logs.
+    * \param fileName [in] protype file name
+    */
+    void CServer::openInfoStream(const StdString& fileName)
+    {
+      std::filebuf* fb = m_infoStream.rdbuf();
+      openStream(fileName, ".out", fb);
+
+      info.write2File(fb);
+      report.write2File(fb);
+    }
+
+    //! Write the info logs to standard output
+    void CServer::openInfoStream()
+    {
+      info.write2StdOut();
+      report.write2StdOut();
+    }
+
+    //! Close the info logs file if it opens
+    void CServer::closeInfoStream()
+    {
+      if (m_infoStream.is_open()) m_infoStream.close();
+    }
+
+    /*!
+    * \brief Open a file stream to write the error log
+    * Open a file stream with a specific file name suffix+rank
+    * to write the error log.
+    * \param fileName [in] protype file name
+    */
+    void CServer::openErrorStream(const StdString& fileName)
+    {
+      std::filebuf* fb = m_errorStream.rdbuf();
+      openStream(fileName, ".err", fb);
+
+      error.write2File(fb);
+    }
+
+    //! Write the error log to standard error output
+    void CServer::openErrorStream()
+    {
+      error.write2StdErr();
+    }
+
+    //! Close the error log file if it opens
+    void CServer::closeErrorStream()
+    {
+      if (m_errorStream.is_open()) m_errorStream.close();
+    }
+}
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/server.hpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/server.hpp	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/server.hpp	(revision 1749)
@@ -0,0 +1,80 @@
+#ifndef __SERVER_HPP__
+#define __SERVER_HPP__
+
+#include "xios_spl.hpp"
+#include "context.hpp"
+#include "context_client.hpp"
+#include "mpi.hpp"
+#include "event_scheduler.hpp"
+
+namespace xios
+{
+    class CServer
+    {
+      public:
+        static void initialize(void);
+        static void finalize(void);
+        static void eventLoop(void);
+        static void contextEventLoop(bool enableEventsProcessing=true);
+        static void listenContext(void);
+        static void listenFinalize(void);
+        static void recvContextMessage(void* buff,int count);
+        static void listenRootContext(void);
+        static void listenRootFinalize(void);
+        static void listenRootOasisEnddef(void);
+        static void listenOasisEnddef(void);
+        static void registerContext(void* buff,int count, int leaderRank=0);
+
+        static MPI_Comm intraComm;
+        static std::list<MPI_Comm> interCommLeft;           // interComm between server (primary, classical or secondary) and its client (client or primary server)
+        static std::list<MPI_Comm> interCommRight;          // interComm between primary server and secondary server (non-empty only for primary server pool)
+        static std::list<MPI_Comm> contextInterComms;  // list of context intercomms
+        static std::list<MPI_Comm> contextIntraComms;  // list of context intercomms (needed only in case of secondary servers)
+        static CEventScheduler* eventScheduler;
+
+        static int serverLevel ;
+
+        struct contextMessage
+        {
+          int nbRecv;
+          int leaderRank;
+        };
+
+        static bool isRoot;
+
+        static map<string,CContext*> contextList;
+        static bool finished;
+        static bool is_MPI_Initialized;
+
+      public:
+        //! Get rank of the current process in the intraComm
+        static int getRank();
+
+        //!< Get global ranks of secondary server processes
+        static vector<int>& getSecondaryServerGlobalRanks();
+
+        //! Open a file stream to write the info logs
+        static void openInfoStream(const StdString& fileName);
+        //! Write the info logs to standard output
+        static void openInfoStream();
+        //! Close the info logs file if it opens
+        static void closeInfoStream();
+
+        //! Open a file stream to write the error log
+        static void openErrorStream(const StdString& fileName);
+        //! Write the error log to standard error output
+        static void openErrorStream();
+        //! Close the error log file if it opens
+        static void closeErrorStream();
+
+      private:
+        static vector<int> sndServerGlobalRanks;  //!< Global ranks of pool leaders on the secondary server
+        static int rank_;                         //!< If (!oasis) global rank, else rank in the intraComm returned by oasis
+        static int nbContexts;                    //!< Number of contexts registered by server
+        static StdOFStream m_infoStream;
+        static StdOFStream m_errorStream;
+        static void openStream(const StdString& fileName, const StdString& ext, std::filebuf* fb);
+    };
+}
+
+#endif
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/server_distribution_description.cpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/server_distribution_description.cpp	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/server_distribution_description.cpp	(revision 1749)
@@ -0,0 +1,522 @@
+/*!
+   \file server_distribution_description.hpp
+   \author Ha NGUYEN
+   \since 04 Jan 2015
+   \date 11 Jan 2016
+
+   \brief Description of index distribution on server(s).
+ */
+
+#include "server_distribution_description.hpp"
+#include "exception.hpp"
+
+namespace xios
+{
+  /*!
+  \param [in] globalDimensionSize global dimension of grid
+  \param [in] nServer number of server
+  \param [in] serType type of server distribution. For now, we can distribute server by band or plan
+  */
+CServerDistributionDescription::CServerDistributionDescription(const std::vector<int>& globalDimensionSize,
+                                                               int nServer,
+                                                               ServerDistributionType serType)
+  : nGlobal_(globalDimensionSize), indexBegin_(), dimensionSizes_(), globalIndex_(),
+    vecGlobalIndex_(), serverType_(serType), nServer_(nServer), positionDimensionDistributed_(1)
+{
+}
+
+CServerDistributionDescription::~CServerDistributionDescription()
+{ /* Nothing to do */ }
+
+int CServerDistributionDescription::defaultDistributedDimension(int gridDimension,                                   
+                                                                ServerDistributionType serType)
+{  
+  switch (serType) 
+  {
+    case BAND_DISTRIBUTION:       
+       return ((1 == gridDimension) ? 0 : 1);
+      break;
+    default:
+      break;
+  } 
+}
+
+/*!
+  Compute pre-defined global index distribution of server(s).
+  \param [in] doComputeGlobalIndex flag to compute global index on each server. By default, false
+
+*/
+void CServerDistributionDescription::computeServerDistribution(bool doComputeGlobalIndex,
+                                                               int positionDimensionDistributed)
+{
+  switch (serverType_) {
+    case BAND_DISTRIBUTION:
+      computeBandDistribution(nServer_, positionDimensionDistributed);
+      break;
+    default:
+      break;
+  }
+
+  if (doComputeGlobalIndex)
+  {
+    vecGlobalIndex_.resize(nServer_);
+    int dim = nGlobal_.size();
+    std::vector<int> currentIndex(dim);
+
+    for (int idxServer = 0; idxServer < nServer_; ++idxServer)
+    {
+      size_t ssize = 1, idx = 0;
+      for (int j = 0; j < dim; ++j) ssize *= dimensionSizes_[idxServer][j];
+      vecGlobalIndex_[idxServer].resize(ssize);
+
+      std::vector<int> idxLoop(dim,0);
+
+      int innerLoopSize = dimensionSizes_[idxServer][0];
+
+      while (idx<ssize)
+      {
+        for (int idxDim = 0; idxDim < dim-1; ++idxDim)
+        {
+          if (idxLoop[idxDim] == dimensionSizes_[idxServer][idxDim])
+          {
+            idxLoop[idxDim] = 0;
+            ++idxLoop[idxDim+1];
+          }
+        }
+
+        for (int idxDim = 1; idxDim < dim; ++idxDim)  currentIndex[idxDim] = idxLoop[idxDim] + indexBegin_[idxServer][idxDim];
+
+        size_t mulDim, globalIndex;
+        for (int j = 0; j < innerLoopSize; ++j)
+        {
+          mulDim = 1;
+          globalIndex = j + indexBegin_[idxServer][0];
+
+          for (int k = 1; k < dim; ++k)
+          {
+            mulDim *= nGlobal_[k-1];
+            globalIndex += currentIndex[k] * mulDim;
+          }
+          vecGlobalIndex_[idxServer](idx) = globalIndex;
+          ++idx;
+        }
+        idxLoop[0] += innerLoopSize;
+      }
+    }
+  }
+}
+
+/*!
+  Compute global index assigned to a server with a range.E.g: if a grid has 100 points and
+  there are 2 servers, the first one takes index from 0 to 49, the second has index from 50 to 99
+  \param [in] indexBeginEnd begining and ending index of range
+  \param [in] positionDimensionDistributed dimension of server on which we make the cut.
+*/
+std::vector<int> CServerDistributionDescription::computeServerGlobalIndexInRange(const std::pair<size_t, size_t>& indexBeginEnd,
+                                                                     int positionDimensionDistributed)
+{
+  int nBand  = 0;
+  switch (serverType_)
+  {
+    case BAND_DISTRIBUTION:
+      nBand = computeBandDistribution(nServer_, positionDimensionDistributed);
+      break;
+    case ROOT_DISTRIBUTION:
+      nBand = computeRootDistribution(nServer_);
+    default:
+      break;
+  }
+
+  size_t indexBegin = indexBeginEnd.first;
+  size_t indexEnd   = indexBeginEnd.second;
+  if (indexBegin > indexEnd)
+     ERROR("CServerDistributionDescription::computeServerGlobalIndexInRange",
+           << "Index begin is larger than index end");
+
+  globalIndex_.rehash(std::ceil((indexEnd-indexBegin+1)/globalIndex_.max_load_factor()));
+
+  int dim = nGlobal_.size();
+  std::vector<int> currentIndex(dim);
+
+  for (int idxServer = 0; idxServer < nBand; ++idxServer)
+  {
+    size_t ssize = 1, idx = 0;
+    for (int j = 0; j < dim; ++j) ssize *= dimensionSizes_[idxServer][j];
+
+    std::vector<int> idxLoop(dim,0);
+    int innerLoopSize = dimensionSizes_[idxServer][0];
+
+    while (idx<ssize)
+    {
+      for (int idxDim = 0; idxDim < dim-1; ++idxDim)
+      {
+        if (idxLoop[idxDim] == dimensionSizes_[idxServer][idxDim])
+        {
+          idxLoop[idxDim] = 0;
+          ++idxLoop[idxDim+1];
+        }
+      }
+
+      for (int idxDim = 1; idxDim < dim; ++idxDim)  currentIndex[idxDim] = idxLoop[idxDim] + indexBegin_[idxServer][idxDim];
+
+      size_t mulDim, globalIndex;
+      for (int j = 0; j < innerLoopSize; ++j)
+      {
+        mulDim = 1;
+        globalIndex = j + indexBegin_[idxServer][0];
+
+        for (int k = 1; k < dim; ++k)
+        {
+          mulDim *= nGlobal_[k-1];
+          globalIndex += (currentIndex[k])*mulDim;
+        }
+        if ((indexBegin <= globalIndex) && (globalIndex <= indexEnd))
+          globalIndex_[globalIndex] = idxServer;
+        ++idx;
+      }
+      idxLoop[0] += innerLoopSize;
+    }
+  }
+
+    // List of servers without distribution (cause total number of server is greater than number of bands, for example)
+  std::vector<int> zeroIndexServer(nServer_-nBand); 
+  for (int idxServer = nBand; idxServer < nServer_; ++idxServer)
+    zeroIndexServer[idxServer-nBand] = idxServer;
+
+  return zeroIndexServer;
+}
+
+/*!
+  Compute the global index of grid elements (domain, axis) and their associated server rank.
+  Each client knows the general distribution of servers and from which they can compute the pieces of information to hold
+  \param [out] indexServerOnElement global index of each element as well as the corresponding server which contains these indices
+  \param [in] clientRank rank of client
+  \param [in] clientSize number of client
+  \param [in] axisDomainOrder the order of element in grid (2 for domain, 1 for axis, 0 for scalar)
+  \param [in] positionDimensionDistributed dimension of server on which we make the cut.
+*/
+std::vector<int> CServerDistributionDescription::computeServerGlobalByElement(std::vector<std::unordered_map<size_t,std::vector<int> > >& indexServerOnElement,
+                                                                              int clientRank,
+                                                                              int clientSize,
+                                                                              const CArray<int,1>& axisDomainOrder,
+                                                                              int positionDimensionDistributed)
+{
+  int nBand  = 0;
+  switch (serverType_) {
+    case BAND_DISTRIBUTION:
+      nBand = computeBandDistribution(nServer_, positionDimensionDistributed);
+      break;
+    default:
+      break;
+  }
+
+  int nbElement = axisDomainOrder.numElements();
+  indexServerOnElement.resize(nbElement);
+  int idx = 0;
+  std::vector<int> idxMap(nbElement);
+  for (int i = 0; i < nbElement; ++i)
+  {
+    idxMap[i] = idx;
+    if (2 == axisDomainOrder(i)) idx += 2;
+    else if (1 == axisDomainOrder(i)) idx += 1;
+    // nothing for scalar
+  }
+
+  for (int idxServer = 0; idxServer < nBand; ++idxServer)
+  {
+    std::vector<int> elementDimension(4);
+    for (int i = 0; i < nbElement; ++i)
+    {
+      int elementSize = 1;
+      if (2 == axisDomainOrder(i))
+      {
+        elementSize *= dimensionSizes_[idxServer][idxMap[i]] * dimensionSizes_[idxServer][idxMap[i]+1];
+        elementDimension[0] = indexBegin_[idxServer][idxMap[i]];
+        elementDimension[1] = indexBegin_[idxServer][idxMap[i]+1];
+        elementDimension[2] = dimensionSizes_[idxServer][idxMap[i]];
+        elementDimension[3] = dimensionSizes_[idxServer][idxMap[i]+1];
+      }
+
+      else if (1 == axisDomainOrder(i))
+      {
+        elementSize *= dimensionSizes_[idxServer][idxMap[i]];
+        elementDimension[0] = indexBegin_[idxServer][idxMap[i]];
+        elementDimension[1] = 0;
+        elementDimension[2] = dimensionSizes_[idxServer][idxMap[i]];
+        elementDimension[3] = 1;
+      }
+      else
+      {
+        elementSize *= dimensionSizes_[idxServer][idxMap[i]];
+        elementDimension[0] = 0;
+        elementDimension[1] = 0;
+        elementDimension[2] = 1;
+        elementDimension[3] = 1;
+      }
+
+      int rangeBegin, rangeSize;
+      computeRangeProcIndex(clientRank, clientSize, elementSize, rangeBegin, rangeSize);
+
+      size_t globalIndexElement;
+      idx = 0; int idxRange = 0;
+      for (int k = 0; k < elementDimension[3]; ++k)
+        for (int l = 0; l < elementDimension[2]; ++l)
+        {
+          globalIndexElement = (l+elementDimension[0]) + (k+elementDimension[1])*elementDimension[2];
+          if ((rangeBegin <= idx) && (idxRange < rangeSize))
+          {
+            indexServerOnElement[i][globalIndexElement].push_back(idxServer);
+            ++idxRange;
+          }
+          ++idx;
+        }
+    }
+  }
+
+  // List of servers without distribution (cause total number of server is greater than number of bands, for example)
+  std::vector<int> zeroIndexServer(nServer_-nBand); 
+  for (int idxServer = nBand; idxServer < nServer_; ++idxServer)
+    zeroIndexServer[idxServer-nBand] = idxServer;
+
+  return zeroIndexServer;
+}
+
+/*!
+  Compute a range of index on server which a client holds
+  For a range of index on a specific server, each client can hold a piece of the index range
+  If the range size is smaller than the number of client, there are some clients holding the same index
+  \param [in] clientRank rank of client
+  \param [in] clientSize number of client
+  \param [in] rangeProcSize index range size
+  \param [out] rangeBegin begin of range index a client holds
+  \param [out] rangeSize size of range index a client holds
+*/
+void CServerDistributionDescription::computeRangeProcIndex(int clientRank,
+                                                           int clientSize,
+                                                           int rangeProcSize,
+                                                           int& rangeBegin,
+                                                           int& rangeSize)
+{
+  if (rangeProcSize < clientSize)
+  {
+    int rangeIndex = 0;
+    for (int idx = 0; idx < clientSize; ++idx)
+    {
+      if (idx == clientRank)
+      {
+        rangeBegin = rangeIndex;
+        rangeSize = 1;
+      }
+      ++rangeIndex;
+      if (rangeIndex == rangeProcSize) rangeIndex = 0;
+    }
+    return;
+  }
+
+  int range, indexBegin = 0;
+  for (int i = 0; i < clientSize; ++i)
+  {
+    range = rangeProcSize / clientSize;
+    if (i < (rangeProcSize%clientSize)) ++range;
+    if (i == clientRank) break;
+    indexBegin += range;
+  }
+  rangeBegin = indexBegin;
+  rangeSize = range;
+}
+
+/*!
+  Compute global index of servers with band distribution
+  \param [in] nServer number of server
+*/
+int CServerDistributionDescription::computeBandDistribution(int nServer, int positionDimensionDistributed)
+{
+  int dim = nGlobal_.size();
+  positionDimensionDistributed_ = positionDimensionDistributed;
+  if (1 == dim) positionDimensionDistributed_ = 0;
+  if (positionDimensionDistributed_ > dim)
+    ERROR("CServerDistributionDescription::computeBandDistribution(int nServer, int positionDimensionDistributed)",
+          << "Position of distributed dimension is invalid" << std::endl
+          << "Position of distributed dimension is " << positionDimensionDistributed_
+          << "Dimension " << dim)
+
+  indexBegin_.resize(nServer);
+  dimensionSizes_.resize(nServer);
+
+  for (int i = 0; i< nServer; ++i)
+  {
+    indexBegin_[i].resize(dim);
+    dimensionSizes_[i].resize(dim);
+  }
+
+  int njRangeSize;
+  int nGlobTemp = 0;
+  std::vector<int> njRangeBegin(nServer,0);
+  std::vector<int> njRangeEnd(nServer,0);
+
+  int positionDistributed = (1<dim) ? positionDimensionDistributed_ : 0;
+  nGlobTemp = nGlobal_[positionDistributed];
+  int nbBand = std::min(nGlobTemp, nServer);
+
+  for (int i = 0; i < nbBand; ++i)
+  {
+    if (0 < i) njRangeBegin[i] = njRangeEnd[i-1];
+    njRangeSize = nGlobTemp / nbBand;
+    if (i < nGlobTemp%nbBand) ++njRangeSize;
+    njRangeEnd[i] = njRangeSize + njRangeBegin[i];
+  }
+  njRangeEnd[nbBand-1] = nGlobTemp;
+
+  for (int i = nbBand; i < nServer; ++i)
+  {
+    njRangeBegin[i] = njRangeEnd[i] = 0;
+  }
+
+  for (int i = 0; i < nServer; ++i)
+  {
+    for (int j = 0; j < dim; ++j)
+    {
+      if (positionDistributed != j)
+      {
+        if (1 == dim)
+        {
+          indexBegin_[i][j] = njRangeBegin[i];
+          dimensionSizes_[i][j] = njRangeEnd[i] - njRangeBegin[i];
+        }
+        else
+        {
+          indexBegin_[i][j] = 0;
+          dimensionSizes_[i][j] = nGlobal_[j];
+        }
+      }
+      else
+      {
+        indexBegin_[i][j] = njRangeBegin[i];
+        dimensionSizes_[i][j] = njRangeEnd[i] - njRangeBegin[i];
+      }
+    }
+  }
+
+  return nbBand;
+}
+
+
+/*!
+  Compute global index of servers with root distribution : only root server will received data
+  \param [in] nServer number of server
+*/
+int CServerDistributionDescription::computeRootDistribution(int nServer, int positionDimensionDistributed)
+{
+  int dim = nGlobal_.size();
+  positionDimensionDistributed_ = positionDimensionDistributed;
+  if (1 == dim) positionDimensionDistributed_ = 0;
+  if (positionDimensionDistributed_ > dim)
+    ERROR("CServerDistributionDescription::computeBandDistribution(int nServer, int positionDimensionDistributed)",
+          << "Position of distributed dimension is invalid" << std::endl
+          << "Position of distributed dimension is " << positionDimensionDistributed_
+          << "Dimension " << dim)
+
+  indexBegin_.resize(nServer);
+  dimensionSizes_.resize(nServer);
+
+  for (int i = 0; i< nServer; ++i)
+  {
+    indexBegin_[i].resize(dim);
+    dimensionSizes_[i].resize(dim);
+  }
+
+  int nGlobTemp = 0;
+
+  int positionDistributed = (1<dim) ? positionDimensionDistributed_ : 0;
+  nGlobTemp = nGlobal_[positionDistributed];
+  int nbBand = 1 ;
+
+
+  for (int i = 0; i < nServer; ++i)
+  {
+    for (int j = 0; j < dim; ++j)
+    {
+      if (positionDistributed != j) // bad coding, need to be rewrite
+      {
+        if (1 == dim)
+        {
+          if (i==0)
+          {
+            indexBegin_[i][j] = 0;
+            dimensionSizes_[i][j] = nGlobTemp;
+          }
+          else
+          {
+            indexBegin_[i][j] = nGlobTemp-1;
+            dimensionSizes_[i][j] = 0;
+          }
+        }
+        else
+        {
+          indexBegin_[i][j] = 0;
+          dimensionSizes_[i][j] = nGlobal_[j];
+        }
+      }
+      else
+      {
+        if (i==0)
+        {
+          indexBegin_[i][j] = 0;
+          dimensionSizes_[i][j] = nGlobTemp;
+        }
+        else
+        {
+          indexBegin_[i][j] = nGlobTemp-1;
+          dimensionSizes_[i][j] = 0;
+        }
+      }
+    }
+  }
+
+  return nbBand;
+}
+
+
+
+
+/*!
+  Get size of each dimension on distributed server
+  \return size of dimensions on server(s)
+*/
+std::vector<std::vector<int> > CServerDistributionDescription::getServerDimensionSizes() const
+{
+  return dimensionSizes_;
+}
+
+/*!
+  Get index begin of each dimension on distributed server
+  \return index begin of dimensions on server(s)
+*/
+std::vector<std::vector<int> > CServerDistributionDescription::getServerIndexBegin() const
+{
+  return indexBegin_;
+}
+
+/*!
+  Get global index on distributed server
+  \return global index on server(s)
+*/
+const std::vector<CArray<size_t,1> >& CServerDistributionDescription::getGlobalIndex() const
+{
+  return vecGlobalIndex_;
+}
+
+/*!
+  Get global index calculated by computeServerGlobalIndexInRange
+*/
+const std::unordered_map<size_t,int>& CServerDistributionDescription::getGlobalIndexRange() const
+{
+  return globalIndex_;
+}
+
+int CServerDistributionDescription::getDimensionDistributed()
+{
+  return ((1<nGlobal_.size()) ? positionDimensionDistributed_ : 0);
+}
+
+} // namespace xios
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/server_distribution_description.hpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/server_distribution_description.hpp	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/server_distribution_description.hpp	(revision 1749)
@@ -0,0 +1,88 @@
+/*!
+   \file server_distribution_description.hpp
+   \author Ha NGUYEN
+   \since 04 Jan 2015
+   \date 11 Jan 2016
+
+   \brief Description of index distribution on server(s).
+ */
+
+#ifndef __XIOS_SERVER_DISTRIBUTION_DESCRIPTION_HPP
+#define __XIOS_SERVER_DISTRIBUTION_DESCRIPTION_HPP
+
+#include "xios_spl.hpp"
+#include "array_new.hpp"
+#include <unordered_map>
+
+namespace xios
+{
+/*!
+   \class CServerDistributionDescription
+   This class contains information that describe distribution of servers.
+*/
+class CServerDistributionDescription
+{
+  public:
+    enum ServerDistributionType
+    {
+      BAND_DISTRIBUTION, PLAN_DISTRIBUTION, ROOT_DISTRIBUTION
+    };
+
+    /** Default constructor */
+    CServerDistributionDescription(const std::vector<int>& globalDimensionSize,
+                                   int nServer,
+                                   ServerDistributionType serType=BAND_DISTRIBUTION);
+
+    /** Default destructor */
+    virtual ~CServerDistributionDescription();
+
+    void computeServerDistribution(bool doComputeGlobalIndex = false, int positionDimensionDistributed = 1);
+    std::vector<int> computeServerGlobalIndexInRange(const std::pair<size_t, size_t>& indexBeginEnd, int positionDimensionDistributed = 1);
+    std::vector<int> computeServerGlobalByElement(std::vector<std::unordered_map<size_t,std::vector<int> > >& indexServerOnElement,
+                                                  int rank,
+                                                  int clientSize,
+                                                  const CArray<int,1>& axisDomainOrder,
+                                                  int positionDimensionDistributed = 1);
+
+    std::vector<std::vector<int> > getServerIndexBegin() const;
+    std::vector<std::vector<int> > getServerDimensionSizes() const;
+    const std::vector<CArray<size_t,1> >& getGlobalIndex() const;
+    const std::unordered_map<size_t,int>& getGlobalIndexRange() const;
+    int getDimensionDistributed();
+
+    static int defaultDistributedDimension(int gridDimension,                                   
+                                           ServerDistributionType serType=BAND_DISTRIBUTION);
+
+  protected:
+    int computeBandDistribution(int nServer, int positionDimensionDistributed = 1);
+    int computeRootDistribution(int nServer, int positionDimensionDistributed = 1);
+    void computePlanDistribution(int nServer);
+    void computeRangeProcIndex(int clientRank,
+                               int clientSize,
+                               int rangeProcSize,
+                               int& rangeBegin,
+                               int& rangeSize);
+
+  private:
+    std::vector<std::vector<int> > indexBegin_;     //!< Begin index of each dimension
+    std::vector<std::vector<int> > dimensionSizes_; //!< Size of each dimension
+    std::vector<int> nGlobal_; //!< Global size of each dimension
+
+    //!< General case, index describes distribution of each server (rarely use)
+    std::vector<CArray<size_t,1> > vecGlobalIndex_;
+
+    //!< In case we need only global index of one server with specific rank
+    std::unordered_map<size_t,int> globalIndex_;
+
+    //!< Type of distribution on server side
+    ServerDistributionType serverType_;
+
+    //!< Number of server
+    int nServer_;
+
+    //!< Position of dimension distributed on server side (by default, the second dimension)
+    int positionDimensionDistributed_;
+};
+
+} // namespace xios
+#endif // __XIOS_SERVER_DISTRIBUTION_DESCRIPTION_HPP
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/string_tools.hpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/string_tools.hpp	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/string_tools.hpp	(revision 1749)
@@ -0,0 +1,23 @@
+#ifndef __STRING_TOOLS_HPP__
+#define __STRING_TOOLS_HPP__
+
+#include <string>
+#include <regex>
+#include <vector>
+
+namespace xios
+{
+  std::vector<std::string> splitRegex(const std::string& input, const std::string& regex) ;
+
+  inline std::vector<std::string> splitRegex(const std::string& input, const std::string& regex)
+  {
+      // passing -1 as the submatch index parameter performs splitting
+      std::regex re(regex);
+      std::regex_token_iterator<std::string::const_iterator>
+          first{input.begin(), input.end(), re, -1},
+          last;
+      return {first, last}; 
+  }
+
+}
+#endif
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/test/diff.txt
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/test/diff.txt	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/test/diff.txt	(revision 1749)
@@ -0,0 +1,28 @@
+6c6
+< 
+---
+>   
+36c36
+< 
+---
+>   
+45c45
+< 
+---
+>   
+52,53c52,53
+<   div    = src_ni_glo/size
+<   remain = MOD( src_ni_glo, size )
+---
+>   div    = src_ni_glo/size 
+>   remain = MOD( src_ni_glo, size ) 
+60c60
+<   ENDIF
+---
+>   ENDIF  
+91,92c91,92
+<   CALL xios_set_domain_attr("src_domain",data_dim=1, data_ni=src_ni, data_i_index=src_data_i_index, data_n_index=src_ni)
+<   CALL xios_set_domain_attr("src_domain",lonvalue=src_lon,latvalue=src_lat, bounds_lon=src_boundslon, bounds_lat=src_boundslat, nvertex=src_nvertex)
+---
+>   CALL xios_set_domain_attr("src_domain",data_dim=1, data_ni=src_ni, data_i_index=src_data_i_index, data_n_index=src_ni, nvertex=src_nvertex)
+>   CALL xios_set_domain_attr("src_domain",lonvalue=src_lon,latvalue=src_lat, bounds_lon=src_boundslon, bounds_lat=src_boundslat)
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/test/parse_xml.f90
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/test/parse_xml.f90	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/test/parse_xml.f90	(revision 1749)
@@ -0,0 +1,13 @@
+PROGRAM parse_xml
+  USE, INTRINSIC :: ISO_C_BINDING
+  IMPLICIT NONE
+
+  INTERFACE
+    SUBROUTINE xios_init() BIND(C, name='cxios_init')
+    END SUBROUTINE
+  END INTERFACE
+
+  CALL xios_init() ! This will parse the XML file and report any parsing error
+  WRITE (*,*) 'Parsing finished successfully.'
+
+END PROGRAM parse_xml
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/test/test.cpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/test/test.cpp	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/test/test.cpp	(revision 1749)
@@ -0,0 +1,155 @@
+#include <iostream>
+#include <sstream>
+#include <string>
+
+#include <boost/date_time/gregorian/gregorian.hpp>
+#include <boost/date_time/posix_time/posix_time.hpp>
+#include "calendar_type.hpp"
+#include "date.hpp"
+#include "calendar_util.hpp"
+//#include "test_enum.hpp"
+#include "type.hpp"
+//#include "axis.hpp"
+//#include "field.hpp"
+#include "declare_attribute.hpp"
+#include "attribute_map.hpp"
+#include "array_new.hpp"
+#include "attribute_array.hpp"
+#include "attribute_array_impl.hpp"
+
+
+
+using namespace std ;
+using namespace boost::posix_time ;
+using namespace boost::gregorian ;
+using namespace xios;
+using namespace blitz;
+
+  class CEnum_color
+  {
+    public:
+    enum t_enum { rouge=0, vert, bleu} ;
+    static const char** getStr(void) { static const char * enumStr[] = { "rouge", "vert", "bleu" } ; return enumStr ; }   
+    int getSize(void) { return 3 ; }   
+  } ;
+
+#include "enum.hpp"
+#include "enum_impl.hpp"
+#include "enum_ref_impl.hpp"
+#include "attribute_enum.hpp"
+#include "attribute_enum_impl.hpp"
+
+template class CEnum<CEnum_color> ;
+template class CAttributeEnum<CEnum_color> ;
+
+
+int main(void)
+{
+//      ptime t(time_from_string("2012-02-30 15:24")) ;
+//      std::cout << to_simple_string(t) << std::endl;
+  CGregorianCalendar MyCalendar("2011-03-01 00:00") ;
+  cout<<MyCalendar.getInitDate()<<endl;
+  cout<<MyCalendar.getCurrentDate()<<endl ;
+  cout<<MyCalendar.getCurrentDate()-1*Day<<endl ;
+      
+  //CEnum<CEnum_color> MyEnum ;
+  //MyEnum.val=CEnum<CEnum_color>::rouge ;
+  
+  CEnum_color::t_enum y;
+  
+  CType<int> a(10) ;
+  CType<int> b ;
+  
+  a=5 ;
+  b=10.5 ;
+  a=a+b ;
+  cout<<a<<endl ;
+  if (a==5) cout<<"a que coucou"<<endl ;
+  else if (a!=5) cout<<"a que pas coucou"<<endl ;
+  
+  CType_ref<int> c(a);
+  cout<<c<<endl ;
+  a=3 ;
+  cout<<c<<endl ;
+//  c=b ;
+  cout<<c<<endl ;
+  b=4 ;
+  cout<<c<<endl ;
+  c.set_ref(b) ;
+  cout<<c<<endl ;
+  int x=c+c+a ;
+  cout<<x<<endl ;
+ 
+//  test::CAttributeTemplate<int> xx("toto") ;
+//  test::totoatt toto ;
+//  test::titiatt titi ;
+//  CAxis A ;
+//  CTest A ;
+//  CAxis B ;
+//    CField A ;
+//    cout<<xx.size()<<endl ;
+
+  CEnum<CEnum_color> color,color1 ;
+  color=CEnum<CEnum_color>::rouge ;
+  color1=color ;
+  
+  if (color1==CEnum<CEnum_color>::rouge) cout<<"Rouge !!"<<endl ;
+  if (color1==color) cout<<"Rouge !!"<<endl ;
+  color=CEnum<CEnum_color>::bleu ;
+ 
+  if (color1==color) cout<<"Rouge !!"<<endl ;
+  
+  cout<<color1.toString()<<endl ;
+  color1.fromString("vert ") ;
+  cout<<color1.toString()<<endl ;
+ 
+//  color1.fromString("jaune") ;
+  cout<<color1.toString()<<endl ;
+  cout<<sizeof(CEnum_color::t_enum)<<endl ; 
+  
+  CEnum_color::t_enum tt ;
+  tt=(CEnum_color::t_enum)1 ;
+  int ii=tt ;
+  cout<<ii<<endl ;
+  
+  CAttributeEnum<CEnum_color> toto("toto",CEnum_color::rouge) ;
+  CAttributeEnum<CEnum_color> titi("titi",CEnum_color::vert) ;
+  cout<<toto.toString()<<endl ;
+  toto.fromString(" vert  ") ;
+  cout<<toto.toString()<<endl ;
+
+  tt=toto ;
+  cout<<tt<<endl ;
+  cout<<titi.toString()<<endl ;
+  
+  if (titi==toto) cout<<"titi==toto"<<endl ;
+  else cout<<"titi!=toto"<<endl ;
+  titi=CEnum_color::rouge ;
+  if (titi==toto) cout<<"titi==toto"<<endl ;
+  else cout<<"titi!=toto"<<endl ;
+
+  CArray<int,2> A(2,2) ;
+  CArray<int,2> B(2,2) ;
+  A=1,2,3,4 ;
+  B = 1 ;
+  B+=A ;
+  cout<<B.toString()<<endl ;
+  cout<<A.toString()<<endl ;
+  string str="(0,1) x (0,1) [4 3 2 1]" ;
+  CArray<int,2> C ;
+  CBufferOut out(B.size()) ;
+  
+  B.toBuffer(out) ;
+  
+  CBufferIn in(out.begin,B.size()) ;
+  C.fromBuffer(in) ;
+  
+  cout<<C<<endl ; 
+  
+  CAttributeArray<int,2> attr("toto") ;
+  attr.resize(2,2) ;
+  attr=C ;
+  cout<<"attr "<<attr<<endl ;
+  cout<<attr.toString()<<endl ;
+  return 1 ;  
+}
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/test/test_basic_2D.f90
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/test/test_basic_2D.f90	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/test/test_basic_2D.f90	(revision 1749)
@@ -0,0 +1,152 @@
+PROGRAM test_basic_2D
+  USE xios
+  USE mod_wait
+  IMPLICIT NONE
+  INCLUDE "mpif.h"
+
+  TYPE(xios_duration)  :: dtime
+  TYPE(xios_context) :: ctx_hdl
+  INTEGER,PARAMETER :: ni_glo=100
+  INTEGER,PARAMETER :: nj_glo=100
+
+  INTEGER :: i,j,n,ts
+  INTEGER :: ibegin,jbegin,ni,nj,nbi,nbj,iend,jend
+  INTEGER :: ierr, rank, size
+  INTEGER :: comm
+
+  DOUBLE PRECISION,DIMENSION(ni_glo,nj_glo) :: lon_glo,lat_glo
+  DOUBLE PRECISION :: field_glo(ni_glo,nj_glo)
+  DOUBLE PRECISION,ALLOCATABLE :: lon(:,:),lat(:,:),field_domain(:,:), field_axis(:,:)
+
+  ! Initialize MPI
+  CALL MPI_INIT(ierr)
+
+  CALL init_wait
+
+  ! Initialize XIOS
+  CALL xios_initialize('client', return_comm=comm)
+
+  CALL MPI_COMM_SIZE(comm, size, ierr)
+  CALL MPI_COMM_RANK(comm, rank, ierr)
+
+  ! Initialize all global values
+  DO j=1,nj_glo
+    DO i=1,ni_glo
+      lon_glo(i,j)=(i-1)+(j-1)*ni_glo
+      lat_glo(i,j)=1000+(i-1)+(j-1)*ni_glo
+      field_glo(i,j)=(i-1)+(j-1)*ni_glo
+    ENDDO
+  ENDDO
+  ni=ni_glo ; ibegin=0
+
+  nbi = 1
+  ! Specify how we distributed domain
+  DO i=1,int(sqrt(real(size)))+1
+    IF (0 == MOD(size,i)) nbi = i
+  ENDDO
+  nbj = size/nbi
+
+  jbegin=0;
+  LOOP1: DO j=1,nbj
+    nj=nj_glo/nbj
+    if (nj<MOD(nj_glo,nbj)) nj=nj+1
+    ibegin=0
+    DO i=1,nbi
+      n=(j-1)*nbi+i-1
+      ni=ni_glo/nbi
+      if (ni<MOD(ni_glo,nbi)) ni=ni+1
+      IF (n==rank) exit LOOP1
+      IF (i/=nbi) ibegin=ibegin+ni
+    ENDDO
+    IF (j/=nbj) jbegin=jbegin+nj
+  ENDDO LOOP1
+  iend=ibegin+ni-1; jend=jbegin+nj-1
+
+!  if (rank == 0) print *, ni_glo, ni, nj_glo, nj
+  print *, ni, nj, ibegin, jbegin, iend, jend
+
+  ALLOCATE(lon(ni,nj),lat(ni,nj),field_domain(0:ni+1,-1:nj+2),field_axis(ni,nj))
+  lon(:,:)=lon_glo(ibegin+1:iend+1,jbegin+1:jend+1)
+  lat(:,:)=lat_glo(ibegin+1:iend+1,jbegin+1:jend+1)
+  field_domain(1:ni,1:nj)=field_glo(ibegin+1:iend+1,jbegin+1:jend+1)
+  field_axis(1:ni,1:nj)=field_glo(ibegin+1:iend+1,jbegin+1:jend+1)
+
+  ! Test 2-dimension domain
+  ! Initialize the context
+  CALL xios_context_initialize('test_domain', comm)
+  CALL xios_get_handle('test_domain', ctx_hdl)
+  CALL xios_set_current_context(ctx_hdl)
+
+  CALL xios_define_calendar(type="Gregorian", &
+                            start_date=xios_date(2000, 01, 01, 00, 00, 00), &
+                            time_origin=xios_date(1999, 01, 01, 15, 00, 00))
+
+  CALL xios_set_domain_attr("domain",ni_glo=ni_glo, nj_glo=nj_glo, ibegin=ibegin, ni=ni,jbegin=jbegin,nj=nj, type='curvilinear')
+  CALL xios_set_domain_attr("domain",data_dim=2, data_ibegin=-1, data_ni=ni+2, data_jbegin=-2, data_nj=nj+4)
+  CALL xios_set_domain_attr("domain",lonvalue_2D=lon,latvalue_2D=lat)
+
+  CALL xios_get_domain_attr("domain",lonvalue_2D=lon)
+!  PRINT *,"lonvalue",lon
+
+  dtime%second=3600
+  CALL xios_set_timestep(timestep=dtime)
+  ! Close domain context
+  CALL xios_close_context_definition()
+
+  !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+  ! Test 2-dimension grid composed of 2 distributed axis
+  ! Initialize the context
+  CALL xios_context_initialize('test_axis', comm)
+  CALL xios_get_handle('test_axis', ctx_hdl)
+  CALL xios_set_current_context(ctx_hdl)
+
+  CALL xios_define_calendar(type="Gregorian", &
+                            start_date=xios_date(2000, 01, 01, 00, 00, 00), &
+                            time_origin=xios_date(1999, 01, 01, 15, 00, 00))
+
+  CALL xios_set_axis_attr("x", n_glo=ni_glo, n=ni, begin=ibegin, value=(/(real(i,kind=8), i=ibegin,ibegin+ni-1)/))
+  CALL xios_set_axis_attr("y", n_glo=nj_glo, n=nj, begin=jbegin, value=(/(real(i,kind=8), i=jbegin,jbegin+nj-1)/))
+
+  dtime%second=3600
+  CALL xios_set_timestep(timestep=dtime)
+
+  ! Close axis context
+  CALL xios_close_context_definition()
+
+  DO ts=1,24*10
+    ! Domain context
+    CALL xios_get_handle("test_domain",ctx_hdl)
+    CALL xios_set_current_context(ctx_hdl)
+    CALL xios_update_calendar(ts)
+    CALL xios_send_field("field_domain_1",field_domain)
+    CALL xios_send_field("field_domain_2",field_domain)
+
+    ! Switch to axis context
+    CALL xios_get_handle("test_axis",ctx_hdl)
+    CALL xios_set_current_context(ctx_hdl)
+    CALL xios_update_calendar(ts)
+    CALL xios_send_field("field_axis",field_axis)
+
+    CALL wait_us(500) ;
+  ENDDO
+
+  ! Clean-ups
+  CALL xios_get_handle("test_domain",ctx_hdl)
+  CALL xios_set_current_context(ctx_hdl)
+  CALL xios_context_finalize()
+  CALL xios_get_handle("test_axis",ctx_hdl)
+  CALL xios_set_current_context(ctx_hdl)
+  CALL xios_context_finalize()
+
+  DEALLOCATE(lon, lat, field_domain, field_axis)
+
+  CALL MPI_COMM_FREE(comm, ierr)
+  CALL xios_finalize()
+  CALL MPI_FINALIZE(ierr)
+
+END PROGRAM test_basic_2D
+
+
+
+
+
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/test/test_client.f90
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/test/test_client.f90	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/test/test_client.f90	(revision 1749)
@@ -0,0 +1,159 @@
+PROGRAM test_client
+
+  USE xios
+  USE mod_wait
+  IMPLICIT NONE
+  INCLUDE "mpif.h"
+  INTEGER :: rank
+  INTEGER :: size
+  INTEGER :: ierr
+
+  CHARACTER(len=*),PARAMETER :: id="client"
+  INTEGER :: comm
+  TYPE(xios_duration) :: dtime
+  CHARACTER(len=20) :: dtime_str
+  TYPE(xios_date) :: date
+  CHARACTER(len=20) :: date_str
+  CHARACTER(len=15) :: calendar_type
+  TYPE(xios_context) :: ctx_hdl
+  INTEGER,PARAMETER :: ni_glo=100
+  INTEGER,PARAMETER :: nj_glo=100
+  INTEGER,PARAMETER :: llm=5
+  DOUBLE PRECISION  :: lval(llm)=1, scalar = 5
+  TYPE(xios_field) :: field_hdl
+  TYPE(xios_fieldgroup) :: fieldgroup_hdl
+  TYPE(xios_file) :: file_hdl
+  LOGICAL :: ok
+
+  DOUBLE PRECISION,DIMENSION(ni_glo,nj_glo) :: lon_glo,lat_glo
+  DOUBLE PRECISION :: field_A_glo(ni_glo,nj_glo,llm)
+  DOUBLE PRECISION,ALLOCATABLE :: lon(:,:),lat(:,:),field_A(:,:,:), lonvalue(:,:), axisValue(:), field_domain(:,:) ;
+  INTEGER :: ni,ibegin,iend,nj,jbegin,jend
+  INTEGER :: i,j,l,ts,n
+
+!!! MPI Initialization
+
+  CALL MPI_INIT(ierr)
+
+  CALL init_wait
+
+!!! XIOS Initialization (get the local communicator)
+
+  CALL xios_initialize(id,return_comm=comm)
+
+  CALL MPI_COMM_RANK(comm,rank,ierr)
+  CALL MPI_COMM_SIZE(comm,size,ierr)
+
+  DO j=1,nj_glo
+    DO i=1,ni_glo
+      lon_glo(i,j)=(i-1)+(j-1)*ni_glo
+      lat_glo(i,j)=1000+(i-1)+(j-1)*ni_glo
+      DO l=1,llm
+        field_A_glo(i,j,l)=(i-1)+(j-1)*ni_glo*100+10000*l
+      ENDDO
+    ENDDO
+  ENDDO
+  ni=ni_glo ; ibegin=0
+
+  jbegin=0
+  DO n=0,size-1
+    nj=nj_glo/size
+    IF (n<MOD(nj_glo,size)) nj=nj+1
+    IF (n==rank) exit
+    jbegin=jbegin+nj
+  ENDDO
+
+  iend=ibegin+ni-1 ; jend=jbegin+nj-1
+
+  ALLOCATE(lon(ni,nj),lat(ni,nj),field_A(0:ni+1,-1:nj+2,llm),lonvalue(ni,nj), axisValue(nj_glo), field_domain(0:ni+1,-1:nj+2))
+  lon(:,:)=lon_glo(ibegin+1:iend+1,jbegin+1:jend+1)
+  lat(:,:)=lat_glo(ibegin+1:iend+1,jbegin+1:jend+1)
+  field_A(1:ni,1:nj,:)=field_A_glo(ibegin+1:iend+1,jbegin+1:jend+1,:)
+  field_domain(1:ni,1:nj) = field_A_glo(ibegin+1:iend+1,jbegin+1:jend+1,1)
+  axisValue(1:nj_glo)=field_A_glo(1,1:nj_glo,1);
+
+  CALL xios_context_initialize("test",comm)
+  CALL xios_get_handle("test",ctx_hdl)
+  CALL xios_set_current_context(ctx_hdl)
+
+  CALL xios_get_calendar_type(calendar_type)
+  PRINT *, "calendar_type = ", calendar_type
+
+  ! CALL xios_set_axis_attr("axis_A",n_glo=nj_glo ,value=axisValue, n=nj, begin=jbegin) ;
+  CALL xios_set_axis_attr("axis_A",n_glo=llm ,value=lval) ;
+  CALL xios_set_domain_attr("domain_A",ni_glo=ni_glo, nj_glo=nj_glo, ibegin=ibegin, ni=ni,jbegin=jbegin,nj=nj,type='curvilinear')
+  CALL xios_set_domain_attr("domain_A",data_dim=2, data_ibegin=-1, data_ni=ni+2, data_jbegin=-2, data_nj=nj+4)
+  CALL xios_set_domain_attr("domain_A",lonvalue_2D=lon,latvalue_2D=lat)
+  CALL xios_set_fieldgroup_attr("field_definition",enabled=.TRUE.)
+
+  !CALL xios_get_handle("field_definition",fieldgroup_hdl)
+  !CALL xios_add_child(fieldgroup_hdl,field_hdl,"field_B")
+  !CALL xios_set_attr(field_hdl,field_ref="field_A",name="field_B")
+
+  !CALL xios_get_handle("output",file_hdl)
+  !CALL xios_add_child(file_hdl,field_hdl)
+  !CALL xios_set_attr(field_hdl,field_ref="field_A_zoom",name="field_C")
+
+  dtime%second = 3600
+  CALL xios_set_timestep(dtime)
+
+  ! The calendar is created as soon as the calendar type is defined. This way
+  ! calendar operations can be used before the context definition is closed
+  CALL xios_get_time_origin(date)
+  PRINT *, "--> year length = ", xios_get_year_length_in_seconds(date%year)
+  PRINT *, "--> day length = ", xios_get_day_length_in_seconds()
+  CALL xios_date_convert_to_string(date, date_str)
+  PRINT *, "time_origin = ", date_str
+  PRINT *, "xios_date_get_second_of_year(time_origin) = ", xios_date_get_second_of_year(date)
+  PRINT *, "xios_date_get_day_of_year(time_origin) = ", xios_date_get_day_of_year(date)
+  PRINT *, "xios_date_get_fraction_of_year(time_origin) = ", xios_date_get_fraction_of_year(date)
+  PRINT *, "xios_date_get_second_of_day(time_origin) = ", xios_date_get_second_of_day(date)
+  PRINT *, "xios_date_get_fraction_of_day(time_origin) = ", xios_date_get_fraction_of_day(date)
+  dtime%timestep = 1
+  dtime = 0.5 * dtime
+  CALL xios_duration_convert_to_string(dtime, dtime_str)
+  PRINT *, "duration = ", dtime_str
+  date = date + 3 * (dtime + dtime)
+  CALL xios_date_convert_to_string(date, date_str)
+  PRINT *, "date = time_origin + 3 * (duration + duration) = ", date_str
+  PRINT *, "xios_date_convert_to_seconds(date) = ", xios_date_convert_to_seconds(date)
+  PRINT *, "xios_date_convert_to_seconds(date - 2.5h) = ", xios_date_convert_to_seconds(date - 2.5 * xios_hour)
+
+  ni=0 ; lonvalue(:,:)=0;
+  CALL xios_get_domain_attr("domain_A",ni=ni,lonvalue_2D=lonvalue)
+
+  print *,"ni",ni
+  print *,"lonvalue",lonvalue;
+
+  CALL xios_is_defined_field_attr("field_A",enabled=ok)
+  PRINT *,"field_A : attribute enabled is defined ? ",ok
+  CALL xios_close_context_definition()
+
+  PRINT*,"field field_A is active ? ",xios_field_is_active("field_A")
+  ! CALL xios_recv_field("field", scalar)
+  DO ts=1,4
+    CALL xios_update_calendar(ts)
+    CALL xios_send_field("field_A",field_A)
+    CALL xios_send_field("field_Axis",axisValue)
+    ! CALL xios_send_field("field_Axis",lval)
+    CALL xios_send_field("field_Domain",field_domain)
+    CALL xios_send_field("field_Scalar",scalar)
+    CALL wait_us(5000) ;
+  ENDDO
+
+  CALL xios_context_finalize()
+
+  DEALLOCATE(lon, lat, field_A, lonvalue)
+
+  CALL MPI_COMM_FREE(comm, ierr)
+
+  CALL xios_finalize()
+
+  CALL MPI_FINALIZE(ierr)
+
+END PROGRAM test_client
+
+
+
+
+
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/test/test_complete.f90
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/test/test_complete.f90	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/test/test_complete.f90	(revision 1749)
@@ -0,0 +1,279 @@
+PROGRAM test_complete
+
+  USE xios
+  USE mod_wait
+  IMPLICIT NONE
+  INCLUDE "mpif.h"
+  INTEGER :: rank
+  INTEGER :: size_loc
+  INTEGER :: ierr
+
+  CHARACTER(len=*),PARAMETER :: id="client"
+  INTEGER :: comm
+  TYPE(xios_duration)  :: dtime
+  TYPE(xios_context) :: ctx_hdl
+  INTEGER,PARAMETER :: ni_glo=100
+  INTEGER,PARAMETER :: nj_glo=100
+  INTEGER,PARAMETER :: llm=5
+  DOUBLE PRECISION  :: lval(llm)=1
+  TYPE(xios_field) :: field_hdl
+  TYPE(xios_fieldgroup) :: fieldgroup_hdl
+  TYPE(xios_file) :: file_hdl
+  LOGICAL :: ok
+  CHARACTER(len=256) :: crname
+
+  DOUBLE PRECISION,DIMENSION(ni_glo,nj_glo) :: lon_glo,lat_glo
+  DOUBLE PRECISION :: field_A_glo(ni_glo,nj_glo,llm)
+  DOUBLE PRECISION,ALLOCATABLE :: lon(:,:),lat(:,:),field_A_atm(:,:,:), field_A_srf(:,:), lonvalue(:,:)
+  INTEGER, ALLOCATABLE :: kindex(:)
+  INTEGER :: ni,ibegin,iend,nj,jbegin,jend
+  INTEGER :: i,j,l,ts,n, nb_pt
+
+!!! MPI Initialization
+
+  CALL MPI_INIT(ierr)
+
+  CALL init_wait
+
+!!! XIOS Initialization (get the local communicator)
+
+  CALL xios_initialize(id,return_comm=comm)
+
+  CALL MPI_COMM_RANK(comm,rank,ierr)
+  CALL MPI_COMM_SIZE(comm,size_loc,ierr)
+
+
+!###########################################################################
+! Contexte ATM
+!###########################################################################
+
+!!! Initialisation des coordonnÃ©es globales et locales pour la grille rÃ©guliÃšre
+
+  DO j=1,nj_glo
+    DO i=1,ni_glo
+      lon_glo(i,j)=(i-1)+(j-1)*ni_glo
+      lat_glo(i,j)=1000+(i-1)+(j-1)*ni_glo
+      DO l=1,llm
+        field_A_glo(i,j,l)=(i-1)+(j-1)*ni_glo+10000*l
+      ENDDO
+    ENDDO
+  ENDDO
+  ni=ni_glo ; ibegin=0
+
+  jbegin=0
+  DO n=0,size_loc-1
+    nj=nj_glo/size_loc
+    IF (n<MOD(nj_glo,size_loc)) nj=nj+1
+    IF (n==rank) exit
+    jbegin=jbegin+nj
+  ENDDO
+
+  iend=ibegin+ni-1 ; jend=jbegin+nj-1
+
+  ALLOCATE(lon(ni,nj),lat(ni,nj),field_A_atm(0:ni+1,-1:nj+2,llm),lonvalue(ni,nj))
+  lon(:,:)=lon_glo(ibegin+1:iend+1,jbegin+1:jend+1)
+  lat(:,:)=lat_glo(ibegin+1:iend+1,jbegin+1:jend+1)
+  field_A_atm(1:ni,1:nj,:)=field_A_glo(ibegin+1:iend+1,jbegin+1:jend+1,:)
+
+
+!!! Context ATMOSPHERE
+
+  CALL xios_context_initialize("atmosphere",comm)
+  CALL xios_get_handle("atmosphere",ctx_hdl)
+  CALL xios_set_current_context(ctx_hdl)
+
+  CALL xios_define_calendar(type="Gregorian", &
+                            start_date=xios_date(2000, 01, 01, 00, 00, 00), &
+                            time_origin=xios_date(1999, 01, 01, 15, 00, 00))
+
+  CALL xios_set_axis_attr("axis_atm",n_glo=llm ,value=lval) ;
+!  CALL xios_set_zoom_axis_attr("axis_atm_zoom",n=2);
+
+  CALL xios_set_domain_attr("domain_atm",ni_glo=ni_glo, nj_glo=nj_glo, ibegin=ibegin, ni=ni,jbegin=jbegin,nj=nj, type='curvilinear')
+  CALL xios_set_domain_attr("domain_atm",data_dim=2, data_ibegin=-1, data_ni=ni+2, data_jbegin=-2, data_nj=nj+4)
+  CALL xios_set_domain_attr("domain_atm",lonvalue_2D=lon,latvalue_2D=lat)
+
+  CALL xios_set_domain_attr("domain_atm_zoom",ni_glo=ni_glo, nj_glo=nj_glo, ibegin=ibegin, ni=ni,jbegin=jbegin,nj=nj)
+  CALL xios_set_domain_attr("domain_atm_zoom",data_dim=2, data_ibegin=-1, data_ni=ni+2, data_jbegin=-2, data_nj=nj+4)
+  CALL xios_set_domain_attr("domain_atm_zoom",lonvalue_2D=lon,latvalue_2D=lat)
+!  CALL xios_set_zoom_domain_attr("domain_atm_zoom",ibegin=39, ni=20, jbegin=39, nj=5)
+
+!!! Activation du groupe field_definition
+
+  CALL xios_set_fieldgroup_attr("field_definition",enabled=.TRUE.)
+
+!!! CrÃ©ation d un nouveau champ
+
+  CALL xios_get_handle("field_definition",fieldgroup_hdl)
+  CALL xios_add_child(fieldgroup_hdl,field_hdl,"field_B_atm")
+
+!!! Heritage des attributs d un autre champ
+
+  CALL xios_set_attr(field_hdl,field_ref="field_A_atm_zoom",name="field_B_atm")
+
+!!! Affectation de ce nouveau champ au fichier avec un nouveau nom
+
+  CALL xios_get_handle("output_atmosphere",file_hdl)
+  CALL xios_add_child(file_hdl,field_hdl)
+  CALL xios_set_attr(field_hdl,field_ref="field_B_atm",name="field_C_atm")
+
+!!! Definition du timestep
+
+  dtime%second=3600
+  CALL xios_set_timestep(timestep=dtime)
+
+!!! Recupration des valeurs des longitudes et de taille des domaines locaux (pour test de fonctionnalitÃ©)
+
+  ni=0 ; lonvalue(:,:)=0
+  CALL xios_get_domain_attr("domain_atm",ni=ni,lonvalue_2D=lonvalue)
+
+  PRINT *,"ni",ni
+  PRINT *,"lonvalue",lonvalue;
+
+!!! Fin de la definition du contexte
+
+  CALL xios_close_context_definition()
+
+!!! Test des valeurs des champs/fichiers
+
+  !!! Attribut defini ?
+
+  CALL xios_is_defined_field_attr("field_A_atm",enabled=ok)
+  PRINT *,"field_A_atm : attribute enabled is defined ? ",ok
+
+  !!! Recuperer la valeur d un attribut
+
+  CALL xios_get_field_attr("field_A_atm",name=crname)
+  PRINT *,"field_A_atm : attribute name is : ",TRIM(crname)
+
+  !!! Champ actif (besoin de fournir la valeur) ?
+
+    PRINT*,"field field_A_atm is active ? ",xios_field_is_active("field_A_atm")
+
+  !!! Champ defini ?
+
+    PRINT*,"field field_A_atm is valid ?",xios_is_valid_field("field_A_atm")
+
+
+!###########################################################################
+! Contexte SRF
+!###########################################################################
+
+!!! Initialisation des coordonnÃ©es globales et locales pour la grille indexee (1 point sur 2)
+
+    nb_pt=ni*nj/2
+    ALLOCATE(kindex(nb_pt),field_A_srf(nb_pt,llm))
+    DO i=1,nb_pt
+      kindex(i)=2*i-1
+    ENDDO
+    field_A_srf(1:nb_pt,:)=RESHAPE(field_A_glo(ibegin+1:iend+1:2,jbegin+1:jend+1,:),(/ nb_pt,llm /))
+
+  CALL xios_context_initialize("surface",comm)
+  CALL xios_get_handle("surface",ctx_hdl)
+  CALL xios_set_current_context(ctx_hdl)
+
+  CALL xios_define_calendar(type="Gregorian", &
+                            start_date=xios_date(2000, 01, 01, 00, 00, 00), &
+                            time_origin=xios_date(1999, 01, 01, 15, 00, 00))
+
+  CALL xios_set_axis_attr("axis_srf",n_glo=llm ,value=lval)
+  CALL xios_set_domain_attr("domain_srf",ni_glo=ni_glo, nj_glo=nj_glo, ibegin=ibegin, ni=ni,jbegin=jbegin,nj=nj, type='curvilinear')
+  CALL xios_set_domain_attr("domain_srf",data_dim=1, data_ibegin=0, data_ni=nb_pt)
+  CALL xios_set_domain_attr("domain_srf",data_i_index=kindex)
+  CALL xios_set_domain_attr("domain_srf",lonvalue_2D=lon,latvalue_2D=lat)
+
+!!! CrÃ©ation d un nouveau champ
+
+  CALL xios_get_handle("field_definition",fieldgroup_hdl)
+  CALL xios_add_child(fieldgroup_hdl,field_hdl,"field_B_srf")
+
+!!! Heritage des attributs d un autre champ
+
+  CALL xios_set_attr(field_hdl,field_ref="field_A_srf",name="field_B_srf")
+
+!!! Affectation de ce nouveau champ au fichier avec un nouveau nom
+
+  CALL xios_get_handle("output_surface",file_hdl)
+  CALL xios_add_child(file_hdl,field_hdl)
+  CALL xios_set_attr(field_hdl,field_ref="field_B_srf",name="field_C_srf")
+
+!!! Definition du timestep
+
+  dtime%second=1800
+  CALL xios_set_timestep(timestep=dtime)
+
+!!! Recupration des valeurs des longitudes et de taille des domaines locaux (pour test de fonctionnalitÃ©)
+
+  ni=0 ; lonvalue(:,:)=0
+  CALL xios_get_domain_attr("domain_srf",ni=ni,lonvalue_2D=lonvalue)
+
+  PRINT *,"ni",ni
+  PRINT *,"lonvalue",lonvalue ;
+
+!!! Fin de la definition du contexte SRF
+
+  CALL xios_close_context_definition()
+
+
+!####################################################################################
+!!! Boucle temporelle
+!####################################################################################
+
+    DO ts=1,24*10
+
+      CALL xios_get_handle("atmosphere",ctx_hdl)
+      CALL xios_set_current_context(ctx_hdl)
+
+!!! Mise a jour du pas de temps
+
+      CALL xios_update_calendar(ts)
+
+!!! On donne la valeur du champ atm
+
+      CALL xios_send_field("field_A_atm",field_A_atm)
+
+!!! On change de contexte
+
+      CALL xios_get_handle("surface",ctx_hdl)
+      CALL xios_set_current_context(ctx_hdl)
+
+!!! Mise a jour du pas de temps
+
+      CALL xios_update_calendar(ts)
+
+!!! On donne la valeur du champ srf
+
+      CALL xios_send_field("field_A_srf",field_A_srf)
+
+      CALL wait_us(5000) ;
+    ENDDO
+
+!####################################################################################
+!!! Finalisation
+!####################################################################################
+
+!!! Fin des contextes
+
+    CALL xios_context_finalize()
+    CALL xios_get_handle("atmosphere",ctx_hdl)
+    CALL xios_set_current_context(ctx_hdl)
+    CALL xios_context_finalize()
+
+    DEALLOCATE(lon, lat, field_A_atm, lonvalue)
+    DEALLOCATE(kindex, field_A_srf)
+
+!!! Fin de XIOS
+
+    CALL MPI_COMM_FREE(comm, ierr)
+
+    CALL xios_finalize()
+
+    CALL MPI_FINALIZE(ierr)
+
+  END PROGRAM test_complete
+
+
+
+
+
+
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/test/test_cs.f90
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/test/test_cs.f90	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/test/test_cs.f90	(revision 1749)
@@ -0,0 +1,164 @@
+PROGRAM test_cs
+IMPLICIT NONE
+  INCLUDE "mpif.h"
+  INTEGER :: rank
+  INTEGER :: size
+  INTEGER :: ierr
+
+  CALL MPI_INIT(ierr)
+  CALL MPI_COMM_RANK(MPI_COMM_WORLD,rank,ierr)
+  CALL MPI_COMM_SIZE(MPI_COMM_WORLD,size,ierr)
+
+  IF (rank<11) THEN
+   CALL client("client",rank,11)
+  ELSE
+    CALL server
+  ENDIF
+
+
+  CALL MPI_FINALIZE(ierr)
+
+END PROGRAM test_cs
+
+  SUBROUTINE client(id,rank,size)
+  USE xios
+  USE mod_wait
+  IMPLICIT NONE
+  INCLUDE 'mpif.h'
+  CHARACTER(len=*) :: id
+  INTEGER :: rank
+  INTEGER :: size
+  INTEGER :: comm
+  TYPE(xios_duration) :: dtime
+  TYPE(xios_context) :: ctx_hdl
+  INTEGER,PARAMETER :: ni_glo=100
+  INTEGER,PARAMETER :: nj_glo=100
+  INTEGER,PARAMETER :: llm=3
+  DOUBLE PRECISION  :: lval(llm)=(/1.0,2.0,3.0/)
+  TYPE(xios_field) :: field_hdl
+  TYPE(xios_fieldgroup) :: fieldgroup_hdl
+  TYPE(xios_file) :: file_hdl
+
+
+  DOUBLE PRECISION,DIMENSION(ni_glo,nj_glo) :: lon_glo,lat_glo
+  DOUBLE PRECISION :: field_A_glo(ni_glo,nj_glo,llm)
+  DOUBLE PRECISION,ALLOCATABLE :: lon(:),lat(:),field_A(:,:), lonvalue(:) ;
+  LOGICAL,ALLOCATABLE :: mask(:,:)
+  INTEGER :: ni,ibegin,iend,nj,jbegin,jend,data_ibegin,data_ni
+  INTEGER :: i,j,k,l,ts,n,nij_begin
+
+
+  CALL init_wait
+
+
+  DO j=1,nj_glo
+    DO i=1,ni_glo
+      lon_glo(i,j)=(i-1)+(j-1)*ni_glo
+      lat_glo(i,j)=1000+(i-1)+(j-1)*ni_glo
+      DO l=1,llm
+        field_A_glo(i,j,l)=(i-1)+(j-1)*ni_glo+10000*l
+      ENDDO
+    ENDDO
+  ENDDO
+  ni=ni_glo ; ibegin=1
+
+
+  nij_begin=1
+  DO n=0,size-1
+    data_ni=(ni_glo*nj_glo)/size
+    IF (n < MOD (ni_glo*nj_glo,size)) data_ni=data_ni+1
+    IF (n==rank) THEN
+      ibegin=1 ; iend=ni_glo ; ni=iend-ibegin+1
+      jbegin=(nij_begin-1)/ni_glo +1
+      jend=MOD(nij_begin-1 + data_ni-1,ni_glo) +1
+      nj = jend-jbegin+1
+      data_ibegin=MOD(nij_begin-1,ni_glo)
+      exit
+    ELSE
+      nij_begin=nij_begin+data_ni
+    ENDIF
+  ENDDO
+
+
+  ALLOCATE(lon(ni),lat(nj),field_A(data_ni,llm),lonvalue(ni*nj))
+  ALLOCATE(mask(ni,nj))
+  lon(:)=lon_glo(ibegin:iend,1)
+  lat(:)=lat_glo(1,jbegin:jend)
+
+  DO k=1,data_ni
+    n=k-1+(jbegin-1)*ni_glo+data_ibegin
+    i=MOD(n,ni_glo)+1
+    j=n/ni_glo+1
+    field_A(k,:)=field_A_glo(i,j,:)
+  ENDDO
+
+  mask(:,:)=.TRUE.
+  mask(1:ni,6)=.TRUE.
+
+
+  CALL xios_initialize(id,return_comm=comm)
+
+  CALL xios_context_initialize("test",comm)
+  CALL xios_get_handle("test",ctx_hdl)
+  CALL xios_set_current_context(ctx_hdl)
+
+! CALL xios_define_calendar(type="Gregorian")
+! CALL xios_set_start_date(start_date=xios_date(2000, 01, 01, 00, 00, 00))
+  CALL xios_set_axis_attr("axis_A",size=llm ,value=lval) ;
+  CALL xios_set_domain_attr("domain_A",ni_glo=ni_glo, nj_glo=nj_glo, ibegin=ibegin, iend=iend,jbegin=jbegin,jend=jend)
+! CALL xios_set_domain_attr("domain_A",zoom_ni=10,zoom_ibegin=5,zoom_nj=nj_glo,zoom_jbegin=1)
+  CALL xios_set_domain_attr("domain_A",data_dim=1, data_ibegin=data_ibegin, data_ni=data_ni)
+  CALL xios_set_domain_attr("domain_A",lonvalue=lon,latvalue=lat)
+! CALL xios_set_domain_attr("domain_A",mask=mask)
+  CALL xios_set_fieldgroup_attr("field_definition",enabled=.TRUE.)
+
+  CALL xios_get_handle("field_definition",fieldgroup_hdl)
+  CALL xios_add_child(fieldgroup_hdl,field_hdl,"field_B")
+  CALL xios_set_attr(field_hdl,field_ref="field_A",name="field_B")
+
+  CALL xios_get_handle("output",file_hdl)
+  CALL xios_add_child(file_hdl,field_hdl)
+  CALL xios_set_attr(field_hdl,field_ref="field_A",name="field_C")
+
+
+    dtime%second=3600
+    CALL xios_set_timestep(timestep=dtime)
+
+!    ni=0 ; lonvalue(:)=0
+!    CALL xios_get_domain_attr("domain_A",ni=ni,lonvalue=lonvalue)
+
+!    print *,"ni",ni
+!    print *,"lonvalue",lonvalue ;
+
+    CALL xios_close_context_definition()
+
+    PRINT*,"field field_A is active ? ",xios_field_is_active("field_A")
+    DO ts=1,24*10
+      CALL xios_update_calendar(ts)
+      CALL xios_send_field("field_A",field_A)
+      CALL wait_us(5000) ;
+    ENDDO
+
+    CALL xios_context_finalize()
+
+    DEALLOCATE(lon, lat, field_A, lonvalue)
+    DEALLOCATE(mask)
+
+    CALL MPI_COMM_FREE(comm, ierr)
+
+    CALL xios_finalize()
+
+  END SUBROUTINE client
+
+
+
+  SUBROUTINE server
+  USE xios
+  IMPLICIT NONE
+
+    CALL xios_init_server
+
+  END SUBROUTINE server
+
+
+
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/test/test_diurnal_cycle.f90
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/test/test_diurnal_cycle.f90	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/test/test_diurnal_cycle.f90	(revision 1749)
@@ -0,0 +1,101 @@
+PROGRAM test_diurnal_cycle
+
+  USE xios
+  USE mod_wait
+  IMPLICIT NONE
+  INCLUDE "mpif.h"
+  INTEGER :: rank
+  INTEGER :: size
+  INTEGER :: ierr
+
+  CHARACTER(len=*),PARAMETER :: id="client"
+  INTEGER :: comm
+  TYPE(xios_duration) :: dtime
+  TYPE(xios_context) :: ctx_hdl
+  INTEGER,PARAMETER :: llm=10
+  DOUBLE PRECISION  :: value_glo(0:llm-1)
+  DOUBLE PRECISION,ALLOCATABLE :: axisValue(:)
+  DOUBLE PRECISION,ALLOCATABLE :: field_A(:,:)
+  INTEGER :: i,j,l,ts,nl,begin
+
+!!! MPI Initialization
+
+  CALL MPI_INIT(ierr)
+  CALL MPI_COMM_RANK(MPI_COMM_WORLD,rank,ierr)
+  
+  IF (rank>3) THEN 
+    CALL xios_init_server
+  ELSE
+  
+  CALL init_wait
+
+!!! XIOS Initialization (get the local communicator)
+
+  CALL xios_initialize(id,return_comm=comm)
+
+  CALL MPI_COMM_RANK(comm,rank,ierr)
+  CALL MPI_COMM_SIZE(comm,size,ierr)
+
+  CALL xios_context_initialize("test",comm)
+  CALL xios_get_handle("test",ctx_hdl)
+  CALL xios_set_current_context(ctx_hdl)
+
+  nl=llm/size
+  
+  IF (rank<MOD(llm,size)) THEN 
+    nl=nl+1
+    begin=rank*nl
+  ELSE
+    begin=(nl+1)*MOD(llm,size) + nl*(rank-MOD(llm,size))
+  ENDIF
+  DO i=0,llm-1
+    value_glo(i)=i
+  ENDDO
+
+
+  IF (rank==0) THEN
+    begin=0 ; nl=6
+  ELSE IF (rank==1) THEN
+    begin=0 ; nl=6
+  ELSE IF (rank==2) THEN
+    begin=0 ; nl=6
+  ELSE IF (rank==3) THEN
+    begin=6 ; nl=4
+  ENDIF
+
+  ALLOCATE(axisValue(0:nl-1))
+  ALLOCATE(field_A(0:nl-1,0:llm-1))
+  axisValue(:)=value_glo(begin:begin+nl-1)
+  DO i=0,llm-1
+    field_A(:,i)=10*i+value_glo(begin:begin+nl-1)
+  ENDDO
+  
+  CALL xios_set_axis_attr("axis_A",n_glo=llm , begin=begin, n=nl,value=axisValue) ;
+
+  dtime%second = 3600
+  CALL xios_set_timestep(dtime)
+  CALL xios_close_context_definition()
+ 
+  DO ts=1,8
+    CALL xios_update_calendar(ts)
+    CALL xios_send_field("field_A",field_A(:,:))
+    field_A=field_A+100
+    CALL wait_us(5000) ;
+  ENDDO
+
+  CALL xios_context_finalize()
+
+  CALL MPI_COMM_FREE(comm, ierr)
+
+  CALL xios_finalize()
+  
+  ENDIF
+  
+  CALL MPI_FINALIZE(ierr)
+
+END PROGRAM test_diurnal_cycle
+
+
+
+
+
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/test/test_new_features.f90
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/test/test_new_features.f90	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/test/test_new_features.f90	(revision 1749)
@@ -0,0 +1,249 @@
+PROGRAM test_new_features
+
+  USE xios
+  USE mod_wait
+  IMPLICIT NONE
+  INCLUDE "mpif.h"
+  INTEGER :: rank
+  INTEGER :: size
+  INTEGER :: ierr
+
+  CHARACTER(len=*),PARAMETER :: id="client"
+  INTEGER :: comm
+  TYPE(xios_duration) :: dtime
+  TYPE(xios_date) :: date
+  CHARACTER(len=15) :: calendar_type
+  TYPE(xios_context) :: ctx_hdl
+  INTEGER,PARAMETER :: ni_glo=100
+  INTEGER,PARAMETER :: nj_glo=100
+  INTEGER,PARAMETER :: llm=10
+  INTEGER,PARAMETER :: llmInterPolated=4
+  DOUBLE PRECISION  :: lval(llm)=1, tsTemp, lvalInterPolated(llmInterPolated)=1, nlev(nj_glo)=10
+  TYPE(xios_field) :: field_hdl
+  TYPE(xios_fieldgroup) :: fieldgroup_hdl
+  TYPE(xios_file) :: file_hdl
+  LOGICAL :: ok
+  LOGICAL,ALLOCATABLE :: mask_glo(:),mask(:)
+
+  DOUBLE PRECISION,DIMENSION(ni_glo,nj_glo) :: lon_glo,lat_glo
+  DOUBLE PRECISION,DIMENSION(4,ni_glo,nj_glo) :: bnds_lon_glo, bnds_lat_glo
+  DOUBLE PRECISION :: field_A_glo(ni_glo,nj_glo,llm), lval_ni_glo(ni_glo), lval_nj_glo(nj_glo), field_Value_glo(ni_glo,nj_glo,llm)
+  DOUBLE PRECISION,ALLOCATABLE :: lon(:,:),lat(:,:),field_A(:,:,:), field_A_2D(:,:), field_All_Axis(:,:,:), lonvalue(:) , &
+                                  field_Axis(:), lvaln(:), lval_ni(:), lval_nj(:), field_Two_Axis(:,:), lvalnInterp(:), &
+                                  lontransformed(:,:), lattransformed(:,:), lon_glotransformed(:,:), lat_glotransformed(:,:), &
+                                  bnds_lon(:,:,:), bnds_lat(:,:,:), field_value(:,:,:)
+  INTEGER :: ni,ibegin,iend,nj,jbegin,jend, nAxis, axisBegin, axisEnd
+  INTEGER :: axisterpBegin, nAxisinterp, axisinterpEnd
+  INTEGER :: niDomInterp,ibeginDomInterp,iendDomInterp,njDomInterp,jbeginDomInterp,jendDomInterp, niDomGlo, njDomGlo
+  INTEGER :: i,j,k,l,ts,n
+
+!!! MPI Initialization
+
+  CALL MPI_INIT(ierr)
+
+  CALL init_wait
+
+!!! XIOS Initialization (get the local communicator)
+  CALL xios_initialize(id,return_comm=comm)
+
+  CALL MPI_COMM_RANK(comm,rank,ierr)
+  CALL MPI_COMM_SIZE(comm,size,ierr)
+
+  DO j=1,nj_glo
+    DO i=1,ni_glo
+      lon_glo(i,j)=(i-1)+(j-1)*ni_glo
+      lat_glo(i,j)=1000+(i-1)+(j-1)*ni_glo
+      DO k = 1,4
+        bnds_lon_glo(1,i,j) = lon_glo(i,j)
+        bnds_lon_glo(2,i,j) = lon_glo(i,j)-10
+        bnds_lon_glo(3,i,j) = lon_glo(i,j)
+        bnds_lon_glo(4,i,j) = lon_glo(i,j)+10
+
+        bnds_lat_glo(1,i,j) = lat_glo(i,j) -10
+        bnds_lat_glo(2,i,j) = lat_glo(i,j)
+        bnds_lat_glo(3,i,j) = lat_glo(i,j) -10
+        bnds_lat_glo(4,i,j) = lat_glo(i,j)
+      ENDDO
+      lval_ni_glo(i) = i-1
+      DO l=1,llm
+        field_A_glo(i,j,l)=(i-1)+(j-1)*ni_glo+10000*l
+        field_Value_glo(i,j,l)=l*100
+      ENDDO
+    ENDDO
+    lval_nj_glo(j) = j-1
+  ENDDO
+  ni = ni_glo
+  ibegin = 0
+  iend = ibegin + ni - 1
+
+  jbegin=0
+  CALL Distribute_index(jbegin, jend, nj, nj_glo, rank, size)
+
+  DO j=1,llm
+    lval(j) = j *100
+  ENDDO
+  axisBegin = 0
+  CALL Distribute_index(axisBegin, axisEnd, nAxis, llm, rank, size)
+
+  DO j=1,llmInterPolated
+    lvalInterPolated(j) = j * 12
+  ENDDO
+  axisterpBegin = 0
+  CALL Distribute_index(axisterpBegin, axisinterpEnd, nAxisinterp, llmInterPolated, rank, size)
+
+  niDomGlo = ni_glo - 4
+  njDomGlo = nj_glo - 4
+  ALLOCATE(lon_glotransformed(niDomGlo,njDomGlo), lat_glotransformed(niDomGlo,njDomGlo))
+  DO j=1,njDomGlo
+    DO i=1,niDomGlo
+      lon_glotransformed(i,j)=(i-1)+(j-1)*niDomGlo
+      lat_glotransformed(i,j)=1000+(i-1)+(j-1)*niDomGlo
+    ENDDO
+  ENDDO
+
+  niDomInterp = niDomGlo; ibeginDomInterp = 0
+  jbeginDomInterp = 0
+  CALL Distribute_index(jbeginDomInterp, jendDomInterp, njDomInterp, njDomGlo, rank, size)
+
+  ALLOCATE(field_A(0:ni+1,-1:nj+2,llm), field_A_2D(0:ni+1,-1:nj+2), &
+          field_Two_Axis(ni_glo,1:nj), field_Axis(nAxis), field_All_Axis(1:ni,1:nj,llm), &
+          lon(ni,nj),lat(ni,nj), lonvalue(ni*nj), &
+          lvaln(nAxis), lval_ni(ni), lval_nj(nj), lvalnInterp(nAxisinterp), &
+          lontransformed(niDomInterp, njDomInterp), lattransformed(niDomInterp, njDomInterp), &
+          bnds_lon(4,ni,nj), bnds_lat(4,ni,nj), field_value(0:ni+1,-1:nj+2,llm))
+
+  ALLOCATE(mask(nj))
+  DO i = 1, nj
+!    IF (MOD(i,2)>=0) THEN
+!      mask(i)=.FALSE.
+!    ELSE
+      mask(i)=.TRUE.
+!    ENDIF
+  ENDDO
+  lon(:,:)=lon_glo(ibegin+1:iend+1,jbegin+1:jend+1)
+  lat(:,:)=lat_glo(ibegin+1:iend+1,jbegin+1:jend+1)
+  bnds_lon(:,:,:) = bnds_lon_glo(:,ibegin+1:iend+1,jbegin+1:jend+1)
+  bnds_lat(:,:,:) = bnds_lat_glo(:,ibegin+1:iend+1,jbegin+1:jend+1)
+  lontransformed(:,:) = lon_glotransformed(ibeginDomInterp+1:iendDomInterp+1,jbeginDomInterp+1:jendDomInterp+1)
+  lattransformed(:,:) = lat_glotransformed(ibeginDomInterp+1:iendDomInterp+1,jbeginDomInterp+1:jendDomInterp+1)
+  field_A(1:ni,1:nj,:) = field_A_glo(ibegin+1:iend+1,jbegin+1:jend+1,:)
+  field_A_2D(1:ni,1:nj) = field_A_glo(ibegin+1:iend+1,jbegin+1:jend+1,1)
+  field_value(1:ni,1:nj,:) = field_Value_glo(ibegin+1:iend+1,jbegin+1:jend+1,:)
+  field_Axis(1:nAxis)  = field_A_glo(1,1,axisBegin+1:axisEnd+1)
+  field_Two_Axis(:,1:nj)  = field_A_glo(:,jbegin+1:jend+1,1)
+  field_All_Axis(1:ni,1:nj,:) = field_A_glo(ibegin+1:iend+1,jbegin+1:jend+1,:)
+
+  lvaln(1:nAxis) = lval(axisBegin+1:axisEnd+1)
+  lval_nj(1:nj) = lval_nj_glo(jbegin+1:jend+1);
+  lval_ni(1:ni) = lval_ni_glo(ibegin+1:iend+1);
+  lvalnInterp(1:nAxisinterp) = lvalInterPolated(axisterpBegin+1:axisinterpEnd+1)
+
+  CALL xios_context_initialize("test",comm)
+  CALL xios_get_handle("test",ctx_hdl)
+  CALL xios_set_current_context(ctx_hdl)
+
+  CALL xios_get_calendar_type(calendar_type)
+  PRINT *, "calendar_type = ", calendar_type
+
+  CALL xios_set_axis_attr("axis_A", n_glo=ni_glo, begin=ibegin, n=ni, value=lval_ni)
+  CALL xios_set_axis_attr("axis_B", n_glo=nj_glo, begin=jbegin, n=nj, value=lval_nj, mask=mask)
+  CALL xios_set_axis_attr("axis_C", n_glo=llm, value=lval)
+  CALL xios_set_axis_attr("axis_D", n_glo=llm, begin=axisBegin, n=nAxis, value=lvaln)
+  CALL xios_set_axis_attr("axis_E", n_glo=llmInterPolated, value=lvalnInterp, begin=axisterpBegin, n=nAxisinterp)
+  CALL xios_set_axis_attr("axis_G", n_glo=nj_glo, value=nlev)
+
+  CALL xios_set_domain_attr("domain_A",ni_glo=ni_glo, nj_glo=nj_glo, ibegin=ibegin, ni=ni,jbegin=jbegin,nj=nj)
+  CALL xios_set_domain_attr("domain_A",data_dim=2, data_ibegin=-1, data_ni=ni+2, data_jbegin=-2, data_nj=nj+4)
+  CALL xios_set_domain_attr("domain_A",lonvalue_2D=lon,latvalue_2D=lat, type='curvilinear')
+  CALL xios_set_domain_attr("domain_A",bounds_lon_2d=bnds_lon,bounds_lat_2d=bnds_lat, nvertex=4, type='curvilinear')
+
+  CALL xios_set_domain_attr("domain_A_transformed", ni_glo=niDomGlo, nj_glo=njDomGlo, &
+                            type='rectilinear')
+!                                                    ibegin=ibeginDomInterp, ni=niDomInterp, jbegin=jbeginDomInterp, nj=njDomInterp)
+!  CALL xios_set_domain_attr("domain_A_transformed", lonvalue_2D=lontransformed, &
+!                                                    latvalue_2D=lattransformed)
+
+  CALL xios_set_fieldgroup_attr("field_definition",enabled=.TRUE.)
+
+!  CALL xios_get_handle("field_definition",fieldgroup_hdl)
+!  CALL xios_add_child(fieldgroup_hdl,field_hdl,"field_B")
+!  CALL xios_set_attr(field_hdl,field_ref="field_A",name="field_B")
+!
+!  CALL xios_get_handle("output",file_hdl)
+!  CALL xios_add_child(file_hdl,field_hdl)
+!  CALL xios_set_attr(field_hdl,field_ref="field_A",name="field_C")
+
+  dtime%second = 3600
+  CALL xios_set_timestep(dtime)
+
+  ! The calendar is created as soon as the calendar type is defined. This way
+  ! calendar operations can be used before the context definition is closed
+  CALL xios_get_time_origin(date)
+  PRINT *, "--> year length = ", xios_get_year_length_in_seconds(date%year)
+  PRINT *, "--> day length = ", xios_get_day_length_in_seconds()
+  PRINT *, "time_origin = ", date
+  PRINT *, "xios_date_get_second_of_year(time_origin) = ", xios_date_get_second_of_year(date)
+  PRINT *, "xios_date_get_day_of_year(time_origin) = ", xios_date_get_day_of_year(date)
+  PRINT *, "xios_date_get_fraction_of_year(time_origin) = ", xios_date_get_fraction_of_year(date)
+  PRINT *, "xios_date_get_second_of_day(time_origin) = ", xios_date_get_second_of_day(date)
+  PRINT *, "xios_date_get_fraction_of_day(time_origin) = ", xios_date_get_fraction_of_day(date)
+  dtime%timestep = 1
+  dtime = 0.5 * dtime
+  PRINT *, "duration = ", dtime
+  date = date + 3 * (dtime + dtime)
+  PRINT *, "date = time_origin + 3 * (duration + duration) = ", date
+  PRINT *, "xios_date_convert_to_seconds(date) = ", xios_date_convert_to_seconds(date)
+  PRINT *, "xios_date_convert_to_seconds(date - 2.5h) = ", xios_date_convert_to_seconds(date - 2.5 * xios_hour)
+
+  ni=0 ; lonvalue(:)=0
+!  CALL xios_get_domain_attr("domain_A",ni=ni,lonvalue_1D=lonvalue)
+
+!  print *,"ni",ni
+!  print *,"lonvalue",lonvalue ;
+
+  CALL xios_is_defined_field_attr("field_A",enabled=ok)
+  PRINT *,"field_A : attribute enabled is defined ? ",ok
+  CALL xios_close_context_definition()
+
+  PRINT*,"field field_A is active ? ",xios_field_is_active("field_A")
+  DO ts=1,24*1
+    CALL xios_update_calendar(ts)
+    CALL xios_send_field("field_A",field_A)
+    CALL xios_send_field("field_A_2D",field_A_2D)
+    CALL xios_send_field("field_Value",field_value)
+    CALL xios_send_field("field_Axis",field_Axis)
+    CALL xios_send_field("field_Two_Axis",field_Two_Axis)
+    CALL xios_send_field("field_All_Axis",field_All_Axis)
+    tsTemp = ts
+    CALL xios_send_field("field_Scalar", tsTemp)
+    CALL wait_us(5000) ;
+  ENDDO
+
+  CALL xios_context_finalize()
+
+  DEALLOCATE(field_A, field_Two_Axis, field_Axis, field_All_Axis, &
+             lon, lat, lonvalue, &
+             lvaln, lval_ni, lval_nj, lvalnInterp, &
+             bnds_lon, bnds_lat)
+
+  DEALLOCATE(mask)
+
+  CALL MPI_COMM_FREE(comm, ierr)
+
+  CALL xios_finalize()
+
+  CALL MPI_FINALIZE(ierr)
+
+CONTAINS
+  SUBROUTINE Distribute_index(ibegin, iend, ni, nglob, rank, size)
+    INTEGER, INTENT(INOUT) :: ibegin, iend, ni
+    INTEGER, INTENT(IN)    :: nglob, rank, size
+    DO n=0,size-1
+      ni=nglob/size
+      IF (n<MOD(nglob,size)) ni=ni+1
+      IF (n==rank) exit
+      ibegin=ibegin+ni
+    ENDDO
+    iend=ibegin+ni-1
+  END SUBROUTINE Distribute_index
+END PROGRAM test_new_features
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/test/test_regular.f90
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/test/test_regular.f90	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/test/test_regular.f90	(revision 1749)
@@ -0,0 +1,207 @@
+PROGRAM test_regular
+
+  USE xios
+  IMPLICIT NONE
+  INCLUDE "mpif.h"
+
+  INTEGER, PARAMETER :: ntime=1
+
+  CHARACTER(len=*),PARAMETER :: id="client"
+  TYPE(xios_duration)  :: dtime
+  TYPE(xios_context) :: ctx_hdl
+  TYPE(xios_field) :: field_hdl
+  TYPE(xios_fieldgroup) :: fieldgroup_hdl
+  TYPE(xios_file) :: file_hdl
+  LOGICAL :: ok
+  CHARACTER(len=256) :: crname
+  INTEGER :: ts
+  INTEGER :: comm  
+  INTEGER :: ierr
+  INTEGER :: sizeComm, rank    ! SIZE is a fortran function
+
+  INTEGER :: nlon = 100 
+  INTEGER :: nlat = 100
+  INTEGER :: ncell 
+  INTEGER :: ilat, ilon, ind
+  DOUBLE PRECISION :: lon1, lon2, lat1, lat2
+  INTEGER :: ni, ibegin
+
+  DOUBLE PRECISION,ALLOCATABLE :: lon_glo(:)
+  DOUBLE PRECISION,ALLOCATABLE :: lat_glo(:)
+  DOUBLE PRECISION,ALLOCATABLE :: bounds_lon_glo(:,:)
+  DOUBLE PRECISION,ALLOCATABLE :: bounds_lat_glo(:,:)
+  DOUBLE PRECISION,ALLOCATABLE :: field_temp_glo(:,:)
+  DOUBLE PRECISION,ALLOCATABLE :: lon(:)
+  DOUBLE PRECISION,ALLOCATABLE :: lat(:)
+  DOUBLE PRECISION,ALLOCATABLE :: bounds_lon(:,:)
+  DOUBLE PRECISION,ALLOCATABLE :: bounds_lat(:,:)
+  DOUBLE PRECISION,ALLOCATABLE :: field_temp(:,:)
+  DOUBLE PRECISION,ALLOCATABLE :: field_temp1(:,:)
+  DOUBLE PRECISION,ALLOCATABLE :: field_temp2(:,:)
+
+!!! MPI Initialization
+  CALL MPI_INIT(ierr)
+
+!!! XIOS Initialization (get the local communicator)
+  CALL xios_initialize(id,return_comm=comm)
+
+!###########################################################################
+! Contexte ATM
+!###########################################################################
+
+!!! Initialisation des coordonnÃ©es globales et locales pour la grille rÃ©guliÃšre
+
+! Regions around the poles are not included into the grid
+! The whole grid is rectangular (nvertex=4)
+
+  ncell = nlon * (nlat-1)
+  ALLOCATE(lon_glo(ncell))
+  ALLOCATE(lat_glo(ncell))
+  ALLOCATE(bounds_lon_glo(4,ncell))
+  ALLOCATE(bounds_lat_glo(4,ncell))
+  ALLOCATE(field_temp_glo(ncell,ntime))
+
+
+  ind = 0
+  DO ilat = 1, nlat-1
+   DO ilon = 1, nlon
+
+      ind=ind+1
+
+      lon1 = 360./DBLE(nlon) * DBLE(ilon-1)
+      lon2 = lon1 + 360./DBLE(nlon)
+
+      lat1 = (90. + 90./DBLE(nlat)) - 180./DBLE(nlat)*DBLE(ilat)
+      lat2 = lat1 - 180./DBLE(nlat)
+
+      lon_glo(ind) = (lon1+lon2)*0.5
+      lat_glo(ind) = (lat1+lat2)*0.5 
+
+      bounds_lon_glo(1,ind) = lon1
+      bounds_lon_glo(2,ind) = lon2
+      bounds_lon_glo(3,ind) = lon2
+      bounds_lon_glo(4,ind) = lon1
+
+      bounds_lat_glo(1,ind) = lat1
+      bounds_lat_glo(2,ind) = lat1
+      bounds_lat_glo(3,ind) = lat2      
+      bounds_lat_glo(4,ind) = lat2     
+
+      field_temp_glo(ind,1) = DBLE(ind)
+
+    ENDDO
+  ENDDO
+
+! Initialization of local variables
+
+  CALL MPI_COMM_RANK(comm,rank,ierr)
+  CALL MPI_COMM_SIZE(comm,size,ierr)
+
+  IF (MOD(ncell, size) == 0) THEN
+    ni = ncell/size
+    ibegin = rank*ni
+  ELSE
+    IF (rank < MOD(ncell, size)) THEN
+      ni = ncell/size + 1
+      ibegin = rank*(ncell/size + 1)
+    ELSE
+      ni = ncell/size
+      IF (rank == MOD(ncell, size)) THEN
+        ibegin = rank*(ncell/size + 1)
+      ELSE
+        ibegin = MOD(ncell,size)*(ncell/size + 1) + (rank-MOD(ncell,size))*ncell/size
+      END IF
+    END IF
+  END IF
+
+  ALLOCATE(lon(ni))
+  ALLOCATE(lat(ni))
+  ALLOCATE(bounds_lon(4,ni))
+  ALLOCATE(bounds_lat(4,ni))
+  ALLOCATE(field_temp(ni,ntime)) 
+  ALLOCATE(field_temp1(ni,ntime))
+  ALLOCATE(field_temp2(ni,ntime))
+  lon = lon_glo(ibegin:1+ibegin+ni)
+  lat = lat_glo(ibegin:1+ibegin+ni)
+  bounds_lon(:,:) = bounds_lon_glo(:,ibegin:1+ibegin+ni)
+  bounds_lat(:,:) = bounds_lat_glo(:,ibegin:1+ibegin+ni)
+
+  field_temp(:,:) = rank
+  field_temp1(:,:) = rank
+  field_temp2(:,:) = rank + 10
+
+
+!!! Context ATMOSPHERE
+
+  CALL xios_context_initialize("atmosphere",comm)
+  CALL xios_get_handle("atmosphere",ctx_hdl)
+  CALL xios_set_current_context(ctx_hdl)
+
+  CALL xios_define_calendar(type="Gregorian", &
+                            start_date=xios_date(2000, 01, 01, 00, 00, 00), &
+                            time_origin=xios_date(1999, 01, 01, 15, 00, 00))
+
+  CALL xios_set_domain_attr("face1", ni_glo=ncell, ibegin=ibegin, ni=ni, type='unstructured')
+  CALL xios_set_domain_attr("face1", lonvalue_1d=lon, latvalue_1d=lat)
+  CALL xios_set_domain_attr("face1", bounds_lon_1d=bounds_lon, bounds_lat_1d=bounds_lat)
+
+  CALL xios_set_domain_attr("face2", ni_glo=ncell, ibegin=ibegin, ni=ni, type='unstructured')
+  CALL xios_set_domain_attr("face2", lonvalue_1d=lon, latvalue_1d=lat)
+  CALL xios_set_domain_attr("face2", bounds_lon_1d=bounds_lon, bounds_lat_1d=bounds_lat)
+   
+!!! Definition du timestep
+
+  dtime%second=3600
+  CALL xios_set_timestep(timestep=dtime)
+
+!!! Fin de la definition du contexte
+
+  CALL xios_close_context_definition()
+
+
+!####################################################################################
+!!! Boucle temporelle
+!####################################################################################
+    
+    DO ts=1,1
+
+!!! Mise a jour du pas de temps
+      CALL xios_update_calendar(ts)
+
+!!! On donne la valeur du champ atm
+     CALL xios_send_field("temp1",field_temp1(:,1))
+     CALL xios_send_field("temp2",field_temp2(:,1))
+
+    ENDDO
+
+!####################################################################################
+!!! Finalisation
+!####################################################################################
+
+!!! Fin des contextes
+
+    CALL xios_context_finalize()
+
+    DEALLOCATE(lon_glo, lat_glo)
+    DEALLOCATE(bounds_lon_glo, bounds_lat_glo)
+    DEALLOCATE(field_temp_glo)
+    DEALLOCATE(lon, lat)
+    DEALLOCATE(bounds_lon, bounds_lat)
+    DEALLOCATE(field_temp)
+    DEALLOCATE(field_temp1, field_temp2)
+
+!!! Fin de XIOS
+
+    CALL MPI_COMM_FREE(comm, ierr)
+
+    CALL xios_finalize()
+
+    CALL MPI_FINALIZE(ierr)
+
+  END PROGRAM test_regular
+
+
+
+
+
+
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/test/test_remap.f90
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/test/test_remap.f90	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/test/test_remap.f90	(revision 1749)
@@ -0,0 +1,211 @@
+PROGRAM test_remap
+
+  USE xios
+  USE mod_wait
+  USE netcdf
+
+  IMPLICIT NONE
+  INCLUDE "mpif.h"
+  INTEGER :: rank
+  INTEGER :: size
+  INTEGER :: ierr
+
+  CHARACTER(len=*),PARAMETER :: id="client"
+  INTEGER :: comm
+  TYPE(xios_duration) :: dtime
+  TYPE(xios_context) :: ctx_hdl
+
+  DOUBLE PRECISION,ALLOCATABLE :: src_lon(:), dst_lon(:)
+  DOUBLE PRECISION,ALLOCATABLE :: src_lat(:), dst_lat(:)
+  DOUBLE PRECISION,ALLOCATABLE :: src_boundslon(:,:), dst_boundslon(:,:)
+  DOUBLE PRECISION,ALLOCATABLE :: src_boundslat(:,:), dst_boundslat(:,:)
+  DOUBLE PRECISION,ALLOCATABLE :: src_field_2D(:)
+  DOUBLE PRECISION,ALLOCATABLE :: tmp_field_0(:), tmp_field_1(:), tmp_field_2(:)
+  DOUBLE PRECISION,ALLOCATABLE :: src_field_3D(:,:), src_field_4D(:,:,:), lval(:), lval1(:), lval2(:), src_field_pression(:,:)
+  LOGICAL,ALLOCATABLE :: src_mask_2D(:)
+  INTEGER :: src_ni_glo, dst_ni_glo;
+  INTEGER :: src_nvertex, dst_nvertex;
+  INTEGER :: src_ibegin, dst_ibegin;
+  INTEGER :: src_ni, dst_ni;
+  INTEGER :: src_tmp_ni, src_tmp_nj, src_tmp_n;
+  CHARACTER(LEN=*),PARAMETER :: src_file="h14.nc"
+  CHARACTER(LEN=*),PARAMETER :: dst_file="r180x90.nc"
+  INTEGER :: ncid
+  INTEGER :: dimids(2)
+  INTEGER :: div,remain
+  INTEGER :: varid
+  INTEGER :: ts
+  INTEGER :: i
+  INTEGER,PARAMETER :: llm=5, interpolatedLlm = 4, llm2 = 6
+
+  CALL MPI_INIT(ierr)
+  CALL init_wait
+
+!!! XIOS Initialization (get the local communicator)
+
+  CALL xios_initialize(id,return_comm=comm)
+  CALL MPI_COMM_RANK(comm,rank,ierr)
+  CALL MPI_COMM_SIZE(comm,size,ierr)
+
+  ierr=NF90_OPEN(src_file, NF90_NOWRITE, ncid)
+  ierr=NF90_INQ_VARID(ncid,"bounds_lon",varid)
+  ierr=NF90_INQUIRE_VARIABLE(ncid, varid,dimids=dimids)
+  ierr=NF90_INQUIRE_DIMENSION(ncid, dimids(1), len=src_nvertex)
+  ierr=NF90_INQUIRE_DIMENSION(ncid, dimids(2), len=src_ni_glo)
+
+  div    = src_ni_glo/size
+  remain = MOD( src_ni_glo, size )
+  IF (rank < remain) THEN
+    src_ni=div+1 ;
+    src_ibegin=rank*(div+1) ;
+  ELSE
+    src_ni=div ;
+    src_ibegin= remain * (div+1) + (rank-remain) * div ;
+  ENDIF
+
+  ALLOCATE(src_lon(src_ni))
+  ALLOCATE(src_lat(src_ni))
+  ALLOCATE(src_boundslon(src_nvertex,src_ni))
+  ALLOCATE(src_boundslat(src_nvertex,src_ni))
+  ALLOCATE(src_field_2D(src_ni))
+  ALLOCATE(src_field_3D(src_ni,llm))
+  ALLOCATE(src_field_4D(src_ni,llm,llm2))
+  ALLOCATE(src_mask_2D(src_ni))
+  ALLOCATE(src_field_pression(src_ni,llm))
+  ALLOCATE(lval(llm))
+  ALLOCATE(lval1(interpolatedLlm))
+  ALLOCATE(lval2(llm2))
+
+  ierr=NF90_INQ_VARID(ncid,"lon",varid)
+  ierr=NF90_GET_VAR(ncid,varid, src_lon, start=(/src_ibegin+1/),count=(/src_ni/))
+  ierr=NF90_INQ_VARID(ncid,"lat",varid)
+  ierr=NF90_GET_VAR(ncid,varid, src_lat, start=(/src_ibegin+1/),count=(/src_ni/))
+  ierr=NF90_INQ_VARID(ncid,"bounds_lon",varid)
+  ierr=NF90_GET_VAR(ncid,varid,src_boundslon, start=(/1,src_ibegin+1/),count=(/src_nvertex,src_ni/))
+  ierr=NF90_INQ_VARID(ncid,"bounds_lat",varid)
+  ierr=NF90_GET_VAR(ncid,varid, src_boundslat, start=(/1,src_ibegin+1/),count=(/src_nvertex,src_ni/))
+  ierr=NF90_INQ_VARID(ncid,"val",varid)
+  ierr=NF90_GET_VAR(ncid,varid, src_field_2D, start=(/src_ibegin+1/),count=(/src_ni/))
+  DO i=1,src_ni
+    src_field_3D(i,:) = src_field_2D(i)
+    IF (MOD(i,10)==0) THEN
+      src_mask_2D(i)=.FALSE.
+    ELSE
+      src_mask_2D(i)=.TRUE.
+    ENDIF
+  ENDDO
+
+  DO i=1,llm
+    lval(i) = i*100
+    src_field_pression(:,i) = i * 100
+    src_field_3D(:,i) = src_field_3D(:,i) + i * 10    
+  ENDDO
+
+  DO i=1,llm2
+    src_field_4D(:,:,i) = src_field_3D(:,:)
+  ENDDO
+
+  DO i=1,interpolatedLlm
+    lval2(i) = i*10
+    lval1(i) = i*10 + 2
+  ENDDO
+
+  ierr=NF90_OPEN(dst_file, NF90_NOWRITE, ncid)
+  ierr=NF90_INQ_VARID(ncid,"bounds_lon",varid)
+  ierr=NF90_INQUIRE_VARIABLE(ncid, varid,dimids=dimids)
+  ierr=NF90_INQUIRE_DIMENSION(ncid, dimids(1), len=dst_nvertex)
+  ierr=NF90_INQUIRE_DIMENSION(ncid, dimids(2), len=dst_ni_glo)
+
+  div    = dst_ni_glo/size
+  remain = MOD( dst_ni_glo, size )
+  IF (rank < remain) THEN
+    dst_ni=div+1 ;
+    dst_ibegin=rank*(div+1) ;
+  ELSE
+    dst_ni=div ;
+    dst_ibegin= remain * (div+1) + (rank-remain) * div ;
+  ENDIF
+
+  ALLOCATE(dst_lon(dst_ni))
+  ALLOCATE(dst_lat(dst_ni))
+  ALLOCATE(dst_boundslon(dst_nvertex,dst_ni))
+  ALLOCATE(dst_boundslat(dst_nvertex,dst_ni))
+
+  ierr=NF90_INQ_VARID(ncid,"lon",varid)
+  ierr=NF90_GET_VAR(ncid,varid, dst_lon, start=(/dst_ibegin+1/),count=(/dst_ni/))
+  ierr=NF90_INQ_VARID(ncid,"lat",varid)
+  ierr=NF90_GET_VAR(ncid,varid, dst_lat, start=(/dst_ibegin+1/),count=(/dst_ni/))
+  ierr=NF90_INQ_VARID(ncid,"bounds_lon",varid)
+  ierr=NF90_GET_VAR(ncid,varid,dst_boundslon, start=(/1,dst_ibegin+1/),count=(/dst_nvertex,dst_ni/))
+  ierr=NF90_INQ_VARID(ncid,"bounds_lat",varid)
+  ierr=NF90_GET_VAR(ncid,varid, dst_boundslat, start=(/1,dst_ibegin+1/),count=(/dst_nvertex,dst_ni/))
+
+
+  CALL xios_context_initialize("test",comm)
+  CALL xios_get_handle("test",ctx_hdl)
+  CALL xios_set_current_context(ctx_hdl)
+
+  CALL xios_set_domain_attr("src_domain", ni_glo=src_ni_glo, ibegin=src_ibegin, ni=src_ni, type="unstructured")
+  CALL xios_set_domain_attr("src_domain", lonvalue_1D=src_lon, latvalue_1D=src_lat, &
+                            bounds_lon_1D=src_boundslon, bounds_lat_1D=src_boundslat, nvertex=src_nvertex)
+
+  CALL xios_set_domain_attr("src_domain_clone", ni_glo=src_ni_glo, ibegin=src_ibegin, ni=src_ni, type="unstructured")
+  CALL xios_set_domain_attr("src_domain_clone", lonvalue_1D=src_lon, latvalue_1D=src_lat, &
+                            bounds_lon_1D=src_boundslon, bounds_lat_1D=src_boundslat, nvertex=src_nvertex, &
+                            mask_1d=src_mask_2D)
+
+  CALL xios_set_axis_attr("src_axis", n_glo=llm, value=lval)
+  CALL xios_set_axis_attr("nq", n_glo=llm2, value=lval2)
+
+  CALL xios_set_domain_attr("dst_domain", ni_glo=dst_ni_glo, ibegin=dst_ibegin, ni=dst_ni, type="unstructured")
+  CALL xios_set_domain_attr("dst_domain", lonvalue_1D=dst_lon, latvalue_1D=dst_lat, &
+                            bounds_lon_1D=dst_boundslon, bounds_lat_1D=dst_boundslat, nvertex=dst_nvertex)
+
+  dtime%second = 3600
+  CALL xios_set_timestep(dtime)
+
+  CALL xios_close_context_definition()
+  CALL xios_get_domain_attr("src_domain_regular_read", ni=src_tmp_ni, nj=src_tmp_nj)
+  ALLOCATE(tmp_field_0(src_tmp_ni*src_tmp_nj))
+
+  ! CALL xios_get_axis_attr("src_axis_curvilinear_read", n=src_tmp_n)
+  ! CALL xios_get_domain_attr("src_domain_curvilinear_read", ni=src_tmp_ni, nj=src_tmp_nj)
+  ! ALLOCATE(tmp_field_1(src_tmp_ni*src_tmp_nj*src_tmp_n))
+
+  ! CALL xios_get_domain_attr("src_domain_unstructured_read", ni=src_tmp_ni, nj=src_tmp_nj)
+  ! ALLOCATE(tmp_field_2(src_tmp_ni*src_tmp_nj))
+
+  DO ts=1,1
+    CALL xios_recv_field("src_field_regular", tmp_field_0)
+    ! CALL xios_recv_field("src_field_curvilinear", tmp_field_1)
+    ! CALL xios_recv_field("src_field_unstructured", tmp_field_2)
+    CALL xios_update_calendar(ts)
+    CALL xios_send_field("src_field_2D",src_field_2D)
+    CALL xios_send_field("src_field_2D_clone",src_field_2D)
+    CALL xios_send_field("src_field_3D",src_field_3D)
+    ! CALL xios_send_field("src_field_4D",src_field_4D)
+    ! CALL xios_send_field("src_field_3D_pression",src_field_pression)
+    CALL xios_send_field("tmp_field_0",tmp_field_0)
+    ! CALL xios_send_field("tmp_field_1",tmp_field_1)
+    ! CALL xios_send_field("tmp_field_2",tmp_field_2)
+    CALL wait_us(5000) ;
+   ENDDO
+
+  CALL xios_context_finalize()
+
+  DEALLOCATE(src_lon, src_lat, src_boundslon,src_boundslat, src_field_2D)
+  DEALLOCATE(dst_lon, dst_lat, dst_boundslon,dst_boundslat)
+  ! DEALLOCATE(tmp_field_0, tmp_field_1, tmp_field_2)
+
+  CALL MPI_COMM_FREE(comm, ierr)
+
+  CALL xios_finalize()
+
+  CALL MPI_FINALIZE(ierr)
+
+END PROGRAM test_remap
+
+
+
+
+
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/test/test_second_server.f90
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/test/test_second_server.f90	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/test/test_second_server.f90	(revision 1749)
@@ -0,0 +1,248 @@
+PROGRAM test_regular
+
+  USE xios
+  USE mod_wait
+  IMPLICIT NONE
+  INCLUDE "mpif.h"
+
+  INTEGER, PARAMETER :: ntime=1
+
+  CHARACTER(len=*),PARAMETER :: id="client"
+  TYPE(xios_duration)  :: dtime
+  TYPE(xios_context) :: ctx_hdl
+  TYPE(xios_field) :: field_hdl
+  TYPE(xios_fieldgroup) :: fieldgroup_hdl
+  TYPE(xios_file) :: file_hdl
+  LOGICAL :: ok
+  CHARACTER(len=256) :: crname
+  INTEGER :: ts, i
+  INTEGER :: comm  
+  INTEGER :: ierr
+  INTEGER :: size, rank
+
+  INTEGER :: nlon = 6 !20 
+  INTEGER :: nlat = 6 !16 
+  INTEGER :: ncell 
+  
+  INTEGER :: ilat, ilon, ind
+  DOUBLE PRECISION :: lon1, lon2, lat1, lat2
+  INTEGER :: ni, ibegin
+
+  DOUBLE PRECISION,ALLOCATABLE :: lon_glo(:)
+  DOUBLE PRECISION,ALLOCATABLE :: lat_glo(:)
+  DOUBLE PRECISION,ALLOCATABLE :: bounds_lon_glo(:,:)
+  DOUBLE PRECISION,ALLOCATABLE :: bounds_lat_glo(:,:)
+  DOUBLE PRECISION,ALLOCATABLE :: field_temp_glo(:,:)
+  DOUBLE PRECISION,ALLOCATABLE :: lon(:)
+  DOUBLE PRECISION,ALLOCATABLE :: lat(:)
+  DOUBLE PRECISION,ALLOCATABLE :: bounds_lon(:,:)
+  DOUBLE PRECISION,ALLOCATABLE :: bounds_lat(:,:)
+  DOUBLE PRECISION,ALLOCATABLE :: field_temp(:,:)
+  DOUBLE PRECISION,ALLOCATABLE :: field_temp1(:)
+  DOUBLE PRECISION,ALLOCATABLE :: field_temp2(:)
+  INTEGER,ALLOCATABLE  :: field_int(:)
+
+!!! MPI Initialization
+  CALL MPI_INIT(ierr)
+
+!!! XIOS Initialization (get the local communicator)
+  CALL xios_initialize(id,return_comm=comm)
+
+!!! Initialisation des coordonnÃ©es globales et locales pour la grille rÃ©guliÃšre
+
+! Regions around the poles are not included into the grid
+! The whole grid is rectangular (nvertex=4)
+
+  ncell = nlon * (nlat-1)
+  ALLOCATE(lon_glo(ncell))
+  ALLOCATE(lat_glo(ncell))
+  ALLOCATE(bounds_lon_glo(4,ncell))
+  ALLOCATE(bounds_lat_glo(4,ncell))
+  ALLOCATE(field_temp_glo(ncell,ntime))
+
+
+  ind = 0
+  DO ilat = 1, nlat-1
+   DO ilon = 1, nlon
+
+      ind=ind+1
+
+      lon1 = 360./DBLE(nlon) * DBLE(ilon-1)
+      lon2 = lon1 + 360./DBLE(nlon)
+
+      lat1 = (90. + 90./DBLE(nlat)) - 180./DBLE(nlat)*DBLE(ilat)
+      lat2 = lat1 - 180./DBLE(nlat)
+
+      lon_glo(ind) = (lon1+lon2)*0.5
+      lat_glo(ind) = (lat1+lat2)*0.5 
+
+      bounds_lon_glo(1,ind) = lon1
+      bounds_lon_glo(2,ind) = lon2
+      bounds_lon_glo(3,ind) = lon2
+      bounds_lon_glo(4,ind) = lon1
+
+      bounds_lat_glo(1,ind) = lat1
+      bounds_lat_glo(2,ind) = lat1
+      bounds_lat_glo(3,ind) = lat2      
+      bounds_lat_glo(4,ind) = lat2     
+
+      field_temp_glo(ind,1) = DBLE(ind)
+
+    ENDDO
+  ENDDO
+
+! Initialization of local variables
+
+  CALL MPI_COMM_RANK(comm,rank,ierr)
+  CALL MPI_COMM_SIZE(comm,size,ierr)
+
+  IF (MOD(ncell, size) == 0) THEN
+    ni = ncell/size
+    ibegin = rank*ni
+  ELSE
+    IF (rank < MOD(ncell, size)) THEN
+      ni = ncell/size + 1
+      ibegin = rank*(ncell/size + 1)
+    ELSE
+      ni = ncell/size
+      IF (rank == MOD(ncell, size)) THEN
+        ibegin = rank*(ncell/size + 1)
+      ELSE
+        ibegin = MOD(ncell,size)*(ncell/size + 1) + (rank-MOD(ncell,size))*ncell/size
+      END IF
+    END IF
+  END IF
+
+  ALLOCATE(lon(ni))
+  ALLOCATE(lat(ni))
+  ALLOCATE(bounds_lon(4,ni))
+  ALLOCATE(bounds_lat(4,ni))
+  ALLOCATE(field_temp(ni,ntime)) 
+  ALLOCATE(field_temp1(ni))
+  ALLOCATE(field_temp2(ni))
+  ALLOCATE(field_int(ni))
+  lon = lon_glo(1+ibegin:ibegin+ni)
+  lat = lat_glo(1+ibegin:ibegin+ni)
+  bounds_lon(:,:) = bounds_lon_glo(:,1+ibegin:ibegin+ni)
+  bounds_lat(:,:) = bounds_lat_glo(:,1+ibegin:ibegin+ni)
+
+  !field_temp(:) = rank
+  field_temp1(:) = rank + 10
+  field_temp2(:) = rank + 20
+ 
+ DO i = 1, ni
+  field_temp1 (i) = 100*rank + i
+  field_temp2 (i) = 0 !200*rank + i
+  !field_temp1 (i) = 10
+END DO
+
+!###########################################################################
+! Contexte ATM
+!###########################################################################
+
+  CALL xios_context_initialize("atmosphere",comm)
+  CALL xios_get_handle("atmosphere",ctx_hdl)
+  CALL xios_set_current_context(ctx_hdl)
+
+  CALL xios_define_calendar(type="Gregorian", &
+                            start_date=xios_date(2000, 01, 01, 00, 00, 00), &
+                            time_origin=xios_date(1999, 01, 01, 15, 00, 00))
+
+  CALL xios_set_domain_attr("atm_face", ni_glo=ncell, ibegin=ibegin, ni=ni, type='unstructured')
+  CALL xios_set_domain_attr("atm_face", lonvalue_1d=lon, latvalue_1d=lat)
+  CALL xios_set_domain_attr("atm_face", bounds_lon_1d=bounds_lon, bounds_lat_1d=bounds_lat)
+
+!!! Definition du timestep
+
+  dtime%second=3600
+  CALL xios_set_timestep(timestep=dtime)
+
+!!! Fin de la definition du contexte
+
+  CALL xios_close_context_definition()
+
+!###########################################################################
+! Contexte SRF
+!###########################################################################
+
+  CALL xios_context_initialize("surface",comm)
+  CALL xios_get_handle("surface",ctx_hdl)
+  CALL xios_set_current_context(ctx_hdl)
+
+  CALL xios_define_calendar(type="Gregorian", &
+                            start_date=xios_date(2000, 01, 01, 00, 00, 00), &
+                            time_origin=xios_date(1999, 01, 01, 15, 00, 00))
+
+  CALL xios_set_domain_attr("domain_srf", ni_glo=ncell, ibegin=ibegin, ni=ni, type='unstructured')
+  CALL xios_set_domain_attr("domain_srf", lonvalue_1d=lon, latvalue_1d=lat)
+  CALL xios_set_domain_attr("domain_srf", bounds_lon_1d=bounds_lon, bounds_lat_1d=bounds_lat)
+
+   
+!!! Definition du timestep
+
+  dtime%second=3600
+  CALL xios_set_timestep(timestep=dtime)
+
+!!! Fin de la definition du contexte
+
+  CALL xios_close_context_definition()
+
+
+!####################################################################################
+!!! Boucle temporelle
+!####################################################################################
+    
+    DO ts=1,ntime
+
+      CALL xios_get_handle("atmosphere",ctx_hdl)
+      CALL xios_set_current_context(ctx_hdl)
+
+!!! Mise a jour du pas de temps
+      CALL xios_update_calendar(ts)
+
+!!! On donne la valeur du champ atm
+     CALL xios_send_field("atm_temp1",field_temp1(:))
+     CALL xios_send_field("atm_temp2",field_temp2(:))
+
+     CALL xios_get_handle("surface",ctx_hdl)
+     CALL xios_set_current_context(ctx_hdl)
+
+!!! Mise a jour du pas de temps
+     CALL xios_update_calendar(ts)
+
+!!! On donne la valeur du champ srf
+     CALL xios_send_field("srf_temp",field_temp1(:))
+     CALL wait_us(5000) ;
+
+    ENDDO
+
+    CALL xios_context_finalize()
+
+    CALL xios_get_handle("atmosphere",ctx_hdl)
+    CALL xios_set_current_context(ctx_hdl)
+    CALL xios_context_finalize()
+
+    DEALLOCATE(lon_glo, lat_glo)
+    DEALLOCATE(bounds_lon_glo, bounds_lat_glo)
+    DEALLOCATE(field_temp_glo)
+    DEALLOCATE(lon, lat)
+    DEALLOCATE(bounds_lon, bounds_lat)
+    DEALLOCATE(field_temp)
+    DEALLOCATE(field_temp1, field_temp2)
+    DEALLOCATE(field_int)
+
+!!! Fin de XIOS
+
+    CALL MPI_COMM_FREE(comm, ierr)
+
+    CALL xios_finalize()
+
+    CALL MPI_FINALIZE(ierr)
+
+  END PROGRAM test_regular
+
+
+
+
+
+
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/test/test_unstruct_complete.f90
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/test/test_unstruct_complete.f90	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/test/test_unstruct_complete.f90	(revision 1749)
@@ -0,0 +1,337 @@
+PROGRAM test_unstruct_complete
+
+  USE xios
+  USE mod_wait
+  IMPLICIT NONE
+  INCLUDE "mpif.h"
+  INTEGER :: mpi_rank
+  INTEGER :: mpi_size
+  INTEGER :: ierr
+
+  CHARACTER(len=*),PARAMETER :: id="client"
+  INTEGER :: comm
+  TYPE(xios_duration) :: dtime
+  TYPE(xios_context) :: ctx_hdl
+  INTEGER, PARAMETER :: nlon=60
+  INTEGER, PARAMETER :: nlat=30
+  INTEGER,PARAMETER :: ni_glo=100
+  INTEGER,PARAMETER :: nj_glo=100
+  INTEGER,PARAMETER :: llm=5
+  DOUBLE PRECISION  :: lval(llm)=1
+  TYPE(xios_field) :: field_hdl
+  TYPE(xios_fieldgroup) :: fieldgroup_hdl
+  TYPE(xios_file) :: file_hdl
+  LOGICAL :: ok
+
+  DOUBLE PRECISION,ALLOCATABLE :: lon_glo(:),lat_glo(:)
+  DOUBLE PRECISION,ALLOCATABLE :: bounds_lon_glo(:,:),bounds_lat_glo(:,:)
+  DOUBLE PRECISION,ALLOCATABLE :: field_A_glo(:,:)
+  INTEGER,ALLOCATABLE :: i_index_glo(:)
+  INTEGER,ALLOCATABLE :: i_index(:)
+  LOGICAL,ALLOCATABLE :: mask_glo(:),mask(:)
+  INTEGER,ALLOCATABLE :: n_local(:),local_neighbor(:,:)
+  DOUBLE PRECISION,ALLOCATABLE :: lon(:),lat(:),field_A_srf(:,:), lonvalue(:) ;
+  DOUBLE PRECISION,ALLOCATABLE :: bounds_lon(:,:),bounds_lat(:,:) ;
+  INTEGER :: ni,ibegin,iend,nj,jbegin,jend
+  INTEGER :: i,j,l,ts,n, nbMax
+  INTEGER :: ncell_glo,ncell,ind
+  REAL :: ilon,ilat
+  DOUBLE PRECISION, PARAMETER :: Pi=3.14159265359
+  INTEGER :: list_ind(nlon,nlat)
+  INTEGER :: rank,j1,j2,np,ncell_x
+  INTEGER :: data_n_index
+  INTEGER,ALLOCATABLE :: data_i_index(:)
+  DOUBLE PRECISION,ALLOCATABLE :: field_A_compressed(:,:)
+
+  CALL xios_initialize(id,return_comm=comm)
+  CALL MPI_COMM_RANK(comm,mpi_rank,ierr)
+  CALL MPI_COMM_SIZE(comm,mpi_size,ierr)
+
+  CALL init_wait
+
+  ncell_glo=0
+  DO j=1,nlat
+    n =  NINT(COS(Pi/2-(j-0.5)*PI/nlat)*nlon)
+    IF (n<8) n=8
+    ncell_glo=ncell_glo+n
+  ENDDO
+
+  ALLOCATE(lon_glo(ncell_glo))
+  ALLOCATE(lat_glo(ncell_glo))
+  ALLOCATE(bounds_lon_glo(4,ncell_glo))
+  ALLOCATE(bounds_lat_glo(4,ncell_glo))
+  ALLOCATE(i_index_glo(ncell_glo))
+  ALLOCATE(field_A_glo(ncell_glo,llm))
+  ALLOCATE(mask_glo(ncell_glo))
+
+  ind=0
+  DO j=1,nlat
+    n = NINT(COS(Pi/2-(j-0.5)*PI/nlat)*nlon)
+    if (j==1) PRINT*,"--- ",n
+    if (j==nlat) PRINT*,"--- ",n
+    IF (n<8) n=8
+
+    DO i=1,n
+      ind=ind+1
+      list_ind(i,j)=ind
+      ilon=i-0.5
+      ilat=j-0.5
+
+      lat_glo(ind)= 90-(ilat*180./nlat)
+      lon_glo(ind)= (ilon*360./n)
+
+
+      bounds_lat_glo(1,ind)= 90-((ilat-0.5)*180./nlat)
+      bounds_lon_glo(1,ind)=((ilon-0.5)*360./n)
+
+      bounds_lat_glo(2,ind)= 90-((ilat-0.5)*180./nlat)
+      bounds_lon_glo(2,ind)=((ilon+0.5)*360./n)
+
+      bounds_lat_glo(3,ind)= 90-((ilat+0.5)*180./nlat)
+      bounds_lon_glo(3,ind)=((ilon+0.5)*360./n)
+
+      bounds_lat_glo(4,ind)= 90-((ilat+0.5)*180./nlat)
+      bounds_lon_glo(4,ind)=((ilon-0.5)*360./n)
+
+    ENDDO
+  ENDDO
+
+!  mpi_size=32
+  rank=(mpi_size-1)/2
+  ncell_x=sqrt(ncell_glo*1./mpi_size)
+
+  j1=nlat/2
+  DO WHILE(rank>=0)
+    j2=MAX(j1-ncell_x+1,1)
+    j=(j1+j2)/2
+    n=NINT(COS(Pi/2-(j-0.5)*PI/nlat)*nlon)
+    np = MIN(n/ncell_x,rank+1) ;
+    if (j2==1) np=rank+1
+
+    PRINT *,"domain ",j2,j1,rank,np ;
+    DO j=j2,j1
+      n=NINT(COS(Pi/2-(j-0.5)*PI/nlat)*nlon)
+      IF (n<8) n=8
+      DO i=1,n
+        ind=list_ind(i,j)
+        IF ( (i-1) < MOD(n,np)*(n/np+1)) THEN
+          i_index_glo(ind) = rank - (i-1)/(n/np+1)
+        ELSE
+          i_index_glo(ind) = rank-(MOD(n,np)+ (i-1-MOD(n,np)*(n/np+1))/(n/np))
+        ENDIF
+      ENDDO
+    ENDDO
+    rank=rank-np
+    j1=j2-1
+  ENDDO
+
+  rank=(mpi_size-1)/2+1
+  ncell_x=sqrt(ncell_glo*1./mpi_size)
+
+  j1=nlat/2+1
+  DO WHILE(rank<=mpi_size-1)
+    j2=MIN(j1+ncell_x-1,nlat)
+    j=(j1+j2)/2
+    n=NINT(COS(Pi/2-(j-0.5)*PI/nlat)*nlon)
+    np = MIN(n/ncell_x,mpi_size-rank) ;
+    if (j2==nlat) np=mpi_size-rank
+
+    PRINT *,"domain ",j2,j1,rank,np ;
+    DO j=j1,j2
+      n=NINT(COS(Pi/2-(j-0.5)*PI/nlat)*nlon)
+      IF (n<8) n=8
+      DO i=1,n
+        ind=list_ind(i,j)
+        IF ( (i-1) < MOD(n,np)*(n/np+1)) THEN
+          i_index_glo(ind) = rank + (i-1)/(n/np+1)
+        ELSE
+          i_index_glo(ind) = rank+(MOD(n,np)+ (i-1-MOD(n,np)*(n/np+1))/(n/np))
+        ENDIF
+      ENDDO
+    ENDDO
+    rank=rank+np
+    j1=j2+1
+  ENDDO
+
+  ncell=0
+  DO ind=1,ncell_glo
+    IF (i_index_glo(ind)==mpi_rank) ncell=ncell+1
+  ENDDO
+  ALLOCATE(i_index(ncell))
+  ALLOCATE(lon(ncell))
+  ALLOCATE(lat(ncell))
+  ALLOCATE(bounds_lon(4,ncell))
+  ALLOCATE(bounds_lat(4,ncell))
+  ALLOCATE(field_A_srf(ncell,llm))
+  ALLOCATE(mask(ncell))
+  ALLOCATE(n_local(ncell))
+  ncell=0
+  data_n_index=0
+  DO ind=1,ncell_glo
+    IF (i_index_glo(ind)==mpi_rank) THEN
+      ncell=ncell+1
+      i_index(ncell)=ind-1
+      lon(ncell)=lon_glo(ind)
+      lat(ncell)=lat_glo(ind)
+      bounds_lon(:,ncell)=bounds_lon_glo(:,ind)
+      bounds_lat(:,ncell)=bounds_lat_glo(:,ind)
+      field_A_srf(ncell,:)=i_index_glo(ind)
+      IF (MOD(ind,8)>=0 .AND. MOD(ind,8)<2) THEN
+        mask(ncell)=.FALSE.
+      ELSE
+        mask(ncell)=.TRUE.
+        data_n_index=data_n_index+1
+      ENDIF
+    ENDIF
+  ENDDO
+
+  ALLOCATE(field_A_compressed(data_n_index,llm))
+  ALLOCATE(data_i_index(data_n_index))
+  data_n_index=0
+  DO ind=1,ncell
+    IF (mask(ind)) THEN
+      data_n_index=data_n_index+1
+      data_i_index(data_n_index)=ind-1
+      field_A_compressed(data_n_index,:)=field_A_srf(ind,:)
+    ENDIF
+  ENDDO
+
+  CALL xios_context_initialize("surface",comm)
+  CALL xios_get_handle("surface",ctx_hdl)
+  CALL xios_set_current_context(ctx_hdl)
+
+  CALL xios_set_axis_attr("axis_srf",n_glo=llm ,value=lval) ;
+  CALL xios_set_domain_attr("domain_srf", ni_glo=ncell_glo, ni=ncell, ibegin=0, i_index=i_index)
+  CALL xios_set_domain_attr("domain_srf", type='unstructured', data_dim=1, data_ni=data_n_index, &
+                                          data_i_index=data_i_index)
+  CALL xios_set_domain_attr("domain_srf", lonvalue_1D=lon, latvalue_1D=lat)
+  CALL xios_set_domain_attr("domain_srf", nvertex=4, bounds_lon_1D=bounds_lon, bounds_lat_1D=bounds_lat)
+!  CALL xios_set_compute_connectivity_domain_attr("compute", n_neighbor=n_local, local_neighbor=local_neighbor)
+
+
+
+  dtime%second=3600
+  CALL xios_set_timestep(dtime)
+
+  !CALL MSE_XIOS_GAUSS_GRID(NDGLG,NDLON,NPRGPNS ,NPRGPEW,MYSETA,MYSETB)
+   CALL MSE_XIOS_GAUSS_GRID(127  ,255  ,mpi_size,1      ,mpi_rank+1, 1)
+
+  CALL xios_close_context_definition()
+
+  CALL xios_get_compute_connectivity_domain_attr("compute", n_neighbor_max=nbMax)
+  ALLOCATE(local_neighbor(nbMax,ncell))
+  CALL xios_get_compute_connectivity_domain_attr("compute", n_neighbor=n_local, local_neighbor=local_neighbor)
+
+   DO ts=1,24*10
+     CALL xios_update_calendar(ts)
+     CALL xios_send_field("field_A_srf",field_A_compressed)
+     CALL xios_send_field("field_B_srf",field_A_compressed(:,1))
+    ENDDO
+
+    CALL xios_context_finalize()
+
+  DEALLOCATE(lon_glo)
+  DEALLOCATE(lat_glo)
+  DEALLOCATE(bounds_lon_glo)
+  DEALLOCATE(bounds_lat_glo)
+  DEALLOCATE(i_index_glo)
+  DEALLOCATE(field_A_glo)
+  DEALLOCATE(mask_glo)
+  DEALLOCATE(i_index)
+  DEALLOCATE(lon)
+  DEALLOCATE(lat)
+  DEALLOCATE(bounds_lon)
+  DEALLOCATE(bounds_lat)
+  DEALLOCATE(field_A_srf)
+  DEALLOCATE(mask)
+  DEALLOCATE(field_A_compressed)
+  DEALLOCATE(data_i_index)
+
+  CALL MPI_COMM_FREE(comm, ierr)
+
+  CALL xios_finalize()
+
+CONTAINS
+SUBROUTINE MSE_XIOS_GAUSS_GRID(NDGLG,NDLON,NPRGPNS, NPRGPEW,MYSETA, MYSETB)
+!!
+!!     PURPOSE : declare to XIOS a distribution for a rectilinear grid
+!!     --------
+!
+USE XIOS     , ONLY : XIOS_DOMAIN, XIOS_DOMAINGROUP,XIOS_GET_HANDLE, &
+                      XIOS_ADD_CHILD, XIOS_SET_DOMAIN_ATTR
+!
+!
+IMPLICIT NONE
+!
+INTEGER, INTENT(IN) :: NDGLG,NDLON,NPRGPNS, NPRGPEW,MYSETA, MYSETB
+!
+!
+!*       0.2   Declarations of local variables
+!              -------------------------------
+!
+CHARACTER(LEN=8), PARAMETER       :: YNAMGRID="complete"
+INTEGER                           :: NI,NJ,I,J,IOFF,JOFF
+REAL                   :: ZINCR
+DOUBLE PRECISION, ALLOCATABLE, DIMENSION(:)   :: ZLATI,ZLONG
+!
+TYPE(xios_domaingroup)            :: domaingroup_hdl
+TYPE(xios_domain)                 :: domain_hdl
+!
+! Basic XIOS declarations
+ CALL XIOS_GET_HANDLE("domain_definition",domaingroup_hdl)
+ CALL XIOS_ADD_CHILD(domaingroup_hdl,domain_hdl,YNAMGRID)
+ CALL XIOS_SET_DOMAIN_ATTR(YNAMGRID, type="rectilinear", data_dim=2)
+!
+! Compute domain size in longitude 
+!
+IF (MOD(NDLON,NPRGPEW)==0) THEN 
+   NI=NDLON/NPRGPEW
+   IOFF=(MYSETB-1)*NI
+ELSE
+   NI=NDLON/NPRGPEW+1
+   IOFF=(MYSETB-1)*NI
+   IF (MYSETB==NPRGPEW) NI=MOD(NDLON,NI)
+ENDIF
+!
+! Compute evenly spaced longitudes
+!
+ALLOCATE(ZLONG(NI))
+ZINCR=360./NDLON
+DO I=1,NI
+   ZLONG(I)=(IOFF+I)*ZINCR
+ENDDO
+!
+write(0,*) 'i=',IOFF+1,IOFF+NI
+CALL XIOS_SET_DOMAIN_ATTR(YNAMGRID, ni_glo=NDLON, ni=NI,ibegin=IOFF)
+ CALL XIOS_SET_DOMAIN_ATTR(YNAMGRID, lonvalue_1d=ZLONG(:))
+!
+! Compute domain size in latitude 
+!
+IF (MOD(NDGLG,NPRGPNS)==0) THEN 
+   NJ=NDGLG/NPRGPNS
+   JOFF=(MYSETA-1)*NJ
+ELSE
+   NJ=NDGLG/NPRGPNS+1
+   JOFF=(MYSETA-1)*NJ
+   IF (MYSETA==NPRGPNS) NJ=MOD(NDGLG,NJ)
+ENDIF
+!
+ALLOCATE(ZLATI(NJ))
+ZINCR=180./NDGLG
+DO J=1,NJ
+   ZLATI(J)=(JOFF+J)*ZINCR
+ENDDO
+!
+!write(0,*) 'j=',JOFF+1,JOFF+NJ ; call flush(0)
+ CALL XIOS_SET_DOMAIN_ATTR(YNAMGRID, nj_glo=NDGLG, nj=NJ, jbegin=JOFF)
+ CALL XIOS_SET_DOMAIN_ATTR(YNAMGRID,latvalue_1d=ZLATI(:)-90.)
+!
+ DEALLOCATE(ZLATI,ZLONG)!,ZLATIC,ZLONGC)
+END SUBROUTINE MSE_XIOS_GAUSS_GRID
+
+END PROGRAM test_unstruct_complete
+
+
+
+
+
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/test/test_xios.cpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/test/test_xios.cpp	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/test/test_xios.cpp	(revision 1749)
@@ -0,0 +1,118 @@
+#include "xios.hpp"
+#include "attribute_template.hpp"
+#include "buffer_out.hpp"
+#include "buffer_in.hpp"
+#include "type.hpp"
+#include "cxios.hpp"
+#include "client.hpp"
+#include "event_client.hpp"
+#include "context.hpp"
+#include "context_client.hpp"
+#include "context_server.hpp"
+#include "object_template.hpp"
+#include "array_new.hpp"
+#include "mpi.hpp"
+
+
+using namespace std ;
+
+int main (int argc, char ** argv, char ** UNUSED (env))
+{
+  
+  int a=3 ;
+  int b=2 ;
+  int c=1 ;
+  int buff[100] ;
+  string str("titi") ;
+   CBufferOut bufferOut(&buff,sizeof(buff)) ;
+   CBufferIn  bufferIn(&buff,sizeof(buff)) ;
+   CMessage msg ;
+
+   CAttributeArray<double,1> tabIn("in") ;
+   CAttributeArray<double,1> tabOut("out") ;
+
+   CArray<double,1> tab(5)
+    tab=0,1,2,3,4 ;
+    tabIn=tab ;
+    tab= 4,3,2,1,0
+    tabOut=tab ;
+//   tabOut=1 ;
+   tabIn.toBuffer(bufferOut) ;
+   tabOut.fromBuffer(bufferIn) ;
+   
+   cout<<"attribut<Arraydouble,5>>="<<tabOut.toString()<<endl ;
+   
+   MPI_Init(&argc,&argv) ;
+   int rank ;
+   int size ;
+   char buffer[128] ;
+   
+   MPI_Comm_rank(MPI_COMM_WORLD,&rank) ;
+   if (rank>=0 && rank<=1) 
+   {
+     CXios::initClientSide("test1") ;
+     CClient::registerContext("toto",CClient::intraComm) ;
+//     CClient::registerContext("tata",CClient::intraComm) ;
+     CClient::registerContext("tutu",CClient::intraComm) ;
+     CContext::setCurrent("tutu") ;
+     CContext*  tutu=CContext::get("tutu").get() ; 
+     
+     
+     CContext::setCurrent("toto") ;
+     CContext*  toto=(CContext::get("toto").get() ;
+     toto->calendar_type.setValue("NoLeap") ;
+     toto->sendAttributToServer("calendar_type" );
+
+
+       for(int i=0;i<0;i++)
+       {
+         CMessage msg ;
+         int count ;
+         int msgSize; 
+         CEventClient event(1,1) ;
+         count=rand()%32 ;
+         msg<<string("toto")<<string(buffer,count)<<rank<<msgSize;
+         msgSize=msg.size() ;
+         event.push(0,2,msg) ;
+         event.push(1,2,msg) ;
+         toto->client->sendEvent(event) ;
+         cout<<"Send Event from toto : size "<<msgSize<<endl ;
+       }
+     toto->client->finalize() ;
+     tutu->client->finalize() ;
+     CXios::clientFinalize() ;
+   }
+   else if (rank>=2 && rank<=3) CXios::initServerSide();
+   else if (rank>=4 && rank<=6) 
+   {
+     CXios::initClientSide("test2") ;
+     CClient::registerContext("tito",CClient::intraComm) ;
+     CContext::setCurrent("tito") ;
+     CContext*  tito=CContext::get("tito").get() ;
+      
+     CClient::registerContext("tete",CClient::intraComm) ;
+     CContext::setCurrent("tete") ;
+     CContext*  tete=CContext::get("tete").get() ; 
+
+     tito->client->finalize() ;
+     tete->client->finalize() ;
+     CXios::clientFinalize() ;
+   } 
+   else if (rank>=7 && rank<=7) 
+   {
+     CXios::initClientSide("test3") ;
+     CClient::registerContext("turlututu",CClient::intraComm) ;
+     CContext::setCurrent("turlututu") ;
+     CContext*  turlututu=CContext::get("turlututu").get() ; 
+     turlututu->client->finalize() ;
+     CXios::clientFinalize() ;
+   }
+   
+   
+  
+   MPI_Barrier(MPI_COMM_WORLD); 
+   MPI_Finalize() ;
+
+  return EXIT_SUCCESS ;
+ 
+}
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/test/test_xios2_cmip6.f90
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/test/test_xios2_cmip6.f90	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/test/test_xios2_cmip6.f90	(revision 1749)
@@ -0,0 +1,247 @@
+PROGRAM test_xios2_cmip6
+
+  USE xios
+  USE mod_wait
+  IMPLICIT NONE
+  INCLUDE "mpif.h"
+
+  INTEGER,PARAMETER :: model_timestep=600, il_unit=10
+  INTEGER :: comm, rank, size_loc, ierr
+  INTEGER :: ni,ibegin,iend,nj,jbegin,jend
+  INTEGER :: i,j,l,ts,n, nb_pt, il_run
+  CHARACTER(len=*),PARAMETER :: id="client"
+  TYPE(xios_duration)  :: dtime
+  TYPE(xios_context) :: ctx_hdl
+  DOUBLE PRECISION,ALLOCATABLE :: lon_glo(:,:),lat_glo(:,:),lval(:)
+  DOUBLE PRECISION,ALLOCATABLE :: field_A_glo (:,:,:)
+  DOUBLE PRECISION,ALLOCATABLE :: lon(:,:),lat(:,:),lonvalue(:,:)
+  DOUBLE PRECISION,ALLOCATABLE :: field_atm_2D(:,:),field_atm_3D(:,:,:),field_srf_2D(:),field_srf_3D(:,:)
+  DOUBLE PRECISION,ALLOCATABLE :: field_oce_2D(:,:),field_oce_3D(:,:,:)
+  INTEGER, ALLOCATABLE :: kindex(:)
+
+  INTEGER :: ni_glo, nj_glo,llm,nb_days_run,nb_run
+
+  NAMELIST /param_toy/ ni_glo, nj_glo,llm,nb_days_run,nb_run
+
+!!! MPI Initialization
+
+  CALL MPI_INIT(ierr)
+
+  CALL init_wait
+
+!!! Lecture des parametres du run
+
+  OPEN(unit=il_unit, file='param.def',status='old',iostat=ierr)
+  READ (il_unit, nml=param_toy)
+  PRINT *, ni_glo, nj_glo,llm,nb_days_run,nb_run
+
+!!! XIOS Initialization (get the local communicator)
+
+  CALL xios_initialize(id,return_comm=comm)
+
+  CALL MPI_COMM_RANK(comm,rank,ierr)
+  CALL MPI_COMM_SIZE(comm,size_loc,ierr)
+
+!!! Initialisation et allocation des coordonnÃ©es globales et locales pour la grille rÃ©guliÃšre
+
+  ALLOCATE (lon_glo(ni_glo,nj_glo),lat_glo(ni_glo,nj_glo))
+  ALLOCATE (field_A_glo(ni_glo,nj_glo,llm))
+  ALLOCATE (lval(llm))
+
+  DO j=1,nj_glo
+    DO i=1,ni_glo
+      lon_glo(i,j)=(i-1)+(j-1)*ni_glo
+      lat_glo(i,j)=1000+(i-1)+(j-1)*ni_glo
+      DO l=1,llm
+        field_A_glo(i,j,l)=(i-1)+(j-1)*ni_glo+10000*l
+      ENDDO
+    ENDDO
+  ENDDO
+  ni=ni_glo ; ibegin=0
+
+  jbegin=0
+  DO n=0,size_loc-1
+    nj=nj_glo/size_loc
+    IF (n<MOD(nj_glo,size_loc)) nj=nj+1
+    IF (n==rank) exit
+    jbegin=jbegin+nj
+  ENDDO
+
+  iend=ibegin+ni-1 ; jend=jbegin+nj-1
+
+  ALLOCATE(lon(ni,nj),lat(ni,nj),lonvalue(ni,nj))
+  lon(:,:)=lon_glo(ibegin+1:iend+1,jbegin+1:jend+1)
+  lat(:,:)=lat_glo(ibegin+1:iend+1,jbegin+1:jend+1)
+
+  DO i=1,llm
+    lval(i)=i
+  ENDDO
+
+!###########################################################################
+! Contexte ATM
+!###########################################################################
+  ALLOCATE(field_atm_2D(0:ni+1,-1:nj+2),field_atm_3D(0:ni+1,-1:nj+2,llm))
+  field_atm_2D(1:ni,1:nj)=field_A_glo(ibegin+1:iend+1,jbegin+1:jend+1,1)
+  field_atm_3D(1:ni,1:nj,:)=field_A_glo(ibegin+1:iend+1,jbegin+1:jend+1,:)
+
+  CALL xios_context_initialize("atmosphere",comm)
+  CALL xios_get_handle("atmosphere",ctx_hdl)
+  CALL xios_set_current_context(ctx_hdl)
+
+  CALL xios_set_axis_attr("axis_atm",n_glo=llm ,value=lval) ;
+
+  CALL xios_set_domain_attr("domain_atm",ni_glo=ni_glo, nj_glo=nj_glo, ibegin=ibegin, ni=ni,jbegin=jbegin,nj=nj, type='rectilinear')
+  CALL xios_set_domain_attr("domain_atm",data_dim=2, data_ibegin=-1, data_ni=ni+2, data_jbegin=-2, data_nj=nj+4)
+  CALL xios_set_domain_attr("domain_atm",lonvalue_2D=lon,latvalue_2D=lat)
+
+
+!!! Definition du timestep
+
+  dtime%second=model_timestep
+  CALL xios_set_timestep(timestep=dtime)
+
+!!! Fin de la definition du contexte
+
+  CALL xios_close_context_definition()
+
+
+!###########################################################################
+! Contexte SRF
+!###########################################################################
+
+!!! Initialisation des coordonnÃ©es globales et locales pour la grille indexee (1 point sur 2)
+
+    nb_pt=ni*nj/2
+    ALLOCATE(kindex(nb_pt),field_srf_2D(nb_pt),field_srf_3D(nb_pt,llm))
+    DO i=1,nb_pt
+      kindex(i)=2*i-1
+    ENDDO
+    field_srf_2D(1:nb_pt)=RESHAPE(field_A_glo(ibegin+1:iend+1:2,jbegin+1:jend+1,1),(/ nb_pt /))
+    field_srf_3D(1:nb_pt,:)=RESHAPE(field_A_glo(ibegin+1:iend+1:2,jbegin+1:jend+1,:),(/ nb_pt,llm /))
+
+  CALL xios_context_initialize("surface",comm)
+  CALL xios_get_handle("surface",ctx_hdl)
+  CALL xios_set_current_context(ctx_hdl)
+
+  CALL xios_set_axis_attr("axis_srf",n_glo=llm ,value=lval)
+  CALL xios_set_domain_attr("domain_srf",ni_glo=ni_glo, nj_glo=nj_glo, ibegin=ibegin, ni=ni,jbegin=jbegin,nj=nj, type='rectilinear')
+  CALL xios_set_domain_attr("domain_srf",data_dim=1, data_ibegin=0, data_ni=nb_pt)
+  CALL xios_set_domain_attr("domain_srf",data_i_index=kindex)
+  CALL xios_set_domain_attr("domain_srf",lonvalue_2D=lon,latvalue_2D=lat)
+
+!!! Definition du timestep
+
+  dtime%second=model_timestep
+  CALL xios_set_timestep(timestep=dtime)
+
+!!! Fin de la definition du contexte SRF
+
+  CALL xios_close_context_definition()
+
+!###########################################################################
+! Contexte OCE
+!###########################################################################
+  ALLOCATE(field_oce_2D(0:ni+1,-1:nj+2),field_oce_3D(0:ni+1,-1:nj+2,llm))
+  field_oce_2D(1:ni,1:nj)=field_A_glo(ibegin+1:iend+1,jbegin+1:jend+1,1)
+  field_oce_3D(1:ni,1:nj,:)=field_A_glo(ibegin+1:iend+1,jbegin+1:jend+1,:)
+
+  CALL xios_context_initialize("nemo",comm)
+  CALL xios_get_handle("nemo",ctx_hdl)
+  CALL xios_set_current_context(ctx_hdl)
+
+  CALL xios_set_axis_attr("axis_oce",n_glo=llm ,value=lval) ;
+
+  CALL xios_set_domain_attr("domain_oce",ni_glo=ni_glo, nj_glo=nj_glo, ibegin=ibegin, ni=ni,jbegin=jbegin,nj=nj, type='curvilinear')
+  CALL xios_set_domain_attr("domain_oce",data_dim=2, data_ibegin=-1, data_ni=ni+2, data_jbegin=-2, data_nj=nj+4)
+  CALL xios_set_domain_attr("domain_oce",lonvalue_2D=lon,latvalue_2D=lat)
+
+
+!!! Definition du timestep
+
+  dtime%second=model_timestep
+  CALL xios_set_timestep(timestep=dtime)
+
+  CALL xios_close_context_definition()
+
+!####################################################################################
+!!! Boucle temporelle
+!####################################################################################
+    DO ts=1,86400/model_timestep*nb_days_run
+
+      CALL xios_get_handle("atmosphere",ctx_hdl)
+      CALL xios_set_current_context(ctx_hdl)
+
+!!! Mise a jour du pas de temps
+
+      CALL xios_update_calendar(ts)
+
+!!! On donne la valeur du champ atm
+
+      CALL xios_send_field("field_atm_2D",field_atm_2D)
+      CALL xios_send_field("field_atm_3D",field_atm_3D)
+      
+!!! On change de contexte
+
+      CALL xios_get_handle("surface",ctx_hdl)
+      CALL xios_set_current_context(ctx_hdl)
+
+!!! Mise a jour du pas de temps
+
+      CALL xios_update_calendar(ts)
+
+!!! On donne la valeur du champ srf
+
+      CALL xios_send_field("field_srf_2D",field_srf_2D)
+      CALL xios_send_field("field_srf_3D",field_srf_3D)
+
+!!! On change de contexte
+
+      CALL xios_get_handle("nemo",ctx_hdl)
+      CALL xios_set_current_context(ctx_hdl)
+
+!!! Mise a jour du pas de temps
+
+      CALL xios_update_calendar(ts)
+
+!!! On donne la valeur du champ srf
+
+      CALL xios_send_field("field_oce_grid_2D",field_oce_2D)
+      CALL xios_send_field("field_oce_grid_3D",field_oce_3D)
+
+      CALL wait_us(5000) ;
+    ENDDO
+
+!####################################################################################
+!!! Finalisation
+!####################################################################################
+
+!!! Fin des contextes
+
+    CALL xios_context_finalize()
+    CALL xios_get_handle("atmosphere",ctx_hdl)
+    CALL xios_set_current_context(ctx_hdl)
+    CALL xios_context_finalize()
+    CALL xios_get_handle("surface",ctx_hdl)
+    CALL xios_set_current_context(ctx_hdl)
+    CALL xios_context_finalize()
+
+    DEALLOCATE(lon, lat, lonvalue, field_atm_2D, field_atm_3D)
+    DEALLOCATE(kindex, field_srf_2D, field_srf_3D)
+    DEALLOCATE(field_oce_2D, field_oce_3D)
+    DEALLOCATE(lon_glo,lat_glo,field_A_glo,lval)
+
+!!! Fin de XIOS
+
+    CALL MPI_COMM_FREE(comm, ierr)
+      
+    CALL xios_finalize()
+
+  CALL MPI_FINALIZE(ierr)
+
+END PROGRAM test_xios2_cmip6
+
+
+
+
+
+
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/test/test_xios_interface.f90
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/test/test_xios_interface.f90	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/test/test_xios_interface.f90	(revision 1749)
@@ -0,0 +1,359 @@
+PROGRAM test_xios_interface
+
+  ! This test is based on test_complete
+  USE xios
+  USE mod_wait
+  IMPLICIT NONE
+  INCLUDE "mpif.h"
+  INTEGER :: rank
+  INTEGER :: size_loc
+  INTEGER :: ierr
+
+  CHARACTER(len=*),PARAMETER :: id="client"
+  INTEGER :: comm
+  TYPE(xios_date)      :: start_date, time_origin
+  TYPE(xios_duration)  :: dtime
+  TYPE(xios_context) :: ctx_hdl
+  INTEGER,PARAMETER :: ni_glo=10
+  INTEGER,PARAMETER :: nj_glo=10
+  INTEGER,PARAMETER :: llm=5
+  DOUBLE PRECISION  :: lval(llm)=1
+  TYPE(xios_field) :: field_hdl
+  TYPE(xios_fieldgroup) :: fieldgroup_hdl
+  TYPE(xios_file) :: file_hdl
+  LOGICAL :: ok
+  CHARACTER(len=256) :: crname
+
+  DOUBLE PRECISION,DIMENSION(ni_glo,nj_glo) :: lon_glo,lat_glo
+  DOUBLE PRECISION :: field_A_glo(ni_glo,nj_glo,llm)
+  DOUBLE PRECISION,ALLOCATABLE :: lon(:,:),lat(:,:),field_A_atm(:,:,:), field_A_srf(:,:), lonvalue(:)
+  INTEGER, ALLOCATABLE :: kindex(:)
+  INTEGER :: ni,ibegin,iend,nj,jbegin,jend
+  INTEGER :: i,j,l,ts,n, nb_pt
+
+  INTEGER :: var_val_int
+  REAL :: var_val_float
+  DOUBLE PRECISION :: var_val_double
+  LOGICAL :: var_val_bool
+  CHARACTER(len=256) :: var_val_char =""
+  CHARACTER(len=256) :: var_id
+
+!!! MPI Initialization
+
+  CALL MPI_INIT(ierr)
+
+  CALL init_wait
+
+!!! XIOS Initialization (get the local communicator)
+
+  CALL xios_initialize(id,return_comm=comm)
+
+  CALL MPI_COMM_RANK(comm,rank,ierr)
+  CALL MPI_COMM_SIZE(comm,size_loc,ierr)
+
+!-------------------------------------------------------------------------------
+!
+! Define all neccessary values for test
+!
+!-------------------------------------------------------------------------------
+!###########################################################################
+! Contexte ATM
+!###########################################################################
+
+!!! Initialisation des coordonnÃ©es globales et locales pour la grille rÃ©guliÃšre
+
+  DO j=1,nj_glo
+    DO i=1,ni_glo
+      lon_glo(i,j)=(i-1)+(j-1)*ni_glo
+      lat_glo(i,j)=1000+(i-1)+(j-1)*ni_glo
+      DO l=1,llm
+        field_A_glo(i,j,l)=(i-1)+(j-1)*ni_glo+10000*l
+      ENDDO
+    ENDDO
+  ENDDO
+  ni=ni_glo ; ibegin=1
+
+  jbegin=1
+  DO n=0,size_loc-1
+    nj=nj_glo/size_loc
+    IF (n<MOD(nj_glo,size_loc)) nj=nj+1
+    IF (n==rank) exit
+    jbegin=jbegin+nj
+  ENDDO
+
+  iend=ibegin+ni-1 ; jend=jbegin+nj-1
+
+  ALLOCATE(lon(ni,nj),lat(ni,nj),field_A_atm(0:ni+1,-1:nj+2,llm),lonvalue(ni*nj))
+  lon(:,:)=lon_glo(ibegin:iend,jbegin:jend)
+  lat(:,:)=lat_glo(ibegin:iend,jbegin:jend)
+  field_A_atm(1:ni,1:nj,:)=field_A_glo(ibegin:iend,jbegin:jend,:)
+
+
+!!! Context ATMOSPHERE
+
+  CALL xios_context_initialize("atmosphere",comm)
+  CALL xios_get_handle("atmosphere",ctx_hdl)
+  CALL xios_set_current_context(ctx_hdl)
+
+  CALL xios_define_calendar(type="Gregorian", &
+                            start_date=xios_date(2000, 01, 01, 00, 00, 00), &
+                            time_origin=xios_date(1999, 01, 01, 15, 00, 00))
+
+  CALL xios_set_axis_attr("axis_atm",size=llm ,value=lval) ;
+
+  CALL xios_set_domain_attr("domain_atm",ni_glo=ni_glo, nj_glo=nj_glo, ibegin=ibegin, ni=ni,jbegin=jbegin,nj=nj)
+  CALL xios_set_domain_attr("domain_atm",data_dim=2, data_ibegin=-1, data_ni=ni+2, data_jbegin=-2, data_nj=nj+4)
+  CALL xios_set_domain_attr("domain_atm",lonvalue=RESHAPE(lon,(/ni*nj/)),latvalue=RESHAPE(lat,(/ni*nj/)))
+
+  CALL xios_set_domain_attr("domain_atm_zoom",ni_glo=ni_glo, nj_glo=nj_glo, ibegin=ibegin, ni=ni,jbegin=jbegin,nj=nj)
+  CALL xios_set_domain_attr("domain_atm_zoom",data_dim=2, data_ibegin=-1, data_ni=ni+2, data_jbegin=-2, data_nj=nj+4)
+  CALL xios_set_domain_attr("domain_atm_zoom",lonvalue=RESHAPE(lon,(/ni*nj/)),latvalue=RESHAPE(lat,(/ni*nj/)))
+
+!!! Activation du groupe field_definition
+  CALL xios_set_fieldgroup_attr("field_definition",enabled=.TRUE.)
+
+!!! CrÃ©ation d un nouveau champ
+  CALL xios_get_handle("field_definition",fieldgroup_hdl)
+  CALL xios_add_child(fieldgroup_hdl,field_hdl,"field_B_atm")
+
+!!! Heritage des attributs d un autre champ
+  CALL xios_set_attr(field_hdl,field_ref="field_A_atm",name="field_B_atm")
+
+!!! Affectation de ce nouveau champ au fichier avec un nouveau nom
+
+  CALL xios_get_handle("output_atmosphere",file_hdl)
+  CALL xios_add_child(file_hdl,field_hdl)
+  CALL xios_set_attr(field_hdl,field_ref="field_B_atm",name="field_C_atm")
+
+!!! Definition du timestep
+
+  dtime%second=3600
+  CALL xios_set_timestep(timestep=dtime)
+
+!!! Recupration des valeurs des longitudes et de taille des domaines locaux (pour test de fonctionnalitÃ©)
+
+  ni=0 ; lonvalue(:)=0
+  CALL xios_get_domain_attr("domain_atm",ni=ni,lonvalue=lonvalue)
+
+  PRINT *,"ni",ni
+  PRINT *,"lonvalue",lonvalue ;
+
+!!! Fin de la definition du contexte
+
+  CALL xios_close_context_definition()
+
+!!! Test des valeurs des champs/fichiers
+
+  !!! Attribut defini ?
+
+  CALL xios_is_defined_field_attr("field_A_atm",enabled=ok)
+  PRINT *,"field_A_atm : attribute enabled is defined ? ",ok
+
+  !!! Recuperer la valeur d un attribut
+
+  CALL xios_get_field_attr("field_A_atm",name=crname)
+  PRINT *,"field_A_atm : attribute name is : ",TRIM(crname)
+
+  !!! Champ actif (besoin de fournir la valeur) ?
+
+    PRINT*,"field field_A_atm is active ? ",xios_field_is_active("field_A_atm")
+
+  !!! Champ defini ?
+
+    PRINT*,"field field_A_atm is valid ?",xios_is_valid_field("field_A_atm")
+
+
+!###########################################################################
+! Contexte SRF
+!###########################################################################
+
+!!! Initialisation des coordonnÃ©es globales et locales pour la grille indexee (1 point sur 2)
+
+    nb_pt=ni*nj/2
+    ALLOCATE(kindex(nb_pt),field_A_srf(nb_pt,llm))
+    DO i=1,nb_pt
+      kindex(i)=2*i-1
+    ENDDO
+    field_A_srf(1:nb_pt,:)=RESHAPE(field_A_glo(ibegin:iend:2,jbegin:jend,:),(/ nb_pt,llm /))
+
+  CALL xios_context_initialize("surface",comm)
+  CALL xios_get_handle("surface",ctx_hdl)
+  CALL xios_set_current_context(ctx_hdl)
+
+  CALL xios_define_calendar(type="Gregorian", &
+                            start_date=xios_date(2000, 01, 01, 00, 00, 00), &
+                            time_origin=xios_date(1999, 01, 01, 15, 00, 00))
+
+  CALL xios_set_axis_attr("axis_srf",size=llm ,value=lval) ;
+  CALL xios_set_domain_attr("domain_srf",ni_glo=ni_glo, nj_glo=nj_glo, ibegin=ibegin, ni=ni,jbegin=jbegin,nj=nj)
+  CALL xios_set_domain_attr("domain_srf",data_dim=1, data_ibegin=0, data_ni=nb_pt)
+  CALL xios_set_domain_attr("domain_srf",data_n_index=nb_pt, data_i_index=kindex)
+  CALL xios_set_domain_attr("domain_srf",lonvalue=RESHAPE(lon,(/ni*nj/)),latvalue=RESHAPE(lat,(/ni*nj/)))
+
+!!! CrÃ©ation d un nouveau champ
+
+  CALL xios_get_handle("field_definition",fieldgroup_hdl)
+  CALL xios_add_child(fieldgroup_hdl,field_hdl,"field_B_srf")
+
+!!! Heritage des attributs d un autre champ
+
+  CALL xios_set_attr(field_hdl,field_ref="field_A_srf",name="field_B_srf")
+
+!!! Affectation de ce nouveau champ au fichier avec un nouveau nom
+
+  CALL xios_get_handle("output_surface",file_hdl)
+  CALL xios_add_child(file_hdl,field_hdl)
+  CALL xios_set_attr(field_hdl,field_ref="field_B_srf",name="field_C_srf")
+
+!!! Definition du timestep
+
+  dtime%second=1800
+  CALL xios_set_timestep(timestep=dtime)
+
+!!! Recupration des valeurs des longitudes et de taille des domaines locaux (pour test de fonctionnalitÃ©)
+
+  ni=0 ; lonvalue(:)=0
+  CALL xios_get_domain_attr("domain_srf",ni=ni,lonvalue=lonvalue)
+
+  PRINT *,"ni",ni
+  PRINT *,"lonvalue",lonvalue ;
+
+!!! Fin de la definition du contexte SRF
+!-------------------------------------------------------------------------------
+!
+! Get/set variable in differenct contexts
+!
+!-------------------------------------------------------------------------------
+
+  !! Try getting some variable values
+  var_id = "my_attribute1"
+  ok = xios_getVar(var_id, var_val_char)
+  if (ok) then
+    print*, "Value of ", var_id, " is : ", var_val_char
+  end if
+
+  var_id = "my_attribute2"
+  ok = xios_getVar(var_id, var_val_int)
+  if (ok) then
+    print*, "Value of ", var_id, " is : ", var_val_int
+  end if
+
+  var_id = "my_attribute3"
+  ok = xios_getVar(var_id, var_val_float)
+  if (ok) then
+    print*, "Value of ", var_id, " is : ", var_val_float
+  end if
+
+  var_id = "my_attribute4"
+  ok = xios_getVar(var_id, var_val_double)
+  if (ok) then
+    print*, "Value of ", var_id, " is : ", var_val_double
+  end if
+
+  var_id = "my_global_attribute_bool"
+  ok = xios_getVar(var_id, var_val_bool)
+  if (ok) then
+    print*, "Value of ", var_id, " is : ", var_val_bool
+  end if
+
+  !! Try setting some variables
+  var_id = "my_attribute1"
+  var_val_char = "ocean_att"
+  ok = xios_setVar(var_id, var_val_char)
+  if (ok) then
+    print*, "New value of ", var_id, " is : ", var_val_char
+  end if
+
+  var_id = "my_attribute2"
+  var_val_int = 50
+  ok = xios_setVar(var_id, var_val_int)
+  if (ok) then
+    print*, "New value of ", var_id, " is : ", var_val_int
+  end if
+
+  var_id = "my_attribute3"
+  var_val_float = 7.8
+  ok = xios_setVar(var_id, var_val_float)
+  if (ok) then
+    print*, "New value of ", var_id, " is : ", var_val_float
+  end if
+
+  var_id = "my_attribute4"
+  var_val_double=300.21
+  ok = xios_setVar(var_id, var_val_double)
+  if (ok) then
+    print*, "New value of ", var_id, " is : ", var_val_double
+  end if
+
+  var_id = "my_global_attribute_bool"
+  var_val_bool = .true.
+  ok = xios_setVar(var_id, var_val_bool)
+  if (ok) then
+    print*, "New value of ", var_id, " is : ", var_val_bool
+  end if
+!
+!!!! Fin de la definition du contexte SRF
+  CALL xios_close_context_definition()
+
+!####################################################################################
+!!! Boucle temporelle
+!####################################################################################
+
+    DO ts=1,24*10
+
+      CALL xios_get_handle("atmosphere",ctx_hdl)
+      CALL xios_set_current_context(ctx_hdl)
+
+!!! Mise a jour du pas de temps
+
+      CALL xios_update_calendar(ts)
+
+!!! On donne la valeur du champ atm
+
+      CALL xios_send_field("field_A_atm",field_A_atm)
+
+!!! On change de contexte
+
+      CALL xios_get_handle("surface",ctx_hdl)
+      CALL xios_set_current_context(ctx_hdl)
+
+!!! Mise a jour du pas de temps
+
+      CALL xios_update_calendar(ts)
+
+!!! On donne la valeur du champ srf
+
+      CALL xios_send_field("field_A_srf",field_A_srf)
+
+      CALL wait_us(5000) ;
+    ENDDO
+
+!####################################################################################
+!!! Finalisation
+!####################################################################################
+
+!!! Fin des contextes
+
+    CALL xios_context_finalize()
+    CALL xios_get_handle("atmosphere",ctx_hdl)
+    CALL xios_set_current_context(ctx_hdl)
+    CALL xios_context_finalize()
+
+    DEALLOCATE(lon, lat, field_A_atm, lonvalue)
+    DEALLOCATE(kindex, field_A_srf)
+
+!!! Fin de XIOS
+
+    CALL MPI_COMM_FREE(comm, ierr)
+
+    CALL xios_finalize()
+
+    CALL MPI_FINALIZE(ierr)
+
+  END PROGRAM test_xios_interface
+
+
+
+
+
+
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/test_enum.hpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/test_enum.hpp	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/test_enum.hpp	(revision 1749)
@@ -0,0 +1,24 @@
+
+
+namespace xios
+{
+  
+    
+  class CEnum_color
+  {
+    public:
+    enum t_enum { rouge=0, vert, bleu} ;
+    t_enum val ;
+    
+    const char** getStr(void) { static const char * enumStr[] = { "rouge", "vert", "bleu" } ; return enumStr ; }   
+    int getSize(void) { return 3 ; }   
+  } ;
+  
+  template <typename CEnumType>
+  class CEnum : public CEnumType
+  {
+    public :
+//    typedef CEnum<CEnumType>::t_enum  myEnum; 
+  } ;
+}
+     
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/timer.cpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/timer.cpp	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/timer.cpp	(revision 1749)
@@ -0,0 +1,69 @@
+#include "timer.hpp"
+#include "mpi.hpp"
+#include <string>
+#include <map>
+#include <iostream>
+#include <sstream>
+#include "tracer.hpp"
+
+namespace xios
+{
+  std::map<std::string,CTimer> CTimer::allTimer;
+  
+  CTimer::CTimer(const std::string& name_) : name(name_) 
+  { 
+    reset();
+  }
+
+  double CTimer::getTime(void)
+  {
+    return MPI_Wtime();
+  }
+  
+  void CTimer::suspend(void)
+  {
+    if (!suspended) 
+    {
+      traceEnd(name);
+      cumulatedTime += getTime() - lastTime;
+    }
+    suspended = true;
+  }
+  
+  void CTimer::resume(void)
+  {
+    if (suspended) 
+    {
+      lastTime = getTime();
+      traceBegin(name);
+    }
+    suspended = false;
+  }
+  
+  void CTimer::reset(void)
+  {
+    cumulatedTime = 0.;
+    suspended = true;
+  }
+  
+  double CTimer::getCumulatedTime(void)
+  {
+    return cumulatedTime;
+  }
+  
+  CTimer& CTimer::get(const std::string name)
+  {
+    std::map<std::string,CTimer>::iterator it = allTimer.find(name);
+    if (it == allTimer.end())
+      it = allTimer.insert(std::make_pair(name, CTimer(name))).first;
+    return it->second;
+  }
+
+  string CTimer::getAllCumulatedTime(void)
+  {
+    std::ostringstream strOut ;
+    for(std::map<std::string,CTimer>::iterator it=allTimer.begin();it!=allTimer.end();++it)
+      strOut<<"Timer : "<<it->first<<"    -->   cumulated time : "<<it->second.getCumulatedTime()<<std::endl ;
+    return strOut.str() ;
+  }
+}
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/timer.hpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/timer.hpp	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/timer.hpp	(revision 1749)
@@ -0,0 +1,31 @@
+#ifndef __XIOS_TIMER_HPP__
+#define __XIOS_TIMER_HPP__
+
+#include <string>
+#include <map>
+
+namespace xios
+{
+  class CTimer
+  {
+    public:
+      double cumulatedTime;
+      double lastTime;
+      bool suspended;
+      std::string name;
+
+      CTimer(const std::string& name);
+      void suspend(void);
+      void resume(void);
+      void reset(void);
+      double getCumulatedTime(void);
+      static std::map<std::string,CTimer> allTimer;
+      static double getTime(void);
+      static CTimer& get(std::string name);
+      static std::string getAllCumulatedTime(void) ;
+  };
+}
+
+
+
+#endif
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/tracer.cpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/tracer.cpp	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/tracer.cpp	(revision 1749)
@@ -0,0 +1,101 @@
+#include "tracer.hpp"
+
+#if defined(VTRACE)
+
+#include <vt_user.h>
+
+#elif defined(SCOREP)
+
+#include <scorep/SCOREP_User.h>
+
+#elif defined(ITAC)
+
+#include <VT.h>
+
+#endif
+
+#include <string>
+#include <map>
+#include <iostream>
+
+namespace xios
+{
+  using namespace std ;
+
+  std::map<std::string,int> regionId ;
+  int count=0 ;
+  
+  void traceOn(void)
+  {
+#if defined(VTRACE)
+    VT_ON() ;
+#elif defined(SCOREP)
+    SCOREP_RECORDING_ON() ;
+#elif defined(ITAC)
+    VT_traceon() ;
+#endif
+  }
+  
+  void traceOff(void) 
+  {
+#if defined(VTRACE)
+    VT_OFF() ;
+#elif defined(SCOREP)
+    SCOREP_RECORDING_OFF()
+#elif defined(ITAC)
+    VT_traceoff()   ;  
+#endif
+  }
+  
+  void traceBegin(const string& name)
+  {
+#if defined(VTRACE)
+    VT_USER_START(name.c_str()) ;
+#elif defined(SCOREP)
+    SCOREP_USER_REGION_BY_NAME_BEGIN(name.c_str(),SCOREP_USER_REGION_TYPE_COMMON)
+
+#elif defined(ITAC)
+    int classhandle ;
+    auto it = regionId.find(name);
+    if (it==regionId.end())
+    {
+      classhandle=count ;
+      count++ ;
+      VT_symdef (classhandle, name.c_str(), "XIOS") ;
+      regionId[name]=classhandle;
+    }
+    else classhandle = it->second ;
+    VT_begin(classhandle) ;
+    cout<<"VT_begin "<<name<<"  "<<classhandle<<endl ;
+
+#endif
+
+  }
+  
+  void traceEnd(const string& name)
+  {
+#if defined (VTRACE)
+    VT_USER_END(name.c_str()) ;
+#elif defined(SCOREP)
+    SCOREP_USER_REGION_BY_NAME_END(name.c_str())
+#elif defined(ITAC)
+    int classhandle ;
+    auto it = regionId.find(name);
+    if (it==regionId.end())
+    {
+      return ;
+      VT_classdef (name.c_str(), &classhandle) ;
+      regionId[name]=classhandle;
+    }
+    else classhandle = it->second ;
+    VT_end(classhandle) ;    
+    cout<<"VT_end "<<name<<"  "<<classhandle<<endl ;
+
+#endif
+  }
+  
+   
+//  void marker(const string& name,const string& text) ;
+  
+  
+}
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/tracer.hpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/tracer.hpp	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/tracer.hpp	(revision 1749)
@@ -0,0 +1,22 @@
+#ifndef __TRACER_HPP__
+#define __TRACER_HPP__
+
+#include <string>
+
+namespace xios
+{
+  using namespace std ;
+  
+  void traceOn(void) ;
+  void traceOff(void) ;
+  
+  void traceBegin(const string& name) ;
+  void traceEnd(const string& name) ;
+  
+  void marker(const string& name,const string& text) ;
+
+}
+
+
+
+#endif
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/transformation/Functions/average_reduction.cpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/transformation/Functions/average_reduction.cpp	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/transformation/Functions/average_reduction.cpp	(revision 1749)
@@ -0,0 +1,94 @@
+/*!
+   \file average.cpp
+   \author Ha NGUYEN
+   \since 8 Sep 2016
+   \date 9 Jan 2017
+
+   \brief average reduction
+ */
+#include "average_reduction.hpp"
+#include "utils.hpp"
+
+namespace xios {
+
+CAverageReductionAlgorithm::CAverageReductionAlgorithm()
+  : CReductionAlgorithm(), resetWeight_(true)
+{
+}
+
+CReductionAlgorithm* CAverageReductionAlgorithm::create()
+{
+  return (new CAverageReductionAlgorithm());
+}
+
+bool CAverageReductionAlgorithm::registerTrans()
+{
+  return registerOperation(TRANS_REDUCE_AVERAGE, CAverageReductionAlgorithm::create);
+}
+
+void CAverageReductionAlgorithm::apply(const std::vector<std::pair<int,double> >& localIndex,
+                                       const double* dataInput,
+                                       CArray<double,1>& dataOut,
+                                       std::vector<bool>& flagInitial,                     
+                                       bool ignoreMissingValue, bool firstPass)
+{
+  if (resetWeight_) { weights_.resize(flagInitial.size()); weights_ = 1.0; resetWeight_ = false; }  
+
+  if (ignoreMissingValue)
+  {
+    int nbLocalIndex = localIndex.size();
+    int currentlocalIndex = 0;
+    double currentWeight  = 0.0;
+
+    if (firstPass) dataOut=std::numeric_limits<double>::quiet_NaN();
+
+    for (int idx = 0; idx < nbLocalIndex; ++idx)
+    {
+      currentlocalIndex = localIndex[idx].first;
+      currentWeight     = localIndex[idx].second;
+      if (!NumTraits<double>::isNan(*(dataInput + idx)))
+      {
+        if (flagInitial[currentlocalIndex])
+        {
+          dataOut(currentlocalIndex) = *(dataInput + idx);
+          flagInitial[currentlocalIndex] = false;
+        }
+        else
+        {
+          dataOut(currentlocalIndex)  += *(dataInput + idx);
+          weights_(currentlocalIndex) += 1.0;
+        }
+      }
+    }
+  }
+  else
+  {
+    int nbLocalIndex = localIndex.size();
+    int currentlocalIndex = 0;
+    double currentWeight  = 0.0;
+    for (int idx = 0; idx < nbLocalIndex; ++idx)
+    {
+      currentlocalIndex = localIndex[idx].first;
+      currentWeight     = localIndex[idx].second;
+
+      if (flagInitial[currentlocalIndex])
+      {
+        dataOut(currentlocalIndex) = *(dataInput + idx);
+        flagInitial[currentlocalIndex] = false;
+      }
+      else
+      {
+        dataOut(currentlocalIndex)  += *(dataInput + idx);
+        weights_(currentlocalIndex) += 1.0;
+      }
+    }
+  }
+}
+
+void CAverageReductionAlgorithm::updateData(CArray<double,1>& dataOut)
+{
+  dataOut /= weights_;
+  resetWeight_ = true;
+}
+
+}
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/transformation/Functions/average_reduction.hpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/transformation/Functions/average_reduction.hpp	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/transformation/Functions/average_reduction.hpp	(revision 1749)
@@ -0,0 +1,47 @@
+/*!
+   \file average.hpp
+   \author Ha NGUYEN
+   \since 8 Sep 2016
+   \date 8 Sep 2016
+
+   \brief Average reduction
+ */
+#ifndef __XIOS_REDUCTION_AVERAGE_ALGORITHM_HPP__
+#define __XIOS_REDUCTION_AVERAGE_ALGORITHM_HPP__
+
+#include "reduction.hpp"
+
+namespace xios {
+
+/*!
+  \class CAverageReductionAlgorithm
+  Interface for all reduction alogrithms.
+*/
+class CAverageReductionAlgorithm : public CReductionAlgorithm
+{
+public:
+  CAverageReductionAlgorithm();
+
+  virtual void apply(const std::vector<std::pair<int,double> >& localIndex,
+                     const double* dataInput,
+                     CArray<double,1>& dataOut,
+                     std::vector<bool>& flagInitial,                     
+                     bool ignoreMissingValue, bool firstPass);
+
+  virtual void updateData(CArray<double,1>& dataOut);
+
+  virtual ~CAverageReductionAlgorithm() {}
+
+protected:
+  CArray<double,1> weights_;
+  bool resetWeight_;
+
+public:
+  static bool registerTrans();
+
+protected:
+  static CReductionAlgorithm* create();
+};
+
+}
+#endif // __XIOS_REDUCTION_AVERAGE_ALGORITHM_HPP__
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/transformation/Functions/extract.cpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/transformation/Functions/extract.cpp	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/transformation/Functions/extract.cpp	(revision 1749)
@@ -0,0 +1,43 @@
+/*!
+   \file extract.cpp
+   \author Ha NGUYEN
+   \since 27 June 2016
+   \date 27 June 2016
+
+   \brief extract reduction
+ */
+#include "extract.hpp"
+
+namespace xios {
+
+CExtractReductionAlgorithm::CExtractReductionAlgorithm()
+  : CReductionAlgorithm()
+{
+}
+
+CReductionAlgorithm* CExtractReductionAlgorithm::create()
+{
+  return (new CExtractReductionAlgorithm());
+}
+
+bool CExtractReductionAlgorithm::registerTrans()
+{
+  return registerOperation(TRANS_REDUCE_EXTRACT, CExtractReductionAlgorithm::create);
+}
+
+void CExtractReductionAlgorithm::apply(const std::vector<std::pair<int,double> >& localIndex,
+                                       const double* dataInput,
+                                       CArray<double,1>& dataOut,
+                                       std::vector<bool>& flagInitial,
+                                       bool ignoreMissingValue, bool firstPass)
+{
+  int nbLocalIndex = localIndex.size();
+  int currentlocalIndex = 0;
+  for (int idx = 0; idx < nbLocalIndex; ++idx)
+  {
+    currentlocalIndex = localIndex[idx].first;
+    dataOut(currentlocalIndex) = *(dataInput + idx);
+  }
+}
+
+}
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/transformation/Functions/extract.hpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/transformation/Functions/extract.hpp	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/transformation/Functions/extract.hpp	(revision 1749)
@@ -0,0 +1,41 @@
+/*!
+   \file extract.hpp
+   \author Ha NGUYEN
+   \since 27 June 2016
+   \date 27 June 2016
+
+   \brief Min reduction
+ */
+#ifndef __XIOS_REDUCTION_EXTRACT_ALGORITHM_HPP__
+#define __XIOS_REDUCTION_EXTRACT_ALGORITHM_HPP__
+
+#include "reduction.hpp"
+
+namespace xios {
+
+/*!
+  \class CExtractReductionAlgorithm
+  Interface for all reduction alogrithms.
+*/
+class CExtractReductionAlgorithm : public CReductionAlgorithm
+{
+public:
+  CExtractReductionAlgorithm();
+
+  virtual void apply(const std::vector<std::pair<int,double> >& localIndex,
+                     const double* dataInput,
+                     CArray<double,1>& dataOut,
+                     std::vector<bool>& flagInitial,
+                     bool ignoreMissingValue, bool firstPass);
+
+  virtual ~CExtractReductionAlgorithm() {}
+
+public:
+  static bool registerTrans();
+
+protected:
+  static CReductionAlgorithm* create();
+};
+
+}
+#endif // __XIOS_REDUCTION_EXTRACT_ALGORITHM_HPP__
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/transformation/Functions/max_reduction.cpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/transformation/Functions/max_reduction.cpp	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/transformation/Functions/max_reduction.cpp	(revision 1749)
@@ -0,0 +1,77 @@
+/*!
+   \file max.cpp
+   \author Ha NGUYEN
+   \since 27 June 2016
+   \date 27 June 2016
+
+   \brief max reduction
+ */
+#include "max_reduction.hpp"
+#include "utils.hpp"
+
+namespace xios {
+
+CMaxReductionAlgorithm::CMaxReductionAlgorithm()
+  : CReductionAlgorithm()
+{
+}
+
+CReductionAlgorithm* CMaxReductionAlgorithm::create()
+{
+  return (new CMaxReductionAlgorithm());
+}
+
+bool CMaxReductionAlgorithm::registerTrans()
+{
+  return registerOperation(TRANS_REDUCE_MAX, CMaxReductionAlgorithm::create);
+}
+
+void CMaxReductionAlgorithm::apply(const std::vector<std::pair<int,double> >& localIndex,
+                                   const double* dataInput,
+                                   CArray<double,1>& dataOut,
+                                   std::vector<bool>& flagInitial,
+                                   bool ignoreMissingValue, bool firstPass)
+{ 
+  if (ignoreMissingValue)
+  {
+    int nbLocalIndex = localIndex.size();
+    int currentlocalIndex = 0;
+    if (firstPass) dataOut=std::numeric_limits<double>::quiet_NaN();    
+    for (int idx = 0; idx < nbLocalIndex; ++idx)
+    {
+      currentlocalIndex = localIndex[idx].first;      
+      if (!NumTraits<double>::isNan(*(dataInput + idx)))
+      {
+        if (flagInitial[currentlocalIndex])
+        {
+          dataOut(currentlocalIndex) = *(dataInput + idx);
+          flagInitial[currentlocalIndex] = false;
+        }
+        else
+        {
+          dataOut(currentlocalIndex) = std::max(*(dataInput + idx), dataOut(currentlocalIndex));
+        }
+      }
+    }
+  }
+  else
+  {
+    int nbLocalIndex = localIndex.size();
+    int currentlocalIndex = 0;    
+    for (int idx = 0; idx < nbLocalIndex; ++idx)
+    {
+      currentlocalIndex = localIndex[idx].first;      
+      if (flagInitial[currentlocalIndex])
+      {
+        dataOut(currentlocalIndex) = *(dataInput + idx);
+        flagInitial[currentlocalIndex] = false;
+      }
+      else
+      {
+        dataOut(currentlocalIndex) = std::max(*(dataInput + idx), dataOut(currentlocalIndex));
+      }
+    }
+  }
+}
+
+}
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/transformation/Functions/max_reduction.hpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/transformation/Functions/max_reduction.hpp	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/transformation/Functions/max_reduction.hpp	(revision 1749)
@@ -0,0 +1,41 @@
+/*!
+   \file max.hpp
+   \author Ha NGUYEN
+   \since 27 June 2016
+   \date 27 June 2016
+
+   \brief Max reduction
+ */
+#ifndef __XIOS_REDUCTION_MAX_ALGORITHM_HPP__
+#define __XIOS_REDUCTION_MAX_ALGORITHM_HPP__
+
+#include "reduction.hpp"
+
+namespace xios {
+
+/*!
+  \class CMaxReductionAlgorithm
+  Interface for all reduction alogrithms.
+*/
+class CMaxReductionAlgorithm : public CReductionAlgorithm
+{
+public:
+  CMaxReductionAlgorithm();
+
+  virtual void apply(const std::vector<std::pair<int,double> >& localIndex,
+                     const double* dataInput,
+                     CArray<double,1>& dataOut,
+                     std::vector<bool>& flagInitial,
+                     bool ignoreMissingValue, bool firstPass);
+
+  virtual ~CMaxReductionAlgorithm() {}
+
+public:
+  static bool registerTrans();
+
+protected:
+  static CReductionAlgorithm* create();
+};
+
+}
+#endif // __XIOS_REDUCTION_MAX_ALGORITHM_HPP__
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/transformation/Functions/min_reduction.cpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/transformation/Functions/min_reduction.cpp	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/transformation/Functions/min_reduction.cpp	(revision 1749)
@@ -0,0 +1,77 @@
+/*!
+   \file min.cpp
+   \author Ha NGUYEN
+   \since 27 June 2016
+   \date 9 Jan 2017
+
+   \brief min reduction
+ */
+#include "min_reduction.hpp"
+#include "utils.hpp"
+
+namespace xios {
+
+CMinReductionAlgorithm::CMinReductionAlgorithm()
+  : CReductionAlgorithm()
+{
+}
+
+CReductionAlgorithm* CMinReductionAlgorithm::create()
+{
+  return (new CMinReductionAlgorithm());
+}
+
+bool CMinReductionAlgorithm::registerTrans()
+{
+  return registerOperation(TRANS_REDUCE_MIN, CMinReductionAlgorithm::create);
+}
+
+void CMinReductionAlgorithm::apply(const std::vector<std::pair<int,double> >& localIndex,
+                                   const double* dataInput,
+                                   CArray<double,1>& dataOut,
+                                   std::vector<bool>& flagInitial,
+                                   bool ignoreMissingValue, bool firstPass)
+{
+  if (ignoreMissingValue)
+  {
+    int nbLocalIndex = localIndex.size();
+    int currentlocalIndex = 0;
+    if (firstPass) dataOut=std::numeric_limits<double>::quiet_NaN();
+    for (int idx = 0; idx < nbLocalIndex; ++idx)
+    {
+      currentlocalIndex = localIndex[idx].first;
+      if (!NumTraits<double>::isNan(*(dataInput + idx)))
+      {
+        if (flagInitial[currentlocalIndex])
+        {
+          dataOut(currentlocalIndex) = *(dataInput + idx);
+          flagInitial[currentlocalIndex] = false;
+        }
+        else
+        {
+          dataOut(currentlocalIndex) = std::min(*(dataInput + idx), dataOut(currentlocalIndex));
+        }
+      }
+    }
+  }
+  else
+  {
+    int nbLocalIndex = localIndex.size();
+    int currentlocalIndex = 0;
+    for (int idx = 0; idx < nbLocalIndex; ++idx)
+    {
+      currentlocalIndex = localIndex[idx].first;
+      if (flagInitial[currentlocalIndex])
+      {
+        dataOut(currentlocalIndex) = *(dataInput + idx);
+        flagInitial[currentlocalIndex] = false;
+      }
+      else
+      {
+        dataOut(currentlocalIndex) = std::min(*(dataInput + idx), dataOut(currentlocalIndex));
+      }
+    }
+  }
+}
+
+}
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/transformation/Functions/min_reduction.hpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/transformation/Functions/min_reduction.hpp	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/transformation/Functions/min_reduction.hpp	(revision 1749)
@@ -0,0 +1,41 @@
+/*!
+   \file min.hpp
+   \author Ha NGUYEN
+   \since 27 June 2016
+   \date 27 June 2016
+
+   \brief Min reduction
+ */
+#ifndef __XIOS_REDUCTION_MIN_ALGORITHM_HPP__
+#define __XIOS_REDUCTION_MIN_ALGORITHM_HPP__
+
+#include "reduction.hpp"
+
+namespace xios {
+
+/*!
+  \class CMinReductionAlgorithm
+  Interface for all reduction alogrithms.
+*/
+class CMinReductionAlgorithm : public CReductionAlgorithm
+{
+public:
+  CMinReductionAlgorithm();
+
+  virtual void apply(const std::vector<std::pair<int,double> >& localIndex,
+                     const double* dataInput,
+                     CArray<double,1>& dataOut,
+                     std::vector<bool>& flagInitial,                     
+                     bool ignoreMissingValue, bool firstPass);
+
+  virtual ~CMinReductionAlgorithm() {}
+
+public:
+  static bool registerTrans();
+
+protected:
+  static CReductionAlgorithm* create();
+};
+
+}
+#endif // __XIOS_REDUCTION_MIN_ALGORITHM_HPP__
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/transformation/Functions/reduction.cpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/transformation/Functions/reduction.cpp	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/transformation/Functions/reduction.cpp	(revision 1749)
@@ -0,0 +1,61 @@
+#include "reduction.hpp"
+#include "sum_reduction.hpp"
+#include "min_reduction.hpp"
+#include "max_reduction.hpp"
+#include "extract.hpp"
+#include "average_reduction.hpp"
+
+namespace xios {
+
+CReductionAlgorithm::CallBackMap* CReductionAlgorithm::reductionCreationCallBacks_ = 0;
+std::map<StdString,EReductionType> CReductionAlgorithm::ReductionOperations = std::map<StdString,EReductionType>();
+bool CReductionAlgorithm::initReductionOperation(std::map<StdString,EReductionType>& m)
+{
+  // So so stupid way to intialize operation but it works ...
+  m["sum"] = TRANS_REDUCE_SUM;
+  CSumReductionAlgorithm::registerTrans();
+
+  m["min"] = TRANS_REDUCE_MIN;
+  CMinReductionAlgorithm::registerTrans();
+
+  m["max"] = TRANS_REDUCE_MAX;
+  CMaxReductionAlgorithm::registerTrans();
+
+  m["extract"] = TRANS_REDUCE_EXTRACT;
+  CExtractReductionAlgorithm::registerTrans();
+
+  m["average"] = TRANS_REDUCE_AVERAGE;
+  CAverageReductionAlgorithm::registerTrans();
+}
+
+bool CReductionAlgorithm::_dummyInit = CReductionAlgorithm::initReductionOperation(CReductionAlgorithm::ReductionOperations);
+
+CReductionAlgorithm* CReductionAlgorithm::createOperation(EReductionType reduceType)
+{
+  int reduceTypeInt = reduceType;
+  CallBackMap::const_iterator it = (*reductionCreationCallBacks_).find(reduceType);
+  if ((*reductionCreationCallBacks_).end() == it)
+  {
+     ERROR("CReductionAlgorithm::createOperation(EReductionType reduceType)",
+           << "Operation type " << reduceType
+           << "doesn't exist. Please define.");
+  }
+  return (it->second)();
+}
+
+bool CReductionAlgorithm::registerOperation(EReductionType reduceType, CreateOperationCallBack createFn)
+{
+  if (0 == reductionCreationCallBacks_)
+    reductionCreationCallBacks_ = new CallBackMap();
+
+  return (*reductionCreationCallBacks_).insert(make_pair(reduceType, createFn)).second;
+}
+
+bool CReductionAlgorithm::unregisterOperation(EReductionType reduceType)
+{
+  int reduceTypeInt = reduceType;
+  return (1 == (*reductionCreationCallBacks_).erase(reduceType));
+}
+
+
+}
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/transformation/Functions/reduction.hpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/transformation/Functions/reduction.hpp	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/transformation/Functions/reduction.hpp	(revision 1749)
@@ -0,0 +1,73 @@
+/*!
+   \file reduction.hpp
+   \author Ha NGUYEN
+   \since 27 June 2016
+   \date 27 June 2016
+
+   \brief Parent class for all reduction
+ */
+#ifndef __XIOS_REDUCTION_ALGORITHM_HPP__
+#define __XIOS_REDUCTION_ALGORITHM_HPP__
+
+#include <vector>
+#include "array_new.hpp"
+#include "reduction_types.hpp"
+
+namespace xios {
+
+/*!
+  \class CReductionAlgorithm
+  Interface for all reduction alogrithms.
+*/
+class CReductionAlgorithm
+{
+public:
+  static std::map<StdString,EReductionType> ReductionOperations;
+
+public:
+  CReductionAlgorithm() {}
+
+  /*!
+    Create an operation (sum, max, min) based on type
+    \param [in] reduceType type to create
+    return pointer to base class
+  */
+  static CReductionAlgorithm* createOperation(EReductionType reduceType);
+
+  /*!
+    Apply a reduction operation on local data.
+    \param [in] localIndex vector contains local index of local data output and the corresponding weight
+    \param [in] dataInput Pointer to the first element of data input array (in form of buffer)
+    \param [in/out] dataOut Array contains local data
+    \param [in/out] flagInitial vector of boolean to mark the local index already initialized. True means there is a need for initialization
+    \param [in] firstPass indicate if it is the first time the apply funtion is called for a same transformation, in order to make a clean initialization 
+  */
+  virtual void apply(const std::vector<std::pair<int,double> >& localIndex,
+                     const double* dataInput,
+                     CArray<double,1>& dataOut,
+                     std::vector<bool>& flagInitial,                     
+                     bool ignoreMissingValue, bool firstPass) = 0;
+  /*!
+    Update local data 
+    In some case (e.g average) we need global information (e.g weights) then update data with this information
+    \param [in] dataOut local data output
+  */
+  virtual void updateData(CArray<double,1>& dataOut) {}
+
+  virtual ~CReductionAlgorithm() {}
+
+protected:
+  typedef CReductionAlgorithm* (*CreateOperationCallBack)();
+  typedef std::map<EReductionType, CreateOperationCallBack> CallBackMap;
+  static CallBackMap* reductionCreationCallBacks_;
+
+  static bool registerOperation(EReductionType reduceType, CreateOperationCallBack createFn);
+  static bool unregisterOperation(EReductionType reduceType);
+
+protected:
+  static bool initReductionOperation(std::map<StdString,EReductionType>& m);
+  static bool _dummyInit;
+};
+
+}
+#endif // __XIOS_REDUCTION_ALGORITHM_HPP__
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/transformation/Functions/reduction_types.hpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/transformation/Functions/reduction_types.hpp	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/transformation/Functions/reduction_types.hpp	(revision 1749)
@@ -0,0 +1,24 @@
+/*!
+   \file reduction_types.hpp
+   \author Ha NGUYEN
+   \since 27 June 2016
+   \date 27 June 2016
+
+   \brief Different reduction types
+ */
+#ifndef __XIOS_REDUCTION_TYPES_HPP__
+#define __XIOS_REDUCTION_TYPES_HPP__
+
+namespace xios {
+
+  typedef enum reduction_alogirthm_type
+  {
+    TRANS_REDUCE_SUM = 0,
+    TRANS_REDUCE_MIN = 1,
+    TRANS_REDUCE_MAX = 2,
+    TRANS_REDUCE_EXTRACT = 3,
+    TRANS_REDUCE_AVERAGE = 4
+  } EReductionType;
+
+}
+#endif // __XIOS_REDUCTION_TYPES_HPP__
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/transformation/Functions/sum_reduction.cpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/transformation/Functions/sum_reduction.cpp	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/transformation/Functions/sum_reduction.cpp	(revision 1749)
@@ -0,0 +1,79 @@
+/*!
+   \file sum.cpp
+   \author Ha NGUYEN
+   \since 27 June 2016
+   \date 9 Jan 2017
+
+   \brief sum reduction
+ */
+#include "sum_reduction.hpp"
+#include "utils.hpp"
+
+namespace xios {
+
+CSumReductionAlgorithm::CSumReductionAlgorithm()
+  : CReductionAlgorithm()
+{
+}
+
+CReductionAlgorithm* CSumReductionAlgorithm::create()
+{
+  return (new CSumReductionAlgorithm());
+}
+
+bool CSumReductionAlgorithm::registerTrans()
+{
+  return registerOperation(TRANS_REDUCE_SUM, CSumReductionAlgorithm::create);
+}
+
+void CSumReductionAlgorithm::apply(const std::vector<std::pair<int,double> >& localIndex,
+                                   const double* dataInput,
+                                   CArray<double,1>& dataOut,
+                                   std::vector<bool>& flagInitial,
+                                   bool ignoreMissingValue, bool firstPass)
+{
+  if (ignoreMissingValue)
+  {
+    int nbLocalIndex = localIndex.size();
+    int currentlocalIndex = 0;
+
+    if (firstPass) dataOut=std::numeric_limits<double>::quiet_NaN();
+  
+    for (int idx = 0; idx < nbLocalIndex; ++idx)
+    {
+      currentlocalIndex = localIndex[idx].first;   
+      if (!NumTraits<double>::isNan(*(dataInput + idx)))
+      {   
+        if (flagInitial[currentlocalIndex])
+        {
+          dataOut(currentlocalIndex) = *(dataInput + idx);
+          flagInitial[currentlocalIndex] = false;
+        }
+        else
+        {
+          dataOut(currentlocalIndex) += *(dataInput + idx);
+        }
+      }
+    }    
+  }
+  else
+  {
+    int nbLocalIndex = localIndex.size();
+    int currentlocalIndex = 0;    
+    for (int idx = 0; idx < nbLocalIndex; ++idx)
+    {
+      currentlocalIndex = localIndex[idx].first;      
+      if (flagInitial[currentlocalIndex])
+      {
+        dataOut(currentlocalIndex) = *(dataInput + idx);
+        flagInitial[currentlocalIndex] = false;
+      }
+      else
+      {
+        dataOut(currentlocalIndex) += *(dataInput + idx);
+      }
+    }
+  }
+}
+
+}
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/transformation/Functions/sum_reduction.hpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/transformation/Functions/sum_reduction.hpp	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/transformation/Functions/sum_reduction.hpp	(revision 1749)
@@ -0,0 +1,41 @@
+/*!
+   \file sum.hpp
+   \author Ha NGUYEN
+   \since 27 June 2016
+   \date 27 June 2016
+
+   \brief Sum reduction
+ */
+#ifndef __XIOS_REDUCTION_SUM_ALGORITHM_HPP__
+#define __XIOS_REDUCTION_SUM_ALGORITHM_HPP__
+
+#include "reduction.hpp"
+
+namespace xios {
+
+/*!
+  \class CSumReductionAlgorithm
+  Interface for all reduction alogrithms.
+*/
+class CSumReductionAlgorithm : public CReductionAlgorithm
+{
+public:
+  CSumReductionAlgorithm();
+
+  virtual void apply(const std::vector<std::pair<int,double> >& localIndex,
+                     const double* dataInput,
+                     CArray<double,1>& dataOut,
+                     std::vector<bool>& flagInitial,
+                     bool ignoreMissingValue, bool firstPass);
+
+  virtual ~CSumReductionAlgorithm() {}
+
+public:
+  static bool registerTrans();
+
+protected:
+  static CReductionAlgorithm* create();
+};
+
+}
+#endif // __XIOS_REDUCTION_SUM_ALGORITHM_HPP__
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/transformation/algo_types.hpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/transformation/algo_types.hpp	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/transformation/algo_types.hpp	(revision 1749)
@@ -0,0 +1,39 @@
+/*!
+   \file grid_generate.hpp
+   \author Ha NGUYEN
+   \since 28 Aug 2015
+   \date 28 Aug 2015
+
+   \brief A special transformation to generate a grid.
+ */
+#ifndef __XIOS_ALGORITHM_TRANSFORMATION_TYPES_HPP__
+#define __XIOS_ALGORITHM_TRANSFORMATION_TYPES_HPP__
+
+#include "scalar_algorithm_reduce_axis.hpp"
+#include "scalar_algorithm_extract_axis.hpp"
+#include "scalar_algorithm_reduce_domain.hpp"
+
+#include "axis_algorithm_inverse.hpp"
+#include "axis_algorithm_zoom.hpp"
+#include "axis_algorithm_interpolate.hpp"
+#include "axis_algorithm_extract.hpp"
+#include "axis_algorithm_reduce_domain.hpp"
+#include "axis_algorithm_reduce_axis.hpp"
+#include "axis_algorithm_transformation.hpp"
+#include "axis_algorithm_extract_domain.hpp"
+#include "axis_algorithm_temporal_splitting.hpp"
+
+#include "domain_algorithm_zoom.hpp"
+#include "domain_algorithm_interpolate.hpp"
+#include "domain_algorithm_compute_connectivity.hpp"
+#include "domain_algorithm_expand.hpp"
+#include "axis_algorithm_duplicate_scalar.hpp"
+#include "scalar_algorithm_reduce_scalar.hpp"
+#include "domain_algorithm_reorder.hpp"
+#include "domain_algorithm_extract.hpp"
+
+
+
+
+
+#endif // __XIOS_ALGORITHM_TRANSFORMATION_TYPES_HPP__
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/transformation/axis_algorithm_duplicate_scalar.cpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/transformation/axis_algorithm_duplicate_scalar.cpp	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/transformation/axis_algorithm_duplicate_scalar.cpp	(revision 1749)
@@ -0,0 +1,77 @@
+/*!
+   \file axis_algorithm_duplicate_scalar.cpp
+
+   \brief Algorithm to duplicate scalar into  axis 
+ */
+#include "axis_algorithm_duplicate_scalar.hpp"
+#include "duplicate_scalar_to_axis.hpp"
+#include "axis.hpp"
+#include "scalar.hpp"
+#include "grid.hpp"
+#include "grid_transformation_factory_impl.hpp"
+
+namespace xios {
+CGenericAlgorithmTransformation* CAxisAlgorithmDuplicateScalar::create(CGrid* gridDst, CGrid* gridSrc,
+                                                                     CTransformation<CAxis>* transformation,
+                                                                     int elementPositionInGrid,
+                                                                     std::map<int, int>& elementPositionInGridSrc2ScalarPosition,
+                                                                     std::map<int, int>& elementPositionInGridSrc2AxisPosition,
+                                                                     std::map<int, int>& elementPositionInGridSrc2DomainPosition,
+                                                                     std::map<int, int>& elementPositionInGridDst2ScalarPosition,
+                                                                     std::map<int, int>& elementPositionInGridDst2AxisPosition,
+                                                                     std::map<int, int>& elementPositionInGridDst2DomainPosition)
+TRY
+{
+  std::vector<CAxis*> axisListDestP = gridDst->getAxis();
+  std::vector<CScalar*> scalarListSrcP = gridSrc->getScalars();
+
+  CDuplicateScalarToAxis* duplicateScalar = dynamic_cast<CDuplicateScalarToAxis*> (transformation);
+  int axisDstIndex = elementPositionInGridDst2AxisPosition[elementPositionInGrid];
+  int scalarSrcIndex = elementPositionInGridSrc2ScalarPosition[elementPositionInGrid];
+
+  return (new CAxisAlgorithmDuplicateScalar(axisListDestP[axisDstIndex], scalarListSrcP[scalarSrcIndex], duplicateScalar));
+}
+CATCH
+
+bool CAxisAlgorithmDuplicateScalar::registerTrans()
+TRY
+{
+  CGridTransformationFactory<CAxis>::registerTransformation(TRANS_DUPLICATE_SCALAR_TO_AXIS, create);
+}
+CATCH
+
+
+CAxisAlgorithmDuplicateScalar::CAxisAlgorithmDuplicateScalar(CAxis* axisDestination, CScalar* scalarSource, CDuplicateScalarToAxis* algo)
+ : CAxisAlgorithmTransformation(axisDestination, scalarSource)
+{
+
+}
+
+
+CAxisAlgorithmDuplicateScalar::~CAxisAlgorithmDuplicateScalar()
+{
+}
+
+void CAxisAlgorithmDuplicateScalar::computeIndexSourceMapping_(const std::vector<CArray<double,1>* >& dataAuxInputs)
+TRY
+{
+  this->transformationMapping_.resize(1);
+  this->transformationWeight_.resize(1);
+
+  TransformationIndexMap& transMap = this->transformationMapping_[0];
+  TransformationWeightMap& transWeight = this->transformationWeight_[0];
+
+  CArray<int,1>& axisDstIndex = axisDest_->index;
+
+  int nbAxisIdx = axisDstIndex.numElements();
+  for (int idxAxis = 0; idxAxis < nbAxisIdx; ++idxAxis)
+  {
+    int globalAxisIdx = axisDstIndex(idxAxis);
+    transMap[globalAxisIdx].resize(1);
+    transWeight[globalAxisIdx].resize(1);
+    transMap[globalAxisIdx][0] = 0 ;
+    transWeight[globalAxisIdx][0] = 1.0 ;
+  }
+}
+CATCH
+}
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/transformation/axis_algorithm_duplicate_scalar.hpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/transformation/axis_algorithm_duplicate_scalar.hpp	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/transformation/axis_algorithm_duplicate_scalar.hpp	(revision 1749)
@@ -0,0 +1,51 @@
+/*!
+   \file axis_algorithm_reduce_domain.hpp
+   \author Ha NGUYEN
+   \since 23 June 2016
+   \date 23 June 2016
+
+   \brief Algorithm for reduce an axis to a axis
+ */
+#ifndef __XIOS_AXIS_ALGORITHM_DUPLICATE_SCALAR_HPP__
+#define __XIOS_AXIS_ALGORITHM_DUPLICATE_SCALAR_HPP__
+
+#include "axis_algorithm_transformation.hpp"
+#include "transformation.hpp"
+
+namespace xios {
+
+class CAxis;
+class CScalar;
+class CDuplicateScalarToAxis;
+
+
+/*!
+  \class CAxisAlgorithmDuplicateScalar
+  Duplicate scalar into axis destination
+*/
+class CAxisAlgorithmDuplicateScalar : public CAxisAlgorithmTransformation
+{
+public:
+  CAxisAlgorithmDuplicateScalar(CAxis* axisDestination, CScalar* scalarSource, CDuplicateScalarToAxis* algo);
+
+  virtual ~CAxisAlgorithmDuplicateScalar();
+
+  static bool registerTrans();
+
+protected:
+  void computeIndexSourceMapping_(const std::vector<CArray<double,1>* >& dataAuxInputs);
+
+private:
+  static CGenericAlgorithmTransformation* create(CGrid* gridDst, CGrid* gridSrc,
+                                                CTransformation<CAxis>* transformation,
+                                                int elementPositionInGrid,
+                                                std::map<int, int>& elementPositionInGridSrc2ScalarPosition,
+                                                std::map<int, int>& elementPositionInGridSrc2AxisPosition,
+                                                std::map<int, int>& elementPositionInGridSrc2DomainPosition,
+                                                std::map<int, int>& elementPositionInGridDst2ScalarPosition,
+                                                std::map<int, int>& elementPositionInGridDst2AxisPosition,
+                                                std::map<int, int>& elementPositionInGridDst2DomainPosition);
+};
+
+}
+#endif // __XIOS_AXIS_ALGORITHM_DUPLICATE_SCALAR_HPP__
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/transformation/axis_algorithm_extract.cpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/transformation/axis_algorithm_extract.cpp	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/transformation/axis_algorithm_extract.cpp	(revision 1749)
@@ -0,0 +1,121 @@
+/*!
+   \file axis_algorithm_extract.cpp
+   \brief Algorithm for extracting an axis.
+ */
+#include "axis_algorithm_extract.hpp"
+#include "axis.hpp"
+#include "grid.hpp"
+#include "grid_transformation_factory_impl.hpp"
+#include "extract_axis.hpp"
+
+namespace xios {
+CGenericAlgorithmTransformation* CAxisAlgorithmExtract::create(CGrid* gridDst, CGrid* gridSrc,
+                                                           CTransformation<CAxis>* transformation,
+                                                           int elementPositionInGrid,
+                                                           std::map<int, int>& elementPositionInGridSrc2ScalarPosition,
+                                                           std::map<int, int>& elementPositionInGridSrc2AxisPosition,
+                                                           std::map<int, int>& elementPositionInGridSrc2DomainPosition,
+                                                           std::map<int, int>& elementPositionInGridDst2ScalarPosition,
+                                                           std::map<int, int>& elementPositionInGridDst2AxisPosition,
+                                                           std::map<int, int>& elementPositionInGridDst2DomainPosition)
+TRY
+{
+  std::vector<CAxis*> axisListDestP = gridDst->getAxis();
+  std::vector<CAxis*> axisListSrcP  = gridSrc->getAxis();
+
+  CExtractAxis* extractAxis = dynamic_cast<CExtractAxis*> (transformation);
+  int axisDstIndex = elementPositionInGridDst2AxisPosition[elementPositionInGrid];
+  int axisSrcIndex = elementPositionInGridSrc2AxisPosition[elementPositionInGrid];
+
+  return (new CAxisAlgorithmExtract(axisListDestP[axisDstIndex], axisListSrcP[axisSrcIndex], extractAxis));
+}
+CATCH
+
+bool CAxisAlgorithmExtract::registerTrans()
+TRY
+{
+  CGridTransformationFactory<CAxis>::registerTransformation(TRANS_EXTRACT_AXIS, create);
+}
+CATCH
+
+CAxisAlgorithmExtract::CAxisAlgorithmExtract(CAxis* axisDestination, CAxis* axisSource, CExtractAxis* extractAxis)
+: CAxisAlgorithmTransformation(axisDestination, axisSource)
+TRY
+{
+  extractAxis->checkValid(axisSource);
+  extractBegin_ = extractAxis->begin.getValue();
+  extractN_  = extractAxis->n.getValue();
+  extractEnd_   = extractBegin_ + extractN_ - 1;
+
+  if (extractN_ > axisSource->n_glo.getValue())
+  {
+    ERROR("CAxisAlgorithmExtract::CAxisAlgorithmExtract(CAxis* axisDestination, CAxis* axisSource, CExtractAxis* extractAxis)",
+           << "Extract size is greater than global size of source axis"
+           << "Global size of source axis " <<axisSource->getId() << " is " << axisSource->n_glo.getValue()  << std::endl
+           << "Extract size is " << extractN_ );
+  }
+
+  int idxSrc, nDest = 0, beginDestLoc, beginDestGlo = 0 ;
+  int indGloDest, indGloSrc, iSrc;
+  for (int i = 0; i < axisSrc_->n.getValue(); i++)
+  {
+    idxSrc = axisSrc_->index(i);
+    if ((idxSrc >= extractBegin_) && (idxSrc <= extractEnd_))
+    {
+      if (nDest == 0) beginDestLoc = i;
+      ++nDest;
+    }
+  }
+  beginDestGlo = beginDestLoc + axisSrc_->begin - extractBegin_;
+  axisDest_->n_glo.setValue(extractN_);
+  axisDest_->n.setValue(nDest);
+  axisDest_->begin.setValue(beginDestGlo);
+  axisDest_->index.resize(nDest);
+
+  axisDest_->data_n.setValue(nDest);
+  axisDest_->data_begin.setValue(0);
+  axisDest_->data_index.resize(nDest);
+
+  axisDest_->mask.resize(nDest);
+  if (axisSrc_->hasValue) axisDest_->value.resize(nDest);
+  if (axisSrc_->hasLabel) axisDest_->label.resize(nDest);
+  if (axisSrc_->hasBounds) axisDest_->bounds.resize(2,nDest);
+
+  this->transformationMapping_.resize(1);
+  this->transformationWeight_.resize(1);
+  TransformationIndexMap& transMap = this->transformationMapping_[0];
+  TransformationWeightMap& transWeight = this->transformationWeight_[0];
+
+  for (int iDest = 0; iDest < nDest; iDest++)
+  {
+    iSrc = iDest + beginDestLoc;
+    axisDest_->index(iDest) = iDest + beginDestGlo;
+    axisDest_->data_index(iDest) = axisSrc_->data_index(iSrc) - beginDestLoc;
+    axisDest_->mask(iDest) = axisSrc_->mask(iSrc);
+
+    if (axisSrc_->hasValue)
+      axisDest_->value(iDest) = axisSrc_->value(iSrc);
+    if (axisSrc_->hasLabel)
+      axisDest_->label(iDest) = axisSrc_->label(iSrc);
+    if (axisSrc_->hasBounds)
+    {
+      axisDest_->bounds(0,iDest) = axisSrc_->bounds(0,iSrc);
+      axisDest_->bounds(1,iDest) = axisSrc_->bounds(1,iSrc);
+    }
+    indGloDest = axisDest_->index(iDest);
+    indGloSrc = axisSrc_->index(iSrc);
+    transMap[indGloDest].push_back(indGloSrc);
+    transWeight[indGloDest].push_back(1.0);
+
+  }
+}
+CATCH
+
+/*!
+  Compute the index mapping between domain on grid source and one on grid destination
+*/
+void CAxisAlgorithmExtract::computeIndexSourceMapping_(const std::vector<CArray<double,1>* >& dataAuxInputs)
+{
+}
+
+}
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/transformation/axis_algorithm_extract.hpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/transformation/axis_algorithm_extract.hpp	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/transformation/axis_algorithm_extract.hpp	(revision 1749)
@@ -0,0 +1,60 @@
+/*!
+   \file axis_algorithm_extract.hpp
+   \brief Algorithm for extracting an axis.
+ */
+#ifndef __XIOS_AXIS_ALGORITHM_EXTRACT_HPP__
+#define __XIOS_AXIS_ALGORITHM_EXTRACT_HPP__
+
+#include "axis_algorithm_transformation.hpp"
+#include "transformation.hpp"
+
+namespace xios {
+class CAxis;
+class CExtractAxis;
+
+/*!
+  \class CAxisAlgorithmExtract
+  Implementing extract on axis
+  A extracted region can be considered as region that isn't masked.
+  Only this extracted region is extracted to write on Netcdf.
+*/
+class CAxisAlgorithmExtract : public CAxisAlgorithmTransformation
+{
+public:
+  CAxisAlgorithmExtract(CAxis* axisDestination, CAxis* axisSource, CExtractAxis* extractAxis);
+
+  virtual ~CAxisAlgorithmExtract() {}
+
+  static bool registerTrans();
+protected:
+  void computeIndexSourceMapping_(const std::vector<CArray<double,1>* >& dataAuxInputs);
+
+private:
+
+private:
+  //! Global extract begin on axis
+  StdSize extractBegin_;
+
+  //! Global extract end on axis
+  StdSize extractEnd_;
+
+  //! Global extract size on axis
+  StdSize extractN_;
+
+  std::vector<int> extractIndex_;
+
+private:
+
+  static CGenericAlgorithmTransformation* create(CGrid* gridDst, CGrid* gridSrc,
+                                                CTransformation<CAxis>* transformation,
+                                                int elementPositionInGrid,
+                                                std::map<int, int>& elementPositionInGridSrc2ScalarPosition,
+                                                std::map<int, int>& elementPositionInGridSrc2AxisPosition,
+                                                std::map<int, int>& elementPositionInGridSrc2DomainPosition,
+                                                std::map<int, int>& elementPositionInGridDst2ScalarPosition,
+                                                std::map<int, int>& elementPositionInGridDst2AxisPosition,
+                                                std::map<int, int>& elementPositionInGridDst2DomainPosition);
+};
+
+}
+#endif // __XIOS_AXIS_ALGORITHM_EXTRACT_HPP__
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/transformation/axis_algorithm_extract_domain.cpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/transformation/axis_algorithm_extract_domain.cpp	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/transformation/axis_algorithm_extract_domain.cpp	(revision 1749)
@@ -0,0 +1,131 @@
+/*!
+   \file axis_algorithm_reduce_domain.cpp
+   \author Ha NGUYEN
+   \since 23 June 2016
+   \date 23 June 2016
+
+   \brief Algorithm for extract a domain to an axis
+ */
+#include "axis_algorithm_extract_domain.hpp"
+#include "extract_domain_to_axis.hpp"
+#include "axis.hpp"
+#include "domain.hpp"
+#include "grid.hpp"
+#include "grid_transformation_factory_impl.hpp"
+#include "reduction.hpp"
+
+namespace xios {
+CGenericAlgorithmTransformation* CAxisAlgorithmExtractDomain::create(CGrid* gridDst, CGrid* gridSrc,
+                                                                     CTransformation<CAxis>* transformation,
+                                                                     int elementPositionInGrid,
+                                                                     std::map<int, int>& elementPositionInGridSrc2ScalarPosition,
+                                                                     std::map<int, int>& elementPositionInGridSrc2AxisPosition,
+                                                                     std::map<int, int>& elementPositionInGridSrc2DomainPosition,
+                                                                     std::map<int, int>& elementPositionInGridDst2ScalarPosition,
+                                                                     std::map<int, int>& elementPositionInGridDst2AxisPosition,
+                                                                     std::map<int, int>& elementPositionInGridDst2DomainPosition)
+TRY
+{
+  std::vector<CAxis*> axisListDestP = gridDst->getAxis();
+  std::vector<CDomain*> domainListSrcP = gridSrc->getDomains();
+
+  CExtractDomainToAxis* extractDomain = dynamic_cast<CExtractDomainToAxis*> (transformation);
+  int axisDstIndex = elementPositionInGridDst2AxisPosition[elementPositionInGrid];
+  int domainSrcIndex = elementPositionInGridSrc2DomainPosition[elementPositionInGrid];
+
+  return (new CAxisAlgorithmExtractDomain(axisListDestP[axisDstIndex], domainListSrcP[domainSrcIndex], extractDomain));
+}
+CATCH
+
+//bool CAxisAlgorithmExtractDomain::_dummyRegistered = CAxisAlgorithmExtractDomain::registerTrans();
+bool CAxisAlgorithmExtractDomain::registerTrans()
+TRY
+{
+  CGridTransformationFactory<CAxis>::registerTransformation(TRANS_EXTRACT_DOMAIN_TO_AXIS, create);
+}
+CATCH
+
+
+CAxisAlgorithmExtractDomain::CAxisAlgorithmExtractDomain(CAxis* axisDestination, CDomain* domainSource, CExtractDomainToAxis* algo)
+ : CAxisAlgorithmTransformation(axisDestination, domainSource), pos_(-1), reduction_(0)
+TRY
+{
+  algo->checkValid(axisDestination, domainSource);
+  StdString op = "extract";
+
+  switch (algo->direction)
+  {
+    case CExtractDomainToAxis::direction_attr::jDir:
+      dir_ = jDir;
+      break;
+    case CExtractDomainToAxis::direction_attr::iDir:
+      dir_ = iDir;
+      break;
+    default:
+      break;
+  }
+
+  pos_ = algo->position;
+  reduction_ = CReductionAlgorithm::createOperation(CReductionAlgorithm::ReductionOperations[op]);
+}
+CATCH
+
+void CAxisAlgorithmExtractDomain::apply(const std::vector<std::pair<int,double> >& localIndex,
+                                        const double* dataInput,
+                                        CArray<double,1>& dataOut,
+                                        std::vector<bool>& flagInitial,                     
+                                        bool ignoreMissingValue, bool firstPass)
+TRY
+{
+  reduction_->apply(localIndex, dataInput, dataOut, flagInitial, ignoreMissingValue, firstPass);
+}
+CATCH
+
+CAxisAlgorithmExtractDomain::~CAxisAlgorithmExtractDomain()
+TRY
+{
+  if (0 != reduction_) delete reduction_;
+}
+CATCH
+
+void CAxisAlgorithmExtractDomain::computeIndexSourceMapping_(const std::vector<CArray<double,1>* >& dataAuxInputs)
+TRY
+{
+  this->transformationMapping_.resize(1);
+  this->transformationWeight_.resize(1);
+
+  TransformationIndexMap& transMap = this->transformationMapping_[0];
+  TransformationWeightMap& transWeight = this->transformationWeight_[0];
+
+  CArray<int,1>& axisDstIndex = axisDest_->index;
+  int ni_glo = domainSrc_->ni_glo, nj_glo = domainSrc_->nj_glo;
+  if (jDir == dir_)
+  {
+    int nbAxisIdx = axisDstIndex.numElements();
+    for (int idxAxis = 0; idxAxis < nbAxisIdx; ++idxAxis)
+    {
+      int globalAxisIdx = axisDstIndex(idxAxis);
+      transMap[globalAxisIdx].resize(1);
+      transWeight[globalAxisIdx].resize(1);
+      transMap[globalAxisIdx][0] = globalAxisIdx * ni_glo + pos_;
+      transWeight[globalAxisIdx][0] = 1.0;
+
+    }
+  }
+  else if (iDir == dir_)
+  {
+    int nbAxisIdx = axisDstIndex.numElements();
+    for (int idxAxis = 0; idxAxis < nbAxisIdx; ++idxAxis)
+    {
+      int globalAxisIdx = axisDstIndex(idxAxis);
+      transMap[globalAxisIdx].resize(1);
+      transWeight[globalAxisIdx].resize(1);
+      transMap[globalAxisIdx][0] = globalAxisIdx + ni_glo * pos_;
+      transWeight[globalAxisIdx][0] = 1.0;
+    }
+  }
+  else
+  {}
+}
+CATCH
+}
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/transformation/axis_algorithm_extract_domain.hpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/transformation/axis_algorithm_extract_domain.hpp	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/transformation/axis_algorithm_extract_domain.hpp	(revision 1749)
@@ -0,0 +1,69 @@
+/*!
+   \file axis_algorithm_reduce_domain.hpp
+   \author Ha NGUYEN
+   \since 23 June 2016
+   \date 23 June 2016
+
+   \brief Algorithm for reduce an axis to a axis
+ */
+#ifndef __XIOS_AXIS_ALGORITHM_EXTRACT_DOMAIN_HPP__
+#define __XIOS_AXIS_ALGORITHM_EXTRACT_DOMAIN_HPP__
+
+#include "axis_algorithm_transformation.hpp"
+#include "transformation.hpp"
+
+namespace xios {
+
+class CAxis;
+class CDomain;
+class CExtractDomainToAxis;
+class CReductionAlgorithm;
+
+
+/*!
+  \class CAxisAlgorithmExtractDomain
+  Extract a domain to an axis
+*/
+class CAxisAlgorithmExtractDomain : public CAxisAlgorithmTransformation
+{
+public:
+  CAxisAlgorithmExtractDomain(CAxis* axisDestination, CDomain* domainSource, CExtractDomainToAxis* algo);
+
+  virtual void apply(const std::vector<std::pair<int,double> >& localIndex,
+                     const double* dataInput,
+                     CArray<double,1>& dataOut,
+                     std::vector<bool>& flagInitial,                     
+                     bool ignoreMissingValue, bool firstPass);
+
+  virtual ~CAxisAlgorithmExtractDomain();
+
+  static bool registerTrans();
+protected:
+  enum ExtractDirection {
+    undefined = 0,
+    iDir = 1,
+    jDir = 2
+  };
+
+  ExtractDirection dir_;
+  int pos_; //! Position to extract
+protected:
+  void computeIndexSourceMapping_(const std::vector<CArray<double,1>* >& dataAuxInputs);
+
+protected:
+  CReductionAlgorithm* reduction_;
+
+private:
+  static CGenericAlgorithmTransformation* create(CGrid* gridDst, CGrid* gridSrc,
+                                                CTransformation<CAxis>* transformation,
+                                                int elementPositionInGrid,
+                                                std::map<int, int>& elementPositionInGridSrc2ScalarPosition,
+                                                std::map<int, int>& elementPositionInGridSrc2AxisPosition,
+                                                std::map<int, int>& elementPositionInGridSrc2DomainPosition,
+                                                std::map<int, int>& elementPositionInGridDst2ScalarPosition,
+                                                std::map<int, int>& elementPositionInGridDst2AxisPosition,
+                                                std::map<int, int>& elementPositionInGridDst2DomainPosition);
+};
+
+}
+#endif // __XIOS_AXIS_ALGORITHM_EXTRACT_DOMAIN_HPP__
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/transformation/axis_algorithm_interpolate.cpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/transformation/axis_algorithm_interpolate.cpp	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/transformation/axis_algorithm_interpolate.cpp	(revision 1749)
@@ -0,0 +1,395 @@
+/*!
+   \file axis_algorithm_interpolate.cpp
+   \author Ha NGUYEN
+   \since 23 June 2015
+   \date 02 Jul 2015
+
+   \brief Algorithm for interpolation on an axis.
+ */
+#include "axis_algorithm_interpolate.hpp"
+#include "axis.hpp"
+#include "interpolate_axis.hpp"
+#include <algorithm>
+#include "context.hpp"
+#include "context_client.hpp"
+#include "utils.hpp"
+#include "grid.hpp"
+#include "grid_transformation_factory_impl.hpp"
+#include "distribution_client.hpp"
+#include "timer.hpp"
+
+namespace xios {
+CGenericAlgorithmTransformation* CAxisAlgorithmInterpolate::create(CGrid* gridDst, CGrid* gridSrc,
+                                                                   CTransformation<CAxis>* transformation,
+                                                                   int elementPositionInGrid,
+                                                                   std::map<int, int>& elementPositionInGridSrc2ScalarPosition,
+                                                                   std::map<int, int>& elementPositionInGridSrc2AxisPosition,
+                                                                   std::map<int, int>& elementPositionInGridSrc2DomainPosition,
+                                                                   std::map<int, int>& elementPositionInGridDst2ScalarPosition,
+                                                                   std::map<int, int>& elementPositionInGridDst2AxisPosition,
+                                                                   std::map<int, int>& elementPositionInGridDst2DomainPosition)
+TRY
+{
+  std::vector<CAxis*> axisListDestP = gridDst->getAxis();
+  std::vector<CAxis*> axisListSrcP  = gridSrc->getAxis();
+
+  CInterpolateAxis* interpolateAxis = dynamic_cast<CInterpolateAxis*> (transformation);
+  int axisDstIndex = elementPositionInGridDst2AxisPosition[elementPositionInGrid];
+  int axisSrcIndex = elementPositionInGridSrc2AxisPosition[elementPositionInGrid];
+
+  return (new CAxisAlgorithmInterpolate(axisListDestP[axisDstIndex], axisListSrcP[axisSrcIndex], interpolateAxis));
+}
+CATCH
+
+bool CAxisAlgorithmInterpolate::registerTrans()
+TRY
+{
+  CGridTransformationFactory<CAxis>::registerTransformation(TRANS_INTERPOLATE_AXIS, create);
+}
+CATCH
+
+CAxisAlgorithmInterpolate::CAxisAlgorithmInterpolate(CAxis* axisDestination, CAxis* axisSource, CInterpolateAxis* interpAxis)
+: CAxisAlgorithmTransformation(axisDestination, axisSource), coordinate_(), transPosition_()
+TRY
+{
+  interpAxis->checkValid(axisSource);
+  order_ = interpAxis->order.getValue();
+  if (!interpAxis->coordinate.isEmpty())
+  {
+    coordinate_ = interpAxis->coordinate.getValue();
+    this->idAuxInputs_.resize(1);
+    this->idAuxInputs_[0] = coordinate_;
+  }
+}
+CATCH
+
+/*!
+  Compute the index mapping between axis on grid source and one on grid destination
+*/
+void CAxisAlgorithmInterpolate::computeIndexSourceMapping_(const std::vector<CArray<double,1>* >& dataAuxInputs)
+TRY
+{
+  CTimer::get("CAxisAlgorithmInterpolate::computeIndexSourceMapping_").resume() ;
+  CContext* context = CContext::getCurrent();
+  CContextClient* client=context->client;
+  int nbClient = client->clientSize;
+  CArray<bool,1>& axisMask = axisSrc_->mask;
+  int srcSize  = axisSrc_->n_glo.getValue();
+  std::vector<CArray<double,1> > vecAxisValue;
+
+  // Fill in axis value from coordinate
+  fillInAxisValue(vecAxisValue, dataAuxInputs);
+  std::vector<double> valueSrc(srcSize);
+  std::vector<double> recvBuff(srcSize);
+  std::vector<int> indexVec(srcSize);
+
+  for (int idx = 0; idx < vecAxisValue.size(); ++idx)
+  {
+    CArray<double,1>& axisValue = vecAxisValue[idx];
+    retrieveAllAxisValue(axisValue, axisMask, recvBuff, indexVec);
+    XIOSAlgorithms::sortWithIndex<double, CVectorStorage>(recvBuff, indexVec);
+    for (int i = 0; i < srcSize; ++i) valueSrc[i] = recvBuff[indexVec[i]];
+    computeInterpolantPoint(valueSrc, indexVec, idx);
+  }
+  CTimer::get("CAxisAlgorithmInterpolate::computeIndexSourceMapping_").suspend() ;
+}
+CATCH
+
+/*!
+  Compute the interpolant points
+  Assume that we have all value of axis source, with these values, need to calculate weight (coeff) of Lagrange polynomial
+  \param [in] axisValue all value of axis source
+  \param [in] tranPos position of axis on a domain
+*/
+void CAxisAlgorithmInterpolate::computeInterpolantPoint(const std::vector<double>& axisValue,
+                                                        const std::vector<int>& indexVec,
+                                                        int transPos)
+TRY
+{
+  std::vector<double>::const_iterator itb = axisValue.begin(), ite = axisValue.end();
+  std::vector<double>::const_iterator itLowerBound, itUpperBound, it, iteRange, itfirst, itsecond;
+  const double sfmax = NumTraits<double>::sfmax();
+  const double precision = NumTraits<double>::dummy_precision();
+
+  int ibegin = axisDest_->begin.getValue();
+  CArray<double,1>& axisDestValue = axisDest_->value;
+  int numValue = axisDestValue.numElements();
+  std::map<int, std::vector<std::pair<int,double> > > interpolatingIndexValues;
+
+  for (int idx = 0; idx < numValue; ++idx)
+  {
+    bool outOfRange = false;
+    double destValue = axisDestValue(idx);
+    if (destValue < *itb) outOfRange = true;
+
+    itLowerBound = std::lower_bound(itb, ite, destValue);
+    itUpperBound = std::upper_bound(itb, ite, destValue);
+    if ((ite != itUpperBound) && (sfmax == *itUpperBound)) itUpperBound = ite;
+
+    if ((ite == itLowerBound) || (ite == itUpperBound)) outOfRange = true;
+
+    // We don't do extrapolation FOR NOW, maybe in the future
+    if (!outOfRange)
+    {
+      if ((itLowerBound == itUpperBound) && (itb != itLowerBound)) --itLowerBound;
+      double distanceToLower = destValue - *itLowerBound;
+      double distanceToUpper = *itUpperBound - destValue;
+      int order = (order_ + 1) - 2;
+      bool down = (distanceToLower < distanceToUpper) ? true : false;
+      for (int k = 0; k < order; ++k)
+      {
+        if ((itb != itLowerBound) && down)
+        {
+          --itLowerBound;
+          distanceToLower = destValue - *itLowerBound;
+          down = (distanceToLower < distanceToUpper) ? true : false;
+          continue;
+        }
+        if ((ite != itUpperBound) && (sfmax != *itUpperBound))
+        {
+          ++itUpperBound;
+          distanceToUpper = *itUpperBound - destValue;
+          down = (distanceToLower < distanceToUpper) ? true : false;
+
+        }
+      }
+
+      iteRange = (ite == itUpperBound) ? itUpperBound : itUpperBound + 1;
+      itsecond = it = itLowerBound; ++itsecond;
+      while (it < iteRange)
+      {
+        while ( (itsecond < ite) && ((*itsecond -*it) < precision) )
+        { ++itsecond; ++it; }
+        int index = std::distance(itb, it);
+        interpolatingIndexValues[idx+ibegin].push_back(make_pair(indexVec[index],*it));
+        ++it; ++itsecond;
+      }
+
+    }
+  }
+  computeWeightedValueAndMapping(interpolatingIndexValues, transPos);
+}
+CATCH
+
+/*!
+  Compute weight (coeff) of Lagrange's polynomial
+  \param [in] interpolatingIndexValues the necessary axis value to calculate the coeffs
+*/
+void CAxisAlgorithmInterpolate::computeWeightedValueAndMapping(const std::map<int, std::vector<std::pair<int,double> > >& interpolatingIndexValues, int transPos)
+TRY
+{
+  TransformationIndexMap& transMap = this->transformationMapping_[transPos];
+  TransformationWeightMap& transWeight = this->transformationWeight_[transPos];
+  std::map<int, std::vector<std::pair<int,double> > >::const_iterator itb = interpolatingIndexValues.begin(), it,
+                                                                      ite = interpolatingIndexValues.end();
+  int ibegin = axisDest_->begin.getValue();
+  for (it = itb; it != ite; ++it)
+  {
+    int globalIndexDest = it->first;
+    double localValue = axisDest_->value(globalIndexDest - ibegin);
+    const std::vector<std::pair<int,double> >& interpVal = it->second;
+    int interpSize = interpVal.size();
+    transMap[globalIndexDest].resize(interpSize);
+    transWeight[globalIndexDest].resize(interpSize);
+    for (int idx = 0; idx < interpSize; ++idx)
+    {
+      int index = interpVal[idx].first;
+      double weight = 1.0;
+
+      for (int k = 0; k < interpSize; ++k)
+      {
+        if (k == idx) continue;
+        weight *= (localValue - interpVal[k].second);
+        weight /= (interpVal[idx].second - interpVal[k].second);
+      }
+      transMap[globalIndexDest][idx] = index;
+      transWeight[globalIndexDest][idx] = weight;
+      if (!transPosition_.empty())
+      {
+        (this->transformationPosition_[transPos])[globalIndexDest] = transPosition_[transPos];
+      }
+    }
+  }
+  if (!transPosition_.empty() && this->transformationPosition_[transPos].empty())
+    (this->transformationPosition_[transPos])[0] = transPosition_[transPos];
+
+}
+CATCH
+
+/*!
+  Each client retrieves all values of an axis
+  \param [in/out] recvBuff buffer for receiving values (already allocated)
+  \param [in/out] indexVec mapping between values and global index of axis
+*/
+void CAxisAlgorithmInterpolate::retrieveAllAxisValue(const CArray<double,1>& axisValue, const CArray<bool,1>& axisMask,
+                                                     std::vector<double>& recvBuff, std::vector<int>& indexVec)
+TRY
+{
+  CContext* context = CContext::getCurrent();
+  CContextClient* client=context->client;
+  int nbClient = client->clientSize;
+
+  int srcSize  = axisSrc_->n_glo.getValue();
+  int numValue = axisValue.numElements();
+
+  if (srcSize == numValue)  // Only one client or axis not distributed
+  {
+    for (int idx = 0; idx < srcSize; ++idx)
+    {
+      if (axisMask(idx))
+      {
+        recvBuff[idx] = axisValue(idx);
+        indexVec[idx] = idx;
+      }
+      else
+      {
+        recvBuff[idx] = NumTraits<double>::sfmax();
+        indexVec[idx] = -1;
+      }
+    }
+
+  }
+  else // Axis distributed
+  {
+    double* sendValueBuff = new double [numValue];
+    int* sendIndexBuff = new int [numValue];
+    int* recvIndexBuff = new int [srcSize];
+
+    int ibegin = axisSrc_->begin.getValue();
+    for (int idx = 0; idx < numValue; ++idx)
+    {
+      if (axisMask(idx))
+      {
+        sendValueBuff[idx] = axisValue(idx);
+        sendIndexBuff[idx] = idx + ibegin;
+      }
+      else
+      {
+        sendValueBuff[idx] = NumTraits<double>::sfmax();
+        sendIndexBuff[idx] = -1;
+      }
+    }
+
+    int* recvCount=new int[nbClient];
+    MPI_Allgather(&numValue,1,MPI_INT,recvCount,1,MPI_INT,client->intraComm);
+
+    int* displ=new int[nbClient];
+    displ[0]=0 ;
+    for(int n=1;n<nbClient;n++) displ[n]=displ[n-1]+recvCount[n-1];
+
+    // Each client have enough global info of axis
+    MPI_Allgatherv(sendIndexBuff,numValue,MPI_INT,recvIndexBuff,recvCount,displ,MPI_INT,client->intraComm);
+    MPI_Allgatherv(sendValueBuff,numValue,MPI_DOUBLE,&(recvBuff[0]),recvCount,displ,MPI_DOUBLE,client->intraComm);
+
+    for (int idx = 0; idx < srcSize; ++idx)
+    {
+      indexVec[idx] = recvIndexBuff[idx];
+    }
+
+    delete [] displ;
+    delete [] recvCount;
+    delete [] recvIndexBuff;
+    delete [] sendIndexBuff;
+    delete [] sendValueBuff;
+  }
+}
+CATCH
+
+/*!
+  Fill in axis value dynamically from a field whose grid is composed of a domain and an axis
+  \param [in/out] vecAxisValue vector axis value filled in from input field
+*/
+void CAxisAlgorithmInterpolate::fillInAxisValue(std::vector<CArray<double,1> >& vecAxisValue,
+                                                const std::vector<CArray<double,1>* >& dataAuxInputs)
+TRY
+{
+  if (coordinate_.empty())
+  {
+    vecAxisValue.resize(1);
+    vecAxisValue[0].resize(axisSrc_->value.numElements());
+    vecAxisValue[0] = axisSrc_->value;
+    this->transformationMapping_.resize(1);
+    this->transformationWeight_.resize(1);
+  }
+  else
+  {
+    CField* field = CField::get(coordinate_);
+    CGrid* grid = field->grid;
+
+    std::vector<CDomain*> domListP = grid->getDomains();
+    std::vector<CAxis*> axisListP = grid->getAxis();
+    if (domListP.empty() || axisListP.empty() || (1 < domListP.size()) || (1 < axisListP.size()))
+      ERROR("CAxisAlgorithmInterpolate::fillInAxisValue(std::vector<CArray<double,1> >& vecAxisValue)",
+             << "XIOS only supports dynamic interpolation with coordinate (field) associated with grid composed of a domain and an axis"
+             << "Coordinate (field) id = " <<field->getId() << std::endl
+             << "Associated grid id = " << grid->getId());
+
+    CDomain* dom = domListP[0];
+    size_t vecAxisValueSize = dom->i_index.numElements();
+    size_t vecAxisValueSizeWithMask = 0;
+    for (size_t idx = 0; idx < vecAxisValueSize; ++idx)
+    {
+      if (dom->domainMask(idx)) ++vecAxisValueSizeWithMask;
+    }
+
+    int niGlobDom = dom->ni_glo.getValue();
+    vecAxisValue.resize(vecAxisValueSizeWithMask);
+    if (transPosition_.empty())
+    {
+      size_t indexMask = 0;
+      transPosition_.resize(vecAxisValueSizeWithMask);
+      for (size_t idx = 0; idx < vecAxisValueSize; ++idx)
+      {
+        if (dom->domainMask(idx))
+        {
+          transPosition_[indexMask].resize(1);
+          transPosition_[indexMask][0] = (dom->i_index)(idx) + niGlobDom * (dom->j_index)(idx);
+          ++indexMask;
+        }
+
+      }
+    }
+    this->transformationMapping_.resize(vecAxisValueSizeWithMask);
+    this->transformationWeight_.resize(vecAxisValueSizeWithMask);
+    this->transformationPosition_.resize(vecAxisValueSizeWithMask);
+
+    const CDistributionClient::GlobalLocalDataMap& globalLocalIndexSendToServer = grid->getDistributionClient()->getGlobalLocalDataSendToServer();
+    CDistributionClient::GlobalLocalDataMap::const_iterator itIndex, iteIndex = globalLocalIndexSendToServer.end();
+    size_t axisSrcSize = axisSrc_->index.numElements();
+    std::vector<int> globalDimension = grid->getGlobalDimension();
+
+    size_t indexMask = 0;
+    for (size_t idx = 0; idx < vecAxisValueSize; ++idx)
+    {
+      if (dom->domainMask(idx))
+      {
+        size_t axisValueSize = 0;
+        for (size_t jdx = 0; jdx < axisSrcSize; ++jdx)
+        {
+          size_t globalIndex = ((dom->i_index)(idx) + (dom->j_index)(idx)*globalDimension[0]) + (axisSrc_->index)(jdx)*globalDimension[0]*globalDimension[1];
+          if (iteIndex != globalLocalIndexSendToServer.find(globalIndex))
+          {
+            ++axisValueSize;
+          }
+        }
+
+        vecAxisValue[indexMask].resize(axisValueSize);
+        axisValueSize = 0;
+        for (size_t jdx = 0; jdx < axisSrcSize; ++jdx)
+        {
+          size_t globalIndex = ((dom->i_index)(idx) + (dom->j_index)(idx)*globalDimension[0]) + (axisSrc_->index)(jdx)*globalDimension[0]*globalDimension[1];
+          itIndex = globalLocalIndexSendToServer.find(globalIndex);
+          if (iteIndex != itIndex)
+          {
+            vecAxisValue[indexMask](axisValueSize) = (*dataAuxInputs[0])(itIndex->second);
+            ++axisValueSize;
+          }
+        }
+        ++indexMask;
+      }
+    }
+  }
+}
+CATCH
+
+}
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/transformation/axis_algorithm_interpolate.hpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/transformation/axis_algorithm_interpolate.hpp	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/transformation/axis_algorithm_interpolate.hpp	(revision 1749)
@@ -0,0 +1,65 @@
+/*!
+   \file axis_algorithm_interpolate.hpp
+   \author Ha NGUYEN
+   \since 23 June 2015
+   \date 23 June 2015
+
+   \brief Algorithm for interpolation on an axis.
+ */
+#ifndef __XIOS_AXIS_ALGORITHM_INTERPOLATE_HPP__
+#define __XIOS_AXIS_ALGORITHM_INTERPOLATE_HPP__
+
+#include "axis_algorithm_transformation.hpp"
+#include "transformation.hpp"
+
+namespace xios {
+
+class CAxis;
+class CGrid;
+class CInterpolateAxis;
+
+/*!
+  \class CAxisAlgorithmInterpolate
+  Implementing interpolation on axis
+  The values on axis source are assumed monotonic
+*/
+class CAxisAlgorithmInterpolate : public CAxisAlgorithmTransformation
+{
+public:
+  CAxisAlgorithmInterpolate(CAxis* axisDestination, CAxis* axisSource, CInterpolateAxis* interpAxis);
+
+  virtual ~CAxisAlgorithmInterpolate() {}
+
+  static bool registerTrans();
+protected:
+  void computeIndexSourceMapping_(const std::vector<CArray<double,1>* >& dataAuxInputs);
+
+private:
+  void retrieveAllAxisValue(const CArray<double,1>& axisValue, const CArray<bool,1>& axisMask,
+                            std::vector<double>& recvBuff, std::vector<int>& indexVec);
+  void computeInterpolantPoint(const std::vector<double>& recvBuff, const std::vector<int>&, int transPos = 0);
+  void computeWeightedValueAndMapping(const std::map<int, std::vector<std::pair<int,double> > >& interpolatingIndexValues, int transPos = 0);
+  void fillInAxisValue(std::vector<CArray<double,1> >& vecAxisValue,
+                       const std::vector<CArray<double,1>* >& dataAuxInputs);
+
+private:
+  // Interpolation order
+  int order_;
+  StdString coordinate_;
+  std::vector<std::vector<int> > transPosition_;
+
+private:
+  static CGenericAlgorithmTransformation* create(CGrid* gridDst, CGrid* gridSrc,
+                                                CTransformation<CAxis>* transformation,
+                                                int elementPositionInGrid,
+                                                std::map<int, int>& elementPositionInGridSrc2ScalarPosition,
+                                                std::map<int, int>& elementPositionInGridSrc2AxisPosition,
+                                                std::map<int, int>& elementPositionInGridSrc2DomainPosition,
+                                                std::map<int, int>& elementPositionInGridDst2ScalarPosition,
+                                                std::map<int, int>& elementPositionInGridDst2AxisPosition,
+                                                std::map<int, int>& elementPositionInGridDst2DomainPosition);
+};
+
+}
+
+#endif // __XIOS_AXIS_ALGORITHM_INTERPOLATE_HPP__
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/transformation/axis_algorithm_inverse.cpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/transformation/axis_algorithm_inverse.cpp	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/transformation/axis_algorithm_inverse.cpp	(revision 1749)
@@ -0,0 +1,294 @@
+/*!
+   \file axis_algorithm_inverse.hpp
+   \author Ha NGUYEN
+   \since 14 May 2015
+   \date 29 June 2015
+
+   \brief Algorithm for inversing an axis..
+ */
+#include "axis_algorithm_inverse.hpp"
+#include "context.hpp"
+#include "context_client.hpp"
+#include "axis.hpp"
+#include "grid.hpp"
+#include "grid_transformation_factory_impl.hpp"
+#include "inverse_axis.hpp"
+#include "client_client_dht_template.hpp"
+
+namespace xios {
+
+CGenericAlgorithmTransformation* CAxisAlgorithmInverse::create(CGrid* gridDst, CGrid* gridSrc,
+                                                               CTransformation<CAxis>* transformation,
+                                                               int elementPositionInGrid,
+                                                               std::map<int, int>& elementPositionInGridSrc2ScalarPosition,
+                                                               std::map<int, int>& elementPositionInGridSrc2AxisPosition,
+                                                               std::map<int, int>& elementPositionInGridSrc2DomainPosition,
+                                                               std::map<int, int>& elementPositionInGridDst2ScalarPosition,
+                                                               std::map<int, int>& elementPositionInGridDst2AxisPosition,
+                                                               std::map<int, int>& elementPositionInGridDst2DomainPosition)
+TRY
+{
+  std::vector<CAxis*> axisListDestP = gridDst->getAxis();
+  std::vector<CAxis*> axisListSrcP  = gridSrc->getAxis();
+
+  CInverseAxis* inverseAxis = dynamic_cast<CInverseAxis*> (transformation);
+  int axisDstIndex = elementPositionInGridDst2AxisPosition[elementPositionInGrid];
+  int axisSrcIndex = elementPositionInGridSrc2AxisPosition[elementPositionInGrid];
+
+  return (new CAxisAlgorithmInverse(axisListDestP[axisDstIndex], axisListSrcP[axisSrcIndex], inverseAxis));
+}
+CATCH
+
+bool CAxisAlgorithmInverse::registerTrans()
+TRY
+{
+  CGridTransformationFactory<CAxis>::registerTransformation(TRANS_INVERSE_AXIS, create);
+}
+CATCH
+
+CAxisAlgorithmInverse::CAxisAlgorithmInverse(CAxis* axisDestination, CAxis* axisSource, CInverseAxis* inverseAxis)
+ : CAxisAlgorithmTransformation(axisDestination, axisSource)
+TRY
+{
+  if (axisDestination->n_glo.getValue() != axisSource->n_glo.getValue())
+  {
+    ERROR("CAxisAlgorithmInverse::CAxisAlgorithmInverse(CAxis* axisDestination, CAxis* axisSource)",
+           << "Two axis have different global size"
+           << "Size of axis source " <<axisSource->getId() << " is " << axisSource->n_glo.getValue()  << std::endl
+           << "Size of axis destination " <<axisDestination->getId() << " is " << axisDestination->n_glo.getValue());
+  }
+}
+CATCH
+
+void CAxisAlgorithmInverse::computeIndexSourceMapping_(const std::vector<CArray<double,1>* >& dataAuxInputs)
+TRY
+{
+  this->transformationMapping_.resize(1);
+  this->transformationWeight_.resize(1);
+
+  TransformationIndexMap& transMap = this->transformationMapping_[0];
+  TransformationWeightMap& transWeight = this->transformationWeight_[0];
+
+  int globalIndexSize = axisDestGlobalIndex_.size();
+  for (int idx = 0; idx < globalIndexSize; ++idx)
+  {
+    transMap[axisDestGlobalIndex_[idx]].push_back(axisDestGlobalSize_-axisDestGlobalIndex_[idx]-1);
+    transWeight[axisDestGlobalIndex_[idx]].push_back(1.0);
+  }
+
+  int niSrc   = axisSrc_->n.getValue();
+  int sizeSrc = axisSrc_->n_glo.getValue();
+  if (niSrc != sizeSrc) updateAxisValue();
+  else
+  {
+    for (int idx = 0; idx < sizeSrc; ++idx)
+    {
+      axisDest_->value(idx) = axisSrc_->value(sizeSrc-idx-1);
+    }
+  }
+}
+CATCH
+
+/*!
+  Update value on axis after inversing
+  After an axis is inversed, not only the data on it must be inversed but also the value
+*/
+void CAxisAlgorithmInverse::updateAxisValue()
+TRY
+{
+  CContext* context = CContext::getCurrent();
+  CContextClient* client=context->client;
+  int clientRank = client->clientRank;
+  int nbClient = client->clientSize;
+
+  int niSrc     = axisSrc_->n.getValue();
+  int ibeginSrc = axisSrc_->begin.getValue();
+  int nSrc = axisSrc_->index.numElements();
+
+  CClientClientDHTInt::Index2VectorInfoTypeMap globalIndex2ProcRank;
+  for (int idx = 0; idx < nSrc; ++idx)
+  {
+    if ((axisSrc_->mask)(idx))
+    {
+      globalIndex2ProcRank[(axisSrc_->index)(idx)].resize(1);
+      globalIndex2ProcRank[(axisSrc_->index)(idx)][0] = clientRank;
+    }
+  }
+
+  typedef std::unordered_map<size_t, std::vector<double> > GlobalIndexMapFromSrcToDest;
+  GlobalIndexMapFromSrcToDest globalIndexMapFromSrcToDest;
+  TransformationIndexMap& transMap = this->transformationMapping_[0];
+  TransformationIndexMap::const_iterator itb = transMap.begin(), ite = transMap.end(), it;
+  CArray<size_t,1> globalSrcIndex(transMap.size());
+  int localIndex = 0;
+  for (it = itb; it != ite; ++it)
+  {
+    size_t srcIndex = it->second[0];
+    globalIndexMapFromSrcToDest[srcIndex].resize(1);
+    globalIndexMapFromSrcToDest[srcIndex][0] = it->first;
+    globalSrcIndex(localIndex) = srcIndex;
+    ++localIndex;
+  }
+
+  CClientClientDHTInt dhtIndexProcRank(globalIndex2ProcRank, client->intraComm);
+  dhtIndexProcRank.computeIndexInfoMapping(globalSrcIndex);
+  CClientClientDHTInt::Index2VectorInfoTypeMap& computedGlobalIndexOnProc = dhtIndexProcRank.getInfoIndexMap();
+  std::unordered_map<int, std::vector<size_t> > globalSrcIndexSendToProc;
+  for (int idx = 0; idx < localIndex; ++idx)
+  {
+    size_t tmpIndex = globalSrcIndex(idx);
+    if (1 == computedGlobalIndexOnProc.count(tmpIndex))
+    {
+      std::vector<int>& tmpVec = computedGlobalIndexOnProc[tmpIndex];
+      globalSrcIndexSendToProc[tmpVec[0]].push_back(tmpIndex);
+    }
+  }
+
+  std::unordered_map<int, std::vector<size_t> >::const_iterator itbIndex = globalSrcIndexSendToProc.begin(), itIndex,
+                                                                  iteIndex = globalSrcIndexSendToProc.end();
+  std::map<int,int> sendRankSizeMap,recvRankSizeMap;
+  int connectedClient = globalSrcIndexSendToProc.size();
+  int* recvCount=new int[nbClient];
+  int* displ=new int[nbClient];
+  int* sendRankBuff=new int[connectedClient];
+  int* sendSizeBuff=new int[connectedClient];
+  int n = 0;
+  for (itIndex = itbIndex; itIndex != iteIndex; ++itIndex, ++n)
+  {
+    sendRankBuff[n] = itIndex->first;
+    int sendSize = itIndex->second.size();
+    sendSizeBuff[n] = sendSize;
+    sendRankSizeMap[itIndex->first] = sendSize;
+  }
+  MPI_Allgather(&connectedClient,1,MPI_INT,recvCount,1,MPI_INT,client->intraComm);
+
+  displ[0]=0 ;
+  for(int n=1;n<nbClient;n++) displ[n]=displ[n-1]+recvCount[n-1];
+  int recvSize=displ[nbClient-1]+recvCount[nbClient-1];
+  int* recvRankBuff=new int[recvSize];
+  int* recvSizeBuff=new int[recvSize];
+  MPI_Allgatherv(sendRankBuff,connectedClient,MPI_INT,recvRankBuff,recvCount,displ,MPI_INT,client->intraComm);
+  MPI_Allgatherv(sendSizeBuff,connectedClient,MPI_INT,recvSizeBuff,recvCount,displ,MPI_INT,client->intraComm);
+  for (int i = 0; i < nbClient; ++i)
+  {
+    int currentPos = displ[i];
+    for (int j = 0; j < recvCount[i]; ++j)
+      if (recvRankBuff[currentPos+j] == clientRank)
+      {
+        recvRankSizeMap[i] = recvSizeBuff[currentPos+j];
+      }
+  }
+
+  // Sending global index of grid source to corresponding process as well as the corresponding mask
+  std::vector<MPI_Request> requests;
+  std::vector<MPI_Status> status;
+  std::unordered_map<int, unsigned long* > recvGlobalIndexSrc;
+  std::unordered_map<int, double* > sendValueToDest;
+  for (std::map<int,int>::const_iterator itRecv = recvRankSizeMap.begin(); itRecv != recvRankSizeMap.end(); ++itRecv)
+  {
+    int recvRank = itRecv->first;
+    int recvSize = itRecv->second;
+    recvGlobalIndexSrc[recvRank] = new unsigned long [recvSize];
+    sendValueToDest[recvRank] = new double [recvSize];
+
+    requests.push_back(MPI_Request());
+    MPI_Irecv(recvGlobalIndexSrc[recvRank], recvSize, MPI_UNSIGNED_LONG, recvRank, 46, client->intraComm, &requests.back());
+  }
+
+  std::unordered_map<int, unsigned long* > sendGlobalIndexSrc;
+  std::unordered_map<int, double* > recvValueFromSrc;
+  for (itIndex = itbIndex; itIndex != iteIndex; ++itIndex)
+  {
+    int sendRank = itIndex->first;
+    int sendSize = sendRankSizeMap[sendRank];
+    const std::vector<size_t>& sendIndexMap = itIndex->second;
+    std::vector<size_t>::const_iterator itbSend = sendIndexMap.begin(), iteSend = sendIndexMap.end(), itSend;
+    sendGlobalIndexSrc[sendRank] = new unsigned long [sendSize];
+    recvValueFromSrc[sendRank] = new double [sendSize];
+    int countIndex = 0;
+    for (itSend = itbSend; itSend != iteSend; ++itSend)
+    {
+      sendGlobalIndexSrc[sendRank][countIndex] = *itSend;
+      ++countIndex;
+    }
+
+    // Send global index source and mask
+    requests.push_back(MPI_Request());
+    MPI_Isend(sendGlobalIndexSrc[sendRank], sendSize, MPI_UNSIGNED_LONG, sendRank, 46, client->intraComm, &requests.back());
+  }
+
+  status.resize(requests.size());
+  MPI_Waitall(requests.size(), &requests[0], &status[0]);
+
+
+  std::vector<MPI_Request>().swap(requests);
+  std::vector<MPI_Status>().swap(status);
+
+  // Okie, on destination side, we will wait for information of masked index of source
+  for (std::map<int,int>::const_iterator itSend = sendRankSizeMap.begin(); itSend != sendRankSizeMap.end(); ++itSend)
+  {
+    int recvRank = itSend->first;
+    int recvSize = itSend->second;
+
+    requests.push_back(MPI_Request());
+    MPI_Irecv(recvValueFromSrc[recvRank], recvSize, MPI_DOUBLE, recvRank, 48, client->intraComm, &requests.back());
+  }
+
+  for (std::map<int,int>::const_iterator itRecv = recvRankSizeMap.begin(); itRecv != recvRankSizeMap.end(); ++itRecv)
+  {
+    int recvRank = itRecv->first;
+    int recvSize = itRecv->second;
+    double* sendValue = sendValueToDest[recvRank];
+    unsigned long* recvIndexSrc = recvGlobalIndexSrc[recvRank];
+    int realSendSize = 0;
+    for (int idx = 0; idx < recvSize; ++idx)
+    {
+      size_t globalIndex = *(recvIndexSrc+idx);
+      int localIndex = globalIndex - ibeginSrc;
+      *(sendValue + idx) = axisSrc_->value(localIndex);
+    }
+    // Okie, now inform the destination which source index are masked
+    requests.push_back(MPI_Request());
+    MPI_Isend(sendValueToDest[recvRank], recvSize, MPI_DOUBLE, recvRank, 48, client->intraComm, &requests.back());
+  }
+  status.resize(requests.size());
+  MPI_Waitall(requests.size(), &requests[0], &status[0]);
+
+
+  size_t nGloAxisDest = axisDest_->n_glo.getValue() - 1;
+  for (std::map<int,int>::const_iterator itSend = sendRankSizeMap.begin(); itSend != sendRankSizeMap.end(); ++itSend)
+  {
+    int recvRank = itSend->first;
+    int recvSize = itSend->second;
+
+    double* recvValue = recvValueFromSrc[recvRank];
+    unsigned long* recvIndex = sendGlobalIndexSrc[recvRank];
+    for (int idx = 0; idx < recvSize; ++idx)
+    {
+      size_t globalIndex = *(recvIndex+idx);
+      int localIndex = ((nGloAxisDest-globalIndex) - axisDest_->begin);
+      axisDest_->value(localIndex) = *(recvValue + idx);
+    }
+  }
+
+  delete [] recvCount;
+  delete [] displ;
+  delete [] sendRankBuff;
+  delete [] recvRankBuff;
+  delete [] sendSizeBuff;
+  delete [] recvSizeBuff;
+
+  std::unordered_map<int, double* >::const_iterator itChar;
+  for (itChar = sendValueToDest.begin(); itChar != sendValueToDest.end(); ++itChar)
+    delete [] itChar->second;
+  for (itChar = recvValueFromSrc.begin(); itChar != recvValueFromSrc.end(); ++itChar)
+    delete [] itChar->second;
+  std::unordered_map<int, unsigned long* >::const_iterator itLong;
+  for (itLong = sendGlobalIndexSrc.begin(); itLong != sendGlobalIndexSrc.end(); ++itLong)
+    delete [] itLong->second;
+  for (itLong = recvGlobalIndexSrc.begin(); itLong != recvGlobalIndexSrc.end(); ++itLong)
+    delete [] itLong->second;
+}
+CATCH
+
+}
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/transformation/axis_algorithm_inverse.hpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/transformation/axis_algorithm_inverse.hpp	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/transformation/axis_algorithm_inverse.hpp	(revision 1749)
@@ -0,0 +1,52 @@
+/*!
+   \file axis_algorithm_inverse.hpp
+   \author Ha NGUYEN
+   \since 14 May 2015
+   \date 09 June 2015
+
+   \brief Algorithm for inversing an axis..
+ */
+#ifndef __XIOS_AXIS_ALGORITHM_INVERSE_HPP__
+#define __XIOS_AXIS_ALGORITHM_INVERSE_HPP__
+
+#include "axis_algorithm_transformation.hpp"
+#include "transformation.hpp"
+
+namespace xios {
+
+class CAxis;
+class CInverseAxis;
+
+/*!
+  \class CAxisAlgorithmInverse
+  Inversing an axis
+*/
+class CAxisAlgorithmInverse : public CAxisAlgorithmTransformation
+{
+public:
+  CAxisAlgorithmInverse(CAxis* axisDestination, CAxis* axisSource, CInverseAxis* inverseAxis);
+
+  virtual ~CAxisAlgorithmInverse() {}
+
+  static bool registerTrans();
+
+protected:
+  void computeIndexSourceMapping_(const std::vector<CArray<double,1>* >& dataAuxInputs);
+
+private:
+  void updateAxisValue();
+
+private:
+  static CGenericAlgorithmTransformation* create(CGrid* gridDst, CGrid* gridSrc,
+                                                CTransformation<CAxis>* transformation,
+                                                int elementPositionInGrid,
+                                                std::map<int, int>& elementPositionInGridSrc2ScalarPosition,
+                                                std::map<int, int>& elementPositionInGridSrc2AxisPosition,
+                                                std::map<int, int>& elementPositionInGridSrc2DomainPosition,
+                                                std::map<int, int>& elementPositionInGridDst2ScalarPosition,
+                                                std::map<int, int>& elementPositionInGridDst2AxisPosition,
+                                                std::map<int, int>& elementPositionInGridDst2DomainPosition);
+};
+
+}
+#endif // __XIOS_AXIS_ALGORITHM_INVERSE_HPP__
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/transformation/axis_algorithm_reduce_axis.cpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/transformation/axis_algorithm_reduce_axis.cpp	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/transformation/axis_algorithm_reduce_axis.cpp	(revision 1749)
@@ -0,0 +1,126 @@
+/*!
+   \file axis_algorithm_reduce_axis.cpp
+   \author Ha NGUYEN
+   \since 23 June 2016
+   \date 23 June 2016
+
+   \brief Algorithm for reduce a axis to an axis
+ */
+#include "axis_algorithm_reduce_axis.hpp"
+#include "reduce_axis_to_axis.hpp"
+#include "axis.hpp"
+#include "grid.hpp"
+#include "grid_transformation_factory_impl.hpp"
+#include "reduction.hpp"
+
+namespace xios {
+CGenericAlgorithmTransformation* CAxisAlgorithmReduceAxis::create(CGrid* gridDst, CGrid* gridSrc,
+                                                                   CTransformation<CAxis>* transformation,
+                                                                   int elementPositionInGrid,
+                                                                   std::map<int, int>& elementPositionInGridSrc2ScalarPosition,
+                                                                   std::map<int, int>& elementPositionInGridSrc2AxisPosition,
+                                                                   std::map<int, int>& elementPositionInGridSrc2DomainPosition,
+                                                                   std::map<int, int>& elementPositionInGridDst2ScalarPosition,
+                                                                   std::map<int, int>& elementPositionInGridDst2AxisPosition,
+                                                                   std::map<int, int>& elementPositionInGridDst2DomainPosition)
+TRY
+{
+  std::vector<CAxis*> axisListDestP = gridDst->getAxis();
+  std::vector<CAxis*> axisListSrcP  = gridSrc->getAxis();
+
+  CReduceAxisToAxis* reduceAxis = dynamic_cast<CReduceAxisToAxis*> (transformation);
+  int axisDstIndex   = elementPositionInGridDst2AxisPosition[elementPositionInGrid];
+  int axisSrcIndex = elementPositionInGridSrc2AxisPosition[elementPositionInGrid];
+
+  return (new CAxisAlgorithmReduceAxis(axisListDestP[axisDstIndex], axisListSrcP[axisSrcIndex], reduceAxis));
+}
+CATCH
+
+bool CAxisAlgorithmReduceAxis::registerTrans()
+TRY
+{
+  CGridTransformationFactory<CAxis>::registerTransformation(TRANS_REDUCE_AXIS_TO_AXIS, create);
+}
+CATCH
+
+
+CAxisAlgorithmReduceAxis::CAxisAlgorithmReduceAxis(CAxis* axisDestination, CAxis* axisSource, CReduceAxisToAxis* algo)
+ : CAxisAlgorithmTransformation(axisDestination, axisSource), reduction_(0)
+TRY
+{
+  eliminateRedondantSrc_= false ;
+  algo->checkValid(axisDestination, axisSource);
+  StdString op;
+  switch (algo->operation)
+  {
+    case CReduceAxisToAxis::operation_attr::sum:
+      op = "sum";
+      break;
+    case CReduceAxisToAxis::operation_attr::min:
+      op = "min";
+      break;
+    case CReduceAxisToAxis::operation_attr::max:
+      op = "max";
+      break;
+    case CReduceAxisToAxis::operation_attr::average:
+      op = "average";
+      break;
+    default:
+        ERROR("CAxisAlgorithmReduceAxis::CAxisAlgorithmReduceAxis(CAxis* axisDestination, CAxis* axisSource, CReduceAxisToAxis* algo)",
+         << "Operation is wrongly defined. Supported operations: sum, min, max, average." << std::endl
+         << "Axis source " <<axisSource->getId() << std::endl
+         << "Axis destination " << axisDestination->getId());
+
+  }
+
+  reduction_ = CReductionAlgorithm::createOperation(CReductionAlgorithm::ReductionOperations[op]);
+}
+CATCH
+
+void CAxisAlgorithmReduceAxis::apply(const std::vector<std::pair<int,double> >& localIndex,
+                                       const double* dataInput,
+                                       CArray<double,1>& dataOut,
+                                       std::vector<bool>& flagInitial,                     
+                                       bool ignoreMissingValue, bool firstPass)
+TRY
+{
+  reduction_->apply(localIndex, dataInput, dataOut, flagInitial, ignoreMissingValue, firstPass);
+}
+CATCH
+
+void CAxisAlgorithmReduceAxis::updateData(CArray<double,1>& dataOut)
+TRY
+{
+  reduction_->updateData(dataOut);
+}
+CATCH
+
+CAxisAlgorithmReduceAxis::~CAxisAlgorithmReduceAxis()
+TRY
+{
+  if (0 != reduction_) delete reduction_;
+}
+CATCH
+
+void CAxisAlgorithmReduceAxis::computeIndexSourceMapping_(const std::vector<CArray<double,1>* >& dataAuxInputs)
+TRY
+{
+  this->transformationMapping_.resize(1);
+  this->transformationWeight_.resize(1);
+
+  TransformationIndexMap& transMap = this->transformationMapping_[0];
+  TransformationWeightMap& transWeight = this->transformationWeight_[0];
+  CArray<int,1>& axisDstIndex = axisDest_->index;
+  int nbAxisIdx = axisDstIndex.numElements();
+  for (int idxAxis = 0; idxAxis < nbAxisIdx; ++idxAxis)
+  {
+    int globalAxisIdx = axisDstIndex(idxAxis);
+    transMap[globalAxisIdx].resize(1);
+    transWeight[globalAxisIdx].resize(1);
+    transMap[globalAxisIdx][0]=globalAxisIdx ;      
+    transWeight[globalAxisIdx][0] = 1.0 ;      
+  }
+}
+CATCH
+
+}
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/transformation/axis_algorithm_reduce_axis.hpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/transformation/axis_algorithm_reduce_axis.hpp	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/transformation/axis_algorithm_reduce_axis.hpp	(revision 1749)
@@ -0,0 +1,62 @@
+/*!
+   \file axis_algorithm_reduce_axis.hpp
+   \author Ha NGUYEN
+   \since 23 June 2016
+   \date 23 June 2016
+
+   \brief Algorithm for reduce an axis to a axis
+ */
+#ifndef __XIOS_AXIS_ALGORITHM_REDUCE_AXIS_HPP__
+#define __XIOS_AXIS_ALGORITHM_REDUCE_AXIS_HPP__
+
+#include "axis_algorithm_transformation.hpp"
+#include "transformation.hpp"
+
+namespace xios {
+
+class CAxis;
+class CReduceAxisToAxis;
+class CReductionAlgorithm;
+
+/*!
+  \class CAxisAlgorithmReduceAxis
+  Reduce a axis to an axis
+*/
+class CAxisAlgorithmReduceAxis : public CAxisAlgorithmTransformation
+{
+public:
+  CAxisAlgorithmReduceAxis(CAxis* axisDestination, CAxis* axisSource, CReduceAxisToAxis* algo);
+
+  virtual void apply(const std::vector<std::pair<int,double> >& localIndex,
+                     const double* dataInput,
+                     CArray<double,1>& dataOut,
+                     std::vector<bool>& flagInitial,                     
+                     bool ignoreMissingValue, bool firstPass);
+
+  virtual void updateData(CArray<double,1>& dataOut);
+  
+  virtual ~CAxisAlgorithmReduceAxis();
+
+  static bool registerTrans();
+protected:
+  
+protected:
+  void computeIndexSourceMapping_(const std::vector<CArray<double,1>* >& dataAuxInputs); 
+  
+protected:
+  CReductionAlgorithm* reduction_;
+
+private:
+  static CGenericAlgorithmTransformation* create(CGrid* gridDst, CGrid* gridSrc,
+                                                CTransformation<CAxis>* transformation,
+                                                int elementPositionInGrid,
+                                                std::map<int, int>& elementPositionInGridSrc2ScalarPosition,
+                                                std::map<int, int>& elementPositionInGridSrc2AxisPosition,
+                                                std::map<int, int>& elementPositionInGridSrc2DomainPosition,
+                                                std::map<int, int>& elementPositionInGridDst2ScalarPosition,
+                                                std::map<int, int>& elementPositionInGridDst2AxisPosition,
+                                                std::map<int, int>& elementPositionInGridDst2DomainPosition);
+};
+
+}
+#endif // __XIOS_AXIS_ALGORITHM_REDUCE_AXIS_HPP__
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/transformation/axis_algorithm_reduce_domain.cpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/transformation/axis_algorithm_reduce_domain.cpp	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/transformation/axis_algorithm_reduce_domain.cpp	(revision 1749)
@@ -0,0 +1,191 @@
+/*!
+   \file axis_algorithm_reduce_domain.cpp
+   \author Ha NGUYEN
+   \since 23 June 2016
+   \date 23 June 2016
+
+   \brief Algorithm for reduce a domain to an axis
+ */
+#include "axis_algorithm_reduce_domain.hpp"
+#include "reduce_domain_to_axis.hpp"
+#include "axis.hpp"
+#include "domain.hpp"
+#include "grid.hpp"
+#include "grid_transformation_factory_impl.hpp"
+#include "reduction.hpp"
+
+namespace xios {
+CGenericAlgorithmTransformation* CAxisAlgorithmReduceDomain::create(CGrid* gridDst, CGrid* gridSrc,
+                                                                   CTransformation<CAxis>* transformation,
+                                                                   int elementPositionInGrid,
+                                                                   std::map<int, int>& elementPositionInGridSrc2ScalarPosition,
+                                                                   std::map<int, int>& elementPositionInGridSrc2AxisPosition,
+                                                                   std::map<int, int>& elementPositionInGridSrc2DomainPosition,
+                                                                   std::map<int, int>& elementPositionInGridDst2ScalarPosition,
+                                                                   std::map<int, int>& elementPositionInGridDst2AxisPosition,
+                                                                   std::map<int, int>& elementPositionInGridDst2DomainPosition)
+TRY
+{
+  std::vector<CAxis*> axisListDestP = gridDst->getAxis();
+  std::vector<CDomain*> domainListSrcP = gridSrc->getDomains();
+
+  CReduceDomainToAxis* reduceDomain = dynamic_cast<CReduceDomainToAxis*> (transformation);
+  int axisDstIndex   = elementPositionInGridDst2AxisPosition[elementPositionInGrid];
+  int domainSrcIndex = elementPositionInGridSrc2DomainPosition[elementPositionInGrid];
+
+  return (new CAxisAlgorithmReduceDomain(axisListDestP[axisDstIndex], domainListSrcP[domainSrcIndex], reduceDomain));
+}
+CATCH
+
+bool CAxisAlgorithmReduceDomain::registerTrans()
+TRY
+{
+  CGridTransformationFactory<CAxis>::registerTransformation(TRANS_REDUCE_DOMAIN_TO_AXIS, create);
+}
+CATCH
+
+
+CAxisAlgorithmReduceDomain::CAxisAlgorithmReduceDomain(CAxis* axisDestination, CDomain* domainSource, CReduceDomainToAxis* algo)
+ : CAxisAlgorithmTransformation(axisDestination, domainSource), reduction_(0)
+TRY
+{
+  algo->checkValid(axisDestination, domainSource);
+  StdString op;
+  switch (algo->operation)
+  {
+    case CReduceDomainToAxis::operation_attr::sum:
+      op = "sum";
+      break;
+    case CReduceDomainToAxis::operation_attr::min:
+      op = "min";
+      break;
+    case CReduceDomainToAxis::operation_attr::max:
+      op = "max";
+      break;
+    case CReduceDomainToAxis::operation_attr::average:
+      op = "average";
+      break;
+    default:
+        ERROR("CAxisAlgorithmReduceDomain::CAxisAlgorithmReduceDomain(CAxis* axisDestination, CDomain* domainSource, CReduceDomainToAxis* algo)",
+         << "Operation is wrongly defined. Supported operations: sum, min, max, average." << std::endl
+         << "Domain source " <<domainSource->getId() << std::endl
+         << "Axis destination " << axisDestination->getId());
+
+  }
+
+  dir_ = (CReduceDomainToAxis::direction_attr::iDir == algo->direction)  ? iDir : jDir;
+  reduction_ = CReductionAlgorithm::createOperation(CReductionAlgorithm::ReductionOperations[op]);
+  local = algo->local ;
+}
+CATCH
+
+void CAxisAlgorithmReduceDomain::apply(const std::vector<std::pair<int,double> >& localIndex,
+                                       const double* dataInput,
+                                       CArray<double,1>& dataOut,
+                                       std::vector<bool>& flagInitial,                     
+                                       bool ignoreMissingValue, bool firstPass)
+TRY
+{
+  reduction_->apply(localIndex, dataInput, dataOut, flagInitial, ignoreMissingValue, firstPass);
+}
+CATCH
+
+void CAxisAlgorithmReduceDomain::updateData(CArray<double,1>& dataOut)
+TRY
+{
+  reduction_->updateData(dataOut);
+}
+CATCH
+
+CAxisAlgorithmReduceDomain::~CAxisAlgorithmReduceDomain()
+TRY
+{
+  if (0 != reduction_) delete reduction_;
+}
+CATCH
+
+void CAxisAlgorithmReduceDomain::computeIndexSourceMapping_(const std::vector<CArray<double,1>* >& dataAuxInputs)
+TRY
+{
+  this->transformationMapping_.resize(1);
+  this->transformationWeight_.resize(1);
+
+  TransformationIndexMap& transMap = this->transformationMapping_[0];
+  TransformationWeightMap& transWeight = this->transformationWeight_[0];
+
+  CArray<int,1>& axisDstIndex = axisDest_->index;
+  int ni_glo = domainSrc_->ni_glo, nj_glo = domainSrc_->nj_glo;
+  if (iDir == dir_)
+  {
+    if (local)
+    {
+      const CArray<int, 1>& i_index = domainSrc_-> i_index.getValue() ;
+      const CArray<int, 1>& j_index = domainSrc_-> j_index.getValue() ;
+      const CArray<bool,1>& localMask = domainSrc_-> localMask ;
+      int nbDomainIdx = i_index.numElements();
+      
+      for (int idxDomain = 0; idxDomain < nbDomainIdx; ++idxDomain)
+      {
+        if (localMask(idxDomain))
+        { 
+          transMap[j_index(idxDomain)].push_back(j_index(idxDomain)* ni_glo + i_index(idxDomain));
+          transWeight[j_index(idxDomain)].push_back(1.0) ;
+        }
+      }
+    }
+    else
+    {
+      int nbAxisIdx = axisDstIndex.numElements();
+      for (int idxAxis = 0; idxAxis < nbAxisIdx; ++idxAxis)
+      {
+        int globalAxisIdx = axisDstIndex(idxAxis);
+        transMap[globalAxisIdx].resize(ni_glo);
+        transWeight[globalAxisIdx].resize(ni_glo);
+        for (int idx = 0; idx < ni_glo; ++idx)
+        {
+          transMap[globalAxisIdx][idx] = globalAxisIdx * ni_glo + idx;
+          transWeight[globalAxisIdx][idx] = 1.0;
+        }
+      }
+    }
+  }
+  else if (jDir == dir_)
+  {
+    int nbAxisIdx = axisDstIndex.numElements();
+    if (local)
+    {
+      const CArray<int, 1>& i_index = domainSrc_-> i_index.getValue() ;
+      const CArray<int, 1>& j_index = domainSrc_-> j_index.getValue() ;
+      const CArray<bool,1>& localMask = domainSrc_-> localMask ;
+      int nbDomainIdx = i_index.numElements();
+      
+      for (int idxDomain = 0; idxDomain < nbDomainIdx; ++idxDomain)
+      {
+        if (localMask(idxDomain))
+        { 
+          transMap[i_index(idxDomain)].push_back(j_index(idxDomain)* ni_glo + i_index(idxDomain));
+          transWeight[i_index(idxDomain)].push_back(1.0) ;
+        }
+      }
+    }
+    else
+    {
+      for (int idxAxis = 0; idxAxis < nbAxisIdx; ++idxAxis)
+      {
+        int globalAxisIdx = axisDstIndex(idxAxis);
+        transMap[globalAxisIdx].resize(nj_glo);
+        transWeight[globalAxisIdx].resize(nj_glo);
+        for (int idx = 0; idx < nj_glo; ++idx)
+        {
+          transMap[globalAxisIdx][idx] = globalAxisIdx + ni_glo*idx;
+          transWeight[globalAxisIdx][idx] = 1.0;
+        }
+      }
+    }
+  }
+  else
+  {}
+}
+CATCH
+
+}
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/transformation/axis_algorithm_reduce_domain.hpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/transformation/axis_algorithm_reduce_domain.hpp	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/transformation/axis_algorithm_reduce_domain.hpp	(revision 1749)
@@ -0,0 +1,71 @@
+/*!
+   \file axis_algorithm_reduce_domain.hpp
+   \author Ha NGUYEN
+   \since 23 June 2016
+   \date 23 June 2016
+
+   \brief Algorithm for reduce an axis to a axis
+ */
+#ifndef __XIOS_AXIS_ALGORITHM_REDUCE_DOMAIN_HPP__
+#define __XIOS_AXIS_ALGORITHM_REDUCE_DOMAIN_HPP__
+
+#include "axis_algorithm_transformation.hpp"
+#include "transformation.hpp"
+
+namespace xios {
+
+class CAxis;
+class CDomain;
+class CReduceDomainToAxis;
+class CReductionAlgorithm;
+
+/*!
+  \class CAxisAlgorithmReduceDomain
+  Reduce a domain to an axis
+*/
+class CAxisAlgorithmReduceDomain : public CAxisAlgorithmTransformation
+{
+public:
+  CAxisAlgorithmReduceDomain(CAxis* axisDestination, CDomain* domainSource, CReduceDomainToAxis* algo);
+
+  virtual void apply(const std::vector<std::pair<int,double> >& localIndex,
+                     const double* dataInput,
+                     CArray<double,1>& dataOut,
+                     std::vector<bool>& flagInitial,                     
+                     bool ignoreMissingValue, bool firstPass);
+
+  virtual void updateData(CArray<double,1>& dataOut);
+  
+  virtual ~CAxisAlgorithmReduceDomain();
+
+  static bool registerTrans();
+protected:
+  enum ReduceDirection {
+    undefined = 0,
+    iDir = 1,
+    jDir = 2
+  };
+  
+  ReduceDirection dir_;
+  bool local ;
+  
+protected:
+  void computeIndexSourceMapping_(const std::vector<CArray<double,1>* >& dataAuxInputs); 
+  
+protected:
+  CReductionAlgorithm* reduction_;
+
+private:
+  static CGenericAlgorithmTransformation* create(CGrid* gridDst, CGrid* gridSrc,
+                                                CTransformation<CAxis>* transformation,
+                                                int elementPositionInGrid,
+                                                std::map<int, int>& elementPositionInGridSrc2ScalarPosition,
+                                                std::map<int, int>& elementPositionInGridSrc2AxisPosition,
+                                                std::map<int, int>& elementPositionInGridSrc2DomainPosition,
+                                                std::map<int, int>& elementPositionInGridDst2ScalarPosition,
+                                                std::map<int, int>& elementPositionInGridDst2AxisPosition,
+                                                std::map<int, int>& elementPositionInGridDst2DomainPosition);
+};
+
+}
+#endif // __XIOS_AXIS_ALGORITHM_REDUCE_DOMAIN_HPP__
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/transformation/axis_algorithm_temporal_splitting.cpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/transformation/axis_algorithm_temporal_splitting.cpp	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/transformation/axis_algorithm_temporal_splitting.cpp	(revision 1749)
@@ -0,0 +1,80 @@
+/*!
+   \file axis_algorithm_temporal_splitting.cpp
+
+   \brief Algorithm to split scalar into  axis by temporal accumulation
+ */
+#include "axis_algorithm_temporal_splitting.hpp"
+#include "temporal_splitting.hpp"
+#include "axis.hpp"
+#include "scalar.hpp"
+#include "grid.hpp"
+#include "grid_transformation_factory_impl.hpp"
+
+namespace xios {
+CGenericAlgorithmTransformation* CAxisAlgorithmTemporalSplitting::create(CGrid* gridDst, CGrid* gridSrc,
+                                                                     CTransformation<CAxis>* transformation,
+                                                                     int elementPositionInGrid,
+                                                                     std::map<int, int>& elementPositionInGridSrc2ScalarPosition,
+                                                                     std::map<int, int>& elementPositionInGridSrc2AxisPosition,
+                                                                     std::map<int, int>& elementPositionInGridSrc2DomainPosition,
+                                                                     std::map<int, int>& elementPositionInGridDst2ScalarPosition,
+                                                                     std::map<int, int>& elementPositionInGridDst2AxisPosition,
+                                                                     std::map<int, int>& elementPositionInGridDst2DomainPosition)
+TRY
+{
+  std::vector<CAxis*> axisListDestP = gridDst->getAxis();
+  std::vector<CScalar*> scalarListSrcP = gridSrc->getScalars();
+
+  CTemporalSplitting* temporalSplitting = dynamic_cast<CTemporalSplitting*> (transformation);
+  int axisDstIndex = elementPositionInGridDst2AxisPosition[elementPositionInGrid];
+  int scalarSrcIndex = elementPositionInGridSrc2ScalarPosition[elementPositionInGrid];
+
+  return (new CAxisAlgorithmTemporalSplitting(axisListDestP[axisDstIndex], scalarListSrcP[scalarSrcIndex], temporalSplitting));
+}
+CATCH
+
+bool CAxisAlgorithmTemporalSplitting::registerTrans()
+TRY
+{
+  CGridTransformationFactory<CAxis>::registerTransformation(TRANS_TEMPORAL_SPLITTING, create);
+}
+CATCH
+
+CAxisAlgorithmTemporalSplitting::CAxisAlgorithmTemporalSplitting(CAxis* axisDestination, CScalar* scalarSource, CTemporalSplitting* algo)
+ : CAxisAlgorithmTransformation(axisDestination, scalarSource)
+{
+
+}
+
+
+CAxisAlgorithmTemporalSplitting::~CAxisAlgorithmTemporalSplitting()
+{
+}
+
+void CAxisAlgorithmTemporalSplitting::computeIndexSourceMapping_(const std::vector<CArray<double,1>* >& dataAuxInputs)
+TRY
+{
+  this->transformationMapping_.resize(1);
+  this->transformationWeight_.resize(1);
+
+  TransformationIndexMap& transMap = this->transformationMapping_[0];
+  TransformationWeightMap& transWeight = this->transformationWeight_[0];
+
+  CArray<int,1>& axisDstIndex = axisDest_->index;
+
+  int nbAxisIdx = axisDstIndex.numElements();
+  for (int idxAxis = 0; idxAxis < nbAxisIdx; ++idxAxis)
+  {
+    int globalAxisIdx = axisDstIndex(idxAxis);
+    if (idxAxis==0)
+    {
+      transMap[globalAxisIdx].resize(1);
+      transWeight[globalAxisIdx].resize(1);
+      transMap[globalAxisIdx][0] = 0 ;
+      transWeight[globalAxisIdx][0] = 1.0 ;
+    }
+  }
+}
+CATCH
+
+}
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/transformation/axis_algorithm_temporal_splitting.hpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/transformation/axis_algorithm_temporal_splitting.hpp	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/transformation/axis_algorithm_temporal_splitting.hpp	(revision 1749)
@@ -0,0 +1,52 @@
+/*!
+   \file axis_algorithm_reduce_domain.hpp
+   \author Ha NGUYEN
+   \since 23 June 2016
+   \date 23 June 2016
+
+   \brief Algorithm for reduce an axis to a axis
+ */
+#ifndef __XIOS_AXIS_ALGORITHM_TEMPORAL_SPLITTING_HPP__
+#define __XIOS_AXIS_ALGORITHM_TEMPORAL_SPLITTING_HPP__
+
+#include "axis_algorithm_transformation.hpp"
+#include "transformation.hpp"
+
+namespace xios {
+
+class CAxis;
+class CScalar;
+class CTemporalSplitting;
+
+
+
+/*!
+  \class CAxisAlgorithmExtractDomain
+  Extract a domain to an axis
+*/
+class CAxisAlgorithmTemporalSplitting : public CAxisAlgorithmTransformation
+{
+public:
+  CAxisAlgorithmTemporalSplitting(CAxis* axisDestination, CScalar* scalarSource, CTemporalSplitting* algo);
+
+  virtual ~CAxisAlgorithmTemporalSplitting();
+
+  static bool registerTrans();
+
+protected:
+  void computeIndexSourceMapping_(const std::vector<CArray<double,1>* >& dataAuxInputs);
+
+private:
+  static CGenericAlgorithmTransformation* create(CGrid* gridDst, CGrid* gridSrc,
+                                                CTransformation<CAxis>* transformation,
+                                                int elementPositionInGrid,
+                                                std::map<int, int>& elementPositionInGridSrc2ScalarPosition,
+                                                std::map<int, int>& elementPositionInGridSrc2AxisPosition,
+                                                std::map<int, int>& elementPositionInGridSrc2DomainPosition,
+                                                std::map<int, int>& elementPositionInGridDst2ScalarPosition,
+                                                std::map<int, int>& elementPositionInGridDst2AxisPosition,
+                                                std::map<int, int>& elementPositionInGridDst2DomainPosition);
+};
+
+}
+#endif // __XIOS_AXIS_ALGORITHM_TEMPORAL_SPLITTING_HPP__
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/transformation/axis_algorithm_transformation.cpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/transformation/axis_algorithm_transformation.cpp	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/transformation/axis_algorithm_transformation.cpp	(revision 1749)
@@ -0,0 +1,136 @@
+/*!
+   \file axis_algorithm_transformation.hpp
+   \author Ha NGUYEN
+   \since 14 May 2015
+   \date 29 June 2015
+
+   \brief Interface for all axis transformation algorithms.
+ */
+
+#include "axis_algorithm_transformation.hpp"
+#include "axis_algorithm_inverse.hpp"
+#include "axis_algorithm_zoom.hpp"
+#include "context.hpp"
+#include "context_client.hpp"
+#include "client_client_dht_template.hpp"
+#include "axis.hpp"
+
+namespace xios {
+
+CAxisAlgorithmTransformation::CAxisAlgorithmTransformation(CAxis* axisDestination, CAxis* axisSource)
+ : CGenericAlgorithmTransformation(), axisDest_(axisDestination), axisSrc_(axisSource), domainSrc_(0),scalarSrc_(0)
+TRY
+{
+  axisDestGlobalSize_ = axisDestination->n_glo.getValue();
+  int niDest = axisDestination->n.getValue();
+  int ibeginDest = axisDestination->begin.getValue();
+
+  for (int idx = 0; idx < niDest; ++idx)
+    if ((axisDestination->mask)(idx)) axisDestGlobalIndex_.push_back(ibeginDest+idx);
+}
+CATCH
+
+CAxisAlgorithmTransformation::CAxisAlgorithmTransformation(CAxis* axisDestination, CDomain* domainSource)
+ : CGenericAlgorithmTransformation(), axisDest_(axisDestination), axisSrc_(0), domainSrc_(domainSource),scalarSrc_(0)
+TRY
+{
+  axisDestGlobalSize_ = axisDestination->n_glo.getValue();
+  int niDest = axisDestination->n.getValue();
+  int ibeginDest = axisDestination->begin.getValue();
+
+  for (int idx = 0; idx < niDest; ++idx)
+    if ((axisDestination->mask)(idx)) axisDestGlobalIndex_.push_back(ibeginDest+idx);
+}
+CATCH
+
+CAxisAlgorithmTransformation::CAxisAlgorithmTransformation(CAxis* axisDestination, CScalar* scalarSource)
+ : CGenericAlgorithmTransformation(), axisDest_(axisDestination), axisSrc_(0), domainSrc_(0), scalarSrc_(scalarSource)
+TRY
+{
+  axisDestGlobalSize_ = axisDestination->n_glo.getValue();
+  int niDest = axisDestination->n.getValue();
+  int ibeginDest = axisDestination->begin.getValue();
+
+  for (int idx = 0; idx < niDest; ++idx)
+    if ((axisDestination->mask)(idx)) axisDestGlobalIndex_.push_back(ibeginDest+idx);
+}
+CATCH
+
+CAxisAlgorithmTransformation::~CAxisAlgorithmTransformation()
+{
+}
+
+void CAxisAlgorithmTransformation::computeIndexSourceMapping_(const std::vector<CArray<double,1>* >& dataAuxInputs)
+{
+}
+
+/*!
+  Compute global index of axis on different processes
+  \param [in] globalAxisIndex global index of axis source
+  \param [out] globalAxisIndexOnProc processes which contain the corresponding global index of axis source
+*/
+void CAxisAlgorithmTransformation::computeExchangeGlobalIndex(const CArray<size_t,1>& globalAxisIndex,
+                                                              int elementType,
+                                                              CClientClientDHTInt::Index2VectorInfoTypeMap& globalAxisIndexOnProc)
+TRY
+{
+  CContext* context = CContext::getCurrent();
+  CContextClient* client=context->client;
+  int clientRank = client->clientRank;
+  int clientSize = client->clientSize;
+
+  size_t globalIndex;
+  int nIndexSize = 0;
+  CArray<bool,1>* ptLocalMask ;
+  CArray<bool,1> scalarMask(1) ;
+  scalarMask=true ;
+  
+  if (2 == elementType) 
+  {
+    nIndexSize = domainSrc_->i_index.numElements();
+    ptLocalMask=&(domainSrc_->localMask) ;
+  }
+  else if (1 == elementType)
+  {
+     nIndexSize = axisSrc_->index.numElements();
+     ptLocalMask=&(axisSrc_->mask) ;
+  }
+  else
+  {
+     nIndexSize=1  ; //  scalar
+     ptLocalMask=&scalarMask ;
+  }
+  CArray<bool,1>& localMask=*ptLocalMask ;
+  
+  CClientClientDHTInt::Index2VectorInfoTypeMap globalIndex2ProcRank;
+  globalIndex2ProcRank.rehash(std::ceil(nIndexSize/globalIndex2ProcRank.max_load_factor()));
+  for (int idx = 0; idx < nIndexSize; ++idx)
+  {
+    if (localMask(idx))
+    {
+      if (2 == elementType) // domain
+      {
+       globalIndex = domainSrc_->i_index(idx) + domainSrc_->j_index(idx) * domainSrc_->ni_glo;
+      }
+      else if (1 == elementType) // axis
+      {
+        globalIndex = axisSrc_->index(idx);
+      }
+      else // scalar
+      {
+        globalIndex = 0;
+      }
+     
+      globalIndex2ProcRank[globalIndex].resize(1);
+      globalIndex2ProcRank[globalIndex][0] = clientRank;
+    }
+  }
+
+  CClientClientDHTInt dhtIndexProcRank(globalIndex2ProcRank, client->intraComm);
+  dhtIndexProcRank.computeIndexInfoMapping(globalAxisIndex);
+
+  globalAxisIndexOnProc = dhtIndexProcRank.getInfoIndexMap();
+}
+CATCH
+
+}
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/transformation/axis_algorithm_transformation.hpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/transformation/axis_algorithm_transformation.hpp	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/transformation/axis_algorithm_transformation.hpp	(revision 1749)
@@ -0,0 +1,62 @@
+/*!
+   \file axis_algorithm_transformation.hpp
+   \author Ha NGUYEN
+   \since 14 May 2015
+   \date 29 June 2015
+
+   \brief Interface for all axis transformation algorithms.
+ */
+#ifndef __XIOS_AXIS_ALGORITHM_TRANSFORMATION_HPP__
+#define __XIOS_AXIS_ALGORITHM_TRANSFORMATION_HPP__
+
+#include "generic_algorithm_transformation.hpp"
+#include "grid_transformation_factory_impl.hpp"
+
+namespace xios {
+
+class CAxis;
+class CDomain;
+class CScalar;
+/*!
+  \class CAxisAlgorithmTransformation
+  Algorithms for axis.
+*/
+class CAxisAlgorithmTransformation : public virtual CGenericAlgorithmTransformation
+{
+public:
+  CAxisAlgorithmTransformation(CAxis* axisDestination, CAxis* axisSource);
+  CAxisAlgorithmTransformation(CAxis* axisDestination, CDomain* domainSource);
+  CAxisAlgorithmTransformation(CAxis* axisDestination, CScalar* scalarSource);
+
+  virtual ~CAxisAlgorithmTransformation();
+
+protected:
+  void computeIndexSourceMapping_(const std::vector<CArray<double,1>* >& dataAuxInputs);
+
+  virtual void computeExchangeGlobalIndex(const CArray<size_t,1>& globalAxisIndex,
+                                          int elementType,
+                                          CClientClientDHTInt::Index2VectorInfoTypeMap& globalDomainIndexOnProc);
+
+protected:
+  //! Global index of an axis on grid destination
+  std::vector<int> axisDestGlobalIndex_;
+
+  //! Size of
+  int axisDestGlobalSize_;
+
+    //! Axis on grid destination
+  CAxis* axisDest_;
+
+  //! Axis on grid source
+  CAxis* axisSrc_;
+
+  //! Domain on grid source
+  CDomain* domainSrc_;
+
+  //! Scalar on grid source
+
+  CScalar* scalarSrc_;
+};
+
+}
+#endif // __XIOS_AXIS_ALGORITHM_TRANSFORMATION_HPP__
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/transformation/axis_algorithm_zoom.cpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/transformation/axis_algorithm_zoom.cpp	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/transformation/axis_algorithm_zoom.cpp	(revision 1749)
@@ -0,0 +1,121 @@
+/*!
+   \file axis_algorithm_zoom.cpp
+   \brief Algorithm for zooming an axis.
+ */
+#include "axis_algorithm_zoom.hpp"
+#include "axis.hpp"
+#include "grid.hpp"
+#include "grid_transformation_factory_impl.hpp"
+#include "zoom_axis.hpp"
+
+namespace xios {
+CGenericAlgorithmTransformation* CAxisAlgorithmZoom::create(CGrid* gridDst, CGrid* gridSrc,
+                                                           CTransformation<CAxis>* transformation,
+                                                           int elementPositionInGrid,
+                                                           std::map<int, int>& elementPositionInGridSrc2ScalarPosition,
+                                                           std::map<int, int>& elementPositionInGridSrc2AxisPosition,
+                                                           std::map<int, int>& elementPositionInGridSrc2DomainPosition,
+                                                           std::map<int, int>& elementPositionInGridDst2ScalarPosition,
+                                                           std::map<int, int>& elementPositionInGridDst2AxisPosition,
+                                                           std::map<int, int>& elementPositionInGridDst2DomainPosition)
+TRY
+{
+  std::vector<CAxis*> axisListDestP = gridDst->getAxis();
+  std::vector<CAxis*> axisListSrcP  = gridSrc->getAxis();
+
+  CZoomAxis* zoomAxis = dynamic_cast<CZoomAxis*> (transformation);
+  int axisDstIndex = elementPositionInGridDst2AxisPosition[elementPositionInGrid];
+  int axisSrcIndex = elementPositionInGridSrc2AxisPosition[elementPositionInGrid];
+
+  return (new CAxisAlgorithmZoom(axisListDestP[axisDstIndex], axisListSrcP[axisSrcIndex], zoomAxis));
+}
+CATCH
+
+bool CAxisAlgorithmZoom::registerTrans()
+TRY
+{
+  CGridTransformationFactory<CAxis>::registerTransformation(TRANS_ZOOM_AXIS, create);
+}
+CATCH
+
+CAxisAlgorithmZoom::CAxisAlgorithmZoom(CAxis* axisDestination, CAxis* axisSource, CZoomAxis* zoomAxis)
+: CAxisAlgorithmTransformation(axisDestination, axisSource)
+TRY
+{
+  zoomAxis->checkValid(axisSource);
+  zoomBegin_ = zoomAxis->begin.getValue();
+  zoomN_  = zoomAxis->n.getValue();
+  zoomEnd_   = zoomBegin_ + zoomN_ - 1;
+
+  if (zoomN_ > axisSource->n_glo.getValue())
+  {
+    ERROR("CAxisAlgorithmZoom::CAxisAlgorithmZoom(CAxis* axisDestination, CAxis* axisSource, CZoomAxis* zoomAxis)",
+           << "Zoom size is greater than global size of source axis"
+           << "Global size of source axis " <<axisSource->getId() << " is " << axisSource->n_glo.getValue()  << std::endl
+           << "Zoom size is " << zoomN_ );
+  }
+
+  int idxSrc, nDest = 0, beginDestLoc, beginDestGlo = 0 ;
+  int indGloDest, indGloSrc, iSrc;
+  for (int i = 0; i < axisSrc_->n.getValue(); i++)
+  {
+    idxSrc = axisSrc_->index(i);
+    if ((idxSrc >= zoomBegin_) && (idxSrc <= zoomEnd_))
+    {
+      if (nDest == 0) beginDestLoc = i;
+      ++nDest;
+    }
+  }
+  beginDestGlo = beginDestLoc + axisSrc_->begin - zoomBegin_;
+  axisDest_->n_glo.setValue(zoomN_);
+  axisDest_->n.setValue(nDest);
+  axisDest_->begin.setValue(beginDestGlo);
+  axisDest_->index.resize(nDest);
+
+  axisDest_->data_n.setValue(nDest);
+  axisDest_->data_begin.setValue(0);
+  axisDest_->data_index.resize(nDest);
+
+  axisDest_->mask.resize(nDest);
+  if (axisSrc_->hasValue) axisDest_->value.resize(nDest);
+  if (axisSrc_->hasLabel) axisDest_->label.resize(nDest);
+  if (axisSrc_->hasBounds) axisDest_->bounds.resize(2,nDest);
+
+  this->transformationMapping_.resize(1);
+  this->transformationWeight_.resize(1);
+  TransformationIndexMap& transMap = this->transformationMapping_[0];
+  TransformationWeightMap& transWeight = this->transformationWeight_[0];
+
+  for (int iDest = 0; iDest < nDest; iDest++)
+  {
+    iSrc = iDest + beginDestLoc;
+    axisDest_->index(iDest) = iDest + beginDestGlo;
+    axisDest_->data_index(iDest) = axisSrc_->data_index(iSrc) - beginDestLoc;
+    axisDest_->mask(iDest) = axisSrc_->mask(iSrc);
+
+    if (axisSrc_->hasValue)
+      axisDest_->value(iDest) = axisSrc_->value(iSrc);
+    if (axisSrc_->hasLabel)
+      axisDest_->label(iDest) = axisSrc_->label(iSrc);
+    if (axisSrc_->hasBounds)
+    {
+      axisDest_->bounds(0,iDest) = axisSrc_->bounds(0,iSrc);
+      axisDest_->bounds(1,iDest) = axisSrc_->bounds(1,iSrc);
+    }
+    indGloDest = axisDest_->index(iDest);
+    indGloSrc = axisSrc_->index(iSrc);
+    transMap[indGloDest].push_back(indGloSrc);
+    transWeight[indGloDest].push_back(1.0);
+
+  }
+}
+CATCH
+
+/*!
+  Compute the index mapping between domain on grid source and one on grid destination
+*/
+void CAxisAlgorithmZoom::computeIndexSourceMapping_(const std::vector<CArray<double,1>* >& dataAuxInputs)
+{
+}
+
+}
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/transformation/axis_algorithm_zoom.hpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/transformation/axis_algorithm_zoom.hpp	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/transformation/axis_algorithm_zoom.hpp	(revision 1749)
@@ -0,0 +1,60 @@
+/*!
+   \file axis_algorithm_zoom.hpp
+   \brief Algorithm for zooming an axis.
+ */
+#ifndef __XIOS_AXIS_ALGORITHM_ZOOM_HPP__
+#define __XIOS_AXIS_ALGORITHM_ZOOM_HPP__
+
+#include "axis_algorithm_transformation.hpp"
+#include "transformation.hpp"
+
+namespace xios {
+class CAxis;
+class CZoomAxis;
+
+/*!
+  \class CAxisAlgorithmZoom
+  Implementing zoom on axis
+  A zoomed region can be considered as region that isn't masked.
+  Only this zoomed region is zoomed to write on Netcdf.
+*/
+class CAxisAlgorithmZoom : public CAxisAlgorithmTransformation
+{
+public:
+  CAxisAlgorithmZoom(CAxis* axisDestination, CAxis* axisSource, CZoomAxis* zoomAxis);
+
+  virtual ~CAxisAlgorithmZoom() {}
+
+  static bool registerTrans();
+protected:
+  void computeIndexSourceMapping_(const std::vector<CArray<double,1>* >& dataAuxInputs);
+
+private:
+
+private:
+  //! Global zoom begin on axis
+  StdSize zoomBegin_;
+
+  //! Global zoom end on axis
+  StdSize zoomEnd_;
+
+  //! Global zoom size on axis
+  StdSize zoomN_;
+
+  std::vector<int> zoomIndex_;
+
+private:
+
+  static CGenericAlgorithmTransformation* create(CGrid* gridDst, CGrid* gridSrc,
+                                                CTransformation<CAxis>* transformation,
+                                                int elementPositionInGrid,
+                                                std::map<int, int>& elementPositionInGridSrc2ScalarPosition,
+                                                std::map<int, int>& elementPositionInGridSrc2AxisPosition,
+                                                std::map<int, int>& elementPositionInGridSrc2DomainPosition,
+                                                std::map<int, int>& elementPositionInGridDst2ScalarPosition,
+                                                std::map<int, int>& elementPositionInGridDst2AxisPosition,
+                                                std::map<int, int>& elementPositionInGridDst2DomainPosition);
+};
+
+}
+#endif // __XIOS_AXIS_ALGORITHM_ZOOM_HPP__
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/transformation/domain_algorithm_compute_connectivity.cpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/transformation/domain_algorithm_compute_connectivity.cpp	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/transformation/domain_algorithm_compute_connectivity.cpp	(revision 1749)
@@ -0,0 +1,111 @@
+/*!
+   \file domain_algorithm_compute_connectivity.cpp
+   \author Ha NGUYEN
+   \since 15 Jul 2016
+   \date 15 Jul 2016
+
+   \brief Algorithm for compute_connectivity on an domain.
+ */
+#include "domain_algorithm_compute_connectivity.hpp"
+#include "compute_connectivity_domain.hpp"
+#include "mesh.hpp"
+#include "domain.hpp"
+#include "grid.hpp"
+#include "grid_transformation_factory_impl.hpp"
+
+namespace xios {
+CGenericAlgorithmTransformation* CDomainAlgorithmComputeConnectivity::create(CGrid* gridDst, CGrid* gridSrc,
+                                                                     CTransformation<CDomain>* transformation,
+                                                                     int elementPositionInGrid,
+                                                                     std::map<int, int>& elementPositionInGridSrc2ScalarPosition,
+                                                                     std::map<int, int>& elementPositionInGridSrc2AxisPosition,
+                                                                     std::map<int, int>& elementPositionInGridSrc2DomainPosition,
+                                                                     std::map<int, int>& elementPositionInGridDst2ScalarPosition,
+                                                                     std::map<int, int>& elementPositionInGridDst2AxisPosition,
+                                                                     std::map<int, int>& elementPositionInGridDst2DomainPosition)
+TRY
+{
+  std::vector<CDomain*> domainListDestP = gridDst->getDomains();
+  std::vector<CDomain*> domainListSrcP  = gridSrc->getDomains();
+
+  CComputeConnectivityDomain* compute_connectivityDomain = dynamic_cast<CComputeConnectivityDomain*> (transformation);
+  int domainDstIndex = elementPositionInGridDst2DomainPosition[elementPositionInGrid];
+  int domainSrcIndex = elementPositionInGridSrc2DomainPosition[elementPositionInGrid];
+
+  return (new CDomainAlgorithmComputeConnectivity(domainListDestP[domainDstIndex], domainListSrcP[domainSrcIndex], compute_connectivityDomain));
+}
+CATCH
+
+bool CDomainAlgorithmComputeConnectivity::registerTrans()
+TRY
+{
+  CGridTransformationFactory<CDomain>::registerTransformation(TRANS_COMPUTE_CONNECTIVITY_DOMAIN, create);
+}
+CATCH
+
+CDomainAlgorithmComputeConnectivity::CDomainAlgorithmComputeConnectivity(CDomain* domainDestination, CDomain* domainSource,
+                                                                         CComputeConnectivityDomain* compute_connectivityDomain)
+: CDomainAlgorithmTransformation(domainDestination, domainSource)
+TRY
+{
+  this->type_ = (ELEMENT_NO_MODIFICATION_WITHOUT_DATA);
+  compute_connectivityDomain->checkValid(domainDestination);
+  int& nbNeighborMax = compute_connectivityDomain->n_neighbor_max;
+  CArray<int,1>& nbNeighbor = compute_connectivityDomain->n_neighbor;
+  CArray<int,2>& localNeighbors = compute_connectivityDomain->local_neighbor;
+  int type = 1; // Edge type
+  switch (compute_connectivityDomain->type)
+  {
+    case CComputeConnectivityDomain::type_attr::node :
+      type = 0;
+      break;
+    case CComputeConnectivityDomain::type_attr::edge :
+      type = 1;
+      break;
+    default:
+      break;
+  }
+
+  computeLocalConnectivity(type, domainDestination, nbNeighborMax, nbNeighbor, localNeighbors);
+}
+CATCH
+
+/*!
+ *  Compute local connectivity of a domain
+ *  \param[in] type type of connectivity (node or edge)
+ *  \param[in] domain domain on which we calculate local connectivity
+ *  \param[in/out] nbConnectivityMax maximum number of neighbor a cell of domain has
+ *  \param[in/out] nbConnectivity number of neighbor a cell has
+ *  \param[in/out] localConnectivity localConnectivity local index of neighbor of a cell
+ */
+void CDomainAlgorithmComputeConnectivity::computeLocalConnectivity(int type,
+                                                                  CDomain* domain,
+                                                                  int& nbConnectivityMax,
+                                                                  CArray<int,1>& nbConnectivity,
+                                                                  CArray<int,2>& localConnectivity)
+TRY
+{
+
+  CMesh mesh;
+
+  CArray<double,2>& bounds_lon = domain->bounds_lon_1d;
+  CArray<double,2>& bounds_lat = domain->bounds_lat_1d;
+  int ncell = bounds_lon.shape()[1];
+  CArray<int,1> localIndex(ncell);
+  for (int idx = 0; idx <ncell; ++idx) localIndex(idx) = idx;
+
+  mesh.getLocalNghbFaces(type, localIndex, bounds_lon, bounds_lat, localConnectivity, nbConnectivity);
+  nbConnectivityMax = 0;
+  for (int idx =0; idx < nbConnectivity.numElements(); ++idx)
+    if (nbConnectivityMax < nbConnectivity(idx)) nbConnectivityMax = nbConnectivity(idx);
+}
+CATCH
+
+/*!
+  Compute the index mapping between domain on grid source and one on grid destination
+*/
+void CDomainAlgorithmComputeConnectivity::computeIndexSourceMapping_(const std::vector<CArray<double,1>* >& dataAuxInputs)
+{
+}
+
+}
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/transformation/domain_algorithm_compute_connectivity.hpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/transformation/domain_algorithm_compute_connectivity.hpp	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/transformation/domain_algorithm_compute_connectivity.hpp	(revision 1749)
@@ -0,0 +1,53 @@
+/*!
+   \file domain_algorithm_compute_connectivity.hpp
+   \author Ha NGUYEN
+   \since 03 June 2015
+   \date 12 June 2015
+
+   \brief Algorithm for compute_connectivitying on an domain.
+ */
+#ifndef __XIOS_DOMAIN_ALGORITHM_COMPUTE_CONNECTIVITY_HPP__
+#define __XIOS_DOMAIN_ALGORITHM_COMPUTE_CONNECTIVITY_HPP__
+
+#include "domain_algorithm_transformation.hpp"
+#include "transformation.hpp"
+
+namespace xios {
+class CDomain;
+class CComputeConnectivityDomain;
+
+/*!
+  \class CDomainAlgorithmComputeConnectivity
+*/
+class CDomainAlgorithmComputeConnectivity : public CDomainAlgorithmTransformation
+{
+public:
+  CDomainAlgorithmComputeConnectivity(CDomain* domainDestination, CDomain* domainSource, CComputeConnectivityDomain* compute_connectivityDomain);
+
+  virtual ~CDomainAlgorithmComputeConnectivity() {}
+
+  static bool registerTrans();
+protected:
+  void computeIndexSourceMapping_(const std::vector<CArray<double,1>* >& dataAuxInputs);
+
+protected:
+  void computeLocalConnectivity(int type,
+                                CDomain* domain,
+                                int& nbConnectivityMax,
+                                CArray<int,1>& nbConnectivity,
+                                CArray<int,2>& localConnectivity);
+
+private:
+  static CGenericAlgorithmTransformation* create(CGrid* gridDst, CGrid* gridSrc,
+                                                CTransformation<CDomain>* transformation,
+                                                int elementPositionInGrid,
+                                                std::map<int, int>& elementPositionInGridSrc2ScalarPosition,
+                                                std::map<int, int>& elementPositionInGridSrc2AxisPosition,
+                                                std::map<int, int>& elementPositionInGridSrc2DomainPosition,
+                                                std::map<int, int>& elementPositionInGridDst2ScalarPosition,
+                                                std::map<int, int>& elementPositionInGridDst2AxisPosition,
+                                                std::map<int, int>& elementPositionInGridDst2DomainPosition);
+};
+
+}
+#endif // __XIOS_DOMAIN_ALGORITHM_COMPUTE_CONNECTIVITY_HPP__
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/transformation/domain_algorithm_expand.cpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/transformation/domain_algorithm_expand.cpp	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/transformation/domain_algorithm_expand.cpp	(revision 1749)
@@ -0,0 +1,694 @@
+/*!
+   \file domain_algorithm_expand.cpp
+   \author Ha NGUYEN
+   \since 08 Aug 2016
+   \date 19 Sep 2016
+
+   \brief Algorithm for expanding an domain.
+ */
+#include "domain_algorithm_expand.hpp"
+#include "expand_domain.hpp"
+#include "mesh.hpp"
+#include "domain.hpp"
+#include "grid.hpp"
+#include "grid_transformation_factory_impl.hpp"
+#include "context.hpp"
+#include "context_client.hpp"
+
+namespace xios {
+CGenericAlgorithmTransformation* CDomainAlgorithmExpand::create(CGrid* gridDst, CGrid* gridSrc,
+                                                               CTransformation<CDomain>* transformation,
+                                                               int elementPositionInGrid,
+                                                               std::map<int, int>& elementPositionInGridSrc2ScalarPosition,
+                                                               std::map<int, int>& elementPositionInGridSrc2AxisPosition,
+                                                               std::map<int, int>& elementPositionInGridSrc2DomainPosition,
+                                                               std::map<int, int>& elementPositionInGridDst2ScalarPosition,
+                                                               std::map<int, int>& elementPositionInGridDst2AxisPosition,
+                                                               std::map<int, int>& elementPositionInGridDst2DomainPosition)
+TRY
+{
+  std::vector<CDomain*> domainListDestP = gridDst->getDomains();
+  std::vector<CDomain*> domainListSrcP  = gridSrc->getDomains();
+
+  CExpandDomain* expandDomain = dynamic_cast<CExpandDomain*> (transformation);
+  int domainDstIndex = elementPositionInGridDst2DomainPosition[elementPositionInGrid];
+  int domainSrcIndex = elementPositionInGridSrc2DomainPosition[elementPositionInGrid];
+
+  return (new CDomainAlgorithmExpand(domainListDestP[domainDstIndex], domainListSrcP[domainSrcIndex], expandDomain));
+}
+CATCH
+
+bool CDomainAlgorithmExpand::registerTrans()
+TRY
+{
+  CGridTransformationFactory<CDomain>::registerTransformation(TRANS_EXPAND_DOMAIN, create);
+}
+CATCH
+
+CDomainAlgorithmExpand::CDomainAlgorithmExpand(CDomain* domainDestination,
+                                               CDomain* domainSource,
+                                               CExpandDomain* expandDomain)
+: CDomainAlgorithmTransformation(domainDestination, domainSource),
+  isXPeriodic_(false), isYPeriodic_(false)
+TRY
+{
+  if (domainDestination == domainSource)
+  {
+    ERROR("CDomainAlgorithmExpand::CDomainAlgorithmExpand(CDomain* domainDestination,CDomain* domainSource, CExpandDomain* expandDomain)",
+           << "Domain source and domain destination are the same. Please make sure domain destination refers to domain source" << std::endl
+           << "Domain source " <<domainSource->getId() << std::endl
+           << "Domain destination " <<domainDestination->getId() << std::endl);
+  }
+
+  this->type_ = (ELEMENT_MODIFICATION_WITH_DATA);
+  // Make sure domain source have all valid attributes
+  // domainSource->checkAllAttributes();
+  expandDomain->checkValid(domainDestination);
+  if (!expandDomain->i_periodic.isEmpty()) isXPeriodic_ = expandDomain->i_periodic;
+  if (!expandDomain->j_periodic.isEmpty()) isYPeriodic_ = expandDomain->j_periodic;
+  
+  switch (expandDomain->type)
+  {
+    case CExpandDomain::type_attr::node :
+      expandDomainNodeConnectivity(domainDestination,
+                                   domainSource);
+      break;
+    case CExpandDomain::type_attr::edge :
+      expandDomainEdgeConnectivity(domainDestination,
+                                   domainSource);
+      break;
+    default:
+      break;
+  }
+}
+CATCH
+
+/*!
+ *  Expand domain with edge-type neighbor
+ *  \param[in/out] domainDestination domain destination and will be modified
+ *  \param[in] domainSource domain source
+ */
+void CDomainAlgorithmExpand::expandDomainEdgeConnectivity(CDomain* domainDestination,
+                                                          CDomain* domainSource)
+TRY
+{
+  CContext* context = CContext::getCurrent();
+  CContextClient* client=context->client;
+
+  int type = 1; // For edge
+  CMesh mesh;
+  CArray<double,2>& bounds_lon_src = domainSource->bounds_lon_1d;
+  CArray<double,2>& bounds_lat_src = domainSource->bounds_lat_1d;
+  CArray<int,2> neighborsSrc;
+  switch (domainSource->type) {
+   case CDomain::type_attr::unstructured:      
+      mesh.getGlobalNghbFaces(type, client->intraComm, domainSource->i_index, bounds_lon_src, bounds_lat_src, neighborsSrc);
+      updateUnstructuredDomainAttributes(domainDestination, domainSource, neighborsSrc);
+      break;
+   default:
+      updateRectilinearDomainAttributes(domainDestination, domainSource, neighborsSrc);
+      break;      
+  }  
+}
+CATCH
+
+/*!
+ *  Expand domain with node-type neighbor
+ *  \param[in/out] domainDestination domain destination and will be modified
+ *  \param[in] domainSource domain source
+ */
+void CDomainAlgorithmExpand::expandDomainNodeConnectivity(CDomain* domainDestination,
+                                                          CDomain* domainSource)
+TRY
+{
+  CContext* context = CContext::getCurrent();
+  CContextClient* client=context->client;
+
+  int type = 1; // For edge
+  CMesh mesh;
+  CArray<double,2>& bounds_lon_src = domainSource->bounds_lon_1d;
+  CArray<double,2>& bounds_lat_src = domainSource->bounds_lat_1d;
+  CArray<int,2> neighborsSrc;
+  switch (domainSource->type) {
+   case CDomain::type_attr::unstructured:      
+      mesh.getGlobalNghbFaces(type, client->intraComm, domainSource->i_index, bounds_lon_src, bounds_lat_src, neighborsSrc);
+      updateUnstructuredDomainAttributes(domainDestination, domainSource, neighborsSrc);
+      break;
+   default:
+      updateRectilinearDomainAttributes(domainDestination, domainSource, neighborsSrc);
+      break;      
+  }  
+}
+CATCH
+
+/*!
+ *  Extend rectilinear or curvilinear domain destination and update its attributes
+ *  Suppose that domain destination and domain source have the same values for all attributes (by inheritance)
+ *  \param [in/out] domainDestination domain destination
+ *  \param [in] domainSource domain source
+ *  \param [in] neighborsDomainSrc neighbor of domain source. For now, we don't need it for rectilinear
+ */
+void CDomainAlgorithmExpand::updateRectilinearDomainAttributes(CDomain* domainDestination,
+                                                               CDomain* domainSource,
+                                                               CArray<int,2>& neighborsDomainSrc)
+TRY
+{
+  int index, globalIndex, idx;
+  int iindexDst, jindexDst, globIndexDst;
+  int iindexSrc, jindexSrc, globIndexSrc;
+  CContext* context = CContext::getCurrent();
+  CContextClient* client=context->client;
+
+  // First of all, "copy" all attributes of domain source to domain destination
+  StdString domainDstRef = (!domainDestination->domain_ref.isEmpty()) ? domainDestination->domain_ref.getValue()
+                                                                      : "";
+  if (domainDstRef != domainSource->getId())
+  {
+    domainDestination->domain_ref.setValue(domainSource->getId());
+    domainDestination->solveRefInheritance(true);
+  }
+
+  if (domainDstRef.empty()) domainDestination->domain_ref.reset();
+  else domainDestination->domain_ref.setValue(domainDstRef);
+
+  
+  // Here are attributes of source need tranfering
+  int niGloSrc = domainSource->ni_glo;
+  int njGloSrc = domainSource->nj_glo;
+  int niSrc = domainSource->ni, ibegin = domainSource->ibegin;
+  int njSrc = domainSource->nj, jbegin = domainSource->jbegin;
+  int dataDimSrc = domainSource->data_dim;
+  CArray<bool,1>& mask_1d_src = domainSource->domainMask;
+  CArray<int,1>& i_index_src = domainSource->i_index;
+  CArray<int,1>& j_index_src = domainSource->j_index;
+  CArray<int,1>& data_i_index_src = domainSource->data_i_index;
+  CArray<int,1>& data_j_index_src = domainSource->data_j_index;
+  int data_i_begin_src = domainSource->data_ibegin;
+  int data_j_begin_src = domainSource->data_jbegin;
+  CArray<double,1>& lon_src = domainSource->lonvalue;
+  CArray<double,1>& lat_src = domainSource->latvalue;
+
+  // We need to generate boundary for longitude and latitude
+  if (domainSource->bounds_lon_1d.isEmpty() || domainSource->bounds_lat_1d.isEmpty())
+  {
+    CArray<double,1> lon = lon_src(Range(0,niSrc-1));
+    CArray<double,1> lat = lat_src(Range(0,lat_src.numElements()-niSrc,niSrc));
+    CArray<double,2>& bounds_lon_src = domainSource->bounds_lon_1d;
+    CArray<double,2>& bounds_lat_src = domainSource->bounds_lat_1d;
+    domainSource->fillInRectilinearBoundLonLat(lon_src, lat_src, bounds_lon_src, bounds_lat_src);
+  }
+
+
+  CArray<double,2>& bounds_lon_src = domainSource->bounds_lon_1d;
+  CArray<double,2>& bounds_lat_src = domainSource->bounds_lat_1d;
+
+  int nVertex       = bounds_lon_src.shape()[0];
+  int oldNbLocal = i_index_src.numElements();
+  // Calculate ni, nj by using i_index and j_index
+  int niSrcByIndex = max(i_index_src) - min(i_index_src) + 1;
+  int njSrcByIndex = max(j_index_src) - min(j_index_src) + 1;  
+  int dataIindexBoundSrc = (1 == dataDimSrc) ? (niSrcByIndex * njSrcByIndex) : niSrcByIndex;
+  int dataJindexBoundSrc = (1 == dataDimSrc) ? (niSrcByIndex * njSrcByIndex) : njSrcByIndex;
+
+  // Uncompress data_i_index, data_j_index
+  CArray<int,1> data_i_index_src_full(oldNbLocal);
+  CArray<int,1> data_j_index_src_full(oldNbLocal);
+  int nbUnMaskedPointOnLocalDomain = 0;
+  data_i_index_src_full = -1; // Suppose all values are masked
+  data_j_index_src_full = -1; // Suppose all values are masked
+  for (idx = 0; idx < data_i_index_src.numElements(); ++idx)
+  {
+    int dataIidx = data_i_index_src(idx) + data_i_begin_src;
+    int dataJidx = data_j_index_src(idx) + data_j_begin_src;
+    if ((0 <= dataIidx) && (dataIidx < dataIindexBoundSrc) &&
+        (0 <= dataJidx) && (dataJidx < dataJindexBoundSrc))
+    {
+      data_i_index_src_full(nbUnMaskedPointOnLocalDomain) = dataIidx;
+      data_j_index_src_full(nbUnMaskedPointOnLocalDomain) = dataJidx;
+      ++nbUnMaskedPointOnLocalDomain;
+    }
+  }
+
+  // Expand domain destination, not only local but also global
+  int niGloDst = niGloSrc + 2;
+  int njGloDst = njGloSrc + 2;
+  int niDst = niSrc + 2;
+  int njDst = njSrc + 2;
+  domainDestination->ni_glo.setValue(niGloDst);
+  domainDestination->nj_glo.setValue(njGloDst);
+  domainDestination->ni.setValue(niDst);
+  domainDestination->nj.setValue(njDst);
+
+  CArray<bool,1>& mask_1d_dst = domainDestination->domainMask;
+  CArray<int,1>& i_index_dst  = domainDestination->i_index;
+  CArray<int,1>& j_index_dst  = domainDestination->j_index;  
+  CArray<int,1>& data_i_index_dst  = domainDestination->data_i_index;
+  CArray<int,1>& data_j_index_dst  = domainDestination->data_j_index;
+  
+  // Make sure that we use only lonvalue_client, latvalue_client
+  if (!domainDestination->lonvalue_1d.isEmpty()) domainDestination->lonvalue_1d.reset();
+  if (!domainDestination->latvalue_1d.isEmpty()) domainDestination->latvalue_1d.reset();
+  if (!domainDestination->lonvalue_2d.isEmpty()) domainDestination->lonvalue_2d.reset();
+  if (!domainDestination->latvalue_2d.isEmpty()) domainDestination->latvalue_2d.reset();
+
+  // Recalculate i_index, j_index of extended domain
+  // Should be enough for common case, but if we have arbitrary distribution?
+  int newNbLocalDst = niDst * njDst;     
+
+  mask_1d_dst.resize(newNbLocalDst);
+  i_index_dst.resize(newNbLocalDst);
+  j_index_dst.resize(newNbLocalDst);
+  CArray<int,1> data_i_index_dst_full(newNbLocalDst);
+  CArray<int,1> data_j_index_dst_full(newNbLocalDst);
+
+  domainDestination->lonvalue.resizeAndPreserve(newNbLocalDst);
+  domainDestination->latvalue.resizeAndPreserve(newNbLocalDst);
+  domainDestination->bounds_lon_1d.resizeAndPreserve(nVertex, newNbLocalDst);
+  domainDestination->bounds_lat_1d.resizeAndPreserve(nVertex, newNbLocalDst);
+  CArray<double,1>& lon_dst   = domainDestination->lonvalue;
+  CArray<double,1>& lat_dst   = domainDestination->latvalue;
+  CArray<double,2>& bounds_lon_dst = domainDestination->bounds_lon_1d;
+  CArray<double,2>& bounds_lat_dst = domainDestination->bounds_lat_1d;
+
+  // Update i_index, j_index
+  for (int j = 0; j < njDst; ++j)
+    for (int i = 0; i < niDst; ++i)
+    {
+      idx = j * niDst + i; 
+      i_index_dst(idx) = i + ibegin;
+      j_index_dst(idx) = j + jbegin;
+    }
+ 
+
+  // 1. Fill in array relating to global index (i_index, j_index, transmap, etc, ...)
+  // Global index mapping between destination and source
+  this->transformationMapping_.resize(1);
+  this->transformationWeight_.resize(1);
+  TransformationIndexMap& transMap = this->transformationMapping_[0];
+  TransformationWeightMap& transWeight = this->transformationWeight_[0];
+
+  transMap.rehash(std::ceil(newNbLocalDst/transMap.max_load_factor()));
+  transWeight.rehash(std::ceil(newNbLocalDst/transWeight.max_load_factor()));
+  
+  // Index mapping for local domain
+  // Mapping global index of expanded domain into original one 
+  // (Representing global index of expanded domain in form of global index of original one)
+  CArray<size_t,1> globalIndexSrcOnDstDomain(newNbLocalDst); 
+  for (idx = 0; idx < newNbLocalDst; ++idx)
+  {
+    iindexDst = i_index_dst(idx);
+    jindexDst = j_index_dst(idx);
+    globIndexDst = jindexDst * niGloDst + iindexDst;
+    globIndexSrc = (((jindexDst-1)+njGloSrc) % njGloSrc) * niGloSrc + (((iindexDst-1)+niGloSrc) % niGloSrc) ;
+    globalIndexSrcOnDstDomain(idx) = globIndexSrc;
+
+    transMap[globIndexDst].push_back(globIndexSrc);
+    transWeight[globIndexDst].push_back(1.0); 
+  }
+
+  // 2. Exchange local info among domains (lon,lat,bounds,mask,etc,...)
+  CClientClientDHTDouble::Index2VectorInfoTypeMap localData;
+  localData.rehash(std::ceil(oldNbLocal/localData.max_load_factor()));
+
+  // Information exchanged among domains (attention to their order), number in parentheses presents size of data
+  // lon(1) + lat(1) + bounds_lon(nVertex) + bounds_lat(nVertex) + mask(1) + data_i_index(1)
+  int dataPackageSize =  1 + 1 + // lon + lat
+                         nVertex + nVertex + //bounds_lon + bounds_lat
+                         1 + // mask_1d_dst;
+                         1 + 1; // data_i_index + data_j_index
+  // Initialize database
+  for (int idx = 0; idx < oldNbLocal; ++idx)
+  {
+    index = i_index_src(idx) + j_index_src(idx) * niGloSrc;
+    localData[index].resize(dataPackageSize);
+    std::vector<double>& data = localData[index];
+
+    //Pack data
+    int dataIdx = 0;
+    data[dataIdx] = lon_src(idx);++dataIdx;
+    data[dataIdx] = lat_src(idx);++dataIdx;
+    for (int i = 0; i < nVertex; ++i)
+    {
+      data[dataIdx] = bounds_lon_src(i,idx); ++dataIdx;
+    }
+    for (int i = 0; i < nVertex; ++i)
+    {
+      data[dataIdx] = bounds_lat_src(i,idx); ++dataIdx;
+    }
+    data[dataIdx] = mask_1d_src(idx) ? 1.0 : -1.0; ++dataIdx;
+    data[dataIdx] = data_i_index_src_full(idx);++dataIdx;
+    data[dataIdx] = data_j_index_src_full(idx);
+  }
+
+  CClientClientDHTDouble dhtData(localData,client->intraComm);
+  dhtData.computeIndexInfoMapping(globalIndexSrcOnDstDomain);
+  CClientClientDHTDouble::Index2VectorInfoTypeMap& neighborData = dhtData.getInfoIndexMap();
+  CClientClientDHTDouble::Index2VectorInfoTypeMap::iterator ite = neighborData.end(), it;
+
+  // Ok get all data for destination
+  // If domain is not periodic, then we mask all extended part.
+  int nbUnMaskedPointOnExtendedPart = 0, remainder = 0, dataIIndex, dataJIndex;
+  size_t nIdx;
+  double maskValue = 1.0;
+  for (index = 0; index < newNbLocalDst; ++index)
+  {
+     nIdx = globalIndexSrcOnDstDomain(index);
+     it = neighborData.find(nIdx);
+     if (ite != it)
+     {
+        std::vector<double>& data = it->second;
+        // Unpack data
+        int dataIdx = 0;
+        lon_dst(index) = data[dataIdx]; ++dataIdx;
+        lat_dst(index) = data[dataIdx]; ++dataIdx;
+        for (int i = 0; i < nVertex; ++i)
+        {
+          bounds_lon_dst(i,index) = data[dataIdx]; ++dataIdx;
+        }
+        for (int i = 0; i < nVertex; ++i)
+        {
+          bounds_lat_dst(i,index) = data[dataIdx]; ++dataIdx;
+        }
+        
+        // Check whether we have x periodic. If we don't, we should mask all point at 0 and niGloDst-1
+        maskValue = data[dataIdx];
+        if (!isXPeriodic_) 
+        {
+          remainder = i_index_dst(index) % (niGloDst-1);
+          if (0 == remainder) 
+          {
+            maskValue = -1.0;
+          }
+        }
+
+        if (!isYPeriodic_) 
+        {
+          remainder = j_index_dst(index) % (njGloDst-1);
+          if (0 == remainder) 
+          {
+            maskValue = -1.0;
+          }
+        }
+
+        mask_1d_dst(index) = (1.0 == maskValue) ? true : false; ++dataIdx;
+
+        dataIIndex = (int) data[dataIdx];
+        if (!isXPeriodic_) 
+        {
+          remainder = i_index_dst(index) % (niGloDst-1);
+          if (0 == remainder) 
+          {
+            dataIIndex = -1;
+          }
+        }
+        data_i_index_dst_full(index) = dataIIndex; ++dataIdx;
+        
+        dataJIndex = (int) data[dataIdx];
+        if (!isYPeriodic_) 
+        {
+          remainder = j_index_dst(index) % (njGloDst-1);
+          if (0 == remainder) 
+          {
+            dataJIndex = -1;
+          }
+        }        
+        data_j_index_dst_full(index) = dataJIndex;
+
+        if ((0 <= data_i_index_dst_full(index)) && (0 <= data_j_index_dst_full(index)))
+        {
+          ++nbUnMaskedPointOnExtendedPart;
+        }
+     }
+  }
+
+  
+  // Finally, update data_i_index, data_j_index
+  int dataDstDim = domainDestination->data_dim;
+  data_i_index_dst.resize(nbUnMaskedPointOnExtendedPart);
+  data_j_index_dst.resize(nbUnMaskedPointOnExtendedPart); 
+  int count = 0; 
+  for (idx = 0; idx < newNbLocalDst; ++idx)
+  {
+    dataIIndex = data_i_index_dst_full(idx);
+    dataJIndex = data_j_index_dst_full(idx);
+    if ((0 <= dataIIndex) && (0 <= dataJIndex))
+    {
+      data_i_index_dst(count) = (1 == dataDstDim) ? idx : i_index_dst(idx) - i_index_dst(0);
+      data_j_index_dst(count) = (1 == dataDstDim) ? 0   : j_index_dst(idx) - j_index_dst(0);
+      ++count;
+    }
+  }
+
+  // Update data_ni, data_nj
+  
+  domainDestination->data_ni.setValue((1==dataDstDim) ? niDst * njDst : niDst);
+  domainDestination->data_nj.setValue((1==dataDstDim) ? niDst * njDst : njDst);  
+  domainDestination->data_ibegin.setValue(0);
+  domainDestination->data_jbegin.setValue(0);
+
+  // Update longitude and latitude 
+  if (niSrc == domainSource->lonvalue_1d.numElements() && njSrc == domainSource->latvalue_1d.numElements()) // Ok, we have rectilinear here
+  {
+     domainDestination->lonvalue_1d.resize(niDst);
+     domainDestination->lonvalue_1d = lon_dst(Range(0,niDst-1));
+     domainDestination->latvalue_1d.resize(njDst);
+     domainDestination->latvalue_1d = lat_dst(Range(0,lat_dst.numElements()-niDst,niDst));
+  }
+  else // It should be curvilinear
+  {
+     domainDestination->lonvalue_1d.resize(lon_dst.numElements());
+     domainDestination->lonvalue_1d = lon_dst;
+     domainDestination->latvalue_1d.resize(lat_dst.numElements());
+     domainDestination->latvalue_1d = (lat_dst);
+  }
+   domainDestination->mask_1d.resize(domainDestination->domainMask.numElements()) ;
+   domainDestination->mask_1d=domainDestination->domainMask ;
+   domainDestination->computeLocalMask() ;
+}
+CATCH
+
+/*!
+ *  Extend domain destination and update its attributes
+ *  Suppose that domain destination and domain source have the same values for all attributes (by inheritance)
+ *  \param [in/out] domainDestination domain destination
+ *  \param [in] domainSource domain source
+ *  \param [in] neighborsDomainSrc domain extended part
+ */
+void CDomainAlgorithmExpand::updateUnstructuredDomainAttributes(CDomain* domainDestination,
+                                                                CDomain* domainSource,
+                                                                CArray<int,2>& neighborsDomainSrc)
+TRY
+{
+
+  CContext* context = CContext::getCurrent();
+  CContextClient* client=context->client;
+
+  // First of all, "copy" all attributes of domain source to domain destination
+  StdString domainDstRef = (!domainDestination->domain_ref.isEmpty()) ? domainDestination->domain_ref.getValue()
+                                                                      : "";
+  if (domainDstRef != domainSource->getId())
+  {
+    domainDestination->domain_ref.setValue(domainSource->getId());
+    domainDestination->solveRefInheritance(true);
+  }
+
+  if (domainDstRef.empty()) domainDestination->domain_ref.reset();
+  else domainDestination->domain_ref.setValue(domainDstRef);
+
+  // Now extend domain destination
+  int niGlob = domainSource->ni_glo;
+  CArray<bool,1>& mask_1d_src = domainSource->domainMask;
+  CArray<int,1>& i_index_src = domainSource->i_index;
+  CArray<double,1>& lon_src = domainSource->lonvalue_1d;
+  CArray<double,1>& lat_src = domainSource->latvalue_1d;
+  CArray<double,2>& bounds_lon_src = domainSource->bounds_lon_1d;
+  CArray<double,2>& bounds_lat_src = domainSource->bounds_lat_1d;
+  CArray<int,1>& data_i_index_src = domainSource->data_i_index;
+
+  int oldNbLocal = i_index_src.numElements(), index, globalIndex;
+  // Uncompress data_i_index
+  CArray<int,1> data_i_index_src_full(oldNbLocal);
+  int nbUnMaskedPointOnLocalDomain = 0;
+  data_i_index_src_full = -1; // Suppose all values are masked
+  for (int idx = 0; idx < data_i_index_src.numElements(); ++idx)
+  {
+    int dataIdx = data_i_index_src(idx);
+    if ((0 <= dataIdx) && (dataIdx < oldNbLocal))
+    {
+      data_i_index_src_full(nbUnMaskedPointOnLocalDomain) = dataIdx;
+      ++nbUnMaskedPointOnLocalDomain;
+    }
+  }
+
+  CArray<bool,1>& mask_1d_dst = domainDestination->domainMask;
+  CArray<int,1>& i_index_dst = domainDestination->i_index;
+  CArray<int,1>& j_index_dst = domainDestination->j_index;
+  CArray<double,1>& lon_dst = domainDestination->lonvalue_1d;
+  CArray<double,1>& lat_dst = domainDestination->latvalue_1d;
+  CArray<double,2>& bounds_lon_dst = domainDestination->bounds_lon_1d;
+  CArray<double,2>& bounds_lat_dst = domainDestination->bounds_lat_1d;
+  CArray<int,1>& data_i_index_dst = domainDestination->data_i_index;
+  CArray<int,1>& data_j_index_dst = domainDestination->data_j_index;
+
+  // Resize all array-like attributes of domain destination
+  int nbNeighbor    = neighborsDomainSrc.shape()[1];
+  int newNbLocalDst = nbNeighbor + oldNbLocal;
+  int nVertex       = bounds_lon_dst.shape()[0];
+
+  mask_1d_dst.resizeAndPreserve(newNbLocalDst);
+  i_index_dst.resizeAndPreserve(newNbLocalDst);
+  j_index_dst.resizeAndPreserve(newNbLocalDst);
+  lon_dst.resizeAndPreserve(newNbLocalDst);
+  lat_dst.resizeAndPreserve(newNbLocalDst);
+  bounds_lon_dst.resizeAndPreserve(nVertex, newNbLocalDst);
+  bounds_lat_dst.resizeAndPreserve(nVertex, newNbLocalDst);
+  CArray<int,1> data_i_index_dst_full(newNbLocalDst);
+  data_i_index_dst_full(Range(0,oldNbLocal-1)) = data_i_index_src_full;
+  data_i_index_dst_full(Range(oldNbLocal,newNbLocalDst-1)) = -1;
+
+  // 1. Fill in array relating to global index (i_index, j_index, transmap, etc, ...)
+  // Global index mapping between destination and source
+  this->transformationMapping_.resize(1);
+  this->transformationWeight_.resize(1);
+  TransformationIndexMap& transMap = this->transformationMapping_[0];
+  TransformationWeightMap& transWeight = this->transformationWeight_[0];
+
+  transMap.rehash(std::ceil(newNbLocalDst/transMap.max_load_factor()));
+  transWeight.rehash(std::ceil(newNbLocalDst/transWeight.max_load_factor()));
+  // First, index mapping for local domain
+  for (int idx = 0; idx < oldNbLocal; ++idx)
+  {
+    index = i_index_dst(idx);
+    transMap[index].push_back(index);
+    transWeight[index].push_back(1.0);
+  }
+  // Then, index mapping for extended part
+  for (int idx = 0; idx < nbNeighbor; ++idx)
+  {
+    index = idx + oldNbLocal;
+    globalIndex = neighborsDomainSrc(0,idx);
+    i_index_dst(index) = globalIndex;
+    j_index_dst(index) = 0;
+    transMap[globalIndex].push_back(globalIndex);
+    transWeight[globalIndex].push_back(1.0);
+  }
+
+  // 2. Exchange local info among domains (lon,lat,bounds,mask,etc,...)
+  CClientClientDHTDouble::Index2VectorInfoTypeMap localData;
+  localData.rehash(std::ceil(oldNbLocal/localData.max_load_factor()));
+  // Information exchanged among domains (attention to their order), number in parentheses presents size of data
+  // lon(1) + lat(1) + bounds_lon(nVertex) + bounds_lat(nVertex) + mask(1) + data_i_index(1)
+  int dataPackageSize =  1 + 1 + // lon + lat
+                         nVertex + nVertex + //bounds_lon + bounds_lat
+                         1 + // mask_1d_dst;
+                         1; // data_i_index
+  // Initialize database
+  for (int idx = 0; idx < oldNbLocal; ++idx)
+  {
+    index = i_index_src(idx);
+    localData[index].resize(dataPackageSize);
+    std::vector<double>& data = localData[index];
+
+    //Pack data
+    int dataIdx = 0;
+    data[dataIdx] = lon_src(idx);++dataIdx;
+    data[dataIdx] = lat_src(idx);++dataIdx;
+    for (int i = 0; i < nVertex; ++i)
+    {
+      data[dataIdx] = bounds_lon_src(i,idx); ++dataIdx;
+    }
+    for (int i = 0; i < nVertex; ++i)
+    {
+      data[dataIdx] = bounds_lat_src(i,idx); ++dataIdx;
+    }
+    data[dataIdx] = mask_1d_src(idx) ? 1.0 : -1.0; ++dataIdx;
+    data[dataIdx] = data_i_index_src_full(idx);
+  }
+
+  CClientClientDHTDouble dhtData(localData,client->intraComm);
+  CArray<size_t,1> neighborInd(nbNeighbor);
+  for (int idx = 0; idx < nbNeighbor; ++idx)
+    neighborInd(idx) = neighborsDomainSrc(0,idx);
+
+  // Compute local data on other domains
+  dhtData.computeIndexInfoMapping(neighborInd);
+  CClientClientDHTDouble::Index2VectorInfoTypeMap& neighborData = dhtData.getInfoIndexMap();
+  CClientClientDHTDouble::Index2VectorInfoTypeMap::iterator ite = neighborData.end(), it;
+  // Ok get neighbor data
+  size_t nIdx;
+  int nbUnMaskedPointOnExtendedPart = 0;
+  for (int idx = 0; idx < nbNeighbor; ++idx)
+  {
+    nIdx  = neighborInd(idx);
+    it = neighborData.find(nIdx);
+    if (ite != it)
+    {
+      index = idx + oldNbLocal;
+      std::vector<double>& data = it->second;
+      // Unpack data
+      int dataIdx = 0;
+      lon_dst(index) = data[dataIdx]; ++dataIdx;
+      lat_dst(index) = data[dataIdx]; ++dataIdx;
+      for (int i = 0; i < nVertex; ++i)
+      {
+        bounds_lon_dst(i,index) = data[dataIdx]; ++dataIdx;
+      }
+      for (int i = 0; i < nVertex; ++i)
+      {
+        bounds_lat_dst(i,index) = data[dataIdx]; ++dataIdx;
+      }
+      mask_1d_dst(index) = (1.0 == data[dataIdx]) ? true : false; ++dataIdx;
+      data_i_index_dst_full(index) = (int)(data[dataIdx]);
+      if (0 <= data_i_index_dst_full(index))
+      {
+        data_i_index_dst_full(index) = index;
+        ++nbUnMaskedPointOnExtendedPart;
+      }
+    }
+  }
+
+
+  // Finally, update data_i_index
+  int nbUnMaskedPointOnNewDstDomain = (nbUnMaskedPointOnExtendedPart + nbUnMaskedPointOnLocalDomain);
+  int count = 0, dataIdx;
+  for (int idx = 0; idx < newNbLocalDst; ++idx)
+  {
+    dataIdx = data_i_index_dst_full(idx);
+    if ((0 <= dataIdx))
+    {
+      ++count;
+    }
+  }
+
+  data_i_index_dst.resize(count);
+  data_j_index_dst.resize(count);
+  data_j_index_dst = 0;
+
+  count = 0;
+  for (int idx = 0; idx < newNbLocalDst; ++idx)
+  {
+    dataIdx = data_i_index_dst_full(idx);
+    if ((0 <= dataIdx))
+    {
+      data_i_index_dst(count) = dataIdx;
+      ++count;
+    }
+  }
+
+  // Update ni
+  domainDestination->ni.setValue(newNbLocalDst);
+  domainDestination->mask_1d.resize(domainDestination->domainMask.numElements()) ;
+  domainDestination->mask_1d=domainDestination->domainMask ;
+  domainDestination->computeLocalMask() ;
+}
+CATCH
+
+/*!
+  Compute the index mapping between domain on grid source and one on grid destination
+*/
+void CDomainAlgorithmExpand::computeIndexSourceMapping_(const std::vector<CArray<double,1>* >& dataAuxInputs)
+{
+
+}
+
+}
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/transformation/domain_algorithm_expand.hpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/transformation/domain_algorithm_expand.hpp	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/transformation/domain_algorithm_expand.hpp	(revision 1749)
@@ -0,0 +1,62 @@
+/*!
+   \file domain_algorithm_expand.hpp
+   \author Ha NGUYEN
+   \since 08 Aug 2016
+   \date 08 Aug 2016
+
+   \brief Algorithm for expanding an domain.
+ */
+#ifndef __XIOS_DOMAIN_ALGORITHM_EXPAND_HPP__
+#define __XIOS_DOMAIN_ALGORITHM_EXPAND_HPP__
+
+#include "domain_algorithm_transformation.hpp"
+#include "transformation.hpp"
+
+namespace xios {
+class CDomain;
+class CExpandDomain;
+
+/*!
+  \class CDomainAlgorithmExpand
+*/
+class CDomainAlgorithmExpand : public CDomainAlgorithmTransformation
+{
+public:
+  CDomainAlgorithmExpand(CDomain* domainDestination, CDomain* domainSource, CExpandDomain* expandDomain);
+
+  virtual ~CDomainAlgorithmExpand() {}
+
+  static bool registerTrans();
+
+protected:
+  bool isXPeriodic_; // Flag to determine the periodicity of expansion (only for rectilinear)
+  bool isYPeriodic_; // Flag to determine the periodicity of expansion (only for rectilinear)
+
+protected:
+  void expandDomainEdgeConnectivity(CDomain* domainDestination, CDomain* domainSource);
+  void expandDomainNodeConnectivity(CDomain* domainDestination, CDomain* domainSource);
+  void updateRectilinearDomainAttributes(CDomain* domainDestination,
+                                         CDomain* domainSource,
+                                         CArray<int,2>& neighborsDomainSrc);
+
+  void updateUnstructuredDomainAttributes(CDomain* domainDestination,
+                                          CDomain* domainSource,
+                                          CArray<int,2>& neighborsDomainSrc);
+
+protected:
+  void computeIndexSourceMapping_(const std::vector<CArray<double,1>* >& dataAuxInputs);
+
+private:
+  static CGenericAlgorithmTransformation* create(CGrid* gridDst, CGrid* gridSrc,
+                                                CTransformation<CDomain>* transformation,
+                                                int elementPositionInGrid,
+                                                std::map<int, int>& elementPositionInGridSrc2ScalarPosition,
+                                                std::map<int, int>& elementPositionInGridSrc2AxisPosition,
+                                                std::map<int, int>& elementPositionInGridSrc2DomainPosition,
+                                                std::map<int, int>& elementPositionInGridDst2ScalarPosition,
+                                                std::map<int, int>& elementPositionInGridDst2AxisPosition,
+                                                std::map<int, int>& elementPositionInGridDst2DomainPosition);
+};
+
+}
+#endif // __XIOS_DOMAIN_ALGORITHM_EXPAND_HPP__
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/transformation/domain_algorithm_extract.cpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/transformation/domain_algorithm_extract.cpp	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/transformation/domain_algorithm_extract.cpp	(revision 1749)
@@ -0,0 +1,237 @@
+#include "domain_algorithm_extract.hpp"
+#include "extract_domain.hpp"
+#include "domain.hpp"
+#include "grid.hpp"
+#include "grid_transformation_factory_impl.hpp"
+#include "attribute_template.hpp"
+
+namespace xios {
+CGenericAlgorithmTransformation* CDomainAlgorithmExtract::create(CGrid* gridDst, CGrid* gridSrc,
+                                                             CTransformation<CDomain>* transformation,
+                                                             int elementPositionInGrid,
+                                                             std::map<int, int>& elementPositionInGridSrc2ScalarPosition,
+                                                             std::map<int, int>& elementPositionInGridSrc2AxisPosition,
+                                                             std::map<int, int>& elementPositionInGridSrc2DomainPosition,
+                                                             std::map<int, int>& elementPositionInGridDst2ScalarPosition,
+                                                             std::map<int, int>& elementPositionInGridDst2AxisPosition,
+                                                             std::map<int, int>& elementPositionInGridDst2DomainPosition)
+TRY
+{
+  std::vector<CDomain*> domainListDestP = gridDst->getDomains();
+  std::vector<CDomain*> domainListSrcP  = gridSrc->getDomains();
+
+  CExtractDomain* extractDomain = dynamic_cast<CExtractDomain*> (transformation);
+  int domainDstIndex = elementPositionInGridDst2DomainPosition[elementPositionInGrid];
+  int domainSrcIndex = elementPositionInGridSrc2DomainPosition[elementPositionInGrid];
+
+  return (new CDomainAlgorithmExtract(domainListDestP[domainDstIndex], domainListSrcP[domainSrcIndex], extractDomain));
+}
+CATCH
+
+bool CDomainAlgorithmExtract::registerTrans()
+TRY
+{
+  CGridTransformationFactory<CDomain>::registerTransformation(TRANS_EXTRACT_DOMAIN, create);
+}
+CATCH
+
+CDomainAlgorithmExtract::CDomainAlgorithmExtract(CDomain* domainDestination, CDomain* domainSource, CExtractDomain* extractDomain)
+: CDomainAlgorithmTransformation(domainDestination, domainSource)
+TRY
+{
+  extractDomain->checkValid(domainSource);
+  extractIBegin_ = extractDomain->ibegin.getValue();
+  extractJBegin_ = extractDomain->jbegin.getValue();
+
+  extractNi_  = extractDomain->ni.getValue();
+  extractNj_  = extractDomain->nj.getValue();
+
+  extractIEnd_ = extractIBegin_ + extractNi_ - 1;
+  extractJEnd_ = extractJBegin_ + extractNj_ - 1;
+
+  if (extractNi_ > domainSource->ni_glo.getValue())
+  {
+    ERROR("CDomainAlgorithmExtract::CDomainAlgorithmExtract(CDomain* domainDestination, CDomain* domainSource, CExtractDomain* extractDomain)",
+           << "Extract size is greater than size of domain source"
+           << "Size ni_glo of domain source " <<domainSource->getId() << " is " << domainSource->ni_glo.getValue()  << std::endl
+           << "Extract size is " << extractNi_ );
+  }
+
+  if (extractNj_ > domainSource->nj_glo.getValue())
+  {
+    ERROR("CDomainAlgorithmExtract::CDomainAlgorithmExtract(CDomain* domainDestination, CDomain* domainSource, CExtractDomain* extractDomain)",
+           << "Extract size is greater than size of domain source"
+           << "Size nj_glo of domain source " <<domainSource->getId() << " is " << domainSource->nj_glo.getValue()  << std::endl
+           << "Extract size is " << extractNj_ );
+  }
+
+  // Calculate the size of local domain
+  int ind, indLocSrc, indLocDest, iIdxSrc, jIdxSrc, destIBegin = -1, destJBegin = -1, niDest = 0, njDest = 0, ibeginDest, jbeginDest ;
+  int indGloDest, indGloSrc, niGloSrc = domainSrc_->ni_glo, iSrc, jSrc;
+  for (int j = 0; j < domainSrc_->nj.getValue(); j++)
+  {
+    for (int i = 0; i < domainSrc_->ni.getValue(); i++)
+    {
+      ind = j*domainSrc_->ni + i;
+      iIdxSrc = domainSrc_->i_index(ind);
+      if ((iIdxSrc >= extractIBegin_) && (iIdxSrc <= extractIEnd_))
+      {
+        jIdxSrc = domainSrc_->j_index(ind);
+        if ((jIdxSrc >= extractJBegin_) && (jIdxSrc <= extractJEnd_))
+        {
+          if ((niDest == 0) && (njDest == 0))
+          {
+            destIBegin = i;
+            destJBegin = j;
+          }
+          if (i == destIBegin) ++njDest;
+        }
+        if (j == destJBegin) ++niDest;
+
+      }
+    }
+  }
+  ibeginDest = destIBegin + domainSrc_->ibegin - extractIBegin_;
+  jbeginDest = destJBegin + domainSrc_->jbegin - extractJBegin_;
+  domainDest_->ni_glo.setValue(extractNi_);
+  domainDest_->nj_glo.setValue(extractNj_);
+  domainDest_->ni.setValue(niDest);
+  domainDest_->nj.setValue(njDest);
+  domainDest_->ibegin.setValue(ibeginDest);
+  domainDest_->jbegin.setValue(jbeginDest);
+  domainDest_->i_index.resize(niDest*njDest);
+  domainDest_->j_index.resize(niDest*njDest);
+
+  domainDest_->data_ni.setValue(niDest);
+  domainDest_->data_nj.setValue(njDest);
+  domainDest_->data_ibegin.setValue(0);  // local position
+  domainDest_->data_jbegin.setValue(0);  // local position
+  domainDest_->data_i_index.resize(niDest*njDest); // local position
+  domainDest_->data_j_index.resize(niDest*njDest); // local position
+
+  domainDest_->domainMask.resize(niDest*njDest);
+
+  if (!domainSrc_->lonvalue_1d.isEmpty())
+  {
+    if (domainDest_->type == CDomain::type_attr::rectilinear)
+    {
+      domainDest_->lonvalue_1d.resize(niDest);
+      domainDest_->latvalue_1d.resize(njDest);
+    }
+    else if (domainDest_->type == CDomain::type_attr::unstructured)
+    {
+      domainDest_->lonvalue_1d.resize(niDest);
+      domainDest_->latvalue_1d.resize(niDest);
+    }
+  }
+  else if (!domainSrc_->lonvalue_2d.isEmpty())
+  {
+    domainDest_->lonvalue_2d.resize(niDest,njDest);
+    domainDest_->latvalue_2d.resize(niDest,njDest);
+  }
+
+  if (domainSrc_->hasBounds)
+  {
+    if (!domainSrc_->bounds_lon_2d.isEmpty())
+    {
+      domainDest_->bounds_lon_2d.resize(domainDest_->nvertex, niDest, njDest);
+      domainDest_->bounds_lon_2d.resize(domainDest_->nvertex, niDest, njDest);
+    }
+    else if (!domainSrc_->bounds_lon_1d.isEmpty())
+    {
+      domainDest_->bounds_lon_1d.resize(domainDest_->nvertex, niDest);
+      domainDest_->bounds_lon_1d.resize(domainDest_->nvertex, niDest);
+    }
+  }
+  if (domainSrc_->hasArea) domainDest_->area.resize(niDest,njDest);
+
+  this->transformationMapping_.resize(1);
+  this->transformationWeight_.resize(1);
+  TransformationIndexMap& transMap = this->transformationMapping_[0];
+  TransformationWeightMap& transWeight = this->transformationWeight_[0];
+
+  for (int iDest = 0; iDest < niDest; iDest++)
+  {
+    iSrc = iDest + destIBegin;
+    for (int jDest = 0; jDest < njDest; jDest++)
+    {
+      jSrc = jDest + destJBegin;
+      ind = jSrc * domainSrc_->ni + iSrc;
+      iIdxSrc = domainSrc_->i_index(ind);
+      jIdxSrc = domainSrc_->j_index(ind);
+      indLocDest = jDest*niDest + iDest;
+      indGloDest = (jDest + jbeginDest)*extractNi_ + (iDest + ibeginDest);
+      indLocSrc = (jDest+destJBegin)*domainSrc_->ni + (iDest+destIBegin);
+      indGloSrc = (jIdxSrc )* niGloSrc + iIdxSrc;
+      domainDest_->i_index(indLocDest) = iDest + ibeginDest;                                             // i_index contains global positions
+      domainDest_->j_index(indLocDest) = jDest + jbeginDest;                                             // i_index contains global positions
+      domainDest_->data_i_index(indLocDest) = (domainSrc_->data_dim == 1) ? indLocDest : iDest;          // data_i_index contains local positions
+      domainDest_->data_j_index(indLocDest) = (domainSrc_->data_dim == 1) ? 0 :jDest;                    // data_i_index contains local positions
+      domainDest_->domainMask(indLocDest) = domainSrc_->domainMask(indLocSrc);
+
+      if (domainSrc_->hasArea)
+        domainDest_->area(iDest,jDest) = domainSrc_->area(iSrc,jSrc);
+
+      if (domainSrc_->hasBounds)
+      {
+        if (!domainSrc_->bounds_lon_2d.isEmpty())
+        {
+          for (int n = 0; n < domainSrc_->nvertex; ++n)
+          {
+            domainDest_->bounds_lon_2d(n,iDest,jDest) = domainSrc_->bounds_lon_2d(n,iSrc,jSrc);
+            domainDest_->bounds_lat_2d(n,iDest,jDest) = domainSrc_->bounds_lat_2d(n,iSrc,jSrc);
+          }
+        }
+        else if (!domainSrc_->bounds_lon_1d.isEmpty())
+        {
+          for (int n = 0; n < domainSrc_->nvertex; ++n)
+          {
+            domainDest_->bounds_lon_1d(n,iDest) = domainSrc_->bounds_lon_1d(n,iSrc);
+            domainDest_->bounds_lat_1d(n,iDest) = domainSrc_->bounds_lat_1d(n,iSrc);
+          }
+        }
+      }
+
+      if (domainSrc_->hasLonLat)
+      {
+        if (domainDest_->type == CDomain::type_attr::rectilinear)
+        {
+          domainDest_->latvalue_1d(jDest) = domainSrc_->latvalue_1d(jSrc);
+        }
+        else if (domainDest_->type == CDomain::type_attr::curvilinear)
+        {
+          domainDest_->lonvalue_2d(iDest,jDest) = domainSrc_->lonvalue_2d(iSrc,jSrc);
+          domainDest_->latvalue_2d(iDest,jDest) = domainSrc_->latvalue_2d(iSrc,jSrc);
+        }
+      }
+
+      transMap[indGloDest].push_back(indGloSrc);
+      transWeight[indGloDest].push_back(1.0);
+
+    }
+    if (domainSrc_->hasLonLat)
+    {
+      if (domainDest_->type == CDomain::type_attr::unstructured)
+      {
+        domainDest_->lonvalue_1d(iDest) = domainSrc_->lonvalue_1d(iSrc);
+        domainDest_->latvalue_1d(iDest) = domainSrc_->latvalue_1d(iSrc);
+      }
+      else if (domainDest_->type == CDomain::type_attr::rectilinear)
+      {
+        domainDest_->lonvalue_1d(iDest) = domainSrc_->lonvalue_1d(iSrc);
+      }
+    }
+  }
+
+}
+CATCH
+
+/*!
+  Compute the index mapping between domain on grid source and one on grid destination
+*/
+void CDomainAlgorithmExtract::computeIndexSourceMapping_(const std::vector<CArray<double,1>* >& dataAuxInputs)
+{
+}
+
+
+}
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/transformation/domain_algorithm_extract.hpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/transformation/domain_algorithm_extract.hpp	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/transformation/domain_algorithm_extract.hpp	(revision 1749)
@@ -0,0 +1,59 @@
+
+#ifndef __XIOS_DOMAIN_ALGORITHM_EXTRACT_HPP__
+#define __XIOS_DOMAIN_ALGORITHM_EXTRACT_HPP__
+
+#include "domain_algorithm_transformation.hpp"
+#include "transformation.hpp"
+
+namespace xios {
+
+class CDomain;
+class CExtractDomain;
+
+/*!
+  \class CDomainAlgorithmExtract
+  Implementing extract (alternative zoom) on domain
+*/
+class CDomainAlgorithmExtract : public CDomainAlgorithmTransformation
+{
+public:
+  CDomainAlgorithmExtract(CDomain* domainDestination, CDomain* domainSource, CExtractDomain* extractDomain);
+
+  virtual ~CDomainAlgorithmExtract() {}
+
+  static bool registerTrans();
+protected:
+  void updateDomainAttributes();
+  void computeIndexSourceMapping_(const std::vector<CArray<double,1>* >& dataAuxInputs);
+
+private:
+  void updateExtract();
+
+private:
+  //! Global extract begin on domain
+  int extractIBegin_;
+  int extractJBegin_;
+
+  //! Global extract end on domain
+  int extractIEnd_;
+  int extractJEnd_;
+
+  //! Global extract size on domain
+  int extractNi_;
+  int extractNj_;
+
+private:
+
+  static CGenericAlgorithmTransformation* create(CGrid* gridDst, CGrid* gridSrc,
+                                                CTransformation<CDomain>* transformation,
+                                                int elementPositionInGrid,
+                                                std::map<int, int>& elementPositionInGridSrc2ScalarPosition,
+                                                std::map<int, int>& elementPositionInGridSrc2AxisPosition,
+                                                std::map<int, int>& elementPositionInGridSrc2DomainPosition,
+                                                std::map<int, int>& elementPositionInGridDst2ScalarPosition,
+                                                std::map<int, int>& elementPositionInGridDst2AxisPosition,
+                                                std::map<int, int>& elementPositionInGridDst2DomainPosition);
+};
+
+}
+#endif // __XIOS_DOMAIN_ALGORITHM_EXTRACT_HPP__
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/transformation/domain_algorithm_generate_rectilinear.cpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/transformation/domain_algorithm_generate_rectilinear.cpp	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/transformation/domain_algorithm_generate_rectilinear.cpp	(revision 1749)
@@ -0,0 +1,141 @@
+/*!
+   \file domain_algorithm_generate_rectilinear.cpp
+   \author Ha NGUYEN
+   \since 31 Aug 2015
+   \date 31 Aug 2015
+
+   \brief Algorithm for automatic generation of rectilinear domain.
+ */
+#include "domain_algorithm_generate_rectilinear.hpp"
+#include "grid.hpp"
+#include "domain.hpp"
+#include "context.hpp"
+#include "context_client.hpp"
+#include "generate_rectilinear_domain.hpp"
+
+namespace xios {
+
+CDomainAlgorithmGenerateRectilinear::CDomainAlgorithmGenerateRectilinear(CDomain* domainDestination, CDomain* domainSource,
+                                                                         CGrid* gridDest, CGrid* gridSource,
+                                                                         CGenerateRectilinearDomain* genRectDomain)
+: CDomainAlgorithmTransformation(domainDestination, domainSource), nbDomainDistributedPart_(0)
+TRY
+{
+  type_ = ELEMENT_GENERATION;
+  genRectDomain->checkValid(domainDestination);
+  if (0 != gridSource) computeDistributionGridSource(gridSource);
+  else
+  {
+    computeDistributionGridDestination(gridDest);
+  }
+  fillInAttributesDomainDestination();
+}
+CATCH
+
+/*!
+  Compute the index mapping between domain on grid source and one on grid destination
+*/
+void CDomainAlgorithmGenerateRectilinear::computeIndexSourceMapping_(const std::vector<CArray<double,1>* >& dataAuxInputs)
+{
+ /* Nothing to do */
+}
+
+/*!
+  Calculate the number of distributed parts on domain source
+*/
+void CDomainAlgorithmGenerateRectilinear::computeDistributionGridSource(CGrid* gridSrc)
+TRY
+{
+  CContext* context = CContext::getCurrent();
+  CContextClient* client = context->client;
+
+  std::vector<CDomain*> domListSrcP = gridSrc->getDomains();
+  std::vector<CAxis*> axisListSrcP = gridSrc->getAxis();
+
+  for (int i = 0; i < domListSrcP.size(); ++i) // support we have only domain, more than one, for now, dont know how to process
+  {
+    // First, find (roundly) distribution of associated axis (if any)
+    if (axisListSrcP.empty()) nbDomainDistributedPart_ = client->clientSize;
+    else
+    {
+      gridSrc->solveAxisRef(false);
+      int nbAxis = axisListSrcP.size();
+      std::vector<int> nbLocalAxis(nbAxis, 0);
+      for (int j = 0; j < nbAxis; ++j)
+      {
+        std::vector<int> globalAxisIndex(axisListSrcP[j]->n);
+        for (int idx = 0; idx < axisListSrcP[j]->n; ++idx)
+          globalAxisIndex[idx] = axisListSrcP[j]->begin + idx;
+        HashXIOS<int> hashFunc;
+        StdSize hashValue = hashFunc.hashVec(globalAxisIndex);
+        std::vector<StdSize> recvBuff(client->clientSize);
+        MPI_Gather(&hashValue, 1, MPI_UNSIGNED_LONG,
+                   &recvBuff[0], 1, MPI_UNSIGNED_LONG,
+                   0,
+                   client->intraComm);
+        if (0 == client->clientRank)
+        {
+          std::set<StdSize> setTmp;
+          for (int k = 0; k < recvBuff.size(); ++k)
+          {
+            if (setTmp.end() == setTmp.find(recvBuff[k]))
+            {
+              ++nbLocalAxis[j];
+              setTmp.insert(recvBuff[k]);
+            }
+          }
+        }
+
+        MPI_Bcast(&nbLocalAxis[0], nbAxis, MPI_INT,
+                  0, client->intraComm);
+      }
+
+      int nbAxisDistributedPart = 1;
+      for (int j = 0; j < nbAxis; ++j) nbAxisDistributedPart *= nbLocalAxis[j];
+      nbDomainDistributedPart_ = client->clientSize/nbAxisDistributedPart;
+    }
+  }
+}
+CATCH
+
+/*!
+  Compute the distribution of the domain destination by using available information provided by user such as n_distributed_partition of axis
+*/
+void CDomainAlgorithmGenerateRectilinear::computeDistributionGridDestination(CGrid* gridDest)
+TRY
+{
+  // For now, just suppose that the grid contains only one domain
+  std::vector<CAxis*> axisListDestP = gridDest->getAxis();
+  int nbPartition = 1, idx = 0;
+  for (int i = 0; i < gridDest->axis_domain_order.numElements(); ++i)
+  {
+    if (false == (gridDest->axis_domain_order)(i))
+    {
+      nbPartition *= (axisListDestP[idx]->n_distributed_partition.isEmpty()) ? 1: (axisListDestP[idx]->n_distributed_partition.getValue());
+      ++idx;
+    }
+  }
+
+  CContext* context = CContext::getCurrent();
+  CContextClient* client = context->client;
+  int modPart = (client->clientSize) % nbPartition;
+  if (0 != modPart)
+    ERROR("CDomainAlgorithmGenerateRectilinear::computeDistributionGridDestination(CGrid* gridDest)",
+       << "The grid " <<gridDest->getId() << " is not well-distributed. There is an incompatibility between distribution of axis and domain.");
+  nbDomainDistributedPart_ = client->clientSize/nbPartition;
+
+}
+CATCH
+
+/*!
+  Fill in all necessary attributes of domain destination and their values
+*/
+void CDomainAlgorithmGenerateRectilinear::fillInAttributesDomainDestination()
+TRY
+{
+  if (!domainDest_->distributionAttributesHaveValue())
+    domainDest_->redistribute(nbDomainDistributedPart_);
+  domainDest_->fillInLonLat();
+}
+CATCH
+}
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/transformation/domain_algorithm_generate_rectilinear.hpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/transformation/domain_algorithm_generate_rectilinear.hpp	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/transformation/domain_algorithm_generate_rectilinear.hpp	(revision 1749)
@@ -0,0 +1,49 @@
+/*!
+   \file domain_algorithm_generate_rectilinear.hpp
+   \author Ha NGUYEN
+   \since 31 Aug 2015
+   \date 01 Sep 2015
+
+   \brief Algorithm for automatic generation of rectilinear domain.
+ */
+#ifndef __XIOS_DOMAIN_ALGORITHM_GENERATE_RECTILINEAR_HPP__
+#define __XIOS_DOMAIN_ALGORITHM_GENERATE_RECTILINEAR_HPP__
+
+#include "domain_algorithm_transformation.hpp"
+
+namespace xios {
+
+class CGrid;
+class CDomain;
+class CGenerateRectilinearDomain;
+
+/*!
+  \class CDomainAlgorithmGenerateRectilinear
+  Generate a rectilinear or CURVILINEAR domain and fill in necessary its attributes automatically
+  A new rectilinear (or CURVILINEAR) domain will also be distributed automatically among the processes.
+  The number of processes is deduced from the distribution of the grid source.
+*/
+class CDomainAlgorithmGenerateRectilinear : public CDomainAlgorithmTransformation
+{
+public:
+  CDomainAlgorithmGenerateRectilinear(CDomain* domainDestination, CDomain* domainSource,
+                                      CGrid* gridDest, CGrid* gridSource,
+                                      CGenerateRectilinearDomain* zoomDomain);
+
+  virtual ~CDomainAlgorithmGenerateRectilinear() {}
+
+protected:
+  void computeIndexSourceMapping_(const std::vector<CArray<double,1>* >& dataAuxInputs);
+
+private:
+  void computeDistributionGridSource(CGrid* gridSrc);
+  void computeDistributionGridDestination(CGrid* gridDest);
+  void fillInAttributesDomainDestination();
+
+private:
+  int nbDomainDistributedPart_; //! Number of local domain.
+
+};
+
+}
+#endif // __XIOS_DOMAIN_ALGORITHM_GENERATE_RECTILINEAR_HPP__
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/transformation/domain_algorithm_interpolate.cpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/transformation/domain_algorithm_interpolate.cpp	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/transformation/domain_algorithm_interpolate.cpp	(revision 1749)
@@ -0,0 +1,1024 @@
+/*!
+   \file domain_algorithm_interpolate_from_file.cpp
+   \author Ha NGUYEN
+   \since 09 Jul 2015
+   \date 15 Sep 2015
+
+   \brief Algorithm for interpolation on a domain.
+ */
+#include "domain_algorithm_interpolate.hpp"
+#include <unordered_map>
+#include "context.hpp"
+#include "context_client.hpp"
+#include "distribution_client.hpp"
+#include "client_server_mapping_distributed.hpp"
+#include "netcdf.hpp"
+#include "mapper.hpp"
+#include "mpi_tag.hpp"
+#include "domain.hpp"
+#include "grid_transformation_factory_impl.hpp"
+#include "interpolate_domain.hpp"
+#include "grid.hpp"
+
+namespace xios {
+CGenericAlgorithmTransformation* CDomainAlgorithmInterpolate::create(CGrid* gridDst, CGrid* gridSrc,
+                                                                     CTransformation<CDomain>* transformation,
+                                                                     int elementPositionInGrid,
+                                                                     std::map<int, int>& elementPositionInGridSrc2ScalarPosition,
+                                                                     std::map<int, int>& elementPositionInGridSrc2AxisPosition,
+                                                                     std::map<int, int>& elementPositionInGridSrc2DomainPosition,
+                                                                     std::map<int, int>& elementPositionInGridDst2ScalarPosition,
+                                                                     std::map<int, int>& elementPositionInGridDst2AxisPosition,
+                                                                     std::map<int, int>& elementPositionInGridDst2DomainPosition)
+TRY
+{
+  std::vector<CDomain*> domainListDestP = gridDst->getDomains();
+  std::vector<CDomain*> domainListSrcP  = gridSrc->getDomains();
+
+  CInterpolateDomain* interpolateDomain = dynamic_cast<CInterpolateDomain*> (transformation);
+  int domainDstIndex = elementPositionInGridDst2DomainPosition[elementPositionInGrid];
+  int domainSrcIndex = elementPositionInGridSrc2DomainPosition[elementPositionInGrid];
+
+  return (new CDomainAlgorithmInterpolate(domainListDestP[domainDstIndex], domainListSrcP[domainSrcIndex], interpolateDomain));
+}
+CATCH
+
+bool CDomainAlgorithmInterpolate::registerTrans()
+TRY
+{
+  CGridTransformationFactory<CDomain>::registerTransformation(TRANS_INTERPOLATE_DOMAIN, create);
+}
+CATCH
+
+CDomainAlgorithmInterpolate::CDomainAlgorithmInterpolate(CDomain* domainDestination, CDomain* domainSource, CInterpolateDomain* interpDomain)
+: CDomainAlgorithmTransformation(domainDestination, domainSource), interpDomain_(interpDomain), writeToFile_(false), readFromFile_(false)
+TRY
+{
+  CContext* context = CContext::getCurrent();
+  interpDomain_->checkValid(domainSource);
+
+  detectMissingValue = interpDomain_->detect_missing_value ;
+  renormalize = interpDomain_->renormalize ;
+  quantity = interpDomain_->quantity ;
+
+  if (interpDomain_->read_write_convention == CInterpolateDomain::read_write_convention_attr::fortran) fortranConvention=true ;
+  else fortranConvention=false ;
+  
+  fileToReadWrite_ = "xios_interpolation_weights_";
+
+  if (interpDomain_->weight_filename.isEmpty())
+  {
+    fileToReadWrite_ += context->getId() + "_" + 
+                    domainSource->getDomainOutputName() + "_" + 
+                    domainDestination->getDomainOutputName() + ".nc";    
+  }
+  else 
+    fileToReadWrite_ = interpDomain_->weight_filename;
+
+  ifstream f(fileToReadWrite_.c_str());  
+  switch (interpDomain_->mode)
+  {
+    case CInterpolateDomain::mode_attr::read:
+      readFromFile_ = true;      
+      break;
+    case CInterpolateDomain::mode_attr::compute:
+      readFromFile_ = false;
+      break;
+    case CInterpolateDomain::mode_attr::read_or_compute:      
+      if (!f.good())
+        readFromFile_ = false;
+      else
+        readFromFile_ = true;
+      break;
+    default:
+      break;
+  } 
+
+  writeToFile_ = interpDomain_->write_weight;  
+    
+}
+CATCH
+
+/*!
+  Compute remap with integrated remap calculation module
+*/
+void CDomainAlgorithmInterpolate::computeRemap()
+TRY
+{
+  using namespace sphereRemap;
+
+  CContext* context = CContext::getCurrent();
+  CContextClient* client=context->client;
+  int clientRank = client->clientRank;
+  int i, j, k, idx;
+  std::vector<double> srcPole(3,0), dstPole(3,0);
+  int orderInterp = interpDomain_->order.getValue();
+
+
+  const double poleValue = 90.0;
+  const int constNVertex = 4; // Value by default number of vertex for rectangular domain
+  int nVertexSrc, nVertexDest;
+  nVertexSrc = nVertexDest = constNVertex;
+
+  // First of all, try to retrieve the boundary values of domain source and domain destination
+  int localDomainSrcSize = domainSrc_->i_index.numElements();
+  int niSrc = domainSrc_->ni.getValue(), njSrc = domainSrc_->nj.getValue();
+  bool hasBoundSrc = domainSrc_->hasBounds;
+  if (hasBoundSrc) nVertexSrc = domainSrc_->nvertex.getValue();
+  CArray<double,2> boundsLonSrc(nVertexSrc,localDomainSrcSize);
+  CArray<double,2> boundsLatSrc(nVertexSrc,localDomainSrcSize);
+
+  if (domainSrc_->hasPole) srcPole[2] = 1;
+  if (hasBoundSrc)  // Suppose that domain source is curvilinear or unstructured
+  {
+    if (!domainSrc_->bounds_lon_2d.isEmpty())
+    {
+      for (j = 0; j < njSrc; ++j)
+        for (i = 0; i < niSrc; ++i)
+        {
+          k=j*niSrc+i;
+          for(int n=0;n<nVertexSrc;++n)
+          {
+            boundsLonSrc(n,k) = domainSrc_->bounds_lon_2d(n,i,j);
+            boundsLatSrc(n,k) = domainSrc_->bounds_lat_2d(n,i,j);
+          }
+        }
+    }
+    else
+    {
+      boundsLonSrc = domainSrc_->bounds_lon_1d;
+      boundsLatSrc = domainSrc_->bounds_lat_1d;
+    }
+  }
+  else // if domain source is rectilinear, not do anything now
+  {
+    CArray<double,1> lon_g ;
+    CArray<double,1> lat_g ;
+
+    if (!domainSrc_->lonvalue_1d.isEmpty() && !domainSrc_->latvalue_1d.isEmpty())
+    {
+      domainSrc_->AllgatherRectilinearLonLat(domainSrc_->lonvalue_1d,domainSrc_->latvalue_1d, lon_g,lat_g) ;
+    }
+    else if (! domainSrc_->latvalue_rectilinear_read_from_file.isEmpty() && ! domainSrc_->lonvalue_rectilinear_read_from_file.isEmpty() )
+    {
+      lat_g=domainSrc_->latvalue_rectilinear_read_from_file ;
+      lon_g=domainSrc_->lonvalue_rectilinear_read_from_file ;
+    }
+    else if (!domainSrc_->lon_start.isEmpty() && !domainSrc_->lon_end.isEmpty() &&
+             !domainSrc_->lat_start.isEmpty() && !domainSrc_->lat_end.isEmpty())
+    {
+      double step=(domainSrc_->lon_end-domainSrc_->lon_start)/domainSrc_->ni_glo ;
+      for (int i=0; i<domainSrc_->ni_glo; ++i) lon_g(i)=domainSrc_->lon_start+i*step ;
+      step=(domainSrc_->lat_end-domainSrc_->lat_start)/domainSrc_->nj_glo ;
+      for (int i=0; i<domainSrc_->ni_glo; ++i) lat_g(i)=domainSrc_->lat_start+i*step ;
+    }
+    else ERROR("void CDomainAlgorithmInterpolate::computeRemap()",<<"Cannot compute bounds for rectilinear domain") ;
+
+    nVertexSrc = constNVertex;
+    domainSrc_->fillInRectilinearBoundLonLat(lon_g,lat_g, boundsLonSrc, boundsLatSrc);
+  }
+
+  std::map<int,std::vector<std::pair<int,double> > > interpMapValueNorthPole;
+  std::map<int,std::vector<std::pair<int,double> > > interpMapValueSouthPole;
+
+  int localDomainDestSize = domainDest_->i_index.numElements();
+  int niDest = domainDest_->ni.getValue(), njDest = domainDest_->nj.getValue();
+  bool hasBoundDest = domainDest_->hasBounds;
+  if (hasBoundDest) nVertexDest = domainDest_->nvertex.getValue();
+  CArray<double,2> boundsLonDest(nVertexDest,localDomainDestSize);
+  CArray<double,2> boundsLatDest(nVertexDest,localDomainDestSize);
+
+  if (domainDest_->hasPole) dstPole[2] = 1;
+  if (hasBoundDest)
+  {
+    if (!domainDest_->bounds_lon_2d.isEmpty())
+    {
+      for (j = 0; j < njDest; ++j)
+        for (i = 0; i < niDest; ++i)
+        {
+          k=j*niDest+i;
+          for(int n=0;n<nVertexDest;++n)
+          {
+            boundsLonDest(n,k) = domainDest_->bounds_lon_2d(n,i,j);
+            boundsLatDest(n,k) = domainDest_->bounds_lat_2d(n,i,j);
+          }
+        }
+    }
+    else
+    {
+      boundsLonDest = domainDest_->bounds_lon_1d;
+      boundsLatDest = domainDest_->bounds_lat_1d;
+    }
+  }
+  else
+  {
+    bool isNorthPole = false;
+    bool isSouthPole = false;
+
+    CArray<double,1> lon_g ;
+    CArray<double,1> lat_g ;
+
+    if (!domainDest_->lonvalue_1d.isEmpty() && !domainDest_->latvalue_1d.isEmpty())
+    {
+      domainDest_->AllgatherRectilinearLonLat(domainDest_->lonvalue_1d,domainDest_->latvalue_1d, lon_g,lat_g) ;
+    }
+    else if (! domainDest_->latvalue_rectilinear_read_from_file.isEmpty() && ! domainDest_->lonvalue_rectilinear_read_from_file.isEmpty() )
+    {
+      lat_g=domainDest_->latvalue_rectilinear_read_from_file ;
+      lon_g=domainDest_->lonvalue_rectilinear_read_from_file ;
+    }
+    else if (!domainDest_->lon_start.isEmpty() && !domainDest_->lon_end.isEmpty() &&
+             !domainDest_->lat_start.isEmpty() && !domainDest_->lat_end.isEmpty())
+    {
+      double step=(domainDest_->lon_end-domainDest_->lon_start)/domainDest_->ni_glo ;
+      for(int i=0; i<domainDest_->ni_glo; ++i) lon_g(i)=domainDest_->lon_start+i*step ;
+      step=(domainDest_->lat_end-domainDest_->lat_start)/domainDest_->nj_glo ;
+      for(int i=0; i<domainDest_->ni_glo; ++i) lat_g(i)=domainDest_->lat_start+i*step ;
+    }
+    else ERROR("void CDomainAlgorithmInterpolate::computeRemap()",<<"Cannot compute bounds for rectilinear domain") ;
+    
+    if (std::abs(poleValue - std::abs(lat_g(0))) < NumTraits<double>::epsilon()) isNorthPole = true;
+    if (std::abs(poleValue - std::abs(lat_g(domainDest_->nj_glo-1))) < NumTraits<double>::epsilon()) isSouthPole = true;
+
+
+
+
+    if (isNorthPole && (0 == domainDest_->jbegin.getValue()))
+    {
+      int ibegin = domainDest_->ibegin.getValue();
+      for (i = 0; i < niDest; ++i)
+      {
+        interpMapValueNorthPole[i+ibegin];
+      }
+    }
+
+    if (isSouthPole && (domainDest_->nj_glo.getValue() == (domainDest_->jbegin.getValue() + njDest)))
+    {
+      int ibegin = domainDest_->ibegin.getValue();
+      int njGlo = domainDest_->nj_glo.getValue();
+      int niGlo = domainDest_->ni_glo.getValue();
+      for (i = 0; i < niDest; ++i)
+      {
+        k = (njGlo - 1)*niGlo + i + ibegin;
+        interpMapValueSouthPole[k];
+      }
+    }
+
+    // Ok, fill in boundary values for rectangular domain
+    nVertexDest = constNVertex;
+    domainDest_->fillInRectilinearBoundLonLat(lon_g,lat_g, boundsLonDest, boundsLatDest);
+  }
+
+
+
+  // Ok, now use mapper to calculate
+  int nSrcLocal = domainSrc_->i_index.numElements();
+  int nDstLocal = domainDest_->i_index.numElements();
+  long int * globalSrc = new long int [nSrcLocal];
+  long int * globalDst = new long int [nDstLocal];
+
+  long int globalIndex;
+  int i_ind, j_ind;
+  for (int idx = 0; idx < nSrcLocal; ++idx)
+  {
+    i_ind=domainSrc_->i_index(idx) ;
+    j_ind=domainSrc_->j_index(idx) ;
+
+    globalIndex = i_ind + j_ind * domainSrc_->ni_glo;
+    globalSrc[idx] = globalIndex;
+  }
+
+  for (int idx = 0; idx < nDstLocal; ++idx)
+  {
+    i_ind=domainDest_->i_index(idx) ;
+    j_ind=domainDest_->j_index(idx) ;
+
+    globalIndex = i_ind + j_ind * domainDest_->ni_glo;
+    globalDst[idx] = globalIndex;
+  }
+
+
+  // Calculate weight index
+  Mapper mapper(client->intraComm);
+  mapper.setVerbosity(PROGRESS) ;
+
+     
+  // supress masked data for the source
+  int nSrcLocalUnmasked = 0 ;
+  for (int idx=0 ; idx < nSrcLocal; idx++) if (domainSrc_->localMask(idx)) ++nSrcLocalUnmasked ;
+
+
+  CArray<double,2> boundsLonSrcUnmasked(nVertexSrc,nSrcLocalUnmasked);
+  CArray<double,2> boundsLatSrcUnmasked(nVertexSrc,nSrcLocalUnmasked);
+  CArray<double,1> areaSrcUnmasked(nSrcLocalUnmasked);
+  
+  long int * globalSrcUnmasked = new long int [nSrcLocalUnmasked];
+
+  nSrcLocalUnmasked=0 ;
+  bool hasSrcArea=domainSrc_->hasArea && !domainSrc_->radius.isEmpty() && !interpDomain_->use_area.isEmpty() && interpDomain_->use_area==true  ;
+  double srcAreaFactor ;
+  if (hasSrcArea) srcAreaFactor=1./(domainSrc_->radius*domainSrc_->radius) ;
+  
+  for (int idx=0 ; idx < nSrcLocal; idx++)
+  {
+    if (domainSrc_->localMask(idx))
+    {
+      for(int n=0;n<nVertexSrc;++n)
+      {
+        boundsLonSrcUnmasked(n,nSrcLocalUnmasked) = boundsLonSrc(n,idx) ;
+        boundsLatSrcUnmasked(n,nSrcLocalUnmasked) = boundsLatSrc(n,idx) ;
+      }
+      if (hasSrcArea) areaSrcUnmasked(nSrcLocalUnmasked) = domainSrc_->areavalue(idx)*srcAreaFactor ;
+      globalSrcUnmasked[nSrcLocalUnmasked]=globalSrc[idx] ;
+      ++nSrcLocalUnmasked ;
+    }
+  }
+ 
+
+  int nDstLocalUnmasked = 0 ;
+  for (int idx=0 ; idx < nDstLocal; idx++) if (domainDest_->localMask(idx)) ++nDstLocalUnmasked ;
+
+  CArray<double,2> boundsLonDestUnmasked(nVertexDest,nDstLocalUnmasked);
+  CArray<double,2> boundsLatDestUnmasked(nVertexDest,nDstLocalUnmasked);
+  CArray<double,1>   areaDstUnmasked(nDstLocalUnmasked);
+
+  long int * globalDstUnmasked = new long int [nDstLocalUnmasked];
+
+  nDstLocalUnmasked=0 ;
+  bool hasDstArea=domainDest_->hasArea && !domainDest_->radius.isEmpty() && !interpDomain_->use_area.isEmpty() && interpDomain_->use_area==true ;
+  double dstAreaFactor ;
+  if (hasDstArea) dstAreaFactor=1./(domainDest_->radius*domainDest_->radius) ;
+  for (int idx=0 ; idx < nDstLocal; idx++)
+  {
+    if (domainDest_->localMask(idx))
+    {
+      for(int n=0;n<nVertexDest;++n)
+      {
+        boundsLonDestUnmasked(n,nDstLocalUnmasked) = boundsLonDest(n,idx) ;
+        boundsLatDestUnmasked(n,nDstLocalUnmasked) = boundsLatDest(n,idx) ;
+      }
+      if (hasDstArea) areaDstUnmasked(nDstLocalUnmasked) = domainDest_->areavalue(idx)*dstAreaFactor ;
+      globalDstUnmasked[nDstLocalUnmasked]=globalDst[idx] ;
+      ++nDstLocalUnmasked ;
+    }
+  }
+
+  double* ptAreaSrcUnmasked = NULL ;
+  if (hasSrcArea) ptAreaSrcUnmasked=areaSrcUnmasked.dataFirst() ;
+
+  double* ptAreaDstUnmasked = NULL ;
+  if (hasDstArea) ptAreaDstUnmasked=areaDstUnmasked.dataFirst() ;
+
+  mapper.setSourceMesh(boundsLonSrcUnmasked.dataFirst(), boundsLatSrcUnmasked.dataFirst(), ptAreaSrcUnmasked, nVertexSrc, nSrcLocalUnmasked, &srcPole[0], globalSrcUnmasked);
+  mapper.setTargetMesh(boundsLonDestUnmasked.dataFirst(), boundsLatDestUnmasked.dataFirst(), ptAreaDstUnmasked, nVertexDest, nDstLocalUnmasked, &dstPole[0], globalDstUnmasked);
+
+  std::vector<double> timings = mapper.computeWeights(orderInterp,renormalize,quantity);
+
+  std::map<int,std::vector<std::pair<int,double> > > interpMapValue;
+  std::map<int,std::vector<std::pair<int,double> > >::const_iterator iteNorthPole = interpMapValueNorthPole.end(),
+                                                                     iteSouthPole = interpMapValueSouthPole.end();
+  for (int idx = 0;  idx < mapper.nWeights; ++idx)
+  {
+    interpMapValue[mapper.targetWeightId[idx]].push_back(make_pair(mapper.sourceWeightId[idx],mapper.remapMatrix[idx]));
+    if (iteNorthPole != interpMapValueNorthPole.find(mapper.targetWeightId[idx]))
+    {
+      interpMapValueNorthPole[mapper.targetWeightId[idx]].push_back(make_pair(mapper.sourceWeightId[idx],mapper.remapMatrix[idx]));
+    }
+
+    if (iteSouthPole != interpMapValueSouthPole.find(mapper.targetWeightId[idx]))
+    {
+      interpMapValueSouthPole[mapper.targetWeightId[idx]].push_back(make_pair(mapper.sourceWeightId[idx],mapper.remapMatrix[idx]));
+    }
+  }
+  int niGloDst = domainDest_->ni_glo.getValue();
+  processPole(interpMapValueNorthPole, niGloDst);
+  processPole(interpMapValueSouthPole, niGloDst);
+
+  if (!interpMapValueNorthPole.empty())
+  {
+     std::map<int,std::vector<std::pair<int,double> > >::iterator itNorthPole = interpMapValueNorthPole.begin();
+     for (; itNorthPole != iteNorthPole; ++itNorthPole)
+     {
+       if (!(itNorthPole->second.empty()))
+        itNorthPole->second.swap(interpMapValue[itNorthPole->first]);
+     }
+  }
+
+  if (!interpMapValueSouthPole.empty())
+  {
+     std::map<int,std::vector<std::pair<int,double> > >::iterator itSouthPole = interpMapValueSouthPole.begin();
+     for (; itSouthPole != iteSouthPole; ++itSouthPole)
+     {
+       if (!(itSouthPole->second.empty()))
+        itSouthPole->second.swap(interpMapValue[itSouthPole->first]);
+     }
+  }
+
+  if (writeToFile_ && !readFromFile_) writeRemapInfo(interpMapValue);
+//  exchangeRemapInfo(interpMapValue);
+  convertRemapInfo(interpMapValue) ;
+
+  delete [] globalSrc;
+  delete [] globalSrcUnmasked;
+  delete [] globalDst;
+  delete [] globalDstUnmasked;
+
+}
+CATCH
+
+void CDomainAlgorithmInterpolate::processPole(std::map<int,std::vector<std::pair<int,double> > >& interMapValuePole,
+                                              int nbGlobalPointOnPole)
+TRY
+{
+  CContext* context = CContext::getCurrent();
+  CContextClient* client=context->client;
+
+  MPI_Comm poleComme(MPI_COMM_NULL);
+  MPI_Comm_split(client->intraComm, interMapValuePole.empty() ? MPI_UNDEFINED : 1, 0, &poleComme);
+  if (MPI_COMM_NULL != poleComme)
+  {
+    int nbClientPole;
+    MPI_Comm_size(poleComme, &nbClientPole);
+
+    std::map<int,std::vector<std::pair<int,double> > >::iterator itePole = interMapValuePole.end(), itPole,
+                                                                 itbPole = interMapValuePole.begin();
+
+    int nbWeight = 0;
+    for (itPole = itbPole; itPole != itePole; ++itPole)
+       nbWeight += itPole->second.size();
+
+    std::vector<int> recvCount(nbClientPole,0);
+    std::vector<int> displ(nbClientPole,0);
+    MPI_Allgather(&nbWeight,1,MPI_INT,&recvCount[0],1,MPI_INT,poleComme) ;
+
+    displ[0]=0;
+    for(int n=1;n<nbClientPole;++n) displ[n]=displ[n-1]+recvCount[n-1] ;
+    int recvSize=displ[nbClientPole-1]+recvCount[nbClientPole-1] ;
+
+    std::vector<int> sendSourceIndexBuff(nbWeight);
+    std::vector<double> sendSourceWeightBuff(nbWeight);
+    int k = 0;
+    for (itPole = itbPole; itPole != itePole; ++itPole)
+    {
+      for (int idx = 0; idx < itPole->second.size(); ++idx)
+      {
+        sendSourceIndexBuff[k] = (itPole->second)[idx].first;
+        sendSourceWeightBuff[k] = (itPole->second)[idx].second;
+        ++k;
+      }
+    }
+
+    std::vector<int> recvSourceIndexBuff(recvSize);
+    std::vector<double> recvSourceWeightBuff(recvSize);
+
+    // Gather all index and weight for pole
+    MPI_Allgatherv(&sendSourceIndexBuff[0],nbWeight,MPI_INT,&recvSourceIndexBuff[0],&recvCount[0],&displ[0],MPI_INT,poleComme);
+    MPI_Allgatherv(&sendSourceWeightBuff[0],nbWeight,MPI_DOUBLE,&recvSourceWeightBuff[0],&recvCount[0],&displ[0],MPI_DOUBLE,poleComme);
+
+    std::map<int,double> recvTemp;
+    for (int idx = 0; idx < recvSize; ++idx)
+    {
+      if (recvTemp.end() != recvTemp.find(recvSourceIndexBuff[idx]))
+        recvTemp[recvSourceIndexBuff[idx]] += recvSourceWeightBuff[idx]/nbGlobalPointOnPole;
+      else
+        recvTemp[recvSourceIndexBuff[idx]] = recvSourceWeightBuff[idx]/nbGlobalPointOnPole;
+    }
+
+    std::map<int,double>::const_iterator itRecvTemp, itbRecvTemp = recvTemp.begin(), iteRecvTemp = recvTemp.end();
+
+    for (itPole = itbPole; itPole != itePole; ++itPole)
+    {
+      itPole->second.clear();
+      for (itRecvTemp = itbRecvTemp; itRecvTemp != iteRecvTemp; ++itRecvTemp)
+          itPole->second.push_back(make_pair(itRecvTemp->first, itRecvTemp->second));
+    }
+  }
+
+}
+CATCH
+
+/*!
+  Compute the index mapping between domain on grid source and one on grid destination
+*/
+void CDomainAlgorithmInterpolate::computeIndexSourceMapping_(const std::vector<CArray<double,1>* >& dataAuxInputs)
+TRY
+{
+  if (readFromFile_)  
+    readRemapInfo();
+  else
+  {
+    computeRemap(); 
+  }
+}
+CATCH
+
+void CDomainAlgorithmInterpolate::writeRemapInfo(std::map<int,std::vector<std::pair<int,double> > >& interpMapValue)
+TRY
+{  
+  writeInterpolationInfo(fileToReadWrite_, interpMapValue);
+}
+CATCH
+
+void CDomainAlgorithmInterpolate::readRemapInfo()
+TRY
+{  
+  std::map<int,std::vector<std::pair<int,double> > > interpMapValue;
+  readInterpolationInfo(fileToReadWrite_, interpMapValue);
+
+  exchangeRemapInfo(interpMapValue);
+}
+CATCH
+
+void CDomainAlgorithmInterpolate::convertRemapInfo(std::map<int,std::vector<std::pair<int,double> > >& interpMapValue)
+TRY
+{
+  CContext* context = CContext::getCurrent();
+  CContextClient* client=context->client;
+  int clientRank = client->clientRank;
+
+  this->transformationMapping_.resize(1);
+  this->transformationWeight_.resize(1);
+
+  TransformationIndexMap& transMap = this->transformationMapping_[0];
+  TransformationWeightMap& transWeight = this->transformationWeight_[0];
+
+  std::map<int,std::vector<std::pair<int,double> > >::const_iterator itb = interpMapValue.begin(), it,
+                                                                     ite = interpMapValue.end();
+  
+  for (it = itb; it != ite; ++it)
+  {    
+    const std::vector<std::pair<int,double> >& tmp = it->second;
+    for (int i = 0; i < tmp.size(); ++i)
+    {
+      transMap[it->first].push_back(tmp[i].first);
+      transWeight[it->first].push_back(tmp[i].second);
+    }      
+  }      
+}
+CATCH
+
+/*!
+  Read remap information from file then distribute it among clients
+*/
+void CDomainAlgorithmInterpolate::exchangeRemapInfo(std::map<int,std::vector<std::pair<int,double> > >& interpMapValue)
+TRY
+{
+  CContext* context = CContext::getCurrent();
+  CContextClient* client=context->client;
+  int clientRank = client->clientRank;
+
+  this->transformationMapping_.resize(1);
+  this->transformationWeight_.resize(1);
+
+  TransformationIndexMap& transMap = this->transformationMapping_[0];
+  TransformationWeightMap& transWeight = this->transformationWeight_[0];
+
+  std::unordered_map<size_t,int> globalIndexOfDomainDest;
+  int ni = domainDest_->ni.getValue();
+  int nj = domainDest_->nj.getValue();
+  int ni_glo = domainDest_->ni_glo.getValue();
+  size_t globalIndex;
+  int nIndexSize = domainDest_->i_index.numElements(), i_ind, j_ind;
+  for (int idx = 0; idx < nIndexSize; ++idx)
+  {
+    i_ind=domainDest_->i_index(idx) ;
+    j_ind=domainDest_->j_index(idx) ;
+
+    globalIndex = i_ind + j_ind * ni_glo;
+    globalIndexOfDomainDest[globalIndex] = clientRank;
+  }
+
+  CClientServerMappingDistributed domainIndexClientClientMapping(globalIndexOfDomainDest,
+                                                                 client->intraComm,
+                                                                 true);
+  CArray<size_t,1> globalIndexInterp(interpMapValue.size());
+  std::map<int,std::vector<std::pair<int,double> > >::const_iterator itb = interpMapValue.begin(), it,
+                                                                     ite = interpMapValue.end();
+  size_t globalIndexCount = 0;
+  for (it = itb; it != ite; ++it)
+  {
+    globalIndexInterp(globalIndexCount) = it->first;
+    ++globalIndexCount;
+  }
+
+  domainIndexClientClientMapping.computeServerIndexMapping(globalIndexInterp, client->serverSize);
+  const CClientServerMapping::GlobalIndexMap& globalIndexInterpSendToClient = domainIndexClientClientMapping.getGlobalIndexOnServer();
+
+  //Inform each client number of index they will receive
+  int nbClient = client->clientSize;
+  int* sendBuff = new int[nbClient];
+  int* recvBuff = new int[nbClient];
+  for (int i = 0; i < nbClient; ++i)
+  {
+    sendBuff[i] = 0;
+    recvBuff[i] = 0;
+  }
+  int sendBuffSize = 0;
+  CClientServerMapping::GlobalIndexMap::const_iterator itbMap = globalIndexInterpSendToClient.begin(), itMap,
+                                                       iteMap = globalIndexInterpSendToClient.end();
+  for (itMap = itbMap; itMap != iteMap; ++itMap)
+  {
+    const std::vector<size_t>& tmp = itMap->second;
+    int sizeIndex = 0, mapSize = (itMap->second).size();
+    for (int idx = 0; idx < mapSize; ++idx)
+    {
+//      sizeIndex += interpMapValue.at((itMap->second)[idx]).size();
+      sizeIndex += (interpMapValue[(int)(itMap->second)[idx]]).size();
+    }
+    sendBuff[itMap->first] = sizeIndex;
+    sendBuffSize += sizeIndex;
+  }
+
+
+  MPI_Allreduce(sendBuff, recvBuff, nbClient, MPI_INT, MPI_SUM, client->intraComm);
+
+  int* sendIndexDestBuff = new int [sendBuffSize];
+  int* sendIndexSrcBuff  = new int [sendBuffSize];
+  double* sendWeightBuff = new double [sendBuffSize];
+
+  std::vector<MPI_Request> sendRequest;
+
+  int sendOffSet = 0, l = 0;
+  for (itMap = itbMap; itMap != iteMap; ++itMap)
+  {
+    const std::vector<size_t>& indexToSend = itMap->second;
+    int mapSize = indexToSend.size();
+    int k = 0;
+    for (int idx = 0; idx < mapSize; ++idx)
+    {
+      std::vector<std::pair<int,double> >& interpMap = interpMapValue[(int)indexToSend[idx]]; //interpMapValue.at(indexToSend[idx]);
+      for (int i = 0; i < interpMap.size(); ++i)
+      {
+        sendIndexDestBuff[l] = indexToSend[idx];
+        sendIndexSrcBuff[l]  = interpMap[i].first;
+        sendWeightBuff[l]    = interpMap[i].second;
+        ++k;
+        ++l;
+      }
+    }
+
+    sendRequest.push_back(MPI_Request());
+    MPI_Isend(sendIndexDestBuff + sendOffSet,
+             k,
+             MPI_INT,
+             itMap->first,
+             MPI_DOMAIN_INTERPOLATION_DEST_INDEX,
+             client->intraComm,
+             &sendRequest.back());
+    sendRequest.push_back(MPI_Request());
+    MPI_Isend(sendIndexSrcBuff + sendOffSet,
+             k,
+             MPI_INT,
+             itMap->first,
+             MPI_DOMAIN_INTERPOLATION_SRC_INDEX,
+             client->intraComm,
+             &sendRequest.back());
+    sendRequest.push_back(MPI_Request());
+    MPI_Isend(sendWeightBuff + sendOffSet,
+             k,
+             MPI_DOUBLE,
+             itMap->first,
+             MPI_DOMAIN_INTERPOLATION_WEIGHT,
+             client->intraComm,
+             &sendRequest.back());
+    sendOffSet += k;
+  }
+
+  int recvBuffSize = recvBuff[clientRank];
+  int* recvIndexDestBuff = new int [recvBuffSize];
+  int* recvIndexSrcBuff  = new int [recvBuffSize];
+  double* recvWeightBuff = new double [recvBuffSize];
+  int receivedSize = 0;
+  int clientSrcRank;
+  while (receivedSize < recvBuffSize)
+  {
+    MPI_Status recvStatus;
+    MPI_Recv((recvIndexDestBuff + receivedSize),
+             recvBuffSize,
+             MPI_INT,
+             MPI_ANY_SOURCE,
+             MPI_DOMAIN_INTERPOLATION_DEST_INDEX,
+             client->intraComm,
+             &recvStatus);
+
+    int countBuff = 0;
+    MPI_Get_count(&recvStatus, MPI_INT, &countBuff);
+    clientSrcRank = recvStatus.MPI_SOURCE;
+
+    MPI_Recv((recvIndexSrcBuff + receivedSize),
+             recvBuffSize,
+             MPI_INT,
+             clientSrcRank,
+             MPI_DOMAIN_INTERPOLATION_SRC_INDEX,
+             client->intraComm,
+             &recvStatus);
+
+    MPI_Recv((recvWeightBuff + receivedSize),
+             recvBuffSize,
+             MPI_DOUBLE,
+             clientSrcRank,
+             MPI_DOMAIN_INTERPOLATION_WEIGHT,
+             client->intraComm,
+             &recvStatus);
+
+    for (int idx = 0; idx < countBuff; ++idx)
+    {
+      transMap[*(recvIndexDestBuff + receivedSize + idx)].push_back(*(recvIndexSrcBuff + receivedSize + idx));
+      transWeight[*(recvIndexDestBuff + receivedSize + idx)].push_back(*(recvWeightBuff + receivedSize + idx));
+    }
+    receivedSize += countBuff;
+  }
+
+  std::vector<MPI_Status> requestStatus(sendRequest.size());
+  MPI_Waitall(sendRequest.size(), &sendRequest[0], MPI_STATUS_IGNORE);
+
+  delete [] sendIndexDestBuff;
+  delete [] sendIndexSrcBuff;
+  delete [] sendWeightBuff;
+  delete [] recvIndexDestBuff;
+  delete [] recvIndexSrcBuff;
+  delete [] recvWeightBuff;
+  delete [] sendBuff;
+  delete [] recvBuff;
+}
+CATCH
+ 
+/*! Redefined some functions of CONetCDF4 to make use of them */
+CDomainAlgorithmInterpolate::WriteNetCdf::WriteNetCdf(const StdString& filename, const MPI_Comm comm)
+  : CNc4DataOutput(NULL, filename, false, false, true, comm, false, true) {}
+int CDomainAlgorithmInterpolate::WriteNetCdf::addDimensionWrite(const StdString& name, 
+                                                                const StdSize size)
+TRY
+{
+  return CONetCDF4::addDimension(name, size);  
+}
+CATCH
+
+int CDomainAlgorithmInterpolate::WriteNetCdf::addVariableWrite(const StdString& name, nc_type type,
+                                                               const std::vector<StdString>& dim)
+TRY
+{
+  return CONetCDF4::addVariable(name, type, dim);
+}
+CATCH
+
+void CDomainAlgorithmInterpolate::WriteNetCdf::endDefinition()
+TRY
+{
+  CONetCDF4::definition_end();
+}
+CATCH
+
+void CDomainAlgorithmInterpolate::WriteNetCdf::writeDataIndex(const CArray<int,1>& data, const StdString& name,
+                                                              bool collective, StdSize record,
+                                                              const std::vector<StdSize>* start,
+                                                              const std::vector<StdSize>* count)
+TRY
+{
+  CONetCDF4::writeData<int,1>(data, name, collective, record, start, count);
+}
+CATCH
+
+void CDomainAlgorithmInterpolate::WriteNetCdf::writeDataIndex(const CArray<double,1>& data, const StdString& name,
+                                                              bool collective, StdSize record,
+                                                              const std::vector<StdSize>* start,
+                                                              const std::vector<StdSize>* count)
+TRY
+{
+  CONetCDF4::writeData<double,1>(data, name, collective, record, start, count);
+}
+CATCH
+
+/*
+   Write interpolation weights into a file
+   \param [in] filename name of output file
+   \param interpMapValue mapping of global index of domain destination and domain source as well as the corresponding weight
+*/
+void CDomainAlgorithmInterpolate::writeInterpolationInfo(std::string& filename,
+                                                         std::map<int,std::vector<std::pair<int,double> > >& interpMapValue)
+TRY
+{
+  CContext* context = CContext::getCurrent();
+  CContextClient* client=context->client;
+
+  size_t n_src = domainSrc_->ni_glo * domainSrc_->nj_glo;
+  size_t n_dst = domainDest_->ni_glo * domainDest_->nj_glo;
+
+  long localNbWeight = 0;
+  long globalNbWeight;
+  long startIndex;
+  typedef std::map<int,std::vector<std::pair<int,double> > > IndexRemap;
+  IndexRemap::iterator itb = interpMapValue.begin(), it,
+                       ite = interpMapValue.end();
+  for (it = itb; it!=ite; ++it)
+  {
+    localNbWeight += (it->second).size();
+  }
+
+  CArray<int,1> src_idx(localNbWeight);
+  CArray<int,1> dst_idx(localNbWeight);
+  CArray<double,1> weights(localNbWeight);
+
+  int index = 0;
+  int indexOffset=0 ;
+  if (fortranConvention) indexOffset=1 ;
+  for (it = itb; it !=ite; ++it)
+  {
+    std::vector<std::pair<int,double> >& tmp = it->second;
+    for (int idx = 0; idx < tmp.size(); ++idx)
+    {
+      dst_idx(index) = it->first + indexOffset;
+      src_idx(index) = tmp[idx].first + indexOffset;
+      weights(index) = tmp[idx].second;
+      ++index;
+    }    
+  }
+
+  MPI_Allreduce(&localNbWeight, &globalNbWeight, 1, MPI_LONG, MPI_SUM, client->intraComm);
+  MPI_Scan(&localNbWeight, &startIndex, 1, MPI_LONG, MPI_SUM, client->intraComm);
+  
+  if (0 == globalNbWeight)
+  {
+    info << "There is no interpolation weights calculated between "
+         << "domain source: " << domainSrc_->getDomainOutputName()
+         << " and domain destination: " << domainDest_->getDomainOutputName()
+         << std::endl;
+    return;
+  }
+
+  std::vector<StdSize> start(1, startIndex - localNbWeight);
+  std::vector<StdSize> count(1, localNbWeight);
+  
+  WriteNetCdf netCdfWriter(filename, client->intraComm);  
+
+  // Define some dimensions
+  netCdfWriter.addDimensionWrite("n_src", n_src);
+  netCdfWriter.addDimensionWrite("n_dst", n_dst);
+  netCdfWriter.addDimensionWrite("n_weight", globalNbWeight);
+  
+  std::vector<StdString> dims(1,"n_weight");
+
+  // Add some variables
+  netCdfWriter.addVariableWrite("src_idx", NC_INT, dims);
+  netCdfWriter.addVariableWrite("dst_idx", NC_INT, dims);
+  netCdfWriter.addVariableWrite("weight", NC_DOUBLE, dims);
+
+  // End of definition
+  netCdfWriter.endDefinition();
+
+  // // Write variables
+  if (0 != localNbWeight)
+  {
+    netCdfWriter.writeDataIndex(src_idx, "src_idx", false, 0, &start, &count);
+    netCdfWriter.writeDataIndex(dst_idx, "dst_idx", false, 0, &start, &count);
+    netCdfWriter.writeDataIndex(weights, "weight", false, 0, &start, &count);
+  }
+
+  netCdfWriter.closeFile();
+}
+CATCH
+
+/*!
+  Read interpolation information from a file
+  \param [in] filename interpolation file
+  \param [in/out] interpMapValue Mapping between (global) index of domain on grid destination and
+         corresponding global index of domain and associated weight value on grid source
+*/
+void CDomainAlgorithmInterpolate::readInterpolationInfo(std::string& filename,
+                                                        std::map<int,std::vector<std::pair<int,double> > >& interpMapValue)
+TRY
+{
+  int ncid ;
+  int weightDimId ;
+  size_t nbWeightGlo ;
+
+
+  CContext* context = CContext::getCurrent();
+  CContextClient* client=context->client;
+  int clientRank = client->clientRank;
+  int clientSize = client->clientSize;
+
+
+  {
+    ifstream f(filename.c_str());
+    if (!f.good()) ERROR("void CDomainAlgorithmInterpolate::readInterpolationInfo",
+                      << "Attempt to read file weight :"  << filename << " which doesn't seem to exist." << std::endl
+                      << "Please check this file ");
+  }
+                  
+  nc_open(filename.c_str(),NC_NOWRITE, &ncid) ;
+  nc_inq_dimid(ncid,"n_weight",&weightDimId) ;
+  nc_inq_dimlen(ncid,weightDimId,&nbWeightGlo) ;
+
+  size_t nbWeight ;
+  size_t start ;
+  size_t div = nbWeightGlo/clientSize ;
+  size_t mod = nbWeightGlo%clientSize ;
+  if (clientRank < mod)
+  {
+    nbWeight=div+1 ;
+    start=clientRank*(div+1) ;
+  }
+  else
+  {
+    nbWeight=div ;
+    start= mod * (div+1) + (clientRank-mod) * div ;
+  }
+
+  double* weight=new double[nbWeight] ;
+  int weightId ;
+  nc_inq_varid (ncid, "weight", &weightId) ;
+  nc_get_vara_double(ncid, weightId, &start, &nbWeight, weight) ;
+
+  long* srcIndex=new long[nbWeight] ;
+  int srcIndexId ;
+  nc_inq_varid (ncid, "src_idx", &srcIndexId) ;
+  nc_get_vara_long(ncid, srcIndexId, &start, &nbWeight, srcIndex) ;
+
+  long* dstIndex=new long[nbWeight] ;
+  int dstIndexId ;
+  nc_inq_varid (ncid, "dst_idx", &dstIndexId) ;
+  nc_get_vara_long(ncid, dstIndexId, &start, &nbWeight, dstIndex) ;
+
+  int indexOffset=0 ;
+  if (fortranConvention) indexOffset=1 ;
+    for(size_t ind=0; ind<nbWeight;++ind)
+      interpMapValue[dstIndex[ind]-indexOffset].push_back(make_pair(srcIndex[ind]-indexOffset,weight[ind]));
+ }
+CATCH
+
+void CDomainAlgorithmInterpolate::apply(const std::vector<std::pair<int,double> >& localIndex,
+                                            const double* dataInput,
+                                            CArray<double,1>& dataOut,
+                                            std::vector<bool>& flagInitial,
+                                            bool ignoreMissingValue, bool firstPass  )
+TRY
+{
+  int nbLocalIndex = localIndex.size();   
+  double defaultValue = std::numeric_limits<double>::quiet_NaN();
+   
+  if (detectMissingValue)
+  {
+     if (firstPass && renormalize)
+     {
+       renormalizationFactor.resize(dataOut.numElements()) ;
+       renormalizationFactor=1 ;
+     }
+
+    if (firstPass)
+    {
+      allMissing.resize(dataOut.numElements()) ;
+      allMissing=true ;
+    }
+
+    for (int idx = 0; idx < nbLocalIndex; ++idx)
+    {
+      if (NumTraits<double>::isNan(*(dataInput + idx)))
+      {
+        allMissing(localIndex[idx].first) = allMissing(localIndex[idx].first) && true;
+        if (renormalize) renormalizationFactor(localIndex[idx].first)-=localIndex[idx].second ;
+      }
+      else
+      {
+        dataOut(localIndex[idx].first) += *(dataInput + idx) * localIndex[idx].second;
+        allMissing(localIndex[idx].first) = allMissing(localIndex[idx].first) && false; // Reset flag to indicate not all data source are nan
+      }
+    }
+
+  }
+  else
+  {
+    for (int idx = 0; idx < nbLocalIndex; ++idx)
+    {
+      dataOut(localIndex[idx].first) += *(dataInput + idx) * localIndex[idx].second;
+    }
+  }
+}
+CATCH
+
+void CDomainAlgorithmInterpolate::updateData(CArray<double,1>& dataOut)
+TRY
+{
+  if (detectMissingValue)
+  {
+    double defaultValue = std::numeric_limits<double>::quiet_NaN();
+    size_t nbIndex=dataOut.numElements() ; 
+
+    if (allMissing.numElements()>0)
+    {
+      for (int idx = 0; idx < nbIndex; ++idx)
+      {
+        if (allMissing(idx)) dataOut(idx) = defaultValue; // If all data source are nan then data destination must be nan
+      }
+    }
+    
+    if (renormalize)
+    {
+      if (renormalizationFactor.numElements()>0) dataOut/=renormalizationFactor ; // In some case, process doesn't received any data for interpolation (mask)
+                                                                                 // so renormalizationFactor is not initialized
+    }
+  }
+}
+CATCH
+
+}
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/transformation/domain_algorithm_interpolate.hpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/transformation/domain_algorithm_interpolate.hpp	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/transformation/domain_algorithm_interpolate.hpp	(revision 1749)
@@ -0,0 +1,102 @@
+/*!
+   \file domain_algorithm_interpolate_from_file.hpp
+   \author Ha NGUYEN
+   \since 09 July 2015
+   \date 09 Sep 2015
+
+   \brief Algorithm for interpolation on a domain.
+ */
+#ifndef __XIOS_DOMAIN_ALGORITHM_INTERPOLATE_HPP__
+#define __XIOS_DOMAIN_ALGORITHM_INTERPOLATE_HPP__
+
+#include "domain_algorithm_transformation.hpp"
+#include "transformation.hpp"
+#include "nc4_data_output.hpp"
+
+namespace xios {
+
+class CDomain;
+class CInterpolateDomain;
+
+
+/*!
+  \class CDomainAlgorithmInterpolate
+  Reading interpolation from file then apply on a domain
+*/
+class CDomainAlgorithmInterpolate : public CDomainAlgorithmTransformation
+{
+public:
+  CDomainAlgorithmInterpolate(CDomain* domainDestination, CDomain* domainSource, CInterpolateDomain* interpDomain);
+
+  virtual ~CDomainAlgorithmInterpolate() {}
+
+  virtual void apply(const std::vector<std::pair<int,double> >& localIndex,
+                     const double* dataInput,
+                     CArray<double,1>& dataOut,
+                     std::vector<bool>& flagInitial,                     
+                     bool ignoreMissingValue, bool firstPass);
+  virtual void updateData(CArray<double,1>& dataOut);
+
+  static bool registerTrans();
+protected:
+  void computeIndexSourceMapping_(const std::vector<CArray<double,1>* >& dataAuxInputs);
+
+private:
+  void readInterpolationInfo(std::string& filename, std::map<int,std::vector<std::pair<int,double> > >& interpMapValue);
+  void writeInterpolationInfo(std::string& filename, std::map<int,std::vector<std::pair<int,double> > >& interpMapValue);
+  void processPole(std::map<int,std::vector<std::pair<int,double> > >& interMapValuePole,
+                   int nbGlobalPointOnPole);
+  void computeRemap();
+  void readRemapInfo();
+  void writeRemapInfo(std::map<int,std::vector<std::pair<int,double> > >&);
+  void exchangeRemapInfo(std::map<int,std::vector<std::pair<int,double> > >& interpMapValue);
+  void convertRemapInfo(std::map<int,std::vector<std::pair<int,double> > >& interpMapValue);
+
+private:
+  CArray<double,1> renormalizationFactor ;
+  CArray<bool,1> allMissing ;
+  bool detectMissingValue ;
+  bool renormalize ;
+  bool quantity ;
+  
+  CInterpolateDomain* interpDomain_;
+  bool writeToFile_;
+  bool readFromFile_;
+  StdString fileToReadWrite_;
+  bool fortranConvention ;
+
+  // class WriteNetCdf;
+  class WriteNetCdf : public CNc4DataOutput
+  {
+  public:
+    WriteNetCdf(const StdString& filename, const MPI_Comm comm);
+    int addDimensionWrite(const StdString& name, const StdSize size = UNLIMITED_DIM);
+    int addVariableWrite(const StdString& name, nc_type type,
+                         const std::vector<StdString>& dim);
+    void endDefinition();
+    void writeDataIndex(const CArray<int,1>& data, const StdString& name,
+                        bool collective, StdSize record,
+                        const std::vector<StdSize>* start = NULL,
+                        const std::vector<StdSize>* count = NULL);
+    void writeDataIndex(const CArray<double,1>& data, const StdString& name,
+                        bool collective, StdSize record,
+                        const std::vector<StdSize>* start = NULL,
+                        const std::vector<StdSize>* count = NULL);
+  };
+
+
+private:
+
+  static CGenericAlgorithmTransformation* create(CGrid* gridDst, CGrid* gridSrc,
+                                                CTransformation<CDomain>* transformation,
+                                                int elementPositionInGrid,
+                                                std::map<int, int>& elementPositionInGridSrc2ScalarPosition,
+                                                std::map<int, int>& elementPositionInGridSrc2AxisPosition,
+                                                std::map<int, int>& elementPositionInGridSrc2DomainPosition,
+                                                std::map<int, int>& elementPositionInGridDst2ScalarPosition,
+                                                std::map<int, int>& elementPositionInGridDst2AxisPosition,
+                                                std::map<int, int>& elementPositionInGridDst2DomainPosition);
+};
+
+}
+#endif // __XIOS_DOMAIN_ALGORITHM_INTERPOLATE_HPP__
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/transformation/domain_algorithm_reorder.cpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/transformation/domain_algorithm_reorder.cpp	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/transformation/domain_algorithm_reorder.cpp	(revision 1749)
@@ -0,0 +1,134 @@
+/*!
+   \file domain_algorithm_reorder.cpp
+   \brief Algorithm for reorder a domain.
+ */
+#include "domain_algorithm_reorder.hpp"
+#include "reorder_domain.hpp"
+#include "domain.hpp"
+#include "grid.hpp"
+#include "grid_transformation_factory_impl.hpp"
+
+namespace xios {
+CGenericAlgorithmTransformation* CDomainAlgorithmReorder::create(CGrid* gridDst, CGrid* gridSrc,
+                                                             CTransformation<CDomain>* transformation,
+                                                             int elementPositionInGrid,
+                                                             std::map<int, int>& elementPositionInGridSrc2ScalarPosition,
+                                                             std::map<int, int>& elementPositionInGridSrc2AxisPosition,
+                                                             std::map<int, int>& elementPositionInGridSrc2DomainPosition,
+                                                             std::map<int, int>& elementPositionInGridDst2ScalarPosition,
+                                                             std::map<int, int>& elementPositionInGridDst2AxisPosition,
+                                                             std::map<int, int>& elementPositionInGridDst2DomainPosition)
+TRY
+{
+  std::vector<CDomain*> domainListDestP = gridDst->getDomains();
+  std::vector<CDomain*> domainListSrcP  = gridSrc->getDomains();
+
+  CReorderDomain* reorderDomain = dynamic_cast<CReorderDomain*> (transformation);
+  int domainDstIndex = elementPositionInGridDst2DomainPosition[elementPositionInGrid];
+  int domainSrcIndex = elementPositionInGridSrc2DomainPosition[elementPositionInGrid];
+
+  return (new CDomainAlgorithmReorder(domainListDestP[domainDstIndex], domainListSrcP[domainSrcIndex], reorderDomain));
+}
+CATCH
+
+bool CDomainAlgorithmReorder::registerTrans()
+TRY
+{
+  CGridTransformationFactory<CDomain>::registerTransformation(TRANS_REORDER_DOMAIN, create);
+}
+CATCH
+
+CDomainAlgorithmReorder::CDomainAlgorithmReorder(CDomain* domainDestination, CDomain* domainSource, CReorderDomain* reorderDomain)
+: CDomainAlgorithmTransformation(domainDestination, domainSource)
+TRY
+{
+  reorderDomain->checkValid(domainSource);
+  if (domainDestination->type !=  CDomain::type_attr::rectilinear)
+  {
+      ERROR("CDomainAlgorithmReorder::CDomainAlgorithmReorder(CDomain* domainDestination, CDomain* domainSource, CReorderDomain* reorderDomain)",
+           << "Domain destination is not rectilinear. This filter work only for rectilinear domain and destination domain with < id = "
+           <<domainDestination->getId() <<" > is of type "<<domainDestination->type<<std::endl);
+  }
+  
+  if (domainDestination == domainSource)
+  {
+    ERROR("CDomainAlgorithmReorder::CDomainAlgorithmReorder(CDomain* domainDestination, CDomain* domainSource, CReorderDomain* reorderDomain)",
+           << "Domain source and domain destination are the same. Please make sure domain destination refers to domain source" << std::endl
+           << "Domain source " <<domainSource->getId() << std::endl
+           << "Domain destination " <<domainDestination->getId() << std::endl);
+  }
+  this->type_ = (ELEMENT_MODIFICATION_WITHOUT_DATA);
+
+  if (!reorderDomain->invert_lat.isEmpty())
+  {
+    CArray<int,1>& j_index=domainDestination->j_index ;
+    int nglo = j_index.numElements() ;
+    int nj_glo =domainDestination->nj_glo ;
+    
+    for (size_t i = 0; i < nglo ; ++i)
+    {
+      j_index(i)=(nj_glo-1)-j_index(i) ;
+    }
+  }
+
+  if (!reorderDomain->shift_lon_fraction.isEmpty())
+  {
+    int ni_glo =domainDestination->ni_glo ;
+    int  offset = ni_glo*reorderDomain->shift_lon_fraction ;
+    CArray<int,1>& i_index=domainDestination->i_index ;
+    int nglo = i_index.numElements() ;
+    
+    for (size_t i = 0; i < nglo ; ++i)
+    {
+      i_index(i)=  (i_index(i)+offset+ni_glo)%ni_glo ;
+    }
+  }
+
+  if (!reorderDomain->min_lon.isEmpty() && !reorderDomain->max_lon.isEmpty())
+  {
+    double min_lon=reorderDomain->min_lon ;
+    double max_lon=reorderDomain->max_lon ;
+    double delta=max_lon-min_lon ;
+    
+    if (!domainDestination->lonvalue_1d.isEmpty() )
+    {
+      CArray<double,1>& lon=domainDestination->lonvalue_1d ;
+      for (int i=0;i<lon.numElements();++i)
+      {
+        while  (lon(i) > max_lon) lon(i)=lon(i)-delta ;
+        while  (lon(i) < min_lon) lon(i)=lon(i)+delta ;
+      }
+    }
+
+    if (!domainDestination->bounds_lon_1d.isEmpty() )
+    {
+      CArray<double,2>& bounds_lon=domainDestination->bounds_lon_1d ;
+      for (int i=0;i<bounds_lon.extent(0);++i)
+      {
+        while  (bounds_lon(0,i) > max_lon) bounds_lon(0,i)=bounds_lon(0,i)-delta ;
+        while  (bounds_lon(1,i) > max_lon) bounds_lon(1,i)=bounds_lon(1,i)-delta ;
+
+        while  (bounds_lon(0,i) < min_lon) bounds_lon(0,i)=bounds_lon(0,i)+delta ;
+        while  (bounds_lon(1,i) < min_lon) bounds_lon(1,i)=bounds_lon(1,i)+delta ;
+      }
+    }
+  }
+}
+CATCH
+
+/*!
+  Compute the index mapping between domain on grid source and one on grid destination
+*/
+void CDomainAlgorithmReorder::computeIndexSourceMapping_(const std::vector<CArray<double,1>* >& dataAuxInputs)
+{
+/*
+  this->transformationMapping_.resize(1);
+  this->transformationWeight_.resize(1);
+
+  TransformationIndexMap& transMap = this->transformationMapping_[0];
+  TransformationWeightMap& transWeight = this->transformationWeight_[0];
+*/
+}
+
+
+}
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/transformation/domain_algorithm_reorder.hpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/transformation/domain_algorithm_reorder.hpp	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/transformation/domain_algorithm_reorder.hpp	(revision 1749)
@@ -0,0 +1,46 @@
+/*!
+   \brief Algorithm for reordering domain.
+ */
+#ifndef __XIOS_DOMAIN_ALGORITHM_REORDER_HPP__
+#define __XIOS_DOMAIN_ALGORITHM_REORDER_HPP__
+
+#include "domain_algorithm_transformation.hpp"
+#include "transformation.hpp"
+
+namespace xios {
+
+class CDomain;
+class CReorderDomain;
+
+/*!
+  \class CDomainAlgorithmReorder
+  Reordering data on domain
+*/
+class CDomainAlgorithmReorder : public CDomainAlgorithmTransformation
+{
+public:
+  CDomainAlgorithmReorder(CDomain* domainDestination, CDomain* domainSource, CReorderDomain* reorderDomain);
+
+  virtual ~CDomainAlgorithmReorder() {}
+
+  static bool registerTrans();
+
+protected:
+  void computeIndexSourceMapping_(const std::vector<CArray<double,1>* >& dataAuxInputs);
+
+
+private:
+
+  static CGenericAlgorithmTransformation* create(CGrid* gridDst, CGrid* gridSrc,
+                                                CTransformation<CDomain>* transformation,
+                                                int elementPositionInGrid,
+                                                std::map<int, int>& elementPositionInGridSrc2ScalarPosition,
+                                                std::map<int, int>& elementPositionInGridSrc2AxisPosition,
+                                                std::map<int, int>& elementPositionInGridSrc2DomainPosition,
+                                                std::map<int, int>& elementPositionInGridDst2ScalarPosition,
+                                                std::map<int, int>& elementPositionInGridDst2AxisPosition,
+                                                std::map<int, int>& elementPositionInGridDst2DomainPosition);
+};
+
+}
+#endif // __XIOS_DOMAIN_ALGORITHM_REORDER_HPP__
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/transformation/domain_algorithm_transformation.cpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/transformation/domain_algorithm_transformation.cpp	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/transformation/domain_algorithm_transformation.cpp	(revision 1749)
@@ -0,0 +1,70 @@
+/*!
+   \file domain_algorithm_transformation.hpp
+   \author Ha NGUYEN
+   \since 02 Jul 2015
+   \date 02 Jul 2015
+
+   \brief Interface for all domain transformation algorithms.
+ */
+
+#include "domain_algorithm_transformation.hpp"
+#include "context.hpp"
+#include "context_client.hpp"
+#include "domain.hpp"
+
+namespace xios {
+
+CDomainAlgorithmTransformation::CDomainAlgorithmTransformation(CDomain* domainDestination, CDomain* domainSource)
+ : CGenericAlgorithmTransformation(), domainDest_(domainDestination), domainSrc_(domainSource)
+{
+}
+
+CDomainAlgorithmTransformation::~CDomainAlgorithmTransformation()
+{
+}
+
+void CDomainAlgorithmTransformation::computeIndexSourceMapping_(const std::vector<CArray<double,1>* >& dataAuxInputs)
+{
+}
+
+/*!
+  Compute global index of domain on different processes
+  \param [in] globalDomainIndex global index of domain source
+  \param [out] globalDomainIndexOnProc processes which contain the corresponding global index of domain source
+*/
+void CDomainAlgorithmTransformation::computeExchangeGlobalIndex(const CArray<size_t,1>& globalDomainIndex,
+                                                                int elementType,
+                                                                CClientClientDHTInt::Index2VectorInfoTypeMap& globalDomainIndexOnProc)
+TRY
+{
+  CContext* context = CContext::getCurrent();
+  CContextClient* client=context->client;
+  int clientRank = client->clientRank;
+  int clientSize = client->clientSize;
+
+  int niGlob = domainSrc_->ni_glo.getValue();
+  int njGlob = domainSrc_->nj_glo.getValue();
+  size_t globalIndex;
+  int nIndexSize = domainSrc_->i_index.numElements(), i_ind, j_ind;
+  CClientClientDHTInt::Index2VectorInfoTypeMap globalIndex2ProcRank;
+  globalIndex2ProcRank.rehash(std::ceil(nIndexSize/globalIndex2ProcRank.max_load_factor()));
+  CArray<bool,1>& localMask=domainSrc_->localMask ;
+  for (int idx = 0; idx < nIndexSize; ++idx)
+  {
+    if (localMask(idx))
+    {
+      i_ind=domainSrc_->i_index(idx) ;
+      j_ind=domainSrc_->j_index(idx) ;
+
+      globalIndex = i_ind + j_ind * niGlob;
+      globalIndex2ProcRank[globalIndex].push_back(clientRank);
+    }
+  }
+
+  CClientClientDHTInt dhtIndexProcRank(globalIndex2ProcRank, client->intraComm);
+  dhtIndexProcRank.computeIndexInfoMapping(globalDomainIndex);
+  globalDomainIndexOnProc = dhtIndexProcRank.getInfoIndexMap();
+}
+CATCH
+
+}
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/transformation/domain_algorithm_transformation.hpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/transformation/domain_algorithm_transformation.hpp	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/transformation/domain_algorithm_transformation.hpp	(revision 1749)
@@ -0,0 +1,45 @@
+/*!
+   \file domain_algorithm_transformation.hpp
+   \author Ha NGUYEN
+   \since 02 Jul 2015
+   \date 02 Jul 2015
+
+   \brief Interface for all domain transformation algorithms.
+ */
+#ifndef __XIOS_DOMAIN_ALGORITHM_TRANSFORMATION_HPP__
+#define __XIOS_DOMAIN_ALGORITHM_TRANSFORMATION_HPP__
+
+#include "generic_algorithm_transformation.hpp"
+#include "client_client_dht_template.hpp"
+
+namespace xios {
+
+class CDomain;
+/*!
+  \class CDomainAlgorithmTransformation
+  Algorithms for domain.
+*/
+class CDomainAlgorithmTransformation : public virtual CGenericAlgorithmTransformation
+{
+public:
+  CDomainAlgorithmTransformation(CDomain* domainDestination, CDomain* domainSource);
+
+  virtual ~CDomainAlgorithmTransformation();
+
+protected:
+  void computeIndexSourceMapping_(const std::vector<CArray<double,1>* >&);
+
+  virtual void computeExchangeGlobalIndex(const CArray<size_t,1>& globalDomainIndex,
+                                          int elementType,
+                                          CClientClientDHTInt::Index2VectorInfoTypeMap& globalDomainIndexOnProc);
+
+protected:
+    //! Domain on grid destination
+  CDomain* domainDest_;
+
+  //! Domain on grid source
+  CDomain* domainSrc_;
+};
+
+}
+#endif // __XIOS_DOMAIN_ALGORITHM_TRANSFORMATION_HPP__
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/transformation/domain_algorithm_zoom.cpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/transformation/domain_algorithm_zoom.cpp	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/transformation/domain_algorithm_zoom.cpp	(revision 1749)
@@ -0,0 +1,286 @@
+#include "domain_algorithm_zoom.hpp"
+#include "zoom_domain.hpp"
+#include "domain.hpp"
+#include "grid.hpp"
+#include "grid_transformation_factory_impl.hpp"
+#include "attribute_template.hpp"
+
+namespace xios {
+CGenericAlgorithmTransformation* CDomainAlgorithmZoom::create(CGrid* gridDst, CGrid* gridSrc,
+                                                             CTransformation<CDomain>* transformation,
+                                                             int elementPositionInGrid,
+                                                             std::map<int, int>& elementPositionInGridSrc2ScalarPosition,
+                                                             std::map<int, int>& elementPositionInGridSrc2AxisPosition,
+                                                             std::map<int, int>& elementPositionInGridSrc2DomainPosition,
+                                                             std::map<int, int>& elementPositionInGridDst2ScalarPosition,
+                                                             std::map<int, int>& elementPositionInGridDst2AxisPosition,
+                                                             std::map<int, int>& elementPositionInGridDst2DomainPosition)
+TRY
+{
+  std::vector<CDomain*> domainListDestP = gridDst->getDomains();
+  std::vector<CDomain*> domainListSrcP  = gridSrc->getDomains();
+
+  CZoomDomain* zoomDomain = dynamic_cast<CZoomDomain*> (transformation);
+  int domainDstIndex = elementPositionInGridDst2DomainPosition[elementPositionInGrid];
+  int domainSrcIndex = elementPositionInGridSrc2DomainPosition[elementPositionInGrid];
+
+  return (new CDomainAlgorithmZoom(domainListDestP[domainDstIndex], domainListSrcP[domainSrcIndex], zoomDomain));
+}
+CATCH
+
+bool CDomainAlgorithmZoom::registerTrans()
+TRY
+{
+  CGridTransformationFactory<CDomain>::registerTransformation(TRANS_ZOOM_DOMAIN, create);
+}
+CATCH
+
+CDomainAlgorithmZoom::CDomainAlgorithmZoom(CDomain* domainDestination, CDomain* domainSource, CZoomDomain* zoomDomain)
+: CDomainAlgorithmTransformation(domainDestination, domainSource)
+TRY
+{
+  zoomDomain->checkValid(domainSource);
+  zoomIBegin_ = zoomDomain->ibegin.getValue();
+  zoomJBegin_ = zoomDomain->jbegin.getValue();
+
+  zoomNi_  = zoomDomain->ni.getValue();
+  zoomNj_  = zoomDomain->nj.getValue();
+
+  zoomIEnd_ = zoomIBegin_ + zoomNi_ - 1;
+  zoomJEnd_ = zoomJBegin_ + zoomNj_ - 1;
+
+  if (zoomNi_ > domainSource->ni_glo.getValue())
+  {
+    ERROR("CDomainAlgorithmZoom::CDomainAlgorithmZoom(CDomain* domainDestination, CDomain* domainSource, CZoomDomain* zoomDomain)",
+           << "Zoom size is greater than size of domain source"
+           << "Size ni_glo of domain source " <<domainSource->getId() << " is " << domainSource->ni_glo.getValue()  << std::endl
+           << "Zoom size is " << zoomNi_ );
+  }
+
+  if (zoomNj_ > domainSource->nj_glo.getValue())
+  {
+    ERROR("CDomainAlgorithmZoom::CDomainAlgorithmZoom(CDomain* domainDestination, CDomain* domainSource, CZoomDomain* zoomDomain)",
+           << "Zoom size is greater than size of domain source"
+           << "Size nj_glo of domain source " <<domainSource->getId() << " is " << domainSource->nj_glo.getValue()  << std::endl
+           << "Zoom size is " << zoomNj_ );
+  }
+
+  // Calculate the size of local domain
+  int ind, indLocSrc, indLocDest, iIdxSrc, jIdxSrc, destIBegin = -1, destJBegin = -1, niDest = 0, njDest = 0, ibeginDest, jbeginDest ;
+  int indGloDest, indGloSrc, niGloSrc = domainSrc_->ni_glo, iSrc, jSrc, nvertex = 0;
+  for (int j = 0; j < domainSrc_->nj.getValue(); j++)
+  {
+    for (int i = 0; i < domainSrc_->ni.getValue(); i++)
+    {
+      ind = j*domainSrc_->ni + i;
+      iIdxSrc = domainSrc_->i_index(ind);
+      if ((iIdxSrc >= zoomIBegin_) && (iIdxSrc <= zoomIEnd_))
+      {
+        jIdxSrc = domainSrc_->j_index(ind);
+        if ((jIdxSrc >= zoomJBegin_) && (jIdxSrc <= zoomJEnd_))
+        {
+          if ((niDest == 0) && (njDest == 0))
+          {
+            destIBegin = i;
+            destJBegin = j;
+          }
+          if (i == destIBegin) ++njDest;
+        }
+        if (j == destJBegin) ++niDest;
+
+      }
+    }
+  }
+  ibeginDest = destIBegin + domainSrc_->ibegin - zoomIBegin_;
+  jbeginDest = destJBegin + domainSrc_->jbegin - zoomJBegin_;
+  domainDest_->ni_glo.setValue(zoomNi_);
+  domainDest_->nj_glo.setValue(zoomNj_);
+  domainDest_->ni.setValue(niDest);
+  domainDest_->nj.setValue(njDest);
+  if ( (niDest==0) || (njDest==0))
+  {
+    domainDest_->ibegin.setValue(0);
+    domainDest_->jbegin.setValue(0);
+  }
+  else
+  {
+    domainDest_->ibegin.setValue(ibeginDest);
+    domainDest_->jbegin.setValue(jbeginDest);
+  }
+  domainDest_->i_index.resize(niDest*njDest);
+  domainDest_->j_index.resize(niDest*njDest);
+
+  domainDest_->data_ni.setValue(niDest);
+  domainDest_->data_nj.setValue(njDest);
+  domainDest_->data_ibegin.setValue(0);
+  domainDest_->data_jbegin.setValue(0);
+  domainDest_->data_i_index.resize(niDest*njDest);
+  domainDest_->data_j_index.resize(niDest*njDest);
+
+  domainDest_->domainMask.resize(niDest*njDest);
+
+  if (!domainSrc_->lonvalue_1d.isEmpty())
+  {
+    if (domainDest_->type == CDomain::type_attr::rectilinear)
+    {
+      domainDest_->lonvalue_1d.resize(niDest);
+      domainDest_->latvalue_1d.resize(njDest);
+    }
+    else if (domainDest_->type == CDomain::type_attr::unstructured)
+    {
+      domainDest_->lonvalue_1d.resize(niDest);
+      domainDest_->latvalue_1d.resize(niDest);
+    }
+    else if (domainDest_->type == CDomain::type_attr::curvilinear)
+    {
+      domainDest_->lonvalue_1d.resize(niDest*njDest);
+      domainDest_->latvalue_1d.resize(niDest*njDest);
+    }
+  }
+  else if (!domainSrc_->lonvalue_2d.isEmpty())
+  {
+    domainDest_->lonvalue_2d.resize(niDest,njDest);
+    domainDest_->latvalue_2d.resize(niDest,njDest);
+  }
+
+  if (domainSrc_->hasBounds)
+  {
+    nvertex = domainSrc_->nvertex;
+    domainDest_->nvertex.setValue(nvertex);
+    if (!domainSrc_->bounds_lon_1d.isEmpty())
+    {
+      if (domainDest_->type == CDomain::type_attr::rectilinear)
+      {
+        domainDest_->bounds_lon_1d.resize(nvertex, niDest);
+        domainDest_->bounds_lat_1d.resize(nvertex, njDest);
+      }
+      else if (domainDest_->type == CDomain::type_attr::unstructured)
+      {
+        domainDest_->bounds_lon_1d.resize(nvertex, niDest);
+        domainDest_->bounds_lat_1d.resize(nvertex, niDest);
+      }
+      else if (domainDest_->type == CDomain::type_attr::curvilinear)
+      {
+        domainDest_->bounds_lon_1d.resize(nvertex, niDest*njDest);
+        domainDest_->bounds_lat_1d.resize(nvertex, niDest*njDest);
+      }
+    }
+    else if (!domainSrc_->bounds_lon_2d.isEmpty())
+    {
+      domainDest_->bounds_lon_2d.resize(nvertex, niDest, njDest);
+      domainDest_->bounds_lat_2d.resize(nvertex, niDest, njDest);
+    }
+  }
+  if (domainSrc_->hasArea) domainDest_->area.resize(niDest,njDest);
+
+  this->transformationMapping_.resize(1);
+  this->transformationWeight_.resize(1);
+  TransformationIndexMap& transMap = this->transformationMapping_[0];
+  TransformationWeightMap& transWeight = this->transformationWeight_[0];
+
+  for (int iDest = 0; iDest < niDest; iDest++)
+  {
+    iSrc = iDest + destIBegin;
+    for (int jDest = 0; jDest < njDest; jDest++)
+    {
+      jSrc = jDest + destJBegin;
+      ind = jSrc * domainSrc_->ni + iSrc;
+      iIdxSrc = domainSrc_->i_index(ind);
+      jIdxSrc = domainSrc_->j_index(ind);
+      indLocDest = jDest*niDest + iDest;
+      indGloDest = (jDest + jbeginDest)*zoomNi_ + (iDest + ibeginDest);
+      indLocSrc = (jDest+destJBegin)*domainSrc_->ni + (iDest+destIBegin);
+      indGloSrc = (jIdxSrc )* niGloSrc + iIdxSrc;
+      domainDest_->i_index(indLocDest) = iDest + ibeginDest;                                             // i_index contains global positions
+      domainDest_->j_index(indLocDest) = jDest + jbeginDest;                                             // i_index contains global positions
+      domainDest_->data_i_index(indLocDest) = (domainSrc_->data_dim == 1) ? indLocDest : iDest;          // data_i_index contains local positions
+      domainDest_->data_j_index(indLocDest) = (domainSrc_->data_dim == 1) ? 0 :jDest;                    // data_i_index contains local positions
+      domainDest_->domainMask(indLocDest) = domainSrc_->domainMask(indLocSrc);
+
+      if (domainSrc_->hasArea)
+        domainDest_->area(iDest,jDest) = domainSrc_->area(iSrc,jSrc);
+
+      if (domainSrc_->hasLonLat)
+      {
+        if (!domainSrc_->latvalue_1d.isEmpty())
+        {
+          if (domainDest_->type == CDomain::type_attr::rectilinear)
+          {
+            domainDest_->latvalue_1d(jDest) = domainSrc_->latvalue_1d(jSrc);
+          }
+          else
+          {
+            domainDest_->lonvalue_1d(indLocDest) = domainSrc_->lonvalue_1d(ind);
+            domainDest_->latvalue_1d(indLocDest) = domainSrc_->latvalue_1d(ind);
+          }
+        }
+        else if (!domainSrc_->latvalue_2d.isEmpty())
+        {
+          domainDest_->lonvalue_2d(iDest,jDest) = domainSrc_->lonvalue_2d(iSrc,jSrc);
+          domainDest_->latvalue_2d(iDest,jDest) = domainSrc_->latvalue_2d(iSrc,jSrc);
+        }
+      }
+
+      if (domainSrc_->hasBounds)
+      {
+        if (!domainSrc_->bounds_lon_1d.isEmpty())
+        {
+          if (domainDest_->type == CDomain::type_attr::rectilinear)
+          {
+            for (int n = 0; n < nvertex; ++n)
+              domainDest_->bounds_lat_1d(n,jDest) = domainSrc_->bounds_lat_1d(n,jSrc);
+          }
+          else
+          {
+            for (int n = 0; n < nvertex; ++n)
+            {
+              domainDest_->bounds_lon_1d(n,indLocDest) = domainSrc_->bounds_lon_1d(n,ind);
+              domainDest_->bounds_lat_1d(n,indLocDest) = domainSrc_->bounds_lat_1d(n,ind);
+            }
+          }
+        }
+        else if (!domainSrc_->bounds_lon_2d.isEmpty())
+        {
+          for (int n = 0; n < nvertex; ++n)
+          {
+            domainDest_->bounds_lon_2d(n,iDest,jDest) = domainSrc_->bounds_lon_2d(n,iSrc,jSrc);
+            domainDest_->bounds_lat_2d(n,iDest,jDest) = domainSrc_->bounds_lat_2d(n,iSrc,jSrc);
+          }
+        }
+
+      }
+
+      transMap[indGloDest].push_back(indGloSrc);
+      transWeight[indGloDest].push_back(1.0);
+    }
+
+    if (domainSrc_->hasLonLat && !domainSrc_->latvalue_1d.isEmpty())
+    {
+      if (domainDest_->type == CDomain::type_attr::rectilinear)
+      {
+        domainDest_->lonvalue_1d(iDest) = domainSrc_->lonvalue_1d(iSrc);
+      }
+    }
+
+    if (domainSrc_->hasBounds && !domainSrc_->bounds_lon_1d.isEmpty())
+    {
+      if (domainDest_->type == CDomain::type_attr::rectilinear)
+      {
+        for (int n = 0; n < nvertex; ++n)
+          domainDest_->bounds_lon_1d(n,iDest) = domainSrc_->bounds_lon_1d(n,iSrc);
+      }
+    }
+  }
+  domainDest_->computeLocalMask();
+}
+CATCH
+
+/*!
+  Compute the index mapping between domain on grid source and one on grid destination
+*/
+void CDomainAlgorithmZoom::computeIndexSourceMapping_(const std::vector<CArray<double,1>* >& dataAuxInputs)
+{
+}
+
+
+}
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/transformation/domain_algorithm_zoom.hpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/transformation/domain_algorithm_zoom.hpp	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/transformation/domain_algorithm_zoom.hpp	(revision 1749)
@@ -0,0 +1,59 @@
+
+#ifndef __XIOS_DOMAIN_ALGORITHM_ZOOM_HPP__
+#define __XIOS_DOMAIN_ALGORITHM_ZOOM_HPP__
+
+#include "domain_algorithm_transformation.hpp"
+#include "transformation.hpp"
+
+namespace xios {
+
+class CDomain;
+class CZoomDomain;
+
+/*!
+  \class CDomainAlgorithmZoom
+  Implementing zoom (alternative zoom) on domain
+*/
+class CDomainAlgorithmZoom : public CDomainAlgorithmTransformation
+{
+public:
+  CDomainAlgorithmZoom(CDomain* domainDestination, CDomain* domainSource, CZoomDomain* zoomDomain);
+
+  virtual ~CDomainAlgorithmZoom() {}
+
+  static bool registerTrans();
+protected:
+  void updateDomainAttributes();
+  void computeIndexSourceMapping_(const std::vector<CArray<double,1>* >& dataAuxInputs);
+
+private:
+  void updateZoom();
+
+private:
+  //! Global zoom begin on domain
+  int zoomIBegin_;
+  int zoomJBegin_;
+
+  //! Global zoom end on domain
+  int zoomIEnd_;
+  int zoomJEnd_;
+
+  //! Global zoom size on domain
+  int zoomNi_;
+  int zoomNj_;
+
+private:
+
+  static CGenericAlgorithmTransformation* create(CGrid* gridDst, CGrid* gridSrc,
+                                                CTransformation<CDomain>* transformation,
+                                                int elementPositionInGrid,
+                                                std::map<int, int>& elementPositionInGridSrc2ScalarPosition,
+                                                std::map<int, int>& elementPositionInGridSrc2AxisPosition,
+                                                std::map<int, int>& elementPositionInGridSrc2DomainPosition,
+                                                std::map<int, int>& elementPositionInGridDst2ScalarPosition,
+                                                std::map<int, int>& elementPositionInGridDst2AxisPosition,
+                                                std::map<int, int>& elementPositionInGridDst2DomainPosition);
+};
+
+}
+#endif // __XIOS_DOMAIN_ALGORITHM_ZOOM_HPP__
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/transformation/generic_algorithm_transformation.cpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/transformation/generic_algorithm_transformation.cpp	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/transformation/generic_algorithm_transformation.cpp	(revision 1749)
@@ -0,0 +1,1144 @@
+/*!
+   \file generic_algorithm_transformation.hpp
+   \author Ha NGUYEN
+   \since 14 May 2015
+   \date 21 Mars 2016
+
+   \brief Interface for all transformation algorithms.
+ */
+#include "generic_algorithm_transformation.hpp"
+#include "context.hpp"
+#include "context_client.hpp"
+#include "client_client_dht_template.hpp"
+#include "utils.hpp"
+#include "timer.hpp"
+#include "mpi.hpp"
+
+namespace xios {
+
+CGenericAlgorithmTransformation::CGenericAlgorithmTransformation()
+ : transformationMapping_(), transformationWeight_(), transformationPosition_(),
+   idAuxInputs_(), type_(ELEMENT_NO_MODIFICATION_WITH_DATA), indexElementSrc_(),
+   computedProcSrcNonTransformedElement_(false), eliminateRedondantSrc_(true), isDistributedComputed_(false)
+{
+}
+
+void CGenericAlgorithmTransformation::updateData(CArray<double,1>& dataOut)
+{
+
+}
+
+void CGenericAlgorithmTransformation::apply(const std::vector<std::pair<int,double> >& localIndex,
+                                            const double* dataInput,
+                                            CArray<double,1>& dataOut,
+                                            std::vector<bool>& flagInitial,
+                                            bool ignoreMissingValue, bool firstPass  )
+TRY
+{
+  int nbLocalIndex = localIndex.size();   
+  double defaultValue = std::numeric_limits<double>::quiet_NaN();
+    
+  if (ignoreMissingValue)
+  {
+    if (firstPass) dataOut=defaultValue ;
+    
+    for (int idx = 0; idx < nbLocalIndex; ++idx)
+    {
+      if (! NumTraits<double>::isNan(*(dataInput + idx)))
+      {
+        if (flagInitial[localIndex[idx].first]) dataOut(localIndex[idx].first) = *(dataInput + idx) * localIndex[idx].second;
+        else dataOut(localIndex[idx].first) += *(dataInput + idx) * localIndex[idx].second;
+        flagInitial[localIndex[idx].first] = false; // Reset flag to indicate not all data source are nan
+      }
+    }
+
+  }
+  else
+  {
+    for (int idx = 0; idx < nbLocalIndex; ++idx)
+    {
+      dataOut(localIndex[idx].first) += *(dataInput + idx) * localIndex[idx].second;
+    }
+  }
+}
+CATCH
+
+void CGenericAlgorithmTransformation::computePositionElements(CGrid* dst, CGrid* src)
+TRY
+{
+  int idxScalar = 0, idxAxis = 0, idxDomain = 0;
+  CArray<int,1> axisDomainOrderDst = dst->axis_domain_order;
+  for (int i = 0; i < axisDomainOrderDst.numElements(); ++i)
+  {
+    int dimElement = axisDomainOrderDst(i);
+    if (2 == dimElement)
+    {
+      elementPositionInGridDst2DomainPosition_[i] = idxDomain;
+      ++idxDomain;
+    }
+    else if (1 == dimElement)
+    {
+      elementPositionInGridDst2AxisPosition_[i] = idxAxis;
+      ++idxAxis;
+    }
+    else
+    {
+      elementPositionInGridDst2ScalarPosition_[i] = idxScalar;
+      ++idxScalar;
+    }
+  }
+
+  idxScalar = idxAxis = idxDomain = 0;
+  CArray<int,1> axisDomainOrderSrc = src->axis_domain_order;
+  for (int i = 0; i < axisDomainOrderSrc.numElements(); ++i)
+  {
+    int dimElement = axisDomainOrderSrc(i);
+    if (2 == dimElement)
+    {
+      elementPositionInGridSrc2DomainPosition_[i] = idxDomain;
+      ++idxDomain;
+    }
+    else if (1 == dimElement)
+    {
+      elementPositionInGridSrc2AxisPosition_[i] = idxAxis;
+      ++idxAxis;
+    }
+    else
+    {
+      elementPositionInGridSrc2ScalarPosition_[i] = idxScalar;
+      ++idxScalar;
+    }
+  }
+}
+CATCH
+
+bool CGenericAlgorithmTransformation::isDistributedTransformation(int elementPositionInGrid, CGrid* gridSrc, CGrid* gridDst)
+TRY
+{
+
+  if (!isDistributedComputed_)
+  {
+    isDistributedComputed_=true ;
+    if (!eliminateRedondantSrc_) isDistributed_=true ;
+    else
+    {
+      CContext* context = CContext::getCurrent();
+      CContextClient* client = context->client;
+  
+      computePositionElements(gridSrc, gridDst);
+      std::vector<CScalar*> scalarListSrcP  = gridSrc->getScalars();
+      std::vector<CAxis*> axisListSrcP = gridSrc->getAxis();
+      std::vector<CDomain*> domainListSrcP = gridSrc->getDomains();
+      int distributed, distributed_glo ;
+  
+      CArray<int,1> axisDomainSrcOrder = gridSrc->axis_domain_order;
+      if (2 == axisDomainSrcOrder(elementPositionInGrid)) // It's domain
+      {
+        distributed=domainListSrcP[elementPositionInGridSrc2DomainPosition_[elementPositionInGrid]]->isDistributed() ;
+        MPI_Allreduce(&distributed,&distributed_glo, 1, MPI_INT, MPI_LOR, client->intraComm) ;
+    
+      }
+      else if (1 == axisDomainSrcOrder(elementPositionInGrid))//it's an axis
+      {
+        distributed=axisListSrcP[elementPositionInGridSrc2AxisPosition_[elementPositionInGrid]]->isDistributed() ;
+        MPI_Allreduce(&distributed,&distributed_glo, 1, MPI_INT, MPI_LOR, client->intraComm) ;
+      }
+      else //it's a scalar
+      {
+        distributed_glo=false ;
+      } 
+      isDistributed_=distributed_glo ;
+    }
+  }
+  return isDistributed_ ;
+}
+CATCH
+
+/*!
+  This function computes the global indexes of grid source, which the grid destination is in demand.
+  \param[in] elementPositionInGrid position of an element in a grid .E.g: if grid is composed of domain and axis (in order),
+                then position of axis in grid is 1 and domain is positioned at 0.
+  \param[in] gridSrc Grid source
+  \param[in] gridDst Grid destination
+  \param[in\out] globaIndexWeightFromSrcToDst mapping of each global index source and weight to index destination
+*/
+void CGenericAlgorithmTransformation::computeGlobalSourceIndex(int elementPositionInGrid,
+                                                               CGrid* gridSrc,
+                                                               CGrid* gridDst,
+                                                               SourceDestinationIndexMap& globaIndexWeightFromSrcToDst)
+TRY
+ {
+  CContext* context = CContext::getCurrent();
+  CContextClient* client = context->client;
+  int nbClient = client->clientSize;
+
+  typedef std::unordered_map<int, std::vector<std::pair<int,double> > > SrcToDstMap;
+  int idx;
+
+  // compute position of elements on grids
+  computePositionElements(gridDst, gridSrc);
+  std::vector<CScalar*> scalarListDestP = gridDst->getScalars();
+  std::vector<CAxis*> axisListDestP = gridDst->getAxis();
+  std::vector<CDomain*> domainListDestP = gridDst->getDomains();
+  CArray<int,1> axisDomainDstOrder = gridDst->axis_domain_order;
+  std::vector<CScalar*> scalarListSrcP  = gridSrc->getScalars();
+  std::vector<CAxis*> axisListSrcP = gridSrc->getAxis();
+  std::vector<CDomain*> domainListSrcP = gridSrc->getDomains();
+  CArray<int,1> axisDomainSrcOrder = gridSrc->axis_domain_order;  
+  
+  bool isTransPosEmpty = transformationPosition_.empty();
+  CArray<size_t,1> transPos;
+  if (!isTransPosEmpty) transPos.resize(transformationMapping_.size());
+  std::set<size_t> allIndexSrc; // All index of source, which can be scattered among processes, need for doing transformation 
+  
+  for (size_t idxTrans = 0; idxTrans < transformationMapping_.size(); ++idxTrans)
+  {
+    TransformationIndexMap::const_iterator itbTransMap = transformationMapping_[idxTrans].begin(), itTransMap,
+                                           iteTransMap = transformationMapping_[idxTrans].end();
+    TransformationWeightMap::const_iterator itbTransWeight = transformationWeight_[idxTrans].begin(), itTransWeight;
+
+    // Build mapping between global source element index and global destination element index.
+    itTransWeight = itbTransWeight;
+    for (itTransMap = itbTransMap; itTransMap != iteTransMap; ++itTransMap, ++itTransWeight)
+    {
+      const std::vector<int>& srcIndex = itTransMap->second;
+      for (idx = 0; idx < srcIndex.size(); ++idx)
+        allIndexSrc.insert(srcIndex[idx]);
+    }
+
+    if (!isTransPosEmpty)
+    {
+      TransformationPositionMap::const_iterator itPosMap = transformationPosition_[idxTrans].begin();
+      transPos(idxTrans) = itPosMap->second[0];
+    }
+  }
+
+  size_t indexSrcSize = 0;
+  CArray<size_t,1> indexSrc(allIndexSrc.size());
+  for (std::set<size_t>::iterator it = allIndexSrc.begin(); it != allIndexSrc.end(); ++it, ++indexSrcSize)
+    indexSrc(indexSrcSize) = *it;
+
+  // Flag to indicate whether we will recompute distribution of source global index  on processes
+  bool computeGlobalIndexOnProc = false; 
+  if (indexElementSrc_.size() != allIndexSrc.size())
+    computeGlobalIndexOnProc = true;  
+  else
+  {
+    for (std::set<size_t>::iterator it = allIndexSrc.begin(); it != allIndexSrc.end(); ++it)
+      if (0 == indexElementSrc_.count(*it))
+      {
+        computeGlobalIndexOnProc = true;
+        break;        
+      }
+  }
+
+  if (computeGlobalIndexOnProc)
+    indexElementSrc_.swap(allIndexSrc);
+      
+  int sendValue = (computeGlobalIndexOnProc) ? 1 : 0;
+  int recvValue = 0;
+  MPI_Allreduce(&sendValue, &recvValue, 1, MPI_INT, MPI_SUM, client->intraComm);
+  computeGlobalIndexOnProc = (0 < recvValue);
+
+//  CClientClientDHTInt::Index2VectorInfoTypeMap globalIndexOfTransformedElementOnProc;
+
+  if (computeGlobalIndexOnProc || !computedProcSrcNonTransformedElement_)
+  {    
+    {
+      CClientClientDHTInt::Index2VectorInfoTypeMap tmp ;
+      globalIndexOfTransformedElementOnProc_.swap(tmp) ;
+    }
+    // Find out global index source of transformed element on corresponding process.    
+    if (globalElementIndexOnProc_.empty())
+      globalElementIndexOnProc_.resize(axisDomainDstOrder.numElements());
+    
+    for (idx = 0; idx < axisDomainDstOrder.numElements(); ++idx)
+    {
+      
+      if (idx == elementPositionInGrid)
+        computeExchangeGlobalIndex(indexSrc, axisDomainSrcOrder(idx), globalIndexOfTransformedElementOnProc_); //globalElementIndexOnProc[idx]);
+      if (!computedProcSrcNonTransformedElement_)
+      {
+        if (2 == axisDomainDstOrder(idx)) // It's domain
+        {
+          if (idx != elementPositionInGrid)
+            computeExchangeDomainIndex(domainListDestP[elementPositionInGridDst2DomainPosition_[idx]],
+                                       domainListSrcP[elementPositionInGridSrc2DomainPosition_[idx]],
+                                       transPos,
+                                       globalElementIndexOnProc_[idx]);      
+
+        }
+        else if (1 == axisDomainDstOrder(idx))//it's an axis
+        {
+          if (idx != elementPositionInGrid)
+            computeExchangeAxisIndex(axisListDestP[elementPositionInGridDst2AxisPosition_[idx]],
+                                     axisListSrcP[elementPositionInGridSrc2AxisPosition_[idx]],
+                                     transPos,
+                                     globalElementIndexOnProc_[idx]);
+        }
+        else //it's a scalar
+        {
+          if (idx != elementPositionInGrid)
+            computeExchangeScalarIndex(scalarListDestP[elementPositionInGridDst2ScalarPosition_[idx]],
+                                       scalarListSrcP[elementPositionInGridSrc2ScalarPosition_[idx]],
+                                       transPos,
+                                       globalElementIndexOnProc_[idx]);
+
+        }
+      }
+    }
+
+    if (!isTransPosEmpty && !computedProcSrcNonTransformedElement_)
+    {
+      for (idx = 0; idx < globalElementIndexOnProc_.size(); ++idx)
+      {
+        if (idx != elementPositionInGrid)
+        {
+          std::unordered_map<int,std::vector<size_t> >::iterator itb = globalElementIndexOnProc_[idx].begin(), it,
+                                                                   ite = globalElementIndexOnProc_[idx].end();
+          for (it = itb; it != ite; ++it) it->second.resize(1);
+        }
+      }
+    }
+
+/*      
+    if (!computedProcSrcNonTransformedElement_)
+    {
+      for (idx = 0; idx < globalElementIndexOnProc_.size(); ++idx)
+      {
+        if (idx != elementPositionInGrid)
+        {
+          std::unordered_map<int,std::vector<size_t> >::iterator itb = globalElementIndexOnProc_[idx].begin(), it,
+                                                                   ite = globalElementIndexOnProc_[idx].end();
+          for (it = itb; it != ite; ++it) procOfNonTransformedElements_.insert(it->first);
+          if (procOfNonTransformedElements_.size() == nbClient)
+            break;
+        }
+      }
+    }
+   
+    // Processes contain the source index of transformed element
+    std::set<int> procOfTransformedElement; 
+    CClientClientDHTInt::Index2VectorInfoTypeMap::iterator itIdxb = globalIndexOfTransformedElementOnProc.begin(),
+                                                           itIdxe = globalIndexOfTransformedElementOnProc.end(), itIdx;
+    for (itIdx = itIdxb; itIdx != itIdxe; ++itIdx)
+    {
+      std::vector<int>& tmp = itIdx->second;
+      for (int i = 0; i < tmp.size(); ++i)
+        procOfTransformedElement.insert(tmp[i]);
+      if (tmp.size() == nbClient)
+        break;
+    }                                                           
+    
+    std::set<int>& commonProc = (procOfTransformedElement.size() < procOfNonTransformedElements_.size()) ? procOfTransformedElement 
+                              : (!procOfNonTransformedElements_.empty() ? procOfNonTransformedElements_ : procOfTransformedElement);
+    
+    std::vector<int> procContainSrcElementIdx(commonProc.size());
+    int count = 0;
+    for (std::set<int>::iterator it = commonProc.begin(); it != commonProc.end(); ++it)
+      procContainSrcElementIdx[count++] = *it;
+
+    procContainSrcElementIdx_.swap(procContainSrcElementIdx);    
+*/
+    
+    if (procElementList_.empty()) procElementList_.resize(axisDomainDstOrder.numElements()) ;
+    for (idx = 0; idx < axisDomainDstOrder.numElements(); ++idx)
+    {
+      std::set<int>& procList=procElementList_[idx] ;
+      std::set<int> commonTmp ;
+      if (idx == elementPositionInGrid)
+      {
+          set<int> tmpSet ; 
+          procList.swap(tmpSet) ;
+          CClientClientDHTInt::Index2VectorInfoTypeMap::iterator itIdxb = globalIndexOfTransformedElementOnProc_.begin(),
+                                                                 itIdxe = globalIndexOfTransformedElementOnProc_.end(), itIdx;
+          for (itIdx = itIdxb; itIdx != itIdxe; ++itIdx)
+          {
+             std::vector<int>& tmp = itIdx->second;
+             for (int i = 0; i < tmp.size(); ++i) procList.insert(tmp[i]);
+             if (tmp.size() == nbClient)
+             break;
+          }
+      }
+      else
+      {
+        if (!computedProcSrcNonTransformedElement_)
+        {
+          set<int> tmpSet ; 
+          procList.swap(tmpSet) ;
+          std::unordered_map<int,std::vector<size_t> >::iterator itb = globalElementIndexOnProc_[idx].begin(), it,
+                                                                   ite = globalElementIndexOnProc_[idx].end();
+          for (it = itb; it != ite; ++it)
+          {
+            procList.insert(it->first);
+            if (procList.size() == nbClient)  break;
+          }
+        }
+      }
+
+      if (idx==0) commonProc_= procList ;
+      else
+      {
+        for (std::set<int>::iterator it = commonProc_.begin(); it != commonProc_.end(); ++it)
+          if (procList.count(*it)==1) commonTmp.insert(*it) ;
+        commonProc_.swap(commonTmp) ;
+      }
+    }
+    std::vector<int> procContainSrcElementIdx(commonProc_.size());
+    int count = 0;
+    for (std::set<int>::iterator it = commonProc_.begin(); it != commonProc_.end(); ++it) procContainSrcElementIdx[count++] = *it;
+    procContainSrcElementIdx_.swap(procContainSrcElementIdx);
+    
+        // For the first time, surely we calculate proc containing non transformed elements
+    if (!computedProcSrcNonTransformedElement_) computedProcSrcNonTransformedElement_ = true;
+  }
+  
+  for (size_t idxTrans = 0; idxTrans < transformationMapping_.size(); ++idxTrans)
+  {
+    TransformationIndexMap::const_iterator itbTransMap = transformationMapping_[idxTrans].begin(), itTransMap,
+                                           iteTransMap = transformationMapping_[idxTrans].end();
+    TransformationWeightMap::const_iterator itbTransWeight = transformationWeight_[idxTrans].begin(), itTransWeight;
+    SrcToDstMap src2DstMap;
+    src2DstMap.rehash(std::ceil(transformationMapping_[idxTrans].size()/src2DstMap.max_load_factor()));
+
+    // Build mapping between global source element index and global destination element index.
+    std::unordered_map<int,std::vector<size_t> >().swap(globalElementIndexOnProc_[elementPositionInGrid]);
+    std::set<int> tmpCounter;
+    itTransWeight = itbTransWeight;
+    for (itTransMap = itbTransMap; itTransMap != iteTransMap; ++itTransMap, ++itTransWeight)
+    {
+      const std::vector<int>& srcIndex = itTransMap->second;
+      const std::vector<double>& weight = itTransWeight->second;
+      for (idx = 0; idx < srcIndex.size(); ++idx)
+      {
+        src2DstMap[srcIndex[idx]].push_back(make_pair(itTransMap->first, weight[idx]));
+        if (0 == tmpCounter.count(srcIndex[idx]))
+        {          
+          tmpCounter.insert(srcIndex[idx]);
+       
+          vector<int>& rankSrc = globalIndexOfTransformedElementOnProc_[srcIndex[idx]] ;
+          for (int n=0;n<rankSrc.size();++n)
+          {
+            if (commonProc_.count(rankSrc[n])==1) globalElementIndexOnProc_[elementPositionInGrid][rankSrc[n]].push_back(srcIndex[idx]);
+          }
+//          for (int j = 0; j < procContainSrcElementIdx_.size(); ++j)
+//            globalElementIndexOnProc_[elementPositionInGrid][procContainSrcElementIdx_[j]].push_back(srcIndex[idx]);
+        }
+      }
+    }
+  
+    if (!isTransPosEmpty)
+    {
+      for (idx = 0; idx < globalElementIndexOnProc_.size(); ++idx)
+      {
+        if (idx != elementPositionInGrid)
+        {
+          std::unordered_map<int,std::vector<size_t> >::iterator itb = globalElementIndexOnProc_[idx].begin(), it,
+                                                                   ite = globalElementIndexOnProc_[idx].end();
+          for (it = itb; it != ite; ++it) it->second[0] = transPos(idxTrans);
+        }
+      }
+    }
+
+    // Ok, now compute global index of grid source and ones of grid destination
+    computeGlobalGridIndexMapping(elementPositionInGrid,
+                                  procContainSrcElementIdx_, //srcRank,
+                                  src2DstMap,
+                                  gridSrc,
+                                  gridDst,
+                                  globalElementIndexOnProc_,
+                                  globaIndexWeightFromSrcToDst);
+  }  
+ }
+CATCH
+
+/*!
+  Compute mapping of global index of grid source and grid destination
+  \param [in] elementPositionInGrid position of element in grid. E.x: grid composed of domain and axis, domain has position 0 and axis 1.
+  \param [in] srcRank rank of client from which we demand global index of element source
+  \param [in] src2DstMap mapping of global index of element source and global index of element destination
+  \param [in] gridSrc Grid source
+  \param [in] gridDst Grid destination
+  \param [in] globalElementIndexOnProc Global index of element source on different client rank
+  \param [out] globaIndexWeightFromSrcToDst Mapping of global index of grid source and grid destination
+*/
+void CGenericAlgorithmTransformation::computeGlobalGridIndexMapping(int elementPositionInGrid,
+                                                                   const std::vector<int>& srcRank,
+                                                                   std::unordered_map<int, std::vector<std::pair<int,double> > >& src2DstMap,
+                                                                   CGrid* gridSrc,
+                                                                   CGrid* gridDst,
+                                                                   std::vector<std::unordered_map<int,std::vector<size_t> > >& globalElementIndexOnProc,
+                                                                   SourceDestinationIndexMap& globaIndexWeightFromSrcToDst)
+TRY
+{
+  SourceDestinationIndexMap globaIndexWeightFromSrcToDst_tmp ;
+  
+  CContext* context = CContext::getCurrent();
+  CContextClient* client=context->client;
+  int clientRank = client->clientRank;
+  
+  std::vector<CDomain*> domainListSrcP = gridSrc->getDomains();
+  std::vector<CAxis*> axisListSrcP = gridSrc->getAxis();
+  std::vector<CScalar*> scalarListSrcP = gridSrc->getScalars();
+  CArray<int,1> axisDomainSrcOrder = gridSrc->axis_domain_order;
+
+  size_t nbElement = axisDomainSrcOrder.numElements();
+  std::vector<size_t> nGlobSrc(nbElement);
+  size_t globalSrcSize = 1;
+  int domainIndex = 0, axisIndex = 0, scalarIndex = 0;
+  for (int idx = 0; idx < nbElement; ++idx)
+  {
+    nGlobSrc[idx] = globalSrcSize;
+    int elementDimension = axisDomainSrcOrder(idx);
+
+    // If this is a domain
+    if (2 == elementDimension)
+    {
+      globalSrcSize *= domainListSrcP[domainIndex]->nj_glo.getValue() * domainListSrcP[domainIndex]->ni_glo.getValue();
+      ++domainIndex;
+    }
+    else if (1 == elementDimension) // So it's an axis
+    {
+      globalSrcSize *= axisListSrcP[axisIndex]->n_glo.getValue();
+      ++axisIndex;
+    }
+    else
+    {
+      globalSrcSize *= 1;
+      ++scalarIndex;
+    }
+  }
+
+  std::vector<CDomain*> domainListDestP = gridDst->getDomains();
+  std::vector<CAxis*> axisListDestP = gridDst->getAxis();
+  std::vector<CScalar*> scalarListDestP = gridDst->getScalars();
+  CArray<int,1> axisDomainDstOrder = gridDst->axis_domain_order;
+
+  std::vector<size_t> nGlobDst(nbElement);
+  size_t globalDstSize = 1;
+  domainIndex = axisIndex = scalarIndex = 0;
+  set<size_t>  globalSrcStoreIndex ;
+  
+  for (int idx = 0; idx < nbElement; ++idx)
+  {
+    nGlobDst[idx] = globalDstSize;
+    int elementDimension = axisDomainDstOrder(idx);
+
+    // If this is a domain
+    if (2 == elementDimension)
+    {
+      globalDstSize *= domainListDestP[domainIndex]->nj_glo.getValue() * domainListDestP[domainIndex]->ni_glo.getValue();
+      ++domainIndex;
+    }
+    else if (1 == elementDimension) // So it's an axis
+    {
+      globalDstSize *= axisListDestP[axisIndex]->n_glo.getValue();
+      ++axisIndex;
+    }
+    else
+    {
+      globalDstSize *= 1;
+      ++scalarIndex;
+    }
+  }
+
+  std::map< std::pair<size_t,size_t>, int > rankMap ;
+  std::map< std::pair<size_t,size_t>, int >:: iterator rankMapIt ;
+  
+  for (int i = 0; i < srcRank.size(); ++i)
+  {
+    size_t ssize = 1;
+    int rankSrc = srcRank[i];
+    for (int idx = 0; idx < nbElement; ++idx)
+    {
+      ssize *= (globalElementIndexOnProc[idx][rankSrc]).size();
+    }
+
+    std::vector<int> idxLoop(nbElement,0);
+    std::vector<int> currentIndexSrc(nbElement, 0);
+    std::vector<int> currentIndexDst(nbElement, 0);
+    int innnerLoopSize = (globalElementIndexOnProc[0])[rankSrc].size();
+    size_t idx = 0;
+    while (idx < ssize)
+    {
+      for (int ind = 0; ind < nbElement; ++ind)
+      {
+        if (idxLoop[ind] == (globalElementIndexOnProc[ind])[rankSrc].size())
+        {
+          idxLoop[ind] = 0;
+          ++idxLoop[ind+1];
+        }
+
+        currentIndexDst[ind] = currentIndexSrc[ind] = (globalElementIndexOnProc[ind])[rankSrc][idxLoop[ind]];
+      }
+
+      for (int ind = 0; ind < innnerLoopSize; ++ind)
+      {
+        currentIndexDst[0] = currentIndexSrc[0] = (globalElementIndexOnProc[0])[rankSrc][ind];
+        int globalElementDstIndexSize = 0;
+        if (1 == src2DstMap.count(currentIndexSrc[elementPositionInGrid]))
+        {
+          globalElementDstIndexSize = src2DstMap[currentIndexSrc[elementPositionInGrid]].size();
+        }
+
+        std::vector<size_t> globalDstVecIndex(globalElementDstIndexSize,0);
+        size_t globalSrcIndex = 0;
+        for (int idxElement = 0; idxElement < nbElement; ++idxElement)
+        {
+          if (idxElement == elementPositionInGrid)
+          {
+            for (int k = 0; k < globalElementDstIndexSize; ++k)
+            {
+              globalDstVecIndex[k] += src2DstMap[currentIndexSrc[elementPositionInGrid]][k].first * nGlobDst[idxElement];
+            }
+          }
+          else
+          {
+            for (int k = 0; k < globalElementDstIndexSize; ++k)
+            {
+              globalDstVecIndex[k] += currentIndexDst[idxElement] * nGlobDst[idxElement];
+            }
+          }
+          globalSrcIndex += currentIndexSrc[idxElement] * nGlobSrc[idxElement];
+        }
+
+        for (int k = 0; k < globalElementDstIndexSize; ++k)
+        {
+          
+          globaIndexWeightFromSrcToDst_tmp[rankSrc][globalSrcIndex].push_back(make_pair(globalDstVecIndex[k],src2DstMap[currentIndexSrc[elementPositionInGrid]][k].second ));
+          rankMapIt=rankMap.find(make_pair(globalSrcIndex,globalDstVecIndex[k])) ;
+          if (rankMapIt==rankMap.end()) rankMap[make_pair(globalSrcIndex,globalDstVecIndex[k])] = rankSrc ;
+          else if (rankSrc==clientRank) rankMapIt->second = rankSrc ;
+        }
+        ++idxLoop[0];
+      }
+      idx += innnerLoopSize;
+    }
+  }
+
+  // eliminate redondant global src point owned by differrent processes.
+  // Avoid as possible to tranfer data from an other process if the src point is also owned by current process 
+      int rankSrc ;
+      size_t globalSrcIndex ;
+      size_t globalDstIndex ;
+      double weight ;
+ 
+      SourceDestinationIndexMap::iterator rankIt,rankIte ;
+      std::unordered_map<size_t, std::vector<std::pair<size_t,double> > >::iterator globalSrcIndexIt, globalSrcIndexIte ;
+      std::vector<std::pair<size_t,double> >::iterator vectIt,vectIte ;
+   
+      rankIt=globaIndexWeightFromSrcToDst_tmp.begin() ; rankIte=globaIndexWeightFromSrcToDst_tmp.end() ;
+      for(;rankIt!=rankIte;++rankIt)
+      {
+        rankSrc = rankIt->first ;
+        globalSrcIndexIt = rankIt->second.begin() ; globalSrcIndexIte = rankIt->second.end() ;
+        for(;globalSrcIndexIt!=globalSrcIndexIte;++globalSrcIndexIt)
+        { 
+          globalSrcIndex = globalSrcIndexIt->first ;
+          vectIt = globalSrcIndexIt->second.begin() ; vectIte = globalSrcIndexIt->second.end() ;
+          for(vectIt; vectIt!=vectIte; vectIt++)
+          {
+            globalDstIndex = vectIt->first ;
+            weight = vectIt->second ;
+            if (eliminateRedondantSrc_)
+            {
+              if (rankMap[make_pair(globalSrcIndex,globalDstIndex)] == rankSrc)  
+                globaIndexWeightFromSrcToDst[rankSrc][globalSrcIndex].push_back(make_pair(globalDstIndex,weight)) ;
+            }
+            else globaIndexWeightFromSrcToDst[rankSrc][globalSrcIndex].push_back(make_pair(globalDstIndex,weight)) ;
+         }
+       }
+     }
+}
+CATCH
+
+/*!
+  Find out proc and global index of axis source which axis destination is on demande
+  \param[in] scalar Scalar destination
+  \param[in] scalar Scalar source
+  \param[in] destGlobalIndexPositionInGrid Relative position of axis corresponds to other element of grid.
+  \param[out] globalScalarIndexOnProc Global index of axis source on different procs
+*/
+void CGenericAlgorithmTransformation::computeExchangeScalarIndex(CScalar* scalarDst,
+                                                                 CScalar* scalarSrc,
+                                                                 CArray<size_t,1>& destGlobalIndexPositionInGrid,
+                                                                 std::unordered_map<int,std::vector<size_t> >& globalScalarIndexOnProc)
+TRY
+{
+  CContext* context = CContext::getCurrent();
+  CContextClient* client=context->client;
+  int clientRank = client->clientRank;
+  int clientSize = client->clientSize;
+
+  globalScalarIndexOnProc.rehash(std::ceil(clientSize/globalScalarIndexOnProc.max_load_factor()));
+  for (int idx = 0; idx < clientSize; ++idx)
+  {
+    globalScalarIndexOnProc[idx].push_back(0);
+  }
+}
+CATCH
+
+/*!
+  Find out proc and global index of axis source which axis destination is on demande
+  \param[in] axisDst Axis destination
+  \param[in] axisSrc Axis source
+  \param[in] destGlobalIndexPositionInGrid Relative position of axis corresponds to other element of grid.
+  \param[out] globalAxisIndexOnProc Global index of axis source on different procs
+*/
+void CGenericAlgorithmTransformation::computeExchangeAxisIndex(CAxis* axisDst,
+                                                               CAxis* axisSrc,
+                                                               CArray<size_t,1>& destGlobalIndexPositionInGrid,
+                                                               std::unordered_map<int,std::vector<size_t> >& globalAxisIndexOnProc)
+TRY
+{
+  CContext* context = CContext::getCurrent();
+  CContextClient* client=context->client;
+  int clientRank = client->clientRank;
+  int clientSize = client->clientSize;
+
+  size_t globalIndex;
+  int nIndexSize = axisSrc->index.numElements();
+  CClientClientDHTInt::Index2VectorInfoTypeMap globalIndex2ProcRank;
+  globalIndex2ProcRank.rehash(std::ceil(nIndexSize/globalIndex2ProcRank.max_load_factor()));
+  for (int idx = 0; idx < nIndexSize; ++idx)
+  {
+    if (axisSrc->mask(idx))
+    {
+      globalIndex = axisSrc->index(idx);
+      globalIndex2ProcRank[globalIndex].push_back(clientRank);
+    }
+  }
+
+  CClientClientDHTInt dhtIndexProcRank(globalIndex2ProcRank, client->intraComm);
+  CArray<size_t,1> globalAxisIndex(axisDst->index.numElements());
+  for (int idx = 0; idx < globalAxisIndex.numElements(); ++idx)
+  {
+    globalAxisIndex(idx) = axisDst->index(idx);
+  }
+  dhtIndexProcRank.computeIndexInfoMapping(globalAxisIndex);
+
+  std::vector<int> countIndex(clientSize,0);
+  const CClientClientDHTInt::Index2VectorInfoTypeMap& computedGlobalIndexOnProc = dhtIndexProcRank.getInfoIndexMap();
+  CClientClientDHTInt::Index2VectorInfoTypeMap::const_iterator itb = computedGlobalIndexOnProc.begin(), it,
+                                                               ite = computedGlobalIndexOnProc.end();
+  for (it = itb; it != ite; ++it)
+  {
+    const std::vector<int>& procList = it->second;
+    for (int idx = 0; idx < procList.size(); ++idx) ++countIndex[procList[idx]];
+  }
+
+  globalAxisIndexOnProc.rehash(std::ceil(clientSize/globalAxisIndexOnProc.max_load_factor()));
+  for (int idx = 0; idx < clientSize; ++idx)
+  {
+    if (0 != countIndex[idx])
+    {
+      globalAxisIndexOnProc[idx].resize(countIndex[idx]);
+      countIndex[idx] = 0;
+    }
+  }
+
+  for (it = itb; it != ite; ++it)
+  {
+    const std::vector<int>& procList = it->second;
+    for (int idx = 0; idx < procList.size(); ++idx)
+    {
+      globalAxisIndexOnProc[procList[idx]][countIndex[procList[idx]]] = it->first;
+      ++countIndex[procList[idx]];
+    }
+  }
+}
+CATCH
+
+/*!
+  Find out proc and global index of domain source which domain destination is on demande
+  \param[in] domainDst Domain destination
+  \param[in] domainSrc Domain source
+  \param[in] destGlobalIndexPositionInGrid Relative position of domain corresponds to other element of grid.
+  \param[out] globalDomainIndexOnProc Global index of domain source on different procs
+*/
+void CGenericAlgorithmTransformation::computeExchangeDomainIndex(CDomain* domainDst,
+                                                                 CDomain* domainSrc,
+                                                                 CArray<size_t,1>& destGlobalIndexPositionInGrid,
+                                                                 std::unordered_map<int,std::vector<size_t> >& globalDomainIndexOnProc)
+TRY
+{
+  CContext* context = CContext::getCurrent();
+  CContextClient* client=context->client;
+  int clientRank = client->clientRank;
+  int clientSize = client->clientSize;
+
+  int niGlobSrc = domainSrc->ni_glo.getValue();
+  size_t globalIndex;
+  int i_ind, j_ind;
+  int nIndexSize = (destGlobalIndexPositionInGrid.isEmpty()) ? domainSrc->i_index.numElements()
+                                                             : destGlobalIndexPositionInGrid.numElements();
+  CClientClientDHTInt::Index2VectorInfoTypeMap globalIndex2ProcRank;
+  globalIndex2ProcRank.rehash(std::ceil(nIndexSize/globalIndex2ProcRank.max_load_factor()));
+  
+  if (destGlobalIndexPositionInGrid.isEmpty())
+  {
+    for (int idx = 0; idx < nIndexSize; ++idx)
+    {
+      i_ind=domainSrc->i_index(idx) ;
+      j_ind=domainSrc->j_index(idx) ;
+
+      if (domainSrc->localMask(idx))
+      {
+        globalIndex = i_ind + j_ind * niGlobSrc;
+        globalIndex2ProcRank[globalIndex].resize(1);
+        globalIndex2ProcRank[globalIndex][0] = clientRank;
+      }
+    }
+  }
+  else
+  {
+    for (int idx = 0; idx < nIndexSize; ++idx)
+    {
+//      if (domainSrc->localMask(idx)) -> not necessairy, mask seem to be included in  destGlobalIndexPositionInGrid(idx)    (ym)
+        globalIndex2ProcRank[destGlobalIndexPositionInGrid(idx)].push_back(clientRank);
+    }
+  }
+
+  CArray<size_t,1> globalDomainIndex;
+  if (destGlobalIndexPositionInGrid.isEmpty())
+  {
+    int niGlobDst = domainDst->ni_glo.getValue();
+    globalDomainIndex.resize(domainDst->i_index.numElements());
+    nIndexSize = domainDst->i_index.numElements();
+
+    for (int idx = 0; idx < nIndexSize; ++idx)
+    {
+      i_ind=domainDst->i_index(idx) ;
+      j_ind=domainDst->j_index(idx) ;
+
+      globalDomainIndex(idx) = i_ind + j_ind * niGlobDst;
+    }
+  }
+  else
+  {
+    globalDomainIndex.reference(destGlobalIndexPositionInGrid);
+  }
+
+  CClientClientDHTInt dhtIndexProcRank(globalIndex2ProcRank, client->intraComm);
+  dhtIndexProcRank.computeIndexInfoMapping(globalDomainIndex);
+
+  std::vector<int> countIndex(clientSize,0);
+  const CClientClientDHTInt::Index2VectorInfoTypeMap& computedGlobalIndexOnProc = dhtIndexProcRank.getInfoIndexMap();
+  CClientClientDHTInt::Index2VectorInfoTypeMap::const_iterator itb = computedGlobalIndexOnProc.begin(), it,
+                                                               ite = computedGlobalIndexOnProc.end();
+  for (it = itb; it != ite; ++it)
+  {
+    const std::vector<int>& procList = it->second;
+    for (int idx = 0; idx < procList.size(); ++idx) ++countIndex[procList[idx]];
+  }
+
+  globalDomainIndexOnProc.rehash(std::ceil(clientSize/globalDomainIndexOnProc.max_load_factor()));
+  for (int idx = 0; idx < clientSize; ++idx)
+  {
+    if (0 != countIndex[idx])
+    {
+      globalDomainIndexOnProc[idx].resize(countIndex[idx]);
+      countIndex[idx] = 0;
+    }
+  }
+
+  for (it = itb; it != ite; ++it)
+  {
+    const std::vector<int>& procList = it->second;
+    for (int idx = 0; idx < procList.size(); ++idx)
+    {
+      globalDomainIndexOnProc[procList[idx]][countIndex[procList[idx]]] = it->first;
+      ++countIndex[procList[idx]];
+    }
+  }
+}
+CATCH
+
+void CGenericAlgorithmTransformation::computeTransformationMappingNonDistributed(int elementPositionInGrid, CGrid* gridSrc, CGrid* gridDst,
+                                                                                 vector<int>& localSrc, vector<int>& localDst, vector<double>& weight,
+                                                                                 int& nlocalIndexDest)
+TRY
+{
+
+  CContext* context = CContext::getCurrent();
+  CContextClient* client = context->client;
+  int nbClient = client->clientSize;
+
+  computePositionElements(gridDst, gridSrc);
+  std::vector<CScalar*> scalarListDstP = gridDst->getScalars();
+  std::vector<CAxis*> axisListDstP = gridDst->getAxis();
+  std::vector<CDomain*> domainListDstP = gridDst->getDomains();
+  CArray<int,1> axisDomainDstOrder = gridDst->axis_domain_order;
+  std::vector<CScalar*> scalarListSrcP  = gridSrc->getScalars();
+  std::vector<CAxis*> axisListSrcP = gridSrc->getAxis();
+  std::vector<CDomain*> domainListSrcP = gridSrc->getDomains();
+  CArray<int,1> axisDomainSrcOrder = gridSrc->axis_domain_order;  
+
+  int nElement=axisDomainSrcOrder.numElements() ;
+  int indSrc=1 ;
+  int indDst=1 ;
+  vector<int> nIndexSrc(nElement) ;
+  vector<int> nIndexDst(nElement) ;
+  vector< CArray<bool,1>* > maskSrc(nElement) ;
+  vector< CArray<bool,1>* > maskDst(nElement) ;
+    
+  int nlocalIndexSrc=1 ;
+//  int nlocalIndexDest=1 ;
+  nlocalIndexDest=1 ;
+  CArray<bool,1> maskScalar(1) ;
+  maskScalar  = true ;
+  
+  
+  for(int i=0 ; i<nElement; i++)
+  {
+    int dimElement = axisDomainSrcOrder(i);
+    if (2 == dimElement) //domain
+    {
+      CDomain* domain=domainListSrcP[elementPositionInGridSrc2DomainPosition_[i]] ;
+      nIndexSrc[i] = domain->i_index.numElements() ;
+      maskSrc[i]=&domain->localMask ;
+    }
+    else if (1 == dimElement) //axis
+    {
+      CAxis* axis=axisListSrcP[elementPositionInGridSrc2AxisPosition_[i]] ;
+      nIndexSrc[i] = axis->index.numElements() ;
+      maskSrc[i]=&axis->mask ;
+    }
+    else  //scalar
+    {
+      nIndexSrc[i]=1 ;
+      maskSrc[i]=&maskScalar ;
+    }
+    nlocalIndexSrc=nlocalIndexSrc*nIndexSrc[i] ;
+  }
+
+
+
+  int offset=1 ;
+  for(int i=0 ; i<nElement; i++)
+  {
+    int dimElement = axisDomainDstOrder(i);
+    if (2 == dimElement) //domain
+    {
+      CDomain* domain=domainListDstP[elementPositionInGridDst2DomainPosition_[i]] ;
+      int nIndex=domain->i_index.numElements() ;
+      CArray<bool,1>& localMask=domain->localMask ;
+      int nbInd=0 ;
+      for(int j=0;j<nIndex;j++) if (localMask(j)) nbInd++ ;
+      nIndexDst[i] = nbInd ;
+      maskDst[i]=&domain->localMask ;
+    }
+    else if (1 == dimElement) //axis
+    {
+      CAxis* axis = axisListDstP[elementPositionInGridDst2AxisPosition_[i]] ;
+      int nIndex=axis->index.numElements() ;
+      CArray<bool,1>& localMask=axis->mask ;
+      int nbInd=0 ;
+      for(int j=0;j<nIndex;j++) if (localMask(j)) nbInd++ ;
+      nIndexDst[i] = nbInd ;
+      maskDst[i]=&axis->mask ;
+    }
+    else  //scalar
+    {
+      nIndexDst[i]=1 ;
+      maskDst[i]=&maskScalar ;
+    }
+    if (i<elementPositionInGrid) offset=offset*nIndexDst[i] ;
+    nlocalIndexDest=nlocalIndexDest*nIndexDst[i] ;
+  }
+
+  vector<int> dstLocalInd ;
+  int dimElement = axisDomainDstOrder(elementPositionInGrid);
+  if (2 == dimElement) //domain
+  {
+    CDomain* domain = domainListDstP[elementPositionInGridDst2DomainPosition_[elementPositionInGrid]] ;
+    int ni_glo=domain->ni_glo ;
+    int nj_glo=domain->nj_glo ;
+    int nindex_glo=ni_glo*nj_glo ;
+    dstLocalInd.resize(nindex_glo,-1) ;
+    int nIndex=domain->i_index.numElements() ;
+    CArray<bool,1>& localMask=domain->localMask ;
+    int unmaskedInd=0 ;
+    int globIndex ;
+    for(int i=0;i<nIndex;i++)
+    {
+      if (localMask(i))
+      {
+        globIndex=domain->j_index(i)*ni_glo+domain->i_index(i) ;
+        dstLocalInd[globIndex]=unmaskedInd ;
+        unmaskedInd++ ;
+      }
+    }
+  }
+  else if (1 == dimElement) //axis
+  {
+    CAxis* axis = axisListDstP[elementPositionInGridDst2AxisPosition_[elementPositionInGrid]] ;
+    int nindex_glo=axis->n_glo ;
+    dstLocalInd.resize(nindex_glo,-1) ;
+    int nIndex=axis->index.numElements() ;
+    CArray<bool,1>& localMask=axis->mask ; // axis mask must include later data_index
+    int unmaskedInd=0 ;
+    for(int i=0;i<nIndex;i++)
+    {
+      if (localMask(i))
+      {
+        dstLocalInd[axis->index(i)]=unmaskedInd ;
+        unmaskedInd++ ;
+      }
+    }
+  }
+  else  //scalar
+  {
+    dstLocalInd.resize(1) ; 
+    dstLocalInd[0]=0 ; 
+  }
+
+  vector<vector<vector<pair<int,double> > > > dstIndWeight(transformationMapping_.size()) ;
+   
+  for(int t=0;t<transformationMapping_.size();++t)
+  {
+    TransformationIndexMap::const_iterator   itTransMap = transformationMapping_[t].begin(),
+                                             iteTransMap = transformationMapping_[t].end();
+    TransformationWeightMap::const_iterator itTransWeight = transformationWeight_[t].begin();
+    dstIndWeight[t].resize(nIndexSrc[elementPositionInGrid]) ;
+    
+    for(;itTransMap!=iteTransMap;++itTransMap,++itTransWeight)
+    {
+      int dst=dstLocalInd[itTransMap->first] ;
+      if (dst!=-1)
+      {
+        const vector<int>& srcs=itTransMap->second;
+        const vector<double>& weights=itTransWeight->second;
+        for(int i=0;i<srcs.size() ;i++) dstIndWeight[t][srcs[i]].push_back(pair<int,double>(dst*offset+t,weights[i])) ;
+      }
+    }
+  }
+  int srcInd=0 ;  
+  int currentInd ;
+  int t=0 ;  
+  int srcIndCompressed=0 ;
+  
+  nonDistributedrecursiveFunct(nElement-1,true,elementPositionInGrid,maskSrc,maskDst, srcInd, srcIndCompressed, nIndexSrc, t, dstIndWeight,  
+                               currentInd,localSrc,localDst,weight);
+               
+}
+CATCH
+
+
+void CGenericAlgorithmTransformation::nonDistributedrecursiveFunct(int currentPos, bool masked, int elementPositionInGrid,
+                                                                   vector< CArray<bool,1>* >& maskSrc, vector< CArray<bool,1>* >& maskDst,
+                                                                   int& srcInd, int& srcIndCompressed, vector<int>& nIndexSrc,
+                                                                   int& t, vector<vector<vector<pair<int,double> > > >& dstIndWeight, int currentInd,
+                                                                   vector<int>& localSrc, vector<int>& localDst, vector<double>& weight)
+TRY
+{
+  int masked_ ;
+  if (currentPos!=elementPositionInGrid)
+  {
+    if (currentPos!=0)
+    {
+      CArray<bool,1>& mask = *maskSrc[currentPos] ;
+     
+      for(int i=0;i<nIndexSrc[currentPos];i++)
+      {
+        masked_=masked ;
+        if (!mask(i)) masked_=false ;
+        nonDistributedrecursiveFunct(currentPos-1, masked_, elementPositionInGrid, maskSrc, maskDst, srcInd, srcIndCompressed, nIndexSrc, t,
+                                     dstIndWeight, currentInd, localSrc, localDst, weight);
+      }
+    }
+    else
+    {
+      CArray<bool,1>& mask = *maskSrc[currentPos] ;
+      for(int i=0;i<nIndexSrc[currentPos];i++)
+      {
+        if (masked && mask(i))
+        {
+          if (dstIndWeight[t][currentInd].size()>0)
+          {
+            for(vector<pair<int,double> >::iterator it = dstIndWeight[t][currentInd].begin(); it!=dstIndWeight[t][currentInd].end(); ++it)
+            {
+              localSrc.push_back(srcIndCompressed) ;
+              localDst.push_back(it->first) ;
+              weight.push_back(it->second) ;
+              (it->first)++ ;
+            }
+          }
+          if (t < dstIndWeight.size()-1) t++ ;
+            srcIndCompressed ++ ;
+        }
+        srcInd++ ;
+      }
+    }
+  }
+  else
+  {
+ 
+    if (currentPos!=0)
+    {
+
+      CArray<bool,1>& mask = *maskSrc[currentPos] ;
+      for(int i=0;i<nIndexSrc[currentPos];i++)
+      {
+        t=0 ;
+        masked_=masked ;
+        if (!mask(i)) masked_=false ; 
+        nonDistributedrecursiveFunct(currentPos-1, masked_, elementPositionInGrid, maskSrc, maskDst, srcInd,
+                                     srcIndCompressed, nIndexSrc, t, dstIndWeight , i,  localSrc, localDst, weight);
+      }
+    }
+    else
+    {
+      for(int i=0;i<nIndexSrc[currentPos];i++)
+      {
+        if (masked)
+        {
+          t=0 ;        
+          if (dstIndWeight[t][i].size()>0)
+          {
+            for(vector<pair<int,double> >::iterator it = dstIndWeight[t][i].begin(); it!=dstIndWeight[t][i].end(); ++it)
+            {
+              localSrc.push_back(srcIndCompressed) ;
+              localDst.push_back(it->first) ;
+              weight.push_back(it->second) ;
+              (it->first)++ ;
+            }
+           }
+          if (t < dstIndWeight.size()-1) t++ ;
+          srcIndCompressed ++ ;
+        }
+        srcInd++ ;
+      }
+    }
+  }
+
+}
+CATCH
+
+/*!
+  Compute index mapping between element source and element destination with an auxiliary inputs which determine
+position of each mapped index in global index of grid destination.
+  \param [in] dataAuxInputs auxiliary inputs
+*/
+void CGenericAlgorithmTransformation::computeIndexSourceMapping(const std::vector<CArray<double,1>* >& dataAuxInputs)
+TRY
+{
+  computeIndexSourceMapping_(dataAuxInputs);
+}
+CATCH
+
+std::vector<StdString> CGenericAlgorithmTransformation::getIdAuxInputs()
+TRY
+{
+  return idAuxInputs_;
+}
+CATCH
+
+CGenericAlgorithmTransformation::AlgoTransType CGenericAlgorithmTransformation::type()
+TRY
+{
+  return type_;
+}
+CATCH
+
+}
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/transformation/generic_algorithm_transformation.hpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/transformation/generic_algorithm_transformation.hpp	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/transformation/generic_algorithm_transformation.hpp	(revision 1749)
@@ -0,0 +1,174 @@
+/*!
+   \file generic_algorithm_transformation.hpp
+   \author Ha NGUYEN
+   \since 14 May 2015
+   \date 29 June 2015
+
+   \brief Interface for all transformation algorithms.
+ */
+#ifndef __XIOS_GENERIC_ALGORITHM_TRANSFORMATION_HPP__
+#define __XIOS_GENERIC_ALGORITHM_TRANSFORMATION_HPP__
+
+#include <map>
+#include <set>
+#include "array_new.hpp"
+#include "client_client_dht_template.hpp"
+
+namespace xios {
+  class CGrid;
+  class CDomain;
+  class CAxis;
+  class CScalar;
+
+  /*!
+  \class CGenericAlgorithmTransformation
+  This class defines the interface for all other inherited algorithms class
+  */
+class CGenericAlgorithmTransformation
+{
+public:
+  enum AlgoTransType {
+    ELEMENT_GENERATION = 0,
+    ELEMENT_MODIFICATION_WITHOUT_DATA = 1,
+    ELEMENT_MODIFICATION_WITH_DATA = 2,
+    ELEMENT_NO_MODIFICATION_WITH_DATA = 3,
+    ELEMENT_NO_MODIFICATION_WITHOUT_DATA = 4
+  } ;
+
+public:
+  // Mapping between global index map of DESTINATION and its local index with pair of global index of SOURCE and weights
+  typedef std::unordered_map<int, std::unordered_map<size_t, std::vector<std::pair<size_t,double> > > > SourceDestinationIndexMap;
+
+protected:
+  typedef std::unordered_map<size_t,int> GlobalLocalMap;
+protected:
+  typedef std::unordered_map<int, std::vector<int> > TransformationIndexMap;
+  typedef std::unordered_map<int, std::vector<double> > TransformationWeightMap;
+  typedef std::unordered_map<int, std::vector<int> > TransformationPositionMap;
+
+public:
+  CGenericAlgorithmTransformation();
+
+  virtual ~CGenericAlgorithmTransformation() {}
+
+  bool isDistributedTransformation(int elementPositionInGrid, CGrid* gridSrc, CGrid* gridDst) ;
+
+  void computeGlobalSourceIndex(int elementPositionInGrid,
+                               CGrid* gridSrc,
+                               CGrid* gridDst,
+                               SourceDestinationIndexMap& globaIndexWeightFromSrcToDst);
+
+    /*!
+    Apply a operation on local data.
+    \param [in] localIndex vector contains local index of local data output and the corresponding weight
+    \param [in] dataInput Pointer to the first element of data input array (in form of buffer)
+    \param [in/out] dataOut Array contains local data
+    \param [in/out] flagInitial vector of boolean to mark the local index already initialized. True means there is a need for initalization
+    \param [in] ignoreMissingValue don't count missing value in operation if this flag is true
+    \param [in] firstPass indicate if it is the first time the apply funtion is called for a same transformation, in order to make a clean initialization 
+  */
+  virtual void apply(const std::vector<std::pair<int,double> >& localIndex,
+                     const double* dataInput,
+                     CArray<double,1>& dataOut,
+                     std::vector<bool>& flagInitial,                     
+                     bool ignoreMissingValue, bool firstPass);
+
+  /*!
+   * Update whole dataOut (on necessary).
+   * (Example:  Impose a weight, whose value is only known after being applied an operation, on dataOut)
+   * \param [in/out] dataOut dataOut
+   */
+  virtual void updateData(CArray<double,1>& dataOut);
+
+  std::vector<StdString> getIdAuxInputs();
+  AlgoTransType type();
+  /*!
+  Compute global index mapping from one element of destination grid to the corresponding element of source grid
+  */
+  void computeIndexSourceMapping(const std::vector<CArray<double,1>* >& dataAuxInputs = std::vector<CArray<double,1>* >());
+  void computeTransformationMappingNonDistributed(int elementPositionInGrid, CGrid* gridSrc, CGrid* gridDst,
+                                                  vector<int>& localSrc, vector<int>& localDst, vector<double>& weight, int& nbLocalIndexOnGridDest);
+  void nonDistributedrecursiveFunct(int currentPos, bool masked, int elementPositionInGrid,  vector< CArray<bool,1>* >& maskSrc, vector< CArray<bool,1>* >& maskDst,
+                                    int& srcInd, int& srcIndCompressed, vector<int>& nIndexSrc,
+                                    int& t, vector<vector<vector<pair<int,double> > > >& dstIndWeight, int currentInd,
+                                    vector<int>& localSrc, vector<int>& localDst, vector<double>& weight) ;
+
+protected:
+  virtual void computeIndexSourceMapping_(const std::vector<CArray<double,1>* >&) = 0;
+
+  /*!
+  Compute proc which contains global index of an element
+    \param[in] globalElementIndex demanding global index of an element of source grid
+    \param[in] elementType type of source element, 2: domain, 1: axis and 0: scalar
+    \param[out] globalElementIndexOnProc Proc contains the demanding global index
+  */
+  virtual void computeExchangeGlobalIndex(const CArray<size_t,1>& globalElementIndex,
+                                          int elementType,
+                                          CClientClientDHTInt::Index2VectorInfoTypeMap& globalElementIndexOnProc) = 0;
+
+protected:
+  void computeGlobalGridIndexMapping(int elementPositionInGrid,
+                                     const std::vector<int>& srcRank,
+                                     std::unordered_map<int, std::vector<std::pair<int,double> > >& src2DstMap,
+                                     CGrid* gridDst,
+                                     CGrid* gridSrc,
+                                     std::vector<std::unordered_map<int,std::vector<size_t> > >& globalElementIndexOnProc,
+                                     SourceDestinationIndexMap& globaIndexWeightFromSrcToDst);
+
+  void computeExchangeDomainIndex(CDomain* domainDst,
+                                  CDomain* domainSrc,
+                                  CArray<size_t,1>& destGlobalIndexPositionInGrid,
+                                  std::unordered_map<int,std::vector<size_t> >& globalDomainIndexOnProc);
+
+  void computeExchangeAxisIndex(CAxis* axisDst,
+                                CAxis* axisSrc,
+                                CArray<size_t,1>& destGlobalIndexPositionInGrid,
+                                std::unordered_map<int,std::vector<size_t> >& globalAxisIndexOnProc);
+
+  void computeExchangeScalarIndex(CScalar* scalarDst,
+                                  CScalar* scalarSrc,
+                                  CArray<size_t,1>& destGlobalIndexPositionInGrid,
+                                  std::unordered_map<int,std::vector<size_t> >& globalScalarIndexOnProc);
+
+  void computePositionElements(CGrid* dst, CGrid* src);
+
+protected:
+  //! indicate if the transformation is performed on a distributed element
+  bool isDistributed_ ;
+  //! indicate if the method  isDistributedTransformation has been called before
+  bool isDistributedComputed_ ;
+  
+  //! Map between global index of destination element and source element
+  std::vector<TransformationIndexMap> transformationMapping_;
+  //! Weight corresponding of source to destination
+  std::vector<TransformationWeightMap> transformationWeight_;
+  //! Map of global index of destination element and corresponding global index of other elements in the same grid
+  //! By default, one index of an element corresponds to all index of remaining element in the grid. So it's empty
+  std::vector<TransformationPositionMap> transformationPosition_;
+
+  //! Id of auxillary inputs which helps doing transformation dynamically
+  std::vector<StdString> idAuxInputs_;
+  AlgoTransType type_;
+
+  std::set<StdSize> indexElementSrc_;
+
+  std::vector<std::unordered_map<int,std::vector<size_t> > > globalElementIndexOnProc_;
+
+  std::vector<int> procContainSrcElementIdx_;  // List of processes containing source index of transformed elements
+//  std::set<int> procOfNonTransformedElements_; // Processes contain the source index of non-transformed elements
+  std::set<int> commonProc_;
+  std::vector< set<int> > procElementList_ ; // List of processes containing source index of elements
+
+  CClientClientDHTInt::Index2VectorInfoTypeMap globalIndexOfTransformedElementOnProc_;
+  
+  bool computedProcSrcNonTransformedElement_; // Flag to indicate whether we computed proc containing non transformed elements
+
+  std::map<int, int> elementPositionInGridSrc2AxisPosition_, elementPositionInGridSrc2DomainPosition_, elementPositionInGridSrc2ScalarPosition_;
+  std::map<int, int> elementPositionInGridDst2AxisPosition_, elementPositionInGridDst2DomainPosition_, elementPositionInGridDst2ScalarPosition_;
+
+  bool eliminateRedondantSrc_ ; // flag to indicate if the transformation must select only one global source point for all proc.
+                               // In this case it will choose preferentially the current process 
+};
+
+}
+#endif // __XIOS_GENERIC_ALGORITHM_TRANSFORMATION_HPP__
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/transformation/grid_generate.cpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/transformation/grid_generate.cpp	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/transformation/grid_generate.cpp	(revision 1749)
@@ -0,0 +1,121 @@
+/*!
+   \file grid_generate.cpp
+   \author Ha NGUYEN
+   \since 28 Aug 2015
+   \date 23 June 2016
+
+   \brief A special transformation to generate a grid.
+ */
+#include "grid_generate.hpp"
+#include "grid.hpp"
+#include "domain_algorithm_generate_rectilinear.hpp"
+#include "generate_rectilinear_domain.hpp"
+
+namespace xios {
+CGridGenerate::CGridGenerate(CGrid* destination, CGrid* source)
+  : CGridTransformationSelector(destination, source, special)
+{
+}
+
+CGridGenerate::~CGridGenerate()
+{
+}
+
+/*!
+  Select algorithm of an axis correspoding to its transformation type and its position in each element
+  \param [in] elementPositionInGrid position of element in grid. e.g: a grid has 1 domain and 1 axis, then position of domain is 1 (because it contains 2 basic elements)
+                                             and position of axis is 2
+  \param [in] transType transformation type, for now we have Zoom_axis, inverse_axis
+  \param [in] transformationOrder position of the transformation in an element (an element can have several transformation)
+*/
+void CGridGenerate::selectScalarAlgo(int elementPositionInGrid, ETranformationType transType, int transformationOrder)
+TRY
+{
+  CGenericAlgorithmTransformation* algo = 0;
+  algoTransformation_.push_back(algo);
+}
+CATCH
+
+/*!
+  Select algorithm of an axis correspoding to its transformation type and its position in each element
+  \param [in] elementPositionInGrid position of element in grid. e.g: a grid has 1 domain and 1 axis, then position of domain is 1 (because it contains 2 basic elements)
+                                             and position of axis is 2
+  \param [in] transType transformation type, for now we have Zoom_axis, inverse_axis
+  \param [in] transformationOrder position of the transformation in an element (an element can have several transformation)
+*/
+void CGridGenerate::selectAxisAlgo(int elementPositionInGrid, ETranformationType transType, int transformationOrder)
+TRY
+{
+  CGenericAlgorithmTransformation* algo = 0;
+  algoTransformation_.push_back(algo);
+}
+CATCH
+
+/*!
+  Select algorithm of a domain correspoding to its transformation type and its position in each element
+  \param [in] elementPositionInGrid position of element in grid. e.g: a grid has 1 domain and 1 axis, then position of domain is 1 (because it contains 2 basic elements)
+                                             and position of axis is 2
+  \param [in] transType transformation type, for now we have Zoom_axis, inverse_axis
+  \param [in] transformationOrder position of the transformation in an element (an element can have several transformation)
+*/
+void CGridGenerate::selectDomainAlgo(int elementPositionInGrid, ETranformationType transType, int transformationOrder)
+TRY
+{
+  std::vector<CDomain*> domainListDestP = gridDestination_->getDomains();
+  std::vector<CDomain*> domainListSrcP(domainListDestP.size());
+  if (0 != gridSource_) domainListSrcP = gridSource_->getDomains();
+
+  int domainIndex =  elementPositionInGridDst2DomainPosition_[elementPositionInGrid];
+  CDomain::TransMapTypes trans = domainListDestP[domainIndex]->getAllTransformations();
+  CDomain::TransMapTypes::const_iterator it = trans.begin();
+
+  for (int i = 0; i < transformationOrder; ++i, ++it) {}  // Find the correct transformation
+
+  CGenerateRectilinearDomain* genRectDomain = 0;
+  CGenericAlgorithmTransformation* algo = 0;
+  switch (transType)
+  {
+    case TRANS_GENERATE_RECTILINEAR_DOMAIN:
+      if (0 == transformationOrder)
+      {
+        genRectDomain = dynamic_cast<CGenerateRectilinearDomain*> (it->second);
+        algo = new CDomainAlgorithmGenerateRectilinear(domainListDestP[domainIndex], domainListSrcP[domainIndex],
+                                                       gridDestination_, gridSource_, genRectDomain);
+      }
+      else
+      {
+         ERROR("CGridGenerate::selectDomainAlgo(int elementPositionInGrid, ETranformationType transType, int transformationOrder)",
+           << "Generate rectilinear domain must be the first transformation");
+      }
+      break;
+    default:
+      break;
+  }
+  algoTransformation_.push_back(algo);
+}
+CATCH
+
+/*!
+
+*/
+void CGridGenerate::completeGrid()
+TRY
+{
+  ListAlgoType::const_iterator itb = listAlgos_.begin(),
+                               ite = listAlgos_.end(), it;
+  CGenericAlgorithmTransformation* algo = 0;
+
+  for (it = itb; it != ite; ++it)
+  {
+    int elementPositionInGrid = it->first;
+    ETranformationType transType = (it->second).first;
+    int transformationOrder = (it->second).second.first;
+    int algoType = (it->second).second.second;
+
+    // First of all, select an algorithm
+    selectAlgo(elementPositionInGrid, transType, transformationOrder, algoType);
+  }
+}
+CATCH
+
+}
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/transformation/grid_generate.hpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/transformation/grid_generate.hpp	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/transformation/grid_generate.hpp	(revision 1749)
@@ -0,0 +1,43 @@
+/*!
+   \file grid_generate.hpp
+   \author Ha NGUYEN
+   \since 28 Aug 2015
+   \date 28 Aug 2015
+
+   \brief A special transformation to generate a grid.
+ */
+#ifndef __XIOS_GRID_GENERATE_HPP__
+#define __XIOS_GRID_GENERATE_HPP__
+
+#include "xios_spl.hpp"
+#include "transformation_enum.hpp"
+#include "grid_transformation_selector.hpp"
+
+namespace xios {
+
+class CGrid;
+
+/*!
+  \class CGridGenerate
+  This class creates a grid from scratch, e.g: only global dimension of grid and its type are provided,
+then the generated grid plays the destination in a transformation. Not only some attributes of grid and its subcomponents are filled in
+automatically but it also have a distribution which might be different from one of grid source.
+This class only plays a role of interface between XIOS and specific algorithm of auto filling-in and auto distributing on sub-component
+*/
+class CGridGenerate : public CGridTransformationSelector
+{
+public:
+  /** Default constructor */
+  CGridGenerate(CGrid* destination, CGrid* source = 0);
+  ~CGridGenerate();
+
+  void completeGrid();
+
+protected:
+  virtual void selectScalarAlgo(int elementPositionInGrid, ETranformationType transType, int transformationOrder);
+  virtual void selectAxisAlgo(int elementPositionInGrid, ETranformationType transType, int transformationOrder);
+  virtual void selectDomainAlgo(int elementPositionInGrid, ETranformationType transType, int transformationOrder);
+};
+
+}
+#endif // __XIOS_GRID_GENERATE_HPP__
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/transformation/grid_transformation.cpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/transformation/grid_transformation.cpp	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/transformation/grid_transformation.cpp	(revision 1749)
@@ -0,0 +1,732 @@
+/*!
+   \file grid_transformation.cpp
+   \author Ha NGUYEN
+   \since 14 May 2015
+   \date 02 Jul 2015
+
+   \brief Interface for all transformations.
+ */
+#include "grid_transformation.hpp"
+#include "grid_transformation_factory_impl.hpp"
+#include "algo_types.hpp"
+#include "context.hpp"
+#include "context_client.hpp"
+#include "distribution_client.hpp"
+#include "mpi_tag.hpp"
+#include "grid.hpp"
+#include <unordered_map>
+#include "timer.hpp"
+
+namespace xios {
+CGridTransformation::CGridTransformation(CGrid* destination, CGrid* source)
+ : CGridTransformationSelector(destination, source),
+  tmpGridDestination_(destination), originalGridSource_(source),
+  tempGridSrcs_(), tempGridDests_(),
+  dynamicalTransformation_(false), timeStamp_()
+{
+}
+
+CGridTransformation::~CGridTransformation()
+{
+}
+
+/*!
+  Select algorithm of a scalar corresponding to its transformation type and its position in each element
+  \param [in] elementPositionInGrid position of element in grid. e.g: a grid has 1 domain and 1 axis, then position of domain is 0 and position of axis is 1
+  \param [in] transType transformation type, for now we have
+  \param [in] transformationOrder position of the transformation in an element (an element can have several transformation)
+*/
+void CGridTransformation::selectScalarAlgo(int elementPositionInGrid, ETranformationType transType, int transformationOrder)
+TRY
+{
+  std::vector<CScalar*> scaListDestP = gridDestination_->getScalars();
+  int scalarDstIndex =  elementPositionInGridDst2ScalarPosition_[elementPositionInGrid];
+  CScalar::TransMapTypes trans = scaListDestP[scalarDstIndex]->getAllTransformations();
+  CScalar::TransMapTypes::const_iterator it = trans.begin();
+
+  for (int i = 0; i < transformationOrder; ++i, ++it) {}  // Find the correct transformation
+  CGenericAlgorithmTransformation* algo = 0;
+  algo = CGridTransformationFactory<CScalar>::createTransformation(transType,
+                                                                  gridDestination_,
+                                                                  gridSource_,
+                                                                  it->second,
+                                                                  elementPositionInGrid,
+                                                                  elementPositionInGridSrc2ScalarPosition_,
+                                                                  elementPositionInGridSrc2AxisPosition_,
+                                                                  elementPositionInGridSrc2DomainPosition_,
+                                                                  elementPositionInGridDst2ScalarPosition_,
+                                                                  elementPositionInGridDst2AxisPosition_,
+                                                                  elementPositionInGridDst2DomainPosition_);
+  algoTransformation_.push_back(algo);
+}
+CATCH
+
+/*!
+  Select algorithm of an axis corresponding to its transformation type and its position in each element
+  \param [in] elementPositionInGrid position of element in grid. e.g: a grid has 1 domain and 1 axis, then position of domain is 0 and position of axis is 1
+  \param [in] transType transformation type, for now we have zoom_axis, inverse_axis, interpolate_axis
+  \param [in] transformationOrder position of the transformation in an element (an element can have several transformation)
+*/
+void CGridTransformation::selectAxisAlgo(int elementPositionInGrid, ETranformationType transType, int transformationOrder)
+TRY
+{
+  std::vector<CAxis*> axisListDestP = gridDestination_->getAxis();
+  int axisDstIndex =  elementPositionInGridDst2AxisPosition_[elementPositionInGrid];
+  CAxis::TransMapTypes trans = axisListDestP[axisDstIndex]->getAllTransformations();
+  CAxis::TransMapTypes::const_iterator it = trans.begin();
+  for (int i = 0; i < transformationOrder; ++i, ++it) {}  // Find the correct transformation
+
+  CGenericAlgorithmTransformation* algo = 0;
+  algo = CGridTransformationFactory<CAxis>::createTransformation(transType,
+                                                                 gridDestination_,
+                                                                 gridSource_,
+                                                                 it->second,
+                                                                 elementPositionInGrid,
+                                                                 elementPositionInGridSrc2ScalarPosition_,
+                                                                 elementPositionInGridSrc2AxisPosition_,
+                                                                 elementPositionInGridSrc2DomainPosition_,
+                                                                 elementPositionInGridDst2ScalarPosition_,
+                                                                 elementPositionInGridDst2AxisPosition_,
+                                                                 elementPositionInGridDst2DomainPosition_);
+  algoTransformation_.push_back(algo);
+}
+CATCH
+
+/*!
+  Select algorithm of a domain corresponding to its transformation type and its position in each element
+  \param [in] elementPositionInGrid position of element in grid. e.g: a grid has 1 domain and 1 axis, then position of domain is 0 and position of axis is 1
+  \param [in] transType transformation type, for now we have zoom_domain, interpolate_domain
+  \param [in] transformationOrder position of the transformation in an element (an element can have several transformation)
+*/
+void CGridTransformation::selectDomainAlgo(int elementPositionInGrid, ETranformationType transType, int transformationOrder)
+TRY
+{
+  std::vector<CDomain*> domainListDestP = gridDestination_->getDomains();
+  int domainIndex =  elementPositionInGridDst2DomainPosition_[elementPositionInGrid];
+  CDomain::TransMapTypes trans = domainListDestP[domainIndex]->getAllTransformations();
+  CDomain::TransMapTypes::const_iterator it = trans.begin();
+  for (int i = 0; i < transformationOrder; ++i, ++it) {}  // Find the correct transformation  
+
+  CGenericAlgorithmTransformation* algo = 0;
+  algo = CGridTransformationFactory<CDomain>::createTransformation(transType,
+                                                                   gridDestination_,
+                                                                   gridSource_,
+                                                                   it->second,
+                                                                   elementPositionInGrid,
+                                                                   elementPositionInGridSrc2ScalarPosition_,
+                                                                   elementPositionInGridSrc2AxisPosition_,
+                                                                   elementPositionInGridSrc2DomainPosition_,
+                                                                   elementPositionInGridDst2ScalarPosition_,
+                                                                   elementPositionInGridDst2AxisPosition_,
+                                                                   elementPositionInGridDst2DomainPosition_);
+  algoTransformation_.push_back(algo);
+}
+CATCH
+
+/*!
+  Find position of element in a grid as well as its type (domain, axis, scalar) and position in its own element list
+  \return element position: map<int,<int,int> > corresponds to <element position in grid, <element type, element position in element list> >
+*/
+std::map<int,std::pair<int,int> > CGridTransformation::getElementPosition(CGrid* grid)
+TRY
+{
+  std::vector<CScalar*> scalarListP = grid->getScalars(); 
+  std::vector<CAxis*> axisListP = grid->getAxis();
+  std::vector<CDomain*> domListP = grid->getDomains();  
+  CArray<int,1> axisDomainOrder = grid->axis_domain_order;
+  int scalarIndex = 0, axisIndex = 0, domainIndex = 0;
+  int nbElement = axisDomainOrder.numElements(), elementDim;
+  std::map<int,std::pair<int,int> > elementPosition;
+  for (int idx = 0; idx < nbElement; ++idx)
+  {
+    elementDim = axisDomainOrder(idx);
+    switch (elementDim)
+    {
+      case 2:
+        elementPosition[idx] = std::make_pair(elementDim, domainIndex);
+        ++domainIndex;
+        break;
+      case 1:
+        elementPosition[idx] = std::make_pair(elementDim, axisIndex);
+        ++axisIndex;
+        break;
+      case 0:
+        elementPosition[idx] = std::make_pair(elementDim, scalarIndex);
+        ++scalarIndex;
+        break;
+      default:
+        break;        
+    }
+  }
+
+  return elementPosition;  
+}
+CATCH
+
+/*!
+  If there are more than one transformation, a new temporary grid will be created and it will play the role of grid destination.
+This new created one keeps a pointer to the real transformed element of grid destination and generate new copies of other elements from grid source.
+  \param [in] elementPositionInGrid position of element in grid
+  \param [in] transType transformation type
+*/
+void CGridTransformation::setUpGridDestination(int elementPositionInGrid, ETranformationType transType)
+TRY
+{
+  if (isSpecialTransformation(transType)) return;
+
+  if (!tempGridDests_.empty() && (getNbAlgo() == tempGridDests_.size()))
+  {
+    tempGridDests_.resize(0);
+  }
+
+  if (1 == getNbAlgo()) 
+  {
+    tmpGridDestination_ = gridDestination_;
+    return;
+  }
+
+  std::vector<CScalar*> scalarListDestP = gridDestination_->getScalars();
+  std::vector<CScalar*> scalarListSrcP = gridSource_->getScalars(), scalarDst;
+
+  std::vector<CAxis*> axisListDestP = gridDestination_->getAxis();
+  std::vector<CAxis*> axisListSrcP = gridSource_->getAxis(), axisDst;
+
+  std::vector<CDomain*> domListDestP = gridDestination_->getDomains();
+  std::vector<CDomain*> domListSrcP = gridSource_->getDomains(), domainDst;
+
+  CArray<int,1> axisDomainOrderSrc = gridSource_->axis_domain_order;
+  CArray<int,1> axisDomainOrderDst = gridDestination_->axis_domain_order;
+
+  std::map<int,std::pair<int,int> > elementPositionSrc = getElementPosition(gridSource_);
+  std::map<int,std::pair<int,int> > elementPositionDst = getElementPosition(gridDestination_);
+
+  CArray<int,1> elementOrder(axisDomainOrderDst.numElements());
+  for (int idx = 0; idx < axisDomainOrderDst.numElements(); ++idx)
+  {
+    if (elementPositionInGrid == idx)
+    {
+      int dimElementDst = elementPositionDst[idx].first;
+      int elementIndex  = elementPositionDst[idx].second;
+      switch (dimElementDst) 
+      {
+        case 2:
+          domainDst.push_back(domListDestP[elementIndex]);
+          break;
+        case 1:
+          axisDst.push_back(axisListDestP[elementIndex]);
+          break;
+        case 0:
+          scalarDst.push_back(scalarListDestP[elementIndex]);
+          break;
+        default:
+          break;
+      }
+      elementOrder(idx) = dimElementDst;
+    }
+    else
+    {      
+      int dimElementSrc = elementPositionSrc[idx].first;
+      int elementIndex  = elementPositionSrc[idx].second;
+      switch (dimElementSrc)
+      {
+        case 2:
+          domainDst.push_back(domListSrcP[elementIndex]);
+          break;
+        case 1:
+          axisDst.push_back(axisListSrcP[elementIndex]);
+          break;
+        case 0:
+          scalarDst.push_back(scalarListSrcP[elementIndex]);
+          break;
+        default:
+          break;
+      }
+      elementOrder(idx) = dimElementSrc;
+    }
+  }
+
+  tmpGridDestination_ = CGrid::createGrid(domainDst, axisDst, scalarDst, elementOrder);  
+  tempGridDests_.push_back(tmpGridDestination_);
+}
+CATCH
+
+/*!
+  Assign the current grid destination to the grid source in the new transformation.
+The current grid destination plays the role of grid source in next transformation (if any).
+Only element on which the transformation is performed is modified
+  \param [in] elementPositionInGrid position of element in grid
+  \param [in] transType transformation type
+*/
+void CGridTransformation::setUpGridSource(int elementPositionInGrid)
+TRY
+{
+  if (!tempGridSrcs_.empty() && (getNbAlgo()-1) == tempGridSrcs_.size())
+  {
+    tempGridSrcs_.resize(0);
+  }
+
+  std::vector<CScalar*> scalarListDestP = tmpGridDestination_->getScalars();
+  std::vector<CScalar*> scalarListSrcP = gridSource_->getScalars(), scalarSrc;
+
+  std::vector<CAxis*> axisListDestP = tmpGridDestination_->getAxis();
+  std::vector<CAxis*> axisListSrcP = gridSource_->getAxis(), axisSrc;
+
+  std::vector<CDomain*> domListDestP = tmpGridDestination_->getDomains();
+  std::vector<CDomain*> domListSrcP = gridSource_->getDomains(), domainSrc;
+
+  CArray<int,1> axisDomainOrderSrc = gridSource_->axis_domain_order;
+  CArray<int,1> axisDomainOrderDst = tmpGridDestination_->axis_domain_order;
+
+  std::map<int,std::pair<int,int> > elementPositionSrc = getElementPosition(gridSource_);
+  std::map<int,std::pair<int,int> > elementPositionDst = getElementPosition(tmpGridDestination_);
+
+  for (int idx = 0; idx < axisDomainOrderDst.numElements(); ++idx)
+  {   
+    if (elementPositionInGrid == idx)
+    {
+      int dimElementDst = elementPositionDst[idx].first;
+      int elementIndex  = elementPositionDst[idx].second;
+      if (2 == dimElementDst)
+      {
+        CDomain* domain = CDomain::createDomain();
+        domain->domain_ref.setValue(domListDestP[elementIndex]->getId());
+        domain->solveRefInheritance(true);
+        domain->checkAttributesOnClient();
+        domainSrc.push_back(domain);
+      }
+      else if (1 == dimElementDst)
+      {
+        CAxis* axis = CAxis::createAxis();
+        axis->axis_ref.setValue(axisListDestP[elementIndex]->getId());
+        axis->solveRefInheritance(true);
+        axis->checkAttributesOnClient();
+        axisSrc.push_back(axis); 
+      }
+      else
+      {
+        CScalar* scalar = CScalar::createScalar();
+        scalar->scalar_ref.setValue(scalarListDestP[elementIndex]->getId());
+        scalar->solveRefInheritance(true);
+        scalar->checkAttributesOnClient();
+        scalarSrc.push_back(scalar);
+      }
+    }
+    else
+    {      
+      int dimElementDst = elementPositionDst[idx].first;
+      int elementIndex  = elementPositionDst[idx].second;
+      switch (dimElementDst)
+      {
+        case 2:
+          domainSrc.push_back(domListDestP[elementIndex]);
+          break;
+        case 1:
+          axisSrc.push_back(axisListDestP[elementIndex]);
+          break;
+        case 0:
+          scalarSrc.push_back(scalarListDestP[elementIndex]);
+          break;
+        default:
+          break;
+      }
+    }
+  }
+
+  gridSource_ = CGrid::createGrid(domainSrc, axisSrc, scalarSrc, tmpGridDestination_->axis_domain_order);  
+
+  tempGridSrcs_.push_back(gridSource_);
+}
+CATCH
+
+/*!
+  Perform all transformations
+  For each transformation, there are some things to do:
+  -) Chose the correct algorithm by transformation type and position of element
+  -) Calculate the mapping of global index between the current grid source and grid destination
+  -) Calculate the mapping of global index between current grid DESTINATION and grid SOURCE
+  -) Make current grid destination become grid source in the next transformation
+*/
+void CGridTransformation::computeAll(const std::vector<CArray<double,1>* >& dataAuxInputs, Time timeStamp)
+TRY
+{
+  if (nbNormalAlgos_ < 1) return;
+  if (!auxInputs_.empty() && !dynamicalTransformation_) { dynamicalTransformation_ = true; return; }
+  if (dynamicalTransformation_)
+  {
+    if (timeStamp_.insert(timeStamp).second)   //Reset map
+    {
+      std::list<SendingIndexGridSourceMap>().swap(localIndexToSendFromGridSource_);
+      std::list<RecvIndexGridDestinationMap>().swap(localIndexToReceiveOnGridDest_);
+      std::list<size_t>().swap(nbLocalIndexOnGridDest_);
+    }
+    else
+      return;
+  }
+
+  CContext* context = CContext::getCurrent();
+  CContextClient* client = context->client;
+
+  ListAlgoType::const_iterator itb = listAlgos_.begin(),
+                               ite = listAlgos_.end(), it;
+
+  CGenericAlgorithmTransformation* algo = 0;
+  int nbAgloTransformation = 0; // Only count for executed transformation. Generate domain is a special one, not executed in the list
+  for (it = itb; it != ite; ++it)
+  {
+    int elementPositionInGrid = it->first;
+    ETranformationType transType = (it->second).first;
+    int transformationOrder = (it->second).second.first;
+    int algoType = ((it->second).second.second); //algoTypes_[std::distance(itb, it)];
+    SourceDestinationIndexMap globaIndexWeightFromSrcToDst;
+    
+
+    // Create a temporary grid destination which contains transformed element of grid destination and
+    // non-transformed elements to grid source
+    setUpGridDestination(elementPositionInGrid, transType);
+
+    // First of all, select an algorithm
+    if (!dynamicalTransformation_ || (algoTransformation_.size() < listAlgos_.size()))
+    {
+      selectAlgo(elementPositionInGrid, transType, transformationOrder, algoType);
+      algo = algoTransformation_.back();
+    }
+    else
+      algo = algoTransformation_[std::distance(itb, it)];
+
+    if ((0 != algo) &&
+        ((CGenericAlgorithmTransformation::ELEMENT_NO_MODIFICATION_WITH_DATA == algo->type()) ||
+        (CGenericAlgorithmTransformation::ELEMENT_MODIFICATION_WITH_DATA == algo->type()))) // Only registered transformation can be executed
+    {
+      CTimer::get("computeIndexSourceMapping").resume() ;
+      algo->computeIndexSourceMapping(dataAuxInputs);
+      CTimer::get("computeIndexSourceMapping").suspend() ;
+      
+      // ComputeTransformation of global index of each element
+      int elementPosition = it->first;
+      bool nonDistributedActivated = CXios::getin<bool>("activate_non_distributed_transformation",false);
+      
+      if (nonDistributedActivated && !algo->isDistributedTransformation(elementPositionInGrid, gridSource_, tmpGridDestination_) )
+      {
+        vector<int> localSrc ;
+        vector<int> localDst ;
+        vector<double> weight ;
+        int nbLocalIndexOnGridDest;
+        CTimer::get("computeTransformationMappingNonDistributed").resume();  
+        algo->computeTransformationMappingNonDistributed(elementPosition, gridSource_, tmpGridDestination_, 
+                                                         localSrc, localDst, weight, nbLocalIndexOnGridDest) ;
+        CTimer::get("computeTransformationMappingNonDistributed").suspend();  
+
+        CTimer::get("computeTransformationMappingConvert").resume();  
+        nbLocalIndexOnGridDest_.push_back(nbLocalIndexOnGridDest) ;
+        int clientRank=client->clientRank ;
+        {
+          SendingIndexGridSourceMap tmp;
+          localIndexToSendFromGridSource_.push_back(tmp) ;
+          SendingIndexGridSourceMap& src=localIndexToSendFromGridSource_.back() ;
+          CArray<int,1> arrayTmp ;
+          src.insert( pair<int,CArray<int,1> >(clientRank,arrayTmp)) ;
+          CArray<int,1>& array=src[clientRank] ;
+          array.resize(localSrc.size()) ;
+          for(int i=0;i< localSrc.size();++i) array(i)=localSrc[i]  ;    
+        }
+        {
+          RecvIndexGridDestinationMap tmp;
+          localIndexToReceiveOnGridDest_.push_back(tmp) ;
+          RecvIndexGridDestinationMap& dst=localIndexToReceiveOnGridDest_.back() ;
+          vector<pair<int,double> > vectTmp ;
+          dst.insert( pair<int,vector<pair<int,double> >  >(clientRank,vectTmp)) ;
+          vector<pair<int,double> >& vect=dst[clientRank] ;
+          vect.resize(localDst.size()) ;
+          for(int i=0;i< localDst.size();++i) vect[i]=pair<int,double>(localDst[i],weight[i])  ;      
+        }
+        CTimer::get("computeTransformationMappingConvert").suspend();  
+      }
+      else
+      {
+        CTimer::get("computeGlobalSourceIndex").resume();           
+        algo->computeGlobalSourceIndex(elementPosition,
+                                       gridSource_,
+                                       tmpGridDestination_,
+                                       globaIndexWeightFromSrcToDst);
+                                     
+        CTimer::get("computeGlobalSourceIndex").suspend();           
+        CTimer::get("computeTransformationMapping").resume();     
+        // Compute transformation of global indexes among grids
+        computeTransformationMapping(globaIndexWeightFromSrcToDst);
+        CTimer::get("computeTransformationMapping").suspend(); 
+      } 
+      if (1 < nbNormalAlgos_)
+      {
+        // Now grid destination becomes grid source in a new transformation
+        if (nbAgloTransformation != (nbNormalAlgos_-1)) setUpGridSource(elementPositionInGrid);
+      }
+      ++nbAgloTransformation;
+    }
+  }
+}
+CATCH
+
+/*!
+  Compute exchange index between grid source and grid destination
+  \param [in] globalIndexWeightFromDestToSource global index mapping between grid destination and grid source
+*/
+void CGridTransformation::computeTransformationMapping(const SourceDestinationIndexMap& globaIndexWeightFromSrcToDst)
+TRY
+{
+  CContext* context = CContext::getCurrent();
+  CContextClient* client = context->client;
+  int nbClient = client->clientSize;
+  int clientRank = client->clientRank;
+
+  // Recalculate the distribution of grid destination
+  CDistributionClient distributionClientDest(client->clientRank, tmpGridDestination_);
+  CDistributionClient::GlobalLocalDataMap& globalLocalIndexGridDestSendToServer = distributionClientDest.getGlobalLocalDataSendToServer();
+
+  // Update number of local index on each transformation
+  size_t nbLocalIndex = globalLocalIndexGridDestSendToServer.size();
+  nbLocalIndexOnGridDest_.push_back(nbLocalIndex);
+//  localMaskOnGridDest_.push_back(std::vector<bool>());
+//  std::vector<bool>& tmpMask = localMaskOnGridDest_.back();
+//  tmpMask.resize(nbLocalIndex,false);
+
+  // Find out number of index sent from grid source and number of index received on grid destination
+  SourceDestinationIndexMap::const_iterator itbIndex = globaIndexWeightFromSrcToDst.begin(),
+                                            iteIndex = globaIndexWeightFromSrcToDst.end(), itIndex;
+  typedef std::unordered_map<size_t, std::vector<std::pair<size_t,double> > > SendIndexMap;
+  std::map<int,int> sendRankSizeMap,recvRankSizeMap;
+  int connectedClient = globaIndexWeightFromSrcToDst.size();
+  int* recvCount=new int[nbClient];
+  int* displ=new int[nbClient];
+  int* sendRankBuff=new int[connectedClient];
+  int* sendSizeBuff=new int[connectedClient];
+  int n = 0;
+  for (itIndex = itbIndex; itIndex != iteIndex; ++itIndex, ++n)
+  {
+    sendRankBuff[n] = itIndex->first;
+    const SendIndexMap& sendIndexMap = itIndex->second;
+    SendIndexMap::const_iterator itbSend = sendIndexMap.begin(), iteSend = sendIndexMap.end(), itSend;
+    int sendSize = 0;
+    for (itSend = itbSend; itSend != iteSend; ++itSend)
+    {
+      sendSize += itSend->second.size();
+    }
+    sendSizeBuff[n] = sendSize;
+    sendRankSizeMap[itIndex->first] = sendSize;
+  }
+  MPI_Allgather(&connectedClient,1,MPI_INT,recvCount,1,MPI_INT,client->intraComm);
+
+  displ[0]=0 ;
+  for(int n=1;n<nbClient;n++) displ[n]=displ[n-1]+recvCount[n-1];
+  int recvSize=displ[nbClient-1]+recvCount[nbClient-1];
+  int* recvRankBuff=new int[recvSize];
+  int* recvSizeBuff=new int[recvSize];
+  MPI_Allgatherv(sendRankBuff,connectedClient,MPI_INT,recvRankBuff,recvCount,displ,MPI_INT,client->intraComm);
+  MPI_Allgatherv(sendSizeBuff,connectedClient,MPI_INT,recvSizeBuff,recvCount,displ,MPI_INT,client->intraComm);
+  for (int i = 0; i < nbClient; ++i)
+  {
+    int currentPos = displ[i];
+    for (int j = 0; j < recvCount[i]; ++j)
+      if (recvRankBuff[currentPos+j] == clientRank)
+      {
+        recvRankSizeMap[i] = recvSizeBuff[currentPos+j];
+      }
+  }
+
+  // Sending global index of grid source to corresponding process as well as the corresponding mask
+  std::vector<MPI_Request> requests;
+  std::vector<MPI_Status> status;
+  std::unordered_map<int, unsigned char* > recvMaskDst;
+  std::unordered_map<int, unsigned long* > recvGlobalIndexSrc;
+  for (std::map<int,int>::const_iterator itRecv = recvRankSizeMap.begin(); itRecv != recvRankSizeMap.end(); ++itRecv)
+  {
+    int recvRank = itRecv->first;
+    int recvSize = itRecv->second;
+    recvMaskDst[recvRank] = new unsigned char [recvSize];
+    recvGlobalIndexSrc[recvRank] = new unsigned long [recvSize];
+
+    requests.push_back(MPI_Request());
+    MPI_Irecv(recvGlobalIndexSrc[recvRank], recvSize, MPI_UNSIGNED_LONG, recvRank, 46, client->intraComm, &requests.back());
+    requests.push_back(MPI_Request());
+    MPI_Irecv(recvMaskDst[recvRank], recvSize, MPI_UNSIGNED_CHAR, recvRank, 47, client->intraComm, &requests.back());
+  }
+
+  std::unordered_map<int, CArray<size_t,1> > globalIndexDst;
+  std::unordered_map<int, CArray<double,1> > weightDst;
+  std::unordered_map<int, unsigned char* > sendMaskDst;
+  std::unordered_map<int, unsigned long* > sendGlobalIndexSrc;
+  for (itIndex = itbIndex; itIndex != iteIndex; ++itIndex)
+  {
+    int sendRank = itIndex->first;
+    int sendSize = sendRankSizeMap[sendRank];
+    const SendIndexMap& sendIndexMap = itIndex->second;
+    SendIndexMap::const_iterator itbSend = sendIndexMap.begin(), iteSend = sendIndexMap.end(), itSend;
+    globalIndexDst[sendRank].resize(sendSize);
+    weightDst[sendRank].resize(sendSize);
+    sendMaskDst[sendRank] = new unsigned char [sendSize];
+    sendGlobalIndexSrc[sendRank] = new unsigned long [sendSize];
+    int countIndex = 0;
+    for (itSend = itbSend; itSend != iteSend; ++itSend)
+    {
+      const std::vector<std::pair<size_t,double> >& dstWeight = itSend->second;
+      for (int idx = 0; idx < dstWeight.size(); ++idx)
+      {
+        globalIndexDst[sendRank](countIndex) = dstWeight[idx].first;
+        weightDst[sendRank](countIndex) = dstWeight[idx].second;
+        if (0 < globalLocalIndexGridDestSendToServer.count(dstWeight[idx].first))
+          sendMaskDst[sendRank][countIndex] = 1;
+        else
+          sendMaskDst[sendRank][countIndex] = 0;
+        sendGlobalIndexSrc[sendRank][countIndex] = itSend->first;
+        ++countIndex;
+      }
+    }
+
+    // Send global index source and mask
+    requests.push_back(MPI_Request());
+    MPI_Isend(sendGlobalIndexSrc[sendRank], sendSize, MPI_UNSIGNED_LONG, sendRank, 46, client->intraComm, &requests.back());
+    requests.push_back(MPI_Request());
+    MPI_Isend(sendMaskDst[sendRank], sendSize, MPI_UNSIGNED_CHAR, sendRank, 47, client->intraComm, &requests.back());
+  }
+
+  status.resize(requests.size());
+  MPI_Waitall(requests.size(), &requests[0], &status[0]);
+
+  // Okie, now use the mask to identify which index source we need to send, then also signal the destination which masked index we will return
+  std::vector<MPI_Request>().swap(requests);
+  std::vector<MPI_Status>().swap(status);
+  // Okie, on destination side, we will wait for information of masked index of source
+  for (std::map<int,int>::const_iterator itSend = sendRankSizeMap.begin(); itSend != sendRankSizeMap.end(); ++itSend)
+  {
+    int recvRank = itSend->first;
+    int recvSize = itSend->second;
+
+    requests.push_back(MPI_Request());
+    MPI_Irecv(sendMaskDst[recvRank], recvSize, MPI_UNSIGNED_CHAR, recvRank, 48, client->intraComm, &requests.back());
+  }
+
+  // Ok, now we fill in local index of grid source (we even count for masked index)
+  CDistributionClient distributionClientSrc(client->clientRank, gridSource_);
+  CDistributionClient::GlobalLocalDataMap& globalLocalIndexGridSrcSendToServer = distributionClientSrc.getGlobalLocalDataSendToServer();
+  localIndexToSendFromGridSource_.push_back(SendingIndexGridSourceMap());
+  SendingIndexGridSourceMap& tmpSend = localIndexToSendFromGridSource_.back();
+  for (std::map<int,int>::const_iterator itRecv = recvRankSizeMap.begin(); itRecv != recvRankSizeMap.end(); ++itRecv)
+  {
+    int recvRank = itRecv->first;
+    int recvSize = itRecv->second;
+    unsigned char* recvMask = recvMaskDst[recvRank];
+    unsigned long* recvIndexSrc = recvGlobalIndexSrc[recvRank];
+    int realSendSize = 0;
+    for (int idx = 0; idx < recvSize; ++idx)
+    {
+      if (0 != (*(recvMask+idx))) // OKie, now we have a demand from non-masked index destination
+        if (0 < globalLocalIndexGridSrcSendToServer.count(*(recvIndexSrc+idx))) // check whether index source is masked
+         ++realSendSize;
+        else // inform the destination that this index is masked
+         *(recvMask+idx) = 0;
+    }
+
+    tmpSend[recvRank].resize(realSendSize);
+    realSendSize = 0;
+    for (int idx = 0; idx < recvSize; ++idx)
+    {
+      if (0 != (*(recvMask+idx))) // OKie, now we have a demand from non-masked index destination
+      {
+        tmpSend[recvRank](realSendSize) = globalLocalIndexGridSrcSendToServer[*(recvIndexSrc+idx)];
+         ++realSendSize;
+      }
+    }
+
+    // Okie, now inform the destination which source index are masked
+    requests.push_back(MPI_Request());
+    MPI_Isend(recvMaskDst[recvRank], recvSize, MPI_UNSIGNED_CHAR, recvRank, 48, client->intraComm, &requests.back());
+  }
+  status.resize(requests.size());
+  MPI_Waitall(requests.size(), &requests[0], &status[0]);
+
+  // Cool, now we can fill in local index of grid destination (counted for masked index)
+  localIndexToReceiveOnGridDest_.push_back(RecvIndexGridDestinationMap());
+  RecvIndexGridDestinationMap& recvTmp = localIndexToReceiveOnGridDest_.back();
+  for (std::map<int,int>::const_iterator itSend = sendRankSizeMap.begin(); itSend != sendRankSizeMap.end(); ++itSend)
+  {
+    int recvRank = itSend->first;
+    int recvSize = itSend->second;
+    unsigned char* recvMask = sendMaskDst[recvRank];
+
+    CArray<size_t,1>& recvIndexDst = globalIndexDst[recvRank];
+    CArray<double,1>& recvWeightDst = weightDst[recvRank];
+    int realRecvSize = 0;
+    for (int idx = 0; idx < recvSize; ++idx)
+    {
+      if (0 != *(recvMask+idx)) // OKie, now we have a non-masked index destination
+         ++realRecvSize;
+    }
+
+    int localIndexDst;
+    recvTmp[recvRank].resize(realRecvSize);
+    realRecvSize = 0;
+    for (int idx = 0; idx < recvSize; ++idx)
+    {
+      if (0 != *(recvMask+idx)) // OKie, now we have a demand from non-masked index destination
+      {
+        recvTmp[recvRank][realRecvSize].first = globalLocalIndexGridDestSendToServer[recvIndexDst(idx)];
+        recvTmp[recvRank][realRecvSize].second = recvWeightDst(idx);
+         ++realRecvSize;
+      }
+    }
+  }
+
+  delete [] recvCount;
+  delete [] displ;
+  delete [] sendRankBuff;
+  delete [] recvRankBuff;
+  delete [] sendSizeBuff;
+  delete [] recvSizeBuff;
+
+  std::unordered_map<int, unsigned char* >::const_iterator itChar;
+  for (itChar = sendMaskDst.begin(); itChar != sendMaskDst.end(); ++itChar)
+    delete [] itChar->second;
+  for (itChar = recvMaskDst.begin(); itChar != recvMaskDst.end(); ++itChar)
+    delete [] itChar->second;
+  std::unordered_map<int, unsigned long* >::const_iterator itLong;
+  for (itLong = sendGlobalIndexSrc.begin(); itLong != sendGlobalIndexSrc.end(); ++itLong)
+    delete [] itLong->second;
+  for (itLong = recvGlobalIndexSrc.begin(); itLong != recvGlobalIndexSrc.end(); ++itLong)
+    delete [] itLong->second;
+
+}
+CATCH
+
+/*!
+  Local index of data which need sending from the grid source
+  \return local index of data
+*/
+const std::list<CGridTransformation::SendingIndexGridSourceMap>& CGridTransformation::getLocalIndexToSendFromGridSource() const
+TRY
+{
+  return localIndexToSendFromGridSource_;
+}
+CATCH
+
+/*!
+  Local index of data which will be received on the grid destination
+  \return local index of data
+*/
+const std::list<CGridTransformation::RecvIndexGridDestinationMap>& CGridTransformation::getLocalIndexToReceiveOnGridDest() const
+TRY
+{
+  return localIndexToReceiveOnGridDest_;
+}
+CATCH
+
+/*!
+ Number of index will be received on the grid destination
+  \return number of index of data
+*/
+const std::list<size_t>& CGridTransformation::getNbLocalIndexToReceiveOnGridDest() const
+TRY
+{
+  return nbLocalIndexOnGridDest_;
+}
+CATCH
+
+}
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/transformation/grid_transformation.hpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/transformation/grid_transformation.hpp	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/transformation/grid_transformation.hpp	(revision 1749)
@@ -0,0 +1,91 @@
+/*!
+   \file grid_transformation.hpp
+   \author Ha NGUYEN
+   \since 14 May 2015
+   \date 26 Aug 2015
+
+   \brief Interface for all transformations.
+ */
+#ifndef __XIOS_GRID_TRANSFORMATION_HPP__
+#define __XIOS_GRID_TRANSFORMATION_HPP__
+
+#include <map>
+#include <vector>
+#include "generic_algorithm_transformation.hpp"
+#include "transformation_enum.hpp"
+#include "duration.hpp"
+#include "grid_transformation_selector.hpp"
+
+namespace xios {
+
+class CGrid;
+
+/*!
+  \class CGridTransformation
+  This class is an interface for all transformations to interact with the rest of XIOS.
+The class, firstly, tries to get all information relating to requested transformations by retrieving directly from grid.
+Secondly, with all these information, all necessary transformations will be created by generic class \class CGenericAlgorithmTransformation.
+Then this class accomplishes the transformations by exchanging information among clients (e.g: some index need retrieving index from other clients),
+For each transformation, a new temporary grid source is created.
+For a consequential transformations (e.g: inversing -> zoom -> inversing -> ...),
+the grid destination of current transformation will be grid source of the next transformation
+*/
+class CGridTransformation : public CGridTransformationSelector
+{
+public:
+  typedef std::map<int, CArray<int,1> > SendingIndexGridSourceMap;
+  typedef std::map<int,std::vector<std::pair<int,double> > > RecvIndexGridDestinationMap;
+  typedef CGenericAlgorithmTransformation::SourceDestinationIndexMap SourceDestinationIndexMap;
+  typedef CGenericAlgorithmTransformation::AlgoTransType AlgoTransType;
+
+public:
+  /** Default constructor */
+  CGridTransformation(CGrid* destination, CGrid* source);
+  ~CGridTransformation();
+
+  void computeAll(const std::vector<CArray<double,1>* >& dataAuxInput=std::vector<CArray<double,1>* >(), Time timeStamp = 0);
+
+  const std::list<SendingIndexGridSourceMap>& getLocalIndexToSendFromGridSource() const;
+  const std::list<RecvIndexGridDestinationMap>& getLocalIndexToReceiveOnGridDest() const;
+  const std::list<size_t>& getNbLocalIndexToReceiveOnGridDest() const;
+
+  CGrid* getGridSource() { return originalGridSource_; }
+  CGrid* getGridDestination() { return gridDestination_; }
+
+protected:
+  void computeTransformation();
+
+  virtual void selectScalarAlgo(int elementPositionInGrid, ETranformationType transType, int transformationOrder);
+  virtual void selectAxisAlgo(int elementPositionInGrid, ETranformationType transType, int transformationOrder);
+  virtual void selectDomainAlgo(int elementPositionInGrid, ETranformationType transType, int transformationOrder);
+
+  void setUpGridSource(int elementPositionInGrid);
+  void setUpGridDestination(int elementPositionInGrid, ETranformationType);
+  void computeTransformationMapping(const SourceDestinationIndexMap& globalIndexWeightFromSrcToDest);
+  std::map<int,std::pair<int,int> > getElementPosition(CGrid* grid);
+
+protected:
+  //! The grid source of the first transformation (original grid source)
+  CGrid* tmpGridDestination_;
+  CGrid* originalGridSource_;
+  std::vector<CGrid*> tempGridSrcs_, tempGridDests_;
+
+protected:
+  //! Mapping of (grid) global index representing transformation.
+  std::map<size_t, std::set<size_t> > globaIndexMapFromDestToSource_;
+
+  //! Local index of data to send from grid source
+  std::list<SendingIndexGridSourceMap> localIndexToSendFromGridSource_;
+
+  //! Local index of data to receive on grid destination
+  std::list<RecvIndexGridDestinationMap> localIndexToReceiveOnGridDest_;
+
+  //! Number of local index of data to receive on grid destination
+  std::list<size_t> nbLocalIndexOnGridDest_;
+
+  bool dynamicalTransformation_;
+  std::set<Time> timeStamp_; //! Time stamps for auxillary inputs
+};
+
+}
+#endif // __XIOS_GRID_TRANSFORMATION_HPP__
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/transformation/grid_transformation_factory_decl.cpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/transformation/grid_transformation_factory_decl.cpp	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/transformation/grid_transformation_factory_decl.cpp	(revision 1749)
@@ -0,0 +1,23 @@
+/*!
+   \file grid_transformation.cpp
+   \author Ha NGUYEN
+   \since 14 May 2015
+   \date 02 Jul 2015
+
+   \brief Interface for all transformations.
+ */
+#include "grid_transformation_factory_impl.hpp"
+#include "scalar.hpp"
+#include "axis.hpp"
+#include "domain.hpp"
+
+namespace xios
+{
+
+template class CGridTransformationFactory<CScalar>;
+template class CGridTransformationFactory<CAxis>;
+template class CGridTransformationFactory<CDomain>;
+
+}
+
+
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/transformation/grid_transformation_factory_impl.hpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/transformation/grid_transformation_factory_impl.hpp	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/transformation/grid_transformation_factory_impl.hpp	(revision 1749)
@@ -0,0 +1,114 @@
+/*!
+   \file grid_transformation_factory_impl.hpp
+   \author Ha NGUYEN
+   \since 23 June 2016
+   \date 23 June 2016
+
+   \brief Helper class to create different transformations.
+ */
+#ifndef __XIOS_GRID_TRANSFORMATION_FACTORY_HPP__
+#define __XIOS_GRID_TRANSFORMATION_FACTORY_HPP__
+
+#include "xios_spl.hpp"
+#include "exception.hpp"
+#include "transformation.hpp"
+
+namespace xios {
+
+class CGrid;
+class CGenericAlgorithmTransformation;
+
+
+/*!
+  \class CGridTransformationFactory
+  This class is a helper class to chose a algorithm (transformation) from the alogrithm list of
+specific grid.
+*/
+template<typename T>
+class CGridTransformationFactory
+{
+public:
+  /** Default constructor */
+  CGridTransformationFactory() {}
+  virtual ~CGridTransformationFactory() {}
+
+  static CGenericAlgorithmTransformation* createTransformation(ETranformationType transType,
+                                                               CGrid* gridDst, CGrid* gridSrc,
+                                                               CTransformation<T>* transformation,
+                                                               int elementPositionInGrid,
+                                                               std::map<int, int>& elementPositionInGridSrc2ScalarPosition,
+                                                               std::map<int, int>& elementPositionInGridSrc2AxisPosition,
+                                                               std::map<int, int>& elementPositionInGridSrc2DomainPosition,
+                                                               std::map<int, int>& elementPositionInGridDst2ScalarPosition,
+                                                               std::map<int, int>& elementPositionInGridDst2AxisPosition,
+                                                               std::map<int, int>& elementPositionInGridDst2DomainPosition);
+
+public:
+  typedef CGenericAlgorithmTransformation* (*CreateTransformationCallBack)(CGrid* gridDst, CGrid* gridSrc,
+                                                                           CTransformation<T>* transformation,
+                                                                           int elementPositionInGrid,
+                                                                           std::map<int, int>& elementPositionInGridSrc2ScalarPosition,
+                                                                           std::map<int, int>& elementPositionInGridSrc2AxisPosition,
+                                                                           std::map<int, int>& elementPositionInGridSrc2DomainPosition,
+                                                                           std::map<int, int>& elementPositionInGridDst2ScalarPosition,
+                                                                           std::map<int, int>& elementPositionInGridDst2AxisPosition,
+                                                                           std::map<int, int>& elementPositionInGridDst2DomainPosition);
+
+  typedef std::map<ETranformationType, CreateTransformationCallBack> CallBackMap;
+  static CallBackMap* transformationCreationCallBacks_;
+  static bool registerTransformation(ETranformationType transType, CreateTransformationCallBack createFn);
+  static bool unregisterTransformation(ETranformationType transType);
+  static bool initializeTransformation_;
+};
+
+template<typename T>
+typename CGridTransformationFactory<T>::CallBackMap* CGridTransformationFactory<T>::transformationCreationCallBacks_ = 0;
+template<typename T>
+bool CGridTransformationFactory<T>::initializeTransformation_ = false;
+
+template<typename T>
+CGenericAlgorithmTransformation* CGridTransformationFactory<T>::createTransformation(ETranformationType transType,
+                                                                               CGrid* gridDst, CGrid* gridSrc,
+                                                                               CTransformation<T>* transformation,
+                                                                               int elementPositionInGrid,
+                                                                               std::map<int, int>& elementPositionInGridSrc2ScalarPosition,
+                                                                               std::map<int, int>& elementPositionInGridSrc2AxisPosition,
+                                                                               std::map<int, int>& elementPositionInGridSrc2DomainPosition,
+                                                                               std::map<int, int>& elementPositionInGridDst2ScalarPosition,
+                                                                               std::map<int, int>& elementPositionInGridDst2AxisPosition,
+                                                                               std::map<int, int>& elementPositionInGridDst2DomainPosition)
+{
+  typename CallBackMap::const_iterator it = (*transformationCreationCallBacks_).find(transType);
+  if ((*transformationCreationCallBacks_).end() == it)
+  {
+     ERROR("CGridTransformationFactory::createTransformation(ETranformationType transType)",
+           << "Transformation type " << transType
+           << "doesn't exist. Please define.");
+  }
+  return (it->second)(gridDst, gridSrc, transformation, elementPositionInGrid,
+                      elementPositionInGridSrc2ScalarPosition,
+                      elementPositionInGridSrc2AxisPosition,
+                      elementPositionInGridSrc2DomainPosition,
+                      elementPositionInGridDst2ScalarPosition,
+                      elementPositionInGridDst2AxisPosition,
+                      elementPositionInGridDst2DomainPosition);
+}
+
+template<typename T>
+bool CGridTransformationFactory<T>::registerTransformation(ETranformationType transType, CreateTransformationCallBack createFn)
+{
+  if (0 == transformationCreationCallBacks_)
+    transformationCreationCallBacks_ = new CallBackMap();
+
+  return (*transformationCreationCallBacks_).insert(make_pair(transType, createFn)).second;
+}
+
+template<typename T>
+bool CGridTransformationFactory<T>::unregisterTransformation(ETranformationType transType)
+{
+  return (1 == (*transformationCreationCallBacks_).erase(transType));
+}
+
+
+}
+#endif // __XIOS_GRID_TRANSFORMATION_FACTORY_HPP__
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/transformation/grid_transformation_selector.cpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/transformation/grid_transformation_selector.cpp	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/transformation/grid_transformation_selector.cpp	(revision 1749)
@@ -0,0 +1,375 @@
+/*!
+   \file grid_transformation.cpp
+   \author Ha NGUYEN
+   \since 14 May 2015
+   \date 02 Jul 2015
+
+   \brief Interface for all transformations.
+ */
+#include "grid_transformation_selector.hpp"
+#include "grid.hpp"
+#include "algo_types.hpp"
+
+namespace xios {
+
+/*!
+  Register transformation to the framework
+*/
+void CGridTransformationSelector::registerTransformations()
+{
+  //! Scalar
+  CScalarAlgorithmReduceAxis::registerTrans();
+  CScalarAlgorithmExtractAxis::registerTrans();
+  CScalarAlgorithmReduceDomain::registerTrans();
+  CScalarAlgorithmReduceScalar::registerTrans();
+
+  //! Axis
+  CAxisAlgorithmZoom::registerTrans();
+  CAxisAlgorithmExtractDomain::registerTrans();
+  CAxisAlgorithmInterpolate::registerTrans();
+  CAxisAlgorithmExtract::registerTrans();
+  CAxisAlgorithmInverse::registerTrans();
+  CAxisAlgorithmReduceDomain::registerTrans();
+  CAxisAlgorithmReduceAxis::registerTrans();
+  CAxisAlgorithmTemporalSplitting::registerTrans();
+  CAxisAlgorithmDuplicateScalar::registerTrans();
+
+  //! Domain
+  CDomainAlgorithmComputeConnectivity::registerTrans();
+  CDomainAlgorithmInterpolate::registerTrans();
+  CDomainAlgorithmZoom::registerTrans();
+  CDomainAlgorithmExpand::registerTrans();
+  CDomainAlgorithmReorder::registerTrans();
+  CDomainAlgorithmExtract::registerTrans();
+}
+
+CGridTransformationSelector::CGridTransformationSelector(CGrid* destination, CGrid* source, TransformationType type)
+ : gridSource_(source), gridDestination_(destination), isSameGrid_(false),
+  listAlgos_(), algoTypes_(), nbNormalAlgos_(0), nbSpecialAlgos_(0), auxInputs_()
+TRY
+{
+  if (0 == source)
+  {  gridSource_ = gridDestination_; }
+  if (gridSource_ == gridDestination_) isSameGrid_ = true;
+
+  //Verify the compatibity between two grids
+  int numElement = gridDestination_->axis_domain_order.numElements();
+  if (numElement != gridSource_->axis_domain_order.numElements())
+    ERROR("CGridTransformationSelector::CGridTransformationSelector(CGrid* destination, CGrid* source)",
+       << "Two grids have different number of elements"
+       << "Number of elements of grid source " <<gridSource_->getId() << " is " << gridSource_->axis_domain_order.numElements()  << std::endl
+       << "Number of elements of grid destination " <<gridDestination_->getId() << " is " << numElement);
+  registerTransformations();
+  initializeTransformations(type);
+}
+CATCH
+
+/*!
+  Initialize the mapping between the first grid source and the original one
+  In a series of transformation, for each step, there is a need to "create" a new grid that plays a role of "temporary" source.
+Because at the end of the series, we need to know about the index mapping between the final grid destination and original grid source,
+for each transformation, we need to make sure that the current "temporary source" maps its global index correctly to the original one.
+*/
+void CGridTransformationSelector::initializeTransformations(TransformationType type)
+TRY
+{
+  // Initialize algorithms
+  initializeAlgorithms();
+  ListAlgoType::iterator itb = listAlgos_.begin(),
+                         ite = listAlgos_.end(), it;
+
+  for (it = itb; it != ite; ++it)
+  {
+    ETranformationType transType = (it->second).first;
+    if (!isSpecialTransformation(transType))
+    {
+      ++nbNormalAlgos_;
+      if (special == type)
+      {
+        it = listAlgos_.erase(it);
+        --it;
+      }
+    }
+    else
+    {
+      ++nbSpecialAlgos_;
+      if (normal == type)
+      {
+        it = listAlgos_.erase(it);
+        --it;
+      }
+    }
+
+  }
+}
+CATCH
+
+CGridTransformationSelector::~CGridTransformationSelector()
+TRY
+{
+  std::vector<CGenericAlgorithmTransformation*>::const_iterator itb = algoTransformation_.begin(), it,
+                                                                ite = algoTransformation_.end();
+  for (it = itb; it != ite; ++it) delete (*it);
+}
+CATCH
+
+/*!
+  Update position of elements in grid source and grid destination as well as their positions in element list
+*/
+void CGridTransformationSelector::updateElementPosition()
+TRY
+{
+  int idxScalar = 0, idxAxis = 0, idxDomain = 0;
+  CArray<int,1> axisDomainOrderDst = gridDestination_->axis_domain_order;
+  std::map<int, int>().swap(elementPositionInGridDst2DomainPosition_);
+  std::map<int, int>().swap(elementPositionInGridDst2AxisPosition_);
+  std::map<int, int>().swap(elementPositionInGridDst2ScalarPosition_);
+  for (int i = 0; i < axisDomainOrderDst.numElements(); ++i)
+  {
+    int dimElement = axisDomainOrderDst(i);
+    if (2 == dimElement)
+    {
+      elementPositionInGridDst2DomainPosition_[i] = idxDomain;
+      ++idxDomain;
+    }
+    else if (1 == dimElement)
+    {
+      elementPositionInGridDst2AxisPosition_[i] = idxAxis;
+      ++idxAxis;
+    }
+    else
+    {
+      elementPositionInGridDst2ScalarPosition_[i] = idxScalar;
+      ++idxScalar;
+    }
+  }
+
+  idxScalar = idxAxis = idxDomain = 0;
+  CArray<int,1> axisDomainOrderSrc = gridSource_->axis_domain_order;
+  std::map<int, int>().swap(elementPositionInGridSrc2DomainPosition_);
+  std::map<int, int>().swap(elementPositionInGridSrc2AxisPosition_);
+  std::map<int, int>().swap(elementPositionInGridSrc2ScalarPosition_);
+  for (int i = 0; i < axisDomainOrderSrc.numElements(); ++i)
+  {
+    int dimElement = axisDomainOrderSrc(i);
+    if (2 == dimElement)
+    {
+      elementPositionInGridSrc2DomainPosition_[i] = idxDomain;
+      ++idxDomain;
+    }
+    else if (1 == dimElement)
+    {
+      elementPositionInGridSrc2AxisPosition_[i] = idxAxis;
+      ++idxAxis;
+    }
+    else
+    {
+      elementPositionInGridSrc2ScalarPosition_[i] = idxScalar;
+      ++idxScalar;
+    }
+  }
+}
+CATCH
+
+/*!
+  Initialize the algorithms (transformations)
+*/
+void CGridTransformationSelector::initializeAlgorithms()
+TRY
+{
+  updateElementPosition();
+  CArray<int,1> axisDomainOrderDst = gridDestination_->axis_domain_order;
+  for (int i = 0; i < axisDomainOrderDst.numElements(); ++i)
+  {
+    int dimElement = axisDomainOrderDst(i);
+    if (2 == dimElement)
+    {
+      initializeDomainAlgorithms(i);
+    }
+    else if (1 == dimElement)
+    {
+      initializeAxisAlgorithms(i);
+    }
+    else
+    {
+      initializeScalarAlgorithms(i);
+    }
+  }
+}
+CATCH
+
+/*!
+  Initialize the algorithms corresponding to transformation info contained in each scalar.
+If an scalar has transformations, these transformations will be represented in form of vector of CTransformation pointers
+In general, each scalar can have several transformations performed on itself. However, should they be done seperately or combinely (of course in order)?
+For now, one approach is to do these combinely but maybe this needs changing.
+\param [in] axisPositionInGrid position of an axis in grid. (for example: a grid with one domain and one scalar, position of domain is 0, position of axis is 1)
+*/
+void CGridTransformationSelector::initializeScalarAlgorithms(int scalarPositionInGrid)
+TRY
+{
+  std::vector<CScalar*> scalarListDestP = gridDestination_->getScalars();
+  std::vector<CScalar*> scalarListSrcP = gridSource_->getScalars();
+  if (!scalarListDestP.empty())
+  {
+    int scalarDstPos = -1, scalarSrcPos = -1;
+    if (0 < elementPositionInGridDst2ScalarPosition_.count(scalarPositionInGrid))
+      scalarDstPos = elementPositionInGridDst2ScalarPosition_[scalarPositionInGrid];
+    if (0 < elementPositionInGridSrc2ScalarPosition_.count(scalarPositionInGrid))
+      scalarSrcPos = elementPositionInGridSrc2ScalarPosition_[scalarPositionInGrid];
+
+    // If source and destination grid share the same scalar
+    if ((-1 != scalarDstPos) && (-1 != scalarSrcPos)  && !isSameGrid_ &&
+        ((scalarListDestP[scalarDstPos] == scalarListSrcP[scalarSrcPos]) ||
+         (scalarListDestP[scalarDstPos]->isEqual(scalarListSrcP[scalarSrcPos])))) return;
+
+    if (scalarListDestP[scalarDstPos]->hasTransformation())
+    {
+      CScalar::TransMapTypes trans = scalarListDestP[scalarDstPos]->getAllTransformations();
+      CScalar::TransMapTypes::const_iterator itb = trans.begin(), it,
+                                           ite = trans.end();
+      int transformationOrder = 0;
+      for (it = itb; it != ite; ++it)
+      {
+        listAlgos_.push_back(std::make_pair(scalarPositionInGrid, std::make_pair(it->first, std::make_pair(transformationOrder,0))));        
+        ++transformationOrder;
+        std::vector<StdString> auxInput = (it->second)->checkAuxInputs();
+        for (int idx = 0; idx < auxInput.size(); ++idx) auxInputs_.push_back(auxInput[idx]);
+      }
+    }
+  }
+}
+CATCH
+
+/*!
+  Initialize the algorithms corresponding to transformation info contained in each axis.
+If an axis has transformations, these transformations will be represented in form of vector of CTransformation pointers
+In general, each axis can have several transformations performed on itself. However, should they be done seperately or combinely (of course in order)?
+For now, one approach is to do these combinely but maybe this needs changing.
+\param [in] axisPositionInGrid position of an axis in grid. (for example: a grid with one domain and one axis, position of domain is 1, position of axis is 2)
+*/
+void CGridTransformationSelector::initializeAxisAlgorithms(int axisPositionInGrid)
+TRY
+{
+  std::vector<CAxis*> axisListDestP = gridDestination_->getAxis();
+  std::vector<CAxis*> axisListSrcP = gridSource_->getAxis();
+  if (!axisListDestP.empty())
+  {
+    int axisDstPos = -1, axisSrcPos = -1;
+    if (0 < elementPositionInGridDst2AxisPosition_.count(axisPositionInGrid))
+      axisDstPos = elementPositionInGridDst2AxisPosition_[axisPositionInGrid];
+    if (0 < elementPositionInGridSrc2AxisPosition_.count(axisPositionInGrid))
+      axisSrcPos = elementPositionInGridSrc2AxisPosition_[axisPositionInGrid];
+
+    // If source and destination grid share the same axis
+    if ((-1 != axisDstPos) && (-1 != axisSrcPos) && !isSameGrid_ &&
+        ((axisListDestP[axisDstPos] == axisListSrcP[axisSrcPos]) ||
+         (axisListDestP[axisDstPos]->isEqual(axisListSrcP[axisSrcPos]))) ) return;
+
+    if (axisListDestP[axisDstPos]->hasTransformation())
+    {
+      CAxis::TransMapTypes trans = axisListDestP[axisDstPos]->getAllTransformations();
+      CAxis::TransMapTypes::const_iterator itb = trans.begin(), it,
+                                           ite = trans.end();
+      int transformationOrder = 0;
+      for (it = itb; it != ite; ++it)
+      {
+        listAlgos_.push_back(std::make_pair(axisPositionInGrid, std::make_pair(it->first, std::make_pair(transformationOrder,1))));        
+        ++transformationOrder;
+        std::vector<StdString> auxInput = (it->second)->checkAuxInputs();
+        for (int idx = 0; idx < auxInput.size(); ++idx) auxInputs_.push_back(auxInput[idx]);
+      }
+    }
+  }
+}
+CATCH
+
+/*!
+  Initialize the algorithms corresponding to transformation info contained in each domain.
+If a domain has transformations, they will be represented in form of vector of CTransformation pointers
+In general, each domain can have several transformations performed on itself.
+\param [in] domPositionInGrid position of a domain in grid. (for example: a grid with one domain and one axis, position of domain is 1, position of axis is 2)
+*/
+void CGridTransformationSelector::initializeDomainAlgorithms(int domPositionInGrid)
+TRY
+{
+  std::vector<CDomain*> domListDestP = gridDestination_->getDomains();
+  std::vector<CDomain*> domListSrcP = gridSource_->getDomains();
+  if (!domListDestP.empty())
+  {
+    int domDstPos = -1, domSrcPos = -1;
+    if (0 < elementPositionInGridDst2DomainPosition_.count(domPositionInGrid))
+      domDstPos = elementPositionInGridDst2DomainPosition_[domPositionInGrid];
+    if (0 < elementPositionInGridSrc2DomainPosition_.count(domPositionInGrid))
+      domSrcPos = elementPositionInGridSrc2DomainPosition_[domPositionInGrid];
+
+    // If source and destination grid share the same domain
+    if ((-1 != domDstPos) && (-1 != domSrcPos) && !isSameGrid_ &&
+        ((domListDestP[domDstPos] == domListSrcP[domSrcPos]) ||
+         (domListDestP[domDstPos]->isEqual(domListSrcP[domSrcPos])))) return;
+
+    if (domListDestP[domDstPos]->hasTransformation())
+    {
+      CDomain::TransMapTypes trans = domListDestP[domDstPos]->getAllTransformations();
+      CDomain::TransMapTypes::const_iterator itb = trans.begin(), it,
+                                             ite = trans.end();
+      int transformationOrder = 0;
+      for (it = itb; it != ite; ++it)
+      {
+        listAlgos_.push_back(std::make_pair(domPositionInGrid, std::make_pair(it->first, std::make_pair(transformationOrder,2))));        
+        ++transformationOrder;
+        std::vector<StdString> auxInput = (it->second)->checkAuxInputs();
+        for (int idx = 0; idx < auxInput.size(); ++idx) auxInputs_.push_back(auxInput[idx]);
+      }
+    }
+  }
+}
+CATCH
+
+/*!
+  Select algorithm correspoding to its transformation type and its position in each element
+  \param [in] elementPositionInGrid position of element in grid. e.g: a grid has 1 domain and 1 axis, then position of domain is 1 (because it contains 2 basic elements)
+                                             and position of axis is 2
+  \param [in] transType transformation type, for now we have Zoom_axis, inverse_axis
+  \param [in] transformationOrder position of the transformation in an element (an element can have several transformation)
+  \param [in] algoType flag to specify type of algorithm (2 for domain, 1 for axis and 0 for scalar) 
+*/
+void CGridTransformationSelector::selectAlgo(int elementPositionInGrid, ETranformationType transType, int transformationOrder, int algoType)
+TRY
+{
+  updateElementPosition();
+  switch (algoType)
+  {
+  case 0:
+    selectScalarAlgo(elementPositionInGrid, transType, transformationOrder);
+    break;
+  case 1:
+    selectAxisAlgo(elementPositionInGrid, transType, transformationOrder);
+    break;
+  case 2:
+    selectDomainAlgo(elementPositionInGrid, transType, transformationOrder);
+    break;
+  default:
+    break;
+  }
+}
+CATCH
+
+bool CGridTransformationSelector::isSpecialTransformation(ETranformationType transType)
+TRY
+{
+  bool res = false;
+  switch (transType)
+  {
+    case TRANS_GENERATE_RECTILINEAR_DOMAIN:
+     res = true;
+     break;
+    default:
+     break;
+  }
+
+  return res;
+}
+CATCH
+
+}
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/transformation/grid_transformation_selector.hpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/transformation/grid_transformation_selector.hpp	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/transformation/grid_transformation_selector.hpp	(revision 1749)
@@ -0,0 +1,112 @@
+/*!
+   \file grid_transformation.hpp
+   \author Ha NGUYEN
+   \since 23 June 2016
+   \date 23 June 2016
+
+   \brief Helper class to select different transformations.
+ */
+#ifndef __XIOS_GRID_TRANSFORMATION_SELECTOR_HPP__
+#define __XIOS_GRID_TRANSFORMATION_SELECTOR_HPP__
+
+#include <map>
+#include <vector>
+#include "generic_algorithm_transformation.hpp"
+#include "transformation_enum.hpp"
+#include "duration.hpp"
+
+namespace xios {
+
+class CGrid;
+
+/*!
+  \class CGridTransformationSelector
+  This class is a helper class to chose a algorithm (transformation) from the algorithm list of
+specific grid.
+*/
+class CGridTransformationSelector
+{
+public:
+  // Stupid C++98, should be replaced with tuple.
+  // List of algorithm to process. Order of element in this list
+  // <Position of element in grid, <transformationType, <transformation order, alogrithm type> > >
+  typedef std::list<std::pair<int,std::pair<ETranformationType,std::pair<int,int> > > > ListAlgoType;
+protected:
+  enum AlgoType {
+    scalarType = 0, axisType = 1, domainType = 2
+  };
+
+protected:
+  enum TransformationType {
+    special = 0, normal = 1
+  };
+
+public:
+  /** Default constructor */
+  CGridTransformationSelector(CGrid* destination, CGrid* source, TransformationType type = normal);
+  virtual ~CGridTransformationSelector();
+
+  ListAlgoType getAlgoList() const { return listAlgos_; }
+  int getNbAlgo() { return nbNormalAlgos_; }
+  const std::vector<StdString>& getAuxInputs() const { return auxInputs_; }
+  const std::vector<CGenericAlgorithmTransformation*>& getAlgos() const { return algoTransformation_; }
+  const std::map<int, int> getElementPositionInGridSrc2AxisPosition() const { return elementPositionInGridSrc2AxisPosition_ ;}
+  const std::map<int, int> getElementPositionInGridSrc2DomainPosition() const { return elementPositionInGridSrc2DomainPosition_ ;}
+  const std::map<int, int> getElementPositionInGridSrc2ScalarPosition() const { return elementPositionInGridSrc2ScalarPosition_ ;}
+  const std::map<int, int> getElementPositionInGridDst2AxisPosition() const { return elementPositionInGridDst2AxisPosition_ ;}
+  const std::map<int, int> getElementPositionInGridDst2DomainPosition() const { return elementPositionInGridDst2DomainPosition_ ;}
+  const std::map<int, int> getElementPositionInGridDst2ScalarPosition() const { return elementPositionInGridDst2ScalarPosition_ ;}
+
+
+protected:
+  void updateElementPosition();
+  void initializeAlgorithms();
+  void initializeDomainAlgorithms(int domPositionInGrid);
+  void initializeAxisAlgorithms(int axisPositionInGrid);
+  void initializeScalarAlgorithms(int scalarPositionInGrid);
+  void initializeTransformations(TransformationType type);
+  void selectAlgo(int elementPositionInGrid, ETranformationType transType, int transformationOrder, int algo);
+  bool isSpecialTransformation(ETranformationType transType);
+  void registerTransformations();
+
+protected:
+  virtual void selectScalarAlgo(int elementPositionInGrid, ETranformationType transType, int transformationOrder) = 0;
+  virtual void selectAxisAlgo(int elementPositionInGrid, ETranformationType transType, int transformationOrder) = 0;
+  virtual void selectDomainAlgo(int elementPositionInGrid, ETranformationType transType, int transformationOrder) = 0;
+
+protected:
+  //! Grid source on transformation
+  CGrid* gridSource_;
+
+  //! Grid destination on transformation
+  CGrid* gridDestination_;
+
+  //! Grid source and grid destination it's the same
+  bool isSameGrid_;
+
+protected:
+  //! List of algorithm types and their order
+  ListAlgoType listAlgos_;
+
+  //! Number of normal algorithm
+  int nbNormalAlgos_;
+
+  //! Number of special algorithms (such as generate_rectilinear_grid)
+  int nbSpecialAlgos_;
+
+  // true if domain algorithm and false if axis algorithm (can be replaced by tuple with listAlgos_
+  std::vector<AlgoType> algoTypes_;
+
+  // Mapping between position of an element in grid and its transformation (if any)
+  std::vector<CGenericAlgorithmTransformation*> algoTransformation_;
+
+  //! Position of scalar, axis and domain in grid
+  std::map<int, int> elementPositionInGridSrc2AxisPosition_, elementPositionInGridSrc2DomainPosition_, elementPositionInGridSrc2ScalarPosition_;
+  std::map<int, int> elementPositionInGridDst2AxisPosition_, elementPositionInGridDst2DomainPosition_, elementPositionInGridDst2ScalarPosition_;
+
+  std::vector<StdString> auxInputs_;
+  std::set<Time> timeStamp_; //! Time stamps for auxillary inputs
+};
+
+}
+#endif // __XIOS_GRID_TRANSFORMATION_SELECTOR_HPP__
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/transformation/scalar_algorithm_extract_axis.cpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/transformation/scalar_algorithm_extract_axis.cpp	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/transformation/scalar_algorithm_extract_axis.cpp	(revision 1749)
@@ -0,0 +1,92 @@
+/*!
+   \file scalar_algorithm_extract_scalar.cpp
+   \author Ha NGUYEN
+   \since 23 June 2016
+   \date 23 June 2016
+
+   \brief Algorithm for extract an axis to a scalar
+ */
+#include "scalar_algorithm_extract_axis.hpp"
+#include "axis.hpp"
+#include "scalar.hpp"
+#include "extract_axis_to_scalar.hpp"
+#include "grid.hpp"
+#include "grid_transformation_factory_impl.hpp"
+
+#include "reduction.hpp"
+
+namespace xios {
+CGenericAlgorithmTransformation* CScalarAlgorithmExtractAxis::create(CGrid* gridDst, CGrid* gridSrc,
+                                                                     CTransformation<CScalar>* transformation,
+                                                                     int elementPositionInGrid,
+                                                                     std::map<int, int>& elementPositionInGridSrc2ScalarPosition,
+                                                                     std::map<int, int>& elementPositionInGridSrc2AxisPosition,
+                                                                     std::map<int, int>& elementPositionInGridSrc2DomainPosition,
+                                                                     std::map<int, int>& elementPositionInGridDst2ScalarPosition,
+                                                                     std::map<int, int>& elementPositionInGridDst2AxisPosition,
+                                                                     std::map<int, int>& elementPositionInGridDst2DomainPosition)
+TRY
+{
+  std::vector<CScalar*> scalarListDestP = gridDst->getScalars();
+  std::vector<CAxis*> axisListSrcP  = gridSrc->getAxis();
+
+  CExtractAxisToScalar* extractAxis = dynamic_cast<CExtractAxisToScalar*> (transformation);
+  int scalarDstIndex = elementPositionInGridDst2ScalarPosition[elementPositionInGrid];
+  int axisSrcIndex = elementPositionInGridSrc2AxisPosition[elementPositionInGrid];
+
+  return (new CScalarAlgorithmExtractAxis(scalarListDestP[scalarDstIndex], axisListSrcP[axisSrcIndex], extractAxis));
+}
+CATCH
+
+bool CScalarAlgorithmExtractAxis::registerTrans()
+TRY
+{
+  CGridTransformationFactory<CScalar>::registerTransformation(TRANS_EXTRACT_AXIS_TO_SCALAR, create);
+}
+CATCH
+
+CScalarAlgorithmExtractAxis::CScalarAlgorithmExtractAxis(CScalar* scalarDestination, CAxis* axisSource, CExtractAxisToScalar* algo)
+ : CScalarAlgorithmTransformation(scalarDestination, axisSource),
+   reduction_(0)
+TRY
+{
+  algo->checkValid(scalarDestination, axisSource);
+  StdString op = "extract";
+  pos_ = algo->position;
+  reduction_ = CReductionAlgorithm::createOperation(CReductionAlgorithm::ReductionOperations[op]);
+}
+CATCH
+
+void CScalarAlgorithmExtractAxis::apply(const std::vector<std::pair<int,double> >& localIndex,
+                                         const double* dataInput,
+                                         CArray<double,1>& dataOut,
+                                         std::vector<bool>& flagInitial,                     
+                                         bool ignoreMissingValue, bool firstPass)
+TRY
+{
+  reduction_->apply(localIndex, dataInput, dataOut, flagInitial, ignoreMissingValue, firstPass);
+}
+CATCH
+
+CScalarAlgorithmExtractAxis::~CScalarAlgorithmExtractAxis()
+TRY
+{
+  if (0 != reduction_) delete reduction_;
+}
+CATCH
+
+void CScalarAlgorithmExtractAxis::computeIndexSourceMapping_(const std::vector<CArray<double,1>* >& dataAuxInputs)
+TRY
+{
+  this->transformationMapping_.resize(1);
+  this->transformationWeight_.resize(1);
+
+  TransformationIndexMap& transMap = this->transformationMapping_[0];
+  TransformationWeightMap& transWeight = this->transformationWeight_[0];
+
+  transMap[0].push_back(pos_);
+  transWeight[0].push_back(1.0);
+}
+CATCH
+
+}
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/transformation/scalar_algorithm_extract_axis.hpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/transformation/scalar_algorithm_extract_axis.hpp	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/transformation/scalar_algorithm_extract_axis.hpp	(revision 1749)
@@ -0,0 +1,63 @@
+/*!
+   \file scalar_algorithm_extract_scalar.hpp
+   \author Ha NGUYEN
+   \since 23 June 2016
+   \date 23 June 2016
+
+   \brief Algorithm for extract an axis to a scalar
+ */
+#ifndef __XIOS_SCALAR_ALGORITHM_EXTRACT_AXIS_HPP__
+#define __XIOS_SCALAR_ALGORITHM_EXTRACT_AXIS_HPP__
+
+#include "scalar_algorithm_transformation.hpp"
+#include "transformation.hpp"
+
+namespace xios {
+
+class CScalar;
+class CAxis;
+class CExtractAxisToScalar;
+class CReductionAlgorithm;
+
+/*!
+  \class CScalarAlgorithmExtractAxis
+  Extract a scalar from an axis
+*/
+class CScalarAlgorithmExtractAxis : public CScalarAlgorithmTransformation
+{
+public:
+  CScalarAlgorithmExtractAxis(CScalar* scalarDestination, CAxis* axisSource, CExtractAxisToScalar* algo);
+
+  virtual void apply(const std::vector<std::pair<int,double> >& localIndex,
+                     const double* dataInput,
+                     CArray<double,1>& dataOut,
+                     std::vector<bool>& flagInitial,                     
+                     bool ignoreMissingValue, bool firstPass);
+
+  virtual ~CScalarAlgorithmExtractAxis();
+
+  static bool registerTrans();
+
+protected:
+  int pos_;
+
+protected:
+  void computeIndexSourceMapping_(const std::vector<CArray<double,1>* >& dataAuxInputs);
+
+protected:
+  CReductionAlgorithm* reduction_;
+
+private:
+  static CGenericAlgorithmTransformation* create(CGrid* gridDst, CGrid* gridSrc,
+                                                CTransformation<CScalar>* transformation,
+                                                int elementPositionInGrid,
+                                                std::map<int, int>& elementPositionInGridSrc2ScalarPosition,
+                                                std::map<int, int>& elementPositionInGridSrc2AxisPosition,
+                                                std::map<int, int>& elementPositionInGridSrc2DomainPosition,
+                                                std::map<int, int>& elementPositionInGridDst2ScalarPosition,
+                                                std::map<int, int>& elementPositionInGridDst2AxisPosition,
+                                                std::map<int, int>& elementPositionInGridDst2DomainPosition);
+};
+
+}
+#endif // __XIOS_SCALAR_ALGORITHM_EXTRACT_AXIS_HPP__
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/transformation/scalar_algorithm_reduce_axis.cpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/transformation/scalar_algorithm_reduce_axis.cpp	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/transformation/scalar_algorithm_reduce_axis.cpp	(revision 1749)
@@ -0,0 +1,133 @@
+/*!
+   \file scalar_algorithm_reduce_scalar.cpp
+   \author Ha NGUYEN
+   \since 23 June 2016
+   \date 23 June 2016
+
+   \brief Algorithm for reduce an axis to a scalar
+ */
+#include "scalar_algorithm_reduce_axis.hpp"
+#include "axis.hpp"
+#include "scalar.hpp"
+#include "reduce_axis_to_scalar.hpp"
+#include "grid.hpp"
+#include "grid_transformation_factory_impl.hpp"
+#include "reduction.hpp"
+
+#include "reduction.hpp"
+
+namespace xios {
+CGenericAlgorithmTransformation* CScalarAlgorithmReduceAxis::create(CGrid* gridDst, CGrid* gridSrc,
+                                                                     CTransformation<CScalar>* transformation,
+                                                                     int elementPositionInGrid,
+                                                                     std::map<int, int>& elementPositionInGridSrc2ScalarPosition,
+                                                                     std::map<int, int>& elementPositionInGridSrc2AxisPosition,
+                                                                     std::map<int, int>& elementPositionInGridSrc2DomainPosition,
+                                                                     std::map<int, int>& elementPositionInGridDst2ScalarPosition,
+                                                                     std::map<int, int>& elementPositionInGridDst2AxisPosition,
+                                                                     std::map<int, int>& elementPositionInGridDst2DomainPosition)
+TRY
+{
+  std::vector<CScalar*> scalarListDestP = gridDst->getScalars();
+  std::vector<CAxis*> axisListSrcP  = gridSrc->getAxis();
+
+  CReduceAxisToScalar* reduceAxis = dynamic_cast<CReduceAxisToScalar*> (transformation);
+  int scalarDstIndex = elementPositionInGridDst2ScalarPosition[elementPositionInGrid];
+  int axisSrcIndex = elementPositionInGridSrc2AxisPosition[elementPositionInGrid];
+
+  return (new CScalarAlgorithmReduceAxis(scalarListDestP[scalarDstIndex], axisListSrcP[axisSrcIndex], reduceAxis));
+}
+CATCH
+
+bool CScalarAlgorithmReduceAxis::registerTrans()
+TRY
+{
+  CGridTransformationFactory<CScalar>::registerTransformation(TRANS_REDUCE_AXIS_TO_SCALAR, create);
+}
+CATCH
+
+CScalarAlgorithmReduceAxis::CScalarAlgorithmReduceAxis(CScalar* scalarDestination, CAxis* axisSource, CReduceAxisToScalar* algo)
+ : CScalarAlgorithmTransformation(scalarDestination, axisSource),
+   reduction_(0)
+TRY
+{
+  if (algo->operation.isEmpty())
+    ERROR("CScalarAlgorithmReduceAxis::CScalarAlgorithmReduceAxis(CAxis* axisDestination, CAxis* axisSource, CReduceAxisToScalar* algo)",
+           << "Operation must be defined."
+           << "Axis source " <<axisSource->getId() << std::endl
+           << "Scalar destination " << scalarDestination->getId());
+  StdString op;
+  switch (algo->operation)
+  {
+    case CReduceAxisToScalar::operation_attr::sum:
+      op = "sum";
+      break;
+    case CReduceAxisToScalar::operation_attr::min:
+      op = "min";
+      break;
+    case CReduceAxisToScalar::operation_attr::max:
+      op = "max";
+      break;
+    case CReduceAxisToScalar::operation_attr::average:
+      op = "average";
+      break;
+    default:
+        ERROR("CScalarAlgorithmReduceAxis::CScalarAlgorithmReduceAxis(CScalar* scalarDestination, CAxis* axisSource, CReduceAxisToScalar* algo)",
+         << "Operation is wrongly defined. Supported operations: sum, min, max, average." << std::endl
+         << "Domain source " <<axisSource->getId() << std::endl
+         << "Scalar destination " << scalarDestination->getId());
+
+  }
+  
+  if (CReductionAlgorithm::ReductionOperations.end() == CReductionAlgorithm::ReductionOperations.find(op))
+    ERROR("CScalarAlgorithmReduceAxis::CScalarAlgorithmReduceAxis(CAxis* axisDestination, CAxis* axisSource, CReduceAxisToScalar* algo)",
+       << "Operation '" << op << "' not found. Please make sure to use a supported one"
+       << "Axis source " <<axisSource->getId() << std::endl
+       << "Scalar destination " << scalarDestination->getId());
+
+  reduction_ = CReductionAlgorithm::createOperation(CReductionAlgorithm::ReductionOperations[op]);
+}
+CATCH
+
+void CScalarAlgorithmReduceAxis::apply(const std::vector<std::pair<int,double> >& localIndex, const double* dataInput, CArray<double,1>& dataOut,
+                                         std::vector<bool>& flagInitial, bool ignoreMissingValue, bool firstPass)
+TRY
+{
+  reduction_->apply(localIndex, dataInput, dataOut, flagInitial, ignoreMissingValue, firstPass);
+}
+CATCH
+
+void CScalarAlgorithmReduceAxis::updateData(CArray<double,1>& dataOut)
+TRY
+{
+  reduction_->updateData(dataOut);
+}
+CATCH
+
+CScalarAlgorithmReduceAxis::~CScalarAlgorithmReduceAxis()
+TRY
+{
+  if (0 != reduction_) delete reduction_;
+}
+CATCH
+
+void CScalarAlgorithmReduceAxis::computeIndexSourceMapping_(const std::vector<CArray<double,1>* >& dataAuxInputs)
+TRY
+{
+  this->transformationMapping_.resize(1);
+  this->transformationWeight_.resize(1);
+
+  TransformationIndexMap& transMap = this->transformationMapping_[0];
+  TransformationWeightMap& transWeight = this->transformationWeight_[0];
+
+  int globalIndexSize = axisSrc_-> n_glo;
+
+  for (int idx = 0; idx < globalIndexSize; ++idx)
+  {
+    transMap[0].push_back(idx);
+    transWeight[0].push_back(1.0);
+  }
+}
+CATCH
+
+}
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/transformation/scalar_algorithm_reduce_axis.hpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/transformation/scalar_algorithm_reduce_axis.hpp	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/transformation/scalar_algorithm_reduce_axis.hpp	(revision 1749)
@@ -0,0 +1,62 @@
+/*!
+   \file scalar_algorithm_reduce_scalar.hpp
+   \author Ha NGUYEN
+   \since 23 June 2016
+   \date 23 June 2016
+
+   \brief Algorithm for reduce an axis to a scalar
+ */
+#ifndef __XIOS_SCALAR_ALGORITHM_REDUCE_AXIS_HPP__
+#define __XIOS_SCALAR_ALGORITHM_REDUCE_AXIS_HPP__
+
+#include "scalar_algorithm_transformation.hpp"
+#include "transformation.hpp"
+
+namespace xios {
+
+class CScalar;
+class CAxis;
+class CReduceAxisToScalar;
+class CReductionAlgorithm;
+
+/*!
+  \class CScalarAlgorithmReduceAxis
+  Reducing an axis to a scalar
+*/
+class CScalarAlgorithmReduceAxis : public CScalarAlgorithmTransformation
+{
+public:
+  CScalarAlgorithmReduceAxis(CScalar* scalarDestination, CAxis* axisSource, CReduceAxisToScalar* algo);
+
+  virtual void apply(const std::vector<std::pair<int,double> >& localIndex,
+                     const double* dataInput,
+                     CArray<double,1>& dataOut,
+                     std::vector<bool>& flagInitial,
+                     bool ignoreMissingValue, bool firstPass);
+
+  virtual void updateData(CArray<double,1>& dataOut);
+  
+  virtual ~CScalarAlgorithmReduceAxis();
+
+  static bool registerTrans();
+protected:
+  void computeIndexSourceMapping_(const std::vector<CArray<double,1>* >& dataAuxInputs);
+
+protected:
+  CReductionAlgorithm* reduction_;
+
+private:
+
+  static CGenericAlgorithmTransformation* create(CGrid* gridDst, CGrid* gridSrc,
+                                                CTransformation<CScalar>* transformation,
+                                                int elementPositionInGrid,
+                                                std::map<int, int>& elementPositionInGridSrc2ScalarPosition,
+                                                std::map<int, int>& elementPositionInGridSrc2AxisPosition,
+                                                std::map<int, int>& elementPositionInGridSrc2DomainPosition,
+                                                std::map<int, int>& elementPositionInGridDst2ScalarPosition,
+                                                std::map<int, int>& elementPositionInGridDst2AxisPosition,
+                                                std::map<int, int>& elementPositionInGridDst2DomainPosition);
+};
+
+}
+#endif // __XIOS_SCALAR_ALGORITHM_REDUCE_AXIS_HPP__
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/transformation/scalar_algorithm_reduce_domain.cpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/transformation/scalar_algorithm_reduce_domain.cpp	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/transformation/scalar_algorithm_reduce_domain.cpp	(revision 1749)
@@ -0,0 +1,154 @@
+/*!
+   \file scalar_algorithm_reduce_domain.cpp
+   \author Ha NGUYEN
+   \since 23 June 2016
+   \date 23 June 2016
+
+   \brief Algorithm for reduce a domain to a scalar
+ */
+#include "scalar_algorithm_reduce_domain.hpp"
+#include "domain.hpp"
+#include "scalar.hpp"
+#include "reduce_domain_to_scalar.hpp"
+#include "grid.hpp"
+#include "grid_transformation_factory_impl.hpp"
+
+#include "reduction.hpp"
+
+namespace xios {
+CGenericAlgorithmTransformation* CScalarAlgorithmReduceDomain::create(CGrid* gridDst, CGrid* gridSrc,
+                                                                     CTransformation<CScalar>* transformation,
+                                                                     int elementPositionInGrid,
+                                                                     std::map<int, int>& elementPositionInGridSrc2ScalarPosition,
+                                                                     std::map<int, int>& elementPositionInGridSrc2AxisPosition,
+                                                                     std::map<int, int>& elementPositionInGridSrc2DomainPosition,
+                                                                     std::map<int, int>& elementPositionInGridDst2ScalarPosition,
+                                                                     std::map<int, int>& elementPositionInGridDst2AxisPosition,
+                                                                     std::map<int, int>& elementPositionInGridDst2DomainPosition)
+TRY
+{
+  std::vector<CScalar*> scalarListDestP = gridDst->getScalars();
+  std::vector<CDomain*> domainListSrcP  = gridSrc->getDomains();
+
+  CReduceDomainToScalar* reduceDomain = dynamic_cast<CReduceDomainToScalar*> (transformation);
+  int scalarDstIndex = elementPositionInGridDst2ScalarPosition[elementPositionInGrid];
+  int domainSrcIndex = elementPositionInGridSrc2DomainPosition[elementPositionInGrid];
+
+  return (new CScalarAlgorithmReduceDomain(scalarListDestP[scalarDstIndex], domainListSrcP[domainSrcIndex], reduceDomain));
+}
+CATCH
+
+bool CScalarAlgorithmReduceDomain::registerTrans()
+TRY
+{
+  CGridTransformationFactory<CScalar>::registerTransformation(TRANS_REDUCE_DOMAIN_TO_SCALAR, create);
+}
+CATCH
+
+CScalarAlgorithmReduceDomain::CScalarAlgorithmReduceDomain(CScalar* scalarDestination, CDomain* domainSource, CReduceDomainToScalar* algo)
+ : CScalarAlgorithmTransformation(scalarDestination, domainSource),
+   reduction_(0)
+TRY
+{
+  algo->checkValid(scalarDestination, domainSource);
+  
+  StdString op;
+  switch (algo->operation)
+  {
+    case CReduceDomainToScalar::operation_attr::sum:
+      op = "sum";
+      break;
+    case CReduceDomainToScalar::operation_attr::min:
+      op = "min";
+      break;
+    case CReduceDomainToScalar::operation_attr::max:
+      op = "max";
+      break;
+    case CReduceDomainToScalar::operation_attr::average:
+      op = "average";
+      break;
+    default:
+        ERROR("CScalarAlgorithmReduceDomain::CScalarAlgorithmReduceDomain(CDomain* domainDestination, CDomain* domainSource, CReduceDomainToScalar* algo)",
+         << "Operation must be defined."
+         << "Domain source " <<domainSource->getId() << std::endl
+         << "Scalar destination " << scalarDestination->getId());
+
+  }
+  
+  if (CReductionAlgorithm::ReductionOperations.end() == CReductionAlgorithm::ReductionOperations.find(op))
+    ERROR("CScalarAlgorithmReduceDomain::CScalarAlgorithmReduceDomain(CDomain* domainDestination, CDomain* domainSource, CReduceDomainToScalar* algo)",
+       << "Operation '" << op << "' not found. Please make sure to use a supported one"
+       << "Domain source " <<domainSource->getId() << std::endl
+       << "Scalar destination " << scalarDestination->getId());
+
+  reduction_ = CReductionAlgorithm::createOperation(CReductionAlgorithm::ReductionOperations[op]);
+  local = algo->local ;
+}
+CATCH
+
+void CScalarAlgorithmReduceDomain::apply(const std::vector<std::pair<int,double> >& localIndex,
+                                         const double* dataInput,
+                                         CArray<double,1>& dataOut,
+                                         std::vector<bool>& flagInitial,                     
+                                         bool ignoreMissingValue, bool firstPass)
+TRY
+{
+  reduction_->apply(localIndex, dataInput, dataOut, flagInitial, ignoreMissingValue, firstPass);
+}
+CATCH
+
+void CScalarAlgorithmReduceDomain::updateData(CArray<double,1>& dataOut)
+TRY
+{
+  reduction_->updateData(dataOut);
+}
+CATCH
+
+CScalarAlgorithmReduceDomain::~CScalarAlgorithmReduceDomain()
+TRY
+{
+  if (0 != reduction_) delete reduction_;
+}
+CATCH
+
+void CScalarAlgorithmReduceDomain::computeIndexSourceMapping_(const std::vector<CArray<double,1>* >& dataAuxInputs)
+TRY
+{
+  this->transformationMapping_.resize(1);
+  this->transformationWeight_.resize(1);
+
+  TransformationIndexMap& transMap = this->transformationMapping_[0];
+  TransformationWeightMap& transWeight = this->transformationWeight_[0];
+
+  int ni_glo = domainSrc_->ni_glo ;
+  int nj_glo = domainSrc_->nj_glo ;
+  int nbDomainIdx ;
+  
+  if (local)
+  {
+      const CArray<int, 1>& i_index = domainSrc_-> i_index.getValue() ;
+      const CArray<int, 1>& j_index = domainSrc_-> j_index.getValue() ;
+      const CArray<bool,1>& localMask = domainSrc_-> localMask ;
+      int nbDomainIdx = i_index.numElements();
+
+      for (int idxDomain = 0; idxDomain < nbDomainIdx; ++idxDomain)
+      {
+        if (localMask(idxDomain))
+        { 
+          transMap[0].push_back(j_index(idxDomain)* ni_glo + i_index(idxDomain));
+          transWeight[0].push_back(1.0) ;
+        }
+      }
+  }
+  else
+  {  
+    nbDomainIdx = ni_glo * nj_glo;
+    transMap[0].resize(nbDomainIdx);
+    transWeight[0].resize(nbDomainIdx, 1.0);
+    for (int idxDomain = 0; idxDomain < nbDomainIdx; ++idxDomain) transMap[0][idxDomain] = idxDomain;    
+  }
+  
+}
+CATCH
+
+}
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/transformation/scalar_algorithm_reduce_domain.hpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/transformation/scalar_algorithm_reduce_domain.hpp	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/transformation/scalar_algorithm_reduce_domain.hpp	(revision 1749)
@@ -0,0 +1,63 @@
+/*!
+   \file scalar_algorithm_reduce_scalar.hpp
+   \author Ha NGUYEN
+   \since 13 Oct 2016
+   \date 13 Oct 2016
+
+   \brief Algorithm for reduce an DOMAIN to a scalar
+ */
+#ifndef __XIOS_SCALAR_ALGORITHM_REDUCE_DOMAIN_HPP__
+#define __XIOS_SCALAR_ALGORITHM_REDUCE_DOMAIN_HPP__
+
+#include "scalar_algorithm_transformation.hpp"
+#include "transformation.hpp"
+
+namespace xios {
+
+class CScalar;
+class CDomain;
+class CReduceDomainToScalar;
+class CReductionAlgorithm;
+
+/*!
+  \class CScalarAlgorithmReduceDomain
+  Reducing an DOMAIN to a scalar
+*/
+class CScalarAlgorithmReduceDomain : public CScalarAlgorithmTransformation
+{
+public:
+  CScalarAlgorithmReduceDomain(CScalar* scalarDestination, CDomain* domainSource, CReduceDomainToScalar* algo);
+
+  virtual void apply(const std::vector<std::pair<int,double> >& localIndex,
+                     const double* dataInput,
+                     CArray<double,1>& dataOut,
+                     std::vector<bool>& flagInitial,                     
+                     bool ignoreMissingValue, bool firstPass);
+
+  virtual void updateData(CArray<double,1>& dataOut);
+  
+  virtual ~CScalarAlgorithmReduceDomain();
+
+  static bool registerTrans();
+protected:
+  bool local ;
+  void computeIndexSourceMapping_(const std::vector<CArray<double,1>* >& dataAuxInputs);
+
+protected:
+  CReductionAlgorithm* reduction_;
+
+private:
+
+  static CGenericAlgorithmTransformation* create(CGrid* gridDst, CGrid* gridSrc,
+                                                CTransformation<CScalar>* transformation,
+                                                int elementPositionInGrid,
+                                                std::map<int, int>& elementPositionInGridSrc2ScalarPosition,
+                                                std::map<int, int>& elementPositionInGridSrc2DOMAINPosition,
+                                                std::map<int, int>& elementPositionInGridSrc2DomainPosition,
+                                                std::map<int, int>& elementPositionInGridDst2ScalarPosition,
+                                                std::map<int, int>& elementPositionInGridDst2DOMAINPosition,
+                                                std::map<int, int>& elementPositionInGridDst2DomainPosition);
+};
+
+}
+#endif // __XIOS_SCALAR_ALGORITHM_REDUCE_DOMAIN_HPP__
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/transformation/scalar_algorithm_reduce_scalar.cpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/transformation/scalar_algorithm_reduce_scalar.cpp	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/transformation/scalar_algorithm_reduce_scalar.cpp	(revision 1749)
@@ -0,0 +1,125 @@
+/*!
+   \file scalar_algorithm_reduce_scalar.cpp
+ 
+   \brief Algorithm for reduce an scalar to a scalar
+ */
+#include "scalar_algorithm_reduce_scalar.hpp"
+#include "scalar.hpp"
+#include "reduce_scalar_to_scalar.hpp"
+#include "grid.hpp"
+#include "grid_transformation_factory_impl.hpp"
+#include "reduction.hpp"
+
+
+namespace xios {
+CGenericAlgorithmTransformation* CScalarAlgorithmReduceScalar::create(CGrid* gridDst, CGrid* gridSrc,
+                                                                     CTransformation<CScalar>* transformation,
+                                                                     int elementPositionInGrid,
+                                                                     std::map<int, int>& elementPositionInGridSrc2ScalarPosition,
+                                                                     std::map<int, int>& elementPositionInGridSrc2AxisPosition,
+                                                                     std::map<int, int>& elementPositionInGridSrc2DomainPosition,
+                                                                     std::map<int, int>& elementPositionInGridDst2ScalarPosition,
+                                                                     std::map<int, int>& elementPositionInGridDst2AxisPosition,
+                                                                     std::map<int, int>& elementPositionInGridDst2DomainPosition)
+TRY
+{
+  std::vector<CScalar*> scalarListDestP = gridDst->getScalars();
+  std::vector<CScalar*> scalarListSrcP  = gridSrc->getScalars();
+
+  CReduceScalarToScalar* reduceScalar = dynamic_cast<CReduceScalarToScalar*> (transformation);
+  int scalarDstIndex = elementPositionInGridDst2ScalarPosition[elementPositionInGrid];
+  int scalarSrcIndex = elementPositionInGridSrc2AxisPosition[elementPositionInGrid];
+
+  return (new CScalarAlgorithmReduceScalar(scalarListDestP[scalarDstIndex], scalarListSrcP[scalarSrcIndex], reduceScalar));
+}
+CATCH
+
+bool CScalarAlgorithmReduceScalar::registerTrans()
+TRY
+{
+  CGridTransformationFactory<CScalar>::registerTransformation(TRANS_REDUCE_SCALAR_TO_SCALAR, create);
+}
+CATCH
+
+CScalarAlgorithmReduceScalar::CScalarAlgorithmReduceScalar(CScalar* scalarDestination, CScalar* scalarSource, CReduceScalarToScalar* algo)
+ : CScalarAlgorithmTransformation(scalarDestination, scalarSource),
+   reduction_(0)
+TRY
+{
+  eliminateRedondantSrc_= false ;
+  if (algo->operation.isEmpty())
+    ERROR("CScalarAlgorithmReduceScalar::CScalarAlgorithmReduceScalar(CScalar* scalarDestination, CScalar* scalarSource, CReduceScalarToScalar* algo)",
+           << "Operation must be defined."
+           << "Scalar source " <<scalarSource->getId() << std::endl
+           << "Scalar destination " << scalarDestination->getId());
+  StdString op;
+  switch (algo->operation)
+  {
+    case CReduceScalarToScalar::operation_attr::sum:
+      op = "sum";
+      break;
+    case CReduceScalarToScalar::operation_attr::min:
+      op = "min";
+      break;
+    case CReduceScalarToScalar::operation_attr::max:
+      op = "max";
+      break;
+    case CReduceScalarToScalar::operation_attr::average:
+      op = "average";
+      break;
+    default:
+        ERROR("CScalarAlgorithmReduceScalar::CScalarAlgorithmReduceScalar(CScalar* scalarDestination, CScalar* scalarSource, CReduceScalarToScalar* algo)",
+         << "Operation is wrongly defined. Supported operations: sum, min, max, average." << std::endl
+         << "Scalar source " <<scalarSource->getId() << std::endl
+         << "Scalar destination " << scalarDestination->getId());
+
+  }
+  
+  if (CReductionAlgorithm::ReductionOperations.end() == CReductionAlgorithm::ReductionOperations.find(op))
+    ERROR("CScalarAlgorithmReduceScalar::CScalarAlgorithmReduceScalar(CScalar* scalarDestination, CScalar* scalarSource, CReduceScalarToScalar* algo)",
+       << "Operation '" << op << "' not found. Please make sure to use a supported one"
+       << "Scalar source " <<scalarSource->getId() << std::endl
+       << "Scalar destination " << scalarDestination->getId());
+
+  reduction_ = CReductionAlgorithm::createOperation(CReductionAlgorithm::ReductionOperations[op]);
+}
+CATCH
+
+void CScalarAlgorithmReduceScalar::apply(const std::vector<std::pair<int,double> >& localIndex, const double* dataInput, CArray<double,1>& dataOut,
+                                         std::vector<bool>& flagInitial, bool ignoreMissingValue, bool firstPass)
+TRY
+{
+  reduction_->apply(localIndex, dataInput, dataOut, flagInitial, ignoreMissingValue, firstPass);
+}
+CATCH
+
+void CScalarAlgorithmReduceScalar::updateData(CArray<double,1>& dataOut)
+TRY
+{
+  reduction_->updateData(dataOut);
+}
+CATCH
+
+CScalarAlgorithmReduceScalar::~CScalarAlgorithmReduceScalar()
+TRY
+{
+  if (0 != reduction_) delete reduction_;
+}
+CATCH
+
+void CScalarAlgorithmReduceScalar::computeIndexSourceMapping_(const std::vector<CArray<double,1>* >& dataAuxInputs)
+TRY
+{
+  this->transformationMapping_.resize(1);
+  this->transformationWeight_.resize(1);
+
+  TransformationIndexMap& transMap = this->transformationMapping_[0];
+  TransformationWeightMap& transWeight = this->transformationWeight_[0];
+
+  transMap[0].push_back(0);
+  transWeight[0].push_back(1.0);
+
+}
+CATCH
+
+}
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/transformation/scalar_algorithm_reduce_scalar.hpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/transformation/scalar_algorithm_reduce_scalar.hpp	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/transformation/scalar_algorithm_reduce_scalar.hpp	(revision 1749)
@@ -0,0 +1,57 @@
+/*!
+   \file scalar_algorithm_reduce_scalar.hpp
+   \brief Algorithm for reduce an scalar to a scalar
+ */
+#ifndef __XIOS_SCALAR_ALGORITHM_REDUCE_SCALAR_HPP__
+#define __XIOS_SCALAR_ALGORITHM_REDUCE_SCALAR_HPP__
+
+#include "scalar_algorithm_transformation.hpp"
+#include "transformation.hpp"
+
+namespace xios {
+
+class CScalar;
+class CReduceScalarToScalar;
+class CReductionAlgorithm;
+
+/*!
+  \class CScalarAlgorithmReduceScalar
+  Reducing an scalar to a scalar
+*/
+class CScalarAlgorithmReduceScalar : public CScalarAlgorithmTransformation
+{
+public:
+  CScalarAlgorithmReduceScalar(CScalar* scalarDestination, CScalar* scalarSource, CReduceScalarToScalar* algo);
+
+  virtual void apply(const std::vector<std::pair<int,double> >& localIndex,
+                     const double* dataInput,
+                     CArray<double,1>& dataOut,
+                     std::vector<bool>& flagInitial,
+                     bool ignoreMissingValue, bool firstPass);
+
+  virtual void updateData(CArray<double,1>& dataOut);
+  
+  virtual ~CScalarAlgorithmReduceScalar();
+
+  static bool registerTrans();
+protected:
+  void computeIndexSourceMapping_(const std::vector<CArray<double,1>* >& dataAuxInputs);
+
+protected:
+  CReductionAlgorithm* reduction_;
+
+private:
+
+  static CGenericAlgorithmTransformation* create(CGrid* gridDst, CGrid* gridSrc,
+                                                CTransformation<CScalar>* transformation,
+                                                int elementPositionInGrid,
+                                                std::map<int, int>& elementPositionInGridSrc2ScalarPosition,
+                                                std::map<int, int>& elementPositionInGridSrc2AxisPosition,
+                                                std::map<int, int>& elementPositionInGridSrc2DomainPosition,
+                                                std::map<int, int>& elementPositionInGridDst2ScalarPosition,
+                                                std::map<int, int>& elementPositionInGridDst2AxisPosition,
+                                                std::map<int, int>& elementPositionInGridDst2DomainPosition);
+};
+
+}
+#endif // __XIOS_SCALAR_ALGORITHM_REDUCE_SCALAR_HPP__
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/transformation/scalar_algorithm_transformation.cpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/transformation/scalar_algorithm_transformation.cpp	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/transformation/scalar_algorithm_transformation.cpp	(revision 1749)
@@ -0,0 +1,125 @@
+/*!
+   \file scalar_algorithm_transformation.hpp
+   \author Ha NGUYEN
+   \since 23 June 2016
+   \date 23 Oct 2016
+
+   \brief Interface for all scalar transformation algorithms.
+ */
+
+#include "scalar_algorithm_transformation.hpp"
+#include "context.hpp"
+#include "context_client.hpp"
+#include "client_client_dht_template.hpp"
+#include "domain.hpp"
+#include "axis.hpp"
+#include "scalar.hpp"
+
+namespace xios {
+
+CScalarAlgorithmTransformation::CScalarAlgorithmTransformation(CScalar* scalarDestination, CScalar* scalarSource)
+ : CGenericAlgorithmTransformation(),
+   scalarDest_(scalarDestination),
+   scalarSrc_(scalarSource), axisSrc_(0), domainSrc_(0)
+{
+}
+
+CScalarAlgorithmTransformation::CScalarAlgorithmTransformation(CScalar* scalarDestination, CAxis* axisSource)
+ : CGenericAlgorithmTransformation(),
+   scalarDest_(scalarDestination),
+   scalarSrc_(0), axisSrc_(axisSource), domainSrc_(0)
+{
+}
+
+CScalarAlgorithmTransformation::CScalarAlgorithmTransformation(CScalar* scalarDestination, CDomain* domainSource)
+ : CGenericAlgorithmTransformation(),
+   scalarDest_(scalarDestination),
+   scalarSrc_(0), axisSrc_(0), domainSrc_(domainSource)
+{
+}
+
+CScalarAlgorithmTransformation::~CScalarAlgorithmTransformation()
+{
+}
+
+void CScalarAlgorithmTransformation::computeIndexSourceMapping_(const std::vector<CArray<double,1>* >& dataAuxInputs)
+{
+}
+
+/*!
+  Compute global index of element source on different processes on knowing the global index source of transformation
+
+  \param [in] globalIndexElementSource global index source of transformation (represented in the transformation mapping)
+  \param [in] elementSourceType type of element source
+  \param [out] globalIndexElementSourceOnProc processes which contain the corresponding global index of scalar source
+*/
+void CScalarAlgorithmTransformation::computeExchangeGlobalIndex(const CArray<size_t,1>& globalIndexElementSource,
+                                                                int elementSourceType,
+                                                                CClientClientDHTInt::Index2VectorInfoTypeMap& globalIndexElementSourceOnProc)
+TRY
+{
+  CContext* context = CContext::getCurrent();
+  CContextClient* client=context->client;
+  int clientRank = client->clientRank;
+  int clientSize = client->clientSize;
+
+  if (2 == elementSourceType) // Source is a domain
+  {
+    size_t globalIndex;
+    int nIndexSize = domainSrc_->i_index.numElements();
+    CArray<int,1>& iIndex = domainSrc_->i_index;
+    CArray<int,1>& jIndex = domainSrc_->j_index;
+    int niGlo = domainSrc_->ni_glo;
+    CArray<bool,1>& localMask = domainSrc_ -> localMask ;
+    CClientClientDHTInt::Index2VectorInfoTypeMap globalIndex2ProcRank;
+    globalIndex2ProcRank.rehash(std::ceil(nIndexSize/globalIndex2ProcRank.max_load_factor()));
+    for (int idx = 0; idx < nIndexSize; ++idx)
+    {
+      if (localMask(idx))
+      {
+        globalIndex = jIndex(idx) * niGlo + iIndex(idx);
+        globalIndex2ProcRank[globalIndex].resize(1);
+        globalIndex2ProcRank[globalIndex][0] = clientRank;
+      }
+    }
+
+    CClientClientDHTInt dhtIndexProcRank(globalIndex2ProcRank, client->intraComm);
+    dhtIndexProcRank.computeIndexInfoMapping(globalIndexElementSource);
+    globalIndexElementSourceOnProc = dhtIndexProcRank.getInfoIndexMap();
+  }
+  else if (1 == elementSourceType) // Source is an axis
+  {
+    size_t globalIndex;
+    int nIndexSize = axisSrc_->index.numElements();
+    CClientClientDHTInt::Index2VectorInfoTypeMap globalIndex2ProcRank;
+    globalIndex2ProcRank.rehash(std::ceil(nIndexSize/globalIndex2ProcRank.max_load_factor()));
+    CArray<bool,1>& localMask = axisSrc_ -> mask ;
+   
+    for (int idx = 0; idx < nIndexSize; ++idx)
+    {
+      if (localMask(idx))
+      {
+        globalIndex = axisSrc_->index(idx);
+        globalIndex2ProcRank[globalIndex].resize(1);
+        globalIndex2ProcRank[globalIndex][0] = clientRank;
+      }
+    }
+
+    CClientClientDHTInt dhtIndexProcRank(globalIndex2ProcRank, client->intraComm);
+    dhtIndexProcRank.computeIndexInfoMapping(globalIndexElementSource);
+    globalIndexElementSourceOnProc = dhtIndexProcRank.getInfoIndexMap();
+  }
+  else // scalar
+  {
+    size_t globalIndex = 0;    
+    CClientClientDHTInt::Index2VectorInfoTypeMap globalIndex2ProcRank;
+    globalIndex2ProcRank[globalIndex].resize(1);
+    globalIndex2ProcRank[globalIndex][0] = clientRank;
+
+    CClientClientDHTInt dhtIndexProcRank(globalIndex2ProcRank, client->intraComm);
+    dhtIndexProcRank.computeIndexInfoMapping(globalIndexElementSource);
+    globalIndexElementSourceOnProc = dhtIndexProcRank.getInfoIndexMap();
+  }
+}
+CATCH
+}
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/transformation/scalar_algorithm_transformation.hpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/transformation/scalar_algorithm_transformation.hpp	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/transformation/scalar_algorithm_transformation.hpp	(revision 1749)
@@ -0,0 +1,59 @@
+/*!
+   \file scalar_algorithm_transformation.hpp
+   \author Ha NGUYEN
+   \since 23 June 2016
+   \date 23 June 2016
+
+   \brief Interface for all scalar transformation algorithms.
+ */
+#ifndef __XIOS_SCALAR_ALGORITHM_TRANSFORMATION_HPP__
+#define __XIOS_SCALAR_ALGORITHM_TRANSFORMATION_HPP__
+
+#include "generic_algorithm_transformation.hpp"
+
+namespace xios {
+
+class CScalar;
+class CAxis;
+class CDomain;
+
+/*!
+  \class CScalarAlgorithmTransformation
+  Algorithms for scalar.
+*/
+class CScalarAlgorithmTransformation : public virtual CGenericAlgorithmTransformation
+{
+public:
+  CScalarAlgorithmTransformation(CScalar* scalarDestination, CScalar* scalarSource);
+  CScalarAlgorithmTransformation(CScalar* scalarDestination, CAxis* axisSource);
+  CScalarAlgorithmTransformation(CScalar* scalarDestination, CDomain* domainSource);
+
+  virtual ~CScalarAlgorithmTransformation();
+
+protected:
+  void computeIndexSourceMapping_(const std::vector<CArray<double,1>* >& dataAuxInputs);
+
+  virtual void computeExchangeGlobalIndex(const CArray<size_t,1>& globalScalarIndex,
+                                          int elementType,
+                                          CClientClientDHTInt::Index2VectorInfoTypeMap& globalScalarIndexOnProc);
+
+protected:
+  //! Global index of an scalar on grid destination
+  std::vector<int> scalarDestGlobalIndex_;
+
+  //! Size of
+  int scalarDestGlobalSize_;
+
+    //! Scalar on grid destination
+  CScalar* scalarDest_;
+
+  //! Scalar on grid source
+  CScalar* scalarSrc_;
+  //! Axis source
+  CAxis* axisSrc_;
+  //! Domain source
+  CDomain* domainSrc_;
+};
+
+}
+#endif // __XIOS_SCALAR_ALGORITHM_TRANSFORMATION_HPP__
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/type/base_type.hpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/type/base_type.hpp	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/type/base_type.hpp	(revision 1749)
@@ -0,0 +1,30 @@
+#ifndef __BASE_TYPE_HPP__
+#define __BASE_TYPE_HPP__
+
+#include "xios_spl.hpp"
+#include "buffer_in.hpp"
+#include "buffer_out.hpp"
+
+namespace xios
+{
+
+  class CBaseType
+  {
+    public:
+    
+    CBaseType(void) {}
+    virtual ~CBaseType() {}
+    virtual void fromString(const string& str) =0 ;
+    virtual string toString(void) const =0;
+    
+    virtual bool fromBuffer(CBufferIn& buffer) =0;
+    virtual bool toBuffer(CBufferOut& buffer) const =0;
+    virtual CBaseType* clone(void) const =0;
+    virtual size_t size(void) const =0;
+    virtual bool isEmpty(void) const =0;
+    virtual void reset(void) =0;
+  } ;
+
+}
+
+#endif
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/type/enum.hpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/type/enum.hpp	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/type/enum.hpp	(revision 1749)
@@ -0,0 +1,163 @@
+#ifndef __XIOS_ENUM__
+#define __XIOS_ENUM__
+
+#include "xios_spl.hpp"
+#include "exception.hpp"
+#include "buffer_in.hpp"
+#include "buffer_out.hpp"
+#include "base_type.hpp"
+#include "message.hpp"
+
+#define __INLINE__ inline
+
+
+namespace xios
+{
+  class CEnumBase
+  {
+  } ;
+  
+  template <typename T> class CEnum_ref ;
+ 
+  template <typename T> 
+  class CEnum : public  virtual CBaseType, public T
+  {
+    public:
+    typedef typename T::t_enum T_enum ;
+    CEnum(void) ;
+    __INLINE__ CEnum(const T_enum& val) ;
+    __INLINE__ CEnum(const CEnum& type) ;
+    __INLINE__ CEnum(const CEnum_ref<T>& type) ;
+    virtual ~CEnum() { _reset() ; }
+
+    __INLINE__ T_enum& get(void) ;
+    __INLINE__ const T_enum& get(void) const;
+
+    __INLINE__ void set(const T_enum& val) ;
+    __INLINE__ void set(const CEnum& val) ;
+    __INLINE__ void set(const CEnum_ref<T>& val) ;
+    __INLINE__ CEnum& operator = (const T_enum& val) ;
+    __INLINE__ CEnum& operator = (const CEnum& val) ;
+    __INLINE__ CEnum& operator = (const CEnum_ref<T>& val) ;
+    __INLINE__ operator T_enum&() ;
+        
+    inline virtual CBaseType* clone(void) const   { return _clone(); }
+    virtual void fromString(const string& str)   { _fromString(str); }
+    virtual string toString(void) const { return _toString(); }
+    virtual bool fromBuffer(CBufferIn& buffer) { return _fromBuffer(buffer) ; }
+    virtual bool toBuffer(CBufferOut& buffer) const { return _toBuffer(buffer); }
+    virtual void reset(void) { _reset(); }
+    virtual bool isEmpty() const { return _isEmpty(); } 
+    virtual size_t size(void) const { return _size(); }
+    
+    __INLINE__ void allocate(void) ;
+    __INLINE__ void checkEmpty(void) const;
+       
+    T_enum* ptrValue ;
+    bool empty ;
+      
+    friend class CEnum_ref<T> ; 
+ 
+    private :
+ 
+    __INLINE__ CEnum* _clone(void) const;
+    __INLINE__ void _fromString(const string& str) ;
+    __INLINE__ string _toString(void) const;
+    __INLINE__ bool _fromBuffer(CBufferIn& buffer) ;
+    __INLINE__ bool _toBuffer(CBufferOut& buffer) const;
+    __INLINE__ void _reset(void) ;
+    __INLINE__ bool _isEmpty() const ;  
+    __INLINE__ size_t _size(void) const ;
+ 
+  } ;
+  
+  
+  
+  template <typename T> 
+  class CEnum_ref : public  virtual CBaseType, public T
+  {
+    public:
+    
+    typedef typename T::t_enum T_enum ;
+    __INLINE__ CEnum_ref(void) ;
+    __INLINE__ CEnum_ref(T_enum& val) ;
+    __INLINE__ CEnum_ref(CEnum<T>& type) ;
+    __INLINE__ CEnum_ref(const CEnum_ref& type) ;
+    virtual ~CEnum_ref() {};
+
+    __INLINE__ T_enum& get(void) const;
+
+    __INLINE__ void set(const T_enum& val) const ;
+    __INLINE__ void set(const CEnum<T>& val) const ;
+    __INLINE__ void set(const CEnum_ref& val) const ;
+
+    __INLINE__ void set_ref(T_enum& val) ;
+    __INLINE__ void set_ref(CEnum<T>& val) ;
+    __INLINE__ void set_ref(const CEnum_ref& val) ;
+    
+    __INLINE__ const CEnum_ref& operator = (T_enum& val) const ;
+    __INLINE__ const CEnum_ref& operator = (CEnum<T>& val) const ;
+    __INLINE__ const CEnum_ref& operator = (const CEnum_ref& val) const;
+    __INLINE__ operator T_enum&() const;
+    
+
+    inline virtual CBaseType* clone(void) const   { return _clone(); }
+    virtual void fromString(const string& str)   { _fromString(str); }
+    virtual void fromString(const string& str) const  { _fromString(str); }
+    virtual string toString(void) const { return _toString(); }
+    virtual bool fromBuffer(CBufferIn& buffer) { return _fromBuffer(buffer) ; }
+    virtual bool fromBuffer(CBufferIn& buffer) const { return _fromBuffer(buffer); }
+    virtual bool toBuffer(CBufferOut& buffer) const { return _toBuffer(buffer); }
+    virtual void reset(void) { _reset(); }
+    virtual bool isEmpty() const { return _isEmpty(); } 
+    virtual size_t size(void) const { return _size(); }
+
+    __INLINE__ void checkEmpty(void) const;
+    
+
+    T_enum mutable * ptrValue ;
+    bool empty ;
+    friend class CEnum<T> ;
+    
+    private :
+    
+    __INLINE__ CEnum_ref* _clone(void) const;
+    __INLINE__ void _fromString(const string& str) ;
+    __INLINE__ void _fromString(const string& str) const;
+    __INLINE__ string _toString(void) const;
+    __INLINE__ bool _fromBuffer(CBufferIn& buffer) ;
+    __INLINE__ bool _fromBuffer(CBufferIn& buffer) const ;
+    __INLINE__ bool _toBuffer(CBufferOut& buffer) const;
+    __INLINE__ void _reset(void) ;
+    __INLINE__ bool _isEmpty() const ;  
+    __INLINE__  size_t _size(void) const ;
+  } ;
+  
+  template <typename T> bool operator== (const CEnum<T>& lhs, const typename T::t_enum& rhs);
+  template <typename T> bool operator== (const typename T::t_enum& lhs, const CEnum<T>& rhs);
+  template <typename T> bool operator== (const CEnum<T>& lhs, const CEnum<T>& rhs);  
+  template <typename T> bool operator== (const CEnum_ref<T>& lhs, const CEnum_ref<T>& rhs);
+  template <typename T> bool operator== (const CEnum_ref<T>& lhs, const typename T::t_enum& rhs);
+  template <typename T> bool operator== (const typename T::t_enum& lhs, const CEnum_ref<T>& rhs);
+  template <typename T> bool operator== (const CEnum<T>& lhs, const CEnum_ref<T>& rhs) {return (lhs.get() == rhs.get());}
+  template <typename T> bool operator== (const CEnum_ref<T>& lhs, const CEnum<T>& rhs) {return (rhs == lhs); }
+
+  template <typename T> __INLINE__ CBufferOut& operator<<(CBufferOut& buffer, const CEnum<T>& type) ;
+  template <typename T> __INLINE__ CBufferOut& operator<<(CBufferOut& buffer, const typename T::t_enum & type) ;  
+  template <typename T> __INLINE__ CBufferIn& operator>>(CBufferIn& buffer, CEnum<T>& type) ;
+//  template <typename T> __INLINE__ CMessage& operator<<(CMessage& msg, const CEnum<T>& type) ;
+  template <typename T> __INLINE__ CMessage& operator<<(CMessage& msg, const typename T::t_enum & type) ;
+
+  template <typename T> __INLINE__ CBufferOut& operator<<(CBufferOut& buffer, const CEnum<T>& type) ;
+  template <typename T> __INLINE__ CBufferOut& operator<<(CBufferOut& buffer, const typename T::t_enum & type);
+  template <typename T> __INLINE__ CBufferIn& operator>>(CBufferIn& buffer, CEnum<T>& type);
+//  template <typename T> __INLINE__ CMessage& operator<<(CMessage& msg, const CEnum<T>& type);
+  template <typename T> __INLINE__ CMessage& operator<<(CMessage& msg, const typename T::t_enum & type);
+}
+
+#  ifdef __INLINE__
+#    include "enum_impl.hpp"
+#    include "enum_ref_impl.hpp"
+#  endif
+
+#endif
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/type/enum_impl.hpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/type/enum_impl.hpp	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/type/enum_impl.hpp	(revision 1749)
@@ -0,0 +1,317 @@
+#ifndef __XIOS_ENUM_IMPL__
+#define __XIOS_ENUM_IMPL__
+
+#include "xios_spl.hpp"
+#include "exception.hpp"
+#include "buffer_in.hpp"
+#include "buffer_out.hpp"
+#include "message.hpp"
+#include <string>
+#include <boost/algorithm/string.hpp>
+
+namespace xios
+{
+ 
+  using namespace std;
+  
+  template <typename T>
+  CEnum<T>::CEnum(void)
+  {
+    empty=true ;
+  }
+    
+  template <typename T>
+  CEnum<T>::CEnum(const T_enum& val)
+  {
+    empty=true ;
+    set(val) ;
+  }
+  
+  template <typename T>
+  CEnum<T>::CEnum(const CEnum<T>& type)
+  {
+    empty=true ;
+    set(type) ;
+  }
+
+  template <typename T>
+  CEnum<T>::CEnum(const CEnum_ref<T>& type)
+  {
+    empty=true ;
+    set(type) ;
+  }  
+
+  template <typename T>
+  void CEnum<T>::set(const T_enum& val)
+  {
+    if (empty) 
+    { 
+      ptrValue = new T_enum(val) ;
+      empty=false ;
+    }
+    else *ptrValue = val ;
+  }
+
+  template <typename T>
+  void CEnum<T>::set(const CEnum<T>& type)
+  {
+    if (type.isEmpty()) reset() ;
+    else
+    {
+      if (empty)
+      { 
+        ptrValue = new T_enum(*type.ptrValue) ;
+        empty=false ;
+      }
+      else *ptrValue = *type.ptrValue ;
+    }
+  }
+
+  template <typename T>
+  void CEnum<T>::set(const CEnum_ref<T>& type)
+  {
+    if (type.isEmpty()) reset() ;
+    else
+    {
+      if (empty)
+      { 
+        ptrValue = new T_enum(*type.ptrValue) ;
+        empty=false ;
+      }
+      else *ptrValue = *type.ptrValue ;
+    }
+  }
+
+
+  template <typename T>
+  typename T::t_enum & CEnum<T>::get(void)
+  {
+    checkEmpty();
+    return *ptrValue ;
+  }
+
+  template <typename T>
+  const typename T::t_enum& CEnum<T>::get(void) const
+  {
+    checkEmpty();
+    return *ptrValue ;
+  }
+  
+  template <typename T>
+  CEnum<T>& CEnum<T>::operator = (const T_enum& val)
+  {
+    set(val) ;
+    return *this ;
+  }
+  
+  template <typename T>
+  CEnum<T>& CEnum<T>::operator = (const CEnum<T>& type)
+  {
+    set(type) ;
+    return *this ;
+  }
+
+  template <typename T>
+  CEnum<T>& CEnum<T>::operator = (const CEnum_ref<T>& type)
+  {
+    set(type) ;
+    return *this ;
+  }
+
+
+  template <typename T>
+  CEnum<T>::operator T_enum&()
+  {
+    checkEmpty();
+    return *ptrValue ;
+   }
+
+   template <typename T>
+   CEnum<T>* CEnum<T>::_clone(void) const
+   {
+     checkEmpty();
+     return new CEnum(*this) ;
+   }
+
+  
+  template <class T>
+  void CEnum<T>::_fromString(const string& str)
+  {
+    string tmpStr=boost::to_lower_copy(boost::trim_copy(str)) ;
+    
+    bool found=false ;
+    for(int i=0;i<T::getSize();i++)
+    {
+      if (boost::to_lower_copy(string(T::getStr()[i]))==tmpStr)
+      {
+        allocate() ;
+        *ptrValue=(T_enum) i ;
+        return ;
+      }
+    }
+    
+    ostringstream strList ;
+    for(int i=0;i<T::getSize();i++) 
+    {
+      if (i>0) strList<<", " ;
+      strList<<boost::to_lower_copy(string(T::getStr()[i])) ;
+    }
+    
+    ERROR("template <typename T> void CEnum<T>::_fromString(const string& str)",
+          << tmpStr << " cannot be converted in a valid enumeration, possibilities are: " << strList.str());
+
+  }
+
+  template <typename T>
+  size_t CEnum<T>::_size(void) const
+  {
+    return sizeof(T_enum) ;
+  }
+  
+  template <typename T>
+  bool CEnum<T>::_isEmpty(void) const
+  {
+    return empty ;
+  }
+  
+  template <typename T>
+  string CEnum<T>::_toString(void) const
+  {
+    if (empty) return string("empty") ;
+    return string((T::getStr())[(int)(*ptrValue)]) ;
+  }
+  
+  template <typename T>
+  bool CEnum<T>::_toBuffer(CBufferOut& buffer) const
+  {
+    checkEmpty();
+    if (sizeof(*ptrValue)==sizeof(short int)) return buffer.put((short int) *ptrValue) ;
+    else if (sizeof(*ptrValue)==sizeof(int)) return buffer.put((int) *ptrValue) ;
+    else if (sizeof(*ptrValue)==sizeof(long int)) return buffer.put((long int) *ptrValue) ;
+    else ERROR("template <typename T> bool CEnum<T>::_toBuffer(CBufferOut& buffer) const",
+               << "incompatibility between enumeration and standard integer type.");
+    return false ;
+  }
+  
+  template <typename T>
+  bool CEnum<T>::_fromBuffer(CBufferIn& buffer)
+  {
+    bool ret ;
+    allocate() ;
+    if (sizeof(*ptrValue)==sizeof(short int)) 
+    {
+      short int val ;
+      ret=buffer.get(val) ;
+      if (ret) *ptrValue = (T_enum) val ;
+    }
+    else if (sizeof(*ptrValue)==sizeof(int)) 
+    {
+      int val ;
+      ret=buffer.get(val) ;
+      if (ret) *ptrValue = (T_enum) val ;
+    }
+    else if (sizeof(*ptrValue)==sizeof(long int)) 
+    {
+      long int val ;
+      ret=buffer.get(val) ;
+      if (ret) *ptrValue = (T_enum) val ;
+    }
+    else ERROR("template <typename T> bool CEnum<T>::_fromBuffer(CBufferIn& buffer)",
+               << "incompatibility between enumeration and standard integer type.");
+    return ret ;
+  }
+ 
+
+  template <typename T>
+  void CEnum<T>::allocate(void)
+  {
+    if (empty) 
+    {
+      ptrValue = new T_enum ;
+      empty=false ;
+    }
+  }
+  
+  template <typename T>
+  void CEnum<T>::_reset(void)
+  {
+    if (!empty) 
+    {
+      delete ptrValue ;
+      empty=true ;
+    }
+  }
+  
+  template <typename T>
+  void CEnum<T>::checkEmpty(void) const
+  {
+    if (empty) ERROR("template <typename T> void CEnum<T>::checkEmpty(void) const",
+                     << "Enum is not initialized.");
+  }  
+  
+  template <typename T> 
+  bool operator== (const CEnum<T>& lhs, const typename T::t_enum& rhs)
+  {
+     if (lhs.isEmpty()) return false;
+     return (lhs.get() == rhs);
+  }
+
+  template <typename T> 
+  bool operator== (const typename T::t_enum& lhs, const CEnum<T>& rhs)
+  {
+    return rhs == lhs;
+  }
+
+  template <typename T> 
+  bool operator== (const CEnum<T>& lhs, const CEnum<T>& rhs)
+  {
+    if ((lhs.isEmpty() && !rhs.isEmpty()) || (!lhs.isEmpty() && rhs.isEmpty())) return false;
+    if (lhs.isEmpty() && rhs.isEmpty()) return true;
+    return (lhs.get() == rhs.get());
+  }
+
+
+  template <typename T>
+  CBufferOut& operator<<(CBufferOut& buffer, const CEnum<T>& type)
+  {
+    if (!type.toBuffer(buffer)) ERROR("template <typename T> CBufferOut& operator<<(CBufferOut& buffer, const CEnum<T>& type)",
+                                      << "Not enough free space in buffer to queue the enum.");
+    return buffer ;
+  }
+
+  template <typename T>
+  CBufferOut& operator<<(CBufferOut& buffer, const typename T::t_enum & type)
+  {
+    if (!CEnum<T>(type).toBuffer(buffer)) ERROR("template <typename T> CBufferOut& operator<<(CBufferOut& buffer, const typename T::t_enum & type)",
+                                                << "Not enough free space in buffer to queue the enum.");
+    return buffer ;
+  }
+  
+  template <typename T>
+  CBufferIn& operator>>(CBufferIn& buffer, CEnum<T>& type)
+  {
+    if (!type.fromBuffer(buffer)) ERROR("template <typename T> CBufferIn& operator>>(CBufferIn& buffer, CEnum<T>& type)",
+                                        << "Not enough data in buffer to unqueue the enum.");
+    return buffer ;
+  }
+  
+/* 
+  template <typename T>
+  CMessage& operator<<(CMessage& msg, const CEnum<T>& type)
+  {
+    msg.push(*type.clone()) ;
+    return msg ;
+  }
+*/
+
+  template <typename T>
+  CMessage& operator<<(CMessage& msg, const typename T::t_enum & type)
+  {
+    msg.push(*CEnum<T>(type).clone()) ;
+    return msg ;
+  }
+  
+}
+
+#endif
+
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/type/enum_ref_impl.hpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/type/enum_ref_impl.hpp	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/type/enum_ref_impl.hpp	(revision 1749)
@@ -0,0 +1,339 @@
+#ifndef __XIOS_ENUM_REF_IMPL__
+#define __XIOS_ENUM_REF_IMPL__
+
+#include "xios_spl.hpp"
+#include "exception.hpp"
+#include "buffer_in.hpp"
+#include "buffer_out.hpp"
+#include "message.hpp"
+#include <string>
+#include <boost/algorithm/string.hpp>
+
+namespace xios
+{
+ 
+    
+  using namespace std;
+  
+  template <typename T>
+  CEnum_ref<T>::CEnum_ref(void)
+  {
+    empty=true ;
+  }
+    
+  template <typename T>
+  CEnum_ref<T>::CEnum_ref(T_enum& val)
+  {
+    empty=true ;
+    set_ref(val) ;
+  }
+  
+  template <typename T>
+  CEnum_ref<T>::CEnum_ref(CEnum<T>& type)
+  {
+    empty=true ;
+    set_ref(type) ;
+  }
+
+  template <typename T>
+  CEnum_ref<T>::CEnum_ref(const CEnum_ref<T>& type)
+  {
+    empty=true ;
+    set_ref(type) ;
+  }  
+
+  
+  template <typename T>
+  void CEnum_ref<T>::set_ref(T_enum& val)
+  {
+    ptrValue=&val ;
+    empty=false ;
+  }
+
+  template <typename T>
+  void CEnum_ref<T>::set_ref(CEnum<T>& type)
+  {
+    ptrValue=&type.get() ;
+    empty=false ;
+  }
+
+  template <typename T>
+  void CEnum_ref<T>::set_ref(const CEnum_ref<T>& type)
+  {
+    ptrValue=type.ptrValue ;
+    empty=type.empty ;
+  }
+
+  template <typename T>
+  void CEnum_ref<T>::set(const T_enum& val) const
+  {
+    checkEmpty() ;
+    *ptrValue=val ;
+  }
+
+  template <typename T>
+  void CEnum_ref<T>::set(const CEnum<T>& type) const
+  {
+    checkEmpty() ;
+    *ptrValue=type.get() ;
+  }
+
+  template <typename T>
+  void CEnum_ref<T>::set(const CEnum_ref<T>& type) const
+  {
+    checkEmpty() ;
+    *ptrValue=type.get() ;
+  }
+  
+  template <typename T>
+  typename T::t_enum & CEnum_ref<T>::get(void) const
+  {
+    checkEmpty() ;
+    return *ptrValue ;
+  }
+  
+  template <typename T>
+  const CEnum_ref<T>& CEnum_ref<T>::operator = (T_enum& val) const
+  {
+    set(val) ;
+    return *this ;
+  }
+
+  template <typename T>
+  const CEnum_ref<T>& CEnum_ref<T>::operator = (CEnum<T>& type) const
+  {
+    set(type) ;
+    return *this ;
+  }
+   
+  template <typename T>
+  const CEnum_ref<T>& CEnum_ref<T>::operator = (const CEnum_ref<T>& type) const
+  {
+    set(type) ;
+    return *this ;
+  }
+  
+  template <typename T>
+  CEnum_ref<T>::operator T_enum&() const
+  {
+    checkEmpty() ;
+    return *ptrValue ;
+  }
+
+  template <typename T>
+  CEnum_ref<T>* CEnum_ref<T>::_clone(void) const
+  {
+    checkEmpty() ;
+    return new CEnum_ref<T>(*this) ;
+  }
+   
+  template <typename T>
+  void CEnum_ref<T>::_fromString(const string& str) const
+  {
+    istringstream iss(str);
+    checkEmpty() ;
+    iss>>*ptrValue ;
+  }
+ 
+  template <typename T>
+  void CEnum_ref<T>::_fromString(const string& str)
+  {
+    checkEmpty() ;
+    string tmpStr=boost::to_lower_copy(boost::trim_copy(str)) ;
+    
+    bool found=false ;
+    for(int i=0;i<T::getSize();i++)
+    {
+      if (boost::to_lower_copy(string(T::getStr()[i]))==tmpStr)
+      {
+        *ptrValue=(T_enum) i ;
+        return ;
+      }
+    }
+    
+    ostringstream strList ;
+    for(int i=0;i<T::getSize();i++) 
+    {
+      if (i>0) strList<<", " ;
+      strList<<boost::to_lower_copy(string(T::getStr()[i])) ;
+    }
+    
+    ERROR("template <typename T> void CEnum_ref<T>::_fromString(const string& str)",
+          << tmpStr << " cannot be converted in a valid enumeration, possibilities are: " << strList.str());
+  }
+  
+  template <typename T>
+  string CEnum_ref<T>::_toString(void) const
+  {
+    if (empty) return string("empty"); 
+    return string((T::getStr())[(int)(*ptrValue)]) ;
+  }
+
+    
+  template <typename T>
+  bool CEnum_ref<T>::_toBuffer(CBufferOut& buffer) const
+  {
+    checkEmpty() ;
+    if (sizeof(*ptrValue)==sizeof(short int)) return buffer.put((short int) *ptrValue) ;
+    else if (sizeof(*ptrValue)==sizeof(int)) return buffer.put((int) *ptrValue) ;
+    else if (sizeof(*ptrValue)==sizeof(long int)) return buffer.put((long int) *ptrValue) ;
+    else ERROR("template <typename T> bool CEnum_ref<T>::_toBuffer(CBufferOut& buffer) const",
+               << "incompatibility between enumeration and standard integer type.");
+    return false ;
+  }
+  
+  template <typename T>
+  bool CEnum_ref<T>::_fromBuffer(CBufferIn& buffer)
+  {
+    checkEmpty() ;
+    bool ret ;
+    if (sizeof(*ptrValue)==sizeof(short int)) 
+    {
+      short int val ;
+      ret=buffer.get(val) ;
+      if (ret) *ptrValue = (T_enum) val ;
+    }
+    else if (sizeof(*ptrValue)==sizeof(int)) 
+    {
+      int val ;
+      ret=buffer.get(val) ;
+      if (ret) *ptrValue = (T_enum) val ;
+    }
+    else if (sizeof(*ptrValue)==sizeof(long int)) 
+    {
+      long int val ;
+      ret=buffer.get(val) ;
+      if (ret) *ptrValue = (T_enum) val ;
+    }
+    else ERROR("template <typename T> bool CEnum_ref<T>::_fromBuffer(CBufferIn& buffer)",
+               << "incompatibility between enumeration and standard integer type.");
+    return ret ;
+  }
+ 
+  template <typename T>
+  bool CEnum_ref<T>::_fromBuffer(CBufferIn& buffer) const
+  {
+    checkEmpty() ;
+    bool ret ;
+    if (sizeof(*ptrValue)==sizeof(short int)) 
+    {
+      short int val ;
+      ret=buffer.get(val) ;
+      if (ret) *ptrValue = (T_enum) val ;
+    }
+    else if (sizeof(*ptrValue)==sizeof(int)) 
+    {
+      int val ;
+      ret=buffer.get(val) ;
+      if (ret) *ptrValue = (T_enum) val ;
+    }
+    else if (sizeof(*ptrValue)==sizeof(long int)) 
+    {
+      long int val ;
+      ret=buffer.get(val) ;
+      if (ret) *ptrValue = (T_enum) val ;
+    }
+    else ERROR("template <typename T> bool CEnum_ref<T>::_fromBuffer(CBufferIn& buffer)",
+               << "incompatibility between enumeration and standard integer type");
+  }
+ 
+  template <typename T>
+  size_t CEnum_ref<T>::_size(void) const
+  {
+    return sizeof(T_enum) ;
+  }
+  
+  template <typename T>
+  bool CEnum_ref<T>::_isEmpty(void) const
+  {
+    return empty ;
+  }
+   
+  template <typename T>
+  void CEnum_ref<T>::_reset(void)
+  {
+      empty=true ;
+  }
+  
+  template <typename T>
+  void CEnum_ref<T>::checkEmpty(void) const
+  {
+    if (empty) ERROR("template <typename T> void CEnum_ref<T>::checkEmpty(void)",
+                     << "Enum reference is not initialized.") ;
+  }
+                     
+  template <typename T> 
+  bool operator== (const CEnum_ref<T>& lhs, const typename T::t_enum& rhs)
+  {
+     if (lhs.isEmpty()) return false;
+     return (lhs.get() == rhs);
+  }
+
+  template <typename T> 
+  bool operator== (const typename T::t_enum& lhs, const CEnum_ref<T>& rhs)
+  {
+    return rhs == lhs;
+  }
+
+  template <typename T> 
+  bool operator== (const CEnum_ref<T>& lhs, const CEnum_ref<T>& rhs)
+  {
+    if ((lhs.isEmpty() && !rhs.isEmpty()) || (!lhs.isEmpty() && rhs.isEmpty())) return false;
+    if (lhs.isEmpty() && rhs.isEmpty()) return true;
+    return (lhs.get() == rhs.get());
+  }
+  
+  template <typename T>
+  CBufferOut& operator<<(CBufferOut& buffer, const CEnum_ref<T>& type)
+  {
+    if (!type.toBuffer(buffer)) ERROR("template <typename T> CBufferOut& operator<<(CBufferOut& buffer, const CEnum_ref<T>& type)",
+                                      << "Not enough free space in buffer to queue the enum.");
+    return buffer ;
+  }
+
+  template <typename T>
+  CBufferOut& operator<<(CBufferOut& buffer, typename T::t_enum& type)
+  {
+    if (!CEnum_ref<T>(type).toBuffer(buffer)) ERROR("template <typename T> CBufferOut& operator<<(CBufferOut& buffer, const typename T::t_enum& type)",
+                                                    << "Not enough free space in buffer to queue the enum.");
+    return buffer ;
+  }
+
+  template <typename T>
+  CBufferIn& operator>>(CBufferIn& buffer, typename T::t_enum& type)
+  {
+    if (!CEnum_ref<T>(type).fromBuffer(buffer)) ERROR("template <typename T>  CBufferIn& operator>>(CBufferIn& buffer, typename T::t_enum& type)",
+                                                      << "Not enough data in buffer to unqueue the enum.");
+    return buffer ;
+  }
+
+  template <typename T>
+  CBufferIn& operator>>(CBufferIn& buffer, const CEnum_ref<T>& type)
+  {
+    if (!type.fromBuffer(buffer)) ERROR("template <typename T> CBufferIn& operator>>(CBufferIn& buffer, const CEnum_ref<T>& type) ",
+                                        << "Not enough data in buffer to unqueue the enum.");
+    return buffer ;
+    return buffer ;
+  }
+
+
+/*
+  template <typename T>
+  CMessage& operator<<(CMessage& msg, const CEnum_ref<T>& type)
+  {
+    msg.push(*type.clone()) ;
+    return msg ;
+  }
+*/
+
+  template <typename T>
+  CMessage& operator<<(CMessage& msg, typename T::t_enum & type)
+  {
+    msg.push(*CEnum_ref<T>(type).clone()) ;
+    return msg ;
+  }
+  
+}
+
+#endif
+
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/type/message.cpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/type/message.cpp	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/type/message.cpp	(revision 1749)
@@ -0,0 +1,107 @@
+#include "xios_spl.hpp"
+#include "message.hpp"
+#include "base_type.hpp"
+#include "buffer_in.hpp"
+#include "buffer_out.hpp"
+
+namespace xios
+{
+
+   CMessage::CMessage(void) {}
+   
+   CMessage& CMessage::push(const CBaseType& type)
+   {
+     typeList.push_back(type.clone());
+     return *this ;
+   }
+   
+//    CMessage& CMessage::push(CBaseType& type)
+//   {
+//     typeList.push_back(&type);
+//     return *this ;
+//   }
+   
+   size_t CMessage::size(void) const
+   {
+     list<CBaseType*>::const_iterator it; 
+     size_t retSize=0 ;
+     
+     for(it=typeList.begin();it!=typeList.end();it++) retSize+=(*it)->size() ;
+     return retSize ;
+   }
+   
+    bool CMessage::fromBuffer(CBufferIn& buffer) const
+    {
+      list<CBaseType*>::const_iterator it; 
+      
+      if (buffer.remain()>=size())
+      {
+        for(it=typeList.begin();it!=typeList.end();it++) (*it)->fromBuffer(buffer) ;
+        return true ;
+      }
+      else
+      {
+        return false ;
+      }
+    }
+    
+
+    bool CMessage::toBuffer(CBufferOut& buffer) const
+    {
+      list<CBaseType*>::const_iterator it; 
+      if (buffer.remain()>=size())
+      {
+        for(it=typeList.begin();it!=typeList.end();it++) (*it)->toBuffer(buffer) ;
+        return true ;
+      }
+      else
+      {
+        return false ;
+      }
+
+    }
+
+    
+    void CMessage::clear()
+    {
+      list<CBaseType*>::iterator it; 
+      for(it=typeList.begin();it!=typeList.end();it++) delete *it ;
+      typeList.clear() ;
+    }
+
+    CMessage::~CMessage()
+    {
+      clear() ;
+    }
+    
+
+    CBufferOut& operator<<(CBufferOut& buffer, CMessage& msg)
+    {
+      if (!msg.toBuffer(buffer)) ERROR("CBufferOut& operator<<(CBufferOut& buffer, CMessage& msg)",
+                                       << "Not enough free space in buffer to queue the message.");
+    return buffer ;
+      return buffer ;
+    }
+
+  
+    CBufferIn& operator>>(CBufferIn& buffer, CMessage& msg)
+    {
+      if (!msg.fromBuffer(buffer)) ERROR("CBufferIn& operator>>(CBufferIn& buffer, CMessage& msg)",
+                                         << "Not enough data in buffer to unqueue the message.");
+    return buffer ;
+      return buffer ;
+    }
+
+  CMessage& operator<<(CMessage& msg,const CBaseType& type)
+ {
+    msg.push(type) ;
+    return msg ;
+  }
+
+//  CMessage& operator<<(CMessage& msg, const CBaseType&  type)
+//  {
+//    msg.push(*type.clone()) ;
+//    return msg ;
+//  } 
+  
+}
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/type/message.hpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/type/message.hpp	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/type/message.hpp	(revision 1749)
@@ -0,0 +1,39 @@
+#ifndef __MESSAGE_HPP__
+#define __MESSAGE_HPP__
+
+#include "xios_spl.hpp"
+#include "exception.hpp"
+#include "base_type.hpp"
+#include "buffer_in.hpp"
+#include "buffer_out.hpp"
+
+
+namespace xios
+{
+
+  class CMessage
+  {
+    public:
+    
+    CMessage(void) ;
+    list<CBaseType*> typeList ;
+    virtual bool fromBuffer(CBufferIn& buffer) const;
+    virtual bool toBuffer(CBufferOut& buffer) const;
+    virtual size_t size(void) const;
+  
+    CMessage& push(const CBaseType& type) ; 
+//    CMessage& push(CBaseType& type) ;
+    void clear(void) ;  
+    ~CMessage() ;    
+  } ;
+  
+  CBufferOut& operator<<(CBufferOut& buffer, CMessage& msg) ;
+  CBufferIn& operator>>(CBufferIn& buffer, CMessage& msg) ;
+
+//  CMessage& operator<<(CMessage& msg,CBaseType& type) ;
+  CMessage& operator<<(CMessage& msg,const CBaseType& type) ;
+ 
+}
+
+#endif
+
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/type/type.hpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/type/type.hpp	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/type/type.hpp	(revision 1749)
@@ -0,0 +1,199 @@
+#ifndef __XIOS_TYPE__
+#define __XIOS_TYPE__
+
+#include "xios_spl.hpp"
+#include "exception.hpp"
+#include "buffer_in.hpp"
+#include "buffer_out.hpp"
+#include "base_type.hpp"
+
+
+namespace xios
+{
+
+  template <typename T> class CType_ref ;
+
+  template <typename T>
+  class CType : public  virtual CBaseType
+  {
+    public:
+
+    CType(void) ;
+    CType(const T& val) ;
+    CType(const CType& type) ;
+    CType(const CType_ref<T>& type) ;
+    virtual ~CType() { _reset() ; }
+
+    T& get(void) ;
+    const T& get(void) const;
+
+    void set(const T& val) ;
+    void set(const CType& val) ;
+    void set(const CType_ref<T>& val) ;
+    CType& operator = (const T& val) ;
+    CType& operator = (const CType& val) ;
+    CType& operator = (const CType_ref<T>& val) ;
+    operator T&() ;
+    operator const T&() const ;
+
+    inline virtual CBaseType* clone(void) const   { return _clone(); }
+    virtual void fromString(const string& str)   { _fromString(str); }
+    virtual string toString(void) const { return _toString(); }
+    virtual string dump(void) const { return _toString(); }
+    virtual bool fromBuffer(CBufferIn& buffer) { return _fromBuffer(buffer) ; }
+    virtual bool toBuffer(CBufferOut& buffer) const { return _toBuffer(buffer); }
+    virtual void reset(void) { _reset(); }
+    virtual bool isEmpty() const { return _isEmpty(); }
+    virtual size_t size(void) const { return _size(); }
+
+    void allocate(void) ;
+    virtual void checkEmpty(void) const {return _checkEmpty();};
+
+    T* ptrValue ;
+    bool empty ;
+
+    friend class CType_ref<T> ;
+
+    private :
+
+    CType* _clone(void) const;
+    void _fromString(const string& str) ;
+    string _toString(void) const;
+    bool _fromBuffer(CBufferIn& buffer) ;
+    bool _toBuffer(CBufferOut& buffer) const;
+    void _reset(void) ;
+    bool _isEmpty() const ;
+    void _checkEmpty(void) const;
+    size_t _size(void) const ;
+
+  } ;
+
+
+  template<typename T> class CType ;
+
+  template <typename T>
+  class CType_ref : public virtual CBaseType
+  {
+    public:
+
+    CType_ref(void) ;
+    CType_ref(T& val) ;
+    CType_ref(CType<T>& type) ;
+    CType_ref(const CType_ref& type) ;
+    virtual ~CType_ref() {};
+
+    T& get(void) const;
+
+    void set(const T& val) const ;
+    void set(const CType<T>& val) const ;
+    void set(const CType_ref& val) const ;
+
+    void set_ref(T& val) ;
+    void set_ref(CType<T>& val) ;
+    void set_ref(const CType_ref& val) ;
+
+    const CType_ref& operator = (T& val) const ;
+    const CType_ref& operator = (CType<T>& val) const ;
+    const CType_ref& operator = (const CType_ref& val) const;
+    operator T&() const;    
+
+    inline virtual CBaseType* clone(void) const   { return _clone(); }
+    virtual void fromString(const string& str)   { _fromString(str); }
+    virtual void fromString(const string& str) const  { _fromString(str); }
+    virtual string toString(void) const { return _toString(); }
+    virtual bool fromBuffer(CBufferIn& buffer) { return _fromBuffer(buffer) ; }
+    virtual bool fromBuffer(CBufferIn& buffer) const { return _fromBuffer(buffer); }
+    virtual bool toBuffer(CBufferOut& buffer) const { return _toBuffer(buffer); }
+    virtual void reset(void) { _reset(); }
+    virtual bool isEmpty() const { return _isEmpty(); }
+    virtual size_t size(void) const { return _size(); }
+
+    void checkEmpty(void) const;
+
+
+    T mutable * ptrValue ;
+    bool empty ;
+    friend class CType<T> ;
+
+    private :
+
+    CType_ref* _clone(void) const;
+    void _fromString(const string& str) ;
+    void _fromString(const string& str) const;
+    string _toString(void) const;
+    bool _fromBuffer(CBufferIn& buffer) ;
+    bool _fromBuffer(CBufferIn& buffer) const ;
+    bool _toBuffer(CBufferOut& buffer) const;
+    void _reset(void) ;
+    bool _isEmpty() const ;
+    size_t _size(void) const ;
+  } ;
+
+  template <typename T> bool operator==(const CType<T>& lhs, const T& rhs);   
+  template <typename T> bool operator==(const T& lhs, const CType<T>& rhs);   
+  template <typename T> bool operator==(const CType_ref<T>& lhs, const T& rhs);   
+  template <typename T> bool operator==(const T& lhs, const CType_ref<T>& rhs); 
+  template <typename T> bool operator==(const CType<T>& lhs, const CType<T>& rhs); 
+  template <typename T> bool operator==(const CType_ref<T>& lhs, const CType_ref<T>& rhs); 
+
+  template <typename T>
+  bool operator==(const CType_ref<T>& lhs, const CType<T>& rhs)
+  {
+    if ((lhs.isEmpty() && !rhs.isEmpty()) || (!lhs.isEmpty() && rhs.isEmpty())) return false;
+    if (lhs.isEmpty() && rhs.isEmpty()) return true;
+    return (*lhs.ptrValue == *rhs.ptrValue);
+  } 
+
+  template <typename T>
+  bool operator==(const CType<T>& lhs, const CType_ref<T>& rhs)
+  {
+    return (rhs == lhs);
+  }
+
+
+  class CMessage ;
+
+  template <typename T>
+  CBufferOut& operator<<(CBufferOut& buffer, const CType<T>& type) ;
+
+  template <typename T>
+  CBufferOut& operator<<(CBufferOut& buffer, const CType_ref<T>& type) ;
+
+  template <typename T>
+  CBufferOut& operator<<(CBufferOut& buffer, const T& type) ;
+
+  template <typename T>
+  CBufferOut& operator<<(CBufferOut& buffer, T& type) ;
+
+
+  template <typename T>
+  CBufferIn& operator>>(CBufferIn& buffer, CType<T>& type) ;
+
+  template <typename T>
+  CBufferIn& operator>>(CBufferIn& buffer, const CType_ref<T>& type) ;
+
+  template <typename T>
+  CBufferIn& operator>>(CBufferIn& buffer, T& type) ;
+
+/*
+  template <typename T>
+  CMessage& operator<<(CMessage& msg, const CType<T>& type) ;
+
+  template <typename T>
+  CMessage& operator<<(CMessage& msg, const CType_ref<T>& type) ;
+*/
+
+  template <typename T>
+  CMessage& operator<<(CMessage& msg, const T& type) ;
+
+  template <typename T>
+  CMessage& operator<<(CMessage& msg, T& type) ;
+
+}
+
+
+//#include "test_type_impl.hpp"
+//#include "test_type_specialisation.hpp"
+
+#endif
+
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/type/type_decl.cpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/type/type_decl.cpp	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/type/type_decl.cpp	(revision 1749)
@@ -0,0 +1,41 @@
+#include "type.hpp"
+#include "type_impl.hpp"
+#include "type_ref_impl.hpp"
+#include "type_specialisation.hpp"
+#include <string>
+#include "date.hpp"
+#include "xios_spl.hpp"
+
+namespace xios
+{
+#define macro(decl_type)         \
+  template class CType<decl_type> ; \
+  template class CType_ref<decl_type> ; \
+  template CBufferOut& operator<< <decl_type> (CBufferOut& buffer, const CType<decl_type>& type) ;       \
+  template CBufferOut& operator<< <decl_type> (CBufferOut& buffer, const CType_ref<decl_type>& type) ;   \
+  template CBufferOut& operator<< <decl_type> (CBufferOut& buffer, decl_type& type) ;                    \
+  template CBufferOut& operator<< <decl_type> (CBufferOut& buffer, const decl_type& type) ;              \
+  template CBufferIn& operator>> <decl_type> (CBufferIn& buffer, CType<decl_type>& type) ;               \
+  template CBufferIn& operator>> <decl_type> (CBufferIn& buffer, const CType_ref<decl_type>& type) ;     \
+  template CBufferIn& operator>> <decl_type> (CBufferIn& buffer, decl_type& type) ;                      \
+/*  template CMessage& operator<< <decl_type> (CMessage& msg, const CType<decl_type>& type) ;*/          \
+/*  template CMessage& operator<< <decl_type> (CMessage& msg, const CType_ref<decl_type>& type) ;*/      \
+  template CMessage& operator<< <decl_type> (CMessage& msg, const decl_type& type) ;                     \
+  template CMessage& operator<< <decl_type> (CMessage& msg, decl_type& type) ;                           \
+  template bool operator==(const CType<decl_type>& lhs, const decl_type& rhs);                           \
+  template bool operator==(const decl_type& lhs, const CType<decl_type>& rhs);                           \
+  template bool operator==(const CType_ref<decl_type>& lhs, const decl_type& rhs);                       \
+  template bool operator==(const decl_type& lhs, const CType_ref<decl_type>& rhs);                       \
+  template bool operator==(const CType_ref<decl_type>& lhs, const CType<decl_type>& rhs);                \
+  template bool operator==(const CType<decl_type>& lhs, const CType_ref<decl_type>& rhs);                \
+  template bool operator==(const CType<decl_type>& lhs, const CType<decl_type>& rhs);                    \
+  template bool operator==(const CType_ref<decl_type>& lhs, const CType_ref<decl_type>& rhs);    
+  
+  macro(string)
+  macro(int)
+  macro(double)
+  macro(bool)
+  macro(StdSize)
+  macro(CDate)
+  macro(CDuration)
+}
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/type/type_impl.hpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/type/type_impl.hpp	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/type/type_impl.hpp	(revision 1749)
@@ -0,0 +1,269 @@
+#ifndef __XIOS_TYPE_IMPL__
+#define __XIOS_TYPE_IMPL__
+
+#include "xios_spl.hpp"
+#include "exception.hpp"
+#include "buffer_in.hpp"
+#include "buffer_out.hpp"
+#include "message.hpp"
+
+
+
+
+namespace xios
+{
+
+  using namespace std;
+
+  template <typename T>
+  CType<T>::CType(void)
+  {
+    empty=true ;
+  }
+
+  template <typename T>
+  CType<T>::CType(const T& val)
+  {
+    empty=true ;
+    set(val) ;
+  }
+
+  template <typename T>
+  CType<T>::CType(const CType<T>& type)
+  {
+    empty=true ;
+    set(type) ;
+  }
+
+  template <typename T>
+  CType<T>::CType(const CType_ref<T>& type)
+  {
+    empty=true ;
+    set(type) ;
+  }
+
+  template <typename T>
+  void CType<T>::set(const T& val)
+  {
+    if (empty)
+    {
+      ptrValue = new T(val) ;
+      empty=false ;
+    }
+    else *ptrValue = val ;
+  }
+
+  template <typename T>
+  void CType<T>::set(const CType<T>& type)
+  {
+    if (type.isEmpty()) reset() ;
+    else
+    {
+      if (empty)
+      {
+        ptrValue = new T(*type.ptrValue) ;
+        empty=false ;
+      }
+      else *ptrValue = *type.ptrValue ;
+    }
+  }
+
+  template <typename T>
+  void CType<T>::set(const CType_ref<T>& type)
+  {
+    if (type.isEmpty()) reset() ;
+    else
+    {
+      if (empty)
+      {
+        ptrValue = new T(*type.ptrValue) ;
+        empty=false ;
+      }
+      else *ptrValue = *type.ptrValue ;
+    }
+  }
+
+  template <typename T>
+  T& CType<T>::get(void)
+  {
+    this->checkEmpty();
+   return *ptrValue ;
+  }
+
+  template <typename T>
+  const T& CType<T>::get(void) const
+  {
+    this->checkEmpty();
+    return *ptrValue ;
+  }
+
+  template <typename T>
+  CType<T>& CType<T>::operator = (const T& val)
+  {
+    set(val) ;
+    return *this ;
+  }
+
+  template <typename T>
+  CType<T>& CType<T>::operator = (const CType<T>& type)
+  {
+    set(type) ;
+    return *this ;
+  }
+
+  template <typename T>
+  CType<T>& CType<T>::operator = (const CType_ref<T>& type)
+  {
+    set(type) ;
+    return *this ;
+  }
+
+   template <typename T>
+   CType<T>::operator T&()
+   {
+     this->checkEmpty();
+     return *ptrValue ;
+   }
+
+   template <typename T>
+   CType<T>::operator const T&() const
+   {
+    this->checkEmpty();
+    return *ptrValue ;
+   }
+
+   template <typename T>
+   CType<T>* CType<T>::_clone(void) const
+   {
+     this->checkEmpty();
+     return new CType(*this) ;
+   }
+
+
+  template <typename T>
+  void CType<T>::_fromString(const string& str)
+  {
+    istringstream iss(str);
+    allocate() ;
+    iss>>*ptrValue ;
+  }
+
+  template <typename T>
+  size_t CType<T>::_size(void) const
+  {
+    return sizeof(T) ;
+  }
+
+  template <typename T>
+  bool CType<T>::_isEmpty(void) const
+  {
+    return empty ;
+  }
+
+  template <typename T>
+  string CType<T>::_toString(void) const
+  {
+    ostringstream oss;
+    this->checkEmpty();
+    oss<<*ptrValue ;
+    return oss.str() ;
+  }
+
+  template <typename T>
+  bool CType<T>::_toBuffer(CBufferOut& buffer) const
+  {
+    this->checkEmpty();
+    return buffer.put(*ptrValue) ;
+  }
+
+  template <typename T>
+  bool CType<T>::_fromBuffer(CBufferIn& buffer)
+  {
+    allocate() ;
+    return buffer.get(*ptrValue) ;
+  }
+
+
+  template <typename T>
+  void CType<T>::allocate(void)
+  {
+    if (empty)
+    {
+      ptrValue = new T ;
+      empty=false ;
+    }
+  }
+
+  template <typename T>
+  void CType<T>::_reset(void)
+  {
+    if (!empty)
+    {
+      delete ptrValue ;
+      empty=true ;
+    }
+  }
+
+  template <typename T>
+  void CType<T>::_checkEmpty(void) const
+  {
+    if (empty) ERROR("template <typename T> void CType<T>::checkEmpty(void) const", << "Data is not initialized") ;
+  }
+
+  template <typename T>
+  bool operator==(const CType<T>& lhs, const T& rhs)
+  {
+    if (lhs.isEmpty()) return false;
+    return (*lhs.ptrValue == rhs);    
+  }
+
+  template <typename T>
+  bool operator==(const T& lhs, const CType<T>& rhs)
+  {
+    return (rhs == lhs);
+  }
+
+  template <typename T>
+  bool operator==(const CType<T>& lhs, const CType<T>& rhs)
+  {
+    if ((lhs.isEmpty() && !rhs.isEmpty()) || (!lhs.isEmpty() && rhs.isEmpty())) return false;
+    if (lhs.isEmpty() && rhs.isEmpty()) return true;
+    
+    return (*lhs.ptrValue == *rhs.ptrValue);
+  }
+
+  template <typename T>
+  CBufferOut& operator<<(CBufferOut& buffer, const CType<T>& type)
+  {
+    if (!type.toBuffer(buffer)) ERROR("CBuffer& operator<<(CBuffer& buffer, CType<T>& type)",
+                                      << "Not enough free space in buffer to queue the data.");
+    return buffer ;
+  }
+
+
+  template <typename T>
+  CBufferOut& operator<<(CBufferOut& buffer, const T& type)
+  {
+    if (!CType<T>(type).toBuffer(buffer)) ERROR("operator<<(CBuffer& buffer, const T& type)",
+                                                << "Not enough free space in buffer to queue the data.");
+    return buffer ;
+  }
+
+  template <typename T>
+  CBufferIn& operator>>(CBufferIn& buffer, CType<T>& type)
+  {
+    if (! type.fromBuffer(buffer)) ERROR("CBuffer& operator<<(CBuffer& buffer, CType<T>& type)",
+                                         << "Not enough data in buffer to unqueue the data.");
+    return buffer ;
+  }
+
+  template <typename T>
+  CMessage& operator<<(CMessage& msg, const T& type)
+  {
+    msg.push(CType<T>(type)) ;
+    return msg ;
+  }
+
+}
+
+#endif
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/type/type_ref_impl.hpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/type/type_ref_impl.hpp	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/type/type_ref_impl.hpp	(revision 1749)
@@ -0,0 +1,266 @@
+
+#ifndef __XIOS_TYPE_REF_IMPL__
+#define __XIOS_TYPE_REF_IMPL__
+
+#include "xios_spl.hpp"
+#include "exception.hpp"
+#include "buffer_in.hpp"
+#include "buffer_out.hpp"
+#include "message.hpp"
+#include "type.hpp"
+
+
+
+namespace xios
+{
+    
+  using namespace std;
+  
+  template <typename T>
+  CType_ref<T>::CType_ref(void)
+  {
+    empty=true ;
+  }
+    
+  template <typename T>
+  CType_ref<T>::CType_ref(T& val)
+  {
+    empty=true ;
+    set_ref(val) ;
+  }
+  
+  template <typename T>
+  CType_ref<T>::CType_ref(CType<T>& type)
+  {
+    empty=true ;
+    set_ref(type) ;
+  }
+
+  template <typename T>
+  CType_ref<T>::CType_ref(const CType_ref<T>& type)
+  {
+    empty=true ;
+    set_ref(type) ;
+  }  
+
+  
+  template <typename T>
+  void CType_ref<T>::set_ref(T& val)
+  {
+    ptrValue=&val ;
+    empty=false ;
+  }
+
+  template <typename T>
+  void CType_ref<T>::set_ref(CType<T>& type)
+  {
+    ptrValue=&type.get() ;
+    empty=false ;
+  }
+
+  template <typename T>
+  void CType_ref<T>::set_ref(const CType_ref<T>& type)
+  {
+    ptrValue=type.ptrValue ;
+    empty=type.empty ;
+  }
+
+  template <typename T>
+  void CType_ref<T>::set(const T& val) const
+  {
+    checkEmpty() ;
+    *ptrValue=val ;
+  }
+
+  template <typename T>
+  void CType_ref<T>::set(const CType<T>& type) const
+  {
+    checkEmpty() ;
+    *ptrValue=type.get() ;
+  }
+
+  template <typename T>
+  void CType_ref<T>::set(const CType_ref<T>& type) const
+  {
+    checkEmpty() ;
+    *ptrValue=type.get() ;
+  }
+  
+  template <typename T>
+  T& CType_ref<T>::get(void) const
+  {
+    checkEmpty() ;
+    return *ptrValue ;
+  }
+  
+  template <typename T>
+  const CType_ref<T>& CType_ref<T>::operator = (T& val) const
+  {
+    set(val) ;
+    return *this ;
+  }
+
+  template <typename T>
+  const CType_ref<T>& CType_ref<T>::operator = (CType<T>& type) const
+  {
+    set(type) ;
+    return *this ;
+  }
+   
+  template <typename T>
+  const CType_ref<T>& CType_ref<T>::operator = (const CType_ref<T>& type) const
+  {
+    set(type) ;
+    return *this ;
+  }
+  
+  template <typename T>
+  CType_ref<T>::operator T&() const
+  {
+    checkEmpty() ;
+    return *ptrValue ;
+  }
+
+  template <typename T>
+  CType_ref<T>* CType_ref<T>::_clone(void) const
+  {
+    checkEmpty() ;
+    return new CType_ref<T>(*this) ;
+  }
+   
+  template <typename T>
+  void CType_ref<T>::_fromString(const string& str) const
+  {
+    istringstream iss(str);
+    checkEmpty() ;
+    iss>>*ptrValue ;
+  }
+ 
+  template <typename T>
+  void CType_ref<T>::_fromString(const string& str)
+  {
+    istringstream iss(str);
+    checkEmpty() ;
+    iss>>*ptrValue ;
+  }
+  
+  template <typename T>
+  string CType_ref<T>::_toString(void) const
+  {
+    ostringstream oss;
+    checkEmpty() ;
+    oss<<*ptrValue ;
+    return oss.str() ;
+  }
+
+    
+  template <typename T>
+  bool CType_ref<T>::_toBuffer(CBufferOut& buffer) const
+  {
+    checkEmpty() ;
+    return buffer.put(*ptrValue) ;
+  }
+  
+  template <typename T>
+  bool CType_ref<T>::_fromBuffer(CBufferIn& buffer)
+  {
+    checkEmpty() ;
+    return buffer.get(*ptrValue) ;
+  }
+ 
+  template <typename T>
+  bool CType_ref<T>::_fromBuffer(CBufferIn& buffer) const
+  {
+    checkEmpty() ;
+    return buffer.get(*ptrValue) ;
+  }
+ 
+  template <typename T>
+  size_t CType_ref<T>::_size(void) const
+  {
+    return sizeof(T) ;
+  }
+  
+  template <typename T>
+  bool CType_ref<T>::_isEmpty(void) const
+  {
+    return empty ;
+  }
+   
+  template <typename T>
+  void CType_ref<T>::_reset(void)
+  {
+      empty=true ;
+  }
+  
+  template <typename T>
+  void CType_ref<T>::checkEmpty(void) const
+  {
+    if (empty) ERROR("template <typename T> void CType_ref<T>::checkEmpty(void)",
+                     <<"Data reference is not initialized.") ;
+  }
+                     
+  template <typename T>
+  bool operator==(const CType_ref<T>& lhs, const T& rhs)
+  {
+    if (lhs.isEmpty()) return false;
+    return (*lhs.ptrValue == rhs);    
+  }
+
+  template <typename T>
+  bool operator==(const T& lhs, const CType_ref<T>& rhs)
+  {
+    return (rhs == lhs);
+  }
+
+  template <typename T>
+  bool operator==(const CType_ref<T>& lhs, const CType_ref<T>& rhs)
+  {
+    if ((lhs.isEmpty() && !rhs.isEmpty()) || (!lhs.isEmpty() && rhs.isEmpty())) return false;
+    if (lhs.isEmpty() && rhs.isEmpty()) return true;
+    
+    return (*lhs.ptrValue == *rhs.ptrValue);
+  }
+  
+  template <typename T>
+  CBufferOut& operator<<(CBufferOut& buffer, const CType_ref<T>& type)
+  {
+    if (!type.toBuffer(buffer)) ERROR("CBuffer& operator<<(CBuffer& buffer, CType<T>& type)",
+                                      << "Not enough free space in buffer to queue the data.");
+    return buffer ;
+  }
+
+  template <typename T>
+  CBufferOut& operator<<(CBufferOut& buffer, T& type)
+  {
+    if (!CType_ref<T>(type).toBuffer(buffer)) ERROR("CBufferOut& operator<<(CBufferOut& buffer, T& type)",
+                                                    << "Not enough free space in buffer to queue the data.");
+    return buffer ;
+  }
+
+  template <typename T>
+  CBufferIn& operator>>(CBufferIn& buffer, T& type)
+  {
+    if (! CType_ref<T>(type).fromBuffer(buffer)) ERROR(" template <typename T> CBufferIn& operator>>(CBufferIn& buffer, T& type)",
+                                                       << "Not enough data in buffer to unqueue the data.");
+    return buffer ;
+  }
+
+  template <typename T>
+  CBufferIn& operator>>(CBufferIn& buffer, const CType_ref<T>& type)
+  {
+    if (! type.fromBuffer(buffer) ) ERROR("CBuffer& operator<<(CBuffer& buffer, CType<T>& type)",
+                                          << "Not enough data in buffer to unqueue the data.");
+    return buffer ;
+  }
+
+  template <typename T>
+  CMessage& operator<<(CMessage& msg, T& type)
+  {
+    msg.push(CType_ref<T>(type)) ;
+    return msg ;
+  }
+  
+}
+
+#endif
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/type/type_specialisation.hpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/type/type_specialisation.hpp	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/type/type_specialisation.hpp	(revision 1749)
@@ -0,0 +1,542 @@
+#ifndef __XIOS_TYPE_SPECIALISATION_HPP__
+#define __XIOS_TYPE_SPECIALISATION_HPP__
+
+#include "xios_spl.hpp"
+#include "exception.hpp"
+#include "buffer_in.hpp"
+#include "buffer_out.hpp"
+#include "type.hpp"
+#include <string>
+#include <boost/algorithm/string.hpp>
+#include "date.hpp"
+ 
+namespace xios
+{
+
+// template specialization for bool
+
+  template <> void CType<bool>::_fromString(const string& str)
+  {
+    string tmpStr=boost::to_lower_copy(boost::trim_copy(str)) ;
+    if (tmpStr=="true" || tmpStr==".true." || tmpStr=="yes" || tmpStr=="y") set(true) ;
+    else if (tmpStr=="false" || tmpStr==".false." || tmpStr=="no" || tmpStr=="n") set(false) ;
+    else ERROR("template <> CType<bool>::fromString(const string& str)",<< tmpStr << " cannot be converted in a boolean value") ;
+  }
+  
+  template <> string CType<bool>::_toString(void) const
+  {
+    if (get()) return string("true") ;
+    else return string("false") ;
+  }
+ 
+  template <> void CType_ref<bool>::_fromString(const string& str) const
+  {
+    string tmpStr=boost::to_lower_copy(boost::trim_copy(str)) ;
+    if (tmpStr=="true" || tmpStr==".true." || tmpStr=="yes" || tmpStr=="y") set(true) ;
+    else if (tmpStr=="false" || tmpStr==".false." || tmpStr=="no" || tmpStr=="n") set(false) ;
+    else ERROR("template <> CType<bool>::fromString(const string& str)",<< tmpStr << " cannot be converted in a boolean value") ;
+  }
+ 
+  template <> void CType_ref<bool>::_fromString(const string& str)
+  {
+    string tmpStr=boost::to_lower_copy(boost::trim_copy(str)) ;
+    if (tmpStr=="true" || tmpStr==".true." || tmpStr=="yes" || tmpStr=="y") set(true) ;
+    else if (tmpStr=="false" || tmpStr==".false." || tmpStr=="no" || tmpStr=="n") set(false) ;
+    else ERROR("template <> CType<bool>::fromString(const string& str)",<< tmpStr << " cannot be converted in a boolean value") ;
+  }
+  
+  template <> string CType_ref<bool>::_toString(void) const
+  {
+    if (get()) return string("true") ;
+    else return string("false") ;
+  }
+
+// template specialization for string
+
+  template <>
+  size_t CType<string>::_size() const
+  {
+    size_t typeSize=0 ;
+    typeSize+=sizeof(size_t) ;
+    typeSize+=ptrValue->size() ;
+    return typeSize ;
+  }
+
+  template <>
+  size_t CType_ref<string>::_size() const
+  {
+    size_t typeSize=0 ;
+    typeSize+=sizeof(size_t) ;
+    typeSize+=ptrValue->size() ;
+    return typeSize ;
+  }
+  
+  template <>
+  void CType<string>::_fromString(const string& str)
+  {
+    allocate() ;
+    *ptrValue=str ;
+  }  
+
+  template <>
+  void CType_ref<string>::_fromString(const string& str)
+  {
+    checkEmpty() ;
+    *ptrValue=str ;
+  }  
+
+  template <>
+  void CType_ref<string>::_fromString(const string& str) const
+  {
+    checkEmpty() ;
+    *ptrValue=str ;
+  }  
+  
+  template <>
+  bool CType<string>::_toBuffer(CBufferOut& buffer) const
+  {
+    if (buffer.remain()<size()) return false ;
+    else
+    {
+      bool ret=true ;
+      if (ret) ret&=buffer.put(ptrValue->size()) ;
+      if (ret) ret&=buffer.put(ptrValue->data(),ptrValue->size()) ;
+      return ret ;
+    }
+  }
+  
+  template <>
+  bool CType_ref<string>::_toBuffer(CBufferOut& buffer) const
+  {
+    if (buffer.remain()<size()) return false ;
+    else
+    {
+      bool ret=true ;
+      if (ret) ret&=buffer.put(ptrValue->size()) ;
+      if (ret) ret&=buffer.put(ptrValue->data(),ptrValue->size()) ;
+      return ret ;
+    }
+  }
+  
+  
+  
+  template <>
+  bool CType<string>::_fromBuffer(CBufferIn& buffer)
+  {
+    allocate() ;
+    bool ret=true ;
+    size_t typeSize ;
+    if (ret) ret&=buffer.get(typeSize) ;
+    
+    char* str;
+    str= (char*) buffer.ptr() ;
+    if (ret) buffer.advance(typeSize) ;
+    if (ret) *ptrValue=string(str,typeSize) ;
+    
+    return ret ;
+  }  
+
+  template <>
+  bool CType_ref<string>::_fromBuffer(CBufferIn& buffer) const
+  {
+    bool ret=true ;
+    size_t typeSize ;
+    if (ret) ret&=buffer.get(typeSize) ;
+    
+    char* str;
+    str= (char*) buffer.ptr() ;
+    if (ret) buffer.advance(typeSize) ;
+    if (ret) *ptrValue=string(str,typeSize) ;
+    
+    return ret ;
+  }   
+
+  template <>
+  bool CType_ref<string>::_fromBuffer(CBufferIn& buffer)
+  {
+    bool ret=true ;
+    size_t typeSize ;
+    if (ret) ret&=buffer.get(typeSize) ;
+    
+    char* str;
+    str= (char*) buffer.ptr() ;
+    if (ret) buffer.advance(typeSize) ;
+    if (ret) *ptrValue=string(str,typeSize) ;
+    
+    return ret ;
+  }     
+
+// template specializations for CDate
+
+  template <>
+  size_t CType<CDate>::_size() const
+  {
+    return 6 * sizeof(int);
+  }
+
+  template <>
+  size_t CType_ref<CDate>::_size() const
+  {
+    return 6 * sizeof(int);
+  }
+
+  template <>
+  bool CType<CDate>::_toBuffer(CBufferOut& buffer) const
+  {
+    if (buffer.remain() < size()) return false;
+    else
+    {
+      bool ret = true;
+      if (ret) ret &= buffer.put(ptrValue->getYear());
+      if (ret) ret &= buffer.put(ptrValue->getMonth());
+      if (ret) ret &= buffer.put(ptrValue->getDay());
+      if (ret) ret &= buffer.put(ptrValue->getHour());
+      if (ret) ret &= buffer.put(ptrValue->getMinute());
+      if (ret) ret &= buffer.put(ptrValue->getSecond());
+      return ret;
+    }
+  }
+  
+  template <>
+  bool CType_ref<CDate>::_toBuffer(CBufferOut& buffer) const
+  {
+    if (buffer.remain() < size()) return false;
+    else
+    {
+      bool ret = true;
+      if (ret) ret &= buffer.put(ptrValue->getYear());
+      if (ret) ret &= buffer.put(ptrValue->getMonth());
+      if (ret) ret &= buffer.put(ptrValue->getDay());
+      if (ret) ret &= buffer.put(ptrValue->getHour());
+      if (ret) ret &= buffer.put(ptrValue->getMinute());
+      if (ret) ret &= buffer.put(ptrValue->getSecond());
+      return ret;
+    }
+  }
+
+  template <>
+  bool CType<CDate>::_fromBuffer(CBufferIn& buffer)
+  {
+    allocate();
+    bool ret = true;
+
+    int year, month, day, hour, min, sec;
+    if (ret) ret &= buffer.get(year);
+    if (ret) ret &= buffer.get(month);
+    if (ret) ret &= buffer.get(day);
+    if (ret) ret &= buffer.get(hour);
+    if (ret) ret &= buffer.get(min);
+    if (ret) ret &= buffer.get(sec);
+    if (ret)
+    {
+      ptrValue->setYear(year);
+      ptrValue->setMonth(month);
+      ptrValue->setDay(day);
+      ptrValue->setHour(hour);
+      ptrValue->setMinute(min);
+      ptrValue->setSecond(sec);
+    }
+
+    return ret;
+  }
+
+  template <>
+  bool CType_ref<CDate>::_fromBuffer(CBufferIn& buffer) const
+  {
+    bool ret = true;
+    
+    int year, month, day, hour, min, sec;
+    if (ret) ret &= buffer.get(year);
+    if (ret) ret &= buffer.get(month);
+    if (ret) ret &= buffer.get(day);
+    if (ret) ret &= buffer.get(hour);
+    if (ret) ret &= buffer.get(min);
+    if (ret) ret &= buffer.get(sec);
+    if (ret)
+    {
+      ptrValue->setYear(year);
+      ptrValue->setMonth(month);
+      ptrValue->setDay(day);
+      ptrValue->setHour(hour);
+      ptrValue->setMinute(min);
+      ptrValue->setSecond(sec);
+    }
+
+    return ret;
+  }
+
+  template <>
+  bool CType_ref<CDate>::_fromBuffer(CBufferIn& buffer)
+  {
+    bool ret = true;
+    
+    int year, month, day, hour, min, sec;
+    if (ret) ret &= buffer.get(year);
+    if (ret) ret &= buffer.get(month);
+    if (ret) ret &= buffer.get(day);
+    if (ret) ret &= buffer.get(hour);
+    if (ret) ret &= buffer.get(min);
+    if (ret) ret &= buffer.get(sec);
+    if (ret)
+    {
+      ptrValue->setYear(year);
+      ptrValue->setMonth(month);
+      ptrValue->setDay(day);
+      ptrValue->setHour(hour);
+      ptrValue->setMinute(min);
+      ptrValue->setSecond(sec);
+    }
+
+    return ret;
+  }
+
+// template specializations for CDuration
+
+  template <>
+  size_t CType<CDuration>::_size() const
+  {
+    return 7 * sizeof(double);
+  }
+
+  template <>
+  size_t CType_ref<CDuration>::_size() const
+  {
+    return 7 * sizeof(double);
+  }
+
+  template <>
+  bool CType<CDuration>::_toBuffer(CBufferOut& buffer) const
+  {
+    if (buffer.remain() < size()) return false;
+    else
+    {
+      bool ret = true;
+      if (ret) ret &= buffer.put(ptrValue->year);
+      if (ret) ret &= buffer.put(ptrValue->month);
+      if (ret) ret &= buffer.put(ptrValue->day);
+      if (ret) ret &= buffer.put(ptrValue->hour);
+      if (ret) ret &= buffer.put(ptrValue->minute);
+      if (ret) ret &= buffer.put(ptrValue->second);
+      if (ret) ret &= buffer.put(ptrValue->timestep);
+      return ret;
+    }
+  }
+  
+  template <>
+  bool CType_ref<CDuration>::_toBuffer(CBufferOut& buffer) const
+  {
+    if (buffer.remain() < size()) return false;
+    else
+    {
+      bool ret = true;
+      if (ret) ret &= buffer.put(ptrValue->year);
+      if (ret) ret &= buffer.put(ptrValue->month);
+      if (ret) ret &= buffer.put(ptrValue->day);
+      if (ret) ret &= buffer.put(ptrValue->hour);
+      if (ret) ret &= buffer.put(ptrValue->minute);
+      if (ret) ret &= buffer.put(ptrValue->second);
+      if (ret) ret &= buffer.put(ptrValue->timestep);
+      return ret;
+    }
+  }
+
+  template <>
+  bool CType<CDuration>::_fromBuffer(CBufferIn& buffer)
+  {
+    allocate();
+    bool ret = true;
+
+    if (ret) ret &= buffer.get(ptrValue->year);
+    if (ret) ret &= buffer.get(ptrValue->month);
+    if (ret) ret &= buffer.get(ptrValue->day);
+    if (ret) ret &= buffer.get(ptrValue->hour);
+    if (ret) ret &= buffer.get(ptrValue->minute);
+    if (ret) ret &= buffer.get(ptrValue->second);
+    if (ret) ret &= buffer.get(ptrValue->timestep);
+
+    return ret;
+  }
+
+  template <>
+  bool CType_ref<CDuration>::_fromBuffer(CBufferIn& buffer) const
+  {
+    bool ret = true;
+    
+    if (ret) ret &= buffer.get(ptrValue->year);
+    if (ret) ret &= buffer.get(ptrValue->month);
+    if (ret) ret &= buffer.get(ptrValue->day);
+    if (ret) ret &= buffer.get(ptrValue->hour);
+    if (ret) ret &= buffer.get(ptrValue->minute);
+    if (ret) ret &= buffer.get(ptrValue->second);
+    if (ret) ret &= buffer.get(ptrValue->timestep);
+
+    return ret;
+  }
+
+  template <>
+  bool CType_ref<CDuration>::_fromBuffer(CBufferIn& buffer)
+  {
+    bool ret = true;
+    
+    if (ret) ret &= buffer.get(ptrValue->year);
+    if (ret) ret &= buffer.get(ptrValue->month);
+    if (ret) ret &= buffer.get(ptrValue->day);
+    if (ret) ret &= buffer.get(ptrValue->hour);
+    if (ret) ret &= buffer.get(ptrValue->minute);
+    if (ret) ret &= buffer.get(ptrValue->second);
+    if (ret) ret &= buffer.get(ptrValue->timestep);
+
+    return ret;
+  }
+
+  // template specialisation for CArray
+/*
+  template<>
+  size_t CType< ARRAY(int, 1)>::size() const
+  {
+     return (*(this->ptrValue))->getSize() ;
+  }
+  
+  template <>
+  bool CType<ARRAY(int, 1)>::toBuffer(CBufferOut& buffer) const
+  {
+      return (*(this->ptrValue))->toBuffer(buffer) ;
+  }
+
+  template <>
+  bool CType<ARRAY(int, 1)>::fromBuffer(CBufferIn& buffer) const
+  {
+    return (*(this->ptrValue))->fromBuffer(buffer) ;
+  }
+
+  template <>
+  void CType<ARRAY(int, 1)>::fromString(const string& str) const
+  {
+ // to implement
+  }
+
+  template <>
+  string CType<ARRAY(int, 1)>::toString(void) const
+  {
+ // to implement
+   return string("") ;
+ 
+  }
+*/
+
+
+/*
+template<size_t numDim>
+boost::detail::multi_array::extent_gen<numDim> getExtentNull(void) { return getExtentNull<numDim-1>()[0];}
+
+template<>
+boost::detail::multi_array::extent_gen<1> getExtentNull<1>(void) { return extents[0]; }
+*/
+/*
+#define CTYPE_ARRAY(ValueType,NumsDims)                                \
+                                                                       \
+  template <>                                                          \
+  void CType<ARRAY(ValueType,NumsDims)>::allocate(void)  \
+  {                                                                    \
+    if (empty) ptrValue=new shared_ptr<CArray<ValueType, NumsDims> >(new  CArray<ValueType, NumsDims>()) ;\
+    empty=false ;                                                      \
+  }                                                                    \
+                                                                        \   
+  template<>                                                           \
+  size_t CType< ARRAY(ValueType,NumsDims)>::_size() const               \
+  {                                                                    \
+     return (*(this->ptrValue))->getSize() ;                           \
+  }                                                                    \
+                                                                       \
+  template<>                                                           \
+  size_t CType_ref< ARRAY(ValueType,NumsDims)>::_size() const           \
+  {                                                                    \
+     return (*(this->ptrValue))->getSize() ;                           \
+  }                                                                    \
+                                                                       \
+  template <>                                                          \
+  bool CType<ARRAY(ValueType,NumsDims)>::_toBuffer(CBufferOut& buffer) const        \
+  {                                                                    \
+      return (*(this->ptrValue))->toBuffer(buffer) ;                   \
+  }                                                                    \
+                                                                       \
+  template <>                                                          \
+  bool CType_ref<ARRAY(ValueType,NumsDims)>::_toBuffer(CBufferOut& buffer) const        \
+  {                                                                    \
+      return (*(this->ptrValue))->toBuffer(buffer) ;                   \
+  }                                                                    \
+                                                                       \
+  template <>                                                          \
+  bool CType<ARRAY(ValueType,NumsDims)>::_fromBuffer(CBufferIn& buffer)       \
+  {                                                                    \
+    allocate();                                                        \
+    return (*(ptrValue))->fromBuffer(buffer) ;                         \
+  }                                                                    \
+                                                                       \
+  template <>                                                          \
+  bool CType_ref<ARRAY(ValueType,NumsDims)>::_fromBuffer(CBufferIn& buffer) const  \
+  {                                                                    \
+    checkEmpty() ;                                                     \ 
+    return (*(this->ptrValue))->fromBuffer(buffer) ;                   \
+  }                                                                    \
+                                                                       \
+ template <>                                                          \
+  bool CType_ref<ARRAY(ValueType,NumsDims)>::_fromBuffer(CBufferIn& buffer)   \
+  {                                                                    \
+    shared_ptr<CArray<ValueType, NumsDims> > tmp(new CArray<ValueType, NumsDims>() ) ; \
+    *(this->ptrValue)=tmp ;\
+    return (*(this->ptrValue))->fromBuffer(buffer) ;                   \
+  }                                                                    \
+                                                                       \
+                                                                       \
+  template <>                                                          \
+  void CType<ARRAY(ValueType,NumsDims)>::_fromString(const string& str)       \
+  {                                                                    \
+                                      \
+  }                                                                    \
+                                                                       \
+  template <>                                                          \
+  void CType_ref<ARRAY(ValueType,NumsDims)>::_fromString(const string& str) const \
+  {                                                                    \
+                                        \
+  }                                                                    \
+  template <>                                                          \
+  void CType_ref<ARRAY(ValueType,NumsDims)>::_fromString(const string& str) \
+  {                                                                    \
+                                                \
+  }                                                                    \
+                                                                          \
+  template <>                                                          \
+  string CType<ARRAY(ValueType,NumsDims)>::_toString(void) const                    \
+  {                                                                    \
+                               \
+   return string("") ;                                                 \
+  }                                                                    \
+                                                                          \
+  template <>                                                          \
+  string CType_ref<ARRAY(ValueType,NumsDims)>::_toString(void) const                    \
+  {                                                                    \
+                                      \
+   return string("") ;                                                 \
+  }
+//CTYPE_ARRAY(double,1) 
+
+//CTYPE_ARRAY(double,2) 
+
+
+CTYPE_ARRAY(int,1)
+CTYPE_ARRAY(int,2)
+CTYPE_ARRAY(int,3)
+CTYPE_ARRAY(bool,1) 
+CTYPE_ARRAY(bool,2) 
+CTYPE_ARRAY(bool,3) 
+CTYPE_ARRAY(double,1) 
+CTYPE_ARRAY(double,2) 
+CTYPE_ARRAY(double,3) 
+CTYPE_ARRAY(float,1) 
+CTYPE_ARRAY(float,2) 
+CTYPE_ARRAY(float,3) 
+*/
+}  
+
+#endif  
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/type/type_util.hpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/type/type_util.hpp	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/type/type_util.hpp	(revision 1749)
@@ -0,0 +1,147 @@
+#ifndef __TYPE_UTIL_HPP__
+#define __TYPE_UTIL_HPP__
+
+#include <string>
+namespace xios
+{
+    class CDomain;
+    class CDomainGroup;
+    class CField;
+    class CFieldGroup;
+    class CGrid;
+    class CGridGroup;
+    class CAxis;
+    class CAxisGroup;
+    class CFile;
+    class CFileGroup;
+    class CContext;
+    class CContextGroup;
+    class CCalendarWrapper;
+    class CVariable;
+    class CVariableGroup;
+    class CInverseAxis;
+    class CInverseAxisGroup;
+    class CZoomAxis;
+    class CZoomAxisGroup;
+    class CInterpolateAxis;
+    class CInterpolateAxisGroup;
+    class CExtractAxis;
+    class CExtractAxisGroup;
+    class CZoomDomain;
+    class CZoomDomainGroup;
+    class CInterpolateDomain;
+    class CInterpolateDomainGroup;
+    class CGenerateRectilinearDomain;
+    class CGenerateRectilinearDomainGroup;
+    class CScalar;
+    class CScalarGroup;
+    class CReduceAxisToScalar;
+    class CReduceAxisToScalarGroup;
+    class CReduceDomainToAxis;
+    class CReduceDomainToAxisGroup;
+    class CReduceAxisToAxis;
+    class CReduceAxisToAxisGroup;
+    class CExtractDomainToAxis;
+    class CExtractDomainToAxisGroup;
+    class CComputeConnectivityDomain;
+    class CComputeConnectivityDomainGroup;
+    class CExpandDomain;
+    class CExpandDomainGroup;
+    class CExtractAxisToScalar;
+    class CExtractAxisToScalarGroup;
+    class CReduceDomainToScalar;
+    class CReduceDomainToScalarGroup;
+    class CTemporalSplitting;
+    class CTemporalSplittingGroup;
+    class CDuplicateScalarToAxis;
+    class CDuplicateScalarToAxisGroup;
+    class CReduceScalarToScalar;
+    class CReduceScalarToScalarGroup;
+    class CReorderDomain;
+    class CReorderDomainGroup;
+    class CExtractDomain;
+    class CExtractDomainGroup;
+     
+  template <typename T> inline string getStrType(void);
+
+#define macro(T) template <> inline string getStrType<T>(void) { return std::string(#T); }
+
+  macro(short)
+  macro(unsigned short)
+  macro(int)
+  macro(unsigned int)
+  macro(long)
+  macro(unsigned long)
+  macro(float)
+  macro(double)
+  macro(long double)
+  macro(char)
+  macro(unsigned char)
+  macro(wchar_t)
+  macro(bool)
+#undef macro
+
+#define macro(T) template <> inline string getStrType<T>(void) { return std::string(#T); }
+  macro(CDomain)
+  macro(CDomainGroup)
+  macro(CField)
+  macro(CFieldGroup)
+  macro(CGrid)
+  macro(CGridGroup)
+  macro(CAxis)
+  macro(CAxisGroup)
+  macro(CFile)
+  macro(CFileGroup)
+  macro(CContext)
+  macro(CContextGroup)
+  macro(CCalendarWrapper)
+  macro(CVariable)
+  macro(CVariableGroup)
+  macro(CInverseAxis)
+  macro(CInverseAxisGroup)
+  macro(CZoomAxis)
+  macro(CZoomAxisGroup)
+  macro(CInterpolateAxis)
+  macro(CInterpolateAxisGroup)
+  macro(CExtractAxis)
+  macro(CExtractAxisGroup)
+  macro(CZoomDomain)
+  macro(CZoomDomainGroup)
+  macro(CInterpolateDomain)
+  macro(CInterpolateDomainGroup)
+  macro(CGenerateRectilinearDomain)
+  macro(CGenerateRectilinearDomainGroup)
+  macro(CScalar)
+  macro(CScalarGroup)
+  macro(CReduceAxisToScalar)
+  macro(CReduceAxisToScalarGroup)
+  macro(CReduceDomainToAxis)
+  macro(CReduceDomainToAxisGroup)
+  macro(CReduceAxisToAxis)
+  macro(CReduceAxisToAxisGroup)
+  macro(CExtractDomainToAxis)
+  macro(CExtractDomainToAxisGroup)
+  macro(CComputeConnectivityDomain)
+  macro(CComputeConnectivityDomainGroup)
+  macro(CExpandDomain)
+  macro(CExpandDomainGroup)
+  macro(CExtractAxisToScalar)
+  macro(CExtractAxisToScalarGroup)
+  macro(CReduceDomainToScalar)
+  macro(CReduceDomainToScalarGroup)
+  macro(CTemporalSplitting)
+  macro(CTemporalSplittingGroup)
+  macro(CDuplicateScalarToAxis)
+  macro(CDuplicateScalarToAxisGroup)
+  macro(CReduceScalarToScalar)
+  macro(CReduceScalarToScalarGroup)
+  macro(CReorderDomain)
+  macro(CReorderDomainGroup)
+  macro(CExtractDomain)
+  macro(CExtractDomainGroup)
+  
+#undef macro
+}
+
+
+#endif
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/utils.hpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/utils.hpp	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/utils.hpp	(revision 1749)
@@ -0,0 +1,365 @@
+/*!
+   \file utils.hpp
+   \author Ha NGUYEN
+   \since 06 Oct 2014
+   \date 10 Feb 2015
+
+
+   \brief Some utils for Xios
+ */
+
+#ifndef __XIOS_UTILS_HPP__
+#define __XIOS_UTILS_HPP__
+
+#include <vector>
+#include <limits>
+#include "array_new.hpp"
+#include "exception.hpp"
+
+namespace xios
+{
+  template<typename K>
+  struct CArrayTraits {
+    typedef K ArrayType;
+  };
+
+  template<typename K>
+  struct CArrayBoolTraits : public CArrayTraits<K> {
+    typedef bool Type;
+  };
+
+  template<>
+  struct CArrayBoolTraits<CArray<bool,1> >
+  {
+    static inline void resizeArray(CArray<bool,1>& boolArray, const std::vector<int>& dimensionSize)
+    {
+      if (1 != dimensionSize.size())
+        ERROR("utils::CArrayBoolTraits",
+                <<"Dimension of resized array mismatch"<<endl
+                <<"Dimension of resized is 1 "<<endl
+                <<"Dimension of vetor resizing is "<< dimensionSize.size());
+      boolArray.resize(dimensionSize[0]);
+    }
+  };
+
+  template<>
+  struct CArrayBoolTraits<CArray<bool,2> >
+  {
+    static inline void resizeArray(CArray<bool,2>& boolArray, const std::vector<int>& dimensionSize)
+    {
+      if (2 != dimensionSize.size())
+        ERROR("utils::CArrayBoolTraits",
+                <<"Dimension of resized array mismatch"<<endl
+                <<"Dimension of resized is 2 "<<endl
+                <<"Dimension of vetor resizing is "<< dimensionSize.size());
+      boolArray.resize(dimensionSize[0], dimensionSize[1]);
+    }
+  };
+
+  template<>
+  struct CArrayBoolTraits<CArray<bool,3> >
+  {
+    static inline void resizeArray(CArray<bool,3>& boolArray, const std::vector<int>& dimensionSize)
+    {
+      if (3 != dimensionSize.size())
+        ERROR("utils::CArrayBoolTraits",
+                <<"Dimension of resized array mismatch"<<endl
+                <<"Dimension of resized is 3 "<<endl
+                <<"Dimension of vetor resizing is "<< dimensionSize.size());
+      boolArray.resize(dimensionSize[0], dimensionSize[1], dimensionSize[2]);
+    }
+  };
+
+  template<>
+  struct CArrayBoolTraits<CArray<bool,4> >
+  {
+    static inline void resizeArray(CArray<bool,4>& boolArray, const std::vector<int>& dimensionSize)
+    {
+      if (4 != dimensionSize.size())
+        ERROR("utils::CArrayBoolTraits",
+                <<"Dimension of resized array mismatch"<<endl
+                <<"Dimension of resized is 4 "<<endl
+                <<"Dimension of vetor resizing is "<< dimensionSize.size());
+      boolArray.resize(dimensionSize[0], dimensionSize[1], dimensionSize[2], dimensionSize[3]);
+    }
+  };
+
+  template<>
+  struct CArrayBoolTraits<CArray<bool,5> >
+  {
+    static inline void resizeArray(CArray<bool,5>& boolArray, const std::vector<int>& dimensionSize)
+    {
+      if (5 != dimensionSize.size())
+        ERROR("utils::CArrayBoolTraits",
+                <<"Dimension of resized array mismatch"<<endl
+                <<"Dimension of resized is 5 "<<endl
+                <<"Dimension of vetor resizing is "<< dimensionSize.size());
+      boolArray.resize(dimensionSize[0], dimensionSize[1],
+                       dimensionSize[2], dimensionSize[3], dimensionSize[4]);
+    }
+  };
+
+  template<>
+  struct CArrayBoolTraits<CArray<bool,6> >
+  {
+    static inline void resizeArray(CArray<bool,6>& boolArray, const std::vector<int>& dimensionSize)
+    {
+      if (6 != dimensionSize.size())
+        ERROR("utils::CArrayBoolTraits",
+                <<"Dimension of resized array mismatch"<<endl
+                <<"Dimension of resized is 6 "<<endl
+                <<"Dimension of vetor resizing is "<< dimensionSize.size());
+      boolArray.resize(dimensionSize[0], dimensionSize[1],
+                       dimensionSize[2], dimensionSize[3],
+                       dimensionSize[4], dimensionSize[5]);
+    }
+  };
+
+  template<>
+  struct CArrayBoolTraits<CArray<bool,7> >
+  {
+    static inline void resizeArray(CArray<bool,7>& boolArray, const std::vector<int>& dimensionSize)
+    {
+      if (7 != dimensionSize.size())
+        ERROR("utils::CArrayBoolTraits",
+                <<"Dimension of resized array mismatch"<<endl
+                <<"Dimension of resized is 7 "<<endl
+                <<"Dimension of vetor resizing is "<< dimensionSize.size());
+      boolArray.resize(dimensionSize[0], dimensionSize[1],
+                       dimensionSize[2], dimensionSize[3],
+                       dimensionSize[4], dimensionSize[5], dimensionSize[6]);
+    }
+  };
+
+  template <int v>
+  struct Int2Type
+  {
+  enum { value = v };
+  };
+
+  template<typename T>
+  union TypeToBytes {
+    T value;
+    unsigned char bytes[sizeof(T)];
+  };
+
+  template<typename T>
+  struct HashAlgorithm
+  {
+    /*!
+      Adapted version of one-at-a-time hash by Bob Jenkins,
+      which is an expanded version of his Dr. Dobbs article.
+    */
+    static inline size_t jenkins_hash(const T& value)
+    {
+      TypeToBytes<T> u;
+      (u.value) = value;
+
+      size_t hash = 0;
+      size_t length = sizeof(value);
+
+      for (size_t i = 0; i < length; ++i)
+      {
+          hash += u.bytes[i];
+          hash += (hash << 10);
+          hash ^= (hash >> 6);
+      }
+      hash += (hash << 3);
+      hash ^= (hash >> 11);
+      hash += (hash << 15);
+
+      return hash;
+    }
+
+    /*!
+      Adatped version of (stupid) boost hash (but working)
+    */
+    static inline size_t boost_hash(const std::vector<T>& vec)
+    {
+      size_t hash = 0;
+      int sizeVec = vec.size();
+      for(int i = 0; i < sizeVec; ++i)
+      {
+        hash ^= i + 0x9e3779b9 + (hash << 6) + (hash >> 2);
+      }
+      return hash;
+    }
+  };
+
+  template<typename T, typename Algo = Int2Type<0> >
+  struct HashXIOS
+  {
+    std::size_t operator()(const T& val)
+    {
+      Algo al;
+      return hash_value(val, al);
+    }
+
+    std::size_t hashVec(const std::vector<T>& vec)
+    {
+      return HashAlgorithm<T>::boost_hash(vec);
+    }
+
+  private:
+    size_t hash_value(const T& val, Int2Type<0>)
+    {
+      return HashAlgorithm<T>::jenkins_hash(val);
+    }
+  };
+
+template<typename K>
+struct NumTraits {
+    typedef K Type;
+};
+
+template<>
+struct NumTraits<unsigned long>
+{
+  typedef unsigned long Scalar;
+  typedef Scalar magnitudeType;
+
+  static inline Scalar sfmin() {
+    return std::numeric_limits<Scalar>::min();
+  }
+  static inline Scalar sfmax() {
+    return std::numeric_limits<Scalar>::max();
+  }
+  static inline Scalar sflowest() {
+    return -(std::numeric_limits<Scalar>::max());
+  }
+  static inline Scalar epsilon() {
+    return std::numeric_limits<Scalar>::epsilon();
+  }
+  static inline Scalar dummy_precision() {
+    return 0;
+  }
+};
+
+template<>
+struct NumTraits<double>
+{
+  typedef double Scalar;
+  typedef Scalar magnitudeType;
+
+  static inline Scalar sfmin() {
+    return std::numeric_limits<Scalar>::min();
+  }
+  static inline Scalar sfmax() {
+    return std::numeric_limits<Scalar>::max();
+  }
+  static inline Scalar sflowest() {
+    return -(std::numeric_limits<Scalar>::max());
+  }
+  static inline Scalar epsilon() {
+    return std::numeric_limits<Scalar>::epsilon();
+  }
+  static inline Scalar dummy_precision() {
+    return 1e-12;
+  }
+  static inline bool isNan(const Scalar& v) {
+    return (v != v);
+  }
+};
+
+template<typename T>
+class CArrayStorage
+{
+public:
+  typedef CArray<T,1> StorageType;
+
+public:
+  CArrayStorage(const CArray<T,1>& arr) : values(arr) {}
+
+protected:
+  const T& atIndex(int idx) const { return values(idx); }
+  const StorageType& values;
+};
+
+template<typename T>
+class CVectorStorage
+{
+public:
+  typedef std::vector<T> StorageType;
+
+public:
+  CVectorStorage(const std::vector<T>& vec) : values(vec) {}
+
+protected:
+  const T& atIndex(int idx) const { return values[idx]; }
+  const StorageType& values;
+};
+
+
+template<
+  typename T,
+  template <class> class StoragePolicy = CVectorStorage
+  >
+class XIOSComparatorWithIndex :
+  public StoragePolicy<T>
+{
+public:
+  typedef typename  StoragePolicy<T>::StorageType StorageType;
+
+public:
+  XIOSComparatorWithIndex(const StorageType& v) : StoragePolicy<T>(v) {}
+  bool operator()(int a, int b) { return this->atIndex(a) < this->atIndex(b); }
+};
+
+template<
+  typename T,
+  template <class> class StoragePolicy = CVectorStorage
+  >
+class XIOSLowerBoundWithIndex :
+  public StoragePolicy<T>
+{
+public:
+  typedef typename  StoragePolicy<T>::StorageType StorageType;
+
+public:
+  XIOSLowerBoundWithIndex(const StorageType &v) : StoragePolicy<T>(v) {}
+  bool operator()(const int a, const T& b) { return this->atIndex(a) < b; }
+};
+
+template<
+  typename T,
+  template <class> class StoragePolicy = CVectorStorage
+  >
+class XIOSBinarySearchWithIndex :
+  public StoragePolicy<T>
+{
+public:
+  typedef typename  StoragePolicy<T>::StorageType StorageType;
+
+public:
+  XIOSBinarySearchWithIndex(const StorageType& v) : StoragePolicy<T>(v) {}
+
+  template<typename ForwardIterator>
+  bool search(ForwardIterator first, ForwardIterator last, const T& val, ForwardIterator& position)
+  {
+    first = std::lower_bound(first, last, val, XIOSLowerBoundWithIndex<T, StoragePolicy>(this->values));
+    position = first;
+    return (first!=last && !(val<this->atIndex(*first)));
+  }
+};
+
+
+struct XIOSAlgorithms
+{
+public:
+  template<typename T, template <class> class StoragePolicy>
+  static void sortWithIndex(const typename StoragePolicy<T>::StorageType& values, std::vector<int>& rv)
+  {
+    std::sort(rv.begin(), rv.end(), XIOSComparatorWithIndex<T, StoragePolicy>(values));
+  }
+
+  //! Fill in an vector with index begin at 0
+  static void fillInIndex(int nbIndex, std::vector<int>& rvIndex)
+  {
+    if ((0 < nbIndex) && (nbIndex != rvIndex.size())) rvIndex.resize(nbIndex);
+    for (int idx = 0; idx < nbIndex; ++idx) rvIndex[idx] = idx;
+  }
+};
+
+}
+
+#endif // __UTILS_HPP__
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/uuid.cpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/uuid.cpp	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/uuid.cpp	(revision 1749)
@@ -0,0 +1,30 @@
+#include <boost/uuid/uuid.hpp>
+#include <boost/uuid/uuid_generators.hpp>
+#include <boost/uuid/uuid_io.hpp>
+
+namespace xios
+{
+  
+  std::string getUuidStr(void)
+  {
+    boost::uuids::random_generator gen;
+    boost::uuids::uuid u = gen();
+    return boost::uuids::to_string(u) ;
+  }
+  
+  std::string getUuidStr(const std::string& format)
+  {
+    size_t pos ;
+    std::string retStr(format) ;
+    std::string uuid(getUuidStr()) ;
+    std::string id("%uuid%");
+    pos=retStr.find(id) ;
+    while(pos!=std::string::npos)
+    {
+      retStr.replace(pos,id.size(),uuid) ;
+      pos=retStr.find(id) ;
+    }
+    return retStr;
+  }
+}
+
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/uuid.hpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/uuid.hpp	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/uuid.hpp	(revision 1749)
@@ -0,0 +1,12 @@
+#ifndef __UUID_HPP__
+#define __UUID_HPP__
+
+#include <string>
+
+namespace xios
+{
+  std::string getUuidStr(void) ;
+  std::string getUuidStr(const std::string& format) ;
+}
+
+#endif
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/virtual_node.hpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/virtual_node.hpp	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/virtual_node.hpp	(revision 1749)
@@ -0,0 +1,35 @@
+/*!
+   \file virtual_group.hpp
+   \author Ha NGUYEN
+   \date 14 Aprill 2015
+   \since 14 April 2015
+
+   \brief Class template for virtual nodes
+ */
+#ifndef __XIOS_VIRTUAL_NODE_HPP__
+#define __XIOS_VIRTUAL_NODE_HPP__
+
+namespace xios {
+/*!
+\class CVirtualNode
+On processing xml file, there are several cases in which a node contains other node type.
+These different nodes are stored in a virtual node.
+*/
+template<typename NodeType>
+class CVirtualNode
+{
+public:
+  CVirtualNode() { this->setVirtualNode(); }
+  virtual ~CVirtualNode() {}
+
+protected:
+  void setVirtualNode(NodeType* newVirtualNode) { this->virtualNode_ = newVirtualNode; }
+  void setVirtualNode() { this->setVirtualNode(NodeType::create());}
+  NodeType* getVirtualNode() const { return virtualNode_; }
+
+protected:
+  NodeType* virtualNode_;
+};
+
+}
+#endif // __XIOS_VIRTUAL_NODE_HPP__
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/wait.f90
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/wait.f90	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/wait.f90	(revision 1749)
@@ -0,0 +1,68 @@
+MODULE mod_wait
+  INTEGER, SAVE :: wait_param=10
+  REAL, SAVE    :: opt_param
+
+
+  INTEGER, SAVE :: last_count
+
+CONTAINS
+
+  
+  FUNCTION Top()
+  IMPLICIT NONE
+    DOUBLE PRECISION :: Top
+    INTEGER :: count,count_rate,count_max
+    LOGICAL, SAVE :: first=.TRUE.
+    
+      
+    CALL system_clock(count,count_rate,count_max)
+    IF (first) THEN
+      Top=0.
+    ELSE
+      IF (Count>=Last_Count) THEN
+        Top=(1.*(Count-last_Count))/count_rate
+      ELSE
+        Top=(1.*(Count-last_Count+Count_max))/count_rate
+      ENDIF
+    ENDIF
+    Last_Count=Count
+    first=.FALSE. 
+  END FUNCTION Top
+  
+  SUBROUTINE Init_wait
+  IMPLICIT NONE
+    INTEGER :: i,j
+    LOGICAL :: out_ok
+    DOUBLE PRECISION :: time 
+    INTEGER :: last_param
+  
+    out_ok=.FALSE.
+    
+    DO WHILE (.NOT. out_ok)
+      opt_param=0.
+    
+      time=top()
+!CDIR NOVECTOR
+      DO i=1,1000000*wait_param
+         opt_param=opt_param+(i/(i+opt_param))
+      ENDDO
+      time=top()
+      last_param=wait_param
+      wait_param=wait_param*(1./time)
+      IF (ABS(wait_param-last_param)/(0.5*(wait_param+last_param)) <0.01) out_ok=.TRUE.
+    END DO
+  END SUBROUTINE Init_wait
+
+  SUBROUTINE Wait_us(n)
+  IMPLICIT NONE
+  INTEGER :: n
+  INTEGER :: i
+
+!CDIR NOVECTOR  
+    DO i=1,n*wait_param
+         opt_param=opt_param+(i/(i+opt_param))
+    ENDDO
+      
+  END SUBROUTINE Wait_us   
+
+END MODULE mod_wait  
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/xios.hpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/xios.hpp	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/xios.hpp	(revision 1749)
@@ -0,0 +1,14 @@
+#ifndef __XIOS__
+#define __XIOS__
+
+#include "xios_spl.hpp"
+
+/// XIOS headers ///
+#include "nc4_data_output.hpp"
+
+
+using namespace xios;
+using namespace xios::xml;
+using namespace xios::func;
+
+#endif //__XIOS__
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/xios_server.f90
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/xios_server.f90	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/xios_server.f90	(revision 1749)
@@ -0,0 +1,9 @@
+PROGRAM server_main
+  USE xios
+  IMPLICIT NONE
+  INCLUDE "mpif.h"
+  INTEGER :: ierr
+  
+    CALL xios_init_server
+
+  END PROGRAM server_main
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/xios_spl.hpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/xios_spl.hpp	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/xios_spl.hpp	(revision 1749)
@@ -0,0 +1,64 @@
+#ifndef __XIOS_SPL__
+#define __XIOS_SPL__
+
+/// standard C++ headers ///
+#include <utility>
+#include <string>
+#include <algorithm>
+#include <unordered_map>
+#include <memory>
+
+// standard C
+#include <cstring>
+#include <cstdlib>
+#include <cmath>
+#include <ctime>
+
+// Conteneurs.
+#include <vector>
+#include <set>
+#include <stack>
+#include <list>
+#include <map>
+#include <deque>
+#include <queue>
+#include <valarray>
+// Flux.
+#include <iostream>
+#include <fstream>
+#include <sstream>
+
+/// boost headers ///
+#include <boost/cast.hpp>
+#include <boost/current_function.hpp>
+/// Map ///
+#define xios_map std::map
+
+/// Macro ///
+#define UNUSED(parameter)
+
+/// DÃ©finition de types (issus de la bibliothÃšque standard)///
+typedef std::ostringstream StdOStringStream;
+typedef std::istringstream StdIStringStream;
+typedef std::stringstream  StdStringStream;
+typedef std::ofstream      StdOFStream;
+typedef std::ifstream      StdIFStream;
+typedef std::ostream       StdOStream;
+typedef std::istream       StdIStream;
+typedef std::string        StdString;
+typedef std::size_t        StdSize;
+
+typedef  unsigned short int   ushort;
+typedef  unsigned int         uint;
+typedef  unsigned long int    ulong;
+
+const size_t stringArrayLen=255 ;
+
+/// XIOS headers ///
+#include "configure.hpp"
+#include "log.hpp"
+using namespace std;
+using namespace boost ;
+
+
+#endif //__XIOS_SPL__
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/xml_node.cpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/xml_node.cpp	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/xml_node.cpp	(revision 1749)
@@ -0,0 +1,119 @@
+#include "xml_node.hpp"
+#include <boost/algorithm/string.hpp>
+
+namespace xios
+{
+   namespace xml
+   {
+      /// ////////////////////// DÃ©finitions ////////////////////// ///
+
+      StdString CXMLNode::RootName("simulation");
+
+      CXMLNode::CXMLNode(rapidxml::xml_node<char> * const root)
+         : node(root)
+         , level(0)
+      { /* Ne rien faire de plus */ }
+
+      CXMLNode::~CXMLNode(void)
+      { /* Ne rien faire de plus */ }
+
+      StdString CXMLNode::getElementName(void) const
+      { 
+         return (this->node->name()); 
+      }
+
+      bool CXMLNode::goToNextElement(void)
+      {
+         bool retvalue = false;
+         for(rapidxml::xml_node<char> * nextElement = this->node->next_sibling();
+                                      ; nextElement = nextElement->next_sibling())
+         {
+            if (nextElement == NULL) break;
+            else if (nextElement->type() == rapidxml::node_element)
+            { 
+               node = nextElement;
+               return (!retvalue);
+            }
+         }
+         return (retvalue);
+      }
+
+      bool CXMLNode::goToChildElement(void)
+      {
+         bool retvalue = false;
+         rapidxml::xml_node<char> * nextElement = this->node->first_node();
+         if (nextElement != NULL)
+         {
+            for(;;nextElement = nextElement->next_sibling())
+            {
+               if (nextElement == NULL) break;
+               else if (nextElement->type() == rapidxml::node_element)
+               { 
+                  node = nextElement;
+                  level++;
+                  return (!retvalue); 
+               }
+            }
+         }
+         return (retvalue);
+      }
+
+      bool CXMLNode::goToParentElement(void)
+      {
+         bool retvalue = false;
+         if (!(this->getElementName().compare(CXMLNode::RootName)) || (level == 0))
+            return (retvalue);
+         node = node->parent();
+         level--;
+         return (!retvalue);
+      }
+/*
+      bool CXMLNode::getContent(StdString & content)
+      {
+         if (this->node->value_size() == 0) return (false);
+         content.assign(this->node->value(), this->node->value_size());
+         return (true);
+      }
+*/
+      bool CXMLNode::getContent(StdString & content)
+      {
+         content="" ;
+         bool retvalue = false;
+         
+         rapidxml::xml_node<char> * nextElement = this->node->first_node();
+         while (nextElement != NULL)
+         {
+             if (nextElement->type() == rapidxml::node_data) content=content+std::string(nextElement->value(),nextElement->value_size());
+             nextElement = nextElement->next_sibling(); 
+         }
+         boost::algorithm::replace_all(content,"\n"," ") ;
+         boost::algorithm::trim(content) ;
+         if (content.size()==0) return false ;
+         else return true ;
+      }
+
+      const StdString & CXMLNode::GetRootName(void)
+      { 
+         return (CXMLNode::RootName); 
+      }
+
+      THashAttributes CXMLNode::getAttributes(void) const
+      {
+         THashAttributes attributes;
+         rapidxml::xml_attribute<char> *currentAttr = NULL;
+
+         if ((currentAttr = this->node->first_attribute()) != NULL)
+         {
+            do 
+            {
+               attributes.insert(std::pair<StdString, StdString>
+                                (StdString(currentAttr->name()),
+                                 StdString(currentAttr->value())));
+            } while ((currentAttr = currentAttr->next_attribute()) != NULL);
+         }
+
+         return (attributes) ;
+      }
+
+   }// namespace xml
+} // namespace xios
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/xml_node.hpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/xml_node.hpp	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/xml_node.hpp	(revision 1749)
@@ -0,0 +1,57 @@
+#ifndef __XIOS_CXMLNode__
+#define __XIOS_CXMLNode__
+
+/// rapidXML headers ///
+#include <rapidxml.hpp>
+
+/// XIOS headers ///
+#include "xios_spl.hpp"
+
+namespace xios
+{
+   namespace xml
+   {
+      /// ////////////////////// DÃ©clarations ////////////////////// ///
+      typedef xios_map<StdString, StdString> THashAttributes;
+
+      class CXMLNode
+      {
+         public :
+
+            /// Constructeurs ///
+            CXMLNode(rapidxml::xml_node<char> * const root);
+
+            /// Destructeur ///
+            ~CXMLNode(void);
+
+            /// Accesseurs ///
+            StdString getElementName(void) const;
+            THashAttributes getAttributes(void) const;
+
+            /// Mutateurs ///
+            bool goToNextElement(void);
+            bool goToChildElement(void);
+            bool goToParentElement(void);
+            bool getContent(StdString & content);
+
+            /// Accesseurs statiques ///
+            static const StdString & GetRootName(void);
+
+         private :
+
+            /// Constructeurs ///
+            CXMLNode(void);                        // Not implemented yet.
+            CXMLNode(const CXMLNode & node);       // Not implemented yet.
+            CXMLNode(const CXMLNode * const node); // Not implemented yet.
+
+            rapidxml::xml_node<char> * node;
+            int level;
+
+            static StdString RootName;
+
+      }; //class CXMLParser
+
+   }// namespace xml
+} // namespace xios
+
+#endif // __XIOS_CXMLNode__
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/xml_parser.cpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/xml_parser.cpp	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/xml_parser.cpp	(revision 1749)
@@ -0,0 +1,154 @@
+#include "xml_parser.hpp"
+
+#include "context.hpp"
+
+#include "attribute_template.hpp"
+#include "object_template.hpp"
+#include "group_template.hpp"
+
+namespace xios
+{
+   namespace xml
+   {
+      /// ////////////////////// DÃ©finitions ////////////////////// ///
+
+      void CXMLParser::ParseFile(const StdString & filename, const std::set<StdString>& parseContextList)
+      TRY
+      {
+         StdIFStream ifs ( filename.c_str() , StdIFStream::in );
+         if ( (ifs.rdstate() & std::ifstream::failbit ) != 0 )
+           ERROR("void CXMLParser::ParseFile(const StdString & filename)",
+                  <<endl<< "Can not open <"<<filename<<"> file" );
+
+         CXMLParser::ParseStream(ifs, filename, parseContextList);
+      }
+      CATCH
+
+      void CXMLParser::ParseString(const StdString & xmlContent)
+      {
+         StdIStringStream iss ( xmlContent /*, StdIStringStream::in*/ );
+         std::set<StdString> contxtList;
+         CXMLParser::ParseStream(iss,"string", contxtList);
+      }
+
+      void CXMLParser::ParseStream(StdIStream & stream, const string& fluxId, const std::set<StdString>& parseContextList)
+      {
+         if (!stream.good())
+            ERROR("CXMLParser::ParseStream(const StdIStream & stream)",
+                  << "Bad xml stream !");
+         StdOStringStream oss;
+         while(!stream.eof() && !stream.fail ()) oss.put(stream.get());
+         const StdString xmlcontent( oss.str(), 0, oss.str().size()-1 );
+         try
+         {
+            rapidxml::xml_document<char> doc;
+            doc.parse<0>(const_cast<char*>(xmlcontent.c_str()));
+
+            CXMLNode node(doc.first_node());
+            THashAttributes attributes;
+
+            if (node.getElementName().compare(CXMLNode::GetRootName()) != 0)
+               ERROR("CXMLParser::ParseStream(StdIStream & stream)",
+                     << "Root element should be named simulation (actual = \'"
+                     << node.getElementName() << "\')!");
+
+            std::set<StdString>::iterator it;
+            std::set<StdString>::const_iterator itE = parseContextList.end();
+            bool isParseAll = (parseContextList.empty());
+            try
+            {
+              if (node.goToChildElement())
+              {
+                 do
+                 {
+                    CContextGroup* group_context = CContext::getRoot() ;
+
+                    attributes = node.getAttributes();
+
+                    if (attributes.end() == attributes.find("id"))
+                    {
+                       DEBUG("The context will not be processed because it is not identified (missing id)");
+                       continue;
+                    }
+
+                    CContext::setCurrent(attributes["id"]) ;
+
+                    if (isParseAll)
+                    {
+                      CContext* context = CContext::create(attributes["id"]);
+                      context->parse(node);
+
+                      attributes.clear();
+                    }
+                    else
+                    {
+                      it = parseContextList.find(attributes["id"]);
+                      if (itE != it)
+                      {
+                        CContext* context = CContext::create(*it);
+                        context->parse(node);
+
+                        attributes.clear();
+                      }
+                    }
+                 } while (node.goToNextElement());
+              }
+            }
+            catch(CException& e)
+            {
+              CException::StackInfo stk;
+              stk.info.append("Exception occurred while parsing XML file \"");
+              stk.info.append(attributes["src"]);
+              stk.info.append("\".\n");
+              stk.file = FILE_NAME;
+              stk.function = FUNCTION_NAME;
+              stk.line = __LINE__;
+              e.stack.push_back(stk);
+              if (CXios::xiosStack)
+                throw;
+             else
+               throw 0;
+            }
+            catch(...)
+            {
+              CException exc;
+              CException::StackInfo stk;
+              stk.info.append("Exception occurred while parsing XML file \"");
+              stk.info.append(attributes["src"]);
+              stk.info.append("\".\n");
+              stk.file = FILE_NAME;
+              stk.function = FUNCTION_NAME;
+              stk.line = __LINE__;
+              exc.stack.push_back(stk);
+              if (CXios::xiosStack)
+                throw exc;
+             else
+               throw 0;
+            }
+
+         }
+         catch (rapidxml::parse_error & exc)
+         {
+            const char* ptr = exc.where<char>() ;
+            const char* begin = xmlcontent.c_str() ;
+            const char* content=oss.str().c_str() ;
+            size_t pos=ptr-begin ;
+            int lineNumber = 1 ;
+            int columnNumber = 0 ;
+            const char* line;
+            const char* endLine;
+
+            for(const char* i=content;i<content+pos; ++i, ++columnNumber) if (*i=='\n') { lineNumber++ ; line=i ; columnNumber=0 ;}
+            for(endLine=content+pos; *endLine!='\n' && *endLine!='\0' ; ++endLine) ;
+            string strLine(line,endLine-line) ;
+
+            ERROR("CXMLParser::ParseStream(StdIStream & stream)", << endl
+                  << "Error is occuring when parsing XML flux from <"<<fluxId<<"> at character "<< pos<<" line "<<lineNumber<<" column "<< columnNumber<< endl
+                  << strLine<<endl
+                  << string(columnNumber-1,'x')<<'^'<<endl)
+//                  <<" Error : " << exc.what() )
+         }
+      }
+
+   }// namespace xml
+} // namespace xios
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/xml_parser.hpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/xml_parser.hpp	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/xml_parser.hpp	(revision 1749)
@@ -0,0 +1,52 @@
+#ifndef __XIOS_CXMLParser__
+#define __XIOS_CXMLParser__
+
+/// XIOS headers ///
+#include "xios_spl.hpp"
+#include "exception.hpp"
+#include "cxios.hpp"
+#include "xml_node.hpp"
+
+
+namespace xios
+{
+   namespace xml
+   {
+      /// ////////////////////// DÃ©clarations ////////////////////// ///
+      class CXMLParser
+      {
+         public :
+
+            static void ParseFile(const StdString & filename, const std::set<StdString>& parseList = std::set<StdString>());
+            static void ParseString(const StdString & xmlContent);
+            static void ParseStream(StdIStream & stream, const string& fluxId, const std::set<StdString>& parseList);
+            template <class T>
+               static void ParseInclude(StdIStream & stream, const string& fluxId, T & object);
+
+      }; //class CXMLParser
+/*
+      template <class T>
+         void CXMLParser::ParseInclude(StdIStream & stream, T& object)
+      {
+         StdOStringStream oss;
+         while(!stream.eof() && !stream.fail ())
+            oss.put(stream.get());
+         try
+         {
+            const StdString xmlcontent( oss.str(), 0, oss.str().size()-1 );
+            rapidxml::xml_document<char> doc;
+            doc.parse<0>(const_cast<char*>(xmlcontent.c_str()));
+            CXMLNode node(doc.first_node());
+            object.parse(node);
+         }
+         catch (rapidxml::parse_error & exc)
+         {
+            ERROR("CXMLParser::ParseStream(StdIStream & stream)",
+                  << "RapidXML error : " << exc.what() << " !");
+         }
+      }
+*/
+   }// namespace xml
+} // namespace xios
+
+#endif // __XIOS_CXMLParser__
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/xml_parser_decl.cpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/xml_parser_decl.cpp	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/xml_parser_decl.cpp	(revision 1749)
@@ -0,0 +1,43 @@
+#include "xml_parser_impl.hpp"
+#include "group_template.hpp"
+#include "node_type.hpp"
+
+namespace xios
+{
+  namespace xml
+  {
+    template void CXMLParser::ParseInclude<CContext>(StdIStream & stream, const string& fluxId, CContext& object) ;
+
+ #   define macro(T) \
+    template void CXMLParser::ParseInclude< CGroupTemplate<C##T, C##T##Group, C##T##Attributes> >(StdIStream & stream, const string& fluxId, CGroupTemplate<C##T, C##T##Group, C##T##Attributes>& object) ;
+
+    macro( Context )
+    macro( Axis )
+    macro( Domain )
+    macro( Grid )
+    macro( Field )
+    macro( File )
+    macro( Variable )
+    macro( InverseAxis )
+    macro( ZoomAxis )
+    macro( InterpolateAxis )
+    macro( ExtractAxis )
+    macro( ZoomDomain )
+    macro( InterpolateDomain )
+    macro( GenerateRectilinearDomain )
+    macro( Scalar )
+    macro( ReduceAxisToScalar )
+    macro( ReduceDomainToAxis )
+    macro( ReduceAxisToAxis )
+    macro( ExtractDomainToAxis )
+    macro( ComputeConnectivityDomain )
+    macro( ExpandDomain )
+    macro( ExtractAxisToScalar )
+    macro( ReduceDomainToScalar )
+    macro( TemporalSplitting )
+    macro( DuplicateScalarToAxis )
+    macro( ReduceScalarToScalar )
+    macro( ReorderDomain )
+    macro( ExtractDomain )
+  }
+}
Index: /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/xml_parser_impl.hpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/xml_parser_impl.hpp	(revision 1749)
+++ /XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/xml_parser_impl.hpp	(revision 1749)
@@ -0,0 +1,50 @@
+#ifndef __XIOS_CXML_PARSER_IMPL__
+#define __XIOS_CXML_PARSER_IMPL__
+
+/// XIOS headers ///
+#include "xml_parser.hpp"
+
+namespace xios
+{
+   namespace xml
+   {
+     template <class T> void CXMLParser::ParseInclude(StdIStream & stream, const string& fluxId,  T& object)
+      {
+         StdOStringStream oss;
+         while(!stream.eof() && !stream.fail ()) oss.put(stream.get());
+         const StdString xmlcontent( oss.str(), 0, oss.str().size()-1 );
+         try
+         {
+            rapidxml::xml_document<char> doc;
+            doc.parse<0>(const_cast<char*>(xmlcontent.c_str()));
+            CXMLNode node(doc.first_node());
+            object.parse(node);
+         }
+         catch (rapidxml::parse_error & exc)
+         {
+             const char* ptr = exc.where<char>() ;
+            const char* begin = xmlcontent.c_str() ;
+            const char* content=oss.str().c_str() ;
+            size_t pos=ptr-begin ;
+            int lineNumber = 1 ;
+            int columnNumber = 0 ;
+            const char* line;
+            const char* endLine;
+            
+            for(const char* i=content;i<content+pos; ++i, ++columnNumber) if (*i=='\n') { lineNumber++ ; line=i ; columnNumber=0 ;}
+            for(endLine=content+pos; *endLine!='\n' && *endLine!='\0' ; ++endLine) ;
+            string strLine(line,endLine-line) ;
+                  
+            ERROR("CXMLParser::ParseStream(StdIStream & stream)", << endl
+                  << "Error is occuring when parsing XML flux from <"<<fluxId<<"> at character "<< pos<<" line "<<lineNumber<<" column "<< columnNumber<< endl
+                  << strLine<<endl
+                  << string(columnNumber-1,'x')<<'^'<<endl)
+//                  <<" Error : " << exc.what() )
+         }
+      }
+
+   } // namespace xml
+} // namespace xios
+
+#endif // __XIOS_CXML_PARSER_IMPL__
+
