Peano 4
Loading...
Searching...
No Matches
NetCDFReader.hpp File Reference
#include <string>
#include <sys/stat.h>
#include <netcdf.h>
Include dependency graph for NetCDFReader.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace  applications
 This code is taken from the original ExaHyPE project written by colleagues from the University of Trento.
 
namespace  applications::exahype2
 
namespace  applications::exahype2::swe
 
namespace  applications::exahype2::swe::parser
 
namespace  applications::exahype2::swe::parser::NetCDFReader
 

Typedefs

typedef std::string String
 

Functions

int applications::exahype2::swe::parser::NetCDFReader::openCdf (String filename)
 Opens a netCDF file, returns ncid.
 
int applications::exahype2::swe::parser::NetCDFReader::closeCdf (int ncid)
 Closes netCDF file.
 
size_t applications::exahype2::swe::parser::NetCDFReader::getDimension (int ncid, const char *key)
 Get the dimension of a variable.
 
intapplications::exahype2::swe::parser::NetCDFReader::getGlobalAttInt (int ncid, const char *name)
 reads the global attribute name of type int and returns an array containing all the associated values.
 
float * applications::exahype2::swe::parser::NetCDFReader::getGlobalAttFloat (int ncid, const char *name)
 reads the global attribute name of type float and returns an array containing all the associated values.
 
double * applications::exahype2::swe::parser::NetCDFReader::getGlobalAttDouble (int ncid, const char *name)
 reads the global attribute name of type double and returns an array containing all the associated values.
 
char * applications::exahype2::swe::parser::NetCDFReader::getGlobalAttText (int ncid, const char *name)
 reads the global attribute name of type text and returns an array containing all the associated values.
 
int applications::exahype2::swe::parser::NetCDFReader::readVariable1D (int ncid, const char *key, double *variable)
 Read contents of a 1D double variable from netCDF file.
 
int applications::exahype2::swe::parser::NetCDFReader::readVariable2D (int ncid, const char *key, double **variable, size_t rows, size_t cols)
 Read contents of a 2D double variable from netCDF file into 2D array.
 
int applications::exahype2::swe::parser::NetCDFReader::readVariable2D (int ncid, const char *key, double *variable)
 Read contents of a 2D double variable from netCDF file into 1D array.
 
int applications::exahype2::swe::parser::NetCDFReader::readVariable2DHyperslab (int ncid, const char *key, double **variable, size_t rows, size_t cols, size_t start)
 Read contents of a 2D double variable from netCDF file into 2D array starting at a specified first-dimension value.
 
int applications::exahype2::swe::parser::NetCDFReader::readVariable3DHyperslab (int ncid, const char *key, double *variable, size_t rows, size_t cols, size_t start, size_t end)
 Read contents of a 3D double variable from netCDF file into 1D array starting at a specified first-dimension value.
 

Typedef Documentation

◆ String

typedef std::string String

Definition at line 7 of file NetCDFReader.hpp.