FW: ShadeGtContour Question

From: Mills, Catrin Marie <cmmills2_at_nyahnyahspammersnyahnyah>
Date: Mon Nov 07 2011 - 10:05:52 MST

>From Mary Haley:
________________________________
From: Mary Haley
Sent: Sunday, November 06, 2011 1:02 PM
To: Catrin Mills
Cc: Dennis Shea; Adam Phillips; mmills2@illinois.edu
Subject: Re: ShadeGtContour Question

[This emai bounced using your mmills2@illinois.edu address, so I'm
trying your other one.]

Cat,

I think Adam will have to jump in here, because I'm not familiar with
how ShadeGtContour works. It seems that
the shading is based on the contour levels, and not the actual data.
In other words, If you have contour
levels -2, -1, 0, 1, 2, 3, and you call ShadeGtContour(plot,1.5,7),
shading will be applied to *any* contour
values between 1 and 2, because 1.5 falls between contour levels 1 and
2.

The best thing to do when you unsure about the behavior of these kind
of routines, like I am right now,
is to create a dummy dataset with very simple values, and try
different contour levels and shading.

See the attached script, which creates a small array of values equal
to exactly -5.5, -4.5, ..., -1.5, 0.5, 1.5, 2.5, ... 8.5.

I tried "nice" contour levels of -5, -4, ..., 0, 1, ..., 7, 8 and
you'll see that the shading appears between contour levels 1 and 2,
even though this area contains only values equal exactly to 1.5.

--Mary

On Nov 5, 2011, at 6:27 PM, Dennis Shea wrote:

>
>
> -------- Original Message --------
> Subject: FW: ShadeGtContour Question
> Date: Sun, 6 Nov 2011 00:26:17 +0000
> From: Mills, Catrin Marie <cmmills2@illinois.edu>
> To: Adam Phillips <asphilli@ucar.edu>, Dennis Shea <shea@ucar.edu>
>
>
>
> Hi, Dennis and Adam. Sorry to send you this question, but UIllinois
> recently switched email accounts, and now ncl-talk won't allow me to
> send requests. I'm trying to figure out what's going on, but until
> then,
> if you have a spare moment, could you take a look at the question
> below?
>
> Thanks so much,
>
> Cat
>
> From: Catrin Mills <cmmills2@illinois.edu <mailto:cmmills2@illinois.edu
> >>
> Date: Sat, 5 Nov 2011 19:16:54 -0500
> To: <ncl-talk@ucar.edu <mailto:ncl-talk@ucar.edu>>
> Subject: ShadeGtContour Question
>
> Hi, I hope all is well.
>
> If I want to only contour values greater than 1.5, say, when using
> ShadeGtContour, if I set resi@cnLevelSpacingF = 1.5 (earlier in my
> code)
> and use the function ploti = ShadeGtContour(ploti, 1.5, 17), will that
> ensure that only values greater than 1.5 are shaded? I just want to
> make
> sure since the function description states , "Note that the shading
> begins at the first contour level less than /value/, and not at the
> specified /value/."
>
> Thanks,
>
> Catrin

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

Received on Mon Nov 7 10:05:59 2011

This archive was generated by hypermail 2.1.8 : Tue Nov 08 2011 - 15:54:50 MST