[Thread Prev][Thread Next][Index]

Re: [ferret_users] Define new variable!



Dear Peter,

Thanks for your script, it works!
Actually I use this to calculate the location of finite elements.
So, no negative values in the nv and it fits the grid system (that's why it has 3 components in the l-axis which define the nodes of elements).  

dan

2008/5/21 Peter Szabo <szabpet83@xxxxxxxxx>:
Dear Yu,

If I understand, you want to have elex as a 1-D array. On which axis? If there is no then ferret uses the "i".
If you have nc[l=1:3,i=1:100] then lon[i=`ei] will contain maximum 300 data. What if "nv" can be the same on different "i" or "l" points? What if it is negative?

anyway, i would write the elex out to a new file right after i defined it as a number, then it will be a 1-D array. And this should be something like this:

repeat/l=1:3:1 (repeat/i=1:100:1 (
let e1=nv[i=`i`,l=`l`] ;\
let elex=lon[i=`e1`]  ;\
save/file="elex.nc"/ILIMITS=1:???/i=`i`/append/clobber elex))

Using "repeat/range=1:123/name=yourname" gives you more freedom, if you have newer version of ferret.

Or you can use some sorting and sampling.

Hope this helps,
Peter Szabo


[Thread Prev][Thread Next][Index]

Contact Us
Dept of Commerce / NOAA / OAR / PMEL / TMAP

Privacy Policy | Disclaimer | Accessibility Statement