<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=""><br class=""></div><div class="">Not sure where you’re getting those error messages from but there are many problems in the script. &nbsp;Here are the errors I got on running your code on my own file and the step by step to fix them. &nbsp;Make the below edits. If there are still problems send the whole new script to the list so we can see your edits.&nbsp;</div><div class=""><br class=""></div><div class=""><br class=""></div><div class=""><div class=""></div><blockquote type="cite" class=""><div class="">warning:attsetvalues: the value associated with (tiMainString) does not have an HLU representation</div><div class="">warning:csnLinesOn is not a valid resource in gsnapp_contour at this time</div><div class="">(0)<span class="Apple-tab-span" style="white-space:pre">        </span>gsn_csm_map_ce: Fatal: The resources mpMinLatF/mpLeftCornerLatF must be less than the resources mpMaxLatF/mpRightCornerF.</div><div class="">(0)<span class="Apple-tab-span" style="white-space:pre">        </span>Execution halted.</div></blockquote></div><div class=""><br class=""></div><div class="">;====</div><div class="">1.</div><div class="">so the top error:</div><div class=""><blockquote type="cite" class="">"warning:attsetvalues: the value associated with (tiMainString) does not have an HLU representation"</blockquote></div><div class=""><br class=""></div><div class="">Some thing is wrong with tiMainString. &nbsp;" &nbsp;res1@tiMainString&nbsp; = a “ &nbsp;a is a pointer to a file. NCL has no idea how to turn that into a string.&nbsp;</div><div class="">If you upgrade to 6.3.0 you could do the following.</div><div class="">res1@tiMainString&nbsp; = getfilepath(a) &nbsp;;; needs 6.3.0!!!</div><div class="">or&nbsp;</div><div class="">res1@tiMainString = “Some string value for a title"</div><div class=""><br class=""></div><div class=""><br class=""></div><div class="">;====</div><div class="">2.</div><div class=""><blockquote type="cite" class="">warning:csnLinesOn is not a valid resource in gsnapp_contour at this time</blockquote></div><div class="">Self explanatory, csnLineOn isn’t a resource. This is a typo. Find that resource and fix it.&nbsp;</div><div class=""><br class=""></div><div class=""><br class=""></div><div class="">;====</div><div class="">3.</div><div class=""><div class=""></div><blockquote type="cite" class=""><div class="">(0)<span class="Apple-tab-span" style="white-space: pre;">        </span>gsn_csm_map_ce: Fatal: The resources mpMinLatF/mpLeftCornerLatF must be less than the resources mpMaxLatF/mpRightCornerF.</div><div class="">(0)<span class="Apple-tab-span" style="white-space: pre;">        </span>Execution halted.</div></blockquote></div><div class="">Again, does what it says on the tin. minLat must be less than maxLat. Yours are not. Switch your min/max lat resources and you’ll be set.&nbsp;</div><div class=""><br class=""></div><div class=""><br class=""></div><div class="">;====</div><div class="">4.</div><div class="">Once those are fixed, you’ll get the following error.</div><div class=""><div class=""></div><blockquote type="cite" class=""><div class="">(0)<span class="Apple-tab-span" style="white-space:pre">        </span>wrf_map_overlay: Warning: This procedure is obsolete. Consider</div><div class="">(0)<span class="Apple-tab-span" style="white-space:pre">        </span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;using wrf_map_overlays instead.</div><div class="">fatal:NhlAddOverlay: plot class mapPlotClass cannot be overlay plot member</div><div class="">warning:NhlRemoveOverlay: plot not found in overlay sequence</div></blockquote></div><div class=""><br class=""></div><div class="">You can’t overlay 2 maps on top of each other. &nbsp;wrf_map() and gsn_csm_contour_map() &nbsp;so just remove the _map part and make a plain contour plot.&nbsp;</div><div class=""><br class=""></div><div class=""><br class=""></div><div class="">;====</div><div class="">5.</div><div class="">Lastly, you want to transfer the mp resources to a new variable and pass that to wrf_map() instead of True.&nbsp;</div><div class="">and change the order in the overlay function … map, (/contour, vector/)...</div><div class=""><br class=""></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 13 Mar 2016, at 18:12, Kerwyn Texeira &lt;<a href="mailto:ktish86@gmail.com" class="">ktish86@gmail.com</a>&gt; wrote:</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" class=""><div class="">Hi All,<br class=""><br class="">For a month now I have been having trouble overlay windbards on zoomed terrain with specified lat and lon in ncl.<span class=""> I do not want the entire domain plotted with winds.&nbsp; If so, I would have used the multiOverlay.ncl script which works perfectly for many overlay for the entire domain.&nbsp; No images are being plotted with the script below. I'm not getting any fatal errors. I'm using NCL version 6.2.1. &nbsp; All I'm getting is the following; warning:wkImageFileName is not a resource in the given object<br class="">warning:wkImageFormat is not a resource in the given object.<br class=""><br class="">&nbsp;</span>I would like some help with this script please.<span class="">&nbsp; </span>I looked online for a script to help with this (overlay on zoomed in terrain with specified lat and lon) but I’m having trouble finding it.<span class="">&nbsp;
</span><span class="">
</span>Any advice will be greatly appreciated. Thanks, Kerwyn<br class=""><br class=""></div>Script:<br class=""><br class="">;*************************************************<br class="">; overlay_1.ncl<br class="">;<br class="">; Concepts illustrated:<br class="">;&nbsp;&nbsp; - Overlaying line contours on filled contours<br class="">;&nbsp;&nbsp; - Explicitly setting contour levels<br class="">;&nbsp;&nbsp; - Selecting a different color map<br class="">;<br class="">;*************************************************<br class="">;<br class="">; These files are loaded by default in NCL V6.2.0 and newer<br class="">&nbsp;load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl"<br class="">&nbsp;load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_csm.ncl"<br class="">&nbsp;load "$NCARG_ROOT/lib/ncarg/nclscripts/wrf/WRFUserARW.ncl"<br class=""><br class="">begin<br class="">&nbsp; a = addfile("./wrfout_d03_2014-01-11_21:00:<a href="http://00.nc/" target="_blank" class="">00.nc</a>","r")<br class="">&nbsp; <br class="">&nbsp; it = 0<br class="">&nbsp; hgt = wrf_user_getvar(a, "HGT", it)<br class="">&nbsp; hgt@lat2d = wrf_user_getvar(a, "XLAT", it)<br class="">&nbsp; hgt@lon2d = wrf_user_getvar(a, "XLONG", it)<br class="">&nbsp; u&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; = wrf_user_getvar(a, "ua", it)<br class="">&nbsp; v&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; = wrf_user_getvar(a, "va", it)<br class="">&nbsp; p&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; = wrf_user_getvar(a, "pressure", it)<br class=""><br class="">&nbsp; u_wind&nbsp;&nbsp;&nbsp; = wrf_user_intrp3d(u, p, "h", 650., 0.0, False)<br class="">&nbsp; v_wind&nbsp;&nbsp;&nbsp; = wrf_user_intrp3d(v, p, "h", 650., 0.0, False)<br class="">&nbsp; <br class=""><br class="">;&nbsp; spd&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; = (u_wind*u_wind + v_wind*v_wind)^(0.5)&nbsp; ;m/s<br class="">;&nbsp; spd@units = "Wind Speed"<br class="">;&nbsp; spd@units = "m/s"<br class=""><br class=""><br class="">&nbsp; wks = gsn_open_wks("png","test")&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ; send graphics to PNG file<br class="">&nbsp; gsn_define_colormap(wks,"BlAqGrYeOrRe")<br class="">&nbsp;<br class="">&nbsp;<br class="">&nbsp; res1 = True<br class="">&nbsp; res1@mpFillOn&nbsp;&nbsp;&nbsp;&nbsp; = False<br class="">&nbsp; res1@mpMaxLatF&nbsp;&nbsp;&nbsp; = 37.75&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ; specify the plot domain<br class="">&nbsp; res1@mpMinLatF&nbsp;&nbsp;&nbsp; = 38.20&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br class="">&nbsp; res1@mpMinLonF&nbsp;&nbsp;&nbsp; = -120.00&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ;<br class="">&nbsp; res1@mpMaxLonF&nbsp;&nbsp;&nbsp; = -119.10&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ;<br class="">&nbsp; res1@mpOutlineOn&nbsp; = True&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ; turn the map outline on<br class="">&nbsp; res1@gsnDraw&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =&nbsp; False&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ; do not draw the plot<br class="">&nbsp; res1@gsnFrame&nbsp;&nbsp;&nbsp;&nbsp; =&nbsp; False&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ; do not advance the frame<br class="">&nbsp; res1@csnLinesOn&nbsp;&nbsp; =&nbsp; True<br class="">&nbsp; res1@tiMainString&nbsp; = a<br class=""><br class="">&nbsp; res1@mpProjection&nbsp; = "CylindricalEquidistant"&nbsp;&nbsp;&nbsp; ;The default<br class="">&nbsp; res1@pmTickMarkDisplayMode&nbsp; = "Always"<br class="">&nbsp; res1@mpDataBaseVersion&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; = "MediumRes"<br class="">&nbsp; res1@mpOutlineOn&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =True<br class="">&nbsp; res1@lbOrientation&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; = "Vertical"<br class="">&nbsp; res1@tiMainOffsetYF&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; = -0.03<br class="">&nbsp; res1@mpShapeMode&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; = "FreeAspect"<br class="">&nbsp; res1@vpWidthF&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; = 0.9<br class="">&nbsp; res1@vpHeightF&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; = 0.9<br class=""><br class="">;&nbsp; res@cnLevelSelectionMode = "ExplicitLevels" ; use explicit levels<br class="">;&nbsp; res@cnLevels&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; = ispan(215,265,5) ; set the contour levels<br class="">&nbsp; res1@cnLineLabelsOn&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; = False&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ; do not use line labels<br class="">&nbsp; res1@cnFillOn&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; = True&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ; color fill<br class="">&nbsp; res1@cnLinesOn&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; = False&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ; do not draw contour lines<br class="">;&nbsp; res@cnFillPalette&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; = "BlueDarkRed18"<br class=""><br class="">&nbsp; res1@gsnAddCyclic&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; = False<br class=""><br class="">&nbsp; map = wrf_map(wks, a, True)<br class=""><br class="">&nbsp; contour = gsn_csm_contour_map(wks,hgt,res1) <br class="">&nbsp;<br class="">&nbsp;;------wind vectors<br class="">&nbsp;res2 = True<br class="">&nbsp;res2@FieldTitle = "Winds"<br class="">&nbsp;res2@NumVectors = 47<br class="">&nbsp;res2@vcWindBarbLineThicknessF= 2.5<br class="">&nbsp;vector = wrf_vector(a, wks, u_wind, v_wind, res2)<br class=""><br class="">&nbsp;wrf_map_overlay(wks,map,(/vector, contour/),True)<br class="">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br class="">end<br class=""></div>
_______________________________________________<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>