[Thread Prev][Thread Next][Index]

Re: [ferret_users] regridiing z axis



Hi,
That sounds as if you are doing this right.   To make a quick example:

yes? define axis/z=10:400:30/depth/units=m z30
yes? let u = z[gz=z30]

yes? def axis/z=0:400:10/depth/units=m newax
yes? let um=u[gz=newax]

yes? list u
             VARIABLE : Z[GZ=Z30]
             SUBSET   : 14 points (DEPTH (m))
 10     /  1:   10.0
 40     /  2:   40.0
 70     /  3:   70.0
 100    /  4:  100.0
 130    /  5:  130.0
 160    /  6:  160.0
 190    /  7:  190.0

...

yes? list um
             VARIABLE : U[GZ=NEWAX]
             SUBSET   : 41 points (DEPTH (m))
 0      /  1:   ....
 10     /  2:   10.0
 20     /  3:   20.0
 30     /  4:   30.0
 40     /  5:   40.0
 50     /  6:   50.0
 60     /  7:   60.0

...


! Or see how it looks if you regrid with a different regridding transformation

!
such as @AVE, instead of the default linear regridding:

yes? let um_ave = u[gz=z30@ave]
yes? list um_ave
             VARIABLE : U[GZ=NEWAX@AVE]
             SUBSET   : 41 points (DEPTH (m))
 0      /  1:   10.0
 10     /  2:   10.0
 20     /  3:   10.0
 30     /  4:   40.0
 40     /  5:   40.0
 50     /  6:   40.0
 60     /  7:   70.0
...

yes? let um=u[gz=newax@xact]
yes? list um
             VARIABLE : U[GZ=NEWAX@XACT]
             SUBSET   : 41 points (DEPTH (m))
 0      /  1:   ....
 10     /  2:   10.0
 20     /  3:   ....
 30     /  4:   ....
 40     /  5:   40.0
 50     /  6:   ....
 60     /  7:   ....
 70     /  8:   70.0

Some things to check: Is the original axis defined with z increasing downwards?  Or does it perhaps have z=-10, -40, -70, ...?    Does it have units of meters?

To see the definition and coordinate of the original axis, look at the output of
yes? show axis `u,return=zaxis` 
yes? show axis/z `u,return=zaxis` 

If this does not answer your question please write back and show more output from the commands you are trying.  Also tell us what version of Ferret you are running. 

-Ansley

On 3/25/2016 9:33 PM, Arijeet Dutta wrote:
Hi all
I have zonal current at depths starting from 10 to 400 meters at 30
meters interval. I want to have it from 0 to 400m with 10m intervals.
what I did, defined a new axis
def axis/z=0:400:10/depth/units=m newax
let um=u[gz=newax]

listing um gives me data from 0 to 400 meters depth but at every 30
meters; but if I am defining with z=0:400:a value>30 it's coming
properly. Can anyone please help me?

Regards
Arijeet


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

Privacy Policy | Disclaimer | Accessibility Statement