Re: ncl-talk Digest, Vol 77, Issue 91

From: Li, Yongzuo <yongzuo.li_at_nyahnyahspammersnyahnyah>
Date: Fri Apr 30 2010 - 14:04:35 MDT

Hi Mary,

res@lgAutoManage = False is working very well.

Yongzuo
________________________________________
From: ncl-talk-bounces@ucar.edu [ncl-talk-bounces@ucar.edu] on behalf of ncl-talk-request@ucar.edu [ncl-talk-request@ucar.edu]
Sent: Friday, April 30, 2010 1:00 PM
To: ncl-talk@ucar.edu
Subject: ncl-talk Digest, Vol 77, Issue 91

Send ncl-talk mailing list submissions to
        ncl-talk@ucar.edu

To subscribe or unsubscribe via the World Wide Web, visit
        http://mailman.ucar.edu/mailman/listinfo/ncl-talk
or, via email, send a message with subject or body 'help' to
        ncl-talk-request@ucar.edu

You can reach the person managing the list at
        ncl-talk-owner@ucar.edu

When replying, please edit your Subject line so it is more specific
than "Re: Contents of ncl-talk digest..."

Today's Topics:

   1. Re: log contour parameter (Mary Haley)
   2. Re: lgLabelFontHeightF (Mary Haley)
   3. Re: coordinate subscripting question (Mary Haley)

----------------------------------------------------------------------

Message: 1
Date: Fri, 30 Apr 2010 09:11:05 -0600
From: Mary Haley <haley@ucar.edu>
Subject: Re: log contour parameter
To: WuDraco <aos_rain@hotmail.com>
Cc: ncl-talk@ucar.edu
Message-ID: <829FA09C-B031-45F0-A639-8C0DD73FAA69@ucar.edu>
Content-Type: text/plain; charset="gb2312"

Hi Longtao,

The special "ContourParameters" values are for equally-spaced contour levels only.

If you need log scale values, you will need to create the array of contour levels yourself:

   res@cnLevelSelectionMode = "ExplicitLevels"
   res@cnLevels = (/..../)

Replace (/..../) with whatever array of contour levels you want.

--Mary

On Apr 29, 2010, at 11:44 AM, WuDraco wrote:

> Hello,
>
> How can I set the ContourParamters in wrf_contour as log scale? Thanks!
>
> -Longtao
>
> Hotmail?Microsoft ???????????????????? ????? _______________________________________________
> ncl-talk mailing list
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20100430/092abd88/attachment.html

------------------------------

Message: 2
Date: Fri, 30 Apr 2010 09:15:32 -0600
From: Mary Haley <haley@ucar.edu>
Subject: Re: lgLabelFontHeightF
To: "Li, Yongzuo" <yongzuo.li@ou.edu>
Cc: "ncl-talk@ucar.edu" <ncl-talk@ucar.edu>
Message-ID: <BE1D596D-914A-4CD0-97C3-BBD6ECBBFA21@ucar.edu>
Content-Type: text/plain; charset=us-ascii

Yongzuo,

The difference between these two scripts is that you are creating the legend yourself
in the first one, and letting the "Plot Manager" create the legend for you in the
second one.

When you let the PlotManager create the legend for you, you have less control over
individual features, and "lgLabelFontHeightF" is one of them. This is mentioned
in the resource documentation for this resource:

http://www.ncl.ucar.edu/Document/Graphics/Resources/lg.shtml#lgLabelFontHeightF

As mentioned in the above URL, you can try setting:

   res@lgAutoManage = False

Otherwise, if you need finer control over the legend, you may want to
create it yourself.

--Mary

On Apr 29, 2010, at 5:12 PM, Li, Yongzuo wrote:

> Hi,
>
> I have a question about lgLabelFontHeightF.
>
> in ftp://ftp.caps.ou.edu/users/yli/ike-track.ncl , the
> lgres@lgLabelFontHeightF = .08
> works well to change the size
>
> in ftp://ftp.caps.ou.edu/users/yli/ike-minslp.ncl
> res@lgLabelFontHeightF = .38
> does not work to change the size.
>
> Yongzuo
> _______________________________________________
> ncl-talk mailing list
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk

