[Thread Prev][Thread Next][Index]
[ferret_users] shifting a variable on a modular axis
Hello all
I have a question relating to the shifting a
variable on a modular axis and requiring it to wrap around in a modular
fashion.
Suppose I define a variable and set a grid with a
modular axis and apply the @shf transform as follows:
define axis/modulo/x=-18:18:0.1 x_mod_axis
define axis/y=-5:5:0.1
y_axis
define grid/x=x_mod_axis/y=y_axis my_grid
set grid my_grid
let
my_var = exp((-1) * y^2) * exp((-1) * (x * 0.3)^2)
shade
my_var[x=-18:18]
I see a bulls eye as to be expected.
then:
shade my_var[x=-18:18@shf:180]
results in the bullseye being shifted to the left boundary, but no
"wrapping" around onto the right hand side.
If I then go down the path a making a temporary data set and then plotting
I get the result I want as follows:
let my_var_sv = my_var[x=-18:18]
save/clob/file=mvs.nc
my_var_sv
can var my_var_sv
use
mvs.nc
shade my_var_sv[d=mvs.nc,x=-18:18]
bulls eye in the middle
shade my_var_sv[d=mvs.nc,x=-18:18@shf:180]
Bullseye wrapped around the boundaries as I want.
When applying the @shf transformation to any data_set which has a
modular axis then the data are shifted as I would expect, but I can't get it to
do the same using user defined variables. I feel that I have overlooked
something. Is there a way without using a temporary data_sets (which is
not the ferret way!!)
I am now using ferret 6.0 on SUSE Linux 10.1
Thanks
Mark
[Thread Prev][Thread Next][Index]
Contact Us
Dept of Commerce /
NOAA /
OAR /
PMEL /
TMAP
Privacy Policy | Disclaimer | Accessibility Statement