# Trouble with the flow renderer

**URL:** <https://vapor.discourse.group/t/trouble-with-the-flow-renderer/260>\
**Category:** Uncategorized\
**Created:** [January 4, 2023, 11:57pm UTC](https://vapor.discourse.group/t/trouble-with-the-flow-renderer/260 "2023-01-04T23:57:26Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![noonewade](https://avatars.discourse-cdn.com/v4/letter/n/b38774/32.png) [@noonewade](https://vapor.discourse.group/u/noonewade)\
**Post date:** [January 4, 2023, 11:57pm UTC](https://vapor.discourse.group/t/trouble-with-the-flow-renderer/260/1 "2023-01-04T23:57:26Z")

</div>

I am trying to visualize field lines using the streamline flow renderer but the results are not what I expect. I created this example to have field lines which spiral around a specific center (see image below of a field line computed in IDL). However, the VAPOR flow renderer tends to produce nonsensical lines (see image below from VAPOR, using 100 random seeds with the rake around a typical area I want to start the integration from). It appears that the integration is taking very large initial steps. I am wondering if there is a way to adjust this? Or is it possible that something is going wrong when I’m converting my data to vdc? The volume renderer produces expected output with expected values so I’m a bit confused. Below is the code I use to convert my data to vdc from the files ‘Bx’, ‘By’, ‘Bz’. Any input is appreciated.

vdccreate -dimension 512x512x600 -extents 0:0:0:6:6:2.5 -vars3d Bx:By:Bz mag\_vars.vdc  
raw2vdc -varname Bx mag\_vars.vdc Bx  
raw2vdc -varname By mag\_vars.vdc By  
raw2vdc -varname Bz mag\_vars.vdc Bz

![expected_field_line](https://global.discourse-cdn.com/free1/uploads/vapor/original/1X/45df288229a7f0194563cefd9965a4ccfc05e0e1.png)

 ![vapor_lines](https://global.discourse-cdn.com/free1/uploads/vapor/original/1X/47b6ce0a63e02837dc05a410c46eb9c4a5caacd9.png)

---

<div class="post-metadata">

**Author:** ![sam](https://avatars.discourse-cdn.com/v4/letter/s/5f9b8f/32.png) [@sam](https://vapor.discourse.group/u/sam)\
**Post date:** [January 5, 2023, 7:21pm UTC](https://vapor.discourse.group/t/trouble-with-the-flow-renderer/260/2 "2023-01-05T19:21:04Z")

</div>

Hello noonewade, could you share your raw data so we can try to reproduce and look into it?

---

<div class="post-metadata">

**Author:** ![noonewade](https://avatars.discourse-cdn.com/v4/letter/n/b38774/32.png) [@noonewade](https://vapor.discourse.group/u/noonewade)\
**Post date:** [January 5, 2023, 9:24pm UTC](https://vapor.discourse.group/t/trouble-with-the-flow-renderer/260/3 "2023-01-05T21:24:14Z")

</div>

Thanks for the reply. I saved the data here [tube\_data - Google Drive](https://drive.google.com/drive/folders/1Lijt3vQTz0wsRx2ZljwyE_bm3hmBh52D?usp=sharing)

---

<div class="post-metadata">

**Author:** ![sam](https://avatars.discourse-cdn.com/v4/letter/s/5f9b8f/32.png) [@sam](https://vapor.discourse.group/u/sam)\
**Post date:** [January 10, 2023, 10:41pm UTC](https://vapor.discourse.group/t/trouble-with-the-flow-renderer/260/4 "2023-01-10T22:41:46Z")

</div>

Hi [noonewade](https://vapor.discourse.group/u/noonewade), I wonder what data formats does this tube data use? It doesn’t look like single-precision floats, nor 4-byte ints?

---

<div class="post-metadata">

**Author:** ![noonewade](https://avatars.discourse-cdn.com/v4/letter/n/b38774/32.png) [@noonewade](https://vapor.discourse.group/u/noonewade)\
**Post date:** [January 10, 2023, 11:51pm UTC](https://vapor.discourse.group/t/trouble-with-the-flow-renderer/260/5 "2023-01-10T23:51:35Z")

</div>

hi @sam, the data should be single-precision floats on a 512x512x600 grid with physical extents 6:6:2.5

---

<div class="post-metadata">

**Author:** ![sam](https://avatars.discourse-cdn.com/v4/letter/s/5f9b8f/32.png) [@sam](https://vapor.discourse.group/u/sam)\
**Post date:** [January 11, 2023, 6:36am UTC](https://vapor.discourse.group/t/trouble-with-the-flow-renderer/260/6 "2023-01-11T06:36:32Z")

</div>

Hi [noonewade](https://vapor.discourse.group/u/noonewade), are you sure that they are single-precision floats? I see either zeroes or values in the magnitude of 1e-38 if interpreted as floats. Numbers like that are most often used to indicate a special status or region, rather than from a valid field.

---

<div class="post-metadata">

**Author:** ![noonewade](https://avatars.discourse-cdn.com/v4/letter/n/b38774/32.png) [@noonewade](https://vapor.discourse.group/u/noonewade)\
**Post date:** [January 11, 2023, 9:07pm UTC](https://vapor.discourse.group/t/trouble-with-the-flow-renderer/260/7 "2023-01-11T21:07:42Z")

</div>

@sam that’s odd. The data does have a lot of zeros but was created to form a ‘tube’ in the y-direction centered around x=3, z=1.15.

I just tested what I uploaded and I’m seeing the correct data values (which have magnitude O(1)) in VAPOR when converting to vdc using the commands in my original post.

---

<div class="post-metadata">

**Author:** ![sam](https://avatars.discourse-cdn.com/v4/letter/s/5f9b8f/32.png) [@sam](https://vapor.discourse.group/u/sam)\
**Post date:** [January 31, 2023, 6:55pm UTC](https://vapor.discourse.group/t/trouble-with-the-flow-renderer/260/8 "2023-01-31T18:55:55Z")

</div>

Note: an identified bug and a possible solution is posted on github: [Flow deltaT calculation on mostly zero fields · Issue #3318 · NCAR/VAPOR · GitHub](https://github.com/NCAR/VAPOR/issues/3318)
