Changeset 229 for XMLIO_V2/dev/dev_rv/src4/xmlio/main_server.cpp
- Timestamp:
- 06/20/11 13:06:09 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
XMLIO_V2/dev/dev_rv/src4/xmlio/main_server.cpp
r215 r229 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" 23 18 24 namespace xios = xmlioserver; 19 25 //~ using namespace xios::data; 20 //~using namespace xios::io;26 using namespace xios::io; 21 27 //~ using namespace xios::tree; 22 28 //~ using namespace xios::xml; 23 29 //~ using namespace xios::comm; 24 30 //~ using namespace xios::func; 31 using namespace xios::vtk; 25 32 26 33 // Point d'entrée du programme serveur principal. … … 29 36 try 30 37 { 38 std::cout << "Test input" << std::endl; 39 CINetCDF4Adv file_coslatgrid("test/vtk/file_coslatgrid.nc4"); 40 CINetCDF4Adv file_xboundsybounds("test/vtk/file_xboundsybounds.nc4"); 41 CINetCDF4Adv sampleCurveGrid4("test/vtk/sampleCurveGrid4.nc4"); 42 CINetCDF4Adv sampleGenGrid3("test/vtk/sampleGenGrid3.nc4"); 43 CINetCDF4Adv ucov("test/vtk/ucov.nc4"); 44 45 std::vector<CINetCDF4Adv*> listinput; 46 listinput.push_back(&file_coslatgrid); 47 listinput.push_back(&file_xboundsybounds); 48 listinput.push_back(&sampleCurveGrid4); 49 listinput.push_back(&sampleGenGrid3); 50 listinput.push_back(&ucov); 51 std::vector<CINetCDF4Adv*>::iterator it = listinput.begin(), end = listinput.end(); 52 53 for (; it != end; it++) 54 { 55 std::cout << "-------------" << std::endl; 56 std::map<std::string, std::size_t> dims = (*it)->getDimensions(); 57 std::map<std::string, std::size_t>::iterator it0 = dims.begin(), end0 = dims.end(); 58 59 for (; it0 != end0; it0++) 60 { 61 std::cout << "dimensions " << it0->first << " : " << it0->second << std::endl; 62 } 63 64 std::vector<std::string> vars = (*it)->getVariables(); 65 std::vector<std::string>::iterator it1 = vars.begin(), end1 = vars.end(); 66 for (; it1 != end1; it1++) 67 { 68 std::map<std::string, std::size_t> dims = (*it)->getDimensions(&(*it1)); 69 std::map<std::string, std::size_t>::iterator it3 = dims.begin(), end3 = dims.end(); 70 71 std::cout << "Variable " << *it1 << " ["; 72 for (; it3 != end3; it3++) 73 { 74 std::cout << it3->first << ":" << it3->second << " "; 75 } 76 std::cout << "] :" << std::endl; 77 } 78 } 79 80 boost::multi_array<float, 1> data; 81 file_coslatgrid.readData(data, "NTEMP", 1); 82 std::cout << data.size() << std::endl; 83 84 85 //vtkLSCEReader::ShowVariable("test/vtk/file_coslatgrid.nc4", "NTEMP"); 86 //vtkLSCEReader::ShowVariable("test/vtk/ucov.nc4", "ucov"); 87 vtkLSCEReader::ShowVariable("test/vtk/sampleCurveGrid4.nc4", "sample"); 88 //vtkLSCEReader::ShowVariable("test/vtk/sampleGenGrid3.nc4", "sample"); 89 //vtkLSCEReader::ShowVariable("test/vtk/file_xboundsybounds.nc4", "A"); 90 31 91 32 92 }
Note: See TracChangeset
for help on using the changeset viewer.