[ncl-talk] adding shapefiles into my plots

Tabish Ansari tabishumaransari at gmail.com
Fri Jun 14 09:58:47 MDT 2019


Hi Saurav

You can download shapefiles for Bangladesh at various resolutions here:
https://gadm.org/download_country_v3.html
then you need to do the following in your ncl script:
(Here's a piece of code from one of my scripts but you can adapt it to your
needs)

 ; MAKE PLOTS
   plot = wrf_map_overlays(a,wks,(/contour_pm25/),pltres,mpres)
  china_shp_name    = "/data1/tabish/Shapefiles/China/CHN_adm0.shp" ; PATH
TO SHAPEFILE
  lnres                  = True
  lnres at gsLineColor      = "black"
  lnres at gsLineThicknessF = 1
  china_id = gsn_add_shapefile_polylines(wks,plot,china_shp_name,lnres)
  draw(plot)       ; This will draw the map and the shapefile outlines.
  frame(wks)       ; Advance the frame

Good luck!

Cheers,

Tabish



Tabish U Ansari
PhD student, Lancaster Environment Center
Lancaster Univeristy
Bailrigg, Lancaster,
LA1 4YW, United Kingdom


On Fri, 14 Jun 2019 at 16:43, Saurav Dey Shuvo <sauravshuvo007 at gmail.com>
wrote:

> Dear Respected Sir/Madam,
> I want to add the shapefile of Bangladesh into my plot (as attached). How
> do I do that? Please help me in this regard.
> Sincerely -
> Saurav Dey Shuvo
> M.Sc. in Meteorology at Department of Meteorology, University of Dhaka
> B.S. in Geography and Environment at Department of Geography and
> Environment, University of Dhaka
>
> _______________________________________________
> ncl-talk mailing list
> ncl-talk at ucar.edu
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20190614/f16c9e16/attachment.html>


More information about the ncl-talk mailing list