<div dir="ltr"><div>Dear Adam,</div><div>So many many thanks for your help. I appreciate the time you consider fixing the issue.</div><div>Best wishes,</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, May 27, 2022 at 2:22 AM Adam Phillips <<a href="mailto:asphilli@ucar.edu">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 Setareh,<div>So the problem turned out to be NaN values in the first timestep of your plotted array (anom). NCL typically does not plot arrays with NaN's in a graceful manner, and can return weird results without any kind of error whatsoever. Strangely, setting cnFillMode = "RasterFill" sidestepped the problem. But a better solution was to set all the NaN values to anom@_FillValue using the <a href="https://www.ncl.ucar.edu/Document/Functions/Built-in/replace_ieeenan.shtml" target="_blank">replace_ieeenan</a> function. I also adjusted your vpWidth/Height settings to be within a valid range (from 0->1) and adjusted your font sizes a bit. I have attached the script and resulting plot.</div><div>Adam </div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, May 26, 2022 at 2:15 PM Setareh Rahimi <<a href="mailto:setareh.rahimi@gmail.com" target="_blank">setareh.rahimi@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>Dear Adam,</div><div>So many thanks for your advice. Yes, I confirm that the plot I sent has been created by the attached script.</div><div>I downloaded the data set from the link below:</div><div><span style="background-color:rgb(255,217,102)"><a href="https://psl.noaa.gov/data/gridded/data.cpcsoil.html" target="_blank">https://psl.noaa.gov/data/gridded/data.cpcsoil.html</a></span></div><div><a href="https://downloads.psl.noaa.gov/Datasets/cpcsoil/" target="_blank">https://downloads.psl.noaa.gov/Datasets/cpcsoil/</a><span style="background-color:rgb(180,167,214)"><a href="http://soilw.mon.mean.v2.nc" target="_blank">soilw.mon.mean.v2.nc</a></span></div><div><span style="background-color:rgb(255,217,102)">"monthly mean"</span></div><div>Best wishes,<br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, May 27, 2022 at 12:13 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 Setareh,<div>Thanks for sending a short script and data file. Unfortunately the data file (for me) is corrupted so I cannot run the script. Looking at your script/plot though, I see that you are setting mpFillOn = False, but it looks to me like the land in your plot is getting filled with gray (before the color fill is applied). </div><div><br></div><div>The reason I am asking this is that the weird contouring that you are seeing over the ocean in the first panel is similar to an issue I have seen when color filling an incomplete array when mpFIllOn is set to True. So please verify that the script you sent creates the plot that you attached. </div><div><br></div><div>If it does, please write out your anom array (which should be much smaller than your original data file) and send it to ncl-talk.</div><div><br></div><div>Something simple like this should work:</div><div>anom = calcMonAnomTLL(prc,prcClm)<br></div><div>v = addfile("<a href="http://anom.nc" target="_blank">anom.nc</a>","c")</div><div>v->anom = anom</div><div><br></div><div>Adam</div><div><br></div><div><br></div><div><br><div><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, May 26, 2022 at 9:55 AM Setareh Rahimi via ncl-talk <<a href="mailto:ncl-talk@mailman.ucar.edu" target="_blank">ncl-talk@mailman.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>Dear Rick,</div><div>Thank you for your advice. I got no errors or warnings regarding the script. I just wonder why there are values over the ocean!</div><div>Best wishes,<br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, May 26, 2022 at 8:17 PM Rick Brownrigg <<a href="mailto:brownrig@ucar.edu" target="_blank">brownrig@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>To your 1st question, were there any errors or warnings reported by NCL?</div><div><br></div><div>On the 2nd question, it looks like you are setting your colors with this line:</div><div><br></div><div> res@cnFillPalette = "perc2_9lev" <br></div><div><br></div><div>Perhaps try:</div><div><br></div><div> cmap = read_colormap_file("perc2_9lev")</div><div> res@cnFillPalette = cmap(::-1, :)</div><div><br></div><div>Take a look at the documentation for cnFillPalette for discussion on how there might be two extra colors in the new palette; I don't know if that matters to what you are trying to do:<br></div><div><br></div><div> <a href="http://ncl.ucar.edu/Document/Graphics/Resources/cn.shtml#cnFillPalette" target="_blank">http://ncl.ucar.edu/Document/Graphics/Resources/cn.shtml#cnFillPalette</a></div><div><br></div><div>HTH...Rick</div><div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, May 26, 2022 at 8:47 AM Setareh Rahimi via ncl-talk <<a href="mailto:ncl-talk@mailman.ucar.edu" target="_blank">ncl-talk@mailman.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><br clear="all"></div><div>Dear all,</div><div>I plotted the monthly anomaly of soil moisture, however, after plotting I noticed that for the month of January there are some <span style="background-color:rgb(234,153,153)">lines over the Atlantic ocean. </span>I wonder why this happened, please? The script, image,<div class="gmail_chip gmail_drive_chip" style="width:396px;height:18px;max-height:18px;background-color:rgb(245,245,245);padding:5px;color:rgb(34,34,34);font-family:arial;font-style:normal;font-weight:bold;font-size:13px;border:1px solid rgb(221,221,221);line-height:1"><a href="https://drive.google.com/file/d/1vl3N7Ptg0NnQGDBWOToGjj9CdcD9Fnr-/view?usp=drive_web" style="display:inline-block;max-width:366px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;text-decoration:none;padding:1px 0px;border:medium none" aria-label="soilw.mon.mean.v2.nc" target="_blank"><img style="vertical-align: bottom; border: medium none;" src="https://ssl.gstatic.com/docs/doclist/images/icon_10_generic_list.png"> <span dir="ltr" style="color:rgb(17,85,204);text-decoration:none;vertical-align:bottom">soilw.mon.mean.v2.nc</span></a><img style="opacity: 0.55; float: right; display: none;"></div> and the data set have been attached.</div><div>I have another question. <span style="background-color:rgb(255,217,102)">How can I reverse the color of the map, please</span>?<br></div><div>Please kindly advise me.</div><div>Thanks in advance,</div><div>Best wishes,<br></div><div>-- <br><div dir="ltr">S.Rahimi<br><br></div></div></div>
_______________________________________________<br>
ncl-talk mailing list<br>
<a href="mailto:ncl-talk@mailman.ucar.edu" target="_blank">ncl-talk@mailman.ucar.edu</a><br>
List instructions, subscriber options, unsubscribe:<br>
<a href="https://mailman.ucar.edu/mailman/listinfo/ncl-talk" rel="noreferrer" target="_blank">https://mailman.ucar.edu/mailman/listinfo/ncl-talk</a><br>
</blockquote></div>
</blockquote></div><br clear="all"><br>-- <br><div dir="ltr">S.Rahimi<br><br></div>
_______________________________________________<br>
ncl-talk mailing list<br>
<a href="mailto:ncl-talk@mailman.ucar.edu" target="_blank">ncl-talk@mailman.ucar.edu</a><br>
List instructions, subscriber options, unsubscribe:<br>
<a href="https://mailman.ucar.edu/mailman/listinfo/ncl-talk" rel="noreferrer" target="_blank">https://mailman.ucar.edu/mailman/listinfo/ncl-talk</a><br>
</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></div></div></div>
</blockquote></div><br clear="all"><br>-- <br><div dir="ltr">S.Rahimi<br><br></div>
</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><br clear="all"><br>-- <br><div dir="ltr" class="gmail_signature">S.Rahimi<br><br></div>