<div dir="ltr">Hi Anne,<div>Without being able to run your script from here, my best guess on your issue is that you are overlaying a color-filled contour field on a 2nd color-filled contour field. I would try setting the opacity of the your chla_plot to be semi-transparent. Add this line to your res2 resource list.</div><div><div>res2@cnFillOpacityF = 0.5<br></div><div><br></div></div><div>The resulting plot should show both your chla and buff plots. More information about the various opacity resources can be found here:</div><div><a href="http://www.ncl.ucar.edu/Applications/rgbacolor.shtml">http://www.ncl.ucar.edu/Applications/rgbacolor.shtml</a><br></div><div><br></div><div>Other minor things that I see:</div><div>- You do not need to set sfXArray or sfYArray as your chla and buff arrays have attached latitude/longitude coordinate variables. You also do not need to set those resources in your mpres resource list as they are not needed when using gsn_csm_map.</div><div>- I do not think you need to set res@cnFillDrawOrder.</div><div>- You create a mpres resource list, and then create a res and a res2 resource list from mpres, and that carries your map resource settings through to res and res2. I think simply deleting this line: res = mpres will get rid of many (if not all) of your error messages. </div><div><br></div><div>If that above does not solve your plotting issue please respond to the ncl-talk email list.</div><div>Adam</div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, May 29, 2017 at 3:47 AM, Anne <span dir="ltr"><<a href="mailto:anne.seidenglanz@unive.it" target="_blank">anne.seidenglanz@unive.it</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hi everybody,<div><br></div><div>I have a problem overlay-ing two contour fields on a map plot (see script attached). The final purpose is to mask out a specified area on a global triangular grid (simply consisting of ones and zeros), and to create a buffer zone around the area for physical reasons. Creating the mask itself is no problem, but when I want to overlay the layers for creating the buffer zone (for which each layer is just slightly bigger than the following one), NCL just plots me the last overlaid field. So when I do (here an example of 2 contour fields on top of each other):</div><div><br></div><div><div> map_plot = gsn_csm_map(wks, mpres)<br></div><div> chla_plot = gsn_csm_contour(wks, chla, res2)</div><div> buff_plot = gsn_csm_contour(wks, buff, res)</div></div><div><br></div><div> overlay(map_plot, buff_plot)<br></div><div><div> overlay(map_plot, chla_plot)</div></div><div><br></div><div>then only 'chla_plot' is successfully overlaid on the map plot, but not 'buff_plot' (which is bigger in spatial extent than 'chla'). There are some error messages regarding resources that cannot be used but because I can successfully plot each field on top of the map plot separately (apart from the red line when plotting 'buff'), I assume they are not important. </div><div><br></div><div>A few things to note:</div><div>0) Both chla and buff have associated coordinate arrays. </div><div>1) gsn_csm_contour_map_overlay did not work either, it plots only 'chla' and some strange contour labels for 'buff', but distorted.</div><div>2) switching off the satellite projection did not make any difference</div><div>3) I can plot each field ('chla' and 'buff') separately overlaid on the map successfully </div><div>4) I have also tried to use gsn_csm_contour_map but because I can use this only as my base plot, the overlaid contours (chla and buff) look disorted using gsn_csm_contour.</div><div><br></div><div>Anybody any idea? Any help is appreciated!</div><div><br></div><div>Thanks,</div><div>Anne </div><div><br></div><div><br></div><div><br></div></div>
<br>
<div><font style="font-family:Arial,Helvetica,sans-serif" size="2">"Nota automatica aggiunta dal sistema di posta.</font></div><div><img src="http://www.unive.it/media/BannerCalce082.jpg"></div><div><span style="font-size:small">Please note that the above message is addressed only to individuals filing Italian income tax returns."</span></div><br>______________________________<wbr>_________________<br>
ncl-talk mailing list<br>
<a href="mailto:ncl-talk@ucar.edu">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/<wbr>mailman/listinfo/ncl-talk</a><br>
<br></blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature" data-smartmail="gmail_signature"><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>