[Thread Prev][Thread Next][Index]
RE: How to extract length of axis to a symbol?
Andrew, Ansley, et al.-
Thanks! That define works. Now I need a little help
getting the index range of a regridded variable. The
first section below writes a new netCDF file and then
I want to append to it with additional data, yet unless
I specify the index range the first set of data gets
overwritten by the no_data values from the 2nd set of data.
LET V_VEL_COMP = V3[gt=TNEW@LIN]
SAVE/FILE="m1_adcp.nc"/LLIMITS=1:($NTIME)/CLOBBER U_VEL_COMP,V_VEL_COMP
USE
"/hosts/tornado/vol/vol0/oasis/deployments/m1/199606/m1/netcdf/m1_adcp_19960
110_NarrowBand.nc"
LET U1 = missing(U_COMPONENT_FLAG, -9999)
LET U2 = IF U1 EQ 0 THEN 1
LET U3 = U_COMPONENT * U2
LET U_VEL_COMP = U3[gt=TNEW@LIN]
LET V1 = missing(V_COMPONENT_FLAG, -9999)
LET V2 = IF V1 EQ 0 THEN 1
LET V3 = V_COMPONENT * V2
LET V_VEL_COMP = V3[gt=TNEW@LIN]
(How do I get the $LSTART & $LEND values that are needed for this?)
SAVE/FILE="m1_adcp.nc"/APPEND
U_VEL_COMP[L=$LSTART:$LEND],V_VEL_COMP[L=$LSTART:$LEND]
Again, thanks in advance,
Mike
--
Mike McCann (mccann@mbari.org)
Group Leader, Information Applications Group
Monterey Bay Aquarium Research Institute
7700 Sandholdt Road
Moss Landing, CA 95039-9644
Voice: (831) 775-1769 Fax: (831) 775-1646 http://www.mbari.org/rd/iag.htm
> -----Original Message-----
> From: Andrew Wittenberg [mailto:andyw@splash.Princeton.EDU]
> Sent: Tuesday, April 03, 2001 2:58 PM
> To: McCann, Mike
> Cc: ferret_users
> Subject: Re: How to extract length of axis to a symbol?
>
>
> On Tue, 3 Apr 2001, McCann, Mike wrote:
>
> > After defining an axis, e.g.:
> >
> > DEFINE AXIS/T=($TMIN):($TMAX):7200/UNITS=seconds TNEW
> >
> > How do I get the number of points in the axis and assign
> > the number to a symbol?
>
> Hi Mike,
>
> Give this a try:
>
> yes? define symbol num_points `t[gt=tnew],r=lsize`
> yes? say ($num_points)
>
> Andrew
>
> ----------------------------------------------------------------------
> Andrew Wittenberg Program in Atmospheric and Oceanic Sciences
> andyw@splash.princeton.edu Princeton University
> ----------------------------------------------------------------------
>
>
[Thread Prev][Thread Next][Index]
Dept of Commerce /
NOAA /
OAR /
PMEL /
TMAP
Contact Us | Privacy Policy | Disclaimer | Accessibility Statement