[Thread Prev][Thread Next][Index]

Re: why does not it work even after I reshape the varialbes



Hi Du,

Pardon me if in my quick read of your message I am misunderstanding ....

It looks as if your script is getting needlessly complex.  You'll note that
the expression you are using
    let var1=UNEW[d=1,k=5,T=@var]
does not specify the range along its T axis.  This means that the expression
still depends upon an awareness of the underlying time axis -- it is through
that time axis that Ferret knows how date ranges translate into time index
ranges.  As a result of this dependence on underlying axes expressions like
    var1 + var2
should be flagged as having ambiguour time coordinates.

If you specify your coordinates completely and unambiguously, then the
problems on the time axis should disappear -- as in
    let var1=UNEW[d=1,k=5,T=1-jan-1980:31-dec-1990@var]

If var1 and var2 have different longitude axes (X) as well, then an expiation
like "var1+var2" used in
     FILL/X=47.5E:177.5E/Y=22.50S:22.50N var1+var2
will also complain of having ambiguous coordinates on the X axis. You must
resolve the ambiguity by telling Ferret *which* X axis you would like it to be
using to perform the addition and the plotting.  The simplest solution is to
use an expression like  "var1 + var2[gx=var1]".  This tells Ferret to regrid
var2 along its X axis to match the X axis of var1 before performing the
addition.

See the Ferret Users' Guide sections on regridding for further explanation.

    - steve





du hui wrote:

> I have reshaped the variables I am ploting, but it still does not work
> the error message is following when i ran it
>
> yes? go test.jnl 200
> USE mm5_lon180.ctrl.nc
> USE indwp_control.nc
> use daily_reanal
> !use rean_daily_tropics_90.nc
> let n1=792
> let n2=731
> let n=730
> let var1=UNEW[d=1,x=47.5E:177.5E,y=22.5N:22.5S,z=$1,T=@var]
>  !-> DEFINE VARIABLE
> var1=UNEW[d=1,x=47.5E:177.5E,y=22.5N:22.5S,z=200,T=@var]
> let var2=U[d=2,x=47.5E:177.5E,y=22.5N:22.5S,z=$1,T=@var]
>  !-> DEFINE VARIABLE var2=U[d=2,x=47.5E:177.5E,y=22.5N:22.5S,z=200,T=@var]
> let var0=u[d=3,x=47.5E:177.5E,y=22.5N:22.5S,z=$1,T=@var]
>  !-> DEFINE VARIABLE var0=u[d=3,x=47.5E:177.5E,y=22.5N:22.5S,z=200,T=@var]
> define axis/t=1:1:1 time1
> Replacing definition of axis TIME1
>  *** NOTE: grid  used by data set daily_reanal
>  *** NOTE: Redefinition may alter apparent contents of data set
> let var1_0=reshape(var1,t[gt=time1])
>
> let var2_0=reshape(var2,t[gt=time1])
> let var0_0=reshape(var0,t[gt=time1])
>
> let t1=UNEW[d=1,x=47.5E:177.5E,y=22.5N:22.5S,z=$1,l=1:'n1'@ave]
>  !-> DEFINE VARIABLE
> t1=UNEW[d=1,x=47.5E:177.5E,y=22.5N:22.5S,z=200,l=1:'n1'@ave]
> let t2=U[d=2,x=47.5E:177.5E,y=22.5N:22.5S,z=$1,l=1:'n2'@ave]
>  !-> DEFINE VARIABLE
> t2=U[d=2,x=47.5E:177.5E,y=22.5N:22.5S,z=200,l=1:'n2'@ave]
> let to=u[d=3,x=47.5E:177.5E,y=22.5N:22.5S,z=$1,l=1:'n'@ave]
>  !-> DEFINE VARIABLE
> to=u[d=3,x=47.5E:177.5E,y=22.5N:22.5S,z=200,l=1:'n'@ave]
> let se1=(var1/n1+var0/n)^0.5
> let tt1=(t1-to)/se1
> let se2=(var2/n2+var0/n)^0.5
> let tt2=(t2-to)/se2
>
> FILL/X=47.5E:177.5E/Y=22.50S:22.50N var1/n1+var0/n
>  *** NOTE: Ambiguous coordinates on T axis: VAR1/N1+VAR0/N
>  **ERROR: illegal limits: VAR0 is not in the range T=783444:802452
>           Axis extremes are T=0.5:1.5
> CONTOUR/FILL/X=47.5E:177.5E/Y=22.50S:22.50N var1/n1+var0/n
> Command file, command group, or REPEAT execution aborted
>
> _________________________________________________________________
> 享用世界上最大的电子邮件系统— MSN Hotmail。  http://www.hotmail.com

--

Steve Hankin, NOAA/PMEL -- Steven.C.Hankin@noaa.gov
7600 Sand Point Way NE, Seattle, WA 98115-0070
ph. (206) 526-6080, FAX (206) 526-6744




[Thread Prev][Thread Next][Index]

Dept of Commerce / NOAA / OAR / PMEL / TMAP

Contact Us | Privacy Policy | Disclaimer | Accessibility Statement