<div dir="ltr"><div class="gmail_default" style="font-size:small">Hi,</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">If you continue to struggle with the shapefile_mask_data function, then it would really help if you could provide the latest version of your script, along with all the required data files. I'm the person who wrote this function, so I can help you debug the problem pretty quickly.</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">You can use our ftp site, if your data files aren't too large:</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style=""><a href="http://www.ncl.ucar.edu/report_bug.shtml#HowToFTP">http://www.ncl.ucar.edu/report_bug.shtml#HowToFTP</a><br></div><div class="gmail_default" style=""><br></div><div class="gmail_default" style="">--Mary</div><div class="gmail_default" style=""><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Aug 5, 2016 at 11:36 AM, Kim, Changhwan <span dir="ltr"><<a href="mailto:changhwan.kim@metoffice.gov.uk" target="_blank">changhwan.kim@metoffice.gov.uk</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div lang="EN-GB" link="blue" vlink="purple">
<div>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">Hi,
<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">I don’t know exactly what reason is cause that problem.
<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">I recommend to check coordinate variables of rain_tot_mask(using printVarSummary() function).<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">Maybe those are absent.<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">Or use this command before plotting script.<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"> Copy_varCoords(rain_tot_tend, rain_tot_mask)
<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"> or<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"> Copy_varMeta(rain_tot_tend, rain_tot_mask)<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">Cheers!<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"><u></u> <u></u></span></p>
<div style="border:none;border-top:solid #b5c4df 1.0pt;padding:3.0pt 0cm 0cm 0cm">
<p class="MsoNormal"><b><span lang="EN-US" style="font-size:10.0pt;font-family:"Tahoma","sans-serif"">From:</span></b><span lang="EN-US" style="font-size:10.0pt;font-family:"Tahoma","sans-serif""> <a href="mailto:ncl-talk-bounces@ucar.edu" target="_blank">ncl-talk-bounces@ucar.edu</a> [mailto:<a href="mailto:ncl-talk-bounces@ucar.edu" target="_blank">ncl-talk-bounces@ucar.<wbr>edu</a>]
<b>On Behalf Of </b>grace<br>
<b>Sent:</b> 05 August 2016 10:14<br>
<b>To:</b> ncl-talk<br>
<b>Subject:</b> [ncl-talk] data did not match with original plot after mask data with shapefile<u></u><u></u></span></p>
</div><div><div class="h5">
<p class="MsoNormal"><u></u> <u></u></p>
<div>
<p class="MsoNormal">Hi:<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"> All,I am trying to mask data with shapefile according to the example shapefiles_14_mask.ncl on the NCL website.<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal">But the masked plot did not match the original plot,Ican not figure out what's wrong with it.<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal">Left plot is the masked plot,right is the original one.<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><img width="751" height="295" src="cid:image001.jpg@01D1EF04.A60EF200"><u></u><u></u></p>
</div>
<div>
<p class="MsoNormal">This is my script:<u></u><u></u></p>
</div>
<div>
<div>
<p class="MsoNormal">; Example script to produce plots for a WRF real-data run,<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal">; with the ARW coordinate dynamics option.<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal">load "$NCARG_ROOT/lib/ncarg/<wbr>nclscripts/csm/gsn_code.ncl"<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal">load "$NCARG_ROOT/lib/ncarg/<wbr>nclscripts/wrf/WRFUserARW.ncl"<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal">load "$NCARG_ROOT/lib/ncarg/<wbr>nclscripts/csm/gsn_csm.ncl" <u></u>
<u></u></p>
</div>
<div>
<p class="MsoNormal">load"./shapefile_mask_data.<wbr>ncl"<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal">begin<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal">;<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal">; The WRF ARW input file. <u></u><u></u></p>
</div>
<div>
<p class="MsoNormal">; This needs to have a ".nc" appended, so just do it.<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"> a = addfile("/public/home/<wbr>huanglei/data/20160724/oldwrf_<wbr>cu5/wrfout_d03_2016-07-24_00:<wbr>00:00"+".nc","r")<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal">; We generate plots, but what kind do we prefer?<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"> ; type = "x11"<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"> type = "png"<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal">; type = "ps"<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal">; type = "ncgm"<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"> wks = gsn_open_wks(type,"mask_plt_<wbr>Precip_oldwrf5km_zoom_cu5_<wbr>from24")<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"> plot = new(3,graphic)<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal">; Set some basic resources<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"> res = True<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"> res@MainTitle = "REAL-TIME WRF"<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal"> mpres = True ; Map resources<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"> mpres@mpOutlineOn = False ; Turn off map outlines<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"> mpres@mpFillOn = False ; Turn off map fill<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"> mpres@mpGridAndLimbOn = True<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"> ;res@mpProjection = "Lambert"<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"> pltres = True ; Plot resources<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"> pltres@PanelPlot = True ; Tells wrf_map_overlays not to remove overlays<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal">;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;<wbr>;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;<wbr>;;;;<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal">;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;<wbr>;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;<wbr>;;;;<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal">; What times and how many time steps are in the data set?<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"> FirstTime = True<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"> times = wrf_user_getvar(a,"times",-1) ; get all times in the file<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"> ntimes = dimsizes(times) ; number of times in the file<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"> ; print(times)<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"> ; exit<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal">;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;<wbr>;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;<wbr>;;;;<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"> it_start = 10<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"> it_end = 17<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"> ; print("Working on time: " + times(it) )<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"> ; res@TimeLabel = times(it) ; Set Valid time to use on plots<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal">;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;<wbr>;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;<wbr>;;;;<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal">; First get the variables we will need <u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal"> ; Get non-convective, convective and total precipitation of 5km <u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"> rain_exp = wrf_user_getvar(a,"RAINNC",it_<wbr>end)<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"> rain_con = wrf_user_getvar(a,"RAINC",it_<wbr>end)<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"> rain_tot = rain_exp + rain_con<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"> rain_tot@description = "Total Precipitation"<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal"><span> </span>;calculate the precipitation
<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"> rain_exp_save = wrf_user_getvar(a,"RAINNC",it_<wbr>start)<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"> rain_con_save = wrf_user_getvar(a,"RAINC",it_<wbr>start)<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"> rain_tot_save = rain_exp_save + rain_con_save<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal"> times_sav = times(it_start)<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"> rain_tot_tend = rain_tot - rain_tot_save<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"> rainc_tend = rain_con - rain_con_save ; CUMULUS PRECIPITATION<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"> rainnc_tend= rain_exp - rain_exp_save ; SCALE PRECIPITATION<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal"> rain_tot_tend@description = "Precipitation of 5km(old wrf)"<u></u><u></u></p>
</div>
<div>
<div>
<p class="MsoNormal"> rain_tot_tend@lat2d = a->XLAT(1,:,:)<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"> rain_tot_tend@lon2d = a->XLONG(1,:,:)<u></u><u></u></p>
</div>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal"> rainc_tend@description = "RAINC of 5km(old wrf)"<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"> rainnc_tend@description = "RAINNC of 5km(old wrf)"<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal">;;;;;;;;;;;;;;;;mask data with shapefile;;;;;;;;;;;;;;;;;;;;;<wbr>;;;<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal">shp_filename = "/public/home/huanglei/map/<wbr>xian.shp"<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal">rain_tot_mask = shapefile_mask_data(rain_tot_<wbr>tend,shp_filename,True)<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal">;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;<wbr>;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;<wbr>;;;;<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal"> ; Plotting options for Precipitation<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"> opts_r = res <u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"> opts_r@UnitLabel = "mm"<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"> opts_r@cnLevelSelectionMode = "ExplicitLevels"<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"> opts_r@cnLevels = (/ .1, .2, .4, .8, 1.6, 3.2, 6.4, \<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"> 12.8, 25.6, 51.2/)<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"> opts_r@cnFillColors = (/"White","DarkOliveGreen1", \<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"> "DarkOliveGreen3","Chartreuse"<wbr>, \<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"> "Chartreuse3","Green","<wbr>ForestGreen", \<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"> "Yellow","Orange","Red","<wbr>Violet"/)<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"> opts_r@cnInfoLabelOn = False<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"> opts_r@cnConstFLabelOn = False<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"> opts_r@cnFillOn = True<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"> ; opts_r@vpHeightF = 0.1<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"> ; opts_r@vpWidthF = 0.9 <u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"> opts_r@gsnDraw = False <u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"> opts_r@gsnFrame = False<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"> opts_r@lbLabelBarOn = False<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"> opts_r@Footer = False<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"> opts_r@NoHeaderFooter =True <u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"> ;;;;;;set zoom ;;;;;<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"> tes = True<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"> tes@returnInt = False<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"> loc1=wrf_user_ll_to_ij(a,107.<wbr>50,33.5,tes)<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"> print("X/Y location is: "+ loc1)<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"> <u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"> loc2=wrf_user_ll_to_ij(a,110.<wbr>0,35.2,tes)<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"> print("X/Y location is: "+ loc2)<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"> ; exit<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"> x_start = 35<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"> x_end = 81<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"> y_start = 47<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"> y_end = 84<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"> mpres1 = True<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"> mpres1@ZoomIn = True<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"> mpres1@Xstart = x_start<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"> mpres1@Ystart = y_start<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"> mpres1@Xend = x_end<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"> mpres1@Yend = y_end<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"> rain_tot_zoom = rain_tot_tend(y_start:y_end,x_<wbr>start:x_end)<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"> rainc_zoom = rainc_tend(y_start:y_end,x_<wbr>start:x_end)<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"> rainnc_zoom = rainnc_tend(y_start:y_end,x_<wbr>start:x_end)<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"> ; Precipitation Tendencies<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"> ; opts_r@SubFieldTitle = "from " + times(it_start) + " to " + times(it_end)<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"> contour_tend = wrf_contour(a,wks, rain_tot_mask,opts_r) ; total (color)<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"> contour_rainc_tend = wrf_contour(a,wks, rainc_zoom,opts_r) ; total cumulus precipitation (color)<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"> contour_rainnc_tend = wrf_contour(a,wks, rainnc_zoom,opts_r) ; total scale precipitation(color)<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal"> delete(opts_r)<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal"> ; MAKE PLOTS <u></u>
<u></u></p>
</div>
<div>
<p class="MsoNormal"> plot(0) = wrf_map_overlays(a,wks,<wbr>contour_tend,pltres,mpres1)<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"> plot(1) = wrf_map_overlays(a,wks,<wbr>contour_rainc_tend,pltres,<wbr>mpres1)
<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"> plot(2) = wrf_map_overlays(a,wks,<wbr>contour_rainnc_tend,pltres,<wbr>mpres1)<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal"> <u></u><u></u></p>
</div>
<div>
<p class="MsoNormal">;>============================<wbr>==============================<wbr>==<<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal">; add China map<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal">;>----------------------------<wbr>------------------------------<wbr>--<<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal"> <u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"> shp_name1 = "/public/home/huanglei/map/<wbr>xian.shp"<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal"> lnres = True<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"> lnres@gsLineColor = "gray25"<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"> lnres@gsLineThicknessF = 0.5 <u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"> id = new(3,graphic)<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"> id(0) = gsn_add_shapefile_polylines(<wbr>wks,plot(0),shp_name1,lnres)<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"> id(1) = gsn_add_shapefile_polylines(<wbr>wks,plot(1),shp_name1,lnres)<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"> id(2) = gsn_add_shapefile_polylines(<wbr>wks,plot(2),shp_name1,lnres)<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"> <u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal"> shp_name2 = "/public/home/huanglei/map/<wbr>shaanxi_city_l.shp"<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal"> prres=True<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"> prres@gsLineThicknessF = 1.0<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"> prres@gsLineColor = "black"<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"> id2 = new(3,graphic)<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"> id2(0) = gsn_add_shapefile_polylines(<wbr>wks,plot(0),shp_name2,prres)<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"> id2(1) = gsn_add_shapefile_polylines(<wbr>wks,plot(1),shp_name2,prres)<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"> id2(2) = gsn_add_shapefile_polylines(<wbr>wks,plot(2),shp_name2,prres)<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"> <u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal">;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;<wbr>;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;<wbr>;;;;<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal">;;;;;;;;;;;;;;;;;;creat panel;;;;;;;;;;;;;;;<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"> resP = True<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"> resP@gsnMaximize = True<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"> resP@gsnFrame =False<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"> resP@gsnPanelLabelBar = True<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"> resP@gsnPanelBottom = 0.05<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"> resP@gsnPanelTop = 0.95 ; Make sure not too close to
<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"> resP@gsnPanelBottom = 0.001 ; edge, so it maximizes better.<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"> resP@gsnPanelLabelBar = True<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"> resP@lbLabelFontHeightF = 0.006<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"> resP@gsnPanelFigureStrings= (/"Total precipitation","RAINC","<wbr>RAINNC"/) ; add strings to panel<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"> resP@amJust = "TopRight" <u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"> resP@<wbr>gsnPanelFigureStringsFontHeigh<wbr>tF = 0.005<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"> resP@lbLabelAutoStride = True<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"> resP@gsnPaperOrientation = "landscape"<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"> gsn_panel(wks,plot,(/1,3/),<wbr>resP)<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal"> ;psres = True
<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal">; maximize_output(wks,psres) ; calls draw and frame for you
<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal">; draw(plot) ; This will draw the map and the shapefile outlines.<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"> frame(wks)<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal">end<u></u><u></u></p>
</div>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal"><span style="font-family:"Verdana","sans-serif""> How can I slove the problem?</span><u></u><u></u></p>
</div>
</div></div></div>
</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></div>