[Thread Prev][Thread Next][Index]

Re: 1D to 3D



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




[Thread Prev][Thread Next][Index]

Dept of Commerce / NOAA / OAR / PMEL / TMAP

Contact Us | Privacy Policy | Disclaimer | Accessibility Statement