# Failed to initialize derived coord variable

**URL:** <https://vapor.discourse.group/t/failed-to-initialize-derived-coord-variable/112>\
**Category:** Uncategorized\
**Created:** [August 24, 2021, 2:10pm UTC](https://vapor.discourse.group/t/failed-to-initialize-derived-coord-variable/112 "2021-08-24T14:10:00Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![yoghurt](https://avatars.discourse-cdn.com/v4/letter/y/ad7895/32.png) [@yoghurt](https://vapor.discourse.group/u/yoghurt)\
**Post date:** [August 24, 2021, 2:10pm UTC](https://vapor.discourse.group/t/failed-to-initialize-derived-coord-variable/112/1 "2021-08-24T14:10:00Z")

</div>

Dear all,

I want to draw the flow, but when I chose the flow renderer, vapor threw an error.

> Error performing paint event  
> Update deltaT failed!  
> One of the selected volume dimension is zero!

It seems that this error is because my file only has one moment. Then I montage the files with different time using CDO, while the file can’t be imported.  
The error is

> Failure to open data set of type “cf”  
> Failed to get time coordinates  
> Failed to initialize derived coord variable  
> Can’t read time variable  
> Invalid time step: 1

This is the metadata of combined file.  
[https://drive.google.com/file/d/1yLgJCdn1wttZG8\_\_aSJ0Cb71qPepg1n7/view?usp=sharing](https://drive.google.com/file/d/1yLgJCdn1wttZG8__aSJ0Cb71qPepg1n7/view?usp=sharing)

I have carefully read the instructions for netCDF-CF and checked the difference of metadata between single file and combined file, still don’t identify what went wrong.  
Is there anybody here who has met this error and perhaps knows a fix to the issue?

Sincerely,  
Yoghurt

---

<div class="post-metadata">

**Author:** ![clyne](https://avatars.discourse-cdn.com/v4/letter/c/b9e5f3/32.png) [@clyne](https://vapor.discourse.group/u/clyne)\
**Post date:** [August 26, 2021, 8:05pm UTC](https://vapor.discourse.group/t/failed-to-initialize-derived-coord-variable/112/2 "2021-08-26T20:05:00Z")

</div>

I don’t see anything obviously wrong in the metadata. Can you share the file itself?

---

<div class="post-metadata">

**Author:** ![yoghurt](https://avatars.discourse-cdn.com/v4/letter/y/ad7895/32.png) [@yoghurt](https://vapor.discourse.group/u/yoghurt)\
**Post date:** [August 27, 2021, 8:12am UTC](https://vapor.discourse.group/t/failed-to-initialize-derived-coord-variable/112/3 "2021-08-27T08:12:08Z")

</div>

(post deleted by author)

---

<div class="post-metadata">

**Author:** ![yoghurt](https://avatars.discourse-cdn.com/v4/letter/y/ad7895/32.png) [@yoghurt](https://vapor.discourse.group/u/yoghurt)\
**Post date:** [August 31, 2021, 12:08am UTC](https://vapor.discourse.group/t/failed-to-initialize-derived-coord-variable/112/4 "2021-08-31T00:08:25Z")

</div>

I have solved the problem of the file not opening, but it still reports

> Error performing paint event  
> Update deltaT failed!  
> One of the selected volume dimension is zero!

---

<div class="post-metadata">

**Author:** ![clyne](https://avatars.discourse-cdn.com/v4/letter/c/b9e5f3/32.png) [@clyne](https://vapor.discourse.group/u/clyne)\
**Post date:** [August 31, 2021, 1:11am UTC](https://vapor.discourse.group/t/failed-to-initialize-derived-coord-variable/112/5 "2021-08-31T01:11:00Z")

</div>

Can you dump out the value of the ‘time’ variable? E.g.

ncdump -v time your\_file.nc

---

<div class="post-metadata">

**Author:** ![yoghurt](https://avatars.discourse-cdn.com/v4/letter/y/ad7895/32.png) [@yoghurt](https://vapor.discourse.group/u/yoghurt)\
**Post date:** [August 31, 2021, 1:20am UTC](https://vapor.discourse.group/t/failed-to-initialize-derived-coord-variable/112/6 "2021-08-31T01:20:56Z")

</div>

It shows time = 135655.333333333, 135655.35, 135655.366666667, 135655.383333333, 135655.4

---

<div class="post-metadata">

**Author:** ![clyne](https://avatars.discourse-cdn.com/v4/letter/c/b9e5f3/32.png) [@clyne](https://vapor.discourse.group/u/clyne)\
**Post date:** [August 31, 2021, 1:47am UTC](https://vapor.discourse.group/t/failed-to-initialize-derived-coord-variable/112/7 "2021-08-31T01:47:06Z")

</div>

There is probably not enough precision internally to represent changes of 1/100th of a second. Can you try changing your time unit from “hours since 2001-01-01 00:00:00” to “hours” and only use the digits to the right of the decimal point. E.g.

0.33  
0.35  
0.36  
0.38

---

<div class="post-metadata">

**Author:** ![yoghurt](https://avatars.discourse-cdn.com/v4/letter/y/ad7895/32.png) [@yoghurt](https://vapor.discourse.group/u/yoghurt)\
**Post date:** [August 31, 2021, 3:23am UTC](https://vapor.discourse.group/t/failed-to-initialize-derived-coord-variable/112/8 "2021-08-31T03:23:13Z")

</div>

In fact, the time resolution of my file is second. I just experiment with the above data. Therefore, I have changed the time unit to “second since 2016-01-01 00:00:00”.  
Now the time = 15060000, 15060060, 15060120, 15060180, 15060240  
But it still reports the same error.  
This is the new file, [uvw\_2016-06-23\_07\_20\_24.nc - Google Drive](https://drive.google.com/file/d/1NTooXgBsbhSXmaDY6Hk_6bIrsBPHpt7T/view?usp=sharing)

---

<div class="post-metadata">

**Author:** ![yoghurt](https://avatars.discourse-cdn.com/v4/letter/y/ad7895/32.png) [@yoghurt](https://vapor.discourse.group/u/yoghurt)\
**Post date:** [August 31, 2021, 3:26am UTC](https://vapor.discourse.group/t/failed-to-initialize-derived-coord-variable/112/9 "2021-08-31T03:26:33Z")

</div>

For some reason I always get some problems when I click on reply, the specific reply is above. Thanks for your help.

---

<div class="post-metadata">

**Author:** ![clyne](https://avatars.discourse-cdn.com/v4/letter/c/b9e5f3/32.png) [@clyne](https://vapor.discourse.group/u/clyne)\
**Post date:** [August 31, 2021, 5:59pm UTC](https://vapor.discourse.group/t/failed-to-initialize-derived-coord-variable/112/10 "2021-08-31T17:59:51Z")

</div>

Thanks for providing the data set. I’ve opened an issue on GitHub here:

> <https://github.com/NCAR/VAPOR/issues/2848>
>
> When attempting to flow render a data set provided by @yoghurt the flow renderer… fails with:
> 
> \`\`\`
> Error performing paint event
> Update deltaT failed!
> One of the selected volume dimension is zero!
> \`\`\`
> To reproduce:
> 1. Load the data set /glade/p/cisl/vast/vapor/Bugs/\<bugid\>/uvw\_2016-06-23\_07\_20\_24.nc
> 2. Enable the flow renderer

We will get this addressed as soon as we can. You can check progress or provide additional information at the link above.

---

<div class="post-metadata">

**Author:** ![clyne](https://avatars.discourse-cdn.com/v4/letter/c/b9e5f3/32.png) [@clyne](https://vapor.discourse.group/u/clyne)\
**Post date:** [September 22, 2021, 10:51pm UTC](https://vapor.discourse.group/t/failed-to-initialize-derived-coord-variable/112/11 "2021-09-22T22:51:38Z")

</div>

FYI there has been an update to your issue opened here: [VAPOR doesn't support 1D coordinate variables that are monotonically decreasing · Issue #2848 · NCAR/VAPOR · GitHub](https://github.com/NCAR/VAPOR/issues/2848)
