[Thread Prev][Thread Next][Index]

Re: [ferret_users] assigning coordinates to var



Hi Mark,
          For the given example file, it is very easy to assign XY dimesions
with single point as shown below, using RESHAPE function:

     ! create a variable with only time dimension
          define axis/t=1:612:1 tax
          let var = t[gt=tax]
          show grid var
     ! define X and Y axes with single point
          define axis/x=-17:-17:1/units=longitudes xlon
          define axis/y=45:45:1/units=latitudes  ylat
     ! create a dummy variable on the "destination grid"
          let xy_stamp = x[gx=xlon]*0 + y[gy=ylat]*0 + t[gt=var]*0
     ! now bring the variable to the destination grid
          let var_xy = RESHAPE(var,xy_stamp)
          show grid var_xy

Suppose individual files contains data for seperate lat-lon points, then it
is not this easy. In this case you have to save the data to the output file
either as a gridded data or like typical station data format. If you need any
help in this, please post all the relevant details about the input files and
the way in which you need the output file.

With Regards

Jaison


On Thu, 25 Aug 2005, Mark Carson wrote:

Hello,

I am trying to take 100s of files each containing a variable with only a
time dimension and build an XYT gridded file containing all of the data
in the files.  I have the mechanism worked out except for one small (or
maybe huge) problem:  I don't know how to assign a single XY coordinate
to the data in a single file so it will map onto the grid I've made in X
and Y.  In case that's too unclear, here's an example:  say I have a
variable called ANOM such that

name     title                        I         J           K         L
ANOM     SD4TEMPAVE - STAVE      ...       ...       ...       1:612


and I've made a grid with X and Y (and T) axes, and I want to regrid
ANOM into that grid specifically at X=17W and Y=45N.  Is there any way
to do that?

Thanks!

Mark


[Thread Prev][Thread Next][Index]

Dept of Commerce / NOAA / OAR / PMEL / TMAP

Contact Us | Privacy Policy | Disclaimer | Accessibility Statement