Changeset 352 for XIOS/trunk/src/output


Ignore:
Timestamp:
07/09/12 11:33:05 (12 years ago)
Author:
ymipsl
Message:
 
Location:
XIOS/trunk/src/output
Files:
2 added
4 edited

Legend:

Unmodified
Added
Removed
  • XIOS/trunk/src/output/nc4_data_output.cpp

    r351 r352  
    33 
    44#include <boost/lexical_cast.hpp> 
    5 #include "attribute_template_impl.hpp" 
    6 #include "group_template_impl.hpp" 
     5#include "attribute_template.hpp" 
     6#include "group_template.hpp" 
    77 
    88#include "file.hpp" 
  • XIOS/trunk/src/output/nc4_data_output.hpp

    r347 r352  
    8181                                     const StdString & units, 
    8282                                     const StdString & nav_model); 
     83/* 
    8384            template <class T> 
    8485               void writeAxisData(const StdString & axis_name, 
     
    8788                                  const std::vector<StdSize> * start = NULL, 
    8889                                  const std::vector<StdSize> * count = NULL); 
    89  
     90*/ 
    9091         private : 
    9192 
  • XIOS/trunk/src/output/onetcdf4.cpp

    r350 r352  
    11#include "onetcdf4.hpp" 
    2 #include "group_template_impl.hpp" 
     2#include "group_template.hpp" 
    33 
    44namespace xios 
  • XIOS/trunk/src/output/onetcdf4.hpp

    r347 r352  
    126126      ///--------------------------------------------------------------- 
    127127            
    128       template <class T, StdSize ndim> 
    129          void CONetCDF4::writeData(const ARRAY(T, ndim) data, const StdString & name, 
    130                                    bool collective, StdSize record, 
    131                                    const std::vector<StdSize> * start, 
    132                                    const std::vector<StdSize> * count) 
    133       { 
    134          int grpid = this->getCurrentGroup(); 
    135          int varid = this->getVariable(name); 
    136          StdSize array_size = 1; 
    137          std::vector<StdSize> sstart, scount; 
    138128 
    139          if (this->wmpi && collective) 
    140             CheckError(nc_var_par_access(grpid, varid, NC_COLLECTIVE)); 
    141          if (this->wmpi && !collective) 
    142             CheckError(nc_var_par_access(grpid, varid, NC_INDEPENDENT)); 
    143  
    144          this->getWriteDataInfos 
    145          (name, record, array_size,  sstart, scount, start, count); 
    146          if (data->num_elements() != array_size) 
    147          { 
    148             ERROR("CONetCDF4::writeData(...)", 
    149                   << "[ input array size = "  << data->num_elements() 
    150                   << ", intern array size = " << array_size 
    151                   << " ] Invalid input data !" ); 
    152          } 
    153           
    154          this->writeData_(grpid, varid, sstart, scount, data->data()); 
    155       } 
    156        
    157       //---------------------------------------------------------------- 
    158             
    159       template <class T> 
    160          void CONetCDF4::setDefaultValue(const StdString & varname, const T * value) 
    161       { 
    162          int grpid = this->getCurrentGroup(); 
    163          int varid = this->getVariable(varname); 
    164           
    165          if (value != NULL) 
    166          { 
    167             CheckError(nc_def_var_fill(grpid, varid, 0, value)); 
    168             this->addAttribute(StdString("missing_value"), *value, &varname); 
    169          } 
    170          else 
    171             CheckError(nc_def_var_fill(grpid, varid, 1, NULL));          
    172       } 
    173       
    174       ///--------------------------------------------------------------- 
    175129 
    176130} // namespace xios 
Note: See TracChangeset for help on using the changeset viewer.