Base Classes

These provide base classes to simplify making new classes.

netCDF Points Reader Base

class pvgeohdf.base.netCDFPointsReaderBase(nOutputPorts=1, outputType='vtkPolyData', **kwargs)[source]

Bases: pvgeohdf.base.netCDFReaderBase

netCDFPointsReaderBase: for netCDF files that will produce a point+attribute dataset.

RequestData(request, inInfo, outInfo)[source]

Used by pipeline to get data for current timestep and populate the output data object. This assumes that self._GetRawData() will return a dataset ready for PVGeo’s interface.pointsToPolyData().

net CDF Reader Base

class pvgeohdf.base.netCDFReaderBase(nOutputPorts=1, outputType='vtkPolyData', **kwargs)[source]

Bases: PVGeo.base.ReaderBaseBase

GetFileName()[source]

Super class has file names as a list but we will only handle a single netCDF file. This provides a conveinant way of making sure we only access that single file. A user could still access the list of file names using GetFileNames().

GetTimestepValues()[source]

Use this in ParaView decorator to register timesteps on the pipeline.

RequestData(request, inInfo, outInfo)[source]

Used by pipeline to get data for current timestep and populate the output data object.

RequestInformation(request, inInfo, outInfo)[source]

This will handle setting the timesteps appropriately based on the number of file names when the pipeline needs to know the time information.

_GetFileContents(idx=None)[source]

This opens a netCDF4 DataSet. This happens up front so the data read happens only once and ParaView will be able to make calls on the RequestData method to get the data for a specific timestep

_GetRawData(idx=0)[source]

Get the data as the called for data object. Return type depends on higher level API.

Parameters:idx (int) – the timestep index
_ReadUpFront()[source]

OVERRIDE: This parses the loaded dataset.

_UpdateTimeSteps()[source]

For internal use only: appropriately sets the timesteps.

extensions = 'nc netCDF netcdf'