80 #ifndef vtkMPASReader_h 81 #define vtkMPASReader_h 83 #include "vtkIONetCDFModule.h" 86 #include "vtk_netcdfcpp_fwd.h" 107 vtkSetStringMacro(FileName);
115 vtkGetMacro(MaximumCells,
int);
122 vtkGetMacro(MaximumPoints,
int);
129 virtual int GetNumberOfCellVars();
130 virtual int GetNumberOfPointVars();
149 vtkGetMacro(UseDimensionedArrayNames,
bool)
159 int GetNumberOfPointArrays();
160 const
char* GetPointArrayName(
int index);
161 int GetPointArrayStatus(const
char*
name);
162 void SetPointArrayStatus(const
char* name,
int status);
163 void DisableAllPointArrays();
164 void EnableAllPointArrays();
167 int GetNumberOfCellArrays();
168 const
char* GetCellArrayName(
int index);
169 int GetCellArrayStatus(const
char* name);
170 void SetCellArrayStatus(const
char* name,
int status);
171 void DisableAllCellArrays();
172 void EnableAllCellArrays();
183 int GetNumberOfDimensions();
184 std::
string GetDimensionName(
int idx);
186 int GetDimensionCurrentIndex(const std::
string &dim);
187 void SetDimensionCurrentIndex(const std::
string &dim,
int idx);
188 int GetDimensionSize(const std::
string &dim);
197 vtkGetMacro(VerticalDimension, std::
string)
205 void SetVerticalLevel(
int level);
206 int GetVerticalLevel();
209 vtkGetVector2Macro(VerticalLevelRange,
int)
212 vtkGetMacro(LayerThickness,
int)
213 vtkGetVector2Macro(LayerThicknessRange,
int)
215 void SetCenterLon(
int val);
216 vtkGetVector2Macro(CenterLonRange,
int)
219 vtkGetMacro(ProjectLatLon,
bool)
222 vtkGetMacro(IsAtmosphere,
bool)
225 vtkGetMacro(IsZeroCentered,
bool)
228 vtkGetMacro(ShowMultilayerView,
bool)
233 static
int CanReadFile(const
char *filename);
239 ~vtkMPASReader() override;
240 void ReleaseNcData();
245 int NumberOfTimeSteps;
252 vtkInformationVector *) override;
253 int RequestInformation(vtkInformation *, vtkInformationVector **,
254 vtkInformationVector *) override;
257 static
void SelectionCallback(
vtkObject* caller,
unsigned long eid,
258 void* clientdata,
void* calldata);
268 void UpdateDimensions(
bool force = false);
270 std::
string VerticalDimension;
271 int VerticalLevelRange[2];
274 int LayerThicknessRange[2];
277 int CenterLonRange[2];
326 int GetNcVars(
const char* cellDimName,
const char* pointDimName);
327 int ReadAndOutputGrid();
328 int BuildVarArrays();
329 int AllocSphericalGeometry();
330 int AllocProjectedGeometry();
331 int AllocPlanarGeometry();
333 int AddMirrorPoint(
int index,
double dividerX,
double offset);
335 int EliminateXWrap();
338 unsigned char GetCellType();
347 bool ValidateDimensions(NcVar *var,
bool silent,
int ndims, ...);
352 long GetCursorForDimension(
const NcDim *dim);
357 size_t GetCountForDimension(
const NcDim *dim);
364 long InitializeDimension(
const NcDim *dim);
388 static int NcTypeToVtkType(
int ncType);
391 vtkIdType ComputeNumberOfTuples(NcVar *ncVar);
393 template <
typename ValueType>
394 bool LoadDataArray(NcVar *ncVar,
vtkDataArray *array,
bool resize =
true);
396 template <
typename ValueType>
397 int LoadPointVarDataImpl(NcVar *ncVar,
vtkDataArray *array);
399 template <
typename ValueType>
400 int LoadCellVarDataImpl(NcVar *ncVar,
vtkDataArray *array);
Wrapper around std::string to keep symbols short.
abstract base class for most VTK objects
vtkTypeUInt32 vtkMTimeType
static vtkUnstructuredGridAlgorithm * New()
a vtkAbstractArray subclass for strings
Read an MPAS netCDF file.
dynamic, self-adjusting array of double
bool UseDimensionedArrayNames
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
supports function callbacks
a simple class to control print indentation
Store on/off settings for data arrays for a vtkSource.
dataset represents arbitrary combinations of all possible cell types
abstract superclass for arrays of numeric data
vtkGetStringMacro(ExtensionsString)
Returns a string listing all available extensions.
Superclass for algorithms that produce only unstructured grid as output.
vtkSetMacro(IgnoreDriverBugs, bool)
When set known driver bugs are ignored during driver feature detection.
vtkBooleanMacro(IgnoreDriverBugs, bool)
When set known driver bugs are ignored during driver feature detection.
vtkUnstructuredGrid * GetOutput()
Get the output data object for a port on this algorithm.