Hi Akshay, Please send questions of this sort to the ferret_users email list (cc'ed here). I'll get you started here, but you'll have to read and experiment to finish the job. Two things make your file challenging to work with
The real work is in giving meaning to the variables. Using the Ferret internal function SCAT2GRIDLAPLACE_ZT you can place the data onto a grid. The Ferret script needed will resemble this, but needs much more:yes? columns/skip=1/delim="\t,\b,-"/type="numeric,numeric,numeric,numeric,numeric,text,numeric,time,text,latitude,longitude,text,numeric,numeric,numeric" akshay_nc_data.txtyes? list/nohead v1,v2,v3,v4,v5,v6,v7,v8,v9,v10,v11,v12,v13,v14,v15V1 V2 V3 V4 V5 V6 V7 V8 V9 V10 V11 V12 V13 V14 V151 / 1: 748.0 1.00 43.00 1.00 5.000 "Aug" 1988. 7.167 "AM" 9.98 68.03 "o" 1.00 28.25 36.422 / 2: 748.0 1.00 43.00 1.00 5.000 "Aug" 1988. 7.167 "AM" 9.98 68.03 "o" 5.00 28.26 36.423 / 3: 748.0 1.00 43.00 1.00 5.000 "Aug" 1988. 7.167 "AM" 9.98 68.03 "o" 10.00 28.23 36.434 / 4: 748.0 1.00 43.00 1.00 5.000 "Aug" 1988. 7.167 "AM" 9.98 68.03 "o" 15.00 28.22 36.435 / 5: 748.0 1.00 43.00 1.00 5.000 "Aug" 1988. 7.167 "AM" 9.98 68.03 "o" 20.00 28.20 36.426 / 6: 748.0 1.00 43.00 1.00 5.000 "Aug" 1988. 7.167 "AM" 9.98 68.03 "o" 25.00 28.19 36.437 / 7: 748.0 1.00 43.00 1.00 5.000 "Aug" 1988. 7.167 "AM" 9.98 68.03 "o" 30.00 28.18 36.438 / 8: 748.0 2.00 43.00 2.00 6.000 "Aug" 1988. 7.167 "AM" 10.98 69.03 "o" 1.00 28.25 36.429 / 9: 748.0 3.00 43.00 3.00 6.000 "Aug" 1988. 7.167 "AM" 10.98 69.03 "o" 5.00 28.26 36.4210 / 10: 748.0 4.00 43.00 4.00 6.000 "Aug" 1988. 7.167 "AM" 10.98 69.03 "o" 10.00 28.23 36.4311 / 11: 748.0 5.00 43.00 5.00 6.000 "Aug" 1988. 7.167 "AM" 10.98 69.03 "o" 15.00 28.22 36.4312 / 12: 748.0 6.00 43.00 6.00 6.000 "Aug" 1988. 7.167 "AM" 10.98 69.03 "o" 20.00 28.20 36.4213 / 13: 748.0 7.00 43.00 7.00 6.000 "Aug" 1988. 7.167 "AM" 10.98 69.03 "o" 25.00 28.19 36.4314 / 14: 748.0 8.00 43.00 8.00 6.000 "Aug" 1988. 7.167 "AM" 10.98 69.03 "o" 30.00 28.18 36.4315 / 15: 748.0 9.00 43.00 9.00 6.000 "Aug" 1988. 7.167 "AM" 10.98 69.03 "o" 35.00 28.25 36.4216 / 16: 748.0 10.00 43.00 10.00 6.000 "Aug" 1988. 7.167 "AM" 10.98 69.03 "o" 40.00 28.26 36.4217 / 17: 748.0 11.00 43.00 11.00 6.000 "Aug" 1988. 7.167 "AM" 10.98 69.03 "o" 45.00 28.23 36.4318 / 18: 748.0 12.00 43.00 12.00 6.000 "Aug" 1988. 7.167 "AM" 10.98 69.03 "o" 50.00 28.22 36.4319 / 19: .... .... .... .... .... " " .... .... " " .... .... " " .... .... .... - Stevecolumns/skip=1/delim="\t,\b,-"/type="numeric,numeric,numeric,numeric,numeric,text,numeric,time,text,latitude,longitude,text,numeric,numeric,numeric" akshay_nc_data.txt ! assemble the date/time back together let month = if v6 eq "Aug" then 8 let year = v7 let day = v5 let time = if v9 eq "AM" then v8 else v8+12 let time1900 = DAYS1900(year,month,day) + time/24 define axis/z/units=meters zax = {1,5,10,15,20,25,30,35,40,45,50} define axis/t="5-aug-1988 07:10:00":"10-aug-1988 07:10:00":1/unit=days/t0=1-jan-1900 tax ! is this right? ! other variables treated like this, too set var/name=temperature/units="degrees C" v14 set var/name=depth/units=meters V13 ! then put it onto a grid let gridded_temp = SCAT2GRIDLAPLACE_ZT(depth,time1900,temperature,Z[gz=zax],T[gt=tax],0,2) set variable/title="gridded temperature"/units="degrees C" gridded_temp ! save it to netCDF SAVE/file=my_netcdf.nc gridded_temp On 11/6/2012 12:56 AM, Akshay Hegde
wrote:
Dear Sir, |