[Thread Prev][Thread Next][Index]

[ferret_users] Extend non-modulo axis to modulo



Hi Ferreters,

I'm trying to treat a non-modulo longitude axis as an
artificial modulo axis, and I'm puzzled.

Suppose the computational domain of my idealized model
extends from lon=0 to lon=10 and it has datapoints at
lon = 0, 1, 2, . . . , 9.  The model treats the longitude
direction as cyclic, and so I want to plot figures that way.
For example, I sometimes want to plot the temperature field
as

   plot/y=10s/z=0/x=-5:5  temp

So, I'm trying to trick Ferret into believing my longitude
is zonally cyclic.

I tried various things with varying degrees of success.
It was a series of trial and error and I was frustrated
because I don't fully understand what's going on.
So, I set out to understand the issue once and for all,
and started from what I think is the simplest case:

$ ferret
        NOAA/PMEL TMAP
        FERRET v6.2
        Linux(g77) 2.4.21-32 - 05/19/09
         5-Jun-09 17:08

set mode grat:dash
keymark 1
yes? define axis/x=0:9:1/units=degrees_east xax
yes? cancel axis/modulo xax
yes? define axis/x=0:9:1/modulo=10/units=degrees_east xax_mod
yes? let pi = 4*atan(1.0)
yes? let fn = sin(x[gx=xax]*2*pi/10)
yes? let fn_mod = fn[gx=xax_mod]
yes? plot/x=-1:11 fn_mod

Here, "fn" is defined at x = 0, 1, 2, . . . , 9 only,
and I want to treat it as a cyclic function.  I thought
"fn_mod" as defined above is it.  But, it's not extended
to x=-1 or to x=10.  These points remain undefined in the
plot.

That means I'm missing something.  Could somebody help?

Regards,
Ryo


[Thread Prev][Thread Next][Index]

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

Privacy Policy | Disclaimer | Accessibility Statement