[Thread Prev][Thread Next][Index]

Re: Contours on a Gaussian grid

On Sep 5,  1:22pm, beland@cerca.umontreal.ca wrote:
> Subject: Contours on a Gaussian grid
> Hello,
> I am trying to do a contour or shade plot of data that is on a Gaussian
> grid.  This grid has the latitude circles that are not exactly equally
> spaced.  How can I specify to ferret each latitude on the grid ?  I see
> two methods to accomplish this, although I do not know if ferret is made
> to do them:

Actually, as long as the data are located on a (pardon the term) semi-regular
grid, you can create a NetCDF file that contains your data with explicitly
declared latitudes. A reference for this is on Page 109 of the ferret manual,
or under the heading "Unevely spaced coordinates" in the online help.

I find that the easy way to do this is as follows:

1) "Fake" a regular grid, and read the data into ferret.
	yes? define axis/x=1:120:1 xfake
	yes? define axis/y=1:100:1 yfake
	yes? define grid/x=xfake/y=yfake gfake
	yes? file/var=myvar/grid=gfake mydata.dat
2) Save the data as a NetCDF file
	yes? save/file=mydata.cdf myvar
3) Dump the NetCDF file to an ASCII format file
	unix: ncdump mydata.cdf > mydata.cdl
4) Edit the NetCDF file to change the axis to unevely spaced coordinates
	Refer to the example in the FERRET manual (pages 109-117)
5) Recreate the NetCDF data file
	unix: ncgen -o mydata2.cdf mydata.cdl
6) Shade the data
	yes? use mydata2
	yes? shade myvar



	      Mark Verschell (verschell@coaps.fsu.edu)
	      Center for Ocean and Atmospheric Prediction Studies
	      Florida State University
              2035 E. Paul Dirac Drive
              R.M. Johnson Bldg. - Suite 200
	      Tallahassee, FL  32310
	      (904) 644-6532              (904) 644-4841 (fax)

[Thread Prev][Thread Next][Index]

Dept of Commerce / NOAA / OAR / ERL / PMEL / TMAP

Contact Us | Privacy Policy | Disclaimer | Accessibility Statement