On Mon, Feb 25, 2008 at 7:57 PM, Peter Szabo <
szabpet83@xxxxxxxxx> wrote:
Hello Ferret Users,
I have ascii files containing lines like this one (date, temp1, temp2, temp3, precip):
1961-01-01 1.0 2.3 0.0 1.0
These different files correspond to different cities (different lat-lon coordinates). I would like to make a netcdf file containg an interpolated grid to this database.
A. I tried with this:
1. making a netcdf file for every city with these commands:
define axis/x=19.1:19.1/npoints=1 lon
define axis/y=47.3:47.3/npoints=1 lat
define axis/t=1:14610:1/npoints=14610/units=days time
define grid/x=lon/y=lat/t=time grid
file/ez/VARIABLES="datum1,datum2,t8,tx,tn,r"/grid=grid "/home/szabop/moall/budapest.txt"
save/file="/home/szabop/moall/bu.nc" t8,tx,tn,r
and so on...
2. after this worked i tried to call all the files i made and interpolate them onto a region, but did not succeed:
use "/home/szabop/moall/bu.nc"
...
define axis/x=16.0:23.0:0.1 newx !this is the region i want to interpolate the "scattered" data
define axis/y=45.7:48.6:0.1 newy
let t8grid=SCAT2GRIDGAUSS_XY(x,y,t8,x[gx=newx],y[gy=newy],2,2,2,2)
save/file ...
B. I also tried with not writing out the ascii files to different netcdf files, but trying to save them with the correct coordinates to one big netcdf then i would be able to use the scat2gridgauss_xy function! This worked neither.
define axis/x=19.1:19.1/npoints=1 lon
define axis/y=47.3:47.3/npoints=1 lat
define axis/t=1:14610:1/npoints=14610/units=days time
define grid/x=lon/y=lat/t=time grid
file/ez/VARIABLES="datum1,datum2,t8,tx,tn,r"/grid=grid "/home/szabop/moall/budapest.txt"
save/file="/home/szabop/moall/6100.nc"/append/clobber/ILIMITS=16.0:23.0/JLIMITS=45.7:48.6 t8
cancel data/all
define axis/x=21.4:21.4/npoints=1 lon
and so on...
Anyone could help me?
Peter Szabo, HMS