<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div class="">Hello,</div><div class=""><br class=""></div><div class="">I am trying to combine the possibilities in NCL to </div><div class=""><br class=""></div><div class="">1) use the a symmetric colorbar using the gsnSpreadColorStart / End resources (and res@cnLevelSelectionMode = “ManualLevels”)</div><div class=""><br class=""></div><div class="">and</div><div class=""><br class=""></div><div class="">2) forcing white for 1-2 contours in the middle for things like anomaly fields. </div><div class=""><br class=""></div><div class="">Since I need a very fine scale, and therefore a lot of contours, setting them explicitely using res@cnExplicitLevels is not very feasible for me, and I’m trying to avoid to set these levels each single time.</div><div class=""><br class=""></div><div class="">So my question is: Is there a way to use gsnSpreadColorStart and gsnSpreadColorEnd so as to have a symmetric color bar AND having 1-2 contours of white in the middle?</div><div class="">I know there are some white-in-the-middle pre-defined color maps in NCL but some of them don’t have a fine enough color scale. </div><div class=""><br class=""></div><div class="">Here’s an example of I have been trying to attempt:</div><div class=""><br class=""></div><div class=""><div class=""> res@cnLevelSelectionMode = "ManualLevels"</div><div class=""> res@cnMinLevelValF = -5</div><div class=""> res@cnMaxLevelValF = 5</div><div class=""> res@cnLevelSpacingF = 0.25</div><div class=""><br class=""></div><div class=""> res@gsnSpreadColors = True</div><div class=""> res@gsnSpreadColorStart = 2</div><div class=""> res@gsnSpreadColorEnd = 255</div><div class=""><br class=""></div><div class=""> res@cnLevelSelectionMode := "ExplicitLevels"</div><div class=""> res@cnLevels = fspan(-5, 5, 0.25)</div><div class=""> res@cnFillColors(20:22) = 1</div></div><div class=""><br class=""></div><div class=""><br class=""></div><div class="">so I tried to overwrite the SelectionMode resource to ‘Explicit’ and then picking trying to pick only the center conoturs for white.. but obviously it didn’t work in this way. </div><div class=""><br class=""></div><div class="">I remember there is some function that does exactly take care of this but I do not remember which one it was.</div><div class=""><br class=""></div><div class=""><br class=""></div><div class="">Any help is appreciated!</div><div class="">Thanks,</div><div class="">Anne</div><div class=""><br class=""></div><div class=""><br class=""></div><div class=""><br class=""></div><br class=""><div><blockquote type="cite" class=""><div class="">On 3 Jan 2019, at 18:55, Adam Phillips <<a href="mailto:asphilli@ucar.edu" class="">asphilli@ucar.edu</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" class=""><div dir="ltr" class="">Hi David,<div class="">There's a function (add_map_tickmarks2) that you can use embedded in some of the NCL examples that will add tick mark labels to rectangular projections. I took mptick example #9 here: <a href="http://www.ncl.ucar.edu/Applications/mptick.shtml#ex9" class="">http://www.ncl.ucar.edu/Applications/mptick.shtml#ex9</a></div><div class="">and modified it to (mostly) match your projection. The script can be run on its' own and runs quickly, making trial and error less painful. I have attached the modified script and the resulting graphic. </div><div class="">Hope that helps!</div><div class="">Adam</div></div></div><br class=""><div class="gmail_quote"><div dir="ltr" class="">On Wed, Jan 2, 2019 at 3:08 PM David Hebert, Code 7322 <<a href="mailto:david.hebert@nrlssc.navy.mil" class="">david.hebert@nrlssc.navy.mil</a>> wrote:<br class=""></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div lang="EN-US" class=""><div class="gmail-m_-4169463851194194246WordSection1"><p class="MsoNormal"><span style="font-family:"Courier New"" class="">I am attempting to make a regional plot using stereographic projection, and limit the projection using ‘corners’. I am getting only longitude labels along the bottom and left plot boundary. See attached plot. <u class=""></u><u class=""></u></span></p><p class="MsoNormal"><span style="font-family:"Courier New"" class=""><u class=""></u> <u class=""></u></span></p><p class="MsoNormal"><span style="font-family:"Courier New"" class="">The relevant settings I am using in my script are:<u class=""></u><u class=""></u></span></p><p class="MsoNormal"><span style="font-family:"Courier New"" class=""><u class=""></u> <u class=""></u></span></p><p class="MsoNormal"><span style="font-family:"Courier New"" class=""> res@mpProjection = "Stereographic"<u class=""></u><u class=""></u></span></p><p class="MsoNormal"><span style="font-family:"Courier New"" class=""> res@gsnAddCyclic = False<u class=""></u><u class=""></u></span></p><p class="MsoNormal"><span style="font-family:"Courier New"" class=""> res@mpGridAndLimbOn = True ; turn on lat/lon lines<u class=""></u><u class=""></u></span></p><p class="MsoNormal"><span style="font-family:"Courier New"" class=""> res@mpPerimOn = False ; turn off box around plot<u class=""></u><u class=""></u></span></p><p class="MsoNormal"><span style="font-family:"Courier New"" class=""> res@pmTickMarkDisplayMode = "Always" ; turn on ticks<u class=""></u><u class=""></u></span></p><p class="MsoNormal"><span style="font-family:"Courier New"" class=""><u class=""></u> <u class=""></u></span></p><p class="MsoNormal"><span style="font-family:"Courier New"" class=""> res@tmYROn = False<u class=""></u><u class=""></u></span></p><p class="MsoNormal"><span style="font-family:"Courier New"" class=""> res@tmXTOn = False<u class=""></u><u class=""></u></span></p><p class="MsoNormal"><span style="font-family:"Courier New"" class=""><u class=""></u> <u class=""></u></span></p><p class="MsoNormal"><span style="font-family:"Courier New"" class=""> res@mpGridLonSpacingF = 15.<u class=""></u><u class=""></u></span></p><p class="MsoNormal"><span style="font-family:"Courier New"" class=""> res@mpGridLatSpacingF = 2.<u class=""></u><u class=""></u></span></p><p class="MsoNormal"><span style="font-family:"Courier New"" class=""><u class=""></u> <u class=""></u></span></p><p class="MsoNormal"><span style="font-family:"Courier New"" class=""> ; set map limits based on tlat,tlon<u class=""></u><u class=""></u></span></p><p class="MsoNormal"><span style="font-family:"Courier New"" class=""> res@mpLimitMode = "Corners"<u class=""></u><u class=""></u></span></p><p class="MsoNormal"><span style="font-family:"Courier New"" class=""> res@mpLeftCornerLatF = tlat(0,0)<u class=""></u><u class=""></u></span></p><p class="MsoNormal"><span style="font-family:"Courier New"" class=""> res@mpLeftCornerLonF = tlon(0,0)<u class=""></u><u class=""></u></span></p><p class="MsoNormal"><span style="font-family:"Courier New"" class=""> res@mpRightCornerLatF = tlat(nj2-1,ni2-1)<u class=""></u><u class=""></u></span></p><p class="MsoNormal"><span style="font-family:"Courier New"" class=""> res@mpRightCornerLonF = tlon(nj2-1,ni2-1)<u class=""></u><u class=""></u></span></p><p class="MsoNormal"><span style="font-family:"Courier New"" class=""> res@mpRelativeCenterLon = True ; set a center lon<u class=""></u><u class=""></u></span></p><p class="MsoNormal"><span style="font-family:"Courier New"" class=""> res@mpCenterLonF = 180.0<u class=""></u><u class=""></u></span></p><p class="MsoNormal"><span style="font-family:"Courier New"" class=""> res@mpRelativeCenterLat = True ; set a center lat<u class=""></u><u class=""></u></span></p><p class="MsoNormal"><span style="font-family:"Courier New"" class=""> res@mpCenterLatF = -90.0 ; center lat<u class=""></u><u class=""></u></span></p><p class="MsoNormal"><span style="font-family:"Courier New"" class=""><u class=""></u> <u class=""></u></span></p><p class="MsoNormal"><span style="font-family:"Courier New"" class="">Any suggestions on how to get the latitude labels on the left axis? Thank you for your help!<u class=""></u><u class=""></u></span></p><p class="MsoNormal"><span style="font-family:"Courier New"" class=""><u class=""></u> <u class=""></u></span></p><p class="MsoNormal"><span style="font-family:"Courier New"" class=""><u class=""></u> <u class=""></u></span></p><p class="MsoNormal"><b class=""><span style="font-family:"Courier New";color:rgb(31,73,125)" class="">David A. Hebert<u class=""></u><u class=""></u></span></b></p><p class="MsoNormal"><span style="font-family: 'Courier New';" class="">Oceanography Division, </span><span style="font-family: 'Courier New';" class="">Code 7322 <br class="">Naval Research Laboratory <br class="">Stennis Space Center, MS 39529<br class="">(228)688-5846; DSN 828-5846 <br class=""></span><span style="font-family:"Courier New"" class=""><a href="http://www.nrl.navy.mil/" target="_blank" class=""><span style="color:blue" class="">http://www.nrl.navy.mil</span></a><u class=""></u><u class=""></u></span></p><p class="MsoNormal"><span style="font-family:"Courier New"" class=""><u class=""></u> <u class=""></u></span></p></div></div>_______________________________________________<br class="">
ncl-talk mailing list<br class="">
<a href="mailto:ncl-talk@ucar.edu" target="_blank" class="">ncl-talk@ucar.edu</a><br class="">
List instructions, subscriber options, unsubscribe:<br class="">
<a href="http://mailman.ucar.edu/mailman/listinfo/ncl-talk" rel="noreferrer" target="_blank" class="">http://mailman.ucar.edu/mailman/listinfo/ncl-talk</a><br class="">
</blockquote></div><br clear="all" class=""><div class=""><br class=""></div>-- <br class=""><div dir="ltr" class="gmail_signature"><div dir="ltr" class=""><div class=""><div dir="ltr" class=""><div class=""><div dir="ltr" class=""><div class=""><div dir="ltr" class=""><div class=""><div class=""><div class=""><span class=""><font color="#888888" class="">Adam Phillips <br class=""></font></span></div><span class=""><font color="#888888" class="">Associate Scientist, </font></span><span class=""><font color="#888888" class="">Climate and Global Dynamics Laboratory, NCAR<br class=""></font></span></div></div><div class=""><span class=""><font color="#888888" class=""><a href="http://www.cgd.ucar.edu/staff/asphilli/" target="_blank" class="">www.cgd.ucar.edu/staff/asphilli/</a> </font></span><span class=""><font color="#888888" class="">303-497-1726 </font></span></div><span class=""><font color="#888888" class=""></font></span><div class=""><div class=""><span class=""><font color="#888888" class=""><br class=""></font></span><div class=""><span class=""><font color="#888888" class=""><a href="http://www.cgd.ucar.edu/staff/asphilli" target="_blank" class=""></a></font></span></div></div></div></div></div></div></div></div></div></div></div>
<span id="cid:f_jqgwuoom0"><tickmarks.ncl></span><span id="cid:f_jqgwuop21"><mptick.png></span>_______________________________________________<br class="">ncl-talk mailing list<br class=""><a href="mailto:ncl-talk@ucar.edu" class="">ncl-talk@ucar.edu</a><br class="">List instructions, subscriber options, unsubscribe:<br class="">http://mailman.ucar.edu/mailman/listinfo/ncl-talk<br class=""></div></blockquote></div><br class=""></body></html>
<br>
<div><font style="font-family:Arial,Helvetica,sans-serif" size="2">Nota automatica aggiunta dal sistema di posta.</font></div><div><img src="https://www.unive.it/media/banner_150.jpg"></div>