viewing Gridded or Polar data?

Can anyone recommend a visualization package that would display arrays of numbers by mapping values to a set of colors? That is, we define 32 colors, where the first color represents values 0-10, the second color represents 10-20, etc, and then each input value gets displayed as its corresponding color. I'd like to read netCDF files, if possible. Thanks much! -- Joe VanAndel National Center for Atmospheric Research http://www.atd.ucar.edu/~vanandel/ Internet: vanandel@ucar.edu

Animabob does that but I don't think it specificially handles NetCDF files. You can define your own color mapping file with Animabob. OpenDX has that capasbility. I've tried OpenDX, but all versions FreeBSD, and Cygwin that I tried dumped core upon trying to plot. Perhaps they've fixed that- it was fixed in CVS but not in the dist files. Rob. Joe Van Andel wrote:
-- The Numeric Python EM Project www.pythonemproject.com

I have never tried exactly this type of plot, but I guess that a combination of GrADS commands like the following ones in a script: grads -l << EOF sdfopen yourfile.nc (for COARDS-compliant netCDF files) set gxout grfill (to get a colour-filled grid) set clevs 10 20 30 40 50 (and so on to define your intervals...) d variable_name (of the netCDF file) enable print your_plot_name.gm print disable print quit EOF gxeps -c your_plot_name should do the work and prepare an EPS file. GrADS handles netCDF files, in case they conform to the COARDS standard. Otherwise, you can define the data in the file and use the xdfopen command, but this is more complex than above. http://grads.iges.org is their homepage. Hope this helps. Jon Saenz. | Tfno: +34 946012445 Depto. Fisica Aplicada II | Fax: +34 944648500 Facultad de Ciencias. \\ Universidad del Pais Vasco \\ Apdo. 644 \\ 48080 - Bilbao \\ SPAIN On Thu, 17 Jan 2002, Joe Van Andel wrote:

Hi Joe, There are C and Python wrappers around the very nice PGPLOT library that do exactly what you want (and a whole lot more). You can find them here: ftp://cfa-ftp.harvard.edu/pub/ransom The files you need are: ppgplot-0.11.tar.gz (the C wrappers) Pgplot.py (the Python wrappers around the C wrappers) Lots of additional information about the capabilities of PGPLOT can be found at its web page: http://www.astro.caltech.edu/~tjp/pgplot/ With my current setup, you can do a lot of plotting (except 3D stuff) in a manner that is very much like IDL (a single function call with lots of optional keyword arguments). I haven't modified it in quite awhile, but still use it in my own work almost every day. As for reading netCDF, I would recommend Konrad Hinsen's Scientific Python: http://starship.python.net/crew/hinsen/scientific.html Good luck, Scott On Thu, Jan 17, 2002 at 07:46:52AM -0700, Joe Van Andel wrote:
-- -- Scott M. Ransom Address: McGill Univ. Physics Dept. Phone: (514) 398-6492 3600 University St., Rm 338 email: ransom@physics.mcgill.ca Montreal, QC Canada H3A 2T8 GPG Fingerprint: 06A9 9553 78BE 16DB 407B FFCA 9BFA B6FF FFD3 2989

