# Bug in Save Data (Ctrl+S) ?

**URL:** https://discourse.paraview.org/t/bug-in-save-data-ctrl-s/10199
**Category:** ParaView Support
**Created:** [August 28, 2022, 8:35am UTC](https://discourse.paraview.org/t/bug-in-save-data-ctrl-s/10199 "2022-08-28T08:35:02Z")
**Posts on this page:** 17
**Page:** 1

<div class="post-metadata">

### Author: ![DanRR](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/d/bbe5ce/32.png) [@DanRR](https://discourse.paraview.org/u/DanRR)
#### Post date: [August 28, 2022, 8:35am UTC](https://discourse.paraview.org/t/bug-in-save-data-ctrl-s/10199/1 "2022-08-28T08:35:02Z")

</div>

Hello All,  
If after you have successfully plotted in Paraview the results loaded from VTK or Silo files you then try to save the data using “File/Save Data …Ctrl+S” in regular ASCII TXT/CSV file format you get all the variables which were present in VTK/Silo files saved correctly in the saved table but the coordinates XYZ of the data points, nodes or cells are completely missing no matter what other existing few options to save you try making the output totally useless.

Am i doing something wrong with the “Save Data”? By the way same story but opposite - coordinates are there but not a single variable is saved - is with the Visit plotting program

---

<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: [August 29, 2022, 3:49am UTC](https://discourse.paraview.org/t/bug-in-save-data-ctrl-s/10199/2 "2022-08-29T03:49:33Z")

</div>

Hi @DanRR , and welcome !

> [@DanRR](#):
>
> nodes or cells are completely missing no matter what other existing few options to save you try making the output totally useless.

This is expected, .csv format does not support this kind of information. Just use another format.

Best,

---

<div class="post-metadata">

### Author: ![DanRR](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/d/bbe5ce/32.png) [@DanRR](https://discourse.paraview.org/u/DanRR)
#### Post date: [August 29, 2022, 10:57am UTC](https://discourse.paraview.org/t/bug-in-save-data-ctrl-s/10199/3 "2022-08-29T10:57:04Z")

</div>

Interesting. So with VTK you can create the image of say your face but you can not get back and can not read the RGB color of each pixel of your image and place it into usual text format???

---

<div class="post-metadata">

### Author: ![nicolas.vuaille](https://discourse.paraview.org/user_avatar/discourse.paraview.org/nicolas.vuaille/32/5873_2.png) [@nicolas.vuaille](https://discourse.paraview.org/u/nicolas.vuaille)
#### Post date: [August 29, 2022, 1:27pm UTC](https://discourse.paraview.org/t/bug-in-save-data-ctrl-s/10199/4 "2022-08-29T13:27:03Z")

</div>

Depends on what you call “usual text format”.  
There are some ASCII file format supported in VTK, including the native [`.vtX` family](https://kitware.github.io/vtk-examples/site/VTKFileFormats/).

But CSV has limitations, including not mixing Point Data and Cell Data in the same file.

---

<div class="post-metadata">

### Author: ![DanRR](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/d/bbe5ce/32.png) [@DanRR](https://discourse.paraview.org/u/DanRR)
#### Post date: [August 30, 2022, 2:46am UTC](https://discourse.paraview.org/t/bug-in-save-data-ctrl-s/10199/5 "2022-08-30T02:46:52Z")

</div>

Text/binary format like in Fortran. File opened by any text editor without any tags

---

<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: [August 30, 2022, 3:57am UTC](https://discourse.paraview.org/t/bug-in-save-data-ctrl-s/10199/6 "2022-08-30T03:57:53Z")

</div>

> Text/binary format like in Fortran. File opened by any text editor without any tags

Thats not a format. CSV do not support what you want, many other format do.

---

<div class="post-metadata">

### Author: ![DanRR](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/d/bbe5ce/32.png) [@DanRR](https://discourse.paraview.org/u/DanRR)
#### Post date: [August 30, 2022, 4:37am UTC](https://discourse.paraview.org/t/bug-in-save-data-ctrl-s/10199/7 "2022-08-30T04:37:51Z")

</div>

Then why your Ctrl+S doing output of Y values without appropriate Xes into txt file ? Looks like somebody did not know what he was doing ? :))

There is no reason not to support simplest ASCII txt format. You can ask user if he wants the saved data cell centered or node/interface centered. That is how most of variables data in the PIC or Hydro codes defined and used. What, is this hard to do that? :))))))

