Re: Basic queries

From: Mary Haley <haley_at_nyahnyahspammersnyahnyah>
Date: Tue Jun 19 2012 - 07:58:36 MDT

On Jun 18, 2012, at 7:35 PM, ghansham sangar wrote:

> R/Sir
>
> This is really good in NCL that it can support any hdf-5 product.
> I was expecting that I wont have to assign names and units to the lat/lon datasets which are
> already there in the product. Do you mean to say, that we would have to assign that
> as show in the examples.
> I can upload a sample hdf-5 product. Give me sometime.
> Contouring is as much as I believe is a vector plot with lines joining the same values,
> while raster plot is an image display. Technically speaking, in graphics we generally use
> texture for displaying images while we use geometry for drawing contours.
> Anyways thanks for all the help.
> Any mention about adding header to the display?

I'm not sure what you mean by a "header to the display". Do you simply mean a title? If so, you set the resource "tiMainString":

   res@tiMainString = "This is a header at the top of the plot"

If you look at example "hdf4eos_1.ncl" on the HDF page:

http://www.ncl.ucar.edu/Applications/Scripts/hdf4eos_1.ncl

You will see that it sets the main title, and the X and Y axis titles via:

   res@tiMainString = "Sample from an EOS-DIS hdf file"
   res@tiXAxisString = "pixel"
   res@tiYAxisString = "scanline"

--Mary

> regards
> Ghansham
>
>
>
> On Mon, Jun 18, 2012 at 11:56 PM, Mary Haley <haley@ucar.edu> wrote:
>
> 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

_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Tue Jun 19 07:58:45 2012

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