Mesh Oriented datABase  (version 5.5.1)
An array-based unstructured mesh library
WriteNCDF.cpp File Reference
#include "WriteNCDF.hpp"
#include "netcdf.h"
#include <utility>
#include <algorithm>
#include <ctime>
#include <string>
#include <vector>
#include <cstdio>
#include <cstring>
#include <cassert>
#include "moab/Interface.hpp"
#include "moab/Range.hpp"
#include "moab/CN.hpp"
#include "moab/FileOptions.hpp"
#include "MBTagConventions.hpp"
#include "Internals.hpp"
#include "ExoIIUtil.hpp"
#include "moab/WriteUtilIface.hpp"
#include "exodus_order.h"
+ Include dependency graph for WriteNCDF.cpp:

Go to the source code of this file.

Namespaces

 moab
 Class representing axis-aligned bounding box.
 

Macros

#define INS_ID(stringvar, prefix, id)   sprintf( stringvar, prefix, id )
 
#define GET_DIM(ncdim, name, val)
 
#define GET_DIMB(ncdim, name, varname, id, val)
 
#define GET_VAR(name, id, dims)
 

Variables

const int moab::TIME_STR_LEN = 11
 

Macro Definition Documentation

◆ GET_DIM

#define GET_DIM (   ncdim,
  name,
  val 
)
Value:
{ \
int gdfail = nc_inq_dimid( ncFile, name, &( ncdim ) ); \
if( NC_NOERR == gdfail ) \
{ \
size_t tmp_val; \
gdfail = nc_inq_dimlen( ncFile, ncdim, &tmp_val ); \
if( NC_NOERR != gdfail ) \
{ \
MB_SET_ERR( MB_FAILURE, "WriteNCDF:: couldn't get dimension length" ); \
} \
else \
( val ) = tmp_val; \
} \
else \
( val ) = 0; \
}

Definition at line 57 of file WriteNCDF.cpp.

◆ GET_DIMB

#define GET_DIMB (   ncdim,
  name,
  varname,
  id,
  val 
)
Value:
INS_ID( name, varname, id ); \
GET_DIM( ncdim, name, val );

Definition at line 75 of file WriteNCDF.cpp.

◆ GET_VAR

#define GET_VAR (   name,
  id,
  dims 
)
Value:
{ \
( id ) = -1; \
int gvfail = nc_inq_varid( ncFile, name, &( id ) ); \
if( NC_NOERR == gvfail ) \
{ \
int ndims; \
gvfail = nc_inq_varndims( ncFile, id, &ndims ); \
if( NC_NOERR == gvfail ) \
{ \
( dims ).resize( ndims ); \
gvfail = nc_inq_vardimid( ncFile, id, &( dims )[0] ); \
} \
} \
}

Definition at line 79 of file WriteNCDF.cpp.

◆ INS_ID

#define INS_ID (   stringvar,
  prefix,
  id 
)    sprintf( stringvar, prefix, id )

Definition at line 55 of file WriteNCDF.cpp.