Waves get zero values after calculations

Hello and happy new year,

I have a netcdf file, which contains meteorological parameters, which need correction before any use.

After loading this file you can see parameters and their correction factors.

So eg. I do:


Function test2()<br />
<br />
wave/c nc_z<br />
wave nc_var3_scale_factor, nc_var3_add_offset<br />
<br />
duplicate/o/c nc_z, nc_z1 <br />
<br />
nc_z1=nan<br />
<br />
nc_z1=nc_z*nc_var4_scale_factor[0]+ nc_var4_add_offset[0]<br />
<br />
End




I have uploaded the nc file here:

http://www.megafileupload.com/qRr0/rel_vort.nc

After that the nc_vo1 wave gets only zero values.


What could be the problem?
Debugging should raise a wave-reference error:
You declare wave nc_var3_scale_factor, nc_var3_add_offset
but use
nc_var4_scale_factor[0] and nc_var4_add_offset[0]
--> "3" vs "4"

HJ
Oh sorry. That was because I was trying different things. Anyway, the problem remains.
Quote:
After that the nc_vo1 wave gets only zero values.


I don't see nc_vo1 listed in your code anywhere, so your difficulty is hard to diagnose.

And the NetCDF XOP I found couldn't load your data file; how did you get it into Igor?

You should attach your experiment instead of the data file.

--Jim Prouty
Software Engineer, WaveMetrics, Inc.
I tried your algorithm and got "normal" numbers.
Could you post a minimal example that reproduces your issue (make waves and do arithmetics)?

...factor[0] and ...offset[0] are non-zero? -- Really checked? ;-)
HJ
Hello and thank you for your reply,

concerning the way that I load my this nc file. A guy from the forum gave me an extension for Igor, because this files are a bit "weird".

However, I think that finally I found the solution. The only I did was to make a new wave and put the data I wanted from the nc_vo into my new wave. It might be a kind of different type (?) of wave. I am not sure.

For a reason that I don't know, when I multiplied and summed these factors, a kind of rounding took place. So, all values were really small (order of 10^-5), so the became 0.