# Not all NetCDF file variables load in 5.9.0-RC3

**URL:** https://discourse.paraview.org/t/not-all-netcdf-file-variables-load-in-5-9-0-rc3/6137
**Category:** ParaView Support
**Created:** [December 29, 2020, 1:46am UTC](https://discourse.paraview.org/t/not-all-netcdf-file-variables-load-in-5-9-0-rc3/6137 "2020-12-29T01:46:13Z")
**Posts on this page:** 8
**Page:** 1

<div class="post-metadata">

### Author: ![razoumov](https://discourse.paraview.org/user_avatar/discourse.paraview.org/razoumov/32/1589_2.png) [@razoumov](https://discourse.paraview.org/u/razoumov)
#### Post date: [December 29, 2020, 1:46am UTC](https://discourse.paraview.org/t/not-all-netcdf-file-variables-load-in-5-9-0-rc3/6137/1 "2020-12-29T01:46:13Z")

</div>

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 [https://nextcloud.computecanada.ca/index.php/s/PzJgTeJ4X3nJiey/download](https://nextcloud.computecanada.ca/index.php/s/PzJgTeJ4X3nJiey/download) (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.

---

<div class="post-metadata">

### Author: ![razoumov](https://discourse.paraview.org/user_avatar/discourse.paraview.org/razoumov/32/1589_2.png) [@razoumov](https://discourse.paraview.org/u/razoumov)
#### Post date: [January 3, 2021, 12:15am UTC](https://discourse.paraview.org/t/not-all-netcdf-file-variables-load-in-5-9-0-rc3/6137/2 "2021-01-03T00:15:36Z")

</div>

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.

```auto
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})
ds.to_netcdf("two.nc")

```

---

<div class="post-metadata">

### Author: ![razoumov](https://discourse.paraview.org/user_avatar/discourse.paraview.org/razoumov/32/1589_2.png) [@razoumov](https://discourse.paraview.org/u/razoumov)
#### Post date: [January 7, 2021, 5:38pm UTC](https://discourse.paraview.org/t/not-all-netcdf-file-variables-load-in-5-9-0-rc3/6137/3 "2021-01-07T17:38:20Z")

</div>

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 [https://www.unidata.ucar.edu/software/netcdf/examples/files.html](https://www.unidata.ucar.edu/software/netcdf/examples/files.html) and see the problem; it’s not just isolated to NetCDF files written from xarray.  
Thanks!

---

<div class="post-metadata">

### Author: ![mwestphal](https://discourse.paraview.org/user_avatar/discourse.paraview.org/mwestphal/32/17_2.png) [@mwestphal](https://discourse.paraview.org/u/mwestphal)
#### Post date: [January 7, 2021, 5:41pm UTC](https://discourse.paraview.org/t/not-all-netcdf-file-variables-load-in-5-9-0-rc3/6137/4 "2021-01-07T17:41:51Z")

</div>

@Kenneth_Moreland?

---

<div class="post-metadata">

### Author: ![whayek](https://discourse.paraview.org/user_avatar/discourse.paraview.org/whayek/32/6051_2.png) [@whayek](https://discourse.paraview.org/u/whayek)
#### Post date: [March 4, 2021, 3:37am UTC](https://discourse.paraview.org/t/not-all-netcdf-file-variables-load-in-5-9-0-rc3/6137/5 "2021-03-04T03:37:39Z")

</div>

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, [https://github.com/Kitware/VTK/commits/master/IO/NetCDF/vtkNetCDFReader.cxx](https://github.com/Kitware/VTK/commits/master/IO/NetCDF/vtkNetCDFReader.cxx).

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

---

<div class="post-metadata">

### Author: ![mwestphal](https://discourse.paraview.org/user_avatar/discourse.paraview.org/mwestphal/32/17_2.png) [@mwestphal](https://discourse.paraview.org/u/mwestphal)
#### Post date: [March 4, 2021, 8:21am UTC](https://discourse.paraview.org/t/not-all-netcdf-file-variables-load-in-5-9-0-rc3/6137/6 "2021-03-04T08:21:49Z")

</div>

Good point @whayek !

It indeed should be available in ParaView 5.9.1  
[https://gitlab.kitware.com/paraview/paraview/-/issues/20042#note\_881379](https://gitlab.kitware.com/paraview/paraview/-/issues/20042#note_881379)  
[https://gitlab.kitware.com/vtk/vtk/-/merge\_requests/7550](https://gitlab.kitware.com/vtk/vtk/-/merge_requests/7550)

---

<div class="post-metadata">

### Author: ![razoumov](https://discourse.paraview.org/user_avatar/discourse.paraview.org/razoumov/32/1589_2.png) [@razoumov](https://discourse.paraview.org/u/razoumov)
#### Post date: [March 4, 2021, 9:07pm UTC](https://discourse.paraview.org/t/not-all-netcdf-file-variables-load-in-5-9-0-rc3/6137/7 "2021-03-04T21:07:51Z")

</div>

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

---

<div class="post-metadata">

### Author: ![joshuabl](https://discourse.paraview.org/user_avatar/discourse.paraview.org/joshuabl/32/7188_2.png) [@joshuabl](https://discourse.paraview.org/u/joshuabl)
#### Post date: [July 21, 2021, 4:45pm UTC](https://discourse.paraview.org/t/not-all-netcdf-file-variables-load-in-5-9-0-rc3/6137/8 "2021-07-21T16:45:27Z")

</div>

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