[Thread Prev][Thread Next][Index]

Re: [ferret_users] Ascii and scatteredgridgauss



Hi Francoise,
                There were two errors in your script:
 
1. In the ascii file 3 variables are listed in three columns. So you have 
    to read the data ALONG the COLUMNS. The /COLUMNS attribute is used only
    when you want to read the data ALONG ROWS (typically with gridded data). 
    Please see the Ferret user manual "Ch2 Sec5.1.  Reading ASCII files" 
    for more details. With this dataset, NEVER use /COLUMNS attribute. 

2. Since your data is arranged in a lat-lon pair format (or as station data)
    you cannot use a XY grid (grilles) to read the ascci data. You have to
    check the number of rows (here 61935) and define a 1-D grid (preferably
    using X-axis) with those many points (see example below). 

  Don't forget to add proper /UNITS to DEFINE AXIS commands. Also add the
corresponding letter as prefix to all axis names (like "xlon", "ylat",
"zdepth). 

Check your ascii data carefully.....the distribution of lat/lon points and
data over eastern part of the domain seems to be wrong.

See the example below (i changed the ascii filename from test to meteo.asc). 
Please let me know if you have any questions.

Best Regards,

Jaison

!------------------Example starts here----------------
\ cancel mode verify

   define axis/x=1:61935:1  xfile
   define grid/x=xfile gfile
   FILE/grid=gfile/var="lon,lat,sst" meteo.asc

   ! check whether the data has been loaded properly

   plot/vs/nolab lon, lat  ! is there data points over land???
   go land 8

   pause 
   ! define destination grid 

   let dx     = 0.2
   let dy     = 0.2
   let xscale = dx/2   
   let yscale = dy/2 
   let cutoff = 1

   DEFINE AXIS/x=-24:49:`dx`/units=longitudes xlon
   DEFINE AXIS/y=31:60:`dy`/units=latitudes   ylat
   LET gsst = SCAT2GRIDGAUSS_XY (lon, lat, sst,
[gx=xlon],y[gy=ylat],XSCALE,YSCALE,CUTOFF,CUTOFF)
   shade gsst
!------------------Example ends here

On Wed, 12 Dec 2007 14:32:04 +0000, orain wrote
> hello,
> I'm a beginner in Ferret for ASCII files
> 
> I've a file ASCII lon lat sst , but lon lat are not on regular grid 
> ( Lambert projection from model ) I want to have a lon lat sst 
> regular on a picture , so I thought using scat2gridgauss_xy but I've 
> got some trouble.
> 
> I am not sure I well understood the way of using scat2gridgauss, and 
> perhaps it is'nt the answer to my problem .
> Could you help me ?
> 
> 1) Here it is my .jnl
> 
> DEFINE AXIS/x=-24:49:0.5 lons
> yes? DEFINE AXIS/y=31:60:0.5 lats
> yes? DEFINE GRID/X=lons/Y=lats grilles
> yes? SET DATA/EZ/VARIABLES="lon,lat,sst"/COLUMNS=3/GRID=grilles test
> yes? LET gsst = scat2gridgauss_xy (lon, lat, sst , x[gx=lons], 
> y[gy=lats], 1.,1.,2.,0)
> yes? shade gsst
> 
> 2)
>  my file is test  the joined piece
> 
> sorry for this simple question but we often have to compare netcdf 
> data 
> (easy for Ferret)  ocean file to meteo data  ASCII : lon lat not 
> regular 
> (not easy for ferret ) or GRIB (not simple at all) for me ?
> 
> Thanks for your help
> Françoise Orain
> 
> -- 
> This message has been scanned for viruses and
> dangerous content by MailScanner, and is
> believed to be clean.


-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.



[Thread Prev][Thread Next][Index]

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

Privacy Policy | Disclaimer | Accessibility Statement