<div dir="ltr">Dear Jennifer,<div><br></div><div>Thank you for this. I got it working already based on your suggestion.</div><div><br></div><div>Sincerely,</div></div><div class="gmail_extra"><br clear="all"><div><div class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><font face="comic sans ms, sans-serif"><b><u>Lyndon Mark P. Olaguera</u></b></font><div>PhD Student </div><div>Laboratory of Climatology</div><div>Department of Geography</div><div>Faculty of Urban Environmental Science</div><div><span style="font-size:12.8px">Minami-Osawa Campus</span><br></div><div>Tokyo Metropolitan University</div><div>Hachioji Tokyo, Japan</div><div><br></div></div></div></div></div></div></div></div></div></div></div></div></div></div>
<br><div class="gmail_quote">On Thu, Dec 28, 2017 at 9:50 PM, 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">Yes, the missing grid points generated by the maskout() function are the issue here.<br>
> 'define sig=maskout(ttest1,ttest1-3.<wbr>055)’<br>
You can use ‘gxout grfill’ to show all the valid grid box values for the variable ’sig', or you can skip the maskout() call and use ‘gxout shaded’ but omit drawing any contours less than 3.055 by using the color -1 in ’set ccols':<br>
> ‘set clevs 3.055’<br>
> ‘set ccols -1 15’<br>
> ‘d ttest1'<br>
Which would draw a gray shaded contour everywhere that ttest1 is >= 3.055<br>
—Jennifer<br>
<div><div class="h5"><br>
> On Dec 28, 2017, at 3:00 AM, Lyndon Mark Olaguera <<a href="mailto:olagueralyndonmark429@gmail.com">olagueralyndonmark429@gmail.<wbr>com</a>> wrote:<br>
><br>
> Hi Sir Andrew,<br>
><br>
> The zero is actually important because this is a difference plot (see attached file). I am only using a single color to shade both negative and positive values.<br>
><br>
> I'm not sure how to do your suggestion correctly.<br>
><br>
> I use the const() function and set the missing values to a higher positive value (e.g. 1000) but the significant areas disappear.<br>
> Is this correct?<br>
><br>
> 'define c=const(ave(b,lat=0,lat=18),<wbr>1000,-u)'<br>
><br>
><br>
> Here's my script:<br>
><br>
><br>
> 'sdfopen ../omega_P45P50_1979-1993_<wbr><a href="http://filt.nc">filt.nc</a>'<br>
> 'sdfopen ../omega_P45P50_1994-2008_<wbr><a href="http://filt.nc">filt.nc</a>'<br>
> 'sdfopen ../../../winds/uwnd/yearly/<wbr>diff_P45P50_uwnd_<wbr><a href="http://9408minus7993.nc">9408minus7993.nc</a>'<br>
><br>
> 'set dfile 2'<br>
> 'define n2=13'<br>
> 'set lev 1000 100'<br>
> 'set t 2'<br>
> 'define x2 = ave(omega,t=2,t=14)'<br>
> 'define s2 = sqrt(ave(pow(omega-x2,2),t=2,<wbr>t=14)*(n2/(n2-1)))'<br>
><br>
> 'set dfile 1'<br>
> 'define n1=13'<br>
> 'set lev 1000 100'<br>
> 'set t 2'<br>
> 'define x1 = ave(omega,t=2,t=14)'<br>
> 'define s1 = sqrt(ave(pow(omega-x1,2),t=2,<wbr>t=14)*(n1/(n1-1)))'<br>
> 'define denom = sqrt((pow(s1,2)/n1)+(pow(s2,2)<wbr>/n2))'<br>
> 'define num = x2-x1'<br>
> 'define ttest = num/denom'<br>
> 'define ttest1 = abs(ttest)'<br>
><br>
> 'define sig=maskout(ttest1,ttest1-3.<wbr>055)'<br>
><br>
><br>
> 'set lon 40 180'<br>
> 'define b=maskout(num,sig)'<br>
> 'set lev 1000 100'<br>
> 'set lon 40 180'<br>
> 'define c=ave(b,lat=0,lat=18)'<br>
> 'set lev 1000 100'<br>
> 'set lon 40 180'<br>
> 'define d=ave(num,lat=0,lat=18)'<br>
><br>
> 'set display color white'<br>
> 'c'<br>
> 'set parea 1.5 10.5 1.5 8'<br>
> 'set lon 40 180'<br>
> 'set grads off'<br>
> 'set grid off'<br>
> 'set xlopts 1 5 0.2'<br>
> 'set ylopts 1 5 0.2'<br>
> 'set xlint 20'<br>
> 'set font 1'<br>
><br>
> 'set gxout shaded'<br>
> 'set lev 1000 100'<br>
> 'set y 1'<br>
> 'set zlog on'<br>
> 'color -8 8 1 -kind gray->gray'<br>
> 'set csmooth on'<br>
> 'd -c*100'<br>
><br>
> 'set dfile 3'<br>
> 'set gxout stream'<br>
> 'set strmden 7 0.001 0.1 2'<br>
> 'set cthick 5'<br>
> 'set lon 40 180'<br>
> 'set t 1'<br>
> 'set y 1'<br>
> 'define u=ave(uwnd,lat=0,lat=18)'<br>
> 'd u;-d*100'<br>
><br>
> 'draw ylab Pressure(mb)'<br>
> 'draw title Difference in Zonal Circulation(EQ-18N)'<br>
> 'printim sig_omega_9408_minus_7993.png'<br>
> 'c'<br>
> 'quit'<br>
><br>
><br>
> Many thanks for the help.<br>
><br>
> Sincerely,<br>
><br>
><br>
> Lyndon Mark P. Olaguera<br>
> PhD Student<br>
> Laboratory of Climatology<br>
> Department of Geography<br>
> Faculty of Urban Environmental Science<br>
> Minami-Osawa Campus<br>
> Tokyo Metropolitan University<br>
> Hachioji Tokyo, Japan<br>
><br>
><br>
> On Thu, Dec 28, 2017 at 4:12 PM, Andrew Friedman <<a href="mailto:andfried@gmail.com">andfried@gmail.com</a>> wrote:<br>
> This is just a guess, but maybe it is because you can’t smooth across missing values?<br>
> What if you set your missing values to zero? Does that change anything?<br>
><br>
> > On Dec 27, 2017, at 10:18 PM, Jeff Duda <<a href="mailto:jeffduda319@gmail.com">jeffduda319@gmail.com</a>> wrote:<br>
> ><br>
> > I'm not sure what to say then. Perhaps the smth9() function only works on horizontal fields (that's all I've ever used it on)?<br>
> ><br>
> > Perhaps something very clever will be needed. Or you might have to perform the smoothing in an alternate data set outside of grads. Or you may be out of luck on this option. I'm not sure. Hopefully someone else can chime in with better advice.<br>
> ><br>
> > Good luck!<br>
> ><br>
> > Jeff<br>
> ><br>
> > On Wed, Dec 27, 2017 at 11:03 PM, Lyndon Mark Olaguera <<a href="mailto:olagueralyndonmark429@gmail.com">olagueralyndonmark429@gmail.<wbr>com</a>> wrote:<br>
> > Dear Sir Jeff,<br>
> ><br>
> > I also tried your suggestion but the result does not change.<br>
> ><br>
> > 'd smth9(smth9(smth9(smth9(smth9(<wbr>smth9(smth9(smth9(-c*100))))))<wbr>))'<br>
> ><br>
> > I am only shading the significant areas via the maskout() function. Maybe, this is the reason why Im not getting a smooth shading?<br>
> ><br>
> > Sincerely,<br>
> ><br>
> > Lyndon Mark P. Olaguera<br>
> > PhD Student<br>
> > Laboratory of Climatology<br>
> > Department of Geography<br>
> > Faculty of Urban Environmental Science<br>
> > Minami-Osawa Campus<br>
> > Tokyo Metropolitan University<br>
> > Hachioji Tokyo, Japan<br>
> ><br>
> ><br>
> > On Thu, Dec 28, 2017 at 2:44 PM, Jeff Duda <<a href="mailto:jeffduda319@gmail.com">jeffduda319@gmail.com</a>> wrote:<br>
> > use the smth9() function. Nest several iterations of it to increase the smoothing level.<br>
> ><br>
> > Jeff Duda<br>
> ><br>
> > On Wed, Dec 27, 2017 at 9:41 PM, Lyndon Mark Olaguera <<a href="mailto:olagueralyndonmark429@gmail.com">olagueralyndonmark429@gmail.<wbr>com</a>> wrote:<br>
> > Hi Bill,<br>
> ><br>
> > I tried this but the result is still the same.<br>
> ><br>
> > Sincerely,<br>
> ><br>
> > Lyndon Mark P. Olaguera<br>
> > PhD Student<br>
> > Laboratory of Climatology<br>
> > Department of Geography<br>
> > Faculty of Urban Environmental Science<br>
> > Minami-Osawa Campus<br>
> > Tokyo Metropolitan University<br>
> > Hachioji Tokyo, Japan<br>
> ><br>
> ><br>
> > On Wed, Dec 27, 2017 at 9:16 PM, Bill Reilly <<a href="mailto:bill_reilly@compuserve.com">bill_reilly@compuserve.com</a>> wrote:<br>
> > Before displaying the shading use the following:<br>
> ><br>
> > 'set csmooth on'<br>
> > --<br>
> ><br>
> > Bill Reilly<br>
> ><br>
> ><br>
> > <a href="tel:%28%2B34%29%20686-110-748" value="+34686110748">(+34) 686-110-748</a><br>
> ><br>
> ><br>
> ><br>
> > <a href="mailto:bill@passageweather.com">bill@passageweather.com</a><br>
> > <a href="http://www.passageweather.com" rel="noreferrer" target="_blank">www.passageweather.com</a><br>
> ><br>
> ><br>
> ><br>
> > <a href="mailto:bill@brwebworks.com">bill@brwebworks.com</a><br>
> > <a href="http://www.brwebworks.com" rel="noreferrer" target="_blank">www.brwebworks.com</a><br>
> ><br>
> ><br>
> ><br>
> > On 27/12/2017 05:48, Lyndon Mark Olaguera wrote:<br>
> >> Dear GrADS experts,<br>
> >><br>
> >> I am trying to plot a difference plot.In particular, a height-longitude cross section attached in this email. I am shading only the significant areas.<br>
> >><br>
> >> Is there a way to smoothen the shading in the plot?Currently, the shading appears like "blocks".<br>
> >> Here's a part of my script.<br>
> >><br>
> >> 'define sig=maskout(ttest1,ttest1-3.<wbr>055)'<br>
> >> 'set lon 40 180'<br>
> >> 'define b=maskout(num,sig)'<br>
> >> 'set lev 1000 100'<br>
> >> 'set lon 40 180'<br>
> >> 'define c=ave(b,lat=0,lat=18)'<br>
> >><br>
> >> 'set display color white'<br>
> >> 'c'<br>
> >> 'set parea 1.5 10.5 1.5 8'<br>
> >> 'set lon 40 180'<br>
> >> 'set grads off'<br>
> >> 'set grid off'<br>
> >> 'set xlopts 1 5 0.2'<br>
> >> 'set ylopts 1 5 0.2'<br>
> >> 'set xlint 20'<br>
> >> 'set font 1'<br>
> >><br>
> >> 'set gxout shaded'<br>
> >> 'set lev 1000 100'<br>
> >> 'set y 1'<br>
> >> 'set zlog on'<br>
> >> 'color -8 8 1 -gxout shaded -kind gray->gray'<br>
> >> 'd -c*100'<br>
> >><br>
> >> I'll appreciate any help.<br>
> >><br>
> >> Sincerely,<br>
> >><br>
> >><br>
> >> Lyndon Mark P. Olaguera<br>
> >> PhD Student<br>
> >> Laboratory of Climatology<br>
> >> Department of Geography<br>
> >> Faculty of Urban Environmental Science<br>
> >> Minami-Osawa Campus<br>
> >> Tokyo Metropolitan University<br>
> >> Hachioji Tokyo, Japan<br>
> >><br>
> >><br>
> >><br>
> >> ______________________________<br>
> >> _________________<br>
> >> gradsusr mailing list<br>
> >><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>
> ><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>
> ><br>
> ><br>
> > --<br>
> > Jeff Duda<br>
> > Post-doctoral research fellow<br>
> > University of Oklahoma School of Meteorology<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>
> ><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>
> ><br>
> ><br>
> > --<br>
> > Jeff Duda<br>
> > Post-doctoral research fellow<br>
> > University of Oklahoma School of Meteorology<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>
</div></div>> <sig_omega_9408_minus_7993.<wbr>png>__________________________<wbr>_____________________<br>
> gradsusr mailing list<br>
> <a href="mailto:gradsusr@gradsusr.org">gradsusr@gradsusr.org</a><br>
> <a href="http://secure-web.cisco.com/16TSWt--HQj5FmzwFVhGfzhNh2nTzXoL_qZNFM0hcdMNyPnRVe7jkDrLmoBOjAy-ah-kdFBkGrtlXj_fVTPYeGaEz8cZsL9B--lXtiaJrMc2xC0DmhUH9cdodpN17SJ_iKfcPq3JDM-qLlKWDoIT6nf5k7lPRjMh3ZF8TeIKFbMDtNjC3pRSzZB8gDnstLQixnJWmowQHj5BGa4PHJsmn2yrxzhYA7Aa4PFUtBRz7HT7iyWqC8Xoz4qKTNSfYw5a4XKMQjQyeMNgQIpf8ze9B0DBXfoZZ3Yv9gsDdXsT1P4MO6uzEJLOFDvBbH35DaHMYJujSLT_TIFPzhkekqwQdsXMPjSPOqATLarj2oW7fVgcqYnhLwZKulCsCwMUlABHEu4uTZ3ULukpYoQ_DIg6ChByynR8WEyvA_znOYmuKa3IrpB5m1iKtJWy_nVyW94JQ/http%3A%2F%2Fgradsusr.org%2Fmailman%2Flistinfo%2Fgradsusr" rel="noreferrer" target="_blank">http://secure-web.cisco.com/<wbr>16TSWt--<wbr>HQj5FmzwFVhGfzhNh2nTzXoL_<wbr>qZNFM0hcdMNyPnRVe7jkDrLmoBOjAy<wbr>-ah-kdFBkGrtlXj_<wbr>fVTPYeGaEz8cZsL9B--<wbr>lXtiaJrMc2xC0DmhUH9cdodpN17SJ_<wbr>iKfcPq3JDM-<wbr>qLlKWDoIT6nf5k7lPRjMh3ZF8TeIKF<wbr>bMDtNjC3pRSzZB8gDnstLQixnJWmow<wbr>QHj5BGa4PHJsmn2yrxzhYA7Aa4PFUt<wbr>BRz7HT7iyWqC8Xoz4qKTNSfYw5a4XK<wbr>MQjQyeMNgQIpf8ze9B0DBXfoZZ3Yv9<wbr>gsDdXsT1P4MO6uzEJLOFDvBbH35DaH<wbr>MYJujSLT_<wbr>TIFPzhkekqwQdsXMPjSPOqATLarj2o<wbr>W7fVgcqYnhLwZKulCsCwMUlABHEu4u<wbr>TZ3ULukpYoQ_DIg6ChByynR8WEyvA_<wbr>znOYmuKa3IrpB5m1iKtJWy_<wbr>nVyW94JQ/http%3A%2F%<wbr>2Fgradsusr.org%2Fmailman%<wbr>2Flistinfo%2Fgradsusr</a><br>
<br>
--<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>