[Thread Prev][Thread Next][Index]

Re: griding of ASCII data file for the meridional mean



Hi Yogesh,
The commads you have used will read in the data as if
they are already organized on the same grid as the
grid "newgrid" that you define, and with longitude
varying fastest, then latitude and then time. Are the
data on a grid?  It sounds as if your data are in
columns

time   xlon   ylat   ht   c02

If the data are not organized on a grid
1:360,1:180,1:13792, then you need to read the
variables all in as simple lists of values, and then
use Ferret commands to put them on a grid. 

set data/ez/var="time,lat,lon,ht,co2" data.txt

This will result in your data being in five
1-dimensional lists, one for each variable time, lat,
lon, and so on.  To put the data on a grid in X and Y,
you can define longitude and latitude axes and use a
scat2grid function to put the HT and CO2 data on that
grid. (If all the data are at different times, then
what this does is make the data as if it were all at
the same time. I don't think there are any 3-D
gridding tools in Ferret)

define axis/x=1:360:1/units=degrees/modulo xlon
define axis/y=-90:90:1/units=degrees ylat

let ht_gridded = scat2gridlaplace_xy (lon, lat, ht,
x[gx=xlon], y[gy=ylon], 2, 5)
shade ht_gridded

! You may need to changethe last two parameters, 
! depending on the spacing of your data relative
! to the spacing of the output grid.

let co2_gridded = scat2gridlaplace_xy (lon, lat, co2,
x[gx=xlon], y[gy=ylon], 2, 5)
shade co2_gridded



--- "Yogesh K. Tiwari" <ktiwari@bgc-jena.mpg.de>
wrote:

> Hello,
> 
> I am using ferret v5.80 on Suse Linux.
> 
> I have airplane CO2 obsercations  in ASCII format.
> 
> The whole data spans between latitude -40 to +40.
> 
> I want to take the 5 degree latitudional mean of 
> whole data.
> 
> I tried to write a small script and I defined the 
> axis as following :-
> 
> define axis/x=1:360:1 xlon
> 
> define axis/y=1:180:1 ylat
> 
> define axis/t=1:13792:1 time
> 
> define grid/x=xlon/y=ylat/t=time newgrid
> 
> file/var="time,lat,lon,ht,co2"/grid=newgrid\
> data.txt
> 
> Ferret complains while using the command for the 
> plot :-
> 
> **ERROR: stack overflow
> *** NOTE: Check for recursion in variable
> definitions
> 
> 
> The airplane observations are of many months and 
> the latitude is not in monotonic increasing order
> i.e. observations are irragular.
> 
> Kindly suggest me how I can define the axis so I 
> can grid the data to take the 5 degree meridional 
> mean.
> 
> Or simply, how one can grid , defile axises of any 
> ASCII data format which has irragular observations.
> 
> This will really help to take the means of either 
> zonal or meridional if the data amount is really
> much.
> 
> Many thanks for your help.
> 
> Regards,
> Yogesh
> 
> -- 
> 
> ===========================================
> Yogesh Tiwari,
> Max-Planck Institute for Biogeochemistry,
> Hans-Knoell Strasse 10,
> D-07745 Jena,
> Germany
> 
> Office   : 0049 3641 576 376
> Home     : 0049 3641 223 163
> Fax      : 0049 3641 577 300
> Cell     : 0049 1520 4591 008
> e-mail   : yogesh.tiwari@bgc-jena.mpg.de
> ===========================================
> 
> 
> 


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

[Thread Prev][Thread Next][Index]

Dept of Commerce / NOAA / OAR / PMEL / TMAP

Contact Us | Privacy Policy | Disclaimer | Accessibility Statement