By the way the main reason why all these 100s of barely used formats were invented and used was because of incompatibility of binary files from compiler to compiler and from OS to OS. Recently though all compilers finally got the ability to be fully compatible on binary output level (as simple as by just using access=STREAM when you open the file) so the big need in all these formats is gone. And just the simple binary outputs are way faster than with all these “formats” which will now go into oblivion

---

<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: [August 30, 2022, 4:56am UTC](https://discourse.paraview.org/t/bug-in-save-data-ctrl-s/10199/8 "2022-08-30T04:56:33Z")

</div>

VTK is open source and your contributions are welcome: [https://gitlab.kitware.com/vtk/vtk/](https://gitlab.kitware.com/vtk/vtk/)

BTW using text based format is highly ineficient.

---

<div class="post-metadata">

### Author: ![DanRR](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/d/bbe5ce/32.png) [@DanRR](https://discourse.paraview.org/u/DanRR)
#### Post date: [August 30, 2022, 5:04am UTC](https://discourse.paraview.org/t/bug-in-save-data-ctrl-s/10199/9 "2022-08-30T05:04:14Z")

</div>

Hahaha ParaView people send you to VTK - the VTK people send you to ParaView and VisIt. :)))))))

Sure, TXT files are slow and large but they are extremely useful for debugging. After debugging done, the best way is avoiding all these “formats” and use binary output which has speeds ~8GB/s and the size barely compressible more

---

<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: [August 30, 2022, 5:11am UTC](https://discourse.paraview.org/t/bug-in-save-data-ctrl-s/10199/10 "2022-08-30T05:11:24Z")

</div>

All ParaView people are VTK people, @DanRR .

If you want to improve the vtkDelimitedTextReader, the class is here: [https://gitlab.kitware.com/vtk/vtk/-/blob/master/IO/Infovis/vtkDelimitedTextReader.cxx](https://gitlab.kitware.com/vtk/vtk/-/blob/master/IO/Infovis/vtkDelimitedTextReader.cxx)

I agree that it needs improvement tbh and your idea of a new feature is actually not bad, writing cell data can make sens in some cases.

---

<div class="post-metadata">

### Author: ![Kenneth\_Moreland](https://discourse.paraview.org/user_avatar/discourse.paraview.org/kenneth_moreland/32/15033_2.png) [@Kenneth\_Moreland](https://discourse.paraview.org/u/Kenneth_Moreland)
#### Post date: [August 30, 2022, 12:56pm UTC](https://discourse.paraview.org/t/bug-in-save-data-ctrl-s/10199/11 "2022-08-30T12:56:42Z")

</div>

> [@DanRR](#):
>
> Then why your Ctrl+S doing output of Y values without appropriate Xes into txt file ? Looks like somebody did not know what he was doing ? :))

Whoa. Hang on a second. Are you saying you wrote out a csv/txt file that had the x coordinates but not the y (or z) coordinates? I have never seen that, and that sounds like a bug. Can you provide an example where the x coordinates are written but not the y values?

> [@DanRR](#):
>
> There is no reason not to support simplest ASCII txt format. You can ask user if he wants the saved data cell centered or node/interface centered. That is how most of variables data in the PIC or Hydro codes defined and used. What, is this hard to do that? :))))))

I am confused. ParaView does exactly this. When you ask ParaView to write out a csv/txt file, it gives you a dialog where one of the options is a combo box to choose whether to write out cell centered or node (point) centered data.

![Screen Shot 2022-08-30 at 6.52.32 AM](https://discourse.paraview.org/uploads/default/original/2X/b/bc1d57bf7a0254a0961066e9df4468b9d1782ba0.png)

Is this not working for you?

---

<div class="post-metadata">

### Author: ![DanRR](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/d/bbe5ce/32.png) [@DanRR](https://discourse.paraview.org/u/DanRR)
#### Post date: [August 31, 2022, 12:11am UTC](https://discourse.paraview.org/t/bug-in-save-data-ctrl-s/10199/12 "2022-08-31T00:11:59Z")

</div>

Liitle bit not that. ParaView outputs all the variable values seems ok but does not a single their coordinate.  
And yes, this pop menu with cell centered/node point centered options does not work. You always get cell/node values in the output OK but the coordinates are absent. It generates just one line with the name ) options all give something incomprehensive (and very different - either Y, just one line, or nothing) without explanation why. And the Point option does not give you anything at all. I can send you the VTU/Silo files, they all plot nicely but Ctrl+S fails on all options as if it was not tested at all

