Hi,
Your dataset looks as if it has a Curvilinear Grid. Going back
to where you showed the result of "show data":
yes?
use rhoneG_1.tsout3N
yes?
sh d
name
title I J K L
M N
XOUT
X-coordinate 1:193 1:87 ... ...
... ...
YOUT
Y-coordinate 1:193 1:87 ... ...
... ...
ZOUT
Z-coordinate 1:193 1:87 1:25 ...
... ...
TEMP
Temperature 1:193 1:87 1:25 1:7
... ...
It looks as if the variables XOUT and YOUT contain the coordinates.
Have a look at the documentation for Curvilinear grids. For this
data, you would use the SAMPLEXY_CURV function.
ansley
On 8/17/2016 7:13 PM, Sara Sari wrote:
Thank you very
much Ansley,
you are right, I
get "NO Valid Data".
seems
that I didn't get the samplexy script in the userguide very
well.
but one
more thing:
the
example that you provided for 4D, is according to the lat and
long
but
please look at my grid:
yes? sh
grid temp
GRID GIE4
name
axis # pts start end
XDIM
X 193 r 1 193
YDIM
Y 87 r 1 87
ZDIM
Z 25 r 1 25
TDIM
T 7 r 1 7
normal
E
normal
F
it
doesn't have any lat or long and is just points.... what
should I write to xlon and ylat then?
best,
Sara
Hello,
When you're running your script, at the time
you see the error **ERROR: required program
command has not been given: SET DATA_SET
Right
then, type in
yes? show data
Is the dataset still listed? It should show your
data, and should say (default) in the line that
lists the path and name of the dataset.
In your script you could move the "use" command to
just before the "LET slanttemp" command.
In your script, the index i is used in two
different ways. You are using it as an index to
define the sample points xlon and ylat, and it is
also an a index of the grid of the variable temp.
Then when you go to evaluate the variable, the
range of i is ambiguous. This issue is described
in the Users List under "Grid-Changing Functions",
see the link from the documentation
of SAMPLEXY.
For
grid-changing functions, we need to give the an
index range or coordinate range for all of the
arguments, based on the grid of each argument.
You did that with temp[x=1:193,y=1:87]. It's
also best to do it with xlon and ylat.
[ define xlon and ylat ]
yes? use rhoneG_1.tsout3N
yes? LET slanttemp =
samplexy(temp[x=1:193,y=1:87],xlon[i=1:10],ylat[j=1:10])
Finally, the SAMPLEXY function in current Ferret
versions does not handle modulo longitude
operations when there is a sub-range in
longitudes. This is something that we recently
discovered, and the behavior will be fixed in
future versions, so that if the points are known
to be longitudes and latitudes, things will work
without any adjustment.
For now, though, this means that if the grid of
your variable TEMP has longitude defined as
x=0:360, and you define xlon in the range -80 to
-71, then it will not find an answer, but will
give you a plot that just says No Valid Data. So
instead, make sure the xpts are in the same range
as the longitude coordinates in the file.
Here is a file with 4-D data,
yes? use ocean_atlas_temp
yes? sh dat
currently SET data sets:
1>
/home/users/tmap/ferret/linux/fer_dsets/data/ocean_atlas_subset.nc
(default)
name title
I J K L
M N
TEMP Temperature
1:180 1:90 1:19 1:12
... ...
yes? show grid temp
GRID GHA1
name axis # pts
start end
subset
XAX_SUBSET LONGITUDE 180mr
20.5E 18.5E(378.5)
full
YAX_SUBSET LATITUDE 90 r
89.5S 88.5N full
ZAXLEVIT19 DEPTH (m) 19 i-
0 1000 full
TIME TIME 12mr 16-JAN
06:00 16-DEC 01:20 full
So this dataset has its longitudes in 20:380. If
I give SAMPLEXY points with xlon=-80:-71, it will
not return an answer, but if I define the points
this way, it's fine.
yes?
let/units=degrees_east xlon =
360-80+(i[i=1:10]-1)
yes?
LET slope=0.5
yes?
LET/units=degrees_north ylat = 41 +
slope*(i[i=1:10] -1)/2
yes? LET slanttemp =
samplexy(temp[x=1:193,y=1:87],xlon[i=1:10],ylat[j=1:10])
On
8/17/2016 12:27 PM, 'Sara Sari' via _OAR PMEL
Ferret Users wrote:
So could you give me a
solution for this problem?
Thnx
On Wed, Aug 17, 2016 at 1:34 AM, 'Sara
Sari' via _OAR PMEL Ferret Users
I use version
V6.93
I forgot to say
that I don't use
spherical
coordinate, I just
have 194 *87 pts
with resolution of
2km. so is that
possible that as I
don't work with lat
and longitude so
this causes the
problem?
regards,
Sara
thank you Russ,
Here is the
complete
script:
use
rhoneG_1.tsout3N
yes?
sh d
name
title
I
J
K
L M
N
XOUT
X-coordinate
1:193
1:87 ...
...
...
...
YOUT
Y-coordinate
1:193
1:87 ...
...
...
...
ZOUT
Z-coordinate
1:193
1:87 1:25
...
... ...
TEMP
Temperature
1:193
1:87 1:25
1:7
... ...
yes?
let xlon =
-80+(I[I=1:10]-1)
yes?
LET slope=0.5
yes?
LET ylat = 41
+
slope*(i[i=1:10]
-1)/2
yes?
PLOT/VS/LINE/SYM=27 xlon,ylat
yes?
GO land
yes?
LET slanttemp
=
samplexy(temp[x=1:193,y=1:87],xlon,ylat)
yes?
fill/vlimits=1:25/l=1 slanttemp
**ERROR:
required
program
command has
not been
given: SET
DATA_SET
even after adding
l=1 I still
get the same
error.
Hi Sara,
It looks like
you haven't
loaded the
data set. What
does SHOW DATA
return before
and after the
GO LAND
command?
However, you
aren't showing
us the
complete
script so it's
impossible to
tell what is
going on. As
it stands
there should
be an error
issued for
trying to
create a
fill/shade
plot with a 3
dimensional
data set as
"slanttemp"
has been
sampled along
the line but
also has depth
and time axes.
The command
should be
something like
fill/l=1
slanttemp
unless you
have set
regions
elsewhere.
Russ
On 16/08/16
11:31, 'Sara
Sari' via _OAR
PMEL Ferret
Users wrote:
Hi
ferret users,
I'm
trying to plot
temp on
bathymetry on
Lake Erie,
Here
is my data:
name
title
I
J
K
L M
N
XOUT
X-coordinate
1:193
1:87 ...
...
...
...
YOUT
Y-coordinate
1:193
1:87 ...
...
...
...
ZOUT
Z-coordinate
1:193
1:87 1:25
...
... ...
TEMP
Temperature
1:193
1:87 1:25
1:7
... ...
My
area lies
between
-84:-78(long)
and 41:42
(lat)
I
use samplexy
script:
yes?
let xlon =
-80+(I[I=1:10]-1)
yes?
LET slope=0.5
yes?
LET ylat = 41
+
slope*(i[i=1:10]
-1)/2
yes?
PLOT/VS/LINE/SYM=27 xlon,ylat
yes?
GO land
yes?
LET slanttemp
=
samplexy(temp[x=1:193,y=1:87],xlon,ylat)
yes?
fill/vlimits=1:25 slanttemp
**ERROR:
required
program
command has
not been
given: SET
DATA_SET
I don't get this
error. and one
more thing: is
my script ok?
I mean in one
part using x
and y points
and in the
other using
lat and long?
Thank you,
Sara
|