Ignore:
Timestamp:
11/26/14 12:06:21 (10 years ago)
Author:
rlacroix
Message:

Add a new attribute to the file definition so that the output format can be controlled.

Currently the supported formats are "netcdf4" and "netcdf4_classic". The "format" attribute is optional. The "netcdf4" format will be used when no format is explicitly defined. Since "netcdf4" is the format which was previously used by XIOS, existing configuration files will not be affected by this change.

If "netcdf4_classic" is used, the output file(s) will be created using the classic NetCDF format. This format can be used with the attribute "type" set to "one_file" if the NetCDF4 library was compiled with Parallel NetCDF support (--enable-pnetcdf).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • XIOS/trunk/src/output/onetcdf4.hpp

    r501 r517  
    2626 
    2727            /// Constructeurs /// 
    28             CONetCDF4(const StdString & filename, bool exist, const MPI_Comm * comm = NULL, bool multifile=true); 
     28            CONetCDF4(const StdString & filename, bool exist, bool useClassicFormat = false, 
     29                      const MPI_Comm * comm = NULL, bool multifile = true); 
    2930 
    3031            CONetCDF4(const CONetCDF4 & onetcdf4);       // Not implemented. 
     
    3334 
    3435            /// Initialisation /// 
    35             void initialize(const StdString & filename, bool exist, const MPI_Comm * comm, bool multifile); 
     36            void initialize(const StdString & filename, bool exist, bool useClassicFormat, 
     37                            const MPI_Comm * comm, bool multifile); 
    3638            void close(void) ; 
    3739            void sync(void) ; 
     
    9294            bool varExist(const StdString & varname); 
    9395 
     96            bool useClassicFormat; //!< If true, NetCDF4 will use the classic NetCDF3 format 
     97 
    9498      //---------------------------------------------------------------- 
    9599       
Note: See TracChangeset for help on using the changeset viewer.