;---------------------------------------------------------------------- ; Function to create and draw map of Australia. ; If mode = "create", then only create the map, ; don't draw it and advance the frame. ;---------------------------------------------------------------------- function Australia_map(wks,mode:string) local res begin res = True ; Set up resource list if(mode.eq."create") then res@gsnFrame = False res@gsnDraw = False end if res@gsnMaximize = True ; Maximize plot in frame res@mpFillOn = False ; Outlines will be turned on ; internally res@mpDataBaseVersion = "MediumRes" ; Medium resolution res@mpDataSetName = "Earth..4" ; Contains divisions for ; other countries. res@mpOutlineBoundarySets = "AllBoundaries" res@mpLimitMode = "LatLon" res@mpMinLatF = -45 ; Zoom in on Australia res@mpMaxLatF = -10 res@mpMinLonF = 112 res@mpMaxLonF = 155 res@tiMainString = "Adding blue * markers" map = gsn_csm_map(wks,res) ; Create or draw default map return(map) end ;--Main code begin wks = gsn_open_wks("png","poly3e") ; Open png file ;---Create the map so we can add lines, strings, and markers. map = Australia_map(wks,"create") ;---Create arrays with lat/lon locations lat = (/ -12.46, -31.95, -23.70, -37.81, -33.86/) lon = (/ 130.84, 115.86, 133.88, 144.96, 151.21/) ;---Attach markers to map. mres = True mres@gsMarkerSizeF = 20. ; Make markers larger mres@gsMarkerColor = "blue" dum = gsn_add_polymarker(wks,map,lon,lat,mres) ;---Drawing the map draws the markers. draw(map) frame(wks) end