------------------------------

Message: 3
Date: Fri, 30 Apr 2010 09:59:50 -0600
From: Mary Haley <haley@ucar.edu>
Subject: Re: coordinate subscripting question
To: Erik Noble <enoble@giss.nasa.gov>
Cc: ncl-talk <ncl-talk@ucar.edu>
Message-ID: <467A2131-CAD8-41C1-AEC3-3B27373E8FC3@ucar.edu>
Content-Type: text/plain; charset="us-ascii"

Hi Erik,

There is no averaging occuring when you use coordinate subscripting. You will get
actual values in your array, if a coordinate match is found.

NCL tries to find the closest coordinate values *within* the range of the coordinate subscript(s)
you give it, and then it returns the data values at those locations.

If you specify a coord range whose begin and end values are completely outside
the range of your actual coord values, you will get an error that looks like this:

  fatal:NclOneDValGetClosestIndex: finish coordinate index out of range, can't continue
  fatal:Could not obtain coordinate indexes, unable to perform subscript

If you use a single coordinate value that is not within the range, you will also get an error.

If your coordinate values are, say, (/1,2,3,4,5,6/), and you use a coordinate subscript range
of {2.5:5.5}, then this will correspond to the range represented by the coordinate
values (/3,4,5/), because 3 > 2.5, and 5 < 5.5.

The best way to learn this stuff is to just play around with a dummy array yourself. I've
created a start NCL script for you. Try running it and see if you understand the output
you're getting. Add your own coordinate subscripting to see what happens.

Run this script with:

   ncl -n coords.ncl

so you don't get the annoying "(0)" at the beginning of every line.

--Mary

On Apr 30, 2010, at 8:11 AM, Erik Noble wrote:

> Hi.
> Coordinate subscripting is a NCL method that I use every day. But I am am trying to understand how it actually "works."
> I have read the description (below), but could some of the NCL developers please help me know more?
> For instance, if I use coordinate subscripting to extract a randomly selected named lat,lon point from 2.5 degree Reanalysis 2 data, how does the function work? Is any averaging occurring?
> Thank you ahead of time.
> Sincerely,
> Erik Noble
>
> http://www.ncl.ucar.edu/Document/Manuals/Ref_Manual/NclVariables.shtml#CoordinateSubscripts
> "Coordinate subscripts
> Coordinate subscripts use the coordinate variables associated with a variable to determine which indexes are used in the selection. When specifying a coordinate subscript, braces '{' and '}' indicate the start and end values of the coordinate variable that will be used to select the indexes. Essentially, the start and end values are "looked" up in the coordinate variable, and the indexes are used to make the subselection. The following are examples of coordinate subscripts. Note that coordinate and standard subscripting can be mixed in the same variable subscript. Also, stride is still specified as an integer stride. If the coordinate values used in the subscript do not exactly match values in the coordinate variable, all coordinate values that fall within the coordinate subscript range are selected. If the values do match, then they are selected in an inclusive fashion.
> temperature(0,{20:60},{-95:-120})
> temperature(0,{20},{-95})
> temperature(0,{:20:2},{:-95:2})
>
> _______________________________________________
> ncl-talk mailing list
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20100430/102c38df/attachment.html
-------------- next part --------------
A non-text attachment was scrubbed...
Name: coords.ncl
Type: application/octet-stream
Size: 2808 bytes
Desc: not available
Url : http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20100430/102c38df/attachment.obj
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20100430/102c38df/attachment-0001.html

------------------------------

_______________________________________________
ncl-talk mailing list
ncl-talk@ucar.edu
http://mailman.ucar.edu/mailman/listinfo/ncl-talk

End of ncl-talk Digest, Vol 77, Issue 91
****************************************
_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Fri Apr 30 14:07:16 2010

This archive was generated by hypermail 2.1.8 : Mon May 03 2010 - 14:51:25 MDT