21 #define NETCDF_SAFE_CALL(x) {\ 24 THROW("NetCDF error in call to\n\t" << #x << "\n\nError code: " << error \ 25 <<"\n\nError message: " << nc_strerror(error)); \ 35 template<
class RealType>
58 template<
class RealType>
59 typename std::enable_if<std::is_same<RealType, double>::value,
int>
::type 61 int ncid,
int varid,
const RealType* op) {
62 return nc_put_var_double(ncid, varid, op);
67 template<
class RealType>
68 typename std::enable_if<std::is_same<RealType, float>::value,
int>
::type 70 int ncid,
int varid,
const RealType* op) {
71 return nc_put_var_float(ncid, varid, op);
int netcdf_raw_ptr
Definition: netcdf_utils.hpp:31
Definition: netcdf_utils.hpp:36
netcdf_raw_ptr getNetcdfRealType()
Gets the type corresponding to the alsfvm::real type.
Definition: netcdf_utils.hpp:47
std::enable_if< std::is_same< RealType, double >::value, int >::type nc_put_var_real(int ncid, int varid, const RealType *op)
Wrapper function for nc_put_var_double.
Definition: netcdf_utils.hpp:60
double type
Definition: netcdf_utils.hpp:37
Various utility functions to implement the tecno flux.
Definition: types.hpp:30
float type
Definition: netcdf_utils.hpp:43