<div dir="ltr">Output of wrf_nogsn_4.ncl is attached, no map overlay.<br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, Aug 26, 2021 at 9:55 AM Zilore Mumba <<a href="mailto:zmumba@gmail.com">zmumba@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>I have a basic problem that the scripts in wrf_gsn and wrf_nogsn do not overlay maps. I paste below the script for wrf_nogsn_4.ncl. I have tried to put some resources like res@cnFillDrawOrder = "PreDraw" and other related resources (commented out in the attached text). These have no effect.</div><div>I wonder if the map overlay works in these scripts.</div><div>Thanks.<br></div><div>;----------------------------------------------------------------------</div>; wrf_nogsn_4.ncl<br>;----------------------------------------------------------------------<br><br>begin<br>;---Open WRF output file<br>  filename = "/home/zmumba/DA/OUTPUT/2021081900/noda/wrfout_d01_2021-08-19_00:00:00"<br>  a        = addfile(filename +".nc","r")<br><br>;---Read temperature at first time step<br>  tc = wrf_user_getvar(a,"tc",0)<br><br>  lat2d = wrf_user_getvar(a,"XLAT",0)   ; latitude<br>  lon2d = wrf_user_getvar(a,"XLONG",0)  ; longitude<br><br>  wks = gsn_open_wks("x11","wrf_nogsn")<br><br>  pltres = True<br>  mpres  = True<br><br> ;---Set special resource to indicate we are using XLAT/XLONG coordinates.<br>  ;pltres@LatLonOverlay = True<br><br> ;---Resources for filled contour plot<br>  res                   = True<br><br>  res@gsnMaximize     = True<br>  res@cnFillOn        = True<br>  res@cnLinesOn       = False<br>  ;res@tfDoNDCOverlay  = True          ; This is necessary if you don't set sfXArray/sfYArray<br>  ;res@cnFillDrawOrder = "PreDraw"<br>  ;res@cnLineDrawOrder = "PreDraw"<br>  ;res@gsnDraw         = False         ; don't draw yet<br>  ;res@gsnFrame        = False         ; don't advance yet<br><br>  res@cnFillOn          = True  <br>  res@ContourParameters = 2.      ; Change the spacing<br><br> ;---Zoom in on map and plot again<br>  res@cnLineThicknessF = 2            ; make lines thicker, Default: 1<br>  res@mpMinLatF      = -18.   ; zoom in on lat/lon area<br>  res@mpMaxLatF      =  -8.<br>  res@mpMinLonF      =  21.<br>  res@mpMaxLonF      =  34.<br><br>  nl   = 0    ; bottomost level<br>  contour = wrf_contour(a,wks,tc(nl,:,:),res)<br><br> ;---Overlay plot on map and draw.<br>  ;plot = wrf_map_overlays(a,wks,contour,True,True)<br>  plot = wrf_map_overlays(a,wks,(/contour/),pltres,mpres)<br><br> ;Define shapefiles<br> ;*****************<br>  shp_filename = ("/home/zmumba/DA/TMINTMAX2/Shapefiles/Zambia/ZMB_ADM1.shp")<br><br> ;Set shapefile resources<br> ;***********************<br>  shpres                    =  True<br>  shpres@gsLineThicknessF   =  1             ; increase line thickness<br>  shpres@gsLineColor        =  "Black"       ; line colorgsLineThicknessF<br>  shpres@gsLineDashPattern  =  1<br><br>  shp= gsn_add_shapefile_polylines(wks,plot,shp_filename,shpres)<br><br>  ;draw(plot)<br>  ;frame(wks)<br><br>end</div>
</blockquote></div>