<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">Hi Tabish,<div class=""><br class=""></div><div class="">please send the replies always to ncl-talk.</div><div class=""><br class=""></div><div class="">I took a look at your script and my question is do you really know what the parts are doing especially the </div><div class="">resources? The part of the polymarkers you mentioned in your first email aren’t included but different resources </div><div class="">been set without any use.</div><div class=""><br class=""></div><div class="">Here is the cleaned but untested script which includes the missing resource settings and where the </div><div class="">needless resources were deleted.</div><div class=""><div class=""><br class=""></div><div class=""><font face="Courier" color="#0042aa" class="">;+++++++++++++++++++++++++++++++++++++++++++++++</font></div></div><div class=""><div class=""><font face="Courier" color="#0042aa" class="">load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl"</font></div><div class=""><font face="Courier" color="#0042aa" class="">load "$NCARG_ROOT/lib/ncarg/nclscripts/wrf/WRFUserARW.ncl"</font></div><div class=""><font face="Courier" color="#0042aa" class=""><br class=""></font></div><div class=""><font face="Courier" color="#0042aa" class="">begin</font></div><div class=""><font face="Courier" color="#0042aa" class="">; The WRF ARW input file. </font></div><div class=""><font face="Courier" color="#0042aa" class="">; This needs to have a ".nc" appended, so just do it.</font></div><div class=""><font face="Courier" color="#0042aa" class=""><br class=""></font></div><div class=""><font face="Courier" color="#0042aa" class=""> a = addfile("/home/admin/IBM-Research_intern/Emissions_data/Anthro/SEAC4RS_North_Hemisphere.nc","r")</font></div><div class=""><font face="Courier" color="#0042aa" class=""><br class=""></font></div><div class=""><font face="Courier" color="#0042aa" class=""> emiss = a->co ;emissions;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;</font></div><div class=""><font face="Courier" color="#0042aa" class=""> x_start = 167</font></div><div class=""><font face="Courier" color="#0042aa" class=""> x_end = 175</font></div><div class=""><font face="Courier" color="#0042aa" class=""> y_start = 282</font></div><div class=""><font face="Courier" color="#0042aa" class=""> y_end = 289</font></div><div class=""><font face="Courier" color="#0042aa" class=""><br class=""></font></div><div class=""><font face="Courier" color="#0042aa" class=""> emiss_zoom = emiss(y_start:y_end,x_start:x_end)</font></div><div class=""><font face="Courier" color="#0042aa" class=""> emiss_zoom = emiss_zoom * 1000 ; converting into Tonnes per 10km^2 per yr </font></div><div class=""><font face="Courier" color="#0042aa" class=""><br class=""></font></div><div class=""><font face="Courier" color="#0042aa" class="">;-- open a workstation</font></div><div class=""><font face="Courier" color="#0042aa" class=""> type = "x11"</font></div><div class=""><font face="Courier" color="#0042aa" class=""> wks = gsn_open_wks(type,"CO_SEAC4RS_Delhi") ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;</font></div><div class=""><font face="Courier" color="#0042aa" class=""> gsn_define_colormap(wks,"BlAqGrYeOrReVi200")</font></div><div class=""><font face="Courier" color="#0042aa" class=""><br class=""></font></div><div class=""><font face="Courier" color="#0042aa" class="">; Set some Basic Plot options</font></div><div class=""><font face="Courier" color="#0042aa" class=""> res = True </font></div><div class=""><font face="Courier" color="#0042aa" class=""> res@cnFillOn = True</font></div><div class=""><font face="Courier" color="#0042aa" class=""> res@gsnSpreadColors = True</font></div><div class=""><font face="Courier" color="#0042aa" class=""> res@cnLevelSelectionMode = "ManualLevels"</font></div><div class=""><font face="Courier" color="#0042aa" class=""> res@cnMinLevelValF = 0</font></div><div class=""><font face="Courier" color="#0042aa" class=""> res@cnMaxLevelValF = 30000</font></div><div class=""><font face="Courier" color="#0042aa" class=""> res@cnLevelSpacingF = 300</font></div><div class=""><font face="Courier" color="#0042aa" class=""> res@cnLinesOn = False ;turning off contour lines and labels</font></div><div class=""><font face="Courier" color="#0042aa" class=""> res@cnFillMode = "RasterFill"</font></div><div class=""><font face="Courier" color="#0042aa" class=""> res@gsnDraw = False</font></div><div class=""><font face="Courier" color="#0042aa" class=""> res@gsnFrame = False</font></div><div class=""><font face="Courier" color="#0042aa" class=""><br class=""></font></div><div class=""><font face="Courier" color="#0042aa" class="">;-- contour plot</font></div><div class=""><font face="Courier" color="#0042aa" class=""> plot = gsn_csm_contour(wks,emiss_zoom,res) </font></div><div class=""><font face="Courier" color="#0042aa" class=""> </font></div><div class=""><font face="Courier" color="#0042aa" class="">;-- shapefile</font></div><div class=""><font face="Courier" color="#0042aa" class=""> india_shp_name = "/home/admin/IBM-Research_intern/Shapefiles/India/IND_adm3.shp"</font></div><div class=""><font face="Courier" color="#0042aa" class=""><br class=""></font></div><div class=""><font face="Courier" color="#0042aa" class=""> lnres = True</font></div><div class=""><font face="Courier" color="#0042aa" class=""> lnres@gsLineColor = "black"</font></div><div class=""><font face="Courier" color="#0042aa" class=""> lnres@gsLineThicknessF = 1.5</font></div><div class=""><font face="Courier" color="#0042aa" class=""> india_id = gsn_add_shapefile_polylines(wks,plot,india_shp_name,lnres)</font></div><div class=""><font face="Courier" color="#0042aa" class=""><br class=""></font></div><div class=""><font face="Courier" color="#0042aa" class="">;-- polymarker</font></div><div class=""><font face="Courier" color="#0042aa" class=""> pmres = True</font></div><div class=""><font face="Courier" color="#0042aa" class=""> pmres@gsMarkerColor = "Black"</font></div><div class=""><font face="Courier" color="#0042aa" class=""> pmres@gsMarkerIndex = 16</font></div><div class=""><font face="Courier" color="#0042aa" class=""> pmres@gsMarkerSizeF = 0.01</font></div><div class=""><font face="Courier" color="#0042aa" class=""> </font></div><div class=""><font face="Courier" color="#0042aa" class=""> polym_id = gsn_add_polymarker(wks, plot,28.45, 77.00,pmres)</font></div><div class=""><font face="Courier" color="#0042aa" class=""> </font></div><div class=""><font face="Courier" color="#0042aa" class="">;-- create the plot</font></div><div class=""><font face="Courier" color="#0042aa" class=""> draw(plot) ; This will draw the map and the shapefile outlines.</font></div><div class=""><font face="Courier" color="#0042aa" class=""> frame(wks) ; Advance the frame</font></div><div class=""><font face="Courier" color="#0042aa" class=""><br class=""></font></div><div class=""><font face="Courier" color="#0042aa" class="">end</font></div></div><div class=""><font face="Courier" color="#0042aa" class="">;+++++++++++++++++++++++++++++++++++++++++++++++</font></div><div class=""><br class=""></div><div class="">Bye,</div><div class="">Karin</div><div class=""><br class=""><div><blockquote type="cite" class=""><div class="">Am 10.07.2015 um 14:09 schrieb Tabish Ansari <<a href="mailto:tabishumaransari@gmail.com" class="">tabishumaransari@gmail.com</a>>:</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" class=""><div class="gmail_default" style="font-family:trebuchet ms,sans-serif">Hi Karin<br class=""><br class=""></div><div class="gmail_default" style="font-family:trebuchet ms,sans-serif">Thanks for your reply. I have done as you said, but it's still not working. Below is my entire script:<br class=""><br class=""><span style="color:rgb(255,0,0)" class="">; Example script to produce plots for a WRF real-data run,<br class="">; with the ARW coordinate dynamics option.<br class="">; The script shows how to zoom into a given area<br class=""><br class="">load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl"<br class="">load "$NCARG_ROOT/lib/ncarg/nclscripts/wrf/WRFUserARW.ncl"<br class=""><br class="">begin<br class="">; The WRF ARW input file. <br class="">; This needs to have a ".nc" appended, so just do it.<br class=""> a = addfile("/home/admin/IBM-Research_intern/Emissions_data/Anthro/SEAC4RS_North_Hemisphere.nc","r")<br class=""><br class="">; We generate plots, but what kind do we prefer?<br class=""> type = "x11"<br class=""> wks = gsn_open_wks(type,"CO_SEAC4RS_Delhi");;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;<br class=""> gsn_define_colormap(wks,"BlAqGrYeOrReVi200")<br class=""> ;gsn_define_colormap(wks,"hotres")<br class="">; Set some Basic Plot options<br class=""> res = True<br class=""> ;res@MainTitle = "REAL-TIME WRF"<br class=""><br class=""> pltres = True<br class=""> mpres = True<br class=""> mpres1 = True<br class="">res = True <br class="">res@cnFillOn = True<br class="">res@gsnSpreadColors = True<br class="">res@cnLevelSelectionMode = "ManualLevels"<br class="">res@cnMinLevelValF = 0<br class="">res@cnMaxLevelValF = 30000<br class="">res@cnLevelSpacingF = 300<br class="">res@cnLinesOn = False ;turning off contour lines and labels<br class="">res@cnFillMode = "RasterFill"<br class="">res@gsnDraw=False<br class="">res@gsnFrame=False<br class=""> emiss = a->co ;emissions;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;<br class=""> x_start = 167<br class=""> x_end = 175<br class=""> y_start = 282<br class=""> y_end = 289<br class=""><br class=""> mpres1@ZoomIn = True<br class=""> mpres1@Xstart = x_start<br class=""> mpres1@Ystart = y_start<br class=""> mpres1@Xend = x_end<br class=""> mpres1@Yend = y_end<br class=""><br class=""> emiss_zoom = emiss(y_start:y_end,x_start:x_end)<br class=""> emiss_zoom = emiss_zoom * 1000 ; converting into Tonnes per 10km^2 per yr <br class=""> ;emiss_zoom@description = emiss@description + " - Zoom over India"<br class=""> opts = res <br class=""> opts@cnFillOn = True <br class=""> plot = gsn_csm_contour(wks,emiss_zoom,res) <br class=""> delete(opts)<br class=""> india_shp_name = "/home/admin/IBM-Research_intern/Shapefiles/India/IND_adm3.shp"<br class=""> ;lanka_shp_name = "/media/ResearchWork/Shapefiles/Sri-Lanka/LKA_adm0.shp"<br class=""> lnres = True<br class=""> lnres@gsLineColor = "black"<br class=""> lnres@gsLineThicknessF = 1.5<br class=""> india_id = gsn_add_shapefile_polylines(wks,plot,india_shp_name,lnres)<br class=""> ;lanka_id = gsn_add_shapefile_polylines(wks,plot,lanka_shp_name,lnres)<br class=""><br class=""> str = unique_string("mark")<br class=""> plot@$str$ = gsn_add_polymarker(wks, plot,28.45, 77.00,pmres)<br class=""> <br class=""> draw(plot) ; This will draw the map and the shapefile outlines.<br class=""> frame(wks) ; Advance the frame<br class=""><br class=""><br class="">end</span><br class=""><br class=""><br class=""><br class=""></div><div class="gmail_default" style="font-family:trebuchet ms,sans-serif">Thanks<br class=""><br class=""></div><div class="gmail_default" style="font-family:trebuchet ms,sans-serif">Tabish<br class=""></div></div><div class="gmail_extra"><br clear="all" class=""><div class=""><div class="gmail_signature"><div dir="ltr" class=""><div class=""><div dir="ltr" class=""><div class=""><div class=""><font color="#666666" face="trebuchet ms, sans-serif" size="2" class="">Tabish U Ansari<br class="">IBM Research India Laboratory<br class=""></font></div><div class=""><font color="#666666" face="trebuchet ms, sans-serif" size="2" class="">New Delhi<br class=""></font></div></div></div></div></div></div></div>
<br class=""><div class="gmail_quote">On 10 July 2015 at 17:33, Karin Meier-Fleischer <span dir="ltr" class=""><<a href="mailto:meier-fleischer@dkrz.de" target="_blank" class="">meier-fleischer@dkrz.de</a>></span> wrote:<br class=""><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div bgcolor="#FFFFFF" text="#000000" class="">
Hi Tabish,<br class="">
<br class="">
if you created a map plot than you can use the function
gsn_add_polymarker to draw marker <br class="">
at specific lat/lon positions:<br class="">
<br class="">
str = unique_string("mark")<br class="">
plot@$str$ = gsn_add_polymarker(wks, plot, 77.00, 28.45., pmres)<br class="">
<br class="">
Each polymarker has to have its own id so it is a good idea to use
the unique_string function to generate a unique id name.<br class="">
<br class="">
Bye,<br class="">
Karin<br class="">
<br class="">
<div class="">Am 10.07.15 um 13:55 schrieb Tabish
Ansari:<br class="">
</div><div class=""><div class="h5">
<blockquote type="cite" class="">
<div dir="ltr" class="">
<div class="gmail_default" style="font-family:trebuchet ms,sans-serif">Hi<br class="">
<br class="">
</div>
<div class="gmail_default" style="font-family:trebuchet ms,sans-serif">I wish to add dots to demarcate specific
locations of my interest in my map. I know the lat-lon of
those locations. I am including the following lines in my
script:<br class="">
<b class=""><br class="">
pmres = True<br class="">
pmres@gsMarkerColor = "Black"<br class="">
pmres@gsMarkerIndex = 16<br class="">
pmres@gsMarkerSizeF = 0.01<br class="">
gsn_polymarker(wks,plot,77.00,28.45,pmres)<br class="">
draw(plot) ; This will draw the map and the
shapefile outlines.<br class="">
frame(wks) ; Advance the frame<br class="">
</b><br class="">
</div>
<div class="gmail_default" style="font-family:trebuchet ms,sans-serif">However, no dot is visible in the map. Also I
am not getting any errors or warning.<br class="">
<br class="">
</div>
<div class="gmail_default" style="font-family:trebuchet ms,sans-serif">Please help me out with this<br class="">
<br class="">
</div>
<div class="gmail_default" style="font-family:trebuchet ms,sans-serif">Thanks in advance!<br class="">
<br class="">
</div>
<div class="gmail_default" style="font-family:trebuchet ms,sans-serif">Tabish<br class="">
</div>
<div class="gmail_default" style="font-family:trebuchet ms,sans-serif"><br clear="all" class="">
</div>
<div class="">
<div class="">
<div dir="ltr" class="">
<div class="">
<div dir="ltr" class="">
<div class="">
<div class=""><font face="trebuchet ms,
sans-serif" color="#666666" size="2" class="">Tabish U Ansari<br class="">
IBM Research India Laboratory<br class="">
</font></div>
<div class=""><font face="trebuchet ms,
sans-serif" color="#666666" size="2" class="">New Delhi</font></div></div></div></div></div></div></div></div></blockquote></div></div></div></blockquote></div></div></div></blockquote></div><div apple-content-edited="true" class=""><br class="Apple-interchange-newline">
</div>
<br class=""></div></body></html>