Great that you guys quickly respond. Hope all will be quickly fixed ! Will be glad to test

---

<div class="post-metadata">

### Author: ![Kenneth\_Moreland](https://discourse.paraview.org/user_avatar/discourse.paraview.org/kenneth_moreland/32/15033_2.png) [@Kenneth\_Moreland](https://discourse.paraview.org/u/Kenneth_Moreland)
#### Post date: [August 31, 2022, 10:02pm UTC](https://discourse.paraview.org/t/bug-in-save-data-ctrl-s/10199/13 "2022-08-31T22:02:20Z")

</div>

Again, I am confused. Everything you say seems to be working for me.

Maybe the one thing you are expecting to work but does not is that if you write out cell data to a csv file, you will _not_ get any point coordinates (at the center or any place else in the mesh). This is by design as the csv writer writes out the data that exists on the data set; no more, no less. The coordinates of the cell center are not in the data, so they are not written out.

However, you can easily get the cell centers written to a csv file by creating a cell field that contains the cell centers before writing out the data. Unfortunately, ParaView does not come with a filter to directly compute the cell centers (c.f. [Add the cell center coordinates to the cell data](https://discourse.paraview.org/t/add-the-cell-center-coordinates-to-the-cell-data/560)), but here is a custom custom filter that will add an `Append Cell Centers` filter that will do just that:

[AppendCellCenters.cpd](https://discourse.paraview.org/uploads/short-url/z8SQTtWUNP42lSsUnvHm0Ev7Tj8.cpd) (5.2 KB)

To load this, go to `Tools` → `Manage Custom Filters...` . Then click the `Import` button to load this file. The new filter will appear in the filters list.

---

<div class="post-metadata">

### Author: ![DanRR](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/d/bbe5ce/32.png) [@DanRR](https://discourse.paraview.org/u/DanRR)
#### Post date: [August 31, 2022, 11:44pm UTC](https://discourse.paraview.org/t/bug-in-save-data-ctrl-s/10199/14 "2022-08-31T23:44:53Z")

</div>

Just succeeded to use this filter and from the first glance i immediately see the difference, the output looks reasonable. Many thanks to Kenneth and all who discussed this issue and tried to help.

---

<div class="post-metadata">

### Author: ![Kenneth\_Moreland](https://discourse.paraview.org/user_avatar/discourse.paraview.org/kenneth_moreland/32/15033_2.png) [@Kenneth\_Moreland](https://discourse.paraview.org/u/Kenneth_Moreland)
#### Post date: [September 1, 2022, 12:48pm UTC](https://discourse.paraview.org/t/bug-in-save-data-ctrl-s/10199/15 "2022-09-01T12:48:58Z")

</div>

Great. Glad that works.

It was just pointed out to me that ParaView now comes with an `Append Location Attributes` filter that will also create the cell centers. That’s an easier way to do it than loading a custom filter.

---

<div class="post-metadata">

### Author: ![DanRR](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/d/bbe5ce/32.png) [@DanRR](https://discourse.paraview.org/u/DanRR)
#### Post date: [September 2, 2022, 11:25am UTC](https://discourse.paraview.org/t/bug-in-save-data-ctrl-s/10199/16 "2022-09-02T11:25:56Z")

</div>

Thanks. Cool that output of data got some improvements from the developers.

Additional suggestion to them would be to add these relevant filters directly into into the dialog dropbox you have shown above. And the word Filters is a bit confusion. Because some do interpolation, some do transformation etc of data . But the word Filters, and also placed far from the necessity into the main Menu does not encourage users to try them for saving data

---

<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: [August 8, 2024, 7:25am UTC](https://discourse.paraview.org/t/bug-in-save-data-ctrl-s/10199/17 "2024-08-08T07:25:31Z")

</div>

A post was split to a new topic: [Save AMR to .csv](https://discourse.paraview.org/t/save-amr-to-csv/15186)
