Re: Basic queries

From: Mary Haley <haley_at_nyahnyahspammersnyahnyah>
Date: Mon Jun 18 2012 - 12:26:18 MDT

On Jun 18, 2012, at 11:17 AM, ghansham sangar wrote:

> R/sir,
> I've a few queries:
> 1. How to display CF complaint hdf5 product in NCL?The product
> contains geostationary satellite images with 2D lat/lon coordinate
> variables(refer CF 1.5 complaince document for details).In context of
> this, can we set up the display projection according to that?

> 2. How to display satellite data as an image? I've seen displaying as
> contours but not image.
> 3. Can we set up the size of display? And add a header at the top of display?

Dear Ghansham,

I'll point you to some examples of plotting HDF data shortly.

1) NCL doesn't care if your NetCDF files are CF compliant, although it certainly doesn't hurt.

The display projection depends on your data, and what map projection it was generated
on, if any. If you are able to provide lat/lon values for your data, then you may be able to
put it on several different map projections.

2) I'm not sure what you mean by displaying data as contours versus an image. Generally,
a "raster image" can be technically considered a contour plot.

3) If you send the output to a PNG file, then you can set the size by setting special "wkWidth" and "wkHeight" resources.

To see some examples of plotting HDF data, please see:

http://www.ncl.ucar.edu/Applications/HDF.shtml

Most of these examples are generated with the special "cnFillMode" resource set to "RasterFill". I believe this is what you are referring to as an "image".

To change the output to go to a PNG file instead of a PostScript or PDF file, change the first argument of "gsn_open_wks" to "png". To further control the size of the PNG file, do something like this:

   pltType = "png"
   pltType@wkWidth = 1000
   pltType@wkHeight = 1000

   wks = gsn_open_wks(pltType, "example")

The above code will send the graphical output to a PNG file called "example.png".

Note that the graphics are always drawn to a square. If you try to set wkWidth and wkHeight to a non-square, then NCL internally will set the output to a square that is the largest of the two values.

--Mary

>
> Regards
> Ghansham
> _______________________________________________
> ncl-talk mailing list
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk

_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Mon Jun 18 12:32:22 2012

This archive was generated by hypermail 2.1.8 : Mon Jun 25 2012 - 09:57:23 MDT