; load libraries, twice for good measure load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl" load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_csm.ncl" load "$NCARG_ROOT/lib/ncarg/nclscripts/wrf/WRFUserARW.ncl" ;load "/home/torn/ncl/wrf_map_info.ncl" ;load "/home/torn/ncl/array_stat.ncl" ;load "/home/torn/ncl/image_conv.ncl" load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl" load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_csm.ncl" load "$NCARG_ROOT/lib/ncarg/nclscripts/wrf/WRFUserARW.ncl" ;load "/home/torn/ncl/wrf_map_info.ncl" ;load "/home/torn/ncl/array_stat.ncl" ;load "/home/torn/ncl/image_conv.ncl" ;load "wrf_dart_util.ncl" begin ; ------ Load Data rows = numAsciiRow("usp01.dat") columns = numAsciiCol("usp01.dat") data01=asciiread("usp01.dat",(/rows,columns/),"float") templat = data01(:,2) templon = data01(:,3) tempdata= data01(:,4) p = onedtond(tempdata,(/7,9/)) lat = onedtond(templat,(/7,9/)) lon = onedtond(templon,(/7,9/)) p(0,0)=p(0,0)+.01 ; ------ Assign Coordinates uniquelat = lat(:,1) uniquelon = lon(1,:) uniquelat@units="degrees_north" uniquelon@units="degrees_east" latmin=min(lat) latmax=max(lat) lonmin=min(lon) lonmax=max(lon) fillvarlevel = p fillvarlevel!0="lat" fillvarlevel!1="lon" fillvarlevel&lon = uniquelon fillvarlevel&lat = uniquelat ;---Read in site info sitefile = "monthly.dat" sitedata = asciiread(sitefile,-1,"string") delim = "," sitelats = tofloat(str_get_field(sitedata,1,delim)) sitelons = tofloat(str_get_field(sitedata,2,delim)) siteanom = tofloat(str_get_field(sitedata,3,delim)) wks_type = "png" wks_type@wkWidth = 2000 wks_type@wkHeight = 1600 wks = gsn_open_wks(wks_type,"monthly") res = True res@gsnFrame = False res@mpProjection = "CylindricalEquidistant" ;res@mpOutlineBoundarySets = "GeophysicalAndUSStates" res@gsnMaximize = True res@lbBoxMinorExtentF = 0.25 res@cnFillOn = False ; this controls whether or not a label bar exists res@cnLinesOn = False ;no contours on top of fill res@cnFillMode = "RasterFill" res@cnRasterSmoothingOn = True res@mpMinLonF = lonmin ;-- min longitude res@mpMaxLonF = lonmax ;-- max longitude res@mpMinLatF = latmin ;-- min latitude res@mpMaxLatF = latmax ;-- max latitude res@tfDoNDCOverlay = True ;this is a resource for overlaying multiple plots res@cnInfoLabelOn = False ; turn off contour label res@mpDataBaseVersion = "Ncarg4_1" res@mpDataSetName = "Earth..4" ; For counties res@mpFillAreaSpecifiers = (/"Land", "United States:States","Water"/) ; for states only res@mpFillAreaSpecifiers = (/"Land", "Land:North America:United States:Conterminous US:New York","Water"/) res@mpSpecifiedFillColors = (/"transparent","transparent", "transparent"/) res@mpInlandWaterFillColor = 238 res@mpLandFillColor = -1 ; transparent res@mpOutlineOn = True res@mpMaskOutlineSpecifiers = (/"Land"/) res@mpOutlineSpecifiers = (/ "Land:North America:United States:Conterminous US:New York"/) res@mpGeophysicalLineThicknessF = 4 res@mpUSStateLineThicknessF = 4 res@mpNationalLineThicknessF = 4 res@mpGridLonSpacingF = 2 res@mpDataBaseVersion = "MediumRes" ;-- better map resolution res@gsnAddCyclic = False res@cnGridBoundFillColor = "Transparent" res@tmXBBorderOn = False res@tmXBMinorPerMajor = 1 res@tmXBOn = False res@tmXTBorderOn = False res@tmXTOn = False res@tmYLBorderOn = False res@tmYLMinorPerMajor = 1 res@tmYLOn = False res@tmYRBorderOn = False res@tmYROn = False res@lbLabelBarOn = False res@gsnDraw = False size = dimsizes(sitelons) res@mpOutlineSpecifiers = (/ "Land:North America:United States:Conterminous US:New York"/) res@mpGeophysicalLineThicknessF = 6 res@mpUSStateLineThicknessF = 6 res@mpNationalLineThicknessF = 6 res@mpOutlineDrawOrder = "PreDraw" ; = "PostDraw" plot = gsn_csm_contour_map(wks,fillvarlevel,res) labels = (/"-10","-8","-6","-4","-2","0","2","4","6","8","10","F"/) lbres = True ; Set up a resource list for the labelbar. lbres@vpWidthF = 0.1 lbres@vpHeightF = 0.25 lbres@lbBoxLinesOn = False lbres@lbFillColors = (/27,47,67,87,107,127,147,167,187,207,227,-1/) lbres@lbMonoFillPattern = True lbres@lbOrientation = "Vertical" lbres@lbPerimOn = False lbres@lbLabelFontHeightF = .013 lbres@lbLabelAutoStride = True lbid = gsn_create_labelbar_ndc(wks,12,labels,.7,.5,lbres) amres = True amres@amZone = 0 amres@amParallelPosF = 0.4 amres@amOrthogonalPosF = 0 annoid = gsn_add_annotation(plot,lbid,amres) ;;;;;;;;;;;; this part tells the marker what color to be based on the anomaly markercolors = new(size(0),"integer") do n=0,size(0)-1,1 markercolors(n) = round((siteanom(n)*10),3)+127 end do markercolors=where((markercolors.lt.17),17,markercolors) markercolors=where((markercolors.gt.255),237,markercolors) stationmarker = new(size(0),graphic) do n=0,size(0)-1,1 mres = True ; marker resources for best track mres@gsMarkerIndex = 16 ; marker style (filled circle) mres@gsMarkerSizeF = 23.0 ; marker size mres@gsMarkerColor = markercolors(n) ; marker color mres@tfPolyDrawOrder= "PostDraw" stationmarker(n) = gsn_add_polymarker(wks,plot,sitelons(n),sitelats(n),mres) tres = True ; text mods desired tres@tfPolyDrawOrder = "PostDraw" tres@txFont = "helvetica-bold" tres@txFontHeightF = 0.014 if any(siteanom.lt.-9.5) tres@txFontHeightF = 0.011 end if stationtext = gsn_add_text(wks,plot,round(siteanom(n),3),sitelons(n),sitelats(n),tres) end do tres@txFontHeightF = 0.025 dum = gsn_add_text(wks,plot,"30 Day Mean Temperature Anomaly",-77.5,41.4,tres) tres@txFontHeightF = 0.015 dum = gsn_add_text(wks,plot,"(data for a minimum of 28 days is required)",-77.5,41.0,tres) tres@txFont = "helvetica" tres@txJust = "CenterLeft" tres@txFontHeightF = .010 label = "Image Created By Nick Bassill" tres@txFontOpacityF = .5 gsn_text_ndc(wks,label,.001,.77 ,tres) label = "Data Provided By The NYS Mesonet" gsn_text_ndc(wks,label,.001,.75 ,tres) tres@txJust = "CenterCenter" tres@txFontOpacityF = 1 gsn_text_ndc(wks,".",.99,.99 ,tres) draw(plot) frame(wks) delete(sitefile) delete(sitelats) delete(sitelons) delete(sitedata) delete(siteanom) delete(markercolors) delete(stationmarker) ; make weekly plot below wks_type = "png" wks_type@wkWidth = 2000 wks_type@wkHeight = 1600 wks = gsn_open_wks(wks_type,"weekly") sitefile = "weekly.dat" sitedata = asciiread(sitefile,-1,"string") sitelats = tofloat(str_get_field(sitedata,1,delim)) sitelons = tofloat(str_get_field(sitedata,2,delim)) siteanom = tofloat(str_get_field(sitedata,3,delim)) size = dimsizes(sitelons) plot = gsn_csm_contour_map(wks,fillvarlevel,res) labels = (/"-10","-8","-6","-4","-2","0","2","4","6","8","10","F"/) lbres = True ; Set up a resource list for the labelbar. lbres@vpWidthF = 0.1 lbres@vpHeightF = 0.25 lbres@lbBoxLinesOn = False lbres@lbFillColors = (/27,47,67,87,107,127,147,167,187,207,227,-1/) lbres@lbMonoFillPattern = True lbres@lbOrientation = "Vertical" lbres@lbPerimOn = False lbres@lbLabelFontHeightF = .013 lbres@lbLabelAutoStride = True lbid = gsn_create_labelbar_ndc(wks,12,labels,.7,.5,lbres) amres = True amres@amZone = 0 amres@amParallelPosF = 0.4 amres@amOrthogonalPosF = 0 annoid = gsn_add_annotation(plot,lbid,amres) ;;;;;;;;;;;; this part tells the marker what color to be based on the anomaly markercolors = new(size(0),"integer") do n=0,size(0)-1,1 markercolors(n) = round((siteanom(n)*10),3)+127 end do markercolors=where((markercolors.lt.17),17,markercolors) markercolors=where((markercolors.gt.255),237,markercolors) stationmarker = new(size(0),graphic) do n=0,size(0)-1,1 mres = True ; marker resources for best track mres@gsMarkerIndex = 16 ; marker style (filled circle) mres@gsMarkerSizeF = 23.0 ; marker size mres@gsMarkerColor = markercolors(n) ; marker color mres@tfPolyDrawOrder= "PostDraw" stationmarker(n) = gsn_add_polymarker(wks,plot,sitelons(n),sitelats(n),mres) tres = True ; text mods desired tres@tfPolyDrawOrder = "PostDraw" tres@txFont = "helvetica-bold" tres@txFontHeightF = 0.014 if any(siteanom.lt.-9.5) tres@txFontHeightF = 0.011 end if stationtext = gsn_add_text(wks,plot,round(siteanom(n),3),sitelons(n),sitelats(n),tres) end do tres@txFontHeightF = 0.025 dum = gsn_add_text(wks,plot,"7 Day Mean Temperature Anomaly",-77.5,41.4,tres) tres@txFontHeightF = 0.015 dum = gsn_add_text(wks,plot,"(data for all 7 days is required)",-77.5,41.0,tres) tres@txFont = "helvetica" tres@txJust = "CenterLeft" tres@txFontHeightF = .010 label = "Image Created By Nick Bassill" tres@txFontOpacityF = .5 gsn_text_ndc(wks,label,.001,.77 ,tres) label = "Data Provided By The NYS Mesonet" gsn_text_ndc(wks,label,.001,.75 ,tres) tres@txJust = "CenterCenter" tres@txFontOpacityF = 1 gsn_text_ndc(wks,".",.99,.99 ,tres) draw(plot) frame(wks) delete(sitefile) delete(sitelats) delete(sitelons) delete(sitedata) delete(siteanom) delete(markercolors) delete(stationmarker) ; make three monthly anomaly plot below wks_type = "png" wks_type@wkWidth = 2000 wks_type@wkHeight = 1600 wks = gsn_open_wks(wks_type,"threemonthly") sitefile = "threemonthly.dat" sitedata = asciiread(sitefile,-1,"string") sitelats = tofloat(str_get_field(sitedata,1,delim)) sitelons = tofloat(str_get_field(sitedata,2,delim)) siteanom = tofloat(str_get_field(sitedata,3,delim)) size = dimsizes(sitelons) plot = gsn_csm_contour_map(wks,fillvarlevel,res) labels = (/"-10","-8","-6","-4","-2","0","2","4","6","8","10","F"/) lbres = True ; Set up a resource list for the labelbar. lbres@vpWidthF = 0.1 lbres@vpHeightF = 0.25 lbres@lbBoxLinesOn = False lbres@lbFillColors = (/27,47,67,87,107,127,147,167,187,207,227,-1/) lbres@lbMonoFillPattern = True lbres@lbOrientation = "Vertical" lbres@lbPerimOn = False lbres@lbLabelFontHeightF = .013 lbres@lbLabelAutoStride = True lbid = gsn_create_labelbar_ndc(wks,12,labels,.7,.5,lbres) amres = True amres@amZone = 0 amres@amParallelPosF = 0.4 amres@amOrthogonalPosF = 0 annoid = gsn_add_annotation(plot,lbid,amres) ;;;;;;;;;;;; this part tells the marker what color to be based on the anomaly markercolors = new(size(0),"integer") do n=0,size(0)-1,1 markercolors(n) = round((siteanom(n)*10),3)+127 end do markercolors=where((markercolors.lt.17),17,markercolors) markercolors=where((markercolors.gt.255),237,markercolors) stationmarker = new(size(0),graphic) do n=0,size(0)-1,1 mres = True ; marker resources for best track mres@gsMarkerIndex = 16 ; marker style (filled circle) mres@gsMarkerSizeF = 23.0 ; marker size mres@gsMarkerColor = markercolors(n) ; marker color mres@tfPolyDrawOrder= "PostDraw" stationmarker(n) = gsn_add_polymarker(wks,plot,sitelons(n),sitelats(n),mres) tres = True ; text mods desired tres@tfPolyDrawOrder = "PostDraw" tres@txFont = "helvetica-bold" tres@txFontHeightF = 0.014 if any(siteanom.lt.-9.5) tres@txFontHeightF = 0.011 end if stationtext = gsn_add_text(wks,plot,round(siteanom(n),3),sitelons(n),sitelats(n),tres) end do tres@txFontHeightF = 0.025 dum = gsn_add_text(wks,plot,"90 Day Mean Temperature Anomaly",-77.5,41.4,tres) tres@txFontHeightF = 0.015 dum = gsn_add_text(wks,plot,"(data for a minimum of 85 days is required)",-77.5,41.0,tres) tres@txFont = "helvetica" tres@txJust = "CenterLeft" tres@txFontHeightF = .010 label = "Image Created By Nick Bassill" tres@txFontOpacityF = .5 gsn_text_ndc(wks,label,.001,.77 ,tres) label = "Data Provided By The NYS Mesonet" gsn_text_ndc(wks,label,.001,.75 ,tres) tres@txJust = "CenterCenter" tres@txFontOpacityF = 1 gsn_text_ndc(wks,".",.99,.99 ,tres) draw(plot) frame(wks) delete(sitefile) delete(sitelats) delete(sitelons) delete(sitedata) delete(siteanom) delete(markercolors) delete(stationmarker) ; make weeklyhighanomaly plot below wks_type = "png" wks_type@wkWidth = 2000 wks_type@wkHeight = 1600 wks = gsn_open_wks(wks_type,"weeklyhighanomaly") sitefile = "weeklyhighanomaly.dat" sitedata = asciiread(sitefile,-1,"string") sitelats = tofloat(str_get_field(sitedata,1,delim)) sitelons = tofloat(str_get_field(sitedata,2,delim)) siteanom = tofloat(str_get_field(sitedata,3,delim)) size = dimsizes(sitelons) plot = gsn_csm_contour_map(wks,fillvarlevel,res) labels = (/"-10","-8","-6","-4","-2","0","2","4","6","8","10","F"/) lbres = True ; Set up a resource list for the labelbar. lbres@vpWidthF = 0.1 lbres@vpHeightF = 0.25 lbres@lbBoxLinesOn = False lbres@lbFillColors = (/27,47,67,87,107,127,147,167,187,207,227,-1/) lbres@lbMonoFillPattern = True lbres@lbOrientation = "Vertical" lbres@lbPerimOn = False lbres@lbLabelFontHeightF = .013 lbres@lbLabelAutoStride = True lbid = gsn_create_labelbar_ndc(wks,12,labels,.7,.5,lbres) amres = True amres@amZone = 0 amres@amParallelPosF = 0.4 amres@amOrthogonalPosF = 0 annoid = gsn_add_annotation(plot,lbid,amres) ;;;;;;;;;;;; this part tells the marker what color to be based on the anomaly markercolors = new(size(0),"integer") do n=0,size(0)-1,1 markercolors(n) = round((siteanom(n)*10),3)+127 end do markercolors=where((markercolors.lt.17),17,markercolors) markercolors=where((markercolors.gt.255),237,markercolors) stationmarker = new(size(0),graphic) do n=0,size(0)-1,1 mres = True ; marker resources for best track mres@gsMarkerIndex = 16 ; marker style (filled circle) mres@gsMarkerSizeF = 23.0 ; marker size mres@gsMarkerColor = markercolors(n) ; marker color mres@tfPolyDrawOrder= "PostDraw" stationmarker(n) = gsn_add_polymarker(wks,plot,sitelons(n),sitelats(n),mres) tres = True ; text mods desired tres@tfPolyDrawOrder = "PostDraw" tres@txFont = "helvetica-bold" tres@txFontHeightF = 0.014 if any(siteanom.lt.-9.5) tres@txFontHeightF = 0.011 end if stationtext = gsn_add_text(wks,plot,round(siteanom(n),3),sitelons(n),sitelats(n),tres) end do tres@txFontHeightF = 0.025 dum = gsn_add_text(wks,plot,"7 Day High Temperature Anomaly",-77.5,41.4,tres) tres@txFontHeightF = 0.015 dum = gsn_add_text(wks,plot,"(data for all 7 days is required)",-77.5,41.0,tres) tres@txFont = "helvetica" tres@txJust = "CenterLeft" tres@txFontHeightF = .010 label = "Image Created By Nick Bassill" tres@txFontOpacityF = .5 gsn_text_ndc(wks,label,.001,.77 ,tres) label = "Data Provided By The NYS Mesonet" gsn_text_ndc(wks,label,.001,.75 ,tres) tres@txJust = "CenterCenter" tres@txFontOpacityF = 1 gsn_text_ndc(wks,".",.99,.99 ,tres) draw(plot) frame(wks) delete(sitefile) delete(sitelats) delete(sitelons) delete(sitedata) delete(siteanom) delete(markercolors) delete(stationmarker) ; make weeklylowanomaly plot below wks_type = "png" wks_type@wkWidth = 2000 wks_type@wkHeight = 1600 wks = gsn_open_wks(wks_type,"weeklylowanomaly") sitefile = "weeklylowanomaly.dat" sitedata = asciiread(sitefile,-1,"string") sitelats = tofloat(str_get_field(sitedata,1,delim)) sitelons = tofloat(str_get_field(sitedata,2,delim)) siteanom = tofloat(str_get_field(sitedata,3,delim)) size = dimsizes(sitelons) plot = gsn_csm_contour_map(wks,fillvarlevel,res) labels = (/"-10","-8","-6","-4","-2","0","2","4","6","8","10","F"/) lbres = True ; Set up a resource list for the labelbar. lbres@vpWidthF = 0.1 lbres@vpHeightF = 0.25 lbres@lbBoxLinesOn = False lbres@lbFillColors = (/27,47,67,87,107,127,147,167,187,207,227,-1/) lbres@lbMonoFillPattern = True lbres@lbOrientation = "Vertical" lbres@lbPerimOn = False lbres@lbLabelFontHeightF = .013 lbres@lbLabelAutoStride = True lbid = gsn_create_labelbar_ndc(wks,12,labels,.7,.5,lbres) amres = True amres@amZone = 0 amres@amParallelPosF = 0.4 amres@amOrthogonalPosF = 0 annoid = gsn_add_annotation(plot,lbid,amres) ;;;;;;;;;;;; this part tells the marker what color to be based on the anomaly markercolors = new(size(0),"integer") do n=0,size(0)-1,1 markercolors(n) = round((siteanom(n)*10),3)+127 end do markercolors=where((markercolors.lt.17),17,markercolors) markercolors=where((markercolors.gt.255),237,markercolors) stationmarker = new(size(0),graphic) do n=0,size(0)-1,1 mres = True ; marker resources for best track mres@gsMarkerIndex = 16 ; marker style (filled circle) mres@gsMarkerSizeF = 23.0 ; marker size mres@gsMarkerColor = markercolors(n) ; marker color mres@tfPolyDrawOrder= "PostDraw" stationmarker(n) = gsn_add_polymarker(wks,plot,sitelons(n),sitelats(n),mres) tres = True ; text mods desired tres@tfPolyDrawOrder = "PostDraw" tres@txFont = "helvetica-bold" tres@txFontHeightF = 0.014 if any(siteanom.lt.-9.5) tres@txFontHeightF = 0.011 end if stationtext = gsn_add_text(wks,plot,round(siteanom(n),3),sitelons(n),sitelats(n),tres) end do tres@txFontHeightF = 0.025 dum = gsn_add_text(wks,plot,"7 Day Low Temperature Anomaly",-77.5,41.4,tres) tres@txFontHeightF = 0.015 dum = gsn_add_text(wks,plot,"(data for all 7 days is required)",-77.5,41.0,tres) tres@txFont = "helvetica" tres@txJust = "CenterLeft" tres@txFontHeightF = .010 label = "Image Created By Nick Bassill" tres@txFontOpacityF = .5 gsn_text_ndc(wks,label,.001,.77 ,tres) label = "Data Provided By The NYS Mesonet" gsn_text_ndc(wks,label,.001,.75 ,tres) tres@txJust = "CenterCenter" tres@txFontOpacityF = 1 gsn_text_ndc(wks,".",.99,.99 ,tres) draw(plot) frame(wks) delete(sitefile) delete(sitelats) delete(sitelons) delete(sitedata) delete(siteanom) delete(markercolors) delete(stationmarker) ; make daily anomaly plot below wks_type = "png" wks_type@wkWidth = 2000 wks_type@wkHeight = 1600 wks = gsn_open_wks(wks_type,"daily") sitefile = "daily.dat" sitedata = asciiread(sitefile,-1,"string") sitelats = tofloat(str_get_field(sitedata,1,delim)) sitelons = tofloat(str_get_field(sitedata,2,delim)) siteanom = tofloat(str_get_field(sitedata,3,delim)) size = dimsizes(sitelons) plot = gsn_csm_contour_map(wks,fillvarlevel,res) labels = (/"-20","-16","-12","-8","-4","0","4","8","12","16","20","F"/) lbres = True ; Set up a resource list for the labelbar. lbres@vpWidthF = 0.1 lbres@vpHeightF = 0.25 lbres@lbBoxLinesOn = False lbres@lbFillColors = (/27,47,67,87,107,127,147,167,187,207,227,-1/) lbres@lbMonoFillPattern = True lbres@lbOrientation = "Vertical" lbres@lbPerimOn = False lbres@lbLabelFontHeightF = .013 lbres@lbLabelAutoStride = True lbid = gsn_create_labelbar_ndc(wks,12,labels,.7,.5,lbres) amres = True amres@amZone = 0 amres@amParallelPosF = 0.4 amres@amOrthogonalPosF = 0 annoid = gsn_add_annotation(plot,lbid,amres) ;;;;;;;;;;;; this part tells the marker what color to be based on the anomaly markercolors = new(size(0),"integer") do n=0,size(0)-1,1 markercolors(n) = round((siteanom(n)*5),3)+127 end do markercolors=where((markercolors.lt.17),17,markercolors) markercolors=where((markercolors.gt.255),237,markercolors) tres@txFontHeightF = 0.014 stationmarker = new(size(0),graphic) do n=0,size(0)-1,1 mres = True ; marker resources for best track mres@gsMarkerIndex = 16 ; marker style (filled circle) mres@gsMarkerSizeF = 23.0 ; marker size mres@gsMarkerColor = markercolors(n) ; marker color mres@tfPolyDrawOrder= "PostDraw" stationmarker(n) = gsn_add_polymarker(wks,plot,sitelons(n),sitelats(n),mres) tres = True ; text mods desired tres@tfPolyDrawOrder = "PostDraw" tres@txFont = "helvetica-bold" if any(siteanom.lt.-9.5) tres@txFontHeightF = 0.011 end if stationtext = gsn_add_text(wks,plot,round(siteanom(n),3),sitelons(n),sitelats(n),tres) end do tres@txFontHeightF = 0.022 dum = gsn_add_text(wks,plot,"Yesterday's Mean Temperature Anomaly",-77.5,41.4,tres) tres@txFontHeightF = 0.015 dum = gsn_add_text(wks,plot,"(data for at least 90% of the day is required)",-77.5,41.0,tres) tres@txFont = "helvetica" tres@txJust = "CenterLeft" tres@txFontHeightF = .010 label = "Image Created By Nick Bassill" tres@txFontOpacityF = .5 gsn_text_ndc(wks,label,.001,.77 ,tres) label = "Data Provided By The NYS Mesonet" gsn_text_ndc(wks,label,.001,.75 ,tres) tres@txJust = "CenterCenter" tres@txFontOpacityF = 1 gsn_text_ndc(wks,".",.99,.99 ,tres) draw(plot) frame(wks) delete(sitefile) delete(sitelats) delete(sitelons) delete(sitedata) delete(siteanom) delete(markercolors) delete(stationmarker) ; make dailyhighanomaly plot below wks_type = "png" wks_type@wkWidth = 2000 wks_type@wkHeight = 1600 wks = gsn_open_wks(wks_type,"dailyhighanomaly") sitefile = "dailyhighanomaly.dat" sitedata = asciiread(sitefile,-1,"string") sitelats = tofloat(str_get_field(sitedata,1,delim)) sitelons = tofloat(str_get_field(sitedata,2,delim)) siteanom = tofloat(str_get_field(sitedata,3,delim)) size = dimsizes(sitelons) plot = gsn_csm_contour_map(wks,fillvarlevel,res) labels = (/"-20","-16","-12","-8","-4","0","4","8","12","16","20","F"/) lbres = True ; Set up a resource list for the labelbar. lbres@vpWidthF = 0.1 lbres@vpHeightF = 0.25 lbres@lbBoxLinesOn = False lbres@lbFillColors = (/27,47,67,87,107,127,147,167,187,207,227,-1/) lbres@lbMonoFillPattern = True lbres@lbOrientation = "Vertical" lbres@lbPerimOn = False lbres@lbLabelFontHeightF = .013 lbres@lbLabelAutoStride = True lbid = gsn_create_labelbar_ndc(wks,12,labels,.7,.5,lbres) amres = True amres@amZone = 0 amres@amParallelPosF = 0.4 amres@amOrthogonalPosF = 0 annoid = gsn_add_annotation(plot,lbid,amres) ;;;;;;;;;;;; this part tells the marker what color to be based on the anomaly markercolors = new(size(0),"integer") do n=0,size(0)-1,1 markercolors(n) = round((siteanom(n)*5),3)+127 end do markercolors=where((markercolors.lt.17),17,markercolors) markercolors=where((markercolors.gt.255),237,markercolors) tres@txFontHeightF = 0.014 stationmarker = new(size(0),graphic) do n=0,size(0)-1,1 mres = True ; marker resources for best track mres@gsMarkerIndex = 16 ; marker style (filled circle) mres@gsMarkerSizeF = 23.0 ; marker size mres@gsMarkerColor = markercolors(n) ; marker color mres@tfPolyDrawOrder= "PostDraw" stationmarker(n) = gsn_add_polymarker(wks,plot,sitelons(n),sitelats(n),mres) tres = True ; text mods desired tres@tfPolyDrawOrder = "PostDraw" tres@txFont = "helvetica-bold" if any(siteanom.lt.-9.5) tres@txFontHeightF = 0.010 end if stationtext = gsn_add_text(wks,plot,round(siteanom(n),3),sitelons(n),sitelats(n),tres) end do tres@txFontHeightF = 0.022 dum = gsn_add_text(wks,plot,"Yesterday's High Temperature Anomaly",-77.5,41.4,tres) tres@txFontHeightF = 0.015 dum = gsn_add_text(wks,plot,"(data for at least 90% of the day is required)",-77.5,41.0,tres) tres@txFont = "helvetica" tres@txJust = "CenterLeft" tres@txFontHeightF = .010 label = "Image Created By Nick Bassill" tres@txFontOpacityF = .5 gsn_text_ndc(wks,label,.001,.77 ,tres) label = "Data Provided By The NYS Mesonet" gsn_text_ndc(wks,label,.001,.75 ,tres) tres@txJust = "CenterCenter" tres@txFontOpacityF = 1 gsn_text_ndc(wks,".",.99,.99 ,tres) draw(plot) frame(wks) delete(sitefile) delete(sitelats) delete(sitelons) delete(sitedata) delete(siteanom) delete(markercolors) delete(stationmarker) ; make dailylowanomaly plot below wks_type = "png" wks_type@wkWidth = 2000 wks_type@wkHeight = 1600 wks = gsn_open_wks(wks_type,"dailylowanomaly") sitefile = "dailylowanomaly.dat" sitedata = asciiread(sitefile,-1,"string") sitelats = tofloat(str_get_field(sitedata,1,delim)) sitelons = tofloat(str_get_field(sitedata,2,delim)) siteanom = tofloat(str_get_field(sitedata,3,delim)) size = dimsizes(sitelons) plot = gsn_csm_contour_map(wks,fillvarlevel,res) labels = (/"-20","-16","-12","-8","-4","0","4","8","12","16","20","F"/) lbres = True ; Set up a resource list for the labelbar. lbres@vpWidthF = 0.1 lbres@vpHeightF = 0.25 lbres@lbBoxLinesOn = False lbres@lbFillColors = (/27,47,67,87,107,127,147,167,187,207,227,-1/) lbres@lbMonoFillPattern = True lbres@lbOrientation = "Vertical" lbres@lbPerimOn = False lbres@lbLabelFontHeightF = .013 lbres@lbLabelAutoStride = True lbid = gsn_create_labelbar_ndc(wks,12,labels,.7,.5,lbres) amres = True amres@amZone = 0 amres@amParallelPosF = 0.4 amres@amOrthogonalPosF = 0 annoid = gsn_add_annotation(plot,lbid,amres) ;;;;;;;;;;;; this part tells the marker what color to be based on the anomaly markercolors = new(size(0),"integer") do n=0,size(0)-1,1 markercolors(n) = round((siteanom(n)*5),3)+127 end do markercolors=where((markercolors.lt.17),17,markercolors) markercolors=where((markercolors.gt.255),237,markercolors) tres@txFontHeightF = 0.014 stationmarker = new(size(0),graphic) do n=0,size(0)-1,1 mres = True ; marker resources for best track mres@gsMarkerIndex = 16 ; marker style (filled circle) mres@gsMarkerSizeF = 23.0 ; marker size mres@gsMarkerColor = markercolors(n) ; marker color mres@tfPolyDrawOrder= "PostDraw" stationmarker(n) = gsn_add_polymarker(wks,plot,sitelons(n),sitelats(n),mres) tres = True ; text mods desired tres@tfPolyDrawOrder = "PostDraw" tres@txFont = "helvetica-bold" if any(siteanom.lt.-9.5) tres@txFontHeightF = 0.010 end if stationtext = gsn_add_text(wks,plot,round(siteanom(n),3),sitelons(n),sitelats(n),tres) end do tres@txFontHeightF = 0.022 dum = gsn_add_text(wks,plot,"Yesterday's Low Temperature Anomaly",-77.5,41.4,tres) tres@txFontHeightF = 0.015 dum = gsn_add_text(wks,plot,"(data for at least 90% of the day is required)",-77.5,41.0,tres) tres@txFont = "helvetica" tres@txJust = "CenterLeft" tres@txFontHeightF = .010 label = "Image Created By Nick Bassill" tres@txFontOpacityF = .5 gsn_text_ndc(wks,label,.001,.77 ,tres) label = "Data Provided By The NYS Mesonet" gsn_text_ndc(wks,label,.001,.75 ,tres) tres@txJust = "CenterCenter" tres@txFontOpacityF = 1 gsn_text_ndc(wks,".",.99,.99 ,tres) draw(plot) frame(wks) delete(sitefile) delete(sitelats) delete(sitelons) delete(sitedata) delete(siteanom) delete(markercolors) delete(stationmarker) ; make monthlyhighanomaly plot below wks_type = "png" wks_type@wkWidth = 2000 wks_type@wkHeight = 1600 wks = gsn_open_wks(wks_type,"monthlyhighanomaly") sitefile = "monthlyhighanomaly.dat" sitedata = asciiread(sitefile,-1,"string") sitelats = tofloat(str_get_field(sitedata,1,delim)) sitelons = tofloat(str_get_field(sitedata,2,delim)) siteanom = tofloat(str_get_field(sitedata,3,delim)) size = dimsizes(sitelons) plot = gsn_csm_contour_map(wks,fillvarlevel,res) labels = (/"-10","-8","-6","-4","-2","0","2","4","6","8","10","F"/) lbres = True ; Set up a resource list for the labelbar. lbres@vpWidthF = 0.1 lbres@vpHeightF = 0.25 lbres@lbBoxLinesOn = False lbres@lbFillColors = (/27,47,67,87,107,127,147,167,187,207,227,-1/) lbres@lbMonoFillPattern = True lbres@lbOrientation = "Vertical" lbres@lbPerimOn = False lbres@lbLabelFontHeightF = .013 lbres@lbLabelAutoStride = True lbid = gsn_create_labelbar_ndc(wks,12,labels,.7,.5,lbres) amres = True amres@amZone = 0 amres@amParallelPosF = 0.4 amres@amOrthogonalPosF = 0 annoid = gsn_add_annotation(plot,lbid,amres) ;;;;;;;;;;;; this part tells the marker what color to be based on the anomaly markercolors = new(size(0),"integer") do n=0,size(0)-1,1 markercolors(n) = round((siteanom(n)*10),3)+127 end do markercolors=where((markercolors.lt.17),17,markercolors) markercolors=where((markercolors.gt.255),237,markercolors) stationmarker = new(size(0),graphic) do n=0,size(0)-1,1 mres = True ; marker resources for best track mres@gsMarkerIndex = 16 ; marker style (filled circle) mres@gsMarkerSizeF = 23.0 ; marker size mres@gsMarkerColor = markercolors(n) ; marker color mres@tfPolyDrawOrder= "PostDraw" stationmarker(n) = gsn_add_polymarker(wks,plot,sitelons(n),sitelats(n),mres) tres = True ; text mods desired tres@tfPolyDrawOrder = "PostDraw" tres@txFont = "helvetica-bold" tres@txFontHeightF = 0.014 if any(siteanom.lt.-9.5) tres@txFontHeightF = 0.011 end if stationtext = gsn_add_text(wks,plot,round(siteanom(n),3),sitelons(n),sitelats(n),tres) end do tres@txFontHeightF = 0.025 dum = gsn_add_text(wks,plot,"30 Day High Temperature Anomaly",-77.5,41.4,tres) tres@txFontHeightF = 0.015 dum = gsn_add_text(wks,plot,"(data for a minimum of 28 days is required)",-77.5,41.0,tres) tres@txFont = "helvetica" tres@txJust = "CenterLeft" tres@txFontHeightF = .010 label = "Image Created By Nick Bassill" tres@txFontOpacityF = .5 gsn_text_ndc(wks,label,.001,.77 ,tres) label = "Data Provided By The NYS Mesonet" gsn_text_ndc(wks,label,.001,.75 ,tres) tres@txJust = "CenterCenter" tres@txFontOpacityF = 1 gsn_text_ndc(wks,".",.99,.99 ,tres) draw(plot) frame(wks) delete(sitefile) delete(sitelats) delete(sitelons) delete(sitedata) delete(siteanom) delete(markercolors) delete(stationmarker) ; make monthlylowanomaly plot below wks_type = "png" wks_type@wkWidth = 2000 wks_type@wkHeight = 1600 wks = gsn_open_wks(wks_type,"monthlylowanomaly") sitefile = "monthlylowanomaly.dat" sitedata = asciiread(sitefile,-1,"string") sitelats = tofloat(str_get_field(sitedata,1,delim)) sitelons = tofloat(str_get_field(sitedata,2,delim)) siteanom = tofloat(str_get_field(sitedata,3,delim)) size = dimsizes(sitelons) plot = gsn_csm_contour_map(wks,fillvarlevel,res) labels = (/"-10","-8","-6","-4","-2","0","2","4","6","8","10","F"/) lbres = True ; Set up a resource list for the labelbar. lbres@vpWidthF = 0.1 lbres@vpHeightF = 0.25 lbres@lbBoxLinesOn = False lbres@lbFillColors = (/27,47,67,87,107,127,147,167,187,207,227,-1/) lbres@lbMonoFillPattern = True lbres@lbOrientation = "Vertical" lbres@lbPerimOn = False lbres@lbLabelFontHeightF = .013 lbres@lbLabelAutoStride = True lbid = gsn_create_labelbar_ndc(wks,12,labels,.7,.5,lbres) amres = True amres@amZone = 0 amres@amParallelPosF = 0.4 amres@amOrthogonalPosF = 0 annoid = gsn_add_annotation(plot,lbid,amres) ;;;;;;;;;;;; this part tells the marker what color to be based on the anomaly markercolors = new(size(0),"integer") do n=0,size(0)-1,1 markercolors(n) = round((siteanom(n)*10),3)+127 end do markercolors=where((markercolors.lt.17),17,markercolors) markercolors=where((markercolors.gt.255),237,markercolors) stationmarker = new(size(0),graphic) do n=0,size(0)-1,1 mres = True ; marker resources for best track mres@gsMarkerIndex = 16 ; marker style (filled circle) mres@gsMarkerSizeF = 23.0 ; marker size mres@gsMarkerColor = markercolors(n) ; marker color mres@tfPolyDrawOrder= "PostDraw" stationmarker(n) = gsn_add_polymarker(wks,plot,sitelons(n),sitelats(n),mres) tres = True ; text mods desired tres@tfPolyDrawOrder = "PostDraw" tres@txFont = "helvetica-bold" tres@txFontHeightF = 0.014 if any(siteanom.lt.-9.5) tres@txFontHeightF = 0.011 end if stationtext = gsn_add_text(wks,plot,round(siteanom(n),3),sitelons(n),sitelats(n),tres) end do tres@txFontHeightF = 0.025 dum = gsn_add_text(wks,plot,"30 Day Low Temperature Anomaly",-77.5,41.4,tres) tres@txFontHeightF = 0.015 dum = gsn_add_text(wks,plot,"(data for a minimum of 28 days is required)",-77.5,41.0,tres) tres@txFont = "helvetica" tres@txJust = "CenterLeft" tres@txFontHeightF = .010 label = "Image Created By Nick Bassill" tres@txFontOpacityF = .5 gsn_text_ndc(wks,label,.001,.77 ,tres) label = "Data Provided By The NYS Mesonet" gsn_text_ndc(wks,label,.001,.75 ,tres) tres@txJust = "CenterCenter" tres@txFontOpacityF = 1 gsn_text_ndc(wks,".",.99,.99 ,tres) draw(plot) frame(wks) delete(sitefile) delete(sitelats) delete(sitelons) delete(sitedata) delete(siteanom) delete(markercolors) delete(stationmarker) ; make monthlyhigh plot below wks_type = "png" wks_type@wkWidth = 2000 wks_type@wkHeight = 1600 wks = gsn_open_wks(wks_type,"monthlyhigh") sitefile = "monthlyhigh.dat" sitedata = asciiread(sitefile,-1,"string") sitelats = tofloat(str_get_field(sitedata,1,delim)) sitelons = tofloat(str_get_field(sitedata,2,delim)) siteanom = tofloat(str_get_field(sitedata,3,delim)) size = dimsizes(sitelons) plot = gsn_csm_contour_map(wks,fillvarlevel,res) delete(labels) delete(lbres@lbFillColors) delete(lbid) labels = (/"-40","-30","-20","-10","0","10","20","30","40","50","60","70","80","90","100","F"/) lbres = True ; Set up a resource list for the labelbar. lbres@vpWidthF = 0.1 lbres@vpHeightF = 0.35 lbres@lbBoxLinesOn = False lbres@lbFillColors = (/25,40,55,70,85,100,115,130,145,160,175,190,205,220,235,-1/) lbres@lbMonoFillPattern = True lbres@lbOrientation = "Vertical" lbres@lbPerimOn = False lbres@lbLabelFontHeightF = .013 lbres@lbLabelAutoStride = False lbres@lbLabelStride = 1 lbid = gsn_create_labelbar_ndc(wks,16,labels,.7,.5,lbres) amres = True amres@amZone = 0 amres@amParallelPosF = 0.4 amres@amOrthogonalPosF = 0 annoid = gsn_add_annotation(plot,lbid,amres) ;;;;;;;;;;;; this part tells the marker what color to be based on the anomaly markercolors = new(size(0),"integer") do n=0,size(0)-1,1 markercolors(n) = round(1.5*(siteanom(n)),3)+100 end do markercolors=where((markercolors.lt.17),17,markercolors) markercolors=where((markercolors.gt.255),237,markercolors) stationmarker = new(size(0),graphic) do n=0,size(0)-1,1 mres = True ; marker resources for best track mres@gsMarkerIndex = 16 ; marker style (filled circle) mres@gsMarkerSizeF = 23.0 ; marker size mres@gsMarkerColor = markercolors(n) ; marker color mres@tfPolyDrawOrder= "PostDraw" stationmarker(n) = gsn_add_polymarker(wks,plot,sitelons(n),sitelats(n),mres) tres = True ; text mods desired tres@tfPolyDrawOrder = "PostDraw" tres@txFont = "helvetica-bold" tres@txFontHeightF = 0.014 if any(siteanom.lt.-9.5) tres@txFontHeightF = 0.011 end if stationtext = gsn_add_text(wks,plot,round(siteanom(n),3),sitelons(n),sitelats(n),tres) end do tres@txFontHeightF = 0.025 dum = gsn_add_text(wks,plot,"30 Day Average High Temperature",-77.5,41.4,tres) tres@txFontHeightF = 0.015 dum = gsn_add_text(wks,plot,"(data for a minimum of 28 days is required)",-77.5,41.0,tres) tres@txFont = "helvetica" tres@txJust = "CenterLeft" tres@txFontHeightF = .010 label = "Image Created By Nick Bassill" tres@txFontOpacityF = .5 gsn_text_ndc(wks,label,.001,.77 ,tres) label = "Data Provided By The NYS Mesonet" gsn_text_ndc(wks,label,.001,.75 ,tres) tres@txJust = "CenterCenter" tres@txFontOpacityF = 1 gsn_text_ndc(wks,".",.99,.99 ,tres) draw(plot) frame(wks) delete(sitefile) delete(sitelats) delete(sitelons) delete(sitedata) delete(siteanom) delete(markercolors) delete(stationmarker) ; make monthlylow plot below wks_type = "png" wks_type@wkWidth = 2000 wks_type@wkHeight = 1600 wks = gsn_open_wks(wks_type,"monthlylow") sitefile = "monthlylow.dat" sitedata = asciiread(sitefile,-1,"string") sitelats = tofloat(str_get_field(sitedata,1,delim)) sitelons = tofloat(str_get_field(sitedata,2,delim)) siteanom = tofloat(str_get_field(sitedata,3,delim)) size = dimsizes(sitelons) plot = gsn_csm_contour_map(wks,fillvarlevel,res) labels = (/"-40","-30","-20","-10","0","10","20","30","40","50","60","70","80","90","100","F"/) lbres = True ; Set up a resource list for the labelbar. lbres@vpWidthF = 0.1 lbres@vpHeightF = 0.35 lbres@lbBoxLinesOn = False lbres@lbFillColors = (/25,40,55,70,85,100,115,130,145,160,175,190,205,220,235,-1/) lbres@lbMonoFillPattern = True lbres@lbOrientation = "Vertical" lbres@lbPerimOn = False lbres@lbLabelFontHeightF = .013 lbres@lbLabelAutoStride = False lbres@lbLabelStride = 1 lbid = gsn_create_labelbar_ndc(wks,16,labels,.7,.5,lbres) amres = True amres@amZone = 0 amres@amParallelPosF = 0.4 amres@amOrthogonalPosF = 0 annoid = gsn_add_annotation(plot,lbid,amres) ;;;;;;;;;;;; this part tells the marker what color to be based on the anomaly markercolors = new(size(0),"integer") do n=0,size(0)-1,1 markercolors(n) = round(1.5*(siteanom(n)),3)+100 end do markercolors=where((markercolors.lt.17),17,markercolors) markercolors=where((markercolors.gt.255),237,markercolors) stationmarker = new(size(0),graphic) do n=0,size(0)-1,1 mres = True ; marker resources for best track mres@gsMarkerIndex = 16 ; marker style (filled circle) mres@gsMarkerSizeF = 23.0 ; marker size mres@gsMarkerColor = markercolors(n) ; marker color mres@tfPolyDrawOrder= "PostDraw" stationmarker(n) = gsn_add_polymarker(wks,plot,sitelons(n),sitelats(n),mres) tres = True ; text mods desired tres@tfPolyDrawOrder = "PostDraw" tres@txFont = "helvetica-bold" tres@txFontHeightF = 0.014 if any(siteanom.lt.-9.5) tres@txFontHeightF = 0.011 end if stationtext = gsn_add_text(wks,plot,round(siteanom(n),3),sitelons(n),sitelats(n),tres) end do tres@txFontHeightF = 0.025 dum = gsn_add_text(wks,plot,"30 Day Average Low Temperature",-77.5,41.4,tres) tres@txFontHeightF = 0.015 dum = gsn_add_text(wks,plot,"(data for a minimum of 28 days is required)",-77.5,41.0,tres) tres@txFont = "helvetica" tres@txJust = "CenterLeft" tres@txFontHeightF = .010 label = "Image Created By Nick Bassill" tres@txFontOpacityF = .5 gsn_text_ndc(wks,label,.001,.77 ,tres) label = "Data Provided By The NYS Mesonet" gsn_text_ndc(wks,label,.001,.75 ,tres) tres@txJust = "CenterCenter" tres@txFontOpacityF = 1 gsn_text_ndc(wks,".",.99,.99 ,tres) draw(plot) frame(wks) delete(sitefile) delete(sitelats) delete(sitelons) delete(sitedata) delete(siteanom) delete(markercolors) delete(stationmarker) ; make monthlymean plot below wks_type = "png" wks_type@wkWidth = 2000 wks_type@wkHeight = 1600 wks = gsn_open_wks(wks_type,"monthlymean") sitefile = "monthlymean.dat" sitedata = asciiread(sitefile,-1,"string") sitelats = tofloat(str_get_field(sitedata,1,delim)) sitelons = tofloat(str_get_field(sitedata,2,delim)) siteanom = tofloat(str_get_field(sitedata,3,delim)) size = dimsizes(sitelons) plot = gsn_csm_contour_map(wks,fillvarlevel,res) labels = (/"-40","-30","-20","-10","0","10","20","30","40","50","60","70","80","90","100","F"/) lbres = True ; Set up a resource list for the labelbar. lbres@vpWidthF = 0.1 lbres@vpHeightF = 0.35 lbres@lbBoxLinesOn = False lbres@lbFillColors = (/25,40,55,70,85,100,115,130,145,160,175,190,205,220,235,-1/) lbres@lbMonoFillPattern = True lbres@lbOrientation = "Vertical" lbres@lbPerimOn = False lbres@lbLabelFontHeightF = .013 lbres@lbLabelAutoStride = False lbres@lbLabelStride = 1 lbid = gsn_create_labelbar_ndc(wks,16,labels,.7,.5,lbres) amres = True amres@amZone = 0 amres@amParallelPosF = 0.4 amres@amOrthogonalPosF = 0 annoid = gsn_add_annotation(plot,lbid,amres) ;;;;;;;;;;;; this part tells the marker what color to be based on the anomaly markercolors = new(size(0),"integer") do n=0,size(0)-1,1 markercolors(n) = round(1.5*(siteanom(n)),3)+100 end do markercolors=where((markercolors.lt.17),17,markercolors) markercolors=where((markercolors.gt.255),237,markercolors) stationmarker = new(size(0),graphic) do n=0,size(0)-1,1 mres = True ; marker resources for best track mres@gsMarkerIndex = 16 ; marker style (filled circle) mres@gsMarkerSizeF = 23.0 ; marker size mres@gsMarkerColor = markercolors(n) ; marker color mres@tfPolyDrawOrder= "PostDraw" stationmarker(n) = gsn_add_polymarker(wks,plot,sitelons(n),sitelats(n),mres) tres = True ; text mods desired tres@tfPolyDrawOrder = "PostDraw" tres@txFont = "helvetica-bold" tres@txFontHeightF = 0.014 if any(siteanom.lt.-9.5) tres@txFontHeightF = 0.011 end if stationtext = gsn_add_text(wks,plot,round(siteanom(n),3),sitelons(n),sitelats(n),tres) end do tres@txFontHeightF = 0.025 dum = gsn_add_text(wks,plot,"30 Day Average Mean Temperature",-77.5,41.4,tres) tres@txFontHeightF = 0.015 dum = gsn_add_text(wks,plot,"(data for a minimum of 28 days is required)",-77.5,41.0,tres) tres@txFont = "helvetica" tres@txJust = "CenterLeft" tres@txFontHeightF = .010 label = "Image Created By Nick Bassill" tres@txFontOpacityF = .5 gsn_text_ndc(wks,label,.001,.77 ,tres) label = "Data Provided By The NYS Mesonet" gsn_text_ndc(wks,label,.001,.75 ,tres) tres@txJust = "CenterCenter" tres@txFontOpacityF = 1 gsn_text_ndc(wks,".",.99,.99 ,tres) draw(plot) frame(wks) delete(sitefile) delete(sitelats) delete(sitelons) delete(sitedata) delete(siteanom) delete(markercolors) delete(stationmarker) delete(labels) delete(lbres@lbFillColors) delete(lbid) ; make threemonthlyhighanomaly plot below wks_type = "png" wks_type@wkWidth = 2000 wks_type@wkHeight = 1600 wks = gsn_open_wks(wks_type,"threemonthlyhighanomaly") sitefile = "threemonthlyhighanomaly.dat" sitedata = asciiread(sitefile,-1,"string") sitelats = tofloat(str_get_field(sitedata,1,delim)) sitelons = tofloat(str_get_field(sitedata,2,delim)) siteanom = tofloat(str_get_field(sitedata,3,delim)) size = dimsizes(sitelons) plot = gsn_csm_contour_map(wks,fillvarlevel,res) labels = (/"-10","-8","-6","-4","-2","0","2","4","6","8","10","F"/) lbres = True ; Set up a resource list for the labelbar. lbres@vpWidthF = 0.1 lbres@vpHeightF = 0.25 lbres@lbBoxLinesOn = False lbres@lbFillColors = (/27,47,67,87,107,127,147,167,187,207,227,-1/) lbres@lbMonoFillPattern = True lbres@lbOrientation = "Vertical" lbres@lbPerimOn = False lbres@lbLabelFontHeightF = .013 lbres@lbLabelAutoStride = True lbid = gsn_create_labelbar_ndc(wks,12,labels,.7,.5,lbres) amres = True amres@amZone = 0 amres@amParallelPosF = 0.4 amres@amOrthogonalPosF = 0 annoid = gsn_add_annotation(plot,lbid,amres) ;;;;;;;;;;;; this part tells the marker what color to be based on the anomaly markercolors = new(size(0),"integer") do n=0,size(0)-1,1 markercolors(n) = round((siteanom(n)*10),3)+127 end do markercolors=where((markercolors.lt.17),17,markercolors) markercolors=where((markercolors.gt.255),237,markercolors) stationmarker = new(size(0),graphic) do n=0,size(0)-1,1 mres = True ; marker resources for best track mres@gsMarkerIndex = 16 ; marker style (filled circle) mres@gsMarkerSizeF = 23.0 ; marker size mres@gsMarkerColor = markercolors(n) ; marker color mres@tfPolyDrawOrder= "PostDraw" stationmarker(n) = gsn_add_polymarker(wks,plot,sitelons(n),sitelats(n),mres) tres = True ; text mods desired tres@tfPolyDrawOrder = "PostDraw" tres@txFont = "helvetica-bold" tres@txFontHeightF = 0.014 if any(siteanom.lt.-9.5) tres@txFontHeightF = 0.011 end if stationtext = gsn_add_text(wks,plot,round(siteanom(n),3),sitelons(n),sitelats(n),tres) end do tres@txFontHeightF = 0.025 dum = gsn_add_text(wks,plot,"90 Day High Temperature Anomaly",-77.5,41.4,tres) tres@txFontHeightF = 0.015 dum = gsn_add_text(wks,plot,"(data for a minimum of 85 days is required)",-77.5,41.0,tres) tres@txFont = "helvetica" tres@txJust = "CenterLeft" tres@txFontHeightF = .010 label = "Image Created By Nick Bassill" tres@txFontOpacityF = .5 gsn_text_ndc(wks,label,.001,.77 ,tres) label = "Data Provided By The NYS Mesonet" gsn_text_ndc(wks,label,.001,.75 ,tres) tres@txJust = "CenterCenter" tres@txFontOpacityF = 1 gsn_text_ndc(wks,".",.99,.99 ,tres) draw(plot) frame(wks) delete(sitefile) delete(sitelats) delete(sitelons) delete(sitedata) delete(siteanom) delete(markercolors) delete(stationmarker) ; make threemonthlylowanomaly plot below wks_type = "png" wks_type@wkWidth = 2000 wks_type@wkHeight = 1600 wks = gsn_open_wks(wks_type,"threemonthlylowanomaly") sitefile = "threemonthlylowanomaly.dat" sitedata = asciiread(sitefile,-1,"string") sitelats = tofloat(str_get_field(sitedata,1,delim)) sitelons = tofloat(str_get_field(sitedata,2,delim)) siteanom = tofloat(str_get_field(sitedata,3,delim)) size = dimsizes(sitelons) plot = gsn_csm_contour_map(wks,fillvarlevel,res) labels = (/"-10","-8","-6","-4","-2","0","2","4","6","8","10","F"/) lbres = True ; Set up a resource list for the labelbar. lbres@vpWidthF = 0.1 lbres@vpHeightF = 0.25 lbres@lbBoxLinesOn = False lbres@lbFillColors = (/27,47,67,87,107,127,147,167,187,207,227,-1/) lbres@lbMonoFillPattern = True lbres@lbOrientation = "Vertical" lbres@lbPerimOn = False lbres@lbLabelFontHeightF = .013 lbres@lbLabelAutoStride = True lbid = gsn_create_labelbar_ndc(wks,12,labels,.7,.5,lbres) amres = True amres@amZone = 0 amres@amParallelPosF = 0.4 amres@amOrthogonalPosF = 0 annoid = gsn_add_annotation(plot,lbid,amres) ;;;;;;;;;;;; this part tells the marker what color to be based on the anomaly markercolors = new(size(0),"integer") do n=0,size(0)-1,1 markercolors(n) = round((siteanom(n)*10),3)+127 end do markercolors=where((markercolors.lt.17),17,markercolors) markercolors=where((markercolors.gt.255),237,markercolors) stationmarker = new(size(0),graphic) do n=0,size(0)-1,1 mres = True ; marker resources for best track mres@gsMarkerIndex = 16 ; marker style (filled circle) mres@gsMarkerSizeF = 23.0 ; marker size mres@gsMarkerColor = markercolors(n) ; marker color mres@tfPolyDrawOrder= "PostDraw" stationmarker(n) = gsn_add_polymarker(wks,plot,sitelons(n),sitelats(n),mres) tres = True ; text mods desired tres@tfPolyDrawOrder = "PostDraw" tres@txFont = "helvetica-bold" tres@txFontHeightF = 0.014 if any(siteanom.lt.-9.5) tres@txFontHeightF = 0.011 end if stationtext = gsn_add_text(wks,plot,round(siteanom(n),3),sitelons(n),sitelats(n),tres) end do tres@txFontHeightF = 0.025 dum = gsn_add_text(wks,plot,"90 Day Low Temperature Anomaly",-77.5,41.4,tres) tres@txFontHeightF = 0.015 dum = gsn_add_text(wks,plot,"(data for a minimum of 85 days is required)",-77.5,41.0,tres) tres@txFont = "helvetica" tres@txJust = "CenterLeft" tres@txFontHeightF = .010 label = "Image Created By Nick Bassill" tres@txFontOpacityF = .5 gsn_text_ndc(wks,label,.001,.77 ,tres) label = "Data Provided By The NYS Mesonet" gsn_text_ndc(wks,label,.001,.75 ,tres) tres@txJust = "CenterCenter" tres@txFontOpacityF = 1 gsn_text_ndc(wks,".",.99,.99 ,tres) draw(plot) frame(wks) delete(sitefile) delete(sitelats) delete(sitelons) delete(sitedata) delete(siteanom) delete(markercolors) delete(stationmarker) ; make threemonthlyhigh plot below wks_type = "png" wks_type@wkWidth = 2000 wks_type@wkHeight = 1600 wks = gsn_open_wks(wks_type,"threemonthlyhigh") sitefile = "threemonthlyhigh.dat" sitedata = asciiread(sitefile,-1,"string") sitelats = tofloat(str_get_field(sitedata,1,delim)) sitelons = tofloat(str_get_field(sitedata,2,delim)) siteanom = tofloat(str_get_field(sitedata,3,delim)) size = dimsizes(sitelons) plot = gsn_csm_contour_map(wks,fillvarlevel,res) delete(labels) delete(lbres@lbFillColors) delete(lbid) labels = (/"-40","-30","-20","-10","0","10","20","30","40","50","60","70","80","90","100","F"/) lbres = True ; Set up a resource list for the labelbar. lbres@vpWidthF = 0.1 lbres@vpHeightF = 0.35 lbres@lbBoxLinesOn = False lbres@lbFillColors = (/25,40,55,70,85,100,115,130,145,160,175,190,205,220,235,-1/) lbres@lbMonoFillPattern = True lbres@lbOrientation = "Vertical" lbres@lbPerimOn = False lbres@lbLabelFontHeightF = .013 lbres@lbLabelAutoStride = False lbres@lbLabelStride = 1 lbid = gsn_create_labelbar_ndc(wks,16,labels,.7,.5,lbres) amres = True amres@amZone = 0 amres@amParallelPosF = 0.4 amres@amOrthogonalPosF = 0 annoid = gsn_add_annotation(plot,lbid,amres) ;;;;;;;;;;;; this part tells the marker what color to be based on the anomaly markercolors = new(size(0),"integer") do n=0,size(0)-1,1 markercolors(n) = round(1.5*(siteanom(n)),3)+100 end do markercolors=where((markercolors.lt.17),17,markercolors) markercolors=where((markercolors.gt.255),237,markercolors) stationmarker = new(size(0),graphic) do n=0,size(0)-1,1 mres = True ; marker resources for best track mres@gsMarkerIndex = 16 ; marker style (filled circle) mres@gsMarkerSizeF = 23.0 ; marker size mres@gsMarkerColor = markercolors(n) ; marker color mres@tfPolyDrawOrder= "PostDraw" stationmarker(n) = gsn_add_polymarker(wks,plot,sitelons(n),sitelats(n),mres) tres = True ; text mods desired tres@tfPolyDrawOrder = "PostDraw" tres@txFont = "helvetica-bold" tres@txFontHeightF = 0.014 if any(siteanom.lt.-9.5) tres@txFontHeightF = 0.011 end if stationtext = gsn_add_text(wks,plot,round(siteanom(n),3),sitelons(n),sitelats(n),tres) end do tres@txFontHeightF = 0.025 dum = gsn_add_text(wks,plot,"90 Day Average High Temperature",-77.5,41.4,tres) tres@txFontHeightF = 0.015 dum = gsn_add_text(wks,plot,"(data for a minimum of 85 days is required)",-77.5,41.0,tres) tres@txFont = "helvetica" tres@txJust = "CenterLeft" tres@txFontHeightF = .010 label = "Image Created By Nick Bassill" tres@txFontOpacityF = .5 gsn_text_ndc(wks,label,.001,.77 ,tres) label = "Data Provided By The NYS Mesonet" gsn_text_ndc(wks,label,.001,.75 ,tres) tres@txJust = "CenterCenter" tres@txFontOpacityF = 1 gsn_text_ndc(wks,".",.99,.99 ,tres) draw(plot) frame(wks) delete(sitefile) delete(sitelats) delete(sitelons) delete(sitedata) delete(siteanom) delete(markercolors) delete(stationmarker) ; make threemonthlylow plot below wks_type = "png" wks_type@wkWidth = 2000 wks_type@wkHeight = 1600 wks = gsn_open_wks(wks_type,"threemonthlylow") sitefile = "threemonthlylow.dat" sitedata = asciiread(sitefile,-1,"string") sitelats = tofloat(str_get_field(sitedata,1,delim)) sitelons = tofloat(str_get_field(sitedata,2,delim)) siteanom = tofloat(str_get_field(sitedata,3,delim)) size = dimsizes(sitelons) plot = gsn_csm_contour_map(wks,fillvarlevel,res) labels = (/"-40","-30","-20","-10","0","10","20","30","40","50","60","70","80","90","100","F"/) lbres = True ; Set up a resource list for the labelbar. lbres@vpWidthF = 0.1 lbres@vpHeightF = 0.35 lbres@lbBoxLinesOn = False lbres@lbFillColors = (/25,40,55,70,85,100,115,130,145,160,175,190,205,220,235,-1/) lbres@lbMonoFillPattern = True lbres@lbOrientation = "Vertical" lbres@lbPerimOn = False lbres@lbLabelFontHeightF = .013 lbres@lbLabelAutoStride = False lbres@lbLabelStride = 1 lbid = gsn_create_labelbar_ndc(wks,16,labels,.7,.5,lbres) amres = True amres@amZone = 0 amres@amParallelPosF = 0.4 amres@amOrthogonalPosF = 0 annoid = gsn_add_annotation(plot,lbid,amres) ;;;;;;;;;;;; this part tells the marker what color to be based on the anomaly markercolors = new(size(0),"integer") do n=0,size(0)-1,1 markercolors(n) = round(1.5*(siteanom(n)),3)+100 end do markercolors=where((markercolors.lt.17),17,markercolors) markercolors=where((markercolors.gt.255),237,markercolors) stationmarker = new(size(0),graphic) do n=0,size(0)-1,1 mres = True ; marker resources for best track mres@gsMarkerIndex = 16 ; marker style (filled circle) mres@gsMarkerSizeF = 23.0 ; marker size mres@gsMarkerColor = markercolors(n) ; marker color mres@tfPolyDrawOrder= "PostDraw" stationmarker(n) = gsn_add_polymarker(wks,plot,sitelons(n),sitelats(n),mres) tres = True ; text mods desired tres@tfPolyDrawOrder = "PostDraw" tres@txFont = "helvetica-bold" tres@txFontHeightF = 0.014 if any(siteanom.lt.-9.5) tres@txFontHeightF = 0.011 end if stationtext = gsn_add_text(wks,plot,round(siteanom(n),3),sitelons(n),sitelats(n),tres) end do tres@txFontHeightF = 0.025 dum = gsn_add_text(wks,plot,"90 Day Average Low Temperature",-77.5,41.4,tres) tres@txFontHeightF = 0.015 dum = gsn_add_text(wks,plot,"(data for a minimum of 85 days is required)",-77.5,41.0,tres) tres@txFont = "helvetica" tres@txJust = "CenterLeft" tres@txFontHeightF = .010 label = "Image Created By Nick Bassill" tres@txFontOpacityF = .5 gsn_text_ndc(wks,label,.001,.77 ,tres) label = "Data Provided By The NYS Mesonet" gsn_text_ndc(wks,label,.001,.75 ,tres) tres@txJust = "CenterCenter" tres@txFontOpacityF = 1 gsn_text_ndc(wks,".",.99,.99 ,tres) draw(plot) frame(wks) delete(sitefile) delete(sitelats) delete(sitelons) delete(sitedata) delete(siteanom) delete(markercolors) delete(stationmarker) ; make threemonthlymean plot below wks_type = "png" wks_type@wkWidth = 2000 wks_type@wkHeight = 1600 wks = gsn_open_wks(wks_type,"threemonthlymean") sitefile = "threemonthlymean.dat" sitedata = asciiread(sitefile,-1,"string") sitelats = tofloat(str_get_field(sitedata,1,delim)) sitelons = tofloat(str_get_field(sitedata,2,delim)) siteanom = tofloat(str_get_field(sitedata,3,delim)) size = dimsizes(sitelons) plot = gsn_csm_contour_map(wks,fillvarlevel,res) labels = (/"-40","-30","-20","-10","0","10","20","30","40","50","60","70","80","90","100","F"/) lbres = True ; Set up a resource list for the labelbar. lbres@vpWidthF = 0.1 lbres@vpHeightF = 0.35 lbres@lbBoxLinesOn = False lbres@lbFillColors = (/25,40,55,70,85,100,115,130,145,160,175,190,205,220,235,-1/) lbres@lbMonoFillPattern = True lbres@lbOrientation = "Vertical" lbres@lbPerimOn = False lbres@lbLabelFontHeightF = .013 lbres@lbLabelAutoStride = False lbres@lbLabelStride = 1 lbid = gsn_create_labelbar_ndc(wks,16,labels,.7,.5,lbres) amres = True amres@amZone = 0 amres@amParallelPosF = 0.4 amres@amOrthogonalPosF = 0 annoid = gsn_add_annotation(plot,lbid,amres) ;;;;;;;;;;;; this part tells the marker what color to be based on the anomaly markercolors = new(size(0),"integer") do n=0,size(0)-1,1 markercolors(n) = round(1.5*(siteanom(n)),3)+100 end do markercolors=where((markercolors.lt.17),17,markercolors) markercolors=where((markercolors.gt.255),237,markercolors) stationmarker = new(size(0),graphic) do n=0,size(0)-1,1 mres = True ; marker resources for best track mres@gsMarkerIndex = 16 ; marker style (filled circle) mres@gsMarkerSizeF = 23.0 ; marker size mres@gsMarkerColor = markercolors(n) ; marker color mres@tfPolyDrawOrder= "PostDraw" stationmarker(n) = gsn_add_polymarker(wks,plot,sitelons(n),sitelats(n),mres) tres = True ; text mods desired tres@tfPolyDrawOrder = "PostDraw" tres@txFont = "helvetica-bold" tres@txFontHeightF = 0.014 if any(siteanom.lt.-9.5) tres@txFontHeightF = 0.011 end if stationtext = gsn_add_text(wks,plot,round(siteanom(n),3),sitelons(n),sitelats(n),tres) end do tres@txFontHeightF = 0.025 dum = gsn_add_text(wks,plot,"90 Day Average Mean Temperature",-77.5,41.4,tres) tres@txFontHeightF = 0.015 dum = gsn_add_text(wks,plot,"(data for a minimum of 85 days is required)",-77.5,41.0,tres) tres@txFont = "helvetica" tres@txJust = "CenterLeft" tres@txFontHeightF = .010 label = "Image Created By Nick Bassill" tres@txFontOpacityF = .5 gsn_text_ndc(wks,label,.001,.77 ,tres) label = "Data Provided By The NYS Mesonet" gsn_text_ndc(wks,label,.001,.75 ,tres) tres@txJust = "CenterCenter" tres@txFontOpacityF = 1 gsn_text_ndc(wks,".",.99,.99 ,tres) draw(plot) frame(wks) delete(sitefile) delete(sitelats) delete(sitelons) delete(sitedata) delete(siteanom) delete(markercolors) delete(stationmarker) ; make weeklyhigh plot below wks_type = "png" wks_type@wkWidth = 2000 wks_type@wkHeight = 1600 wks = gsn_open_wks(wks_type,"weeklyhigh") sitefile = "weeklyhigh.dat" sitedata = asciiread(sitefile,-1,"string") sitelats = tofloat(str_get_field(sitedata,1,delim)) sitelons = tofloat(str_get_field(sitedata,2,delim)) siteanom = tofloat(str_get_field(sitedata,3,delim)) size = dimsizes(sitelons) plot = gsn_csm_contour_map(wks,fillvarlevel,res) labels = (/"-40","-30","-20","-10","0","10","20","30","40","50","60","70","80","90","100","F"/) lbres = True ; Set up a resource list for the labelbar. lbres@vpWidthF = 0.1 lbres@vpHeightF = 0.35 lbres@lbBoxLinesOn = False lbres@lbFillColors = (/25,40,55,70,85,100,115,130,145,160,175,190,205,220,235,-1/) lbres@lbMonoFillPattern = True lbres@lbOrientation = "Vertical" lbres@lbPerimOn = False lbres@lbLabelFontHeightF = .013 lbres@lbLabelAutoStride = False lbres@lbLabelStride = 1 lbid = gsn_create_labelbar_ndc(wks,16,labels,.7,.5,lbres) amres = True amres@amZone = 0 amres@amParallelPosF = 0.4 amres@amOrthogonalPosF = 0 annoid = gsn_add_annotation(plot,lbid,amres) ;;;;;;;;;;;; this part tells the marker what color to be based on the anomaly markercolors = new(size(0),"integer") do n=0,size(0)-1,1 markercolors(n) = round(1.5*(siteanom(n)),3)+100 end do markercolors=where((markercolors.lt.17),17,markercolors) markercolors=where((markercolors.gt.255),237,markercolors) stationmarker = new(size(0),graphic) do n=0,size(0)-1,1 mres = True ; marker resources for best track mres@gsMarkerIndex = 16 ; marker style (filled circle) mres@gsMarkerSizeF = 23.0 ; marker size mres@gsMarkerColor = markercolors(n) ; marker color mres@tfPolyDrawOrder= "PostDraw" stationmarker(n) = gsn_add_polymarker(wks,plot,sitelons(n),sitelats(n),mres) tres = True ; text mods desired tres@tfPolyDrawOrder = "PostDraw" tres@txFont = "helvetica-bold" tres@txFontHeightF = 0.014 if any(siteanom.lt.-9.5) tres@txFontHeightF = 0.011 end if stationtext = gsn_add_text(wks,plot,round(siteanom(n),3),sitelons(n),sitelats(n),tres) end do tres@txFontHeightF = 0.025 dum = gsn_add_text(wks,plot,"7 Day Average High Temperature",-77.5,41.4,tres) tres@txFontHeightF = 0.015 dum = gsn_add_text(wks,plot,"(data for all 7 days is required)",-77.5,41.0,tres) tres@txFont = "helvetica" tres@txJust = "CenterLeft" tres@txFontHeightF = .010 label = "Image Created By Nick Bassill" tres@txFontOpacityF = .5 gsn_text_ndc(wks,label,.001,.77 ,tres) label = "Data Provided By The NYS Mesonet" gsn_text_ndc(wks,label,.001,.75 ,tres) tres@txJust = "CenterCenter" tres@txFontOpacityF = 1 gsn_text_ndc(wks,".",.99,.99 ,tres) draw(plot) frame(wks) delete(sitefile) delete(sitelats) delete(sitelons) delete(sitedata) delete(siteanom) delete(markercolors) delete(stationmarker) ; make weeklylow plot below wks_type = "png" wks_type@wkWidth = 2000 wks_type@wkHeight = 1600 wks = gsn_open_wks(wks_type,"weeklylow") sitefile = "weeklylow.dat" sitedata = asciiread(sitefile,-1,"string") sitelats = tofloat(str_get_field(sitedata,1,delim)) sitelons = tofloat(str_get_field(sitedata,2,delim)) siteanom = tofloat(str_get_field(sitedata,3,delim)) size = dimsizes(sitelons) plot = gsn_csm_contour_map(wks,fillvarlevel,res) labels = (/"-40","-30","-20","-10","0","10","20","30","40","50","60","70","80","90","100","F"/) lbres = True ; Set up a resource list for the labelbar. lbres@vpWidthF = 0.1 lbres@vpHeightF = 0.35 lbres@lbBoxLinesOn = False lbres@lbFillColors = (/25,40,55,70,85,100,115,130,145,160,175,190,205,220,235,-1/) lbres@lbMonoFillPattern = True lbres@lbOrientation = "Vertical" lbres@lbPerimOn = False lbres@lbLabelFontHeightF = .013 lbres@lbLabelAutoStride = False lbres@lbLabelStride = 1 lbid = gsn_create_labelbar_ndc(wks,16,labels,.7,.5,lbres) amres = True amres@amZone = 0 amres@amParallelPosF = 0.4 amres@amOrthogonalPosF = 0 annoid = gsn_add_annotation(plot,lbid,amres) ;;;;;;;;;;;; this part tells the marker what color to be based on the anomaly markercolors = new(size(0),"integer") do n=0,size(0)-1,1 markercolors(n) = round(1.5*(siteanom(n)),3)+100 end do markercolors=where((markercolors.lt.17),17,markercolors) markercolors=where((markercolors.gt.255),237,markercolors) stationmarker = new(size(0),graphic) do n=0,size(0)-1,1 mres = True ; marker resources for best track mres@gsMarkerIndex = 16 ; marker style (filled circle) mres@gsMarkerSizeF = 23.0 ; marker size mres@gsMarkerColor = markercolors(n) ; marker color mres@tfPolyDrawOrder= "PostDraw" stationmarker(n) = gsn_add_polymarker(wks,plot,sitelons(n),sitelats(n),mres) tres = True ; text mods desired tres@tfPolyDrawOrder = "PostDraw" tres@txFont = "helvetica-bold" tres@txFontHeightF = 0.014 if any(siteanom.lt.-9.5) tres@txFontHeightF = 0.011 end if stationtext = gsn_add_text(wks,plot,round(siteanom(n),3),sitelons(n),sitelats(n),tres) end do tres@txFontHeightF = 0.025 dum = gsn_add_text(wks,plot,"7 Day Average Low Temperature",-77.5,41.4,tres) tres@txFontHeightF = 0.015 dum = gsn_add_text(wks,plot,"(data for all 7 days is required)",-77.5,41.0,tres) tres@txFont = "helvetica" tres@txJust = "CenterLeft" tres@txFontHeightF = .010 label = "Image Created By Nick Bassill" tres@txFontOpacityF = .5 gsn_text_ndc(wks,label,.001,.77 ,tres) label = "Data Provided By The NYS Mesonet" gsn_text_ndc(wks,label,.001,.75 ,tres) tres@txJust = "CenterCenter" tres@txFontOpacityF = 1 gsn_text_ndc(wks,".",.99,.99 ,tres) draw(plot) frame(wks) delete(sitefile) delete(sitelats) delete(sitelons) delete(sitedata) delete(siteanom) delete(markercolors) delete(stationmarker) ; make weeklymean plot below wks_type = "png" wks_type@wkWidth = 2000 wks_type@wkHeight = 1600 wks = gsn_open_wks(wks_type,"weeklymean") sitefile = "weeklymean.dat" sitedata = asciiread(sitefile,-1,"string") sitelats = tofloat(str_get_field(sitedata,1,delim)) sitelons = tofloat(str_get_field(sitedata,2,delim)) siteanom = tofloat(str_get_field(sitedata,3,delim)) size = dimsizes(sitelons) plot = gsn_csm_contour_map(wks,fillvarlevel,res) labels = (/"-40","-30","-20","-10","0","10","20","30","40","50","60","70","80","90","100","F"/) lbres = True ; Set up a resource list for the labelbar. lbres@vpWidthF = 0.1 lbres@vpHeightF = 0.35 lbres@lbBoxLinesOn = False lbres@lbFillColors = (/25,40,55,70,85,100,115,130,145,160,175,190,205,220,235,-1/) lbres@lbMonoFillPattern = True lbres@lbOrientation = "Vertical" lbres@lbPerimOn = False lbres@lbLabelFontHeightF = .013 lbres@lbLabelAutoStride = False lbres@lbLabelStride = 1 lbid = gsn_create_labelbar_ndc(wks,16,labels,.7,.5,lbres) amres = True amres@amZone = 0 amres@amParallelPosF = 0.4 amres@amOrthogonalPosF = 0 annoid = gsn_add_annotation(plot,lbid,amres) ;;;;;;;;;;;; this part tells the marker what color to be based on the anomaly markercolors = new(size(0),"integer") do n=0,size(0)-1,1 markercolors(n) = round(1.5*(siteanom(n)),3)+100 end do markercolors=where((markercolors.lt.17),17,markercolors) markercolors=where((markercolors.gt.255),237,markercolors) stationmarker = new(size(0),graphic) do n=0,size(0)-1,1 mres = True ; marker resources for best track mres@gsMarkerIndex = 16 ; marker style (filled circle) mres@gsMarkerSizeF = 23.0 ; marker size mres@gsMarkerColor = markercolors(n) ; marker color mres@tfPolyDrawOrder= "PostDraw" stationmarker(n) = gsn_add_polymarker(wks,plot,sitelons(n),sitelats(n),mres) tres = True ; text mods desired tres@tfPolyDrawOrder = "PostDraw" tres@txFont = "helvetica-bold" tres@txFontHeightF = 0.014 if any(siteanom.lt.-9.5) tres@txFontHeightF = 0.011 end if stationtext = gsn_add_text(wks,plot,round(siteanom(n),3),sitelons(n),sitelats(n),tres) end do tres@txFontHeightF = 0.025 dum = gsn_add_text(wks,plot,"7 Day Average Mean Temperature",-77.5,41.4,tres) tres@txFontHeightF = 0.015 dum = gsn_add_text(wks,plot,"(data for all 7 days is required)",-77.5,41.0,tres) tres@txFont = "helvetica" tres@txJust = "CenterLeft" tres@txFontHeightF = .010 label = "Image Created By Nick Bassill" tres@txFontOpacityF = .5 gsn_text_ndc(wks,label,.001,.77 ,tres) label = "Data Provided By The NYS Mesonet" gsn_text_ndc(wks,label,.001,.75 ,tres) tres@txJust = "CenterCenter" tres@txFontOpacityF = 1 gsn_text_ndc(wks,".",.99,.99 ,tres) draw(plot) frame(wks) delete(sitefile) delete(sitelats) delete(sitelons) delete(sitedata) delete(siteanom) delete(markercolors) delete(stationmarker) ; make dailyhigh plot below wks_type = "png" wks_type@wkWidth = 2000 wks_type@wkHeight = 1600 wks = gsn_open_wks(wks_type,"dailyhigh") sitefile = "dailyhigh.dat" sitedata = asciiread(sitefile,-1,"string") sitelats = tofloat(str_get_field(sitedata,1,delim)) sitelons = tofloat(str_get_field(sitedata,2,delim)) siteanom = tofloat(str_get_field(sitedata,3,delim)) size = dimsizes(sitelons) plot = gsn_csm_contour_map(wks,fillvarlevel,res) labels = (/"-40","-30","-20","-10","0","10","20","30","40","50","60","70","80","90","100","F"/) lbres = True ; Set up a resource list for the labelbar. lbres@vpWidthF = 0.1 lbres@vpHeightF = 0.35 lbres@lbBoxLinesOn = False lbres@lbFillColors = (/25,40,55,70,85,100,115,130,145,160,175,190,205,220,235,-1/) lbres@lbMonoFillPattern = True lbres@lbOrientation = "Vertical" lbres@lbPerimOn = False lbres@lbLabelFontHeightF = .013 lbres@lbLabelAutoStride = False lbres@lbLabelStride = 1 lbid = gsn_create_labelbar_ndc(wks,16,labels,.7,.5,lbres) amres = True amres@amZone = 0 amres@amParallelPosF = 0.4 amres@amOrthogonalPosF = 0 annoid = gsn_add_annotation(plot,lbid,amres) ;;;;;;;;;;;; this part tells the marker what color to be based on the anomaly markercolors = new(size(0),"integer") do n=0,size(0)-1,1 markercolors(n) = round(1.5*(siteanom(n)),3)+100 end do markercolors=where((markercolors.lt.17),17,markercolors) markercolors=where((markercolors.gt.255),237,markercolors) stationmarker = new(size(0),graphic) do n=0,size(0)-1,1 mres = True ; marker resources for best track mres@gsMarkerIndex = 16 ; marker style (filled circle) mres@gsMarkerSizeF = 23.0 ; marker size mres@gsMarkerColor = markercolors(n) ; marker color mres@tfPolyDrawOrder= "PostDraw" stationmarker(n) = gsn_add_polymarker(wks,plot,sitelons(n),sitelats(n),mres) tres = True ; text mods desired tres@tfPolyDrawOrder = "PostDraw" tres@txFont = "helvetica-bold" tres@txFontHeightF = 0.014 if any(siteanom.lt.-9.5) tres@txFontHeightF = 0.011 end if stationtext = gsn_add_text(wks,plot,round(siteanom(n),3),sitelons(n),sitelats(n),tres) end do tres@txFontHeightF = 0.025 dum = gsn_add_text(wks,plot,"Yesterday's High Temperature",-77.5,41.4,tres) tres@txFontHeightF = 0.015 dum = gsn_add_text(wks,plot,"(data for at least 90% of the day is required)",-77.5,41.0,tres) tres@txFont = "helvetica" tres@txJust = "CenterLeft" tres@txFontHeightF = .010 label = "Image Created By Nick Bassill" tres@txFontOpacityF = .5 gsn_text_ndc(wks,label,.001,.77 ,tres) label = "Data Provided By The NYS Mesonet" gsn_text_ndc(wks,label,.001,.75 ,tres) tres@txJust = "CenterCenter" tres@txFontOpacityF = 1 gsn_text_ndc(wks,".",.99,.99 ,tres) draw(plot) frame(wks) delete(sitefile) delete(sitelats) delete(sitelons) delete(sitedata) delete(siteanom) delete(markercolors) delete(stationmarker) ; make dailylow plot below wks_type = "png" wks_type@wkWidth = 2000 wks_type@wkHeight = 1600 wks = gsn_open_wks(wks_type,"dailylow") sitefile = "dailylow.dat" sitedata = asciiread(sitefile,-1,"string") sitelats = tofloat(str_get_field(sitedata,1,delim)) sitelons = tofloat(str_get_field(sitedata,2,delim)) siteanom = tofloat(str_get_field(sitedata,3,delim)) size = dimsizes(sitelons) plot = gsn_csm_contour_map(wks,fillvarlevel,res) labels = (/"-40","-30","-20","-10","0","10","20","30","40","50","60","70","80","90","100","F"/) lbres = True ; Set up a resource list for the labelbar. lbres@vpWidthF = 0.1 lbres@vpHeightF = 0.35 lbres@lbBoxLinesOn = False lbres@lbFillColors = (/25,40,55,70,85,100,115,130,145,160,175,190,205,220,235,-1/) lbres@lbMonoFillPattern = True lbres@lbOrientation = "Vertical" lbres@lbPerimOn = False lbres@lbLabelFontHeightF = .013 lbres@lbLabelAutoStride = False lbres@lbLabelStride = 1 lbid = gsn_create_labelbar_ndc(wks,16,labels,.7,.5,lbres) amres = True amres@amZone = 0 amres@amParallelPosF = 0.4 amres@amOrthogonalPosF = 0 annoid = gsn_add_annotation(plot,lbid,amres) ;;;;;;;;;;;; this part tells the marker what color to be based on the anomaly markercolors = new(size(0),"integer") do n=0,size(0)-1,1 markercolors(n) = round(1.5*(siteanom(n)),3)+100 end do markercolors=where((markercolors.lt.17),17,markercolors) markercolors=where((markercolors.gt.255),237,markercolors) stationmarker = new(size(0),graphic) do n=0,size(0)-1,1 mres = True ; marker resources for best track mres@gsMarkerIndex = 16 ; marker style (filled circle) mres@gsMarkerSizeF = 23.0 ; marker size mres@gsMarkerColor = markercolors(n) ; marker color mres@tfPolyDrawOrder= "PostDraw" stationmarker(n) = gsn_add_polymarker(wks,plot,sitelons(n),sitelats(n),mres) tres = True ; text mods desired tres@tfPolyDrawOrder = "PostDraw" tres@txFont = "helvetica-bold" tres@txFontHeightF = 0.014 if any(siteanom.lt.-9.5) tres@txFontHeightF = 0.011 end if stationtext = gsn_add_text(wks,plot,round(siteanom(n),3),sitelons(n),sitelats(n),tres) end do tres@txFontHeightF = 0.025 dum = gsn_add_text(wks,plot,"Yesterday's Low Temperature",-77.5,41.4,tres) tres@txFontHeightF = 0.015 dum = gsn_add_text(wks,plot,"(data for at least 90% of the day is required)",-77.5,41.0,tres) tres@txFont = "helvetica" tres@txJust = "CenterLeft" tres@txFontHeightF = .010 label = "Image Created By Nick Bassill" tres@txFontOpacityF = .5 gsn_text_ndc(wks,label,.001,.77 ,tres) label = "Data Provided By The NYS Mesonet" gsn_text_ndc(wks,label,.001,.75 ,tres) tres@txJust = "CenterCenter" tres@txFontOpacityF = 1 gsn_text_ndc(wks,".",.99,.99 ,tres) draw(plot) frame(wks) delete(sitefile) delete(sitelats) delete(sitelons) delete(sitedata) delete(siteanom) delete(markercolors) delete(stationmarker) ; make dailymean plot below wks_type = "png" wks_type@wkWidth = 2000 wks_type@wkHeight = 1600 wks = gsn_open_wks(wks_type,"dailymean") sitefile = "dailymean.dat" sitedata = asciiread(sitefile,-1,"string") sitelats = tofloat(str_get_field(sitedata,1,delim)) sitelons = tofloat(str_get_field(sitedata,2,delim)) siteanom = tofloat(str_get_field(sitedata,3,delim)) size = dimsizes(sitelons) plot = gsn_csm_contour_map(wks,fillvarlevel,res) labels = (/"-40","-30","-20","-10","0","10","20","30","40","50","60","70","80","90","100","F"/) lbres = True ; Set up a resource list for the labelbar. lbres@vpWidthF = 0.1 lbres@vpHeightF = 0.35 lbres@lbBoxLinesOn = False lbres@lbFillColors = (/25,40,55,70,85,100,115,130,145,160,175,190,205,220,235,-1/) lbres@lbMonoFillPattern = True lbres@lbOrientation = "Vertical" lbres@lbPerimOn = False lbres@lbLabelFontHeightF = .013 lbres@lbLabelAutoStride = False lbres@lbLabelStride = 1 lbid = gsn_create_labelbar_ndc(wks,16,labels,.7,.5,lbres) amres = True amres@amZone = 0 amres@amParallelPosF = 0.4 amres@amOrthogonalPosF = 0 annoid = gsn_add_annotation(plot,lbid,amres) ;;;;;;;;;;;; this part tells the marker what color to be based on the anomaly markercolors = new(size(0),"integer") do n=0,size(0)-1,1 markercolors(n) = round(1.5*(siteanom(n)),3)+100 end do markercolors=where((markercolors.lt.17),17,markercolors) markercolors=where((markercolors.gt.255),237,markercolors) stationmarker = new(size(0),graphic) do n=0,size(0)-1,1 mres = True ; marker resources for best track mres@gsMarkerIndex = 16 ; marker style (filled circle) mres@gsMarkerSizeF = 23.0 ; marker size mres@gsMarkerColor = markercolors(n) ; marker color mres@tfPolyDrawOrder= "PostDraw" stationmarker(n) = gsn_add_polymarker(wks,plot,sitelons(n),sitelats(n),mres) tres = True ; text mods desired tres@tfPolyDrawOrder = "PostDraw" tres@txFont = "helvetica-bold" tres@txFontHeightF = 0.014 if any(siteanom.lt.-9.5) tres@txFontHeightF = 0.011 end if stationtext = gsn_add_text(wks,plot,round(siteanom(n),3),sitelons(n),sitelats(n),tres) end do tres@txFontHeightF = 0.025 dum = gsn_add_text(wks,plot,"Yesterday's Mean Temperature",-77.5,41.4,tres) tres@txFontHeightF = 0.015 dum = gsn_add_text(wks,plot,"(data for at least 90% of the day is required)",-77.5,41.0,tres) tres@txFont = "helvetica" tres@txJust = "CenterLeft" tres@txFontHeightF = .010 label = "Image Created By Nick Bassill" tres@txFontOpacityF = .5 gsn_text_ndc(wks,label,.001,.77 ,tres) label = "Data Provided By The NYS Mesonet" gsn_text_ndc(wks,label,.001,.75 ,tres) tres@txJust = "CenterCenter" tres@txFontOpacityF = 1 gsn_text_ndc(wks,".",.99,.99 ,tres) draw(plot) frame(wks) delete(sitefile) delete(sitelats) delete(sitelons) delete(sitedata) delete(siteanom) delete(markercolors) delete(stationmarker) ;;;;;;;;;; solar section below delete(labels) delete(lbres@lbFillColors) delete(lbid) ; make solar daily plot below wks_type = "png" wks_type@wkWidth = 2000 wks_type@wkHeight = 1600 wks = gsn_open_wks(wks_type,"solardaily") sitefile = "solardaily.dat" sitedata = asciiread(sitefile,-1,"string") sitelats = tofloat(str_get_field(sitedata,1,delim)) sitelons = tofloat(str_get_field(sitedata,2,delim)) siteanom = tofloat(str_get_field(sitedata,3,delim)) size = dimsizes(sitelons) plot = gsn_csm_contour_map(wks,fillvarlevel,res) labels = (/"3","6","9","12","15","18","21","24","27","30","33","MJ/m~S~2~N~"/) lbres = True ; Set up a resource list for the labelbar. lbres@vpWidthF = 0.1 lbres@vpHeightF = 0.25 lbres@lbBoxLinesOn = False lbres@lbFillColors = (/31,52,73,94,115,136,157,178,199,220,241,-1/) lbres@lbMonoFillPattern = True lbres@lbOrientation = "Vertical" lbres@lbPerimOn = False lbres@lbLabelFontHeightF = .013 lbres@lbLabelAutoStride = False lbid = gsn_create_labelbar_ndc(wks,12,labels,.7,.5,lbres) amres = True amres@amZone = 0 amres@amParallelPosF = 0.4 amres@amOrthogonalPosF = 0 annoid = gsn_add_annotation(plot,lbid,amres) ;;;;;;;;;;;; this part tells the marker what color to be based on the anomaly markercolors = new(size(0),"integer") do n=0,size(0)-1,1 markercolors(n) = round((siteanom(n)*7),3)+10 end do markercolors=where((markercolors.gt.255),255,markercolors) stationmarker = new(size(0),graphic) do n=0,size(0)-1,1 mres = True ; marker resources for best track mres@gsMarkerIndex = 16 ; marker style (filled circle) mres@gsMarkerSizeF = 23.0 ; marker size mres@gsMarkerColor = markercolors(n) ; marker color mres@tfPolyDrawOrder= "PostDraw" stationmarker(n) = gsn_add_polymarker(wks,plot,sitelons(n),sitelats(n),mres) tres = True ; text mods desired tres@tfPolyDrawOrder = "PostDraw" tres@txFont = "helvetica-bold" tres@txFontHeightF = 0.014 if any(siteanom.lt.-9.5) tres@txFontHeightF = 0.011 end if stationtext = gsn_add_text(wks,plot,round(siteanom(n),3),sitelons(n),sitelats(n),tres) end do tres@txFontHeightF = 0.03 dum = gsn_add_text(wks,plot,"Yesterday's Total Insolation",-77.5,41.4,tres) tres@txFontHeightF = 0.015 dum = gsn_add_text(wks,plot,"(data for at least 90% of the day is required)",-77.5,41.0,tres) tres@txFont = "helvetica" tres@txJust = "CenterLeft" tres@txFontHeightF = .010 label = "Image Created By Nick Bassill" tres@txFontOpacityF = .5 gsn_text_ndc(wks,label,.001,.77 ,tres) label = "Data Provided By The NYS Mesonet" gsn_text_ndc(wks,label,.001,.75 ,tres) tres@txJust = "CenterCenter" tres@txFontOpacityF = 1 gsn_text_ndc(wks,".",.99,.99 ,tres) draw(plot) frame(wks) delete(sitefile) delete(sitelats) delete(sitelons) delete(sitedata) delete(siteanom) delete(markercolors) delete(stationmarker) ; make solar weekly plot below wks_type = "png" wks_type@wkWidth = 2000 wks_type@wkHeight = 1600 wks = gsn_open_wks(wks_type,"solarweekly") sitefile = "solarweekly.dat" sitedata = asciiread(sitefile,-1,"string") sitelats = tofloat(str_get_field(sitedata,1,delim)) sitelons = tofloat(str_get_field(sitedata,2,delim)) siteanom = tofloat(str_get_field(sitedata,3,delim)) size = dimsizes(sitelons) plot = gsn_csm_contour_map(wks,fillvarlevel,res) labels = (/"3","6","9","12","15","18","21","24","27","30","33","MJ/m~S~2~N~"/) lbres = True ; Set up a resource list for the labelbar. lbres@vpWidthF = 0.1 lbres@vpHeightF = 0.25 lbres@lbBoxLinesOn = False lbres@lbFillColors = (/31,52,73,94,115,136,157,178,199,220,241,-1/) lbres@lbMonoFillPattern = True lbres@lbOrientation = "Vertical" lbres@lbPerimOn = False lbres@lbLabelFontHeightF = .013 lbres@lbLabelAutoStride = False lbid = gsn_create_labelbar_ndc(wks,12,labels,.7,.5,lbres) amres = True amres@amZone = 0 amres@amParallelPosF = 0.4 amres@amOrthogonalPosF = 0 annoid = gsn_add_annotation(plot,lbid,amres) ;;;;;;;;;;;; this part tells the marker what color to be based on the anomaly markercolors = new(size(0),"integer") do n=0,size(0)-1,1 markercolors(n) = round((siteanom(n)*7),3)+10 end do markercolors=where((markercolors.gt.255),255,markercolors) stationmarker = new(size(0),graphic) do n=0,size(0)-1,1 mres = True ; marker resources for best track mres@gsMarkerIndex = 16 ; marker style (filled circle) mres@gsMarkerSizeF = 23.0 ; marker size mres@gsMarkerColor = markercolors(n) ; marker color mres@tfPolyDrawOrder= "PostDraw" stationmarker(n) = gsn_add_polymarker(wks,plot,sitelons(n),sitelats(n),mres) tres = True ; text mods desired tres@tfPolyDrawOrder = "PostDraw" tres@txFont = "helvetica-bold" tres@txFontHeightF = 0.014 if any(siteanom.lt.-9.5) tres@txFontHeightF = 0.011 end if stationtext = gsn_add_text(wks,plot,round(siteanom(n),3),sitelons(n),sitelats(n),tres) end do tres@txFontHeightF = 0.03 dum = gsn_add_text(wks,plot,"7 Day Mean Daily Insolation",-77.5,41.4,tres) tres@txFontHeightF = 0.015 dum = gsn_add_text(wks,plot,"(data for all 7 days is required)",-77.5,41.0,tres) tres@txFont = "helvetica" tres@txJust = "CenterLeft" tres@txFontHeightF = .010 label = "Image Created By Nick Bassill" tres@txFontOpacityF = .5 gsn_text_ndc(wks,label,.001,.77 ,tres) label = "Data Provided By The NYS Mesonet" gsn_text_ndc(wks,label,.001,.75 ,tres) tres@txJust = "CenterCenter" tres@txFontOpacityF = 1 gsn_text_ndc(wks,".",.99,.99 ,tres) draw(plot) frame(wks) delete(sitefile) delete(sitelats) delete(sitelons) delete(sitedata) delete(siteanom) delete(markercolors) delete(stationmarker) ; make solar monthly plot below wks_type = "png" wks_type@wkWidth = 2000 wks_type@wkHeight = 1600 wks = gsn_open_wks(wks_type,"solarmonthly") sitefile = "solarmonthly.dat" sitedata = asciiread(sitefile,-1,"string") sitelats = tofloat(str_get_field(sitedata,1,delim)) sitelons = tofloat(str_get_field(sitedata,2,delim)) siteanom = tofloat(str_get_field(sitedata,3,delim)) size = dimsizes(sitelons) plot = gsn_csm_contour_map(wks,fillvarlevel,res) labels = (/"3","6","9","12","15","18","21","24","27","30","33","MJ/m~S~2~N~"/) lbres = True ; Set up a resource list for the labelbar. lbres@vpWidthF = 0.1 lbres@vpHeightF = 0.25 lbres@lbBoxLinesOn = False lbres@lbFillColors = (/31,52,73,94,115,136,157,178,199,220,241,-1/) lbres@lbMonoFillPattern = True lbres@lbOrientation = "Vertical" lbres@lbPerimOn = False lbres@lbLabelFontHeightF = .013 lbres@lbLabelAutoStride = False lbid = gsn_create_labelbar_ndc(wks,12,labels,.7,.5,lbres) amres = True amres@amZone = 0 amres@amParallelPosF = 0.4 amres@amOrthogonalPosF = 0 annoid = gsn_add_annotation(plot,lbid,amres) ;;;;;;;;;;;; this part tells the marker what color to be based on the anomaly markercolors = new(size(0),"integer") do n=0,size(0)-1,1 markercolors(n) = round((siteanom(n)*7),3)+10 end do ;markercolors=where((markercolors.lt.17),17,markercolors) markercolors=where((markercolors.gt.255),255,markercolors) stationmarker = new(size(0),graphic) do n=0,size(0)-1,1 mres = True ; marker resources for best track mres@gsMarkerIndex = 16 ; marker style (filled circle) mres@gsMarkerSizeF = 23.0 ; marker size mres@gsMarkerColor = markercolors(n) ; marker color mres@tfPolyDrawOrder= "PostDraw" stationmarker(n) = gsn_add_polymarker(wks,plot,sitelons(n),sitelats(n),mres) tres = True ; text mods desired tres@tfPolyDrawOrder = "PostDraw" tres@txFont = "helvetica-bold" tres@txFontHeightF = 0.014 if any(siteanom.lt.-9.5) tres@txFontHeightF = 0.011 end if stationtext = gsn_add_text(wks,plot,round(siteanom(n),3),sitelons(n),sitelats(n),tres) end do tres@txFontHeightF = 0.03 dum = gsn_add_text(wks,plot,"30 Day Mean Daily Insolation",-77.5,41.4,tres) tres@txFontHeightF = 0.015 dum = gsn_add_text(wks,plot,"(data for a minimum of 28 days is required)",-77.5,41.0,tres) tres@txFont = "helvetica" tres@txJust = "CenterLeft" tres@txFontHeightF = .010 label = "Image Created By Nick Bassill" tres@txFontOpacityF = .5 gsn_text_ndc(wks,label,.001,.77 ,tres) label = "Data Provided By The NYS Mesonet" gsn_text_ndc(wks,label,.001,.75 ,tres) tres@txJust = "CenterCenter" tres@txFontOpacityF = 1 gsn_text_ndc(wks,".",.99,.99 ,tres) draw(plot) frame(wks) delete(sitefile) delete(sitelats) delete(sitelons) delete(sitedata) delete(siteanom) delete(markercolors) delete(stationmarker) ; make solar three monthly plot below wks_type = "png" wks_type@wkWidth = 2000 wks_type@wkHeight = 1600 wks = gsn_open_wks(wks_type,"solarthreemonthly") sitefile = "solarthreemonthly.dat" sitedata = asciiread(sitefile,-1,"string") sitelats = tofloat(str_get_field(sitedata,1,delim)) sitelons = tofloat(str_get_field(sitedata,2,delim)) siteanom = tofloat(str_get_field(sitedata,3,delim)) size = dimsizes(sitelons) plot = gsn_csm_contour_map(wks,fillvarlevel,res) labels = (/"3","6","9","12","15","18","21","24","27","30","33","MJ/m~S~2~N~"/) lbres = True ; Set up a resource list for the labelbar. lbres@vpWidthF = 0.1 lbres@vpHeightF = 0.25 lbres@lbBoxLinesOn = False lbres@lbFillColors = (/31,52,73,94,115,136,157,178,199,220,241,-1/) lbres@lbMonoFillPattern = True lbres@lbOrientation = "Vertical" lbres@lbPerimOn = False lbres@lbLabelFontHeightF = .013 lbres@lbLabelAutoStride = False lbid = gsn_create_labelbar_ndc(wks,12,labels,.7,.5,lbres) amres = True amres@amZone = 0 amres@amParallelPosF = 0.4 amres@amOrthogonalPosF = 0 annoid = gsn_add_annotation(plot,lbid,amres) ;;;;;;;;;;;; this part tells the marker what color to be based on the anomaly markercolors = new(size(0),"integer") do n=0,size(0)-1,1 markercolors(n) = round((siteanom(n)*7),3)+10 end do ;markercolors=where((markercolors.lt.17),17,markercolors) markercolors=where((markercolors.gt.255),255,markercolors) stationmarker = new(size(0),graphic) do n=0,size(0)-1,1 mres = True ; marker resources for best track mres@gsMarkerIndex = 16 ; marker style (filled circle) mres@gsMarkerSizeF = 23.0 ; marker size mres@gsMarkerColor = markercolors(n) ; marker color mres@tfPolyDrawOrder= "PostDraw" stationmarker(n) = gsn_add_polymarker(wks,plot,sitelons(n),sitelats(n),mres) tres = True ; text mods desired tres@tfPolyDrawOrder = "PostDraw" tres@txFont = "helvetica-bold" tres@txFontHeightF = 0.014 if any(siteanom.lt.-9.5) tres@txFontHeightF = 0.011 end if stationtext = gsn_add_text(wks,plot,round(siteanom(n),3),sitelons(n),sitelats(n),tres) end do tres@txFontHeightF = 0.03 dum = gsn_add_text(wks,plot,"90 Day Mean Daily Insolation",-77.5,41.4,tres) tres@txFontHeightF = 0.015 dum = gsn_add_text(wks,plot,"(data for a minimum of 85 days is required)",-77.5,41.0,tres) tres@txFont = "helvetica" tres@txJust = "CenterLeft" tres@txFontHeightF = .010 label = "Image Created By Nick Bassill" tres@txFontOpacityF = .5 gsn_text_ndc(wks,label,.001,.77 ,tres) label = "Data Provided By The NYS Mesonet" gsn_text_ndc(wks,label,.001,.75 ,tres) tres@txJust = "CenterCenter" tres@txFontOpacityF = 1 gsn_text_ndc(wks,".",.99,.99 ,tres) draw(plot) frame(wks) delete(sitefile) delete(sitelats) delete(sitelons) delete(sitedata) delete(siteanom) delete(markercolors) delete(stationmarker) ;;;;;;; heating/cooling degree plots ; make daily cooling plot below wks_type = "png" wks_type@wkWidth = 2000 wks_type@wkHeight = 1600 wks = gsn_open_wks(wks_type,"dailycooling") sitefile = "dailycooling.dat" sitedata = asciiread(sitefile,-1,"string") sitelats = tofloat(str_get_field(sitedata,1,delim)) sitelons = tofloat(str_get_field(sitedata,2,delim)) siteanom = tofloat(str_get_field(sitedata,3,delim)) size = dimsizes(sitelons) plot = gsn_csm_contour_map(wks,fillvarlevel,res) labels = (/"0","2","4","6","8","10","12","14","16","18","20","CDD"/) lbres = True ; Set up a resource list for the labelbar. lbres@vpWidthF = 0.1 lbres@vpHeightF = 0.25 lbres@lbBoxLinesOn = False lbres@lbFillColors = (/20,40,60,80,100,120,140,160,180,200,220,-1/) lbres@lbMonoFillPattern = True lbres@lbOrientation = "Vertical" lbres@lbPerimOn = False lbres@lbLabelFontHeightF = .013 lbres@lbLabelAutoStride = False lbid = gsn_create_labelbar_ndc(wks,12,labels,.7,.5,lbres) amres = True amres@amZone = 0 amres@amParallelPosF = 0.4 amres@amOrthogonalPosF = 0 annoid = gsn_add_annotation(plot,lbid,amres) ;;;;;;;;;;;; this part tells the marker what color to be based on the anomaly markercolors = new(size(0),"integer") do n=0,size(0)-1,1 markercolors(n) = round((siteanom(n)*10),3)+20 end do markercolors=where((markercolors.gt.255),255,markercolors) stationmarker = new(size(0),graphic) do n=0,size(0)-1,1 mres = True ; marker resources for best track mres@gsMarkerIndex = 16 ; marker style (filled circle) mres@gsMarkerSizeF = 23.0 ; marker size mres@gsMarkerColor = markercolors(n) ; marker color mres@tfPolyDrawOrder= "PostDraw" stationmarker(n) = gsn_add_polymarker(wks,plot,sitelons(n),sitelats(n),mres) tres = True ; text mods desired tres@tfPolyDrawOrder = "PostDraw" tres@txFont = "helvetica-bold" tres@txFontHeightF = 0.014 if any(siteanom.lt.-9.5) tres@txFontHeightF = 0.011 end if stationtext = gsn_add_text(wks,plot,round(siteanom(n),3),sitelons(n),sitelats(n),tres) end do tres@txFontHeightF = 0.025 dum = gsn_add_text(wks,plot,"Yesterday's Cooling Degree Days",-77.5,41.4,tres) tres@txFontHeightF = 0.015 dum = gsn_add_text(wks,plot,"(data for at least 90% of the day is required)",-77.5,41.0,tres) tres@txFont = "helvetica" tres@txJust = "CenterLeft" tres@txFontHeightF = .010 label = "Image Created By Nick Bassill" tres@txFontOpacityF = .5 gsn_text_ndc(wks,label,.001,.77 ,tres) label = "Data Provided By The NYS Mesonet" gsn_text_ndc(wks,label,.001,.75 ,tres) tres@txJust = "CenterCenter" tres@txFontOpacityF = 1 gsn_text_ndc(wks,".",.99,.99 ,tres) draw(plot) frame(wks) delete(sitefile) delete(sitelats) delete(sitelons) delete(sitedata) delete(siteanom) delete(markercolors) delete(stationmarker) ; make weekly cooling plot below wks_type = "png" wks_type@wkWidth = 2000 wks_type@wkHeight = 1600 wks = gsn_open_wks(wks_type,"weeklycooling") sitefile = "weeklycooling.dat" sitedata = asciiread(sitefile,-1,"string") sitelats = tofloat(str_get_field(sitedata,1,delim)) sitelons = tofloat(str_get_field(sitedata,2,delim)) siteanom = tofloat(str_get_field(sitedata,3,delim)) size = dimsizes(sitelons) plot = gsn_csm_contour_map(wks,fillvarlevel,res) labels = (/"0","10","20","30","40","50","60","70","80","90","100","CDD"/) lbres = True ; Set up a resource list for the labelbar. lbres@vpWidthF = 0.1 lbres@vpHeightF = 0.25 lbres@lbBoxLinesOn = False lbres@lbFillColors = (/20,40,60,80,100,120,140,160,180,200,220,-1/) lbres@lbMonoFillPattern = True lbres@lbOrientation = "Vertical" lbres@lbPerimOn = False lbres@lbLabelFontHeightF = .013 lbres@lbLabelAutoStride = False lbid = gsn_create_labelbar_ndc(wks,12,labels,.7,.5,lbres) amres = True amres@amZone = 0 amres@amParallelPosF = 0.4 amres@amOrthogonalPosF = 0 annoid = gsn_add_annotation(plot,lbid,amres) ;;;;;;;;;;;; this part tells the marker what color to be based on the anomaly markercolors = new(size(0),"integer") do n=0,size(0)-1,1 markercolors(n) = round((siteanom(n)*2),3)+20 end do markercolors=where((markercolors.gt.255),255,markercolors) stationmarker = new(size(0),graphic) do n=0,size(0)-1,1 mres = True ; marker resources for best track mres@gsMarkerIndex = 16 ; marker style (filled circle) mres@gsMarkerSizeF = 23.0 ; marker size mres@gsMarkerColor = markercolors(n) ; marker color mres@tfPolyDrawOrder= "PostDraw" stationmarker(n) = gsn_add_polymarker(wks,plot,sitelons(n),sitelats(n),mres) tres = True ; text mods desired tres@tfPolyDrawOrder = "PostDraw" tres@txFont = "helvetica-bold" tres@txFontHeightF = 0.014 if any(siteanom.lt.-9.5) tres@txFontHeightF = 0.011 end if stationtext = gsn_add_text(wks,plot,round(siteanom(n),3),sitelons(n),sitelats(n),tres) end do tres@txFontHeightF = 0.025 dum = gsn_add_text(wks,plot,"7 Day Total Cooling Degree Days",-77.5,41.4,tres) tres@txFontHeightF = 0.015 dum = gsn_add_text(wks,plot,"(data for all 7 days is required)",-77.5,41.0,tres) tres@txFont = "helvetica" tres@txJust = "CenterLeft" tres@txFontHeightF = .010 label = "Image Created By Nick Bassill" tres@txFontOpacityF = .5 gsn_text_ndc(wks,label,.001,.77 ,tres) label = "Data Provided By The NYS Mesonet" gsn_text_ndc(wks,label,.001,.75 ,tres) tres@txJust = "CenterCenter" tres@txFontOpacityF = 1 gsn_text_ndc(wks,".",.99,.99 ,tres) draw(plot) frame(wks) delete(sitefile) delete(sitelats) delete(sitelons) delete(sitedata) delete(siteanom) delete(markercolors) delete(stationmarker) ; make monthly cooling plot below wks_type = "png" wks_type@wkWidth = 2000 wks_type@wkHeight = 1600 wks = gsn_open_wks(wks_type,"monthlycooling") sitefile = "monthlycooling.dat" sitedata = asciiread(sitefile,-1,"string") sitelats = tofloat(str_get_field(sitedata,1,delim)) sitelons = tofloat(str_get_field(sitedata,2,delim)) siteanom = tofloat(str_get_field(sitedata,3,delim)) size = dimsizes(sitelons) plot = gsn_csm_contour_map(wks,fillvarlevel,res) labels = (/"0","50","100","150","200","250","300","350","400","450","500","CDD"/) lbres = True ; Set up a resource list for the labelbar. lbres@vpWidthF = 0.1 lbres@vpHeightF = 0.25 lbres@lbBoxLinesOn = False lbres@lbFillColors = (/5,30,55,80,105,130,155,180,205,230,255,-1/) lbres@lbMonoFillPattern = True lbres@lbOrientation = "Vertical" lbres@lbPerimOn = False lbres@lbLabelFontHeightF = .013 lbres@lbLabelAutoStride = False lbid = gsn_create_labelbar_ndc(wks,12,labels,.7,.5,lbres) amres = True amres@amZone = 0 amres@amParallelPosF = 0.4 amres@amOrthogonalPosF = 0 annoid = gsn_add_annotation(plot,lbid,amres) ;;;;;;;;;;;; this part tells the marker what color to be based on the anomaly markercolors = new(size(0),"integer") do n=0,size(0)-1,1 markercolors(n) = round((siteanom(n)*.5),3)+5 end do ;markercolors=where((markercolors.lt.17),17,markercolors) markercolors=where((markercolors.gt.255),255,markercolors) stationmarker = new(size(0),graphic) do n=0,size(0)-1,1 mres = True ; marker resources for best track mres@gsMarkerIndex = 16 ; marker style (filled circle) mres@gsMarkerSizeF = 23.0 ; marker size mres@gsMarkerColor = markercolors(n) ; marker color mres@tfPolyDrawOrder= "PostDraw" stationmarker(n) = gsn_add_polymarker(wks,plot,sitelons(n),sitelats(n),mres) tres = True ; text mods desired tres@tfPolyDrawOrder = "PostDraw" tres@txFont = "helvetica-bold" tres@txFontHeightF = 0.010 if any(siteanom.lt.-9.5) tres@txFontHeightF = 0.011 end if stationtext = gsn_add_text(wks,plot,round(siteanom(n),3),sitelons(n),sitelats(n),tres) end do tres@txFontHeightF = 0.025 dum = gsn_add_text(wks,plot,"30 Day Total Cooling Degree Days",-77.5,41.4,tres) tres@txFontHeightF = 0.015 dum = gsn_add_text(wks,plot,"(data for a minimum of 28 days is required)",-77.5,41.0,tres) tres@txFont = "helvetica" tres@txJust = "CenterLeft" tres@txFontHeightF = .010 label = "Image Created By Nick Bassill" tres@txFontOpacityF = .5 gsn_text_ndc(wks,label,.001,.77 ,tres) label = "Data Provided By The NYS Mesonet" gsn_text_ndc(wks,label,.001,.75 ,tres) tres@txJust = "CenterCenter" tres@txFontOpacityF = 1 gsn_text_ndc(wks,".",.99,.99 ,tres) draw(plot) frame(wks) delete(sitefile) delete(sitelats) delete(sitelons) delete(sitedata) delete(siteanom) delete(markercolors) delete(stationmarker) ; make three monthly cooling plot below wks_type = "png" wks_type@wkWidth = 2000 wks_type@wkHeight = 1600 wks = gsn_open_wks(wks_type,"threemonthlycooling") sitefile = "threemonthlycooling.dat" sitedata = asciiread(sitefile,-1,"string") sitelats = tofloat(str_get_field(sitedata,1,delim)) sitelons = tofloat(str_get_field(sitedata,2,delim)) siteanom = tofloat(str_get_field(sitedata,3,delim)) size = dimsizes(sitelons) plot = gsn_csm_contour_map(wks,fillvarlevel,res) labels = (/"0","100","200","300","400","500","600","700","800","900","1000","CDD"/) lbres = True ; Set up a resource list for the labelbar. lbres@vpWidthF = 0.1 lbres@vpHeightF = 0.25 lbres@lbBoxLinesOn = False lbres@lbFillColors = (/5,30,55,80,105,130,155,180,205,230,255,-1/) lbres@lbMonoFillPattern = True lbres@lbOrientation = "Vertical" lbres@lbPerimOn = False lbres@lbLabelFontHeightF = .013 lbres@lbLabelAutoStride = False lbid = gsn_create_labelbar_ndc(wks,12,labels,.7,.5,lbres) amres = True amres@amZone = 0 amres@amParallelPosF = 0.4 amres@amOrthogonalPosF = 0 annoid = gsn_add_annotation(plot,lbid,amres) ;;;;;;;;;;;; this part tells the marker what color to be based on the anomaly markercolors = new(size(0),"integer") do n=0,size(0)-1,1 markercolors(n) = round((siteanom(n)*.25),3)+5 end do ;markercolors=where((markercolors.lt.17),17,markercolors) markercolors=where((markercolors.gt.255),255,markercolors) stationmarker = new(size(0),graphic) do n=0,size(0)-1,1 mres = True ; marker resources for best track mres@gsMarkerIndex = 16 ; marker style (filled circle) mres@gsMarkerSizeF = 23.0 ; marker size mres@gsMarkerColor = markercolors(n) ; marker color mres@tfPolyDrawOrder= "PostDraw" stationmarker(n) = gsn_add_polymarker(wks,plot,sitelons(n),sitelats(n),mres) tres = True ; text mods desired tres@tfPolyDrawOrder = "PostDraw" tres@txFont = "helvetica-bold" tres@txFontHeightF = 0.010 if any(siteanom.lt.-9.5) tres@txFontHeightF = 0.011 end if stationtext = gsn_add_text(wks,plot,round(siteanom(n),3),sitelons(n),sitelats(n),tres) end do tres@txFontHeightF = 0.025 dum = gsn_add_text(wks,plot,"90 Day Total Cooling Degree Days",-77.5,41.4,tres) tres@txFontHeightF = 0.015 dum = gsn_add_text(wks,plot,"(data for a minimum of 85 days is required)",-77.5,41.0,tres) tres@txFont = "helvetica" tres@txJust = "CenterLeft" tres@txFontHeightF = .010 label = "Image Created By Nick Bassill" tres@txFontOpacityF = .5 gsn_text_ndc(wks,label,.001,.77 ,tres) label = "Data Provided By The NYS Mesonet" gsn_text_ndc(wks,label,.001,.75 ,tres) tres@txJust = "CenterCenter" tres@txFontOpacityF = 1 gsn_text_ndc(wks,".",.99,.99 ,tres) draw(plot) frame(wks) delete(sitefile) delete(sitelats) delete(sitelons) delete(sitedata) delete(siteanom) delete(markercolors) delete(stationmarker) ; make daily heating plot below wks_type = "png" wks_type@wkWidth = 2000 wks_type@wkHeight = 1600 wks = gsn_open_wks(wks_type,"dailyheating") sitefile = "dailyheating.dat" sitedata = asciiread(sitefile,-1,"string") sitelats = tofloat(str_get_field(sitedata,1,delim)) sitelons = tofloat(str_get_field(sitedata,2,delim)) siteanom = tofloat(str_get_field(sitedata,3,delim)) size = dimsizes(sitelons) plot = gsn_csm_contour_map(wks,fillvarlevel,res) labels = (/"0","10","20","30","40","50","60","70","80","90","100","HDD"/) lbres = True ; Set up a resource list for the labelbar. lbres@vpWidthF = 0.1 lbres@vpHeightF = 0.25 lbres@lbBoxLinesOn = False lbres@lbFillColors = (/20,40,60,80,100,120,140,160,180,200,220,-1/) lbres@lbMonoFillPattern = True lbres@lbOrientation = "Vertical" lbres@lbPerimOn = False lbres@lbLabelFontHeightF = .013 lbres@lbLabelAutoStride = False lbid = gsn_create_labelbar_ndc(wks,12,labels,.7,.5,lbres) amres = True amres@amZone = 0 amres@amParallelPosF = 0.4 amres@amOrthogonalPosF = 0 annoid = gsn_add_annotation(plot,lbid,amres) ;;;;;;;;;;;; this part tells the marker what color to be based on the anomaly markercolors = new(size(0),"integer") do n=0,size(0)-1,1 markercolors(n) = round((siteanom(n)*2),3)+20 end do markercolors=where((markercolors.gt.255),255,markercolors) stationmarker = new(size(0),graphic) do n=0,size(0)-1,1 mres = True ; marker resources for best track mres@gsMarkerIndex = 16 ; marker style (filled circle) mres@gsMarkerSizeF = 23.0 ; marker size mres@gsMarkerColor = markercolors(n) ; marker color mres@tfPolyDrawOrder= "PostDraw" stationmarker(n) = gsn_add_polymarker(wks,plot,sitelons(n),sitelats(n),mres) tres = True ; text mods desired tres@tfPolyDrawOrder = "PostDraw" tres@txFont = "helvetica-bold" tres@txFontHeightF = 0.014 if any(siteanom.lt.-9.5) tres@txFontHeightF = 0.011 end if stationtext = gsn_add_text(wks,plot,round(siteanom(n),3),sitelons(n),sitelats(n),tres) end do tres@txFontHeightF = 0.025 dum = gsn_add_text(wks,plot,"Yesterday's Heating Degree Days",-77.5,41.4,tres) tres@txFontHeightF = 0.015 dum = gsn_add_text(wks,plot,"(data for at least 90% of the day is required)",-77.5,41.0,tres) tres@txFont = "helvetica" tres@txJust = "CenterLeft" tres@txFontHeightF = .010 label = "Image Created By Nick Bassill" tres@txFontOpacityF = .5 gsn_text_ndc(wks,label,.001,.77 ,tres) label = "Data Provided By The NYS Mesonet" gsn_text_ndc(wks,label,.001,.75 ,tres) tres@txJust = "CenterCenter" tres@txFontOpacityF = 1 gsn_text_ndc(wks,".",.99,.99 ,tres) draw(plot) frame(wks) delete(sitefile) delete(sitelats) delete(sitelons) delete(sitedata) delete(siteanom) delete(markercolors) delete(stationmarker) ; make weekly heating plot below wks_type = "png" wks_type@wkWidth = 2000 wks_type@wkHeight = 1600 wks = gsn_open_wks(wks_type,"weeklyheating") sitefile = "weeklyheating.dat" sitedata = asciiread(sitefile,-1,"string") sitelats = tofloat(str_get_field(sitedata,1,delim)) sitelons = tofloat(str_get_field(sitedata,2,delim)) siteanom = tofloat(str_get_field(sitedata,3,delim)) size = dimsizes(sitelons) plot = gsn_csm_contour_map(wks,fillvarlevel,res) labels = (/"0","50","100","150","200","250","300","350","400","450","500","HDD"/) lbres = True ; Set up a resource list for the labelbar. lbres@vpWidthF = 0.1 lbres@vpHeightF = 0.25 lbres@lbBoxLinesOn = False lbres@lbFillColors = (/5,30,55,80,105,130,155,180,205,230,255,-1/) lbres@lbMonoFillPattern = True lbres@lbOrientation = "Vertical" lbres@lbPerimOn = False lbres@lbLabelFontHeightF = .013 lbres@lbLabelAutoStride = False lbid = gsn_create_labelbar_ndc(wks,12,labels,.7,.5,lbres) amres = True amres@amZone = 0 amres@amParallelPosF = 0.4 amres@amOrthogonalPosF = 0 annoid = gsn_add_annotation(plot,lbid,amres) ;;;;;;;;;;;; this part tells the marker what color to be based on the anomaly markercolors = new(size(0),"integer") do n=0,size(0)-1,1 markercolors(n) = round((siteanom(n)*.5),3)+5 end do ;markercolors=where((markercolors.lt.17),17,markercolors) markercolors=where((markercolors.gt.255),255,markercolors) stationmarker = new(size(0),graphic) do n=0,size(0)-1,1 mres = True ; marker resources for best track mres@gsMarkerIndex = 16 ; marker style (filled circle) mres@gsMarkerSizeF = 23.0 ; marker size mres@gsMarkerColor = markercolors(n) ; marker color mres@tfPolyDrawOrder= "PostDraw" stationmarker(n) = gsn_add_polymarker(wks,plot,sitelons(n),sitelats(n),mres) tres = True ; text mods desired tres@tfPolyDrawOrder = "PostDraw" tres@txFont = "helvetica-bold" tres@txFontHeightF = 0.010 if any(siteanom.lt.-9.5) tres@txFontHeightF = 0.011 end if stationtext = gsn_add_text(wks,plot,round(siteanom(n),3),sitelons(n),sitelats(n),tres) end do tres@txFontHeightF = 0.025 dum = gsn_add_text(wks,plot,"7 Day Total Heating Degree Days",-77.5,41.4,tres) tres@txFontHeightF = 0.015 dum = gsn_add_text(wks,plot,"(data for all 7 days is required)",-77.5,41.0,tres) tres@txFont = "helvetica" tres@txJust = "CenterLeft" tres@txFontHeightF = .010 label = "Image Created By Nick Bassill" tres@txFontOpacityF = .5 gsn_text_ndc(wks,label,.001,.77 ,tres) label = "Data Provided By The NYS Mesonet" gsn_text_ndc(wks,label,.001,.75 ,tres) tres@txJust = "CenterCenter" tres@txFontOpacityF = 1 gsn_text_ndc(wks,".",.99,.99 ,tres) draw(plot) frame(wks) delete(sitefile) delete(sitelats) delete(sitelons) delete(sitedata) delete(siteanom) delete(markercolors) delete(stationmarker) ; make monthly heating plot below wks_type = "png" wks_type@wkWidth = 2000 wks_type@wkHeight = 1600 wks = gsn_open_wks(wks_type,"monthlyheating") sitefile = "monthlyheating.dat" sitedata = asciiread(sitefile,-1,"string") sitelats = tofloat(str_get_field(sitedata,1,delim)) sitelons = tofloat(str_get_field(sitedata,2,delim)) siteanom = tofloat(str_get_field(sitedata,3,delim)) size = dimsizes(sitelons) plot = gsn_csm_contour_map(wks,fillvarlevel,res) labels = (/"0","250","500","750","1000","1250","1500","1750","2000","2250","2500","HDD"/) lbres = True ; Set up a resource list for the labelbar. lbres@vpWidthF = 0.1 lbres@vpHeightF = 0.25 lbres@lbBoxLinesOn = False lbres@lbFillColors = (/5,30,55,80,105,130,155,180,205,230,255,-1/) lbres@lbMonoFillPattern = True lbres@lbOrientation = "Vertical" lbres@lbPerimOn = False lbres@lbLabelFontHeightF = .013 lbres@lbLabelAutoStride = False lbid = gsn_create_labelbar_ndc(wks,12,labels,.7,.5,lbres) amres = True amres@amZone = 0 amres@amParallelPosF = 0.4 amres@amOrthogonalPosF = 0 annoid = gsn_add_annotation(plot,lbid,amres) ;;;;;;;;;;;; this part tells the marker what color to be based on the anomaly markercolors = new(size(0),"integer") do n=0,size(0)-1,1 markercolors(n) = round((siteanom(n)*.1),3)+5 end do ;markercolors=where((markercolors.lt.17),17,markercolors) markercolors=where((markercolors.gt.255),255,markercolors) stationmarker = new(size(0),graphic) do n=0,size(0)-1,1 mres = True ; marker resources for best track mres@gsMarkerIndex = 16 ; marker style (filled circle) mres@gsMarkerSizeF = 23.0 ; marker size mres@gsMarkerColor = markercolors(n) ; marker color mres@tfPolyDrawOrder= "PostDraw" stationmarker(n) = gsn_add_polymarker(wks,plot,sitelons(n),sitelats(n),mres) tres = True ; text mods desired tres@tfPolyDrawOrder = "PostDraw" tres@txFont = "helvetica-bold" tres@txFontHeightF = 0.010 if any(siteanom.lt.-9.5) tres@txFontHeightF = 0.011 end if stationtext = gsn_add_text(wks,plot,round(siteanom(n),3),sitelons(n),sitelats(n),tres) end do tres@txFontHeightF = 0.025 dum = gsn_add_text(wks,plot,"30 Day Total Heating Degree Days",-77.5,41.4,tres) tres@txFontHeightF = 0.015 dum = gsn_add_text(wks,plot,"(data for a minimum of 28 days is required)",-77.5,41.0,tres) tres@txFont = "helvetica" tres@txJust = "CenterLeft" tres@txFontHeightF = .010 label = "Image Created By Nick Bassill" tres@txFontOpacityF = .5 gsn_text_ndc(wks,label,.001,.77 ,tres) label = "Data Provided By The NYS Mesonet" gsn_text_ndc(wks,label,.001,.75 ,tres) tres@txJust = "CenterCenter" tres@txFontOpacityF = 1 gsn_text_ndc(wks,".",.99,.99 ,tres) draw(plot) frame(wks) delete(sitefile) delete(sitelats) delete(sitelons) delete(sitedata) delete(siteanom) delete(markercolors) delete(stationmarker) ; make three monthly heating plot below wks_type = "png" wks_type@wkWidth = 2000 wks_type@wkHeight = 1600 wks = gsn_open_wks(wks_type,"threemonthlyheating") sitefile = "threemonthlyheating.dat" sitedata = asciiread(sitefile,-1,"string") sitelats = tofloat(str_get_field(sitedata,1,delim)) sitelons = tofloat(str_get_field(sitedata,2,delim)) siteanom = tofloat(str_get_field(sitedata,3,delim)) size = dimsizes(sitelons) plot = gsn_csm_contour_map(wks,fillvarlevel,res) labels = (/"0","500","1000","1500","2000","2500","3000","3500","4000","4500","5000","HDD"/) lbres = True ; Set up a resource list for the labelbar. lbres@vpWidthF = 0.1 lbres@vpHeightF = 0.25 lbres@lbBoxLinesOn = False lbres@lbFillColors = (/5,30,55,80,105,130,155,180,205,230,255,-1/) lbres@lbMonoFillPattern = True lbres@lbOrientation = "Vertical" lbres@lbPerimOn = False lbres@lbLabelFontHeightF = .013 lbres@lbLabelAutoStride = False lbid = gsn_create_labelbar_ndc(wks,12,labels,.7,.5,lbres) amres = True amres@amZone = 0 amres@amParallelPosF = 0.4 amres@amOrthogonalPosF = 0 annoid = gsn_add_annotation(plot,lbid,amres) ;;;;;;;;;;;; this part tells the marker what color to be based on the anomaly markercolors = new(size(0),"integer") do n=0,size(0)-1,1 markercolors(n) = round((siteanom(n)*.05),3)+5 end do ;markercolors=where((markercolors.lt.17),17,markercolors) markercolors=where((markercolors.gt.255),255,markercolors) stationmarker = new(size(0),graphic) do n=0,size(0)-1,1 mres = True ; marker resources for best track mres@gsMarkerIndex = 16 ; marker style (filled circle) mres@gsMarkerSizeF = 23.0 ; marker size mres@gsMarkerColor = markercolors(n) ; marker color mres@tfPolyDrawOrder= "PostDraw" stationmarker(n) = gsn_add_polymarker(wks,plot,sitelons(n),sitelats(n),mres) tres = True ; text mods desired tres@tfPolyDrawOrder = "PostDraw" tres@txFont = "helvetica-bold" tres@txFontHeightF = 0.010 if any(siteanom.lt.-9.5) tres@txFontHeightF = 0.011 end if stationtext = gsn_add_text(wks,plot,round(siteanom(n),3),sitelons(n),sitelats(n),tres) end do tres@txFontHeightF = 0.025 dum = gsn_add_text(wks,plot,"90 Day Total Heating Degree Days",-77.5,41.4,tres) tres@txFontHeightF = 0.015 dum = gsn_add_text(wks,plot,"(data for a minimum of 85 days is required)",-77.5,41.0,tres) tres@txFont = "helvetica" tres@txJust = "CenterLeft" tres@txFontHeightF = .010 label = "Image Created By Nick Bassill" tres@txFontOpacityF = .5 gsn_text_ndc(wks,label,.001,.77 ,tres) label = "Data Provided By The NYS Mesonet" gsn_text_ndc(wks,label,.001,.75 ,tres) tres@txJust = "CenterCenter" tres@txFontOpacityF = 1 gsn_text_ndc(wks,".",.99,.99 ,tres) draw(plot) frame(wks) delete(sitefile) delete(sitelats) delete(sitelons) delete(sitedata) delete(siteanom) delete(markercolors) delete(stationmarker) ;;;;; precip section below ; make precip monthly anomaly plot below wks_type = "png" wks_type@wkWidth = 2000 wks_type@wkHeight = 1600 wks = gsn_open_wks(wks_type,"precipmonthly") ;gsn_define_colormap(wks,"OceanLakeLandSnow") sitefile = "precipmonthly.dat" sitedata = asciiread(sitefile,-1,"string") sitelats = tofloat(str_get_field(sitedata,1,delim)) sitelons = tofloat(str_get_field(sitedata,2,delim)) siteanom = tofloat(str_get_field(sitedata,3,delim)) size = dimsizes(sitelons) plot = gsn_csm_contour_map(wks,fillvarlevel,res) lbres = True ; Set up a resource list for the labelbar. labels = (/"-4.0","-3.2","-2.4","-1.6","-0.8","0","+0.8","+1.6","+2.4","+3.2","+4.0","in"/) lbres@vpWidthF = 0.1 lbres@vpHeightF = 0.25 lbres@lbBoxLinesOn = False lbres@lbFillColors = (/204,184,164,144,124,104,84,64,44,24,4,-1/); use with gsn_define_colormap(wks,"OceanLakeLandSnow") lbres@lbFillColors = (/200,192,184,176,168,140,132,124,116,108,100,-1/) lbres@lbMonoFillPattern = True lbres@lbOrientation = "Vertical" lbres@lbPerimOn = False lbres@lbLabelFontHeightF = .013 lbres@lbLabelAutoStride = True lbid = gsn_create_labelbar_ndc(wks,12,labels,.7,.5,lbres) amres = True amres@amZone = 0 amres@amParallelPosF = 0.4 amres@amOrthogonalPosF = 0 annoid = gsn_add_annotation(plot,lbid,amres) ;;;;;;;;;;;; this part tells the marker what color to be based on the anomaly markercolors = new(size(0),"integer") do n=0,size(0)-1,1 if siteanom(n).ge.0 markercolors(n) = ((round((siteanom(n)*10),3))*-1)+140 else markercolors(n) = ((round((siteanom(n)*10),3))*-1)+160 end if end do markercolors=where((markercolors.lt.70),70,markercolors) markercolors=where((markercolors.gt.230),230,markercolors) stationmarker = new(size(0),graphic) do n=0,size(0)-1,1 mres = True ; marker resources for best track mres@gsMarkerIndex = 16 ; marker style (filled circle) mres@gsMarkerSizeF = 23.0 ; marker size mres@gsMarkerColor = markercolors(n) ; marker color mres@tfPolyDrawOrder= "PostDraw" stationmarker(n) = gsn_add_polymarker(wks,plot,sitelons(n),sitelats(n),mres) tres = True ; text mods desired tres@tfPolyDrawOrder = "PostDraw" tres@txFont = "helvetica-bold" tres@txFontHeightF = 0.010 ; if any(siteanom.lt.-9.5) ; tres@txFontHeightF = 0.011 ; end if stationtext = gsn_add_text(wks,plot,.1*round(10*siteanom(n),3),sitelons(n),sitelats(n),tres) end do tres@txFontHeightF = 0.03 dum = gsn_add_text(wks,plot,"30 Day Precipitation Anomaly",-77.5,41.4,tres) tres@txFontHeightF = 0.015 dum = gsn_add_text(wks,plot,"(data for a minimum of 28 days is required)",-77.5,41.0,tres) tres@txFont = "helvetica" tres@txJust = "CenterLeft" tres@txFontHeightF = .010 label = "Image Created By Nick Bassill" tres@txFontOpacityF = .5 gsn_text_ndc(wks,label,.001,.77 ,tres) label = "Data Provided By The NYS Mesonet" gsn_text_ndc(wks,label,.001,.75 ,tres) tres@txJust = "CenterCenter" tres@txFontOpacityF = 1 gsn_text_ndc(wks,".",.99,.99 ,tres) draw(plot) frame(wks) delete(sitefile) delete(sitelats) delete(sitelons) delete(sitedata) delete(siteanom) delete(markercolors) delete(stationmarker) ; make precip weekly anomaly plot below wks_type = "png" wks_type@wkWidth = 2000 wks_type@wkHeight = 1600 wks = gsn_open_wks(wks_type,"precipweekly") ;gsn_define_colormap(wks,"OceanLakeLandSnow") sitefile = "precipweekly.dat" sitedata = asciiread(sitefile,-1,"string") sitelats = tofloat(str_get_field(sitedata,1,delim)) sitelons = tofloat(str_get_field(sitedata,2,delim)) siteanom = tofloat(str_get_field(sitedata,3,delim)) size = dimsizes(sitelons) plot = gsn_csm_contour_map(wks,fillvarlevel,res) lbres = True ; Set up a resource list for the labelbar. labels = (/"-1.0","-0.6","-0.2","0","+0.2","+0.4","+0.6","+0.8","+1.0","+2.0","+3.0","in"/) lbres@vpWidthF = 0.1 lbres@vpHeightF = 0.25 lbres@lbBoxLinesOn = False lbres@lbFillColors = (/204,184,164,144,124,104,84,64,44,24,4,-1/) ; use with gsn_define_colormap(wks,"OceanLakeLandSnow") lbres@lbFillColors = (/180,172,164,140,136,132,128,124,120,100,80,-1/) lbres@lbMonoFillPattern = True lbres@lbOrientation = "Vertical" lbres@lbPerimOn = False lbres@lbLabelFontHeightF = .013 lbres@lbLabelAutoStride = True lbid = gsn_create_labelbar_ndc(wks,12,labels,.7,.5,lbres) amres = True amres@amZone = 0 amres@amParallelPosF = 0.4 amres@amOrthogonalPosF = 0 annoid = gsn_add_annotation(plot,lbid,amres) ;;;;;;;;;;;; this part tells the marker what color to be based on the anomaly markercolors = new(size(0),"integer") do n=0,size(0)-1,1 if siteanom(n).ge.0 markercolors(n) = ((round((siteanom(n)*20),3))*-1)+140 else markercolors(n) = ((round((siteanom(n)*20),3))*-1)+160 end if end do markercolors=where((markercolors.lt.70),70,markercolors) markercolors=where((markercolors.gt.230),230,markercolors) stationmarker = new(size(0),graphic) do n=0,size(0)-1,1 mres = True ; marker resources for best track mres@gsMarkerIndex = 16 ; marker style (filled circle) mres@gsMarkerSizeF = 23.0 ; marker size mres@gsMarkerColor = markercolors(n) ; marker color mres@tfPolyDrawOrder= "PostDraw" stationmarker(n) = gsn_add_polymarker(wks,plot,sitelons(n),sitelats(n),mres) tres = True ; text mods desired tres@tfPolyDrawOrder = "PostDraw" tres@txFont = "helvetica-bold" tres@txFontHeightF = 0.010 ; if any(siteanom.lt.-9.5) ; tres@txFontHeightF = 0.011 ; end if stationtext = gsn_add_text(wks,plot,.1*round(10*siteanom(n),3),sitelons(n),sitelats(n),tres) end do tres@txFontHeightF = 0.03 dum = gsn_add_text(wks,plot,"7 Day Precipitation Anomaly",-77.5,41.4,tres) tres@txFontHeightF = 0.015 dum = gsn_add_text(wks,plot,"(data for all 7 days is required)",-77.5,41.0,tres) tres@txFont = "helvetica" tres@txJust = "CenterLeft" tres@txFontHeightF = .010 label = "Image Created By Nick Bassill" tres@txFontOpacityF = .5 gsn_text_ndc(wks,label,.001,.77 ,tres) label = "Data Provided By The NYS Mesonet" gsn_text_ndc(wks,label,.001,.75 ,tres) tres@txJust = "CenterCenter" tres@txFontOpacityF = 1 gsn_text_ndc(wks,".",.99,.99 ,tres) draw(plot) frame(wks) delete(sitefile) delete(sitelats) delete(sitelons) delete(sitedata) delete(siteanom) delete(markercolors) delete(stationmarker) ; make precip daily anomaly plot below wks_type = "png" wks_type@wkWidth = 2000 wks_type@wkHeight = 1600 wks = gsn_open_wks(wks_type,"precipdaily") ;gsn_define_colormap(wks,"OceanLakeLandSnow") sitefile = "precipdaily.dat" sitedata = asciiread(sitefile,-1,"string") sitelats = tofloat(str_get_field(sitedata,1,delim)) sitelons = tofloat(str_get_field(sitedata,2,delim)) siteanom = tofloat(str_get_field(sitedata,3,delim)) size = dimsizes(sitelons) plot = gsn_csm_contour_map(wks,fillvarlevel,res) lbres = True ; Set up a resource list for the labelbar. labels = (/"-0.2","-0.1","0.0","+0.2","+0.4","+0.6","+0.8","+1.0","+1.5","+2.0","+3.0","in"/) lbres@vpWidthF = 0.1 lbres@vpHeightF = 0.25 lbres@lbBoxLinesOn = False lbres@lbFillColors = (/204,184,164,144,124,104,84,64,44,24,4,-1/) ; use with gsn_define_colormap(wks,"OceanLakeLandSnow") lbres@lbFillColors = (/168,164,140,136,132,128,124,120,110,100,80,-1/) lbres@lbMonoFillPattern = True lbres@lbOrientation = "Vertical" lbres@lbPerimOn = False lbres@lbLabelFontHeightF = .013 lbres@lbLabelAutoStride = True lbid = gsn_create_labelbar_ndc(wks,12,labels,.7,.5,lbres) amres = True amres@amZone = 0 amres@amParallelPosF = 0.4 amres@amOrthogonalPosF = 0 annoid = gsn_add_annotation(plot,lbid,amres) ;;;;;;;;;;;; this part tells the marker what color to be based on the anomaly markercolors = new(size(0),"integer") do n=0,size(0)-1,1 if siteanom(n).ge.0 markercolors(n) = ((round((siteanom(n)*20),3))*-1)+140 else markercolors(n) = ((round((siteanom(n)*40),3))*-1)+160 end if end do markercolors=where((markercolors.lt.70),70,markercolors) markercolors=where((markercolors.gt.230),230,markercolors) stationmarker = new(size(0),graphic) do n=0,size(0)-1,1 mres = True ; marker resources for best track mres@gsMarkerIndex = 16 ; marker style (filled circle) mres@gsMarkerSizeF = 23.0 ; marker size mres@gsMarkerColor = markercolors(n) ; marker color mres@tfPolyDrawOrder= "PostDraw" stationmarker(n) = gsn_add_polymarker(wks,plot,sitelons(n),sitelats(n),mres) tres = True ; text mods desired tres@tfPolyDrawOrder = "PostDraw" tres@txFont = "helvetica-bold" tres@txFontHeightF = 0.010 ; if any(siteanom.lt.-9.5) ; tres@txFontHeightF = 0.011 ; end if stationtext = gsn_add_text(wks,plot,.1*round(10*siteanom(n),3),sitelons(n),sitelats(n),tres) end do tres@txFontHeightF = 0.025 dum = gsn_add_text(wks,plot,"Yesterday's Precipitation Anomaly",-77.5,41.4,tres) tres@txFontHeightF = 0.015 dum = gsn_add_text(wks,plot,"(data for at least 90% of the day is required)",-77.5,41.0,tres) tres@txFont = "helvetica" tres@txJust = "CenterLeft" tres@txFontHeightF = .010 label = "Image Created By Nick Bassill" tres@txFontOpacityF = .5 gsn_text_ndc(wks,label,.001,.77 ,tres) label = "Data Provided By The NYS Mesonet" gsn_text_ndc(wks,label,.001,.75 ,tres) tres@txJust = "CenterCenter" tres@txFontOpacityF = 1 gsn_text_ndc(wks,".",.99,.99 ,tres) draw(plot) frame(wks) delete(sitefile) delete(sitelats) delete(sitelons) delete(sitedata) delete(siteanom) delete(markercolors) delete(stationmarker) ; make precip three monthly anomaly plot below wks_type = "png" wks_type@wkWidth = 2000 wks_type@wkHeight = 1600 wks = gsn_open_wks(wks_type,"precipthreemonthly") ;gsn_define_colormap(wks,"OceanLakeLandSnow") sitefile = "precipthreemonthly.dat" sitedata = asciiread(sitefile,-1,"string") sitelats = tofloat(str_get_field(sitedata,1,delim)) sitelons = tofloat(str_get_field(sitedata,2,delim)) siteanom = tofloat(str_get_field(sitedata,3,delim)) size = dimsizes(sitelons) plot = gsn_csm_contour_map(wks,fillvarlevel,res) lbres = True ; Set up a resource list for the labelbar. labels = (/"-8.0","-6.4","-4.8","-3.2","-1.6","0","+1.6","+3.2","+4.8","+6.4","+8.0","in"/) lbres@vpWidthF = 0.1 lbres@vpHeightF = 0.25 lbres@lbBoxLinesOn = False ;lbres@lbFillColors = (/204,184,164,144,124,104,84,64,44,24,4,-1/); use with gsn_define_colormap(wks,"OceanLakeLandSnow") lbres@lbFillColors = (/200,192,184,176,168,140,132,124,116,108,100,-1/) lbres@lbMonoFillPattern = True lbres@lbOrientation = "Vertical" lbres@lbPerimOn = False lbres@lbLabelFontHeightF = .013 lbres@lbLabelAutoStride = True lbid = gsn_create_labelbar_ndc(wks,12,labels,.7,.5,lbres) amres = True amres@amZone = 0 amres@amParallelPosF = 0.4 amres@amOrthogonalPosF = 0 annoid = gsn_add_annotation(plot,lbid,amres) ;;;;;;;;;;;; this part tells the marker what color to be based on the anomaly markercolors = new(size(0),"integer") do n=0,size(0)-1,1 if siteanom(n).ge.0 markercolors(n) = ((round((siteanom(n)*5),3))*-1)+140 else markercolors(n) = ((round((siteanom(n)*5),3))*-1)+160 end if end do markercolors=where((markercolors.lt.70),70,markercolors) markercolors=where((markercolors.gt.230),230,markercolors) stationmarker = new(size(0),graphic) do n=0,size(0)-1,1 mres = True ; marker resources for best track mres@gsMarkerIndex = 16 ; marker style (filled circle) mres@gsMarkerSizeF = 23.0 ; marker size mres@gsMarkerColor = markercolors(n) ; marker color mres@tfPolyDrawOrder= "PostDraw" stationmarker(n) = gsn_add_polymarker(wks,plot,sitelons(n),sitelats(n),mres) tres = True ; text mods desired tres@tfPolyDrawOrder = "PostDraw" tres@txFont = "helvetica-bold" tres@txFontHeightF = 0.010 ; if any(siteanom.lt.-9.5) ; tres@txFontHeightF = 0.011 ; end if stationtext = gsn_add_text(wks,plot,.1*round(10*siteanom(n),3),sitelons(n),sitelats(n),tres) end do tres@txFontHeightF = 0.03 dum = gsn_add_text(wks,plot,"90 Day Precipitation Anomaly",-77.5,41.4,tres) tres@txFontHeightF = 0.015 dum = gsn_add_text(wks,plot,"(data for a minimum of 85 days is required)",-77.5,41.0,tres) tres@txFont = "helvetica" tres@txJust = "CenterLeft" tres@txFontHeightF = .010 label = "Image Created By Nick Bassill" tres@txFontOpacityF = .5 gsn_text_ndc(wks,label,.001,.77 ,tres) label = "Data Provided By The NYS Mesonet" gsn_text_ndc(wks,label,.001,.75 ,tres) tres@txJust = "CenterCenter" tres@txFontOpacityF = 1 gsn_text_ndc(wks,".",.99,.99 ,tres) draw(plot) frame(wks) delete(sitefile) delete(sitelats) delete(sitelons) delete(sitedata) delete(siteanom) delete(markercolors) delete(stationmarker) ; make precip three monthly total plot below wks_type = "png" wks_type@wkWidth = 2000 wks_type@wkHeight = 1600 wks = gsn_open_wks(wks_type,"preciptotalthreemonthly") ;gsn_define_colormap(wks,"WhiteGreen") sitefile = "preciptotalthreemonthly.dat" sitedata = asciiread(sitefile,-1,"string") sitelats = tofloat(str_get_field(sitedata,1,delim)) sitelons = tofloat(str_get_field(sitedata,2,delim)) siteanom = tofloat(str_get_field(sitedata,3,delim)) size = dimsizes(sitelons) plot = gsn_csm_contour_map(wks,fillvarlevel,res) lbres = True ; Set up a resource list for the labelbar. labels = (/"0","1","2","3","4","5","6","8","10","13","16","in"/) ;lbres@lbFillColors = (/10,15,20,30,45,60,85,110,135,160,200,-1/) ; use these with gsn_define_colormap(wks,"WhiteGreen") lbres@vpWidthF = 0.1 lbres@vpHeightF = 0.25 lbres@lbBoxLinesOn = False lbres@lbFillColors = (/150,145,140,135,130,125,120,110,100,85,70,-1/) lbres@lbMonoFillPattern = True lbres@lbOrientation = "Vertical" lbres@lbPerimOn = False lbres@lbLabelFontHeightF = .013 lbres@lbLabelAutoStride = True lbid = gsn_create_labelbar_ndc(wks,12,labels,.7,.5,lbres) amres = True amres@amZone = 0 amres@amParallelPosF = 0.4 amres@amOrthogonalPosF = 0 annoid = gsn_add_annotation(plot,lbid,amres) ;;;;;;;;;;;; this part tells the marker what color to be based on the anomaly markercolors = new(size(0),"integer") do n=0,size(0)-1,1 markercolors(n) = ((round((siteanom(n)*5),3))*-1)+150 end do markercolors=where((markercolors.lt.70),70,markercolors) stationmarker = new(size(0),graphic) do n=0,size(0)-1,1 mres = True ; marker resources for best track mres@gsMarkerIndex = 16 ; marker style (filled circle) mres@gsMarkerSizeF = 23.0 ; marker size mres@gsMarkerColor = markercolors(n) ; marker color mres@tfPolyDrawOrder= "PostDraw" stationmarker(n) = gsn_add_polymarker(wks,plot,sitelons(n),sitelats(n),mres) tres = True ; text mods desired tres@tfPolyDrawOrder = "PostDraw" tres@txFont = "helvetica-bold" tres@txFontHeightF = 0.009 ; if any(siteanom.lt.-9.5) ; tres@txFontHeightF = 0.011 ; end if stationtext = gsn_add_text(wks,plot,.1*round(10*siteanom(n),3),sitelons(n),sitelats(n),tres) end do tres@txFontHeightF = 0.03 dum = gsn_add_text(wks,plot,"90 Day Precipitation Total",-77.5,41.4,tres) tres@txFontHeightF = 0.015 dum = gsn_add_text(wks,plot,"(data for a minimum of 85 days is required)",-77.5,41.0,tres) tres@txFont = "helvetica" tres@txJust = "CenterLeft" tres@txFontHeightF = .010 label = "Image Created By Nick Bassill" tres@txFontOpacityF = .5 gsn_text_ndc(wks,label,.001,.77 ,tres) label = "Data Provided By The NYS Mesonet" gsn_text_ndc(wks,label,.001,.75 ,tres) tres@txJust = "CenterCenter" tres@txFontOpacityF = 1 gsn_text_ndc(wks,".",.99,.99 ,tres) draw(plot) frame(wks) delete(sitefile) delete(sitelats) delete(sitelons) delete(sitedata) delete(siteanom) delete(markercolors) delete(stationmarker) ; make precip monthly total plot below wks_type = "png" wks_type@wkWidth = 2000 wks_type@wkHeight = 1600 wks = gsn_open_wks(wks_type,"preciptotalmonthly") ;gsn_define_colormap(wks,"WhiteGreen") sitefile = "preciptotalmonthly.dat" sitedata = asciiread(sitefile,-1,"string") sitelats = tofloat(str_get_field(sitedata,1,delim)) sitelons = tofloat(str_get_field(sitedata,2,delim)) siteanom = tofloat(str_get_field(sitedata,3,delim)) size = dimsizes(sitelons) plot = gsn_csm_contour_map(wks,fillvarlevel,res) lbres = True ; Set up a resource list for the labelbar. labels = (/"0","0.2","0.4","0.8","1.4","2.0","3.0","4.0","5.0","6.0","8.0","in"/) ;lbres@lbFillColors = (/10,15,20,30,45,60,85,110,135,160,200,-1/) ; use these with gsn_define_colormap(wks,"WhiteGreen") lbres@vpWidthF = 0.1 lbres@vpHeightF = 0.25 lbres@lbBoxLinesOn = False lbres@lbFillColors = (/140,139,138,136,133,130,125,120,115,110,100,-1/) lbres@lbMonoFillPattern = True lbres@lbOrientation = "Vertical" lbres@lbPerimOn = False lbres@lbLabelFontHeightF = .013 lbres@lbLabelAutoStride = True lbid = gsn_create_labelbar_ndc(wks,12,labels,.7,.5,lbres) amres = True amres@amZone = 0 amres@amParallelPosF = 0.4 amres@amOrthogonalPosF = 0 annoid = gsn_add_annotation(plot,lbid,amres) ;;;;;;;;;;;; this part tells the marker what color to be based on the anomaly markercolors = new(size(0),"integer") do n=0,size(0)-1,1 markercolors(n) = ((round((siteanom(n)*5),3))*-1)+140 end do markercolors=where((markercolors.lt.80),80,markercolors) stationmarker = new(size(0),graphic) do n=0,size(0)-1,1 mres = True ; marker resources for best track mres@gsMarkerIndex = 16 ; marker style (filled circle) mres@gsMarkerSizeF = 23.0 ; marker size mres@gsMarkerColor = markercolors(n) ; marker color mres@tfPolyDrawOrder= "PostDraw" stationmarker(n) = gsn_add_polymarker(wks,plot,sitelons(n),sitelats(n),mres) tres = True ; text mods desired tres@tfPolyDrawOrder = "PostDraw" tres@txFont = "helvetica-bold" tres@txFontHeightF = 0.010 ; if any(siteanom.lt.-9.5) ; tres@txFontHeightF = 0.011 ; end if stationtext = gsn_add_text(wks,plot,.1*round(10*siteanom(n),3),sitelons(n),sitelats(n),tres) end do tres@txFontHeightF = 0.03 dum = gsn_add_text(wks,plot,"30 Day Precipitation Total",-77.5,41.4,tres) tres@txFontHeightF = 0.015 dum = gsn_add_text(wks,plot,"(data for a minimum of 28 days is required)",-77.5,41.0,tres) tres@txFont = "helvetica" tres@txJust = "CenterLeft" tres@txFontHeightF = .010 label = "Image Created By Nick Bassill" tres@txFontOpacityF = .5 gsn_text_ndc(wks,label,.001,.77 ,tres) label = "Data Provided By The NYS Mesonet" gsn_text_ndc(wks,label,.001,.75 ,tres) tres@txJust = "CenterCenter" tres@txFontOpacityF = 1 gsn_text_ndc(wks,".",.99,.99 ,tres) draw(plot) frame(wks) delete(sitefile) delete(sitelats) delete(sitelons) delete(sitedata) delete(siteanom) delete(markercolors) delete(stationmarker) ; make precip weekly total plot below wks_type = "png" wks_type@wkWidth = 2000 wks_type@wkHeight = 1600 wks = gsn_open_wks(wks_type,"preciptotalweekly") ;gsn_define_colormap(wks,"WhiteGreen") sitefile = "preciptotalweekly.dat" sitedata = asciiread(sitefile,-1,"string") sitelats = tofloat(str_get_field(sitedata,1,delim)) sitelons = tofloat(str_get_field(sitedata,2,delim)) siteanom = tofloat(str_get_field(sitedata,3,delim)) size = dimsizes(sitelons) plot = gsn_csm_contour_map(wks,fillvarlevel,res) lbres = True ; Set up a resource list for the labelbar. labels = (/"0","0.1","0.2","0.4","0.7","1.0","1.5","2.0","2.5","3.0","4.0","in"/) ;lbres@lbFillColors = (/10,15,20,30,45,60,85,110,135,160,200,-1/) ; use these with gsn_define_colormap(wks,"WhiteGreen") lbres@vpWidthF = 0.1 lbres@vpHeightF = 0.25 lbres@lbBoxLinesOn = False lbres@lbFillColors = (/140,139,138,136,133,130,125,120,115,110,100,-1/) lbres@lbMonoFillPattern = True lbres@lbOrientation = "Vertical" lbres@lbPerimOn = False lbres@lbLabelFontHeightF = .013 lbres@lbLabelAutoStride = True lbid = gsn_create_labelbar_ndc(wks,12,labels,.7,.5,lbres) amres = True amres@amZone = 0 amres@amParallelPosF = 0.4 amres@amOrthogonalPosF = 0 annoid = gsn_add_annotation(plot,lbid,amres) ;;;;;;;;;;;; this part tells the marker what color to be based on the anomaly markercolors = new(size(0),"integer") do n=0,size(0)-1,1 markercolors(n) = ((round((siteanom(n)*10),3))*-1)+140 end do markercolors=where((markercolors.lt.80),80,markercolors) stationmarker = new(size(0),graphic) do n=0,size(0)-1,1 mres = True ; marker resources for best track mres@gsMarkerIndex = 16 ; marker style (filled circle) mres@gsMarkerSizeF = 23.0 ; marker size mres@gsMarkerColor = markercolors(n) ; marker color mres@tfPolyDrawOrder= "PostDraw" stationmarker(n) = gsn_add_polymarker(wks,plot,sitelons(n),sitelats(n),mres) tres = True ; text mods desired tres@tfPolyDrawOrder = "PostDraw" tres@txFont = "helvetica-bold" tres@txFontHeightF = 0.010 ; if any(siteanom.lt.-9.5) ; tres@txFontHeightF = 0.011 ; end if stationtext = gsn_add_text(wks,plot,.1*round(10*siteanom(n),3),sitelons(n),sitelats(n),tres) end do tres@txFontHeightF = 0.03 dum = gsn_add_text(wks,plot,"7 Day Precipitation Total",-77.5,41.4,tres) tres@txFontHeightF = 0.015 dum = gsn_add_text(wks,plot,"(data for all 7 days is required)",-77.5,41.0,tres) tres@txFont = "helvetica" tres@txJust = "CenterLeft" tres@txFontHeightF = .010 label = "Image Created By Nick Bassill" tres@txFontOpacityF = .5 gsn_text_ndc(wks,label,.001,.77 ,tres) label = "Data Provided By The NYS Mesonet" gsn_text_ndc(wks,label,.001,.75 ,tres) tres@txJust = "CenterCenter" tres@txFontOpacityF = 1 gsn_text_ndc(wks,".",.99,.99 ,tres) draw(plot) frame(wks) delete(sitefile) delete(sitelats) delete(sitelons) delete(sitedata) delete(siteanom) delete(markercolors) delete(stationmarker) ; make precip daily total plot below wks_type = "png" wks_type@wkWidth = 2000 wks_type@wkHeight = 1600 wks = gsn_open_wks(wks_type,"preciptotaldaily") ;gsn_define_colormap(wks,"WhiteGreen") sitefile = "preciptotaldaily.dat" sitedata = asciiread(sitefile,-1,"string") sitelats = tofloat(str_get_field(sitedata,1,delim)) sitelons = tofloat(str_get_field(sitedata,2,delim)) siteanom = tofloat(str_get_field(sitedata,3,delim)) size = dimsizes(sitelons) plot = gsn_csm_contour_map(wks,fillvarlevel,res) lbres = True ; Set up a resource list for the labelbar. labels = (/"0","0.1","0.2","0.4","0.7","1.0","1.5","2.0","2.5","3.0","4.0","in"/) ;lbres@lbFillColors = (/10,15,20,30,45,60,85,110,135,160,200,-1/) ; use these with gsn_define_colormap(wks,"WhiteGreen") lbres@vpWidthF = 0.1 lbres@vpHeightF = 0.25 lbres@lbBoxLinesOn = False lbres@lbFillColors = (/140,139,138,136,133,130,125,120,115,110,100,-1/) lbres@lbMonoFillPattern = True lbres@lbOrientation = "Vertical" lbres@lbPerimOn = False lbres@lbLabelFontHeightF = .013 lbres@lbLabelAutoStride = True lbid = gsn_create_labelbar_ndc(wks,12,labels,.7,.5,lbres) amres = True amres@amZone = 0 amres@amParallelPosF = 0.4 amres@amOrthogonalPosF = 0 annoid = gsn_add_annotation(plot,lbid,amres) ;;;;;;;;;;;; this part tells the marker what color to be based on the anomaly markercolors = new(size(0),"integer") do n=0,size(0)-1,1 markercolors(n) = ((round((siteanom(n)*10),3))*-1)+140 end do markercolors=where((markercolors.lt.80),80,markercolors) stationmarker = new(size(0),graphic) do n=0,size(0)-1,1 mres = True ; marker resources for best track mres@gsMarkerIndex = 16 ; marker style (filled circle) mres@gsMarkerSizeF = 23.0 ; marker size mres@gsMarkerColor = markercolors(n) ; marker color mres@tfPolyDrawOrder= "PostDraw" stationmarker(n) = gsn_add_polymarker(wks,plot,sitelons(n),sitelats(n),mres) tres = True ; text mods desired tres@tfPolyDrawOrder = "PostDraw" tres@txFont = "helvetica-bold" tres@txFontHeightF = 0.010 ; if any(siteanom.lt.-9.5) ; tres@txFontHeightF = 0.011 ; end if stationtext = gsn_add_text(wks,plot,.1*round(10*siteanom(n),3),sitelons(n),sitelats(n),tres) end do tres@txFontHeightF = 0.028 dum = gsn_add_text(wks,plot,"Yesterday's Precipitation Total",-77.5,41.4,tres) tres@txFontHeightF = 0.015 dum = gsn_add_text(wks,plot,"(data for at least 90% of the day is required)",-77.5,41.0,tres) tres@txFont = "helvetica" tres@txJust = "CenterLeft" tres@txFontHeightF = .010 label = "Image Created By Nick Bassill" tres@txFontOpacityF = .5 gsn_text_ndc(wks,label,.001,.77 ,tres) label = "Data Provided By The NYS Mesonet" gsn_text_ndc(wks,label,.001,.75 ,tres) tres@txJust = "CenterCenter" tres@txFontOpacityF = 1 gsn_text_ndc(wks,".",.99,.99 ,tres) draw(plot) frame(wks) delete(sitefile) delete(sitelats) delete(sitelons) delete(sitedata) delete(siteanom) delete(markercolors) delete(stationmarker) end