[Thread Prev][Thread Next][Index]
Re: Reading in ASCII and creating time axis therefrom...
Steve writes:
> p.s. I think Mick is right on -- you cannot "associate" a line in X with a
> line in T (G=@asn attempts to map what you probably intended, so it automa-
> tically adjusts for differing dimensionalities between grids. Your request
> is not an error, though not really meaningful, either -- hence no error
> message)
>
> After you define the time axis for the data set try
>
> cancel data 1
> file/grid=gg/var=yy,... <the rest the same>
>
> Now your data will be explicitly encoded on that time axis and the behavior
> will be clean.
BINGO!
Mick's solution to defining the time axis beforehand is a little tricky since
I'd prefer not to have to know how many data points there are in my ASCII file.
This works poifectly:
------------------------------------------------------------------------
!
file/var=yy,mm,dd,vr1,vu1,vr2,vu2,vr3,vu3,vww,vsf,vuf water
!
let time = DAYS1900(yy,mm,dd)-DAYS1900(1996,1,1)
list/prec=12 time
define axis/t/from_data/name=time/units="days"/t0="1-JAN-1996" time
define grid/t=time gg
can d 1
file/var=yy,mm,dd,vr1,vu1,vr2,vu2,vr3,vu3,vww,vsf,vuf/grid=gg testascii
!
[...]
------------------------------------------------------------------------
Thanks, Steve!
--
Gary Strand Climate Change Research Section, NCAR (303) 497-1336
strandwg@ucar.edu http://www.cgd.ucar.edu/ccr/strandwg
[Thread Prev][Thread Next][Index]
Dept of Commerce /
NOAA /
OAR /
PMEL /
TMAP
Contact Us | Privacy Policy | Disclaimer | Accessibility Statement