<div dir="ltr"><div class="gmail_default" style="font-family:verdana,sans-serif;color:rgb(69,129,142)">Hi</div><div class="gmail_default" style="font-family:verdana,sans-serif;color:rgb(69,129,142)"><br></div><div class="gmail_default" style="font-family:verdana,sans-serif;color:rgb(69,129,142)">I am able to successfully superpose shapefile over my plots in NCL, however when I make a panel plot (in this case two panels in one figure), I am confused about how to include the shapefile individually over each panel. I am pasting my script below: it works fine when I comment out the shapefile procedures. Could you please help me with the correct arrangement and sequence of the statements?</div><div class="gmail_default" style="font-family:verdana,sans-serif;color:rgb(69,129,142)"><br></div><div class="gmail_default" style><div class="gmail_default" style><font face="comic sans ms, sans-serif" color="#000000">; Example script to produce plots for a WRF real-data run,</font></div><div class="gmail_default" style><font face="comic sans ms, sans-serif" color="#000000">; with the ARW coordinate dynamics option.</font></div><div class="gmail_default" style><font face="comic sans ms, sans-serif" color="#000000"><br></font></div><div class="gmail_default" style><font face="comic sans ms, sans-serif" color="#000000">load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl"</font></div><div class="gmail_default" style><font face="comic sans ms, sans-serif" color="#000000">load "$NCARG_ROOT/lib/ncarg/nclscripts/wrf/WRFUserARW.ncl"</font></div><div class="gmail_default" style><font face="comic sans ms, sans-serif" color="#000000">;load "./WRFUserARW.ncl"</font></div><div class="gmail_default" style><font face="comic sans ms, sans-serif" color="#000000"><br></font></div><div class="gmail_default" style><font face="comic sans ms, sans-serif" color="#000000">begin</font></div><div class="gmail_default" style><font face="comic sans ms, sans-serif" color="#000000">;</font></div><div class="gmail_default" style><font face="comic sans ms, sans-serif" color="#000000">; The WRF ARW input file. </font></div><div class="gmail_default" style><font face="comic sans ms, sans-serif" color="#000000">; This needs to have a ".nc" appended, so just do it.</font></div><div class="gmail_default" style><font face="comic sans ms, sans-serif" color="#000000"> a = addfile("../<a href="http://wrfout_d01.nc">wrfout_d01.nc</a>","r")</font></div><div class="gmail_default" style><font face="comic sans ms, sans-serif" color="#000000"><br></font></div><div class="gmail_default" style><font face="comic sans ms, sans-serif" color="#000000">; We generate plots, but what kind do we prefer?</font></div><div class="gmail_default" style><font face="comic sans ms, sans-serif" color="#000000"> type = "x11"</font></div><div class="gmail_default" style><font face="comic sans ms, sans-serif" color="#000000">; type = "eps"</font></div><div class="gmail_default" style><font face="comic sans ms, sans-serif" color="#000000">; type = "ps"</font></div><div class="gmail_default" style><font face="comic sans ms, sans-serif" color="#000000">; type = "ncgm"</font></div><div class="gmail_default" style><font face="comic sans ms, sans-serif" color="#000000"> wks = gsn_open_wks(type,"panelplot_shapefile")</font></div><div class="gmail_default" style><font face="comic sans ms, sans-serif" color="#000000"><br></font></div><div class="gmail_default" style><font face="comic sans ms, sans-serif" color="#000000">; Set some basic resources</font></div><div class="gmail_default" style><font face="comic sans ms, sans-serif" color="#000000"> res = True</font></div><div class="gmail_default" style><font face="comic sans ms, sans-serif" color="#000000"> </font><span style="color:rgb(0,0,0);font-family:'comic sans ms',sans-serif"> pltres = True</span></div><div class="gmail_default" style><font face="comic sans ms, sans-serif" color="#000000"> mpres = True</font></div><div class="gmail_default" style><font face="comic sans ms, sans-serif" color="#000000"> res@cnFillOn = True ; Create a color fill plot</font></div><div class="gmail_default" style><font face="comic sans ms, sans-serif" color="#000000"><br></font></div><div class="gmail_default" style><font face="comic sans ms, sans-serif" color="#000000">; Plotting options </font></div><div class="gmail_default" style><font face="comic sans ms, sans-serif" color="#000000"> mpres = True ; Set map options</font></div><div class="gmail_default" style><font face="comic sans ms, sans-serif" color="#000000"> mpres@mpOutlineOn = False ; Turn off map outlines</font></div><div class="gmail_default" style><font face="comic sans ms, sans-serif" color="#000000"> mpres@mpFillOn = False ; Turn off map fill</font></div><div class="gmail_default" style><font face="comic sans ms, sans-serif" color="#000000"> pltres@PanelPlot = True ; Tells wrf_map_overlays not to remove overlays</font></div><div class="gmail_default" style><font face="comic sans ms, sans-serif" color="#000000"> opts = res </font></div><div class="gmail_default" style><font face="comic sans ms, sans-serif" color="#000000"> </font><span style="color:rgb(0,0,0);font-family:'comic sans ms',sans-serif">opts@gsnSpreadColorEnd = -3 ; End third from the last color in color map</span></div><div class="gmail_default" style><font face="comic sans ms, sans-serif" color="#000000"> </font></div><div class="gmail_default" style><font face="comic sans ms, sans-serif" color="#000000">; What times and how many time steps are in the data set?</font></div><div class="gmail_default" style><font face="comic sans ms, sans-serif" color="#000000"> times = wrf_user_getvar(a,"times",-1) ; get all times in the file</font></div><div class="gmail_default" style><font face="comic sans ms, sans-serif" color="#000000"> ntimes = dimsizes(times) ; number of times in the file</font></div><div class="gmail_default" style><font face="comic sans ms, sans-serif" color="#000000"> print (ntimes)</font></div><div class="gmail_default" style><font face="comic sans ms, sans-serif" color="#000000"> plot = new (2, graphic)</font></div><div class="gmail_default" style><font face="comic sans ms, sans-serif" color="#000000"> do it = 12,ntimes-1,1 ; TIME LOOP</font></div><div class="gmail_default" style><font face="comic sans ms, sans-serif" color="#000000"> print("Working on time: " + times(it) )</font></div><div class="gmail_default" style><font face="comic sans ms, sans-serif" color="#000000"> res@TimeLabel = times(it) ; Set Valid time to use on plots</font></div><div class="gmail_default" style><font face="comic sans ms, sans-serif" color="#000000"> oh =a->ho(it,0,:,:)</font></div><div class="gmail_default" style><font face="comic sans ms, sans-serif" color="#000000"> rh = wrf_user_getvar(a,"rh2",it) ; Relative humidity</font></div><div class="gmail_default" style><font face="comic sans ms, sans-serif" color="#000000"> contour_oh = wrf_contour(a,wks,oh,opts)</font></div><div class="gmail_default" style><font face="comic sans ms, sans-serif" color="#000000"> contour_rh = wrf_contour(a,wks,rh,opts)</font></div><div class="gmail_default" style><font face="comic sans ms, sans-serif" color="#000000"> plot(0) = wrf_map_overlays(a,wks,(/contour_oh/),pltres,mpres)</font></div><div class="gmail_default" style><font face="comic sans ms, sans-serif" color="#000000"> plot(1) = wrf_map_overlays(a,wks,(/contour_rh/),pltres,mpres)</font></div><div class="gmail_default" style><font face="comic sans ms, sans-serif" color="#000000"> </font></div><div class="gmail_default" style><font face="comic sans ms, sans-serif" color="#ff0000"> ;india_shp_name = "../India-shapefilefull/India_Country.shp"</font></div><div class="gmail_default" style><font face="comic sans ms, sans-serif" color="#ff0000"> ;lnres = True</font></div><div class="gmail_default" style><font face="comic sans ms, sans-serif" color="#ff0000"> ;lnres@gsLineColor = "black"</font></div><div class="gmail_default" style><font face="comic sans ms, sans-serif" color="#ff0000"> ;lnres@gsLineThicknessF = 1.5 </font></div><div class="gmail_default" style><font face="comic sans ms, sans-serif" color="#ff0000"> ;india_id = gsn_add_shapefile_polylines(wks,plot(0),india_shp_name,lnres)</font></div><div class="gmail_default" style><font face="comic sans ms, sans-serif" color="#ff0000"> ;india_id = gsn_add_shapefile_polylines(wks,plot(1),india_shp_name,lnres)</font></div><div class="gmail_default" style><font face="comic sans ms, sans-serif" color="#ff0000"> ;draw(plot(0)) ; This will draw the map and the shapefile outlines.</font></div><div class="gmail_default" style><font face="comic sans ms, sans-serif" color="#ff0000"> ;draw(plot(1)) ; This will draw the map and the shapefile outlines.</font></div><div class="gmail_default" style><font face="comic sans ms, sans-serif" color="#ff0000"> ;frame(wks) ; Advance the frame</font></div><div class="gmail_default" style><font face="comic sans ms, sans-serif" color="#ff0000"> </font></div><div class="gmail_default" style><font face="comic sans ms, sans-serif" color="#000000"> pnlres = True</font></div><div class="gmail_default" style><font face="comic sans ms, sans-serif" color="#000000"> gsn_panel(wks,(/plot/),(/1,2/),pnlres)</font></div><div class="gmail_default" style><font face="comic sans ms, sans-serif" color="#000000"><br></font></div><div class="gmail_default" style><font face="comic sans ms, sans-serif" color="#000000"> </font></div><div class="gmail_default" style><font face="comic sans ms, sans-serif" color="#000000"> end do ; END OF TIME LOOP</font></div><div class="gmail_default" style><font face="comic sans ms, sans-serif" color="#000000"> </font></div><div class="gmail_default" style><font face="comic sans ms, sans-serif" color="#000000">;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;</font></div><div class="gmail_default" style><font face="comic sans ms, sans-serif" color="#000000"><br></font></div><div class="gmail_default" style><font face="comic sans ms, sans-serif" color="#000000">end</font></div><div style="color:rgb(69,129,142);font-family:verdana,sans-serif"><br></div><div style="color:rgb(69,129,142);font-family:verdana,sans-serif">I need help with the statements shown in red color above.</div><div style="color:rgb(69,129,142);font-family:verdana,sans-serif"><br></div><div style="color:rgb(69,129,142);font-family:verdana,sans-serif">Thanks in advance!</div><div style="color:rgb(69,129,142);font-family:verdana,sans-serif"><br></div><div style="color:rgb(69,129,142);font-family:verdana,sans-serif">Tabish</div><div style="color:rgb(69,129,142);font-family:verdana,sans-serif">--------------------------------------------------------------------------------------</div></div><div><div class="gmail_signature"><div dir="ltr"><font face="trebuchet ms, sans-serif" color="#3d85c6">Tabish U Ansari</font><div><font face="trebuchet ms, sans-serif" color="#3d85c6">MS Research Scholar<br>Environmental & Water Resources Engineering Division</font></div><div><font face="trebuchet ms, sans-serif" color="#3d85c6">Department of Civil Engineering</font></div><div><font face="trebuchet ms, sans-serif" color="#3d85c6">IIT Madras</font></div></div></div></div>
</div>