Lyndon Mark Olaguera olagueralyndonmark429 at gmail.com
Thu Dec 28 03:00:39 EST 2017

```Hi Sir Andrew,

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.

I'm not sure how to do your suggestion correctly.

I use the const() function and set the missing values to a higher positive
value (e.g. 1000) but the significant areas disappear.
Is this correct?

*'define c=const(ave(b,lat=0,lat=18),1000,-u)'*

Here's my script:

'sdfopen ../omega_P45P50_1979-1993_filt.nc'
'sdfopen ../omega_P45P50_1994-2008_filt.nc'
'sdfopen ../../../winds/uwnd/yearly/diff_P45P50_uwnd_9408minus7993.nc'

'set dfile 2'
'define n2=13'
'set lev 1000 100'
'set t 2'
'define x2 = ave(omega,t=2,t=14)'
'define s2 = sqrt(ave(pow(omega-x2,2),t=2,t=14)*(n2/(n2-1)))'

'set dfile 1'
'define n1=13'
'set lev 1000 100'
'set t 2'
'define x1 = ave(omega,t=2,t=14)'
'define s1 = sqrt(ave(pow(omega-x1,2),t=2,t=14)*(n1/(n1-1)))'
'define denom = sqrt((pow(s1,2)/n1)+(pow(s2,2)/n2))'
'define num = x2-x1'
'define ttest = num/denom'
'define ttest1 = abs(ttest)'

'set lon 40 180'
'set lev 1000 100'
'set lon 40 180'
*'define c=ave(b,lat=0,lat=18)'*
'set lev 1000 100'
'set lon 40 180'
'define d=ave(num,lat=0,lat=18)'

'set display color white'
'c'
'set parea 1.5 10.5 1.5 8'
'set lon 40 180'
'set grid off'
'set xlopts 1 5 0.2'
'set ylopts 1 5 0.2'
'set xlint 20'
'set font 1'

'set lev 1000 100'
'set y 1'
'set zlog on'
'color -8 8 1 -kind gray->gray'
'set csmooth on'
'd -c*100'

'set dfile 3'
'set gxout stream'
'set strmden 7 0.001 0.1 2'
'set cthick 5'
'set lon 40 180'
'set t 1'
'set y 1'
'define u=ave(uwnd,lat=0,lat=18)'
'd u;-d*100'

'draw ylab Pressure(mb)'
'draw title Difference in Zonal Circulation(EQ-18N)'
'printim sig_omega_9408_minus_7993.png'
'c'
'quit'

Many thanks for the help.

Sincerely,

*Lyndon Mark P. Olaguera*
PhD Student
Laboratory of Climatology
Department of Geography
Faculty of Urban Environmental Science
Minami-Osawa Campus
Tokyo Metropolitan University
Hachioji Tokyo, Japan

On Thu, Dec 28, 2017 at 4:12 PM, Andrew Friedman <andfried at gmail.com> wrote:

> This is just a guess, but maybe it is because you can’t smooth across
> missing values?
> What if you set your missing values to zero? Does that change anything?
>
> > On Dec 27, 2017, at 10:18 PM, Jeff Duda <jeffduda319 at gmail.com> wrote:
> >
> > 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)?
> >
> > 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.
> >
> > Good luck!
> >
> > Jeff
> >
> > On Wed, Dec 27, 2017 at 11:03 PM, Lyndon Mark Olaguera <
> olagueralyndonmark429 at gmail.com> wrote:
> > Dear Sir Jeff,
> >
> > I also tried your suggestion but the result does not change.
> >
> > 'd smth9(smth9(smth9(smth9(smth9(smth9(smth9(smth9(-c*100))))))))'
> >
> > I am only shading the significant areas via the maskout() function.
> Maybe, this is the reason why Im not getting a smooth shading?
> >
> > Sincerely,
> >
> > Lyndon Mark P. Olaguera
> > PhD Student
> > Laboratory of Climatology
> > Department of Geography
> > Faculty of Urban Environmental Science
> > Minami-Osawa Campus
> > Tokyo Metropolitan University
> > Hachioji Tokyo, Japan
> >
> >
> > On Thu, Dec 28, 2017 at 2:44 PM, Jeff Duda <jeffduda319 at gmail.com>
> wrote:
> > use the smth9() function. Nest several iterations of it to increase the
> smoothing level.
> >
> > Jeff Duda
> >
> > On Wed, Dec 27, 2017 at 9:41 PM, Lyndon Mark Olaguera <
> olagueralyndonmark429 at gmail.com> wrote:
> > Hi Bill,
> >
> > I tried this but the result is still the same.
> >
> > Sincerely,
> >
> > Lyndon Mark P. Olaguera
> > PhD Student
> > Laboratory of Climatology
> > Department of Geography
> > Faculty of Urban Environmental Science
> > Minami-Osawa Campus
> > Tokyo Metropolitan University
> > Hachioji Tokyo, Japan
> >
> >
> > On Wed, Dec 27, 2017 at 9:16 PM, Bill Reilly <bill_reilly at compuserve.com>
> wrote:
> > Before displaying the shading use the following:
> >
> > 'set csmooth on'
> > --
> >
> > Bill Reilly
> >
> >
> > (+34) 686-110-748
> >
> >
> >
> > bill at passageweather.com
> > www.passageweather.com
> >
> >
> >
> > bill at brwebworks.com
> > www.brwebworks.com
> >
> >
> >
> > On 27/12/2017 05:48, Lyndon Mark Olaguera wrote:
> >>
> >> 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.
> >>
> >> Is there a way to smoothen the shading in the plot?Currently, the
> >> Here's a part of my script.
> >>
> >> 'set lon 40 180'
> >> 'set lev 1000 100'
> >> 'set lon 40 180'
> >> 'define c=ave(b,lat=0,lat=18)'
> >>
> >> 'set display color white'
> >> 'c'
> >> 'set parea 1.5 10.5 1.5 8'
> >> 'set lon 40 180'
> >> 'set grid off'
> >> 'set xlopts 1 5 0.2'
> >> 'set ylopts 1 5 0.2'
> >> 'set xlint 20'
> >> 'set font 1'
> >>
> >> 'set lev 1000 100'
> >> 'set y 1'
> >> 'set zlog on'
> >> 'color -8 8 1 -gxout shaded -kind gray->gray'
> >> 'd -c*100'
> >>
> >> I'll appreciate any help.
> >>
> >> Sincerely,
> >>
> >>
> >> Lyndon Mark P. Olaguera
> >> PhD Student
> >> Laboratory of Climatology
> >> Department of Geography
> >> Faculty of Urban Environmental Science
> >> Minami-Osawa Campus
> >> Tokyo Metropolitan University
> >> Hachioji Tokyo, Japan
> >>
> >>
> >>
> >> ______________________________
> >> _________________
> >>
> >
> >
> > _______________________________________________
> >
> >
> >
> > _______________________________________________
> >
> >
> >
> >
> > --
> > Jeff Duda
> > Post-doctoral research fellow
> > University of Oklahoma School of Meteorology
> >
> > _______________________________________________
> >
> >
> >
> > _______________________________________________
> >
> >
> >
> >
> > --
> > Jeff Duda
> > Post-doctoral research fellow
> > University of Oklahoma School of Meteorology
> > _______________________________________________
>
>
> _______________________________________________
>
-------------- next part --------------
An HTML attachment was scrubbed...