Ignore:
Timestamp:
12/03/14 17:54:33 (10 years ago)
Author:
rlacroix
Message:

Add the ability to append data to existing output file(s).

By default existing file(s) will still be overwritten. Set the new file attribute "append" to true if you wish to append data to existing NetCDF file(s).

Note that the append mode is currently not supported when file splitting is used and that the structure of the output file cannot be changed.

Location:
XIOS/trunk/src/interface/c_attr
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • XIOS/trunk/src/interface/c_attr/icfile_attr.cpp

    r526 r528  
    1717  typedef xios::CFile*  file_Ptr; 
    1818   
     19  void cxios_set_file_append(file_Ptr file_hdl, bool append) 
     20  { 
     21     CTimer::get("XIOS").resume(); 
     22    file_hdl->append.setValue(append); 
     23     CTimer::get("XIOS").suspend(); 
     24  } 
     25   
     26  void cxios_get_file_append(file_Ptr file_hdl, bool* append) 
     27  { 
     28    *append = file_hdl->append.getInheritedValue(); 
     29  } 
     30   
     31  bool cxios_is_defined_file_append(file_Ptr file_hdl ) 
     32  { 
     33     CTimer::get("XIOS").resume(); 
     34    return file_hdl->append.hasInheritedValue(); 
     35     CTimer::get("XIOS").suspend(); 
     36  } 
     37   
     38   
     39   
    1940  void cxios_set_file_description(file_Ptr file_hdl, const char * description, int description_size) 
    2041  { 
  • XIOS/trunk/src/interface/c_attr/icfilegroup_attr.cpp

    r526 r528  
    1717  typedef xios::CFileGroup*  filegroup_Ptr; 
    1818   
     19  void cxios_set_filegroup_append(filegroup_Ptr filegroup_hdl, bool append) 
     20  { 
     21     CTimer::get("XIOS").resume(); 
     22    filegroup_hdl->append.setValue(append); 
     23     CTimer::get("XIOS").suspend(); 
     24  } 
     25   
     26  void cxios_get_filegroup_append(filegroup_Ptr filegroup_hdl, bool* append) 
     27  { 
     28    *append = filegroup_hdl->append.getInheritedValue(); 
     29  } 
     30   
     31  bool cxios_is_defined_filegroup_append(filegroup_Ptr filegroup_hdl ) 
     32  { 
     33     CTimer::get("XIOS").resume(); 
     34    return filegroup_hdl->append.hasInheritedValue(); 
     35     CTimer::get("XIOS").suspend(); 
     36  } 
     37   
     38   
     39   
    1940  void cxios_set_filegroup_description(filegroup_Ptr filegroup_hdl, const char * description, int description_size) 
    2041  { 
Note: See TracChangeset for help on using the changeset viewer.