Ignore:
Timestamp:
11/26/14 12:06:21 (9 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/node/file.cpp

    r509 r517  
    322322         } 
    323323 
     324         bool useClassicFormat = !format.isEmpty() && format == format_attr::netcdf4_classic; 
     325 
    324326         bool multifile=true ; 
    325327         if (!type.isEmpty()) 
     
    369371           } 
    370372         } 
    371          data_out=shared_ptr<CDataOutput>(new CNc4DataOutput(oss.str(), false, fileComm, multifile, isCollective)); 
     373         data_out=shared_ptr<CDataOutput>(new CNc4DataOutput(oss.str(), false, useClassicFormat, 
     374                                                             fileComm, multifile, isCollective)); 
    372375         isOpen=true ; 
    373376 
Note: See TracChangeset for help on using the changeset viewer.