[Thread Prev][Thread Next][Index]
Re: [ferret_users] Using pseudo variable dimensions in a script
Hi Matt,
If you always want the value at the last time in the dataset, then this
is quite simple:
yes? LET nt= `water_depth,RETURN=lend`
yes? LIST/L=`nt` water_depth
or something along those lines, depending on how you want to return the
values.
If there may be missing values at the end of the time series, and you
want to return the last good data, then it'll take just a bit more
thought, but can be done.
Ansley
Matthew Howard wrote:
Gurus,
I've read a netCDF file via an OPeNDAP-enabled version of Ferret. The
file
contains a bunch of vectors. I want to extract the last value from
all of
the individual vectors.
I want to do this in a script because I want to do this "last value"
extraction
several times a day on 60 files. I especially want to take advantage
of the
remote sub setting ability of OPeNDAP because many of the files are
large.
Here's an example the first three of many variables in the list;
------
yes? show data
currently SET data sets:
1>
http://dods.ndbc.noaa.gov/cgi-bin/nph-dods/dods/adcp2/42361/42361a9999nc/i0b001.nc
(default)
name title I J
K L
WATER_DEPTH
Water Depth 1:1 1:1
... 1:13625
WATER_DIR
Water Direction 1:1 1:1
... 1:13625
WATER_SPD
Water Speed 1:1 1:1
... 1:13625
----
I need to access and use the upper value of the L pseudo variable
which will
change from file to file and hour to hour. Here it's 13625. In
otherwords
I need to access and use the dimension. Perhaps the RETURN
What's the quickest and most efficient way to do this?
Matt
+-------------------------------------------------------------------------+
| Dr. Matthew K. Howard Voice:
(979)-862-4169 |
| Department of Oceanography FAX:
(979)-847-8879 |
| Texas A&M University email:
mkhoward@tamu.edu |
| College Station, TX 77843-3146 webcam:
http://seawater.tamu.edu/howie |
| AIM: matthew_howard@mac.com
(audio/video) |
| Yahoo:
matthoward51 |
+-------------------------------------------------------------------------+
[Thread Prev][Thread Next][Index]
Dept of Commerce /
NOAA /
OAR /
PMEL /
TMAP
Contact Us | Privacy Policy | Disclaimer | Accessibility Statement