# data visualization from netCDF file from BOUT++ code

**URL:** https://discourse.paraview.org/t/data-visualization-from-netcdf-file-from-bout-code/6645
**Category:** ParaView Support
**Tags:** vtk
**Created:** [March 8, 2021, 7:05am UTC](https://discourse.paraview.org/t/data-visualization-from-netcdf-file-from-bout-code/6645 "2021-03-08T07:05:21Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![Jagannath](https://discourse.paraview.org/user_avatar/discourse.paraview.org/jagannath/32/6097_2.png) [@Jagannath](https://discourse.paraview.org/u/Jagannath)
#### Post date: [March 8, 2021, 7:05am UTC](https://discourse.paraview.org/t/data-visualization-from-netcdf-file-from-bout-code/6645/1 "2021-03-08T07:05:21Z")

</div>

Hi,  
I want to use paraview to visualize the data from netCDF file (\*.nc format) from BOUT++ code. I am using the ParaView 5.7.0 version installed in my institute cluster. Output of `ncdump -h BOUT.dmp.0.nc’ file is following

```
    netcdf BOUT.dmp.0 {
dimensions:
	x = 8 ;
	y = 1 ;
	z = 8192 ;
	t = UNLIMITED ; // (101 currently)
variables:
	float BOUT_VERSION ;
	float t_array(t) ;
	int iteration ;
	int zperiod ;
	int MXSUB ;
	int MYSUB ;
	int MZSUB ;
	int PE_XIND ;
	int PE_YIND ;
	int MYPE ;
	int MXG ;
	int MYG ;
	int MZG ;
	int nx ;
	int ny ;
	int nz ;
	int MZ ;
	int NXPE ;
	int NYPE ;
	int NZPE ;
	float ZMAX ;
	float ZMIN ;
	int ixseps1 ;
	int ixseps2 ;
	int jyseps1_1 ;
	int jyseps1_2 ;
	int jyseps2_1 ;
	int jyseps2_2 ;
	int ny_inner ;
	float dx(x, y) ;
		dx:cell_location = "CELL_CENTRE" ;
		dx:direction_y = "Standard" ;
		dx:direction_z = "Average" ;
	float dy(x, y) ;
		dy:cell_location = "CELL_CENTRE" ;
		dy:direction_y = "Standard" ;
		dy:direction_z = "Average" ;
	float dz ;
	float g11(x, y) ;
		g11:cell_location = "CELL_CENTRE" ;
		g11:direction_y = "Standard" ;
		g11:direction_z = "Average" ;
	float g22(x, y) ;
		g22:cell_location = "CELL_CENTRE" ;
		g22:direction_y = "Standard" ;
		g22:direction_z = "Average" ;
	float g33(x, y) ;
		g33:cell_location = "CELL_CENTRE" ;
		g33:direction_y = "Standard" ;
		g33:direction_z = "Average" ;
	float g12(x, y) ;
		g12:cell_location = "CELL_CENTRE" ;
		g12:direction_y = "Standard" ;
		g12:direction_z = "Average" ;
	float g13(x, y) ;
		g13:cell_location = "CELL_CENTRE" ;
		g13:direction_y = "Standard" ;
		g13:direction_z = "Average" ;
	float g23(x, y) ;
		g23:cell_location = "CELL_CENTRE" ;
		g23:direction_y = "Standard" ;
		g23:direction_z = "Average" ;
	float g_11(x, y) ;
		g_11:cell_location = "CELL_CENTRE" ;
		g_11:direction_y = "Standard" ;
		g_11:direction_z = "Average" ;
	float g_22(x, y) ;
		g_22:cell_location = "CELL_CENTRE" ;
		g_22:direction_y = "Standard" ;
		g_22:direction_z = "Average" ;
	float g_33(x, y) ;
		g_33:cell_location = "CELL_CENTRE" ;
		g_33:direction_y = "Standard" ;
		g_33:direction_z = "Average" ;
	float g_12(x, y) ;
		g_12:cell_location = "CELL_CENTRE" ;
		g_12:direction_y = "Standard" ;
		g_12:direction_z = "Average" ;
	float g_13(x, y) ;
		g_13:cell_location = "CELL_CENTRE" ;
		g_13:direction_y = "Standard" ;
		g_13:direction_z = "Average" ;
	float g_23(x, y) ;
		g_23:cell_location = "CELL_CENTRE" ;
		g_23:direction_y = "Standard" ;
		g_23:direction_z = "Average" ;
	float J(x, y) ;
		J:cell_location = "CELL_CENTRE" ;
		J:direction_y = "Standard" ;
		J:direction_z = "Average" ;
	float Bxy(x, y) ;
		Bxy:cell_location = "CELL_CENTRE" ;
		Bxy:direction_y = "Standard" ;
		Bxy:direction_z = "Average" ;
	float G1(x, y) ;
		G1:cell_location = "CELL_CENTRE" ;
		G1:direction_y = "Standard" ;
		G1:direction_z = "Average" ;
	float G2(x, y) ;
		G2:cell_location = "CELL_CENTRE" ;
		G2:direction_y = "Standard" ;
		G2:direction_z = "Average" ;
	float G3(x, y) ;
		G3:cell_location = "CELL_CENTRE" ;
		G3:direction_y = "Standard" ;
		G3:direction_z = "Average" ;
	float Phi(t, x, y, z) ;
		Phi:cell_location = "CELL_CENTRE" ;
		Phi:direction_y = "Standard" ;
		Phi:direction_z = "Standard" ;
	float Jy(t, x, y, z) ;
		Jy:cell_location = "CELL_CENTRE" ;
		Jy:direction_y = "Standard" ;
		Jy:direction_z = "Standard" ;
	float rhs_ay(t, x, y, z) ;
		rhs_ay:cell_location = "CELL_CENTRE" ;
		rhs_ay:direction_y = "Standard" ;
		rhs_ay:direction_z = "Standard" ;
	float t_alf ;
	float resistivity ;
	float viscosity ;
	float wall_time(t) ;
	float wtime(t) ;
	int ncalls(t) ;
	int ncalls_e(t) ;
	int ncalls_i(t) ;
	float wtime_rhs(t) ;
	float wtime_invert(t) ;
	float wtime_comms(t) ;
	float wtime_io(t) ;
	float wtime_per_rhs(t) ;
	float wtime_per_rhs_e(t) ;
	float wtime_per_rhs_i(t) ;
	float tt ;
	int hist_hi ;
	float Wy(t, x, y, z) ;
		Wy:cell_location = "CELL_CENTRE" ;
		Wy:direction_y = "Standard" ;
		Wy:direction_z = "Standard" ;
	float Ay(t, x, y, z) ;
		Ay:cell_location = "CELL_CENTRE" ;
		Ay:direction_y = "Standard" ;
		Ay:direction_z = "Standard" ;
	float b(t, x, y, z) ;
		b:cell_location = "CELL_CENTRE" ;
		b:direction_y = "Standard" ;
		b:direction_z = "Standard" ;
	float u(t, x, y, z) ;
		u:cell_location = "CELL_CENTRE" ;
		u:direction_y = "Standard" ;
		u:direction_z = "Standard" ;

// global attributes:
		:BOUT_REVISION = "a597250b38acb265dccdf5244139102a639e1c5a" ;
}

```

I have read some of the solutions but couldn’t find a suitable one for my problem. Kindly hep me in this regard. Thank you.

---

<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 8, 2021, 8:39am UTC](https://discourse.paraview.org/t/data-visualization-from-netcdf-file-from-bout-code/6645/2 "2021-03-08T08:39:25Z")

</div>

> but couldn’t find a suitable one for my problem

What issue are you encountering ? Share your file please.

---

<div class="post-metadata">

### Author: ![Jagannath](https://discourse.paraview.org/user_avatar/discourse.paraview.org/jagannath/32/6097_2.png) [@Jagannath](https://discourse.paraview.org/u/Jagannath)
#### Post date: [July 1, 2021, 8:41pm UTC](https://discourse.paraview.org/t/data-visualization-from-netcdf-file-from-bout-code/6645/3 "2021-07-01T20:41:49Z")

</div>

Hi @mwestphal,  
Please look into the detailed question in the following link

> [@problem while loading NetCDF file in paraview 5.7.0](https://discourse.paraview.org/t/problem-while-loading-netcdf-file-in-paraview-5-7-0/7528):
>
> Hi all, I am using Paraview 5.7.0 and trying to visualize some .nc file (Data files can be found here: [Dropbox - test\_paraview - Simplify your life](https://www.dropbox.com/sh/4deym3sb01krq3q/AABZ7FCBYppCgRPvkDyNHH-ga?dl=0)). While loading these files I see 3 data file reader, 1.NetCDF CAM reader, which gives the error shown in the below screenshot. NetCDF reader: Choosing this doesn’t pop up any error but I am unable to see the data variables in the side display bar. VisitMFIXCDF reader: Choosing this, I get errors shown…

There, I have provided the data files and errors. Please help. Thank you
