[Thread Prev][Thread Next][Index]

Re: 1D to 3D



Hi -
I think the difference is in how we define the variable zero.
I may have left out a step when I sent the example yesterday.

DEFINE AXIS/t=1:73:1 tax
LET tt1d = sin(t[gt=tax]/5)
DEFINE AXIS/X=40e:200e:2.5 ax_x
DEFINE AXIS/Y=40s:40n:2.5 ax_y
DEFINE GRID/like=tt1d/x=ax_x/y=ax_y grd

LET zero = 0*x[gx=grd]+0*y[gy=grd]+0*T[g=grd]

LET tt3d = zero + tt1d

Now, tt3d should be 3-dimensional.

R Prabowo wrote:

> Hi Ansley,
> Thank you for your clues. I wander I could not do what you did in fact I just followed what you wrote. I got the "similar" result but still as 1-dimensional data series. I did 'show grid tt1d, zero and tt3d' as bellows, they show tt1d is 1-dimentional, tt3d and zero are 3-dimentional data. But when I list tt3d, the data is still one single column data. I wander is that caused by ferret I am using (v5.51 on sgi irix 6.5) or other things? Thank you very much.
>
> Mulyono
> ***********
> DEFINE AXIS/t=1:73:1 tax
> LET tt1d = sin(t[gt=tax]/5)
> DEFINE AXIS/X=40e:200e:2.5 ax_x
> DEFINE AXIS/Y=40s:40n:2.5 ax_y
> DEFINE GRID/like=tt1d/x=ax_x/y=ax_y grd   ! (I have to give name or else will give "**ERROR: invalid command: DEFINE what name?" and aborted)
> LET zero = 0*T[g=grd@asn]    ! (putting @asn or not gave same result)
> LET tt3d = zero + tt1d
> STAT tt3d
>
>              ZERO + TT1D
>              LONGITUDE:  N/A  ! yours, 38.8E to 158.8W
>              LATITUDE:  N/A   ! yours, 41.2S to 41.2N
>              Z:  N/A
>              T: 0.5 to 73.5
>              DATA SET: N/A
>
>  Total # of data points: 73 (1*1*1*73)  ! yours, 156585 (65*33*1*73)
>  # flagged as bad  data: 0
>  Minimum value: -0.99999
>  Maximum value: 0.99957
>  Mean    value: 0.10487 (unweighted average)
>  Standard deviation: 0.71766
> show grid tt1d
>     GRID (G001)
>  name       axis              # pts   start                end
>  normal    X
>  normal    Y
>  normal    Z
>  TAX       T                   73 r   1                    73
> show grid tt3d
>     GRID GRD
>  name       axis              # pts   start                end
>  AX_X      LONGITUDE           65mr   40E                  160W
>  AX_Y      LATITUDE            33 r   40S                  40N
>  normal    Z
>  TAX       T                   73 r   1                    73
> show grid zero
>     GRID GRD
>  name       axis              # pts   start                end
>  AX_X      LONGITUDE           65mr   40E                  160W
>  AX_Y      LATITUDE            33 r   40S                  40N
>  normal    Z
>  TAX       T                   73 r   1                    73
>
> yes?
>
> Ansley Manke <Ansley.B.Manke@noaa.gov> wrote:
> > Hi -
> > You almost have it.  The concept is "conformability" which lets us
> > combine a variable which is 1-dimensional along a particular axis
> > with another variable with more coordinates along that axis.  Define
> > a 3-D "zero" variable and add it to your input variable. I would also
> > suggest using the T axis from the file variable when you create the
> > grid.  Here I make up some data, 1-D in time, and put it on an xyt
> > grid
> >
> > yes? DEFINE AXIS/t=1:73:1 tax
> > yes? LET tt1d = sin(t[gt=tax]/5)
> >
> > yes? DEFINE AXIS/X=40e:200e:2.5 ax_x
> > yes? DEFINE AXIS/Y=40s:40n:2.5 ax_y
> > yes? DEFINE GRID/like=tt1d/x=ax_x/y=ax_y
> >
> > yes? LET tt3d = zero + tt1d
> > yes? STAT tt3d
> >
> >     TT1D + ZERO
> >     LONGITUDE: 38.8E to 158.8W
> >     LATITUDE: 41.2S to 41.2N
> >     Z:  N/A
> >     T: 0.5 to 73.5
> >     DATA SET: N/A
> >
> > Total # of data points: 156585 (65*33*1*73)
> > # flagged as bad data: 0
> > Minimum value: -0.99999
> > Maximum value: 0.99957
> > Mean   value: 0.10487 (unweighted average)
> > Standard deviation: 0.71276
> >
> > yes? shade/i=10 tt3d
> > yes? plot/x=100E/y=20S tt3d
> >
> >
> > R Prabowo wrote:
> >
> > > Hi ferreters,
> > >
> > > I wander is there any one has experience of transforming 1D data series into 3D data series. I have 1D data series of x=1,y=1,L=1:73 I want to make it into 3D data series of x'=40e:200e,y'=40s:40n,L'=1:73 with the created data series will be: values at L' will be the same as at L in every x',y1.
> > > I used script bellows, but the final file only contents data at x'=40e,y'=40s,L'=1:73. At others points of x' and y' the values at L'=1:73 are blank (....).
> > > Any one can help me? Thank you very much
> > >
> > > use/regulart DJF_N3_SOI.nc
> > > DEFINE AXIS/X=40e:200e:2.5 ax_x
> > > DEFINE AXIS/Y=40s:40n:2.5 ax_y
> > > DEFINE AXIS/T=1:73:1 ax_t
> > > DEFINE GRID/X=ax_x/Y=ax_y/T=ax_t grd
> > > let zero = 0*T[g=grd]
> > > let DJFN3r = zero+DJFN3[g=grd@asn]
> > > let DJFSOIr = zero+DJFSOI[g=grd@asn]
> > > save/clobber/file=DJF_N3_SOI_reg.nc DJFN3r,DJFSOIr
> > > --
> > > Mulyono R. Prabowo
> > > School of Geography and Environmental Science
> > > Monash University,
> > > PO box 11A, Clayton, Victoria
> > > AUSTRALIA, 3800
> > > Telp  : +61 3 9905 9992
> > > Fax   : +61 3 9905 2948
> > > e-mail: rmpra2@student.monash.edu.au
> >
> --
> Mulyono R. Prabowo
> School of Geography and Environmental Science
> Monash University,
> PO box 11A, Clayton, Victoria
> AUSTRALIA, 3800
> Telp  : +61 3 9905 9992
> Fax   : +61 3 9905 2948
> e-mail: rmpra2@student.monash.edu.au




[Thread Prev][Thread Next][Index]

Dept of Commerce / NOAA / OAR / PMEL / TMAP

Contact Us | Privacy Policy | Disclaimer | Accessibility Statement