Changeset 249
- Timestamp:
- 07/06/11 13:55:03 (13 years ago)
- Location:
- XMLIO_V2/dev/dev_rv
- Files:
-
- 13 added
- 2 deleted
- 15 edited
Legend:
- Unmodified
- Added
- Removed
-
XMLIO_V2/dev/dev_rv/Makefile.wk
r242 r249 15 15 VTK = yes 16 16 GUI = no 17 NPROC = 117 NPROC = 5 18 18 #VERSION = 4 19 19 CSUITE = gnu … … 394 394 395 395 ifeq ($(VERSION), 4) 396 ELEMS_FOR = domain_interface domaingroup_interface \ 397 field_interface fieldgroup_interface \ 398 file_interface filegroup_interface \ 399 axis_interface axisgroup_interface axis \ 400 context_interface xml_tree 396 ELEMS_FOR = idate \ 397 domain_interface domaingroup_interface idomain \ 398 field_interface fieldgroup_interface ifield \ 399 file_interface filegroup_interface ifile \ 400 axis_interface axisgroup_interface iaxis \ 401 grid_interface gridgroup_interface igrid \ 402 context_interface icontext ixml_tree idata 401 403 endif 402 404 … … 406 408 407 409 ifeq ($(VERSION), 4) 408 ELEMS_CPP = object exception xml_node xml_parser inetcdf4 inetcdf4_adv lscereader mpi_interface410 ELEMS_CPP = object exception xml_node xml_parser inetcdf4 inetcdf4_adv onetcdf4 lscereader mpi_interface 409 411 endif 410 412 -
XMLIO_V2/dev/dev_rv/src4/xmlio/fortran/axis_interface.f90
r242 r249 6 6 SUBROUTINE xios_set_axis_name(axis_hdl, name, name_size) BIND(C) 7 7 USE ISO_C_BINDING 8 INTEGER (kind = C_INTPTR_T), VALUE :: axis_hdl9 CHARACTER(kind = C_CHAR) , DIMENSION(*) :: name10 INTEGER (kind = C_INT) 8 INTEGER (kind = C_INTPTR_T), VALUE :: axis_hdl 9 CHARACTER(kind = C_CHAR) , DIMENSION(*) :: name 10 INTEGER (kind = C_INT) , VALUE :: name_size 11 11 END SUBROUTINE xios_set_axis_name 12 12 13 13 SUBROUTINE xios_set_axis_standard_name(axis_hdl, standard_name, standard_name_size) BIND(C) 14 14 USE ISO_C_BINDING 15 INTEGER (kind = C_INTPTR_T), VALUE :: axis_hdl16 CHARACTER(kind = C_CHAR) , DIMENSION(*) :: standard_name17 INTEGER (kind = C_INT) 15 INTEGER (kind = C_INTPTR_T), VALUE :: axis_hdl 16 CHARACTER(kind = C_CHAR) , DIMENSION(*) :: standard_name 17 INTEGER (kind = C_INT) , VALUE :: standard_name_size 18 18 END SUBROUTINE xios_set_axis_standard_name 19 19 … … 21 21 USE ISO_C_BINDING 22 22 INTEGER (kind = C_INTPTR_T), VALUE :: axis_hdl 23 CHARACTER(kind = C_CHAR) , DIMENSION(*) :: long_name24 INTEGER (kind = C_INT) 23 CHARACTER(kind = C_CHAR) , DIMENSION(*) :: long_name 24 INTEGER (kind = C_INT) , VALUE :: long_name_size 25 25 END SUBROUTINE xios_set_axis_long_name 26 26 … … 28 28 USE ISO_C_BINDING 29 29 INTEGER (kind = C_INTPTR_T), VALUE :: axis_hdl 30 CHARACTER(kind = C_CHAR) , DIMENSION(*) :: unit31 INTEGER (kind = C_INT) 30 CHARACTER(kind = C_CHAR) , DIMENSION(*) :: unit 31 INTEGER (kind = C_INT) , VALUE :: unit_size 32 32 END SUBROUTINE xios_set_axis_unit 33 33 … … 35 35 USE ISO_C_BINDING 36 36 INTEGER (kind = C_INTPTR_T), VALUE :: axis_hdl 37 INTEGER (kind = C_INT) 37 INTEGER (kind = C_INT) , VALUE :: size 38 38 END SUBROUTINE xios_set_axis_size 39 39 … … 42 42 INTEGER (kind = C_INTPTR_T), VALUE :: axis_hdl 43 43 REAL (kind = C_DOUBLE) , DIMENSION(*) :: zvalue 44 INTEGER (kind = C_INT) 44 INTEGER (kind = C_INT) , VALUE :: zvalue_extent1 45 45 END SUBROUTINE xios_set_axis_zvalue 46 46 … … 51 51 INTEGER (kind = C_INT) , VALUE :: idt_size 52 52 END SUBROUTINE xios_axis_handle_create 53 53 54 54 END INTERFACE 55 55 -
XMLIO_V2/dev/dev_rv/src4/xmlio/fortran/axisgroup_interface.f90
r242 r249 7 7 USE ISO_C_BINDING 8 8 INTEGER (kind = C_INTPTR_T), VALUE :: axisgroup_hdl 9 CHARACTER(kind = C_CHAR) , DIMENSION(*) :: name10 INTEGER (kind = C_INT) 9 CHARACTER(kind = C_CHAR) , DIMENSION(*) :: name 10 INTEGER (kind = C_INT) , VALUE :: name_size 11 11 END SUBROUTINE xios_set_axisgroup_name 12 12 13 13 SUBROUTINE xios_set_axisgroup_standard_name(axisgroup_hdl, standard_name, standard_name_size) BIND(C) 14 14 USE ISO_C_BINDING 15 INTEGER (kind = C_INTPTR_T), VALUE :: axisgroup_hdl16 CHARACTER(kind = C_CHAR) , DIMENSION(*) :: standard_name17 INTEGER (kind = C_INT) 15 INTEGER (kind = C_INTPTR_T), VALUE :: axisgroup_hdl 16 CHARACTER(kind = C_CHAR) , DIMENSION(*) :: standard_name 17 INTEGER (kind = C_INT) , VALUE :: standard_name_size 18 18 END SUBROUTINE xios_set_axisgroup_standard_name 19 19 20 20 SUBROUTINE xios_set_axisgroup_long_name(axisgroup_hdl, long_name, long_name_size) BIND(C) 21 21 USE ISO_C_BINDING 22 INTEGER (kind = C_INTPTR_T), VALUE :: axisgroup_hdl23 CHARACTER(kind = C_CHAR) , DIMENSION(*) :: long_name24 INTEGER (kind = C_INT) 22 INTEGER (kind = C_INTPTR_T), VALUE :: axisgroup_hdl 23 CHARACTER(kind = C_CHAR) , DIMENSION(*) :: long_name 24 INTEGER (kind = C_INT) , VALUE :: long_name_size 25 25 END SUBROUTINE xios_set_axisgroup_long_name 26 26 27 27 SUBROUTINE xios_set_axisgroup_unit(axisgroup_hdl, unit, unit_size) BIND(C) 28 28 USE ISO_C_BINDING 29 INTEGER (kind = C_INTPTR_T), VALUE :: axisgroup_hdl30 CHARACTER(kind = C_CHAR) , DIMENSION(*) :: unit31 INTEGER (kind = C_INT) 29 INTEGER (kind = C_INTPTR_T), VALUE :: axisgroup_hdl 30 CHARACTER(kind = C_CHAR) , DIMENSION(*) :: unit 31 INTEGER (kind = C_INT) , VALUE :: unit_size 32 32 END SUBROUTINE xios_set_axisgroup_unit 33 33 … … 35 35 USE ISO_C_BINDING 36 36 INTEGER (kind = C_INTPTR_T), VALUE :: axisgroup_hdl 37 INTEGER (kind = C_INT) 37 INTEGER (kind = C_INT) , VALUE :: size 38 38 END SUBROUTINE xios_set_axisgroup_size 39 39 … … 42 42 INTEGER (kind = C_INTPTR_T), VALUE :: axisgroup_hdl 43 43 REAL (kind = C_DOUBLE) , DIMENSION(*) :: zvalue 44 INTEGER (kind = C_INT) 44 INTEGER (kind = C_INT) , VALUE :: zvalue_extent1 45 45 END SUBROUTINE xios_set_axisgroup_zvalue 46 46 -
XMLIO_V2/dev/dev_rv/src4/xmlio/fortran/context_interface.f90
r242 r249 24 24 INTEGER (kind = C_INT) :: output_dir_size 25 25 END SUBROUTINE xios_set_context_output_dir 26 27 SUBROUTINE xios_context_handle_create(ret, idt, idt_size) BIND(C) 28 import C_CHAR, C_INTPTR_T, C_INT 29 INTEGER (kind = C_INTPTR_T) :: ret 30 CHARACTER(kind = C_CHAR) , DIMENSION(*) :: idt 31 INTEGER (kind = C_INT) , VALUE :: idt_size 32 END SUBROUTINE xios_context_handle_create 33 34 SUBROUTINE xios_context_set_current(context, withswap) BIND(C) 35 import C_BOOL, C_INT, C_INTPTR_T 36 INTEGER (kind = C_INTPTR_T), VALUE :: context 37 LOGICAL (kind = C_BOOL) , VALUE :: withswap 38 END SUBROUTINE xios_context_set_current 39 40 SUBROUTINE xios_context_create(context, context_id, context_id_size, calendar_type, & 41 year, month, day, hour, minute, second) BIND(C) 42 import C_CHAR, C_INT, C_INTPTR_T 43 INTEGER (kind = C_INTPTR_T) :: context 44 CHARACTER(kind = C_CHAR) , DIMENSION(*) :: context_id 45 INTEGER (kind = C_INT) , VALUE :: context_id_size 46 INTEGER (kind = C_INT) , VALUE :: calendar_type, year, month, day, hour, minute, second 47 END SUBROUTINE xios_context_create 26 48 27 49 END INTERFACE -
XMLIO_V2/dev/dev_rv/src4/xmlio/fortran/domain_interface.f90
r242 r249 200 200 END SUBROUTINE xios_set_domain_latvalue 201 201 202 SUBROUTINE xios_domain_handle_create(ret, idt, idt_size) BIND(C) 203 import C_CHAR, C_INTPTR_T, C_INT 204 INTEGER (kind = C_INTPTR_T) :: ret 205 CHARACTER(kind = C_CHAR) , DIMENSION(*) :: idt 206 INTEGER (kind = C_INT) , VALUE :: idt_size 207 END SUBROUTINE xios_domain_handle_create 208 202 209 END INTERFACE 203 210 -
XMLIO_V2/dev/dev_rv/src4/xmlio/fortran/domaingroup_interface.f90
r242 r249 199 199 INTEGER (kind = C_INT) :: latvalue_extent1 200 200 END SUBROUTINE xios_set_domaingroup_latvalue 201 202 SUBROUTINE xios_domaingroup_handle_create(ret, idt, idt_size) BIND(C) 203 import C_CHAR, C_INTPTR_T, C_INT 204 INTEGER (kind = C_INTPTR_T) :: ret 205 CHARACTER(kind = C_CHAR) , DIMENSION(*) :: idt 206 INTEGER (kind = C_INT) , VALUE :: idt_size 207 END SUBROUTINE xios_domaingroup_handle_create 201 208 202 209 END INTERFACE -
XMLIO_V2/dev/dev_rv/src4/xmlio/fortran/field_interface.f90
r242 r249 98 98 END SUBROUTINE xios_set_field_default_value 99 99 100 SUBROUTINE xios_field_handle_create(ret, idt, idt_size) BIND(C) 101 import C_CHAR, C_INTPTR_T, C_INT 102 INTEGER (kind = C_INTPTR_T) :: ret 103 CHARACTER(kind = C_CHAR) , DIMENSION(*) :: idt 104 INTEGER (kind = C_INT) , VALUE :: idt_size 105 END SUBROUTINE xios_field_handle_create 106 100 107 END INTERFACE 101 108 -
XMLIO_V2/dev/dev_rv/src4/xmlio/fortran/fieldgroup_interface.f90
r242 r249 97 97 REAL (kind = C_DOUBLE) :: default_value 98 98 END SUBROUTINE xios_set_fieldgroup_default_value 99 100 SUBROUTINE xios_domaingroup_handle_create(ret, idt, idt_size) BIND(C) 101 import C_CHAR, C_INTPTR_T, C_INT 102 INTEGER (kind = C_INTPTR_T) :: ret 103 CHARACTER(kind = C_CHAR) , DIMENSION(*) :: idt 104 INTEGER (kind = C_INT) , VALUE :: idt_size 105 END SUBROUTINE xios_domaingroup_handle_create 99 106 100 107 END INTERFACE -
XMLIO_V2/dev/dev_rv/src4/xmlio/fortran/file_interface.f90
r242 r249 37 37 END SUBROUTINE xios_set_file_enabled 38 38 39 SUBROUTINE xios_file_handle_create(ret, idt, idt_size) BIND(C) 40 import C_CHAR, C_INTPTR_T, C_INT 41 INTEGER (kind = C_INTPTR_T) :: ret 42 CHARACTER(kind = C_CHAR) , DIMENSION(*) :: idt 43 INTEGER (kind = C_INT) , VALUE :: idt_size 44 END SUBROUTINE xios_file_handle_create 45 39 46 END INTERFACE 40 47 -
XMLIO_V2/dev/dev_rv/src4/xmlio/fortran/filegroup_interface.f90
r242 r249 36 36 LOGICAL (kind = C_BOOL) :: enabled 37 37 END SUBROUTINE xios_set_filegroup_enabled 38 38 39 SUBROUTINE xios_filegroup_handle_create(ret, idt, idt_size) BIND(C) 40 import C_CHAR, C_INTPTR_T, C_INT 41 INTEGER (kind = C_INTPTR_T) :: ret 42 CHARACTER(kind = C_CHAR) , DIMENSION(*) :: idt 43 INTEGER (kind = C_INT) , VALUE :: idt_size 44 END SUBROUTINE xios_filegroup_handle_create 45 39 46 END INTERFACE 40 47 -
XMLIO_V2/dev/dev_rv/src4/xmlio/fortran/grid_interface.f90
r242 r249 31 31 INTEGER (kind = C_INT) :: axis_ref_size 32 32 END SUBROUTINE xios_set_grid_axis_ref 33 34 SUBROUTINE xios_grid_handle_create(ret, idt, idt_size) BIND(C) 35 import C_CHAR, C_INTPTR_T, C_INT 36 INTEGER (kind = C_INTPTR_T) :: ret 37 CHARACTER(kind = C_CHAR) , DIMENSION(*) :: idt 38 INTEGER (kind = C_INT) , VALUE :: idt_size 39 END SUBROUTINE xios_grid_handle_create 33 40 34 41 END INTERFACE -
XMLIO_V2/dev/dev_rv/src4/xmlio/fortran/gridgroup_interface.f90
r242 r249 31 31 INTEGER (kind = C_INT) :: axis_ref_size 32 32 END SUBROUTINE xios_set_gridgroup_axis_ref 33 33 34 SUBROUTINE xios_domaingroup_handle_create(ret, idt, idt_size) BIND(C) 35 import C_CHAR, C_INTPTR_T, C_INT 36 INTEGER (kind = C_INTPTR_T) :: ret 37 CHARACTER(kind = C_CHAR) , DIMENSION(*) :: idt 38 INTEGER (kind = C_INT) , VALUE :: idt_size 39 END SUBROUTINE xios_domaingroup_handle_create 40 34 41 END INTERFACE 35 42 -
XMLIO_V2/dev/dev_rv/src4/xmlio/main_server.cpp
r242 r249 16 16 #include "xmlioserver_spl.hpp" 17 17 18 #include "inetcdf4.hpp" 19 #include "inetcdf4_impl.hpp" 20 #include "inetcdf4_adv.hpp" 21 #include "inetcdf4_adv_impl.hpp" 22 #include "lscereader.hpp" 18 #include "mpi_interface.hpp" 19 #include "onetcdf4.hpp" 20 #include "onetcdf4_impl.hpp" 23 21 24 22 namespace xios = xmlioserver; … … 27 25 //~ using namespace xios::tree; 28 26 //~ using namespace xios::xml; 29 //~using namespace xios::comm;27 using namespace xios::comm; 30 28 //~ using namespace xios::func; 31 using namespace xios::vtk;32 29 33 30 // Point d'entrée du programme serveur principal. 34 int main (int XIOS_UNUSED (argc), char ** XIOS_UNUSED (argv), char ** XIOS_UNUSED (env))31 int main (int argc, char ** argv, char ** XIOS_UNUSED (env)) 35 32 { 36 33 try 37 34 { 35 CMPIManager::Initialise(&argc, &argv); 36 { 37 MPI_Comm cworld = CMPIManager::GetCommWorld(); 38 int rank = CMPIManager::GetCommRank(); 39 int size = CMPIManager::GetCommSize(); 40 41 CONetCDF4 output("wk/data/herve.nc", false, &cworld); 42 43 CONetCDF4::CNetCDF4Path path; 44 path.push_back("ozdoba"); 45 46 output.addGroup("ozdoba"); 47 output.setCurrentPath(path); 48 output.addDimension("time"); 49 output.addDimension("x", 10); 50 output.addDimension("y", 10); 51 52 std::vector<std::string> dims; 53 dims.push_back("time"); 54 dims.push_back("x"); 55 dims.push_back("y"); 56 57 std::string toto("toto"); 58 output.addVariable(toto, NC_INT, dims); 38 59 60 output.writeAttribute("att1", "llo"); 61 62 std::vector<int> vvv; 63 vvv.push_back(1); 64 output.writeAttribute("att1", vvv, &toto); 65 vvv.push_back(5); 66 output.writeAttribute("att5", vvv, &toto); 67 68 boost::multi_array<int, 2> data(boost::extents[2][10]); 69 boost::multi_array<int, 2>::iterator it = data.begin(), end = data.end(); 70 71 for (std::size_t i = 0; i < data.num_elements(); i++) data.data()[i] = rank; 39 72 73 std::vector<std::size_t> _start; 74 std::vector<std::size_t> _count; 75 _start.push_back(10*rank/size); 76 _count.push_back(2); 77 _start.push_back(0); 78 _count.push_back(10); 79 80 output.writeData( data, toto, 0, false, &_start, &_count); 81 } 40 82 83 CMPIManager::Finalize(); 41 84 } 42 85 catch (xios::CException & _exception) 43 86 { 44 87 std::cerr << _exception.getMessage() << std::endl; 88 CMPIManager::Finalize(); 45 89 return (-1); 46 90 } -
XMLIO_V2/dev/dev_rv/src4/xmlio/netcdf/inetcdf4.cpp
r241 r249 20 20 namespace io { 21 21 22 23 // ------------------------------ Constructeurs ----------------------------- 24 22 25 CINetCDF4::CINetCDF4(const std::string & filename) 23 26 { … … 25 28 } 26 29 30 // ------------------------------- Destructeur ------------------------------ 31 27 32 CINetCDF4::~CINetCDF4(void) 28 33 { 29 34 CheckError(nc_close(this->ncidp)); 30 35 } 36 37 // --------------------- Vérification des erreurs NetCDF -------------------- 31 38 32 39 void CINetCDF4::CheckError(int _status) throw (CException) … … 39 46 } 40 47 } 48 49 // --------------------------- Accesseurs protégés -------------------------- 41 50 42 51 int CINetCDF4::getCurrentGroup(void) … … 107 116 } 108 117 118 bool CINetCDF4::varExist(const std::string & _varname) 119 { 120 int varid = 0; 121 int grpid = this->getCurrentGroup(); 122 return (nc_inq_varid (grpid, _varname.c_str(), &varid) == NC_NOERR); 123 } 124 125 // ------------------------------- Accesseurs ------------------------------- 126 109 127 const CINetCDF4::CNetCDF4Path & CINetCDF4::getCurrentPath(void) const 110 128 { … … 112 130 } 113 131 132 // ------------------------------- Mutateurs -------------------------------- 133 114 134 void CINetCDF4::setCurrentPath(const CNetCDF4Path & path) 115 135 { 116 136 this->path = path; 117 137 } 138 139 // ----------------- Obtention des informations de lecture ------------------ 118 140 119 141 void CINetCDF4::getReadDataInfos(const std::string & _varname, … … 159 181 } 160 182 183 // ------------------------- Lecture des données -------------------------- 184 185 template <> 186 void CINetCDF4::readData_(int _grpid, int _varid, 187 const std::vector<std::size_t> & _sstart, 188 const std::vector<std::size_t> & _scount, 189 float * _data) 190 { 191 CheckError(nc_get_vara_float(_grpid, _varid, &(_sstart[0]), &(_scount[0]), _data)); 192 } 193 194 template <> 195 void CINetCDF4::readData_(int _grpid, int _varid, 196 const std::vector<std::size_t> & _sstart, 197 const std::vector<std::size_t> & _scount, 198 int * _data) 199 { 200 CheckError(nc_get_vara_int(_grpid, _varid, &(_sstart[0]), &(_scount[0]), _data)); 201 } 202 203 template <> 204 void CINetCDF4::readData_(int _grpid, int _varid, 205 const std::vector<std::size_t> & _sstart, 206 const std::vector<std::size_t> & _scount, 207 double * _data) 208 { 209 CheckError(nc_get_vara_double(_grpid, _varid, &(_sstart[0]), &(_scount[0]), _data)); 210 } 211 212 // ------------------------- Lecture des attributs -------------------------- 161 213 void CINetCDF4::readAttribute 162 214 (const std::string & _attname, std::string & _value, const std::string * _varname) … … 166 218 _value.assign(&(chart[0]), chart.size()); 167 219 } 220 221 template <> 222 void CINetCDF4::readAttribute_ 223 (const std::string & _attname, double * _value, int _grpid, int _varid) 224 { 225 CheckError(nc_get_att_double(_grpid, _varid, _attname.c_str(), _value)); 226 } 227 228 template <> 229 void CINetCDF4::readAttribute_ 230 (const std::string & _attname, float * _value, int _grpid, int _varid) 231 { 232 CheckError(nc_get_att_float(_grpid, _varid, _attname.c_str(), _value)); 233 } 234 235 template <> 236 void CINetCDF4::readAttribute_ 237 (const std::string & _attname, int * _value, int _grpid, int _varid) 238 { 239 CheckError(nc_get_att_int(_grpid, _varid, _attname.c_str(), _value)); 240 } 241 242 template <> 243 void CINetCDF4::readAttribute_ 244 (const std::string & _attname, char * _value, int _grpid, int _varid) 245 { 246 CheckError(nc_get_att_text(_grpid, _varid, _attname.c_str(), _value)); 247 } 248 249 // ----------------- Accesseur de parcours (d'exploration) ------------------ 168 250 169 251 std::vector<std::string> CINetCDF4::getAttributes(const std::string * const _varname) … … 187 269 } 188 270 return (retvalue); 189 } 190 271 } 191 272 192 273 std::map<std::string, std::size_t> CINetCDF4::getDimensions(const std::string * const _varname) … … 322 403 } 323 404 324 template <>325 void CINetCDF4::readData_(int _grpid, int _varid,326 const std::vector<std::size_t> & _sstart,327 const std::vector<std::size_t> & _scount,328 float * _data)329 {330 CheckError(nc_get_vara_float(_grpid, _varid, &(_sstart[0]), &(_scount[0]), _data));331 }332 333 template <>334 void CINetCDF4::readData_(int _grpid, int _varid,335 const std::vector<std::size_t> & _sstart,336 const std::vector<std::size_t> & _scount,337 int * _data)338 {339 CheckError(nc_get_vara_int(_grpid, _varid, &(_sstart[0]), &(_scount[0]), _data));340 }341 342 template <>343 void CINetCDF4::readData_(int _grpid, int _varid,344 const std::vector<std::size_t> & _sstart,345 const std::vector<std::size_t> & _scount,346 double * _data)347 {348 CheckError(nc_get_vara_double(_grpid, _varid, &(_sstart[0]), &(_scount[0]), _data));349 }350 351 template <>352 void CINetCDF4::readAttribute_353 (const std::string & _attname, double * _value, int _grpid, int _varid)354 {355 CheckError(nc_get_att_double(_grpid, _varid, _attname.c_str(), _value));356 }357 358 template <>359 void CINetCDF4::readAttribute_360 (const std::string & _attname, float * _value, int _grpid, int _varid)361 {362 CheckError(nc_get_att_float(_grpid, _varid, _attname.c_str(), _value));363 }364 365 template <>366 void CINetCDF4::readAttribute_367 (const std::string & _attname, int * _value, int _grpid, int _varid)368 {369 CheckError(nc_get_att_int(_grpid, _varid, _attname.c_str(), _value));370 }371 372 template <>373 void CINetCDF4::readAttribute_374 (const std::string & _attname, char * _value, int _grpid, int _varid)375 {376 CheckError(nc_get_att_text(_grpid, _varid, _attname.c_str(), _value));377 }378 379 bool CINetCDF4::varExist(const std::string & _varname)380 {381 int varid = 0;382 int grpid = this->getCurrentGroup();383 return (nc_inq_varid (grpid, _varname.c_str(), &varid) == NC_NOERR);384 }385 386 405 } // namespace io 387 406 } // namespace xmlioserver -
XMLIO_V2/dev/dev_rv/src4/xmlio/netcdf/inetcdf4.hpp
r238 r249 125 125 void readData( boost::multi_array<DataType, ndim> & _data, 126 126 const std::string & _varname, 127 std::size_t _record = 1,127 std::size_t _record = 0, 128 128 const std::vector<std::size_t> * _start = NULL, 129 129 const std::vector<std::size_t> * _count = NULL); … … 199 199 const std::vector<std::size_t> * _count); 200 200 201 private : // Lecture 201 private : // Lecture privée 202 202 203 203 template <class DataType>
Note: See TracChangeset
for help on using the changeset viewer.