HDF & netCDF I/O for PVGeo¶
An offshoot of PVGeo for HDF5 and netCDF data formats.
Why isn’t this included in PVGeo?
These features are experimental and we are concerned about how netCDF/HDF files do not have any inherit structure that might define spatially referenced data. We are also concerned that some of the dependancies for HDF5 I/O libraries might make PVGeo’s installation process a bit cumbersome for the average user.
If we find that this framework is simple, and doesn’t add to much weight to PVGeo, then we will merge this project into a new suite within PVGeo.
This project is a work in progress!
Installation¶
git clone https://github.com/OpenGeoVis/PVGeo-HDF5.git
cd PVGeo-HDF5
pip install -e .
Examples¶
Take a look at the notebook examples under the examples directory
Current Statistics¶
base | reader |
---|---|
2 | 2 |
About PVGeo-HDF5¶
- Author: Bane Sullivan
- License: BSD-3-Clause
- Copyright: 2018, Bane Sullivan
- Version: 0.0.2
pvgeohdf
: An offshoot of PVGeo for HDF5 and netCDF data formats in ParaView
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.
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()
.
-
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
-
extensions
= 'nc netCDF netcdf'¶
-
netCDF I/O¶
This module contains general readers and writers for netCDF formats.
CMAQ Reader¶
-
class
pvgeohdf.netcdf.
CMAQReader
(**kwargs)[source]¶ Bases:
pvgeohdf.base.netCDFReaderBase
CMAQ read for Ziwei Wu
-
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’sinterface.pointsToPolyData()
.
-
SVC Parcel Reader¶
-
class
pvgeohdf.netcdf.
SVCParcelReader
(**kwargs)[source]¶ Bases:
pvgeohdf.base.netCDFPointsReaderBase
SVCParcelReader for Kelton
-
SetDataName
(name)[source]¶ This is an example of how to set a property for this reader to use. Note that we do not use this property.
-
Docs Automatically Generated
Learn more about automatic documentation