<div dir="ltr"><div class="gmail_default" style="font-family:tahoma,sans-serif;font-size:small">Jennifer - perfect, thank you! Not sure how I missed the extra const but that fixed it.</div><div class="gmail_default" style="font-family:tahoma,sans-serif;font-size:small"><br></div><div class="gmail_default" style="font-family:tahoma,sans-serif;font-size:small">Jeff - thanks for the reply.</div></div><div class="gmail_extra"><br><div class="gmail_quote">On 2 October 2017 at 17:14, Jennifer M Adams <span dir="ltr"><<a href="mailto:jadams21@gmu.edu" target="_blank">jadams21@gmu.edu</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi, Daniel —<br>
Your original expression:<br>
<br>
> > > 'define capehel = const(const(maskout(cape,<wbr>myhel-100),1),0.0,-u)’<br>
<br>
has an extra const() in there that changes the valid cape values to 1 before changing the undef values to 0.0. It should be:<br>
<br>
'define capehel = const(maskout(cape,myhel-100),<wbr>0.0,-u)’<br>
<br>
But an even simpler way to do this is to use a logical expression and the if() function:<br>
'define capehel = if(hlcy>=100,cape,0.0)'<br>
<br>
—Jennifer<br>
<div><div class="h5"><br>
> On Oct 2, 2017, at 7:12 AM, Daniel Nairn <<a href="mailto:dannairn@gmail.com">dannairn@gmail.com</a>> wrote:<br>
><br>
> No I don't think so, what I've done is break down the script (as below) again and this now actually looks okay<br>
><br>
> 'define cape = capesfc'<br>
> 'define myhel = HLCY0_1000m'<br>
> 'define myval = maskout(cape,myhel-100)'<br>
> 'define myval2 = const(myval, 0, -u)'<br>
> 'd myval2'<br>
><br>
> I'm still unsure as to what I'm doing wrong when its all combined into one line, but at least this appears to be working. Thank you.<br>
><br>
><br>
><br>
> On 2 October 2017 at 11:52, Andrew Friedman <<a href="mailto:andfried@gmail.com">andfried@gmail.com</a>> wrote:<br>
> Hi Daniel,<br>
> Could it be an issue with contour shading? If you pick a point where you know there is a value, is the output correct?<br>
> Andrew<br>
><br>
> > On Oct 2, 2017, at 9:00 AM, Daniel Nairn <<a href="mailto:dannairn@gmail.com">dannairn@gmail.com</a>> wrote:<br>
> ><br>
> > Hello Andrew<br>
> ><br>
> > Yes I simplified the script as suggested at that does look much better, thank you. Not quite sure what I've done wrong with the const loops though.<br>
> ><br>
> > On 1 October 2017 at 21:55, Andrew Friedman <<a href="mailto:andfried@gmail.com">andfried@gmail.com</a>> wrote:<br>
> > Hi Daniel,<br>
> ><br>
> > What if you simplify it by just looking at the inner loop: maskout(cape,myhel-100)? Does the output look correct? Then you can build on it by adding the successive const loops.<br>
> ><br>
> > Andrew<br>
> ><br>
> > > On Oct 1, 2017, at 12:59 PM, Daniel Nairn <<a href="mailto:dannairn@gmail.com">dannairn@gmail.com</a>> wrote:<br>
> > ><br>
> > > Hello<br>
> > ><br>
> > > I am trying to plot a chart (from one ensemble member) that displays SBCAPE where 0-1km helicity is greater than 100. This is how my current script looks<br>
> > ><br>
> > > 'define cape = capesfc(e=2)'<br>
> > > 'define myhel = HLCY0_1000m(e=2)'<br>
> > > 'define capehel = const(const(maskout(cape,<wbr>myhel-100),1),0.0,-u)'<br>
> > > 'd capehel'<br>
> > ><br>
> > > I'm not convinced this is correct as my final image output does not show any CAPE values where expected. Can anybody help at all?<br>
> > ><br>
> > > ______________________________<wbr>_________________<br>
> > > gradsusr mailing list<br>
> > > <a href="mailto:gradsusr@gradsusr.org">gradsusr@gradsusr.org</a><br>
> > > <a href="http://gradsusr.org/mailman/listinfo/gradsusr" rel="noreferrer" target="_blank">http://gradsusr.org/mailman/<wbr>listinfo/gradsusr</a><br>
> ><br>
> ><br>
> > ______________________________<wbr>_________________<br>
> > gradsusr mailing list<br>
> > <a href="mailto:gradsusr@gradsusr.org">gradsusr@gradsusr.org</a><br>
> > <a href="http://gradsusr.org/mailman/listinfo/gradsusr" rel="noreferrer" target="_blank">http://gradsusr.org/mailman/<wbr>listinfo/gradsusr</a><br>
> ><br>
> > ______________________________<wbr>_________________<br>
> > gradsusr mailing list<br>
> > <a href="mailto:gradsusr@gradsusr.org">gradsusr@gradsusr.org</a><br>
> > <a href="http://gradsusr.org/mailman/listinfo/gradsusr" rel="noreferrer" target="_blank">http://gradsusr.org/mailman/<wbr>listinfo/gradsusr</a><br>
><br>
><br>
> ______________________________<wbr>_________________<br>
> gradsusr mailing list<br>
> <a href="mailto:gradsusr@gradsusr.org">gradsusr@gradsusr.org</a><br>
> <a href="http://gradsusr.org/mailman/listinfo/gradsusr" rel="noreferrer" target="_blank">http://gradsusr.org/mailman/<wbr>listinfo/gradsusr</a><br>
><br>
> ______________________________<wbr>_________________<br>
> gradsusr mailing list<br>
> <a href="mailto:gradsusr@gradsusr.org">gradsusr@gradsusr.org</a><br>
> <a href="http://gradsusr.org/mailman/listinfo/gradsusr" rel="noreferrer" target="_blank">http://gradsusr.org/mailman/<wbr>listinfo/gradsusr</a><br>
<br>
</div></div>--<br>
Jennifer Miletta Adams<br>
Center for Ocean-Land-Atmosphere Studies (COLA)<br>
George Mason University<br>
<div class="HOEnZb"><div class="h5"><br>
<br>
<br>
<br>
______________________________<wbr>_________________<br>
gradsusr mailing list<br>
<a href="mailto:gradsusr@gradsusr.org">gradsusr@gradsusr.org</a><br>
<a href="http://gradsusr.org/mailman/listinfo/gradsusr" rel="noreferrer" target="_blank">http://gradsusr.org/mailman/<wbr>listinfo/gradsusr</a><br>
</div></div></blockquote></div><br></div>