[Thread Prev][Thread Next][Index]

Re: [ferret_users] netcdf file with irregular axis

Hello Nuncio,

as Júnior wrote, solving the problem needs ASCII files (and a bit more info about your data might help). Suppose you have two separate ASCII files containing data (Ishow you my solution for a problem with Lambertian grid as I could not make ferret to read GRIB files so I needed to create ASCII from them first).

!You need to define an axis with lon-lat coordinates (which are in a file), BUT you should know their limits.
def axis/x=11.78:25.22/np=97 xx
def axis/y=44.63:50.20/np=61 yy
def grid/x=xx/y=yy latlon
!Read now the coordinate-file:
set data/ez/var="lon lat"/grid=latlon "ASCII_latlon"

!Add a time axis if there is any.
def axis/t=1:30:1/units=years time
def grid/t=time/x=lon[d=1]/y=lat[d=1] gridxyt
!Read in now the lambertian gridded file.
set data/ez/var="gustx"/grid=gridxyt "ASCII_gust6190_lambert"

!With scat2gridgauss_xy function you can have the irregularly spaced data on a lat-lon grid. Read more about that function in ferret documentation.
let xx1d = xsequence(lon[d=1])
let yy1d = xsequence(lat[d=1])

def axis/x=11.78:25.22:0.14 xax
def axis/y=44.63:50.20:0.092833 yax

let gust=scat2gridgauss_xy(xx1d,yy1d,gustx[d=2],x[gx=xax],y[gy=yax],0.14,0.092833,2,0)
!In case you were out of memory: "set memory/size=123".

!Save it to a file for further operations and functions:
repeat/l=1:30 (save/file="latlon_gust6190.nc"/llimits=1:30/l=`l`/append/clobber gust)

That is how I solved my problem similar to yours. Hope this helps. Regards,

Peter Szabo

On Fri, May 14, 2010 at 7:33 AM, nuncio murukesh <nuncio@xxxxxxxxx> wrote:
Hello users,
       I have a netcdf file of seaice in polar stereographic grid along
with the lat long coordinate files (two seperate nc files).  Is it
possible in FERRET to use the lat long coordinate files to convert the
polar stereographic coordinates of the seaice files to xy coordinates.
The latitude and Longitude values are irregularly spaced.
Polar Remote Sensing Division

[Thread Prev][Thread Next][Index]

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

Privacy Policy | Disclaimer | Accessibility Statement