You might want to have a look at Gri (http://gri.sourceforge.net/). Gri can read netCDF files. Here's the little blurb from their site: "Gri is a language for scientific graphics programming. The word "language" is important: Gri is command-driven, not point/click. Some users consider Gri similar to LaTeX, since both provide extensive power as a reward for tolerating a learning curve. Gri can make x-y graphs, contour graphs, and image graphs. The output is in PostScript..." Since gri is command-driven, it's easy to call it from within python. Gri won't display the data for you - it will only generate the PostScript file, which you can then display with any number of tools. Eric On Thu, Jan 17, 2002 at 07:46:52AM -0700, Joe Van Andel wrote:

We will answer you again shortly and include an example of how to do this in cdat (cdat.sf.net). You can do it using our GUI or from the Python command line. cdat includes a colormap editor for getting things just the way you want, and a variety of graphics methods including box fill, isofill, isoline, etc. It can open a wide variety of data files including netcdf. Our name, Climate Data Analysis Tools, is a bit misleading. There are special facilities for climate modelers, and a variety of statistics and other algorithms that they need, but the package is a general-purpose one. -----Original Message----- From: numpy-discussion-admin@lists.sourceforge.net [mailto:numpy-discussion-admin@lists.sourceforge.net] On Behalf Of Joe Van Andel Sent: Thursday, January 17, 2002 6:47 AM To: numpy-discussion Subject: [Numpy-discussion] viewing Gridded or Polar data? Can anyone recommend a visualization package that would display arrays of numbers by mapping values to a set of colors? That is, we define 32 colors, where the first color represents values 0-10, the second color represents 10-20, etc, and then each input value gets displayed as its corresponding color. I'd like to read netCDF files, if possible. Thanks much! -- Joe VanAndel National Center for Atmospheric Research http://www.atd.ucar.edu/~vanandel/ Internet: vanandel@ucar.edu _______________________________________________ Numpy-discussion mailing list Numpy-discussion@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/numpy-discussion

You can take a look at SciGraphica at http://scigraphica.sourceforge.net. Although it is mainly GUI based, it has a python interface under development. You can ask in the scigraphica mailing list for a plugin for reading netcdf files, I remember someone posting it. Saludos, <ADRIAN> On Thu, 17 Jan 2002, Joe Van Andel wrote:

Animabob does that but I don't think it specificially handles NetCDF files. You can define your own color mapping file with Animabob. OpenDX has that capasbility. I've tried OpenDX, but all versions FreeBSD, and Cygwin that I tried dumped core upon trying to plot. Perhaps they've fixed that- it was fixed in CVS but not in the dist files. Rob. Joe Van Andel wrote:
-- The Numeric Python EM Project www.pythonemproject.com

I have never tried exactly this type of plot, but I guess that a combination of GrADS commands like the following ones in a script: grads -l << EOF sdfopen yourfile.nc (for COARDS-compliant netCDF files) set gxout grfill (to get a colour-filled grid) set clevs 10 20 30 40 50 (and so on to define your intervals...) d variable_name (of the netCDF file) enable print your_plot_name.gm print disable print quit EOF gxeps -c your_plot_name should do the work and prepare an EPS file. GrADS handles netCDF files, in case they conform to the COARDS standard. Otherwise, you can define the data in the file and use the xdfopen command, but this is more complex than above. http://grads.iges.org is their homepage. Hope this helps. Jon Saenz. | Tfno: +34 946012445 Depto. Fisica Aplicada II | Fax: +34 944648500 Facultad de Ciencias. \\ Universidad del Pais Vasco \\ Apdo. 644 \\ 48080 - Bilbao \\ SPAIN On Thu, 17 Jan 2002, Joe Van Andel wrote:

Hi Joe, There are C and Python wrappers around the very nice PGPLOT library that do exactly what you want (and a whole lot more). You can find them here: ftp://cfa-ftp.harvard.edu/pub/ransom The files you need are: ppgplot-0.11.tar.gz (the C wrappers) Pgplot.py (the Python wrappers around the C wrappers) Lots of additional information about the capabilities of PGPLOT can be found at its web page: http://www.astro.caltech.edu/~tjp/pgplot/ With my current setup, you can do a lot of plotting (except 3D stuff) in a manner that is very much like IDL (a single function call with lots of optional keyword arguments). I haven't modified it in quite awhile, but still use it in my own work almost every day. As for reading netCDF, I would recommend Konrad Hinsen's Scientific Python: http://starship.python.net/crew/hinsen/scientific.html Good luck, Scott On Thu, Jan 17, 2002 at 07:46:52AM -0700, Joe Van Andel wrote:
-- -- Scott M. Ransom Address: McGill Univ. Physics Dept. Phone: (514) 398-6492 3600 University St., Rm 338 email: ransom@physics.mcgill.ca Montreal, QC Canada H3A 2T8 GPG Fingerprint: 06A9 9553 78BE 16DB 407B FFCA 9BFA B6FF FFD3 2989

You might want to have a look at Gri (http://gri.sourceforge.net/). Gri can read netCDF files. Here's the little blurb from their site: "Gri is a language for scientific graphics programming. The word "language" is important: Gri is command-driven, not point/click. Some users consider Gri similar to LaTeX, since both provide extensive power as a reward for tolerating a learning curve. Gri can make x-y graphs, contour graphs, and image graphs. The output is in PostScript..." Since gri is command-driven, it's easy to call it from within python. Gri won't display the data for you - it will only generate the PostScript file, which you can then display with any number of tools. Eric On Thu, Jan 17, 2002 at 07:46:52AM -0700, Joe Van Andel wrote:

We will answer you again shortly and include an example of how to do this in cdat (cdat.sf.net). You can do it using our GUI or from the Python command line. cdat includes a colormap editor for getting things just the way you want, and a variety of graphics methods including box fill, isofill, isoline, etc. It can open a wide variety of data files including netcdf. Our name, Climate Data Analysis Tools, is a bit misleading. There are special facilities for climate modelers, and a variety of statistics and other algorithms that they need, but the package is a general-purpose one. -----Original Message----- From: numpy-discussion-admin@lists.sourceforge.net [mailto:numpy-discussion-admin@lists.sourceforge.net] On Behalf Of Joe Van Andel Sent: Thursday, January 17, 2002 6:47 AM To: numpy-discussion Subject: [Numpy-discussion] viewing Gridded or Polar data? Can anyone recommend a visualization package that would display arrays of numbers by mapping values to a set of colors? That is, we define 32 colors, where the first color represents values 0-10, the second color represents 10-20, etc, and then each input value gets displayed as its corresponding color. I'd like to read netCDF files, if possible. Thanks much! -- Joe VanAndel National Center for Atmospheric Research http://www.atd.ucar.edu/~vanandel/ Internet: vanandel@ucar.edu _______________________________________________ Numpy-discussion mailing list Numpy-discussion@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/numpy-discussion

You can take a look at SciGraphica at http://scigraphica.sourceforge.net. Although it is mainly GUI based, it has a python interface under development. You can ask in the scigraphica mailing list for a plugin for reading netcdf files, I remember someone posting it. Saludos, <ADRIAN> On Thu, 17 Jan 2002, Joe Van Andel wrote:
participants (7)
-
Adrian Feiguin
-
Eric Nodwell
-
Joe Van Andel
-
Jon Saenz
-
Paul F. Dubois
-
Rob
-
Scott Ransom