hi - You need to define variables that contain the longitudes and latitudes and then make the gridded data into single list, being careful to choose the subset that you want. First, let's see how to list a 2D variable as a 1-D list. I'll use coads_climatology dataset that comes with Ferret, using the variable sst, and a smaller region. If you wanted this data: yes? use coads_climatologyThe XSEQUENCE function unwraps a multi-dimensional variable onto a list on an abstract X axis. It's listed with the southernmost data coming first in the list. (Look at the documentation about GRID-CHANGING functions to see why I put the region in square brackets). yes? list xsequence(sst[L=1,x=31e:35e,y=-30:-20])So that gives you the variable. To define a variable containing the longitudes from the grid of SST, yes? let xx = x[gx=sst]but this is just a 1D list. You want a variable with the longitude at each point of the XY grid of sst. It will be the same at each Y value. yes? let xylon = x[gx=sst] + 0*y[gy=sst]And likewise for the latitudes, yes? let xylat = 0*x[gx=sst] + y[gy=sst]Putting all of this together, and using the /NOROW qualifier to list only the variables, yes? list/norow xsequence(xylon[x=31e:35e,y=-30:-20]), xsequence(xylat[x=31e:35e,y=-30:-20]), xsequence(sst[L=1,x=31e:35e,y=-30:-20])To make a nice listing you could define the variables for listing like this let/units="Deg C"/title="SST" sst_out = XSEQUENCE(XYLON[X=31E:35E,Y=-30:-20])and then list these variables, so that the "column 1" and so forth would contain the units and title of the variables. On 6/27/2011 11:04 AM, Srinivas Chamarthi wrote:
|