# PVPython for NetCDF to write .csv files

**URL:** https://discourse.paraview.org/t/pvpython-for-netcdf-to-write-csv-files/5409
**Category:** ParaView Support
**Tags:** python
**Created:** [September 23, 2020, 2:12pm UTC](https://discourse.paraview.org/t/pvpython-for-netcdf-to-write-csv-files/5409 "2020-09-23T14:12:53Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![vrkssai](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/v/e19b73/32.png) [@vrkssai](https://discourse.paraview.org/u/vrkssai)
#### Post date: [September 23, 2020, 2:12pm UTC](https://discourse.paraview.org/t/pvpython-for-netcdf-to-write-csv-files/5409/1 "2020-09-23T14:12:53Z")

</div>

I’m trying to convert a NetCDF file to a .csv format so that the data along with the coordinates could be imported into something else. I have tried using the GUI to do that and also pvpython script (thanks to @mwestphal for the pvpython webinar), but the .csv file doesn’t have the coordinates of the points. I’ve tried converting to legacy .vtk files and exporting to .csv as well but it didn’t work. I think I’m missing something related to the method to be used for structured data writing/converting formats. Any help is appreciated

sample ppvpython script used to convert from .vtk to .csv:

```auto
from paraview.simple import *
cylindervtk = LegacyVTKReader(FileNames=['./cylinder.vtk'])
SaveData('./output.csv', proxy=cylindervtk)

```

sampe data in .vtk format:  
[https://drive.google.com/file/d/1zOII1aoDk3RUjwm2LoZ1btWloKLZaaor/view?usp=sharing](https://drive.google.com/file/d/1zOII1aoDk3RUjwm2LoZ1btWloKLZaaor/view?usp=sharing)  
same data in NetCDF:

> **[cm1out\_000062.nc](https://drive.google.com/file/d/12gDTB2S-oEZ9CU1GR9Jx5kxM1UtOCKvw/view?usp=sharing)**
>
> Google Drive file.
