[Thread Prev][Thread Next][Index]

[ferret_users] define new variable with different grid



Hello,

I have a variable ‚a_‘ which is everywhere zero except for one position with x,y,z. The grid is: x=1:100, y=1:100, z=1:5,l=1:10
I have several variables like this (so everywhere zero except one position) which are named a_1, a_2,..,a_55
Now I wanna have a new variable ‚n‘ which include all these values which aren’t zero. The grid should be like: x=1:55,l=1:10
So for example the non zero values are: a_1 = 10, a_2  = 15, a_3 = 50.
I wanna have a variable n which first value is 10, second 15 and third 50. And the grid should be like: x=1:3,l=1:10

When I’m trying this, I got a problem with the different dimensions. Can someone please help me with this problem.

Thanks a lot.
 



[Thread Prev][Thread Next][Index]
Contact Us
Dept of Commerce / NOAA / OAR / PMEL / Ferret

Privacy Policy | Disclaimer | Accessibility Statement