<div dir="ltr"><div>Hi Adam and Atul,</div><div>I agree that Adam's suggestion would work for this case. However, I just want to highlight this issue since the function trend_manken returns "0" for missing values. That is the reason Atul get's color over missing value region of variable b, since 0 is a valid number unless specified as missing. Similar questions have been asked previously and I think this "0" value return for missing input data is part of the confusion. OR, may be this is a feature of the function, I do not know!<br></div><div><br></div><div>I wonder if the function trend_manken could return missing if a grid point has missing values? Below is the simplest test:</div><div><br></div><div>print("........................... when no value is missing .......")<br> a = 1.*ispan(1,20,1)<br> b = trend_manken(a,False,0)<br> print(""+b)<br><br>print("........................... when all values are missing .......")<br> c = a<br> c@_FillValue = -999.<br> c = c@_FillValue<br> d = trend_manken(c,False,0)<br> print(""+d)<br><br>print("............................ when a subset of values are missing ..")<br> e = a<br> e@_FillValue = -999.<br> e(7)       = e@_FillValue<br> f = trend_manken(c,False,0)<br> print(""+f)</div><div><br></div><div><br></div><div>Cheers,</div><div>Rashed<br></div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sat, Dec 14, 2019 at 6:46 AM Adam Phillips via ncl-talk <<a href="mailto:ncl-talk@ucar.edu">ncl-talk@ucar.edu</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="auto"><div dir="ltr">Hi Atul,</div><div dir="ltr">I had a missing parentheses in my where statements as evidenced by the syntax errors. </div><div dir="ltr">Change this:</div><div dir="ltr">mk1 = where(ismissing(b(0,:,:),mk1@_FillValue,mk1)</div><div dir="ltr">to this:</div><div dir="ltr">mk1 = where(ismissing(b(0,:,:)),mk1@_FillValue,mk1)</div><div dir="ltr">Adam</div><div dir="ltr"><br><blockquote type="cite">On Dec 14, 2019, at 12:25 AM, Atul Saini <<a href="mailto:atulsainimail@gmail.com" target="_blank">atulsainimail@gmail.com</a>> wrote:<br><br></blockquote></div><blockquote type="cite"><div dir="ltr"><div dir="ltr"><div><div><div>Hi Dr. Adam,</div><div>                    I followed the way 
suggested by you but it didn't worked and given the following syntax error. I have attached the script and 
data file herewith this mail.<br></div></div><div><b><br></b></div><div><b>ncl 14></b> mk1 = where(ismissing(b(0,:,:),mk1@_FillValue,mk1)</div><span style="color:rgb(0,0,255)">fatal:syntax error: function ismissing expects 1 arguments, got 3<br>fatal:error at line 14</span></div><div><b>ncl 15></b> mk2 = where(ismissing(b(0,:,:),mk2@_FillValue,mk2)</div><span style="color:rgb(0,0,255)">fatal:syntax error: function ismissing expects 1 arguments, got 3<br></span><div><span style="color:rgb(0,0,255)">fatal:error at line 15</span></div><div><br></div><div><div dir="ltr"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div><font size="4">Regards,</font></div><div><br></div><div><img src="https://docs.google.com/uc?export=download&id=1flpEpH50fxgPRxFvuyiLu2A70K0UoFx-&revid=0Byj9ykpbAx3od3R4N016WWh0MnlGQ1JHUTg4Nk5HVmVMS2ZNPQ" width="304" height="116"><br></div><div>                           <br></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sat, Dec 14, 2019 at 9:41 AM Atul Saini <<a href="mailto:atulsainimail@gmail.com" target="_blank">atulsainimail@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div>Hi Dr. Adam,</div><div>                    I followed the way suggested by you but it didn't worked. I have attached the script and data file herewith this mail.</div><div><br></div><div><div><div dir="ltr"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div><font size="4">Regards,</font></div><div><br></div><div><img src="https://docs.google.com/uc?export=download&id=1flpEpH50fxgPRxFvuyiLu2A70K0UoFx-&revid=0Byj9ykpbAx3od3R4N016WWh0MnlGQ1JHUTg4Nk5HVmVMS2ZNPQ" width="304" height="116"><br></div><div>                           <br></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sat, Dec 14, 2019 at 3:37 AM Adam Phillips <<a href="mailto:asphilli@ucar.edu" target="_blank">asphilli@ucar.edu</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">Hi Atul,<div>In general, NCL denotes areas that are missing graphically by coloring them white unless modified by the user. There are no white </div><div>areas on your trend plot, and thus I am guessing that NCL believes that the plotted grid does not have any missing data. Note that in</div><div>the trend_manken documentation that missing values are not allowed to be input into the function. If you do have missing data </div><div>(denoted by the _FillValue attribute) within your b array, and the b array grid points are consistently missing in time, </div><div>I would use the where function to wipe out the results from trend_manken over those areas that were missing:</div><div>mk=trend_manken(b,opt,0)<br>copy_VarCoords(aveg,mk)<br></div><div>mk1=mk(0,:,:)<br>mk2=mk(1,:,:)<br></div><div>mk1 = where(ismissing(b(0,:,:),mk1@_FillValue,mk1)</div><div><div>mk2 = where(ismissing(b(0,:,:),mk2@_FillValue,mk2)</div><div></div></div><div> </div><div>The above coding assumes b@_FillValue, mk1@_FillValue, and mk1@_FillValue are properly set, and that b(0,:,:) is representative of the </div><div>areas that need to be masked. </div><div><br></div><div>If that advice does not fix the issue reply to the ncl-talk email list.</div><div>Adam</div><div><br></div><div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, Dec 12, 2019 at 2:47 AM Atul Saini via ncl-talk <<a href="mailto:ncl-talk@ucar.edu" target="_blank">ncl-talk@ucar.edu</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div><font size="4">Hi NCL,</font></div><div><font size="4">               I have modified the script and I think I am getting the right plot having modified the script.</font></div><div><font size="4">               If, I followed the right method to plot 'probability level' and 'trend value', please tell me why I am getting the value for the region having missing values.</font></div><div><br></div><div><div dir="ltr"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div><font size="4">Regards,</font></div><div><br></div><div><img src="https://docs.google.com/uc?export=download&id=1flpEpH50fxgPRxFvuyiLu2A70K0UoFx-&revid=0Byj9ykpbAx3od3R4N016WWh0MnlGQ1JHUTg4Nk5HVmVMS2ZNPQ" width="304" height="116"><br></div><div>                           <br></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, Dec 12, 2019 at 2:56 PM Atul Saini <<a href="mailto:atulsainimail@gmail.com" target="_blank">atulsainimail@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div><font size="4">Hi NCL,</font></div><div><font size="4">              I wrote the code to make map for P value and second for Trend value. But, I can't understand the process of selecting P value at the time of plot and Trend value. <br></font></div><div><font size="4"><br></font></div><div><font size="4">Please find the attached data file and script and suggest the way to plot P value and Trend value.</font> <br></div><div><br></div><div><br></div><div><div dir="ltr"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div><font size="4">Regards,</font></div><div><br></div><div><img src="https://docs.google.com/uc?export=download&id=1flpEpH50fxgPRxFvuyiLu2A70K0UoFx-&revid=0Byj9ykpbAx3od3R4N016WWh0MnlGQ1JHUTg4Nk5HVmVMS2ZNPQ" width="304" height="116"><br></div><div>                           <br></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div>
</blockquote></div>
_______________________________________________<br>
ncl-talk mailing list<br>
<a href="mailto:ncl-talk@ucar.edu" target="_blank">ncl-talk@ucar.edu</a><br>
List instructions, subscriber options, unsubscribe:<br>
<a href="http://mailman.ucar.edu/mailman/listinfo/ncl-talk" rel="noreferrer" target="_blank">http://mailman.ucar.edu/mailman/listinfo/ncl-talk</a></blockquote></div><br clear="all"><div><br></div>-- <br><div dir="ltr"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div><div><span><font color="#888888">Adam Phillips <br></font></span></div><span><font color="#888888">Associate Scientist,  </font></span><span><font color="#888888">Climate and Global Dynamics Laboratory, NCAR<br></font></span></div></div><div><span><font color="#888888"><a href="http://www.cgd.ucar.edu/staff/asphilli/" target="_blank">www.cgd.ucar.edu/staff/asphilli/</a>   </font></span><span><font color="#888888">303-497-1726 </font></span></div><span><font color="#888888"></font></span><div><div><span><font color="#888888"><br></font></span><div><span><font color="#888888"><a href="http://www.cgd.ucar.edu/staff/asphilli" target="_blank"></a></font></span></div></div></div></div></div></div></div></div></div></div></div>
</blockquote></div>
</blockquote></div>
<div><MK_Test1(2).ncl></div><div><WesternAgroClimRegion_MonthlySum_1901_2017Jan.nc></div></div></blockquote></div>_______________________________________________<br>
ncl-talk mailing list<br>
<a href="mailto:ncl-talk@ucar.edu" target="_blank">ncl-talk@ucar.edu</a><br>
List instructions, subscriber options, unsubscribe:<br>
<a href="http://mailman.ucar.edu/mailman/listinfo/ncl-talk" rel="noreferrer" target="_blank">http://mailman.ucar.edu/mailman/listinfo/ncl-talk</a></blockquote></div>