<div dir="ltr"><div dir="ltr"><div>Hi,</div><div><br></div><div>Please reply to the ncl-talk -- I'm not expert with WRF and the group offers a broader body of knowledge.</div><div><br></div><div>There are these two examples:</div><div><br></div><div>    <a href="http://ncl.ucar.edu/Applications/wrfgsn.shtml#ex1">http://ncl.ucar.edu/Applications/wrfgsn.shtml#ex1</a></div><div><br></div><div>Particularly the "nogsn" example. It looks like maybe:</div><div><br></div><div>i) draw "contour"</div><div>ii) add the shapefile polylines to contour, like you have it now</div><div>iii) call wrf_map_overlay with just "contour" as the plot (not along with the shapefile lines like you had initially)</div><div>iv) the calls to draw(contour) and frame(wks) should now be unnecessary.</div><div><br></div><div>If that doesn't work, perhaps take a look at the gsn-version of plotting given in the link above.</div><div><br></div><div>Rick  </div></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, Apr 9, 2019 at 12:07 AM Ganesan M <<a href="mailto:ganeshcuraj@gmail.com">ganeshcuraj@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 dir="ltr"><div>Hello Rick,</div><div><br></div><div>Thanks for the clarification, I rearranged and tried plotting as you suggested. The problem now is that, polylines function takes only 4 arguments; here we are giving 5 arguments and the error is shown as,</div><div><br></div><div>fatal:syntax error: function gsn_add_shapefile_polylines expects 4 arguments, got 5<br>fatal:error at line 55 in file WRF_shp_overlay.ncl<br><br>fatal:syntax error: function gsn_add_shapefile_polylines expects 4 arguments, got 5<br>fatal:error at line 56 in file WRF_shp_overlay.ncl<br><br>fatal:Syntax Error in block, block not executed<br>fatal:error at line 61 in file WRF_shp_overlay.ncl</div><div><br></div><div>Now I tried removing an argument like lnres and plotted, it is overlaying the plot but not in an expected way, I have attached output file below for your reference, I think we are missing some command related to wrf so as to make it a domain overlay. I am not able to get it. kindly help me resolve this issue.</div><div><br></div><div>Thank you. Regards</div><div>Ganesan M.<br></div><div><br></div></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, 9 Apr 2019 at 02:45, Rick Brownrigg <<a href="mailto:brownrig@ucar.edu" target="_blank">brownrig@ucar.edu</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 dir="ltr"><div dir="ltr"><div dir="ltr"><div>Hi, <br></div><div><br></div><div>Its a little bit confusing. I see you are trying to use wrf_map_overlays() to overlay the shapefiles on your contour plot. This function is used to overlay plots that have been created by the various wrf_ plotting routines (wrf_contour, wrf_vector, etc). onto a map background.</div><div><br></div><div>Polylines, polygons, extra text, etc. are drawn onto an *existing* plot and that's why you are getting the error message -- argument 1 should be the name of that plot.  I think you need to rearrange things something like:</div><div><br></div><div>res = opts</div><div>res@gsnDraw = False    ;; these two lines are superfluous, as wrf_contour doesn't draw immediately. They are required for gsn_xxx plotting routines<br></div><div>res@gsnFrame = False  ;; because those routines draw immediately, not leaving a chance to draw polylines on top. These 2 prevent that auto draw. <br></div><div>.....</div><div>contour = wrf_contour(.....)</div><div>ind0_id = gsn_add_shapefile_polylines(wks,<span style="color:rgb(255,0,0)">contour,</span>ind0_shp_name,mpres,lnres)</div><div>ind1_id = gsn_add_shapefile_polylines(wks,<span style="color:rgb(255,0,0)">contour,</span>ind1_shp_name,mpres,lnres)</div><div>draw(contour)</div><div>frame(wks)</div><div><br></div><div>Rick<br></div></div></div></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, Apr 5, 2019 at 6:17 AM Ganesan M <<a href="mailto:ganeshcuraj@gmail.com" target="_blank">ganeshcuraj@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 dir="ltr"><div>I am new to ncl, I am trying to plot wrf model output wind speed over Indian region. now normally the plots are generated, at this point I am trying to overlay India shapefile to the generated plot to see the state boundaries. but I am getting errors as follows,</div><div><br></div><div>fatal:Argument type mismatch on argument (1) of (gsn_add_shapefile_polylines) can not coerce<br>fatal:["Execute.c":8578]:Execute: Error occurred at or near line 24 in file WRF_vector_contour.ncl</div><div><br></div><div>I am not able to figure where I am going wrong here.<br></div><div><br></div><div>I need to know, whether there is any pre-buit ncl script to load, as to show the India map with state boundaries. Is there any way to overlay the shapefile while the plotting the wrf variables?</div><div>I am attaching the ncl script that I am working on, please help me with this issue.</div><div><br></div><div>Thank you. Regards</div><div>Ganesan M.<br></div></div></div>
_______________________________________________<br>
ncl-talk mailing list<br>
<a href="mailto:ncl-talk@ucar.edu" target="_blank">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/mailman/listinfo/ncl-talk</a><br>
</blockquote></div>
</blockquote></div>
</blockquote></div>