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 "$NCARG_ROOT/lib/ncarg/nclscripts/wrf/WRF_contributed.ncl" load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/contributed.ncl" begin wks = gsn_open_wks("x11","obs-data-map") gsn_define_colormap(wks,"psgcap") nc1=NhlNewColor(wks,.8,.8,.8) ;------------ SET PLOTTING RESOURCES ----------------------------------- ;----------------------------------------------------------------------- res = True res@pmTickMarkDisplayMode = "Always" res@mpMonoFillColor = False res@mpFillOn = True res@mpPerimDrawOrder = "PostDraw" res@mpOutlineBoundarySets = "GeophysicalAndUSStates" res@mpOutlineDrawOrder = "PostDraw" res@mpGridAndLimbOn = False res@mpGridLineThicknessF = 0.5 res@mpGridLineDashPattern = 1 res@mpGeophysicalLineColor = "Black" res@mpGeophysicalLineThicknessF = 0.1 res@mpNationalLineColor = "Black" res@mpNationalLineThicknessF = 0.2 res@mpUSStateLineColor = "Black" res@mpUSStateLineThicknessF = 0.1 res@mpPerimLineColor = "Black" res@mpOutlineOn = True res@mpProjection = "Stereographic" res@mpLimitMode = "Corners" res@mpLeftCornerLatF = 65.2 res@mpLeftCornerLonF = 132.8014 res@mpRightCornerLatF = 60.6 res@mpRightCornerLonF = -39.4 res@mpCenterLatF = 90 res@mpCenterLonF = -180 res@cnFillOn = True ; turn on color res@cnLinesOn = False ; turn off contour lines res@gsnSpreadColors = True ; use full colormap res@lbLabelAutoStride = True ; nice lb labels res@gsnAddCyclic = False ; regional plot res@mpGridAndLimbOn = True res@mpGridLatSpacingF = 10 res@mpGridLonSpacingF = 5 res@mpMinLatF = 60 ; min lat to mask res@mpMaxLatF = 90 ; max lat to mask ; res@mpMinLonF = 0 ; min lon to mask ; res@mpMaxLonF = 360 ; max lon to mask res@gsnMaskLambertConformal = True ; turn on lc masking res@tmXTOn = False res@tmXBOn = True res@tmYLOn = False res@tmYROn = True res@tmXTLabelFontHeightF = 0.025 res@tmXBLabelFontHeightF = 0.025 res@tmYLLabelFontHeightF = 0.025 res@tmYRLabelFontHeightF = 0.025 res@gsnMaximize = False res@gsnFrame = False ; res@gsnDraw = False res@tfDoNDCOverlay = True gres = True gres@gsMarkerIndex = 16 txres = True txres@txFontHeightF = 0.02 ;----------------------------------------------------------------------- ;----------------------------------------------------------------------- path = "/import/wrkdir1/asemenov/" source = readAsciiTable(path+"storm_track_source.txt", 1, "string", 0) coor = readAsciiTable(path+"storm_track.txt", 2, "float", 0) ;----------------------------------------------------------------------- ;----------------------------------------------------------------------- sorc = str_right_strip(source(:,0)) latsfc = coor(:,0) lonsfc = coor(:,1) ; PABR, PAOM, PAOT, YEV, PANC, PAMC, PAFA, R/V MIRAI latsound = (/ 71.30, 64.50, 66.86, 68.31, 61.16, 62.96, 64.81, 72.80 /) lonsound = (/ -156.78, -165.43, -162.53, -133.53, -150.01, -155.61, -147.86, -161.50 /) ;------------------------DEFINE DIFFERENT COLOR FOR EACH SOURCE--------- ;----------------------------------------------------------------------- colors = new( (/44/), "float") do n=0,43 if (sorc(n) .eq. "low #1 control") then colors(n) = 1. end if if (sorc(n) .eq. "low #2 control") then colors(n) = 143. end if if (sorc(n) .eq. "low #1 no_latent_heat_exp") then colors(n) = 66. end if if (sorc(n) .eq. "low #2 no_latent_heat_exp") then colors(n) = 8. end if end do ;----------------------------------------------------------------------- ;----------------------------------------------------------------------- ;-----------------CREATE MAP AND LEGEND--------------------------------- ;----------------------------------------------------------------------- map = gsn_csm_map(wks,res) xleg = (/0.04,0.04,0.04,0.04,0.04,0.04,0.04/) ; Location of xtxt = (/0.12,0.12,0.12,0.12,0.12,0.12,0.12/) ; legend markers yleg = (/0.70,0.60,0.50,0.40,0.30,0.20,0.10/) + 0.10 ; and text ytxt = (/0.70,0.60,0.50,0.40,0.30,0.20,0.10/) + 0.10 ; strings. binlabels = (/ "low #1 ~C~control", "low #2 ~C~control", " low #1 ~C~ no latent ~C~ heat exp", " low #2 ~C~ no latent ~C~ heat exp" /) ;----------------DRAW POLY MARKERS IN MAP------------------------------- ;----------------------------------------------------------------------- do i = 0,19 gres@gsMarkerColor = colors(i) gsn_polymarker(wks,map,lonsfc(i),latsfc(i),gres) end do gres@gsMarkerColor = 1. gres@gsMarkerIndex = 6 gres@gsMarkerSizeF = 0.012 gres@gsMarkerThicknessF = 2. do i = 0, 8-1 gsn_polymarker(wks,map,latsound(i),lonsound(i),gres) end do ;-------------------DRAW LEGEND----------------------------------------- ;----------------------------------------------------------------------- do i=0,3 ;fi=0 ;gres@gsMarkerIndex = 16 ;gres@gsMarkerThicknessF = 1. if (i .eq. 0) then gres@gsMarkerColor = 1. ;gres@gsMarkerIndex = 4 end if if (i .eq. 1) then gres@gsMarkerColor = 143. end if if (i .eq. 2) then gres@gsMarkerColor = 66. end if if (i .eq. 3) then gres@gsMarkerColor = 8. end if ;if (i .eq. 4) then ;gres@gsMarkerColor = 4. ;end if ;if (i .eq. 5) then ;gres@gsMarkerColor = 14. ;end if ;if (i .eq. 6) then ;gres@gsMarkerColor = 1. ;gres@gsMarkerIndex = 6 ;gres@gsMarkerThicknessF = 2. ;end if gsn_polymarker_ndc(wks,xleg(i),yleg(i),gres) gsn_text_ndc (wks,binlabels(i),xtxt(i),ytxt(i),txres) end do frame(wks) end