[ncl-talk] Polymarkers not appearing on WRF contour map

Tabish Ansari tabishumaransari at gmail.com
Wed Feb 10 20:44:00 MST 2021


Hi,

I'm trying to add some polymarkers over a WRF contour map but they don't
appear. Here's the script:

begin
a = addfile("/media/tabish/DataDisk/LL-Solarfields/NL.nc","r")

;READING TOPOGRAPHY FROM ALL THREE DOMAINS
ter_d01 = a->HGT_M(0,:,:)                      ; Read the variable to memory
ter_d01 at description = "Topography Height"
;ter_d01 at units = ""


data1 =
asciiread("/media/tabish/DataDisk/LL-Solarfields/operational.csv",(/12,2/),"float")
data2 =
asciiread("/media/tabish/DataDisk/LL-Solarfields/future.csv",(/10,2/),"float")

print(data1)

LAT1 = data1(:,0)
LON1 = data1(:,1)

LAT2 = data2(:,0)
LON2 = data2(:,1)

print (LAT2 +" "+LON2)

  wks = gsn_open_wks("x11","NL_ter_solarfields")       ; Create a plot
workstation
  gsn_define_colormap(wks,"OceanLakeLandSnow")

  opts = True                                ; Set some Basic Plot options
  opts at InitTime = False
  opts at Footer = False
  res = opts                                 ; Use basic options for this
field
  res at cnFillOn = True                        ; Create a color fill plot
  res at cnFillMode       = "AreaFill"        ; Raster Mode
  res at gsnDraw             = False           ; don't draw
  res at gsnFrame            = False           ; don't advance frame

res at cnLevelSelectionMode = "ExplicitLevels"   ; set explicit contour levels
res at cnLevels    = ispan(5,150,5)
contour_d01 = wrf_contour(a,wks,ter_d01,res)

  pltres = True                              ; Set plot options
  mpres = True                               ; Set map options

mpres at mpDataBaseVersion = "MediumRes"
mpres at mpDataSetName = "Earth..4"
mpres at mpGeophysicalLineColor = "Black"
mpres at mpGridLineColor = "Black"
mpres at mpLimbLineColor = "Black"
mpres at mpNationalLineColor = "Black"
mpres at mpPerimLineColor = "Black"
mpres at mpUSStateLineColor = "Black"
mpres at mpOutlineBoundarySets = "AllBoundaries"
mpres at mpNationalLineThicknessF = 1.0
mpres at mpProvincialLineThicknessF = 0.5
mpres at mpGeophysicalLineThicknessF = 1.0
mpres at mpGridLineThicknessF = 0.5

pltres at NoHeaderFooter = True
mpres at tmXBLabelFontHeightF = 0.02
plot = wrf_map_overlays(a,wks,(/contour_d01/),pltres,mpres)  ; Plot the
data over a map background

;********************************************
; add black circles over met and pol stations
;********************************************
  polyres               = True          ; poly marker mods desired
  polyres at gsMarkerIndex = 4            ; choose circle as polymarker
  polyres at gsMarkerSizeF = 0.5          ; select size to avoid streaking
  polyres at gsMarkerColor = (/"black"/)   ; choose color
  polyres at gsMarkerThicknessF  = 1.0
  tabish1=gsn_add_polymarker(wks,plot,LON1,LAT1,polyres)  ; draw polymarkers

  pmres2 = True
  pmres2 at gsMarkerColor = "tomato"
  pmres2 at gsMarkerIndex = 16
  pmres2 at gsMarkerSizeF = 0.5

;STARTING TO MARK MET AND POL STATIONS
tabish2 = gsn_add_polymarker(wks,plot,LON2,LAT2,pmres2)

draw(plot)
  frame(wks)


end

Thanks

Tabish



*----------------------------------------------------------Dr Tabish U
Ansari <https://www.rug.nl/staff/t.u.ansari/>*
*Assistant Professor - Earth & Energy*

*University of Groningen - Campus Fryslân <https://www.rug.nl/cf/?lang=en>*

*Leeuwarden, the Netherlands*
*ResearchGate <https://www.researchgate.net/profile/Tabish_Ansari> | Google
Scholar
<https://scholar.google.com/citations?user=E94r-mwAAAAJ&hl=en&oi=ao> |
Twitter <https://twitter.com/tabishbiet> *
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.ucar.edu/pipermail/ncl-talk/attachments/20210211/ce0cafa9/attachment.html>


More information about the ncl-talk mailing list