Not all NetCDF file variables load in 5.9.0-RC3

Hello! In 5.9.0-RC3 I can no longer read all variables from a NetCDF file formatted in a CF convention. Here is a file (397 MB) that I can read without problem in 5.5 - 5.8, with eight 3D scalar fields. In 5.9.0-RC3 “NetCDF Reader” only sees the first variable and does not let me read the other seven. Am I missing something obvious here? ncdump shows all variables properly. Thank you.

Here is a simple Python code to generate a tiny 2D NetCDF dataset with two variables and no time dependency. Try loading this dataset into 5.9.0-RC3 using the generic NetCDF reader, and you will see only one array, instead of two. All earlier versions of ParaView see both variables. I see this problem on both Mac and Linux.

import pandas as pd
import numpy as np
import xarray as xr
n = 10
axis = np.linspace(0,1,n)
x, y = np.meshgrid(axis,axis)
f = (1-y)*np.sin(np.pi*x) + y*(np.sin(2*np.pi*x))**2
coords = {"x": axis, "y": axis}
temp = xr.DataArray(20 + f, dims=("y","x"), coords=coords)
pres = xr.DataArray(100 + 10*np.random.randn(n,n), dims=("y","x"), coords=coords)
ds = xr.Dataset({"temperature": temp, "pressure": pres})

Any comment from the Kitware team on this? Is this a bug you are aware of? Is there any solution besides using 5.8?
You can download sample CF convention data from and see the problem; it’s not just isolated to NetCDF files written from xarray.


I came across the same problem with ParaView v5.9.0, trying to read CF-netCDF files with Windows and Linux builds and only being able to visualise the first variable for a chosen set of dimensions. This turned out to be a bug that was recently introduced and fixed in the VTK netCDF reader,

So hopefully the next ParaView release will pick up the fix?

Good point @whayek !

It indeed should be available in ParaView 5.9.1

Thank you for the heads up, Wolfgang! Looking forward to 5.9.1!

1 Like

I’ve tested a netCDF4 dataset in PV 5.9.1 and it looks to be working again! I’m very pleased about this! :clap: