[Thread Prev][Thread Next][Index]

Re: [ferret_users] Regriding data from XY (KM) to geographic grid



Hi Ansley,
     Thanks for your reply.
Initially I started working with a GMT-netcdf data set and from the axis information,  the data has been regrided using the script as

define axis/x=0:5100/npoints=511/units=km XGR
define axis/y=0:6500/npoints=651/units=km YGR
define grid/x=XGR/y=YGR GGR
let topon = topo[g=GGR@asn]

The  dataset will be used in the model as topography. The model does need the topography in a lat-lon coordinate system.
Since there will be variation in longitude distance on different latitudes the @asn regriding may not be a good solution for this.
ie, the grid distance should be conserved during the regriding.
 
The x=0 corresponds to lon=70W and y=0 is at lat=10N.
  
Best Regards
Bijoy




On Thu, Mar 27, 2008 at 5:39 PM, Ansley Manke <Ansley.B.Manke@xxxxxxxx> wrote:
Hi Bijoy,
You'll need to define your own longitude/latitude axis that is equivalent to the grid in Km. This isn't something that's done automatically by Ferret. There really isn't enough information in your dataset to do it.  What longitude and latitude correspond to x=0 and y=0 on this input grid?  And the conversion from Km to degrees depends of course on what latitude you're working at.

Define an axis in each direction with the same number of points as the input axis, and with the first and last longitudes corresponding to the endpoints of X, and likewise for the latitude axis and Y. Then the regridding command in Ferret would be

  yes? let   newvar = topo[gx=xlon@ASN, gy=ylat@ASN]

In fact, looking at the netCDF header you show, this is the kind of operation that created this variable:

                TOPON:long_name = "TOPO[G=GGR@ASN]" ;

Ansley

Bijoy Thompson wrote:
Hi List,
           I have a data file with uniform XY axis In Kilometers.  What I need is to regrid and save this data into an XY geographical grid in degrees.
The lat-lon space to which the regriding to be done is not an issue.  Any help is greatly appreciated

A plot of the data is attached.

Best Regards
Bijoy



dimensions:
        XGR = 511 ;
        YGR = 651 ;
variables:
        double XGR(XGR) ;
                XGR:units = "KM" ;
                XGR:point_spacing = "even" ;
                XGR:axis = "X" ;
        double YGR(YGR) ;
                YGR:units = "KM" ;
                YGR:point_spacing = "even" ;
                YGR:axis = "Y" ;
        float TOPON(YGR, XGR) ;
                TOPON:missing_value = -1.e+34f ;
                TOPON:_FillValue = -1.e+34f ;
                TOPON:long_name = "TOPO[G=GGR@ASN]" ;
                TOPON:history = "From topo3" ;

// global attributes:
                :history = "FERRET V6.08   17-Mar-08" ;
                :Conventions = "CF-1.0" ;







[Thread Prev][Thread Next][Index]

Contact Us
Dept of Commerce / NOAA / OAR / PMEL / TMAP

Privacy Policy | Disclaimer | Accessibility Statement