Hi @ZiweiWu,
I too work with netCDF4 and HDF5 files quite often and I have been working to develop a new set of Python-based plugins for reading these data formats directly into ParaView. This set of plugins is an offshoot of my PVGeo project called PVGeo-HDF5 which creates an easy to use framework for making a file reader for just about any data format in netCDF or HDF files.
So to anwser your questions:
- Yes! Checkout PVGeo-HDF5 (in very, very early stages of development). I used this to address another question here.
- I’m pretty sure you cannot do anything like this using ParaView’s native netCDF readers. But you could easily implement a reader in PVGeo-HDF to handle this.
Note: I see you are on Linux; PVGeo and PVGeo-HDF5 have an issue on Linux and requires users to build ParaView from source because of this issue
I could help you implement a simple reader for the CMAQ netCDF file format within PVGeo-HDF5 if you’re up for getting your hands dirty! I tried playing around with your sample file but I don’t really understand the format… There are these data arrays present but I don’t really understand the data array shapes (especially since the time array ('TFLAG'
is all zeros):
<class 'netCDF4._netCDF4.Variable'>
int32 TFLAG(TSTEP, VAR, DATE-TIME)
units: <YYYYDDD,HHMMSS>
long_name: TFLAG
var_desc: Timestep-valid flags: (1) YYYYDDD or (2) HHMMSS
unlimited dimensions:
current shape = (1, 9, 2)
filling off
<class 'netCDF4._netCDF4.Variable'>
float32 LATD(TSTEP, LAY, ROW, COL)
long_name: LATD
units: DEGREES
var_desc: latitude (south negative) -- dot point
unlimited dimensions:
current shape = (1, 1, 786, 973)
filling off
<class 'netCDF4._netCDF4.Variable'>
float32 LOND(TSTEP, LAY, ROW, COL)
long_name: LOND
units: DEGREES
var_desc: longitude (west negative) -- dot point
unlimited dimensions:
current shape = (1, 1, 786, 973)
filling off
<class 'netCDF4._netCDF4.Variable'>
float32 MSFD2(TSTEP, LAY, ROW, COL)
long_name: MSFD2
units: (M/M)**2
var_desc: squared map-scale factor (DOT)
unlimited dimensions:
current shape = (1, 1, 786, 973)
filling off
<class 'netCDF4._netCDF4.Variable'>
float32 LATU(TSTEP, LAY, ROW, COL)
long_name: LATU
units: DEGREES
var_desc: latitude (south negative) -- U face
unlimited dimensions:
current shape = (1, 1, 786, 973)
filling off
<class 'netCDF4._netCDF4.Variable'>
float32 LONU(TSTEP, LAY, ROW, COL)
long_name: LONU
units: DEGREES
var_desc: longitude (west negative) -- U face
unlimited dimensions:
current shape = (1, 1, 786, 973)
filling off
<class 'netCDF4._netCDF4.Variable'>
float32 MSFU2(TSTEP, LAY, ROW, COL)
long_name: MSFU2
units: (M/M)**2
var_desc: squared map-scale factor (U FACE)
unlimited dimensions:
current shape = (1, 1, 786, 973)
filling off
<class 'netCDF4._netCDF4.Variable'>
float32 LATV(TSTEP, LAY, ROW, COL)
long_name: LATV
units: DEGREES
var_desc: latitude (south negative) -- V face
unlimited dimensions:
current shape = (1, 1, 786, 973)
filling off
<class 'netCDF4._netCDF4.Variable'>
float32 LONV(TSTEP, LAY, ROW, COL)
long_name: LONV
units: DEGREES
var_desc: longitude (west negative) -- V face
unlimited dimensions:
current shape = (1, 1, 786, 973)
filling off
<class 'netCDF4._netCDF4.Variable'>
float32 MSFV2(TSTEP, LAY, ROW, COL)
long_name: MSFV2
units: (M/M)**2
var_desc: squared map-scale factor (V FACE)
unlimited dimensions:
current shape = (1, 1, 786, 973)
filling off