[Thread Prev][Thread Next][Index]

Re: about time dimension



Hi X. Zhu,
	There are a number of ways to do this.  Here is one that relies
on the fact that really the data in both files both refer to the same
period - say the range 701:800 is correct.
Here is a demo

def axis/t=1:100:1 ta ; def grid/t=ta ga
def axis/t=701:800:1 tb ; def grid/t=tb gb
let va=101-t[g=ga] ; let vb=t[g=gb]-700

! if you do
	plot va,vb
! you see the two variables in the time ranges they are defined for
! so what you need to do is to regrid (or ASSIGN) the variable VA onto
! the time axis of VB. This could be done using
!	let newva = va[g=gb,gt=@asn]
! or simply
	plot va[g=gb,gt=@asn],vb
! when both variables appear in the plotted time range 701:800.

If the VA variable did not have the same number of points as the VB
series you could regrid to a new axis

! suppose VA has 150 points
def axis/t=1:150:1 ta ; def grid/t=ta ga ; let va=101-t[g=ga]
! and t=1 for VA corresponds to t=751 for VB.  Then define a
! new 150 point axis
def axis/t=751:900:1 tnew ; def grid/t=tnew gnew
let newva = va[g=gnew,gt=@asn]
plot newva,vb

Another trick to use is to use PLOT/OVER with a shift along the
xaxis to force the second variable to appear on the same axis as
the first which was previously plotted.  This can be tricky at
times when its a calendar time axis where the "time" values are
not always easily understandable.

Hope one of these ideas works for you.
Good luck,
Mick

|____Mick.Spillane@noaa.gov____|
|__Room 2070 Bldg#3 NOAA/PMEL__|
|____Phone_:_(206)526-6780_____|




[Thread Prev][Thread Next][Index]

Dept of Commerce / NOAA / OAR / PMEL / TMAP

Contact Us | Privacy Policy | Disclaimer | Accessibility Statement